annotate x/static/js/5676.818528e8.chunk.js.map @ 125:49f3d3878413 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 5ea1f9c1eef1de76232e69aa6d34cda77d90d566
author fubar
date Sat, 05 Oct 2024 23:58:05 +0000
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
125
49f3d3878413 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 5ea1f9c1eef1de76232e69aa6d34cda77d90d566
fubar
parents:
diff changeset
1 {"version":3,"file":"static/js/5676.818528e8.chunk.js","mappings":"2RAeA,MACMA,EAAyB,IAAS;;;;;;;;;;;;;;;EAoBlCC,EAA4D,iBAA3BD,EAAsC,IAAG;qBAC3DA;QACX,KACJE,EAAyB,IAAS;;;;;;;;;;;;;;;EAgBlCC,EAA4D,iBAA3BD,EAAsC,IAAG;qBAC3DA;QACX,KACJE,EAAiB,IAAS;;;;;;;;;;;;;;;EAgB1BC,EAA4C,iBAAnBD,EAA8B,IAAG;qBAC3CA;QACX,KAeJE,EAAgB,CAACC,EAAOC,IACxBD,EAAME,KACDF,EAAME,KAAKC,QAAQC,eAAe,GAAGH,OAEhB,UAAvBD,EAAMG,QAAQE,MAAmB,OAAQL,EAAMG,QAAQF,GAAOK,KAAM,MAAQ,QAAON,EAAMG,QAAQF,GAAOK,KAAM,IAEjHC,GAAqB,QAAO,OAAQ,CACxCC,KAAM,oBACNC,KAAM,OACNC,kBAAmB,CAACC,EAAOC,KACzB,MAAM,WACJC,GACEF,EACJ,MAAO,CAACC,EAAOE,KAAMF,EAAO,SAAQ,OAAWC,EAAWZ,UAAWW,EAAOC,EAAWE,SAAS,GAPzE,EASxB,QAAU,EACXf,YACI,CACJgB,SAAU,WACVC,SAAU,SACVC,QAAS,QACTC,OAAQ,EAERC,OAAQ,EACR,eAAgB,CACdC,YAAa,SAEfC,SAAU,IAAIC,OAAOC,QAAQxB,EAAMG,SAASsB,QAAO,UAA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MAI5B,IAAI8zG,IACKA,EAAqB/8G,QAAO,CAAC29G,EAAa1hH,EAAOgvB,KACtD0yF,EAAYD,EAAkBzyF,IAAUhvB,EACjC0hH,IACN,CAAC,IAGiB,GAE3B,CAAEN,UAAW,IAAMC,G","sources":["../../../node_modules/@mui/material/LinearProgress/LinearProgress.js","../../../node_modules/@mui/material/LinearProgress/linearProgressClasses.js","../../../node_modules/@mui/material/Skeleton/Skeleton.js","../../../node_modules/@mui/material/Skeleton/skeletonClasses.js","../../../node_modules/@mui/x-data-grid/hooks/core/useGridLoggerFactory.js","../../../node_modules/@mui/x-internals/EventManager/EventManager.js","../../../node_modules/@mui/x-data-grid/utils/Store.js","../../../node_modules/@mui/x-data-grid/hooks/core/useGridApiInitialization.js","../../../node_modules/@babel/runtime/helpers/esm/typeof.js","../../../node_modules/@babel/runtime/helpers/esm/toPropertyKey.js","../../../node_modules/@babel/runtime/helpers/esm/toPrimitive.js","../../../node_modules/@mui/x-data-grid/hooks/core/pipeProcessing/useGridPipeProcessing.js","../../../node_modules/@mui/x-data-grid/hooks/core/strategyProcessing/useGridStrategyProcessing.js","../../../node_modules/@mui/x-data-grid/hooks/core/useGridInitialization.js","../../../node_modules/@mui/x-data-grid/hooks/core/useGridRefs.js","../../../node_modules/@mui/x-data-grid/hooks/core/useGridIsRtl.js","../../../node_modules/@mui/x-data-grid/hooks/core/useGridStateInitialization.js","../../../node_modules/@mui/x-data-grid/hooks/core/useGridLocaleText.js","../../../node_modules/@mui/x-data-grid/hooks/utils/useGridInitializeState.js","../../../node_modules/@mui/x-data-grid/hooks/features/export/serializers/csvSerializer.js","../../../node_modules/@mui/x-data-grid/hooks/features/clipboard/useGridClipboard.js","../../../node_modules/@mui/x-data-grid/hooks/features/columnMenu/useGridColumnMenu.js","../../../node_modules/@mui/x-data-grid/hooks/core/pipeProcessing/useGridRegisterPipeProcessor.js","../../../node_modules/@mui/x-data-grid/hooks/core/pipeProcessing/useGridRegisterPipeApplier.js","../../../node_modules/@mui/x-data-grid/hooks/features/columns/useGridColumns.js","../../../node_modules/@mui/x-data-grid/hooks/features/density/useGridDensity.js","../../../node_modules/@mui/x-data-grid/hooks/features/export/utils.js","../../../node_modules/@mui/x-data-grid/hooks/features/export/useGridCsvExport.js","../../../node_modules/@mui/x-data-grid/utils/exportAs.js","../../../node_modules/@mui/x-data-grid/hooks/features/pagination/useGridPaginationModel.js","../../../node_modules/@mui/x-data-grid/hooks/core/strategyProcessing/useGridRegisterStrategyProcessor.js","../../../node_modules/@mui/x-data-grid/hooks/features/filter/useGridFilter.js","../../../node_modules/@mui/x-data-grid/hooks/features/focus/useGridFocus.js","../../../node_modules/@mui/x-data-grid/hooks/features/keyboardNavigation/utils.js","../../../node_modules/@mui/x-data-grid/hooks/features/pagination/useGridPagination.js","../../../node_modules/@mui/x-data-grid/hooks/features/preferencesPanel/useGridPreferencesPanel.js","../../../node_modules/@mui/x-data-grid/hooks/features/editing/utils.js","../../../node_modules/@mui/x-data-grid/hooks/features/editing/useGridCellEditing.js","../../../node_modules/@mui/x-data-grid/hooks/features/editing/useGridRowEditing.js","../../../node_modules/@mui/x-data-grid/hooks/features/editing/useGridEditing.js","../../../node_modules/@mui/x-data-grid/hooks/features/rows/useGridRows.js","../../../node_modules/@mui/x-data-grid/hooks/features/rows/useGridRowsPreProcessors.js","../../../node_modules/@mui/x-data-grid/hooks/features/rowSelection/useGridRowSelection.js","../../../node_modules/@mui/x-data-grid/hooks/features/sorting/useGridSorting.js","../../../node_modules/@mui/x-data-grid/hooks/features/scroll/useGridScroll.js","../../../node_modules/@mui/x-data-grid/hooks/features/dimensions/useGridDimensions.js","../../../node_modules/@mui/x-data-grid/hooks/features/rows/useGridRowsMeta.js","../../../node_modules/@mui/x-data-grid/hooks/features/columns/useGridColumnSpanning.js","../../../node_modules/@mui/x-data-grid/hooks/features/columnGrouping/gridColumnGroupsUtils.js","../../../node_modules/@mui/x-data-grid/hooks/features/columnGrouping/useGridColumnGrouping.js","../../../node_modules/@mui/x-data-grid/hooks/features/columnResize/useGridColumnResize.js","../../../node_modules/@mui/x-data-grid/utils/createControllablePromise.js","../../../node_modules/@mui/x-data-grid/hooks/features/rows/gridRowSpanningUtils.js","../../../node_modules/@mui/x-data-grid/hooks/features/rows/useGridRowSpanning.js","../../../node_modules/@mui/x-data-grid/DataGrid/useDataGridComponent.js","../../../node_modules/@mui/x-data-grid/hooks/features/rowSelection/useGridRowSelectionPreProcessors.js","../../../node_modules/@mui/x-data-grid/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js","../../../node_modules/@mui/x-data-grid/hooks/features/pagination/useGridPaginationMeta.js","../../../node_modules/@mui/x-data-grid/hooks/features/pagination/useGridRowCount.js","../../../node_modules/@mui/x-data-grid/hooks/features/export/useGridPrintExport.js","../../../node_modules/@mui/x-internals/throttle/throttle.js","../../../node_modules/@mui/x-data-grid/node_modules/@mui/utils/esm/ownerWindow/ownerWindow.js","../../../node_modules/@mui/x-data-grid/hooks/features/events/useGridEvents.js","../../../node_modules/@mui/x-data-grid/hooks/features/statePersistence/useGridStatePersistence.js","../../../node_modules/@mui/x-data-grid/DataGrid/DataGrid.js","../../../node_modules/@mui/x-data-grid/hooks/utils/useGridAriaAttributes.js","../../../node_modules/@mui/x-data-grid/hooks/features/rows/useGridRowAriaAttributes.js","../../../node_modules/@mui/x-data-grid/components/GridNoResultsOverlay.js","../../../node_modules/@mui/x-data-grid/material/icons/GridColumnUnsortedIcon.js","../../../node_modules/@mui/x-data-grid/material/components/MUISelectOption.js","../../../node_modules/@mui/x-data-grid/material/index.js","../../../node_modules/@mui/x-data-grid/constants/defaultGridSlotsComponents.js","../../../node_modules/@mui/x-data-grid/components/GridDetailPanels.js","../../../node_modules/@mui/x-data-grid/components/GridPinnedRows.js","../../../node_modules/@mui/x-data-grid/DataGrid/useDataGridProps.js","../../../node_modules/@mui/x-data-grid/internals/utils/useProps.js","../../../node_modules/@mui/x-data-grid/internals/utils/computeSlots.js","../../../node_modules/@mui/x-data-grid/colDef/gridActionsColDef.js","../../../node_modules/@mui/x-data-grid/colDef/gridBooleanColDef.js","../../../node_modules/@mui/x-data-grid/colDef/gridBooleanOperators.js","../../../node_modules/@mui/x-data-grid/colDef/gridCheckboxSelectionColDef.js","../../../node_modules/@mui/x-data-grid/colDef/gridDateColDef.js","../../../node_modules/@mui/x-data-grid/colDef/gridDateOperators.js","../../../node_modules/@mui/x-data-grid/colDef/gridDefaultColumnTypes.js","../../../node_modules/@mui/x-data-grid/colDef/gridNumericColDef.js","../../../node_modules/@mui/x-data-grid/colDef/gridNumericOperators.js","../../../node_modules/@mui/x-data-grid/colDef/gridSingleSelectColDef.js","../../../node_modules/@mui/x-data-grid/colDef/gridSingleSelectOperators.js","../../../node_modules/@mui/x-data-grid/colDef/gridStringColDef.js","../../../node_modules/@mui/x-data-grid/colDef/gridStringOperators.js","../../../node_modules/@mui/x-data-grid/components/columnHeaders/GridColumnGroupHeader.js","../../../node_modules/@mui/x-data-grid/hooks/features/columnHeaders/useGridColumnHeaders.js","../../../node_modules/@mui/x-data-grid/components/columnHeaders/GridBaseColumnHeaders.js","../../../node_modules/@mui/x-data-grid/components/GridColumnHeaders.js","../../../node_modules/@mui/x-data-grid/components/GridConfigurationContext.js","../../../node_modules/@mui/x-data-grid/components/GridFooter.js","../../../node_modules/@mui/x-data-grid/components/panel/GridPreferencesPanel.js","../../../node_modules/@mui/x-data-grid/components/GridHeader.js","../../../node_modules/@mui/x-data-grid/components/GridSkeletonLoadingOverlay.js","../../../node_modules/@mui/x-data-grid/components/GridLoadingOverlay.js","../../../node_modules/@mui/x-data-grid/components/GridNoRowsOverlay.js","../../../node_modules/@mui/x-data-grid/components/GridPagination.js","../../../node_modules/@mui/x-data-grid/components/GridRow.js","../../../node_modules/@mui/x-data-grid/utils/composeGridClasses.js","../../../node_modules/@mui/x-data-grid/components/GridRowCount.js","../../../node_modules/@mui/x-data-grid/components/GridScrollbarFillerCell.js","../../../node_modules/@mui/x-data-grid/components/GridSelectedRowCount.js","../../../node_modules/@mui/x-data-grid/components/base/GridFooterPlaceholder.js","../../../node_modules/@mui/x-data-grid/components/base/GridOverlays.js","../../../node_modules/@mui/x-data-grid/components/cell/GridActionsCell.js","../../../node_modules/@mui/x-data-grid/components/cell/GridBooleanCell.js","../../../node_modules/@mui/x-data-grid/utils/doesSupportPreventScroll.js","../../../node_modules/@mui/x-data-grid/components/cell/GridCell.js","../../../node_modules/@mui/x-data-grid/components/cell/GridEditBooleanCell.js","../../../node_modules/@mui/x-data-grid/components/cell/GridEditDateCell.js","../../../node_modules/@mui/x-data-grid/components/cell/GridEditInputCell.js","../../../node_modules/@mui/x-data-grid/components/cell/GridEditSingleSelectCell.js","../../../node_modules/@mui/x-data-grid/components/cell/GridSkeletonCell.js","../../../node_modules/@mui/x-data-grid/components/columnHeaders/GridColumnHeaderFilterIconButton.js","../../../node_modules/@mui/x-data-grid/components/columnHeaders/ColumnHeaderMenuIcon.js","../../../node_modules/@mui/x-data-grid/components/columnHeaders/GridColumnHeaderItem.js","../../../node_modules/@mui/x-data-grid/components/columnHeaders/GridColumnHeaderSeparator.js","../../../node_modules/@mui/x-data-grid/components/columnHeaders/GridColumnHeaderSortIcon.js","../../../node_modules/@mui/x-data-grid/components/columnHeaders/GridColumnHeaderTitle.js","../../../node_modules/@mui/x-data-grid/components/columnHeaders/GridGenericColumnHeaderItem.js","../../../node_modules/@mui/x-data-grid/components/columnHeaders/GridIconButtonContainer.js","../../../node_modules/@mui/x-data-grid/components/columnSelection/GridCellCheckboxRenderer.js","../../../node_modules/@mui/x-data-grid/components/columnSelection/GridHeaderCheckbox.js","../../../node_modules/@mui/x-data-grid/components/columnsManagement/utils.js","../../../node_modules/@mui/x-data-grid/components/columnsManagement/GridColumnsManagement.js","../../../node_modules/@mui/x-data-grid/components/containers/GridFooterContainer.js","../../../node_modules/@mui/x-data-grid/components/containers/GridOverlay.js","../../../node_modules/@mui/x-data-grid/components/containers/GridRootStyles.js","../../../node_modules/@mui/x-data-grid/components/containers/GridRoot.js","../../../node_modules/@mui/x-data-grid/components/menu/GridMenu.js","../../../node_modules/@mui/x-data-grid/components/menu/columnMenu/GridColumnHeaderMenu.js","../../../node_modules/@mui/x-data-grid/hooks/features/columnMenu/useGridColumnMenuSlots.js","../../../node_modules/@mui/x-data-grid/components/menu/columnMenu/GridColumnMenu.js","../../../node_modules/@mui/x-data-grid/components/menu/columnMenu/GridColumnMenuContainer.js","../../../node_modules/@mui/x-data-grid/components/menu/columnMenu/menuItems/GridColumnMenuColumnsItem.js","../../../node_modules/@mui/x-data-grid/components/menu/columnMenu/menuItems/GridColumnMenuFilterItem.js","../../../node_modules/@mui/x-data-grid/components/menu/columnMenu/menuItems/GridColumnMenuHideItem.js","../../../node_modules/@mui/x-data-grid/components/menu/columnMenu/menuItems/GridColumnMenuManageItem.js","../../../node_modules/@mui/x-data-grid/components/menu/columnMenu/menuItems/GridColumnMenuSortItem.js","../../../node_modules/@mui/x-data-grid/components/panel/GridColumnsPanel.js","../../../node_modules/@mui/x-data-grid/components/panel/GridPanel.js","../../../node_modules/@mui/x-data-grid/components/panel/GridPanelContent.js","../../../node_modules/@mui/x-data-grid/components/panel/GridPanelFooter.js","../../../node_modules/@mui/x-data-grid/components/panel/GridPanelWrapper.js","../../../node_modules/@mui/x-data-grid/components/panel/filterPanel/GridFilterForm.js","../../../node_modules/@mui/x-data-grid/components/panel/filterPanel/GridFilterInputBoolean.js","../../../node_modules/@mui/x-data-grid/components/panel/filterPanel/GridFilterInputDate.js","../../../node_modules/@mui/x-data-grid/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.js","../../../node_modules/@mui/x-data-grid/components/panel/filterPanel/GridFilterInputMultipleValue.js","../../../node_modules/@mui/x-data-grid/components/panel/filterPanel/GridFilterInputSingleSelect.js","../../../node_modules/@mui/x-data-grid/components/panel/filterPanel/GridFilterInputValue.js","../../../node_modules/@mui/x-data-grid/components/panel/filterPanel/GridFilterPanel.js","../../../node_modules/@mui/x-data-grid/components/panel/filterPanel/filterPanelUtils.js","../../../node_modules/@mui/x-data-grid/components/toolbar/GridToolbarExport.js","../../../node_modules/@mui/x-data-grid/components/toolbar/GridToolbarExportContainer.js","../../../node_modules/@mui/x-data-grid/components/GridScrollArea.js","../../../node_modules/@mui/x-data-grid/hooks/features/overlays/useGridOverlays.js","../../../node_modules/@mui/x-data-grid/components/GridHeaders.js","../../../node_modules/@mui/x-data-grid/components/virtualization/GridMainContainer.js","../../../node_modules/@mui/x-data-grid/components/virtualization/GridTopContainer.js","../../../node_modules/@mui/x-data-grid/components/virtualization/GridBottomContainer.js","../../../node_modules/@mui/x-data-grid/components/virtualization/GridVirtualScrollerContent.js","../../../node_modules/@mui/x-data-grid/components/virtualization/GridVirtualScrollerFiller.js","../../../node_modules/@mui/x-data-grid/components/virtualization/GridVirtualScrollerRenderZone.js","../../../node_modules/@mui/x-data-grid/components/virtualization/GridVirtualScrollbar.js","../../../node_modules/@mui/x-data-grid/components/virtualization/GridVirtualScroller.js","../../../node_modules/@mui/x-data-grid/constants/gridClasses.js","../../../node_modules/@mui/x-data-grid/constants/gridDetailPanelToggleField.js","../../../node_modules/@mui/x-data-grid/constants/localeTextConstants.js","../../../node_modules/@mui/x-data-grid/context/GridContextProvider.js","../../../node_modules/@mui/x-data-grid/hooks/features/columnGrouping/gridColumnGroupsSelector.js","../../../node_modules/@mui/x-data-grid/hooks/features/columnMenu/columnMenuSelector.js","../../../node_modules/@mui/x-data-grid/hooks/features/columnResize/gridColumnResizeApi.js","../../../node_modules/@mui/x-data-grid/hooks/features/columns/gridColumnsInterfaces.js","../../../node_modules/@mui/x-data-grid/hooks/core/gridCoreSelector.js","../../../node_modules/@mui/x-data-grid/hooks/features/columns/gridColumnsSelector.js","../../../node_modules/@mui/x-data-grid/hooks/features/columns/gridColumnsUtils.js","../../../node_modules/@mui/x-data-grid/hooks/features/density/densitySelector.js","../../../node_modules/@mui/x-data-grid/hooks/features/dimensions/gridDimensionsSelectors.js","../../../node_modules/@mui/x-data-grid/hooks/features/editing/gridEditingSelectors.js","../../../node_modules/@mui/x-data-grid/hooks/features/filter/gridFilterSelector.js","../../../node_modules/@mui/x-data-grid/hooks/features/filter/gridFilterState.js","../../../node_modules/@mui/x-data-grid/utils/getPublicApiRef.js","../../../node_modules/@mui/x-data-grid/hooks/features/filter/gridFilterUtils.js","../../../node_modules/@mui/x-data-grid/hooks/features/focus/gridFocusStateSelector.js","../../../node_modules/@mui/x-data-grid/hooks/features/headerFiltering/gridHeaderFilteringSelectors.js","../../../node_modules/@mui/x-data-grid/hooks/features/pagination/gridPaginationSelector.js","../../../node_modules/@mui/x-data-grid/hooks/features/pagination/gridPaginationUtils.js","../../../node_modules/@mui/x-data-grid/hooks/features/preferencesPanel/gridPreferencePanelSelector.js","../../../node_modules/@mui/x-data-grid/hooks/features/preferencesPanel/gridPreferencePanelsValue.js","../../../node_modules/@mui/x-data-grid/hooks/features/rowSelection/gridRowSelectionSelector.js","../../../node_modules/@mui/x-data-grid/hooks/features/rowSelection/utils.js","../../../node_modules/@mui/x-data-grid/hooks/features/rows/gridRowSpanningSelectors.js","../../../node_modules/@mui/x-data-grid/hooks/features/rows/gridRowsMetaSelector.js","../../../node_modules/@mui/x-data-grid/hooks/features/rows/gridRowsSelector.js","../../../node_modules/@mui/x-data-grid/hooks/features/rows/gridRowsUtils.js","../../../node_modules/@mui/x-data-grid/hooks/features/rows/useGridParamsApi.js","../../../node_modules/@mui/x-data-grid/hooks/features/sorting/gridSortingSelector.js","../../../node_modules/@mui/x-data-grid/hooks/features/sorting/gridSortingUtils.js","../../../node_modules/@mui/x-data-grid/hooks/features/virtualization/gridVirtualizationSelectors.js","../../../node_modules/@mui/x-internals/node_modules/@mui/utils/esm/useEnhancedEffect/useEnhancedEffect.js","../../../node_modules/@mui/x-internals/useResizeObserver/useResizeObserver.js","../../../node_modules/@mui/x-data-grid/utils/platform.js","../../../node_modules/@mui/x-data-grid/hooks/features/virtualization/useGridVirtualScroller.js","../../../node_modules/@mui/x-data-grid/hooks/features/virtualization/useGridVirtualization.js","../../../node_modules/@mui/x-data-grid/hooks/utils/useFirstRender.js","../../../node_modules/@mui/x-data-grid/utils/cleanupTracking/TimerBasedCleanupTracking.js","../../../node_modules/@mui/x-data-grid/utils/cleanupTracking/FinalizationRegistryBasedCleanupTracking.js","../../../node_modules/@mui/x-data-grid/hooks/utils/useGridApiEventHandler.js","../../../node_modules/@mui/x-data-grid/hooks/utils/useGridApiMethod.js","../../../node_modules/@mui/x-data-grid/hooks/utils/useGridConfiguration.js","../../../node_modules/@mui/x-data-grid/hooks/utils/useGridLogger.js","../../../node_modules/@mui/x-data-grid/hooks/utils/useGridNativeEventListener.js","../../../node_modules/@mui/x-data-grid/hooks/utils/useGridPrivateApiContext.js","../../../node_modules/@mui/x-data-grid/hooks/utils/useGridSelector.js","../../../node_modules/@mui/x-data-grid/hooks/utils/useGridVisibleRows.js","../../../node_modules/@mui/x-data-grid/hooks/utils/useRunOnce.js","../../../node_modules/@mui/x-data-grid/internals/utils/getPinnedCellOffset.js","../../../node_modules/@mui/x-data-grid/material/icons/index.js","../../../node_modules/@mui/x-data-grid/models/gridColumnGrouping.js","../../../node_modules/@mui/x-data-grid/models/gridEditRowModel.js","../../../node_modules/@mui/x-data-grid/models/gridFilterItem.js","../../../node_modules/@mui/x-data-grid/models/params/gridEditCellParams.js","../../../node_modules/@mui/x-data-grid/models/params/gridRowParams.js","../../../node_modules/@mui/x-data-grid/node_modules/@mui/utils/esm/capitalize/capitalize.js","../../../node_modules/@mui/x-data-grid/node_modules/@mui/utils/esm/formatMuiErrorMessage/formatMuiErrorMessage.js","../../../node_modules/@mui/x-data-grid/node_modules/@mui/utils/esm/composeClasses/composeClasses.js","../../../node_modules/@mui/x-data-grid/node_modules/@mui/utils/esm/debounce/debounce.js","../../../node_modules/@mui/x-data-grid/node_modules/@mui/utils/esm/ClassNameGenerator/ClassNameGenerator.js","../../../node_modules/@mui/x-data-grid/node_modules/@mui/utils/esm/generateUtilityClass/generateUtilityClass.js","../../../node_modules/@mui/x-data-grid/node_modules/@mui/utils/esm/generateUtilityClasses/generateUtilityClasses.js","../../../node_modules/@mui/x-data-grid/node_modules/@mui/utils/esm/ownerDocument/ownerDocument.js","../../../node_modules/@mui/x-data-grid/node_modules/@mui/utils/esm/useEnhancedEffect/useEnhancedEffect.js","../../../node_modules/@mui/x-data-grid/node_modules/@mui/utils/esm/useEventCallback/useEventCallback.js","../../../node_modules/@mui/x-data-grid/node_modules/@mui/utils/esm/useForkRef/useForkRef.js","../../../node_modules/@mui/x-data-grid/node_modules/@mui/utils/esm/setRef/setRef.js","../../../node_modules/@mui/x-data-grid/node_modules/@mui/utils/esm/useId/useId.js","../../../node_modules/@mui/x-data-grid/node_modules/@mui/utils/esm/useLazyRef/useLazyRef.js","../../../node_modules/@mui/x-data-grid/node_modules/@mui/utils/esm/useOnMount/useOnMount.js","../../../node_modules/@mui/x-data-grid/node_modules/@mui/utils/esm/useTimeout/useTimeout.js","../../../node_modules/@mui/x-data-grid/utils/cellBorderUtils.js","../../../node_modules/@mui/x-data-grid/utils/createSelector.js","../../../node_modules/@mui/x-data-grid/utils/domUtils.js","../../../node_modules/@mui/x-data-grid/utils/keyboardUtils.js","../../../node_modules/@mui/x-data-grid/utils/utils.js","../../../node_modules/@mui/x-internals/fastMemo/fastMemo.js","../../../node_modules/@mui/x-internals/fastObjectShallowCompare/fastObjectShallowCompare.js","../../../node_modules/prop-types/factoryWithThrowingShims.js","../../../node_modules/prop-types/index.js","../../../node_modules/prop-types/lib/ReactPropTypesSecret.js","../../../node_modules/reselect/src/devModeChecks/identityFunctionCheck.ts","../../../node_modules/reselect/src/utils.ts","../../../node_modules/reselect/src/autotrackMemoize/proxy.ts","../../../node_modules/reselect/src/lruMemoize.ts","../../../node_modules/reselect/src/weakMapMemoize.ts","../../../node_modules/reselect/src/createSelectorCreator.ts","../../../node_modules/reselect/src/createStructuredSelector.ts"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport composeClasses from '@mui/utils/composeClasses';\nimport { darken, lighten } from '@mui/system/colorManipulator';\nimport { useRtl } from '@mui/system/RtlProvider';\nimport { keyframes, css, styled } from \"../zero-styled/index.js\";\nimport memoTheme from \"../utils/memoTheme.js\";\nimport createSimplePaletteValueFilter from \"../utils/createSimplePaletteValueFilter.js\";\nimport { useDefaultProps } from \"../DefaultPropsProvider/index.js\";\nimport capitalize from \"../utils/capitalize.js\";\nimport { getLinearProgressUtilityClass } from \"./linearProgressClasses.js\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst TRANSITION_DURATION = 4; // seconds\nconst indeterminate1Keyframe = keyframes`\n 0% {\n left: -35%;\n right: 100%;\n }\n\n 60% {\n left: 100%;\n right: -90%;\n }\n\n 100% {\n left: 100%;\n right: -90%;\n }\n`;\n\n// This implementation is for supporting both Styled-components v4+ and Pigment CSS.\n// A global animation has to be created here for Styled-components v4+ (https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#12).\n// which can be done by checking typeof indeterminate1Keyframe !== 'string' (at runtime, Pigment CSS transform keyframes`` to a string).\nconst indeterminate1Animation = typeof indeterminate1Keyframe !== 'string' ? css`\n animation: ${indeterminate1Keyframe} 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite;\n ` : null;\nconst indeterminate2Keyframe = keyframes`\n 0% {\n left: -200%;\n right: 100%;\n }\n\n 60% {\n left: 107%;\n right: -8%;\n }\n\n 100% {\n left: 107%;\n right: -8%;\n }\n`;\nconst indeterminate2Animation = typeof indeterminate2Keyframe !== 'string' ? css`\n animation: ${indeterminate2Keyframe} 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) 1.15s infinite;\n ` : null;\nconst bufferKeyframe = keyframes`\n 0% {\n opacity: 1;\n background-position: 0 -23px;\n }\n\n 60% {\n opacity: 0;\n background-position: 0 -23px;\n }\n\n 100% {\n opacity: 1;\n background-position: -200px -23px;\n }\n`;\nconst bufferAnimation = typeof bufferKeyframe !== 'string' ? css`\n animation: ${bufferKeyframe} 3s infinite linear;\n ` : null;\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n variant,\n color\n } = ownerState;\n const slots = {\n root: ['root', `color${capitalize(color)}`, variant],\n dashed: ['dashed', `dashedColor${capitalize(color)}`],\n bar1: ['bar', `barColor${capitalize(color)}`, (variant === 'indeterminate' || variant === 'query') && 'bar1Indeterminate', variant === 'determinate' && 'bar1Determinate', variant === 'buffer' && 'bar1Buffer'],\n bar2: ['bar', variant !== 'buffer' && `barColor${capitalize(color)}`, variant === 'buffer' && `color${capitalize(color)}`, (variant === 'indeterminate' || variant === 'query') && 'bar2Indeterminate', variant === 'buffer' && 'bar2Buffer']\n };\n return composeClasses(slots, getLinearProgressUtilityClass, classes);\n};\nconst getColorShade = (theme, color) => {\n if (theme.vars) {\n return theme.vars.palette.LinearProgress[`${color}Bg`];\n }\n return theme.palette.mode === 'light' ? lighten(theme.palette[color].main, 0.62) : darken(theme.palette[color].main, 0.5);\n};\nconst LinearProgressRoot = styled('span', {\n name: 'MuiLinearProgress',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, styles[`color${capitalize(ownerState.color)}`], styles[ownerState.variant]];\n }\n})(memoTheme(({\n theme\n}) => ({\n position: 'relative',\n overflow: 'hidden',\n display: 'block',\n height: 4,\n // Fix Safari's bug during composition of different paint.\n zIndex: 0,\n '@media print': {\n colorAdjust: 'exact'\n },\n variants: [...Object.entries(theme.palette).filter(createSimplePaletteValueFilter()).map(([color]) => ({\n props: {\n color\n },\n style: {\n backgroundColor: getColorShade(theme, color)\n }\n })), {\n props: ({\n ownerState\n }) => ownerState.color === 'inherit' && ownerState.variant !== 'buffer',\n style: {\n '&::before': {\n content: '\"\"',\n position: 'absolute',\n left: 0,\n top: 0,\n right: 0,\n bottom: 0,\n backgroundColor: 'currentColor',\n opacity: 0.3\n }\n }\n }, {\n props: {\n variant: 'buffer'\n },\n style: {\n backgroundColor: 'transparent'\n }\n }, {\n props: {\n variant: 'query'\n },\n style: {\n transform: 'rotate(180deg)'\n }\n }]\n})));\nconst LinearProgressDashed = styled('span', {\n name: 'MuiLinearProgress',\n slot: 'Dashed',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.dashed, styles[`dashedColor${capitalize(ownerState.color)}`]];\n }\n})(memoTheme(({\n theme\n}) => ({\n position: 'absolute',\n marginTop: 0,\n height: '100%',\n width: '100%',\n backgroundSize: '10px 10px',\n backgroundPosition: '0 -23px',\n variants: [{\n props: {\n color: 'inherit'\n },\n style: {\n opacity: 0.3,\n backgroundImage: `radial-gradient(currentColor 0%, currentColor 16%, transparent 42%)`\n }\n }, ...Object.entries(theme.palette).filter(createSimplePaletteValueFilter()).map(([color]) => {\n const backgroundColor = getColorShade(theme, color);\n return {\n props: {\n color\n },\n style: {\n backgroundImage: `radial-gradient(${backgroundColor} 0%, ${backgroundColor} 16%, transparent 42%)`\n }\n };\n })]\n})), bufferAnimation || {\n // At runtime for Pigment CSS, `bufferAnimation` will be null and the generated keyframe will be used.\n animation: `${bufferKeyframe} 3s infinite linear`\n});\nconst LinearProgressBar1 = styled('span', {\n name: 'MuiLinearProgress',\n slot: 'Bar1',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.bar, styles[`barColor${capitalize(ownerState.color)}`], (ownerState.variant === 'indeterminate' || ownerState.variant === 'query') && styles.bar1Indeterminate, ownerState.variant === 'determinate' && styles.bar1Determinate, ownerState.variant === 'buffer' && styles.bar1Buffer];\n }\n})(memoTheme(({\n theme\n}) => ({\n width: '100%',\n position: 'absolute',\n left: 0,\n bottom: 0,\n top: 0,\n transition: 'transform 0.2s linear',\n transformOrigin: 'left',\n variants: [{\n props: {\n color: 'inherit'\n },\n style: {\n backgroundColor: 'currentColor'\n }\n }, ...Object.entries(theme.palette).filter(createSimplePaletteValueFilter()).map(([color]) => ({\n props: {\n color\n },\n style: {\n backgroundColor: (theme.vars || theme).palette[color].main\n }\n })), {\n props: {\n variant: 'determinate'\n },\n style: {\n transition: `transform .${TRANSITION_DURATION}s linear`\n }\n }, {\n props: {\n variant: 'buffer'\n },\n style: {\n zIndex: 1,\n transition: `transform .${TRANSITION_DURATION}s linear`\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.variant === 'indeterminate' || ownerState.variant === 'query',\n style: {\n width: 'auto'\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.variant === 'indeterminate' || ownerState.variant === 'query',\n style: indeterminate1Animation || {\n animation: `${indeterminate1Keyframe} 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite`\n }\n }]\n})));\nconst LinearProgressBar2 = styled('span', {\n name: 'MuiLinearProgress',\n slot: 'Bar2',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.bar, styles[`barColor${capitalize(ownerState.color)}`], (ownerState.variant === 'indeterminate' || ownerState.variant === 'query') && styles.bar2Indeterminate, ownerState.variant === 'buffer' && styles.bar2Buffer];\n }\n})(memoTheme(({\n theme\n}) => ({\n width: '100%',\n position: 'absolute',\n left: 0,\n bottom: 0,\n top: 0,\n transition: 'transform 0.2s linear',\n transformOrigin: 'left',\n variants: [...Object.entries(theme.palette).filter(createSimplePaletteValueFilter()).map(([color]) => ({\n props: {\n color\n },\n style: {\n '--LinearProgressBar2-barColor': (theme.vars || theme).palette[color].main\n }\n })), {\n props: ({\n ownerState\n }) => ownerState.variant !== 'buffer' && ownerState.color !== 'inherit',\n style: {\n backgroundColor: 'var(--LinearProgressBar2-barColor, currentColor)'\n }\n }, {\n props: {\n color: 'inherit'\n },\n style: {\n opacity: 0.3\n }\n }, ...Object.entries(theme.palette).filter(createSimplePaletteValueFilter()).map(([color]) => ({\n props: {\n color,\n variant: 'buffer'\n },\n style: {\n backgroundColor: getColorShade(theme, color),\n transition: `transform .${TRANSITION_DURATION}s linear`\n }\n })), {\n props: ({\n ownerState\n }) => ownerState.variant === 'indeterminate' || ownerState.variant === 'query',\n style: {\n width: 'auto'\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.variant === 'indeterminate' || ownerState.variant === 'query',\n style: indeterminate2Animation || {\n animation: `${indeterminate2Keyframe} 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) 1.15s infinite`\n }\n }]\n})));\n\n/**\n * ## ARIA\n *\n * If the progress bar is describing the loading progress of a particular region of a page,\n * you should use `aria-describedby` to point to the progress bar, and set the `aria-busy`\n * attribute to `true` on that region until it has finished loading.\n */\nconst LinearProgress = /*#__PURE__*/React.forwardRef(function LinearProgress(inProps, ref) {\n const props = useDefaultProps({\n props: inProps,\n name: 'MuiLinearProgress'\n });\n const {\n className,\n color = 'primary',\n value,\n valueBuffer,\n variant = 'indeterminate',\n ...other\n } = props;\n const ownerState = {\n ...props,\n color,\n variant\n };\n const classes = useUtilityClasses(ownerState);\n const isRtl = useRtl();\n const rootProps = {};\n const inlineStyles = {\n bar1: {},\n bar2: {}\n };\n if (variant === 'determinate' || variant === 'buffer') {\n if (value !== undefined) {\n rootProps['aria-valuenow'] = Math.round(value);\n rootProps['aria-valuemin'] = 0;\n rootProps['aria-valuemax'] = 100;\n let transform = value - 100;\n if (isRtl) {\n transform = -transform;\n }\n inlineStyles.bar1.transform = `translateX(${transform}%)`;\n } else if (process.env.NODE_ENV !== 'production') {\n console.error('MUI: You need to provide a value prop ' + 'when using the determinate or buffer variant of LinearProgress .');\n }\n }\n if (variant === 'buffer') {\n if (valueBuffer !== undefined) {\n let transform = (valueBuffer || 0) - 100;\n if (isRtl) {\n transform = -transform;\n }\n inlineStyles.bar2.transform = `translateX(${transform}%)`;\n } else if (process.env.NODE_ENV !== 'production') {\n console.error('MUI: You need to provide a valueBuffer prop ' + 'when using the buffer variant of LinearProgress.');\n }\n }\n return /*#__PURE__*/_jsxs(LinearProgressRoot, {\n className: clsx(classes.root, className),\n ownerState: ownerState,\n role: \"progressbar\",\n ...rootProps,\n ref: ref,\n ...other,\n children: [variant === 'buffer' ? /*#__PURE__*/_jsx(LinearProgressDashed, {\n className: classes.dashed,\n ownerState: ownerState\n }) : null, /*#__PURE__*/_jsx(LinearProgressBar1, {\n className: classes.bar1,\n ownerState: ownerState,\n style: inlineStyles.bar1\n }), variant === 'determinate' ? null : /*#__PURE__*/_jsx(LinearProgressBar2, {\n className: classes.bar2,\n ownerState: ownerState,\n style: inlineStyles.bar2\n })]\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? LinearProgress.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * The color of the component.\n * It supports both default and custom theme colors, which can be added as shown in the\n * [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).\n * @default 'primary'\n */\n color: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['inherit', 'primary', 'secondary']), PropTypes.string]),\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 /**\n * The value of the progress indicator for the determinate and buffer variants.\n * Value between 0 and 100.\n */\n value: PropTypes.number,\n /**\n * The value for the buffer variant.\n * Value between 0 and 100.\n */\n valueBuffer: PropTypes.number,\n /**\n * The variant to use.\n * Use indeterminate or query when there is no progress value.\n * @default 'indeterminate'\n */\n variant: PropTypes.oneOf(['buffer', 'determinate', 'indeterminate', 'query'])\n} : void 0;\nexport default LinearProgress;","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getLinearProgressUtilityClass(slot) {\n return generateUtilityClass('MuiLinearProgress', slot);\n}\nconst linearProgressClasses = generateUtilityClasses('MuiLinearProgress', ['root', 'colorPrimary', 'colorSecondary', 'determinate', 'indeterminate', 'buffer', 'query', 'dashed', 'dashedColorPrimary', 'dashedColorSecondary', 'bar', 'barColorPrimary', 'barColorSecondary', 'bar1Indeterminate', 'bar1Determinate', 'bar1Buffer', 'bar2Indeterminate', 'bar2Buffer']);\nexport default linearProgressClasses;","'use client';\n\nimport * as React from 'react';\nimport clsx from 'clsx';\nimport PropTypes from 'prop-types';\nimport composeClasses from '@mui/utils/composeClasses';\nimport { alpha, unstable_getUnit as getUnit, unstable_toUnitless as toUnitless } from \"../styles/index.js\";\nimport { keyframes, css, styled } from \"../zero-styled/index.js\";\nimport memoTheme from \"../utils/memoTheme.js\";\nimport { useDefaultProps } from \"../DefaultPropsProvider/index.js\";\nimport { getSkeletonUtilityClass } from \"./skeletonClasses.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n variant,\n animation,\n hasChildren,\n width,\n height\n } = ownerState;\n const slots = {\n root: ['root', variant, animation, hasChildren && 'withChildren', hasChildren && !width && 'fitContent', hasChildren && !height && 'heightAuto']\n };\n return composeClasses(slots, getSkeletonUtilityClass, classes);\n};\nconst pulseKeyframe = keyframes`\n 0% {\n opacity: 1;\n }\n\n 50% {\n opacity: 0.4;\n }\n\n 100% {\n opacity: 1;\n }\n`;\nconst waveKeyframe = keyframes`\n 0% {\n transform: translateX(-100%);\n }\n\n 50% {\n /* +0.5s of delay between each loop */\n transform: translateX(100%);\n }\n\n 100% {\n transform: translateX(100%);\n }\n`;\n\n// This implementation is for supporting both Styled-components v4+ and Pigment CSS.\n// A global animation has to be created here for Styled-components v4+ (https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#12).\n// which can be done by checking typeof indeterminate1Keyframe !== 'string' (at runtime, Pigment CSS transform keyframes`` to a string).\nconst pulseAnimation = typeof pulseKeyframe !== 'string' ? css`\n animation: ${pulseKeyframe} 2s ease-in-out 0.5s infinite;\n ` : null;\nconst waveAnimation = typeof waveKeyframe !== 'string' ? css`\n &::after {\n animation: ${waveKeyframe} 2s linear 0.5s infinite;\n }\n ` : null;\nconst SkeletonRoot = styled('span', {\n name: 'MuiSkeleton',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, styles[ownerState.variant], ownerState.animation !== false && styles[ownerState.animation], ownerState.hasChildren && styles.withChildren, ownerState.hasChildren && !ownerState.width && styles.fitContent, ownerState.hasChildren && !ownerState.height && styles.heightAuto];\n }\n})(memoTheme(({\n theme\n}) => {\n const radiusUnit = getUnit(theme.shape.borderRadius) || 'px';\n const radiusValue = toUnitless(theme.shape.borderRadius);\n return {\n display: 'block',\n // Create a \"on paper\" color with sufficient contrast retaining the color\n backgroundColor: theme.vars ? theme.vars.palette.Skeleton.bg : alpha(theme.palette.text.primary, theme.palette.mode === 'light' ? 0.11 : 0.13),\n height: '1.2em',\n variants: [{\n props: {\n variant: 'text'\n },\n style: {\n marginTop: 0,\n marginBottom: 0,\n height: 'auto',\n transformOrigin: '0 55%',\n transform: 'scale(1, 0.60)',\n borderRadius: `${radiusValue}${radiusUnit}/${Math.round(radiusValue / 0.6 * 10) / 10}${radiusUnit}`,\n '&:empty:before': {\n content: '\"\\\\00a0\"'\n }\n }\n }, {\n props: {\n variant: 'circular'\n },\n style: {\n borderRadius: '50%'\n }\n }, {\n props: {\n variant: 'rounded'\n },\n style: {\n borderRadius: (theme.vars || theme).shape.borderRadius\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.hasChildren,\n style: {\n '& > *': {\n visibility: 'hidden'\n }\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.hasChildren && !ownerState.width,\n style: {\n maxWidth: 'fit-content'\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.hasChildren && !ownerState.height,\n style: {\n height: 'auto'\n }\n }, {\n props: {\n animation: 'pulse'\n },\n style: pulseAnimation || {\n animation: `${pulseKeyframe} 2s ease-in-out 0.5s infinite`\n }\n }, {\n props: {\n animation: 'wave'\n },\n style: {\n position: 'relative',\n overflow: 'hidden',\n /* Fix bug in Safari https://bugs.webkit.org/show_bug.cgi?id=68196 */\n WebkitMaskImage: '-webkit-radial-gradient(white, black)',\n '&::after': {\n background: `linear-gradient(\n 90deg,\n transparent,\n ${(theme.vars || theme).palette.action.hover},\n transparent\n )`,\n content: '\"\"',\n position: 'absolute',\n transform: 'translateX(-100%)' /* Avoid flash during server-side hydration */,\n bottom: 0,\n left: 0,\n right: 0,\n top: 0\n }\n }\n }, {\n props: {\n animation: 'wave'\n },\n style: waveAnimation || {\n '&::after': {\n animation: `${waveKeyframe} 2s linear 0.5s infinite`\n }\n }\n }]\n };\n}));\nconst Skeleton = /*#__PURE__*/React.forwardRef(function Skeleton(inProps, ref) {\n const props = useDefaultProps({\n props: inProps,\n name: 'MuiSkeleton'\n });\n const {\n animation = 'pulse',\n className,\n component = 'span',\n height,\n style,\n variant = 'text',\n width,\n ...other\n } = props;\n const ownerState = {\n ...props,\n animation,\n component,\n variant,\n hasChildren: Boolean(other.children)\n };\n const classes = useUtilityClasses(ownerState);\n return /*#__PURE__*/_jsx(SkeletonRoot, {\n as: component,\n ref: ref,\n className: clsx(classes.root, className),\n ownerState: ownerState,\n ...other,\n style: {\n width,\n height,\n ...style\n }\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? Skeleton.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * The animation.\n * If `false` the animation effect is disabled.\n * @default 'pulse'\n */\n animation: PropTypes.oneOf(['pulse', 'wave', false]),\n /**\n * Optional children to infer width and height from.\n */\n children: PropTypes.node,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes.elementType,\n /**\n * Height of the skeleton.\n * Useful when you don't want to adapt the skeleton to a text element but for instance a card.\n */\n height: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n /**\n * @ignore\n */\n style: PropTypes.object,\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 /**\n * The type of content that will be rendered.\n * @default 'text'\n */\n variant: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['circular', 'rectangular', 'rounded', 'text']), PropTypes.string]),\n /**\n * Width of the skeleton.\n * Useful when the skeleton is inside an inline element with no width of its own.\n */\n width: PropTypes.oneOfType([PropTypes.number, PropTypes.string])\n} : void 0;\nexport default Skeleton;","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getSkeletonUtilityClass(slot) {\n return generateUtilityClass('MuiSkeleton', slot);\n}\nconst skeletonClasses = generateUtilityClasses('MuiSkeleton', ['root', 'text', 'rectangular', 'rounded', 'circular', 'pulse', 'wave', 'withChildren', 'fitContent', 'heightAuto']);\nexport default skeletonClasses;","import * as React from 'react';\nimport { localStorageAvailable } from \"../../utils/utils.js\";\nimport { useGridApiMethod } from \"../utils/index.js\";\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(`MUI X: Log level ${logLevel} not recognized.`);\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};","// Used https://gist.github.com/mudge/5830382 as a starting point.\n// See https://github.com/browserify/events/blob/master/events.js for\n// the Node.js (https://nodejs.org/api/events.html) polyfill used by webpack.\nexport class EventManager {\n constructor() {\n this.maxListeners = 20;\n this.warnOnce = false;\n this.events = {};\n }\n on(eventName, listener, options = {}) {\n let collection = this.events[eventName];\n if (!collection) {\n collection = {\n highPriority: new Map(),\n regular: new Map()\n };\n this.events[eventName] = collection;\n }\n if (options.isFirst) {\n collection.highPriority.set(listener, true);\n } else {\n collection.regular.set(listener, true);\n }\n if (process.env.NODE_ENV !== 'production') {\n const collectionSize = collection.highPriority.size + collection.regular.size;\n if (collectionSize > this.maxListeners && !this.warnOnce) {\n this.warnOnce = true;\n console.warn([`Possible EventEmitter memory leak detected. ${collectionSize} ${eventName} listeners added.`].join('\\n'));\n }\n }\n }\n removeListener(eventName, listener) {\n if (this.events[eventName]) {\n this.events[eventName].regular.delete(listener);\n this.events[eventName].highPriority.delete(listener);\n }\n }\n removeAllListeners() {\n this.events = {};\n }\n emit(eventName, ...args) {\n const collection = this.events[eventName];\n if (!collection) {\n return;\n }\n const highPriorityListeners = Array.from(collection.highPriority.keys());\n const regularListeners = Array.from(collection.regular.keys());\n for (let i = highPriorityListeners.length - 1; i >= 0; i -= 1) {\n const listener = highPriorityListeners[i];\n if (collection.highPriority.has(listener)) {\n listener.apply(this, args);\n }\n }\n for (let i = 0; i < regularListeners.length; i += 1) {\n const listener = regularListeners[i];\n if (collection.regular.has(listener)) {\n listener.apply(this, args);\n }\n }\n }\n once(eventName, listener) {\n // eslint-disable-next-line consistent-this\n const that = this;\n this.on(eventName, function oneTimeListener(...args) {\n that.removeListener(eventName, oneTimeListener);\n listener.apply(that, args);\n });\n }\n}","export class Store {\n static create(value) {\n return new Store(value);\n }\n constructor(_value) {\n this.value = void 0;\n this.listeners = void 0;\n this.subscribe = fn => {\n this.listeners.add(fn);\n return () => {\n this.listeners.delete(fn);\n };\n };\n this.getSnapshot = () => {\n return this.value;\n };\n this.update = value => {\n this.value = value;\n this.listeners.forEach(l => l(value));\n };\n this.value = _value;\n this.listeners = new Set();\n }\n}","import * as React from 'react';\nimport { EventManager } from '@mui/x-internals/EventManager';\nimport { Store } from \"../../utils/Store.js\";\nimport { useGridApiMethod } from \"../utils/useGridApiMethod.js\";\nimport { GridSignature } from \"../utils/useGridApiEventHandler.js\";\nconst SYMBOL_API_PRIVATE = Symbol('mui.api_private');\nconst isSyntheticEvent = event => {\n return event.isPropagationStopped !== undefined;\n};\nexport function unwrapPrivateAPI(publicApi) {\n return publicApi[SYMBOL_API_PRIVATE];\n}\nlet globalId = 0;\nfunction createPrivateAPI(publicApiRef) {\n const existingPrivateApi = publicApiRef.current?.[SYMBOL_API_PRIVATE];\n if (existingPrivateApi) {\n return existingPrivateApi;\n }\n const state = {};\n const privateApi = {\n state,\n store: Store.create(state),\n instanceId: {\n id: globalId\n }\n };\n globalId += 1;\n privateApi.getPublicApi = () => publicApiRef.current;\n privateApi.register = (visibility, methods) => {\n Object.keys(methods).forEach(methodName => {\n const method = methods[methodName];\n const currentPrivateMethod = privateApi[methodName];\n if (currentPrivateMethod?.spying === true) {\n currentPrivateMethod.target = method;\n } else {\n privateApi[methodName] = method;\n }\n if (visibility === 'public') {\n const publicApi = publicApiRef.current;\n const currentPublicMethod = publicApi[methodName];\n if (currentPublicMethod?.spying === true) {\n currentPublicMethod.target = method;\n } else {\n publicApi[methodName] = method;\n }\n }\n });\n };\n privateApi.register('private', {\n caches: {},\n eventManager: new EventManager()\n });\n return privateApi;\n}\nfunction createPublicAPI(privateApiRef) {\n const publicApi = {\n get state() {\n return privateApiRef.current.state;\n },\n get store() {\n return privateApiRef.current.store;\n },\n get instanceId() {\n return privateApiRef.current.instanceId;\n },\n [SYMBOL_API_PRIVATE]: privateApiRef.current\n };\n return publicApi;\n}\nexport function useGridApiInitialization(inputApiRef, props) {\n const publicApiRef = React.useRef();\n const privateApiRef = React.useRef();\n if (!privateApiRef.current) {\n privateApiRef.current = createPrivateAPI(publicApiRef);\n }\n if (!publicApiRef.current) {\n publicApiRef.current = createPublicAPI(privateApiRef);\n }\n const publishEvent = React.useCallback((...args) => {\n const [name, params, event = {}] = args;\n event.defaultMuiPrevented = false;\n if (isSyntheticEvent(event) && event.isPropagationStopped()) {\n return;\n }\n const details = props.signature === GridSignature.DataGridPro || props.signature === GridSignature.DataGridPremium ? {\n api: privateApiRef.current.getPublicApi()\n } : {};\n privateApiRef.current.eventManager.emit(name, params, event, details);\n }, [privateApiRef, props.signature]);\n const subscribeEvent = React.useCallback((event, handler, options) => {\n privateApiRef.current.eventManager.on(event, handler, options);\n const api = privateApiRef.current;\n return () => {\n api.eventManager.removeListener(event, handler);\n };\n }, [privateApiRef]);\n useGridApiMethod(privateApiRef, {\n subscribeEvent,\n publishEvent\n }, 'public');\n if (inputApiRef && !inputApiRef.current?.state) {\n inputApiRef.current = publicApiRef.current;\n }\n React.useImperativeHandle(inputApiRef, () => publicApiRef.current, [publicApiRef]);\n React.useEffect(() => {\n const api = privateApiRef.current;\n return () => {\n api.publishEvent('unmount');\n };\n }, [privateApiRef]);\n return privateApiRef;\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\";\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 };","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 _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.js\";\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 };\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());\n runAppliers(groupCache);\n }\n return () => {\n cache.current[group].processors.delete(id);\n cache.current[group].processorsAsArray = Array.from(cache.current[group].processors.values());\n };\n }, [runAppliers]);\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 };\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 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 };\n const preProcessingPublicApi = {\n unstable_applyPipeProcessors: applyPipeProcessors\n };\n useGridApiMethod(apiRef, preProcessingPrivateApi, 'private');\n useGridApiMethod(apiRef, preProcessingPublicApi, 'public');\n};","import _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.js\";\nexport const GRID_DEFAULT_STRATEGY = 'none';\nexport const GRID_STRATEGIES_PROCESSORS = {\n rowTreeCreation: 'rowTree',\n filtering: 'rowTree',\n sorting: 'rowTree',\n visibleRowsLookupCreation: '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 * For now, there is only one strategy group named `rowTree` which customize\n * - row tree creation algorithm.\n * - sorting algorithm.\n * - filtering algorithm.\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(\"Can't apply a strategy processor before defining an active strategy\");\n }\n const groupCache = strategiesCache.current[processorName];\n if (!groupCache || !groupCache[activeStrategy]) {\n throw new Error(`No processor found for processor \"${processorName}\" on strategy \"${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};","import { useGridRefs } from \"./useGridRefs.js\";\nimport { useGridIsRtl } from \"./useGridIsRtl.js\";\nimport { useGridLoggerFactory } from \"./useGridLoggerFactory.js\";\nimport { useGridApiInitialization } from \"./useGridApiInitialization.js\";\nimport { useGridLocaleText } from \"./useGridLocaleText.js\";\nimport { useGridPipeProcessing } from \"./pipeProcessing/index.js\";\nimport { useGridStrategyProcessing } from \"./strategyProcessing/index.js\";\nimport { useGridStateInitialization } from \"./useGridStateInitialization.js\";\n\n/**\n * Initialize the technical pieces of the DataGrid (logger, state, ...) that any DataGrid implementation needs\n */\nexport const useGridInitialization = (inputApiRef, props) => {\n const privateApiRef = useGridApiInitialization(inputApiRef, props);\n useGridRefs(privateApiRef);\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 return privateApiRef;\n};","import * 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 columnHeadersContainerRef = React.useRef(null);\n apiRef.current.register('public', {\n rootElementRef\n });\n apiRef.current.register('private', {\n mainElementRef,\n virtualScrollerRef,\n columnHeadersContainerRef\n });\n};","import _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 _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport { useGridApiMethod } from \"../utils/index.js\";\nimport { isFunction } from \"../../utils/utils.js\";\nexport const useGridStateInitialization = apiRef => {\n const controlStateMapRef = React.useRef({});\n const [, rawForceUpdate] = React.useState();\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 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.current.state, apiRef.current.instanceId);\n const newSubState = controlState.stateSelector(newState, apiRef.current.instanceId);\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(`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.`);\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(newState, apiRef.current.instanceId);\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 forceUpdate = React.useCallback(() => rawForceUpdate(() => apiRef.current.state), [apiRef]);\n const publicStateApi = {\n setState,\n forceUpdate\n };\n const privateStateApi = {\n updateControlState,\n registerControlState\n };\n useGridApiMethod(apiRef, publicStateApi, 'public');\n useGridApiMethod(apiRef, privateStateApi, 'private');\n};","import * 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(`Missing translation for key ${key}.`);\n }\n return props.localeText[key];\n }, [props.localeText]);\n apiRef.current.register('public', {\n getLocaleText\n });\n};","import * as React from 'react';\nexport const useGridInitializeState = (initializer, privateApiRef, props) => {\n const isInitialized = React.useRef(false);\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.js\";\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 constructor(options) {\n this.options = void 0;\n this.rowString = '';\n this.isEmpty = true;\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 (process.env.NODE_ENV !== 'production') {\n if (String(cellParams.formattedValue) === '[object Object]') {\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 { useGridApiOptionHandler, useGridNativeEventListener } from \"../../utils/index.js\";\nimport { gridFocusCellSelector } from \"../focus/gridFocusStateSelector.js\";\nimport { serializeCellValue } from \"../export/serializers/csvSerializer.js\";\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 <iframe> that is not displayed Firefox will return null.\n if (window.getSelection()?.toString()) {\n return true;\n }\n\n // window.getSelection() returns an empty string in Firefox for selections inside a form element.\n // See: https://bugzilla.mozilla.org/show_bug.cgi?id=85686.\n // Instead, we can use element.selectionStart that is only defined on form elements.\n if (element && (element.selectionEnd || 0) - (element.selectionStart || 0) > 0) {\n return true;\n }\n return false;\n}\n\n/**\n * @requires useGridCsvExport (method)\n * @requires useGridSelection (method)\n */\nexport const useGridClipboard = (apiRef, props) => {\n const ignoreValueFormatterProp = props.ignoreValueFormatterDuringExport;\n const ignoreValueFormatter = (typeof ignoreValueFormatterProp === 'object' ? ignoreValueFormatterProp?.clipboardExport : ignoreValueFormatterProp) || false;\n const clipboardCopyCellDelimiter = props.clipboardCopyCellDelimiter;\n const handleCopy = React.useCallback(event => {\n if (!((event.ctrlKey || event.metaKey) && event.key.toLowerCase() === 'c' && !event.shiftKey && !event.altKey)) {\n return;\n }\n\n // Do nothing if there's a native selection\n if (hasNativeSelection(event.target)) {\n return;\n }\n let textToCopy = '';\n const selectedRows = apiRef.current.getSelectedRows();\n if (selectedRows.size > 0) {\n textToCopy = apiRef.current.getDataAsCsv({\n includeHeaders: false,\n delimiter: clipboardCopyCellDelimiter,\n shouldAppendQuotes: false,\n escapeFormulas: false\n });\n } else {\n const focusedCell = gridFocusCellSelector(apiRef);\n if (focusedCell) {\n const cellParams = apiRef.current.getCellParams(focusedCell.id, focusedCell.field);\n textToCopy = serializeCellValue(cellParams, {\n csvOptions: {\n delimiter: clipboardCopyCellDelimiter,\n shouldAppendQuotes: false,\n escapeFormulas: false\n },\n ignoreValueFormatter\n });\n }\n }\n textToCopy = apiRef.current.unstable_applyPipeProcessors('clipboardCopy', textToCopy);\n if (textToCopy) {\n copyToClipboard(textToCopy);\n apiRef.current.publishEvent('clipboardCopy', textToCopy);\n }\n }, [apiRef, ignoreValueFormatter, clipboardCopyCellDelimiter]);\n useGridNativeEventListener(apiRef, apiRef.current.rootElementRef, 'keydown', handleCopy);\n useGridApiOptionHandler(apiRef, 'clipboardCopy', props.onClipboardCopy);\n};","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport { useGridLogger, useGridApiMethod, useGridApiEventHandler } from \"../../utils/index.js\";\nimport { gridColumnMenuSelector } from \"./columnMenuSelector.js\";\nimport { gridColumnLookupSelector, gridColumnVisibilityModelSelector, gridColumnFieldsSelector } from \"../columns/gridColumnsSelector.js\";\nexport const columnMenuStateInitializer = state => _extends({}, state, {\n columnMenu: {\n open: false\n }\n});\n\n/**\n * @requires useGridColumnResize (event)\n * @requires useGridInfiniteLoader (event)\n */\nexport const useGridColumnMenu = apiRef => {\n const logger = useGridLogger(apiRef, 'useGridColumnMenu');\n\n /**\n * API METHODS\n */\n const showColumnMenu = React.useCallback(field => {\n const columnMenuState = gridColumnMenuSelector(apiRef.current.state);\n const newState = {\n open: true,\n field\n };\n const shouldUpdate = newState.open !== columnMenuState.open || newState.field !== columnMenuState.field;\n if (shouldUpdate) {\n apiRef.current.setState(state => {\n if (state.columnMenu.open && state.columnMenu.field === field) {\n return state;\n }\n logger.debug('Opening Column Menu');\n return _extends({}, state, {\n columnMenu: {\n open: true,\n field\n }\n });\n });\n apiRef.current.hidePreferences();\n apiRef.current.forceUpdate();\n }\n }, [apiRef, logger]);\n const hideColumnMenu = React.useCallback(() => {\n const columnMenuState = gridColumnMenuSelector(apiRef.current.state);\n if (columnMenuState.field) {\n const columnLookup = gridColumnLookupSelector(apiRef);\n const columnVisibilityModel = gridColumnVisibilityModelSelector(apiRef);\n const orderedFields = gridColumnFieldsSelector(apiRef);\n let fieldToFocus = columnMenuState.field;\n\n // If the column was removed from the grid, we need to find the closest visible field\n if (!columnLookup[fieldToFocus]) {\n fieldToFocus = orderedFields[0];\n }\n\n // If the field to focus is hidden, we need to find the closest visible field\n if (columnVisibilityModel[fieldToFocus] === false) {\n // contains visible column fields + the field that was just hidden\n const visibleOrderedFields = orderedFields.filter(field => {\n if (field === fieldToFocus) {\n return true;\n }\n return columnVisibilityModel[field] !== false;\n });\n const fieldIndex = visibleOrderedFields.indexOf(fieldToFocus);\n fieldToFocus = visibleOrderedFields[fieldIndex + 1] || visibleOrderedFields[fieldIndex - 1];\n }\n apiRef.current.setColumnHeaderFocus(fieldToFocus);\n }\n const newState = {\n open: false,\n field: undefined\n };\n const shouldUpdate = newState.open !== columnMenuState.open || newState.field !== columnMenuState.field;\n if (shouldUpdate) {\n apiRef.current.setState(state => {\n logger.debug('Hiding Column Menu');\n return _extends({}, state, {\n columnMenu: newState\n });\n });\n apiRef.current.forceUpdate();\n }\n }, [apiRef, logger]);\n const toggleColumnMenu = React.useCallback(field => {\n logger.debug('Toggle Column Menu');\n const columnMenu = gridColumnMenuSelector(apiRef.current.state);\n if (!columnMenu.open || columnMenu.field !== field) {\n showColumnMenu(field);\n } else {\n hideColumnMenu();\n }\n }, [apiRef, logger, showColumnMenu, hideColumnMenu]);\n const columnMenuApi = {\n showColumnMenu,\n hideColumnMenu,\n toggleColumnMenu\n };\n useGridApiMethod(apiRef, columnMenuApi, 'public');\n useGridApiEventHandler(apiRef, 'columnResizeStart', hideColumnMenu);\n useGridApiEventHandler(apiRef, 'virtualScrollerWheel', apiRef.current.hideColumnMenu);\n useGridApiEventHandler(apiRef, 'virtualScrollerTouchMove', apiRef.current.hideColumnMenu);\n};","import * as React from 'react';\nimport { useFirstRender } from \"../../utils/useFirstRender.js\";\nexport const useGridRegisterPipeProcessor = (apiRef, group, callback) => {\n const cleanup = React.useRef();\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 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 * as React from 'react';\nimport { useFirstRender } from \"../../utils/useFirstRender.js\";\nexport const useGridRegisterPipeApplier = (apiRef, group, callback) => {\n const cleanup = React.useRef();\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 * as React from 'react';\nimport { useGridApiMethod } from \"../../utils/useGridApiMethod.js\";\nimport { useGridLogger } from \"../../utils/useGridLogger.js\";\nimport { gridColumnFieldsSelector, gridColumnDefinitionsSelector, gridColumnLookupSelector, gridColumnsStateSelector, gridColumnVisibilityModelSelector, gridVisibleColumnDefinitionsSelector, gridColumnPositionsSelector } from \"./gridColumnsSelector.js\";\nimport { GridSignature, useGridApiEventHandler } from \"../../utils/useGridApiEventHandler.js\";\nimport { useGridRegisterPipeProcessor, useGridRegisterPipeApplier } from \"../../core/pipeProcessing/index.js\";\nimport { EMPTY_PINNED_COLUMN_FIELDS } from \"./gridColumnsInterfaces.js\";\nimport { hydrateColumnsWidth, createColumnsState, COLUMNS_DIMENSION_PROPERTIES } from \"./gridColumnsUtils.js\";\nimport { GridPreferencePanelsValue } from \"../preferencesPanel/index.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport const columnsStateInitializer = (state, props, apiRef) => {\n const columnsState = createColumnsState({\n apiRef,\n columnsToUpsert: props.columns,\n initialState: props.initialState?.columns,\n columnVisibilityModel: props.columnVisibilityModel ?? props.initialState?.columns?.columnVisibilityModel ?? {},\n keepOnlyColumnsToUpsert: true\n });\n return _extends({}, state, {\n columns: columnsState,\n // In pro/premium, this part of the state is defined. We give it an empty but defined value\n // for the community version.\n pinnedColumns: state.pinnedColumns ?? EMPTY_PINNED_COLUMN_FIELDS\n });\n};\n\n/**\n * @requires useGridParamsApi (method)\n * @requires useGridDimensions (method, event) - can be after\n * TODO: Impossible priority - useGridParamsApi also needs to be after useGridColumns\n */\nexport function useGridColumns(apiRef, props) {\n const logger = useGridLogger(apiRef, 'useGridColumns');\n const previousColumnsProp = React.useRef(props.columns);\n apiRef.current.registerControlState({\n stateId: 'visibleColumns',\n propModel: props.columnVisibilityModel,\n propOnChange: props.onColumnVisibilityModelChange,\n stateSelector: gridColumnVisibilityModelSelector,\n changeEvent: 'columnVisibilityModelChange'\n });\n const setGridColumnsState = React.useCallback(columnsState => {\n logger.debug('Updating columns state.');\n apiRef.current.setState(mergeColumnsState(columnsState));\n apiRef.current.publishEvent('columnsChange', columnsState.orderedFields);\n apiRef.current.updateRenderContext?.();\n apiRef.current.forceUpdate();\n }, [logger, apiRef]);\n\n /**\n * API METHODS\n */\n const getColumn = React.useCallback(field => gridColumnLookupSelector(apiRef)[field], [apiRef]);\n const getAllColumns = React.useCallback(() => gridColumnDefinitionsSelector(apiRef), [apiRef]);\n const getVisibleColumns = React.useCallback(() => gridVisibleColumnDefinitionsSelector(apiRef), [apiRef]);\n const getColumnIndex = React.useCallback((field, useVisibleColumns = true) => {\n const columns = useVisibleColumns ? gridVisibleColumnDefinitionsSelector(apiRef) : gridColumnDefinitionsSelector(apiRef);\n return columns.findIndex(col => col.field === field);\n }, [apiRef]);\n const getColumnPosition = React.useCallback(field => {\n const index = getColumnIndex(field);\n return gridColumnPositionsSelector(apiRef)[index];\n }, [apiRef, getColumnIndex]);\n const setColumnVisibilityModel = React.useCallback(model => {\n const currentModel = gridColumnVisibilityModelSelector(apiRef);\n if (currentModel !== model) {\n apiRef.current.setState(state => _extends({}, state, {\n columns: createColumnsState({\n apiRef,\n columnsToUpsert: [],\n initialState: undefined,\n columnVisibilityModel: model,\n keepOnlyColumnsToUpsert: false\n })\n }));\n apiRef.current.updateRenderContext?.();\n apiRef.current.forceUpdate();\n }\n }, [apiRef]);\n const updateColumns = React.useCallback(columns => {\n const columnsState = createColumnsState({\n apiRef,\n columnsToUpsert: columns,\n initialState: undefined,\n keepOnlyColumnsToUpsert: false\n });\n setGridColumnsState(columnsState);\n }, [apiRef, setGridColumnsState]);\n const setColumnVisibility = React.useCallback((field, isVisible) => {\n const columnVisibilityModel = gridColumnVisibilityModelSelector(apiRef);\n const isCurrentlyVisible = columnVisibilityModel[field] ?? true;\n if (isVisible !== isCurrentlyVisible) {\n const newModel = _extends({}, columnVisibilityModel, {\n [field]: isVisible\n });\n apiRef.current.setColumnVisibilityModel(newModel);\n }\n }, [apiRef]);\n const getColumnIndexRelativeToVisibleColumns = React.useCallback(field => {\n const allColumns = gridColumnFieldsSelector(apiRef);\n return allColumns.findIndex(col => col === field);\n }, [apiRef]);\n const setColumnIndex = React.useCallback((field, targetIndexPosition) => {\n const allColumns = gridColumnFieldsSelector(apiRef);\n const oldIndexPosition = getColumnIndexRelativeToVisibleColumns(field);\n if (oldIndexPosition === targetIndexPosition) {\n return;\n }\n logger.debug(`Moving column ${field} to index ${targetIndexPosition}`);\n const updatedColumns = [...allColumns];\n const fieldRemoved = updatedColumns.splice(oldIndexPosition, 1)[0];\n updatedColumns.splice(targetIndexPosition, 0, fieldRemoved);\n setGridColumnsState(_extends({}, gridColumnsStateSelector(apiRef.current.state), {\n orderedFields: updatedColumns\n }));\n const params = {\n column: apiRef.current.getColumn(field),\n targetIndex: apiRef.current.getColumnIndexRelativeToVisibleColumns(field),\n oldIndex: oldIndexPosition\n };\n apiRef.current.publishEvent('columnIndexChange', params);\n }, [apiRef, logger, setGridColumnsState, getColumnIndexRelativeToVisibleColumns]);\n const setColumnWidth = React.useCallback((field, width) => {\n logger.debug(`Updating column ${field} width to ${width}`);\n const columnsState = gridColumnsStateSelector(apiRef.current.state);\n const column = columnsState.lookup[field];\n const newColumn = _extends({}, column, {\n width,\n hasBeenResized: true\n });\n setGridColumnsState(hydrateColumnsWidth(_extends({}, columnsState, {\n lookup: _extends({}, columnsState.lookup, {\n [field]: newColumn\n })\n }), apiRef.current.getRootDimensions()));\n apiRef.current.publishEvent('columnWidthChange', {\n element: apiRef.current.getColumnHeaderElement(field),\n colDef: newColumn,\n width\n });\n }, [apiRef, logger, setGridColumnsState]);\n const columnApi = {\n getColumn,\n getAllColumns,\n getColumnIndex,\n getColumnPosition,\n getVisibleColumns,\n getColumnIndexRelativeToVisibleColumns,\n updateColumns,\n setColumnVisibilityModel,\n setColumnVisibility,\n setColumnWidth\n };\n const columnReorderApi = {\n setColumnIndex\n };\n useGridApiMethod(apiRef, columnApi, 'public');\n useGridApiMethod(apiRef, columnReorderApi, props.signature === GridSignature.DataGrid ? 'private' : 'public');\n\n /**\n * PRE-PROCESSING\n */\n const stateExportPreProcessing = React.useCallback((prevState, context) => {\n const columnsStateToExport = {};\n const columnVisibilityModelToExport = gridColumnVisibilityModelSelector(apiRef);\n const shouldExportColumnVisibilityModel =\n // Always export if the `exportOnlyDirtyModels` property is not activated\n !context.exportOnlyDirtyModels ||\n // Always export if the model is controlled\n props.columnVisibilityModel != null ||\n // Always export if the model has been initialized\n // TODO v6 Do a nullish check instead to export even if the initial model equals \"{}\"\n Object.keys(props.initialState?.columns?.columnVisibilityModel ?? {}).length > 0 ||\n // Always export if the model is not empty\n Object.keys(columnVisibilityModelToExport).length > 0;\n if (shouldExportColumnVisibilityModel) {\n columnsStateToExport.columnVisibilityModel = columnVisibilityModelToExport;\n }\n columnsStateToExport.orderedFields = gridColumnFieldsSelector(apiRef);\n const columns = gridColumnDefinitionsSelector(apiRef);\n const dimensions = {};\n columns.forEach(colDef => {\n if (colDef.hasBeenResized) {\n const colDefDimensions = {};\n COLUMNS_DIMENSION_PROPERTIES.forEach(propertyName => {\n let propertyValue = colDef[propertyName];\n if (propertyValue === Infinity) {\n propertyValue = -1;\n }\n colDefDimensions[propertyName] = propertyValue;\n });\n dimensions[colDef.field] = colDefDimensions;\n }\n });\n if (Object.keys(dimensions).length > 0) {\n columnsStateToExport.dimensions = dimensions;\n }\n return _extends({}, prevState, {\n columns: columnsStateToExport\n });\n }, [apiRef, props.columnVisibilityModel, props.initialState?.columns]);\n const stateRestorePreProcessing = React.useCallback((params, context) => {\n const columnVisibilityModelToImport = context.stateToRestore.columns?.columnVisibilityModel;\n const initialState = context.stateToRestore.columns;\n if (columnVisibilityModelToImport == null && initialState == null) {\n return params;\n }\n const columnsState = createColumnsState({\n apiRef,\n columnsToUpsert: [],\n initialState,\n columnVisibilityModel: columnVisibilityModelToImport,\n keepOnlyColumnsToUpsert: false\n });\n apiRef.current.setState(mergeColumnsState(columnsState));\n if (initialState != null) {\n apiRef.current.publishEvent('columnsChange', columnsState.orderedFields);\n }\n return params;\n }, [apiRef]);\n const preferencePanelPreProcessing = React.useCallback((initialValue, value) => {\n if (value === GridPreferencePanelsValue.columns) {\n const ColumnsPanel = props.slots.columnsPanel;\n return /*#__PURE__*/_jsx(ColumnsPanel, _extends({}, props.slotProps?.columnsPanel));\n }\n return initialValue;\n }, [props.slots.columnsPanel, props.slotProps?.columnsPanel]);\n const addColumnMenuItems = React.useCallback(columnMenuItems => {\n if (props.disableColumnSelector) {\n return columnMenuItems;\n }\n return [...columnMenuItems, 'columnMenuColumnsItem'];\n }, [props.disableColumnSelector]);\n useGridRegisterPipeProcessor(apiRef, 'columnMenu', addColumnMenuItems);\n useGridRegisterPipeProcessor(apiRef, 'exportState', stateExportPreProcessing);\n useGridRegisterPipeProcessor(apiRef, 'restoreState', stateRestorePreProcessing);\n useGridRegisterPipeProcessor(apiRef, 'preferencePanel', preferencePanelPreProcessing);\n\n /*\n * EVENTS\n */\n\n const prevInnerWidth = React.useRef(null);\n const handleGridSizeChange = viewportInnerSize => {\n if (prevInnerWidth.current !== viewportInnerSize.width) {\n prevInnerWidth.current = viewportInnerSize.width;\n setGridColumnsState(hydrateColumnsWidth(gridColumnsStateSelector(apiRef.current.state), apiRef.current.getRootDimensions()));\n }\n };\n useGridApiEventHandler(apiRef, 'viewportInnerSizeChange', handleGridSizeChange);\n\n /**\n * APPLIERS\n */\n const hydrateColumns = React.useCallback(() => {\n logger.info(`Columns pipe processing have changed, regenerating the columns`);\n const columnsState = createColumnsState({\n apiRef,\n columnsToUpsert: [],\n initialState: undefined,\n keepOnlyColumnsToUpsert: false\n });\n setGridColumnsState(columnsState);\n }, [apiRef, logger, setGridColumnsState]);\n useGridRegisterPipeApplier(apiRef, 'hydrateColumns', hydrateColumns);\n\n /*\n * EFFECTS\n */\n // The effect do not track any value defined synchronously during the 1st render by hooks called after `useGridColumns`\n // As a consequence, the state generated by the 1st run of this useEffect will always be equal to the initialization one\n const isFirstRender = React.useRef(true);\n React.useEffect(() => {\n if (isFirstRender.current) {\n isFirstRender.current = false;\n return;\n }\n logger.info(`GridColumns have changed, new length ${props.columns.length}`);\n if (previousColumnsProp.current === props.columns) {\n return;\n }\n const columnsState = createColumnsState({\n apiRef,\n initialState: undefined,\n // If the user provides a model, we don't want to set it in the state here because it has it's dedicated `useEffect` which calls `setColumnVisibilityModel`\n columnsToUpsert: props.columns,\n keepOnlyColumnsToUpsert: true\n });\n previousColumnsProp.current = props.columns;\n setGridColumnsState(columnsState);\n }, [logger, apiRef, setGridColumnsState, props.columns]);\n React.useEffect(() => {\n if (props.columnVisibilityModel !== undefined) {\n apiRef.current.setColumnVisibilityModel(props.columnVisibilityModel);\n }\n }, [apiRef, logger, props.columnVisibilityModel]);\n}\nfunction mergeColumnsState(columnsState) {\n return state => _extends({}, state, {\n columns: columnsState\n });\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport useEventCallback from '@mui/utils/useEventCallback';\nimport { useGridLogger } from \"../../utils/useGridLogger.js\";\nimport { useGridApiMethod } from \"../../utils/useGridApiMethod.js\";\nimport { gridDensitySelector } from \"./densitySelector.js\";\nimport { useGridRegisterPipeProcessor } from \"../../core/pipeProcessing/index.js\";\nexport const densityStateInitializer = (state, props) => _extends({}, state, {\n density: props.initialState?.density ?? props.density ?? 'standard'\n});\nexport const useGridDensity = (apiRef, props) => {\n const logger = useGridLogger(apiRef, 'useDensity');\n apiRef.current.registerControlState({\n stateId: 'density',\n propModel: props.density,\n propOnChange: props.onDensityChange,\n stateSelector: gridDensitySelector,\n changeEvent: 'densityChange'\n });\n const setDensity = useEventCallback(newDensity => {\n const currentDensity = gridDensitySelector(apiRef.current.state);\n if (currentDensity === newDensity) {\n return;\n }\n logger.debug(`Set grid density to ${newDensity}`);\n apiRef.current.setState(state => _extends({}, state, {\n density: newDensity\n }));\n });\n const densityApi = {\n setDensity\n };\n useGridApiMethod(apiRef, densityApi, 'public');\n const stateExportPreProcessing = React.useCallback((prevState, context) => {\n const exportedDensity = gridDensitySelector(apiRef.current.state);\n const shouldExportRowCount =\n // Always export if the `exportOnlyDirtyModels` property is not activated\n !context.exportOnlyDirtyModels ||\n // Always export if the `density` is controlled\n props.density != null ||\n // Always export if the `density` has been initialized\n props.initialState?.density != null;\n if (!shouldExportRowCount) {\n return prevState;\n }\n return _extends({}, prevState, {\n density: exportedDensity\n });\n }, [apiRef, props.density, props.initialState?.density]);\n const stateRestorePreProcessing = React.useCallback((params, context) => {\n const restoredDensity = context.stateToRestore?.density ? context.stateToRestore.density : gridDensitySelector(apiRef.current.state);\n apiRef.current.setState(state => _extends({}, state, {\n density: restoredDensity\n }));\n return params;\n }, [apiRef]);\n useGridRegisterPipeProcessor(apiRef, 'exportState', stateExportPreProcessing);\n useGridRegisterPipeProcessor(apiRef, 'restoreState', stateRestorePreProcessing);\n React.useEffect(() => {\n if (props.density) {\n apiRef.current.setDensity(props.density);\n }\n }, [apiRef, props.density]);\n};","import { gridColumnDefinitionsSelector, gridVisibleColumnDefinitionsSelector } from \"../columns/index.js\";\nimport { gridFilteredSortedRowIdsSelector } from \"../filter/index.js\";\nimport { gridPinnedRowsSelector, gridRowTreeSelector } from \"../rows/gridRowsSelector.js\";\nexport const getColumnsToExport = ({\n apiRef,\n options\n}) => {\n const columns = gridColumnDefinitionsSelector(apiRef);\n if (options.fields) {\n return options.fields.reduce((currentColumns, field) => {\n const column = columns.find(col => col.field === field);\n if (column) {\n currentColumns.push(column);\n }\n return currentColumns;\n }, []);\n }\n const validColumns = options.allColumns ? columns : gridVisibleColumnDefinitionsSelector(apiRef);\n return validColumns.filter(column => !column.disableExport);\n};\nexport const defaultGetRowsToExport = ({\n apiRef\n}) => {\n const filteredSortedRowIds = gridFilteredSortedRowIdsSelector(apiRef);\n const rowTree = gridRowTreeSelector(apiRef);\n const selectedRows = apiRef.current.getSelectedRows();\n const bodyRows = filteredSortedRowIds.filter(id => rowTree[id].type !== 'footer');\n const pinnedRows = gridPinnedRowsSelector(apiRef);\n const topPinnedRowsIds = pinnedRows?.top?.map(row => row.id) || [];\n const bottomPinnedRowsIds = pinnedRows?.bottom?.map(row => row.id) || [];\n bodyRows.unshift(...topPinnedRowsIds);\n bodyRows.push(...bottomPinnedRowsIds);\n if (selectedRows.size > 0) {\n return bodyRows.filter(id => selectedRows.has(id));\n }\n return bodyRows;\n};","import * as React from 'react';\nimport { useGridApiMethod } from \"../../utils/useGridApiMethod.js\";\nimport { useGridLogger } from \"../../utils/useGridLogger.js\";\nimport { exportAs } from \"../../../utils/exportAs.js\";\nimport { buildCSV } from \"./serializers/csvSerializer.js\";\nimport { getColumnsToExport, defaultGetRowsToExport } from \"./utils.js\";\nimport { useGridRegisterPipeProcessor } from \"../../core/pipeProcessing/index.js\";\nimport { GridCsvExportMenuItem } from \"../../../components/toolbar/GridToolbarExport.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\n/**\n * @requires useGridColumns (state)\n * @requires useGridFilter (state)\n * @requires useGridSorting (state)\n * @requires useGridSelection (state)\n * @requires useGridParamsApi (method)\n */\nexport const useGridCsvExport = (apiRef, props) => {\n const logger = useGridLogger(apiRef, 'useGridCsvExport');\n const ignoreValueFormatterProp = props.ignoreValueFormatterDuringExport;\n const ignoreValueFormatter = (typeof ignoreValueFormatterProp === 'object' ? ignoreValueFormatterProp?.csvExport : ignoreValueFormatterProp) || false;\n const getDataAsCsv = React.useCallback((options = {}) => {\n logger.debug(`Get data as CSV`);\n const exportedColumns = getColumnsToExport({\n apiRef,\n options\n });\n const getRowsToExport = options.getRowsToExport ?? defaultGetRowsToExport;\n const exportedRowIds = getRowsToExport({\n apiRef\n });\n return buildCSV({\n columns: exportedColumns,\n rowIds: exportedRowIds,\n csvOptions: {\n delimiter: options.delimiter || ',',\n shouldAppendQuotes: options.shouldAppendQuotes ?? true,\n includeHeaders: options.includeHeaders ?? true,\n includeColumnGroupsHeaders: options.includeColumnGroupsHeaders ?? true,\n escapeFormulas: options.escapeFormulas ?? true\n },\n ignoreValueFormatter,\n apiRef\n });\n }, [logger, apiRef, ignoreValueFormatter]);\n const exportDataAsCsv = React.useCallback(options => {\n logger.debug(`Export data as CSV`);\n const csv = getDataAsCsv(options);\n const blob = new Blob([options?.utf8WithBom ? new Uint8Array([0xef, 0xbb, 0xbf]) : '', csv], {\n type: 'text/csv'\n });\n exportAs(blob, 'csv', options?.fileName);\n }, [logger, getDataAsCsv]);\n const csvExportApi = {\n getDataAsCsv,\n exportDataAsCsv\n };\n useGridApiMethod(apiRef, csvExportApi, 'public');\n\n /**\n * PRE-PROCESSING\n */\n const addExportMenuButtons = React.useCallback((initialValue, options) => {\n if (options.csvOptions?.disableToolbarButton) {\n return initialValue;\n }\n return [...initialValue, {\n component: /*#__PURE__*/_jsx(GridCsvExportMenuItem, {\n options: options.csvOptions\n }),\n componentName: 'csvExport'\n }];\n }, []);\n useGridRegisterPipeProcessor(apiRef, 'exportMenu', addExportMenuButtons);\n};","/**\n * I have hesitated to use https://github.com/eligrey/FileSaver.js.\n * If we get bug reports that this project solves, we should consider using it.\n *\n * Related resources.\n * https://blog.logrocket.com/programmatic-file-downloads-in-the-browser-9a5186298d5c/\n * https://github.com/mbrn/filefy/blob/ec4ed0b7415d93be7158c23029f2ea1fa0b8e2d9/src/core/BaseBuilder.ts\n * https://unpkg.com/browse/@progress/kendo-file-saver@1.0.7/dist/es/save-as.js\n * https://github.com/ag-grid/ag-grid/blob/9565c219b6210aa85fa833c929d0728f9d163a91/community-modules/csv-export/src/csvExport/downloader.ts\n */\n\nexport function exportAs(blob, extension = 'csv', filename = document.title || 'untitled') {\n const fullName = `${filename}.${extension}`;\n\n // Test download attribute first\n // https://github.com/eligrey/FileSaver.js/issues/193\n if ('download' in HTMLAnchorElement.prototype) {\n // Create an object URL for the blob object\n const url = URL.createObjectURL(blob);\n\n // Create a new anchor element\n const a = document.createElement('a');\n a.href = url;\n a.download = fullName;\n\n // Programmatically trigger a click on the anchor element\n // Useful if you want the download to happen automatically\n // Without attaching the anchor element to the DOM\n a.click();\n\n // https://github.com/eligrey/FileSaver.js/issues/205\n setTimeout(() => {\n URL.revokeObjectURL(url);\n });\n return;\n }\n throw new Error('MUI X: exportAs not supported.');\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport { gridDensityFactorSelector } from \"../density/index.js\";\nimport { useGridLogger, useGridSelector, useGridApiMethod, useGridApiEventHandler } from \"../../utils/index.js\";\nimport { useGridRegisterPipeProcessor } from \"../../core/pipeProcessing/index.js\";\nimport { gridPageCountSelector, gridPaginationModelSelector } from \"./gridPaginationSelector.js\";\nimport { getPageCount, defaultPageSize, throwIfPageSizeExceedsTheLimit, getDefaultGridPaginationModel, getValidPage } from \"./gridPaginationUtils.js\";\nexport const getDerivedPaginationModel = (paginationState, signature, paginationModelProp) => {\n let paginationModel = paginationState.paginationModel;\n const rowCount = paginationState.rowCount;\n const pageSize = paginationModelProp?.pageSize ?? paginationModel.pageSize;\n const page = paginationModelProp?.page ?? paginationModel.page;\n const pageCount = getPageCount(rowCount, pageSize, page);\n if (paginationModelProp && (paginationModelProp?.page !== paginationModel.page || paginationModelProp?.pageSize !== paginationModel.pageSize)) {\n paginationModel = paginationModelProp;\n }\n const validPage = getValidPage(paginationModel.page, pageCount);\n if (validPage !== paginationModel.page) {\n paginationModel = _extends({}, paginationModel, {\n page: validPage\n });\n }\n throwIfPageSizeExceedsTheLimit(paginationModel.pageSize, signature);\n return paginationModel;\n};\n\n/**\n * @requires useGridFilter (state)\n * @requires useGridDimensions (event) - can be after\n */\nexport const useGridPaginationModel = (apiRef, props) => {\n const logger = useGridLogger(apiRef, 'useGridPaginationModel');\n const densityFactor = useGridSelector(apiRef, gridDensityFactorSelector);\n const rowHeight = Math.floor(props.rowHeight * densityFactor);\n apiRef.current.registerControlState({\n stateId: 'paginationModel',\n propModel: props.paginationModel,\n propOnChange: props.onPaginationModelChange,\n stateSelector: gridPaginationModelSelector,\n changeEvent: 'paginationModelChange'\n });\n\n /**\n * API METHODS\n */\n const setPage = React.useCallback(page => {\n const currentModel = gridPaginationModelSelector(apiRef);\n if (page === currentModel.page) {\n return;\n }\n logger.debug(`Setting page to ${page}`);\n apiRef.current.setPaginationModel({\n page,\n pageSize: currentModel.pageSize\n });\n }, [apiRef, logger]);\n const setPageSize = React.useCallback(pageSize => {\n const currentModel = gridPaginationModelSelector(apiRef);\n if (pageSize === currentModel.pageSize) {\n return;\n }\n logger.debug(`Setting page size to ${pageSize}`);\n apiRef.current.setPaginationModel({\n pageSize,\n page: currentModel.page\n });\n }, [apiRef, logger]);\n const setPaginationModel = React.useCallback(paginationModel => {\n const currentModel = gridPaginationModelSelector(apiRef);\n if (paginationModel === currentModel) {\n return;\n }\n logger.debug(\"Setting 'paginationModel' to\", paginationModel);\n apiRef.current.setState(state => _extends({}, state, {\n pagination: _extends({}, state.pagination, {\n paginationModel: getDerivedPaginationModel(state.pagination, props.signature, paginationModel)\n })\n }));\n }, [apiRef, logger, props.signature]);\n const paginationModelApi = {\n setPage,\n setPageSize,\n setPaginationModel\n };\n useGridApiMethod(apiRef, paginationModelApi, 'public');\n\n /**\n * PRE-PROCESSING\n */\n const stateExportPreProcessing = React.useCallback((prevState, context) => {\n const paginationModel = gridPaginationModelSelector(apiRef);\n const shouldExportPaginationModel =\n // Always export if the `exportOnlyDirtyModels` property is not activated\n !context.exportOnlyDirtyModels ||\n // Always export if the `paginationModel` is controlled\n props.paginationModel != null ||\n // Always export if the `paginationModel` has been initialized\n props.initialState?.pagination?.paginationModel != null ||\n // Export if `page` or `pageSize` is not equal to the default value\n paginationModel.page !== 0 && paginationModel.pageSize !== defaultPageSize(props.autoPageSize);\n if (!shouldExportPaginationModel) {\n return prevState;\n }\n return _extends({}, prevState, {\n pagination: _extends({}, prevState.pagination, {\n paginationModel\n })\n });\n }, [apiRef, props.paginationModel, props.initialState?.pagination?.paginationModel, props.autoPageSize]);\n const stateRestorePreProcessing = React.useCallback((params, context) => {\n const paginationModel = context.stateToRestore.pagination?.paginationModel ? _extends({}, getDefaultGridPaginationModel(props.autoPageSize), context.stateToRestore.pagination?.paginationModel) : gridPaginationModelSelector(apiRef);\n apiRef.current.setState(state => _extends({}, state, {\n pagination: _extends({}, state.pagination, {\n paginationModel: getDerivedPaginationModel(state.pagination, props.signature, paginationModel)\n })\n }));\n return params;\n }, [apiRef, props.autoPageSize, props.signature]);\n useGridRegisterPipeProcessor(apiRef, 'exportState', stateExportPreProcessing);\n useGridRegisterPipeProcessor(apiRef, 'restoreState', stateRestorePreProcessing);\n\n /**\n * EVENTS\n */\n const handlePaginationModelChange = () => {\n const paginationModel = gridPaginationModelSelector(apiRef);\n if (apiRef.current.virtualScrollerRef?.current) {\n apiRef.current.scrollToIndexes({\n rowIndex: paginationModel.page * paginationModel.pageSize\n });\n }\n };\n const handleUpdateAutoPageSize = React.useCallback(() => {\n if (!props.autoPageSize) {\n return;\n }\n const dimensions = apiRef.current.getRootDimensions();\n const maximumPageSizeWithoutScrollBar = Math.floor(dimensions.viewportInnerSize.height / rowHeight);\n apiRef.current.setPageSize(maximumPageSizeWithoutScrollBar);\n }, [apiRef, props.autoPageSize, rowHeight]);\n const handleRowCountChange = React.useCallback(newRowCount => {\n if (newRowCount == null) {\n return;\n }\n const paginationModel = gridPaginationModelSelector(apiRef);\n const pageCount = gridPageCountSelector(apiRef);\n if (paginationModel.page > pageCount - 1) {\n apiRef.current.setPage(Math.max(0, pageCount - 1));\n }\n }, [apiRef]);\n useGridApiEventHandler(apiRef, 'viewportInnerSizeChange', handleUpdateAutoPageSize);\n useGridApiEventHandler(apiRef, 'paginationModelChange', handlePaginationModelChange);\n useGridApiEventHandler(apiRef, 'rowCountChange', handleRowCountChange);\n\n /**\n * EFFECTS\n */\n React.useEffect(() => {\n apiRef.current.setState(state => _extends({}, state, {\n pagination: _extends({}, state.pagination, {\n paginationModel: getDerivedPaginationModel(state.pagination, props.signature, props.paginationModel)\n })\n }));\n }, [apiRef, props.paginationModel, props.paginationMode, props.signature]);\n React.useEffect(handleUpdateAutoPageSize, [handleUpdateAutoPageSize]);\n};","import * as React from 'react';\nimport { useFirstRender } from \"../../utils/useFirstRender.js\";\nexport const useGridRegisterStrategyProcessor = (apiRef, strategyName, group, processor) => {\n const registerPreProcessor = React.useCallback(() => {\n 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};","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport { lruMemoize } from 'reselect';\nimport { unstable_useEnhancedEffect as useEnhancedEffect } from '@mui/utils';\nimport { useLazyRef } from \"../../utils/useLazyRef.js\";\nimport { useGridApiEventHandler } from \"../../utils/useGridApiEventHandler.js\";\nimport { useGridApiMethod } from \"../../utils/useGridApiMethod.js\";\nimport { useGridLogger } from \"../../utils/useGridLogger.js\";\nimport { gridColumnLookupSelector } from \"../columns/gridColumnsSelector.js\";\nimport { GridPreferencePanelsValue } from \"../preferencesPanel/gridPreferencePanelsValue.js\";\nimport { getDefaultGridFilterModel } from \"./gridFilterState.js\";\nimport { gridFilterModelSelector } from \"./gridFilterSelector.js\";\nimport { useFirstRender } from \"../../utils/useFirstRender.js\";\nimport { gridRowsLookupSelector } from \"../rows/index.js\";\nimport { useGridRegisterPipeProcessor } from \"../../core/pipeProcessing/index.js\";\nimport { GRID_DEFAULT_STRATEGY, useGridRegisterStrategyProcessor } from \"../../core/strategyProcessing/index.js\";\nimport { buildAggregatedFilterApplier, sanitizeFilterModel, mergeStateWithFilterModel, cleanFilterItem, passFilterLogic, shouldQuickFilterExcludeHiddenColumns } from \"./gridFilterUtils.js\";\nimport { isDeepEqual } from \"../../../utils/utils.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport const filterStateInitializer = (state, props, apiRef) => {\n const filterModel = props.filterModel ?? props.initialState?.filter?.filterModel ?? getDefaultGridFilterModel();\n return _extends({}, state, {\n filter: {\n filterModel: sanitizeFilterModel(filterModel, props.disableMultipleColumnsFiltering, apiRef),\n filteredRowsLookup: {},\n filteredChildrenCountLookup: {},\n filteredDescendantCountLookup: {}\n },\n visibleRowsLookup: {}\n });\n};\nconst getVisibleRowsLookup = params => {\n // For flat tree, the `visibleRowsLookup` and the `filteredRowsLookup` are equals since no row is collapsed.\n return params.filteredRowsLookup;\n};\nfunction getVisibleRowsLookupState(apiRef, state) {\n return apiRef.current.applyStrategyProcessor('visibleRowsLookupCreation', {\n tree: state.rows.tree,\n filteredRowsLookup: state.filter.filteredRowsLookup\n });\n}\nfunction createMemoizedValues() {\n return lruMemoize(Object.values);\n}\n\n/**\n * @requires useGridColumns (method, event)\n * @requires useGridParamsApi (method)\n * @requires useGridRows (event)\n */\nexport const useGridFilter = (apiRef, props) => {\n const logger = useGridLogger(apiRef, 'useGridFilter');\n apiRef.current.registerControlState({\n stateId: 'filter',\n propModel: props.filterModel,\n propOnChange: props.onFilterModelChange,\n stateSelector: gridFilterModelSelector,\n changeEvent: 'filterModelChange'\n });\n const updateFilteredRows = React.useCallback(() => {\n apiRef.current.setState(state => {\n const filterModel = gridFilterModelSelector(state, apiRef.current.instanceId);\n const filterState = apiRef.current.getFilterState(filterModel);\n const newState = _extends({}, state, {\n filter: _extends({}, state.filter, filterState)\n });\n const visibleRowsLookupState = getVisibleRowsLookupState(apiRef, newState);\n return _extends({}, newState, {\n visibleRowsLookup: visibleRowsLookupState\n });\n });\n apiRef.current.publishEvent('filteredRowsSet');\n }, [apiRef]);\n const addColumnMenuItem = React.useCallback((columnMenuItems, colDef) => {\n if (colDef == null || colDef.filterable === false || props.disableColumnFilter) {\n return columnMenuItems;\n }\n return [...columnMenuItems, 'columnMenuFilterItem'];\n }, [props.disableColumnFilter]);\n\n /**\n * API METHODS\n */\n const applyFilters = React.useCallback(() => {\n updateFilteredRows();\n apiRef.current.forceUpdate();\n }, [apiRef, updateFilteredRows]);\n const upsertFilterItem = React.useCallback(item => {\n const filterModel = gridFilterModelSelector(apiRef);\n const items = [...filterModel.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 apiRef.current.setFilterModel(_extends({}, filterModel, {\n items\n }), 'upsertFilterItem');\n }, [apiRef]);\n const upsertFilterItems = React.useCallback(items => {\n const filterModel = gridFilterModelSelector(apiRef);\n const existingItems = [...filterModel.items];\n items.forEach(item => {\n const itemIndex = existingItems.findIndex(filterItem => filterItem.id === item.id);\n if (itemIndex === -1) {\n existingItems.push(item);\n } else {\n existingItems[itemIndex] = item;\n }\n });\n apiRef.current.setFilterModel(_extends({}, filterModel, {\n items: existingItems\n }), 'upsertFilterItems');\n }, [apiRef]);\n const deleteFilterItem = React.useCallback(itemToDelete => {\n const filterModel = gridFilterModelSelector(apiRef);\n const items = filterModel.items.filter(item => item.id !== itemToDelete.id);\n if (items.length === filterModel.items.length) {\n return;\n }\n apiRef.current.setFilterModel(_extends({}, filterModel, {\n items\n }), 'deleteFilterItem');\n }, [apiRef]);\n const showFilterPanel = React.useCallback((targetColumnField, panelId, labelId) => {\n logger.debug('Displaying filter panel');\n if (targetColumnField) {\n const filterModel = gridFilterModelSelector(apiRef);\n const filterItemsWithValue = filterModel.items.filter(item => {\n if (item.value !== undefined) {\n // Some filters like `isAnyOf` support array as `item.value`.\n // If array is empty, we want to remove it from the filter model.\n if (Array.isArray(item.value) && item.value.length === 0) {\n return false;\n }\n return true;\n }\n const column = apiRef.current.getColumn(item.field);\n const filterOperator = column.filterOperators?.find(operator => operator.value === item.operator);\n const requiresFilterValue = typeof filterOperator?.requiresFilterValue === 'undefined' ? true : filterOperator?.requiresFilterValue;\n\n // Operators like `isEmpty` don't have and don't require `item.value`.\n // So we don't want to remove them from the filter model if `item.value === undefined`.\n // See https://github.com/mui/mui-x/issues/5402\n if (requiresFilterValue) {\n return false;\n }\n return true;\n });\n let newFilterItems;\n const filterItemOnTarget = filterItemsWithValue.find(item => item.field === targetColumnField);\n const targetColumn = apiRef.current.getColumn(targetColumnField);\n if (filterItemOnTarget) {\n newFilterItems = filterItemsWithValue;\n } else if (props.disableMultipleColumnsFiltering) {\n newFilterItems = [cleanFilterItem({\n field: targetColumnField,\n operator: targetColumn.filterOperators[0].value\n }, apiRef)];\n } else {\n newFilterItems = [...filterItemsWithValue, cleanFilterItem({\n field: targetColumnField,\n operator: targetColumn.filterOperators[0].value\n }, apiRef)];\n }\n apiRef.current.setFilterModel(_extends({}, filterModel, {\n items: newFilterItems\n }));\n }\n apiRef.current.showPreferences(GridPreferencePanelsValue.filters, panelId, labelId);\n }, [apiRef, logger, props.disableMultipleColumnsFiltering]);\n const hideFilterPanel = React.useCallback(() => {\n logger.debug('Hiding filter panel');\n apiRef.current.hidePreferences();\n }, [apiRef, logger]);\n const setFilterLogicOperator = React.useCallback(logicOperator => {\n const filterModel = gridFilterModelSelector(apiRef);\n if (filterModel.logicOperator === logicOperator) {\n return;\n }\n apiRef.current.setFilterModel(_extends({}, filterModel, {\n logicOperator\n }), 'changeLogicOperator');\n }, [apiRef]);\n const setQuickFilterValues = React.useCallback(values => {\n const filterModel = gridFilterModelSelector(apiRef);\n if (isDeepEqual(filterModel.quickFilterValues, values)) {\n return;\n }\n apiRef.current.setFilterModel(_extends({}, filterModel, {\n quickFilterValues: [...values]\n }));\n }, [apiRef]);\n const setFilterModel = React.useCallback((model, reason) => {\n const currentModel = gridFilterModelSelector(apiRef);\n if (currentModel !== model) {\n logger.debug('Setting filter model');\n apiRef.current.updateControlState('filter', mergeStateWithFilterModel(model, props.disableMultipleColumnsFiltering, apiRef), reason);\n apiRef.current.unstable_applyFilters();\n }\n }, [apiRef, logger, props.disableMultipleColumnsFiltering]);\n const getFilterState = React.useCallback(inputFilterModel => {\n const filterModel = sanitizeFilterModel(inputFilterModel, props.disableMultipleColumnsFiltering, apiRef);\n const isRowMatchingFilters = props.filterMode === 'client' ? buildAggregatedFilterApplier(filterModel, apiRef, props.disableEval) : null;\n const filterResult = apiRef.current.applyStrategyProcessor('filtering', {\n isRowMatchingFilters,\n filterModel: filterModel ?? getDefaultGridFilterModel()\n });\n return _extends({}, filterResult, {\n filterModel\n });\n }, [props.disableMultipleColumnsFiltering, props.filterMode, props.disableEval, apiRef]);\n const filterApi = {\n setFilterLogicOperator,\n unstable_applyFilters: applyFilters,\n deleteFilterItem,\n upsertFilterItem,\n upsertFilterItems,\n setFilterModel,\n showFilterPanel,\n hideFilterPanel,\n setQuickFilterValues,\n ignoreDiacritics: props.ignoreDiacritics,\n getFilterState\n };\n useGridApiMethod(apiRef, filterApi, 'public');\n\n /**\n * PRE-PROCESSING\n */\n const stateExportPreProcessing = React.useCallback((prevState, context) => {\n const filterModelToExport = gridFilterModelSelector(apiRef);\n const shouldExportFilterModel =\n // Always export if the `exportOnlyDirtyModels` property is not activated\n !context.exportOnlyDirtyModels ||\n // Always export if the model is controlled\n props.filterModel != null ||\n // Always export if the model has been initialized\n props.initialState?.filter?.filterModel != null ||\n // Export if the model is not equal to the default value\n !isDeepEqual(filterModelToExport, getDefaultGridFilterModel());\n if (!shouldExportFilterModel) {\n return prevState;\n }\n return _extends({}, prevState, {\n filter: {\n filterModel: filterModelToExport\n }\n });\n }, [apiRef, props.filterModel, props.initialState?.filter?.filterModel]);\n const stateRestorePreProcessing = React.useCallback((params, context) => {\n const filterModel = context.stateToRestore.filter?.filterModel;\n if (filterModel == null) {\n return params;\n }\n apiRef.current.updateControlState('filter', mergeStateWithFilterModel(filterModel, props.disableMultipleColumnsFiltering, apiRef), 'restoreState');\n return _extends({}, params, {\n callbacks: [...params.callbacks, apiRef.current.unstable_applyFilters]\n });\n }, [apiRef, props.disableMultipleColumnsFiltering]);\n const preferencePanelPreProcessing = React.useCallback((initialValue, value) => {\n if (value === GridPreferencePanelsValue.filters) {\n const FilterPanel = props.slots.filterPanel;\n return /*#__PURE__*/_jsx(FilterPanel, _extends({}, props.slotProps?.filterPanel));\n }\n return initialValue;\n }, [props.slots.filterPanel, props.slotProps?.filterPanel]);\n const {\n getRowId\n } = props;\n const getRowsRef = useLazyRef(createMemoizedValues);\n const flatFilteringMethod = React.useCallback(params => {\n if (props.filterMode !== 'client' || !params.isRowMatchingFilters) {\n return {\n filteredRowsLookup: {},\n filteredChildrenCountLookup: {},\n filteredDescendantCountLookup: {}\n };\n }\n const dataRowIdToModelLookup = gridRowsLookupSelector(apiRef);\n const filteredRowsLookup = {};\n const {\n isRowMatchingFilters\n } = params;\n const filterCache = {};\n const result = {\n passingFilterItems: null,\n passingQuickFilterValues: null\n };\n const rows = getRowsRef.current(apiRef.current.state.rows.dataRowIdToModelLookup);\n for (let i = 0; i < rows.length; i += 1) {\n const row = rows[i];\n const id = getRowId ? getRowId(row) : row.id;\n isRowMatchingFilters(row, undefined, result);\n const isRowPassing = passFilterLogic([result.passingFilterItems], [result.passingQuickFilterValues], params.filterModel, apiRef, filterCache);\n filteredRowsLookup[id] = isRowPassing;\n }\n const footerId = 'auto-generated-group-footer-root';\n const footer = dataRowIdToModelLookup[footerId];\n if (footer) {\n filteredRowsLookup[footerId] = true;\n }\n return {\n filteredRowsLookup,\n filteredChildrenCountLookup: {},\n filteredDescendantCountLookup: {}\n };\n }, [apiRef, props.filterMode, getRowId, getRowsRef]);\n useGridRegisterPipeProcessor(apiRef, 'columnMenu', addColumnMenuItem);\n useGridRegisterPipeProcessor(apiRef, 'exportState', stateExportPreProcessing);\n useGridRegisterPipeProcessor(apiRef, 'restoreState', stateRestorePreProcessing);\n useGridRegisterPipeProcessor(apiRef, 'preferencePanel', preferencePanelPreProcessing);\n useGridRegisterStrategyProcessor(apiRef, GRID_DEFAULT_STRATEGY, 'filtering', flatFilteringMethod);\n useGridRegisterStrategyProcessor(apiRef, GRID_DEFAULT_STRATEGY, 'visibleRowsLookupCreation', getVisibleRowsLookup);\n\n /**\n * EVENTS\n */\n const handleColumnsChange = React.useCallback(() => {\n logger.debug('onColUpdated - GridColumns changed, applying filters');\n const filterModel = gridFilterModelSelector(apiRef);\n const columnsLookup = gridColumnLookupSelector(apiRef);\n const newFilterItems = filterModel.items.filter(item => item.field && columnsLookup[item.field]);\n if (newFilterItems.length < filterModel.items.length) {\n apiRef.current.setFilterModel(_extends({}, filterModel, {\n items: newFilterItems\n }));\n }\n }, [apiRef, logger]);\n const handleStrategyProcessorChange = React.useCallback(methodName => {\n if (methodName === 'filtering') {\n apiRef.current.unstable_applyFilters();\n }\n }, [apiRef]);\n const updateVisibleRowsLookupState = React.useCallback(() => {\n apiRef.current.setState(state => {\n return _extends({}, state, {\n visibleRowsLookup: getVisibleRowsLookupState(apiRef, state)\n });\n });\n apiRef.current.forceUpdate();\n }, [apiRef]);\n\n // Do not call `apiRef.current.forceUpdate` to avoid re-render before updating the sorted rows.\n // Otherwise, the state is not consistent during the render\n useGridApiEventHandler(apiRef, 'rowsSet', updateFilteredRows);\n useGridApiEventHandler(apiRef, 'columnsChange', handleColumnsChange);\n useGridApiEventHandler(apiRef, 'activeStrategyProcessorChange', handleStrategyProcessorChange);\n useGridApiEventHandler(apiRef, 'rowExpansionChange', updateVisibleRowsLookupState);\n useGridApiEventHandler(apiRef, 'columnVisibilityModelChange', () => {\n const filterModel = gridFilterModelSelector(apiRef);\n if (filterModel.quickFilterValues && shouldQuickFilterExcludeHiddenColumns(filterModel)) {\n // re-apply filters because the quick filter results may have changed\n apiRef.current.unstable_applyFilters();\n }\n });\n\n /**\n * 1ST RENDER\n */\n useFirstRender(() => {\n apiRef.current.unstable_applyFilters();\n });\n\n /**\n * EFFECTS\n */\n useEnhancedEffect(() => {\n if (props.filterModel !== undefined) {\n apiRef.current.setFilterModel(props.filterModel);\n }\n }, [apiRef, logger, props.filterModel]);\n};","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport { unstable_ownerDocument as ownerDocument, unstable_useEventCallback as useEventcallback } from '@mui/utils';\nimport { gridClasses } from \"../../../constants/gridClasses.js\";\nimport { useGridApiMethod } from \"../../utils/useGridApiMethod.js\";\nimport { useGridLogger } from \"../../utils/useGridLogger.js\";\nimport { useGridApiEventHandler } from \"../../utils/useGridApiEventHandler.js\";\nimport { isNavigationKey } from \"../../../utils/keyboardUtils.js\";\nimport { gridFocusCellSelector, gridFocusColumnGroupHeaderSelector } from \"./gridFocusStateSelector.js\";\nimport { gridVisibleColumnDefinitionsSelector } from \"../columns/gridColumnsSelector.js\";\nimport { getVisibleRows } from \"../../utils/useGridVisibleRows.js\";\nimport { clamp } from \"../../../utils/utils.js\";\nimport { gridPinnedRowsSelector } from \"../rows/gridRowsSelector.js\";\nexport const focusStateInitializer = state => _extends({}, state, {\n focus: {\n cell: null,\n columnHeader: null,\n columnHeaderFilter: null,\n columnGroupHeader: null\n },\n tabIndex: {\n cell: null,\n columnHeader: null,\n columnHeaderFilter: null,\n columnGroupHeader: null\n }\n});\n\n/**\n * @requires useGridParamsApi (method)\n * @requires useGridRows (method)\n * @requires useGridEditing (event)\n */\nexport const useGridFocus = (apiRef, props) => {\n const logger = useGridLogger(apiRef, 'useGridFocus');\n const lastClickedCell = React.useRef(null);\n const hasRootReference = apiRef.current.rootElementRef.current !== null;\n const publishCellFocusOut = React.useCallback((cell, event) => {\n if (cell) {\n // The row might have been deleted\n if (apiRef.current.getRow(cell.id)) {\n apiRef.current.publishEvent('cellFocusOut', apiRef.current.getCellParams(cell.id, cell.field), event);\n }\n }\n }, [apiRef]);\n const setCellFocus = React.useCallback((id, field) => {\n const focusedCell = gridFocusCellSelector(apiRef);\n if (focusedCell?.id === id && focusedCell?.field === field) {\n return;\n }\n apiRef.current.setState(state => {\n logger.debug(`Focusing on cell with id=${id} and field=${field}`);\n return _extends({}, state, {\n tabIndex: {\n cell: {\n id,\n field\n },\n columnHeader: null,\n columnHeaderFilter: null,\n columnGroupHeader: null\n },\n focus: {\n cell: {\n id,\n field\n },\n columnHeader: null,\n columnHeaderFilter: null,\n columnGroupHeader: null\n }\n });\n });\n apiRef.current.forceUpdate();\n\n // The row might have been deleted\n if (!apiRef.current.getRow(id)) {\n return;\n }\n if (focusedCell) {\n // There's a focused cell but another cell was clicked\n // Publishes an event to notify that the focus was lost\n publishCellFocusOut(focusedCell, {});\n }\n apiRef.current.publishEvent('cellFocusIn', apiRef.current.getCellParams(id, field));\n }, [apiRef, logger, publishCellFocusOut]);\n const setColumnHeaderFocus = React.useCallback((field, event = {}) => {\n const cell = gridFocusCellSelector(apiRef);\n publishCellFocusOut(cell, event);\n apiRef.current.setState(state => {\n logger.debug(`Focusing on column header with colIndex=${field}`);\n return _extends({}, state, {\n tabIndex: {\n columnHeader: {\n field\n },\n columnHeaderFilter: null,\n cell: null,\n columnGroupHeader: null\n },\n focus: {\n columnHeader: {\n field\n },\n columnHeaderFilter: null,\n cell: null,\n columnGroupHeader: null\n }\n });\n });\n apiRef.current.forceUpdate();\n }, [apiRef, logger, publishCellFocusOut]);\n const setColumnHeaderFilterFocus = React.useCallback((field, event = {}) => {\n const cell = gridFocusCellSelector(apiRef);\n publishCellFocusOut(cell, event);\n apiRef.current.setState(state => {\n logger.debug(`Focusing on column header filter with colIndex=${field}`);\n return _extends({}, state, {\n tabIndex: {\n columnHeader: null,\n columnHeaderFilter: {\n field\n },\n cell: null,\n columnGroupHeader: null\n },\n focus: {\n columnHeader: null,\n columnHeaderFilter: {\n field\n },\n cell: null,\n columnGroupHeader: null\n }\n });\n });\n apiRef.current.forceUpdate();\n }, [apiRef, logger, publishCellFocusOut]);\n const setColumnGroupHeaderFocus = React.useCallback((field, depth, event = {}) => {\n const cell = gridFocusCellSelector(apiRef);\n if (cell) {\n apiRef.current.publishEvent('cellFocusOut', apiRef.current.getCellParams(cell.id, cell.field), event);\n }\n apiRef.current.setState(state => {\n return _extends({}, state, {\n tabIndex: {\n columnGroupHeader: {\n field,\n depth\n },\n columnHeader: null,\n columnHeaderFilter: null,\n cell: null\n },\n focus: {\n columnGroupHeader: {\n field,\n depth\n },\n columnHeader: null,\n columnHeaderFilter: null,\n cell: null\n }\n });\n });\n apiRef.current.forceUpdate();\n }, [apiRef]);\n const getColumnGroupHeaderFocus = React.useCallback(() => gridFocusColumnGroupHeaderSelector(apiRef), [apiRef]);\n const moveFocusToRelativeCell = React.useCallback((id, field, direction) => {\n let columnIndexToFocus = apiRef.current.getColumnIndex(field);\n const visibleColumns = gridVisibleColumnDefinitionsSelector(apiRef);\n const currentPage = getVisibleRows(apiRef, {\n pagination: props.pagination,\n paginationMode: props.paginationMode\n });\n const pinnedRows = gridPinnedRowsSelector(apiRef);\n\n // Include pinned rows as well\n const currentPageRows = [].concat(pinnedRows.top || [], currentPage.rows, pinnedRows.bottom || []);\n let rowIndexToFocus = currentPageRows.findIndex(row => row.id === id);\n if (direction === 'right') {\n columnIndexToFocus += 1;\n } else if (direction === 'left') {\n columnIndexToFocus -= 1;\n } else {\n rowIndexToFocus += 1;\n }\n if (columnIndexToFocus >= visibleColumns.length) {\n // Go to next row if we are after the last column\n rowIndexToFocus += 1;\n if (rowIndexToFocus < currentPageRows.length) {\n // Go to first column of the next row if there's one more row\n columnIndexToFocus = 0;\n }\n } else if (columnIndexToFocus < 0) {\n // Go to previous row if we are before the first column\n rowIndexToFocus -= 1;\n if (rowIndexToFocus >= 0) {\n // Go to last column of the previous if there's one more row\n columnIndexToFocus = visibleColumns.length - 1;\n }\n }\n rowIndexToFocus = clamp(rowIndexToFocus, 0, currentPageRows.length - 1);\n const rowToFocus = currentPageRows[rowIndexToFocus];\n if (!rowToFocus) {\n return;\n }\n const colSpanInfo = apiRef.current.unstable_getCellColSpanInfo(rowToFocus.id, columnIndexToFocus);\n if (colSpanInfo && colSpanInfo.spannedByColSpan) {\n if (direction === 'left' || direction === 'below') {\n columnIndexToFocus = colSpanInfo.leftVisibleCellIndex;\n } else if (direction === 'right') {\n columnIndexToFocus = colSpanInfo.rightVisibleCellIndex;\n }\n }\n columnIndexToFocus = clamp(columnIndexToFocus, 0, visibleColumns.length - 1);\n const columnToFocus = visibleColumns[columnIndexToFocus];\n apiRef.current.setCellFocus(rowToFocus.id, columnToFocus.field);\n }, [apiRef, props.pagination, props.paginationMode]);\n const handleCellDoubleClick = React.useCallback(({\n id,\n field\n }) => {\n apiRef.current.setCellFocus(id, field);\n }, [apiRef]);\n const handleCellKeyDown = React.useCallback((params, event) => {\n // GRID_CELL_NAVIGATION_KEY_DOWN handles the focus on Enter, Tab and navigation keys\n if (event.key === 'Enter' || event.key === 'Tab' || event.key === 'Shift' || isNavigationKey(event.key)) {\n return;\n }\n apiRef.current.setCellFocus(params.id, params.field);\n }, [apiRef]);\n const handleColumnHeaderFocus = React.useCallback(({\n field\n }, event) => {\n if (event.target !== event.currentTarget) {\n return;\n }\n apiRef.current.setColumnHeaderFocus(field, event);\n }, [apiRef]);\n const handleColumnGroupHeaderFocus = React.useCallback(({\n fields,\n depth\n }, event) => {\n if (event.target !== event.currentTarget) {\n return;\n }\n const focusedColumnGroup = gridFocusColumnGroupHeaderSelector(apiRef);\n if (focusedColumnGroup !== null && focusedColumnGroup.depth === depth && fields.includes(focusedColumnGroup.field)) {\n // This group cell has already been focused\n return;\n }\n apiRef.current.setColumnGroupHeaderFocus(fields[0], depth, event);\n }, [apiRef]);\n const handleBlur = React.useCallback((_, event) => {\n if (event.relatedTarget?.getAttribute('class')?.includes(gridClasses.columnHeader)) {\n return;\n }\n logger.debug(`Clearing focus`);\n apiRef.current.setState(state => _extends({}, state, {\n focus: {\n cell: null,\n columnHeader: null,\n columnHeaderFilter: null,\n columnGroupHeader: null\n }\n }));\n }, [logger, apiRef]);\n const handleCellMouseDown = React.useCallback(params => {\n lastClickedCell.current = params;\n }, []);\n const handleDocumentClick = React.useCallback(event => {\n const cellParams = lastClickedCell.current;\n lastClickedCell.current = null;\n const focusedCell = gridFocusCellSelector(apiRef);\n const canUpdateFocus = apiRef.current.unstable_applyPipeProcessors('canUpdateFocus', true, {\n event,\n cell: cellParams\n });\n if (!canUpdateFocus) {\n return;\n }\n if (!focusedCell) {\n if (cellParams) {\n apiRef.current.setCellFocus(cellParams.id, cellParams.field);\n }\n return;\n }\n if (cellParams?.id === focusedCell.id && cellParams?.field === focusedCell.field) {\n return;\n }\n const cellElement = apiRef.current.getCellElement(focusedCell.id, focusedCell.field);\n if (cellElement?.contains(event.target)) {\n return;\n }\n if (cellParams) {\n apiRef.current.setCellFocus(cellParams.id, cellParams.field);\n } else {\n apiRef.current.setState(state => _extends({}, state, {\n focus: {\n cell: null,\n columnHeader: null,\n columnHeaderFilter: null,\n columnGroupHeader: null\n }\n }));\n apiRef.current.forceUpdate();\n\n // There's a focused cell but another element (not a cell) was clicked\n // Publishes an event to notify that the focus was lost\n publishCellFocusOut(focusedCell, event);\n }\n }, [apiRef, publishCellFocusOut]);\n const handleCellModeChange = React.useCallback(params => {\n if (params.cellMode === 'view') {\n return;\n }\n const cell = gridFocusCellSelector(apiRef);\n if (cell?.id !== params.id || cell?.field !== params.field) {\n apiRef.current.setCellFocus(params.id, params.field);\n }\n }, [apiRef]);\n const handleRowSet = React.useCallback(() => {\n const cell = gridFocusCellSelector(apiRef);\n\n // If the focused cell is in a row which does not exist anymore, then remove the focus\n if (cell && !apiRef.current.getRow(cell.id)) {\n apiRef.current.setState(state => _extends({}, state, {\n focus: {\n cell: null,\n columnHeader: null,\n columnHeaderFilter: null,\n columnGroupHeader: null\n }\n }));\n }\n }, [apiRef]);\n const handlePaginationModelChange = useEventcallback(() => {\n const currentFocusedCell = gridFocusCellSelector(apiRef);\n if (!currentFocusedCell) {\n return;\n }\n const currentPage = getVisibleRows(apiRef, {\n pagination: props.pagination,\n paginationMode: props.paginationMode\n });\n const rowIsInCurrentPage = currentPage.rows.find(row => row.id === currentFocusedCell.id);\n if (rowIsInCurrentPage) {\n return;\n }\n const visibleColumns = gridVisibleColumnDefinitionsSelector(apiRef);\n apiRef.current.setState(state => {\n return _extends({}, state, {\n tabIndex: {\n cell: {\n id: currentPage.rows[0].id,\n field: visibleColumns[0].field\n },\n columnGroupHeader: null,\n columnHeader: null,\n columnHeaderFilter: null\n }\n });\n });\n });\n const focusApi = {\n setCellFocus,\n setColumnHeaderFocus,\n setColumnHeaderFilterFocus\n };\n const focusPrivateApi = {\n moveFocusToRelativeCell,\n setColumnGroupHeaderFocus,\n getColumnGroupHeaderFocus\n };\n useGridApiMethod(apiRef, focusApi, 'public');\n useGridApiMethod(apiRef, focusPrivateApi, 'private');\n React.useEffect(() => {\n const doc = ownerDocument(apiRef.current.rootElementRef.current);\n doc.addEventListener('mouseup', handleDocumentClick);\n return () => {\n doc.removeEventListener('mouseup', handleDocumentClick);\n };\n }, [apiRef, hasRootReference, handleDocumentClick]);\n useGridApiEventHandler(apiRef, 'columnHeaderBlur', handleBlur);\n useGridApiEventHandler(apiRef, 'cellDoubleClick', handleCellDoubleClick);\n useGridApiEventHandler(apiRef, 'cellMouseDown', handleCellMouseDown);\n useGridApiEventHandler(apiRef, 'cellKeyDown', handleCellKeyDown);\n useGridApiEventHandler(apiRef, 'cellModeChange', handleCellModeChange);\n useGridApiEventHandler(apiRef, 'columnHeaderFocus', handleColumnHeaderFocus);\n useGridApiEventHandler(apiRef, 'columnGroupHeaderFocus', handleColumnGroupHeaderFocus);\n useGridApiEventHandler(apiRef, 'rowsSet', handleRowSet);\n useGridApiEventHandler(apiRef, 'paginationModelChange', handlePaginationModelChange);\n};","import { gridFilteredSortedRowIdsSelector } from \"../filter/gridFilterSelector.js\";\nimport { gridRowSpanningHiddenCellsSelector } from \"../rows/gridRowSpanningSelectors.js\";\nimport { gridPinnedRowsSelector } from \"../rows/gridRowsSelector.js\";\nexport function enrichPageRowsWithPinnedRows(apiRef, rows) {\n const pinnedRows = gridPinnedRowsSelector(apiRef) || {};\n return [...(pinnedRows.top || []), ...rows, ...(pinnedRows.bottom || [])];\n}\nexport const getLeftColumnIndex = ({\n currentColIndex,\n firstColIndex,\n lastColIndex,\n isRtl\n}) => {\n if (isRtl) {\n if (currentColIndex < lastColIndex) {\n return currentColIndex + 1;\n }\n } else if (!isRtl) {\n if (currentColIndex > firstColIndex) {\n return currentColIndex - 1;\n }\n }\n return null;\n};\nexport const getRightColumnIndex = ({\n currentColIndex,\n firstColIndex,\n lastColIndex,\n isRtl\n}) => {\n if (isRtl) {\n if (currentColIndex > firstColIndex) {\n return currentColIndex - 1;\n }\n } else if (!isRtl) {\n if (currentColIndex < lastColIndex) {\n return currentColIndex + 1;\n }\n }\n return null;\n};\nexport function findNonRowSpannedCell(apiRef, rowId, field, rowSpanScanDirection) {\n const rowSpanHiddenCells = gridRowSpanningHiddenCellsSelector(apiRef);\n if (!rowSpanHiddenCells[rowId]?.[field]) {\n return rowId;\n }\n const filteredSortedRowIds = gridFilteredSortedRowIdsSelector(apiRef);\n // find closest non row spanned cell in the given `rowSpanScanDirection`\n let nextRowIndex = filteredSortedRowIds.indexOf(rowId) + (rowSpanScanDirection === 'down' ? 1 : -1);\n while (nextRowIndex >= 0 && nextRowIndex < filteredSortedRowIds.length) {\n const nextRowId = filteredSortedRowIds[nextRowIndex];\n if (!rowSpanHiddenCells[nextRowId]?.[field]) {\n return nextRowId;\n }\n nextRowIndex += rowSpanScanDirection === 'down' ? 1 : -1;\n }\n return rowId;\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport { throwIfPageSizeExceedsTheLimit, getDefaultGridPaginationModel } from \"./gridPaginationUtils.js\";\nimport { useGridPaginationModel } from \"./useGridPaginationModel.js\";\nimport { useGridRowCount } from \"./useGridRowCount.js\";\nimport { useGridPaginationMeta } from \"./useGridPaginationMeta.js\";\nexport const paginationStateInitializer = (state, props) => {\n const paginationModel = _extends({}, getDefaultGridPaginationModel(props.autoPageSize), props.paginationModel ?? props.initialState?.pagination?.paginationModel);\n throwIfPageSizeExceedsTheLimit(paginationModel.pageSize, props.signature);\n const rowCount = props.rowCount ?? props.initialState?.pagination?.rowCount;\n const meta = props.paginationMeta ?? props.initialState?.pagination?.meta ?? {};\n return _extends({}, state, {\n pagination: {\n paginationModel,\n rowCount,\n meta\n }\n });\n};\n\n/**\n * @requires useGridFilter (state)\n * @requires useGridDimensions (event) - can be after\n */\nexport const useGridPagination = (apiRef, props) => {\n useGridPaginationMeta(apiRef, props);\n useGridPaginationModel(apiRef, props);\n useGridRowCount(apiRef, props);\n};","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport { useGridApiMethod } from \"../../utils/useGridApiMethod.js\";\nimport { useGridLogger } from \"../../utils/useGridLogger.js\";\nimport { useGridRegisterPipeProcessor } from \"../../core/pipeProcessing/index.js\";\nimport { gridPreferencePanelStateSelector } from \"./gridPreferencePanelSelector.js\";\nexport const preferencePanelStateInitializer = (state, props) => _extends({}, state, {\n preferencePanel: props.initialState?.preferencePanel ?? {\n open: false\n }\n});\n\n/**\n * TODO: Add a single `setPreferencePanel` method to avoid multiple `setState`\n */\nexport const useGridPreferencesPanel = (apiRef, props) => {\n const logger = useGridLogger(apiRef, 'useGridPreferencesPanel');\n const hideTimeout = React.useRef();\n const immediateTimeout = React.useRef();\n\n /**\n * API METHODS\n */\n const hidePreferences = React.useCallback(() => {\n logger.debug('Hiding Preferences Panel');\n const preferencePanelState = gridPreferencePanelStateSelector(apiRef.current.state);\n if (preferencePanelState.openedPanelValue) {\n apiRef.current.publishEvent('preferencePanelClose', {\n openedPanelValue: preferencePanelState.openedPanelValue\n });\n }\n apiRef.current.setState(state => _extends({}, state, {\n preferencePanel: {\n open: false\n }\n }));\n apiRef.current.forceUpdate();\n }, [apiRef, logger]);\n\n // This is to prevent the preferences from closing when you open a select box or another panel,\n // The issue is in MUI core V4 => Fixed in V5\n const doNotHidePanel = React.useCallback(() => {\n immediateTimeout.current = setTimeout(() => clearTimeout(hideTimeout.current), 0);\n }, []);\n\n // This is a hack for the issue with Core V4, by delaying hiding the panel on the clickAwayListener,\n // we can cancel the action if the trigger element still need the panel...\n const hidePreferencesDelayed = React.useCallback(() => {\n hideTimeout.current = setTimeout(hidePreferences, 100);\n }, [hidePreferences]);\n const showPreferences = React.useCallback((newValue, panelId, labelId) => {\n logger.debug('Opening Preferences Panel');\n doNotHidePanel();\n apiRef.current.setState(state => _extends({}, state, {\n preferencePanel: _extends({}, state.preferencePanel, {\n open: true,\n openedPanelValue: newValue,\n panelId,\n labelId\n })\n }));\n apiRef.current.publishEvent('preferencePanelOpen', {\n openedPanelValue: newValue\n });\n apiRef.current.forceUpdate();\n }, [logger, doNotHidePanel, apiRef]);\n useGridApiMethod(apiRef, {\n showPreferences,\n hidePreferences: hidePreferencesDelayed\n }, 'public');\n\n /**\n * PRE-PROCESSING\n */\n const stateExportPreProcessing = React.useCallback((prevState, context) => {\n const preferencePanelToExport = gridPreferencePanelStateSelector(apiRef.current.state);\n const shouldExportPreferencePanel =\n // Always export if the `exportOnlyDirtyModels` property is not activated\n !context.exportOnlyDirtyModels ||\n // Always export if the panel was initialized\n props.initialState?.preferencePanel != null ||\n // Always export if the panel is opened\n preferencePanelToExport.open;\n if (!shouldExportPreferencePanel) {\n return prevState;\n }\n return _extends({}, prevState, {\n preferencePanel: preferencePanelToExport\n });\n }, [apiRef, props.initialState?.preferencePanel]);\n const stateRestorePreProcessing = React.useCallback((params, context) => {\n const preferencePanel = context.stateToRestore.preferencePanel;\n if (preferencePanel != null) {\n apiRef.current.setState(state => _extends({}, state, {\n preferencePanel\n }));\n }\n return params;\n }, [apiRef]);\n useGridRegisterPipeProcessor(apiRef, 'exportState', stateExportPreProcessing);\n useGridRegisterPipeProcessor(apiRef, 'restoreState', stateRestorePreProcessing);\n\n /**\n * EFFECTS\n */\n React.useEffect(() => {\n return () => {\n clearTimeout(hideTimeout.current);\n clearTimeout(immediateTimeout.current);\n };\n }, []);\n};","export const getDefaultCellValue = colDef => {\n switch (colDef.type) {\n case 'boolean':\n return false;\n case 'date':\n case 'dateTime':\n case 'number':\n return undefined;\n case 'singleSelect':\n return null;\n case 'string':\n default:\n return '';\n }\n};","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _toPropertyKey from \"@babel/runtime/helpers/esm/toPropertyKey\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"id\", \"field\"],\n _excluded2 = [\"id\", \"field\"];\nimport * as React from 'react';\nimport { unstable_useEventCallback as useEventCallback, unstable_useEnhancedEffect as useEnhancedEffect } from '@mui/utils';\nimport { warnOnce } from '@mui/x-internals/warning';\nimport { useGridApiEventHandler, useGridApiOptionHandler } from \"../../utils/useGridApiEventHandler.js\";\nimport { GridEditModes, GridCellModes } from \"../../../models/gridEditRowModel.js\";\nimport { useGridApiMethod } from \"../../utils/useGridApiMethod.js\";\nimport { gridEditRowsStateSelector } from \"./gridEditingSelectors.js\";\nimport { isPrintableKey, isPasteShortcut } from \"../../../utils/keyboardUtils.js\";\nimport { gridRowsDataRowIdToIdLookupSelector } from \"../rows/gridRowsSelector.js\";\nimport { deepClone } from \"../../../utils/utils.js\";\nimport { GridCellEditStartReasons, GridCellEditStopReasons } from \"../../../models/params/gridEditCellParams.js\";\nimport { getDefaultCellValue } from \"./utils.js\";\nexport const useGridCellEditing = (apiRef, props) => {\n const [cellModesModel, setCellModesModel] = React.useState({});\n const cellModesModelRef = React.useRef(cellModesModel);\n const prevCellModesModel = React.useRef({});\n const {\n processRowUpdate,\n onProcessRowUpdateError,\n cellModesModel: cellModesModelProp,\n onCellModesModelChange\n } = props;\n const runIfEditModeIsCell = callback => (...args) => {\n if (props.editMode === GridEditModes.Cell) {\n callback(...args);\n }\n };\n const throwIfNotEditable = React.useCallback((id, field) => {\n const params = apiRef.current.getCellParams(id, field);\n if (!apiRef.current.isCellEditable(params)) {\n throw new Error(`MUI X: The cell with id=${id} and field=${field} is not editable.`);\n }\n }, [apiRef]);\n const throwIfNotInMode = React.useCallback((id, field, mode) => {\n if (apiRef.current.getCellMode(id, field) !== mode) {\n throw new Error(`MUI X: The cell with id=${id} and field=${field} is not in ${mode} mode.`);\n }\n }, [apiRef]);\n const handleCellDoubleClick = React.useCallback((params, event) => {\n if (!params.isEditable) {\n return;\n }\n if (params.cellMode === GridCellModes.Edit) {\n return;\n }\n const newParams = _extends({}, params, {\n reason: GridCellEditStartReasons.cellDoubleClick\n });\n apiRef.current.publishEvent('cellEditStart', newParams, event);\n }, [apiRef]);\n const handleCellFocusOut = React.useCallback((params, event) => {\n if (params.cellMode === GridCellModes.View) {\n return;\n }\n if (apiRef.current.getCellMode(params.id, params.field) === GridCellModes.View) {\n return;\n }\n const newParams = _extends({}, params, {\n reason: GridCellEditStopReasons.cellFocusOut\n });\n apiRef.current.publishEvent('cellEditStop', newParams, event);\n }, [apiRef]);\n const handleCellKeyDown = React.useCallback((params, event) => {\n if (params.cellMode === GridCellModes.Edit) {\n // Wait until IME is settled for Asian languages like Japanese and Chinese\n // TODO: `event.which` is deprecated but this is a temporary workaround\n if (event.which === 229) {\n return;\n }\n let reason;\n if (event.key === 'Escape') {\n reason = GridCellEditStopReasons.escapeKeyDown;\n } else if (event.key === 'Enter') {\n reason = GridCellEditStopReasons.enterKeyDown;\n } else if (event.key === 'Tab') {\n reason = event.shiftKey ? GridCellEditStopReasons.shiftTabKeyDown : GridCellEditStopReasons.tabKeyDown;\n event.preventDefault(); // Prevent going to the next element in the tab sequence\n }\n if (reason) {\n const newParams = _extends({}, params, {\n reason\n });\n apiRef.current.publishEvent('cellEditStop', newParams, event);\n }\n } else if (params.isEditable) {\n let reason;\n const canStartEditing = apiRef.current.unstable_applyPipeProcessors('canStartEditing', true, {\n event,\n cellParams: params,\n editMode: 'cell'\n });\n if (!canStartEditing) {\n return;\n }\n if (isPrintableKey(event)) {\n reason = GridCellEditStartReasons.printableKeyDown;\n } else if (isPasteShortcut(event)) {\n reason = GridCellEditStartReasons.pasteKeyDown;\n } else if (event.key === 'Enter') {\n reason = GridCellEditStartReasons.enterKeyDown;\n } else if (event.key === 'Backspace' || event.key === 'Delete') {\n reason = GridCellEditStartReasons.deleteKeyDown;\n }\n if (reason) {\n const newParams = _extends({}, params, {\n reason,\n key: event.key\n });\n apiRef.current.publishEvent('cellEditStart', newParams, event);\n }\n }\n }, [apiRef]);\n const handleCellEditStart = React.useCallback(params => {\n const {\n id,\n field,\n reason\n } = params;\n const startCellEditModeParams = {\n id,\n field\n };\n if (reason === GridCellEditStartReasons.printableKeyDown || reason === GridCellEditStartReasons.deleteKeyDown || reason === GridCellEditStartReasons.pasteKeyDown) {\n startCellEditModeParams.deleteValue = true;\n }\n apiRef.current.startCellEditMode(startCellEditModeParams);\n }, [apiRef]);\n const handleCellEditStop = React.useCallback(params => {\n const {\n id,\n field,\n reason\n } = params;\n apiRef.current.runPendingEditCellValueMutation(id, field);\n let cellToFocusAfter;\n if (reason === GridCellEditStopReasons.enterKeyDown) {\n cellToFocusAfter = 'below';\n } else if (reason === GridCellEditStopReasons.tabKeyDown) {\n cellToFocusAfter = 'right';\n } else if (reason === GridCellEditStopReasons.shiftTabKeyDown) {\n cellToFocusAfter = 'left';\n }\n const ignoreModifications = reason === 'escapeKeyDown';\n apiRef.current.stopCellEditMode({\n id,\n field,\n ignoreModifications,\n cellToFocusAfter\n });\n }, [apiRef]);\n const runIfNoFieldErrors = callback => async (...args) => {\n if (callback) {\n const {\n id,\n field\n } = args[0];\n const editRowsState = apiRef.current.state.editRows;\n const hasFieldErrors = editRowsState[id][field]?.error;\n if (!hasFieldErrors) {\n callback(...args);\n }\n }\n };\n useGridApiEventHandler(apiRef, 'cellDoubleClick', runIfEditModeIsCell(handleCellDoubleClick));\n useGridApiEventHandler(apiRef, 'cellFocusOut', runIfEditModeIsCell(handleCellFocusOut));\n useGridApiEventHandler(apiRef, 'cellKeyDown', runIfEditModeIsCell(handleCellKeyDown));\n useGridApiEventHandler(apiRef, 'cellEditStart', runIfEditModeIsCell(handleCellEditStart));\n useGridApiEventHandler(apiRef, 'cellEditStop', runIfEditModeIsCell(handleCellEditStop));\n useGridApiOptionHandler(apiRef, 'cellEditStart', props.onCellEditStart);\n useGridApiOptionHandler(apiRef, 'cellEditStop', runIfNoFieldErrors(props.onCellEditStop));\n const getCellMode = React.useCallback((id, field) => {\n const editingState = gridEditRowsStateSelector(apiRef.current.state);\n const isEditing = editingState[id] && editingState[id][field];\n return isEditing ? GridCellModes.Edit : GridCellModes.View;\n }, [apiRef]);\n const updateCellModesModel = useEventCallback(newModel => {\n const isNewModelDifferentFromProp = newModel !== props.cellModesModel;\n if (onCellModesModelChange && isNewModelDifferentFromProp) {\n onCellModesModelChange(newModel, {\n api: apiRef.current\n });\n }\n if (props.cellModesModel && isNewModelDifferentFromProp) {\n return; // The prop always win\n }\n setCellModesModel(newModel);\n cellModesModelRef.current = newModel;\n apiRef.current.publishEvent('cellModesModelChange', newModel);\n });\n const updateFieldInCellModesModel = React.useCallback((id, field, newProps) => {\n // We use the ref because it always contain the up-to-date value, different from the state\n // that needs a rerender to reflect the new value\n const newModel = _extends({}, cellModesModelRef.current);\n if (newProps !== null) {\n newModel[id] = _extends({}, newModel[id], {\n [field]: _extends({}, newProps)\n });\n } else {\n const _newModel$id = newModel[id],\n otherFields = _objectWithoutPropertiesLoose(_newModel$id, [field].map(_toPropertyKey)); // Ensure that we have a new object, not a reference\n newModel[id] = otherFields;\n if (Object.keys(newModel[id]).length === 0) {\n delete newModel[id];\n }\n }\n updateCellModesModel(newModel);\n }, [updateCellModesModel]);\n const updateOrDeleteFieldState = React.useCallback((id, field, newProps) => {\n apiRef.current.setState(state => {\n const newEditingState = _extends({}, state.editRows);\n if (newProps !== null) {\n newEditingState[id] = _extends({}, newEditingState[id], {\n [field]: _extends({}, newProps)\n });\n } else {\n delete newEditingState[id][field];\n if (Object.keys(newEditingState[id]).length === 0) {\n delete newEditingState[id];\n }\n }\n return _extends({}, state, {\n editRows: newEditingState\n });\n });\n apiRef.current.forceUpdate();\n }, [apiRef]);\n const startCellEditMode = React.useCallback(params => {\n const {\n id,\n field\n } = params,\n other = _objectWithoutPropertiesLoose(params, _excluded);\n throwIfNotEditable(id, field);\n throwIfNotInMode(id, field, GridCellModes.View);\n updateFieldInCellModesModel(id, field, _extends({\n mode: GridCellModes.Edit\n }, other));\n }, [throwIfNotEditable, throwIfNotInMode, updateFieldInCellModesModel]);\n const updateStateToStartCellEditMode = useEventCallback(params => {\n const {\n id,\n field,\n deleteValue,\n initialValue\n } = params;\n let newValue = apiRef.current.getCellValue(id, field);\n if (deleteValue) {\n newValue = getDefaultCellValue(apiRef.current.getColumn(field));\n } else if (initialValue) {\n newValue = initialValue;\n }\n const newProps = {\n value: newValue,\n error: false,\n isProcessingProps: false\n };\n updateOrDeleteFieldState(id, field, newProps);\n apiRef.current.setCellFocus(id, field);\n });\n const stopCellEditMode = React.useCallback(params => {\n const {\n id,\n field\n } = params,\n other = _objectWithoutPropertiesLoose(params, _excluded2);\n throwIfNotInMode(id, field, GridCellModes.Edit);\n updateFieldInCellModesModel(id, field, _extends({\n mode: GridCellModes.View\n }, other));\n }, [throwIfNotInMode, updateFieldInCellModesModel]);\n const updateStateToStopCellEditMode = useEventCallback(async params => {\n const {\n id,\n field,\n ignoreModifications,\n cellToFocusAfter = 'none'\n } = params;\n throwIfNotInMode(id, field, GridCellModes.Edit);\n apiRef.current.runPendingEditCellValueMutation(id, field);\n const finishCellEditMode = () => {\n updateOrDeleteFieldState(id, field, null);\n updateFieldInCellModesModel(id, field, null);\n if (cellToFocusAfter !== 'none') {\n apiRef.current.moveFocusToRelativeCell(id, field, cellToFocusAfter);\n }\n };\n if (ignoreModifications) {\n finishCellEditMode();\n return;\n }\n const editingState = gridEditRowsStateSelector(apiRef.current.state);\n const {\n error,\n isProcessingProps\n } = editingState[id][field];\n if (error || isProcessingProps) {\n // Attempt to change cell mode to \"view\" was not successful\n // Update previous mode to allow another attempt\n prevCellModesModel.current[id][field].mode = GridCellModes.Edit;\n // Revert the mode in the cellModesModel prop back to \"edit\"\n updateFieldInCellModesModel(id, field, {\n mode: GridCellModes.Edit\n });\n return;\n }\n const rowUpdate = apiRef.current.getRowWithUpdatedValuesFromCellEditing(id, field);\n if (processRowUpdate) {\n const handleError = errorThrown => {\n prevCellModesModel.current[id][field].mode = GridCellModes.Edit;\n // Revert the mode in the cellModesModel prop back to \"edit\"\n updateFieldInCellModesModel(id, field, {\n mode: GridCellModes.Edit\n });\n if (onProcessRowUpdateError) {\n onProcessRowUpdateError(errorThrown);\n } else if (process.env.NODE_ENV !== 'production') {\n warnOnce(['MUI X: A call to `processRowUpdate` threw an error which was not handled because `onProcessRowUpdateError` is missing.', 'To handle the error pass a callback to the `onProcessRowUpdateError` prop, for example `<DataGrid onProcessRowUpdateError={(error) => ...} />`.', 'For more detail, see https://mui.com/x/react-data-grid/editing/#server-side-persistence.'], 'error');\n }\n };\n try {\n const row = apiRef.current.getRow(id);\n Promise.resolve(processRowUpdate(rowUpdate, row)).then(finalRowUpdate => {\n apiRef.current.updateRows([finalRowUpdate]);\n finishCellEditMode();\n }).catch(handleError);\n } catch (errorThrown) {\n handleError(errorThrown);\n }\n } else {\n apiRef.current.updateRows([rowUpdate]);\n finishCellEditMode();\n }\n });\n const setCellEditingEditCellValue = React.useCallback(async params => {\n const {\n id,\n field,\n value,\n debounceMs,\n unstable_skipValueParser: skipValueParser\n } = params;\n throwIfNotEditable(id, field);\n throwIfNotInMode(id, field, GridCellModes.Edit);\n const column = apiRef.current.getColumn(field);\n const row = apiRef.current.getRow(id);\n let parsedValue = value;\n if (column.valueParser && !skipValueParser) {\n parsedValue = column.valueParser(value, row, column, apiRef);\n }\n let editingState = gridEditRowsStateSelector(apiRef.current.state);\n let newProps = _extends({}, editingState[id][field], {\n value: parsedValue,\n changeReason: debounceMs ? 'debouncedSetEditCellValue' : 'setEditCellValue'\n });\n if (column.preProcessEditCellProps) {\n const hasChanged = value !== editingState[id][field].value;\n newProps = _extends({}, newProps, {\n isProcessingProps: true\n });\n updateOrDeleteFieldState(id, field, newProps);\n newProps = await Promise.resolve(column.preProcessEditCellProps({\n id,\n row,\n props: newProps,\n hasChanged\n }));\n }\n\n // Check again if the cell is in edit mode because the user may have\n // discarded the changes while the props were being processed.\n if (apiRef.current.getCellMode(id, field) === GridCellModes.View) {\n return false;\n }\n editingState = gridEditRowsStateSelector(apiRef.current.state);\n newProps = _extends({}, newProps, {\n isProcessingProps: false\n });\n // We don't update the value with the one coming from the props pre-processing\n // because when the promise resolves it may be already outdated. The only\n // exception to this rule is when there's no pre-processing.\n newProps.value = column.preProcessEditCellProps ? editingState[id][field].value : parsedValue;\n updateOrDeleteFieldState(id, field, newProps);\n editingState = gridEditRowsStateSelector(apiRef.current.state);\n return !editingState[id]?.[field]?.error;\n }, [apiRef, throwIfNotEditable, throwIfNotInMode, updateOrDeleteFieldState]);\n const getRowWithUpdatedValuesFromCellEditing = React.useCallback((id, field) => {\n const column = apiRef.current.getColumn(field);\n const editingState = gridEditRowsStateSelector(apiRef.current.state);\n const row = apiRef.current.getRow(id);\n if (!editingState[id] || !editingState[id][field]) {\n return apiRef.current.getRow(id);\n }\n const {\n value\n } = editingState[id][field];\n return column.valueSetter ? column.valueSetter(value, row, column, apiRef) : _extends({}, row, {\n [field]: value\n });\n }, [apiRef]);\n const editingApi = {\n getCellMode,\n startCellEditMode,\n stopCellEditMode\n };\n const editingPrivateApi = {\n setCellEditingEditCellValue,\n getRowWithUpdatedValuesFromCellEditing\n };\n useGridApiMethod(apiRef, editingApi, 'public');\n useGridApiMethod(apiRef, editingPrivateApi, 'private');\n React.useEffect(() => {\n if (cellModesModelProp) {\n updateCellModesModel(cellModesModelProp);\n }\n }, [cellModesModelProp, updateCellModesModel]);\n\n // Run this effect synchronously so that the keyboard event can impact the yet-to-be-rendered input.\n useEnhancedEffect(() => {\n const idToIdLookup = gridRowsDataRowIdToIdLookupSelector(apiRef);\n\n // Update the ref here because updateStateToStopCellEditMode may change it later\n const copyOfPrevCellModes = prevCellModesModel.current;\n prevCellModesModel.current = deepClone(cellModesModel); // Do a deep-clone because the attributes might be changed later\n\n Object.entries(cellModesModel).forEach(([id, fields]) => {\n Object.entries(fields).forEach(([field, params]) => {\n const prevMode = copyOfPrevCellModes[id]?.[field]?.mode || GridCellModes.View;\n const originalId = idToIdLookup[id] ?? id;\n if (params.mode === GridCellModes.Edit && prevMode === GridCellModes.View) {\n updateStateToStartCellEditMode(_extends({\n id: originalId,\n field\n }, params));\n } else if (params.mode === GridCellModes.View && prevMode === GridCellModes.Edit) {\n updateStateToStopCellEditMode(_extends({\n id: originalId,\n field\n }, params));\n }\n });\n });\n }, [apiRef, cellModesModel, updateStateToStartCellEditMode, updateStateToStopCellEditMode]);\n};","import _toPropertyKey from \"@babel/runtime/helpers/esm/toPropertyKey\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"id\"],\n _excluded2 = [\"id\"];\nimport * as React from 'react';\nimport { unstable_useEventCallback as useEventCallback, unstable_useEnhancedEffect as useEnhancedEffect } from '@mui/utils';\nimport { warnOnce } from '@mui/x-internals/warning';\nimport { useGridApiEventHandler, useGridApiOptionHandler } from \"../../utils/useGridApiEventHandler.js\";\nimport { GridEditModes, GridRowModes } from \"../../../models/gridEditRowModel.js\";\nimport { useGridApiMethod } from \"../../utils/useGridApiMethod.js\";\nimport { gridEditRowsStateSelector } from \"./gridEditingSelectors.js\";\nimport { isPrintableKey, isPasteShortcut } from \"../../../utils/keyboardUtils.js\";\nimport { gridColumnFieldsSelector, gridVisibleColumnFieldsSelector } from \"../columns/gridColumnsSelector.js\";\nimport { gridRowsDataRowIdToIdLookupSelector } from \"../rows/gridRowsSelector.js\";\nimport { deepClone } from \"../../../utils/utils.js\";\nimport { GridRowEditStopReasons, GridRowEditStartReasons } from \"../../../models/params/gridRowParams.js\";\nimport { GRID_ACTIONS_COLUMN_TYPE } from \"../../../colDef/index.js\";\nimport { getDefaultCellValue } from \"./utils.js\";\nexport const useGridRowEditing = (apiRef, props) => {\n const [rowModesModel, setRowModesModel] = React.useState({});\n const rowModesModelRef = React.useRef(rowModesModel);\n const prevRowModesModel = React.useRef({});\n const focusTimeout = React.useRef();\n const nextFocusedCell = React.useRef(null);\n const {\n processRowUpdate,\n onProcessRowUpdateError,\n rowModesModel: rowModesModelProp,\n onRowModesModelChange\n } = props;\n const runIfEditModeIsRow = callback => (...args) => {\n if (props.editMode === GridEditModes.Row) {\n callback(...args);\n }\n };\n const throwIfNotEditable = React.useCallback((id, field) => {\n const params = apiRef.current.getCellParams(id, field);\n if (!apiRef.current.isCellEditable(params)) {\n throw new Error(`MUI X: The cell with id=${id} and field=${field} is not editable.`);\n }\n }, [apiRef]);\n const throwIfNotInMode = React.useCallback((id, mode) => {\n if (apiRef.current.getRowMode(id) !== mode) {\n throw new Error(`MUI X: The row with id=${id} is not in ${mode} mode.`);\n }\n }, [apiRef]);\n const hasFieldsWithErrors = React.useCallback(rowId => {\n const editingState = gridEditRowsStateSelector(apiRef.current.state);\n return Object.values(editingState[rowId]).some(fieldProps => fieldProps.error);\n }, [apiRef]);\n const handleCellDoubleClick = React.useCallback((params, event) => {\n if (!params.isEditable) {\n return;\n }\n if (apiRef.current.getRowMode(params.id) === GridRowModes.Edit) {\n return;\n }\n const rowParams = apiRef.current.getRowParams(params.id);\n const newParams = _extends({}, rowParams, {\n field: params.field,\n reason: GridRowEditStartReasons.cellDoubleClick\n });\n apiRef.current.publishEvent('rowEditStart', newParams, event);\n }, [apiRef]);\n const handleCellFocusIn = React.useCallback(params => {\n nextFocusedCell.current = params;\n }, []);\n const handleCellFocusOut = React.useCallback((params, event) => {\n if (!params.isEditable) {\n return;\n }\n if (apiRef.current.getRowMode(params.id) === GridRowModes.View) {\n return;\n }\n // The mechanism to detect if we can stop editing a row is different from\n // the cell editing. Instead of triggering it when clicking outside a cell,\n // we must check if another cell in the same row was not clicked. To achieve\n // that, first we keep track of all cells that gained focus. When a cell loses\n // focus we check if the next cell that received focus is from a different row.\n nextFocusedCell.current = null;\n focusTimeout.current = setTimeout(() => {\n if (nextFocusedCell.current?.id !== params.id) {\n // The row might have been deleted during the click\n if (!apiRef.current.getRow(params.id)) {\n return;\n }\n\n // The row may already changed its mode\n if (apiRef.current.getRowMode(params.id) === GridRowModes.View) {\n return;\n }\n if (hasFieldsWithErrors(params.id)) {\n return;\n }\n const rowParams = apiRef.current.getRowParams(params.id);\n const newParams = _extends({}, rowParams, {\n field: params.field,\n reason: GridRowEditStopReasons.rowFocusOut\n });\n apiRef.current.publishEvent('rowEditStop', newParams, event);\n }\n });\n }, [apiRef, hasFieldsWithErrors]);\n React.useEffect(() => {\n return () => {\n clearTimeout(focusTimeout.current);\n };\n }, []);\n const handleCellKeyDown = React.useCallback((params, event) => {\n if (params.cellMode === GridRowModes.Edit) {\n // Wait until IME is settled for Asian languages like Japanese and Chinese\n // TODO: `event.which` is deprecated but this is a temporary workaround\n if (event.which === 229) {\n return;\n }\n let reason;\n if (event.key === 'Escape') {\n reason = GridRowEditStopReasons.escapeKeyDown;\n } else if (event.key === 'Enter') {\n reason = GridRowEditStopReasons.enterKeyDown;\n } else if (event.key === 'Tab') {\n const columnFields = gridVisibleColumnFieldsSelector(apiRef).filter(field => {\n const column = apiRef.current.getColumn(field);\n if (column.type === GRID_ACTIONS_COLUMN_TYPE) {\n return true;\n }\n return apiRef.current.isCellEditable(apiRef.current.getCellParams(params.id, field));\n });\n if (event.shiftKey) {\n if (params.field === columnFields[0]) {\n // Exit if user pressed Shift+Tab on the first field\n reason = GridRowEditStopReasons.shiftTabKeyDown;\n }\n } else if (params.field === columnFields[columnFields.length - 1]) {\n // Exit if user pressed Tab on the last field\n reason = GridRowEditStopReasons.tabKeyDown;\n }\n\n // Always prevent going to the next element in the tab sequence because the focus is\n // handled manually to support edit components rendered inside Portals\n event.preventDefault();\n if (!reason) {\n const index = columnFields.findIndex(field => field === params.field);\n const nextFieldToFocus = columnFields[event.shiftKey ? index - 1 : index + 1];\n apiRef.current.setCellFocus(params.id, nextFieldToFocus);\n }\n }\n if (reason) {\n if (reason !== GridRowEditStopReasons.escapeKeyDown && hasFieldsWithErrors(params.id)) {\n return;\n }\n const newParams = _extends({}, apiRef.current.getRowParams(params.id), {\n reason,\n field: params.field\n });\n apiRef.current.publishEvent('rowEditStop', newParams, event);\n }\n } else if (params.isEditable) {\n let reason;\n const canStartEditing = apiRef.current.unstable_applyPipeProcessors('canStartEditing', true, {\n event,\n cellParams: params,\n editMode: 'row'\n });\n if (!canStartEditing) {\n return;\n }\n if (isPrintableKey(event)) {\n reason = GridRowEditStartReasons.printableKeyDown;\n } else if (isPasteShortcut(event)) {\n reason = GridRowEditStartReasons.printableKeyDown;\n } else if (event.key === 'Enter') {\n reason = GridRowEditStartReasons.enterKeyDown;\n } else if (event.key === 'Backspace' || event.key === 'Delete') {\n reason = GridRowEditStartReasons.deleteKeyDown;\n }\n if (reason) {\n const rowParams = apiRef.current.getRowParams(params.id);\n const newParams = _extends({}, rowParams, {\n field: params.field,\n reason\n });\n apiRef.current.publishEvent('rowEditStart', newParams, event);\n }\n }\n }, [apiRef, hasFieldsWithErrors]);\n const handleRowEditStart = React.useCallback(params => {\n const {\n id,\n field,\n reason\n } = params;\n const startRowEditModeParams = {\n id,\n fieldToFocus: field\n };\n if (reason === GridRowEditStartReasons.printableKeyDown || reason === GridRowEditStartReasons.deleteKeyDown) {\n startRowEditModeParams.deleteValue = !!field;\n }\n apiRef.current.startRowEditMode(startRowEditModeParams);\n }, [apiRef]);\n const handleRowEditStop = React.useCallback(params => {\n const {\n id,\n reason,\n field\n } = params;\n apiRef.current.runPendingEditCellValueMutation(id);\n let cellToFocusAfter;\n if (reason === GridRowEditStopReasons.enterKeyDown) {\n cellToFocusAfter = 'below';\n } else if (reason === GridRowEditStopReasons.tabKeyDown) {\n cellToFocusAfter = 'right';\n } else if (reason === GridRowEditStopReasons.shiftTabKeyDown) {\n cellToFocusAfter = 'left';\n }\n const ignoreModifications = reason === 'escapeKeyDown';\n apiRef.current.stopRowEditMode({\n id,\n ignoreModifications,\n field,\n cellToFocusAfter\n });\n }, [apiRef]);\n useGridApiEventHandler(apiRef, 'cellDoubleClick', runIfEditModeIsRow(handleCellDoubleClick));\n useGridApiEventHandler(apiRef, 'cellFocusIn', runIfEditModeIsRow(handleCellFocusIn));\n useGridApiEventHandler(apiRef, 'cellFocusOut', runIfEditModeIsRow(handleCellFocusOut));\n useGridApiEventHandler(apiRef, 'cellKeyDown', runIfEditModeIsRow(handleCellKeyDown));\n useGridApiEventHandler(apiRef, 'rowEditStart', runIfEditModeIsRow(handleRowEditStart));\n useGridApiEventHandler(apiRef, 'rowEditStop', runIfEditModeIsRow(handleRowEditStop));\n useGridApiOptionHandler(apiRef, 'rowEditStart', props.onRowEditStart);\n useGridApiOptionHandler(apiRef, 'rowEditStop', props.onRowEditStop);\n const getRowMode = React.useCallback(id => {\n if (props.editMode === GridEditModes.Cell) {\n return GridRowModes.View;\n }\n const editingState = gridEditRowsStateSelector(apiRef.current.state);\n const isEditing = editingState[id] && Object.keys(editingState[id]).length > 0;\n return isEditing ? GridRowModes.Edit : GridRowModes.View;\n }, [apiRef, props.editMode]);\n const updateRowModesModel = useEventCallback(newModel => {\n const isNewModelDifferentFromProp = newModel !== props.rowModesModel;\n if (onRowModesModelChange && isNewModelDifferentFromProp) {\n onRowModesModelChange(newModel, {\n api: apiRef.current\n });\n }\n if (props.rowModesModel && isNewModelDifferentFromProp) {\n return; // The prop always win\n }\n setRowModesModel(newModel);\n rowModesModelRef.current = newModel;\n apiRef.current.publishEvent('rowModesModelChange', newModel);\n });\n const updateRowInRowModesModel = React.useCallback((id, newProps) => {\n const newModel = _extends({}, rowModesModelRef.current);\n if (newProps !== null) {\n newModel[id] = _extends({}, newProps);\n } else {\n delete newModel[id];\n }\n updateRowModesModel(newModel);\n }, [updateRowModesModel]);\n const updateOrDeleteRowState = React.useCallback((id, newProps) => {\n apiRef.current.setState(state => {\n const newEditingState = _extends({}, state.editRows);\n if (newProps !== null) {\n newEditingState[id] = newProps;\n } else {\n delete newEditingState[id];\n }\n return _extends({}, state, {\n editRows: newEditingState\n });\n });\n apiRef.current.forceUpdate();\n }, [apiRef]);\n const updateOrDeleteFieldState = React.useCallback((id, field, newProps) => {\n apiRef.current.setState(state => {\n const newEditingState = _extends({}, state.editRows);\n if (newProps !== null) {\n newEditingState[id] = _extends({}, newEditingState[id], {\n [field]: _extends({}, newProps)\n });\n } else {\n delete newEditingState[id][field];\n if (Object.keys(newEditingState[id]).length === 0) {\n delete newEditingState[id];\n }\n }\n return _extends({}, state, {\n editRows: newEditingState\n });\n });\n apiRef.current.forceUpdate();\n }, [apiRef]);\n const startRowEditMode = React.useCallback(params => {\n const {\n id\n } = params,\n other = _objectWithoutPropertiesLoose(params, _excluded);\n throwIfNotInMode(id, GridRowModes.View);\n updateRowInRowModesModel(id, _extends({\n mode: GridRowModes.Edit\n }, other));\n }, [throwIfNotInMode, updateRowInRowModesModel]);\n const updateStateToStartRowEditMode = useEventCallback(params => {\n const {\n id,\n fieldToFocus,\n deleteValue,\n initialValue\n } = params;\n const columnFields = gridColumnFieldsSelector(apiRef);\n const newProps = columnFields.reduce((acc, field) => {\n const cellParams = apiRef.current.getCellParams(id, field);\n if (!cellParams.isEditable) {\n return acc;\n }\n let newValue = apiRef.current.getCellValue(id, field);\n if (fieldToFocus === field && (deleteValue || initialValue)) {\n if (deleteValue) {\n newValue = getDefaultCellValue(apiRef.current.getColumn(field));\n } else if (initialValue) {\n newValue = initialValue;\n }\n }\n acc[field] = {\n value: newValue,\n error: false,\n isProcessingProps: false\n };\n return acc;\n }, {});\n updateOrDeleteRowState(id, newProps);\n if (fieldToFocus) {\n apiRef.current.setCellFocus(id, fieldToFocus);\n }\n });\n const stopRowEditMode = React.useCallback(params => {\n const {\n id\n } = params,\n other = _objectWithoutPropertiesLoose(params, _excluded2);\n throwIfNotInMode(id, GridRowModes.Edit);\n updateRowInRowModesModel(id, _extends({\n mode: GridRowModes.View\n }, other));\n }, [throwIfNotInMode, updateRowInRowModesModel]);\n const updateStateToStopRowEditMode = useEventCallback(params => {\n const {\n id,\n ignoreModifications,\n field: focusedField,\n cellToFocusAfter = 'none'\n } = params;\n apiRef.current.runPendingEditCellValueMutation(id);\n const finishRowEditMode = () => {\n if (cellToFocusAfter !== 'none' && focusedField) {\n apiRef.current.moveFocusToRelativeCell(id, focusedField, cellToFocusAfter);\n }\n updateOrDeleteRowState(id, null);\n updateRowInRowModesModel(id, null);\n };\n if (ignoreModifications) {\n finishRowEditMode();\n return;\n }\n const editingState = gridEditRowsStateSelector(apiRef.current.state);\n const row = apiRef.current.getRow(id);\n const isSomeFieldProcessingProps = Object.values(editingState[id]).some(fieldProps => fieldProps.isProcessingProps);\n if (isSomeFieldProcessingProps) {\n prevRowModesModel.current[id].mode = GridRowModes.Edit;\n return;\n }\n if (hasFieldsWithErrors(id)) {\n prevRowModesModel.current[id].mode = GridRowModes.Edit;\n // Revert the mode in the rowModesModel prop back to \"edit\"\n updateRowInRowModesModel(id, {\n mode: GridRowModes.Edit\n });\n return;\n }\n const rowUpdate = apiRef.current.getRowWithUpdatedValuesFromRowEditing(id);\n if (processRowUpdate) {\n const handleError = errorThrown => {\n prevRowModesModel.current[id].mode = GridRowModes.Edit;\n // Revert the mode in the rowModesModel prop back to \"edit\"\n updateRowInRowModesModel(id, {\n mode: GridRowModes.Edit\n });\n if (onProcessRowUpdateError) {\n onProcessRowUpdateError(errorThrown);\n } else if (process.env.NODE_ENV !== 'production') {\n warnOnce(['MUI X: A call to `processRowUpdate` threw an error which was not handled because `onProcessRowUpdateError` is missing.', 'To handle the error pass a callback to the `onProcessRowUpdateError` prop, for example `<DataGrid onProcessRowUpdateError={(error) => ...} />`.', 'For more detail, see https://mui.com/x/react-data-grid/editing/#server-side-persistence.'], 'error');\n }\n };\n try {\n Promise.resolve(processRowUpdate(rowUpdate, row)).then(finalRowUpdate => {\n apiRef.current.updateRows([finalRowUpdate]);\n finishRowEditMode();\n }).catch(handleError);\n } catch (errorThrown) {\n handleError(errorThrown);\n }\n } else {\n apiRef.current.updateRows([rowUpdate]);\n finishRowEditMode();\n }\n });\n const setRowEditingEditCellValue = React.useCallback(params => {\n const {\n id,\n field,\n value,\n debounceMs,\n unstable_skipValueParser: skipValueParser\n } = params;\n throwIfNotEditable(id, field);\n const column = apiRef.current.getColumn(field);\n const row = apiRef.current.getRow(id);\n let parsedValue = value;\n if (column.valueParser && !skipValueParser) {\n parsedValue = column.valueParser(value, row, column, apiRef);\n }\n let editingState = gridEditRowsStateSelector(apiRef.current.state);\n let newProps = _extends({}, editingState[id][field], {\n value: parsedValue,\n changeReason: debounceMs ? 'debouncedSetEditCellValue' : 'setEditCellValue'\n });\n if (!column.preProcessEditCellProps) {\n updateOrDeleteFieldState(id, field, newProps);\n }\n return new Promise(resolve => {\n const promises = [];\n if (column.preProcessEditCellProps) {\n const hasChanged = newProps.value !== editingState[id][field].value;\n newProps = _extends({}, newProps, {\n isProcessingProps: true\n });\n updateOrDeleteFieldState(id, field, newProps);\n const _editingState$id = editingState[id],\n otherFieldsProps = _objectWithoutPropertiesLoose(_editingState$id, [field].map(_toPropertyKey));\n const promise = Promise.resolve(column.preProcessEditCellProps({\n id,\n row,\n props: newProps,\n hasChanged,\n otherFieldsProps\n })).then(processedProps => {\n // Check again if the row is in edit mode because the user may have\n // discarded the changes while the props were being processed.\n if (apiRef.current.getRowMode(id) === GridRowModes.View) {\n resolve(false);\n return;\n }\n editingState = gridEditRowsStateSelector(apiRef.current.state);\n processedProps = _extends({}, processedProps, {\n isProcessingProps: false\n });\n // We don't reuse the value from the props pre-processing because when the\n // promise resolves it may be already outdated. The only exception to this rule\n // is when there's no pre-processing.\n processedProps.value = column.preProcessEditCellProps ? editingState[id][field].value : parsedValue;\n updateOrDeleteFieldState(id, field, processedProps);\n });\n promises.push(promise);\n }\n Object.entries(editingState[id]).forEach(([thisField, fieldProps]) => {\n if (thisField === field) {\n return;\n }\n const fieldColumn = apiRef.current.getColumn(thisField);\n if (!fieldColumn.preProcessEditCellProps) {\n return;\n }\n fieldProps = _extends({}, fieldProps, {\n isProcessingProps: true\n });\n updateOrDeleteFieldState(id, thisField, fieldProps);\n editingState = gridEditRowsStateSelector(apiRef.current.state);\n const _editingState$id2 = editingState[id],\n otherFieldsProps = _objectWithoutPropertiesLoose(_editingState$id2, [thisField].map(_toPropertyKey));\n const promise = Promise.resolve(fieldColumn.preProcessEditCellProps({\n id,\n row,\n props: fieldProps,\n hasChanged: false,\n otherFieldsProps\n })).then(processedProps => {\n // Check again if the row is in edit mode because the user may have\n // discarded the changes while the props were being processed.\n if (apiRef.current.getRowMode(id) === GridRowModes.View) {\n resolve(false);\n return;\n }\n processedProps = _extends({}, processedProps, {\n isProcessingProps: false\n });\n updateOrDeleteFieldState(id, thisField, processedProps);\n });\n promises.push(promise);\n });\n Promise.all(promises).then(() => {\n if (apiRef.current.getRowMode(id) === GridRowModes.Edit) {\n editingState = gridEditRowsStateSelector(apiRef.current.state);\n resolve(!editingState[id][field].error);\n } else {\n resolve(false);\n }\n });\n });\n }, [apiRef, throwIfNotEditable, updateOrDeleteFieldState]);\n const getRowWithUpdatedValuesFromRowEditing = React.useCallback(id => {\n const editingState = gridEditRowsStateSelector(apiRef.current.state);\n const row = apiRef.current.getRow(id);\n if (!editingState[id]) {\n return apiRef.current.getRow(id);\n }\n let rowUpdate = _extends({}, row);\n Object.entries(editingState[id]).forEach(([field, fieldProps]) => {\n const column = apiRef.current.getColumn(field);\n if (column.valueSetter) {\n rowUpdate = column.valueSetter(fieldProps.value, rowUpdate, column, apiRef);\n } else {\n rowUpdate[field] = fieldProps.value;\n }\n });\n return rowUpdate;\n }, [apiRef]);\n const editingApi = {\n getRowMode,\n startRowEditMode,\n stopRowEditMode\n };\n const editingPrivateApi = {\n setRowEditingEditCellValue,\n getRowWithUpdatedValuesFromRowEditing\n };\n useGridApiMethod(apiRef, editingApi, 'public');\n useGridApiMethod(apiRef, editingPrivateApi, 'private');\n React.useEffect(() => {\n if (rowModesModelProp) {\n updateRowModesModel(rowModesModelProp);\n }\n }, [rowModesModelProp, updateRowModesModel]);\n\n // Run this effect synchronously so that the keyboard event can impact the yet-to-be-rendered input.\n useEnhancedEffect(() => {\n const idToIdLookup = gridRowsDataRowIdToIdLookupSelector(apiRef);\n\n // Update the ref here because updateStateToStopRowEditMode may change it later\n const copyOfPrevRowModesModel = prevRowModesModel.current;\n prevRowModesModel.current = deepClone(rowModesModel); // Do a deep-clone because the attributes might be changed later\n\n const ids = new Set([...Object.keys(rowModesModel), ...Object.keys(copyOfPrevRowModesModel)]);\n Array.from(ids).forEach(id => {\n const params = rowModesModel[id] ?? {\n mode: GridRowModes.View\n };\n const prevMode = copyOfPrevRowModesModel[id]?.mode || GridRowModes.View;\n const originalId = idToIdLookup[id] ?? id;\n if (params.mode === GridRowModes.Edit && prevMode === GridRowModes.View) {\n updateStateToStartRowEditMode(_extends({\n id: originalId\n }, params));\n } else if (params.mode === GridRowModes.View && prevMode === GridRowModes.Edit) {\n updateStateToStopRowEditMode(_extends({\n id: originalId\n }, params));\n }\n });\n }, [apiRef, rowModesModel, updateStateToStartRowEditMode, updateStateToStopRowEditMode]);\n};","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport { useGridApiMethod } from \"../../utils/useGridApiMethod.js\";\nimport { useGridCellEditing } from \"./useGridCellEditing.js\";\nimport { GridCellModes, GridEditModes } from \"../../../models/gridEditRowModel.js\";\nimport { useGridRowEditing } from \"./useGridRowEditing.js\";\nimport { gridEditRowsStateSelector } from \"./gridEditingSelectors.js\";\nimport { isAutogeneratedRowNode } from \"../rows/gridRowsUtils.js\";\nexport const editingStateInitializer = state => _extends({}, state, {\n editRows: {}\n});\nexport const useGridEditing = (apiRef, props) => {\n useGridCellEditing(apiRef, props);\n useGridRowEditing(apiRef, props);\n const debounceMap = React.useRef({});\n const {\n isCellEditable: isCellEditableProp\n } = props;\n const isCellEditable = React.useCallback(params => {\n if (isAutogeneratedRowNode(params.rowNode)) {\n return false;\n }\n if (!params.colDef.editable) {\n return false;\n }\n if (!params.colDef.renderEditCell) {\n return false;\n }\n if (isCellEditableProp) {\n return isCellEditableProp(params);\n }\n return true;\n }, [isCellEditableProp]);\n const maybeDebounce = (id, field, debounceMs, callback) => {\n if (!debounceMs) {\n callback();\n return;\n }\n if (!debounceMap.current[id]) {\n debounceMap.current[id] = {};\n }\n if (debounceMap.current[id][field]) {\n const [timeout] = debounceMap.current[id][field];\n clearTimeout(timeout);\n }\n\n // To run the callback immediately without waiting the timeout\n const runImmediately = () => {\n const [timeout] = debounceMap.current[id][field];\n clearTimeout(timeout);\n callback();\n delete debounceMap.current[id][field];\n };\n const timeout = setTimeout(() => {\n callback();\n delete debounceMap.current[id][field];\n }, debounceMs);\n debounceMap.current[id][field] = [timeout, runImmediately];\n };\n React.useEffect(() => {\n const debounces = debounceMap.current;\n return () => {\n Object.entries(debounces).forEach(([id, fields]) => {\n Object.keys(fields).forEach(field => {\n const [timeout] = debounces[id][field];\n clearTimeout(timeout);\n delete debounces[id][field];\n });\n });\n };\n }, []);\n const runPendingEditCellValueMutation = React.useCallback((id, field) => {\n if (!debounceMap.current[id]) {\n return;\n }\n if (!field) {\n Object.keys(debounceMap.current[id]).forEach(debouncedField => {\n const [, runCallback] = debounceMap.current[id][debouncedField];\n runCallback();\n });\n } else if (debounceMap.current[id][field]) {\n const [, runCallback] = debounceMap.current[id][field];\n runCallback();\n }\n }, []);\n const setEditCellValue = React.useCallback(params => {\n const {\n id,\n field,\n debounceMs\n } = params;\n return new Promise(resolve => {\n maybeDebounce(id, field, debounceMs, async () => {\n const setEditCellValueToCall = props.editMode === GridEditModes.Row ? apiRef.current.setRowEditingEditCellValue : apiRef.current.setCellEditingEditCellValue;\n\n // Check if the cell is in edit mode\n // By the time this callback runs the user may have cancelled the editing\n if (apiRef.current.getCellMode(id, field) === GridCellModes.Edit) {\n const result = await setEditCellValueToCall(params);\n resolve(result);\n }\n });\n });\n }, [apiRef, props.editMode]);\n const getRowWithUpdatedValues = React.useCallback((id, field) => {\n return props.editMode === GridEditModes.Cell ? apiRef.current.getRowWithUpdatedValuesFromCellEditing(id, field) : apiRef.current.getRowWithUpdatedValuesFromRowEditing(id);\n }, [apiRef, props.editMode]);\n const getEditCellMeta = React.useCallback((id, field) => {\n const editingState = gridEditRowsStateSelector(apiRef.current.state);\n return editingState[id]?.[field] ?? null;\n }, [apiRef]);\n const editingSharedApi = {\n isCellEditable,\n setEditCellValue,\n getRowWithUpdatedValues,\n unstable_getEditCellMeta: getEditCellMeta\n };\n const editingSharedPrivateApi = {\n runPendingEditCellValueMutation\n };\n useGridApiMethod(apiRef, editingSharedApi, 'public');\n useGridApiMethod(apiRef, editingSharedPrivateApi, 'private');\n};","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport { useGridApiMethod } from \"../../utils/useGridApiMethod.js\";\nimport { useGridLogger } from \"../../utils/useGridLogger.js\";\nimport { gridRowCountSelector, gridRowsLookupSelector, gridRowTreeSelector, gridRowGroupingNameSelector, gridRowTreeDepthsSelector, gridDataRowIdsSelector, gridRowsDataRowIdToIdLookupSelector, gridRowMaximumTreeDepthSelector, gridRowGroupsToFetchSelector } from \"./gridRowsSelector.js\";\nimport { useTimeout } from \"../../utils/useTimeout.js\";\nimport { GridSignature, useGridApiEventHandler } from \"../../utils/useGridApiEventHandler.js\";\nimport { useGridVisibleRows } from \"../../utils/useGridVisibleRows.js\";\nimport { gridSortedRowIdsSelector } from \"../sorting/gridSortingSelector.js\";\nimport { gridFilteredRowsLookupSelector } from \"../filter/gridFilterSelector.js\";\nimport { getTreeNodeDescendants, createRowsInternalCache, getRowsStateFromCache, isAutogeneratedRowNode, GRID_ROOT_GROUP_ID, GRID_ID_AUTOGENERATED, updateCacheWithNewRows, getTopLevelRowCount, getRowIdFromRowModel, computeRowsUpdates } from \"./gridRowsUtils.js\";\nimport { useGridRegisterPipeApplier } from \"../../core/pipeProcessing/index.js\";\nexport const rowsStateInitializer = (state, props, apiRef) => {\n const isDataSourceAvailable = !!props.unstable_dataSource;\n apiRef.current.caches.rows = createRowsInternalCache({\n rows: isDataSourceAvailable ? [] : props.rows,\n getRowId: props.getRowId,\n loading: props.loading,\n rowCount: props.rowCount\n });\n return _extends({}, state, {\n rows: getRowsStateFromCache({\n apiRef,\n rowCountProp: props.rowCount,\n loadingProp: isDataSourceAvailable ? true : props.loading,\n previousTree: null,\n previousTreeDepths: null\n })\n });\n};\nexport const useGridRows = (apiRef, props) => {\n if (process.env.NODE_ENV !== 'production') {\n try {\n // Freeze the `rows` prop so developers have a fast failure if they try to use Array.prototype.push().\n Object.freeze(props.rows);\n } catch (error) {\n // Sometimes, it's impossible to freeze, so we give up on it.\n }\n }\n const logger = useGridLogger(apiRef, 'useGridRows');\n const currentPage = useGridVisibleRows(apiRef, props);\n const lastUpdateMs = React.useRef(Date.now());\n const lastRowCount = React.useRef(props.rowCount);\n const timeout = useTimeout();\n const getRow = React.useCallback(id => {\n const model = gridRowsLookupSelector(apiRef)[id];\n if (model) {\n return model;\n }\n const node = apiRef.current.getRowNode(id);\n if (node && isAutogeneratedRowNode(node)) {\n return {\n [GRID_ID_AUTOGENERATED]: id\n };\n }\n return null;\n }, [apiRef]);\n const getRowIdProp = props.getRowId;\n const getRowId = React.useCallback(row => {\n if (GRID_ID_AUTOGENERATED in row) {\n return row[GRID_ID_AUTOGENERATED];\n }\n if (getRowIdProp) {\n return getRowIdProp(row);\n }\n return row.id;\n }, [getRowIdProp]);\n const lookup = React.useMemo(() => currentPage.rows.reduce((acc, {\n id\n }, index) => {\n acc[id] = index;\n return acc;\n }, {}), [currentPage.rows]);\n const throttledRowsChange = React.useCallback(({\n cache,\n throttle\n }) => {\n const run = () => {\n lastUpdateMs.current = Date.now();\n apiRef.current.setState(state => _extends({}, state, {\n rows: getRowsStateFromCache({\n apiRef,\n rowCountProp: props.rowCount,\n loadingProp: props.loading,\n previousTree: gridRowTreeSelector(apiRef),\n previousTreeDepths: gridRowTreeDepthsSelector(apiRef),\n previousGroupsToFetch: gridRowGroupsToFetchSelector(apiRef)\n })\n }));\n apiRef.current.publishEvent('rowsSet');\n apiRef.current.forceUpdate();\n };\n timeout.clear();\n apiRef.current.caches.rows = cache;\n if (!throttle) {\n run();\n return;\n }\n const throttleRemainingTimeMs = props.throttleRowsMs - (Date.now() - lastUpdateMs.current);\n if (throttleRemainingTimeMs > 0) {\n timeout.start(throttleRemainingTimeMs, run);\n return;\n }\n run();\n }, [props.throttleRowsMs, props.rowCount, props.loading, apiRef, timeout]);\n\n /**\n * API METHODS\n */\n const setRows = React.useCallback(rows => {\n logger.debug(`Updating all rows, new length ${rows.length}`);\n const cache = createRowsInternalCache({\n rows,\n getRowId: props.getRowId,\n loading: props.loading,\n rowCount: props.rowCount\n });\n const prevCache = apiRef.current.caches.rows;\n cache.rowsBeforePartialUpdates = prevCache.rowsBeforePartialUpdates;\n throttledRowsChange({\n cache,\n throttle: true\n });\n }, [logger, props.getRowId, props.loading, props.rowCount, throttledRowsChange, apiRef]);\n const updateRows = React.useCallback(updates => {\n if (props.signature === GridSignature.DataGrid && updates.length > 1) {\n throw new Error(['MUI X: You cannot update several rows at once in `apiRef.current.updateRows` on the DataGrid.', 'You need to upgrade to DataGridPro or DataGridPremium component to unlock this feature.'].join('\\n'));\n }\n const nonPinnedRowsUpdates = computeRowsUpdates(apiRef, updates, props.getRowId);\n const cache = updateCacheWithNewRows({\n updates: nonPinnedRowsUpdates,\n getRowId: props.getRowId,\n previousCache: apiRef.current.caches.rows\n });\n throttledRowsChange({\n cache,\n throttle: true\n });\n }, [props.signature, props.getRowId, throttledRowsChange, apiRef]);\n const updateServerRows = React.useCallback((updates, groupKeys) => {\n const nonPinnedRowsUpdates = computeRowsUpdates(apiRef, updates, props.getRowId);\n const cache = updateCacheWithNewRows({\n updates: nonPinnedRowsUpdates,\n getRowId: props.getRowId,\n previousCache: apiRef.current.caches.rows,\n groupKeys: groupKeys ?? []\n });\n throttledRowsChange({\n cache,\n throttle: false\n });\n }, [props.getRowId, throttledRowsChange, apiRef]);\n const setLoading = React.useCallback(loading => {\n if (loading === props.loading) {\n return;\n }\n logger.debug(`Setting loading to ${loading}`);\n apiRef.current.setState(state => _extends({}, state, {\n rows: _extends({}, state.rows, {\n loading\n })\n }));\n apiRef.current.caches.rows.loadingPropBeforePartialUpdates = loading;\n }, [props.loading, apiRef, logger]);\n const getRowModels = React.useCallback(() => {\n const dataRows = gridDataRowIdsSelector(apiRef);\n const idRowsLookup = gridRowsLookupSelector(apiRef);\n return new Map(dataRows.map(id => [id, idRowsLookup[id] ?? {}]));\n }, [apiRef]);\n const getRowsCount = React.useCallback(() => gridRowCountSelector(apiRef), [apiRef]);\n const getAllRowIds = React.useCallback(() => gridDataRowIdsSelector(apiRef), [apiRef]);\n const getRowIndexRelativeToVisibleRows = React.useCallback(id => lookup[id], [lookup]);\n const setRowChildrenExpansion = React.useCallback((id, isExpanded) => {\n const currentNode = apiRef.current.getRowNode(id);\n if (!currentNode) {\n throw new Error(`MUI X: No row with id #${id} found.`);\n }\n if (currentNode.type !== 'group') {\n throw new Error('MUI X: Only group nodes can be expanded or collapsed.');\n }\n const newNode = _extends({}, currentNode, {\n childrenExpanded: isExpanded\n });\n apiRef.current.setState(state => {\n return _extends({}, state, {\n rows: _extends({}, state.rows, {\n tree: _extends({}, state.rows.tree, {\n [id]: newNode\n })\n })\n });\n });\n apiRef.current.forceUpdate();\n apiRef.current.publishEvent('rowExpansionChange', newNode);\n }, [apiRef]);\n const getRowNode = React.useCallback(id => gridRowTreeSelector(apiRef)[id] ?? null, [apiRef]);\n const getRowGroupChildren = React.useCallback(({\n skipAutoGeneratedRows = true,\n groupId,\n applySorting,\n applyFiltering\n }) => {\n const tree = gridRowTreeSelector(apiRef);\n let children;\n if (applySorting) {\n const groupNode = tree[groupId];\n if (!groupNode) {\n return [];\n }\n const sortedRowIds = gridSortedRowIdsSelector(apiRef);\n children = [];\n const startIndex = sortedRowIds.findIndex(id => id === groupId) + 1;\n for (let index = startIndex; index < sortedRowIds.length && tree[sortedRowIds[index]].depth > groupNode.depth; index += 1) {\n const id = sortedRowIds[index];\n if (!skipAutoGeneratedRows || !isAutogeneratedRowNode(tree[id])) {\n children.push(id);\n }\n }\n } else {\n children = getTreeNodeDescendants(tree, groupId, skipAutoGeneratedRows);\n }\n if (applyFiltering) {\n const filteredRowsLookup = gridFilteredRowsLookupSelector(apiRef);\n children = children.filter(childId => filteredRowsLookup[childId] !== false);\n }\n return children;\n }, [apiRef]);\n const setRowIndex = React.useCallback((rowId, targetIndex) => {\n const node = apiRef.current.getRowNode(rowId);\n if (!node) {\n throw new Error(`MUI X: No row with id #${rowId} found.`);\n }\n if (node.parent !== GRID_ROOT_GROUP_ID) {\n throw new Error(`MUI X: The row reordering do not support reordering of grouped rows yet.`);\n }\n if (node.type !== 'leaf') {\n throw new Error(`MUI X: The row reordering do not support reordering of footer or grouping rows.`);\n }\n apiRef.current.setState(state => {\n const group = gridRowTreeSelector(state, apiRef.current.instanceId)[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 logger.debug(`Moving row ${rowId} to index ${targetIndex}`);\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, logger]);\n const replaceRows = React.useCallback((firstRowToRender, newRows) => {\n if (props.signature === GridSignature.DataGrid && newRows.length > 1) {\n throw new Error(['MUI X: You cannot replace rows using `apiRef.current.unstable_replaceRows` on the DataGrid.', 'You need to upgrade to DataGridPro or DataGridPremium component to unlock this feature.'].join('\\n'));\n }\n if (newRows.length === 0) {\n return;\n }\n const treeDepth = gridRowMaximumTreeDepthSelector(apiRef);\n if (treeDepth > 1) {\n throw new Error('`apiRef.current.unstable_replaceRows` is not compatible with tree data and row grouping');\n }\n const tree = _extends({}, gridRowTreeSelector(apiRef));\n const dataRowIdToModelLookup = _extends({}, gridRowsLookupSelector(apiRef));\n const dataRowIdToIdLookup = _extends({}, gridRowsDataRowIdToIdLookupSelector(apiRef));\n const rootGroup = tree[GRID_ROOT_GROUP_ID];\n const rootGroupChildren = [...rootGroup.children];\n const seenIds = new Set();\n for (let i = 0; i < newRows.length; i += 1) {\n const rowModel = newRows[i];\n const rowId = getRowIdFromRowModel(rowModel, props.getRowId, 'A row was provided without id when calling replaceRows().');\n const [removedRowId] = rootGroupChildren.splice(firstRowToRender + i, 1, rowId);\n if (!seenIds.has(removedRowId)) {\n delete dataRowIdToModelLookup[removedRowId];\n delete dataRowIdToIdLookup[removedRowId];\n delete tree[removedRowId];\n }\n const rowTreeNodeConfig = {\n id: rowId,\n depth: 0,\n parent: GRID_ROOT_GROUP_ID,\n type: 'leaf',\n groupingKey: null\n };\n dataRowIdToModelLookup[rowId] = rowModel;\n dataRowIdToIdLookup[rowId] = rowId;\n tree[rowId] = rowTreeNodeConfig;\n seenIds.add(rowId);\n }\n tree[GRID_ROOT_GROUP_ID] = _extends({}, rootGroup, {\n children: rootGroupChildren\n });\n\n // Removes potential remaining skeleton rows from the dataRowIds.\n const dataRowIds = rootGroupChildren.filter(childId => tree[childId]?.type === 'leaf');\n apiRef.current.caches.rows.dataRowIdToModelLookup = dataRowIdToModelLookup;\n apiRef.current.caches.rows.dataRowIdToIdLookup = dataRowIdToIdLookup;\n apiRef.current.setState(state => _extends({}, state, {\n rows: _extends({}, state.rows, {\n dataRowIdToModelLookup,\n dataRowIdToIdLookup,\n dataRowIds,\n tree\n })\n }));\n apiRef.current.publishEvent('rowsSet');\n }, [apiRef, props.signature, props.getRowId]);\n const rowApi = {\n getRow,\n setLoading,\n getRowId,\n getRowModels,\n getRowsCount,\n getAllRowIds,\n setRows,\n updateRows,\n getRowNode,\n getRowIndexRelativeToVisibleRows,\n unstable_replaceRows: replaceRows\n };\n const rowProApi = {\n setRowIndex,\n setRowChildrenExpansion,\n getRowGroupChildren\n };\n const rowProPrivateApi = {\n updateServerRows\n };\n\n /**\n * EVENTS\n */\n const groupRows = React.useCallback(() => {\n logger.info(`Row grouping pre-processing have changed, regenerating the row tree`);\n let cache;\n if (apiRef.current.caches.rows.rowsBeforePartialUpdates === props.rows) {\n // The `props.rows` did not change since the last row grouping\n // We can use the current rows cache which contains the partial updates done recently.\n cache = _extends({}, apiRef.current.caches.rows, {\n updates: {\n type: 'full',\n rows: gridDataRowIdsSelector(apiRef)\n }\n });\n } else {\n // The `props.rows` has changed since the last row grouping\n // We must use the new `props.rows` on the new grouping\n // This occurs because this event is triggered before the `useEffect` on the rows when both the grouping pre-processing and the rows changes on the same render\n cache = createRowsInternalCache({\n rows: props.rows,\n getRowId: props.getRowId,\n loading: props.loading,\n rowCount: props.rowCount\n });\n }\n throttledRowsChange({\n cache,\n throttle: false\n });\n }, [logger, apiRef, props.rows, props.getRowId, props.loading, props.rowCount, throttledRowsChange]);\n const handleStrategyProcessorChange = React.useCallback(methodName => {\n if (methodName === 'rowTreeCreation') {\n groupRows();\n }\n }, [groupRows]);\n const handleStrategyActivityChange = React.useCallback(() => {\n // `rowTreeCreation` is the only processor ran when `strategyAvailabilityChange` is fired.\n // All the other processors listen to `rowsSet` which will be published by the `groupRows` method below.\n if (apiRef.current.getActiveStrategy('rowTree') !== gridRowGroupingNameSelector(apiRef)) {\n groupRows();\n }\n }, [apiRef, groupRows]);\n useGridApiEventHandler(apiRef, 'activeStrategyProcessorChange', handleStrategyProcessorChange);\n useGridApiEventHandler(apiRef, 'strategyAvailabilityChange', handleStrategyActivityChange);\n\n /**\n * APPLIERS\n */\n const applyHydrateRowsProcessor = React.useCallback(() => {\n apiRef.current.setState(state => {\n const response = apiRef.current.unstable_applyPipeProcessors('hydrateRows', {\n tree: gridRowTreeSelector(state, apiRef.current.instanceId),\n treeDepths: gridRowTreeDepthsSelector(state, apiRef.current.instanceId),\n dataRowIds: gridDataRowIdsSelector(state, apiRef.current.instanceId),\n dataRowIdToModelLookup: gridRowsLookupSelector(state, apiRef.current.instanceId),\n dataRowIdToIdLookup: gridRowsDataRowIdToIdLookupSelector(state, apiRef.current.instanceId)\n });\n return _extends({}, state, {\n rows: _extends({}, state.rows, response, {\n totalTopLevelRowCount: getTopLevelRowCount({\n tree: response.tree,\n rowCountProp: props.rowCount\n })\n })\n });\n });\n apiRef.current.publishEvent('rowsSet');\n apiRef.current.forceUpdate();\n }, [apiRef, props.rowCount]);\n useGridRegisterPipeApplier(apiRef, 'hydrateRows', applyHydrateRowsProcessor);\n useGridApiMethod(apiRef, rowApi, 'public');\n useGridApiMethod(apiRef, rowProApi, props.signature === GridSignature.DataGrid ? 'private' : 'public');\n useGridApiMethod(apiRef, rowProPrivateApi, 'private');\n\n // The effect do not track any value defined synchronously during the 1st render by hooks called after `useGridRows`\n // As a consequence, the state generated by the 1st run of this useEffect will always be equal to the initialization one\n const isFirstRender = React.useRef(true);\n React.useEffect(() => {\n if (isFirstRender.current) {\n isFirstRender.current = false;\n return;\n }\n let isRowCountPropUpdated = false;\n if (props.rowCount !== lastRowCount.current) {\n isRowCountPropUpdated = true;\n lastRowCount.current = props.rowCount;\n }\n const areNewRowsAlreadyInState = apiRef.current.caches.rows.rowsBeforePartialUpdates === props.rows;\n const isNewLoadingAlreadyInState = apiRef.current.caches.rows.loadingPropBeforePartialUpdates === props.loading;\n const isNewRowCountAlreadyInState = apiRef.current.caches.rows.rowCountPropBeforePartialUpdates === props.rowCount;\n\n // The new rows have already been applied (most likely in the `'rowGroupsPreProcessingChange'` listener)\n if (areNewRowsAlreadyInState) {\n // If the loading prop has changed, we need to update its value in the state because it won't be done by `throttledRowsChange`\n if (!isNewLoadingAlreadyInState) {\n apiRef.current.setState(state => _extends({}, state, {\n rows: _extends({}, state.rows, {\n loading: props.loading\n })\n }));\n apiRef.current.caches.rows.loadingPropBeforePartialUpdates = props.loading;\n apiRef.current.forceUpdate();\n }\n if (!isNewRowCountAlreadyInState) {\n apiRef.current.setState(state => _extends({}, state, {\n rows: _extends({}, state.rows, {\n totalRowCount: Math.max(props.rowCount || 0, state.rows.totalRowCount),\n totalTopLevelRowCount: Math.max(props.rowCount || 0, state.rows.totalTopLevelRowCount)\n })\n }));\n apiRef.current.caches.rows.rowCountPropBeforePartialUpdates = props.rowCount;\n apiRef.current.forceUpdate();\n }\n if (!isRowCountPropUpdated) {\n return;\n }\n }\n logger.debug(`Updating all rows, new length ${props.rows?.length}`);\n throttledRowsChange({\n cache: createRowsInternalCache({\n rows: props.rows,\n getRowId: props.getRowId,\n loading: props.loading,\n rowCount: props.rowCount\n }),\n throttle: false\n });\n }, [props.rows, props.rowCount, props.getRowId, props.loading, logger, throttledRowsChange, apiRef]);\n};","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport { GRID_DEFAULT_STRATEGY, useGridRegisterStrategyProcessor } from \"../../core/strategyProcessing/index.js\";\nimport { buildRootGroup, GRID_ROOT_GROUP_ID } from \"./gridRowsUtils.js\";\nconst createFlatRowTree = rows => {\n const tree = {\n [GRID_ROOT_GROUP_ID]: _extends({}, buildRootGroup(), {\n children: rows\n })\n };\n for (let i = 0; i < rows.length; i += 1) {\n const rowId = rows[i];\n tree[rowId] = {\n id: rowId,\n depth: 0,\n parent: GRID_ROOT_GROUP_ID,\n type: 'leaf',\n groupingKey: null\n };\n }\n return {\n groupingName: GRID_DEFAULT_STRATEGY,\n tree,\n treeDepths: {\n 0: rows.length\n },\n dataRowIds: rows\n };\n};\nconst updateFlatRowTree = ({\n previousTree,\n actions\n}) => {\n const tree = _extends({}, previousTree);\n const idsToRemoveFromRootGroup = {};\n for (let i = 0; i < actions.remove.length; i += 1) {\n const idToDelete = actions.remove[i];\n idsToRemoveFromRootGroup[idToDelete] = true;\n delete tree[idToDelete];\n }\n for (let i = 0; i < actions.insert.length; i += 1) {\n const idToInsert = actions.insert[i];\n tree[idToInsert] = {\n id: idToInsert,\n depth: 0,\n parent: GRID_ROOT_GROUP_ID,\n type: 'leaf',\n groupingKey: null\n };\n }\n\n // TODO rows v6: Support row unpinning\n\n const rootGroup = tree[GRID_ROOT_GROUP_ID];\n let rootGroupChildren = [...rootGroup.children, ...actions.insert];\n if (Object.values(idsToRemoveFromRootGroup).length) {\n rootGroupChildren = rootGroupChildren.filter(id => !idsToRemoveFromRootGroup[id]);\n }\n tree[GRID_ROOT_GROUP_ID] = _extends({}, rootGroup, {\n children: rootGroupChildren\n });\n return {\n groupingName: GRID_DEFAULT_STRATEGY,\n tree,\n treeDepths: {\n 0: rootGroupChildren.length\n },\n dataRowIds: rootGroupChildren\n };\n};\nconst flatRowTreeCreationMethod = params => {\n if (params.updates.type === 'full') {\n return createFlatRowTree(params.updates.rows);\n }\n return updateFlatRowTree({\n previousTree: params.previousTree,\n actions: params.updates.actions\n });\n};\nexport const useGridRowsPreProcessors = apiRef => {\n useGridRegisterStrategyProcessor(apiRef, GRID_DEFAULT_STRATEGY, 'rowTreeCreation', flatRowTreeCreationMethod);\n};","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport { GridSignature, useGridApiEventHandler } from \"../../utils/useGridApiEventHandler.js\";\nimport { useGridApiMethod } from \"../../utils/useGridApiMethod.js\";\nimport { useGridLogger } from \"../../utils/useGridLogger.js\";\nimport { gridRowsLookupSelector } from \"../rows/gridRowsSelector.js\";\nimport { gridRowSelectionStateSelector, selectedGridRowsSelector, selectedIdsLookupSelector } from \"./gridRowSelectionSelector.js\";\nimport { gridPaginatedVisibleSortedGridRowIdsSelector } from \"../pagination/index.js\";\nimport { gridFocusCellSelector } from \"../focus/gridFocusStateSelector.js\";\nimport { gridExpandedSortedRowIdsSelector, gridFilterModelSelector } from \"../filter/gridFilterSelector.js\";\nimport { GRID_CHECKBOX_SELECTION_COL_DEF, GRID_ACTIONS_COLUMN_TYPE } from \"../../../colDef/index.js\";\nimport { GridCellModes } from \"../../../models/gridEditRowModel.js\";\nimport { isKeyboardEvent, isNavigationKey } from \"../../../utils/keyboardUtils.js\";\nimport { useGridVisibleRows } from \"../../utils/useGridVisibleRows.js\";\nimport { GRID_DETAIL_PANEL_TOGGLE_FIELD } from \"../../../constants/gridDetailPanelToggleField.js\";\nimport { gridClasses } from \"../../../constants/gridClasses.js\";\nimport { isEventTargetInPortal } from \"../../../utils/domUtils.js\";\nimport { isMultipleRowSelectionEnabled } from \"./utils.js\";\nconst getSelectionModelPropValue = (selectionModelProp, prevSelectionModel) => {\n if (selectionModelProp == null) {\n return selectionModelProp;\n }\n if (Array.isArray(selectionModelProp)) {\n return selectionModelProp;\n }\n if (prevSelectionModel && prevSelectionModel[0] === selectionModelProp) {\n return prevSelectionModel;\n }\n return [selectionModelProp];\n};\nexport const rowSelectionStateInitializer = (state, props) => _extends({}, state, {\n rowSelection: props.rowSelection ? getSelectionModelPropValue(props.rowSelectionModel) ?? [] : []\n});\n\n/**\n * @requires useGridRows (state, method) - can be after\n * @requires useGridParamsApi (method) - can be after\n * @requires useGridFocus (state) - can be after\n * @requires useGridKeyboardNavigation (`cellKeyDown` event must first be consumed by it)\n */\nexport const useGridRowSelection = (apiRef, props) => {\n const logger = useGridLogger(apiRef, 'useGridSelection');\n const runIfRowSelectionIsEnabled = callback => (...args) => {\n if (props.rowSelection) {\n callback(...args);\n }\n };\n const propRowSelectionModel = React.useMemo(() => {\n return getSelectionModelPropValue(props.rowSelectionModel, gridRowSelectionStateSelector(apiRef.current.state));\n }, [apiRef, props.rowSelectionModel]);\n const lastRowToggled = React.useRef(null);\n apiRef.current.registerControlState({\n stateId: 'rowSelection',\n propModel: propRowSelectionModel,\n propOnChange: props.onRowSelectionModelChange,\n stateSelector: gridRowSelectionStateSelector,\n changeEvent: 'rowSelectionChange'\n });\n const {\n checkboxSelection,\n disableRowSelectionOnClick,\n isRowSelectable: propIsRowSelectable\n } = props;\n const canHaveMultipleSelection = isMultipleRowSelectionEnabled(props);\n const visibleRows = useGridVisibleRows(apiRef, props);\n const expandMouseRowRangeSelection = React.useCallback(id => {\n let endId = id;\n const startId = lastRowToggled.current ?? id;\n const isSelected = apiRef.current.isRowSelected(id);\n if (isSelected) {\n const visibleRowIds = gridExpandedSortedRowIdsSelector(apiRef);\n const startIndex = visibleRowIds.findIndex(rowId => rowId === startId);\n const endIndex = visibleRowIds.findIndex(rowId => rowId === endId);\n if (startIndex === endIndex) {\n return;\n }\n if (startIndex > endIndex) {\n endId = visibleRowIds[endIndex + 1];\n } else {\n endId = visibleRowIds[endIndex - 1];\n }\n }\n lastRowToggled.current = id;\n apiRef.current.selectRowRange({\n startId,\n endId\n }, !isSelected);\n }, [apiRef]);\n\n /**\n * API METHODS\n */\n const setRowSelectionModel = React.useCallback(model => {\n if (props.signature === GridSignature.DataGrid && !canHaveMultipleSelection && Array.isArray(model) && model.length > 1) {\n throw new Error(['MUI X: `rowSelectionModel` can only contain 1 item in DataGrid.', 'You need to upgrade to DataGridPro or DataGridPremium component to unlock multiple selection.'].join('\\n'));\n }\n const currentModel = gridRowSelectionStateSelector(apiRef.current.state);\n if (currentModel !== model) {\n logger.debug(`Setting selection model`);\n apiRef.current.setState(state => _extends({}, state, {\n rowSelection: props.rowSelection ? model : []\n }));\n apiRef.current.forceUpdate();\n }\n }, [apiRef, logger, props.rowSelection, props.signature, canHaveMultipleSelection]);\n const isRowSelected = React.useCallback(id => gridRowSelectionStateSelector(apiRef.current.state).includes(id), [apiRef]);\n const isRowSelectable = React.useCallback(id => {\n if (props.rowSelection === false) {\n return false;\n }\n if (propIsRowSelectable && !propIsRowSelectable(apiRef.current.getRowParams(id))) {\n return false;\n }\n const rowNode = apiRef.current.getRowNode(id);\n if (rowNode?.type === 'footer' || rowNode?.type === 'pinnedRow') {\n return false;\n }\n return true;\n }, [apiRef, props.rowSelection, propIsRowSelectable]);\n const getSelectedRows = React.useCallback(() => selectedGridRowsSelector(apiRef), [apiRef]);\n const selectRow = React.useCallback((id, isSelected = true, resetSelection = false) => {\n if (!apiRef.current.isRowSelectable(id)) {\n return;\n }\n lastRowToggled.current = id;\n if (resetSelection) {\n logger.debug(`Setting selection for row ${id}`);\n apiRef.current.setRowSelectionModel(isSelected ? [id] : []);\n } else {\n logger.debug(`Toggling selection for row ${id}`);\n const selection = gridRowSelectionStateSelector(apiRef.current.state);\n const newSelection = selection.filter(el => el !== id);\n if (isSelected) {\n newSelection.push(id);\n }\n const isSelectionValid = newSelection.length < 2 || canHaveMultipleSelection;\n if (isSelectionValid) {\n apiRef.current.setRowSelectionModel(newSelection);\n }\n }\n }, [apiRef, logger, canHaveMultipleSelection]);\n const selectRows = React.useCallback((ids, isSelected = true, resetSelection = false) => {\n logger.debug(`Setting selection for several rows`);\n const selectableIds = ids.filter(id => apiRef.current.isRowSelectable(id));\n let newSelection;\n if (resetSelection) {\n newSelection = isSelected ? selectableIds : [];\n } else {\n // We clone the existing object to avoid mutating the same object returned by the selector to others part of the project\n const selectionLookup = _extends({}, selectedIdsLookupSelector(apiRef));\n selectableIds.forEach(id => {\n if (isSelected) {\n selectionLookup[id] = id;\n } else {\n delete selectionLookup[id];\n }\n });\n newSelection = Object.values(selectionLookup);\n }\n const isSelectionValid = newSelection.length < 2 || canHaveMultipleSelection;\n if (isSelectionValid) {\n apiRef.current.setRowSelectionModel(newSelection);\n }\n }, [apiRef, logger, canHaveMultipleSelection]);\n const selectRowRange = React.useCallback(({\n startId,\n endId\n }, isSelected = true, resetSelection = false) => {\n if (!apiRef.current.getRow(startId) || !apiRef.current.getRow(endId)) {\n return;\n }\n logger.debug(`Expanding selection from row ${startId} to row ${endId}`);\n\n // Using rows from all pages allow to select a range across several pages\n const allPagesRowIds = gridExpandedSortedRowIdsSelector(apiRef);\n const startIndex = allPagesRowIds.indexOf(startId);\n const endIndex = allPagesRowIds.indexOf(endId);\n const [start, end] = startIndex > endIndex ? [endIndex, startIndex] : [startIndex, endIndex];\n const rowsBetweenStartAndEnd = allPagesRowIds.slice(start, end + 1);\n apiRef.current.selectRows(rowsBetweenStartAndEnd, isSelected, resetSelection);\n }, [apiRef, logger]);\n const selectionPublicApi = {\n selectRow,\n setRowSelectionModel,\n getSelectedRows,\n isRowSelected,\n isRowSelectable\n };\n const selectionPrivateApi = {\n selectRows,\n selectRowRange\n };\n useGridApiMethod(apiRef, selectionPublicApi, 'public');\n useGridApiMethod(apiRef, selectionPrivateApi, props.signature === GridSignature.DataGrid ? 'private' : 'public');\n\n /**\n * EVENTS\n */\n const removeOutdatedSelection = React.useCallback(() => {\n if (props.keepNonExistentRowsSelected) {\n return;\n }\n const currentSelection = gridRowSelectionStateSelector(apiRef.current.state);\n const rowsLookup = gridRowsLookupSelector(apiRef);\n\n // We clone the existing object to avoid mutating the same object returned by the selector to others part of the project\n const selectionLookup = _extends({}, selectedIdsLookupSelector(apiRef));\n let hasChanged = false;\n currentSelection.forEach(id => {\n if (!rowsLookup[id]) {\n delete selectionLookup[id];\n hasChanged = true;\n }\n });\n if (hasChanged) {\n apiRef.current.setRowSelectionModel(Object.values(selectionLookup));\n }\n }, [apiRef, props.keepNonExistentRowsSelected]);\n const handleSingleRowSelection = React.useCallback((id, event) => {\n const hasCtrlKey = event.metaKey || event.ctrlKey;\n\n // multiple selection is only allowed if:\n // - it is a checkboxSelection\n // - it is a keyboard selection\n // - Ctrl is pressed\n\n const isMultipleSelectionDisabled = !checkboxSelection && !hasCtrlKey && !isKeyboardEvent(event);\n const resetSelection = !canHaveMultipleSelection || isMultipleSelectionDisabled;\n const isSelected = apiRef.current.isRowSelected(id);\n if (resetSelection) {\n apiRef.current.selectRow(id, !isMultipleSelectionDisabled ? !isSelected : true, true);\n } else {\n apiRef.current.selectRow(id, !isSelected, false);\n }\n }, [apiRef, canHaveMultipleSelection, checkboxSelection]);\n const handleRowClick = React.useCallback((params, event) => {\n if (disableRowSelectionOnClick) {\n return;\n }\n const field = event.target.closest(`.${gridClasses.cell}`)?.getAttribute('data-field');\n if (field === GRID_CHECKBOX_SELECTION_COL_DEF.field) {\n // click on checkbox should not trigger row selection\n return;\n }\n if (field === GRID_DETAIL_PANEL_TOGGLE_FIELD) {\n // click to open the detail panel should not select the row\n return;\n }\n if (field) {\n const column = apiRef.current.getColumn(field);\n if (column?.type === GRID_ACTIONS_COLUMN_TYPE) {\n return;\n }\n }\n const rowNode = apiRef.current.getRowNode(params.id);\n if (rowNode.type === 'pinnedRow') {\n return;\n }\n if (event.shiftKey && canHaveMultipleSelection) {\n expandMouseRowRangeSelection(params.id);\n } else {\n handleSingleRowSelection(params.id, event);\n }\n }, [disableRowSelectionOnClick, canHaveMultipleSelection, apiRef, expandMouseRowRangeSelection, handleSingleRowSelection]);\n const preventSelectionOnShift = React.useCallback((params, event) => {\n if (canHaveMultipleSelection && event.shiftKey) {\n window.getSelection()?.removeAllRanges();\n }\n }, [canHaveMultipleSelection]);\n const handleRowSelectionCheckboxChange = React.useCallback((params, event) => {\n if (canHaveMultipleSelection && event.nativeEvent.shiftKey) {\n expandMouseRowRangeSelection(params.id);\n } else {\n apiRef.current.selectRow(params.id, params.value, !canHaveMultipleSelection);\n }\n }, [apiRef, expandMouseRowRangeSelection, canHaveMultipleSelection]);\n const handleHeaderSelectionCheckboxChange = React.useCallback(params => {\n const rowsToBeSelected = props.pagination && props.checkboxSelectionVisibleOnly && props.paginationMode === 'client' ? gridPaginatedVisibleSortedGridRowIdsSelector(apiRef) : gridExpandedSortedRowIdsSelector(apiRef);\n const filterModel = gridFilterModelSelector(apiRef);\n apiRef.current.selectRows(rowsToBeSelected, params.value, filterModel?.items.length > 0);\n }, [apiRef, props.checkboxSelectionVisibleOnly, props.pagination, props.paginationMode]);\n const handleCellKeyDown = React.useCallback((params, event) => {\n // Get the most recent cell mode because it may have been changed by another listener\n if (apiRef.current.getCellMode(params.id, params.field) === GridCellModes.Edit) {\n return;\n }\n\n // Ignore portal\n // Do not apply shortcuts if the focus is not on the cell root component\n if (isEventTargetInPortal(event)) {\n return;\n }\n if (isNavigationKey(event.key) && event.shiftKey) {\n // The cell that has focus after the keyboard navigation\n const focusCell = gridFocusCellSelector(apiRef);\n if (focusCell && focusCell.id !== params.id) {\n event.preventDefault();\n const isNextRowSelected = apiRef.current.isRowSelected(focusCell.id);\n if (!canHaveMultipleSelection) {\n apiRef.current.selectRow(focusCell.id, !isNextRowSelected, true);\n return;\n }\n const newRowIndex = apiRef.current.getRowIndexRelativeToVisibleRows(focusCell.id);\n const previousRowIndex = apiRef.current.getRowIndexRelativeToVisibleRows(params.id);\n let start;\n let end;\n if (newRowIndex > previousRowIndex) {\n if (isNextRowSelected) {\n // We are navigating to the bottom of the page and adding selected rows\n start = previousRowIndex;\n end = newRowIndex - 1;\n } else {\n // We are navigating to the bottom of the page and removing selected rows\n start = previousRowIndex;\n end = newRowIndex;\n }\n } else {\n // eslint-disable-next-line no-lonely-if\n if (isNextRowSelected) {\n // We are navigating to the top of the page and removing selected rows\n start = newRowIndex + 1;\n end = previousRowIndex;\n } else {\n // We are navigating to the top of the page and adding selected rows\n start = newRowIndex;\n end = previousRowIndex;\n }\n }\n const rowsBetweenStartAndEnd = visibleRows.rows.slice(start, end + 1).map(row => row.id);\n apiRef.current.selectRows(rowsBetweenStartAndEnd, !isNextRowSelected);\n return;\n }\n }\n if (event.key === ' ' && event.shiftKey) {\n event.preventDefault();\n handleSingleRowSelection(params.id, event);\n return;\n }\n if (event.key === 'a' && (event.ctrlKey || event.metaKey)) {\n event.preventDefault();\n selectRows(apiRef.current.getAllRowIds(), true);\n }\n }, [apiRef, handleSingleRowSelection, selectRows, visibleRows.rows, canHaveMultipleSelection]);\n useGridApiEventHandler(apiRef, 'sortedRowsSet', runIfRowSelectionIsEnabled(removeOutdatedSelection));\n useGridApiEventHandler(apiRef, 'rowClick', runIfRowSelectionIsEnabled(handleRowClick));\n useGridApiEventHandler(apiRef, 'rowSelectionCheckboxChange', runIfRowSelectionIsEnabled(handleRowSelectionCheckboxChange));\n useGridApiEventHandler(apiRef, 'headerSelectionCheckboxChange', handleHeaderSelectionCheckboxChange);\n useGridApiEventHandler(apiRef, 'cellMouseDown', runIfRowSelectionIsEnabled(preventSelectionOnShift));\n useGridApiEventHandler(apiRef, 'cellKeyDown', runIfRowSelectionIsEnabled(handleCellKeyDown));\n\n /**\n * EFFECTS\n */\n React.useEffect(() => {\n if (propRowSelectionModel !== undefined) {\n apiRef.current.setRowSelectionModel(propRowSelectionModel);\n }\n }, [apiRef, propRowSelectionModel, props.rowSelection]);\n React.useEffect(() => {\n if (!props.rowSelection) {\n apiRef.current.setRowSelectionModel([]);\n }\n }, [apiRef, props.rowSelection]);\n const isStateControlled = propRowSelectionModel != null;\n React.useEffect(() => {\n if (isStateControlled || !props.rowSelection) {\n return;\n }\n\n // props.isRowSelectable changed\n const currentSelection = gridRowSelectionStateSelector(apiRef.current.state);\n if (isRowSelectable) {\n const newSelection = currentSelection.filter(id => isRowSelectable(id));\n if (newSelection.length < currentSelection.length) {\n apiRef.current.setRowSelectionModel(newSelection);\n }\n }\n }, [apiRef, isRowSelectable, isStateControlled, props.rowSelection]);\n React.useEffect(() => {\n if (!props.rowSelection || isStateControlled) {\n return;\n }\n const currentSelection = gridRowSelectionStateSelector(apiRef.current.state);\n if (!canHaveMultipleSelection && currentSelection.length > 1) {\n // See https://github.com/mui/mui-x/issues/8455\n apiRef.current.setRowSelectionModel([]);\n }\n }, [apiRef, canHaveMultipleSelection, checkboxSelection, isStateControlled, props.rowSelection]);\n};","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport { unstable_useEnhancedEffect as useEnhancedEffect } from '@mui/utils';\nimport { useGridApiEventHandler } from \"../../utils/useGridApiEventHandler.js\";\nimport { useGridApiMethod } from \"../../utils/useGridApiMethod.js\";\nimport { useGridLogger } from \"../../utils/useGridLogger.js\";\nimport { gridColumnLookupSelector } from \"../columns/gridColumnsSelector.js\";\nimport { gridSortedRowEntriesSelector, gridSortedRowIdsSelector, gridSortModelSelector } from \"./gridSortingSelector.js\";\nimport { GRID_ROOT_GROUP_ID, gridRowTreeSelector } from \"../rows/index.js\";\nimport { useFirstRender } from \"../../utils/useFirstRender.js\";\nimport { useGridRegisterStrategyProcessor, GRID_DEFAULT_STRATEGY } from \"../../core/strategyProcessing/index.js\";\nimport { buildAggregatedSortingApplier, mergeStateWithSortModel, getNextGridSortDirection, sanitizeSortModel } from \"./gridSortingUtils.js\";\nimport { useGridRegisterPipeProcessor } from \"../../core/pipeProcessing/index.js\";\nimport { getTreeNodeDescendants } from \"../rows/gridRowsUtils.js\";\nexport const sortingStateInitializer = (state, props) => {\n const sortModel = props.sortModel ?? props.initialState?.sorting?.sortModel ?? [];\n return _extends({}, state, {\n sorting: {\n sortModel: sanitizeSortModel(sortModel, props.disableMultipleColumnsSorting),\n sortedRows: []\n }\n });\n};\n\n/**\n * @requires useGridRows (event)\n * @requires useGridColumns (event)\n */\nexport const useGridSorting = (apiRef, props) => {\n const logger = useGridLogger(apiRef, 'useGridSorting');\n apiRef.current.registerControlState({\n stateId: 'sortModel',\n propModel: props.sortModel,\n propOnChange: props.onSortModelChange,\n stateSelector: gridSortModelSelector,\n changeEvent: 'sortModelChange'\n });\n const upsertSortModel = React.useCallback((field, sortItem) => {\n const sortModel = gridSortModelSelector(apiRef);\n const existingIdx = sortModel.findIndex(c => c.field === field);\n let newSortModel = [...sortModel];\n if (existingIdx > -1) {\n if (sortItem?.sort == null) {\n newSortModel.splice(existingIdx, 1);\n } else {\n newSortModel.splice(existingIdx, 1, sortItem);\n }\n } else {\n newSortModel = [...sortModel, sortItem];\n }\n return newSortModel;\n }, [apiRef]);\n const createSortItem = React.useCallback((col, directionOverride) => {\n const sortModel = gridSortModelSelector(apiRef);\n const existing = sortModel.find(c => c.field === col.field);\n if (existing) {\n const nextSort = directionOverride === undefined ? getNextGridSortDirection(col.sortingOrder ?? props.sortingOrder, existing.sort) : directionOverride;\n return nextSort === undefined ? undefined : _extends({}, existing, {\n sort: nextSort\n });\n }\n return {\n field: col.field,\n sort: directionOverride === undefined ? getNextGridSortDirection(col.sortingOrder ?? props.sortingOrder) : directionOverride\n };\n }, [apiRef, props.sortingOrder]);\n const addColumnMenuItem = React.useCallback((columnMenuItems, colDef) => {\n if (colDef == null || colDef.sortable === false || props.disableColumnSorting) {\n return columnMenuItems;\n }\n const sortingOrder = colDef.sortingOrder || props.sortingOrder;\n if (sortingOrder.some(item => !!item)) {\n return [...columnMenuItems, 'columnMenuSortItem'];\n }\n return columnMenuItems;\n }, [props.sortingOrder, props.disableColumnSorting]);\n\n /**\n * API METHODS\n */\n const applySorting = React.useCallback(() => {\n apiRef.current.setState(state => {\n if (props.sortingMode === 'server') {\n logger.debug('Skipping sorting rows as sortingMode = server');\n return _extends({}, state, {\n sorting: _extends({}, state.sorting, {\n sortedRows: getTreeNodeDescendants(gridRowTreeSelector(apiRef), GRID_ROOT_GROUP_ID, false)\n })\n });\n }\n const sortModel = gridSortModelSelector(state, apiRef.current.instanceId);\n const sortRowList = buildAggregatedSortingApplier(sortModel, apiRef);\n const sortedRows = apiRef.current.applyStrategyProcessor('sorting', {\n sortRowList\n });\n return _extends({}, state, {\n sorting: _extends({}, state.sorting, {\n sortedRows\n })\n });\n });\n apiRef.current.publishEvent('sortedRowsSet');\n apiRef.current.forceUpdate();\n }, [apiRef, logger, props.sortingMode]);\n const setSortModel = React.useCallback(model => {\n const currentModel = gridSortModelSelector(apiRef);\n if (currentModel !== model) {\n logger.debug(`Setting sort model`);\n apiRef.current.setState(mergeStateWithSortModel(model, props.disableMultipleColumnsSorting));\n apiRef.current.forceUpdate();\n apiRef.current.applySorting();\n }\n }, [apiRef, logger, props.disableMultipleColumnsSorting]);\n const sortColumn = React.useCallback((field, direction, allowMultipleSorting) => {\n const column = apiRef.current.getColumn(field);\n const sortItem = createSortItem(column, direction);\n let sortModel;\n if (!allowMultipleSorting || props.disableMultipleColumnsSorting) {\n sortModel = sortItem?.sort == null ? [] : [sortItem];\n } else {\n sortModel = upsertSortModel(column.field, sortItem);\n }\n apiRef.current.setSortModel(sortModel);\n }, [apiRef, upsertSortModel, createSortItem, props.disableMultipleColumnsSorting]);\n const getSortModel = React.useCallback(() => gridSortModelSelector(apiRef), [apiRef]);\n const getSortedRows = React.useCallback(() => {\n const sortedRows = gridSortedRowEntriesSelector(apiRef);\n return sortedRows.map(row => row.model);\n }, [apiRef]);\n const getSortedRowIds = React.useCallback(() => gridSortedRowIdsSelector(apiRef), [apiRef]);\n const getRowIdFromRowIndex = React.useCallback(index => apiRef.current.getSortedRowIds()[index], [apiRef]);\n const sortApi = {\n getSortModel,\n getSortedRows,\n getSortedRowIds,\n getRowIdFromRowIndex,\n setSortModel,\n sortColumn,\n applySorting\n };\n useGridApiMethod(apiRef, sortApi, 'public');\n\n /**\n * PRE-PROCESSING\n */\n const stateExportPreProcessing = React.useCallback((prevState, context) => {\n const sortModelToExport = gridSortModelSelector(apiRef);\n const shouldExportSortModel =\n // Always export if the `exportOnlyDirtyModels` property is not activated\n !context.exportOnlyDirtyModels ||\n // Always export if the model is controlled\n props.sortModel != null ||\n // Always export if the model has been initialized\n props.initialState?.sorting?.sortModel != null ||\n // Export if the model is not empty\n sortModelToExport.length > 0;\n if (!shouldExportSortModel) {\n return prevState;\n }\n return _extends({}, prevState, {\n sorting: {\n sortModel: sortModelToExport\n }\n });\n }, [apiRef, props.sortModel, props.initialState?.sorting?.sortModel]);\n const stateRestorePreProcessing = React.useCallback((params, context) => {\n const sortModel = context.stateToRestore.sorting?.sortModel;\n if (sortModel == null) {\n return params;\n }\n apiRef.current.setState(mergeStateWithSortModel(sortModel, props.disableMultipleColumnsSorting));\n return _extends({}, params, {\n callbacks: [...params.callbacks, apiRef.current.applySorting]\n });\n }, [apiRef, props.disableMultipleColumnsSorting]);\n const flatSortingMethod = React.useCallback(params => {\n const rowTree = gridRowTreeSelector(apiRef);\n const rootGroupNode = rowTree[GRID_ROOT_GROUP_ID];\n const sortedChildren = params.sortRowList ? params.sortRowList(rootGroupNode.children.map(childId => rowTree[childId])) : [...rootGroupNode.children];\n if (rootGroupNode.footerId != null) {\n sortedChildren.push(rootGroupNode.footerId);\n }\n return sortedChildren;\n }, [apiRef]);\n useGridRegisterPipeProcessor(apiRef, 'exportState', stateExportPreProcessing);\n useGridRegisterPipeProcessor(apiRef, 'restoreState', stateRestorePreProcessing);\n useGridRegisterStrategyProcessor(apiRef, GRID_DEFAULT_STRATEGY, 'sorting', flatSortingMethod);\n\n /**\n * EVENTS\n */\n const handleColumnHeaderClick = React.useCallback(({\n field,\n colDef\n }, event) => {\n if (!colDef.sortable || props.disableColumnSorting) {\n return;\n }\n const allowMultipleSorting = event.shiftKey || event.metaKey || event.ctrlKey;\n sortColumn(field, undefined, allowMultipleSorting);\n }, [sortColumn, props.disableColumnSorting]);\n const handleColumnHeaderKeyDown = React.useCallback(({\n field,\n colDef\n }, event) => {\n if (!colDef.sortable || props.disableColumnSorting) {\n return;\n }\n // Ctrl + Enter opens the column menu\n if (event.key === 'Enter' && !event.ctrlKey && !event.metaKey) {\n sortColumn(field, undefined, event.shiftKey);\n }\n }, [sortColumn, props.disableColumnSorting]);\n const handleColumnsChange = React.useCallback(() => {\n // When the columns change we check that the sorted columns are still part of the dataset\n const sortModel = gridSortModelSelector(apiRef);\n const latestColumns = gridColumnLookupSelector(apiRef);\n if (sortModel.length > 0) {\n const newModel = sortModel.filter(sortItem => latestColumns[sortItem.field]);\n if (newModel.length < sortModel.length) {\n apiRef.current.setSortModel(newModel);\n }\n }\n }, [apiRef]);\n const handleStrategyProcessorChange = React.useCallback(methodName => {\n if (methodName === 'sorting') {\n apiRef.current.applySorting();\n }\n }, [apiRef]);\n useGridRegisterPipeProcessor(apiRef, 'columnMenu', addColumnMenuItem);\n useGridApiEventHandler(apiRef, 'columnHeaderClick', handleColumnHeaderClick);\n useGridApiEventHandler(apiRef, 'columnHeaderKeyDown', handleColumnHeaderKeyDown);\n useGridApiEventHandler(apiRef, 'rowsSet', apiRef.current.applySorting);\n useGridApiEventHandler(apiRef, 'columnsChange', handleColumnsChange);\n useGridApiEventHandler(apiRef, 'activeStrategyProcessorChange', handleStrategyProcessorChange);\n\n /**\n * 1ST RENDER\n */\n useFirstRender(() => {\n apiRef.current.applySorting();\n });\n\n /**\n * EFFECTS\n */\n useEnhancedEffect(() => {\n if (props.sortModel !== undefined) {\n apiRef.current.setSortModel(props.sortModel);\n }\n }, [apiRef, props.sortModel]);\n};","import * as React from 'react';\nimport { useRtl } from '@mui/system/RtlProvider';\nimport { useGridLogger } from \"../../utils/useGridLogger.js\";\nimport { gridColumnPositionsSelector, gridVisibleColumnDefinitionsSelector } from \"../columns/gridColumnsSelector.js\";\nimport { useGridSelector } from \"../../utils/useGridSelector.js\";\nimport { gridPageSelector, gridPageSizeSelector } from \"../pagination/gridPaginationSelector.js\";\nimport { gridRowCountSelector } from \"../rows/gridRowsSelector.js\";\nimport { gridRowsMetaSelector } from \"../rows/gridRowsMetaSelector.js\";\nimport { useGridApiMethod } from \"../../utils/useGridApiMethod.js\";\nimport { gridExpandedSortedRowEntriesSelector } from \"../filter/gridFilterSelector.js\";\nimport { gridDimensionsSelector } from \"../dimensions/index.js\";\n\n// Logic copied from https://www.w3.org/TR/wai-aria-practices/examples/listbox/js/listbox.js\n// Similar to https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView\nfunction scrollIntoView(dimensions) {\n const {\n clientHeight,\n scrollTop,\n offsetHeight,\n offsetTop\n } = dimensions;\n const elementBottom = offsetTop + offsetHeight;\n // Always scroll to top when cell is higher than viewport to avoid scroll jump\n // See https://github.com/mui/mui-x/issues/4513 and https://github.com/mui/mui-x/issues/4514\n if (offsetHeight > clientHeight) {\n return offsetTop;\n }\n if (elementBottom - clientHeight > scrollTop) {\n return elementBottom - clientHeight;\n }\n if (offsetTop < scrollTop) {\n return offsetTop;\n }\n return undefined;\n}\n\n/**\n * @requires useGridPagination (state) - can be after, async only\n * @requires useGridColumns (state) - can be after, async only\n * @requires useGridRows (state) - can be after, async only\n * @requires useGridRowsMeta (state) - can be after, async only\n * @requires useGridFilter (state)\n * @requires useGridColumnSpanning (method)\n */\nexport const useGridScroll = (apiRef, props) => {\n const isRtl = useRtl();\n const logger = useGridLogger(apiRef, 'useGridScroll');\n const colRef = apiRef.current.columnHeadersContainerRef;\n const virtualScrollerRef = apiRef.current.virtualScrollerRef;\n const visibleSortedRows = useGridSelector(apiRef, gridExpandedSortedRowEntriesSelector);\n const scrollToIndexes = React.useCallback(params => {\n const dimensions = gridDimensionsSelector(apiRef.current.state);\n const totalRowCount = gridRowCountSelector(apiRef);\n const visibleColumns = gridVisibleColumnDefinitionsSelector(apiRef);\n const scrollToHeader = params.rowIndex == null;\n if (!scrollToHeader && totalRowCount === 0 || visibleColumns.length === 0) {\n return false;\n }\n logger.debug(`Scrolling to cell at row ${params.rowIndex}, col: ${params.colIndex} `);\n let scrollCoordinates = {};\n if (params.colIndex !== undefined) {\n const columnPositions = gridColumnPositionsSelector(apiRef);\n let cellWidth;\n if (typeof params.rowIndex !== 'undefined') {\n const rowId = visibleSortedRows[params.rowIndex]?.id;\n const cellColSpanInfo = apiRef.current.unstable_getCellColSpanInfo(rowId, params.colIndex);\n if (cellColSpanInfo && !cellColSpanInfo.spannedByColSpan) {\n cellWidth = cellColSpanInfo.cellProps.width;\n }\n }\n if (typeof cellWidth === 'undefined') {\n cellWidth = visibleColumns[params.colIndex].computedWidth;\n }\n // When using RTL, `scrollLeft` becomes negative, so we must ensure that we only compare values.\n scrollCoordinates.left = scrollIntoView({\n clientHeight: dimensions.viewportInnerSize.width,\n scrollTop: Math.abs(virtualScrollerRef.current.scrollLeft),\n offsetHeight: cellWidth,\n offsetTop: columnPositions[params.colIndex]\n });\n }\n if (params.rowIndex !== undefined) {\n const rowsMeta = gridRowsMetaSelector(apiRef.current.state);\n const page = gridPageSelector(apiRef);\n const pageSize = gridPageSizeSelector(apiRef);\n const elementIndex = !props.pagination ? params.rowIndex : params.rowIndex - page * pageSize;\n const targetOffsetHeight = rowsMeta.positions[elementIndex + 1] ? rowsMeta.positions[elementIndex + 1] - rowsMeta.positions[elementIndex] : rowsMeta.currentPageTotalHeight - rowsMeta.positions[elementIndex];\n scrollCoordinates.top = scrollIntoView({\n clientHeight: dimensions.viewportInnerSize.height,\n scrollTop: virtualScrollerRef.current.scrollTop,\n offsetHeight: targetOffsetHeight,\n offsetTop: rowsMeta.positions[elementIndex]\n });\n }\n scrollCoordinates = apiRef.current.unstable_applyPipeProcessors('scrollToIndexes', scrollCoordinates, params);\n if (typeof scrollCoordinates.left !== undefined || typeof scrollCoordinates.top !== undefined) {\n apiRef.current.scroll(scrollCoordinates);\n return true;\n }\n return false;\n }, [logger, apiRef, virtualScrollerRef, props.pagination, visibleSortedRows]);\n const scroll = React.useCallback(params => {\n if (virtualScrollerRef.current && params.left !== undefined && colRef.current) {\n const direction = isRtl ? -1 : 1;\n colRef.current.scrollLeft = params.left;\n virtualScrollerRef.current.scrollLeft = direction * params.left;\n logger.debug(`Scrolling left: ${params.left}`);\n }\n if (virtualScrollerRef.current && params.top !== undefined) {\n virtualScrollerRef.current.scrollTop = params.top;\n logger.debug(`Scrolling top: ${params.top}`);\n }\n logger.debug(`Scrolling, updating container, and viewport`);\n }, [virtualScrollerRef, isRtl, colRef, logger]);\n const getScrollPosition = React.useCallback(() => {\n if (!virtualScrollerRef?.current) {\n return {\n top: 0,\n left: 0\n };\n }\n return {\n top: virtualScrollerRef.current.scrollTop,\n left: virtualScrollerRef.current.scrollLeft\n };\n }, [virtualScrollerRef]);\n const scrollApi = {\n scroll,\n scrollToIndexes,\n getScrollPosition\n };\n useGridApiMethod(apiRef, scrollApi, 'public');\n};","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport { unstable_ownerDocument as ownerDocument, unstable_useEnhancedEffect as useEnhancedEffect, unstable_useEventCallback as useEventCallback, unstable_ownerWindow as ownerWindow } from '@mui/utils';\nimport { throttle } from '@mui/x-internals/throttle';\nimport { useGridApiEventHandler, useGridApiOptionHandler } from \"../../utils/useGridApiEventHandler.js\";\nimport { useGridApiMethod } from \"../../utils/useGridApiMethod.js\";\nimport { useGridLogger } from \"../../utils/useGridLogger.js\";\nimport { gridColumnsTotalWidthSelector, gridVisiblePinnedColumnDefinitionsSelector } from \"../columns/index.js\";\nimport { gridDimensionsSelector } from \"./gridDimensionsSelectors.js\";\nimport { gridDensityFactorSelector } from \"../density/index.js\";\nimport { gridRenderContextSelector } from \"../virtualization/index.js\";\nimport { useGridSelector } from \"../../utils/index.js\";\nimport { getVisibleRows } from \"../../utils/useGridVisibleRows.js\";\nimport { gridRowsMetaSelector } from \"../rows/gridRowsMetaSelector.js\";\nimport { calculatePinnedRowsHeight } from \"../rows/gridRowsUtils.js\";\nimport { getTotalHeaderHeight } from \"../columns/gridColumnsUtils.js\";\nconst EMPTY_SIZE = {\n width: 0,\n height: 0\n};\nconst EMPTY_DIMENSIONS = {\n isReady: false,\n root: EMPTY_SIZE,\n viewportOuterSize: EMPTY_SIZE,\n viewportInnerSize: EMPTY_SIZE,\n contentSize: EMPTY_SIZE,\n minimumSize: EMPTY_SIZE,\n hasScrollX: false,\n hasScrollY: false,\n scrollbarSize: 0,\n headerHeight: 0,\n groupHeaderHeight: 0,\n headerFilterHeight: 0,\n rowWidth: 0,\n rowHeight: 0,\n columnsTotalWidth: 0,\n leftPinnedWidth: 0,\n rightPinnedWidth: 0,\n headersTotalHeight: 0,\n topContainerHeight: 0,\n bottomContainerHeight: 0\n};\nexport const dimensionsStateInitializer = state => {\n const dimensions = EMPTY_DIMENSIONS;\n return _extends({}, state, {\n dimensions\n });\n};\nexport function useGridDimensions(apiRef, props) {\n const logger = useGridLogger(apiRef, 'useResizeContainer');\n const errorShown = React.useRef(false);\n const rootDimensionsRef = React.useRef(EMPTY_SIZE);\n const dimensionsState = useGridSelector(apiRef, gridDimensionsSelector);\n const rowsMeta = useGridSelector(apiRef, gridRowsMetaSelector);\n const pinnedColumns = useGridSelector(apiRef, gridVisiblePinnedColumnDefinitionsSelector);\n const densityFactor = useGridSelector(apiRef, gridDensityFactorSelector);\n const rowHeight = Math.floor(props.rowHeight * densityFactor);\n const headerHeight = Math.floor(props.columnHeaderHeight * densityFactor);\n const groupHeaderHeight = Math.floor((props.columnGroupHeaderHeight ?? props.columnHeaderHeight) * densityFactor);\n const headerFilterHeight = Math.floor((props.headerFilterHeight ?? props.columnHeaderHeight) * densityFactor);\n const columnsTotalWidth = roundToDecimalPlaces(gridColumnsTotalWidthSelector(apiRef), 6);\n const headersTotalHeight = getTotalHeaderHeight(apiRef, props);\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 [savedSize, setSavedSize] = React.useState();\n const debouncedSetSavedSize = React.useMemo(() => throttle(setSavedSize, props.resizeThrottleMs), [props.resizeThrottleMs]);\n const previousSize = React.useRef();\n const getRootDimensions = () => apiRef.current.state.dimensions;\n const setDimensions = useEventCallback(dimensions => {\n apiRef.current.setState(state => _extends({}, state, {\n dimensions\n }));\n });\n const resize = React.useCallback(() => {\n const element = apiRef.current.mainElementRef.current;\n if (!element) {\n return;\n }\n const computedStyle = ownerWindow(element).getComputedStyle(element);\n const newSize = {\n width: parseFloat(computedStyle.width) || 0,\n height: parseFloat(computedStyle.height) || 0\n };\n if (!previousSize.current || !areElementSizesEqual(previousSize.current, newSize)) {\n apiRef.current.publishEvent('resize', newSize);\n previousSize.current = newSize;\n }\n }, [apiRef]);\n const getViewportPageSize = React.useCallback(() => {\n const dimensions = gridDimensionsSelector(apiRef.current.state);\n if (!dimensions.isReady) {\n return 0;\n }\n const currentPage = getVisibleRows(apiRef, {\n pagination: props.pagination,\n paginationMode: props.paginationMode\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 (props.getRowHeight) {\n const renderContext = gridRenderContextSelector(apiRef);\n const viewportPageSize = renderContext.lastRowIndex - renderContext.firstRowIndex;\n return Math.min(viewportPageSize - 1, currentPage.rows.length);\n }\n const maximumPageSizeWithoutScrollBar = Math.floor(dimensions.viewportInnerSize.height / rowHeight);\n return Math.min(maximumPageSizeWithoutScrollBar, currentPage.rows.length);\n }, [apiRef, props.pagination, props.paginationMode, props.getRowHeight, rowHeight]);\n const updateDimensions = React.useCallback(() => {\n const rootElement = apiRef.current.rootElementRef.current;\n const pinnedRowsHeight = calculatePinnedRowsHeight(apiRef);\n const scrollbarSize = measureScrollbarSize(rootElement, columnsTotalWidth, props.scrollbarSize);\n const topContainerHeight = headersTotalHeight + pinnedRowsHeight.top;\n const bottomContainerHeight = pinnedRowsHeight.bottom;\n const nonPinnedColumnsTotalWidth = columnsTotalWidth - leftPinnedWidth - rightPinnedWidth;\n const contentSize = {\n width: nonPinnedColumnsTotalWidth,\n height: rowsMeta.currentPageTotalHeight\n };\n let viewportOuterSize;\n let viewportInnerSize;\n let hasScrollX = false;\n let hasScrollY = false;\n if (props.autoHeight) {\n hasScrollY = false;\n hasScrollX = Math.round(columnsTotalWidth) > Math.round(rootDimensionsRef.current.width);\n viewportOuterSize = {\n width: rootDimensionsRef.current.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: rootDimensionsRef.current.width,\n height: rootDimensionsRef.current.height\n };\n viewportInnerSize = {\n width: Math.max(0, viewportOuterSize.width - leftPinnedWidth - rightPinnedWidth),\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 if (hasScrollY) {\n viewportInnerSize.width -= scrollbarSize;\n }\n if (hasScrollX) {\n viewportInnerSize.height -= scrollbarSize;\n }\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: rootDimensionsRef.current,\n viewportOuterSize,\n viewportInnerSize,\n contentSize,\n minimumSize,\n hasScrollX,\n hasScrollY,\n scrollbarSize,\n headerHeight,\n groupHeaderHeight,\n headerFilterHeight,\n rowWidth,\n rowHeight,\n columnsTotalWidth,\n leftPinnedWidth,\n rightPinnedWidth,\n headersTotalHeight,\n topContainerHeight,\n bottomContainerHeight\n };\n const prevDimensions = apiRef.current.state.dimensions;\n setDimensions(newDimensions);\n if (!areElementSizesEqual(newDimensions.viewportInnerSize, prevDimensions.viewportInnerSize)) {\n apiRef.current.publishEvent('viewportInnerSizeChange', newDimensions.viewportInnerSize);\n }\n apiRef.current.updateRenderContext?.();\n }, [apiRef, setDimensions, props.scrollbarSize, props.autoHeight, rowsMeta.currentPageTotalHeight, rowHeight, headerHeight, groupHeaderHeight, headerFilterHeight, columnsTotalWidth, headersTotalHeight, leftPinnedWidth, rightPinnedWidth]);\n const apiPublic = {\n resize,\n getRootDimensions\n };\n const apiPrivate = {\n updateDimensions,\n getViewportPageSize\n };\n useGridApiMethod(apiRef, apiPublic, 'public');\n useGridApiMethod(apiRef, apiPrivate, 'private');\n useEnhancedEffect(() => {\n if (savedSize) {\n updateDimensions();\n apiRef.current.publishEvent('debouncedResize', rootDimensionsRef.current);\n }\n }, [apiRef, savedSize, updateDimensions]);\n const root = apiRef.current.rootElementRef.current;\n useEnhancedEffect(() => {\n if (!root) {\n return;\n }\n const set = (k, v) => root.style.setProperty(k, v);\n set('--DataGrid-width', `${dimensionsState.viewportOuterSize.width}px`);\n set('--DataGrid-hasScrollX', `${Number(dimensionsState.hasScrollX)}`);\n set('--DataGrid-hasScrollY', `${Number(dimensionsState.hasScrollY)}`);\n set('--DataGrid-scrollbarSize', `${dimensionsState.scrollbarSize}px`);\n set('--DataGrid-rowWidth', `${dimensionsState.rowWidth}px`);\n set('--DataGrid-columnsTotalWidth', `${dimensionsState.columnsTotalWidth}px`);\n set('--DataGrid-leftPinnedWidth', `${dimensionsState.leftPinnedWidth}px`);\n set('--DataGrid-rightPinnedWidth', `${dimensionsState.rightPinnedWidth}px`);\n set('--DataGrid-headerHeight', `${dimensionsState.headerHeight}px`);\n set('--DataGrid-headersTotalHeight', `${dimensionsState.headersTotalHeight}px`);\n set('--DataGrid-topContainerHeight', `${dimensionsState.topContainerHeight}px`);\n set('--DataGrid-bottomContainerHeight', `${dimensionsState.bottomContainerHeight}px`);\n set('--height', `${dimensionsState.rowHeight}px`);\n }, [root, dimensionsState]);\n const isFirstSizing = React.useRef(true);\n const handleResize = React.useCallback(size => {\n rootDimensionsRef.current = size;\n\n // jsdom has no layout capabilities\n const isJSDOM = /jsdom/.test(window.navigator.userAgent);\n if (size.height === 0 && !errorShown.current && !props.autoHeight && !isJSDOM) {\n logger.error(['The parent DOM element of the data grid has an empty height.', 'Please make sure that this element has an intrinsic height.', 'The grid displays with a height of 0px.', '', 'More details: https://mui.com/r/x-data-grid-no-dimensions.'].join('\\n'));\n errorShown.current = true;\n }\n if (size.width === 0 && !errorShown.current && !isJSDOM) {\n logger.error(['The parent DOM element of the data grid has an empty width.', 'Please make sure that this element has an intrinsic width.', 'The grid displays with a width of 0px.', '', 'More details: https://mui.com/r/x-data-grid-no-dimensions.'].join('\\n'));\n errorShown.current = true;\n }\n if (isFirstSizing.current) {\n // We want to initialize the grid dimensions as soon as possible to avoid flickering\n setSavedSize(size);\n isFirstSizing.current = false;\n return;\n }\n debouncedSetSavedSize(size);\n }, [props.autoHeight, debouncedSetSavedSize, logger]);\n useEnhancedEffect(updateDimensions, [updateDimensions]);\n useGridApiOptionHandler(apiRef, 'sortedRowsSet', updateDimensions);\n useGridApiOptionHandler(apiRef, 'paginationModelChange', updateDimensions);\n useGridApiOptionHandler(apiRef, 'columnsChange', updateDimensions);\n useGridApiEventHandler(apiRef, 'resize', handleResize);\n useGridApiOptionHandler(apiRef, 'debouncedResize', props.onResize);\n}\nfunction measureScrollbarSize(rootElement, columnsTotalWidth, scrollbarSize) {\n if (scrollbarSize !== undefined) {\n return scrollbarSize;\n }\n if (rootElement === null || columnsTotalWidth === 0) {\n return 0;\n }\n const doc = ownerDocument(rootElement);\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 scrollDiv.className = 'scrollDiv';\n rootElement.appendChild(scrollDiv);\n const size = scrollDiv.offsetWidth - scrollDiv.clientWidth;\n rootElement.removeChild(scrollDiv);\n return size;\n}\n\n// Get rid of floating point imprecision errors\n// https://github.com/mui/mui-x/issues/9550#issuecomment-1619020477\nfunction roundToDecimalPlaces(value, decimals) {\n return Math.round(value * 10 ** decimals) / 10 ** decimals;\n}\nfunction areElementSizesEqual(a, b) {\n return a.width === b.width && a.height === b.height;\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport { unstable_debounce as debounce } from '@mui/utils';\nimport { useGridVisibleRows } from \"../../utils/useGridVisibleRows.js\";\nimport { useGridApiMethod } from \"../../utils/useGridApiMethod.js\";\nimport { useGridSelector } from \"../../utils/useGridSelector.js\";\nimport { gridDensityFactorSelector } from \"../density/densitySelector.js\";\nimport { gridFilterModelSelector } from \"../filter/gridFilterSelector.js\";\nimport { gridPaginationSelector } from \"../pagination/gridPaginationSelector.js\";\nimport { gridSortModelSelector } from \"../sorting/gridSortingSelector.js\";\nimport { useGridRegisterPipeApplier } from \"../../core/pipeProcessing/index.js\";\nimport { gridPinnedRowsSelector } from \"./gridRowsSelector.js\";\nimport { DATA_GRID_PROPS_DEFAULT_VALUES } from \"../../../DataGrid/useDataGridProps.js\";\n\n// TODO: I think the row heights can now be encoded as a single `size` instead of `sizes.baseXxxx`\n\nexport const rowsMetaStateInitializer = state => _extends({}, state, {\n rowsMeta: {\n currentPageTotalHeight: 0,\n positions: []\n }\n});\nlet warnedOnceInvalidRowHeight = false;\nconst 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};\nconst rowHeightWarning = [`MUI X: The \\`rowHeight\\` prop should be a number greater than 0.`, `The default value will be used instead.`].join('\\n');\nconst getRowHeightWarning = [`MUI X: The \\`getRowHeight\\` prop should return a number greater than 0 or 'auto'.`, `The default value will be used instead.`].join('\\n');\n\n/**\n * @requires useGridPageSize (method)\n * @requires useGridPage (method)\n */\nexport const useGridRowsMeta = (apiRef, props) => {\n const {\n getRowHeight: getRowHeightProp,\n getRowSpacing,\n getEstimatedRowHeight\n } = props;\n const rowsHeightLookup = React.useRef(Object.create(null));\n\n // Inspired by https://github.com/bvaughn/react-virtualized/blob/master/source/Grid/utils/CellSizeAndPositionManager.js\n const lastMeasuredRowIndex = React.useRef(-1);\n const hasRowWithAutoHeight = React.useRef(false);\n const densityFactor = useGridSelector(apiRef, gridDensityFactorSelector);\n const filterModel = useGridSelector(apiRef, gridFilterModelSelector);\n const paginationState = useGridSelector(apiRef, gridPaginationSelector);\n const sortModel = useGridSelector(apiRef, gridSortModelSelector);\n const currentPage = useGridVisibleRows(apiRef, props);\n const pinnedRows = useGridSelector(apiRef, gridPinnedRowsSelector);\n const validRowHeight = getValidRowHeight(props.rowHeight, DATA_GRID_PROPS_DEFAULT_VALUES.rowHeight, rowHeightWarning);\n const rowHeight = Math.floor(validRowHeight * densityFactor);\n const hydrateRowsMeta = React.useCallback(() => {\n hasRowWithAutoHeight.current = false;\n const calculateRowProcessedSizes = row => {\n if (!rowsHeightLookup.current[row.id]) {\n rowsHeightLookup.current[row.id] = {\n sizes: {\n baseCenter: rowHeight\n },\n isResized: false,\n autoHeight: false,\n needsFirstMeasurement: true // Assume all rows will need to be measured by default\n };\n }\n const {\n isResized,\n needsFirstMeasurement,\n sizes\n } = rowsHeightLookup.current[row.id];\n let baseRowHeight = typeof rowHeight === 'number' && rowHeight > 0 ? rowHeight : 52;\n const existingBaseRowHeight = sizes.baseCenter;\n if (isResized) {\n // Do not recalculate resized row height and use the value from the lookup\n baseRowHeight = existingBaseRowHeight;\n } else if (getRowHeightProp) {\n const rowHeightFromUser = getRowHeightProp(_extends({}, row, {\n densityFactor\n }));\n if (rowHeightFromUser === 'auto') {\n if (needsFirstMeasurement) {\n const estimatedRowHeight = getEstimatedRowHeight ? getEstimatedRowHeight(_extends({}, row, {\n densityFactor\n })) : rowHeight;\n\n // If the row was not measured yet use the estimated row height\n baseRowHeight = estimatedRowHeight ?? rowHeight;\n } else {\n baseRowHeight = existingBaseRowHeight;\n }\n hasRowWithAutoHeight.current = true;\n rowsHeightLookup.current[row.id].autoHeight = true;\n } else {\n // Default back to base rowHeight if getRowHeight returns invalid value.\n baseRowHeight = getValidRowHeight(rowHeightFromUser, rowHeight, getRowHeightWarning);\n rowsHeightLookup.current[row.id].needsFirstMeasurement = false;\n rowsHeightLookup.current[row.id].autoHeight = false;\n }\n } else {\n rowsHeightLookup.current[row.id].needsFirstMeasurement = false;\n }\n const initialHeights = {\n baseCenter: baseRowHeight\n };\n if (getRowSpacing) {\n const indexRelativeToCurrentPage = apiRef.current.getRowIndexRelativeToVisibleRows(row.id);\n const spacing = getRowSpacing(_extends({}, row, {\n isFirstVisible: indexRelativeToCurrentPage === 0,\n isLastVisible: indexRelativeToCurrentPage === currentPage.rows.length - 1,\n indexRelativeToCurrentPage\n }));\n initialHeights.spacingTop = spacing.top ?? 0;\n initialHeights.spacingBottom = spacing.bottom ?? 0;\n }\n const processedSizes = apiRef.current.unstable_applyPipeProcessors('rowHeight', initialHeights, row);\n rowsHeightLookup.current[row.id].sizes = processedSizes;\n return processedSizes;\n };\n const positions = [];\n const currentPageTotalHeight = currentPage.rows.reduce((acc, row) => {\n positions.push(acc);\n let otherSizes = 0;\n const processedSizes = calculateRowProcessedSizes(row);\n /* eslint-disable-next-line guard-for-in */\n for (const key in processedSizes) {\n const value = processedSizes[key];\n if (key !== 'baseCenter') {\n otherSizes += value;\n }\n }\n return acc + processedSizes.baseCenter + otherSizes;\n }, 0);\n pinnedRows?.top?.forEach(row => {\n calculateRowProcessedSizes(row);\n });\n pinnedRows?.bottom?.forEach(row => {\n calculateRowProcessedSizes(row);\n });\n apiRef.current.setState(state => {\n return _extends({}, state, {\n rowsMeta: {\n currentPageTotalHeight,\n positions\n }\n });\n });\n if (!hasRowWithAutoHeight.current) {\n // No row has height=auto, so all rows are already measured\n lastMeasuredRowIndex.current = Infinity;\n }\n apiRef.current.forceUpdate();\n }, [apiRef, currentPage.rows, rowHeight, getRowHeightProp, getRowSpacing, getEstimatedRowHeight, pinnedRows, densityFactor]);\n const getRowHeight = React.useCallback(rowId => {\n const height = rowsHeightLookup.current[rowId];\n return height ? height.sizes.baseCenter : rowHeight;\n }, [rowHeight]);\n const getRowInternalSizes = rowId => rowsHeightLookup.current[rowId]?.sizes;\n const setRowHeight = React.useCallback((id, height) => {\n rowsHeightLookup.current[id].sizes.baseCenter = height;\n rowsHeightLookup.current[id].isResized = true;\n rowsHeightLookup.current[id].needsFirstMeasurement = false;\n hydrateRowsMeta();\n }, [hydrateRowsMeta]);\n const debouncedHydrateRowsMeta = React.useMemo(() => debounce(hydrateRowsMeta, props.rowPositionsDebounceMs), [hydrateRowsMeta, props.rowPositionsDebounceMs]);\n const storeMeasuredRowHeight = React.useCallback((id, height) => {\n if (!rowsHeightLookup.current[id] || !rowsHeightLookup.current[id].autoHeight) {\n return;\n }\n\n // Only trigger hydration if the value is different, otherwise we trigger a loop\n const needsHydration = rowsHeightLookup.current[id].sizes.baseCenter !== height;\n rowsHeightLookup.current[id].needsFirstMeasurement = false;\n rowsHeightLookup.current[id].sizes.baseCenter = height;\n if (needsHydration) {\n debouncedHydrateRowsMeta();\n }\n }, [debouncedHydrateRowsMeta]);\n const rowHasAutoHeight = React.useCallback(id => {\n return rowsHeightLookup.current[id]?.autoHeight || false;\n }, []);\n const getLastMeasuredRowIndex = React.useCallback(() => {\n return lastMeasuredRowIndex.current;\n }, []);\n const setLastMeasuredRowIndex = React.useCallback(index => {\n if (hasRowWithAutoHeight.current && index > lastMeasuredRowIndex.current) {\n lastMeasuredRowIndex.current = index;\n }\n }, []);\n const resetRowHeights = React.useCallback(() => {\n rowsHeightLookup.current = {};\n hydrateRowsMeta();\n }, [hydrateRowsMeta]);\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 React.useEffect(() => {\n hydrateRowsMeta();\n }, [rowHeight, filterModel, paginationState, sortModel, hydrateRowsMeta]);\n useGridRegisterPipeApplier(apiRef, 'rowHeight', hydrateRowsMeta);\n const rowsMetaApi = {\n unstable_setLastMeasuredRowIndex: setLastMeasuredRowIndex,\n unstable_getRowHeight: getRowHeight,\n unstable_getRowInternalSizes: getRowInternalSizes,\n unstable_setRowHeight: setRowHeight,\n unstable_storeRowHeightMeasurement: storeMeasuredRowHeight,\n resetRowHeights\n };\n const rowsMetaPrivateApi = {\n getLastMeasuredRowIndex,\n rowHasAutoHeight\n };\n useGridApiMethod(apiRef, rowsMetaApi, 'public');\n useGridApiMethod(apiRef, rowsMetaPrivateApi, 'private');\n};","import * as React from 'react';\nimport { useGridApiMethod } from \"../../utils/useGridApiMethod.js\";\nimport { useGridApiEventHandler } from \"../../utils/useGridApiEventHandler.js\";\n/**\n * @requires useGridColumns (method, event)\n * @requires useGridParamsApi (method)\n */\nexport const useGridColumnSpanning = apiRef => {\n const lookup = React.useRef({});\n const getCellColSpanInfo = (rowId, columnIndex) => {\n return lookup.current[rowId]?.[columnIndex];\n };\n const resetColSpan = () => {\n lookup.current = {};\n };\n\n // Calculate `colSpan` for each cell in the row\n const calculateColSpan = React.useCallback(({\n rowId,\n minFirstColumn,\n maxLastColumn,\n columns\n }) => {\n for (let i = minFirstColumn; i < maxLastColumn; i += 1) {\n const cellProps = calculateCellColSpan({\n apiRef,\n lookup: lookup.current,\n columnIndex: i,\n rowId,\n minFirstColumnIndex: minFirstColumn,\n maxLastColumnIndex: maxLastColumn,\n columns\n });\n if (cellProps.colSpan > 1) {\n i += cellProps.colSpan - 1;\n }\n }\n }, [apiRef]);\n const columnSpanningPublicApi = {\n unstable_getCellColSpanInfo: getCellColSpanInfo\n };\n const columnSpanningPrivateApi = {\n resetColSpan,\n calculateColSpan\n };\n useGridApiMethod(apiRef, columnSpanningPublicApi, 'public');\n useGridApiMethod(apiRef, columnSpanningPrivateApi, 'private');\n useGridApiEventHandler(apiRef, 'columnOrderChange', resetColSpan);\n};\nfunction calculateCellColSpan(params) {\n const {\n apiRef,\n lookup,\n columnIndex,\n rowId,\n minFirstColumnIndex,\n maxLastColumnIndex,\n columns\n } = params;\n const columnsLength = columns.length;\n const column = columns[columnIndex];\n const row = apiRef.current.getRow(rowId);\n const value = apiRef.current.getRowValue(row, column);\n const colSpan = typeof column.colSpan === 'function' ? column.colSpan(value, row, column, apiRef) : column.colSpan;\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(lookup, rowId, columnIndex, cellColSpanInfo) {\n if (!lookup[rowId]) {\n lookup[rowId] = {};\n }\n lookup[rowId][columnIndex] = cellColSpanInfo;\n}","import { isLeaf } from \"../../../models/gridColumnGrouping.js\";\nimport { isDeepEqual } from \"../../../utils/utils.js\";\n// This is the recurrence function that help writing `unwrapGroupingColumnModel()`\nconst recurrentUnwrapGroupingColumnModel = (columnGroupNode, parents, unwrappedGroupingModelToComplete) => {\n if (isLeaf(columnGroupNode)) {\n if (unwrappedGroupingModelToComplete[columnGroupNode.field] !== undefined) {\n throw new Error([`MUI X: columnGroupingModel contains duplicated field`, `column field ${columnGroupNode.field} occurs two times in the grouping model:`, `- ${unwrappedGroupingModelToComplete[columnGroupNode.field].join(' > ')}`, `- ${parents.join(' > ')}`].join('\\n'));\n }\n unwrappedGroupingModelToComplete[columnGroupNode.field] = parents;\n return;\n }\n const {\n groupId,\n children\n } = columnGroupNode;\n children.forEach(child => {\n recurrentUnwrapGroupingColumnModel(child, [...parents, groupId], unwrappedGroupingModelToComplete);\n });\n};\n\n/**\n * This is a function that provide for each column the array of its parents.\n * Parents are ordered from the root to the leaf.\n * @param columnGroupingModel The model such as provided in DataGrid props\n * @returns An object `{[field]: groupIds}` where `groupIds` is the parents of the column `field`\n */\nexport const unwrapGroupingColumnModel = columnGroupingModel => {\n if (!columnGroupingModel) {\n return {};\n }\n const unwrappedSubTree = {};\n columnGroupingModel.forEach(columnGroupNode => {\n recurrentUnwrapGroupingColumnModel(columnGroupNode, [], unwrappedSubTree);\n });\n return unwrappedSubTree;\n};\nexport const getColumnGroupsHeaderStructure = (orderedColumns, unwrappedGroupingModel, pinnedFields) => {\n const getParents = field => unwrappedGroupingModel[field] ?? [];\n const groupingHeaderStructure = [];\n const maxDepth = Math.max(...orderedColumns.map(field => getParents(field).length));\n const haveSameParents = (field1, field2, depth) => isDeepEqual(getParents(field1).slice(0, depth + 1), getParents(field2).slice(0, depth + 1));\n const haveDifferentContainers = (field1, field2) => {\n if (pinnedFields?.left && pinnedFields.left.includes(field1) && !pinnedFields.left.includes(field2)) {\n return true;\n }\n if (pinnedFields?.right && !pinnedFields.right.includes(field1) && pinnedFields.right.includes(field2)) {\n return true;\n }\n return false;\n };\n for (let depth = 0; depth < maxDepth; depth += 1) {\n const depthStructure = orderedColumns.reduce((structure, newField) => {\n const groupId = getParents(newField)[depth] ?? null;\n if (structure.length === 0) {\n return [{\n columnFields: [newField],\n groupId\n }];\n }\n const lastGroup = structure[structure.length - 1];\n const prevField = lastGroup.columnFields[lastGroup.columnFields.length - 1];\n const prevGroupId = lastGroup.groupId;\n if (prevGroupId !== groupId || !haveSameParents(prevField, newField, depth) ||\n // Fix for https://github.com/mui/mui-x/issues/7041\n haveDifferentContainers(prevField, newField)) {\n // It's a new group\n return [...structure, {\n columnFields: [newField],\n groupId\n }];\n }\n\n // It extends the previous group\n return [...structure.slice(0, structure.length - 1), {\n columnFields: [...lastGroup.columnFields, newField],\n groupId\n }];\n }, []);\n groupingHeaderStructure.push(depthStructure);\n }\n return groupingHeaderStructure;\n};","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"groupId\", \"children\"];\nimport * as React from 'react';\nimport { isLeaf } from \"../../../models/gridColumnGrouping.js\";\nimport { gridColumnGroupsLookupSelector, gridColumnGroupsUnwrappedModelSelector } from \"./gridColumnGroupsSelector.js\";\nimport { useGridApiMethod } from \"../../utils/useGridApiMethod.js\";\nimport { getColumnGroupsHeaderStructure, unwrapGroupingColumnModel } from \"./gridColumnGroupsUtils.js\";\nimport { useGridApiEventHandler } from \"../../utils/useGridApiEventHandler.js\";\nimport { gridColumnFieldsSelector, gridVisibleColumnFieldsSelector } from \"../columns/index.js\";\nconst createGroupLookup = columnGroupingModel => {\n let groupLookup = {};\n columnGroupingModel.forEach(node => {\n if (isLeaf(node)) {\n return;\n }\n const {\n groupId,\n children\n } = node,\n other = _objectWithoutPropertiesLoose(node, _excluded);\n if (!groupId) {\n throw new Error('MUI X: An element of the columnGroupingModel does not have either `field` or `groupId`.');\n }\n if (process.env.NODE_ENV !== 'production') {\n if (!children) {\n console.warn(`MUI X: group groupId=${groupId} has no children.`);\n }\n }\n const groupParam = _extends({}, other, {\n groupId\n });\n const subTreeLookup = createGroupLookup(children);\n if (subTreeLookup[groupId] !== undefined || groupLookup[groupId] !== undefined) {\n throw new Error(`MUI X: The groupId ${groupId} is used multiple times in the columnGroupingModel.`);\n }\n groupLookup = _extends({}, groupLookup, subTreeLookup, {\n [groupId]: groupParam\n });\n });\n return _extends({}, groupLookup);\n};\nexport const columnGroupsStateInitializer = (state, props, apiRef) => {\n if (!props.columnGroupingModel) {\n return state;\n }\n const columnFields = gridColumnFieldsSelector(apiRef);\n const visibleColumnFields = gridVisibleColumnFieldsSelector(apiRef);\n const groupLookup = createGroupLookup(props.columnGroupingModel ?? []);\n const unwrappedGroupingModel = unwrapGroupingColumnModel(props.columnGroupingModel ?? []);\n const columnGroupsHeaderStructure = getColumnGroupsHeaderStructure(columnFields, unwrappedGroupingModel, apiRef.current.state.pinnedColumns ?? {});\n const maxDepth = visibleColumnFields.length === 0 ? 0 : Math.max(...visibleColumnFields.map(field => unwrappedGroupingModel[field]?.length ?? 0));\n return _extends({}, state, {\n columnGrouping: {\n lookup: groupLookup,\n unwrappedGroupingModel,\n headerStructure: columnGroupsHeaderStructure,\n maxDepth\n }\n });\n};\n\n/**\n * @requires useGridColumns (method, event)\n * @requires useGridParamsApi (method)\n */\nexport const useGridColumnGrouping = (apiRef, props) => {\n /**\n * API METHODS\n */\n const getColumnGroupPath = React.useCallback(field => {\n const unwrappedGroupingModel = gridColumnGroupsUnwrappedModelSelector(apiRef);\n return unwrappedGroupingModel[field] ?? [];\n }, [apiRef]);\n const getAllGroupDetails = React.useCallback(() => {\n const columnGroupLookup = gridColumnGroupsLookupSelector(apiRef);\n return columnGroupLookup;\n }, [apiRef]);\n const columnGroupingApi = {\n getColumnGroupPath,\n getAllGroupDetails\n };\n useGridApiMethod(apiRef, columnGroupingApi, 'public');\n const handleColumnIndexChange = React.useCallback(() => {\n const unwrappedGroupingModel = unwrapGroupingColumnModel(props.columnGroupingModel ?? []);\n apiRef.current.setState(state => {\n const orderedFields = state.columns?.orderedFields ?? [];\n const pinnedColumns = state.pinnedColumns ?? {};\n const columnGroupsHeaderStructure = getColumnGroupsHeaderStructure(orderedFields, unwrappedGroupingModel, pinnedColumns);\n return _extends({}, state, {\n columnGrouping: _extends({}, state.columnGrouping, {\n headerStructure: columnGroupsHeaderStructure\n })\n });\n });\n }, [apiRef, props.columnGroupingModel]);\n const updateColumnGroupingState = React.useCallback(columnGroupingModel => {\n // @ts-expect-error Move this logic to `Pro` package\n const pinnedColumns = apiRef.current.getPinnedColumns?.() ?? {};\n const columnFields = gridColumnFieldsSelector(apiRef);\n const visibleColumnFields = gridVisibleColumnFieldsSelector(apiRef);\n const groupLookup = createGroupLookup(columnGroupingModel ?? []);\n const unwrappedGroupingModel = unwrapGroupingColumnModel(columnGroupingModel ?? []);\n const columnGroupsHeaderStructure = getColumnGroupsHeaderStructure(columnFields, unwrappedGroupingModel, pinnedColumns);\n const maxDepth = visibleColumnFields.length === 0 ? 0 : Math.max(...visibleColumnFields.map(field => unwrappedGroupingModel[field]?.length ?? 0));\n apiRef.current.setState(state => {\n return _extends({}, state, {\n columnGrouping: {\n lookup: groupLookup,\n unwrappedGroupingModel,\n headerStructure: columnGroupsHeaderStructure,\n maxDepth\n }\n });\n });\n }, [apiRef]);\n useGridApiEventHandler(apiRef, 'columnIndexChange', handleColumnIndexChange);\n useGridApiEventHandler(apiRef, 'columnsChange', () => {\n updateColumnGroupingState(props.columnGroupingModel);\n });\n useGridApiEventHandler(apiRef, 'columnVisibilityModelChange', () => {\n updateColumnGroupingState(props.columnGroupingModel);\n });\n\n /**\n * EFFECTS\n */\n React.useEffect(() => {\n updateColumnGroupingState(props.columnGroupingModel);\n }, [updateColumnGroupingState, props.columnGroupingModel]);\n};","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport { unstable_ownerDocument as ownerDocument, unstable_useEventCallback as useEventCallback } from '@mui/utils';\nimport useLazyRef from '@mui/utils/useLazyRef';\nimport { useRtl } from '@mui/system/RtlProvider';\nimport { findGridCellElementsFromCol, findGridElement, findLeftPinnedCellsAfterCol, findRightPinnedCellsBeforeCol, getFieldFromHeaderElem, findHeaderElementFromField, getFieldsFromGroupHeaderElem, findGroupHeaderElementsFromField, findGridHeader, findGridCells, findParentElementFromClassName, findLeftPinnedHeadersAfterCol, findRightPinnedHeadersBeforeCol, escapeOperandAttributeSelector } from \"../../../utils/domUtils.js\";\nimport { DEFAULT_GRID_AUTOSIZE_OPTIONS } from \"./gridColumnResizeApi.js\";\nimport { gridClasses } from \"../../../constants/gridClasses.js\";\nimport { useGridApiEventHandler, useGridApiMethod, useGridApiOptionHandler, useGridLogger, useGridNativeEventListener, useGridSelector, useOnMount } from \"../../utils/index.js\";\nimport { gridVirtualizationColumnEnabledSelector } from \"../virtualization/index.js\";\nimport { createControllablePromise } from \"../../../utils/createControllablePromise.js\";\nimport { clamp } from \"../../../utils/utils.js\";\nimport { useTimeout } from \"../../utils/useTimeout.js\";\nimport { GridPinnedColumnPosition } from \"../columns/gridColumnsInterfaces.js\";\nimport { gridColumnsStateSelector } from \"../columns/index.js\";\nfunction trackFinger(event, currentTouchId) {\n if (currentTouchId !== undefined && event.changedTouches) {\n for (let i = 0; i < event.changedTouches.length; i += 1) {\n const touch = event.changedTouches[i];\n if (touch.identifier === currentTouchId) {\n return {\n x: touch.clientX,\n y: touch.clientY\n };\n }\n }\n return false;\n }\n return {\n x: event.clientX,\n y: event.clientY\n };\n}\nfunction computeNewWidth(initialOffsetToSeparator, clickX, columnBounds, resizeDirection) {\n let newWidth = initialOffsetToSeparator;\n if (resizeDirection === 'Right') {\n newWidth += clickX - columnBounds.left;\n } else {\n newWidth += columnBounds.right - clickX;\n }\n return newWidth;\n}\nfunction computeOffsetToSeparator(clickX, columnBounds, resizeDirection) {\n if (resizeDirection === 'Left') {\n return clickX - columnBounds.left;\n }\n return columnBounds.right - clickX;\n}\nfunction flipResizeDirection(side) {\n if (side === 'Right') {\n return 'Left';\n }\n return 'Right';\n}\nfunction getResizeDirection(separator, isRtl) {\n const side = separator.classList.contains(gridClasses['columnSeparator--sideRight']) ? 'Right' : 'Left';\n if (isRtl) {\n // Resizing logic should be mirrored in the RTL case\n return flipResizeDirection(side);\n }\n return side;\n}\nfunction preventClick(event) {\n event.preventDefault();\n event.stopImmediatePropagation();\n}\n\n/**\n * Checker that returns a promise that resolves when the column virtualization\n * is disabled.\n */\nfunction useColumnVirtualizationDisabled(apiRef) {\n const promise = React.useRef();\n const selector = () => gridVirtualizationColumnEnabledSelector(apiRef);\n const value = useGridSelector(apiRef, selector);\n React.useEffect(() => {\n if (promise.current && value === false) {\n promise.current.resolve();\n promise.current = undefined;\n }\n });\n const asyncCheck = () => {\n if (!promise.current) {\n if (selector() === false) {\n return Promise.resolve();\n }\n promise.current = createControllablePromise();\n }\n return promise.current;\n };\n return asyncCheck;\n}\n\n/**\n * Basic statistical outlier detection, checks if the value is `F * IQR` away from\n * the Q1 and Q3 boundaries. IQR: interquartile range.\n */\nfunction excludeOutliers(inputValues, factor) {\n if (inputValues.length < 4) {\n return inputValues;\n }\n const values = inputValues.slice();\n values.sort((a, b) => a - b);\n const q1 = values[Math.floor(values.length * 0.25)];\n const q3 = values[Math.floor(values.length * 0.75) - 1];\n const iqr = q3 - q1;\n\n // We make a small adjustment if `iqr < 5` for the cases where the IQR is\n // very small (for example zero) due to very close by values in the input data.\n // Otherwise, with an IQR of `0`, anything outside that would be considered\n // an outlier, but it makes more sense visually to allow for this 5px variance\n // rather than showing a cropped cell.\n const deviation = iqr < 5 ? 5 : iqr * factor;\n return values.filter(v => v > q1 - deviation && v < q3 + deviation);\n}\nfunction extractColumnWidths(apiRef, options, columns) {\n const widthByField = {};\n const root = apiRef.current.rootElementRef.current;\n root.classList.add(gridClasses.autosizing);\n columns.forEach(column => {\n const cells = findGridCells(apiRef.current, column.field);\n const widths = cells.map(cell => {\n return cell.getBoundingClientRect().width ?? 0;\n });\n const filteredWidths = options.includeOutliers ? widths : excludeOutliers(widths, options.outliersFactor);\n if (options.includeHeaders) {\n const header = findGridHeader(apiRef.current, column.field);\n if (header) {\n const title = header.querySelector(`.${gridClasses.columnHeaderTitle}`);\n const content = header.querySelector(`.${gridClasses.columnHeaderTitleContainerContent}`);\n const iconContainer = header.querySelector(`.${gridClasses.iconButtonContainer}`);\n const menuContainer = header.querySelector(`.${gridClasses.menuIcon}`);\n const element = title ?? content;\n const style = window.getComputedStyle(header, null);\n const paddingWidth = parseInt(style.paddingLeft, 10) + parseInt(style.paddingRight, 10);\n const contentWidth = element.scrollWidth + 1;\n const width = contentWidth + paddingWidth + (iconContainer?.clientWidth ?? 0) + (menuContainer?.clientWidth ?? 0);\n filteredWidths.push(width);\n }\n }\n const hasColumnMin = column.minWidth !== -Infinity && column.minWidth !== undefined;\n const hasColumnMax = column.maxWidth !== Infinity && column.maxWidth !== undefined;\n const min = hasColumnMin ? column.minWidth : 0;\n const max = hasColumnMax ? column.maxWidth : Infinity;\n const maxContent = filteredWidths.length === 0 ? 0 : Math.max(...filteredWidths);\n widthByField[column.field] = clamp(maxContent, min, max);\n });\n root.classList.remove(gridClasses.autosizing);\n return widthByField;\n}\nexport const columnResizeStateInitializer = state => _extends({}, state, {\n columnResize: {\n resizingColumnField: ''\n }\n});\nfunction createResizeRefs() {\n return {\n colDef: undefined,\n initialColWidth: 0,\n initialTotalWidth: 0,\n previousMouseClickEvent: undefined,\n columnHeaderElement: undefined,\n headerFilterElement: undefined,\n groupHeaderElements: [],\n cellElements: [],\n leftPinnedCellsAfter: [],\n rightPinnedCellsBefore: [],\n fillerLeft: undefined,\n fillerRight: undefined,\n leftPinnedHeadersAfter: [],\n rightPinnedHeadersBefore: []\n };\n}\n\n/**\n * @requires useGridColumns (method, event)\n * TODO: improve experience for last column\n */\nexport const useGridColumnResize = (apiRef, props) => {\n const isRtl = useRtl();\n const logger = useGridLogger(apiRef, 'useGridColumnResize');\n const refs = useLazyRef(createResizeRefs).current;\n\n // To improve accessibility, the separator has padding on both sides.\n // Clicking inside the padding area should be treated as a click in the separator.\n // This ref stores the offset between the click and the separator.\n const initialOffsetToSeparator = React.useRef();\n const resizeDirection = React.useRef();\n const stopResizeEventTimeout = useTimeout();\n const touchId = React.useRef();\n const updateWidth = newWidth => {\n logger.debug(`Updating width to ${newWidth} for col ${refs.colDef.field}`);\n const prevWidth = refs.columnHeaderElement.offsetWidth;\n const widthDiff = newWidth - prevWidth;\n const columnWidthDiff = newWidth - refs.initialColWidth;\n const newTotalWidth = refs.initialTotalWidth + columnWidthDiff;\n apiRef.current.rootElementRef?.current?.style.setProperty('--DataGrid-rowWidth', `${newTotalWidth}px`);\n refs.colDef.computedWidth = newWidth;\n refs.colDef.width = newWidth;\n refs.colDef.flex = 0;\n refs.columnHeaderElement.style.width = `${newWidth}px`;\n const headerFilterElement = refs.headerFilterElement;\n if (headerFilterElement) {\n headerFilterElement.style.width = `${newWidth}px`;\n }\n refs.groupHeaderElements.forEach(element => {\n const div = element;\n let finalWidth;\n if (div.getAttribute('aria-colspan') === '1') {\n finalWidth = `${newWidth}px`;\n } else {\n // Cell with colspan > 1 cannot be just updated width new width.\n // Instead, we add width diff to the current width.\n finalWidth = `${div.offsetWidth + widthDiff}px`;\n }\n div.style.width = finalWidth;\n });\n refs.cellElements.forEach(element => {\n const div = element;\n let finalWidth;\n if (div.getAttribute('aria-colspan') === '1') {\n finalWidth = `${newWidth}px`;\n } else {\n // Cell with colspan > 1 cannot be just updated width new width.\n // Instead, we add width diff to the current width.\n finalWidth = `${div.offsetWidth + widthDiff}px`;\n }\n div.style.setProperty('--width', finalWidth);\n });\n const pinnedPosition = apiRef.current.unstable_applyPipeProcessors('isColumnPinned', false, refs.colDef.field);\n if (pinnedPosition === GridPinnedColumnPosition.LEFT) {\n updateProperty(refs.fillerLeft, 'width', widthDiff);\n refs.leftPinnedCellsAfter.forEach(cell => {\n updateProperty(cell, 'left', widthDiff);\n });\n refs.leftPinnedHeadersAfter.forEach(header => {\n updateProperty(header, 'left', widthDiff);\n });\n }\n if (pinnedPosition === GridPinnedColumnPosition.RIGHT) {\n updateProperty(refs.fillerRight, 'width', widthDiff);\n refs.rightPinnedCellsBefore.forEach(cell => {\n updateProperty(cell, 'right', widthDiff);\n });\n refs.rightPinnedHeadersBefore.forEach(header => {\n updateProperty(header, 'right', widthDiff);\n });\n }\n };\n const finishResize = nativeEvent => {\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n stopListening();\n\n // Prevent double-clicks from being interpreted as two separate clicks\n if (refs.previousMouseClickEvent) {\n const prevEvent = refs.previousMouseClickEvent;\n const prevTimeStamp = prevEvent.timeStamp;\n const prevClientX = prevEvent.clientX;\n const prevClientY = prevEvent.clientY;\n\n // Check if the current event is part of a double-click\n if (nativeEvent.timeStamp - prevTimeStamp < 300 && nativeEvent.clientX === prevClientX && nativeEvent.clientY === prevClientY) {\n refs.previousMouseClickEvent = undefined;\n apiRef.current.publishEvent('columnResizeStop', null, nativeEvent);\n return;\n }\n }\n if (refs.colDef) {\n apiRef.current.setColumnWidth(refs.colDef.field, refs.colDef.width);\n logger.debug(`Updating col ${refs.colDef.field} with new width: ${refs.colDef.width}`);\n\n // Since during resizing we update the columns width outside of React, React is unable to\n // reapply the right style properties. We need to sync the state manually.\n // So we reapply the same logic as in https://github.com/mui/mui-x/blob/0511bf65543ca05d2602a5a3e0a6156f2fc8e759/packages/x-data-grid/src/hooks/features/columnHeaders/useGridColumnHeaders.tsx#L405\n const columnsState = gridColumnsStateSelector(apiRef.current.state);\n refs.groupHeaderElements.forEach(element => {\n const fields = getFieldsFromGroupHeaderElem(element);\n const div = element;\n const newWidth = fields.reduce((acc, field) => {\n if (columnsState.columnVisibilityModel[field] !== false) {\n return acc + columnsState.lookup[field].computedWidth;\n }\n return acc;\n }, 0);\n const finalWidth = `${newWidth}px`;\n div.style.width = finalWidth;\n });\n }\n stopResizeEventTimeout.start(0, () => {\n apiRef.current.publishEvent('columnResizeStop', null, nativeEvent);\n });\n };\n const storeReferences = (colDef, separator, xStart) => {\n const root = apiRef.current.rootElementRef.current;\n refs.initialColWidth = colDef.computedWidth;\n refs.initialTotalWidth = apiRef.current.getRootDimensions().rowWidth;\n refs.colDef = colDef;\n refs.columnHeaderElement = findHeaderElementFromField(apiRef.current.columnHeadersContainerRef.current, colDef.field);\n const headerFilterElement = root.querySelector(`.${gridClasses.headerFilterRow} [data-field=\"${escapeOperandAttributeSelector(colDef.field)}\"]`);\n if (headerFilterElement) {\n refs.headerFilterElement = headerFilterElement;\n }\n refs.groupHeaderElements = findGroupHeaderElementsFromField(apiRef.current.columnHeadersContainerRef?.current, colDef.field);\n refs.cellElements = findGridCellElementsFromCol(refs.columnHeaderElement, apiRef.current);\n refs.fillerLeft = findGridElement(apiRef.current, isRtl ? 'filler--pinnedRight' : 'filler--pinnedLeft');\n refs.fillerRight = findGridElement(apiRef.current, isRtl ? 'filler--pinnedLeft' : 'filler--pinnedRight');\n const pinnedPosition = apiRef.current.unstable_applyPipeProcessors('isColumnPinned', false, refs.colDef.field);\n refs.leftPinnedCellsAfter = pinnedPosition !== GridPinnedColumnPosition.LEFT ? [] : findLeftPinnedCellsAfterCol(apiRef.current, refs.columnHeaderElement, isRtl);\n refs.rightPinnedCellsBefore = pinnedPosition !== GridPinnedColumnPosition.RIGHT ? [] : findRightPinnedCellsBeforeCol(apiRef.current, refs.columnHeaderElement, isRtl);\n refs.leftPinnedHeadersAfter = pinnedPosition !== GridPinnedColumnPosition.LEFT ? [] : findLeftPinnedHeadersAfterCol(apiRef.current, refs.columnHeaderElement, isRtl);\n refs.rightPinnedHeadersBefore = pinnedPosition !== GridPinnedColumnPosition.RIGHT ? [] : findRightPinnedHeadersBeforeCol(apiRef.current, refs.columnHeaderElement, isRtl);\n resizeDirection.current = getResizeDirection(separator, isRtl);\n initialOffsetToSeparator.current = computeOffsetToSeparator(xStart, refs.columnHeaderElement.getBoundingClientRect(), resizeDirection.current);\n };\n const handleResizeMouseUp = useEventCallback(finishResize);\n const handleResizeMouseMove = useEventCallback(nativeEvent => {\n // Cancel move in case some other element consumed a mouseup event and it was not fired.\n if (nativeEvent.buttons === 0) {\n handleResizeMouseUp(nativeEvent);\n return;\n }\n let newWidth = computeNewWidth(initialOffsetToSeparator.current, nativeEvent.clientX, refs.columnHeaderElement.getBoundingClientRect(), resizeDirection.current);\n newWidth = clamp(newWidth, refs.colDef.minWidth, refs.colDef.maxWidth);\n updateWidth(newWidth);\n const params = {\n element: refs.columnHeaderElement,\n colDef: refs.colDef,\n width: newWidth\n };\n apiRef.current.publishEvent('columnResize', params, nativeEvent);\n });\n const handleTouchEnd = useEventCallback(nativeEvent => {\n const finger = trackFinger(nativeEvent, touchId.current);\n if (!finger) {\n return;\n }\n finishResize(nativeEvent);\n });\n const handleTouchMove = useEventCallback(nativeEvent => {\n const finger = trackFinger(nativeEvent, touchId.current);\n if (!finger) {\n return;\n }\n\n // Cancel move in case some other element consumed a touchmove event and it was not fired.\n if (nativeEvent.type === 'mousemove' && nativeEvent.buttons === 0) {\n handleTouchEnd(nativeEvent);\n return;\n }\n let newWidth = computeNewWidth(initialOffsetToSeparator.current, finger.x, refs.columnHeaderElement.getBoundingClientRect(), resizeDirection.current);\n newWidth = clamp(newWidth, refs.colDef.minWidth, refs.colDef.maxWidth);\n updateWidth(newWidth);\n const params = {\n element: refs.columnHeaderElement,\n colDef: refs.colDef,\n width: newWidth\n };\n apiRef.current.publishEvent('columnResize', params, nativeEvent);\n });\n const handleTouchStart = useEventCallback(event => {\n const cellSeparator = findParentElementFromClassName(event.target, gridClasses['columnSeparator--resizable']);\n // Let the event bubble if the target is not a col separator\n if (!cellSeparator) {\n return;\n }\n const touch = event.changedTouches[0];\n if (touch != null) {\n // A number that uniquely identifies the current finger in the touch session.\n touchId.current = touch.identifier;\n }\n const columnHeaderElement = findParentElementFromClassName(event.target, gridClasses.columnHeader);\n const field = getFieldFromHeaderElem(columnHeaderElement);\n const colDef = apiRef.current.getColumn(field);\n logger.debug(`Start Resize on col ${colDef.field}`);\n apiRef.current.publishEvent('columnResizeStart', {\n field\n }, event);\n storeReferences(colDef, cellSeparator, touch.clientX);\n const doc = ownerDocument(event.currentTarget);\n doc.addEventListener('touchmove', handleTouchMove);\n doc.addEventListener('touchend', handleTouchEnd);\n });\n const stopListening = React.useCallback(() => {\n const doc = ownerDocument(apiRef.current.rootElementRef.current);\n doc.body.style.removeProperty('cursor');\n doc.removeEventListener('mousemove', handleResizeMouseMove);\n doc.removeEventListener('mouseup', handleResizeMouseUp);\n doc.removeEventListener('touchmove', handleTouchMove);\n doc.removeEventListener('touchend', handleTouchEnd);\n // The click event runs right after the mouseup event, we want to wait until it\n // has been canceled before removing our handler.\n setTimeout(() => {\n doc.removeEventListener('click', preventClick, true);\n }, 100);\n if (refs.columnHeaderElement) {\n refs.columnHeaderElement.style.pointerEvents = 'unset';\n }\n }, [apiRef, refs, handleResizeMouseMove, handleResizeMouseUp, handleTouchMove, handleTouchEnd]);\n const handleResizeStart = React.useCallback(({\n field\n }) => {\n apiRef.current.setState(state => _extends({}, state, {\n columnResize: _extends({}, state.columnResize, {\n resizingColumnField: field\n })\n }));\n apiRef.current.forceUpdate();\n }, [apiRef]);\n const handleResizeStop = React.useCallback(() => {\n apiRef.current.setState(state => _extends({}, state, {\n columnResize: _extends({}, state.columnResize, {\n resizingColumnField: ''\n })\n }));\n apiRef.current.forceUpdate();\n }, [apiRef]);\n const handleColumnResizeMouseDown = useEventCallback(({\n colDef\n }, event) => {\n // Only handle left clicks\n if (event.button !== 0) {\n return;\n }\n\n // Skip if the column isn't resizable\n if (!event.currentTarget.classList.contains(gridClasses['columnSeparator--resizable'])) {\n return;\n }\n\n // Avoid text selection\n event.preventDefault();\n logger.debug(`Start Resize on col ${colDef.field}`);\n apiRef.current.publishEvent('columnResizeStart', {\n field: colDef.field\n }, event);\n storeReferences(colDef, event.currentTarget, event.clientX);\n const doc = ownerDocument(apiRef.current.rootElementRef.current);\n doc.body.style.cursor = 'col-resize';\n refs.previousMouseClickEvent = event.nativeEvent;\n doc.addEventListener('mousemove', handleResizeMouseMove);\n doc.addEventListener('mouseup', handleResizeMouseUp);\n\n // Prevent the click event if we have resized the column.\n // Fixes https://github.com/mui/mui-x/issues/4777\n doc.addEventListener('click', preventClick, true);\n });\n const handleColumnSeparatorDoubleClick = useEventCallback((params, event) => {\n if (props.disableAutosize) {\n return;\n }\n\n // Only handle left clicks\n if (event.button !== 0) {\n return;\n }\n const column = apiRef.current.state.columns.lookup[params.field];\n if (column.resizable === false) {\n return;\n }\n apiRef.current.autosizeColumns(_extends({}, props.autosizeOptions, {\n columns: [column.field]\n }));\n });\n\n /**\n * API METHODS\n */\n\n const columnVirtualizationDisabled = useColumnVirtualizationDisabled(apiRef);\n const isAutosizingRef = React.useRef(false);\n const autosizeColumns = React.useCallback(async userOptions => {\n const root = apiRef.current.rootElementRef?.current;\n if (!root) {\n return;\n }\n if (isAutosizingRef.current) {\n return;\n }\n isAutosizingRef.current = true;\n const state = gridColumnsStateSelector(apiRef.current.state);\n const options = _extends({}, DEFAULT_GRID_AUTOSIZE_OPTIONS, userOptions, {\n columns: userOptions?.columns ?? state.orderedFields\n });\n options.columns = options.columns.filter(c => state.columnVisibilityModel[c] !== false);\n const columns = options.columns.map(c => apiRef.current.state.columns.lookup[c]);\n try {\n apiRef.current.unstable_setColumnVirtualization(false);\n await columnVirtualizationDisabled();\n const widthByField = extractColumnWidths(apiRef, options, columns);\n const newColumns = columns.map(column => _extends({}, column, {\n width: widthByField[column.field],\n computedWidth: widthByField[column.field]\n }));\n if (options.expand) {\n const visibleColumns = state.orderedFields.map(field => state.lookup[field]).filter(c => state.columnVisibilityModel[c.field] !== false);\n const totalWidth = visibleColumns.reduce((total, column) => total + (widthByField[column.field] ?? column.computedWidth ?? column.width), 0);\n const availableWidth = apiRef.current.getRootDimensions().viewportInnerSize.width;\n const remainingWidth = availableWidth - totalWidth;\n if (remainingWidth > 0) {\n const widthPerColumn = remainingWidth / (newColumns.length || 1);\n newColumns.forEach(column => {\n column.width += widthPerColumn;\n column.computedWidth += widthPerColumn;\n });\n }\n }\n apiRef.current.updateColumns(newColumns);\n newColumns.forEach((newColumn, index) => {\n if (newColumn.width !== columns[index].width) {\n const width = newColumn.width;\n apiRef.current.publishEvent('columnWidthChange', {\n element: apiRef.current.getColumnHeaderElement(newColumn.field),\n colDef: newColumn,\n width\n });\n }\n });\n } finally {\n apiRef.current.unstable_setColumnVirtualization(true);\n isAutosizingRef.current = false;\n }\n }, [apiRef, columnVirtualizationDisabled]);\n\n /**\n * EFFECTS\n */\n\n React.useEffect(() => stopListening, [stopListening]);\n useOnMount(() => {\n if (props.autosizeOnMount) {\n Promise.resolve().then(() => {\n apiRef.current.autosizeColumns(props.autosizeOptions);\n });\n }\n });\n useGridNativeEventListener(apiRef, () => apiRef.current.columnHeadersContainerRef?.current, 'touchstart', handleTouchStart, {\n passive: true\n });\n useGridApiMethod(apiRef, {\n autosizeColumns\n }, 'public');\n useGridApiEventHandler(apiRef, 'columnResizeStop', handleResizeStop);\n useGridApiEventHandler(apiRef, 'columnResizeStart', handleResizeStart);\n useGridApiEventHandler(apiRef, 'columnSeparatorMouseDown', handleColumnResizeMouseDown);\n useGridApiEventHandler(apiRef, 'columnSeparatorDoubleClick', handleColumnSeparatorDoubleClick);\n useGridApiOptionHandler(apiRef, 'columnResize', props.onColumnResize);\n useGridApiOptionHandler(apiRef, 'columnWidthChange', props.onColumnWidthChange);\n};\nfunction updateProperty(element, property, delta) {\n if (!element) {\n return;\n }\n element.style[property] = `${parseInt(element.style[property], 10) + delta}px`;\n}","export function createControllablePromise() {\n let resolve;\n let reject;\n const promise = new Promise((_resolve, _reject) => {\n resolve = _resolve;\n reject = _reject;\n });\n promise.resolve = resolve;\n promise.reject = reject;\n return promise;\n}","export function getUnprocessedRange(testRange, processedRange) {\n if (testRange.firstRowIndex >= processedRange.firstRowIndex && testRange.lastRowIndex <= processedRange.lastRowIndex) {\n return null;\n }\n // Overflowing at the end\n // Example: testRange={ firstRowIndex: 10, lastRowIndex: 20 }, processedRange={ firstRowIndex: 0, lastRowIndex: 15 }\n // Unprocessed Range={ firstRowIndex: 16, lastRowIndex: 20 }\n if (testRange.firstRowIndex >= processedRange.firstRowIndex && testRange.lastRowIndex > processedRange.lastRowIndex) {\n return {\n firstRowIndex: processedRange.lastRowIndex,\n lastRowIndex: testRange.lastRowIndex\n };\n }\n // Overflowing at the beginning\n // Example: testRange={ firstRowIndex: 0, lastRowIndex: 20 }, processedRange={ firstRowIndex: 16, lastRowIndex: 30 }\n // Unprocessed Range={ firstRowIndex: 0, lastRowIndex: 15 }\n if (testRange.firstRowIndex < processedRange.firstRowIndex && testRange.lastRowIndex <= processedRange.lastRowIndex) {\n return {\n firstRowIndex: testRange.firstRowIndex,\n lastRowIndex: processedRange.firstRowIndex - 1\n };\n }\n // TODO: Should return two ranges handle overflowing at both ends ?\n return testRange;\n}\nexport function isRowContextInitialized(renderContext) {\n return renderContext.firstRowIndex !== 0 || renderContext.lastRowIndex !== 0;\n}\nexport function isRowRangeUpdated(range1, range2) {\n return range1.firstRowIndex !== range2.firstRowIndex || range1.lastRowIndex !== range2.lastRowIndex;\n}\nexport const getCellValue = (row, colDef, apiRef) => {\n if (!row) {\n return null;\n }\n let cellValue = row[colDef.field];\n const valueGetter = colDef.rowSpanValueGetter ?? colDef.valueGetter;\n if (valueGetter) {\n cellValue = valueGetter(cellValue, row, colDef, apiRef);\n }\n return cellValue;\n};","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport useLazyRef from '@mui/utils/useLazyRef';\nimport { gridVisibleColumnDefinitionsSelector } from \"../columns/gridColumnsSelector.js\";\nimport { useGridVisibleRows } from \"../../utils/useGridVisibleRows.js\";\nimport { gridRenderContextSelector } from \"../virtualization/gridVirtualizationSelectors.js\";\nimport { useGridSelector } from \"../../utils/useGridSelector.js\";\nimport { getUnprocessedRange, isRowRangeUpdated, isRowContextInitialized, getCellValue } from \"./gridRowSpanningUtils.js\";\nconst EMPTY_STATE = {\n spannedCells: {},\n hiddenCells: {},\n hiddenCellOriginMap: {}\n};\nconst EMPTY_RANGE = {\n firstRowIndex: 0,\n lastRowIndex: 0\n};\nconst skippedFields = new Set(['__check__', '__reorder__', '__detail_panel_toggle__']);\n/**\n * Default number of rows to process during state initialization to avoid flickering.\n * Number `20` is arbitrarily chosen to be large enough to cover most of the cases without\n * compromising performance.\n */\nconst DEFAULT_ROWS_TO_PROCESS = 20;\nconst computeRowSpanningState = (apiRef, colDefs, visibleRows, range, rangeToProcess, resetState, processedRange) => {\n const spannedCells = resetState ? {} : _extends({}, apiRef.current.state.rowSpanning.spannedCells);\n const hiddenCells = resetState ? {} : _extends({}, apiRef.current.state.rowSpanning.hiddenCells);\n const hiddenCellOriginMap = resetState ? {} : _extends({}, apiRef.current.state.rowSpanning.hiddenCellOriginMap);\n if (resetState) {\n processedRange = EMPTY_RANGE;\n }\n colDefs.forEach(colDef => {\n if (skippedFields.has(colDef.field)) {\n return;\n }\n for (let index = rangeToProcess.firstRowIndex; index <= rangeToProcess.lastRowIndex; index += 1) {\n const row = visibleRows[index];\n if (hiddenCells[row.id]?.[colDef.field]) {\n continue;\n }\n const cellValue = getCellValue(row.model, colDef, apiRef);\n if (cellValue == null) {\n continue;\n }\n let spannedRowId = row.id;\n let spannedRowIndex = index;\n let rowSpan = 0;\n\n // For first index, also scan in the previous rows to handle the reset state case e.g by sorting\n const backwardsHiddenCells = [];\n if (index === rangeToProcess.firstRowIndex) {\n let prevIndex = index - 1;\n const prevRowEntry = visibleRows[prevIndex];\n while (prevIndex >= range.firstRowIndex && getCellValue(prevRowEntry.model, colDef, apiRef) === cellValue) {\n const currentRow = visibleRows[prevIndex + 1];\n if (hiddenCells[currentRow.id]) {\n hiddenCells[currentRow.id][colDef.field] = true;\n } else {\n hiddenCells[currentRow.id] = {\n [colDef.field]: true\n };\n }\n backwardsHiddenCells.push(index);\n rowSpan += 1;\n spannedRowId = prevRowEntry.id;\n spannedRowIndex = prevIndex;\n prevIndex -= 1;\n }\n }\n backwardsHiddenCells.forEach(hiddenCellIndex => {\n if (hiddenCellOriginMap[hiddenCellIndex]) {\n hiddenCellOriginMap[hiddenCellIndex][colDef.field] = spannedRowIndex;\n } else {\n hiddenCellOriginMap[hiddenCellIndex] = {\n [colDef.field]: spannedRowIndex\n };\n }\n });\n\n // Scan the next rows\n let relativeIndex = index + 1;\n while (relativeIndex <= range.lastRowIndex && visibleRows[relativeIndex] && getCellValue(visibleRows[relativeIndex].model, colDef, apiRef) === cellValue) {\n const currentRow = visibleRows[relativeIndex];\n if (hiddenCells[currentRow.id]) {\n hiddenCells[currentRow.id][colDef.field] = true;\n } else {\n hiddenCells[currentRow.id] = {\n [colDef.field]: true\n };\n }\n if (hiddenCellOriginMap[relativeIndex]) {\n hiddenCellOriginMap[relativeIndex][colDef.field] = spannedRowIndex;\n } else {\n hiddenCellOriginMap[relativeIndex] = {\n [colDef.field]: spannedRowIndex\n };\n }\n relativeIndex += 1;\n rowSpan += 1;\n }\n if (rowSpan > 0) {\n if (spannedCells[spannedRowId]) {\n spannedCells[spannedRowId][colDef.field] = rowSpan + 1;\n } else {\n spannedCells[spannedRowId] = {\n [colDef.field]: rowSpan + 1\n };\n }\n }\n }\n processedRange = {\n firstRowIndex: Math.min(processedRange.firstRowIndex, rangeToProcess.firstRowIndex),\n lastRowIndex: Math.max(processedRange.lastRowIndex, rangeToProcess.lastRowIndex)\n };\n });\n return {\n spannedCells,\n hiddenCells,\n hiddenCellOriginMap,\n processedRange\n };\n};\n\n/**\n * @requires columnsStateInitializer (method) - should be initialized before\n * @requires rowsStateInitializer (method) - should be initialized before\n * @requires filterStateInitializer (method) - should be initialized before\n */\nexport const rowSpanningStateInitializer = (state, props, apiRef) => {\n if (props.unstable_rowSpanning) {\n const rowIds = state.rows.dataRowIds || [];\n const orderedFields = state.columns.orderedFields || [];\n const dataRowIdToModelLookup = state.rows.dataRowIdToModelLookup;\n const columnsLookup = state.columns.lookup;\n const isFilteringPending = Boolean(state.filter.filterModel.items.length) || Boolean(state.filter.filterModel.quickFilterValues?.length);\n if (!rowIds.length || !orderedFields.length || !dataRowIdToModelLookup || !columnsLookup || isFilteringPending) {\n return _extends({}, state, {\n rowSpanning: EMPTY_STATE\n });\n }\n const rangeToProcess = {\n firstRowIndex: 0,\n lastRowIndex: Math.min(DEFAULT_ROWS_TO_PROCESS - 1, Math.max(rowIds.length - 1, 0))\n };\n const rows = rowIds.map(id => ({\n id,\n model: dataRowIdToModelLookup[id]\n }));\n const colDefs = orderedFields.map(field => columnsLookup[field]);\n const {\n spannedCells,\n hiddenCells,\n hiddenCellOriginMap\n } = computeRowSpanningState(apiRef, colDefs, rows, rangeToProcess, rangeToProcess, true, EMPTY_RANGE);\n return _extends({}, state, {\n rowSpanning: {\n spannedCells,\n hiddenCells,\n hiddenCellOriginMap\n }\n });\n }\n return _extends({}, state, {\n rowSpanning: EMPTY_STATE\n });\n};\nexport const useGridRowSpanning = (apiRef, props) => {\n const {\n range,\n rows: visibleRows\n } = useGridVisibleRows(apiRef, props);\n const renderContext = useGridSelector(apiRef, gridRenderContextSelector);\n const colDefs = useGridSelector(apiRef, gridVisibleColumnDefinitionsSelector);\n const processedRange = useLazyRef(() => {\n return Object.keys(apiRef.current.state.rowSpanning.spannedCells).length > 0 ? {\n firstRowIndex: 0,\n lastRowIndex: Math.min(DEFAULT_ROWS_TO_PROCESS - 1, Math.max(apiRef.current.state.rows.dataRowIds.length - 1, 0))\n } : EMPTY_RANGE;\n });\n const lastRange = React.useRef(EMPTY_RANGE);\n const updateRowSpanningState = React.useCallback(\n // A reset needs to occur when:\n // - The `unstable_rowSpanning` prop is updated (feature flag)\n // - The filtering is applied\n // - The sorting is applied\n // - The `paginationModel` is updated\n // - The rows are updated\n (resetState = true) => {\n if (!props.unstable_rowSpanning) {\n if (apiRef.current.state.rowSpanning !== EMPTY_STATE) {\n apiRef.current.setState(state => _extends({}, state, {\n rowSpanning: EMPTY_STATE\n }));\n }\n return;\n }\n if (range === null || !isRowContextInitialized(renderContext)) {\n return;\n }\n if (resetState) {\n processedRange.current = EMPTY_RANGE;\n }\n const rangeToProcess = getUnprocessedRange({\n firstRowIndex: renderContext.firstRowIndex,\n lastRowIndex: renderContext.lastRowIndex - 1\n }, processedRange.current);\n if (rangeToProcess === null) {\n return;\n }\n const {\n spannedCells,\n hiddenCells,\n hiddenCellOriginMap,\n processedRange: newProcessedRange\n } = computeRowSpanningState(apiRef, colDefs, visibleRows, range, rangeToProcess, resetState, processedRange.current);\n processedRange.current = newProcessedRange;\n const newSpannedCellsCount = Object.keys(spannedCells).length;\n const newHiddenCellsCount = Object.keys(hiddenCells).length;\n const currentSpannedCellsCount = Object.keys(apiRef.current.state.rowSpanning.spannedCells).length;\n const currentHiddenCellsCount = Object.keys(apiRef.current.state.rowSpanning.hiddenCells).length;\n const shouldUpdateState = resetState || newSpannedCellsCount !== currentSpannedCellsCount || newHiddenCellsCount !== currentHiddenCellsCount;\n if (!shouldUpdateState) {\n return;\n }\n apiRef.current.setState(state => {\n return _extends({}, state, {\n rowSpanning: {\n spannedCells,\n hiddenCells,\n hiddenCellOriginMap\n }\n });\n });\n }, [apiRef, props.unstable_rowSpanning, range, renderContext, visibleRows, colDefs, processedRange]);\n const prevRenderContext = React.useRef(renderContext);\n const isFirstRender = React.useRef(true);\n const shouldResetState = React.useRef(false);\n React.useEffect(() => {\n const firstRender = isFirstRender.current;\n if (isFirstRender.current) {\n isFirstRender.current = false;\n }\n if (range && lastRange.current && isRowRangeUpdated(range, lastRange.current)) {\n lastRange.current = range;\n shouldResetState.current = true;\n }\n if (!firstRender && prevRenderContext.current !== renderContext) {\n if (isRowRangeUpdated(prevRenderContext.current, renderContext)) {\n updateRowSpanningState(shouldResetState.current);\n shouldResetState.current = false;\n }\n prevRenderContext.current = renderContext;\n return;\n }\n updateRowSpanningState();\n }, [updateRowSpanningState, renderContext, range, lastRange]);\n};","import { useGridInitialization } from \"../hooks/core/useGridInitialization.js\";\nimport { useGridInitializeState } from \"../hooks/utils/useGridInitializeState.js\";\nimport { useGridClipboard } from \"../hooks/features/clipboard/useGridClipboard.js\";\nimport { columnMenuStateInitializer, useGridColumnMenu } from \"../hooks/features/columnMenu/useGridColumnMenu.js\";\nimport { useGridColumns, columnsStateInitializer } from \"../hooks/features/columns/useGridColumns.js\";\nimport { densityStateInitializer, useGridDensity } from \"../hooks/features/density/useGridDensity.js\";\nimport { useGridCsvExport } from \"../hooks/features/export/useGridCsvExport.js\";\nimport { useGridPrintExport } from \"../hooks/features/export/useGridPrintExport.js\";\nimport { useGridFilter, filterStateInitializer } from \"../hooks/features/filter/useGridFilter.js\";\nimport { focusStateInitializer, useGridFocus } from \"../hooks/features/focus/useGridFocus.js\";\nimport { useGridKeyboardNavigation } from \"../hooks/features/keyboardNavigation/useGridKeyboardNavigation.js\";\nimport { useGridPagination, paginationStateInitializer } from \"../hooks/features/pagination/useGridPagination.js\";\nimport { useGridPreferencesPanel, preferencePanelStateInitializer } from \"../hooks/features/preferencesPanel/useGridPreferencesPanel.js\";\nimport { useGridEditing, editingStateInitializer } from \"../hooks/features/editing/useGridEditing.js\";\nimport { useGridRows, rowsStateInitializer } from \"../hooks/features/rows/useGridRows.js\";\nimport { useGridRowsPreProcessors } from \"../hooks/features/rows/useGridRowsPreProcessors.js\";\nimport { useGridParamsApi } from \"../hooks/features/rows/useGridParamsApi.js\";\nimport { rowSelectionStateInitializer, useGridRowSelection } from \"../hooks/features/rowSelection/useGridRowSelection.js\";\nimport { useGridRowSelectionPreProcessors } from \"../hooks/features/rowSelection/useGridRowSelectionPreProcessors.js\";\nimport { useGridSorting, sortingStateInitializer } from \"../hooks/features/sorting/useGridSorting.js\";\nimport { useGridScroll } from \"../hooks/features/scroll/useGridScroll.js\";\nimport { useGridEvents } from \"../hooks/features/events/useGridEvents.js\";\nimport { dimensionsStateInitializer, useGridDimensions } from \"../hooks/features/dimensions/useGridDimensions.js\";\nimport { rowsMetaStateInitializer, useGridRowsMeta } from \"../hooks/features/rows/useGridRowsMeta.js\";\nimport { useGridStatePersistence } from \"../hooks/features/statePersistence/useGridStatePersistence.js\";\nimport { useGridColumnSpanning } from \"../hooks/features/columns/useGridColumnSpanning.js\";\nimport { useGridColumnGrouping, columnGroupsStateInitializer } from \"../hooks/features/columnGrouping/useGridColumnGrouping.js\";\nimport { useGridVirtualization, virtualizationStateInitializer } from \"../hooks/features/virtualization/index.js\";\nimport { columnResizeStateInitializer, useGridColumnResize } from \"../hooks/features/columnResize/useGridColumnResize.js\";\nimport { rowSpanningStateInitializer, useGridRowSpanning } from \"../hooks/features/rows/useGridRowSpanning.js\";\nexport const useDataGridComponent = (inputApiRef, props) => {\n const apiRef = useGridInitialization(inputApiRef, props);\n\n /**\n * Register all pre-processors called during state initialization here.\n */\n useGridRowSelectionPreProcessors(apiRef, props);\n useGridRowsPreProcessors(apiRef);\n\n /**\n * Register all state initializers here.\n */\n useGridInitializeState(dimensionsStateInitializer, apiRef, props);\n useGridInitializeState(rowSelectionStateInitializer, apiRef, props);\n useGridInitializeState(columnsStateInitializer, apiRef, props);\n useGridInitializeState(rowsStateInitializer, apiRef, props);\n useGridInitializeState(editingStateInitializer, apiRef, props);\n useGridInitializeState(focusStateInitializer, apiRef, props);\n useGridInitializeState(sortingStateInitializer, apiRef, props);\n useGridInitializeState(preferencePanelStateInitializer, apiRef, props);\n useGridInitializeState(filterStateInitializer, apiRef, props);\n useGridInitializeState(rowSpanningStateInitializer, apiRef, props);\n useGridInitializeState(densityStateInitializer, apiRef, props);\n useGridInitializeState(columnResizeStateInitializer, apiRef, props);\n useGridInitializeState(paginationStateInitializer, apiRef, props);\n useGridInitializeState(rowsMetaStateInitializer, apiRef, props);\n useGridInitializeState(columnMenuStateInitializer, apiRef, props);\n useGridInitializeState(columnGroupsStateInitializer, apiRef, props);\n useGridInitializeState(virtualizationStateInitializer, apiRef, props);\n useGridKeyboardNavigation(apiRef, props);\n useGridRowSelection(apiRef, props);\n useGridColumns(apiRef, props);\n useGridRows(apiRef, props);\n useGridRowSpanning(apiRef, props);\n useGridParamsApi(apiRef);\n useGridColumnSpanning(apiRef);\n useGridColumnGrouping(apiRef, props);\n useGridEditing(apiRef, props);\n useGridFocus(apiRef, props);\n useGridPreferencesPanel(apiRef, props);\n useGridFilter(apiRef, props);\n useGridSorting(apiRef, props);\n useGridDensity(apiRef, props);\n useGridColumnResize(apiRef, props);\n useGridPagination(apiRef, props);\n useGridRowsMeta(apiRef, props);\n useGridScroll(apiRef, props);\n useGridColumnMenu(apiRef);\n useGridCsvExport(apiRef, props);\n useGridPrintExport(apiRef, props);\n useGridClipboard(apiRef, props);\n useGridDimensions(apiRef, props);\n useGridEvents(apiRef, props);\n useGridStatePersistence(apiRef);\n useGridVirtualization(apiRef, props);\n return apiRef;\n};","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport composeClasses from '@mui/utils/composeClasses';\nimport { useGridRegisterPipeProcessor } from \"../../core/pipeProcessing/index.js\";\nimport { getDataGridUtilityClass } from \"../../../constants/index.js\";\nimport { GRID_CHECKBOX_SELECTION_COL_DEF, GRID_CHECKBOX_SELECTION_FIELD } from \"../../../colDef/index.js\";\nconst useUtilityClasses = ownerState => {\n const {\n classes\n } = ownerState;\n return React.useMemo(() => {\n const slots = {\n cellCheckbox: ['cellCheckbox'],\n columnHeaderCheckbox: ['columnHeaderCheckbox']\n };\n return composeClasses(slots, getDataGridUtilityClass, classes);\n }, [classes]);\n};\nexport const useGridRowSelectionPreProcessors = (apiRef, props) => {\n const ownerState = {\n classes: props.classes\n };\n const classes = useUtilityClasses(ownerState);\n const updateSelectionColumn = React.useCallback(columnsState => {\n const selectionColumn = _extends({}, GRID_CHECKBOX_SELECTION_COL_DEF, {\n cellClassName: classes.cellCheckbox,\n headerClassName: classes.columnHeaderCheckbox,\n headerName: apiRef.current.getLocaleText('checkboxSelectionHeaderName')\n });\n const shouldHaveSelectionColumn = props.checkboxSelection;\n const haveSelectionColumn = columnsState.lookup[GRID_CHECKBOX_SELECTION_FIELD] != null;\n if (shouldHaveSelectionColumn && !haveSelectionColumn) {\n columnsState.lookup[GRID_CHECKBOX_SELECTION_FIELD] = selectionColumn;\n columnsState.orderedFields = [GRID_CHECKBOX_SELECTION_FIELD, ...columnsState.orderedFields];\n } else if (!shouldHaveSelectionColumn && haveSelectionColumn) {\n delete columnsState.lookup[GRID_CHECKBOX_SELECTION_FIELD];\n columnsState.orderedFields = columnsState.orderedFields.filter(field => field !== GRID_CHECKBOX_SELECTION_FIELD);\n } else if (shouldHaveSelectionColumn && haveSelectionColumn) {\n columnsState.lookup[GRID_CHECKBOX_SELECTION_FIELD] = _extends({}, selectionColumn, columnsState.lookup[GRID_CHECKBOX_SELECTION_FIELD]);\n }\n return columnsState;\n }, [apiRef, classes, props.checkboxSelection]);\n useGridRegisterPipeProcessor(apiRef, 'hydrateColumns', updateSelectionColumn);\n};","import * as React from 'react';\nimport { useRtl } from '@mui/system/RtlProvider';\nimport { gridVisibleColumnDefinitionsSelector, gridVisibleColumnFieldsSelector } from \"../columns/gridColumnsSelector.js\";\nimport { useGridLogger } from \"../../utils/useGridLogger.js\";\nimport { useGridApiEventHandler } from \"../../utils/useGridApiEventHandler.js\";\nimport { gridExpandedSortedRowEntriesSelector } from \"../filter/gridFilterSelector.js\";\nimport { useGridVisibleRows } from \"../../utils/useGridVisibleRows.js\";\nimport { GRID_CHECKBOX_SELECTION_COL_DEF } from \"../../../colDef/gridCheckboxSelectionColDef.js\";\nimport { gridClasses } from \"../../../constants/gridClasses.js\";\nimport { GridCellModes } from \"../../../models/gridEditRowModel.js\";\nimport { isNavigationKey } from \"../../../utils/keyboardUtils.js\";\nimport { GRID_DETAIL_PANEL_TOGGLE_FIELD } from \"../../../constants/gridDetailPanelToggleField.js\";\nimport { gridFocusColumnGroupHeaderSelector } from \"../focus/index.js\";\nimport { gridColumnGroupsHeaderMaxDepthSelector } from \"../columnGrouping/gridColumnGroupsSelector.js\";\nimport { gridHeaderFilteringEditFieldSelector, gridHeaderFilteringMenuSelector } from \"../headerFiltering/gridHeaderFilteringSelectors.js\";\nimport { useGridRegisterPipeProcessor } from \"../../core/pipeProcessing/index.js\";\nimport { isEventTargetInPortal } from \"../../../utils/domUtils.js\";\nimport { enrichPageRowsWithPinnedRows, getLeftColumnIndex, getRightColumnIndex, findNonRowSpannedCell } from \"./utils.js\";\n\n/**\n * @requires useGridSorting (method) - can be after\n * @requires useGridFilter (state) - can be after\n * @requires useGridColumns (state, method) - can be after\n * @requires useGridDimensions (method) - can be after\n * @requires useGridFocus (method) - can be after\n * @requires useGridScroll (method) - can be after\n * @requires useGridColumnSpanning (method) - can be after\n */\nexport const useGridKeyboardNavigation = (apiRef, props) => {\n const logger = useGridLogger(apiRef, 'useGridKeyboardNavigation');\n const initialCurrentPageRows = useGridVisibleRows(apiRef, props).rows;\n const isRtl = useRtl();\n const currentPageRows = React.useMemo(() => enrichPageRowsWithPinnedRows(apiRef, initialCurrentPageRows), [apiRef, initialCurrentPageRows]);\n const headerFilteringEnabled = props.signature !== 'DataGrid' && props.headerFilters;\n\n /**\n * @param {number} colIndex Index of the column to focus\n * @param {GridRowId} rowId index of the row to focus\n * @param {string} closestColumnToUse Which closest column cell to use when the cell is spanned by `colSpan`.\n * @param {string} rowSpanScanDirection Which direction to search to find the next cell not hidden by `rowSpan`.\n * TODO replace with apiRef.current.moveFocusToRelativeCell()\n */\n const goToCell = React.useCallback((colIndex, rowId, closestColumnToUse = 'left', rowSpanScanDirection = 'up') => {\n const visibleSortedRows = gridExpandedSortedRowEntriesSelector(apiRef);\n const nextCellColSpanInfo = apiRef.current.unstable_getCellColSpanInfo(rowId, colIndex);\n if (nextCellColSpanInfo && nextCellColSpanInfo.spannedByColSpan) {\n if (closestColumnToUse === 'left') {\n colIndex = nextCellColSpanInfo.leftVisibleCellIndex;\n } else if (closestColumnToUse === 'right') {\n colIndex = nextCellColSpanInfo.rightVisibleCellIndex;\n }\n }\n const field = gridVisibleColumnFieldsSelector(apiRef)[colIndex];\n const nonRowSpannedRowId = findNonRowSpannedCell(apiRef, rowId, field, rowSpanScanDirection);\n // `scrollToIndexes` requires a rowIndex relative to all visible rows.\n // Those rows do not include pinned rows, but pinned rows do not need scroll anyway.\n const rowIndexRelativeToAllRows = visibleSortedRows.findIndex(row => row.id === nonRowSpannedRowId);\n logger.debug(`Navigating to cell row ${rowIndexRelativeToAllRows}, col ${colIndex}`);\n apiRef.current.scrollToIndexes({\n colIndex,\n rowIndex: rowIndexRelativeToAllRows\n });\n apiRef.current.setCellFocus(nonRowSpannedRowId, field);\n }, [apiRef, logger]);\n const goToHeader = React.useCallback((colIndex, event) => {\n logger.debug(`Navigating to header col ${colIndex}`);\n apiRef.current.scrollToIndexes({\n colIndex\n });\n const field = apiRef.current.getVisibleColumns()[colIndex].field;\n apiRef.current.setColumnHeaderFocus(field, event);\n }, [apiRef, logger]);\n const goToHeaderFilter = React.useCallback((colIndex, event) => {\n logger.debug(`Navigating to header filter col ${colIndex}`);\n apiRef.current.scrollToIndexes({\n colIndex\n });\n const field = apiRef.current.getVisibleColumns()[colIndex].field;\n apiRef.current.setColumnHeaderFilterFocus(field, event);\n }, [apiRef, logger]);\n const goToGroupHeader = React.useCallback((colIndex, depth, event) => {\n logger.debug(`Navigating to header col ${colIndex}`);\n apiRef.current.scrollToIndexes({\n colIndex\n });\n const {\n field\n } = apiRef.current.getVisibleColumns()[colIndex];\n apiRef.current.setColumnGroupHeaderFocus(field, depth, event);\n }, [apiRef, logger]);\n const getRowIdFromIndex = React.useCallback(rowIndex => {\n return currentPageRows[rowIndex]?.id;\n }, [currentPageRows]);\n const handleColumnHeaderKeyDown = React.useCallback((params, event) => {\n const headerTitleNode = event.currentTarget.querySelector(`.${gridClasses.columnHeaderTitleContainerContent}`);\n const isFromInsideContent = !!headerTitleNode && headerTitleNode.contains(event.target);\n if (isFromInsideContent && params.field !== GRID_CHECKBOX_SELECTION_COL_DEF.field) {\n // When focus is on a nested input, keyboard events have no effect to avoid conflicts with native events.\n // There is one exception for the checkBoxHeader\n return;\n }\n const viewportPageSize = apiRef.current.getViewportPageSize();\n const colIndexBefore = params.field ? apiRef.current.getColumnIndex(params.field) : 0;\n const firstRowIndexInPage = currentPageRows.length > 0 ? 0 : null;\n const lastRowIndexInPage = currentPageRows.length - 1;\n const firstColIndex = 0;\n const lastColIndex = gridVisibleColumnDefinitionsSelector(apiRef).length - 1;\n const columnGroupMaxDepth = gridColumnGroupsHeaderMaxDepthSelector(apiRef);\n let shouldPreventDefault = true;\n switch (event.key) {\n case 'ArrowDown':\n {\n if (firstRowIndexInPage !== null) {\n if (headerFilteringEnabled) {\n goToHeaderFilter(colIndexBefore, event);\n } else {\n goToCell(colIndexBefore, getRowIdFromIndex(firstRowIndexInPage));\n }\n }\n break;\n }\n case 'ArrowRight':\n {\n const rightColIndex = getRightColumnIndex({\n currentColIndex: colIndexBefore,\n firstColIndex,\n lastColIndex,\n isRtl\n });\n if (rightColIndex !== null) {\n goToHeader(rightColIndex, event);\n }\n break;\n }\n case 'ArrowLeft':\n {\n const leftColIndex = getLeftColumnIndex({\n currentColIndex: colIndexBefore,\n firstColIndex,\n lastColIndex,\n isRtl\n });\n if (leftColIndex !== null) {\n goToHeader(leftColIndex, event);\n }\n break;\n }\n case 'ArrowUp':\n {\n if (columnGroupMaxDepth > 0) {\n goToGroupHeader(colIndexBefore, columnGroupMaxDepth - 1, event);\n }\n break;\n }\n case 'PageDown':\n {\n if (firstRowIndexInPage !== null && lastRowIndexInPage !== null) {\n goToCell(colIndexBefore, getRowIdFromIndex(Math.min(firstRowIndexInPage + viewportPageSize, lastRowIndexInPage)));\n }\n break;\n }\n case 'Home':\n {\n goToHeader(firstColIndex, event);\n break;\n }\n case 'End':\n {\n goToHeader(lastColIndex, event);\n break;\n }\n case 'Enter':\n {\n if (event.ctrlKey || event.metaKey) {\n apiRef.current.toggleColumnMenu(params.field);\n }\n break;\n }\n case ' ':\n {\n // prevent Space event from scrolling\n break;\n }\n default:\n {\n shouldPreventDefault = false;\n }\n }\n if (shouldPreventDefault) {\n event.preventDefault();\n }\n }, [apiRef, currentPageRows.length, headerFilteringEnabled, goToHeaderFilter, goToCell, getRowIdFromIndex, isRtl, goToHeader, goToGroupHeader]);\n const handleHeaderFilterKeyDown = React.useCallback((params, event) => {\n const isEditing = gridHeaderFilteringEditFieldSelector(apiRef) === params.field;\n const isHeaderMenuOpen = gridHeaderFilteringMenuSelector(apiRef) === params.field;\n if (isEditing || isHeaderMenuOpen || !isNavigationKey(event.key)) {\n return;\n }\n const viewportPageSize = apiRef.current.getViewportPageSize();\n const colIndexBefore = params.field ? apiRef.current.getColumnIndex(params.field) : 0;\n const firstRowIndexInPage = 0;\n const lastRowIndexInPage = currentPageRows.length - 1;\n const firstColIndex = 0;\n const lastColIndex = gridVisibleColumnDefinitionsSelector(apiRef).length - 1;\n let shouldPreventDefault = true;\n switch (event.key) {\n case 'ArrowDown':\n {\n const rowId = getRowIdFromIndex(firstRowIndexInPage);\n if (firstRowIndexInPage !== null && rowId != null) {\n goToCell(colIndexBefore, rowId);\n }\n break;\n }\n case 'ArrowRight':\n {\n const rightColIndex = getRightColumnIndex({\n currentColIndex: colIndexBefore,\n firstColIndex,\n lastColIndex,\n isRtl\n });\n if (rightColIndex !== null) {\n goToHeaderFilter(rightColIndex, event);\n }\n break;\n }\n case 'ArrowLeft':\n {\n const leftColIndex = getLeftColumnIndex({\n currentColIndex: colIndexBefore,\n firstColIndex,\n lastColIndex,\n isRtl\n });\n if (leftColIndex !== null) {\n goToHeaderFilter(leftColIndex, event);\n } else {\n apiRef.current.setColumnHeaderFilterFocus(params.field, event);\n }\n break;\n }\n case 'ArrowUp':\n {\n goToHeader(colIndexBefore, event);\n break;\n }\n case 'PageDown':\n {\n if (firstRowIndexInPage !== null && lastRowIndexInPage !== null) {\n goToCell(colIndexBefore, getRowIdFromIndex(Math.min(firstRowIndexInPage + viewportPageSize, lastRowIndexInPage)));\n }\n break;\n }\n case 'Home':\n {\n goToHeaderFilter(firstColIndex, event);\n break;\n }\n case 'End':\n {\n goToHeaderFilter(lastColIndex, event);\n break;\n }\n case ' ':\n {\n // prevent Space event from scrolling\n break;\n }\n default:\n {\n shouldPreventDefault = false;\n }\n }\n if (shouldPreventDefault) {\n event.preventDefault();\n }\n }, [apiRef, currentPageRows.length, goToHeaderFilter, isRtl, goToHeader, goToCell, getRowIdFromIndex]);\n const handleColumnGroupHeaderKeyDown = React.useCallback((params, event) => {\n const focusedColumnGroup = gridFocusColumnGroupHeaderSelector(apiRef);\n if (focusedColumnGroup === null) {\n return;\n }\n const {\n field: currentField,\n depth: currentDepth\n } = focusedColumnGroup;\n const {\n fields,\n depth,\n maxDepth\n } = params;\n const viewportPageSize = apiRef.current.getViewportPageSize();\n const currentColIndex = apiRef.current.getColumnIndex(currentField);\n const colIndexBefore = currentField ? apiRef.current.getColumnIndex(currentField) : 0;\n const firstRowIndexInPage = 0;\n const lastRowIndexInPage = currentPageRows.length - 1;\n const firstColIndex = 0;\n const lastColIndex = gridVisibleColumnDefinitionsSelector(apiRef).length - 1;\n let shouldPreventDefault = true;\n switch (event.key) {\n case 'ArrowDown':\n {\n if (depth === maxDepth - 1) {\n goToHeader(currentColIndex, event);\n } else {\n goToGroupHeader(currentColIndex, currentDepth + 1, event);\n }\n break;\n }\n case 'ArrowUp':\n {\n if (depth > 0) {\n goToGroupHeader(currentColIndex, currentDepth - 1, event);\n }\n break;\n }\n case 'ArrowRight':\n {\n const remainingRightColumns = fields.length - fields.indexOf(currentField) - 1;\n if (currentColIndex + remainingRightColumns + 1 <= lastColIndex) {\n goToGroupHeader(currentColIndex + remainingRightColumns + 1, currentDepth, event);\n }\n break;\n }\n case 'ArrowLeft':\n {\n const remainingLeftColumns = fields.indexOf(currentField);\n if (currentColIndex - remainingLeftColumns - 1 >= firstColIndex) {\n goToGroupHeader(currentColIndex - remainingLeftColumns - 1, currentDepth, event);\n }\n break;\n }\n case 'PageDown':\n {\n if (firstRowIndexInPage !== null && lastRowIndexInPage !== null) {\n goToCell(colIndexBefore, getRowIdFromIndex(Math.min(firstRowIndexInPage + viewportPageSize, lastRowIndexInPage)));\n }\n break;\n }\n case 'Home':\n {\n goToGroupHeader(firstColIndex, currentDepth, event);\n break;\n }\n case 'End':\n {\n goToGroupHeader(lastColIndex, currentDepth, event);\n break;\n }\n case ' ':\n {\n // prevent Space event from scrolling\n break;\n }\n default:\n {\n shouldPreventDefault = false;\n }\n }\n if (shouldPreventDefault) {\n event.preventDefault();\n }\n }, [apiRef, currentPageRows.length, goToHeader, goToGroupHeader, goToCell, getRowIdFromIndex]);\n const handleCellKeyDown = React.useCallback((params, event) => {\n // Ignore portal\n if (isEventTargetInPortal(event)) {\n return;\n }\n\n // Get the most recent params because the cell mode may have changed by another listener\n const cellParams = apiRef.current.getCellParams(params.id, params.field);\n if (cellParams.cellMode === GridCellModes.Edit || !isNavigationKey(event.key)) {\n return;\n }\n const canUpdateFocus = apiRef.current.unstable_applyPipeProcessors('canUpdateFocus', true, {\n event,\n cell: cellParams\n });\n if (!canUpdateFocus) {\n return;\n }\n if (currentPageRows.length === 0) {\n return;\n }\n const viewportPageSize = apiRef.current.getViewportPageSize();\n const colIndexBefore = params.field ? apiRef.current.getColumnIndex(params.field) : 0;\n const rowIndexBefore = currentPageRows.findIndex(row => row.id === params.id);\n const firstRowIndexInPage = 0;\n const lastRowIndexInPage = currentPageRows.length - 1;\n const firstColIndex = 0;\n const lastColIndex = gridVisibleColumnDefinitionsSelector(apiRef).length - 1;\n let shouldPreventDefault = true;\n switch (event.key) {\n case 'ArrowDown':\n {\n // \"Enter\" is only triggered by the row / cell editing feature\n if (rowIndexBefore < lastRowIndexInPage) {\n goToCell(colIndexBefore, getRowIdFromIndex(rowIndexBefore + 1), isRtl ? 'right' : 'left', 'down');\n }\n break;\n }\n case 'ArrowUp':\n {\n if (rowIndexBefore > firstRowIndexInPage) {\n goToCell(colIndexBefore, getRowIdFromIndex(rowIndexBefore - 1));\n } else if (headerFilteringEnabled) {\n goToHeaderFilter(colIndexBefore, event);\n } else {\n goToHeader(colIndexBefore, event);\n }\n break;\n }\n case 'ArrowRight':\n {\n const rightColIndex = getRightColumnIndex({\n currentColIndex: colIndexBefore,\n firstColIndex,\n lastColIndex,\n isRtl\n });\n if (rightColIndex !== null) {\n goToCell(rightColIndex, getRowIdFromIndex(rowIndexBefore), isRtl ? 'left' : 'right');\n }\n break;\n }\n case 'ArrowLeft':\n {\n const leftColIndex = getLeftColumnIndex({\n currentColIndex: colIndexBefore,\n firstColIndex,\n lastColIndex,\n isRtl\n });\n if (leftColIndex !== null) {\n goToCell(leftColIndex, getRowIdFromIndex(rowIndexBefore), isRtl ? 'right' : 'left');\n }\n break;\n }\n case 'Tab':\n {\n // \"Tab\" is only triggered by the row / cell editing feature\n if (event.shiftKey && colIndexBefore > firstColIndex) {\n goToCell(colIndexBefore - 1, getRowIdFromIndex(rowIndexBefore), 'left');\n } else if (!event.shiftKey && colIndexBefore < lastColIndex) {\n goToCell(colIndexBefore + 1, getRowIdFromIndex(rowIndexBefore), 'right');\n }\n break;\n }\n case ' ':\n {\n const field = params.field;\n if (field === GRID_DETAIL_PANEL_TOGGLE_FIELD) {\n break;\n }\n const colDef = params.colDef;\n if (colDef &&\n // `GRID_TREE_DATA_GROUPING_FIELD` from the Pro package\n colDef.field === '__tree_data_group__') {\n break;\n }\n if (!event.shiftKey && rowIndexBefore < lastRowIndexInPage) {\n goToCell(colIndexBefore, getRowIdFromIndex(Math.min(rowIndexBefore + viewportPageSize, lastRowIndexInPage)));\n }\n break;\n }\n case 'PageDown':\n {\n if (rowIndexBefore < lastRowIndexInPage) {\n goToCell(colIndexBefore, getRowIdFromIndex(Math.min(rowIndexBefore + viewportPageSize, lastRowIndexInPage)));\n }\n break;\n }\n case 'PageUp':\n {\n // Go to the first row before going to header\n const nextRowIndex = Math.max(rowIndexBefore - viewportPageSize, firstRowIndexInPage);\n if (nextRowIndex !== rowIndexBefore && nextRowIndex >= firstRowIndexInPage) {\n goToCell(colIndexBefore, getRowIdFromIndex(nextRowIndex));\n } else {\n goToHeader(colIndexBefore, event);\n }\n break;\n }\n case 'Home':\n {\n if (event.ctrlKey || event.metaKey || event.shiftKey) {\n goToCell(firstColIndex, getRowIdFromIndex(firstRowIndexInPage));\n } else {\n goToCell(firstColIndex, getRowIdFromIndex(rowIndexBefore));\n }\n break;\n }\n case 'End':\n {\n if (event.ctrlKey || event.metaKey || event.shiftKey) {\n goToCell(lastColIndex, getRowIdFromIndex(lastRowIndexInPage));\n } else {\n goToCell(lastColIndex, getRowIdFromIndex(rowIndexBefore));\n }\n break;\n }\n default:\n {\n shouldPreventDefault = false;\n }\n }\n if (shouldPreventDefault) {\n event.preventDefault();\n }\n }, [apiRef, currentPageRows, isRtl, goToCell, getRowIdFromIndex, headerFilteringEnabled, goToHeaderFilter, goToHeader]);\n const checkIfCanStartEditing = React.useCallback((initialValue, {\n event\n }) => {\n if (event.key === ' ') {\n // Space scrolls to the last row\n return false;\n }\n return initialValue;\n }, []);\n useGridRegisterPipeProcessor(apiRef, 'canStartEditing', checkIfCanStartEditing);\n useGridApiEventHandler(apiRef, 'columnHeaderKeyDown', handleColumnHeaderKeyDown);\n useGridApiEventHandler(apiRef, 'headerFilterKeyDown', handleHeaderFilterKeyDown);\n useGridApiEventHandler(apiRef, 'columnGroupHeaderKeyDown', handleColumnGroupHeaderKeyDown);\n useGridApiEventHandler(apiRef, 'cellKeyDown', handleCellKeyDown);\n};","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport { useGridLogger, useGridSelector, useGridApiMethod } from \"../../utils/index.js\";\nimport { useGridRegisterPipeProcessor } from \"../../core/pipeProcessing/index.js\";\nimport { gridPaginationMetaSelector } from \"./gridPaginationSelector.js\";\nexport const useGridPaginationMeta = (apiRef, props) => {\n const logger = useGridLogger(apiRef, 'useGridPaginationMeta');\n const paginationMeta = useGridSelector(apiRef, gridPaginationMetaSelector);\n apiRef.current.registerControlState({\n stateId: 'paginationMeta',\n propModel: props.paginationMeta,\n propOnChange: props.onPaginationMetaChange,\n stateSelector: gridPaginationMetaSelector,\n changeEvent: 'paginationMetaChange'\n });\n\n /**\n * API METHODS\n */\n const setPaginationMeta = React.useCallback(newPaginationMeta => {\n if (paginationMeta === newPaginationMeta) {\n return;\n }\n logger.debug(\"Setting 'paginationMeta' to\", newPaginationMeta);\n apiRef.current.setState(state => _extends({}, state, {\n pagination: _extends({}, state.pagination, {\n meta: newPaginationMeta\n })\n }));\n }, [apiRef, logger, paginationMeta]);\n const paginationMetaApi = {\n setPaginationMeta\n };\n useGridApiMethod(apiRef, paginationMetaApi, 'public');\n\n /**\n * PRE-PROCESSING\n */\n const stateExportPreProcessing = React.useCallback((prevState, context) => {\n const exportedPaginationMeta = gridPaginationMetaSelector(apiRef);\n const shouldExportRowCount =\n // Always export if the `exportOnlyDirtyModels` property is not activated\n !context.exportOnlyDirtyModels ||\n // Always export if the `paginationMeta` is controlled\n props.paginationMeta != null ||\n // Always export if the `paginationMeta` has been initialized\n props.initialState?.pagination?.meta != null;\n if (!shouldExportRowCount) {\n return prevState;\n }\n return _extends({}, prevState, {\n pagination: _extends({}, prevState.pagination, {\n meta: exportedPaginationMeta\n })\n });\n }, [apiRef, props.paginationMeta, props.initialState?.pagination?.meta]);\n const stateRestorePreProcessing = React.useCallback((params, context) => {\n const restoredPaginationMeta = context.stateToRestore.pagination?.meta ? context.stateToRestore.pagination.meta : gridPaginationMetaSelector(apiRef);\n apiRef.current.setState(state => _extends({}, state, {\n pagination: _extends({}, state.pagination, {\n meta: restoredPaginationMeta\n })\n }));\n return params;\n }, [apiRef]);\n useGridRegisterPipeProcessor(apiRef, 'exportState', stateExportPreProcessing);\n useGridRegisterPipeProcessor(apiRef, 'restoreState', stateRestorePreProcessing);\n\n /**\n * EFFECTS\n */\n React.useEffect(() => {\n if (props.paginationMeta) {\n apiRef.current.setPaginationMeta(props.paginationMeta);\n }\n }, [apiRef, props.paginationMeta]);\n};","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport useLazyRef from '@mui/utils/useLazyRef';\nimport { gridFilteredTopLevelRowCountSelector } from \"../filter/index.js\";\nimport { useGridLogger, useGridSelector, useGridApiMethod, useGridApiEventHandler } from \"../../utils/index.js\";\nimport { useGridRegisterPipeProcessor } from \"../../core/pipeProcessing/index.js\";\nimport { gridPaginationRowCountSelector, gridPaginationMetaSelector, gridPaginationModelSelector } from \"./gridPaginationSelector.js\";\nexport const useGridRowCount = (apiRef, props) => {\n const logger = useGridLogger(apiRef, 'useGridRowCount');\n const visibleTopLevelRowCount = useGridSelector(apiRef, gridFilteredTopLevelRowCountSelector);\n const rowCountState = useGridSelector(apiRef, gridPaginationRowCountSelector);\n const paginationMeta = useGridSelector(apiRef, gridPaginationMetaSelector);\n const paginationModel = useGridSelector(apiRef, gridPaginationModelSelector);\n const previousPageSize = useLazyRef(() => gridPaginationModelSelector(apiRef).pageSize);\n apiRef.current.registerControlState({\n stateId: 'paginationRowCount',\n propModel: props.rowCount,\n propOnChange: props.onRowCountChange,\n stateSelector: gridPaginationRowCountSelector,\n changeEvent: 'rowCountChange'\n });\n\n /**\n * API METHODS\n */\n const setRowCount = React.useCallback(newRowCount => {\n if (rowCountState === newRowCount) {\n return;\n }\n logger.debug(\"Setting 'rowCount' to\", newRowCount);\n apiRef.current.setState(state => _extends({}, state, {\n pagination: _extends({}, state.pagination, {\n rowCount: newRowCount\n })\n }));\n }, [apiRef, logger, rowCountState]);\n const paginationRowCountApi = {\n setRowCount\n };\n useGridApiMethod(apiRef, paginationRowCountApi, 'public');\n\n /**\n * PRE-PROCESSING\n */\n const stateExportPreProcessing = React.useCallback((prevState, context) => {\n const exportedRowCount = gridPaginationRowCountSelector(apiRef);\n const shouldExportRowCount =\n // Always export if the `exportOnlyDirtyModels` property is not activated\n !context.exportOnlyDirtyModels ||\n // Always export if the `rowCount` is controlled\n props.rowCount != null ||\n // Always export if the `rowCount` has been initialized\n props.initialState?.pagination?.rowCount != null;\n if (!shouldExportRowCount) {\n return prevState;\n }\n return _extends({}, prevState, {\n pagination: _extends({}, prevState.pagination, {\n rowCount: exportedRowCount\n })\n });\n }, [apiRef, props.rowCount, props.initialState?.pagination?.rowCount]);\n const stateRestorePreProcessing = React.useCallback((params, context) => {\n const restoredRowCount = context.stateToRestore.pagination?.rowCount ? context.stateToRestore.pagination.rowCount : gridPaginationRowCountSelector(apiRef);\n apiRef.current.setState(state => _extends({}, state, {\n pagination: _extends({}, state.pagination, {\n rowCount: restoredRowCount\n })\n }));\n return params;\n }, [apiRef]);\n useGridRegisterPipeProcessor(apiRef, 'exportState', stateExportPreProcessing);\n useGridRegisterPipeProcessor(apiRef, 'restoreState', stateRestorePreProcessing);\n\n /**\n * EVENTS\n */\n const handlePaginationModelChange = React.useCallback(model => {\n if (props.paginationMode === 'client' || !previousPageSize.current) {\n return;\n }\n if (model.pageSize !== previousPageSize.current) {\n previousPageSize.current = model.pageSize;\n if (rowCountState === -1) {\n // Row count unknown and page size changed, reset the page\n apiRef.current.setPage(0);\n }\n }\n }, [props.paginationMode, previousPageSize, rowCountState, apiRef]);\n useGridApiEventHandler(apiRef, 'paginationModelChange', handlePaginationModelChange);\n\n /**\n * EFFECTS\n */\n React.useEffect(() => {\n if (props.paginationMode === 'client') {\n apiRef.current.setRowCount(visibleTopLevelRowCount);\n } else if (props.rowCount != null) {\n apiRef.current.setRowCount(props.rowCount);\n }\n }, [apiRef, props.paginationMode, visibleTopLevelRowCount, props.rowCount]);\n const isLastPage = paginationMeta.hasNextPage === false;\n React.useEffect(() => {\n if (isLastPage && rowCountState === -1) {\n apiRef.current.setRowCount(paginationModel.pageSize * paginationModel.page + visibleTopLevelRowCount);\n }\n }, [apiRef, visibleTopLevelRowCount, isLastPage, rowCountState, paginationModel]);\n};","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport { unstable_ownerDocument as ownerDocument } from '@mui/utils';\nimport { useGridLogger } from \"../../utils/useGridLogger.js\";\nimport { gridExpandedRowCountSelector } from \"../filter/gridFilterSelector.js\";\nimport { gridColumnDefinitionsSelector, gridColumnVisibilityModelSelector } from \"../columns/gridColumnsSelector.js\";\nimport { gridClasses } from \"../../../constants/gridClasses.js\";\nimport { useGridApiMethod } from \"../../utils/useGridApiMethod.js\";\nimport { gridRowsMetaSelector } from \"../rows/gridRowsMetaSelector.js\";\nimport { GRID_ID_AUTOGENERATED } from \"../rows/gridRowsUtils.js\";\nimport { defaultGetRowsToExport, getColumnsToExport } from \"./utils.js\";\nimport { getDerivedPaginationModel } from \"../pagination/useGridPaginationModel.js\";\nimport { useGridRegisterPipeProcessor } from \"../../core/pipeProcessing/index.js\";\nimport { GridPrintExportMenuItem } from \"../../../components/toolbar/GridToolbarExport.js\";\nimport { getTotalHeaderHeight } from \"../columns/gridColumnsUtils.js\";\nimport { GRID_CHECKBOX_SELECTION_COL_DEF } from \"../../../colDef/gridCheckboxSelectionColDef.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction raf() {\n return new Promise(resolve => {\n requestAnimationFrame(() => {\n resolve();\n });\n });\n}\nfunction buildPrintWindow(title) {\n const iframeEl = document.createElement('iframe');\n iframeEl.style.position = 'absolute';\n iframeEl.style.width = '0px';\n iframeEl.style.height = '0px';\n iframeEl.title = title || document.title;\n return iframeEl;\n}\n\n/**\n * @requires useGridColumns (state)\n * @requires useGridFilter (state)\n * @requires useGridSorting (state)\n * @requires useGridParamsApi (method)\n */\nexport const useGridPrintExport = (apiRef, props) => {\n const hasRootReference = apiRef.current.rootElementRef.current !== null;\n const logger = useGridLogger(apiRef, 'useGridPrintExport');\n const doc = React.useRef(null);\n const previousGridState = React.useRef(null);\n const previousColumnVisibility = React.useRef({});\n const previousRows = React.useRef([]);\n const previousVirtualizationState = React.useRef();\n React.useEffect(() => {\n doc.current = ownerDocument(apiRef.current.rootElementRef.current);\n }, [apiRef, hasRootReference]);\n\n // Returns a promise because updateColumns triggers state update and\n // the new state needs to be in place before the grid can be sized correctly\n const updateGridColumnsForPrint = React.useCallback((fields, allColumns, includeCheckboxes) => new Promise(resolve => {\n const exportedColumnFields = getColumnsToExport({\n apiRef,\n options: {\n fields,\n allColumns\n }\n }).map(column => column.field);\n const columns = gridColumnDefinitionsSelector(apiRef);\n const newColumnVisibilityModel = {};\n columns.forEach(column => {\n newColumnVisibilityModel[column.field] = exportedColumnFields.includes(column.field);\n });\n if (includeCheckboxes) {\n newColumnVisibilityModel[GRID_CHECKBOX_SELECTION_COL_DEF.field] = true;\n }\n apiRef.current.setColumnVisibilityModel(newColumnVisibilityModel);\n resolve();\n }), [apiRef]);\n const updateGridRowsForPrint = React.useCallback(getRowsToExport => {\n const rowsToExportIds = getRowsToExport({\n apiRef\n });\n const newRows = rowsToExportIds.reduce((acc, id) => {\n const row = apiRef.current.getRow(id);\n if (!row[GRID_ID_AUTOGENERATED]) {\n acc.push(row);\n }\n return acc;\n }, []);\n apiRef.current.setRows(newRows);\n }, [apiRef]);\n const handlePrintWindowLoad = React.useCallback((printWindow, options) => {\n const normalizeOptions = _extends({\n copyStyles: true,\n hideToolbar: false,\n hideFooter: false,\n includeCheckboxes: false\n }, options);\n const printDoc = printWindow.contentDocument;\n if (!printDoc) {\n return;\n }\n const rowsMeta = gridRowsMetaSelector(apiRef.current.state);\n const gridRootElement = apiRef.current.rootElementRef.current;\n const gridClone = gridRootElement.cloneNode(true);\n\n // Allow to overflow to not hide the border of the last row\n const gridMain = gridClone.querySelector(`.${gridClasses.main}`);\n gridMain.style.overflow = 'visible';\n\n // See https://support.google.com/chrome/thread/191619088?hl=en&msgid=193009642\n gridClone.style.contain = 'size';\n let gridToolbarElementHeight = gridRootElement.querySelector(`.${gridClasses.toolbarContainer}`)?.offsetHeight || 0;\n let gridFooterElementHeight = gridRootElement.querySelector(`.${gridClasses.footerContainer}`)?.offsetHeight || 0;\n if (normalizeOptions.hideToolbar) {\n gridClone.querySelector(`.${gridClasses.toolbarContainer}`)?.remove();\n gridToolbarElementHeight = 0;\n }\n if (normalizeOptions.hideFooter) {\n gridClone.querySelector(`.${gridClasses.footerContainer}`)?.remove();\n gridFooterElementHeight = 0;\n }\n\n // Expand container height to accommodate all rows\n const computedTotalHeight = rowsMeta.currentPageTotalHeight + getTotalHeaderHeight(apiRef, props) + gridToolbarElementHeight + gridFooterElementHeight;\n gridClone.style.height = `${computedTotalHeight}px`;\n // The height above does not include grid border width, so we need to exclude it\n gridClone.style.boxSizing = 'content-box';\n if (!normalizeOptions.hideFooter) {\n // the footer is always being placed at the bottom of the page as if all rows are exported\n // so if getRowsToExport is being used to only export a subset of rows then we need to\n // adjust the footer position to be correctly placed at the bottom of the grid\n const gridFooterElement = gridClone.querySelector(`.${gridClasses.footerContainer}`);\n gridFooterElement.style.position = 'absolute';\n gridFooterElement.style.width = '100%';\n gridFooterElement.style.top = `${computedTotalHeight - gridFooterElementHeight}px`;\n }\n\n // printDoc.body.appendChild(gridClone); should be enough but a clone isolation bug in Safari\n // prevents us to do it\n const container = document.createElement('div');\n container.appendChild(gridClone);\n // To avoid an empty page in start on Chromium based browsers\n printDoc.body.style.marginTop = '0px';\n printDoc.body.innerHTML = container.innerHTML;\n const defaultPageStyle = typeof normalizeOptions.pageStyle === 'function' ? normalizeOptions.pageStyle() : normalizeOptions.pageStyle;\n if (typeof defaultPageStyle === 'string') {\n // TODO custom styles should always win\n const styleElement = printDoc.createElement('style');\n styleElement.appendChild(printDoc.createTextNode(defaultPageStyle));\n printDoc.head.appendChild(styleElement);\n }\n if (normalizeOptions.bodyClassName) {\n printDoc.body.classList.add(...normalizeOptions.bodyClassName.split(' '));\n }\n const stylesheetLoadPromises = [];\n if (normalizeOptions.copyStyles) {\n const rootCandidate = gridRootElement.getRootNode();\n const root = rootCandidate.constructor.name === 'ShadowRoot' ? rootCandidate : doc.current;\n const headStyleElements = root.querySelectorAll(\"style, link[rel='stylesheet']\");\n for (let i = 0; i < headStyleElements.length; i += 1) {\n const node = headStyleElements[i];\n if (node.tagName === 'STYLE') {\n const newHeadStyleElements = printDoc.createElement(node.tagName);\n const sheet = node.sheet;\n if (sheet) {\n let styleCSS = '';\n // NOTE: for-of is not supported by IE\n for (let j = 0; j < sheet.cssRules.length; j += 1) {\n if (typeof sheet.cssRules[j].cssText === 'string') {\n styleCSS += `${sheet.cssRules[j].cssText}\\r\\n`;\n }\n }\n newHeadStyleElements.appendChild(printDoc.createTextNode(styleCSS));\n printDoc.head.appendChild(newHeadStyleElements);\n }\n } else if (node.getAttribute('href')) {\n // If `href` tag is empty, avoid loading these links\n\n const newHeadStyleElements = printDoc.createElement(node.tagName);\n for (let j = 0; j < node.attributes.length; j += 1) {\n const attr = node.attributes[j];\n if (attr) {\n newHeadStyleElements.setAttribute(attr.nodeName, attr.nodeValue || '');\n }\n }\n stylesheetLoadPromises.push(new Promise(resolve => {\n newHeadStyleElements.addEventListener('load', () => resolve());\n }));\n printDoc.head.appendChild(newHeadStyleElements);\n }\n }\n }\n\n // Trigger print\n if (process.env.NODE_ENV !== 'test') {\n // wait for remote stylesheets to load\n Promise.all(stylesheetLoadPromises).then(() => {\n printWindow.contentWindow.print();\n });\n }\n }, [apiRef, doc, props]);\n const handlePrintWindowAfterPrint = React.useCallback(printWindow => {\n // Remove the print iframe\n doc.current.body.removeChild(printWindow);\n\n // Revert grid to previous state\n apiRef.current.restoreState(previousGridState.current || {});\n if (!previousGridState.current?.columns?.columnVisibilityModel) {\n // if the apiRef.current.exportState(); did not exported the column visibility, we update it\n apiRef.current.setColumnVisibilityModel(previousColumnVisibility.current);\n }\n apiRef.current.setState(state => _extends({}, state, {\n virtualization: previousVirtualizationState.current\n }));\n apiRef.current.setRows(previousRows.current);\n\n // Clear local state\n previousGridState.current = null;\n previousColumnVisibility.current = {};\n previousRows.current = [];\n }, [apiRef]);\n const exportDataAsPrint = React.useCallback(async options => {\n logger.debug(`Export data as Print`);\n if (!apiRef.current.rootElementRef.current) {\n throw new Error('MUI X: No grid root element available.');\n }\n previousGridState.current = apiRef.current.exportState();\n // It appends that the visibility model is not exported, especially if columnVisibility is not controlled\n previousColumnVisibility.current = gridColumnVisibilityModelSelector(apiRef);\n previousRows.current = apiRef.current.getSortedRows().filter(row => !row[GRID_ID_AUTOGENERATED]);\n if (props.pagination) {\n const visibleRowCount = gridExpandedRowCountSelector(apiRef);\n const paginationModel = {\n page: 0,\n pageSize: visibleRowCount\n };\n apiRef.current.setState(state => _extends({}, state, {\n pagination: _extends({}, state.pagination, {\n paginationModel: getDerivedPaginationModel(state.pagination,\n // Using signature `DataGridPro` to allow more than 100 rows in the print export\n 'DataGridPro', paginationModel)\n })\n }));\n }\n previousVirtualizationState.current = apiRef.current.state.virtualization;\n apiRef.current.setState(state => _extends({}, state, {\n virtualization: _extends({}, state.virtualization, {\n enabled: false,\n enabledForColumns: false\n })\n }));\n await updateGridColumnsForPrint(options?.fields, options?.allColumns, options?.includeCheckboxes);\n updateGridRowsForPrint(options?.getRowsToExport ?? defaultGetRowsToExport);\n await raf(); // wait for the state changes to take action\n const printWindow = buildPrintWindow(options?.fileName);\n if (process.env.NODE_ENV === 'test') {\n doc.current.body.appendChild(printWindow);\n // In test env, run the all pipeline without waiting for loading\n handlePrintWindowLoad(printWindow, options);\n handlePrintWindowAfterPrint(printWindow);\n } else {\n printWindow.onload = () => {\n handlePrintWindowLoad(printWindow, options);\n const mediaQueryList = printWindow.contentWindow.matchMedia('print');\n mediaQueryList.addEventListener('change', mql => {\n const isAfterPrint = mql.matches === false;\n if (isAfterPrint) {\n handlePrintWindowAfterPrint(printWindow);\n }\n });\n };\n doc.current.body.appendChild(printWindow);\n }\n }, [props, logger, apiRef, handlePrintWindowLoad, handlePrintWindowAfterPrint, updateGridColumnsForPrint, updateGridRowsForPrint]);\n const printExportApi = {\n exportDataAsPrint\n };\n useGridApiMethod(apiRef, printExportApi, 'public');\n\n /**\n * PRE-PROCESSING\n */\n const addExportMenuButtons = React.useCallback((initialValue, options) => {\n if (options.printOptions?.disableToolbarButton) {\n return initialValue;\n }\n return [...initialValue, {\n component: /*#__PURE__*/_jsx(GridPrintExportMenuItem, {\n options: options.printOptions\n }),\n componentName: 'printExport'\n }];\n }, []);\n useGridRegisterPipeProcessor(apiRef, 'exportMenu', addExportMenuButtons);\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}","import ownerDocument from '../ownerDocument';\nexport default function ownerWindow(node) {\n const doc = ownerDocument(node);\n return doc.defaultView || window;\n}","import { useGridApiOptionHandler } from \"../../utils/useGridApiEventHandler.js\";\n/**\n * @requires useGridFocus (event) - can be after, async only\n * @requires useGridColumns (event) - can be after, async only\n */\nexport function useGridEvents(apiRef, props) {\n useGridApiOptionHandler(apiRef, 'columnHeaderClick', props.onColumnHeaderClick);\n useGridApiOptionHandler(apiRef, 'columnHeaderDoubleClick', props.onColumnHeaderDoubleClick);\n useGridApiOptionHandler(apiRef, 'columnHeaderOver', props.onColumnHeaderOver);\n useGridApiOptionHandler(apiRef, 'columnHeaderOut', props.onColumnHeaderOut);\n useGridApiOptionHandler(apiRef, 'columnHeaderEnter', props.onColumnHeaderEnter);\n useGridApiOptionHandler(apiRef, 'columnHeaderLeave', props.onColumnHeaderLeave);\n useGridApiOptionHandler(apiRef, 'cellClick', props.onCellClick);\n useGridApiOptionHandler(apiRef, 'cellDoubleClick', props.onCellDoubleClick);\n useGridApiOptionHandler(apiRef, 'cellKeyDown', props.onCellKeyDown);\n useGridApiOptionHandler(apiRef, 'preferencePanelClose', props.onPreferencePanelClose);\n useGridApiOptionHandler(apiRef, 'preferencePanelOpen', props.onPreferencePanelOpen);\n useGridApiOptionHandler(apiRef, 'menuOpen', props.onMenuOpen);\n useGridApiOptionHandler(apiRef, 'menuClose', props.onMenuClose);\n useGridApiOptionHandler(apiRef, 'rowDoubleClick', props.onRowDoubleClick);\n useGridApiOptionHandler(apiRef, 'rowClick', props.onRowClick);\n useGridApiOptionHandler(apiRef, 'stateChange', props.onStateChange);\n}","import * as React from 'react';\nimport { useGridApiMethod } from \"../../utils/index.js\";\nexport const useGridStatePersistence = apiRef => {\n const exportState = React.useCallback((params = {}) => {\n const stateToExport = apiRef.current.unstable_applyPipeProcessors('exportState', {}, params);\n return stateToExport;\n }, [apiRef]);\n const restoreState = React.useCallback(stateToRestore => {\n const response = apiRef.current.unstable_applyPipeProcessors('restoreState', {\n callbacks: []\n }, {\n stateToRestore\n });\n response.callbacks.forEach(callback => {\n callback();\n });\n apiRef.current.forceUpdate();\n }, [apiRef]);\n const statePersistenceApi = {\n exportState,\n restoreState\n };\n useGridApiMethod(apiRef, statePersistenceApi, 'public');\n};","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { GridBody, GridFooterPlaceholder, GridHeader, GridRoot } from \"../components/index.js\";\nimport { useGridAriaAttributes } from \"../hooks/utils/useGridAriaAttributes.js\";\nimport { useGridRowAriaAttributes } from \"../hooks/features/rows/useGridRowAriaAttributes.js\";\nimport { GridContextProvider } from \"../context/GridContextProvider.js\";\nimport { useDataGridComponent } from \"./useDataGridComponent.js\";\nimport { useDataGridProps } from \"./useDataGridProps.js\";\nimport { propValidatorsDataGrid, validateProps } from \"../internals/utils/propValidation.js\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst configuration = {\n hooks: {\n useGridAriaAttributes,\n useGridRowAriaAttributes\n }\n};\nlet propValidators;\nif (process.env.NODE_ENV !== 'production') {\n propValidators = [...propValidatorsDataGrid,\n // Only validate in MIT version\n props => props.columns && props.columns.some(column => column.resizable) && [`MUI X: \\`column.resizable = true\\` is not a valid prop.`, 'Column resizing is not available in the MIT version.', '', 'You need to upgrade to DataGridPro or DataGridPremium component to unlock this feature.'].join('\\n') || undefined];\n}\nconst DataGridRaw = /*#__PURE__*/React.forwardRef(function DataGrid(inProps, ref) {\n const props = useDataGridProps(inProps);\n const privateApiRef = useDataGridComponent(props.apiRef, props);\n if (process.env.NODE_ENV !== 'production') {\n validateProps(props, propValidators);\n }\n return /*#__PURE__*/_jsx(GridContextProvider, {\n privateApiRef: privateApiRef,\n configuration: configuration,\n props: props,\n children: /*#__PURE__*/_jsxs(GridRoot, _extends({\n className: props.className,\n style: props.style,\n sx: props.sx,\n ref: ref\n }, props.forwardedProps, {\n children: [/*#__PURE__*/_jsx(GridHeader, {}), /*#__PURE__*/_jsx(GridBody, {}), /*#__PURE__*/_jsx(GridFooterPlaceholder, {})]\n }))\n });\n});\n/**\n * Demos:\n * - [DataGrid](https://mui.com/x/react-data-grid/demo/)\n *\n * API:\n * - [DataGrid API](https://mui.com/x/api/data-grid/data-grid/)\n */\nexport const DataGrid = /*#__PURE__*/React.memo(DataGridRaw);\nDataGridRaw.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 ref object that allows Data Grid manipulation. Can be instantiated with `useGridApiRef()`.\n */\n apiRef: PropTypes.shape({\n current: PropTypes.object.isRequired\n }),\n /**\n * The label of the Data Grid.\n */\n 'aria-label': PropTypes.string,\n /**\n * The id of the element containing a label for the Data Grid.\n */\n 'aria-labelledby': PropTypes.string,\n /**\n * If `true`, the Data Grid height is dynamic and follows the number of rows in the Data Grid.\n * @default false\n */\n autoHeight: PropTypes.bool,\n /**\n * If `true`, the pageSize is calculated according to the container size and the max number of rows to avoid rendering a vertical scroll bar.\n * @default false\n */\n autoPageSize: PropTypes.bool,\n /**\n * If `true`, columns are autosized after the datagrid is mounted.\n * @default false\n */\n autosizeOnMount: PropTypes.bool,\n /**\n * The options for autosize when user-initiated.\n */\n autosizeOptions: PropTypes.shape({\n columns: PropTypes.arrayOf(PropTypes.string),\n expand: PropTypes.bool,\n includeHeaders: PropTypes.bool,\n includeOutliers: PropTypes.bool,\n outliersFactor: PropTypes.number\n }),\n /**\n * Controls the modes of the cells.\n */\n cellModesModel: PropTypes.object,\n /**\n * If `true`, the Data Grid will display an extra column with checkboxes for selecting rows.\n * @default false\n */\n checkboxSelection: PropTypes.bool,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * The character used to separate cell values when copying to the clipboard.\n * @default '\\t'\n */\n clipboardCopyCellDelimiter: PropTypes.string,\n /**\n * Column region in pixels to render before/after the viewport\n * @default 150\n */\n columnBufferPx: PropTypes.number,\n /**\n * Sets the height in pixels of the column group headers in the Data Grid.\n * Inherits the `columnHeaderHeight` value if not set.\n */\n columnGroupHeaderHeight: PropTypes.number,\n columnGroupingModel: PropTypes.arrayOf(PropTypes.object),\n /**\n * Sets the height in pixel of the column headers in the Data Grid.\n * @default 56\n */\n columnHeaderHeight: PropTypes.number,\n /**\n * Set of columns of type [[GridColDef]][].\n */\n columns: PropTypes.arrayOf(PropTypes.object).isRequired,\n /**\n * Set the column visibility model of the Data Grid.\n * If defined, the Data Grid will ignore the `hide` property in [[GridColDef]].\n */\n columnVisibilityModel: PropTypes.object,\n /**\n * Set the density of the Data Grid.\n * @default \"standard\"\n */\n density: PropTypes.oneOf(['comfortable', 'compact', 'standard']),\n /**\n * If `true`, column autosizing on header separator double-click is disabled.\n * @default false\n */\n disableAutosize: PropTypes.bool,\n /**\n * If `true`, column filters are disabled.\n * @default false\n */\n disableColumnFilter: PropTypes.bool,\n /**\n * If `true`, the column menu is disabled.\n * @default false\n */\n disableColumnMenu: PropTypes.bool,\n /**\n * If `true`, resizing columns is disabled.\n * @default false\n */\n disableColumnResize: PropTypes.bool,\n /**\n * If `true`, hiding/showing columns is disabled.\n * @default false\n */\n disableColumnSelector: PropTypes.bool,\n /**\n * If `true`, the column sorting feature will be disabled.\n * @default false\n */\n disableColumnSorting: PropTypes.bool,\n /**\n * If `true`, the density selector is disabled.\n * @default false\n */\n disableDensitySelector: PropTypes.bool,\n /**\n * If `true`, `eval()` is not used for performance optimization.\n * @default false\n */\n disableEval: PropTypes.bool,\n /**\n * If `true`, multiple selection using the Ctrl/CMD or Shift key is disabled.\n * The MIT DataGrid will ignore this prop, unless `checkboxSelection` is enabled.\n * @default false (`!props.checkboxSelection` for MIT Data Grid)\n */\n disableMultipleRowSelection: PropTypes.bool,\n /**\n * If `true`, the selection on click on a row or cell is disabled.\n * @default false\n */\n disableRowSelectionOnClick: PropTypes.bool,\n /**\n * If `true`, the virtualization is disabled.\n * @default false\n */\n disableVirtualization: PropTypes.bool,\n /**\n * Controls whether to use the cell or row editing.\n * @default \"cell\"\n */\n editMode: PropTypes.oneOf(['cell', 'row']),\n /**\n * Use if the actual rowCount is not known upfront, but an estimation is available.\n * If some rows have children (for instance in the tree data), this number represents the amount of top level rows.\n * Applicable only with `paginationMode=\"server\"` and when `rowCount=\"-1\"`\n */\n estimatedRowCount: PropTypes.number,\n /**\n * Unstable features, breaking changes might be introduced.\n * For each feature, if the flag is not explicitly set to `true`, the feature will be fully disabled and any property / method call will not have any effect.\n */\n experimentalFeatures: PropTypes.shape({\n warnIfFocusStateIsNotSynced: PropTypes.bool\n }),\n /**\n * The milliseconds delay to wait after a keystroke before triggering filtering.\n * @default 150\n */\n filterDebounceMs: PropTypes.number,\n /**\n * Filtering can be processed on the server or client-side.\n * Set it to 'server' if you would like to handle filtering on the server-side.\n * @default \"client\"\n */\n filterMode: PropTypes.oneOf(['client', 'server']),\n /**\n * Set the filter model of the Data Grid.\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 }),\n /**\n * Forwarded props for the Data Grid root element.\n * @ignore - do not document.\n */\n forwardedProps: PropTypes.object,\n /**\n * Function that applies CSS classes dynamically on cells.\n * @param {GridCellParams} params With all properties from [[GridCellParams]].\n * @returns {string} The CSS class to apply to the cell.\n */\n getCellClassName: PropTypes.func,\n /**\n * Function that returns the element to render in row detail.\n * @param {GridRowParams} params With all properties from [[GridRowParams]].\n * @returns {React.JSX.Element} The row detail element.\n */\n getDetailPanelContent: PropTypes.func,\n /**\n * Function that returns the estimated height for a row.\n * Only works if dynamic row height is used.\n * Once the row height is measured this value is discarded.\n * @param {GridRowHeightParams} params With all properties from [[GridRowHeightParams]].\n * @returns {number | null} The estimated row height value. If `null` or `undefined` then the default row height, based on the density, is applied.\n */\n getEstimatedRowHeight: PropTypes.func,\n /**\n * Function that applies CSS classes dynamically on rows.\n * @param {GridRowClassNameParams} params With all properties from [[GridRowClassNameParams]].\n * @returns {string} The CSS class to apply to the row.\n */\n getRowClassName: PropTypes.func,\n /**\n * Function that sets the row height per row.\n * @param {GridRowHeightParams} params With all properties from [[GridRowHeightParams]].\n * @returns {GridRowHeightReturnValue} The row height value. If `null` or `undefined` then the default row height is applied. If \"auto\" then the row height is calculated based on the content.\n */\n getRowHeight: PropTypes.func,\n /**\n * Return the id of a given [[GridRowModel]].\n */\n getRowId: PropTypes.func,\n /**\n * Function that allows to specify the spacing between rows.\n * @param {GridRowSpacingParams} params With all properties from [[GridRowSpacingParams]].\n * @returns {GridRowSpacing} The row spacing values.\n */\n getRowSpacing: PropTypes.func,\n /**\n * If `true`, the footer component is hidden.\n * @default false\n */\n hideFooter: PropTypes.bool,\n /**\n * If `true`, the pagination component in the footer is hidden.\n * @default false\n */\n hideFooterPagination: PropTypes.bool,\n /**\n * If `true`, the selected row count in the footer is hidden.\n * @default false\n */\n hideFooterSelectedRowCount: PropTypes.bool,\n /**\n * If `true`, the diacritics (accents) are ignored when filtering or quick filtering.\n * E.g. when filter value is `cafe`, the rows with `café` will be visible.\n * @default false\n */\n ignoreDiacritics: PropTypes.bool,\n /**\n * If `true`, the Data Grid will not use `valueFormatter` when exporting to CSV or copying to clipboard.\n * If an object is provided, you can choose to ignore the `valueFormatter` for CSV export or clipboard export.\n * @default false\n */\n ignoreValueFormatterDuringExport: PropTypes.oneOfType([PropTypes.shape({\n clipboardExport: PropTypes.bool,\n csvExport: PropTypes.bool\n }), PropTypes.bool]),\n /**\n * If `select`, a group header checkbox in indeterminate state (like \"Select All\" checkbox)\n * will select all the rows under it.\n * If `deselect`, it will deselect all the rows under it.\n * Works only if `checkboxSelection` is enabled.\n * @default \"deselect\"\n */\n indeterminateCheckboxAction: PropTypes.oneOf(['deselect', 'select']),\n /**\n * The initial state of the DataGrid.\n * The data in it will be set in the state on initialization but will not be controlled.\n * If one of the data in `initialState` is also being controlled, then the control state wins.\n */\n initialState: PropTypes.object,\n /**\n * Callback fired when a cell is rendered, returns true if the cell is editable.\n * @param {GridCellParams} params With all properties from [[GridCellParams]].\n * @returns {boolean} A boolean indicating if the cell is editable.\n */\n isCellEditable: PropTypes.func,\n /**\n * Determines if a row can be selected.\n * @param {GridRowParams} params With all properties from [[GridRowParams]].\n * @returns {boolean} A boolean indicating if the row is selectable.\n */\n isRowSelectable: PropTypes.func,\n /**\n * If `true`, the selection model will retain selected rows that do not exist.\n * Useful when using server side pagination and row selections need to be retained\n * when changing pages.\n * @default false\n */\n keepNonExistentRowsSelected: PropTypes.bool,\n /**\n * If `true`, a loading overlay is displayed.\n * @default false\n */\n loading: PropTypes.bool,\n /**\n * Set the locale text of the Data Grid.\n * You can find all the translation keys supported in [the source](https://github.com/mui/mui-x/blob/HEAD/packages/x-data-grid/src/constants/localeTextConstants.ts) in the GitHub repository.\n */\n localeText: PropTypes.object,\n /**\n * Pass a custom logger in the components that implements the [[Logger]] interface.\n * @default console\n */\n logger: PropTypes.shape({\n debug: PropTypes.func.isRequired,\n error: PropTypes.func.isRequired,\n info: PropTypes.func.isRequired,\n warn: PropTypes.func.isRequired\n }),\n /**\n * Allows to pass the logging level or false to turn off logging.\n * @default \"error\" (\"warn\" in dev mode)\n */\n logLevel: PropTypes.oneOf(['debug', 'error', 'info', 'warn', false]),\n /**\n * Nonce of the inline styles for [Content Security Policy](https://www.w3.org/TR/2016/REC-CSP2-20161215/#script-src-the-nonce-attribute).\n */\n nonce: PropTypes.string,\n /**\n * Callback fired when any cell is clicked.\n * @param {GridCellParams} params With all properties from [[GridCellParams]].\n * @param {MuiEvent<React.MouseEvent>} event The event object.\n * @param {GridCallbackDetails} details Additional details for this callback.\n */\n onCellClick: PropTypes.func,\n /**\n * Callback fired when a double click event comes from a cell element.\n * @param {GridCellParams} params With all properties from [[GridCellParams]].\n * @param {MuiEvent<React.MouseEvent>} event The event object.\n * @param {GridCallbackDetails} details Additional details for this callback.\n */\n onCellDoubleClick: PropTypes.func,\n /**\n * Callback fired when the cell turns to edit mode.\n * @param {GridCellParams} params With all properties from [[GridCellParams]].\n * @param {MuiEvent<React.KeyboardEvent | React.MouseEvent>} event The event that caused this prop to be called.\n */\n onCellEditStart: PropTypes.func,\n /**\n * Callback fired when the cell turns to view mode.\n * @param {GridCellParams} params With all properties from [[GridCellParams]].\n * @param {MuiEvent<MuiBaseEvent>} event The event that caused this prop to be called.\n */\n onCellEditStop: PropTypes.func,\n /**\n * Callback fired when a keydown event comes from a cell element.\n * @param {GridCellParams} params With all properties from [[GridCellParams]].\n * @param {MuiEvent<React.KeyboardEvent>} event The event object.\n * @param {GridCallbackDetails} details Additional details for this callback.\n */\n onCellKeyDown: PropTypes.func,\n /**\n * Callback fired when the `cellModesModel` prop changes.\n * @param {GridCellModesModel} cellModesModel Object containing which cells are in \"edit\" mode.\n * @param {GridCallbackDetails} details Additional details for this callback.\n */\n onCellModesModelChange: PropTypes.func,\n /**\n * Callback called when the data is copied to the clipboard.\n * @param {string} data The data copied to the clipboard.\n */\n onClipboardCopy: PropTypes.func,\n /**\n * Callback fired when a click event comes from a column header element.\n * @param {GridColumnHeaderParams} params With all properties from [[GridColumnHeaderParams]].\n * @param {MuiEvent<React.MouseEvent>} event The event object.\n * @param {GridCallbackDetails} details Additional details for this callback.\n */\n onColumnHeaderClick: PropTypes.func,\n /**\n * Callback fired when a double click event comes from a column header element.\n * @param {GridColumnHeaderParams} params With all properties from [[GridColumnHeaderParams]].\n * @param {MuiEvent<React.MouseEvent>} event The event object.\n * @param {GridCallbackDetails} details Additional details for this callback.\n */\n onColumnHeaderDoubleClick: PropTypes.func,\n /**\n * Callback fired when a mouse enter event comes from a column header element.\n * @param {GridColumnHeaderParams} params With all properties from [[GridColumnHeaderParams]].\n * @param {MuiEvent<React.MouseEvent>} event The event object.\n * @param {GridCallbackDetails} details Additional details for this callback.\n */\n onColumnHeaderEnter: PropTypes.func,\n /**\n * Callback fired when a mouse leave event comes from a column header element.\n * @param {GridColumnHeaderParams} params With all properties from [[GridColumnHeaderParams]].\n * @param {MuiEvent<React.MouseEvent>} event The event object.\n * @param {GridCallbackDetails} details Additional details for this callback.\n */\n onColumnHeaderLeave: PropTypes.func,\n /**\n * Callback fired when a mouseout event comes from a column header element.\n * @param {GridColumnHeaderParams} params With all properties from [[GridColumnHeaderParams]].\n * @param {MuiEvent<React.MouseEvent>} event The event object.\n * @param {GridCallbackDetails} details Additional details for this callback.\n */\n onColumnHeaderOut: PropTypes.func,\n /**\n * Callback fired when a mouseover event comes from a column header element.\n * @param {GridColumnHeaderParams} params With all properties from [[GridColumnHeaderParams]].\n * @param {MuiEvent<React.MouseEvent>} event The event object.\n * @param {GridCallbackDetails} details Additional details for this callback.\n */\n onColumnHeaderOver: PropTypes.func,\n /**\n * Callback fired when a column is reordered.\n * @param {GridColumnOrderChangeParams} params With all properties from [[GridColumnOrderChangeParams]].\n * @param {MuiEvent<{}>} event The event object.\n * @param {GridCallbackDetails} details Additional details for this callback.\n */\n onColumnOrderChange: PropTypes.func,\n /**\n * Callback fired while a column is being resized.\n * @param {GridColumnResizeParams} params With all properties from [[GridColumnResizeParams]].\n * @param {MuiEvent<React.MouseEvent>} event The event object.\n * @param {GridCallbackDetails} details Additional details for this callback.\n */\n onColumnResize: PropTypes.func,\n /**\n * Callback fired when the column visibility model changes.\n * @param {GridColumnVisibilityModel} model The new model.\n * @param {GridCallbackDetails} details Additional details for this callback.\n */\n onColumnVisibilityModelChange: PropTypes.func,\n /**\n * Callback fired when the width of a column is changed.\n * @param {GridColumnResizeParams} params With all properties from [[GridColumnResizeParams]].\n * @param {MuiEvent<React.MouseEvent>} event The event object.\n * @param {GridCallbackDetails} details Additional details for this callback.\n */\n onColumnWidthChange: PropTypes.func,\n /**\n * Callback fired when the density changes.\n * @param {GridDensity} density New density value.\n */\n onDensityChange: PropTypes.func,\n /**\n * Callback fired when the Filter model changes before the filters are applied.\n * @param {GridFilterModel} model With all properties from [[GridFilterModel]].\n * @param {GridCallbackDetails} details Additional details for this callback.\n */\n onFilterModelChange: PropTypes.func,\n /**\n * Callback fired when the menu is closed.\n * @param {GridMenuParams} params With all properties from [[GridMenuParams]].\n * @param {MuiEvent<{}>} event The event object.\n * @param {GridCallbackDetails} details Additional details for this callback.\n */\n onMenuClose: PropTypes.func,\n /**\n * Callback fired when the menu is opened.\n * @param {GridMenuParams} params With all properties from [[GridMenuParams]].\n * @param {MuiEvent<{}>} event The event object.\n * @param {GridCallbackDetails} details Additional details for this callback.\n */\n onMenuOpen: PropTypes.func,\n /**\n * Callback fired when the pagination meta has changed.\n * @param {GridPaginationMeta} paginationMeta Updated pagination meta.\n */\n onPaginationMetaChange: PropTypes.func,\n /**\n * Callback fired when the pagination model has changed.\n * @param {GridPaginationModel} model Updated pagination model.\n * @param {GridCallbackDetails} details Additional details for this callback.\n */\n onPaginationModelChange: PropTypes.func,\n /**\n * Callback fired when the preferences panel is closed.\n * @param {GridPreferencePanelParams} params With all properties from [[GridPreferencePanelParams]].\n * @param {MuiEvent<{}>} event The event object.\n * @param {GridCallbackDetails} details Additional details for this callback.\n */\n onPreferencePanelClose: PropTypes.func,\n /**\n * Callback fired when the preferences panel is opened.\n * @param {GridPreferencePanelParams} params With all properties from [[GridPreferencePanelParams]].\n * @param {MuiEvent<{}>} event The event object.\n * @param {GridCallbackDetails} details Additional details for this callback.\n */\n onPreferencePanelOpen: PropTypes.func,\n /**\n * Callback called when `processRowUpdate` throws an error or rejects.\n * @param {any} error The error thrown.\n */\n onProcessRowUpdateError: PropTypes.func,\n /**\n * Callback fired when the Data Grid is resized.\n * @param {ElementSize} containerSize With all properties from [[ElementSize]].\n * @param {MuiEvent<{}>} event The event object.\n * @param {GridCallbackDetails} details Additional details for this callback.\n */\n onResize: PropTypes.func,\n /**\n * Callback fired when a row is clicked.\n * Not called if the target clicked is an interactive element added by the built-in columns.\n * @param {GridRowParams} params With all properties from [[GridRowParams]].\n * @param {MuiEvent<React.MouseEvent>} event The event object.\n * @param {GridCallbackDetails} details Additional details for this callback.\n */\n onRowClick: PropTypes.func,\n /**\n * Callback fired when the row count has changed.\n * @param {number} count Updated row count.\n */\n onRowCountChange: PropTypes.func,\n /**\n * Callback fired when a double click event comes from a row container element.\n * @param {GridRowParams} params With all properties from [[RowParams]].\n * @param {MuiEvent<React.MouseEvent>} event The event object.\n * @param {GridCallbackDetails} details Additional details for this callback.\n */\n onRowDoubleClick: PropTypes.func,\n /**\n * Callback fired when the row turns to edit mode.\n * @param {GridRowParams} params With all properties from [[GridRowParams]].\n * @param {MuiEvent<React.KeyboardEvent | React.MouseEvent>} event The event that caused this prop to be called.\n */\n onRowEditStart: PropTypes.func,\n /**\n * Callback fired when the row turns to view mode.\n * @param {GridRowParams} params With all properties from [[GridRowParams]].\n * @param {MuiEvent<MuiBaseEvent>} event The event that caused this prop to be called.\n */\n onRowEditStop: PropTypes.func,\n /**\n * Callback fired when the `rowModesModel` prop changes.\n * @param {GridRowModesModel} rowModesModel Object containing which rows are in \"edit\" mode.\n * @param {GridCallbackDetails} details Additional details for this callback.\n */\n onRowModesModelChange: PropTypes.func,\n /**\n * Callback fired when the selection state of one or multiple rows changes.\n * @param {GridRowSelectionModel} rowSelectionModel With all the row ids [[GridSelectionModel]].\n * @param {GridCallbackDetails} details Additional details for this callback.\n */\n onRowSelectionModelChange: PropTypes.func,\n /**\n * Callback fired when the sort model changes before a column is sorted.\n * @param {GridSortModel} model With all properties from [[GridSortModel]].\n * @param {GridCallbackDetails} details Additional details for this callback.\n */\n onSortModelChange: PropTypes.func,\n /**\n * Callback fired when the state of the Data Grid is updated.\n * @param {GridState} state The new state.\n * @param {MuiEvent<{}>} event The event object.\n * @param {GridCallbackDetails} details Additional details for this callback.\n * @ignore - do not document.\n */\n onStateChange: PropTypes.func,\n /**\n * Select the pageSize dynamically using the component UI.\n * @default [25, 50, 100]\n */\n pageSizeOptions: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.number, PropTypes.shape({\n label: PropTypes.string.isRequired,\n value: PropTypes.number.isRequired\n })]).isRequired),\n pagination: PropTypes.oneOf([true]),\n /**\n * The extra information about the pagination state of the Data Grid.\n * Only applicable with `paginationMode=\"server\"`.\n */\n paginationMeta: PropTypes.shape({\n hasNextPage: PropTypes.bool\n }),\n /**\n * Pagination can be processed on the server or client-side.\n * Set it to 'client' if you would like to handle the pagination on the client-side.\n * Set it to 'server' if you would like to handle the pagination on the server-side.\n * @default \"client\"\n */\n paginationMode: PropTypes.oneOf(['client', 'server']),\n /**\n * The pagination model of type [[GridPaginationModel]] which refers to current `page` and `pageSize`.\n */\n paginationModel: PropTypes.shape({\n page: PropTypes.number.isRequired,\n pageSize: PropTypes.number.isRequired\n }),\n /**\n * Callback called before updating a row with new values in the row and cell editing.\n * @template R\n * @param {R} newRow Row object with the new values.\n * @param {R} oldRow Row object with the old values.\n * @returns {Promise<R> | R} The final values to update the row.\n */\n processRowUpdate: PropTypes.func,\n /**\n * The milliseconds throttle delay for resizing the grid.\n * @default 60\n */\n resizeThrottleMs: PropTypes.number,\n /**\n * Row region in pixels to render before/after the viewport\n * @default 150\n */\n rowBufferPx: PropTypes.number,\n /**\n * Set the total number of rows, if it is different from the length of the value `rows` prop.\n * If some rows have children (for instance in the tree data), this number represents the amount of top level rows.\n * Only works with `paginationMode=\"server\"`, ignored when `paginationMode=\"client\"`.\n */\n rowCount: PropTypes.number,\n /**\n * Sets the height in pixel of a row in the Data Grid.\n * @default 52\n */\n rowHeight: PropTypes.number,\n /**\n * Controls the modes of the rows.\n */\n rowModesModel: PropTypes.object,\n /**\n * The milliseconds delay to wait after measuring the row height before recalculating row positions.\n * Setting it to a lower value could be useful when using dynamic row height,\n * but might reduce performance when displaying a large number of rows.\n * @default 166\n */\n rowPositionsDebounceMs: PropTypes.number,\n /**\n * Set of rows of type [[GridRowsProp]].\n * @default []\n */\n rows: PropTypes.arrayOf(PropTypes.object),\n /**\n * If `false`, the row selection mode is disabled.\n * @default true\n */\n rowSelection: PropTypes.bool,\n /**\n * Sets the row selection model of the Data Grid.\n */\n rowSelectionModel: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired), PropTypes.number, PropTypes.string]),\n /**\n * Sets the type of space between rows added by `getRowSpacing`.\n * @default \"margin\"\n */\n rowSpacingType: PropTypes.oneOf(['border', 'margin']),\n /**\n * Override the height/width of the Data Grid inner scrollbar.\n */\n scrollbarSize: PropTypes.number,\n /**\n * If `true`, vertical borders will be displayed between cells.\n * @default false\n */\n showCellVerticalBorder: PropTypes.bool,\n /**\n * If `true`, vertical borders will be displayed between column header items.\n * @default false\n */\n showColumnVerticalBorder: PropTypes.bool,\n /**\n * Overridable components props dynamically passed to the component at rendering.\n */\n slotProps: PropTypes.object,\n /**\n * Overridable components.\n */\n slots: PropTypes.object,\n /**\n * Sorting can be processed on the server or client-side.\n * Set it to 'client' if you would like to handle sorting on the client-side.\n * Set it to 'server' if you would like to handle sorting on the server-side.\n * @default \"client\"\n */\n sortingMode: PropTypes.oneOf(['client', 'server']),\n /**\n * The order of the sorting sequence.\n * @default ['asc', 'desc', null]\n */\n sortingOrder: PropTypes.arrayOf(PropTypes.oneOf(['asc', 'desc'])),\n /**\n * Set the sort model of the Data Grid.\n */\n sortModel: PropTypes.arrayOf(PropTypes.shape({\n field: PropTypes.string.isRequired,\n sort: PropTypes.oneOf(['asc', 'desc'])\n })),\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 /**\n * If `true`, the Data Grid will auto span the cells over the rows having the same value.\n * @default false\n */\n unstable_rowSpanning: PropTypes.bool\n};","import { gridVisibleColumnDefinitionsSelector } from \"../features/columns/gridColumnsSelector.js\";\nimport { useGridSelector } from \"./useGridSelector.js\";\nimport { useGridRootProps } from \"./useGridRootProps.js\";\nimport { gridColumnGroupsHeaderMaxDepthSelector } from \"../features/columnGrouping/gridColumnGroupsSelector.js\";\nimport { gridPinnedRowsCountSelector } from \"../features/rows/gridRowsSelector.js\";\nimport { useGridPrivateApiContext } from \"./useGridPrivateApiContext.js\";\nimport { isMultipleRowSelectionEnabled } from \"../features/rowSelection/utils.js\";\nimport { gridExpandedRowCountSelector } from \"../features/filter/gridFilterSelector.js\";\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 return {\n role: 'grid',\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 { selectedIdsLookupSelector } from \"../rowSelection/index.js\";\nimport { useGridSelector } from \"../../utils/useGridSelector.js\";\nimport { gridColumnGroupsHeaderMaxDepthSelector } from \"../columnGrouping/gridColumnGroupsSelector.js\";\nimport { useGridPrivateApiContext } from \"../../utils/useGridPrivateApiContext.js\";\nexport const useGridRowAriaAttributes = () => {\n const apiRef = useGridPrivateApiContext();\n const selectedIdsLookup = useGridSelector(apiRef, selectedIdsLookupSelector);\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 if (apiRef.current.isRowSelectable(rowNode.id)) {\n ariaAttributes['aria-selected'] = selectedIdsLookup[rowNode.id] !== undefined;\n }\n return ariaAttributes;\n }, [apiRef, selectedIdsLookup, headerGroupingMaxDepth]);\n};","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport { useGridApiContext } from \"../hooks/utils/useGridApiContext.js\";\nimport { GridOverlay } from \"./containers/GridOverlay.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport const GridNoResultsOverlay = /*#__PURE__*/React.forwardRef(function GridNoResultsOverlay(props, ref) {\n const apiRef = useGridApiContext();\n const noResultsOverlayLabel = apiRef.current.getLocaleText('noResultsOverlayLabel');\n return /*#__PURE__*/_jsx(GridOverlay, _extends({\n ref: ref\n }, props, {\n children: noResultsOverlayLabel\n }));\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 { useGridRootProps } from \"../../hooks/utils/useGridRootProps.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport const GridColumnUnsortedIcon = /*#__PURE__*/React.memo(function GridColumnHeaderSortIcon(props) {\n const {\n sortingOrder\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const rootProps = useGridRootProps();\n const [nextSortDirection] = sortingOrder;\n const Icon = nextSortDirection === 'asc' ? rootProps.slots.columnSortedAscendingIcon : rootProps.slots.columnSortedDescendingIcon;\n return Icon ? /*#__PURE__*/_jsx(Icon, _extends({}, other)) : null;\n});","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"native\"];\nimport * as React from 'react';\nimport MUIMenuItem from '@mui/material/MenuItem';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default function MUISelectOption(_ref) {\n let {\n native\n } = _ref,\n props = _objectWithoutPropertiesLoose(_ref, _excluded);\n if (native) {\n return /*#__PURE__*/_jsx(\"option\", _extends({}, props));\n }\n return /*#__PURE__*/_jsx(MUIMenuItem, _extends({}, props));\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport MUICheckbox from '@mui/material/Checkbox';\nimport MUITextField from '@mui/material/TextField';\nimport MUIFormControl from '@mui/material/FormControl';\nimport MUISelect from '@mui/material/Select';\nimport MUIButton from '@mui/material/Button';\nimport MUIIconButton from '@mui/material/IconButton';\nimport MUIInputAdornment from '@mui/material/InputAdornment';\nimport MUITooltip from '@mui/material/Tooltip';\nimport MUIPopper from '@mui/material/Popper';\nimport MUIInputLabel from '@mui/material/InputLabel';\nimport MUIChip from '@mui/material/Chip';\nimport { GridColumnUnsortedIcon } from \"./icons/GridColumnUnsortedIcon.js\";\nimport { GridAddIcon, GridArrowDownwardIcon, GridArrowUpwardIcon, GridCheckIcon, GridCloseIcon, GridColumnIcon, GridDragIcon, GridExpandMoreIcon, GridFilterAltIcon, GridFilterListIcon, GridKeyboardArrowRight, GridMoreVertIcon, GridRemoveIcon, GridSaveAltIcon, GridSearchIcon, GridSeparatorIcon, GridTableRowsIcon, GridTripleDotsVerticalIcon, GridViewHeadlineIcon, GridViewStreamIcon, GridVisibilityOffIcon, GridViewColumnIcon, GridClearIcon, GridLoadIcon, GridDeleteForeverIcon } from \"./icons/index.js\";\nimport MUISelectOption from \"./components/MUISelectOption.js\";\nconst iconSlots = {\n booleanCellTrueIcon: GridCheckIcon,\n booleanCellFalseIcon: GridCloseIcon,\n columnMenuIcon: GridTripleDotsVerticalIcon,\n openFilterButtonIcon: GridFilterListIcon,\n filterPanelDeleteIcon: GridCloseIcon,\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: GridSaveAltIcon,\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: GridCloseIcon,\n columnMenuHideIcon: GridVisibilityOffIcon,\n columnMenuSortAscendingIcon: GridArrowUpwardIcon,\n columnMenuSortDescendingIcon: GridArrowDownwardIcon,\n columnMenuFilterIcon: GridFilterAltIcon,\n columnMenuManageColumnsIcon: GridViewColumnIcon,\n columnMenuClearIcon: GridClearIcon,\n loadIcon: GridLoadIcon,\n filterPanelAddIcon: GridAddIcon,\n filterPanelRemoveAllIcon: GridDeleteForeverIcon,\n columnReorderIcon: GridDragIcon\n};\nconst materialSlots = _extends({}, iconSlots, {\n baseCheckbox: MUICheckbox,\n baseTextField: MUITextField,\n baseFormControl: MUIFormControl,\n baseSelect: MUISelect,\n baseButton: MUIButton,\n baseIconButton: MUIIconButton,\n baseInputAdornment: MUIInputAdornment,\n baseTooltip: MUITooltip,\n basePopper: MUIPopper,\n baseInputLabel: MUIInputLabel,\n baseSelectOption: MUISelectOption,\n baseChip: MUIChip\n});\nexport default materialSlots;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport { GridSkeletonCell, GridColumnsPanel, GridFilterPanel, GridFooter, GridLoadingOverlay, GridNoRowsOverlay, GridPagination, GridPanel, GridRow, GridColumnHeaderFilterIconButton, GridRowCount, GridColumnsManagement, GridColumnHeaderSortIcon } from \"../components/index.js\";\nimport { GridCell } from \"../components/cell/GridCell.js\";\nimport { GridColumnHeaders } from \"../components/GridColumnHeaders.js\";\nimport { GridColumnMenu } from \"../components/menu/columnMenu/GridColumnMenu.js\";\nimport { GridDetailPanels } from \"../components/GridDetailPanels.js\";\nimport { GridPinnedRows } from \"../components/GridPinnedRows.js\";\nimport { GridNoResultsOverlay } from \"../components/GridNoResultsOverlay.js\";\nimport materialSlots from \"../material/index.js\";\n\n// TODO: camelCase these key. It's a private helper now.\n// Remove then need to call `uncapitalizeObjectKeys`.\nexport const DATA_GRID_DEFAULT_SLOTS_COMPONENTS = _extends({}, materialSlots, {\n cell: GridCell,\n skeletonCell: GridSkeletonCell,\n columnHeaderFilterIconButton: GridColumnHeaderFilterIconButton,\n columnHeaderSortIcon: GridColumnHeaderSortIcon,\n columnMenu: GridColumnMenu,\n columnHeaders: GridColumnHeaders,\n detailPanels: GridDetailPanels,\n footer: GridFooter,\n footerRowCount: GridRowCount,\n toolbar: null,\n pinnedRows: GridPinnedRows,\n loadingOverlay: GridLoadingOverlay,\n noResultsOverlay: GridNoResultsOverlay,\n noRowsOverlay: GridNoRowsOverlay,\n pagination: GridPagination,\n filterPanel: GridFilterPanel,\n columnsPanel: GridColumnsPanel,\n columnsManagement: GridColumnsManagement,\n panel: GridPanel,\n row: GridRow\n});","// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport function GridDetailPanels(_) {\n return null;\n}","// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport function GridPinnedRows(_) {\n return null;\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport { useThemeProps } from '@mui/material/styles';\nimport { GRID_DEFAULT_LOCALE_TEXT } from \"../constants/index.js\";\nimport { DATA_GRID_DEFAULT_SLOTS_COMPONENTS } from \"../constants/defaultGridSlotsComponents.js\";\nimport { GridEditModes } from \"../models/index.js\";\nimport { computeSlots, useProps } from \"../internals/utils/index.js\";\nconst DATA_GRID_FORCED_PROPS = {\n disableMultipleColumnsFiltering: true,\n disableMultipleColumnsSorting: true,\n throttleRowsMs: undefined,\n hideFooterRowCount: false,\n pagination: true,\n checkboxSelectionVisibleOnly: false,\n disableColumnReorder: true,\n keepColumnPositionIfDraggedOutside: false,\n signature: 'DataGrid'\n};\n\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 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 disableRowSelectionOnClick: 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 // TODO v8: Update to 'select'\n indeterminateCheckboxAction: 'deselect',\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 rowPositionsDebounceMs: 166,\n rows: [],\n rowSelection: true,\n rowSpacingType: 'margin',\n showCellVerticalBorder: false,\n showColumnVerticalBorder: false,\n sortingMode: 'client',\n sortingOrder: ['asc', 'desc', null],\n throttleRowsMs: 0,\n unstable_rowSpanning: false\n};\nconst defaultSlots = DATA_GRID_DEFAULT_SLOTS_COMPONENTS;\nexport const useDataGridProps = inProps => {\n const themedProps = useProps(\n // eslint-disable-next-line material-ui/mui-name-matches-component-name\n useThemeProps({\n props: inProps,\n name: 'MuiDataGrid'\n }));\n const localeText = React.useMemo(() => _extends({}, GRID_DEFAULT_LOCALE_TEXT, themedProps.localeText), [themedProps.localeText]);\n const slots = React.useMemo(() => computeSlots({\n defaultSlots,\n slots: themedProps.slots\n }), [themedProps.slots]);\n const injectDefaultProps = React.useMemo(() => {\n return Object.keys(DATA_GRID_PROPS_DEFAULT_VALUES).reduce((acc, key) => {\n // @ts-ignore\n acc[key] = themedProps[key] ?? DATA_GRID_PROPS_DEFAULT_VALUES[key];\n return acc;\n }, {});\n }, [themedProps]);\n return React.useMemo(() => _extends({}, themedProps, injectDefaultProps, {\n localeText,\n slots\n }, DATA_GRID_FORCED_PROPS), [themedProps, localeText, slots, injectDefaultProps]);\n};","import * as React from 'react';\n\n/** Gathers props for the root element into a single `.forwardedProps` field */\nfunction groupForwardedProps(props) {\n const keys = Object.keys(props);\n if (!keys.some(key => key.startsWith('aria-') || key.startsWith('data-'))) {\n return props;\n }\n const newProps = {};\n const forwardedProps = props.forwardedProps ?? {};\n for (let i = 0; i < keys.length; i += 1) {\n const key = keys[i];\n if (key.startsWith('aria-') || key.startsWith('data-')) {\n forwardedProps[key] = props[key];\n } else {\n newProps[key] = props[key];\n }\n }\n newProps.forwardedProps = forwardedProps;\n return newProps;\n}\nexport function useProps(allProps) {\n return React.useMemo(() => groupForwardedProps(allProps), [allProps]);\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 _extends from \"@babel/runtime/helpers/esm/extends\";\nimport { GRID_STRING_COL_DEF } from \"./gridStringColDef.js\";\nimport { renderActionsCell } from \"../components/cell/GridActionsCell.js\";\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 width: 100,\n display: 'flex',\n align: 'center',\n headerAlign: 'center',\n headerName: '',\n disableColumnMenu: true,\n disableExport: true,\n renderCell: renderActionsCell,\n getApplyQuickFilterFn: undefined\n});","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport { GRID_STRING_COL_DEF } from \"./gridStringColDef.js\";\nimport { renderBooleanCell } from \"../components/cell/GridBooleanCell.js\";\nimport { renderEditBooleanCell } from \"../components/cell/GridEditBooleanCell.js\";\nimport { gridNumberComparator } from \"../hooks/features/sorting/gridSortingUtils.js\";\nimport { getGridBooleanOperators } from \"./gridBooleanOperators.js\";\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: undefined,\n // @ts-ignore\n aggregable: false,\n // @ts-ignore\n pastedValueParser: value => stringToBoolean(value)\n});","import { GridFilterInputBoolean } from \"../components/panel/filterPanel/GridFilterInputBoolean.js\";\nexport const getGridBooleanOperators = () => [{\n value: 'is',\n getApplyFilterFn: filterItem => {\n if (!filterItem.value) {\n return null;\n }\n const valueAsBoolean = String(filterItem.value) === 'true';\n return value => {\n return Boolean(value) === valueAsBoolean;\n };\n },\n InputComponent: GridFilterInputBoolean\n}];","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport { GridCellCheckboxRenderer } from \"../components/columnSelection/GridCellCheckboxRenderer.js\";\nimport { GridHeaderCheckbox } from \"../components/columnSelection/GridHeaderCheckbox.js\";\nimport { selectedIdsLookupSelector } from \"../hooks/features/rowSelection/gridRowSelectionSelector.js\";\nimport { GRID_BOOLEAN_COL_DEF } from \"./gridBooleanColDef.js\";\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 disableColumnMenu: true,\n disableReorder: true,\n disableExport: true,\n getApplyQuickFilterFn: undefined,\n display: 'flex',\n valueGetter: (value, row, column, apiRef) => {\n const selectionLookup = selectedIdsLookupSelector(apiRef);\n const rowId = apiRef.current.getRowId(row);\n return selectionLookup[rowId] !== undefined;\n },\n renderHeader: params => /*#__PURE__*/_jsx(GridHeaderCheckbox, _extends({}, params)),\n renderCell: params => /*#__PURE__*/_jsx(GridCellCheckboxRenderer, _extends({}, params))\n});","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport { gridDateComparator } from \"../hooks/features/sorting/gridSortingUtils.js\";\nimport { getGridDateOperators } from \"./gridDateOperators.js\";\nimport { GRID_STRING_COL_DEF } from \"./gridStringColDef.js\";\nimport { renderEditDateCell } from \"../components/cell/GridEditDateCell.js\";\nfunction throwIfNotDateObject({\n value,\n columnType,\n rowId,\n field\n}) {\n if (!(value instanceof Date)) {\n throw new Error([`MUI X: \\`${columnType}\\` column type only accepts \\`Date\\` objects as values.`, 'Use `valueGetter` to transform the value into a `Date` object.', `Row ID: ${rowId}, field: \"${field}\".`].join('\\n'));\n }\n}\nexport const gridDateFormatter = (value, row, column, apiRef) => {\n if (!value) {\n return '';\n }\n const rowId = apiRef.current.getRowId(row);\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 = apiRef.current.getRowId(row);\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 { GridFilterInputDate } from \"../components/panel/filterPanel/GridFilterInputDate.js\";\nfunction buildApplyFilterFn(filterItem, compareFn, showTime, keepHours) {\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 (keepHours) {\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);\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);\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, !showTime);\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);\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}];","import { GRID_STRING_COL_DEF } from \"./gridStringColDef.js\";\nimport { GRID_NUMERIC_COL_DEF } from \"./gridNumericColDef.js\";\nimport { GRID_DATE_COL_DEF, GRID_DATETIME_COL_DEF } from \"./gridDateColDef.js\";\nimport { GRID_BOOLEAN_COL_DEF } from \"./gridBooleanColDef.js\";\nimport { GRID_SINGLE_SELECT_COL_DEF } from \"./gridSingleSelectColDef.js\";\nimport { GRID_ACTIONS_COL_DEF, GRID_ACTIONS_COLUMN_TYPE } from \"./gridActionsColDef.js\";\nexport const DEFAULT_GRID_COL_TYPE_KEY = 'string';\nexport const getGridDefaultColumnTypes = () => {\n const nativeColumnTypes = {\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 };\n return nativeColumnTypes;\n};","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport { gridNumberComparator } from \"../hooks/features/sorting/gridSortingUtils.js\";\nimport { isNumber } from \"../utils/utils.js\";\nimport { getGridNumericOperators, getGridNumericQuickFilterFn } from \"./gridNumericOperators.js\";\nimport { GRID_STRING_COL_DEF } from \"./gridStringColDef.js\";\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 { GridFilterInputValue } from \"../components/panel/filterPanel/GridFilterInputValue.js\";\nimport { GridFilterInputMultipleValue } from \"../components/panel/filterPanel/GridFilterInputMultipleValue.js\";\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 { GRID_STRING_COL_DEF } from \"./gridStringColDef.js\";\nimport { renderEditSingleSelectCell } from \"../components/cell/GridEditSingleSelectCell.js\";\nimport { getGridSingleSelectOperators } from \"./gridSingleSelectOperators.js\";\nimport { getValueOptions, isSingleSelectColDef } from \"../components/panel/filterPanel/filterPanelUtils.js\";\nimport { isObject } from \"../utils/utils.js\";\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 { id, field, value, api } = params;\n const rowId = apiRef.current.getRowId(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});","import { GridFilterInputSingleSelect } from \"../components/panel/filterPanel/GridFilterInputSingleSelect.js\";\nimport { GridFilterInputMultipleSingleSelect } from \"../components/panel/filterPanel/GridFilterInputMultipleSingleSelect.js\";\nimport { isObject } from \"../utils/utils.js\";\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 { renderEditInputCell } from \"../components/cell/GridEditInputCell.js\";\nimport { gridStringOrNumberComparator } from \"../hooks/features/sorting/gridSortingUtils.js\";\nimport { getGridStringOperators, getGridStringQuickFilterFn } from \"./gridStringOperators.js\";\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 editable: false,\n sortComparator: gridStringOrNumberComparator,\n type: 'string',\n align: 'left',\n filterOperators: getGridStringOperators(),\n renderEditCell: renderEditInputCell,\n getApplyQuickFilterFn: getGridStringQuickFilterFn\n};","import { GridFilterInputValue } from \"../components/panel/filterPanel/GridFilterInputValue.js\";\nimport { escapeRegExp } from \"../utils/utils.js\";\nimport { GridFilterInputMultipleValue } from \"../components/panel/filterPanel/GridFilterInputMultipleValue.js\";\nimport { removeDiacritics } from \"../hooks/features/filter/gridFilterUtils.js\";\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 _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport { unstable_useId as useId, unstable_composeClasses as composeClasses } from '@mui/utils';\nimport { getDataGridUtilityClass } from \"../../constants/gridClasses.js\";\nimport { useGridRootProps } from \"../../hooks/utils/useGridRootProps.js\";\nimport { gridColumnGroupsLookupSelector } from \"../../hooks/features/columnGrouping/gridColumnGroupsSelector.js\";\nimport { useGridApiContext } from \"../../hooks/utils/useGridApiContext.js\";\nimport { useGridSelector } from \"../../hooks/utils/useGridSelector.js\";\nimport { GridGenericColumnHeaderItem } from \"./GridGenericColumnHeaderItem.js\";\nimport { isEventTargetInPortal } from \"../../utils/domUtils.js\";\nimport { shouldCellShowLeftBorder, shouldCellShowRightBorder } from \"../../utils/cellBorderUtils.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n headerAlign,\n isDragging,\n isLastColumn,\n showLeftBorder,\n showRightBorder,\n groupId,\n pinnedPosition\n } = ownerState;\n const slots = {\n root: ['columnHeader', headerAlign === 'left' && 'columnHeader--alignLeft', headerAlign === 'center' && 'columnHeader--alignCenter', headerAlign === 'right' && 'columnHeader--alignRight', isDragging && 'columnHeader--moving', showRightBorder && 'columnHeader--withRightBorder', showLeftBorder && 'columnHeader--withLeftBorder', 'withBorderColor', groupId === null ? 'columnHeader--emptyGroup' : 'columnHeader--filledGroup', pinnedPosition === 'left' && 'columnHeader--pinnedLeft', pinnedPosition === 'right' && 'columnHeader--pinnedRight', isLastColumn && 'columnHeader--last'],\n draggableContainer: ['columnHeaderDraggableContainer'],\n titleContainer: ['columnHeaderTitleContainer', 'withBorderColor'],\n titleContainerContent: ['columnHeaderTitleContainerContent']\n };\n return composeClasses(slots, getDataGridUtilityClass, classes);\n};\nfunction GridColumnGroupHeader(props) {\n const {\n groupId,\n width,\n depth,\n maxDepth,\n fields,\n height,\n colIndex,\n hasFocus,\n tabIndex,\n isLastColumn,\n pinnedPosition,\n style,\n indexInSection,\n sectionLength,\n gridHasFiller\n } = props;\n const rootProps = useGridRootProps();\n const headerCellRef = React.useRef(null);\n const apiRef = useGridApiContext();\n const columnGroupsLookup = useGridSelector(apiRef, gridColumnGroupsLookupSelector);\n const group = groupId ? columnGroupsLookup[groupId] : {};\n const {\n headerName = groupId ?? '',\n description = '',\n headerAlign = undefined\n } = group;\n let headerComponent;\n const render = groupId && columnGroupsLookup[groupId]?.renderHeaderGroup;\n const renderParams = React.useMemo(() => ({\n groupId,\n headerName,\n description,\n depth,\n maxDepth,\n fields,\n colIndex,\n isLastColumn\n }), [groupId, headerName, description, depth, maxDepth, fields, colIndex, isLastColumn]);\n if (groupId && render) {\n headerComponent = render(renderParams);\n }\n const showLeftBorder = shouldCellShowLeftBorder(pinnedPosition, indexInSection);\n const showRightBorder = shouldCellShowRightBorder(pinnedPosition, indexInSection, sectionLength, rootProps.showColumnVerticalBorder, gridHasFiller);\n const ownerState = _extends({}, props, {\n classes: rootProps.classes,\n showLeftBorder,\n showRightBorder,\n headerAlign,\n depth,\n isDragging: false\n });\n const label = headerName ?? groupId;\n const id = useId();\n const elementId = groupId === null ? `empty-group-cell-${id}` : groupId;\n const classes = useUtilityClasses(ownerState);\n React.useLayoutEffect(() => {\n if (hasFocus) {\n const focusableElement = headerCellRef.current.querySelector('[tabindex=\"0\"]');\n const elementToFocus = focusableElement || headerCellRef.current;\n elementToFocus?.focus();\n }\n }, [apiRef, hasFocus]);\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, renderParams, event);\n },\n // For now this is stupid, because renderParams change all the time.\n // Need to move it's computation in the api, such that for a given depth+columnField, I can get the group parameters\n [apiRef, renderParams]);\n const mouseEventsHandlers = React.useMemo(() => ({\n onKeyDown: publish('columnGroupHeaderKeyDown'),\n onFocus: publish('columnGroupHeaderFocus'),\n onBlur: publish('columnGroupHeaderBlur')\n }), [publish]);\n const headerClassName = typeof group.headerClassName === 'function' ? group.headerClassName(renderParams) : group.headerClassName;\n return /*#__PURE__*/_jsx(GridGenericColumnHeaderItem, _extends({\n ref: headerCellRef,\n classes: classes,\n columnMenuOpen: false,\n colIndex: colIndex,\n height: height,\n isResizing: false,\n sortDirection: null,\n hasFocus: false,\n tabIndex: tabIndex,\n isDraggable: false,\n headerComponent: headerComponent,\n headerClassName: headerClassName,\n description: description,\n elementId: elementId,\n width: width,\n columnMenuIconButton: null,\n columnTitleIconButtons: null,\n resizable: false,\n label: label,\n \"aria-colspan\": fields.length\n // The fields are wrapped between |-...-| to avoid confusion between fields \"id\" and \"id2\" when using selector data-fields~=\n ,\n \"data-fields\": `|-${fields.join('-|-')}-|`,\n style: style\n }, mouseEventsHandlers));\n}\nexport { GridColumnGroupHeader };","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport clsx from 'clsx';\nimport { styled } from '@mui/material/styles';\nimport { useRtl } from '@mui/system/RtlProvider';\nimport { useGridSelector } from \"../../utils/index.js\";\nimport { useGridRootProps } from \"../../utils/useGridRootProps.js\";\nimport { useGridPrivateApiContext } from \"../../utils/useGridPrivateApiContext.js\";\nimport { useGridApiEventHandler } from \"../../utils/useGridApiEventHandler.js\";\nimport { GridColumnHeaderItem } from \"../../../components/columnHeaders/GridColumnHeaderItem.js\";\nimport { gridDimensionsSelector } from \"../dimensions/index.js\";\nimport { gridRenderContextColumnsSelector, gridVirtualizationColumnEnabledSelector } from \"../virtualization/index.js\";\nimport { computeOffsetLeft } from \"../virtualization/useGridVirtualScroller.js\";\nimport { GridColumnGroupHeader } from \"../../../components/columnHeaders/GridColumnGroupHeader.js\";\nimport { GridPinnedColumnPosition, gridColumnPositionsSelector, gridVisiblePinnedColumnDefinitionsSelector, gridColumnLookupSelector } from \"../columns/index.js\";\nimport { gridColumnGroupsUnwrappedModelSelector } from \"../columnGrouping/gridColumnGroupsSelector.js\";\nimport { GridScrollbarFillerCell as ScrollbarFiller } from \"../../../components/GridScrollbarFillerCell.js\";\nimport { getPinnedCellOffset } from \"../../../internals/utils/getPinnedCellOffset.js\";\nimport { GridColumnHeaderSeparatorSides } from \"../../../components/columnHeaders/GridColumnHeaderSeparator.js\";\nimport { gridClasses } from \"../../../constants/gridClasses.js\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nexport const GridColumnHeaderRow = styled('div', {\n name: 'MuiDataGrid',\n slot: 'ColumnHeaderRow',\n overridesResolver: (_, styles) => styles.columnHeaderRow\n})({\n display: 'flex'\n});\nexport const useGridColumnHeaders = props => {\n const {\n visibleColumns,\n sortColumnLookup,\n filterColumnLookup,\n columnHeaderTabIndexState,\n columnGroupHeaderTabIndexState,\n columnHeaderFocus,\n columnGroupHeaderFocus,\n headerGroupingMaxDepth,\n columnMenuState,\n columnVisibility,\n columnGroupsHeaderStructure,\n hasOtherElementInTabSequence\n } = props;\n const [dragCol, setDragCol] = React.useState('');\n const [resizeCol, setResizeCol] = React.useState('');\n const apiRef = useGridPrivateApiContext();\n const isRtl = useRtl();\n const rootProps = useGridRootProps();\n const dimensions = useGridSelector(apiRef, gridDimensionsSelector);\n const hasVirtualization = useGridSelector(apiRef, gridVirtualizationColumnEnabledSelector);\n const columnGroupsModel = useGridSelector(apiRef, gridColumnGroupsUnwrappedModelSelector);\n const columnPositions = useGridSelector(apiRef, gridColumnPositionsSelector);\n const renderContext = useGridSelector(apiRef, gridRenderContextColumnsSelector);\n const pinnedColumns = useGridSelector(apiRef, gridVisiblePinnedColumnDefinitionsSelector);\n const columnsLookup = useGridSelector(apiRef, gridColumnLookupSelector);\n const offsetLeft = computeOffsetLeft(columnPositions, renderContext, pinnedColumns.left.length);\n const gridHasFiller = dimensions.columnsTotalWidth < dimensions.viewportOuterSize.width;\n React.useEffect(() => {\n apiRef.current.columnHeadersContainerRef.current.scrollLeft = 0;\n }, [apiRef]);\n const handleColumnResizeStart = React.useCallback(params => setResizeCol(params.field), []);\n const handleColumnResizeStop = React.useCallback(() => setResizeCol(''), []);\n const handleColumnReorderStart = React.useCallback(params => setDragCol(params.field), []);\n const handleColumnReorderStop = React.useCallback(() => setDragCol(''), []);\n const leftRenderContext = React.useMemo(() => {\n return pinnedColumns.left.length ? {\n firstColumnIndex: 0,\n lastColumnIndex: pinnedColumns.left.length\n } : null;\n }, [pinnedColumns.left.length]);\n const rightRenderContext = React.useMemo(() => {\n return pinnedColumns.right.length ? {\n firstColumnIndex: visibleColumns.length - pinnedColumns.right.length,\n lastColumnIndex: visibleColumns.length\n } : null;\n }, [pinnedColumns.right.length, visibleColumns.length]);\n useGridApiEventHandler(apiRef, 'columnResizeStart', handleColumnResizeStart);\n useGridApiEventHandler(apiRef, 'columnResizeStop', handleColumnResizeStop);\n useGridApiEventHandler(apiRef, 'columnHeaderDragStart', handleColumnReorderStart);\n useGridApiEventHandler(apiRef, 'columnHeaderDragEnd', handleColumnReorderStop);\n\n // Helper for computation common between getColumnHeaders and getColumnGroupHeaders\n const getColumnsToRender = params => {\n const {\n renderContext: currentContext = renderContext,\n maxLastColumn = visibleColumns.length\n } = params || {};\n const firstColumnToRender = currentContext.firstColumnIndex;\n const lastColumnToRender = !hasVirtualization ? maxLastColumn : currentContext.lastColumnIndex;\n const renderedColumns = visibleColumns.slice(firstColumnToRender, lastColumnToRender);\n return {\n renderedColumns,\n firstColumnToRender,\n lastColumnToRender\n };\n };\n const getFillers = (params, children, leftOverflow, borderBottom = false) => {\n const isPinnedRight = params?.position === GridPinnedColumnPosition.RIGHT;\n const isNotPinned = params?.position === undefined;\n const hasScrollbarFiller = pinnedColumns.right.length > 0 && isPinnedRight || pinnedColumns.right.length === 0 && isNotPinned;\n const leftOffsetWidth = offsetLeft - leftOverflow;\n return /*#__PURE__*/_jsxs(React.Fragment, {\n children: [isNotPinned && /*#__PURE__*/_jsx(\"div\", {\n role: \"presentation\",\n style: {\n width: leftOffsetWidth\n }\n }), children, isNotPinned && /*#__PURE__*/_jsx(\"div\", {\n role: \"presentation\",\n className: clsx(gridClasses.filler, borderBottom && gridClasses['filler--borderBottom'])\n }), hasScrollbarFiller && /*#__PURE__*/_jsx(ScrollbarFiller, {\n header: true,\n pinnedRight: isPinnedRight,\n borderBottom: borderBottom,\n borderTop: false\n })]\n });\n };\n const getCellOffsetStyle = ({\n pinnedPosition,\n columnIndex,\n computedWidth\n }) => {\n let style;\n const isLeftPinned = pinnedPosition === GridPinnedColumnPosition.LEFT;\n const isRightPinned = pinnedPosition === GridPinnedColumnPosition.RIGHT;\n if (isLeftPinned || isRightPinned) {\n const pinnedOffset = getPinnedCellOffset(pinnedPosition, computedWidth, columnIndex, columnPositions, dimensions);\n let side = isLeftPinned ? 'left' : 'right';\n if (isRtl) {\n side = isLeftPinned ? 'right' : 'left';\n }\n if (pinnedPosition === 'left') {\n style = {\n [side]: pinnedOffset\n };\n }\n if (pinnedPosition === 'right') {\n style = {\n [side]: pinnedOffset\n };\n }\n }\n return style;\n };\n const getColumnHeaders = (params, other = {}) => {\n const {\n renderedColumns,\n firstColumnToRender\n } = getColumnsToRender(params);\n const columns = [];\n for (let i = 0; i < renderedColumns.length; i += 1) {\n const colDef = renderedColumns[i];\n const columnIndex = firstColumnToRender + i;\n const isFirstColumn = columnIndex === 0;\n const tabIndex = columnHeaderTabIndexState !== null && columnHeaderTabIndexState.field === colDef.field || isFirstColumn && !hasOtherElementInTabSequence ? 0 : -1;\n const hasFocus = columnHeaderFocus !== null && columnHeaderFocus.field === colDef.field;\n const open = columnMenuState.open && columnMenuState.field === colDef.field;\n const pinnedPosition = params?.position;\n const style = getCellOffsetStyle({\n pinnedPosition,\n columnIndex,\n computedWidth: colDef.computedWidth\n });\n const siblingWithBorderingSeparator = pinnedPosition === GridPinnedColumnPosition.RIGHT ? renderedColumns[i - 1] : renderedColumns[i + 1];\n const isSiblingFocused = siblingWithBorderingSeparator ? columnHeaderFocus !== null && columnHeaderFocus.field === siblingWithBorderingSeparator.field : false;\n const isLastUnpinned = columnIndex + 1 === columnPositions.length - pinnedColumns.right.length;\n columns.push(/*#__PURE__*/_jsx(GridColumnHeaderItem, _extends({}, sortColumnLookup[colDef.field], {\n columnMenuOpen: open,\n filterItemsCounter: filterColumnLookup[colDef.field] && filterColumnLookup[colDef.field].length,\n headerHeight: dimensions.headerHeight,\n isDragging: colDef.field === dragCol,\n colDef: colDef,\n colIndex: columnIndex,\n isResizing: resizeCol === colDef.field,\n isLast: columnIndex === columnPositions.length - 1,\n hasFocus: hasFocus,\n tabIndex: tabIndex,\n pinnedPosition: pinnedPosition,\n style: style,\n indexInSection: i,\n sectionLength: renderedColumns.length,\n gridHasFiller: gridHasFiller,\n isLastUnpinned: isLastUnpinned,\n isSiblingFocused: isSiblingFocused\n }, other), colDef.field));\n }\n return getFillers(params, columns, 0);\n };\n const getColumnHeadersRow = () => {\n return /*#__PURE__*/_jsxs(GridColumnHeaderRow, {\n role: \"row\",\n \"aria-rowindex\": headerGroupingMaxDepth + 1,\n ownerState: rootProps,\n className: gridClasses['row--borderBottom'],\n children: [leftRenderContext && getColumnHeaders({\n position: GridPinnedColumnPosition.LEFT,\n renderContext: leftRenderContext,\n maxLastColumn: leftRenderContext.lastColumnIndex\n }, {\n disableReorder: true\n }), getColumnHeaders({\n renderContext,\n maxLastColumn: visibleColumns.length - pinnedColumns.right.length\n }), rightRenderContext && getColumnHeaders({\n position: GridPinnedColumnPosition.RIGHT,\n renderContext: rightRenderContext,\n maxLastColumn: rightRenderContext.lastColumnIndex\n }, {\n disableReorder: true,\n separatorSide: GridColumnHeaderSeparatorSides.Left\n })]\n });\n };\n const getColumnGroupHeaders = ({\n depth,\n params\n }) => {\n const columnsToRender = getColumnsToRender(params);\n if (columnsToRender.renderedColumns.length === 0) {\n return null;\n }\n const {\n renderedColumns,\n firstColumnToRender,\n lastColumnToRender\n } = columnsToRender;\n const rowStructure = columnGroupsHeaderStructure[depth];\n const firstColumnFieldToRender = visibleColumns[firstColumnToRender].field;\n const firstGroupToRender = columnGroupsModel[firstColumnFieldToRender]?.[depth] ?? null;\n const firstGroupIndex = rowStructure.findIndex(({\n groupId,\n columnFields\n }) => groupId === firstGroupToRender && columnFields.includes(firstColumnFieldToRender));\n const lastColumnFieldToRender = visibleColumns[lastColumnToRender - 1].field;\n const lastGroupToRender = columnGroupsModel[lastColumnFieldToRender]?.[depth] ?? null;\n const lastGroupIndex = rowStructure.findIndex(({\n groupId,\n columnFields\n }) => groupId === lastGroupToRender && columnFields.includes(lastColumnFieldToRender));\n const visibleColumnGroupHeader = rowStructure.slice(firstGroupIndex, lastGroupIndex + 1).map(groupStructure => {\n return _extends({}, groupStructure, {\n columnFields: groupStructure.columnFields.filter(field => columnVisibility[field] !== false)\n });\n }).filter(groupStructure => groupStructure.columnFields.length > 0);\n const firstVisibleColumnIndex = visibleColumnGroupHeader[0].columnFields.indexOf(firstColumnFieldToRender);\n const hiddenGroupColumns = visibleColumnGroupHeader[0].columnFields.slice(0, firstVisibleColumnIndex);\n const leftOverflow = hiddenGroupColumns.reduce((acc, field) => {\n const column = columnsLookup[field];\n return acc + (column.computedWidth ?? 0);\n }, 0);\n let columnIndex = firstColumnToRender;\n const children = visibleColumnGroupHeader.map(({\n groupId,\n columnFields\n }, index) => {\n const hasFocus = columnGroupHeaderFocus !== null && columnGroupHeaderFocus.depth === depth && columnFields.includes(columnGroupHeaderFocus.field);\n const tabIndex = columnGroupHeaderTabIndexState !== null && columnGroupHeaderTabIndexState.depth === depth && columnFields.includes(columnGroupHeaderTabIndexState.field) ? 0 : -1;\n const headerInfo = {\n groupId,\n width: columnFields.reduce((acc, field) => acc + columnsLookup[field].computedWidth, 0),\n fields: columnFields,\n colIndex: columnIndex,\n hasFocus,\n tabIndex\n };\n const pinnedPosition = params.position;\n const style = getCellOffsetStyle({\n pinnedPosition,\n columnIndex,\n computedWidth: headerInfo.width\n });\n columnIndex += columnFields.length;\n let indexInSection = index;\n if (pinnedPosition === 'left') {\n // Group headers can expand to multiple columns, we need to adjust the index\n indexInSection = columnIndex - 1;\n }\n return /*#__PURE__*/_jsx(GridColumnGroupHeader, {\n groupId: groupId,\n width: headerInfo.width,\n fields: headerInfo.fields,\n colIndex: headerInfo.colIndex,\n depth: depth,\n isLastColumn: headerInfo.colIndex === visibleColumns.length - headerInfo.fields.length,\n maxDepth: headerGroupingMaxDepth,\n height: dimensions.groupHeaderHeight,\n hasFocus: hasFocus,\n tabIndex: tabIndex,\n pinnedPosition: pinnedPosition,\n style: style,\n indexInSection: indexInSection,\n sectionLength: renderedColumns.length,\n gridHasFiller: gridHasFiller\n }, index);\n });\n return getFillers(params, children, leftOverflow);\n };\n const getColumnGroupHeadersRows = () => {\n if (headerGroupingMaxDepth === 0) {\n return null;\n }\n const headerRows = [];\n for (let depth = 0; depth < headerGroupingMaxDepth; depth += 1) {\n headerRows.push(/*#__PURE__*/_jsxs(GridColumnHeaderRow, {\n role: \"row\",\n \"aria-rowindex\": depth + 1,\n ownerState: rootProps,\n children: [leftRenderContext && getColumnGroupHeaders({\n depth,\n params: {\n position: GridPinnedColumnPosition.LEFT,\n renderContext: leftRenderContext,\n maxLastColumn: leftRenderContext.lastColumnIndex\n }\n }), getColumnGroupHeaders({\n depth,\n params: {\n renderContext\n }\n }), rightRenderContext && getColumnGroupHeaders({\n depth,\n params: {\n position: GridPinnedColumnPosition.RIGHT,\n renderContext: rightRenderContext,\n maxLastColumn: rightRenderContext.lastColumnIndex\n }\n })]\n }, depth));\n }\n return headerRows;\n };\n return {\n renderContext,\n leftRenderContext,\n rightRenderContext,\n pinnedColumns,\n visibleColumns,\n getCellOffsetStyle,\n getFillers,\n getColumnHeadersRow,\n getColumnsToRender,\n getColumnGroupHeadersRows,\n isDragging: !!dragCol,\n getInnerProps: () => ({\n role: 'rowgroup'\n })\n };\n};","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 clsx from 'clsx';\nimport composeClasses from '@mui/utils/composeClasses';\nimport { styled } from '@mui/system';\nimport { getDataGridUtilityClass } from \"../../constants/gridClasses.js\";\nimport { useGridRootProps } from \"../../hooks/utils/useGridRootProps.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n classes\n } = ownerState;\n const slots = {\n root: ['columnHeaders']\n };\n return composeClasses(slots, getDataGridUtilityClass, classes);\n};\nconst GridColumnHeadersRoot = styled('div', {\n name: 'MuiDataGrid',\n slot: 'ColumnHeaders',\n overridesResolver: (props, styles) => styles.columnHeaders\n})({\n display: 'flex',\n flexDirection: 'column',\n borderTopLeftRadius: 'var(--unstable_DataGrid-radius)',\n borderTopRightRadius: 'var(--unstable_DataGrid-radius)'\n});\nexport const GridBaseColumnHeaders = /*#__PURE__*/React.forwardRef(function GridColumnHeaders(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(GridColumnHeadersRoot, _extends({\n ref: ref,\n className: clsx(className, classes.root),\n ownerState: rootProps\n }, other, {\n role: \"presentation\"\n }));\n});","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"className\", \"visibleColumns\", \"sortColumnLookup\", \"filterColumnLookup\", \"columnHeaderTabIndexState\", \"columnGroupHeaderTabIndexState\", \"columnHeaderFocus\", \"columnGroupHeaderFocus\", \"headerGroupingMaxDepth\", \"columnMenuState\", \"columnVisibility\", \"columnGroupsHeaderStructure\", \"hasOtherElementInTabSequence\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { fastMemo } from '@mui/x-internals/fastMemo';\nimport { useGridColumnHeaders } from \"../hooks/features/columnHeaders/useGridColumnHeaders.js\";\nimport { GridBaseColumnHeaders } from \"./columnHeaders/GridBaseColumnHeaders.js\";\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\nconst GridColumnHeaders = /*#__PURE__*/React.forwardRef(function GridColumnHeaders(props, ref) {\n const {\n visibleColumns,\n sortColumnLookup,\n filterColumnLookup,\n columnHeaderTabIndexState,\n columnGroupHeaderTabIndexState,\n columnHeaderFocus,\n columnGroupHeaderFocus,\n headerGroupingMaxDepth,\n columnMenuState,\n columnVisibility,\n columnGroupsHeaderStructure,\n hasOtherElementInTabSequence\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const {\n getInnerProps,\n getColumnHeadersRow,\n getColumnGroupHeadersRows\n } = useGridColumnHeaders({\n visibleColumns,\n sortColumnLookup,\n filterColumnLookup,\n columnHeaderTabIndexState,\n columnGroupHeaderTabIndexState,\n columnHeaderFocus,\n columnGroupHeaderFocus,\n headerGroupingMaxDepth,\n columnMenuState,\n columnVisibility,\n columnGroupsHeaderStructure,\n hasOtherElementInTabSequence\n });\n return /*#__PURE__*/_jsxs(GridBaseColumnHeaders, _extends({\n ref: ref\n }, other, getInnerProps(), {\n children: [getColumnGroupHeadersRows(), getColumnHeadersRow()]\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? GridColumnHeaders.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 columnGroupHeaderFocus: PropTypes.shape({\n depth: PropTypes.number.isRequired,\n field: PropTypes.string.isRequired\n }),\n columnGroupHeaderTabIndexState: PropTypes.shape({\n depth: PropTypes.number.isRequired,\n field: PropTypes.string.isRequired\n }),\n columnGroupsHeaderStructure: PropTypes.arrayOf(PropTypes.arrayOf(PropTypes.shape({\n columnFields: PropTypes.arrayOf(PropTypes.string).isRequired,\n groupId: PropTypes.string\n }))).isRequired,\n columnHeaderFocus: PropTypes.shape({\n field: PropTypes.string.isRequired\n }),\n columnHeaderTabIndexState: PropTypes.shape({\n field: PropTypes.string.isRequired\n }),\n columnMenuState: PropTypes.shape({\n field: PropTypes.string,\n open: PropTypes.bool.isRequired\n }).isRequired,\n columnVisibility: PropTypes.object.isRequired,\n filterColumnLookup: PropTypes.object.isRequired,\n hasOtherElementInTabSequence: PropTypes.bool.isRequired,\n headerGroupingMaxDepth: PropTypes.number.isRequired,\n sortColumnLookup: PropTypes.object.isRequired,\n visibleColumns: PropTypes.arrayOf(PropTypes.object).isRequired\n} : void 0;\nconst MemoizedGridColumnHeaders = fastMemo(GridColumnHeaders);\nexport { MemoizedGridColumnHeaders as GridColumnHeaders };","import * as React from 'react';\nexport const GridConfigurationContext = /*#__PURE__*/React.createContext(undefined);\nif (process.env.NODE_ENV !== 'production') {\n GridConfigurationContext.displayName = 'GridConfigurationContext';\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { useGridSelector } from \"../hooks/utils/useGridSelector.js\";\nimport { gridTopLevelRowCountSelector } from \"../hooks/features/rows/gridRowsSelector.js\";\nimport { selectedGridRowsCountSelector } from \"../hooks/features/rowSelection/gridRowSelectionSelector.js\";\nimport { gridFilteredTopLevelRowCountSelector } from \"../hooks/features/filter/gridFilterSelector.js\";\nimport { useGridApiContext } from \"../hooks/utils/useGridApiContext.js\";\nimport { GridSelectedRowCount } from \"./GridSelectedRowCount.js\";\nimport { GridFooterContainer } from \"./containers/GridFooterContainer.js\";\nimport { useGridRootProps } from \"../hooks/utils/useGridRootProps.js\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst GridFooter = /*#__PURE__*/React.forwardRef(function GridFooter(props, ref) {\n const apiRef = useGridApiContext();\n const rootProps = useGridRootProps();\n const totalTopLevelRowCount = useGridSelector(apiRef, gridTopLevelRowCountSelector);\n const selectedRowCount = useGridSelector(apiRef, selectedGridRowsCountSelector);\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({\n ref: ref\n }, props, {\n children: [selectedRowCountElement, rowCountElement, paginationElement]\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? GridFooter.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 _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport { gridColumnDefinitionsSelector } from \"../../hooks/features/columns/gridColumnsSelector.js\";\nimport { useGridSelector } from \"../../hooks/utils/useGridSelector.js\";\nimport { gridPreferencePanelStateSelector } from \"../../hooks/features/preferencesPanel/gridPreferencePanelSelector.js\";\nimport { GridPreferencePanelsValue } from \"../../hooks/features/preferencesPanel/gridPreferencePanelsValue.js\";\nimport { useGridApiContext } from \"../../hooks/utils/useGridApiContext.js\";\nimport { useGridRootProps } from \"../../hooks/utils/useGridRootProps.js\";\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 panelContent = apiRef.current.unstable_applyPipeProcessors('preferencePanel', null, preferencePanelState.openedPanelValue ?? GridPreferencePanelsValue.filters);\n return /*#__PURE__*/_jsx(rootProps.slots.panel, _extends({\n as: rootProps.slots.basePopper,\n open: columns.length > 0 && preferencePanelState.open,\n id: preferencePanelState.panelId,\n \"aria-labelledby\": preferencePanelState.labelId\n }, rootProps.slotProps?.panel, rootProps.slotProps?.basePopper, {\n children: panelContent\n }));\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport { useGridRootProps } from \"../hooks/utils/useGridRootProps.js\";\nimport { GridPreferencesPanel } from \"./panel/GridPreferencesPanel.js\";\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.slots.toolbar && /*#__PURE__*/_jsx(rootProps.slots.toolbar, _extends({}, rootProps.slotProps?.toolbar))]\n });\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport clsx from 'clsx';\nimport { styled } from '@mui/system';\nimport useForkRef from '@mui/utils/useForkRef';\nimport composeClasses from '@mui/utils/composeClasses';\nimport { useGridApiContext } from \"../hooks/utils/useGridApiContext.js\";\nimport { useGridRootProps } from \"../hooks/utils/useGridRootProps.js\";\nimport { GridPinnedColumnPosition, gridColumnPositionsSelector, gridColumnsTotalWidthSelector, gridDimensionsSelector, gridVisibleColumnDefinitionsSelector, gridVisiblePinnedColumnDefinitionsSelector, useGridApiEventHandler, useGridSelector } from \"../hooks/index.js\";\nimport { getDataGridUtilityClass, gridClasses } from \"../constants/gridClasses.js\";\nimport { getPinnedCellOffset } from \"../internals/utils/getPinnedCellOffset.js\";\nimport { shouldCellShowLeftBorder, shouldCellShowRightBorder } from \"../utils/cellBorderUtils.js\";\nimport { escapeOperandAttributeSelector } from \"../utils/domUtils.js\";\nimport { GridScrollbarFillerCell } from \"./GridScrollbarFillerCell.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst SkeletonOverlay = styled('div', {\n name: 'MuiDataGrid',\n slot: 'SkeletonLoadingOverlay',\n overridesResolver: (props, styles) => styles.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);\nconst GridSkeletonLoadingOverlay = /*#__PURE__*/React.forwardRef(function GridSkeletonLoadingOverlay(props, forwardedRef) {\n const rootProps = useGridRootProps();\n const {\n slots\n } = rootProps;\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 viewportHeight = dimensions?.viewportInnerSize.height ?? 0;\n const skeletonRowsCount = Math.ceil(viewportHeight / dimensions.rowHeight);\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 allVisibleColumns = useGridSelector(apiRef, gridVisibleColumnDefinitionsSelector);\n const columns = React.useMemo(() => allVisibleColumns.slice(0, inViewportCount), [allVisibleColumns, inViewportCount]);\n const pinnedColumns = useGridSelector(apiRef, gridVisiblePinnedColumnDefinitionsSelector);\n const getPinnedStyle = React.useCallback((computedWidth, index, position) => {\n const pinnedOffset = getPinnedCellOffset(position, computedWidth, index, positions, dimensions);\n return {\n [position]: pinnedOffset\n };\n }, [dimensions, positions]);\n const getPinnedPosition = React.useCallback(field => {\n if (pinnedColumns.left.findIndex(col => col.field === field) !== -1) {\n return GridPinnedColumnPosition.LEFT;\n }\n if (pinnedColumns.right.findIndex(col => col.field === field) !== -1) {\n return GridPinnedColumnPosition.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 === GridPinnedColumnPosition.LEFT;\n const isPinnedRight = pinnedPosition === GridPinnedColumnPosition.RIGHT;\n const sectionLength = pinnedPosition ? pinnedColumns[pinnedPosition].length // pinned section\n : columns.length - pinnedColumns.left.length - pinnedColumns.right.length; // middle section\n const sectionIndex = pinnedPosition ? pinnedColumns[pinnedPosition].findIndex(col => col.field === column.field) // pinned section\n : colIndex - pinnedColumns.left.length; // middle section\n const pinnedStyle = pinnedPosition && getPinnedStyle(column.computedWidth, colIndex, pinnedPosition);\n const gridHasFiller = dimensions.columnsTotalWidth < dimensions.viewportOuterSize.width;\n const showRightBorder = shouldCellShowRightBorder(pinnedPosition, sectionIndex, sectionLength, rootProps.showCellVerticalBorder, gridHasFiller);\n const showLeftBorder = shouldCellShowLeftBorder(pinnedPosition, sectionIndex);\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 const scrollbarWidth = dimensions.hasScrollY ? dimensions.scrollbarSize : 0;\n const hasScrollbarFiller = isLastColumn && scrollbarWidth !== 0;\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 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 if (hasScrollbarFiller) {\n rowCells.push(/*#__PURE__*/_jsx(GridScrollbarFillerCell, {\n pinnedRight: pinnedColumns.right.length > 0\n }, `skeleton-scrollbar-filler-${i}`));\n }\n }\n array.push(/*#__PURE__*/_jsx(\"div\", {\n className: clsx(gridClasses.row, gridClasses.rowSkeleton, i === 0 && gridClasses['row--firstVisible']),\n children: rowCells\n }, `skeleton-row-${i}`));\n }\n return array;\n }, [slots, columns, pinnedColumns, skeletonRowsCount, rootProps.showCellVerticalBorder, dimensions.columnsTotalWidth, dimensions.viewportOuterSize.width, dimensions.rowHeight, dimensions.hasScrollY, dimensions.scrollbarSize, getPinnedPosition, getPinnedStyle]);\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('MUI X: Expected skeleton cells to be defined with `data-field` attribute.');\n }\n const resizedColIndex = columns.findIndex(col => col.field === colDef.field);\n const pinnedPosition = getPinnedPosition(colDef.field);\n const isPinnedLeft = pinnedPosition === GridPinnedColumnPosition.LEFT;\n const isPinnedRight = pinnedPosition === GridPinnedColumnPosition.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 useGridApiEventHandler(apiRef, 'columnResize', handleColumnResize);\n return /*#__PURE__*/_jsx(SkeletonOverlay, _extends({\n className: classes.root,\n ref: handleRef\n }, props, {\n children: children\n }));\n});\nexport { GridSkeletonLoadingOverlay };","import _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 LinearProgress from '@mui/material/LinearProgress';\nimport CircularProgress from '@mui/material/CircularProgress';\nimport { GridOverlay } from \"./containers/GridOverlay.js\";\nimport { GridSkeletonLoadingOverlay } from \"./GridSkeletonLoadingOverlay.js\";\nimport { useGridApiContext } from \"../hooks/utils/useGridApiContext.js\";\nimport { gridRowCountSelector, useGridSelector } from \"../hooks/index.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst LOADING_VARIANTS = {\n 'circular-progress': {\n component: CircularProgress,\n style: {}\n },\n 'linear-progress': {\n component: LinearProgress,\n style: {\n display: 'block'\n }\n },\n skeleton: {\n component: GridSkeletonLoadingOverlay,\n style: {\n display: 'block'\n }\n }\n};\nconst GridLoadingOverlay = /*#__PURE__*/React.forwardRef(function GridLoadingOverlay(props, ref) {\n const {\n variant = 'circular-progress',\n noRowsVariant = 'circular-progress',\n style\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const apiRef = useGridApiContext();\n const rowsCount = useGridSelector(apiRef, gridRowCountSelector);\n const activeVariant = LOADING_VARIANTS[rowsCount === 0 ? noRowsVariant : variant];\n return /*#__PURE__*/_jsx(GridOverlay, _extends({\n ref: ref,\n style: _extends({}, activeVariant.style, style)\n }, other, {\n children: /*#__PURE__*/_jsx(activeVariant.component, {})\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? GridLoadingOverlay.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 'circular-progress'\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 'circular-progress'\n */\n variant: PropTypes.oneOf(['circular-progress', 'linear-progress', 'skeleton'])\n} : void 0;\nexport { GridLoadingOverlay };","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { useGridApiContext } from \"../hooks/utils/useGridApiContext.js\";\nimport { GridOverlay } from \"./containers/GridOverlay.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst GridNoRowsOverlay = /*#__PURE__*/React.forwardRef(function GridNoRowsOverlay(props, ref) {\n const apiRef = useGridApiContext();\n const noRowsLabel = apiRef.current.getLocaleText('noRowsLabel');\n return /*#__PURE__*/_jsx(GridOverlay, _extends({\n ref: ref\n }, props, {\n children: noRowsLabel\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? GridNoRowsOverlay.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 };","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport { styled } from '@mui/material/styles';\nimport PropTypes from 'prop-types';\nimport TablePagination, { tablePaginationClasses } from '@mui/material/TablePagination';\nimport { useGridSelector } from \"../hooks/utils/useGridSelector.js\";\nimport { useGridApiContext } from \"../hooks/utils/useGridApiContext.js\";\nimport { useGridRootProps } from \"../hooks/utils/useGridRootProps.js\";\nimport { gridPaginationModelSelector, gridPaginationRowCountSelector, gridPageCountSelector } from \"../hooks/features/pagination/gridPaginationSelector.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst GridPaginationRoot = styled(TablePagination)(({\n theme\n}) => ({\n maxHeight: 'calc(100% + 1px)',\n // border width\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 wrapLabelDisplayedRows = (labelDisplayedRows, estimated) => {\n return ({\n from,\n to,\n count,\n page\n }) => labelDisplayedRows({\n from,\n to,\n count,\n page,\n estimated\n });\n};\nconst defaultLabelDisplayedRows = ({\n from,\n to,\n count,\n estimated\n}) => {\n if (!estimated) {\n return `${from}–${to} of ${count !== -1 ? count : `more than ${to}`}`;\n }\n return `${from}–${to} of ${count !== -1 ? count : `more than ${estimated > to ? estimated : to}`}`;\n};\n\n// A mutable version of a readonly array.\n\nconst GridPagination = /*#__PURE__*/React.forwardRef(function GridPagination(props, ref) {\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 estimatedRowCount\n } = rootProps;\n const computedProps = React.useMemo(() => {\n if (rowCount === -1 && paginationMode === 'server' && loading) {\n return {\n backIconButtonProps: {\n disabled: true\n },\n nextIconButtonProps: {\n disabled: true\n }\n };\n }\n return {};\n }, [loading, paginationMode, rowCount]);\n const lastPage = React.useMemo(() => Math.max(0, pageCount - 1), [pageCount]);\n const computedPage = React.useMemo(() => {\n if (rowCount === -1) {\n return paginationModel.page;\n }\n return paginationModel.page <= lastPage ? paginationModel.page : lastPage;\n }, [lastPage, paginationModel.page, rowCount]);\n const handlePageSizeChange = React.useCallback(event => {\n const pageSize = Number(event.target.value);\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 const locales = apiRef.current.getLocaleText('MuiTablePagination');\n const wrappedLabelDisplayedRows = wrapLabelDisplayedRows(locales.labelDisplayedRows || defaultLabelDisplayedRows, estimatedRowCount);\n return /*#__PURE__*/_jsx(GridPaginationRoot, _extends({\n ref: ref,\n component: \"div\",\n count: rowCount,\n page: computedPage\n // TODO: Remove the cast once the type is fixed in Material UI and that the min Material UI version\n // for x-data-grid is past the fix.\n // Note that Material UI will not mutate the array, so this is safe.\n ,\n rowsPerPageOptions: pageSizeOptions,\n rowsPerPage: paginationModel.pageSize,\n onPageChange: handlePageChange,\n onRowsPerPageChange: handlePageSizeChange\n }, computedProps, locales, {\n labelDisplayedRows: wrappedLabelDisplayedRows\n }, props));\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 };","import _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\", \"offsetTop\", \"offsetLeft\", \"dimensions\", \"renderContext\", \"focusedColumnIndex\", \"isFirstVisible\", \"isLastVisible\", \"isNotVisible\", \"showBottomBorder\", \"focusedCell\", \"tabbableCell\", \"onClick\", \"onDoubleClick\", \"onMouseEnter\", \"onMouseLeave\", \"onMouseOut\", \"onMouseOver\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { unstable_useForkRef as useForkRef } from '@mui/utils';\nimport { fastMemo } from '@mui/x-internals/fastMemo';\nimport { GridEditModes, GridRowModes, GridCellModes } from \"../models/gridEditRowModel.js\";\nimport { useGridApiContext } from \"../hooks/utils/useGridApiContext.js\";\nimport { gridClasses } from \"../constants/gridClasses.js\";\nimport { composeGridClasses } from \"../utils/composeGridClasses.js\";\nimport { useGridRootProps } from \"../hooks/utils/useGridRootProps.js\";\nimport { gridColumnPositionsSelector } from \"../hooks/features/columns/gridColumnsSelector.js\";\nimport { useGridSelector, objectShallowCompare } from \"../hooks/utils/useGridSelector.js\";\nimport { useGridVisibleRows } from \"../hooks/utils/useGridVisibleRows.js\";\nimport { findParentElementFromClassName, isEventTargetInPortal } from \"../utils/domUtils.js\";\nimport { GRID_CHECKBOX_SELECTION_COL_DEF } from \"../colDef/gridCheckboxSelectionColDef.js\";\nimport { GRID_ACTIONS_COLUMN_TYPE } from \"../colDef/gridActionsColDef.js\";\nimport { GRID_DETAIL_PANEL_TOGGLE_FIELD } from \"../constants/gridDetailPanelToggleField.js\";\nimport { gridSortModelSelector } from \"../hooks/features/sorting/gridSortingSelector.js\";\nimport { gridRowMaximumTreeDepthSelector } from \"../hooks/features/rows/gridRowsSelector.js\";\nimport { gridEditRowsStateSelector } from \"../hooks/features/editing/gridEditingSelectors.js\";\nimport { PinnedPosition, gridPinnedColumnPositionLookup } from \"./cell/GridCell.js\";\nimport { GridScrollbarFillerCell as ScrollbarFiller } from \"./GridScrollbarFillerCell.js\";\nimport { getPinnedCellOffset } from \"../internals/utils/getPinnedCellOffset.js\";\nimport { useGridConfiguration } from \"../hooks/utils/useGridConfiguration.js\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nfunction EmptyCell({\n width\n}) {\n if (!width) {\n return null;\n }\n return /*#__PURE__*/_jsx(\"div\", {\n role: \"presentation\",\n className: clsx(gridClasses.cell, gridClasses.cellEmpty),\n style: {\n '--width': `${width}px`\n }\n });\n}\nconst GridRow = /*#__PURE__*/React.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 dimensions,\n renderContext,\n focusedColumnIndex,\n isFirstVisible,\n isLastVisible,\n isNotVisible,\n showBottomBorder,\n onClick,\n onDoubleClick,\n onMouseEnter,\n onMouseLeave,\n onMouseOut,\n onMouseOver\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const apiRef = useGridApiContext();\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 treeDepth = useGridSelector(apiRef, gridRowMaximumTreeDepthSelector);\n const columnPositions = useGridSelector(apiRef, gridColumnPositionsSelector);\n const editRowsState = useGridSelector(apiRef, gridEditRowsStateSelector);\n const handleRef = useForkRef(ref, refProp);\n const rowNode = apiRef.current.getRowNode(rowId);\n const scrollbarWidth = dimensions.hasScrollY ? dimensions.scrollbarSize : 0;\n const gridHasFiller = dimensions.columnsTotalWidth < dimensions.viewportOuterSize.width;\n const editing = apiRef.current.getRowMode(rowId) === GridRowModes.Edit;\n const editable = rootProps.editMode === GridEditModes.Row;\n const hasFocusCell = focusedColumnIndex !== undefined;\n const hasVirtualFocusCellLeft = hasFocusCell && focusedColumnIndex >= pinnedColumns.left.length && focusedColumnIndex < renderContext.firstColumnIndex;\n const hasVirtualFocusCellRight = hasFocusCell && focusedColumnIndex < visibleColumns.length - pinnedColumns.right.length && focusedColumnIndex >= renderContext.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 // The index prop is relative to the rows from all pages. As example, the index prop of the\n // first row is 5 if `paginationModel.pageSize=5` and `paginationModel.page=1`. However, the index used by the virtualization\n // doesn't care about pagination and considers the rows from the current page only, so the\n // first row always has index=0. We need to subtract the index of the first row to make it\n // compatible with the index used by the virtualization.\n const rowIndex = apiRef.current.getRowIndexRelativeToVisibleRows(rowId);\n // pinned rows are not part of the visible rows\n if (rowIndex != null) {\n apiRef.current.unstable_setLastMeasuredRowIndex(rowIndex);\n }\n }\n const rootElement = ref.current;\n const hasFixedHeight = rowHeight !== 'auto';\n if (!rootElement || hasFixedHeight || typeof ResizeObserver === 'undefined') {\n return undefined;\n }\n const resizeObserver = new ResizeObserver(entries => {\n const [entry] = entries;\n const height = entry.borderBoxSize && entry.borderBoxSize.length > 0 ? entry.borderBoxSize[0].blockSize : entry.contentRect.height;\n apiRef.current.unstable_storeRowHeightMeasurement(rowId, height);\n });\n resizeObserver.observe(rootElement);\n return () => resizeObserver.disconnect();\n }, [apiRef, currentPage.range, index, 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 rowReordering = rootProps.rowReordering;\n const sizes = useGridSelector(apiRef, () => _extends({}, apiRef.current.unstable_getRowInternalSizes(rowId)), objectShallowCompare);\n let minHeight = rowHeight;\n if (minHeight === 'auto' && sizes) {\n const numberOfBaseSizes = 1;\n const maximumSize = sizes.baseCenter ?? 0;\n if (maximumSize > 0 && numberOfBaseSizes > 1) {\n minHeight = maximumSize;\n }\n }\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,\n '--height': typeof rowHeight === 'number' ? `${rowHeight}px` : rowHeight\n });\n if (sizes?.spacingTop) {\n const property = rootProps.rowSpacingType === 'border' ? 'borderTopWidth' : 'marginTop';\n rowStyle[property] = sizes.spacingTop;\n }\n if (sizes?.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 += sizes.spacingBottom;\n rowStyle[property] = propertyValue;\n }\n return rowStyle;\n }, [isNotVisible, rowHeight, styleProp, minHeight, sizes, rootProps.rowSpacingType]);\n const rowClassNames = apiRef.current.unstable_applyPipeProcessors('rowClassName', [], rowId);\n const ariaAttributes = rowNode ? getRowAriaAttributes(rowNode, index) : undefined;\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 = PinnedPosition.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(gridPinnedColumnPositionLookup[pinnedPosition], column.computedWidth, indexRelativeToAllColumns, columnPositions, dimensions);\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 }, column.field);\n }\n const editCellState = editRowsState[rowId]?.[column.field] ?? null;\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 isEditingRows = Object.keys(editRowsState).length > 0;\n const canReorderColumn = !(disableColumnReorder || column.disableReorder);\n const canReorderRow = rowReordering && !sortModel.length && treeDepth <= 1 && !isEditingRows;\n const disableDragEvents = !(canReorderColumn || isReorderCell && canReorderRow);\n const cellIsNotVisible = pinnedPosition === PinnedPosition.VIRTUAL;\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 editCellState: editCellState,\n isNotVisible: cellIsNotVisible,\n pinnedOffset: pinnedOffset,\n pinnedPosition: pinnedPosition,\n sectionIndex: indexInSection,\n sectionLength: sectionLength,\n gridHasFiller: gridHasFiller\n }, slotProps?.cell), column.field);\n };\n\n /* Start of rendering */\n\n if (!rowNode) {\n return null;\n }\n const leftCells = pinnedColumns.left.map((column, i) => {\n const indexRelativeToAllColumns = i;\n return getCell(column, i, indexRelativeToAllColumns, pinnedColumns.left.length, PinnedPosition.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, PinnedPosition.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, PinnedPosition.VIRTUAL));\n }\n for (let i = renderContext.firstColumnIndex; i < renderContext.lastColumnIndex; i += 1) {\n const column = visibleColumns[i];\n const indexInSection = i - pinnedColumns.left.length;\n cells.push(getCell(column, indexInSection, i, middleColumnsLength));\n }\n if (hasVirtualFocusCellRight) {\n cells.push(getCell(visibleColumns[focusedColumnIndex], focusedColumnIndex - pinnedColumns.left.length, focusedColumnIndex, middleColumnsLength, PinnedPosition.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 const expandedWidth = dimensions.viewportOuterSize.width - dimensions.columnsTotalWidth - scrollbarWidth;\n const emptyCellWidth = Math.max(0, expandedWidth);\n return /*#__PURE__*/_jsxs(\"div\", _extends({\n ref: handleRef,\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 children: [leftCells, /*#__PURE__*/_jsx(\"div\", {\n role: \"presentation\",\n className: gridClasses.cellOffsetLeft,\n style: {\n width: offsetLeft\n }\n }), cells, emptyCellWidth > 0 && /*#__PURE__*/_jsx(EmptyCell, {\n width: emptyCellWidth\n }), rightCells.length > 0 && /*#__PURE__*/_jsx(\"div\", {\n role: \"presentation\",\n className: gridClasses.filler\n }), rightCells, scrollbarWidth !== 0 && /*#__PURE__*/_jsx(ScrollbarFiller, {\n pinnedRight: pinnedColumns.right.length > 0\n })]\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? GridRow.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 dimensions: PropTypes.shape({\n bottomContainerHeight: PropTypes.number.isRequired,\n columnsTotalWidth: PropTypes.number.isRequired,\n contentSize: PropTypes.shape({\n height: PropTypes.number.isRequired,\n width: PropTypes.number.isRequired\n }).isRequired,\n groupHeaderHeight: PropTypes.number.isRequired,\n hasScrollX: PropTypes.bool.isRequired,\n hasScrollY: PropTypes.bool.isRequired,\n headerFilterHeight: PropTypes.number.isRequired,\n headerHeight: PropTypes.number.isRequired,\n headersTotalHeight: PropTypes.number.isRequired,\n isReady: PropTypes.bool.isRequired,\n leftPinnedWidth: PropTypes.number.isRequired,\n minimumSize: PropTypes.shape({\n height: PropTypes.number.isRequired,\n width: PropTypes.number.isRequired\n }).isRequired,\n rightPinnedWidth: PropTypes.number.isRequired,\n root: PropTypes.shape({\n height: PropTypes.number.isRequired,\n width: PropTypes.number.isRequired\n }).isRequired,\n rowHeight: PropTypes.number.isRequired,\n rowWidth: PropTypes.number.isRequired,\n scrollbarSize: PropTypes.number.isRequired,\n topContainerHeight: PropTypes.number.isRequired,\n viewportInnerSize: PropTypes.shape({\n height: PropTypes.number.isRequired,\n width: PropTypes.number.isRequired\n }).isRequired,\n viewportOuterSize: PropTypes.shape({\n height: PropTypes.number.isRequired,\n width: PropTypes.number.isRequired\n }).isRequired\n }).isRequired,\n /**\n * Determines which cell has focus.\n * If `null`, no cell in this row has focus.\n */\n focusedColumnIndex: PropTypes.number,\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 offsetLeft: PropTypes.number.isRequired,\n offsetTop: PropTypes.number,\n onClick: PropTypes.func,\n onDoubleClick: PropTypes.func,\n onMouseEnter: PropTypes.func,\n onMouseLeave: PropTypes.func,\n pinnedColumns: PropTypes.object.isRequired,\n renderContext: PropTypes.shape({\n firstColumnIndex: PropTypes.number.isRequired,\n firstRowIndex: PropTypes.number.isRequired,\n lastColumnIndex: PropTypes.number.isRequired,\n lastRowIndex: PropTypes.number.isRequired\n }).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 selected: PropTypes.bool.isRequired,\n showBottomBorder: PropTypes.bool.isRequired,\n /**\n * Determines which cell should be tabbable by having tabIndex=0.\n * If `null`, no cell in this row is in the tab sequence.\n */\n tabbableCell: PropTypes.string,\n visibleColumns: PropTypes.arrayOf(PropTypes.object).isRequired\n} : void 0;\nconst MemoizedGridRow = fastMemo(GridRow);\nexport { MemoizedGridRow as GridRow };","import { unstable_composeClasses as composeClasses } from '@mui/utils';\nimport { getDataGridUtilityClass } from \"../constants/gridClasses.js\";\nexport function composeGridClasses(classes, slots) {\n return composeClasses(slots, getDataGridUtilityClass, classes);\n}","import _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 { useGridApiContext } from \"../hooks/utils/useGridApiContext.js\";\nimport { getDataGridUtilityClass } from \"../constants/gridClasses.js\";\nimport { useGridRootProps } from \"../hooks/utils/useGridRootProps.js\";\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 overridesResolver: (props, styles) => styles.rowCount\n})(({\n theme\n}) => ({\n alignItems: 'center',\n display: 'flex',\n margin: theme.spacing(0, 2)\n}));\nconst GridRowCount = /*#__PURE__*/React.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 ref: ref,\n className: clsx(classes.root, className),\n ownerState: ownerState\n }, other, {\n children: [apiRef.current.getLocaleText('footerTotalRows'), \" \", text]\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? GridRowCount.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 * as React from 'react';\nimport clsx from 'clsx';\nimport { gridClasses } from \"../constants/index.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst classes = {\n root: gridClasses.scrollbarFiller,\n header: gridClasses['scrollbarFiller--header'],\n borderTop: gridClasses['scrollbarFiller--borderTop'],\n borderBottom: gridClasses['scrollbarFiller--borderBottom'],\n pinnedRight: gridClasses['scrollbarFiller--pinnedRight']\n};\nfunction GridScrollbarFillerCell({\n header,\n borderTop = true,\n borderBottom,\n pinnedRight\n}) {\n return /*#__PURE__*/_jsx(\"div\", {\n role: \"presentation\",\n className: clsx(classes.root, header && classes.header, borderTop && classes.borderTop, borderBottom && classes.borderBottom, pinnedRight && classes.pinnedRight)\n });\n}\nexport { GridScrollbarFillerCell };","import _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 { useGridApiContext } from \"../hooks/utils/useGridApiContext.js\";\nimport { getDataGridUtilityClass } from \"../constants/gridClasses.js\";\nimport { useGridRootProps } from \"../hooks/utils/useGridRootProps.js\";\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 overridesResolver: (props, styles) => styles.selectedRowCount\n})(({\n theme\n}) => ({\n alignItems: 'center',\n display: 'flex',\n margin: theme.spacing(0, 2),\n visibility: 'hidden',\n width: 0,\n height: 0,\n [theme.breakpoints.up('sm')]: {\n visibility: 'visible',\n width: 'auto',\n height: 'auto'\n }\n}));\nconst GridSelectedRowCount = /*#__PURE__*/React.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 ref: ref,\n className: clsx(classes.root, className),\n ownerState: ownerState\n }, other, {\n children: rowSelectedText\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? GridSelectedRowCount.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 };","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport { useGridRootProps } from \"../../hooks/utils/useGridRootProps.js\";\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 */));\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { styled } from '@mui/system';\nimport composeClasses from '@mui/utils/composeClasses';\nimport clsx from 'clsx';\nimport { useGridSelector } from \"../../hooks/utils/useGridSelector.js\";\nimport { gridDimensionsSelector } from \"../../hooks/features/dimensions/index.js\";\nimport { useGridApiContext } from \"../../hooks/utils/useGridApiContext.js\";\nimport { useGridRootProps } from \"../../hooks/utils/useGridRootProps.js\";\nimport { useGridVisibleRows } from \"../../hooks/utils/useGridVisibleRows.js\";\nimport { getMinimalContentHeight } from \"../../hooks/features/rows/gridRowsUtils.js\";\nimport { getDataGridUtilityClass } from \"../../constants/gridClasses.js\";\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',\n overridesResolver: (props, styles) => styles.overlayWrapper\n})(({\n overlayType,\n loadingOverlayVariant\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-headersTotalHeight)',\n left: 0,\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 overridesResolver: (props, styles) => styles.overlayWrapperInner\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};\nfunction GridOverlayWrapper(props) {\n const apiRef = useGridApiContext();\n const rootProps = useGridRootProps();\n const currentPage = useGridVisibleRows(apiRef, rootProps);\n const dimensions = useGridSelector(apiRef, gridDimensionsSelector);\n let height = dimensions.viewportOuterSize.height - dimensions.topContainerHeight - dimensions.bottomContainerHeight - (dimensions.hasScrollX ? dimensions.scrollbarSize : 0);\n if (rootProps.autoHeight && currentPage.rows.length === 0 || height === 0) {\n height = getMinimalContentHeight(apiRef);\n }\n const classes = useUtilityClasses(_extends({}, props, {\n classes: rootProps.classes\n }));\n return /*#__PURE__*/_jsx(GridOverlayWrapperRoot, _extends({\n className: clsx(classes.root)\n }, props, {\n children: /*#__PURE__*/_jsx(GridOverlayWrapperInner, _extends({\n className: clsx(classes.inner),\n style: {\n height,\n width: dimensions.viewportOuterSize.width\n }\n }, props))\n }));\n}\nprocess.env.NODE_ENV !== \"production\" ? GridOverlays.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'])\n} : void 0;\nexport function GridOverlays(props) {\n const {\n overlayType\n } = props;\n const rootProps = useGridRootProps();\n if (!overlayType) {\n return null;\n }\n const Overlay = rootProps.slots?.[overlayType];\n const overlayProps = rootProps.slotProps?.[overlayType];\n return /*#__PURE__*/_jsx(GridOverlayWrapper, _extends({}, props, {\n children: /*#__PURE__*/_jsx(Overlay, _extends({}, overlayProps))\n }));\n}","import _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\", \"focusElementRef\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport MenuList from '@mui/material/MenuList';\nimport { useRtl } from '@mui/system/RtlProvider';\nimport { unstable_useId as useId } from '@mui/utils';\nimport { gridClasses } from \"../../constants/gridClasses.js\";\nimport { GridMenu } from \"../menu/GridMenu.js\";\nimport { useGridRootProps } from \"../../hooks/utils/useGridRootProps.js\";\nimport { useGridApiContext } from \"../../hooks/utils/useGridApiContext.js\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst hasActions = colDef => typeof colDef.getActions === 'function';\nfunction GridActionsCell(props) {\n const {\n colDef,\n id,\n hasFocus,\n tabIndex,\n position = 'bottom-end',\n focusElementRef\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 if (!hasActions(colDef)) {\n throw new Error('MUI X: Missing the `getActions` property in the `GridColDef`.');\n }\n const options = colDef.getActions(apiRef.current.getRowParams(id));\n const iconButtons = options.filter(option => !option.props.showInMenu);\n const menuButtons = options.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 React.useEffect(() => {\n if (!hasFocus) {\n setFocusedButtonIndex(-1);\n ignoreCallToFocus.current = false;\n }\n }, [hasFocus]);\n React.useImperativeHandle(focusElementRef, () => ({\n focus() {\n // If ignoreCallToFocus is true, then one of the buttons was clicked and the focus is already set\n if (!ignoreCallToFocus.current) {\n // find the first focusable button and pass the index to the state\n const focusableButtonIndex = options.findIndex(o => !o.props.disabled);\n setFocusedButtonIndex(focusableButtonIndex);\n }\n }\n }), [options]);\n React.useEffect(() => {\n if (focusedButtonIndex >= numberOfButtons) {\n setFocusedButtonIndex(numberOfButtons - 1);\n }\n }, [focusedButtonIndex, numberOfButtons]);\n const showMenu = () => {\n setOpen(true);\n setFocusedButtonIndex(numberOfButtons - 1);\n ignoreCallToFocus.current = true;\n };\n const hideMenu = () => {\n setOpen(false);\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 > options.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 options[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 const handleListKeyDown = event => {\n if (event.key === 'Tab') {\n event.preventDefault();\n }\n if (['Tab', 'Escape'].includes(event.key)) {\n hideMenu();\n }\n };\n return /*#__PURE__*/_jsxs(\"div\", _extends({\n role: \"menu\",\n ref: rootRef,\n tabIndex: -1,\n className: gridClasses.actionsCell,\n onKeyDown: handleRootKeyDown\n }, 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: showMenu,\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(MenuList, {\n id: menuId,\n className: gridClasses.menuList,\n onKeyDown: handleListKeyDown,\n \"aria-labelledby\": buttonId,\n variant: \"menu\",\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 = {\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 /**\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 * A ref allowing to set imperative focus.\n * It can be passed to the element that should receive focus.\n * @ignore - do not document.\n */\n focusElementRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({\n current: PropTypes.shape({\n focus: PropTypes.func.isRequired\n })\n })]),\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 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.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 { GridActionsCell };\nexport const renderActionsCell = params => /*#__PURE__*/_jsx(GridActionsCell, _extends({}, params));","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 { getDataGridUtilityClass } from \"../../constants/gridClasses.js\";\nimport { useGridRootProps } from \"../../hooks/utils/useGridRootProps.js\";\nimport { useGridApiContext } from \"../../hooks/utils/useGridApiContext.js\";\nimport { isAutogeneratedRowNode } from \"../../hooks/features/rows/gridRowsUtils.js\";\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 } = 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 Icon = React.useMemo(() => value ? rootProps.slots.booleanCellTrueIcon : rootProps.slots.booleanCellFalseIcon, [rootProps.slots.booleanCellFalseIcon, rootProps.slots.booleanCellTrueIcon, value]);\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 = {\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 * A ref allowing to set imperative focus.\n * It can be passed to the element that should receive focus.\n * @ignore - do not document.\n */\n focusElementRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({\n current: PropTypes.shape({\n focus: PropTypes.func.isRequired\n })\n })]),\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);\nexport { GridBooleanCell };\nexport const renderBooleanCell = params => {\n if (params.field !== '__row_group_by_columns_group__' && isAutogeneratedRowNode(params.rowNode)) {\n return '';\n }\n return /*#__PURE__*/_jsx(GridBooleanCell, _extends({}, params));\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 _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"column\", \"rowId\", \"editCellState\", \"align\", \"children\", \"colIndex\", \"width\", \"className\", \"style\", \"gridHasScrollX\", \"colSpan\", \"disableDragEvents\", \"isNotVisible\", \"pinnedOffset\", \"pinnedPosition\", \"sectionIndex\", \"sectionLength\", \"gridHasFiller\", \"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 { unstable_useForkRef as useForkRef, unstable_composeClasses as composeClasses, unstable_ownerDocument as ownerDocument, unstable_capitalize as capitalize } from '@mui/utils';\nimport { fastMemo } from '@mui/x-internals/fastMemo';\nimport { useRtl } from '@mui/system/RtlProvider';\nimport { doesSupportPreventScroll } from \"../../utils/doesSupportPreventScroll.js\";\nimport { getDataGridUtilityClass, gridClasses } from \"../../constants/gridClasses.js\";\nimport { GridCellModes } from \"../../models/index.js\";\nimport { useGridSelector, objectShallowCompare } from \"../../hooks/utils/useGridSelector.js\";\nimport { useGridApiContext } from \"../../hooks/utils/useGridApiContext.js\";\nimport { useGridRootProps } from \"../../hooks/utils/useGridRootProps.js\";\nimport { gridFocusCellSelector } from \"../../hooks/features/focus/gridFocusStateSelector.js\";\nimport { MissingRowIdError } from \"../../hooks/features/rows/useGridParamsApi.js\";\nimport { shouldCellShowLeftBorder, shouldCellShowRightBorder } from \"../../utils/cellBorderUtils.js\";\nimport { GridPinnedColumnPosition } from \"../../hooks/features/columns/gridColumnsInterfaces.js\";\nimport { gridRowSpanningHiddenCellsSelector, gridRowSpanningSpannedCellsSelector } from \"../../hooks/features/rows/gridRowSpanningSelectors.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport let PinnedPosition = /*#__PURE__*/function (PinnedPosition) {\n PinnedPosition[PinnedPosition[\"NONE\"] = 0] = \"NONE\";\n PinnedPosition[PinnedPosition[\"LEFT\"] = 1] = \"LEFT\";\n PinnedPosition[PinnedPosition[\"RIGHT\"] = 2] = \"RIGHT\";\n PinnedPosition[PinnedPosition[\"VIRTUAL\"] = 3] = \"VIRTUAL\";\n return PinnedPosition;\n}({});\nexport const gridPinnedColumnPositionLookup = {\n [PinnedPosition.LEFT]: GridPinnedColumnPosition.LEFT,\n [PinnedPosition.RIGHT]: GridPinnedColumnPosition.RIGHT,\n [PinnedPosition.NONE]: undefined,\n [PinnedPosition.VIRTUAL]: undefined\n};\nconst EMPTY_CELL_PARAMS = {\n id: -1,\n field: '__unset__',\n row: {},\n rowNode: {\n id: -1,\n depth: 0,\n type: 'leaf',\n parent: -1,\n groupingKey: null\n },\n colDef: {\n type: 'string',\n field: '__unset__',\n computedWidth: 0\n },\n cellMode: GridCellModes.View,\n hasFocus: false,\n tabIndex: -1,\n value: null,\n formattedValue: '__unset__',\n isEditable: false,\n api: {}\n};\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 === PinnedPosition.LEFT && 'cell--pinnedLeft', pinnedPosition === PinnedPosition.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 = /*#__PURE__*/React.forwardRef(function GridCell(props, ref) {\n const {\n column,\n rowId,\n editCellState,\n align,\n colIndex,\n width,\n className,\n style: styleProp,\n colSpan,\n disableDragEvents,\n isNotVisible,\n pinnedOffset,\n pinnedPosition,\n sectionIndex,\n sectionLength,\n gridHasFiller,\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 = useGridApiContext();\n const rootProps = useGridRootProps();\n const isRtl = useRtl();\n const field = column.field;\n const cellParams = useGridSelector(apiRef, () => {\n // This is required because `.getCellParams` tries to get the `state.rows.tree` entry\n // associated with `rowId`/`fieldId`, but this selector runs after the state has been\n // updated, while `rowId`/`fieldId` reference an entry in the old state.\n try {\n const result = apiRef.current.getCellParams(rowId, field);\n result.api = apiRef.current;\n return result;\n } catch (e) {\n if (e instanceof MissingRowIdError) {\n return EMPTY_CELL_PARAMS;\n }\n throw e;\n }\n }, objectShallowCompare);\n const isSelected = useGridSelector(apiRef, () => apiRef.current.unstable_applyPipeProcessors('isCellSelected', false, {\n id: rowId,\n field\n }));\n const hiddenCells = useGridSelector(apiRef, gridRowSpanningHiddenCellsSelector);\n const spannedCells = useGridSelector(apiRef, gridRowSpanningSpannedCellsSelector);\n const {\n cellMode,\n hasFocus,\n isEditable = false,\n value\n } = cellParams;\n const canManageOwnFocus = column.type === 'actions' && column.getActions?.(apiRef.current.getRowParams(rowId)).some(action => !action.props.disabled);\n const tabIndex = (cellMode === 'view' || !isEditable) && !canManageOwnFocus ? 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 focusElementRef = React.useRef(null);\n const isSelectionMode = rootProps.cellSelection ?? false;\n const position = gridPinnedColumnPositionLookup[pinnedPosition];\n const showLeftBorder = shouldCellShowLeftBorder(position, sectionIndex);\n const showRightBorder = shouldCellShowRightBorder(position, sectionIndex, sectionLength, rootProps.showCellVerticalBorder, gridHasFiller);\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]?.[field] ?? false;\n const rowSpan = spannedCells[rowId]?.[field] ?? 1;\n const style = React.useMemo(() => {\n if (isNotVisible) {\n return {\n padding: 0,\n opacity: 0,\n width: 0,\n border: 0\n };\n }\n const cellStyle = _extends({\n '--width': `${width}px`\n }, styleProp);\n const isLeftPinned = pinnedPosition === PinnedPosition.LEFT;\n const isRightPinned = pinnedPosition === PinnedPosition.RIGHT;\n if (isLeftPinned || isRightPinned) {\n let side = isLeftPinned ? 'left' : 'right';\n if (isRtl) {\n side = isLeftPinned ? 'right' : 'left';\n }\n cellStyle[side] = pinnedOffset;\n }\n if (rowSpan > 1) {\n cellStyle.height = `calc(var(--height) * ${rowSpan})`;\n cellStyle.zIndex = 5;\n }\n return cellStyle;\n }, [width, isNotVisible, styleProp, pinnedOffset, pinnedPosition, isRtl, rowSpan]);\n React.useEffect(() => {\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 = focusElementRef.current || focusableElement || cellRef.current;\n if (doesSupportPreventScroll()) {\n elementToFocus.focus({\n preventScroll: true\n });\n } else {\n const scrollPosition = apiRef.current.getScrollPosition();\n elementToFocus.focus();\n apiRef.current.scroll(scrollPosition);\n }\n }\n }, [hasFocus, cellMode, apiRef]);\n if (isCellRowSpanned) {\n return /*#__PURE__*/_jsx(\"div\", {\n \"data-colindex\": colIndex,\n role: \"presentation\",\n style: _extends({}, style, {\n minWidth: 'var(--width)',\n maxWidth: 'var(--width)'\n })\n });\n }\n if (cellParams === EMPTY_CELL_PARAMS) {\n return null;\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 if (/*#__PURE__*/React.isValidElement(children) && canManageOwnFocus) {\n children = /*#__PURE__*/React.cloneElement(children, {\n focusElementRef\n });\n }\n const draggableEventHandlers = disableDragEvents ? null : {\n onDragEnter: publish('cellDragEnter', onDragEnter),\n onDragOver: publish('cellDragOver', onDragOver)\n };\n return /*#__PURE__*/_jsx(\"div\", _extends({\n ref: handleRef,\n className: clsx(className, classNames, classes.root),\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 children: children\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? GridCell.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 className: PropTypes.string,\n colIndex: PropTypes.number.isRequired,\n colSpan: PropTypes.number,\n column: PropTypes.object.isRequired,\n disableDragEvents: PropTypes.bool,\n editCellState: PropTypes.shape({\n changeReason: PropTypes.oneOf(['debouncedSetEditCellValue', 'setEditCellValue']),\n isProcessingProps: PropTypes.bool,\n isValidating: PropTypes.bool,\n value: PropTypes.any\n }),\n gridHasFiller: PropTypes.bool.isRequired,\n isNotVisible: PropTypes.bool.isRequired,\n onClick: PropTypes.func,\n onDoubleClick: PropTypes.func,\n onDragEnter: PropTypes.func,\n onDragOver: PropTypes.func,\n onKeyDown: PropTypes.func,\n onMouseDown: PropTypes.func,\n onMouseUp: PropTypes.func,\n pinnedOffset: PropTypes.number.isRequired,\n pinnedPosition: PropTypes.oneOf([0, 1, 2, 3]).isRequired,\n rowId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,\n sectionIndex: PropTypes.number.isRequired,\n sectionLength: PropTypes.number.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 = [\"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 { unstable_composeClasses as composeClasses, unstable_useId as useId, unstable_useEnhancedEffect as useEnhancedEffect } from '@mui/utils';\nimport { getDataGridUtilityClass } from \"../../constants/gridClasses.js\";\nimport { useGridRootProps } from \"../../hooks/utils/useGridRootProps.js\";\nimport { useGridApiContext } from \"../../hooks/utils/useGridApiContext.js\";\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 = {\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<HTMLInputElement>} 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> | 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));","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\", \"tabIndex\", \"hasFocus\", \"inputProps\", \"isValidating\", \"isProcessingProps\", \"onValueChange\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { unstable_composeClasses as composeClasses, unstable_useEnhancedEffect as useEnhancedEffect } from '@mui/utils';\nimport InputBase from '@mui/material/InputBase';\nimport { styled } from '@mui/material/styles';\nimport { getDataGridUtilityClass } from \"../../constants/gridClasses.js\";\nimport { useGridRootProps } from \"../../hooks/utils/useGridRootProps.js\";\nimport { useGridApiContext } from \"../../hooks/utils/useGridApiContext.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst StyledInputBase = styled(InputBase)({\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 inputProps,\n onValueChange\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const isDateTime = colDef.type === 'dateTime';\n const apiRef = useGridApiContext();\n const inputRef = React.useRef();\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 inputRef: inputRef,\n fullWidth: true,\n className: classes.root,\n type: isDateTime ? 'datetime-local' : 'date',\n inputProps: _extends({\n max: isDateTime ? '9999-12-31T23:59' : '9999-12-31'\n }, inputProps),\n value: valueState.formatted,\n onChange: handleChange\n }, other));\n}\nprocess.env.NODE_ENV !== \"production\" ? GridEditDateCell.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<HTMLInputElement>} 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> | 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 { GridEditDateCell };\nexport const renderEditDateCell = params => /*#__PURE__*/_jsx(GridEditDateCell, _extends({}, params));","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"id\", \"value\", \"formattedValue\", \"api\", \"field\", \"row\", \"rowNode\", \"colDef\", \"cellMode\", \"isEditable\", \"tabIndex\", \"hasFocus\", \"isValidating\", \"debounceMs\", \"isProcessingProps\", \"onValueChange\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { unstable_composeClasses as composeClasses, unstable_useEnhancedEffect as useEnhancedEffect } from '@mui/utils';\nimport { styled } from '@mui/material/styles';\nimport InputBase from '@mui/material/InputBase';\nimport { getDataGridUtilityClass } from \"../../constants/gridClasses.js\";\nimport { useGridRootProps } from \"../../hooks/utils/useGridRootProps.js\";\nimport { useGridApiContext } from \"../../hooks/utils/useGridApiContext.js\";\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(InputBase, {\n name: 'MuiDataGrid',\n slot: 'EditInputCell',\n overridesResolver: (props, styles) => styles.editInputCell\n})(({\n theme\n}) => _extends({}, theme.typography.body2, {\n padding: '1px 0',\n '& input': {\n padding: '0 16px',\n height: '100%'\n }\n}));\nconst GridEditInputCell = /*#__PURE__*/React.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 } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const apiRef = useGridApiContext();\n const inputRef = React.useRef();\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 if (onValueChange) {\n await onValueChange(event, newValue);\n }\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 }, [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 ref: ref,\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));\n});\nprocess.env.NODE_ENV !== \"production\" ? GridEditInputCell.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<HTMLInputElement>} 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> | 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 { GridEditInputCell };\nexport const renderEditInputCell = params => /*#__PURE__*/_jsx(GridEditInputCell, _extends({}, params));","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\", \"tabIndex\", \"className\", \"hasFocus\", \"isValidating\", \"isProcessingProps\", \"error\", \"onValueChange\", \"initialOpen\"],\n _excluded2 = [\"MenuProps\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { unstable_useEnhancedEffect as useEnhancedEffect } from '@mui/utils';\nimport { GridCellEditStopReasons } from \"../../models/params/gridEditCellParams.js\";\nimport { useGridRootProps } from \"../../hooks/utils/useGridRootProps.js\";\nimport { GridEditModes } from \"../../models/gridEditRowModel.js\";\nimport { getValueFromValueOptions, getValueOptions, isSingleSelectColDef } from \"../panel/filterPanel/filterPanelUtils.js\";\nimport { useGridApiContext } from \"../../hooks/utils/useGridApiContext.js\";\nimport { createElement as _createElement } from \"react\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction isKeyboardEvent(event) {\n return !!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 } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const apiRef = useGridApiContext();\n const ref = React.useRef();\n const inputRef = React.useRef();\n const [open, setOpen] = React.useState(initialOpen);\n const baseSelectProps = rootProps.slotProps?.baseSelect || {};\n const isSelectNative = baseSelectProps.native ?? false;\n const _ref = rootProps.slotProps?.baseSelect || {},\n {\n MenuProps\n } = _ref,\n otherBaseSelectProps = _objectWithoutPropertiesLoose(_ref, _excluded2);\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 inputRef: inputRef,\n value: valueProp,\n onChange: handleChange,\n open: open,\n onOpen: handleOpen,\n MenuProps: _extends({\n onClose: handleClose\n }, MenuProps),\n error: error,\n native: isSelectNative,\n fullWidth: true\n }, other, otherBaseSelectProps, {\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 = {\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 {SelectChangeEvent<any>} 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> | 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));","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\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport Skeleton from '@mui/material/Skeleton';\nimport { unstable_composeClasses as composeClasses, unstable_capitalize as capitalize } from '@mui/utils';\nimport { fastMemo } from '@mui/x-internals/fastMemo';\nimport { createRandomNumberGenerator } from \"../../utils/utils.js\";\nimport { useGridRootProps } from \"../../hooks/utils/useGridRootProps.js\";\nimport { getDataGridUtilityClass } from \"../../constants/gridClasses.js\";\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 } = 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 skeletonProps = 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 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(Skeleton, _extends({}, skeletonProps))\n }));\n}\nprocess.env.NODE_ENV !== \"production\" ? GridSkeletonCell.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 type: PropTypes.oneOf(['actions', 'boolean', 'custom', 'date', 'dateTime', 'number', 'singleSelect', 'string']),\n width: PropTypes.oneOfType([PropTypes.number, PropTypes.string])\n} : void 0;\nconst Memoized = fastMemo(GridSkeletonCell);\nexport { Memoized as GridSkeletonCell };","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { unstable_composeClasses as composeClasses, unstable_useId as useId } from '@mui/utils';\nimport Badge from '@mui/material/Badge';\nimport { useGridSelector } from \"../../hooks/index.js\";\nimport { gridPreferencePanelStateSelector } from \"../../hooks/features/preferencesPanel/gridPreferencePanelSelector.js\";\nimport { GridPreferencePanelsValue } from \"../../hooks/features/preferencesPanel/gridPreferencePanelsValue.js\";\nimport { useGridApiContext } from \"../../hooks/utils/useGridApiContext.js\";\nimport { getDataGridUtilityClass } from \"../../constants/gridClasses.js\";\nimport { useGridRootProps } from \"../../hooks/utils/useGridRootProps.js\";\nimport { GridIconButtonContainer } from \"./GridIconButtonContainer.js\";\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 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 preferencePanel = useGridSelector(apiRef, gridPreferencePanelStateSelector);\n const labelId = useId();\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.current.state);\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 open = preferencePanel.open && preferencePanel.labelId === labelId;\n const iconButton = /*#__PURE__*/_jsx(rootProps.slots.baseIconButton, _extends({\n id: labelId,\n onClick: toggleFilter,\n color: \"default\",\n \"aria-label\": apiRef.current.getLocaleText('columnHeaderFiltersLabel'),\n size: \"small\",\n tabIndex: -1,\n \"aria-haspopup\": \"menu\",\n \"aria-expanded\": open,\n \"aria-controls\": open ? 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(Badge, {\n badgeContent: counter,\n color: \"default\",\n children: iconButton\n }), counter === 1 && iconButton]\n })\n }));\n}\nprocess.env.NODE_ENV !== \"production\" ? GridColumnHeaderFilterIconButton.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 { GridColumnHeaderFilterIconButton };","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport composeClasses from '@mui/utils/composeClasses';\nimport { useGridApiContext } from \"../../hooks/utils/useGridApiContext.js\";\nimport { getDataGridUtilityClass } from \"../../constants/gridClasses.js\";\nimport { useGridRootProps } from \"../../hooks/utils/useGridRootProps.js\";\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 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('columnMenuLabel'),\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});","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { unstable_composeClasses as composeClasses, unstable_useId as useId } from '@mui/utils';\nimport { fastMemo } from '@mui/x-internals/fastMemo';\nimport { useGridPrivateApiContext } from \"../../hooks/utils/useGridPrivateApiContext.js\";\nimport { ColumnHeaderMenuIcon } from \"./ColumnHeaderMenuIcon.js\";\nimport { GridColumnHeaderMenu } from \"../menu/columnMenu/GridColumnHeaderMenu.js\";\nimport { gridClasses, getDataGridUtilityClass } from \"../../constants/gridClasses.js\";\nimport { useGridRootProps } from \"../../hooks/utils/useGridRootProps.js\";\nimport { GridGenericColumnHeaderItem } from \"./GridGenericColumnHeaderItem.js\";\nimport { isEventTargetInPortal } from \"../../utils/domUtils.js\";\nimport { shouldCellShowLeftBorder, shouldCellShowRightBorder } from \"../../utils/cellBorderUtils.js\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n colDef,\n classes,\n isDragging,\n sortDirection,\n showRightBorder,\n showLeftBorder,\n filterItemsCounter,\n pinnedPosition,\n isLastUnpinned,\n isSiblingFocused\n } = ownerState;\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 === 'left' && 'columnHeader--alignLeft', colDef.headerAlign === 'center' && 'columnHeader--alignCenter', colDef.headerAlign === 'right' && 'columnHeader--alignRight', colDef.sortable && 'columnHeader--sortable', isDragging && 'columnHeader--moving', isColumnSorted && 'columnHeader--sorted', isColumnFiltered && 'columnHeader--filtered', isColumnNumeric && 'columnHeader--numeric', 'withBorderColor', showRightBorder && 'columnHeader--withRightBorder', showLeftBorder && 'columnHeader--withLeftBorder', pinnedPosition === 'left' && 'columnHeader--pinnedLeft', pinnedPosition === '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 isLastUnpinned && 'columnHeader--lastUnpinned', 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 style,\n pinnedPosition,\n indexInSection,\n sectionLength,\n gridHasFiller\n } = props;\n const apiRef = useGridPrivateApiContext();\n const rootProps = useGridRootProps();\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 isDraggable = React.useMemo(() => !rootProps.disableColumnReorder && !disableReorder && !colDef.disableReorder, [rootProps.disableColumnReorder, disableReorder, colDef.disableReorder]);\n let headerComponent;\n if (colDef.renderHeader) {\n headerComponent = colDef.renderHeader(apiRef.current.getColumnHeaderParams(colDef.field));\n }\n const showLeftBorder = shouldCellShowLeftBorder(pinnedPosition, indexInSection);\n const showRightBorder = shouldCellShowRightBorder(pinnedPosition, indexInSection, sectionLength, rootProps.showColumnVerticalBorder, gridHasFiller);\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 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 onDragEnd: 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) {\n setShowColumnMenuIcon(columnMenuOpen);\n }\n }, [showColumnMenuIcon, columnMenuOpen]);\n const handleExited = React.useCallback(() => {\n setShowColumnMenuIcon(false);\n }, []);\n const columnMenuIconButton = !rootProps.disableColumnMenu && !colDef.disableColumnMenu && /*#__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 elementToFocus?.focus();\n if (apiRef.current.columnHeadersContainerRef?.current) {\n apiRef.current.columnHeadersContainerRef.current.scrollLeft = 0;\n }\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 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 = {\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 gridHasFiller: PropTypes.bool.isRequired,\n hasFocus: PropTypes.bool,\n headerHeight: PropTypes.number.isRequired,\n indexInSection: PropTypes.number.isRequired,\n isDragging: PropTypes.bool.isRequired,\n isLast: PropTypes.bool.isRequired,\n isLastUnpinned: PropTypes.bool.isRequired,\n isResizing: PropTypes.bool.isRequired,\n isSiblingFocused: PropTypes.bool.isRequired,\n pinnedPosition: PropTypes.oneOf(['left', 'right']),\n sectionLength: PropTypes.number.isRequired,\n separatorSide: PropTypes.oneOf(['left', 'right']),\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 };","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 { unstable_composeClasses as composeClasses, unstable_capitalize as capitalize } from '@mui/utils';\nimport { getDataGridUtilityClass } from \"../../constants/gridClasses.js\";\nimport { useGridRootProps } from \"../../hooks/utils/useGridRootProps.js\";\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);\nprocess.env.NODE_ENV !== \"production\" ? GridColumnHeaderSeparatorRaw.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 };","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"direction\", \"index\", \"sortingOrder\", \"disabled\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport composeClasses from '@mui/utils/composeClasses';\nimport Badge from '@mui/material/Badge';\nimport { useGridApiContext } from \"../../hooks/utils/useGridApiContext.js\";\nimport { getDataGridUtilityClass } from \"../../constants/gridClasses.js\";\nimport { useGridRootProps } from \"../../hooks/utils/useGridRootProps.js\";\nimport { GridIconButtonContainer } from \"./GridIconButtonContainer.js\";\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: ['sortIcon']\n };\n return composeClasses(slots, getDataGridUtilityClass, classes);\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 GridColumnHeaderSortIconRaw(props) {\n const {\n direction,\n index,\n sortingOrder,\n disabled\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(rootProps.slots.baseIconButton, _extends({\n tabIndex: -1,\n \"aria-label\": apiRef.current.getLocaleText('columnHeaderSortIconLabel'),\n title: apiRef.current.getLocaleText('columnHeaderSortIconLabel'),\n size: \"small\",\n disabled: disabled\n }, rootProps.slotProps?.baseIconButton, other, {\n children: iconElement\n }));\n return /*#__PURE__*/_jsxs(GridIconButtonContainer, {\n children: [index != null && /*#__PURE__*/_jsx(Badge, {\n badgeContent: index,\n color: \"default\",\n overlap: \"circular\",\n children: iconButton\n }), index == null && iconButton]\n });\n}\nconst GridColumnHeaderSortIcon = /*#__PURE__*/React.memo(GridColumnHeaderSortIconRaw);\nprocess.env.NODE_ENV !== \"production\" ? GridColumnHeaderSortIconRaw.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 sortingOrder: PropTypes.arrayOf(PropTypes.oneOf(['asc', 'desc'])).isRequired\n} : void 0;\nexport { GridColumnHeaderSortIcon };","import _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/system';\nimport { isOverflown } from \"../../utils/domUtils.js\";\nimport { getDataGridUtilityClass } from \"../../constants/gridClasses.js\";\nimport { useGridRootProps } from \"../../hooks/utils/useGridRootProps.js\";\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 overridesResolver: (props, styles) => styles.columnHeaderTitle\n})({\n textOverflow: 'ellipsis',\n overflow: 'hidden',\n whiteSpace: 'nowrap',\n fontWeight: 'var(--unstable_DataGrid-headWeight)',\n lineHeight: 'normal'\n});\nconst ColumnHeaderInnerTitle = /*#__PURE__*/React.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 ref: ref,\n className: clsx(classes.root, className),\n ownerState: rootProps\n }, other));\n});\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 = {\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 = [\"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 { unstable_useForkRef as useForkRef } from '@mui/utils';\nimport { useGridPrivateApiContext } from \"../../hooks/utils/useGridPrivateApiContext.js\";\nimport { GridColumnHeaderTitle } from \"./GridColumnHeaderTitle.js\";\nimport { GridColumnHeaderSeparator } from \"./GridColumnHeaderSeparator.js\";\nimport { useGridRootProps } from \"../../hooks/utils/useGridRootProps.js\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst GridGenericColumnHeaderItem = /*#__PURE__*/React.forwardRef(function GridGenericColumnHeaderItem(props, ref) {\n const {\n classes,\n colIndex,\n height,\n isResizing,\n sortDirection,\n hasFocus,\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 apiRef = useGridPrivateApiContext();\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 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 elementToFocus?.focus();\n if (apiRef.current.columnHeadersContainerRef?.current) {\n apiRef.current.columnHeadersContainerRef.current.scrollLeft = 0;\n }\n }\n }, [apiRef, hasFocus]);\n return /*#__PURE__*/_jsxs(\"div\", _extends({\n ref: handleRef,\n className: clsx(classes.root, headerClassName),\n style: _extends({}, style, {\n height,\n width\n }),\n role: \"columnheader\",\n tabIndex: tabIndex,\n \"aria-colindex\": colIndex + 1,\n \"aria-sort\": ariaSort\n }, other, {\n children: [/*#__PURE__*/_jsxs(\"div\", _extends({\n className: classes.draggableContainer,\n draggable: isDraggable,\n role: \"presentation\"\n }, draggableContainerProps, {\n children: [/*#__PURE__*/_jsxs(\"div\", {\n className: classes.titleContainer,\n role: \"presentation\",\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});\nexport { GridGenericColumnHeaderItem };","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 clsx from 'clsx';\nimport composeClasses from '@mui/utils/composeClasses';\nimport { styled } from '@mui/system';\nimport { getDataGridUtilityClass } from \"../../constants/gridClasses.js\";\nimport { useGridRootProps } from \"../../hooks/utils/useGridRootProps.js\";\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 overridesResolver: (props, styles) => styles.iconButtonContainer\n})(() => ({\n display: 'flex',\n visibility: 'hidden',\n width: 0\n}));\nexport const GridIconButtonContainer = /*#__PURE__*/React.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 ref: ref,\n className: clsx(classes.root, className),\n ownerState: rootProps\n }, other));\n});","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"field\", \"id\", \"value\", \"formattedValue\", \"row\", \"rowNode\", \"colDef\", \"isEditable\", \"cellMode\", \"hasFocus\", \"tabIndex\", \"api\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { unstable_composeClasses as composeClasses, unstable_useForkRef as useForkRef } from '@mui/utils';\nimport { useGridApiContext } from \"../../hooks/utils/useGridApiContext.js\";\nimport { useGridRootProps } from \"../../hooks/utils/useGridRootProps.js\";\nimport { getDataGridUtilityClass } from \"../../constants/gridClasses.js\";\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 = /*#__PURE__*/React.forwardRef(function GridCellCheckboxRenderer(props, ref) {\n const {\n field,\n id,\n value: isChecked,\n rowNode,\n hasFocus,\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 checkboxElement = React.useRef(null);\n const rippleRef = React.useRef(null);\n const handleRef = useForkRef(checkboxElement, ref);\n const handleChange = event => {\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) {\n const element = apiRef.current.getCellElement(id, field);\n if (element) {\n element.tabIndex = -1;\n }\n }\n }, [apiRef, tabIndex, id, field]);\n React.useEffect(() => {\n if (hasFocus) {\n const input = checkboxElement.current?.querySelector('input');\n input?.focus({\n preventScroll: true\n });\n } else if (rippleRef.current) {\n // Only available in @mui/material v5.4.1 or later\n rippleRef.current.stop({});\n }\n }, [hasFocus]);\n const handleKeyDown = React.useCallback(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 }, []);\n if (rowNode.type === 'footer' || rowNode.type === 'pinnedRow') {\n return null;\n }\n const isSelectable = apiRef.current.isRowSelectable(id);\n const label = apiRef.current.getLocaleText(isChecked ? 'checkboxSelectionUnselectRow' : 'checkboxSelectionSelectRow');\n return /*#__PURE__*/_jsx(rootProps.slots.baseCheckbox, _extends({\n ref: handleRef,\n tabIndex: tabIndex,\n checked: isChecked,\n onChange: handleChange,\n className: classes.root,\n inputProps: {\n 'aria-label': label\n },\n onKeyDown: handleKeyDown,\n disabled: !isSelectable,\n touchRippleRef: rippleRef /* FIXME: typing error */\n }, rootProps.slotProps?.baseCheckbox, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? GridCellCheckboxForwardRef.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 * A ref allowing to set imperative focus.\n * It can be passed to the element that should receive focus.\n * @ignore - do not document.\n */\n focusElementRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({\n current: PropTypes.shape({\n focus: PropTypes.func.isRequired\n })\n })]),\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 _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 { isMultipleRowSelectionEnabled } from \"../../hooks/features/rowSelection/utils.js\";\nimport { useGridSelector } from \"../../hooks/utils/useGridSelector.js\";\nimport { gridTabIndexColumnHeaderSelector } from \"../../hooks/features/focus/gridFocusStateSelector.js\";\nimport { gridRowSelectionStateSelector } from \"../../hooks/features/rowSelection/gridRowSelectionSelector.js\";\nimport { useGridApiContext } from \"../../hooks/utils/useGridApiContext.js\";\nimport { getDataGridUtilityClass } from \"../../constants/gridClasses.js\";\nimport { useGridRootProps } from \"../../hooks/utils/useGridRootProps.js\";\nimport { gridExpandedSortedRowIdsSelector } from \"../../hooks/features/filter/gridFilterSelector.js\";\nimport { gridPaginatedVisibleSortedGridRowIdsSelector } from \"../../hooks/features/pagination/gridPaginationSelector.js\";\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 = /*#__PURE__*/React.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 if (typeof rootProps.isRowSelectable !== 'function') {\n return selection;\n }\n return selection.filter(id => {\n // The row might have been deleted\n if (!apiRef.current.getRow(id)) {\n return false;\n }\n return rootProps.isRowSelectable(apiRef.current.getRowParams(id));\n });\n }, [apiRef, rootProps.isRowSelectable, 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 ? visibleRowIds : paginatedVisibleRowIds;\n\n // Convert to an object to make O(1) checking if a row exists or not\n // TODO create selector that returns visibleRowIds/paginatedVisibleRowIds as an object\n return rowIds.reduce((acc, id) => {\n acc[id] = true;\n return acc;\n }, {});\n }, [rootProps.pagination, rootProps.checkboxSelectionVisibleOnly, paginatedVisibleRowIds, visibleRowIds]);\n\n // Amount of rows selected and that are visible in the current page\n const currentSelectionSize = React.useMemo(() => filteredSelection.filter(id => selectionCandidates[id]).length, [filteredSelection, selectionCandidates]);\n const isIndeterminate = currentSelectionSize > 0 && currentSelectionSize < Object.keys(selectionCandidates).length;\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 tabIndex = tabIndexState !== null && tabIndexState.field === props.field ? 0 : -1;\n React.useLayoutEffect(() => {\n const element = apiRef.current.getColumnHeaderElement(props.field);\n if (tabIndex === 0 && element) {\n element.tabIndex = -1;\n }\n }, [tabIndex, apiRef, props.field]);\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 ? 'checkboxSelectionUnselectAllRows' : 'checkboxSelectionSelectAllRows');\n const checked = rootProps.indeterminateCheckboxAction === 'select' ? isChecked && !isIndeterminate : isChecked;\n return /*#__PURE__*/_jsx(rootProps.slots.baseCheckbox, _extends({\n ref: ref,\n indeterminate: isIndeterminate,\n checked: checked,\n onChange: handleChange,\n className: classes.root,\n inputProps: {\n 'aria-label': label\n },\n tabIndex: tabIndex,\n onKeyDown: handleKeyDown,\n disabled: !isMultipleRowSelectionEnabled(rootProps)\n }, rootProps.slotProps?.baseCheckbox, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? GridHeaderCheckbox.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 };","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;","import _extends from \"@babel/runtime/helpers/esm/extends\";\n/* eslint-disable @typescript-eslint/no-use-before-define */\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport composeClasses from '@mui/utils/composeClasses';\nimport FormControlLabel from '@mui/material/FormControlLabel';\nimport { styled } from '@mui/material/styles';\nimport { gridColumnDefinitionsSelector, gridColumnVisibilityModelSelector } from \"../../hooks/features/columns/gridColumnsSelector.js\";\nimport { useGridSelector } from \"../../hooks/utils/useGridSelector.js\";\nimport { useGridApiContext } from \"../../hooks/utils/useGridApiContext.js\";\nimport { useGridRootProps } from \"../../hooks/utils/useGridRootProps.js\";\nimport { getDataGridUtilityClass } from \"../../constants/gridClasses.js\";\nimport { useLazyRef } from \"../../hooks/utils/useLazyRef.js\";\nimport { checkColumnVisibilityModelsSame, defaultSearchPredicate } from \"./utils.js\";\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 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 columns = useGridSelector(apiRef, gridColumnDefinitionsSelector);\n const initialColumnVisibilityModel = useLazyRef(() => gridColumnVisibilityModelSelector(apiRef)).current;\n const columnVisibilityModel = useGridSelector(apiRef, gridColumnVisibilityModelSelector);\n const rootProps = useGridRootProps();\n const [searchValue, setSearchValue] = React.useState('');\n const classes = useUtilityClasses(rootProps);\n const {\n sort,\n searchPredicate = defaultSearchPredicate,\n autoFocusSearchField = true,\n disableShowHideToggle = false,\n disableResetButton = false,\n toggleAllMode = 'all',\n getTogglableColumns\n } = props;\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 setSearchValue(event.target.value);\n }, []);\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 return /*#__PURE__*/_jsxs(React.Fragment, {\n children: [/*#__PURE__*/_jsx(GridColumnsManagementHeader, {\n className: classes.header,\n ownerState: rootProps,\n children: /*#__PURE__*/_jsx(rootProps.slots.baseTextField, _extends({\n placeholder: apiRef.current.getLocaleText('columnsManagementSearchTitle'),\n inputRef: searchInputRef,\n value: searchValue,\n onChange: handleSearchValueChange,\n variant: \"outlined\",\n size: \"small\",\n InputProps: {\n startAdornment: /*#__PURE__*/_jsx(rootProps.slots.baseInputAdornment, {\n position: \"start\",\n children: /*#__PURE__*/_jsx(rootProps.slots.quickFilterIcon, {})\n }),\n sx: {\n pl: 1.5\n }\n },\n fullWidth: true\n }, rootProps.slotProps?.baseTextField))\n }), /*#__PURE__*/_jsxs(GridColumnsManagementBody, {\n className: classes.root,\n ownerState: rootProps,\n children: [currentColumns.map(column => /*#__PURE__*/_jsx(FormControlLabel, {\n className: classes.row,\n control: /*#__PURE__*/_jsx(rootProps.slots.baseCheckbox, _extends({\n disabled: column.hideable === false,\n checked: columnVisibilityModel[column.field] !== false,\n onClick: toggleColumn,\n name: column.field,\n sx: {\n p: 0.5\n },\n inputRef: isFirstHideableColumn(column) ? firstSwitchRef : undefined\n }, rootProps.slotProps?.baseCheckbox)),\n label: column.headerName || column.field\n }, column.field)), currentColumns.length === 0 && /*#__PURE__*/_jsx(GridColumnsManagementEmptyText, {\n ownerState: rootProps,\n children: apiRef.current.getLocaleText('columnsManagementNoColumns')\n })]\n }), (!disableShowHideToggle || !disableResetButton) && currentColumns.length > 0 ? /*#__PURE__*/_jsxs(GridColumnsManagementFooter, {\n ownerState: rootProps,\n className: classes.footer,\n children: [!disableShowHideToggle ? /*#__PURE__*/_jsx(FormControlLabel, {\n control: /*#__PURE__*/_jsx(rootProps.slots.baseCheckbox, _extends({\n disabled: hideableColumns.length === 0,\n checked: allHideableColumnsVisible,\n indeterminate: !allHideableColumnsVisible && !allHideableColumnsHidden,\n onClick: () => toggleAllColumns(!allHideableColumnsVisible),\n name: apiRef.current.getLocaleText('columnsManagementShowHideAllText'),\n sx: {\n p: 0.5\n }\n }, rootProps.slotProps?.baseCheckbox)),\n label: apiRef.current.getLocaleText('columnsManagementShowHideAllText')\n }) : /*#__PURE__*/_jsx(\"span\", {}), !disableResetButton ? /*#__PURE__*/_jsx(rootProps.slots.baseButton, _extends({\n onClick: () => apiRef.current.setColumnVisibilityModel(initialColumnVisibilityModel),\n disabled: isResetDisabled\n }, rootProps.slotProps?.baseButton, {\n children: apiRef.current.getLocaleText('columnsManagementReset')\n })) : null]\n }) : null]\n });\n}\nprocess.env.NODE_ENV !== \"production\" ? GridColumnsManagement.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 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 overridesResolver: (props, styles) => styles.columnsManagement\n})(({\n theme\n}) => ({\n padding: theme.spacing(0, 3, 1.5),\n display: 'flex',\n flexDirection: 'column',\n overflow: 'auto',\n flex: '1 1',\n maxHeight: 400,\n alignItems: 'flex-start'\n}));\nconst GridColumnsManagementHeader = styled('div', {\n name: 'MuiDataGrid',\n slot: 'ColumnsManagementHeader',\n overridesResolver: (props, styles) => styles.columnsManagementHeader\n})(({\n theme\n}) => ({\n padding: theme.spacing(1.5, 3)\n}));\nconst GridColumnsManagementFooter = styled('div', {\n name: 'MuiDataGrid',\n slot: 'ColumnsManagementFooter',\n overridesResolver: (props, styles) => styles.columnsManagementFooter\n})(({\n theme\n}) => ({\n padding: theme.spacing(0.5, 1, 0.5, 3),\n display: 'flex',\n justifyContent: 'space-between',\n borderTop: `1px solid ${theme.palette.divider}`\n}));\nconst GridColumnsManagementEmptyText = styled('div')(({\n theme\n}) => ({\n padding: theme.spacing(0.5, 0),\n color: theme.palette.grey[500]\n}));\nexport { GridColumnsManagement };","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 composeClasses from '@mui/utils/composeClasses';\nimport { styled } from '@mui/system';\nimport { getDataGridUtilityClass } from \"../../constants/gridClasses.js\";\nimport { useGridRootProps } from \"../../hooks/utils/useGridRootProps.js\";\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 overridesResolver: (props, styles) => styles.footerContainer\n})({\n display: 'flex',\n justifyContent: 'space-between',\n alignItems: 'center',\n minHeight: 52,\n borderTop: '1px solid'\n});\nconst GridFooterContainer = /*#__PURE__*/React.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 ref: ref,\n className: clsx(classes.root, className),\n ownerState: rootProps\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? GridFooterContainer.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 };","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 composeClasses from '@mui/utils/composeClasses';\nimport { styled } from '@mui/system';\nimport { getDataGridUtilityClass } from \"../../constants/gridClasses.js\";\nimport { useGridRootProps } from \"../../hooks/utils/useGridRootProps.js\";\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 overridesResolver: (_, styles) => styles.overlay\n})({\n width: '100%',\n height: '100%',\n display: 'flex',\n alignSelf: 'center',\n alignItems: 'center',\n justifyContent: 'center',\n backgroundColor: 'var(--unstable_DataGrid-overlayBackground)'\n});\nconst GridOverlay = /*#__PURE__*/React.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 ref: ref,\n className: clsx(classes.root, className),\n ownerState: rootProps\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? GridOverlay.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 { alpha, styled, darken, lighten, decomposeColor, recomposeColor } from '@mui/material/styles';\nimport { gridClasses as c } from \"../../constants/gridClasses.js\";\nimport { useGridSelector } from \"../../hooks/utils/useGridSelector.js\";\nimport { useGridPrivateApiContext } from \"../../hooks/utils/useGridPrivateApiContext.js\";\nimport { gridDimensionsSelector } from \"../../hooks/features/dimensions/gridDimensionsSelectors.js\";\nfunction getBorderColor(theme) {\n if (theme.vars) {\n return theme.vars.palette.TableCell.border;\n }\n if (theme.palette.mode === 'light') {\n return lighten(alpha(theme.palette.divider, 1), 0.88);\n }\n return darken(alpha(theme.palette.divider, 1), 0.68);\n}\nconst columnHeaderStyles = {\n [`& .${c.iconButtonContainer}`]: {\n visibility: 'visible',\n width: 'auto'\n },\n [`& .${c.menuIcon}`]: {\n width: 'auto',\n visibility: 'visible'\n }\n};\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 */';\nexport const GridRootStyles = styled('div', {\n name: 'MuiDataGrid',\n slot: 'Root',\n overridesResolver: (props, styles) => [{\n [`&.${c.autoHeight}`]: styles.autoHeight\n }, {\n [`&.${c.aggregationColumnHeader}`]: styles.aggregationColumnHeader\n }, {\n [`&.${c['aggregationColumnHeader--alignLeft']}`]: styles['aggregationColumnHeader--alignLeft']\n }, {\n [`&.${c['aggregationColumnHeader--alignCenter']}`]: styles['aggregationColumnHeader--alignCenter']\n }, {\n [`&.${c['aggregationColumnHeader--alignRight']}`]: styles['aggregationColumnHeader--alignRight']\n }, {\n [`&.${c.aggregationColumnHeaderLabel}`]: styles.aggregationColumnHeaderLabel\n }, {\n [`&.${c['root--disableUserSelection']} .${c.cell}`]: styles['root--disableUserSelection']\n }, {\n [`&.${c.autosizing}`]: styles.autosizing\n }, {\n [`& .${c.editBooleanCell}`]: styles.editBooleanCell\n }, {\n [`& .${c.cell}`]: styles.cell\n }, {\n [`& .${c['cell--editing']}`]: styles['cell--editing']\n }, {\n [`& .${c['cell--textCenter']}`]: styles['cell--textCenter']\n }, {\n [`& .${c['cell--textLeft']}`]: styles['cell--textLeft']\n }, {\n [`& .${c['cell--textRight']}`]: styles['cell--textRight']\n }, {\n [`& .${c['cell--rangeTop']}`]: styles['cell--rangeTop']\n }, {\n [`& .${c['cell--rangeBottom']}`]: styles['cell--rangeBottom']\n }, {\n [`& .${c['cell--rangeLeft']}`]: styles['cell--rangeLeft']\n }, {\n [`& .${c['cell--rangeRight']}`]: styles['cell--rangeRight']\n }, {\n [`& .${c['cell--withRightBorder']}`]: styles['cell--withRightBorder']\n }, {\n [`& .${c.cellCheckbox}`]: styles.cellCheckbox\n }, {\n [`& .${c.cellSkeleton}`]: styles.cellSkeleton\n }, {\n [`& .${c.checkboxInput}`]: styles.checkboxInput\n }, {\n [`& .${c['columnHeader--alignCenter']}`]: styles['columnHeader--alignCenter']\n }, {\n [`& .${c['columnHeader--alignLeft']}`]: styles['columnHeader--alignLeft']\n }, {\n [`& .${c['columnHeader--alignRight']}`]: styles['columnHeader--alignRight']\n }, {\n [`& .${c['columnHeader--dragging']}`]: styles['columnHeader--dragging']\n }, {\n [`& .${c['columnHeader--moving']}`]: styles['columnHeader--moving']\n }, {\n [`& .${c['columnHeader--numeric']}`]: styles['columnHeader--numeric']\n }, {\n [`& .${c['columnHeader--sortable']}`]: styles['columnHeader--sortable']\n }, {\n [`& .${c['columnHeader--sorted']}`]: styles['columnHeader--sorted']\n }, {\n [`& .${c['columnHeader--withRightBorder']}`]: styles['columnHeader--withRightBorder']\n }, {\n [`& .${c.columnHeader}`]: styles.columnHeader\n }, {\n [`& .${c.headerFilterRow}`]: styles.headerFilterRow\n }, {\n [`& .${c.columnHeaderCheckbox}`]: styles.columnHeaderCheckbox\n }, {\n [`& .${c.columnHeaderDraggableContainer}`]: styles.columnHeaderDraggableContainer\n }, {\n [`& .${c.columnHeaderTitleContainer}`]: styles.columnHeaderTitleContainer\n }, {\n [`& .${c['columnSeparator--resizable']}`]: styles['columnSeparator--resizable']\n }, {\n [`& .${c['columnSeparator--resizing']}`]: styles['columnSeparator--resizing']\n }, {\n [`& .${c.columnSeparator}`]: styles.columnSeparator\n }, {\n [`& .${c.filterIcon}`]: styles.filterIcon\n }, {\n [`& .${c.iconSeparator}`]: styles.iconSeparator\n }, {\n [`& .${c.menuIcon}`]: styles.menuIcon\n }, {\n [`& .${c.menuIconButton}`]: styles.menuIconButton\n }, {\n [`& .${c.menuOpen}`]: styles.menuOpen\n }, {\n [`& .${c.menuList}`]: styles.menuList\n }, {\n [`& .${c['row--editable']}`]: styles['row--editable']\n }, {\n [`& .${c['row--editing']}`]: styles['row--editing']\n }, {\n [`& .${c['row--dragging']}`]: styles['row--dragging']\n }, {\n [`& .${c.row}`]: styles.row\n }, {\n [`& .${c.rowReorderCellPlaceholder}`]: styles.rowReorderCellPlaceholder\n }, {\n [`& .${c.rowReorderCell}`]: styles.rowReorderCell\n }, {\n [`& .${c['rowReorderCell--draggable']}`]: styles['rowReorderCell--draggable']\n }, {\n [`& .${c.sortIcon}`]: styles.sortIcon\n }, {\n [`& .${c.withBorderColor}`]: styles.withBorderColor\n }, {\n [`& .${c.treeDataGroupingCell}`]: styles.treeDataGroupingCell\n }, {\n [`& .${c.treeDataGroupingCellToggle}`]: styles.treeDataGroupingCellToggle\n }, {\n [`& .${c.treeDataGroupingCellLoadingContainer}`]: styles.treeDataGroupingCellLoadingContainer\n }, {\n [`& .${c.detailPanelToggleCell}`]: styles.detailPanelToggleCell\n }, {\n [`& .${c['detailPanelToggleCell--expanded']}`]: styles['detailPanelToggleCell--expanded']\n }, styles.root]\n})(({\n theme: t\n}) => {\n const apiRef = useGridPrivateApiContext();\n const dimensions = useGridSelector(apiRef, gridDimensionsSelector);\n const borderColor = getBorderColor(t);\n const radius = t.shape.borderRadius;\n const containerBackground = t.vars ? t.vars.palette.background.default : t.mixins.MuiDataGrid?.containerBackground ?? t.palette.background.default;\n const pinnedBackground = t.mixins.MuiDataGrid?.pinnedBackground ?? containerBackground;\n const overlayBackground = t.vars ? `rgba(${t.vars.palette.background.defaultChannel} / ${t.vars.palette.action.disabledOpacity})` : alpha(t.palette.background.default, t.palette.action.disabledOpacity);\n const hoverOpacity = (t.vars || t).palette.action.hoverOpacity;\n const hoverColor = (t.vars || t).palette.action.hover;\n const selectedOpacity = (t.vars || t).palette.action.selectedOpacity;\n const selectedBackground = t.vars ? `rgba(${t.vars.palette.primary.mainChannel} / ${selectedOpacity})` : alpha(t.palette.primary.main, selectedOpacity);\n const selectedHoverBackground = t.vars ? `rgba(${t.vars.palette.primary.mainChannel} / calc(\n ${t.vars.palette.action.selectedOpacity} +\n ${t.vars.palette.action.hoverOpacity}\n ))` : alpha(t.palette.primary.main, t.palette.action.selectedOpacity + t.palette.action.hoverOpacity);\n const pinnedHoverBackground = t.vars ? hoverColor : blend(pinnedBackground, hoverColor, hoverOpacity);\n const pinnedSelectedBackground = t.vars ? selectedBackground : blend(pinnedBackground, selectedBackground, selectedOpacity);\n const pinnedSelectedHoverBackground = t.vars ? hoverColor : blend(pinnedSelectedBackground, hoverColor, hoverOpacity);\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 = _extends({\n '--unstable_DataGrid-radius': typeof radius === 'number' ? `${radius}px` : radius,\n '--unstable_DataGrid-headWeight': t.typography.fontWeightMedium,\n '--unstable_DataGrid-overlayBackground': overlayBackground,\n '--DataGrid-containerBackground': containerBackground,\n '--DataGrid-pinnedBackground': pinnedBackground,\n '--DataGrid-rowBorderColor': borderColor,\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 flex: 1,\n boxSizing: 'border-box',\n position: 'relative',\n borderWidth: '1px',\n borderStyle: 'solid',\n borderColor,\n borderRadius: 'var(--unstable_DataGrid-radius)',\n color: (t.vars || t).palette.text.primary\n }, t.typography.body2, {\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 overflowAnchor: 'none',\n // Keep the same scrolling position\n [`.${c.main} > *:first-child${ignoreSsrWarning}`]: {\n borderTopLeftRadius: 'var(--unstable_DataGrid-radius)',\n borderTopRightRadius: 'var(--unstable_DataGrid-radius)'\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.iconButtonContainer}`]: {\n width: '0 !important',\n visibility: 'hidden !important'\n },\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 },\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 ${t.vars ? `rgba(${t.vars.palette.primary.mainChannel} / 0.5)` : alpha(t.palette.primary.main, 0.5)} ${focusOutlineWidth}px`,\n outlineOffset: focusOutlineWidth * -1\n },\n [`& .${c.columnHeader}:focus, & .${c.cell}:focus`]: {\n outline: `solid ${t.palette.primary.main} ${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 & .${c['virtualScroller--hasScrollX']} .${c['columnHeader--lastUnpinned']},\n & .${c['virtualScroller--hasScrollX']} .${c['columnHeader--last']}\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: dimensions.hasScrollX && (!dimensions.hasScrollY || dimensions.scrollbarSize === 0) ? '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 },\n [`& .${c['virtualScroller--hasScrollX']} .${c['columnHeader--last']}`]: {\n overflow: 'hidden'\n },\n [`& .${c['columnHeader--sorted']} .${c.iconButtonContainer}, & .${c['columnHeader--filtered']} .${c.iconButtonContainer}`]: {\n visibility: 'visible',\n width: 'auto'\n },\n [`& .${c.columnHeader}:not(.${c['columnHeader--sorted']}) .${c.sortIcon}`]: {\n opacity: 0,\n transition: t.transitions.create(['opacity'], {\n duration: t.transitions.duration.shorter\n })\n },\n [`& .${c.columnHeaderTitleContainer}`]: {\n display: 'flex',\n alignItems: 'center',\n gap: t.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: (t.vars || t).palette.action.hover\n },\n [`& .${c['columnHeader--pinnedLeft']}, & .${c['columnHeader--pinnedRight']}`]: {\n position: 'sticky',\n zIndex: 4,\n // Should be above the column separator\n background: 'var(--DataGrid-pinnedBackground)'\n },\n [`& .${c.columnSeparator}`]: {\n position: 'absolute',\n overflow: 'hidden',\n zIndex: 3,\n display: 'flex',\n flexDirection: 'column',\n justifyContent: 'center',\n alignItems: 'center',\n maxWidth: columnSeparatorTargetSize,\n color: borderColor\n },\n [`& .${c.columnHeaders}`]: {\n width: 'var(--DataGrid-rowWidth)'\n },\n '@media (hover: hover)': {\n [`& .${c.columnHeader}:hover`]: columnHeaderStyles,\n [`& .${c.columnHeader}:not(.${c['columnHeader--sorted']}):hover .${c.sortIcon}`]: {\n opacity: 0.5\n }\n },\n '@media (hover: none)': {\n [`& .${c.columnHeader}`]: columnHeaderStyles,\n [`& .${c.columnHeader}:focus,\n & .${c['columnHeader--siblingFocused']}`]: {\n [`.${c['columnSeparator--resizable']}`]: {\n color: (t.vars || t).palette.primary.main\n }\n }\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: (t.vars || t).palette.primary.main\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: (t.vars || t).palette.primary.main,\n [`& .${c.iconSeparator} rect`]: separatorIconDragStyles\n }\n },\n '& svg': {\n pointerEvents: 'none'\n }\n },\n [`& .${c.iconSeparator}`]: {\n color: 'inherit',\n transition: t.transitions.create(['color', 'width'], {\n duration: t.transitions.duration.shortest\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}`]: {\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 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: (t.vars || t).palette.action.hover,\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 [`& .${c['container--top']}, & .${c['container--bottom']}`]: {\n '[role=row]': {\n background: 'var(--DataGrid-containerBackground)'\n }\n },\n /* Cell styles */\n [`& .${c.cell}`]: {\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 [`& .${c['virtualScrollerContent--overflowed']} .${c['row--lastVisible']} .${c.cell}`]: {\n borderTopColor: 'transparent'\n },\n [`& .${c['pinnedRows--top']} :first-of-type`]: {\n [`& .${c.cell}, .${c.scrollbarFiller}`]: {\n borderTop: 'none'\n }\n },\n [`&.${c['root--disableUserSelection']} .${c.cell}`]: {\n userSelect: 'none'\n },\n [`& .${c['row--dynamicHeight']} > .${c.cell}`]: {\n whiteSpace: 'initial',\n lineHeight: 'inherit'\n },\n [`& .${c.cellEmpty}`]: {\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: t.shadows[2],\n backgroundColor: (t.vars || t).palette.background.paper,\n '&:focus-within': {\n outline: `${focusOutlineWidth}px solid ${(t.vars || t).palette.primary.main}`,\n outlineOffset: focusOutlineWidth * -1\n }\n },\n [`& .${c['row--editing']}`]: {\n boxShadow: t.shadows[2]\n },\n [`& .${c['row--editing']} .${c.cell}`]: {\n boxShadow: t.shadows[0],\n backgroundColor: (t.vars || t).palette.background.paper\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: (t.vars || t).palette.text.secondary\n },\n [`& .${c.booleanCell}[data-value=\"false\"]`]: {\n color: (t.vars || t).palette.text.disabled\n },\n [`& .${c.actionsCell}`]: {\n display: 'inline-flex',\n alignItems: 'center',\n gridGap: t.spacing(1)\n },\n [`& .${c.rowReorderCell}`]: {\n display: 'inline-flex',\n flex: 1,\n alignItems: 'center',\n justifyContent: 'center',\n opacity: (t.vars || t).palette.action.disabledOpacity\n },\n [`& .${c['rowReorderCell--draggable']}`]: {\n cursor: 'move',\n opacity: 1\n },\n [`& .${c.rowReorderCellContainer}`]: {\n padding: 0,\n display: 'flex',\n alignItems: 'stretch'\n },\n [`.${c.withBorderColor}`]: {\n borderColor\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: 3,\n background: 'var(--DataGrid-pinnedBackground)'\n },\n [`& .${c.virtualScrollerContent} .${c.row}`]: {\n '&:hover': {\n [`& .${c['cell--pinnedLeft']}, & .${c['cell--pinnedRight']}`]: {\n backgroundColor: pinnedHoverBackground\n }\n },\n [`&.Mui-selected`]: {\n [`& .${c['cell--pinnedLeft']}, & .${c['cell--pinnedRight']}`]: {\n backgroundColor: pinnedSelectedBackground\n },\n '&:hover': {\n [`& .${c['cell--pinnedLeft']}, & .${c['cell--pinnedRight']}`]: {\n backgroundColor: pinnedSelectedHoverBackground\n }\n }\n }\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']}, & .${c['row--dragging']}`]: {\n background: (t.vars || t).palette.background.paper,\n padding: '0 12px',\n borderRadius: 'var(--unstable_DataGrid-radius)',\n opacity: (t.vars || t).palette.action.disabledOpacity\n },\n [`& .${c['row--dragging']}`]: {\n background: (t.vars || t).palette.background.paper,\n padding: '0 12px',\n borderRadius: 'var(--unstable_DataGrid-radius)',\n opacity: (t.vars || t).palette.action.disabledOpacity,\n [`& .${c.rowReorderCellPlaceholder}`]: {\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: t.spacing(2)\n },\n [`& .${c.treeDataGroupingCellLoadingContainer}`]: {\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: t.spacing(2)\n },\n /* ScrollbarFiller styles */\n [`.${c.scrollbarFiller}`]: {\n minWidth: 'calc(var(--DataGrid-hasScrollY) * var(--DataGrid-scrollbarSize))',\n alignSelf: 'stretch',\n [`&.${c['scrollbarFiller--borderTop']}`]: {\n borderTop: '1px solid var(--DataGrid-rowBorderColor)'\n },\n [`&.${c['scrollbarFiller--borderBottom']}`]: {\n borderBottom: '1px solid var(--DataGrid-rowBorderColor)'\n },\n [`&.${c['scrollbarFiller--pinnedRight']}`]: {\n backgroundColor: 'var(--DataGrid-pinnedBackground)',\n position: 'sticky',\n right: 0\n }\n },\n [`& .${c.filler}`]: {\n flex: 1\n },\n [`& .${c['filler--borderBottom']}`]: {\n borderBottom: '1px solid var(--DataGrid-rowBorderColor)'\n },\n /* Hide grid rows, row filler, and vertical scrollbar when skeleton overlay is visible */\n [`& .${c['main--hasSkeletonLoadingOverlay']}`]: {\n [`& .${c.virtualScrollerContent}`]: {\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 position: 'fixed',\n visibility: 'hidden'\n },\n [`& .${c['scrollbar--vertical']}, & .${c.pinnedRows}, & .${c.virtualScroller} > .${c.filler}`]: {\n display: 'none'\n }\n }\n });\n return gridStyle;\n});\n\n/**\n * Blend a transparent overlay color with a background color, resulting in a single\n * RGB color.\n */\nfunction blend(background, overlay, opacity, gamma = 1) {\n const f = (b, o) => Math.round((b ** (1 / gamma) * (1 - opacity) + o ** (1 / gamma) * opacity) ** gamma);\n const backgroundColor = decomposeColor(background);\n const overlayColor = decomposeColor(overlay);\n const rgb = [f(backgroundColor.values[0], overlayColor.values[0]), f(backgroundColor.values[1], overlayColor.values[1]), f(backgroundColor.values[2], overlayColor.values[2])];\n return recomposeColor({\n type: 'rgb',\n values: rgb\n });\n}","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 { unstable_useForkRef as useForkRef, unstable_useEnhancedEffect as useEnhancedEffect, unstable_capitalize as capitalize, unstable_composeClasses as composeClasses } from '@mui/utils';\nimport { GridRootStyles } from \"./GridRootStyles.js\";\nimport { useGridSelector } from \"../../hooks/utils/useGridSelector.js\";\nimport { useGridPrivateApiContext } from \"../../hooks/utils/useGridPrivateApiContext.js\";\nimport { useGridRootProps } from \"../../hooks/utils/useGridRootProps.js\";\nimport { getDataGridUtilityClass } from \"../../constants/gridClasses.js\";\nimport { gridDensitySelector } from \"../../hooks/features/density/densitySelector.js\";\nimport { jsx as _jsx } 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 = /*#__PURE__*/React.forwardRef(function GridRoot(props, ref) {\n const rootProps = useGridRootProps();\n const {\n className\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 handleRef = useForkRef(rootElementRef, ref);\n const ownerState = rootProps;\n const classes = useUtilityClasses(ownerState, density);\n\n // Our implementation of <NoSsr />\n const [mountedState, setMountedState] = React.useState(false);\n useEnhancedEffect(() => {\n setMountedState(true);\n }, []);\n if (!mountedState) {\n return null;\n }\n return /*#__PURE__*/_jsx(GridRootStyles, _extends({\n ref: handleRef,\n className: clsx(className, classes.root),\n ownerState: ownerState\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? GridRoot.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 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;\nexport { GridRoot };","import _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 ClickAwayListener from '@mui/material/ClickAwayListener';\nimport { unstable_composeClasses as composeClasses, unstable_useEnhancedEffect as useEnhancedEffect, HTMLElementType } from '@mui/utils';\nimport Grow from '@mui/material/Grow';\nimport Paper from '@mui/material/Paper';\nimport Popper from '@mui/material/Popper';\nimport { styled } from '@mui/material/styles';\nimport { getDataGridUtilityClass, gridClasses } from \"../../constants/gridClasses.js\";\nimport { useGridRootProps } from \"../../hooks/utils/useGridRootProps.js\";\nimport { useGridApiContext } from \"../../hooks/utils/useGridApiContext.js\";\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(Popper, {\n name: 'MuiDataGrid',\n slot: 'Menu',\n overridesResolver: (_, styles) => styles.menu\n})(({\n theme\n}) => ({\n zIndex: theme.zIndex.modal,\n [`& .${gridClasses.menuList}`]: {\n outline: 0\n }\n}));\nconst transformOrigin = {\n 'bottom-start': 'top left',\n 'bottom-end': 'top right'\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 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 handleExited = popperOnExited => node => {\n if (popperOnExited) {\n popperOnExited();\n }\n if (onExited) {\n onExited(node);\n }\n };\n const handleClickAway = event => {\n if (event.target && (target === event.target || target?.contains(event.target))) {\n return;\n }\n onClose(event);\n };\n return /*#__PURE__*/_jsx(GridMenuRoot, _extends({\n as: rootProps.slots.basePopper,\n className: clsx(className, classes.root),\n ownerState: rootProps,\n open: open,\n anchorEl: target,\n transition: true,\n placement: position\n }, other, rootProps.slotProps?.basePopper, {\n children: ({\n TransitionProps,\n placement\n }) => /*#__PURE__*/_jsx(ClickAwayListener, {\n onClickAway: handleClickAway,\n mouseEvent: \"onMouseDown\",\n children: /*#__PURE__*/_jsx(Grow, _extends({}, TransitionProps, {\n style: {\n transformOrigin: transformOrigin[placement]\n },\n onExited: handleExited(TransitionProps?.onExited),\n children: /*#__PURE__*/_jsx(Paper, {\n children: children\n })\n }))\n })\n }));\n}\nprocess.env.NODE_ENV !== \"production\" ? GridMenu.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 onClose: PropTypes.func.isRequired,\n onExited: PropTypes.func,\n /**\n * If `true`, the component is shown.\n */\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 };","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { unstable_useEventCallback as useEventCallback, HTMLElementType } from '@mui/utils';\nimport { useGridApiContext } from \"../../../hooks/utils/useGridApiContext.js\";\nimport { GridMenu } from \"../GridMenu.js\";\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 placement: `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 = {\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 _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"displayOrder\"];\nimport * as React from 'react';\nimport Divider from '@mui/material/Divider';\nimport { useGridPrivateApiContext } from \"../../utils/useGridPrivateApiContext.js\";\nconst useGridColumnMenuSlots = props => {\n const apiRef = useGridPrivateApiContext();\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 const defaultItems = apiRef.current.unstable_applyPipeProcessors('columnMenu', [], props.colDef);\n const userItems = React.useMemo(() => {\n const defaultComponentKeys = Object.keys(defaultSlots);\n return Object.keys(slots).filter(key => !defaultComponentKeys.includes(key));\n }, [slots, defaultSlots]);\n return React.useMemo(() => {\n const uniqueItems = Array.from(new Set([...defaultItems, ...userItems]));\n const cleansedItems = uniqueItems.filter(key => processedComponents[key] != null);\n const sorted = 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 return sorted.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 !== sorted.length - 1 ? [...acc, [processedComponents[key], itemProps], [Divider, {}]] : [...acc, [processedComponents[key], itemProps]];\n }, []);\n }, [addDividers, colDef, defaultItems, hideMenu, processedComponents, processedSlotProps, userItems]);\n};\nexport { useGridColumnMenuSlots };","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"defaultSlots\", \"defaultSlotProps\", \"slots\", \"slotProps\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { useGridColumnMenuSlots } from \"../../../hooks/features/columnMenu/useGridColumnMenuSlots.js\";\nimport { GridColumnMenuContainer } from \"./GridColumnMenuContainer.js\";\nimport { GridColumnMenuColumnsItem } from \"./menuItems/GridColumnMenuColumnsItem.js\";\nimport { GridColumnMenuFilterItem } from \"./menuItems/GridColumnMenuFilterItem.js\";\nimport { GridColumnMenuSortItem } from \"./menuItems/GridColumnMenuSortItem.js\";\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 = /*#__PURE__*/React.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({\n ref: ref\n }, other, {\n children: orderedSlots.map(([Component, otherProps], index) => /*#__PURE__*/_jsx(Component, _extends({}, otherProps), index))\n }));\n});\nconst GridColumnMenu = /*#__PURE__*/React.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});\nprocess.env.NODE_ENV !== \"production\" ? GridColumnMenu.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 };","import _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 MenuList from '@mui/material/MenuList';\nimport { styled } from '@mui/material/styles';\nimport { isHideMenuKey } from \"../../../utils/keyboardUtils.js\";\nimport { gridClasses } from \"../../../constants/gridClasses.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst StyledMenuList = styled(MenuList)(() => ({\n minWidth: 248\n}));\nconst GridColumnMenuContainer = /*#__PURE__*/React.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 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 id: id,\n ref: ref,\n className: clsx(gridClasses.menuList, className),\n \"aria-labelledby\": labelledby,\n onKeyDown: handleListKeyDown,\n autoFocus: open\n }, other, {\n children: children\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? GridColumnMenuContainer.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 _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { GridColumnMenuHideItem } from \"./GridColumnMenuHideItem.js\";\nimport { GridColumnMenuManageItem } from \"./GridColumnMenuManageItem.js\";\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 = {\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 MenuItem from '@mui/material/MenuItem';\nimport ListItemIcon from '@mui/material/ListItemIcon';\nimport ListItemText from '@mui/material/ListItemText';\nimport { useGridApiContext } from \"../../../../hooks/utils/useGridApiContext.js\";\nimport { useGridRootProps } from \"../../../../hooks/utils/useGridRootProps.js\";\nimport { jsx as _jsx, jsxs as _jsxs } 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__*/_jsxs(MenuItem, {\n onClick: showFilter,\n children: [/*#__PURE__*/_jsx(ListItemIcon, {\n children: /*#__PURE__*/_jsx(rootProps.slots.columnMenuFilterIcon, {\n fontSize: \"small\"\n })\n }), /*#__PURE__*/_jsx(ListItemText, {\n children: apiRef.current.getLocaleText('columnMenuFilter')\n })]\n });\n}\nprocess.env.NODE_ENV !== \"production\" ? GridColumnMenuFilterItem.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 MenuItem from '@mui/material/MenuItem';\nimport ListItemIcon from '@mui/material/ListItemIcon';\nimport ListItemText from '@mui/material/ListItemText';\nimport { useGridApiContext } from \"../../../../hooks/utils/useGridApiContext.js\";\nimport { useGridRootProps } from \"../../../../hooks/utils/useGridRootProps.js\";\nimport { gridVisibleColumnDefinitionsSelector } from \"../../../../hooks/features/columns/index.js\";\nimport { jsx as _jsx, jsxs as _jsxs } 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__*/_jsxs(MenuItem, {\n onClick: toggleColumn,\n disabled: disabled,\n children: [/*#__PURE__*/_jsx(ListItemIcon, {\n children: /*#__PURE__*/_jsx(rootProps.slots.columnMenuHideIcon, {\n fontSize: \"small\"\n })\n }), /*#__PURE__*/_jsx(ListItemText, {\n children: apiRef.current.getLocaleText('columnMenuHideColumn')\n })]\n });\n}\nprocess.env.NODE_ENV !== \"production\" ? GridColumnMenuHideItem.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 MenuItem from '@mui/material/MenuItem';\nimport ListItemIcon from '@mui/material/ListItemIcon';\nimport ListItemText from '@mui/material/ListItemText';\nimport { GridPreferencePanelsValue } from \"../../../../hooks/features/preferencesPanel/gridPreferencePanelsValue.js\";\nimport { useGridApiContext } from \"../../../../hooks/utils/useGridApiContext.js\";\nimport { useGridRootProps } from \"../../../../hooks/utils/useGridRootProps.js\";\nimport { jsx as _jsx, jsxs as _jsxs } 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__*/_jsxs(MenuItem, {\n onClick: showColumns,\n children: [/*#__PURE__*/_jsx(ListItemIcon, {\n children: /*#__PURE__*/_jsx(rootProps.slots.columnMenuManageColumnsIcon, {\n fontSize: \"small\"\n })\n }), /*#__PURE__*/_jsx(ListItemText, {\n children: apiRef.current.getLocaleText('columnMenuManageColumns')\n })]\n });\n}\nprocess.env.NODE_ENV !== \"production\" ? GridColumnMenuManageItem.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 * as React from 'react';\nimport PropTypes from 'prop-types';\nimport MenuItem from '@mui/material/MenuItem';\nimport ListItemIcon from '@mui/material/ListItemIcon';\nimport ListItemText from '@mui/material/ListItemText';\nimport { useGridSelector } from \"../../../../hooks/utils/useGridSelector.js\";\nimport { gridSortModelSelector } from \"../../../../hooks/features/sorting/gridSortingSelector.js\";\nimport { useGridApiContext } from \"../../../../hooks/utils/useGridApiContext.js\";\nimport { useGridRootProps } from \"../../../../hooks/utils/useGridRootProps.js\";\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 apiRef.current.sortColumn(colDef.field, direction === sortDirection ? null : direction);\n }, [apiRef, colDef, onClick, sortDirection]);\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__*/_jsxs(MenuItem, {\n onClick: onSortMenuItemClick,\n \"data-value\": \"asc\",\n children: [/*#__PURE__*/_jsx(ListItemIcon, {\n children: /*#__PURE__*/_jsx(rootProps.slots.columnMenuSortAscendingIcon, {\n fontSize: \"small\"\n })\n }), /*#__PURE__*/_jsx(ListItemText, {\n children: getLabel('columnMenuSortAsc')\n })]\n }) : null, sortingOrder.includes('desc') && sortDirection !== 'desc' ? /*#__PURE__*/_jsxs(MenuItem, {\n onClick: onSortMenuItemClick,\n \"data-value\": \"desc\",\n children: [/*#__PURE__*/_jsx(ListItemIcon, {\n children: /*#__PURE__*/_jsx(rootProps.slots.columnMenuSortDescendingIcon, {\n fontSize: \"small\"\n })\n }), /*#__PURE__*/_jsx(ListItemText, {\n children: getLabel('columnMenuSortDesc')\n })]\n }) : null, sortingOrder.includes(null) && sortDirection != null ? /*#__PURE__*/_jsxs(MenuItem, {\n onClick: onSortMenuItemClick,\n children: [/*#__PURE__*/_jsx(ListItemIcon, {}), /*#__PURE__*/_jsx(ListItemText, {\n children: apiRef.current.getLocaleText('columnMenuUnsort')\n })]\n }) : null]\n });\n}\nprocess.env.NODE_ENV !== \"production\" ? GridColumnMenuSortItem.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 };","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { GridPanelWrapper } from \"./GridPanelWrapper.js\";\nimport { GridColumnsManagement } from \"../columnsManagement/index.js\";\nimport { useGridRootProps } from \"../../hooks/utils/useGridRootProps.js\";\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(GridColumnsManagement, _extends({}, rootProps.slotProps?.columnsManagement))\n }));\n}\nprocess.env.NODE_ENV !== \"production\" ? GridColumnsPanel.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 slotProps: PropTypes.object\n} : void 0;\nexport { GridColumnsPanel };","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"children\", \"className\", \"classes\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { styled } from '@mui/material/styles';\nimport { unstable_generateUtilityClasses as generateUtilityClasses } from '@mui/utils';\nimport ClickAwayListener from '@mui/material/ClickAwayListener';\nimport Paper from '@mui/material/Paper';\nimport Popper from '@mui/material/Popper';\nimport { useGridApiContext } from \"../../hooks/utils/useGridApiContext.js\";\nimport { useGridRootProps } from \"../../hooks/utils/useGridRootProps.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport const gridPanelClasses = generateUtilityClasses('MuiDataGrid', ['panel', 'paper']);\nconst GridPanelRoot = styled(Popper, {\n name: 'MuiDataGrid',\n slot: 'Panel',\n overridesResolver: (props, styles) => styles.panel\n})(({\n theme\n}) => ({\n zIndex: theme.zIndex.modal\n}));\nconst GridPaperRoot = styled(Paper, {\n name: 'MuiDataGrid',\n slot: 'Paper',\n overridesResolver: (props, styles) => styles.paper\n})(({\n theme\n}) => ({\n backgroundColor: (theme.vars || theme).palette.background.paper,\n minWidth: 300,\n maxHeight: 450,\n display: 'flex',\n maxWidth: `calc(100vw - ${theme.spacing(0.5)})`,\n overflow: 'auto'\n}));\nconst GridPanel = /*#__PURE__*/React.forwardRef((props, ref) => {\n const {\n children,\n className\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 handleClickAway = React.useCallback(() => {\n apiRef.current.hidePreferences();\n }, [apiRef]);\n const handleKeyDown = React.useCallback(event => {\n if (event.key === 'Escape') {\n apiRef.current.hidePreferences();\n }\n }, [apiRef]);\n const modifiers = React.useMemo(() => [{\n name: 'flip',\n enabled: true,\n options: {\n rootBoundary: 'document'\n }\n }, {\n name: 'isPlaced',\n enabled: true,\n phase: 'main',\n fn: () => {\n setIsPlaced(true);\n },\n effect: () => () => {\n setIsPlaced(false);\n }\n }], []);\n const [anchorEl, setAnchorEl] = React.useState(null);\n React.useEffect(() => {\n const panelAnchor = apiRef.current.rootElementRef?.current?.querySelector('[data-id=\"gridPanelAnchor\"]');\n if (panelAnchor) {\n setAnchorEl(panelAnchor);\n }\n }, [apiRef]);\n if (!anchorEl) {\n return null;\n }\n return /*#__PURE__*/_jsx(GridPanelRoot, _extends({\n ref: ref,\n placement: \"bottom-start\",\n className: clsx(className, classes.panel),\n ownerState: rootProps,\n anchorEl: anchorEl,\n modifiers: modifiers\n }, other, {\n children: /*#__PURE__*/_jsx(ClickAwayListener, {\n mouseEvent: \"onMouseUp\",\n onClickAway: handleClickAway,\n children: /*#__PURE__*/_jsx(GridPaperRoot, {\n className: classes.paper,\n ownerState: rootProps,\n elevation: 8,\n onKeyDown: handleKeyDown,\n children: isPlaced && children\n })\n })\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? GridPanel.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 * Popper render function or node.\n */\n children: PropTypes.node,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * If `true`, the component is shown.\n */\n open: PropTypes.bool.isRequired,\n ownerState: PropTypes.object\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 { getDataGridUtilityClass } from \"../../constants/gridClasses.js\";\nimport { useGridRootProps } from \"../../hooks/utils/useGridRootProps.js\";\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 overridesResolver: (props, styles) => styles.panelContent\n})({\n display: 'flex',\n flexDirection: 'column',\n overflow: 'auto',\n flex: '1 1',\n maxHeight: 400\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(className, classes.root),\n ownerState: rootProps\n }, other));\n}\nprocess.env.NODE_ENV !== \"production\" ? GridPanelContent.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/system';\nimport composeClasses from '@mui/utils/composeClasses';\nimport { getDataGridUtilityClass } from \"../../constants/gridClasses.js\";\nimport { useGridRootProps } from \"../../hooks/utils/useGridRootProps.js\";\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 overridesResolver: (props, styles) => styles.panelFooter\n})(({\n theme\n}) => ({\n padding: theme.spacing(0.5),\n display: 'flex',\n justifyContent: 'space-between'\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(className, classes.root),\n ownerState: rootProps\n }, other));\n}\nprocess.env.NODE_ENV !== \"production\" ? GridPanelFooter.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\", \"slotProps\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport FocusTrap from '@mui/material/Unstable_TrapFocus';\nimport { styled } from '@mui/material/styles';\nimport composeClasses from '@mui/utils/composeClasses';\nimport { getDataGridUtilityClass } from \"../../constants/gridClasses.js\";\nimport { useGridRootProps } from \"../../hooks/utils/useGridRootProps.js\";\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 overridesResolver: (props, styles) => styles.panelWrapper\n})({\n display: 'flex',\n flexDirection: 'column',\n flex: 1,\n '&:focus': {\n outline: 0\n }\n});\nconst isEnabled = () => true;\nconst GridPanelWrapper = /*#__PURE__*/React.forwardRef(function GridPanelWrapper(props, ref) {\n const {\n className,\n slotProps = {}\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const rootProps = useGridRootProps();\n const classes = useUtilityClasses(rootProps);\n return /*#__PURE__*/_jsx(FocusTrap, _extends({\n open: true,\n disableEnforceFocus: true,\n isEnabled: isEnabled\n }, slotProps.TrapFocus, {\n children: /*#__PURE__*/_jsx(GridPanelWrapperRoot, _extends({\n ref: ref,\n tabIndex: -1,\n className: clsx(className, classes.root),\n ownerState: rootProps\n }, other))\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? GridPanelWrapper.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 slotProps: PropTypes.object\n} : void 0;\nexport { GridPanelWrapper };","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"item\", \"hasMultipleFilters\", \"deleteFilter\", \"applyFilterChanges\", \"showMultiFilterOperators\", \"disableMultiFilterOperator\", \"applyMultiFilterOperatorChanges\", \"focusElementRef\", \"logicOperators\", \"columnsSort\", \"filterColumns\", \"deleteIconProps\", \"logicOperatorInputProps\", \"operatorInputProps\", \"columnInputProps\", \"valueInputProps\", \"readOnly\", \"children\"],\n _excluded2 = [\"InputComponentProps\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { unstable_composeClasses as composeClasses, unstable_useId as useId, unstable_capitalize as capitalize } from '@mui/utils';\nimport { styled } from '@mui/material/styles';\nimport clsx from 'clsx';\nimport { gridFilterableColumnDefinitionsSelector, gridColumnLookupSelector } from \"../../../hooks/features/columns/gridColumnsSelector.js\";\nimport { gridFilterModelSelector } from \"../../../hooks/features/filter/gridFilterSelector.js\";\nimport { useGridSelector } from \"../../../hooks/utils/useGridSelector.js\";\nimport { GridLogicOperator } from \"../../../models/gridFilterItem.js\";\nimport { useGridApiContext } from \"../../../hooks/utils/useGridApiContext.js\";\nimport { useGridRootProps } from \"../../../hooks/utils/useGridRootProps.js\";\nimport { getDataGridUtilityClass } from \"../../../constants/gridClasses.js\";\nimport { getValueFromValueOptions, getValueOptions } from \"./filterPanelUtils.js\";\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 overridesResolver: (props, styles) => styles.filterForm\n})(({\n theme\n}) => ({\n display: 'flex',\n padding: theme.spacing(1)\n}));\nconst FilterFormDeleteIcon = styled('div', {\n name: 'MuiDataGrid',\n slot: 'FilterFormDeleteIcon',\n overridesResolver: (_, styles) => styles.filterFormDeleteIcon\n})(({\n theme\n}) => ({\n flexShrink: 0,\n justifyContent: 'flex-end',\n marginRight: theme.spacing(0.5),\n marginBottom: theme.spacing(0.2)\n}));\nconst FilterFormLogicOperatorInput = styled('div', {\n name: 'MuiDataGrid',\n slot: 'FilterFormLogicOperatorInput',\n overridesResolver: (_, styles) => styles.filterFormLogicOperatorInput\n})({\n minWidth: 55,\n marginRight: 5,\n justifyContent: 'end'\n});\nconst FilterFormColumnInput = styled('div', {\n name: 'MuiDataGrid',\n slot: 'FilterFormColumnInput',\n overridesResolver: (_, styles) => styles.filterFormColumnInput\n})({\n width: 150\n});\nconst FilterFormOperatorInput = styled('div', {\n name: 'MuiDataGrid',\n slot: 'FilterFormOperatorInput',\n overridesResolver: (_, styles) => styles.filterFormOperatorInput\n})({\n width: 150\n});\nconst FilterFormValueInput = styled('div', {\n name: 'MuiDataGrid',\n slot: 'FilterFormValueInput',\n overridesResolver: (_, styles) => styles.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('MUI X: Invalid `logicOperator` property in the `GridFilterPanel`.');\n }\n};\nconst getColumnLabel = col => col.headerName || col.field;\nconst collator = new Intl.Collator();\nconst GridFilterForm = /*#__PURE__*/React.forwardRef(function GridFilterForm(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 readOnly\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 filterModel = useGridSelector(apiRef, gridFilterModelSelector);\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 baseFormControlProps = rootProps.slotProps?.baseFormControl || {};\n const baseSelectProps = rootProps.slotProps?.baseSelect || {};\n const isBaseSelectNative = baseSelectProps.native ?? false;\n const baseInputLabelProps = rootProps.slotProps?.baseInputLabel || {};\n const baseSelectOptionProps = rootProps.slotProps?.baseSelectOption || {};\n const {\n InputComponentProps\n } = valueInputProps,\n valueInputPropsOther = _objectWithoutPropertiesLoose(valueInputProps, _excluded2);\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 (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 }, [filterColumns, filterModel?.items, filterableColumns, item.field, columnLookup]);\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 ref: ref,\n className: classes.root,\n \"data-id\": item.id,\n ownerState: rootProps\n }, other, {\n children: [/*#__PURE__*/_jsx(FilterFormDeleteIcon, _extends({\n variant: \"standard\",\n as: rootProps.slots.baseFormControl\n }, baseFormControlProps, deleteIconProps, {\n className: clsx(classes.deleteIcon, baseFormControlProps.className, 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 variant: \"standard\",\n as: rootProps.slots.baseFormControl\n }, baseFormControlProps, logicOperatorInputProps, {\n sx: [hasLogicOperatorColumn ? {\n display: 'flex'\n } : {\n display: 'none'\n }, showMultiFilterOperators ? {\n visibility: 'visible'\n } : {\n visibility: 'hidden'\n }, baseFormControlProps.sx, logicOperatorInputProps.sx],\n className: clsx(classes.logicOperatorInput, baseFormControlProps.className, logicOperatorInputProps.className),\n ownerState: rootProps,\n children: /*#__PURE__*/_jsx(rootProps.slots.baseSelect, _extends({\n inputProps: {\n 'aria-label': apiRef.current.getLocaleText('filterPanelLogicOperator')\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 }))\n })), /*#__PURE__*/_jsxs(FilterFormColumnInput, _extends({\n variant: \"standard\",\n as: rootProps.slots.baseFormControl\n }, baseFormControlProps, columnInputProps, {\n className: clsx(classes.columnInput, baseFormControlProps.className, columnInputProps.className),\n ownerState: rootProps,\n children: [/*#__PURE__*/_jsx(rootProps.slots.baseInputLabel, _extends({}, baseInputLabelProps, {\n htmlFor: columnSelectId,\n id: columnSelectLabelId,\n children: apiRef.current.getLocaleText('filterPanelColumns')\n })), /*#__PURE__*/_jsx(rootProps.slots.baseSelect, _extends({\n labelId: columnSelectLabelId,\n id: columnSelectId,\n label: apiRef.current.getLocaleText('filterPanelColumns'),\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 }))]\n })), /*#__PURE__*/_jsxs(FilterFormOperatorInput, _extends({\n variant: \"standard\",\n as: rootProps.slots.baseFormControl\n }, baseFormControlProps, operatorInputProps, {\n className: clsx(classes.operatorInput, baseFormControlProps.className, operatorInputProps.className),\n ownerState: rootProps,\n children: [/*#__PURE__*/_jsx(rootProps.slots.baseInputLabel, _extends({}, baseInputLabelProps, {\n htmlFor: operatorSelectId,\n id: operatorSelectLabelId,\n children: apiRef.current.getLocaleText('filterPanelOperator')\n })), /*#__PURE__*/_jsx(rootProps.slots.baseSelect, _extends({\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 }))]\n })), /*#__PURE__*/_jsx(FilterFormValueInput, _extends({\n variant: \"standard\",\n as: rootProps.slots.baseFormControl\n }, baseFormControlProps, valueInputPropsOther, {\n className: clsx(classes.valueInput, baseFormControlProps.className, 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 }, currentOperator.InputComponentProps, InputComponentProps), item.field) : null\n }))]\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? GridFilterForm.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 };","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"item\", \"applyValue\", \"apiRef\", \"focusElementRef\", \"isFilterActive\", \"clearButton\", \"tabIndex\", \"label\", \"variant\", \"InputLabelProps\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { refType, unstable_useId as useId } from '@mui/utils';\nimport { styled } from '@mui/material/styles';\nimport { useGridRootProps } from \"../../../hooks/utils/useGridRootProps.js\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst BooleanOperatorContainer = styled('div')({\n display: 'flex',\n alignItems: 'center',\n width: '100%',\n [`& button`]: {\n margin: 'auto 0px 5px 5px'\n }\n});\nfunction GridFilterInputBoolean(props) {\n const {\n item,\n applyValue,\n apiRef,\n focusElementRef,\n clearButton,\n tabIndex,\n label: labelProp,\n variant = 'standard'\n } = props,\n others = _objectWithoutPropertiesLoose(props, _excluded);\n const [filterValueState, setFilterValueState] = React.useState(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 = event.target.value;\n setFilterValueState(value);\n applyValue(_extends({}, item, {\n value\n }));\n }, [applyValue, item]);\n React.useEffect(() => {\n setFilterValueState(item.value || '');\n }, [item.value]);\n const label = labelProp ?? apiRef.current.getLocaleText('filterPanelInputLabel');\n return /*#__PURE__*/_jsxs(BooleanOperatorContainer, {\n children: [/*#__PURE__*/_jsxs(rootProps.slots.baseFormControl, {\n fullWidth: true,\n children: [/*#__PURE__*/_jsx(rootProps.slots.baseInputLabel, _extends({}, rootProps.slotProps?.baseInputLabel, {\n id: labelId,\n shrink: true,\n variant: variant,\n children: label\n })), /*#__PURE__*/_jsxs(rootProps.slots.baseSelect, _extends({\n labelId: labelId,\n id: selectId,\n label: label,\n value: filterValueState,\n onChange: onFilterChange,\n variant: variant,\n notched: variant === 'outlined' ? true : undefined,\n native: isSelectNative,\n displayEmpty: true,\n inputProps: {\n ref: focusElementRef,\n tabIndex\n }\n }, others /* FIXME: typing error */, baseSelectProps, {\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 }))]\n }), clearButton]\n });\n}\nprocess.env.NODE_ENV !== \"production\" ? GridFilterInputBoolean.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 clearButton: PropTypes.node,\n focusElementRef: refType,\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} : void 0;\nexport { GridFilterInputBoolean };","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"item\", \"applyValue\", \"type\", \"apiRef\", \"focusElementRef\", \"InputProps\", \"isFilterActive\", \"clearButton\", \"tabIndex\", \"disabled\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { unstable_useId as useId } from '@mui/utils';\nimport { useTimeout } from \"../../../hooks/utils/useTimeout.js\";\nimport { useGridRootProps } from \"../../../hooks/utils/useGridRootProps.js\";\nimport { jsx as _jsx } 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 InputProps,\n clearButton,\n tabIndex,\n disabled\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\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 onFilterChange = React.useCallback(event => {\n filterTimeout.clear();\n const value = event.target.value;\n setFilterValueState(value);\n setIsApplying(true);\n filterTimeout.start(rootProps.filterDebounceMs, () => {\n const date = new Date(value);\n applyValue(_extends({}, item, {\n value: Number.isNaN(date.getTime()) ? undefined : date\n }));\n setIsApplying(false);\n });\n }, [applyValue, item, rootProps.filterDebounceMs, filterTimeout]);\n React.useEffect(() => {\n const value = convertFilterItemValueToInputValue(item.value, type);\n setFilterValueState(value);\n }, [item.value, type]);\n return /*#__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 variant: \"standard\",\n type: type || 'text',\n InputLabelProps: {\n shrink: true\n },\n inputRef: focusElementRef,\n InputProps: _extends({}, applying || clearButton ? {\n endAdornment: applying ? /*#__PURE__*/_jsx(rootProps.slots.loadIcon, {\n fontSize: \"small\",\n color: \"action\"\n }) : clearButton\n } : {}, {\n disabled\n }, InputProps, {\n inputProps: _extends({\n max: type === 'datetime-local' ? '9999-12-31T23:59' : '9999-12-31',\n tabIndex\n }, InputProps?.inputProps)\n })\n }, other, rootProps.slotProps?.baseTextField));\n}\nprocess.env.NODE_ENV !== \"production\" ? GridFilterInputDate.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 clearButton: PropTypes.node,\n focusElementRef: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.func, PropTypes.object]),\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} : void 0;\nexport { GridFilterInputDate };","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"item\", \"applyValue\", \"type\", \"apiRef\", \"focusElementRef\", \"color\", \"error\", \"helperText\", \"size\", \"variant\"],\n _excluded2 = [\"key\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport Autocomplete, { createFilterOptions } from '@mui/material/Autocomplete';\nimport { unstable_useId as useId } from '@mui/utils';\nimport { getValueOptions, isSingleSelectColDef } from \"./filterPanelUtils.js\";\nimport { useGridRootProps } from \"../../../hooks/utils/useGridRootProps.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst filter = createFilterOptions();\nfunction GridFilterInputMultipleSingleSelect(props) {\n const {\n item,\n applyValue,\n apiRef,\n focusElementRef,\n color,\n error,\n helperText,\n size,\n variant = 'standard'\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const TextFieldProps = {\n color,\n error,\n helperText,\n size,\n variant\n };\n const id = useId();\n const rootProps = useGridRootProps();\n let resolvedColumn = null;\n if (item.field) {\n const column = apiRef.current.getColumn(item.field);\n if (isSingleSelectColDef(column)) {\n resolvedColumn = column;\n }\n }\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 return /*#__PURE__*/_jsx(Autocomplete, _extends({\n multiple: true,\n options: resolvedValueOptions,\n isOptionEqualToValue: isOptionEqualToValue,\n filterOptions: filter,\n id: id,\n value: filteredValues,\n onChange: handleChange,\n getOptionLabel: getOptionLabel,\n renderTags: (value, getTagProps) => value.map((option, index) => {\n const _getTagProps = getTagProps({\n index\n }),\n {\n key\n } = _getTagProps,\n tagProps = _objectWithoutPropertiesLoose(_getTagProps, _excluded2);\n return /*#__PURE__*/_jsx(rootProps.slots.baseChip, _extends({\n variant: \"outlined\",\n size: \"small\",\n label: getOptionLabel(option)\n }, tagProps), key);\n }),\n renderInput: params => /*#__PURE__*/_jsx(rootProps.slots.baseTextField, _extends({}, params, {\n label: apiRef.current.getLocaleText('filterPanelInputLabel'),\n placeholder: apiRef.current.getLocaleText('filterPanelInputPlaceholder'),\n InputLabelProps: _extends({}, params.InputLabelProps, {\n shrink: true\n }),\n inputRef: focusElementRef,\n type: \"singleSelect\"\n }, TextFieldProps, rootProps.slotProps?.baseTextField))\n }, other));\n}\nprocess.env.NODE_ENV !== \"production\" ? GridFilterInputMultipleSingleSelect.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 focusElementRef: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.func, PropTypes.object]),\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 type: PropTypes.oneOf(['singleSelect'])\n} : void 0;\nexport { GridFilterInputMultipleSingleSelect };","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"item\", \"applyValue\", \"type\", \"apiRef\", \"focusElementRef\", \"color\", \"error\", \"helperText\", \"size\", \"variant\"],\n _excluded2 = [\"key\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport Autocomplete from '@mui/material/Autocomplete';\nimport { unstable_useId as useId } from '@mui/utils';\nimport { useGridRootProps } from \"../../../hooks/utils/useGridRootProps.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction GridFilterInputMultipleValue(props) {\n const {\n item,\n applyValue,\n type,\n apiRef,\n focusElementRef,\n color,\n error,\n helperText,\n size,\n variant = 'standard'\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const TextFieldProps = {\n color,\n error,\n helperText,\n size,\n variant\n };\n const [filterValueState, setFilterValueState] = React.useState(item.value || []);\n const id = useId();\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]\n }));\n }, [applyValue, item]);\n return /*#__PURE__*/_jsx(Autocomplete, _extends({\n multiple: true,\n freeSolo: true,\n options: [],\n filterOptions: (options, params) => {\n const {\n inputValue\n } = params;\n return inputValue == null || inputValue === '' ? [] : [inputValue];\n },\n id: id,\n value: filterValueState,\n onChange: handleChange,\n renderTags: (value, getTagProps) => value.map((option, index) => {\n const _getTagProps = getTagProps({\n index\n }),\n {\n key\n } = _getTagProps,\n tagProps = _objectWithoutPropertiesLoose(_getTagProps, _excluded2);\n return /*#__PURE__*/_jsx(rootProps.slots.baseChip, _extends({\n variant: \"outlined\",\n size: \"small\",\n label: option\n }, tagProps), key);\n }),\n renderInput: params => /*#__PURE__*/_jsx(rootProps.slots.baseTextField, _extends({}, params, {\n label: apiRef.current.getLocaleText('filterPanelInputLabel'),\n placeholder: apiRef.current.getLocaleText('filterPanelInputPlaceholder'),\n InputLabelProps: _extends({}, params.InputLabelProps, {\n shrink: true\n }),\n inputRef: focusElementRef,\n type: type || 'text'\n }, TextFieldProps, rootProps.slotProps?.baseTextField))\n }, other));\n}\nprocess.env.NODE_ENV !== \"production\" ? GridFilterInputMultipleValue.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 focusElementRef: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.func, PropTypes.object]),\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 type: PropTypes.oneOf(['date', 'datetime-local', 'number', 'text'])\n} : void 0;\nexport { GridFilterInputMultipleValue };","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"item\", \"applyValue\", \"type\", \"apiRef\", \"focusElementRef\", \"placeholder\", \"tabIndex\", \"label\", \"variant\", \"isFilterActive\", \"clearButton\", \"InputLabelProps\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { unstable_useId as useId } from '@mui/utils';\nimport { styled } from '@mui/material/styles';\nimport { useGridRootProps } from \"../../../hooks/utils/useGridRootProps.js\";\nimport { getValueFromValueOptions, getValueOptions, isSingleSelectColDef } from \"./filterPanelUtils.js\";\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};\nconst SingleSelectOperatorContainer = styled('div')({\n display: 'flex',\n alignItems: 'flex-end',\n width: '100%',\n [`& button`]: {\n margin: 'auto 0px 5px 5px'\n }\n});\nfunction GridFilterInputSingleSelect(props) {\n const {\n item,\n applyValue,\n type,\n apiRef,\n focusElementRef,\n placeholder,\n tabIndex,\n label: labelProp,\n variant = 'standard',\n clearButton\n } = props,\n others = _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 let resolvedColumn = null;\n if (item.field) {\n const column = apiRef.current.getColumn(item.field);\n if (isSingleSelectColDef(column)) {\n resolvedColumn = column;\n }\n }\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 let value = event.target.value;\n\n // NativeSelect casts the value to a string.\n value = getValueFromValueOptions(value, currentValueOptions, getOptionValue);\n applyValue(_extends({}, item, {\n value\n }));\n }, [currentValueOptions, getOptionValue, applyValue, item]);\n if (!isSingleSelectColDef(resolvedColumn)) {\n return null;\n }\n const label = labelProp ?? apiRef.current.getLocaleText('filterPanelInputLabel');\n return /*#__PURE__*/_jsxs(SingleSelectOperatorContainer, {\n children: [/*#__PURE__*/_jsxs(rootProps.slots.baseFormControl, {\n fullWidth: true,\n children: [/*#__PURE__*/_jsx(rootProps.slots.baseInputLabel, _extends({}, rootProps.slotProps?.baseInputLabel, {\n id: labelId,\n htmlFor: id,\n shrink: true,\n variant: variant,\n children: label\n })), /*#__PURE__*/_jsx(rootProps.slots.baseSelect, _extends({\n id: id,\n label: label,\n labelId: labelId,\n value: filterValue,\n onChange: onFilterChange,\n variant: variant,\n type: type || 'text',\n inputProps: {\n tabIndex,\n ref: focusElementRef,\n placeholder: placeholder ?? apiRef.current.getLocaleText('filterPanelInputPlaceholder')\n },\n native: isSelectNative,\n notched: variant === 'outlined' ? true : undefined\n }, others /* FIXME: typing error */, rootProps.slotProps?.baseSelect, {\n children: renderSingleSelectOptions({\n column: resolvedColumn,\n OptionComponent: rootProps.slots.baseSelectOption,\n getOptionLabel,\n getOptionValue,\n isSelectNative,\n baseSelectOptionProps: rootProps.slotProps?.baseSelectOption\n })\n }))]\n }), clearButton]\n });\n}\nprocess.env.NODE_ENV !== \"production\" ? GridFilterInputSingleSelect.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 clearButton: PropTypes.node,\n focusElementRef: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.func, PropTypes.object]),\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} : void 0;\nexport { GridFilterInputSingleSelect };","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"item\", \"applyValue\", \"type\", \"apiRef\", \"focusElementRef\", \"tabIndex\", \"disabled\", \"isFilterActive\", \"clearButton\", \"InputProps\", \"variant\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { unstable_useId as useId } from '@mui/utils';\nimport { useTimeout } from \"../../../hooks/utils/useTimeout.js\";\nimport { useGridRootProps } from \"../../../hooks/utils/useGridRootProps.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction GridFilterInputValue(props) {\n const {\n item,\n applyValue,\n type,\n apiRef,\n focusElementRef,\n tabIndex,\n disabled,\n clearButton,\n InputProps,\n variant = 'standard'\n } = props,\n others = _objectWithoutPropertiesLoose(props, _excluded);\n const filterTimeout = useTimeout();\n const [filterValueState, setFilterValueState] = React.useState(item.value ?? '');\n const [applying, setIsApplying] = React.useState(false);\n const id = useId();\n const rootProps = useGridRootProps();\n const onFilterChange = React.useCallback(event => {\n const {\n value\n } = event.target;\n setFilterValueState(String(value));\n setIsApplying(true);\n filterTimeout.start(rootProps.filterDebounceMs, () => {\n const newItem = _extends({}, item, {\n value,\n fromInput: id\n });\n applyValue(newItem);\n setIsApplying(false);\n });\n }, [id, applyValue, item, rootProps.filterDebounceMs, filterTimeout]);\n React.useEffect(() => {\n const itemPlusTag = item;\n if (itemPlusTag.fromInput !== id || item.value === undefined) {\n setFilterValueState(String(item.value ?? ''));\n }\n }, [id, item]);\n return /*#__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 variant: variant,\n type: type || 'text',\n InputProps: _extends({}, applying || clearButton ? {\n endAdornment: applying ? /*#__PURE__*/_jsx(rootProps.slots.loadIcon, {\n fontSize: \"small\",\n color: \"action\"\n }) : clearButton\n } : {}, {\n disabled\n }, InputProps, {\n inputProps: _extends({\n tabIndex\n }, InputProps?.inputProps)\n }),\n InputLabelProps: {\n shrink: true\n },\n inputRef: focusElementRef\n }, others, rootProps.slotProps?.baseTextField));\n}\nprocess.env.NODE_ENV !== \"production\" ? GridFilterInputValue.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 clearButton: PropTypes.node,\n focusElementRef: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.func, PropTypes.object]),\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} : void 0;\nexport { GridFilterInputValue };","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"logicOperators\", \"columnsSort\", \"filterFormProps\", \"getColumnForNewFilter\", \"children\", \"disableAddFilterButton\", \"disableRemoveAllButton\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { GridLogicOperator } from \"../../../models/gridFilterItem.js\";\nimport { useGridApiContext } from \"../../../hooks/utils/useGridApiContext.js\";\nimport { GridPanelContent } from \"../GridPanelContent.js\";\nimport { GridPanelFooter } from \"../GridPanelFooter.js\";\nimport { GridPanelWrapper } from \"../GridPanelWrapper.js\";\nimport { GridFilterForm } from \"./GridFilterForm.js\";\nimport { useGridRootProps } from \"../../../hooks/utils/useGridRootProps.js\";\nimport { useGridSelector } from \"../../../hooks/utils/useGridSelector.js\";\nimport { gridFilterModelSelector } from \"../../../hooks/features/filter/gridFilterSelector.js\";\nimport { gridFilterableColumnDefinitionsSelector, gridFilterableColumnLookupSelector } from \"../../../hooks/features/columns/gridColumnsSelector.js\";\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 GridFilterPanel = /*#__PURE__*/React.forwardRef(function GridFilterPanel(props, ref) {\n const apiRef = useGridApiContext();\n const rootProps = useGridRootProps();\n const filterModel = useGridSelector(apiRef, gridFilterModelSelector);\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 } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const applyFilter = apiRef.current.upsertFilterItem;\n const applyFilterLogicOperator = React.useCallback(operator => {\n apiRef.current.setFilterLogicOperator(operator);\n }, [apiRef]);\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 apiRef.current.upsertFilterItems([...items, newFilter]);\n }, [apiRef, getNewFilter, items]);\n const deleteFilter = React.useCallback(item => {\n const shouldCloseFilterPanel = validFilters.length === 1;\n apiRef.current.deleteFilterItem(item);\n if (shouldCloseFilterPanel) {\n apiRef.current.hideFilterPanel();\n }\n }, [apiRef, validFilters.length]);\n const handleRemoveAll = React.useCallback(() => {\n if (validFilters.length === 1 && validFilters[0].value === undefined) {\n apiRef.current.deleteFilterItem(validFilters[0]);\n return apiRef.current.hideFilterPanel();\n }\n return apiRef.current.setFilterModel(_extends({}, filterModel, {\n items: readOnlyFilters\n }), 'removeAllFilterItems');\n }, [apiRef, readOnlyFilters, filterModel, 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({\n ref: ref\n }, other, {\n children: [/*#__PURE__*/_jsxs(GridPanelContent, {\n children: [readOnlyFilters.map((item, index) => /*#__PURE__*/_jsx(GridFilterForm, _extends({\n item: item,\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 }, filterFormProps), item.id == null ? index : item.id)), validFilters.map((item, index) => /*#__PURE__*/_jsx(GridFilterForm, _extends({\n item: item,\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 }, 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});\nprocess.env.NODE_ENV !== \"production\" ? GridFilterPanel.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, getGridFilter };","import _extends from \"@babel/runtime/helpers/esm/extends\";\nexport function isSingleSelectColDef(colDef) {\n return colDef?.type === 'singleSelect';\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}","import _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 MenuItem from '@mui/material/MenuItem';\nimport { useGridApiContext } from \"../../hooks/utils/useGridApiContext.js\";\nimport { GridToolbarExportContainer } from \"./GridToolbarExportContainer.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport function GridCsvExportMenuItem(props) {\n const apiRef = useGridApiContext();\n const {\n hideMenu,\n options\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n return /*#__PURE__*/_jsx(MenuItem, _extends({\n onClick: () => {\n apiRef.current.exportDataAsCsv(options);\n hideMenu?.();\n }\n }, other, {\n children: apiRef.current.getLocaleText('toolbarExportCSV')\n }));\n}\nexport function GridPrintExportMenuItem(props) {\n const apiRef = useGridApiContext();\n const {\n hideMenu,\n options\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded2);\n return /*#__PURE__*/_jsx(MenuItem, _extends({\n onClick: () => {\n apiRef.current.exportDataAsPrint(options);\n hideMenu?.();\n }\n }, other, {\n children: apiRef.current.getLocaleText('toolbarExportPrint')\n }));\n}\nconst GridToolbarExport = /*#__PURE__*/React.forwardRef(function GridToolbarExport(props, ref) {\n const {\n csvOptions = {},\n printOptions = {},\n excelOptions\n } = props,\n other = _objectWithoutPropertiesLoose(props, _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});\nprocess.env.NODE_ENV !== \"production\" ? GridToolbarExport.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 };","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { unstable_useId as useId, unstable_useForkRef as useForkRef } from '@mui/utils';\nimport MenuList from '@mui/material/MenuList';\nimport { isHideMenuKey } from \"../../utils/keyboardUtils.js\";\nimport { useGridApiContext } from \"../../hooks/utils/useGridApiContext.js\";\nimport { GridMenu } from \"../menu/GridMenu.js\";\nimport { useGridRootProps } from \"../../hooks/utils/useGridRootProps.js\";\nimport { gridClasses } from \"../../constants/gridClasses.js\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst GridToolbarExportContainer = /*#__PURE__*/React.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 const handleListKeyDown = event => {\n if (event.key === 'Tab') {\n event.preventDefault();\n }\n if (isHideMenuKey(event.key)) {\n handleMenuClose();\n }\n };\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 }, tooltipProps, rootProps.slotProps?.baseTooltip, {\n children: /*#__PURE__*/_jsx(rootProps.slots.baseButton, _extends({\n ref: handleRef,\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 }, buttonProps, {\n onClick: handleMenuOpen\n }, rootProps.slotProps?.baseButton, {\n children: apiRef.current.getLocaleText('toolbarExport')\n }))\n })), /*#__PURE__*/_jsx(GridMenu, {\n open: open,\n target: buttonRef.current,\n onClose: handleMenuClose,\n position: \"bottom-start\",\n children: /*#__PURE__*/_jsx(MenuList, {\n id: exportMenuId,\n className: gridClasses.menuList,\n \"aria-labelledby\": exportButtonId,\n onKeyDown: handleListKeyDown,\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});\nprocess.env.NODE_ENV !== \"production\" ? GridToolbarExportContainer.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 };","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport clsx from 'clsx';\nimport { unstable_composeClasses as composeClasses, unstable_useEventCallback as useEventCallback } from '@mui/utils';\nimport { styled } from '@mui/system';\nimport { fastMemo } from '@mui/x-internals/fastMemo';\nimport { useGridRootProps } from \"../hooks/utils/useGridRootProps.js\";\nimport { getDataGridUtilityClass, gridClasses } from \"../constants/index.js\";\nimport { useGridApiContext } from \"../hooks/utils/useGridApiContext.js\";\nimport { useGridApiEventHandler } from \"../hooks/utils/useGridApiEventHandler.js\";\nimport { useGridSelector } from \"../hooks/utils/useGridSelector.js\";\nimport { gridDimensionsSelector } from \"../hooks/features/dimensions/gridDimensionsSelectors.js\";\nimport { gridDensityFactorSelector } from \"../hooks/features/density/densitySelector.js\";\nimport { gridColumnsTotalWidthSelector } from \"../hooks/features/columns/gridColumnsSelector.js\";\nimport { useTimeout } from \"../hooks/utils/useTimeout.js\";\nimport { getTotalHeaderHeight } from \"../hooks/features/columns/gridColumnsUtils.js\";\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 [`&.${gridClasses['scrollArea--left']}`]: styles['scrollArea--left']\n }, {\n [`&.${gridClasses['scrollArea--right']}`]: styles['scrollArea--right']\n }, styles.scrollArea]\n})(() => ({\n position: 'absolute',\n top: 0,\n zIndex: 101,\n width: 20,\n bottom: 0,\n [`&.${gridClasses['scrollArea--left']}`]: {\n left: 0\n },\n [`&.${gridClasses['scrollArea--right']}`]: {\n right: 0\n }\n}));\nfunction GridScrollAreaRaw(props) {\n const {\n scrollDirection\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 dimensions = useGridSelector(apiRef, gridDimensionsSelector);\n const scrollPosition = React.useRef({\n left: 0,\n top: 0\n });\n const getCanScrollMore = () => {\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 [dragging, setDragging] = React.useState(false);\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 totalHeaderHeight = getTotalHeaderHeight(apiRef, rootProps);\n const headerHeight = Math.floor(rootProps.columnHeaderHeight * densityFactor);\n const style = {\n height: headerHeight,\n top: totalHeaderHeight - headerHeight\n };\n if (scrollDirection === 'left') {\n style.left = dimensions.leftPinnedWidth;\n } else if (scrollDirection === 'right') {\n style.right = dimensions.rightPinnedWidth + (dimensions.hasScrollX ? dimensions.scrollbarSize : 0);\n }\n const handleScrolling = newScrollPosition => {\n scrollPosition.current = newScrollPosition;\n setCanScrollMore(getCanScrollMore);\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('MUI X: Wrong drag direction');\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 const handleColumnHeaderDragStart = useEventCallback(() => {\n setDragging(true);\n });\n const handleColumnHeaderDragEnd = useEventCallback(() => {\n setDragging(false);\n });\n useGridApiEventHandler(apiRef, 'scrollPositionChange', handleScrolling);\n useGridApiEventHandler(apiRef, 'columnHeaderDragStart', handleColumnHeaderDragStart);\n useGridApiEventHandler(apiRef, 'columnHeaderDragEnd', handleColumnHeaderDragEnd);\n if (!dragging || !canScrollMore) {\n return null;\n }\n return /*#__PURE__*/_jsx(GridScrollAreaRawRoot, {\n ref: rootRef,\n className: clsx(classes.root),\n ownerState: ownerState,\n onDragOver: handleDragOver,\n style: style\n });\n}\nexport const GridScrollArea = fastMemo(GridScrollAreaRaw);","import { useGridSelector } from \"../../utils/index.js\";\nimport { useGridApiContext } from \"../../utils/useGridApiContext.js\";\nimport { useGridRootProps } from \"../../utils/useGridRootProps.js\";\nimport { gridExpandedRowCountSelector } from \"../filter/index.js\";\nimport { gridRowCountSelector, gridRowsLoadingSelector } from \"../rows/index.js\";\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 = () => {\n const apiRef = useGridApiContext();\n const rootProps = useGridRootProps();\n const totalRowCount = useGridSelector(apiRef, gridRowCountSelector);\n const visibleRowCount = useGridSelector(apiRef, gridExpandedRowCountSelector);\n const noRows = totalRowCount === 0;\n const loading = useGridSelector(apiRef, gridRowsLoadingSelector);\n const showNoRowsOverlay = !loading && noRows;\n const showNoResultsOverlay = !loading && totalRowCount > 0 && visibleRowCount === 0;\n let overlayType = null;\n let loadingOverlayVariant = null;\n if (showNoRowsOverlay) {\n overlayType = 'noRowsOverlay';\n }\n if (showNoResultsOverlay) {\n overlayType = 'noResultsOverlay';\n }\n if (loading) {\n overlayType = 'loadingOverlay';\n loadingOverlayVariant = rootProps.slotProps?.loadingOverlay?.[noRows ? 'noRowsVariant' : 'variant'] || null;\n }\n return {\n overlayType,\n loadingOverlayVariant\n };\n};","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport { fastMemo } from '@mui/x-internals/fastMemo';\nimport { useGridPrivateApiContext } from \"../hooks/utils/useGridPrivateApiContext.js\";\nimport { useGridSelector } from \"../hooks/utils/useGridSelector.js\";\nimport { useGridRootProps } from \"../hooks/utils/useGridRootProps.js\";\nimport { gridColumnVisibilityModelSelector, gridVisibleColumnDefinitionsSelector } from \"../hooks/features/columns/gridColumnsSelector.js\";\nimport { gridFilterActiveItemsLookupSelector } from \"../hooks/features/filter/gridFilterSelector.js\";\nimport { gridSortColumnLookupSelector } from \"../hooks/features/sorting/gridSortingSelector.js\";\nimport { gridTabIndexColumnHeaderSelector, gridTabIndexCellSelector, gridFocusColumnHeaderSelector, gridTabIndexColumnGroupHeaderSelector, gridFocusColumnGroupHeaderSelector } from \"../hooks/features/focus/gridFocusStateSelector.js\";\nimport { gridColumnGroupsHeaderMaxDepthSelector, gridColumnGroupsHeaderStructureSelector } from \"../hooks/features/columnGrouping/gridColumnGroupsSelector.js\";\nimport { gridColumnMenuSelector } from \"../hooks/features/columnMenu/columnMenuSelector.js\";\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 cellTabIndexState = useGridSelector(apiRef, gridTabIndexCellSelector);\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 && cellTabIndexState === null);\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 };","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport { styled } from '@mui/system';\nimport { useGridRootProps } from \"../../hooks/utils/useGridRootProps.js\";\nimport { useGridConfiguration } from \"../../hooks/utils/useGridConfiguration.js\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst GridPanelAnchor = styled('div')({\n position: 'absolute',\n top: `var(--DataGrid-headersTotalHeight)`,\n left: 0\n});\nconst Element = styled('div', {\n name: 'MuiDataGrid',\n slot: 'Main',\n overridesResolver: (props, styles) => styles.main\n})({\n flexGrow: 1,\n position: 'relative',\n overflow: 'hidden'\n});\nexport const GridMainContainer = /*#__PURE__*/React.forwardRef((props, ref) => {\n const rootProps = useGridRootProps();\n const configuration = useGridConfiguration();\n const ariaAttributes = configuration.hooks.useGridAriaAttributes();\n return /*#__PURE__*/_jsxs(Element, _extends({\n ref: ref,\n ownerState: rootProps,\n className: props.className,\n tabIndex: -1\n }, ariaAttributes, {\n children: [/*#__PURE__*/_jsx(GridPanelAnchor, {\n role: \"presentation\",\n \"data-id\": \"gridPanelAnchor\"\n }), props.children]\n }));\n});","import _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 { gridClasses, getDataGridUtilityClass } from \"../../constants/gridClasses.js\";\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 position: 'sticky',\n zIndex: 4,\n top: 0\n});\nexport function GridTopContainer(props) {\n const classes = useUtilityClasses();\n return /*#__PURE__*/_jsx(Element, _extends({}, props, {\n className: clsx(classes.root, props.className, gridClasses['container--top']),\n role: \"presentation\"\n }));\n}","import _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 { gridClasses, getDataGridUtilityClass } from \"../../constants/gridClasses.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst useUtilityClasses = () => {\n const slots = {\n root: ['bottomContainer']\n };\n return composeClasses(slots, getDataGridUtilityClass, {});\n};\nconst Element = styled('div')({\n position: 'sticky',\n zIndex: 4,\n bottom: 'calc(var(--DataGrid-hasScrollX) * var(--DataGrid-scrollbarSize))'\n});\nexport function GridBottomContainer(props) {\n const classes = useUtilityClasses();\n return /*#__PURE__*/_jsx(Element, _extends({}, props, {\n className: clsx(classes.root, props.className, gridClasses['container--bottom']),\n role: \"presentation\"\n }));\n}","import _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 { useGridRootProps } from \"../../hooks/utils/useGridRootProps.js\";\nimport { getDataGridUtilityClass } from \"../../constants/gridClasses.js\";\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) => styles.virtualScrollerContent\n})({});\nconst GridVirtualScrollerContent = /*#__PURE__*/React.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 return /*#__PURE__*/_jsx(VirtualScrollerContentRoot, _extends({\n ref: ref\n }, props, {\n ownerState: rootProps,\n className: clsx(classes.root, props.className)\n }));\n});\nexport { GridVirtualScrollerContent };","import * as React from 'react';\nimport { styled } from '@mui/system';\nimport { fastMemo } from '@mui/x-internals/fastMemo';\nimport { useGridSelector } from \"../../hooks/utils/useGridSelector.js\";\nimport { useGridApiContext } from \"../../hooks/utils/useGridApiContext.js\";\nimport { gridDimensionsSelector } from \"../../hooks/features/dimensions/index.js\";\nimport { gridClasses } from \"../../constants/index.js\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst Filler = styled('div')({\n display: 'flex',\n flexDirection: 'row',\n width: 'var(--DataGrid-rowWidth)',\n boxSizing: 'border-box'\n});\nconst Pinned = styled('div')({\n position: 'sticky',\n height: '100%',\n boxSizing: 'border-box',\n borderTop: '1px solid var(--rowBorderColor)',\n backgroundColor: 'var(--DataGrid-pinnedBackground)'\n});\nconst PinnedLeft = styled(Pinned)({\n left: 0,\n borderRight: '1px solid var(--rowBorderColor)'\n});\nconst PinnedRight = styled(Pinned)({\n right: 0,\n borderLeft: '1px solid var(--rowBorderColor)'\n});\nconst Main = styled('div')({\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 scrollbarHeight = hasScrollX ? scrollbarSize : 0;\n const expandedHeight = viewportOuterSize.height - minimumSize.height - scrollbarHeight;\n const height = Math.max(scrollbarHeight, expandedHeight);\n if (height === 0) {\n return null;\n }\n return /*#__PURE__*/_jsxs(Filler, {\n className: gridClasses.filler,\n role: \"presentation\",\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 };","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 clsx from 'clsx';\nimport { styled } from '@mui/system';\nimport composeClasses from '@mui/utils/composeClasses';\nimport { useGridApiContext } from \"../../hooks/utils/useGridApiContext.js\";\nimport { useGridSelector } from \"../../hooks/utils/useGridSelector.js\";\nimport { gridRowsMetaSelector } from \"../../hooks/features/rows/index.js\";\nimport { gridRenderContextSelector } from \"../../hooks/features/virtualization/index.js\";\nimport { useGridRootProps } from \"../../hooks/utils/useGridRootProps.js\";\nimport { getDataGridUtilityClass } from \"../../constants/gridClasses.js\";\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 overridesResolver: (props, styles) => styles.virtualScrollerRenderZone\n})({\n position: 'absolute',\n display: 'flex',\n // Prevents margin collapsing when using `getRowSpacing`\n flexDirection: 'column'\n});\nconst GridVirtualScrollerRenderZone = /*#__PURE__*/React.forwardRef(function GridVirtualScrollerRenderZone(props, ref) {\n const {\n className\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const apiRef = useGridApiContext();\n const rootProps = useGridRootProps();\n const classes = useUtilityClasses(rootProps);\n const offsetTop = useGridSelector(apiRef, () => {\n const renderContext = gridRenderContextSelector(apiRef);\n const rowsMeta = gridRowsMetaSelector(apiRef.current.state);\n return rowsMeta.positions[renderContext.firstRowIndex] ?? 0;\n });\n return /*#__PURE__*/_jsx(VirtualScrollerRenderZoneRoot, _extends({\n ref: ref,\n className: clsx(classes.root, className),\n ownerState: rootProps,\n style: {\n transform: `translate3d(0, ${offsetTop}px, 0)`\n }\n }, other));\n});\nexport { GridVirtualScrollerRenderZone };","import * as React from 'react';\nimport { styled } from '@mui/system';\nimport { unstable_composeClasses as composeClasses, unstable_useForkRef as useForkRef, unstable_useEventCallback as useEventCallback } from '@mui/utils';\nimport { useOnMount } from \"../../hooks/utils/useOnMount.js\";\nimport { useGridPrivateApiContext } from \"../../hooks/utils/useGridPrivateApiContext.js\";\nimport { gridDimensionsSelector, useGridSelector } from \"../../hooks/index.js\";\nimport { useGridRootProps } from \"../../hooks/utils/useGridRootProps.js\";\nimport { getDataGridUtilityClass } from \"../../constants/gridClasses.js\";\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};\nconst Scrollbar = styled('div')({\n position: 'absolute',\n display: 'inline-block',\n zIndex: 6,\n '& > div': {\n display: 'inline-block'\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.\n '--size': 'calc(max(var(--DataGrid-scrollbarSize), 14px))'\n});\nconst ScrollbarVertical = styled(Scrollbar)({\n width: 'var(--size)',\n height: 'calc(var(--DataGrid-hasScrollY) * (100% - var(--DataGrid-topContainerHeight) - var(--DataGrid-bottomContainerHeight) - 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-topContainerHeight)',\n right: '0px'\n});\nconst ScrollbarHorizontal = styled(Scrollbar)({\n width: '100%',\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: '0px'\n});\nconst Content = styled('div')({\n display: 'inline-block'\n});\nconst GridVirtualScrollbar = /*#__PURE__*/React.forwardRef(function GridVirtualScrollbar(props, ref) {\n const apiRef = useGridPrivateApiContext();\n const rootProps = useGridRootProps();\n const isLocked = React.useRef(false);\n const lastPosition = React.useRef(0);\n const scrollbarRef = React.useRef(null);\n const contentRef = React.useRef(null);\n const classes = useUtilityClasses(rootProps, props.position);\n const dimensions = useGridSelector(apiRef, gridDimensionsSelector);\n const propertyDimension = props.position === 'vertical' ? 'height' : 'width';\n const propertyScroll = props.position === 'vertical' ? 'scrollTop' : 'scrollLeft';\n const hasScroll = props.position === 'vertical' ? dimensions.hasScrollX : dimensions.hasScrollY;\n const contentSize = dimensions.minimumSize[propertyDimension] + (hasScroll ? dimensions.scrollbarSize : 0);\n const scrollbarSize = props.position === 'vertical' ? dimensions.viewportInnerSize.height : dimensions.viewportOuterSize.width;\n const scrollbarInnerSize = scrollbarSize * (contentSize / dimensions.viewportOuterSize[propertyDimension]);\n const onScrollerScroll = useEventCallback(() => {\n const scroller = apiRef.current.virtualScrollerRef.current;\n const scrollbar = scrollbarRef.current;\n if (scroller[propertyScroll] === lastPosition.current) {\n return;\n }\n if (isLocked.current) {\n isLocked.current = false;\n return;\n }\n isLocked.current = true;\n const value = scroller[propertyScroll] / contentSize;\n scrollbar[propertyScroll] = value * scrollbarInnerSize;\n lastPosition.current = scroller[propertyScroll];\n });\n const onScrollbarScroll = useEventCallback(() => {\n const scroller = apiRef.current.virtualScrollerRef.current;\n const scrollbar = scrollbarRef.current;\n if (isLocked.current) {\n isLocked.current = false;\n return;\n }\n isLocked.current = true;\n const value = scrollbar[propertyScroll] / scrollbarInnerSize;\n scroller[propertyScroll] = value * contentSize;\n });\n useOnMount(() => {\n const scroller = apiRef.current.virtualScrollerRef.current;\n const scrollbar = scrollbarRef.current;\n scroller.addEventListener('scroll', onScrollerScroll, {\n capture: true\n });\n scrollbar.addEventListener('scroll', onScrollbarScroll, {\n capture: true\n });\n return () => {\n scroller.removeEventListener('scroll', onScrollerScroll, {\n capture: true\n });\n scrollbar.removeEventListener('scroll', onScrollbarScroll, {\n capture: true\n });\n };\n });\n React.useEffect(() => {\n const content = contentRef.current;\n content.style.setProperty(propertyDimension, `${scrollbarInnerSize}px`);\n }, [scrollbarInnerSize, propertyDimension]);\n const Container = props.position === 'vertical' ? ScrollbarVertical : ScrollbarHorizontal;\n return /*#__PURE__*/_jsx(Container, {\n ref: useForkRef(ref, scrollbarRef),\n className: classes.root,\n tabIndex: -1,\n \"aria-hidden\": \"true\",\n children: /*#__PURE__*/_jsx(Content, {\n ref: contentRef,\n className: classes.content\n })\n });\n});\nexport { GridVirtualScrollbar };","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport { styled } from '@mui/system';\nimport composeClasses from '@mui/utils/composeClasses';\nimport { GridScrollArea } from \"../GridScrollArea.js\";\nimport { useGridRootProps } from \"../../hooks/utils/useGridRootProps.js\";\nimport { useGridApiContext } from \"../../hooks/utils/useGridApiContext.js\";\nimport { useGridSelector } from \"../../hooks/utils/useGridSelector.js\";\nimport { getDataGridUtilityClass } from \"../../constants/gridClasses.js\";\nimport { gridDimensionsSelector } from \"../../hooks/features/dimensions/index.js\";\nimport { useGridVirtualScroller } from \"../../hooks/features/virtualization/useGridVirtualScroller.js\";\nimport { useGridOverlays } from \"../../hooks/features/overlays/useGridOverlays.js\";\nimport { GridOverlays as Overlays } from \"../base/GridOverlays.js\";\nimport { GridHeaders } from \"../GridHeaders.js\";\nimport { GridMainContainer as Container } from \"./GridMainContainer.js\";\nimport { GridTopContainer as TopContainer } from \"./GridTopContainer.js\";\nimport { GridBottomContainer as BottomContainer } from \"./GridBottomContainer.js\";\nimport { GridVirtualScrollerContent as Content } from \"./GridVirtualScrollerContent.js\";\nimport { GridVirtualScrollerFiller as SpaceFiller } from \"./GridVirtualScrollerFiller.js\";\nimport { GridVirtualScrollerRenderZone as RenderZone } from \"./GridVirtualScrollerRenderZone.js\";\nimport { GridVirtualScrollbar as Scrollbar } from \"./GridVirtualScrollbar.js\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst useUtilityClasses = (ownerState, dimensions, loadingOverlayVariant) => {\n const {\n classes\n } = ownerState;\n const slots = {\n root: ['main', dimensions.rightPinnedWidth > 0 && 'main--hasPinnedRight', loadingOverlayVariant === 'skeleton' && 'main--hasSkeletonLoadingOverlay'],\n scroller: ['virtualScroller', dimensions.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) => styles.virtualScroller\n})({\n position: 'relative',\n height: '100%',\n overflow: 'scroll',\n scrollbarWidth: 'none' /* Firefox */,\n '&::-webkit-scrollbar': {\n display: 'none' /* Safari and Chrome */\n },\n '@media print': {\n overflow: 'hidden'\n },\n // See https://github.com/mui/mui-x/issues/10547\n zIndex: 0\n});\nfunction GridVirtualScroller(props) {\n const apiRef = useGridApiContext();\n const rootProps = useGridRootProps();\n const dimensions = useGridSelector(apiRef, gridDimensionsSelector);\n const overlaysProps = useGridOverlays();\n const classes = useUtilityClasses(rootProps, dimensions, overlaysProps.loadingOverlayVariant);\n const virtualScroller = useGridVirtualScroller();\n const {\n getContainerProps,\n getScrollerProps,\n getContentProps,\n getRenderZoneProps,\n getScrollbarVerticalProps,\n getScrollbarHorizontalProps,\n getRows\n } = virtualScroller;\n const rows = getRows();\n return /*#__PURE__*/_jsxs(Container, _extends({\n className: classes.root\n }, getContainerProps(), {\n children: [/*#__PURE__*/_jsx(GridScrollArea, {\n scrollDirection: \"left\"\n }), /*#__PURE__*/_jsx(GridScrollArea, {\n scrollDirection: \"right\"\n }), /*#__PURE__*/_jsxs(Scroller, _extends({\n className: classes.scroller\n }, getScrollerProps(), {\n ownerState: rootProps,\n children: [/*#__PURE__*/_jsxs(TopContainer, {\n children: [/*#__PURE__*/_jsx(GridHeaders, {}), /*#__PURE__*/_jsx(rootProps.slots.pinnedRows, {\n position: \"top\",\n virtualScroller: virtualScroller\n })]\n }), /*#__PURE__*/_jsx(Overlays, _extends({}, overlaysProps)), /*#__PURE__*/_jsx(Content, _extends({}, getContentProps(), {\n children: /*#__PURE__*/_jsxs(RenderZone, _extends({}, getRenderZoneProps(), {\n children: [rows, /*#__PURE__*/_jsx(rootProps.slots.detailPanels, {\n virtualScroller: virtualScroller\n })]\n }))\n })), /*#__PURE__*/_jsx(SpaceFiller, {\n rowsLength: rows.length\n }), /*#__PURE__*/_jsx(BottomContainer, {\n children: /*#__PURE__*/_jsx(rootProps.slots.pinnedRows, {\n position: \"bottom\",\n virtualScroller: virtualScroller\n })\n })]\n })), dimensions.hasScrollY && /*#__PURE__*/_jsx(Scrollbar, _extends({\n position: \"vertical\"\n }, getScrollbarVerticalProps())), dimensions.hasScrollX && /*#__PURE__*/_jsx(Scrollbar, _extends({\n position: \"horizontal\"\n }, getScrollbarHorizontalProps())), props.children]\n }));\n}\nexport { GridVirtualScroller };","import { unstable_generateUtilityClasses as generateUtilityClasses, unstable_generateUtilityClass as generateUtilityClass } from '@mui/utils';\nexport function getDataGridUtilityClass(slot) {\n return generateUtilityClass('MuiDataGrid', slot);\n}\nexport const gridClasses = generateUtilityClasses('MuiDataGrid', ['actionsCell', 'aggregationColumnHeader', 'aggregationColumnHeader--alignLeft', 'aggregationColumnHeader--alignCenter', 'aggregationColumnHeader--alignRight', 'aggregationColumnHeaderLabel', 'autoHeight', 'autosizing', 'booleanCell', 'cell--editable', 'cell--editing', 'cell--flex', 'cell--textCenter', 'cell--textLeft', 'cell--textRight', 'cell--rangeTop', 'cell--rangeBottom', 'cell--rangeLeft', 'cell--rangeRight', 'cell--pinnedLeft', 'cell--pinnedRight', 'cell--selectionMode', 'cell', 'cellCheckbox', 'cellEmpty', 'cellSkeleton', 'cellOffsetLeft', 'checkboxInput', 'columnHeader', 'columnHeader--alignCenter', 'columnHeader--alignLeft', 'columnHeader--alignRight', 'columnHeader--dragging', 'columnHeader--moving', 'columnHeader--numeric', 'columnHeader--sortable', 'columnHeader--sorted', 'columnHeader--filtered', 'columnHeader--pinnedLeft', 'columnHeader--pinnedRight', 'columnHeader--last', 'columnHeader--lastUnpinned', 'columnHeader--siblingFocused', 'columnHeaderCheckbox', 'columnHeaderDraggableContainer', 'columnHeaderTitle', 'columnHeaderTitleContainer', 'columnHeaderTitleContainerContent', 'columnHeader--filledGroup', 'columnHeader--emptyGroup', 'columnHeaders', 'columnSeparator--resizable', 'columnSeparator--resizing', 'columnSeparator--sideLeft', 'columnSeparator--sideRight', 'columnSeparator', 'columnsManagement', 'columnsManagementRow', 'columnsManagementHeader', 'columnsManagementFooter', 'container--top', 'container--bottom', 'detailPanel', 'detailPanels', 'detailPanelToggleCell', 'detailPanelToggleCell--expanded', 'footerCell', 'panel', 'panelHeader', 'panelWrapper', 'panelContent', 'panelFooter', 'paper', 'editBooleanCell', 'editInputCell', 'filler', 'filler--borderBottom', 'filler--pinnedLeft', 'filler--pinnedRight', 'filterForm', 'filterFormDeleteIcon', 'filterFormLogicOperatorInput', 'filterFormColumnInput', 'filterFormOperatorInput', 'filterFormValueInput', 'filterIcon', 'footerContainer', 'headerFilterRow', 'iconButtonContainer', 'iconSeparator', 'main', 'main--hasPinnedRight', 'main--hasSkeletonLoadingOverlay', 'menu', 'menuIcon', 'menuIconButton', 'menuOpen', 'menuList', 'overlay', 'overlayWrapper', 'overlayWrapperInner', 'root', 'root--densityStandard', 'root--densityComfortable', 'root--densityCompact', 'root--disableUserSelection', 'root--noToolbar', 'row', 'row--editable', 'row--editing', 'row--firstVisible', 'row--lastVisible', 'row--dragging', 'row--dynamicHeight', 'row--detailPanelExpanded', 'row--borderBottom', 'rowReorderCellPlaceholder', 'rowCount', 'rowReorderCellContainer', 'rowReorderCell', 'rowReorderCell--draggable', 'rowSkeleton', 'scrollArea--left', 'scrollArea--right', 'scrollArea', 'scrollbar', 'scrollbar--vertical', 'scrollbar--horizontal', 'scrollbarFiller', 'scrollbarFiller--header', 'scrollbarFiller--borderTop', 'scrollbarFiller--borderBottom', 'scrollbarFiller--pinnedRight', 'selectedRowCount', 'sortIcon', 'toolbarContainer', 'toolbarFilterList', 'virtualScroller', 'virtualScroller--hasScrollX', 'virtualScrollerContent', 'virtualScrollerContent--overflowed', 'virtualScrollerRenderZone', 'pinnedColumns', 'withVerticalBorder', 'withBorderColor', 'cell--withRightBorder', 'cell--withLeftBorder', 'columnHeader--withRightBorder', 'columnHeader--withLeftBorder', 'treeDataGroupingCell', 'treeDataGroupingCellToggle', 'treeDataGroupingCellLoadingContainer', 'groupingCriteriaCell', 'groupingCriteriaCellToggle', 'pinnedRows', 'pinnedRows--top', 'pinnedRows--bottom', 'pinnedRowsRenderZone']);","// Can't import from pro package - hence duplication\nexport const GRID_DETAIL_PANEL_TOGGLE_FIELD = '__detail_panel_toggle__';","export const GRID_DEFAULT_LOCALE_TEXT = {\n // Root\n noRowsLabel: 'No rows',\n noResultsOverlayLabel: 'No results found.',\n // Density selector toolbar button text\n toolbarDensity: 'Density',\n toolbarDensityLabel: 'Density',\n toolbarDensityCompact: 'Compact',\n toolbarDensityStandard: 'Standard',\n toolbarDensityComfortable: 'Comfortable',\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 // Columns management text\n columnsManagementSearchTitle: 'Search',\n columnsManagementNoColumns: 'No columns',\n columnsManagementShowHideAllText: 'Show/Hide All',\n columnsManagementReset: 'Reset',\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 filterPanelColumns: 'Columns',\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 // Filter values text\n filterValueAny: 'any',\n filterValueTrue: 'true',\n filterValueFalse: 'false',\n // Column menu text\n columnMenuLabel: '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 // 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 // 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 // Used core components translation keys\n MuiTablePagination: {},\n // Row reordering text\n rowReorderingHeaderName: 'Row reordering',\n // Aggregation\n aggregationMenuItemHeader: 'Aggregation',\n aggregationFunctionLabelSum: 'sum',\n aggregationFunctionLabelAvg: 'avg',\n aggregationFunctionLabelMin: 'min',\n aggregationFunctionLabelMax: 'max',\n aggregationFunctionLabelSize: 'size'\n};","import * as React from 'react';\nimport { GridApiContext } from \"../components/GridApiContext.js\";\nimport { GridPrivateApiContext } from \"../hooks/utils/useGridPrivateApiContext.js\";\nimport { GridRootPropsContext } from \"./GridRootPropsContext.js\";\nimport { GridConfigurationContext } from \"../components/GridConfigurationContext.js\";\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: children\n })\n })\n })\n });\n}","import { createSelector, createSelectorMemoized } from \"../../../utils/createSelector.js\";\n/**\n * @category ColumnGrouping\n * @ignore - do not document.\n */\nexport const gridColumnGroupingSelector = 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);","export const gridColumnMenuSelector = state => state.columnMenu;","export const DEFAULT_GRID_AUTOSIZE_OPTIONS = {\n includeHeaders: true,\n includeOutliers: false,\n outliersFactor: 1.5,\n expand: false\n};\n\n/**\n * The Resize API interface that is available in the grid `apiRef`.\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};","/**\n * Get the theme state\n * @category Core\n */\nexport const gridIsRtlSelector = state => state.isRtl;","import { createSelector, createSelectorMemoized } from \"../../../utils/createSelector.js\";\nimport { EMPTY_PINNED_COLUMN_FIELDS } from \"./gridColumnsInterfaces.js\";\nimport { gridIsRtlSelector } from \"../../core/gridCoreSelector.js\";\n\n/**\n * Get the columns state\n * @category Columns\n */\nexport const gridColumnsStateSelector = 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 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, (columns, columnVisibilityModel) => 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 = state => state.pinnedColumns;\n\n/**\n * Get the visible pinned columns.\n * @category Visible Columns\n */\nexport const gridVisiblePinnedColumnDefinitionsSelector = createSelectorMemoized(gridColumnsStateSelector, gridPinnedColumnsSelector, gridVisibleColumnFieldsSelector, gridIsRtlSelector, (columnsState, model, visibleColumnFields, isRtl) => {\n const visiblePinnedFields = filterVisibleColumns(model, visibleColumnFields, isRtl);\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 filterVisibleColumns(pinnedColumns, columns, invert) {\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(\n // Filter out from the remaining columns those columns already pinned to the left\n field => !leftPinnedColumns.includes(field));\n const rightPinnedColumns = filter(pinnedColumns.right, columnsWithoutLeftPinnedColumns);\n if (invert) {\n return {\n left: rightPinnedColumns,\n right: leftPinnedColumns\n };\n }\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 summed width of all the visible columns.\n * @category Visible Columns\n */\nexport const gridColumnsTotalWidthSelector = createSelector(gridVisibleColumnDefinitionsSelector, gridColumnPositionsSelector, (visibleColumns, positions) => {\n const colCount = visibleColumns.length;\n if (colCount === 0) {\n return 0;\n }\n return positions[colCount - 1] + visibleColumns[colCount - 1].computedWidth;\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 _extends from \"@babel/runtime/helpers/esm/extends\";\nimport { DEFAULT_GRID_COL_TYPE_KEY, GRID_STRING_COL_DEF, getGridDefaultColumnTypes } from \"../../../colDef/index.js\";\nimport { gridColumnsStateSelector, gridColumnVisibilityModelSelector } from \"./gridColumnsSelector.js\";\nimport { clamp } from \"../../../utils/utils.js\";\nimport { gridDensityFactorSelector } from \"../density/densitySelector.js\";\nimport { gridHeaderFilteringEnabledSelector } from \"../headerFiltering/gridHeaderFilteringSelectors.js\";\nimport { gridColumnGroupsHeaderMaxDepthSelector } from \"../columnGrouping/gridColumnGroupsSelector.js\";\nexport const COLUMNS_DIMENSION_PROPERTIES = ['maxWidth', 'minWidth', 'width', 'flex'];\nconst COLUMN_TYPES = getGridDefaultColumnTypes();\n\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].computedWidth = computedColumnWidths[field].computedWidth;\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 */\nexport const 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};\nfunction getDefaultColTypeDef(type) {\n let colDef = COLUMN_TYPES[DEFAULT_GRID_COL_TYPE_KEY];\n if (type && COLUMN_TYPES[type]) {\n colDef = COLUMN_TYPES[type];\n }\n return colDef;\n}\nexport const createColumnsState = ({\n apiRef,\n columnsToUpsert,\n initialState,\n columnVisibilityModel = gridColumnVisibilityModelSelector(apiRef),\n keepOnlyColumnsToUpsert = false\n}) => {\n const isInsideStateInitializer = !apiRef.current.state.columns;\n let columnsState;\n if (isInsideStateInitializer) {\n columnsState = {\n orderedFields: [],\n lookup: {},\n columnVisibilityModel\n };\n } else {\n const currentState = gridColumnsStateSelector(apiRef.current.state);\n columnsState = {\n orderedFields: keepOnlyColumnsToUpsert ? [] : [...currentState.orderedFields],\n lookup: _extends({}, currentState.lookup),\n // Will be cleaned later if keepOnlyColumnsToUpsert=true\n columnVisibilityModel\n };\n }\n let columnsToKeep = {};\n if (keepOnlyColumnsToUpsert && !isInsideStateInitializer) {\n columnsToKeep = Object.keys(columnsState.lookup).reduce((acc, key) => _extends({}, acc, {\n [key]: false\n }), {});\n }\n const columnsToUpsertLookup = {};\n columnsToUpsert.forEach(newColumn => {\n const {\n field\n } = newColumn;\n columnsToUpsertLookup[field] = true;\n columnsToKeep[field] = true;\n let existingState = columnsState.lookup[field];\n if (existingState == null) {\n existingState = _extends({}, getDefaultColTypeDef(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({}, getDefaultColTypeDef(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 columnsState.lookup[field] = _extends({}, existingState, newColumn, {\n hasBeenResized\n });\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 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, firstColumnToRender);\n if (cellColSpanInfo && cellColSpanInfo.spannedByColSpan) {\n firstNonSpannedColumnToRender = cellColSpanInfo.leftVisibleCellIndex;\n }\n }\n }\n return firstNonSpannedColumnToRender;\n}\nexport function getTotalHeaderHeight(apiRef, props) {\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 filterHeadersHeight = isHeaderFilteringEnabled ? Math.floor((props.headerFilterHeight ?? props.columnHeaderHeight) * densityFactor) : 0;\n return columnHeadersHeight * (1 + (maxDepth ?? 0)) + filterHeadersHeight;\n}","import { createSelector } from \"../../../utils/createSelector.js\";\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 = state => state.density;\nexport const gridDensityFactorSelector = createSelector(gridDensitySelector, density => DENSITY_FACTORS[density]);","export const gridDimensionsSelector = state => state.dimensions;","/**\n * Select the row editing state.\n */\nexport const gridEditRowsStateSelector = state => state.editRows;","import { createSelector, createSelectorMemoized } from \"../../../utils/createSelector.js\";\nimport { gridSortedRowEntriesSelector } from \"../sorting/gridSortingSelector.js\";\nimport { gridColumnLookupSelector } from \"../columns/gridColumnsSelector.js\";\nimport { gridRowMaximumTreeDepthSelector, gridRowTreeSelector } from \"../rows/gridRowsSelector.js\";\n\n/**\n * @category Filtering\n */\nconst gridFilterStateSelector = 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 = 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) => sortedRows.filter(row => visibleRowsLookup[row.id] !== false));\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) => 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 top level rows accessible after the filtering process.\n * @category Filtering\n */\nexport const gridFilteredSortedTopLevelRowEntriesSelector = createSelectorMemoized(gridExpandedSortedRowEntriesSelector, gridRowTreeSelector, gridRowMaximumTreeDepthSelector, (visibleSortedRows, rowTree, rowTreeDepth) => {\n if (rowTreeDepth < 2) {\n return visibleSortedRows;\n }\n return visibleSortedRows.filter(row => rowTree[row.id]?.depth === 0);\n});\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 return !filterOperator.InputComponent || item.value != null && item.value?.toString() !== '';\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});","import { GridLogicOperator } from \"../../../models/gridFilterItem.js\";\nexport const getDefaultGridFilterModel = () => ({\n items: [],\n logicOperator: GridLogicOperator.And,\n quickFilterValues: [],\n quickFilterLogicOperator: GridLogicOperator.And\n});\n\n/**\n * @param {GridRowId} rowId The id 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 */\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}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport { warnOnce } from '@mui/x-internals/warning';\nimport { GridLogicOperator } from \"../../../models/index.js\";\nimport { getDefaultGridFilterModel } from \"./gridFilterState.js\";\nimport { getPublicApiRef } from \"../../../utils/getPublicApiRef.js\";\nimport { gridColumnFieldsSelector, gridColumnLookupSelector, gridVisibleColumnFieldsSelector } from \"../columns/index.js\";\nlet hasEval;\nfunction getHasEval() {\n if (hasEval !== undefined) {\n return hasEval;\n }\n try {\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 {React.MutableRefObject<GridPrivateApiCommunity>} 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 `DataGrid`, 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 (process.env.NODE_ENV !== 'production') {\n if (hasItemsWithoutIds) {\n warnOnce('MUI X: The `id` field is required on `filterModel.items` when you use multiple filters.', 'error');\n }\n }\n if (process.env.NODE_ENV !== 'production') {\n if (hasItemWithoutOperator) {\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 }\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, 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(`MUI X: No filter operators found for column '${column.field}'.`);\n }\n const filterOperator = filterOperators.find(operator => operator.value === newFilterItem.operator);\n if (!filterOperator) {\n throw new Error(`MUI X: No filter operator found for column '${column.field}' and operator value '${newFilterItem.operator}'.`);\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 = apiRef.current.getRowValue(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 * 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 {React.MutableRefObject<GridPrivateApiCommunity>} 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, apiRef, disableEval) => {\n const {\n items\n } = filterModel;\n const appliers = items.map(item => getFilterCallbackFromItem(item, 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 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 * 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 {React.MutableRefObject<GridPrivateApiCommunity>} 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, apiRef) => {\n const quickFilterValues = filterModel.quickFilterValues?.filter(Boolean) ?? [];\n if (quickFilterValues.length === 0) {\n return null;\n }\n const columnFields = shouldQuickFilterExcludeHiddenColumns(filterModel) ? gridVisibleColumnFieldsSelector(apiRef) : gridColumnFieldsSelector(apiRef);\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 = apiRef.current.getRowValue(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, apiRef, disableEval) => {\n const isRowMatchingFilterItems = buildAggregatedFilterItemsApplier(filterModel, apiRef, disableEval);\n const isRowMatchingQuickFilter = buildAggregatedQuickFilterApplier(filterModel, 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, apiRef, items) => {\n if (!cache.cleanedFilterItems) {\n cache.cleanedFilterItems = items.filter(item => getFilterCallbackFromItem(item, apiRef) !== null);\n }\n return cache.cleanedFilterItems;\n};\nexport const passFilterLogic = (allFilterItemResults, allQuickFilterResults, filterModel, apiRef, cache) => {\n const cleanedFilterItems = filterModelItems(cache, 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 { createSelector } from \"../../../utils/createSelector.js\";\nexport const gridFocusStateSelector = 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 = 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 { createSelector } from \"../../../utils/createSelector.js\";\nexport const gridHeaderFilteringStateSelector = 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, createSelectorMemoized } from \"../../../utils/createSelector.js\";\nimport { gridExpandedSortedRowEntriesSelector, gridExpandedSortedRowIdsSelector, gridFilteredSortedTopLevelRowEntriesSelector } from \"../filter/gridFilterSelector.js\";\nimport { gridRowMaximumTreeDepthSelector, gridRowTreeSelector } from \"../rows/gridRowsSelector.js\";\nimport { getPageCount } from \"./gridPaginationUtils.js\";\n\n/**\n * @category Pagination\n * @ignore - do not document.\n */\nexport const gridPaginationSelector = state => state.pagination;\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(gridPaginationModelSelector, gridRowTreeSelector, gridRowMaximumTreeDepthSelector, gridExpandedSortedRowEntriesSelector, gridFilteredSortedTopLevelRowEntriesSelector, (paginationModel, rowTree, rowTreeDepth, visibleSortedRowEntries, visibleSortedTopLevelRowEntries) => {\n const visibleTopLevelRowCount = visibleSortedTopLevelRowEntries.length;\n const topLevelFirstRowIndex = Math.min(paginationModel.pageSize * paginationModel.page, visibleTopLevelRowCount - 1);\n const topLevelLastRowIndex = 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});","import { GridSignature } from \"../../utils/index.js\";\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) {\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(['MUI X: `pageSize` cannot exceed 100 in the MIT version of the DataGrid.', 'You need to upgrade to DataGridPro or DataGridPremium component to unlock this feature.'].join('\\n'));\n }\n};","export const gridPreferencePanelStateSelector = state => state.preferencePanel;","var GridPreferencePanelsValue = /*#__PURE__*/function (GridPreferencePanelsValue) {\n GridPreferencePanelsValue[\"filters\"] = \"filters\";\n GridPreferencePanelsValue[\"columns\"] = \"columns\";\n return GridPreferencePanelsValue;\n}(GridPreferencePanelsValue || {});\nexport { GridPreferencePanelsValue };","import { createSelector, createSelectorMemoized } from \"../../../utils/createSelector.js\";\nimport { gridRowsLookupSelector } from \"../rows/gridRowsSelector.js\";\nexport const gridRowSelectionStateSelector = state => state.rowSelection;\nexport const selectedGridRowsCountSelector = createSelector(gridRowSelectionStateSelector, selection => selection.length);\nexport const selectedGridRowsSelector = createSelectorMemoized(gridRowSelectionStateSelector, gridRowsLookupSelector, (selectedRows, rowsLookup) => new Map(selectedRows.map(id => [id, rowsLookup[id]])));\nexport const selectedIdsLookupSelector = createSelectorMemoized(gridRowSelectionStateSelector, selection => selection.reduce((lookup, rowId) => {\n lookup[rowId] = rowId;\n return lookup;\n}, {}));","import { GridSignature } from \"../../utils/useGridApiEventHandler.js\";\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}","import { createSelector } from \"../../../utils/createSelector.js\";\nconst gridRowSpanningStateSelector = state => state.rowSpanning;\nexport const gridRowSpanningHiddenCellsSelector = createSelector(gridRowSpanningStateSelector, rowSpanning => rowSpanning.hiddenCells);\nexport const gridRowSpanningSpannedCellsSelector = createSelector(gridRowSpanningStateSelector, rowSpanning => rowSpanning.spannedCells);\nexport const gridRowSpanningHiddenCellsOriginMapSelector = createSelector(gridRowSpanningStateSelector, rowSpanning => rowSpanning.hiddenCellOriginMap);","export const gridRowsMetaSelector = state => state.rowsMeta;","import { createSelector, createSelectorMemoized } from \"../../../utils/createSelector.js\";\nconst gridRowsStateSelector = 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);\nexport const gridRowsDataRowIdToIdLookupSelector = createSelector(gridRowsStateSelector, rows => rows.dataRowIdToIdLookup);\nexport const gridRowTreeSelector = createSelector(gridRowsStateSelector, rows => rows.tree);\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] + 1;\n});\nexport const gridDataRowIdsSelector = createSelector(gridRowsStateSelector, rows => rows.dataRowIds);\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 { gridPinnedRowsSelector } from \"./gridRowsSelector.js\";\nimport { gridDimensionsSelector } from \"../dimensions/gridDimensionsSelectors.js\";\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 childrenFromPath: {},\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<GridRowModel>} 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(['MUI X: The data grid component requires all rows to have a unique `id` property.', 'Alternatively, you can use the `getRowId` prop to specify a custom id for each row.', detailErrorMessage, JSON.stringify(row)].join('\\n'));\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 createRowsInternalCache = ({\n rows,\n getRowId,\n loading,\n rowCount\n}) => {\n const updates = {\n type: 'full',\n rows: []\n };\n const dataRowIdToModelLookup = {};\n const dataRowIdToIdLookup = {};\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 dataRowIdToIdLookup[id] = id;\n updates.rows.push(id);\n }\n return {\n rowsBeforePartialUpdates: rows,\n loadingPropBeforePartialUpdates: loading,\n rowCountPropBeforePartialUpdates: rowCount,\n updates,\n dataRowIdToIdLookup,\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 dataRowIdToIdLookup: cache.dataRowIdToIdLookup,\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 dataRowIdToIdLookup: cache.dataRowIdToIdLookup,\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) => {\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 const childDescendants = getTreeNodeDescendants(tree, child, skipAutoGeneratedRows);\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('MUI X: Unable to prepare a partial update if a full update is not applied yet.');\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 dataRowIdToIdLookup = _extends({}, previousCache.dataRowIdToIdLookup);\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 delete dataRowIdToIdLookup[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 dataRowIdToModelLookup[id] = _extends({}, oldRow, partialRow);\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 dataRowIdToIdLookup[id] = id;\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 dataRowIdToIdLookup,\n updates: partialUpdates,\n rowsBeforePartialUpdates: previousCache.rowsBeforePartialUpdates,\n loadingPropBeforePartialUpdates: previousCache.loadingPropBeforePartialUpdates,\n rowCountPropBeforePartialUpdates: previousCache.rowCountPropBeforePartialUpdates\n };\n};\nexport function calculatePinnedRowsHeight(apiRef) {\n const pinnedRows = gridPinnedRowsSelector(apiRef);\n const topPinnedRowsHeight = pinnedRows?.top?.reduce((acc, value) => {\n acc += apiRef.current.unstable_getRowHeight(value.id);\n return acc;\n }, 0) || 0;\n const bottomPinnedRowsHeight = pinnedRows?.bottom?.reduce((acc, value) => {\n acc += apiRef.current.unstable_getRowHeight(value.id);\n return acc;\n }, 0) || 0;\n return {\n top: topPinnedRowsHeight,\n bottom: bottomPinnedRowsHeight\n };\n}\nexport function getMinimalContentHeight(apiRef) {\n const dimensions = gridDimensionsSelector(apiRef.current.state);\n return `var(--DataGrid-overlayHeight, ${2 * dimensions.rowHeight}px)`;\n}\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 = apiRef.current.getRowNode(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}","import * as React from 'react';\nimport { getGridCellElement, getGridColumnHeaderElement, getGridRowElement } from \"../../../utils/domUtils.js\";\nimport { useGridApiMethod } from \"../../utils/useGridApiMethod.js\";\nimport { gridFocusCellSelector, gridTabIndexCellSelector } from \"../focus/gridFocusStateSelector.js\";\nexport class MissingRowIdError extends Error {}\n\n/**\n * @requires useGridColumns (method)\n * @requires useGridRows (method)\n * @requires useGridFocus (state)\n * @requires useGridEditing (method)\n * TODO: Impossible priority - useGridEditing also needs to be after useGridParamsApi\n * TODO: Impossible priority - useGridFocus also needs to be after useGridParamsApi\n */\nexport function useGridParamsApi(apiRef) {\n const getColumnHeaderParams = React.useCallback(field => ({\n field,\n colDef: apiRef.current.getColumn(field)\n }), [apiRef]);\n const getRowParams = React.useCallback(id => {\n const row = apiRef.current.getRow(id);\n if (!row) {\n throw new MissingRowIdError(`No row with id #${id} found`);\n }\n const params = {\n id,\n columns: apiRef.current.getAllColumns(),\n row\n };\n return params;\n }, [apiRef]);\n const getCellParams = React.useCallback((id, field) => {\n const colDef = apiRef.current.getColumn(field);\n const row = apiRef.current.getRow(id);\n const rowNode = apiRef.current.getRowNode(id);\n if (!row || !rowNode) {\n throw new MissingRowIdError(`No row with id #${id} found`);\n }\n const rawValue = row[field];\n const value = colDef?.valueGetter ? colDef.valueGetter(rawValue, row, colDef, apiRef) : rawValue;\n const cellFocus = gridFocusCellSelector(apiRef);\n const cellTabIndex = gridTabIndexCellSelector(apiRef);\n const params = {\n id,\n field,\n row,\n rowNode,\n colDef,\n cellMode: apiRef.current.getCellMode(id, field),\n hasFocus: cellFocus !== null && cellFocus.field === field && cellFocus.id === id,\n tabIndex: cellTabIndex && cellTabIndex.field === field && cellTabIndex.id === id ? 0 : -1,\n value,\n formattedValue: value,\n isEditable: false,\n api: {}\n };\n if (colDef && colDef.valueFormatter) {\n params.formattedValue = colDef.valueFormatter(value, row, colDef, apiRef);\n }\n params.isEditable = colDef && apiRef.current.isCellEditable(params);\n return params;\n }, [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 MissingRowIdError(`No row with id #${id} found`);\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) => {\n const field = colDef.field;\n if (!colDef || !colDef.valueGetter) {\n return row[field];\n }\n const value = row[colDef.field];\n return colDef.valueGetter(value, row, colDef, apiRef);\n }, [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 const getColumnHeaderElement = React.useCallback(field => {\n if (!apiRef.current.rootElementRef.current) {\n return null;\n }\n return getGridColumnHeaderElement(apiRef.current.rootElementRef.current, field);\n }, [apiRef]);\n const getRowElement = React.useCallback(id => {\n if (!apiRef.current.rootElementRef.current) {\n return null;\n }\n return getGridRowElement(apiRef.current.rootElementRef.current, id);\n }, [apiRef]);\n const getCellElement = React.useCallback((id, field) => {\n if (!apiRef.current.rootElementRef.current) {\n return null;\n }\n return getGridCellElement(apiRef.current.rootElementRef.current, {\n id,\n field\n });\n }, [apiRef]);\n const paramsApi = {\n getCellValue,\n getCellParams,\n getCellElement,\n getRowValue,\n getRowFormattedValue,\n getRowParams,\n getRowElement,\n getColumnHeaderParams,\n getColumnHeaderElement\n };\n useGridApiMethod(apiRef, paramsApi, 'public');\n}","import { createSelector, createSelectorMemoized } from \"../../../utils/createSelector.js\";\nimport { gridRowTreeSelector, gridRowsLookupSelector } from \"../rows/gridRowsSelector.js\";\nimport { GRID_ID_AUTOGENERATED, isAutogeneratedRowNode } from \"../rows/gridRowsUtils.js\";\n/**\n * @category Sorting\n * @ignore - do not document.\n */\nconst gridSortingStateSelector = 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 }\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 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});","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport { warnOnce } from '@mui/x-internals/warning';\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 `DataGrid`, 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 * 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 {React.MutableRefObject<GridApiCommunity>} 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: apiRef.current.getRowNode(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 {React.MutableRefObject<GridApiCommunity>} 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};","import { createSelector, createSelectorMemoized } from \"../../../utils/createSelector.js\";\n/**\n * Get the columns state\n * @category Virtualization\n */\nexport const gridVirtualizationSelector = 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 render context\n * @category Virtualization\n * @ignore - do not document.\n */\nexport const gridRenderContextSelector = createSelector(gridVirtualizationSelector, state => state.renderContext);\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(state => state.virtualization.renderContext.firstColumnIndex, state => state.virtualization.renderContext.lastColumnIndex, (firstColumnIndex, lastColumnIndex) => ({\n firstColumnIndex,\n lastColumnIndex\n}));","'use client';\n\nimport * as React from 'react';\n\n/**\n * A version of `React.useLayoutEffect` that does not show a warning when server-side rendering.\n * This is useful for effects that are only needed for client-side rendering but not for SSR.\n *\n * Before you use this hook, make sure to read https://gist.github.com/gaearon/e7d97cdf38a2907924ea12e4ebdf3c85\n * and confirm it doesn't apply to your use-case.\n */\nconst useEnhancedEffect = typeof window !== 'undefined' ? React.useLayoutEffect : React.useEffect;\nexport default useEnhancedEffect;","import * as React from 'react';\nimport { unstable_useEnhancedEffect as useEnhancedEffect } from '@mui/utils';\nconst isDevEnvironment = process.env.NODE_ENV === 'development';\nconst noop = () => {};\nexport function useResizeObserver(ref, fn, enabled) {\n const fnRef = React.useRef(null);\n fnRef.current = fn;\n useEnhancedEffect(() => {\n if (enabled === false || typeof ResizeObserver === 'undefined') {\n return noop;\n }\n let frameID = 0;\n const target = ref.current;\n const observer = new ResizeObserver(entries => {\n // See https://github.com/mui/mui-x/issues/8733\n // In dev, we avoid the React warning by moving the task to the next frame.\n // In prod, we want the task to run in the same frame as to avoid tear.\n if (isDevEnvironment) {\n frameID = requestAnimationFrame(() => {\n fnRef.current(entries);\n });\n } else {\n fnRef.current(entries);\n }\n });\n if (target) {\n observer.observe(target);\n }\n return () => {\n if (frameID) {\n cancelAnimationFrame(frameID);\n }\n observer.disconnect();\n };\n }, [ref, enabled]);\n}","const userAgent = typeof navigator !== 'undefined' ? navigator.userAgent.toLowerCase() : 'empty';\nexport const isFirefox = userAgent.includes('firefox');","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport * as ReactDOM from 'react-dom';\nimport { unstable_useEnhancedEffect as useEnhancedEffect, unstable_useEventCallback as useEventCallback } from '@mui/utils';\nimport useLazyRef from '@mui/utils/useLazyRef';\nimport useTimeout from '@mui/utils/useTimeout';\nimport { useResizeObserver } from '@mui/x-internals/useResizeObserver';\nimport { useRtl } from '@mui/system/RtlProvider';\nimport { useGridPrivateApiContext } from \"../../utils/useGridPrivateApiContext.js\";\nimport { useGridRootProps } from \"../../utils/useGridRootProps.js\";\nimport { useGridSelector } from \"../../utils/useGridSelector.js\";\nimport { useRunOnce } from \"../../utils/useRunOnce.js\";\nimport { gridVisibleColumnDefinitionsSelector, gridVisiblePinnedColumnDefinitionsSelector, gridColumnPositionsSelector, gridHasColSpanSelector } from \"../columns/gridColumnsSelector.js\";\nimport { gridDimensionsSelector } from \"../dimensions/gridDimensionsSelectors.js\";\nimport { gridPinnedRowsSelector } from \"../rows/gridRowsSelector.js\";\nimport { gridFocusCellSelector, gridTabIndexCellSelector } from \"../focus/gridFocusStateSelector.js\";\nimport { useGridVisibleRows, getVisibleRows } from \"../../utils/useGridVisibleRows.js\";\nimport { useGridApiEventHandler } from \"../../utils/index.js\";\nimport * as platform from \"../../../utils/platform.js\";\nimport { clamp, range } from \"../../../utils/utils.js\";\nimport { selectedIdsLookupSelector } from \"../rowSelection/gridRowSelectionSelector.js\";\nimport { gridRowsMetaSelector } from \"../rows/gridRowsMetaSelector.js\";\nimport { getFirstNonSpannedColumnToRender } from \"../columns/gridColumnsUtils.js\";\nimport { getMinimalContentHeight } from \"../rows/gridRowsUtils.js\";\nimport { gridRenderContextSelector, gridVirtualizationRowEnabledSelector, gridVirtualizationColumnEnabledSelector } from \"./gridVirtualizationSelectors.js\";\nimport { EMPTY_RENDER_CONTEXT } from \"./useGridVirtualization.js\";\nimport { gridRowSpanningHiddenCellsOriginMapSelector } from \"../rows/gridRowSpanningSelectors.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst MINIMUM_COLUMN_WIDTH = 50;\nvar 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}(ScrollDirection || {});\nconst EMPTY_SCROLL_POSITION = {\n top: 0,\n left: 0\n};\nexport const EMPTY_DETAIL_PANELS = Object.freeze(new Map());\nconst createScrollCache = (isRtl, rowBufferPx, columnBufferPx, verticalBuffer, horizontalBuffer) => ({\n direction: ScrollDirection.NONE,\n buffer: bufferForDirection(isRtl, ScrollDirection.NONE, rowBufferPx, columnBufferPx, verticalBuffer, horizontalBuffer)\n});\nlet isJSDOM = false;\ntry {\n if (typeof window !== 'undefined') {\n isJSDOM = /jsdom/.test(window.navigator.userAgent);\n }\n} catch (_) {\n /* ignore */\n}\nexport const useGridVirtualScroller = () => {\n const apiRef = useGridPrivateApiContext();\n const rootProps = useGridRootProps();\n const visibleColumns = useGridSelector(apiRef, gridVisibleColumnDefinitionsSelector);\n const enabledForRows = useGridSelector(apiRef, gridVirtualizationRowEnabledSelector) && !isJSDOM;\n const enabledForColumns = useGridSelector(apiRef, gridVirtualizationColumnEnabledSelector) && !isJSDOM;\n const dimensions = useGridSelector(apiRef, gridDimensionsSelector);\n const outerSize = dimensions.viewportOuterSize;\n const pinnedRows = useGridSelector(apiRef, gridPinnedRowsSelector);\n const pinnedColumns = useGridSelector(apiRef, gridVisiblePinnedColumnDefinitionsSelector);\n const hasBottomPinnedRows = pinnedRows.bottom.length > 0;\n const [panels, setPanels] = React.useState(EMPTY_DETAIL_PANELS);\n const isRtl = useRtl();\n const cellFocus = useGridSelector(apiRef, gridFocusCellSelector);\n const cellTabIndex = useGridSelector(apiRef, gridTabIndexCellSelector);\n const rowsMeta = useGridSelector(apiRef, gridRowsMetaSelector);\n const selectedRowsLookup = useGridSelector(apiRef, selectedIdsLookupSelector);\n const currentPage = useGridVisibleRows(apiRef, rootProps);\n const gridRootRef = apiRef.current.rootElementRef;\n const mainRef = apiRef.current.mainElementRef;\n const scrollerRef = apiRef.current.virtualScrollerRef;\n const scrollbarVerticalRef = React.useRef(null);\n const scrollbarHorizontalRef = React.useRef(null);\n const contentHeight = dimensions.contentSize.height;\n const columnsTotalWidth = dimensions.columnsTotalWidth;\n const hasColSpan = useGridSelector(apiRef, gridHasColSpanSelector);\n useResizeObserver(mainRef, () => apiRef.current.resize());\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(EMPTY_SCROLL_POSITION);\n const previousContextScrollPosition = React.useRef(EMPTY_SCROLL_POSITION);\n const previousRowContext = React.useRef(EMPTY_RENDER_CONTEXT);\n const renderContext = useGridSelector(apiRef, gridRenderContextSelector);\n const scrollTimeout = useTimeout();\n const frozenContext = React.useRef(undefined);\n const scrollCache = useLazyRef(() => createScrollCache(isRtl, rootProps.rowBufferPx, rootProps.columnBufferPx, dimensions.rowHeight * 15, MINIMUM_COLUMN_WIDTH * 6)).current;\n const focusedCell = {\n rowIndex: React.useMemo(() => cellFocus ? currentPage.rows.findIndex(row => row.id === cellFocus.id) : -1, [cellFocus, currentPage.rows]),\n columnIndex: React.useMemo(() => cellFocus ? visibleColumns.findIndex(column => column.field === cellFocus.field) : -1, [cellFocus, visibleColumns])\n };\n const updateRenderContext = React.useCallback(nextRenderContext => {\n if (areRenderContextsEqual(nextRenderContext, apiRef.current.state.virtualization.renderContext)) {\n return;\n }\n const didRowsIntervalChange = nextRenderContext.firstRowIndex !== previousRowContext.current.firstRowIndex || nextRenderContext.lastRowIndex !== previousRowContext.current.lastRowIndex;\n apiRef.current.setState(state => {\n return _extends({}, state, {\n virtualization: _extends({}, state.virtualization, {\n renderContext: nextRenderContext\n })\n });\n });\n\n // The lazy-loading hook is listening to `renderedRowsIntervalChange`,\n // but only does something if the dimensions are also available.\n // So we wait until we have valid dimensions before publishing the first event.\n if (dimensions.isReady && didRowsIntervalChange) {\n previousRowContext.current = nextRenderContext;\n apiRef.current.publishEvent('renderedRowsIntervalChange', nextRenderContext);\n }\n previousContextScrollPosition.current = scrollPosition.current;\n }, [apiRef, dimensions.isReady]);\n const triggerUpdateRenderContext = () => {\n const newScroll = {\n top: scrollerRef.current.scrollTop,\n left: scrollerRef.current.scrollLeft\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 ? directionForDelta(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 >= dimensions.rowHeight || columnScroll >= MINIMUM_COLUMN_WIDTH;\n const didChangeDirection = scrollCache.direction !== direction;\n const shouldUpdate = didCrossThreshold || didChangeDirection;\n if (!shouldUpdate) {\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, rootProps.rowBufferPx, rootProps.columnBufferPx, dimensions.rowHeight * 15, MINIMUM_COLUMN_WIDTH * 6);\n const inputs = inputsSelector(apiRef, rootProps, enabledForRows, enabledForColumns);\n const nextRenderContext = computeRenderContext(inputs, scrollPosition.current, scrollCache);\n\n // Prevents batching render context changes\n ReactDOM.flushSync(() => {\n updateRenderContext(nextRenderContext);\n });\n scrollTimeout.start(1000, triggerUpdateRenderContext);\n return nextRenderContext;\n };\n const forceUpdateRenderContext = () => {\n const inputs = inputsSelector(apiRef, rootProps, enabledForRows, enabledForColumns);\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 handleScroll = useEventCallback(event => {\n const {\n scrollTop,\n scrollLeft\n } = event.currentTarget;\n\n // On iOS and macOS, negative offsets are possible when swiping past the start\n if (scrollTop < 0) {\n return;\n }\n if (!isRtl) {\n if (scrollLeft < 0) {\n return;\n }\n }\n if (isRtl) {\n if (scrollLeft > 0) {\n return;\n }\n }\n const nextRenderContext = triggerUpdateRenderContext();\n apiRef.current.publishEvent('scrollPositionChange', {\n top: scrollTop,\n left: scrollLeft,\n renderContext: nextRenderContext\n });\n });\n const handleWheel = useEventCallback(event => {\n apiRef.current.publishEvent('virtualScrollerWheel', {}, event);\n });\n const handleTouchMove = useEventCallback(event => {\n apiRef.current.publishEvent('virtualScrollerTouchMove', {}, event);\n });\n const getRows = (params = {}) => {\n if (!params.rows && !currentPage.range) {\n return [];\n }\n const baseRenderContext = params.renderContext ?? renderContext;\n const isLastSection = !hasBottomPinnedRows && params.position === undefined || hasBottomPinnedRows && params.position === 'bottom';\n const isPinnedSection = params.position !== undefined;\n let rowIndexOffset;\n // FIXME: Why is the switch check exhaustiveness not validated with typescript-eslint?\n // eslint-disable-next-line default-case\n switch (params.position) {\n case 'top':\n rowIndexOffset = 0;\n break;\n case 'bottom':\n rowIndexOffset = pinnedRows.top.length + currentPage.rows.length;\n break;\n case undefined:\n rowIndexOffset = pinnedRows.top.length;\n break;\n }\n const rowModels = params.rows ?? currentPage.rows;\n const firstRowToRender = baseRenderContext.firstRowIndex;\n const lastRowToRender = Math.min(baseRenderContext.lastRowIndex, rowModels.length);\n const rowIndexes = params.rows ? range(0, params.rows.length) : range(firstRowToRender, lastRowToRender);\n let virtualRowIndex = -1;\n if (!isPinnedSection && focusedCell.rowIndex !== -1) {\n if (focusedCell.rowIndex < firstRowToRender) {\n virtualRowIndex = focusedCell.rowIndex;\n rowIndexes.unshift(virtualRowIndex);\n }\n if (focusedCell.rowIndex >= lastRowToRender) {\n virtualRowIndex = focusedCell.rowIndex;\n rowIndexes.push(virtualRowIndex);\n }\n }\n const rows = [];\n const rowProps = rootProps.slotProps?.row;\n const columnPositions = gridColumnPositionsSelector(apiRef);\n rowIndexes.forEach(rowIndexInPage => {\n const {\n id,\n model\n } = rowModels[rowIndexInPage];\n const rowIndex = (currentPage?.range?.firstRowIndex || 0) + rowIndexOffset + rowIndexInPage;\n\n // NOTE: This is an expensive feature, the colSpan code could be optimized.\n if (hasColSpan) {\n const minFirstColumn = pinnedColumns.left.length;\n const maxLastColumn = visibleColumns.length - pinnedColumns.right.length;\n apiRef.current.calculateColSpan({\n rowId: id,\n minFirstColumn,\n maxLastColumn,\n columns: visibleColumns\n });\n if (pinnedColumns.left.length > 0) {\n apiRef.current.calculateColSpan({\n rowId: id,\n minFirstColumn: 0,\n maxLastColumn: pinnedColumns.left.length,\n columns: visibleColumns\n });\n }\n if (pinnedColumns.right.length > 0) {\n apiRef.current.calculateColSpan({\n rowId: id,\n minFirstColumn: visibleColumns.length - pinnedColumns.right.length,\n maxLastColumn: visibleColumns.length,\n columns: visibleColumns\n });\n }\n }\n const hasFocus = cellFocus?.id === id;\n const baseRowHeight = !apiRef.current.rowHasAutoHeight(id) ? apiRef.current.unstable_getRowHeight(id) : 'auto';\n let isSelected;\n if (selectedRowsLookup[id] == null) {\n isSelected = false;\n } else {\n isSelected = apiRef.current.isRowSelectable(id);\n }\n let isFirstVisible = false;\n if (params.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 = currentPage.rows.length - 1;\n const isLastVisibleRowIndex = rowIndexInPage === lastIndex;\n if (isLastVisibleRowIndex) {\n isLastVisible = true;\n }\n } else {\n isLastVisible = isLastVisibleInSection;\n }\n }\n const isVirtualRow = rowIndexInPage === virtualRowIndex;\n const isNotVisible = isVirtualRow;\n let tabbableCell = null;\n if (cellTabIndex !== null && cellTabIndex.id === id) {\n const cellParams = apiRef.current.getCellParams(id, cellTabIndex.field);\n tabbableCell = cellParams.cellMode === 'view' ? cellTabIndex.field : null;\n }\n let currentRenderContext = baseRenderContext;\n if (!isPinnedSection && frozenContext.current && rowIndexInPage >= frozenContext.current.firstRowIndex && rowIndexInPage < frozenContext.current.lastRowIndex) {\n currentRenderContext = frozenContext.current;\n }\n const offsetLeft = computeOffsetLeft(columnPositions, currentRenderContext, pinnedColumns.left.length);\n const showBottomBorder = isLastVisibleInSection && params.position === 'top';\n rows.push(/*#__PURE__*/_jsx(rootProps.slots.row, _extends({\n row: model,\n rowId: id,\n index: rowIndex,\n selected: isSelected,\n offsetTop: params.rows ? undefined : rowsMeta.positions[rowIndexInPage],\n offsetLeft: offsetLeft,\n dimensions: dimensions,\n rowHeight: baseRowHeight,\n tabbableCell: tabbableCell,\n pinnedColumns: pinnedColumns,\n visibleColumns: visibleColumns,\n renderContext: currentRenderContext,\n focusedColumnIndex: hasFocus ? focusedCell.columnIndex : undefined,\n isFirstVisible: isFirstVisible,\n isLastVisible: isLastVisible,\n isNotVisible: isNotVisible,\n showBottomBorder: showBottomBorder\n }, rowProps), id));\n if (isNotVisible) {\n return;\n }\n const panel = panels.get(id);\n if (panel) {\n rows.push(panel);\n }\n if (params.position === undefined && isLastVisibleInSection) {\n rows.push(apiRef.current.getInfiniteLoadingTriggerElement?.({\n lastRowId: id\n }));\n }\n });\n return rows;\n };\n const needsHorizontalScrollbar = outerSize.width && columnsTotalWidth >= outerSize.width;\n const scrollerStyle = React.useMemo(() => ({\n overflowX: !needsHorizontalScrollbar ? 'hidden' : undefined,\n overflowY: rootProps.autoHeight ? 'hidden' : undefined\n }), [needsHorizontalScrollbar, rootProps.autoHeight]);\n const contentSize = React.useMemo(() => {\n const size = {\n width: needsHorizontalScrollbar ? columnsTotalWidth : 'auto',\n height: contentHeight\n };\n if (rootProps.autoHeight && currentPage.rows.length === 0) {\n size.height = getMinimalContentHeight(apiRef); // Give room to show the overlay when there no rows.\n }\n return size;\n }, [apiRef, columnsTotalWidth, contentHeight, needsHorizontalScrollbar, rootProps.autoHeight, currentPage.rows.length]);\n React.useEffect(() => {\n apiRef.current.publishEvent('virtualScrollerContentSizeChange');\n }, [apiRef, contentSize]);\n useEnhancedEffect(() => {\n // FIXME: Is this really necessary?\n apiRef.current.resize();\n }, [apiRef, rowsMeta.currentPageTotalHeight]);\n useEnhancedEffect(() => {\n // TODO a scroll reset should not be necessary\n if (enabledForColumns) {\n scrollerRef.current.scrollLeft = 0;\n }\n if (enabledForRows) {\n scrollerRef.current.scrollTop = 0;\n }\n }, [enabledForColumns, enabledForRows, gridRootRef, scrollerRef]);\n useRunOnce(outerSize.width !== 0, () => {\n const inputs = inputsSelector(apiRef, rootProps, enabledForRows, enabledForColumns);\n const initialRenderContext = computeRenderContext(inputs, scrollPosition.current, scrollCache);\n updateRenderContext(initialRenderContext);\n apiRef.current.publishEvent('scrollPositionChange', {\n top: scrollPosition.current.top,\n left: scrollPosition.current.left,\n renderContext: initialRenderContext\n });\n });\n apiRef.current.register('private', {\n updateRenderContext: forceUpdateRenderContext\n });\n useGridApiEventHandler(apiRef, 'columnsChange', forceUpdateRenderContext);\n useGridApiEventHandler(apiRef, 'filteredRowsSet', forceUpdateRenderContext);\n useGridApiEventHandler(apiRef, 'rowExpansionChange', forceUpdateRenderContext);\n return {\n renderContext,\n setPanels,\n getRows,\n getContainerProps: () => ({\n ref: mainRef\n }),\n getScrollerProps: () => ({\n ref: scrollerRef,\n onScroll: handleScroll,\n onWheel: handleWheel,\n onTouchMove: handleTouchMove,\n style: scrollerStyle,\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.isFirefox ? -1 : undefined\n }),\n getContentProps: () => ({\n style: contentSize,\n role: 'presentation'\n }),\n getRenderZoneProps: () => ({\n role: 'rowgroup'\n }),\n getScrollbarVerticalProps: () => ({\n ref: scrollbarVerticalRef,\n role: 'presentation'\n }),\n getScrollbarHorizontalProps: () => ({\n ref: scrollbarHorizontalRef,\n role: 'presentation'\n })\n };\n};\nfunction inputsSelector(apiRef, rootProps, enabledForRows, enabledForColumns) {\n const dimensions = gridDimensionsSelector(apiRef.current.state);\n const currentPage = getVisibleRows(apiRef, rootProps);\n const visibleColumns = gridVisibleColumnDefinitionsSelector(apiRef);\n const hiddenCellsOriginMap = gridRowSpanningHiddenCellsOriginMapSelector(apiRef);\n const lastRowId = apiRef.current.state.rows.dataRowIds.at(-1);\n const lastColumn = visibleColumns.at(-1);\n return {\n enabledForRows,\n enabledForColumns,\n apiRef,\n autoHeight: rootProps.autoHeight,\n rowBufferPx: rootProps.rowBufferPx,\n columnBufferPx: rootProps.columnBufferPx,\n leftPinnedWidth: dimensions.leftPinnedWidth,\n columnsTotalWidth: dimensions.columnsTotalWidth,\n viewportInnerWidth: dimensions.viewportInnerSize.width,\n viewportInnerHeight: dimensions.viewportInnerSize.height,\n lastRowHeight: lastRowId !== undefined ? apiRef.current.unstable_getRowHeight(lastRowId) : 0,\n lastColumnWidth: lastColumn?.computedWidth ?? 0,\n rowsMeta: gridRowsMetaSelector(apiRef.current.state),\n columnPositions: gridColumnPositionsSelector(apiRef),\n rows: currentPage.rows,\n range: currentPage.range,\n pinnedColumns: gridVisiblePinnedColumnDefinitionsSelector(apiRef),\n visibleColumns,\n hiddenCellsOriginMap\n };\n}\nfunction computeRenderContext(inputs, scrollPosition, scrollCache) {\n const renderContext = {\n firstRowIndex: 0,\n lastRowIndex: inputs.rows.length,\n firstColumnIndex: 0,\n lastColumnIndex: inputs.visibleColumns.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 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 for (let i = firstRowToRender; i < lastRowToRender && !hasRowWithAutoHeight; i += 1) {\n const row = inputs.rows[i];\n hasRowWithAutoHeight = inputs.apiRef.current.rowHasAutoHeight(row.id);\n }\n if (!hasRowWithAutoHeight) {\n firstColumnIndex = binarySearch(realLeft, inputs.columnPositions, {\n atStart: true,\n lastPosition: inputs.columnsTotalWidth\n });\n lastColumnIndex = binarySearch(realLeft + inputs.viewportInnerWidth, 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.apiRef.current.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,\n maxLastIndex: inputs.visibleColumns.length - inputs.pinnedColumns.right.length,\n bufferBefore: scrollCache.buffer.columnBefore,\n bufferAfter: scrollCache.buffer.columnAfter,\n positions: inputs.columnPositions,\n lastSize: inputs.lastColumnWidth\n });\n const firstColumnToRender = getFirstNonSpannedColumnToRender({\n firstColumnToRender: initialFirstColumnToRender,\n apiRef: inputs.apiRef,\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);\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) {\n const left = (columnPositions[renderContext.firstColumnIndex] ?? 0) - (columnPositions[pinnedLeftLength] ?? 0);\n return Math.abs(left);\n}\nfunction directionForDelta(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}\nfunction bufferForDirection(isRtl, direction, rowBufferPx, columnBufferPx, verticalBuffer, horizontalBuffer) {\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 new Error('unreachable');\n }\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport { useGridApiMethod } from \"../../utils/useGridApiMethod.js\";\nexport const EMPTY_RENDER_CONTEXT = {\n firstRowIndex: 0,\n lastRowIndex: 0,\n firstColumnIndex: 0,\n lastColumnIndex: 0\n};\nexport const virtualizationStateInitializer = (state, props) => {\n const {\n disableVirtualization,\n autoHeight\n } = props;\n const virtualization = {\n enabled: !disableVirtualization,\n enabledForColumns: !disableVirtualization,\n enabledForRows: !disableVirtualization && !autoHeight,\n renderContext: EMPTY_RENDER_CONTEXT\n };\n return _extends({}, state, {\n virtualization\n });\n};\nexport function useGridVirtualization(apiRef, props) {\n /*\n * API METHODS\n */\n\n const setVirtualization = enabled => {\n apiRef.current.setState(state => _extends({}, state, {\n virtualization: _extends({}, state.virtualization, {\n enabled,\n enabledForColumns: enabled,\n enabledForRows: enabled && !props.autoHeight\n })\n }));\n };\n const setColumnVirtualization = enabled => {\n apiRef.current.setState(state => _extends({}, state, {\n virtualization: _extends({}, state.virtualization, {\n enabledForColumns: enabled\n })\n }));\n };\n const api = {\n unstable_setVirtualization: setVirtualization,\n unstable_setColumnVirtualization: setColumnVirtualization\n };\n useGridApiMethod(apiRef, api, 'public');\n\n /*\n * EFFECTS\n */\n\n /* eslint-disable react-hooks/exhaustive-deps */\n React.useEffect(() => {\n setVirtualization(!props.disableVirtualization);\n }, [props.disableVirtualization, props.autoHeight]);\n /* eslint-enable react-hooks/exhaustive-deps */\n}","import * as React from 'react';\nexport const useFirstRender = callback => {\n const isFirstRender = React.useRef(true);\n if (isFirstRender.current) {\n isFirstRender.current = false;\n callback();\n }\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 constructor(timeout = CLEANUP_TIMER_LOOP_MILLIS) {\n this.timeouts = new Map();\n this.cleanupTimeout = 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 constructor() {\n this.registry = new FinalizationRegistry(unsubscribe => {\n if (typeof unsubscribe === 'function') {\n unsubscribe();\n }\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\n // eslint-disable-next-line class-methods-use-this\n reset() {}\n}","import * as React from 'react';\nimport { TimerBasedCleanupTracking } from \"../../utils/cleanupTracking/TimerBasedCleanupTracking.js\";\nimport { FinalizationRegistryBasedCleanupTracking } from \"../../utils/cleanupTracking/FinalizationRegistryBasedCleanupTracking.js\";\n/**\n * Signal to the underlying logic what version of the public component API\n * of the data grid is exposed.\n */\nvar GridSignature = /*#__PURE__*/function (GridSignature) {\n GridSignature[\"DataGrid\"] = \"DataGrid\";\n GridSignature[\"DataGridPro\"] = \"DataGridPro\";\n GridSignature[\"DataGridPremium\"] = \"DataGridPremium\";\n return GridSignature;\n}(GridSignature || {});\n// We use class to make it easier to detect in heap snapshots by name\nclass ObjectToBeRetainedByReact {}\n\n// Based on https://github.com/Bnaya/use-dispose-uncommitted/blob/main/src/finalization-registry-based-impl.ts\n// Check https://github.com/facebook/react/issues/15317 to get more information\nexport function createUseGridApiEventHandler(registryContainer) {\n let cleanupTokensCounter = 0;\n return function useGridApiEventHandler(apiRef, eventName, handler, options) {\n if (registryContainer.registry === null) {\n registryContainer.registry = typeof FinalizationRegistry !== 'undefined' ? new FinalizationRegistryBasedCleanupTracking() : new TimerBasedCleanupTracking();\n }\n const [objectRetainedByReact] = React.useState(new ObjectToBeRetainedByReact());\n const subscription = React.useRef(null);\n const handlerRef = React.useRef();\n handlerRef.current = handler;\n const cleanupTokenRef = React.useRef(null);\n if (!subscription.current && handlerRef.current) {\n const enhancedHandler = (params, event, details) => {\n if (!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.registry.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.registry.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 if (!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.registry) {\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.registry.unregister(cleanupTokenRef.current);\n cleanupTokenRef.current = null;\n }\n return () => {\n subscription.current?.();\n subscription.current = null;\n };\n }, [apiRef, eventName, options]);\n };\n}\nconst registryContainer = {\n registry: null\n};\n\n// TODO: move to @mui/x-data-grid/internals\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const unstable_resetCleanupTracking = () => {\n registryContainer.registry?.reset();\n registryContainer.registry = null;\n};\nexport const useGridApiEventHandler = createUseGridApiEventHandler(registryContainer);\nconst optionsSubscriberOptions = {\n isFirst: true\n};\nexport function useGridApiOptionHandler(apiRef, eventName, handler) {\n useGridApiEventHandler(apiRef, eventName, handler, optionsSubscriberOptions);\n}\nexport { GridSignature };","import * as React from 'react';\nexport function useGridApiMethod(privateApiRef, apiMethods, visibility) {\n const isFirstRender = React.useRef(true);\n React.useEffect(() => {\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}","import * as React from 'react';\nimport { GridConfigurationContext } from \"../../components/GridConfigurationContext.js\";\nexport const useGridConfiguration = () => {\n const configuration = React.useContext(GridConfigurationContext);\n if (configuration === undefined) {\n throw new Error(['MUI X: Could not find the data grid configuration context.', 'It looks like you rendered your component outside of a DataGrid, DataGridPro or DataGridPremium parent component.', 'This can also happen if you are bundling multiple versions of the data grid.'].join('\\n'));\n }\n return configuration;\n};","import * 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 * as React from 'react';\nimport { isFunction } from \"../../utils/utils.js\";\nimport { useGridLogger } from \"./useGridLogger.js\";\nexport const useGridNativeEventListener = (apiRef, ref, eventName, handler, options) => {\n const logger = useGridLogger(apiRef, 'useNativeEventListener');\n const [added, setAdded] = React.useState(false);\n const handlerRef = React.useRef(handler);\n const targetElement = isFunction(ref) ? ref() : ref?.current ?? null;\n const wrapHandler = React.useCallback(event => {\n return handlerRef.current && handlerRef.current(event);\n }, []);\n React.useEffect(() => {\n handlerRef.current = handler;\n }, [handler]);\n React.useEffect(() => {\n if (targetElement && eventName && !added) {\n logger.debug(`Binding native ${eventName} event`);\n targetElement.addEventListener(eventName, wrapHandler, options);\n setAdded(true);\n const unsubscribe = () => {\n logger.debug(`Clearing native ${eventName} event`);\n targetElement.removeEventListener(eventName, wrapHandler, options);\n };\n apiRef.current.subscribeEvent('unmount', unsubscribe);\n }\n }, [targetElement, wrapHandler, eventName, added, logger, options, apiRef]);\n};","import * as React from 'react';\nexport const GridPrivateApiContext = /*#__PURE__*/React.createContext(undefined);\nif (process.env.NODE_ENV !== 'production') {\n GridPrivateApiContext.displayName = 'GridPrivateApiContext';\n}\nexport function useGridPrivateApiContext() {\n const privateApiRef = React.useContext(GridPrivateApiContext);\n if (privateApiRef === undefined) {\n throw new Error(['MUI X: Could not find the data grid private context.', 'It looks like you rendered your component outside of a DataGrid, DataGridPro or DataGridPremium parent component.', 'This can also happen if you are bundling multiple versions of the data grid.'].join('\\n'));\n }\n return privateApiRef;\n}","import * as React from 'react';\nimport { fastObjectShallowCompare } from '@mui/x-internals/fastObjectShallowCompare';\nimport { warnOnce } from '@mui/x-internals/warning';\nimport { useLazyRef } from \"./useLazyRef.js\";\nimport { useOnMount } from \"./useOnMount.js\";\nfunction isOutputSelector(selector) {\n return selector.acceptsApiRef;\n}\n// TODO v8: Remove this function\nfunction applySelector(apiRef, selector) {\n if (isOutputSelector(selector)) {\n return selector(apiRef);\n }\n return selector(apiRef.current.state);\n}\n\n// TODO v8: Rename this function to `applySelector`\nfunction applySelectorV8(apiRef, selector, args, instanceId) {\n if (isOutputSelector(selector)) {\n return selector(apiRef, args);\n }\n return selector(apiRef.current.state, instanceId);\n}\nconst defaultCompare = Object.is;\nexport const objectShallowCompare = fastObjectShallowCompare;\nconst createRefs = () => ({\n state: null,\n equals: null,\n selector: null\n});\n\n// TODO v8: Remove this function\nexport const useGridSelector = (apiRef, selector, equals = defaultCompare) => {\n if (process.env.NODE_ENV !== 'production') {\n if (!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 }\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 : applySelector(apiRef, selector));\n refs.current.state = state;\n refs.current.equals = equals;\n refs.current.selector = selector;\n useOnMount(() => {\n return apiRef.current.store.subscribe(() => {\n const newState = applySelector(apiRef, refs.current.selector);\n if (!refs.current.equals(refs.current.state, newState)) {\n refs.current.state = newState;\n setState(newState);\n }\n });\n });\n return state;\n};\n\n// TODO v8: Rename this function to `useGridSelector`\nexport const useGridSelectorV8 = (apiRef, selector, args = undefined, equals = defaultCompare) => {\n if (process.env.NODE_ENV !== 'production') {\n if (!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 }\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 : applySelectorV8(apiRef, selector, args, apiRef.current.instanceId));\n refs.current.state = state;\n refs.current.equals = equals;\n refs.current.selector = selector;\n useOnMount(() => {\n return apiRef.current.store.subscribe(() => {\n const newState = applySelectorV8(apiRef, refs.current.selector, args, apiRef.current.instanceId);\n if (!refs.current.equals(refs.current.state, newState)) {\n refs.current.state = newState;\n setState(newState);\n }\n });\n });\n return state;\n};","import * as React from 'react';\nimport { gridPaginationRowRangeSelector, gridPaginatedVisibleSortedGridRowEntriesSelector } from \"../features/pagination/gridPaginationSelector.js\";\nimport { gridExpandedSortedRowEntriesSelector } from \"../features/filter/gridFilterSelector.js\";\nexport const getVisibleRows = (apiRef, props) => {\n let rows;\n let range;\n if (props.pagination && props.paginationMode === 'client') {\n range = gridPaginationRowRangeSelector(apiRef);\n rows = gridPaginatedVisibleSortedGridRowEntriesSelector(apiRef);\n } else {\n rows = gridExpandedSortedRowEntriesSelector(apiRef);\n if (rows.length === 0) {\n range = null;\n } else {\n range = {\n firstRowIndex: 0,\n lastRowIndex: rows.length - 1\n };\n }\n }\n return {\n rows,\n range\n };\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 */\nexport const useGridVisibleRows = (apiRef, props) => {\n const response = getVisibleRows(apiRef, props);\n return React.useMemo(() => ({\n rows: response.rows,\n range: response.range\n }), [response.rows, response.range]);\n};","import * as React from 'react';\nimport { unstable_useEnhancedEffect as useEnhancedEffect } from '@mui/utils';\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};","import { GridPinnedColumnPosition } from \"../../hooks/features/columns/index.js\";\nexport const getPinnedCellOffset = (pinnedPosition, computedWidth, columnIndex, columnPositions, dimensions) => {\n const scrollbarWidth = dimensions.hasScrollY ? dimensions.scrollbarSize : 0;\n let pinnedOffset;\n switch (pinnedPosition) {\n case GridPinnedColumnPosition.LEFT:\n pinnedOffset = columnPositions[columnIndex];\n break;\n case GridPinnedColumnPosition.RIGHT:\n pinnedOffset = dimensions.columnsTotalWidth - columnPositions[columnIndex] - computedWidth + scrollbarWidth;\n break;\n default:\n pinnedOffset = 0;\n break;\n }\n return pinnedOffset;\n};","import * as React from 'react';\nimport { createSvgIcon } from '@mui/material/utils';\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 GridColumnIcon = createSvgIcon(/*#__PURE__*/_jsx(\"path\", {\n d: \"M6 5H3c-.55 0-1 .45-1 1v12c0 .55.45 1 1 1h3c.55 0 1-.45 1-1V6c0-.55-.45-1-1-1zm14 0h-3c-.55 0-1 .45-1 1v12c0 .55.45 1 1 1h3c.55 0 1-.45 1-1V6c0-.55-.45-1-1-1zm-7 0h-3c-.55 0-1 .45-1 1v12c0 .55.45 1 1 1h3c.55 0 1-.45 1-1V6c0-.55-.45-1-1-1z\"\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 GridSaveAltIcon = createSvgIcon(/*#__PURE__*/_jsx(\"path\", {\n d: \"M19 12v7H5v-7H3v7c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-7h-2zm-6 .67l2.59-2.58L17 11.5l-5 5-5-5 1.41-1.41L11 12.67V3h2z\"\n}), 'SaveAlt');\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: \"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}), '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');","export function isLeaf(node) {\n return node.field !== undefined;\n}\n\n/**\n * A function used to process headerClassName params.\n */\n\n/**\n * The union type representing the [[GridColDef]] column header class type.\n */","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 };","/**\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](/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 };","import _formatMuiErrorMessage from \"@mui/utils/formatMuiErrorMessage\";\n// It should to be noted that this function isn't equivalent to `text-transform: capitalize`.\n//\n// A strict capitalization should uppercase the first letter of each word in the sentence.\n// We only handle the first word.\nexport default function capitalize(string) {\n if (typeof string !== 'string') {\n throw new Error(process.env.NODE_ENV !== \"production\" ? `MUI: \\`capitalize(string)\\` expects a string argument.` : _formatMuiErrorMessage(7));\n }\n return string.charAt(0).toUpperCase() + string.slice(1);\n}","/**\n * WARNING: Don't import this directly.\n * Use `MuiError` from `@mui/internal-babel-macros/MuiError.macro` instead.\n * @param {number} code\n */\nexport default function formatMuiErrorMessage(code) {\n // Apply babel-plugin-transform-template-literals in loose mode\n // loose mode is safe if we're concatenating primitives\n // see https://babeljs.io/docs/en/babel-plugin-transform-template-literals#loose\n /* eslint-disable prefer-template */\n let url = 'https://mui.com/production-error/?code=' + code;\n for (let i = 1; i < arguments.length; i += 1) {\n // rest params over-transpile for this case\n // eslint-disable-next-line prefer-rest-params\n url += '&args[]=' + encodeURIComponent(arguments[i]);\n }\n return 'Minified MUI error #' + code + '; visit ' + url + ' for the full message.';\n /* eslint-enable prefer-template */\n}","export default function composeClasses(slots, getUtilityClass, classes = undefined) {\n const output = {};\n Object.keys(slots).forEach(\n // `Object.keys(slots)` can't be wider than `T` because we infer `T` from `slots`.\n // @ts-expect-error https://github.com/microsoft/TypeScript/pull/12253#issuecomment-263132208\n slot => {\n output[slot] = slots[slot].reduce((acc, key) => {\n if (key) {\n const utilityClass = getUtilityClass(key);\n if (utilityClass !== '') {\n acc.push(utilityClass);\n }\n if (classes && classes[key]) {\n acc.push(classes[key]);\n }\n }\n return acc;\n }, []).join(' ');\n });\n return output;\n}","// Corresponds to 10 frames at 60 Hz.\n// A few bytes payload overhead when lodash/debounce is ~3 kB and debounce ~300 B.\nexport default function debounce(func, wait = 166) {\n let timeout;\n function debounced(...args) {\n const later = () => {\n // @ts-ignore\n func.apply(this, args);\n };\n clearTimeout(timeout);\n timeout = setTimeout(later, wait);\n }\n debounced.clear = () => {\n clearTimeout(timeout);\n };\n return debounced;\n}","const defaultGenerator = componentName => componentName;\nconst createClassNameGenerator = () => {\n let generate = defaultGenerator;\n return {\n configure(generator) {\n generate = generator;\n },\n generate(componentName) {\n return generate(componentName);\n },\n reset() {\n generate = defaultGenerator;\n }\n };\n};\nconst ClassNameGenerator = createClassNameGenerator();\nexport default ClassNameGenerator;","import ClassNameGenerator from '../ClassNameGenerator';\nexport const globalStateClasses = {\n active: 'active',\n checked: 'checked',\n completed: 'completed',\n disabled: 'disabled',\n error: 'error',\n expanded: 'expanded',\n focused: 'focused',\n focusVisible: 'focusVisible',\n open: 'open',\n readOnly: 'readOnly',\n required: 'required',\n selected: 'selected'\n};\nexport default function generateUtilityClass(componentName, slot, globalStatePrefix = 'Mui') {\n const globalStateClass = globalStateClasses[slot];\n return globalStateClass ? `${globalStatePrefix}-${globalStateClass}` : `${ClassNameGenerator.generate(componentName)}-${slot}`;\n}\nexport function isGlobalState(slot) {\n return globalStateClasses[slot] !== undefined;\n}","import generateUtilityClass from '../generateUtilityClass';\nexport default function generateUtilityClasses(componentName, slots, globalStatePrefix = 'Mui') {\n const result = {};\n slots.forEach(slot => {\n result[slot] = generateUtilityClass(componentName, slot, globalStatePrefix);\n });\n return result;\n}","export default function ownerDocument(node) {\n return node && node.ownerDocument || document;\n}","'use client';\n\nimport * as React from 'react';\n\n/**\n * A version of `React.useLayoutEffect` that does not show a warning when server-side rendering.\n * This is useful for effects that are only needed for client-side rendering but not for SSR.\n *\n * Before you use this hook, make sure to read https://gist.github.com/gaearon/e7d97cdf38a2907924ea12e4ebdf3c85\n * and confirm it doesn't apply to your use-case.\n */\nconst useEnhancedEffect = typeof window !== 'undefined' ? React.useLayoutEffect : React.useEffect;\nexport default useEnhancedEffect;","'use client';\n\nimport * as React from 'react';\nimport useEnhancedEffect from '../useEnhancedEffect';\n\n/**\n * Inspired by https://github.com/facebook/react/issues/14099#issuecomment-440013892\n * See RFC in https://github.com/reactjs/rfcs/pull/220\n */\n\nfunction useEventCallback(fn) {\n const ref = React.useRef(fn);\n useEnhancedEffect(() => {\n ref.current = fn;\n });\n return React.useRef((...args) =>\n // @ts-expect-error hide `this`\n (0, ref.current)(...args)).current;\n}\nexport default useEventCallback;","'use client';\n\nimport * as React from 'react';\nimport setRef from '../setRef';\nexport default function useForkRef(...refs) {\n /**\n * This will create a new function if the refs passed to this hook change and are all defined.\n * This means react will call the old forkRef with `null` and the new forkRef\n * with the ref. Cleanup naturally emerges from this behavior.\n */\n return React.useMemo(() => {\n if (refs.every(ref => ref == null)) {\n return null;\n }\n return instance => {\n refs.forEach(ref => {\n setRef(ref, instance);\n });\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, refs);\n}","/**\n * TODO v5: consider making it private\n *\n * passes {value} to {ref}\n *\n * WARNING: Be sure to only call this inside a callback that is passed as a ref.\n * Otherwise, make sure to cleanup the previous {ref} if it changes. See\n * https://github.com/mui/material-ui/issues/13539\n *\n * Useful if you want to expose the ref of an inner component to the public API\n * while still using it inside the component.\n * @param ref A ref callback or ref object. If anything falsy, this is a no-op.\n */\nexport default function setRef(ref, value) {\n if (typeof ref === 'function') {\n ref(value);\n } else if (ref) {\n ref.current = value;\n }\n}","'use client';\n\nimport * as React from 'react';\nlet globalId = 0;\nfunction useGlobalId(idOverride) {\n const [defaultId, setDefaultId] = React.useState(idOverride);\n const id = idOverride || defaultId;\n React.useEffect(() => {\n if (defaultId == null) {\n // Fallback to this default id when possible.\n // Use the incrementing value for client-side rendering only.\n // We can't use it server-side.\n // If you want to use random values please consider the Birthday Problem: https://en.wikipedia.org/wiki/Birthday_problem\n globalId += 1;\n setDefaultId(`mui-${globalId}`);\n }\n }, [defaultId]);\n return id;\n}\n\n// downstream bundlers may remove unnecessary concatenation, but won't remove toString call -- Workaround for https://github.com/webpack/webpack/issues/14814\nconst maybeReactUseId = React['useId'.toString()];\n/**\n *\n * @example <div id={useId()} />\n * @param idOverride\n * @returns {string}\n */\nexport default function useId(idOverride) {\n if (maybeReactUseId !== undefined) {\n const reactId = maybeReactUseId();\n return idOverride != null ? idOverride : reactId;\n }\n // eslint-disable-next-line react-hooks/rules-of-hooks -- `React.useId` is invariant at runtime.\n return useGlobalId(idOverride);\n}","'use client';\n\nimport * as React from 'react';\nconst UNINITIALIZED = {};\n\n/**\n * A React.useRef() that is initialized lazily with a function. Note that it accepts an optional\n * initialization argument, so the initialization function doesn't need to be an inline closure.\n *\n * @usage\n * const ref = useLazyRef(sortColumns, columns)\n */\nexport default function useLazyRef(init, initArg) {\n const ref = React.useRef(UNINITIALIZED);\n if (ref.current === UNINITIALIZED) {\n ref.current = init(initArg);\n }\n return ref;\n}","'use client';\n\nimport * as React from 'react';\nconst EMPTY = [];\n\n/**\n * A React.useEffect equivalent that runs once, when the component is mounted.\n */\nexport default function useOnMount(fn) {\n /* eslint-disable react-hooks/exhaustive-deps */\n React.useEffect(fn, EMPTY);\n /* eslint-enable react-hooks/exhaustive-deps */\n}","'use client';\n\nimport useLazyRef from '../useLazyRef/useLazyRef';\nimport useOnMount from '../useOnMount/useOnMount';\nexport class Timeout {\n constructor() {\n this.currentId = null;\n this.clear = () => {\n if (this.currentId !== null) {\n clearTimeout(this.currentId);\n this.currentId = null;\n }\n };\n this.disposeEffect = () => {\n return this.clear;\n };\n }\n static create() {\n return new Timeout();\n }\n /**\n * Executes `fn` after `delay`, clearing any previously scheduled call.\n */\n start(delay, fn) {\n this.clear();\n this.currentId = setTimeout(() => {\n this.currentId = null;\n fn();\n }, delay);\n }\n}\nexport default function useTimeout() {\n const timeout = useLazyRef(Timeout.create).current;\n useOnMount(timeout.disposeEffect);\n return timeout;\n}","import { GridPinnedColumnPosition } from \"../hooks/features/columns/gridColumnsInterfaces.js\";\nexport const shouldCellShowRightBorder = (pinnedPosition, indexInSection, sectionLength, showCellVerticalBorderRootProp, gridHasFiller) => {\n const isSectionLastCell = indexInSection === sectionLength - 1;\n if (pinnedPosition === GridPinnedColumnPosition.LEFT && isSectionLastCell) {\n return true;\n }\n if (showCellVerticalBorderRootProp) {\n if (pinnedPosition === GridPinnedColumnPosition.LEFT) {\n return true;\n }\n if (pinnedPosition === GridPinnedColumnPosition.RIGHT) {\n return !isSectionLastCell;\n }\n // pinnedPosition === undefined, middle section\n return !isSectionLastCell || gridHasFiller;\n }\n return false;\n};\nexport const shouldCellShowLeftBorder = (pinnedPosition, indexInSection) => {\n return pinnedPosition === GridPinnedColumnPosition.RIGHT && indexInSection === 0;\n};","import { lruMemoize, createSelectorCreator } from 'reselect';\nimport { warnOnce } from '@mui/x-internals/warning';\nconst reselectCreateSelector = createSelectorCreator({\n memoize: lruMemoize,\n memoizeOptions: {\n maxSize: 1,\n equalityCheck: Object.is\n }\n});\n\n// TODO v8: Remove this type\n\n// TODO v8: Rename this type to `OutputSelector`\n\n// TODO v8: Remove this type\n\n// TODO v8: Rename this type to `SelectorArgs`\n\n// TODO v8: Remove this type\n\n// TODO v8: Rename this type to `CreateSelectorFunction`\n\nconst cache = new WeakMap();\nfunction checkIsAPIRef(value) {\n return 'current' in value && 'instanceId' in value.current;\n}\nconst DEFAULT_INSTANCE_ID = {\n id: 'default'\n};\n\n// TODO v8: Remove this function\nexport const createSelector = (a, b, c, d, e, f, ...other) => {\n if (other.length > 0) {\n throw new Error('Unsupported number of selectors');\n }\n let selector;\n if (a && b && c && d && e && f) {\n selector = (stateOrApiRef, instanceIdParam) => {\n const isAPIRef = checkIsAPIRef(stateOrApiRef);\n const instanceId = instanceIdParam ?? (isAPIRef ? stateOrApiRef.current.instanceId : DEFAULT_INSTANCE_ID);\n const state = isAPIRef ? stateOrApiRef.current.state : stateOrApiRef;\n const va = a(state, instanceId);\n const vb = b(state, instanceId);\n const vc = c(state, instanceId);\n const vd = d(state, instanceId);\n const ve = e(state, instanceId);\n return f(va, vb, vc, vd, ve);\n };\n } else if (a && b && c && d && e) {\n selector = (stateOrApiRef, instanceIdParam) => {\n const isAPIRef = checkIsAPIRef(stateOrApiRef);\n const instanceId = instanceIdParam ?? (isAPIRef ? stateOrApiRef.current.instanceId : DEFAULT_INSTANCE_ID);\n const state = isAPIRef ? stateOrApiRef.current.state : stateOrApiRef;\n const va = a(state, instanceId);\n const vb = b(state, instanceId);\n const vc = c(state, instanceId);\n const vd = d(state, instanceId);\n return e(va, vb, vc, vd);\n };\n } else if (a && b && c && d) {\n selector = (stateOrApiRef, instanceIdParam) => {\n const isAPIRef = checkIsAPIRef(stateOrApiRef);\n const instanceId = instanceIdParam ?? (isAPIRef ? stateOrApiRef.current.instanceId : DEFAULT_INSTANCE_ID);\n const state = isAPIRef ? stateOrApiRef.current.state : stateOrApiRef;\n const va = a(state, instanceId);\n const vb = b(state, instanceId);\n const vc = c(state, instanceId);\n return d(va, vb, vc);\n };\n } else if (a && b && c) {\n selector = (stateOrApiRef, instanceIdParam) => {\n const isAPIRef = checkIsAPIRef(stateOrApiRef);\n const instanceId = instanceIdParam ?? (isAPIRef ? stateOrApiRef.current.instanceId : DEFAULT_INSTANCE_ID);\n const state = isAPIRef ? stateOrApiRef.current.state : stateOrApiRef;\n const va = a(state, instanceId);\n const vb = b(state, instanceId);\n return c(va, vb);\n };\n } else if (a && b) {\n selector = (stateOrApiRef, instanceIdParam) => {\n const isAPIRef = checkIsAPIRef(stateOrApiRef);\n const instanceId = instanceIdParam ?? (isAPIRef ? stateOrApiRef.current.instanceId : DEFAULT_INSTANCE_ID);\n const state = isAPIRef ? stateOrApiRef.current.state : stateOrApiRef;\n const va = a(state, instanceId);\n return b(va);\n };\n } else {\n throw new Error('Missing arguments');\n }\n\n // We use this property to detect if the selector was created with createSelector\n // or it's only a simple function the receives the state and returns part of it.\n selector.acceptsApiRef = true;\n return selector;\n};\n\n// TODO v8: Rename this function to `createSelector`\nexport const createSelectorV8 = (a, b, c, d, e, f, ...other) => {\n if (other.length > 0) {\n throw new Error('Unsupported number of selectors');\n }\n let selector;\n if (a && b && c && d && e && f) {\n selector = (stateOrApiRef, args, instanceIdParam) => {\n const isAPIRef = checkIsAPIRef(stateOrApiRef);\n const instanceId = instanceIdParam ?? (isAPIRef ? stateOrApiRef.current.instanceId : DEFAULT_INSTANCE_ID);\n const state = isAPIRef ? stateOrApiRef.current.state : stateOrApiRef;\n const va = a(state, args, instanceId);\n const vb = b(state, args, instanceId);\n const vc = c(state, args, instanceId);\n const vd = d(state, args, instanceId);\n const ve = e(state, args, instanceId);\n return f(va, vb, vc, vd, ve, args);\n };\n } else if (a && b && c && d && e) {\n selector = (stateOrApiRef, args, instanceIdParam) => {\n const isAPIRef = checkIsAPIRef(stateOrApiRef);\n const instanceId = instanceIdParam ?? (isAPIRef ? stateOrApiRef.current.instanceId : DEFAULT_INSTANCE_ID);\n const state = isAPIRef ? stateOrApiRef.current.state : stateOrApiRef;\n const va = a(state, args, instanceId);\n const vb = b(state, args, instanceId);\n const vc = c(state, args, instanceId);\n const vd = d(state, args, instanceId);\n return e(va, vb, vc, vd, args);\n };\n } else if (a && b && c && d) {\n selector = (stateOrApiRef, args, instanceIdParam) => {\n const isAPIRef = checkIsAPIRef(stateOrApiRef);\n const instanceId = instanceIdParam ?? (isAPIRef ? stateOrApiRef.current.instanceId : DEFAULT_INSTANCE_ID);\n const state = isAPIRef ? stateOrApiRef.current.state : stateOrApiRef;\n const va = a(state, args, instanceId);\n const vb = b(state, args, instanceId);\n const vc = c(state, args, instanceId);\n return d(va, vb, vc, args);\n };\n } else if (a && b && c) {\n selector = (stateOrApiRef, args, instanceIdParam) => {\n const isAPIRef = checkIsAPIRef(stateOrApiRef);\n const instanceId = instanceIdParam ?? (isAPIRef ? stateOrApiRef.current.instanceId : DEFAULT_INSTANCE_ID);\n const state = isAPIRef ? stateOrApiRef.current.state : stateOrApiRef;\n const va = a(state, args, instanceId);\n const vb = b(state, args, instanceId);\n return c(va, vb, args);\n };\n } else if (a && b) {\n selector = (stateOrApiRef, args, instanceIdParam) => {\n const isAPIRef = checkIsAPIRef(stateOrApiRef);\n const instanceId = instanceIdParam ?? (isAPIRef ? stateOrApiRef.current.instanceId : DEFAULT_INSTANCE_ID);\n const state = isAPIRef ? stateOrApiRef.current.state : stateOrApiRef;\n const va = a(state, args, instanceId);\n return b(va, args);\n };\n } else {\n throw new Error('Missing arguments');\n }\n\n // We use this property to detect if the selector was created with createSelector\n // or it's only a simple function the receives the state and returns part of it.\n selector.acceptsApiRef = true;\n return selector;\n};\n\n// TODO v8: Remove this function\nexport const createSelectorMemoized = (...args) => {\n const selector = (stateOrApiRef, instanceId) => {\n const isAPIRef = checkIsAPIRef(stateOrApiRef);\n const cacheKey = isAPIRef ? stateOrApiRef.current.instanceId : instanceId ?? DEFAULT_INSTANCE_ID;\n const state = isAPIRef ? stateOrApiRef.current.state : stateOrApiRef;\n if (process.env.NODE_ENV !== 'production') {\n if (cacheKey.id === 'default') {\n warnOnce(['MUI X: A selector was called without passing the instance ID, which may impact the performance of the grid.', 'To fix, call it with `apiRef`, for example `mySelector(apiRef)`, or pass the instance ID explicitly, for example `mySelector(state, apiRef.current.instanceId)`.']);\n }\n }\n const cacheArgsInit = cache.get(cacheKey);\n const cacheArgs = cacheArgsInit ?? new Map();\n const cacheFn = cacheArgs?.get(args);\n if (cacheArgs && cacheFn) {\n // We pass the cache key because the called selector might have as\n // dependency another selector created with this `createSelector`.\n return cacheFn(state, cacheKey);\n }\n const fn = reselectCreateSelector(...args);\n if (!cacheArgsInit) {\n cache.set(cacheKey, cacheArgs);\n }\n cacheArgs.set(args, fn);\n return fn(state, cacheKey);\n };\n\n // We use this property to detect if the selector was created with createSelector\n // or it's only a simple function the receives the state and returns part of it.\n selector.acceptsApiRef = true;\n return selector;\n};\n\n// TODO v8: Rename this function to `createSelectorMemoized`\nexport const createSelectorMemoizedV8 = (...args) => {\n const selector = (stateOrApiRef, selectorArgs, instanceId) => {\n const isAPIRef = checkIsAPIRef(stateOrApiRef);\n const cacheKey = isAPIRef ? stateOrApiRef.current.instanceId : instanceId ?? DEFAULT_INSTANCE_ID;\n const state = isAPIRef ? stateOrApiRef.current.state : stateOrApiRef;\n if (process.env.NODE_ENV !== 'production') {\n if (cacheKey.id === 'default') {\n warnOnce(['MUI X: A selector was called without passing the instance ID, which may impact the performance of the grid.', 'To fix, call it with `apiRef`, for example `mySelector(apiRef)`, or pass the instance ID explicitly, for example `mySelector(state, apiRef.current.instanceId)`.']);\n }\n }\n const cacheArgsInit = cache.get(cacheKey);\n const cacheArgs = cacheArgsInit ?? new Map();\n const cacheFn = cacheArgs?.get(args);\n if (cacheArgs && cacheFn) {\n // We pass the cache key because the called selector might have as\n // dependency another selector created with this `createSelector`.\n return cacheFn(state, selectorArgs, cacheKey);\n }\n const fn = reselectCreateSelector(...args);\n if (!cacheArgsInit) {\n cache.set(cacheKey, cacheArgs);\n }\n cacheArgs.set(args, fn);\n return fn(state, selectorArgs, cacheKey);\n };\n\n // We use this property to detect if the selector was created with createSelector\n // or it's only a simple function the receives the state and returns part of it.\n selector.acceptsApiRef = true;\n return selector;\n};","import { gridClasses } from \"../constants/gridClasses.js\";\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('MUI X: The root element is not found.');\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)) {\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 => isRtl ? index > colIndex : index < colIndex\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 findGridCells(api, field) {\n const container = api.virtualScrollerRef.current;\n return Array.from(container.querySelectorAll(`:scope > 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 > .${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}","// 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 GRID_MULTIPLE_SELECTION_KEYS = ['Meta', 'Control', 'Shift'];\nexport const GRID_CELL_EXIT_EDIT_MODE_KEYS = ['Enter', 'Escape', 'Tab'];\nexport const GRID_CELL_EDIT_COMMIT_KEYS = ['Enter', 'Tab'];\nexport const isMultipleKey = key => GRID_MULTIPLE_SELECTION_KEYS.indexOf(key) > -1;\nexport const isCellEnterEditModeKeys = event => isPrintableKey(event) || event.key === 'Enter' || event.key === 'Backspace' || event.key === 'Delete';\nexport const isCellExitEditModeKeys = key => GRID_CELL_EXIT_EDIT_MODE_KEYS.indexOf(key) > -1;\nexport const isCellEditCommitKeys = key => GRID_CELL_EDIT_COMMIT_KEYS.indexOf(key) > -1;\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 if ((event.ctrlKey || event.metaKey) && event.key.toLowerCase() === 'v' && !event.shiftKey && !event.altKey) {\n return true;\n }\n return false;\n}","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 the min have 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/**\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 * We only type the public interface to avoid dozens of `as` in the function.\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}\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/* eslint-disable @typescript-eslint/no-unused-vars */\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(_) {}\n/* eslint-enable @typescript-eslint/no-unused-vars */","import * as React from 'react';\nimport { fastObjectShallowCompare } from \"../fastObjectShallowCompare/index.js\";\nexport function fastMemo(component) {\n return /*#__PURE__*/React.memo(component, fastObjectShallowCompare);\n}","const is = Object.is;\nexport function fastObjectShallowCompare(a, b) {\n if (a === b) {\n return true;\n }\n if (!(a instanceof Object) || !(b instanceof Object)) {\n return false;\n }\n let aLength = 0;\n let bLength = 0;\n\n /* eslint-disable guard-for-in */\n for (const key in a) {\n aLength += 1;\n if (!is(a[key], b[key])) {\n return false;\n }\n if (!(key in b)) {\n return false;\n }\n }\n\n /* eslint-disable-next-line @typescript-eslint/naming-convention, @typescript-eslint/no-unused-vars */\n for (const _ in b) {\n bLength += 1;\n }\n return aLength === bLength;\n}","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n\nfunction emptyFunction() {}\nfunction emptyFunctionWithReset() {}\nemptyFunctionWithReset.resetWarningCache = emptyFunction;\n\nmodule.exports = function() {\n function shim(props, propName, componentName, location, propFullName, secret) {\n if (secret === ReactPropTypesSecret) {\n // It is still safe when called from React.\n return;\n }\n var err = new Error(\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use PropTypes.checkPropTypes() to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n err.name = 'Invariant Violation';\n throw err;\n };\n shim.isRequired = shim;\n function getShim() {\n return shim;\n };\n // Important!\n // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.\n var ReactPropTypes = {\n array: shim,\n bigint: shim,\n bool: shim,\n func: shim,\n number: shim,\n object: shim,\n string: shim,\n symbol: shim,\n\n any: shim,\n arrayOf: getShim,\n element: shim,\n elementType: shim,\n instanceOf: getShim,\n node: shim,\n objectOf: getShim,\n oneOf: getShim,\n oneOfType: getShim,\n shape: getShim,\n exact: getShim,\n\n checkPropTypes: emptyFunctionWithReset,\n resetWarningCache: emptyFunction\n };\n\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nif (process.env.NODE_ENV !== 'production') {\n var ReactIs = require('react-is');\n\n // By explicitly using `prop-types` you are opting into new development behavior.\n // http://fb.me/prop-types-in-prod\n var throwOnDirectAccess = true;\n module.exports = require('./factoryWithTypeCheckers')(ReactIs.isElement, throwOnDirectAccess);\n} else {\n // By explicitly using `prop-types` you are opting into new production behavior.\n // http://fb.me/prop-types-in-prod\n module.exports = require('./factoryWithThrowingShims')();\n}\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n","import type { AnyFunction } from '../types'\r\n\r\n/**\r\n * Runs a check to determine if the given result function behaves as an\r\n * identity function. An identity function is one that returns its\r\n * input unchanged, for example, `x => x`. This check helps ensure\r\n * efficient memoization and prevent unnecessary re-renders by encouraging\r\n * proper use of transformation logic in result functions and\r\n * extraction logic in input selectors.\r\n *\r\n * @param resultFunc - The result function to be checked.\r\n * @param inputSelectorsResults - The results of the input selectors.\r\n * @param outputSelectorResult - The result of the output selector.\r\n *\r\n * @see {@link https://reselect.js.org/api/development-only-stability-checks#identityfunctioncheck `identityFunctionCheck`}\r\n *\r\n * @since 5.0.0\r\n * @internal\r\n */\r\nexport const runIdentityFunctionCheck = (\r\n resultFunc: AnyFunction,\r\n inputSelectorsResults: unknown[],\r\n outputSelectorResult: unknown\r\n) => {\r\n if (\r\n inputSelectorsResults.length === 1 &&\r\n inputSelectorsResults[0] === outputSelectorResult\r\n ) {\r\n let isInputSameAsOutput = false\r\n try {\r\n const emptyObject = {}\r\n if (resultFunc(emptyObject) === emptyObject) isInputSameAsOutput = true\r\n } catch {\r\n // Do nothing\r\n }\r\n if (isInputSameAsOutput) {\r\n let stack: string | undefined = undefined\r\n try {\r\n throw new Error()\r\n } catch (e) {\r\n // eslint-disable-next-line @typescript-eslint/no-extra-semi, no-extra-semi\r\n ;({ stack } = e as Error)\r\n }\r\n console.warn(\r\n 'The result function returned its own inputs without modification. e.g' +\r\n '\\n`createSelector([state => state.todos], todos => todos)`' +\r\n '\\nThis could lead to inefficient memoization and unnecessary re-renders.' +\r\n '\\nEnsure transformation logic is in the result function, and extraction logic is in the input selectors.',\r\n { stack }\r\n )\r\n }\r\n }\r\n}\r\n","import { runIdentityFunctionCheck } from './devModeChecks/identityFunctionCheck'\r\nimport { runInputStabilityCheck } from './devModeChecks/inputStabilityCheck'\r\nimport { globalDevModeChecks } from './devModeChecks/setGlobalDevModeChecks'\r\n// eslint-disable-next-line @typescript-eslint/consistent-type-imports\r\nimport type {\r\n DevModeChecks,\r\n Selector,\r\n SelectorArray,\r\n DevModeChecksExecutionInfo\r\n} from './types'\r\n\r\nexport const NOT_FOUND = /* @__PURE__ */ Symbol('NOT_FOUND')\r\nexport type NOT_FOUND_TYPE = typeof NOT_FOUND\r\n\r\n/**\r\n * Assert that the provided value is a function. If the assertion fails,\r\n * a `TypeError` is thrown with an optional custom error message.\r\n *\r\n * @param func - The value to be checked.\r\n * @param errorMessage - An optional custom error message to use if the assertion fails.\r\n * @throws A `TypeError` if the assertion fails.\r\n */\r\nexport function assertIsFunction<FunctionType extends Function>(\r\n func: unknown,\r\n errorMessage = `expected a function, instead received ${typeof func}`\r\n): asserts func is FunctionType {\r\n if (typeof func !== 'function') {\r\n throw new TypeError(errorMessage)\r\n }\r\n}\r\n\r\n/**\r\n * Assert that the provided value is an object. If the assertion fails,\r\n * a `TypeError` is thrown with an optional custom error message.\r\n *\r\n * @param object - The value to be checked.\r\n * @param errorMessage - An optional custom error message to use if the assertion fails.\r\n * @throws A `TypeError` if the assertion fails.\r\n */\r\nexport function assertIsObject<ObjectType extends Record<string, unknown>>(\r\n object: unknown,\r\n errorMessage = `expected an object, instead received ${typeof object}`\r\n): asserts object is ObjectType {\r\n if (typeof object !== 'object') {\r\n throw new TypeError(errorMessage)\r\n }\r\n}\r\n\r\n/**\r\n * Assert that the provided array is an array of functions. If the assertion fails,\r\n * a `TypeError` is thrown with an optional custom error message.\r\n *\r\n * @param array - The array to be checked.\r\n * @param errorMessage - An optional custom error message to use if the assertion fails.\r\n * @throws A `TypeError` if the assertion fails.\r\n */\r\nexport function assertIsArrayOfFunctions<FunctionType extends Function>(\r\n array: unknown[],\r\n errorMessage = `expected all items to be functions, instead received the following types: `\r\n): asserts array is FunctionType[] {\r\n if (\r\n !array.every((item): item is FunctionType => typeof item === 'function')\r\n ) {\r\n const itemTypes = array\r\n .map(item =>\r\n typeof item === 'function'\r\n ? `function ${item.name || 'unnamed'}()`\r\n : typeof item\r\n )\r\n .join(', ')\r\n throw new TypeError(`${errorMessage}[${itemTypes}]`)\r\n }\r\n}\r\n\r\n/**\r\n * Ensure that the input is an array. If it's already an array, it's returned as is.\r\n * If it's not an array, it will be wrapped in a new array.\r\n *\r\n * @param item - The item to be checked.\r\n * @returns An array containing the input item. If the input is already an array, it's returned without modification.\r\n */\r\nexport const ensureIsArray = (item: unknown) => {\r\n return Array.isArray(item) ? item : [item]\r\n}\r\n\r\n/**\r\n * Extracts the \"dependencies\" / \"input selectors\" from the arguments of `createSelector`.\r\n *\r\n * @param createSelectorArgs - Arguments passed to `createSelector` as an array.\r\n * @returns An array of \"input selectors\" / \"dependencies\".\r\n * @throws A `TypeError` if any of the input selectors is not function.\r\n */\r\nexport function getDependencies(createSelectorArgs: unknown[]) {\r\n const dependencies = Array.isArray(createSelectorArgs[0])\r\n ? createSelectorArgs[0]\r\n : createSelectorArgs\r\n\r\n assertIsArrayOfFunctions<Selector>(\r\n dependencies,\r\n `createSelector expects all input-selectors to be functions, but received the following types: `\r\n )\r\n\r\n return dependencies as SelectorArray\r\n}\r\n\r\n/**\r\n * Runs each input selector and returns their collective results as an array.\r\n *\r\n * @param dependencies - An array of \"dependencies\" or \"input selectors\".\r\n * @param inputSelectorArgs - An array of arguments being passed to the input selectors.\r\n * @returns An array of input selector results.\r\n */\r\nexport function collectInputSelectorResults(\r\n dependencies: SelectorArray,\r\n inputSelectorArgs: unknown[] | IArguments\r\n) {\r\n const inputSelectorResults = []\r\n const { length } = dependencies\r\n for (let i = 0; i < length; i++) {\r\n // @ts-ignore\r\n // apply arguments instead of spreading and mutate a local list of params for performance.\r\n inputSelectorResults.push(dependencies[i].apply(null, inputSelectorArgs))\r\n }\r\n return inputSelectorResults\r\n}\r\n\r\n/**\r\n * Retrieves execution information for development mode checks.\r\n *\r\n * @param devModeChecks - Custom Settings for development mode checks. These settings will override the global defaults.\r\n * @param firstRun - Indicates whether it is the first time the selector has run.\r\n * @returns An object containing the execution information for each development mode check.\r\n */\r\nexport const getDevModeChecksExecutionInfo = (\r\n firstRun: boolean,\r\n devModeChecks: Partial<DevModeChecks>\r\n) => {\r\n const { identityFunctionCheck, inputStabilityCheck } = {\r\n ...globalDevModeChecks,\r\n ...devModeChecks\r\n }\r\n return {\r\n identityFunctionCheck: {\r\n shouldRun:\r\n identityFunctionCheck === 'always' ||\r\n (identityFunctionCheck === 'once' && firstRun),\r\n run: runIdentityFunctionCheck\r\n },\r\n inputStabilityCheck: {\r\n shouldRun:\r\n inputStabilityCheck === 'always' ||\r\n (inputStabilityCheck === 'once' && firstRun),\r\n run: runInputStabilityCheck\r\n }\r\n } satisfies DevModeChecksExecutionInfo\r\n}\r\n","// Original source:\r\n// - https://github.com/simonihmig/tracked-redux/blob/master/packages/tracked-redux/src/-private/proxy.ts\r\n\r\nimport type { Node, Tag } from './tracking'\r\nimport {\r\n consumeCollection,\r\n consumeTag,\r\n createTag,\r\n dirtyCollection,\r\n dirtyTag\r\n} from './tracking'\r\n\r\nexport const REDUX_PROXY_LABEL = Symbol()\r\n\r\nlet nextId = 0\r\n\r\nconst proto = Object.getPrototypeOf({})\r\n\r\nclass ObjectTreeNode<T extends Record<string, unknown>> implements Node<T> {\r\n proxy: T = new Proxy(this, objectProxyHandler) as unknown as T\r\n tag = createTag()\r\n tags = {} as Record<string, Tag>\r\n children = {} as Record<string, Node>\r\n collectionTag = null\r\n id = nextId++\r\n\r\n constructor(public value: T) {\r\n this.value = value\r\n this.tag.value = value\r\n }\r\n}\r\n\r\nconst objectProxyHandler = {\r\n get(node: Node, key: string | symbol): unknown {\r\n function calculateResult() {\r\n const { value } = node\r\n\r\n const childValue = Reflect.get(value, key)\r\n\r\n if (typeof key === 'symbol') {\r\n return childValue\r\n }\r\n\r\n if (key in proto) {\r\n return childValue\r\n }\r\n\r\n if (typeof childValue === 'object' && childValue !== null) {\r\n let childNode = node.children[key]\r\n\r\n if (childNode === undefined) {\r\n childNode = node.children[key] = createNode(childValue)\r\n }\r\n\r\n if (childNode.tag) {\r\n consumeTag(childNode.tag)\r\n }\r\n\r\n return childNode.proxy\r\n } else {\r\n let tag = node.tags[key]\r\n\r\n if (tag === undefined) {\r\n tag = node.tags[key] = createTag()\r\n tag.value = childValue\r\n }\r\n\r\n consumeTag(tag)\r\n\r\n return childValue\r\n }\r\n }\r\n const res = calculateResult()\r\n return res\r\n },\r\n\r\n ownKeys(node: Node): ArrayLike<string | symbol> {\r\n consumeCollection(node)\r\n return Reflect.ownKeys(node.value)\r\n },\r\n\r\n getOwnPropertyDescriptor(\r\n node: Node,\r\n prop: string | symbol\r\n ): PropertyDescriptor | undefined {\r\n return Reflect.getOwnPropertyDescriptor(node.value, prop)\r\n },\r\n\r\n has(node: Node, prop: string | symbol): boolean {\r\n return Reflect.has(node.value, prop)\r\n }\r\n}\r\n\r\nclass ArrayTreeNode<T extends Array<unknown>> implements Node<T> {\r\n proxy: T = new Proxy([this], arrayProxyHandler) as unknown as T\r\n tag = createTag()\r\n tags = {}\r\n children = {}\r\n collectionTag = null\r\n id = nextId++\r\n\r\n constructor(public value: T) {\r\n this.value = value\r\n this.tag.value = value\r\n }\r\n}\r\n\r\nconst arrayProxyHandler = {\r\n get([node]: [Node], key: string | symbol): unknown {\r\n if (key === 'length') {\r\n consumeCollection(node)\r\n }\r\n\r\n return objectProxyHandler.get(node, key)\r\n },\r\n\r\n ownKeys([node]: [Node]): ArrayLike<string | symbol> {\r\n return objectProxyHandler.ownKeys(node)\r\n },\r\n\r\n getOwnPropertyDescriptor(\r\n [node]: [Node],\r\n prop: string | symbol\r\n ): PropertyDescriptor | undefined {\r\n return objectProxyHandler.getOwnPropertyDescriptor(node, prop)\r\n },\r\n\r\n has([node]: [Node], prop: string | symbol): boolean {\r\n return objectProxyHandler.has(node, prop)\r\n }\r\n}\r\n\r\nexport function createNode<T extends Array<unknown> | Record<string, unknown>>(\r\n value: T\r\n): Node<T> {\r\n if (Array.isArray(value)) {\r\n return new ArrayTreeNode(value)\r\n }\r\n\r\n return new ObjectTreeNode(value) as Node<T>\r\n}\r\n\r\nconst keysMap = new WeakMap<\r\n Array<unknown> | Record<string, unknown>,\r\n Set<string>\r\n>()\r\n\r\nexport function updateNode<T extends Array<unknown> | Record<string, unknown>>(\r\n node: Node<T>,\r\n newValue: T\r\n): void {\r\n const { value, tags, children } = node\r\n\r\n node.value = newValue\r\n\r\n if (\r\n Array.isArray(value) &&\r\n Array.isArray(newValue) &&\r\n value.length !== newValue.length\r\n ) {\r\n dirtyCollection(node)\r\n } else {\r\n if (value !== newValue) {\r\n let oldKeysSize = 0\r\n let newKeysSize = 0\r\n let anyKeysAdded = false\r\n\r\n for (const _key in value) {\r\n oldKeysSize++\r\n }\r\n\r\n for (const key in newValue) {\r\n newKeysSize++\r\n if (!(key in value)) {\r\n anyKeysAdded = true\r\n break\r\n }\r\n }\r\n\r\n const isDifferent = anyKeysAdded || oldKeysSize !== newKeysSize\r\n\r\n if (isDifferent) {\r\n dirtyCollection(node)\r\n }\r\n }\r\n }\r\n\r\n for (const key in tags) {\r\n const childValue = (value as Record<string, unknown>)[key]\r\n const newChildValue = (newValue as Record<string, unknown>)[key]\r\n\r\n if (childValue !== newChildValue) {\r\n dirtyCollection(node)\r\n dirtyTag(tags[key], newChildValue)\r\n }\r\n\r\n if (typeof newChildValue === 'object' && newChildValue !== null) {\r\n delete tags[key]\r\n }\r\n }\r\n\r\n for (const key in children) {\r\n const childNode = children[key]\r\n const newChildValue = (newValue as Record<string, unknown>)[key]\r\n\r\n const childValue = childNode.value\r\n\r\n if (childValue === newChildValue) {\r\n continue\r\n } else if (typeof newChildValue === 'object' && newChildValue !== null) {\r\n updateNode(childNode, newChildValue as Record<string, unknown>)\r\n } else {\r\n deleteNode(childNode)\r\n delete children[key]\r\n }\r\n }\r\n}\r\n\r\nfunction deleteNode(node: Node): void {\r\n if (node.tag) {\r\n dirtyTag(node.tag, null)\r\n }\r\n dirtyCollection(node)\r\n for (const key in node.tags) {\r\n dirtyTag(node.tags[key], null)\r\n }\r\n for (const key in node.children) {\r\n deleteNode(node.children[key])\r\n }\r\n}\r\n","import type {\r\n AnyFunction,\r\n DefaultMemoizeFields,\r\n EqualityFn,\r\n Simplify\r\n} from './types'\r\n\r\nimport type { NOT_FOUND_TYPE } from './utils'\r\nimport { NOT_FOUND } from './utils'\r\n\r\n// Cache implementation based on Erik Rasmussen's `lru-memoize`:\r\n// https://github.com/erikras/lru-memoize\r\n\r\ninterface Entry {\r\n key: unknown\r\n value: unknown\r\n}\r\n\r\ninterface Cache {\r\n get(key: unknown): unknown | NOT_FOUND_TYPE\r\n put(key: unknown, value: unknown): void\r\n getEntries(): Entry[]\r\n clear(): void\r\n}\r\n\r\nfunction createSingletonCache(equals: EqualityFn): Cache {\r\n let entry: Entry | undefined\r\n return {\r\n get(key: unknown) {\r\n if (entry && equals(entry.key, key)) {\r\n return entry.value\r\n }\r\n\r\n return NOT_FOUND\r\n },\r\n\r\n put(key: unknown, value: unknown) {\r\n entry = { key, value }\r\n },\r\n\r\n getEntries() {\r\n return entry ? [entry] : []\r\n },\r\n\r\n clear() {\r\n entry = undefined\r\n }\r\n }\r\n}\r\n\r\nfunction createLruCache(maxSize: number, equals: EqualityFn): Cache {\r\n let entries: Entry[] = []\r\n\r\n function get(key: unknown) {\r\n const cacheIndex = entries.findIndex(entry => equals(key, entry.key))\r\n\r\n // We found a cached entry\r\n if (cacheIndex > -1) {\r\n const entry = entries[cacheIndex]\r\n\r\n // Cached entry not at top of cache, move it to the top\r\n if (cacheIndex > 0) {\r\n entries.splice(cacheIndex, 1)\r\n entries.unshift(entry)\r\n }\r\n\r\n return entry.value\r\n }\r\n\r\n // No entry found in cache, return sentinel\r\n return NOT_FOUND\r\n }\r\n\r\n function put(key: unknown, value: unknown) {\r\n if (get(key) === NOT_FOUND) {\r\n // TODO Is unshift slow?\r\n entries.unshift({ key, value })\r\n if (entries.length > maxSize) {\r\n entries.pop()\r\n }\r\n }\r\n }\r\n\r\n function getEntries() {\r\n return entries\r\n }\r\n\r\n function clear() {\r\n entries = []\r\n }\r\n\r\n return { get, put, getEntries, clear }\r\n}\r\n\r\n/**\r\n * Runs a simple reference equality check.\r\n * What {@linkcode lruMemoize lruMemoize} uses by default.\r\n *\r\n * **Note**: This function was previously known as `defaultEqualityCheck`.\r\n *\r\n * @public\r\n */\r\nexport const referenceEqualityCheck: EqualityFn = (a, b) => a === b\r\n\r\nexport function createCacheKeyComparator(equalityCheck: EqualityFn) {\r\n return function areArgumentsShallowlyEqual(\r\n prev: unknown[] | IArguments | null,\r\n next: unknown[] | IArguments | null\r\n ): boolean {\r\n if (prev === null || next === null || prev.length !== next.length) {\r\n return false\r\n }\r\n\r\n // Do this in a for loop (and not a `forEach` or an `every`) so we can determine equality as fast as possible.\r\n const { length } = prev\r\n for (let i = 0; i < length; i++) {\r\n if (!equalityCheck(prev[i], next[i])) {\r\n return false\r\n }\r\n }\r\n\r\n return true\r\n }\r\n}\r\n\r\n/**\r\n * Options for configuring the behavior of a function memoized with\r\n * LRU (Least Recently Used) caching.\r\n *\r\n * @template Result - The type of the return value of the memoized function.\r\n *\r\n * @public\r\n */\r\nexport interface LruMemoizeOptions<Result = any> {\r\n /**\r\n * Function used to compare the individual arguments of the\r\n * provided calculation function.\r\n *\r\n * @default referenceEqualityCheck\r\n */\r\n equalityCheck?: EqualityFn\r\n\r\n /**\r\n * If provided, used to compare a newly generated output value against\r\n * previous values in the cache. If a match is found,\r\n * the old value is returned. This addresses the common\r\n * ```ts\r\n * todos.map(todo => todo.id)\r\n * ```\r\n * use case, where an update to another field in the original data causes\r\n * a recalculation due to changed references, but the output is still\r\n * effectively the same.\r\n *\r\n * @since 4.1.0\r\n */\r\n resultEqualityCheck?: EqualityFn<Result>\r\n\r\n /**\r\n * The maximum size of the cache used by the selector.\r\n * A size greater than 1 means the selector will use an\r\n * LRU (Least Recently Used) cache, allowing for the caching of multiple\r\n * results based on different sets of arguments.\r\n *\r\n * @default 1\r\n */\r\n maxSize?: number\r\n}\r\n\r\n/**\r\n * Creates a memoized version of a function with an optional\r\n * LRU (Least Recently Used) cache. The memoized function uses a cache to\r\n * store computed values. Depending on the `maxSize` option, it will use\r\n * either a singleton cache (for a single entry) or an\r\n * LRU cache (for multiple entries).\r\n *\r\n * **Note**: This function was previously known as `defaultMemoize`.\r\n *\r\n * @param func - The function to be memoized.\r\n * @param equalityCheckOrOptions - Either an equality check function or an options object.\r\n * @returns A memoized function with a `.clearCache()` method attached.\r\n *\r\n * @template Func - The type of the function that is memoized.\r\n *\r\n * @see {@link https://reselect.js.org/api/lruMemoize `lruMemoize`}\r\n *\r\n * @public\r\n */\r\nexport function lruMemoize<Func extends AnyFunction>(\r\n func: Func,\r\n equalityCheckOrOptions?: EqualityFn | LruMemoizeOptions<ReturnType<Func>>\r\n) {\r\n const providedOptions =\r\n typeof equalityCheckOrOptions === 'object'\r\n ? equalityCheckOrOptions\r\n : { equalityCheck: equalityCheckOrOptions }\r\n\r\n const {\r\n equalityCheck = referenceEqualityCheck,\r\n maxSize = 1,\r\n resultEqualityCheck\r\n } = providedOptions\r\n\r\n const comparator = createCacheKeyComparator(equalityCheck)\r\n\r\n let resultsCount = 0\r\n\r\n const cache =\r\n maxSize <= 1\r\n ? createSingletonCache(comparator)\r\n : createLruCache(maxSize, comparator)\r\n\r\n function memoized() {\r\n let value = cache.get(arguments) as ReturnType<Func>\r\n if (value === NOT_FOUND) {\r\n // apply arguments instead of spreading for performance.\r\n // @ts-ignore\r\n value = func.apply(null, arguments) as ReturnType<Func>\r\n resultsCount++\r\n\r\n if (resultEqualityCheck) {\r\n const entries = cache.getEntries()\r\n const matchingEntry = entries.find(entry =>\r\n resultEqualityCheck(entry.value as ReturnType<Func>, value)\r\n )\r\n\r\n if (matchingEntry) {\r\n value = matchingEntry.value as ReturnType<Func>\r\n resultsCount !== 0 && resultsCount--\r\n }\r\n }\r\n\r\n cache.put(arguments, value)\r\n }\r\n return value\r\n }\r\n\r\n memoized.clearCache = () => {\r\n cache.clear()\r\n memoized.resetResultsCount()\r\n }\r\n\r\n memoized.resultsCount = () => resultsCount\r\n\r\n memoized.resetResultsCount = () => {\r\n resultsCount = 0\r\n }\r\n\r\n return memoized as Func & Simplify<DefaultMemoizeFields>\r\n}\r\n","// Original source:\r\n// - https://github.com/facebook/react/blob/0b974418c9a56f6c560298560265dcf4b65784bc/packages/react/src/ReactCache.js\r\n\r\nimport type {\r\n AnyFunction,\r\n DefaultMemoizeFields,\r\n EqualityFn,\r\n Simplify\r\n} from './types'\r\n\r\nclass StrongRef<T> {\r\n constructor(private value: T) {}\r\n deref() {\r\n return this.value\r\n }\r\n}\r\n\r\nconst Ref =\r\n typeof WeakRef !== 'undefined'\r\n ? WeakRef\r\n : (StrongRef as unknown as typeof WeakRef)\r\n\r\nconst UNTERMINATED = 0\r\nconst TERMINATED = 1\r\n\r\ninterface UnterminatedCacheNode<T> {\r\n /**\r\n * Status, represents whether the cached computation returned a value or threw an error.\r\n */\r\n s: 0\r\n /**\r\n * Value, either the cached result or an error, depending on status.\r\n */\r\n v: void\r\n /**\r\n * Object cache, a `WeakMap` where non-primitive arguments are stored.\r\n */\r\n o: null | WeakMap<Function | Object, CacheNode<T>>\r\n /**\r\n * Primitive cache, a regular Map where primitive arguments are stored.\r\n */\r\n p: null | Map<string | number | null | void | symbol | boolean, CacheNode<T>>\r\n}\r\n\r\ninterface TerminatedCacheNode<T> {\r\n /**\r\n * Status, represents whether the cached computation returned a value or threw an error.\r\n */\r\n s: 1\r\n /**\r\n * Value, either the cached result or an error, depending on status.\r\n */\r\n v: T\r\n /**\r\n * Object cache, a `WeakMap` where non-primitive arguments are stored.\r\n */\r\n o: null | WeakMap<Function | Object, CacheNode<T>>\r\n /**\r\n * Primitive cache, a regular `Map` where primitive arguments are stored.\r\n */\r\n p: null | Map<string | number | null | void | symbol | boolean, CacheNode<T>>\r\n}\r\n\r\ntype CacheNode<T> = TerminatedCacheNode<T> | UnterminatedCacheNode<T>\r\n\r\nfunction createCacheNode<T>(): CacheNode<T> {\r\n return {\r\n s: UNTERMINATED,\r\n v: undefined,\r\n o: null,\r\n p: null\r\n }\r\n}\r\n\r\n/**\r\n * Configuration options for a memoization function utilizing `WeakMap` for\r\n * its caching mechanism.\r\n *\r\n * @template Result - The type of the return value of the memoized function.\r\n *\r\n * @since 5.0.0\r\n * @public\r\n */\r\nexport interface WeakMapMemoizeOptions<Result = any> {\r\n /**\r\n * If provided, used to compare a newly generated output value against previous values in the cache.\r\n * If a match is found, the old value is returned. This addresses the common\r\n * ```ts\r\n * todos.map(todo => todo.id)\r\n * ```\r\n * use case, where an update to another field in the original data causes a recalculation\r\n * due to changed references, but the output is still effectively the same.\r\n *\r\n * @since 5.0.0\r\n */\r\n resultEqualityCheck?: EqualityFn<Result>\r\n}\r\n\r\n/**\r\n * Creates a tree of `WeakMap`-based cache nodes based on the identity of the\r\n * arguments it's been called with (in this case, the extracted values from your input selectors).\r\n * This allows `weakMapMemoize` to have an effectively infinite cache size.\r\n * Cache results will be kept in memory as long as references to the arguments still exist,\r\n * and then cleared out as the arguments are garbage-collected.\r\n *\r\n * __Design Tradeoffs for `weakMapMemoize`:__\r\n * - Pros:\r\n * - It has an effectively infinite cache size, but you have no control over\r\n * how long values are kept in cache as it's based on garbage collection and `WeakMap`s.\r\n * - Cons:\r\n * - There's currently no way to alter the argument comparisons.\r\n * They're based on strict reference equality.\r\n * - It's roughly the same speed as `lruMemoize`, although likely a fraction slower.\r\n *\r\n * __Use Cases for `weakMapMemoize`:__\r\n * - This memoizer is likely best used for cases where you need to call the\r\n * same selector instance with many different arguments, such as a single\r\n * selector instance that is used in a list item component and called with\r\n * item IDs like:\r\n * ```ts\r\n * useSelector(state => selectSomeData(state, props.category))\r\n * ```\r\n * @param func - The function to be memoized.\r\n * @returns A memoized function with a `.clearCache()` method attached.\r\n *\r\n * @example\r\n * <caption>Using `createSelector`</caption>\r\n * ```ts\r\n * import { createSelector, weakMapMemoize } from 'reselect'\r\n *\r\n * interface RootState {\r\n * items: { id: number; category: string; name: string }[]\r\n * }\r\n *\r\n * const selectItemsByCategory = createSelector(\r\n * [\r\n * (state: RootState) => state.items,\r\n * (state: RootState, category: string) => category\r\n * ],\r\n * (items, category) => items.filter(item => item.category === category),\r\n * {\r\n * memoize: weakMapMemoize,\r\n * argsMemoize: weakMapMemoize\r\n * }\r\n * )\r\n * ```\r\n *\r\n * @example\r\n * <caption>Using `createSelectorCreator`</caption>\r\n * ```ts\r\n * import { createSelectorCreator, weakMapMemoize } from 'reselect'\r\n *\r\n * const createSelectorWeakMap = createSelectorCreator({ memoize: weakMapMemoize, argsMemoize: weakMapMemoize })\r\n *\r\n * const selectItemsByCategory = createSelectorWeakMap(\r\n * [\r\n * (state: RootState) => state.items,\r\n * (state: RootState, category: string) => category\r\n * ],\r\n * (items, category) => items.filter(item => item.category === category)\r\n * )\r\n * ```\r\n *\r\n * @template Func - The type of the function that is memoized.\r\n *\r\n * @see {@link https://reselect.js.org/api/weakMapMemoize `weakMapMemoize`}\r\n *\r\n * @since 5.0.0\r\n * @public\r\n * @experimental\r\n */\r\nexport function weakMapMemoize<Func extends AnyFunction>(\r\n func: Func,\r\n options: WeakMapMemoizeOptions<ReturnType<Func>> = {}\r\n) {\r\n let fnNode = createCacheNode()\r\n const { resultEqualityCheck } = options\r\n\r\n let lastResult: WeakRef<object> | undefined\r\n\r\n let resultsCount = 0\r\n\r\n function memoized() {\r\n let cacheNode = fnNode\r\n const { length } = arguments\r\n for (let i = 0, l = length; i < l; i++) {\r\n const arg = arguments[i]\r\n if (\r\n typeof arg === 'function' ||\r\n (typeof arg === 'object' && arg !== null)\r\n ) {\r\n // Objects go into a WeakMap\r\n let objectCache = cacheNode.o\r\n if (objectCache === null) {\r\n cacheNode.o = objectCache = new WeakMap()\r\n }\r\n const objectNode = objectCache.get(arg)\r\n if (objectNode === undefined) {\r\n cacheNode = createCacheNode()\r\n objectCache.set(arg, cacheNode)\r\n } else {\r\n cacheNode = objectNode\r\n }\r\n } else {\r\n // Primitives go into a regular Map\r\n let primitiveCache = cacheNode.p\r\n if (primitiveCache === null) {\r\n cacheNode.p = primitiveCache = new Map()\r\n }\r\n const primitiveNode = primitiveCache.get(arg)\r\n if (primitiveNode === undefined) {\r\n cacheNode = createCacheNode()\r\n primitiveCache.set(arg, cacheNode)\r\n } else {\r\n cacheNode = primitiveNode\r\n }\r\n }\r\n }\r\n\r\n const terminatedNode = cacheNode as unknown as TerminatedCacheNode<any>\r\n\r\n let result\r\n\r\n if (cacheNode.s === TERMINATED) {\r\n result = cacheNode.v\r\n } else {\r\n // Allow errors to propagate\r\n result = func.apply(null, arguments as unknown as any[])\r\n resultsCount++\r\n\r\n if (resultEqualityCheck) {\r\n const lastResultValue = lastResult?.deref?.() ?? lastResult\r\n\r\n if (\r\n lastResultValue != null &&\r\n resultEqualityCheck(lastResultValue as ReturnType<Func>, result)\r\n ) {\r\n result = lastResultValue\r\n\r\n resultsCount !== 0 && resultsCount--\r\n }\r\n\r\n const needsWeakRef =\r\n (typeof result === 'object' && result !== null) ||\r\n typeof result === 'function'\r\n\r\n lastResult = needsWeakRef ? new Ref(result) : result\r\n }\r\n }\r\n\r\n terminatedNode.s = TERMINATED\r\n\r\n terminatedNode.v = result\r\n return result\r\n }\r\n\r\n memoized.clearCache = () => {\r\n fnNode = createCacheNode()\r\n memoized.resetResultsCount()\r\n }\r\n\r\n memoized.resultsCount = () => resultsCount\r\n\r\n memoized.resetResultsCount = () => {\r\n resultsCount = 0\r\n }\r\n\r\n return memoized as Func & Simplify<DefaultMemoizeFields>\r\n}\r\n","import { weakMapMemoize } from './weakMapMemoize'\r\n\r\nimport type {\r\n Combiner,\r\n CreateSelectorOptions,\r\n DropFirstParameter,\r\n ExtractMemoizerFields,\r\n GetParamsFromSelectors,\r\n GetStateFromSelectors,\r\n InterruptRecursion,\r\n OutputSelector,\r\n Selector,\r\n SelectorArray,\r\n SetRequired,\r\n Simplify,\r\n UnknownMemoizer\r\n} from './types'\r\n\r\nimport {\r\n assertIsFunction,\r\n collectInputSelectorResults,\r\n ensureIsArray,\r\n getDependencies,\r\n getDevModeChecksExecutionInfo\r\n} from './utils'\r\n\r\n/**\r\n * An instance of `createSelector`, customized with a given memoize implementation.\r\n *\r\n * @template MemoizeFunction - The type of the memoize function that is used to memoize the `resultFunc` inside `createSelector` (e.g., `lruMemoize` or `weakMapMemoize`).\r\n * @template ArgsMemoizeFunction - The type of the optional memoize function that is used to memoize the arguments passed into the output selector generated by `createSelector` (e.g., `lruMemoize` or `weakMapMemoize`). If none is explicitly provided, `weakMapMemoize` will be used.\r\n * @template StateType - The type of state that the selectors created with this selector creator will operate on.\r\n *\r\n * @public\r\n */\r\nexport interface CreateSelectorFunction<\r\n MemoizeFunction extends UnknownMemoizer = typeof weakMapMemoize,\r\n ArgsMemoizeFunction extends UnknownMemoizer = typeof weakMapMemoize,\r\n StateType = any\r\n> {\r\n /**\r\n * Creates a memoized selector function.\r\n *\r\n * @param createSelectorArgs - An arbitrary number of input selectors as separate inline arguments and a `combiner` function.\r\n * @returns A memoized output selector.\r\n *\r\n * @template InputSelectors - The type of the input selectors as an array.\r\n * @template Result - The return type of the `combiner` as well as the output selector.\r\n * @template OverrideMemoizeFunction - The type of the optional `memoize` function that could be passed into the options object to override the original `memoize` function that was initially passed into `createSelectorCreator`.\r\n * @template OverrideArgsMemoizeFunction - The type of the optional `argsMemoize` function that could be passed into the options object to override the original `argsMemoize` function that was initially passed into `createSelectorCreator`.\r\n *\r\n * @see {@link https://reselect.js.org/api/createselector `createSelector`}\r\n */\r\n <InputSelectors extends SelectorArray<StateType>, Result>(\r\n ...createSelectorArgs: [\r\n ...inputSelectors: InputSelectors,\r\n combiner: Combiner<InputSelectors, Result>\r\n ]\r\n ): OutputSelector<\r\n InputSelectors,\r\n Result,\r\n MemoizeFunction,\r\n ArgsMemoizeFunction\r\n > &\r\n InterruptRecursion\r\n\r\n /**\r\n * Creates a memoized selector function.\r\n *\r\n * @param createSelectorArgs - An arbitrary number of input selectors as separate inline arguments, a `combiner` function and an `options` object.\r\n * @returns A memoized output selector.\r\n *\r\n * @template InputSelectors - The type of the input selectors as an array.\r\n * @template Result - The return type of the `combiner` as well as the output selector.\r\n * @template OverrideMemoizeFunction - The type of the optional `memoize` function that could be passed into the options object to override the original `memoize` function that was initially passed into `createSelectorCreator`.\r\n * @template OverrideArgsMemoizeFunction - The type of the optional `argsMemoize` function that could be passed into the options object to override the original `argsMemoize` function that was initially passed into `createSelectorCreator`.\r\n *\r\n * @see {@link https://reselect.js.org/api/createselector `createSelector`}\r\n */\r\n <\r\n InputSelectors extends SelectorArray<StateType>,\r\n Result,\r\n OverrideMemoizeFunction extends UnknownMemoizer = MemoizeFunction,\r\n OverrideArgsMemoizeFunction extends UnknownMemoizer = ArgsMemoizeFunction\r\n >(\r\n ...createSelectorArgs: [\r\n ...inputSelectors: InputSelectors,\r\n combiner: Combiner<InputSelectors, Result>,\r\n createSelectorOptions: Simplify<\r\n CreateSelectorOptions<\r\n MemoizeFunction,\r\n ArgsMemoizeFunction,\r\n OverrideMemoizeFunction,\r\n OverrideArgsMemoizeFunction\r\n >\r\n >\r\n ]\r\n ): OutputSelector<\r\n InputSelectors,\r\n Result,\r\n OverrideMemoizeFunction,\r\n OverrideArgsMemoizeFunction\r\n > &\r\n InterruptRecursion\r\n\r\n /**\r\n * Creates a memoized selector function.\r\n *\r\n * @param inputSelectors - An array of input selectors.\r\n * @param combiner - A function that Combines the input selectors and returns an output selector. Otherwise known as the result function.\r\n * @param createSelectorOptions - An optional options object that allows for further customization per selector.\r\n * @returns A memoized output selector.\r\n *\r\n * @template InputSelectors - The type of the input selectors array.\r\n * @template Result - The return type of the `combiner` as well as the output selector.\r\n * @template OverrideMemoizeFunction - The type of the optional `memoize` function that could be passed into the options object to override the original `memoize` function that was initially passed into `createSelectorCreator`.\r\n * @template OverrideArgsMemoizeFunction - The type of the optional `argsMemoize` function that could be passed into the options object to override the original `argsMemoize` function that was initially passed into `createSelectorCreator`.\r\n *\r\n * @see {@link https://reselect.js.org/api/createselector `createSelector`}\r\n */\r\n <\r\n InputSelectors extends SelectorArray<StateType>,\r\n Result,\r\n OverrideMemoizeFunction extends UnknownMemoizer = MemoizeFunction,\r\n OverrideArgsMemoizeFunction extends UnknownMemoizer = ArgsMemoizeFunction\r\n >(\r\n inputSelectors: [...InputSelectors],\r\n combiner: Combiner<InputSelectors, Result>,\r\n createSelectorOptions?: Simplify<\r\n CreateSelectorOptions<\r\n MemoizeFunction,\r\n ArgsMemoizeFunction,\r\n OverrideMemoizeFunction,\r\n OverrideArgsMemoizeFunction\r\n >\r\n >\r\n ): OutputSelector<\r\n InputSelectors,\r\n Result,\r\n OverrideMemoizeFunction,\r\n OverrideArgsMemoizeFunction\r\n > &\r\n InterruptRecursion\r\n\r\n /**\r\n * Creates a \"pre-typed\" version of {@linkcode createSelector createSelector}\r\n * where the `state` type is predefined.\r\n *\r\n * This allows you to set the `state` type once, eliminating the need to\r\n * specify it with every {@linkcode createSelector createSelector} call.\r\n *\r\n * @returns A pre-typed `createSelector` with the state type already defined.\r\n *\r\n * @example\r\n * ```ts\r\n * import { createSelector } from 'reselect'\r\n *\r\n * export interface RootState {\r\n * todos: { id: number; completed: boolean }[]\r\n * alerts: { id: number; read: boolean }[]\r\n * }\r\n *\r\n * export const createAppSelector = createSelector.withTypes<RootState>()\r\n *\r\n * const selectTodoIds = createAppSelector(\r\n * [\r\n * // Type of `state` is set to `RootState`, no need to manually set the type\r\n * state => state.todos\r\n * ],\r\n * todos => todos.map(({ id }) => id)\r\n * )\r\n * ```\r\n * @template OverrideStateType - The specific type of state used by all selectors created with this selector creator.\r\n *\r\n * @see {@link https://reselect.js.org/api/createselector#defining-a-pre-typed-createselector `createSelector.withTypes`}\r\n *\r\n * @since 5.1.0\r\n */\r\n withTypes: <OverrideStateType extends StateType>() => CreateSelectorFunction<\r\n MemoizeFunction,\r\n ArgsMemoizeFunction,\r\n OverrideStateType\r\n >\r\n}\r\n\r\n/**\r\n * Creates a selector creator function with the specified memoization function\r\n * and options for customizing memoization behavior.\r\n *\r\n * @param options - An options object containing the `memoize` function responsible for memoizing the `resultFunc` inside `createSelector` (e.g., `lruMemoize` or `weakMapMemoize`). It also provides additional options for customizing memoization. While the `memoize` property is mandatory, the rest are optional.\r\n * @returns A customized `createSelector` function.\r\n *\r\n * @example\r\n * ```ts\r\n * const customCreateSelector = createSelectorCreator({\r\n * memoize: customMemoize, // Function to be used to memoize `resultFunc`\r\n * memoizeOptions: [memoizeOption1, memoizeOption2], // Options passed to `customMemoize` as the second argument onwards\r\n * argsMemoize: customArgsMemoize, // Function to be used to memoize the selector's arguments\r\n * argsMemoizeOptions: [argsMemoizeOption1, argsMemoizeOption2] // Options passed to `customArgsMemoize` as the second argument onwards\r\n * })\r\n *\r\n * const customSelector = customCreateSelector(\r\n * [inputSelector1, inputSelector2],\r\n * resultFunc // `resultFunc` will be passed as the first argument to `customMemoize`\r\n * )\r\n *\r\n * customSelector(\r\n * ...selectorArgs // Will be memoized by `customArgsMemoize`\r\n * )\r\n * ```\r\n *\r\n * @template MemoizeFunction - The type of the memoize function that is used to memoize the `resultFunc` inside `createSelector` (e.g., `lruMemoize` or `weakMapMemoize`).\r\n * @template ArgsMemoizeFunction - The type of the optional memoize function that is used to memoize the arguments passed into the output selector generated by `createSelector` (e.g., `lruMemoize` or `weakMapMemoize`). If none is explicitly provided, `weakMapMemoize` will be used.\r\n *\r\n * @see {@link https://reselect.js.org/api/createSelectorCreator#using-options-since-500 `createSelectorCreator`}\r\n *\r\n * @since 5.0.0\r\n * @public\r\n */\r\nexport function createSelectorCreator<\r\n MemoizeFunction extends UnknownMemoizer,\r\n ArgsMemoizeFunction extends UnknownMemoizer = typeof weakMapMemoize\r\n>(\r\n options: Simplify<\r\n SetRequired<\r\n CreateSelectorOptions<\r\n typeof weakMapMemoize,\r\n typeof weakMapMemoize,\r\n MemoizeFunction,\r\n ArgsMemoizeFunction\r\n >,\r\n 'memoize'\r\n >\r\n >\r\n): CreateSelectorFunction<MemoizeFunction, ArgsMemoizeFunction>\r\n\r\n/**\r\n * Creates a selector creator function with the specified memoization function\r\n * and options for customizing memoization behavior.\r\n *\r\n * @param memoize - The `memoize` function responsible for memoizing the `resultFunc` inside `createSelector` (e.g., `lruMemoize` or `weakMapMemoize`).\r\n * @param memoizeOptionsFromArgs - Optional configuration options for the memoization function. These options are then passed to the memoize function as the second argument onwards.\r\n * @returns A customized `createSelector` function.\r\n *\r\n * @example\r\n * ```ts\r\n * const customCreateSelector = createSelectorCreator(customMemoize, // Function to be used to memoize `resultFunc`\r\n * option1, // Will be passed as second argument to `customMemoize`\r\n * option2, // Will be passed as third argument to `customMemoize`\r\n * option3 // Will be passed as fourth argument to `customMemoize`\r\n * )\r\n *\r\n * const customSelector = customCreateSelector(\r\n * [inputSelector1, inputSelector2],\r\n * resultFunc // `resultFunc` will be passed as the first argument to `customMemoize`\r\n * )\r\n * ```\r\n *\r\n * @template MemoizeFunction - The type of the memoize function that is used to memoize the `resultFunc` inside `createSelector` (e.g., `lruMemoize` or `weakMapMemoize`).\r\n *\r\n * @see {@link https://reselect.js.org/api/createSelectorCreator#using-memoize-and-memoizeoptions `createSelectorCreator`}\r\n *\r\n * @public\r\n */\r\nexport function createSelectorCreator<MemoizeFunction extends UnknownMemoizer>(\r\n memoize: MemoizeFunction,\r\n ...memoizeOptionsFromArgs: DropFirstParameter<MemoizeFunction>\r\n): CreateSelectorFunction<MemoizeFunction>\r\n\r\n/**\r\n * Creates a selector creator function with the specified memoization\r\n * function and options for customizing memoization behavior.\r\n *\r\n * @param memoizeOrOptions - Either A `memoize` function or an `options` object containing the `memoize` function.\r\n * @param memoizeOptionsFromArgs - Optional configuration options for the memoization function. These options are then passed to the memoize function as the second argument onwards.\r\n * @returns A customized `createSelector` function.\r\n *\r\n * @template MemoizeFunction - The type of the memoize function that is used to memoize the `resultFunc` inside `createSelector` (e.g., `lruMemoize` or `weakMapMemoize`).\r\n * @template ArgsMemoizeFunction - The type of the optional memoize function that is used to memoize the arguments passed into the output selector generated by `createSelector` (e.g., `lruMemoize` or `weakMapMemoize`). If none is explicitly provided, `weakMapMemoize` will be used.\r\n * @template MemoizeOrOptions - The type of the first argument. It can either be a `memoize` function or an `options` object containing the `memoize` function.\r\n */\r\nexport function createSelectorCreator<\r\n MemoizeFunction extends UnknownMemoizer,\r\n ArgsMemoizeFunction extends UnknownMemoizer,\r\n MemoizeOrOptions extends\r\n | MemoizeFunction\r\n | SetRequired<\r\n CreateSelectorOptions<MemoizeFunction, ArgsMemoizeFunction>,\r\n 'memoize'\r\n >\r\n>(\r\n memoizeOrOptions: MemoizeOrOptions,\r\n ...memoizeOptionsFromArgs: MemoizeOrOptions extends SetRequired<\r\n CreateSelectorOptions<MemoizeFunction, ArgsMemoizeFunction>,\r\n 'memoize'\r\n >\r\n ? never\r\n : DropFirstParameter<MemoizeFunction>\r\n) {\r\n /** options initially passed into `createSelectorCreator`. */\r\n const createSelectorCreatorOptions: SetRequired<\r\n CreateSelectorOptions<MemoizeFunction, ArgsMemoizeFunction>,\r\n 'memoize'\r\n > = typeof memoizeOrOptions === 'function'\r\n ? {\r\n memoize: memoizeOrOptions as MemoizeFunction,\r\n memoizeOptions: memoizeOptionsFromArgs\r\n }\r\n : memoizeOrOptions\r\n\r\n const createSelector = <\r\n InputSelectors extends SelectorArray,\r\n Result,\r\n OverrideMemoizeFunction extends UnknownMemoizer = MemoizeFunction,\r\n OverrideArgsMemoizeFunction extends UnknownMemoizer = ArgsMemoizeFunction\r\n >(\r\n ...createSelectorArgs: [\r\n ...inputSelectors: [...InputSelectors],\r\n combiner: Combiner<InputSelectors, Result>,\r\n createSelectorOptions?: CreateSelectorOptions<\r\n MemoizeFunction,\r\n ArgsMemoizeFunction,\r\n OverrideMemoizeFunction,\r\n OverrideArgsMemoizeFunction\r\n >\r\n ]\r\n ) => {\r\n let recomputations = 0\r\n let dependencyRecomputations = 0\r\n let lastResult: Result\r\n\r\n // Due to the intricacies of rest params, we can't do an optional arg after `...createSelectorArgs`.\r\n // So, start by declaring the default value here.\r\n // (And yes, the words 'memoize' and 'options' appear too many times in this next sequence.)\r\n let directlyPassedOptions: CreateSelectorOptions<\r\n MemoizeFunction,\r\n ArgsMemoizeFunction,\r\n OverrideMemoizeFunction,\r\n OverrideArgsMemoizeFunction\r\n > = {}\r\n\r\n // Normally, the result func or \"combiner\" is the last arg\r\n let resultFunc = createSelectorArgs.pop() as\r\n | Combiner<InputSelectors, Result>\r\n | CreateSelectorOptions<\r\n MemoizeFunction,\r\n ArgsMemoizeFunction,\r\n OverrideMemoizeFunction,\r\n OverrideArgsMemoizeFunction\r\n >\r\n\r\n // If the result func is actually an _object_, assume it's our options object\r\n if (typeof resultFunc === 'object') {\r\n directlyPassedOptions = resultFunc\r\n // and pop the real result func off\r\n resultFunc = createSelectorArgs.pop() as Combiner<InputSelectors, Result>\r\n }\r\n\r\n assertIsFunction(\r\n resultFunc,\r\n `createSelector expects an output function after the inputs, but received: [${typeof resultFunc}]`\r\n )\r\n\r\n // Determine which set of options we're using. Prefer options passed directly,\r\n // but fall back to options given to `createSelectorCreator`.\r\n const combinedOptions = {\r\n ...createSelectorCreatorOptions,\r\n ...directlyPassedOptions\r\n }\r\n\r\n const {\r\n memoize,\r\n memoizeOptions = [],\r\n argsMemoize = weakMapMemoize,\r\n argsMemoizeOptions = [],\r\n devModeChecks = {}\r\n } = combinedOptions\r\n\r\n // Simplifying assumption: it's unlikely that the first options arg of the provided memoizer\r\n // is an array. In most libs I've looked at, it's an equality function or options object.\r\n // Based on that, if `memoizeOptions` _is_ an array, we assume it's a full\r\n // user-provided array of options. Otherwise, it must be just the _first_ arg, and so\r\n // we wrap it in an array so we can apply it.\r\n const finalMemoizeOptions = ensureIsArray(memoizeOptions)\r\n const finalArgsMemoizeOptions = ensureIsArray(argsMemoizeOptions)\r\n const dependencies = getDependencies(createSelectorArgs) as InputSelectors\r\n\r\n const memoizedResultFunc = memoize(function recomputationWrapper() {\r\n recomputations++\r\n // apply arguments instead of spreading for performance.\r\n // @ts-ignore\r\n return (resultFunc as Combiner<InputSelectors, Result>).apply(\r\n null,\r\n arguments as unknown as Parameters<Combiner<InputSelectors, Result>>\r\n )\r\n }, ...finalMemoizeOptions) as Combiner<InputSelectors, Result> &\r\n ExtractMemoizerFields<OverrideMemoizeFunction>\r\n\r\n let firstRun = true\r\n\r\n // If a selector is called with the exact same arguments we don't need to traverse our dependencies again.\r\n const selector = argsMemoize(function dependenciesChecker() {\r\n dependencyRecomputations++\r\n /** Return values of input selectors which the `resultFunc` takes as arguments. */\r\n const inputSelectorResults = collectInputSelectorResults(\r\n dependencies,\r\n arguments\r\n )\r\n\r\n // apply arguments instead of spreading for performance.\r\n // @ts-ignore\r\n lastResult = memoizedResultFunc.apply(null, inputSelectorResults)\r\n\r\n if (process.env.NODE_ENV !== 'production') {\r\n const { identityFunctionCheck, inputStabilityCheck } =\r\n getDevModeChecksExecutionInfo(firstRun, devModeChecks)\r\n if (identityFunctionCheck.shouldRun) {\r\n identityFunctionCheck.run(\r\n resultFunc as Combiner<InputSelectors, Result>,\r\n inputSelectorResults,\r\n lastResult\r\n )\r\n }\r\n\r\n if (inputStabilityCheck.shouldRun) {\r\n // make a second copy of the params, to check if we got the same results\r\n const inputSelectorResultsCopy = collectInputSelectorResults(\r\n dependencies,\r\n arguments\r\n )\r\n\r\n inputStabilityCheck.run(\r\n { inputSelectorResults, inputSelectorResultsCopy },\r\n { memoize, memoizeOptions: finalMemoizeOptions },\r\n arguments\r\n )\r\n }\r\n\r\n if (firstRun) firstRun = false\r\n }\r\n\r\n return lastResult\r\n }, ...finalArgsMemoizeOptions) as unknown as Selector<\r\n GetStateFromSelectors<InputSelectors>,\r\n Result,\r\n GetParamsFromSelectors<InputSelectors>\r\n > &\r\n ExtractMemoizerFields<OverrideArgsMemoizeFunction>\r\n\r\n return Object.assign(selector, {\r\n resultFunc,\r\n memoizedResultFunc,\r\n dependencies,\r\n dependencyRecomputations: () => dependencyRecomputations,\r\n resetDependencyRecomputations: () => {\r\n dependencyRecomputations = 0\r\n },\r\n lastResult: () => lastResult,\r\n recomputations: () => recomputations,\r\n resetRecomputations: () => {\r\n recomputations = 0\r\n },\r\n memoize,\r\n argsMemoize\r\n }) as OutputSelector<\r\n InputSelectors,\r\n Result,\r\n OverrideMemoizeFunction,\r\n OverrideArgsMemoizeFunction\r\n >\r\n }\r\n\r\n Object.assign(createSelector, {\r\n withTypes: () => createSelector\r\n })\r\n\r\n return createSelector as CreateSelectorFunction<\r\n MemoizeFunction,\r\n ArgsMemoizeFunction\r\n >\r\n}\r\n\r\n/**\r\n * Accepts one or more \"input selectors\" (either as separate arguments or a single array),\r\n * a single \"result function\" / \"combiner\", and an optional options object, and\r\n * generates a memoized selector function.\r\n *\r\n * @see {@link https://reselect.js.org/api/createSelector `createSelector`}\r\n *\r\n * @public\r\n */\r\nexport const createSelector =\r\n /* #__PURE__ */ createSelectorCreator(weakMapMemoize)\r\n","import { createSelector } from './createSelectorCreator'\r\n\r\nimport type { CreateSelectorFunction } from './createSelectorCreator'\r\nimport type {\r\n InterruptRecursion,\r\n ObjectValuesToTuple,\r\n OutputSelector,\r\n Selector,\r\n Simplify,\r\n UnknownMemoizer\r\n} from './types'\r\nimport { assertIsObject } from './utils'\r\nimport type { weakMapMemoize } from './weakMapMemoize'\r\n\r\n/**\r\n * Represents a mapping of selectors to their return types.\r\n *\r\n * @template TObject - An object type where each property is a selector function.\r\n *\r\n * @public\r\n */\r\nexport type SelectorResultsMap<TObject extends SelectorsObject> = {\r\n [Key in keyof TObject]: ReturnType<TObject[Key]>\r\n}\r\n\r\n/**\r\n * Represents a mapping of selectors for each key in a given root state.\r\n *\r\n * This type is a utility that takes a root state object type and\r\n * generates a corresponding set of selectors. Each selector is associated\r\n * with a key in the root state, allowing for the selection\r\n * of specific parts of the state.\r\n *\r\n * @template RootState - The type of the root state object.\r\n *\r\n * @since 5.0.0\r\n * @public\r\n */\r\nexport type RootStateSelectors<RootState = any> = {\r\n [Key in keyof RootState]: Selector<RootState, RootState[Key], []>\r\n}\r\n\r\n/**\r\n * @deprecated Please use {@linkcode StructuredSelectorCreator.withTypes createStructuredSelector.withTypes<RootState>()} instead. This type will be removed in the future.\r\n * @template RootState - The type of the root state object.\r\n *\r\n * @since 5.0.0\r\n * @public\r\n */\r\nexport type TypedStructuredSelectorCreator<RootState = any> =\r\n /**\r\n * A convenience function that simplifies returning an object\r\n * made up of selector results.\r\n *\r\n * @param inputSelectorsObject - A key value pair consisting of input selectors.\r\n * @param selectorCreator - A custom selector creator function. It defaults to `createSelector`.\r\n * @returns A memoized structured selector.\r\n *\r\n * @example\r\n * <caption>Modern Use Case</caption>\r\n * ```ts\r\n * import { createSelector, createStructuredSelector } from 'reselect'\r\n *\r\n * interface RootState {\r\n * todos: {\r\n * id: number\r\n * completed: boolean\r\n * title: string\r\n * description: string\r\n * }[]\r\n * alerts: { id: number; read: boolean }[]\r\n * }\r\n *\r\n * // This:\r\n * const structuredSelector = createStructuredSelector(\r\n * {\r\n * todos: (state: RootState) => state.todos,\r\n * alerts: (state: RootState) => state.alerts,\r\n * todoById: (state: RootState, id: number) => state.todos[id]\r\n * },\r\n * createSelector\r\n * )\r\n *\r\n * // Is essentially the same as this:\r\n * const selector = createSelector(\r\n * [\r\n * (state: RootState) => state.todos,\r\n * (state: RootState) => state.alerts,\r\n * (state: RootState, id: number) => state.todos[id]\r\n * ],\r\n * (todos, alerts, todoById) => {\r\n * return {\r\n * todos,\r\n * alerts,\r\n * todoById\r\n * }\r\n * }\r\n * )\r\n * ```\r\n *\r\n * @example\r\n * <caption>In your component:</caption>\r\n * ```tsx\r\n * import type { RootState } from 'createStructuredSelector/modernUseCase'\r\n * import { structuredSelector } from 'createStructuredSelector/modernUseCase'\r\n * import type { FC } from 'react'\r\n * import { useSelector } from 'react-redux'\r\n *\r\n * interface Props {\r\n * id: number\r\n * }\r\n *\r\n * const MyComponent: FC<Props> = ({ id }) => {\r\n * const { todos, alerts, todoById } = useSelector((state: RootState) =>\r\n * structuredSelector(state, id)\r\n * )\r\n *\r\n * return (\r\n * <div>\r\n * Next to do is:\r\n * <h2>{todoById.title}</h2>\r\n * <p>Description: {todoById.description}</p>\r\n * <ul>\r\n * <h3>All other to dos:</h3>\r\n * {todos.map(todo => (\r\n * <li key={todo.id}>{todo.title}</li>\r\n * ))}\r\n * </ul>\r\n * </div>\r\n * )\r\n * }\r\n * ```\r\n *\r\n * @example\r\n * <caption>Simple Use Case</caption>\r\n * ```ts\r\n * const selectA = state => state.a\r\n * const selectB = state => state.b\r\n *\r\n * // The result function in the following selector\r\n * // is simply building an object from the input selectors\r\n * const structuredSelector = createSelector(selectA, selectB, (a, b) => ({\r\n * a,\r\n * b\r\n * }))\r\n *\r\n * const result = structuredSelector({ a: 1, b: 2 }) // will produce { x: 1, y: 2 }\r\n * ```\r\n *\r\n * @template InputSelectorsObject - The shape of the input selectors object.\r\n * @template MemoizeFunction - The type of the memoize function that is used to create the structured selector. It defaults to `weakMapMemoize`.\r\n * @template ArgsMemoizeFunction - The type of the of the memoize function that is used to memoize the arguments passed into the generated structured selector. It defaults to `weakMapMemoize`.\r\n *\r\n * @see {@link https://reselect.js.org/api/createStructuredSelector `createStructuredSelector`}\r\n */\r\n <\r\n InputSelectorsObject extends RootStateSelectors<RootState> = RootStateSelectors<RootState>,\r\n MemoizeFunction extends UnknownMemoizer = typeof weakMapMemoize,\r\n ArgsMemoizeFunction extends UnknownMemoizer = typeof weakMapMemoize\r\n >(\r\n inputSelectorsObject: InputSelectorsObject,\r\n selectorCreator?: CreateSelectorFunction<\r\n MemoizeFunction,\r\n ArgsMemoizeFunction\r\n >\r\n ) => OutputSelector<\r\n ObjectValuesToTuple<InputSelectorsObject>,\r\n Simplify<SelectorResultsMap<InputSelectorsObject>>,\r\n MemoizeFunction,\r\n ArgsMemoizeFunction\r\n > &\r\n InterruptRecursion\r\n\r\n/**\r\n * Represents an object where each property is a selector function.\r\n *\r\n * @template StateType - The type of state that all the selectors operate on.\r\n *\r\n * @public\r\n */\r\nexport type SelectorsObject<StateType = any> = Record<\r\n string,\r\n Selector<StateType>\r\n>\r\n\r\n/**\r\n * It provides a way to create structured selectors.\r\n * The structured selector can take multiple input selectors\r\n * and map their output to an object with specific keys.\r\n *\r\n * @template StateType - The type of state that the structured selectors created with this structured selector creator will operate on.\r\n *\r\n * @see {@link https://reselect.js.org/api/createStructuredSelector `createStructuredSelector`}\r\n *\r\n * @public\r\n */\r\nexport interface StructuredSelectorCreator<StateType = any> {\r\n /**\r\n * A convenience function that simplifies returning an object\r\n * made up of selector results.\r\n *\r\n * @param inputSelectorsObject - A key value pair consisting of input selectors.\r\n * @param selectorCreator - A custom selector creator function. It defaults to `createSelector`.\r\n * @returns A memoized structured selector.\r\n *\r\n * @example\r\n * <caption>Modern Use Case</caption>\r\n * ```ts\r\n * import { createSelector, createStructuredSelector } from 'reselect'\r\n *\r\n * interface RootState {\r\n * todos: {\r\n * id: number\r\n * completed: boolean\r\n * title: string\r\n * description: string\r\n * }[]\r\n * alerts: { id: number; read: boolean }[]\r\n * }\r\n *\r\n * // This:\r\n * const structuredSelector = createStructuredSelector(\r\n * {\r\n * todos: (state: RootState) => state.todos,\r\n * alerts: (state: RootState) => state.alerts,\r\n * todoById: (state: RootState, id: number) => state.todos[id]\r\n * },\r\n * createSelector\r\n * )\r\n *\r\n * // Is essentially the same as this:\r\n * const selector = createSelector(\r\n * [\r\n * (state: RootState) => state.todos,\r\n * (state: RootState) => state.alerts,\r\n * (state: RootState, id: number) => state.todos[id]\r\n * ],\r\n * (todos, alerts, todoById) => {\r\n * return {\r\n * todos,\r\n * alerts,\r\n * todoById\r\n * }\r\n * }\r\n * )\r\n * ```\r\n *\r\n * @example\r\n * <caption>In your component:</caption>\r\n * ```tsx\r\n * import type { RootState } from 'createStructuredSelector/modernUseCase'\r\n * import { structuredSelector } from 'createStructuredSelector/modernUseCase'\r\n * import type { FC } from 'react'\r\n * import { useSelector } from 'react-redux'\r\n *\r\n * interface Props {\r\n * id: number\r\n * }\r\n *\r\n * const MyComponent: FC<Props> = ({ id }) => {\r\n * const { todos, alerts, todoById } = useSelector((state: RootState) =>\r\n * structuredSelector(state, id)\r\n * )\r\n *\r\n * return (\r\n * <div>\r\n * Next to do is:\r\n * <h2>{todoById.title}</h2>\r\n * <p>Description: {todoById.description}</p>\r\n * <ul>\r\n * <h3>All other to dos:</h3>\r\n * {todos.map(todo => (\r\n * <li key={todo.id}>{todo.title}</li>\r\n * ))}\r\n * </ul>\r\n * </div>\r\n * )\r\n * }\r\n * ```\r\n *\r\n * @example\r\n * <caption>Simple Use Case</caption>\r\n * ```ts\r\n * const selectA = state => state.a\r\n * const selectB = state => state.b\r\n *\r\n * // The result function in the following selector\r\n * // is simply building an object from the input selectors\r\n * const structuredSelector = createSelector(selectA, selectB, (a, b) => ({\r\n * a,\r\n * b\r\n * }))\r\n *\r\n * const result = structuredSelector({ a: 1, b: 2 }) // will produce { x: 1, y: 2 }\r\n * ```\r\n *\r\n * @template InputSelectorsObject - The shape of the input selectors object.\r\n * @template MemoizeFunction - The type of the memoize function that is used to create the structured selector. It defaults to `weakMapMemoize`.\r\n * @template ArgsMemoizeFunction - The type of the of the memoize function that is used to memoize the arguments passed into the generated structured selector. It defaults to `weakMapMemoize`.\r\n *\r\n * @see {@link https://reselect.js.org/api/createStructuredSelector `createStructuredSelector`}\r\n */\r\n <\r\n InputSelectorsObject extends SelectorsObject<StateType>,\r\n MemoizeFunction extends UnknownMemoizer = typeof weakMapMemoize,\r\n ArgsMemoizeFunction extends UnknownMemoizer = typeof weakMapMemoize\r\n >(\r\n inputSelectorsObject: InputSelectorsObject,\r\n selectorCreator?: CreateSelectorFunction<\r\n MemoizeFunction,\r\n ArgsMemoizeFunction\r\n >\r\n ): OutputSelector<\r\n ObjectValuesToTuple<InputSelectorsObject>,\r\n Simplify<SelectorResultsMap<InputSelectorsObject>>,\r\n MemoizeFunction,\r\n ArgsMemoizeFunction\r\n > &\r\n InterruptRecursion\r\n\r\n /**\r\n * Creates a \"pre-typed\" version of\r\n * {@linkcode createStructuredSelector createStructuredSelector}\r\n * where the `state` type is predefined.\r\n *\r\n * This allows you to set the `state` type once, eliminating the need to\r\n * specify it with every\r\n * {@linkcode createStructuredSelector createStructuredSelector} call.\r\n *\r\n * @returns A pre-typed `createStructuredSelector` with the state type already defined.\r\n *\r\n * @example\r\n * ```ts\r\n * import { createStructuredSelector } from 'reselect'\r\n *\r\n * export interface RootState {\r\n * todos: { id: number; completed: boolean }[]\r\n * alerts: { id: number; read: boolean }[]\r\n * }\r\n *\r\n * export const createStructuredAppSelector =\r\n * createStructuredSelector.withTypes<RootState>()\r\n *\r\n * const structuredAppSelector = createStructuredAppSelector({\r\n * // Type of `state` is set to `RootState`, no need to manually set the type\r\n * todos: state => state.todos,\r\n * alerts: state => state.alerts,\r\n * todoById: (state, id: number) => state.todos[id]\r\n * })\r\n *\r\n * ```\r\n * @template OverrideStateType - The specific type of state used by all structured selectors created with this structured selector creator.\r\n *\r\n * @see {@link https://reselect.js.org/api/createstructuredselector#defining-a-pre-typed-createstructuredselector `createSelector.withTypes`}\r\n *\r\n * @since 5.1.0\r\n */\r\n withTypes: <\r\n OverrideStateType extends StateType\r\n >() => StructuredSelectorCreator<OverrideStateType>\r\n}\r\n\r\n/**\r\n * A convenience function that simplifies returning an object\r\n * made up of selector results.\r\n *\r\n * @param inputSelectorsObject - A key value pair consisting of input selectors.\r\n * @param selectorCreator - A custom selector creator function. It defaults to `createSelector`.\r\n * @returns A memoized structured selector.\r\n *\r\n * @example\r\n * <caption>Modern Use Case</caption>\r\n * ```ts\r\n * import { createSelector, createStructuredSelector } from 'reselect'\r\n *\r\n * interface RootState {\r\n * todos: {\r\n * id: number\r\n * completed: boolean\r\n * title: string\r\n * description: string\r\n * }[]\r\n * alerts: { id: number; read: boolean }[]\r\n * }\r\n *\r\n * // This:\r\n * const structuredSelector = createStructuredSelector(\r\n * {\r\n * todos: (state: RootState) => state.todos,\r\n * alerts: (state: RootState) => state.alerts,\r\n * todoById: (state: RootState, id: number) => state.todos[id]\r\n * },\r\n * createSelector\r\n * )\r\n *\r\n * // Is essentially the same as this:\r\n * const selector = createSelector(\r\n * [\r\n * (state: RootState) => state.todos,\r\n * (state: RootState) => state.alerts,\r\n * (state: RootState, id: number) => state.todos[id]\r\n * ],\r\n * (todos, alerts, todoById) => {\r\n * return {\r\n * todos,\r\n * alerts,\r\n * todoById\r\n * }\r\n * }\r\n * )\r\n * ```\r\n *\r\n * @see {@link https://reselect.js.org/api/createStructuredSelector `createStructuredSelector`}\r\n *\r\n * @public\r\n */\r\nexport const createStructuredSelector: StructuredSelectorCreator =\r\n Object.assign(\r\n <\r\n InputSelectorsObject extends SelectorsObject,\r\n MemoizeFunction extends UnknownMemoizer = typeof weakMapMemoize,\r\n ArgsMemoizeFunction extends UnknownMemoizer = typeof weakMapMemoize\r\n >(\r\n inputSelectorsObject: InputSelectorsObject,\r\n selectorCreator: CreateSelectorFunction<\r\n MemoizeFunction,\r\n ArgsMemoizeFunction\r\n > = createSelector as CreateSelectorFunction<\r\n MemoizeFunction,\r\n ArgsMemoizeFunction\r\n >\r\n ) => {\r\n assertIsObject(\r\n inputSelectorsObject,\r\n 'createStructuredSelector expects first argument to be an object ' +\r\n `where each property is a selector, instead received a ${typeof inputSelectorsObject}`\r\n )\r\n const inputSelectorKeys = Object.keys(inputSelectorsObject)\r\n const dependencies = inputSelectorKeys.map(\r\n key => inputSelectorsObject[key]\r\n )\r\n const structuredSelector = selectorCreator(\r\n dependencies,\r\n (...inputSelectorResults: any[]) => {\r\n return inputSelectorResults.reduce((composition, value, index) => {\r\n composition[inputSelectorKeys[index]] = value\r\n return composition\r\n }, {})\r\n }\r\n )\r\n return structuredSelector\r\n },\r\n { withTypes: () => createStructuredSelector }\r\n ) as StructuredSelectorCreator\r\n"],"names":["indeterminate1Keyframe","indeterminate1Animation","indeterminate2Keyframe","indeterminate2Animation","bufferKeyframe","bufferAnimation","getColorShade","theme","color","vars","palette","LinearProgress","mode","main","LinearProgressRoot","name","slot","overridesResolver","props","styles","ownerState","root","variant","position","overflow","display","height","zIndex","colorAdjust","variants","Object","entries","filter","map","style","backgroundColor","content","left","top","right","bottom","opacity","transform","LinearProgressDashed","dashed","marginTop","width","backgroundSize","backgroundPosition","backgroundImage","animation","LinearProgressBar1","bar","bar1Indeterminate","bar1Determinate","bar1Buffer","transition","transformOrigin","LinearProgressBar2","bar2Indeterminate","bar2Buffer","inProps","ref","className","value","valueBuffer","other","classes","slots","bar1","bar2","useUtilityClasses","isRtl","rootProps","inlineStyles","undefined","Math","round","role","children","getLinearProgressUtilityClass","pulseKeyframe","waveKeyframe","pulseAnimation","waveAnimation","SkeletonRoot","hasChildren","withChildren","fitContent","heightAuto","radiusUnit","shape","borderRadius","radiusValue","Skeleton","bg","text","primary","marginBottom","visibility","maxWidth","WebkitMaskImage","background","action","hover","component","Boolean","as","getSkeletonUtilityClass","forceDebug","window","localStorage","getItem","noop","noopLogger","debug","info","warn","error","LOG_LEVELS","getAppender","logLevel","appender","console","minLogLevelIdx","indexOf","Error","reduce","loggerObj","method","idx","args","message","EventManager","constructor","this","maxListeners","warnOnce","events","on","eventName","listener","options","collection","highPriority","Map","regular","isFirst","set","removeListener","delete","removeAllListeners","emit","highPriorityListeners","Array","from","keys","regularListeners","i","length","has","apply","once","that","oneTimeListener","Store","create","_value","listeners","subscribe","fn","add","getSnapshot","update","forEach","l","Set","SYMBOL_API_PRIVATE","Symbol","globalId","_typeof","o","iterator","prototype","toPropertyKey","t","e","toPrimitive","call","r","TypeError","String","GRID_DEFAULT_STRATEGY","GRID_STRATEGIES_PROCESSORS","rowTreeCreation","filtering","sorting","visibleRowsLookupCreation","useGridInitialization","inputApiRef","privateApiRef","publicApiRef","current","existingPrivateApi","state","privateApi","store","instanceId","id","getPublicApi","register","methods","methodName","currentPrivateMethod","spying","target","publicApi","currentPublicMethod","caches","eventManager","createPrivateAPI","createPublicAPI","publishEvent","params","event","defaultMuiPrevented","isPropagationStopped","isSyntheticEvent","details","signature","DataGridPro","DataGridPremium","api","subscribeEvent","handler","useGridApiMethod","useGridApiInitialization","apiRef","rootElementRef","mainElementRef","virtualScrollerRef","columnHeadersContainerRef","useGridRefs","isFirstEffect","setState","useGridIsRtl","getLogger","logger","toString","useGridLoggerFactory","controlStateMapRef","rawForceUpdate","registerControlState","controlStateItem","stateId","reason","newState","ignoreSetState","updatedControlStateIds","controlState","oldSubState","stateSelector","newSubState","push","hasPropChanged","propModel","el","join","model","propOnChange","changeEvent","updateControlState","key","previousState","publicStateApi","forceUpdate","privateStateApi","useGridStateInitialization","cache","isRunning","runAppliers","groupCache","values","appliers","callback","preProcessingPrivateApi","registerPipeProcessor","group","processor","processors","processorsAsArray","get","registerPipeApplier","applier","_appliers","otherAppliers","requestPipeProcessorsApplication","preProcessingPublicApi","unstable_applyPipeProcessors","context","result","useGridPipeProcessing","availableStrategies","strategiesCache","strategyProcessingApi","registerStrategyProcessor","strategyName","processorName","cleanup","_ref","otherProcessors","groupPreProcessors","previousProcessor","getActiveStrategy","applyStrategyProcessor","activeStrategy","strategyGroup","availableStrategyEntry","find","strategy","isAvailable","setStrategyAvailability","useGridStrategyProcessing","getLocaleText","localeText","useGridLocaleText","useGridInitializeState","initializer","isInitialized","sanitizeCellValue","csvOptions","valueStr","shouldAppendQuotes","escapeFormulas","escapedValue","replace","includes","delimiter","some","serializeCellValue","cellParams","ignoreValueFormatter","columnType","colDef","type","toISOString","formattedValue","CSVRow","rowString","isEmpty","addValue","getRowString","writeToClipboardPolyfill","data","span","document","createElement","whiteSpace","userSelect","textContent","body","appendChild","range","createRange","selectNode","selection","getSelection","removeAllRanges","addRange","execCommand","removeChild","columnMenuStateInitializer","columnMenu","open","useGridRegisterPipeProcessor","random","registerPreProcessor","useFirstRender","isFirstRender","useGridRegisterPipeApplier","columnsStateInitializer","columnsState","columnsToUpsert","columns","initialState","columnVisibilityModel","keepOnlyColumnsToUpsert","pinnedColumns","mergeColumnsState","densityStateInitializer","density","getColumnsToExport","fields","currentColumns","field","column","col","allColumns","disableExport","defaultGetRowsToExport","filteredSortedRowIds","rowTree","selectedRows","getSelectedRows","bodyRows","pinnedRows","topPinnedRowsIds","row","bottomPinnedRowsIds","unshift","size","useGridCsvExport","useGridLogger","ignoreValueFormatterProp","ignoreValueFormatterDuringExport","csvExport","getDataAsCsv","rowIds","CSVBody","acc","getCellParams","serializeRow","trim","includeHeaders","filteredColumns","headerRows","includeColumnGroupsHeaders","columnGroupLookup","getAllGroupDetails","maxColumnGroupsDepth","columnGroupPathsLookup","columnGroupPath","getColumnGroupPath","max","headerGroupRow","columnGroupId","columnGroup","headerName","groupId","mainHeaderRow","buildCSV","getRowsToExport","exportDataAsCsv","csv","blob","extension","filename","title","fullName","HTMLAnchorElement","url","URL","createObjectURL","a","href","download","click","setTimeout","revokeObjectURL","exportAs","Blob","utf8WithBom","Uint8Array","fileName","csvExportApi","addExportMenuButtons","initialValue","disableToolbarButton","componentName","getDerivedPaginationModel","paginationState","paginationModelProp","paginationModel","rowCount","pageSize","page","pageCount","validPage","useGridRegisterStrategyProcessor","filterStateInitializer","filterModel","disableMultipleColumnsFiltering","filteredRowsLookup","filteredChildrenCountLookup","filteredDescendantCountLookup","visibleRowsLookup","getVisibleRowsLookup","getVisibleRowsLookupState","tree","rows","createMemoizedValues","focusStateInitializer","focus","cell","columnHeader","columnHeaderFilter","columnGroupHeader","tabIndex","getLeftColumnIndex","currentColIndex","firstColIndex","lastColIndex","getRightColumnIndex","paginationStateInitializer","autoPageSize","pagination","meta","paginationMeta","preferencePanelStateInitializer","preferencePanel","getDefaultCellValue","_excluded","_excluded2","editingStateInitializer","editRows","rowsStateInitializer","isDataSourceAvailable","unstable_dataSource","getRowId","loading","rowCountProp","loadingProp","previousTree","previousTreeDepths","flatRowTreeCreationMethod","updates","rowId","depth","parent","groupingKey","groupingName","treeDepths","dataRowIds","createFlatRowTree","actions","idsToRemoveFromRootGroup","remove","idToDelete","insert","idToInsert","rootGroup","rootGroupChildren","updateFlatRowTree","getSelectionModelPropValue","selectionModelProp","prevSelectionModel","isArray","rowSelectionStateInitializer","rowSelection","rowSelectionModel","sortingStateInitializer","sortModel","disableMultipleColumnsSorting","sortedRows","scrollIntoView","dimensions","clientHeight","scrollTop","offsetHeight","offsetTop","elementBottom","EMPTY_SIZE","EMPTY_DIMENSIONS","isReady","viewportOuterSize","viewportInnerSize","contentSize","minimumSize","hasScrollX","hasScrollY","scrollbarSize","headerHeight","groupHeaderHeight","headerFilterHeight","rowWidth","rowHeight","columnsTotalWidth","leftPinnedWidth","rightPinnedWidth","headersTotalHeight","topContainerHeight","bottomContainerHeight","dimensionsStateInitializer","areElementSizesEqual","b","rowsMetaStateInitializer","rowsMeta","currentPageTotalHeight","positions","getValidRowHeight","rowHeightProp","defaultRowHeight","warningMessage","calculateCellColSpan","lookup","columnIndex","minFirstColumnIndex","maxLastColumnIndex","columnsLength","getRow","getRowValue","colSpan","setCellColSpanInfo","spannedByColSpan","cellProps","computedWidth","j","nextColumnIndex","rightVisibleCellIndex","min","leftVisibleCellIndex","cellColSpanInfo","recurrentUnwrapGroupingColumnModel","columnGroupNode","parents","unwrappedGroupingModelToComplete","child","unwrapGroupingColumnModel","columnGroupingModel","unwrappedSubTree","getColumnGroupsHeaderStructure","orderedColumns","unwrappedGroupingModel","pinnedFields","getParents","groupingHeaderStructure","maxDepth","haveSameParents","field1","field2","slice","depthStructure","structure","newField","columnFields","lastGroup","prevField","createGroupLookup","groupLookup","node","groupParam","subTreeLookup","columnGroupsStateInitializer","visibleColumnFields","columnGroupsHeaderStructure","columnGrouping","headerStructure","trackFinger","currentTouchId","changedTouches","touch","identifier","x","clientX","y","clientY","computeNewWidth","initialOffsetToSeparator","clickX","columnBounds","resizeDirection","newWidth","preventClick","preventDefault","stopImmediatePropagation","columnResizeStateInitializer","columnResize","resizingColumnField","createResizeRefs","initialColWidth","initialTotalWidth","previousMouseClickEvent","columnHeaderElement","headerFilterElement","groupHeaderElements","cellElements","leftPinnedCellsAfter","rightPinnedCellsBefore","fillerLeft","fillerRight","leftPinnedHeadersAfter","rightPinnedHeadersBefore","useGridColumnResize","refs","useLazyRef","stopResizeEventTimeout","useTimeout","touchId","updateWidth","prevWidth","offsetWidth","widthDiff","columnWidthDiff","newTotalWidth","setProperty","flex","element","div","finalWidth","getAttribute","pinnedPosition","LEFT","updateProperty","header","RIGHT","finishResize","nativeEvent","stopListening","prevEvent","prevTimeStamp","timeStamp","prevClientX","prevClientY","setColumnWidth","start","storeReferences","separator","xStart","getRootDimensions","querySelector","gridClasses","headerFilterRow","side","classList","contains","flipResizeDirection","getResizeDirection","computeOffsetToSeparator","getBoundingClientRect","handleResizeMouseUp","useEventCallback","handleResizeMouseMove","buttons","minWidth","handleTouchEnd","handleTouchMove","finger","handleTouchStart","cellSeparator","getColumn","doc","ownerDocument","currentTarget","addEventListener","removeProperty","removeEventListener","pointerEvents","handleResizeStart","handleResizeStop","handleColumnResizeMouseDown","button","cursor","handleColumnSeparatorDoubleClick","disableAutosize","resizable","autosizeColumns","autosizeOptions","columnVirtualizationDisabled","promise","selector","useGridSelector","resolve","Promise","reject","_resolve","_reject","createControllablePromise","useColumnVirtualizationDisabled","isAutosizingRef","async","userOptions","orderedFields","c","unstable_setColumnVirtualization","widthByField","autosizing","widths","filteredWidths","includeOutliers","inputValues","factor","sort","q1","floor","q3","iqr","deviation","v","excludeOutliers","outliersFactor","columnHeaderTitle","columnHeaderTitleContainerContent","iconContainer","iconButtonContainer","menuContainer","menuIcon","getComputedStyle","paddingWidth","parseInt","paddingLeft","paddingRight","scrollWidth","clientWidth","hasColumnMin","hasColumnMax","Infinity","maxContent","extractColumnWidths","newColumns","expand","totalWidth","total","remainingWidth","widthPerColumn","updateColumns","newColumn","index","getColumnHeaderElement","useOnMount","autosizeOnMount","then","useGridNativeEventListener","passive","useGridApiEventHandler","onColumnResize","onColumnWidthChange","property","delta","isRowRangeUpdated","range1","range2","firstRowIndex","lastRowIndex","getCellValue","cellValue","valueGetter","rowSpanValueGetter","EMPTY_STATE","spannedCells","hiddenCells","hiddenCellOriginMap","EMPTY_RANGE","skippedFields","computeRowSpanningState","colDefs","visibleRows","rangeToProcess","resetState","processedRange","rowSpanning","spannedRowId","spannedRowIndex","rowSpan","backwardsHiddenCells","prevIndex","prevRowEntry","currentRow","hiddenCellIndex","relativeIndex","rowSpanningStateInitializer","unstable_rowSpanning","dataRowIdToModelLookup","columnsLookup","isFilteringPending","items","quickFilterValues","DEFAULT_ROWS_TO_PROCESS","useDataGridComponent","composeClasses","cellCheckbox","columnHeaderCheckbox","updateSelectionColumn","selectionColumn","cellClassName","headerClassName","shouldHaveSelectionColumn","checkboxSelection","haveSelectionColumn","useGridRowSelectionPreProcessors","useGridRowsPreProcessors","initialCurrentPageRows","useGridVisibleRows","currentPageRows","enrichPageRowsWithPinnedRows","headerFilteringEnabled","headerFilters","goToCell","colIndex","closestColumnToUse","rowSpanScanDirection","visibleSortedRows","nextCellColSpanInfo","unstable_getCellColSpanInfo","nonRowSpannedRowId","rowSpanHiddenCells","nextRowIndex","nextRowId","findNonRowSpannedCell","rowIndexRelativeToAllRows","findIndex","scrollToIndexes","rowIndex","setCellFocus","goToHeader","getVisibleColumns","setColumnHeaderFocus","goToHeaderFilter","setColumnHeaderFilterFocus","goToGroupHeader","setColumnGroupHeaderFocus","getRowIdFromIndex","handleColumnHeaderKeyDown","headerTitleNode","viewportPageSize","getViewportPageSize","colIndexBefore","getColumnIndex","firstRowIndexInPage","lastRowIndexInPage","columnGroupMaxDepth","shouldPreventDefault","rightColIndex","leftColIndex","ctrlKey","metaKey","toggleColumnMenu","handleHeaderFilterKeyDown","isEditing","isHeaderMenuOpen","handleColumnGroupHeaderKeyDown","focusedColumnGroup","currentField","currentDepth","remainingRightColumns","remainingLeftColumns","handleCellKeyDown","cellMode","Edit","rowIndexBefore","shiftKey","checkIfCanStartEditing","useGridKeyboardNavigation","runIfRowSelectionIsEnabled","propRowSelectionModel","lastRowToggled","onRowSelectionModelChange","disableRowSelectionOnClick","isRowSelectable","propIsRowSelectable","canHaveMultipleSelection","expandMouseRowRangeSelection","endId","startId","isSelected","isRowSelected","visibleRowIds","startIndex","endIndex","selectRowRange","setRowSelectionModel","DataGrid","getRowParams","rowNode","getRowNode","selectRow","resetSelection","newSelection","selectRows","ids","selectableIds","selectionLookup","allPagesRowIds","end","rowsBetweenStartAndEnd","selectionPublicApi","selectionPrivateApi","removeOutdatedSelection","keepNonExistentRowsSelected","currentSelection","rowsLookup","hasChanged","handleSingleRowSelection","hasCtrlKey","isMultipleSelectionDisabled","handleRowClick","closest","preventSelectionOnShift","handleRowSelectionCheckboxChange","handleHeaderSelectionCheckboxChange","rowsToBeSelected","checkboxSelectionVisibleOnly","paginationMode","getCellMode","focusCell","isNextRowSelected","newRowIndex","getRowIndexRelativeToVisibleRows","previousRowIndex","getAllRowIds","isStateControlled","useGridRowSelection","previousColumnsProp","onColumnVisibilityModelChange","setGridColumnsState","updateRenderContext","getAllColumns","useVisibleColumns","getColumnPosition","setColumnVisibilityModel","setColumnVisibility","isVisible","newModel","getColumnIndexRelativeToVisibleColumns","setColumnIndex","targetIndexPosition","oldIndexPosition","updatedColumns","fieldRemoved","splice","targetIndex","oldIndex","hasBeenResized","columnApi","columnReorderApi","stateExportPreProcessing","prevState","columnsStateToExport","columnVisibilityModelToExport","exportOnlyDirtyModels","colDefDimensions","propertyName","propertyValue","stateRestorePreProcessing","columnVisibilityModelToImport","stateToRestore","preferencePanelPreProcessing","ColumnsPanel","columnsPanel","slotProps","addColumnMenuItems","columnMenuItems","disableColumnSelector","prevInnerWidth","hydrateColumns","useGridColumns","currentPage","lastUpdateMs","Date","now","lastRowCount","timeout","getRowIdProp","throttledRowsChange","throttle","run","previousGroupsToFetch","clear","throttleRemainingTimeMs","throttleRowsMs","setRows","prevCache","rowsBeforePartialUpdates","updateRows","nonPinnedRowsUpdates","previousCache","updateServerRows","groupKeys","setLoading","loadingPropBeforePartialUpdates","getRowModels","dataRows","idRowsLookup","getRowsCount","setRowChildrenExpansion","isExpanded","currentNode","newNode","childrenExpanded","getRowGroupChildren","skipAutoGeneratedRows","applySorting","applyFiltering","groupNode","sortedRowIds","childId","setRowIndex","allRows","updatedRows","rowApi","unstable_replaceRows","firstRowToRender","newRows","dataRowIdToIdLookup","seenIds","rowModel","removedRowId","rowTreeNodeConfig","rowProApi","rowProPrivateApi","groupRows","handleStrategyProcessorChange","handleStrategyActivityChange","applyHydrateRowsProcessor","response","totalTopLevelRowCount","isRowCountPropUpdated","areNewRowsAlreadyInState","isNewLoadingAlreadyInState","isNewRowCountAlreadyInState","rowCountPropBeforePartialUpdates","totalRowCount","useGridRows","renderContext","lastRange","updateRowSpanningState","isRowContextInitialized","testRange","getUnprocessedRange","newProcessedRange","newSpannedCellsCount","newHiddenCellsCount","currentSpannedCellsCount","currentHiddenCellsCount","prevRenderContext","shouldResetState","firstRender","useGridRowSpanning","useGridParamsApi","resetColSpan","columnSpanningPublicApi","columnSpanningPrivateApi","calculateColSpan","minFirstColumn","maxLastColumn","useGridColumnSpanning","columnGroupingApi","handleColumnIndexChange","updateColumnGroupingState","getPinnedColumns","useGridColumnGrouping","cellModesModel","setCellModesModel","cellModesModelRef","prevCellModesModel","processRowUpdate","onProcessRowUpdateError","cellModesModelProp","onCellModesModelChange","runIfEditModeIsCell","editMode","Cell","throwIfNotEditable","isCellEditable","throwIfNotInMode","handleCellDoubleClick","isEditable","newParams","cellDoubleClick","handleCellFocusOut","View","cellFocusOut","which","escapeKeyDown","enterKeyDown","shiftTabKeyDown","tabKeyDown","printableKeyDown","pasteKeyDown","deleteKeyDown","handleCellEditStart","startCellEditModeParams","deleteValue","startCellEditMode","handleCellEditStop","cellToFocusAfter","runPendingEditCellValueMutation","ignoreModifications","stopCellEditMode","onCellEditStart","onCellEditStop","editRowsState","hasFieldErrors","editingState","updateCellModesModel","isNewModelDifferentFromProp","updateFieldInCellModesModel","newProps","_newModel$id","otherFields","updateOrDeleteFieldState","newEditingState","updateStateToStartCellEditMode","newValue","isProcessingProps","updateStateToStopCellEditMode","finishCellEditMode","moveFocusToRelativeCell","rowUpdate","getRowWithUpdatedValuesFromCellEditing","handleError","errorThrown","finalRowUpdate","catch","editingApi","editingPrivateApi","setCellEditingEditCellValue","debounceMs","unstable_skipValueParser","skipValueParser","parsedValue","valueParser","changeReason","preProcessEditCellProps","valueSetter","useEnhancedEffect","idToIdLookup","copyOfPrevCellModes","prevMode","originalId","useGridCellEditing","rowModesModel","setRowModesModel","rowModesModelRef","prevRowModesModel","focusTimeout","nextFocusedCell","rowModesModelProp","onRowModesModelChange","runIfEditModeIsRow","Row","getRowMode","hasFieldsWithErrors","fieldProps","rowParams","handleCellFocusIn","rowFocusOut","clearTimeout","nextFieldToFocus","handleRowEditStart","startRowEditModeParams","fieldToFocus","startRowEditMode","handleRowEditStop","stopRowEditMode","onRowEditStart","onRowEditStop","updateRowModesModel","updateRowInRowModesModel","updateOrDeleteRowState","updateStateToStartRowEditMode","updateStateToStopRowEditMode","focusedField","finishRowEditMode","getRowWithUpdatedValuesFromRowEditing","setRowEditingEditCellValue","promises","_editingState$id","otherFieldsProps","processedProps","thisField","fieldColumn","_editingState$id2","all","copyOfPrevRowModesModel","useGridRowEditing","debounceMap","isCellEditableProp","editable","renderEditCell","debounces","runCallback","debouncedField","editingSharedApi","setEditCellValue","maybeDebounce","setEditCellValueToCall","getRowWithUpdatedValues","unstable_getEditCellMeta","editingSharedPrivateApi","useGridEditing","lastClickedCell","hasRootReference","publishCellFocusOut","focusedCell","getColumnGroupHeaderFocus","direction","columnIndexToFocus","visibleColumns","concat","rowIndexToFocus","rowToFocus","colSpanInfo","columnToFocus","handleColumnHeaderFocus","handleColumnGroupHeaderFocus","handleBlur","_","relatedTarget","handleCellMouseDown","handleDocumentClick","cellElement","getCellElement","handleCellModeChange","handleRowSet","handlePaginationModelChange","currentFocusedCell","focusApi","focusPrivateApi","useGridFocus","hideTimeout","immediateTimeout","hidePreferences","preferencePanelState","openedPanelValue","doNotHidePanel","hidePreferencesDelayed","showPreferences","panelId","labelId","preferencePanelToExport","useGridPreferencesPanel","onFilterModelChange","updateFilteredRows","filterState","getFilterState","visibleRowsLookupState","addColumnMenuItem","filterable","disableColumnFilter","applyFilters","upsertFilterItem","item","itemIndex","filterItem","setFilterModel","upsertFilterItems","existingItems","deleteFilterItem","itemToDelete","showFilterPanel","targetColumnField","filterItemsWithValue","filterOperator","filterOperators","operator","requiresFilterValue","newFilterItems","filterItemOnTarget","targetColumn","filters","hideFilterPanel","setFilterLogicOperator","logicOperator","setQuickFilterValues","unstable_applyFilters","inputFilterModel","isRowMatchingFilters","filterMode","disableEval","filterResult","filterApi","ignoreDiacritics","filterModelToExport","callbacks","FilterPanel","filterPanel","getRowsRef","flatFilteringMethod","filterCache","passingFilterItems","passingQuickFilterValues","isRowPassing","footerId","handleColumnsChange","updateVisibleRowsLookupState","useGridFilter","onSortModelChange","upsertSortModel","sortItem","existingIdx","newSortModel","createSortItem","directionOverride","existing","nextSort","sortingOrder","sortable","disableColumnSorting","sortingMode","sortRowList","setSortModel","sortColumn","allowMultipleSorting","sortApi","getSortModel","getSortedRows","getSortedRowIds","getRowIdFromRowIndex","sortModelToExport","flatSortingMethod","rootGroupNode","sortedChildren","handleColumnHeaderClick","latestColumns","useGridSorting","onDensityChange","densityApi","setDensity","newDensity","exportedDensity","restoredDensity","useGridDensity","onPaginationMetaChange","paginationMetaApi","setPaginationMeta","newPaginationMeta","exportedPaginationMeta","restoredPaginationMeta","useGridPaginationMeta","densityFactor","onPaginationModelChange","paginationModelApi","setPage","currentModel","setPaginationModel","setPageSize","handleUpdateAutoPageSize","maximumPageSizeWithoutScrollBar","handleRowCountChange","newRowCount","useGridPaginationModel","visibleTopLevelRowCount","rowCountState","previousPageSize","onRowCountChange","paginationRowCountApi","setRowCount","exportedRowCount","restoredRowCount","isLastPage","hasNextPage","useGridRowCount","useGridPagination","getRowHeight","getRowHeightProp","getRowSpacing","getEstimatedRowHeight","rowsHeightLookup","lastMeasuredRowIndex","hasRowWithAutoHeight","gridPaginationSelector","validRowHeight","hydrateRowsMeta","calculateRowProcessedSizes","sizes","baseCenter","isResized","autoHeight","needsFirstMeasurement","baseRowHeight","existingBaseRowHeight","rowHeightFromUser","initialHeights","indexRelativeToCurrentPage","spacing","isFirstVisible","isLastVisible","spacingTop","spacingBottom","processedSizes","otherSizes","setRowHeight","debouncedHydrateRowsMeta","debounce","rowPositionsDebounceMs","storeMeasuredRowHeight","needsHydration","rowHasAutoHeight","getLastMeasuredRowIndex","setLastMeasuredRowIndex","resetRowHeights","rowsMetaApi","unstable_setLastMeasuredRowIndex","unstable_getRowHeight","unstable_getRowInternalSizes","unstable_setRowHeight","unstable_storeRowHeightMeasurement","rowsMetaPrivateApi","useGridRowsMeta","colRef","scrollCoordinates","columnPositions","cellWidth","abs","scrollLeft","gridRowsMetaSelector","elementIndex","targetOffsetHeight","scroll","scrollApi","getScrollPosition","useGridScroll","showColumnMenu","columnMenuState","hideColumnMenu","columnLookup","visibleOrderedFields","fieldIndex","columnMenuApi","useGridColumnMenu","previousGridState","previousColumnVisibility","previousRows","previousVirtualizationState","updateGridColumnsForPrint","includeCheckboxes","exportedColumnFields","newColumnVisibilityModel","updateGridRowsForPrint","handlePrintWindowLoad","printWindow","normalizeOptions","copyStyles","hideToolbar","hideFooter","printDoc","contentDocument","gridRootElement","gridClone","cloneNode","contain","gridToolbarElementHeight","toolbarContainer","gridFooterElementHeight","footerContainer","computedTotalHeight","boxSizing","gridFooterElement","container","innerHTML","defaultPageStyle","pageStyle","styleElement","createTextNode","head","bodyClassName","split","stylesheetLoadPromises","rootCandidate","getRootNode","headStyleElements","querySelectorAll","tagName","newHeadStyleElements","sheet","styleCSS","cssRules","cssText","attributes","attr","setAttribute","nodeName","nodeValue","contentWindow","print","handlePrintWindowAfterPrint","restoreState","virtualization","printExportApi","exportDataAsPrint","exportState","enabled","enabledForColumns","requestAnimationFrame","iframeEl","buildPrintWindow","onload","matchMedia","mql","matches","printOptions","useGridPrintExport","clipboardExport","clipboardCopyCellDelimiter","handleCopy","toLowerCase","altKey","selectionEnd","selectionStart","textToCopy","navigator","clipboard","writeText","onClipboardCopy","useGridClipboard","errorShown","rootDimensionsRef","dimensionsState","columnHeaderHeight","columnGroupHeaderHeight","w","savedSize","setSavedSize","debouncedSetSavedSize","func","wait","lastArgs","later","throttled","resizeThrottleMs","previousSize","setDimensions","resize","computedStyle","defaultView","newSize","parseFloat","updateDimensions","rootElement","pinnedRowsHeight","scrollDiv","measureScrollbarSize","hasScrollXIfNoYScrollBar","hasScrollYIfNoXScrollBar","newDimensions","prevDimensions","apiPublic","apiPrivate","k","Number","isFirstSizing","handleResize","isJSDOM","test","userAgent","onResize","useGridDimensions","onColumnHeaderClick","onColumnHeaderDoubleClick","onColumnHeaderOver","onColumnHeaderOut","onColumnHeaderEnter","onColumnHeaderLeave","onCellClick","onCellDoubleClick","onCellKeyDown","onPreferencePanelClose","onPreferencePanelOpen","onMenuOpen","onMenuClose","onRowDoubleClick","onRowClick","onStateChange","useGridEvents","statePersistenceApi","useGridStatePersistence","useGridVirtualization","configuration","hooks","useGridAriaAttributes","useGridPrivateApiContext","useGridRootProps","accessibleRowCount","headerGroupingMaxDepth","pinnedRowsCount","useGridRowAriaAttributes","selectedIdsLookup","ariaAttributes","ariaRowIndex","DataGridRaw","useDataGridProps","GridContextProvider","GridRoot","sx","forwardedProps","GridHeader","GridFooterPlaceholder","propTypes","isRequired","columnBufferPx","disableColumnMenu","disableColumnResize","disableDensitySelector","disableMultipleRowSelection","disableVirtualization","estimatedRowCount","experimentalFeatures","warnIfFocusStateIsNotSynced","filterDebounceMs","quickFilterExcludeHiddenColumns","quickFilterLogicOperator","getCellClassName","getDetailPanelContent","getRowClassName","hideFooterPagination","hideFooterSelectedRowCount","indeterminateCheckboxAction","nonce","onColumnOrderChange","pageSizeOptions","label","rowBufferPx","rowSpacingType","showCellVerticalBorder","showColumnVerticalBorder","GridNoResultsOverlay","noResultsOverlayLabel","useGridApiContext","GridOverlay","GridColumnUnsortedIcon","nextSortDirection","Icon","columnSortedAscendingIcon","columnSortedDescendingIcon","iconSlots","booleanCellTrueIcon","booleanCellFalseIcon","columnMenuIcon","openFilterButtonIcon","filterPanelDeleteIcon","columnFilteredIcon","columnSelectorIcon","columnUnsortedIcon","columnResizeIcon","densityCompactIcon","densityStandardIcon","densityComfortableIcon","exportIcon","moreActionsIcon","treeDataCollapseIcon","treeDataExpandIcon","groupingCriteriaCollapseIcon","groupingCriteriaExpandIcon","detailPanelExpandIcon","detailPanelCollapseIcon","rowReorderIcon","quickFilterIcon","quickFilterClearIcon","columnMenuHideIcon","columnMenuSortAscendingIcon","columnMenuSortDescendingIcon","columnMenuFilterIcon","columnMenuManageColumnsIcon","columnMenuClearIcon","loadIcon","filterPanelAddIcon","filterPanelRemoveAllIcon","columnReorderIcon","baseCheckbox","baseTextField","baseFormControl","baseSelect","baseButton","baseIconButton","baseInputAdornment","baseTooltip","basePopper","baseInputLabel","baseSelectOption","native","baseChip","DATA_GRID_DEFAULT_SLOTS_COMPONENTS","material","GridCell","skeletonCell","GridSkeletonCell","columnHeaderFilterIconButton","GridColumnHeaderFilterIconButton","columnHeaderSortIcon","GridColumnHeaderSortIcon","GridColumnMenu","columnHeaders","GridColumnHeaders","detailPanels","footer","GridFooter","footerRowCount","GridRowCount","toolbar","loadingOverlay","GridLoadingOverlay","noResultsOverlay","noRowsOverlay","GridNoRowsOverlay","GridPagination","GridFilterPanel","GridColumnsPanel","G","columnsManagement","GridColumnsManagement","panel","GridPanel","GridRow","DATA_GRID_FORCED_PROPS","hideFooterRowCount","disableColumnReorder","keepColumnPositionIfDraggedOutside","DATA_GRID_PROPS_DEFAULT_VALUES","defaultSlots","themedProps","allProps","useThemeProps","startsWith","groupForwardedProps","overrides","computeSlots","injectDefaultProps","GRID_ACTIONS_COLUMN_TYPE","GRID_ACTIONS_COL_DEF","aggregable","align","headerAlign","renderCell","getApplyQuickFilterFn","GRID_BOOLEAN_COL_DEF","sortComparator","valueFormatter","pastedValueParser","stringToBoolean","getGridBooleanOperators","getApplyFilterFn","valueAsBoolean","InputComponent","GRID_CHECKBOX_SELECTION_FIELD","GRID_CHECKBOX_SELECTION_COL_DEF","disableReorder","renderHeader","throwIfNotDateObject","gridDateFormatter","toLocaleDateString","gridDateTimeFormatter","toLocaleString","GRID_DATE_COL_DEF","GRID_DATETIME_COL_DEF","buildApplyFilterFn","compareFn","showTime","keepHours","date","setSeconds","setMinutes","getMinutes","getTimezoneOffset","setHours","time","getTime","dateCopy","getGridDateOperators","value1","value2","InputComponentProps","DEFAULT_GRID_COL_TYPE_KEY","getGridDefaultColumnTypes","string","number","dateTime","boolean","singleSelect","custom","GRID_NUMERIC_COL_DEF","parseNumericValue","getGridNumericQuickFilterFn","isNaN","columnValue","getGridNumericOperators","GRID_SINGLE_SELECT_COL_DEF","getOptionLabel","getOptionValue","valueOptions","valueOption","option","parseObjectValue","getGridSingleSelectOperators","filterItemValues","GRID_STRING_COL_DEF","hideable","groupable","pinnable","getGridStringQuickFilterFn","filterRegex","RegExp","getRowFormattedValue","createContainsFilterFn","disableTrim","negate","trimmedValue","createEqualityFilterFn","collator","Intl","Collator","sensitivity","usage","isEqual","compare","createEmptyFilterFn","getGridStringOperators","filterItemValue","val","filterValue","GridColumnGroupHeader","hasFocus","isLastColumn","indexInSection","sectionLength","gridHasFiller","headerCellRef","columnGroupsLookup","description","headerComponent","render","renderHeaderGroup","renderParams","showLeftBorder","showRightBorder","isDragging","useId","elementId","draggableContainer","titleContainer","titleContainerContent","elementToFocus","publish","mouseEventsHandlers","onKeyDown","onFocus","onBlur","GridGenericColumnHeaderItem","columnMenuOpen","isResizing","sortDirection","isDraggable","columnMenuIconButton","columnTitleIconButtons","GridColumnHeaderRow","styled","columnHeaderRow","GridColumnHeadersRoot","flexDirection","borderTopLeftRadius","borderTopRightRadius","GridBaseColumnHeaders","clsx","sortColumnLookup","filterColumnLookup","columnHeaderTabIndexState","columnGroupHeaderTabIndexState","columnHeaderFocus","columnGroupHeaderFocus","columnVisibility","hasOtherElementInTabSequence","getInnerProps","getColumnHeadersRow","getColumnGroupHeadersRows","dragCol","setDragCol","resizeCol","setResizeCol","hasVirtualization","columnGroupsModel","offsetLeft","handleColumnResizeStart","handleColumnResizeStop","handleColumnReorderStart","handleColumnReorderStop","leftRenderContext","firstColumnIndex","lastColumnIndex","rightRenderContext","getColumnsToRender","currentContext","firstColumnToRender","lastColumnToRender","renderedColumns","getFillers","leftOverflow","borderBottom","isPinnedRight","isNotPinned","hasScrollbarFiller","leftOffsetWidth","filler","pinnedRight","borderTop","getCellOffsetStyle","isLeftPinned","isRightPinned","pinnedOffset","getPinnedCellOffset","getColumnHeaders","isFirstColumn","siblingWithBorderingSeparator","isSiblingFocused","isLastUnpinned","GridColumnHeaderItem","filterItemsCounter","isLast","getColumnGroupHeaders","columnsToRender","rowStructure","firstColumnFieldToRender","firstGroupToRender","firstGroupIndex","lastColumnFieldToRender","lastGroupToRender","lastGroupIndex","visibleColumnGroupHeader","groupStructure","firstVisibleColumnIndex","headerInfo","separatorSide","GridColumnHeaderSeparator","Left","useGridColumnHeaders","MemoizedGridColumnHeaders","fastMemo","GridConfigurationContext","selectedRowCount","selectedRowCountElement","rowCountElement","visibleRowCount","paginationElement","GridPreferencesPanel","panelContent","SkeletonOverlay","skeletonLoadingOverlay","getColIndex","GridSkeletonLoadingOverlay","forwardedRef","handleRef","useForkRef","viewportHeight","skeletonRowsCount","ceil","inViewportCount","allVisibleColumns","getPinnedStyle","getPinnedPosition","array","rowCells","isPinnedLeft","sectionIndex","pinnedStyle","isFirstPinnedRight","hasFillerBefore","hasFillerAfter","expandedWidth","emptyCellWidth","emptyCell","empty","scrollbarWidth","GridScrollbarFillerCell","rowSkeleton","cells","resizedColIndex","currentWidth","getPropertyValue","pinnedCells","LOADING_VARIANTS","CircularProgress","skeleton","noRowsVariant","rowsCount","activeVariant","noRowsLabel","GridPaginationRoot","maxHeight","selectLabel","breakpoints","up","input","defaultLabelDisplayedRows","to","count","estimated","computedProps","backIconButtonProps","disabled","nextIconButtonProps","lastPage","computedPage","handlePageSizeChange","handlePageChange","isPageSizeIncludedInPageSizeOptions","locales","wrappedLabelDisplayedRows","labelDisplayedRows","rowsPerPageOptions","rowsPerPage","onPageChange","onRowsPerPageChange","EmptyCell","cellEmpty","refProp","selected","styleProp","focusedColumnIndex","isNotVisible","showBottomBorder","onClick","onDoubleClick","onMouseEnter","onMouseLeave","onMouseOut","onMouseOver","useGridConfiguration","treeDepth","editing","hasFocusCell","hasVirtualFocusCellLeft","hasVirtualFocusCellRight","composeGridClasses","getRowAriaAttributes","ResizeObserver","resizeObserver","entry","borderBoxSize","blockSize","contentRect","observe","disconnect","propHandler","publishClick","rowReordering","minHeight","numberOfBaseSizes","maximumSize","rowStyle","rowClassNames","getCell","indexRelativeToAllColumns","NONE","editCellState","isReorderCell","isEditingRows","canReorderColumn","canReorderRow","disableDragEvents","cellIsNotVisible","VIRTUAL","leftCells","rightCells","middleColumnsLength","eventHandlers","cellOffsetLeft","MemoizedGridRow","GridRowCountRoot","alignItems","margin","scrollbarFiller","GridSelectedRowCountRoot","GridSelectedRowCount","rowSelectedText","GridOverlayWrapperRoot","shouldForwardProp","prop","overlayWrapper","overlayType","loadingOverlayVariant","GridOverlayWrapperInner","overlayWrapperInner","inner","GridOverlayWrapper","GridOverlays","Overlay","overlayProps","hasActions","getActions","GridActionsCell","focusElementRef","focusedButtonIndex","setFocusedButtonIndex","setOpen","rootRef","buttonRef","ignoreCallToFocus","touchRippleRefs","menuId","buttonId","iconButtons","showInMenu","menuButtons","numberOfButtons","stop","preventScroll","focusableButtonIndex","hideMenu","handleTouchRippleRef","instance","handleButtonClick","actionsCell","getNewIndex","indexMod","newIndex","stopPropagation","touchRippleRef","fontSize","onClose","menuList","autoFocusItem","closeMenu","renderActionsCell","GridBooleanCellRaw","titleAccess","GridBooleanCell","renderBooleanCell","cachedSupportsPreventScroll","PinnedPosition","gridPinnedColumnPositionLookup","EMPTY_CELL_PARAMS","onMouseDown","onMouseUp","onKeyUp","onDragEnter","onDragOver","canManageOwnFocus","rootClasses","classNames","valueToRender","cellRef","isSelectionMode","cellSelection","capitalize","publishMouseUp","publishMouseDown","isCellRowSpanned","padding","border","cellStyle","activeElement","focusableElement","scrollPosition","handleFocus","updatedRow","editCellStateRest","valueString","draggableEventHandlers","MemoizedGridCell","GridEditBooleanCell","idProp","onValueChange","inputRef","valueState","setValueState","handleChange","checked","htmlFor","onChange","renderEditBooleanCell","StyledInputBase","GridEditDateCell","valueProp","inputProps","isDateTime","valueTransformed","parsedDate","formattedDate","substr","parsed","formatted","parseValueToDate","year","month","day","setFullYear","hours","minutes","newFormattedDate","newParsedDate","fullWidth","renderEditDateCell","GridEditInputCellRoot","editInputCell","typography","body2","GridEditInputCell","endAdornment","renderEditInputCell","GridEditSingleSelectCell","initialOpen","isSelectNative","MenuProps","otherBaseSelectProps","formattedTargetValue","onOpen","isKeyboardEvent","renderEditSingleSelectCell","CIRCULAR_CONTENT_SIZE","DEFAULT_CONTENT_WIDTH_RANGE","CONTENT_WIDTH_RANGE_BY_TYPE","randomNumberGenerator","Memoized","skeletonProps","icon","counter","toggleFilter","getColumnHeaderParams","iconButton","enterDelay","badgeContent","ColumnHeaderMenuIcon","columnMenuId","columnMenuButtonId","iconButtonRef","handleMenuIconClick","sortIndex","showColumnMenuIcon","setShowColumnMenuIcon","isColumnSorted","isColumnFiltered","isColumnNumeric","onDragStart","onDragEnd","columnHeaderSeparatorProps","handleExited","GridColumnHeaderMenu","ContentComponent","contentComponentProps","onExited","showSortIcon","hideSortIcons","draggableContainerProps","GridColumnHeaderSeparatorSides","GridColumnHeaderSeparatorRaw","Right","resizing","stopClick","GridColumnHeaderSortIconRaw","iconElement","icons","iconProps","getIcon","overlap","GridColumnHeaderTitleRoot","textOverflow","fontWeight","lineHeight","ColumnHeaderInnerTitle","GridColumnHeaderTitle","titleRef","tooltip","setTooltip","handleMouseOver","isOver","ariaSort","draggable","columnWidth","GridIconButtonContainerRoot","GridIconButtonContainer","GridCellCheckboxForwardRef","isChecked","checkboxElement","rippleRef","handleKeyDown","isSelectable","GridCellCheckboxRenderer","GridHeaderCheckbox","tabIndexState","paginatedVisibleRowIds","filteredSelection","selectionCandidates","currentSelectionSize","isIndeterminate","handleSelectionChange","p","indeterminate","checkColumnVisibilityModelsSame","aFalseValues","bFalseValues","defaultSearchPredicate","searchValue","searchInputRef","initialColumnVisibilityModel","setSearchValue","searchPredicate","autoFocusSearchField","disableShowHideToggle","disableResetButton","toggleAllMode","getTogglableColumns","isResetDisabled","sortedColumns","toggleColumn","togglableColumns","togglableSortedColumns","toggleAllColumns","handleSearchValueChange","hideableColumns","allHideableColumnsVisible","every","allHideableColumnsHidden","firstSwitchRef","firstHideableColumnFound","isFirstHideableColumn","GridColumnsManagementHeader","placeholder","InputProps","startAdornment","pl","GridColumnsManagementBody","FormControlLabel","control","GridColumnsManagementEmptyText","GridColumnsManagementFooter","columnsManagementHeader","columnsManagementFooter","justifyContent","divider","grey","GridFooterContainerRoot","GridFooterContainer","GridOverlayRoot","overlay","alignSelf","columnHeaderStyles","separatorIconDragStyles","rx","GridRootStyles","aggregationColumnHeader","aggregationColumnHeaderLabel","editBooleanCell","cellSkeleton","checkboxInput","columnHeaderDraggableContainer","columnHeaderTitleContainer","columnSeparator","filterIcon","iconSeparator","menuIconButton","menuOpen","rowReorderCellPlaceholder","rowReorderCell","sortIcon","withBorderColor","treeDataGroupingCell","treeDataGroupingCellToggle","treeDataGroupingCellLoadingContainer","detailPanelToggleCell","borderColor","TableCell","radius","containerBackground","default","mixins","MuiDataGrid","pinnedBackground","overlayBackground","defaultChannel","disabledOpacity","hoverOpacity","hoverColor","selectedOpacity","selectedBackground","mainChannel","selectedHoverBackground","pinnedHoverBackground","blend","pinnedSelectedBackground","pinnedSelectedHoverBackground","selectedStyles","fontWeightMedium","borderWidth","borderStyle","outline","overflowAnchor","groupingCriteriaCell","WebkitTapHighlightColor","outlineOffset","focusOutlineWidth","transitions","duration","shorter","gap","borderBottomWidth","borderBottomStyle","marginLeft","marginRight","columnSeparatorOffset","touchAction","shortest","breakInside","borderTopColor","boxShadow","shadows","paper","booleanCell","secondary","gridGap","rowReorderCellContainer","borderLeftColor","borderLeftWidth","borderLeftStyle","borderRightColor","borderRightWidth","borderRightStyle","textAlign","virtualScrollerContent","groupingCriteriaCellToggle","virtualScroller","gamma","f","overlayColor","rgb","mountedState","setMountedState","GridMenuRoot","menu","modal","GridMenu","savedFocusRef","HTMLElement","handleClickAway","anchorEl","placement","TransitionProps","onClickAway","mouseEvent","popperOnExited","labelledby","GRID_COLUMN_MENU_SLOTS","columnMenuSortItem","GridColumnMenuSortItem","columnMenuFilterItem","GridColumnMenuFilterItem","columnMenuColumnsItem","GridColumnMenuColumnsItem","GRID_COLUMN_MENU_SLOT_PROPS","displayOrder","GridGenericColumnMenu","defaultSlotProps","orderedSlots","addDividers","processedComponents","processedSlotProps","mergedProps","currentSlotProps","defaultItems","userItems","defaultComponentKeys","sorted","leftItemProps","rightItemProps","isFinite","itemProps","processedComponentProps","customProps","Divider","useGridColumnMenuSlots","GridColumnMenuContainer","Component","otherProps","StyledMenuList","handleListKeyDown","autoFocus","showFilter","GridColumnMenuHideItem","GridColumnMenuManageItem","showColumns","onSortMenuItemClick","getLabel","gridPanelClasses","GridPanelRoot","GridPaperRoot","isPlaced","setIsPlaced","modifiers","rootBoundary","phase","effect","setAnchorEl","panelAnchor","elevation","GridPanelContentRoot","GridPanelContent","GridPanelFooterRoot","panelFooter","GridPanelFooter","GridPanelWrapperRoot","panelWrapper","isEnabled","GridPanelWrapper","disableEnforceFocus","TrapFocus","GridFilterFormRoot","filterForm","FilterFormDeleteIcon","filterFormDeleteIcon","flexShrink","FilterFormLogicOperatorInput","filterFormLogicOperatorInput","FilterFormColumnInput","filterFormColumnInput","FilterFormOperatorInput","filterFormOperatorInput","FilterFormValueInput","filterFormValueInput","getColumnLabel","GridFilterForm","hasMultipleFilters","deleteFilter","applyFilterChanges","showMultiFilterOperators","disableMultiFilterOperator","applyMultiFilterOperatorChanges","logicOperators","And","Or","columnsSort","filterColumns","deleteIconProps","logicOperatorInputProps","operatorInputProps","columnInputProps","valueInputProps","readOnly","filterableColumns","columnSelectId","columnSelectLabelId","operatorSelectId","operatorSelectLabelId","deleteIcon","logicOperatorInput","columnInput","operatorInput","valueInput","valueRef","filterSelectorRef","multiFilterOperator","hasLogicOperatorColumn","baseFormControlProps","isBaseSelectNative","baseInputLabelProps","baseSelectOptionProps","valueInputPropsOther","selectedField","itemField","selectedNonFilterableColumn","filteredFields","currentFilters","isFieldIncluded","sortedFilteredColumns","currentColumn","currentOperator","changeColumn","newOperator","changeOperator","op","eraseItemValue","changeLogicOperator","getLogicOperatorLocaleKey","applyValue","BooleanOperatorContainer","GridFilterInputBoolean","clearButton","labelProp","others","filterValueState","setFilterValueState","selectId","baseSelectProps","onFilterChange","shrink","notched","displayEmpty","convertFilterItemValueToInputValue","itemValue","inputType","substring","GridFilterInputDate","filterTimeout","applying","setIsApplying","InputLabelProps","GridFilterInputMultipleSingleSelect","helperText","TextFieldProps","resolvedColumn","isOptionEqualToValue","resolvedValueOptions","filteredValues","resolvedValue","A","multiple","filterOptions","renderTags","getTagProps","_getTagProps","tagProps","renderInput","GridFilterInputMultipleValue","freeSolo","inputValue","renderSingleSelectOptions","OptionComponent","SingleSelectOperatorContainer","GridFilterInputSingleSelect","currentValueOptions","GridFilterInputValue","newItem","fromInput","getGridFilter","filterableColumnsLookup","lastFilterRef","placeholderFilter","filterFormProps","getColumnForNewFilter","disableAddFilterButton","disableRemoveAllButton","applyFilter","applyFilterLogicOperator","getDefaultFilter","nextColumnWithOperator","nextFieldName","getNewFilter","nextColumnFieldName","readOnlyFilters","validFilters","addNewFilter","newFilter","shouldCloseFilterPanel","handleRemoveAll","startIcon","isSingleSelectColDef","getValueOptions","additionalParams","getValueFromValueOptions","optionValue","_excluded3","GridCsvExportMenuItem","GridPrintExportMenuItem","GridToolbarExport","excelOptions","preProcessedButtons","GridToolbarExportContainer","buttonProps","tooltipProps","exportButtonId","exportMenuId","handleMenuClose","prevOpen","GridScrollAreaRawRoot","scrollArea","GridScrollArea","scrollDirection","getCanScrollMore","maxScrollLeft","dragging","setDragging","canScrollMore","setCanScrollMore","totalHeaderHeight","handleDragOver","offset","handleColumnHeaderDragStart","handleColumnHeaderDragEnd","newScrollPosition","useGridOverlays","noRows","MemoizedGridHeaders","cellTabIndexState","columnsContainerRef","GridPanelAnchor","Element","flexGrow","GridMainContainer","GridTopContainer","GridBottomContainer","VirtualScrollerContentRoot","GridVirtualScrollerContent","overflowedContent","Filler","Pinned","PinnedLeft","borderRight","PinnedRight","borderLeft","Main","rowsLength","scrollbarHeight","expandedHeight","VirtualScrollerRenderZoneRoot","virtualScrollerRenderZone","GridVirtualScrollerRenderZone","Scrollbar","ScrollbarVertical","overflowY","overflowX","ScrollbarHorizontal","Content","GridVirtualScrollbar","isLocked","lastPosition","scrollbarRef","contentRef","propertyDimension","propertyScroll","hasScroll","scrollbarInnerSize","onScrollerScroll","scroller","scrollbar","onScrollbarScroll","capture","Container","Scroller","GridVirtualScroller","overlaysProps","useGridVirtualScroller","getContainerProps","getScrollerProps","getContentProps","getRenderZoneProps","getScrollbarVerticalProps","getScrollbarHorizontalProps","getRows","getDataGridUtilityClass","GRID_DETAIL_PANEL_TOGGLE_FIELD","GRID_DEFAULT_LOCALE_TEXT","toolbarDensity","toolbarDensityLabel","toolbarDensityCompact","toolbarDensityStandard","toolbarDensityComfortable","toolbarColumns","toolbarColumnsLabel","toolbarFilters","toolbarFiltersLabel","toolbarFiltersTooltipHide","toolbarFiltersTooltipShow","toolbarFiltersTooltipActive","toolbarQuickFilterPlaceholder","toolbarQuickFilterLabel","toolbarQuickFilterDeleteIconLabel","toolbarExport","toolbarExportLabel","toolbarExportCSV","toolbarExportPrint","toolbarExportExcel","columnsManagementSearchTitle","columnsManagementNoColumns","columnsManagementShowHideAllText","columnsManagementReset","filterPanelAddFilter","filterPanelRemoveAll","filterPanelDeleteIconLabel","filterPanelLogicOperator","filterPanelOperator","filterPanelOperatorAnd","filterPanelOperatorOr","filterPanelColumns","filterPanelInputLabel","filterPanelInputPlaceholder","filterOperatorContains","filterOperatorDoesNotContain","filterOperatorEquals","filterOperatorDoesNotEqual","filterOperatorStartsWith","filterOperatorEndsWith","filterOperatorIs","filterOperatorNot","filterOperatorAfter","filterOperatorOnOrAfter","filterOperatorBefore","filterOperatorOnOrBefore","filterOperatorIsEmpty","filterOperatorIsNotEmpty","filterOperatorIsAnyOf","headerFilterOperatorContains","headerFilterOperatorDoesNotContain","headerFilterOperatorEquals","headerFilterOperatorDoesNotEqual","headerFilterOperatorStartsWith","headerFilterOperatorEndsWith","headerFilterOperatorIs","headerFilterOperatorNot","headerFilterOperatorAfter","headerFilterOperatorOnOrAfter","headerFilterOperatorBefore","headerFilterOperatorOnOrBefore","headerFilterOperatorIsEmpty","headerFilterOperatorIsNotEmpty","headerFilterOperatorIsAnyOf","filterValueAny","filterValueTrue","filterValueFalse","columnMenuLabel","columnMenuShowColumns","columnMenuManageColumns","columnMenuFilter","columnMenuHideColumn","columnMenuUnsort","columnMenuSortAsc","columnMenuSortDesc","columnHeaderFiltersTooltipActive","columnHeaderFiltersLabel","columnHeaderSortIconLabel","footerRowSelected","footerTotalRows","footerTotalVisibleRows","visibleCount","totalCount","checkboxSelectionHeaderName","checkboxSelectionSelectAllRows","checkboxSelectionUnselectAllRows","checkboxSelectionSelectRow","checkboxSelectionUnselectRow","booleanCellTrueLabel","booleanCellFalseLabel","actionsCellMore","pinToLeft","pinToRight","unpin","treeDataGroupingHeaderName","treeDataExpand","treeDataCollapse","groupingColumnHeaderName","groupColumn","unGroupColumn","detailPanelToggle","expandDetailPanel","collapseDetailPanel","MuiTablePagination","rowReorderingHeaderName","aggregationMenuItemHeader","aggregationFunctionLabelSum","aggregationFunctionLabelAvg","aggregationFunctionLabelMin","aggregationFunctionLabelMax","aggregationFunctionLabelSize","Provider","gridColumnGroupingSelector","gridColumnGroupsUnwrappedModelSelector","gridColumnGroupsLookupSelector","gridColumnGroupsHeaderStructureSelector","gridColumnGroupsHeaderMaxDepthSelector","gridColumnMenuSelector","DEFAULT_GRID_AUTOSIZE_OPTIONS","GridPinnedColumnPosition","EMPTY_PINNED_COLUMN_FIELDS","gridColumnsStateSelector","gridColumnFieldsSelector","createSelector","gridColumnLookupSelector","gridColumnDefinitionsSelector","allFields","gridColumnVisibilityModelSelector","gridVisibleColumnDefinitionsSelector","gridVisibleColumnFieldsSelector","gridPinnedColumnsSelector","gridVisiblePinnedColumnDefinitionsSelector","visiblePinnedFields","invert","newPinnedColumns","remainingColumns","leftPinnedColumns","columnsWithoutLeftPinnedColumns","rightPinnedColumns","filterVisibleColumns","gridColumnPositionsSelector","currentPosition","gridColumnsTotalWidthSelector","colCount","gridFilterableColumnDefinitionsSelector","gridFilterableColumnLookupSelector","gridHasColSpanSelector","COLUMNS_DIMENSION_PROPERTIES","COLUMN_TYPES","hydrateColumnsWidth","rawState","totalFlexUnits","widthAllocatedBeforeFlex","flexColumns","columnField","isFlex","availableWidth","initialFreeSpace","computedColumnWidths","uniqueFlexColumns","flexColumnsLookup","frozenFields","freeze","frozen","loopOverFlexItems","violationsLookup","remainingFreeSpace","flexUnits","totalViolation","computeFlexColumnsWidth","getDefaultColTypeDef","createColumnsState","isInsideStateInitializer","currentState","columnsToKeep","columnsToUpsertLookup","existingState","columnsStateWithPortableColumns","columnsWithUpdatedDimensions","orderedFieldsLookup","cleanOrderedFields","newOrderedFields","newColumnLookup","newColDef","applyInitialState","getFirstNonSpannedColumnToRender","lastRowToRender","firstNonSpannedColumnToRender","getTotalHeaderHeight","isHeaderFilteringEnabled","COMPACT_DENSITY_FACTOR","COMFORTABLE_DENSITY_FACTOR","DENSITY_FACTORS","compact","comfortable","standard","gridDensitySelector","gridDensityFactorSelector","gridDimensionsSelector","gridEditRowsStateSelector","gridFilterStateSelector","gridFilterModelSelector","gridQuickFilterValuesSelector","gridVisibleRowsLookupSelector","gridFilteredRowsLookupSelector","gridFilteredDescendantCountLookupSelector","gridExpandedSortedRowEntriesSelector","gridExpandedSortedRowIdsSelector","visibleSortedRowEntries","gridFilteredSortedRowEntriesSelector","gridFilteredSortedRowIdsSelector","filteredSortedRowEntries","gridFilteredSortedTopLevelRowEntriesSelector","visibleSortedRowIds","depthPositionCounter","lastDepth","rowTreeDepth","gridExpandedRowCountSelector","gridFilteredTopLevelRowCountSelector","visibleSortedTopLevelRows","gridFilteredRowCountSelector","gridFilteredDescendantRowCountSelector","topLevelRowCount","gridFilterActiveItemsSelector","gridFilterActiveItemsLookupSelector","activeFilters","res","getDefaultGridFilterModel","getPublicApiRef","hasEval","cleanFilterItem","cleanItem","sanitizeFilterModel","hasSeveralItems","hasItemsWithoutIds","mergeStateWithFilterModel","filteringState","removeDiacritics","normalize","getFilterCallbackFromItem","parser","newFilterItem","applyFilterOnRow","filterItemsApplierId","shouldQuickFilterExcludeHiddenColumns","buildAggregatedFilterApplier","isRowMatchingFilterItems","Function","getHasEval","shouldApplyFilter","resultPerItemId","filterItemCore","JSON","stringify","replaceAll","shouldApplyItem","buildAggregatedFilterItemsApplier","isRowMatchingQuickFilter","appliersPerField","quickFilterValue","outer","buildAggregatedQuickFilterApplier","isNotNull","passFilterLogic","allFilterItemResults","allQuickFilterResults","cleanedFilterItems","filterModelItems","cleanedFilterItemResults","cleanedQuickFilterResults","filterItemPredicate","filterItemResult","quickFilterValuePredicate","quickFilterValueResult","gridFocusStateSelector","gridFocusCellSelector","focusState","gridFocusColumnHeaderSelector","gridFocusColumnHeaderFilterSelector","gridFocusColumnGroupHeaderSelector","gridTabIndexStateSelector","gridTabIndexCellSelector","gridTabIndexColumnHeaderSelector","gridTabIndexColumnHeaderFilterSelector","gridTabIndexColumnGroupHeaderSelector","gridHeaderFilteringStateSelector","headerFiltering","gridHeaderFilteringEnabledSelector","headerFilteringState","gridHeaderFilteringEditFieldSelector","gridHeaderFilteringMenuSelector","gridPaginationModelSelector","gridPaginationRowCountSelector","gridPaginationMetaSelector","gridPageSelector","gridPageSizeSelector","gridPageCountSelector","gridPaginationRowRangeSelector","visibleSortedTopLevelRowEntries","topLevelFirstRowIndex","topLevelLastRowIndex","topLevelFirstRow","topLevelRowsInCurrentPageCount","topLevelRowAdded","gridPaginatedVisibleSortedGridRowEntriesSelector","paginationRange","gridPaginatedVisibleSortedGridRowIdsSelector","defaultPageSize","getPageCount","getDefaultGridPaginationModel","getValidPage","throwIfPageSizeExceedsTheLimit","signatureProp","gridPreferencePanelStateSelector","GridPreferencePanelsValue","gridRowSelectionStateSelector","selectedGridRowsCountSelector","selectedGridRowsSelector","selectedIdsLookupSelector","isMultipleRowSelectionEnabled","gridRowSpanningStateSelector","gridRowSpanningHiddenCellsSelector","gridRowSpanningSpannedCellsSelector","gridRowSpanningHiddenCellsOriginMapSelector","gridRowsStateSelector","gridRowCountSelector","gridRowsLoadingSelector","gridTopLevelRowCountSelector","gridRowsLookupSelector","gridRowsDataRowIdToIdLookupSelector","gridRowTreeSelector","gridRowGroupsToFetchSelector","groupsToFetch","gridRowGroupingNameSelector","gridRowTreeDepthsSelector","gridRowMaximumTreeDepthSelector","nodeCount","gridDataRowIdsSelector","gridAdditionalRowGroupsSelector","additionalRowGroups","gridPinnedRowsSelector","rawPinnedRows","rowEntry","gridPinnedRowsCountSelector","GRID_ROOT_GROUP_ID","GRID_ID_AUTOGENERATED","buildRootGroup","groupingField","isAutoGenerated","childrenFromPath","checkGridRowIdIsValid","detailErrorMessage","getRowIdFromRowModel","createRowsInternalCache","getTopLevelRowCount","getRowsStateFromCache","unProcessedTree","unProcessedTreeDepths","unProcessedDataRowIds","groupingParamsWithHydrateRows","modify","idToActionLookup","isAutogeneratedRow","isAutogeneratedRowNode","getTreeNodeDescendants","parentId","validDescendants","childDescendants","updateCacheWithNewRows","uniqueUpdates","partialUpdates","alreadyAppliedActionsToRemove","partialRow","actionAlreadyAppliedToRow","_action","oldRow","actionTypeWithActionsToRemove","actionType","idsToRemove","calculatePinnedRowsHeight","getMinimalContentHeight","computeRowsUpdates","pinnedRowsCache","prevModel","idLookup","MissingRowIdError","rawValue","cellFocus","cellTabIndex","getRowElement","paramsApi","gridSortingStateSelector","gridSortedRowIdsSelector","sortingState","gridSortedRowEntriesSelector","sortedIds","gridSortModelSelector","gridSortColumnLookupSelector","sanitizeSortModel","mergeStateWithSortModel","buildAggregatedSortingApplier","comparatorList","comparator","getSortComparator","getSortCellParams","parseSortItem","rowList","compareRows","row1","row2","sortCellParams1","sortCellParams2","getNextGridSortDirection","currentIdx","gridNillComparator","v1","v2","gridStringOrNumberComparator","nillResult","gridNumberComparator","gridDateComparator","gridVirtualizationSelector","gridVirtualizationEnabledSelector","gridVirtualizationColumnEnabledSelector","gridVirtualizationRowEnabledSelector","enabledForRows","gridRenderContextSelector","gridRenderContextColumnsSelector","isFirefox","ScrollDirection","EMPTY_SCROLL_POSITION","EMPTY_DETAIL_PANELS","outerSize","hasBottomPinnedRows","panels","setPanels","selectedRowsLookup","gridRootRef","mainRef","scrollerRef","scrollbarVerticalRef","scrollbarHorizontalRef","contentHeight","hasColSpan","fnRef","observer","useResizeObserver","previousContextScrollPosition","previousRowContext","scrollTimeout","frozenContext","scrollCache","verticalBuffer","buffer","bufferForDirection","MINIMUM_COLUMN_WIDTH","createScrollCache","nextRenderContext","context1","context2","didRowsIntervalChange","triggerUpdateRenderContext","newScroll","dx","dy","isScrolling","DOWN","UP","directionForDelta","rowScroll","columnScroll","didCrossThreshold","didChangeDirection","computeRenderContext","inputsSelector","forceUpdateRenderContext","handleScroll","handleWheel","needsHorizontalScrollbar","scrollerStyle","useRunOnce","initialRenderContext","baseRenderContext","isLastSection","isPinnedSection","rowIndexOffset","rowModels","rowIndexes","virtualRowIndex","rowProps","rowIndexInPage","isLastVisibleInSection","tabbableCell","currentRenderContext","computeOffsetLeft","getInfiniteLoadingTriggerElement","lastRowId","onScroll","onWheel","onTouchMove","hiddenCellsOriginMap","at","lastColumn","viewportInnerWidth","viewportInnerHeight","lastRowHeight","lastColumnWidth","inputs","realLeft","getNearestIndexToRender","atStart","rowSpanHiddenCellOrigin","minSpannedRowIndex","getIndexesToRender","firstIndex","lastIndex","minFirstIndex","maxLastIndex","bufferBefore","rowBefore","bufferAfter","rowAfter","lastSize","binarySearch","actualRenderContext","initialFirstColumnToRender","columnBefore","columnAfter","deriveRenderContext","lastMeasuredIndexRelativeToAllRows","allRowsMeasured","lastMeasuredIndexRelativeToCurrentPage","interval","exponentialSearch","sliceStart","sliceEnd","pivot","isBefore","firstPosition","firstIndexPadded","lastIndexPadded","pinnedLeftLength","horizontalBuffer","EMPTY_RENDER_CONTEXT","virtualizationStateInitializer","setVirtualization","unstable_setVirtualization","TimerBasedCleanupTracking","timeouts","cleanupTimeout","object","unsubscribe","unregisterToken","cleanupToken","unregister","reset","FinalizationRegistryBasedCleanupTracking","registry","FinalizationRegistry","GridSignature","ObjectToBeRetainedByReact","createUseGridApiEventHandler","registryContainer","cleanupTokensCounter","objectRetainedByReact","subscription","handlerRef","cleanupTokenRef","enhancedHandler","unstable_resetCleanupTracking","optionsSubscriberOptions","useGridApiOptionHandler","apiMethods","newLogger","added","setAdded","targetElement","wrapHandler","GridPrivateApiContext","applySelector","acceptsApiRef","isOutputSelector","defaultCompare","is","objectShallowCompare","createRefs","equals","didInit","getVisibleRows","condition","didRun","GridArrowUpwardIcon","d","GridArrowDownwardIcon","GridKeyboardArrowRight","GridExpandMoreIcon","GridFilterListIcon","GridFilterAltIcon","GridSearchIcon","GridMenuIcon","GridCheckCircleIcon","GridColumnIcon","GridSeparatorIcon","GridViewHeadlineIcon","GridTableRowsIcon","GridViewStreamIcon","GridTripleDotsVerticalIcon","GridCloseIcon","GridAddIcon","GridRemoveIcon","GridLoadIcon","GridDragIcon","GridSaveAltIcon","GridCheckIcon","GridMoreVertIcon","GridVisibilityOffIcon","GridViewColumnIcon","GridClearIcon","GridDeleteIcon","GridDeleteForeverIcon","isLeaf","GridEditModes","GridCellModes","GridRowModes","GridLogicOperator","GridCellEditStartReasons","GridCellEditStopReasons","GridRowEditStartReasons","GridRowEditStopReasons","code","arguments","encodeURIComponent","charAt","toUpperCase","getUtilityClass","output","utilityClass","debounced","defaultGenerator","generate","configure","generator","createClassNameGenerator","globalStateClasses","active","completed","expanded","focused","focusVisible","required","generateUtilityClass","globalStatePrefix","globalStateClass","generateUtilityClasses","setRef","maybeReactUseId","idOverride","reactId","defaultId","setDefaultId","useGlobalId","UNINITIALIZED","init","initArg","EMPTY","Timeout","currentId","disposeEffect","delay","shouldCellShowRightBorder","showCellVerticalBorderRootProp","isSectionLastCell","shouldCellShowLeftBorder","reselectCreateSelector","memoize","memoizeOptions","maxSize","equalityCheck","WeakMap","checkIsAPIRef","DEFAULT_INSTANCE_ID","stateOrApiRef","instanceIdParam","isAPIRef","va","vb","vc","vd","ve","createSelectorMemoized","cacheKey","cacheArgsInit","cacheArgs","cacheFn","isOverflown","scrollHeight","findParentElementFromClassName","elem","escapeOperandAttributeSelector","operand","getGridColumnHeaderElement","getGridRowElementSelector","getGridRowElement","getGridCellElement","isEventTargetInPortal","nodeType","getFieldFromHeaderElem","colCellEl","findHeaderElementFromField","getFieldsFromGroupHeaderElem","findGroupHeaderElementsFromField","findGridCellElementsFromCol","ariaColIndex","queryRows","rowElement","findGridElement","klass","findPinnedCells","filterFn","parseCellColIndex","findLeftPinnedCellsAfterCol","findRightPinnedCellsBeforeCol","findPinnedHeaders","elements","findLeftPinnedHeadersAfterCol","findRightPinnedHeadersBeforeCol","findGridHeader","findGridCells","isPrintableKey","isNavigationKey","isHideMenuKey","isPasteShortcut","isNumber","isFunction","isObject","localStorageAvailable","setItem","removeItem","err","escapeRegExp","clamp","isDeepEqual","entriesA","entryA","ArrayBuffer","isView","source","flags","valueOf","hasOwnProperty","createRandomNumberGenerator","seed","imul","deepClone","obj","structuredClone","parse","fastObjectShallowCompare","aLength","bLength","ReactPropTypesSecret","emptyFunction","emptyFunctionWithReset","resetWarningCache","module","exports","shim","propName","location","propFullName","secret","getShim","ReactPropTypes","bigint","bool","symbol","any","arrayOf","elementType","instanceOf","objectOf","oneOf","oneOfType","exact","checkPropTypes","PropTypes","NOT_FOUND","ensureIsArray","getPrototypeOf","referenceEqualityCheck","lruMemoize","equalityCheckOrOptions","providedOptions","resultEqualityCheck","prev","next","createCacheKeyComparator","resultsCount","put","getEntries","createSingletonCache","cacheIndex","pop","createLruCache","memoized","matchingEntry","clearCache","resetResultsCount","Ref","WeakRef","deref","weakMapMemoize","fnNode","s","lastResult","cacheNode","arg","objectCache","objectNode","primitiveCache","primitiveNode","terminatedNode","lastResultValue","createSelectorCreator","memoizeOrOptions","memoizeOptionsFromArgs","createSelectorCreatorOptions","createSelectorArgs","recomputations","dependencyRecomputations","directlyPassedOptions","resultFunc","errorMessage","assertIsFunction","combinedOptions","argsMemoize","argsMemoizeOptions","devModeChecks","finalMemoizeOptions","finalArgsMemoizeOptions","dependencies","itemTypes","assertIsArrayOfFunctions","getDependencies","memoizedResultFunc","inputSelectorResults","inputSelectorArgs","collectInputSelectorResults","assign","resetDependencyRecomputations","resetRecomputations","withTypes","createStructuredSelector","inputSelectorsObject","selectorCreator","assertIsObject","inputSelectorKeys","composition"],"sourceRoot":""}