From 8591764ab385e93b651fc5e963d96c6bfc989fc7 Mon Sep 17 00:00:00 2001 From: Thomas Sindt Date: Sat, 22 Aug 2026 22:44:47 +0200 Subject: [PATCH] import Bugfixes --- .../.vite/deps/@mui_icons-material_Add.js | 2 +- .../.vite/deps/@mui_icons-material_Delete.js | 2 +- .../.vite/deps/@mui_icons-material_Search.js | 2 +- .../.vite/deps/@mui_lab_TabList.js | 2 +- .../.vite/deps/@mui_lab_TabPanel.js | 6 +- .../node_modules/.vite/deps/@mui_material.js | 84 +- .../.vite/deps/@mui_material_AppBar.js | 2 +- .../.vite/deps/@mui_material_Box.js | 2 +- .../.vite/deps/@mui_material_Button.js | 2 +- .../.vite/deps/@mui_material_Dialog.js | 2 +- .../.vite/deps/@mui_material_DialogActions.js | 2 +- .../.vite/deps/@mui_material_DialogContent.js | 2 +- .../.vite/deps/@mui_material_DialogTitle.js | 4 +- .../.vite/deps/@mui_material_IconButton.js | 2 +- .../deps/@mui_material_InputAdornment.js | 4 +- .../.vite/deps/@mui_material_Stack.js | 2 +- .../.vite/deps/@mui_material_Tab.js | 2 +- .../.vite/deps/@mui_material_TextField.js | 2 +- .../.vite/deps/@mui_material_Tooltip.js | 2 +- .../.vite/deps/@mui_material_Typography.js | 2 +- .../.vite/deps/@mui_x-data-grid.js | 45 +- .../.vite/deps/@mui_x-data-grid.js.map | 2 +- .../deps/@mui_x-tree-view_RichTreeView.js | 22 +- .../node_modules/.vite/deps/Alert-DHjnebpl.js | 769 -- .../.vite/deps/Alert-DHjnebpl.js.map | 1 - .../.vite/deps/AppBar-cWle_5Cg.js | 256 - .../.vite/deps/AppBar-cWle_5Cg.js.map | 1 - .../node_modules/.vite/deps/Box-CejWg7IO.js | 62 - .../.vite/deps/Box-CejWg7IO.js.map | 1 - .../.vite/deps/Button-CAa1Vq5I.js | 682 -- .../.vite/deps/Button-CAa1Vq5I.js.map | 1 - .../.vite/deps/ButtonBase-DAGRPe3U.js | 1058 --- .../.vite/deps/ButtonBase-DAGRPe3U.js.map | 1 - .../.vite/deps/Checkbox-CK4yFuSM.js | 576 -- .../.vite/deps/Checkbox-CK4yFuSM.js.map | 1 - .../.vite/deps/CircularProgress-Vd69ti-e.js | 338 - .../deps/CircularProgress-Vd69ti-e.js.map | 1 - .../deps/DefaultPropsProvider-Bc551CBZ.js | 61 - .../deps/DefaultPropsProvider-Bc551CBZ.js.map | 1 - .../.vite/deps/Dialog-BfFT1J_Q.js | 437 -- .../.vite/deps/Dialog-BfFT1J_Q.js.map | 1 - .../.vite/deps/DialogActions-CAa7GY5n.js | 90 - .../.vite/deps/DialogActions-CAa7GY5n.js.map | 1 - .../.vite/deps/DialogContent--srXz0Ob.js | 98 - .../.vite/deps/DialogContent--srXz0Ob.js.map | 1 - .../.vite/deps/DialogTitle-CKIHJWMV.js | 76 - .../.vite/deps/DialogTitle-CKIHJWMV.js.map | 1 - .../.vite/deps/EventManager-BoMkr4Rw.js | 821 --- .../.vite/deps/EventManager-BoMkr4Rw.js.map | 1 - .../node_modules/.vite/deps/Grow-B9Vp6uWA.js | 228 - .../.vite/deps/Grow-B9Vp6uWA.js.map | 1 - .../.vite/deps/IconButton-CiUjgOk6.js | 320 - .../.vite/deps/IconButton-CiUjgOk6.js.map | 1 - .../.vite/deps/InputAdornment-Cjw-UDdb.js | 165 - .../.vite/deps/InputAdornment-Cjw-UDdb.js.map | 1 - .../node_modules/.vite/deps/Modal-Dc_q3zOI.js | 1167 --- .../.vite/deps/Modal-Dc_q3zOI.js.map | 1 - .../node_modules/.vite/deps/Paper-Bm5qdnED.js | 217 - .../.vite/deps/Paper-Bm5qdnED.js.map | 1 - .../node_modules/.vite/deps/Stack-BLVENwM2.js | 232 - .../.vite/deps/Stack-BLVENwM2.js.map | 1 - .../node_modules/.vite/deps/Tab-D9ho7_MY.js | 290 - .../.vite/deps/Tab-D9ho7_MY.js.map | 1 - .../node_modules/.vite/deps/Tabs-Bl3pJg4E.js | 1021 --- .../.vite/deps/Tabs-Bl3pJg4E.js.map | 1 - .../.vite/deps/TextField-BLvydd7W.js | 5831 --------------- .../.vite/deps/TextField-BLvydd7W.js.map | 1 - .../.vite/deps/ToggleButton-BvgFYNT2.js | 6519 ----------------- .../.vite/deps/ToggleButton-BvgFYNT2.js.map | 1 - .../.vite/deps/Tooltip-D8ZXNHWc.js | 2507 ------- .../.vite/deps/Tooltip-D8ZXNHWc.js.map | 1 - .../.vite/deps/Typography-sl4NL4Ms.js | 268 - .../.vite/deps/Typography-sl4NL4Ms.js.map | 1 - .../node_modules/.vite/deps/_metadata.json | 242 +- .../.vite/deps/capitalize-C5eNvjpN.js | 5 - .../.vite/deps/capitalize-C5eNvjpN.js.map | 1 - .../.vite/deps/chainPropTypes-CuuywaSz.js | 21 - .../.vite/deps/chainPropTypes-CuuywaSz.js.map | 1 - .../.vite/deps/createSvgIcon-BulCaVae.js | 244 - .../.vite/deps/createSvgIcon-BulCaVae.js.map | 1 - .../.vite/deps/dialogTitleClasses-C2YA1vqw.js | 8 - .../deps/dialogTitleClasses-C2YA1vqw.js.map | 1 - .../deps/elementAcceptingRef-NQ-KkIxI.js | 141 - .../deps/elementAcceptingRef-NQ-KkIxI.js.map | 1 - .../deps/elementTypeAcceptingRef-ByxAWoSf.js | 33 - .../elementTypeAcceptingRef-ByxAWoSf.js.map | 1 - .../.vite/deps/getThemeProps-mtx5XCJA.js | 9 - .../.vite/deps/getThemeProps-mtx5XCJA.js.map | 1 - .../.vite/deps/identifier-BCIMFiRn.js | 5259 ------------- .../.vite/deps/identifier-BCIMFiRn.js.map | 1 - .../deps/inputAdornmentClasses-Dwv419w9.js | 18 - .../inputAdornmentClasses-Dwv419w9.js.map | 1 - .../.vite/deps/memoTheme-C4YHvZ2W.js | 27 - .../.vite/deps/memoTheme-C4YHvZ2W.js.map | 1 - .../.vite/deps/mergeSlotProps-BrPQ7QvQ.js | 52 - .../.vite/deps/mergeSlotProps-BrPQ7QvQ.js.map | 1 - .../.vite/deps/styled-4WW7iiVd.js | 5 - .../.vite/deps/styled-4WW7iiVd.js.map | 1 - .../.vite/deps/styled-6tX-8l05.js | 303 - .../.vite/deps/styled-6tX-8l05.js.map | 1 - .../.vite/deps/useSlot-BqY3lobE.js | 183 - .../.vite/deps/useSlot-BqY3lobE.js.map | 1 - .../.vite/deps/useSlotProps-C_wWtWkZ.js | 49 - .../.vite/deps/useSlotProps-C_wWtWkZ.js.map | 1 - .../.vite/deps/useTheme-DYH12Ax_.js | 20 - .../.vite/deps/useTheme-DYH12Ax_.js.map | 1 - .../.vite/deps/useThemeProps-B3jPO4rl.js | 15 - .../.vite/deps/useThemeProps-B3jPO4rl.js.map | 1 - .../.vite/deps/useThemeProps-BY-PscMe.js | 14 - .../.vite/deps/useThemeProps-BY-PscMe.js.map | 1 - buildtime/server/models/product.go | 4 +- .../server/repositories/importRepository.go | 16 +- 112 files changed, 234 insertions(+), 30765 deletions(-) delete mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/Alert-DHjnebpl.js delete mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/Alert-DHjnebpl.js.map delete mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/AppBar-cWle_5Cg.js delete mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/AppBar-cWle_5Cg.js.map delete mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/Box-CejWg7IO.js delete mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/Box-CejWg7IO.js.map delete mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/Button-CAa1Vq5I.js delete mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/Button-CAa1Vq5I.js.map delete mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/ButtonBase-DAGRPe3U.js delete mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/ButtonBase-DAGRPe3U.js.map delete mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/Checkbox-CK4yFuSM.js delete mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/Checkbox-CK4yFuSM.js.map delete mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/CircularProgress-Vd69ti-e.js delete mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/CircularProgress-Vd69ti-e.js.map delete mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/DefaultPropsProvider-Bc551CBZ.js delete mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/DefaultPropsProvider-Bc551CBZ.js.map delete mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/Dialog-BfFT1J_Q.js delete mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/Dialog-BfFT1J_Q.js.map delete mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/DialogActions-CAa7GY5n.js delete mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/DialogActions-CAa7GY5n.js.map delete mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/DialogContent--srXz0Ob.js delete mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/DialogContent--srXz0Ob.js.map delete mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/DialogTitle-CKIHJWMV.js delete mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/DialogTitle-CKIHJWMV.js.map delete mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/EventManager-BoMkr4Rw.js delete mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/EventManager-BoMkr4Rw.js.map delete mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/Grow-B9Vp6uWA.js delete mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/Grow-B9Vp6uWA.js.map delete mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/IconButton-CiUjgOk6.js delete mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/IconButton-CiUjgOk6.js.map delete mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/InputAdornment-Cjw-UDdb.js delete mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/InputAdornment-Cjw-UDdb.js.map delete mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/Modal-Dc_q3zOI.js delete mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/Modal-Dc_q3zOI.js.map delete mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/Paper-Bm5qdnED.js delete mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/Paper-Bm5qdnED.js.map delete mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/Stack-BLVENwM2.js delete mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/Stack-BLVENwM2.js.map delete mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/Tab-D9ho7_MY.js delete mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/Tab-D9ho7_MY.js.map delete mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/Tabs-Bl3pJg4E.js delete mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/Tabs-Bl3pJg4E.js.map delete mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/TextField-BLvydd7W.js delete mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/TextField-BLvydd7W.js.map delete mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/ToggleButton-BvgFYNT2.js delete mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/ToggleButton-BvgFYNT2.js.map delete mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/Tooltip-D8ZXNHWc.js delete mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/Tooltip-D8ZXNHWc.js.map delete mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/Typography-sl4NL4Ms.js delete mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/Typography-sl4NL4Ms.js.map delete mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/capitalize-C5eNvjpN.js delete mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/capitalize-C5eNvjpN.js.map delete mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/chainPropTypes-CuuywaSz.js delete mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/chainPropTypes-CuuywaSz.js.map delete mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/createSvgIcon-BulCaVae.js delete mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/createSvgIcon-BulCaVae.js.map delete mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/dialogTitleClasses-C2YA1vqw.js delete mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/dialogTitleClasses-C2YA1vqw.js.map delete mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/elementAcceptingRef-NQ-KkIxI.js delete mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/elementAcceptingRef-NQ-KkIxI.js.map delete mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/elementTypeAcceptingRef-ByxAWoSf.js delete mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/elementTypeAcceptingRef-ByxAWoSf.js.map delete mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/getThemeProps-mtx5XCJA.js delete mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/getThemeProps-mtx5XCJA.js.map delete mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/identifier-BCIMFiRn.js delete mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/identifier-BCIMFiRn.js.map delete mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/inputAdornmentClasses-Dwv419w9.js delete mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/inputAdornmentClasses-Dwv419w9.js.map delete mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/memoTheme-C4YHvZ2W.js delete mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/memoTheme-C4YHvZ2W.js.map delete mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/mergeSlotProps-BrPQ7QvQ.js delete mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/mergeSlotProps-BrPQ7QvQ.js.map delete mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/styled-4WW7iiVd.js delete mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/styled-4WW7iiVd.js.map delete mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/styled-6tX-8l05.js delete mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/styled-6tX-8l05.js.map delete mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/useSlot-BqY3lobE.js delete mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/useSlot-BqY3lobE.js.map delete mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/useSlotProps-C_wWtWkZ.js delete mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/useSlotProps-C_wWtWkZ.js.map delete mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/useTheme-DYH12Ax_.js delete mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/useTheme-DYH12Ax_.js.map delete mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/useThemeProps-B3jPO4rl.js delete mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/useThemeProps-B3jPO4rl.js.map delete mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/useThemeProps-BY-PscMe.js delete mode 100644 buildtime/client/material-editor/node_modules/.vite/deps/useThemeProps-BY-PscMe.js.map diff --git a/buildtime/client/material-editor/node_modules/.vite/deps/@mui_icons-material_Add.js b/buildtime/client/material-editor/node_modules/.vite/deps/@mui_icons-material_Add.js index 91ec21172..3b797a2de 100644 --- a/buildtime/client/material-editor/node_modules/.vite/deps/@mui_icons-material_Add.js +++ b/buildtime/client/material-editor/node_modules/.vite/deps/@mui_icons-material_Add.js @@ -1,6 +1,6 @@ "use client"; import { t as require_jsx_runtime } from "./react_jsx-runtime.js"; -import { t as createSvgIcon } from "./createSvgIcon-BulCaVae.js"; +import { t as createSvgIcon } from "./createSvgIcon-Cf0_3N9N.js"; //#region node_modules/@mui/icons-material/Add.mjs var import_jsx_runtime = require_jsx_runtime(); var Add_default = createSvgIcon(/*#__PURE__*/ (0, import_jsx_runtime.jsx)("path", { d: "M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z" }), "Add"); diff --git a/buildtime/client/material-editor/node_modules/.vite/deps/@mui_icons-material_Delete.js b/buildtime/client/material-editor/node_modules/.vite/deps/@mui_icons-material_Delete.js index c9d64a9da..93aa966a2 100644 --- a/buildtime/client/material-editor/node_modules/.vite/deps/@mui_icons-material_Delete.js +++ b/buildtime/client/material-editor/node_modules/.vite/deps/@mui_icons-material_Delete.js @@ -1,6 +1,6 @@ "use client"; import { t as require_jsx_runtime } from "./react_jsx-runtime.js"; -import { t as createSvgIcon } from "./createSvgIcon-BulCaVae.js"; +import { t as createSvgIcon } from "./createSvgIcon-Cf0_3N9N.js"; //#region node_modules/@mui/icons-material/Delete.mjs var import_jsx_runtime = require_jsx_runtime(); var Delete_default = createSvgIcon(/*#__PURE__*/ (0, import_jsx_runtime.jsx)("path", { d: "M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM19 4h-3.5l-1-1h-5l-1 1H5v2h14z" }), "Delete"); diff --git a/buildtime/client/material-editor/node_modules/.vite/deps/@mui_icons-material_Search.js b/buildtime/client/material-editor/node_modules/.vite/deps/@mui_icons-material_Search.js index 89286fbf5..b2f58f69b 100644 --- a/buildtime/client/material-editor/node_modules/.vite/deps/@mui_icons-material_Search.js +++ b/buildtime/client/material-editor/node_modules/.vite/deps/@mui_icons-material_Search.js @@ -1,6 +1,6 @@ "use client"; import { t as require_jsx_runtime } from "./react_jsx-runtime.js"; -import { t as createSvgIcon } from "./createSvgIcon-BulCaVae.js"; +import { t as createSvgIcon } from "./createSvgIcon-Cf0_3N9N.js"; //#region node_modules/@mui/icons-material/Search.mjs var import_jsx_runtime = require_jsx_runtime(); var Search_default = createSvgIcon(/*#__PURE__*/ (0, import_jsx_runtime.jsx)("path", { d: "M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14" }), "Search"); diff --git a/buildtime/client/material-editor/node_modules/.vite/deps/@mui_lab_TabList.js b/buildtime/client/material-editor/node_modules/.vite/deps/@mui_lab_TabList.js index d3ccd5ad5..3a7eeedfa 100644 --- a/buildtime/client/material-editor/node_modules/.vite/deps/@mui_lab_TabList.js +++ b/buildtime/client/material-editor/node_modules/.vite/deps/@mui_lab_TabList.js @@ -3,7 +3,7 @@ import { t as require_react } from "./react.js"; import { t as require_jsx_runtime } from "./react_jsx-runtime.js"; import { t as require_prop_types } from "./prop-types-C5owi9-6.js"; import { i as useTabContext, n as getPanelId, r as getTabId } from "./TabContext-CMSSKNSg.js"; -import { t as Tabs } from "./Tabs-Bl3pJg4E.js"; +import { t as Tabs } from "./Tabs-CL3Bsg3w.js"; //#region node_modules/@mui/lab/TabList/TabList.mjs var import_react = /* @__PURE__ */ __toESM(require_react(), 1); var import_prop_types = /* @__PURE__ */ __toESM(require_prop_types(), 1); diff --git a/buildtime/client/material-editor/node_modules/.vite/deps/@mui_lab_TabPanel.js b/buildtime/client/material-editor/node_modules/.vite/deps/@mui_lab_TabPanel.js index f196625a9..d6c21a810 100644 --- a/buildtime/client/material-editor/node_modules/.vite/deps/@mui_lab_TabPanel.js +++ b/buildtime/client/material-editor/node_modules/.vite/deps/@mui_lab_TabPanel.js @@ -2,10 +2,10 @@ import { r as __toESM } from "./rolldown-runtime-DC62tzP2.js"; import { t as require_react } from "./react.js"; import { t as require_jsx_runtime } from "./react_jsx-runtime.js"; import { t as require_prop_types } from "./prop-types-C5owi9-6.js"; -import { N as generateUtilityClasses, P as generateUtilityClass, ct as clsx } from "./identifier-BCIMFiRn.js"; -import { l as composeClasses, t as styled } from "./styled-6tX-8l05.js"; +import { F as generateUtilityClasses, I as generateUtilityClass, ut as clsx } from "./identifier-Db3dwgA7.js"; +import { l as composeClasses, t as styled } from "./styled-ry4r-NKP.js"; import { i as useTabContext, n as getPanelId, r as getTabId } from "./TabContext-CMSSKNSg.js"; -import { t as useThemeProps } from "./useThemeProps-BY-PscMe.js"; +import { t as useThemeProps } from "./useThemeProps-Bj7e_GBH.js"; //#region node_modules/@mui/lab/TabPanel/tabPanelClasses.mjs var import_react = /* @__PURE__ */ __toESM(require_react(), 1); var import_prop_types = /* @__PURE__ */ __toESM(require_prop_types(), 1); diff --git a/buildtime/client/material-editor/node_modules/.vite/deps/@mui_material.js b/buildtime/client/material-editor/node_modules/.vite/deps/@mui_material.js index 92bcb6ac1..32912ce7b 100644 --- a/buildtime/client/material-editor/node_modules/.vite/deps/@mui_material.js +++ b/buildtime/client/material-editor/node_modules/.vite/deps/@mui_material.js @@ -3,63 +3,63 @@ import { t as require_react } from "./react.js"; import { t as require_react_dom } from "./react-dom.js"; import { t as require_jsx_runtime } from "./react_jsx-runtime.js"; import { t as require_prop_types } from "./prop-types-C5owi9-6.js"; -import { A as recomposeColor, C as decomposeColor, D as hexToRgb, E as getLuminance, F as ClassNameGenerator, G as ThemeContext$1, H as css, I as createTheme$1, K as createCache, L as createSpacing, M as clamp, N as generateUtilityClasses, O as hslToRgb, P as generateUtilityClass, Q as getPath, S as darken, T as getContrastRatio, U as keyframes, W as CacheProvider, Y as styleFunctionSx_default, _ as red, a as shouldSkipGeneratingVar, at as require_react_is, b as common, c as createTransitions, ct as clsx, d as createTypography, f as createMixins, g as orange, h as blue, i as excludeVariablesFromRoot, j as rgbToHex, k as lighten, l as duration, m as lightBlue, n as createTheme, nt as createBreakpoints, o as createColorScheme, p as green, q as StyleSheet, r as createThemeWithVars, rt as deepmerge, s as getOverlayAlpha, st as capitalize, t as identifier_default, u as easing, v as purple, w as emphasize, x as alpha, y as grey } from "./identifier-BCIMFiRn.js"; -import { l as composeClasses, n as rootShouldForwardProp, r as slotShouldForwardProp, t as styled } from "./styled-6tX-8l05.js"; -import { t as capitalize_default } from "./capitalize-C5eNvjpN.js"; -import { $ as filledInputClasses, A as Input, B as getSelectUtilityClasses, C as getOpenInteractionType, D as listClasses, E as getListUtilityClass, F as FormHelperText, G as getNativeSelectUtilityClasses, H as ArrowDropDown_default, I as FormControl, J as inputClasses, K as nativeSelectClasses, L as formControlClasses, M as inputLabelClasses, N as FormLabel, O as ListContext, P as FormLabelRoot, Q as getFormHelperTextUtilityClasses, R as getFormControlUtilityClasses, S as isEmpty, T as List, U as getOutlinedInputUtilityClass, V as selectClasses, W as outlinedInputClasses, X as getFormLabelUtilityClasses, Y as formLabelClasses, Z as formHelperTextClasses, _ as MenuList, a as OutlinedInput, at as isMuiElement_default, b as useSelectFocusSource, c as getMenuUtilityClass, ct as isMuiElement, d as PopoverPaper, et as getFilledInputUtilityClass, f as PopoverRoot, g as popoverClasses, h as getPopoverUtilityClass, i as Select, it as TextareaAutosize, j as getInputLabelUtilityClasses, k as InputLabel, l as menuClasses, lt as GlobalStyles$2, m as getOffsetTop, n as getTextFieldUtilityClass, nt as getInputBaseUtilityClass, o as NativeSelectInput, ot as globalCss, p as getOffsetLeft, q as getInputUtilityClass, r as textFieldClasses, rt as inputBaseClasses, s as Menu, st as GlobalStyles, t as TextField, tt as InputBase, u as Popover, ut as GlobalStyles$3, x as areEqualValues, y as SelectFocusSourceProvider, z as FilledInput } from "./TextField-BLvydd7W.js"; -import { n as useThemeWithoutDefault, t as useTheme$2 } from "./useTheme-DYH12Ax_.js"; -import { n as boxClasses, t as Box } from "./Box-CejWg7IO.js"; -import { t as styled$1 } from "./styled-4WW7iiVd.js"; -import { t as getThemeProps } from "./getThemeProps-mtx5XCJA.js"; -import { t as useThemeProps$1 } from "./useThemeProps-B3jPO4rl.js"; +import { A as hslToRgb, C as alpha, D as getContrastRatio, E as emphasize, F as generateUtilityClasses, G as keyframes, I as generateUtilityClass, J as createCache, K as CacheProvider, L as ClassNameGenerator, M as recomposeColor, N as rgbToHex, O as getLuminance, P as clamp, R as createTheme$1, S as useRtl, T as decomposeColor, W as css, Y as StyleSheet, Z as styleFunctionSx_default, _ as red, a as shouldSkipGeneratingVar, at as deepmerge, b as common, c as createTransitions, d as createTypography, et as getPath, f as createMixins, g as orange, h as blue, i as excludeVariablesFromRoot, it as createBreakpoints, j as lighten, k as hexToRgb, l as duration, lt as capitalize, m as lightBlue, n as createTheme, o as createColorScheme, p as green, q as ThemeContext$1, r as createThemeWithVars, s as getOverlayAlpha, st as require_react_is, t as identifier_default, u as easing, ut as clsx, v as purple, w as darken, x as RtlProvider, y as grey, z as createSpacing } from "./identifier-Db3dwgA7.js"; +import { l as composeClasses, n as rootShouldForwardProp, r as slotShouldForwardProp, t as styled } from "./styled-ry4r-NKP.js"; +import { t as capitalize_default } from "./capitalize-DESO4t23.js"; +import { $ as filledInputClasses, A as Input, B as getSelectUtilityClasses, C as getOpenInteractionType, D as listClasses, E as getListUtilityClass, F as FormHelperText, G as getNativeSelectUtilityClasses, H as ArrowDropDown_default, I as FormControl, J as inputClasses, K as nativeSelectClasses, L as formControlClasses, M as inputLabelClasses, N as FormLabel, O as ListContext, P as FormLabelRoot, Q as getFormHelperTextUtilityClasses, R as getFormControlUtilityClasses, S as isEmpty, T as List, U as getOutlinedInputUtilityClass, V as selectClasses, W as outlinedInputClasses, X as getFormLabelUtilityClasses, Y as formLabelClasses, Z as formHelperTextClasses, _ as MenuList, a as OutlinedInput, at as isMuiElement_default, b as useSelectFocusSource, c as getMenuUtilityClass, ct as isMuiElement, d as PopoverPaper, et as getFilledInputUtilityClass, f as PopoverRoot, g as popoverClasses, h as getPopoverUtilityClass, i as Select, it as TextareaAutosize, j as getInputLabelUtilityClasses, k as InputLabel, l as menuClasses, lt as GlobalStyles$2, m as getOffsetTop, n as getTextFieldUtilityClass, nt as getInputBaseUtilityClass, o as NativeSelectInput, ot as globalCss, p as getOffsetLeft, q as getInputUtilityClass, r as textFieldClasses, rt as inputBaseClasses, s as Menu, st as GlobalStyles, t as TextField, tt as InputBase, u as Popover, ut as GlobalStyles$3, x as areEqualValues, y as SelectFocusSourceProvider, z as FilledInput } from "./TextField-wEDqqayk.js"; +import { n as useThemeWithoutDefault, t as useTheme$2 } from "./useTheme-DkkwbUco.js"; +import { n as boxClasses, t as Box } from "./Box-B_dRI49O.js"; +import { t as styled$1 } from "./styled-D1aQQGyn.js"; +import { t as getThemeProps } from "./getThemeProps-2wnaMjK_.js"; +import { t as useThemeProps$1 } from "./useThemeProps-CBZxmtaL.js"; import { a as useForkRef, i as useReducedMotion, n as useForkRef_default, o as useEnhancedEffect, r as useEventCallback } from "./useLazyRef-BFAG-x_s.js"; -import { a as exactProp, i as HTMLElementType, n as Portal, r as getReactElementRef, t as elementAcceptingRef } from "./elementAcceptingRef-NQ-KkIxI.js"; -import { n as RtlProvider, r as useRtl, t as useSlotProps } from "./useSlotProps-C_wWtWkZ.js"; -import { n as DefaultPropsProvider, t as useDefaultProps } from "./DefaultPropsProvider-Bc551CBZ.js"; +import { a as exactProp, i as HTMLElementType, n as Portal, r as getReactElementRef, t as elementAcceptingRef } from "./elementAcceptingRef-rYQ5gbK-.js"; +import { n as DefaultPropsProvider, t as useDefaultProps } from "./DefaultPropsProvider-C8vOQ3_j.js"; import { t as useId } from "./useId-BvBa7DUQ.js"; -import { t as memoTheme } from "./memoTheme-C4YHvZ2W.js"; -import { n as Stack, t as stackClasses } from "./Stack-BLVENwM2.js"; -import { n as useTheme, t as chainPropTypes } from "./chainPropTypes-CuuywaSz.js"; -import { i as svgIconClasses, n as SvgIcon, r as getSvgIconUtilityClass, t as createSvgIcon } from "./createSvgIcon-BulCaVae.js"; +import { t as memoTheme } from "./memoTheme-Ciuals54.js"; +import { n as Stack, t as stackClasses } from "./Stack-DfNZ6tKE.js"; +import { n as useTheme, t as chainPropTypes } from "./chainPropTypes-DS_z862G.js"; +import { i as svgIconClasses, n as SvgIcon, r as getSvgIconUtilityClass, t as createSvgIcon } from "./createSvgIcon-Cf0_3N9N.js"; import { a as getTranslateOffsets, i as getTransitionStyles, n as getTransitionChildStyle, o as normalizedTransitionCallback, r as getTransitionProps, s as reflow, t as getReducedMotionStyles } from "./utils-BCVtNTPx.js"; import { i as useEventCallback_default, n as useTimeout } from "./useTimeout-Bjk18o42.js"; -import { i as extractEventHandlers, s as isHostComponent, t as useSlot } from "./useSlot-BqY3lobE.js"; +import { i as extractEventHandlers, s as isHostComponent, t as useSlot } from "./useSlot-DwQopxnD.js"; +import { t as useSlotProps } from "./useSlotProps-Bcfvl0Sd.js"; import { i as debounce_default, n as ownerWindow_default, r as ownerDocument_default, t as useEnhancedEffect_default } from "./useEnhancedEffect-Des-x0LJ.js"; -import { a as getTabScrollButtonUtilityClass, i as TabScrollButton, n as getTabsUtilityClass, o as tabScrollButtonClasses, r as tabsClasses, t as Tabs } from "./Tabs-Bl3pJg4E.js"; -import { c as Backdrop, d as Fade, f as createChainedFunction, i as FocusTrap, l as backdropClasses, n as getModalUtilityClass, o as ModalManager, r as modalClasses, t as Modal, u as getBackdropUtilityClass } from "./Modal-Dc_q3zOI.js"; +import { a as getTabScrollButtonUtilityClass, i as TabScrollButton, n as getTabsUtilityClass, o as tabScrollButtonClasses, r as tabsClasses, t as Tabs } from "./Tabs-CL3Bsg3w.js"; +import { c as Backdrop, d as Fade, f as createChainedFunction, i as FocusTrap, l as backdropClasses, n as getModalUtilityClass, o as ModalManager, r as modalClasses, t as Modal, u as getBackdropUtilityClass } from "./Modal-rlYNDt8_.js"; import { i as getActiveElement_default, t as contains_default } from "./contains-Ck5lZg53.js"; import { n as ownerDocument, t as setRef } from "./setRef-3K5nZ4il.js"; import { t as useId_default } from "./useId-UEgN89h0.js"; -import { i as unsupportedProp_default, n as getTabUtilityClass, r as tabClasses, t as Tab } from "./Tab-D9ho7_MY.js"; +import { i as unsupportedProp_default, n as getTabUtilityClass, r as tabClasses, t as Tab } from "./Tab-Bi21REoM.js"; import { n as useControlled, t as useControlled_default } from "./useControlled-COuwyMRm.js"; -import { t as mergeSlotProps } from "./mergeSlotProps-BrPQ7QvQ.js"; -import { t as elementTypeAcceptingRef_default } from "./elementTypeAcceptingRef-ByxAWoSf.js"; +import { t as mergeSlotProps } from "./mergeSlotProps-BYHIo2Vv.js"; +import { t as elementTypeAcceptingRef_default } from "./elementTypeAcceptingRef-soVrg9KC.js"; import { t as isFocusVisible } from "./isFocusVisible-AAJ6xeny.js"; -import { a as touchRippleClasses, i as getTouchRippleUtilityClass, n as buttonBaseClasses, r as getButtonBaseUtilityClass, t as ButtonBase } from "./ButtonBase-DAGRPe3U.js"; +import { a as touchRippleClasses, i as getTouchRippleUtilityClass, n as buttonBaseClasses, r as getButtonBaseUtilityClass, t as ButtonBase } from "./ButtonBase-Bsl8ZUTz.js"; import { t as isLayoutSupported } from "./isLayoutSupported-FzbrxmDf.js"; import { i as RovingTabIndexContext, n as useRovingTabIndexItem, r as useRovingTabIndexRoot } from "./useRovingTabIndex-DnGkRX59.js"; -import { $ as convertLength, A as getListItemIconUtilityClass, B as Badge, C as LastPage_default, D as getListItemTextUtilityClass, E as ListItemText, F as FormControlLabel, G as chipClasses, H as getBadgeUtilityClass, I as Divider, J as getListSubheaderUtilityClass, K as getChipUtilityClass, L as dividerClasses, M as LinearProgress, N as getLinearProgressUtilityClass, O as listItemTextClasses, P as linearProgressClasses, Q as alignProperty, R as getDividerUtilityClass, S as skeletonClasses, T as MenuItem, U as Autocomplete, V as badgeClasses, W as Chip, X as createFilterOptions, Y as listSubheaderClasses, Z as useAutocomplete, _ as Switch, a as getTablePaginationUtilityClass, at as getToggleButtonUtilityClass, b as Skeleton, c as tablePaginationActionsClasses, ct as menuItemClasses, d as toolbarClasses, dt as autocompleteClasses, et as fontGrid, f as TableCell, ft as getAutocompleteUtilityClass, g as TableContext, h as Tablelvl2Context, i as TablePagination, it as toUnitless, j as listItemIconClasses, k as ListItemIcon, l as Toolbar, lt as formControlLabelClasses, m as tableCellClasses, n as ToggleButtonGroupButtonContext, nt as isUnitless, o as tablePaginationClasses, ot as toggleButtonClasses, p as getTableCellUtilityClass, q as ListSubheader, r as ToggleButtonGroupContext, rt as responsiveProperty, s as TablePaginationActions, st as getMenuItemUtilityClass, t as ToggleButton, tt as getUnit, u as getToolbarUtilityClass, ut as getFormControlLabelUtilityClasses, v as getSwitchUtilityClass, w as FirstPage_default, x as getSkeletonUtilityClass, y as switchClasses, z as ClickAwayListener } from "./ToggleButton-BvgFYNT2.js"; -import { a as getCheckboxUtilityClass, i as checkboxClasses, n as SwitchBase, t as Checkbox } from "./Checkbox-CK4yFuSM.js"; +import { $ as convertLength, A as getListItemIconUtilityClass, B as Badge, C as LastPage_default, D as getListItemTextUtilityClass, E as ListItemText, F as FormControlLabel, G as chipClasses, H as getBadgeUtilityClass, I as Divider, J as getListSubheaderUtilityClass, K as getChipUtilityClass, L as dividerClasses, M as LinearProgress, N as getLinearProgressUtilityClass, O as listItemTextClasses, P as linearProgressClasses, Q as alignProperty, R as getDividerUtilityClass, S as skeletonClasses, T as MenuItem, U as Autocomplete, V as badgeClasses, W as Chip, X as createFilterOptions, Y as listSubheaderClasses, Z as useAutocomplete, _ as Switch, a as getTablePaginationUtilityClass, at as getToggleButtonUtilityClass, b as Skeleton, c as tablePaginationActionsClasses, ct as menuItemClasses, d as toolbarClasses, dt as autocompleteClasses, et as fontGrid, f as TableCell, ft as getAutocompleteUtilityClass, g as TableContext, h as Tablelvl2Context, i as TablePagination, it as toUnitless, j as listItemIconClasses, k as ListItemIcon, l as Toolbar, lt as formControlLabelClasses, m as tableCellClasses, n as ToggleButtonGroupButtonContext, nt as isUnitless, o as tablePaginationClasses, ot as toggleButtonClasses, p as getTableCellUtilityClass, q as ListSubheader, r as ToggleButtonGroupContext, rt as responsiveProperty, s as TablePaginationActions, st as getMenuItemUtilityClass, t as ToggleButton, tt as getUnit, u as getToolbarUtilityClass, ut as getFormControlLabelUtilityClasses, v as getSwitchUtilityClass, w as FirstPage_default, x as getSkeletonUtilityClass, y as switchClasses, z as ClickAwayListener } from "./ToggleButton-wH2nia4o.js"; +import { a as getCheckboxUtilityClass, i as checkboxClasses, n as SwitchBase, t as Checkbox } from "./Checkbox-ygBLxZxd.js"; import { n as useFormControlState, t as useFormControl } from "./useFormControl-DsSCzWhM.js"; -import { t as useThemeProps } from "./useThemeProps-BY-PscMe.js"; +import { t as useThemeProps } from "./useThemeProps-Bj7e_GBH.js"; import { t as Transition } from "./Transition-CTO78YMk.js"; -import { a as collapseClasses, i as Collapse, n as alertClasses, o as getCollapseUtilityClass, r as getAlertUtilityClass, t as Alert } from "./Alert-DHjnebpl.js"; -import { i as integerPropType, n as getPaperUtilityClass, r as paperClasses, t as Paper } from "./Paper-Bm5qdnED.js"; +import { a as collapseClasses, i as Collapse, n as alertClasses, o as getCollapseUtilityClass, r as getAlertUtilityClass, t as Alert } from "./Alert-CZ6-UJcL.js"; +import { i as integerPropType, n as getPaperUtilityClass, r as paperClasses, t as Paper } from "./Paper-BN2CUK32.js"; import { t as createSimplePaletteValueFilter } from "./createSimplePaletteValueFilter-BhADkSm9.js"; -import { n as circularProgressClasses, r as getCircularProgressUtilityClass, t as CircularProgress } from "./CircularProgress-Vd69ti-e.js"; -import { n as getIconButtonUtilityClass, r as iconButtonClasses, t as IconButton } from "./IconButton-CiUjgOk6.js"; -import { n as getTypographyUtilityClass, r as typographyClasses, t as Typography } from "./Typography-sl4NL4Ms.js"; -import { n as appBarClasses, r as getAppBarUtilityClass, t as AppBar } from "./AppBar-cWle_5Cg.js"; -import { a as getPopperUtilityClass, i as Popper, n as getTooltipUtilityClass, o as popperClasses, r as tooltipClasses, t as Tooltip } from "./Tooltip-D8ZXNHWc.js"; -import { a as getButtonUtilityClass, i as buttonClasses, n as ButtonGroupButtonContext, r as ButtonGroupContext, t as Button } from "./Button-CAa1Vq5I.js"; -import { n as dialogClasses, r as getDialogUtilityClass, t as Dialog } from "./Dialog-BfFT1J_Q.js"; -import { n as dialogActionsClasses, r as getDialogActionsUtilityClass, t as DialogActions } from "./DialogActions-CAa7GY5n.js"; -import { n as dialogContentClasses, r as getDialogContentUtilityClass, t as DialogContent } from "./DialogContent--srXz0Ob.js"; -import { n as getDialogTitleUtilityClass, t as dialogTitleClasses } from "./dialogTitleClasses-C2YA1vqw.js"; -import { t as DialogTitle } from "./DialogTitle-CKIHJWMV.js"; -import { t as Grow } from "./Grow-B9Vp6uWA.js"; -import { n as inputAdornmentClasses, t as getInputAdornmentUtilityClass } from "./inputAdornmentClasses-Dwv419w9.js"; -import { t as InputAdornment } from "./InputAdornment-Cjw-UDdb.js"; +import { n as circularProgressClasses, r as getCircularProgressUtilityClass, t as CircularProgress } from "./CircularProgress-Tc2SKes6.js"; +import { n as getIconButtonUtilityClass, r as iconButtonClasses, t as IconButton } from "./IconButton-DrMmxSzf.js"; +import { n as getTypographyUtilityClass, r as typographyClasses, t as Typography } from "./Typography-BDkJLIDE.js"; +import { n as appBarClasses, r as getAppBarUtilityClass, t as AppBar } from "./AppBar-Bh40cLP3.js"; +import { a as getPopperUtilityClass, i as Popper, n as getTooltipUtilityClass, o as popperClasses, r as tooltipClasses, t as Tooltip } from "./Tooltip-AC4fJPMm.js"; +import { a as getButtonUtilityClass, i as buttonClasses, n as ButtonGroupButtonContext, r as ButtonGroupContext, t as Button } from "./Button-A8lGDA7s.js"; +import { n as dialogClasses, r as getDialogUtilityClass, t as Dialog } from "./Dialog-C0FlcikN.js"; +import { n as dialogActionsClasses, r as getDialogActionsUtilityClass, t as DialogActions } from "./DialogActions-CUx3ntEf.js"; +import { n as dialogContentClasses, r as getDialogContentUtilityClass, t as DialogContent } from "./DialogContent-CLqjPIAp.js"; +import { n as getDialogTitleUtilityClass, t as dialogTitleClasses } from "./dialogTitleClasses-CMIZgy_C.js"; +import { t as DialogTitle } from "./DialogTitle-ec9jPt95.js"; +import { t as Grow } from "./Grow-DmlBpZfC.js"; +import { n as inputAdornmentClasses, t as getInputAdornmentUtilityClass } from "./inputAdornmentClasses-Bz0x_Nya.js"; +import { t as InputAdornment } from "./InputAdornment-69lRAvLa.js"; //#region node_modules/@mui/styled-engine/StyledEngineProvider/StyledEngineProvider.mjs var import_react = /* @__PURE__ */ __toESM(require_react(), 1); var import_prop_types = /* @__PURE__ */ __toESM(require_prop_types(), 1); diff --git a/buildtime/client/material-editor/node_modules/.vite/deps/@mui_material_AppBar.js b/buildtime/client/material-editor/node_modules/.vite/deps/@mui_material_AppBar.js index 331912f80..12f8476b5 100644 --- a/buildtime/client/material-editor/node_modules/.vite/deps/@mui_material_AppBar.js +++ b/buildtime/client/material-editor/node_modules/.vite/deps/@mui_material_AppBar.js @@ -1,2 +1,2 @@ -import { n as appBarClasses, r as getAppBarUtilityClass, t as AppBar } from "./AppBar-cWle_5Cg.js"; +import { n as appBarClasses, r as getAppBarUtilityClass, t as AppBar } from "./AppBar-Bh40cLP3.js"; export { appBarClasses, AppBar as default, getAppBarUtilityClass }; diff --git a/buildtime/client/material-editor/node_modules/.vite/deps/@mui_material_Box.js b/buildtime/client/material-editor/node_modules/.vite/deps/@mui_material_Box.js index 99f178249..9c91159c4 100644 --- a/buildtime/client/material-editor/node_modules/.vite/deps/@mui_material_Box.js +++ b/buildtime/client/material-editor/node_modules/.vite/deps/@mui_material_Box.js @@ -1,2 +1,2 @@ -import { n as boxClasses, t as Box } from "./Box-CejWg7IO.js"; +import { n as boxClasses, t as Box } from "./Box-B_dRI49O.js"; export { boxClasses, Box as default }; diff --git a/buildtime/client/material-editor/node_modules/.vite/deps/@mui_material_Button.js b/buildtime/client/material-editor/node_modules/.vite/deps/@mui_material_Button.js index 09b8233d8..828ef331d 100644 --- a/buildtime/client/material-editor/node_modules/.vite/deps/@mui_material_Button.js +++ b/buildtime/client/material-editor/node_modules/.vite/deps/@mui_material_Button.js @@ -1,2 +1,2 @@ -import { a as getButtonUtilityClass, i as buttonClasses, t as Button } from "./Button-CAa1Vq5I.js"; +import { a as getButtonUtilityClass, i as buttonClasses, t as Button } from "./Button-A8lGDA7s.js"; export { buttonClasses, Button as default, getButtonUtilityClass }; diff --git a/buildtime/client/material-editor/node_modules/.vite/deps/@mui_material_Dialog.js b/buildtime/client/material-editor/node_modules/.vite/deps/@mui_material_Dialog.js index 1acd89151..dee8f6a2a 100644 --- a/buildtime/client/material-editor/node_modules/.vite/deps/@mui_material_Dialog.js +++ b/buildtime/client/material-editor/node_modules/.vite/deps/@mui_material_Dialog.js @@ -1,2 +1,2 @@ -import { n as dialogClasses, r as getDialogUtilityClass, t as Dialog } from "./Dialog-BfFT1J_Q.js"; +import { n as dialogClasses, r as getDialogUtilityClass, t as Dialog } from "./Dialog-C0FlcikN.js"; export { Dialog as default, dialogClasses, getDialogUtilityClass }; diff --git a/buildtime/client/material-editor/node_modules/.vite/deps/@mui_material_DialogActions.js b/buildtime/client/material-editor/node_modules/.vite/deps/@mui_material_DialogActions.js index 1d929b531..9dc827df0 100644 --- a/buildtime/client/material-editor/node_modules/.vite/deps/@mui_material_DialogActions.js +++ b/buildtime/client/material-editor/node_modules/.vite/deps/@mui_material_DialogActions.js @@ -1,2 +1,2 @@ -import { n as dialogActionsClasses, r as getDialogActionsUtilityClass, t as DialogActions } from "./DialogActions-CAa7GY5n.js"; +import { n as dialogActionsClasses, r as getDialogActionsUtilityClass, t as DialogActions } from "./DialogActions-CUx3ntEf.js"; export { DialogActions as default, dialogActionsClasses, getDialogActionsUtilityClass }; diff --git a/buildtime/client/material-editor/node_modules/.vite/deps/@mui_material_DialogContent.js b/buildtime/client/material-editor/node_modules/.vite/deps/@mui_material_DialogContent.js index 3f8cfe1f0..91e9b243a 100644 --- a/buildtime/client/material-editor/node_modules/.vite/deps/@mui_material_DialogContent.js +++ b/buildtime/client/material-editor/node_modules/.vite/deps/@mui_material_DialogContent.js @@ -1,2 +1,2 @@ -import { n as dialogContentClasses, r as getDialogContentUtilityClass, t as DialogContent } from "./DialogContent--srXz0Ob.js"; +import { n as dialogContentClasses, r as getDialogContentUtilityClass, t as DialogContent } from "./DialogContent-CLqjPIAp.js"; export { DialogContent as default, dialogContentClasses, getDialogContentUtilityClass }; diff --git a/buildtime/client/material-editor/node_modules/.vite/deps/@mui_material_DialogTitle.js b/buildtime/client/material-editor/node_modules/.vite/deps/@mui_material_DialogTitle.js index bf25e0fc9..6964b6d7f 100644 --- a/buildtime/client/material-editor/node_modules/.vite/deps/@mui_material_DialogTitle.js +++ b/buildtime/client/material-editor/node_modules/.vite/deps/@mui_material_DialogTitle.js @@ -1,3 +1,3 @@ -import { n as getDialogTitleUtilityClass, t as dialogTitleClasses } from "./dialogTitleClasses-C2YA1vqw.js"; -import { t as DialogTitle } from "./DialogTitle-CKIHJWMV.js"; +import { n as getDialogTitleUtilityClass, t as dialogTitleClasses } from "./dialogTitleClasses-CMIZgy_C.js"; +import { t as DialogTitle } from "./DialogTitle-ec9jPt95.js"; export { DialogTitle as default, dialogTitleClasses, getDialogTitleUtilityClass }; diff --git a/buildtime/client/material-editor/node_modules/.vite/deps/@mui_material_IconButton.js b/buildtime/client/material-editor/node_modules/.vite/deps/@mui_material_IconButton.js index bc03c99de..d58c7e233 100644 --- a/buildtime/client/material-editor/node_modules/.vite/deps/@mui_material_IconButton.js +++ b/buildtime/client/material-editor/node_modules/.vite/deps/@mui_material_IconButton.js @@ -1,2 +1,2 @@ -import { n as getIconButtonUtilityClass, r as iconButtonClasses, t as IconButton } from "./IconButton-CiUjgOk6.js"; +import { n as getIconButtonUtilityClass, r as iconButtonClasses, t as IconButton } from "./IconButton-DrMmxSzf.js"; export { IconButton as default, getIconButtonUtilityClass, iconButtonClasses }; diff --git a/buildtime/client/material-editor/node_modules/.vite/deps/@mui_material_InputAdornment.js b/buildtime/client/material-editor/node_modules/.vite/deps/@mui_material_InputAdornment.js index a91b2c80e..43bfe486b 100644 --- a/buildtime/client/material-editor/node_modules/.vite/deps/@mui_material_InputAdornment.js +++ b/buildtime/client/material-editor/node_modules/.vite/deps/@mui_material_InputAdornment.js @@ -1,3 +1,3 @@ -import { n as inputAdornmentClasses, t as getInputAdornmentUtilityClass } from "./inputAdornmentClasses-Dwv419w9.js"; -import { t as InputAdornment } from "./InputAdornment-Cjw-UDdb.js"; +import { n as inputAdornmentClasses, t as getInputAdornmentUtilityClass } from "./inputAdornmentClasses-Bz0x_Nya.js"; +import { t as InputAdornment } from "./InputAdornment-69lRAvLa.js"; export { InputAdornment as default, getInputAdornmentUtilityClass, inputAdornmentClasses }; diff --git a/buildtime/client/material-editor/node_modules/.vite/deps/@mui_material_Stack.js b/buildtime/client/material-editor/node_modules/.vite/deps/@mui_material_Stack.js index c6ddda3ef..45ca2a0ce 100644 --- a/buildtime/client/material-editor/node_modules/.vite/deps/@mui_material_Stack.js +++ b/buildtime/client/material-editor/node_modules/.vite/deps/@mui_material_Stack.js @@ -1,2 +1,2 @@ -import { n as Stack, t as stackClasses } from "./Stack-BLVENwM2.js"; +import { n as Stack, t as stackClasses } from "./Stack-DfNZ6tKE.js"; export { Stack as default, stackClasses }; diff --git a/buildtime/client/material-editor/node_modules/.vite/deps/@mui_material_Tab.js b/buildtime/client/material-editor/node_modules/.vite/deps/@mui_material_Tab.js index d2673ec95..e24b23900 100644 --- a/buildtime/client/material-editor/node_modules/.vite/deps/@mui_material_Tab.js +++ b/buildtime/client/material-editor/node_modules/.vite/deps/@mui_material_Tab.js @@ -1,2 +1,2 @@ -import { n as getTabUtilityClass, r as tabClasses, t as Tab } from "./Tab-D9ho7_MY.js"; +import { n as getTabUtilityClass, r as tabClasses, t as Tab } from "./Tab-Bi21REoM.js"; export { Tab as default, getTabUtilityClass, tabClasses }; diff --git a/buildtime/client/material-editor/node_modules/.vite/deps/@mui_material_TextField.js b/buildtime/client/material-editor/node_modules/.vite/deps/@mui_material_TextField.js index f76de8a55..4024f822a 100644 --- a/buildtime/client/material-editor/node_modules/.vite/deps/@mui_material_TextField.js +++ b/buildtime/client/material-editor/node_modules/.vite/deps/@mui_material_TextField.js @@ -1,2 +1,2 @@ -import { n as getTextFieldUtilityClass, r as textFieldClasses, t as TextField } from "./TextField-BLvydd7W.js"; +import { n as getTextFieldUtilityClass, r as textFieldClasses, t as TextField } from "./TextField-wEDqqayk.js"; export { TextField as default, getTextFieldUtilityClass, textFieldClasses }; diff --git a/buildtime/client/material-editor/node_modules/.vite/deps/@mui_material_Tooltip.js b/buildtime/client/material-editor/node_modules/.vite/deps/@mui_material_Tooltip.js index 0808f1176..893c830a3 100644 --- a/buildtime/client/material-editor/node_modules/.vite/deps/@mui_material_Tooltip.js +++ b/buildtime/client/material-editor/node_modules/.vite/deps/@mui_material_Tooltip.js @@ -1,2 +1,2 @@ -import { n as getTooltipUtilityClass, r as tooltipClasses, t as Tooltip } from "./Tooltip-D8ZXNHWc.js"; +import { n as getTooltipUtilityClass, r as tooltipClasses, t as Tooltip } from "./Tooltip-AC4fJPMm.js"; export { Tooltip as default, getTooltipUtilityClass, tooltipClasses }; diff --git a/buildtime/client/material-editor/node_modules/.vite/deps/@mui_material_Typography.js b/buildtime/client/material-editor/node_modules/.vite/deps/@mui_material_Typography.js index acbd079cf..17192098a 100644 --- a/buildtime/client/material-editor/node_modules/.vite/deps/@mui_material_Typography.js +++ b/buildtime/client/material-editor/node_modules/.vite/deps/@mui_material_Typography.js @@ -1,2 +1,2 @@ -import { n as getTypographyUtilityClass, r as typographyClasses, t as Typography } from "./Typography-sl4NL4Ms.js"; +import { n as getTypographyUtilityClass, r as typographyClasses, t as Typography } from "./Typography-BDkJLIDE.js"; export { Typography as default, getTypographyUtilityClass, typographyClasses }; diff --git a/buildtime/client/material-editor/node_modules/.vite/deps/@mui_x-data-grid.js b/buildtime/client/material-editor/node_modules/.vite/deps/@mui_x-data-grid.js index 2a27b089c..0f4584ce6 100644 --- a/buildtime/client/material-editor/node_modules/.vite/deps/@mui_x-data-grid.js +++ b/buildtime/client/material-editor/node_modules/.vite/deps/@mui_x-data-grid.js @@ -3,34 +3,33 @@ import { t as require_react } from "./react.js"; import { t as require_react_dom } from "./react-dom.js"; import { t as require_jsx_runtime } from "./react_jsx-runtime.js"; import { t as require_prop_types } from "./prop-types-C5owi9-6.js"; -import { H as css, J as _extends, N as generateUtilityClasses, P as generateUtilityClass, U as keyframes, ct as clsx, st as capitalize } from "./identifier-BCIMFiRn.js"; -import { a as resolveProps, l as composeClasses, s as shouldForwardProp, t as styled } from "./styled-6tX-8l05.js"; -import { I as FormControl, _ as MenuList, i as Select, it as TextareaAutosize, k as InputLabel, rt as inputBaseClasses, t as TextField, tt as InputBase } from "./TextField-BLvydd7W.js"; -import { t as styled$1 } from "./styled-4WW7iiVd.js"; -import { t as getThemeProps } from "./getThemeProps-mtx5XCJA.js"; +import { F as generateUtilityClasses, G as keyframes, I as generateUtilityClass, S as useRtl, W as css, X as _extends, lt as capitalize, ut as clsx } from "./identifier-Db3dwgA7.js"; +import { a as resolveProps, l as composeClasses, s as shouldForwardProp, t as styled } from "./styled-ry4r-NKP.js"; +import { I as FormControl, _ as MenuList, i as Select, it as TextareaAutosize, k as InputLabel, rt as inputBaseClasses, t as TextField, tt as InputBase } from "./TextField-wEDqqayk.js"; +import { t as styled$1 } from "./styled-D1aQQGyn.js"; +import { t as getThemeProps } from "./getThemeProps-2wnaMjK_.js"; import { a as useForkRef, o as useEnhancedEffect, r as useEventCallback, t as useLazyRef } from "./useLazyRef-BFAG-x_s.js"; -import { i as HTMLElementType } from "./elementAcceptingRef-NQ-KkIxI.js"; -import { r as useRtl } from "./useSlotProps-C_wWtWkZ.js"; +import { i as HTMLElementType } from "./elementAcceptingRef-rYQ5gbK-.js"; import { t as useId } from "./useId-BvBa7DUQ.js"; -import { n as useTheme } from "./chainPropTypes-CuuywaSz.js"; -import { t as createSvgIcon$1 } from "./createSvgIcon-BulCaVae.js"; +import { n as useTheme } from "./chainPropTypes-DS_z862G.js"; +import { t as createSvgIcon$1 } from "./createSvgIcon-Cf0_3N9N.js"; import { a as refType, n as useTimeout, r as useOnMount } from "./useTimeout-Bjk18o42.js"; import { a as debounce } from "./useEnhancedEffect-Des-x0LJ.js"; -import { t as Tabs } from "./Tabs-Bl3pJg4E.js"; -import { i as FocusTrap, t as Modal } from "./Modal-Dc_q3zOI.js"; +import { t as Tabs } from "./Tabs-CL3Bsg3w.js"; +import { i as FocusTrap, t as Modal } from "./Modal-rlYNDt8_.js"; import { n as ownerDocument } from "./setRef-3K5nZ4il.js"; -import { t as Tab } from "./Tab-D9ho7_MY.js"; -import { B as Badge, E as ListItemText$1, F as FormControlLabel$1, I as Divider$1, M as LinearProgress, O as listItemTextClasses, T as MenuItem, U as Autocomplete, W as Chip, _ as Switch, b as Skeleton, i as TablePagination, k as ListItemIcon, lt as formControlLabelClasses, o as tablePaginationClasses, t as ToggleButton, z as ClickAwayListener } from "./ToggleButton-BvgFYNT2.js"; -import { t as Checkbox$1 } from "./Checkbox-CK4yFuSM.js"; -import { t as Paper } from "./Paper-Bm5qdnED.js"; -import { t as CircularProgress } from "./CircularProgress-Vd69ti-e.js"; -import { r as iconButtonClasses, t as IconButton } from "./IconButton-CiUjgOk6.js"; -import { i as Popper, t as Tooltip } from "./Tooltip-D8ZXNHWc.js"; -import { t as Button } from "./Button-CAa1Vq5I.js"; -import { t as Grow } from "./Grow-B9Vp6uWA.js"; -import { n as inputAdornmentClasses } from "./inputAdornmentClasses-Dwv419w9.js"; -import { t as InputAdornment$1 } from "./InputAdornment-Cjw-UDdb.js"; -import { a as createSelector$1, c as warnOnce, d as _objectWithoutPropertiesLoose, i as require_shim, l as fastObjectShallowCompare, n as Store, o as createSelectorMemoized$1, r as useStore, s as lruMemoize, t as EventManager, u as reactMajor_default } from "./EventManager-BoMkr4Rw.js"; +import { t as Tab } from "./Tab-Bi21REoM.js"; +import { B as Badge, E as ListItemText$1, F as FormControlLabel$1, I as Divider$1, M as LinearProgress, O as listItemTextClasses, T as MenuItem, U as Autocomplete, W as Chip, _ as Switch, b as Skeleton, i as TablePagination, k as ListItemIcon, lt as formControlLabelClasses, o as tablePaginationClasses, t as ToggleButton, z as ClickAwayListener } from "./ToggleButton-wH2nia4o.js"; +import { t as Checkbox$1 } from "./Checkbox-ygBLxZxd.js"; +import { t as Paper } from "./Paper-BN2CUK32.js"; +import { t as CircularProgress } from "./CircularProgress-Tc2SKes6.js"; +import { r as iconButtonClasses, t as IconButton } from "./IconButton-DrMmxSzf.js"; +import { i as Popper, t as Tooltip } from "./Tooltip-AC4fJPMm.js"; +import { t as Button } from "./Button-A8lGDA7s.js"; +import { t as Grow } from "./Grow-DmlBpZfC.js"; +import { n as inputAdornmentClasses } from "./inputAdornmentClasses-Bz0x_Nya.js"; +import { t as InputAdornment$1 } from "./InputAdornment-69lRAvLa.js"; +import { a as createSelector$1, c as warnOnce, d as _objectWithoutPropertiesLoose, i as require_shim, l as fastObjectShallowCompare, n as Store, o as createSelectorMemoized$1, r as useStore, s as lruMemoize, t as EventManager, u as reactMajor_default } from "./EventManager-DC286UGQ.js"; //#region node_modules/@mui/x-internals/forwardRef/forwardRef.mjs var import_react = /* @__PURE__ */ __toESM(require_react(), 1); var forwardRef = (render) => { diff --git a/buildtime/client/material-editor/node_modules/.vite/deps/@mui_x-data-grid.js.map b/buildtime/client/material-editor/node_modules/.vite/deps/@mui_x-data-grid.js.map index 0b80228e7..3aaa62c44 100644 --- a/buildtime/client/material-editor/node_modules/.vite/deps/@mui_x-data-grid.js.map +++ b/buildtime/client/material-editor/node_modules/.vite/deps/@mui_x-data-grid.js.map @@ -1 +1 @@ -{"version":3,"file":"@mui_x-data-grid.js","names":["reactMajor","createSvgIconMaterial","_excluded","PropTypes","c","removeOpacity","setOpacity","_excluded","_excluded2","_excluded3","MUIInputAdornment","MUIFormControlLabel","MUICheckbox","MUIListItemText","MUIFormControl","MUIInputLabel","MUISelect","MUIPagination","MUIBadge","MUICircularProgress","MUIDivider","MUILinearProgress","MUIButton","MUIToggleButton","MUIChip","MUIIconButton","MUITooltip","MUISkeleton","MUISwitch","MUIMenuList","MUIMenuItem","MUIListItemIcon","MUIModal","MUITextField","MUIAutocomplete","MUIInputBase","MUITextareaAutosize","MUIGrow","MUIPaper","MUIPopper","MUIFocusTrap","MUITabs","MUITab","selectors","initializeState","noop","EMPTY_DIMENSIONS","selectors","createSelectorMemoized","initializeState","noop","reactMajor","clamp","selectors","createSelector","initializeState","platform.env.jsdom","createSelectorMemoized","platform.engine.gecko","selectors","initializeState","baseCreateSelector","baseCreateSelectorMemoized","formatNumber","_excluded","useUtilityClasses","PropTypes","collator","_excluded","sanitizeFilterItemValue","itemPlusTag","PropTypes","_excluded","PropTypes","isKeyboardEvent","_jsx","_excluded","useUtilityClasses","PropTypes","_excluded","_excluded2","PropTypes","_excluded","PropTypes","_excluded","useUtilityClasses","_excluded","useUtilityClasses","PropTypes","_excluded","useUtilityClasses","PropTypes","_excluded","PropTypes","_excluded","useUtilityClasses","PropTypes","_excluded","useUtilityClasses","PropTypes","_excluded","PropTypes","_excluded","useUtilityClasses","PropTypes","_excluded","PropTypes","_excluded","PropTypes","_excluded","PropTypes","useUtilityClasses","PropTypes","useUtilityClasses","PropTypes","useUtilityClasses","Element","useUtilityClasses","Element","useUtilityClasses","styled","Memoized","useUtilityClasses","styled","platform.env.jsdom","useUtilityClasses","useUtilityClasses","useUtilityClasses","PropTypes","_toPropertyKey","columnsTotalWidthSelector","useUtilityClasses","Container","Content","TopContainer","GridHeaders","RenderZone","SpaceFiller","ScrollShadows","Scrollbar","_excluded","_excluded2","useUtilityClasses","PropTypes","_excluded","useUtilityClasses","PropTypes","Memoized","useSyncExternalStore","_excluded","useUtilityClasses","GridBody","PropTypes","_excluded","useUtilityClasses","styled","PropTypes","_excluded","useUtilityClasses","styled","PropTypes","_excluded","useUtilityClasses","PropTypes","_excluded","_excluded2","PropTypes","_excluded","useUtilityClasses","styled","PropTypes","useUtilityClasses","PropTypes","_excluded","useUtilityClasses","PropTypes","_excluded","useUtilityClasses","PropTypes","_excluded","useUtilityClasses","PropTypes","_excluded","useUtilityClasses","_excluded","useUtilityClasses","PropTypes","PropTypes","useUtilityClasses","PropTypes","_excluded","PropTypes","_excluded","PropTypes","_excluded","PropTypes","PropTypes","PropTypes","PropTypes","PropTypes","_excluded","PropTypes","_excluded","useUtilityClasses","_excluded","GridPanelContent","PropTypes","_excluded","useUtilityClasses","styled","PropTypes","_excluded","useUtilityClasses","PropTypes","_excluded","useUtilityClasses","styled","PropTypes","_excluded","_excluded2","useUtilityClasses","collator","PropTypes","PropTypes","_excluded","PropTypes","PropTypes","_excluded","PropTypes","useUtilityClasses","PropTypes","PropTypes","PropTypes","useUtilityClasses","PropTypes","PropTypes","_excluded","_excluded2","_excluded3","PropTypes","_excluded","PropTypes","_excluded","PropTypes","_excluded","PropTypes","_excluded","PropTypes","_excluded","_excluded2","useUtilityClasses","PropTypes","_excluded","PropTypes","_excluded","PropTypes","_excluded","PropTypes","_excluded","PropTypes","_excluded","_excluded2","useUtilityClasses","PropTypes","GridToolbar","_excluded","PropTypes","_excluded","useUtilityClasses","styled","PropTypes","PropTypes","_excluded","useUtilityClasses","_excluded","PropTypes","PropTypes","PropTypes","PropTypes","_excluded","useUtilityClasses","styled","PropTypes","_excluded","indexRelativeToAllColumns","PropTypes","getRowValue","getRowValueFn","_toPropertyKey","_excluded","_excluded2","_toPropertyKey","_excluded","_toPropertyKey","isKeyboardEvent","useUtilityClasses","platform.env.jsdom","_excluded","_excluded","useUtilityClasses","ScrollbarFiller","GridColumnHeaderItem","_excluded","useUtilityClasses","styled","PropTypes","GridCell","GridSkeletonCell","GridColumnHeaderFilterIconButton","GridColumnHeaders","GridToolbar","GridRow","GridRoot","PropTypes"],"sources":["../../@mui/x-internals/forwardRef/forwardRef.mjs","../../@mui/x-data-grid/material/icons/createSvgIcon.mjs","../../@mui/x-data-grid/material/icons/index.mjs","../../@mui/x-data-grid/context/GridRootPropsContext.mjs","../../@mui/x-data-grid/hooks/utils/useGridRootProps.mjs","../../@mui/x-data-grid/components/GridColumnUnsortedIcon.mjs","../../@mui/x-data-grid/components/GridApiContext.mjs","../../@mui/x-data-grid/hooks/utils/useGridApiContext.mjs","../../@mui/x-internals/hash/hash.mjs","../../@mui/x-data-grid/constants/cssVariables.mjs","../../@mui/x-data-grid/constants/gridClasses.mjs","../../@mui/x-data-grid/hooks/utils/useGridSelector.mjs","../../@mui/x-data-grid/hooks/utils/useGridPrivateApiContext.mjs","../../@mui/x-data-grid/components/containers/GridRootStyles.mjs","../../@mui/x-data-grid/material/variables.mjs","../../@mui/x-data-grid/material/index.mjs","../../@mui/x-data-grid/hooks/utils/useGridApiRef.mjs","../../@mui/x-internals/platform/index.mjs","../../@mui/x-virtualizer/models/core.mjs","../../@mui/x-virtualizer/features/colspan.mjs","../../@mui/x-internals/throttle/throttle.mjs","../../@mui/x-internals/isDeepEqual/isDeepEqual.mjs","../../@mui/x-internals/math/index.mjs","../../@mui/x-internals/store/useStoreEffect.mjs","../../@mui/x-virtualizer/features/dimensions.mjs","../../@base-ui/utils/platform/shared.mjs","../../@base-ui/utils/platform/engine.mjs","../../@base-ui/utils/platform/env.mjs","../../@mui/x-internals/useRunOnce/useRunOnce.mjs","../../@mui/x-virtualizer/utils/useRefCallback.mjs","../../@mui/x-virtualizer/features/virtualization/virtualization.mjs","../../@mui/x-virtualizer/features/virtualization/layout.mjs","../../@mui/x-virtualizer/features/keyboard.mjs","../../@mui/x-virtualizer/features/rowspan.mjs","../../@mui/x-virtualizer/constants.mjs","../../@mui/x-virtualizer/useVirtualizer.mjs","../../@mui/x-data-grid/utils/createSelector.mjs","../../@mui/x-data-grid/hooks/features/dimensions/gridDimensionsSelectors.mjs","../../@mui/x-data-grid/hooks/features/rows/gridRowsMetaSelector.mjs","../../@mui/x-data-grid/hooks/features/rows/gridRowsSelector.mjs","../../@mui/x-data-grid/hooks/features/rows/gridRowsUtils.mjs","../../@mui/x-internals/fastMemo/fastMemo.mjs","../../@mui/x-data-grid/constants/envConstants.mjs","../../@mui/x-data-grid/utils/getGridLocalization.mjs","../../@mui/x-data-grid/constants/localeTextConstants.mjs","../../@mui/x-data-grid/constants/signature.mjs","../../@mui/x-data-grid/utils/cleanupTracking/TimerBasedCleanupTracking.mjs","../../@mui/x-data-grid/utils/cleanupTracking/FinalizationRegistryBasedCleanupTracking.mjs","../../@mui/x-data-grid/hooks/utils/useGridEvent.mjs","../../@mui/x-data-grid/hooks/features/density/densitySelector.mjs","../../@mui/x-data-grid/utils/assert.mjs","../../@mui/x-data-grid/components/cell/GridEditInputCell.mjs","../../@mui/x-data-grid/hooks/features/sorting/gridSortingUtils.mjs","../../@mui/x-data-grid/components/panel/filterPanel/GridFilterInputValue.mjs","../../@mui/x-data-grid/utils/utils.mjs","../../@mui/x-data-grid/components/panel/filterPanel/GridFilterInputMultipleValue.mjs","../../@mui/x-data-grid/models/gridEditRowModel.mjs","../../@mui/x-data-grid/models/gridFilterItem.mjs","../../@mui/x-data-grid/models/gridRowSelectionManager.mjs","../../@mui/x-data-grid/models/params/gridEditCellParams.mjs","../../@mui/x-data-grid/models/params/gridRowParams.mjs","../../@mui/x-data-grid/models/gridColumnGrouping.mjs","../../@mui/x-data-grid/hooks/features/filter/gridFilterState.mjs","../../@mui/x-data-grid/utils/getPublicApiRef.mjs","../../@mui/x-data-grid/hooks/features/columns/gridColumnsInterfaces.mjs","../../@mui/x-data-grid/hooks/features/listView/gridListViewSelectors.mjs","../../@mui/x-data-grid/hooks/features/columns/gridColumnsSelector.mjs","../../@mui/x-data-grid/hooks/features/filter/gridFilterUtils.mjs","../../@mui/x-data-grid/colDef/gridStringOperators.mjs","../../@mui/x-data-grid/colDef/gridStringColDef.mjs","../../@mui/x-data-grid/utils/keyboardUtils.mjs","../../@mui/x-data-grid/components/GridConfigurationContext.mjs","../../@mui/x-data-grid/hooks/utils/useGridConfiguration.mjs","../../@mui/x-data-grid/utils/css/context.mjs","../../@mui/x-data-grid/components/menu/GridMenu.mjs","../../@mui/x-data-grid/components/cell/GridActionsCellItem.mjs","../../@mui/x-data-grid/components/cell/GridActionsCell.mjs","../../@mui/x-data-grid/colDef/gridActionsColDef.mjs","../../@mui/x-data-grid/internals/constants.mjs","../../@mui/x-data-grid/components/cell/GridFooterCell.mjs","../../@mui/x-data-grid/components/cell/GridBooleanCell.mjs","../../@mui/x-data-grid/components/cell/GridEditBooleanCell.mjs","../../@mui/x-data-grid/components/panel/filterPanel/GridFilterInputBoolean.mjs","../../@mui/x-data-grid/colDef/gridBooleanOperators.mjs","../../@mui/x-data-grid/colDef/gridBooleanColDef.mjs","../../@mui/x-internals/isObjectEmpty/isObjectEmpty.mjs","../../@mui/x-data-grid/hooks/features/sorting/gridSortingSelector.mjs","../../@mui/x-data-grid/hooks/features/filter/gridFilterSelector.mjs","../../@mui/x-data-grid/hooks/features/rowSelection/gridRowSelectionSelector.mjs","../../@mui/x-data-grid/hooks/core/gridPropsSelectors.mjs","../../@mui/x-data-grid/hooks/features/rowSelection/utils.mjs","../../@mui/x-data-grid/components/columnSelection/GridCellCheckboxRenderer.mjs","../../@mui/x-data-grid/hooks/features/focus/gridFocusStateSelector.mjs","../../@mui/x-data-grid/hooks/features/pagination/gridPaginationUtils.mjs","../../@mui/x-data-grid/hooks/features/pagination/gridPaginationSelector.mjs","../../@mui/x-data-grid/components/columnSelection/GridHeaderCheckbox.mjs","../../@mui/x-data-grid/colDef/gridCheckboxSelectionColDef.mjs","../../@mui/x-data-grid/components/panel/filterPanel/GridFilterInputDate.mjs","../../@mui/x-data-grid/colDef/gridDateOperators.mjs","../../@mui/x-data-grid/components/cell/GridEditDateCell.mjs","../../@mui/x-data-grid/colDef/gridDateColDef.mjs","../../@mui/x-data-grid/colDef/gridNumericOperators.mjs","../../@mui/x-data-grid/colDef/gridNumericColDef.mjs","../../@mui/x-data-grid/components/panel/filterPanel/filterPanelUtils.mjs","../../@mui/x-data-grid/components/cell/GridEditSingleSelectCell.mjs","../../@mui/x-data-grid/components/panel/filterPanel/GridFilterInputSingleSelect.mjs","../../@mui/x-data-grid/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.mjs","../../@mui/x-data-grid/colDef/gridSingleSelectOperators.mjs","../../@mui/x-data-grid/colDef/gridSingleSelectColDef.mjs","../../@mui/x-data-grid/components/cell/GridLongTextCell.mjs","../../@mui/x-data-grid/components/cell/GridEditLongTextCell.mjs","../../@mui/x-data-grid/colDef/gridLongTextColDef.mjs","../../@mui/x-data-grid/colDef/gridColumnTypesRegistry.mjs","../../@mui/x-data-grid/colDef/gridDefaultColumnTypes.mjs","../../@mui/x-data-grid/hooks/features/headerFiltering/gridHeaderFilteringSelectors.mjs","../../@mui/x-data-grid/hooks/features/columnGrouping/gridColumnGroupsSelector.mjs","../../@mui/x-data-grid/hooks/features/columns/gridColumnsUtils.mjs","../../@mui/x-data-grid/components/GridScrollArea.mjs","../../@mui/x-data-grid/hooks/utils/useGridApiMethod.mjs","../../@mui/x-data-grid/hooks/utils/useGridLogger.mjs","../../@mui/x-data-grid/hooks/utils/useGridNativeEventListener.mjs","../../@mui/x-internals/useFirstRender/useFirstRender.mjs","../../@mui/x-data-grid/hooks/utils/useRunOncePerLoop.mjs","../../@mui/x-data-grid/hooks/features/pivoting/gridPivotingSelectors.mjs","../../@mui/x-data-grid/hooks/features/overlays/useGridOverlays.mjs","../../@mui/x-data-grid/hooks/features/columnMenu/columnMenuSelector.mjs","../../@mui/x-data-grid/components/GridHeaders.mjs","../../@mui/x-data-grid/components/virtualization/GridMainContainer.mjs","../../@mui/x-data-grid/components/virtualization/GridTopContainer.mjs","../../@mui/x-data-grid/components/virtualization/GridVirtualScrollerContent.mjs","../../@mui/x-data-grid/components/virtualization/GridVirtualScrollerFiller.mjs","../../@mui/x-data-grid/components/virtualization/GridVirtualScrollerRenderZone.mjs","../../@mui/x-data-grid/hooks/features/columnResize/columnResizeSelector.mjs","../../@mui/x-data-grid/hooks/features/columnResize/gridColumnResizeApi.mjs","../../@mui/x-data-grid/hooks/features/editing/gridEditingSelectors.mjs","../../@mui/x-data-grid/hooks/features/preferencesPanel/gridPreferencePanelSelector.mjs","../../@mui/x-data-grid/hooks/features/preferencesPanel/gridPreferencePanelsValue.mjs","../../@mui/x-data-grid/hooks/features/virtualization/useGridVirtualization.mjs","../../@mui/x-data-grid/hooks/features/virtualization/gridVirtualizationSelectors.mjs","../../@mui/x-data-grid/hooks/features/dataSource/cache.mjs","../../@mui/x-data-grid/hooks/features/dataSource/gridDataSourceError.mjs","../../@mui/x-data-grid/components/virtualization/GridVirtualScrollbar.mjs","../../@mui/x-data-grid/components/GridScrollShadows.mjs","../../@mui/x-data-grid/components/base/GridOverlays.mjs","../../@mui/x-data-grid/hooks/utils/useGridVisibleRows.mjs","../../@mui/x-data-grid/hooks/features/virtualization/gridFocusedVirtualCellSelector.mjs","../../@mui/x-data-grid/constants/dataGridPropsDefaultValues.mjs","../../@babel/runtime/helpers/esm/typeof.js","../../@babel/runtime/helpers/esm/toPrimitive.js","../../@babel/runtime/helpers/esm/toPropertyKey.js","../../@mui/x-data-grid/hooks/core/pipeProcessing/useGridPipeProcessing.mjs","../../@mui/x-data-grid/hooks/core/pipeProcessing/useGridRegisterPipeProcessor.mjs","../../@mui/x-data-grid/hooks/core/pipeProcessing/useGridRegisterPipeApplier.mjs","../../@mui/x-data-grid/hooks/features/rows/useGridRowsMeta.mjs","../../@mui/x-data-grid/hooks/core/useGridVirtualizer.mjs","../../@mui/x-data-grid/components/virtualization/GridVirtualScroller.mjs","../../@mui/x-data-grid/components/base/GridFooterPlaceholder.mjs","../../@mui/x-data-grid/utils/doesSupportPreventScroll.mjs","../../@mui/x-data-grid/utils/focusElement.mjs","../../@mui/x-data-grid/hooks/utils/usePinnedScrollOffset.mjs","../../@mui/x-data-grid/internals/utils/computeSlots.mjs","../../@mui/x-data-grid/internals/utils/propValidation.mjs","../../@mui/x-data-grid/internals/utils/gridRowGroupingUtils.mjs","../../@mui/x-data-grid/utils/rtlFlipSide.mjs","../../@mui/x-data-grid/internals/utils/attachPinnedStyle.mjs","../../@mui/x-data-grid/components/cell/GridCell.mjs","../../@mui/x-data-grid/components/cell/GridSkeletonCell.mjs","../../@mui/x-data-grid/hooks/utils/useIsSSR.mjs","../../@mui/x-data-grid/components/panel/GridPanelContext.mjs","../../@mui/x-data-grid/components/panel/GridPreferencesPanel.mjs","../../@mui/x-data-grid/components/GridHeader.mjs","../../@mui/x-data-grid/components/containers/GridRoot.mjs","../../@mui/x-data-grid/components/containers/GridFooterContainer.mjs","../../@mui/x-data-grid/components/containers/GridOverlay.mjs","../../@mui/x-internals/useComponentRenderer/useComponentRenderer.mjs","../../@mui/x-internals/ToolbarContext/ToolbarContext.mjs","../../@mui/x-internals/ToolbarContext/useRegisterToolbarButton.mjs","../../@mui/x-data-grid/components/toolbarV8/Toolbar.mjs","../../@mui/x-data-grid/components/toolbarV8/ToolbarButton.mjs","../../@mui/x-data-grid/components/containers/GridToolbarContainer.mjs","../../@mui/x-data-grid/hooks/features/columnMenu/getColumnMenuItemKeys.mjs","../../@mui/x-data-grid/components/columnHeaders/ColumnHeaderMenuIcon.mjs","../../@mui/x-data-grid/components/menu/columnMenu/GridColumnHeaderMenu.mjs","../../@mui/x-data-grid/utils/domUtils.mjs","../../@mui/x-data-grid/components/columnHeaders/GridColumnHeaderTitle.mjs","../../@mui/x-data-grid/components/columnHeaders/GridColumnHeaderSeparator.mjs","../../@mui/x-data-grid/components/columnHeaders/GridGenericColumnHeaderItem.mjs","../../@mui/x-data-grid/components/columnHeaders/GridColumnHeaderItem.mjs","../../@mui/x-data-grid/components/columnHeaders/GridIconButtonContainer.mjs","../../@mui/x-data-grid/components/GridColumnSortButton.mjs","../../@mui/x-data-grid/components/columnHeaders/GridColumnHeaderSortIcon.mjs","../../@mui/x-data-grid/components/columnHeaders/GridColumnHeaderFilterIconButton.mjs","../../@mui/x-data-grid/components/columnSelection/GridRowCheckbox.mjs","../../@mui/x-data-grid/components/menu/columnMenu/GridColumnMenuContainer.mjs","../../@mui/x-data-grid/hooks/features/columnMenu/useGridColumnMenuSlots.mjs","../../@mui/x-data-grid/components/menu/columnMenu/menuItems/GridColumnMenuHideItem.mjs","../../@mui/x-data-grid/components/menu/columnMenu/menuItems/GridColumnMenuManageItem.mjs","../../@mui/x-data-grid/components/menu/columnMenu/menuItems/GridColumnMenuColumnsItem.mjs","../../@mui/x-data-grid/components/menu/columnMenu/menuItems/GridColumnMenuFilterItem.mjs","../../@mui/x-data-grid/components/menu/columnMenu/menuItems/GridColumnMenuSortItem.mjs","../../@mui/x-data-grid/components/menu/columnMenu/GridColumnMenu.mjs","../../@mui/x-data-grid/components/panel/GridPanelWrapper.mjs","../../@mui/x-data-grid/components/panel/GridColumnsPanel.mjs","../../@mui/x-data-grid/components/panel/GridPanel.mjs","../../@mui/x-data-grid/components/panel/GridPanelContent.mjs","../../@mui/x-data-grid/components/panel/GridPanelFooter.mjs","../../@mui/x-data-grid/components/panel/GridPanelHeader.mjs","../../@mui/x-data-grid/components/panel/filterPanel/GridFilterFormBase.mjs","../../@mui/x-data-grid/components/panel/filterPanel/GridFilterForm.mjs","../../@mui/x-data-grid/components/panel/filterPanel/GridFilterPanelBase.mjs","../../@mui/x-data-grid/components/panel/filterPanel/GridFilterPanel.mjs","../../@mui/x-data-grid/components/columnsManagement/utils.mjs","../../@mui/x-data-grid/components/GridShadowScrollArea.mjs","../../@mui/x-data-grid/components/columnsManagement/GridColumnsManagement.mjs","../../@mui/x-data-grid/components/toolbar/GridToolbarColumnsButton.mjs","../../@mui/x-data-grid/components/toolbar/GridToolbarDensitySelector.mjs","../../@mui/x-data-grid/components/toolbar/GridToolbarFilterButton.mjs","../../@mui/x-data-grid/components/toolbar/GridToolbarExportContainer.mjs","../../@mui/x-data-grid/components/toolbar/GridToolbarExport.mjs","../../@mui/x-data-grid/components/quickFilter/QuickFilterContext.mjs","../../@mui/x-data-grid/components/quickFilter/QuickFilter.mjs","../../@mui/x-data-grid/components/quickFilter/QuickFilterControl.mjs","../../@mui/x-data-grid/components/quickFilter/QuickFilterClear.mjs","../../@mui/x-data-grid/components/quickFilter/QuickFilterTrigger.mjs","../../@mui/x-data-grid/components/toolbar/GridToolbarQuickFilter.mjs","../../@mui/x-data-grid/components/filterPanel/FilterPanelTrigger.mjs","../../@mui/x-data-grid/components/columnsPanel/ColumnsPanelTrigger.mjs","../../@mui/x-data-grid/components/export/ExportCsv.mjs","../../@mui/x-data-grid/components/export/ExportPrint.mjs","../../@mui/x-data-grid/components/toolbarV8/GridToolbar.mjs","../../@mui/x-data-grid/components/toolbar/GridToolbar.mjs","../../@mui/x-data-grid/components/GridSelectedRowCount.mjs","../../@mui/x-data-grid/components/GridFooter.mjs","../../@mui/x-data-grid/internals/utils/getPinnedCellOffset.mjs","../../@mui/x-data-grid/utils/cellBorderUtils.mjs","../../@mui/x-data-grid/components/GridSkeletonLoadingOverlay.mjs","../../@mui/x-data-grid/components/GridLoadingOverlay.mjs","../../@mui/x-data-grid/components/GridNoRowsOverlay.mjs","../../@mui/x-data-grid/components/GridNoColumnsOverlay.mjs","../../@mui/x-data-grid/components/GridPagination.mjs","../../@mui/x-data-grid/components/GridRowCount.mjs","../../@mui/x-data-grid/utils/composeGridClasses.mjs","../../@mui/x-data-grid/hooks/features/rowReorder/gridRowReorderSelector.mjs","../../@mui/x-data-grid/components/GridRowDragAndDropOverlay.mjs","../../@mui/x-data-grid/components/GridRow.mjs","../../@mui/x-data-grid/hooks/utils/useGridAriaAttributes.mjs","../../@mui/x-data-grid/hooks/features/rows/useGridRowAriaAttributes.mjs","../../@mui/x-data-grid/hooks/features/rows/useGridRowsOverridableMethods.mjs","../../@mui/x-data-grid/hooks/features/rows/useGridParamsOverridableMethods.mjs","../../@mui/x-data-grid/hooks/features/editing/useGridCellEditable.mjs","../../@mui/x-data-grid/context/GridContextProvider.mjs","../../@mui/x-data-grid/hooks/core/useGridRefs.mjs","../../@mui/x-data-grid/hooks/core/useGridIsRtl.mjs","../../@mui/x-data-grid/hooks/core/useGridLoggerFactory.mjs","../../@mui/x-data-grid/hooks/core/useGridLocaleText.mjs","../../@mui/x-data-grid/hooks/core/strategyProcessing/gridStrategyProcessingApi.mjs","../../@mui/x-data-grid/hooks/core/strategyProcessing/useGridRegisterStrategyProcessor.mjs","../../@mui/x-data-grid/hooks/core/strategyProcessing/useGridStrategyProcessing.mjs","../../@mui/x-data-grid/hooks/core/useGridStateInitialization.mjs","../../@mui/x-data-grid/hooks/core/useGridProps.mjs","../../@mui/x-data-grid/hooks/core/useGridInitialization.mjs","../../@mui/x-data-grid/hooks/utils/useGridInitializeState.mjs","../../@mui/x-data-grid/hooks/features/export/serializers/csvSerializer.mjs","../../@mui/x-data-grid/hooks/features/clipboard/useGridClipboard.mjs","../../@mui/x-data-grid/hooks/features/columnMenu/useGridColumnMenu.mjs","../../@mui/x-data-grid/hooks/features/columns/useGridColumns.mjs","../../@mui/x-data-grid/hooks/features/density/useGridDensity.mjs","../../@mui/x-data-grid/utils/exportAs.mjs","../../@mui/x-data-grid/hooks/features/export/utils.mjs","../../@mui/x-data-grid/hooks/features/export/useGridCsvExport.mjs","../../@mui/x-internals/export/loadStyleSheets.mjs","../../@mui/x-data-grid/hooks/features/pagination/useGridPaginationModel.mjs","../../@mui/x-data-grid/hooks/features/export/useGridPrintExport.mjs","../../@mui/x-data-grid/hooks/features/filter/useGridFilter.mjs","../../@mui/x-data-grid/hooks/features/focus/useGridFocus.mjs","../../@mui/x-data-grid/hooks/features/keyboardNavigation/utils.mjs","../../@mui/x-data-grid/hooks/features/keyboardNavigation/useGridKeyboardNavigation.mjs","../../@mui/x-data-grid/hooks/features/pagination/useGridRowCount.mjs","../../@mui/x-data-grid/hooks/features/pagination/useGridPaginationMeta.mjs","../../@mui/x-data-grid/hooks/features/pagination/useGridPagination.mjs","../../@mui/x-data-grid/hooks/features/preferencesPanel/useGridPreferencesPanel.mjs","../../@mui/x-data-grid/hooks/features/editing/utils.mjs","../../@mui/x-data-grid/hooks/features/editing/useGridCellEditing.mjs","../../@mui/x-data-grid/hooks/features/editing/useGridRowEditing.mjs","../../@mui/x-data-grid/hooks/features/editing/useGridEditing.mjs","../../@mui/x-data-grid/hooks/features/rows/useGridRows.mjs","../../@mui/x-data-grid/hooks/features/rows/useGridRowsPreProcessors.mjs","../../@mui/x-data-grid/hooks/features/rows/useGridParamsApi.mjs","../../@mui/x-data-grid/hooks/features/rowSelection/useGridRowSelection.mjs","../../@mui/x-data-grid/hooks/features/rowSelection/useGridRowSelectionPreProcessors.mjs","../../@mui/x-data-grid/hooks/features/sorting/useGridSorting.mjs","../../@mui/x-data-grid/hooks/features/scroll/useGridScroll.mjs","../../@mui/x-data-grid/hooks/features/events/useGridEvents.mjs","../../@mui/x-data-grid/hooks/features/dimensions/useGridDimensions.mjs","../../@mui/x-data-grid/hooks/features/statePersistence/useGridStatePersistence.mjs","../../@mui/x-data-grid/hooks/features/columns/useGridColumnSpanning.mjs","../../@mui/x-data-grid/hooks/features/columnGrouping/gridColumnGroupsUtils.mjs","../../@mui/x-data-grid/hooks/features/columnGrouping/useGridColumnGrouping.mjs","../../@mui/x-data-grid/utils/createControllablePromise.mjs","../../@mui/x-data-grid/hooks/features/columnResize/useGridColumnResize.mjs","../../@mui/x-data-grid/hooks/features/rows/gridRowSpanningUtils.mjs","../../@mui/x-data-grid/hooks/features/rows/useGridRowSpanning.mjs","../../@mui/x-data-grid/hooks/features/listView/useGridListView.mjs","../../@mui/x-data-grid/hooks/features/dataSource/gridDataSourceSelector.mjs","../../@mui/x-data-grid/hooks/features/dataSource/utils.mjs","../../@mui/x-data-grid/hooks/features/dataSource/useGridDataSourceBase.mjs","../../@mui/x-data-grid/hooks/features/dataSource/useGridDataSource.mjs","../../@mui/x-data-grid/DataGrid/useDataGridComponent.mjs","../../@mui/x-data-grid/components/columnHeaders/GridColumnGroupHeader.mjs","../../@mui/x-data-grid/components/GridScrollbarFillerCell.mjs","../../@mui/x-data-grid/hooks/features/columnHeaders/useGridColumnHeaders.mjs","../../@mui/x-data-grid/components/columnHeaders/GridBaseColumnHeaders.mjs","../../@mui/x-data-grid/components/GridColumnHeaders.mjs","../../@mui/x-data-grid/components/GridDetailPanels.mjs","../../@mui/x-data-grid/components/GridPinnedRows.mjs","../../@mui/x-data-grid/components/GridNoResultsOverlay.mjs","../../@mui/x-data-grid/components/virtualization/GridBottomContainer.mjs","../../@mui/x-data-grid/constants/defaultGridSlotsComponents.mjs","../../@mui/x-data-grid/DataGrid/useDataGridProps.mjs","../../@mui/x-data-grid/hooks/core/useGridApiInitialization.mjs","../../@mui/x-data-grid/DataGrid/DataGrid.mjs","../../@mui/x-data-grid/index.mjs"],"sourcesContent":["import * as React from 'react';\nimport reactMajor from \"../reactMajor/index.mjs\";\n\n// Compatibility shim that ensures stable props object for forwardRef components\n// Fixes https://github.com/react/react/issues/31613\n// We ensure that the ref is always present in the props object (even if that's not the case for older versions of React) to avoid the footgun of spreading props over the ref in the newer versions of React.\n// Footgun: will break past React 19, but the types will now warn us that we should use instead.\nexport const forwardRef = render => {\n if (reactMajor >= 19) {\n const Component = props => render(props, props.ref ?? null);\n Component.displayName = render.displayName ?? render.name;\n return Component;\n }\n return /*#__PURE__*/React.forwardRef(render);\n};\nif (process.env.NODE_ENV !== \"production\") forwardRef.displayName = \"forwardRef\";","import { createSvgIcon as createSvgIconMaterial } from '@mui/material/utils';\nexport const createSvgIcon = createSvgIconMaterial;","import { createSvgIcon } from \"./createSvgIcon.mjs\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport const GridArrowUpwardIcon = createSvgIcon(/*#__PURE__*/_jsx(\"path\", {\n d: \"M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z\"\n}), 'ArrowUpward');\nexport const GridArrowDownwardIcon = createSvgIcon(/*#__PURE__*/_jsx(\"path\", {\n d: \"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z\"\n}), 'ArrowDownward');\nexport const GridKeyboardArrowRight = createSvgIcon(/*#__PURE__*/_jsx(\"path\", {\n d: \"M8.59 16.59 13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z\"\n}), 'KeyboardArrowRight');\nexport const GridExpandMoreIcon = createSvgIcon(/*#__PURE__*/_jsx(\"path\", {\n d: \"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z\"\n}), 'ExpandMore');\nexport const GridFilterListIcon = createSvgIcon(/*#__PURE__*/_jsx(\"path\", {\n d: \"M10 18h4v-2h-4v2zM3 6v2h18V6H3zm3 7h12v-2H6v2z\"\n}), 'FilterList');\nexport const GridFilterAltIcon = createSvgIcon(/*#__PURE__*/_jsx(\"path\", {\n d: \"M4.25 5.61C6.27 8.2 10 13 10 13v6c0 .55.45 1 1 1h2c.55 0 1-.45 1-1v-6s3.72-4.8 5.74-7.39c.51-.66.04-1.61-.79-1.61H5.04c-.83 0-1.3.95-.79 1.61z\"\n}), 'FilterAlt');\nexport const GridSearchIcon = createSvgIcon(/*#__PURE__*/_jsx(\"path\", {\n d: \"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z\"\n}), 'Search');\nexport const GridMenuIcon = createSvgIcon(/*#__PURE__*/_jsx(\"path\", {\n d: \"M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z\"\n}), 'Menu');\nexport const GridCheckCircleIcon = createSvgIcon(/*#__PURE__*/_jsx(\"path\", {\n d: \"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z\"\n}), 'CheckCircle');\nexport const GridUndoIcon = createSvgIcon(/*#__PURE__*/_jsx(\"path\", {\n d: \"M12.5 8c-2.65 0-5.05.99-6.9 2.6L2 7v9h9l-3.62-3.62c1.39-1.16 3.16-1.88 5.12-1.88 3.54 0 6.55 2.31 7.6 5.5l2.37-.78C21.08 11.03 17.15 8 12.5 8\"\n}), 'Undo');\nexport const GridRedoIcon = createSvgIcon(/*#__PURE__*/_jsx(\"path\", {\n d: \"M18.4 10.6C16.55 8.99 14.15 8 11.5 8c-4.65 0-8.58 3.03-9.96 7.22L3.9 16c1.05-3.19 4.05-5.5 7.6-5.5 1.95 0 3.73.72 5.12 1.88L13 16h9V7z\"\n}), 'Redo');\nexport const GridColumnIcon = createSvgIcon(/*#__PURE__*/_jsx(\"path\", {\n d: \"M14.67 5v14H9.33V5zm1 14H21V5h-5.33zm-7.34 0V5H3v14z\"\n}), 'ColumnIcon');\nexport const GridSeparatorIcon = createSvgIcon(/*#__PURE__*/_jsx(\"rect\", {\n width: \"1\",\n height: \"24\",\n x: \"11.5\",\n rx: \"0.5\"\n}), 'Separator');\nexport const GridViewHeadlineIcon = createSvgIcon(/*#__PURE__*/_jsx(\"path\", {\n d: \"M4 15h16v-2H4v2zm0 4h16v-2H4v2zm0-8h16V9H4v2zm0-6v2h16V5H4z\"\n}), 'ViewHeadline');\nexport const GridTableRowsIcon = createSvgIcon(/*#__PURE__*/_jsx(\"path\", {\n d: \"M21,8H3V4h18V8z M21,10H3v4h18V10z M21,16H3v4h18V16z\"\n}), 'TableRows');\nexport const GridViewStreamIcon = createSvgIcon(/*#__PURE__*/_jsx(\"path\", {\n d: \"M4 18h17v-6H4v6zM4 5v6h17V5H4z\"\n}), 'ViewStream');\nexport const GridTripleDotsVerticalIcon = createSvgIcon(/*#__PURE__*/_jsx(\"path\", {\n d: \"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z\"\n}), 'TripleDotsVertical');\nexport const GridCloseIcon = createSvgIcon(/*#__PURE__*/_jsx(\"path\", {\n d: \"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z\"\n}), 'Close');\nexport const GridAddIcon = createSvgIcon(/*#__PURE__*/_jsx(\"path\", {\n d: \"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z\"\n}), 'Add');\nexport const GridRemoveIcon = createSvgIcon(/*#__PURE__*/_jsx(\"path\", {\n d: \"M19 13H5v-2h14v2z\"\n}), 'Remove');\nexport const GridLoadIcon = createSvgIcon(/*#__PURE__*/_jsx(\"path\", {\n d: \"M12 4V1L8 5l4 4V6c3.31 0 6 2.69 6 6 0 1.01-.25 1.97-.7 2.8l1.46 1.46C19.54 15.03 20 13.57 20 12c0-4.42-3.58-8-8-8zm0 14c-3.31 0-6-2.69-6-6 0-1.01.25-1.97.7-2.8L5.24 7.74C4.46 8.97 4 10.43 4 12c0 4.42 3.58 8 8 8v3l4-4-4-4v3z\"\n}), 'Load');\nexport const GridDragIcon = createSvgIcon(/*#__PURE__*/_jsx(\"path\", {\n d: \"M11 18c0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2 2 .9 2 2zm-2-8c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0-6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm6 4c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z\"\n}), 'Drag');\nexport const GridCheckIcon = createSvgIcon(/*#__PURE__*/_jsx(\"path\", {\n d: \"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z\"\n}), 'Check');\nexport const GridMoreVertIcon = createSvgIcon(/*#__PURE__*/_jsx(\"path\", {\n d: \"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z\"\n}), 'MoreVert');\nexport const GridVisibilityOffIcon = createSvgIcon(/*#__PURE__*/_jsx(\"path\", {\n 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 7zM2 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 3 2 4.27zM7.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.2zm4.31-.78l3.15 3.15.02-.16c0-1.66-1.34-3-3-3l-.17.01z\"\n}), 'VisibilityOff');\nexport const GridViewColumnIcon = createSvgIcon(/*#__PURE__*/_jsx(\"g\", {\n children: /*#__PURE__*/_jsx(\"path\", {\n d: \"M14.67,5v14H9.33V5H14.67z M15.67,19H21V5h-5.33V19z M8.33,19V5H3v14H8.33z\"\n })\n}), 'ViewColumn');\nexport const GridClearIcon = createSvgIcon(/*#__PURE__*/_jsx(\"path\", {\n d: \"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2m5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12z\"\n}), 'Clear');\nexport const GridDeleteIcon = createSvgIcon(/*#__PURE__*/_jsx(\"path\", {\n d: \"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z\"\n}), 'Delete');\nexport const GridDeleteForeverIcon = createSvgIcon(/*#__PURE__*/_jsx(\"path\", {\n d: \"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zm2.46-7.12l1.41-1.41L12 12.59l2.12-2.12 1.41 1.41L13.41 14l2.12 2.12-1.41 1.41L12 15.41l-2.12 2.12-1.41-1.41L10.59 14l-2.13-2.12zM15.5 4l-1-1h-5l-1 1H5v2h14V4z\"\n}), 'Delete');\nexport const GridDownloadIcon = createSvgIcon(/*#__PURE__*/_jsx(\"path\", {\n d: \"M5 20h14v-2H5zM19 9h-4V3H9v6H5l7 7z\"\n}), 'Download');\nexport const GridLongTextCellExpandIcon = createSvgIcon(/*#__PURE__*/_jsx(\"path\", {\n d: \"M21 11V3h-8l3.29 3.29-10 10L3 13v8h8l-3.29-3.29 10-10z\"\n}), 'OpenInFull');\nexport const GridLongTextCellCollapseIcon = createSvgIcon(/*#__PURE__*/_jsx(\"path\", {\n d: \"M5 15h2V8.41L18.59 20 20 18.59 8.41 7H15V5H5z\"\n}), 'NorthWest');","'use client';\n\nimport * as React from 'react';\nconst GridRootPropsContext = /*#__PURE__*/React.createContext(undefined);\nif (process.env.NODE_ENV !== \"production\") GridRootPropsContext.displayName = \"GridRootPropsContext\";\nexport { GridRootPropsContext };","'use client';\n\nimport _formatErrorMessage from \"@mui/x-internals/formatErrorMessage\";\nimport * as React from 'react';\nimport { GridRootPropsContext } from \"../../context/GridRootPropsContext.mjs\";\nexport const useGridRootProps = () => {\n const contextValue = React.useContext(GridRootPropsContext);\n if (!contextValue) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'MUI X Data Grid: useGridRootProps should only be used inside a Data Grid component. ' + 'The component must be a child of DataGrid, DataGridPro, or DataGridPremium. ' + 'Ensure your component is properly nested within a Data Grid.' : _formatErrorMessage(70));\n }\n return contextValue;\n};","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"sortingOrder\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { useGridRootProps } from \"../hooks/utils/useGridRootProps.mjs\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction GridColumnUnsortedIcon(props) {\n const {\n sortingOrder\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const {\n slots\n } = useGridRootProps();\n const [nextSortDirection] = sortingOrder;\n const Icon = nextSortDirection === 'asc' ? slots.columnSortedAscendingIcon : slots.columnSortedDescendingIcon;\n return Icon ? /*#__PURE__*/_jsx(Icon, _extends({}, other)) : null;\n}\nprocess.env.NODE_ENV !== \"production\" ? GridColumnUnsortedIcon.propTypes /* remove-proptypes */ = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the TypeScript types and run \"pnpm proptypes\" |\n // ----------------------------------------------------------------------\n className: PropTypes.string,\n color: PropTypes.string,\n fontSize: PropTypes.oneOf(['inherit', 'large', 'medium', 'small']),\n sortingOrder: PropTypes.arrayOf(PropTypes.oneOf(['asc', 'desc'])).isRequired,\n style: PropTypes.object,\n titleAccess: PropTypes.string\n} : void 0;\nexport { GridColumnUnsortedIcon };","'use client';\n\nimport * as React from 'react';\nexport const GridApiContext = /*#__PURE__*/React.createContext(undefined);\nif (process.env.NODE_ENV !== \"production\") GridApiContext.displayName = \"GridApiContext\";","'use client';\n\nimport _formatErrorMessage from \"@mui/x-internals/formatErrorMessage\";\nimport * as React from 'react';\nimport { GridApiContext } from \"../../components/GridApiContext.mjs\";\nexport function useGridApiContext() {\n const apiRef = React.useContext(GridApiContext);\n if (apiRef === undefined) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'MUI X Data Grid: Could not find the Data Grid context. ' + 'This happens when a component is rendered outside of a DataGrid, DataGridPro, or DataGridPremium parent component. ' + 'Ensure your component is a child of a Data Grid component. ' + 'This can also happen if you are bundling multiple versions of the Data Grid.' : _formatErrorMessage(67));\n }\n return apiRef;\n}","const encoder = new TextEncoder();\n\n// bufferLength must be a multiple of 4 to satisfy Int32Array constraints\nlet bufferLength = 2 * 1024;\nlet buffer = new ArrayBuffer(bufferLength);\nlet uint8View = new Uint8Array(buffer);\nlet int32View = new Int32Array(buffer);\nexport const hash = xxh;\n\n/**\n * Returns an xxh hash of `input` formatted as a decimal string.\n */\n// prettier-ignore\nfunction xxh(input) {\n /* eslint-disable no-bitwise */\n\n // Worst-case scenario: full string of 2-byte characters\n const requiredLength = input.length * 2;\n if (requiredLength > bufferLength) {\n // buffer.resize() is only available in recent browsers, so we re-allocate\n // a new and views\n bufferLength = requiredLength + (4 - requiredLength % 4);\n buffer = new ArrayBuffer(bufferLength);\n uint8View = new Uint8Array(buffer);\n int32View = new Int32Array(buffer);\n }\n const length8 = encoder.encodeInto(input, uint8View).written;\n const seed = 0;\n const len = length8 | 0;\n let i = 0;\n let h = (seed + len | 0) + 0x165667B1 | 0;\n if (len < 16) {\n for (; (i + 3 | 0) < len; i = i + 4 | 0) {\n h = Math.imul(rotl32(h + Math.imul(int32View[i] | 0, 0xC2B2AE3D) | 0, 17) | 0, 0x27D4EB2F);\n }\n } else {\n let v0 = seed + 0x24234428 | 0;\n let v1 = seed + 0x85EBCA77 | 0;\n let v2 = seed;\n let v3 = seed - 0x9E3779B1 | 0;\n for (; (i + 15 | 0) < len; i = i + 16 | 0) {\n v0 = Math.imul(rotl32(v0 + Math.imul(int32View[i + 0 | 0] | 0, 0x85EBCA77) | 0, 13) | 0, 0x9E3779B1);\n v1 = Math.imul(rotl32(v1 + Math.imul(int32View[i + 4 | 0] | 0, 0x85EBCA77) | 0, 13) | 0, 0x9E3779B1);\n v2 = Math.imul(rotl32(v2 + Math.imul(int32View[i + 8 | 0] | 0, 0x85EBCA77) | 0, 13) | 0, 0x9E3779B1);\n v3 = Math.imul(rotl32(v3 + Math.imul(int32View[i + 12 | 0] | 0, 0x85EBCA77) | 0, 13) | 0, 0x9E3779B1);\n }\n h = (((rotl32(v0, 1) | 0 + rotl32(v1, 7) | 0) + rotl32(v2, 12) | 0) + rotl32(v3, 18) | 0) + len | 0;\n for (; (i + 3 | 0) < len; i = i + 4 | 0) {\n h = Math.imul(rotl32(h + Math.imul(int32View[i] | 0, 0xC2B2AE3D) | 0, 17) | 0, 0x27D4EB2F);\n }\n }\n for (; i < len; i = i + 1 | 0) {\n h = Math.imul(rotl32(h + Math.imul(uint8View[i] | 0, 0x165667B1) | 0, 11) | 0, 0x9E3779B1);\n }\n h = Math.imul(h ^ h >>> 15, 0x85EBCA77);\n h = Math.imul(h ^ h >>> 13, 0xC2B2AE3D);\n return ((h ^ h >>> 16) >>> 0).toString();\n}\nfunction rotl32(x, r) {\n return x << r | x >>> 32 - r;\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\n// NOTE: Breakpoints can't come from the theme because we need access to them at\n// initialization time and media-queries can't use CSS variables. For users with\n// custom breakpoints, we might want to provide a way to configure them globally\n// instead of through the theme.\nconst breakpoints = {\n values: {\n xs: 0,\n // phone\n sm: 600,\n // tablet\n md: 900,\n // small laptop\n lg: 1200,\n // desktop\n xl: 1536 // large screen\n },\n up: key => {\n const values = breakpoints.values;\n const value = typeof values[key] === 'number' ? values[key] : key;\n return `@media (min-width:${value}px)`;\n }\n};\nconst keys = {\n spacingUnit: '--DataGrid-t-spacing-unit',\n /* Variables */\n colors: {\n border: {\n base: '--DataGrid-t-color-border-base'\n },\n foreground: {\n base: '--DataGrid-t-color-foreground-base',\n muted: '--DataGrid-t-color-foreground-muted',\n accent: '--DataGrid-t-color-foreground-accent',\n disabled: '--DataGrid-t-color-foreground-disabled',\n error: '--DataGrid-t-color-foreground-error'\n },\n background: {\n base: '--DataGrid-t-color-background-base',\n overlay: '--DataGrid-t-color-background-overlay',\n backdrop: '--DataGrid-t-color-background-backdrop'\n },\n interactive: {\n hover: '--DataGrid-t-color-interactive-hover',\n hoverOpacity: '--DataGrid-t-color-interactive-hover-opacity',\n focus: '--DataGrid-t-color-interactive-focus',\n focusOpacity: '--DataGrid-t-color-interactive-focus-opacity',\n disabled: '--DataGrid-t-color-interactive-disabled',\n disabledOpacity: '--DataGrid-t-color-interactive-disabled-opacity',\n selected: '--DataGrid-t-color-interactive-selected',\n selectedOpacity: '--DataGrid-t-color-interactive-selected-opacity'\n }\n },\n header: {\n background: {\n base: '--DataGrid-t-header-background-base'\n }\n },\n cell: {\n background: {\n pinned: '--DataGrid-t-cell-background-pinned'\n }\n },\n radius: {\n base: '--DataGrid-t-radius-base'\n },\n typography: {\n font: {\n body: '--DataGrid-t-typography-font-body',\n small: '--DataGrid-t-typography-font-small',\n large: '--DataGrid-t-typography-font-large'\n },\n fontFamily: {\n base: '--DataGrid-t-typography-font-family-base'\n },\n fontWeight: {\n light: '--DataGrid-t-typography-font-weight-light',\n regular: '--DataGrid-t-typography-font-weight-regular',\n medium: '--DataGrid-t-typography-font-weight-medium',\n bold: '--DataGrid-t-typography-font-weight-bold'\n }\n },\n transitions: {\n easing: {\n easeIn: '--DataGrid-t-transition-easing-ease-in',\n easeOut: '--DataGrid-t-transition-easing-ease-out',\n easeInOut: '--DataGrid-t-transition-easing-ease-in-out'\n },\n duration: {\n short: '--DataGrid-t-transition-duration-short',\n base: '--DataGrid-t-transition-duration-base',\n long: '--DataGrid-t-transition-duration-long'\n }\n },\n shadows: {\n base: '--DataGrid-t-shadow-base',\n overlay: '--DataGrid-t-shadow-overlay'\n },\n zIndex: {\n panel: '--DataGrid-t-z-index-panel',\n menu: '--DataGrid-t-z-index-menu',\n modal: '--DataGrid-t-z-index-modal'\n }\n};\nconst values = wrap(keys);\nexport const vars = _extends({\n breakpoints,\n spacing,\n transition,\n keys\n}, values);\nfunction spacing(a, b, c, d) {\n /* eslint-disable prefer-template */\n if (a === undefined) {\n return spacingString(1);\n }\n if (b === undefined) {\n return spacingString(a);\n }\n if (c === undefined) {\n return spacingString(a) + ' ' + spacingString(b);\n }\n if (d === undefined) {\n return spacingString(a) + ' ' + spacingString(b) + ' ' + spacingString(c);\n }\n return spacingString(a) + ' ' + spacingString(b) + ' ' + spacingString(c) + ' ' + spacingString(d);\n /* eslint-enable prefer-template */\n}\nfunction spacingString(value) {\n if (value === 0) {\n return '0';\n }\n return `calc(var(--DataGrid-t-spacing-unit) * ${value})`;\n}\nfunction transition(props, options) {\n const {\n duration = vars.transitions.duration.base,\n easing = vars.transitions.easing.easeInOut,\n delay = 0\n } = options ?? {};\n return props.map(prop => `${prop} ${duration} ${easing} ${delay}ms`).join(', ');\n}\nfunction wrap(input) {\n if (typeof input === 'string') {\n return `var(${input})`;\n }\n const result = {};\n for (const key in input) {\n if (Object.hasOwn(input, key)) {\n result[key] = wrap(input[key]);\n }\n }\n return result;\n}","import generateUtilityClass from '@mui/utils/generateUtilityClass';\nimport generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nexport function getDataGridUtilityClass(slot) {\n return generateUtilityClass('MuiDataGrid', slot);\n}\n\n/**\n * Class groups for the MuiDataGrid component used in GridRootStyles overridesResolver.\n *\n * Splits classes into two groups to support style overrides:\n * - `root`: classes applied directly to the root element (use `&.className` selector)\n * - `children`: classes applied to child elements (use `& .className` selector)\n *\n * These are spread into the gridClasses utility object and used for CSS-in-JS overrides.\n *\n * Only include class names here that are NOT applied via `styled` components.\n * For `styled` components, declare overrides directly in the component definition.\n */\nexport const gridClassesOverrides = {\n root: ['autoHeight', 'autosizing', 'root--densityStandard', 'root--densityComfortable', 'root--densityCompact', 'root--disableUserSelection', 'root--noToolbar', 'withVerticalBorder'],\n children: ['actionsCell', 'booleanCell', 'cell', 'cell--editable', 'cell--editing', 'cell--flex', 'cell--pinnedLeft', 'cell--pinnedRight', 'cell--rangeBottom', 'cell--rangeLeft', 'cell--rangeRight', 'cell--rangeTop', 'cell--withFillHandle', 'cell--fillPreview', 'cell--fillPreviewTop', 'cell--fillPreviewBottom', 'cell--fillPreviewLeft', 'cell--fillPreviewRight', 'cell--selectionMode', 'cell--textCenter', 'cell--textLeft', 'cell--textRight', 'cell--withLeftBorder', 'cell--withRightBorder', 'cellCheckbox', 'cellEmpty', 'cellOffsetLeft', 'cellSkeleton', 'checkboxInput', 'columnHeader', 'columnHeader--alignCenter', 'columnHeader--alignLeft', 'columnHeader--alignRight', 'columnHeader--dragging', 'columnHeader--emptyGroup', 'columnHeader--filledGroup', 'columnHeader--filtered', 'columnHeader--last', 'columnHeader--moving', 'columnHeader--numeric', 'columnHeader--pinnedLeft', 'columnHeader--pinnedRight', 'columnHeader--siblingFocused', 'columnHeader--sortable', 'columnHeader--sorted', 'columnHeader--withLeftBorder', 'columnHeader--withRightBorder', 'columnHeaderCheckbox', 'columnHeaderDraggableContainer', 'columnHeaderTitleContainer', 'columnHeaderTitleContainerContent', 'columnSeparator', 'columnSeparator--resizable', 'columnSeparator--resizing', 'columnSeparator--sideLeft', 'columnSeparator--sideRight', 'container--bottom', 'container--top', 'detailPanelToggleCell', 'detailPanelToggleCell--expanded', 'editBooleanCell', 'filterIcon', 'filler--borderBottom', 'filler--pinnedLeft', 'filler--pinnedRight', 'groupingCriteriaCell', 'groupingCriteriaCellLoadingContainer', 'groupingCriteriaCellToggle', 'headerFilterRow', 'iconSeparator', 'menuIcon', 'menuIconButton', 'menuList', 'menuOpen', 'overlayWrapperInner', 'pinnedRows', 'pinnedRows--bottom', 'pinnedRows--top', 'row', 'row--borderBottom', 'row--detailPanelExpanded',\n // TODO v9: Rename to `cell--dragging`\n 'row--dragging', 'row--dynamicHeight', 'row--editable', 'row--editing', 'row--firstVisible', 'row--lastVisible', 'rowReorderCell', 'rowReorderCell--draggable', 'rowReorderCellContainer', 'rowReorderCellPlaceholder', 'rowSkeleton', 'scrollbar', 'scrollbar--horizontal', 'scrollbar--vertical', 'scrollbarFiller', 'scrollbarFiller--pinnedRight', 'sortIcon', 'treeDataGroupingCell', 'treeDataGroupingCellLoadingContainer', 'treeDataGroupingCellToggle', 'withBorderColor', 'row--beingDragged']\n};\nexport const gridClasses = generateUtilityClasses('MuiDataGrid', [...gridClassesOverrides.root, ...gridClassesOverrides.children, 'aiAssistantPanel', 'aiAssistantPanelHeader', 'aiAssistantPanelTitleContainer', 'aiAssistantPanelTitle', 'aiAssistantPanelBody', 'aiAssistantPanelEmptyText', 'aiAssistantPanelFooter', 'aiAssistantPanelConversation', 'aiAssistantPanelConversationList', 'aiAssistantPanelConversationTitle', 'aiAssistantPanelSuggestions', 'aiAssistantPanelSuggestionsList', 'aiAssistantPanelSuggestionsItem', 'aiAssistantPanelSuggestionsLabel', 'aggregationColumnHeader', 'aggregationColumnHeader--alignLeft', 'aggregationColumnHeader--alignCenter', 'aggregationColumnHeader--alignRight', 'aggregationColumnHeaderLabel', 'aggregationRowOverlayWrapper', 'mainContent', 'withSidePanel', 'collapsible', 'collapsibleTrigger', 'collapsibleIcon', 'collapsiblePanel', 'columnHeader--filter', 'columnHeaderFilterInput', 'columnHeaderFilterOperatorLabel', 'columnHeaderTitle', 'columnHeaders', 'columnsManagement', 'columnsManagementRow', 'columnsManagementHeader', 'columnsManagementSearchInput', 'columnsManagementFooter', 'columnsManagementScrollArea', 'columnsManagementEmptyText', 'contentFiller', 'detailPanel', 'footerCell', 'panel', 'panelHeader', 'panelWrapper', 'panelContent', 'panelFooter', 'paper', 'editInputCell', 'longTextCell', 'longTextCellContent', 'longTextCellExpandButton', 'longTextCellCollapseButton', 'longTextCellPopup', 'longTextCellPopperContent', 'editLongTextCell', 'editLongTextCellValue', 'editLongTextCellPopup', 'editLongTextCellPopperContent', 'editLongTextCellTextarea', 'multiSelectCell', 'multiSelectCellChip', 'multiSelectCellChip--hidden', 'multiSelectCellOverflow', 'multiSelectCellPopup', 'multiSelectCellPopperContent', 'editMultiSelectCell', 'editMultiSelectCellChip', 'editMultiSelectCellChip--hidden', 'editMultiSelectCellOverflow', 'editMultiSelectCellPopup', 'editMultiSelectCellPopperContent', 'filler', 'filterForm', 'filterFormDeleteIcon', 'filterFormLogicOperatorInput', 'filterFormColumnInput', 'filterFormOperatorInput', 'filterFormValueInput', 'filler--horizontal', 'footerContainer', 'iconButtonContainer', 'main', 'main--hasPinnedRight', 'main--hiddenContent', 'menu', 'overlay', 'overlayWrapper', 'root', 'virtualizer--layoutControlled', 'rowCount', 'rowReorderIcon', 'scrollArea--left', 'scrollArea--right', 'scrollArea--up', 'scrollArea--down', 'scrollArea', 'scrollShadow', 'scrollShadow--vertical', 'scrollShadow--horizontal', 'selectedRowCount', 'sortButton', 'shadowScrollArea', 'sidebar', 'sidebarHeader', 'toolbarContainer', 'toolbar', 'toolbarLabel', 'toolbarDivider', 'toolbarFilterList', 'toolbarQuickFilter', 'toolbarQuickFilterTrigger', 'toolbarQuickFilterControl', 'virtualScroller', 'virtualScroller--hasScrollX', 'virtualScrollerContent', 'virtualScrollerContent--overflowed', 'virtualScrollerRenderZone', 'pivotPanelAvailableFields', 'pivotPanelField', 'pivotPanelField--sorted', 'pivotPanelFieldActionContainer', 'pivotPanelFieldCheckbox', 'pivotPanelFieldDragIcon', 'pivotPanelFieldList', 'pivotPanelFieldName', 'pivotPanelHeader', 'pivotPanelPlaceholder', 'pivotPanelScrollArea', 'pivotPanelSearchContainer', 'pivotPanelSection', 'pivotPanelSectionTitle', 'pivotPanelSections', 'pivotPanelSwitch', 'pivotPanelSwitchLabel', 'prompt', 'promptContent', 'promptText', 'promptFeedback', 'promptChangeList', 'promptChangesToggle', 'promptChangesToggleIcon', 'promptIcon', 'promptIconContainer', 'promptError', 'promptAction', 'resizablePanelHandle', 'resizablePanelHandle--horizontal', 'resizablePanelHandle--vertical']);","'use client';\n\nimport * as React from 'react';\nimport useEnhancedEffect from '@mui/utils/useEnhancedEffect';\nimport { fastObjectShallowCompare } from '@mui/x-internals/fastObjectShallowCompare';\nimport { warnOnce } from '@mui/x-internals/warning';\nimport { useLazyRef } from \"./useLazyRef.mjs\";\nconst defaultCompare = Object.is;\nexport const objectShallowCompare = fastObjectShallowCompare;\nconst arrayShallowCompare = (a, b) => {\n if (a === b) {\n return true;\n }\n return a.length === b.length && a.every((v, i) => v === b[i]);\n};\nconst argsEqual = (prev, curr) => {\n let fn = Object.is;\n if (curr instanceof Array) {\n fn = arrayShallowCompare;\n } else if (curr instanceof Object) {\n fn = objectShallowCompare;\n }\n return fn(prev, curr);\n};\nconst createRefs = () => ({\n state: null,\n equals: null,\n selector: null,\n args: undefined,\n storeState: null\n});\nconst EMPTY = [];\nexport function useGridSelector(apiRef, selector, args = undefined, equals = defaultCompare) {\n if (process.env.NODE_ENV !== 'production' && !apiRef.current.state) {\n warnOnce(['MUI X: `useGridSelector` has been called before the initialization of the state.', 'This hook can only be used inside the context of the grid.']);\n }\n const refs = useLazyRef(createRefs);\n const didInit = refs.current.selector !== null;\n const [state, setState] = React.useState(\n // We don't use an initialization function to avoid allocations\n didInit ? null : selector(apiRef, args));\n refs.current.state = state;\n if (!didInit) {\n refs.current.storeState = apiRef.current.store.state;\n }\n refs.current.equals = equals;\n refs.current.selector = selector;\n const prevArgs = refs.current.args;\n refs.current.args = args;\n if (didInit && !argsEqual(prevArgs, args)) {\n const newState = refs.current.selector(apiRef, refs.current.args);\n if (!refs.current.equals(refs.current.state, newState)) {\n refs.current.state = newState;\n setState(newState);\n }\n refs.current.storeState = apiRef.current.store.state;\n }\n const updateState = React.useCallback(() => {\n const storeState = apiRef.current.store.state;\n if (refs.current.storeState !== storeState) {\n const newState = refs.current.selector(apiRef, refs.current.args);\n refs.current.storeState = storeState;\n if (!refs.current.equals(refs.current.state, newState)) {\n refs.current.state = newState;\n setState(newState);\n }\n }\n },\n // eslint-disable-next-line react-hooks/exhaustive-deps, react-hooks/use-memo\n EMPTY);\n\n // Why subscribe in an effect instead of during render: a component can render without\n // ever mounting (e.g. when it suspends during hydration). If it subscribed during render,\n // it could receive a store update and call `setState` before being mounted (#17077).\n // Effects only run for mounted components, so subscribing here is safe.\n //\n // Using a layout effect because the store may already have changed\n // between render and mount (e.g. from a child's ref callback or layout effect).\n // `updateState()` picks up such changes, so the corrected value is shown right away instead of in a second frame.\n useEnhancedEffect(() => {\n updateState();\n return apiRef.current.store.subscribe(updateState);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, EMPTY);\n return state;\n}","'use client';\n\nimport _formatErrorMessage from \"@mui/x-internals/formatErrorMessage\";\nimport * as React from 'react';\nexport const GridPrivateApiContext = /*#__PURE__*/React.createContext(undefined);\nif (process.env.NODE_ENV !== \"production\") GridPrivateApiContext.displayName = \"GridPrivateApiContext\";\nexport function useGridPrivateApiContext() {\n const privateApiRef = React.useContext(GridPrivateApiContext);\n if (privateApiRef === undefined) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'MUI X Data Grid: Could not find the Data Grid private context. ' + 'This happens when a component is rendered outside of a DataGrid, DataGridPro, or DataGridPremium parent component. ' + 'Ensure your component is a child of a Data Grid component. ' + 'This can also happen if you are bundling multiple versions of the Data Grid.' : _formatErrorMessage(69));\n }\n return privateApiRef;\n}","import { styled, css } from '@mui/material/styles';\nimport { gridClasses as c, gridClassesOverrides } from \"../../constants/gridClasses.mjs\";\nimport { vars } from \"../../constants/cssVariables.mjs\";\nimport { useGridSelector } from \"../../hooks/utils/useGridSelector.mjs\";\nimport { useGridPrivateApiContext } from \"../../hooks/utils/useGridPrivateApiContext.mjs\";\nconst columnSeparatorTargetSize = 10;\nconst columnSeparatorOffset = -5;\nconst focusOutlineWidth = 1;\nconst separatorIconDragStyles = {\n width: 3,\n rx: 1.5,\n x: 10.5\n};\n\n// Emotion thinks it knows better than us which selector we should use.\n// https://github.com/emotion-js/emotion/issues/1105#issuecomment-1722524968\nconst ignoreSsrWarning = '/* emotion-disable-server-rendering-unsafe-selector-warning-please-do-not-use-this-the-warning-exists-for-a-reason */';\nconst shouldShowBorderTopRightRadiusSelector = apiRef => !apiRef.current.state.dimensions.isReady ? apiRef.current.state.dimensions.scrollbarSize === 0 : apiRef.current.state.dimensions.hasScrollX && (!apiRef.current.state.dimensions.hasScrollY || apiRef.current.state.dimensions.scrollbarSize === 0);\nexport const GridRootStyles = styled('div', {\n name: 'MuiDataGrid',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n // Root overrides\n const overrides = [styles.root];\n gridClassesOverrides.root.forEach(key => {\n if (styles[key] !== undefined) {\n overrides.push({\n [`&.${c[key]}`]: styles[key]\n });\n }\n });\n\n // Child element overrides\n // - Only declare overrides here for class names that are not applied to `styled` components.\n // - For `styled` components, declare overrides in the component itself.\n gridClassesOverrides.children.forEach(key => {\n if (styles[key] !== undefined) {\n overrides.push({\n [`& .${c[key]}`]: styles[key]\n });\n }\n });\n return overrides;\n }\n})(() => {\n const apiRef = useGridPrivateApiContext();\n const shouldShowBorderTopRightRadius = useGridSelector(apiRef, shouldShowBorderTopRightRadiusSelector);\n const baseBackground = vars.colors.background.base;\n const headerBackground = vars.header.background.base;\n const pinnedBackground = vars.cell.background.pinned;\n const hoverColor = removeOpacity(vars.colors.interactive.hover);\n const hoverOpacity = vars.colors.interactive.hoverOpacity;\n const selectedColor = vars.colors.interactive.selected;\n const selectedOpacity = vars.colors.interactive.selectedOpacity;\n const selectedHoverColor = selectedColor;\n const selectedHoverOpacity = `calc(${selectedOpacity} + ${hoverOpacity})`;\n const fallbackColors = {\n hover: vars.colors.interactive.hover,\n selected: selectedColor,\n selectedHover: selectedColor\n };\n const hoverBackground = mix(baseBackground, hoverColor, hoverOpacity, fallbackColors.hover);\n const selectedBackground = mix(baseBackground, selectedColor, selectedOpacity, fallbackColors.selected);\n const selectedHoverBackground = mix(baseBackground, selectedHoverColor, selectedHoverOpacity, fallbackColors.selectedHover);\n const pinnedHoverBackground = mix(pinnedBackground, hoverColor, hoverOpacity, fallbackColors.hover);\n const pinnedSelectedBackground = mix(pinnedBackground, selectedColor, selectedOpacity, fallbackColors.selected);\n const pinnedSelectedHoverBackground = mix(pinnedBackground, selectedHoverColor, selectedHoverOpacity, fallbackColors.selectedHover);\n const getPinnedBackgroundStyles = backgroundColor => ({\n [`& .${c['cell--pinnedLeft']}, & .${c['cell--pinnedRight']}`]: {\n backgroundColor,\n '&.Mui-selected': {\n backgroundColor: mix(backgroundColor, selectedBackground, selectedOpacity, fallbackColors.selected),\n '&:hover': {\n backgroundColor: mix(backgroundColor, selectedHoverBackground, selectedHoverOpacity, fallbackColors.selectedHover)\n }\n }\n }\n });\n const pinnedHoverStyles = getPinnedBackgroundStyles(pinnedHoverBackground);\n const pinnedSelectedStyles = getPinnedBackgroundStyles(pinnedSelectedBackground);\n const pinnedSelectedHoverStyles = getPinnedBackgroundStyles(pinnedSelectedHoverBackground);\n const selectedStyles = {\n backgroundColor: selectedBackground,\n '&:hover': {\n backgroundColor: selectedHoverBackground,\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: selectedBackground\n }\n }\n };\n const gridStyle = {\n '--unstable_DataGrid-radius': vars.radius.base,\n '--unstable_DataGrid-headWeight': vars.typography.fontWeight.medium,\n '--DataGrid-rowBorderColor': vars.colors.border.base,\n '--DataGrid-cellOffsetMultiplier': 2,\n '--DataGrid-width': '0px',\n '--DataGrid-hasScrollX': '0',\n '--DataGrid-hasScrollY': '0',\n '--DataGrid-scrollbarSize': '10px',\n '--DataGrid-rowWidth': '0px',\n '--DataGrid-columnsTotalWidth': '0px',\n '--DataGrid-leftPinnedWidth': '0px',\n '--DataGrid-rightPinnedWidth': '0px',\n '--DataGrid-headerHeight': '0px',\n '--DataGrid-headersTotalHeight': '0px',\n '--DataGrid-topContainerHeight': '0px',\n '--DataGrid-bottomContainerHeight': '0px',\n '--DataGrid-horizontalFiller': '0px',\n flex: 1,\n boxSizing: 'border-box',\n position: 'relative',\n borderWidth: '1px',\n borderStyle: 'solid',\n borderColor: vars.colors.border.base,\n borderRadius: 'var(--unstable_DataGrid-radius)',\n backgroundColor: vars.colors.background.base,\n color: vars.colors.foreground.base,\n font: vars.typography.font.body,\n outline: 'none',\n height: '100%',\n display: 'flex',\n minWidth: 0,\n // See https://github.com/mui/mui-x/issues/8547\n minHeight: 0,\n flexDirection: 'column',\n overflow: 'hidden',\n transform: 'translate(0, 0)',\n // Create a stacking context to keep scrollbars from showing on top\n\n [`& .${c.virtualScroller}`]: {\n overflowAnchor: 'none' // Keep the same scrolling position\n },\n // Use `css` tagged template so the ignore-comment remains a sibling of the\n // `:first-child` rule in the stylis AST. Previously, the comment was embedded\n // in the object-key selector, which got separated from the rule during\n // pre-serialization when `styleOverrides` were applied, re-triggering Emotion's\n // unsafe-selector SSR warning. https://github.com/emotion-js/emotion/issues/1105\n [`.${c.main}`]: css`\n & > *:first-child ${ignoreSsrWarning} {\n border-top-left-radius: var(--unstable_DataGrid-radius);\n border-top-right-radius: var(--unstable_DataGrid-radius);\n }\n `,\n [`&.${c.autoHeight}`]: {\n height: 'auto'\n },\n [`&.${c.autosizing}`]: {\n [`& .${c.columnHeaderTitleContainerContent} > *`]: {\n overflow: 'visible !important'\n },\n '@media (hover: hover)': {\n [`& .${c.menuIcon}`]: {\n width: '0 !important',\n visibility: 'hidden !important'\n }\n },\n [`& .${c.cell}`]: {\n overflow: 'visible !important',\n whiteSpace: 'nowrap',\n minWidth: 'max-content !important',\n maxWidth: 'max-content !important'\n },\n [`& .${c.groupingCriteriaCell}`]: {\n width: 'unset'\n },\n [`& .${c.treeDataGroupingCell}`]: {\n width: 'unset'\n },\n [`& .${c['columnHeader--filter']}`]: {\n flex: 'none !important',\n width: 'unset !important'\n },\n [`& .${c.multiSelectCell}`]: {\n width: 'max-content',\n overflow: 'visible'\n },\n [`& .${c['multiSelectCellChip--hidden']}`]: {\n display: 'inline-flex'\n },\n [`& .${c.multiSelectCellOverflow}`]: {\n display: 'none'\n }\n },\n [`&.${c.withSidePanel}`]: {\n flexDirection: 'row'\n },\n [`& .${c.mainContent}`]: {\n display: 'flex',\n flexDirection: 'column',\n overflow: 'hidden',\n flex: 1\n },\n [`& .${c.columnHeader}, & .${c.cell}`]: {\n WebkitTapHighlightColor: 'transparent',\n padding: '0 10px',\n boxSizing: 'border-box'\n },\n [`& .${c.columnHeader}:focus-within, & .${c.cell}:focus-within`]: {\n outline: `solid ${setOpacity(vars.colors.interactive.focus, 0.5)} ${focusOutlineWidth}px`,\n outlineOffset: focusOutlineWidth * -1\n },\n [`& .${c.columnHeader}:focus, & .${c.cell}:focus`]: {\n outline: `solid ${vars.colors.interactive.focus} ${focusOutlineWidth}px`,\n outlineOffset: focusOutlineWidth * -1\n },\n // Hide the column separator when:\n // - the column is focused and has an outline\n // - the next column is focused and has an outline\n // - the column has a left or right border\n // - the next column is pinned right and has a left border\n [`& .${c.columnHeader}:focus,\n & .${c['columnHeader--withLeftBorder']},\n & .${c['columnHeader--withRightBorder']},\n & .${c['columnHeader--siblingFocused']}\n `]: {\n [`& .${c.columnSeparator}`]: {\n opacity: 0\n },\n // Show resizable separators at all times on touch devices\n '@media (hover: none)': {\n [`& .${c['columnSeparator--resizable']}`]: {\n opacity: 1\n }\n },\n [`& .${c['columnSeparator--resizable']}:hover`]: {\n opacity: 1\n }\n },\n [`&.${c['root--noToolbar']} [aria-rowindex=\"1\"] [aria-colindex=\"1\"]`]: {\n borderTopLeftRadius: 'calc(var(--unstable_DataGrid-radius) - 1px)'\n },\n [`&.${c['root--noToolbar']} [aria-rowindex=\"1\"] .${c['columnHeader--last']}`]: {\n borderTopRightRadius: shouldShowBorderTopRightRadius ? 'calc(var(--unstable_DataGrid-radius) - 1px)' : undefined\n },\n [`& .${c.columnHeaderCheckbox}, & .${c.cellCheckbox}`]: {\n padding: 0,\n justifyContent: 'center',\n alignItems: 'center'\n },\n [`& .${c.columnHeader}`]: {\n position: 'relative',\n display: 'flex',\n alignItems: 'center',\n backgroundColor: headerBackground,\n flex: '0 0 auto'\n },\n [`& .${c.columnHeader} .${c.sortButton}`]: {\n backgroundColor: vars.header.background.base\n },\n [`& .${c['columnHeader--filter']}`]: {\n paddingTop: 8,\n paddingBottom: 8,\n paddingRight: 5,\n minHeight: 'min-content',\n overflow: 'hidden'\n },\n [`&.${c['root--densityCompact']} .${c['columnHeader--filter']}`]: {\n paddingTop: 4,\n paddingBottom: 4\n },\n [`& .${c['virtualScroller--hasScrollX']} .${c['columnHeader--last']}`]: {\n overflow: 'hidden'\n },\n [`& .${c['pivotPanelField--sorted']} .${c.iconButtonContainer},\n & .${c['columnHeader--sorted']} .${c.iconButtonContainer},\n & .${c['columnHeader--filtered']} .${c.iconButtonContainer}`]: {\n visibility: 'visible',\n width: 'auto'\n },\n [`& .${c.pivotPanelField}:not(.${c['pivotPanelField--sorted']}) .${c.sortButton},\n & .${c.columnHeader}:not(.${c['columnHeader--sorted']}) .${c.sortButton}`]: {\n opacity: 0,\n transition: vars.transition(['opacity'], {\n duration: vars.transitions.duration.short\n })\n },\n [`& .${c.columnHeaderTitleContainer}`]: {\n display: 'flex',\n alignItems: 'center',\n gap: vars.spacing(0.25),\n minWidth: 0,\n flex: 1,\n whiteSpace: 'nowrap',\n overflow: 'hidden'\n },\n [`& .${c.columnHeaderTitleContainerContent}`]: {\n overflow: 'hidden',\n display: 'flex',\n alignItems: 'center'\n },\n [`& .${c['columnHeader--filledGroup']} .${c.columnHeaderTitleContainer}`]: {\n borderBottomWidth: '1px',\n borderBottomStyle: 'solid',\n boxSizing: 'border-box'\n },\n [`& .${c.sortIcon}, & .${c.filterIcon}`]: {\n fontSize: 'inherit'\n },\n [`& .${c['columnHeader--sortable']}`]: {\n cursor: 'pointer'\n },\n [`& .${c['columnHeader--alignCenter']} .${c.columnHeaderTitleContainer}`]: {\n justifyContent: 'center'\n },\n [`& .${c['columnHeader--alignRight']} .${c.columnHeaderDraggableContainer}, & .${c['columnHeader--alignRight']} .${c.columnHeaderTitleContainer}`]: {\n flexDirection: 'row-reverse'\n },\n [`& .${c['columnHeader--alignCenter']} .${c.menuIcon}`]: {\n marginLeft: 'auto'\n },\n [`& .${c['columnHeader--alignRight']} .${c.menuIcon}`]: {\n marginRight: 'auto',\n marginLeft: -5\n },\n [`& .${c['columnHeader--moving']}`]: {\n backgroundColor: hoverBackground\n },\n [`& .${c['columnHeader--pinnedLeft']}, & .${c['columnHeader--pinnedRight']}`]: {\n position: 'sticky',\n zIndex: 40,\n // Should be above the column separator\n background: vars.header.background.base\n },\n [`& .${c.columnSeparator}`]: {\n position: 'absolute',\n overflow: 'hidden',\n zIndex: 30,\n display: 'flex',\n flexDirection: 'column',\n justifyContent: 'center',\n alignItems: 'center',\n maxWidth: columnSeparatorTargetSize,\n color: vars.colors.border.base\n },\n [`& .${c.columnHeaders}`]: {\n width: 'var(--DataGrid-rowWidth)',\n backgroundColor: headerBackground\n },\n '@media (hover: hover)': {\n [`& .${c.columnHeader}:hover`]: {\n [`& .${c.menuIcon}`]: {\n width: 'auto',\n visibility: 'visible'\n },\n [`& .${c.iconButtonContainer}`]: {\n visibility: 'visible',\n width: 'auto'\n }\n },\n [`& .${c.columnHeader}:not(.${c['columnHeader--sorted']}):hover .${c.sortButton},\n & .${c.pivotPanelField}:not(.${c['pivotPanelField--sorted']}):hover .${c.sortButton},\n & .${c.pivotPanelField}:not(.${c['pivotPanelField--sorted']}) .${c.sortButton}:focus-visible`]: {\n opacity: 1\n },\n // Add opacity only to the button content to avoid affecting the background color\n [`& .${c.columnHeader}:not(.${c['columnHeader--sorted']}):hover .${c.sortButton} > *,\n & .${c.pivotPanelField}:not(.${c['pivotPanelField--sorted']}):hover .${c.sortButton} > *,\n & .${c.pivotPanelField}:not(.${c['pivotPanelField--sorted']}) .${c.sortButton}:focus-visible > *`]: {\n opacity: 0.78\n },\n [`& .${c.pivotPanelFieldActionContainer} button:hover`]: {\n backgroundColor: vars.colors.background.base\n }\n },\n '@media (hover: none)': {\n [`& .${c.columnHeader} .${c.menuIcon}`]: {\n width: 'auto',\n visibility: 'visible'\n },\n [`& .${c.columnHeader}:focus,\n & .${c['columnHeader--siblingFocused']}`]: {\n [`.${c['columnSeparator--resizable']}`]: {\n color: vars.colors.foreground.accent\n }\n },\n [`& .${c.pivotPanelField}:not(.${c['pivotPanelField--sorted']}) .${c.sortButton}`]: {\n opacity: 0.78\n }\n },\n // Hide the column separator when the column has border and it is not resizable\n // In this case, this column separator may block interaction with the separator from the adjacent column that is resizable\n [`& .${c['columnHeader--withLeftBorder']} .${c['columnSeparator--sideLeft']}:not(.${c['columnSeparator--resizable']}), & .${c['columnHeader--withRightBorder']} .${c['columnSeparator--sideRight']}:not(.${c['columnSeparator--resizable']})`]: {\n display: 'none'\n },\n [`& .${c['columnSeparator--sideLeft']}`]: {\n left: columnSeparatorOffset\n },\n [`& .${c['columnSeparator--sideRight']}`]: {\n right: columnSeparatorOffset\n },\n [`& .${c['columnHeader--withRightBorder']} .${c['columnSeparator--sideLeft']}`]: {\n left: columnSeparatorOffset - 0.5\n },\n [`& .${c['columnHeader--withRightBorder']} .${c['columnSeparator--sideRight']}`]: {\n right: columnSeparatorOffset - 0.5\n },\n [`& .${c['columnSeparator--resizable']}`]: {\n cursor: 'col-resize',\n touchAction: 'none',\n [`&.${c['columnSeparator--resizing']}`]: {\n color: vars.colors.foreground.accent\n },\n // Always appear as draggable on touch devices\n '@media (hover: none)': {\n [`& .${c.iconSeparator} rect`]: separatorIconDragStyles\n },\n '@media (hover: hover)': {\n '&:hover': {\n color: vars.colors.foreground.accent,\n [`& .${c.iconSeparator} rect`]: separatorIconDragStyles\n }\n },\n '& svg': {\n pointerEvents: 'none'\n }\n },\n [`& .${c.iconSeparator}`]: {\n color: 'inherit',\n transition: vars.transition(['color', 'width'], {\n duration: vars.transitions.duration.short\n })\n },\n [`& .${c.menuIcon}`]: {\n width: 0,\n visibility: 'hidden',\n fontSize: 20,\n marginRight: -5,\n display: 'flex',\n alignItems: 'center'\n },\n [`.${c.menuOpen}`]: {\n visibility: 'visible',\n width: 'auto'\n },\n [`& .${c.headerFilterRow}`]: {\n [`& .${c.columnHeader}, & .${c.scrollbarFiller}`]: {\n boxSizing: 'border-box',\n borderBottom: '1px solid var(--DataGrid-rowBorderColor)'\n }\n },\n /* Bottom border of the top-container */\n [`& .${c['row--borderBottom']} .${c.columnHeader},\n & .${c['row--borderBottom']} .${c.filler},\n & .${c['row--borderBottom']} .${c.scrollbarFiller}`]: {\n borderBottom: `1px solid var(--DataGrid-rowBorderColor)`\n },\n [`& .${c['row--borderBottom']} .${c.cell}`]: {\n borderBottom: `1px solid var(--rowBorderColor)`\n },\n /* Row styles */\n [`.${c.row}`]: {\n display: 'flex',\n position: 'relative',\n width: 'var(--DataGrid-rowWidth)',\n breakInside: 'avoid',\n // Avoid the row to be broken in two different print pages.\n\n '--rowBorderColor': 'var(--DataGrid-rowBorderColor)',\n [`&.${c['row--firstVisible']}`]: {\n '--rowBorderColor': 'transparent'\n },\n '&:hover': {\n backgroundColor: hoverBackground,\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: 'transparent'\n }\n },\n [`&.${c.rowSkeleton}:hover`]: {\n backgroundColor: 'transparent'\n },\n '&.Mui-selected': selectedStyles\n },\n /* Cell styles */\n [`& .${c.cell}`]: {\n flex: '0 0 auto',\n height: 'var(--height)',\n width: 'var(--width)',\n lineHeight: 'calc(var(--height) - 1px)',\n // -1px for the border\n\n boxSizing: 'border-box',\n borderTop: `1px solid var(--rowBorderColor)`,\n overflow: 'hidden',\n whiteSpace: 'nowrap',\n textOverflow: 'ellipsis',\n '&.Mui-selected': selectedStyles\n },\n /* Default range border styles using box-shadow to avoid layout shift */\n [`& .${c.cell}.Mui-selected`]: {\n '--range-top': '0 0 0 0 transparent',\n '--range-bottom': '0 0 0 0 transparent',\n '--range-left': '0 0 0 0 transparent',\n '--range-right': '0 0 0 0 transparent',\n boxShadow: 'var(--range-top), var(--range-bottom), var(--range-left), var(--range-right)'\n },\n [`& .${c['cell--rangeTop']}`]: {\n '--range-top': `inset 0 2px 0 0 ${vars.colors.interactive.focus}`\n },\n [`& .${c['cell--rangeBottom']}`]: {\n '--range-bottom': `inset 0 -2px 0 0 ${vars.colors.interactive.focus}`\n },\n [`& .${c['cell--rangeLeft']}`]: {\n '--range-left': `inset 2px 0 0 0 ${vars.colors.interactive.focus}`\n },\n [`& .${c['cell--rangeRight']}`]: {\n '--range-right': `inset -2px 0 0 0 ${vars.colors.interactive.focus}`\n },\n [`& .${c['virtualScrollerContent--overflowed']} .${c['row--lastVisible']} .${c.cell}`]: {\n borderTopColor: 'transparent'\n },\n [`& .${c.pinnedRows} .${c.row}, .${c.aggregationRowOverlayWrapper} .${c.row}`]: {\n backgroundColor: pinnedBackground,\n '&:hover': {\n backgroundColor: pinnedHoverBackground\n }\n },\n [`& .${c['pinnedRows--top']} :first-of-type`]: {\n [`& .${c.cell}, .${c.scrollbarFiller}`]: {\n borderTop: 'none'\n }\n },\n [`&.${c['root--disableUserSelection']}`]: {\n userSelect: 'none'\n },\n [`& .${c['row--dynamicHeight']} > .${c.cell}`]: {\n whiteSpace: 'initial',\n lineHeight: 'inherit'\n },\n [`& .${c['row--dynamicHeight']}`]: {\n [`& .${c.multiSelectCell}, .${c.editMultiSelectCell}`]: {\n flexWrap: 'wrap'\n }\n },\n [`& .${c.cell}[aria-rowspan]:not([aria-rowspan=\"1\"])`]: {\n [`& .${c.multiSelectCell}`]: {\n alignItems: 'flex-start',\n alignContent: 'flex-start',\n flexWrap: 'wrap',\n paddingTop: 8\n },\n [`& .${c['multiSelectCellChip--hidden']}`]: {\n display: 'inline-flex'\n },\n [`& .${c.multiSelectCellOverflow}`]: {\n display: 'none'\n }\n },\n [`& .${c.cellEmpty}`]: {\n flex: 1,\n padding: 0,\n height: 'unset'\n },\n [`& .${c.cell}.${c['cell--selectionMode']}`]: {\n cursor: 'default'\n },\n [`& .${c.cell}.${c['cell--editing']}`]: {\n padding: 1,\n display: 'flex',\n boxShadow: vars.shadows.base,\n backgroundColor: vars.colors.background.overlay,\n '&:focus-within': {\n outline: `${focusOutlineWidth}px solid ${vars.colors.interactive.focus}`,\n outlineOffset: focusOutlineWidth * -1\n }\n },\n [`& .${c['cell--editing']}`]: {\n '& .MuiInputBase-root': {\n height: '100%'\n }\n },\n [`& .${c['row--editing']}`]: {\n boxShadow: vars.shadows.base\n },\n [`& .${c['row--editing']} .${c.cell}`]: {\n boxShadow: 'none',\n backgroundColor: vars.colors.background.overlay\n },\n [`& .${c.editBooleanCell}`]: {\n display: 'flex',\n height: '100%',\n width: '100%',\n alignItems: 'center',\n justifyContent: 'center'\n },\n [`& .${c.booleanCell}[data-value=\"true\"]`]: {\n color: vars.colors.foreground.muted\n },\n [`& .${c.booleanCell}[data-value=\"false\"]`]: {\n color: vars.colors.foreground.disabled\n },\n [`& .${c.actionsCell}`]: {\n display: 'inline-flex',\n alignItems: 'center',\n gridGap: vars.spacing(1)\n },\n [`& .${c.rowReorderCell}`]: {\n display: 'inline-flex',\n flex: 1,\n alignItems: 'center',\n justifyContent: 'center',\n opacity: vars.colors.interactive.disabledOpacity\n },\n [`& .${c['rowReorderCell--draggable']}`]: {\n cursor: 'grab',\n opacity: 1\n },\n [`& .${c.rowReorderCellContainer}`]: {\n padding: 0,\n display: 'flex',\n alignItems: 'stretch'\n },\n [`.${c.withBorderColor}`]: {\n borderColor: vars.colors.border.base\n },\n [`& .${c['cell--withLeftBorder']}, & .${c['columnHeader--withLeftBorder']}`]: {\n borderLeftColor: 'var(--DataGrid-rowBorderColor)',\n borderLeftWidth: '1px',\n borderLeftStyle: 'solid'\n },\n [`& .${c['cell--withRightBorder']}, & .${c['columnHeader--withRightBorder']}`]: {\n borderRightColor: 'var(--DataGrid-rowBorderColor)',\n borderRightWidth: '1px',\n borderRightStyle: 'solid'\n },\n [`& .${c['cell--flex']}`]: {\n display: 'flex',\n alignItems: 'center',\n lineHeight: 'inherit'\n },\n [`& .${c['cell--textLeft']}`]: {\n textAlign: 'left',\n justifyContent: 'flex-start'\n },\n [`& .${c['cell--textRight']}`]: {\n textAlign: 'right',\n justifyContent: 'flex-end'\n },\n [`& .${c['cell--textCenter']}`]: {\n textAlign: 'center',\n justifyContent: 'center'\n },\n [`& .${c['cell--pinnedLeft']}, & .${c['cell--pinnedRight']}`]: {\n position: 'sticky',\n zIndex: 30,\n background: vars.cell.background.pinned,\n '&.Mui-selected': {\n backgroundColor: pinnedSelectedBackground\n }\n },\n [`& .${c.row}`]: {\n '&:hover': pinnedHoverStyles,\n '&.Mui-selected': pinnedSelectedStyles,\n '&.Mui-selected:hover': pinnedSelectedHoverStyles\n },\n [`& .${c.cellOffsetLeft}`]: {\n flex: '0 0 auto',\n display: 'inline-block'\n },\n [`& .${c.cellSkeleton}`]: {\n flex: '0 0 auto',\n height: '100%',\n display: 'inline-flex',\n alignItems: 'center'\n },\n [`& .${c.columnHeaderDraggableContainer}`]: {\n display: 'flex',\n width: '100%',\n height: '100%'\n },\n [`& .${c.rowReorderCellPlaceholder}`]: {\n display: 'none'\n },\n [`& .${c['columnHeader--dragging']}`]: {\n background: vars.colors.background.overlay,\n padding: '0 12px',\n borderRadius: 'var(--unstable_DataGrid-radius)',\n opacity: vars.colors.interactive.disabledOpacity\n },\n [`& .${c['row--dragging']}`]: {\n background: vars.colors.background.overlay,\n padding: '0 12px',\n borderRadius: 'var(--unstable_DataGrid-radius)',\n border: '1px solid var(--DataGrid-rowBorderColor)',\n color: vars.colors.foreground.base,\n transform: 'translateZ(0)',\n [`& .${c.rowReorderCellPlaceholder}`]: {\n padding: '0 6px',\n display: 'flex'\n }\n },\n [`& .${c.treeDataGroupingCell}`]: {\n display: 'flex',\n alignItems: 'center',\n width: '100%'\n },\n [`& .${c.treeDataGroupingCellToggle}`]: {\n flex: '0 0 28px',\n alignSelf: 'stretch',\n marginRight: vars.spacing(2)\n },\n [`& .${c.treeDataGroupingCellLoadingContainer}, .${c.groupingCriteriaCellLoadingContainer}`]: {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n height: '100%'\n },\n [`& .${c.groupingCriteriaCell}`]: {\n display: 'flex',\n alignItems: 'center',\n width: '100%'\n },\n [`& .${c.groupingCriteriaCellToggle}`]: {\n flex: '0 0 28px',\n alignSelf: 'stretch',\n marginRight: vars.spacing(2)\n },\n /* ScrollbarFiller styles */\n [`& .${c.columnHeaders} .${c.scrollbarFiller}`]: {\n backgroundColor: headerBackground\n },\n [`.${c.scrollbarFiller}`]: {\n minWidth: 'calc(var(--DataGrid-hasScrollY) * var(--DataGrid-scrollbarSize))',\n alignSelf: 'stretch',\n backgroundColor: headerBackground,\n [`&.${c['scrollbarFiller--pinnedRight']}`]: {\n position: 'sticky',\n zIndex: 40,\n // Should be above the column separator\n right: 0\n }\n },\n [`& .${c.filler}`]: {\n flex: '1 0 auto'\n },\n [`& .${c['filler--borderBottom']}`]: {\n borderBottom: '1px solid var(--DataGrid-rowBorderColor)'\n },\n [`& .${c['filler--horizontal']}`]: {\n width: 'var(--DataGrid-horizontalFiller)'\n },\n [`& .${c.columnHeaders} .${c.filler}`]: {\n backgroundColor: headerBackground\n },\n /* Used when skeleton/no columns overlay is visible */\n [`& .${c['main--hiddenContent']}`]: {\n [`& .${c.virtualScrollerRenderZone}`]: {\n // We use visibility hidden so that the virtual scroller content retains its height.\n // Position fixed is used to remove the virtual scroller content from the flow.\n // https://github.com/mui/mui-x/issues/14061\n visibility: 'hidden'\n },\n // Hide grid content\n [`& .${c.pinnedRows}`]: {\n display: 'none'\n }\n },\n /* Fill handle styles */\n [`& .${c['cell--withFillHandle']}`]: {\n position: 'relative',\n '&::after': {\n content: '\"\"',\n position: 'absolute',\n bottom: 0,\n insetInlineEnd: 0,\n width: 7,\n height: 7,\n backgroundColor: vars.colors.interactive.focus,\n cursor: 'crosshair',\n zIndex: 50\n }\n },\n [`& .${c['cell--fillPreview']}`]: {\n backgroundColor: `color-mix(in srgb, ${vars.colors.interactive.focus} 8%, transparent)`\n },\n [`& .${c['cell--fillPreviewTop']}`]: {\n borderTop: `1px dashed ${vars.colors.interactive.focus}`\n },\n [`& .${c['cell--fillPreviewBottom']}`]: {\n borderBottom: `1px dashed ${vars.colors.interactive.focus}`\n },\n [`& .${c['cell--fillPreviewLeft']}`]: {\n borderLeft: `1px dashed ${vars.colors.interactive.focus}`\n },\n [`& .${c['cell--fillPreviewRight']}`]: {\n borderRight: `1px dashed ${vars.colors.interactive.focus}`\n },\n [`& .${c['row--beingDragged']}`]: {\n color: vars.colors.foreground.disabled,\n '&:hover': {\n backgroundColor: 'transparent'\n }\n },\n /* Controlled layout overrides (absolute positioning for pinned elements) */\n [`& .${c['virtualizer--layoutControlled']} .${c['columnHeader--pinnedLeft']},\n & .${c['virtualizer--layoutControlled']} .${c['columnHeader--pinnedRight']}`]: {\n position: 'absolute',\n height: 'var(--height)'\n },\n [`& .${c['virtualizer--layoutControlled']} .${c['cell--pinnedLeft']},\n & .${c['virtualizer--layoutControlled']} .${c['cell--pinnedRight']}`]: {\n position: 'absolute'\n },\n [`& .${c['virtualizer--layoutControlled']} .${c.row}`]: {\n position: 'static'\n },\n [`& .${c['virtualizer--layoutControlled']} .${c['scrollbarFiller--pinnedRight']}`]: {\n position: 'absolute',\n height: 'var(--height)'\n },\n [`& .${c['virtualizer--layoutControlled']} .${c.virtualScrollerRenderZone}`]: {\n position: 'static',\n width: 'fit-content'\n },\n [`& .${c['virtualizer--layoutControlled']} .${c['container--top']}`]: {\n width: 'fit-content'\n },\n [`& .${c['virtualizer--layoutControlled']} .${c['container--bottom']}`]: {\n width: 'fit-content'\n }\n };\n return gridStyle;\n});\nfunction setOpacity(color, opacity) {\n return `rgba(from ${color} r g b / ${opacity})`;\n}\nfunction removeOpacity(color) {\n return setOpacity(color, 1);\n}\nexport const supportsColorMix = typeof CSS !== 'undefined' && typeof CSS.supports === 'function' && CSS.supports('color', 'color-mix(in srgb, red 50%, blue 50%)');\nexport const colorMixIfSupported = (colorMixValue, fallback) => {\n if (!supportsColorMix) {\n return fallback;\n }\n return colorMixValue;\n};\nfunction mix(background, overlay, opacity, fallback) {\n return colorMixIfSupported(`color-mix(in srgb,${background}, ${overlay} calc(${opacity} * 100%))`, fallback);\n}","import * as React from 'react';\nimport { useTheme } from '@mui/material/styles';\nimport { hash } from '@mui/x-internals/hash';\nimport { vars } from \"../constants/cssVariables.mjs\";\nimport { colorMixIfSupported, supportsColorMix } from \"../components/containers/GridRootStyles.mjs\";\nexport function useMaterialCSSVariables() {\n const theme = useTheme();\n return React.useMemo(() => {\n const id = hash(stringifyTheme(theme));\n const variables = transformTheme(theme);\n return {\n id,\n variables\n };\n }, [theme]);\n}\nfunction transformTheme(t) {\n const borderColor = getBorderColor(t);\n const dataGridPalette = (t.vars || t).palette.DataGrid;\n const paperColor = (t.vars || t).palette.background.paper;\n const backgroundBase = dataGridPalette?.bg ?? (t.palette.mode === 'dark' ? colorMixIfSupported(`color-mix(in srgb, ${paperColor} 95%, #fff)`, paperColor) : paperColor);\n const backgroundHeader = dataGridPalette?.headerBg ?? backgroundBase;\n const backgroundPinned = dataGridPalette?.pinnedBg ?? backgroundBase;\n const backgroundBackdrop = t.alpha((t.vars || t).palette.background.default, (t.vars || t).palette.action.disabledOpacity);\n const backgroundOverlay = t.palette.mode === 'dark' ? colorMixIfSupported(`color-mix(in srgb, ${paperColor} 90%, #fff)`, paperColor) : paperColor;\n const selectedColor = (t.vars || t).palette.primary.main;\n const radius = getRadius(t);\n const fontBody = t.vars?.font?.body2 ?? formatFont(t.typography.body2);\n const fontSmall = t.vars?.font?.caption ?? formatFont(t.typography.caption);\n const fontLarge = t.vars?.font?.body1 ?? formatFont(t.typography.body1);\n const k = vars.keys;\n return {\n [k.spacingUnit]: t.vars ? t.vars.spacing ?? t.spacing(1) : t.spacing(1),\n [k.colors.border.base]: borderColor,\n [k.colors.background.base]: backgroundBase,\n [k.colors.background.overlay]: backgroundOverlay,\n [k.colors.background.backdrop]: backgroundBackdrop,\n [k.colors.foreground.base]: (t.vars || t).palette.text.primary,\n [k.colors.foreground.muted]: (t.vars || t).palette.text.secondary,\n [k.colors.foreground.accent]: (t.vars || t).palette.primary.dark,\n [k.colors.foreground.disabled]: (t.vars || t).palette.text.disabled,\n [k.colors.foreground.error]: (t.vars || t).palette.error.dark,\n [k.colors.interactive.hover]: supportsColorMix ? (t.vars || t).palette.action.hover : (t.vars || t).palette.grey[t.palette.mode === 'dark' ? 800 : 100],\n [k.colors.interactive.hoverOpacity]: (t.vars || t).palette.action.hoverOpacity,\n [k.colors.interactive.focus]: removeOpacity((t.vars || t).palette.primary.main),\n [k.colors.interactive.focusOpacity]: (t.vars || t).palette.action.focusOpacity,\n [k.colors.interactive.disabled]: removeOpacity((t.vars || t).palette.action.disabled),\n [k.colors.interactive.disabledOpacity]: (t.vars || t).palette.action.disabledOpacity,\n [k.colors.interactive.selected]: supportsColorMix ? selectedColor : (t.vars || t).palette.grey[t.palette.mode === 'dark' ? 700 : 200],\n [k.colors.interactive.selectedOpacity]: (t.vars || t).palette.action.selectedOpacity,\n [k.header.background.base]: backgroundHeader,\n [k.cell.background.pinned]: backgroundPinned,\n [k.radius.base]: radius,\n [k.typography.fontFamily.base]: t.typography.fontFamily,\n [k.typography.fontWeight.light]: t.typography.fontWeightLight,\n [k.typography.fontWeight.regular]: t.typography.fontWeightRegular,\n [k.typography.fontWeight.medium]: t.typography.fontWeightMedium,\n [k.typography.fontWeight.bold]: t.typography.fontWeightBold,\n [k.typography.font.body]: fontBody,\n [k.typography.font.small]: fontSmall,\n [k.typography.font.large]: fontLarge,\n [k.transitions.easing.easeIn]: t.transitions.easing.easeIn,\n [k.transitions.easing.easeOut]: t.transitions.easing.easeOut,\n [k.transitions.easing.easeInOut]: t.transitions.easing.easeInOut,\n [k.transitions.duration.short]: `${t.transitions.duration.shorter}ms`,\n [k.transitions.duration.base]: `${t.transitions.duration.short}ms`,\n [k.transitions.duration.long]: `${t.transitions.duration.standard}ms`,\n [k.shadows.base]: (t.vars || t).shadows[2],\n [k.shadows.overlay]: (t.vars || t).shadows[8],\n [k.zIndex.panel]: (t.vars || t).zIndex.modal,\n [k.zIndex.menu]: (t.vars || t).zIndex.modal,\n [k.zIndex.modal]: (t.vars || t).zIndex.modal\n };\n}\nfunction getRadius(theme) {\n if (theme.vars) {\n return theme.vars.shape.borderRadius;\n }\n return typeof theme.shape.borderRadius === 'number' ? `${theme.shape.borderRadius}px` : theme.shape.borderRadius;\n}\nfunction getBorderColor(theme) {\n if (theme.vars) {\n return theme.vars.palette.TableCell.border;\n }\n if (theme.palette.mode === 'light') {\n return theme.lighten(theme.alpha(theme.palette.divider, 1), 0.88);\n }\n return theme.darken(theme.alpha(theme.palette.divider, 1), 0.68);\n}\nfunction setOpacity(color, opacity) {\n return `rgba(from ${color} r g b / ${opacity})`;\n}\nfunction removeOpacity(color) {\n return setOpacity(color, 1);\n}\nfunction formatFont(font) {\n // Accounts for disabled typography variants\n // See: https://github.com/mui/mui-x/issues/17812\n if (!font) {\n return undefined;\n }\n const fontSize = typeof font.fontSize === 'number' ? `${font.fontSize}px` : font.fontSize;\n return `${font.fontWeight} ${fontSize} / ${font.lineHeight} ${font.fontFamily}`;\n}\n\n/**\n * A version of JSON.stringify for theme objects.\n * Fixes: https://github.com/mui/mui-x/issues/17521\n * Source: https://www.30secondsofcode.org/js/s/stringify-circular-json/\n */\nfunction stringifyTheme(input) {\n const seen = new WeakSet();\n return JSON.stringify(input, (_, v) => {\n // https://github.com/mui/mui-x/issues/17855\n if (typeof window !== 'undefined' && v === window || typeof document !== 'undefined' && v === document) {\n return v.toString();\n }\n if (v !== null && typeof v === 'object') {\n // Do not attempt to serialize React elements due to performance concerns.\n // Fixes https://github.com/mui/mui-x/issues/19414\n if (/*#__PURE__*/React.isValidElement(v)) {\n return null;\n }\n if (seen.has(v)) {\n return null;\n }\n seen.add(v);\n }\n return v;\n });\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"id\", \"label\", \"labelId\", \"material\", \"disabled\", \"multiple\", \"slotProps\", \"onChange\", \"onKeyDown\", \"onOpen\", \"onClose\", \"renderValue\", \"size\", \"style\", \"fullWidth\"],\n _excluded2 = [\"onRowsPerPageChange\", \"material\", \"disabled\"],\n _excluded3 = [\"material\"],\n _excluded4 = [\"autoFocus\", \"label\", \"fullWidth\", \"slotProps\", \"className\", \"material\", \"inputRef\"],\n _excluded5 = [\"material\"],\n _excluded6 = [\"material\"],\n _excluded7 = [\"material\"],\n _excluded8 = [\"material\"],\n _excluded9 = [\"material\"],\n _excluded0 = [\"material\"],\n _excluded1 = [\"material\"],\n _excluded10 = [\"material\"],\n _excluded11 = [\"material\"],\n _excluded12 = [\"material\", \"label\", \"className\"],\n _excluded13 = [\"material\"],\n _excluded14 = [\"inert\", \"iconStart\", \"iconEnd\", \"children\", \"material\"],\n _excluded15 = [\"material\"],\n _excluded16 = [\"slotProps\", \"material\"],\n _excluded17 = [\"id\", \"multiple\", \"freeSolo\", \"options\", \"getOptionLabel\", \"isOptionEqualToValue\", \"value\", \"onChange\", \"label\", \"placeholder\", \"slotProps\", \"material\"],\n _excluded18 = [\"key\"],\n _excluded19 = [\"slotProps\"],\n _excluded20 = [\"slotProps\"],\n _excluded21 = [\"slotProps\"],\n _excluded22 = [\"slotProps\", \"material\"],\n _excluded23 = [\"material\"],\n _excluded24 = [\"open\", \"children\", \"className\", \"clickAwayTouchEvent\", \"clickAwayMouseEvent\", \"flip\", \"focusTrap\", \"onExited\", \"onClickAway\", \"onDidShow\", \"onDidHide\", \"id\", \"target\", \"transition\", \"placement\", \"material\"],\n _excluded25 = [\"native\"],\n _excluded26 = [\"children\", \"value\", \"active\"],\n _excluded27 = [\"items\", \"value\", \"material\"];\nimport * as React from 'react';\nimport clsx from 'clsx';\nimport useForkRef from '@mui/utils/useForkRef';\nimport useEventCallback from '@mui/utils/useEventCallback';\nimport { styled, useTheme } from '@mui/material/styles';\nimport MUIAutocomplete from '@mui/material/Autocomplete';\nimport MUIBadge from '@mui/material/Badge';\nimport MUICheckbox from '@mui/material/Checkbox';\nimport MUIChip from '@mui/material/Chip';\nimport MUICircularProgress from '@mui/material/CircularProgress';\nimport MUIDivider from '@mui/material/Divider';\nimport MUIInputBase from '@mui/material/InputBase';\nimport MUIFocusTrap from '@mui/material/Unstable_TrapFocus';\nimport MUILinearProgress from '@mui/material/LinearProgress';\nimport MUIListItemIcon from '@mui/material/ListItemIcon';\nimport MUIListItemText, { listItemTextClasses } from '@mui/material/ListItemText';\nimport MUIMenuList from '@mui/material/MenuList';\nimport MUIMenuItem from '@mui/material/MenuItem';\nimport MUIModal from '@mui/material/Modal';\nimport MUITextField from '@mui/material/TextField';\nimport MUITextareaAutosize from '@mui/material/TextareaAutosize';\nimport MUIFormControl from '@mui/material/FormControl';\nimport MUIFormControlLabel, { formControlLabelClasses } from '@mui/material/FormControlLabel';\nimport MUISelect from '@mui/material/Select';\nimport MUISwitch from '@mui/material/Switch';\nimport MUIButton from '@mui/material/Button';\nimport MUIIconButton, { iconButtonClasses } from '@mui/material/IconButton';\nimport MUIInputAdornment, { inputAdornmentClasses } from '@mui/material/InputAdornment';\nimport MUITooltip from '@mui/material/Tooltip';\nimport MUIPagination, { tablePaginationClasses } from '@mui/material/TablePagination';\nimport MUIPopper from '@mui/material/Popper';\nimport ClickAwayListener from '@mui/material/ClickAwayListener';\nimport MUIGrow from '@mui/material/Grow';\nimport MUIPaper from '@mui/material/Paper';\nimport MUIInputLabel from '@mui/material/InputLabel';\nimport MUISkeleton from '@mui/material/Skeleton';\nimport MUITabs from '@mui/material/Tabs';\nimport MUITab from '@mui/material/Tab';\nimport MUIToggleButton from '@mui/material/ToggleButton';\nimport { forwardRef } from '@mui/x-internals/forwardRef';\nimport useId from '@mui/utils/useId';\nimport { GridAddIcon, GridArrowDownwardIcon, GridArrowUpwardIcon, GridCheckIcon, GridCloseIcon, GridUndoIcon, GridRedoIcon, GridColumnIcon, GridDragIcon, GridExpandMoreIcon, GridFilterAltIcon, GridFilterListIcon, GridKeyboardArrowRight, GridMoreVertIcon, GridRemoveIcon, GridSearchIcon, GridSeparatorIcon, GridTableRowsIcon, GridTripleDotsVerticalIcon, GridViewHeadlineIcon, GridViewStreamIcon, GridVisibilityOffIcon, GridViewColumnIcon, GridClearIcon, GridLoadIcon, GridDeleteForeverIcon, GridDownloadIcon, GridLongTextCellExpandIcon, GridLongTextCellCollapseIcon } from \"./icons/index.mjs\";\nimport { GridColumnUnsortedIcon } from \"../components/GridColumnUnsortedIcon.mjs\";\nimport { useGridApiContext } from \"../hooks/utils/useGridApiContext.mjs\";\nimport { useGridRootProps } from \"../hooks/utils/useGridRootProps.mjs\";\nimport \"./augmentation.mjs\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nexport { useMaterialCSSVariables } from \"./variables.mjs\";\n\n/* eslint-disable mui/disallow-react-api-in-server-components */\n\nconst InputAdornment = styled(MUIInputAdornment, {\n slot: 'internal'\n})(({\n theme\n}) => ({\n [`&.${inputAdornmentClasses.positionEnd} .${iconButtonClasses.sizeSmall}`]: {\n marginRight: theme.spacing(-0.75)\n }\n}));\nconst FormControlLabel = styled(MUIFormControlLabel, {\n slot: 'internal',\n shouldForwardProp: prop => prop !== 'fullWidth'\n})(({\n theme\n}) => ({\n gap: theme.spacing(0.5),\n margin: 0,\n overflow: 'hidden',\n [`& .${formControlLabelClasses.label}`]: {\n fontSize: theme.typography.pxToRem(14),\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap'\n },\n variants: [{\n props: {\n fullWidth: true\n },\n style: {\n width: '100%'\n }\n }]\n}));\nconst Checkbox = styled(MUICheckbox, {\n slot: 'internal',\n shouldForwardProp: prop => prop !== 'density'\n})(({\n theme\n}) => ({\n variants: [{\n props: {\n density: 'compact'\n },\n style: {\n padding: theme.spacing(0.5)\n }\n }]\n}));\nconst ListItemText = styled(MUIListItemText, {\n slot: 'internal'\n})({\n [`& .${listItemTextClasses.primary}`]: {\n overflowX: 'clip',\n textOverflow: 'ellipsis',\n maxWidth: '300px'\n }\n});\nconst BaseSelect = forwardRef(function BaseSelect(props, ref) {\n const {\n id,\n label,\n labelId,\n material,\n disabled,\n multiple,\n slotProps,\n onChange,\n onKeyDown,\n onOpen,\n onClose,\n renderValue,\n size,\n style,\n fullWidth\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const theme = useTheme();\n const textFieldDefaults = theme.components?.MuiTextField?.defaultProps ?? {};\n const computedSize = size ?? textFieldDefaults.size;\n const computedVariant = textFieldDefaults.variant ?? 'outlined';\n const menuProps = {\n slotProps: {\n paper: {\n onKeyDown\n }\n }\n };\n if (onClose) {\n menuProps.onClose = onClose;\n }\n return /*#__PURE__*/_jsxs(MUIFormControl, {\n size: computedSize,\n fullWidth: fullWidth,\n style: style,\n disabled: disabled,\n ref: ref,\n children: [/*#__PURE__*/_jsx(MUIInputLabel, {\n id: labelId,\n htmlFor: id,\n shrink: true,\n variant: computedVariant,\n children: label\n }), /*#__PURE__*/_jsx(MUISelect, _extends({\n id: id,\n labelId: labelId,\n label: label,\n displayEmpty: true,\n multiple: multiple,\n onChange: onChange,\n renderValue: renderValue,\n variant: computedVariant\n }, other, {\n inputProps: slotProps?.htmlInput,\n onOpen: onOpen,\n MenuProps: menuProps,\n size: computedSize\n }, material))]\n });\n});\nif (process.env.NODE_ENV !== \"production\") BaseSelect.displayName = \"BaseSelect\";\nconst StyledPagination = styled(MUIPagination, {\n slot: 'internal'\n})(({\n theme\n}) => ({\n [`& .${tablePaginationClasses.selectLabel}`]: {\n display: 'none',\n [theme.breakpoints.up('sm')]: {\n display: 'block'\n }\n },\n [`& .${tablePaginationClasses.input}`]: {\n display: 'none',\n [theme.breakpoints.up('sm')]: {\n display: 'inline-flex'\n }\n }\n}));\nconst BasePagination = forwardRef(function BasePagination(props, ref) {\n const {\n onRowsPerPageChange,\n material,\n disabled\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded2);\n const computedProps = React.useMemo(() => {\n if (!disabled) {\n return undefined;\n }\n return {\n slotProps: {\n actions: {\n previousButton: {\n disabled: true\n },\n nextButton: {\n disabled: true\n }\n }\n }\n };\n }, [disabled]);\n const apiRef = useGridApiContext();\n const rootProps = useGridRootProps();\n const {\n estimatedRowCount\n } = rootProps;\n return /*#__PURE__*/_jsx(StyledPagination, _extends({\n component: \"div\",\n onRowsPerPageChange: useEventCallback(event => {\n onRowsPerPageChange?.(Number(event.target.value));\n }),\n labelRowsPerPage: apiRef.current.getLocaleText('paginationRowsPerPage'),\n labelDisplayedRows: params => apiRef.current.getLocaleText('paginationDisplayedRows')(_extends({}, params, {\n estimated: estimatedRowCount\n })),\n getItemAriaLabel: apiRef.current.getLocaleText('paginationItemAriaLabel')\n }, computedProps, other, material, {\n ref: ref\n }));\n});\nif (process.env.NODE_ENV !== \"production\") BasePagination.displayName = \"BasePagination\";\nconst BaseBadge = forwardRef(function BaseBadge(props, ref) {\n const {\n material\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded3);\n return /*#__PURE__*/_jsx(MUIBadge, _extends({}, other, material, {\n ref: ref\n }));\n});\nif (process.env.NODE_ENV !== \"production\") BaseBadge.displayName = \"BaseBadge\";\nconst BaseCheckbox = forwardRef(function BaseCheckbox(props, ref) {\n const {\n autoFocus,\n label,\n fullWidth,\n slotProps,\n className,\n material,\n inputRef\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded4);\n const elementRef = React.useRef(null);\n const handleRef = useForkRef(elementRef, ref);\n const rippleRef = React.useRef(null);\n const combinedInputRef = useForkRef(inputRef, slotProps?.htmlInput?.ref, material?.slotProps?.input?.ref);\n React.useEffect(() => {\n if (autoFocus) {\n const input = elementRef.current?.querySelector('input');\n input?.focus({\n preventScroll: true\n });\n } else if (autoFocus === false && rippleRef.current) {\n // Only available in @mui/material v5.4.1 or later\n // @ts-ignore\n rippleRef.current.stop({});\n }\n }, [autoFocus]);\n const checkboxSlotProps = React.useMemo(() => _extends({}, material?.slotProps, {\n input: _extends({}, material?.slotProps?.input, slotProps?.htmlInput, {\n ref: combinedInputRef\n })\n }), [material?.slotProps, slotProps?.htmlInput, combinedInputRef]);\n if (!label) {\n return /*#__PURE__*/_jsx(Checkbox, _extends({}, other, material, {\n className: clsx(className, material?.className),\n slotProps: checkboxSlotProps,\n ref: handleRef,\n touchRippleRef: rippleRef\n }));\n }\n return /*#__PURE__*/_jsx(FormControlLabel, {\n className: className,\n control: /*#__PURE__*/_jsx(Checkbox, _extends({}, other, material, {\n slotProps: checkboxSlotProps,\n ref: handleRef,\n touchRippleRef: rippleRef\n })),\n label: label,\n fullWidth: fullWidth\n });\n});\nif (process.env.NODE_ENV !== \"production\") BaseCheckbox.displayName = \"BaseCheckbox\";\nconst BaseCircularProgress = forwardRef(function BaseCircularProgress(props, ref) {\n const {\n material\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded5);\n return /*#__PURE__*/_jsx(MUICircularProgress, _extends({}, other, material, {\n ref: ref\n }));\n});\nif (process.env.NODE_ENV !== \"production\") BaseCircularProgress.displayName = \"BaseCircularProgress\";\nconst BaseDivider = forwardRef(function BaseDivider(props, ref) {\n const {\n material\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded6);\n return /*#__PURE__*/_jsx(MUIDivider, _extends({}, other, material, {\n ref: ref\n }));\n});\nif (process.env.NODE_ENV !== \"production\") BaseDivider.displayName = \"BaseDivider\";\nconst BaseLinearProgress = forwardRef(function BaseLinearProgress(props, ref) {\n const {\n material\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded7);\n return /*#__PURE__*/_jsx(MUILinearProgress, _extends({}, other, material, {\n ref: ref\n }));\n});\nif (process.env.NODE_ENV !== \"production\") BaseLinearProgress.displayName = \"BaseLinearProgress\";\nconst BaseButton = forwardRef(function BaseButton(props, ref) {\n const {\n material\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded8);\n return /*#__PURE__*/_jsx(MUIButton, _extends({}, other, material, {\n ref: ref\n }));\n});\nif (process.env.NODE_ENV !== \"production\") BaseButton.displayName = \"BaseButton\";\nconst StyledToggleButton = styled(MUIToggleButton, {\n slot: 'internal'\n})(({\n theme\n}) => ({\n gap: theme.spacing(1),\n border: 0\n}));\nconst BaseToggleButton = forwardRef(function BaseToggleButton(props, ref) {\n const {\n material\n } = props,\n rest = _objectWithoutPropertiesLoose(props, _excluded9);\n return /*#__PURE__*/_jsx(StyledToggleButton, _extends({\n size: \"small\",\n color: \"primary\"\n }, rest, material, {\n ref: ref\n }));\n});\nif (process.env.NODE_ENV !== \"production\") BaseToggleButton.displayName = \"BaseToggleButton\";\nconst BaseChip = forwardRef(function BaseChip(props, ref) {\n const {\n material\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded0);\n return /*#__PURE__*/_jsx(MUIChip, _extends({}, other, material, {\n ref: ref\n }));\n});\nif (process.env.NODE_ENV !== \"production\") BaseChip.displayName = \"BaseChip\";\nconst BaseIconButton = forwardRef(function BaseIconButton(props, ref) {\n const {\n material\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded1);\n return /*#__PURE__*/_jsx(MUIIconButton, _extends({}, other, material, {\n ref: ref\n }));\n});\nif (process.env.NODE_ENV !== \"production\") BaseIconButton.displayName = \"BaseIconButton\";\nconst BaseTooltip = forwardRef(function BaseTooltip(props, ref) {\n const {\n material\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded10);\n return /*#__PURE__*/_jsx(MUITooltip, _extends({}, other, material, {\n ref: ref\n }));\n});\nif (process.env.NODE_ENV !== \"production\") BaseTooltip.displayName = \"BaseTooltip\";\nconst BaseSkeleton = forwardRef(function BaseSkeleton(props, ref) {\n const {\n material\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded11);\n return /*#__PURE__*/_jsx(MUISkeleton, _extends({}, other, material, {\n ref: ref\n }));\n});\nif (process.env.NODE_ENV !== \"production\") BaseSkeleton.displayName = \"BaseSkeleton\";\nconst BaseSwitch = forwardRef(function BaseSwitch(props, ref) {\n const {\n material,\n label,\n className\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded12);\n if (!label) {\n return /*#__PURE__*/_jsx(MUISwitch, _extends({}, other, material, {\n className: className,\n ref: ref\n }));\n }\n return /*#__PURE__*/_jsx(FormControlLabel, {\n className: className,\n control: /*#__PURE__*/_jsx(MUISwitch, _extends({}, other, material, {\n ref: ref\n })),\n label: label\n });\n});\nif (process.env.NODE_ENV !== \"production\") BaseSwitch.displayName = \"BaseSwitch\";\nconst BaseMenuList = forwardRef(function BaseMenuList(props, ref) {\n const {\n material\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded13);\n return /*#__PURE__*/_jsx(MUIMenuList, _extends({}, other, material, {\n ref: ref\n }));\n});\nif (process.env.NODE_ENV !== \"production\") BaseMenuList.displayName = \"BaseMenuList\";\nfunction BaseMenuItem(props) {\n const {\n inert,\n iconStart,\n iconEnd,\n children,\n material\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded14);\n if (inert) {\n other.disableRipple = true;\n }\n return /*#__PURE__*/React.createElement(MUIMenuItem, _extends({}, other, material), [iconStart && /*#__PURE__*/_jsx(MUIListItemIcon, {\n children: iconStart\n }, \"1\"), /*#__PURE__*/_jsx(ListItemText, {\n children: children\n }, \"2\"), iconEnd && /*#__PURE__*/_jsx(MUIListItemIcon, {\n children: iconEnd\n }, \"3\")]);\n}\nfunction BaseModal(props) {\n const {\n material\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded15);\n return /*#__PURE__*/_jsx(MUIModal, _extends({}, other, material));\n}\nfunction BaseTextField(props) {\n const {\n slotProps,\n material\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded16);\n const theme = useTheme();\n const textFieldDefaults = theme.components?.MuiTextField?.defaultProps ?? {};\n const computedVariant = other.variant ?? textFieldDefaults.variant ?? 'outlined';\n const computedSize = other.size ?? textFieldDefaults.size;\n return /*#__PURE__*/_jsx(MUITextField, _extends({\n variant: computedVariant,\n size: computedSize\n }, other, material, {\n slotProps: {\n htmlInput: slotProps?.htmlInput,\n input: transformInputProps(slotProps?.input),\n inputLabel: _extends({\n shrink: true\n }, slotProps?.inputLabel)\n }\n }));\n}\nfunction BaseAutocomplete(props) {\n const rootProps = useGridRootProps();\n const {\n id,\n multiple,\n freeSolo,\n options,\n getOptionLabel,\n isOptionEqualToValue,\n value,\n onChange,\n label,\n placeholder,\n slotProps,\n material\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded17);\n return /*#__PURE__*/_jsx(MUIAutocomplete, _extends({\n id: id,\n multiple: multiple,\n freeSolo: freeSolo,\n options: options,\n getOptionLabel: getOptionLabel,\n isOptionEqualToValue: isOptionEqualToValue,\n value: value,\n onChange: onChange,\n renderValue: (currentValue, getTagProps) => currentValue.map((option, index) => {\n const _getTagProps = getTagProps({\n index\n }),\n {\n key\n } = _getTagProps,\n tagProps = _objectWithoutPropertiesLoose(_getTagProps, _excluded18);\n return /*#__PURE__*/_jsx(MUIChip, _extends({\n variant: \"outlined\",\n size: \"small\",\n label: typeof option === 'string' ? option : getOptionLabel?.(option)\n }, tagProps, typeof slotProps?.chip === 'function' ? slotProps.chip(option, index) : slotProps?.chip), key);\n }),\n renderInput: params => {\n const {\n slotProps: autocompleteSlotProps\n } = params,\n inputRest = _objectWithoutPropertiesLoose(params, _excluded19);\n const _ref = slotProps?.textField ?? {},\n {\n slotProps: textFieldSlotProps\n } = _ref,\n textFieldRest = _objectWithoutPropertiesLoose(_ref, _excluded20);\n const _ref2 = rootProps.slotProps?.baseTextField ?? {},\n {\n slotProps: baseTextFieldSlotProps\n } = _ref2,\n baseTextFieldRest = _objectWithoutPropertiesLoose(_ref2, _excluded21);\n return /*#__PURE__*/_jsx(MUITextField, _extends({}, inputRest, {\n label: label,\n placeholder: placeholder\n }, textFieldRest, baseTextFieldRest, {\n slotProps: {\n htmlInput: _extends({}, autocompleteSlotProps.htmlInput, textFieldSlotProps?.htmlInput, baseTextFieldSlotProps?.htmlInput),\n input: _extends({}, transformInputProps(autocompleteSlotProps.input, false), textFieldSlotProps?.input, baseTextFieldSlotProps?.input),\n inputLabel: _extends({\n shrink: true\n }, autocompleteSlotProps.inputLabel, textFieldSlotProps?.inputLabel, baseTextFieldSlotProps?.inputLabel)\n }\n }));\n }\n }, other, material));\n}\nfunction BaseInput(props) {\n return /*#__PURE__*/_jsx(MUIInputBase, _extends({}, transformInputProps(props)));\n}\nfunction transformInputProps(props, wrapAdornments = true) {\n if (!props) {\n return undefined;\n }\n const {\n slotProps,\n material\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded22);\n const result = other;\n if (wrapAdornments) {\n if (result.startAdornment) {\n result.startAdornment = /*#__PURE__*/_jsx(InputAdornment, {\n position: \"start\",\n children: result.startAdornment\n });\n }\n if (result.endAdornment) {\n result.endAdornment = /*#__PURE__*/_jsx(InputAdornment, {\n position: \"end\",\n children: result.endAdornment\n });\n }\n }\n for (const k in material) {\n if (Object.hasOwn(material, k)) {\n result[k] = material[k];\n }\n }\n if (slotProps?.htmlInput) {\n if (result.inputProps) {\n result.inputProps = _extends({}, result.inputProps, slotProps?.htmlInput);\n } else {\n result.inputProps = slotProps?.htmlInput;\n }\n }\n return result;\n}\nconst BaseTextarea = forwardRef(function BaseTextarea(props, ref) {\n const {\n material\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded23);\n return /*#__PURE__*/_jsx(MUITextareaAutosize, _extends({}, other, material, {\n ref: ref\n }));\n});\nif (process.env.NODE_ENV !== \"production\") BaseTextarea.displayName = \"BaseTextarea\";\nconst transformOrigin = {\n 'bottom-start': 'top left',\n 'bottom-end': 'top right'\n};\nconst BasePopper = forwardRef(function BasePopper(props, ref) {\n const {\n open,\n children,\n className,\n flip,\n onExited,\n onDidShow,\n onDidHide,\n id,\n target,\n transition,\n placement,\n material\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded24);\n const modifiers = React.useMemo(() => {\n const result = [{\n name: 'preventOverflow',\n options: {\n padding: 8\n }\n }];\n if (flip) {\n result.push({\n name: 'flip',\n enabled: true\n });\n }\n if (onDidShow || onDidHide) {\n result.push({\n name: 'isPlaced',\n enabled: true,\n phase: 'main',\n fn: () => {\n onDidShow?.();\n },\n effect: () => () => {\n onDidHide?.();\n }\n });\n }\n return result;\n }, [flip, onDidShow, onDidHide]);\n let content;\n if (!transition) {\n content = wrappers(props, children);\n } else {\n const handleExited = popperOnExited => node => {\n if (popperOnExited) {\n popperOnExited();\n }\n if (onExited) {\n onExited(node);\n }\n };\n content = p => wrappers(props, /*#__PURE__*/_jsx(MUIGrow, _extends({}, p.TransitionProps, {\n style: {\n transformOrigin: transformOrigin[p.placement]\n },\n onExited: handleExited(p.TransitionProps?.onExited),\n children: /*#__PURE__*/_jsx(MUIPaper, {\n children: children\n })\n })));\n }\n return /*#__PURE__*/_jsx(MUIPopper, _extends({\n id: id,\n className: className,\n open: open,\n anchorEl: target,\n transition: transition,\n placement: placement,\n modifiers: modifiers\n }, other, material, {\n ref: ref,\n children: content\n }));\n});\nif (process.env.NODE_ENV !== \"production\") BasePopper.displayName = \"BasePopper\";\nfunction wrappers(props, content) {\n return focusTrapWrapper(props, clickAwayWrapper(props, content));\n}\nfunction clickAwayWrapper(props, content) {\n if (props.onClickAway === undefined) {\n return content;\n }\n return /*#__PURE__*/_jsx(ClickAwayListener, {\n onClickAway: props.onClickAway,\n touchEvent: props.clickAwayTouchEvent,\n mouseEvent: props.clickAwayMouseEvent,\n children: content\n });\n}\nfunction focusTrapWrapper(props, content) {\n if (props.focusTrap === undefined) {\n return content;\n }\n return /*#__PURE__*/_jsx(MUIFocusTrap, {\n open: true,\n disableEnforceFocus: true,\n disableAutoFocus: true,\n children: /*#__PURE__*/_jsx(\"div\", {\n tabIndex: -1,\n children: content\n })\n });\n}\nfunction BaseSelectOption(_ref3) {\n let {\n native\n } = _ref3,\n props = _objectWithoutPropertiesLoose(_ref3, _excluded25);\n if (native) {\n return /*#__PURE__*/_jsx(\"option\", _extends({}, props));\n }\n return /*#__PURE__*/_jsx(MUIMenuItem, _extends({}, props));\n}\nconst StyledTabs = styled(MUITabs, {\n name: 'MuiDataGrid',\n slot: 'Tabs'\n})(({\n theme\n}) => ({\n borderBottom: `1px solid ${(theme.vars || theme).palette.divider}`\n}));\nconst StyledTab = styled(MUITab, {\n name: 'MuiDataGrid',\n slot: 'Tab'\n})({\n flex: 1,\n minWidth: 'fit-content'\n});\nconst StyledTabPanel = styled('div', {\n name: 'MuiDataGrid',\n slot: 'TabPanel'\n})({\n flex: 1,\n display: 'flex',\n flexDirection: 'column',\n overflow: 'hidden'\n});\nfunction TabPanel(props) {\n const {\n children,\n active\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded26);\n return /*#__PURE__*/_jsx(StyledTabPanel, _extends({\n role: \"tabpanel\",\n style: {\n display: active ? 'flex' : 'none'\n }\n }, other, {\n children: children\n }));\n}\nfunction BaseTabs(_ref4) {\n let {\n items,\n value,\n material\n } = _ref4,\n props = _objectWithoutPropertiesLoose(_ref4, _excluded27);\n const id = useId();\n const labelId = `${id}-tab-${value}`;\n const panelId = `${id}-tabpanel-${value}`;\n return /*#__PURE__*/_jsxs(React.Fragment, {\n children: [/*#__PURE__*/_jsx(StyledTabs, _extends({}, props, {\n value: value,\n variant: \"scrollable\",\n scrollButtons: \"auto\"\n }, material, {\n children: items.map(item => /*#__PURE__*/_jsx(StyledTab, {\n value: item.value,\n label: item.label,\n id: labelId,\n \"aria-controls\": panelId\n }, item.value))\n })), items.map(item => /*#__PURE__*/_jsx(TabPanel, {\n value: item.value,\n active: value === item.value,\n id: panelId,\n \"aria-labelledby\": labelId,\n children: item.children\n }, item.value))]\n });\n}\nconst iconSlots = {\n booleanCellTrueIcon: GridCheckIcon,\n booleanCellFalseIcon: GridCloseIcon,\n columnMenuIcon: GridTripleDotsVerticalIcon,\n openFilterButtonIcon: GridFilterListIcon,\n filterPanelDeleteIcon: GridCloseIcon,\n undoIcon: GridUndoIcon,\n redoIcon: GridRedoIcon,\n columnFilteredIcon: GridFilterAltIcon,\n columnSelectorIcon: GridColumnIcon,\n columnUnsortedIcon: GridColumnUnsortedIcon,\n columnSortedAscendingIcon: GridArrowUpwardIcon,\n columnSortedDescendingIcon: GridArrowDownwardIcon,\n columnResizeIcon: GridSeparatorIcon,\n densityCompactIcon: GridViewHeadlineIcon,\n densityStandardIcon: GridTableRowsIcon,\n densityComfortableIcon: GridViewStreamIcon,\n exportIcon: GridDownloadIcon,\n moreActionsIcon: GridMoreVertIcon,\n treeDataCollapseIcon: GridExpandMoreIcon,\n treeDataExpandIcon: GridKeyboardArrowRight,\n groupingCriteriaCollapseIcon: GridExpandMoreIcon,\n groupingCriteriaExpandIcon: GridKeyboardArrowRight,\n detailPanelExpandIcon: GridAddIcon,\n detailPanelCollapseIcon: GridRemoveIcon,\n rowReorderIcon: GridDragIcon,\n quickFilterIcon: GridSearchIcon,\n quickFilterClearIcon: GridClearIcon,\n columnMenuHideIcon: GridVisibilityOffIcon,\n columnMenuSortAscendingIcon: GridArrowUpwardIcon,\n columnMenuSortDescendingIcon: GridArrowDownwardIcon,\n columnMenuUnsortIcon: null,\n columnMenuFilterIcon: GridFilterAltIcon,\n columnMenuManageColumnsIcon: GridViewColumnIcon,\n columnMenuClearIcon: GridClearIcon,\n loadIcon: GridLoadIcon,\n filterPanelAddIcon: GridAddIcon,\n filterPanelRemoveAllIcon: GridDeleteForeverIcon,\n columnReorderIcon: GridDragIcon,\n menuItemCheckIcon: GridCheckIcon,\n longTextCellExpandIcon: GridLongTextCellExpandIcon,\n longTextCellCollapseIcon: GridLongTextCellCollapseIcon\n};\nconst baseSlots = {\n baseAutocomplete: BaseAutocomplete,\n baseBadge: BaseBadge,\n baseCheckbox: BaseCheckbox,\n baseChip: BaseChip,\n baseCircularProgress: BaseCircularProgress,\n baseDivider: BaseDivider,\n baseInput: BaseInput,\n baseTextarea: BaseTextarea,\n baseLinearProgress: BaseLinearProgress,\n baseMenuList: BaseMenuList,\n baseMenuItem: BaseMenuItem,\n baseModal: BaseModal,\n baseTextField: BaseTextField,\n baseButton: BaseButton,\n baseIconButton: BaseIconButton,\n baseToggleButton: BaseToggleButton,\n baseTooltip: BaseTooltip,\n baseTabs: BaseTabs,\n basePagination: BasePagination,\n basePopper: BasePopper,\n baseSelect: BaseSelect,\n baseSelectOption: BaseSelectOption,\n baseSkeleton: BaseSkeleton,\n baseSwitch: BaseSwitch\n};\nconst materialSlots = _extends({}, baseSlots, iconSlots);\nexport default materialSlots;","'use client';\n\nimport * as React from 'react';\n/**\n * Hook that instantiate a [[GridApiRef]].\n */\nexport const useGridApiRef = () => React.useRef(null);","// iOS/iPadOS WebKit browsers\n// Check support status at: https://developer.apple.com/library/archive/documentation/AppleApplications/Reference/SafariCSSRef/Articles/StandardCSSProperties.html\nexport const iOSMediaQuery = '@supports (-webkit-touch-callout: none)';","/* eslint-disable @typescript-eslint/no-redeclare */\n\nexport const Size = {\n EMPTY: {\n width: 0,\n height: 0\n },\n equals: (a, b) => a.width === b.width && a.height === b.height\n};\n\n// TODO\n\nexport const PinnedRows = {\n EMPTY: {\n top: [],\n bottom: []\n }\n};\nexport const PinnedColumns = {\n EMPTY: {\n left: [],\n right: []\n }\n};\nexport const ScrollPosition = {\n EMPTY: {\n top: 0,\n left: 0\n },\n equals: (a, b) => a.top === b.top && a.left === b.left\n};\nexport let ScrollDirection = /*#__PURE__*/function (ScrollDirection) {\n ScrollDirection[ScrollDirection[\"NONE\"] = 0] = \"NONE\";\n ScrollDirection[ScrollDirection[\"UP\"] = 1] = \"UP\";\n ScrollDirection[ScrollDirection[\"DOWN\"] = 2] = \"DOWN\";\n ScrollDirection[ScrollDirection[\"LEFT\"] = 3] = \"LEFT\";\n ScrollDirection[ScrollDirection[\"RIGHT\"] = 4] = \"RIGHT\";\n return ScrollDirection;\n}({});\n(function (_ScrollDirection) {\n function forDelta(dx, dy) {\n if (dx === 0 && dy === 0) {\n return ScrollDirection.NONE;\n }\n /* eslint-disable */\n if (Math.abs(dy) >= Math.abs(dx)) {\n if (dy > 0) {\n return ScrollDirection.DOWN;\n } else {\n return ScrollDirection.UP;\n }\n } else {\n if (dx > 0) {\n return ScrollDirection.RIGHT;\n } else {\n return ScrollDirection.LEFT;\n }\n }\n /* eslint-enable */\n }\n _ScrollDirection.forDelta = forDelta;\n})(ScrollDirection || (ScrollDirection = {}));","import useEventCallback from '@mui/utils/useEventCallback';\n\n/* eslint-disable import/export, @typescript-eslint/no-redeclare */\n\nconst selectors = {};\nexport const Colspan = {\n initialize: initializeState,\n use: useColspan,\n selectors\n};\nfunction initializeState(_params) {\n return {\n colspanMap: new Map()\n };\n}\nfunction useColspan(store, params, api) {\n const getColspan = params.colspan?.getColspan;\n const resetColSpan = () => {\n store.state.colspanMap = new Map();\n };\n const getCellColSpanInfo = (rowId, columnIndex) => {\n return store.state.colspanMap.get(rowId)?.[columnIndex];\n };\n\n // Calculate `colSpan` for each cell in the row\n const calculateColSpan = useEventCallback(getColspan ? (rowId, minFirstColumn, maxLastColumn, columns) => {\n for (let i = minFirstColumn; i < maxLastColumn; i += 1) {\n const cellProps = calculateCellColSpan(store.state.colspanMap, i, rowId, minFirstColumn, maxLastColumn, columns, getColspan);\n if (cellProps.colSpan > 1) {\n i += cellProps.colSpan - 1;\n }\n }\n } : () => {});\n api.calculateColSpan = calculateColSpan;\n return {\n resetColSpan,\n getCellColSpanInfo,\n calculateColSpan\n };\n}\nfunction calculateCellColSpan(lookup, columnIndex, rowId, minFirstColumnIndex, maxLastColumnIndex, columns, getColspan) {\n const columnsLength = columns.length;\n const column = columns[columnIndex];\n const colSpan = getColspan(rowId, column, columnIndex);\n if (!colSpan || colSpan === 1) {\n setCellColSpanInfo(lookup, rowId, columnIndex, {\n spannedByColSpan: false,\n cellProps: {\n colSpan: 1,\n width: column.computedWidth\n }\n });\n return {\n colSpan: 1\n };\n }\n let width = column.computedWidth;\n for (let j = 1; j < colSpan; j += 1) {\n const nextColumnIndex = columnIndex + j;\n // Cells should be spanned only within their column section (left-pinned, right-pinned and unpinned).\n if (nextColumnIndex >= minFirstColumnIndex && nextColumnIndex < maxLastColumnIndex) {\n const nextColumn = columns[nextColumnIndex];\n width += nextColumn.computedWidth;\n setCellColSpanInfo(lookup, rowId, columnIndex + j, {\n spannedByColSpan: true,\n rightVisibleCellIndex: Math.min(columnIndex + colSpan, columnsLength - 1),\n leftVisibleCellIndex: columnIndex\n });\n }\n setCellColSpanInfo(lookup, rowId, columnIndex, {\n spannedByColSpan: false,\n cellProps: {\n colSpan,\n width\n }\n });\n }\n return {\n colSpan\n };\n}\nfunction setCellColSpanInfo(colspanMap, rowId, columnIndex, cellColSpanInfo) {\n let columnInfo = colspanMap.get(rowId);\n if (!columnInfo) {\n columnInfo = {};\n colspanMap.set(rowId, columnInfo);\n }\n columnInfo[columnIndex] = cellColSpanInfo;\n}","export function throttle(func, wait = 166) {\n let timeout;\n let lastArgs;\n const later = () => {\n timeout = undefined;\n func(...lastArgs);\n };\n function throttled(...args) {\n lastArgs = args;\n if (timeout === undefined) {\n timeout = setTimeout(later, wait);\n }\n }\n throttled.clear = () => {\n clearTimeout(timeout);\n timeout = undefined;\n };\n return throttled;\n}","/**\n * Based on `fast-deep-equal`\n *\n * MIT License\n *\n * Copyright (c) 2017 Evgeny Poberezkin\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\n\n/**\n * Check if two values are deeply equal.\n */\n\nexport function isDeepEqual(a, b) {\n if (a === b) {\n return true;\n }\n if (a && b && typeof a === 'object' && typeof b === 'object') {\n if (a.constructor !== b.constructor) {\n return false;\n }\n if (Array.isArray(a)) {\n const length = a.length;\n if (length !== b.length) {\n return false;\n }\n for (let i = 0; i < length; i += 1) {\n if (!isDeepEqual(a[i], b[i])) {\n return false;\n }\n }\n return true;\n }\n if (a instanceof Map && b instanceof Map) {\n if (a.size !== b.size) {\n return false;\n }\n const entriesA = Array.from(a.entries());\n for (let i = 0; i < entriesA.length; i += 1) {\n if (!b.has(entriesA[i][0])) {\n return false;\n }\n }\n for (let i = 0; i < entriesA.length; i += 1) {\n const entryA = entriesA[i];\n if (!isDeepEqual(entryA[1], b.get(entryA[0]))) {\n return false;\n }\n }\n return true;\n }\n if (a instanceof Set && b instanceof Set) {\n if (a.size !== b.size) {\n return false;\n }\n const entries = Array.from(a.entries());\n for (let i = 0; i < entries.length; i += 1) {\n if (!b.has(entries[i][0])) {\n return false;\n }\n }\n return true;\n }\n if (ArrayBuffer.isView(a) && ArrayBuffer.isView(b)) {\n const length = a.length;\n if (length !== b.length) {\n return false;\n }\n for (let i = 0; i < length; i += 1) {\n if (a[i] !== b[i]) {\n return false;\n }\n }\n return true;\n }\n if (a.constructor === RegExp) {\n return a.source === b.source && a.flags === b.flags;\n }\n if (a.valueOf !== Object.prototype.valueOf) {\n return a.valueOf() === b.valueOf();\n }\n if (a.toString !== Object.prototype.toString) {\n return a.toString() === b.toString();\n }\n const keys = Object.keys(a);\n const length = keys.length;\n if (length !== Object.keys(b).length) {\n return false;\n }\n for (let i = 0; i < length; i += 1) {\n if (!Object.prototype.hasOwnProperty.call(b, keys[i])) {\n return false;\n }\n }\n for (let i = 0; i < length; i += 1) {\n const key = keys[i];\n if (!isDeepEqual(a[key], b[key])) {\n return false;\n }\n }\n return true;\n }\n\n // true if both NaN, false otherwise\n // eslint-disable-next-line no-self-compare\n return a !== a && b !== b;\n}","export function roundToDecimalPlaces(value, decimals) {\n return Math.round(value * 10 ** decimals) / 10 ** decimals;\n}","import useLazyRef from '@mui/utils/useLazyRef';\nimport useOnMount from '@mui/utils/useOnMount';\nconst noop = () => {};\n\n/**\n * An Effect implementation for the Store. This should be used for side-effects only. To\n * compute and store derived state, use `createSelectorMemoized` instead.\n */\nexport function useStoreEffect(store, selector, effect) {\n const instance = useLazyRef(initialize, {\n store,\n selector\n }).current;\n instance.effect = effect;\n useOnMount(instance.onMount);\n}\n\n// `useLazyRef` typings are incorrect, `params` should not be optional\nfunction initialize(params) {\n const {\n store,\n selector\n } = params;\n let previousState = selector(store.state);\n const instance = {\n effect: noop,\n dispose: null,\n // We want a single subscription done right away and cleared on unmount only,\n // but React triggers `useOnMount` multiple times in dev, so we need to manage\n // the subscription anyway.\n subscribe: () => {\n instance.dispose ??= store.subscribe(state => {\n const nextState = selector(state);\n if (!Object.is(previousState, nextState)) {\n const prev = previousState;\n previousState = nextState;\n instance.effect(prev, nextState);\n }\n });\n },\n onMount: () => {\n instance.subscribe();\n return () => {\n instance.dispose?.();\n instance.dispose = null;\n };\n }\n };\n instance.subscribe();\n return instance;\n}","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport ownerDocument from '@mui/utils/ownerDocument';\nimport useLazyRef from '@mui/utils/useLazyRef';\nimport useLayoutEffect from '@mui/utils/useEnhancedEffect';\nimport useEventCallback from '@mui/utils/useEventCallback';\nimport { throttle } from '@mui/x-internals/throttle';\nimport { isDeepEqual } from '@mui/x-internals/isDeepEqual';\nimport { roundToDecimalPlaces } from '@mui/x-internals/math';\nimport { useStore, createSelectorMemoized } from '@mui/x-internals/store';\nimport { Size } from \"../models/index.mjs\";\n/* eslint-disable import/export, @typescript-eslint/no-redeclare */\n/* eslint-disable no-underscore-dangle */\n\n// Max time between hasScrollY flips that still counts as the same render\n// chain. Feedback loops (#20539) flip within one browser frame; user-paced\n// resize (#22510) flips are separated by ResizeObserver ticks + resizeThrottleMs.\nconst OSCILLATION_FLIP_WINDOW_MS = 100;\nconst EMPTY_DIMENSIONS = {\n isReady: false,\n root: Size.EMPTY,\n viewportOuterSize: Size.EMPTY,\n viewportInnerSize: Size.EMPTY,\n contentSize: Size.EMPTY,\n minimumSize: Size.EMPTY,\n hasScrollX: false,\n hasScrollY: false,\n scrollbarSize: 0,\n rowWidth: 0,\n rowHeight: 0,\n columnsTotalWidth: 0,\n leftPinnedWidth: 0,\n rightPinnedWidth: 0,\n topContainerHeight: 0,\n bottomContainerHeight: 0,\n autoHeight: false,\n minimalContentHeight: undefined\n};\nconst selectors = {\n rootSize: state => state.rootSize,\n dimensions: state => state.dimensions,\n rowHeight: state => state.dimensions.rowHeight,\n columnsTotalWidth: state => state.dimensions.columnsTotalWidth,\n contentHeight: state => state.dimensions.contentSize.height,\n autoHeight: state => state.dimensions.autoHeight,\n minimalContentHeight: state => state.dimensions.minimalContentHeight,\n rowsMeta: state => state.rowsMeta,\n rowPositions: state => state.rowsMeta.positions,\n columnPositions: createSelectorMemoized((_, columns) => {\n const positions = [];\n let currentPosition = 0;\n for (let i = 0; i < columns.length; i += 1) {\n positions.push(currentPosition);\n currentPosition += columns[i].computedWidth;\n }\n return positions;\n }),\n needsHorizontalScrollbar: state => state.dimensions.viewportInnerSize.width > 0 && state.dimensions.columnsTotalWidth > state.dimensions.viewportInnerSize.width,\n needsVerticalScrollbar: state => state.dimensions.viewportInnerSize.height > 0 && state.dimensions.contentSize.height > state.dimensions.viewportInnerSize.height\n};\nexport const Dimensions = {\n initialize: initializeState,\n use: useDimensions,\n selectors\n};\nfunction initializeState(params) {\n const {\n rowCount,\n rows,\n getRowHeight,\n dimensions: dimensionsParams\n } = params;\n const {\n columnsTotalWidth,\n rowHeight,\n autoHeight,\n minimalContentHeight,\n topPinnedHeight,\n bottomPinnedHeight\n } = dimensionsParams;\n\n // Calculate the initial content height and row positions so the\n // initial render gets the correct size.\n const positions = [];\n let currentPageTotalHeight = 0;\n if (getRowHeight && rows.length > 0) {\n for (let i = 0; i < rows.length; i += 1) {\n positions.push(currentPageTotalHeight);\n const height = getRowHeight(rows[i]);\n currentPageTotalHeight += typeof height === 'number' ? height : rowHeight;\n }\n } else {\n for (let i = 0; i < rowCount; i += 1) {\n positions.push(i * rowHeight);\n }\n currentPageTotalHeight = rowCount * rowHeight;\n }\n\n // Reflect the pinned zone sizes in the container heights at initialization, mirroring\n // `updateDimensions`. The pinned rows' measured height is still 0 in `rowsMeta`\n // below (pinned rows are measured later), so each container height is just its static\n // pinned size.\n const topContainerHeight = topPinnedHeight;\n const bottomContainerHeight = bottomPinnedHeight;\n const dimensions = _extends({}, EMPTY_DIMENSIONS, dimensionsParams, {\n autoHeight,\n minimalContentHeight,\n topContainerHeight,\n bottomContainerHeight,\n contentSize: {\n width: columnsTotalWidth,\n height: roundToDecimalPlaces(currentPageTotalHeight, 1)\n }\n });\n const rowsMeta = {\n currentPageTotalHeight,\n positions,\n pinnedTopRowsTotalHeight: 0,\n pinnedBottomRowsTotalHeight: 0\n };\n const rowHeights = new Map();\n return {\n rootSize: Size.EMPTY,\n dimensions,\n rowsMeta,\n rowHeights\n };\n}\nfunction useDimensions(store, params, _api) {\n const isFirstSizing = React.useRef(true);\n\n // Vertical scrollbar oscillation detector. Counts consecutive hasScrollY\n // flips with no row-height change. After 2 flips within\n // OSCILLATION_FLIP_WINDOW_MS it is a layout feedback loop, so hasScrollY is\n // forced off. The counter resets on row-height changes or when the previous\n // flip is older than the window (user-paced resize, not a loop).\n // Only vertical scrollbar can oscillate because column widths are never 'auto'.\n // https://github.com/mui/mui-x/issues/20539\n // https://github.com/mui/mui-x/issues/22510\n const scrollYOscillation = React.useRef({\n counter: 0,\n heights: {\n content: 0,\n pinnedTop: 0,\n pinnedBottom: 0\n },\n lastFlipTimestamp: 0\n });\n const {\n layout,\n dimensions: {\n rowHeight,\n columnsTotalWidth,\n leftPinnedWidth,\n rightPinnedWidth,\n topPinnedHeight,\n bottomPinnedHeight\n },\n onResize\n } = params;\n const updateDimensions = React.useCallback(firstUpdate => {\n if (firstUpdate) {\n isFirstSizing.current = false;\n }\n if (isFirstSizing.current) {\n return;\n }\n const containerNode = layout.refs.container.current;\n const rootSize = selectors.rootSize(store.state);\n const rowsMeta = selectors.rowsMeta(store.state);\n\n // All the floating point dimensions should be rounded to .1 decimal places to avoid subpixel rendering issues\n // https://github.com/mui/mui-x/issues/9550#issuecomment-1619020477\n // https://github.com/mui/mui-x/issues/15721\n // Prefer measuring on a virtual-scrollbar widget when the layout exposes\n // one, because its `scrollbar-width` / `::-webkit-scrollbar` styling may\n // differ from the rest of the document and is what actually drives the\n // size we care about for layout math.\n const scrollbarMeasurementNode = layout.refs.scrollbarVertical?.current ?? layout.refs.scrollbarHorizontal?.current ?? containerNode;\n const scrollbarSize = measureScrollbarSize(scrollbarMeasurementNode, params.dimensions.scrollbarSize);\n const topContainerHeight = topPinnedHeight + rowsMeta.pinnedTopRowsTotalHeight;\n const bottomContainerHeight = bottomPinnedHeight + rowsMeta.pinnedBottomRowsTotalHeight;\n const contentSize = {\n width: columnsTotalWidth,\n height: roundToDecimalPlaces(rowsMeta.currentPageTotalHeight, 1)\n };\n const prevDimensions = store.state.dimensions;\n let viewportOuterSize;\n let viewportInnerSize;\n let hasScrollX = false;\n let hasScrollY = false;\n if (params.dimensions.autoHeight) {\n hasScrollY = false;\n hasScrollX = Math.round(columnsTotalWidth) > Math.round(rootSize.width);\n viewportOuterSize = {\n width: rootSize.width,\n height: topContainerHeight + bottomContainerHeight + contentSize.height\n };\n viewportInnerSize = {\n width: Math.max(0, viewportOuterSize.width - (hasScrollY ? scrollbarSize : 0)),\n height: Math.max(0, viewportOuterSize.height - (hasScrollX ? scrollbarSize : 0))\n };\n } else {\n viewportOuterSize = {\n width: rootSize.width,\n height: rootSize.height\n };\n viewportInnerSize = {\n width: Math.max(0, viewportOuterSize.width),\n height: Math.max(0, viewportOuterSize.height - topContainerHeight - bottomContainerHeight)\n };\n const content = contentSize;\n const container = viewportInnerSize;\n const hasScrollXIfNoYScrollBar = content.width > container.width;\n const hasScrollYIfNoXScrollBar = content.height > container.height;\n if (hasScrollXIfNoYScrollBar || hasScrollYIfNoXScrollBar) {\n hasScrollY = hasScrollYIfNoXScrollBar;\n hasScrollX = content.width + (hasScrollY ? scrollbarSize : 0) > container.width;\n\n // We recalculate the scroll y to consider the size of the x scrollbar.\n if (hasScrollX) {\n hasScrollY = content.height + scrollbarSize > container.height;\n }\n }\n\n // Detect vertical scrollbar oscillation — caused by stale rootSize or\n // the horizontal scrollbar's height cascading. See scrollYOscillation.\n {\n const osc = scrollYOscillation.current;\n const heightsChanged = rowsMeta.currentPageTotalHeight !== osc.heights.content || rowsMeta.pinnedTopRowsTotalHeight !== osc.heights.pinnedTop || rowsMeta.pinnedBottomRowsTotalHeight !== osc.heights.pinnedBottom;\n if (heightsChanged) {\n osc.counter = 0;\n osc.heights = {\n content: rowsMeta.currentPageTotalHeight,\n pinnedTop: rowsMeta.pinnedTopRowsTotalHeight,\n pinnedBottom: rowsMeta.pinnedBottomRowsTotalHeight\n };\n }\n if (prevDimensions.isReady && hasScrollY !== prevDimensions.hasScrollY) {\n // performance.now is monotonic; Date.now can jump (NTP, clock change).\n const now = performance.now();\n if (now - osc.lastFlipTimestamp > OSCILLATION_FLIP_WINDOW_MS) {\n osc.counter = 0;\n }\n osc.lastFlipTimestamp = now;\n if (!heightsChanged) {\n osc.counter += 1;\n }\n if (osc.counter >= 2) {\n hasScrollY = false;\n // Recompute hasScrollX without the vertical scrollbar's width impact,\n // otherwise the cascade (hasScrollY → narrower viewport → hasScrollX)\n // keeps the horizontal scrollbar/filler alive and the root keeps resizing.\n hasScrollX = hasScrollXIfNoYScrollBar;\n }\n }\n }\n if (hasScrollY) {\n viewportInnerSize.width -= scrollbarSize;\n }\n if (hasScrollX) {\n viewportInnerSize.height -= scrollbarSize;\n }\n }\n if (params.disableHorizontalScroll) {\n hasScrollX = false;\n }\n if (params.disableVerticalScroll) {\n hasScrollY = false;\n }\n const rowWidth = Math.max(viewportOuterSize.width, columnsTotalWidth + (hasScrollY ? scrollbarSize : 0));\n const minimumSize = {\n width: columnsTotalWidth,\n height: topContainerHeight + contentSize.height + bottomContainerHeight\n };\n const newDimensions = {\n isReady: true,\n root: rootSize,\n viewportOuterSize,\n viewportInnerSize,\n contentSize,\n minimumSize,\n hasScrollX,\n hasScrollY,\n scrollbarSize,\n rowWidth,\n rowHeight,\n columnsTotalWidth,\n leftPinnedWidth,\n rightPinnedWidth,\n topContainerHeight,\n bottomContainerHeight,\n autoHeight: params.dimensions.autoHeight,\n minimalContentHeight: params.dimensions.minimalContentHeight\n };\n if (isDeepEqual(prevDimensions, newDimensions)) {\n return;\n }\n store.update({\n dimensions: newDimensions\n });\n onResize?.(newDimensions.root);\n }, [store, layout.refs.container, layout.refs.scrollbarHorizontal, layout.refs.scrollbarVertical, params.dimensions.scrollbarSize, params.dimensions.autoHeight, params.dimensions.minimalContentHeight, params.disableHorizontalScroll, params.disableVerticalScroll, onResize, rowHeight, columnsTotalWidth, leftPinnedWidth, rightPinnedWidth, topPinnedHeight, bottomPinnedHeight]);\n const {\n resizeThrottleMs\n } = params;\n const updateDimensionCallback = useEventCallback(updateDimensions);\n const debouncedUpdateDimensions = React.useMemo(() => resizeThrottleMs > 0 ? throttle(updateDimensionCallback, resizeThrottleMs) : undefined, [resizeThrottleMs, updateDimensionCallback]);\n React.useEffect(() => debouncedUpdateDimensions?.clear, [debouncedUpdateDimensions]);\n useLayoutEffect(updateDimensions, [updateDimensions]);\n useLayoutEffect(() => {\n store.update({\n dimensions: _extends({}, store.state.dimensions, {\n autoHeight: params.dimensions.autoHeight,\n minimalContentHeight: params.dimensions.minimalContentHeight\n })\n });\n }, [store, params.dimensions.autoHeight, params.dimensions.minimalContentHeight]);\n const rowsMeta = useRowsMeta(store, params, updateDimensions);\n return {\n updateDimensions,\n debouncedUpdateDimensions,\n rowsMeta\n };\n}\nfunction useRowsMeta(store, params, updateDimensions) {\n const heightCache = store.state.rowHeights;\n const {\n rows,\n getRowHeight: getRowHeightProp,\n getRowSpacing,\n getEstimatedRowHeight\n } = params;\n const lastMeasuredRowIndex = React.useRef(-1);\n const hasRowWithAutoHeight = React.useRef(false);\n const isHeightMetaValid = React.useRef(false);\n const pinnedRows = params.pinnedRows;\n const rowHeight = useStore(store, selectors.rowHeight);\n const getRowHeightEntry = useEventCallback(rowId => {\n let entry = heightCache.get(rowId);\n if (entry === undefined) {\n entry = {\n content: store.state.dimensions.rowHeight,\n spacingTop: 0,\n spacingBottom: 0,\n detail: 0,\n autoHeight: false,\n needsFirstMeasurement: true\n };\n heightCache.set(rowId, entry);\n }\n return entry;\n });\n const {\n applyRowHeight\n } = params;\n const processHeightEntry = React.useCallback(row => {\n // HACK: rowHeight trails behind the most up-to-date value just enough to\n // mess the initial rowsMeta hydration :/\n eslintUseValue(rowHeight);\n const dimensions = selectors.dimensions(store.state);\n const baseRowHeight = dimensions.rowHeight;\n const entry = getRowHeightEntry(row.id);\n if (!getRowHeightProp) {\n entry.content = baseRowHeight;\n entry.needsFirstMeasurement = false;\n } else {\n const rowHeightFromUser = getRowHeightProp(row);\n if (rowHeightFromUser === 'auto') {\n if (entry.needsFirstMeasurement) {\n const estimatedRowHeight = getEstimatedRowHeight ? getEstimatedRowHeight(row) : baseRowHeight;\n\n // If the row was not measured yet use the estimated row height\n entry.content = estimatedRowHeight ?? baseRowHeight;\n }\n hasRowWithAutoHeight.current = true;\n entry.autoHeight = true;\n } else {\n // Default back to base rowHeight if getRowHeight returns null value.\n entry.content = rowHeightFromUser ?? dimensions.rowHeight;\n entry.needsFirstMeasurement = false;\n entry.autoHeight = false;\n }\n }\n if (getRowSpacing) {\n const spacing = getRowSpacing(row);\n entry.spacingTop = spacing.top ?? 0;\n entry.spacingBottom = spacing.bottom ?? 0;\n } else {\n entry.spacingTop = 0;\n entry.spacingBottom = 0;\n }\n applyRowHeight?.(entry, row);\n return entry;\n }, [store, getRowHeightProp, getRowHeightEntry, getEstimatedRowHeight, rowHeight, getRowSpacing, applyRowHeight]);\n const hydrateRowsMeta = React.useCallback(() => {\n hasRowWithAutoHeight.current = false;\n const pinnedTopRowsTotalHeight = pinnedRows?.top.reduce((acc, row) => {\n const entry = processHeightEntry(row);\n return acc + entry.content + entry.spacingTop + entry.spacingBottom + entry.detail;\n }, 0) ?? 0;\n const pinnedBottomRowsTotalHeight = pinnedRows?.bottom.reduce((acc, row) => {\n const entry = processHeightEntry(row);\n return acc + entry.content + entry.spacingTop + entry.spacingBottom + entry.detail;\n }, 0) ?? 0;\n const positions = [];\n const currentPageTotalHeight = rows.reduce((acc, row) => {\n positions.push(acc);\n const entry = processHeightEntry(row);\n const total = entry.content + entry.spacingTop + entry.spacingBottom + entry.detail;\n return acc + total;\n }, 0);\n if (!hasRowWithAutoHeight.current) {\n // No row has height=auto, so all rows are already measured\n lastMeasuredRowIndex.current = Infinity;\n }\n const didHeightsChange = pinnedTopRowsTotalHeight !== store.state.rowsMeta.pinnedTopRowsTotalHeight || pinnedBottomRowsTotalHeight !== store.state.rowsMeta.pinnedBottomRowsTotalHeight || currentPageTotalHeight !== store.state.rowsMeta.currentPageTotalHeight;\n const rowsMeta = {\n currentPageTotalHeight,\n positions,\n pinnedTopRowsTotalHeight,\n pinnedBottomRowsTotalHeight\n };\n store.set('rowsMeta', rowsMeta);\n if (didHeightsChange) {\n updateDimensions();\n }\n isHeightMetaValid.current = true;\n }, [store, pinnedRows, rows, processHeightEntry, updateDimensions]);\n const hydrateRowsMetaLatest = useEventCallback(hydrateRowsMeta);\n const getRowHeight = rowId => {\n return heightCache.get(rowId)?.content ?? selectors.rowHeight(store.state);\n };\n const storeRowHeightMeasurement = (id, height) => {\n const entry = getRowHeightEntry(id);\n const didChange = entry.content !== height;\n entry.needsFirstMeasurement = false;\n entry.content = height;\n isHeightMetaValid.current &&= !didChange;\n };\n const rowHasAutoHeight = id => {\n return heightCache.get(id)?.autoHeight ?? false;\n };\n const getLastMeasuredRowIndex = () => {\n return lastMeasuredRowIndex.current;\n };\n const setLastMeasuredRowIndex = index => {\n if (hasRowWithAutoHeight.current && index > lastMeasuredRowIndex.current) {\n lastMeasuredRowIndex.current = index;\n }\n };\n const resetRowHeights = () => {\n heightCache.clear();\n hydrateRowsMeta();\n };\n const resizeObserver = useLazyRef(() => typeof ResizeObserver === 'undefined' ? undefined : new ResizeObserver(entries => {\n for (let i = 0; i < entries.length; i += 1) {\n const entry = entries[i];\n const height = entry.borderBoxSize && entry.borderBoxSize.length > 0 ? entry.borderBoxSize[0].blockSize : entry.contentRect.height;\n const rowId = entry.target.__mui_id;\n const focusedVirtualRowId = params.focusedVirtualCell?.()?.id;\n if (focusedVirtualRowId === rowId && height === 0) {\n // Focused virtual row has 0 height.\n // We don't want to store it to avoid scroll jumping.\n // https://github.com/mui/mui-x/issues/14726\n return;\n }\n storeRowHeightMeasurement(rowId, height);\n }\n if (!isHeightMetaValid.current) {\n // Avoids \"ResizeObserver loop completed with undelivered notifications\" error\n requestAnimationFrame(() => {\n hydrateRowsMetaLatest();\n });\n }\n })).current;\n const observeRowHeight = (element, rowId) => {\n element.__mui_id = rowId;\n resizeObserver?.observe(element);\n return () => resizeObserver?.unobserve(element);\n };\n\n // The effect is used to build the rows meta data - currentPageTotalHeight and positions.\n // Because of variable row height this is needed for the virtualization\n useLayoutEffect(() => {\n hydrateRowsMeta();\n }, [hydrateRowsMeta]);\n return {\n getRowHeight,\n setLastMeasuredRowIndex,\n storeRowHeightMeasurement,\n hydrateRowsMeta,\n observeRowHeight,\n rowHasAutoHeight,\n getRowHeightEntry,\n getLastMeasuredRowIndex,\n resetRowHeights\n };\n}\nexport function observeRootNode(node, store, setRootSize) {\n if (!node) {\n return undefined;\n }\n const bounds = node.getBoundingClientRect();\n const initialSize = {\n width: roundToDecimalPlaces(bounds.width, 1),\n height: roundToDecimalPlaces(bounds.height, 1)\n };\n if (store.state.rootSize === Size.EMPTY || !Size.equals(initialSize, store.state.rootSize)) {\n setRootSize(initialSize);\n }\n if (typeof ResizeObserver === 'undefined') {\n return undefined;\n }\n const observer = new ResizeObserver(([entry]) => {\n if (!entry) {\n return;\n }\n const rootSize = {\n width: roundToDecimalPlaces(entry.contentRect.width, 1),\n height: roundToDecimalPlaces(entry.contentRect.height, 1)\n };\n if (!Size.equals(rootSize, store.state.rootSize)) {\n setRootSize(rootSize);\n }\n });\n observer.observe(node);\n return () => {\n observer.disconnect();\n };\n}\nconst scrollbarSizeCache = new WeakMap();\nfunction measureScrollbarSize(element, scrollbarSize) {\n if (scrollbarSize !== undefined) {\n return scrollbarSize;\n }\n if (element === null) {\n return 0;\n }\n const htmlElement = element;\n const doc = ownerDocument(element);\n const view = doc.defaultView;\n\n // We don't expect the scrollbar size styles to change, so we can cache the size and reuse it on every dimensions update.\n // The scrollbar size is expected to change when the browser zoom or display scale changes while the element stays mounted, which `devicePixelRatio` reflects.\n // Other layout changes (container resize, row/column updates) keep the same `devicePixelRatio`,\n // so we can reuse the cached size and skip re-measuring the DOM (`getComputedStyle` + forced reflow) on every dimensions update.\n //\n // Only a value measured directly from the element is authoritative: it reflects the real scrollbar, including\n // `::-webkit-scrollbar` pseudo styling that the probe-div fallback can't replicate. A cached probe estimate must\n // not short-circuit here, otherwise it would mask the real size once the element becomes scrollable.\n const devicePixelRatio = view?.devicePixelRatio ?? 1;\n const cached = scrollbarSizeCache.get(element);\n if (cached !== undefined && cached.devicePixelRatio === devicePixelRatio && cached.measuredDirectly) {\n return cached.size;\n }\n const computed = view?.getComputedStyle(htmlElement);\n\n // First, try measuring `element` directly. When `element` is a scroll widget\n // that already has overflowing content (the typical case for the timeline's\n // virtual scrollbars), its rendered scrollbar reflects whatever\n // `scrollbar-width` / `::-webkit-scrollbar` styling is applied to *this*\n // element, which is exactly what we need.\n const canScrollY = computed?.overflowY === 'auto' || computed?.overflowY === 'scroll';\n const canScrollX = computed?.overflowX === 'auto' || computed?.overflowX === 'scroll';\n const hasScrollY = canScrollY && htmlElement.scrollHeight > htmlElement.clientHeight;\n const hasScrollX = canScrollX && htmlElement.scrollWidth > htmlElement.clientWidth;\n\n // `offsetWidth` / `offsetHeight` include borders, while `clientWidth` /\n // `clientHeight` do not. Subtract borders so direct measurement only returns\n // the scrollbar size.\n const borderWidth = parseCSSPixelValue(computed?.borderLeftWidth) + parseCSSPixelValue(computed?.borderRightWidth);\n const borderHeight = parseCSSPixelValue(computed?.borderTopWidth) + parseCSSPixelValue(computed?.borderBottomWidth);\n const directSize = Math.max(hasScrollY ? htmlElement.offsetWidth - htmlElement.clientWidth - borderWidth : 0, hasScrollX ? htmlElement.offsetHeight - htmlElement.clientHeight - borderHeight : 0);\n if (hasScrollY || hasScrollX) {\n const size = Math.max(0, directSize);\n scrollbarSizeCache.set(element, {\n size,\n devicePixelRatio,\n measuredDirectly: true\n });\n return size;\n }\n\n // The element isn't scrollable yet, so it can't be measured directly. Reuse a\n // probe estimate cached at the same `devicePixelRatio` to avoid re-running the\n // (expensive) probe on every dimensions update while the element stays\n // non-scrollable. Once it becomes scrollable, the direct measurement above\n // takes over and replaces this estimate.\n if (cached !== undefined && cached.devicePixelRatio === devicePixelRatio) {\n return cached.size;\n }\n\n // Fall back to a probe div appended to `element`. `scrollbar-width` is not\n // inherited, so copy it from the target element's computed style; otherwise\n // a parent that opts into `scrollbar-width: thin` would still be measured\n // with default scrollbar size.\n const scrollDiv = doc.createElement('div');\n scrollDiv.style.width = '99px';\n scrollDiv.style.height = '99px';\n scrollDiv.style.position = 'absolute';\n scrollDiv.style.overflow = 'scroll';\n if (computed?.scrollbarWidth) {\n scrollDiv.style.scrollbarWidth = computed.scrollbarWidth;\n }\n scrollDiv.className = 'scrollDiv';\n element.appendChild(scrollDiv);\n const size = scrollDiv.offsetWidth - scrollDiv.clientWidth;\n element.removeChild(scrollDiv);\n scrollbarSizeCache.set(element, {\n size,\n devicePixelRatio,\n measuredDirectly: false\n });\n return size;\n}\nfunction parseCSSPixelValue(value) {\n const parsedValue = Number.parseFloat(value ?? '0');\n return Number.isNaN(parsedValue) ? 0 : parsedValue;\n}\nfunction eslintUseValue(_) {}","/**\n * Reads `navigator.userAgent` / `navigator.platform` (legacy but universally\n * supported) into a normalized shape. In development, prefers the modern\n * `navigator.userAgentData` API on Chromium to avoid DevTools warnings about\n * the deprecated reads; that branch is dead-code-eliminated in production\n * builds to keep the bundle small.\n *\n * Returns empty/zero values when `navigator` is undefined (SSR), so every\n * derived flag safely evaluates to `false`.\n */\nfunction readRawData() {\n if (typeof navigator === 'undefined') {\n return {\n userAgent: '',\n platform: '',\n maxTouchPoints: 0\n };\n }\n if (process.env.NODE_ENV !== 'production') {\n const uaData = navigator.userAgentData;\n if (uaData && Array.isArray(uaData.brands)) {\n return {\n userAgent: uaData.brands.map(({\n brand,\n version\n }) => `${brand}/${version}`).join(' '),\n platform: uaData.platform ?? navigator.platform ?? '',\n maxTouchPoints: navigator.maxTouchPoints ?? 0\n };\n }\n }\n return {\n userAgent: navigator.userAgent,\n platform: navigator.platform ?? '',\n maxTouchPoints: navigator.maxTouchPoints ?? 0\n };\n}\nconst {\n userAgent,\n platform,\n maxTouchPoints\n} = readRawData();\nexport const lowerUserAgent = userAgent.toLowerCase();\nexport const lowerPlatform = platform.toLowerCase();\nexport { maxTouchPoints };","import { lowerUserAgent } from \"./shared.mjs\";\n\n// WebKit (Safari, all iOS browsers, GNOME Web). Distinguished from Blink by\n// the legacy `-webkit-backdrop-filter` name — Blink forked from WebKit in 2013\n// and only ships the unprefixed `backdrop-filter`.\n/** WebKit: Safari, all iOS browsers, GNOME Web. Excludes Blink. */\nexport const webkit = typeof CSS !== 'undefined' && !!CSS.supports?.('-webkit-backdrop-filter:none');\n\n// Anchored to `!webkit` so engines are mutually exclusive by construction.\n// Firefox-on-iOS uses WebKit (its UA marker is `FxiOS/`, not `Firefox/`); the\n// `!webkit` prefix also defends against future iOS-browser UA changes that\n// might inject `Firefox` into a WebKit-based UA.\n/** Gecko: Firefox. */\nexport const gecko = !webkit && lowerUserAgent.includes('firefox');\n\n// All Chromium-based browsers ship `Chrome/` or `Chromium/` in their UA — both\n// share the `chrom` prefix, so a single substring check covers Chrome, Edge,\n// Opera, Brave, etc. Chrome-on-iOS uses `CriOS/` and stays WebKit. The positive\n// UA check also makes this SSR-safe — an empty UA matches nothing.\n/** Blink: Chrome, Edge, Opera, Brave, and other Chromium-based browsers. */\nexport const blink = !webkit && lowerUserAgent.includes('chrom');","import { lowerUserAgent } from \"./shared.mjs\";\n\n/** Running in jsdom or HappyDOM (used by unit tests). */\nexport const jsdom = /jsdom|happydom/.test(lowerUserAgent);","'use client';\n\nimport * as React from 'react';\nimport useEnhancedEffect from '@mui/utils/useEnhancedEffect';\nconst noop = () => {};\n\n/**\n * Runs an effect once, when `condition` is true.\n */\nexport const useRunOnce = (condition, effect) => {\n const didRun = React.useRef(false);\n useEnhancedEffect(() => {\n if (didRun.current || !condition) {\n return noop;\n }\n didRun.current = true;\n return effect();\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [didRun.current || condition]);\n};","'use client';\n\nimport * as React from 'react';\nimport useEventCallback from '@mui/utils/useEventCallback';\nimport reactMajor from '@mui/x-internals/reactMajor';\nexport default function useRefCallback(fn) {\n const refCleanup = React.useRef(undefined);\n const refCallback = useEventCallback(node => {\n if (!node) {\n // Cleanup for R18\n refCleanup.current?.();\n return;\n }\n refCleanup.current = fn(node);\n if (reactMajor >= 19) {\n /* eslint-disable-next-line consistent-return */\n return refCleanup.current;\n }\n });\n return refCallback;\n}","'use client';\n\nimport _formatErrorMessage from \"@mui/x-internals/formatErrorMessage\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport * as ReactDOM from 'react-dom';\nimport useLazyRef from '@mui/utils/useLazyRef';\nimport useTimeout from '@mui/utils/useTimeout';\nimport useEventCallback from '@mui/utils/useEventCallback';\nimport useEnhancedEffect from '@mui/utils/useEnhancedEffect';\nimport { platform } from '@base-ui/utils/platform';\nimport { useRunOnce } from '@mui/x-internals/useRunOnce';\nimport { createSelector, useStore, useStoreEffect } from '@mui/x-internals/store';\nimport useRefCallback from \"../../utils/useRefCallback.mjs\";\nimport { PinnedRows, PinnedColumns } from \"../../models/core.mjs\";\nimport { Dimensions, observeRootNode } from \"../dimensions.mjs\";\nimport { ScrollPosition, ScrollDirection } from \"../../models/index.mjs\";\n\n/* eslint-disable import/export, @typescript-eslint/no-redeclare */\n\nconst clamp = (value, min, max) => Math.max(min, Math.min(max, value));\nconst MINIMUM_COLUMN_WIDTH = 50;\nconst EMPTY_SCROLL_POSITION = {\n top: 0,\n left: 0\n};\nconst EMPTY_DETAIL_PANELS = Object.freeze(new Map());\nexport const EMPTY_RENDER_CONTEXT = {\n firstRowIndex: 0,\n lastRowIndex: 0,\n firstColumnIndex: 0,\n lastColumnIndex: 0\n};\nconst selectors = (() => {\n const firstRowIndexSelector = createSelector(state => state.virtualization.renderContext.firstRowIndex);\n const scrollPositionSelector = createSelector(state => state.virtualization.scrollPosition);\n const layoutModeSelector = createSelector(state => state.virtualization.layoutMode);\n return {\n store: createSelector(state => state.virtualization),\n renderContext: createSelector(state => state.virtualization.renderContext),\n enabledForRows: createSelector(state => state.virtualization.enabledForRows),\n enabledForColumns: createSelector(state => state.virtualization.enabledForColumns),\n offsetTop: createSelector(layoutModeSelector, Dimensions.selectors.dimensions, Dimensions.selectors.rowPositions, firstRowIndexSelector, (layoutMode, dimensions, rowPositions, firstRowIndex) => {\n return (layoutMode === 'uncontrolled' ? dimensions.topContainerHeight : 0) + (rowPositions[firstRowIndex] ?? 0);\n }),\n context: createSelector(state => state.virtualization.context),\n layoutMode: layoutModeSelector,\n scrollPosition: scrollPositionSelector,\n pinnedLeftOffsetSelector: createSelector(scrollPositionSelector, scrollPosition => scrollPosition.current.left),\n pinnedRightOffsetSelector: createSelector(scrollPositionSelector, Dimensions.selectors.dimensions, Dimensions.selectors.columnsTotalWidth, Dimensions.selectors.needsVerticalScrollbar, (scrollPosition, dimensions, columnsTotalWidth, needsVerticalScrollbar) => {\n return Math.max(columnsTotalWidth, dimensions.viewportOuterSize.width) - dimensions.viewportOuterSize.width - scrollPosition.current.left + (needsVerticalScrollbar ? dimensions.scrollbarSize : 0);\n })\n };\n})();\nexport const Virtualization = {\n initialize: initializeState,\n use: useVirtualization,\n selectors\n};\nfunction initializeState(params) {\n const {\n enabled,\n enabledForRows,\n enabledForColumns\n } = params.initialState?.virtualization ?? {};\n\n // When virtualization is fully disabled, pre-compute the render context to\n // cover all rows/columns. This matches what `computeRenderContext` returns\n // for the disabled case, so the first `forceUpdateRenderContext` after mount\n // detects no change and skips the store notification, which avoids a nested\n // re-render.\n const renderContext = enabled === false && enabledForRows === false && enabledForColumns === false ? {\n firstRowIndex: 0,\n lastRowIndex: params.rows.length,\n firstColumnIndex: 0,\n lastColumnIndex: params.columns?.length ?? 0\n } : EMPTY_RENDER_CONTEXT;\n const state = {\n virtualization: _extends({\n enabled: !platform.env.jsdom,\n enabledForRows: !platform.env.jsdom,\n enabledForColumns: !platform.env.jsdom,\n renderContext,\n props: params.layout.constructor.elements.reduce((acc, key) => (acc[key], acc), {}),\n context: {},\n scrollPosition: {\n current: ScrollPosition.EMPTY\n },\n layoutMode: params.virtualization.layoutMode ?? 'uncontrolled'\n }, params.initialState?.virtualization),\n // FIXME: refactor once the state shape is settled\n getters: null\n };\n return state;\n}\n\n/** APIs to override for colspan/rowspan */\n\nfunction useVirtualization(store, params, api) {\n const {\n layout,\n dimensions: {\n rowHeight,\n columnsTotalWidth = 0\n },\n virtualization: {\n isRtl = false,\n rowBufferPx = 150,\n columnBufferPx = 150\n },\n colspan,\n initialState,\n rows,\n range,\n columns,\n pinnedRows = PinnedRows.EMPTY,\n pinnedColumns = PinnedColumns.EMPTY,\n onWheel,\n onTouchMove,\n onRenderContextChange,\n onScrollChange,\n scrollReset,\n renderRow,\n renderInfiniteLoadingTrigger\n } = params;\n const hasBottomPinnedRows = pinnedRows.bottom.length > 0;\n const [panels, setPanels] = React.useState(EMPTY_DETAIL_PANELS);\n const isUpdateScheduled = React.useRef(false);\n const isRenderContextReady = React.useRef(false);\n const renderContext = useStore(store, selectors.renderContext);\n const enabledForRows = useStore(store, selectors.enabledForRows);\n const enabledForColumns = useStore(store, selectors.enabledForColumns);\n const layoutMode = useStore(store, selectors.layoutMode);\n const contentHeight = useStore(store, Dimensions.selectors.contentHeight);\n\n /*\n * Scroll context logic\n * ====================\n * We only render the cells contained in the `renderContext`. However, when the user starts scrolling the grid\n * in a direction, we want to render as many cells as possible in that direction, as to avoid presenting white\n * areas if the user scrolls too fast/far and the viewport ends up in a region we haven't rendered yet. To render\n * more cells, we store some offsets to add to the viewport in `scrollCache.buffer`. Those offsets make the render\n * context wider in the direction the user is going, but also makes the buffer around the viewport `0` for the\n * dimension (horizontal or vertical) in which the user is not scrolling. So if the normal viewport is 8 columns\n * wide, with a 1 column buffer (10 columns total), then we want it to be exactly 8 columns wide during vertical\n * scroll.\n * However, we don't want the rows in the old context to re-render from e.g. 10 columns to 8 columns, because that's\n * work that's not necessary. Thus we store the context at the start of the scroll in `frozenContext`, and the rows\n * that are part of this old context will keep their same render context as to avoid re-rendering.\n */\n const scrollPosition = React.useRef(initialState?.scroll ?? EMPTY_SCROLL_POSITION);\n const ignoreNextScrollEvent = React.useRef(false);\n const previousContextScrollPosition = React.useRef(EMPTY_SCROLL_POSITION);\n const previousRowContext = React.useRef(EMPTY_RENDER_CONTEXT);\n const scrollTimeout = useTimeout();\n const frozenContext = React.useRef(undefined);\n const scrollCache = useLazyRef(() => createScrollCache(isRtl, rowBufferPx, columnBufferPx, rowHeight * 15, MINIMUM_COLUMN_WIDTH * 6, layoutMode)).current;\n const updateRenderContext = React.useCallback(nextRenderContext => {\n if (!areRenderContextsEqual(nextRenderContext, store.state.virtualization.renderContext)) {\n store.set('virtualization', _extends({}, store.state.virtualization, {\n renderContext: nextRenderContext,\n scrollPosition: {\n current: _extends({}, scrollPosition.current)\n }\n }));\n }\n\n // The lazy-loading hook is listening to `renderedRowsIntervalChange`,\n // but only does something if we already have a render context, because\n // otherwise we would call an update directly on mount\n const isReady = Dimensions.selectors.dimensions(store.state).isReady;\n const didRowsIntervalChange = nextRenderContext.firstRowIndex !== previousRowContext.current.firstRowIndex || nextRenderContext.lastRowIndex !== previousRowContext.current.lastRowIndex;\n if (isReady && didRowsIntervalChange) {\n previousRowContext.current = nextRenderContext;\n onRenderContextChange?.(nextRenderContext);\n }\n previousContextScrollPosition.current = scrollPosition.current;\n }, [store, onRenderContextChange]);\n const triggerUpdateRenderContext = useEventCallback(() => {\n const scroller = layout.refs.scroller.current;\n if (!scroller) {\n return undefined;\n }\n const dimensions = Dimensions.selectors.dimensions(store.state);\n const maxScrollTop = Math.ceil(dimensions.contentSize.height - dimensions.viewportInnerSize.height);\n const maxScrollLeft = Math.ceil(dimensions.contentSize.width - dimensions.viewportInnerSize.width);\n\n // Clamp the scroll position to the viewport to avoid re-calculating the render context for scroll bounce\n const newScroll = {\n top: clamp(scroller.scrollTop, 0, maxScrollTop),\n left: isRtl ? clamp(scroller.scrollLeft, -Math.abs(maxScrollLeft), 0) : clamp(scroller.scrollLeft, 0, maxScrollLeft)\n };\n const dx = newScroll.left - scrollPosition.current.left;\n const dy = newScroll.top - scrollPosition.current.top;\n const isScrolling = dx !== 0 || dy !== 0;\n scrollPosition.current = newScroll;\n const direction = isScrolling ? ScrollDirection.forDelta(dx, dy) : ScrollDirection.NONE;\n\n // Since previous render, we have scrolled...\n const rowScroll = Math.abs(scrollPosition.current.top - previousContextScrollPosition.current.top);\n const columnScroll = Math.abs(scrollPosition.current.left - previousContextScrollPosition.current.left);\n\n // PERF: use the computed minimum column width instead of a static one\n const didCrossThreshold = rowScroll >= rowHeight || columnScroll >= MINIMUM_COLUMN_WIDTH;\n const didChangeDirection = scrollCache.direction !== direction;\n const shouldUpdate = didCrossThreshold || didChangeDirection;\n if (!shouldUpdate) {\n store.set('virtualization', _extends({}, store.state.virtualization, {\n scrollPosition: {\n current: _extends({}, scrollPosition.current)\n }\n }));\n return renderContext;\n }\n\n // Render a new context\n\n if (didChangeDirection) {\n switch (direction) {\n case ScrollDirection.NONE:\n case ScrollDirection.LEFT:\n case ScrollDirection.RIGHT:\n frozenContext.current = undefined;\n break;\n default:\n frozenContext.current = renderContext;\n break;\n }\n }\n scrollCache.direction = direction;\n scrollCache.buffer = bufferForDirection(isRtl, direction, rowBufferPx, columnBufferPx, rowHeight * 15, MINIMUM_COLUMN_WIDTH * 6, layoutMode);\n const inputs = inputsSelector(store, params, api, enabledForRows, enabledForColumns, layoutMode);\n const nextRenderContext = computeRenderContext(inputs, scrollPosition.current, scrollCache);\n if (!areRenderContextsEqual(nextRenderContext, renderContext)) {\n // Prevents batching render context changes\n ReactDOM.flushSync(() => {\n updateRenderContext(nextRenderContext);\n });\n if (layoutMode === 'uncontrolled') {\n scrollTimeout.start(1000, triggerUpdateRenderContext);\n }\n } else {\n store.set('virtualization', _extends({}, store.state.virtualization, {\n scrollPosition: {\n current: _extends({}, scrollPosition.current)\n }\n }));\n }\n return nextRenderContext;\n });\n const forceUpdateRenderContext = () => {\n // skip update if dimensions are not ready and virtualization is enabled\n if (!Dimensions.selectors.dimensions(store.state).isReady && (enabledForRows || enabledForColumns)) {\n return;\n }\n const inputs = inputsSelector(store, params, api, enabledForRows, enabledForColumns, layoutMode);\n const nextRenderContext = computeRenderContext(inputs, scrollPosition.current, scrollCache);\n // Reset the frozen context when the render context changes, see the illustration in https://github.com/mui/mui-x/pull/12353\n frozenContext.current = undefined;\n updateRenderContext(nextRenderContext);\n };\n const forceUpdateRenderContextCallback = useEventCallback(forceUpdateRenderContext);\n useStoreEffect(store, Dimensions.selectors.dimensions, (previous, next) => {\n if (next.isReady) {\n forceUpdateRenderContext();\n }\n });\n useEnhancedEffect(() => {\n if (isUpdateScheduled.current) {\n forceUpdateRenderContext();\n isUpdateScheduled.current = false;\n }\n });\n const scheduleUpdateRenderContext = () => {\n isUpdateScheduled.current = true;\n };\n const handleScroll = useEventCallback(() => {\n if (ignoreNextScrollEvent.current) {\n ignoreNextScrollEvent.current = false;\n return;\n }\n const nextRenderContext = triggerUpdateRenderContext();\n if (nextRenderContext) {\n onScrollChange?.(scrollPosition.current, nextRenderContext);\n }\n });\n\n /**\n * HACK: unstable_rowTree fixes the issue described below, but does it by tightly coupling this\n * section of code to the DataGrid's rowTree model. The `unstable_rowTree` param is a temporary\n * solution to decouple the code.\n */\n const getRows = (rowParams = {}, unstable_rowTree) => {\n if (!rowParams.rows && !range) {\n return [];\n }\n let baseRenderContext = renderContext;\n if (rowParams.renderContext) {\n baseRenderContext = rowParams.renderContext;\n baseRenderContext.firstColumnIndex = renderContext.firstColumnIndex;\n baseRenderContext.lastColumnIndex = renderContext.lastColumnIndex;\n }\n const isLastSection = !hasBottomPinnedRows && rowParams.position === undefined || hasBottomPinnedRows && rowParams.position === 'bottom';\n const isPinnedSection = rowParams.position !== undefined;\n let rowIndexOffset;\n switch (rowParams.position) {\n case 'top':\n rowIndexOffset = 0;\n break;\n case 'bottom':\n rowIndexOffset = pinnedRows.top.length + rows.length;\n break;\n case undefined:\n default:\n rowIndexOffset = pinnedRows.top.length;\n break;\n }\n const rowModels = rowParams.rows ?? rows;\n const firstRowToRender = baseRenderContext.firstRowIndex;\n const lastRowToRender = Math.min(baseRenderContext.lastRowIndex, rowModels.length);\n const rowIndexes = rowParams.rows ? createRange(0, rowParams.rows.length) : createRange(firstRowToRender, lastRowToRender);\n let virtualRowIndex = -1;\n const focusedVirtualCell = params.focusedVirtualCell?.();\n if (!isPinnedSection && focusedVirtualCell) {\n if (focusedVirtualCell.rowIndex < firstRowToRender && focusedVirtualCell.rowIndex >= 0 && focusedVirtualCell.rowIndex < rowModels.length) {\n rowIndexes.unshift(focusedVirtualCell.rowIndex);\n virtualRowIndex = focusedVirtualCell.rowIndex;\n }\n if (focusedVirtualCell.rowIndex > lastRowToRender && focusedVirtualCell.rowIndex < rowModels.length) {\n rowIndexes.push(focusedVirtualCell.rowIndex);\n virtualRowIndex = focusedVirtualCell.rowIndex;\n }\n }\n const rowElements = [];\n const columnPositions = Dimensions.selectors.columnPositions(store.state, columns);\n rowIndexes.forEach(rowIndexInPage => {\n const {\n id,\n model\n } = rowModels[rowIndexInPage];\n\n // In certain cases, the state might already be updated and `params.rows` (which sets `rowModels`)\n // contains stale data.\n // In that case, skip any further row processing.\n // See:\n // - https://github.com/mui/mui-x/issues/16638\n // - https://github.com/mui/mui-x/issues/17022\n if (unstable_rowTree && !unstable_rowTree[id]) {\n return;\n }\n const rowIndex = (range?.firstRowIndex || 0) + rowIndexOffset + rowIndexInPage;\n\n // NOTE: This is an expensive feature, the colSpan code could be optimized.\n if (colspan?.enabled) {\n const minFirstColumn = pinnedColumns.left.length;\n const maxLastColumn = columns.length - pinnedColumns.right.length;\n api.calculateColSpan(id, minFirstColumn, maxLastColumn, columns);\n if (pinnedColumns.left.length > 0) {\n api.calculateColSpan(id, 0, pinnedColumns.left.length, columns);\n }\n if (pinnedColumns.right.length > 0) {\n api.calculateColSpan(id, columns.length - pinnedColumns.right.length, columns.length, columns);\n }\n }\n const baseRowHeight = !api.rowsMeta.rowHasAutoHeight(id) ? api.rowsMeta.getRowHeight(id) : 'auto';\n let isFirstVisible = false;\n if (rowParams.position === undefined) {\n isFirstVisible = rowIndexInPage === 0;\n }\n let isLastVisible = false;\n const isLastVisibleInSection = rowIndexInPage === rowModels.length - 1;\n if (isLastSection) {\n if (!isPinnedSection) {\n const lastIndex = rows.length - 1;\n const isLastVisibleRowIndex = rowIndexInPage === lastIndex;\n if (isLastVisibleRowIndex) {\n isLastVisible = true;\n }\n } else {\n isLastVisible = isLastVisibleInSection;\n }\n }\n let currentRenderContext = baseRenderContext;\n if (frozenContext.current && rowIndexInPage >= frozenContext.current.firstRowIndex && rowIndexInPage < frozenContext.current.lastRowIndex) {\n currentRenderContext = frozenContext.current;\n }\n const isVirtualFocusRow = rowIndexInPage === virtualRowIndex;\n const isVirtualFocusColumn = focusedVirtualCell?.rowIndex === rowIndex;\n const offsetLeft = computeOffsetLeft(columnPositions, currentRenderContext, pinnedColumns.left.length, layoutMode);\n const showBottomBorder = isLastVisibleInSection && rowParams.position === 'top';\n const firstColumnIndex = currentRenderContext.firstColumnIndex;\n const lastColumnIndex = currentRenderContext.lastColumnIndex;\n rowElements.push(renderRow({\n id,\n model,\n rowIndex,\n offsetLeft,\n columnsTotalWidth,\n baseRowHeight,\n firstColumnIndex,\n lastColumnIndex,\n focusedColumnIndex: isVirtualFocusColumn ? focusedVirtualCell.columnIndex : undefined,\n isFirstVisible,\n isLastVisible,\n isVirtualFocusRow,\n showBottomBorder\n }));\n if (isVirtualFocusRow) {\n return;\n }\n const panel = panels.get(id);\n if (panel) {\n rowElements.push(panel);\n }\n if (rowParams.position === undefined && isLastVisibleInSection && renderInfiniteLoadingTrigger) {\n rowElements.push(renderInfiniteLoadingTrigger(id));\n }\n });\n return rowElements;\n };\n const scrollRestoreCallback = React.useRef(null);\n useEnhancedEffect(() => {\n if (!isRenderContextReady.current) {\n return;\n }\n forceUpdateRenderContextCallback();\n }, [enabledForColumns, enabledForRows, forceUpdateRenderContextCallback]);\n useEnhancedEffect(() => {\n if (layout.refs.scroller.current) {\n layout.refs.scroller.current.scrollLeft = 0;\n }\n }, [layout.refs.scroller, scrollReset]);\n useRunOnce(renderContext !== EMPTY_RENDER_CONTEXT, () => {\n onScrollChange?.(scrollPosition.current, renderContext);\n isRenderContextReady.current = true;\n if (initialState?.scroll && layout.refs.scroller.current) {\n const scroller = layout.refs.scroller.current;\n const {\n top,\n left\n } = initialState.scroll;\n const isScrollRestored = {\n top: !(top > 0),\n left: !(left > 0)\n };\n if (!isScrollRestored.left && columnsTotalWidth) {\n scroller.scrollLeft = left;\n isScrollRestored.left = true;\n ignoreNextScrollEvent.current = true;\n }\n\n // To restore the vertical scroll, we need to wait until the rows are available in the DOM (otherwise\n // there's nowhere to scroll). We still set the scrollTop to the initial value at this point in case\n // there already are rows rendered in the DOM, but we only confirm `isScrollRestored.top = true` in the\n // asynchronous callback below.\n if (!isScrollRestored.top && contentHeight) {\n scroller.scrollTop = top;\n ignoreNextScrollEvent.current = true;\n }\n if (!isScrollRestored.top || !isScrollRestored.left) {\n scrollRestoreCallback.current = (columnsTotalWidthCurrent, contentHeightCurrent) => {\n if (!isScrollRestored.left && columnsTotalWidthCurrent) {\n scroller.scrollLeft = left;\n isScrollRestored.left = true;\n ignoreNextScrollEvent.current = true;\n }\n if (!isScrollRestored.top && contentHeightCurrent) {\n scroller.scrollTop = top;\n isScrollRestored.top = true;\n ignoreNextScrollEvent.current = true;\n }\n if (isScrollRestored.left && isScrollRestored.top) {\n scrollRestoreCallback.current = null;\n }\n };\n }\n }\n });\n useStoreEffect(store, Dimensions.selectors.dimensions, forceUpdateRenderContext);\n useEnhancedEffect(() => {\n if (layout.refs.scroller) {\n scrollRestoreCallback.current?.(columnsTotalWidth, contentHeight);\n }\n }, [layout.refs.scroller, columnsTotalWidth, contentHeight]);\n const isFirstSizing = React.useRef(true);\n const containerRef = useRefCallback(node => {\n layout.refs.container.current = node;\n const unsubscribe = observeRootNode(node, store, rootSize => {\n if (rootSize.width === 0 && rootSize.height === 0 && store.state.rootSize.height !== 0 && store.state.rootSize.width !== 0) {\n return;\n }\n store.state.rootSize = rootSize;\n if (isFirstSizing.current || !api.debouncedUpdateDimensions) {\n // We want to initialize the grid dimensions as soon as possible to avoid flickering\n api.updateDimensions(isFirstSizing.current);\n isFirstSizing.current = false;\n } else {\n api.debouncedUpdateDimensions();\n }\n });\n return () => {\n unsubscribe?.();\n layout.refs.container.current = null;\n };\n });\n const scrollerRef = useRefCallback(node => {\n layout.refs.scroller.current = node;\n const opts = {\n passive: true\n };\n node.addEventListener('scroll', handleScroll, opts);\n node.addEventListener('wheel', onWheel, opts);\n node.addEventListener('touchmove', onTouchMove, opts);\n return () => {\n node.removeEventListener('scroll', handleScroll, opts);\n node.removeEventListener('wheel', onWheel, opts);\n node.removeEventListener('touchmove', onTouchMove, opts);\n layout.refs.scroller.current = null;\n };\n });\n const layoutParams = {\n containerRef,\n scrollerRef\n };\n const layoutAPI = layout.use(store, params, api, layoutParams);\n const getters = _extends({\n setPanels,\n getRows,\n rows: params.rows\n }, layoutAPI);\n return _extends({\n getters,\n setPanels,\n forceUpdateRenderContext,\n scheduleUpdateRenderContext\n }, createSpanningAPI());\n}\nfunction inputsSelector(store, params, api, enabledForRows, enabledForColumns, layoutMode) {\n const dimensions = Dimensions.selectors.dimensions(store.state);\n const rows = params.rows;\n const range = params.range;\n const columns = params.columns;\n const hiddenCellsOriginMap = api.getHiddenCellsOrigin();\n const lastRowId = params.rows.at(-1)?.id;\n const lastColumn = columns.at(-1);\n return {\n api,\n enabledForRows,\n enabledForColumns,\n autoHeight: dimensions.autoHeight,\n rowBufferPx: params.virtualization.rowBufferPx,\n columnBufferPx: params.virtualization.columnBufferPx,\n leftPinnedWidth: dimensions.leftPinnedWidth,\n rightPinnedWidth: dimensions.rightPinnedWidth,\n columnsTotalWidth: dimensions.columnsTotalWidth,\n viewportInnerWidth: dimensions.viewportInnerSize.width,\n viewportInnerHeight: dimensions.viewportInnerSize.height,\n lastRowHeight: lastRowId !== undefined ? api.rowsMeta.getRowHeight(lastRowId) : 0,\n lastColumnWidth: lastColumn?.computedWidth ?? 0,\n rowsMeta: Dimensions.selectors.rowsMeta(store.state),\n columnPositions: Dimensions.selectors.columnPositions(store.state, params.columns),\n rows,\n range,\n pinnedColumns: params.pinnedColumns,\n columns,\n hiddenCellsOriginMap,\n virtualizeColumnsWithAutoRowHeight: params.virtualizeColumnsWithAutoRowHeight,\n layoutMode\n };\n}\nfunction computeRenderContext(inputs, scrollPosition, scrollCache) {\n const renderContext = {\n firstRowIndex: 0,\n lastRowIndex: inputs.rows.length,\n firstColumnIndex: 0,\n lastColumnIndex: inputs.columns.length\n };\n const {\n top,\n left\n } = scrollPosition;\n const realLeft = Math.abs(left) + inputs.leftPinnedWidth;\n if (inputs.enabledForRows) {\n // Clamp the value because the search may return an index out of bounds.\n // In the last index, this is not needed because Array.slice doesn't include it.\n let firstRowIndex = Math.min(getNearestIndexToRender(inputs, top, {\n atStart: true,\n lastPosition: inputs.rowsMeta.positions[inputs.rowsMeta.positions.length - 1] + inputs.lastRowHeight\n }), inputs.rowsMeta.positions.length - 1);\n\n // If any of the cells in the `firstRowIndex` is hidden due to an extended row span,\n // Make sure the row from where the rowSpan is originated is visible.\n const rowSpanHiddenCellOrigin = inputs.hiddenCellsOriginMap[firstRowIndex];\n if (rowSpanHiddenCellOrigin) {\n const minSpannedRowIndex = Math.min(...Object.values(rowSpanHiddenCellOrigin));\n firstRowIndex = Math.min(firstRowIndex, minSpannedRowIndex);\n }\n const lastRowIndex = inputs.autoHeight ? firstRowIndex + inputs.rows.length : getNearestIndexToRender(inputs, top + inputs.viewportInnerHeight);\n renderContext.firstRowIndex = firstRowIndex;\n renderContext.lastRowIndex = lastRowIndex;\n }\n\n // XXX\n // if (inputs.listView) {\n // return {\n // ...renderContext,\n // lastColumnIndex: 1,\n // };\n // }\n if (inputs.enabledForColumns) {\n let firstColumnIndex = 0;\n let lastColumnIndex = inputs.columnPositions.length;\n let hasRowWithAutoHeight = false;\n const [firstRowToRender, lastRowToRender] = getIndexesToRender({\n firstIndex: renderContext.firstRowIndex,\n lastIndex: renderContext.lastRowIndex,\n minFirstIndex: 0,\n maxLastIndex: inputs.rows.length,\n bufferBefore: scrollCache.buffer.rowBefore,\n bufferAfter: scrollCache.buffer.rowAfter,\n positions: inputs.rowsMeta.positions,\n lastSize: inputs.lastRowHeight\n });\n if (!inputs.virtualizeColumnsWithAutoRowHeight) {\n for (let i = firstRowToRender; i < lastRowToRender && !hasRowWithAutoHeight; i += 1) {\n const row = inputs.rows[i];\n hasRowWithAutoHeight = inputs.api.rowsMeta.rowHasAutoHeight(row.id);\n }\n }\n if (!hasRowWithAutoHeight || inputs.virtualizeColumnsWithAutoRowHeight) {\n firstColumnIndex = binarySearch(realLeft, inputs.columnPositions, {\n atStart: true,\n lastPosition: inputs.columnsTotalWidth\n });\n const rightBound = inputs.layoutMode === 'controlled' ? realLeft + inputs.viewportInnerWidth - inputs.rightPinnedWidth : realLeft + inputs.viewportInnerWidth;\n lastColumnIndex = binarySearch(rightBound, inputs.columnPositions);\n }\n renderContext.firstColumnIndex = firstColumnIndex;\n renderContext.lastColumnIndex = lastColumnIndex;\n }\n const actualRenderContext = deriveRenderContext(inputs, renderContext, scrollCache);\n return actualRenderContext;\n}\nfunction getNearestIndexToRender(inputs, offset, options) {\n const lastMeasuredIndexRelativeToAllRows = inputs.api.rowsMeta.getLastMeasuredRowIndex();\n let allRowsMeasured = lastMeasuredIndexRelativeToAllRows === Infinity;\n if (inputs.range?.lastRowIndex && !allRowsMeasured) {\n // Check if all rows in this page are already measured\n allRowsMeasured = lastMeasuredIndexRelativeToAllRows >= inputs.range.lastRowIndex;\n }\n const lastMeasuredIndexRelativeToCurrentPage = clamp(lastMeasuredIndexRelativeToAllRows - (inputs.range?.firstRowIndex || 0), 0, inputs.rowsMeta.positions.length);\n if (allRowsMeasured || inputs.rowsMeta.positions[lastMeasuredIndexRelativeToCurrentPage] >= offset) {\n // If all rows were measured (when no row has \"auto\" as height) or all rows before the offset\n // were measured, then use a binary search because it's faster.\n return binarySearch(offset, inputs.rowsMeta.positions, options);\n }\n\n // Otherwise, use an exponential search.\n // If rows have \"auto\" as height, their positions will be based on estimated heights.\n // In this case, we can skip several steps until we find a position higher than the offset.\n // Inspired by https://github.com/bvaughn/react-virtualized/blob/master/source/Grid/utils/CellSizeAndPositionManager.js\n return exponentialSearch(offset, inputs.rowsMeta.positions, lastMeasuredIndexRelativeToCurrentPage, options);\n}\n\n/**\n * Accepts as input a raw render context (the area visible in the viewport) and adds\n * computes the actual render context based on pinned elements, buffer dimensions and\n * spanning.\n */\nfunction deriveRenderContext(inputs, nextRenderContext, scrollCache) {\n const [firstRowToRender, lastRowToRender] = getIndexesToRender({\n firstIndex: nextRenderContext.firstRowIndex,\n lastIndex: nextRenderContext.lastRowIndex,\n minFirstIndex: 0,\n maxLastIndex: inputs.rows.length,\n bufferBefore: scrollCache.buffer.rowBefore,\n bufferAfter: scrollCache.buffer.rowAfter,\n positions: inputs.rowsMeta.positions,\n lastSize: inputs.lastRowHeight\n });\n const [initialFirstColumnToRender, lastColumnToRender] = getIndexesToRender({\n firstIndex: nextRenderContext.firstColumnIndex,\n lastIndex: nextRenderContext.lastColumnIndex,\n minFirstIndex: inputs.pinnedColumns?.left.length ?? 0,\n maxLastIndex: inputs.columns.length - (inputs.pinnedColumns?.right.length ?? 0),\n bufferBefore: scrollCache.buffer.columnBefore,\n bufferAfter: scrollCache.buffer.columnAfter,\n positions: inputs.columnPositions,\n lastSize: inputs.lastColumnWidth\n });\n const firstColumnToRender = getFirstNonSpannedColumnToRender({\n api: inputs.api,\n firstColumnToRender: initialFirstColumnToRender,\n firstRowToRender,\n lastRowToRender,\n visibleRows: inputs.rows\n });\n return {\n firstRowIndex: firstRowToRender,\n lastRowIndex: lastRowToRender,\n firstColumnIndex: firstColumnToRender,\n lastColumnIndex: lastColumnToRender\n };\n}\n/**\n * Use binary search to avoid looping through all possible positions.\n * The `options.atStart` provides the possibility to match for the first element that\n * intersects the screen, even if said element's start position is before `offset`. In\n * other words, we search for `offset + width`.\n */\nfunction binarySearch(offset, positions, options = undefined, sliceStart = 0, sliceEnd = positions.length) {\n if (positions.length <= 0) {\n return -1;\n }\n if (sliceStart >= sliceEnd) {\n return sliceStart;\n }\n const pivot = sliceStart + Math.floor((sliceEnd - sliceStart) / 2);\n const position = positions[pivot];\n let isBefore;\n if (options?.atStart) {\n const width = (pivot === positions.length - 1 ? options.lastPosition : positions[pivot + 1]) - position;\n isBefore = offset - width < position;\n } else {\n isBefore = offset <= position;\n }\n return isBefore ? binarySearch(offset, positions, options, sliceStart, pivot) : binarySearch(offset, positions, options, pivot + 1, sliceEnd);\n}\nfunction exponentialSearch(offset, positions, index, options = undefined) {\n let interval = 1;\n while (index < positions.length && Math.abs(positions[index]) < offset) {\n index += interval;\n interval *= 2;\n }\n return binarySearch(offset, positions, options, Math.floor(index / 2), Math.min(index, positions.length));\n}\nfunction getIndexesToRender({\n firstIndex,\n lastIndex,\n bufferBefore,\n bufferAfter,\n minFirstIndex,\n maxLastIndex,\n positions,\n lastSize\n}) {\n const firstPosition = positions[firstIndex] - bufferBefore;\n const lastPosition = positions[lastIndex] + bufferAfter;\n const firstIndexPadded = binarySearch(firstPosition, positions, {\n atStart: true,\n lastPosition: positions[positions.length - 1] + lastSize\n });\n const lastIndexPadded = binarySearch(lastPosition, positions) + 1;\n return [clamp(firstIndexPadded, minFirstIndex, maxLastIndex), clamp(lastIndexPadded, minFirstIndex, maxLastIndex)];\n}\nexport function areRenderContextsEqual(context1, context2) {\n if (context1 === context2) {\n return true;\n }\n return context1.firstRowIndex === context2.firstRowIndex && context1.lastRowIndex === context2.lastRowIndex && context1.firstColumnIndex === context2.firstColumnIndex && context1.lastColumnIndex === context2.lastColumnIndex;\n}\nexport function computeOffsetLeft(columnPositions, renderContext, pinnedLeftLength, layoutMode = 'uncontrolled') {\n let offset = columnPositions[renderContext.firstColumnIndex] ?? 0;\n /* CSS sticky leaves elements in the normal flow of the DOM, so we\n * don't need to add the offset of the pinned columns. */\n if (layoutMode === 'uncontrolled') {\n offset -= columnPositions[pinnedLeftLength] ?? 0;\n }\n return Math.abs(offset);\n}\nconst EMPTY_BUFFER = {\n rowAfter: 0,\n rowBefore: 0,\n columnAfter: 0,\n columnBefore: 0\n};\nfunction bufferForDirection(isRtl, direction, rowBufferPx, columnBufferPx, verticalBuffer, horizontalBuffer, layoutMode = 'uncontrolled') {\n if (layoutMode === 'controlled') {\n return EMPTY_BUFFER;\n }\n if (isRtl) {\n switch (direction) {\n case ScrollDirection.LEFT:\n direction = ScrollDirection.RIGHT;\n break;\n case ScrollDirection.RIGHT:\n direction = ScrollDirection.LEFT;\n break;\n default:\n }\n }\n switch (direction) {\n case ScrollDirection.NONE:\n return {\n rowAfter: rowBufferPx,\n rowBefore: rowBufferPx,\n columnAfter: columnBufferPx,\n columnBefore: columnBufferPx\n };\n case ScrollDirection.LEFT:\n return {\n rowAfter: 0,\n rowBefore: 0,\n columnAfter: 0,\n columnBefore: horizontalBuffer\n };\n case ScrollDirection.RIGHT:\n return {\n rowAfter: 0,\n rowBefore: 0,\n columnAfter: horizontalBuffer,\n columnBefore: 0\n };\n case ScrollDirection.UP:\n return {\n rowAfter: 0,\n rowBefore: verticalBuffer,\n columnAfter: 0,\n columnBefore: 0\n };\n case ScrollDirection.DOWN:\n return {\n rowAfter: verticalBuffer,\n rowBefore: 0,\n columnAfter: 0,\n columnBefore: 0\n };\n default:\n // eslint unable to figure out enum exhaustiveness\n throw /* minify-error-disabled */new Error('unreachable');\n }\n}\nfunction createScrollCache(isRtl, rowBufferPx, columnBufferPx, verticalBuffer, horizontalBuffer, layoutMode = 'uncontrolled') {\n return {\n direction: ScrollDirection.NONE,\n buffer: bufferForDirection(isRtl, ScrollDirection.NONE, rowBufferPx, columnBufferPx, verticalBuffer, horizontalBuffer, layoutMode)\n };\n}\nfunction createRange(from, to) {\n return Array.from({\n length: to - from\n }).map((_, i) => from + i);\n}\nfunction getFirstNonSpannedColumnToRender({\n api,\n firstColumnToRender,\n firstRowToRender,\n lastRowToRender,\n visibleRows\n}) {\n let firstNonSpannedColumnToRender = firstColumnToRender;\n let foundStableColumn = false;\n\n // Keep checking columns until we find one that's not spanned in any visible row\n while (!foundStableColumn && firstNonSpannedColumnToRender >= 0) {\n foundStableColumn = true;\n for (let i = firstRowToRender; i < lastRowToRender; i += 1) {\n const row = visibleRows[i];\n if (row) {\n const rowId = visibleRows[i].id;\n const cellColSpanInfo = api.getCellColSpanInfo(rowId, firstNonSpannedColumnToRender);\n if (cellColSpanInfo && cellColSpanInfo.spannedByColSpan && cellColSpanInfo.leftVisibleCellIndex < firstNonSpannedColumnToRender) {\n firstNonSpannedColumnToRender = cellColSpanInfo.leftVisibleCellIndex;\n foundStableColumn = false;\n break; // Check the new column index against the visible rows, because it might be spanned\n }\n }\n }\n }\n return firstNonSpannedColumnToRender;\n}\n\n/** Placeholder API functions for colspan & rowspan to re-implement */\nfunction createSpanningAPI() {\n const getCellColSpanInfo = () => {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'MUI X: Unimplemented: colspan feature is required' : _formatErrorMessage(200));\n };\n const calculateColSpan = () => {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'MUI X: Unimplemented: colspan feature is required' : _formatErrorMessage(200));\n };\n const getHiddenCellsOrigin = () => {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'MUI X: Unimplemented: rowspan feature is required' : _formatErrorMessage(201));\n };\n return {\n getCellColSpanInfo,\n calculateColSpan,\n getHiddenCellsOrigin\n };\n}\nexport function roundToDecimalPlaces(value, decimals) {\n return Math.round(value * 10 ** decimals) / 10 ** decimals;\n}","'use client';\n\nimport * as React from 'react';\nimport useForkRef from '@mui/utils/useForkRef';\nimport useEventCallback from '@mui/utils/useEventCallback';\nimport { platform } from '@base-ui/utils/platform';\nimport { createSelectorMemoized } from '@mui/x-internals/store';\nimport { Dimensions } from \"../dimensions.mjs\";\nimport { Virtualization } from \"./virtualization.mjs\";\nimport useRefCallback from \"../../utils/useRefCallback.mjs\";\n\n/* eslint-disable react-hooks/rules-of-hooks */\n\nexport class Layout {\n static elements = ['scroller', 'container'];\n constructor(refs) {\n this.refs = refs;\n }\n refSetter(name) {\n return node => {\n if (this.refs[name].current !== node) {\n this.refs[name].current = node;\n }\n };\n }\n}\nexport class LayoutDataGrid extends Layout {\n static elements = ['scroller', 'container', 'content', 'positioner', 'scrollbarVertical', 'scrollbarHorizontal'];\n use(store, _params, api, layoutParams) {\n const {\n scrollerRef,\n containerRef\n } = layoutParams;\n const scrollbarVerticalRef = useScrollbarRefCallback(this.refs.scroller, this.refSetter('scrollbarVertical'), 'scrollTop', api.updateDimensions);\n const scrollbarHorizontalRef = useScrollbarRefCallback(this.refs.scroller, this.refSetter('scrollbarHorizontal'), 'scrollLeft', api.updateDimensions);\n store.state.virtualization.context = {\n scrollerRef,\n containerRef,\n scrollbarVerticalRef,\n scrollbarHorizontalRef\n };\n }\n static selectors = {\n containerProps: createSelectorMemoized(Virtualization.selectors.context, context => ({\n ref: context.containerRef\n })),\n scrollerProps: createSelectorMemoized(Virtualization.selectors.context, Dimensions.selectors.autoHeight, Dimensions.selectors.needsHorizontalScrollbar, (context, autoHeight, needsHorizontalScrollbar) => ({\n ref: context.scrollerRef,\n style: {\n // TODO: fall back to overflow: 'auto' if no overflowX or overflowY is set?\n overflowX: !needsHorizontalScrollbar ? 'hidden' : undefined,\n overflowY: autoHeight ? 'hidden' : undefined\n // TODO: should include display: 'flex', flexDirection: 'column' since the Content has flexBasis and flexShrink?\n },\n role: 'presentation',\n // `tabIndex` shouldn't be used along role=presentation, but it fixes a Firefox bug\n // https://github.com/mui/mui-x/pull/13891#discussion_r1683416024\n tabIndex: platform.engine.gecko ? -1 : undefined\n })),\n scrollerContentProps: createSelectorMemoized(Virtualization.selectors.layoutMode, Dimensions.selectors.dimensions, Dimensions.selectors.needsVerticalScrollbar, Dimensions.selectors.needsHorizontalScrollbar, (layoutMode, dimensions, needsVerticalScrollbar, needsHorizontalScrollbar) => {\n let style;\n if (layoutMode === 'controlled') {\n const {\n contentSize,\n scrollbarSize,\n topContainerHeight,\n bottomContainerHeight,\n minimalContentHeight,\n columnsTotalWidth,\n viewportOuterSize\n } = dimensions;\n const verticalScrollbarSize = needsVerticalScrollbar ? scrollbarSize : 0;\n const horizontalScrollbarSize = needsHorizontalScrollbar ? scrollbarSize : 0;\n const contentHeight = contentSize.height === 0 ? minimalContentHeight : contentSize.height;\n const width = needsHorizontalScrollbar ? verticalScrollbarSize + columnsTotalWidth : 'auto';\n const height = cssAdd(cssAdd(cssAdd(contentHeight, topContainerHeight), bottomContainerHeight), horizontalScrollbarSize);\n style = {\n width: cssMax(width, viewportOuterSize.width - verticalScrollbarSize),\n height: cssMax(height, viewportOuterSize.height - horizontalScrollbarSize),\n flex: '0 0 auto'\n };\n }\n return {\n style,\n role: 'presentation'\n };\n }),\n viewportProps: createSelectorMemoized(Dimensions.selectors.dimensions, dimensions => ({\n style: {\n width: dimensions.viewportOuterSize.width,\n height: dimensions.viewportOuterSize.height\n },\n role: 'presentation'\n })),\n contentProps: createSelectorMemoized(Dimensions.selectors.contentHeight, Dimensions.selectors.minimalContentHeight, Dimensions.selectors.columnsTotalWidth, Dimensions.selectors.needsHorizontalScrollbar, (contentHeight, minimalContentHeight, columnsTotalWidth, needsHorizontalScrollbar) => ({\n style: {\n width: needsHorizontalScrollbar ? columnsTotalWidth : 'auto',\n height: contentHeight === 0 ? minimalContentHeight : contentHeight,\n flex: '0 0 auto'\n },\n role: 'presentation'\n })),\n positionerProps: createSelectorMemoized(Virtualization.selectors.layoutMode, Virtualization.selectors.offsetTop, Virtualization.selectors.scrollPosition, (layoutMode, offsetTop, scrollPosition) => ({\n style: {\n transform: layoutMode === 'uncontrolled' ? `translate3d(0, ${offsetTop}px, 0)` : `translate3d(${-scrollPosition.current.left}px, ${offsetTop - scrollPosition.current.top}px, 0)`\n }\n })),\n containerVerticalProps: createSelectorMemoized(Virtualization.selectors.layoutMode, Virtualization.selectors.scrollPosition, (layoutMode, scrollPosition) => layoutMode === 'uncontrolled' ? undefined : {\n style: {\n transform: `translate3d(${-scrollPosition.current.left}px, 0, 0)`\n }\n }),\n scrollbarHorizontalProps: createSelectorMemoized(Virtualization.selectors.context, Virtualization.selectors.scrollPosition, (context, scrollPosition) => ({\n ref: context.scrollbarHorizontalRef,\n scrollPosition\n })),\n scrollbarVerticalProps: createSelectorMemoized(Virtualization.selectors.context, Virtualization.selectors.scrollPosition, (context, scrollPosition) => ({\n ref: context.scrollbarVerticalRef,\n scrollPosition\n })),\n scrollAreaProps: createSelectorMemoized(Virtualization.selectors.scrollPosition, scrollPosition => ({\n scrollPosition\n }))\n };\n}\nexport class LayoutList extends Layout {\n static elements = ['scroller', 'container', 'content', 'positioner'];\n use(store, _params, _api, layoutParams) {\n const {\n scrollerRef,\n containerRef\n } = layoutParams;\n const mergedRef = useForkRef(scrollerRef, containerRef);\n store.state.virtualization.context = {\n mergedRef\n };\n }\n static selectors = {\n containerProps: createSelectorMemoized(Virtualization.selectors.context, Dimensions.selectors.autoHeight, Dimensions.selectors.needsHorizontalScrollbar, (context, autoHeight, needsHorizontalScrollbar) => ({\n ref: context.mergedRef,\n style: {\n overflowX: !needsHorizontalScrollbar ? 'hidden' : undefined,\n overflowY: autoHeight ? 'hidden' : undefined,\n position: 'relative'\n },\n role: 'presentation',\n // `tabIndex` shouldn't be used along role=presentation, but it fixes a Firefox bug\n // https://github.com/mui/mui-x/pull/13891#discussion_r1683416024\n tabIndex: platform.engine.gecko ? -1 : undefined\n })),\n contentProps: createSelectorMemoized(Dimensions.selectors.contentHeight, contentHeight => ({\n style: {\n position: 'absolute',\n display: 'inline-block',\n width: '100%',\n height: contentHeight,\n top: 0,\n left: 0,\n zIndex: -1\n },\n role: 'presentation'\n })),\n positionerProps: createSelectorMemoized(Virtualization.selectors.offsetTop, offsetTop => ({\n style: {\n height: offsetTop\n }\n }))\n };\n}\nfunction useScrollbarRefCallback(scrollerRef, refSetter, scrollProperty, updateDimensions) {\n const isLocked = React.useRef(false);\n const lastPosition = React.useRef(0);\n const handleScrollerScroll = useEventCallback(scrollbar => {\n const scroller = scrollerRef.current;\n if (!scroller) {\n return;\n }\n const scrollerPosition = scroller[scrollProperty];\n if (scrollerPosition === lastPosition.current) {\n return;\n }\n lastPosition.current = scrollerPosition;\n if (isLocked.current) {\n isLocked.current = false;\n return;\n }\n isLocked.current = true;\n scrollbar[scrollProperty] = scrollerPosition;\n });\n const handleScrollbarScroll = useEventCallback(scrollbar => {\n const scroller = scrollerRef.current;\n if (!scroller) {\n return;\n }\n if (isLocked.current) {\n isLocked.current = false;\n return;\n }\n isLocked.current = true;\n scroller[scrollProperty] = scrollbar[scrollProperty];\n });\n return useRefCallback(scrollbar => {\n refSetter(scrollbar);\n updateDimensions();\n const scroller = scrollerRef.current;\n if (!scroller) {\n return () => {\n refSetter(null);\n };\n }\n const onScrollerScroll = () => handleScrollerScroll(scrollbar);\n const onScrollbarScroll = () => handleScrollbarScroll(scrollbar);\n const options = {\n passive: true\n };\n scroller.addEventListener('scroll', onScrollerScroll, options);\n scrollbar.addEventListener('scroll', onScrollbarScroll, options);\n return () => {\n scroller.removeEventListener('scroll', onScrollerScroll);\n scrollbar.removeEventListener('scroll', onScrollbarScroll);\n refSetter(null);\n };\n });\n}\nfunction cssAdd(a, b) {\n if (typeof a === 'number' && typeof b === 'number') {\n return a + b;\n }\n return `calc(${valueToCSSString(a)} + ${valueToCSSString(b)})`;\n}\nfunction cssMax(a, b) {\n if (typeof a === 'number' && typeof b === 'number') {\n return Math.max(a, b);\n }\n return `max(${valueToCSSString(a)}, ${valueToCSSString(b)})`;\n}\nfunction valueToCSSString(value) {\n if (typeof value === 'string') {\n return value;\n }\n if (typeof value === 'undefined') {\n return '0';\n }\n return `${value}px`;\n}","import { Dimensions } from \"./dimensions.mjs\";\nimport { Virtualization } from \"./virtualization/index.mjs\";\n\n/* eslint-disable import/export, @typescript-eslint/no-redeclare */\n\nconst selectors = {};\nexport const Keyboard = {\n initialize: initializeState,\n use: useKeyboard,\n selectors\n};\nfunction initializeState(_params) {\n return {};\n}\nfunction useKeyboard(store, params, _api) {\n const getViewportPageSize = () => {\n const dimensions = Dimensions.selectors.dimensions(store.state);\n if (!dimensions.isReady) {\n return 0;\n }\n\n // TODO: Use a combination of scrollTop, dimensions.viewportInnerSize.height and rowsMeta.possitions\n // to find out the maximum number of rows that can fit in the visible part of the grid\n if (params.getRowHeight) {\n const renderContext = Virtualization.selectors.renderContext(store.state);\n const viewportPageSize = renderContext.lastRowIndex - renderContext.firstRowIndex;\n return Math.min(viewportPageSize - 1, params.rows.length);\n }\n const maximumPageSizeWithoutScrollBar = Math.floor(dimensions.viewportInnerSize.height / dimensions.rowHeight);\n return Math.min(maximumPageSizeWithoutScrollBar, params.rows.length);\n };\n return {\n getViewportPageSize\n };\n}","/* eslint-disable import/export, @typescript-eslint/no-redeclare */\n\nconst EMPTY_RANGE = {\n firstRowIndex: 0,\n lastRowIndex: 0\n};\nconst EMPTY_CACHES = {\n spannedCells: {},\n hiddenCells: {},\n hiddenCellOriginMap: {}\n};\nconst selectors = {\n state: state => state.rowSpanning,\n hiddenCells: state => state.rowSpanning.caches.hiddenCells,\n spannedCells: state => state.rowSpanning.caches.spannedCells,\n hiddenCellsOriginMap: state => state.rowSpanning.caches.hiddenCellOriginMap\n};\nexport const Rowspan = {\n initialize: initializeState,\n use: useRowspan,\n selectors\n};\nfunction initializeState(params) {\n return {\n rowSpanning: params.initialState?.rowSpanning ?? {\n caches: EMPTY_CACHES,\n processedRange: EMPTY_RANGE\n }\n };\n}\nfunction useRowspan(store, _params, _api) {\n const getHiddenCellsOrigin = () => selectors.hiddenCellsOriginMap(store.state);\n return {\n getHiddenCellsOrigin\n };\n}","export const DEFAULT_COLUMNS = [{\n field: 'DEFAULT_COLUMN'\n}];\nexport const DEFAULT_PARAMS = {\n resizeThrottleMs: 100,\n columns: DEFAULT_COLUMNS,\n dimensions: {\n autoHeight: false,\n columnsTotalWidth: 0,\n leftPinnedWidth: 0,\n rightPinnedWidth: 0,\n topPinnedHeight: 0,\n bottomPinnedHeight: 0\n },\n virtualization: {\n isRtl: false,\n rowBufferPx: 150,\n columnBufferPx: 150\n }\n};","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport useLazyRef from '@mui/utils/useLazyRef';\nimport { Store } from '@mui/x-internals/store';\nimport { Colspan } from \"./features/colspan.mjs\";\nimport { Dimensions } from \"./features/dimensions.mjs\";\nimport { Keyboard } from \"./features/keyboard.mjs\";\nimport { Rowspan } from \"./features/rowspan.mjs\";\nimport { Virtualization } from \"./features/virtualization/index.mjs\";\nimport { DEFAULT_PARAMS } from \"./constants.mjs\";\n\n/* eslint-disable jsdoc/require-param-type */\n/* eslint-disable jsdoc/require-param-description */\n/* eslint-disable jsdoc/require-returns-type */\n\nconst FEATURES = [Dimensions, Virtualization, Colspan, Rowspan, Keyboard];\nexport const useVirtualizer = params => {\n const paramsWithDefault = mergeDefaults(params, DEFAULT_PARAMS);\n const store = useLazyRef(() => {\n return new Store(FEATURES.map(f => f.initialize(paramsWithDefault)).reduce((state, partial) => Object.assign(state, partial), {}));\n }).current;\n const api = {};\n for (const feature of FEATURES) {\n Object.assign(api, feature.use(store, paramsWithDefault, api));\n }\n return {\n store,\n api\n };\n};\nfunction mergeDefaults(params, defaults) {\n const result = _extends({}, params);\n for (const key in defaults) {\n if (Object.hasOwn(defaults, key)) {\n const value = defaults[key];\n if (value !== null && typeof value === 'object' && !Array.isArray(value)) {\n result[key] = mergeDefaults(params[key] ?? {}, value);\n } else {\n result[key] = params[key] ?? value;\n }\n }\n }\n return result;\n}","import { createSelector as baseCreateSelector, createSelectorMemoized as baseCreateSelectorMemoized } from '@mui/x-internals/store';\nexport const createSelector = (...args) => {\n const baseSelector = baseCreateSelector(...args);\n const selector = (apiRef, a1, a2, a3) => baseSelector(unwrapIfNeeded(apiRef), a1, a2, a3);\n return selector;\n};\nexport const createSelectorMemoized = (...args) => {\n const baseSelector = baseCreateSelectorMemoized(...args);\n const selector = (apiRef, a1, a2, a3) => baseSelector(unwrapIfNeeded(apiRef), a1, a2, a3);\n return selector;\n};\n\n/**\n * Used to create the root selector for a feature. It assumes that the state is already initialized\n * and strips from the types the possibility of `apiRef` being `null`.\n * Users are warned about this in our documentation https://mui.com/x/react-data-grid/state/#direct-selector-access\n */\nexport const createRootSelector = fn => (apiRef, args) => fn(unwrapIfNeeded(apiRef), args);\nfunction unwrapIfNeeded(refOrState) {\n if ('current' in refOrState) {\n return refOrState.current.state;\n }\n return refOrState;\n}","import { createSelector, createRootSelector } from \"../../../utils/createSelector.mjs\";\nexport const gridDimensionsSelector = createRootSelector(state => state.dimensions);\n\n/**\n * Get the summed width of all the visible columns.\n * @category Visible Columns\n */\nexport const gridColumnsTotalWidthSelector = createSelector(gridDimensionsSelector, dimensions => dimensions.columnsTotalWidth);\nexport const gridRowHeightSelector = createSelector(gridDimensionsSelector, dimensions => dimensions.rowHeight);\nexport const gridContentHeightSelector = createSelector(gridDimensionsSelector, dimensions => dimensions.contentSize.height);\nexport const gridHasScrollXSelector = createSelector(gridDimensionsSelector, dimensions => dimensions.hasScrollX);\nexport const gridHasScrollYSelector = createSelector(gridDimensionsSelector, dimensions => dimensions.hasScrollY);\nexport const gridHasFillerSelector = createSelector(gridDimensionsSelector, dimensions => dimensions.columnsTotalWidth < dimensions.viewportOuterSize.width);\nexport const gridHeaderHeightSelector = createSelector(gridDimensionsSelector, dimensions => dimensions.headerHeight);\nexport const gridGroupHeaderHeightSelector = createSelector(gridDimensionsSelector, dimensions => dimensions.groupHeaderHeight);\nexport const gridHeaderFilterHeightSelector = createSelector(gridDimensionsSelector, dimensions => dimensions.headerFilterHeight);\nexport const gridHorizontalScrollbarHeightSelector = createSelector(gridDimensionsSelector, dimensions => dimensions.hasScrollX ? dimensions.scrollbarSize : 0);\nexport const gridVerticalScrollbarWidthSelector = createSelector(gridDimensionsSelector, dimensions => dimensions.hasScrollY ? dimensions.scrollbarSize : 0);\nexport const gridHasBottomFillerSelector = createSelector(gridDimensionsSelector, gridHorizontalScrollbarHeightSelector, (dimensions, height) => {\n const needsLastRowBorder = dimensions.viewportOuterSize.height - dimensions.minimumSize.height > 0;\n if (height === 0 && !needsLastRowBorder) {\n return false;\n }\n return true;\n});","import { createRootSelector } from \"../../../utils/createSelector.mjs\";\nexport const gridRowsMetaSelector = createRootSelector(state => state.rowsMeta);","import { createRootSelector, createSelector, createSelectorMemoized } from \"../../../utils/createSelector.mjs\";\nexport const gridRowsStateSelector = createRootSelector(state => state.rows);\nexport const gridRowCountSelector = createSelector(gridRowsStateSelector, rows => rows.totalRowCount);\nexport const gridRowsLoadingSelector = createSelector(gridRowsStateSelector, rows => rows.loading);\nexport const gridTopLevelRowCountSelector = createSelector(gridRowsStateSelector, rows => rows.totalTopLevelRowCount);\n\n// TODO rows v6: Rename\nexport const gridRowsLookupSelector = createSelector(gridRowsStateSelector, rows => rows.dataRowIdToModelLookup);\n\n/**\n * @category Rows\n */\nexport const gridRowSelector = createSelector(gridRowsLookupSelector, (rows, id) => rows[id]);\nexport const gridRowTreeSelector = createSelector(gridRowsStateSelector, rows => rows.tree);\n\n/**\n * @category Rows\n */\nexport const gridRowNodeSelector = createSelector(gridRowTreeSelector, (rowTree, rowId) => rowTree[rowId]);\nexport const gridRowGroupsToFetchSelector = createSelector(gridRowsStateSelector, rows => rows.groupsToFetch);\nexport const gridRowGroupingNameSelector = createSelector(gridRowsStateSelector, rows => rows.groupingName);\nexport const gridRowTreeDepthsSelector = createSelector(gridRowsStateSelector, rows => rows.treeDepths);\nexport const gridRowMaximumTreeDepthSelector = createSelectorMemoized(gridRowsStateSelector, rows => {\n const entries = Object.entries(rows.treeDepths);\n if (entries.length === 0) {\n return 1;\n }\n return (entries.filter(([, nodeCount]) => nodeCount > 0).map(([depth]) => Number(depth)).sort((a, b) => b - a)[0] ?? 0) + 1;\n});\n\n/**\n * @category Rows\n */\nexport const gridDataRowIdsSelector = createSelector(gridRowsStateSelector, rows => rows.dataRowIds);\nexport const gridDataRowsSelector = createSelectorMemoized(gridDataRowIdsSelector, gridRowsLookupSelector, (dataRowIds, rowsLookup) => dataRowIds.reduce((acc, id) => {\n if (!rowsLookup[id]) {\n return acc;\n }\n acc.push(rowsLookup[id]);\n return acc;\n}, []));\n\n/**\n * @ignore - do not document.\n */\nexport const gridAdditionalRowGroupsSelector = createSelector(gridRowsStateSelector, rows => rows?.additionalRowGroups);\n\n/**\n * @ignore - do not document.\n */\nexport const gridPinnedRowsSelector = createSelectorMemoized(gridAdditionalRowGroupsSelector, additionalRowGroups => {\n const rawPinnedRows = additionalRowGroups?.pinnedRows;\n return {\n bottom: rawPinnedRows?.bottom?.map(rowEntry => ({\n id: rowEntry.id,\n model: rowEntry.model ?? {}\n })) ?? [],\n top: rawPinnedRows?.top?.map(rowEntry => ({\n id: rowEntry.id,\n model: rowEntry.model ?? {}\n })) ?? []\n };\n});\n\n/**\n * @ignore - do not document.\n */\nexport const gridPinnedRowsCountSelector = createSelector(gridPinnedRowsSelector, pinnedRows => {\n return (pinnedRows?.top?.length || 0) + (pinnedRows?.bottom?.length || 0);\n});","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _formatErrorMessage from \"@mui/x-internals/formatErrorMessage\";\nimport { gridRowNodeSelector } from \"./gridRowsSelector.mjs\";\nexport const GRID_ROOT_GROUP_ID = `auto-generated-group-node-root`;\nexport const GRID_ID_AUTOGENERATED = Symbol('mui.id_autogenerated');\nexport const buildRootGroup = () => ({\n type: 'group',\n id: GRID_ROOT_GROUP_ID,\n depth: -1,\n groupingField: null,\n groupingKey: null,\n isAutoGenerated: true,\n children: [],\n // Prototype-less so user-supplied grouping values like `'constructor'`\n // or `'__proto__'` cannot collide with `Object.prototype` properties.\n childrenFromPath: Object.create(null),\n childrenExpanded: true,\n parent: null\n});\n\n/**\n * A helper function to check if the id provided is valid.\n * @param {GridRowId} id Id as [[GridRowId]].\n * @param {GridRowModel | Partial} row Row as [[GridRowModel]].\n * @param {string} detailErrorMessage A custom error message to display for invalid IDs\n */\nexport function checkGridRowIdIsValid(id, row, detailErrorMessage = 'A row was provided without id in the rows prop:') {\n if (id == null) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? `MUI X: The Data Grid component requires all rows to have a unique \\`id\\` property.\nAlternatively, you can use the \\`getRowId\\` prop to specify a custom id for each row.\n${detailErrorMessage}\n${JSON.stringify(row)}` : _formatErrorMessage(85, detailErrorMessage, JSON.stringify(row)));\n }\n}\nexport const getRowIdFromRowModel = (rowModel, getRowId, detailErrorMessage) => {\n const id = getRowId ? getRowId(rowModel) : rowModel.id;\n checkGridRowIdIsValid(id, rowModel, detailErrorMessage);\n return id;\n};\nexport const getRowValue = (row, colDef, apiRef) => {\n if (!colDef) {\n return undefined;\n }\n if (!colDef.valueGetter) {\n return row[colDef.field];\n }\n const value = row[colDef.field];\n return colDef.valueGetter(value, row, colDef, apiRef);\n};\nexport const createRowsInternalCache = ({\n rows,\n getRowId,\n loading,\n rowCount\n}) => {\n const updates = {\n type: 'full',\n rows: []\n };\n const dataRowIdToModelLookup = {};\n for (let i = 0; i < rows.length; i += 1) {\n const model = rows[i];\n const id = getRowIdFromRowModel(model, getRowId);\n dataRowIdToModelLookup[id] = model;\n updates.rows.push(id);\n }\n return {\n rowsBeforePartialUpdates: rows,\n loadingPropBeforePartialUpdates: loading,\n rowCountPropBeforePartialUpdates: rowCount,\n updates,\n dataRowIdToModelLookup\n };\n};\nexport const getTopLevelRowCount = ({\n tree,\n rowCountProp = 0\n}) => {\n const rootGroupNode = tree[GRID_ROOT_GROUP_ID];\n return Math.max(rowCountProp, rootGroupNode.children.length + (rootGroupNode.footerId == null ? 0 : 1));\n};\nexport const getRowsStateFromCache = ({\n apiRef,\n rowCountProp = 0,\n loadingProp,\n previousTree,\n previousTreeDepths,\n previousGroupsToFetch\n}) => {\n const cache = apiRef.current.caches.rows;\n\n // 1. Apply the \"rowTreeCreation\" family processing.\n const {\n tree: unProcessedTree,\n treeDepths: unProcessedTreeDepths,\n dataRowIds: unProcessedDataRowIds,\n groupingName,\n groupsToFetch = []\n } = apiRef.current.applyStrategyProcessor('rowTreeCreation', {\n previousTree,\n previousTreeDepths,\n updates: cache.updates,\n dataRowIdToModelLookup: cache.dataRowIdToModelLookup,\n previousGroupsToFetch\n });\n\n // 2. Apply the \"hydrateRows\" pipe-processing.\n const groupingParamsWithHydrateRows = apiRef.current.unstable_applyPipeProcessors('hydrateRows', {\n tree: unProcessedTree,\n treeDepths: unProcessedTreeDepths,\n dataRowIds: unProcessedDataRowIds,\n dataRowIdToModelLookup: cache.dataRowIdToModelLookup\n });\n\n // 3. Reset the cache updates\n apiRef.current.caches.rows.updates = {\n type: 'partial',\n actions: {\n insert: [],\n modify: [],\n remove: []\n },\n idToActionLookup: {}\n };\n return _extends({}, groupingParamsWithHydrateRows, {\n totalRowCount: Math.max(rowCountProp, groupingParamsWithHydrateRows.dataRowIds.length),\n totalTopLevelRowCount: getTopLevelRowCount({\n tree: groupingParamsWithHydrateRows.tree,\n rowCountProp\n }),\n groupingName,\n loading: loadingProp,\n groupsToFetch\n });\n};\nexport const isAutogeneratedRow = row => GRID_ID_AUTOGENERATED in row;\nexport const isAutogeneratedRowNode = rowNode => rowNode.type === 'skeletonRow' || rowNode.type === 'footer' || rowNode.type === 'group' && rowNode.isAutoGenerated || rowNode.type === 'pinnedRow' && rowNode.isAutoGenerated;\nexport const getTreeNodeDescendants = (tree, parentId, skipAutoGeneratedRows, directChildrenOnly) => {\n const node = tree[parentId];\n if (node?.type !== 'group') {\n return [];\n }\n const validDescendants = [];\n for (let i = 0; i < node.children.length; i += 1) {\n const child = node.children[i];\n if (!skipAutoGeneratedRows || !isAutogeneratedRowNode(tree[child])) {\n validDescendants.push(child);\n }\n if (directChildrenOnly) {\n continue;\n }\n const childDescendants = getTreeNodeDescendants(tree, child, skipAutoGeneratedRows, directChildrenOnly);\n for (let j = 0; j < childDescendants.length; j += 1) {\n validDescendants.push(childDescendants[j]);\n }\n }\n if (!skipAutoGeneratedRows && node.footerId != null) {\n validDescendants.push(node.footerId);\n }\n return validDescendants;\n};\nexport const updateCacheWithNewRows = ({\n previousCache,\n getRowId,\n updates,\n groupKeys\n}) => {\n if (previousCache.updates.type === 'full') {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'MUI X: Unable to prepare a partial update if a full update is not applied yet.' : _formatErrorMessage(86));\n }\n\n // Remove duplicate updates.\n // A server can batch updates, and send several updates for the same row in one fn call.\n const uniqueUpdates = new Map();\n updates.forEach(update => {\n const id = getRowIdFromRowModel(update, getRowId, 'A row was provided without id when calling updateRows():');\n if (uniqueUpdates.has(id)) {\n uniqueUpdates.set(id, _extends({}, uniqueUpdates.get(id), update));\n } else {\n uniqueUpdates.set(id, update);\n }\n });\n const partialUpdates = {\n type: 'partial',\n actions: {\n insert: [...(previousCache.updates.actions.insert ?? [])],\n modify: [...(previousCache.updates.actions.modify ?? [])],\n remove: [...(previousCache.updates.actions.remove ?? [])]\n },\n idToActionLookup: _extends({}, previousCache.updates.idToActionLookup),\n groupKeys\n };\n const dataRowIdToModelLookup = _extends({}, previousCache.dataRowIdToModelLookup);\n const alreadyAppliedActionsToRemove = {\n insert: {},\n modify: {},\n remove: {}\n };\n\n // Depending on the action already applied to the data row,\n // We might want drop the already-applied-update.\n // For instance:\n // - if you delete then insert, then you don't want to apply the deletion in the tree.\n // - if you insert, then modify, then you just want to apply the insertion in the tree.\n uniqueUpdates.forEach((partialRow, id) => {\n const actionAlreadyAppliedToRow = partialUpdates.idToActionLookup[id];\n\n // Action === \"delete\"\n // eslint-disable-next-line no-underscore-dangle\n if (partialRow._action === 'delete') {\n // If the data row has been removed since the last state update,\n // Then do nothing.\n if (actionAlreadyAppliedToRow === 'remove' || !dataRowIdToModelLookup[id]) {\n return;\n }\n\n // If the data row has been inserted / modified since the last state update,\n // Then drop this \"insert\" / \"modify\" update.\n if (actionAlreadyAppliedToRow != null) {\n alreadyAppliedActionsToRemove[actionAlreadyAppliedToRow][id] = true;\n }\n\n // Remove the data row from the lookups and add it to the \"delete\" update.\n partialUpdates.actions.remove.push(id);\n delete dataRowIdToModelLookup[id];\n return;\n }\n const oldRow = dataRowIdToModelLookup[id];\n\n // Action === \"modify\"\n if (oldRow) {\n // If the data row has been removed since the last state update,\n // Then drop this \"remove\" update and add it to the \"modify\" update instead.\n if (actionAlreadyAppliedToRow === 'remove') {\n alreadyAppliedActionsToRemove.remove[id] = true;\n partialUpdates.actions.modify.push(id);\n }\n // If the date has not been inserted / modified since the last state update,\n // Then add it to the \"modify\" update (if it has been inserted it should just remain \"inserted\").\n else if (actionAlreadyAppliedToRow == null) {\n partialUpdates.actions.modify.push(id);\n }\n\n // Update the data row lookups.\n // Prototype-preservation rules:\n // 1. If partialRow is a class instance (non-plain object), use its prototype — the\n // caller is passing in a fully-constructed instance and owns the prototype chain.\n // 2. If partialRow is a plain object (Object.prototype), prefer oldRow's prototype so\n // that a partial-update object does not silently discard the existing row's class.\n // 3. If both are plain objects the result is also a plain object (no-op).\n //\n // Note: private class fields (#field syntax) cannot be preserved through a spread-style\n // merge because the brand check is tied to the original instance. Rows that rely on\n // private fields must supply a fully-constructed instance as partialRow (rule 1 above)\n // rather than a plain-object partial update.\n const partialRowProto = Object.getPrototypeOf(partialRow);\n const isPartialRowPlain = partialRowProto === Object.prototype || partialRowProto === null;\n const proto = isPartialRowPlain ? Object.getPrototypeOf(oldRow) : partialRowProto;\n const merged = Object.create(proto);\n Object.assign(merged, oldRow, partialRow);\n dataRowIdToModelLookup[id] = merged;\n return;\n }\n\n // Action === \"insert\"\n // If the data row has been removed since the last state update,\n // Then drop the \"remove\" update and add it to the \"insert\" update instead.\n if (actionAlreadyAppliedToRow === 'remove') {\n alreadyAppliedActionsToRemove.remove[id] = true;\n partialUpdates.actions.insert.push(id);\n }\n // If the data row has not been inserted since the last state update,\n // Then add it to the \"insert\" update.\n // `actionAlreadyAppliedToRow` can't be equal to \"modify\", otherwise we would have an `oldRow` above.\n else if (actionAlreadyAppliedToRow == null) {\n partialUpdates.actions.insert.push(id);\n }\n\n // Update the data row lookups.\n dataRowIdToModelLookup[id] = partialRow;\n });\n const actionTypeWithActionsToRemove = Object.keys(alreadyAppliedActionsToRemove);\n for (let i = 0; i < actionTypeWithActionsToRemove.length; i += 1) {\n const actionType = actionTypeWithActionsToRemove[i];\n const idsToRemove = alreadyAppliedActionsToRemove[actionType];\n if (Object.keys(idsToRemove).length > 0) {\n partialUpdates.actions[actionType] = partialUpdates.actions[actionType].filter(id => !idsToRemove[id]);\n }\n }\n return {\n dataRowIdToModelLookup,\n updates: partialUpdates,\n rowsBeforePartialUpdates: previousCache.rowsBeforePartialUpdates,\n loadingPropBeforePartialUpdates: previousCache.loadingPropBeforePartialUpdates,\n rowCountPropBeforePartialUpdates: previousCache.rowCountPropBeforePartialUpdates\n };\n};\nexport const minimalContentHeight = 'var(--DataGrid-overlayHeight, calc(var(--height) * 2))';\nexport function computeRowsUpdates(apiRef, updates, getRowId) {\n const nonPinnedRowsUpdates = [];\n updates.forEach(update => {\n const id = getRowIdFromRowModel(update, getRowId, 'A row was provided without id when calling updateRows():');\n const rowNode = gridRowNodeSelector(apiRef, id);\n if (rowNode?.type === 'pinnedRow') {\n // @ts-ignore because otherwise `release:build` doesn't work\n const pinnedRowsCache = apiRef.current.caches.pinnedRows;\n const prevModel = pinnedRowsCache.idLookup[id];\n if (prevModel) {\n pinnedRowsCache.idLookup[id] = _extends({}, prevModel, update);\n }\n } else {\n nonPinnedRowsUpdates.push(update);\n }\n });\n return nonPinnedRowsUpdates;\n}\nlet warnedOnceInvalidRowHeight = false;\nexport const getValidRowHeight = (rowHeightProp, defaultRowHeight, warningMessage) => {\n if (typeof rowHeightProp === 'number' && rowHeightProp > 0) {\n return rowHeightProp;\n }\n if (process.env.NODE_ENV !== 'production' && !warnedOnceInvalidRowHeight && typeof rowHeightProp !== 'undefined' && rowHeightProp !== null) {\n console.warn(warningMessage);\n warnedOnceInvalidRowHeight = true;\n }\n return defaultRowHeight;\n};\nexport const rowHeightWarning = [`MUI X: The \\`rowHeight\\` prop should be a number greater than 0.`, `The default value will be used instead.`].join('\\n');","import * as React from 'react';\nimport { fastObjectShallowCompare } from \"../fastObjectShallowCompare/index.mjs\";\nexport function fastMemo(component) {\n return /*#__PURE__*/React.memo(component, fastObjectShallowCompare);\n}","// A guide to feature toggling (deprecated)\n//\n// The feature toggle is:\n// - independent from the NODE_ENV\n// - isn't pruning code in production, as the objective is to eventually ship the code.\n// - doesn't allow to cherry-pick which feature to enable\n//\n// By default, the experimental features are only enabled in:\n// - the local environment\n// - the pull request previews\n//\n// Reviewers can force the value with the local storage and the GRID_EXPERIMENTAL_ENABLED key:\n// - 'true' => force it to be enabled\n// - 'false' => force it to be disabled\n//\n// Developers (users) are discouraged to enable the experimental feature by setting the GRID_EXPERIMENTAL_ENABLED env.\n// Instead, prefer exposing experimental APIs, for instance, a prop or a new `unstable_` module.\n\nexport const GRID_EXPERIMENTAL_ENABLED = false;","export const getGridLocalization = gridTranslations => ({\n components: {\n MuiDataGrid: {\n defaultProps: {\n localeText: gridTranslations\n }\n }\n }\n});\nexport const formatNumber = (value, locale) => {\n const numValue = typeof value === 'string' ? Number(value) : value;\n if (!Number.isFinite(numValue)) {\n return String(value);\n }\n if (typeof Intl !== 'undefined' && Intl.NumberFormat) {\n try {\n return new Intl.NumberFormat(locale).format(numValue);\n } catch {\n return String(numValue);\n }\n }\n return String(numValue);\n};\n\n// Helper to create formatNumber with a specific locale\nexport const buildLocaleFormat = locale => {\n return value => formatNumber(value, locale);\n};","import { buildLocaleFormat } from \"../utils/getGridLocalization.mjs\";\nconst formatNumber = buildLocaleFormat('en-US');\nexport const GRID_DEFAULT_LOCALE_TEXT = {\n // Root\n noRowsLabel: 'No rows',\n noResultsOverlayLabel: 'No results found.',\n noColumnsOverlayLabel: 'No columns',\n noColumnsOverlayManageColumns: 'Manage columns',\n emptyPivotOverlayLabel: 'Add fields to rows, columns, and values to create a pivot table',\n // Density selector toolbar button text\n toolbarDensity: 'Density',\n toolbarDensityLabel: 'Density',\n toolbarDensityCompact: 'Compact',\n toolbarDensityStandard: 'Standard',\n toolbarDensityComfortable: 'Comfortable',\n // Undo/redo toolbar button text\n toolbarUndo: 'Undo',\n toolbarRedo: 'Redo',\n // Columns selector toolbar button text\n toolbarColumns: 'Columns',\n toolbarColumnsLabel: 'Select columns',\n // Filters toolbar button text\n toolbarFilters: 'Filters',\n toolbarFiltersLabel: 'Show filters',\n toolbarFiltersTooltipHide: 'Hide filters',\n toolbarFiltersTooltipShow: 'Show filters',\n toolbarFiltersTooltipActive: count => count !== 1 ? `${count} active filters` : `${count} active filter`,\n // Quick filter toolbar field\n toolbarQuickFilterPlaceholder: 'Search…',\n toolbarQuickFilterLabel: 'Search',\n toolbarQuickFilterDeleteIconLabel: 'Clear',\n // Export selector toolbar button text\n toolbarExport: 'Export',\n toolbarExportLabel: 'Export',\n toolbarExportCSV: 'Download as CSV',\n toolbarExportPrint: 'Print',\n toolbarExportExcel: 'Download as Excel',\n // Toolbar pivot button\n toolbarPivot: 'Pivot',\n // Toolbar charts button\n toolbarCharts: 'Charts',\n // Toolbar AI Assistant button\n toolbarAssistant: 'AI Assistant',\n // Columns management text\n columnsManagementSearchTitle: 'Search',\n columnsManagementNoColumns: 'No columns',\n columnsManagementShowHideAllText: 'Show/Hide All',\n columnsManagementReset: 'Reset',\n columnsManagementDeleteIconLabel: 'Clear',\n // Filter panel text\n filterPanelAddFilter: 'Add filter',\n filterPanelRemoveAll: 'Remove all',\n filterPanelDeleteIconLabel: 'Delete',\n filterPanelLogicOperator: 'Logic operator',\n filterPanelOperator: 'Operator',\n filterPanelOperatorAnd: 'And',\n filterPanelOperatorOr: 'Or',\n filterPanelColumn: 'Column',\n filterPanelInputLabel: 'Value',\n filterPanelInputPlaceholder: 'Filter value',\n // Filter operators text\n filterOperatorContains: 'contains',\n filterOperatorDoesNotContain: 'does not contain',\n filterOperatorEquals: 'equals',\n filterOperatorDoesNotEqual: 'does not equal',\n filterOperatorStartsWith: 'starts with',\n filterOperatorEndsWith: 'ends with',\n filterOperatorIs: 'is',\n filterOperatorNot: 'is not',\n filterOperatorAfter: 'is after',\n filterOperatorOnOrAfter: 'is on or after',\n filterOperatorBefore: 'is before',\n filterOperatorOnOrBefore: 'is on or before',\n filterOperatorIsEmpty: 'is empty',\n filterOperatorIsNotEmpty: 'is not empty',\n filterOperatorIsAnyOf: 'is any of',\n 'filterOperator=': '=',\n 'filterOperator!=': '!=',\n 'filterOperator>': '>',\n 'filterOperator>=': '>=',\n 'filterOperator<': '<',\n 'filterOperator<=': '<=',\n // Header filter operators text\n headerFilterOperatorContains: 'Contains',\n headerFilterOperatorDoesNotContain: 'Does not contain',\n headerFilterOperatorEquals: 'Equals',\n headerFilterOperatorDoesNotEqual: 'Does not equal',\n headerFilterOperatorStartsWith: 'Starts with',\n headerFilterOperatorEndsWith: 'Ends with',\n headerFilterOperatorIs: 'Is',\n headerFilterOperatorNot: 'Is not',\n headerFilterOperatorAfter: 'Is after',\n headerFilterOperatorOnOrAfter: 'Is on or after',\n headerFilterOperatorBefore: 'Is before',\n headerFilterOperatorOnOrBefore: 'Is on or before',\n headerFilterOperatorIsEmpty: 'Is empty',\n headerFilterOperatorIsNotEmpty: 'Is not empty',\n headerFilterOperatorIsAnyOf: 'Is any of',\n 'headerFilterOperator=': 'Equals',\n 'headerFilterOperator!=': 'Not equals',\n 'headerFilterOperator>': 'Greater than',\n 'headerFilterOperator>=': 'Greater than or equal to',\n 'headerFilterOperator<': 'Less than',\n 'headerFilterOperator<=': 'Less than or equal to',\n headerFilterClear: 'Clear filter',\n // Filter values text\n filterValueAny: 'any',\n filterValueTrue: 'true',\n filterValueFalse: 'false',\n // Column menu text\n columnMenuLabel: 'Menu',\n columnMenuAriaLabel: columnName => `${columnName} column menu`,\n columnMenuShowColumns: 'Show columns',\n columnMenuManageColumns: 'Manage columns',\n columnMenuFilter: 'Filter',\n columnMenuHideColumn: 'Hide column',\n columnMenuUnsort: 'Unsort',\n columnMenuSortAsc: 'Sort by ASC',\n columnMenuSortDesc: 'Sort by DESC',\n columnMenuManagePivot: 'Manage pivot',\n columnMenuManageCharts: 'Manage charts',\n // Column header text\n columnHeaderFiltersTooltipActive: count => count !== 1 ? `${count} active filters` : `${count} active filter`,\n columnHeaderFiltersLabel: 'Show filters',\n columnHeaderSortIconLabel: 'Sort',\n // Rows selected footer text\n footerRowSelected: count => count !== 1 ? `${count.toLocaleString()} rows selected` : `${count.toLocaleString()} row selected`,\n // Total row amount footer text\n footerTotalRows: 'Total Rows:',\n // Total visible row amount footer text\n footerTotalVisibleRows: (visibleCount, totalCount) => `${visibleCount.toLocaleString()} of ${totalCount.toLocaleString()}`,\n // Checkbox selection text\n checkboxSelectionHeaderName: 'Checkbox selection',\n checkboxSelectionSelectAllRows: 'Select all rows',\n checkboxSelectionUnselectAllRows: 'Unselect all rows',\n checkboxSelectionSelectRow: 'Select row',\n checkboxSelectionUnselectRow: 'Unselect row',\n // Boolean cell text\n booleanCellTrueLabel: 'yes',\n booleanCellFalseLabel: 'no',\n // Long text cell\n longTextCellExpandLabel: 'Expand',\n longTextCellCollapseLabel: 'Collapse',\n // Actions cell more text\n actionsCellMore: 'more',\n // Column pinning text\n pinToLeft: 'Pin to left',\n pinToRight: 'Pin to right',\n unpin: 'Unpin',\n // Tree Data\n treeDataGroupingHeaderName: 'Group',\n treeDataExpand: 'see children',\n treeDataCollapse: 'hide children',\n // Grouping columns\n groupingColumnHeaderName: 'Group',\n groupColumn: name => `Group by ${name}`,\n unGroupColumn: name => `Stop grouping by ${name}`,\n // Master/detail\n detailPanelToggle: 'Detail panel toggle',\n expandDetailPanel: 'Expand',\n collapseDetailPanel: 'Collapse',\n // Pagination\n paginationRowsPerPage: 'Rows per page:',\n paginationDisplayedRows: ({\n from,\n to,\n count,\n estimated\n }) => {\n const unknownRowCount = count == null || count === -1;\n if (!estimated) {\n return `${formatNumber(from)}–${formatNumber(to)} of ${!unknownRowCount ? formatNumber(count) : `more than ${formatNumber(to)}`}`;\n }\n const estimatedLabel = estimated && estimated > to ? `around ${formatNumber(estimated)}` : `more than ${formatNumber(to)}`;\n return `${formatNumber(from)}–${formatNumber(to)} of ${!unknownRowCount ? formatNumber(count) : estimatedLabel}`;\n },\n paginationItemAriaLabel: type => {\n if (type === 'first') {\n return 'Go to first page';\n }\n if (type === 'last') {\n return 'Go to last page';\n }\n if (type === 'next') {\n return 'Go to next page';\n }\n // if (type === 'previous') {\n return 'Go to previous page';\n },\n // Row reordering text\n rowReorderingHeaderName: 'Row reordering',\n // Aggregation\n aggregationMenuItemHeader: 'Aggregation',\n aggregationFunctionLabelNone: 'none',\n aggregationFunctionLabelSum: 'sum',\n aggregationFunctionLabelAvg: 'avg',\n aggregationFunctionLabelMin: 'min',\n aggregationFunctionLabelMax: 'max',\n aggregationFunctionLabelSize: 'size',\n // Pivot panel\n pivotToggleLabel: 'Pivot',\n pivotRows: 'Rows',\n pivotColumns: 'Columns',\n pivotValues: 'Values',\n pivotCloseButton: 'Close pivot settings',\n pivotSearchButton: 'Search fields',\n pivotSearchControlPlaceholder: 'Search fields',\n pivotSearchControlLabel: 'Search fields',\n pivotSearchControlClear: 'Clear search',\n pivotNoFields: 'No fields',\n pivotMenuMoveUp: 'Move up',\n pivotMenuMoveDown: 'Move down',\n pivotMenuMoveToTop: 'Move to top',\n pivotMenuMoveToBottom: 'Move to bottom',\n pivotMenuRows: 'Rows',\n pivotMenuColumns: 'Columns',\n pivotMenuValues: 'Values',\n pivotMenuOptions: 'Field options',\n pivotMenuAddToRows: 'Add to Rows',\n pivotMenuAddToColumns: 'Add to Columns',\n pivotMenuAddToValues: 'Add to Values',\n pivotMenuRemove: 'Remove',\n pivotDragToRows: 'Drag here to create rows',\n pivotDragToColumns: 'Drag here to create columns',\n pivotDragToValues: 'Drag here to create values',\n pivotYearColumnHeaderName: '(Year)',\n pivotQuarterColumnHeaderName: '(Quarter)',\n // Charts configuration panel\n chartsNoCharts: 'There are no charts available',\n chartsChartNotSelected: 'Select a chart type to configure its options',\n chartsTabChart: 'Chart',\n chartsTabFields: 'Fields',\n chartsTabCustomize: 'Customize',\n chartsCloseButton: 'Close charts configuration',\n chartsSyncButtonLabel: 'Sync chart',\n chartsSearchPlaceholder: 'Search fields',\n chartsSearchLabel: 'Search fields',\n chartsSearchClear: 'Clear search',\n chartsNoFields: 'No fields',\n chartsFieldBlocked: 'This field cannot be added to any section',\n chartsCategories: 'Categories',\n chartsSeries: 'Series',\n chartsMenuAddToDimensions: dimensionLabel => `Add to ${dimensionLabel}`,\n chartsMenuAddToValues: valuesLabel => `Add to ${valuesLabel}`,\n chartsMenuMoveUp: 'Move up',\n chartsMenuMoveDown: 'Move down',\n chartsMenuMoveToTop: 'Move to top',\n chartsMenuMoveToBottom: 'Move to bottom',\n chartsMenuOptions: 'Field options',\n chartsMenuRemove: 'Remove',\n chartsDragToDimensions: dimensionLabel => `Drag here to use column as ${dimensionLabel}`,\n chartsDragToValues: valuesLabel => `Drag here to use column as ${valuesLabel}`,\n // AI Assistant panel\n aiAssistantPanelTitle: 'AI Assistant',\n aiAssistantPanelClose: 'Close AI Assistant',\n aiAssistantPanelNewConversation: 'New conversation',\n aiAssistantPanelConversationHistory: 'Conversation history',\n aiAssistantPanelEmptyConversation: 'No prompt history',\n aiAssistantSuggestions: 'Suggestions',\n // Prompt field\n promptFieldLabel: 'Prompt',\n promptFieldPlaceholder: 'Type a prompt…',\n promptFieldPlaceholderWithRecording: 'Type or record a prompt…',\n promptFieldPlaceholderListening: 'Listening for prompt…',\n promptFieldSpeechRecognitionNotSupported: 'Speech recognition is not supported in this browser',\n promptFieldSend: 'Send',\n promptFieldRecord: 'Record',\n promptFieldStopRecording: 'Stop recording',\n // Prompt\n promptRerun: 'Run again',\n promptProcessing: 'Processing…',\n promptAppliedChanges: 'Applied changes',\n // Prompt changes\n promptChangeGroupDescription: column => `Group by ${column}`,\n promptChangeAggregationLabel: (column, aggregation) => `${column} (${aggregation})`,\n promptChangeAggregationDescription: (column, aggregation) => `Aggregate ${column} (${aggregation})`,\n promptChangeFilterLabel: (column, operator, value) => {\n if (operator === 'is any of') {\n return `${column} is any of: ${value}`;\n }\n return `${column} ${operator} ${value}`;\n },\n promptChangeFilterDescription: (column, operator, value) => {\n if (operator === 'is any of') {\n return `Filter where ${column} is any of: ${value}`;\n }\n return `Filter where ${column} ${operator} ${value}`;\n },\n promptChangeSortDescription: (column, direction) => `Sort by ${column} (${direction})`,\n promptChangePivotEnableLabel: 'Pivot',\n promptChangePivotEnableDescription: 'Enable pivot',\n promptChangePivotColumnsLabel: count => `Columns (${count})`,\n promptChangePivotColumnsDescription: (column, direction) => `${column}${direction ? ` (${direction})` : ''}`,\n promptChangePivotRowsLabel: count => `Rows (${count})`,\n promptChangePivotValuesLabel: count => `Values (${count})`,\n promptChangePivotValuesDescription: (column, aggregation) => `${column} (${aggregation})`,\n promptChangeChartsLabel: (dimensionsCount, valuesCount) => `Dimensions (${dimensionsCount}), Values (${valuesCount})`\n};","/**\n * Signal to the underlying logic what version of the public component API\n * of the Data Grid is exposed.\n */\nexport let GridSignature = /*#__PURE__*/function (GridSignature) {\n GridSignature[\"DataGrid\"] = \"DataGrid\";\n GridSignature[\"DataGridPro\"] = \"DataGridPro\";\n GridSignature[\"DataGridPremium\"] = \"DataGridPremium\";\n return GridSignature;\n}({});","// If no effect ran after this amount of time, we assume that the render was not committed by React\nconst CLEANUP_TIMER_LOOP_MILLIS = 1000;\nexport class TimerBasedCleanupTracking {\n timeouts = new Map();\n cleanupTimeout = CLEANUP_TIMER_LOOP_MILLIS;\n constructor(timeout = CLEANUP_TIMER_LOOP_MILLIS) {\n this.cleanupTimeout = timeout;\n }\n register(object, unsubscribe, unregisterToken) {\n if (!this.timeouts) {\n this.timeouts = new Map();\n }\n const timeout = setTimeout(() => {\n if (typeof unsubscribe === 'function') {\n unsubscribe();\n }\n this.timeouts.delete(unregisterToken.cleanupToken);\n }, this.cleanupTimeout);\n this.timeouts.set(unregisterToken.cleanupToken, timeout);\n }\n unregister(unregisterToken) {\n const timeout = this.timeouts.get(unregisterToken.cleanupToken);\n if (timeout) {\n this.timeouts.delete(unregisterToken.cleanupToken);\n clearTimeout(timeout);\n }\n }\n reset() {\n if (this.timeouts) {\n this.timeouts.forEach((value, key) => {\n this.unregister({\n cleanupToken: key\n });\n });\n this.timeouts = undefined;\n }\n }\n}","export class FinalizationRegistryBasedCleanupTracking {\n registry = new FinalizationRegistry(unsubscribe => {\n if (typeof unsubscribe === 'function') {\n unsubscribe();\n }\n });\n register(object, unsubscribe, unregisterToken) {\n this.registry.register(object, unsubscribe, unregisterToken);\n }\n unregister(unregisterToken) {\n this.registry.unregister(unregisterToken);\n }\n reset() {}\n}","'use client';\n\nimport * as React from 'react';\nimport { TimerBasedCleanupTracking } from \"../../utils/cleanupTracking/TimerBasedCleanupTracking.mjs\";\nimport { FinalizationRegistryBasedCleanupTracking } from \"../../utils/cleanupTracking/FinalizationRegistryBasedCleanupTracking.mjs\";\n// Based on https://github.com/Bnaya/use-dispose-uncommitted/blob/main/src/finalization-registry-based-impl.ts\n// Check https://github.com/react/react/issues/15317 to get more information\n\n// We use class to make it easier to detect in heap snapshots by name\nclass ObjectToBeRetainedByReact {\n static create() {\n return new ObjectToBeRetainedByReact();\n }\n}\nconst registryContainer = {\n current: createRegistry()\n};\nlet cleanupTokensCounter = 0;\nexport function useGridEvent(apiRef, eventName, handler, options) {\n const objectRetainedByReact = React.useState(ObjectToBeRetainedByReact.create)[0];\n const subscription = React.useRef(null);\n const handlerRef = React.useRef(null);\n handlerRef.current = handler;\n const cleanupTokenRef = React.useRef(null);\n if (!subscription.current && handlerRef.current) {\n const enhancedHandler = (params, event, details) => {\n // Check for the existence of the event once more to avoid Safari 26 issue\n // https://github.com/mui/mui-x/issues/20159\n if (event && !event.defaultMuiPrevented) {\n handlerRef.current?.(params, event, details);\n }\n };\n subscription.current = apiRef.current.subscribeEvent(eventName, enhancedHandler, options);\n cleanupTokensCounter += 1;\n cleanupTokenRef.current = {\n cleanupToken: cleanupTokensCounter\n };\n registryContainer.current.register(objectRetainedByReact,\n // The callback below will be called once this reference stops being retained\n () => {\n subscription.current?.();\n subscription.current = null;\n cleanupTokenRef.current = null;\n }, cleanupTokenRef.current);\n } else if (!handlerRef.current && subscription.current) {\n subscription.current();\n subscription.current = null;\n if (cleanupTokenRef.current) {\n registryContainer.current.unregister(cleanupTokenRef.current);\n cleanupTokenRef.current = null;\n }\n }\n React.useEffect(() => {\n if (!subscription.current && handlerRef.current) {\n const enhancedHandler = (params, event, details) => {\n // Check for the existence of the event once more to avoid Safari 26 issue\n // https://github.com/mui/mui-x/issues/20159\n if (event && !event.defaultMuiPrevented) {\n handlerRef.current?.(params, event, details);\n }\n };\n subscription.current = apiRef.current.subscribeEvent(eventName, enhancedHandler, options);\n }\n if (cleanupTokenRef.current && registryContainer.current) {\n // If the effect was called, it means that this render was committed\n // so we can trust the cleanup function to remove the listener.\n registryContainer.current.unregister(cleanupTokenRef.current);\n cleanupTokenRef.current = null;\n }\n return () => {\n subscription.current?.();\n subscription.current = null;\n };\n }, [apiRef, eventName, options]);\n}\nconst OPTIONS_IS_FIRST = {\n isFirst: true\n};\nexport function useGridEventPriority(apiRef, eventName, handler) {\n useGridEvent(apiRef, eventName, handler, OPTIONS_IS_FIRST);\n}\n\n// TODO: move to @mui/x-data-grid/internals\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function unstable_resetCleanupTracking() {\n registryContainer.current?.reset();\n registryContainer.current = createRegistry();\n}\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const internal_registryContainer = registryContainer;\nfunction createRegistry() {\n return typeof FinalizationRegistry !== 'undefined' ? new FinalizationRegistryBasedCleanupTracking() : new TimerBasedCleanupTracking();\n}","import { createSelector, createRootSelector } from \"../../../utils/createSelector.mjs\";\nexport const COMPACT_DENSITY_FACTOR = 0.7;\nexport const COMFORTABLE_DENSITY_FACTOR = 1.3;\nconst DENSITY_FACTORS = {\n compact: COMPACT_DENSITY_FACTOR,\n comfortable: COMFORTABLE_DENSITY_FACTOR,\n standard: 1\n};\nexport const gridDensitySelector = createRootSelector(state => state.density);\nexport const gridDensityFactorSelector = createSelector(gridDensitySelector, density => DENSITY_FACTORS[density]);","import _formatErrorMessage from \"@mui/x-internals/formatErrorMessage\";\nexport function NotRendered(_props) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'MUI X: Failed assertion: should not be rendered' : _formatErrorMessage(57));\n}","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"id\", \"value\", \"formattedValue\", \"api\", \"field\", \"row\", \"rowNode\", \"colDef\", \"cellMode\", \"isEditable\", \"tabIndex\", \"hasFocus\", \"isValidating\", \"debounceMs\", \"isProcessingProps\", \"onValueChange\", \"slotProps\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport composeClasses from '@mui/utils/composeClasses';\nimport useEnhancedEffect from '@mui/utils/useEnhancedEffect';\nimport { styled } from '@mui/material/styles';\nimport { forwardRef } from '@mui/x-internals/forwardRef';\nimport { NotRendered } from \"../../utils/assert.mjs\";\nimport { vars } from \"../../constants/cssVariables.mjs\";\nimport { getDataGridUtilityClass } from \"../../constants/gridClasses.mjs\";\nimport { useGridRootProps } from \"../../hooks/utils/useGridRootProps.mjs\";\nimport { useGridApiContext } from \"../../hooks/utils/useGridApiContext.mjs\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n classes\n } = ownerState;\n const slots = {\n root: ['editInputCell']\n };\n return composeClasses(slots, getDataGridUtilityClass, classes);\n};\nconst GridEditInputCellRoot = styled(NotRendered, {\n name: 'MuiDataGrid',\n slot: 'EditInputCell'\n})({\n font: vars.typography.font.body,\n padding: '1px 0',\n '& input': {\n padding: '0 16px',\n height: '100%'\n }\n});\nconst GridEditInputCell = forwardRef((props, ref) => {\n const rootProps = useGridRootProps();\n const {\n id,\n value,\n field,\n colDef,\n hasFocus,\n debounceMs = 200,\n isProcessingProps,\n onValueChange,\n slotProps\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const apiRef = useGridApiContext();\n const inputRef = React.useRef(null);\n const [valueState, setValueState] = React.useState(value);\n const classes = useUtilityClasses(rootProps);\n const handleChange = React.useCallback(async event => {\n const newValue = event.target.value;\n const column = apiRef.current.getColumn(field);\n let parsedValue = newValue;\n if (column?.valueParser) {\n parsedValue = column.valueParser(newValue, apiRef.current.getRow(id), column, apiRef);\n }\n setValueState(parsedValue);\n apiRef.current.setEditCellValue({\n id,\n field,\n value: parsedValue,\n debounceMs,\n unstable_skipValueParser: true\n }, event);\n if (onValueChange) {\n await onValueChange(event, newValue);\n }\n }, [apiRef, debounceMs, field, id, onValueChange]);\n const meta = apiRef.current.unstable_getEditCellMeta(id, field);\n React.useEffect(() => {\n if (meta?.changeReason !== 'debouncedSetEditCellValue') {\n setValueState(value);\n }\n }, [meta, value]);\n useEnhancedEffect(() => {\n if (hasFocus) {\n inputRef.current.focus();\n }\n }, [hasFocus]);\n return /*#__PURE__*/_jsx(GridEditInputCellRoot, _extends({\n as: rootProps.slots.baseInput,\n inputRef: inputRef,\n className: classes.root,\n ownerState: rootProps,\n fullWidth: true,\n type: colDef.type === 'number' ? colDef.type : 'text',\n value: valueState ?? '',\n onChange: handleChange,\n endAdornment: isProcessingProps ? /*#__PURE__*/_jsx(rootProps.slots.loadIcon, {\n fontSize: \"small\",\n color: \"action\"\n }) : undefined\n }, other, slotProps?.root, {\n ref: ref\n }));\n});\nif (process.env.NODE_ENV !== \"production\") GridEditInputCell.displayName = \"GridEditInputCell\";\nprocess.env.NODE_ENV !== \"production\" ? GridEditInputCell.propTypes /* remove-proptypes */ = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the TypeScript types and run \"pnpm proptypes\" |\n // ----------------------------------------------------------------------\n /**\n * GridApi that let you manipulate the grid.\n */\n api: PropTypes.object.isRequired,\n /**\n * The mode of the cell.\n */\n cellMode: PropTypes.oneOf(['edit', 'view']).isRequired,\n changeReason: PropTypes.oneOf(['debouncedSetEditCellValue', 'setEditCellValue']),\n /**\n * The column of the row that the current cell belongs to.\n */\n colDef: PropTypes.object.isRequired,\n debounceMs: PropTypes.number,\n /**\n * The column field of the cell that triggered the event.\n */\n field: PropTypes.string.isRequired,\n /**\n * The cell value formatted with the column valueFormatter.\n */\n formattedValue: PropTypes.any,\n /**\n * If true, the cell is the active element.\n */\n hasFocus: PropTypes.bool.isRequired,\n /**\n * The grid row id.\n */\n id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,\n /**\n * If true, the cell is editable.\n */\n isEditable: PropTypes.bool,\n isProcessingProps: PropTypes.bool,\n isValidating: PropTypes.bool,\n /**\n * Callback called when the value is changed by the user.\n * @param {React.ChangeEvent} event The event source of the callback.\n * @param {Date | null} newValue The value that is going to be passed to `apiRef.current.setEditCellValue`.\n * @returns {Promise | void} A promise to be awaited before calling `apiRef.current.setEditCellValue`\n */\n onValueChange: PropTypes.func,\n /**\n * The row model of the row that the current cell belongs to.\n */\n row: PropTypes.any.isRequired,\n /**\n * The node of the row that the current cell belongs to.\n */\n rowNode: PropTypes.object.isRequired,\n slotProps: PropTypes.object,\n /**\n * the tabIndex value.\n */\n tabIndex: PropTypes.oneOf([-1, 0]).isRequired,\n /**\n * The cell value.\n * If the column has `valueGetter`, use `params.row` to directly access the fields.\n */\n value: PropTypes.any\n} : void 0;\nexport { GridEditInputCell };\nexport const renderEditInputCell = params => /*#__PURE__*/_jsx(GridEditInputCell, _extends({}, params));\nif (process.env.NODE_ENV !== \"production\") renderEditInputCell.displayName = \"renderEditInputCell\";","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport { warnOnce } from '@mui/x-internals/warning';\nimport { gridRowNodeSelector } from \"../rows/gridRowsSelector.mjs\";\nexport const sanitizeSortModel = (model, disableMultipleColumnsSorting) => {\n if (disableMultipleColumnsSorting && model.length > 1) {\n if (process.env.NODE_ENV !== 'production') {\n warnOnce(['MUI X: The `sortModel` can only contain a single item when the `disableMultipleColumnsSorting` prop is set to `true`.', 'If you are using the community version of the Data Grid, this prop is always `true`.'], 'error');\n }\n return [model[0]];\n }\n return model;\n};\nexport const mergeStateWithSortModel = (sortModel, disableMultipleColumnsSorting) => state => _extends({}, state, {\n sorting: _extends({}, state.sorting, {\n sortModel: sanitizeSortModel(sortModel, disableMultipleColumnsSorting)\n })\n});\nconst isDesc = direction => direction === 'desc';\n\n/**\n * @name sortValueGetter\n * @param {GridRowId} id The id of the row.\n * @param {string} field The field to sort by.\n *\n * Transform an item of the sorting model into a method comparing two rows.\n * @param {GridSortItem} sortItem The sort item we want to apply.\n * @param {RefObject} apiRef The API of the grid.\n * @returns {GridParsedSortItem | null} The parsed sort item. Returns `null` is the sort item is not valid.\n */\nconst parseSortItem = (sortItem, apiRef) => {\n const column = apiRef.current.getColumn(sortItem.field);\n if (!column || sortItem.sort === null) {\n return null;\n }\n let comparator;\n if (column.getSortComparator) {\n comparator = column.getSortComparator(sortItem.sort);\n } else {\n comparator = isDesc(sortItem.sort) ? (...args) => -1 * column.sortComparator(...args) : column.sortComparator;\n }\n if (!comparator) {\n return null;\n }\n const getSortCellParams = id => ({\n id,\n field: column.field,\n rowNode: gridRowNodeSelector(apiRef, id),\n value: apiRef.current.getCellValue(id, column.field),\n api: apiRef.current\n });\n return {\n getSortCellParams,\n comparator\n };\n};\n/**\n * Compare two rows according to a list of valid sort items.\n * The `row1Params` and `row2Params` must have the same length as `parsedSortItems`,\n * and each of their index must contain the `GridSortCellParams` of the sort item with the same index.\n * @param {GridParsedSortItem[]} parsedSortItems All the sort items with which we want to compare the rows.\n * @param {GridRowAggregatedSortingParams} row1 The node and params of the 1st row for each sort item.\n * @param {GridRowAggregatedSortingParams} row2 The node and params of the 2nd row for each sort item.\n */\nconst compareRows = (parsedSortItems, row1, row2) => {\n return parsedSortItems.reduce((res, item, index) => {\n if (res !== 0) {\n // return the results of the first comparator which distinguish the two rows\n return res;\n }\n const sortCellParams1 = row1.params[index];\n const sortCellParams2 = row2.params[index];\n res = item.comparator(sortCellParams1.value, sortCellParams2.value, sortCellParams1, sortCellParams2);\n return res;\n }, 0);\n};\n\n/**\n * Generates a method to easily sort a list of rows according to the current sort model.\n * @param {GridSortModel} sortModel The model with which we want to sort the rows.\n * @param {RefObject} apiRef The API of the grid.\n * @returns {GridSortingModelApplier | null} A method that generates a list of sorted row ids from a list of rows according to the current sort model. If `null`, we consider that the rows should remain in the order there were provided.\n */\nexport const buildAggregatedSortingApplier = (sortModel, apiRef) => {\n const comparatorList = sortModel.map(item => parseSortItem(item, apiRef)).filter(comparator => !!comparator);\n if (comparatorList.length === 0) {\n return null;\n }\n return rowList => rowList.map(node => ({\n node,\n params: comparatorList.map(el => el.getSortCellParams(node.id))\n })).sort((a, b) => compareRows(comparatorList, a, b)).map(row => row.node.id);\n};\nexport const getNextGridSortDirection = (sortingOrder, current) => {\n const currentIdx = sortingOrder.indexOf(current);\n if (!current || currentIdx === -1 || currentIdx + 1 === sortingOrder.length) {\n return sortingOrder[0];\n }\n return sortingOrder[currentIdx + 1];\n};\nconst gridNillComparator = (v1, v2) => {\n if (v1 == null && v2 != null) {\n return -1;\n }\n if (v2 == null && v1 != null) {\n return 1;\n }\n if (v1 == null && v2 == null) {\n return 0;\n }\n return null;\n};\nconst collator = new Intl.Collator();\nexport const gridStringOrNumberComparator = (value1, value2) => {\n const nillResult = gridNillComparator(value1, value2);\n if (nillResult !== null) {\n return nillResult;\n }\n if (typeof value1 === 'string') {\n return collator.compare(value1.toString(), value2.toString());\n }\n return value1 - value2;\n};\nexport const gridNumberComparator = (value1, value2) => {\n const nillResult = gridNillComparator(value1, value2);\n if (nillResult !== null) {\n return nillResult;\n }\n return Number(value1) - Number(value2);\n};\nexport const gridDateComparator = (value1, value2) => {\n const nillResult = gridNillComparator(value1, value2);\n if (nillResult !== null) {\n return nillResult;\n }\n if (value1 > value2) {\n return 1;\n }\n if (value1 < value2) {\n return -1;\n }\n return 0;\n};","'use client';\n\nimport _formatErrorMessage from \"@mui/x-internals/formatErrorMessage\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"item\", \"applyValue\", \"type\", \"apiRef\", \"focusElementRef\", \"tabIndex\", \"disabled\", \"disableDebounce\", \"isFilterActive\", \"slotProps\", \"clearButton\", \"headerFilterMenu\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport useId from '@mui/utils/useId';\nimport { useTimeout } from \"../../../hooks/utils/useTimeout.mjs\";\nimport { useGridRootProps } from \"../../../hooks/utils/useGridRootProps.mjs\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nfunction GridFilterInputValue(props) {\n const {\n item,\n applyValue,\n type,\n apiRef,\n focusElementRef,\n tabIndex,\n disabled,\n disableDebounce = false,\n slotProps,\n clearButton,\n headerFilterMenu\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const textFieldProps = slotProps?.root;\n const filterTimeout = useTimeout();\n const [filterValueState, setFilterValueState] = React.useState(sanitizeFilterItemValue(item.value));\n const [applying, setIsApplying] = React.useState(false);\n const id = useId();\n const rootProps = useGridRootProps();\n const debounceMs = disableDebounce ? 0 : rootProps.filterDebounceMs;\n const onFilterChange = React.useCallback(event => {\n const value = sanitizeFilterItemValue(event.target.value);\n setFilterValueState(value);\n const newItem = _extends({}, item, {\n value: type === 'number' && !Number.isNaN(Number(value)) ? Number(value) : value,\n fromInput: id\n });\n if (debounceMs === 0) {\n applyValue(newItem);\n return;\n }\n setIsApplying(true);\n filterTimeout.start(debounceMs, () => {\n applyValue(newItem);\n setIsApplying(false);\n });\n }, [filterTimeout, debounceMs, item, type, id, applyValue]);\n React.useEffect(() => {\n const itemPlusTag = item;\n if (itemPlusTag.fromInput !== id || item.value == null) {\n setFilterValueState(sanitizeFilterItemValue(item.value));\n }\n }, [id, item]);\n return /*#__PURE__*/_jsxs(React.Fragment, {\n children: [/*#__PURE__*/_jsx(rootProps.slots.baseTextField, _extends({\n id: id,\n label: apiRef.current.getLocaleText('filterPanelInputLabel'),\n placeholder: apiRef.current.getLocaleText('filterPanelInputPlaceholder'),\n value: filterValueState ?? '',\n onChange: onFilterChange,\n type: type || 'text',\n disabled: disabled,\n slotProps: _extends({}, textFieldProps?.slotProps, {\n input: _extends({\n endAdornment: applying && debounceMs > 0 ? /*#__PURE__*/_jsx(rootProps.slots.loadIcon, {\n fontSize: \"small\",\n color: \"action\"\n }) : null\n }, textFieldProps?.slotProps?.input),\n htmlInput: _extends({\n tabIndex\n }, textFieldProps?.slotProps?.htmlInput)\n }),\n inputRef: focusElementRef\n }, rootProps.slotProps?.baseTextField, other, textFieldProps)), headerFilterMenu, clearButton]\n });\n}\nfunction sanitizeFilterItemValue(value) {\n if (value == null || value === '') {\n return undefined;\n }\n return String(value);\n}\nprocess.env.NODE_ENV !== \"production\" ? GridFilterInputValue.propTypes /* remove-proptypes */ = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the TypeScript types and run \"pnpm proptypes\" |\n // ----------------------------------------------------------------------\n apiRef: PropTypes.shape({\n current: PropTypes.object.isRequired\n }).isRequired,\n applyValue: PropTypes.func.isRequired,\n className: PropTypes.string,\n clearButton: PropTypes.node,\n disabled: PropTypes.bool,\n /**\n * If `true`, filter value changes are applied immediately without debouncing.\n * @default false\n */\n disableDebounce: PropTypes.bool,\n focusElementRef: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.func, PropTypes.object]),\n headerFilterMenu: PropTypes.node,\n inputRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({\n current: (props, propName) => {\n if (props[propName] == null) {\n return null;\n }\n if (typeof props[propName] !== 'object' || props[propName].nodeType !== 1) {\n return new Error(process.env.NODE_ENV !== \"production\" ? `Expected prop '${propName}' to be of type Element` : _formatErrorMessage(49, propName));\n }\n return null;\n }\n })]),\n /**\n * It is `true` if the filter either has a value or an operator with no value\n * required is selected (for example `isEmpty`)\n */\n isFilterActive: PropTypes.bool,\n item: PropTypes.shape({\n field: PropTypes.string.isRequired,\n id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n operator: PropTypes.string.isRequired,\n value: PropTypes.any\n }).isRequired,\n onBlur: PropTypes.func,\n onFocus: PropTypes.func,\n slotProps: PropTypes.object,\n tabIndex: PropTypes.number,\n type: PropTypes.oneOf(['date', 'datetime-local', 'number', 'text'])\n} : void 0;\nexport { GridFilterInputValue };","export function isNumber(value) {\n return typeof value === 'number' && !Number.isNaN(value);\n}\nexport function isFunction(value) {\n return typeof value === 'function';\n}\nexport function isObject(value) {\n return typeof value === 'object' && value !== null;\n}\nexport function localStorageAvailable() {\n try {\n // Incognito mode might reject access to the localStorage for security reasons.\n // window isn't defined on Node.js\n // https://stackoverflow.com/questions/16427636/check-if-localstorage-is-available\n const key = '__some_random_key_you_are_not_going_to_use__';\n window.localStorage.setItem(key, key);\n window.localStorage.removeItem(key);\n return true;\n } catch (err) {\n return false;\n }\n}\nexport function escapeRegExp(value) {\n return value.replace(/[-[\\]{}()*+?.,\\\\^$|#\\s]/g, '\\\\$&');\n}\n\n/**\n * Follows the CSS specification behavior for min and max.\n * If min > max, then min has priority.\n */\nexport const clamp = (value, min, max) => Math.max(min, Math.min(max, value));\n\n/**\n * Create an array containing the range [from, to[\n */\nexport function range(from, to) {\n return Array.from({\n length: to - from\n }).map((_, i) => from + i);\n}\n\n// Pseudo random number. See https://stackoverflow.com/a/47593316\nfunction mulberry32(a) {\n return () => {\n /* eslint-disable */\n let t = a += 0x6d2b79f5;\n t = Math.imul(t ^ t >>> 15, t | 1);\n t ^= t + Math.imul(t ^ t >>> 7, t | 61);\n return ((t ^ t >>> 14) >>> 0) / 4294967296;\n /* eslint-enable */\n };\n}\n\n/**\n * Create a random number generator from a seed. The seed\n * ensures that the random number generator produces the\n * same sequence of 'random' numbers on every render. It\n * returns a function that generates a random number between\n * a specified min and max.\n */\nexport function createRandomNumberGenerator(seed) {\n const random = mulberry32(seed);\n return (min, max) => min + (max - min) * random();\n}\nexport function deepClone(obj) {\n if (typeof structuredClone === 'function') {\n return structuredClone(obj);\n }\n return JSON.parse(JSON.stringify(obj));\n}\n\n/**\n * Mark a value as used so eslint doesn't complain. Use this instead\n * of a `eslint-disable-next-line react-hooks/exhaustive-deps` because\n * that hint disables checks on all values instead of just one.\n */\nexport function eslintUseValue(_) {}\nexport const runIf = (condition, fn) => (...params) => {\n if (condition) {\n fn(...params);\n }\n};","'use client';\n\nimport _formatErrorMessage from \"@mui/x-internals/formatErrorMessage\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"item\", \"applyValue\", \"type\", \"apiRef\", \"focusElementRef\", \"slotProps\", \"disableDebounce\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport useId from '@mui/utils/useId';\nimport { useGridRootProps } from \"../../../hooks/utils/useGridRootProps.mjs\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction GridFilterInputMultipleValue(props) {\n const {\n item,\n applyValue,\n type,\n apiRef,\n focusElementRef,\n slotProps\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const id = useId();\n const [options, setOptions] = React.useState([]);\n const [filterValueState, setFilterValueState] = React.useState(item.value || []);\n const rootProps = useGridRootProps();\n React.useEffect(() => {\n const itemValue = item.value ?? [];\n setFilterValueState(itemValue.map(String));\n }, [item.value]);\n const handleChange = React.useCallback((event, value) => {\n setFilterValueState(value.map(String));\n applyValue(_extends({}, item, {\n value: [...value.map(filterItemValue => type === 'number' ? Number(filterItemValue) : filterItemValue)]\n }));\n }, [applyValue, item, type]);\n const handleInputChange = React.useCallback((event, value) => {\n if (value === '') {\n setOptions([]);\n } else {\n setOptions([value]);\n }\n }, [setOptions]);\n const BaseAutocomplete = rootProps.slots.baseAutocomplete;\n return /*#__PURE__*/_jsx(BaseAutocomplete, _extends({\n multiple: true,\n freeSolo: true,\n options: options,\n id: id,\n value: filterValueState,\n onChange: handleChange,\n onInputChange: handleInputChange,\n label: apiRef.current.getLocaleText('filterPanelInputLabel'),\n placeholder: apiRef.current.getLocaleText('filterPanelInputPlaceholder'),\n slotProps: {\n textField: {\n type: type || 'text',\n inputRef: focusElementRef\n }\n }\n }, other, slotProps?.root));\n}\nprocess.env.NODE_ENV !== \"production\" ? GridFilterInputMultipleValue.propTypes /* remove-proptypes */ = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the TypeScript types and run \"pnpm proptypes\" |\n // ----------------------------------------------------------------------\n apiRef: PropTypes.shape({\n current: PropTypes.object.isRequired\n }).isRequired,\n applyValue: PropTypes.func.isRequired,\n className: PropTypes.string,\n clearButton: PropTypes.node,\n disabled: PropTypes.bool,\n /**\n * If `true`, filter value changes are applied immediately without debouncing.\n * @default false\n */\n disableDebounce: PropTypes.bool,\n focusElementRef: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.func, PropTypes.object]),\n headerFilterMenu: PropTypes.node,\n inputRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({\n current: (props, propName) => {\n if (props[propName] == null) {\n return null;\n }\n if (typeof props[propName] !== 'object' || props[propName].nodeType !== 1) {\n return new Error(process.env.NODE_ENV !== \"production\" ? `Expected prop '${propName}' to be of type Element` : _formatErrorMessage(49, propName));\n }\n return null;\n }\n })]),\n /**\n * It is `true` if the filter either has a value or an operator with no value\n * required is selected (for example `isEmpty`)\n */\n isFilterActive: PropTypes.bool,\n item: PropTypes.shape({\n field: PropTypes.string.isRequired,\n id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n operator: PropTypes.string.isRequired,\n value: PropTypes.any\n }).isRequired,\n onBlur: PropTypes.func,\n onFocus: PropTypes.func,\n slotProps: PropTypes.object,\n tabIndex: PropTypes.number,\n type: PropTypes.oneOf(['date', 'datetime-local', 'number', 'text'])\n} : void 0;\nexport { GridFilterInputMultipleValue };","var GridEditModes = /*#__PURE__*/function (GridEditModes) {\n GridEditModes[\"Cell\"] = \"cell\";\n GridEditModes[\"Row\"] = \"row\";\n return GridEditModes;\n}(GridEditModes || {});\nvar GridCellModes = /*#__PURE__*/function (GridCellModes) {\n GridCellModes[\"Edit\"] = \"edit\";\n GridCellModes[\"View\"] = \"view\";\n return GridCellModes;\n}(GridCellModes || {});\nvar GridRowModes = /*#__PURE__*/function (GridRowModes) {\n GridRowModes[\"Edit\"] = \"edit\";\n GridRowModes[\"View\"] = \"view\";\n return GridRowModes;\n}(GridRowModes || {});\nexport { GridEditModes, GridCellModes, GridRowModes };","/**\n * Filter item definition interface.\n * @demos\n * - [Custom filter operator](/x/react-data-grid/filtering/customization/#create-a-custom-operator)\n */\nvar GridLogicOperator = /*#__PURE__*/function (GridLogicOperator) {\n GridLogicOperator[\"And\"] = \"and\";\n GridLogicOperator[\"Or\"] = \"or\";\n return GridLogicOperator;\n}(GridLogicOperator || {});\nexport { GridLogicOperator };","class IncludeManager {\n constructor(model) {\n this.data = model.ids;\n }\n has(id) {\n return this.data.has(id);\n }\n select(id) {\n this.data.add(id);\n }\n unselect(id) {\n this.data.delete(id);\n }\n}\nclass ExcludeManager {\n constructor(model) {\n this.data = model.ids;\n }\n has(id) {\n return !this.data.has(id);\n }\n select(id) {\n this.data.delete(id);\n }\n unselect(id) {\n this.data.add(id);\n }\n}\nexport const createRowSelectionManager = model => {\n if (model.type === 'include') {\n return new IncludeManager(model);\n }\n return new ExcludeManager(model);\n};","/**\n * Params passed to `apiRef.current.setEditCellValue`.\n */\nvar GridCellEditStartReasons = /*#__PURE__*/function (GridCellEditStartReasons) {\n GridCellEditStartReasons[\"enterKeyDown\"] = \"enterKeyDown\";\n GridCellEditStartReasons[\"cellDoubleClick\"] = \"cellDoubleClick\";\n GridCellEditStartReasons[\"printableKeyDown\"] = \"printableKeyDown\";\n GridCellEditStartReasons[\"deleteKeyDown\"] = \"deleteKeyDown\";\n GridCellEditStartReasons[\"pasteKeyDown\"] = \"pasteKeyDown\";\n return GridCellEditStartReasons;\n}(GridCellEditStartReasons || {});\n/**\n * Params passed to the `cellEditStart` event.\n */\nvar GridCellEditStopReasons = /*#__PURE__*/function (GridCellEditStopReasons) {\n GridCellEditStopReasons[\"cellFocusOut\"] = \"cellFocusOut\";\n GridCellEditStopReasons[\"escapeKeyDown\"] = \"escapeKeyDown\";\n GridCellEditStopReasons[\"enterKeyDown\"] = \"enterKeyDown\";\n GridCellEditStopReasons[\"tabKeyDown\"] = \"tabKeyDown\";\n GridCellEditStopReasons[\"shiftTabKeyDown\"] = \"shiftTabKeyDown\";\n return GridCellEditStopReasons;\n}(GridCellEditStopReasons || {});\n/**\n * Params passed to the `cellEditStop event.\n */\n// https://github.com/mui/mui-x/pull/3738#discussion_r798504277\nexport { GridCellEditStartReasons, GridCellEditStopReasons };","/**\n * Object passed as parameter in the row callbacks.\n * @demos\n * - [Master-detail row panels](/x/react-data-grid/master-detail/)\n */\n/**\n * Object passed as parameter in the row `getRowClassName` callback prop.\n * @demos\n * - [Styling rows](/x/react-data-grid/style/#styling-rows)\n */\n/**\n * Object passed as parameter in the row `getRowHeight` callback prop.\n */\n/**\n * The getRowHeight return value.\n */\nvar GridRowEditStartReasons = /*#__PURE__*/function (GridRowEditStartReasons) {\n GridRowEditStartReasons[\"enterKeyDown\"] = \"enterKeyDown\";\n GridRowEditStartReasons[\"cellDoubleClick\"] = \"cellDoubleClick\";\n GridRowEditStartReasons[\"printableKeyDown\"] = \"printableKeyDown\";\n GridRowEditStartReasons[\"deleteKeyDown\"] = \"deleteKeyDown\";\n return GridRowEditStartReasons;\n}(GridRowEditStartReasons || {});\n/**\n * Params passed to the `rowEditStart` event.\n */\nvar GridRowEditStopReasons = /*#__PURE__*/function (GridRowEditStopReasons) {\n GridRowEditStopReasons[\"rowFocusOut\"] = \"rowFocusOut\";\n GridRowEditStopReasons[\"escapeKeyDown\"] = \"escapeKeyDown\";\n GridRowEditStopReasons[\"enterKeyDown\"] = \"enterKeyDown\";\n GridRowEditStopReasons[\"tabKeyDown\"] = \"tabKeyDown\";\n GridRowEditStopReasons[\"shiftTabKeyDown\"] = \"shiftTabKeyDown\";\n return GridRowEditStopReasons;\n}(GridRowEditStopReasons || {});\n/**\n * Object passed as parameter in the row `getRowSpacing` callback prop.\n * @demos\n * - [Row spacing](/x/react-data-grid/row-height/#row-spacing)\n */\n/**\n * The getRowSpacing return value.\n */\n// https://github.com/mui/mui-x/pull/3738#discussion_r798504277\nexport { GridRowEditStartReasons, GridRowEditStopReasons };","export function isLeaf(node) {\n return node.field !== undefined;\n}\n\n/**\n * A function used to process headerClassName params.\n * @param {GridColumnGroupHeaderParams} params The parameters of the column group header.\n * @returns {string} The class name to be added to the column group header cell.\n */\n\n/**\n * The union type representing the [[GridColDef]] column header class type.\n */","import { GridLogicOperator } from \"../../../models/gridFilterItem.mjs\";\nexport const defaultGridFilterLookup = {\n filteredRowsLookup: {},\n filteredChildrenCountLookup: {},\n filteredDescendantCountLookup: {}\n};\nexport const getDefaultGridFilterModel = () => ({\n items: [],\n logicOperator: GridLogicOperator.And,\n quickFilterValues: [],\n quickFilterLogicOperator: GridLogicOperator.And\n});\n\n/**\n * @param {GridValidRowModel} row The model of the row we want to filter.\n * @param {(filterItem: GridFilterItem) => boolean} shouldApplyItem An optional callback to allow the filtering engine to only apply some items.\n * @param {GridAggregatedFilterItemApplierResult} result The previous result of the filtering engine.\n */\n\n/**\n * Visibility status for each row.\n * A row is visible if it is passing the filters AND if its parents are expanded.\n * If a row is not registered in this lookup, it is visible.\n */","export function getPublicApiRef(apiRef) {\n return {\n current: apiRef.current.getPublicApi()\n };\n}","export let GridPinnedColumnPosition = /*#__PURE__*/function (GridPinnedColumnPosition) {\n GridPinnedColumnPosition[\"LEFT\"] = \"left\";\n GridPinnedColumnPosition[\"RIGHT\"] = \"right\";\n return GridPinnedColumnPosition;\n}({});\nexport const EMPTY_PINNED_COLUMN_FIELDS = {\n left: [],\n right: []\n};","import { createRootSelector } from \"../../../utils/createSelector.mjs\";\n/**\n * Get the list view state\n * @category List View\n * @ignore - Do not document\n */\nexport const gridListViewSelector = createRootSelector(state => state.props.listView ?? false);\n\n/**\n * Get the list column definition\n * @category List View\n * @ignore - Do not document\n */\nexport const gridListColumnSelector = createRootSelector(state => state.listViewColumn);","import { createSelector, createSelectorMemoized, createRootSelector } from \"../../../utils/createSelector.mjs\";\nimport { EMPTY_PINNED_COLUMN_FIELDS } from \"./gridColumnsInterfaces.mjs\";\nimport { gridListColumnSelector, gridListViewSelector } from \"../listView/index.mjs\";\n\n/**\n * Get the columns state\n * @category Columns\n */\nexport const gridColumnsStateSelector = createRootSelector(state => state.columns);\n\n/**\n * Get an array of column fields in the order rendered on screen.\n * @category Columns\n */\nexport const gridColumnFieldsSelector = createSelector(gridColumnsStateSelector, columnsState => columnsState.orderedFields);\n\n/**\n * Get the columns as a lookup (an object containing the field for keys and the definition for values).\n * @category Columns\n */\nexport const gridColumnLookupSelector = createSelector(gridColumnsStateSelector, columnsState => columnsState.lookup);\n\n/**\n * Get an array of column definitions in the order rendered on screen..\n * @category Columns\n */\nexport const gridColumnDefinitionsSelector = createSelectorMemoized(gridColumnFieldsSelector, gridColumnLookupSelector, (allFields, lookup) => allFields.map(field => lookup[field]));\n\n/**\n * Get the column visibility model, containing the visibility status of each column.\n * If a column is not registered in the model, it is visible.\n * @category Visible Columns\n */\nexport const gridColumnVisibilityModelSelector = createSelector(gridColumnsStateSelector, columnsState => columnsState.columnVisibilityModel);\n\n/**\n * Get the \"initial\" column visibility model, containing the visibility status of each column.\n * It is updated when the `columns` prop is updated or when `updateColumns` API method is called.\n * If a column is not registered in the model, it is visible.\n * @category Visible Columns\n */\nexport const gridInitialColumnVisibilityModelSelector = createSelector(gridColumnsStateSelector, columnsState => columnsState.initialColumnVisibilityModel);\n\n/**\n * Get the visible columns as a lookup (an object containing the field for keys and the definition for values).\n * @category Visible Columns\n */\nexport const gridVisibleColumnDefinitionsSelector = createSelectorMemoized(gridColumnDefinitionsSelector, gridColumnVisibilityModelSelector, gridListViewSelector, gridListColumnSelector, (columns, columnVisibilityModel, listView, listColumn) => listView && listColumn ? [listColumn] : columns.filter(column => columnVisibilityModel[column.field] !== false));\n\n/**\n * Get the field of each visible column.\n * @category Visible Columns\n */\nexport const gridVisibleColumnFieldsSelector = createSelectorMemoized(gridVisibleColumnDefinitionsSelector, visibleColumns => visibleColumns.map(column => column.field));\n\n/**\n * Get the visible pinned columns model.\n * @category Visible Columns\n */\nexport const gridPinnedColumnsSelector = createRootSelector(state => state.pinnedColumns);\n\n/**\n * Get all existing pinned columns. Place the columns on the side that depends on the rtl state.\n * @category Pinned Columns\n * @ignore - Do not document\n */\nexport const gridExistingPinnedColumnSelector = createSelectorMemoized(gridPinnedColumnsSelector, gridColumnFieldsSelector, (model, orderedFields) => filterMissingColumns(model, orderedFields));\n\n/**\n * Get the visible pinned columns.\n * @category Visible Columns\n */\nexport const gridVisiblePinnedColumnDefinitionsSelector = createSelectorMemoized(gridColumnsStateSelector, gridPinnedColumnsSelector, gridVisibleColumnFieldsSelector, gridListViewSelector, (columnsState, model, visibleColumnFields, listView) => {\n if (listView) {\n return EMPTY_PINNED_COLUMN_FIELDS;\n }\n const visiblePinnedFields = filterMissingColumns(model, visibleColumnFields);\n const visiblePinnedColumns = {\n left: visiblePinnedFields.left.map(field => columnsState.lookup[field]),\n right: visiblePinnedFields.right.map(field => columnsState.lookup[field])\n };\n return visiblePinnedColumns;\n});\nfunction filterMissingColumns(pinnedColumns, columns) {\n if (!Array.isArray(pinnedColumns.left) && !Array.isArray(pinnedColumns.right)) {\n return EMPTY_PINNED_COLUMN_FIELDS;\n }\n if (pinnedColumns.left?.length === 0 && pinnedColumns.right?.length === 0) {\n return EMPTY_PINNED_COLUMN_FIELDS;\n }\n const filter = (newPinnedColumns, remainingColumns) => {\n if (!Array.isArray(newPinnedColumns)) {\n return [];\n }\n return newPinnedColumns.filter(field => remainingColumns.includes(field));\n };\n const leftPinnedColumns = filter(pinnedColumns.left, columns);\n const columnsWithoutLeftPinnedColumns = columns.filter(field => !leftPinnedColumns.includes(field));\n const rightPinnedColumns = filter(pinnedColumns.right, columnsWithoutLeftPinnedColumns);\n return {\n left: leftPinnedColumns,\n right: rightPinnedColumns\n };\n}\n\n/**\n * Get the left position in pixel of each visible columns relative to the left of the first column.\n * @category Visible Columns\n */\nexport const gridColumnPositionsSelector = createSelectorMemoized(gridVisibleColumnDefinitionsSelector, visibleColumns => {\n const positions = [];\n let currentPosition = 0;\n for (let i = 0; i < visibleColumns.length; i += 1) {\n positions.push(currentPosition);\n currentPosition += visibleColumns[i].computedWidth;\n }\n return positions;\n});\n\n/**\n * Get the filterable columns as an array.\n * @category Columns\n */\nexport const gridFilterableColumnDefinitionsSelector = createSelectorMemoized(gridColumnDefinitionsSelector, columns => columns.filter(col => col.filterable));\n\n/**\n * Get the filterable columns as a lookup (an object containing the field for keys and the definition for values).\n * @category Columns\n */\nexport const gridFilterableColumnLookupSelector = createSelectorMemoized(gridColumnDefinitionsSelector, columns => columns.reduce((acc, col) => {\n if (col.filterable) {\n acc[col.field] = col;\n }\n return acc;\n}, {}));\n\n/**\n * Checks if some column has a colSpan field.\n * @category Columns\n * @ignore - Do not document\n */\nexport const gridHasColSpanSelector = createSelectorMemoized(gridColumnDefinitionsSelector, columns => columns.some(column => column.colSpan !== undefined));","import _formatErrorMessage from \"@mui/x-internals/formatErrorMessage\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport { warnOnce } from '@mui/x-internals/warning';\nimport { GridLogicOperator } from \"../../../models/index.mjs\";\nimport { getDefaultGridFilterModel } from \"./gridFilterState.mjs\";\nimport { getPublicApiRef } from \"../../../utils/getPublicApiRef.mjs\";\nimport { gridColumnFieldsSelector, gridColumnLookupSelector, gridColumnVisibilityModelSelector } from \"../columns/index.mjs\";\n\n/**\n * Pure helpers computing a new filter model from an existing one.\n * Shared by the imperative `apiRef` methods (`useGridFilter`) and the controlled\n * filter panel (`GridFilterPanelBase`) so both paths produce identical models.\n * Each helper returns the same model reference when nothing changes, so callers\n * relying on referential equality can skip no-op updates.\n */\n\nexport const upsertFilterItemInModel = (model, item) => {\n const items = [...model.items];\n const itemIndex = items.findIndex(filterItem => filterItem.id === item.id);\n if (itemIndex === -1) {\n items.push(item);\n } else {\n items[itemIndex] = item;\n }\n return _extends({}, model, {\n items\n });\n};\nexport const upsertFilterItemsInModel = (model, itemsToUpsert) => {\n const items = [...model.items];\n itemsToUpsert.forEach(item => {\n const itemIndex = items.findIndex(filterItem => filterItem.id === item.id);\n if (itemIndex === -1) {\n items.push(item);\n } else {\n items[itemIndex] = item;\n }\n });\n return _extends({}, model, {\n items\n });\n};\nexport const deleteFilterItemFromModel = (model, itemToDelete) => {\n const items = model.items.filter(item => item.id !== itemToDelete.id);\n if (items.length === model.items.length) {\n return model;\n }\n return _extends({}, model, {\n items\n });\n};\nexport const setFilterLogicOperatorInModel = (model, logicOperator) => {\n if (model.logicOperator === logicOperator) {\n return model;\n }\n return _extends({}, model, {\n logicOperator\n });\n};\nlet hasEval;\nfunction getHasEval() {\n if (hasEval !== undefined) {\n return hasEval;\n }\n try {\n // eslint-disable-next-line no-new-func\n hasEval = new Function('return true')();\n } catch (_) {\n hasEval = false;\n }\n return hasEval;\n}\n/**\n * Adds default values to the optional fields of a filter items.\n * @param {GridFilterItem} item The raw filter item.\n * @param {RefObject} apiRef The API of the grid.\n * @return {GridFilterItem} The clean filter item with an uniq ID and an always-defined operator.\n * TODO: Make the typing reflect the different between GridFilterInputItem and GridFilterItem.\n */\nexport const cleanFilterItem = (item, apiRef) => {\n const cleanItem = _extends({}, item);\n if (cleanItem.id == null) {\n cleanItem.id = Math.round(Math.random() * 1e5);\n }\n if (cleanItem.operator == null) {\n // Selects a default operator\n // We don't use `apiRef.current.getColumn` because it is not ready during state initialization\n const column = gridColumnLookupSelector(apiRef)[cleanItem.field];\n cleanItem.operator = column && column.filterOperators[0].value;\n }\n return cleanItem;\n};\nexport const sanitizeFilterModel = (model, disableMultipleColumnsFiltering, apiRef) => {\n const hasSeveralItems = model.items.length > 1;\n let items;\n if (hasSeveralItems && disableMultipleColumnsFiltering) {\n if (process.env.NODE_ENV !== 'production') {\n warnOnce(['MUI X: The `filterModel` can only contain a single item when the `disableMultipleColumnsFiltering` prop is set to `true`.', 'If you are using the community version of the Data Grid, this prop is always `true`.'], 'error');\n }\n items = [model.items[0]];\n } else {\n items = model.items;\n }\n const hasItemsWithoutIds = hasSeveralItems && items.some(item => item.id == null);\n const hasItemWithoutOperator = items.some(item => item.operator == null);\n if (hasItemsWithoutIds && process.env.NODE_ENV !== 'production') {\n warnOnce('MUI X: The `id` field is required on `filterModel.items` when you use multiple filters.', 'error');\n }\n if (hasItemWithoutOperator && process.env.NODE_ENV !== 'production') {\n warnOnce('MUI X: The `operator` field is required on `filterModel.items`, one or more of your filtering item has no `operator` provided.', 'error');\n }\n if (hasItemWithoutOperator || hasItemsWithoutIds) {\n return _extends({}, model, {\n items: items.map(item => cleanFilterItem(item, apiRef))\n });\n }\n if (model.items !== items) {\n return _extends({}, model, {\n items\n });\n }\n return model;\n};\nexport const mergeStateWithFilterModel = (filterModel, disableMultipleColumnsFiltering, apiRef) => filteringState => _extends({}, filteringState, {\n filterModel: sanitizeFilterModel(filterModel, disableMultipleColumnsFiltering, apiRef)\n});\nexport const removeDiacritics = value => {\n if (typeof value === 'string') {\n return value.normalize('NFD').replace(/[\\u0300-\\u036f]/g, '');\n }\n return value;\n};\nconst getFilterCallbackFromItem = (filterItem, filterValueGetter, apiRef) => {\n if (!filterItem.field || !filterItem.operator) {\n return null;\n }\n const column = apiRef.current.getColumn(filterItem.field);\n if (!column) {\n return null;\n }\n let parsedValue;\n if (column.valueParser) {\n const parser = column.valueParser;\n parsedValue = Array.isArray(filterItem.value) ? filterItem.value?.map(x => parser(x, undefined, column, apiRef)) : parser(filterItem.value, undefined, column, apiRef);\n } else {\n parsedValue = filterItem.value;\n }\n const {\n ignoreDiacritics\n } = apiRef.current.rootProps;\n if (ignoreDiacritics) {\n parsedValue = removeDiacritics(parsedValue);\n }\n const newFilterItem = _extends({}, filterItem, {\n value: parsedValue\n });\n const filterOperators = column.filterOperators;\n if (!filterOperators?.length) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? `MUI X Data Grid: No filter operators found for column \"${column.field}\". ` + 'Columns must have filter operators defined to enable filtering. ' + 'Add filterOperators to the column definition or use a column type that includes them.' : _formatErrorMessage(81, column.field));\n }\n const filterOperator = filterOperators.find(operator => operator.value === newFilterItem.operator);\n if (!filterOperator) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? `MUI X Data Grid: No filter operator \"${newFilterItem.operator}\" found for column \"${column.field}\". ` + 'The specified operator is not available for this column. ' + \"Use one of the operators defined in the column's filterOperators array.\" : _formatErrorMessage(82, newFilterItem.operator, column.field));\n }\n const publicApiRef = getPublicApiRef(apiRef);\n const applyFilterOnRow = filterOperator.getApplyFilterFn(newFilterItem, column);\n if (typeof applyFilterOnRow !== 'function') {\n return null;\n }\n return {\n item: newFilterItem,\n fn: row => {\n let value = filterValueGetter(row, column);\n if (ignoreDiacritics) {\n value = removeDiacritics(value);\n }\n return applyFilterOnRow(value, row, column, publicApiRef);\n }\n };\n};\nlet filterItemsApplierId = 1;\n\n/**\n * @name filterValueGetter\n * @param {GridRowModel} row The row to get the value from.\n * @param {GridColDef} column The column that the filter is applied on.\n *\n * Generates a method to easily check if a row is matching the current filter model.\n * @param {GridFilterModel} filterModel The model with which we want to filter the rows.\n * @param {FilterValueGetterFn} filterValueGetter The function to get the value to filter by.\n * @param {RefObject} apiRef The API of the grid.\n * @returns {GridAggregatedFilterItemApplier | null} A method that checks if a row is matching the current filter model. If `null`, we consider that all the rows are matching the filters.\n */\nconst buildAggregatedFilterItemsApplier = (filterModel, filterValueGetter, apiRef, disableEval) => {\n const {\n items\n } = filterModel;\n const appliers = items.map(item => getFilterCallbackFromItem(item, filterValueGetter, apiRef)).filter(callback => !!callback);\n if (appliers.length === 0) {\n return null;\n }\n if (disableEval || !getHasEval()) {\n // This is the original logic, which is used if `eval()` is not supported (aka prevented by CSP).\n return (row, shouldApplyFilter) => {\n const resultPerItemId = {};\n for (let i = 0; i < appliers.length; i += 1) {\n const applier = appliers[i];\n if (!shouldApplyFilter || shouldApplyFilter(applier.item.field)) {\n resultPerItemId[applier.item.id] = applier.fn(row);\n }\n }\n return resultPerItemId;\n };\n }\n\n // We generate a new function with `new Function()` to avoid expensive patterns for JS engines\n // such as a dynamic object assignment, for example `{ [dynamicKey]: value }`.\n // eslint-disable-next-line no-new-func\n const filterItemCore = new Function('appliers', 'row', 'shouldApplyFilter', `\"use strict\";\n${appliers.map((applier, i) => `const shouldApply${i} = !shouldApplyFilter || shouldApplyFilter(${JSON.stringify(applier.item.field)});`).join('\\n')}\n\nconst result$$ = {\n${appliers.map((applier, i) => ` ${JSON.stringify(String(applier.item.id))}: !shouldApply${i} ? false : appliers[${i}].fn(row),`).join('\\n')}\n};\n\nreturn result$$;`.replaceAll('$$', String(filterItemsApplierId)));\n filterItemsApplierId += 1;\n\n // Assign to the arrow function a name to help debugging\n const filterItem = (row, shouldApplyItem) => filterItemCore(appliers, row, shouldApplyItem);\n return filterItem;\n};\nexport const shouldQuickFilterExcludeHiddenColumns = filterModel => {\n return filterModel.quickFilterExcludeHiddenColumns ?? true;\n};\n\n/**\n * @name filterValueGetter\n * @param {GridRowModel} row The row to get the value from.\n * @param {GridColDef} column The column that the filter is applied on.\n *\n * Generates a method to easily check if a row is matching the current quick filter.\n * @param {any[]} filterModel The model with which we want to filter the rows.\n * @param {FilterValueGetterFn} filterValueGetter The function to get the value to filter by.\n * @param {RefObject} apiRef The API of the grid.\n * @returns {GridAggregatedFilterItemApplier | null} A method that checks if a row is matching the current filter model. If `null`, we consider that all the rows are matching the filters.\n */\nconst buildAggregatedQuickFilterApplier = (filterModel, filterValueGetter, apiRef) => {\n const quickFilterValues = filterModel.quickFilterValues?.filter(Boolean) ?? [];\n if (quickFilterValues.length === 0) {\n return null;\n }\n const allColumnFields = gridColumnFieldsSelector(apiRef);\n const columnVisibilityModel = gridColumnVisibilityModelSelector(apiRef);\n let columnFields;\n if (shouldQuickFilterExcludeHiddenColumns(filterModel)) {\n // Do not use gridVisibleColumnFieldsSelector here, because quick filter won't work in the list view mode\n // See https://github.com/mui/mui-x/issues/19145\n columnFields = allColumnFields.filter(field => columnVisibilityModel[field] !== false);\n } else {\n columnFields = allColumnFields;\n }\n const appliersPerField = [];\n const {\n ignoreDiacritics\n } = apiRef.current.rootProps;\n const publicApiRef = getPublicApiRef(apiRef);\n columnFields.forEach(field => {\n const column = apiRef.current.getColumn(field);\n const getApplyQuickFilterFn = column?.getApplyQuickFilterFn;\n if (getApplyQuickFilterFn) {\n appliersPerField.push({\n column,\n appliers: quickFilterValues.map(quickFilterValue => {\n const value = ignoreDiacritics ? removeDiacritics(quickFilterValue) : quickFilterValue;\n return {\n fn: getApplyQuickFilterFn(value, column, publicApiRef)\n };\n })\n });\n }\n });\n return function isRowMatchingQuickFilter(row, shouldApplyFilter) {\n const result = {};\n\n /* eslint-disable no-labels */\n outer: for (let v = 0; v < quickFilterValues.length; v += 1) {\n const filterValue = quickFilterValues[v];\n for (let i = 0; i < appliersPerField.length; i += 1) {\n const {\n column,\n appliers\n } = appliersPerField[i];\n const {\n field\n } = column;\n if (shouldApplyFilter && !shouldApplyFilter(field)) {\n continue;\n }\n const applier = appliers[v];\n let value = filterValueGetter(row, column);\n if (applier.fn === null) {\n continue;\n }\n if (ignoreDiacritics) {\n value = removeDiacritics(value);\n }\n const isMatching = applier.fn(value, row, column, publicApiRef);\n if (isMatching) {\n result[filterValue] = true;\n continue outer;\n }\n }\n result[filterValue] = false;\n }\n return result;\n };\n};\nexport const buildAggregatedFilterApplier = (filterModel, filterValueGetter, apiRef, disableEval) => {\n const isRowMatchingFilterItems = buildAggregatedFilterItemsApplier(filterModel, filterValueGetter, apiRef, disableEval);\n const isRowMatchingQuickFilter = buildAggregatedQuickFilterApplier(filterModel, filterValueGetter, apiRef);\n return function isRowMatchingFilters(row, shouldApplyFilter, result) {\n result.passingFilterItems = isRowMatchingFilterItems?.(row, shouldApplyFilter) ?? null;\n result.passingQuickFilterValues = isRowMatchingQuickFilter?.(row, shouldApplyFilter) ?? null;\n };\n};\nconst isNotNull = result => result != null;\nconst filterModelItems = (cache, filterValueGetter, apiRef, items) => {\n if (!cache.cleanedFilterItems) {\n cache.cleanedFilterItems = items.filter(item => getFilterCallbackFromItem(item, filterValueGetter, apiRef) !== null);\n }\n return cache.cleanedFilterItems;\n};\nexport const passFilterLogic = (allFilterItemResults, allQuickFilterResults, filterModel, filterValueGetter, apiRef, cache) => {\n const cleanedFilterItems = filterModelItems(cache, filterValueGetter, apiRef, filterModel.items);\n const cleanedFilterItemResults = allFilterItemResults.filter(isNotNull);\n const cleanedQuickFilterResults = allQuickFilterResults.filter(isNotNull);\n\n // get result for filter items model\n if (cleanedFilterItemResults.length > 0) {\n // Return true if the item pass with one of the rows\n const filterItemPredicate = item => {\n return cleanedFilterItemResults.some(filterItemResult => filterItemResult[item.id]);\n };\n const logicOperator = filterModel.logicOperator ?? getDefaultGridFilterModel().logicOperator;\n if (logicOperator === GridLogicOperator.And) {\n const passesAllFilters = cleanedFilterItems.every(filterItemPredicate);\n if (!passesAllFilters) {\n return false;\n }\n } else {\n const passesSomeFilters = cleanedFilterItems.some(filterItemPredicate);\n if (!passesSomeFilters) {\n return false;\n }\n }\n }\n\n // get result for quick filter model\n if (cleanedQuickFilterResults.length > 0 && filterModel.quickFilterValues != null) {\n // Return true if the item pass with one of the rows\n const quickFilterValuePredicate = value => {\n return cleanedQuickFilterResults.some(quickFilterValueResult => quickFilterValueResult[value]);\n };\n const quickFilterLogicOperator = filterModel.quickFilterLogicOperator ?? getDefaultGridFilterModel().quickFilterLogicOperator;\n if (quickFilterLogicOperator === GridLogicOperator.And) {\n const passesAllQuickFilterValues = filterModel.quickFilterValues.every(quickFilterValuePredicate);\n if (!passesAllQuickFilterValues) {\n return false;\n }\n } else {\n const passesSomeQuickFilterValues = filterModel.quickFilterValues.some(quickFilterValuePredicate);\n if (!passesSomeQuickFilterValues) {\n return false;\n }\n }\n }\n return true;\n};","import { GridFilterInputValue } from \"../components/panel/filterPanel/GridFilterInputValue.mjs\";\nimport { escapeRegExp } from \"../utils/utils.mjs\";\nimport { GridFilterInputMultipleValue } from \"../components/panel/filterPanel/GridFilterInputMultipleValue.mjs\";\nimport { removeDiacritics } from \"../hooks/features/filter/gridFilterUtils.mjs\";\nexport const getGridStringQuickFilterFn = value => {\n if (!value) {\n return null;\n }\n const filterRegex = new RegExp(escapeRegExp(value), 'i');\n return (_, row, column, apiRef) => {\n let columnValue = apiRef.current.getRowFormattedValue(row, column);\n if (apiRef.current.ignoreDiacritics) {\n columnValue = removeDiacritics(columnValue);\n }\n return columnValue != null ? filterRegex.test(columnValue.toString()) : false;\n };\n};\nconst createContainsFilterFn = (disableTrim, negate) => filterItem => {\n if (!filterItem.value) {\n return null;\n }\n const trimmedValue = disableTrim ? filterItem.value : filterItem.value.trim();\n const filterRegex = new RegExp(escapeRegExp(trimmedValue), 'i');\n return value => {\n if (value == null) {\n return negate;\n }\n const matches = filterRegex.test(String(value));\n return negate ? !matches : matches;\n };\n};\nconst createEqualityFilterFn = (disableTrim, negate) => filterItem => {\n if (!filterItem.value) {\n return null;\n }\n const trimmedValue = disableTrim ? filterItem.value : filterItem.value.trim();\n const collator = new Intl.Collator(undefined, {\n sensitivity: 'base',\n usage: 'search'\n });\n return value => {\n if (value == null) {\n return negate;\n }\n const isEqual = collator.compare(trimmedValue, value.toString()) === 0;\n return negate ? !isEqual : isEqual;\n };\n};\nconst createEmptyFilterFn = negate => () => {\n return value => {\n const isEmpty = value === '' || value == null;\n return negate ? !isEmpty : isEmpty;\n };\n};\nexport const getGridStringOperators = (disableTrim = false) => [{\n value: 'contains',\n getApplyFilterFn: createContainsFilterFn(disableTrim, false),\n InputComponent: GridFilterInputValue\n}, {\n value: 'doesNotContain',\n getApplyFilterFn: createContainsFilterFn(disableTrim, true),\n InputComponent: GridFilterInputValue\n}, {\n value: 'equals',\n getApplyFilterFn: createEqualityFilterFn(disableTrim, false),\n InputComponent: GridFilterInputValue\n}, {\n value: 'doesNotEqual',\n getApplyFilterFn: createEqualityFilterFn(disableTrim, true),\n InputComponent: GridFilterInputValue\n}, {\n value: 'startsWith',\n getApplyFilterFn: filterItem => {\n if (!filterItem.value) {\n return null;\n }\n const filterItemValue = disableTrim ? filterItem.value : filterItem.value.trim();\n const filterRegex = new RegExp(`^${escapeRegExp(filterItemValue)}.*$`, 'i');\n return value => {\n return value != null ? filterRegex.test(value.toString()) : false;\n };\n },\n InputComponent: GridFilterInputValue\n}, {\n value: 'endsWith',\n getApplyFilterFn: filterItem => {\n if (!filterItem.value) {\n return null;\n }\n const filterItemValue = disableTrim ? filterItem.value : filterItem.value.trim();\n const filterRegex = new RegExp(`.*${escapeRegExp(filterItemValue)}$`, 'i');\n return value => {\n return value != null ? filterRegex.test(value.toString()) : false;\n };\n },\n InputComponent: GridFilterInputValue\n}, {\n value: 'isEmpty',\n getApplyFilterFn: createEmptyFilterFn(false),\n requiresFilterValue: false\n}, {\n value: 'isNotEmpty',\n getApplyFilterFn: createEmptyFilterFn(true),\n requiresFilterValue: false\n}, {\n value: 'isAnyOf',\n getApplyFilterFn: filterItem => {\n if (!Array.isArray(filterItem.value) || filterItem.value.length === 0) {\n return null;\n }\n const filterItemValue = disableTrim ? filterItem.value : filterItem.value.map(val => val.trim());\n const collator = new Intl.Collator(undefined, {\n sensitivity: 'base',\n usage: 'search'\n });\n return value => value != null ? filterItemValue.some(filterValue => {\n return collator.compare(filterValue, value.toString() || '') === 0;\n }) : false;\n },\n InputComponent: GridFilterInputMultipleValue\n}];","import { renderEditInputCell } from \"../components/cell/GridEditInputCell.mjs\";\nimport { gridStringOrNumberComparator } from \"../hooks/features/sorting/gridSortingUtils.mjs\";\nimport { getGridStringOperators, getGridStringQuickFilterFn } from \"./gridStringOperators.mjs\";\n\n/**\n * TODO: Move pro and premium properties outside of this Community file\n */\nexport const GRID_STRING_COL_DEF = {\n width: 100,\n minWidth: 50,\n maxWidth: Infinity,\n hideable: true,\n sortable: true,\n resizable: true,\n filterable: true,\n groupable: true,\n pinnable: true,\n // @ts-ignore\n aggregable: true,\n chartable: true,\n editable: false,\n sortComparator: gridStringOrNumberComparator,\n type: 'string',\n align: 'left',\n filterOperators: getGridStringOperators(),\n renderEditCell: renderEditInputCell,\n getApplyQuickFilterFn: getGridStringQuickFilterFn\n};","// Non printable keys have a name, for example \"ArrowRight\", see the whole list:\n// https://developer.mozilla.org/en-US/docs/Web/API/UI_Events/Keyboard_event_key_values\n// So event.key.length === 1 is often enough.\n//\n// However, we also need to ignore shortcuts, for example: select all:\n// - Windows: Ctrl+A, event.ctrlKey is true\n// - macOS: ⌘ Command+A, event.metaKey is true\nexport function isPrintableKey(event) {\n return event.key.length === 1 && !event.ctrlKey && !event.metaKey;\n}\nexport const isNavigationKey = key => key.indexOf('Arrow') === 0 || key.indexOf('Page') === 0 || key === ' ' || key === 'Home' || key === 'End';\nexport const isKeyboardEvent = event => !!event.key;\nexport const isHideMenuKey = key => key === 'Tab' || key === 'Escape';\n\n// In theory, on macOS, ctrl + v doesn't trigger a paste, so the function should return false.\n// However, maybe it's overkill to fix, so let's be lazy.\nexport function isPasteShortcut(event) {\n return (event.ctrlKey || event.metaKey) &&\n // We can't use event.code === 'KeyV' as event.code assumes a QWERTY keyboard layout,\n // for example, it would be another letter on a Dvorak physical keyboard.\n // We can't use event.key === 'v' as event.key is not stable with key modifiers and keyboard layouts,\n // for example, it would be ה on a Hebrew keyboard layout.\n // https://github.com/w3c/uievents/issues/377 could be a long-term solution\n String.fromCharCode(event.keyCode) === 'V' && !event.shiftKey && !event.altKey;\n}\n\n// Checks if the keyboard event corresponds to the copy shortcut (CTRL+C or CMD+C) across different localization keyboards.\nexport function isCopyShortcut(event) {\n return (event.ctrlKey || event.metaKey) && String.fromCharCode(event.keyCode) === 'C' && !event.shiftKey && !event.altKey;\n}\nexport function isUndoShortcut(event) {\n return (event.ctrlKey || event.metaKey) && String.fromCharCode(event.keyCode) === 'Z' && !event.shiftKey && !event.altKey;\n}\nexport function isFillDownShortcut(event) {\n return (event.ctrlKey || event.metaKey) && String.fromCharCode(event.keyCode) === 'D' && !event.shiftKey && !event.altKey;\n}\nexport function isFillRightShortcut(event) {\n return (event.ctrlKey || event.metaKey) && String.fromCharCode(event.keyCode) === 'R' && !event.shiftKey && !event.altKey;\n}\nexport function isRedoShortcut(event) {\n return (event.ctrlKey || event.metaKey) && (String.fromCharCode(event.keyCode) === 'Z' && event.shiftKey || String.fromCharCode(event.keyCode) === 'Y' && !event.shiftKey) && !event.altKey;\n}","'use client';\n\nimport * as React from 'react';\nexport const GridConfigurationContext = /*#__PURE__*/React.createContext(undefined);\nif (process.env.NODE_ENV !== \"production\") GridConfigurationContext.displayName = \"GridConfigurationContext\";","'use client';\n\nimport _formatErrorMessage from \"@mui/x-internals/formatErrorMessage\";\nimport * as React from 'react';\nimport { GridConfigurationContext } from \"../../components/GridConfigurationContext.mjs\";\nexport const useGridConfiguration = () => {\n const configuration = React.useContext(GridConfigurationContext);\n if (configuration === undefined) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'MUI X Data Grid: Could not find the Data Grid configuration context. ' + 'This happens when a component is rendered outside of a DataGrid, DataGridPro, or DataGridPremium parent component. ' + 'Ensure your component is a child of a Data Grid component. ' + 'This can also happen if you are bundling multiple versions of the Data Grid.' : _formatErrorMessage(68));\n }\n return configuration;\n};","'use client';\n\nimport * as React from 'react';\nimport { useGridRootProps } from \"../../hooks/utils/useGridRootProps.mjs\";\nimport { useGridConfiguration } from \"../../hooks/utils/useGridConfiguration.mjs\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst CLASSNAME_PREFIX = 'MuiDataGridVariables';\nconst CSSVariablesContext = /*#__PURE__*/React.createContext({\n className: 'unset',\n tag: /*#__PURE__*/_jsx(\"style\", {\n href: \"/unset\"\n })\n});\nif (process.env.NODE_ENV !== \"production\") CSSVariablesContext.displayName = \"CSSVariablesContext\";\nexport function useCSSVariablesClass() {\n return React.useContext(CSSVariablesContext).className;\n}\nexport function useCSSVariablesContext() {\n return React.useContext(CSSVariablesContext);\n}\nexport function GridPortalWrapper({\n children\n}) {\n const className = useCSSVariablesClass();\n return /*#__PURE__*/_jsx(\"div\", {\n className: className,\n children: children\n });\n}\nexport function GridCSSVariablesContext(props) {\n const config = useGridConfiguration();\n const rootProps = useGridRootProps();\n const description = config.hooks.useCSSVariables();\n const context = React.useMemo(() => {\n const className = `${CLASSNAME_PREFIX}-${description.id}`;\n const cssString = `.${className}{${variablesToString(description.variables)}}`;\n const tag = /*#__PURE__*/_jsx(\"style\", {\n href: `/${className}`,\n nonce: rootProps.nonce,\n children: cssString\n });\n return {\n className,\n tag\n };\n }, [rootProps.nonce, description]);\n return /*#__PURE__*/_jsx(CSSVariablesContext.Provider, {\n value: context,\n children: props.children\n });\n}\nfunction variablesToString(variables) {\n let output = '';\n for (const key in variables) {\n if (Object.hasOwn(variables, key) && variables[key] !== undefined) {\n output += `${key}:${variables[key]};`;\n }\n }\n return output;\n}","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"open\", \"target\", \"onClose\", \"children\", \"position\", \"className\", \"onExited\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport composeClasses from '@mui/utils/composeClasses';\nimport useEnhancedEffect from '@mui/utils/useEnhancedEffect';\nimport HTMLElementType from '@mui/utils/HTMLElementType';\nimport { styled } from '@mui/material/styles';\nimport { isHideMenuKey } from \"../../utils/keyboardUtils.mjs\";\nimport { vars } from \"../../constants/cssVariables.mjs\";\nimport { useCSSVariablesClass } from \"../../utils/css/context.mjs\";\nimport { getDataGridUtilityClass, gridClasses } from \"../../constants/gridClasses.mjs\";\nimport { useGridRootProps } from \"../../hooks/utils/useGridRootProps.mjs\";\nimport { useGridApiContext } from \"../../hooks/utils/useGridApiContext.mjs\";\nimport { NotRendered } from \"../../utils/assert.mjs\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n classes\n } = ownerState;\n const slots = {\n root: ['menu']\n };\n return composeClasses(slots, getDataGridUtilityClass, classes);\n};\nconst GridMenuRoot = styled(NotRendered, {\n name: 'MuiDataGrid',\n slot: 'Menu'\n})({\n zIndex: vars.zIndex.menu,\n [`& .${gridClasses.menuList}`]: {\n outline: 0\n }\n});\nfunction GridMenu(props) {\n const {\n open,\n target,\n onClose,\n children,\n position,\n className,\n onExited\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const apiRef = useGridApiContext();\n const rootProps = useGridRootProps();\n const classes = useUtilityClasses(rootProps);\n const variablesClass = useCSSVariablesClass();\n const savedFocusRef = React.useRef(null);\n useEnhancedEffect(() => {\n if (open) {\n savedFocusRef.current = document.activeElement instanceof HTMLElement ? document.activeElement : null;\n } else {\n savedFocusRef.current?.focus?.();\n savedFocusRef.current = null;\n }\n }, [open]);\n React.useEffect(() => {\n // Emit menuOpen or menuClose events\n const eventName = open ? 'menuOpen' : 'menuClose';\n apiRef.current.publishEvent(eventName, {\n target\n });\n }, [apiRef, open, target]);\n const handleClickAway = event => {\n if (event.target && (target === event.target || target?.contains(event.target))) {\n return;\n }\n onClose(event);\n };\n const handleKeyDown = event => {\n if (isHideMenuKey(event.key)) {\n onClose(event);\n }\n };\n return /*#__PURE__*/_jsx(GridMenuRoot, _extends({\n as: rootProps.slots.basePopper,\n className: clsx(classes.root, className, variablesClass),\n ownerState: rootProps,\n open: open,\n target: target,\n transition: true,\n placement: position,\n onClickAway: handleClickAway,\n onExited: onExited,\n clickAwayMouseEvent: \"onMouseDown\",\n onKeyDown: handleKeyDown\n }, other, rootProps.slotProps?.basePopper, {\n children: children\n }));\n}\nprocess.env.NODE_ENV !== \"production\" ? GridMenu.propTypes /* remove-proptypes */ = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the TypeScript types and run \"pnpm proptypes\" |\n // ----------------------------------------------------------------------\n children: PropTypes.node,\n className: PropTypes.string,\n onClose: PropTypes.func.isRequired,\n onExited: PropTypes.func,\n open: PropTypes.bool.isRequired,\n position: PropTypes.oneOf(['bottom-end', 'bottom-start', 'bottom', 'left-end', 'left-start', 'left', 'right-end', 'right-start', 'right', 'top-end', 'top-start', 'top']),\n target: HTMLElementType\n} : void 0;\nexport { GridMenu };","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"label\", \"icon\", \"showInMenu\", \"onClick\"],\n _excluded2 = [\"label\", \"icon\", \"showInMenu\", \"onClick\", \"closeMenuOnClick\", \"closeMenu\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { forwardRef } from '@mui/x-internals/forwardRef';\nimport { useGridRootProps } from \"../../hooks/utils/useGridRootProps.mjs\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst GridActionsCellItem = forwardRef((props, ref) => {\n const rootProps = useGridRootProps();\n if (!props.showInMenu) {\n const {\n label,\n icon,\n onClick\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const handleClick = event => {\n onClick?.(event);\n };\n return /*#__PURE__*/_jsx(rootProps.slots.baseIconButton, _extends({\n size: \"small\",\n role: \"menuitem\",\n \"aria-label\": label\n }, other, {\n onClick: handleClick\n }, rootProps.slotProps?.baseIconButton, {\n ref: ref,\n children: /*#__PURE__*/React.cloneElement(icon, {\n fontSize: 'inherit'\n })\n }));\n }\n const {\n label,\n icon,\n onClick,\n closeMenuOnClick = true,\n closeMenu\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded2);\n const handleClick = event => {\n onClick?.(event);\n if (closeMenuOnClick) {\n closeMenu?.();\n }\n };\n return /*#__PURE__*/_jsx(rootProps.slots.baseMenuItem, _extends({\n ref: ref\n }, other, {\n onClick: handleClick,\n iconStart: icon,\n children: label\n }));\n});\nif (process.env.NODE_ENV !== \"production\") GridActionsCellItem.displayName = \"GridActionsCellItem\";\nprocess.env.NODE_ENV !== \"production\" ? GridActionsCellItem.propTypes /* remove-proptypes */ = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the TypeScript types and run \"pnpm proptypes\" |\n // ----------------------------------------------------------------------\n className: PropTypes.string,\n /**\n * from https://mui.com/material-ui/api/button-base/#ButtonBase-prop-component\n */\n component: PropTypes.elementType,\n disabled: PropTypes.bool,\n icon: PropTypes /* @typescript-to-proptypes-ignore */.element,\n label: PropTypes.node,\n showInMenu: PropTypes.bool,\n style: PropTypes.object\n} : void 0;\nexport { GridActionsCellItem };","'use client';\n\nimport _formatErrorMessage from \"@mui/x-internals/formatErrorMessage\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"api\", \"colDef\", \"id\", \"hasFocus\", \"isEditable\", \"field\", \"value\", \"formattedValue\", \"row\", \"rowNode\", \"cellMode\", \"tabIndex\", \"position\", \"onMenuOpen\", \"onMenuClose\", \"children\", \"suppressChildrenValidation\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { useRtl } from '@mui/system/RtlProvider';\nimport useId from '@mui/utils/useId';\nimport { warnOnce } from '@mui/x-internals/warning';\nimport { gridClasses } from \"../../constants/gridClasses.mjs\";\nimport { GridMenu } from \"../menu/GridMenu.mjs\";\nimport { useGridRootProps } from \"../../hooks/utils/useGridRootProps.mjs\";\nimport { useGridApiContext } from \"../../hooks/utils/useGridApiContext.mjs\";\nimport { GridActionsCellItem } from \"./GridActionsCellItem.mjs\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst hasActions = colDef => typeof colDef.getActions === 'function';\nfunction GridActionsCell(props) {\n const {\n id,\n hasFocus,\n tabIndex,\n position = 'bottom-end',\n onMenuOpen,\n onMenuClose,\n children,\n suppressChildrenValidation\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const [focusedButtonIndex, setFocusedButtonIndex] = React.useState(-1);\n const [open, setOpen] = React.useState(false);\n const apiRef = useGridApiContext();\n const rootRef = React.useRef(null);\n const buttonRef = React.useRef(null);\n const ignoreCallToFocus = React.useRef(false);\n const touchRippleRefs = React.useRef({});\n const isRtl = useRtl();\n const menuId = useId();\n const buttonId = useId();\n const rootProps = useGridRootProps();\n const rowParams = apiRef.current.getRowParams(id);\n const actions = [];\n React.Children.forEach(children, child => {\n // Unwrap React.Fragment\n if (/*#__PURE__*/React.isValidElement(child)) {\n if (child.type === React.Fragment) {\n React.Children.forEach(child.props.children, fragChild => {\n if (/*#__PURE__*/React.isValidElement(fragChild)) {\n actions.push(fragChild);\n }\n });\n } else if (child.type === GridActionsCellItem || suppressChildrenValidation) {\n actions.push(child);\n } else if (process.env.NODE_ENV !== 'production') {\n const childType = typeof child.type === 'function' ? child.type.name : child.type;\n warnOnce(`MUI X: Invalid child type in \\`GridActionsCell\\`. Expected \\`GridActionsCellItem\\` or \\`React.Fragment\\`, got \\`${childType}\\`.\nIf this is intentional, you can suppress this warning by passing the \\`suppressChildrenValidation\\` prop to \\`GridActionsCell\\`.`, 'error');\n }\n }\n });\n const iconButtons = actions.filter(option => !option.props.showInMenu);\n const menuButtons = actions.filter(option => option.props.showInMenu);\n const numberOfButtons = iconButtons.length + (menuButtons.length ? 1 : 0);\n React.useLayoutEffect(() => {\n if (!hasFocus) {\n Object.entries(touchRippleRefs.current).forEach(([index, ref]) => {\n ref?.stop({}, () => {\n delete touchRippleRefs.current[index];\n });\n });\n }\n }, [hasFocus]);\n React.useEffect(() => {\n if (focusedButtonIndex < 0 || !rootRef.current) {\n return;\n }\n if (focusedButtonIndex >= rootRef.current.children.length) {\n return;\n }\n const child = rootRef.current.children[focusedButtonIndex];\n child.focus({\n preventScroll: true\n });\n }, [focusedButtonIndex]);\n const firstFocusableButtonIndex = actions.findIndex(o => !o.props.disabled);\n React.useEffect(() => {\n if (hasFocus && focusedButtonIndex === -1) {\n setFocusedButtonIndex(firstFocusableButtonIndex);\n }\n if (!hasFocus) {\n setFocusedButtonIndex(-1);\n ignoreCallToFocus.current = false;\n }\n }, [hasFocus, focusedButtonIndex, firstFocusableButtonIndex]);\n React.useEffect(() => {\n if (focusedButtonIndex >= numberOfButtons) {\n setFocusedButtonIndex(numberOfButtons - 1);\n }\n }, [focusedButtonIndex, numberOfButtons]);\n const showMenu = event => {\n if (onMenuOpen && !onMenuOpen(rowParams, event)) {\n return;\n }\n setOpen(true);\n setFocusedButtonIndex(numberOfButtons - 1);\n ignoreCallToFocus.current = true;\n };\n const hideMenu = event => {\n if (onMenuClose && !onMenuClose(rowParams, event)) {\n return;\n }\n setOpen(false);\n };\n const toggleMenu = event => {\n event.stopPropagation();\n event.preventDefault();\n if (open) {\n hideMenu(event);\n } else {\n showMenu(event);\n }\n };\n const handleTouchRippleRef = index => instance => {\n touchRippleRefs.current[index] = instance;\n };\n const handleButtonClick = (index, onClick) => event => {\n setFocusedButtonIndex(index);\n ignoreCallToFocus.current = true;\n if (onClick) {\n onClick(event);\n }\n };\n const handleRootKeyDown = event => {\n if (numberOfButtons <= 1) {\n return;\n }\n const getNewIndex = (index, direction) => {\n if (index < 0 || index > actions.length) {\n return index;\n }\n\n // for rtl mode we need to reverse the direction\n const rtlMod = isRtl ? -1 : 1;\n const indexMod = (direction === 'left' ? -1 : 1) * rtlMod;\n\n // if the button that should receive focus is disabled go one more step\n return actions[index + indexMod]?.props.disabled ? getNewIndex(index + indexMod, direction) : index + indexMod;\n };\n let newIndex = focusedButtonIndex;\n if (event.key === 'ArrowRight') {\n newIndex = getNewIndex(focusedButtonIndex, 'right');\n } else if (event.key === 'ArrowLeft') {\n newIndex = getNewIndex(focusedButtonIndex, 'left');\n }\n if (newIndex < 0 || newIndex >= numberOfButtons) {\n return; // We're already in the first or last item = do nothing and let the grid listen the event\n }\n if (newIndex !== focusedButtonIndex) {\n event.preventDefault(); // Prevent scrolling\n event.stopPropagation(); // Don't stop propagation for other keys, for example ArrowUp\n setFocusedButtonIndex(newIndex);\n }\n };\n\n // role=\"menu\" requires at least one child element\n const attributes = numberOfButtons > 0 ? {\n role: 'menu',\n onKeyDown: handleRootKeyDown\n } : undefined;\n return /*#__PURE__*/_jsxs(\"div\", _extends({\n ref: rootRef,\n tabIndex: -1,\n className: gridClasses.actionsCell\n }, attributes, other, {\n children: [iconButtons.map((button, index) => /*#__PURE__*/React.cloneElement(button, {\n key: index,\n touchRippleRef: handleTouchRippleRef(index),\n onClick: handleButtonClick(index, button.props.onClick),\n tabIndex: focusedButtonIndex === index ? tabIndex : -1\n })), menuButtons.length > 0 && buttonId && /*#__PURE__*/_jsx(rootProps.slots.baseIconButton, _extends({\n ref: buttonRef,\n id: buttonId,\n \"aria-label\": apiRef.current.getLocaleText('actionsCellMore'),\n \"aria-haspopup\": \"menu\",\n \"aria-expanded\": open,\n \"aria-controls\": open ? menuId : undefined,\n role: \"menuitem\",\n size: \"small\",\n onClick: toggleMenu,\n touchRippleRef: handleTouchRippleRef(buttonId),\n tabIndex: focusedButtonIndex === iconButtons.length ? tabIndex : -1\n }, rootProps.slotProps?.baseIconButton, {\n children: /*#__PURE__*/_jsx(rootProps.slots.moreActionsIcon, {\n fontSize: \"small\"\n })\n })), menuButtons.length > 0 && /*#__PURE__*/_jsx(GridMenu, {\n open: open,\n target: buttonRef.current,\n position: position,\n onClose: hideMenu,\n children: /*#__PURE__*/_jsx(rootProps.slots.baseMenuList, {\n id: menuId,\n className: gridClasses.menuList,\n \"aria-labelledby\": buttonId,\n autoFocusItem: true,\n children: menuButtons.map((button, index) => /*#__PURE__*/React.cloneElement(button, {\n key: index,\n closeMenu: hideMenu\n }))\n })\n })]\n }));\n}\nprocess.env.NODE_ENV !== \"production\" ? GridActionsCell.propTypes /* remove-proptypes */ = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the TypeScript types and run \"pnpm proptypes\" |\n // ----------------------------------------------------------------------\n api: PropTypes.object,\n /**\n * The mode of the cell.\n */\n cellMode: PropTypes.oneOf(['edit', 'view']).isRequired,\n children: PropTypes.node,\n /**\n * The column of the row that the current cell belongs to.\n */\n colDef: PropTypes.object.isRequired,\n /**\n * The column field of the cell that triggered the event.\n */\n field: PropTypes.string.isRequired,\n /**\n * The cell value formatted with the column valueFormatter.\n */\n formattedValue: PropTypes.any,\n /**\n * If true, the cell is the active element.\n */\n hasFocus: PropTypes.bool.isRequired,\n /**\n * The grid row id.\n */\n id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,\n /**\n * If true, the cell is editable.\n */\n isEditable: PropTypes.bool,\n /**\n * Callback to fire before the menu gets closed.\n * Use this callback to prevent the menu from closing.\n *\n * @param {GridRowParams} params Row parameters.\n * @param {React.MouseEvent | React.KeyboardEvent | MouseEvent | TouchEvent | undefined} event The event triggering this callback.\n * @returns {boolean} if the menu should be closed.\n */\n onMenuClose: PropTypes.func,\n /**\n * Callback to fire before the menu gets opened.\n * Use this callback to prevent the menu from opening.\n *\n * @param {GridRowParams} params Row parameters.\n * @param {React.MouseEvent} event The event triggering this callback.\n * @returns {boolean} if the menu should be opened.\n */\n onMenuOpen: PropTypes.func,\n position: PropTypes.oneOf(['bottom-end', 'bottom-start', 'bottom', 'left-end', 'left-start', 'left', 'right-end', 'right-start', 'right', 'top-end', 'top-start', 'top']),\n /**\n * The row model of the row that the current cell belongs to.\n */\n row: PropTypes.object.isRequired,\n /**\n * The node of the row that the current cell belongs to.\n */\n rowNode: PropTypes.object.isRequired,\n /**\n * If true, the children passed to the component will not be validated.\n * If false, only `GridActionsCellItem` and `React.Fragment` are allowed as children.\n * Only use this prop if you know what you are doing.\n * @default false\n */\n suppressChildrenValidation: PropTypes.bool,\n /**\n * the tabIndex value.\n */\n tabIndex: PropTypes.oneOf([-1, 0]).isRequired,\n /**\n * The cell value.\n * If the column has `valueGetter`, use `params.row` to directly access the fields.\n */\n value: PropTypes.any\n} : void 0;\nexport { GridActionsCell };\n\n// Temporary wrapper for backward compatibility.\n// Only used to support `getActions` method in `GridColDef`.\n// TODO(v9): Remove this wrapper and the default `renderCell` in gridActionsColDef\nfunction GridActionsCellWrapper(props) {\n const {\n colDef,\n id\n } = props;\n const apiRef = useGridApiContext();\n if (!hasActions(colDef)) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'MUI X: Missing the `getActions` property in the `GridColDef`.' : _formatErrorMessage(60));\n }\n const actions = colDef.getActions(apiRef.current.getRowParams(id));\n return /*#__PURE__*/_jsx(GridActionsCell, _extends({\n suppressChildrenValidation: true\n }, props, {\n children: actions\n }));\n}\nprocess.env.NODE_ENV !== \"production\" ? GridActionsCellWrapper.propTypes /* remove-proptypes */ = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the TypeScript types and run \"pnpm proptypes\" |\n // ----------------------------------------------------------------------\n /**\n * GridApi that let you manipulate the grid.\n */\n api: PropTypes.object.isRequired,\n /**\n * The mode of the cell.\n */\n cellMode: PropTypes.oneOf(['edit', 'view']).isRequired,\n /**\n * The column of the row that the current cell belongs to.\n */\n colDef: PropTypes.object.isRequired,\n /**\n * The column field of the cell that triggered the event.\n */\n field: PropTypes.string.isRequired,\n /**\n * The cell value formatted with the column valueFormatter.\n */\n formattedValue: PropTypes.any,\n /**\n * If true, the cell is the active element.\n */\n hasFocus: PropTypes.bool.isRequired,\n /**\n * The grid row id.\n */\n id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,\n /**\n * If true, the cell is editable.\n */\n isEditable: PropTypes.bool,\n /**\n * The row model of the row that the current cell belongs to.\n */\n row: PropTypes.any.isRequired,\n /**\n * The node of the row that the current cell belongs to.\n */\n rowNode: PropTypes.object.isRequired,\n /**\n * the tabIndex value.\n */\n tabIndex: PropTypes.oneOf([-1, 0]).isRequired,\n /**\n * The cell value.\n * If the column has `valueGetter`, use `params.row` to directly access the fields.\n */\n value: PropTypes.any\n} : void 0;\nexport const renderActionsCell = params => /*#__PURE__*/_jsx(GridActionsCellWrapper, _extends({}, params));\nif (process.env.NODE_ENV !== \"production\") renderActionsCell.displayName = \"renderActionsCell\";","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport { GRID_STRING_COL_DEF } from \"./gridStringColDef.mjs\";\nimport { renderActionsCell } from \"../components/cell/GridActionsCell.mjs\";\nexport const GRID_ACTIONS_COLUMN_TYPE = 'actions';\nexport const GRID_ACTIONS_COL_DEF = _extends({}, GRID_STRING_COL_DEF, {\n sortable: false,\n filterable: false,\n // @ts-ignore\n aggregable: false,\n chartable: false,\n width: 100,\n display: 'flex',\n align: 'center',\n headerAlign: 'center',\n headerName: '',\n disableColumnMenu: true,\n disableExport: true,\n renderCell: renderActionsCell,\n getApplyQuickFilterFn: () => null\n});","export const GRID_TREE_DATA_GROUPING_FIELD = '__tree_data_group__';\nexport const GRID_ROW_GROUPING_SINGLE_GROUPING_FIELD = '__row_group_by_columns_group__';\nexport const GRID_DETAIL_PANEL_TOGGLE_FIELD = '__detail_panel_toggle__';\nexport let PinnedColumnPosition = /*#__PURE__*/function (PinnedColumnPosition) {\n PinnedColumnPosition[PinnedColumnPosition[\"NONE\"] = 0] = \"NONE\";\n PinnedColumnPosition[PinnedColumnPosition[\"LEFT\"] = 1] = \"LEFT\";\n PinnedColumnPosition[PinnedColumnPosition[\"RIGHT\"] = 2] = \"RIGHT\";\n PinnedColumnPosition[PinnedColumnPosition[\"VIRTUAL\"] = 3] = \"VIRTUAL\";\n return PinnedColumnPosition;\n}({});","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"formattedValue\", \"colDef\", \"cellMode\", \"row\", \"api\", \"id\", \"value\", \"rowNode\", \"field\", \"hasFocus\", \"tabIndex\", \"isEditable\"];\nimport * as React from 'react';\nimport composeClasses from '@mui/utils/composeClasses';\nimport { styled } from '@mui/material/styles';\nimport { vars } from \"../../constants/cssVariables.mjs\";\nimport { useGridRootProps } from \"../../hooks/utils/useGridRootProps.mjs\";\nimport { getDataGridUtilityClass } from \"../../constants/gridClasses.mjs\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst GridFooterCellRoot = styled('div', {\n name: 'MuiDataGrid',\n slot: 'FooterCell'\n})({\n fontWeight: vars.typography.fontWeight.medium,\n color: vars.colors.foreground.accent\n});\nconst useUtilityClasses = ownerState => {\n const {\n classes\n } = ownerState;\n const slots = {\n root: ['footerCell']\n };\n return composeClasses(slots, getDataGridUtilityClass, classes);\n};\nfunction GridFooterCellRaw(props) {\n const {\n formattedValue\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const rootProps = useGridRootProps();\n const ownerState = {\n classes: rootProps.classes\n };\n const classes = useUtilityClasses(ownerState);\n return /*#__PURE__*/_jsx(GridFooterCellRoot, _extends({\n ownerState: ownerState,\n className: classes.root\n }, other, {\n children: formattedValue\n }));\n}\nconst GridFooterCell = /*#__PURE__*/React.memo(GridFooterCellRaw);\nif (process.env.NODE_ENV !== \"production\") GridFooterCell.displayName = \"GridFooterCell\";\nexport { GridFooterCell };","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"id\", \"value\", \"formattedValue\", \"api\", \"field\", \"row\", \"rowNode\", \"colDef\", \"cellMode\", \"isEditable\", \"hasFocus\", \"tabIndex\", \"hideDescendantCount\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport composeClasses from '@mui/utils/composeClasses';\nimport { useGridSelector } from \"../../hooks/utils/useGridSelector.mjs\";\nimport { gridRowMaximumTreeDepthSelector } from \"../../hooks/features/rows/gridRowsSelector.mjs\";\nimport { getDataGridUtilityClass } from \"../../constants/gridClasses.mjs\";\nimport { useGridRootProps } from \"../../hooks/utils/useGridRootProps.mjs\";\nimport { useGridApiContext } from \"../../hooks/utils/useGridApiContext.mjs\";\nimport { isAutogeneratedRowNode } from \"../../hooks/features/rows/gridRowsUtils.mjs\";\nimport { GRID_ROW_GROUPING_SINGLE_GROUPING_FIELD } from \"../../internals/constants.mjs\";\nimport { GridFooterCell } from \"./GridFooterCell.mjs\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n classes\n } = ownerState;\n const slots = {\n root: ['booleanCell']\n };\n return composeClasses(slots, getDataGridUtilityClass, classes);\n};\nfunction GridBooleanCellRaw(props) {\n const {\n value,\n rowNode\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const apiRef = useGridApiContext();\n const rootProps = useGridRootProps();\n const ownerState = {\n classes: rootProps.classes\n };\n const classes = useUtilityClasses(ownerState);\n const maxDepth = useGridSelector(apiRef, gridRowMaximumTreeDepthSelector);\n const isServerSideRowGroupingRow =\n // @ts-expect-error - Access tree data prop\n maxDepth > 0 && rowNode.type === 'group' && rootProps.treeData === false;\n const Icon = React.useMemo(() => value ? rootProps.slots.booleanCellTrueIcon : rootProps.slots.booleanCellFalseIcon, [rootProps.slots.booleanCellFalseIcon, rootProps.slots.booleanCellTrueIcon, value]);\n if (isServerSideRowGroupingRow && value === undefined) {\n return null;\n }\n return /*#__PURE__*/_jsx(Icon, _extends({\n fontSize: \"small\",\n className: classes.root,\n titleAccess: apiRef.current.getLocaleText(value ? 'booleanCellTrueLabel' : 'booleanCellFalseLabel'),\n \"data-value\": Boolean(value)\n }, other));\n}\nprocess.env.NODE_ENV !== \"production\" ? GridBooleanCellRaw.propTypes /* remove-proptypes */ = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the TypeScript types and run \"pnpm proptypes\" |\n // ----------------------------------------------------------------------\n /**\n * GridApi that let you manipulate the grid.\n */\n api: PropTypes.object.isRequired,\n /**\n * The mode of the cell.\n */\n cellMode: PropTypes.oneOf(['edit', 'view']).isRequired,\n /**\n * The column of the row that the current cell belongs to.\n */\n colDef: PropTypes.object.isRequired,\n /**\n * The column field of the cell that triggered the event.\n */\n field: PropTypes.string.isRequired,\n /**\n * The cell value formatted with the column valueFormatter.\n */\n formattedValue: PropTypes.any,\n /**\n * If true, the cell is the active element.\n */\n hasFocus: PropTypes.bool.isRequired,\n hideDescendantCount: PropTypes.bool,\n /**\n * The grid row id.\n */\n id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,\n /**\n * If true, the cell is editable.\n */\n isEditable: PropTypes.bool,\n /**\n * The row model of the row that the current cell belongs to.\n */\n row: PropTypes.any.isRequired,\n /**\n * The node of the row that the current cell belongs to.\n */\n rowNode: PropTypes.object.isRequired,\n /**\n * the tabIndex value.\n */\n tabIndex: PropTypes.oneOf([-1, 0]).isRequired,\n /**\n * The cell value.\n * If the column has `valueGetter`, use `params.row` to directly access the fields.\n */\n value: PropTypes.any\n} : void 0;\nconst GridBooleanCell = /*#__PURE__*/React.memo(GridBooleanCellRaw);\nif (process.env.NODE_ENV !== \"production\") GridBooleanCell.displayName = \"GridBooleanCell\";\nexport { GridBooleanCell };\nexport const renderBooleanCell = params => {\n if (params.field !== GRID_ROW_GROUPING_SINGLE_GROUPING_FIELD && isAutogeneratedRowNode(params.rowNode)) {\n const aggregationMetaData = params.aggregation;\n if (!aggregationMetaData) {\n return '';\n }\n if (aggregationMetaData.position === 'footer') {\n return /*#__PURE__*/_jsx(GridFooterCell, _extends({}, params));\n }\n return params.formattedValue;\n }\n return /*#__PURE__*/_jsx(GridBooleanCell, _extends({}, params));\n};\nif (process.env.NODE_ENV !== \"production\") renderBooleanCell.displayName = \"renderBooleanCell\";","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"id\", \"value\", \"formattedValue\", \"api\", \"field\", \"row\", \"rowNode\", \"colDef\", \"cellMode\", \"isEditable\", \"tabIndex\", \"className\", \"hasFocus\", \"isValidating\", \"isProcessingProps\", \"error\", \"onValueChange\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport composeClasses from '@mui/utils/composeClasses';\nimport useId from '@mui/utils/useId';\nimport useEnhancedEffect from '@mui/utils/useEnhancedEffect';\nimport { getDataGridUtilityClass } from \"../../constants/gridClasses.mjs\";\nimport { useGridRootProps } from \"../../hooks/utils/useGridRootProps.mjs\";\nimport { useGridApiContext } from \"../../hooks/utils/useGridApiContext.mjs\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n classes\n } = ownerState;\n const slots = {\n root: ['editBooleanCell']\n };\n return composeClasses(slots, getDataGridUtilityClass, classes);\n};\nfunction GridEditBooleanCell(props) {\n const {\n id: idProp,\n value,\n field,\n className,\n hasFocus,\n onValueChange\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const apiRef = useGridApiContext();\n const inputRef = React.useRef(null);\n const id = useId();\n const [valueState, setValueState] = React.useState(value);\n const rootProps = useGridRootProps();\n const ownerState = {\n classes: rootProps.classes\n };\n const classes = useUtilityClasses(ownerState);\n const handleChange = React.useCallback(async event => {\n const newValue = event.target.checked;\n if (onValueChange) {\n await onValueChange(event, newValue);\n }\n setValueState(newValue);\n await apiRef.current.setEditCellValue({\n id: idProp,\n field,\n value: newValue\n }, event);\n }, [apiRef, field, idProp, onValueChange]);\n React.useEffect(() => {\n setValueState(value);\n }, [value]);\n useEnhancedEffect(() => {\n if (hasFocus) {\n inputRef.current.focus();\n }\n }, [hasFocus]);\n return /*#__PURE__*/_jsx(\"label\", _extends({\n htmlFor: id,\n className: clsx(classes.root, className)\n }, other, {\n children: /*#__PURE__*/_jsx(rootProps.slots.baseCheckbox, _extends({\n id: id,\n inputRef: inputRef,\n checked: Boolean(valueState),\n onChange: handleChange,\n size: \"small\"\n }, rootProps.slotProps?.baseCheckbox))\n }));\n}\nprocess.env.NODE_ENV !== \"production\" ? GridEditBooleanCell.propTypes /* remove-proptypes */ = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the TypeScript types and run \"pnpm proptypes\" |\n // ----------------------------------------------------------------------\n /**\n * GridApi that let you manipulate the grid.\n */\n api: PropTypes.object.isRequired,\n /**\n * The mode of the cell.\n */\n cellMode: PropTypes.oneOf(['edit', 'view']).isRequired,\n changeReason: PropTypes.oneOf(['debouncedSetEditCellValue', 'setEditCellValue']),\n /**\n * The column of the row that the current cell belongs to.\n */\n colDef: PropTypes.object.isRequired,\n /**\n * The column field of the cell that triggered the event.\n */\n field: PropTypes.string.isRequired,\n /**\n * The cell value formatted with the column valueFormatter.\n */\n formattedValue: PropTypes.any,\n /**\n * If true, the cell is the active element.\n */\n hasFocus: PropTypes.bool.isRequired,\n /**\n * The grid row id.\n */\n id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,\n /**\n * If true, the cell is editable.\n */\n isEditable: PropTypes.bool,\n isProcessingProps: PropTypes.bool,\n isValidating: PropTypes.bool,\n /**\n * Callback called when the value is changed by the user.\n * @param {React.ChangeEvent} event The event source of the callback.\n * @param {boolean} newValue The value that is going to be passed to `apiRef.current.setEditCellValue`.\n * @returns {Promise | void} A promise to be awaited before calling `apiRef.current.setEditCellValue`\n */\n onValueChange: PropTypes.func,\n /**\n * The row model of the row that the current cell belongs to.\n */\n row: PropTypes.any.isRequired,\n /**\n * The node of the row that the current cell belongs to.\n */\n rowNode: PropTypes.object.isRequired,\n /**\n * the tabIndex value.\n */\n tabIndex: PropTypes.oneOf([-1, 0]).isRequired,\n /**\n * The cell value.\n * If the column has `valueGetter`, use `params.row` to directly access the fields.\n */\n value: PropTypes.any\n} : void 0;\nexport { GridEditBooleanCell };\nexport const renderEditBooleanCell = params => /*#__PURE__*/_jsx(GridEditBooleanCell, _extends({}, params));\nif (process.env.NODE_ENV !== \"production\") renderEditBooleanCell.displayName = \"renderEditBooleanCell\";","'use client';\n\nimport _formatErrorMessage from \"@mui/x-internals/formatErrorMessage\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"item\", \"applyValue\", \"apiRef\", \"focusElementRef\", \"isFilterActive\", \"headerFilterMenu\", \"clearButton\", \"tabIndex\", \"slotProps\", \"disableDebounce\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport refType from '@mui/utils/refType';\nimport useId from '@mui/utils/useId';\nimport { useGridRootProps } from \"../../../hooks/utils/useGridRootProps.mjs\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nfunction GridFilterInputBoolean(props) {\n const {\n item,\n applyValue,\n apiRef,\n focusElementRef,\n headerFilterMenu,\n clearButton,\n tabIndex,\n slotProps\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const [filterValueState, setFilterValueState] = React.useState(sanitizeFilterItemValue(item.value));\n const rootProps = useGridRootProps();\n const labelId = useId();\n const selectId = useId();\n const baseSelectProps = rootProps.slotProps?.baseSelect || {};\n const isSelectNative = baseSelectProps.native ?? false;\n const baseSelectOptionProps = rootProps.slotProps?.baseSelectOption || {};\n const onFilterChange = React.useCallback(event => {\n const value = sanitizeFilterItemValue(event.target.value);\n setFilterValueState(value);\n applyValue(_extends({}, item, {\n value\n }));\n }, [applyValue, item]);\n React.useEffect(() => {\n setFilterValueState(sanitizeFilterItemValue(item.value));\n }, [item.value]);\n const label = slotProps?.root.label ?? apiRef.current.getLocaleText('filterPanelInputLabel');\n const rootSlotProps = slotProps?.root.slotProps;\n return /*#__PURE__*/_jsxs(React.Fragment, {\n children: [/*#__PURE__*/_jsxs(rootProps.slots.baseSelect, _extends({\n fullWidth: true,\n labelId: labelId,\n id: selectId,\n label: label,\n value: filterValueState === undefined ? '' : String(filterValueState),\n onChange: onFilterChange,\n native: isSelectNative,\n slotProps: {\n htmlInput: _extends({\n ref: focusElementRef,\n tabIndex\n }, rootSlotProps?.htmlInput)\n }\n }, baseSelectProps, other, slotProps?.root, {\n children: [/*#__PURE__*/_jsx(rootProps.slots.baseSelectOption, _extends({}, baseSelectOptionProps, {\n native: isSelectNative,\n value: \"\",\n children: apiRef.current.getLocaleText('filterValueAny')\n })), /*#__PURE__*/_jsx(rootProps.slots.baseSelectOption, _extends({}, baseSelectOptionProps, {\n native: isSelectNative,\n value: \"true\",\n children: apiRef.current.getLocaleText('filterValueTrue')\n })), /*#__PURE__*/_jsx(rootProps.slots.baseSelectOption, _extends({}, baseSelectOptionProps, {\n native: isSelectNative,\n value: \"false\",\n children: apiRef.current.getLocaleText('filterValueFalse')\n }))]\n })), headerFilterMenu, clearButton]\n });\n}\nexport function sanitizeFilterItemValue(value) {\n if (String(value).toLowerCase() === 'true') {\n return true;\n }\n if (String(value).toLowerCase() === 'false') {\n return false;\n }\n return undefined;\n}\nprocess.env.NODE_ENV !== \"production\" ? GridFilterInputBoolean.propTypes /* remove-proptypes */ = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the TypeScript types and run \"pnpm proptypes\" |\n // ----------------------------------------------------------------------\n apiRef: PropTypes.shape({\n current: PropTypes.object.isRequired\n }).isRequired,\n applyValue: PropTypes.func.isRequired,\n className: PropTypes.string,\n clearButton: PropTypes.node,\n disabled: PropTypes.bool,\n /**\n * If `true`, filter value changes are applied immediately without debouncing.\n * @default false\n */\n disableDebounce: PropTypes.bool,\n focusElementRef: refType,\n headerFilterMenu: PropTypes.node,\n inputRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({\n current: (props, propName) => {\n if (props[propName] == null) {\n return null;\n }\n if (typeof props[propName] !== 'object' || props[propName].nodeType !== 1) {\n return new Error(process.env.NODE_ENV !== \"production\" ? `Expected prop '${propName}' to be of type Element` : _formatErrorMessage(49, propName));\n }\n return null;\n }\n })]),\n /**\n * It is `true` if the filter either has a value or an operator with no value\n * required is selected (for example `isEmpty`)\n */\n isFilterActive: PropTypes.bool,\n item: PropTypes.shape({\n field: PropTypes.string.isRequired,\n id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n operator: PropTypes.string.isRequired,\n value: PropTypes.any\n }).isRequired,\n onBlur: PropTypes.func,\n onFocus: PropTypes.func,\n slotProps: PropTypes.object,\n tabIndex: PropTypes.number\n} : void 0;\nexport { GridFilterInputBoolean };","import { GridFilterInputBoolean, sanitizeFilterItemValue } from \"../components/panel/filterPanel/GridFilterInputBoolean.mjs\";\nexport const getGridBooleanOperators = () => [{\n value: 'is',\n getApplyFilterFn: filterItem => {\n const sanitizedValue = sanitizeFilterItemValue(filterItem.value);\n if (sanitizedValue === undefined) {\n return null;\n }\n return value => Boolean(value) === sanitizedValue;\n },\n InputComponent: GridFilterInputBoolean\n}];","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport { GRID_STRING_COL_DEF } from \"./gridStringColDef.mjs\";\nimport { renderBooleanCell } from \"../components/cell/GridBooleanCell.mjs\";\nimport { renderEditBooleanCell } from \"../components/cell/GridEditBooleanCell.mjs\";\nimport { gridNumberComparator } from \"../hooks/features/sorting/gridSortingUtils.mjs\";\nimport { getGridBooleanOperators } from \"./gridBooleanOperators.mjs\";\nconst gridBooleanFormatter = (value, row, column, apiRef) => {\n return value ? apiRef.current.getLocaleText('booleanCellTrueLabel') : apiRef.current.getLocaleText('booleanCellFalseLabel');\n};\nconst stringToBoolean = value => {\n switch (value.toLowerCase().trim()) {\n case 'true':\n case 'yes':\n case '1':\n return true;\n case 'false':\n case 'no':\n case '0':\n case 'null':\n case 'undefined':\n return false;\n default:\n return undefined;\n }\n};\nexport const GRID_BOOLEAN_COL_DEF = _extends({}, GRID_STRING_COL_DEF, {\n type: 'boolean',\n display: 'flex',\n align: 'center',\n headerAlign: 'center',\n renderCell: renderBooleanCell,\n renderEditCell: renderEditBooleanCell,\n sortComparator: gridNumberComparator,\n valueFormatter: gridBooleanFormatter,\n filterOperators: getGridBooleanOperators(),\n getApplyQuickFilterFn: () => null,\n // @ts-ignore\n chartable: false,\n // @ts-ignore\n pastedValueParser: value => stringToBoolean(value)\n});","export function isObjectEmpty(object) {\n // eslint-disable-next-line\n for (const _ in object) {\n return false;\n }\n return true;\n}","import { createRootSelector, createSelector, createSelectorMemoized } from \"../../../utils/createSelector.mjs\";\nimport { gridRowTreeSelector, gridRowsLookupSelector } from \"../rows/gridRowsSelector.mjs\";\nimport { GRID_ID_AUTOGENERATED, isAutogeneratedRowNode } from \"../rows/gridRowsUtils.mjs\";\n/**\n * @category Sorting\n * @ignore - do not document.\n */\nconst gridSortingStateSelector = createRootSelector(state => state.sorting);\n\n/**\n * Get the id of the rows after the sorting process.\n * @category Sorting\n */\nexport const gridSortedRowIdsSelector = createSelector(gridSortingStateSelector, sortingState => sortingState.sortedRows);\n\n/**\n * Get the id and the model of the rows after the sorting process.\n * @category Sorting\n */\nexport const gridSortedRowEntriesSelector = createSelectorMemoized(gridSortedRowIdsSelector, gridRowsLookupSelector, gridRowTreeSelector, (sortedIds, idRowsLookup, rowTree) => sortedIds.reduce((acc, id) => {\n const model = idRowsLookup[id];\n if (model) {\n acc.push({\n id,\n model\n });\n } else {\n const rowNode = rowTree[id];\n if (rowNode && isAutogeneratedRowNode(rowNode)) {\n acc.push({\n id,\n model: {\n [GRID_ID_AUTOGENERATED]: id\n }\n });\n }\n }\n return acc;\n}, []));\n\n/**\n * Get the current sorting model.\n * @category Sorting\n */\nexport const gridSortModelSelector = createSelector(gridSortingStateSelector, sorting => sorting.sortModel);\n/**\n * @category Sorting\n * @ignore - do not document.\n */\nexport const gridSortColumnLookupSelector = createSelectorMemoized(gridSortModelSelector, sortModel => {\n const result = sortModel.reduce((res, sortItem, index) => {\n res[sortItem.field] = {\n sortDirection: sortItem.sort,\n sortIndex: sortModel.length > 1 ? index + 1 : undefined\n };\n return res;\n }, {});\n return result;\n});\n\n/**\n * @category Sorting\n * @ignore - do not document.\n */\nexport const gridSortedRowIndexLookupSelector = createSelectorMemoized(gridSortedRowIdsSelector, sortedIds => {\n return sortedIds.reduce((acc, id, index) => {\n acc[id] = index;\n return acc;\n }, Object.create(null));\n});","import { isObjectEmpty } from '@mui/x-internals/isObjectEmpty';\nimport { createSelector, createRootSelector, createSelectorMemoized } from \"../../../utils/createSelector.mjs\";\nimport { gridSortedRowEntriesSelector } from \"../sorting/gridSortingSelector.mjs\";\nimport { gridColumnLookupSelector } from \"../columns/gridColumnsSelector.mjs\";\nimport { gridRowMaximumTreeDepthSelector, gridRowTreeSelector } from \"../rows/gridRowsSelector.mjs\";\n\n/**\n * @category Filtering\n */\nconst gridFilterStateSelector = createRootSelector(state => state.filter);\n\n/**\n * Get the current filter model.\n * @category Filtering\n */\nexport const gridFilterModelSelector = createSelector(gridFilterStateSelector, filterState => filterState.filterModel);\n\n/**\n * Get the current quick filter values.\n * @category Filtering\n */\nexport const gridQuickFilterValuesSelector = createSelector(gridFilterModelSelector, filterModel => filterModel.quickFilterValues);\n\n/**\n * @category Visible rows\n * @ignore - do not document.\n */\nexport const gridVisibleRowsLookupSelector = createRootSelector(state => state.visibleRowsLookup);\n\n/**\n * @category Filtering\n * @ignore - do not document.\n */\nexport const gridFilteredRowsLookupSelector = createSelector(gridFilterStateSelector, filterState => filterState.filteredRowsLookup);\n\n/**\n * @category Filtering\n * @ignore - do not document.\n */\nexport const gridFilteredChildrenCountLookupSelector = createSelector(gridFilterStateSelector, filterState => filterState.filteredChildrenCountLookup);\n\n/**\n * @category Filtering\n * @ignore - do not document.\n */\nexport const gridFilteredDescendantCountLookupSelector = createSelector(gridFilterStateSelector, filterState => filterState.filteredDescendantCountLookup);\n\n/**\n * Get the id and the model of the rows accessible after the filtering process.\n * Does not contain the collapsed children.\n * @category Filtering\n */\nexport const gridExpandedSortedRowEntriesSelector = createSelectorMemoized(gridVisibleRowsLookupSelector, gridSortedRowEntriesSelector, (visibleRowsLookup, sortedRows) => {\n if (isObjectEmpty(visibleRowsLookup)) {\n return sortedRows;\n }\n return sortedRows.filter(row => visibleRowsLookup[row.id] !== false);\n});\n\n/**\n * Get the id of the rows accessible after the filtering process.\n * Does not contain the collapsed children.\n * @category Filtering\n */\nexport const gridExpandedSortedRowIdsSelector = createSelectorMemoized(gridExpandedSortedRowEntriesSelector, visibleSortedRowEntries => visibleSortedRowEntries.map(row => row.id));\n\n/**\n * Get the id and the model of the rows accessible after the filtering process.\n * Contains the collapsed children.\n * @category Filtering\n */\nexport const gridFilteredSortedRowEntriesSelector = createSelectorMemoized(gridFilteredRowsLookupSelector, gridSortedRowEntriesSelector, (filteredRowsLookup, sortedRows) => isObjectEmpty(filteredRowsLookup) ? sortedRows : sortedRows.filter(row => filteredRowsLookup[row.id] !== false));\n\n/**\n * Get the id of the rows accessible after the filtering process.\n * Contains the collapsed children.\n * @category Filtering\n */\nexport const gridFilteredSortedRowIdsSelector = createSelectorMemoized(gridFilteredSortedRowEntriesSelector, filteredSortedRowEntries => filteredSortedRowEntries.map(row => row.id));\n\n/**\n * Get the ids to position in the current tree level lookup of the rows accessible after the filtering process.\n * Does not contain the collapsed children.\n * @category Filtering\n * @ignore - do not document.\n */\nexport const gridExpandedSortedRowTreeLevelPositionLookupSelector = createSelectorMemoized(gridExpandedSortedRowIdsSelector, gridRowTreeSelector, (visibleSortedRowIds, rowTree) => {\n const depthPositionCounter = {};\n let lastDepth = 0;\n return visibleSortedRowIds.reduce((acc, rowId) => {\n const rowNode = rowTree[rowId];\n if (!depthPositionCounter[rowNode.depth]) {\n depthPositionCounter[rowNode.depth] = 0;\n }\n\n // going deeper in the tree should reset the counter\n // since it might have been used in some other branch at the same level, up in the tree\n // going back up should keep the counter and continue where it left off\n if (rowNode.depth > lastDepth) {\n depthPositionCounter[rowNode.depth] = 0;\n }\n lastDepth = rowNode.depth;\n depthPositionCounter[rowNode.depth] += 1;\n acc[rowId] = depthPositionCounter[rowNode.depth];\n return acc;\n }, {});\n});\n\n/**\n * Get the id and the model of the rows per depth level, accessible after the filtering process.\n * Returns an array of arrays, where each array index contains the rows for the depth level equal to the index.\n * @category Filtering\n */\nexport const gridFilteredSortedDepthRowEntriesSelector = createSelectorMemoized(gridFilteredSortedRowEntriesSelector, gridRowTreeSelector, gridRowMaximumTreeDepthSelector, (sortedRows, rowTree, rowTreeDepth) => {\n if (rowTreeDepth < 2) {\n return [sortedRows];\n }\n return sortedRows.reduce((acc, row) => {\n const depth = rowTree[row.id]?.depth;\n if (depth === undefined) {\n return acc;\n }\n if (!acc[depth]) {\n acc[depth] = [];\n }\n acc[depth].push(row);\n return acc;\n }, [[]]);\n});\n\n/**\n * Get the id and the model of the top level rows accessible after the filtering process.\n * @category Filtering\n */\nexport const gridFilteredSortedTopLevelRowEntriesSelector = createSelector(gridFilteredSortedDepthRowEntriesSelector, filteredSortedDepthRows => filteredSortedDepthRows[0] ?? []);\n\n/**\n * Get the amount of rows accessible after the filtering process.\n * @category Filtering\n */\nexport const gridExpandedRowCountSelector = createSelector(gridExpandedSortedRowEntriesSelector, visibleSortedRows => visibleSortedRows.length);\n\n/**\n * Get the amount of top level rows accessible after the filtering process.\n * @category Filtering\n */\nexport const gridFilteredTopLevelRowCountSelector = createSelector(gridFilteredSortedTopLevelRowEntriesSelector, visibleSortedTopLevelRows => visibleSortedTopLevelRows.length);\n\n/**\n * Get the amount of rows accessible after the filtering process.\n * Includes top level and descendant rows.\n * @category Filtering\n */\nexport const gridFilteredRowCountSelector = createSelector(gridFilteredSortedRowEntriesSelector, filteredSortedRowEntries => filteredSortedRowEntries.length);\n\n/**\n * Get the amount of descendant rows accessible after the filtering process.\n * @category Filtering\n */\nexport const gridFilteredDescendantRowCountSelector = createSelector(gridFilteredRowCountSelector, gridFilteredTopLevelRowCountSelector, (totalRowCount, topLevelRowCount) => totalRowCount - topLevelRowCount);\n\n/**\n * @category Filtering\n * @ignore - do not document.\n */\nexport const gridFilterActiveItemsSelector = createSelectorMemoized(gridFilterModelSelector, gridColumnLookupSelector, (filterModel, columnLookup) => filterModel.items?.filter(item => {\n if (!item.field) {\n return false;\n }\n const column = columnLookup[item.field];\n if (!column?.filterOperators || column?.filterOperators?.length === 0) {\n return false;\n }\n const filterOperator = column.filterOperators.find(operator => operator.value === item.operator);\n if (!filterOperator) {\n return false;\n }\n const hasFilterValue = Array.isArray(item.value) ? item.value.length > 0 : item.value != null && item.value?.toString() !== '';\n return !filterOperator.InputComponent || hasFilterValue;\n}));\n/**\n * @category Filtering\n * @ignore - do not document.\n */\nexport const gridFilterActiveItemsLookupSelector = createSelectorMemoized(gridFilterActiveItemsSelector, activeFilters => {\n const result = activeFilters.reduce((res, filterItem) => {\n if (!res[filterItem.field]) {\n res[filterItem.field] = [filterItem];\n } else {\n res[filterItem.field].push(filterItem);\n }\n return res;\n }, {});\n return result;\n});\n\n/**\n * Get the index lookup for expanded (visible) rows only.\n * Does not include collapsed children.\n * @ignore - do not document.\n */\nexport const gridExpandedSortedRowIndexLookupSelector = createSelectorMemoized(gridExpandedSortedRowIdsSelector, expandedSortedIds => {\n return expandedSortedIds.reduce((acc, id, index) => {\n acc[id] = index;\n return acc;\n }, Object.create(null));\n});","import { createSelector, createRootSelector, createSelectorMemoized } from \"../../../utils/createSelector.mjs\";\nimport { gridDataRowIdsSelector, gridRowsLookupSelector } from \"../rows/gridRowsSelector.mjs\";\nimport { gridFilteredRowCountSelector } from \"../filter/gridFilterSelector.mjs\";\nimport { createRowSelectionManager } from \"../../../models/gridRowSelectionManager.mjs\";\nexport const gridRowSelectionStateSelector = createRootSelector(state => state.rowSelection);\nexport const gridRowSelectionManagerSelector = createSelectorMemoized(gridRowSelectionStateSelector, createRowSelectionManager);\nexport const gridRowSelectionCountSelector = createSelector(gridRowSelectionStateSelector, gridFilteredRowCountSelector, (selection, filteredRowCount) => {\n if (selection.type === 'include') {\n return selection.ids.size;\n }\n // In exclude selection, all rows are selectable.\n return filteredRowCount - selection.ids.size;\n});\nexport const gridRowSelectionIdsSelector = createSelectorMemoized(gridRowSelectionStateSelector, gridRowsLookupSelector, gridDataRowIdsSelector, (selectionModel, rowsLookup, rowIds) => {\n const map = new Map();\n if (selectionModel.type === 'include') {\n for (const id of selectionModel.ids) {\n map.set(id, rowsLookup[id]);\n }\n } else {\n for (let i = 0; i < rowIds.length; i += 1) {\n const id = rowIds[i];\n if (!selectionModel.ids.has(id)) {\n map.set(id, rowsLookup[id]);\n }\n }\n }\n return map;\n});","import { GRID_ID_AUTOGENERATED } from \"../features/rows/gridRowsUtils.mjs\";\nimport { createRootSelector } from \"../../utils/createSelector.mjs\";\n\n/**\n * Get the row id for a given row\n * @param apiRef - The grid api reference\n * @param {GridRowModel} row - The row to get the id for\n * @returns {GridRowId} The row id\n */\nexport const gridRowIdSelector = createRootSelector((state, row) => {\n if (GRID_ID_AUTOGENERATED in row) {\n return row[GRID_ID_AUTOGENERATED];\n }\n return state.props.getRowId ? state.props.getRowId(row) : row.id;\n});\nexport const gridRowSelectableSelector = createRootSelector(state => {\n return state.props.isRowSelectable;\n});","import { GridSignature } from \"../../../constants/signature.mjs\";\nimport { GRID_ROOT_GROUP_ID } from \"../rows/gridRowsUtils.mjs\";\nimport { gridFilteredRowsLookupSelector } from \"../filter/gridFilterSelector.mjs\";\nimport { gridSortedRowIdsSelector } from \"../sorting/gridSortingSelector.mjs\";\nimport { gridRowSelectionManagerSelector } from \"./gridRowSelectionSelector.mjs\";\nimport { gridRowsLookupSelector, gridRowTreeSelector } from \"../rows/gridRowsSelector.mjs\";\nimport { createSelector } from \"../../../utils/createSelector.mjs\";\nimport { gridColumnDefinitionsSelector } from \"../columns/index.mjs\";\nimport { gridRowSelectableSelector } from \"../../core/gridPropsSelectors.mjs\";\nexport const ROW_SELECTION_PROPAGATION_DEFAULT = {\n parents: true,\n descendants: true\n};\nfunction getGridRowGroupSelectableDescendants(apiRef, groupId) {\n const rowTree = gridRowTreeSelector(apiRef);\n const sortedRowIds = gridSortedRowIdsSelector(apiRef);\n const filteredRowsLookup = gridFilteredRowsLookupSelector(apiRef);\n const groupNode = rowTree[groupId];\n if (!groupNode || groupNode.type !== 'group') {\n return [];\n }\n const descendants = [];\n const startIndex = sortedRowIds.findIndex(id => id === groupId) + 1;\n for (let index = startIndex; index < sortedRowIds.length && rowTree[sortedRowIds[index]]?.depth > groupNode.depth; index += 1) {\n const id = sortedRowIds[index];\n if (filteredRowsLookup[id] !== false && apiRef.current.isRowSelectable(id)) {\n descendants.push(id);\n }\n }\n return descendants;\n}\nexport const checkboxPropsSelector = createSelector(gridColumnDefinitionsSelector, gridRowTreeSelector, gridFilteredRowsLookupSelector, gridRowSelectionManagerSelector, gridRowsLookupSelector, gridRowSelectableSelector, (columns, rowTree, filteredRowsLookup, rowSelectionManager, rowsLookup, isRowSelectable, {\n groupId,\n autoSelectParents\n}) => {\n const groupNode = rowTree[groupId];\n const rowParams = {\n id: groupId,\n row: rowsLookup[groupId],\n columns\n };\n let isSelectable = true;\n if (typeof isRowSelectable === 'function' && rowsLookup[groupId]) {\n isSelectable = isRowSelectable(rowParams);\n }\n if (!groupNode || groupNode.type !== 'group' || rowSelectionManager.has(groupId)) {\n return {\n isIndeterminate: false,\n isChecked: rowSelectionManager.has(groupId),\n isSelectable\n };\n }\n let hasSelectedDescendant = false;\n let hasUnSelectedDescendant = false;\n const traverseDescendants = itemToTraverseId => {\n if (filteredRowsLookup[itemToTraverseId] === false ||\n // Perf: Skip checking the rest of the descendants if we already\n // know that there is a selected and an unselected descendant\n hasSelectedDescendant && hasUnSelectedDescendant) {\n return;\n }\n const node = rowTree[itemToTraverseId];\n if (node?.type === 'group') {\n node.children.forEach(traverseDescendants);\n }\n // Check if row is selectable before considering it for parent selection state\n const descendantRowParams = {\n id: itemToTraverseId,\n row: rowsLookup[itemToTraverseId],\n columns\n };\n const rowIsSelectable = typeof isRowSelectable === 'function' && rowsLookup[itemToTraverseId] ? isRowSelectable(descendantRowParams) : true;\n\n // Only consider selectable rows when determining parent selection state\n if (rowIsSelectable) {\n if (rowSelectionManager.has(itemToTraverseId)) {\n hasSelectedDescendant = true;\n } else {\n hasUnSelectedDescendant = true;\n }\n }\n };\n traverseDescendants(groupId);\n return {\n isIndeterminate: hasSelectedDescendant && hasUnSelectedDescendant,\n isChecked: autoSelectParents ? hasSelectedDescendant && !hasUnSelectedDescendant : false,\n isSelectable\n };\n});\nexport function isMultipleRowSelectionEnabled(props) {\n if (props.signature === GridSignature.DataGrid) {\n // DataGrid Community has multiple row selection enabled only if checkbox selection is enabled.\n return props.checkboxSelection && props.disableMultipleRowSelection !== true;\n }\n return !props.disableMultipleRowSelection;\n}\nconst getRowNodeParents = (tree, id) => {\n const parents = [];\n let parent = id;\n while (parent != null && parent !== GRID_ROOT_GROUP_ID) {\n const node = tree[parent];\n if (!node) {\n return parents;\n }\n parents.push(parent);\n parent = node.parent;\n }\n return parents;\n};\nconst getFilteredRowNodeSiblings = (tree, filteredRows, id) => {\n const node = tree[id];\n if (!node) {\n return [];\n }\n const parent = node.parent;\n if (parent == null) {\n return [];\n }\n const parentNode = tree[parent];\n return parentNode.children.filter(childId => childId !== id && filteredRows[childId] !== false);\n};\nexport const findRowsToSelect = (apiRef, tree, selectedRow, autoSelectDescendants, autoSelectParents, addRow, rowSelectionManager = gridRowSelectionManagerSelector(apiRef)) => {\n const filteredRows = gridFilteredRowsLookupSelector(apiRef);\n const selectedDescendants = new Set([]);\n if (!autoSelectDescendants && !autoSelectParents || filteredRows[selectedRow] === false) {\n return;\n }\n if (autoSelectDescendants) {\n const rowNode = tree[selectedRow];\n if (rowNode?.type === 'group') {\n const descendants = getGridRowGroupSelectableDescendants(apiRef, selectedRow);\n descendants.forEach(rowId => {\n addRow(rowId);\n selectedDescendants.add(rowId);\n });\n }\n }\n if (autoSelectParents) {\n const checkAllDescendantsSelected = rowId => {\n const node = tree[rowId];\n if (!node) {\n return false;\n }\n // For non-group nodes, check if it's selected or if it's non-selectable\n if (node.type !== 'group') {\n // If the row is selectable, it must be selected\n if (apiRef.current.isRowSelectable(rowId)) {\n return rowSelectionManager.has(rowId) || selectedDescendants.has(rowId);\n }\n // Non-selectable rows don't affect parent selection\n return true;\n }\n // For group nodes, check if it's selected or all its children are selected\n if (rowSelectionManager.has(rowId) || selectedDescendants.has(rowId)) {\n return true;\n }\n // Recursively check all children\n return node.children.every(checkAllDescendantsSelected);\n };\n const traverseParents = rowId => {\n const siblings = getFilteredRowNodeSiblings(tree, filteredRows, rowId);\n // Check if all selectable siblings are selected\n const allSelectableSiblingsSelected = siblings.every(siblingId => {\n // Non-selectable siblings don't affect parent selection\n if (!apiRef.current.isRowSelectable(siblingId)) {\n return true;\n }\n return checkAllDescendantsSelected(siblingId);\n });\n if (siblings.length === 0 || allSelectableSiblingsSelected) {\n const rowNode = tree[rowId];\n const parent = rowNode?.parent;\n if (parent != null && parent !== GRID_ROOT_GROUP_ID && apiRef.current.isRowSelectable(parent)) {\n addRow(parent);\n selectedDescendants.add(parent);\n traverseParents(parent);\n }\n }\n };\n // For root level rows, we don't need to traverse parents\n const rowNode = tree[selectedRow];\n if (!rowNode || rowNode.parent === GRID_ROOT_GROUP_ID) {\n return;\n }\n traverseParents(selectedRow);\n }\n};\nexport const findRowsToDeselect = (apiRef, tree, deselectedRow, autoSelectDescendants, autoSelectParents, removeRow) => {\n const rowSelectionManager = gridRowSelectionManagerSelector(apiRef);\n if (!autoSelectParents && !autoSelectDescendants) {\n return;\n }\n if (autoSelectParents) {\n const allParents = getRowNodeParents(tree, deselectedRow);\n allParents.forEach(parent => {\n const isSelected = rowSelectionManager.has(parent);\n if (isSelected) {\n removeRow(parent);\n }\n });\n }\n if (autoSelectDescendants) {\n const rowNode = tree[deselectedRow];\n if (rowNode?.type === 'group') {\n const descendants = getGridRowGroupSelectableDescendants(apiRef, deselectedRow);\n descendants.forEach(descendant => {\n removeRow(descendant);\n });\n }\n }\n};","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"field\", \"id\", \"formattedValue\", \"row\", \"rowNode\", \"colDef\", \"isEditable\", \"cellMode\", \"hasFocus\", \"tabIndex\", \"api\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport composeClasses from '@mui/utils/composeClasses';\nimport useEventCallback from '@mui/utils/useEventCallback';\nimport { forwardRef } from '@mui/x-internals/forwardRef';\nimport { useGridApiContext } from \"../../hooks/utils/useGridApiContext.mjs\";\nimport { useGridRootProps } from \"../../hooks/utils/useGridRootProps.mjs\";\nimport { getDataGridUtilityClass } from \"../../constants/gridClasses.mjs\";\nimport { useGridSelector, objectShallowCompare } from \"../../hooks/utils/useGridSelector.mjs\";\nimport { checkboxPropsSelector } from \"../../hooks/features/rowSelection/utils.mjs\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n classes\n } = ownerState;\n const slots = {\n root: ['checkboxInput']\n };\n return composeClasses(slots, getDataGridUtilityClass, classes);\n};\nconst GridCellCheckboxForwardRef = forwardRef(function GridCellCheckboxRenderer(props, ref) {\n const {\n field,\n id,\n rowNode,\n tabIndex\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const apiRef = useGridApiContext();\n const rootProps = useGridRootProps();\n const ownerState = {\n classes: rootProps.classes\n };\n const classes = useUtilityClasses(ownerState);\n const {\n isIndeterminate,\n isChecked,\n isSelectable\n } = useGridSelector(apiRef, checkboxPropsSelector, {\n groupId: id,\n autoSelectParents: rootProps.rowSelectionPropagation?.parents ?? false\n }, objectShallowCompare);\n const disabled = !isSelectable;\n const handleChange = event => {\n if (disabled) {\n return;\n }\n const params = {\n value: event.target.checked,\n id\n };\n apiRef.current.publishEvent('rowSelectionCheckboxChange', params, event);\n };\n React.useLayoutEffect(() => {\n if (tabIndex === 0 && !disabled) {\n const element = apiRef.current.getCellElement(id, field);\n if (element) {\n element.tabIndex = -1;\n }\n }\n }, [apiRef, tabIndex, id, field, disabled]);\n const handleKeyDown = useEventCallback(event => {\n if (event.key === ' ') {\n // We call event.stopPropagation to avoid selecting the row and also scrolling to bottom\n // TODO: Remove and add a check inside useGridKeyboardNavigation\n event.stopPropagation();\n }\n if (disabled) {\n return;\n }\n });\n const handleClick = useEventCallback(event => {\n if (disabled) {\n event.preventDefault();\n return;\n }\n });\n const handleMouseDown = useEventCallback(() => {\n if (disabled) {\n return;\n }\n });\n if (rowNode.type === 'footer' || rowNode.type === 'pinnedRow') {\n return null;\n }\n const label = apiRef.current.getLocaleText(isChecked && !isIndeterminate ? 'checkboxSelectionUnselectRow' : 'checkboxSelectionSelectRow');\n return /*#__PURE__*/_jsx(rootProps.slots.rowCheckbox, _extends({\n rowId: id,\n tabIndex: disabled ? -1 : tabIndex,\n checked: isChecked && !isIndeterminate,\n onChange: handleChange,\n onClick: handleClick,\n onMouseDown: handleMouseDown,\n className: clsx(classes.root, disabled && 'Mui-disabled'),\n disabled: disabled,\n slotProps: {\n htmlInput: {\n 'aria-disabled': disabled || undefined,\n 'aria-label': label,\n name: 'select_row'\n }\n },\n onKeyDown: handleKeyDown,\n indeterminate: isIndeterminate\n }, rootProps.slotProps?.rowCheckbox, other, {\n ref: ref\n }));\n});\nif (process.env.NODE_ENV !== \"production\") GridCellCheckboxForwardRef.displayName = \"GridCellCheckboxForwardRef\";\nprocess.env.NODE_ENV !== \"production\" ? GridCellCheckboxForwardRef.propTypes /* remove-proptypes */ = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the TypeScript types and run \"pnpm proptypes\" |\n // ----------------------------------------------------------------------\n /**\n * GridApi that let you manipulate the grid.\n */\n api: PropTypes.object.isRequired,\n /**\n * The mode of the cell.\n */\n cellMode: PropTypes.oneOf(['edit', 'view']).isRequired,\n /**\n * The column of the row that the current cell belongs to.\n */\n colDef: PropTypes.object.isRequired,\n /**\n * The column field of the cell that triggered the event.\n */\n field: PropTypes.string.isRequired,\n /**\n * The cell value formatted with the column valueFormatter.\n */\n formattedValue: PropTypes.any,\n /**\n * If true, the cell is the active element.\n */\n hasFocus: PropTypes.bool.isRequired,\n /**\n * The grid row id.\n */\n id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,\n /**\n * If true, the cell is editable.\n */\n isEditable: PropTypes.bool,\n /**\n * The row model of the row that the current cell belongs to.\n */\n row: PropTypes.any.isRequired,\n /**\n * The node of the row that the current cell belongs to.\n */\n rowNode: PropTypes.object.isRequired,\n /**\n * the tabIndex value.\n */\n tabIndex: PropTypes.oneOf([-1, 0]).isRequired,\n /**\n * The cell value.\n * If the column has `valueGetter`, use `params.row` to directly access the fields.\n */\n value: PropTypes.any\n} : void 0;\nexport { GridCellCheckboxForwardRef };\nexport const GridCellCheckboxRenderer = GridCellCheckboxForwardRef;","import { createSelector, createRootSelector } from \"../../../utils/createSelector.mjs\";\nexport const gridFocusStateSelector = createRootSelector(state => state.focus);\nexport const gridFocusCellSelector = createSelector(gridFocusStateSelector, focusState => focusState.cell);\nexport const gridFocusColumnHeaderSelector = createSelector(gridFocusStateSelector, focusState => focusState.columnHeader);\nexport const gridFocusColumnHeaderFilterSelector = createSelector(gridFocusStateSelector, focusState => focusState.columnHeaderFilter);\nexport const gridFocusColumnGroupHeaderSelector = createSelector(gridFocusStateSelector, focusState => focusState.columnGroupHeader);\nexport const gridTabIndexStateSelector = createRootSelector(state => state.tabIndex);\nexport const gridTabIndexCellSelector = createSelector(gridTabIndexStateSelector, state => state.cell);\nexport const gridTabIndexColumnHeaderSelector = createSelector(gridTabIndexStateSelector, state => state.columnHeader);\nexport const gridTabIndexColumnHeaderFilterSelector = createSelector(gridTabIndexStateSelector, state => state.columnHeaderFilter);\nexport const gridTabIndexColumnGroupHeaderSelector = createSelector(gridTabIndexStateSelector, state => state.columnGroupHeader);","import _formatErrorMessage from \"@mui/x-internals/formatErrorMessage\";\nimport { GridSignature } from \"../../../constants/signature.mjs\";\nconst MAX_PAGE_SIZE = 100;\nexport const defaultPageSize = autoPageSize => autoPageSize ? 0 : 100;\nexport const getPageCount = (rowCount, pageSize, page) => {\n if (pageSize > 0 && rowCount > 0) {\n return Math.ceil(rowCount / pageSize);\n }\n if (rowCount === -1 || rowCount == null) {\n // With unknown row-count, we can assume a page after the current one\n return page + 2;\n }\n return 0;\n};\nexport const getDefaultGridPaginationModel = autoPageSize => ({\n page: 0,\n pageSize: autoPageSize ? 0 : 100\n});\nexport const getValidPage = (page, pageCount = 0) => {\n if (pageCount === 0) {\n return page;\n }\n return Math.max(Math.min(page, pageCount - 1), 0);\n};\nexport const throwIfPageSizeExceedsTheLimit = (pageSize, signatureProp) => {\n if (signatureProp === GridSignature.DataGrid && pageSize > MAX_PAGE_SIZE) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? `MUI X: \\`pageSize\\` cannot exceed 100 in the MIT version of the DataGrid.\nYou need to upgrade to DataGridPro or DataGridPremium component to unlock this feature.` : _formatErrorMessage(83));\n }\n};","import { createSelector, createRootSelector, createSelectorMemoized } from \"../../../utils/createSelector.mjs\";\nimport { gridExpandedSortedRowEntriesSelector, gridExpandedSortedRowIdsSelector, gridFilteredSortedTopLevelRowEntriesSelector } from \"../filter/gridFilterSelector.mjs\";\nimport { gridRowMaximumTreeDepthSelector, gridRowTreeSelector } from \"../rows/gridRowsSelector.mjs\";\nimport { getPageCount } from \"./gridPaginationUtils.mjs\";\nconst ALL_RESULTS_PAGE_VALUE = -1;\n\n/**\n * @category Pagination\n * @ignore - do not document.\n */\nexport const gridPaginationSelector = createRootSelector(state => state.pagination);\n\n/**\n * @category Pagination\n * @ignore - do not document.\n */\nexport const gridPaginationEnabledClientSideSelector = createSelector(gridPaginationSelector, pagination => pagination.enabled && pagination.paginationMode === 'client');\n\n/**\n * Get the pagination model\n * @category Pagination\n */\nexport const gridPaginationModelSelector = createSelector(gridPaginationSelector, pagination => pagination.paginationModel);\n\n/**\n * Get the row count\n * @category Pagination\n */\nexport const gridPaginationRowCountSelector = createSelector(gridPaginationSelector, pagination => pagination.rowCount);\n\n/**\n * Get the pagination meta\n * @category Pagination\n */\nexport const gridPaginationMetaSelector = createSelector(gridPaginationSelector, pagination => pagination.meta);\n\n/**\n * Get the index of the page to render if the pagination is enabled\n * @category Pagination\n */\nexport const gridPageSelector = createSelector(gridPaginationModelSelector, paginationModel => paginationModel.page);\n\n/**\n * Get the maximum amount of rows to display on a single page if the pagination is enabled\n * @category Pagination\n */\nexport const gridPageSizeSelector = createSelector(gridPaginationModelSelector, paginationModel => paginationModel.pageSize);\n\n/**\n * Get the amount of pages needed to display all the rows if the pagination is enabled\n * @category Pagination\n */\nexport const gridPageCountSelector = createSelector(gridPaginationModelSelector, gridPaginationRowCountSelector, (paginationModel, rowCount) => getPageCount(rowCount, paginationModel.pageSize, paginationModel.page));\n\n/**\n * Get the index of the first and the last row to include in the current page if the pagination is enabled.\n * @category Pagination\n */\nexport const gridPaginationRowRangeSelector = createSelectorMemoized(gridPaginationEnabledClientSideSelector, gridPaginationModelSelector, gridRowTreeSelector, gridRowMaximumTreeDepthSelector, gridExpandedSortedRowEntriesSelector, gridFilteredSortedTopLevelRowEntriesSelector, (clientSidePaginationEnabled, paginationModel, rowTree, rowTreeDepth, visibleSortedRowEntries, visibleSortedTopLevelRowEntries) => {\n if (!clientSidePaginationEnabled) {\n return null;\n }\n if (!visibleSortedRowEntries || visibleSortedRowEntries.length === 0) {\n return null;\n }\n const visibleTopLevelRowCount = visibleSortedTopLevelRowEntries.length;\n const topLevelFirstRowIndex = Math.min(paginationModel.pageSize * paginationModel.page, visibleTopLevelRowCount - 1);\n const topLevelLastRowIndex = paginationModel.pageSize === ALL_RESULTS_PAGE_VALUE ? visibleTopLevelRowCount - 1 : Math.min(topLevelFirstRowIndex + paginationModel.pageSize - 1, visibleTopLevelRowCount - 1);\n\n // The range contains no element\n if (topLevelFirstRowIndex === -1 || topLevelLastRowIndex === -1) {\n return null;\n }\n\n // The tree is flat, there is no need to look for children\n if (rowTreeDepth < 2) {\n return {\n firstRowIndex: topLevelFirstRowIndex,\n lastRowIndex: topLevelLastRowIndex\n };\n }\n const topLevelFirstRow = visibleSortedTopLevelRowEntries[topLevelFirstRowIndex];\n const topLevelRowsInCurrentPageCount = topLevelLastRowIndex - topLevelFirstRowIndex + 1;\n const firstRowIndex = visibleSortedRowEntries.findIndex(row => row.id === topLevelFirstRow.id);\n let lastRowIndex = firstRowIndex;\n let topLevelRowAdded = 0;\n while (lastRowIndex < visibleSortedRowEntries.length && topLevelRowAdded <= topLevelRowsInCurrentPageCount) {\n const row = visibleSortedRowEntries[lastRowIndex];\n const depth = rowTree[row.id]?.depth;\n if (depth === undefined) {\n lastRowIndex += 1;\n } else {\n if (topLevelRowAdded < topLevelRowsInCurrentPageCount || depth > 0) {\n lastRowIndex += 1;\n }\n if (depth === 0) {\n topLevelRowAdded += 1;\n }\n }\n }\n return {\n firstRowIndex,\n lastRowIndex: lastRowIndex - 1\n };\n});\n\n/**\n * Get the id and the model of each row to include in the current page if the pagination is enabled.\n * @category Pagination\n */\nexport const gridPaginatedVisibleSortedGridRowEntriesSelector = createSelectorMemoized(gridExpandedSortedRowEntriesSelector, gridPaginationRowRangeSelector, (visibleSortedRowEntries, paginationRange) => {\n if (!paginationRange) {\n return [];\n }\n return visibleSortedRowEntries.slice(paginationRange.firstRowIndex, paginationRange.lastRowIndex + 1);\n});\n\n/**\n * Get the id of each row to include in the current page if the pagination is enabled.\n * @category Pagination\n */\nexport const gridPaginatedVisibleSortedGridRowIdsSelector = createSelectorMemoized(gridExpandedSortedRowIdsSelector, gridPaginationRowRangeSelector, (visibleSortedRowIds, paginationRange) => {\n if (!paginationRange) {\n return [];\n }\n return visibleSortedRowIds.slice(paginationRange.firstRowIndex, paginationRange.lastRowIndex + 1);\n});\n\n/**\n * Get the rows, range and rowIndex lookup map after filtering and sorting.\n * Does not contain the collapsed children.\n * @category Pagination\n */\nexport const gridVisibleRowsSelector = createSelectorMemoized(gridPaginationEnabledClientSideSelector, gridPaginationRowRangeSelector, gridPaginatedVisibleSortedGridRowEntriesSelector, gridExpandedSortedRowEntriesSelector, (clientPaginationEnabled, paginationRowRange, paginationRows, expandedSortedRowEntries) => {\n if (clientPaginationEnabled) {\n return {\n rows: paginationRows,\n range: paginationRowRange,\n rowIdToIndexMap: paginationRows.reduce((lookup, row, index) => {\n lookup.set(row.id, index);\n return lookup;\n }, new Map())\n };\n }\n return {\n rows: expandedSortedRowEntries,\n range: expandedSortedRowEntries.length === 0 ? null : {\n firstRowIndex: 0,\n lastRowIndex: expandedSortedRowEntries.length - 1\n },\n rowIdToIndexMap: expandedSortedRowEntries.reduce((lookup, row, index) => {\n lookup.set(row.id, index);\n return lookup;\n }, new Map())\n };\n});","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"field\", \"colDef\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport composeClasses from '@mui/utils/composeClasses';\nimport useEnhancedEffect from '@mui/utils/useEnhancedEffect';\nimport { forwardRef } from '@mui/x-internals/forwardRef';\nimport { isMultipleRowSelectionEnabled } from \"../../hooks/features/rowSelection/utils.mjs\";\nimport { useGridSelector } from \"../../hooks/utils/useGridSelector.mjs\";\nimport { gridTabIndexColumnHeaderSelector } from \"../../hooks/features/focus/gridFocusStateSelector.mjs\";\nimport { gridRowSelectionStateSelector } from \"../../hooks/features/rowSelection/gridRowSelectionSelector.mjs\";\nimport { useGridApiContext } from \"../../hooks/utils/useGridApiContext.mjs\";\nimport { getDataGridUtilityClass } from \"../../constants/gridClasses.mjs\";\nimport { useGridRootProps } from \"../../hooks/utils/useGridRootProps.mjs\";\nimport { gridExpandedSortedRowIdsSelector } from \"../../hooks/features/filter/gridFilterSelector.mjs\";\nimport { gridPaginatedVisibleSortedGridRowIdsSelector } from \"../../hooks/features/pagination/gridPaginationSelector.mjs\";\nimport { createRowSelectionManager } from \"../../models/gridRowSelectionManager.mjs\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n classes\n } = ownerState;\n const slots = {\n root: ['checkboxInput']\n };\n return composeClasses(slots, getDataGridUtilityClass, classes);\n};\nconst GridHeaderCheckbox = forwardRef(function GridHeaderCheckbox(props, ref) {\n const other = _objectWithoutPropertiesLoose(props, _excluded);\n const [, forceUpdate] = React.useState(false);\n const apiRef = useGridApiContext();\n const rootProps = useGridRootProps();\n const ownerState = {\n classes: rootProps.classes\n };\n const classes = useUtilityClasses(ownerState);\n const tabIndexState = useGridSelector(apiRef, gridTabIndexColumnHeaderSelector);\n const selection = useGridSelector(apiRef, gridRowSelectionStateSelector);\n const visibleRowIds = useGridSelector(apiRef, gridExpandedSortedRowIdsSelector);\n const paginatedVisibleRowIds = useGridSelector(apiRef, gridPaginatedVisibleSortedGridRowIdsSelector);\n const filteredSelection = React.useMemo(() => {\n const isRowSelectable = rootProps.isRowSelectable;\n if (typeof isRowSelectable !== 'function') {\n return selection;\n }\n if (selection.type === 'exclude') {\n return selection;\n }\n\n // selection.type === 'include'\n const selectionModel = {\n type: 'include',\n ids: new Set()\n };\n for (const id of selection.ids) {\n if (rootProps.keepNonExistentRowsSelected) {\n selectionModel.ids.add(id);\n }\n // The row might have been deleted\n if (!apiRef.current.getRow(id)) {\n continue;\n }\n if (isRowSelectable(apiRef.current.getRowParams(id))) {\n selectionModel.ids.add(id);\n }\n }\n return selectionModel;\n }, [apiRef, rootProps.isRowSelectable, rootProps.keepNonExistentRowsSelected, selection]);\n\n // All the rows that could be selected / unselected by toggling this checkbox\n const selectionCandidates = React.useMemo(() => {\n const rowIds = !rootProps.pagination || !rootProps.checkboxSelectionVisibleOnly || rootProps.paginationMode === 'server' ? visibleRowIds : paginatedVisibleRowIds;\n\n // Convert to a Set to make O(1) checking if a row exists or not\n const candidates = new Set();\n for (let i = 0; i < rowIds.length; i += 1) {\n const id = rowIds[i];\n if (!apiRef.current.getRow(id)) {\n // The row could have been removed\n continue;\n }\n if (apiRef.current.isRowSelectable(id)) {\n candidates.add(id);\n }\n }\n return candidates;\n }, [apiRef, rootProps.pagination, rootProps.paginationMode, rootProps.checkboxSelectionVisibleOnly, paginatedVisibleRowIds, visibleRowIds]);\n\n // Amount of rows selected and that are visible in the current page\n const currentSelectionSize = React.useMemo(() => {\n const selectionManager = createRowSelectionManager(filteredSelection);\n let size = 0;\n for (const id of selectionCandidates) {\n if (selectionManager.has(id)) {\n size += 1;\n }\n }\n return size;\n }, [filteredSelection, selectionCandidates]);\n const isIndeterminate = React.useMemo(() => {\n if (currentSelectionSize === 0) {\n return false;\n }\n const selectionManager = createRowSelectionManager(filteredSelection);\n for (const rowId of selectionCandidates) {\n if (!selectionManager.has(rowId)) {\n return true;\n }\n }\n return false;\n }, [currentSelectionSize, filteredSelection, selectionCandidates]);\n const isChecked = currentSelectionSize > 0;\n const handleChange = event => {\n const params = {\n value: event.target.checked\n };\n apiRef.current.publishEvent('headerSelectionCheckboxChange', params);\n };\n const multipleSelectionEnabled = isMultipleRowSelectionEnabled(rootProps);\n const tabIndex = tabIndexState !== null && tabIndexState.field === props.field && multipleSelectionEnabled ? 0 : -1;\n useEnhancedEffect(() => {\n const element = apiRef.current.getColumnHeaderElement(props.field);\n if (tabIndex === 0 && element && multipleSelectionEnabled) {\n element.tabIndex = -1;\n }\n }, [tabIndex, apiRef, props.field, multipleSelectionEnabled]);\n const handleKeyDown = React.useCallback(event => {\n if (event.key === ' ') {\n // imperative toggle the checkbox because Space is disable by some preventDefault\n apiRef.current.publishEvent('headerSelectionCheckboxChange', {\n value: !isChecked\n });\n }\n }, [apiRef, isChecked]);\n const handleSelectionChange = React.useCallback(() => {\n forceUpdate(p => !p);\n }, []);\n React.useEffect(() => {\n return apiRef.current.subscribeEvent('rowSelectionChange', handleSelectionChange);\n }, [apiRef, handleSelectionChange]);\n const label = apiRef.current.getLocaleText(isChecked && !isIndeterminate ? 'checkboxSelectionUnselectAllRows' : 'checkboxSelectionSelectAllRows');\n return /*#__PURE__*/_jsx(rootProps.slots.baseCheckbox, _extends({\n indeterminate: isIndeterminate,\n checked: isChecked && !isIndeterminate,\n onChange: handleChange,\n className: classes.root,\n slotProps: {\n htmlInput: {\n 'aria-label': label,\n name: 'select_all_rows'\n }\n },\n tabIndex: tabIndex,\n onKeyDown: handleKeyDown,\n disabled: !multipleSelectionEnabled\n }, rootProps.slotProps?.baseCheckbox, other, {\n ref: ref\n }));\n});\nif (process.env.NODE_ENV !== \"production\") GridHeaderCheckbox.displayName = \"GridHeaderCheckbox\";\nprocess.env.NODE_ENV !== \"production\" ? GridHeaderCheckbox.propTypes /* remove-proptypes */ = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the TypeScript types and run \"pnpm proptypes\" |\n // ----------------------------------------------------------------------\n /**\n * The column of the current header component.\n */\n colDef: PropTypes.object.isRequired,\n /**\n * The column field of the column that triggered the event\n */\n field: PropTypes.string.isRequired\n} : void 0;\nexport { GridHeaderCheckbox };","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport { GridCellCheckboxRenderer } from \"../components/columnSelection/GridCellCheckboxRenderer.mjs\";\nimport { GridHeaderCheckbox } from \"../components/columnSelection/GridHeaderCheckbox.mjs\";\nimport { GRID_BOOLEAN_COL_DEF } from \"./gridBooleanColDef.mjs\";\nimport { gridRowIdSelector } from \"../hooks/core/gridPropsSelectors.mjs\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport const GRID_CHECKBOX_SELECTION_FIELD = '__check__';\nexport const GRID_CHECKBOX_SELECTION_COL_DEF = _extends({}, GRID_BOOLEAN_COL_DEF, {\n type: 'custom',\n field: GRID_CHECKBOX_SELECTION_FIELD,\n width: 50,\n resizable: false,\n sortable: false,\n filterable: false,\n // @ts-ignore\n aggregable: false,\n chartable: false,\n disableColumnMenu: true,\n disableReorder: true,\n disableExport: true,\n getApplyQuickFilterFn: () => null,\n display: 'flex',\n valueGetter: (value, row, column, apiRef) => {\n const rowId = gridRowIdSelector(apiRef, row);\n return apiRef.current.isRowSelected(rowId);\n },\n rowSpanValueGetter: (_, row, column, apiRef) => gridRowIdSelector(apiRef, row),\n renderHeader: params => /*#__PURE__*/_jsx(GridHeaderCheckbox, _extends({}, params)),\n renderCell: params => /*#__PURE__*/_jsx(GridCellCheckboxRenderer, _extends({}, params))\n});","'use client';\n\nimport _formatErrorMessage from \"@mui/x-internals/formatErrorMessage\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"item\", \"applyValue\", \"type\", \"apiRef\", \"focusElementRef\", \"slotProps\", \"isFilterActive\", \"headerFilterMenu\", \"clearButton\", \"tabIndex\", \"disabled\", \"disableDebounce\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport useId from '@mui/utils/useId';\nimport { useTimeout } from \"../../../hooks/utils/useTimeout.mjs\";\nimport { useGridRootProps } from \"../../../hooks/utils/useGridRootProps.mjs\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nfunction convertFilterItemValueToInputValue(itemValue, inputType) {\n if (itemValue == null) {\n return '';\n }\n const dateCopy = new Date(itemValue);\n if (Number.isNaN(dateCopy.getTime())) {\n return '';\n }\n if (inputType === 'date') {\n return dateCopy.toISOString().substring(0, 10);\n }\n if (inputType === 'datetime-local') {\n // The date picker expects the date to be in the local timezone.\n // But .toISOString() converts it to UTC with zero offset.\n // So we need to subtract the timezone offset.\n dateCopy.setMinutes(dateCopy.getMinutes() - dateCopy.getTimezoneOffset());\n return dateCopy.toISOString().substring(0, 19);\n }\n return dateCopy.toISOString().substring(0, 10);\n}\nfunction GridFilterInputDate(props) {\n const {\n item,\n applyValue,\n type,\n apiRef,\n focusElementRef,\n slotProps,\n headerFilterMenu,\n clearButton,\n tabIndex,\n disabled,\n disableDebounce = false\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const rootSlotProps = slotProps?.root.slotProps;\n const filterTimeout = useTimeout();\n const [filterValueState, setFilterValueState] = React.useState(() => convertFilterItemValueToInputValue(item.value, type));\n const [applying, setIsApplying] = React.useState(false);\n const id = useId();\n const rootProps = useGridRootProps();\n const debounceMs = disableDebounce ? 0 : rootProps.filterDebounceMs;\n const onFilterChange = React.useCallback(event => {\n filterTimeout.clear();\n const value = event.target.value;\n setFilterValueState(value);\n const date = new Date(value);\n const newItem = _extends({}, item, {\n value: Number.isNaN(date.getTime()) ? undefined : date\n });\n if (debounceMs === 0) {\n applyValue(newItem);\n return;\n }\n setIsApplying(true);\n filterTimeout.start(debounceMs, () => {\n applyValue(newItem);\n setIsApplying(false);\n });\n }, [applyValue, item, debounceMs, filterTimeout]);\n React.useEffect(() => {\n const value = convertFilterItemValueToInputValue(item.value, type);\n setFilterValueState(value);\n }, [item.value, type]);\n return /*#__PURE__*/_jsxs(React.Fragment, {\n children: [/*#__PURE__*/_jsx(rootProps.slots.baseTextField, _extends({\n fullWidth: true,\n id: id,\n label: apiRef.current.getLocaleText('filterPanelInputLabel'),\n placeholder: apiRef.current.getLocaleText('filterPanelInputPlaceholder'),\n value: filterValueState,\n onChange: onFilterChange,\n type: type || 'text',\n disabled: disabled,\n inputRef: focusElementRef,\n slotProps: _extends({}, rootSlotProps, {\n input: _extends({\n endAdornment: applying && debounceMs > 0 ? /*#__PURE__*/_jsx(rootProps.slots.loadIcon, {\n fontSize: \"small\",\n color: \"action\"\n }) : null\n }, rootSlotProps?.input),\n htmlInput: _extends({\n max: type === 'datetime-local' ? '9999-12-31T23:59' : '9999-12-31',\n tabIndex\n }, rootSlotProps?.htmlInput)\n })\n }, rootProps.slotProps?.baseTextField, other, slotProps?.root)), headerFilterMenu, clearButton]\n });\n}\nprocess.env.NODE_ENV !== \"production\" ? GridFilterInputDate.propTypes /* remove-proptypes */ = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the TypeScript types and run \"pnpm proptypes\" |\n // ----------------------------------------------------------------------\n apiRef: PropTypes.shape({\n current: PropTypes.object.isRequired\n }).isRequired,\n applyValue: PropTypes.func.isRequired,\n className: PropTypes.string,\n clearButton: PropTypes.node,\n disabled: PropTypes.bool,\n /**\n * If `true`, filter value changes are applied immediately without debouncing.\n * @default false\n */\n disableDebounce: PropTypes.bool,\n focusElementRef: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.func, PropTypes.object]),\n headerFilterMenu: PropTypes.node,\n inputRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({\n current: (props, propName) => {\n if (props[propName] == null) {\n return null;\n }\n if (typeof props[propName] !== 'object' || props[propName].nodeType !== 1) {\n return new Error(process.env.NODE_ENV !== \"production\" ? `Expected prop '${propName}' to be of type Element` : _formatErrorMessage(49, propName));\n }\n return null;\n }\n })]),\n /**\n * It is `true` if the filter either has a value or an operator with no value\n * required is selected (for example `isEmpty`)\n */\n isFilterActive: PropTypes.bool,\n item: PropTypes.shape({\n field: PropTypes.string.isRequired,\n id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n operator: PropTypes.string.isRequired,\n value: PropTypes.any\n }).isRequired,\n onBlur: PropTypes.func,\n onFocus: PropTypes.func,\n slotProps: PropTypes.object,\n tabIndex: PropTypes.number,\n type: PropTypes.oneOf(['date', 'datetime-local'])\n} : void 0;\nexport { GridFilterInputDate };","import { GridFilterInputDate } from \"../components/panel/filterPanel/GridFilterInputDate.mjs\";\nfunction buildApplyFilterFn(filterItem, compareFn, showTime, keepRawComparison) {\n if (!filterItem.value) {\n return null;\n }\n const date = new Date(filterItem.value);\n if (showTime) {\n date.setSeconds(0, 0);\n } else {\n // In GMT-X timezone, the date will be one day behind.\n // For 2022-08-16:\n // GMT+2: Tue Aug 16 2022 02:00:00 GMT+0200\n // GMT-4: Mon Aug 15 2022 20:00:00 GMT-0400\n //\n // We need to add the offset before resetting the hours.\n date.setMinutes(date.getMinutes() + date.getTimezoneOffset());\n date.setHours(0, 0, 0, 0);\n }\n const time = date.getTime();\n return value => {\n if (!value) {\n return false;\n }\n if (keepRawComparison) {\n return compareFn(value.getTime(), time);\n }\n\n // Make a copy of the date to not reset the hours in the original object\n const dateCopy = new Date(value);\n if (showTime) {\n dateCopy.setSeconds(0, 0);\n } else {\n dateCopy.setHours(0, 0, 0, 0);\n }\n return compareFn(dateCopy.getTime(), time);\n };\n}\nexport const getGridDateOperators = showTime => [{\n value: 'is',\n getApplyFilterFn: filterItem => {\n return buildApplyFilterFn(filterItem, (value1, value2) => value1 === value2, showTime);\n },\n InputComponent: GridFilterInputDate,\n InputComponentProps: {\n type: showTime ? 'datetime-local' : 'date'\n }\n}, {\n value: 'not',\n getApplyFilterFn: filterItem => {\n return buildApplyFilterFn(filterItem, (value1, value2) => value1 !== value2, showTime);\n },\n InputComponent: GridFilterInputDate,\n InputComponentProps: {\n type: showTime ? 'datetime-local' : 'date'\n }\n}, {\n value: 'after',\n getApplyFilterFn: filterItem => {\n return buildApplyFilterFn(filterItem, (value1, value2) => value1 > value2, showTime, showTime);\n },\n InputComponent: GridFilterInputDate,\n InputComponentProps: {\n type: showTime ? 'datetime-local' : 'date'\n }\n}, {\n value: 'onOrAfter',\n getApplyFilterFn: filterItem => {\n return buildApplyFilterFn(filterItem, (value1, value2) => value1 >= value2, showTime, showTime);\n },\n InputComponent: GridFilterInputDate,\n InputComponentProps: {\n type: showTime ? 'datetime-local' : 'date'\n }\n}, {\n value: 'before',\n getApplyFilterFn: filterItem => {\n return buildApplyFilterFn(filterItem, (value1, value2) => value1 < value2, showTime, true);\n },\n InputComponent: GridFilterInputDate,\n InputComponentProps: {\n type: showTime ? 'datetime-local' : 'date'\n }\n}, {\n value: 'onOrBefore',\n getApplyFilterFn: filterItem => {\n return buildApplyFilterFn(filterItem, (value1, value2) => value1 <= value2, showTime, showTime);\n },\n InputComponent: GridFilterInputDate,\n InputComponentProps: {\n type: showTime ? 'datetime-local' : 'date'\n }\n}, {\n value: 'isEmpty',\n getApplyFilterFn: () => {\n return value => {\n return value == null;\n };\n },\n requiresFilterValue: false\n}, {\n value: 'isNotEmpty',\n getApplyFilterFn: () => {\n return value => {\n return value != null;\n };\n },\n requiresFilterValue: false\n}];","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"id\", \"value\", \"formattedValue\", \"api\", \"field\", \"row\", \"rowNode\", \"colDef\", \"cellMode\", \"isEditable\", \"tabIndex\", \"hasFocus\", \"inputProps\", \"isValidating\", \"isProcessingProps\", \"onValueChange\", \"slotProps\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport composeClasses from '@mui/utils/composeClasses';\nimport useEnhancedEffect from '@mui/utils/useEnhancedEffect';\nimport { styled } from '@mui/material/styles';\nimport { NotRendered } from \"../../utils/assert.mjs\";\nimport { getDataGridUtilityClass } from \"../../constants/gridClasses.mjs\";\nimport { useGridRootProps } from \"../../hooks/utils/useGridRootProps.mjs\";\nimport { useGridApiContext } from \"../../hooks/utils/useGridApiContext.mjs\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst StyledInputBase = styled(NotRendered, {\n slot: 'internal'\n})({\n fontSize: 'inherit'\n});\nconst useUtilityClasses = ownerState => {\n const {\n classes\n } = ownerState;\n const slots = {\n root: ['editInputCell']\n };\n return composeClasses(slots, getDataGridUtilityClass, classes);\n};\nfunction GridEditDateCell(props) {\n const {\n id,\n value: valueProp,\n field,\n colDef,\n hasFocus,\n onValueChange,\n slotProps\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const isDateTime = colDef.type === 'dateTime';\n const apiRef = useGridApiContext();\n const inputRef = React.useRef(null);\n const valueTransformed = React.useMemo(() => {\n let parsedDate;\n if (valueProp == null) {\n parsedDate = null;\n } else if (valueProp instanceof Date) {\n parsedDate = valueProp;\n } else {\n parsedDate = new Date((valueProp ?? '').toString());\n }\n let formattedDate;\n if (parsedDate == null || Number.isNaN(parsedDate.getTime())) {\n formattedDate = '';\n } else {\n const localDate = new Date(parsedDate.getTime() - parsedDate.getTimezoneOffset() * 60 * 1000);\n formattedDate = localDate.toISOString().substr(0, isDateTime ? 16 : 10);\n }\n return {\n parsed: parsedDate,\n formatted: formattedDate\n };\n }, [valueProp, isDateTime]);\n const [valueState, setValueState] = React.useState(valueTransformed);\n const rootProps = useGridRootProps();\n const ownerState = {\n classes: rootProps.classes\n };\n const classes = useUtilityClasses(ownerState);\n const parseValueToDate = React.useCallback(value => {\n if (value === '') {\n return null;\n }\n const [date, time] = value.split('T');\n const [year, month, day] = date.split('-');\n const parsedDate = new Date();\n parsedDate.setFullYear(Number(year), Number(month) - 1, Number(day));\n parsedDate.setHours(0, 0, 0, 0);\n if (time) {\n const [hours, minutes] = time.split(':');\n parsedDate.setHours(Number(hours), Number(minutes), 0, 0);\n }\n return parsedDate;\n }, []);\n const handleChange = React.useCallback(async event => {\n const newFormattedDate = event.target.value;\n const newParsedDate = parseValueToDate(newFormattedDate);\n if (onValueChange) {\n await onValueChange(event, newParsedDate);\n }\n setValueState({\n parsed: newParsedDate,\n formatted: newFormattedDate\n });\n apiRef.current.setEditCellValue({\n id,\n field,\n value: newParsedDate\n }, event);\n }, [apiRef, field, id, onValueChange, parseValueToDate]);\n React.useEffect(() => {\n setValueState(state => {\n if (valueTransformed.parsed !== state.parsed && valueTransformed.parsed?.getTime() !== state.parsed?.getTime()) {\n return valueTransformed;\n }\n return state;\n });\n }, [valueTransformed]);\n useEnhancedEffect(() => {\n if (hasFocus) {\n inputRef.current.focus();\n }\n }, [hasFocus]);\n return /*#__PURE__*/_jsx(StyledInputBase, _extends({\n as: rootProps.slots.baseInput,\n inputRef: inputRef,\n fullWidth: true,\n className: classes.root,\n type: isDateTime ? 'datetime-local' : 'date',\n value: valueState.formatted,\n onChange: handleChange\n }, other, slotProps?.root, {\n slotProps: {\n htmlInput: _extends({\n max: isDateTime ? '9999-12-31T23:59' : '9999-12-31'\n }, slotProps?.root?.slotProps?.htmlInput)\n }\n }));\n}\nprocess.env.NODE_ENV !== \"production\" ? GridEditDateCell.propTypes /* remove-proptypes */ = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the TypeScript types and run \"pnpm proptypes\" |\n // ----------------------------------------------------------------------\n /**\n * GridApi that let you manipulate the grid.\n */\n api: PropTypes.object.isRequired,\n /**\n * The mode of the cell.\n */\n cellMode: PropTypes.oneOf(['edit', 'view']).isRequired,\n changeReason: PropTypes.oneOf(['debouncedSetEditCellValue', 'setEditCellValue']),\n /**\n * The column of the row that the current cell belongs to.\n */\n colDef: PropTypes.object.isRequired,\n /**\n * The column field of the cell that triggered the event.\n */\n field: PropTypes.string.isRequired,\n /**\n * The cell value formatted with the column valueFormatter.\n */\n formattedValue: PropTypes.any,\n /**\n * If true, the cell is the active element.\n */\n hasFocus: PropTypes.bool.isRequired,\n /**\n * The grid row id.\n */\n id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,\n /**\n * If true, the cell is editable.\n */\n isEditable: PropTypes.bool,\n isProcessingProps: PropTypes.bool,\n isValidating: PropTypes.bool,\n /**\n * Callback called when the value is changed by the user.\n * @param {React.ChangeEvent} event The event source of the callback.\n * @param {Date | null} newValue The value that is going to be passed to `apiRef.current.setEditCellValue`.\n * @returns {Promise | void} A promise to be awaited before calling `apiRef.current.setEditCellValue`\n */\n onValueChange: PropTypes.func,\n /**\n * The row model of the row that the current cell belongs to.\n */\n row: PropTypes.any.isRequired,\n /**\n * The node of the row that the current cell belongs to.\n */\n rowNode: PropTypes.object.isRequired,\n slotProps: PropTypes.object,\n /**\n * the tabIndex value.\n */\n tabIndex: PropTypes.oneOf([-1, 0]).isRequired,\n /**\n * The cell value.\n * If the column has `valueGetter`, use `params.row` to directly access the fields.\n */\n value: PropTypes.any\n} : void 0;\nexport { GridEditDateCell };\nexport const renderEditDateCell = params => /*#__PURE__*/_jsx(GridEditDateCell, _extends({}, params));\nif (process.env.NODE_ENV !== \"production\") renderEditDateCell.displayName = \"renderEditDateCell\";","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _formatErrorMessage from \"@mui/x-internals/formatErrorMessage\";\nimport { gridDateComparator } from \"../hooks/features/sorting/gridSortingUtils.mjs\";\nimport { getGridDateOperators } from \"./gridDateOperators.mjs\";\nimport { GRID_STRING_COL_DEF } from \"./gridStringColDef.mjs\";\nimport { renderEditDateCell } from \"../components/cell/GridEditDateCell.mjs\";\nimport { gridRowIdSelector } from \"../hooks/core/gridPropsSelectors.mjs\";\nimport { isAutogeneratedRow } from \"../hooks/features/rows/gridRowsUtils.mjs\";\nfunction throwIfNotDateObject({\n value,\n columnType,\n rowId,\n field\n}) {\n if (!(value instanceof Date)) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? `MUI X Data Grid: The \"${columnType}\" column type only accepts Date objects as values. ` + `Received value of type \"${typeof value}\" for row ID \"${rowId}\", field \"${field}\". ` + 'Use valueGetter to transform the value into a Date object.' : _formatErrorMessage(54, columnType, typeof value, rowId, field));\n }\n}\nexport const gridDateFormatter = (value, row, column, apiRef) => {\n if (!value) {\n return '';\n }\n const rowId = gridRowIdSelector(apiRef, row);\n if (isAutogeneratedRow(row) && !(value instanceof Date)) {\n return value;\n }\n throwIfNotDateObject({\n value,\n columnType: 'date',\n rowId,\n field: column.field\n });\n return value.toLocaleDateString();\n};\nexport const gridDateTimeFormatter = (value, row, column, apiRef) => {\n if (!value) {\n return '';\n }\n const rowId = gridRowIdSelector(apiRef, row);\n if (isAutogeneratedRow(row) && !(value instanceof Date)) {\n return value;\n }\n throwIfNotDateObject({\n value,\n columnType: 'dateTime',\n rowId,\n field: column.field\n });\n return value.toLocaleString();\n};\nexport const GRID_DATE_COL_DEF = _extends({}, GRID_STRING_COL_DEF, {\n type: 'date',\n sortComparator: gridDateComparator,\n valueFormatter: gridDateFormatter,\n filterOperators: getGridDateOperators(),\n renderEditCell: renderEditDateCell,\n // @ts-ignore\n pastedValueParser: value => new Date(value)\n});\nexport const GRID_DATETIME_COL_DEF = _extends({}, GRID_STRING_COL_DEF, {\n type: 'dateTime',\n sortComparator: gridDateComparator,\n valueFormatter: gridDateTimeFormatter,\n filterOperators: getGridDateOperators(true),\n renderEditCell: renderEditDateCell,\n // @ts-ignore\n pastedValueParser: value => new Date(value)\n});","import { GridFilterInputValue } from \"../components/panel/filterPanel/GridFilterInputValue.mjs\";\nimport { GridFilterInputMultipleValue } from \"../components/panel/filterPanel/GridFilterInputMultipleValue.mjs\";\nconst parseNumericValue = value => {\n if (value == null) {\n return null;\n }\n return Number(value);\n};\nexport const getGridNumericQuickFilterFn = value => {\n if (value == null || Number.isNaN(value) || value === '') {\n return null;\n }\n return columnValue => {\n return parseNumericValue(columnValue) === parseNumericValue(value);\n };\n};\nexport const getGridNumericOperators = () => [{\n value: '=',\n getApplyFilterFn: filterItem => {\n if (filterItem.value == null || Number.isNaN(filterItem.value)) {\n return null;\n }\n return value => {\n return parseNumericValue(value) === filterItem.value;\n };\n },\n InputComponent: GridFilterInputValue,\n InputComponentProps: {\n type: 'number'\n }\n}, {\n value: '!=',\n getApplyFilterFn: filterItem => {\n if (filterItem.value == null || Number.isNaN(filterItem.value)) {\n return null;\n }\n return value => {\n return parseNumericValue(value) !== filterItem.value;\n };\n },\n InputComponent: GridFilterInputValue,\n InputComponentProps: {\n type: 'number'\n }\n}, {\n value: '>',\n getApplyFilterFn: filterItem => {\n if (filterItem.value == null || Number.isNaN(filterItem.value)) {\n return null;\n }\n return value => {\n if (value == null) {\n return false;\n }\n return parseNumericValue(value) > filterItem.value;\n };\n },\n InputComponent: GridFilterInputValue,\n InputComponentProps: {\n type: 'number'\n }\n}, {\n value: '>=',\n getApplyFilterFn: filterItem => {\n if (filterItem.value == null || Number.isNaN(filterItem.value)) {\n return null;\n }\n return value => {\n if (value == null) {\n return false;\n }\n return parseNumericValue(value) >= filterItem.value;\n };\n },\n InputComponent: GridFilterInputValue,\n InputComponentProps: {\n type: 'number'\n }\n}, {\n value: '<',\n getApplyFilterFn: filterItem => {\n if (filterItem.value == null || Number.isNaN(filterItem.value)) {\n return null;\n }\n return value => {\n if (value == null) {\n return false;\n }\n return parseNumericValue(value) < filterItem.value;\n };\n },\n InputComponent: GridFilterInputValue,\n InputComponentProps: {\n type: 'number'\n }\n}, {\n value: '<=',\n getApplyFilterFn: filterItem => {\n if (filterItem.value == null || Number.isNaN(filterItem.value)) {\n return null;\n }\n return value => {\n if (value == null) {\n return false;\n }\n return parseNumericValue(value) <= filterItem.value;\n };\n },\n InputComponent: GridFilterInputValue,\n InputComponentProps: {\n type: 'number'\n }\n}, {\n value: 'isEmpty',\n getApplyFilterFn: () => {\n return value => {\n return value == null;\n };\n },\n requiresFilterValue: false\n}, {\n value: 'isNotEmpty',\n getApplyFilterFn: () => {\n return value => {\n return value != null;\n };\n },\n requiresFilterValue: false\n}, {\n value: 'isAnyOf',\n getApplyFilterFn: filterItem => {\n if (!Array.isArray(filterItem.value) || filterItem.value.length === 0) {\n return null;\n }\n return value => {\n return value != null && filterItem.value.includes(Number(value));\n };\n },\n InputComponent: GridFilterInputMultipleValue,\n InputComponentProps: {\n type: 'number'\n }\n}];","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport { gridNumberComparator } from \"../hooks/features/sorting/gridSortingUtils.mjs\";\nimport { isNumber } from \"../utils/utils.mjs\";\nimport { getGridNumericOperators, getGridNumericQuickFilterFn } from \"./gridNumericOperators.mjs\";\nimport { GRID_STRING_COL_DEF } from \"./gridStringColDef.mjs\";\nexport const GRID_NUMERIC_COL_DEF = _extends({}, GRID_STRING_COL_DEF, {\n type: 'number',\n align: 'right',\n headerAlign: 'right',\n sortComparator: gridNumberComparator,\n valueParser: value => value === '' ? null : Number(value),\n valueFormatter: value => isNumber(value) ? value.toLocaleString() : value || '',\n filterOperators: getGridNumericOperators(),\n getApplyQuickFilterFn: getGridNumericQuickFilterFn\n});","import _extends from \"@babel/runtime/helpers/esm/extends\";\nexport function isSingleSelectColDef(colDef) {\n return colDef?.type === 'singleSelect';\n}\nexport function isMultiSelectColDef(colDef) {\n return colDef?.type === 'multiSelect';\n}\nexport function getValueOptions(column, additionalParams) {\n if (!column) {\n return undefined;\n }\n return typeof column.valueOptions === 'function' ? column.valueOptions(_extends({\n field: column.field\n }, additionalParams)) : column.valueOptions;\n}\nexport function getValueFromValueOptions(value, valueOptions, getOptionValue) {\n if (valueOptions === undefined) {\n return undefined;\n }\n const result = valueOptions.find(option => {\n const optionValue = getOptionValue(option);\n return String(optionValue) === String(value);\n });\n return getOptionValue(result);\n}","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"id\", \"value\", \"formattedValue\", \"api\", \"field\", \"row\", \"rowNode\", \"colDef\", \"cellMode\", \"isEditable\", \"tabIndex\", \"className\", \"hasFocus\", \"isValidating\", \"isProcessingProps\", \"error\", \"onValueChange\", \"initialOpen\", \"slotProps\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport useEnhancedEffect from '@mui/utils/useEnhancedEffect';\nimport { GridCellEditStopReasons } from \"../../models/params/gridEditCellParams.mjs\";\nimport { useGridRootProps } from \"../../hooks/utils/useGridRootProps.mjs\";\nimport { GridEditModes } from \"../../models/gridEditRowModel.mjs\";\nimport { getValueFromValueOptions, getValueOptions, isSingleSelectColDef } from \"../panel/filterPanel/filterPanelUtils.mjs\";\nimport { useGridApiContext } from \"../../hooks/utils/useGridApiContext.mjs\";\nimport { createElement as _createElement } from \"react\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction isKeyboardEvent(event) {\n return 'key' in event && !!event.key;\n}\nfunction GridEditSingleSelectCell(props) {\n const rootProps = useGridRootProps();\n const {\n id,\n value: valueProp,\n field,\n row,\n colDef,\n hasFocus,\n error,\n onValueChange,\n initialOpen = rootProps.editMode === GridEditModes.Cell,\n slotProps\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const apiRef = useGridApiContext();\n const ref = React.useRef(null);\n const inputRef = React.useRef(null);\n const [open, setOpen] = React.useState(initialOpen);\n const baseSelectProps = rootProps.slotProps?.baseSelect || {};\n const isSelectNative = baseSelectProps.native ?? false;\n useEnhancedEffect(() => {\n if (hasFocus) {\n inputRef.current?.focus();\n }\n }, [hasFocus]);\n if (!isSingleSelectColDef(colDef)) {\n return null;\n }\n const valueOptions = getValueOptions(colDef, {\n id,\n row\n });\n if (!valueOptions) {\n return null;\n }\n const getOptionValue = colDef.getOptionValue;\n const getOptionLabel = colDef.getOptionLabel;\n const handleChange = async event => {\n if (!isSingleSelectColDef(colDef) || !valueOptions) {\n return;\n }\n setOpen(false);\n const target = event.target;\n // NativeSelect casts the value to a string.\n const formattedTargetValue = getValueFromValueOptions(target.value, valueOptions, getOptionValue);\n if (onValueChange) {\n await onValueChange(event, formattedTargetValue);\n }\n await apiRef.current.setEditCellValue({\n id,\n field,\n value: formattedTargetValue\n }, event);\n };\n const handleClose = (event, reason) => {\n if (rootProps.editMode === GridEditModes.Row) {\n setOpen(false);\n return;\n }\n if (reason === 'backdropClick' || event.key === 'Escape') {\n const params = apiRef.current.getCellParams(id, field);\n apiRef.current.publishEvent('cellEditStop', _extends({}, params, {\n reason: event.key === 'Escape' ? GridCellEditStopReasons.escapeKeyDown : GridCellEditStopReasons.cellFocusOut\n }));\n }\n };\n const handleOpen = event => {\n if (isKeyboardEvent(event) && event.key === 'Enter') {\n return;\n }\n setOpen(true);\n };\n if (!valueOptions || !colDef) {\n return null;\n }\n return /*#__PURE__*/_jsx(rootProps.slots.baseSelect, _extends({\n ref: ref,\n value: valueProp,\n onChange: handleChange,\n open: open,\n onOpen: handleOpen,\n onClose: handleClose,\n error: error,\n native: isSelectNative,\n fullWidth: true,\n slotProps: {\n htmlInput: {\n ref: inputRef\n }\n }\n }, other, slotProps?.root, rootProps.slotProps?.baseSelect, {\n children: valueOptions.map(valueOption => {\n const value = getOptionValue(valueOption);\n return /*#__PURE__*/_createElement(rootProps.slots.baseSelectOption, _extends({}, rootProps.slotProps?.baseSelectOption || {}, {\n native: isSelectNative,\n key: value,\n value: value\n }), getOptionLabel(valueOption));\n })\n }));\n}\nprocess.env.NODE_ENV !== \"production\" ? GridEditSingleSelectCell.propTypes /* remove-proptypes */ = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the TypeScript types and run \"pnpm proptypes\" |\n // ----------------------------------------------------------------------\n /**\n * GridApi that let you manipulate the grid.\n */\n api: PropTypes.object.isRequired,\n /**\n * The mode of the cell.\n */\n cellMode: PropTypes.oneOf(['edit', 'view']).isRequired,\n changeReason: PropTypes.oneOf(['debouncedSetEditCellValue', 'setEditCellValue']),\n /**\n * The column of the row that the current cell belongs to.\n */\n colDef: PropTypes.object.isRequired,\n /**\n * The column field of the cell that triggered the event.\n */\n field: PropTypes.string.isRequired,\n /**\n * The cell value formatted with the column valueFormatter.\n */\n formattedValue: PropTypes.any,\n /**\n * If true, the cell is the active element.\n */\n hasFocus: PropTypes.bool.isRequired,\n /**\n * The grid row id.\n */\n id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,\n /**\n * If true, the select opens by default.\n */\n initialOpen: PropTypes.bool,\n /**\n * If true, the cell is editable.\n */\n isEditable: PropTypes.bool,\n isProcessingProps: PropTypes.bool,\n isValidating: PropTypes.bool,\n /**\n * Callback called when the value is changed by the user.\n * @param {Event} event The event source of the callback.\n * @param {any} newValue The value that is going to be passed to `apiRef.current.setEditCellValue`.\n * @returns {Promise | void} A promise to be awaited before calling `apiRef.current.setEditCellValue`\n */\n onValueChange: PropTypes.func,\n /**\n * The row model of the row that the current cell belongs to.\n */\n row: PropTypes.any.isRequired,\n /**\n * The node of the row that the current cell belongs to.\n */\n rowNode: PropTypes.object.isRequired,\n /**\n * the tabIndex value.\n */\n tabIndex: PropTypes.oneOf([-1, 0]).isRequired,\n /**\n * The cell value.\n * If the column has `valueGetter`, use `params.row` to directly access the fields.\n */\n value: PropTypes.any\n} : void 0;\nexport { GridEditSingleSelectCell };\nexport const renderEditSingleSelectCell = params => /*#__PURE__*/_jsx(GridEditSingleSelectCell, _extends({}, params));\nif (process.env.NODE_ENV !== \"production\") renderEditSingleSelectCell.displayName = \"renderEditSingleSelectCell\";","import _formatErrorMessage from \"@mui/x-internals/formatErrorMessage\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"item\", \"applyValue\", \"type\", \"apiRef\", \"focusElementRef\", \"tabIndex\", \"isFilterActive\", \"clearButton\", \"headerFilterMenu\", \"slotProps\", \"disableDebounce\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport useId from '@mui/utils/useId';\nimport { useGridRootProps } from \"../../../hooks/utils/useGridRootProps.mjs\";\nimport { getValueFromValueOptions, getValueOptions, isSingleSelectColDef } from \"./filterPanelUtils.mjs\";\nimport { createElement as _createElement } from \"react\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst renderSingleSelectOptions = ({\n column,\n OptionComponent,\n getOptionLabel,\n getOptionValue,\n isSelectNative,\n baseSelectOptionProps\n}) => {\n const iterableColumnValues = ['', ...(getValueOptions(column) || [])];\n return iterableColumnValues.map(option => {\n const value = getOptionValue(option);\n let label = getOptionLabel(option);\n if (label === '') {\n label = ' '; // To force the height of the empty option\n }\n return /*#__PURE__*/_createElement(OptionComponent, _extends({}, baseSelectOptionProps, {\n native: isSelectNative,\n key: value,\n value: value\n }), label);\n });\n};\nfunction GridFilterInputSingleSelect(props) {\n const {\n item,\n applyValue,\n type,\n apiRef,\n focusElementRef,\n tabIndex,\n clearButton,\n headerFilterMenu,\n slotProps\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const filterValue = item.value ?? '';\n const id = useId();\n const labelId = useId();\n const rootProps = useGridRootProps();\n const isSelectNative = rootProps.slotProps?.baseSelect?.native ?? false;\n const resolvedColumn = apiRef.current.getColumn(item.field);\n const getOptionValue = resolvedColumn.getOptionValue;\n const getOptionLabel = resolvedColumn.getOptionLabel;\n const currentValueOptions = React.useMemo(() => {\n return getValueOptions(resolvedColumn);\n }, [resolvedColumn]);\n const onFilterChange = React.useCallback(event => {\n // NativeSelect casts the value to a string, convert it back to the original type.\n const value = getValueFromValueOptions(event.target.value, currentValueOptions, getOptionValue);\n applyValue(_extends({}, item, {\n value\n }));\n }, [currentValueOptions, getOptionValue, applyValue, item]);\n if (!resolvedColumn || !isSingleSelectColDef(resolvedColumn)) {\n return null;\n }\n const label = slotProps?.root.label ?? apiRef.current.getLocaleText('filterPanelInputLabel');\n return /*#__PURE__*/_jsxs(React.Fragment, {\n children: [/*#__PURE__*/_jsx(rootProps.slots.baseSelect, _extends({\n fullWidth: true,\n id: id,\n label: label,\n labelId: labelId,\n value: filterValue,\n onChange: onFilterChange,\n slotProps: {\n htmlInput: _extends({\n tabIndex,\n ref: focusElementRef,\n type: type || 'text',\n placeholder: slotProps?.root.placeholder ?? apiRef.current.getLocaleText('filterPanelInputPlaceholder')\n }, slotProps?.root.slotProps?.htmlInput)\n },\n native: isSelectNative\n }, rootProps.slotProps?.baseSelect, other, slotProps?.root, {\n children: renderSingleSelectOptions({\n column: resolvedColumn,\n OptionComponent: rootProps.slots.baseSelectOption,\n getOptionLabel,\n getOptionValue,\n isSelectNative,\n baseSelectOptionProps: rootProps.slotProps?.baseSelectOption\n })\n })), headerFilterMenu, clearButton]\n });\n}\nprocess.env.NODE_ENV !== \"production\" ? GridFilterInputSingleSelect.propTypes /* remove-proptypes */ = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the TypeScript types and run \"pnpm proptypes\" |\n // ----------------------------------------------------------------------\n apiRef: PropTypes.shape({\n current: PropTypes.object.isRequired\n }).isRequired,\n applyValue: PropTypes.func.isRequired,\n className: PropTypes.string,\n clearButton: PropTypes.node,\n disabled: PropTypes.bool,\n /**\n * If `true`, filter value changes are applied immediately without debouncing.\n * @default false\n */\n disableDebounce: PropTypes.bool,\n focusElementRef: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.func, PropTypes.object]),\n headerFilterMenu: PropTypes.node,\n inputRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({\n current: (props, propName) => {\n if (props[propName] == null) {\n return null;\n }\n if (typeof props[propName] !== 'object' || props[propName].nodeType !== 1) {\n return new Error(process.env.NODE_ENV !== \"production\" ? `Expected prop '${propName}' to be of type Element` : _formatErrorMessage(49, propName));\n }\n return null;\n }\n })]),\n /**\n * It is `true` if the filter either has a value or an operator with no value\n * required is selected (for example `isEmpty`)\n */\n isFilterActive: PropTypes.bool,\n item: PropTypes.shape({\n field: PropTypes.string.isRequired,\n id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n operator: PropTypes.string.isRequired,\n value: PropTypes.any\n }).isRequired,\n onBlur: PropTypes.func,\n onFocus: PropTypes.func,\n slotProps: PropTypes.object,\n tabIndex: PropTypes.number,\n type: PropTypes.oneOf(['singleSelect'])\n} : void 0;\nexport { GridFilterInputSingleSelect };","import _formatErrorMessage from \"@mui/x-internals/formatErrorMessage\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"item\", \"applyValue\", \"type\", \"apiRef\", \"focusElementRef\", \"slotProps\", \"disableDebounce\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport useId from '@mui/utils/useId';\nimport { useGridRootProps } from \"../../../hooks/utils/useGridRootProps.mjs\";\nimport { getValueOptions, isSingleSelectColDef } from \"./filterPanelUtils.mjs\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction GridFilterInputMultipleSingleSelect(props) {\n const {\n item,\n applyValue,\n type,\n apiRef,\n focusElementRef,\n slotProps\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const id = useId();\n const rootProps = useGridRootProps();\n const resolvedColumn = apiRef.current.getColumn(item.field);\n const getOptionValue = resolvedColumn.getOptionValue;\n const getOptionLabel = resolvedColumn.getOptionLabel;\n const isOptionEqualToValue = React.useCallback((option, value) => getOptionValue(option) === getOptionValue(value), [getOptionValue]);\n const resolvedValueOptions = React.useMemo(() => {\n return getValueOptions(resolvedColumn) || [];\n }, [resolvedColumn]);\n\n // The value is computed from the item.value and used directly\n // If it was done by a useEffect/useState, the Autocomplete could receive incoherent value and options\n const filteredValues = React.useMemo(() => {\n if (!Array.isArray(item.value)) {\n return [];\n }\n return item.value.reduce((acc, value) => {\n const resolvedValue = resolvedValueOptions.find(v => getOptionValue(v) === value);\n if (resolvedValue != null) {\n acc.push(resolvedValue);\n }\n return acc;\n }, []);\n }, [getOptionValue, item.value, resolvedValueOptions]);\n const handleChange = React.useCallback((event, value) => {\n applyValue(_extends({}, item, {\n value: value.map(getOptionValue)\n }));\n }, [applyValue, item, getOptionValue]);\n if (!resolvedColumn || !isSingleSelectColDef(resolvedColumn)) {\n return null;\n }\n const BaseAutocomplete = rootProps.slots.baseAutocomplete;\n return /*#__PURE__*/_jsx(BaseAutocomplete, _extends({\n multiple: true,\n options: resolvedValueOptions,\n isOptionEqualToValue: isOptionEqualToValue,\n id: id,\n value: filteredValues,\n onChange: handleChange,\n getOptionLabel: getOptionLabel,\n label: apiRef.current.getLocaleText('filterPanelInputLabel'),\n placeholder: apiRef.current.getLocaleText('filterPanelInputPlaceholder'),\n slotProps: {\n textField: {\n type: type || 'text',\n inputRef: focusElementRef\n }\n }\n }, other, slotProps?.root));\n}\nprocess.env.NODE_ENV !== \"production\" ? GridFilterInputMultipleSingleSelect.propTypes /* remove-proptypes */ = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the TypeScript types and run \"pnpm proptypes\" |\n // ----------------------------------------------------------------------\n apiRef: PropTypes.shape({\n current: PropTypes.object.isRequired\n }).isRequired,\n applyValue: PropTypes.func.isRequired,\n className: PropTypes.string,\n clearButton: PropTypes.node,\n disabled: PropTypes.bool,\n /**\n * If `true`, filter value changes are applied immediately without debouncing.\n * @default false\n */\n disableDebounce: PropTypes.bool,\n focusElementRef: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.func, PropTypes.object]),\n headerFilterMenu: PropTypes.node,\n inputRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({\n current: (props, propName) => {\n if (props[propName] == null) {\n return null;\n }\n if (typeof props[propName] !== 'object' || props[propName].nodeType !== 1) {\n return new Error(process.env.NODE_ENV !== \"production\" ? `Expected prop '${propName}' to be of type Element` : _formatErrorMessage(49, propName));\n }\n return null;\n }\n })]),\n /**\n * It is `true` if the filter either has a value or an operator with no value\n * required is selected (for example `isEmpty`)\n */\n isFilterActive: PropTypes.bool,\n item: PropTypes.shape({\n field: PropTypes.string.isRequired,\n id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n operator: PropTypes.string.isRequired,\n value: PropTypes.any\n }).isRequired,\n onBlur: PropTypes.func,\n onFocus: PropTypes.func,\n slotProps: PropTypes.object,\n tabIndex: PropTypes.number,\n type: PropTypes.oneOf(['singleSelect'])\n} : void 0;\nexport { GridFilterInputMultipleSingleSelect };","import { GridFilterInputSingleSelect } from \"../components/panel/filterPanel/GridFilterInputSingleSelect.mjs\";\nimport { GridFilterInputMultipleSingleSelect } from \"../components/panel/filterPanel/GridFilterInputMultipleSingleSelect.mjs\";\nimport { isObject } from \"../utils/utils.mjs\";\nconst parseObjectValue = value => {\n if (value == null || !isObject(value)) {\n return value;\n }\n return value.value;\n};\nexport const getGridSingleSelectOperators = () => [{\n value: 'is',\n getApplyFilterFn: filterItem => {\n if (filterItem.value == null || filterItem.value === '') {\n return null;\n }\n return value => parseObjectValue(value) === parseObjectValue(filterItem.value);\n },\n InputComponent: GridFilterInputSingleSelect\n}, {\n value: 'not',\n getApplyFilterFn: filterItem => {\n if (filterItem.value == null || filterItem.value === '') {\n return null;\n }\n return value => parseObjectValue(value) !== parseObjectValue(filterItem.value);\n },\n InputComponent: GridFilterInputSingleSelect\n}, {\n value: 'isAnyOf',\n getApplyFilterFn: filterItem => {\n if (!Array.isArray(filterItem.value) || filterItem.value.length === 0) {\n return null;\n }\n const filterItemValues = filterItem.value.map(parseObjectValue);\n return value => filterItemValues.includes(parseObjectValue(value));\n },\n InputComponent: GridFilterInputMultipleSingleSelect\n}];","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport { GRID_STRING_COL_DEF } from \"./gridStringColDef.mjs\";\nimport { renderEditSingleSelectCell } from \"../components/cell/GridEditSingleSelectCell.mjs\";\nimport { getGridSingleSelectOperators } from \"./gridSingleSelectOperators.mjs\";\nimport { getValueOptions, isSingleSelectColDef } from \"../components/panel/filterPanel/filterPanelUtils.mjs\";\nimport { isObject } from \"../utils/utils.mjs\";\nimport { gridRowIdSelector } from \"../hooks/core/gridPropsSelectors.mjs\";\nconst isArrayOfObjects = options => {\n return typeof options[0] === 'object';\n};\nconst defaultGetOptionValue = value => {\n return isObject(value) ? value.value : value;\n};\nconst defaultGetOptionLabel = value => {\n return isObject(value) ? value.label : String(value);\n};\nexport const GRID_SINGLE_SELECT_COL_DEF = _extends({}, GRID_STRING_COL_DEF, {\n type: 'singleSelect',\n getOptionLabel: defaultGetOptionLabel,\n getOptionValue: defaultGetOptionValue,\n valueFormatter(value, row, colDef, apiRef) {\n const rowId = gridRowIdSelector(apiRef, row);\n if (!isSingleSelectColDef(colDef)) {\n return '';\n }\n const valueOptions = getValueOptions(colDef, {\n id: rowId,\n row\n });\n if (value == null) {\n return '';\n }\n if (!valueOptions) {\n return value;\n }\n if (!isArrayOfObjects(valueOptions)) {\n return colDef.getOptionLabel(value);\n }\n const valueOption = valueOptions.find(option => colDef.getOptionValue(option) === value);\n return valueOption ? colDef.getOptionLabel(valueOption) : '';\n },\n renderEditCell: renderEditSingleSelectCell,\n filterOperators: getGridSingleSelectOperators(),\n // @ts-ignore\n pastedValueParser: (value, row, column) => {\n const colDef = column;\n const valueOptions = getValueOptions(colDef) || [];\n const getOptionValue = colDef.getOptionValue;\n const valueOption = valueOptions.find(option => {\n if (getOptionValue(option) === value) {\n return true;\n }\n return false;\n });\n if (valueOption) {\n return value;\n }\n // do not paste the value if it is not in the valueOptions\n return undefined;\n }\n});","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport composeClasses from '@mui/utils/composeClasses';\nimport { styled } from '@mui/material/styles';\nimport { getDataGridUtilityClass, gridClasses } from \"../../constants/gridClasses.mjs\";\nimport { useGridRootProps } from \"../../hooks/utils/useGridRootProps.mjs\";\nimport { useGridApiContext } from \"../../hooks/utils/useGridApiContext.mjs\";\nimport { useGridSelector } from \"../../hooks/utils/useGridSelector.mjs\";\nimport { gridRowHeightSelector } from \"../../hooks/features/dimensions/gridDimensionsSelectors.mjs\";\nimport { NotRendered } from \"../../utils/assert.mjs\";\nimport { vars } from \"../../constants/cssVariables.mjs\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n classes\n } = ownerState;\n const slots = {\n root: ['longTextCell'],\n content: ['longTextCellContent'],\n expandButton: ['longTextCellExpandButton'],\n collapseButton: ['longTextCellCollapseButton'],\n popup: ['longTextCellPopup'],\n popperContent: ['longTextCellPopperContent']\n };\n return composeClasses(slots, getDataGridUtilityClass, classes);\n};\nconst GridLongTextCellRoot = styled('div', {\n name: 'MuiDataGrid',\n slot: 'LongTextCell'\n})({\n display: 'flex',\n alignItems: 'center',\n width: '100%',\n height: '100%',\n position: 'relative'\n});\nconst GridLongTextCellContent = styled('div', {\n name: 'MuiDataGrid',\n slot: 'LongTextCellContent'\n})({\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n flex: 1\n});\nconst GridLongTextCellPopperContent = styled('div', {\n name: 'MuiDataGrid',\n slot: 'LongTextCellPopperContent'\n})(({\n theme\n}) => _extends({}, theme.typography.body2, {\n letterSpacing: 'normal',\n paddingBlock: 15.5,\n paddingInline: 9,\n maxHeight: 52 * 3,\n overflow: 'auto',\n whiteSpace: 'pre-wrap',\n wordBreak: 'break-word',\n width: 'var(--_width)',\n border: `1px solid ${(theme.vars || theme).palette.divider}`,\n boxSizing: 'border-box'\n}));\nconst GridLongTextCellCornerButton = styled('button', {\n name: 'MuiDataGrid',\n slot: 'LongTextCellCornerButton'\n})(({\n theme\n}) => ({\n lineHeight: 0,\n position: 'absolute',\n bottom: 1,\n right: 0,\n border: '1px solid',\n color: (theme.vars || theme).palette.text.secondary,\n borderColor: (theme.vars || theme).palette.divider,\n backgroundColor: (theme.vars || theme).palette.background.paper,\n borderRadius: 0,\n fontSize: '0.875rem',\n padding: 2,\n '&:focus-visible': {\n outline: 'none'\n },\n '&:hover': {\n backgroundColor: (theme.vars || theme).palette.background.paper,\n color: (theme.vars || theme).palette.text.primary\n },\n [`&.${gridClasses.longTextCellExpandButton}`]: {\n right: -9,\n opacity: 0,\n [`.${gridClasses.longTextCell}:hover &, .${gridClasses.longTextCell}.Mui-focused &`]: {\n opacity: 1\n }\n },\n [`&.${gridClasses.longTextCellCollapseButton}`]: {\n bottom: 2,\n right: 2,\n border: 'none'\n }\n}));\nconst GridLongTextCellPopper = styled(NotRendered, {\n name: 'MuiDataGrid',\n slot: 'LongTextCellPopper'\n})(({\n theme\n}) => ({\n zIndex: vars.zIndex.menu,\n background: (theme.vars || theme).palette.background.paper,\n '&[data-popper-reference-hidden]': {\n visibility: 'hidden',\n pointerEvents: 'none'\n }\n}));\nfunction GridLongTextCell(props) {\n const {\n id,\n value = '',\n colDef,\n hasFocus,\n slotProps,\n renderContent\n } = props;\n const popupId = `${id}-${colDef.field}-longtext-popup`;\n const rootProps = useGridRootProps();\n const apiRef = useGridApiContext();\n const classes = useUtilityClasses(rootProps);\n const rowHeight = useGridSelector(apiRef, gridRowHeightSelector);\n const [popupOpen, setPopupOpen] = React.useState(false);\n const cellRef = React.useRef(null);\n const cornerButtonRef = React.useRef(null);\n React.useEffect(() => {\n if (hasFocus && !popupOpen) {\n if (cornerButtonRef.current && cornerButtonRef.current !== document.activeElement) {\n cornerButtonRef.current.focus();\n }\n }\n if (!hasFocus) {\n setPopupOpen(false);\n }\n }, [hasFocus, popupOpen]);\n const handleExpandClick = event => {\n // event.detail === 0 means keyboard-triggered click (Enter keyup on focused button)\n // Ignore these to prevent popup from opening when focus moves to this cell via Enter\n if (event.detail === 0) {\n return;\n }\n event.stopPropagation();\n setPopupOpen(true);\n };\n const handleExpandKeyDown = event => {\n if (event.key === ' ' && !event.shiftKey) {\n event.preventDefault(); // Prevent native button click on keyup\n event.stopPropagation(); // Prevent grid row selection\n setPopupOpen(prev => !prev);\n }\n if (event.key === 'Escape' && popupOpen) {\n event.stopPropagation(); // Prevent grid cell navigation\n setPopupOpen(false);\n }\n };\n const handleClickAway = () => {\n setPopupOpen(false);\n };\n const handleCollapseClick = event => {\n event.stopPropagation();\n setPopupOpen(false);\n apiRef.current.getCellElement(id, colDef.field)?.focus();\n };\n return /*#__PURE__*/_jsxs(GridLongTextCellRoot, _extends({\n ref: cellRef\n }, slotProps?.root, {\n className: clsx(classes.root, slotProps?.root?.className, hasFocus && 'Mui-focused'),\n children: [/*#__PURE__*/_jsx(GridLongTextCellContent, _extends({}, slotProps?.content, {\n className: clsx(classes.content, slotProps?.content?.className),\n children: value\n })), /*#__PURE__*/_jsx(GridLongTextCellCornerButton, _extends({\n ref: cornerButtonRef,\n type: \"button\",\n \"aria-label\": `${value}, ${apiRef.current.getLocaleText('longTextCellExpandLabel')}`,\n \"aria-haspopup\": \"dialog\",\n \"aria-controls\": popupOpen ? popupId : undefined,\n \"aria-expanded\": popupOpen,\n \"aria-keyshortcuts\": \"Space\",\n tabIndex: 0\n }, slotProps?.expandButton, {\n className: clsx(classes.expandButton, slotProps?.expandButton?.className),\n onClick: handleExpandClick,\n onKeyDown: handleExpandKeyDown,\n children: /*#__PURE__*/_jsx(rootProps.slots.longTextCellExpandIcon, {\n fontSize: \"inherit\"\n })\n })), /*#__PURE__*/_jsx(GridLongTextCellPopper, _extends({\n id: popupId,\n role: \"dialog\",\n \"aria-label\": colDef.headerName || colDef.field,\n as: rootProps.slots.basePopper,\n ownerState: rootProps,\n open: popupOpen,\n target: cellRef.current,\n placement: \"bottom-start\",\n onClickAway: handleClickAway,\n clickAwayMouseEvent: \"onMouseDown\",\n flip: true,\n material: {\n container: cellRef.current?.closest('[role=\"row\"]'),\n modifiers: [{\n name: 'offset',\n options: {\n offset: [-10, -rowHeight]\n }\n }]\n }\n }, slotProps?.popper, {\n className: clsx(classes.popup, slotProps?.popper?.className),\n children: /*#__PURE__*/_jsxs(GridLongTextCellPopperContent, _extends({\n tabIndex: -1,\n onKeyDown: event => {\n if (event.key === 'Escape') {\n event.stopPropagation();\n setPopupOpen(false);\n apiRef.current.getCellElement(id, colDef.field)?.focus();\n }\n }\n }, slotProps?.popperContent, {\n className: clsx(classes.popperContent, slotProps?.popperContent?.className),\n style: _extends({\n '--_width': `${colDef.computedWidth}px`\n }, slotProps?.popperContent?.style),\n children: [renderContent ? renderContent(value) : value, /*#__PURE__*/_jsx(GridLongTextCellCornerButton, _extends({\n type: \"button\",\n \"aria-label\": apiRef.current.getLocaleText('longTextCellCollapseLabel'),\n \"aria-keyshortcuts\": \"Escape\"\n }, slotProps?.collapseButton, {\n className: clsx(classes.collapseButton, slotProps?.collapseButton?.className),\n onClick: handleCollapseClick,\n children: /*#__PURE__*/_jsx(rootProps.slots.longTextCellCollapseIcon, {\n fontSize: \"inherit\"\n })\n }))]\n }))\n }))]\n }));\n}\nprocess.env.NODE_ENV !== \"production\" ? GridLongTextCell.propTypes /* remove-proptypes */ = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the TypeScript types and run \"pnpm proptypes\" |\n // ----------------------------------------------------------------------\n /**\n * GridApi that let you manipulate the grid.\n */\n api: PropTypes.object.isRequired,\n /**\n * The mode of the cell.\n */\n cellMode: PropTypes.oneOf(['edit', 'view']).isRequired,\n /**\n * The column of the row that the current cell belongs to.\n */\n colDef: PropTypes.object.isRequired,\n /**\n * The column field of the cell that triggered the event.\n */\n field: PropTypes.string.isRequired,\n /**\n * The cell value formatted with the column valueFormatter.\n */\n formattedValue: PropTypes.string,\n /**\n * If true, the cell is the active element.\n */\n hasFocus: PropTypes.bool.isRequired,\n /**\n * The grid row id.\n */\n id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,\n /**\n * If true, the cell is editable.\n */\n isEditable: PropTypes.bool,\n /**\n * A function to customize the content rendered in the popup.\n * @param {string | null} value The cell value.\n * @returns {React.ReactNode} The content to render in the popup.\n */\n renderContent: PropTypes.func,\n /**\n * The row model of the row that the current cell belongs to.\n */\n row: PropTypes.any.isRequired,\n /**\n * The node of the row that the current cell belongs to.\n */\n rowNode: PropTypes.object.isRequired,\n /**\n * Props passed to internal components.\n */\n slotProps: PropTypes.object,\n /**\n * the tabIndex value.\n */\n tabIndex: PropTypes.oneOf([-1, 0]).isRequired,\n /**\n * The cell value.\n * If the column has `valueGetter`, use `params.row` to directly access the fields.\n */\n value: PropTypes.string\n} : void 0;\nexport { GridLongTextCell };\nexport const renderLongTextCell = params => /*#__PURE__*/_jsx(GridLongTextCell, _extends({}, params));\nif (process.env.NODE_ENV !== \"production\") renderLongTextCell.displayName = \"renderLongTextCell\";","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport composeClasses from '@mui/utils/composeClasses';\nimport useEnhancedEffect from '@mui/utils/useEnhancedEffect';\nimport { styled } from '@mui/material/styles';\nimport { getDataGridUtilityClass } from \"../../constants/gridClasses.mjs\";\nimport { useGridRootProps } from \"../../hooks/utils/useGridRootProps.mjs\";\nimport { useGridApiContext } from \"../../hooks/utils/useGridApiContext.mjs\";\nimport { useGridSelector } from \"../../hooks/utils/useGridSelector.mjs\";\nimport { gridRowHeightSelector } from \"../../hooks/features/dimensions/gridDimensionsSelectors.mjs\";\nimport { NotRendered } from \"../../utils/assert.mjs\";\nimport { vars } from \"../../constants/cssVariables.mjs\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n classes\n } = ownerState;\n const slots = {\n root: ['editLongTextCell'],\n value: ['editLongTextCellValue'],\n popup: ['editLongTextCellPopup'],\n popperContent: ['editLongTextCellPopperContent'],\n textarea: ['editLongTextCellTextarea']\n };\n return composeClasses(slots, getDataGridUtilityClass, classes);\n};\nconst GridEditLongTextCellTextarea = styled(NotRendered, {\n name: 'MuiDataGrid',\n slot: 'EditLongTextCellTextarea'\n})(({\n theme\n}) => _extends({\n width: '100%',\n padding: 0\n}, theme.typography.body2, {\n letterSpacing: 'normal',\n outline: 'none',\n background: 'transparent',\n border: 'none',\n resize: 'vertical'\n}));\nconst GridEditLongTextCellRoot = styled('div', {\n name: 'MuiDataGrid',\n slot: 'EditLongTextCell'\n})({\n display: 'flex',\n alignItems: 'center',\n width: '100%',\n height: '100%',\n position: 'relative'\n});\nconst GridEditLongTextCellValue = styled('div', {\n name: 'MuiDataGrid',\n slot: 'EditLongTextCellValue'\n})({\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n width: '100%',\n paddingInline: 10\n});\nconst GridEditLongTextCellPopper = styled(NotRendered, {\n name: 'MuiDataGrid',\n slot: 'EditLongTextCellPopper'\n})(({\n theme\n}) => ({\n zIndex: vars.zIndex.menu,\n background: (theme.vars || theme).palette.background.paper,\n '&[data-popper-reference-hidden]': {\n opacity: 0 // use opacity to preserve focus.\n }\n}));\nconst GridEditLongTextCellPopperContent = styled('div', {\n name: 'MuiDataGrid',\n slot: 'EditLongTextCellPopperContent'\n})(({\n theme\n}) => _extends({}, theme.typography.body2, {\n letterSpacing: 'normal',\n paddingBlock: 15.5,\n paddingInline: 9,\n height: 'max-content',\n overflow: 'auto',\n whiteSpace: 'pre-wrap',\n wordBreak: 'break-word',\n width: 'var(--_width)',\n border: `1px solid ${(theme.vars || theme).palette.divider}`,\n boxShadow: (theme.vars || theme).shadows[4],\n boxSizing: 'border-box'\n}));\nfunction GridEditLongTextCell(props) {\n const {\n id,\n value,\n field,\n colDef,\n hasFocus,\n cellMode,\n slotProps\n } = props;\n const rootProps = useGridRootProps();\n const apiRef = useGridApiContext();\n const classes = useUtilityClasses(rootProps);\n const rowHeight = useGridSelector(apiRef, gridRowHeightSelector);\n const [valueState, setValueState] = React.useState(value);\n const [anchorEl, setAnchorEl] = React.useState(null);\n const meta = apiRef.current.unstable_getEditCellMeta(id, field);\n const popupId = `${id}-${field}-longtext-edit-popup`;\n\n // Only show popup when this cell has focus\n // This fixes editMode=\"row\" where all cells enter edit mode simultaneously\n const showPopup = hasFocus && Boolean(anchorEl);\n React.useEffect(() => {\n if (meta?.changeReason !== 'debouncedSetEditCellValue') {\n setValueState(value);\n }\n }, [meta, value]);\n return /*#__PURE__*/_jsxs(GridEditLongTextCellRoot, _extends({\n tabIndex: cellMode === 'edit' && rootProps.editMode === 'row' ? 0 : undefined,\n ref: setAnchorEl,\n \"aria-controls\": showPopup ? popupId : undefined,\n \"aria-expanded\": showPopup\n }, slotProps?.root, {\n className: clsx(classes.root, slotProps?.root?.className),\n children: [/*#__PURE__*/_jsx(GridEditLongTextCellValue, _extends({}, slotProps?.value, {\n className: clsx(classes.value, slotProps?.value?.className),\n children: valueState\n })), /*#__PURE__*/_jsx(GridEditLongTextCellPopper, _extends({\n as: rootProps.slots.basePopper,\n ownerState: rootProps,\n id: popupId,\n role: \"dialog\",\n \"aria-label\": colDef.headerName || field,\n open: showPopup,\n target: anchorEl,\n placement: \"bottom-start\",\n flip: true,\n material: {\n container: anchorEl?.closest('[role=\"row\"]'),\n modifiers: [{\n name: 'offset',\n options: {\n offset: [-1, -rowHeight]\n }\n }]\n }\n }, slotProps?.popper, {\n className: clsx(classes.popup, slotProps?.popper?.className),\n children: /*#__PURE__*/_jsx(GridEditLongTextCellPopperContent, _extends({}, slotProps?.popperContent, {\n className: clsx(classes.popperContent, slotProps?.popperContent?.className),\n style: {\n '--_width': `${colDef.computedWidth}px`\n },\n children: /*#__PURE__*/_jsx(GridEditLongTextarea, _extends({}, props, {\n valueState: valueState,\n setValueState: setValueState\n }))\n }))\n }))]\n }));\n}\nprocess.env.NODE_ENV !== \"production\" ? GridEditLongTextCell.propTypes /* remove-proptypes */ = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the TypeScript types and run \"pnpm proptypes\" |\n // ----------------------------------------------------------------------\n /**\n * GridApi that let you manipulate the grid.\n */\n api: PropTypes.object.isRequired,\n /**\n * The mode of the cell.\n */\n cellMode: PropTypes.oneOf(['edit', 'view']).isRequired,\n changeReason: PropTypes.oneOf(['debouncedSetEditCellValue', 'setEditCellValue']),\n /**\n * The column of the row that the current cell belongs to.\n */\n colDef: PropTypes.object.isRequired,\n debounceMs: PropTypes.number,\n /**\n * The column field of the cell that triggered the event.\n */\n field: PropTypes.string.isRequired,\n /**\n * The cell value formatted with the column valueFormatter.\n */\n formattedValue: PropTypes.string,\n /**\n * If true, the cell is the active element.\n */\n hasFocus: PropTypes.bool.isRequired,\n /**\n * The grid row id.\n */\n id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,\n /**\n * If true, the cell is editable.\n */\n isEditable: PropTypes.bool,\n isProcessingProps: PropTypes.bool,\n isValidating: PropTypes.bool,\n /**\n * Callback called when the value is changed by the user.\n * @param {React.ChangeEvent} event The event source of the callback.\n * @param {string} newValue The value that is going to be passed to `apiRef.current.setEditCellValue`.\n * @returns {Promise | void} A promise to be awaited before calling `apiRef.current.setEditCellValue`\n */\n onValueChange: PropTypes.func,\n /**\n * The row model of the row that the current cell belongs to.\n */\n row: PropTypes.any.isRequired,\n /**\n * The node of the row that the current cell belongs to.\n */\n rowNode: PropTypes.object.isRequired,\n /**\n * Props passed to internal components.\n */\n slotProps: PropTypes.object,\n /**\n * the tabIndex value.\n */\n tabIndex: PropTypes.oneOf([-1, 0]).isRequired,\n /**\n * The cell value.\n * If the column has `valueGetter`, use `params.row` to directly access the fields.\n */\n value: PropTypes.string\n} : void 0;\nfunction GridEditLongTextarea(props) {\n const {\n id,\n field,\n colDef,\n debounceMs = 200,\n onValueChange,\n valueState,\n setValueState,\n hasFocus,\n slotProps\n } = props;\n const textareaRef = React.useRef(null);\n const apiRef = useGridApiContext();\n const rootProps = useGridRootProps();\n const classes = useUtilityClasses(rootProps);\n useEnhancedEffect(() => {\n if (hasFocus && textareaRef.current) {\n // preventScroll: the popper is portaled into the GridRow, so focusing\n // without it triggers the browser to scroll the grid container which is undesirable.\n textareaRef.current.focus({\n preventScroll: true\n });\n // Move cursor to end of text\n const length = textareaRef.current.value.length;\n textareaRef.current.setSelectionRange(length, length);\n }\n }, [hasFocus]);\n const handleChange = React.useCallback(async event => {\n const newValue = event.target.value;\n const column = apiRef.current.getColumn(field);\n let parsedValue = newValue;\n if (column?.valueParser) {\n parsedValue = column.valueParser(newValue, apiRef.current.getRow(id), column, apiRef);\n }\n setValueState(parsedValue);\n apiRef.current.setEditCellValue({\n id,\n field,\n value: parsedValue,\n debounceMs,\n unstable_skipValueParser: true\n }, event);\n if (onValueChange) {\n await onValueChange(event, newValue);\n }\n }, [apiRef, debounceMs, field, id, onValueChange, setValueState]);\n const handleKeyDown = React.useCallback(event => {\n if (event.key === 'Enter' && event.shiftKey) {\n // Shift+Enter: let textarea handle newline, stop propagation to prevent grid from exiting edit\n event.stopPropagation();\n }\n if (rootProps.editMode === 'cell' && event.key === 'Escape') {\n apiRef.current.stopCellEditMode({\n id,\n field,\n ignoreModifications: true\n });\n }\n }, [apiRef, field, id, rootProps.editMode]);\n return /*#__PURE__*/_jsx(GridEditLongTextCellTextarea, _extends({\n ref: textareaRef,\n as: rootProps.slots.baseTextarea,\n ownerState: rootProps,\n \"aria-label\": colDef.headerName || field,\n value: valueState ?? '',\n onChange: handleChange,\n onKeyDown: handleKeyDown\n }, slotProps?.textarea, {\n className: clsx(classes.textarea, slotProps?.textarea?.className)\n }));\n}\nprocess.env.NODE_ENV !== \"production\" ? GridEditLongTextarea.propTypes /* remove-proptypes */ = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the TypeScript types and run \"pnpm proptypes\" |\n // ----------------------------------------------------------------------\n /**\n * GridApi that let you manipulate the grid.\n */\n api: PropTypes.object.isRequired,\n /**\n * The mode of the cell.\n */\n cellMode: PropTypes.oneOf(['edit', 'view']).isRequired,\n changeReason: PropTypes.oneOf(['debouncedSetEditCellValue', 'setEditCellValue']),\n /**\n * The column of the row that the current cell belongs to.\n */\n colDef: PropTypes.object.isRequired,\n debounceMs: PropTypes.number,\n /**\n * The column field of the cell that triggered the event.\n */\n field: PropTypes.string.isRequired,\n /**\n * The cell value formatted with the column valueFormatter.\n */\n formattedValue: PropTypes.string,\n /**\n * If true, the cell is the active element.\n */\n hasFocus: PropTypes.bool.isRequired,\n /**\n * The grid row id.\n */\n id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,\n /**\n * If true, the cell is editable.\n */\n isEditable: PropTypes.bool,\n isProcessingProps: PropTypes.bool,\n isValidating: PropTypes.bool,\n /**\n * Callback called when the value is changed by the user.\n * @param {React.ChangeEvent} event The event source of the callback.\n * @param {string} newValue The value that is going to be passed to `apiRef.current.setEditCellValue`.\n * @returns {Promise | void} A promise to be awaited before calling `apiRef.current.setEditCellValue`\n */\n onValueChange: PropTypes.func,\n /**\n * The row model of the row that the current cell belongs to.\n */\n row: PropTypes.any.isRequired,\n /**\n * The node of the row that the current cell belongs to.\n */\n rowNode: PropTypes.object.isRequired,\n /**\n * Props passed to internal components.\n */\n slotProps: PropTypes.object,\n /**\n * the tabIndex value.\n */\n tabIndex: PropTypes.oneOf([-1, 0]).isRequired,\n /**\n * The cell value.\n * If the column has `valueGetter`, use `params.row` to directly access the fields.\n */\n value: PropTypes.string\n} : void 0;\nexport { GridEditLongTextCell };\nexport const renderEditLongTextCell = params => /*#__PURE__*/_jsx(GridEditLongTextCell, _extends({}, params));\nif (process.env.NODE_ENV !== \"production\") renderEditLongTextCell.displayName = \"renderEditLongTextCell\";","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport { GRID_STRING_COL_DEF } from \"./gridStringColDef.mjs\";\nimport { renderLongTextCell } from \"../components/cell/GridLongTextCell.mjs\";\nimport { renderEditLongTextCell } from \"../components/cell/GridEditLongTextCell.mjs\";\nexport const GRID_LONG_TEXT_COL_DEF = _extends({}, GRID_STRING_COL_DEF, {\n type: 'longText',\n display: 'flex',\n renderCell: renderLongTextCell,\n renderEditCell: renderEditLongTextCell\n});","import { GRID_STRING_COL_DEF } from \"./gridStringColDef.mjs\";\nimport { GRID_NUMERIC_COL_DEF } from \"./gridNumericColDef.mjs\";\nimport { GRID_DATE_COL_DEF, GRID_DATETIME_COL_DEF } from \"./gridDateColDef.mjs\";\nimport { GRID_BOOLEAN_COL_DEF } from \"./gridBooleanColDef.mjs\";\nimport { GRID_SINGLE_SELECT_COL_DEF } from \"./gridSingleSelectColDef.mjs\";\nimport { GRID_ACTIONS_COL_DEF, GRID_ACTIONS_COLUMN_TYPE } from \"./gridActionsColDef.mjs\";\nimport { GRID_LONG_TEXT_COL_DEF } from \"./gridLongTextColDef.mjs\";\nexport const DEFAULT_GRID_COL_TYPE_KEY = 'string';\n\n// Mutable registry seeded with the community column types. Pro/Premium packages append\n// their own types at module load via `registerGridColumnTypes`, so a community-only bundle\n// never references them at runtime.\nconst columnTypesRegistry = {\n string: GRID_STRING_COL_DEF,\n number: GRID_NUMERIC_COL_DEF,\n date: GRID_DATE_COL_DEF,\n dateTime: GRID_DATETIME_COL_DEF,\n boolean: GRID_BOOLEAN_COL_DEF,\n singleSelect: GRID_SINGLE_SELECT_COL_DEF,\n [GRID_ACTIONS_COLUMN_TYPE]: GRID_ACTIONS_COL_DEF,\n custom: GRID_STRING_COL_DEF,\n longText: GRID_LONG_TEXT_COL_DEF\n};\n\n// Captured before any `registerGridColumnTypes` call, so it reflects the community-native types\n// only. Used to keep Pro/Premium-registered types (e.g. `multiSelect`) from resolving in a\n// community `DataGrid` even when a Pro grid registered them globally in the same bundle.\nconst COMMUNITY_COLUMN_TYPE_KEYS = new Set(Object.keys(columnTypesRegistry));\nexport const isCommunityColumnType = type => type == null || COMMUNITY_COLUMN_TYPE_KEYS.has(type);\nexport const registerGridColumnTypes = columnTypes => {\n Object.assign(columnTypesRegistry, columnTypes);\n};\nexport const getGridColumnTypesRegistry = () => columnTypesRegistry;\nexport const getRegisteredColumnTypeDef = type => (type ? columnTypesRegistry[type] : undefined) ?? columnTypesRegistry[DEFAULT_GRID_COL_TYPE_KEY];","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport { getGridColumnTypesRegistry } from \"./gridColumnTypesRegistry.mjs\";\nexport { DEFAULT_GRID_COL_TYPE_KEY } from \"./gridColumnTypesRegistry.mjs\";\nexport const getGridDefaultColumnTypes = () => _extends({}, getGridColumnTypesRegistry());","import { createSelector, createRootSelector } from \"../../../utils/createSelector.mjs\";\nexport const gridHeaderFilteringStateSelector = createRootSelector(state => state.headerFiltering);\nexport const gridHeaderFilteringEnabledSelector = createSelector(gridHeaderFilteringStateSelector,\n// No initialization in MIT, so we need to default to false to be used by `getTotalHeaderHeight`\nheaderFilteringState => headerFilteringState?.enabled ?? false);\nexport const gridHeaderFilteringEditFieldSelector = createSelector(gridHeaderFilteringStateSelector, headerFilteringState => headerFilteringState.editing);\nexport const gridHeaderFilteringMenuSelector = createSelector(gridHeaderFilteringStateSelector, headerFilteringState => headerFilteringState.menuOpen);","import { createSelector, createRootSelector, createSelectorMemoized } from \"../../../utils/createSelector.mjs\";\n/**\n * @category ColumnGrouping\n * @ignore - do not document.\n */\nexport const gridColumnGroupingSelector = createRootSelector(state => state.columnGrouping);\nexport const gridColumnGroupsUnwrappedModelSelector = createSelectorMemoized(gridColumnGroupingSelector, columnGrouping => columnGrouping?.unwrappedGroupingModel ?? {});\nexport const gridColumnGroupsLookupSelector = createSelectorMemoized(gridColumnGroupingSelector, columnGrouping => columnGrouping?.lookup ?? {});\nexport const gridColumnGroupsHeaderStructureSelector = createSelectorMemoized(gridColumnGroupingSelector, columnGrouping => columnGrouping?.headerStructure ?? []);\nexport const gridColumnGroupsHeaderMaxDepthSelector = createSelector(gridColumnGroupingSelector, columnGrouping => columnGrouping?.maxDepth ?? 0);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport resolveProps from '@mui/utils/resolveProps';\nimport { GRID_STRING_COL_DEF } from \"../../../colDef/index.mjs\";\nimport { getRegisteredColumnTypeDef, isCommunityColumnType } from \"../../../colDef/gridColumnTypesRegistry.mjs\";\nimport { GridSignature } from \"../../../constants/signature.mjs\";\nimport { gridColumnsStateSelector, gridColumnVisibilityModelSelector } from \"./gridColumnsSelector.mjs\";\nimport { clamp } from \"../../../utils/utils.mjs\";\nimport { gridDensityFactorSelector } from \"../density/densitySelector.mjs\";\nimport { gridHeaderFilteringEnabledSelector } from \"../headerFiltering/gridHeaderFilteringSelectors.mjs\";\nimport { gridColumnGroupsHeaderMaxDepthSelector } from \"../columnGrouping/gridColumnGroupsSelector.mjs\";\nexport const COLUMNS_DIMENSION_PROPERTIES = ['maxWidth', 'minWidth', 'width', 'flex'];\n/**\n * Computes width for flex columns.\n * Based on CSS Flexbox specification:\n * https://drafts.csswg.org/css-flexbox-1/#resolve-flexible-lengths\n */\nexport function computeFlexColumnsWidth({\n initialFreeSpace,\n totalFlexUnits,\n flexColumns\n}) {\n const uniqueFlexColumns = new Set(flexColumns.map(col => col.field));\n const flexColumnsLookup = {\n all: {},\n frozenFields: [],\n freeze: field => {\n const value = flexColumnsLookup.all[field];\n if (value && value.frozen !== true) {\n flexColumnsLookup.all[field].frozen = true;\n flexColumnsLookup.frozenFields.push(field);\n }\n }\n };\n\n // Step 5 of https://drafts.csswg.org/css-flexbox-1/#resolve-flexible-lengths\n function loopOverFlexItems() {\n // 5a: If all the flex items on the line are frozen, free space has been distributed.\n if (flexColumnsLookup.frozenFields.length === uniqueFlexColumns.size) {\n return;\n }\n const violationsLookup = {\n min: {},\n max: {}\n };\n let remainingFreeSpace = initialFreeSpace;\n let flexUnits = totalFlexUnits;\n let totalViolation = 0;\n\n // 5b: Calculate the remaining free space\n flexColumnsLookup.frozenFields.forEach(field => {\n remainingFreeSpace -= flexColumnsLookup.all[field].computedWidth;\n flexUnits -= flexColumnsLookup.all[field].flex;\n });\n for (let i = 0; i < flexColumns.length; i += 1) {\n const column = flexColumns[i];\n if (flexColumnsLookup.all[column.field] && flexColumnsLookup.all[column.field].frozen === true) {\n continue;\n }\n\n // 5c: Distribute remaining free space proportional to the flex factors\n const widthPerFlexUnit = remainingFreeSpace / flexUnits;\n let computedWidth = widthPerFlexUnit * column.flex;\n\n // 5d: Fix min/max violations\n if (computedWidth < column.minWidth) {\n totalViolation += column.minWidth - computedWidth;\n computedWidth = column.minWidth;\n violationsLookup.min[column.field] = true;\n } else if (computedWidth > column.maxWidth) {\n totalViolation += column.maxWidth - computedWidth;\n computedWidth = column.maxWidth;\n violationsLookup.max[column.field] = true;\n }\n flexColumnsLookup.all[column.field] = {\n frozen: false,\n computedWidth,\n flex: column.flex\n };\n }\n\n // 5e: Freeze over-flexed items\n if (totalViolation < 0) {\n // Freeze all the items with max violations\n Object.keys(violationsLookup.max).forEach(field => {\n flexColumnsLookup.freeze(field);\n });\n } else if (totalViolation > 0) {\n // Freeze all the items with min violations\n Object.keys(violationsLookup.min).forEach(field => {\n flexColumnsLookup.freeze(field);\n });\n } else {\n // Freeze all items\n flexColumns.forEach(({\n field\n }) => {\n flexColumnsLookup.freeze(field);\n });\n }\n\n // 5f: Return to the start of this loop\n loopOverFlexItems();\n }\n loopOverFlexItems();\n return flexColumnsLookup.all;\n}\n\n/**\n * Compute the `computedWidth` (ie: the width the column should have during rendering) based on the `width` / `flex` / `minWidth` / `maxWidth` properties of `GridColDef`.\n * The columns already have been merged with there `type` default values for `minWidth`, `maxWidth` and `width`, thus the `!` for those properties below.\n * TODO: Unit test this function in depth and only keep basic cases for the whole grid testing.\n * TODO: Improve the `GridColDef` typing to reflect the fact that `minWidth` / `maxWidth` and `width` can't be null after the merge with the `type` default values.\n */\nexport const hydrateColumnsWidth = (rawState, dimensions) => {\n const columnsLookup = {};\n let totalFlexUnits = 0;\n let widthAllocatedBeforeFlex = 0;\n const flexColumns = [];\n\n // For the non-flex columns, compute their width\n // For the flex columns, compute their minimum width and how much width must be allocated during the flex allocation\n rawState.orderedFields.forEach(columnField => {\n let column = rawState.lookup[columnField];\n let computedWidth = 0;\n let isFlex = false;\n if (rawState.columnVisibilityModel[columnField] !== false) {\n if (column.flex && column.flex > 0) {\n totalFlexUnits += column.flex;\n isFlex = true;\n } else {\n computedWidth = clamp(column.width || GRID_STRING_COL_DEF.width, column.minWidth || GRID_STRING_COL_DEF.minWidth, column.maxWidth || GRID_STRING_COL_DEF.maxWidth);\n }\n widthAllocatedBeforeFlex += computedWidth;\n }\n if (column.computedWidth !== computedWidth) {\n column = _extends({}, column, {\n computedWidth\n });\n }\n if (isFlex) {\n flexColumns.push(column);\n }\n columnsLookup[columnField] = column;\n });\n const availableWidth = dimensions === undefined ? 0 : dimensions.viewportOuterSize.width - (dimensions.hasScrollY ? dimensions.scrollbarSize : 0);\n const initialFreeSpace = Math.max(availableWidth - widthAllocatedBeforeFlex, 0);\n\n // Allocate the remaining space to the flex columns\n if (totalFlexUnits > 0 && availableWidth > 0) {\n const computedColumnWidths = computeFlexColumnsWidth({\n initialFreeSpace,\n totalFlexUnits,\n flexColumns\n });\n Object.keys(computedColumnWidths).forEach(field => {\n columnsLookup[field] = _extends({}, columnsLookup[field], {\n computedWidth: computedColumnWidths[field].computedWidth\n });\n });\n }\n return _extends({}, rawState, {\n lookup: columnsLookup\n });\n};\n\n/**\n * Apply the order and the dimensions of the initial state.\n * The columns not registered in `orderedFields` will be placed after the imported columns.\n */\nconst applyInitialState = (columnsState, initialState) => {\n if (!initialState) {\n return columnsState;\n }\n const {\n orderedFields = [],\n dimensions = {}\n } = initialState;\n const columnsWithUpdatedDimensions = Object.keys(dimensions);\n if (columnsWithUpdatedDimensions.length === 0 && orderedFields.length === 0) {\n return columnsState;\n }\n const orderedFieldsLookup = {};\n const cleanOrderedFields = [];\n for (let i = 0; i < orderedFields.length; i += 1) {\n const field = orderedFields[i];\n\n // Ignores the fields in the initialState that matches no field on the current column state\n if (columnsState.lookup[field]) {\n orderedFieldsLookup[field] = true;\n cleanOrderedFields.push(field);\n }\n }\n const newOrderedFields = cleanOrderedFields.length === 0 ? columnsState.orderedFields : [...cleanOrderedFields, ...columnsState.orderedFields.filter(field => !orderedFieldsLookup[field])];\n const newColumnLookup = _extends({}, columnsState.lookup);\n for (let i = 0; i < columnsWithUpdatedDimensions.length; i += 1) {\n const field = columnsWithUpdatedDimensions[i];\n const newColDef = _extends({}, newColumnLookup[field], {\n hasBeenResized: true\n });\n Object.entries(dimensions[field]).forEach(([key, value]) => {\n newColDef[key] = value === -1 ? Infinity : value;\n });\n newColumnLookup[field] = newColDef;\n }\n const newColumnsState = _extends({}, columnsState, {\n orderedFields: newOrderedFields,\n lookup: newColumnLookup\n });\n return newColumnsState;\n};\nexport function getDefaultColTypeDef(type) {\n return getRegisteredColumnTypeDef(type);\n}\nexport const createColumnsState = ({\n apiRef,\n columnsToUpsert,\n initialState,\n columnVisibilityModel = gridColumnVisibilityModelSelector(apiRef),\n keepOnlyColumnsToUpsert = false,\n updateInitialVisibilityModel = false\n}) => {\n const isInsideStateInitializer = !apiRef.current.state.columns;\n\n // A community `DataGrid` must not resolve a Pro/Premium-only column type even if a Pro grid\n // registered it globally in the same bundle (shared module registry). Fall back to the default\n // type def in that case, so the column behaves like a plain column.\n // NOTE: this is a community-vs-paid gate only — it does not distinguish Pro from Premium. It is\n // enough today because the only registered type (`multiSelect`) is available in both Pro and\n // Premium. If a Pro-only or Premium-only column type is added later, make this plan-aware:\n // track each type's minimum plan in the registry and compare it against the grid signature\n // (DataGrid < DataGridPro < DataGridPremium), so e.g. a Premium-only type also falls back in\n // `DataGridPro`.\n const isCommunity = apiRef.current.state.props?.signature === GridSignature.DataGrid;\n const getColTypeDef = type => isCommunity && !isCommunityColumnType(type) ? getDefaultColTypeDef(undefined) : getDefaultColTypeDef(type);\n let columnsState;\n if (isInsideStateInitializer) {\n columnsState = {\n orderedFields: [],\n lookup: {},\n columnVisibilityModel,\n initialColumnVisibilityModel: columnVisibilityModel\n };\n } else {\n const currentState = gridColumnsStateSelector(apiRef);\n columnsState = {\n orderedFields: keepOnlyColumnsToUpsert ? [] : [...currentState.orderedFields],\n lookup: keepOnlyColumnsToUpsert ? {} : _extends({}, currentState.lookup),\n columnVisibilityModel,\n initialColumnVisibilityModel: updateInitialVisibilityModel ? columnVisibilityModel : currentState.initialColumnVisibilityModel\n };\n }\n const columnsToKeep = {};\n if (keepOnlyColumnsToUpsert && !isInsideStateInitializer) {\n for (const key in columnsState.lookup) {\n if (Object.prototype.hasOwnProperty.call(columnsState.lookup, key)) {\n columnsToKeep[key] = false;\n }\n }\n }\n columnsToUpsert.forEach(newColumn => {\n const {\n field\n } = newColumn;\n columnsToKeep[field] = true;\n let existingState = columnsState.lookup[field];\n if (existingState == null) {\n existingState = _extends({}, getColTypeDef(newColumn.type), {\n field,\n hasBeenResized: false\n });\n columnsState.orderedFields.push(field);\n } else if (keepOnlyColumnsToUpsert) {\n columnsState.orderedFields.push(field);\n }\n\n // If the column type has changed - merge the existing state with the default column type definition\n if (existingState && existingState.type !== newColumn.type) {\n existingState = _extends({}, getColTypeDef(newColumn.type), {\n field\n });\n }\n let hasBeenResized = existingState.hasBeenResized;\n COLUMNS_DIMENSION_PROPERTIES.forEach(key => {\n if (newColumn[key] !== undefined) {\n hasBeenResized = true;\n if (newColumn[key] === -1) {\n newColumn[key] = Infinity;\n }\n }\n });\n const mergedProps = _extends({}, getColTypeDef(newColumn.type), {\n hasBeenResized,\n field\n });\n let key;\n for (key in newColumn) {\n if (newColumn[key] !== undefined && key !== 'field') {\n mergedProps[key] = newColumn[key];\n }\n }\n columnsState.lookup[field] = resolveProps(existingState, mergedProps);\n });\n if (keepOnlyColumnsToUpsert && !isInsideStateInitializer) {\n Object.keys(columnsState.lookup).forEach(field => {\n if (!columnsToKeep[field]) {\n delete columnsState.lookup[field];\n }\n });\n }\n const columnsStateWithPreProcessing = apiRef.current.unstable_applyPipeProcessors('hydrateColumns', columnsState);\n const columnsStateWithPortableColumns = applyInitialState(columnsStateWithPreProcessing, initialState);\n return hydrateColumnsWidth(columnsStateWithPortableColumns, apiRef.current.getRootDimensions?.() ?? undefined);\n};\nexport function getFirstNonSpannedColumnToRender({\n firstColumnToRender,\n apiRef,\n firstRowToRender,\n lastRowToRender,\n visibleRows\n}) {\n let firstNonSpannedColumnToRender = firstColumnToRender;\n let foundStableColumn = false;\n\n // Keep checking columns until we find one that's not spanned in any visible row\n while (!foundStableColumn && firstNonSpannedColumnToRender >= 0) {\n foundStableColumn = true;\n for (let i = firstRowToRender; i < lastRowToRender; i += 1) {\n const row = visibleRows[i];\n if (row) {\n const rowId = visibleRows[i].id;\n const cellColSpanInfo = apiRef.current.unstable_getCellColSpanInfo(rowId, firstNonSpannedColumnToRender);\n if (cellColSpanInfo && cellColSpanInfo.spannedByColSpan && cellColSpanInfo.leftVisibleCellIndex < firstNonSpannedColumnToRender) {\n firstNonSpannedColumnToRender = cellColSpanInfo.leftVisibleCellIndex;\n foundStableColumn = false;\n break; // Check the new column index against the visible rows, because it might be spanned\n }\n }\n }\n }\n return firstNonSpannedColumnToRender;\n}\nexport function getTotalHeaderHeight(apiRef, props) {\n if (props.listView) {\n return 0;\n }\n const densityFactor = gridDensityFactorSelector(apiRef);\n const maxDepth = gridColumnGroupsHeaderMaxDepthSelector(apiRef);\n const isHeaderFilteringEnabled = gridHeaderFilteringEnabledSelector(apiRef);\n const columnHeadersHeight = Math.floor(props.columnHeaderHeight * densityFactor);\n const columnGroupHeadersHeight = Math.floor((props.columnGroupHeaderHeight ?? props.columnHeaderHeight) * densityFactor);\n const filterHeadersHeight = isHeaderFilteringEnabled ? Math.floor((props.headerFilterHeight ?? props.columnHeaderHeight) * densityFactor) : 0;\n return columnHeadersHeight + columnGroupHeadersHeight * maxDepth + filterHeadersHeight;\n}","'use client';\n\n/* eslint-disable @typescript-eslint/no-use-before-define */\nimport _formatErrorMessage from \"@mui/x-internals/formatErrorMessage\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport useEventCallback from '@mui/utils/useEventCallback';\nimport composeClasses from '@mui/utils/composeClasses';\nimport { styled } from '@mui/material/styles';\nimport { fastMemo } from '@mui/x-internals/fastMemo';\nimport { forwardRef } from '@mui/x-internals/forwardRef';\nimport { useGridRootProps } from \"../hooks/utils/useGridRootProps.mjs\";\nimport { getDataGridUtilityClass, gridClasses } from \"../constants/index.mjs\";\nimport { useGridApiContext } from \"../hooks/utils/useGridApiContext.mjs\";\nimport { useGridEvent } from \"../hooks/utils/useGridEvent.mjs\";\nimport { useGridSelector } from \"../hooks/utils/useGridSelector.mjs\";\nimport { gridDimensionsSelector, gridColumnsTotalWidthSelector } from \"../hooks/features/dimensions/gridDimensionsSelectors.mjs\";\nimport { gridDensityFactorSelector } from \"../hooks/features/density/densitySelector.mjs\";\nimport { useTimeout } from \"../hooks/utils/useTimeout.mjs\";\nimport { getTotalHeaderHeight } from \"../hooks/features/columns/gridColumnsUtils.mjs\";\nimport { createSelector } from \"../utils/createSelector.mjs\";\nimport { gridRowsMetaSelector } from \"../hooks/features/rows/gridRowsMetaSelector.mjs\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst CLIFF = 1;\nconst SLOP = 1.5;\nconst useUtilityClasses = ownerState => {\n const {\n scrollDirection,\n classes\n } = ownerState;\n const slots = {\n root: ['scrollArea', `scrollArea--${scrollDirection}`]\n };\n return composeClasses(slots, getDataGridUtilityClass, classes);\n};\nconst GridScrollAreaRawRoot = styled('div', {\n name: 'MuiDataGrid',\n slot: 'ScrollArea',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.scrollArea, styles[`scrollArea--${ownerState.scrollDirection}`]];\n }\n})(() => ({\n position: 'absolute',\n zIndex: 101,\n // Horizontal scroll areas\n [`&.${gridClasses['scrollArea--left']}`]: {\n top: 0,\n left: 0,\n width: 20,\n bottom: 0\n },\n [`&.${gridClasses['scrollArea--right']}`]: {\n top: 0,\n right: 0,\n width: 20,\n bottom: 0\n },\n // Vertical scroll areas\n [`&.${gridClasses['scrollArea--up']}`]: {\n top: 0,\n left: 0,\n right: 0,\n height: 20\n },\n [`&.${gridClasses['scrollArea--down']}`]: {\n bottom: 0,\n left: 0,\n right: 0,\n height: 20\n }\n}));\nconst offsetSelector = createSelector(gridDimensionsSelector, (dimensions, direction) => {\n if (direction === 'left') {\n return dimensions.leftPinnedWidth;\n }\n if (direction === 'right') {\n return dimensions.rightPinnedWidth + (dimensions.hasScrollX ? dimensions.scrollbarSize : 0);\n }\n // For vertical scroll areas, we don't need horizontal offset\n return 0;\n});\nfunction GridScrollAreaWrapper(props) {\n const apiRef = useGridApiContext();\n const [dragDirection, setDragDirection] = React.useState('none');\n\n // Listen for both column and row drag events\n useGridEvent(apiRef, 'columnHeaderDragStart', () => setDragDirection('horizontal'));\n useGridEvent(apiRef, 'columnHeaderDragEnd', () => setDragDirection('none'));\n useGridEvent(apiRef, 'rowDragStart', () => setDragDirection('vertical'));\n useGridEvent(apiRef, 'rowDragEnd', () => setDragDirection('none'));\n if (dragDirection === 'none') {\n return null;\n }\n if (dragDirection === 'horizontal') {\n return /*#__PURE__*/_jsx(GridHorizontalScrollAreaContent, _extends({}, props));\n }\n return /*#__PURE__*/_jsx(GridVerticalScrollAreaContent, _extends({}, props));\n}\nfunction GridHorizontalScrollAreaContent(props) {\n const {\n scrollDirection,\n scrollPosition\n } = props;\n const rootRef = React.useRef(null);\n const apiRef = useGridApiContext();\n const timeout = useTimeout();\n const densityFactor = useGridSelector(apiRef, gridDensityFactorSelector);\n const columnsTotalWidth = useGridSelector(apiRef, gridColumnsTotalWidthSelector);\n const sideOffset = useGridSelector(apiRef, offsetSelector, scrollDirection);\n const getCanScrollMore = () => {\n const dimensions = gridDimensionsSelector(apiRef);\n if (scrollDirection === 'left') {\n // Only render if the user has not reached yet the start of the list\n return scrollPosition.current.left > 0;\n }\n if (scrollDirection === 'right') {\n // Only render if the user has not reached yet the end of the list\n const maxScrollLeft = columnsTotalWidth - dimensions.viewportInnerSize.width;\n return scrollPosition.current.left < maxScrollLeft;\n }\n return false;\n };\n const rootProps = useGridRootProps();\n const totalHeaderHeight = getTotalHeaderHeight(apiRef, rootProps);\n const headerHeight = Math.floor(rootProps.columnHeaderHeight * densityFactor);\n const style = _extends({\n height: headerHeight,\n top: totalHeaderHeight - headerHeight\n }, scrollDirection === 'left' ? {\n left: sideOffset\n } : {}, scrollDirection === 'right' ? {\n right: sideOffset\n } : {});\n const handleDragOver = useEventCallback(event => {\n let offset;\n\n // Prevents showing the forbidden cursor\n event.preventDefault();\n if (scrollDirection === 'left') {\n offset = event.clientX - rootRef.current.getBoundingClientRect().right;\n } else if (scrollDirection === 'right') {\n offset = Math.max(1, event.clientX - rootRef.current.getBoundingClientRect().left);\n } else {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'MUI X: Wrong drag direction' : _formatErrorMessage(55));\n }\n offset = (offset - CLIFF) * SLOP + CLIFF;\n\n // Avoid freeze and inertia.\n timeout.start(0, () => {\n apiRef.current.scroll({\n left: scrollPosition.current.left + offset,\n top: scrollPosition.current.top\n });\n });\n });\n return /*#__PURE__*/_jsx(GridScrollAreaContent, _extends({}, props, {\n ref: rootRef,\n getCanScrollMore: getCanScrollMore,\n style: style,\n handleDragOver: handleDragOver\n }));\n}\nfunction GridVerticalScrollAreaContent(props) {\n const {\n scrollDirection,\n scrollPosition\n } = props;\n const rootRef = React.useRef(null);\n const apiRef = useGridApiContext();\n const timeout = useTimeout();\n const rowsMeta = useGridSelector(apiRef, gridRowsMetaSelector);\n const getCanScrollMore = () => {\n const dimensions = gridDimensionsSelector(apiRef);\n if (scrollDirection === 'up') {\n // Only render if the user has not reached yet the top of the list\n return scrollPosition.current.top > 0;\n }\n if (scrollDirection === 'down') {\n // Only render if the user has not reached yet the bottom of the list\n const totalRowsHeight = rowsMeta.currentPageTotalHeight || 0;\n const maxScrollTop = totalRowsHeight - dimensions.viewportInnerSize.height - (dimensions.hasScrollX ? dimensions.scrollbarSize : 0);\n return scrollPosition.current.top < maxScrollTop;\n }\n return false;\n };\n const rootProps = useGridRootProps();\n const totalHeaderHeight = getTotalHeaderHeight(apiRef, rootProps);\n const style = {\n top: scrollDirection === 'up' ? totalHeaderHeight : undefined,\n bottom: scrollDirection === 'down' ? 0 : undefined\n };\n const handleDragOver = useEventCallback(event => {\n let offset;\n\n // Prevents showing the forbidden cursor\n event.preventDefault();\n if (scrollDirection === 'up') {\n offset = event.clientY - rootRef.current.getBoundingClientRect().bottom;\n } else if (scrollDirection === 'down') {\n offset = Math.max(1, event.clientY - rootRef.current.getBoundingClientRect().top);\n } else {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'MUI X: Wrong drag direction' : _formatErrorMessage(55));\n }\n offset = (offset - CLIFF) * SLOP + CLIFF;\n\n // Avoid freeze and inertia.\n timeout.start(0, () => {\n apiRef.current.scroll({\n left: scrollPosition.current.left,\n top: scrollPosition.current.top + offset\n });\n });\n });\n return /*#__PURE__*/_jsx(GridScrollAreaContent, _extends({}, props, {\n ref: rootRef,\n getCanScrollMore: getCanScrollMore,\n style: style,\n handleDragOver: handleDragOver\n }));\n}\nconst GridScrollAreaContent = forwardRef(function GridScrollAreaContent(props, ref) {\n const {\n scrollDirection,\n getCanScrollMore,\n style,\n handleDragOver\n } = props;\n const apiRef = useGridApiContext();\n const [canScrollMore, setCanScrollMore] = React.useState(getCanScrollMore);\n const rootProps = useGridRootProps();\n const ownerState = _extends({}, rootProps, {\n scrollDirection\n });\n const classes = useUtilityClasses(ownerState);\n const handleScrolling = () => {\n setCanScrollMore(getCanScrollMore);\n };\n useGridEvent(apiRef, 'scrollPositionChange', handleScrolling);\n if (!canScrollMore) {\n return null;\n }\n return /*#__PURE__*/_jsx(GridScrollAreaRawRoot, {\n ref: ref,\n className: classes.root,\n ownerState: ownerState,\n onDragOver: handleDragOver,\n style: style\n });\n});\nif (process.env.NODE_ENV !== \"production\") GridScrollAreaContent.displayName = \"GridScrollAreaContent\";\nexport const GridScrollArea = fastMemo(GridScrollAreaWrapper);","'use client';\n\nimport * as React from 'react';\nimport useEnhancedEffect from '@mui/utils/useEnhancedEffect';\nexport function useGridApiMethod(privateApiRef, apiMethods, visibility) {\n const isFirstRender = React.useRef(true);\n useEnhancedEffect(() => {\n isFirstRender.current = false;\n privateApiRef.current.register(visibility, apiMethods);\n }, [privateApiRef, visibility, apiMethods]);\n if (isFirstRender.current) {\n privateApiRef.current.register(visibility, apiMethods);\n }\n}","'use client';\n\nimport * as React from 'react';\nexport function useGridLogger(privateApiRef, name) {\n const logger = React.useRef(null);\n if (logger.current) {\n return logger.current;\n }\n const newLogger = privateApiRef.current.getLogger(name);\n logger.current = newLogger;\n return newLogger;\n}","import { useGridLogger } from \"./useGridLogger.mjs\";\nimport { useGridEventPriority } from \"./useGridEvent.mjs\";\nexport const useGridNativeEventListener = (apiRef, ref, eventName, handler, options) => {\n const logger = useGridLogger(apiRef, 'useNativeEventListener');\n useGridEventPriority(apiRef, 'rootMount', () => {\n const targetElement = ref();\n if (!targetElement || !eventName) {\n return undefined;\n }\n logger.debug(`Binding native ${eventName} event`);\n targetElement.addEventListener(eventName, handler, options);\n return () => {\n logger.debug(`Clearing native ${eventName} event`);\n targetElement.removeEventListener(eventName, handler, options);\n };\n });\n};","'use client';\n\nimport * as React from 'react';\nexport function useFirstRender(callback) {\n const isFirstRender = React.useRef(true);\n if (isFirstRender.current) {\n isFirstRender.current = false;\n callback();\n }\n}","'use client';\n\nimport * as React from 'react';\nexport function useRunOncePerLoop(callback) {\n const scheduledCallbackRef = React.useRef(null);\n const schedule = React.useCallback((...args) => {\n // for robustness, a fallback in case we don't react to state updates and layoutEffect is not run\n // if we react to state updates, layoutEffect will run before microtasks\n if (!scheduledCallbackRef.current) {\n queueMicrotask(() => {\n if (scheduledCallbackRef.current) {\n scheduledCallbackRef.current();\n }\n });\n }\n scheduledCallbackRef.current = () => {\n scheduledCallbackRef.current = null;\n callback(...args);\n };\n }, [callback]);\n React.useLayoutEffect(() => {\n if (scheduledCallbackRef.current) {\n scheduledCallbackRef.current();\n }\n });\n return {\n schedule,\n cancel: () => {\n if (scheduledCallbackRef.current) {\n scheduledCallbackRef.current = null;\n return true;\n }\n return false;\n }\n };\n}","import { createSelector, createRootSelector } from \"../../../utils/createSelector.mjs\";\nconst gridPivotingStateSelector = createRootSelector(\n// @ts-ignore\nstate => state.pivoting);\nexport const gridPivotActiveSelector = createSelector(gridPivotingStateSelector, pivoting => pivoting?.active);\nconst emptyColumns = new Map();\nexport const gridPivotInitialColumnsSelector = createSelector(gridPivotingStateSelector, pivoting => pivoting?.initialColumns || emptyColumns);","import { useGridSelector } from \"../../utils/index.mjs\";\nimport { gridExpandedRowCountSelector } from \"../filter/index.mjs\";\nimport { gridRowCountSelector, gridRowsLoadingSelector } from \"../rows/index.mjs\";\nimport { gridPinnedRowsCountSelector } from \"../rows/gridRowsSelector.mjs\";\nimport { gridVisibleColumnDefinitionsSelector } from \"../columns/index.mjs\";\nimport { gridPivotActiveSelector } from \"../pivoting/index.mjs\";\n/**\n * Uses the grid state to determine which overlay to display.\n * Returns the active overlay type and the active loading overlay variant.\n */\nexport const useGridOverlays = (apiRef, props) => {\n const totalRowCount = useGridSelector(apiRef, gridRowCountSelector);\n const visibleRowCount = useGridSelector(apiRef, gridExpandedRowCountSelector);\n const pinnedRowsCount = useGridSelector(apiRef, gridPinnedRowsCountSelector);\n const visibleColumns = useGridSelector(apiRef, gridVisibleColumnDefinitionsSelector);\n const noRows = totalRowCount === 0 && pinnedRowsCount === 0;\n const loading = useGridSelector(apiRef, gridRowsLoadingSelector);\n const pivotActive = useGridSelector(apiRef, gridPivotActiveSelector);\n const showNoRowsOverlay = !loading && noRows;\n const showNoResultsOverlay = !loading && totalRowCount > 0 && visibleRowCount === 0;\n const showNoColumnsOverlay = !loading && visibleColumns.length === 0;\n const showEmptyPivotOverlay = showNoRowsOverlay && pivotActive;\n let overlayType = null;\n let loadingOverlayVariant = null;\n if (showNoRowsOverlay) {\n overlayType = 'noRowsOverlay';\n }\n if (showNoColumnsOverlay) {\n overlayType = 'noColumnsOverlay';\n }\n if (showEmptyPivotOverlay) {\n overlayType = 'emptyPivotOverlay';\n }\n if (showNoResultsOverlay) {\n overlayType = 'noResultsOverlay';\n }\n if (loading) {\n overlayType = 'loadingOverlay';\n loadingOverlayVariant = props.slotProps?.loadingOverlay?.[noRows ? 'noRowsVariant' : 'variant'] ?? (noRows ? 'skeleton' : 'linear-progress');\n }\n return {\n overlayType: overlayType,\n loadingOverlayVariant\n };\n};","import { createRootSelector } from \"../../../utils/createSelector.mjs\";\nexport const gridColumnMenuSelector = createRootSelector(state => state.columnMenu);","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport { fastMemo } from '@mui/x-internals/fastMemo';\nimport { useGridPrivateApiContext } from \"../hooks/utils/useGridPrivateApiContext.mjs\";\nimport { useGridSelector } from \"../hooks/utils/useGridSelector.mjs\";\nimport { useGridRootProps } from \"../hooks/utils/useGridRootProps.mjs\";\nimport { gridColumnVisibilityModelSelector, gridVisibleColumnDefinitionsSelector } from \"../hooks/features/columns/gridColumnsSelector.mjs\";\nimport { gridFilterActiveItemsLookupSelector } from \"../hooks/features/filter/gridFilterSelector.mjs\";\nimport { gridSortColumnLookupSelector } from \"../hooks/features/sorting/gridSortingSelector.mjs\";\nimport { gridTabIndexColumnHeaderSelector, gridTabIndexCellSelector, gridFocusColumnHeaderSelector, gridTabIndexColumnGroupHeaderSelector, gridFocusColumnGroupHeaderSelector } from \"../hooks/features/focus/gridFocusStateSelector.mjs\";\nimport { gridColumnGroupsHeaderMaxDepthSelector, gridColumnGroupsHeaderStructureSelector } from \"../hooks/features/columnGrouping/gridColumnGroupsSelector.mjs\";\nimport { gridColumnMenuSelector } from \"../hooks/features/columnMenu/columnMenuSelector.mjs\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction GridHeaders() {\n const apiRef = useGridPrivateApiContext();\n const rootProps = useGridRootProps();\n const visibleColumns = useGridSelector(apiRef, gridVisibleColumnDefinitionsSelector);\n const filterColumnLookup = useGridSelector(apiRef, gridFilterActiveItemsLookupSelector);\n const sortColumnLookup = useGridSelector(apiRef, gridSortColumnLookupSelector);\n const columnHeaderTabIndexState = useGridSelector(apiRef, gridTabIndexColumnHeaderSelector);\n const hasNoCellTabIndexState = useGridSelector(apiRef, () => gridTabIndexCellSelector(apiRef) === null);\n const columnGroupHeaderTabIndexState = useGridSelector(apiRef, gridTabIndexColumnGroupHeaderSelector);\n const columnHeaderFocus = useGridSelector(apiRef, gridFocusColumnHeaderSelector);\n const columnGroupHeaderFocus = useGridSelector(apiRef, gridFocusColumnGroupHeaderSelector);\n const headerGroupingMaxDepth = useGridSelector(apiRef, gridColumnGroupsHeaderMaxDepthSelector);\n const columnMenuState = useGridSelector(apiRef, gridColumnMenuSelector);\n const columnVisibility = useGridSelector(apiRef, gridColumnVisibilityModelSelector);\n const columnGroupsHeaderStructure = useGridSelector(apiRef, gridColumnGroupsHeaderStructureSelector);\n const hasOtherElementInTabSequence = !(columnGroupHeaderTabIndexState === null && columnHeaderTabIndexState === null && hasNoCellTabIndexState);\n const columnsContainerRef = apiRef.current.columnHeadersContainerRef;\n return /*#__PURE__*/_jsx(rootProps.slots.columnHeaders, _extends({\n ref: columnsContainerRef,\n visibleColumns: visibleColumns,\n filterColumnLookup: filterColumnLookup,\n sortColumnLookup: sortColumnLookup,\n columnHeaderTabIndexState: columnHeaderTabIndexState,\n columnGroupHeaderTabIndexState: columnGroupHeaderTabIndexState,\n columnHeaderFocus: columnHeaderFocus,\n columnGroupHeaderFocus: columnGroupHeaderFocus,\n headerGroupingMaxDepth: headerGroupingMaxDepth,\n columnMenuState: columnMenuState,\n columnVisibility: columnVisibility,\n columnGroupsHeaderStructure: columnGroupsHeaderStructure,\n hasOtherElementInTabSequence: hasOtherElementInTabSequence\n }, rootProps.slotProps?.columnHeaders));\n}\nconst MemoizedGridHeaders = fastMemo(GridHeaders);\nexport { MemoizedGridHeaders as GridHeaders };","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport { styled } from '@mui/material/styles';\nimport { forwardRef } from '@mui/x-internals/forwardRef';\nimport { useGridRootProps } from \"../../hooks/utils/useGridRootProps.mjs\";\nimport { useGridConfiguration } from \"../../hooks/utils/useGridConfiguration.mjs\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst GridPanelAnchor = styled('div', {\n slot: 'internal',\n shouldForwardProp: undefined\n})({\n position: 'absolute',\n top: `var(--DataGrid-headersTotalHeight)`,\n left: 0,\n width: 'calc(100% - (var(--DataGrid-hasScrollY) * var(--DataGrid-scrollbarSize)))'\n});\nconst Element = styled('div', {\n name: 'MuiDataGrid',\n slot: 'Main',\n overridesResolver: (props, styles) => {\n const {\n ownerState,\n loadingOverlayVariant,\n overlayType\n } = props;\n const hideContent = loadingOverlayVariant === 'skeleton' || overlayType === 'noColumnsOverlay';\n return [styles.main, ownerState.hasPinnedRight && styles['main--hasPinnedRight'], hideContent && styles['main--hiddenContent']];\n }\n})({\n flexGrow: 1,\n position: 'relative',\n overflow: 'hidden',\n display: 'flex',\n flexDirection: 'column'\n});\nexport const GridMainContainer = forwardRef((props, ref) => {\n const {\n ownerState\n } = props;\n const rootProps = useGridRootProps();\n const configuration = useGridConfiguration();\n const ariaAttributes = configuration.hooks.useGridAriaAttributes();\n return /*#__PURE__*/_jsxs(Element, _extends({\n ownerState: ownerState,\n className: props.className,\n tabIndex: -1\n }, ariaAttributes, rootProps.slotProps?.main, {\n ref: ref,\n children: [/*#__PURE__*/_jsx(GridPanelAnchor, {\n role: \"none\",\n \"data-id\": \"gridPanelAnchor\"\n }), props.children]\n }));\n});\nif (process.env.NODE_ENV !== \"production\") GridMainContainer.displayName = \"GridMainContainer\";","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport clsx from 'clsx';\nimport { styled } from '@mui/material/styles';\nimport composeClasses from '@mui/utils/composeClasses';\nimport { gridClasses, getDataGridUtilityClass } from \"../../constants/gridClasses.mjs\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst useUtilityClasses = () => {\n const slots = {\n root: ['topContainer']\n };\n return composeClasses(slots, getDataGridUtilityClass, {});\n};\nconst Element = styled('div', {\n slot: 'internal',\n shouldForwardProp: undefined\n})({\n position: 'sticky',\n zIndex: 40,\n top: 0\n});\nexport function GridTopContainer(props) {\n const classes = useUtilityClasses();\n return /*#__PURE__*/_jsx(Element, _extends({}, props, {\n className: clsx(classes.root, gridClasses['container--top']),\n role: \"none\"\n }));\n}","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport clsx from 'clsx';\nimport { styled } from '@mui/system';\nimport composeClasses from '@mui/utils/composeClasses';\nimport { forwardRef } from '@mui/x-internals/forwardRef';\nimport { useGridRootProps } from \"../../hooks/utils/useGridRootProps.mjs\";\nimport { getDataGridUtilityClass } from \"../../constants/gridClasses.mjs\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst useUtilityClasses = (props, overflowedContent) => {\n const {\n classes\n } = props;\n const slots = {\n root: ['virtualScrollerContent', overflowedContent && 'virtualScrollerContent--overflowed']\n };\n return composeClasses(slots, getDataGridUtilityClass, classes);\n};\nconst VirtualScrollerContentRoot = styled('div', {\n name: 'MuiDataGrid',\n slot: 'VirtualScrollerContent',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.virtualScrollerContent, ownerState.overflowedContent && styles['virtualScrollerContent--overflowed']];\n }\n})({\n flex: '1 0 auto',\n display: 'flex',\n flexDirection: 'column'\n});\nconst GridVirtualScrollerContent = forwardRef(function GridVirtualScrollerContent(props, ref) {\n const rootProps = useGridRootProps();\n const overflowedContent = !rootProps.autoHeight && props.style?.minHeight === 'auto';\n const classes = useUtilityClasses(rootProps, overflowedContent);\n const ownerState = {\n classes: rootProps.classes,\n overflowedContent\n };\n return /*#__PURE__*/_jsx(VirtualScrollerContentRoot, _extends({}, props, {\n ownerState: ownerState,\n className: clsx(classes.root, props.className),\n ref: ref\n }));\n});\nif (process.env.NODE_ENV !== \"production\") GridVirtualScrollerContent.displayName = \"GridVirtualScrollerContent\";\nexport { GridVirtualScrollerContent };","import * as React from 'react';\nimport { styled } from '@mui/material/styles';\nimport { fastMemo } from '@mui/x-internals/fastMemo';\nimport { vars } from \"../../constants/cssVariables.mjs\";\nimport { useGridSelector } from \"../../hooks/utils/useGridSelector.mjs\";\nimport { useGridApiContext } from \"../../hooks/utils/useGridApiContext.mjs\";\nimport { gridDimensionsSelector } from \"../../hooks/features/dimensions/index.mjs\";\nimport { gridClasses } from \"../../constants/index.mjs\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst Filler = styled('div', {\n slot: 'internal',\n shouldForwardProp: undefined\n})({\n display: 'flex',\n flexDirection: 'row',\n width: 'var(--DataGrid-rowWidth)',\n boxSizing: 'border-box'\n});\nconst Pinned = styled('div', {\n slot: 'internal',\n shouldForwardProp: undefined\n})({\n position: 'sticky',\n height: '100%',\n boxSizing: 'border-box',\n borderTop: '1px solid var(--rowBorderColor)',\n backgroundColor: vars.cell.background.pinned\n});\nconst PinnedLeft = styled(Pinned, {\n slot: 'internal'\n})({\n left: 0\n});\nconst PinnedRight = styled(Pinned, {\n slot: 'internal'\n})({\n right: 0\n});\nconst Main = styled('div', {\n slot: 'internal',\n shouldForwardProp: undefined\n})({\n flexGrow: 1,\n borderTop: '1px solid var(--rowBorderColor)'\n});\nfunction GridVirtualScrollerFiller({\n rowsLength\n}) {\n const apiRef = useGridApiContext();\n const {\n viewportOuterSize,\n minimumSize,\n hasScrollX,\n hasScrollY,\n scrollbarSize,\n leftPinnedWidth,\n rightPinnedWidth\n } = useGridSelector(apiRef, gridDimensionsSelector);\n const height = hasScrollX ? scrollbarSize : 0;\n const needsLastRowBorder = viewportOuterSize.height - minimumSize.height > 0;\n if (height === 0 && !needsLastRowBorder) {\n return null;\n }\n return /*#__PURE__*/_jsxs(Filler, {\n className: gridClasses.filler,\n role: \"none\",\n style: {\n height,\n '--rowBorderColor': rowsLength === 0 ? 'transparent' : 'var(--DataGrid-rowBorderColor)'\n },\n children: [leftPinnedWidth > 0 && /*#__PURE__*/_jsx(PinnedLeft, {\n className: gridClasses['filler--pinnedLeft'],\n style: {\n width: leftPinnedWidth\n }\n }), /*#__PURE__*/_jsx(Main, {}), rightPinnedWidth > 0 && /*#__PURE__*/_jsx(PinnedRight, {\n className: gridClasses['filler--pinnedRight'],\n style: {\n width: rightPinnedWidth + (hasScrollY ? scrollbarSize : 0)\n }\n })]\n });\n}\nconst Memoized = fastMemo(GridVirtualScrollerFiller);\nexport { Memoized as GridVirtualScrollerFiller };","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport clsx from 'clsx';\nimport { styled } from '@mui/system';\nimport composeClasses from '@mui/utils/composeClasses';\nimport { forwardRef } from '@mui/x-internals/forwardRef';\nimport { useGridRootProps } from \"../../hooks/utils/useGridRootProps.mjs\";\nimport { getDataGridUtilityClass } from \"../../constants/gridClasses.mjs\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n classes\n } = ownerState;\n const slots = {\n root: ['virtualScrollerRenderZone']\n };\n return composeClasses(slots, getDataGridUtilityClass, classes);\n};\nconst VirtualScrollerRenderZoneRoot = styled('div', {\n name: 'MuiDataGrid',\n slot: 'VirtualScrollerRenderZone'\n})({\n position: 'absolute',\n display: 'flex',\n // Prevents margin collapsing when using `getRowSpacing`\n flexDirection: 'column'\n});\nconst GridVirtualScrollerRenderZone = forwardRef(function GridVirtualScrollerRenderZone(props, ref) {\n const rootProps = useGridRootProps();\n const classes = useUtilityClasses(rootProps);\n return /*#__PURE__*/_jsx(VirtualScrollerRenderZoneRoot, _extends({\n ownerState: rootProps\n }, props, {\n className: clsx(classes.root, props.className),\n ref: ref\n }));\n});\nif (process.env.NODE_ENV !== \"production\") GridVirtualScrollerRenderZone.displayName = \"GridVirtualScrollerRenderZone\";\nexport { GridVirtualScrollerRenderZone };","import { createRootSelector, createSelector } from \"../../../utils/createSelector.mjs\";\nexport const gridColumnResizeSelector = createRootSelector(state => state.columnResize);\nexport const gridResizingColumnFieldSelector = createSelector(gridColumnResizeSelector, columnResize => columnResize.resizingColumnField);","export const DEFAULT_GRID_AUTOSIZE_OPTIONS = {\n includeHeaders: true,\n includeHeaderFilters: false,\n includeOutliers: false,\n outliersFactor: 1.5,\n expand: false,\n disableColumnVirtualization: true\n};\n\n/**\n * The Resize API interface that is available in the grid `apiRef`.\n */","import { createSelector, createRootSelector } from \"../../../utils/createSelector.mjs\";\nimport { GridEditModes } from \"../../../models/gridEditRowModel.mjs\";\n/**\n * Select the row editing state.\n */\nexport const gridEditRowsStateSelector = createRootSelector(state => state.editRows);\nexport const gridRowIsEditingSelector = createSelector(gridEditRowsStateSelector, (editRows, {\n rowId,\n editMode\n}) => editMode === GridEditModes.Row && Boolean(editRows[rowId]));\nexport const gridEditCellStateSelector = createSelector(gridEditRowsStateSelector, (editRows, {\n rowId,\n field\n}) => editRows[rowId]?.[field] ?? null);","import { createSelector, createRootSelector } from \"../../../utils/createSelector.mjs\";\nexport const gridPreferencePanelStateSelector = createRootSelector(state => state.preferencePanel);\nexport const gridPreferencePanelSelectorWithLabel = createSelector(gridPreferencePanelStateSelector, (panel, labelId) => {\n if (panel.open && panel.labelId === labelId) {\n return true;\n }\n return false;\n});","var GridPreferencePanelsValue = /*#__PURE__*/function (GridPreferencePanelsValue) {\n GridPreferencePanelsValue[\"filters\"] = \"filters\";\n GridPreferencePanelsValue[\"columns\"] = \"columns\";\n GridPreferencePanelsValue[\"aiAssistant\"] = \"aiAssistant\";\n return GridPreferencePanelsValue;\n}(GridPreferencePanelsValue || {});\nexport { GridPreferencePanelsValue };","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport { EMPTY_RENDER_CONTEXT } from '@mui/x-virtualizer';\nimport { platform } from '@base-ui/utils/platform';\nimport { useGridApiMethod } from \"../../utils/useGridApiMethod.mjs\";\nimport { useGridEventPriority } from \"../../utils/index.mjs\";\nconst HAS_LAYOUT = !platform.env.jsdom;\n\n// HACK: Typescript doesn't use the alias name (\"GridVirtualizationState\") and changes\n// the autogenerated docs result, but this would otherwise be just:\n// export type GridVirtualizationState = VirtualizationState;\n\n// XXX: We want to use the virtualizer as the source of truth for its state, but this needs to\n// stay because some parts of the grid require the `virtualization` state during initialization.\nexport const virtualizationStateInitializer = (state, props) => {\n const {\n disableVirtualization,\n autoHeight\n } = props;\n const virtualization = {\n enabled: !disableVirtualization && HAS_LAYOUT,\n enabledForColumns: !disableVirtualization && HAS_LAYOUT,\n enabledForRows: !disableVirtualization && !autoHeight && HAS_LAYOUT,\n renderContext: EMPTY_RENDER_CONTEXT\n };\n return _extends({}, state, {\n virtualization\n });\n};\nexport function useGridVirtualization(apiRef, rootProps) {\n const {\n autoHeight,\n disableVirtualization\n } = rootProps;\n\n /*\n * API METHODS\n */\n\n const setVirtualization = enabled => {\n const {\n virtualizer\n } = apiRef.current;\n enabled &&= HAS_LAYOUT;\n const snapshot = virtualizer.store.getSnapshot();\n if (snapshot.virtualization.enabled === enabled && snapshot.virtualization.enabledForRows === enabled && snapshot.virtualization.enabledForColumns === enabled) {\n return;\n }\n virtualizer.store.set('virtualization', _extends({}, virtualizer.store.state.virtualization, {\n enabled,\n enabledForColumns: enabled,\n enabledForRows: enabled && !autoHeight\n }));\n };\n const setColumnVirtualization = enabled => {\n const {\n virtualizer\n } = apiRef.current;\n enabled &&= HAS_LAYOUT;\n const snapshot = virtualizer.store.getSnapshot();\n if (snapshot.virtualization.enabledForColumns === enabled) {\n return;\n }\n virtualizer.store.set('virtualization', _extends({}, virtualizer.store.state.virtualization, {\n enabledForColumns: enabled\n }));\n };\n const api = {\n unstable_setVirtualization: setVirtualization,\n unstable_setColumnVirtualization: setColumnVirtualization\n };\n useGridApiMethod(apiRef, api, 'public');\n const forceUpdateRenderContext = () => {\n const {\n virtualizer\n } = apiRef.current;\n virtualizer?.api.scheduleUpdateRenderContext();\n };\n apiRef.current.register('private', {\n updateRenderContext: forceUpdateRenderContext\n });\n\n /*\n * EFFECTS\n */\n\n useGridEventPriority(apiRef, 'sortedRowsSet', forceUpdateRenderContext);\n useGridEventPriority(apiRef, 'paginationModelChange', forceUpdateRenderContext);\n useGridEventPriority(apiRef, 'columnsChange', forceUpdateRenderContext);\n\n /* eslint-disable react-hooks/exhaustive-deps */\n React.useEffect(() => {\n if (!apiRef.current.virtualizer) {\n return;\n }\n setVirtualization(!rootProps.disableVirtualization);\n }, [apiRef, disableVirtualization, autoHeight]);\n /* eslint-enable react-hooks/exhaustive-deps */\n}","import { createRootSelector, createSelector, createSelectorMemoized } from \"../../../utils/createSelector.mjs\";\n/**\n * Get the columns state\n * @category Virtualization\n */\nexport const gridVirtualizationSelector = createRootSelector(state => state.virtualization);\n\n/**\n * Get the enabled state for virtualization\n * @category Virtualization\n * @deprecated Use `gridVirtualizationColumnEnabledSelector` and `gridVirtualizationRowEnabledSelector`\n */\nexport const gridVirtualizationEnabledSelector = createSelector(gridVirtualizationSelector, state => state.enabled);\n\n/**\n * Get the enabled state for column virtualization\n * @category Virtualization\n */\nexport const gridVirtualizationColumnEnabledSelector = createSelector(gridVirtualizationSelector, state => state.enabledForColumns);\n\n/**\n * Get the enabled state for row virtualization\n * @category Virtualization\n */\nexport const gridVirtualizationRowEnabledSelector = createSelector(gridVirtualizationSelector, state => state.enabledForRows);\n\n/**\n * Get the layout mode\n * @category Virtualization\n * @ignore - do not document.\n */\nexport const gridVirtualizationLayoutModeSelector = createSelector(gridVirtualizationSelector, state => state.layoutMode);\n\n/**\n * Get the render context\n * @category Virtualization\n * @ignore - do not document.\n */\nexport const gridRenderContextSelector = createSelector(gridVirtualizationSelector, state => state.renderContext);\nconst firstColumnIndexSelector = createRootSelector(state => state.virtualization.renderContext.firstColumnIndex);\nconst lastColumnIndexSelector = createRootSelector(state => state.virtualization.renderContext.lastColumnIndex);\n\n/**\n * Get the render context, with only columns filled in.\n * This is cached, so it can be used to only re-render when the column interval changes.\n * @category Virtualization\n * @ignore - do not document.\n */\nexport const gridRenderContextColumnsSelector = createSelectorMemoized(firstColumnIndexSelector, lastColumnIndexSelector, (firstColumnIndex, lastColumnIndex) => ({\n firstColumnIndex,\n lastColumnIndex\n}));","export function getKeyDefault(params) {\n return JSON.stringify([params.filterModel, params.sortModel, params.start, params.end]);\n}\nexport class GridDataSourceCacheDefault {\n constructor({\n ttl = 300_000,\n getKey = getKeyDefault\n }) {\n this.cache = {};\n this.ttl = ttl;\n this.getKey = getKey;\n }\n set(key, value) {\n const keyString = this.getKey(key);\n const expiry = Date.now() + this.ttl;\n this.cache[keyString] = {\n value,\n expiry\n };\n }\n get(key) {\n const keyString = this.getKey(key);\n const entry = this.cache[keyString];\n if (!entry) {\n return undefined;\n }\n if (Date.now() > entry.expiry) {\n delete this.cache[keyString];\n return undefined;\n }\n return entry.value;\n }\n clear() {\n this.cache = {};\n }\n}","export class GridGetRowsError extends Error {\n /**\n * The parameters used in the failed request\n */\n\n /**\n * The original error that caused this error\n */\n\n constructor(options) {\n super(options.message);\n this.name = 'GridGetRowsError';\n this.params = options.params;\n this.cause = options.cause;\n }\n}\nexport class GridUpdateRowError extends Error {\n /**\n * The parameters used in the failed request\n */\n\n /**\n * The original error that caused this error\n */\n\n constructor(options) {\n super(options.message);\n this.name = 'GridUpdateRowError';\n this.params = options.params;\n this.cause = options.cause;\n }\n}","'use client';\n\nimport * as React from 'react';\nimport { styled } from '@mui/material/styles';\nimport composeClasses from '@mui/utils/composeClasses';\nimport { forwardRef } from '@mui/x-internals/forwardRef';\nimport { iOSMediaQuery } from '@mui/x-internals/platform';\nimport { useGridPrivateApiContext } from \"../../hooks/utils/useGridPrivateApiContext.mjs\";\nimport { gridDimensionsSelector, useGridSelector } from \"../../hooks/index.mjs\";\nimport { useGridRootProps } from \"../../hooks/utils/useGridRootProps.mjs\";\nimport { getDataGridUtilityClass } from \"../../constants/gridClasses.mjs\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst useUtilityClasses = (ownerState, position) => {\n const {\n classes\n } = ownerState;\n const slots = {\n root: ['scrollbar', `scrollbar--${position}`],\n content: ['scrollbarContent']\n };\n return composeClasses(slots, getDataGridUtilityClass, classes);\n};\n\n// In macOS Safari and Gnome Web, scrollbars are overlaid and don't affect the layout. So we consider\n// their size to be 0px throughout all the calculations, but the floating scrollbar container does need\n// to appear and have a real size. We set it to 14px because it seems like an acceptable value and we\n// don't have a method to find the required size for scrollbars on those platforms.\nexport const scrollbarSizeCssExpression = 'calc(max(var(--DataGrid-scrollbarSize), 14px))';\nconst Scrollbar = styled('div', {\n slot: 'internal',\n shouldForwardProp: undefined\n})({\n position: 'absolute',\n display: 'inline-block',\n zIndex: 60,\n '&:hover': {\n zIndex: 70\n },\n '--size': scrollbarSizeCssExpression,\n // [iOS-scrollbar-swap]\n // On iOS, native scrollbars of the `GridVirtualScroller` are shown instead,\n // so hide these to avoid a duplicate thumb.\n [iOSMediaQuery]: {\n display: 'none'\n }\n});\nconst ScrollbarVertical = styled(Scrollbar, {\n slot: 'internal'\n})({\n width: 'var(--size)',\n height: 'calc(var(--DataGrid-hasScrollY) * (100% - var(--DataGrid-headersTotalHeight) - var(--DataGrid-hasScrollX) * var(--DataGrid-scrollbarSize)))',\n overflowY: 'auto',\n overflowX: 'hidden',\n // Disable focus-visible style, it's a scrollbar.\n outline: 0,\n '& > div': {\n width: 'var(--size)'\n },\n top: 'var(--DataGrid-headersTotalHeight)',\n right: 0\n});\nconst ScrollbarHorizontal = styled(Scrollbar, {\n slot: 'internal'\n})({\n width: 'calc(var(--DataGrid-hasScrollX) * (100% - var(--DataGrid-hasScrollY) * var(--DataGrid-scrollbarSize)))',\n height: 'var(--size)',\n overflowY: 'hidden',\n overflowX: 'auto',\n // Disable focus-visible style, it's a scrollbar.\n outline: 0,\n '& > div': {\n height: 'var(--size)'\n },\n bottom: 0\n});\nexport const ScrollbarCorner = styled(Scrollbar, {\n slot: 'internal'\n})({\n width: 'var(--size)',\n height: 'var(--size)',\n right: 0,\n bottom: 0,\n overflow: 'scroll',\n '@media print': {\n display: 'none'\n }\n});\nconst GridVirtualScrollbar = forwardRef(function GridVirtualScrollbar(props, ref) {\n const apiRef = useGridPrivateApiContext();\n const rootProps = useGridRootProps();\n const classes = useUtilityClasses(rootProps, props.position);\n const dimensions = useGridSelector(apiRef, gridDimensionsSelector);\n const propertyDimension = props.position === 'vertical' ? 'height' : 'width';\n const scrollbarInnerSize = props.position === 'horizontal' ? dimensions.minimumSize.width : dimensions.minimumSize.height - dimensions.headersTotalHeight;\n const Container = props.position === 'vertical' ? ScrollbarVertical : ScrollbarHorizontal;\n const scrollbarInnerStyle = React.useMemo(() => ({\n [propertyDimension]: `${scrollbarInnerSize}px`\n }), [propertyDimension, scrollbarInnerSize]);\n return /*#__PURE__*/_jsx(Container, {\n ref: ref,\n className: classes.root,\n tabIndex: -1,\n \"aria-hidden\": \"true\"\n // tabIndex does not prevent focus with a mouse click, throwing a console error\n // https://github.com/mui/mui-x/issues/16706\n ,\n onFocus: event => {\n event.target.blur();\n },\n children: /*#__PURE__*/_jsx(\"div\", {\n className: classes.content,\n style: scrollbarInnerStyle\n })\n });\n});\nif (process.env.NODE_ENV !== \"production\") GridVirtualScrollbar.displayName = \"GridVirtualScrollbar\";\nexport { GridVirtualScrollbar };","'use client';\n\nimport * as React from 'react';\nimport { styled } from '@mui/material/styles';\nimport { useRtl } from '@mui/system/RtlProvider';\nimport composeClasses from '@mui/utils/composeClasses';\nimport { gridDimensionsSelector, gridPinnedColumnsSelector, useGridEvent, useGridSelector } from \"../hooks/index.mjs\";\nimport { gridPinnedRowsSelector } from \"../hooks/features/rows/gridRowsSelector.mjs\";\nimport { useGridRootProps } from \"../hooks/utils/useGridRootProps.mjs\";\nimport { vars } from \"../constants/cssVariables.mjs\";\nimport { useGridPrivateApiContext } from \"../hooks/utils/useGridPrivateApiContext.mjs\";\nimport { gridHasScrollXSelector, gridHasScrollYSelector } from \"../hooks/features/dimensions/gridDimensionsSelectors.mjs\";\nimport { getDataGridUtilityClass } from \"../constants/index.mjs\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n position\n } = ownerState;\n const slots = {\n root: ['scrollShadow', `scrollShadow--${position}`]\n };\n return composeClasses(slots, getDataGridUtilityClass, classes);\n};\nconst ScrollShadow = styled('div', {\n name: 'MuiDataGrid',\n slot: 'ScrollShadow',\n overridesResolver: (props, styles) => [styles.root, styles[props.position]]\n})(({\n theme\n}) => ({\n position: 'absolute',\n inset: 0,\n pointerEvents: 'none',\n transition: vars.transition(['box-shadow'], {\n duration: vars.transitions.duration.short\n }),\n '--length': theme.palette.mode === 'dark' ? '8px' : '6px',\n '--length-inverse': 'calc(var(--length) * -1)',\n '--opacity': theme.palette.mode === 'dark' ? '0.7' : '0.18',\n '--blur': 'var(--length)',\n '--spread': 'calc(var(--length) * -1)',\n '--color': '0, 0, 0',\n '--color-start': 'rgba(var(--color), calc(var(--hasScrollStart) * var(--opacity)))',\n '--color-end': 'rgba(var(--color), calc(var(--hasScrollEnd) * var(--opacity)))',\n variants: [{\n props: {\n position: 'vertical'\n },\n style: {\n top: 'var(--DataGrid-topContainerHeight)',\n bottom: 'calc(var(--DataGrid-bottomContainerHeight) + var(--DataGrid-hasScrollX) * var(--DataGrid-scrollbarSize))',\n boxShadow: 'inset 0 var(--length) var(--blur) var(--spread) var(--color-start), inset 0 var(--length-inverse) var(--blur) var(--spread) var(--color-end)'\n }\n }, {\n props: {\n position: 'horizontal'\n },\n style: {\n left: 'var(--DataGrid-leftPinnedWidth)',\n right: 'calc(var(--DataGrid-rightPinnedWidth) + var(--DataGrid-hasScrollY) * var(--DataGrid-scrollbarSize))',\n boxShadow: 'inset var(--length) 0 var(--blur) var(--spread) var(--color-start), inset var(--length-inverse) 0 var(--blur) var(--spread) var(--color-end)'\n }\n }]\n}));\nfunction GridScrollShadows(props) {\n const {\n position\n } = props;\n const rootProps = useGridRootProps();\n const ownerState = {\n classes: rootProps.classes,\n position\n };\n const classes = useUtilityClasses(ownerState);\n const ref = React.useRef(null);\n const apiRef = useGridPrivateApiContext();\n const hasScrollX = useGridSelector(apiRef, gridHasScrollXSelector);\n const hasScrollY = useGridSelector(apiRef, gridHasScrollYSelector);\n const pinnedRows = useGridSelector(apiRef, gridPinnedRowsSelector);\n const pinnedColumns = useGridSelector(apiRef, gridPinnedColumnsSelector);\n const initialScrollable = position === 'vertical' ? hasScrollY && pinnedRows?.bottom?.length > 0 : hasScrollX && pinnedColumns?.right?.length !== undefined && pinnedColumns?.right?.length > 0;\n const isRtl = useRtl();\n const updateScrollShadowVisibility = React.useCallback(scrollPosition => {\n if (!ref.current) {\n return;\n }\n // Math.abs to convert negative scroll position (RTL) to positive\n const scroll = Math.abs(Math.round(scrollPosition));\n const dimensions = gridDimensionsSelector(apiRef);\n const maxScroll = Math.round(dimensions.contentSize[position === 'vertical' ? 'height' : 'width'] - dimensions.viewportInnerSize[position === 'vertical' ? 'height' : 'width']);\n const hasPinnedStart = position === 'vertical' ? pinnedRows?.top?.length > 0 : pinnedColumns?.left?.length !== undefined && pinnedColumns?.left?.length > 0;\n const hasPinnedEnd = position === 'vertical' ? pinnedRows?.bottom?.length > 0 : pinnedColumns?.right?.length !== undefined && pinnedColumns?.right?.length > 0;\n const scrollIsNotAtStart = isRtl ? scroll < maxScroll : scroll > 0;\n const scrollIsNotAtEnd = isRtl ? scroll > 0 : scroll < maxScroll;\n ref.current.style.setProperty('--hasScrollStart', hasPinnedStart && scrollIsNotAtStart ? '1' : '0');\n ref.current.style.setProperty('--hasScrollEnd', hasPinnedEnd && scrollIsNotAtEnd ? '1' : '0');\n }, [pinnedRows, pinnedColumns, isRtl, position, apiRef]);\n const handleScrolling = scrollParams => {\n updateScrollShadowVisibility(scrollParams[position === 'vertical' ? 'top' : 'left']);\n };\n const handleColumnResizeStop = () => {\n if (position === 'horizontal') {\n updateScrollShadowVisibility(apiRef.current.virtualScrollerRef?.current?.scrollLeft || 0);\n }\n };\n useGridEvent(apiRef, 'scrollPositionChange', handleScrolling);\n useGridEvent(apiRef, 'columnResizeStop', handleColumnResizeStop);\n React.useEffect(() => {\n updateScrollShadowVisibility((position === 'horizontal' ? apiRef.current.virtualScrollerRef?.current?.scrollLeft : apiRef.current.virtualScrollerRef?.current?.scrollTop) ?? 0);\n }, [updateScrollShadowVisibility, apiRef, position]);\n return /*#__PURE__*/_jsx(ScrollShadow, {\n className: classes.root,\n ownerState: ownerState,\n ref: ref,\n style: {\n '--hasScrollStart': 0,\n '--hasScrollEnd': initialScrollable ? '1' : '0'\n }\n });\n}\nexport { GridScrollShadows };","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { styled } from '@mui/material/styles';\nimport composeClasses from '@mui/utils/composeClasses';\nimport { minimalContentHeight } from \"../../hooks/features/rows/gridRowsUtils.mjs\";\nimport { useGridSelector } from \"../../hooks/utils/useGridSelector.mjs\";\nimport { gridDimensionsSelector } from \"../../hooks/features/dimensions/index.mjs\";\nimport { useGridApiContext } from \"../../hooks/utils/useGridApiContext.mjs\";\nimport { useGridRootProps } from \"../../hooks/utils/useGridRootProps.mjs\";\nimport { getDataGridUtilityClass } from \"../../constants/gridClasses.mjs\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst GridOverlayWrapperRoot = styled('div', {\n name: 'MuiDataGrid',\n slot: 'OverlayWrapper',\n shouldForwardProp: prop => prop !== 'overlayType' && prop !== 'loadingOverlayVariant' && prop !== 'right'\n})(({\n overlayType,\n loadingOverlayVariant,\n right\n}) =>\n// Skeleton overlay should flow with the scroll container and not be sticky\nloadingOverlayVariant !== 'skeleton' ? {\n position: 'sticky',\n // To stay in place while scrolling\n top: 'var(--DataGrid-topContainerHeight)',\n left: 0,\n right: `${right}px`,\n width: 0,\n // To stay above the content instead of shifting it down\n height: 0,\n // To stay above the content instead of shifting it down\n zIndex: overlayType === 'loadingOverlay' ? 5 // Should be above pinned columns, pinned rows, and detail panel\n : 4 // Should be above pinned columns and detail panel\n} : {});\nconst GridOverlayWrapperInner = styled('div', {\n name: 'MuiDataGrid',\n slot: 'OverlayWrapperInner',\n shouldForwardProp: prop => prop !== 'overlayType' && prop !== 'loadingOverlayVariant'\n})({});\nconst useUtilityClasses = ownerState => {\n const {\n classes\n } = ownerState;\n const slots = {\n root: ['overlayWrapper'],\n inner: ['overlayWrapperInner']\n };\n return composeClasses(slots, getDataGridUtilityClass, classes);\n};\nexport function GridOverlayWrapper(props) {\n const apiRef = useGridApiContext();\n const rootProps = useGridRootProps();\n const dimensions = useGridSelector(apiRef, gridDimensionsSelector);\n let height = Math.max(dimensions.viewportOuterSize.height - dimensions.topContainerHeight - dimensions.bottomContainerHeight - (dimensions.hasScrollX ? dimensions.scrollbarSize : 0), 0);\n if (height === 0) {\n height = minimalContentHeight;\n }\n const classes = useUtilityClasses(_extends({}, props, {\n classes: rootProps.classes\n }));\n return /*#__PURE__*/_jsx(GridOverlayWrapperRoot, _extends({\n className: classes.root\n }, props, {\n right: dimensions.columnsTotalWidth - dimensions.viewportOuterSize.width,\n children: /*#__PURE__*/_jsx(GridOverlayWrapperInner, _extends({\n className: classes.inner,\n style: {\n height,\n width: props.loadingOverlayVariant === 'skeleton' ? Math.max(dimensions.viewportOuterSize.width, dimensions.columnsTotalWidth) : dimensions.viewportOuterSize.width\n }\n }, props))\n }));\n}\nprocess.env.NODE_ENV !== \"production\" ? GridOverlayWrapper.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the TypeScript types and run \"pnpm proptypes\" |\n // ----------------------------------------------------------------------\n loadingOverlayVariant: PropTypes.oneOf(['circular-progress', 'linear-progress', 'skeleton']),\n overlayType: PropTypes.oneOf(['loadingOverlay', 'noResultsOverlay', 'noRowsOverlay', 'noColumnsOverlay', 'emptyPivotOverlay'])\n} : void 0;","import { gridVisibleRowsSelector } from \"../features/pagination/gridPaginationSelector.mjs\";\nimport { useGridSelector } from \"./index.mjs\";\nexport const getVisibleRows = (apiRef, props) => {\n return gridVisibleRowsSelector(apiRef);\n};\n\n/**\n * Computes the list of rows that are reachable by scroll.\n * Depending on whether pagination is enabled, it will return the rows in the current page.\n * - If the pagination is disabled or in server mode, it equals all the visible rows.\n * - If the row tree has several layers, it contains up to `state.pageSize` top level rows and all their descendants.\n * - If the row tree is flat, it only contains up to `state.pageSize` rows.\n */\n\nexport const useGridVisibleRows = (apiRef, props) => {\n return useGridSelector(apiRef, gridVisibleRowsSelector);\n};","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport { createSelector, createSelectorMemoized } from \"../../../utils/createSelector.mjs\";\nimport { gridVisibleColumnDefinitionsSelector } from \"../columns/gridColumnsSelector.mjs\";\nimport { gridRenderContextSelector } from \"./gridVirtualizationSelectors.mjs\";\nimport { gridFocusCellSelector } from \"../focus/index.mjs\";\nimport { gridVisibleRowsSelector } from \"../pagination/index.mjs\";\nconst gridIsFocusedCellOutOfContext = createSelector(gridFocusCellSelector, gridRenderContextSelector, gridVisibleRowsSelector, gridVisibleColumnDefinitionsSelector, (focusedCell, renderContext, currentPage, visibleColumns) => {\n if (!focusedCell) {\n return false;\n }\n const rowIndex = currentPage.rowIdToIndexMap.get(focusedCell.id);\n const columnIndex = visibleColumns.slice(renderContext.firstColumnIndex, renderContext.lastColumnIndex).findIndex(column => column.field === focusedCell.field);\n const isInRenderContext = rowIndex !== undefined && columnIndex !== -1 && rowIndex >= renderContext.firstRowIndex && rowIndex <= renderContext.lastRowIndex;\n return !isInRenderContext;\n});\nexport const gridFocusedVirtualCellSelector = createSelectorMemoized(gridIsFocusedCellOutOfContext, gridVisibleColumnDefinitionsSelector, gridVisibleRowsSelector, gridFocusCellSelector, (isFocusedCellOutOfRenderContext, visibleColumns, currentPage, focusedCell) => {\n if (!isFocusedCellOutOfRenderContext) {\n return null;\n }\n const rowIndex = currentPage.rowIdToIndexMap.get(focusedCell.id);\n if (rowIndex === undefined) {\n return null;\n }\n const columnIndex = visibleColumns.findIndex(column => column.field === focusedCell.field);\n if (columnIndex === -1) {\n return null;\n }\n return _extends({}, focusedCell, {\n rowIndex,\n columnIndex\n });\n});","import { GridEditModes } from \"../models/gridEditRowModel.mjs\";\n/**\n * The default values of `DataGridPropsWithDefaultValues` to inject in the props of DataGrid.\n */\nexport const DATA_GRID_PROPS_DEFAULT_VALUES = {\n autoHeight: false,\n autoPageSize: false,\n autosizeOnMount: false,\n checkboxSelection: false,\n checkboxSelectionVisibleOnly: false,\n clipboardCopyCellDelimiter: '\\t',\n columnBufferPx: 150,\n columnFilterDebounceMs: 150,\n columnHeaderHeight: 56,\n disableAutosize: false,\n disableColumnFilter: false,\n disableColumnMenu: false,\n disableColumnReorder: false,\n disableColumnResize: false,\n disableColumnSelector: false,\n disableColumnSorting: false,\n disableDensitySelector: false,\n disableEval: false,\n disableMultipleColumnsFiltering: false,\n disableMultipleColumnsSorting: false,\n disableMultipleRowSelection: false,\n dataSourceKeepPreviousData: false,\n dataSourceRevalidateMs: 0,\n disableRowSelectionOnClick: false,\n disableRowSelectionExcludeModel: false,\n disableVirtualization: false,\n editMode: GridEditModes.Cell,\n filterDebounceMs: 150,\n filterMode: 'client',\n hideFooter: false,\n hideFooterPagination: false,\n hideFooterRowCount: false,\n hideFooterSelectedRowCount: false,\n ignoreDiacritics: false,\n ignoreValueFormatterDuringExport: false,\n keepColumnPositionIfDraggedOutside: false,\n keepNonExistentRowsSelected: false,\n loading: false,\n logger: console,\n logLevel: process.env.NODE_ENV === 'production' ? 'error' : 'warn',\n pageSizeOptions: [25, 50, 100],\n pagination: false,\n paginationMode: 'client',\n resizeThrottleMs: 60,\n rowBufferPx: 150,\n rowHeight: 52,\n rows: [],\n rowSelection: true,\n rowSpacingType: 'margin',\n rowSpanning: false,\n showCellVerticalBorder: false,\n showColumnVerticalBorder: false,\n showToolbar: false,\n sortingMode: 'client',\n sortingOrder: ['asc', 'desc', null],\n throttleRowsMs: 0,\n virtualizeColumnsWithAutoRowHeight: false,\n tabNavigation: 'none'\n};","function _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, _typeof(o);\n}\nexport { _typeof as default };","import _typeof from \"./typeof.js\";\nfunction toPrimitive(t, r) {\n if (\"object\" != _typeof(t) || !t) return t;\n var e = t[Symbol.toPrimitive];\n if (void 0 !== e) {\n var i = e.call(t, r || \"default\");\n if (\"object\" != _typeof(i)) return i;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (\"string\" === r ? String : Number)(t);\n}\nexport { toPrimitive as default };","import _typeof from \"./typeof.js\";\nimport toPrimitive from \"./toPrimitive.js\";\nfunction toPropertyKey(t) {\n var i = toPrimitive(t, \"string\");\n return \"symbol\" == _typeof(i) ? i : i + \"\";\n}\nexport { toPropertyKey as default };","'use client';\n\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _toPropertyKey from \"@babel/runtime/helpers/esm/toPropertyKey\";\nimport * as React from 'react';\nimport { useGridApiMethod } from \"../../utils/useGridApiMethod.mjs\";\n/**\n * Implement the Pipeline Pattern\n *\n * More information and detailed example in (TODO add link to technical doc when ready)\n *\n * Some plugins contains custom logic to enrich data provided by other plugins or components.\n * For instance, the row grouping plugin needs to add / remove the grouping columns when the grid columns are updated.\n *\n * =====================================================================================================================\n *\n * The plugin containing the custom logic must use:\n *\n * - `useGridRegisterPipeProcessor` to register their processor.\n *\n * - `apiRef.current.requestPipeProcessorsApplication` to imperatively re-apply a group.\n * This method should be used in last resort.\n * Most of the time, the application should be triggered by an update on the deps of the processor.\n *\n * =====================================================================================================================\n *\n * The plugin or component that needs to enrich its data must use:\n *\n * - `apiRef.current.unstable_applyPipeProcessors` to run in chain all the processors of a given group.\n *\n * - `useGridRegisterPipeApplier` to re-apply the whole pipe when requested.\n * The applier will be called when:\n * * a processor is registered.\n * * `apiRef.current.requestPipeProcessorsApplication` is called for the given group.\n */\nexport const useGridPipeProcessing = apiRef => {\n const cache = React.useRef({});\n const isRunning = React.useRef(false);\n const runAppliers = React.useCallback(groupCache => {\n if (isRunning.current || !groupCache) {\n return;\n }\n isRunning.current = true;\n Object.values(groupCache.appliers).forEach(callback => {\n callback();\n });\n isRunning.current = false;\n }, []);\n const registerPipeProcessor = React.useCallback((group, id, processor) => {\n if (!cache.current[group]) {\n cache.current[group] = {\n processors: new Map(),\n processorsAsArray: [],\n appliers: {},\n processorsUpdated: false\n };\n }\n const groupCache = cache.current[group];\n const oldProcessor = groupCache.processors.get(id);\n if (oldProcessor !== processor) {\n groupCache.processors.set(id, processor);\n groupCache.processorsAsArray = Array.from(cache.current[group].processors.values()).filter(processorValue => processorValue !== null);\n groupCache.processorsUpdated = true;\n }\n return () => {\n cache.current[group].processors.set(id, null);\n cache.current[group].processorsAsArray = Array.from(cache.current[group].processors.values()).filter(processorValue => processorValue !== null);\n };\n }, []);\n const registerPipeApplier = React.useCallback((group, id, applier) => {\n if (!cache.current[group]) {\n cache.current[group] = {\n processors: new Map(),\n processorsAsArray: [],\n appliers: {},\n processorsUpdated: false\n };\n }\n cache.current[group].appliers[id] = applier;\n return () => {\n const _appliers = cache.current[group].appliers,\n otherAppliers = _objectWithoutPropertiesLoose(_appliers, [id].map(_toPropertyKey));\n cache.current[group].appliers = otherAppliers;\n };\n }, []);\n const requestPipeProcessorsApplication = React.useCallback(group => {\n runAppliers(cache.current[group]);\n }, [runAppliers]);\n const runAppliersForPendingProcessors = React.useCallback(() => {\n for (const group in cache.current) {\n if (!Object.prototype.hasOwnProperty.call(cache.current, group)) {\n continue;\n }\n const groupCache = cache.current[group];\n if (groupCache.processorsUpdated) {\n groupCache.processorsUpdated = false;\n runAppliers(groupCache);\n }\n }\n }, [runAppliers]);\n const applyPipeProcessors = React.useCallback((...args) => {\n const [group, value, context] = args;\n if (!cache.current[group]) {\n return value;\n }\n const processors = cache.current[group].processorsAsArray;\n let result = value;\n for (let i = 0; i < processors.length; i += 1) {\n result = processors[i](result, context);\n }\n return result;\n }, []);\n const preProcessingPrivateApi = {\n registerPipeProcessor,\n registerPipeApplier,\n requestPipeProcessorsApplication,\n runAppliersForPendingProcessors\n };\n const preProcessingPublicApi = {\n unstable_applyPipeProcessors: applyPipeProcessors\n };\n useGridApiMethod(apiRef, preProcessingPrivateApi, 'private');\n useGridApiMethod(apiRef, preProcessingPublicApi, 'public');\n};","'use client';\n\nimport * as React from 'react';\nimport { useFirstRender } from \"../../utils/useFirstRender.mjs\";\nexport const useGridRegisterPipeProcessor = (apiRef, group, callback, enabled = true) => {\n const cleanup = React.useRef(null);\n const id = React.useRef(`mui-${Math.round(Math.random() * 1e9)}`);\n const registerPreProcessor = React.useCallback(() => {\n cleanup.current = apiRef.current.registerPipeProcessor(group, id.current, callback);\n }, [apiRef, callback, group]);\n useFirstRender(() => {\n if (enabled) {\n registerPreProcessor();\n }\n });\n const isFirstRender = React.useRef(true);\n React.useEffect(() => {\n if (isFirstRender.current) {\n isFirstRender.current = false;\n } else if (enabled) {\n registerPreProcessor();\n }\n return () => {\n if (cleanup.current) {\n cleanup.current();\n cleanup.current = null;\n }\n };\n }, [registerPreProcessor, enabled]);\n};","'use client';\n\nimport * as React from 'react';\nimport { useFirstRender } from \"../../utils/useFirstRender.mjs\";\nexport const useGridRegisterPipeApplier = (apiRef, group, callback) => {\n const cleanup = React.useRef(null);\n const id = React.useRef(`mui-${Math.round(Math.random() * 1e9)}`);\n const registerPreProcessor = React.useCallback(() => {\n cleanup.current = apiRef.current.registerPipeApplier(group, id.current, callback);\n }, [apiRef, callback, group]);\n useFirstRender(() => {\n registerPreProcessor();\n });\n const isFirstRender = React.useRef(true);\n React.useEffect(() => {\n if (isFirstRender.current) {\n isFirstRender.current = false;\n } else {\n registerPreProcessor();\n }\n return () => {\n if (cleanup.current) {\n cleanup.current();\n cleanup.current = null;\n }\n };\n }, [registerPreProcessor]);\n};","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport { useGridApiMethod } from \"../../utils/useGridApiMethod.mjs\";\nimport { gridPaginationSelector } from \"../pagination/gridPaginationSelector.mjs\";\nimport { useGridRegisterPipeApplier } from \"../../core/pipeProcessing/index.mjs\";\nimport { gridRowCountSelector } from \"./gridRowsSelector.mjs\";\nimport { gridRowHeightSelector } from \"../dimensions/gridDimensionsSelectors.mjs\";\nexport const rowsMetaStateInitializer = (state, props, apiRef) => {\n // FIXME: This should be handled in the virtualizer eventually, but there are interdependencies\n // between state initializers that need to be untangled carefully.\n\n const baseRowHeight = gridRowHeightSelector(apiRef);\n const dataRowCount = gridRowCountSelector(apiRef);\n const pagination = gridPaginationSelector(apiRef);\n const rowCount = Math.min(pagination.enabled ? pagination.paginationModel.pageSize : dataRowCount, dataRowCount);\n return _extends({}, state, {\n rowsMeta: {\n currentPageTotalHeight: rowCount * baseRowHeight,\n positions: Array.from({\n length: rowCount\n }, (_, i) => i * baseRowHeight),\n pinnedTopRowsTotalHeight: 0,\n pinnedBottomRowsTotalHeight: 0\n }\n });\n};\n\n/**\n * @requires useGridPageSize (method)\n * @requires useGridPage (method)\n */\nexport const useGridRowsMeta = (apiRef, _props) => {\n const virtualizer = apiRef.current.virtualizer;\n const {\n getRowHeight,\n setLastMeasuredRowIndex,\n storeRowHeightMeasurement,\n resetRowHeights,\n hydrateRowsMeta,\n observeRowHeight,\n rowHasAutoHeight,\n getRowHeightEntry,\n getLastMeasuredRowIndex\n } = virtualizer.api.rowsMeta;\n useGridRegisterPipeApplier(apiRef, 'rowHeight', hydrateRowsMeta);\n const rowsMetaApi = {\n unstable_getRowHeight: getRowHeight,\n unstable_setLastMeasuredRowIndex: setLastMeasuredRowIndex,\n unstable_storeRowHeightMeasurement: storeRowHeightMeasurement,\n resetRowHeights\n };\n const rowsMetaPrivateApi = {\n hydrateRowsMeta,\n observeRowHeight,\n rowHasAutoHeight,\n getRowHeightEntry,\n getLastMeasuredRowIndex\n };\n useGridApiMethod(apiRef, rowsMetaApi, 'public');\n useGridApiMethod(apiRef, rowsMetaPrivateApi, 'private');\n};","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport useLazyRef from '@mui/utils/useLazyRef';\nimport useEventCallback from '@mui/utils/useEventCallback';\nimport { useRtl } from '@mui/system/RtlProvider';\nimport { roundToDecimalPlaces } from '@mui/x-internals/math';\nimport { lruMemoize } from '@mui/x-internals/lruMemoize';\nimport { useStoreEffect } from '@mui/x-internals/store';\nimport { useVirtualizer, Dimensions, LayoutDataGrid, Virtualization, EMPTY_RENDER_CONTEXT } from '@mui/x-virtualizer';\nimport { useFirstRender } from \"../utils/useFirstRender.mjs\";\nimport { createSelector } from \"../../utils/createSelector.mjs\";\nimport { useGridSelector } from \"../utils/useGridSelector.mjs\";\nimport { gridHasFillerSelector, gridVerticalScrollbarWidthSelector } from \"../features/dimensions/gridDimensionsSelectors.mjs\";\nimport { gridDensityFactorSelector } from \"../features/density/index.mjs\";\nimport { gridVisibleColumnDefinitionsSelector, gridVisiblePinnedColumnDefinitionsSelector, gridColumnPositionsSelector, gridHasColSpanSelector } from \"../features/columns/gridColumnsSelector.mjs\";\nimport { gridPinnedRowsSelector, gridRowCountSelector } from \"../features/rows/gridRowsSelector.mjs\";\nimport { useGridVisibleRows } from \"../utils/useGridVisibleRows.mjs\";\nimport { gridPaginationSelector } from \"../features/pagination/index.mjs\";\nimport { gridFocusedVirtualCellSelector } from \"../features/virtualization/gridFocusedVirtualCellSelector.mjs\";\nimport { gridRowSelectionManagerSelector } from \"../features/rowSelection/index.mjs\";\nimport { DATA_GRID_PROPS_DEFAULT_VALUES } from \"../../constants/dataGridPropsDefaultValues.mjs\";\nimport { getValidRowHeight, minimalContentHeight, rowHeightWarning } from \"../features/rows/gridRowsUtils.mjs\";\nimport { getTotalHeaderHeight } from \"../features/columns/gridColumnsUtils.mjs\";\nimport { useGridOverlays } from \"../features/overlays/useGridOverlays.mjs\";\nimport { useGridRootProps } from \"../utils/useGridRootProps.mjs\";\nimport { useGridPrivateApiContext } from \"../utils/useGridPrivateApiContext.mjs\";\nimport { useGridRowsMeta } from \"../features/rows/useGridRowsMeta.mjs\";\nimport { eslintUseValue } from \"../../utils/utils.mjs\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst columnsTotalWidthSelector = createSelector(gridVisibleColumnDefinitionsSelector, gridColumnPositionsSelector, (visibleColumns, positions) => {\n const colCount = visibleColumns.length;\n if (colCount === 0) {\n return 0;\n }\n return roundToDecimalPlaces(positions[colCount - 1] + visibleColumns[colCount - 1].computedWidth, 1);\n});\n\n/** Translates virtualizer state to grid state */\nconst addGridDimensionsCreator = () => lruMemoize((dimensions, headerHeight, groupHeaderHeight, headerFilterHeight, headersTotalHeight) => {\n return _extends({}, dimensions, {\n headerHeight,\n groupHeaderHeight,\n headerFilterHeight,\n headersTotalHeight\n });\n}, {\n maxSize: 1\n});\n\n/**\n * Virtualizer setup\n */\nexport function useGridVirtualizer() {\n const isRtl = useRtl();\n const rootProps = useGridRootProps();\n const apiRef = useGridPrivateApiContext();\n const {\n listView\n } = rootProps;\n const visibleColumns = useGridSelector(apiRef, gridVisibleColumnDefinitionsSelector);\n const pinnedRows = useGridSelector(apiRef, gridPinnedRowsSelector);\n const pinnedColumns = gridVisiblePinnedColumnDefinitionsSelector(apiRef);\n const rowSelectionManager = useGridSelector(apiRef, gridRowSelectionManagerSelector);\n const isRowSelected = React.useCallback(id => rowSelectionManager.has(id) && apiRef.current.isRowSelectable(id), [rowSelectionManager, apiRef]);\n const currentPage = useGridVisibleRows(apiRef);\n const hasColSpan = useGridSelector(apiRef, gridHasColSpanSelector);\n const verticalScrollbarWidth = useGridSelector(apiRef, gridVerticalScrollbarWidthSelector);\n const hasFiller = useGridSelector(apiRef, gridHasFillerSelector);\n const {\n autoHeight\n } = rootProps;\n const scrollReset = listView;\n\n // \n const density = useGridSelector(apiRef, gridDensityFactorSelector);\n const baseRowHeight = getValidRowHeight(rootProps.rowHeight, DATA_GRID_PROPS_DEFAULT_VALUES.rowHeight, rowHeightWarning);\n const rowHeight = Math.floor(baseRowHeight * density);\n const headerHeight = Math.floor(rootProps.columnHeaderHeight * density);\n const groupHeaderHeight = Math.floor((rootProps.columnGroupHeaderHeight ?? rootProps.columnHeaderHeight) * density);\n const headerFilterHeight = Math.floor((rootProps.headerFilterHeight ?? rootProps.columnHeaderHeight) * density);\n const columnsTotalWidth = useGridSelector(apiRef, columnsTotalWidthSelector);\n const headersTotalHeight = getTotalHeaderHeight(apiRef, rootProps);\n const leftPinnedWidth = pinnedColumns.left.reduce((w, col) => w + col.computedWidth, 0);\n const rightPinnedWidth = pinnedColumns.right.reduce((w, col) => w + col.computedWidth, 0);\n const overlayState = useGridOverlays(apiRef, rootProps);\n const dimensionsParams = {\n rowHeight,\n headerHeight,\n columnsTotalWidth,\n leftPinnedWidth,\n rightPinnedWidth,\n topPinnedHeight: headersTotalHeight,\n bottomPinnedHeight: 0,\n autoHeight,\n minimalContentHeight,\n scrollbarSize: rootProps.scrollbarSize\n };\n const addGridDimensions = useLazyRef(addGridDimensionsCreator).current;\n\n // \n\n // \n const dataRowCount = useGridSelector(apiRef, gridRowCountSelector);\n const pagination = useGridSelector(apiRef, gridPaginationSelector);\n const rowCount = Math.min(pagination.enabled ? pagination.paginationModel.pageSize : dataRowCount, dataRowCount);\n const {\n getRowHeight,\n getEstimatedRowHeight,\n getRowSpacing\n } = rootProps;\n // \n\n const RowSlot = rootProps.slots.row;\n const rowSlotProps = rootProps.slotProps?.row;\n const focusedVirtualCell = useGridSelector(apiRef, gridFocusedVirtualCellSelector);\n // We need it to trigger a new render, but rowsMeta needs access to the latest value, hence we cannot pass it to the focusedVirtualCell callback in the virtualizer params\n eslintUseValue(focusedVirtualCell);\n const layout = useLazyRef(() => new LayoutDataGrid({\n container: apiRef.current.mainElementRef,\n scroller: apiRef.current.virtualScrollerRef,\n scrollbarVertical: apiRef.current.virtualScrollbarVerticalRef,\n scrollbarHorizontal: apiRef.current.virtualScrollbarHorizontalRef\n })).current;\n const virtualizer = useVirtualizer({\n layout,\n dimensions: dimensionsParams,\n virtualization: {\n layoutMode: rootProps.experimentalFeatures?.virtualizerLayoutMode ?? 'uncontrolled',\n isRtl,\n rowBufferPx: rootProps.rowBufferPx,\n columnBufferPx: rootProps.columnBufferPx\n },\n colspan: {\n enabled: hasColSpan,\n getColspan: React.useCallback((rowId, column) => {\n if (typeof column.colSpan === 'function') {\n const row = apiRef.current.getRow(rowId);\n const value = apiRef.current.getRowValue(row, column);\n return column.colSpan(value, row, column, apiRef) ?? 0;\n }\n return column.colSpan ?? 1;\n }, [apiRef])\n },\n initialState: {\n scroll: rootProps.initialState?.scroll,\n rowSpanning: apiRef.current.state.rowSpanning,\n virtualization: apiRef.current.state.virtualization\n },\n rows: currentPage.rows,\n range: currentPage.range,\n rowCount,\n columns: visibleColumns,\n pinnedRows,\n pinnedColumns,\n disableHorizontalScroll: listView,\n disableVerticalScroll: overlayState.overlayType === 'noColumnsOverlay' || overlayState.loadingOverlayVariant === 'skeleton',\n getRowHeight: React.useMemo(() => {\n if (!getRowHeight) {\n return undefined;\n }\n return rowEntry => getRowHeight(_extends({}, rowEntry, {\n densityFactor: density\n }));\n }, [getRowHeight, density]),\n getEstimatedRowHeight: React.useMemo(() => getEstimatedRowHeight ? rowEntry => getEstimatedRowHeight(_extends({}, rowEntry, {\n densityFactor: density\n })) : undefined, [getEstimatedRowHeight, density]),\n getRowSpacing: React.useMemo(() => getRowSpacing ? rowEntry => {\n const indexRelativeToCurrentPage = currentPage.rowIdToIndexMap.get(rowEntry.id) ?? -1;\n const visibility = {\n isFirstVisible: indexRelativeToCurrentPage === 0,\n isLastVisible: indexRelativeToCurrentPage === currentPage.rows.length - 1,\n indexRelativeToCurrentPage\n };\n return getRowSpacing(_extends({}, rowEntry, visibility, {\n indexRelativeToCurrentPage: apiRef.current.getRowIndexRelativeToVisibleRows(rowEntry.id)\n }));\n } : undefined, [apiRef, getRowSpacing, currentPage.rows, currentPage.rowIdToIndexMap]),\n applyRowHeight: useEventCallback((entry, row) => apiRef.current.unstable_applyPipeProcessors('rowHeight', entry, row)),\n virtualizeColumnsWithAutoRowHeight: rootProps.virtualizeColumnsWithAutoRowHeight,\n focusedVirtualCell: useEventCallback(() => gridFocusedVirtualCellSelector(apiRef)),\n resizeThrottleMs: rootProps.resizeThrottleMs,\n onResize: useEventCallback(size => apiRef.current.publishEvent('resize', size)),\n onWheel: useEventCallback(event => {\n apiRef.current.publishEvent('virtualScrollerWheel', {}, event);\n }),\n onTouchMove: useEventCallback(event => {\n apiRef.current.publishEvent('virtualScrollerTouchMove', {}, event);\n }),\n onRenderContextChange: useEventCallback(nextRenderContext => {\n apiRef.current.publishEvent('renderedRowsIntervalChange', nextRenderContext);\n }),\n onScrollChange: React.useCallback((scrollPosition, nextRenderContext) => {\n apiRef.current.publishEvent('scrollPositionChange', {\n top: scrollPosition.top,\n left: scrollPosition.left,\n renderContext: nextRenderContext\n });\n }, [apiRef]),\n scrollReset,\n renderRow: React.useCallback(params => /*#__PURE__*/_jsx(RowSlot, _extends({\n row: params.model,\n rowId: params.id,\n index: params.rowIndex,\n selected: isRowSelected(params.id),\n offsetLeft: params.offsetLeft,\n columnsTotalWidth: columnsTotalWidth,\n rowHeight: params.baseRowHeight,\n pinnedColumns: pinnedColumns,\n visibleColumns: visibleColumns,\n firstColumnIndex: params.firstColumnIndex,\n lastColumnIndex: params.lastColumnIndex,\n focusedColumnIndex: params.focusedColumnIndex,\n isFirstVisible: params.isFirstVisible,\n isLastVisible: params.isLastVisible,\n isNotVisible: params.isVirtualFocusRow,\n showBottomBorder: params.showBottomBorder,\n scrollbarWidth: verticalScrollbarWidth,\n gridHasFiller: hasFiller\n }, rowSlotProps), params.id), [columnsTotalWidth, hasFiller, isRowSelected, pinnedColumns, RowSlot, rowSlotProps, verticalScrollbarWidth, visibleColumns]),\n renderInfiniteLoadingTrigger: React.useCallback(id => apiRef.current.getInfiniteLoadingTriggerElement?.({\n lastRowId: id\n }), [apiRef])\n });\n\n // HACK: Keep the grid's store in sync with the virtualizer store. We set up the\n // subscription in the render phase rather than in an effect because other grid\n // initialization code runs between those two moments.\n //\n // TODO(v9): Remove this\n useFirstRender(() => {\n apiRef.current.store.state.dimensions = addGridDimensions(virtualizer.store.state.dimensions, headerHeight, groupHeaderHeight, headerFilterHeight, headersTotalHeight);\n apiRef.current.store.state.rowsMeta = virtualizer.store.state.rowsMeta;\n apiRef.current.store.state.virtualization = virtualizer.store.state.virtualization;\n });\n useStoreEffect(virtualizer.store, Dimensions.selectors.dimensions, (_, dimensions) => {\n if (!dimensions.isReady) {\n return;\n }\n apiRef.current.setState(gridState => _extends({}, gridState, {\n dimensions: addGridDimensions(dimensions, headerHeight, groupHeaderHeight, headerFilterHeight, headersTotalHeight)\n }));\n });\n useStoreEffect(virtualizer.store, Dimensions.selectors.rowsMeta, (_, rowsMeta) => {\n if (rowsMeta !== apiRef.current.state.rowsMeta) {\n apiRef.current.setState(gridState => _extends({}, gridState, {\n rowsMeta\n }));\n }\n });\n useStoreEffect(virtualizer.store, Virtualization.selectors.store, (_, virtualization) => {\n if (virtualization.renderContext === EMPTY_RENDER_CONTEXT) {\n return;\n }\n if (virtualization !== apiRef.current.state.virtualization) {\n apiRef.current.setState(gridState => _extends({}, gridState, {\n virtualization\n }));\n }\n });\n apiRef.current.register('private', {\n virtualizer\n });\n useGridRowsMeta(apiRef, rootProps);\n return virtualizer;\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport { styled } from '@mui/material/styles';\nimport composeClasses from '@mui/utils/composeClasses';\nimport { iOSMediaQuery } from '@mui/x-internals/platform';\nimport clsx from 'clsx';\nimport { LayoutDataGrid, Virtualization } from '@mui/x-virtualizer';\nimport { gridHasBottomFillerSelector, gridHasScrollXSelector, gridHasScrollYSelector } from \"../../hooks/features/dimensions/gridDimensionsSelectors.mjs\";\nimport { gridRowTreeSelector } from \"../../hooks/features/rows/index.mjs\";\nimport { GridScrollArea } from \"../GridScrollArea.mjs\";\nimport { useGridRootProps } from \"../../hooks/utils/useGridRootProps.mjs\";\nimport { useGridPrivateApiContext } from \"../../hooks/utils/useGridPrivateApiContext.mjs\";\nimport { useGridSelector } from \"../../hooks/utils/useGridSelector.mjs\";\nimport { getDataGridUtilityClass, gridClasses } from \"../../constants/gridClasses.mjs\";\nimport { useGridOverlays } from \"../../hooks/features/overlays/useGridOverlays.mjs\";\nimport { GridHeaders } from \"../GridHeaders.mjs\";\nimport { GridMainContainer as Container } from \"./GridMainContainer.mjs\";\nimport { GridTopContainer as TopContainer } from \"./GridTopContainer.mjs\";\nimport { GridVirtualScrollerContent as Content } from \"./GridVirtualScrollerContent.mjs\";\nimport { GridVirtualScrollerFiller as SpaceFiller } from \"./GridVirtualScrollerFiller.mjs\";\nimport { GridVirtualScrollerRenderZone as RenderZone } from \"./GridVirtualScrollerRenderZone.mjs\";\nimport { GridVirtualScrollbar as Scrollbar, ScrollbarCorner } from \"./GridVirtualScrollbar.mjs\";\nimport { GridScrollShadows as ScrollShadows } from \"../GridScrollShadows.mjs\";\nimport { GridOverlayWrapper } from \"../base/GridOverlays.mjs\";\nimport { useGridVirtualizer } from \"../../hooks/core/useGridVirtualizer.mjs\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n hasScrollX,\n hasPinnedRight,\n loadingOverlayVariant,\n overlayType\n } = ownerState;\n const hideContent = loadingOverlayVariant === 'skeleton' || overlayType === 'noColumnsOverlay';\n const slots = {\n root: ['main', hasPinnedRight && 'main--hasPinnedRight', hideContent && 'main--hiddenContent'],\n scroller: ['virtualScroller', hasScrollX && 'virtualScroller--hasScrollX']\n };\n return composeClasses(slots, getDataGridUtilityClass, classes);\n};\nconst Scroller = styled('div', {\n name: 'MuiDataGrid',\n slot: 'VirtualScroller',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.virtualScroller, ownerState.hasScrollX && styles['virtualScroller--hasScrollX']];\n }\n})({\n position: 'relative',\n height: '100%',\n flexGrow: 1,\n overflow: 'scroll',\n display: 'flex',\n flexDirection: 'column',\n scrollbarWidth: 'none' /* Firefox */,\n '&::-webkit-scrollbar': {\n display: 'none' /* Safari and Chrome */\n },\n // [iOS-scrollbar-swap]\n // On iOS, virtual scrollbars do not show a thumb unless the user scrolls the element directly:\n // https://github.com/mui/mui-x/issues/22386\n // So keep this scroller's own native scrollbars and hide the ones in `GridVirtualScrollbar`\n // instead to avoid a duplicate thumb.\n [iOSMediaQuery]: {\n scrollbarWidth: 'auto',\n '&::-webkit-scrollbar': {\n display: 'block'\n }\n },\n '@media print': {\n overflow: 'hidden'\n },\n // See https://github.com/mui/mui-x/issues/10547\n zIndex: 0\n});\nconst Viewport = styled('div', {\n slot: 'internal',\n shouldForwardProp: undefined\n})({\n display: 'contents',\n [`.${gridClasses['virtualizer--layoutControlled']} &`]: {\n display: 'inline-block',\n position: 'sticky',\n top: 0,\n left: 0,\n overflow: 'hidden'\n }\n});\nconst hasPinnedRightSelector = apiRef => apiRef.current.state.dimensions.rightPinnedWidth > 0;\nfunction GridVirtualScroller(props) {\n const apiRef = useGridPrivateApiContext();\n const rootProps = useGridRootProps();\n const hasScrollY = useGridSelector(apiRef, gridHasScrollYSelector);\n const hasScrollX = useGridSelector(apiRef, gridHasScrollXSelector);\n const hasPinnedRight = useGridSelector(apiRef, hasPinnedRightSelector);\n const hasBottomFiller = useGridSelector(apiRef, gridHasBottomFillerSelector);\n const {\n overlayType,\n loadingOverlayVariant\n } = useGridOverlays(apiRef, rootProps);\n const Overlay = rootProps.slots?.[overlayType];\n const ownerState = {\n classes: rootProps.classes,\n hasScrollX,\n hasPinnedRight,\n overlayType,\n loadingOverlayVariant\n };\n const classes = useUtilityClasses(ownerState);\n const virtualizer = useGridVirtualizer();\n const layoutMode = virtualizer.store.use(Virtualization.selectors.layoutMode);\n const hasContentFiller = layoutMode === 'uncontrolled' && loadingOverlayVariant !== 'skeleton';\n const containerProps = virtualizer.store.use(LayoutDataGrid.selectors.containerProps);\n const scrollerProps = virtualizer.store.use(LayoutDataGrid.selectors.scrollerProps);\n const scrollerContentProps = virtualizer.store.use(LayoutDataGrid.selectors.scrollerContentProps);\n const viewportProps = virtualizer.store.use(LayoutDataGrid.selectors.viewportProps);\n const contentProps = virtualizer.store.use(LayoutDataGrid.selectors.contentProps);\n const positionerProps = virtualizer.store.use(LayoutDataGrid.selectors.positionerProps);\n const scrollbarVerticalProps = virtualizer.store.use(LayoutDataGrid.selectors.scrollbarVerticalProps);\n const scrollbarHorizontalProps = virtualizer.store.use(LayoutDataGrid.selectors.scrollbarHorizontalProps);\n const scrollAreaProps = virtualizer.store.use(LayoutDataGrid.selectors.scrollAreaProps);\n const containerVerticalProps = virtualizer.store.use(LayoutDataGrid.selectors.containerVerticalProps);\n const rows = virtualizer.api.getters.getRows(undefined, gridRowTreeSelector(apiRef));\n return /*#__PURE__*/_jsxs(Container, _extends({\n className: clsx(classes.root, layoutMode === 'controlled' && gridClasses['virtualizer--layoutControlled'])\n }, containerProps, {\n ownerState: ownerState,\n children: [/*#__PURE__*/_jsx(GridScrollArea, _extends({\n scrollDirection: \"left\"\n }, scrollAreaProps)), /*#__PURE__*/_jsx(GridScrollArea, _extends({\n scrollDirection: \"right\"\n }, scrollAreaProps)), /*#__PURE__*/_jsx(GridScrollArea, _extends({\n scrollDirection: \"up\"\n }, scrollAreaProps)), /*#__PURE__*/_jsx(GridScrollArea, _extends({\n scrollDirection: \"down\"\n }, scrollAreaProps)), /*#__PURE__*/_jsx(Scroller, _extends({\n className: classes.scroller\n }, scrollerProps, {\n ownerState: ownerState,\n children: /*#__PURE__*/_jsx(Content, _extends({}, scrollerContentProps, {\n children: /*#__PURE__*/_jsxs(Viewport, _extends({}, viewportProps, {\n children: [/*#__PURE__*/_jsxs(TopContainer, _extends({}, containerVerticalProps, {\n children: [!rootProps.listView && /*#__PURE__*/_jsx(GridHeaders, {}), /*#__PURE__*/_jsx(rootProps.slots.pinnedRows, {\n position: \"top\"\n })]\n })), overlayType && /*#__PURE__*/_jsx(GridOverlayWrapper, {\n overlayType: overlayType,\n loadingOverlayVariant: loadingOverlayVariant,\n children: /*#__PURE__*/_jsx(Overlay, _extends({}, rootProps.slotProps?.[overlayType]))\n }), /*#__PURE__*/_jsxs(RenderZone, _extends({\n role: \"rowgroup\"\n }, positionerProps, {\n children: [rows, /*#__PURE__*/_jsx(rootProps.slots.detailPanels, {})]\n })), hasContentFiller && /*#__PURE__*/_jsx(\"div\", _extends({\n className: gridClasses.contentFiller\n }, contentProps)), hasBottomFiller && /*#__PURE__*/_jsx(SpaceFiller, {\n rowsLength: rows.length\n }), /*#__PURE__*/_jsx(rootProps.slots.bottomContainer, _extends({}, containerVerticalProps, {\n children: /*#__PURE__*/_jsx(rootProps.slots.pinnedRows, {\n position: \"bottom\"\n })\n }))]\n }))\n }))\n })), hasScrollX && /*#__PURE__*/_jsxs(React.Fragment, {\n children: [rootProps.pinnedColumnsSectionSeparator?.endsWith('shadow') && /*#__PURE__*/_jsx(ScrollShadows, {\n position: \"horizontal\"\n }), /*#__PURE__*/_jsx(Scrollbar, _extends({\n position: \"horizontal\"\n }, scrollbarHorizontalProps))]\n }), hasScrollY && /*#__PURE__*/_jsxs(React.Fragment, {\n children: [rootProps.pinnedRowsSectionSeparator?.endsWith('shadow') && /*#__PURE__*/_jsx(ScrollShadows, {\n position: \"vertical\"\n }), /*#__PURE__*/_jsx(Scrollbar, _extends({\n position: \"vertical\"\n }, scrollbarVerticalProps))]\n }), hasScrollX && hasScrollY && /*#__PURE__*/_jsx(ScrollbarCorner, {\n \"aria-hidden\": \"true\"\n }), props.children]\n }));\n}\nexport { GridVirtualScroller };","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport { useGridRootProps } from \"../../hooks/utils/useGridRootProps.mjs\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport function GridFooterPlaceholder() {\n const rootProps = useGridRootProps();\n if (rootProps.hideFooter) {\n return null;\n }\n return /*#__PURE__*/_jsx(rootProps.slots.footer, _extends({}, rootProps.slotProps?.footer /* FIXME: typing error */) /* FIXME: typing error */);\n}","// Based on https://stackoverflow.com/a/59518678\nlet cachedSupportsPreventScroll;\nexport function doesSupportPreventScroll() {\n if (cachedSupportsPreventScroll === undefined) {\n document.createElement('div').focus({\n get preventScroll() {\n cachedSupportsPreventScroll = true;\n return false;\n }\n });\n }\n return cachedSupportsPreventScroll;\n}","import { doesSupportPreventScroll } from \"./doesSupportPreventScroll.mjs\";\n\n/**\n * Focuses an element while preserving the grid scroll position.\n *\n * Uses the native `preventScroll` focus option when supported, and otherwise\n * restores the scroll position manually after focusing.\n */\nexport function focusElement(element, apiRef) {\n if (doesSupportPreventScroll()) {\n element.focus({\n preventScroll: true\n });\n } else {\n const scrollPosition = apiRef.current.getScrollPosition();\n element.focus();\n apiRef.current.scroll(scrollPosition);\n }\n}","import { Virtualization } from '@mui/x-virtualizer';\nimport { PinnedColumnPosition } from \"../../internals/constants.mjs\";\nexport function usePinnedScrollOffset(apiRef, pinnedPosition) {\n const store = apiRef.current.virtualizer.store;\n\n // SAFETY: For performance reasons, we only add store selectors for pinned cells in controlled\n // mode. Both pinnedPosition and layoutMode are stable (never change for a given instance),\n // so the hook call order is consistent across renders.\n if (pinnedPosition !== undefined) {\n const layoutMode = store.use(Virtualization.selectors.layoutMode);\n if (layoutMode === 'controlled') {\n if (pinnedPosition === PinnedColumnPosition.LEFT) {\n return store.use(Virtualization.selectors.pinnedLeftOffsetSelector);\n }\n if (pinnedPosition === PinnedColumnPosition.RIGHT) {\n return store.use(Virtualization.selectors.pinnedRightOffsetSelector);\n }\n }\n }\n return 0;\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nexport function computeSlots({\n defaultSlots,\n slots\n}) {\n const overrides = slots;\n if (!overrides || Object.keys(overrides).length === 0) {\n return defaultSlots;\n }\n const result = _extends({}, defaultSlots);\n Object.keys(overrides).forEach(key => {\n const k = key;\n if (overrides[k] !== undefined) {\n result[k] = overrides[k];\n }\n });\n return result;\n}","import { warnOnce } from '@mui/x-internals/warning';\nimport { isNumber } from \"../../utils/utils.mjs\";\nimport { GridSignature } from \"../../constants/signature.mjs\";\nexport const propValidatorsDataGrid = [props => props.autoPageSize && props.autoHeight && ['MUI X: `` are not valid props.', 'You cannot use both the `autoPageSize` and `autoHeight` props at the same time because `autoHeight` scales the height of the Data Grid according to the `pageSize`.', '', 'Please remove one of these two props.'].join('\\n') || undefined, props => props.paginationMode === 'client' && props.paginationMeta != null && ['MUI X: Usage of the `paginationMeta` prop with client-side pagination (`paginationMode=\"client\"`) has no effect.', '`paginationMeta` is only meant to be used with `paginationMode=\"server\"`.'].join('\\n') || undefined, props => props.signature === GridSignature.DataGrid && props.paginationMode === 'client' && isNumber(props.rowCount) && ['MUI X: Usage of the `rowCount` prop with client side pagination (`paginationMode=\"client\"`) has no effect.', '`rowCount` is only meant to be used with `paginationMode=\"server\"`.'].join('\\n') || undefined, props => props.paginationMode === 'server' && props.rowCount == null && !props.dataSource && !props.paginationMeta && [\"MUI X: The `rowCount` prop must be passed using `paginationMode='server'`\", 'For more detail, see http://mui.com/components/data-grid/pagination/#index-based-pagination'].join('\\n') || undefined];\nexport function validateProps(props, validators) {\n if (process.env.NODE_ENV === 'production') {\n return;\n }\n validators.forEach(validator => {\n const message = validator(props);\n if (message) {\n warnOnce(message, 'error');\n }\n });\n}","import { GRID_ROW_GROUPING_SINGLE_GROUPING_FIELD } from \"../constants.mjs\";\nexport const getRowGroupingCriteriaFromGroupingField = groupingColDefField => {\n const match = groupingColDefField.match(/^__row_group_by_columns_group_(.*)__$/);\n if (!match) {\n return null;\n }\n return match[1];\n};\nexport const isGroupingColumn = field => field === GRID_ROW_GROUPING_SINGLE_GROUPING_FIELD || getRowGroupingCriteriaFromGroupingField(field) !== null;","import { PinnedColumnPosition } from \"../internals/constants.mjs\";\nexport const rtlFlipSide = (position, isRtl) => {\n if (!position) {\n return undefined;\n }\n if (!isRtl) {\n if (position === PinnedColumnPosition.LEFT) {\n return 'left';\n }\n if (position === PinnedColumnPosition.RIGHT) {\n return 'right';\n }\n } else {\n if (position === PinnedColumnPosition.LEFT) {\n return 'right';\n }\n if (position === PinnedColumnPosition.RIGHT) {\n return 'left';\n }\n }\n return undefined;\n};","import { rtlFlipSide } from \"../../utils/rtlFlipSide.mjs\";\nexport function attachPinnedStyle(style, isRtl, pinnedPosition, pinnedOffset) {\n const side = rtlFlipSide(pinnedPosition, isRtl);\n if (!side || pinnedOffset === undefined) {\n return style;\n }\n style[side] = pinnedOffset;\n return style;\n}","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"column\", \"row\", \"rowId\", \"rowNode\", \"align\", \"children\", \"colIndex\", \"width\", \"className\", \"style\", \"colSpan\", \"disableDragEvents\", \"isNotVisible\", \"pinnedOffset\", \"pinnedPosition\", \"showRightBorder\", \"showLeftBorder\", \"onClick\", \"onDoubleClick\", \"onMouseDown\", \"onMouseUp\", \"onMouseOver\", \"onKeyDown\", \"onKeyUp\", \"onDragEnter\", \"onDragOver\"],\n _excluded2 = [\"changeReason\", \"unstable_updateValueOnRender\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport useForkRef from '@mui/utils/useForkRef';\nimport composeClasses from '@mui/utils/composeClasses';\nimport ownerDocument from '@mui/utils/ownerDocument';\nimport capitalize from '@mui/utils/capitalize';\nimport { fastMemo } from '@mui/x-internals/fastMemo';\nimport { useRtl } from '@mui/system/RtlProvider';\nimport { forwardRef } from '@mui/x-internals/forwardRef';\nimport { useStore } from '@mui/x-internals/store';\nimport { Rowspan } from '@mui/x-virtualizer';\nimport useEnhancedEffect from '@mui/utils/useEnhancedEffect';\nimport { focusElement } from \"../../utils/focusElement.mjs\";\nimport { getDataGridUtilityClass, gridClasses } from \"../../constants/gridClasses.mjs\";\nimport { GridCellModes } from \"../../models/index.mjs\";\nimport { useGridSelector } from \"../../hooks/utils/useGridSelector.mjs\";\nimport { useGridRootProps } from \"../../hooks/utils/useGridRootProps.mjs\";\nimport { gridFocusCellSelector, gridTabIndexCellSelector } from \"../../hooks/features/focus/gridFocusStateSelector.mjs\";\nimport { PinnedColumnPosition } from \"../../internals/constants.mjs\";\nimport { useGridPrivateApiContext } from \"../../hooks/utils/useGridPrivateApiContext.mjs\";\nimport { usePinnedScrollOffset } from \"../../hooks/utils/usePinnedScrollOffset.mjs\";\nimport { gridEditCellStateSelector } from \"../../hooks/features/editing/gridEditingSelectors.mjs\";\nimport { attachPinnedStyle } from \"../../internals/utils/index.mjs\";\nimport { useGridConfiguration } from \"../../hooks/utils/useGridConfiguration.mjs\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n align,\n showLeftBorder,\n showRightBorder,\n pinnedPosition,\n isEditable,\n isSelected,\n isSelectionMode,\n classes\n } = ownerState;\n const slots = {\n root: ['cell', `cell--text${capitalize(align)}`, isSelected && 'selected', isEditable && 'cell--editable', showLeftBorder && 'cell--withLeftBorder', showRightBorder && 'cell--withRightBorder', pinnedPosition === PinnedColumnPosition.LEFT && 'cell--pinnedLeft', pinnedPosition === PinnedColumnPosition.RIGHT && 'cell--pinnedRight', isSelectionMode && !isEditable && 'cell--selectionMode']\n };\n return composeClasses(slots, getDataGridUtilityClass, classes);\n};\nlet warnedOnce = false;\n\n// TODO(v7): Removing the wrapper will break the docs performance visualization demo.\n\nconst GridCell = forwardRef(function GridCell(props, ref) {\n const {\n column,\n row,\n rowId,\n rowNode,\n align,\n colIndex,\n width,\n className,\n style: styleProp,\n colSpan,\n disableDragEvents,\n isNotVisible,\n pinnedOffset,\n pinnedPosition,\n showRightBorder,\n showLeftBorder,\n onClick,\n onDoubleClick,\n onMouseDown,\n onMouseUp,\n onMouseOver,\n onKeyDown,\n onKeyUp,\n onDragEnter,\n onDragOver\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const apiRef = useGridPrivateApiContext();\n const rootProps = useGridRootProps();\n const isRtl = useRtl();\n const field = column.field;\n const editCellState = useGridSelector(apiRef, gridEditCellStateSelector, {\n rowId,\n field\n });\n const config = useGridConfiguration();\n const cellAggregationResult = config.hooks.useCellAggregationResult(rowId, field);\n const cellMode = editCellState ? GridCellModes.Edit : GridCellModes.View;\n const {\n value: forcedValue,\n formattedValue: forcedFormattedValue\n } = cellAggregationResult || {};\n const cellParams = apiRef.current.getCellParamsForRow(rowId, field, row, {\n colDef: column,\n cellMode,\n rowNode: rowNode,\n tabIndex: useGridSelector(apiRef, () => {\n const cellTabIndex = gridTabIndexCellSelector(apiRef);\n return cellTabIndex && cellTabIndex.field === field && cellTabIndex.id === rowId ? 0 : -1;\n }),\n hasFocus: useGridSelector(apiRef, () => {\n const focus = gridFocusCellSelector(apiRef);\n return focus?.id === rowId && focus.field === field;\n }),\n value: forcedValue,\n formattedValue: forcedFormattedValue\n });\n cellParams.api = apiRef.current;\n\n // Subscribe to changes of the `isCellEditable` API result to ensure cells re-render.\n // We don't use the result.\n // Subscription will trigger a new call of `getCellParamsForRow` above which will recompute the correct value of `isEditable`.\n // This is to ensure both of the following cases work:\n // - https://github.com/mui/mui-x/issues/19732\n // - https://github.com/mui/mui-x/issues/20143\n useGridSelector(apiRef, () => apiRef.current.isCellEditable(cellParams));\n const isSelected = useGridSelector(apiRef, () => apiRef.current.unstable_applyPipeProcessors('isCellSelected', false, {\n id: rowId,\n field\n }));\n const store = apiRef.current.virtualizer.store;\n const hiddenCells = useStore(store, Rowspan.selectors.hiddenCells);\n const spannedCells = useStore(store, Rowspan.selectors.spannedCells);\n const {\n hasFocus,\n isEditable = false,\n value\n } = cellParams;\n const tabIndex = (cellMode === 'view' || !isEditable) && column.type !== 'actions' ? cellParams.tabIndex : -1;\n const {\n classes: rootClasses,\n getCellClassName\n } = rootProps;\n\n // There is a hidden grid state access in `applyPipeProcessor('cellClassName', ...)`\n const pipesClassName = useGridSelector(apiRef, () => apiRef.current.unstable_applyPipeProcessors('cellClassName', [], {\n id: rowId,\n field\n }).filter(Boolean).join(' '));\n const classNames = [pipesClassName];\n if (column.cellClassName) {\n classNames.push(typeof column.cellClassName === 'function' ? column.cellClassName(cellParams) : column.cellClassName);\n }\n if (column.display === 'flex') {\n classNames.push(gridClasses['cell--flex']);\n }\n if (getCellClassName) {\n classNames.push(getCellClassName(cellParams));\n }\n const valueToRender = cellParams.formattedValue ?? value;\n const cellRef = React.useRef(null);\n const handleRef = useForkRef(ref, cellRef);\n const isSelectionMode = rootProps.cellSelection ?? false;\n const ownerState = {\n align,\n showLeftBorder,\n showRightBorder,\n isEditable,\n classes: rootProps.classes,\n pinnedPosition,\n isSelected,\n isSelectionMode\n };\n const classes = useUtilityClasses(ownerState);\n const publishMouseUp = React.useCallback(eventName => event => {\n const params = apiRef.current.getCellParams(rowId, field || '');\n apiRef.current.publishEvent(eventName, params, event);\n if (onMouseUp) {\n onMouseUp(event);\n }\n }, [apiRef, field, onMouseUp, rowId]);\n const publishMouseDown = React.useCallback(eventName => event => {\n const params = apiRef.current.getCellParams(rowId, field || '');\n apiRef.current.publishEvent(eventName, params, event);\n if (onMouseDown) {\n onMouseDown(event);\n }\n }, [apiRef, field, onMouseDown, rowId]);\n const publish = React.useCallback((eventName, propHandler) => event => {\n // The row might have been deleted during the click\n if (!apiRef.current.getRow(rowId)) {\n return;\n }\n const params = apiRef.current.getCellParams(rowId, field || '');\n apiRef.current.publishEvent(eventName, params, event);\n if (propHandler) {\n propHandler(event);\n }\n }, [apiRef, field, rowId]);\n const isCellRowSpanned = hiddenCells[rowId]?.[colIndex] ?? false;\n const rowSpan = spannedCells[rowId]?.[colIndex] ?? 1;\n const pinnedScrollOffset = usePinnedScrollOffset(apiRef, pinnedPosition);\n const style = React.useMemo(() => {\n if (isNotVisible) {\n return {\n padding: 0,\n opacity: 0,\n width: 0,\n height: 0,\n border: 0\n };\n }\n const cellStyle = attachPinnedStyle(_extends({\n '--width': `${width}px`\n }, styleProp), isRtl, pinnedPosition, pinnedOffset !== undefined ? pinnedOffset + pinnedScrollOffset : undefined);\n const isLeftPinned = pinnedPosition === PinnedColumnPosition.LEFT;\n const isRightPinned = pinnedPosition === PinnedColumnPosition.RIGHT;\n if (rowSpan > 1) {\n cellStyle.height = `calc(var(--height) * ${rowSpan})`;\n cellStyle.zIndex = 10;\n if (isLeftPinned || isRightPinned) {\n cellStyle.zIndex = 40;\n }\n }\n return cellStyle;\n }, [width, isNotVisible, styleProp, pinnedOffset, pinnedPosition, pinnedScrollOffset, isRtl, rowSpan]);\n useEnhancedEffect(() => {\n if (!hasFocus || cellMode === GridCellModes.Edit) {\n return;\n }\n const doc = ownerDocument(apiRef.current.rootElementRef.current);\n if (cellRef.current && !cellRef.current.contains(doc.activeElement)) {\n const focusableElement = cellRef.current.querySelector('[tabindex=\"0\"]');\n const elementToFocus = focusableElement || cellRef.current;\n focusElement(elementToFocus, apiRef);\n }\n }, [hasFocus, cellMode, apiRef]);\n if (isCellRowSpanned) {\n return /*#__PURE__*/_jsx(\"div\", {\n \"data-colindex\": colIndex,\n role: \"none\",\n style: _extends({\n width: 'var(--width)'\n }, style)\n });\n }\n let handleFocus = other.onFocus;\n if (process.env.NODE_ENV === 'test' && rootProps.experimentalFeatures?.warnIfFocusStateIsNotSynced) {\n handleFocus = event => {\n const focusedCell = gridFocusCellSelector(apiRef);\n if (focusedCell?.id === rowId && focusedCell.field === field) {\n if (typeof other.onFocus === 'function') {\n other.onFocus(event);\n }\n return;\n }\n if (!warnedOnce) {\n console.warn([`MUI X: The cell with id=${rowId} and field=${field} received focus.`, `According to the state, the focus should be at id=${focusedCell?.id}, field=${focusedCell?.field}.`, \"Not syncing the state may cause unwanted behaviors since the `cellFocusIn` event won't be fired.\", 'Call `fireEvent.mouseUp` before the `fireEvent.click` to sync the focus with the state.'].join('\\n'));\n warnedOnce = true;\n }\n };\n }\n let children;\n let title;\n if (editCellState === null && column.renderCell) {\n children = column.renderCell(cellParams);\n }\n if (editCellState !== null && column.renderEditCell) {\n const updatedRow = apiRef.current.getRowWithUpdatedValues(rowId, column.field);\n\n // eslint-disable-next-line @typescript-eslint/naming-convention\n const editCellStateRest = _objectWithoutPropertiesLoose(editCellState, _excluded2);\n const formattedValue = column.valueFormatter ? column.valueFormatter(editCellState.value, updatedRow, column, apiRef) : cellParams.formattedValue;\n const params = _extends({}, cellParams, {\n row: updatedRow,\n formattedValue\n }, editCellStateRest);\n children = column.renderEditCell(params);\n classNames.push(gridClasses['cell--editing']);\n classNames.push(rootClasses?.['cell--editing']);\n }\n if (children === undefined) {\n const valueString = valueToRender?.toString();\n children = valueString;\n title = valueString;\n }\n const draggableEventHandlers = disableDragEvents ? null : {\n onDragEnter: publish('cellDragEnter', onDragEnter),\n onDragOver: publish('cellDragOver', onDragOver)\n };\n return /*#__PURE__*/_jsx(\"div\", _extends({\n className: clsx(classes.root, classNames, className),\n role: \"gridcell\",\n \"data-field\": field,\n \"data-colindex\": colIndex,\n \"aria-colindex\": colIndex + 1,\n \"aria-colspan\": colSpan,\n \"aria-rowspan\": rowSpan,\n style: style,\n title: title,\n tabIndex: tabIndex,\n onClick: publish('cellClick', onClick),\n onDoubleClick: publish('cellDoubleClick', onDoubleClick),\n onMouseOver: publish('cellMouseOver', onMouseOver),\n onMouseDown: publishMouseDown('cellMouseDown'),\n onMouseUp: publishMouseUp('cellMouseUp'),\n onKeyDown: publish('cellKeyDown', onKeyDown),\n onKeyUp: publish('cellKeyUp', onKeyUp)\n }, draggableEventHandlers, other, {\n onFocus: handleFocus,\n ref: handleRef,\n children: children\n }));\n});\nif (process.env.NODE_ENV !== \"production\") GridCell.displayName = \"GridCell\";\nprocess.env.NODE_ENV !== \"production\" ? GridCell.propTypes /* remove-proptypes */ = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the TypeScript types and run \"pnpm proptypes\" |\n // ----------------------------------------------------------------------\n align: PropTypes.oneOf(['center', 'left', 'right']).isRequired,\n colIndex: PropTypes.number.isRequired,\n colSpan: PropTypes.number,\n column: PropTypes.object.isRequired,\n disableDragEvents: PropTypes.bool,\n isNotVisible: PropTypes.bool.isRequired,\n pinnedOffset: PropTypes.number,\n pinnedPosition: PropTypes.oneOf([0, 1, 2, 3]).isRequired,\n row: PropTypes.object.isRequired,\n rowId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,\n rowNode: PropTypes.object.isRequired,\n showLeftBorder: PropTypes.bool.isRequired,\n showRightBorder: PropTypes.bool.isRequired,\n width: PropTypes.number.isRequired\n} : void 0;\nconst MemoizedGridCell = fastMemo(GridCell);\nexport { MemoizedGridCell as GridCell };","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"field\", \"type\", \"align\", \"width\", \"height\", \"empty\", \"style\", \"className\", \"skeletonProps\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport composeClasses from '@mui/utils/composeClasses';\nimport capitalize from '@mui/utils/capitalize';\nimport { fastMemo } from '@mui/x-internals/fastMemo';\nimport { createRandomNumberGenerator } from \"../../utils/utils.mjs\";\nimport { useGridRootProps } from \"../../hooks/utils/useGridRootProps.mjs\";\nimport { getDataGridUtilityClass } from \"../../constants/gridClasses.mjs\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst CIRCULAR_CONTENT_SIZE = '1.3em';\nconst CONTENT_HEIGHT = '1.2em';\nconst DEFAULT_CONTENT_WIDTH_RANGE = [40, 80];\nconst CONTENT_WIDTH_RANGE_BY_TYPE = {\n number: [40, 60],\n string: [40, 80],\n date: [40, 60],\n dateTime: [60, 80],\n singleSelect: [40, 80]\n};\nconst useUtilityClasses = ownerState => {\n const {\n align,\n classes,\n empty\n } = ownerState;\n const slots = {\n root: ['cell', 'cellSkeleton', `cell--text${align ? capitalize(align) : 'Left'}`, empty && 'cellEmpty']\n };\n return composeClasses(slots, getDataGridUtilityClass, classes);\n};\nconst randomNumberGenerator = createRandomNumberGenerator(12345);\nfunction GridSkeletonCell(props) {\n const {\n field,\n type,\n align,\n width,\n height,\n empty = false,\n style,\n className,\n skeletonProps: skeletonPropsOverride\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const rootProps = useGridRootProps();\n const ownerState = {\n classes: rootProps.classes,\n align,\n empty\n };\n const classes = useUtilityClasses(ownerState);\n\n // Memo prevents the non-circular skeleton widths changing to random widths on every render\n const baseSkeletonProps = React.useMemo(() => {\n const isCircularContent = type === 'boolean' || type === 'actions';\n if (isCircularContent) {\n return {\n variant: 'circular',\n width: CIRCULAR_CONTENT_SIZE,\n height: CIRCULAR_CONTENT_SIZE\n };\n }\n\n // The width of the skeleton is a random number between the min and max values\n // The min and max values are determined by the type of the column\n const [min, max] = type ? CONTENT_WIDTH_RANGE_BY_TYPE[type] ?? DEFAULT_CONTENT_WIDTH_RANGE : DEFAULT_CONTENT_WIDTH_RANGE;\n return {\n variant: 'text',\n width: `${Math.round(randomNumberGenerator(min, max))}%`,\n height: CONTENT_HEIGHT\n };\n }, [type]);\n\n // Merge caller overrides outside the memo so an inline `skeletonProps` object\n // doesn't bust the memo and re-roll the random width on every render\n const skeletonProps = skeletonPropsOverride && Object.keys(skeletonPropsOverride).length > 0 ? _extends({}, baseSkeletonProps, skeletonPropsOverride) : baseSkeletonProps;\n return /*#__PURE__*/_jsx(\"div\", _extends({\n \"data-field\": field,\n className: clsx(classes.root, className),\n style: _extends({\n height,\n maxWidth: width,\n minWidth: width\n }, style)\n }, other, {\n children: !empty && /*#__PURE__*/_jsx(rootProps.slots.baseSkeleton, _extends({}, skeletonProps))\n }));\n}\nprocess.env.NODE_ENV !== \"production\" ? GridSkeletonCell.propTypes /* remove-proptypes */ = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the TypeScript types and run \"pnpm proptypes\" |\n // ----------------------------------------------------------------------\n align: PropTypes.string,\n /**\n * If `true`, the cell will not display the skeleton but still reserve the cell space.\n * @default false\n */\n empty: PropTypes.bool,\n field: PropTypes.string,\n height: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number]),\n skeletonProps: PropTypes.object,\n type: PropTypes.oneOf(['actions', 'boolean', 'custom', 'date', 'dateTime', 'longText', 'multiSelect', 'number', 'singleSelect', 'string']),\n width: PropTypes.oneOfType([PropTypes.number, PropTypes.string])\n} : void 0;\nconst Memoized = fastMemo(GridSkeletonCell);\nexport { Memoized as GridSkeletonCell };","import { useSyncExternalStore } from 'use-sync-external-store/shim';\nconst emptySubscribe = () => () => {};\nconst clientSnapshot = () => false;\nconst serverSnapshot = () => true;\nexport const useIsSSR = () => useSyncExternalStore(emptySubscribe, clientSnapshot, serverSnapshot);","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _formatErrorMessage from \"@mui/x-internals/formatErrorMessage\";\nimport * as React from 'react';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport const GridPanelContext = /*#__PURE__*/React.createContext(undefined);\nif (process.env.NODE_ENV !== \"production\") GridPanelContext.displayName = \"GridPanelContext\";\nexport function useGridPanelContext() {\n const context = React.useContext(GridPanelContext);\n if (context === undefined) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'MUI X: Missing context.' : _formatErrorMessage(61));\n }\n return context;\n}\nexport function GridPanelContextProvider({\n children\n}) {\n const [triggerElements, setTriggerElements] = React.useState({\n columnsPanel: null,\n filterPanel: null,\n aiAssistantPanel: null\n });\n const updateTriggerElement = React.useCallback((key, instance) => {\n setTriggerElements(prev => {\n if (prev[key] === instance) {\n return prev;\n }\n return _extends({}, prev, {\n [key]: instance\n });\n });\n }, []);\n const setColumnsPanelTrigger = React.useCallback(instance => {\n updateTriggerElement('columnsPanel', instance);\n }, [updateTriggerElement]);\n const setFilterPanelTrigger = React.useCallback(instance => {\n updateTriggerElement('filterPanel', instance);\n }, [updateTriggerElement]);\n const setAiAssistantPanelTrigger = React.useCallback(instance => {\n updateTriggerElement('aiAssistantPanel', instance);\n }, [updateTriggerElement]);\n const value = React.useMemo(() => ({\n triggers: {\n columnsPanel: {\n element: triggerElements.columnsPanel,\n setRef: setColumnsPanelTrigger\n },\n filterPanel: {\n element: triggerElements.filterPanel,\n setRef: setFilterPanelTrigger\n },\n aiAssistantPanel: {\n element: triggerElements.aiAssistantPanel,\n setRef: setAiAssistantPanelTrigger\n }\n }\n }), [triggerElements, setColumnsPanelTrigger, setFilterPanelTrigger, setAiAssistantPanelTrigger]);\n return /*#__PURE__*/_jsx(GridPanelContext.Provider, {\n value: value,\n children: children\n });\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport { gridColumnDefinitionsSelector } from \"../../hooks/features/columns/gridColumnsSelector.mjs\";\nimport { useGridSelector } from \"../../hooks/utils/useGridSelector.mjs\";\nimport { gridPreferencePanelStateSelector } from \"../../hooks/features/preferencesPanel/gridPreferencePanelSelector.mjs\";\nimport { GridPreferencePanelsValue } from \"../../hooks/features/preferencesPanel/gridPreferencePanelsValue.mjs\";\nimport { useGridApiContext } from \"../../hooks/utils/useGridApiContext.mjs\";\nimport { useGridRootProps } from \"../../hooks/utils/useGridRootProps.mjs\";\nimport { useGridPanelContext } from \"./GridPanelContext.mjs\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport function GridPreferencesPanel() {\n const apiRef = useGridApiContext();\n const columns = useGridSelector(apiRef, gridColumnDefinitionsSelector);\n const rootProps = useGridRootProps();\n const preferencePanelState = useGridSelector(apiRef, gridPreferencePanelStateSelector);\n const {\n triggers\n } = useGridPanelContext();\n const panelContent = apiRef.current.unstable_applyPipeProcessors('preferencePanel', null, preferencePanelState.openedPanelValue ?? GridPreferencePanelsValue.filters);\n let target = null;\n switch (preferencePanelState.openedPanelValue) {\n case GridPreferencePanelsValue.filters:\n target = triggers.filterPanel.element;\n break;\n case GridPreferencePanelsValue.columns:\n target = triggers.columnsPanel.element;\n break;\n case GridPreferencePanelsValue.aiAssistant:\n target = triggers.aiAssistantPanel.element;\n break;\n default:\n }\n return /*#__PURE__*/_jsx(rootProps.slots.panel, _extends({\n id: preferencePanelState.panelId,\n open: columns.length > 0 && preferencePanelState.open,\n \"aria-labelledby\": preferencePanelState.labelId,\n target: target,\n onClose: () => apiRef.current.hidePreferences()\n }, rootProps.slotProps?.panel, {\n children: panelContent\n }));\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport { useGridRootProps } from \"../hooks/utils/useGridRootProps.mjs\";\nimport { GridPreferencesPanel } from \"./panel/GridPreferencesPanel.mjs\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nexport function GridHeader() {\n const rootProps = useGridRootProps();\n return /*#__PURE__*/_jsxs(React.Fragment, {\n children: [/*#__PURE__*/_jsx(GridPreferencesPanel, {}), rootProps.showToolbar && /*#__PURE__*/_jsx(rootProps.slots.toolbar, _extends({}, rootProps.slotProps?.toolbar))]\n });\n}","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"className\", \"children\", \"sidePanel\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport useForkRef from '@mui/utils/useForkRef';\nimport capitalize from '@mui/utils/capitalize';\nimport composeClasses from '@mui/utils/composeClasses';\nimport { fastMemo } from '@mui/x-internals/fastMemo';\nimport { forwardRef } from '@mui/x-internals/forwardRef';\nimport { GridRootStyles } from \"./GridRootStyles.mjs\";\nimport { useCSSVariablesContext } from \"../../utils/css/context.mjs\";\nimport { useGridSelector } from \"../../hooks/utils/useGridSelector.mjs\";\nimport { useGridPrivateApiContext } from \"../../hooks/utils/useGridPrivateApiContext.mjs\";\nimport { useGridRootProps } from \"../../hooks/utils/useGridRootProps.mjs\";\nimport { getDataGridUtilityClass, gridClasses } from \"../../constants/gridClasses.mjs\";\nimport { gridDensitySelector } from \"../../hooks/features/density/densitySelector.mjs\";\nimport { useIsSSR } from \"../../hooks/utils/useIsSSR.mjs\";\nimport { GridHeader } from \"../GridHeader.mjs\";\nimport { GridBody, GridFooterPlaceholder } from \"../base/index.mjs\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst useUtilityClasses = (ownerState, density) => {\n const {\n autoHeight,\n classes,\n showCellVerticalBorder\n } = ownerState;\n const slots = {\n root: ['root', autoHeight && 'autoHeight', `root--density${capitalize(density)}`, ownerState.slots.toolbar === null && 'root--noToolbar', 'withBorderColor', showCellVerticalBorder && 'withVerticalBorder']\n };\n return composeClasses(slots, getDataGridUtilityClass, classes);\n};\nconst GridRoot = forwardRef(function GridRoot(props, ref) {\n const rootProps = useGridRootProps();\n const {\n className,\n children,\n sidePanel\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const apiRef = useGridPrivateApiContext();\n const density = useGridSelector(apiRef, gridDensitySelector);\n const rootElementRef = apiRef.current.rootElementRef;\n const rootMountCallback = React.useCallback(node => {\n if (node === null) {\n return;\n }\n apiRef.current.publishEvent('rootMount', node);\n }, [apiRef]);\n const handleRef = useForkRef(rootElementRef, ref, rootMountCallback);\n const ownerState = rootProps;\n const classes = useUtilityClasses(ownerState, density);\n const cssVariables = useCSSVariablesContext();\n const isSSR = useIsSSR();\n if (isSSR) {\n return null;\n }\n return /*#__PURE__*/_jsxs(GridRootStyles, _extends({\n className: clsx(classes.root, className, cssVariables.className, sidePanel && gridClasses.withSidePanel),\n ownerState: ownerState\n }, other, {\n ref: handleRef,\n children: [/*#__PURE__*/_jsxs(\"div\", {\n className: gridClasses.mainContent,\n role: \"none\",\n children: [/*#__PURE__*/_jsx(GridHeader, {}), /*#__PURE__*/_jsx(GridBody, {\n children: children\n }), /*#__PURE__*/_jsx(GridFooterPlaceholder, {})]\n }), sidePanel, cssVariables.tag]\n }));\n});\nif (process.env.NODE_ENV !== \"production\") GridRoot.displayName = \"GridRoot\";\nprocess.env.NODE_ENV !== \"production\" ? GridRoot.propTypes /* remove-proptypes */ = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the TypeScript types and run \"pnpm proptypes\" |\n // ----------------------------------------------------------------------\n sidePanel: PropTypes.node,\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])\n} : void 0;\nconst MemoizedGridRoot = fastMemo(GridRoot);\nexport { MemoizedGridRoot as GridRoot };","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"className\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport composeClasses from '@mui/utils/composeClasses';\nimport { styled } from '@mui/system';\nimport { forwardRef } from '@mui/x-internals/forwardRef';\nimport { getDataGridUtilityClass } from \"../../constants/gridClasses.mjs\";\nimport { useGridRootProps } from \"../../hooks/utils/useGridRootProps.mjs\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n classes\n } = ownerState;\n const slots = {\n root: ['footerContainer', 'withBorderColor']\n };\n return composeClasses(slots, getDataGridUtilityClass, classes);\n};\nconst GridFooterContainerRoot = styled('div', {\n name: 'MuiDataGrid',\n slot: 'FooterContainer'\n})({\n display: 'flex',\n justifyContent: 'space-between',\n alignItems: 'center',\n minHeight: 52,\n borderTop: '1px solid'\n});\nconst GridFooterContainer = forwardRef(function GridFooterContainer(props, ref) {\n const {\n className\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const rootProps = useGridRootProps();\n const classes = useUtilityClasses(rootProps);\n return /*#__PURE__*/_jsx(GridFooterContainerRoot, _extends({\n className: clsx(classes.root, className),\n ownerState: rootProps\n }, other, {\n ref: ref\n }));\n});\nif (process.env.NODE_ENV !== \"production\") GridFooterContainer.displayName = \"GridFooterContainer\";\nprocess.env.NODE_ENV !== \"production\" ? GridFooterContainer.propTypes /* remove-proptypes */ = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the TypeScript types and run \"pnpm proptypes\" |\n // ----------------------------------------------------------------------\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])\n} : void 0;\nexport { GridFooterContainer };","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"className\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport composeClasses from '@mui/utils/composeClasses';\nimport { styled } from '@mui/system';\nimport { forwardRef } from '@mui/x-internals/forwardRef';\nimport { vars } from \"../../constants/cssVariables.mjs\";\nimport { getDataGridUtilityClass } from \"../../constants/gridClasses.mjs\";\nimport { useGridRootProps } from \"../../hooks/utils/useGridRootProps.mjs\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n classes\n } = ownerState;\n const slots = {\n root: ['overlay']\n };\n return composeClasses(slots, getDataGridUtilityClass, classes);\n};\nconst GridOverlayRoot = styled('div', {\n name: 'MuiDataGrid',\n slot: 'Overlay'\n})({\n width: '100%',\n height: '100%',\n display: 'flex',\n gap: vars.spacing(1),\n flexDirection: 'column',\n alignSelf: 'center',\n alignItems: 'center',\n justifyContent: 'center',\n textAlign: 'center',\n textWrap: 'balance',\n backgroundColor: vars.colors.background.backdrop\n});\nconst GridOverlay = forwardRef(function GridOverlay(props, ref) {\n const {\n className\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const rootProps = useGridRootProps();\n const classes = useUtilityClasses(rootProps);\n return /*#__PURE__*/_jsx(GridOverlayRoot, _extends({\n className: clsx(classes.root, className),\n ownerState: rootProps\n }, other, {\n ref: ref\n }));\n});\nif (process.env.NODE_ENV !== \"production\") GridOverlay.displayName = \"GridOverlay\";\nprocess.env.NODE_ENV !== \"production\" ? GridOverlay.propTypes /* remove-proptypes */ = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the TypeScript types and run \"pnpm proptypes\" |\n // ----------------------------------------------------------------------\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])\n} : void 0;\nexport { GridOverlay };","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\n/**\n * Resolves the rendering logic for a component.\n * Handles three scenarios:\n * 1. A render function that receives props and state\n * 2. A React element\n * 3. A default element\n *\n * @ignore - internal hook.\n */\nexport function useComponentRenderer(defaultElement, render, props, state = {}) {\n if (typeof render === 'function') {\n return render(props, state);\n }\n if (render) {\n if (render.props.className) {\n props.className = mergeClassNames(render.props.className, props.className);\n }\n if (render.props.style || props.style) {\n props.style = _extends({}, props.style, render.props.style);\n }\n return /*#__PURE__*/React.cloneElement(render, props);\n }\n return /*#__PURE__*/React.createElement(defaultElement, props);\n}\nfunction mergeClassNames(className, otherClassName) {\n if (!className || !otherClassName) {\n return className || otherClassName;\n }\n return `${className} ${otherClassName}`;\n}","'use client';\n\nimport _formatErrorMessage from \"../formatErrorMessage/index.mjs\";\nimport * as React from 'react';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport const ToolbarContext = /*#__PURE__*/React.createContext(undefined);\nif (process.env.NODE_ENV !== \"production\") ToolbarContext.displayName = \"ToolbarContext\";\nexport function useToolbarContext() {\n const context = React.useContext(ToolbarContext);\n if (context === undefined) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'MUI X: Missing context. Toolbar subcomponents must be placed within a component.' : _formatErrorMessage(63));\n }\n return context;\n}\nexport function ToolbarContextProvider({\n children\n}) {\n const [focusableItemId, setFocusableItemId] = React.useState(null);\n const focusableItemIdRef = React.useRef(focusableItemId);\n // The item that currently has real DOM focus, `null` when focus is outside the toolbar.\n const focusedItemIdRef = React.useRef(null);\n const [items, setItems] = React.useState([]);\n const updateFocusableItemId = React.useCallback(id => {\n focusableItemIdRef.current = id;\n setFocusableItemId(id);\n }, []);\n const getSortedItems = React.useCallback(() => items.sort(sortByDocumentPosition), [items]);\n const findEnabledItem = React.useCallback((startIndex, step, wrap = true) => {\n let index = startIndex;\n const sortedItems = getSortedItems();\n const itemCount = sortedItems.length;\n\n // Look for enabled items in the specified direction\n for (let i = 0; i < itemCount; i += 1) {\n index += step;\n\n // Handle wrapping around the ends\n if (index >= itemCount) {\n if (!wrap) {\n return -1;\n }\n index = 0;\n } else if (index < 0) {\n if (!wrap) {\n return -1;\n }\n index = itemCount - 1;\n }\n\n // Return if we found an enabled item\n if (!sortedItems[index].ref.current?.disabled && sortedItems[index].ref.current?.ariaDisabled !== 'true') {\n return index;\n }\n }\n\n // If we've checked all items and found none enabled\n return -1;\n }, [getSortedItems]);\n const registerItem = React.useCallback((id, itemRef) => {\n setItems(prevItems => [...prevItems, {\n id,\n ref: itemRef\n }]);\n }, []);\n const unregisterItem = React.useCallback(id => {\n setItems(prevItems => prevItems.filter(i => i.id !== id));\n }, []);\n const onItemKeyDown = React.useCallback(event => {\n if (!focusableItemId) {\n return;\n }\n const sortedItems = getSortedItems();\n const focusableItemIndex = sortedItems.findIndex(item => item.id === focusableItemId);\n let newIndex = -1;\n if (event.key === 'ArrowRight') {\n event.preventDefault();\n newIndex = findEnabledItem(focusableItemIndex, 1);\n } else if (event.key === 'ArrowLeft') {\n event.preventDefault();\n newIndex = findEnabledItem(focusableItemIndex, -1);\n } else if (event.key === 'Home') {\n event.preventDefault();\n newIndex = findEnabledItem(-1, 1, false);\n } else if (event.key === 'End') {\n event.preventDefault();\n newIndex = findEnabledItem(sortedItems.length, -1, false);\n }\n if (newIndex >= 0 && newIndex < sortedItems.length) {\n const item = sortedItems[newIndex];\n updateFocusableItemId(item.id);\n item.ref.current?.focus();\n }\n }, [getSortedItems, focusableItemId, findEnabledItem, updateFocusableItemId]);\n const onItemFocus = React.useCallback(id => {\n focusedItemIdRef.current = id;\n if (focusableItemId !== id) {\n updateFocusableItemId(id);\n }\n }, [focusableItemId, updateFocusableItemId]);\n const onItemBlur = React.useCallback((id, event) => {\n // When a focused item becomes disabled, the browser blurs it before the\n // `onItemDisabled` effect runs. Keep tracking it as the focused item in that\n // case so `onItemDisabled` can move focus to the next enabled item.\n if (event.currentTarget.disabled) {\n return;\n }\n if (focusedItemIdRef.current === id) {\n focusedItemIdRef.current = null;\n }\n }, []);\n const onItemDisabled = React.useCallback(id => {\n const itemHadFocus = focusedItemIdRef.current === id;\n const itemWasTabStop = focusableItemIdRef.current === id;\n\n // Disabling an item the user is not interacting with must not move focus,\n // and only requires a new tab stop if the disabled item was the tab stop.\n if (!itemHadFocus && !itemWasTabStop) {\n return;\n }\n const sortedItems = getSortedItems();\n const currentIndex = sortedItems.findIndex(item => item.id === id);\n if (currentIndex === -1) {\n return;\n }\n\n // An `aria-disabled` item is still focusable, so real focus can stay where\n // it is. Only a `disabled` item drops focus and needs it restored.\n const focusLost = itemHadFocus && Boolean(sortedItems[currentIndex].ref.current?.disabled);\n const newIndex = findEnabledItem(currentIndex, 1);\n if (newIndex >= 0 && newIndex < sortedItems.length) {\n const item = sortedItems[newIndex];\n updateFocusableItemId(item.id);\n if (focusLost) {\n focusedItemIdRef.current = item.id;\n item.ref.current?.focus();\n }\n } else if (focusLost) {\n // No enabled item to move focus to\n focusedItemIdRef.current = null;\n }\n }, [getSortedItems, findEnabledItem, updateFocusableItemId]);\n React.useEffect(() => {\n const sortedItems = getSortedItems();\n if (sortedItems.length === 0) {\n return;\n }\n\n // Set initial focusable item. A disabled item can't receive focus, so the\n // toolbar would be unreachable with `Tab` if it became the tab stop.\n // Fall back to the first item when every item is disabled.\n if (!focusableItemIdRef.current) {\n const firstEnabledIndex = findEnabledItem(-1, 1, false);\n updateFocusableItemId(sortedItems[firstEnabledIndex === -1 ? 0 : firstEnabledIndex].id);\n return;\n }\n const focusableItemExists = sortedItems.some(item => item.id === focusableItemIdRef.current);\n if (!focusableItemExists) {\n // The tab stop has been removed from the items array, assign it to the last item\n const fallbackItem = sortedItems[sortedItems.length - 1];\n updateFocusableItemId(fallbackItem.id);\n\n // Move real focus only if the removed item had focus\n if (focusedItemIdRef.current !== null && !sortedItems.some(item => item.id === focusedItemIdRef.current)) {\n focusedItemIdRef.current = fallbackItem.id;\n fallbackItem.ref.current?.focus();\n }\n }\n }, [getSortedItems, findEnabledItem, updateFocusableItemId]);\n const contextValue = React.useMemo(() => ({\n focusableItemId,\n registerItem,\n unregisterItem,\n onItemKeyDown,\n onItemFocus,\n onItemBlur,\n onItemDisabled\n }), [focusableItemId, registerItem, unregisterItem, onItemKeyDown, onItemFocus, onItemBlur, onItemDisabled]);\n return /*#__PURE__*/_jsx(ToolbarContext.Provider, {\n value: contextValue,\n children: children\n });\n}\n\n/* eslint-disable no-bitwise */\nfunction sortByDocumentPosition(a, b) {\n if (!a.ref.current || !b.ref.current) {\n return 0;\n }\n const position = a.ref.current.compareDocumentPosition(b.ref.current);\n if (!position) {\n return 0;\n }\n if (position & Node.DOCUMENT_POSITION_FOLLOWING || position & Node.DOCUMENT_POSITION_CONTAINED_BY) {\n return -1;\n }\n if (position & Node.DOCUMENT_POSITION_PRECEDING || position & Node.DOCUMENT_POSITION_CONTAINS) {\n return 1;\n }\n return 0;\n}","'use client';\n\nimport * as React from 'react';\nimport useId from '@mui/utils/useId';\nimport { useToolbarContext } from \"./ToolbarContext.mjs\";\nexport function useRegisterToolbarButton(props, ref) {\n const {\n onKeyDown,\n onFocus,\n onBlur,\n disabled,\n 'aria-disabled': ariaDisabled\n } = props;\n const id = useId();\n const {\n focusableItemId,\n registerItem,\n unregisterItem,\n onItemKeyDown,\n onItemFocus,\n onItemBlur,\n onItemDisabled\n } = useToolbarContext();\n const handleKeyDown = event => {\n onItemKeyDown(event);\n onKeyDown?.(event);\n };\n const handleFocus = event => {\n onItemFocus(id);\n onFocus?.(event);\n };\n const handleBlur = event => {\n onItemBlur(id, event);\n onBlur?.(event);\n };\n React.useEffect(() => {\n registerItem(id, ref);\n return () => unregisterItem(id);\n }, [id, ref, registerItem, unregisterItem]);\n const previousDisabled = React.useRef(disabled);\n React.useEffect(() => {\n if (previousDisabled.current !== disabled && disabled === true) {\n onItemDisabled(id);\n }\n previousDisabled.current = disabled;\n }, [disabled, id, onItemDisabled]);\n const previousAriaDisabled = React.useRef(ariaDisabled);\n React.useEffect(() => {\n if (previousAriaDisabled.current !== ariaDisabled && ariaDisabled === true) {\n onItemDisabled(id);\n }\n previousAriaDisabled.current = ariaDisabled;\n }, [ariaDisabled, id, onItemDisabled]);\n return {\n tabIndex: focusableItemId === id ? 0 : -1,\n disabled,\n 'aria-disabled': ariaDisabled,\n onKeyDown: handleKeyDown,\n onFocus: handleFocus,\n onBlur: handleBlur\n };\n}","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"render\", \"className\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { styled } from '@mui/material/styles';\nimport composeClasses from '@mui/utils/composeClasses';\nimport clsx from 'clsx';\nimport { forwardRef } from '@mui/x-internals/forwardRef';\nimport { useComponentRenderer } from '@mui/x-internals/useComponentRenderer';\nimport { ToolbarContextProvider } from '@mui/x-internals/ToolbarContext';\nimport { vars } from \"../../constants/cssVariables.mjs\";\nimport { getDataGridUtilityClass } from \"../../constants/gridClasses.mjs\";\nimport { useGridRootProps } from \"../../hooks/utils/useGridRootProps.mjs\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n classes\n } = ownerState;\n const slots = {\n root: ['toolbar']\n };\n return composeClasses(slots, getDataGridUtilityClass, classes);\n};\nconst ToolbarRoot = styled('div', {\n name: 'MuiDataGrid',\n slot: 'Toolbar'\n})({\n flex: '0 1 1px',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'end',\n gap: vars.spacing(0.25),\n padding: vars.spacing(0.75),\n minHeight: 52,\n boxSizing: 'border-box',\n borderBottom: `1px solid ${vars.colors.border.base}`\n});\n\n/**\n * The top level Toolbar component that provides context to child components.\n * It renders a styled `
` element.\n *\n * Demos:\n *\n * - [Toolbar](https://mui.com/x/react-data-grid/components/toolbar/)\n *\n * API:\n *\n * - [Toolbar API](https://mui.com/x/api/data-grid/toolbar/)\n */\nconst Toolbar = forwardRef(function Toolbar(props, ref) {\n const {\n render,\n className\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const rootProps = useGridRootProps();\n const classes = useUtilityClasses(rootProps);\n const element = useComponentRenderer(ToolbarRoot, render, _extends({\n role: 'toolbar',\n 'aria-orientation': 'horizontal',\n 'aria-label': rootProps.label || undefined,\n className: clsx(classes.root, className)\n }, other, {\n ref\n }));\n return /*#__PURE__*/_jsx(ToolbarContextProvider, {\n children: element\n });\n});\nif (process.env.NODE_ENV !== \"production\") Toolbar.displayName = \"Toolbar\";\nprocess.env.NODE_ENV !== \"production\" ? Toolbar.propTypes /* remove-proptypes */ = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the TypeScript types and run \"pnpm proptypes\" |\n // ----------------------------------------------------------------------\n /**\n * A function to customize rendering of the component.\n */\n render: PropTypes.oneOfType([PropTypes.element, PropTypes.func])\n} : void 0;\nexport { Toolbar };","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"render\", \"onKeyDown\", \"onFocus\", \"onBlur\", \"disabled\", \"aria-disabled\"],\n _excluded2 = [\"tabIndex\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport useForkRef from '@mui/utils/useForkRef';\nimport { forwardRef } from '@mui/x-internals/forwardRef';\nimport { useComponentRenderer } from '@mui/x-internals/useComponentRenderer';\nimport { useRegisterToolbarButton } from '@mui/x-internals/ToolbarContext';\nimport { useGridRootProps } from \"../../hooks/utils/useGridRootProps.mjs\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\n/**\n * A button for performing actions from the toolbar.\n * It renders the `baseIconButton` slot.\n *\n * Demos:\n *\n * - [Toolbar](https://mui.com/x/react-data-grid/components/toolbar/)\n *\n * API:\n *\n * - [ToolbarButton API](https://mui.com/x/api/data-grid/toolbar-button/)\n */\nconst ToolbarButton = forwardRef(function ToolbarButton(props, ref) {\n const {\n render\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const rootProps = useGridRootProps();\n const buttonRef = React.useRef(null);\n const handleRef = useForkRef(buttonRef, ref);\n const _useRegisterToolbarBu = useRegisterToolbarButton(props, buttonRef),\n {\n tabIndex\n } = _useRegisterToolbarBu,\n toolbarButtonProps = _objectWithoutPropertiesLoose(_useRegisterToolbarBu, _excluded2);\n const element = useComponentRenderer(rootProps.slots.baseIconButton, render, _extends({}, rootProps.slotProps?.baseIconButton, {\n tabIndex\n }, other, toolbarButtonProps, {\n ref: handleRef\n }));\n return /*#__PURE__*/_jsx(React.Fragment, {\n children: element\n });\n});\nif (process.env.NODE_ENV !== \"production\") ToolbarButton.displayName = \"ToolbarButton\";\nprocess.env.NODE_ENV !== \"production\" ? ToolbarButton.propTypes /* remove-proptypes */ = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the TypeScript types and run \"pnpm proptypes\" |\n // ----------------------------------------------------------------------\n className: PropTypes.string,\n color: PropTypes.oneOf(['default', 'inherit', 'primary']),\n disabled: PropTypes.bool,\n edge: PropTypes.oneOf(['end', 'start', false]),\n id: PropTypes.string,\n label: PropTypes.string,\n /**\n * A function to customize rendering of the component.\n */\n render: PropTypes.oneOfType([PropTypes.element, PropTypes.func]),\n role: PropTypes.string,\n size: PropTypes.oneOf(['large', 'medium', 'small']),\n style: PropTypes.object,\n tabIndex: PropTypes.number,\n title: PropTypes.string,\n touchRippleRef: PropTypes.any\n} : void 0;\nexport { ToolbarButton };","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"className\", \"children\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { styled } from '@mui/system';\nimport composeClasses from '@mui/utils/composeClasses';\nimport { forwardRef } from '@mui/x-internals/forwardRef';\nimport { vars } from \"../../constants/cssVariables.mjs\";\nimport { getDataGridUtilityClass } from \"../../constants/gridClasses.mjs\";\nimport { useGridRootProps } from \"../../hooks/utils/useGridRootProps.mjs\";\nimport { Toolbar } from \"../toolbarV8/index.mjs\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n classes\n } = ownerState;\n const slots = {\n root: ['toolbarContainer']\n };\n return composeClasses(slots, getDataGridUtilityClass, classes);\n};\nconst GridToolbarContainerRoot = styled(Toolbar, {\n name: 'MuiDataGrid',\n slot: 'ToolbarContainer',\n shouldForwardProp: prop => prop !== 'ownerState'\n})({\n display: 'flex',\n alignItems: 'center',\n flexWrap: 'wrap',\n gap: vars.spacing(1),\n padding: vars.spacing(0.5),\n minHeight: 'auto'\n});\n\n/**\n * @deprecated Use the {@link https://mui.com/x/react-data-grid/components/toolbar/ Toolbar} component instead. This component will be removed in a future major release.\n */\nconst GridToolbarContainer = forwardRef(function GridToolbarContainer(props, ref) {\n const {\n className,\n children\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const rootProps = useGridRootProps();\n const classes = useUtilityClasses(rootProps);\n if (!children) {\n return null;\n }\n return /*#__PURE__*/_jsx(GridToolbarContainerRoot, _extends({\n className: clsx(classes.root, className),\n ownerState: rootProps\n }, other, {\n ref: ref,\n children: children\n }));\n});\nif (process.env.NODE_ENV !== \"production\") GridToolbarContainer.displayName = \"GridToolbarContainer\";\nprocess.env.NODE_ENV !== \"production\" ? GridToolbarContainer.propTypes /* remove-proptypes */ = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the TypeScript types and run \"pnpm proptypes\" |\n // ----------------------------------------------------------------------\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])\n} : void 0;\nexport { GridToolbarContainer };","import _extends from \"@babel/runtime/helpers/esm/extends\";\n/**\n * Returns the list of column menu item keys (sorted by `displayOrder`) that should be rendered for a given column.\n * This is shared between the column header (to know if menu is empty) and the menu itself (to render items).\n */\nexport function getColumnMenuItemKeys(params) {\n const {\n apiRef,\n colDef,\n defaultSlots,\n defaultSlotProps,\n slots = {},\n slotProps = {}\n } = params;\n const processedComponents = _extends({}, defaultSlots, slots);\n let processedSlotProps = defaultSlotProps;\n if (slotProps && Object.keys(slotProps).length > 0) {\n const mergedProps = _extends({}, slotProps);\n Object.entries(defaultSlotProps).forEach(([key, currentSlotProps]) => {\n mergedProps[key] = _extends({}, currentSlotProps, slotProps[key] || {});\n });\n processedSlotProps = mergedProps;\n }\n const defaultItems = apiRef.current.unstable_applyPipeProcessors('columnMenu', [], colDef);\n const defaultComponentKeys = Object.keys(defaultSlots);\n const userItems = Object.keys(slots).filter(key => !defaultComponentKeys.includes(key));\n const uniqueItems = Array.from(new Set([...defaultItems, ...userItems]));\n const cleansedItems = uniqueItems.filter(key => processedComponents[key] != null);\n return cleansedItems.sort((a, b) => {\n const leftItemProps = processedSlotProps[a];\n const rightItemProps = processedSlotProps[b];\n const leftDisplayOrder = Number.isFinite(leftItemProps?.displayOrder) ? leftItemProps.displayOrder : 100;\n const rightDisplayOrder = Number.isFinite(rightItemProps?.displayOrder) ? rightItemProps.displayOrder : 100;\n return leftDisplayOrder - rightDisplayOrder;\n });\n}","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport composeClasses from '@mui/utils/composeClasses';\nimport { useGridApiContext } from \"../../hooks/utils/useGridApiContext.mjs\";\nimport { getDataGridUtilityClass } from \"../../constants/gridClasses.mjs\";\nimport { useGridRootProps } from \"../../hooks/utils/useGridRootProps.mjs\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n open\n } = ownerState;\n const slots = {\n root: ['menuIcon', open && 'menuOpen'],\n button: ['menuIconButton']\n };\n return composeClasses(slots, getDataGridUtilityClass, classes);\n};\nexport const ColumnHeaderMenuIcon = /*#__PURE__*/React.memo(props => {\n const {\n colDef,\n open,\n columnMenuId,\n columnMenuButtonId,\n iconButtonRef\n } = props;\n const apiRef = useGridApiContext();\n const rootProps = useGridRootProps();\n const ownerState = _extends({}, props, {\n classes: rootProps.classes\n });\n const classes = useUtilityClasses(ownerState);\n const handleMenuIconClick = React.useCallback(event => {\n event.preventDefault();\n event.stopPropagation();\n apiRef.current.toggleColumnMenu(colDef.field);\n }, [apiRef, colDef.field]);\n const columnName = colDef.headerName ?? colDef.field;\n return /*#__PURE__*/_jsx(\"div\", {\n className: classes.root,\n children: /*#__PURE__*/_jsx(rootProps.slots.baseTooltip, _extends({\n title: apiRef.current.getLocaleText('columnMenuLabel'),\n enterDelay: 1000\n }, rootProps.slotProps?.baseTooltip, {\n children: /*#__PURE__*/_jsx(rootProps.slots.baseIconButton, _extends({\n ref: iconButtonRef,\n tabIndex: -1,\n className: classes.button,\n \"aria-label\": apiRef.current.getLocaleText('columnMenuAriaLabel')(columnName),\n size: \"small\",\n onClick: handleMenuIconClick,\n \"aria-haspopup\": \"menu\",\n \"aria-expanded\": open,\n \"aria-controls\": open ? columnMenuId : undefined,\n id: columnMenuButtonId\n }, rootProps.slotProps?.baseIconButton, {\n children: /*#__PURE__*/_jsx(rootProps.slots.columnMenuIcon, {\n fontSize: \"inherit\"\n })\n }))\n }))\n });\n});\nif (process.env.NODE_ENV !== \"production\") ColumnHeaderMenuIcon.displayName = \"ColumnHeaderMenuIcon\";","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport useEventCallback from '@mui/utils/useEventCallback';\nimport HTMLElementType from '@mui/utils/HTMLElementType';\nimport { useGridApiContext } from \"../../../hooks/utils/useGridApiContext.mjs\";\nimport { GridMenu } from \"../GridMenu.mjs\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction GridColumnHeaderMenu({\n columnMenuId,\n columnMenuButtonId,\n ContentComponent,\n contentComponentProps,\n field,\n open,\n target,\n onExited\n}) {\n const apiRef = useGridApiContext();\n const colDef = apiRef.current.getColumn(field);\n const hideMenu = useEventCallback(event => {\n if (event) {\n // Prevent triggering the sorting\n event.stopPropagation();\n if (target?.contains(event.target)) {\n return;\n }\n }\n apiRef.current.hideColumnMenu();\n });\n if (!target || !colDef) {\n return null;\n }\n return /*#__PURE__*/_jsx(GridMenu, {\n position: `bottom-${colDef.align === 'right' ? 'start' : 'end'}`,\n open: open,\n target: target,\n onClose: hideMenu,\n onExited: onExited,\n children: /*#__PURE__*/_jsx(ContentComponent, _extends({\n colDef: colDef,\n hideMenu: hideMenu,\n open: open,\n id: columnMenuId,\n labelledby: columnMenuButtonId\n }, contentComponentProps))\n });\n}\nprocess.env.NODE_ENV !== \"production\" ? GridColumnHeaderMenu.propTypes /* remove-proptypes */ = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the TypeScript types and run \"pnpm proptypes\" |\n // ----------------------------------------------------------------------\n columnMenuButtonId: PropTypes.string,\n columnMenuId: PropTypes.string,\n ContentComponent: PropTypes.elementType.isRequired,\n contentComponentProps: PropTypes.any,\n field: PropTypes.string.isRequired,\n onExited: PropTypes.func,\n open: PropTypes.bool.isRequired,\n target: HTMLElementType\n} : void 0;\nexport { GridColumnHeaderMenu };","import _formatErrorMessage from \"@mui/x-internals/formatErrorMessage\";\nimport { gridClasses } from \"../constants/gridClasses.mjs\";\nexport function isOverflown(element) {\n return element.scrollHeight > element.clientHeight || element.scrollWidth > element.clientWidth;\n}\nexport function findParentElementFromClassName(elem, className) {\n return elem.closest(`.${className}`);\n}\n\n// TODO, eventually replaces this function with CSS.escape, once available in jsdom, either added manually or built in\n// https://github.com/jsdom/jsdom/issues/1550#issuecomment-236734471\nexport function escapeOperandAttributeSelector(operand) {\n return operand.replace(/[\"\\\\]/g, '\\\\$&');\n}\nexport function getGridColumnHeaderElement(root, field) {\n return root.querySelector(`[role=\"columnheader\"][data-field=\"${escapeOperandAttributeSelector(field)}\"]`);\n}\nfunction getGridRowElementSelector(id) {\n return `.${gridClasses.row}[data-id=\"${escapeOperandAttributeSelector(String(id))}\"]`;\n}\nexport function getGridRowElement(root, id) {\n return root.querySelector(getGridRowElementSelector(id));\n}\nexport function getGridCellElement(root, {\n id,\n field\n}) {\n const rowSelector = getGridRowElementSelector(id);\n const cellSelector = `.${gridClasses.cell}[data-field=\"${escapeOperandAttributeSelector(field)}\"]`;\n const selector = `${rowSelector} ${cellSelector}`;\n return root.querySelector(selector);\n}\n\n// https://www.abeautifulsite.net/posts/finding-the-active-element-in-a-shadow-root/\nexport const getActiveElement = (root = document) => {\n const activeEl = root.activeElement;\n if (!activeEl) {\n return null;\n }\n if (activeEl.shadowRoot) {\n return getActiveElement(activeEl.shadowRoot);\n }\n return activeEl;\n};\nexport function isEventTargetInPortal(event) {\n if (\n // The target is not an element when triggered by a Select inside the cell\n // See https://github.com/mui/material-ui/issues/10534\n event.target.nodeType === 1 && !event.currentTarget.contains(event.target)) {\n return true;\n }\n return false;\n}\nexport function getFieldFromHeaderElem(colCellEl) {\n return colCellEl.getAttribute('data-field');\n}\nexport function findHeaderElementFromField(elem, field) {\n return elem.querySelector(`[data-field=\"${escapeOperandAttributeSelector(field)}\"]`);\n}\nexport function getFieldsFromGroupHeaderElem(colCellEl) {\n return colCellEl.getAttribute('data-fields').slice(2, -2).split('-|-');\n}\nexport function findGroupHeaderElementsFromField(elem, field) {\n return Array.from(elem.querySelectorAll(`[data-fields*=\"|-${escapeOperandAttributeSelector(field)}-|\"]`) ?? []);\n}\nexport function findGridCellElementsFromCol(col, api) {\n const root = findParentElementFromClassName(col, gridClasses.root);\n if (!root) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'MUI X: The root element is not found.' : _formatErrorMessage(58));\n }\n const ariaColIndex = col.getAttribute('aria-colindex');\n if (!ariaColIndex) {\n return [];\n }\n const colIndex = Number(ariaColIndex) - 1;\n const cells = [];\n if (!api.virtualScrollerRef?.current) {\n return [];\n }\n queryRows(api).forEach(rowElement => {\n const rowId = rowElement.getAttribute('data-id');\n if (!rowId) {\n return;\n }\n let columnIndex = colIndex;\n const cellColSpanInfo = api.unstable_getCellColSpanInfo(rowId, colIndex);\n if (cellColSpanInfo && cellColSpanInfo.spannedByColSpan) {\n columnIndex = cellColSpanInfo.leftVisibleCellIndex;\n }\n const cell = rowElement.querySelector(`[data-colindex=\"${columnIndex}\"]`);\n if (cell) {\n cells.push(cell);\n }\n });\n return cells;\n}\nexport function findGridElement(api, klass) {\n return api.rootElementRef.current.querySelector(`.${gridClasses[klass]}`);\n}\nconst findPinnedCells = ({\n api,\n colIndex,\n position,\n filterFn\n}) => {\n if (colIndex === null) {\n return [];\n }\n const cells = [];\n queryRows(api).forEach(rowElement => {\n const rowId = rowElement.getAttribute('data-id');\n if (!rowId) {\n return;\n }\n rowElement.querySelectorAll(`.${gridClasses[position === 'left' ? 'cell--pinnedLeft' : 'cell--pinnedRight']}`).forEach(cell => {\n const currentColIndex = parseCellColIndex(cell);\n if (currentColIndex !== null && filterFn(currentColIndex)) {\n cells.push(cell);\n }\n });\n });\n return cells;\n};\nexport function findLeftPinnedCellsAfterCol(api, col, isRtl) {\n const colIndex = parseCellColIndex(col);\n return findPinnedCells({\n api,\n colIndex,\n position: isRtl ? 'right' : 'left',\n filterFn: index => isRtl ? index < colIndex : index > colIndex\n });\n}\nexport function findRightPinnedCellsBeforeCol(api, col, isRtl) {\n const colIndex = parseCellColIndex(col);\n return findPinnedCells({\n api,\n colIndex,\n position: isRtl ? 'left' : 'right',\n filterFn: index => isRtl ? index > colIndex : index < colIndex\n });\n}\nconst findPinnedHeaders = ({\n api,\n colIndex,\n position,\n filterFn\n}) => {\n if (!api.columnHeadersContainerRef?.current) {\n return [];\n }\n if (colIndex === null) {\n return [];\n }\n const elements = [];\n api.columnHeadersContainerRef.current.querySelectorAll(`.${gridClasses[position === 'left' ? 'columnHeader--pinnedLeft' : 'columnHeader--pinnedRight']}`).forEach(element => {\n const currentColIndex = parseCellColIndex(element);\n if (currentColIndex !== null && filterFn(currentColIndex, element)) {\n elements.push(element);\n }\n });\n return elements;\n};\nexport function findLeftPinnedHeadersAfterCol(api, col, isRtl) {\n const colIndex = parseCellColIndex(col);\n return findPinnedHeaders({\n api,\n position: isRtl ? 'right' : 'left',\n colIndex,\n filterFn: index => isRtl ? index < colIndex : index > colIndex\n });\n}\nexport function findRightPinnedHeadersBeforeCol(api, col, isRtl) {\n const colIndex = parseCellColIndex(col);\n return findPinnedHeaders({\n api,\n position: isRtl ? 'left' : 'right',\n colIndex,\n filterFn: (index, element) => {\n if (element.classList.contains(gridClasses['columnHeader--last'])) {\n return false;\n }\n return isRtl ? index > colIndex : index < colIndex;\n }\n });\n}\nexport function findGridHeader(api, field) {\n const headers = api.columnHeadersContainerRef.current;\n return headers.querySelector(`:scope > div > [data-field=\"${escapeOperandAttributeSelector(field)}\"][role=\"columnheader\"]`);\n}\nexport function findGridHeaderFilter(api, field) {\n const headers = api.columnHeadersContainerRef.current;\n return headers.querySelector(`:scope > .${gridClasses.headerFilterRow} > [data-field=\"${escapeOperandAttributeSelector(field)}\"]`);\n}\nexport function findGridCells(api, field) {\n const container = api.virtualScrollerRef.current;\n return Array.from(container.querySelectorAll(`:scope > div > div > div > div > [data-field=\"${escapeOperandAttributeSelector(field)}\"][role=\"gridcell\"]`));\n}\nfunction queryRows(api) {\n return api.virtualScrollerRef.current.querySelectorAll(\n // Use > to ignore rows from nested Data Grids (for example in detail panel)\n `:scope > div > div > div > .${gridClasses.row},\n :scope > div > div > div > div > .${gridClasses.row}`);\n}\nfunction parseCellColIndex(col) {\n const ariaColIndex = col.getAttribute('aria-colindex');\n if (!ariaColIndex) {\n return null;\n }\n return Number(ariaColIndex) - 1;\n}","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"className\", \"aria-label\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport composeClasses from '@mui/utils/composeClasses';\nimport { styled } from '@mui/material/styles';\nimport { forwardRef } from '@mui/x-internals/forwardRef';\nimport { isOverflown } from \"../../utils/domUtils.mjs\";\nimport { getDataGridUtilityClass } from \"../../constants/gridClasses.mjs\";\nimport { useGridRootProps } from \"../../hooks/utils/useGridRootProps.mjs\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n classes\n } = ownerState;\n const slots = {\n root: ['columnHeaderTitle']\n };\n return composeClasses(slots, getDataGridUtilityClass, classes);\n};\nconst GridColumnHeaderTitleRoot = styled('div', {\n name: 'MuiDataGrid',\n slot: 'ColumnHeaderTitle'\n})({\n textOverflow: 'ellipsis',\n overflow: 'hidden',\n whiteSpace: 'nowrap',\n fontWeight: 'var(--unstable_DataGrid-headWeight)',\n lineHeight: 'normal'\n});\nconst ColumnHeaderInnerTitle = forwardRef(function ColumnHeaderInnerTitle(props, ref) {\n // Tooltip adds aria-label to the props, which is not needed since the children prop is a string\n // See https://github.com/mui/mui-x/pull/14482\n const {\n className\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const rootProps = useGridRootProps();\n const classes = useUtilityClasses(rootProps);\n return /*#__PURE__*/_jsx(GridColumnHeaderTitleRoot, _extends({\n className: clsx(classes.root, className),\n ownerState: rootProps\n }, other, {\n ref: ref\n }));\n});\nif (process.env.NODE_ENV !== \"production\") ColumnHeaderInnerTitle.displayName = \"ColumnHeaderInnerTitle\";\n// No React.memo here as if we display the sort icon, we need to recalculate the isOver\nfunction GridColumnHeaderTitle(props) {\n const {\n label,\n description\n } = props;\n const rootProps = useGridRootProps();\n const titleRef = React.useRef(null);\n const [tooltip, setTooltip] = React.useState('');\n const handleMouseOver = React.useCallback(() => {\n if (!description && titleRef?.current) {\n const isOver = isOverflown(titleRef.current);\n if (isOver) {\n setTooltip(label);\n } else {\n setTooltip('');\n }\n }\n }, [description, label]);\n return /*#__PURE__*/_jsx(rootProps.slots.baseTooltip, _extends({\n title: description || tooltip\n }, rootProps.slotProps?.baseTooltip, {\n children: /*#__PURE__*/_jsx(ColumnHeaderInnerTitle, {\n onMouseOver: handleMouseOver,\n ref: titleRef,\n children: label\n })\n }));\n}\nprocess.env.NODE_ENV !== \"production\" ? GridColumnHeaderTitle.propTypes /* remove-proptypes */ = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the TypeScript types and run \"pnpm proptypes\" |\n // ----------------------------------------------------------------------\n columnWidth: PropTypes.number.isRequired,\n description: PropTypes.node,\n label: PropTypes.string.isRequired\n} : void 0;\nexport { GridColumnHeaderTitle };","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"resizable\", \"resizing\", \"height\", \"side\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport composeClasses from '@mui/utils/composeClasses';\nimport capitalize from '@mui/utils/capitalize';\nimport { getDataGridUtilityClass } from \"../../constants/gridClasses.mjs\";\nimport { useGridRootProps } from \"../../hooks/utils/useGridRootProps.mjs\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nvar GridColumnHeaderSeparatorSides = /*#__PURE__*/function (GridColumnHeaderSeparatorSides) {\n GridColumnHeaderSeparatorSides[\"Left\"] = \"left\";\n GridColumnHeaderSeparatorSides[\"Right\"] = \"right\";\n return GridColumnHeaderSeparatorSides;\n}(GridColumnHeaderSeparatorSides || {});\nconst useUtilityClasses = ownerState => {\n const {\n resizable,\n resizing,\n classes,\n side\n } = ownerState;\n const slots = {\n root: ['columnSeparator', resizable && 'columnSeparator--resizable', resizing && 'columnSeparator--resizing', side && `columnSeparator--side${capitalize(side)}`],\n icon: ['iconSeparator']\n };\n return composeClasses(slots, getDataGridUtilityClass, classes);\n};\nfunction GridColumnHeaderSeparatorRaw(props) {\n const {\n height,\n side = GridColumnHeaderSeparatorSides.Right\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const rootProps = useGridRootProps();\n const ownerState = _extends({}, props, {\n side,\n classes: rootProps.classes\n });\n const classes = useUtilityClasses(ownerState);\n const stopClick = React.useCallback(event => {\n event.preventDefault();\n event.stopPropagation();\n }, []);\n return (\n /*#__PURE__*/\n // eslint-disable-next-line jsx-a11y/click-events-have-key-events,jsx-a11y/no-static-element-interactions\n _jsx(\"div\", _extends({\n className: classes.root,\n style: {\n minHeight: height\n }\n }, other, {\n onClick: stopClick,\n children: /*#__PURE__*/_jsx(rootProps.slots.columnResizeIcon, {\n className: classes.icon\n })\n }))\n );\n}\nconst GridColumnHeaderSeparator = /*#__PURE__*/React.memo(GridColumnHeaderSeparatorRaw);\nif (process.env.NODE_ENV !== \"production\") GridColumnHeaderSeparator.displayName = \"GridColumnHeaderSeparator\";\nprocess.env.NODE_ENV !== \"production\" ? GridColumnHeaderSeparatorRaw.propTypes /* remove-proptypes */ = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the TypeScript types and run \"pnpm proptypes\" |\n // ----------------------------------------------------------------------\n height: PropTypes.number.isRequired,\n resizable: PropTypes.bool.isRequired,\n resizing: PropTypes.bool.isRequired,\n side: PropTypes.oneOf(['left', 'right'])\n} : void 0;\nexport { GridColumnHeaderSeparator, GridColumnHeaderSeparatorSides };","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"classes\", \"columnMenuOpen\", \"colIndex\", \"height\", \"isResizing\", \"sortDirection\", \"hasFocus\", \"tabIndex\", \"separatorSide\", \"isDraggable\", \"headerComponent\", \"description\", \"elementId\", \"width\", \"columnMenuIconButton\", \"columnMenu\", \"columnTitleIconButtons\", \"headerClassName\", \"label\", \"resizable\", \"draggableContainerProps\", \"columnHeaderSeparatorProps\", \"style\"];\nimport * as React from 'react';\nimport clsx from 'clsx';\nimport useForkRef from '@mui/utils/useForkRef';\nimport { forwardRef } from '@mui/x-internals/forwardRef';\nimport { GridColumnHeaderTitle } from \"./GridColumnHeaderTitle.mjs\";\nimport { GridColumnHeaderSeparator } from \"./GridColumnHeaderSeparator.mjs\";\nimport { useGridRootProps } from \"../../hooks/utils/useGridRootProps.mjs\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst GridGenericColumnHeaderItem = forwardRef(function GridGenericColumnHeaderItem(props, ref) {\n const {\n classes,\n colIndex,\n height,\n isResizing,\n sortDirection,\n tabIndex,\n separatorSide,\n isDraggable,\n headerComponent,\n description,\n width,\n columnMenuIconButton = null,\n columnMenu = null,\n columnTitleIconButtons = null,\n headerClassName,\n label,\n resizable,\n draggableContainerProps,\n columnHeaderSeparatorProps,\n style\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const rootProps = useGridRootProps();\n const headerCellRef = React.useRef(null);\n const handleRef = useForkRef(headerCellRef, ref);\n let ariaSort = 'none';\n if (sortDirection != null) {\n ariaSort = sortDirection === 'asc' ? 'ascending' : 'descending';\n }\n return /*#__PURE__*/_jsxs(\"div\", _extends({\n className: clsx(classes.root, headerClassName),\n style: _extends({}, style, {\n width\n }),\n role: \"columnheader\",\n tabIndex: tabIndex,\n \"aria-colindex\": colIndex + 1,\n \"aria-sort\": ariaSort\n }, other, {\n ref: handleRef,\n children: [/*#__PURE__*/_jsxs(\"div\", _extends({\n className: classes.draggableContainer,\n draggable: isDraggable,\n role: \"none\"\n }, draggableContainerProps, {\n children: [/*#__PURE__*/_jsxs(\"div\", {\n className: classes.titleContainer,\n role: \"none\",\n children: [/*#__PURE__*/_jsx(\"div\", {\n className: classes.titleContainerContent,\n children: headerComponent !== undefined ? headerComponent : /*#__PURE__*/_jsx(GridColumnHeaderTitle, {\n label: label,\n description: description,\n columnWidth: width\n })\n }), columnTitleIconButtons]\n }), columnMenuIconButton]\n })), /*#__PURE__*/_jsx(GridColumnHeaderSeparator, _extends({\n resizable: !rootProps.disableColumnResize && !!resizable,\n resizing: isResizing,\n height: height,\n side: separatorSide\n }, columnHeaderSeparatorProps)), columnMenu]\n }));\n});\nif (process.env.NODE_ENV !== \"production\") GridGenericColumnHeaderItem.displayName = \"GridGenericColumnHeaderItem\";\nexport { GridGenericColumnHeaderItem };","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport composeClasses from '@mui/utils/composeClasses';\nimport capitalize from '@mui/utils/capitalize';\nimport useId from '@mui/utils/useId';\nimport { fastMemo } from '@mui/x-internals/fastMemo';\nimport { useRtl } from '@mui/system/RtlProvider';\nimport { focusElement } from \"../../utils/focusElement.mjs\";\nimport { useGridPrivateApiContext } from \"../../hooks/utils/useGridPrivateApiContext.mjs\";\nimport { getColumnMenuItemKeys } from \"../../hooks/features/columnMenu/getColumnMenuItemKeys.mjs\";\nimport { ColumnHeaderMenuIcon } from \"./ColumnHeaderMenuIcon.mjs\";\nimport { GridColumnHeaderMenu } from \"../menu/columnMenu/GridColumnHeaderMenu.mjs\";\nimport { gridClasses, getDataGridUtilityClass } from \"../../constants/gridClasses.mjs\";\nimport { useGridRootProps } from \"../../hooks/utils/useGridRootProps.mjs\";\nimport { GridGenericColumnHeaderItem } from \"./GridGenericColumnHeaderItem.mjs\";\nimport { isEventTargetInPortal } from \"../../utils/domUtils.mjs\";\nimport { PinnedColumnPosition } from \"../../internals/constants.mjs\";\nimport { attachPinnedStyle } from \"../../internals/utils/index.mjs\";\nimport { usePinnedScrollOffset } from \"../../hooks/utils/usePinnedScrollOffset.mjs\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n disableColumnSorting\n } = useGridRootProps();\n const {\n colDef,\n classes,\n isDragging,\n sortDirection,\n showRightBorder,\n showLeftBorder,\n filterItemsCounter,\n pinnedPosition,\n isSiblingFocused\n } = ownerState;\n const isColumnSortable = colDef.sortable && !disableColumnSorting;\n const isColumnSorted = sortDirection != null;\n const isColumnFiltered = filterItemsCounter != null && filterItemsCounter > 0;\n // todo refactor to a prop on col isNumeric or ?? ie: coltype===price wont work\n const isColumnNumeric = colDef.type === 'number';\n const slots = {\n root: ['columnHeader', colDef.headerAlign && `columnHeader--align${capitalize(colDef.headerAlign)}`, isColumnSortable && 'columnHeader--sortable', isDragging && 'columnHeader--moving', isColumnSorted && 'columnHeader--sorted', isColumnFiltered && 'columnHeader--filtered', isColumnNumeric && 'columnHeader--numeric', 'withBorderColor', showRightBorder && 'columnHeader--withRightBorder', showLeftBorder && 'columnHeader--withLeftBorder', pinnedPosition === PinnedColumnPosition.LEFT && 'columnHeader--pinnedLeft', pinnedPosition === PinnedColumnPosition.RIGHT && 'columnHeader--pinnedRight',\n // TODO: Remove classes below and restore `:has` selectors when they are supported in jsdom\n // See https://github.com/mui/mui-x/pull/14559\n isSiblingFocused && 'columnHeader--siblingFocused'],\n draggableContainer: ['columnHeaderDraggableContainer'],\n titleContainer: ['columnHeaderTitleContainer'],\n titleContainerContent: ['columnHeaderTitleContainerContent']\n };\n return composeClasses(slots, getDataGridUtilityClass, classes);\n};\nfunction GridColumnHeaderItem(props) {\n const {\n colDef,\n columnMenuOpen,\n colIndex,\n headerHeight,\n isResizing,\n isLast,\n sortDirection,\n sortIndex,\n filterItemsCounter,\n hasFocus,\n tabIndex,\n disableReorder,\n separatorSide,\n showLeftBorder,\n showRightBorder,\n pinnedPosition,\n pinnedOffset\n } = props;\n const apiRef = useGridPrivateApiContext();\n const rootProps = useGridRootProps();\n const isRtl = useRtl();\n const headerCellRef = React.useRef(null);\n const columnMenuId = useId();\n const columnMenuButtonId = useId();\n const iconButtonRef = React.useRef(null);\n const [showColumnMenuIcon, setShowColumnMenuIcon] = React.useState(columnMenuOpen);\n const columnMenuSlotProps = rootProps.slotProps?.columnMenu;\n const columnMenuComponent = rootProps.slots.columnMenu;\n const defaultSlots = columnMenuComponent?.defaultSlots;\n const defaultSlotProps = columnMenuComponent?.defaultSlotProps;\n const hasKnownDefaultColumnMenu = defaultSlots != null && defaultSlotProps != null;\n const columnMenuItemKeys = React.useMemo(() => {\n if (!hasKnownDefaultColumnMenu) {\n return [];\n }\n return getColumnMenuItemKeys({\n apiRef,\n colDef,\n defaultSlots,\n defaultSlotProps,\n slots: columnMenuSlotProps?.slots,\n slotProps: columnMenuSlotProps?.slotProps\n });\n }, [apiRef, colDef, defaultSlotProps, defaultSlots, hasKnownDefaultColumnMenu, columnMenuSlotProps?.slotProps, columnMenuSlotProps?.slots]);\n\n // If we don't have a \"known\" default column menu (i.e. a custom menu component\n // without `defaultSlots` / `defaultSlotProps` statics), we treat it as opaque\n // and assume it has items, so we always show the column menu icon.\n // Only the built-in/default menu path can hide the icon when there are no items.\n const hasColumnMenuItems = !hasKnownDefaultColumnMenu || columnMenuItemKeys.length > 0;\n const isDraggable = !rootProps.disableColumnReorder && !disableReorder && !colDef.disableReorder;\n let headerComponent;\n if (colDef.renderHeader) {\n headerComponent = colDef.renderHeader(apiRef.current.getColumnHeaderParams(colDef.field));\n }\n const ownerState = _extends({}, props, {\n classes: rootProps.classes,\n showRightBorder,\n showLeftBorder\n });\n const classes = useUtilityClasses(ownerState);\n const publish = React.useCallback(eventName => event => {\n // Ignore portal\n // See https://github.com/mui/mui-x/issues/1721\n if (isEventTargetInPortal(event)) {\n return;\n }\n apiRef.current.publishEvent(eventName, apiRef.current.getColumnHeaderParams(colDef.field), event);\n }, [apiRef, colDef.field]);\n const mouseEventsHandlers = React.useMemo(() => ({\n onClick: publish('columnHeaderClick'),\n onContextMenu: publish('columnHeaderContextMenu'),\n onDoubleClick: publish('columnHeaderDoubleClick'),\n onMouseOver: publish('columnHeaderOver'),\n // TODO remove as it's not used\n onMouseOut: publish('columnHeaderOut'),\n // TODO remove as it's not used\n onMouseEnter: publish('columnHeaderEnter'),\n // TODO remove as it's not used\n onMouseLeave: publish('columnHeaderLeave'),\n // TODO remove as it's not used\n onKeyDown: publish('columnHeaderKeyDown'),\n onFocus: publish('columnHeaderFocus'),\n onBlur: publish('columnHeaderBlur')\n }), [publish]);\n const draggableEventHandlers = React.useMemo(() => isDraggable ? {\n onDragStart: publish('columnHeaderDragStart'),\n onDragEnter: publish('columnHeaderDragEnter'),\n onDragOver: publish('columnHeaderDragOver'),\n onDragEndCapture: publish('columnHeaderDragEnd')\n } : {}, [isDraggable, publish]);\n const columnHeaderSeparatorProps = React.useMemo(() => ({\n onMouseDown: publish('columnSeparatorMouseDown'),\n onDoubleClick: publish('columnSeparatorDoubleClick')\n }), [publish]);\n React.useEffect(() => {\n if (!showColumnMenuIcon && columnMenuOpen) {\n setShowColumnMenuIcon(columnMenuOpen);\n }\n }, [showColumnMenuIcon, columnMenuOpen]);\n React.useEffect(() => {\n if (hasKnownDefaultColumnMenu && columnMenuOpen && !hasColumnMenuItems) {\n apiRef.current.hideColumnMenu();\n }\n }, [apiRef, columnMenuOpen, hasColumnMenuItems, hasKnownDefaultColumnMenu]);\n const handleExited = React.useCallback(() => {\n setShowColumnMenuIcon(false);\n }, []);\n const columnMenuIconButton = !rootProps.disableColumnMenu && !colDef.disableColumnMenu && hasColumnMenuItems && /*#__PURE__*/_jsx(ColumnHeaderMenuIcon, {\n colDef: colDef,\n columnMenuId: columnMenuId,\n columnMenuButtonId: columnMenuButtonId,\n open: showColumnMenuIcon,\n iconButtonRef: iconButtonRef\n });\n const columnMenu = /*#__PURE__*/_jsx(GridColumnHeaderMenu, {\n columnMenuId: columnMenuId,\n columnMenuButtonId: columnMenuButtonId,\n field: colDef.field,\n open: columnMenuOpen,\n target: iconButtonRef.current,\n ContentComponent: rootProps.slots.columnMenu,\n contentComponentProps: rootProps.slotProps?.columnMenu,\n onExited: handleExited\n });\n const sortingOrder = colDef.sortingOrder ?? rootProps.sortingOrder;\n const showSortIcon = (colDef.sortable || sortDirection != null) && !colDef.hideSortIcons && !rootProps.disableColumnSorting;\n const columnTitleIconButtons = /*#__PURE__*/_jsxs(React.Fragment, {\n children: [!rootProps.disableColumnFilter && /*#__PURE__*/_jsx(rootProps.slots.columnHeaderFilterIconButton, _extends({\n field: colDef.field,\n counter: filterItemsCounter\n }, rootProps.slotProps?.columnHeaderFilterIconButton)), showSortIcon && /*#__PURE__*/_jsx(rootProps.slots.columnHeaderSortIcon, _extends({\n field: colDef.field,\n direction: sortDirection,\n index: sortIndex,\n sortingOrder: sortingOrder,\n disabled: !colDef.sortable\n }, rootProps.slotProps?.columnHeaderSortIcon))]\n });\n React.useLayoutEffect(() => {\n const columnMenuState = apiRef.current.state.columnMenu;\n if (hasFocus && !columnMenuState.open) {\n const focusableElement = headerCellRef.current.querySelector('[tabindex=\"0\"]');\n const elementToFocus = focusableElement || headerCellRef.current;\n if (!elementToFocus) {\n return;\n }\n focusElement(elementToFocus, apiRef);\n }\n }, [apiRef, hasFocus]);\n const headerClassName = typeof colDef.headerClassName === 'function' ? colDef.headerClassName({\n field: colDef.field,\n colDef\n }) : colDef.headerClassName;\n const label = colDef.headerName ?? colDef.field;\n const pinnedScrollOffset = usePinnedScrollOffset(apiRef, pinnedPosition);\n const style = React.useMemo(() => attachPinnedStyle(_extends({}, props.style), isRtl, pinnedPosition, pinnedOffset !== undefined ? pinnedOffset + pinnedScrollOffset : undefined), [pinnedPosition, pinnedOffset, pinnedScrollOffset, props.style, isRtl]);\n return /*#__PURE__*/_jsx(GridGenericColumnHeaderItem, _extends({\n ref: headerCellRef,\n classes: classes,\n columnMenuOpen: columnMenuOpen,\n colIndex: colIndex,\n height: headerHeight,\n isResizing: isResizing,\n sortDirection: sortDirection,\n hasFocus: hasFocus,\n tabIndex: tabIndex,\n separatorSide: separatorSide,\n isDraggable: isDraggable,\n headerComponent: headerComponent,\n description: colDef.description,\n elementId: colDef.field,\n width: colDef.computedWidth,\n columnMenuIconButton: columnMenuIconButton,\n columnTitleIconButtons: columnTitleIconButtons,\n headerClassName: clsx(headerClassName, isLast && gridClasses['columnHeader--last']),\n label: label,\n resizable: !rootProps.disableColumnResize && !!colDef.resizable,\n \"data-field\": colDef.field,\n columnMenu: columnMenu,\n draggableContainerProps: draggableEventHandlers,\n columnHeaderSeparatorProps: columnHeaderSeparatorProps,\n style: style\n }, mouseEventsHandlers));\n}\nprocess.env.NODE_ENV !== \"production\" ? GridColumnHeaderItem.propTypes /* remove-proptypes */ = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the TypeScript types and run \"pnpm proptypes\" |\n // ----------------------------------------------------------------------\n colDef: PropTypes.object.isRequired,\n colIndex: PropTypes.number.isRequired,\n columnMenuOpen: PropTypes.bool.isRequired,\n disableReorder: PropTypes.bool,\n filterItemsCounter: PropTypes.number,\n hasFocus: PropTypes.bool,\n headerHeight: PropTypes.number.isRequired,\n isDragging: PropTypes.bool.isRequired,\n isLast: PropTypes.bool.isRequired,\n isResizing: PropTypes.bool.isRequired,\n isSiblingFocused: PropTypes.bool.isRequired,\n pinnedOffset: PropTypes.number,\n pinnedPosition: PropTypes.oneOf([0, 1, 2, 3]),\n separatorSide: PropTypes.oneOf(['left', 'right']),\n showLeftBorder: PropTypes.bool.isRequired,\n showRightBorder: PropTypes.bool.isRequired,\n sortDirection: PropTypes.oneOf(['asc', 'desc']),\n sortIndex: PropTypes.number,\n style: PropTypes.object,\n tabIndex: PropTypes.oneOf([-1, 0]).isRequired\n} : void 0;\nconst Memoized = fastMemo(GridColumnHeaderItem);\nexport { Memoized as GridColumnHeaderItem };","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"className\"];\nimport * as React from 'react';\nimport clsx from 'clsx';\nimport composeClasses from '@mui/utils/composeClasses';\nimport { styled } from '@mui/material/styles';\nimport { forwardRef } from '@mui/x-internals/forwardRef';\nimport { getDataGridUtilityClass } from \"../../constants/gridClasses.mjs\";\nimport { useGridRootProps } from \"../../hooks/utils/useGridRootProps.mjs\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n classes\n } = ownerState;\n const slots = {\n root: ['iconButtonContainer']\n };\n return composeClasses(slots, getDataGridUtilityClass, classes);\n};\nconst GridIconButtonContainerRoot = styled('div', {\n name: 'MuiDataGrid',\n slot: 'IconButtonContainer'\n})(() => ({\n display: 'flex',\n visibility: 'hidden',\n width: 0\n}));\nexport const GridIconButtonContainer = forwardRef(function GridIconButtonContainer(props, ref) {\n const {\n className\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const rootProps = useGridRootProps();\n const classes = useUtilityClasses(rootProps);\n return /*#__PURE__*/_jsx(GridIconButtonContainerRoot, _extends({\n className: clsx(classes.root, className),\n ownerState: rootProps\n }, other, {\n ref: ref\n }));\n});\nif (process.env.NODE_ENV !== \"production\") GridIconButtonContainer.displayName = \"GridIconButtonContainer\";","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"direction\", \"index\", \"sortingOrder\", \"disabled\", \"className\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport composeClasses from '@mui/utils/composeClasses';\nimport { styled } from '@mui/material/styles';\nimport clsx from 'clsx';\nimport { useGridApiContext } from \"../hooks/utils/useGridApiContext.mjs\";\nimport { getDataGridUtilityClass } from \"../constants/gridClasses.mjs\";\nimport { useGridRootProps } from \"../hooks/utils/useGridRootProps.mjs\";\nimport { vars } from \"../constants/cssVariables.mjs\";\nimport { NotRendered } from \"../utils/assert.mjs\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n classes\n } = ownerState;\n const slots = {\n root: ['sortButton'],\n icon: ['sortIcon']\n };\n return composeClasses(slots, getDataGridUtilityClass, classes);\n};\nconst GridColumnSortButtonRoot = styled(NotRendered, {\n name: 'MuiDataGrid',\n slot: 'SortButton'\n})({\n transition: vars.transition(['opacity'], {\n duration: vars.transitions.duration.short,\n easing: vars.transitions.easing.easeInOut\n })\n});\nfunction getIcon(icons, direction, className, sortingOrder) {\n let Icon;\n const iconProps = {};\n if (direction === 'asc') {\n Icon = icons.columnSortedAscendingIcon;\n } else if (direction === 'desc') {\n Icon = icons.columnSortedDescendingIcon;\n } else {\n Icon = icons.columnUnsortedIcon;\n iconProps.sortingOrder = sortingOrder;\n }\n return Icon ? /*#__PURE__*/_jsx(Icon, _extends({\n fontSize: \"small\",\n className: className\n }, iconProps)) : null;\n}\nfunction GridColumnSortButton(props) {\n const {\n direction,\n index,\n sortingOrder,\n disabled,\n className\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const apiRef = useGridApiContext();\n const rootProps = useGridRootProps();\n const ownerState = _extends({}, props, {\n classes: rootProps.classes\n });\n const classes = useUtilityClasses(ownerState);\n const iconElement = getIcon(rootProps.slots, direction, classes.icon, sortingOrder);\n if (!iconElement) {\n return null;\n }\n const iconButton = /*#__PURE__*/_jsx(GridColumnSortButtonRoot, _extends({\n as: rootProps.slots.baseIconButton,\n ownerState: ownerState,\n \"aria-label\": apiRef.current.getLocaleText('columnHeaderSortIconLabel'),\n size: \"small\",\n disabled: disabled,\n className: clsx(classes.root, className)\n }, rootProps.slotProps?.baseIconButton, other, {\n children: iconElement\n }));\n return /*#__PURE__*/_jsx(rootProps.slots.baseTooltip, _extends({\n title: apiRef.current.getLocaleText('columnHeaderSortIconLabel'),\n enterDelay: 1000\n }, rootProps.slotProps?.baseTooltip, {\n children: /*#__PURE__*/_jsxs(\"span\", {\n children: [index != null && /*#__PURE__*/_jsx(rootProps.slots.baseBadge, {\n badgeContent: index,\n color: \"default\",\n overlap: \"circular\",\n children: iconButton\n }), index == null && iconButton]\n })\n }));\n}\nprocess.env.NODE_ENV !== \"production\" ? GridColumnSortButton.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the TypeScript types and run \"pnpm proptypes\" |\n // ----------------------------------------------------------------------\n direction: PropTypes.oneOf(['asc', 'desc']),\n disabled: PropTypes.bool,\n field: PropTypes.string.isRequired,\n index: PropTypes.number,\n onClick: PropTypes.func,\n sortingOrder: PropTypes.arrayOf(PropTypes.oneOf(['asc', 'desc'])).isRequired\n} : void 0;\nexport { GridColumnSortButton };","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { GridIconButtonContainer } from \"./GridIconButtonContainer.mjs\";\nimport { GridColumnSortButton } from \"../GridColumnSortButton.mjs\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction GridColumnHeaderSortIconRaw(props) {\n return /*#__PURE__*/_jsx(GridIconButtonContainer, {\n children: /*#__PURE__*/_jsx(GridColumnSortButton, _extends({}, props, {\n tabIndex: -1\n }))\n });\n}\nconst GridColumnHeaderSortIcon = /*#__PURE__*/React.memo(GridColumnHeaderSortIconRaw);\nif (process.env.NODE_ENV !== \"production\") GridColumnHeaderSortIcon.displayName = \"GridColumnHeaderSortIcon\";\nprocess.env.NODE_ENV !== \"production\" ? GridColumnHeaderSortIconRaw.propTypes /* remove-proptypes */ = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the TypeScript types and run \"pnpm proptypes\" |\n // ----------------------------------------------------------------------\n className: PropTypes.string,\n color: PropTypes.oneOf(['default', 'inherit', 'primary']),\n direction: PropTypes.oneOf(['asc', 'desc']),\n disabled: PropTypes.bool,\n edge: PropTypes.oneOf(['end', 'start', false]),\n field: PropTypes.string.isRequired,\n id: PropTypes.string,\n index: PropTypes.number,\n label: PropTypes.string,\n role: PropTypes.string,\n size: PropTypes.oneOf(['large', 'medium', 'small']),\n sortingOrder: PropTypes.arrayOf(PropTypes.oneOf(['asc', 'desc'])).isRequired,\n style: PropTypes.object,\n tabIndex: PropTypes.number,\n title: PropTypes.string,\n touchRippleRef: PropTypes.any\n} : void 0;\nexport { GridColumnHeaderSortIcon };","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport composeClasses from '@mui/utils/composeClasses';\nimport useId from '@mui/utils/useId';\nimport { useGridSelector } from \"../../hooks/index.mjs\";\nimport { gridPreferencePanelSelectorWithLabel, gridPreferencePanelStateSelector } from \"../../hooks/features/preferencesPanel/gridPreferencePanelSelector.mjs\";\nimport { GridPreferencePanelsValue } from \"../../hooks/features/preferencesPanel/gridPreferencePanelsValue.mjs\";\nimport { useGridApiContext } from \"../../hooks/utils/useGridApiContext.mjs\";\nimport { getDataGridUtilityClass } from \"../../constants/gridClasses.mjs\";\nimport { useGridRootProps } from \"../../hooks/utils/useGridRootProps.mjs\";\nimport { GridIconButtonContainer } from \"./GridIconButtonContainer.mjs\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n classes\n } = ownerState;\n const slots = {\n icon: ['filterIcon']\n };\n return composeClasses(slots, getDataGridUtilityClass, classes);\n};\nfunction GridColumnHeaderFilterIconButtonWrapped(props) {\n if (!props.counter) {\n return null;\n }\n return /*#__PURE__*/_jsx(GridColumnHeaderFilterIconButton, _extends({}, props));\n}\nprocess.env.NODE_ENV !== \"production\" ? GridColumnHeaderFilterIconButtonWrapped.propTypes /* remove-proptypes */ = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the TypeScript types and run \"pnpm proptypes\" |\n // ----------------------------------------------------------------------\n counter: PropTypes.number,\n field: PropTypes.string.isRequired,\n onClick: PropTypes.func\n} : void 0;\nfunction GridColumnHeaderFilterIconButton(props) {\n const {\n counter,\n field,\n onClick\n } = props;\n const apiRef = useGridApiContext();\n const rootProps = useGridRootProps();\n const ownerState = _extends({}, props, {\n classes: rootProps.classes\n });\n const classes = useUtilityClasses(ownerState);\n const labelId = useId();\n const isOpen = useGridSelector(apiRef, gridPreferencePanelSelectorWithLabel, labelId);\n const panelId = useId();\n const toggleFilter = React.useCallback(event => {\n event.preventDefault();\n event.stopPropagation();\n const {\n open,\n openedPanelValue\n } = gridPreferencePanelStateSelector(apiRef);\n if (open && openedPanelValue === GridPreferencePanelsValue.filters) {\n apiRef.current.hideFilterPanel();\n } else {\n apiRef.current.showFilterPanel(undefined, panelId, labelId);\n }\n if (onClick) {\n onClick(apiRef.current.getColumnHeaderParams(field), event);\n }\n }, [apiRef, field, onClick, panelId, labelId]);\n if (!counter) {\n return null;\n }\n const iconButton = /*#__PURE__*/_jsx(rootProps.slots.baseIconButton, _extends({\n id: labelId,\n onClick: toggleFilter,\n \"aria-label\": apiRef.current.getLocaleText('columnHeaderFiltersLabel'),\n size: \"small\",\n tabIndex: -1,\n \"aria-haspopup\": \"menu\",\n \"aria-expanded\": isOpen,\n \"aria-controls\": isOpen ? panelId : undefined\n }, rootProps.slotProps?.baseIconButton, {\n children: /*#__PURE__*/_jsx(rootProps.slots.columnFilteredIcon, {\n className: classes.icon,\n fontSize: \"small\"\n })\n }));\n return /*#__PURE__*/_jsx(rootProps.slots.baseTooltip, _extends({\n title: apiRef.current.getLocaleText('columnHeaderFiltersTooltipActive')(counter),\n enterDelay: 1000\n }, rootProps.slotProps?.baseTooltip, {\n children: /*#__PURE__*/_jsxs(GridIconButtonContainer, {\n children: [counter > 1 && /*#__PURE__*/_jsx(rootProps.slots.baseBadge, {\n badgeContent: counter,\n color: \"default\",\n children: iconButton\n }), counter === 1 && iconButton]\n })\n }));\n}\nprocess.env.NODE_ENV !== \"production\" ? GridColumnHeaderFilterIconButton.propTypes /* remove-proptypes */ = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the TypeScript types and run \"pnpm proptypes\" |\n // ----------------------------------------------------------------------\n counter: PropTypes.number,\n field: PropTypes.string.isRequired,\n onClick: PropTypes.func\n} : void 0;\nexport { GridColumnHeaderFilterIconButtonWrapped as GridColumnHeaderFilterIconButton };","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"rowId\", \"material\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { forwardRef } from '@mui/x-internals/forwardRef';\nimport { useGridRootProps } from \"../../hooks/utils/useGridRootProps.mjs\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst GridRowCheckbox = forwardRef(function GridRowCheckbox(props, ref) {\n const {\n material\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const rootProps = useGridRootProps();\n return /*#__PURE__*/_jsx(rootProps.slots.baseCheckbox, _extends({}, rootProps.slotProps?.baseCheckbox, other, {\n material: _extends({\n disableRipple: props.disabled\n }, material),\n ref: ref\n }));\n});\nif (process.env.NODE_ENV !== \"production\") GridRowCheckbox.displayName = \"GridRowCheckbox\";\nprocess.env.NODE_ENV !== \"production\" ? GridRowCheckbox.propTypes /* remove-proptypes */ = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the TypeScript types and run \"pnpm proptypes\" |\n // ----------------------------------------------------------------------\n autoFocus: PropTypes.bool,\n checked: PropTypes.bool,\n className: PropTypes.string,\n density: PropTypes.oneOf(['compact', 'standard']),\n disabled: PropTypes.bool,\n fullWidth: PropTypes.bool,\n id: PropTypes.string,\n indeterminate: PropTypes.bool,\n inputRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({\n current: PropTypes.object\n })]),\n label: PropTypes.node,\n name: PropTypes.string,\n /**\n * The grid row id.\n */\n rowId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,\n size: PropTypes.oneOf(['medium', 'small']),\n slotProps: PropTypes.object,\n style: PropTypes.object,\n tabIndex: PropTypes.number,\n touchRippleRef: PropTypes.any\n} : void 0;\nexport { GridRowCheckbox };","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"hideMenu\", \"colDef\", \"id\", \"labelledby\", \"className\", \"children\", \"open\"];\nimport clsx from 'clsx';\nimport PropTypes from 'prop-types';\nimport * as React from 'react';\nimport { styled } from '@mui/material/styles';\nimport { forwardRef } from '@mui/x-internals/forwardRef';\nimport { isHideMenuKey } from \"../../../utils/keyboardUtils.mjs\";\nimport { NotRendered } from \"../../../utils/assert.mjs\";\nimport { gridClasses } from \"../../../constants/gridClasses.mjs\";\nimport { useGridRootProps } from \"../../../hooks/utils/useGridRootProps.mjs\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst StyledMenuList = styled(NotRendered, {\n slot: 'internal'\n})(() => ({\n minWidth: 248\n}));\nfunction handleMenuScrollCapture(event) {\n if (!event.currentTarget.contains(event.target)) {\n return;\n }\n event.stopPropagation();\n}\nconst GridColumnMenuContainer = forwardRef(function GridColumnMenuContainer(props, ref) {\n const {\n hideMenu,\n id,\n labelledby,\n className,\n children,\n open\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const rootProps = useGridRootProps();\n const handleListKeyDown = React.useCallback(event => {\n if (event.key === 'Tab') {\n event.preventDefault();\n }\n if (isHideMenuKey(event.key)) {\n hideMenu(event);\n }\n }, [hideMenu]);\n return /*#__PURE__*/_jsx(StyledMenuList, _extends({\n as: rootProps.slots.baseMenuList,\n id: id,\n className: clsx(gridClasses.menuList, className),\n \"aria-labelledby\": labelledby,\n onKeyDown: handleListKeyDown,\n onWheel: handleMenuScrollCapture,\n onTouchMove: handleMenuScrollCapture,\n autoFocus: open\n }, other, {\n ref: ref,\n children: children\n }));\n});\nif (process.env.NODE_ENV !== \"production\") GridColumnMenuContainer.displayName = \"GridColumnMenuContainer\";\nprocess.env.NODE_ENV !== \"production\" ? GridColumnMenuContainer.propTypes /* remove-proptypes */ = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the TypeScript types and run \"pnpm proptypes\" |\n // ----------------------------------------------------------------------\n colDef: PropTypes.object.isRequired,\n hideMenu: PropTypes.func.isRequired,\n id: PropTypes.string,\n labelledby: PropTypes.string,\n open: PropTypes.bool.isRequired\n} : void 0;\nexport { GridColumnMenuContainer };","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"displayOrder\"];\nimport * as React from 'react';\nimport { useGridRootProps } from \"../../utils/useGridRootProps.mjs\";\nimport { useGridPrivateApiContext } from \"../../utils/useGridPrivateApiContext.mjs\";\nimport { getColumnMenuItemKeys } from \"./getColumnMenuItemKeys.mjs\";\nconst useGridColumnMenuSlots = props => {\n const apiRef = useGridPrivateApiContext();\n const rootProps = useGridRootProps();\n const {\n defaultSlots,\n defaultSlotProps,\n slots = {},\n slotProps = {},\n hideMenu,\n colDef,\n addDividers = true\n } = props;\n const processedComponents = React.useMemo(() => _extends({}, defaultSlots, slots), [defaultSlots, slots]);\n const processedSlotProps = React.useMemo(() => {\n if (!slotProps || Object.keys(slotProps).length === 0) {\n return defaultSlotProps;\n }\n const mergedProps = _extends({}, slotProps);\n Object.entries(defaultSlotProps).forEach(([key, currentSlotProps]) => {\n mergedProps[key] = _extends({}, currentSlotProps, slotProps[key] || {});\n });\n return mergedProps;\n }, [defaultSlotProps, slotProps]);\n return React.useMemo(() => {\n const sortedKeys = getColumnMenuItemKeys({\n apiRef,\n colDef,\n defaultSlots,\n defaultSlotProps,\n slots,\n slotProps\n });\n return sortedKeys.reduce((acc, key, index) => {\n let itemProps = {\n colDef,\n onClick: hideMenu\n };\n const processedComponentProps = processedSlotProps[key];\n if (processedComponentProps) {\n const customProps = _objectWithoutPropertiesLoose(processedComponentProps, _excluded);\n itemProps = _extends({}, itemProps, customProps);\n }\n return addDividers && index !== sortedKeys.length - 1 ? [...acc, [processedComponents[key], itemProps], [rootProps.slots.baseDivider, {}]] : [...acc, [processedComponents[key], itemProps]];\n }, []);\n }, [addDividers, apiRef, colDef, defaultSlotProps, defaultSlots, hideMenu, processedComponents, processedSlotProps, slotProps, slots, rootProps.slots.baseDivider]);\n};\nexport { useGridColumnMenuSlots };","import * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { useGridApiContext } from \"../../../../hooks/utils/useGridApiContext.mjs\";\nimport { useGridRootProps } from \"../../../../hooks/utils/useGridRootProps.mjs\";\nimport { gridVisibleColumnDefinitionsSelector } from \"../../../../hooks/features/columns/index.mjs\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction GridColumnMenuHideItem(props) {\n const {\n colDef,\n onClick\n } = props;\n const apiRef = useGridApiContext();\n const rootProps = useGridRootProps();\n const visibleColumns = gridVisibleColumnDefinitionsSelector(apiRef);\n const columnsWithMenu = visibleColumns.filter(col => col.disableColumnMenu !== true);\n // do not allow to hide the last column with menu\n const disabled = columnsWithMenu.length === 1;\n const toggleColumn = React.useCallback(event => {\n /**\n * Disabled `MenuItem` would trigger `click` event\n * after imperative `.click()` call on HTML element.\n * Also, click is triggered in testing environment as well.\n */\n if (disabled) {\n return;\n }\n apiRef.current.setColumnVisibility(colDef.field, false);\n onClick(event);\n }, [apiRef, colDef.field, onClick, disabled]);\n if (rootProps.disableColumnSelector) {\n return null;\n }\n if (colDef.hideable === false) {\n return null;\n }\n return /*#__PURE__*/_jsx(rootProps.slots.baseMenuItem, {\n onClick: toggleColumn,\n disabled: disabled,\n iconStart: /*#__PURE__*/_jsx(rootProps.slots.columnMenuHideIcon, {\n fontSize: \"small\"\n }),\n children: apiRef.current.getLocaleText('columnMenuHideColumn')\n });\n}\nprocess.env.NODE_ENV !== \"production\" ? GridColumnMenuHideItem.propTypes /* remove-proptypes */ = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the TypeScript types and run \"pnpm proptypes\" |\n // ----------------------------------------------------------------------\n colDef: PropTypes.object.isRequired,\n onClick: PropTypes.func.isRequired\n} : void 0;\nexport { GridColumnMenuHideItem };","import * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { GridPreferencePanelsValue } from \"../../../../hooks/features/preferencesPanel/gridPreferencePanelsValue.mjs\";\nimport { useGridApiContext } from \"../../../../hooks/utils/useGridApiContext.mjs\";\nimport { useGridRootProps } from \"../../../../hooks/utils/useGridRootProps.mjs\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction GridColumnMenuManageItem(props) {\n const {\n onClick\n } = props;\n const apiRef = useGridApiContext();\n const rootProps = useGridRootProps();\n const showColumns = React.useCallback(event => {\n onClick(event); // hide column menu\n apiRef.current.showPreferences(GridPreferencePanelsValue.columns);\n }, [apiRef, onClick]);\n if (rootProps.disableColumnSelector) {\n return null;\n }\n return /*#__PURE__*/_jsx(rootProps.slots.baseMenuItem, {\n onClick: showColumns,\n iconStart: /*#__PURE__*/_jsx(rootProps.slots.columnMenuManageColumnsIcon, {\n fontSize: \"small\"\n }),\n children: apiRef.current.getLocaleText('columnMenuManageColumns')\n });\n}\nprocess.env.NODE_ENV !== \"production\" ? GridColumnMenuManageItem.propTypes /* remove-proptypes */ = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the TypeScript types and run \"pnpm proptypes\" |\n // ----------------------------------------------------------------------\n colDef: PropTypes.object.isRequired,\n onClick: PropTypes.func.isRequired\n} : void 0;\nexport { GridColumnMenuManageItem };","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { GridColumnMenuHideItem } from \"./GridColumnMenuHideItem.mjs\";\nimport { GridColumnMenuManageItem } from \"./GridColumnMenuManageItem.mjs\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nfunction GridColumnMenuColumnsItem(props) {\n return /*#__PURE__*/_jsxs(React.Fragment, {\n children: [/*#__PURE__*/_jsx(GridColumnMenuHideItem, _extends({}, props)), /*#__PURE__*/_jsx(GridColumnMenuManageItem, _extends({}, props))]\n });\n}\nprocess.env.NODE_ENV !== \"production\" ? GridColumnMenuColumnsItem.propTypes /* remove-proptypes */ = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the TypeScript types and run \"pnpm proptypes\" |\n // ----------------------------------------------------------------------\n colDef: PropTypes.object.isRequired,\n onClick: PropTypes.func.isRequired\n} : void 0;\nexport { GridColumnMenuColumnsItem };","import * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { useGridApiContext } from \"../../../../hooks/utils/useGridApiContext.mjs\";\nimport { useGridRootProps } from \"../../../../hooks/utils/useGridRootProps.mjs\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction GridColumnMenuFilterItem(props) {\n const {\n colDef,\n onClick\n } = props;\n const apiRef = useGridApiContext();\n const rootProps = useGridRootProps();\n const showFilter = React.useCallback(event => {\n onClick(event);\n apiRef.current.showFilterPanel(colDef.field);\n }, [apiRef, colDef.field, onClick]);\n if (rootProps.disableColumnFilter || !colDef.filterable) {\n return null;\n }\n return /*#__PURE__*/_jsx(rootProps.slots.baseMenuItem, {\n onClick: showFilter,\n iconStart: /*#__PURE__*/_jsx(rootProps.slots.columnMenuFilterIcon, {\n fontSize: \"small\"\n }),\n children: apiRef.current.getLocaleText('columnMenuFilter')\n });\n}\nprocess.env.NODE_ENV !== \"production\" ? GridColumnMenuFilterItem.propTypes /* remove-proptypes */ = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the TypeScript types and run \"pnpm proptypes\" |\n // ----------------------------------------------------------------------\n colDef: PropTypes.object.isRequired,\n onClick: PropTypes.func.isRequired\n} : void 0;\nexport { GridColumnMenuFilterItem };","import * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { useGridSelector } from \"../../../../hooks/utils/useGridSelector.mjs\";\nimport { gridSortModelSelector } from \"../../../../hooks/features/sorting/gridSortingSelector.mjs\";\nimport { useGridApiContext } from \"../../../../hooks/utils/useGridApiContext.mjs\";\nimport { useGridRootProps } from \"../../../../hooks/utils/useGridRootProps.mjs\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nfunction GridColumnMenuSortItem(props) {\n const {\n colDef,\n onClick\n } = props;\n const apiRef = useGridApiContext();\n const sortModel = useGridSelector(apiRef, gridSortModelSelector);\n const rootProps = useGridRootProps();\n const sortDirection = React.useMemo(() => {\n if (!colDef) {\n return null;\n }\n const sortItem = sortModel.find(item => item.field === colDef.field);\n return sortItem?.sort;\n }, [colDef, sortModel]);\n const sortingOrder = colDef.sortingOrder ?? rootProps.sortingOrder;\n const onSortMenuItemClick = React.useCallback(event => {\n onClick(event);\n const direction = event.currentTarget.getAttribute('data-value') || null;\n const allowMultipleSorting = rootProps.multipleColumnsSortingMode === 'always';\n apiRef.current.sortColumn(colDef.field, direction === sortDirection ? null : direction, allowMultipleSorting);\n }, [apiRef, colDef, onClick, sortDirection, rootProps.multipleColumnsSortingMode]);\n if (rootProps.disableColumnSorting || !colDef || !colDef.sortable || !sortingOrder.some(item => !!item)) {\n return null;\n }\n const getLabel = key => {\n const label = apiRef.current.getLocaleText(key);\n return typeof label === 'function' ? label(colDef) : label;\n };\n return /*#__PURE__*/_jsxs(React.Fragment, {\n children: [sortingOrder.includes('asc') && sortDirection !== 'asc' ? /*#__PURE__*/_jsx(rootProps.slots.baseMenuItem, {\n onClick: onSortMenuItemClick,\n \"data-value\": \"asc\",\n iconStart: /*#__PURE__*/_jsx(rootProps.slots.columnMenuSortAscendingIcon, {\n fontSize: \"small\"\n }),\n children: getLabel('columnMenuSortAsc')\n }) : null, sortingOrder.includes('desc') && sortDirection !== 'desc' ? /*#__PURE__*/_jsx(rootProps.slots.baseMenuItem, {\n onClick: onSortMenuItemClick,\n \"data-value\": \"desc\",\n iconStart: /*#__PURE__*/_jsx(rootProps.slots.columnMenuSortDescendingIcon, {\n fontSize: \"small\"\n }),\n children: getLabel('columnMenuSortDesc')\n }) : null, sortingOrder.includes(null) && sortDirection != null ? /*#__PURE__*/_jsx(rootProps.slots.baseMenuItem, {\n onClick: onSortMenuItemClick,\n iconStart: rootProps.slots.columnMenuUnsortIcon ? /*#__PURE__*/_jsx(rootProps.slots.columnMenuUnsortIcon, {\n fontSize: \"small\"\n }) : /*#__PURE__*/_jsx(\"span\", {}),\n children: apiRef.current.getLocaleText('columnMenuUnsort')\n }) : null]\n });\n}\nprocess.env.NODE_ENV !== \"production\" ? GridColumnMenuSortItem.propTypes /* remove-proptypes */ = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the TypeScript types and run \"pnpm proptypes\" |\n // ----------------------------------------------------------------------\n colDef: PropTypes.object.isRequired,\n onClick: PropTypes.func.isRequired\n} : void 0;\nexport { GridColumnMenuSortItem };","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"defaultSlots\", \"defaultSlotProps\", \"slots\", \"slotProps\"];\nimport PropTypes from 'prop-types';\nimport { forwardRef } from '@mui/x-internals/forwardRef';\nimport { useGridColumnMenuSlots } from \"../../../hooks/features/columnMenu/useGridColumnMenuSlots.mjs\";\nimport { GridColumnMenuContainer } from \"./GridColumnMenuContainer.mjs\";\nimport { GridColumnMenuColumnsItem } from \"./menuItems/GridColumnMenuColumnsItem.mjs\";\nimport { GridColumnMenuFilterItem } from \"./menuItems/GridColumnMenuFilterItem.mjs\";\nimport { GridColumnMenuSortItem } from \"./menuItems/GridColumnMenuSortItem.mjs\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport const GRID_COLUMN_MENU_SLOTS = {\n columnMenuSortItem: GridColumnMenuSortItem,\n columnMenuFilterItem: GridColumnMenuFilterItem,\n columnMenuColumnsItem: GridColumnMenuColumnsItem\n};\nexport const GRID_COLUMN_MENU_SLOT_PROPS = {\n columnMenuSortItem: {\n displayOrder: 10\n },\n columnMenuFilterItem: {\n displayOrder: 20\n },\n columnMenuColumnsItem: {\n displayOrder: 30\n }\n};\nconst GridGenericColumnMenu = forwardRef(function GridGenericColumnMenu(props, ref) {\n const {\n defaultSlots,\n defaultSlotProps,\n slots,\n slotProps\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const orderedSlots = useGridColumnMenuSlots(_extends({}, other, {\n defaultSlots,\n defaultSlotProps,\n slots,\n slotProps\n }));\n return /*#__PURE__*/_jsx(GridColumnMenuContainer, _extends({}, other, {\n ref: ref,\n children: orderedSlots.map(([Component, otherProps], index) => /*#__PURE__*/_jsx(Component, _extends({}, otherProps), index))\n }));\n});\nif (process.env.NODE_ENV !== \"production\") GridGenericColumnMenu.displayName = \"GridGenericColumnMenu\";\nprocess.env.NODE_ENV !== \"production\" ? GridGenericColumnMenu.propTypes /* remove-proptypes */ = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the TypeScript types and run \"pnpm proptypes\" |\n // ----------------------------------------------------------------------\n colDef: PropTypes.object.isRequired,\n /**\n * Initial `slotProps` - it is internal, to be overrriden by Pro or Premium packages\n * @ignore - do not document.\n */\n defaultSlotProps: PropTypes.object.isRequired,\n /**\n * Initial `slots` - it is internal, to be overrriden by Pro or Premium packages\n * @ignore - do not document.\n */\n defaultSlots: PropTypes.object.isRequired,\n hideMenu: PropTypes.func.isRequired,\n id: PropTypes.string,\n labelledby: PropTypes.string,\n open: PropTypes.bool.isRequired,\n /**\n * Could be used to pass new props or override props specific to a column menu component\n * e.g. `displayOrder`\n */\n slotProps: PropTypes.object,\n /**\n * `slots` could be used to add new and (or) override default column menu items\n * If you register a nee component you must pass it's `displayOrder` in `slotProps`\n * or it will be placed in the end of the list\n */\n slots: PropTypes.object\n} : void 0;\nconst GridColumnMenu = forwardRef(function GridColumnMenu(props, ref) {\n return /*#__PURE__*/_jsx(GridGenericColumnMenu, _extends({}, props, {\n ref: ref,\n defaultSlots: GRID_COLUMN_MENU_SLOTS,\n defaultSlotProps: GRID_COLUMN_MENU_SLOT_PROPS\n }));\n});\nif (process.env.NODE_ENV !== \"production\") GridColumnMenu.displayName = \"GridColumnMenu\";\nGridColumnMenu.defaultSlots = GRID_COLUMN_MENU_SLOTS;\nGridColumnMenu.defaultSlotProps = GRID_COLUMN_MENU_SLOT_PROPS;\nprocess.env.NODE_ENV !== \"production\" ? GridColumnMenu.propTypes /* remove-proptypes */ = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the TypeScript types and run \"pnpm proptypes\" |\n // ----------------------------------------------------------------------\n colDef: PropTypes.object.isRequired,\n hideMenu: PropTypes.func.isRequired,\n id: PropTypes.string,\n labelledby: PropTypes.string,\n open: PropTypes.bool.isRequired,\n /**\n * Could be used to pass new props or override props specific to a column menu component\n * e.g. `displayOrder`\n */\n slotProps: PropTypes.object,\n /**\n * `slots` could be used to add new and (or) override default column menu items\n * If you register a nee component you must pass it's `displayOrder` in `slotProps`\n * or it will be placed in the end of the list\n */\n slots: PropTypes.object\n} : void 0;\nexport { GridColumnMenu, GridGenericColumnMenu };","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"className\"];\nimport * as React from 'react';\nimport clsx from 'clsx';\nimport { styled } from '@mui/material/styles';\nimport composeClasses from '@mui/utils/composeClasses';\nimport { forwardRef } from '@mui/x-internals/forwardRef';\nimport { getDataGridUtilityClass } from \"../../constants/gridClasses.mjs\";\nimport { useGridRootProps } from \"../../hooks/utils/useGridRootProps.mjs\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n classes\n } = ownerState;\n const slots = {\n root: ['panelWrapper']\n };\n return composeClasses(slots, getDataGridUtilityClass, classes);\n};\nconst GridPanelWrapperRoot = styled('div', {\n name: 'MuiDataGrid',\n slot: 'PanelWrapper'\n})({\n display: 'flex',\n flexDirection: 'column',\n flex: 1,\n '&:focus': {\n outline: 0\n }\n});\nconst GridPanelWrapper = forwardRef(function GridPanelWrapper(props, ref) {\n const {\n className\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const rootProps = useGridRootProps();\n const classes = useUtilityClasses(rootProps);\n return /*#__PURE__*/_jsx(GridPanelWrapperRoot, _extends({\n tabIndex: -1,\n className: clsx(classes.root, className),\n ownerState: rootProps\n }, other, {\n ref: ref\n }));\n});\nif (process.env.NODE_ENV !== \"production\") GridPanelWrapper.displayName = \"GridPanelWrapper\";\nexport { GridPanelWrapper };","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport { GridPanelWrapper } from \"./GridPanelWrapper.mjs\";\nimport { useGridRootProps } from \"../../hooks/utils/useGridRootProps.mjs\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction GridColumnsPanel(props) {\n const rootProps = useGridRootProps();\n return /*#__PURE__*/_jsx(GridPanelWrapper, _extends({}, props, {\n children: /*#__PURE__*/_jsx(rootProps.slots.columnsManagement, _extends({}, rootProps.slotProps?.columnsManagement))\n }));\n}\nexport { GridColumnsPanel };","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"children\", \"className\", \"classes\", \"onClose\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { styled } from '@mui/material/styles';\nimport generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport useEventCallback from '@mui/utils/useEventCallback';\nimport { forwardRef } from '@mui/x-internals/forwardRef';\nimport { vars } from \"../../constants/cssVariables.mjs\";\nimport { useCSSVariablesClass } from \"../../utils/css/context.mjs\";\nimport { useGridApiContext } from \"../../hooks/utils/useGridApiContext.mjs\";\nimport { useGridRootProps } from \"../../hooks/utils/useGridRootProps.mjs\";\nimport { NotRendered } from \"../../utils/assert.mjs\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport const gridPanelClasses = generateUtilityClasses('MuiDataGrid', ['panel', 'paper']);\nconst GridPanelRoot = styled(NotRendered, {\n name: 'MuiDataGrid',\n slot: 'panel'\n})({\n zIndex: vars.zIndex.panel\n});\nconst GridPanelContent = styled('div', {\n name: 'MuiDataGrid',\n slot: 'panelContent'\n})({\n backgroundColor: vars.colors.background.overlay,\n borderRadius: vars.radius.base,\n boxShadow: vars.shadows.overlay,\n display: 'flex',\n maxWidth: `calc(100vw - ${vars.spacing(2)})`,\n overflow: 'auto'\n});\nconst GridPanel = forwardRef((props, ref) => {\n const {\n children,\n className,\n onClose\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const apiRef = useGridApiContext();\n const rootProps = useGridRootProps();\n const classes = gridPanelClasses;\n const [isPlaced, setIsPlaced] = React.useState(false);\n const variablesClass = useCSSVariablesClass();\n const onDidShow = useEventCallback(() => setIsPlaced(true));\n const onDidHide = useEventCallback(() => setIsPlaced(false));\n const handleClickAway = useEventCallback(() => {\n onClose?.();\n });\n const handleKeyDown = useEventCallback(event => {\n if (event.key === 'Escape') {\n onClose?.();\n }\n });\n const [fallbackTarget, setFallbackTarget] = React.useState(null);\n React.useEffect(() => {\n const panelAnchor = apiRef.current.rootElementRef?.current?.querySelector('[data-id=\"gridPanelAnchor\"]');\n if (panelAnchor) {\n setFallbackTarget(panelAnchor);\n }\n }, [apiRef]);\n if (!fallbackTarget) {\n return null;\n }\n return /*#__PURE__*/_jsx(GridPanelRoot, _extends({\n as: rootProps.slots.basePopper,\n ownerState: rootProps,\n placement: \"bottom-end\",\n className: clsx(classes.panel, className, variablesClass),\n flip: true,\n onDidShow: onDidShow,\n onDidHide: onDidHide,\n onClickAway: handleClickAway,\n clickAwayMouseEvent: \"onPointerUp\",\n clickAwayTouchEvent: false,\n focusTrap: true\n }, other, rootProps.slotProps?.basePopper, {\n target: props.target ?? fallbackTarget,\n ref: ref,\n children: /*#__PURE__*/_jsx(GridPanelContent, {\n className: classes.paper,\n ownerState: rootProps,\n onKeyDown: handleKeyDown,\n children: isPlaced && children\n })\n }));\n});\nif (process.env.NODE_ENV !== \"production\") GridPanel.displayName = \"GridPanel\";\nprocess.env.NODE_ENV !== \"production\" ? GridPanel.propTypes /* remove-proptypes */ = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the TypeScript types and run \"pnpm proptypes\" |\n // ----------------------------------------------------------------------\n children: PropTypes.node,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n className: PropTypes.string,\n flip: PropTypes.bool,\n id: PropTypes.string,\n onClose: PropTypes.func,\n open: PropTypes.bool.isRequired,\n target: PropTypes /* @typescript-to-proptypes-ignore */.any\n} : void 0;\nexport { GridPanel };","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"className\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { styled } from '@mui/system';\nimport composeClasses from '@mui/utils/composeClasses';\nimport { vars } from \"../../constants/cssVariables.mjs\";\nimport { getDataGridUtilityClass } from \"../../constants/gridClasses.mjs\";\nimport { useGridRootProps } from \"../../hooks/utils/useGridRootProps.mjs\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n classes\n } = ownerState;\n const slots = {\n root: ['panelContent']\n };\n return composeClasses(slots, getDataGridUtilityClass, classes);\n};\nconst GridPanelContentRoot = styled('div', {\n name: 'MuiDataGrid',\n slot: 'PanelContent'\n})({\n display: 'flex',\n flexDirection: 'column',\n overflow: 'auto',\n flex: '1 1',\n maxHeight: 400,\n padding: vars.spacing(2.5, 1.5, 2, 1),\n gap: vars.spacing(2.5)\n});\nfunction GridPanelContent(props) {\n const {\n className\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const rootProps = useGridRootProps();\n const classes = useUtilityClasses(rootProps);\n return /*#__PURE__*/_jsx(GridPanelContentRoot, _extends({\n className: clsx(classes.root, className),\n ownerState: rootProps\n }, other));\n}\nprocess.env.NODE_ENV !== \"production\" ? GridPanelContent.propTypes /* remove-proptypes */ = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the TypeScript types and run \"pnpm proptypes\" |\n // ----------------------------------------------------------------------\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])\n} : void 0;\nexport { GridPanelContent };","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"className\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { styled } from '@mui/material/styles';\nimport composeClasses from '@mui/utils/composeClasses';\nimport { vars } from \"../../constants/cssVariables.mjs\";\nimport { getDataGridUtilityClass } from \"../../constants/gridClasses.mjs\";\nimport { useGridRootProps } from \"../../hooks/utils/useGridRootProps.mjs\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n classes\n } = ownerState;\n const slots = {\n root: ['panelFooter']\n };\n return composeClasses(slots, getDataGridUtilityClass, classes);\n};\nconst GridPanelFooterRoot = styled('div', {\n name: 'MuiDataGrid',\n slot: 'PanelFooter'\n})({\n padding: vars.spacing(1),\n display: 'flex',\n justifyContent: 'space-between',\n borderTop: `1px solid ${vars.colors.border.base}`\n});\nfunction GridPanelFooter(props) {\n const {\n className\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const rootProps = useGridRootProps();\n const classes = useUtilityClasses(rootProps);\n return /*#__PURE__*/_jsx(GridPanelFooterRoot, _extends({\n className: clsx(classes.root, className),\n ownerState: rootProps\n }, other));\n}\nprocess.env.NODE_ENV !== \"production\" ? GridPanelFooter.propTypes /* remove-proptypes */ = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the TypeScript types and run \"pnpm proptypes\" |\n // ----------------------------------------------------------------------\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])\n} : void 0;\nexport { GridPanelFooter };","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"className\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { styled } from '@mui/system';\nimport composeClasses from '@mui/utils/composeClasses';\nimport { vars } from \"../../constants/cssVariables.mjs\";\nimport { getDataGridUtilityClass } from \"../../constants/gridClasses.mjs\";\nimport { useGridRootProps } from \"../../hooks/utils/useGridRootProps.mjs\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n classes\n } = ownerState;\n const slots = {\n root: ['panelHeader']\n };\n return composeClasses(slots, getDataGridUtilityClass, classes);\n};\nconst GridPanelHeaderRoot = styled('div', {\n name: 'MuiDataGrid',\n slot: 'PanelHeader'\n})({\n padding: vars.spacing(1)\n});\n\n/**\n * @deprecated This component is not used internally and will be removed in a future major release.\n */\nfunction GridPanelHeader(props) {\n const {\n className\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const rootProps = useGridRootProps();\n const classes = useUtilityClasses(rootProps);\n return /*#__PURE__*/_jsx(GridPanelHeaderRoot, _extends({\n className: clsx(classes.root, className),\n ownerState: rootProps\n }, other));\n}\nprocess.env.NODE_ENV !== \"production\" ? GridPanelHeader.propTypes /* remove-proptypes */ = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the TypeScript types and run \"pnpm proptypes\" |\n // ----------------------------------------------------------------------\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])\n} : void 0;\nexport { GridPanelHeader };","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _formatErrorMessage from \"@mui/x-internals/formatErrorMessage\";\nconst _excluded = [\"item\", \"hasMultipleFilters\", \"deleteFilter\", \"applyFilterChanges\", \"showMultiFilterOperators\", \"disableMultiFilterOperator\", \"applyMultiFilterOperatorChanges\", \"focusElementRef\", \"logicOperators\", \"columnsSort\", \"filterColumns\", \"deleteIconProps\", \"logicOperatorInputProps\", \"operatorInputProps\", \"columnInputProps\", \"valueInputProps\", \"disableDebounce\", \"readOnly\", \"filterModel\", \"children\"],\n _excluded2 = [\"InputComponentProps\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport composeClasses from '@mui/utils/composeClasses';\nimport useId from '@mui/utils/useId';\nimport capitalize from '@mui/utils/capitalize';\nimport { styled } from '@mui/material/styles';\nimport { forwardRef } from '@mui/x-internals/forwardRef';\nimport { vars } from \"../../../constants/cssVariables.mjs\";\nimport { gridFilterableColumnDefinitionsSelector, gridColumnLookupSelector } from \"../../../hooks/features/columns/gridColumnsSelector.mjs\";\nimport { useGridSelector } from \"../../../hooks/utils/useGridSelector.mjs\";\nimport { GridLogicOperator } from \"../../../models/gridFilterItem.mjs\";\nimport { useGridApiContext } from \"../../../hooks/utils/useGridApiContext.mjs\";\nimport { useGridRootProps } from \"../../../hooks/utils/useGridRootProps.mjs\";\nimport { getDataGridUtilityClass } from \"../../../constants/gridClasses.mjs\";\nimport { getValueFromValueOptions, getValueOptions } from \"./filterPanelUtils.mjs\";\nimport { gridPivotActiveSelector, gridPivotInitialColumnsSelector } from \"../../../hooks/features/pivoting/index.mjs\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { createElement as _createElement } from \"react\";\nconst useUtilityClasses = ownerState => {\n const {\n classes\n } = ownerState;\n const slots = {\n root: ['filterForm'],\n deleteIcon: ['filterFormDeleteIcon'],\n logicOperatorInput: ['filterFormLogicOperatorInput'],\n columnInput: ['filterFormColumnInput'],\n operatorInput: ['filterFormOperatorInput'],\n valueInput: ['filterFormValueInput']\n };\n return composeClasses(slots, getDataGridUtilityClass, classes);\n};\nconst GridFilterFormRoot = styled('div', {\n name: 'MuiDataGrid',\n slot: 'FilterForm'\n})({\n display: 'flex',\n gap: vars.spacing(1.5)\n});\nconst FilterFormDeleteIcon = styled('div', {\n name: 'MuiDataGrid',\n slot: 'FilterFormDeleteIcon'\n})({\n flexShrink: 0,\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center'\n});\nconst FilterFormLogicOperatorInput = styled('div', {\n name: 'MuiDataGrid',\n slot: 'FilterFormLogicOperatorInput'\n})({\n minWidth: 75,\n justifyContent: 'end'\n});\nconst FilterFormColumnInput = styled('div', {\n name: 'MuiDataGrid',\n slot: 'FilterFormColumnInput'\n})({\n width: 150\n});\nconst FilterFormOperatorInput = styled('div', {\n name: 'MuiDataGrid',\n slot: 'FilterFormOperatorInput'\n})({\n width: 150\n});\nconst FilterFormValueInput = styled('div', {\n name: 'MuiDataGrid',\n slot: 'FilterFormValueInput'\n})({\n width: 190\n});\nconst getLogicOperatorLocaleKey = logicOperator => {\n switch (logicOperator) {\n case GridLogicOperator.And:\n return 'filterPanelOperatorAnd';\n case GridLogicOperator.Or:\n return 'filterPanelOperatorOr';\n default:\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'MUI X: Invalid `logicOperator` property in the `GridFilterPanel`.' : _formatErrorMessage(71));\n }\n};\nconst getColumnLabel = col => col.headerName || col.field;\nconst collator = new Intl.Collator();\nconst GridFilterFormBase = forwardRef(function GridFilterFormBase(props, ref) {\n const {\n item,\n hasMultipleFilters,\n deleteFilter,\n applyFilterChanges,\n showMultiFilterOperators,\n disableMultiFilterOperator,\n applyMultiFilterOperatorChanges,\n focusElementRef,\n logicOperators = [GridLogicOperator.And, GridLogicOperator.Or],\n columnsSort,\n filterColumns,\n deleteIconProps = {},\n logicOperatorInputProps = {},\n operatorInputProps = {},\n columnInputProps = {},\n valueInputProps = {},\n disableDebounce = false,\n readOnly,\n filterModel\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const apiRef = useGridApiContext();\n const columnLookup = useGridSelector(apiRef, gridColumnLookupSelector);\n const filterableColumns = useGridSelector(apiRef, gridFilterableColumnDefinitionsSelector);\n const columnSelectId = useId();\n const columnSelectLabelId = useId();\n const operatorSelectId = useId();\n const operatorSelectLabelId = useId();\n const rootProps = useGridRootProps();\n const classes = useUtilityClasses(rootProps);\n const valueRef = React.useRef(null);\n const filterSelectorRef = React.useRef(null);\n const multiFilterOperator = filterModel.logicOperator ?? GridLogicOperator.And;\n const hasLogicOperatorColumn = hasMultipleFilters && logicOperators.length > 0;\n const baseSelectProps = rootProps.slotProps?.baseSelect || {};\n const isBaseSelectNative = baseSelectProps.native ?? false;\n const baseSelectOptionProps = rootProps.slotProps?.baseSelectOption || {};\n const {\n InputComponentProps\n } = valueInputProps,\n valueInputPropsOther = _objectWithoutPropertiesLoose(valueInputProps, _excluded2);\n const pivotActive = useGridSelector(apiRef, gridPivotActiveSelector);\n const initialColumns = useGridSelector(apiRef, gridPivotInitialColumnsSelector);\n const {\n filteredColumns,\n selectedField\n } = React.useMemo(() => {\n let itemField = item.field;\n\n // Yields a valid value if the current filter belongs to a column that is not filterable\n const selectedNonFilterableColumn = columnLookup[item.field].filterable === false ? columnLookup[item.field] : null;\n if (selectedNonFilterableColumn) {\n return {\n filteredColumns: [selectedNonFilterableColumn],\n selectedField: itemField\n };\n }\n if (pivotActive) {\n return {\n filteredColumns: filterableColumns.filter(column => initialColumns.get(column.field) !== undefined),\n selectedField: itemField\n };\n }\n if (filterColumns === undefined || typeof filterColumns !== 'function') {\n return {\n filteredColumns: filterableColumns,\n selectedField: itemField\n };\n }\n const filteredFields = filterColumns({\n field: item.field,\n columns: filterableColumns,\n currentFilters: filterModel?.items || []\n });\n return {\n filteredColumns: filterableColumns.filter(column => {\n const isFieldIncluded = filteredFields.includes(column.field);\n if (column.field === item.field && !isFieldIncluded) {\n itemField = undefined;\n }\n return isFieldIncluded;\n }),\n selectedField: itemField\n };\n }, [item.field, columnLookup, pivotActive, filterColumns, filterableColumns, filterModel?.items, initialColumns]);\n const sortedFilteredColumns = React.useMemo(() => {\n switch (columnsSort) {\n case 'asc':\n return filteredColumns.sort((a, b) => collator.compare(getColumnLabel(a), getColumnLabel(b)));\n case 'desc':\n return filteredColumns.sort((a, b) => -collator.compare(getColumnLabel(a), getColumnLabel(b)));\n default:\n return filteredColumns;\n }\n }, [filteredColumns, columnsSort]);\n const currentColumn = item.field ? apiRef.current.getColumn(item.field) : null;\n const currentOperator = React.useMemo(() => {\n if (!item.operator || !currentColumn) {\n return null;\n }\n return currentColumn.filterOperators?.find(operator => operator.value === item.operator);\n }, [item, currentColumn]);\n const changeColumn = React.useCallback(event => {\n const field = event.target.value;\n const column = apiRef.current.getColumn(field);\n if (column.field === currentColumn.field) {\n // column did not change\n return;\n }\n\n // try to keep the same operator when column change\n const newOperator = column.filterOperators.find(operator => operator.value === item.operator) || column.filterOperators[0];\n\n // Erase filter value if the input component or filtered column type is modified\n const eraseFilterValue = !newOperator.InputComponent || newOperator.InputComponent !== currentOperator?.InputComponent || column.type !== currentColumn.type;\n let filterValue = eraseFilterValue ? undefined : item.value;\n\n // Check filter value against the new valueOptions\n if (column.type === 'singleSelect' && filterValue !== undefined) {\n const colDef = column;\n const valueOptions = getValueOptions(colDef);\n if (Array.isArray(filterValue)) {\n filterValue = filterValue.filter(val => {\n return (\n // Only keep values that are in the new value options\n getValueFromValueOptions(val, valueOptions, colDef?.getOptionValue) !== undefined\n );\n });\n } else if (getValueFromValueOptions(item.value, valueOptions, colDef?.getOptionValue) === undefined) {\n // Reset the filter value if it is not in the new value options\n filterValue = undefined;\n }\n }\n applyFilterChanges(_extends({}, item, {\n field,\n operator: newOperator.value,\n value: filterValue\n }));\n }, [apiRef, applyFilterChanges, item, currentColumn, currentOperator]);\n const changeOperator = React.useCallback(event => {\n const operator = event.target.value;\n const newOperator = currentColumn?.filterOperators.find(op => op.value === operator);\n const eraseItemValue = !newOperator?.InputComponent || newOperator?.InputComponent !== currentOperator?.InputComponent;\n applyFilterChanges(_extends({}, item, {\n operator,\n value: eraseItemValue ? undefined : item.value\n }));\n }, [applyFilterChanges, item, currentColumn, currentOperator]);\n const changeLogicOperator = React.useCallback(event => {\n const logicOperator = event.target.value === GridLogicOperator.And.toString() ? GridLogicOperator.And : GridLogicOperator.Or;\n applyMultiFilterOperatorChanges(logicOperator);\n }, [applyMultiFilterOperatorChanges]);\n const handleDeleteFilter = () => {\n deleteFilter(item);\n };\n React.useImperativeHandle(focusElementRef, () => ({\n focus: () => {\n if (currentOperator?.InputComponent) {\n valueRef?.current?.focus();\n } else {\n filterSelectorRef.current.focus();\n }\n }\n }), [currentOperator]);\n return /*#__PURE__*/_jsxs(GridFilterFormRoot, _extends({\n className: classes.root,\n \"data-id\": item.id,\n ownerState: rootProps\n }, other, {\n ref: ref,\n children: [/*#__PURE__*/_jsx(FilterFormDeleteIcon, _extends({}, deleteIconProps, {\n className: clsx(classes.deleteIcon, deleteIconProps.className),\n ownerState: rootProps,\n children: /*#__PURE__*/_jsx(rootProps.slots.baseIconButton, _extends({\n \"aria-label\": apiRef.current.getLocaleText('filterPanelDeleteIconLabel'),\n title: apiRef.current.getLocaleText('filterPanelDeleteIconLabel'),\n onClick: handleDeleteFilter,\n size: \"small\",\n disabled: readOnly\n }, rootProps.slotProps?.baseIconButton, {\n children: /*#__PURE__*/_jsx(rootProps.slots.filterPanelDeleteIcon, {\n fontSize: \"small\"\n })\n }))\n })), /*#__PURE__*/_jsx(FilterFormLogicOperatorInput, _extends({\n as: rootProps.slots.baseSelect,\n sx: [hasLogicOperatorColumn ? {\n display: 'flex'\n } : {\n display: 'none'\n }, showMultiFilterOperators ? {\n visibility: 'visible'\n } : {\n visibility: 'hidden'\n }, logicOperatorInputProps.sx],\n className: clsx(classes.logicOperatorInput, logicOperatorInputProps.className),\n ownerState: rootProps\n }, logicOperatorInputProps, {\n size: \"small\",\n slotProps: {\n htmlInput: {\n 'aria-label': apiRef.current.getLocaleText('filterPanelLogicOperator')\n }\n },\n value: multiFilterOperator ?? '',\n onChange: changeLogicOperator,\n disabled: !!disableMultiFilterOperator || logicOperators.length === 1,\n native: isBaseSelectNative\n }, rootProps.slotProps?.baseSelect, {\n children: logicOperators.map(logicOperator => /*#__PURE__*/_createElement(rootProps.slots.baseSelectOption, _extends({}, baseSelectOptionProps, {\n native: isBaseSelectNative,\n key: logicOperator.toString(),\n value: logicOperator.toString()\n }), apiRef.current.getLocaleText(getLogicOperatorLocaleKey(logicOperator))))\n })), /*#__PURE__*/_jsx(FilterFormColumnInput, _extends({\n as: rootProps.slots.baseSelect\n }, columnInputProps, {\n className: clsx(classes.columnInput, columnInputProps.className),\n ownerState: rootProps,\n size: \"small\",\n labelId: columnSelectLabelId,\n id: columnSelectId,\n label: apiRef.current.getLocaleText('filterPanelColumn'),\n value: selectedField ?? '',\n onChange: changeColumn,\n native: isBaseSelectNative,\n disabled: readOnly\n }, rootProps.slotProps?.baseSelect, {\n children: sortedFilteredColumns.map(col => /*#__PURE__*/_createElement(rootProps.slots.baseSelectOption, _extends({}, baseSelectOptionProps, {\n native: isBaseSelectNative,\n key: col.field,\n value: col.field\n }), getColumnLabel(col)))\n })), /*#__PURE__*/_jsx(FilterFormOperatorInput, _extends({\n as: rootProps.slots.baseSelect,\n size: \"small\"\n }, operatorInputProps, {\n className: clsx(classes.operatorInput, operatorInputProps.className),\n ownerState: rootProps,\n labelId: operatorSelectLabelId,\n label: apiRef.current.getLocaleText('filterPanelOperator'),\n id: operatorSelectId,\n value: item.operator,\n onChange: changeOperator,\n native: isBaseSelectNative,\n inputRef: filterSelectorRef,\n disabled: readOnly\n }, rootProps.slotProps?.baseSelect, {\n children: currentColumn?.filterOperators?.map(operator => /*#__PURE__*/_createElement(rootProps.slots.baseSelectOption, _extends({}, baseSelectOptionProps, {\n native: isBaseSelectNative,\n key: operator.value,\n value: operator.value\n }), operator.label || apiRef.current.getLocaleText(`filterOperator${capitalize(operator.value)}`)))\n })), /*#__PURE__*/_jsx(FilterFormValueInput, _extends({}, valueInputPropsOther, {\n className: clsx(classes.valueInput, valueInputPropsOther.className),\n ownerState: rootProps,\n children: currentOperator?.InputComponent ? /*#__PURE__*/_jsx(currentOperator.InputComponent, _extends({\n apiRef: apiRef,\n item: item,\n applyValue: applyFilterChanges,\n focusElementRef: valueRef,\n disabled: readOnly,\n disableDebounce: disableDebounce,\n slotProps: {\n root: {\n size: 'small'\n }\n }\n }, currentOperator.InputComponentProps, InputComponentProps), item.field) : null\n }))]\n }));\n});\nif (process.env.NODE_ENV !== \"production\") GridFilterFormBase.displayName = \"GridFilterFormBase\";\nprocess.env.NODE_ENV !== \"production\" ? GridFilterFormBase.propTypes /* remove-proptypes */ = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the TypeScript types and run \"pnpm proptypes\" |\n // ----------------------------------------------------------------------\n /**\n * Callback called when the operator, column field or value is changed.\n * @param {GridFilterItem} item The updated [[GridFilterItem]].\n */\n applyFilterChanges: PropTypes.func.isRequired,\n /**\n * Callback called when the logic operator is changed.\n * @param {GridLogicOperator} operator The new logic operator.\n */\n applyMultiFilterOperatorChanges: PropTypes.func.isRequired,\n /**\n * @ignore - do not document.\n */\n children: PropTypes.node,\n /**\n * Props passed to the column input component.\n * @default {}\n */\n columnInputProps: PropTypes.any,\n /**\n * Changes how the options in the columns selector should be ordered.\n * If not specified, the order is derived from the `columns` prop.\n */\n columnsSort: PropTypes.oneOf(['asc', 'desc']),\n /**\n * Callback called when the delete button is clicked.\n * @param {GridFilterItem} item The deleted [[GridFilterItem]].\n */\n deleteFilter: PropTypes.func.isRequired,\n /**\n * Props passed to the delete icon.\n * @default {}\n */\n deleteIconProps: PropTypes.any,\n /**\n * If `true`, disables the logic operator field but still renders it.\n */\n disableMultiFilterOperator: PropTypes.bool,\n /**\n * Allows to filter the columns displayed in the filter form.\n * @param {FilterColumnsArgs} args The columns of the grid and name of field.\n * @returns {GridColDef['field'][]} The filtered fields array.\n */\n filterColumns: PropTypes.func,\n /**\n * The filter model that populates the form.\n * Its `logicOperator` drives the logic operator field and its `items` are used to compute the\n * columns available in the column selector (e.g. via the `filterColumns` callback).\n */\n filterModel: PropTypes.shape({\n items: PropTypes.arrayOf(PropTypes.shape({\n field: PropTypes.string.isRequired,\n id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n operator: PropTypes.string.isRequired,\n value: PropTypes.any\n })).isRequired,\n logicOperator: PropTypes.oneOf(['and', 'or']),\n quickFilterExcludeHiddenColumns: PropTypes.bool,\n quickFilterLogicOperator: PropTypes.oneOf(['and', 'or']),\n quickFilterValues: PropTypes.array\n }).isRequired,\n /**\n * A ref allowing to set imperative focus.\n * It can be passed to the el\n */\n focusElementRef: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.func, PropTypes.object]),\n /**\n * If `true`, the logic operator field is rendered.\n * The field will be invisible if `showMultiFilterOperators` is also `true`.\n */\n hasMultipleFilters: PropTypes.bool.isRequired,\n /**\n * The [[GridFilterItem]] representing this form.\n */\n item: PropTypes.shape({\n field: PropTypes.string.isRequired,\n id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n operator: PropTypes.string.isRequired,\n value: PropTypes.any\n }).isRequired,\n /**\n * Props passed to the logic operator input component.\n * @default {}\n */\n logicOperatorInputProps: PropTypes.any,\n /**\n * Sets the available logic operators.\n * @default [GridLogicOperator.And, GridLogicOperator.Or]\n */\n logicOperators: PropTypes.arrayOf(PropTypes.oneOf(['and', 'or']).isRequired),\n /**\n * Props passed to the operator input component.\n * @default {}\n */\n operatorInputProps: PropTypes.any,\n /**\n * `true` if the filter is disabled/read only.\n * i.e. `colDef.fiterable = false` but passed in `filterModel`\n * @default false\n */\n readOnly: PropTypes.bool,\n /**\n * If `true`, the logic operator field is visible.\n */\n showMultiFilterOperators: PropTypes.bool,\n /**\n * Props passed to the value input component.\n * @default {}\n */\n valueInputProps: PropTypes.any\n} : void 0;\n\n/**\n * The lower-level filter form rendered by `GridFilterForm` and `GridFilterPanelBase`.\n * It is controlled through the `filterModel` prop instead of reading the grid filter state.\n * This is an internal component that is not part of the public API.\n */\nexport { GridFilterFormBase };","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { forwardRef } from '@mui/x-internals/forwardRef';\nimport { useGridApiContext } from \"../../../hooks/utils/useGridApiContext.mjs\";\nimport { useGridSelector } from \"../../../hooks/utils/useGridSelector.mjs\";\nimport { gridFilterModelSelector } from \"../../../hooks/features/filter/gridFilterSelector.mjs\";\nimport { GridFilterFormBase } from \"./GridFilterFormBase.mjs\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst GridFilterForm = forwardRef(function GridFilterForm(props, ref) {\n const apiRef = useGridApiContext();\n const filterModel = useGridSelector(apiRef, gridFilterModelSelector);\n return /*#__PURE__*/_jsx(GridFilterFormBase, _extends({\n filterModel: filterModel\n }, props, {\n ref: ref\n }));\n});\nif (process.env.NODE_ENV !== \"production\") GridFilterForm.displayName = \"GridFilterForm\";\nprocess.env.NODE_ENV !== \"production\" ? GridFilterForm.propTypes /* remove-proptypes */ = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the TypeScript types and run \"pnpm proptypes\" |\n // ----------------------------------------------------------------------\n /**\n * Callback called when the operator, column field or value is changed.\n * @param {GridFilterItem} item The updated [[GridFilterItem]].\n */\n applyFilterChanges: PropTypes.func.isRequired,\n /**\n * Callback called when the logic operator is changed.\n * @param {GridLogicOperator} operator The new logic operator.\n */\n applyMultiFilterOperatorChanges: PropTypes.func.isRequired,\n /**\n * @ignore - do not document.\n */\n children: PropTypes.node,\n /**\n * Props passed to the column input component.\n * @default {}\n */\n columnInputProps: PropTypes.any,\n /**\n * Changes how the options in the columns selector should be ordered.\n * If not specified, the order is derived from the `columns` prop.\n */\n columnsSort: PropTypes.oneOf(['asc', 'desc']),\n /**\n * Callback called when the delete button is clicked.\n * @param {GridFilterItem} item The deleted [[GridFilterItem]].\n */\n deleteFilter: PropTypes.func.isRequired,\n /**\n * Props passed to the delete icon.\n * @default {}\n */\n deleteIconProps: PropTypes.any,\n /**\n * If `true`, disables the logic operator field but still renders it.\n */\n disableMultiFilterOperator: PropTypes.bool,\n /**\n * Allows to filter the columns displayed in the filter form.\n * @param {FilterColumnsArgs} args The columns of the grid and name of field.\n * @returns {GridColDef['field'][]} The filtered fields array.\n */\n filterColumns: PropTypes.func,\n /**\n * A ref allowing to set imperative focus.\n * It can be passed to the el\n */\n focusElementRef: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.func, PropTypes.object]),\n /**\n * If `true`, the logic operator field is rendered.\n * The field will be invisible if `showMultiFilterOperators` is also `true`.\n */\n hasMultipleFilters: PropTypes.bool.isRequired,\n /**\n * The [[GridFilterItem]] representing this form.\n */\n item: PropTypes.shape({\n field: PropTypes.string.isRequired,\n id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n operator: PropTypes.string.isRequired,\n value: PropTypes.any\n }).isRequired,\n /**\n * Props passed to the logic operator input component.\n * @default {}\n */\n logicOperatorInputProps: PropTypes.any,\n /**\n * Sets the available logic operators.\n * @default [GridLogicOperator.And, GridLogicOperator.Or]\n */\n logicOperators: PropTypes.arrayOf(PropTypes.oneOf(['and', 'or']).isRequired),\n /**\n * Props passed to the operator input component.\n * @default {}\n */\n operatorInputProps: PropTypes.any,\n /**\n * `true` if the filter is disabled/read only.\n * i.e. `colDef.fiterable = false` but passed in `filterModel`\n * @default false\n */\n readOnly: PropTypes.bool,\n /**\n * If `true`, the logic operator field is visible.\n */\n showMultiFilterOperators: PropTypes.bool,\n /**\n * Props passed to the value input component.\n * @default {}\n */\n valueInputProps: PropTypes.any\n} : void 0;\n\n/**\n * Demos:\n * - [Filtering - overview](https://mui.com/x/react-data-grid/filtering/)\n *\n * API:\n * - [GridFilterForm API](https://mui.com/x/api/data-grid/grid-filter-form/)\n */\nexport { GridFilterForm };","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"logicOperators\", \"columnsSort\", \"filterFormProps\", \"getColumnForNewFilter\", \"children\", \"disableAddFilterButton\", \"disableRemoveAllButton\", \"disableDebounce\", \"filterModel\", \"onFilterModelChange\", \"onClose\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { forwardRef } from '@mui/x-internals/forwardRef';\nimport { GridLogicOperator } from \"../../../models/gridFilterItem.mjs\";\nimport { useGridApiContext } from \"../../../hooks/utils/useGridApiContext.mjs\";\nimport { GridPanelContent } from \"../GridPanelContent.mjs\";\nimport { GridPanelFooter } from \"../GridPanelFooter.mjs\";\nimport { GridPanelWrapper } from \"../GridPanelWrapper.mjs\";\nimport { GridFilterFormBase } from \"./GridFilterFormBase.mjs\";\nimport { useGridRootProps } from \"../../../hooks/utils/useGridRootProps.mjs\";\nimport { useGridSelector } from \"../../../hooks/utils/useGridSelector.mjs\";\nimport { gridFilterableColumnDefinitionsSelector, gridFilterableColumnLookupSelector } from \"../../../hooks/features/columns/gridColumnsSelector.mjs\";\nimport { upsertFilterItemInModel, upsertFilterItemsInModel, deleteFilterItemFromModel, setFilterLogicOperatorInModel } from \"../../../hooks/features/filter/gridFilterUtils.mjs\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst getGridFilter = col => ({\n field: col.field,\n operator: col.filterOperators[0].value,\n id: Math.round(Math.random() * 1e5)\n});\nconst GridFilterPanelBase = forwardRef(function GridFilterPanelBase(props, ref) {\n const apiRef = useGridApiContext();\n const rootProps = useGridRootProps();\n const filterableColumns = useGridSelector(apiRef, gridFilterableColumnDefinitionsSelector);\n const filterableColumnsLookup = useGridSelector(apiRef, gridFilterableColumnLookupSelector);\n const lastFilterRef = React.useRef(null);\n const placeholderFilter = React.useRef(null);\n const {\n logicOperators = [GridLogicOperator.And, GridLogicOperator.Or],\n columnsSort,\n filterFormProps,\n getColumnForNewFilter,\n disableAddFilterButton = false,\n disableRemoveAllButton = false,\n disableDebounce = true,\n filterModel,\n onFilterModelChange,\n onClose\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const applyFilter = React.useCallback(item => {\n onFilterModelChange(upsertFilterItemInModel(filterModel, item), 'upsertFilterItem');\n }, [filterModel, onFilterModelChange]);\n const applyFilterLogicOperator = React.useCallback(operator => {\n onFilterModelChange(setFilterLogicOperatorInModel(filterModel, operator), 'changeLogicOperator');\n }, [filterModel, onFilterModelChange]);\n const getDefaultFilter = React.useCallback(() => {\n let nextColumnWithOperator;\n if (getColumnForNewFilter && typeof getColumnForNewFilter === 'function') {\n // To allow override the column for default (first) filter\n const nextFieldName = getColumnForNewFilter({\n currentFilters: filterModel?.items || [],\n columns: filterableColumns\n });\n if (nextFieldName === null) {\n return null;\n }\n nextColumnWithOperator = filterableColumns.find(({\n field\n }) => field === nextFieldName);\n } else {\n nextColumnWithOperator = filterableColumns.find(colDef => colDef.filterOperators?.length);\n }\n if (!nextColumnWithOperator) {\n return null;\n }\n return getGridFilter(nextColumnWithOperator);\n }, [filterModel?.items, filterableColumns, getColumnForNewFilter]);\n const getNewFilter = React.useCallback(() => {\n if (getColumnForNewFilter === undefined || typeof getColumnForNewFilter !== 'function') {\n return getDefaultFilter();\n }\n const currentFilters = filterModel.items.length ? filterModel.items : [getDefaultFilter()].filter(Boolean);\n\n // If no items are there in filterModel, we have to pass defaultFilter\n const nextColumnFieldName = getColumnForNewFilter({\n currentFilters: currentFilters,\n columns: filterableColumns\n });\n if (nextColumnFieldName === null) {\n return null;\n }\n const nextColumnWithOperator = filterableColumns.find(({\n field\n }) => field === nextColumnFieldName);\n if (!nextColumnWithOperator) {\n return null;\n }\n return getGridFilter(nextColumnWithOperator);\n }, [filterModel.items, filterableColumns, getColumnForNewFilter, getDefaultFilter]);\n const items = React.useMemo(() => {\n if (filterModel.items.length) {\n return filterModel.items;\n }\n if (!placeholderFilter.current) {\n placeholderFilter.current = getDefaultFilter();\n }\n return placeholderFilter.current ? [placeholderFilter.current] : [];\n }, [filterModel.items, getDefaultFilter]);\n const hasMultipleFilters = items.length > 1;\n const {\n readOnlyFilters,\n validFilters\n } = React.useMemo(() => items.reduce((acc, item) => {\n if (filterableColumnsLookup[item.field]) {\n acc.validFilters.push(item);\n } else {\n acc.readOnlyFilters.push(item);\n }\n return acc;\n }, {\n readOnlyFilters: [],\n validFilters: []\n }), [items, filterableColumnsLookup]);\n const addNewFilter = React.useCallback(() => {\n const newFilter = getNewFilter();\n if (!newFilter) {\n return;\n }\n onFilterModelChange(upsertFilterItemsInModel(filterModel, [...items, newFilter]), 'upsertFilterItems');\n }, [filterModel, onFilterModelChange, getNewFilter, items]);\n const deleteFilter = React.useCallback(item => {\n const shouldCloseFilterPanel = validFilters.length === 1;\n onFilterModelChange(deleteFilterItemFromModel(filterModel, item), 'deleteFilterItem');\n if (shouldCloseFilterPanel) {\n onClose?.();\n }\n }, [filterModel, onFilterModelChange, onClose, validFilters.length]);\n const handleRemoveAll = React.useCallback(() => {\n if (validFilters.length === 1 && validFilters[0].value === undefined) {\n onFilterModelChange(deleteFilterItemFromModel(filterModel, validFilters[0]), 'deleteFilterItem');\n onClose?.();\n return;\n }\n onFilterModelChange(_extends({}, filterModel, {\n items: readOnlyFilters\n }), 'removeAllFilterItems');\n }, [filterModel, onFilterModelChange, onClose, readOnlyFilters, validFilters]);\n React.useEffect(() => {\n if (logicOperators.length > 0 && filterModel.logicOperator && !logicOperators.includes(filterModel.logicOperator)) {\n applyFilterLogicOperator(logicOperators[0]);\n }\n }, [logicOperators, applyFilterLogicOperator, filterModel.logicOperator]);\n React.useEffect(() => {\n if (validFilters.length > 0) {\n lastFilterRef.current.focus();\n }\n }, [validFilters.length]);\n return /*#__PURE__*/_jsxs(GridPanelWrapper, _extends({}, other, {\n ref: ref,\n children: [/*#__PURE__*/_jsxs(GridPanelContent, {\n children: [readOnlyFilters.map((item, index) => /*#__PURE__*/_jsx(GridFilterFormBase, _extends({\n item: item,\n filterModel: filterModel,\n applyFilterChanges: applyFilter,\n deleteFilter: deleteFilter,\n hasMultipleFilters: hasMultipleFilters,\n showMultiFilterOperators: index > 0,\n disableMultiFilterOperator: index !== 1,\n applyMultiFilterOperatorChanges: applyFilterLogicOperator,\n focusElementRef: null,\n readOnly: true,\n logicOperators: logicOperators,\n columnsSort: columnsSort,\n disableDebounce: disableDebounce\n }, filterFormProps), item.id == null ? index : item.id)), validFilters.map((item, index) => /*#__PURE__*/_jsx(GridFilterFormBase, _extends({\n item: item,\n filterModel: filterModel,\n applyFilterChanges: applyFilter,\n deleteFilter: deleteFilter,\n hasMultipleFilters: hasMultipleFilters,\n showMultiFilterOperators: readOnlyFilters.length + index > 0,\n disableMultiFilterOperator: readOnlyFilters.length + index !== 1,\n applyMultiFilterOperatorChanges: applyFilterLogicOperator,\n focusElementRef: index === validFilters.length - 1 ? lastFilterRef : null,\n logicOperators: logicOperators,\n columnsSort: columnsSort,\n disableDebounce: disableDebounce\n }, filterFormProps), item.id == null ? index + readOnlyFilters.length : item.id))]\n }), !rootProps.disableMultipleColumnsFiltering && !(disableAddFilterButton && disableRemoveAllButton) ? /*#__PURE__*/_jsxs(GridPanelFooter, {\n children: [!disableAddFilterButton ? /*#__PURE__*/_jsx(rootProps.slots.baseButton, _extends({\n onClick: addNewFilter,\n startIcon: /*#__PURE__*/_jsx(rootProps.slots.filterPanelAddIcon, {})\n }, rootProps.slotProps?.baseButton, {\n children: apiRef.current.getLocaleText('filterPanelAddFilter')\n })) : /*#__PURE__*/_jsx(\"span\", {}), !disableRemoveAllButton && validFilters.length > 0 ? /*#__PURE__*/_jsx(rootProps.slots.baseButton, _extends({\n onClick: handleRemoveAll,\n startIcon: /*#__PURE__*/_jsx(rootProps.slots.filterPanelRemoveAllIcon, {})\n }, rootProps.slotProps?.baseButton, {\n children: apiRef.current.getLocaleText('filterPanelRemoveAll')\n })) : null]\n }) : null]\n }));\n});\nif (process.env.NODE_ENV !== \"production\") GridFilterPanelBase.displayName = \"GridFilterPanelBase\";\nprocess.env.NODE_ENV !== \"production\" ? GridFilterPanelBase.propTypes /* remove-proptypes */ = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the TypeScript types and run \"pnpm proptypes\" |\n // ----------------------------------------------------------------------\n /**\n * @ignore - do not document.\n */\n children: PropTypes.node,\n /**\n * Changes how the options in the columns selector should be ordered.\n * If not specified, the order is derived from the `columns` prop.\n */\n columnsSort: PropTypes.oneOf(['asc', 'desc']),\n /**\n * If `true`, the `Add filter` button will not be displayed.\n * @default false\n */\n disableAddFilterButton: PropTypes.bool,\n /**\n * If `true`, filter value changes are applied immediately without debouncing.\n * @default true\n */\n disableDebounce: PropTypes.bool,\n /**\n * If `true`, the `Remove all` button will be disabled\n * @default false\n */\n disableRemoveAllButton: PropTypes.bool,\n /**\n * Props passed to each filter form.\n */\n filterFormProps: PropTypes.shape({\n columnInputProps: PropTypes.any,\n columnsSort: PropTypes.oneOf(['asc', 'desc']),\n deleteIconProps: PropTypes.any,\n filterColumns: PropTypes.func,\n logicOperatorInputProps: PropTypes.any,\n operatorInputProps: PropTypes.any,\n valueInputProps: PropTypes.any\n }),\n /**\n * The filter model edited by the panel.\n */\n filterModel: PropTypes.shape({\n items: PropTypes.arrayOf(PropTypes.shape({\n field: PropTypes.string.isRequired,\n id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n operator: PropTypes.string.isRequired,\n value: PropTypes.any\n })).isRequired,\n logicOperator: PropTypes.oneOf(['and', 'or']),\n quickFilterExcludeHiddenColumns: PropTypes.bool,\n quickFilterLogicOperator: PropTypes.oneOf(['and', 'or']),\n quickFilterValues: PropTypes.array\n }).isRequired,\n /**\n * Function that returns the next filter item to be picked as default filter.\n * @param {GetColumnForNewFilterArgs} args Currently configured filters and columns.\n * @returns {GridColDef['field']} The field to be used for the next filter or `null` to prevent adding a filter.\n */\n getColumnForNewFilter: PropTypes.func,\n /**\n * Sets the available logic operators.\n * @default [GridLogicOperator.And, GridLogicOperator.Or]\n */\n logicOperators: PropTypes.arrayOf(PropTypes.oneOf(['and', 'or']).isRequired),\n /**\n * Callback fired when the panel requests to be closed, e.g. after the last filter is removed.\n * In `GridFilterPanel` it hides the grid filter panel; for standalone usage it is a no-op\n * unless provided.\n */\n onClose: PropTypes.func,\n /**\n * Callback fired when the filter model is changed through the panel.\n * @param {GridFilterModel} model The new filter model.\n * @param {GridControlledStateReasonLookup['filter']} reason The reason for the model to have changed.\n */\n onFilterModelChange: PropTypes.func.isRequired,\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])\n} : void 0;\n\n/**\n * The lower-level filter panel used by `GridFilterPanel`.\n * Unlike `GridFilterPanel`, it does not read or mutate the grid filter state — the model is\n * provided through the `filterModel` prop and edits are reported through `onFilterModelChange`,\n * which makes it usable with a controlled (draft) filter model.\n *\n * Demos:\n * - [Filtering - overview](https://mui.com/x/react-data-grid/filtering/)\n *\n * API:\n * - [GridFilterPanelBase API](https://mui.com/x/api/data-grid/grid-filter-panel-base/)\n */\nexport { GridFilterPanelBase, getGridFilter };","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { forwardRef } from '@mui/x-internals/forwardRef';\nimport { useGridApiContext } from \"../../../hooks/utils/useGridApiContext.mjs\";\nimport { useGridSelector } from \"../../../hooks/utils/useGridSelector.mjs\";\nimport { gridFilterModelSelector } from \"../../../hooks/features/filter/gridFilterSelector.mjs\";\nimport { GridFilterPanelBase } from \"./GridFilterPanelBase.mjs\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst GridFilterPanel = forwardRef(function GridFilterPanel(props, ref) {\n const apiRef = useGridApiContext();\n const filterModel = useGridSelector(apiRef, gridFilterModelSelector);\n const handleFilterModelChange = React.useCallback((model, reason) => {\n apiRef.current.setFilterModel(model, reason);\n }, [apiRef]);\n const handleClose = React.useCallback(() => {\n apiRef.current.hideFilterPanel();\n }, [apiRef]);\n return /*#__PURE__*/_jsx(GridFilterPanelBase, _extends({}, props, {\n filterModel: filterModel,\n onFilterModelChange: handleFilterModelChange,\n onClose: handleClose,\n ref: ref,\n disableDebounce: false\n }));\n});\nif (process.env.NODE_ENV !== \"production\") GridFilterPanel.displayName = \"GridFilterPanel\";\nprocess.env.NODE_ENV !== \"production\" ? GridFilterPanel.propTypes /* remove-proptypes */ = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the TypeScript types and run \"pnpm proptypes\" |\n // ----------------------------------------------------------------------\n /**\n * @ignore - do not document.\n */\n children: PropTypes.node,\n /**\n * Changes how the options in the columns selector should be ordered.\n * If not specified, the order is derived from the `columns` prop.\n */\n columnsSort: PropTypes.oneOf(['asc', 'desc']),\n /**\n * If `true`, the `Add filter` button will not be displayed.\n * @default false\n */\n disableAddFilterButton: PropTypes.bool,\n /**\n * If `true`, the `Remove all` button will be disabled\n * @default false\n */\n disableRemoveAllButton: PropTypes.bool,\n /**\n * Props passed to each filter form.\n */\n filterFormProps: PropTypes.shape({\n columnInputProps: PropTypes.any,\n columnsSort: PropTypes.oneOf(['asc', 'desc']),\n deleteIconProps: PropTypes.any,\n filterColumns: PropTypes.func,\n logicOperatorInputProps: PropTypes.any,\n operatorInputProps: PropTypes.any,\n valueInputProps: PropTypes.any\n }),\n /**\n * Function that returns the next filter item to be picked as default filter.\n * @param {GetColumnForNewFilterArgs} args Currently configured filters and columns.\n * @returns {GridColDef['field']} The field to be used for the next filter or `null` to prevent adding a filter.\n */\n getColumnForNewFilter: PropTypes.func,\n /**\n * Sets the available logic operators.\n * @default [GridLogicOperator.And, GridLogicOperator.Or]\n */\n logicOperators: PropTypes.arrayOf(PropTypes.oneOf(['and', 'or']).isRequired),\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])\n} : void 0;\n\n/**\n * Demos:\n * - [Filtering - overview](https://mui.com/x/react-data-grid/filtering/)\n *\n * API:\n * - [GridFilterPanel API](https://mui.com/x/api/data-grid/grid-filter-panel/)\n */\nexport { GridFilterPanel };\nexport { getGridFilter } from \"./GridFilterPanelBase.mjs\";","export const checkColumnVisibilityModelsSame = (a, b) => {\n // Filter `false` values only, as `true` and not having a key are the same\n const aFalseValues = new Set(Object.keys(a).filter(key => a[key] === false));\n const bFalseValues = new Set(Object.keys(b).filter(key => b[key] === false));\n if (aFalseValues.size !== bFalseValues.size) {\n return false;\n }\n let result = true;\n aFalseValues.forEach(key => {\n if (!bFalseValues.has(key)) {\n result = false;\n }\n });\n return result;\n};\nexport const defaultSearchPredicate = (column, searchValue) => (column.headerName || column.field).toLowerCase().indexOf(searchValue) > -1;","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"children\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { styled, keyframes } from '@mui/system';\nimport { forwardRef } from '@mui/x-internals/forwardRef';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst reveal = keyframes({\n from: {\n opacity: 0\n },\n to: {\n opacity: 1\n }\n});\nconst detectScroll = keyframes({\n 'from, to': {\n '--scrollable': '\" \"'\n }\n});\n\n// This `styled()` function invokes keyframes. `styled-components` only supports keyframes\n// in string templates. Do not convert these styles in JS object as it will break.\nconst ShadowScrollArea = styled('div', {\n name: 'MuiDataGrid',\n slot: 'ShadowScrollArea'\n})`\n flex: 1;\n display: flex;\n flex-direction: column;\n animation: ${detectScroll};\n animation-timeline: --scroll-timeline;\n animation-fill-mode: none;\n box-sizing: border-box;\n overflow: auto;\n scrollbar-width: thin;\n scroll-timeline: --scroll-timeline block;\n\n &::before,\n &::after {\n content: '';\n flex-shrink: 0;\n display: block;\n position: sticky;\n left: 0;\n width: 100%;\n height: 4px;\n animation: ${reveal} linear both;\n animation-timeline: --scroll-timeline;\n\n // Custom property toggle trick:\n // - Detects if the element is scrollable\n // - https://css-tricks.com/the-css-custom-property-toggle-trick/\n --visibility-scrollable: var(--scrollable) visible;\n --visibility-not-scrollable: hidden;\n visibility: var(--visibility-scrollable, var(--visibility-not-scrollable));\n }\n\n &::before {\n top: 0;\n background: linear-gradient(to bottom, rgba(0, 0, 0, 0.05) 0, transparent 100%);\n animation-range: 0 4px;\n }\n\n &::after {\n bottom: 0;\n background: linear-gradient(to top, rgba(0, 0, 0, 0.05) 0, transparent 100%);\n animation-direction: reverse;\n animation-range: calc(100% - 4px) 100%;\n }\n`;\n\n/**\n * Adds scroll shadows above and below content in a scrollable container.\n */\nconst GridShadowScrollArea = forwardRef(function GridShadowScrollArea(props, ref) {\n const {\n children\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n return /*#__PURE__*/_jsx(ShadowScrollArea, _extends({}, other, {\n ref: ref,\n children: children\n }));\n});\nif (process.env.NODE_ENV !== \"production\") GridShadowScrollArea.displayName = \"GridShadowScrollArea\";\nprocess.env.NODE_ENV !== \"production\" ? GridShadowScrollArea.propTypes /* remove-proptypes */ = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the TypeScript types and run \"pnpm proptypes\" |\n // ----------------------------------------------------------------------\n children: PropTypes.node\n} : void 0;\nexport { GridShadowScrollArea };","/* eslint-disable @typescript-eslint/no-use-before-define */\n'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport composeClasses from '@mui/utils/composeClasses';\nimport debounce from '@mui/utils/debounce';\nimport { styled } from '@mui/material/styles';\nimport { inputBaseClasses } from '@mui/material/InputBase';\nimport { vars } from \"../../constants/cssVariables.mjs\";\nimport { gridColumnDefinitionsSelector, gridColumnVisibilityModelSelector, gridInitialColumnVisibilityModelSelector } from \"../../hooks/features/columns/gridColumnsSelector.mjs\";\nimport { useGridSelector } from \"../../hooks/utils/useGridSelector.mjs\";\nimport { useGridApiContext } from \"../../hooks/utils/useGridApiContext.mjs\";\nimport { useGridRootProps } from \"../../hooks/utils/useGridRootProps.mjs\";\nimport { getDataGridUtilityClass } from \"../../constants/gridClasses.mjs\";\nimport { checkColumnVisibilityModelsSame, defaultSearchPredicate } from \"./utils.mjs\";\nimport { NotRendered } from \"../../utils/assert.mjs\";\nimport { GridShadowScrollArea } from \"../GridShadowScrollArea.mjs\";\nimport { gridPivotActiveSelector, gridPivotInitialColumnsSelector } from \"../../hooks/features/pivoting/gridPivotingSelectors.mjs\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n classes\n } = ownerState;\n const slots = {\n root: ['columnsManagement'],\n header: ['columnsManagementHeader'],\n searchInput: ['columnsManagementSearchInput'],\n footer: ['columnsManagementFooter'],\n row: ['columnsManagementRow']\n };\n return composeClasses(slots, getDataGridUtilityClass, classes);\n};\nconst collator = new Intl.Collator();\nfunction GridColumnsManagement(props) {\n const apiRef = useGridApiContext();\n const searchInputRef = React.useRef(null);\n const initialColumnVisibilityModel = useGridSelector(apiRef, gridInitialColumnVisibilityModelSelector);\n const columnVisibilityModel = useGridSelector(apiRef, gridColumnVisibilityModelSelector);\n const rootProps = useGridRootProps();\n const [searchValue, setSearchValue] = React.useState('');\n const classes = useUtilityClasses(rootProps);\n const columnDefinitions = useGridSelector(apiRef, gridColumnDefinitionsSelector);\n const pivotActive = useGridSelector(apiRef, gridPivotActiveSelector);\n const pivotInitialColumns = useGridSelector(apiRef, gridPivotInitialColumnsSelector);\n const columns = React.useMemo(() => pivotActive ? Array.from(pivotInitialColumns.values()) : columnDefinitions, [pivotActive, pivotInitialColumns, columnDefinitions]);\n const {\n sort,\n searchPredicate = defaultSearchPredicate,\n autoFocusSearchField = true,\n disableShowHideToggle = false,\n disableResetButton = false,\n toggleAllMode = 'all',\n getTogglableColumns,\n searchInputProps,\n searchDebounceMs = rootProps.columnFilterDebounceMs\n } = props;\n const debouncedFilter = React.useMemo(() => debounce(value => {\n setSearchValue(value);\n }, searchDebounceMs ?? 150), [searchDebounceMs]);\n const isResetDisabled = React.useMemo(() => checkColumnVisibilityModelsSame(columnVisibilityModel, initialColumnVisibilityModel), [columnVisibilityModel, initialColumnVisibilityModel]);\n const sortedColumns = React.useMemo(() => {\n switch (sort) {\n case 'asc':\n return [...columns].sort((a, b) => collator.compare(a.headerName || a.field, b.headerName || b.field));\n case 'desc':\n return [...columns].sort((a, b) => -collator.compare(a.headerName || a.field, b.headerName || b.field));\n default:\n return columns;\n }\n }, [columns, sort]);\n const toggleColumn = event => {\n const {\n name: field\n } = event.target;\n apiRef.current.setColumnVisibility(field, columnVisibilityModel[field] === false);\n };\n const currentColumns = React.useMemo(() => {\n const togglableColumns = getTogglableColumns ? getTogglableColumns(sortedColumns) : null;\n const togglableSortedColumns = togglableColumns ? sortedColumns.filter(({\n field\n }) => togglableColumns.includes(field)) : sortedColumns;\n if (!searchValue) {\n return togglableSortedColumns;\n }\n return togglableSortedColumns.filter(column => searchPredicate(column, searchValue.toLowerCase()));\n }, [sortedColumns, searchValue, searchPredicate, getTogglableColumns]);\n const toggleAllColumns = React.useCallback(isVisible => {\n const currentModel = gridColumnVisibilityModelSelector(apiRef);\n const newModel = _extends({}, currentModel);\n const togglableColumns = getTogglableColumns ? getTogglableColumns(columns) : null;\n (toggleAllMode === 'filteredOnly' ? currentColumns : columns).forEach(col => {\n if (col.hideable && (togglableColumns == null || togglableColumns.includes(col.field))) {\n if (isVisible) {\n // delete the key from the model instead of setting it to `true`\n delete newModel[col.field];\n } else {\n newModel[col.field] = false;\n }\n }\n });\n return apiRef.current.setColumnVisibilityModel(newModel);\n }, [apiRef, columns, getTogglableColumns, toggleAllMode, currentColumns]);\n const handleSearchValueChange = React.useCallback(event => {\n debouncedFilter(event.target.value);\n }, [debouncedFilter]);\n const hideableColumns = React.useMemo(() => currentColumns.filter(col => col.hideable), [currentColumns]);\n const allHideableColumnsVisible = React.useMemo(() => hideableColumns.every(column => columnVisibilityModel[column.field] == null || columnVisibilityModel[column.field] !== false), [columnVisibilityModel, hideableColumns]);\n const allHideableColumnsHidden = React.useMemo(() => hideableColumns.every(column => columnVisibilityModel[column.field] === false), [columnVisibilityModel, hideableColumns]);\n const firstSwitchRef = React.useRef(null);\n React.useEffect(() => {\n if (autoFocusSearchField) {\n searchInputRef.current?.focus();\n } else if (firstSwitchRef.current && typeof firstSwitchRef.current.focus === 'function') {\n firstSwitchRef.current.focus();\n }\n }, [autoFocusSearchField]);\n let firstHideableColumnFound = false;\n const isFirstHideableColumn = column => {\n if (firstHideableColumnFound === false && column.hideable !== false) {\n firstHideableColumnFound = true;\n return true;\n }\n return false;\n };\n const handleSearchReset = React.useCallback(() => {\n setSearchValue('');\n if (searchInputRef.current) {\n searchInputRef.current.value = '';\n searchInputRef.current.focus();\n }\n }, []);\n return /*#__PURE__*/_jsxs(React.Fragment, {\n children: [/*#__PURE__*/_jsx(GridColumnsManagementHeader, {\n className: classes.header,\n ownerState: rootProps,\n children: /*#__PURE__*/_jsx(SearchInput, _extends({\n as: rootProps.slots.baseTextField,\n ownerState: rootProps,\n placeholder: apiRef.current.getLocaleText('columnsManagementSearchTitle'),\n inputRef: searchInputRef,\n className: classes.searchInput,\n onChange: handleSearchValueChange,\n size: \"small\",\n type: \"search\",\n slotProps: {\n input: {\n startAdornment: /*#__PURE__*/_jsx(rootProps.slots.quickFilterIcon, {\n fontSize: \"small\"\n }),\n endAdornment: /*#__PURE__*/_jsx(rootProps.slots.baseIconButton, _extends({\n size: \"small\",\n \"aria-label\": apiRef.current.getLocaleText('columnsManagementDeleteIconLabel'),\n style: searchValue ? {\n visibility: 'visible'\n } : {\n visibility: 'hidden'\n },\n tabIndex: -1,\n onClick: handleSearchReset,\n edge: \"end\"\n }, rootProps.slotProps?.baseIconButton, {\n children: /*#__PURE__*/_jsx(rootProps.slots.quickFilterClearIcon, {\n fontSize: \"small\"\n })\n }))\n },\n htmlInput: {\n 'aria-label': apiRef.current.getLocaleText('columnsManagementSearchTitle')\n }\n },\n autoComplete: \"off\",\n fullWidth: true\n }, rootProps.slotProps?.baseTextField, searchInputProps))\n }), /*#__PURE__*/_jsx(GridColumnsManagementScrollArea, {\n ownerState: rootProps,\n children: /*#__PURE__*/_jsxs(GridColumnsManagementBody, {\n className: classes.root,\n ownerState: rootProps,\n children: [currentColumns.map(column => /*#__PURE__*/_jsx(GridColumnsManagementRow, _extends({\n as: rootProps.slots.baseCheckbox,\n className: classes.row,\n disabled: column.hideable === false || pivotActive,\n checked: columnVisibilityModel[column.field] !== false,\n onChange: toggleColumn,\n name: column.field,\n inputRef: isFirstHideableColumn(column) ? firstSwitchRef : undefined,\n label: column.headerName || column.field,\n density: \"compact\",\n fullWidth: true\n }, rootProps.slotProps?.baseCheckbox), column.field)), currentColumns.length === 0 && /*#__PURE__*/_jsx(GridColumnsManagementEmptyText, {\n ownerState: rootProps,\n children: apiRef.current.getLocaleText('columnsManagementNoColumns')\n })]\n })\n }), !disableShowHideToggle || !disableResetButton ? /*#__PURE__*/_jsxs(GridColumnsManagementFooter, {\n ownerState: rootProps,\n className: classes.footer,\n children: [!disableShowHideToggle ? /*#__PURE__*/_jsx(rootProps.slots.baseCheckbox, _extends({\n disabled: hideableColumns.length === 0 || pivotActive,\n checked: allHideableColumnsVisible,\n indeterminate: !allHideableColumnsVisible && !allHideableColumnsHidden,\n onChange: () => toggleAllColumns(!allHideableColumnsVisible),\n name: apiRef.current.getLocaleText('columnsManagementShowHideAllText'),\n label: apiRef.current.getLocaleText('columnsManagementShowHideAllText'),\n density: \"compact\"\n }, rootProps.slotProps?.baseCheckbox)) : /*#__PURE__*/_jsx(\"span\", {}), !disableResetButton ? /*#__PURE__*/_jsx(rootProps.slots.baseButton, _extends({\n onClick: () => apiRef.current.setColumnVisibilityModel(initialColumnVisibilityModel),\n disabled: isResetDisabled || pivotActive\n }, rootProps.slotProps?.baseButton, {\n children: apiRef.current.getLocaleText('columnsManagementReset')\n })) : null]\n }) : null]\n });\n}\nprocess.env.NODE_ENV !== \"production\" ? GridColumnsManagement.propTypes /* remove-proptypes */ = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the TypeScript types and run \"pnpm proptypes\" |\n // ----------------------------------------------------------------------\n /**\n * If `true`, the column search field will be focused automatically.\n * If `false`, the first column switch input will be focused automatically.\n * This helps to avoid input keyboard panel to popup automatically on touch devices.\n * @default true\n */\n autoFocusSearchField: PropTypes.bool,\n /**\n * If `true`, the `Reset` button will not be disabled\n * @default false\n */\n disableResetButton: PropTypes.bool,\n /**\n * If `true`, the `Show/Hide all` toggle checkbox will not be displayed.\n * @default false\n */\n disableShowHideToggle: PropTypes.bool,\n /**\n * Returns the list of togglable columns.\n * If used, only those columns will be displayed in the panel\n * which are passed as the return value of the function.\n * @param {GridColDef[]} columns The `ColDef` list of all columns.\n * @returns {GridColDef['field'][]} The list of togglable columns' field names.\n */\n getTogglableColumns: PropTypes.func,\n /**\n * The milliseconds delay to wait after a keystroke before triggering filtering in the columns menu.\n * @default 150\n */\n searchDebounceMs: PropTypes.number,\n searchInputProps: PropTypes.object,\n searchPredicate: PropTypes.func,\n sort: PropTypes.oneOf(['asc', 'desc']),\n /**\n * Changes the behavior of the `Show/Hide All` toggle when the search field is used:\n * - `all`: Will toggle all columns.\n * - `filteredOnly`: Will only toggle columns that match the search criteria.\n * @default 'all'\n */\n toggleAllMode: PropTypes.oneOf(['all', 'filteredOnly'])\n} : void 0;\nconst GridColumnsManagementBody = styled('div', {\n name: 'MuiDataGrid',\n slot: 'ColumnsManagement'\n})({\n display: 'flex',\n flexDirection: 'column',\n padding: vars.spacing(0.5, 1.5)\n});\nconst GridColumnsManagementScrollArea = styled(GridShadowScrollArea, {\n name: 'MuiDataGrid',\n slot: 'ColumnsManagementScrollArea'\n})({\n maxHeight: 300\n});\nconst GridColumnsManagementHeader = styled('div', {\n name: 'MuiDataGrid',\n slot: 'ColumnsManagementHeader'\n})({\n padding: vars.spacing(1.5, 2),\n borderBottom: `1px solid ${vars.colors.border.base}`\n});\nconst SearchInput = styled(NotRendered, {\n name: 'MuiDataGrid',\n slot: 'ColumnsManagementSearchInput'\n})({\n [`& .${inputBaseClasses.input}::-webkit-search-decoration,\n & .${inputBaseClasses.input}::-webkit-search-cancel-button,\n & .${inputBaseClasses.input}::-webkit-search-results-button,\n & .${inputBaseClasses.input}::-webkit-search-results-decoration`]: {\n /* clears the 'X' icon from Chrome */\n display: 'none'\n }\n});\nconst GridColumnsManagementFooter = styled('div', {\n name: 'MuiDataGrid',\n slot: 'ColumnsManagementFooter'\n})({\n padding: vars.spacing(1, 1, 1, 1.5),\n display: 'flex',\n justifyContent: 'space-between',\n borderTop: `1px solid ${vars.colors.border.base}`\n});\nconst GridColumnsManagementEmptyText = styled('div', {\n name: 'MuiDataGrid',\n slot: 'ColumnsManagementEmptyText'\n})({\n padding: vars.spacing(1, 0),\n alignSelf: 'center',\n font: vars.typography.font.body\n});\nconst GridColumnsManagementRow = styled(NotRendered, {\n name: 'MuiDataGrid',\n slot: 'ColumnsManagementRow'\n})({});\nexport { GridColumnsManagement };","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport useId from '@mui/utils/useId';\nimport { forwardRef } from '@mui/x-internals/forwardRef';\nimport useForkRef from '@mui/utils/useForkRef';\nimport { useGridSelector } from \"../../hooks/utils/useGridSelector.mjs\";\nimport { gridPreferencePanelStateSelector } from \"../../hooks/features/preferencesPanel/gridPreferencePanelSelector.mjs\";\nimport { GridPreferencePanelsValue } from \"../../hooks/features/preferencesPanel/gridPreferencePanelsValue.mjs\";\nimport { useGridApiContext } from \"../../hooks/utils/useGridApiContext.mjs\";\nimport { useGridRootProps } from \"../../hooks/utils/useGridRootProps.mjs\";\nimport { useGridPanelContext } from \"../panel/GridPanelContext.mjs\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\n/**\n * @deprecated Use the {@link https://mui.com/x/react-data-grid/components/columns-panel/ Columns Panel Trigger} component instead. This component will be removed in a future major release.\n */\nconst GridToolbarColumnsButton = forwardRef(function GridToolbarColumnsButton(props, ref) {\n const {\n slotProps = {}\n } = props;\n const buttonProps = slotProps.button || {};\n const tooltipProps = slotProps.tooltip || {};\n const columnButtonId = useId();\n const columnPanelId = useId();\n const apiRef = useGridApiContext();\n const rootProps = useGridRootProps();\n const {\n triggers\n } = useGridPanelContext();\n const preferencePanel = useGridSelector(apiRef, gridPreferencePanelStateSelector);\n const handleRef = useForkRef(ref, triggers.columnsPanel.setRef);\n const showColumns = event => {\n if (preferencePanel.open && preferencePanel.openedPanelValue === GridPreferencePanelsValue.columns) {\n apiRef.current.hidePreferences();\n } else {\n apiRef.current.showPreferences(GridPreferencePanelsValue.columns, columnPanelId, columnButtonId);\n }\n buttonProps.onClick?.(event);\n };\n\n // Disable the button if the corresponding is disabled\n if (rootProps.disableColumnSelector) {\n return null;\n }\n const isOpen = preferencePanel.open && preferencePanel.panelId === columnPanelId;\n return /*#__PURE__*/_jsx(rootProps.slots.baseTooltip, _extends({\n title: apiRef.current.getLocaleText('toolbarColumnsLabel'),\n enterDelay: 1000\n }, rootProps.slotProps?.baseTooltip, tooltipProps, {\n children: /*#__PURE__*/_jsx(rootProps.slots.baseButton, _extends({\n id: columnButtonId,\n size: \"small\",\n \"aria-label\": apiRef.current.getLocaleText('toolbarColumnsLabel'),\n \"aria-haspopup\": \"menu\",\n \"aria-expanded\": isOpen,\n \"aria-controls\": isOpen ? columnPanelId : undefined,\n startIcon: /*#__PURE__*/_jsx(rootProps.slots.columnSelectorIcon, {})\n }, rootProps.slotProps?.baseButton, buttonProps, {\n onPointerUp: event => {\n if (preferencePanel.open) {\n event.stopPropagation();\n }\n buttonProps.onPointerUp?.(event);\n },\n onClick: showColumns,\n ref: handleRef,\n children: apiRef.current.getLocaleText('toolbarColumns')\n }))\n }));\n});\nif (process.env.NODE_ENV !== \"production\") GridToolbarColumnsButton.displayName = \"GridToolbarColumnsButton\";\nprocess.env.NODE_ENV !== \"production\" ? GridToolbarColumnsButton.propTypes /* remove-proptypes */ = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the TypeScript types and run \"pnpm proptypes\" |\n // ----------------------------------------------------------------------\n /**\n * The props used for each slot inside.\n * @default {}\n */\n slotProps: PropTypes.object\n} : void 0;\nexport { GridToolbarColumnsButton };","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport useId from '@mui/utils/useId';\nimport useForkRef from '@mui/utils/useForkRef';\nimport { forwardRef } from '@mui/x-internals/forwardRef';\nimport { gridDensitySelector } from \"../../hooks/features/density/densitySelector.mjs\";\nimport { useGridApiContext } from \"../../hooks/utils/useGridApiContext.mjs\";\nimport { useGridSelector } from \"../../hooks/utils/useGridSelector.mjs\";\nimport { GridMenu } from \"../menu/GridMenu.mjs\";\nimport { useGridRootProps } from \"../../hooks/utils/useGridRootProps.mjs\";\nimport { gridClasses } from \"../../constants/gridClasses.mjs\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\n/**\n * @deprecated See {@link https://mui.com/x/react-data-grid/accessibility/#set-the-density-programmatically Accessibility—Set the density programmatically} for an example of adding a density selector to the toolbar. This component will be removed in a future major release.\n */\nconst GridToolbarDensitySelector = forwardRef(function GridToolbarDensitySelector(props, ref) {\n const {\n slotProps = {}\n } = props;\n const buttonProps = slotProps.button || {};\n const tooltipProps = slotProps.tooltip || {};\n const apiRef = useGridApiContext();\n const rootProps = useGridRootProps();\n const density = useGridSelector(apiRef, gridDensitySelector);\n const densityButtonId = useId();\n const densityMenuId = useId();\n const [open, setOpen] = React.useState(false);\n const buttonRef = React.useRef(null);\n const handleRef = useForkRef(ref, buttonRef);\n const densityOptions = [{\n icon: /*#__PURE__*/_jsx(rootProps.slots.densityCompactIcon, {}),\n label: apiRef.current.getLocaleText('toolbarDensityCompact'),\n value: 'compact'\n }, {\n icon: /*#__PURE__*/_jsx(rootProps.slots.densityStandardIcon, {}),\n label: apiRef.current.getLocaleText('toolbarDensityStandard'),\n value: 'standard'\n }, {\n icon: /*#__PURE__*/_jsx(rootProps.slots.densityComfortableIcon, {}),\n label: apiRef.current.getLocaleText('toolbarDensityComfortable'),\n value: 'comfortable'\n }];\n const startIcon = React.useMemo(() => {\n switch (density) {\n case 'compact':\n return /*#__PURE__*/_jsx(rootProps.slots.densityCompactIcon, {});\n case 'comfortable':\n return /*#__PURE__*/_jsx(rootProps.slots.densityComfortableIcon, {});\n default:\n return /*#__PURE__*/_jsx(rootProps.slots.densityStandardIcon, {});\n }\n }, [density, rootProps]);\n const handleDensitySelectorOpen = event => {\n setOpen(prevOpen => !prevOpen);\n buttonProps.onClick?.(event);\n };\n const handleDensitySelectorClose = () => {\n setOpen(false);\n };\n const handleDensityUpdate = newDensity => {\n apiRef.current.setDensity(newDensity);\n setOpen(false);\n };\n\n // Disable the button if the corresponding is disabled\n if (rootProps.disableDensitySelector) {\n return null;\n }\n const densityElements = densityOptions.map((option, index) => /*#__PURE__*/_jsx(rootProps.slots.baseMenuItem, {\n onClick: () => handleDensityUpdate(option.value),\n selected: option.value === density,\n iconStart: option.icon,\n children: option.label\n }, index));\n return /*#__PURE__*/_jsxs(React.Fragment, {\n children: [/*#__PURE__*/_jsx(rootProps.slots.baseTooltip, _extends({\n title: apiRef.current.getLocaleText('toolbarDensityLabel'),\n enterDelay: 1000\n }, rootProps.slotProps?.baseTooltip, tooltipProps, {\n children: /*#__PURE__*/_jsx(rootProps.slots.baseButton, _extends({\n size: \"small\",\n startIcon: startIcon,\n \"aria-label\": apiRef.current.getLocaleText('toolbarDensityLabel'),\n \"aria-haspopup\": \"menu\",\n \"aria-expanded\": open,\n \"aria-controls\": open ? densityMenuId : undefined,\n id: densityButtonId\n }, rootProps.slotProps?.baseButton, buttonProps, {\n onClick: handleDensitySelectorOpen,\n ref: handleRef,\n children: apiRef.current.getLocaleText('toolbarDensity')\n }))\n })), /*#__PURE__*/_jsx(GridMenu, {\n open: open,\n target: buttonRef.current,\n onClose: handleDensitySelectorClose,\n position: \"bottom-end\",\n children: /*#__PURE__*/_jsx(rootProps.slots.baseMenuList, {\n id: densityMenuId,\n className: gridClasses.menuList,\n \"aria-labelledby\": densityButtonId,\n autoFocusItem: open,\n children: densityElements\n })\n })]\n });\n});\nif (process.env.NODE_ENV !== \"production\") GridToolbarDensitySelector.displayName = \"GridToolbarDensitySelector\";\nprocess.env.NODE_ENV !== \"production\" ? GridToolbarDensitySelector.propTypes /* remove-proptypes */ = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the TypeScript types and run \"pnpm proptypes\" |\n // ----------------------------------------------------------------------\n /**\n * The props used for each slot inside.\n * @default {}\n */\n slotProps: PropTypes.object\n} : void 0;\nexport { GridToolbarDensitySelector };","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { styled } from '@mui/material/styles';\nimport composeClasses from '@mui/utils/composeClasses';\nimport capitalize from '@mui/utils/capitalize';\nimport useId from '@mui/utils/useId';\nimport useForkRef from '@mui/utils/useForkRef';\nimport { forwardRef } from '@mui/x-internals/forwardRef';\nimport { vars } from \"../../constants/cssVariables.mjs\";\nimport { gridColumnLookupSelector } from \"../../hooks/features/columns/gridColumnsSelector.mjs\";\nimport { useGridSelector } from \"../../hooks/utils/useGridSelector.mjs\";\nimport { gridFilterActiveItemsSelector } from \"../../hooks/features/filter/gridFilterSelector.mjs\";\nimport { gridPreferencePanelStateSelector } from \"../../hooks/features/preferencesPanel/gridPreferencePanelSelector.mjs\";\nimport { GridPreferencePanelsValue } from \"../../hooks/features/preferencesPanel/gridPreferencePanelsValue.mjs\";\nimport { useGridApiContext } from \"../../hooks/utils/useGridApiContext.mjs\";\nimport { useGridRootProps } from \"../../hooks/utils/useGridRootProps.mjs\";\nimport { getDataGridUtilityClass } from \"../../constants/gridClasses.mjs\";\nimport { useGridPanelContext } from \"../panel/GridPanelContext.mjs\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n classes\n } = ownerState;\n const slots = {\n root: ['toolbarFilterList']\n };\n return composeClasses(slots, getDataGridUtilityClass, classes);\n};\nconst GridToolbarFilterListRoot = styled('ul', {\n name: 'MuiDataGrid',\n slot: 'ToolbarFilterList'\n})({\n margin: vars.spacing(1, 1, 0.5),\n padding: vars.spacing(0, 1)\n});\n/**\n * @deprecated Use the {@link https://mui.com/x/react-data-grid/components/filter-panel/ Filter Panel Trigger} component instead. This component will be removed in a future major release.\n */\nconst GridToolbarFilterButton = forwardRef(function GridToolbarFilterButton(props, ref) {\n const {\n slotProps = {}\n } = props;\n const buttonProps = slotProps.button || {};\n const tooltipProps = slotProps.tooltip || {};\n const badgeProps = slotProps.badge || {};\n const apiRef = useGridApiContext();\n const rootProps = useGridRootProps();\n const activeFilters = useGridSelector(apiRef, gridFilterActiveItemsSelector);\n const lookup = useGridSelector(apiRef, gridColumnLookupSelector);\n const preferencePanel = useGridSelector(apiRef, gridPreferencePanelStateSelector);\n const classes = useUtilityClasses(rootProps);\n const filterButtonId = useId();\n const filterPanelId = useId();\n const {\n triggers\n } = useGridPanelContext();\n const handleRef = useForkRef(ref, triggers.filterPanel.setRef);\n const tooltipContentNode = React.useMemo(() => {\n if (preferencePanel.open) {\n return apiRef.current.getLocaleText('toolbarFiltersTooltipHide');\n }\n if (activeFilters.length === 0) {\n return apiRef.current.getLocaleText('toolbarFiltersTooltipShow');\n }\n const getOperatorLabel = item => lookup[item.field].filterOperators.find(operator => operator.value === item.operator).label || apiRef.current.getLocaleText(`filterOperator${capitalize(item.operator)}`).toString();\n const getFilterItemValue = item => {\n const {\n getValueAsString\n } = lookup[item.field].filterOperators.find(operator => operator.value === item.operator);\n return getValueAsString ? getValueAsString(item.value) : item.value;\n };\n return /*#__PURE__*/_jsxs(\"div\", {\n children: [apiRef.current.getLocaleText('toolbarFiltersTooltipActive')(activeFilters.length), /*#__PURE__*/_jsx(GridToolbarFilterListRoot, {\n className: classes.root,\n ownerState: rootProps,\n children: activeFilters.map((item, index) => _extends({}, lookup[item.field] && /*#__PURE__*/_jsx(\"li\", {\n children: `${lookup[item.field].headerName || item.field}\n ${getOperatorLabel(item)}\n ${\n // implicit check for null and undefined\n item.value != null ? getFilterItemValue(item) : ''}`\n }, index)))\n })]\n });\n }, [apiRef, rootProps, preferencePanel.open, activeFilters, lookup, classes]);\n const toggleFilter = event => {\n const {\n open,\n openedPanelValue\n } = preferencePanel;\n if (open && openedPanelValue === GridPreferencePanelsValue.filters) {\n apiRef.current.hidePreferences();\n } else {\n apiRef.current.showPreferences(GridPreferencePanelsValue.filters, filterPanelId, filterButtonId);\n }\n buttonProps.onClick?.(event);\n };\n\n // Disable the button if the corresponding is disabled\n if (rootProps.disableColumnFilter) {\n return null;\n }\n const isOpen = preferencePanel.open && preferencePanel.panelId === filterPanelId;\n return /*#__PURE__*/_jsx(rootProps.slots.baseTooltip, _extends({\n title: tooltipContentNode,\n enterDelay: 1000\n }, rootProps.slotProps?.baseTooltip, tooltipProps, {\n children: /*#__PURE__*/_jsx(rootProps.slots.baseButton, _extends({\n id: filterButtonId,\n size: \"small\",\n \"aria-label\": apiRef.current.getLocaleText('toolbarFiltersLabel'),\n \"aria-controls\": isOpen ? filterPanelId : undefined,\n \"aria-expanded\": isOpen,\n \"aria-haspopup\": true,\n startIcon: /*#__PURE__*/_jsx(rootProps.slots.baseBadge, _extends({\n badgeContent: activeFilters.length,\n color: \"primary\"\n }, rootProps.slotProps?.baseBadge, badgeProps, {\n children: /*#__PURE__*/_jsx(rootProps.slots.openFilterButtonIcon, {})\n }))\n }, rootProps.slotProps?.baseButton, buttonProps, {\n onClick: toggleFilter,\n onPointerUp: event => {\n if (preferencePanel.open) {\n event.stopPropagation();\n }\n buttonProps.onPointerUp?.(event);\n },\n ref: handleRef,\n children: apiRef.current.getLocaleText('toolbarFilters')\n }))\n }));\n});\nif (process.env.NODE_ENV !== \"production\") GridToolbarFilterButton.displayName = \"GridToolbarFilterButton\";\nprocess.env.NODE_ENV !== \"production\" ? GridToolbarFilterButton.propTypes /* remove-proptypes */ = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the TypeScript types and run \"pnpm proptypes\" |\n // ----------------------------------------------------------------------\n /**\n * The props used for each slot inside.\n * @default {}\n */\n slotProps: PropTypes.object\n} : void 0;\nexport { GridToolbarFilterButton };","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport useId from '@mui/utils/useId';\nimport useForkRef from '@mui/utils/useForkRef';\nimport { forwardRef } from '@mui/x-internals/forwardRef';\nimport { useGridApiContext } from \"../../hooks/utils/useGridApiContext.mjs\";\nimport { GridMenu } from \"../menu/GridMenu.mjs\";\nimport { useGridRootProps } from \"../../hooks/utils/useGridRootProps.mjs\";\nimport { gridClasses } from \"../../constants/gridClasses.mjs\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst GridToolbarExportContainer = forwardRef(function GridToolbarExportContainer(props, ref) {\n const {\n children,\n slotProps = {}\n } = props;\n const buttonProps = slotProps.button || {};\n const tooltipProps = slotProps.tooltip || {};\n const apiRef = useGridApiContext();\n const rootProps = useGridRootProps();\n const exportButtonId = useId();\n const exportMenuId = useId();\n const [open, setOpen] = React.useState(false);\n const buttonRef = React.useRef(null);\n const handleRef = useForkRef(ref, buttonRef);\n const handleMenuOpen = event => {\n setOpen(prevOpen => !prevOpen);\n buttonProps.onClick?.(event);\n };\n const handleMenuClose = () => setOpen(false);\n if (children == null) {\n return null;\n }\n return /*#__PURE__*/_jsxs(React.Fragment, {\n children: [/*#__PURE__*/_jsx(rootProps.slots.baseTooltip, _extends({\n title: apiRef.current.getLocaleText('toolbarExportLabel'),\n enterDelay: 1000\n }, rootProps.slotProps?.baseTooltip, tooltipProps, {\n children: /*#__PURE__*/_jsx(rootProps.slots.baseButton, _extends({\n size: \"small\",\n startIcon: /*#__PURE__*/_jsx(rootProps.slots.exportIcon, {}),\n \"aria-expanded\": open,\n \"aria-label\": apiRef.current.getLocaleText('toolbarExportLabel'),\n \"aria-haspopup\": \"menu\",\n \"aria-controls\": open ? exportMenuId : undefined,\n id: exportButtonId\n }, rootProps.slotProps?.baseButton, buttonProps, {\n onClick: handleMenuOpen,\n ref: handleRef,\n children: apiRef.current.getLocaleText('toolbarExport')\n }))\n })), /*#__PURE__*/_jsx(GridMenu, {\n open: open,\n target: buttonRef.current,\n onClose: handleMenuClose,\n position: \"bottom-end\",\n children: /*#__PURE__*/_jsx(rootProps.slots.baseMenuList, {\n id: exportMenuId,\n className: gridClasses.menuList,\n \"aria-labelledby\": exportButtonId,\n autoFocusItem: open,\n children: React.Children.map(children, child => {\n if (! /*#__PURE__*/React.isValidElement(child)) {\n return child;\n }\n return /*#__PURE__*/React.cloneElement(child, {\n hideMenu: handleMenuClose\n });\n })\n })\n })]\n });\n});\nif (process.env.NODE_ENV !== \"production\") GridToolbarExportContainer.displayName = \"GridToolbarExportContainer\";\nprocess.env.NODE_ENV !== \"production\" ? GridToolbarExportContainer.propTypes /* remove-proptypes */ = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the TypeScript types and run \"pnpm proptypes\" |\n // ----------------------------------------------------------------------\n /**\n * The props used for each slot inside.\n * @default {}\n */\n slotProps: PropTypes.object\n} : void 0;\nexport { GridToolbarExportContainer };","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"hideMenu\", \"options\"],\n _excluded2 = [\"hideMenu\", \"options\"],\n _excluded3 = [\"csvOptions\", \"printOptions\", \"excelOptions\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { forwardRef } from '@mui/x-internals/forwardRef';\nimport { useGridRootProps } from \"../../hooks/utils/useGridRootProps.mjs\";\nimport { useGridApiContext } from \"../../hooks/utils/useGridApiContext.mjs\";\nimport { GridToolbarExportContainer } from \"./GridToolbarExportContainer.mjs\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction GridCsvExportMenuItem(props) {\n const apiRef = useGridApiContext();\n const rootProps = useGridRootProps();\n const {\n hideMenu,\n options\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n return /*#__PURE__*/_jsx(rootProps.slots.baseMenuItem, _extends({\n onClick: () => {\n apiRef.current.exportDataAsCsv(options);\n hideMenu?.();\n }\n }, other, {\n children: apiRef.current.getLocaleText('toolbarExportCSV')\n }));\n}\nprocess.env.NODE_ENV !== \"production\" ? GridCsvExportMenuItem.propTypes /* remove-proptypes */ = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the TypeScript types and run \"pnpm proptypes\" |\n // ----------------------------------------------------------------------\n hideMenu: PropTypes.func,\n options: PropTypes.shape({\n allColumns: PropTypes.bool,\n delimiter: PropTypes.string,\n disableToolbarButton: PropTypes.bool,\n escapeFormulas: PropTypes.bool,\n fields: PropTypes.arrayOf(PropTypes.string),\n fileName: PropTypes.string,\n getRowsToExport: PropTypes.func,\n includeColumnGroupsHeaders: PropTypes.bool,\n includeHeaders: PropTypes.bool,\n shouldAppendQuotes: PropTypes.bool,\n utf8WithBom: PropTypes.bool\n })\n} : void 0;\nfunction GridPrintExportMenuItem(props) {\n const apiRef = useGridApiContext();\n const rootProps = useGridRootProps();\n const {\n hideMenu,\n options\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded2);\n return /*#__PURE__*/_jsx(rootProps.slots.baseMenuItem, _extends({\n onClick: () => {\n apiRef.current.exportDataAsPrint(options);\n hideMenu?.();\n }\n }, other, {\n children: apiRef.current.getLocaleText('toolbarExportPrint')\n }));\n}\nprocess.env.NODE_ENV !== \"production\" ? GridPrintExportMenuItem.propTypes /* remove-proptypes */ = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the TypeScript types and run \"pnpm proptypes\" |\n // ----------------------------------------------------------------------\n hideMenu: PropTypes.func,\n options: PropTypes.shape({\n allColumns: PropTypes.bool,\n bodyClassName: PropTypes.string,\n copyStyles: PropTypes.bool,\n disableToolbarButton: PropTypes.bool,\n fields: PropTypes.arrayOf(PropTypes.string),\n fileName: PropTypes.string,\n getRowsToExport: PropTypes.func,\n hideFooter: PropTypes.bool,\n hideToolbar: PropTypes.bool,\n includeCheckboxes: PropTypes.bool,\n pageStyle: PropTypes.oneOfType([PropTypes.func, PropTypes.string])\n })\n} : void 0;\n\n/**\n * @deprecated Use the {@link https://mui.com/x/react-data-grid/components/export/ Export} components instead. This component will be removed in a future major release.\n */\nconst GridToolbarExport = forwardRef(function GridToolbarExport(props, ref) {\n const _ref = props,\n {\n csvOptions = {},\n printOptions = {},\n excelOptions\n } = _ref,\n other = _objectWithoutPropertiesLoose(_ref, _excluded3);\n const apiRef = useGridApiContext();\n const preProcessedButtons = apiRef.current.unstable_applyPipeProcessors('exportMenu', [], {\n excelOptions,\n csvOptions,\n printOptions\n }).sort((a, b) => a.componentName > b.componentName ? 1 : -1);\n if (preProcessedButtons.length === 0) {\n return null;\n }\n return /*#__PURE__*/_jsx(GridToolbarExportContainer, _extends({}, other, {\n ref: ref,\n children: preProcessedButtons.map((button, index) => /*#__PURE__*/React.cloneElement(button.component, {\n key: index\n }))\n }));\n});\nif (process.env.NODE_ENV !== \"production\") GridToolbarExport.displayName = \"GridToolbarExport\";\nprocess.env.NODE_ENV !== \"production\" ? GridToolbarExport.propTypes /* remove-proptypes */ = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the TypeScript types and run \"pnpm proptypes\" |\n // ----------------------------------------------------------------------\n csvOptions: PropTypes.object,\n printOptions: PropTypes.object,\n /**\n * The props used for each slot inside.\n * @default {}\n */\n slotProps: PropTypes.object\n} : void 0;\nexport { GridToolbarExport, GridCsvExportMenuItem, GridPrintExportMenuItem };","'use client';\n\nimport _formatErrorMessage from \"@mui/x-internals/formatErrorMessage\";\nimport * as React from 'react';\nexport const QuickFilterContext = /*#__PURE__*/React.createContext(undefined);\nif (process.env.NODE_ENV !== \"production\") QuickFilterContext.displayName = \"QuickFilterContext\";\nexport function useQuickFilterContext() {\n const context = React.useContext(QuickFilterContext);\n if (context === undefined) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'MUI X: Missing context. Quick Filter subcomponents must be placed within a component.' : _formatErrorMessage(62));\n }\n return context;\n}","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"render\", \"className\", \"parser\", \"formatter\", \"debounceMs\", \"defaultExpanded\", \"expanded\", \"onExpandedChange\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport debounce from '@mui/utils/debounce';\nimport useEnhancedEffect from '@mui/utils/useEnhancedEffect';\nimport useId from '@mui/utils/useId';\nimport { isDeepEqual } from '@mui/x-internals/isDeepEqual';\nimport { useComponentRenderer } from '@mui/x-internals/useComponentRenderer';\nimport { QuickFilterContext } from \"./QuickFilterContext.mjs\";\nimport { useGridApiContext } from \"../../hooks/utils/useGridApiContext.mjs\";\nimport { useGridSelector } from \"../../hooks/utils/useGridSelector.mjs\";\nimport { gridQuickFilterValuesSelector } from \"../../hooks/features/filter/index.mjs\";\nimport { useGridRootProps } from \"../../hooks/utils/useGridRootProps.mjs\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst DEFAULT_PARSER = searchText => searchText.split(' ').filter(word => word !== '');\nconst DEFAULT_FORMATTER = values => values.join(' ');\n\n/**\n * The top level Quick Filter component that provides context to child components.\n * It renders a `
` element.\n *\n * Demos:\n *\n * - [Quick Filter](https://mui.com/x/react-data-grid/components/quick-filter/)\n *\n * API:\n *\n * - [QuickFilter API](https://mui.com/x/api/data-grid/quick-filter/)\n */\nfunction QuickFilter(props) {\n const rootProps = useGridRootProps();\n const {\n render,\n className,\n parser = DEFAULT_PARSER,\n formatter = DEFAULT_FORMATTER,\n debounceMs = rootProps.filterDebounceMs,\n defaultExpanded,\n expanded,\n onExpandedChange\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const apiRef = useGridApiContext();\n const controlRef = React.useRef(null);\n const triggerRef = React.useRef(null);\n const quickFilterValues = useGridSelector(apiRef, gridQuickFilterValuesSelector);\n const [value, setValue] = React.useState(formatter(quickFilterValues ?? []));\n const [internalExpanded, setInternalExpanded] = React.useState(defaultExpanded ?? value.length > 0);\n const expandedValue = expanded ?? internalExpanded;\n const state = React.useMemo(() => ({\n value,\n expanded: expandedValue\n }), [value, expandedValue]);\n const resolvedClassName = typeof className === 'function' ? className(state) : className;\n const ref = React.useRef(null);\n const controlId = useId();\n const handleExpandedChange = React.useCallback(newExpanded => {\n if (onExpandedChange) {\n onExpandedChange(newExpanded);\n }\n if (expanded === undefined) {\n setInternalExpanded(newExpanded);\n }\n }, [onExpandedChange, expanded]);\n const prevQuickFilterValuesRef = React.useRef(quickFilterValues);\n React.useEffect(() => {\n if (!isDeepEqual(prevQuickFilterValuesRef.current, quickFilterValues)) {\n // The model of quick filter value has been updated\n prevQuickFilterValuesRef.current = quickFilterValues;\n\n // Update the input value if needed to match the new model\n setValue(prevSearchValue => isDeepEqual(parser(prevSearchValue), quickFilterValues) ? prevSearchValue : formatter(quickFilterValues ?? []));\n }\n }, [quickFilterValues, formatter, parser]);\n const isFirstRender = React.useRef(true);\n const previousExpandedValue = React.useRef(expandedValue);\n React.useEffect(() => {\n if (isFirstRender.current) {\n isFirstRender.current = false;\n return;\n }\n\n // Ensure the expanded state has actually changed before focusing\n if (previousExpandedValue.current !== expandedValue) {\n if (expandedValue) {\n // Ensures the focus does not interupt CSS transitions and animations on the control\n requestAnimationFrame(() => {\n controlRef.current?.focus({\n preventScroll: true\n });\n });\n } else {\n triggerRef.current?.focus({\n preventScroll: true\n });\n }\n previousExpandedValue.current = expandedValue;\n }\n }, [expandedValue]);\n const setQuickFilterValueDebounced = React.useMemo(() => debounce(newValue => {\n const newQuickFilterValues = parser(newValue);\n prevQuickFilterValuesRef.current = newQuickFilterValues;\n apiRef.current.setQuickFilterValues(newQuickFilterValues);\n }, debounceMs), [apiRef, debounceMs, parser]);\n React.useEffect(() => setQuickFilterValueDebounced.clear, [setQuickFilterValueDebounced]);\n const handleValueChange = React.useCallback(event => {\n const newValue = event.target.value;\n setValue(newValue);\n setQuickFilterValueDebounced(newValue);\n }, [setQuickFilterValueDebounced]);\n const handleClearValue = React.useCallback(() => {\n setValue('');\n apiRef.current.setQuickFilterValues([]);\n controlRef.current?.focus();\n }, [apiRef, controlRef]);\n const contextValue = React.useMemo(() => ({\n controlRef,\n triggerRef,\n state,\n controlId,\n clearValue: handleClearValue,\n onValueChange: handleValueChange,\n onExpandedChange: handleExpandedChange\n }), [controlId, state, handleValueChange, handleClearValue, handleExpandedChange]);\n useEnhancedEffect(() => {\n if (ref.current && triggerRef.current) {\n ref.current.style.setProperty('--trigger-width', `${triggerRef.current?.offsetWidth}px`);\n }\n }, []);\n const element = useComponentRenderer('div', render, _extends({\n className: resolvedClassName\n }, other, {\n ref\n }), state);\n return /*#__PURE__*/_jsx(QuickFilterContext.Provider, {\n value: contextValue,\n children: element\n });\n}\nprocess.env.NODE_ENV !== \"production\" ? QuickFilter.propTypes /* remove-proptypes */ = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the TypeScript types and run \"pnpm proptypes\" |\n // ----------------------------------------------------------------------\n /**\n * Override or extend the styles applied to the component.\n */\n className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),\n /**\n * The debounce time in milliseconds.\n * @default 150\n */\n debounceMs: PropTypes.number,\n /**\n * The default expanded state of the quick filter control.\n * @default false\n */\n defaultExpanded: PropTypes.bool,\n /**\n * The expanded state of the quick filter control.\n */\n expanded: PropTypes.bool,\n /**\n * Function responsible for formatting values of quick filter in a string when the model is modified\n * @param {any[]} values The new values passed to the quick filter model\n * @returns {string} The string to display in the text field\n * @default (values: string[]) => values.join(' ')\n */\n formatter: PropTypes.func,\n /**\n * Callback function that is called when the quick filter input is expanded or collapsed.\n * @param {boolean} expanded The new expanded state of the quick filter control\n */\n onExpandedChange: PropTypes.func,\n /**\n * Function responsible for parsing text input in an array of independent values for quick filtering.\n * @param {string} input The value entered by the user\n * @returns {any[]} The array of value on which quick filter is applied\n * @default (searchText: string) => searchText.split(' ').filter((word) => word !== '')\n */\n parser: PropTypes.func,\n /**\n * A function to customize rendering of the component.\n */\n render: PropTypes.oneOfType([PropTypes.element, PropTypes.func])\n} : void 0;\nexport { QuickFilter };","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"render\", \"className\", \"slotProps\", \"onKeyDown\", \"onChange\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport useForkRef from '@mui/utils/useForkRef';\nimport { forwardRef } from '@mui/x-internals/forwardRef';\nimport { useComponentRenderer } from '@mui/x-internals/useComponentRenderer';\nimport { useGridRootProps } from \"../../hooks/utils/useGridRootProps.mjs\";\nimport { useQuickFilterContext } from \"./QuickFilterContext.mjs\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\n/**\n * A component that takes user input and filters row data.\n * It renders the `baseTextField` slot.\n *\n * Demos:\n *\n * - [Quick Filter](https://mui.com/x/react-data-grid/components/quick-filter/)\n *\n * API:\n *\n * - [QuickFilterControl API](https://mui.com/x/api/data-grid/quick-filter-control/)\n */\nconst QuickFilterControl = forwardRef(function QuickFilterControl(props, ref) {\n const {\n render,\n className,\n slotProps,\n onKeyDown,\n onChange\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const rootProps = useGridRootProps();\n const {\n state,\n controlId,\n controlRef,\n onValueChange,\n onExpandedChange,\n clearValue\n } = useQuickFilterContext();\n const resolvedClassName = typeof className === 'function' ? className(state) : className;\n const handleRef = useForkRef(controlRef, ref);\n const handleKeyDown = event => {\n if (event.key === 'Escape') {\n if (state.value === '') {\n onExpandedChange(false);\n } else {\n clearValue();\n }\n }\n onKeyDown?.(event);\n };\n const handleBlur = event => {\n if (state.value === '') {\n onExpandedChange(false);\n }\n slotProps?.htmlInput?.onBlur?.(event);\n };\n const handleChange = event => {\n if (!state.expanded) {\n onExpandedChange(true);\n }\n onValueChange(event);\n onChange?.(event);\n };\n const element = useComponentRenderer(rootProps.slots.baseTextField, render, _extends({}, rootProps.slotProps?.baseTextField, {\n slotProps: _extends({\n htmlInput: _extends({\n role: 'searchbox',\n id: controlId,\n tabIndex: state.expanded ? undefined : -1\n }, slotProps?.htmlInput, {\n onBlur: handleBlur\n })\n }, slotProps),\n value: state.value,\n className: resolvedClassName\n }, other, {\n onChange: handleChange,\n onKeyDown: handleKeyDown,\n ref: handleRef\n }), state);\n return /*#__PURE__*/_jsx(React.Fragment, {\n children: element\n });\n});\nif (process.env.NODE_ENV !== \"production\") QuickFilterControl.displayName = \"QuickFilterControl\";\nprocess.env.NODE_ENV !== \"production\" ? QuickFilterControl.propTypes /* remove-proptypes */ = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the TypeScript types and run \"pnpm proptypes\" |\n // ----------------------------------------------------------------------\n autoComplete: PropTypes.string,\n autoFocus: PropTypes.bool,\n /**\n * Override or extend the styles applied to the component.\n */\n className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),\n color: PropTypes.oneOf(['error', 'primary']),\n disabled: PropTypes.bool,\n error: PropTypes.bool,\n fullWidth: PropTypes.bool,\n helperText: PropTypes.string,\n id: PropTypes.string,\n inputRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({\n current: PropTypes.object\n })]),\n label: PropTypes.node,\n multiline: PropTypes.bool,\n placeholder: PropTypes.string,\n /**\n * A function to customize rendering of the component.\n */\n render: PropTypes.oneOfType([PropTypes.element, PropTypes.func]),\n role: PropTypes.string,\n size: PropTypes.oneOf(['medium', 'small']),\n slotProps: PropTypes.object,\n style: PropTypes.object,\n tabIndex: PropTypes.number,\n type: PropTypes.string,\n value: PropTypes.string\n} : void 0;\nexport { QuickFilterControl };","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"render\", \"className\", \"onClick\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { forwardRef } from '@mui/x-internals/forwardRef';\nimport { useComponentRenderer } from '@mui/x-internals/useComponentRenderer';\nimport { useGridRootProps } from \"../../hooks/utils/useGridRootProps.mjs\";\nimport { useQuickFilterContext } from \"./QuickFilterContext.mjs\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\n/**\n * A button that resets the filter value.\n * It renders the `baseIconButton` slot.\n *\n * Demos:\n *\n * - [Quick Filter](https://mui.com/x/react-data-grid/components/quick-filter/)\n *\n * API:\n *\n * - [QuickFilterClear API](https://mui.com/x/api/data-grid/quick-filter-clear/)\n */\nconst QuickFilterClear = forwardRef(function QuickFilterClear(props, ref) {\n const {\n render,\n className,\n onClick\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const rootProps = useGridRootProps();\n const {\n state,\n clearValue\n } = useQuickFilterContext();\n const resolvedClassName = typeof className === 'function' ? className(state) : className;\n const handleClick = event => {\n clearValue();\n onClick?.(event);\n };\n const element = useComponentRenderer(rootProps.slots.baseIconButton, render, _extends({}, rootProps.slotProps?.baseIconButton, {\n className: resolvedClassName,\n tabIndex: -1\n }, other, {\n onClick: handleClick,\n ref\n }), state);\n return /*#__PURE__*/_jsx(React.Fragment, {\n children: element\n });\n});\nif (process.env.NODE_ENV !== \"production\") QuickFilterClear.displayName = \"QuickFilterClear\";\nprocess.env.NODE_ENV !== \"production\" ? QuickFilterClear.propTypes /* remove-proptypes */ = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the TypeScript types and run \"pnpm proptypes\" |\n // ----------------------------------------------------------------------\n /**\n * Override or extend the styles applied to the component.\n */\n className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),\n color: PropTypes.oneOf(['default', 'inherit', 'primary']),\n disabled: PropTypes.bool,\n edge: PropTypes.oneOf(['end', 'start', false]),\n id: PropTypes.string,\n label: PropTypes.string,\n /**\n * A function to customize rendering of the component.\n */\n render: PropTypes.oneOfType([PropTypes.element, PropTypes.func]),\n role: PropTypes.string,\n size: PropTypes.oneOf(['large', 'medium', 'small']),\n style: PropTypes.object,\n tabIndex: PropTypes.number,\n title: PropTypes.string,\n touchRippleRef: PropTypes.any\n} : void 0;\nexport { QuickFilterClear };","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"render\", \"className\", \"onClick\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { forwardRef } from '@mui/x-internals/forwardRef';\nimport { useComponentRenderer } from '@mui/x-internals/useComponentRenderer';\nimport useForkRef from '@mui/utils/useForkRef';\nimport { useGridRootProps } from \"../../hooks/utils/useGridRootProps.mjs\";\nimport { useQuickFilterContext } from \"./QuickFilterContext.mjs\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\n/**\n * A button that expands/collapses the quick filter.\n * It renders the `baseButton` slot.\n *\n * Demos:\n *\n * - [Quick Filter](https://mui.com/x/react-data-grid/components/quick-filter/)\n *\n * API:\n *\n * - [QuickFilterTrigger API](https://mui.com/x/api/data-grid/quick-filter-trigger/)\n */\nconst QuickFilterTrigger = forwardRef(function QuickFilterTrigger(props, ref) {\n const {\n render,\n className,\n onClick\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const rootProps = useGridRootProps();\n const {\n state,\n controlId,\n onExpandedChange,\n triggerRef\n } = useQuickFilterContext();\n const resolvedClassName = typeof className === 'function' ? className(state) : className;\n const handleRef = useForkRef(triggerRef, ref);\n const handleClick = event => {\n onExpandedChange(!state.expanded);\n onClick?.(event);\n };\n const element = useComponentRenderer(rootProps.slots.baseButton, render, _extends({}, rootProps.slotProps?.baseButton, {\n className: resolvedClassName,\n 'aria-controls': controlId,\n 'aria-expanded': state.expanded\n }, other, {\n onClick: handleClick,\n ref: handleRef\n }), state);\n return /*#__PURE__*/_jsx(React.Fragment, {\n children: element\n });\n});\nif (process.env.NODE_ENV !== \"production\") QuickFilterTrigger.displayName = \"QuickFilterTrigger\";\nprocess.env.NODE_ENV !== \"production\" ? QuickFilterTrigger.propTypes /* remove-proptypes */ = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the TypeScript types and run \"pnpm proptypes\" |\n // ----------------------------------------------------------------------\n /**\n * Override or extend the styles applied to the component.\n */\n className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),\n disabled: PropTypes.bool,\n id: PropTypes.string,\n /**\n * A function to customize rendering of the component.\n */\n render: PropTypes.oneOfType([PropTypes.element, PropTypes.func]),\n role: PropTypes.string,\n size: PropTypes.oneOf(['large', 'medium', 'small']),\n startIcon: PropTypes.node,\n style: PropTypes.object,\n tabIndex: PropTypes.number,\n title: PropTypes.string,\n touchRippleRef: PropTypes.any\n} : void 0;\nexport { QuickFilterTrigger };","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _formatErrorMessage from \"@mui/x-internals/formatErrorMessage\";\nconst _excluded = [\"quickFilterParser\", \"quickFilterFormatter\", \"debounceMs\", \"className\", \"slotProps\"],\n _excluded2 = [\"ref\", \"slotProps\"];\nimport PropTypes from 'prop-types';\nimport composeClasses from '@mui/utils/composeClasses';\nimport { styled } from '@mui/material/styles';\nimport clsx from 'clsx';\nimport { getDataGridUtilityClass } from \"../../constants/index.mjs\";\nimport { useGridApiContext } from \"../../hooks/utils/useGridApiContext.mjs\";\nimport { useGridRootProps } from \"../../hooks/utils/useGridRootProps.mjs\";\nimport { QuickFilter, QuickFilterClear, QuickFilterControl, QuickFilterTrigger } from \"../quickFilter/index.mjs\";\nimport { ToolbarButton } from \"../toolbarV8/index.mjs\";\nimport { vars } from \"../../constants/cssVariables.mjs\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n classes\n } = ownerState;\n const slots = {\n root: ['toolbarQuickFilter'],\n trigger: ['toolbarQuickFilterTrigger'],\n control: ['toolbarQuickFilterControl']\n };\n return composeClasses(slots, getDataGridUtilityClass, classes);\n};\nconst GridQuickFilterRoot = styled('div', {\n name: 'MuiDataGrid',\n slot: 'ToolbarQuickFilter'\n})({\n display: 'grid',\n alignItems: 'center'\n});\nconst GridQuickFilterTrigger = styled(ToolbarButton, {\n name: 'MuiDataGrid',\n slot: 'ToolbarQuickFilterTrigger'\n})(({\n ownerState\n}) => ({\n gridArea: '1 / 1',\n width: 'min-content',\n height: 'min-content',\n zIndex: 1,\n opacity: ownerState.expanded ? 0 : 1,\n pointerEvents: ownerState.expanded ? 'none' : 'auto',\n transition: vars.transition(['opacity'])\n}));\n\n// TODO: Use NotRendered from /utils/assert\n// Currently causes react-docgen to fail\nconst GridQuickFilterTextField = styled(_props => {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'MUI X: Failed assertion: should not be rendered' : _formatErrorMessage(57));\n}, {\n name: 'MuiDataGrid',\n slot: 'ToolbarQuickFilterControl'\n})(({\n ownerState\n}) => ({\n gridArea: '1 / 1',\n overflowX: 'clip',\n width: ownerState.expanded ? 260 : 'var(--trigger-width)',\n opacity: ownerState.expanded ? 1 : 0,\n transition: vars.transition(['width', 'opacity'])\n}));\n\n/**\n * @deprecated Use the {@link https://mui.com/x/react-data-grid/components/quick-filter/ Quick Filter} component instead. This component will be removed in a future major release.\n */\nfunction GridToolbarQuickFilter(props) {\n const apiRef = useGridApiContext();\n const rootProps = useGridRootProps();\n const ownerState = {\n classes: rootProps.classes,\n expanded: false\n };\n const classes = useUtilityClasses(ownerState);\n const {\n quickFilterParser,\n quickFilterFormatter,\n debounceMs,\n className,\n slotProps\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n return /*#__PURE__*/_jsx(QuickFilter, {\n parser: quickFilterParser,\n formatter: quickFilterFormatter,\n debounceMs: debounceMs,\n render: (quickFilterProps, state) => {\n const currentOwnerState = _extends({}, ownerState, {\n expanded: state.expanded\n });\n return /*#__PURE__*/_jsxs(GridQuickFilterRoot, _extends({}, quickFilterProps, {\n className: clsx(classes.root, className),\n children: [/*#__PURE__*/_jsx(QuickFilterTrigger, {\n render: triggerProps => /*#__PURE__*/_jsx(rootProps.slots.baseTooltip, {\n title: apiRef.current.getLocaleText('toolbarQuickFilterLabel'),\n enterDelay: 0 // Prevents tooltip lagging behind transitioning trigger element\n ,\n children: /*#__PURE__*/_jsx(GridQuickFilterTrigger, _extends({\n className: classes.trigger\n }, triggerProps, {\n ownerState: currentOwnerState,\n color: \"default\",\n \"aria-disabled\": state.expanded,\n children: /*#__PURE__*/_jsx(rootProps.slots.quickFilterIcon, {\n fontSize: \"small\"\n })\n }))\n })\n }), /*#__PURE__*/_jsx(QuickFilterControl, {\n render: _ref => {\n let {\n ref,\n slotProps: controlSlotProps\n } = _ref,\n controlProps = _objectWithoutPropertiesLoose(_ref, _excluded2);\n return /*#__PURE__*/_jsx(GridQuickFilterTextField, _extends({\n as: rootProps.slots.baseTextField,\n className: classes.control,\n ownerState: currentOwnerState,\n inputRef: ref,\n \"aria-label\": apiRef.current.getLocaleText('toolbarQuickFilterLabel'),\n placeholder: apiRef.current.getLocaleText('toolbarQuickFilterPlaceholder'),\n size: \"small\",\n slotProps: _extends({\n input: _extends({\n startAdornment: /*#__PURE__*/_jsx(rootProps.slots.quickFilterIcon, {\n fontSize: \"small\"\n }),\n endAdornment: controlProps.value ? /*#__PURE__*/_jsx(QuickFilterClear, {\n render: /*#__PURE__*/_jsx(rootProps.slots.baseIconButton, {\n size: \"small\",\n edge: \"end\",\n \"aria-label\": apiRef.current.getLocaleText('toolbarQuickFilterDeleteIconLabel'),\n children: /*#__PURE__*/_jsx(rootProps.slots.quickFilterClearIcon, {\n fontSize: \"small\"\n })\n })\n }) : null\n }, controlSlotProps?.input)\n }, controlSlotProps)\n }, rootProps.slotProps?.baseTextField, controlProps, slotProps?.root, other));\n }\n })]\n }));\n }\n });\n}\nprocess.env.NODE_ENV !== \"production\" ? GridToolbarQuickFilter.propTypes /* remove-proptypes */ = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the TypeScript types and run \"pnpm proptypes\" |\n // ----------------------------------------------------------------------\n className: PropTypes.string,\n /**\n * The debounce time in milliseconds.\n * @default 150\n */\n debounceMs: PropTypes.number,\n /**\n * Function responsible for formatting values of quick filter in a string when the model is modified\n * @param {any[]} values The new values passed to the quick filter model\n * @returns {string} The string to display in the text field\n * @default (values: string[]) => values.join(' ')\n */\n quickFilterFormatter: PropTypes.func,\n /**\n * Function responsible for parsing text input in an array of independent values for quick filtering.\n * @param {string} input The value entered by the user\n * @returns {any[]} The array of value on which quick filter is applied\n * @default (searchText: string) => searchText\n * .split(' ')\n * .filter((word) => word !== '')\n */\n quickFilterParser: PropTypes.func,\n slotProps: PropTypes.object\n} : void 0;\n\n/**\n * Demos:\n * - [Filtering - overview](https://mui.com/x/react-data-grid/filtering/)\n * - [Filtering - quick filter](https://mui.com/x/react-data-grid/filtering/quick-filter/)\n *\n * API:\n * - [GridToolbarQuickFilter API](https://mui.com/x/api/data-grid/grid-toolbar-quick-filter/)\n */\nexport { GridToolbarQuickFilter };","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"render\", \"className\", \"onClick\", \"onPointerUp\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport useId from '@mui/utils/useId';\nimport { forwardRef } from '@mui/x-internals/forwardRef';\nimport { useComponentRenderer } from '@mui/x-internals/useComponentRenderer';\nimport useForkRef from '@mui/utils/useForkRef';\nimport { useGridPanelContext } from \"../panel/GridPanelContext.mjs\";\nimport { useGridApiContext } from \"../../hooks/utils/useGridApiContext.mjs\";\nimport { gridFilterActiveItemsSelector, gridPreferencePanelStateSelector, GridPreferencePanelsValue, useGridSelector } from \"../../hooks/index.mjs\";\nimport { useGridRootProps } from \"../../hooks/utils/useGridRootProps.mjs\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\n/**\n * A button that opens and closes the filter panel.\n * It renders the `baseButton` slot.\n *\n * Demos:\n *\n * - [Filter Panel](https://mui.com/x/react-data-grid/components/filter-panel/)\n *\n * API:\n *\n * - [FilterPanelTrigger API](https://mui.com/x/api/data-grid/filter-panel-trigger/)\n */\nconst FilterPanelTrigger = forwardRef(function FilterPanelTrigger(props, ref) {\n const {\n render,\n className,\n onClick,\n onPointerUp\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const rootProps = useGridRootProps();\n const buttonId = useId();\n const panelId = useId();\n const apiRef = useGridApiContext();\n const panelState = useGridSelector(apiRef, gridPreferencePanelStateSelector);\n const open = panelState.open && panelState.openedPanelValue === GridPreferencePanelsValue.filters;\n const activeFilters = useGridSelector(apiRef, gridFilterActiveItemsSelector);\n const filterCount = activeFilters.length;\n const state = {\n open,\n filterCount\n };\n const resolvedClassName = typeof className === 'function' ? className(state) : className;\n const {\n triggers\n } = useGridPanelContext();\n const handleRef = useForkRef(ref, triggers.filterPanel.setRef);\n const handleClick = event => {\n if (open) {\n apiRef.current.hidePreferences();\n } else {\n apiRef.current.showPreferences(GridPreferencePanelsValue.filters, panelId, buttonId);\n }\n onClick?.(event);\n };\n const handlePointerUp = event => {\n if (open) {\n event.stopPropagation();\n }\n onPointerUp?.(event);\n };\n const element = useComponentRenderer(rootProps.slots.baseButton, render, _extends({}, rootProps.slotProps?.baseButton, {\n id: buttonId,\n 'aria-haspopup': 'true',\n 'aria-expanded': open ? 'true' : undefined,\n 'aria-controls': open ? panelId : undefined,\n onClick: handleClick,\n onPointerUp: handlePointerUp,\n className: resolvedClassName\n }, other, {\n ref: handleRef\n }), state);\n return /*#__PURE__*/_jsx(React.Fragment, {\n children: element\n });\n});\nif (process.env.NODE_ENV !== \"production\") FilterPanelTrigger.displayName = \"FilterPanelTrigger\";\nprocess.env.NODE_ENV !== \"production\" ? FilterPanelTrigger.propTypes /* remove-proptypes */ = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the TypeScript types and run \"pnpm proptypes\" |\n // ----------------------------------------------------------------------\n /**\n * A function to customize rendering of the component.\n */\n className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),\n disabled: PropTypes.bool,\n id: PropTypes.string,\n /**\n * A function to customize rendering of the component.\n */\n render: PropTypes.oneOfType([PropTypes.element, PropTypes.func]),\n role: PropTypes.string,\n size: PropTypes.oneOf(['large', 'medium', 'small']),\n startIcon: PropTypes.node,\n style: PropTypes.object,\n tabIndex: PropTypes.number,\n title: PropTypes.string,\n touchRippleRef: PropTypes.any\n} : void 0;\nexport { FilterPanelTrigger };","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"render\", \"className\", \"onClick\", \"onPointerUp\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport useId from '@mui/utils/useId';\nimport { forwardRef } from '@mui/x-internals/forwardRef';\nimport useForkRef from '@mui/utils/useForkRef';\nimport { useComponentRenderer } from '@mui/x-internals/useComponentRenderer';\nimport { useGridPanelContext } from \"../panel/GridPanelContext.mjs\";\nimport { useGridApiContext } from \"../../hooks/utils/useGridApiContext.mjs\";\nimport { gridPreferencePanelStateSelector, GridPreferencePanelsValue, useGridSelector } from \"../../hooks/index.mjs\";\nimport { useGridRootProps } from \"../../hooks/utils/useGridRootProps.mjs\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\n/**\n * A button that opens and closes the columns panel.\n * It renders the `baseButton` slot.\n *\n * Demos:\n *\n * - [Columns Panel](https://mui.com/x/react-data-grid/components/columns-panel/)\n *\n * API:\n *\n * - [ColumnsPanelTrigger API](https://mui.com/x/api/data-grid/columns-panel-trigger/)\n */\nconst ColumnsPanelTrigger = forwardRef(function ColumnsPanelTrigger(props, ref) {\n const {\n render,\n className,\n onClick,\n onPointerUp\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const rootProps = useGridRootProps();\n const buttonId = useId();\n const panelId = useId();\n const apiRef = useGridApiContext();\n const panelState = useGridSelector(apiRef, gridPreferencePanelStateSelector);\n const open = panelState.open && panelState.openedPanelValue === GridPreferencePanelsValue.columns;\n const state = {\n open\n };\n const resolvedClassName = typeof className === 'function' ? className(state) : className;\n const {\n triggers\n } = useGridPanelContext();\n const handleRef = useForkRef(ref, triggers.columnsPanel.setRef);\n const handleClick = event => {\n if (open) {\n apiRef.current.hidePreferences();\n } else {\n apiRef.current.showPreferences(GridPreferencePanelsValue.columns, panelId, buttonId);\n }\n onClick?.(event);\n };\n const handlePointerUp = event => {\n if (open) {\n event.stopPropagation();\n }\n onPointerUp?.(event);\n };\n const element = useComponentRenderer(rootProps.slots.baseButton, render, _extends({}, rootProps.slotProps?.baseButton, {\n id: buttonId,\n 'aria-haspopup': 'true',\n 'aria-expanded': open ? 'true' : undefined,\n 'aria-controls': open ? panelId : undefined,\n className: resolvedClassName\n }, other, {\n onPointerUp: handlePointerUp,\n onClick: handleClick,\n ref: handleRef\n }), state);\n return /*#__PURE__*/_jsx(React.Fragment, {\n children: element\n });\n});\nif (process.env.NODE_ENV !== \"production\") ColumnsPanelTrigger.displayName = \"ColumnsPanelTrigger\";\nprocess.env.NODE_ENV !== \"production\" ? ColumnsPanelTrigger.propTypes /* remove-proptypes */ = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the TypeScript types and run \"pnpm proptypes\" |\n // ----------------------------------------------------------------------\n /**\n * Override or extend the styles applied to the component.\n */\n className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),\n disabled: PropTypes.bool,\n id: PropTypes.string,\n /**\n * A function to customize rendering of the component.\n */\n render: PropTypes.oneOfType([PropTypes.element, PropTypes.func]),\n role: PropTypes.string,\n size: PropTypes.oneOf(['large', 'medium', 'small']),\n startIcon: PropTypes.node,\n style: PropTypes.object,\n tabIndex: PropTypes.number,\n title: PropTypes.string,\n touchRippleRef: PropTypes.any\n} : void 0;\nexport { ColumnsPanelTrigger };","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"render\", \"options\", \"onClick\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { forwardRef } from '@mui/x-internals/forwardRef';\nimport { useComponentRenderer } from '@mui/x-internals/useComponentRenderer';\nimport { useGridApiContext } from \"../../hooks/utils/useGridApiContext.mjs\";\nimport { useGridRootProps } from \"../../hooks/utils/useGridRootProps.mjs\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\n/**\n * A button that triggers a CSV export.\n * It renders the `baseButton` slot.\n *\n * Demos:\n *\n * - [Export](https://mui.com/x/react-data-grid/components/export/)\n *\n * API:\n *\n * - [ExportCsv API](https://mui.com/x/api/data-grid/export-csv/)\n */\nconst ExportCsv = forwardRef(function ExportCsv(props, ref) {\n const {\n render,\n options,\n onClick\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const rootProps = useGridRootProps();\n const apiRef = useGridApiContext();\n const handleClick = event => {\n apiRef.current.exportDataAsCsv(options);\n onClick?.(event);\n };\n const element = useComponentRenderer(rootProps.slots.baseButton, render, _extends({}, rootProps.slotProps?.baseButton, {\n onClick: handleClick\n }, other, {\n ref\n }));\n return /*#__PURE__*/_jsx(React.Fragment, {\n children: element\n });\n});\nif (process.env.NODE_ENV !== \"production\") ExportCsv.displayName = \"ExportCsv\";\nprocess.env.NODE_ENV !== \"production\" ? ExportCsv.propTypes /* remove-proptypes */ = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the TypeScript types and run \"pnpm proptypes\" |\n // ----------------------------------------------------------------------\n className: PropTypes.string,\n disabled: PropTypes.bool,\n id: PropTypes.string,\n /**\n * The options to apply on the CSV export.\n * @demos\n * - [CSV export](/x/react-data-grid/export/#csv-export)\n */\n options: PropTypes.shape({\n allColumns: PropTypes.bool,\n delimiter: PropTypes.string,\n escapeFormulas: PropTypes.bool,\n fields: PropTypes.arrayOf(PropTypes.string),\n fileName: PropTypes.string,\n getRowsToExport: PropTypes.func,\n includeColumnGroupsHeaders: PropTypes.bool,\n includeHeaders: PropTypes.bool,\n shouldAppendQuotes: PropTypes.bool,\n utf8WithBom: PropTypes.bool\n }),\n /**\n * A function to customize rendering of the component.\n */\n render: PropTypes.oneOfType([PropTypes.element, PropTypes.func]),\n role: PropTypes.string,\n size: PropTypes.oneOf(['large', 'medium', 'small']),\n startIcon: PropTypes.node,\n style: PropTypes.object,\n tabIndex: PropTypes.number,\n title: PropTypes.string,\n touchRippleRef: PropTypes.any\n} : void 0;\nexport { ExportCsv };","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"render\", \"options\", \"onClick\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { forwardRef } from '@mui/x-internals/forwardRef';\nimport { useComponentRenderer } from '@mui/x-internals/useComponentRenderer';\nimport { useGridApiContext } from \"../../hooks/utils/useGridApiContext.mjs\";\nimport { useGridRootProps } from \"../../hooks/utils/useGridRootProps.mjs\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\n/**\n * A button that triggers a print export.\n * It renders the `baseButton` slot.\n *\n * Demos:\n *\n * - [Export](https://mui.com/x/react-data-grid/components/export/)\n *\n * API:\n *\n * - [ExportPrint API](https://mui.com/x/api/data-grid/export-print/)\n */\nconst ExportPrint = forwardRef(function ExportPrint(props, ref) {\n const {\n render,\n options,\n onClick\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const rootProps = useGridRootProps();\n const apiRef = useGridApiContext();\n const handleClick = event => {\n apiRef.current.exportDataAsPrint(options);\n onClick?.(event);\n };\n const element = useComponentRenderer(rootProps.slots.baseButton, render, _extends({}, rootProps.slotProps?.baseButton, {\n onClick: handleClick\n }, other, {\n ref\n }));\n return /*#__PURE__*/_jsx(React.Fragment, {\n children: element\n });\n});\nif (process.env.NODE_ENV !== \"production\") ExportPrint.displayName = \"ExportPrint\";\nprocess.env.NODE_ENV !== \"production\" ? ExportPrint.propTypes /* remove-proptypes */ = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the TypeScript types and run \"pnpm proptypes\" |\n // ----------------------------------------------------------------------\n className: PropTypes.string,\n disabled: PropTypes.bool,\n id: PropTypes.string,\n /**\n * The options to apply on the Print export.\n * @demos\n * - [Print export](/x/react-data-grid/export/#print-export)\n */\n options: PropTypes.shape({\n allColumns: PropTypes.bool,\n bodyClassName: PropTypes.string,\n copyStyles: PropTypes.bool,\n fields: PropTypes.arrayOf(PropTypes.string),\n fileName: PropTypes.string,\n getRowsToExport: PropTypes.func,\n hideFooter: PropTypes.bool,\n hideToolbar: PropTypes.bool,\n includeCheckboxes: PropTypes.bool,\n pageStyle: PropTypes.oneOfType([PropTypes.func, PropTypes.string])\n }),\n /**\n * A function to customize rendering of the component.\n */\n render: PropTypes.oneOfType([PropTypes.element, PropTypes.func]),\n role: PropTypes.string,\n size: PropTypes.oneOf(['large', 'medium', 'small']),\n startIcon: PropTypes.node,\n style: PropTypes.object,\n tabIndex: PropTypes.number,\n title: PropTypes.string,\n touchRippleRef: PropTypes.any\n} : void 0;\nexport { ExportPrint };","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"className\"],\n _excluded2 = [\"className\"],\n _excluded3 = [\"showQuickFilter\", \"quickFilterProps\", \"csvOptions\", \"printOptions\", \"mainControls\", \"additionalExportMenuItems\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport useId from '@mui/utils/useId';\nimport { styled } from '@mui/material/styles';\nimport composeClasses from '@mui/utils/composeClasses';\nimport { GridMenu } from \"../menu/GridMenu.mjs\";\nimport { Toolbar } from \"./Toolbar.mjs\";\nimport { ToolbarButton } from \"./ToolbarButton.mjs\";\nimport { FilterPanelTrigger } from \"../filterPanel/index.mjs\";\nimport { ColumnsPanelTrigger } from \"../columnsPanel/index.mjs\";\nimport { ExportCsv, ExportPrint } from \"../export/index.mjs\";\nimport { GridToolbarQuickFilter } from \"../toolbar/GridToolbarQuickFilter.mjs\";\nimport { useGridRootProps } from \"../../hooks/utils/useGridRootProps.mjs\";\nimport { useGridApiContext } from \"../../hooks/utils/useGridApiContext.mjs\";\nimport { NotRendered } from \"../../utils/assert.mjs\";\nimport { vars } from \"../../constants/cssVariables.mjs\";\nimport { getDataGridUtilityClass } from \"../../constants/gridClasses.mjs\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n classes\n } = ownerState;\n const slots = {\n divider: ['toolbarDivider'],\n label: ['toolbarLabel']\n };\n return composeClasses(slots, getDataGridUtilityClass, classes);\n};\nconst Divider = styled(NotRendered, {\n name: 'MuiDataGrid',\n slot: 'ToolbarDivider'\n})({\n height: '50%',\n margin: vars.spacing(0, 0.5)\n});\nconst Label = styled('span', {\n name: 'MuiDataGrid',\n slot: 'ToolbarLabel'\n})({\n flex: 1,\n font: vars.typography.font.large,\n fontWeight: vars.typography.fontWeight.medium,\n margin: vars.spacing(0, 0.5),\n textOverflow: 'ellipsis',\n overflow: 'hidden',\n whiteSpace: 'nowrap'\n});\nfunction GridToolbarDivider(props) {\n const other = _objectWithoutPropertiesLoose(props, _excluded);\n const rootProps = useGridRootProps();\n const classes = useUtilityClasses(rootProps);\n return /*#__PURE__*/_jsx(Divider, _extends({\n as: rootProps.slots.baseDivider,\n orientation: \"vertical\",\n className: classes.divider\n }, other));\n}\nprocess.env.NODE_ENV !== \"production\" ? GridToolbarDivider.propTypes /* remove-proptypes */ = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the TypeScript types and run \"pnpm proptypes\" |\n // ----------------------------------------------------------------------\n className: PropTypes.string,\n orientation: PropTypes.oneOf(['horizontal', 'vertical'])\n} : void 0;\nfunction GridToolbarLabel(props) {\n const other = _objectWithoutPropertiesLoose(props, _excluded2);\n const rootProps = useGridRootProps();\n const classes = useUtilityClasses(rootProps);\n return /*#__PURE__*/_jsx(Label, _extends({\n className: classes.label\n }, other));\n}\nfunction GridToolbar(props) {\n const {\n showQuickFilter = true,\n quickFilterProps,\n csvOptions,\n printOptions,\n mainControls,\n additionalExportMenuItems\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded3);\n const apiRef = useGridApiContext();\n const rootProps = useGridRootProps();\n const [exportMenuOpen, setExportMenuOpen] = React.useState(false);\n const exportMenuTriggerRef = React.useRef(null);\n const exportMenuId = useId();\n const exportMenuTriggerId = useId();\n const showExportMenu = !csvOptions?.disableToolbarButton || !printOptions?.disableToolbarButton || additionalExportMenuItems;\n const closeExportMenu = () => setExportMenuOpen(false);\n return /*#__PURE__*/_jsxs(Toolbar, _extends({}, other, {\n children: [rootProps.label && /*#__PURE__*/_jsx(GridToolbarLabel, {\n children: rootProps.label\n }), mainControls || /*#__PURE__*/_jsxs(React.Fragment, {\n children: [!rootProps.disableColumnSelector && /*#__PURE__*/_jsx(rootProps.slots.baseTooltip, {\n title: apiRef.current.getLocaleText('toolbarColumns'),\n children: /*#__PURE__*/_jsx(ColumnsPanelTrigger, {\n render: /*#__PURE__*/_jsx(ToolbarButton, {}),\n children: /*#__PURE__*/_jsx(rootProps.slots.columnSelectorIcon, {\n fontSize: \"small\"\n })\n })\n }), !rootProps.disableColumnFilter && /*#__PURE__*/_jsx(rootProps.slots.baseTooltip, {\n title: apiRef.current.getLocaleText('toolbarFilters'),\n children: /*#__PURE__*/_jsx(FilterPanelTrigger, {\n render: (triggerProps, state) => /*#__PURE__*/_jsx(ToolbarButton, _extends({}, triggerProps, {\n color: state.filterCount > 0 ? 'primary' : 'default',\n children: /*#__PURE__*/_jsx(rootProps.slots.baseBadge, {\n badgeContent: state.filterCount,\n color: \"primary\",\n variant: \"dot\",\n children: /*#__PURE__*/_jsx(rootProps.slots.openFilterButtonIcon, {\n fontSize: \"small\"\n })\n })\n }))\n })\n })]\n }), showExportMenu && (!rootProps.disableColumnFilter || !rootProps.disableColumnSelector) && /*#__PURE__*/_jsx(GridToolbarDivider, {}), showExportMenu && /*#__PURE__*/_jsxs(React.Fragment, {\n children: [/*#__PURE__*/_jsx(rootProps.slots.baseTooltip, {\n title: apiRef.current.getLocaleText('toolbarExport'),\n disableInteractive: exportMenuOpen,\n children: /*#__PURE__*/_jsx(ToolbarButton, {\n ref: exportMenuTriggerRef,\n id: exportMenuTriggerId,\n \"aria-controls\": exportMenuId,\n \"aria-haspopup\": \"true\",\n \"aria-expanded\": exportMenuOpen ? 'true' : undefined,\n onClick: () => setExportMenuOpen(!exportMenuOpen),\n children: /*#__PURE__*/_jsx(rootProps.slots.exportIcon, {\n fontSize: \"small\"\n })\n })\n }), /*#__PURE__*/_jsx(GridMenu, {\n target: exportMenuTriggerRef.current,\n open: exportMenuOpen,\n onClose: closeExportMenu,\n position: \"bottom-end\",\n children: /*#__PURE__*/_jsxs(rootProps.slots.baseMenuList, _extends({\n id: exportMenuId,\n \"aria-labelledby\": exportMenuTriggerId,\n autoFocusItem: true\n }, rootProps.slotProps?.baseMenuList, {\n children: [!printOptions?.disableToolbarButton && /*#__PURE__*/_jsx(ExportPrint, {\n render: /*#__PURE__*/_jsx(rootProps.slots.baseMenuItem, _extends({}, rootProps.slotProps?.baseMenuItem)),\n options: printOptions,\n onClick: closeExportMenu,\n children: apiRef.current.getLocaleText('toolbarExportPrint')\n }), !csvOptions?.disableToolbarButton && /*#__PURE__*/_jsx(ExportCsv, {\n render: /*#__PURE__*/_jsx(rootProps.slots.baseMenuItem, _extends({}, rootProps.slotProps?.baseMenuItem)),\n options: csvOptions,\n onClick: closeExportMenu,\n children: apiRef.current.getLocaleText('toolbarExportCSV')\n }), additionalExportMenuItems?.(closeExportMenu)]\n }))\n })]\n }), showQuickFilter && /*#__PURE__*/_jsxs(React.Fragment, {\n children: [/*#__PURE__*/_jsx(GridToolbarDivider, {}), /*#__PURE__*/_jsx(GridToolbarQuickFilter, _extends({}, quickFilterProps))]\n })]\n }));\n}\nprocess.env.NODE_ENV !== \"production\" ? GridToolbar.propTypes /* remove-proptypes */ = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the TypeScript types and run \"pnpm proptypes\" |\n // ----------------------------------------------------------------------\n additionalExportMenuItems: PropTypes.func,\n csvOptions: PropTypes.object,\n mainControls: PropTypes.node,\n printOptions: PropTypes.object,\n /**\n * Props passed to the quick filter component.\n */\n quickFilterProps: PropTypes.shape({\n className: PropTypes.string,\n debounceMs: PropTypes.number,\n quickFilterFormatter: PropTypes.func,\n quickFilterParser: PropTypes.func,\n slotProps: PropTypes.object\n }),\n /**\n * Show the history controls (undo/redo buttons).\n * @default true\n */\n showHistoryControls: PropTypes.bool,\n /**\n * Show the quick filter component.\n * @default true\n */\n showQuickFilter: PropTypes.bool,\n /**\n * The props used for each slot inside.\n * @default {}\n */\n slotProps: PropTypes.object,\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])\n} : void 0;\nexport { GridToolbar, GridToolbarDivider, GridToolbarLabel };","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"className\", \"csvOptions\", \"printOptions\", \"excelOptions\", \"showQuickFilter\", \"quickFilterProps\"];\nimport PropTypes from 'prop-types';\nimport { forwardRef } from '@mui/x-internals/forwardRef';\nimport { GridToolbarContainer } from \"../containers/GridToolbarContainer.mjs\";\nimport { GridToolbarColumnsButton } from \"./GridToolbarColumnsButton.mjs\";\nimport { GridToolbarDensitySelector } from \"./GridToolbarDensitySelector.mjs\";\nimport { GridToolbarFilterButton } from \"./GridToolbarFilterButton.mjs\";\nimport { GridToolbarExport } from \"./GridToolbarExport.mjs\";\nimport { useGridRootProps } from \"../../hooks/utils/useGridRootProps.mjs\";\nimport { GridToolbarQuickFilter } from \"./GridToolbarQuickFilter.mjs\";\nimport { GridToolbarLabel } from \"../toolbarV8/GridToolbar.mjs\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\n/**\n * @deprecated Use the `showToolbar` prop to show the default toolbar instead. This component will be removed in a future major release.\n */\nconst GridToolbar = forwardRef(function GridToolbar(props, ref) {\n // TODO v7: think about where export option should be passed.\n // from slotProps={{ toolbarExport: { ...exportOption } }} seems to be more appropriate\n const _ref = props,\n {\n csvOptions,\n printOptions,\n excelOptions,\n showQuickFilter = true,\n quickFilterProps = {}\n } = _ref,\n other = _objectWithoutPropertiesLoose(_ref, _excluded);\n const rootProps = useGridRootProps();\n if (rootProps.disableColumnFilter && rootProps.disableColumnSelector && rootProps.disableDensitySelector && !showQuickFilter) {\n return null;\n }\n return /*#__PURE__*/_jsxs(GridToolbarContainer, _extends({}, other, {\n ref: ref,\n children: [rootProps.label && /*#__PURE__*/_jsx(GridToolbarLabel, {\n children: rootProps.label\n }), /*#__PURE__*/_jsx(GridToolbarColumnsButton, {}), /*#__PURE__*/_jsx(GridToolbarFilterButton, {}), /*#__PURE__*/_jsx(GridToolbarDensitySelector, {}), /*#__PURE__*/_jsx(GridToolbarExport, {\n csvOptions: csvOptions,\n printOptions: printOptions\n // @ts-ignore\n ,\n excelOptions: excelOptions\n }), /*#__PURE__*/_jsx(\"div\", {\n style: {\n flex: 1\n }\n }), showQuickFilter && /*#__PURE__*/_jsx(GridToolbarQuickFilter, _extends({}, quickFilterProps))]\n }));\n});\nif (process.env.NODE_ENV !== \"production\") GridToolbar.displayName = \"GridToolbar\";\nprocess.env.NODE_ENV !== \"production\" ? GridToolbar.propTypes /* remove-proptypes */ = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the TypeScript types and run \"pnpm proptypes\" |\n // ----------------------------------------------------------------------\n csvOptions: PropTypes.object,\n printOptions: PropTypes.object,\n /**\n * Props passed to the quick filter component.\n */\n quickFilterProps: PropTypes.shape({\n className: PropTypes.string,\n debounceMs: PropTypes.number,\n quickFilterFormatter: PropTypes.func,\n quickFilterParser: PropTypes.func,\n slotProps: PropTypes.object\n }),\n /**\n * Show the history controls (undo/redo buttons).\n * @default true\n */\n showHistoryControls: PropTypes.bool,\n /**\n * Show the quick filter component.\n * @default true\n */\n showQuickFilter: PropTypes.bool,\n /**\n * The props used for each slot inside.\n * @default {}\n */\n slotProps: PropTypes.object,\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])\n} : void 0;\nexport { GridToolbar };","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"className\", \"selectedRowCount\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport composeClasses from '@mui/utils/composeClasses';\nimport { styled } from '@mui/system';\nimport { forwardRef } from '@mui/x-internals/forwardRef';\nimport { vars } from \"../constants/cssVariables.mjs\";\nimport { useGridApiContext } from \"../hooks/utils/useGridApiContext.mjs\";\nimport { getDataGridUtilityClass } from \"../constants/gridClasses.mjs\";\nimport { useGridRootProps } from \"../hooks/utils/useGridRootProps.mjs\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n classes\n } = ownerState;\n const slots = {\n root: ['selectedRowCount']\n };\n return composeClasses(slots, getDataGridUtilityClass, classes);\n};\nconst GridSelectedRowCountRoot = styled('div', {\n name: 'MuiDataGrid',\n slot: 'SelectedRowCount'\n})({\n alignItems: 'center',\n display: 'flex',\n margin: vars.spacing(0, 2),\n visibility: 'hidden',\n width: 0,\n height: 0,\n [vars.breakpoints.up('sm')]: {\n visibility: 'visible',\n width: 'auto',\n height: 'auto'\n }\n});\nconst GridSelectedRowCount = forwardRef(function GridSelectedRowCount(props, ref) {\n const {\n className,\n selectedRowCount\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const apiRef = useGridApiContext();\n const ownerState = useGridRootProps();\n const classes = useUtilityClasses(ownerState);\n const rowSelectedText = apiRef.current.getLocaleText('footerRowSelected')(selectedRowCount);\n return /*#__PURE__*/_jsx(GridSelectedRowCountRoot, _extends({\n className: clsx(classes.root, className),\n ownerState: ownerState\n }, other, {\n ref: ref,\n children: rowSelectedText\n }));\n});\nif (process.env.NODE_ENV !== \"production\") GridSelectedRowCount.displayName = \"GridSelectedRowCount\";\nprocess.env.NODE_ENV !== \"production\" ? GridSelectedRowCount.propTypes /* remove-proptypes */ = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the TypeScript types and run \"pnpm proptypes\" |\n // ----------------------------------------------------------------------\n selectedRowCount: PropTypes.number.isRequired,\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])\n} : void 0;\nexport { GridSelectedRowCount };","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport PropTypes from 'prop-types';\nimport { forwardRef } from '@mui/x-internals/forwardRef';\nimport { useGridSelector } from \"../hooks/utils/useGridSelector.mjs\";\nimport { gridTopLevelRowCountSelector } from \"../hooks/features/rows/gridRowsSelector.mjs\";\nimport { gridRowSelectionCountSelector } from \"../hooks/features/rowSelection/gridRowSelectionSelector.mjs\";\nimport { gridFilteredTopLevelRowCountSelector } from \"../hooks/features/filter/gridFilterSelector.mjs\";\nimport { useGridApiContext } from \"../hooks/utils/useGridApiContext.mjs\";\nimport { GridSelectedRowCount } from \"./GridSelectedRowCount.mjs\";\nimport { GridFooterContainer } from \"./containers/GridFooterContainer.mjs\";\nimport { useGridRootProps } from \"../hooks/utils/useGridRootProps.mjs\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst GridFooter = forwardRef(function GridFooter(props, ref) {\n const apiRef = useGridApiContext();\n const rootProps = useGridRootProps();\n const totalTopLevelRowCount = useGridSelector(apiRef, gridTopLevelRowCountSelector);\n const selectedRowCount = useGridSelector(apiRef, gridRowSelectionCountSelector);\n const visibleTopLevelRowCount = useGridSelector(apiRef, gridFilteredTopLevelRowCountSelector);\n const selectedRowCountElement = !rootProps.hideFooterSelectedRowCount && selectedRowCount > 0 ? /*#__PURE__*/_jsx(GridSelectedRowCount, {\n selectedRowCount: selectedRowCount\n }) : /*#__PURE__*/_jsx(\"div\", {});\n const rowCountElement = !rootProps.hideFooterRowCount && !rootProps.pagination ? /*#__PURE__*/_jsx(rootProps.slots.footerRowCount, _extends({}, rootProps.slotProps?.footerRowCount, {\n rowCount: totalTopLevelRowCount,\n visibleRowCount: visibleTopLevelRowCount\n })) : null;\n const paginationElement = rootProps.pagination && !rootProps.hideFooterPagination && rootProps.slots.pagination && /*#__PURE__*/_jsx(rootProps.slots.pagination, _extends({}, rootProps.slotProps?.pagination));\n return /*#__PURE__*/_jsxs(GridFooterContainer, _extends({}, props, {\n ref: ref,\n children: [selectedRowCountElement, rowCountElement, paginationElement]\n }));\n});\nif (process.env.NODE_ENV !== \"production\") GridFooter.displayName = \"GridFooter\";\nprocess.env.NODE_ENV !== \"production\" ? GridFooter.propTypes /* remove-proptypes */ = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the TypeScript types and run \"pnpm proptypes\" |\n // ----------------------------------------------------------------------\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])\n} : void 0;\nexport { GridFooter };","import { PinnedColumnPosition } from \"../constants.mjs\";\nexport const getPinnedCellOffset = (pinnedPosition, computedWidth, columnIndex, columnPositions, columnsTotalWidth, scrollbarWidth) => {\n let pinnedOffset;\n switch (pinnedPosition) {\n case PinnedColumnPosition.LEFT:\n pinnedOffset = columnPositions[columnIndex];\n break;\n case PinnedColumnPosition.RIGHT:\n pinnedOffset = columnsTotalWidth - columnPositions[columnIndex] - computedWidth + scrollbarWidth;\n break;\n default:\n pinnedOffset = undefined;\n break;\n }\n\n // XXX: fix this properly\n if (Number.isNaN(pinnedOffset)) {\n pinnedOffset = undefined;\n }\n return pinnedOffset;\n};","import { PinnedColumnPosition } from \"../internals/constants.mjs\";\nexport const shouldCellShowRightBorder = (pinnedPosition, indexInSection, sectionLength, showCellVerticalBorderRootProp, gridHasFiller, pinnedColumnsSectionSeparatorRootProp) => {\n const isSectionLastCell = indexInSection === sectionLength - 1;\n if (pinnedColumnsSectionSeparatorRootProp?.startsWith('border') && pinnedPosition === PinnedColumnPosition.LEFT && isSectionLastCell) {\n return true;\n }\n if (showCellVerticalBorderRootProp) {\n if (pinnedPosition === PinnedColumnPosition.LEFT) {\n return true;\n }\n if (pinnedPosition === PinnedColumnPosition.RIGHT) {\n return !isSectionLastCell;\n }\n // pinnedPosition === undefined, middle section\n return !isSectionLastCell || gridHasFiller;\n }\n return false;\n};\nexport const shouldCellShowLeftBorder = (pinnedPosition, indexInSection, showCellVerticalBorderRootProp, pinnedColumnsSectionSeparatorRootProp) => {\n if (pinnedColumnsSectionSeparatorRootProp?.startsWith('border')) {\n return pinnedPosition === PinnedColumnPosition.RIGHT && indexInSection === 0;\n }\n return showCellVerticalBorderRootProp && pinnedPosition === PinnedColumnPosition.RIGHT && indexInSection === 0;\n};","'use client';\n\nimport _formatErrorMessage from \"@mui/x-internals/formatErrorMessage\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"skeletonRowsCount\", \"visibleColumns\", \"showFirstRowBorder\"];\nimport * as React from 'react';\nimport clsx from 'clsx';\nimport { styled } from '@mui/material/styles';\nimport useForkRef from '@mui/utils/useForkRef';\nimport composeClasses from '@mui/utils/composeClasses';\nimport { useRtl } from '@mui/system/RtlProvider';\nimport { forwardRef } from '@mui/x-internals/forwardRef';\nimport { useGridApiContext } from \"../hooks/utils/useGridApiContext.mjs\";\nimport { useGridRootProps } from \"../hooks/utils/useGridRootProps.mjs\";\nimport { gridColumnPositionsSelector, gridDimensionsSelector, gridVisibleColumnDefinitionsSelector, gridVisiblePinnedColumnDefinitionsSelector, useGridEvent, useGridSelector } from \"../hooks/index.mjs\";\nimport { PinnedColumnPosition } from \"../internals/constants.mjs\";\nimport { gridColumnsTotalWidthSelector } from \"../hooks/features/dimensions/gridDimensionsSelectors.mjs\";\nimport { getDataGridUtilityClass, gridClasses } from \"../constants/gridClasses.mjs\";\nimport { getPinnedCellOffset } from \"../internals/utils/getPinnedCellOffset.mjs\";\nimport { shouldCellShowLeftBorder, shouldCellShowRightBorder } from \"../utils/cellBorderUtils.mjs\";\nimport { escapeOperandAttributeSelector } from \"../utils/domUtils.mjs\";\nimport { rtlFlipSide } from \"../utils/rtlFlipSide.mjs\";\nimport { attachPinnedStyle } from \"../internals/utils/index.mjs\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst SkeletonOverlay = styled('div', {\n name: 'MuiDataGrid',\n slot: 'SkeletonLoadingOverlay'\n})({\n minWidth: '100%',\n width: 'max-content',\n // prevents overflow: clip; cutting off the x axis\n height: '100%',\n overflow: 'clip' // y axis is hidden while the x axis is allowed to overflow\n});\nconst useUtilityClasses = ownerState => {\n const {\n classes\n } = ownerState;\n const slots = {\n root: ['skeletonLoadingOverlay']\n };\n return composeClasses(slots, getDataGridUtilityClass, classes);\n};\nconst getColIndex = el => parseInt(el.getAttribute('data-colindex'), 10);\nexport const GridSkeletonLoadingOverlayInner = forwardRef(function GridSkeletonLoadingOverlayInner(props, forwardedRef) {\n const rootProps = useGridRootProps();\n const {\n slots\n } = rootProps;\n const isRtl = useRtl();\n const classes = useUtilityClasses({\n classes: rootProps.classes\n });\n const ref = React.useRef(null);\n const handleRef = useForkRef(ref, forwardedRef);\n const apiRef = useGridApiContext();\n const dimensions = useGridSelector(apiRef, gridDimensionsSelector);\n const totalWidth = useGridSelector(apiRef, gridColumnsTotalWidthSelector);\n const positions = useGridSelector(apiRef, gridColumnPositionsSelector);\n const inViewportCount = React.useMemo(() => positions.filter(value => value <= totalWidth).length, [totalWidth, positions]);\n const {\n skeletonRowsCount,\n visibleColumns,\n showFirstRowBorder\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const allVisibleColumns = useGridSelector(apiRef, gridVisibleColumnDefinitionsSelector);\n const columns = React.useMemo(() => allVisibleColumns.slice(0, inViewportCount), [allVisibleColumns, inViewportCount]);\n const pinnedColumns = useGridSelector(apiRef, gridVisiblePinnedColumnDefinitionsSelector);\n const getPinnedPosition = React.useCallback(field => {\n if (pinnedColumns.left.findIndex(col => col.field === field) !== -1) {\n return PinnedColumnPosition.LEFT;\n }\n if (pinnedColumns.right.findIndex(col => col.field === field) !== -1) {\n return PinnedColumnPosition.RIGHT;\n }\n return undefined;\n }, [pinnedColumns.left, pinnedColumns.right]);\n const children = React.useMemo(() => {\n const array = [];\n for (let i = 0; i < skeletonRowsCount; i += 1) {\n const rowCells = [];\n for (let colIndex = 0; colIndex < columns.length; colIndex += 1) {\n const column = columns[colIndex];\n const pinnedPosition = getPinnedPosition(column.field);\n const isPinnedLeft = pinnedPosition === PinnedColumnPosition.LEFT;\n const isPinnedRight = pinnedPosition === PinnedColumnPosition.RIGHT;\n const pinnedSide = rtlFlipSide(pinnedPosition, isRtl);\n const sectionLength = pinnedSide ? pinnedColumns[pinnedSide].length // pinned section\n : columns.length - pinnedColumns.left.length - pinnedColumns.right.length; // middle section\n const sectionIndex = pinnedSide ? pinnedColumns[pinnedSide].findIndex(col => col.field === column.field) // pinned section\n : colIndex - pinnedColumns.left.length; // middle section\n const scrollbarWidth = dimensions.hasScrollY ? dimensions.scrollbarSize : 0;\n const pinnedStyle = attachPinnedStyle({}, isRtl, pinnedPosition, getPinnedCellOffset(pinnedPosition, column.computedWidth, colIndex, positions, dimensions.columnsTotalWidth, scrollbarWidth));\n const gridHasFiller = dimensions.columnsTotalWidth < dimensions.viewportOuterSize.width;\n const showRightBorder = shouldCellShowRightBorder(pinnedPosition, sectionIndex, sectionLength, rootProps.showCellVerticalBorder, gridHasFiller, rootProps.pinnedColumnsSectionSeparator);\n const showLeftBorder = shouldCellShowLeftBorder(pinnedPosition, sectionIndex, rootProps.showCellVerticalBorder, rootProps.pinnedColumnsSectionSeparator);\n const isLastColumn = colIndex === columns.length - 1;\n const isFirstPinnedRight = isPinnedRight && sectionIndex === 0;\n const hasFillerBefore = isFirstPinnedRight && gridHasFiller;\n const hasFillerAfter = isLastColumn && !isFirstPinnedRight && gridHasFiller;\n const expandedWidth = dimensions.viewportOuterSize.width - dimensions.columnsTotalWidth;\n const emptyCellWidth = Math.max(0, expandedWidth);\n const emptyCell = /*#__PURE__*/_jsx(slots.skeletonCell, {\n width: emptyCellWidth,\n empty: true\n }, `skeleton-filler-column-${i}`);\n if (hasFillerBefore) {\n rowCells.push(emptyCell);\n }\n rowCells.push(/*#__PURE__*/_jsx(slots.skeletonCell, {\n field: column.field,\n type: column.type,\n align: column.align,\n width: \"var(--width)\",\n height: dimensions.rowHeight,\n \"data-colindex\": colIndex,\n empty: visibleColumns && !visibleColumns.has(column.field),\n className: clsx(isPinnedLeft && gridClasses['cell--pinnedLeft'], isPinnedRight && gridClasses['cell--pinnedRight'], showRightBorder && gridClasses['cell--withRightBorder'], showLeftBorder && gridClasses['cell--withLeftBorder']),\n style: _extends({\n '--width': `${column.computedWidth}px`\n }, pinnedStyle)\n }, `skeleton-column-${i}-${column.field}`));\n if (hasFillerAfter) {\n rowCells.push(emptyCell);\n }\n }\n array.push(/*#__PURE__*/_jsx(\"div\", {\n className: clsx(gridClasses.row, gridClasses.rowSkeleton, i === 0 && !showFirstRowBorder && gridClasses['row--firstVisible']),\n children: rowCells\n }, `skeleton-row-${i}`));\n }\n return array;\n }, [skeletonRowsCount, columns, getPinnedPosition, isRtl, pinnedColumns, dimensions.hasScrollY, dimensions.scrollbarSize, dimensions.columnsTotalWidth, dimensions.viewportOuterSize.width, dimensions.rowHeight, positions, rootProps.showCellVerticalBorder, rootProps.pinnedColumnsSectionSeparator, slots, visibleColumns, showFirstRowBorder]);\n\n // Sync the column resize of the overlay columns with the grid\n const handleColumnResize = params => {\n const {\n colDef,\n width\n } = params;\n const cells = ref.current?.querySelectorAll(`[data-field=\"${escapeOperandAttributeSelector(colDef.field)}\"]`);\n if (!cells) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'MUI X: Expected skeleton cells to be defined with `data-field` attribute.' : _formatErrorMessage(56));\n }\n const resizedColIndex = columns.findIndex(col => col.field === colDef.field);\n const pinnedPosition = getPinnedPosition(colDef.field);\n const isPinnedLeft = pinnedPosition === PinnedColumnPosition.LEFT;\n const isPinnedRight = pinnedPosition === PinnedColumnPosition.RIGHT;\n const currentWidth = getComputedStyle(cells[0]).getPropertyValue('--width');\n const delta = parseInt(currentWidth, 10) - width;\n if (cells) {\n cells.forEach(element => {\n element.style.setProperty('--width', `${width}px`);\n });\n }\n if (isPinnedLeft) {\n const pinnedCells = ref.current?.querySelectorAll(`.${gridClasses['cell--pinnedLeft']}`);\n pinnedCells?.forEach(element => {\n const colIndex = getColIndex(element);\n if (colIndex > resizedColIndex) {\n element.style.left = `${parseInt(getComputedStyle(element).left, 10) - delta}px`;\n }\n });\n }\n if (isPinnedRight) {\n const pinnedCells = ref.current?.querySelectorAll(`.${gridClasses['cell--pinnedRight']}`);\n pinnedCells?.forEach(element => {\n const colIndex = getColIndex(element);\n if (colIndex < resizedColIndex) {\n element.style.right = `${parseInt(getComputedStyle(element).right, 10) + delta}px`;\n }\n });\n }\n };\n useGridEvent(apiRef, 'columnResize', handleColumnResize);\n return /*#__PURE__*/_jsx(SkeletonOverlay, _extends({\n className: classes.root\n }, other, {\n ref: handleRef,\n children: children\n }));\n});\nif (process.env.NODE_ENV !== \"production\") GridSkeletonLoadingOverlayInner.displayName = \"GridSkeletonLoadingOverlayInner\";\nexport const GridSkeletonLoadingOverlay = forwardRef(function GridSkeletonLoadingOverlay(props, forwardedRef) {\n const apiRef = useGridApiContext();\n const dimensions = useGridSelector(apiRef, gridDimensionsSelector);\n const viewportHeight = dimensions?.viewportInnerSize.height ?? 0;\n const skeletonRowsCount = Math.ceil(viewportHeight / dimensions.rowHeight);\n return /*#__PURE__*/_jsx(GridSkeletonLoadingOverlayInner, _extends({}, props, {\n skeletonRowsCount: skeletonRowsCount,\n ref: forwardedRef\n }));\n});\nif (process.env.NODE_ENV !== \"production\") GridSkeletonLoadingOverlay.displayName = \"GridSkeletonLoadingOverlay\";","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"variant\", \"noRowsVariant\", \"style\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { forwardRef } from '@mui/x-internals/forwardRef';\nimport { useGridRootProps } from \"../hooks/utils/useGridRootProps.mjs\";\nimport { GridOverlay } from \"./containers/GridOverlay.mjs\";\nimport { GridSkeletonLoadingOverlay } from \"./GridSkeletonLoadingOverlay.mjs\";\nimport { useGridApiContext } from \"../hooks/utils/useGridApiContext.mjs\";\nimport { gridRowCountSelector, useGridSelector } from \"../hooks/index.mjs\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst LOADING_VARIANTS = {\n 'circular-progress': {\n component: rootProps => rootProps.slots.baseCircularProgress,\n style: {}\n },\n 'linear-progress': {\n component: rootProps => rootProps.slots.baseLinearProgress,\n style: {\n display: 'block'\n }\n },\n skeleton: {\n component: () => GridSkeletonLoadingOverlay,\n style: {\n display: 'block'\n }\n }\n};\nconst GridLoadingOverlay = forwardRef(function GridLoadingOverlay(props, ref) {\n const {\n variant = 'linear-progress',\n noRowsVariant = 'skeleton',\n style\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const apiRef = useGridApiContext();\n const rootProps = useGridRootProps();\n const rowsCount = useGridSelector(apiRef, gridRowCountSelector);\n const activeVariant = LOADING_VARIANTS[rowsCount === 0 ? noRowsVariant : variant];\n const Component = activeVariant.component(rootProps);\n return /*#__PURE__*/_jsx(GridOverlay, _extends({\n style: _extends({}, activeVariant.style, style)\n }, other, {\n ref: ref,\n children: /*#__PURE__*/_jsx(Component, {})\n }));\n});\nif (process.env.NODE_ENV !== \"production\") GridLoadingOverlay.displayName = \"GridLoadingOverlay\";\nprocess.env.NODE_ENV !== \"production\" ? GridLoadingOverlay.propTypes /* remove-proptypes */ = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the TypeScript types and run \"pnpm proptypes\" |\n // ----------------------------------------------------------------------\n /**\n * The variant of the overlay when no rows are displayed.\n * @default 'skeleton'\n */\n noRowsVariant: PropTypes.oneOf(['circular-progress', 'linear-progress', 'skeleton']),\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n /**\n * The variant of the overlay.\n * @default 'linear-progress'\n */\n variant: PropTypes.oneOf(['circular-progress', 'linear-progress', 'skeleton'])\n} : void 0;\nexport { GridLoadingOverlay };","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport PropTypes from 'prop-types';\nimport { forwardRef } from '@mui/x-internals/forwardRef';\nimport { useGridApiContext } from \"../hooks/utils/useGridApiContext.mjs\";\nimport { GridOverlay } from \"./containers/GridOverlay.mjs\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst GridNoRowsOverlay = forwardRef(function GridNoRowsOverlay(props, ref) {\n const apiRef = useGridApiContext();\n const noRowsLabel = apiRef.current.getLocaleText('noRowsLabel');\n return /*#__PURE__*/_jsx(GridOverlay, _extends({}, props, {\n ref: ref,\n children: noRowsLabel\n }));\n});\nif (process.env.NODE_ENV !== \"production\") GridNoRowsOverlay.displayName = \"GridNoRowsOverlay\";\nprocess.env.NODE_ENV !== \"production\" ? GridNoRowsOverlay.propTypes /* remove-proptypes */ = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the TypeScript types and run \"pnpm proptypes\" |\n // ----------------------------------------------------------------------\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])\n} : void 0;\nexport { GridNoRowsOverlay };","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport PropTypes from 'prop-types';\nimport { forwardRef } from '@mui/x-internals/forwardRef';\nimport { useGridRootProps } from \"../hooks/utils/useGridRootProps.mjs\";\nimport { useGridApiContext } from \"../hooks/utils/useGridApiContext.mjs\";\nimport { GridOverlay } from \"./containers/GridOverlay.mjs\";\nimport { GridPreferencePanelsValue } from \"../hooks/features/preferencesPanel/gridPreferencePanelsValue.mjs\";\nimport { gridColumnFieldsSelector, useGridSelector } from \"../hooks/index.mjs\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst GridNoColumnsOverlay = forwardRef(function GridNoColumnsOverlay(props, ref) {\n const rootProps = useGridRootProps();\n const apiRef = useGridApiContext();\n const columns = useGridSelector(apiRef, gridColumnFieldsSelector);\n const handleOpenManageColumns = () => {\n apiRef.current.showPreferences(GridPreferencePanelsValue.columns);\n };\n const showManageColumnsButton = !rootProps.disableColumnSelector && columns.length > 0;\n return /*#__PURE__*/_jsxs(GridOverlay, _extends({}, props, {\n ref: ref,\n children: [apiRef.current.getLocaleText('noColumnsOverlayLabel'), showManageColumnsButton && /*#__PURE__*/_jsx(rootProps.slots.baseButton, _extends({\n size: \"small\"\n }, rootProps.slotProps?.baseButton, {\n onClick: handleOpenManageColumns,\n children: apiRef.current.getLocaleText('noColumnsOverlayManageColumns')\n }))]\n }));\n});\nif (process.env.NODE_ENV !== \"production\") GridNoColumnsOverlay.displayName = \"GridNoColumnsOverlay\";\nprocess.env.NODE_ENV !== \"production\" ? GridNoColumnsOverlay.propTypes /* remove-proptypes */ = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the TypeScript types and run \"pnpm proptypes\" |\n // ----------------------------------------------------------------------\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])\n} : void 0;\nexport { GridNoColumnsOverlay };","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport { styled } from '@mui/material/styles';\nimport PropTypes from 'prop-types';\nimport { NotRendered } from \"../utils/assert.mjs\";\nimport { useGridSelector } from \"../hooks/utils/useGridSelector.mjs\";\nimport { useGridApiContext } from \"../hooks/utils/useGridApiContext.mjs\";\nimport { useGridRootProps } from \"../hooks/utils/useGridRootProps.mjs\";\nimport { gridPaginationModelSelector, gridPaginationRowCountSelector, gridPageCountSelector } from \"../hooks/features/pagination/gridPaginationSelector.mjs\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst GridPaginationRoot = styled(NotRendered, {\n slot: 'internal'\n})({\n maxHeight: 'calc(100% + 1px)',\n // border width\n flexGrow: 1\n});\nfunction GridPagination() {\n const apiRef = useGridApiContext();\n const rootProps = useGridRootProps();\n const paginationModel = useGridSelector(apiRef, gridPaginationModelSelector);\n const rowCount = useGridSelector(apiRef, gridPaginationRowCountSelector);\n const pageCount = useGridSelector(apiRef, gridPageCountSelector);\n const {\n paginationMode,\n loading\n } = rootProps;\n const unknownRowCount = rowCount == null || rowCount === -1;\n const disabled = unknownRowCount && paginationMode === 'server' && loading;\n const lastPage = React.useMemo(() => Math.max(0, pageCount - 1), [pageCount]);\n const computedPage = React.useMemo(() => {\n if (unknownRowCount) {\n return paginationModel.page;\n }\n return paginationModel.page <= lastPage ? paginationModel.page : lastPage;\n }, [lastPage, paginationModel.page, unknownRowCount]);\n const handlePageSizeChange = React.useCallback(pageSize => {\n apiRef.current.setPageSize(pageSize);\n }, [apiRef]);\n const handlePageChange = React.useCallback((_, page) => {\n apiRef.current.setPage(page);\n }, [apiRef]);\n const isPageSizeIncludedInPageSizeOptions = pageSize => {\n for (let i = 0; i < rootProps.pageSizeOptions.length; i += 1) {\n const option = rootProps.pageSizeOptions[i];\n if (typeof option === 'number') {\n if (option === pageSize) {\n return true;\n }\n } else if (option.value === pageSize) {\n return true;\n }\n }\n return false;\n };\n if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n const warnedOnceMissingInPageSizeOptions = React.useRef(false);\n const pageSize = rootProps.paginationModel?.pageSize ?? paginationModel.pageSize;\n if (!warnedOnceMissingInPageSizeOptions.current && !rootProps.autoPageSize && !isPageSizeIncludedInPageSizeOptions(pageSize)) {\n console.warn([`MUI X: The page size \\`${paginationModel.pageSize}\\` is not present in the \\`pageSizeOptions\\`.`, `Add it to show the pagination select.`].join('\\n'));\n warnedOnceMissingInPageSizeOptions.current = true;\n }\n }\n const pageSizeOptions = isPageSizeIncludedInPageSizeOptions(paginationModel.pageSize) ? rootProps.pageSizeOptions : [];\n return /*#__PURE__*/_jsx(GridPaginationRoot, _extends({\n as: rootProps.slots.basePagination,\n count: rowCount ?? -1,\n page: computedPage,\n rowsPerPageOptions: pageSizeOptions,\n rowsPerPage: paginationModel.pageSize,\n onPageChange: handlePageChange,\n onRowsPerPageChange: handlePageSizeChange,\n disabled: disabled\n }, rootProps.slotProps?.basePagination));\n}\nprocess.env.NODE_ENV !== \"production\" ? GridPagination.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the TypeScript types and run \"pnpm proptypes\" |\n // ----------------------------------------------------------------------\n component: PropTypes.elementType\n} : void 0;\nexport { GridPagination };","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"className\", \"rowCount\", \"visibleRowCount\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport composeClasses from '@mui/utils/composeClasses';\nimport { styled } from '@mui/system';\nimport { forwardRef } from '@mui/x-internals/forwardRef';\nimport { vars } from \"../constants/cssVariables.mjs\";\nimport { useGridApiContext } from \"../hooks/utils/useGridApiContext.mjs\";\nimport { getDataGridUtilityClass } from \"../constants/gridClasses.mjs\";\nimport { useGridRootProps } from \"../hooks/utils/useGridRootProps.mjs\";\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n classes\n } = ownerState;\n const slots = {\n root: ['rowCount']\n };\n return composeClasses(slots, getDataGridUtilityClass, classes);\n};\nconst GridRowCountRoot = styled('div', {\n name: 'MuiDataGrid',\n slot: 'RowCount'\n})({\n alignItems: 'center',\n display: 'flex',\n margin: vars.spacing(0, 2)\n});\nconst GridRowCount = forwardRef(function GridRowCount(props, ref) {\n const {\n className,\n rowCount,\n visibleRowCount\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const apiRef = useGridApiContext();\n const ownerState = useGridRootProps();\n const classes = useUtilityClasses(ownerState);\n if (rowCount === 0) {\n return null;\n }\n const text = visibleRowCount < rowCount ? apiRef.current.getLocaleText('footerTotalVisibleRows')(visibleRowCount, rowCount) : rowCount.toLocaleString();\n return /*#__PURE__*/_jsxs(GridRowCountRoot, _extends({\n className: clsx(classes.root, className),\n ownerState: ownerState\n }, other, {\n ref: ref,\n children: [apiRef.current.getLocaleText('footerTotalRows'), \" \", text]\n }));\n});\nif (process.env.NODE_ENV !== \"production\") GridRowCount.displayName = \"GridRowCount\";\nprocess.env.NODE_ENV !== \"production\" ? GridRowCount.propTypes /* remove-proptypes */ = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the TypeScript types and run \"pnpm proptypes\" |\n // ----------------------------------------------------------------------\n rowCount: PropTypes.number.isRequired,\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n visibleRowCount: PropTypes.number.isRequired\n} : void 0;\nexport { GridRowCount };","import composeClasses from '@mui/utils/composeClasses';\nimport { getDataGridUtilityClass } from \"../constants/gridClasses.mjs\";\nexport function composeGridClasses(classes, slots) {\n return composeClasses(slots, getDataGridUtilityClass, classes);\n}","import { createRootSelector, createSelector } from \"../../../utils/createSelector.mjs\";\nexport const gridRowReorderStateSelector = createRootSelector(state => state.rowReorder);\nexport const gridIsRowDragActiveSelector = createSelector(gridRowReorderStateSelector, rowReorder => rowReorder?.isActive ?? false);\n\n// Selector for the entire drop target state\nexport const gridRowDropTargetSelector = createSelector(gridRowReorderStateSelector, rowReorder => rowReorder?.dropTarget ?? {\n rowId: null,\n position: null\n});\nexport const gridRowDropTargetRowIdSelector = createSelector(gridRowDropTargetSelector, dropTarget => dropTarget.rowId ?? null);\n\n// Selector for a specific row's drop position\nexport const gridRowDropPositionSelector = createSelector(gridRowDropTargetSelector, (dropTarget, rowId) => {\n if (dropTarget.rowId === rowId) {\n return dropTarget.position;\n }\n return null;\n});\n\n// Selector for the dragged row ID\nexport const gridDraggedRowIdSelector = createSelector(gridRowReorderStateSelector, rowReorder => rowReorder?.draggedRowId ?? null);","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport { styled } from '@mui/material/styles';\nimport { shouldForwardProp } from '@mui/system/createStyled';\nimport { useGridPrivateApiContext } from \"../hooks/utils/useGridPrivateApiContext.mjs\";\nimport { useGridSelector } from \"../hooks/utils/useGridSelector.mjs\";\nimport { gridRowDropPositionSelector } from \"../hooks/features/rowReorder/gridRowReorderSelector.mjs\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst GridRowDragAndDropOverlayRoot = styled('div', {\n name: 'MuiDataGrid',\n slot: 'RowDragOverlay',\n shouldForwardProp: prop => shouldForwardProp(prop) && prop !== 'action'\n})(({\n theme,\n action\n}) => _extends({\n position: 'absolute',\n left: 0,\n right: 0,\n top: 0,\n bottom: 0,\n pointerEvents: 'none',\n zIndex: 1\n}, action === 'above' && {\n '&::before': {\n pointerEvents: 'none',\n content: '\"\"',\n position: 'absolute',\n top: 0,\n left: 0,\n right: 0,\n height: '2px',\n backgroundColor: (theme.vars || theme).palette.primary.main\n }\n}, action === 'below' && {\n '&::after': {\n pointerEvents: 'none',\n content: '\"\"',\n position: 'absolute',\n bottom: '-2px',\n left: 0,\n right: 0,\n height: '2px',\n backgroundColor: (theme.vars || theme).palette.primary.main\n }\n}, action === 'inside' && {\n backgroundColor: theme.alpha((theme.vars || theme).palette.primary.main, 0.1)\n}));\nexport const GridRowDragAndDropOverlay = /*#__PURE__*/React.memo(function GridRowDragAndDropOverlay(props) {\n const {\n rowId,\n className\n } = props;\n const apiRef = useGridPrivateApiContext();\n const dropPosition = useGridSelector(apiRef, gridRowDropPositionSelector, rowId);\n if (!dropPosition) {\n return null;\n }\n return /*#__PURE__*/_jsx(GridRowDragAndDropOverlayRoot, {\n action: dropPosition,\n className: className\n });\n});\nif (process.env.NODE_ENV !== \"production\") GridRowDragAndDropOverlay.displayName = \"GridRowDragAndDropOverlay\";","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"selected\", \"rowId\", \"row\", \"index\", \"style\", \"rowHeight\", \"className\", \"visibleColumns\", \"pinnedColumns\", \"offsetLeft\", \"columnsTotalWidth\", \"firstColumnIndex\", \"lastColumnIndex\", \"focusedColumnIndex\", \"isFirstVisible\", \"isLastVisible\", \"isNotVisible\", \"showBottomBorder\", \"scrollbarWidth\", \"gridHasFiller\", \"onClick\", \"onDoubleClick\", \"onMouseEnter\", \"onMouseLeave\", \"onMouseOut\", \"onMouseOver\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport useForkRef from '@mui/utils/useForkRef';\nimport { fastMemo } from '@mui/x-internals/fastMemo';\nimport { forwardRef } from '@mui/x-internals/forwardRef';\nimport { isObjectEmpty } from '@mui/x-internals/isObjectEmpty';\nimport { vars } from \"../constants/cssVariables.mjs\";\nimport { GridEditModes, GridCellModes } from \"../models/gridEditRowModel.mjs\";\nimport { gridClasses } from \"../constants/gridClasses.mjs\";\nimport { composeGridClasses } from \"../utils/composeGridClasses.mjs\";\nimport { useGridRootProps } from \"../hooks/utils/useGridRootProps.mjs\";\nimport { shouldCellShowLeftBorder, shouldCellShowRightBorder } from \"../utils/cellBorderUtils.mjs\";\nimport { gridColumnPositionsSelector } from \"../hooks/features/columns/gridColumnsSelector.mjs\";\nimport { useGridSelector, objectShallowCompare } from \"../hooks/utils/useGridSelector.mjs\";\nimport { useGridVisibleRows } from \"../hooks/utils/useGridVisibleRows.mjs\";\nimport { findParentElementFromClassName, isEventTargetInPortal } from \"../utils/domUtils.mjs\";\nimport { GRID_CHECKBOX_SELECTION_COL_DEF } from \"../colDef/gridCheckboxSelectionColDef.mjs\";\nimport { GRID_ACTIONS_COLUMN_TYPE } from \"../colDef/gridActionsColDef.mjs\";\nimport { GRID_DETAIL_PANEL_TOGGLE_FIELD, PinnedColumnPosition } from \"../internals/constants.mjs\";\nimport { gridSortModelSelector } from \"../hooks/features/sorting/gridSortingSelector.mjs\";\nimport { gridRowNodeSelector } from \"../hooks/features/rows/gridRowsSelector.mjs\";\nimport { gridEditRowsStateSelector, gridRowIsEditingSelector } from \"../hooks/features/editing/gridEditingSelectors.mjs\";\nimport { gridIsRowDragActiveSelector } from \"../hooks/features/rowReorder/gridRowReorderSelector.mjs\";\nimport { GridRowDragAndDropOverlay } from \"./GridRowDragAndDropOverlay.mjs\";\nimport { getPinnedCellOffset } from \"../internals/utils/getPinnedCellOffset.mjs\";\nimport { useGridConfiguration } from \"../hooks/utils/useGridConfiguration.mjs\";\nimport { useGridPrivateApiContext } from \"../hooks/utils/useGridPrivateApiContext.mjs\";\nimport { createSelector } from \"../utils/createSelector.mjs\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst isRowReorderingEnabledSelector = createSelector(gridEditRowsStateSelector, (editRows, {\n rowReordering,\n treeData\n}) => {\n if (!rowReordering || treeData) {\n return false;\n }\n const isEditingRows = !isObjectEmpty(editRows);\n return !isEditingRows;\n});\nconst GridRow = forwardRef(function GridRow(props, refProp) {\n const {\n selected,\n rowId,\n row,\n index,\n style: styleProp,\n rowHeight,\n className,\n visibleColumns,\n pinnedColumns,\n offsetLeft,\n columnsTotalWidth,\n firstColumnIndex,\n lastColumnIndex,\n focusedColumnIndex,\n isFirstVisible,\n isLastVisible,\n isNotVisible,\n showBottomBorder,\n scrollbarWidth,\n gridHasFiller,\n onClick,\n onDoubleClick,\n onMouseEnter,\n onMouseLeave,\n onMouseOut,\n onMouseOver\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const apiRef = useGridPrivateApiContext();\n const configuration = useGridConfiguration();\n const ref = React.useRef(null);\n const rootProps = useGridRootProps();\n const currentPage = useGridVisibleRows(apiRef, rootProps);\n const sortModel = useGridSelector(apiRef, gridSortModelSelector);\n const columnPositions = useGridSelector(apiRef, gridColumnPositionsSelector);\n const rowReordering = rootProps.rowReordering;\n const treeData = rootProps.treeData;\n const isRowReorderingEnabled = useGridSelector(apiRef, isRowReorderingEnabledSelector, {\n rowReordering,\n treeData\n });\n const isRowDragActive = useGridSelector(apiRef, gridIsRowDragActiveSelector);\n const handleRef = useForkRef(ref, refProp);\n const rowNode = gridRowNodeSelector(apiRef, rowId);\n const editing = useGridSelector(apiRef, gridRowIsEditingSelector, {\n rowId,\n editMode: rootProps.editMode\n });\n const editable = rootProps.editMode === GridEditModes.Row;\n const hasFocusCell = focusedColumnIndex !== undefined;\n const hasVirtualFocusCellLeft = hasFocusCell && focusedColumnIndex >= pinnedColumns.left.length && focusedColumnIndex < firstColumnIndex;\n const hasVirtualFocusCellRight = hasFocusCell && focusedColumnIndex < visibleColumns.length - pinnedColumns.right.length && focusedColumnIndex >= lastColumnIndex;\n const classes = composeGridClasses(rootProps.classes, {\n root: ['row', selected && 'selected', editable && 'row--editable', editing && 'row--editing', isFirstVisible && 'row--firstVisible', isLastVisible && 'row--lastVisible', showBottomBorder && 'row--borderBottom', rowHeight === 'auto' && 'row--dynamicHeight']\n });\n const getRowAriaAttributes = configuration.hooks.useGridRowAriaAttributes();\n React.useLayoutEffect(() => {\n if (currentPage.range) {\n const rowIndex = apiRef.current.getRowIndexRelativeToVisibleRows(rowId);\n // Pinned rows are not part of the visible rows\n if (rowIndex !== undefined) {\n apiRef.current.unstable_setLastMeasuredRowIndex(rowIndex);\n }\n }\n if (ref.current && rowHeight === 'auto') {\n return apiRef.current.observeRowHeight(ref.current, rowId);\n }\n return undefined;\n }, [apiRef, currentPage.range, rowHeight, rowId]);\n const publish = React.useCallback((eventName, propHandler) => event => {\n // Ignore portal\n if (isEventTargetInPortal(event)) {\n return;\n }\n\n // The row might have been deleted\n if (!apiRef.current.getRow(rowId)) {\n return;\n }\n apiRef.current.publishEvent(eventName, apiRef.current.getRowParams(rowId), event);\n if (propHandler) {\n propHandler(event);\n }\n }, [apiRef, rowId]);\n const publishClick = React.useCallback(event => {\n const cell = findParentElementFromClassName(event.target, gridClasses.cell);\n const field = cell?.getAttribute('data-field');\n\n // Check if the field is available because the cell that fills the empty\n // space of the row has no field.\n if (field) {\n // User clicked in the checkbox added by checkboxSelection\n if (field === GRID_CHECKBOX_SELECTION_COL_DEF.field) {\n return;\n }\n\n // User opened a detail panel\n if (field === GRID_DETAIL_PANEL_TOGGLE_FIELD) {\n return;\n }\n\n // User reorders a row\n if (field === '__reorder__') {\n return;\n }\n\n // User is editing a cell\n if (apiRef.current.getCellMode(rowId, field) === GridCellModes.Edit) {\n return;\n }\n\n // User clicked a button from the \"actions\" column type\n const column = apiRef.current.getColumn(field);\n if (column?.type === GRID_ACTIONS_COLUMN_TYPE) {\n return;\n }\n }\n publish('rowClick', onClick)(event);\n }, [apiRef, onClick, publish, rowId]);\n const {\n slots,\n slotProps,\n disableColumnReorder\n } = rootProps;\n const heightEntry = useGridSelector(apiRef, () => _extends({}, apiRef.current.getRowHeightEntry(rowId)), undefined, objectShallowCompare);\n const style = React.useMemo(() => {\n if (isNotVisible) {\n return {\n opacity: 0,\n width: 0,\n height: 0\n };\n }\n const rowStyle = _extends({}, styleProp, {\n maxHeight: rowHeight === 'auto' ? 'none' : rowHeight,\n // max-height doesn't support \"auto\"\n minHeight: rowHeight,\n '--height': typeof rowHeight === 'number' ? `${rowHeight}px` : rowHeight\n });\n if (heightEntry.spacingTop) {\n const property = rootProps.rowSpacingType === 'border' ? 'borderTopWidth' : 'marginTop';\n rowStyle[property] = heightEntry.spacingTop;\n }\n if (heightEntry.spacingBottom) {\n const property = rootProps.rowSpacingType === 'border' ? 'borderBottomWidth' : 'marginBottom';\n let propertyValue = rowStyle[property];\n // avoid overriding existing value\n if (typeof propertyValue !== 'number') {\n propertyValue = parseInt(propertyValue || '0', 10);\n }\n propertyValue += heightEntry.spacingBottom;\n rowStyle[property] = propertyValue;\n }\n return rowStyle;\n }, [isNotVisible, rowHeight, styleProp, heightEntry.spacingTop, heightEntry.spacingBottom, rootProps.rowSpacingType]);\n\n // HACK: Sometimes, the rowNode has already been removed from the state but the row is still rendered.\n if (!rowNode) {\n return null;\n }\n const rowClassNames = apiRef.current.unstable_applyPipeProcessors('rowClassName', [], rowId);\n const ariaAttributes = getRowAriaAttributes(rowNode, index);\n if (typeof rootProps.getRowClassName === 'function') {\n const indexRelativeToCurrentPage = index - (currentPage.range?.firstRowIndex || 0);\n const rowParams = _extends({}, apiRef.current.getRowParams(rowId), {\n isFirstVisible: indexRelativeToCurrentPage === 0,\n isLastVisible: indexRelativeToCurrentPage === currentPage.rows.length - 1,\n indexRelativeToCurrentPage\n });\n rowClassNames.push(rootProps.getRowClassName(rowParams));\n }\n const getCell = (column, indexInSection, indexRelativeToAllColumns, sectionLength, pinnedPosition = PinnedColumnPosition.NONE) => {\n const cellColSpanInfo = apiRef.current.unstable_getCellColSpanInfo(rowId, indexRelativeToAllColumns);\n if (cellColSpanInfo?.spannedByColSpan) {\n return null;\n }\n const width = cellColSpanInfo?.cellProps.width ?? column.computedWidth;\n const colSpan = cellColSpanInfo?.cellProps.colSpan ?? 1;\n const pinnedOffset = getPinnedCellOffset(pinnedPosition, column.computedWidth, indexRelativeToAllColumns, columnPositions, columnsTotalWidth, scrollbarWidth);\n if (rowNode.type === 'skeletonRow') {\n return /*#__PURE__*/_jsx(slots.skeletonCell, {\n type: column.type,\n width: width,\n height: rowHeight,\n field: column.field,\n align: column.align,\n skeletonProps: {\n style: {\n marginLeft: indexRelativeToAllColumns === 0 && rowNode.depth > 0 ?\n // TODO: Make the factor configurable\n vars.spacing(rowNode.depth * 2) : '0px'\n }\n }\n }, column.field);\n }\n\n // when the cell is a reorder cell we are not allowing to reorder the col\n // fixes https://github.com/mui/mui-x/issues/11126\n const isReorderCell = column.field === '__reorder__';\n const canReorderColumn = !(disableColumnReorder || column.disableReorder);\n const canReorderRow = isRowReorderingEnabled && !sortModel.length;\n const disableDragEvents = !(canReorderColumn || isReorderCell && canReorderRow || isRowDragActive);\n const cellIsNotVisible = pinnedPosition === PinnedColumnPosition.VIRTUAL;\n const showLeftBorder = shouldCellShowLeftBorder(pinnedPosition, indexInSection, rootProps.showCellVerticalBorder, rootProps.pinnedColumnsSectionSeparator);\n const showRightBorder = shouldCellShowRightBorder(pinnedPosition, indexInSection, sectionLength, rootProps.showCellVerticalBorder, gridHasFiller, rootProps.pinnedColumnsSectionSeparator);\n return /*#__PURE__*/_jsx(slots.cell, _extends({\n column: column,\n width: width,\n rowId: rowId,\n align: column.align || 'left',\n colIndex: indexRelativeToAllColumns,\n colSpan: colSpan,\n disableDragEvents: disableDragEvents,\n isNotVisible: cellIsNotVisible,\n pinnedOffset: pinnedOffset,\n pinnedPosition: pinnedPosition,\n showLeftBorder: showLeftBorder,\n showRightBorder: showRightBorder,\n row: row,\n rowNode: rowNode\n }, slotProps?.cell), column.field);\n };\n if (process.env.NODE_ENV !== \"production\") getCell.displayName = \"getCell\";\n const leftCells = pinnedColumns.left.map((column, i) => {\n const indexRelativeToAllColumns = i;\n return getCell(column, i, indexRelativeToAllColumns, pinnedColumns.left.length, PinnedColumnPosition.LEFT);\n });\n const rightCells = pinnedColumns.right.map((column, i) => {\n const indexRelativeToAllColumns = visibleColumns.length - pinnedColumns.right.length + i;\n return getCell(column, i, indexRelativeToAllColumns, pinnedColumns.right.length, PinnedColumnPosition.RIGHT);\n });\n const middleColumnsLength = visibleColumns.length - pinnedColumns.left.length - pinnedColumns.right.length;\n const cells = [];\n if (hasVirtualFocusCellLeft) {\n cells.push(getCell(visibleColumns[focusedColumnIndex], focusedColumnIndex - pinnedColumns.left.length, focusedColumnIndex, middleColumnsLength, PinnedColumnPosition.VIRTUAL));\n }\n for (let i = firstColumnIndex; i < lastColumnIndex; i += 1) {\n const column = visibleColumns[i];\n const indexInSection = i - pinnedColumns.left.length;\n if (!column) {\n continue;\n }\n cells.push(getCell(column, indexInSection, i, middleColumnsLength));\n }\n if (hasVirtualFocusCellRight) {\n cells.push(getCell(visibleColumns[focusedColumnIndex], focusedColumnIndex - pinnedColumns.left.length, focusedColumnIndex, middleColumnsLength, PinnedColumnPosition.VIRTUAL));\n }\n const eventHandlers = row ? {\n onClick: publishClick,\n onDoubleClick: publish('rowDoubleClick', onDoubleClick),\n onMouseEnter: publish('rowMouseEnter', onMouseEnter),\n onMouseLeave: publish('rowMouseLeave', onMouseLeave),\n onMouseOut: publish('rowMouseOut', onMouseOut),\n onMouseOver: publish('rowMouseOver', onMouseOver)\n } : null;\n return /*#__PURE__*/_jsxs(\"div\", _extends({\n \"data-id\": rowId,\n \"data-rowindex\": index,\n role: \"row\",\n className: clsx(...rowClassNames, classes.root, className),\n style: style\n }, ariaAttributes, eventHandlers, other, {\n ref: handleRef,\n children: [leftCells, /*#__PURE__*/_jsx(\"div\", {\n role: \"none\",\n className: gridClasses.cellOffsetLeft,\n style: {\n width: offsetLeft\n }\n }), cells, /*#__PURE__*/_jsx(\"div\", {\n role: \"none\",\n className: clsx(gridClasses.cell, gridClasses.cellEmpty)\n }), rightCells, /*#__PURE__*/_jsx(GridRowDragAndDropOverlay, {\n rowId: rowId\n })]\n }));\n});\nif (process.env.NODE_ENV !== \"production\") GridRow.displayName = \"GridRow\";\nprocess.env.NODE_ENV !== \"production\" ? GridRow.propTypes /* remove-proptypes */ = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the TypeScript types and run \"pnpm proptypes\" |\n // ----------------------------------------------------------------------\n columnsTotalWidth: PropTypes.number.isRequired,\n firstColumnIndex: PropTypes.number.isRequired,\n /**\n * Determines which cell has focus.\n * If `null`, no cell in this row has focus.\n */\n focusedColumnIndex: PropTypes.number,\n gridHasFiller: PropTypes.bool.isRequired,\n /**\n * Index of the row in the whole sorted and filtered dataset.\n * If some rows above have expanded children, this index also take those children into account.\n */\n index: PropTypes.number.isRequired,\n isFirstVisible: PropTypes.bool.isRequired,\n isLastVisible: PropTypes.bool.isRequired,\n isNotVisible: PropTypes.bool.isRequired,\n lastColumnIndex: PropTypes.number.isRequired,\n offsetLeft: PropTypes.number.isRequired,\n onClick: PropTypes.func,\n onDoubleClick: PropTypes.func,\n onMouseEnter: PropTypes.func,\n onMouseLeave: PropTypes.func,\n pinnedColumns: PropTypes.object.isRequired,\n row: PropTypes.object.isRequired,\n rowHeight: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number]).isRequired,\n rowId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,\n scrollbarWidth: PropTypes.number.isRequired,\n selected: PropTypes.bool.isRequired,\n showBottomBorder: PropTypes.bool.isRequired,\n visibleColumns: PropTypes.arrayOf(PropTypes.object).isRequired\n} : void 0;\nconst MemoizedGridRow = fastMemo(GridRow);\nexport { MemoizedGridRow as GridRow };","import { gridVisibleColumnDefinitionsSelector } from \"../features/columns/gridColumnsSelector.mjs\";\nimport { useGridSelector } from \"./useGridSelector.mjs\";\nimport { useGridRootProps } from \"./useGridRootProps.mjs\";\nimport { gridColumnGroupsHeaderMaxDepthSelector } from \"../features/columnGrouping/gridColumnGroupsSelector.mjs\";\nimport { gridPinnedRowsCountSelector } from \"../features/rows/gridRowsSelector.mjs\";\nimport { useGridPrivateApiContext } from \"./useGridPrivateApiContext.mjs\";\nimport { isMultipleRowSelectionEnabled } from \"../features/rowSelection/utils.mjs\";\nimport { gridExpandedRowCountSelector } from \"../features/filter/gridFilterSelector.mjs\";\nexport const useGridAriaAttributes = () => {\n const apiRef = useGridPrivateApiContext();\n const rootProps = useGridRootProps();\n const visibleColumns = useGridSelector(apiRef, gridVisibleColumnDefinitionsSelector);\n const accessibleRowCount = useGridSelector(apiRef, gridExpandedRowCountSelector);\n const headerGroupingMaxDepth = useGridSelector(apiRef, gridColumnGroupsHeaderMaxDepthSelector);\n const pinnedRowsCount = useGridSelector(apiRef, gridPinnedRowsCountSelector);\n const ariaLabel = rootProps['aria-label'];\n const ariaLabelledby = rootProps['aria-labelledby'];\n // `aria-label` and `aria-labelledby` should take precedence over `label`\n const shouldUseLabelAsAriaLabel = !ariaLabel && !ariaLabelledby && rootProps.label;\n return {\n role: 'grid',\n 'aria-label': shouldUseLabelAsAriaLabel ? rootProps.label : ariaLabel,\n 'aria-labelledby': ariaLabelledby,\n 'aria-colcount': visibleColumns.length,\n 'aria-rowcount': headerGroupingMaxDepth + 1 + pinnedRowsCount + accessibleRowCount,\n 'aria-multiselectable': isMultipleRowSelectionEnabled(rootProps)\n };\n};","import * as React from 'react';\nimport { useGridSelector } from \"../../utils/useGridSelector.mjs\";\nimport { gridColumnGroupsHeaderMaxDepthSelector } from \"../columnGrouping/gridColumnGroupsSelector.mjs\";\nimport { useGridPrivateApiContext } from \"../../utils/useGridPrivateApiContext.mjs\";\nexport const useGridRowAriaAttributes = () => {\n const apiRef = useGridPrivateApiContext();\n const headerGroupingMaxDepth = useGridSelector(apiRef, gridColumnGroupsHeaderMaxDepthSelector);\n return React.useCallback((rowNode, index) => {\n const ariaAttributes = {};\n const ariaRowIndex = index + headerGroupingMaxDepth + 2; // 1 for the header row and 1 as it's 1-based\n ariaAttributes['aria-rowindex'] = ariaRowIndex;\n\n // XXX: fix this properly\n if (rowNode && apiRef.current.isRowSelectable(rowNode.id)) {\n ariaAttributes['aria-selected'] = apiRef.current.isRowSelected(rowNode.id);\n }\n return ariaAttributes;\n }, [apiRef, headerGroupingMaxDepth]);\n};","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _formatErrorMessage from \"@mui/x-internals/formatErrorMessage\";\nimport * as React from 'react';\nimport { gridRowTreeSelector, gridRowNodeSelector } from \"./gridRowsSelector.mjs\";\nimport { gridExpandedSortedRowIndexLookupSelector } from \"../filter/gridFilterSelector.mjs\";\nimport { GRID_ROOT_GROUP_ID } from \"./gridRowsUtils.mjs\";\nexport const useGridRowsOverridableMethods = apiRef => {\n const setRowPosition = React.useCallback((sourceRowId, targetRowId, position) => {\n const sourceNode = gridRowNodeSelector(apiRef, sourceRowId);\n const targetNode = gridRowNodeSelector(apiRef, targetRowId);\n if (!sourceNode) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? `MUI X: No row with id #${sourceRowId} found.` : _formatErrorMessage(89, sourceRowId));\n }\n if (!targetNode) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? `MUI X: No row with id #${targetRowId} found.` : _formatErrorMessage(89, targetRowId));\n }\n if (sourceNode.type !== 'leaf') {\n throw new Error(process.env.NODE_ENV !== \"production\" ? `MUI X: The row reordering does not support reordering of footer or grouping rows.` : _formatErrorMessage(93));\n }\n if (position === 'inside') {\n throw new Error(process.env.NODE_ENV !== \"production\" ? `MUI X: The 'inside' position is only supported for tree data. Use 'above' or 'below' for flat data.` : _formatErrorMessage(94));\n }\n\n // Resolve positions in the filtered view to detect visible-order no-ops.\n const sortedFilteredRowIndexLookup = gridExpandedSortedRowIndexLookupSelector(apiRef);\n const targetFilteredIndex = sortedFilteredRowIndexLookup[targetRowId];\n const sourceFilteredIndex = sortedFilteredRowIndexLookup[sourceRowId];\n if (targetFilteredIndex === undefined) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? `MUI X: Target row with id #${targetRowId} not found in current view.` : _formatErrorMessage(95, targetRowId));\n }\n if (sourceFilteredIndex === undefined) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? `MUI X: Source row with id #${sourceRowId} not found in current view.` : _formatErrorMessage(96, sourceRowId));\n }\n\n // No-op when the requested drop would not change the visible order.\n // Mutating the backing tree here would silently reshuffle filtered-out\n // rows around the source without any visible feedback.\n if (sourceFilteredIndex === targetFilteredIndex || position === 'above' && sourceFilteredIndex === targetFilteredIndex - 1 || position === 'below' && sourceFilteredIndex === targetFilteredIndex + 1) {\n return;\n }\n apiRef.current.setState(state => {\n const group = gridRowTreeSelector(apiRef)[GRID_ROOT_GROUP_ID];\n const allRows = group.children;\n\n // Single pass: skip source and inline-insert it adjacent to the target\n // anchor id so filtered-out rows between source and target keep their\n // position next to the anchor.\n const updatedRows = [];\n let sourceFound = false;\n let targetFound = false;\n for (let i = 0; i < allRows.length; i += 1) {\n const id = allRows[i];\n if (id === sourceRowId) {\n sourceFound = true;\n continue;\n }\n if (id === targetRowId) {\n targetFound = true;\n if (position === 'above') {\n updatedRows.push(sourceRowId, id);\n } else {\n updatedRows.push(id, sourceRowId);\n }\n continue;\n }\n updatedRows.push(id);\n }\n if (!sourceFound || !targetFound) {\n return state;\n }\n return _extends({}, state, {\n rows: _extends({}, state.rows, {\n tree: _extends({}, state.rows.tree, {\n [GRID_ROOT_GROUP_ID]: _extends({}, group, {\n children: updatedRows\n })\n })\n })\n });\n });\n apiRef.current.publishEvent('rowsSet');\n }, [apiRef]);\n const setRowIndex = React.useCallback((rowId, targetIndex) => {\n const node = gridRowNodeSelector(apiRef, rowId);\n if (!node) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? `MUI X Data Grid: No row with id \"${rowId}\" found. ` + 'The row to reorder does not exist in the grid. ' + 'Verify the row id is correct and the row exists.' : _formatErrorMessage(97, rowId));\n }\n if (node.type !== 'leaf') {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'MUI X Data Grid: Row reordering does not support reordering of footer or grouping rows. ' + 'Only leaf (data) rows can be reordered. ' + 'Ensure you are only reordering data rows.' : _formatErrorMessage(98));\n }\n apiRef.current.setState(state => {\n const group = gridRowTreeSelector(apiRef)[GRID_ROOT_GROUP_ID];\n const allRows = group.children;\n const oldIndex = allRows.findIndex(row => row === rowId);\n if (oldIndex === -1 || oldIndex === targetIndex) {\n return state;\n }\n const updatedRows = [...allRows];\n updatedRows.splice(targetIndex, 0, updatedRows.splice(oldIndex, 1)[0]);\n return _extends({}, state, {\n rows: _extends({}, state.rows, {\n tree: _extends({}, state.rows.tree, {\n [GRID_ROOT_GROUP_ID]: _extends({}, group, {\n children: updatedRows\n })\n })\n })\n });\n });\n apiRef.current.publishEvent('rowsSet');\n }, [apiRef]);\n return {\n setRowIndex,\n setRowPosition\n };\n};","import _formatErrorMessage from \"@mui/x-internals/formatErrorMessage\";\nimport * as React from 'react';\nimport { getRowValue as getRowValueFn } from \"./gridRowsUtils.mjs\";\nexport const useGridParamsOverridableMethods = apiRef => {\n const getCellValue = React.useCallback((id, field) => {\n const colDef = apiRef.current.getColumn(field);\n const row = apiRef.current.getRow(id);\n if (!row) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? `MUI X: No row with id #${id} found` : _formatErrorMessage(87, id));\n }\n if (!colDef || !colDef.valueGetter) {\n return row[field];\n }\n return colDef.valueGetter(row[colDef.field], row, colDef, apiRef);\n }, [apiRef]);\n const getRowValue = React.useCallback((row, colDef) => getRowValueFn(row, colDef, apiRef), [apiRef]);\n const getRowFormattedValue = React.useCallback((row, colDef) => {\n const value = getRowValue(row, colDef);\n if (!colDef || !colDef.valueFormatter) {\n return value;\n }\n return colDef.valueFormatter(value, row, colDef, apiRef);\n }, [apiRef, getRowValue]);\n return {\n getCellValue,\n getRowValue,\n getRowFormattedValue\n };\n};","'use client';\n\nimport * as React from 'react';\nimport { isAutogeneratedRowNode } from \"../rows/gridRowsUtils.mjs\";\n\n/**\n * Default implementation of the cell editable condition hook\n */\nexport const useIsCellEditable = () => React.useCallback(params => !isAutogeneratedRowNode(params.rowNode), []);","'use client';\n\nimport * as React from 'react';\nimport { GridApiContext } from \"../components/GridApiContext.mjs\";\nimport { GridPrivateApiContext } from \"../hooks/utils/useGridPrivateApiContext.mjs\";\nimport { GridRootPropsContext } from \"./GridRootPropsContext.mjs\";\nimport { GridConfigurationContext } from \"../components/GridConfigurationContext.mjs\";\nimport { GridPanelContextProvider } from \"../components/panel/GridPanelContext.mjs\";\nimport { GridCSSVariablesContext } from \"../utils/css/context.mjs\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport function GridContextProvider({\n privateApiRef,\n configuration,\n props,\n children\n}) {\n const apiRef = React.useRef(privateApiRef.current.getPublicApi());\n return /*#__PURE__*/_jsx(GridConfigurationContext.Provider, {\n value: configuration,\n children: /*#__PURE__*/_jsx(GridRootPropsContext.Provider, {\n value: props,\n children: /*#__PURE__*/_jsx(GridPrivateApiContext.Provider, {\n value: privateApiRef,\n children: /*#__PURE__*/_jsx(GridApiContext.Provider, {\n value: apiRef,\n children: /*#__PURE__*/_jsx(GridPanelContextProvider, {\n children: /*#__PURE__*/_jsx(GridCSSVariablesContext, {\n children: children\n })\n })\n })\n })\n })\n });\n}","'use client';\n\nimport * as React from 'react';\nexport const useGridRefs = apiRef => {\n const rootElementRef = React.useRef(null);\n const mainElementRef = React.useRef(null);\n const virtualScrollerRef = React.useRef(null);\n const virtualScrollbarVerticalRef = React.useRef(null);\n const virtualScrollbarHorizontalRef = React.useRef(null);\n const columnHeadersContainerRef = React.useRef(null);\n apiRef.current.register('public', {\n rootElementRef\n });\n apiRef.current.register('private', {\n mainElementRef,\n virtualScrollerRef,\n virtualScrollbarVerticalRef,\n virtualScrollbarHorizontalRef,\n columnHeadersContainerRef\n });\n};","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport { useRtl } from '@mui/system/RtlProvider';\nexport const useGridIsRtl = apiRef => {\n const isRtl = useRtl();\n if (apiRef.current.state.isRtl === undefined) {\n apiRef.current.state.isRtl = isRtl;\n }\n const isFirstEffect = React.useRef(true);\n React.useEffect(() => {\n if (isFirstEffect.current) {\n isFirstEffect.current = false;\n } else {\n apiRef.current.setState(state => _extends({}, state, {\n isRtl\n }));\n }\n }, [apiRef, isRtl]);\n};","import _formatErrorMessage from \"@mui/x-internals/formatErrorMessage\";\nimport * as React from 'react';\nimport { localStorageAvailable } from \"../../utils/utils.mjs\";\nimport { useGridApiMethod } from \"../utils/index.mjs\";\nconst forceDebug = localStorageAvailable() && window.localStorage.getItem('DEBUG') != null;\nconst noop = () => {};\nconst noopLogger = {\n debug: noop,\n info: noop,\n warn: noop,\n error: noop\n};\nconst LOG_LEVELS = ['debug', 'info', 'warn', 'error'];\nfunction getAppender(name, logLevel, appender = console) {\n const minLogLevelIdx = LOG_LEVELS.indexOf(logLevel);\n if (minLogLevelIdx === -1) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? `MUI X: Log level ${logLevel} not recognized.` : _formatErrorMessage(65, logLevel));\n }\n const logger = LOG_LEVELS.reduce((loggerObj, method, idx) => {\n if (idx >= minLogLevelIdx) {\n loggerObj[method] = (...args) => {\n const [message, ...other] = args;\n appender[method](`MUI X: ${name} - ${message}`, ...other);\n };\n } else {\n loggerObj[method] = noop;\n }\n return loggerObj;\n }, {});\n return logger;\n}\nexport const useGridLoggerFactory = (apiRef, props) => {\n const getLogger = React.useCallback(name => {\n if (forceDebug) {\n return getAppender(name, 'debug', props.logger);\n }\n if (!props.logLevel) {\n return noopLogger;\n }\n return getAppender(name, props.logLevel.toString(), props.logger);\n }, [props.logLevel, props.logger]);\n useGridApiMethod(apiRef, {\n getLogger\n }, 'private');\n};","import _formatErrorMessage from \"@mui/x-internals/formatErrorMessage\";\nimport * as React from 'react';\nexport const useGridLocaleText = (apiRef, props) => {\n const getLocaleText = React.useCallback(key => {\n if (props.localeText[key] == null) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? `MUI X: Missing translation for key ${key}.` : _formatErrorMessage(64, key));\n }\n return props.localeText[key];\n }, [props.localeText]);\n apiRef.current.register('public', {\n getLocaleText\n });\n};","export let GridStrategyGroup = /*#__PURE__*/function (GridStrategyGroup) {\n GridStrategyGroup[\"DataSource\"] = \"dataSource\";\n GridStrategyGroup[\"RowTree\"] = \"rowTree\";\n return GridStrategyGroup;\n}({});","'use client';\n\nimport * as React from 'react';\nimport { useFirstRender } from \"../../utils/useFirstRender.mjs\";\nexport const useGridRegisterStrategyProcessor = (apiRef, strategyName, group, processor) => {\n const registerPreProcessor = React.useCallback(() => {\n // NOTE: the unregister fn is intentionally discarded. Unlike pipe processors\n // (which are additive), a strategy processor is required for as long as its\n // strategy is active — `applyStrategyProcessor` throws if the active strategy's\n // processor is missing — so it must outlive the registering component. The cache\n // keeps a single entry per (processor, strategy) and is reclaimed with the grid\n // api, so nothing leaks; `void` documents the deliberate discard.\n void apiRef.current.registerStrategyProcessor(strategyName, group, processor);\n }, [apiRef, processor, group, strategyName]);\n useFirstRender(() => {\n registerPreProcessor();\n });\n const isFirstRender = React.useRef(true);\n React.useEffect(() => {\n if (isFirstRender.current) {\n isFirstRender.current = false;\n } else {\n registerPreProcessor();\n }\n }, [registerPreProcessor]);\n};","'use client';\n\nimport _formatErrorMessage from \"@mui/x-internals/formatErrorMessage\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _toPropertyKey from \"@babel/runtime/helpers/esm/toPropertyKey\";\nimport * as React from 'react';\nimport { GridStrategyGroup } from \"./gridStrategyProcessingApi.mjs\";\nimport { useGridApiMethod } from \"../../utils/useGridApiMethod.mjs\";\nexport const GRID_DEFAULT_STRATEGY = 'none';\nconst GRID_STRATEGIES_PROCESSORS = {\n dataSourceRootRowsUpdate: GridStrategyGroup.DataSource,\n dataSourceNestedRowsUpdate: GridStrategyGroup.DataSource,\n rowTreeCreation: GridStrategyGroup.RowTree,\n filtering: GridStrategyGroup.RowTree,\n sorting: GridStrategyGroup.RowTree,\n visibleRowsLookupCreation: GridStrategyGroup.RowTree\n};\n/**\n * Implements a variant of the Strategy Pattern (see https://en.wikipedia.org/wiki/Strategy_pattern)\n *\n * More information and detailed example in (TODO add link to technical doc when ready)\n *\n * Some plugins contains custom logic that must only be applied if the right strategy is active.\n * For instance, the row grouping plugin has a custom filtering algorithm.\n * This algorithm must be applied by the filtering plugin if the row grouping is the current way of grouping rows,\n * but not if the tree data is the current way of grouping rows.\n *\n * =====================================================================================================================\n *\n * The plugin containing the custom logic must use:\n *\n * - `useGridRegisterStrategyProcessor` to register their processor.\n * When the processor of the active strategy changes, it will fire `\"activeStrategyProcessorChange\"` to re-apply the processor.\n *\n * - `apiRef.current.setStrategyAvailability` to tell if their strategy can be used.\n *\n * =====================================================================================================================\n *\n * The plugin or component that needs to apply the custom logic of the current strategy must use:\n *\n * - `apiRef.current.applyStrategyProcessor` to run the processor of the active strategy for a given processor name.\n *\n * - the \"strategyAvailabilityChange\" event to update something when the active strategy changes.\n * Warning: Be careful not to apply the processor several times.\n * For instance \"rowsSet\" is fired by `useGridRows` whenever the active strategy changes.\n * So listening to both would most likely run your logic twice.\n *\n * - The \"activeStrategyProcessorChange\" event to update something when the processor of the active strategy changes.\n *\n * =====================================================================================================================\n *\n * Each processor name is part of a strategy group which can only have one active strategy at the time.\n * There are two active groups named `rowTree` and `dataSource`.\n */\nexport const useGridStrategyProcessing = apiRef => {\n const availableStrategies = React.useRef(new Map());\n const strategiesCache = React.useRef({});\n const registerStrategyProcessor = React.useCallback((strategyName, processorName, processor) => {\n const cleanup = () => {\n const _ref = strategiesCache.current[processorName],\n otherProcessors = _objectWithoutPropertiesLoose(_ref, [strategyName].map(_toPropertyKey));\n strategiesCache.current[processorName] = otherProcessors;\n };\n if (!strategiesCache.current[processorName]) {\n strategiesCache.current[processorName] = {};\n }\n const groupPreProcessors = strategiesCache.current[processorName];\n const previousProcessor = groupPreProcessors[strategyName];\n groupPreProcessors[strategyName] = processor;\n if (!previousProcessor || previousProcessor === processor) {\n return cleanup;\n }\n if (strategyName === apiRef.current.getActiveStrategy(GRID_STRATEGIES_PROCESSORS[processorName])) {\n apiRef.current.publishEvent('activeStrategyProcessorChange', processorName);\n }\n return cleanup;\n }, [apiRef]);\n const applyStrategyProcessor = React.useCallback((processorName, params) => {\n const activeStrategy = apiRef.current.getActiveStrategy(GRID_STRATEGIES_PROCESSORS[processorName]);\n if (activeStrategy == null) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? \"MUI X: Can't apply a strategy processor before defining an active strategy\" : _formatErrorMessage(72));\n }\n const groupCache = strategiesCache.current[processorName];\n if (!groupCache || !groupCache[activeStrategy]) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? `MUI X: No processor found for processor \"${processorName}\" on strategy \"${activeStrategy}\"` : _formatErrorMessage(73, processorName, activeStrategy));\n }\n const processor = groupCache[activeStrategy];\n return processor(params);\n }, [apiRef]);\n const getActiveStrategy = React.useCallback(strategyGroup => {\n const strategyEntries = Array.from(availableStrategies.current.entries());\n const availableStrategyEntry = strategyEntries.find(([, strategy]) => {\n if (strategy.group !== strategyGroup) {\n return false;\n }\n return strategy.isAvailable();\n });\n return availableStrategyEntry?.[0] ?? GRID_DEFAULT_STRATEGY;\n }, []);\n const setStrategyAvailability = React.useCallback((strategyGroup, strategyName, isAvailable) => {\n availableStrategies.current.set(strategyName, {\n group: strategyGroup,\n isAvailable\n });\n apiRef.current.publishEvent('strategyAvailabilityChange');\n }, [apiRef]);\n const strategyProcessingApi = {\n registerStrategyProcessor,\n applyStrategyProcessor,\n getActiveStrategy,\n setStrategyAvailability\n };\n useGridApiMethod(apiRef, strategyProcessingApi, 'private');\n};","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _formatErrorMessage from \"@mui/x-internals/formatErrorMessage\";\nimport * as React from 'react';\nimport { useGridApiMethod } from \"../utils/index.mjs\";\nimport { isFunction } from \"../../utils/utils.mjs\";\nexport const useGridStateInitialization = apiRef => {\n const controlStateMapRef = React.useRef({});\n const registerControlState = React.useCallback(controlStateItem => {\n controlStateMapRef.current[controlStateItem.stateId] = controlStateItem;\n }, []);\n const setState = React.useCallback((state, reason) => {\n let newState;\n if (isFunction(state)) {\n newState = state(apiRef.current.state);\n } else {\n newState = state;\n }\n if (apiRef.current.state === newState) {\n return false;\n }\n const apiRefWithNewState = {\n current: {\n state: newState\n }\n };\n let ignoreSetState = false;\n\n // Apply the control state constraints\n const updatedControlStateIds = [];\n Object.keys(controlStateMapRef.current).forEach(stateId => {\n const controlState = controlStateMapRef.current[stateId];\n const oldSubState = controlState.stateSelector(apiRef);\n const newSubState = controlState.stateSelector(apiRefWithNewState);\n if (newSubState === oldSubState) {\n return;\n }\n updatedControlStateIds.push({\n stateId: controlState.stateId,\n hasPropChanged: newSubState !== controlState.propModel\n });\n\n // The state is controlled, the prop should always win\n if (controlState.propModel !== undefined && newSubState !== controlState.propModel) {\n ignoreSetState = true;\n }\n });\n if (updatedControlStateIds.length > 1) {\n // Each hook modify its own state, and it should not leak\n // Events are here to forward to other hooks and apply changes.\n // You are trying to update several states in a no isolated way.\n throw new Error(process.env.NODE_ENV !== \"production\" ? `MUI X: You're not allowed to update several sub-state in one transaction. You already updated ${updatedControlStateIds[0].stateId}, therefore, you're not allowed to update ${updatedControlStateIds.map(el => el.stateId).join(', ')} in the same transaction.` : _formatErrorMessage(66, updatedControlStateIds[0].stateId, updatedControlStateIds.map(el => el.stateId).join(', ')));\n }\n if (!ignoreSetState) {\n // We always assign it as we mutate rows for perf reason.\n apiRef.current.state = newState;\n apiRef.current.publishEvent('stateChange', newState);\n apiRef.current.store.update(newState);\n }\n if (updatedControlStateIds.length === 1) {\n const {\n stateId,\n hasPropChanged\n } = updatedControlStateIds[0];\n const controlState = controlStateMapRef.current[stateId];\n const model = controlState.stateSelector(apiRefWithNewState);\n if (controlState.propOnChange && hasPropChanged) {\n controlState.propOnChange(model, {\n reason,\n api: apiRef.current\n });\n }\n if (!ignoreSetState) {\n apiRef.current.publishEvent(controlState.changeEvent, model, {\n reason\n });\n }\n }\n return !ignoreSetState;\n }, [apiRef]);\n const updateControlState = React.useCallback((key, state, reason) => {\n return apiRef.current.setState(previousState => {\n return _extends({}, previousState, {\n [key]: state(previousState[key])\n });\n }, reason);\n }, [apiRef]);\n const publicStateApi = {\n setState\n };\n const privateStateApi = {\n updateControlState,\n registerControlState\n };\n useGridApiMethod(apiRef, publicStateApi, 'public');\n useGridApiMethod(apiRef, privateStateApi, 'private');\n};","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nexport const propsStateInitializer = (state, props) => {\n return _extends({}, state, {\n props: {\n listView: props.listView,\n getRowId: props.getRowId,\n isCellEditable: props.isCellEditable,\n isRowSelectable: props.isRowSelectable,\n dataSource: props.dataSource,\n signature: props.signature\n }\n });\n};\nexport const useGridProps = (apiRef, props) => {\n const isFirstRender = React.useRef(true);\n React.useEffect(() => {\n if (isFirstRender.current) {\n isFirstRender.current = false;\n return;\n }\n apiRef.current.setState(state => _extends({}, state, {\n props: {\n listView: props.listView,\n getRowId: props.getRowId,\n isCellEditable: props.isCellEditable,\n isRowSelectable: props.isRowSelectable,\n dataSource: props.dataSource,\n signature: props.signature\n }\n }));\n }, [apiRef, props.listView, props.getRowId, props.isCellEditable, props.isRowSelectable, props.dataSource, props.signature]);\n};","import { useGridRefs } from \"./useGridRefs.mjs\";\nimport { useGridIsRtl } from \"./useGridIsRtl.mjs\";\nimport { useGridLoggerFactory } from \"./useGridLoggerFactory.mjs\";\nimport { useGridLocaleText } from \"./useGridLocaleText.mjs\";\nimport { useGridPipeProcessing } from \"./pipeProcessing/index.mjs\";\nimport { useGridStrategyProcessing } from \"./strategyProcessing/index.mjs\";\nimport { useGridStateInitialization } from \"./useGridStateInitialization.mjs\";\nimport { useGridProps } from \"./useGridProps.mjs\";\n\n/**\n * Initialize the technical pieces of the DataGrid (logger, state, ...) that any DataGrid implementation needs\n */\nexport const useGridInitialization = (privateApiRef, props) => {\n useGridRefs(privateApiRef);\n useGridProps(privateApiRef, props);\n useGridIsRtl(privateApiRef);\n useGridLoggerFactory(privateApiRef, props);\n useGridStateInitialization(privateApiRef);\n useGridPipeProcessing(privateApiRef);\n useGridStrategyProcessing(privateApiRef);\n useGridLocaleText(privateApiRef, props);\n privateApiRef.current.register('private', {\n rootProps: props\n });\n};","'use client';\n\nimport * as React from 'react';\nexport const useGridInitializeState = (initializer, privateApiRef, props, key) => {\n const previousKey = React.useRef(key);\n const isInitialized = React.useRef(false);\n if (key !== previousKey.current) {\n isInitialized.current = false;\n previousKey.current = key;\n }\n if (!isInitialized.current) {\n privateApiRef.current.state = initializer(privateApiRef.current.state, props, privateApiRef);\n isInitialized.current = true;\n }\n};","import { warnOnce } from '@mui/x-internals/warning';\nimport { GRID_CHECKBOX_SELECTION_COL_DEF } from \"../../../../colDef/index.mjs\";\nfunction sanitizeCellValue(value, csvOptions) {\n if (value === null || value === undefined) {\n return '';\n }\n const valueStr = typeof value === 'string' ? value : `${value}`;\n if (csvOptions.shouldAppendQuotes || csvOptions.escapeFormulas) {\n const escapedValue = valueStr.replace(/\"/g, '\"\"');\n if (csvOptions.escapeFormulas) {\n // See https://owasp.org/www-community/attacks/CSV_Injection\n if (['=', '+', '-', '@', '\\t', '\\r'].includes(escapedValue[0])) {\n return `\"'${escapedValue}\"`;\n }\n }\n // Make sure value containing delimiter or line break won't be split into multiple cells\n if ([csvOptions.delimiter, '\\n', '\\r', '\"'].some(delimiter => valueStr.includes(delimiter))) {\n return `\"${escapedValue}\"`;\n }\n return escapedValue;\n }\n return valueStr;\n}\nexport const serializeCellValue = (cellParams, options) => {\n const {\n csvOptions,\n ignoreValueFormatter\n } = options;\n let value;\n if (ignoreValueFormatter) {\n const columnType = cellParams.colDef.type;\n if (columnType === 'number') {\n value = String(cellParams.value);\n } else if (columnType === 'date' || columnType === 'dateTime') {\n value = cellParams.value?.toISOString();\n } else if (typeof cellParams.value?.toString === 'function') {\n value = cellParams.value.toString();\n } else {\n value = cellParams.value;\n }\n } else {\n value = cellParams.formattedValue;\n }\n return sanitizeCellValue(value, csvOptions);\n};\nclass CSVRow {\n rowString = '';\n isEmpty = true;\n constructor(options) {\n this.options = options;\n }\n addValue(value) {\n if (!this.isEmpty) {\n this.rowString += this.options.csvOptions.delimiter;\n }\n if (typeof this.options.sanitizeCellValue === 'function') {\n this.rowString += this.options.sanitizeCellValue(value, this.options.csvOptions);\n } else {\n this.rowString += value;\n }\n this.isEmpty = false;\n }\n getRowString() {\n return this.rowString;\n }\n}\nconst serializeRow = ({\n id,\n columns,\n getCellParams,\n csvOptions,\n ignoreValueFormatter\n}) => {\n const row = new CSVRow({\n csvOptions\n });\n columns.forEach(column => {\n const cellParams = getCellParams(id, column.field);\n if (String(cellParams.formattedValue) === '[object Object]') {\n if (process.env.NODE_ENV !== 'production') {\n warnOnce(['MUI X: When the value of a field is an object or a `renderCell` is provided, the CSV export might not display the value correctly.', 'You can provide a `valueFormatter` with a string representation to be used.']);\n }\n }\n row.addValue(serializeCellValue(cellParams, {\n ignoreValueFormatter,\n csvOptions\n }));\n });\n return row.getRowString();\n};\nexport function buildCSV(options) {\n const {\n columns,\n rowIds,\n csvOptions,\n ignoreValueFormatter,\n apiRef\n } = options;\n const CSVBody = rowIds.reduce((acc, id) => `${acc}${serializeRow({\n id,\n columns,\n getCellParams: apiRef.current.getCellParams,\n ignoreValueFormatter,\n csvOptions\n })}\\r\\n`, '').trim();\n if (!csvOptions.includeHeaders) {\n return CSVBody;\n }\n const filteredColumns = columns.filter(column => column.field !== GRID_CHECKBOX_SELECTION_COL_DEF.field);\n const headerRows = [];\n if (csvOptions.includeColumnGroupsHeaders) {\n const columnGroupLookup = apiRef.current.getAllGroupDetails();\n let maxColumnGroupsDepth = 0;\n const columnGroupPathsLookup = filteredColumns.reduce((acc, column) => {\n const columnGroupPath = apiRef.current.getColumnGroupPath(column.field);\n acc[column.field] = columnGroupPath;\n maxColumnGroupsDepth = Math.max(maxColumnGroupsDepth, columnGroupPath.length);\n return acc;\n }, {});\n for (let i = 0; i < maxColumnGroupsDepth; i += 1) {\n const headerGroupRow = new CSVRow({\n csvOptions,\n sanitizeCellValue\n });\n headerRows.push(headerGroupRow);\n filteredColumns.forEach(column => {\n const columnGroupId = (columnGroupPathsLookup[column.field] || [])[i];\n const columnGroup = columnGroupLookup[columnGroupId];\n headerGroupRow.addValue(columnGroup ? columnGroup.headerName || columnGroup.groupId : '');\n });\n }\n }\n const mainHeaderRow = new CSVRow({\n csvOptions,\n sanitizeCellValue\n });\n filteredColumns.forEach(column => {\n mainHeaderRow.addValue(column.headerName || column.field);\n });\n headerRows.push(mainHeaderRow);\n const CSVHead = `${headerRows.map(row => row.getRowString()).join('\\r\\n')}\\r\\n`;\n return `${CSVHead}${CSVBody}`.trim();\n}","import * as React from 'react';\nimport { useGridEventPriority, useGridNativeEventListener } from \"../../utils/index.mjs\";\nimport { gridFocusCellSelector } from \"../focus/gridFocusStateSelector.mjs\";\nimport { serializeCellValue } from \"../export/serializers/csvSerializer.mjs\";\nimport { isCopyShortcut } from \"../../../utils/keyboardUtils.mjs\";\nimport { gridRowSelectionCountSelector } from \"../rowSelection/index.mjs\";\nfunction writeToClipboardPolyfill(data) {\n const span = document.createElement('span');\n span.style.whiteSpace = 'pre';\n span.style.userSelect = 'all';\n span.style.opacity = '0px';\n span.textContent = data;\n document.body.appendChild(span);\n const range = document.createRange();\n range.selectNode(span);\n const selection = window.getSelection();\n selection.removeAllRanges();\n selection.addRange(range);\n try {\n document.execCommand('copy');\n } finally {\n document.body.removeChild(span);\n }\n}\nfunction copyToClipboard(data) {\n if (navigator.clipboard) {\n navigator.clipboard.writeText(data).catch(() => {\n writeToClipboardPolyfill(data);\n });\n } else {\n writeToClipboardPolyfill(data);\n }\n}\nfunction hasNativeSelection(element) {\n // When getSelection is called on an