@epam/ai-dial-ui-kit 0.14.0-dev.5 → 0.14.0-dev.51
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +34 -4
- package/dist/CHANGELOG.md +20 -4
- package/dist/DateCellRenderer-BVM-Q8yx.cjs +63 -0
- package/dist/DateCellRenderer-C9SdzDU4.cjs +1 -0
- package/dist/IconButton-DWqoaBWf.cjs +1 -0
- package/dist/JsonEditor-BlaSMX26.cjs +1 -0
- package/dist/MarkdownEditor-5kljDPcm.cjs +1 -0
- package/dist/MarkdownEditor-C0_gU7Fi.cjs +1 -0
- package/dist/MarkdownEditorContainer-BqTGQArV.cjs +1 -0
- package/dist/Switch-CUKClcEz.cjs +1 -0
- package/dist/_virtual/___vite-browser-external.js +6 -0
- package/dist/_virtual/__vite-browser-external.js +4 -0
- package/dist/_virtual/_commonjsHelpers.js +31 -0
- package/dist/_virtual/index.js +5 -0
- package/dist/_virtual/index2.js +4 -0
- package/dist/_virtual/index3.js +7 -0
- package/dist/assets/icons/add-child.svg.js +5 -0
- package/dist/assets/icons/add-sibling.svg.js +5 -0
- package/dist/assets/icons/copy-to.svg.js +5 -0
- package/dist/assets/icons/file/c.svg.js +5 -0
- package/dist/assets/icons/file/cpp.svg.js +5 -0
- package/dist/assets/icons/file/cs.svg.js +5 -0
- package/dist/assets/icons/file/ini.svg.js +5 -0
- package/dist/assets/icons/file/json.svg.js +5 -0
- package/dist/assets/icons/file/md.svg.js +5 -0
- package/dist/assets/icons/file/py.svg.js +5 -0
- package/dist/assets/icons/loader.svg.js +5 -0
- package/dist/assets/icons/move-to.svg.js +5 -0
- package/dist/assets/icons/no-data.svg.js +5 -0
- package/dist/assets/icons/open-popup.svg.js +5 -0
- package/dist/assets/icons/unshare.svg.js +5 -0
- package/dist/components/Accordion/Accordion.js +70 -0
- package/dist/components/Analytics/Bar/Bar.js +80 -0
- package/dist/components/Analytics/Bar/utils.js +24 -0
- package/dist/components/Analytics/BarGroup/BarGroup.js +142 -0
- package/dist/components/Analytics/Card/Card.js +87 -0
- package/dist/components/Analytics/ErrorTag/ErrorTag.js +19 -0
- package/dist/components/Analytics/Histogram/Histogram.js +200 -0
- package/dist/components/Analytics/Histogram/utils.js +45 -0
- package/dist/components/AutocompleteInput/AutocompleteInputValue.js +21 -0
- package/dist/components/Breadcrumb/Breadcrumb.js +126 -0
- package/dist/components/Breadcrumb/BreadcrumbItem.js +83 -0
- package/dist/components/Breadcrumb/constants.js +20 -0
- package/dist/components/Button/Button.js +53 -0
- package/dist/components/Button/ButtonWrappers.js +40 -0
- package/dist/components/Button/constants.js +29 -0
- package/dist/components/Button/utils.js +11 -0
- package/dist/components/ButtonDropdown/ButtonDropdown.js +33 -0
- package/dist/components/ButtonDropdown/constants.js +8 -0
- package/dist/components/CaptionText/CaptionText.js +27 -0
- package/dist/components/Checkbox/Checkbox.js +64 -0
- package/dist/components/Checkbox/constants.js +4 -0
- package/dist/components/CloseButton/CloseButton.js +27 -0
- package/dist/components/CollapsibleSidebar/CollapsibleSidebar.js +84 -0
- package/dist/components/ConfirmationPopup/ConfirmationPopup.js +75 -0
- package/dist/components/ConfirmationPopup/constants.js +32 -0
- package/dist/components/DraggableItem/DraggableItem.js +61 -0
- package/dist/components/DraggableItem/constants.js +6 -0
- package/dist/components/Dropdown/Dropdown.js +293 -0
- package/dist/components/Dropdown/DropdownSubMenuItem.js +121 -0
- package/dist/components/Dropdown/constants.js +24 -0
- package/dist/components/DropdownIcon/DropdownIcon.js +92 -0
- package/dist/components/EllipsisTooltip/EllipsisTooltip.js +75 -0
- package/dist/components/EllipsisTooltip/constants.js +4 -0
- package/dist/components/FabButton/FabButton.js +35 -0
- package/dist/components/FileIcon/FileIcon.js +37 -0
- package/dist/components/FileIcon/constants.js +60 -0
- package/dist/components/FileManager/FileManager.js +887 -0
- package/dist/components/FileManager/FileManagerContext.js +5 -0
- package/dist/components/FileManager/FileManagerProvider.js +770 -0
- package/dist/components/FileManager/FileManagerTooltip.js +92 -0
- package/dist/components/FileManager/components/ConflictResolutionPopup/ConflictResolutionPopup.js +293 -0
- package/dist/components/FileManager/components/DestinationFolderPopup/DestinationFolderPopup.js +201 -0
- package/dist/components/FileManager/components/DialFileManagerItemSummaryCell/DialFileManagerItemSummaryCell.js +52 -0
- package/dist/components/FileManager/components/FileManagerBulkActionsToolbar/FileManagerBulkActionsToolbar.js +103 -0
- package/dist/components/FileManager/components/FileManagerBulkActionsToolbar/constants.js +5 -0
- package/dist/components/FileManager/components/FileManagerDeleteConfirmationPopup/FileManagerDeleteConfirmationPopup.js +56 -0
- package/dist/components/FileManager/components/FileManagerItemIcon/FileManagerItemIcon.js +69 -0
- package/dist/components/FileManager/components/FileManagerItemName/FileManagerItemName.js +100 -0
- package/dist/components/FileManager/components/FileManagerItemNameInput/FileManagerItemNameInput.js +93 -0
- package/dist/components/FileManager/components/FileManagerNavigationPanel/FileManagerNavigationPanel.js +165 -0
- package/dist/components/FileManager/components/FileManagerNavigationPanel/constants.js +6 -0
- package/dist/components/FileManager/components/FileManagerToolbar/DialFileManagerToolbar.js +120 -0
- package/dist/components/FileManager/components/FileMetadataPopup/FileMetadataPopup.js +119 -0
- package/dist/components/FileManager/components/FileMetadataPopup/constants.js +9 -0
- package/dist/components/FileManager/components/FoldersTree/FoldersTree.js +180 -0
- package/dist/components/FileManager/components/FoldersTree/constants.js +9 -0
- package/dist/components/FileManager/components/FoldersTree/hooks/use-expanded-paths.js +51 -0
- package/dist/components/FileManager/constants.js +28 -0
- package/dist/components/FileManager/errors.js +10 -0
- package/dist/components/FileManager/hooks/use-bulk-actions.js +143 -0
- package/dist/components/FileManager/hooks/use-collapse-tree.js +22 -0
- package/dist/components/FileManager/hooks/use-conflict-resolution.js +158 -0
- package/dist/components/FileManager/hooks/use-current-path.js +29 -0
- package/dist/components/FileManager/hooks/use-file-clipboard.js +154 -0
- package/dist/components/FileManager/hooks/use-file-delete.js +39 -0
- package/dist/components/FileManager/hooks/use-file-download.js +16 -0
- package/dist/components/FileManager/hooks/use-file-manager-columns.js +106 -0
- package/dist/components/FileManager/hooks/use-file-manager-context.js +13 -0
- package/dist/components/FileManager/hooks/use-file-manager-tabs.js +23 -0
- package/dist/components/FileManager/hooks/use-file-metadata.js +20 -0
- package/dist/components/FileManager/hooks/use-file-search.js +90 -0
- package/dist/components/FileManager/hooks/use-file-upload.js +338 -0
- package/dist/components/FileManager/hooks/use-folder-creation.js +151 -0
- package/dist/components/FileManager/hooks/use-grid-actions-column.js +65 -0
- package/dist/components/FileManager/hooks/use-grid-context-menu.js +188 -0
- package/dist/components/FileManager/hooks/use-item-renaming.js +124 -0
- package/dist/components/FileManager/hooks/use-new-actions.js +67 -0
- package/dist/components/FileManager/hooks/use-paths-selection.js +28 -0
- package/dist/components/FileManager/hooks/use-show-hidden-files.js +20 -0
- package/dist/components/FileManager/hooks/use-tree-additional-buttons.js +39 -0
- package/dist/components/FileManager/hooks/use-trigger-view-create-folder.js +42 -0
- package/dist/components/FileManager/hooks/use-trigger-view-rename.js +25 -0
- package/dist/components/FileManager/utils.js +129 -0
- package/dist/components/FileName/FileName.js +68 -0
- package/dist/components/FolderName/FolderName.js +57 -0
- package/dist/components/FormItem/FormItem.js +90 -0
- package/dist/components/FormItem/constants.js +9 -0
- package/dist/components/FormPopup/FormPopup.js +59 -0
- package/dist/components/FormPopup/constants.js +6 -0
- package/dist/components/Grid/Grid.js +333 -0
- package/dist/components/Grid/constants.js +33 -0
- package/dist/components/Grid/renderers/DateCellRenderer.js +27 -0
- package/dist/components/Grid/renderers/constants.js +25 -0
- package/dist/components/Icon/Icon.js +6 -0
- package/dist/components/IconButton/IconButton.js +40 -0
- package/dist/components/IconButton/IconButtonWrappers.js +48 -0
- package/dist/components/InfoButton/InfoButton.js +32 -0
- package/dist/components/InfoButton/constants.js +4 -0
- package/dist/components/Input/Button/InputButton.js +37 -0
- package/dist/components/Input/Button/constants.js +4 -0
- package/dist/components/Input/Input.js +120 -0
- package/dist/components/Input/utils.js +37 -0
- package/dist/components/InputPopup/InputPopup.js +174 -0
- package/dist/components/JsonEditor/JsonEditor.js +64 -0
- package/dist/components/JsonEditor/lazy.js +4 -0
- package/dist/components/Label/Label.js +27 -0
- package/dist/components/LabelledText/LabelledText.js +37 -0
- package/dist/components/LoadFileArea/EmptyFileArea.js +130 -0
- package/dist/components/LoadFileArea/FilledDropZone.js +80 -0
- package/dist/components/LoadFileArea/FilledInput.js +29 -0
- package/dist/components/LoadFileArea/LoadFileArea.js +70 -0
- package/dist/components/LoadFileArea/LoadFileAreaField.js +128 -0
- package/dist/components/Loader/Loader.js +40 -0
- package/dist/components/Loader/constants.js +5 -0
- package/dist/components/MarkdownEditor/MarkdownEditor.js +37 -0
- package/dist/components/MarkdownEditor/MarkdownEditorContainer.js +80 -0
- package/dist/components/MarkdownEditor/lazy.js +4 -0
- package/dist/components/New/Accordion/Accordion.js +103 -0
- package/dist/components/New/Button/Button.js +76 -0
- package/dist/components/New/Button/ButtonWrappers.js +44 -0
- package/dist/components/New/Button/constants.js +27 -0
- package/dist/components/New/Button/utils.js +11 -0
- package/dist/components/New/ButtonDropdown/ButtonDropdown.js +28 -0
- package/dist/components/New/ButtonDropdown/constants.js +17 -0
- package/dist/components/New/Calendar/Calendar.js +343 -0
- package/dist/components/New/Calendar/constants.js +57 -0
- package/dist/components/New/Calendar/utils.js +77 -0
- package/dist/components/New/CaptionText/CaptionText.js +27 -0
- package/dist/components/New/CardShell/CardShell.js +22 -0
- package/dist/components/New/Checkbox/Checkbox.js +92 -0
- package/dist/components/New/Checkbox/CheckboxBox.js +34 -0
- package/dist/components/New/Checkbox/constants.js +8 -0
- package/dist/components/New/CloseButton/CloseButton.js +33 -0
- package/dist/components/New/CollapsibleSidebar/CollapsibleSidebar.js +108 -0
- package/dist/components/New/ConfirmationPopup/ConfirmationPopup.js +78 -0
- package/dist/components/New/ConfirmationPopup/constants.js +27 -0
- package/dist/components/New/Dropdown/Dropdown.js +316 -0
- package/dist/components/New/Dropdown/DropdownSubMenuItem.js +105 -0
- package/dist/components/New/Dropdown/constants.js +28 -0
- package/dist/components/New/Dropdown/item-mark.js +6 -0
- package/dist/components/New/EllipsisTooltip/EllipsisTooltip.js +45 -0
- package/dist/components/New/EllipsisTooltip/use-truncation.js +18 -0
- package/dist/components/New/FileDropzone/FileDropzone.js +135 -0
- package/dist/components/New/FolderPath/FolderPath.js +64 -0
- package/dist/components/New/Grid/Grid.js +301 -0
- package/dist/components/New/Grid/components/SelectionCell.js +50 -0
- package/dist/components/New/Grid/components/SelectionHeader.js +46 -0
- package/dist/components/New/Grid/constants.js +44 -0
- package/dist/components/New/Grid/renderers/DateCellRenderer.js +27 -0
- package/dist/components/New/Grid/renderers/constants.js +25 -0
- package/dist/components/New/Highlight/Highlight.js +50 -0
- package/dist/components/New/IconButton/IconButton.js +46 -0
- package/dist/components/New/IconButton/IconButtonWrappers.js +40 -0
- package/dist/components/New/InfoButton/InfoButton.js +39 -0
- package/dist/components/New/InlineSelect/InlineSelect.js +96 -0
- package/dist/components/New/Input/Button/InputButton.js +38 -0
- package/dist/components/New/Input/Button/constants.js +4 -0
- package/dist/components/New/Input/Input.js +169 -0
- package/dist/components/New/Input/utils.js +37 -0
- package/dist/components/New/InteractiveTooltip/InteractiveTooltip.js +104 -0
- package/dist/components/New/InteractiveTooltip/constants.js +6 -0
- package/dist/components/New/Label/Label.js +42 -0
- package/dist/components/New/MarkdownEditor/MarkdownEditor.js +41 -0
- package/dist/components/New/MarkdownEditor/constants.js +43 -0
- package/dist/components/New/MarkdownEditor/lazy.js +4 -0
- package/dist/components/New/MenuItem/MenuItem.js +108 -0
- package/dist/components/New/MenuItem/constants.js +16 -0
- package/dist/components/New/NoDataContent/NoDataContent.js +54 -0
- package/dist/components/New/Notification/Notification.js +67 -0
- package/dist/components/New/Notification/NotificationWrapper.js +61 -0
- package/dist/components/New/Notification/constants.js +32 -0
- package/dist/components/New/NumberInput/NumberInput.js +41 -0
- package/dist/components/New/PasswordInput/PasswordInput.js +54 -0
- package/dist/components/New/Popup/Popup.js +164 -0
- package/dist/components/New/Popup/constants.js +17 -0
- package/dist/components/New/Radio/Radio.js +100 -0
- package/dist/components/New/RadioGroup/RadioGroup.js +81 -0
- package/dist/components/New/RadioGroup/constants.js +11 -0
- package/dist/components/New/RadioGroupPopupField/RadioGroupPopupField.js +138 -0
- package/dist/components/New/RadioGroupPopupField/constants.js +11 -0
- package/dist/components/New/ResizableContainer/ConditionalResizableContainer.js +6 -0
- package/dist/components/New/ResizableContainer/ResizableContainer.js +106 -0
- package/dist/components/New/ResizableContainer/components/ResizeHandle.js +85 -0
- package/dist/components/New/Search/Search.js +74 -0
- package/dist/components/New/SegmentedControl/SegmentedControl.js +92 -0
- package/dist/components/New/SegmentedControl/constants.js +19 -0
- package/dist/components/New/Select/MultiSelectTags.js +23 -0
- package/dist/components/New/Select/Select.js +379 -0
- package/dist/components/New/Select/SelectSubMenuItem.js +103 -0
- package/dist/components/New/Select/constants.js +42 -0
- package/dist/components/New/Slider/Slider.js +112 -0
- package/dist/components/New/Switch/Switch.js +95 -0
- package/dist/components/New/Tabs/Tabs.js +95 -0
- package/dist/components/New/Tag/Tag.js +76 -0
- package/dist/components/New/Tag/constants.js +17 -0
- package/dist/components/New/TagInput/TagInput.js +197 -0
- package/dist/components/New/TagInput/utils.js +21 -0
- package/dist/components/New/Textarea/Textarea.js +55 -0
- package/dist/components/New/ThemeScope/ThemeScope.js +14 -0
- package/dist/components/New/ToggleIconButton/ToggleIconButton.js +54 -0
- package/dist/components/New/Tooltip/Tooltip.js +19 -0
- package/dist/components/New/Tooltip/TooltipContainer.js +12 -0
- package/dist/components/New/Tooltip/TooltipContent.js +45 -0
- package/dist/components/New/Tooltip/TooltipContext.js +67 -0
- package/dist/components/New/Tooltip/TooltipTrigger.js +45 -0
- package/dist/components/New/Tooltip/constants.js +8 -0
- package/dist/components/New/constants/icon.js +4 -0
- package/dist/components/New/constants/overlay.js +27 -0
- package/dist/components/NoDataContent/NoDataContent.js +45 -0
- package/dist/components/Notification/Notification.js +67 -0
- package/dist/components/Notification/constants.js +24 -0
- package/dist/components/NumberInput/NumberInput.js +41 -0
- package/dist/components/Pagination/Pagination.js +80 -0
- package/dist/components/Pagination/utils.js +10 -0
- package/dist/components/PasswordInput/Icons/HideIcon.js +16 -0
- package/dist/components/PasswordInput/Icons/ShowIcon.js +16 -0
- package/dist/components/PasswordInput/PasswordInput.js +21 -0
- package/dist/components/Popup/Popup.js +110 -0
- package/dist/components/Popup/constants.js +12 -0
- package/dist/components/ProgressBar/ProgressBar.js +58 -0
- package/dist/components/RadioButton/RadioButton.js +103 -0
- package/dist/components/RadioGroup/RadioGroup.js +92 -0
- package/dist/components/RadioGroup/constants.js +10 -0
- package/dist/components/RadioGroupPopupField/RadioGroupPopupField.js +101 -0
- package/dist/components/RemoveButton/RemoveButton.js +30 -0
- package/dist/components/ResizableContainer/ConditionalResizableContainer.js +6 -0
- package/dist/components/ResizableContainer/ResizableContainer.js +79 -0
- package/dist/components/ResizableContainer/components/ResizeHandle.js +20 -0
- package/dist/components/ResizableContainer/components/ResizeIcon.js +11 -0
- package/dist/components/SchemaRenderer/SchemaRenderer.js +150 -0
- package/dist/components/SchemaRenderer/components/SchemaAdditionalPropertiesEditor.js +41 -0
- package/dist/components/SchemaRenderer/components/SchemaAnyOfEditor.js +74 -0
- package/dist/components/SchemaRenderer/components/SchemaArrayEditor.js +118 -0
- package/dist/components/SchemaRenderer/components/SchemaField.js +78 -0
- package/dist/components/SchemaRenderer/components/SchemaFieldContent.js +114 -0
- package/dist/components/SchemaRenderer/components/SchemaKeyValueEditor.js +184 -0
- package/dist/components/SchemaRenderer/components/SchemaObjectEditor.js +36 -0
- package/dist/components/SchemaRenderer/components/SchemaOneOfEditor.js +192 -0
- package/dist/components/SchemaRenderer/components/SchemaPrimitiveField.js +161 -0
- package/dist/components/SchemaRenderer/components/SchemaSection.js +81 -0
- package/dist/components/SchemaRenderer/context.js +12 -0
- package/dist/components/SchemaRenderer/types.js +27 -0
- package/dist/components/SchemaRenderer/utils.js +258 -0
- package/dist/components/Search/Search.js +63 -0
- package/dist/components/Search/constants.js +27 -0
- package/dist/components/SegmentedControl/SegmentedControl.js +87 -0
- package/dist/components/SegmentedControl/constants.js +8 -0
- package/dist/components/Select/MultiSelectTags.js +23 -0
- package/dist/components/Select/Select.js +435 -0
- package/dist/components/Select/SelectSubMenuItem.js +90 -0
- package/dist/components/Select/constants.js +15 -0
- package/dist/components/SelectField/SelectField.js +66 -0
- package/dist/components/SharedEntityIndicator/SharedEntityIndicator.js +34 -0
- package/dist/components/Skeleton/Skeleton.js +90 -0
- package/dist/components/Skeleton/utils.js +16 -0
- package/dist/components/Slider/Slider.js +158 -0
- package/dist/components/Spinner/Spinner.js +30 -0
- package/dist/components/Steps/Step.js +34 -0
- package/dist/components/Steps/Steps.js +27 -0
- package/dist/components/Steps/utils.js +42 -0
- package/dist/components/Switch/Switch.js +70 -0
- package/dist/components/Tab/Tab.js +65 -0
- package/dist/components/Tabs/Tabs.js +213 -0
- package/dist/components/Tabs/constants.js +4 -0
- package/dist/components/Tag/Tag.js +37 -0
- package/dist/components/TagInput/TagInput.js +179 -0
- package/dist/components/Textarea/Textarea.js +43 -0
- package/dist/components/Tooltip/Tooltip.js +30 -0
- package/dist/components/Tooltip/TooltipContainer.js +12 -0
- package/dist/components/Tooltip/TooltipContent.js +40 -0
- package/dist/components/Tooltip/TooltipContext.js +66 -0
- package/dist/components/Tooltip/TooltipTrigger.js +33 -0
- package/dist/components-manifest.json +1130 -182
- package/dist/{JsonEditor-DrC6i27F.js → constants/editor.js} +5 -63
- package/dist/constants/file-grid-columns.js +176 -0
- package/dist/constants/icon.js +10 -0
- package/dist/constants/validation.js +11 -0
- package/dist/dial-ui-kit.cjs +2 -0
- package/dist/dial-ui-kit.js +416 -0
- package/dist/editors.cjs +1 -0
- package/dist/editors.js +12 -0
- package/dist/file-manager.cjs +1 -0
- package/dist/file-manager.js +22 -0
- package/dist/grid.cjs +1 -0
- package/dist/grid.js +30 -0
- package/dist/hooks/use-editable-item.js +94 -0
- package/dist/hooks/use-flexible-actions.js +72 -0
- package/dist/hooks/use-has-hover.js +17 -0
- package/dist/hooks/use-is-mobile-screen.js +12 -0
- package/dist/hooks/use-is-tablet-screen.js +12 -0
- package/dist/hooks/use-screen-type.js +14 -0
- package/dist/hooks/use-width-breakpoint.js +15 -0
- package/dist/icon-CrGVkVpG.cjs +1 -0
- package/dist/icon-DhjrDQ8I.cjs +1 -0
- package/dist/index.css +2 -2
- package/dist/lazy-B1eG0EeX.cjs +1 -0
- package/dist/merge-classes-Dipy1Ih1.cjs +1 -0
- package/dist/migration-guides/0.14.0/button-tooltip-2-0.md +1 -1
- package/dist/migration-guides/0.14.0/shadow-token-per-step-rename.md +139 -0
- package/dist/migration-guides/0.14.0/tag-single-size.md +121 -0
- package/dist/migration-guides/README.md +2 -0
- package/dist/models/file.js +6 -0
- package/dist/models/selection-mode.js +4 -0
- package/dist/models/step.js +4 -0
- package/dist/node_modules/@react-dnd/asap/dist/AsapQueue.js +39 -0
- package/dist/node_modules/@react-dnd/asap/dist/RawTask.js +17 -0
- package/dist/node_modules/@react-dnd/asap/dist/TaskFactory.js +16 -0
- package/dist/node_modules/@react-dnd/asap/dist/asap.js +9 -0
- package/dist/node_modules/@react-dnd/asap/dist/makeRequestCall.js +62 -0
- package/dist/node_modules/@react-dnd/invariant/dist/index.js +22 -0
- package/dist/node_modules/@react-dnd/shallowequal/dist/index.js +25 -0
- package/dist/node_modules/ag-grid-community/dist/package/main.esm.js +39799 -0
- package/dist/node_modules/ag-grid-react/dist/package/index.esm.js +1989 -0
- package/dist/node_modules/dnd-core/dist/actions/dragDrop/beginDrag.js +70 -0
- package/dist/node_modules/dnd-core/dist/actions/dragDrop/drop.js +54 -0
- package/dist/node_modules/dnd-core/dist/actions/dragDrop/endDrag.js +18 -0
- package/dist/node_modules/dnd-core/dist/actions/dragDrop/hover.js +42 -0
- package/dist/node_modules/dnd-core/dist/actions/dragDrop/index.js +17 -0
- package/dist/node_modules/dnd-core/dist/actions/dragDrop/local/setClientOffset.js +13 -0
- package/dist/node_modules/dnd-core/dist/actions/dragDrop/publishDragSource.js +12 -0
- package/dist/node_modules/dnd-core/dist/actions/dragDrop/types.js +9 -0
- package/dist/node_modules/dnd-core/dist/actions/registry.js +43 -0
- package/dist/node_modules/dnd-core/dist/classes/DragDropManagerImpl.js +41 -0
- package/dist/node_modules/dnd-core/dist/classes/DragDropMonitorImpl.js +115 -0
- package/dist/node_modules/dnd-core/dist/classes/HandlerRegistryImpl.js +96 -0
- package/dist/node_modules/dnd-core/dist/contracts.js +21 -0
- package/dist/node_modules/dnd-core/dist/createDragDropManager.js +19 -0
- package/dist/node_modules/dnd-core/dist/interfaces.js +7 -0
- package/dist/node_modules/dnd-core/dist/reducers/dirtyHandlerIds.js +30 -0
- package/dist/node_modules/dnd-core/dist/reducers/dragOffset.js +50 -0
- package/dist/node_modules/dnd-core/dist/reducers/dragOperation.js +78 -0
- package/dist/node_modules/dnd-core/dist/reducers/index.js +42 -0
- package/dist/node_modules/dnd-core/dist/reducers/refCount.js +16 -0
- package/dist/node_modules/dnd-core/dist/reducers/stateId.js +6 -0
- package/dist/node_modules/dnd-core/dist/utils/coords.js +26 -0
- package/dist/node_modules/dnd-core/dist/utils/dirtiness.js +12 -0
- package/dist/node_modules/dnd-core/dist/utils/equality.js +17 -0
- package/dist/node_modules/dnd-core/dist/utils/getNextUniqueId.js +7 -0
- package/dist/node_modules/dnd-core/dist/utils/js_utils.js +36 -0
- package/dist/node_modules/dnd-core/dist/utils/matchesType.js +8 -0
- package/dist/node_modules/fast-deep-equal/index.js +31 -0
- package/dist/node_modules/mime-db/db.json.js +2527 -0
- package/dist/node_modules/mime-db/index.js +8 -0
- package/dist/node_modules/mime-types/index.js +70 -0
- package/dist/node_modules/mime-types/mimeScore.js +38 -0
- package/dist/node_modules/re-resizable/lib/index.js +424 -0
- package/dist/node_modules/re-resizable/lib/resizer.js +49 -0
- package/dist/node_modules/react-dnd/dist/core/DndContext.js +7 -0
- package/dist/node_modules/react-dnd/dist/core/DndProvider.js +66 -0
- package/dist/node_modules/react-dnd/dist/hooks/useCollectedProps.js +11 -0
- package/dist/node_modules/react-dnd/dist/hooks/useCollector.js +22 -0
- package/dist/node_modules/react-dnd/dist/hooks/useDrag/DragSourceImpl.js +25 -0
- package/dist/node_modules/react-dnd/dist/hooks/useDrag/connectors.js +21 -0
- package/dist/node_modules/react-dnd/dist/hooks/useDrag/useDrag.js +20 -0
- package/dist/node_modules/react-dnd/dist/hooks/useDrag/useDragSource.js +19 -0
- package/dist/node_modules/react-dnd/dist/hooks/useDrag/useDragSourceConnector.js +22 -0
- package/dist/node_modules/react-dnd/dist/hooks/useDrag/useDragSourceMonitor.js +15 -0
- package/dist/node_modules/react-dnd/dist/hooks/useDrag/useDragType.js +13 -0
- package/dist/node_modules/react-dnd/dist/hooks/useDrag/useRegisteredDragSource.js +23 -0
- package/dist/node_modules/react-dnd/dist/hooks/useDragDropManager.js +10 -0
- package/dist/node_modules/react-dnd/dist/hooks/useDrop/DropTargetImpl.js +21 -0
- package/dist/node_modules/react-dnd/dist/hooks/useDrop/connectors.js +12 -0
- package/dist/node_modules/react-dnd/dist/hooks/useDrop/useAccept.js +13 -0
- package/dist/node_modules/react-dnd/dist/hooks/useDrop/useDrop.js +16 -0
- package/dist/node_modules/react-dnd/dist/hooks/useDrop/useDropTarget.js +18 -0
- package/dist/node_modules/react-dnd/dist/hooks/useDrop/useDropTargetConnector.js +18 -0
- package/dist/node_modules/react-dnd/dist/hooks/useDrop/useDropTargetMonitor.js +15 -0
- package/dist/node_modules/react-dnd/dist/hooks/useDrop/useRegisteredDropTarget.js +23 -0
- package/dist/node_modules/react-dnd/dist/hooks/useIsomorphicLayoutEffect.js +5 -0
- package/dist/node_modules/react-dnd/dist/hooks/useMonitorOutput.js +20 -0
- package/dist/node_modules/react-dnd/dist/hooks/useOptionalFactory.js +10 -0
- package/dist/node_modules/react-dnd/dist/internals/DragSourceMonitorImpl.js +88 -0
- package/dist/node_modules/react-dnd/dist/internals/DropTargetMonitorImpl.js +59 -0
- package/dist/node_modules/react-dnd/dist/internals/SourceConnector.js +87 -0
- package/dist/node_modules/react-dnd/dist/internals/TargetConnector.js +57 -0
- package/dist/node_modules/react-dnd/dist/internals/isRef.js +9 -0
- package/dist/node_modules/react-dnd/dist/internals/registration.js +18 -0
- package/dist/node_modules/react-dnd/dist/internals/wrapConnectorHooks.js +46 -0
- package/dist/node_modules/react-dnd-html5-backend/dist/BrowserDetector.js +10 -0
- package/dist/node_modules/react-dnd-html5-backend/dist/EnterLeaveCounter.js +22 -0
- package/dist/node_modules/react-dnd-html5-backend/dist/HTML5BackendImpl.js +274 -0
- package/dist/node_modules/react-dnd-html5-backend/dist/MonotonicInterpolant.js +59 -0
- package/dist/node_modules/react-dnd-html5-backend/dist/NativeDragSources/NativeDragSource.js +43 -0
- package/dist/node_modules/react-dnd-html5-backend/dist/NativeDragSources/getDataFromDataTransfer.js +10 -0
- package/dist/node_modules/react-dnd-html5-backend/dist/NativeDragSources/index.js +24 -0
- package/dist/node_modules/react-dnd-html5-backend/dist/NativeDragSources/nativeTypesConfig.js +48 -0
- package/dist/node_modules/react-dnd-html5-backend/dist/NativeTypes.js +7 -0
- package/dist/node_modules/react-dnd-html5-backend/dist/OffsetUtils.js +70 -0
- package/dist/node_modules/react-dnd-html5-backend/dist/OptionsReader.js +22 -0
- package/dist/node_modules/react-dnd-html5-backend/dist/index.js +7 -0
- package/dist/node_modules/react-dnd-html5-backend/dist/utils/js_utils.js +22 -0
- package/dist/node_modules/redux/es/redux.js +158 -0
- package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js +2924 -0
- package/dist/src/components/Analytics/BarGroup/BarGroup.d.ts +9 -2
- package/dist/src/components/FileManager/FileManager.d.ts +2 -1
- package/dist/src/components/FileManager/components/DestinationFolderPopup/DestinationFolderPopup.d.ts +2 -0
- package/dist/src/components/FileManager/hooks/use-file-upload.d.ts +4 -2
- package/dist/src/components/FileManager/utils.d.ts +11 -0
- package/dist/src/components/Grid/comparators/base-column-comparator.d.ts +1 -4
- package/dist/src/components/Grid/renderers/utils.d.ts +1 -2
- package/dist/src/components/JsonEditor/lazy.d.ts +14 -0
- package/dist/src/components/MarkdownEditor/lazy.d.ts +7 -0
- package/dist/src/components/New/CollapsibleSidebar/CollapsibleSidebar.d.ts +82 -0
- package/dist/src/components/New/Dropdown/Dropdown.d.ts +20 -0
- package/dist/src/components/New/Dropdown/constants.d.ts +5 -4
- package/dist/src/components/New/Dropdown/item-mark.d.ts +15 -0
- package/dist/src/components/New/EllipsisTooltip/EllipsisTooltip.d.ts +1 -1
- package/dist/src/components/New/EllipsisTooltip/use-truncation.d.ts +5 -0
- package/dist/src/components/New/Grid/Grid.d.ts +124 -0
- package/dist/src/components/New/Grid/components/SelectionCell.d.ts +21 -0
- package/dist/src/components/New/Grid/components/SelectionHeader.d.ts +14 -0
- package/dist/src/components/New/Grid/constants.d.ts +61 -0
- package/dist/src/components/New/Grid/renderers/DateCellRenderer.d.ts +48 -0
- package/dist/src/components/New/Grid/renderers/constants.d.ts +5 -0
- package/dist/src/components/New/InteractiveTooltip/InteractiveTooltip.d.ts +74 -0
- package/dist/src/components/New/InteractiveTooltip/constants.d.ts +26 -0
- package/dist/src/components/New/MarkdownEditor/MarkdownEditor.d.ts +6 -0
- package/dist/src/components/New/MarkdownEditor/lazy.d.ts +7 -0
- package/dist/src/components/New/MenuItem/MenuItem.d.ts +68 -0
- package/dist/src/components/New/MenuItem/constants.d.ts +5 -0
- package/dist/src/components/New/NoDataContent/NoDataContent.d.ts +48 -0
- package/dist/src/components/New/ResizableContainer/ConditionalResizableContainer.d.ts +34 -0
- package/dist/src/components/New/ResizableContainer/ResizableContainer.d.ts +77 -0
- package/dist/src/components/New/ResizableContainer/components/ResizeHandle.d.ts +21 -0
- package/dist/src/components/New/SegmentedControl/constants.d.ts +2 -2
- package/dist/src/components/New/Select/Select.d.ts +14 -2
- package/dist/src/components/New/Select/SelectSubMenuItem.d.ts +3 -0
- package/dist/src/components/New/Select/constants.d.ts +12 -5
- package/dist/src/components/New/Slider/Slider.d.ts +70 -0
- package/dist/src/components/New/Tag/Tag.d.ts +17 -10
- package/dist/src/components/New/Tag/constants.d.ts +23 -0
- package/dist/src/components/New/Textarea/Textarea.d.ts +8 -2
- package/dist/src/components/New/ThemeScope/ThemeScope.d.ts +46 -0
- package/dist/src/components/New/Tooltip/Tooltip.d.ts +1 -1
- package/dist/src/components/New/Tooltip/TooltipContent.d.ts +4 -3
- package/dist/src/components/New/Tooltip/constants.d.ts +10 -1
- package/dist/src/components/New/constants/icon.d.ts +22 -0
- package/dist/src/components/New/constants/overlay.d.ts +7 -0
- package/dist/src/components/Tooltip/TooltipContent.d.ts +4 -0
- package/dist/src/hooks/use-has-hover.d.ts +20 -0
- package/dist/src/index.d.ts +30 -4
- package/dist/src/models/dropdown.d.ts +40 -1
- package/dist/src/models/select.d.ts +30 -0
- package/dist/src/subpaths/editors.d.ts +22 -0
- package/dist/src/subpaths/file-manager.d.ts +21 -0
- package/dist/src/subpaths/grid.d.ts +25 -0
- package/dist/src/types/menu-item.d.ts +21 -0
- package/dist/src/utils/__tests__/element-size-observer.spec.d.ts +1 -0
- package/dist/src/utils/__tests__/pointer.spec.d.ts +1 -0
- package/dist/src/utils/element-size-observer.d.ts +26 -0
- package/dist/src/utils/grid-comparators.d.ts +4 -0
- package/dist/src/utils/grid-date.d.ts +7 -0
- package/dist/src/utils/grid-registration.d.ts +16 -0
- package/dist/src/utils/grid-registration.spec.d.ts +1 -0
- package/dist/src/utils/pointer.d.ts +29 -0
- package/dist/src/utils/sub-menu-floating.d.ts +1 -0
- package/dist/types/analytics.js +4 -0
- package/dist/types/button.js +5 -0
- package/dist/types/calendar.js +4 -0
- package/dist/types/caption.js +4 -0
- package/dist/types/confirmation-popup.js +4 -0
- package/dist/types/dropdown.js +6 -0
- package/dist/types/editor.js +4 -0
- package/dist/types/file-manager.js +12 -0
- package/dist/types/flexible-actions.js +4 -0
- package/dist/types/form-item.js +4 -0
- package/dist/types/item.js +4 -0
- package/dist/types/menu-item.js +4 -0
- package/dist/types/notification.js +5 -0
- package/dist/types/popup.js +4 -0
- package/dist/types/radio-group.js +4 -0
- package/dist/types/resizable-container.js +4 -0
- package/dist/types/screen.js +4 -0
- package/dist/types/select.js +5 -0
- package/dist/types/size.js +4 -0
- package/dist/types/skeleton.js +6 -0
- package/dist/types/tab.js +6 -0
- package/dist/types/tag.js +4 -0
- package/dist/types/tooltip.js +4 -0
- package/dist/use-file-manager-tabs-DjdR_mYM.cjs +3 -0
- package/dist/utils/accessible-name.js +6 -0
- package/dist/utils/debounce.js +9 -0
- package/dist/utils/element-size-observer.js +24 -0
- package/dist/utils/file-accept.js +16 -0
- package/dist/utils/flat-to-hierarchy-convertor.js +86 -0
- package/dist/utils/grid-comparators.js +17 -0
- package/dist/utils/grid-date.js +20 -0
- package/dist/utils/grid-registration.js +8 -0
- package/dist/utils/merge-classes.js +8 -0
- package/dist/utils/mobile.js +11 -0
- package/dist/utils/path.js +4 -0
- package/dist/utils/pointer.js +5 -0
- package/dist/utils/sub-menu-floating.js +85 -0
- package/package.json +37 -12
- package/dist/JsonEditor-dP4yDdgN.cjs +0 -1
- package/dist/MarkdownEditor-BeNDQecT.js +0 -75
- package/dist/MarkdownEditor-CO-k9xZo.js +0 -35
- package/dist/MarkdownEditor-CSgVi6EZ.cjs +0 -1
- package/dist/MarkdownEditor-fskBDR5e.cjs +0 -1
- package/dist/dial-ui-kit.cjs.js +0 -1
- package/dist/dial-ui-kit.es.js +0 -220
- package/dist/index-DmEajFx0.cjs +0 -71
- package/dist/index-jMP1W9V6.js +0 -66826
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use strict";const H=require("react/jsx-runtime"),p=require("react"),ha=require("react-dom"),me=require("classnames"),pe=require("@floating-ui/react"),vn=require("@tabler/icons-react"),Mt=require("./merge-classes-Dipy1Ih1.cjs"),De=require("./IconButton-DWqoaBWf.cjs"),zi=({icon:e,className:t})=>e?H.jsx("span",{className:me("flex-shrink-0",t),children:e}):null,dp="text-primary",Jo=new Map,qs=new Set;let Xo=null,ns=null;const up=()=>{ns=null;const e=Array.from(qs);qs.clear(),e.forEach(t=>t())},wn=e=>{qs.add(e),ns===null&&(ns=requestAnimationFrame(up))},wd=()=>{Jo.forEach(wn)},hp=e=>{e.forEach(t=>{const o=Jo.get(t.target);o&&wn(o)})},gp=()=>{window.removeEventListener("resize",wd),Xo?.disconnect(),Xo=null,qs.clear(),ns!==null&&(cancelAnimationFrame(ns),ns=null)},bd=(e,t)=>(Jo.size===0&&window.addEventListener("resize",wd),Jo.set(e,t),!Xo&&typeof ResizeObserver<"u"&&(Xo=new ResizeObserver(hp)),Xo?.observe(e),()=>{Jo.delete(e),Xo?.unobserve(e),qs.delete(t),Jo.size===0&&gp()}),ga=({text:e,className:t,contentClassName:o,hideTooltip:s,id:i,customTooltipContent:n,...r})=>{const a=p.useRef(null),[l,c]=p.useState(!1),[d,u]=p.useState(""),h=p.useCallback(()=>{const C=a.current;C&&(u(C.textContent??""),c(C.scrollWidth>C.clientWidth))},[]),g=p.useCallback(()=>wn(h),[h]);p.useEffect(()=>{const C=a.current;if(C)return bd(C,h)},[h]),p.useEffect(()=>{g()},[e,g]);const f=p.useMemo(()=>typeof e=="string"?e:d,[d,e]),m=p.useMemo(()=>s?"":n||(l?f:""),[n,f,s,l]);return H.jsxs(De.DialTooltipContainer,{...r,children:[H.jsx(De.DialTooltipTrigger,{asChild:!0,onMouseEnter:g,onFocusCapture:g,children:H.jsx("span",{id:i,className:Mt.mergeClasses("block truncate flex-1 min-w-0 max-w-full text-start",t),"aria-label":l?f:void 0,onMouseEnter:g,onFocus:g,ref:a,children:e})}),H.jsx(De.DialTooltipContent,{className:Mt.mergeClasses(dp,o,!m&&"hidden"),children:m})]})},Fs=(e,t)=>({appearance:s,...i})=>H.jsx(De.DialIconButton,{...i,variant:e,appearance:s||t}),pp=(e,t)=>({variant:s,...i})=>H.jsx(De.DialIconButton,{...i,variant:s||t,appearance:e}),fp=Fs(De.ButtonVariant.Primary,De.ButtonAppearance.Solid),mp=Fs(De.ButtonVariant.Neutral,De.ButtonAppearance.Outlined),Cp=Fs(De.ButtonVariant.Danger,De.ButtonAppearance.Outlined),vp=Fs(De.ButtonVariant.Secondary,De.ButtonAppearance.Ghost),wp=Fs(De.ButtonVariant.Tertiary,De.ButtonAppearance.Ghost),bp=Fs(De.ButtonVariant.Success,De.ButtonAppearance.Ghost),Sd=pp(De.ButtonAppearance.Ghost,De.ButtonVariant.Primary),Sr=p.createContext(""),Sp=({className:e,children:t})=>{const o=p.useContext(Sr),s=p.useMemo(()=>[o,e].filter(Boolean).join(" "),[o,e]);return H.jsx(Sr.Provider,{value:s,children:H.jsx("div",{className:Mt.mergeClasses("contents",e),children:t})})},yd=()=>p.useContext(Sr),yr="checkbox-container",Rd=({name:e,value:t,label:o,description:s,checked:i=!1,inputId:n,className:r,labelClassName:a,disabled:l,onChange:c,descriptionClassName:d,containerClassName:u,caption:h,oneLineCaption:g=!1})=>{const f=`${n}-desc`,m=me("dial-small-text cursor-pointer py-[1px]",l?"text-secondary":"text-primary",a,l&&"cursor-not-allowed"),C=me("cursor-pointer dial-input-radio",!!o&&"mr-2",r,l&&"!cursor-not-allowed"),v=me("flex flex-col",!!s&&"mb-2",l&&"cursor-not-allowed",u),w=me("dial-tiny-text mt-2 ml-[26px] text-secondary",d,l&&"cursor-not-allowed"),b=y=>{l||y.target.checked&&c?.(t)};return H.jsxs("div",{className:v,children:[H.jsxs("div",{className:me("flex flex-row",(!h||g)&&"items-center"),children:[H.jsx("input",{type:"radio",id:n,name:e,value:t,checked:i,disabled:l,"aria-describedby":i&&s?f:void 0,className:C,onChange:b}),(o||h)&&H.jsxs("div",{className:me("flex",g?"flex-1 flex-row items-center gap-2":"flex-col gap-1"),children:[o&&H.jsx("label",{className:m,htmlFor:n,"aria-describedby":h?"caption":"",children:o}),h&&H.jsx("span",{id:"caption",className:me("dial-tiny-text text-secondary",g&&"ml-auto"),children:h})]})]}),i&&s&&H.jsx("div",{id:f,className:w,children:s})]})},Fd=({icon:e,title:t,description:o,containerClassName:s,titleClassName:i,descriptionClassName:n})=>H.jsxs("div",{className:Mt.mergeClasses("h-full w-full flex flex-col items-center justify-center text-secondary",s),"aria-label":"no-data-container",children:[e||H.jsx(vn.IconClipboardX,{width:60,height:60,stroke:.5}),H.jsx("span",{className:Mt.mergeClasses("dial-small-text mt-2 text-primary",i),"aria-label":"no-results-title",children:t}),o&&H.jsx("span",{className:Mt.mergeClasses("mt-1 text-primary",n),"aria-label":"no-results-description",children:o})]});function he(e){if(e?.length)return e[e.length-1]}function ho(e,t,o){if(e===t)return!0;if(!e||!t)return e==null&&t==null;const s=e.length;if(s!==t.length)return!1;for(let i=0;i<s;i++)if(e[i]!==t[i]&&!o?.(e[i],t[i]))return!1;return!0}function Ts(e,t){if(e){for(const o of e)if(t(o))return!0}}function At(e,t){const o=e.indexOf(t);o>=0&&e.splice(o,1)}function yp(e,t){let o=0,s=0;for(;o<e.length;o++)t.includes(e[o])||(e[s]=e[o],s++);for(;s<e.length;)e.pop()}function Pl(e,t,o){for(let s=0;s<t.length;s++)At(e,t[s]);for(let s=t.length-1;s>=0;s--)e.splice(o,0,t[s])}var Nt=e=>e==null||e===""?null:e;function L(e){return e!=null&&e!==""}function we(e){return!L(e)}var Rr=e=>e!=null&&typeof e.toString=="function"?e.toString():null,js=(e,t)=>{const o=e?JSON.stringify(e):null,s=t?JSON.stringify(t):null;return o===s},Rp=(e,t,o=!1)=>e==null?t==null?0:-1:t==null?1:(typeof e=="object"&&e.toNumber&&(e=e.toNumber()),typeof t=="object"&&t.toNumber&&(t=t.toNumber()),!o||typeof e!="string"?e>t?1:e<t?-1:0:e.localeCompare(t)),Ao=class{constructor(){this.allSyncListeners=new Map,this.allAsyncListeners=new Map,this.globalSyncListeners=new Set,this.globalAsyncListeners=new Set,this.asyncFunctionsQueue=[],this.scheduled=!1,this.firedEvents={}}setFrameworkOverrides(e){this.frameworkOverrides=e}getListeners(e,t,o){const s=t?this.allAsyncListeners:this.allSyncListeners;let i=s.get(e);return!i&&o&&(i=new Set,s.set(e,i)),i}noRegisteredListenersExist(){return this.allSyncListeners.size===0&&this.allAsyncListeners.size===0&&this.globalSyncListeners.size===0&&this.globalAsyncListeners.size===0}addEventListener(e,t,o=!1){this.getListeners(e,o,!0).add(t)}removeEventListener(e,t,o=!1){const s=this.getListeners(e,o,!1);s&&(s.delete(t),s.size===0&&(o?this.allAsyncListeners:this.allSyncListeners).delete(e))}addGlobalListener(e,t=!1){this.getGlobalListeners(t).add(e)}removeGlobalListener(e,t=!1){this.getGlobalListeners(t).delete(e)}dispatchEvent(e){this.dispatchToListeners(e,!0),this.dispatchToListeners(e,!1),this.firedEvents[e.type]=!0}dispatchEventOnce(e){this.firedEvents[e.type]||this.dispatchEvent(e)}dispatchToListeners(e,t){const o=e.type;if(t&&"event"in e){const a=e.event;a instanceof Event&&(e.eventPath=a.composedPath())}const{frameworkOverrides:s}=this,i=a=>{const l=s?()=>s.wrapIncoming(a):a;t?this.dispatchAsync(l):l()},n=this.getListeners(o,t,!1);if((n?.size??0)>0){const a=new Set(n);for(const l of a)n?.has(l)&&i(()=>l(e))}const r=this.getGlobalListeners(t);if(r.size>0){const a=new Set(r);for(const l of a)i(()=>l(o,e))}}getGlobalListeners(e){return e?this.globalAsyncListeners:this.globalSyncListeners}dispatchAsync(e){if(this.asyncFunctionsQueue.push(e),!this.scheduled){const t=()=>{window.setTimeout(this.flushAsyncQueue.bind(this),0)},o=this.frameworkOverrides;o?o.wrapIncoming(t):t(),this.scheduled=!0}}flushAsyncQueue(){this.scheduled=!1;const e=this.asyncFunctionsQueue.slice();this.asyncFunctionsQueue=[];for(const t of e)t()}},Fp=/[&<>"']/g,Ep={"&":"&","<":"<",">":">",'"':""","'":"'"};function Es(e){return e?.toString().toString()??null}function Hs(e){return Es(e)?.replace(Fp,t=>Ep[t])??null}function Dl(e){return typeof e=="string"&&e.startsWith("=")&&e.length>1}function xp(e){if(!e||e==null)return null;const t=/([a-z])([A-Z])/g,o=/([A-Z]+)([A-Z])([a-z])/g;return e.replace(t,"$1 $2").replace(o,"$1 $2$3").replace(/\./g," ").split(" ").map(i=>i.substring(0,1).toUpperCase()+(i.length>1?i.substring(1,i.length):"")).join(" ")}function gt(e){return e.eRootDiv.getRootNode()}function ve(e){return gt(e).activeElement}function Pe(e){const{gos:t,eRootDiv:o}=e;let s=null;const i=t.get("getDocument");return i&&L(i)?s=i():o&&(s=o.ownerDocument),s&&L(s)?s:document}function pa(e){const t=ve(e);return t===null||t===Pe(e).body}function fa(e){return Pe(e).defaultView||window}function ma(e){let t=null,o=null;try{t=Pe(e).fullscreenElement}catch{}finally{t||(t=gt(e));const s=t.querySelector("body");s?o=s:t instanceof ShadowRoot?o=t:t instanceof Document?o=t?.documentElement:o=t}return o}function Pp(e){return ma(e)?.clientWidth??(window.innerWidth||-1)}function Dp(e){return ma(e)?.clientHeight??(window.innerHeight||-1)}function wt(e,t,o){o==null||typeof o=="string"&&o==""?Ed(e,t):bt(e,t,o)}function bt(e,t,o){e.setAttribute(xd(t),o.toString())}function Ed(e,t){e.removeAttribute(xd(t))}function xd(e){return`aria-${e}`}function ko(e,t){t?e.setAttribute("role",t):e.removeAttribute("role")}function Mp(e){const t=e?.direction;return t==="asc"?"ascending":t==="desc"?"descending":t==="mixed"?"other":"none"}function Tp(e){return e.getAttribute("aria-label")}function Cs(e,t){wt(e,"label",t)}function Ys(e,t){wt(e,"labelledby",t)}function Pd(e,t){wt(e,"live",t)}function Ip(e,t){wt(e,"atomic",t)}function Ap(e,t){wt(e,"relevant",t)}function Ca(e,t){wt(e,"invalid",t)}function kp(e,t){wt(e,"disabled",t)}function Dd(e,t){wt(e,"hidden",t)}function Fr(e,t){bt(e,"expanded",t)}function Lp(e,t){bt(e,"setsize",t)}function Op(e,t){bt(e,"posinset",t)}function Gp(e,t){bt(e,"rowcount",t)}function va(e,t){bt(e,"rowindex",t)}function Hp(e,t){bt(e,"rowspan",t)}function Bp(e,t){bt(e,"colcount",t)}function Md(e,t){bt(e,"colindex",t)}function Vp(e,t){bt(e,"colspan",t)}function Np(e,t){bt(e,"sort",t)}function Wp(e){Ed(e,"sort")}function Td(e,t){wt(e,"selected",t)}function zp(e,t){wt(e,"controls",t)}function _p(e,t){zp(e,t.id),Ys(t,e.id)}function Ml(e,t){wt(e,"owns",t)}function bn(e,t){return t===void 0?e("ariaIndeterminate","indeterminate"):t===!0?e("ariaChecked","checked"):e("ariaUnchecked","unchecked")}var Up="[tabindex], input, select, button, textarea, [href]",Id="[disabled], .ag-disabled:not(.ag-button), .ag-disabled *";function Bs(e){return!e||!e.matches("input, select, button, textarea")||!e.matches(Id)?!1:vt(e)}function fe(e,t,o={}){const{skipAriaHidden:s}=o;e.classList.toggle("ag-hidden",!t),s||Dd(e,!t)}function $p(e,t,o={}){const{skipAriaHidden:s}=o;e.classList.toggle("ag-invisible",!t),s||Dd(e,!t)}function Qs(e,t){const o="disabled",s=t?n=>n.setAttribute(o,""):n=>n.removeAttribute(o);s(e);const i=e.querySelectorAll("input")??[];for(const n of i)s(n)}function Eo(e,t,o){let s=0;for(;e;){if(e.classList.contains(t))return!0;if(e=e.parentElement,typeof o=="number"){if(++s>o)break}else if(e===o)break}return!1}function _o(e){const{height:t,width:o,borderTopWidth:s,borderRightWidth:i,borderBottomWidth:n,borderLeftWidth:r,paddingTop:a,paddingRight:l,paddingBottom:c,paddingLeft:d,marginTop:u,marginRight:h,marginBottom:g,marginLeft:f,boxSizing:m}=window.getComputedStyle(e),C=Number.parseFloat;return{height:C(t||"0"),width:C(o||"0"),borderTopWidth:C(s||"0"),borderRightWidth:C(i||"0"),borderBottomWidth:C(n||"0"),borderLeftWidth:C(r||"0"),paddingTop:C(a||"0"),paddingRight:C(l||"0"),paddingBottom:C(c||"0"),paddingLeft:C(d||"0"),marginTop:C(u||"0"),marginRight:C(h||"0"),marginBottom:C(g||"0"),marginLeft:C(f||"0"),boxSizing:m}}function wa(e){const t=_o(e);return t.boxSizing==="border-box"?t.height-t.paddingTop-t.paddingBottom-t.borderTopWidth-t.borderBottomWidth:t.height}function Zs(e){const t=_o(e);return t.boxSizing==="border-box"?t.width-t.paddingLeft-t.paddingRight-t.borderLeftWidth-t.borderRightWidth:t.width}function Ad(e){const{height:t,marginBottom:o,marginTop:s}=_o(e);return Math.floor(t+o+s)}function _i(e){const{width:t,marginLeft:o,marginRight:s}=_o(e);return Math.floor(t+o+s)}function kd(e){const t=e.getBoundingClientRect(),{borderTopWidth:o,borderLeftWidth:s,borderRightWidth:i,borderBottomWidth:n}=_o(e);return{top:t.top+(o||0),left:t.left+(s||0),right:t.right+(i||0),bottom:t.bottom+(n||0)}}function Ui(e,t){let o=e.scrollLeft;return t&&(o=Math.abs(o)),o}function $i(e,t,o){o&&(t*=-1),e.scrollLeft=t}function Xe(e){for(;e?.firstChild;)e.firstChild.remove()}function _t(e){e?.parentNode&&e.remove()}function Ld(e){return!!e.offsetParent}function vt(e){return e.checkVisibility?e.checkVisibility({checkVisibilityCSS:!0}):!(!Ld(e)||window.getComputedStyle(e).visibility!=="visible")}function ba(e){const t=document.createElement("div");return t.innerHTML=(e||"").trim(),t.firstChild}function Js(e){return()=>{const t=e();return t?Od(t)||Kp(t):!0}}function Od(e){return e.clientWidth<e.scrollWidth}function Kp(e){return e.clientHeight<e.scrollHeight}function Ki(e,t){t==="flex"?(e.style.removeProperty("width"),e.style.removeProperty("minWidth"),e.style.removeProperty("maxWidth"),e.style.flex="1 1 auto"):Tt(e,t)}function Tt(e,t){t=Sa(t),e.style.width=t,e.style.maxWidth=t,e.style.minWidth=t}function Vs(e,t){t=Sa(t),e.style.height=t,e.style.maxHeight=t,e.style.minHeight=t}function Sa(e){return typeof e=="number"?`${e}px`:e}function ya(e){return e instanceof Node||e instanceof HTMLElement}function Qe(e,t,o){o==null||o===""?e.removeAttribute(t):e.setAttribute(t,o.toString())}function qp(e,t){if(!t.isContentEditable)return;const o=fa(e).getSelection();if(!o)return;const s=Pe(e).createRange();s.selectNodeContents(t),s.collapse(!1),o.removeAllRanges(),o.addRange(s)}function Kt(e,t,o){const i=fa(e).ResizeObserver,n=i?new i(o):null;return n?.observe(t),()=>n?.disconnect()}function qt(e,t){const o=fa(e);o.requestAnimationFrame?o.requestAnimationFrame(t):o.webkitRequestAnimationFrame?o.webkitRequestAnimationFrame(t):o.setTimeout(t,0)}var Gd="data-ref",Bn;function Tl(){return Bn??(Bn=document.createTextNode(" ")),Bn.cloneNode()}function Lo(e){const{attrs:t,children:o,cls:s,ref:i,role:n,tag:r}=e,a=document.createElement(r);if(s&&(a.className=s),i&&a.setAttribute(Gd,i),n&&a.setAttribute("role",n),t)for(const l of Object.keys(t))a.setAttribute(l,t[l]);if(o)if(typeof o=="string")a.textContent=o;else{let l=!0;for(const c of o)c&&(typeof c=="string"?(a.appendChild(document.createTextNode(c)),l=!1):typeof c=="function"?a.appendChild(c()):(l&&(a.appendChild(Tl()),l=!1),a.append(Lo(c)),a.appendChild(Tl())))}return a}var jp=["touchstart","touchend","touchmove","touchcancel","scroll"],Yp=["wheel"],Vn={},qi=(()=>{const e={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return o=>{if(typeof Vn[o]=="boolean")return Vn[o];const s=document.createElement(e[o]||"div");return o="on"+o,Vn[o]=o in s}})();function Qp(e,t){return!t||!e?!1:Jp(t).indexOf(e)>=0}function Zp(e){const t=[];let o=e.target;for(;o;)t.push(o),o=o.parentElement;return t}function Jp(e){const t=e;return t.path?t.path:t.composedPath?t.composedPath():Zp(t)}function Xp(e,t,o){const s=ef(t);let i;s!=null&&(i={passive:s}),e.addEventListener(t,o,i)}var ef=e=>{const t=jp.includes(e),o=Yp.includes(e);if(t)return!0;if(o)return!1};function Hd(e,t,o){if(o===0)return!1;const s=Math.abs(e.clientX-t.clientX),i=Math.abs(e.clientY-t.clientY);return Math.max(s,i)<=o}var rs=(e,t)=>{const o=e.identifier;for(let s=0,i=t.length;s<i;++s){const n=t[s];if(n.identifier===o)return n}return null};function Xs(e,t){return e.gos.isElementInThisInstance(t.target)}function tf(e,t,o){const i=e.getBoundingClientRect().height,n=Pp(o)-2,r=Dp(o)-2;if(!e.offsetParent)return;const l=kd(e.offsetParent),{clientY:c,clientX:d}=t;let u=c-l.top-i/2,h=d-l.left-10;const g=Pe(o),f=g.defaultView||window,m=f.pageYOffset||g.documentElement.scrollTop,C=f.pageXOffset||g.documentElement.scrollLeft;n>0&&h+e.clientWidth>n+C&&(h=n+C-e.clientWidth),h<0&&(h=0),r>0&&u+e.clientHeight>r+m&&(u=r+m-e.clientHeight),u<0&&(u=0),e.style.left=`${h}px`,e.style.top=`${u}px`}var Di=(e,...t)=>{for(const o of t){const[s,i,n,r]=o;s.addEventListener(i,n,r),e.push(o)}},Ra=e=>{if(e){for(const[t,o,s,i]of e)t.removeEventListener(o,s,i);e.length=0}},to=e=>{e.cancelable&&e.preventDefault()};function of(e,t){return t}function Bd(e){return e?.getLocaleTextFunc()??of}function sf(e,t,o,s){const i=t[o];return e.getLocaleTextFunc()(o,typeof i=="function"?i(s):i,s)}function nf(e){return(t,o,s)=>e({key:t,defaultValue:o,variableValues:s})}function rf(e){return(t,o,s)=>{let i=e?.[t];if(i&&s?.length){let n=0;for(;!(n>=s.length||i.indexOf("${variable}")===-1);)i=i.replace("${variable}",s[n++])}return i??o}}var qe=class{constructor(){this.destroyFunctions=[],this.destroyed=!1,this.__v_skip=!0,this.propertyListenerId=0,this.lastChangeSetIdLookup={},this.isAlive=()=>!this.destroyed}preWireBeans(e){this.beans=e,this.stubContext=e.context,this.eventSvc=e.eventSvc,this.gos=e.gos}destroy(){const{destroyFunctions:e}=this;for(let t=0;t<e.length;t++)e[t]();e.length=0,this.destroyed=!0,this.dispatchLocalEvent({type:"destroyed"})}addEventListener(e,t,o){this.localEventService||(this.localEventService=new Ao),this.localEventService.addEventListener(e,t,o)}removeEventListener(e,t,o){this.localEventService?.removeEventListener(e,t,o)}dispatchLocalEvent(e){this.localEventService?.dispatchEvent(e)}addManagedElementListeners(e,t){return this._setupListeners(e,t)}addManagedEventListeners(e){return this._setupListeners(this.eventSvc,e)}addManagedListeners(e,t){return this._setupListeners(e,t)}_setupListeners(e,t){const o=[];for(const s of Object.keys(t)){const i=t[s];i&&o.push(this._setupListener(e,s,i))}return o}_setupListener(e,t,o){if(this.destroyed)return()=>null;let s;if(af(e))e.__addEventListener(t,o),s=()=>(e.__removeEventListener(t,o),null);else{const i=lf(e);e instanceof HTMLElement?Xp(e,t,o):i?e.addListener(t,o):e.addEventListener(t,o),s=i?()=>(e.removeListener(t,o),null):()=>(e.removeEventListener(t,o),null)}return this.destroyFunctions.push(s),()=>(s(),this.destroyFunctions=this.destroyFunctions.filter(i=>i!==s),null)}setupPropertyListener(e,t){const{gos:o}=this;o.addPropertyEventListener(e,t);const s=()=>(o.removePropertyEventListener(e,t),null);return this.destroyFunctions.push(s),()=>(s(),this.destroyFunctions=this.destroyFunctions.filter(i=>i!==s),null)}addManagedPropertyListener(e,t){return this.destroyed?()=>null:this.setupPropertyListener(e,t)}addManagedPropertyListeners(e,t){if(this.destroyed)return;const o=e.join("-")+this.propertyListenerId++,s=i=>{if(i.changeSet){if(i.changeSet&&i.changeSet.id===this.lastChangeSetIdLookup[o])return;this.lastChangeSetIdLookup[o]=i.changeSet.id}const n={type:"propertyChanged",changeSet:i.changeSet,source:i.source};t(n)};for(const i of e)this.setupPropertyListener(i,s)}getLocaleTextFunc(){return Bd(this.beans.localeSvc)}addDestroyFunc(e){this.isAlive()?this.destroyFunctions.push(e):e()}createOptionalManagedBean(e,t){return e?this.createManagedBean(e,t):void 0}createManagedBean(e,t){const o=this.createBean(e,t);return this.addDestroyFunc(this.destroyBean.bind(this,e,t)),o}createBean(e,t,o){return(t||this.stubContext).createBean(e,o)}destroyBean(e,t){return(t||this.stubContext).destroyBean(e)}destroyBeans(e,t){return(t||this.stubContext).destroyBeans(e)}};function af(e){return e.__addEventListener!==void 0}function lf(e){return e.eventServiceType==="global"}var x=class extends qe{},Er=new Set,Sn=(e,t)=>{Er.has(t)||(Er.add(t),e())};Sn._set=Er;var cf={pending:!1,funcs:[]},df={pending:!1,funcs:[]};function xr(e,t="setTimeout",o){const s=t==="raf"?df:cf;if(s.funcs.push(e),s.pending)return;s.pending=!0;const i=()=>{const n=s.funcs.slice();s.funcs.length=0,s.pending=!1;for(const r of n)r()};t==="raf"?qt(o,i):window.setTimeout(i,0)}function xe(e,t,o){let s;return function(...i){const n=this;return window.clearTimeout(s),s=window.setTimeout(function(){e.isAlive()&&t.apply(n,i)},o),s}}function Il(e,t){let o=0;return function(...s){const i=this,n=Date.now();n-o<t||(o=n,e.apply(i,s))}}function uf(e,t,o,s=100){const i=Date.now();let n=null,r=!1;const a=()=>{n!=null&&(window.clearInterval(n),n=null)};e.addDestroyFunc(a);const l=()=>{const c=Date.now()-i>s;(t()||c)&&(o(),r=!0,a())};l(),r||(n=window.setInterval(l,10))}var Vd=new Set(["__proto__","constructor","prototype"]);function hf(e,t){if(e!=null){if(Array.isArray(e)){for(let o=0;o<e.length;o++)t(o.toString(),e[o]);return}for(const o of Object.keys(e).filter(s=>!Vd.has(s)))t(o,e[o])}}function _e(e,t,o=!0,s=!1){L(t)&&hf(t,(i,n)=>{let r=e[i];r!==n&&(s&&r==null&&n!=null&&typeof n=="object"&&n.constructor===Object&&(r={},e[i]=r),Al(n)&&Al(r)&&!Array.isArray(r)?_e(r,n,o,s):(o||n!==void 0)&&(e[i]=n))})}function Al(e){return typeof e=="object"&&e!==null}var Fa=class Gt{static applyGlobalGridOptions(t){if(!Gt.gridOptions)return{...t};let o={};return _e(o,Gt.gridOptions,!0,!0),Gt.mergeStrategy==="deep"?_e(o,t,!0,!0):o={...o,...t},Gt.gridOptions.context&&(o.context=Gt.gridOptions.context),t.context&&(Gt.mergeStrategy==="deep"&&o.context&&_e(t.context,o.context,!0,!0),o.context=t.context),o}static applyGlobalGridOption(t,o){if(Gt.mergeStrategy==="deep"){const s=Nd(t);if(s&&typeof s=="object"&&typeof o=="object")return Gt.applyGlobalGridOptions({[t]:o})[t]}return o}};Fa.gridOptions=void 0;Fa.mergeStrategy="shallow";var Ea=Fa;function Nd(e){return Ea.gridOptions?.[e]}var Wd={suppressContextMenu:!1,preventDefaultOnContextMenu:!1,allowContextMenuWithControlKey:!1,suppressMenuHide:!0,enableBrowserTooltips:!1,tooltipTrigger:"hover",tooltipShowDelay:2e3,tooltipSwitchShowDelay:200,tooltipHideDelay:1e4,tooltipMouseTrack:!1,tooltipShowMode:"standard",tooltipInteraction:!1,copyHeadersToClipboard:!1,copyGroupHeadersToClipboard:!1,clipboardDelimiter:" ",suppressCopyRowsToClipboard:!1,suppressCopySingleCellRanges:!1,suppressLastEmptyLineOnPaste:!1,suppressClipboardPaste:!1,suppressClipboardApi:!1,suppressCutToClipboard:!1,maintainColumnOrder:!1,enableStrictPivotColumnOrder:!1,suppressFieldDotNotation:!1,allowDragFromColumnsToolPanel:!1,suppressMovableColumns:!1,suppressColumnMoveAnimation:!1,suppressMoveWhenColumnDragging:!1,suppressDragLeaveHidesColumns:!1,suppressRowGroupHidesColumns:!1,suppressAutoSize:!1,autoSizePadding:20,skipHeaderOnAutoSize:!1,singleClickEdit:!1,suppressClickEdit:!1,readOnlyEdit:!1,stopEditingWhenCellsLoseFocus:!1,enterNavigatesVertically:!1,enterNavigatesVerticallyAfterEdit:!1,enableCellEditingOnBackspace:!1,undoRedoCellEditing:!1,undoRedoCellEditingLimit:10,suppressCsvExport:!1,suppressExcelExport:!1,cacheQuickFilter:!1,includeHiddenColumnsInQuickFilter:!1,excludeChildrenWhenTreeDataFiltering:!1,enableAdvancedFilter:!1,includeHiddenColumnsInAdvancedFilter:!1,enableCharts:!1,masterDetail:!1,keepDetailRows:!1,keepDetailRowsCount:10,detailRowAutoHeight:!1,tabIndex:0,rowBuffer:10,valueCache:!1,valueCacheNeverExpires:!1,enableCellExpressions:!1,suppressTouch:!1,suppressFocusAfterRefresh:!1,suppressBrowserResizeObserver:!1,suppressPropertyNamesCheck:!1,suppressChangeDetection:!1,debug:!1,suppressLoadingOverlay:!1,suppressNoRowsOverlay:!1,pagination:!1,paginationPageSize:100,paginationPageSizeSelector:!0,paginationAutoPageSize:!1,paginateChildRows:!1,suppressPaginationPanel:!1,pivotMode:!1,pivotPanelShow:"never",pivotDefaultExpanded:0,pivotSuppressAutoColumn:!1,suppressExpandablePivotGroups:!1,functionsReadOnly:!1,suppressAggFuncInHeader:!1,alwaysAggregateAtRootLevel:!1,aggregateOnlyChangedColumns:!1,suppressAggFilteredOnly:!1,removePivotHeaderRowWhenSingleValueColumn:!1,animateRows:!0,cellFlashDuration:500,cellFadeDuration:1e3,allowShowChangeAfterFilter:!1,domLayout:"normal",ensureDomOrder:!1,enableRtl:!1,suppressColumnVirtualisation:!1,suppressMaxRenderedRowRestriction:!1,suppressRowVirtualisation:!1,rowDragManaged:!1,refreshAfterGroupEdit:!1,rowDragInsertDelay:500,suppressRowDrag:!1,suppressMoveWhenRowDragging:!1,rowDragEntireRow:!1,rowDragMultiRow:!1,embedFullWidthRows:!1,groupDisplayType:"singleColumn",groupDefaultExpanded:0,groupMaintainOrder:!1,groupSelectsChildren:!1,groupSuppressBlankHeader:!1,groupSelectsFiltered:!1,showOpenedGroup:!1,groupRemoveSingleChildren:!1,groupRemoveLowestSingleChildren:!1,groupHideOpenParents:!1,groupHideColumnsUntilExpanded:!1,groupAllowUnbalanced:!1,rowGroupPanelShow:"never",suppressMakeColumnVisibleAfterUnGroup:!1,treeData:!1,rowGroupPanelSuppressSort:!1,suppressGroupRowsSticky:!1,rowModelType:"clientSide",asyncTransactionWaitMillis:50,suppressModelUpdateAfterUpdateTransaction:!1,cacheOverflowSize:1,infiniteInitialRowCount:1,serverSideInitialRowCount:1,cacheBlockSize:100,maxBlocksInCache:-1,maxConcurrentDatasourceRequests:2,blockLoadDebounceMillis:0,purgeClosedRowNodes:!1,serverSideSortAllLevels:!1,serverSideOnlyRefreshFilteredGroups:!1,serverSidePivotResultFieldSeparator:"_",viewportRowModelPageSize:5,viewportRowModelBufferSize:5,alwaysShowHorizontalScroll:!1,alwaysShowVerticalScroll:!1,debounceVerticalScrollbar:!1,suppressHorizontalScroll:!1,suppressScrollOnNewData:!1,suppressScrollWhenPopupsAreOpen:!1,suppressAnimationFrame:!1,suppressMiddleClickScrolls:!1,suppressPreventDefaultOnMouseWheel:!1,rowMultiSelectWithClick:!1,suppressRowDeselection:!1,suppressRowClickSelection:!1,suppressCellFocus:!1,suppressHeaderFocus:!1,suppressMultiRangeSelection:!1,enableCellTextSelection:!1,enableRangeSelection:!1,enableRangeHandle:!1,enableFillHandle:!1,fillHandleDirection:"xy",suppressClearOnFillReduction:!1,accentedSort:!1,unSortIcon:!1,suppressMultiSort:!1,alwaysMultiSort:!1,suppressMaintainUnsortedOrder:!1,suppressRowHoverHighlight:!1,suppressRowTransform:!1,columnHoverHighlight:!1,deltaSort:!1,enableGroupEdit:!1,groupLockGroupColumns:0,serverSideEnableClientSideSort:!1,suppressServerSideFullWidthLoadingRow:!1,pivotMaxGeneratedColumns:-1,columnMenu:"new",reactiveCustomComponents:!0,suppressSetFilterByDefault:!1,enableFilterHandlers:!1},zd="https://www.ag-grid.com";function Oo(e,t,...o){e.get("debug")&&console.log("AG Grid: "+t,...o)}function Ns(e,...t){Sn(()=>_d(e,...t),e+t?.join(""))}function as(e,...t){Sn(()=>gf(e,...t),e+t?.join(""))}function gf(e,...t){console.error("AG Grid: "+e,...t)}function _d(e,...t){console.warn("AG Grid: "+e,...t)}var Ud=new Set,ji={},xo={},Mi,$d=!1,Kd=!1,pf=!1;function ff(e){const[t,o]=e.version.split(".")||[],[s,i]=Mi.split(".")||[];return t===s&&o===i}function mf(e){Mi||(Mi=e.version);const t=s=>`You are using incompatible versions of AG Grid modules. Major and minor versions should always match across modules. ${s} Please update all modules to the same version.`;e.version?ff(e)||as(t(`'${e.moduleName}' is version ${e.version} but the other modules are version ${Mi}.`)):as(t(`'${e.moduleName}' is incompatible.`));const o=e.validate?.();o&&!o.isValid&&as(`${o.message}`)}function ei(e,t,o=!1){o||($d=!0),mf(e);const s=e.rowModels??["all"];Ud.add(e);let i;t!==void 0?(Kd=!0,xo[t]===void 0&&(xo[t]={}),i=xo[t]):i=ji;for(const n of s)i[n]===void 0&&(i[n]={}),i[n][e.moduleName]=e;if(e.dependsOn)for(const n of e.dependsOn)ei(n,t,o)}function Cf(e){delete xo[e]}function Pr(e,t,o){const s=i=>!!ji[i]?.[e]||!!xo[t]?.[i]?.[e];return s(o)||s("all")}function xa(){return Kd}function vf(e,t){const o=xo[e]??{};return[...Object.values(ji.all??{}),...Object.values(o.all??{}),...Object.values(ji[t]??{}),...Object.values(o[t]??{})]}function wf(){return new Set(Ud)}function bf(e,t){const o=xo[e]??{};return[...Object.values(o.all??{}),...Object.values(o[t]??{})]}function Sf(){return $d}function qd(){return pf}var jd=class{static register(e){ei(e,void 0)}static registerModules(e){for(const t of e)ei(t,void 0)}};function Yd(e){for(const t of e){if("setLicenseKey"in t)return t;if(t.dependsOn){const o=Yd(t.dependsOn);if(o)return o}}}var I="35.2.1",kl=2e3,Ll=100,Qd="_version_",Zd=null,ls=`${zd}/javascript-data-grid`;function yf(e){Zd=e}function Rf(e){ls=e}function Jd(e,t,o){return Zd?.(e,t)??[Pf(e,t,o)]}function Pa(e,t,o,s,i){e(`${s?"warning":"error"} #${t}`,...Jd(t,o,i))}function Ff(e){if(!e)return String(e);const t={};for(const o of Object.keys(e))typeof e[o]!="object"&&typeof e[o]!="function"&&(t[o]=e[o]);return JSON.stringify(t)}function Ef(e){let t=e;return e instanceof Error?t=e.toString():typeof e=="object"&&(t=Ff(e)),t}function Ti(e){return e===void 0?"undefined":e===null?"null":e}function Dr(e,t){return`${e}?${t.toString()}`}function xf(e,t,o){const s=Array.from(t.entries()).sort((n,r)=>r[1].length-n[1].length);let i=Dr(e,t);for(const[n,r]of s){if(n===Qd)continue;const a=i.length-o;if(a<=0)break;const l="...",c=a+l.length,d=r.length-c>Ll?r.slice(0,r.length-c)+l:r.slice(0,Ll)+l;t.set(n,d),i=Dr(e,t)}return i}function Xd(e,t){const o=new URLSearchParams;if(o.append(Qd,I),t)for(const n of Object.keys(t))o.append(n,Ef(t[n]));const s=`${ls}/errors/${e}`,i=Dr(s,o);return i.length<=kl?i:xf(s,o,kl)}var Pf=(e,t,o)=>{const s=Xd(e,t);return`${`${o?o+`
|
|
2
|
+
`:""}Visit ${s}`}${o?"":`
|
|
3
|
+
Alternatively register the ValidationModule to see the full message in the console.`}`};function D(...e){Pa(Ns,e[0],e[1],!0)}function ce(...e){Pa(as,e[0],e[1],!1)}function Ls(e,t,o){Pa(as,e,t,!1,o)}function Df(e,t){const o=t[0];return`error #${o} `+Jd(o,t[1],e).join(" ")}function It(...e){return Df(void 0,e)}function eu(e,t){return e.get("rowModelType")===t}function Se(e,t){return eu(e,"clientSide")}function xs(e,t){return eu(e,"serverSide")}function Le(e,t){return e.get("domLayout")===t}function Po(e){return Zi(e)!==void 0}function tu(e){return typeof e.get("getRowHeight")=="function"}function Mf(e,t){return t?!e.get("enableStrictPivotColumnOrder"):e.get("maintainColumnOrder")}function Tf({gos:e,formula:t}){const o=e.get("rowNumbers");return o||!!t?.active&&o!==!1}function ro(e,t,o=!1,s){const{gos:i,environment:n}=e;if(s==null&&(s=n.getDefaultRowHeight()),tu(i)){if(o)return{height:s,estimated:!0};const l={node:t,data:t.data},c=i.getCallback("getRowHeight")(l);if(Mr(c))return c===0&&D(23),{height:Math.max(1,c),estimated:!1}}if(t.detail&&i.get("masterDetail"))return If(i);const r=i.get("rowHeight");return{height:r&&Mr(r)?r:s,estimated:!1}}function If(e){if(e.get("detailRowAutoHeight"))return{height:1,estimated:!1};const t=e.get("detailRowHeight");return Mr(t)?{height:t,estimated:!1}:{height:300,estimated:!1}}function Do(e){const{environment:t,gos:o}=e,s=o.get("rowHeight");if(!s||we(s))return t.getDefaultRowHeight();const i=t.refreshRowHeightVariable();return i!==-1?i:(D(24),t.getDefaultRowHeight())}function Mr(e){return!isNaN(e)&&typeof e=="number"&&isFinite(e)}function ou(e,t,o){const s=t[e.getDomDataKey()];return s?s[o]:void 0}function Go(e,t,o,s){const i=e.getDomDataKey();let n=t[i];we(n)&&(n={},t[i]=n),n[o]=s}function cs(e){return e.get("ensureDomOrder")?!1:e.get("animateRows")}function su(e){return!(e.get("paginateChildRows")||e.get("groupHideOpenParents")||Le(e,"print"))}function Bt(e){return!e.get("autoGroupColumnDef")?.comparator&&!e.get("treeData")}function Yi(e){const t=e.get("groupAggFiltering");if(typeof t=="function")return e.getCallback("groupAggFiltering");if(t===!0)return()=>!0}function iu(e){return e.get("grandTotalRow")}function Af(e){return e.get("groupHideOpenParents")?!0:e.get("groupDisplayType")==="multipleColumns"}function kf(e){return Af(e)&&e.get("groupHideColumnsUntilExpanded")&&Se(e)}function nu(e,t){return t?!1:e.get("groupDisplayType")==="groupRows"}function ru(e,t,o){return!!t.group&&!t.footer&&nu(e,o)}function vs(e){const t=e.getCallback("getRowId");return t===void 0?t:o=>{let s=t(o);return typeof s!="string"&&(Sn(()=>D(25,{id:s}),"getRowIdString"),s=String(s)),s}}function Lf(e,t){const o=e.get("groupHideParentOfSingleChild");return!!(o===!0||o==="leafGroupsOnly"&&t.leafGroup||e.get("groupRemoveSingleChildren")||e.get("groupRemoveLowestSingleChildren")&&t.leafGroup)}function Of(e){const t=e.get("maxConcurrentDatasourceRequests");return t>0?t:void 0}function ds(e){return e?.checkboxes??!0}function Ii(e){return e?.mode==="multiRow"&&(e.headerCheckbox??!0)}function Qi(e){if(typeof e=="object")return e.checkboxLocation??"selectionColumn"}function Nn(e){return e?.hideDisabledCheckboxes??!1}function Gf(e){return typeof e.get("rowSelection")!="string"}function ao(e){const t=e.get("cellSelection");return t!==void 0?!!t:e.get("enableRangeSelection")}function us(e){const t=e.get("cellSelection")??!1;return(typeof t=="object"&&t.enableColumnSelection)??!1}function au(e){const t=e.get("rowSelection")??"single";if(typeof t=="string"){const o=e.get("suppressRowClickSelection"),s=e.get("suppressRowDeselection");return o&&s?!1:o?"enableDeselection":s?"enableSelection":!0}return t.mode==="singleRow"||t.mode==="multiRow"?t.enableClickSelection??!1:!1}function Hf(e){const t=au(e);return t===!0||t==="enableSelection"}function Bf(e){const t=au(e);return t===!0||t==="enableDeselection"}function Tr(e){const t=e.get("rowSelection");return typeof t=="string"?e.get("isRowSelectable"):t?.isRowSelectable}function Zi(e){const t="beanName"in e&&e.beanName==="gos"?e.get("rowSelection"):e.rowSelection;if(typeof t=="string")switch(t){case"multiple":return"multiRow";case"single":return"singleRow";default:return}switch(t?.mode){case"multiRow":case"singleRow":return t.mode;default:return}}function Ji(e){return Zi(e)==="multiRow"}function Vf(e){const t=e.get("rowSelection");return typeof t=="string"?e.get("rowMultiSelectWithClick"):t?.enableSelectionWithoutKeys??!1}function Xi(e){const t=e.get("rowSelection");if(typeof t=="string"){const o=e.get("groupSelectsChildren"),s=e.get("groupSelectsFiltered");return o&&s?"filteredDescendants":o?"descendants":"self"}return t?.mode==="multiRow"?t.groupSelects:void 0}function lu(e,t=!0){const o=e.get("rowSelection");return typeof o!="object"?t?"all":void 0:o.mode==="multiRow"?o.selectAll:"all"}function Nf(e){const t=e.get("rowSelection");return typeof t=="string"?!1:t?.mode==="multiRow"?t.ctrlASelectsRows??!1:!1}function ti(e){const t=Xi(e);return t==="descendants"||t==="filteredDescendants"}function Ol(e){const t=e.get("rowSelection");return typeof t=="object"&&t.masterSelects||"self"}function Wf(e){return e.isModuleRegistered("SetFilter")&&!e.get("suppressSetFilterByDefault")}function Ze(e){return e.get("columnMenu")==="legacy"}function zf(e){return!Ze(e)}function _f(e){return!e||e.length<2?e:"on"+e[0].toUpperCase()+e.substring(1)}function Uf(e,t,o){typeof e!="object"&&(e={});const s={...e};for(const i of o){const n=t[i];typeof n<"u"&&(s[i]=n)}return s}function $f(e,t){if(!e)return;const o={};let s=!1;for(const r of Object.keys(e))o[r]=e[r],s=!0;if(!s)return;const i={type:"gridOptionsChanged",options:o};t.dispatchEvent(i);const n={type:"componentStateChanged",...o};t.dispatchEvent(n)}function K(e,t){return e.addCommon(t)}function Ai(e,t){return e[t]??e.gridOptions?.[t]??Nd(t)??Wd[t]}function Kf({gos:e},t){return t.button===2||t.ctrlKey&&e.get("allowContextMenuWithControlKey")}var qf={resizable:!0,sortable:!0},jf=0;function cu(){return jf++}function lo(e){return e instanceof Uo}var Yf=["asc","desc",null],Qf=[{type:"absolute",direction:"asc"},{type:"absolute",direction:"desc"},null],Uo=class extends x{constructor(e,t,o,s){super(),this.colDef=e,this.userProvidedColDef=t,this.colId=o,this.primary=s,this.isColumn=!0,this.instanceId=cu(),this.autoHeaderHeight=null,this.sortDef=ct(),this._wasSortExplicitlyRemoved=!1,this.moving=!1,this.resizing=!1,this.menuVisible=!1,this.formulaRef=null,this.lastLeftPinned=!1,this.firstRightPinned=!1,this.filterActive=!1,this.colEventSvc=new Ao,this.tooltipEnabled=!1,this.rowGroupActive=!1,this.pivotActive=!1,this.aggregationActive=!1,this.flex=null,this.colIdSanitised=Hs(o)}destroy(){super.destroy(),this.beans.rowSpanSvc?.deregister(this)}getInstanceId(){return this.instanceId}initState(){const{colDef:e,beans:{sortSvc:t,pinnedCols:o,colFlex:s}}=this;t?.initCol(this);const i=e.hide;i!==void 0?this.visible=!i:this.visible=!e.initialHide,o?.initCol(this),s?.initCol(this)}setColDef(e,t,o){const s=e.spanRows!==this.colDef.spanRows;this.colDef=e,this.userProvidedColDef=t,this.initMinAndMaxWidths(),this.initDotNotation(),this.initTooltip(),s&&(this.beans.rowSpanSvc?.deregister(this),this.initRowSpan()),this.dispatchColEvent("colDefChanged",o)}getUserProvidedColDef(){return this.userProvidedColDef}getParent(){return this.parent}getOriginalParent(){return this.originalParent}postConstruct(){this.initState(),this.initMinAndMaxWidths(),this.resetActualWidth("gridInitializing"),this.initDotNotation(),this.initTooltip(),this.initRowSpan(),this.addPivotListener()}initDotNotation(){const{gos:e,colDef:{field:t,tooltipField:o}}=this,s=e.get("suppressFieldDotNotation");this.fieldContainsDots=L(t)&&t.includes(".")&&!s,this.tooltipFieldContainsDots=L(o)&&o.includes(".")&&!s}initMinAndMaxWidths(){const e=this.colDef;this.minWidth=e.minWidth??this.beans.environment.getDefaultColumnMinWidth(),this.maxWidth=e.maxWidth??Number.MAX_SAFE_INTEGER}initTooltip(){this.beans.tooltipSvc?.initCol(this)}initRowSpan(){this.colDef.spanRows&&this.beans.rowSpanSvc?.register(this)}addPivotListener(){const e=this.beans.pivotColDefSvc,t=this.colDef.pivotValueColumn;!e||!t||this.addManagedListeners(t,{colDefChanged:o=>{const s=e.recreateColDef(this.colDef);this.setColDef(s,s,o.source)}})}resetActualWidth(e){const t=this.calculateColInitialWidth(this.colDef);this.setActualWidth(t,e,!0)}calculateColInitialWidth(e){const t=e.width??e.initialWidth??200;return Math.max(Math.min(t,this.maxWidth),this.minWidth)}isEmptyGroup(){return!1}isRowGroupDisplayed(e){return this.beans.showRowGroupCols?.isRowGroupDisplayed(this,e)??!1}isPrimary(){return this.primary}isFilterAllowed(){return!!this.colDef.filter}isFieldContainsDots(){return this.fieldContainsDots}isTooltipEnabled(){return this.tooltipEnabled}isTooltipFieldContainsDots(){return this.tooltipFieldContainsDots}getHighlighted(){return this.highlighted}__addEventListener(e,t){this.colEventSvc.addEventListener(e,t)}__removeEventListener(e,t){this.colEventSvc.removeEventListener(e,t)}addEventListener(e,t){this.frameworkEventListenerService=this.beans.frameworkOverrides.createLocalEventListenerWrapper?.(this.frameworkEventListenerService,this.colEventSvc);const o=this.frameworkEventListenerService?.wrap(e,t)??t;this.colEventSvc.addEventListener(e,o)}removeEventListener(e,t){const o=this.frameworkEventListenerService?.unwrap(e,t)??t;this.colEventSvc.removeEventListener(e,o)}createColumnFunctionCallbackParams(e){return K(this.gos,{node:e,data:e.data,column:this,colDef:this.colDef})}isSuppressNavigable(e){return this.beans.cellNavigation?.isSuppressNavigable(this,e)??!1}isCellEditable(e){return this.beans.editSvc?.isCellEditable({rowNode:e,column:this})??!1}isSuppressFillHandle(){return!!this.colDef.suppressFillHandle}isAutoHeight(){return!!this.colDef.autoHeight}isAutoHeaderHeight(){return!!this.colDef.autoHeaderHeight}isRowDrag(e){return this.isColumnFunc(e,this.colDef.rowDrag)}isDndSource(e){return this.isColumnFunc(e,this.colDef.dndSource)}isCellCheckboxSelection(e){return this.beans.selectionSvc?.isCellCheckboxSelection(this,e)??!1}isSuppressPaste(e){return this.isColumnFunc(e,this.colDef?.suppressPaste??null)}isResizable(){return!!this.getColDefValue("resizable")}getColDefValue(e){return this.colDef[e]??qf[e]}isColumnFunc(e,t){if(typeof t=="boolean")return t;if(typeof t=="function"){const o=this.createColumnFunctionCallbackParams(e);return t(o)}return!1}createColumnEvent(e,t){return K(this.gos,{type:e,column:this,columns:[this],source:t})}isMoving(){return this.moving}getSort(){return this.sortDef.direction}getSortDef(){return this.sortDef.direction?this.sortDef:null}getColDefAllowedSortTypes(){const e=[],{sort:t,initialSort:o}=this.colDef,s=t===null?t:Ut(t?.type),i=o===null?o:Ut(o?.type);return s&&e.push(s),i&&e.push(i),e}getSortingOrder(){const e=this.getColDefAllowedSortTypes().includes("absolute")?Qf:Yf;return(this.colDef.sortingOrder??this.gos.get("sortingOrder")??e).map(t=>ct(t))}getAvailableSortTypes(){const e=this.getSortingOrder().reduce((t,o)=>(o.direction&&t.push(o.type),t),this.getColDefAllowedSortTypes());return new Set(e)}get wasSortExplicitlyRemoved(){return this._wasSortExplicitlyRemoved}setSortDef(e,t=!1){t||(this._wasSortExplicitlyRemoved=!e.direction),this.sortDef=e}isSortable(){return!!this.getColDefValue("sortable")}isSortAscending(){return this.getSort()==="asc"}isSortDescending(){return this.getSort()==="desc"}isSortNone(){return we(this.getSort())}isSorting(){return L(this.getSort())}getSortIndex(){return this.sortIndex}isMenuVisible(){return this.menuVisible}getAggFunc(){return this.aggFunc}getLeft(){return this.left}getOldLeft(){return this.oldLeft}getRight(){return this.left+this.actualWidth}setLeft(e,t){this.oldLeft=this.left,this.left!==e&&(this.left=e,this.dispatchColEvent("leftChanged",t))}isFilterActive(){return this.filterActive}isHovered(){return D(261),!!this.beans.colHover?.isHovered(this)}setFirstRightPinned(e,t){this.firstRightPinned!==e&&(this.firstRightPinned=e,this.dispatchColEvent("firstRightPinnedChanged",t))}setLastLeftPinned(e,t){this.lastLeftPinned!==e&&(this.lastLeftPinned=e,this.dispatchColEvent("lastLeftPinnedChanged",t))}isFirstRightPinned(){return this.firstRightPinned}isLastLeftPinned(){return this.lastLeftPinned}isPinned(){return this.pinned==="left"||this.pinned==="right"}isPinnedLeft(){return this.pinned==="left"}isPinnedRight(){return this.pinned==="right"}getPinned(){return this.pinned}setVisible(e,t){const o=e===!0;this.visible!==o&&(this.visible=o,this.dispatchColEvent("visibleChanged",t)),this.dispatchStateUpdatedEvent("hide")}isVisible(){return this.visible}isSpanHeaderHeight(){return!this.getColDef().suppressSpanHeaderHeight}getFirstRealParent(){let e=this.getOriginalParent();for(;e?.isPadding();)e=e.getOriginalParent();return e}getColumnGroupPaddingInfo(){let e=this.getParent();if(!e?.isPadding())return{numberOfParents:0,isSpanningTotal:!1};const t=e.getPaddingLevel()+1;let o=!0;for(;e;){if(!e.isPadding()){o=!1;break}e=e.getParent()}return{numberOfParents:t,isSpanningTotal:o}}getColDef(){return this.colDef}getDefinition(){return this.colDef}getColumnGroupShow(){return this.colDef.columnGroupShow}getColId(){return this.colId}getId(){return this.colId}getUniqueId(){return this.colId}getActualWidth(){return this.actualWidth}getAutoHeaderHeight(){return this.autoHeaderHeight}setAutoHeaderHeight(e){const t=e!==this.autoHeaderHeight;return this.autoHeaderHeight=e,t}createBaseColDefParams(e){return K(this.gos,{node:e,data:e.data,colDef:this.colDef,column:this})}getColSpan(e){if(we(this.colDef.colSpan))return 1;const t=this.createBaseColDefParams(e),o=this.colDef.colSpan(t);return Math.max(o,1)}getRowSpan(e){if(we(this.colDef.rowSpan))return 1;const t=this.createBaseColDefParams(e),o=this.colDef.rowSpan(t);return Math.max(o,1)}setActualWidth(e,t,o=!1){e=Math.max(e,this.minWidth),e=Math.min(e,this.maxWidth),this.actualWidth!==e&&(this.actualWidth=e,this.flex!=null&&t!=="flex"&&t!=="gridInitializing"&&(this.flex=null),o||this.fireColumnWidthChangedEvent(t)),this.dispatchStateUpdatedEvent("width")}fireColumnWidthChangedEvent(e){this.dispatchColEvent("widthChanged",e)}isGreaterThanMax(e){return e>this.maxWidth}getMinWidth(){return this.minWidth}getMaxWidth(){return this.maxWidth}getFlex(){return this.flex}isRowGroupActive(){return this.rowGroupActive}isPivotActive(){return this.pivotActive}isAnyFunctionActive(){return this.isPivotActive()||this.isRowGroupActive()||this.isValueActive()}isAnyFunctionAllowed(){return this.isAllowPivot()||this.isAllowRowGroup()||this.isAllowValue()}isValueActive(){return this.aggregationActive}isAllowPivot(){return this.colDef.enablePivot===!0}isAllowValue(){return this.colDef.enableValue===!0}isAllowRowGroup(){return this.colDef.enableRowGroup===!0}isAllowFormula(){return this.colDef.allowFormula===!0}dispatchColEvent(e,t,o){const s=this.createColumnEvent(e,t);o&&_e(s,o),this.colEventSvc.dispatchEvent(s)}dispatchStateUpdatedEvent(e){this.colEventSvc.dispatchEvent({type:"columnStateUpdated",key:e})}};function ct(e){return hs(e)?{direction:e.direction,type:e.type}:{direction:yn(e),type:Ut(e)}}function io(e){return e==="asc"||e==="desc"||e===null}function Da(e){return e==="default"||e==="absolute"}function hs(e){if(!e||typeof e!="object")return!1;const t=e;return Da(t.type)&&io(t.direction)}function ki(e,t){return e?t?e.type===t.type&&e.direction===t.direction:e?e.direction===null:!0:t?t.direction===null:!0}function yn(e){return io(e)?e:null}function Ut(e){return Da(e)?e:"default"}function Zf(e,t,o){const i=o?.()??t.sortSvc.getDisplaySortForColumn(e),n=Ut(i?.type),r=yn(i?.direction),a=e.getAvailableSortTypes(),l=a.has("default"),c=a.has("absolute");return{isDefaultSortAllowed:l,isAbsoluteSortAllowed:c,isAbsoluteSort:n==="absolute",isDefaultSort:n==="default",isAscending:r==="asc",isDescending:r==="desc",direction:r}}function Ve(e){return e instanceof Li}var Li=class extends x{constructor(e,t,o,s){super(),this.colGroupDef=e,this.groupId=t,this.padding=o,this.level=s,this.isColumn=!1,this.expandable=!1,this.instanceId=cu(),this.expandableListenerRemoveCallback=null,this.expanded=!!e?.openByDefault}destroy(){this.expandableListenerRemoveCallback&&this.reset(null,void 0),super.destroy()}reset(e,t){this.colGroupDef=e,this.level=t,this.originalParent=null,this.expandableListenerRemoveCallback&&this.expandableListenerRemoveCallback(),this.children=void 0,this.expandable=void 0}getInstanceId(){return this.instanceId}getOriginalParent(){return this.originalParent}getLevel(){return this.level}isVisible(){return this.children?this.children.some(e=>e.isVisible()):!1}isPadding(){return this.padding}setExpanded(e){this.expanded=e===void 0?!1:e,this.dispatchLocalEvent({type:"expandedChanged"})}isExpandable(){return this.expandable}isExpanded(){return this.expanded}getGroupId(){return this.groupId}getId(){return this.getGroupId()}setChildren(e){this.children=e}getChildren(){return this.children}getColGroupDef(){return this.colGroupDef}getLeafColumns(){const e=[];return this.addLeafColumns(e),e}forEachLeafColumn(e){if(this.children)for(const t of this.children)lo(t)?e(t):Ve(t)&&t.forEachLeafColumn(e)}addLeafColumns(e){if(this.children)for(const t of this.children)lo(t)?e.push(t):Ve(t)&&t.addLeafColumns(e)}getColumnGroupShow(){const e=this.colGroupDef;if(e)return e.columnGroupShow}setupExpandable(){this.setExpandable(),this.expandableListenerRemoveCallback&&this.expandableListenerRemoveCallback();const e=this.onColumnVisibilityChanged.bind(this);for(const t of this.getLeafColumns())t.__addEventListener("visibleChanged",e);this.expandableListenerRemoveCallback=()=>{for(const t of this.getLeafColumns())t.__removeEventListener("visibleChanged",e);this.expandableListenerRemoveCallback=null}}setExpandable(){if(this.isPadding())return;let e=!1,t=!1,o=!1;const s=this.findChildrenRemovingPadding();for(let n=0,r=s.length;n<r;n++){const a=s[n];if(!a.isVisible())continue;const l=a.getColumnGroupShow();l==="open"?(e=!0,o=!0):l==="closed"?(t=!0,o=!0):(e=!0,t=!0)}const i=e&&t&&o;this.expandable!==i&&(this.expandable=i,this.dispatchLocalEvent({type:"expandableChanged"}))}findChildrenRemovingPadding(){const e=[],t=o=>{for(const s of o)Ve(s)&&s.isPadding()?t(s.children):e.push(s)};return t(this.children),e}onColumnVisibilityChanged(){this.setExpandable()}},Jf={numericColumn:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"},rightAligned:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"}};function Gl(e,t,o){const s={},i=e.gos;return Object.assign(s,i.get("defaultColGroupDef")),Object.assign(s,t),i.validateColDef(s,o),s}var Xf=class{constructor(){this.existingKeys={}}addExistingKeys(e){for(let t=0;t<e.length;t++)this.existingKeys[e[t]]=!0}getUniqueKey(e,t){e=Rr(e);let o=0;for(;;){let s=e??t;if(s?o!==0&&(s+="_"+o):s=o,!this.existingKeys[s]){const i=String(s);return e&&o>0&&D(273,{providedId:e,usedId:i}),this.existingKeys[i]=!0,i}o++}}},em=(e,t)=>{Ve(e)&&e.setupExpandable(),e.originalParent=t};function tm(e,t=null,o,s,i){const n=new Xf,{existingCols:r,existingGroups:a,existingColKeys:l}=om(s);n.addExistingKeys(l);const c=du(e,t,0,o,r,n,a,i),{colGroupSvc:d}=e,u=d?.findMaxDepth(c,0)??0,h=d?d.balanceColumnTree(c,0,u,n):c;return Wt(null,h,em),{columnTree:h,treeDepth:u}}function om(e){const t=[],o=[],s=[];return e&&Wt(null,e,i=>{if(Ve(i)){const n=i;o.push(n)}else{const n=i;s.push(n.getId()),t.push(n)}}),{existingCols:t,existingGroups:o,existingColKeys:s}}function du(e,t,o,s,i,n,r,a){if(!t)return[];const{colGroupSvc:l}=e,c=new Array(t.length);for(let d=0;d<c.length;d++){const u=t[d];l&&lm(u)?c[d]=l.createProvidedColumnGroup(s,u,o,i,n,r,a):c[d]=sm(e,s,u,i,n,a)}return c}function sm(e,t,o,s,i,n){const r=nm(o,s);r&&s?.splice(r.idx,1);let a=r?.column;if(a){const l=Ir(e,o,a.getColId());a.setColDef(l,o,n),im(e,a,l,n)}else{const l=i.getUniqueKey(o.colId,o.field),c=Ir(e,o,l);a=new Uo(c,o,l,t),e.context.createBean(a)}return e.dataTypeSvc?.addColumnListeners(a),a}function uu(e,t,o,s,i,n,r,a){const{sortSvc:l,pinnedCols:c,colFlex:d}=e;o!==void 0&&t.setVisible(!o,a),l&&(l.updateColSort(t,s,a),i!==void 0&&l.setColSortIndex(t,i)),n!==void 0&&c?.setColPinned(t,n),r!==void 0&&d?.setColFlex(t,r)}function im(e,t,o,s){uu(e,t,o.hide,o.sort,o.sortIndex,o.pinned,o.flex,s);const i=t.getFlex();if(!(i!=null&&i>0))if(o.width!=null)t.setActualWidth(o.width,s);else{const n=t.getActualWidth();t.setActualWidth(n,s)}}function nm(e,t){if(t)for(let o=0;o<t.length;o++){const s=t[o].getUserProvidedColDef();if(!s)continue;if(e.colId!=null){if(t[o].getId()===e.colId)return{idx:o,column:t[o]};continue}if(e.field!=null){if(s.field===e.field)return{idx:o,column:t[o]};continue}if(s===e)return{idx:o,column:t[o]}}}function Ir(e,t,o,s){const{gos:i,dataTypeSvc:n}=e,r={},a=i.get("defaultColDef");_e(r,a,!1,!0);const l=rm(e,r,t,o);l&&am(e,l,r);const c=r.cellDataType;_e(r,t,!1,!0),c!==void 0&&(r.cellDataType=c);const d=i.get("autoGroupColumnDef"),u=Bt(i);return t.rowGroup&&d&&u&&_e(r,{sort:d.sort,initialSort:d.initialSort},!1,!0),n?.postProcess(r),n?.validateColDef(r,t,a,o),i.validateColDef(r,o,s),r}function rm(e,t,o,s){const i=e.dataTypeSvc?.updateColDefAndGetColumnType(t,o,s),n=o.type??i??t.type;return t.type=n,n?tn(n):void 0}function am(e,t,o){if(!t.length)return;const s=Object.assign({},Jf),i=e.gos.get("columnTypes")||{};for(const n of Object.keys(i)){const r=i[n];n in s?D(34,{key:n}):(r.type&&D(35),s[n]=r)}for(const n of t){const r=s[n.trim()];r?_e(o,r,!1,!0):D(36,{t:n})}}function lm(e){return e.children!==void 0}function Wt(e,t,o){if(t)for(let s=0;s<t.length;s++){const i=t[s];Ve(i)&&Wt(i,i.getChildren(),o),o(i,e)}}var oo="ag-Grid-AutoColumn",Ma="ag-Grid-SelectionColumn",Ta="ag-Grid-RowNumbersColumn";function hu(e){const t=[],o=s=>{for(let i=0;i<s.length;i++){const n=s[i];lo(n)?t.push(n):Ve(n)&&o(n.getChildren())}};return o(e),t}function Ht(e){return e.reduce((t,o)=>t+o.getActualWidth(),0)}function en(e,t,o){const s={};if(!t)return;Wt(null,t,n=>{s[n.getInstanceId()]=n}),o&&Wt(null,o,n=>{s[n.getInstanceId()]=null});const i=Object.values(s).filter(n=>n!=null);e.context.destroyBeans(i)}function Ia(e){return e.getId().startsWith(oo)}function go(e){return(typeof e=="string"?e:"getColId"in e?e.getColId():e.colId)?.startsWith(Ma)??!1}function Ue(e){return(typeof e=="string"?e:"getColId"in e?e.getColId():e.colId)?.startsWith(Ta)??!1}function cm(e){return go(e)||Ue(e)}function tn(e){let t=[];return e instanceof Array?t=e:typeof e=="string"&&(t=e.split(",")),t}function dm(e,t){return ho(e,t,(o,s)=>o.getColId()===s.getColId())}function um(e){e.map={};for(const t of e.list)e.map[t.getId()]=t}function gs(e){return e==="optionsUpdated"?"gridOptionsChanged":e}function Ws(e,t){return e===t||e.colId==t||e.getColDef()===t}var hm=(e,t)=>(o,s)=>{const i={value1:void 0,value2:void 0};let n=!1;return e&&(e[o]!==void 0&&(i.value1=e[o],n=!0),L(s)&&e[s]!==void 0&&(i.value2=e[s],n=!0)),!n&&t&&(t[o]!==void 0&&(i.value1=t[o]),L(s)&&t[s]!==void 0&&(i.value2=t[s])),i};function gm(e,t){const o={...e,sort:void 0,colId:t},s=gu(e);return s&&(o.sort=s.direction,o.sortType=s.type),o}function gu(e){const{sort:t,initialSort:o}=e,s=hs(t)||io(t),i=hs(o)||io(o);return s?ct(t):i?ct(o):null}function pu(e,t){return e+"_"+t}function Fe(e){return e instanceof oi}var oi=class extends x{constructor(e,t,o,s){super(),this.providedColumnGroup=e,this.groupId=t,this.partId=o,this.pinned=s,this.isColumn=!1,this.displayedChildren=[],this.autoHeaderHeight=null,this.parent=null,this.colIdSanitised=Hs(this.getUniqueId())}reset(){this.parent=null,this.children=null,this.displayedChildren=null}getParent(){return this.parent}getUniqueId(){return pu(this.groupId,this.partId)}isEmptyGroup(){return this.displayedChildren.length===0}isMoving(){const e=this.getProvidedColumnGroup().getLeafColumns();return!e||e.length===0?!1:e.every(t=>t.isMoving())}checkLeft(){for(const e of this.displayedChildren)Fe(e)&&e.checkLeft();if(this.displayedChildren.length>0)if(this.gos.get("enableRtl")){const t=he(this.displayedChildren).getLeft();this.setLeft(t)}else{const e=this.displayedChildren[0].getLeft();this.setLeft(e)}else this.setLeft(null)}getLeft(){return this.left}getOldLeft(){return this.oldLeft}setLeft(e){this.oldLeft=this.left,this.left!==e&&(this.left=e,this.dispatchLocalEvent({type:"leftChanged"}))}getPinned(){return this.pinned}getGroupId(){return this.groupId}getPartId(){return this.partId}getActualWidth(){let e=0;for(const t of this.displayedChildren??[])e+=t.getActualWidth();return e}isResizable(){if(!this.displayedChildren)return!1;let e=!1;for(const t of this.displayedChildren)t.isResizable()&&(e=!0);return e}getMinWidth(){let e=0;for(const t of this.displayedChildren)e+=t.getMinWidth();return e}addChild(e){this.children||(this.children=[]),this.children.push(e)}getDisplayedChildren(){return this.displayedChildren}getLeafColumns(){const e=[];return this.addLeafColumns(e),e}getDisplayedLeafColumns(){const e=[];return this.addDisplayedLeafColumns(e),e}getDefinition(){return this.providedColumnGroup.getColGroupDef()}getColGroupDef(){return this.providedColumnGroup.getColGroupDef()}isPadding(){return this.providedColumnGroup.isPadding()}isExpandable(){return this.providedColumnGroup.isExpandable()}isExpanded(){return this.providedColumnGroup.isExpanded()}setExpanded(e){this.providedColumnGroup.setExpanded(e)}isAutoHeaderHeight(){return!!this.getColGroupDef()?.autoHeaderHeight}getAutoHeaderHeight(){return this.autoHeaderHeight}setAutoHeaderHeight(e){const t=e!==this.autoHeaderHeight;return this.autoHeaderHeight=e,t}addDisplayedLeafColumns(e){for(const t of this.displayedChildren??[])lo(t)?e.push(t):Fe(t)&&t.addDisplayedLeafColumns(e)}addLeafColumns(e){for(const t of this.children??[])lo(t)?e.push(t):Fe(t)&&t.addLeafColumns(e)}getChildren(){return this.children}getColumnGroupShow(){return this.providedColumnGroup.getColumnGroupShow()}getProvidedColumnGroup(){return this.providedColumnGroup}getPaddingLevel(){const e=this.getParent();return!this.isPadding()||!e?.isPadding()?0:1+e.getPaddingLevel()}calculateDisplayedColumns(){this.displayedChildren=[];let e=this;for(;e?.isPadding();)e=e.getParent();if(!(e?e.getProvidedColumnGroup().isExpandable():!1)){this.displayedChildren=this.children,this.dispatchLocalEvent({type:"displayedChildrenChanged"});return}for(const o of this.children??[]){if(Fe(o)&&!o.displayedChildren?.length)continue;switch(o.getColumnGroupShow()){case"open":e.getProvidedColumnGroup().isExpanded()&&this.displayedChildren.push(o);break;case"closed":e.getProvidedColumnGroup().isExpanded()||this.displayedChildren.push(o);break;default:this.displayedChildren.push(o);break}}this.dispatchLocalEvent({type:"displayedChildrenChanged"})}},R={BACKSPACE:"Backspace",TAB:"Tab",ENTER:"Enter",ESCAPE:"Escape",SPACE:" ",LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",DOWN:"ArrowDown",DELETE:"Delete",F2:"F2",PAGE_UP:"PageUp",PAGE_DOWN:"PageDown",PAGE_HOME:"Home",PAGE_END:"End",A:"KeyA",C:"KeyC",D:"KeyD",V:"KeyV",X:"KeyX",Y:"KeyY",Z:"KeyZ"},pm=65,fm=67,mm=86,Cm=68,vm=90,wm=89;function fu(e){const{keyCode:t}=e;let o;switch(t){case pm:o=R.A;break;case fm:o=R.C;break;case mm:o=R.V;break;case Cm:o=R.D;break;case vm:o=R.Z;break;case wm:o=R.Y;break;default:o=e.code}return o}function bm(e,t){return new ie(o=>{o(window.setInterval(e,t))})}var ie=class Os{constructor(t){this.status=0,this.resolution=null,this.waiters=[],t(o=>this.onDone(o),o=>this.onReject(o))}static all(t){return t.length?new Os(o=>{let s=t.length;const i=new Array(s);t.forEach((n,r)=>{n.then(a=>{i[r]=a,s--,s===0&&o(i)})})}):Os.resolve()}static resolve(t=null){return new Os(o=>o(t))}then(t){return new Os(o=>{this.status===1?o(t(this.resolution)):this.waiters.push(s=>o(t(s)))})}onDone(t){this.status=1,this.resolution=t;for(const o of this.waiters)o(t)}onReject(t){}},Sm=class extends qe{constructor(){super(...arguments),this.beanName="dragAndDrop",this.dragSourceAndParamsList=[],this.dragItem=null,this.dragInitialSourcePointerOffsetX=0,this.dragInitialSourcePointerOffsetY=0,this.lastMouseEvent=null,this.lastDraggingEvent=null,this.dragSource=null,this.dragImageCompPromise=null,this.dragImageComp=null,this.dragImageLastIcon=void 0,this.dragImageLastLabel=void 0,this.dropTargets=[],this.externalDropZoneCount=0,this.lastDropTarget=null}addDragSource(e,t=!1){const o={capturePointer:!0,dragSource:e,eElement:e.eElement,dragStartPixels:e.dragStartPixels,onDragStart:s=>this.onDragStart(e,s),onDragStop:this.onDragStop.bind(this),onDragging:this.onDragging.bind(this),onDragCancel:this.onDragCancel.bind(this),includeTouch:t};this.dragSourceAndParamsList.push(o),this.beans.dragSvc.addDragSource(o)}setDragImageCompIcon(e,t=!1){const o=this.dragImageComp;o&&(t||this.dragImageLastIcon!==e)&&(this.dragImageLastIcon=e,o.setIcon(e,t))}removeDragSource(e){const{dragSourceAndParamsList:t,beans:o}=this;for(let s=0,i=t.length;s<i;s++)if(t[s].dragSource===e){const n=t[s];o.dragSvc?.removeDragSource(n),t.splice(s,1);break}}destroy(){const{dragSourceAndParamsList:e,dropTargets:t,beans:o}=this,s=o.dragSvc;for(const i of e)s?.removeDragSource(i);e.length=0,t.length=0,this.externalDropZoneCount=0,this.clearDragAndDropProperties(),super.destroy()}nudge(){const e=this.lastMouseEvent;e&&this.onDragging(e,!0)}onDragStart(e,t){this.lastMouseEvent=t,this.dragSource=e,this.dragItem=e.getDragItem();const o=e.eElement.getBoundingClientRect();this.dragInitialSourcePointerOffsetX=t.clientX-o.left,this.dragInitialSourcePointerOffsetY=t.clientY-o.top,e.onDragStarted?.(),this.createAndUpdateDragImageComp(e)}onDragStop(e){const{dragSource:t,lastDropTarget:o}=this;if(t?.onDragStopped?.(),o){const s=this.dropTargetEvent(o,e,!1);o.onDragStop?.(s)}this.clearDragAndDropProperties()}onDragCancel(){const{dragSource:e,lastDropTarget:t,lastMouseEvent:o}=this;if(e?.onDragCancelled?.(),t&&o){const s=this.dropTargetEvent(t,o,!1);t.onDragCancel?.(s)}this.clearDragAndDropProperties()}onDragging(e,t=!1){this.positionDragImageComp(e);const o=this.findCurrentDropTarget(e),{lastDropTarget:s,dragSource:i,dragItem:n}=this;let r=!1;if(o!==s){if(r=!0,s){const a=this.dropTargetEvent(s,e,t);s.onDragLeave?.(a)}if(s!==null&&!o?this.handleExit(i,n):s===null&&o&&this.handleEnter(i,n),o){const a=this.dropTargetEvent(o,e,t);o.onDragEnter?.(a)}this.lastDropTarget=o}else if(o){const a=this.dropTargetEvent(o,e,t);o.onDragging?.(a),a?.changed&&(r=!0)}this.lastMouseEvent=e,r&&this.updateDragImageComp()}clearDragAndDropProperties(){this.removeDragImageComp(this.dragImageComp),this.dragImageCompPromise=null,this.dragImageLastIcon=void 0,this.dragImageLastLabel=void 0,this.lastMouseEvent=null,this.lastDraggingEvent=null,this.lastDropTarget=null,this.dragItem=null,this.dragInitialSourcePointerOffsetX=0,this.dragInitialSourcePointerOffsetY=0,this.dragSource=null}getAllContainersFromDropTarget(e){const t=e.getContainer(),o=e.getSecondaryContainers?.(),s=o?.length;if(!s)return[[t]];const i=new Array(s+1);i[0]=[t];for(let n=0;n<s;++n)i[n+1]=o[n];return i}isMouseOnDropTarget(e,t){const o=this.getAllContainersFromDropTarget(t);let s=!1;const i=(a,l)=>{for(const c of l){const{width:d,height:u,left:h,right:g,top:f,bottom:m}=c.getBoundingClientRect();if(d===0||u===0)return!1;const C=a.clientX>=h&&a.clientX<g,v=a.clientY>=f&&a.clientY<m;if(!C||!v)return!1}return!0};for(const a of o)if(i(e,a)){s=!0;break}const{eElement:n,type:r}=this.dragSource;return t.targetContainsSource&&!t.getContainer().contains(n)?!1:s&&t.isInterestedIn(r,n)}findCurrentDropTarget(e){const t=[],o=this.dropTargets;for(let r=0,a=o.length;r<a;++r){const l=o[r];this.isMouseOnDropTarget(e,l)&&t.push(l)}const s=t.length;if(s===0)return null;if(s===1)return t[0];const n=gt(this.beans).elementsFromPoint(e.clientX,e.clientY);for(let r=0,a=n.length;r<a;++r){const l=n[r];for(let c=0,d=t.length;c<d;c++){const u=t[c],h=this.getAllContainersFromDropTarget(u);let g=!1;for(let f=0,m=h.length;f<m&&!g;f++){const C=h[f];for(let v=0,w=C.length;v<w;v++)if(C[v]===l){g=!0;break}}if(g)return u}}return null}addDropTarget(e){this.dropTargets.push(e),e.external&&this.externalDropZoneCount++}removeDropTarget(e){const t=e.getContainer(),o=this.dropTargets;let s=0;for(let i=0,n=o.length;i<n;++i){const r=o[i];if(r.getContainer()===t){r.external&&--this.externalDropZoneCount;continue}s!==i&&(o[s]=r),++s}o.length=s}hasExternalDropZones(){return this.externalDropZoneCount>0}findExternalZone(e){const t=this.dropTargets;for(let o=0,s=t.length;o<s;++o){const i=t[o];if(i.external&&i.getContainer()===e)return i}return null}dropTargetEvent(e,t,o){const{dragSource:s,dragItem:i,lastDraggingEvent:n,lastMouseEvent:r,dragInitialSourcePointerOffsetX:a,dragInitialSourcePointerOffsetY:l}=this,c=e.getContainer(),d=c.getBoundingClientRect(),{clientX:u,clientY:h}=t,g=u-(r?.clientX||0),f=h-(r?.clientY||0),m=this.createEvent({event:t,x:u-d.left,y:h-d.top,vDirection:f>0?"down":f<0?"up":null,hDirection:g<0?"left":g>0?"right":null,initialSourcePointerOffsetX:a,initialSourcePointerOffsetY:l,dragSource:s,fromNudge:o,dragItem:i,dropZoneTarget:c,dropTarget:n?.dropTarget??null,changed:!!n?.changed});return this.lastDraggingEvent=m,m}positionDragImageComp(e){const t=this.dragImageComp?.getGui();t&&tf(t,e,this.beans)}removeDragImageComp(e){this.dragImageComp===e&&(this.dragImageComp=null),e&&(e.getGui()?.remove(),this.destroyBean(e))}createAndUpdateDragImageComp(e){const t=this.createDragImageComp(e)??null;this.dragImageCompPromise=t,t?.then(o=>{const s=this.lastMouseEvent;if(t!==this.dragImageCompPromise||!s||!this.isAlive()){this.destroyBean(o);return}this.dragImageCompPromise=null,this.dragImageLastIcon=void 0,this.dragImageLastLabel=void 0;const i=this.dragImageComp;i!==o&&(this.dragImageComp=o,this.removeDragImageComp(i)),o&&(this.appendDragImageComp(o),this.updateDragImageComp(),this.positionDragImageComp(s))})}appendDragImageComp(e){const t=e.getGui(),o=t.style;o.position="absolute",o.zIndex="9999",this.beans.dragSvc?.hasPointerCapture()&&(o.pointerEvents="none"),this.gos.setInstanceDomData(t),this.beans.environment.applyThemeClasses(t),o.top="20px",o.left="20px";const s=ma(this.beans);s?s.appendChild(t):this.warnNoBody()}updateDragImageComp(){const{dragImageComp:e,dragSource:t,lastDropTarget:o,lastDraggingEvent:s,dragImageLastLabel:i}=this;if(!e)return;this.setDragImageCompIcon(o?.getIconName?.(s)??null);let n=t?.dragItemName;typeof n=="function"&&(n=n(s)),n||(n=""),i!==n&&(this.dragImageLastLabel=n,e.setLabel(n))}};function mu(e){return typeof e=="object"&&!!e.component}function ym(e){return e?e.prototype&&"getGui"in e.prototype:!1}function Cu(e,t,o,s){const{name:i}=o;let n,r,a,l,c,d;if(t){const u=t,h=u[i+"Selector"],g=h?h(s):null,f=m=>{typeof m=="string"?n=m:m!=null&&m!==!0&&(e.isFrameworkComponent(m)?a=m:r=m)};g?(f(g.component),l=g.params,c=g.popup,d=g.popupPosition):f(u[i])}return{compName:n,jsComp:r,fwComp:a,paramsFromSelector:l,popupFromSelector:c,popupPositionFromSelector:d}}var Rm=class extends x{constructor(){super(...arguments),this.beanName="userCompFactory"}wireBeans(e){this.agCompUtils=e.agCompUtils,this.registry=e.registry,this.frameworkCompWrapper=e.frameworkCompWrapper,this.gridOptions=e.gridOptions}getCompDetailsFromGridOptions(e,t,o,s=!1){return this.getCompDetails(this.gridOptions,e,t,o,s)}getCompDetails(e,t,o,s,i=!1){const{name:n,cellRenderer:r}=t;let{compName:a,jsComp:l,fwComp:c,paramsFromSelector:d,popupFromSelector:u,popupPositionFromSelector:h}=Cu(this.beans.frameworkOverrides,e,t,s),g,f;const m=b=>{const y=this.registry.getUserComponent(n,b);y&&(l=y.componentFromFramework?void 0:y.component,c=y.componentFromFramework?y.component:void 0,g=y.params,f=y.processParams)};if(a!=null&&m(a),l==null&&c==null&&o!=null&&m(o),l&&r&&!ym(l)&&(l=this.agCompUtils?.adaptFunction(t,l)),!l&&!c){const{validation:b}=this.beans;i&&(a!==o||!o)?a?b?.isProvidedUserComp(a)||ce(50,{compName:a}):o?b||ce(260,{...this.gos.getModuleErrorParams(),propName:n,compName:o}):ce(216,{name:n}):o&&!b&&ce(146,{comp:o});return}const C=this.mergeParams(e,t,s,d,g,f),v=l==null,w=l??c;return{componentFromFramework:v,componentClass:w,params:C,type:t,popupFromSelector:u,popupPositionFromSelector:h,newAgStackInstance:()=>this.newAgStackInstance(w,v,C,t)}}newAgStackInstance(e,t,o,s){const i=!t;let n;i?n=new e:n=this.frameworkCompWrapper.wrap(e,s.mandatoryMethods,s.optionalMethods,s),this.createBean(n);const r=n.init?.(o);return r==null?ie.resolve(n):r.then(()=>n)}mergeParams(e,t,o,s=null,i,n){const r={...o,...i},l=e?.[t.name+"Params"];if(typeof l=="function"){const c=l(o);_e(r,c)}else typeof l=="object"&&_e(r,l);return _e(r,s),n?n(r):r}},Fm={name:"dateComponent",mandatoryMethods:["getDate","setDate"],optionalMethods:["afterGuiAttached","setInputPlaceholder","setInputAriaLabel","setDisabled","refresh"]},Em={name:"dragAndDropImageComponent",mandatoryMethods:["setIcon","setLabel"]},xm={name:"headerComponent",optionalMethods:["refresh"]},Pm={name:"innerHeaderComponent"},Dm={name:"innerHeaderGroupComponent"},Mm={name:"headerGroupComponent"},Tm={name:"cellRenderer",optionalMethods:["refresh","afterGuiAttached"],cellRenderer:!0},Im={name:"loadingCellRenderer",cellRenderer:!0},Am={name:"cellEditor",mandatoryMethods:["getValue"],optionalMethods:["isPopup","isCancelBeforeStart","isCancelAfterEnd","getPopupPosition","focusIn","focusOut","afterGuiAttached","refresh"]},km={name:"tooltipComponent"},Aa={name:"filter",mandatoryMethods:["isFilterActive","doesFilterPass","getModel","setModel"],optionalMethods:["afterGuiAttached","afterGuiDetached","onNewRowsLoaded","getModelAsString","onFloatingFilterChanged","onAnyFilterChanged","refresh"]},Lm={name:"floatingFilterComponent",mandatoryMethods:["onParentModelChanged"],optionalMethods:["afterGuiAttached","refresh"]},Om={name:"fullWidthCellRenderer",optionalMethods:["refresh","afterGuiAttached"],cellRenderer:!0},Gm={name:"loadingCellRenderer",cellRenderer:!0},Hm={name:"groupRowRenderer",optionalMethods:["afterGuiAttached"],cellRenderer:!0},Bm={name:"detailCellRenderer",optionalMethods:["refresh"],cellRenderer:!0};function Vm(e,t){return e.getCompDetailsFromGridOptions(Em,"agDragAndDropImage",t,!0)}function Nm(e,t,o){return e.getCompDetails(t,xm,"agColumnHeader",o)}function Wm(e,t,o){return e.getCompDetails(t,Pm,void 0,o)}function zm(e,t){const o=t.columnGroup.getColGroupDef();return e.getCompDetails(o,Mm,"agColumnGroupHeader",t)}function _m(e,t,o){return e.getCompDetails(t,Dm,void 0,o)}function Um(e,t){return e.getCompDetailsFromGridOptions(Om,void 0,t,!0)}function $m(e,t){return e.getCompDetailsFromGridOptions(Gm,"agLoadingCellRenderer",t,!0)}function Km(e,t){return e.getCompDetailsFromGridOptions(Hm,"agGroupRowRenderer",t,!0)}function qm(e,t){return e.getCompDetailsFromGridOptions(Bm,"agDetailCellRenderer",t,!0)}function Hl(e,t,o){return e.getCompDetails(t,Tm,void 0,o)}function Bl(e,t,o){return e.getCompDetails(t,Im,"agSkeletonCellRenderer",o,!0)}function vu(e,t,o){return e.getCompDetails(t,Am,"agCellEditor",o,!0)}function jm(e,t,o,s){const i=t.filter;return mu(i)&&(t={filter:i.component,filterParams:t.filterParams}),e.getCompDetails(t,Aa,s,o,!0)}function Ym(e,t,o){return e.getCompDetails(t,Fm,"agDateInput",o,!0)}function Qm(e,t){return e.getCompDetails(t.colDef,km,"agTooltipComponent",t,!0)}function Zm(e,t,o,s){return e.getCompDetails(t,Lm,s,o)}function wu(e,t){return Cu(e,t,Aa)}function Wn(e,t,o){return e.mergeParams(t,Aa,o)}var Jm=class extends Sm{createEvent(e){return K(this.gos,e)}createDragImageComp(e){const{gos:t,beans:o}=this;return Vm(o.userCompFactory,K(t,{dragSource:e}))?.newAgStackInstance()}handleEnter(e,t){e?.onGridEnter?.(t)}handleExit(e,t){e?.onGridExit?.(t)}warnNoBody(){D(54)}isDropZoneWithinThisGrid(e){return this.beans.ctrlsSvc.getGridBodyCtrl().eGridBody.contains(e.dropZoneTarget)}registerGridDropTarget(e,t){const o={getContainer:e,isInterestedIn:s=>s===1||s===0,getIconName:()=>"notAllowed"};this.addDropTarget(o),t.addDestroyFunc(()=>this.removeDropTarget(o))}};function bu(e){return!!e.operator}var Su="ag-resizer-wrapper",jt=(e,t)=>({tag:"div",ref:`${e}Resizer`,cls:`ag-resizer ag-resizer-${t}`}),Xm={tag:"div",cls:Su,children:[jt("eTopLeft","topLeft"),jt("eTop","top"),jt("eTopRight","topRight"),jt("eRight","right"),jt("eBottomRight","bottomRight"),jt("eBottom","bottom"),jt("eBottomLeft","bottomLeft"),jt("eLeft","left")]},eC=class extends qe{constructor(e,t){super(),this.element=e,this.dragStartPosition={x:0,y:0},this.position={x:0,y:0},this.lastSize={width:-1,height:-1},this.positioned=!1,this.resizersAdded=!1,this.resizeListeners=[],this.boundaryEl=null,this.isResizing=!1,this.isMoving=!1,this.resizable={},this.movable=!1,this.currentResizer=null,this.config={popup:!1,...t}}wireBeans(e){this.popupSvc=e.popupSvc,this.dragSvc=e.dragSvc}center(e){const{clientHeight:t,clientWidth:o}=this.offsetParent,s=o/2-this.getWidth()/2,i=t/2-this.getHeight()/2;this.offsetElement(s,i,e)}initialisePosition(e){if(this.positioned)return;const{centered:t,forcePopupParentAsOffsetParent:o,minWidth:s,width:i,minHeight:n,height:r,x:a,y:l}=this.config;this.offsetParent||this.setOffsetParent();let c=0,d=0;const u=vt(this.element);if(u){const h=this.findBoundaryElement(),g=window.getComputedStyle(h);if(g.minWidth!=null){const f=h.offsetWidth-this.element.offsetWidth;d=Number.parseInt(g.minWidth,10)-f}if(g.minHeight!=null){const f=h.offsetHeight-this.element.offsetHeight;c=Number.parseInt(g.minHeight,10)-f}}if(this.minHeight=n||c,this.minWidth=s||d,i&&this.setWidth(i),r&&this.setHeight(r),(!i||!r)&&this.refreshSize(),t)this.center(e);else if(a||l)this.offsetElement(a,l,e);else if(u&&o){let h=this.boundaryEl,g=!0;if(h||(h=this.findBoundaryElement(),g=!1),h){const f=Number.parseFloat(h.style.top),m=Number.parseFloat(h.style.left);g?this.offsetElement(Number.isNaN(m)?0:m,Number.isNaN(f)?0:f,e):this.setPosition(m,f)}}this.positioned=!!this.offsetParent}isPositioned(){return this.positioned}getPosition(){return this.position}setMovable(e,t){if(!this.config.popup||e===this.movable)return;this.movable=e;const o=this.moveElementDragListener||{eElement:t,onDragStart:this.onMoveStart.bind(this),onDragging:this.onMove.bind(this),onDragStop:this.onMoveEnd.bind(this)};e?(this.dragSvc?.addDragSource(o),this.moveElementDragListener=o):(this.dragSvc?.removeDragSource(o),this.moveElementDragListener=void 0)}setResizable(e){if(this.clearResizeListeners(),e?this.addResizers():this.removeResizers(),typeof e=="boolean"){if(e===!1)return;e={topLeft:e,top:e,topRight:e,right:e,bottomRight:e,bottom:e,bottomLeft:e,left:e}}for(const t of Object.keys(e)){const o=!!e[t],s=this.getResizerElement(t),i={dragStartPixels:0,eElement:s,onDragStart:n=>this.onResizeStart(n,t),onDragging:this.onResize.bind(this),onDragStop:n=>this.onResizeEnd(n,t)};(o||!this.isAlive()&&!o)&&(o?(this.dragSvc?.addDragSource(i),this.resizeListeners.push(i),s.style.pointerEvents="all"):s.style.pointerEvents="none",this.resizable[t]=o)}}removeSizeFromEl(){this.element.style.removeProperty("height"),this.element.style.removeProperty("width"),this.element.style.removeProperty("flex")}restoreLastSize(){this.element.style.flex="0 0 auto";const{height:e,width:t}=this.lastSize;t!==-1&&(this.element.style.width=`${t}px`),e!==-1&&(this.element.style.height=`${e}px`)}getHeight(){return this.element.offsetHeight}setHeight(e){const{popup:t}=this.config,o=this.element;let s=!1;if(typeof e=="string"&&e.includes("%"))Vs(o,e),e=Ad(o),s=!0;else if(e=Math.max(this.minHeight,e),this.positioned){const i=this.getAvailableHeight();i&&e>i&&(e=i)}this.getHeight()!==e&&(s?(o.style.maxHeight="unset",o.style.minHeight="unset"):t?Vs(o,e):(o.style.height=`${e}px`,o.style.flex="0 0 auto",this.lastSize.height=typeof e=="number"?e:Number.parseFloat(e)))}getAvailableHeight(){const{popup:e,forcePopupParentAsOffsetParent:t}=this.config;this.positioned||this.initialisePosition();const{clientHeight:o}=this.offsetParent;if(!o)return null;const s=this.element.getBoundingClientRect(),i=this.offsetParent.getBoundingClientRect(),n=e?this.position.y:s.top,r=e?0:i.top;let a=0;if(t){const c=this.element.parentElement;if(c){const{bottom:d}=c.getBoundingClientRect();a=d-s.bottom}}return o+r-n-a}getWidth(){return this.element.offsetWidth}setWidth(e){const t=this.element,{popup:o}=this.config;let s=!1;if(typeof e=="string"&&e.includes("%"))Tt(t,e),e=_i(t),s=!0;else if(this.positioned){e=Math.max(this.minWidth,e);const{clientWidth:i}=this.offsetParent,n=o?this.position.x:this.element.getBoundingClientRect().left;i&&e+n>i&&(e=i-n)}this.getWidth()!==e&&(s?(t.style.maxWidth="unset",t.style.minWidth="unset"):this.config.popup?Tt(t,e):(t.style.width=`${e}px`,t.style.flex=" unset",this.lastSize.width=typeof e=="number"?e:Number.parseFloat(e)))}offsetElement(e=0,t=0,o){const{forcePopupParentAsOffsetParent:s}=this.config,i=s?this.boundaryEl:this.element;i&&(this.popupSvc?.positionPopup({ePopup:i,keepWithinBounds:!0,skipObserver:this.movable||this.isResizable(),updatePosition:()=>({x:e,y:t}),postProcessCallback:o}),this.setPosition(Number.parseFloat(i.style.left),Number.parseFloat(i.style.top)))}constrainSizeToAvailableHeight(e){if(!this.config.forcePopupParentAsOffsetParent)return;const t=()=>{const o=this.getAvailableHeight();this.element.style.setProperty("max-height",`${o}px`)};e&&this.popupSvc?(this.resizeObserverSubscriber?.(),this.resizeObserverSubscriber=Kt(this.beans,this.popupSvc?.getPopupParent(),t)):(this.element.style.removeProperty("max-height"),this.resizeObserverSubscriber&&(this.resizeObserverSubscriber(),this.resizeObserverSubscriber=void 0))}setPosition(e,t){this.position.x=e,this.position.y=t}updateDragStartPosition(e,t){this.dragStartPosition={x:e,y:t}}calculateMouseMovement(e){const{e:t,isLeft:o,isTop:s,anywhereWithin:i,topBuffer:n}=e,r=t.clientX-this.dragStartPosition.x,a=t.clientY-this.dragStartPosition.y,l=this.shouldSkipX(t,!!o,!!i,r)?0:r,c=this.shouldSkipY(t,!!s,n,a)?0:a;return{movementX:l,movementY:c}}shouldSkipX(e,t,o,s){const i=this.element.getBoundingClientRect(),n=this.offsetParent.getBoundingClientRect(),r=this.boundaryEl.getBoundingClientRect(),a=this.config.popup?this.position.x:i.left;let l=a<=0&&n.left>=e.clientX||n.right<=e.clientX&&n.right<=r.right;return l?!0:(t?l=s<0&&e.clientX>a+n.left||s>0&&e.clientX<a+n.left:o?l=s<0&&e.clientX>r.right||s>0&&e.clientX<a+n.left:l=s<0&&e.clientX>r.right||s>0&&e.clientX<r.right,l)}shouldSkipY(e,t,o=0,s){const i=this.element.getBoundingClientRect(),n=this.offsetParent.getBoundingClientRect(),r=this.boundaryEl.getBoundingClientRect(),a=this.config.popup?this.position.y:i.top;let l=a<=0&&n.top>=e.clientY||n.bottom<=e.clientY&&n.bottom<=r.bottom;return l?!0:(t?l=s<0&&e.clientY>a+n.top+o||s>0&&e.clientY<a+n.top:l=s<0&&e.clientY>r.bottom||s>0&&e.clientY<r.bottom,l)}createResizeMap(){const e=t=>({element:this.element.querySelector(`[data-ref=${t}Resizer]`)});this.resizerMap={topLeft:e("eTopLeft"),top:e("eTop"),topRight:e("eTopRight"),right:e("eRight"),bottomRight:e("eBottomRight"),bottom:e("eBottom"),bottomLeft:e("eBottomLeft"),left:e("eLeft")}}addResizers(){if(this.resizersAdded)return;const e=this.element;e&&(e.appendChild(Lo(Xm)),this.createResizeMap(),this.resizersAdded=!0)}removeResizers(){this.resizerMap=void 0,this.element.querySelector(`.${Su}`)?.remove(),this.resizersAdded=!1}getResizerElement(e){return this.resizerMap[e].element}onResizeStart(e,t){this.boundaryEl=this.findBoundaryElement(),this.positioned||this.initialisePosition(),this.currentResizer={isTop:!!t.match(/top/i),isRight:!!t.match(/right/i),isBottom:!!t.match(/bottom/i),isLeft:!!t.match(/left/i)},this.element.classList.add("ag-resizing"),this.resizerMap[t].element.classList.add("ag-active");const{popup:o,forcePopupParentAsOffsetParent:s}=this.config;!o&&!s&&this.applySizeToSiblings(this.currentResizer.isBottom||this.currentResizer.isTop),this.isResizing=!0,this.updateDragStartPosition(e.clientX,e.clientY)}getSiblings(){const t=this.element.parentElement;return t?Array.prototype.slice.call(t.children).filter(o=>!o.classList.contains("ag-hidden")):null}getMinSizeOfSiblings(){const e=this.getSiblings()||[];let t=0,o=0;for(const s of e){const i=!!s.style.flex&&s.style.flex!=="0 0 auto";if(s===this.element)continue;let n=this.minHeight||0,r=this.minWidth||0;if(i){const a=window.getComputedStyle(s);a.minHeight&&(n=Number.parseInt(a.minHeight,10)),a.minWidth&&(r=Number.parseInt(a.minWidth,10))}else n=s.offsetHeight,r=s.offsetWidth;t+=n,o+=r}return{height:t,width:o}}applySizeToSiblings(e){let t=null;const o=this.getSiblings();if(o){for(let s=0;s<o.length;s++){const i=o[s];i!==t&&(e?i.style.height=`${i.offsetHeight}px`:i.style.width=`${i.offsetWidth}px`,i.style.flex="0 0 auto",i===this.element&&(t=o[s+1]))}t&&(t.style.removeProperty("height"),t.style.removeProperty("min-height"),t.style.removeProperty("max-height"),t.style.flex="1 1 auto")}}isResizable(){return Object.values(this.resizable).some(e=>e)}onResize(e){if(!this.isResizing||!this.currentResizer)return;const{popup:t,forcePopupParentAsOffsetParent:o}=this.config,{isTop:s,isRight:i,isBottom:n,isLeft:r}=this.currentResizer,a=i||r,l=n||s,{movementX:c,movementY:d}=this.calculateMouseMovement({e,isLeft:r,isTop:s}),u=this.position.x,h=this.position.y;let g=0,f=0;if(a&&c){const m=r?-1:1,C=this.getWidth(),v=C+c*m;let w=!1;r&&(g=C-v,(u+g<=0||v<=this.minWidth)&&(w=!0,g=0)),w||this.setWidth(v)}if(l&&d){const m=s?-1:1,C=this.getHeight(),v=C+d*m;let w=!1;s?(f=C-v,(h+f<=0||v<=this.minHeight)&&(w=!0,f=0)):!this.config.popup&&!this.config.forcePopupParentAsOffsetParent&&C<v&&this.getMinSizeOfSiblings().height+v>this.element.parentElement.offsetHeight&&(w=!0),w||this.setHeight(v)}this.updateDragStartPosition(e.clientX,e.clientY),((t||o)&&g||f)&&this.offsetElement(u+g,h+f)}onResizeEnd(e,t){this.isResizing=!1,this.currentResizer=null,this.boundaryEl=null,this.element.classList.remove("ag-resizing"),this.resizerMap[t].element.classList.remove("ag-active"),this.dispatchLocalEvent({type:"resize"})}refreshSize(){const e=this.element;this.config.popup&&(this.config.width||this.setWidth(e.offsetWidth),this.config.height||this.setHeight(e.offsetHeight))}onMoveStart(e){this.boundaryEl=this.findBoundaryElement(),this.positioned||this.initialisePosition(),this.isMoving=!0,this.element.classList.add("ag-moving"),this.updateDragStartPosition(e.clientX,e.clientY)}onMove(e){if(!this.isMoving)return;const{x:t,y:o}=this.position;let s;this.config.calculateTopBuffer&&(s=this.config.calculateTopBuffer());const{movementX:i,movementY:n}=this.calculateMouseMovement({e,isTop:!0,anywhereWithin:!0,topBuffer:s});this.offsetElement(t+i,o+n),this.updateDragStartPosition(e.clientX,e.clientY)}onMoveEnd(){this.isMoving=!1,this.boundaryEl=null,this.element.classList.remove("ag-moving")}setOffsetParent(){this.config.forcePopupParentAsOffsetParent&&this.popupSvc?this.offsetParent=this.popupSvc.getPopupParent():this.offsetParent=this.element.offsetParent}findBoundaryElement(){let e=this.element;for(;e;){if(window.getComputedStyle(e).position!=="static")return e;e=e.parentElement}return this.element}clearResizeListeners(){for(;this.resizeListeners.length;){const e=this.resizeListeners.pop();this.dragSvc?.removeDragSource(e)}}destroy(){super.destroy(),this.moveElementDragListener&&this.dragSvc?.removeDragSource(this.moveElementDragListener),this.constrainSizeToAvailableHeight(!1),this.clearResizeListeners(),this.removeResizers()}},tC=class extends eC{},W=null;function Vl(e){return typeof e?.getGui=="function"}var ai=class{constructor(e){this.cssClassStates={},this.getGui=e}toggleCss(e,t){if(!e)return;if(e.includes(" ")){const s=(e||"").split(" ");if(s.length>1){for(const i of s)this.toggleCss(i,t);return}}this.cssClassStates[e]!==t&&e.length&&(this.getGui()?.classList.toggle(e,t),this.cssClassStates[e]=t)}},oC=0,Ps=class extends qe{constructor(e,t){super(),this.suppressDataRefValidation=!1,this.displayed=!0,this.visible=!0,this.compId=oC++,this.cssManager=new ai(()=>this.eGui),this.componentSelectors=new Map((t??[]).map(o=>[o.selector,o])),e&&this.setTemplate(e)}preConstruct(){this.wireTemplate(this.getGui()),this.addGlobalCss()}wireTemplate(e,t){e&&this.gos&&(this.applyElementsToComponent(e),this.createChildComponentsFromTags(e,t))}getCompId(){return this.compId}getDataRefAttribute(e){return e.getAttribute?e.getAttribute(Gd):null}applyElementsToComponent(e,t,o,s=null){if(t===void 0&&(t=this.getDataRefAttribute(e)),t){const i=this[t];if(i===W)this[t]=s??e;else{const n=o?.[t];if(!this.suppressDataRefValidation&&!n)throw new Error(`data-ref: ${t} on ${this.constructor.name} with ${i}`)}}}createChildComponentsFromTags(e,t){const o=[];for(const s of e.childNodes??[])o.push(s);for(const s of o){if(!(s instanceof HTMLElement))continue;const i=this.createComponentFromElement(s,n=>{const r=n.getGui();if(r)for(const a of s.attributes??[])r.setAttribute(a.name,a.value)},t);if(i){if(i.addItems&&s.children.length){this.createChildComponentsFromTags(s,t);const n=Array.prototype.slice.call(s.children);i.addItems(n)}this.swapComponentForNode(i,e,s)}else s.childNodes&&this.createChildComponentsFromTags(s,t)}}createComponentFromElement(e,t,o){const s=e.nodeName,i=this.getDataRefAttribute(e),n=s.indexOf("AG-")===0,r=n?this.componentSelectors.get(s):null;let a=null;if(r){const l=o&&i?o[i]:void 0;a=new r.component(l),a.setParentComponent(this),this.createBean(a,null,t)}else if(n)throw new Error(`selector: ${s}`);return this.applyElementsToComponent(e,i,o,a),a}swapComponentForNode(e,t,o){const s=e.getGui();t.replaceChild(s,o),t.insertBefore(document.createComment(o.nodeName),s),this.addDestroyFunc(this.destroyBean.bind(this,e))}activateTabIndex(e,t){const o=t??this.gos.get("tabIndex");e||(e=[]),e.length||e.push(this.getGui());for(const s of e)s.setAttribute("tabindex",o.toString())}setTemplate(e,t,o){let s;typeof e=="string"||e==null?s=ba(e):s=Lo(e),this.setTemplateFromElement(s,t,o)}setTemplateFromElement(e,t,o,s=!1){if(this.eGui=e,this.suppressDataRefValidation=s,t)for(let i=0;i<t.length;i++){const n=t[i];this.componentSelectors.set(n.selector,n)}this.wireTemplate(e,o)}getGui(){return this.eGui}getFocusableElement(){return this.eGui}getAriaElement(){return this.getFocusableElement()}setParentComponent(e){this.parentComponent=e}getParentComponent(){return this.parentComponent}setGui(e){this.eGui=e}queryForHtmlElement(e){return this.eGui.querySelector(e)}getContainerAndElement(e,t){let o=t;return e==null?null:(o||(o=this.eGui),ya(e)?{element:e,parent:o}:{element:e.getGui(),parent:o})}prependChild(e,t){const{element:o,parent:s}=this.getContainerAndElement(e,t)||{};!o||!s||s.prepend(o)}appendChild(e,t){const{element:o,parent:s}=this.getContainerAndElement(e,t)||{};!o||!s||s.appendChild(o)}isDisplayed(){return this.displayed}setVisible(e,t={}){if(e!==this.visible){this.visible=e;const{skipAriaHidden:o}=t;$p(this.eGui,e,{skipAriaHidden:o})}}setDisplayed(e,t={}){if(e!==this.displayed){this.displayed=e;const{skipAriaHidden:o}=t;fe(this.eGui,e,{skipAriaHidden:o});const s={type:"displayChanged",visible:this.displayed};this.dispatchLocalEvent(s)}}destroy(){this.parentComponent&&(this.parentComponent=void 0),super.destroy()}addGuiEventListener(e,t,o){this.eGui.addEventListener(e,t,o),this.addDestroyFunc(()=>this.eGui.removeEventListener(e,t))}addCss(e){this.cssManager.toggleCss(e,!0)}removeCss(e){this.cssManager.toggleCss(e,!1)}toggleCss(e,t){this.cssManager.toggleCss(e,t)}registerCSS(e){this.css===Nl?(this.css=[e],this.addGlobalCss()):(this.css||(this.css=[]),this.css.push(e))}addGlobalCss(){if(Array.isArray(this.css)){const e="component-"+Object.getPrototypeOf(this)?.constructor?.name;for(const t of this.css??[])this.beans.environment.addGlobalCSS(t,e)}this.css=Nl}},Nl=Symbol(),ye=class extends Ps{},zn,_n,Un,$n,Ar,kr,Kn;function po(){return zn===void 0&&(zn=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)),zn}function ws(){return _n===void 0&&(_n=/(firefox)/i.test(navigator.userAgent)),_n}function yu(){return Un===void 0&&(Un=/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)),Un}function Mo(){return $n===void 0&&($n=/iPad|iPhone|iPod/.test(navigator.platform)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1),$n}function Lr(e){if(!e)return null;const t=e.tabIndex,o=e.getAttribute("tabIndex");return t===-1&&(o===null||o===""&&!ws())?null:t.toString()}function sC(){if(Kn!==void 0)return Kn;if(!document.body)return-1;let e=1e6;const t=ws()?6e6:1e9,o=document.createElement("div");for(document.body.appendChild(o);;){const s=e*2;if(o.style.height=s+"px",s>t||o.clientHeight!==s)break;e=s}return o.remove(),Kn=e,e}function ka(){return kr==null&&Ru(),kr}function Ru(){const e=document.body,t=document.createElement("div");t.style.width=t.style.height="100px",t.style.opacity="0",t.style.overflow="scroll",t.style.msOverflowStyle="scrollbar",t.style.position="absolute",e.appendChild(t);let o=t.offsetWidth-t.clientWidth;o===0&&t.clientWidth===0&&(o=null),t.parentNode&&t.remove(),o!=null&&(kr=o,Ar=o===0)}function Fu(){return Ar==null&&Ru(),Ar}var Or=!1,on=0;function iC(e){on>0||(e.addEventListener("keydown",sn),e.addEventListener("mousedown",sn))}function nC(e){on>0||(e.removeEventListener("keydown",sn),e.removeEventListener("mousedown",sn))}function sn(e){const t=Or,o=e.type==="keydown";o&&(e.ctrlKey||e.metaKey||e.altKey)||t!==o&&(Or=o)}function rC(e){const t=Pe(e);return iC(t),on++,()=>{on--,nC(t)}}function Eu(){return Or}function To(e,t,o=!1){const s=Up;let i=Id;t&&(i+=", "+t),o&&(i+=', [tabindex="-1"]');const n=Array.prototype.slice.apply(e.querySelectorAll(s)).filter(l=>vt(l)),r=Array.prototype.slice.apply(e.querySelectorAll(i));return r.length?((l,c)=>l.filter(d=>c.indexOf(d)===-1))(n,r):n}function Ho(e,t=!1,o=!1,s=!1){const i=To(e,s?".ag-tab-guard":null,o),n=t?he(i):i[0];return n?(n.focus({preventScroll:!0}),!0):!1}function $o(e,t,o,s){const i=To(t,o?':not([tabindex="-1"])':null),n=ve(e);let r;o?r=i.findIndex(l=>l.contains(n)):r=i.indexOf(n);const a=r+(s?-1:1);return a<0||a>=i.length?null:i[a]}function xu(e,t=5){let o=0;for(;e&&Lr(e)===null&&++o<=t;)e=e.parentElement;return Lr(e)===null?null:e}var aC="ag-focus-managed",Pu=class extends qe{constructor(e,t={isStopPropagation:()=>!1,stopPropagation:()=>{}},o={}){super(),this.eFocusable=e,this.stopPropagationCallbacks=t,this.callbacks=o,this.callbacks={shouldStopEventPropagation:()=>!1,onTabKeyDown:s=>{if(s.defaultPrevented)return;const i=$o(this.beans,this.eFocusable,!1,s.shiftKey);i&&(i.focus(),s.preventDefault())},...o}}postConstruct(){const{eFocusable:e,callbacks:{onFocusIn:t,onFocusOut:o}}=this;e.classList.add(aC),this.addKeyDownListeners(e),t&&this.addManagedElementListeners(e,{focusin:t}),o&&this.addManagedElementListeners(e,{focusout:o})}addKeyDownListeners(e){this.addManagedElementListeners(e,{keydown:t=>{if(t.defaultPrevented||this.stopPropagationCallbacks.isStopPropagation(t))return;const{callbacks:o}=this;if(o.shouldStopEventPropagation(t)){this.stopPropagationCallbacks.stopPropagation(t);return}t.key===R.TAB?o.onTabKeyDown(t):o.handleKeyDown&&o.handleKeyDown(t)}})}},Du="__ag_Grid_Stop_Propagation";function Bo(e){e[Du]=!0}function zt(e){return e[Du]===!0}var La={isStopPropagation:zt,stopPropagation:Bo},li=class extends Pu{constructor(e,t){super(e,La,t)}},lC={applyFilter:"Apply",clearFilter:"Clear",resetFilter:"Reset",cancelFilter:"Cancel",textFilter:"Text Filter",numberFilter:"Number Filter",bigintFilter:"BigInt Filter",dateFilter:"Date Filter",setFilter:"Set Filter",filterOoo:"Filter...",empty:"Choose one",equals:"Equals",notEqual:"Does not equal",lessThan:"Less than",greaterThan:"Greater than",inRange:"Between",inRangeStart:"From",inRangeEnd:"To",lessThanOrEqual:"Less than or equal to",greaterThanOrEqual:"Greater than or equal to",contains:"Contains",notContains:"Does not contain",startsWith:"Begins with",endsWith:"Ends with",blank:"Blank",notBlank:"Not blank",before:"Before",after:"After",andCondition:"AND",orCondition:"OR",dateFormatOoo:"yyyy-mm-dd",filterSummaryInactive:"is (All)",filterSummaryContains:"contains",filterSummaryNotContains:"does not contain",filterSummaryTextEquals:"equals",filterSummaryTextNotEqual:"does not equal",filterSummaryStartsWith:"begins with",filterSummaryEndsWith:"ends with",filterSummaryBlank:"is blank",filterSummaryNotBlank:"is not blank",filterSummaryEquals:"=",filterSummaryNotEqual:"!=",filterSummaryGreaterThan:">",filterSummaryGreaterThanOrEqual:">=",filterSummaryLessThan:"<",filterSummaryLessThanOrEqual:"<=",filterSummaryInRange:"between",yesterday:"Yesterday",today:"Today",tomorrow:"Tomorrow",last7Days:"Last 7 Days",lastWeek:"Last Week",thisWeek:"This Week",nextWeek:"Next Week",last30Days:"Last 30 Days",lastMonth:"Last Month",thisMonth:"This Month",nextMonth:"Next Month",last90Days:"Last 90 Days",lastQuarter:"Last Quarter",thisQuarter:"This Quarter",nextQuarter:"Next Quarter",lastYear:"Last Year",thisYear:"This Year",yearToDate:"Year To Date",nextYear:"Next Year",last6Months:"Last 6 Months",last12Months:"Last 12 Months",last24Months:"Last 24 Months",filterSummaryInRangeValues:e=>`(${e[0]}, ${e[1]})`,filterSummaryTextQuote:e=>`"${e[0]}"`,minDateValidation:e=>`Date must be after ${e[0]}`,maxDateValidation:e=>`Date must be before ${e[0]}`,strictMinValueValidation:e=>`Must be greater than ${e[0]}`,strictMaxValueValidation:e=>`Must be less than ${e[0]}`};function ft(e,t,o){return sf(e,lC,t,o)}function Oa(e,t){const{debounceMs:o}=e;return Rn(e)?(o!=null&&D(71),0):o??t}function Rn(e){return(e.buttons?.indexOf("apply")??-1)>=0}function Mu(e,t,o,s){let i=ft(e,o);if(typeof t=="function"){const n=ft(e,s);i=t({filterOptionKey:s,filterOption:n,placeholder:i})}else typeof t=="string"&&(i=t);return i}var cC=class extends ye{constructor(e,t){super(),this.filterNameKey=e,this.cssIdentifier=t,this.applyActive=!1,this.debouncePending=!1,this.defaultDebounceMs=0}postConstruct(){const e={tag:"div",cls:`ag-filter-body-wrapper ag-${this.cssIdentifier}-body-wrapper`,children:[this.createBodyTemplate()]};this.setTemplate(e,this.getAgComponents()),this.createManagedBean(new li(this.getFocusableElement(),{handleKeyDown:this.handleKeyDown.bind(this)})),this.positionableFeature=this.createBean(new tC(this.getPositionableElement(),{forcePopupParentAsOffsetParent:!0}))}handleKeyDown(e){}init(e){const t=e;this.setParams(t),this.setModelIntoUi(t.state.model,!0).then(()=>this.updateUiVisibility())}areStatesEqual(e,t){return e===t}refresh(e){const t=e,o=this.params;this.params=t;const{source:s,state:i,additionalEventAttributes:n}=t;s==="colDef"&&this.updateParams(t,o);const r=this.state;this.state=i;const a=n?.fromAction;return(a&&a!=="apply"||i.model!==r.model||!this.areStatesEqual(i.state,r.state))&&this.setModelIntoUi(i.model),!0}setParams(e){this.params=e,this.state=e.state,this.commonUpdateParams(e)}updateParams(e,t){this.commonUpdateParams(e,t)}commonUpdateParams(e,t){this.applyActive=Rn(e),this.setupApplyDebounced()}doesFilterPass(e){D(283);const{getHandler:t,model:o,column:s}=this.params;return t().doesFilterPass({...e,model:o,handlerParams:this.beans.colFilter.getHandlerParams(s)})}getFilterTitle(){return this.translate(this.filterNameKey)}isFilterActive(){return D(284),this.params.model!=null}setupApplyDebounced(){const e=Oa(this.params,this.defaultDebounceMs),t=xe(this,this.checkApplyDebounce.bind(this),e);this.applyDebounced=()=>{this.debouncePending=!0,t()}}checkApplyDebounce(){this.debouncePending&&(this.debouncePending=!1,this.doApplyModel())}getModel(){return D(285),this.params.model}setModel(e){D(286);const{beans:t,params:o}=this;return t.colFilter.setModelForColumnLegacy(o.column,e)}applyModel(e="api"){return this.doApplyModel()}canApply(e){return!0}doApplyModel(e){const{params:t,state:{valid:o=!0,model:s}}=this;if(!o)return!1;const i=!this.areModelsEqual(t.model,s);return i&&t.onAction("apply",e),i}onNewRowsLoaded(){}onUiChanged(e,t=!1){this.updateUiVisibility();const o=this.getModelFromUi(),s={model:o,state:this.getState(),valid:this.canApply(o)};this.state=s;const{params:i,gos:n,eventSvc:r,applyActive:a}=this;i.onStateChange(s),i.onUiChange(this.getUiChangeEventParams()),n.get("enableFilterHandlers")||r.dispatchEvent({type:"filterModified",column:i.column,filterInstance:this}),s.valid&&(e??(e=a?void 0:"debounce"),e==="immediately"?this.doApplyModel({afterFloatingFilter:t,afterDataChange:!1}):e==="debounce"&&this.applyDebounced())}getState(){}getUiChangeEventParams(){}afterGuiAttached(e){this.lastContainerType=e?.container,this.refreshFilterResizer(e?.container)}refreshFilterResizer(e){const{positionableFeature:t,gos:o}=this;if(!t)return;const s=e==="floatingFilter"||e==="columnFilter";s?(t.restoreLastSize(),t.setResizable(o.get("enableRtl")?{bottom:!0,bottomLeft:!0,left:!0}:{bottom:!0,bottomRight:!0,right:!0})):(t.removeSizeFromEl(),t.setResizable(!1)),t.constrainSizeToAvailableHeight(s)}afterGuiDetached(){this.checkApplyDebounce(),this.positionableFeature?.constrainSizeToAvailableHeight(!1)}destroy(){this.positionableFeature=this.destroyBean(this.positionableFeature),super.destroy()}translate(e,t){return ft(this,e,t)}getPositionableElement(){return this.getGui()}areModelsEqual(e,t){return e===t||e==null&&t==null?!0:e==null||t==null?!1:this.areNonNullModelsEqual(e,t)}},Ga=class extends Ps{isPopup(){return!0}setParentComponent(e){e.addCss("ag-has-popup"),super.setParentComponent(e)}destroy(){const e=this.parentComponent;e?.isAlive()&&e.getGui().classList.remove("ag-has-popup"),super.destroy()}},Fn=class extends Ga{constructor(){super(...arguments),this.errorMessages=null}init(e){this.params=e,this.initialiseEditor(e),this.eEditor.onValueChange(()=>e.validate())}destroy(){this.eEditor.destroy(),this.errorMessages=null,super.destroy()}};function Ot(e){const t=e.rowModel;return t.getType()==="clientSide"?t:void 0}function En(e){const t=e.rowModel;return t.getType()==="infinite"?t:void 0}function dC(e){const t=e.rowModel;return t.getType()==="serverSide"?t:void 0}var Wl="row-group-",Ha="t-",Ba="b-",uC=0,co=class{constructor(e){this.id=void 0,this.destroyed=!1,this._groupData=void 0,this.master=!1,this.detail=void 0,this.rowIndex=null,this.field=null,this.rowGroupColumn=null,this.key=null,this.sourceRowIndex=-1,this._leafs=void 0,this.childrenAfterGroup=null,this.childrenAfterFilter=null,this.childrenAfterAggFilter=null,this.childrenAfterSort=null,this.allChildrenCount=null,this.childrenMapped=null,this.treeParent=null,this.treeNodeFlags=0,this._expanded=void 0,this.displayed=!1,this.rowTop=null,this.oldRowTop=null,this.selectable=!0,this.__objectId=uC++,this.alreadyRendered=!1,this.formulaRowIndex=null,this.hovered=!1,this.__selected=!1,this.beans=e}get groupData(){const e=this._groupData;return e!==void 0?e:this.footer?this.sibling?.groupData:this.beans.groupStage?.loadGroupData(this)??null}set groupData(e){this._groupData=e}get primaryRow(){let e=this.footer&&this.sibling?this.sibling:this;const{pinnedSibling:t}=e;return t&&e.rowPinned&&(e=t,e.footer&&e.sibling&&(e=e.sibling)),e}get allLeafChildren(){const e=this._leafs;return e===void 0?this.beans.groupStage?.loadLeafs?.(this)??null:e}set allLeafChildren(e){this._leafs=e}get expanded(){const e=this.beans.expansionSvc;return e?e.isExpanded(this):this.level===-1?!0:!!this._expanded}set expanded(e){this._expanded=e}setData(e){this.setDataCommon(e,!1)}updateData(e){this.setDataCommon(e,!0)}setDataCommon(e,t){const{valueCache:o,eventSvc:s}=this.beans,i=this.data;this.data=e,o?.onDataChanged(),this.updateDataOnDetailNode(),this.resetQuickFilterAggregateText();const n=this.createDataChangedEvent(e,i,t);if(this.__localEventService?.dispatchEvent(n),this.sibling){this.sibling.data=e;const a=this.sibling.createDataChangedEvent(e,i,t);this.sibling.__localEventService?.dispatchEvent(a)}s.dispatchEvent({type:"rowNodeDataChanged",node:this});const r=this.pinnedSibling;r&&(r.data=e,r.__localEventService?.dispatchEvent(r.createDataChangedEvent(e,i,t)),s.dispatchEvent({type:"rowNodeDataChanged",node:r}))}updateDataOnDetailNode(){const e=this.detailNode;e&&(e.data=this.data)}createDataChangedEvent(e,t,o){return{type:"dataChanged",node:this,oldData:t,newData:e,update:o}}getRowIndexString(){return this.rowIndex==null?(ce(13),null):this.rowPinned==="top"?Ha+this.rowIndex:this.rowPinned==="bottom"?Ba+this.rowIndex:this.rowIndex.toString()}setDataAndId(e,t){const{selectionSvc:o}=this.beans,s=o?.createDaemonNode?.(this),i=this.data;this.data=e,this.updateDataOnDetailNode(),this.setId(t),o&&(o.updateRowSelectable(this),o.syncInRowNode(this,s));const n=this.createDataChangedEvent(e,i,!1);this.__localEventService?.dispatchEvent(n)}setId(e){const t=vs(this.beans.gos);if(t)if(this.data){const o=this.parent?.getRoute()??[];this.id=t({data:this.data,parentKeys:o.length>0?o:void 0,level:this.level,rowPinned:this.rowPinned}),this.id.startsWith(Wl)&&ce(14,{groupPrefix:Wl})}else this.id=void 0;else this.id=e}setRowTop(e){if(this.oldRowTop=this.rowTop,this.rowTop===e)return;this.rowTop=e,this.dispatchRowEvent("topChanged");const t=e!==null;this.displayed!==t&&(this.displayed=t,this.dispatchRowEvent("displayedChanged"))}clearRowTopAndRowIndex(){this.oldRowTop=null,this.setRowTop(null),this.setRowIndex(null)}setHovered(e){this.hovered=e}isHovered(){return this.hovered}setRowHeight(e,t=!1){this.rowHeight=e,this.rowHeightEstimated=t,this.dispatchRowEvent("heightChanged")}setExpanded(e,t,o){this.beans.expansionSvc?.setExpanded(this,e,t,o)}setDataValue(e,t,o){const{colModel:s,valueSvc:i,gos:n,editSvc:r}=this.beans;if(e==null)return!1;let a=s.getCol(e)??s.getColDefCol(e);if(!a)return!1;if(!this.group){const d=a.getColDef();d.pivotValueColumn&&(a=d.pivotValueColumn)}const l=i.getValueForDisplay({column:a,node:this,from:"data"}).value;if(n.get("readOnlyEdit")){const{beans:{eventSvc:d},data:u,rowIndex:h,rowPinned:g}=this;return d.dispatchEvent({type:"cellEditRequest",event:null,rowIndex:h,rowPinned:g,column:a,colDef:a.colDef,data:u,node:this,oldValue:l,newValue:t,value:t,source:o}),!1}if(o!=="data"&&r&&!r.committing){const d=r.setDataValue({rowNode:this,column:a},t,o);if(d!=null)return d}const c=i.setValue(this,a,t,o);return this.dispatchCellChangedEvent(a,t,l),c&&this.pinnedSibling?.dispatchCellChangedEvent(a,t,l),c}getDataValue(e,t="data"){const{colModel:o,valueSvc:s,formula:i}=this.beans;if(e==null)return;const n=o.getCol(e)??o.getColDefCol(e);if(!n)return;const r=t==="data-raw",a=r||t==="value"?"data":t;let l=s.getValue(n,this,a,r);if(!r&&(i&&n.isAllowFormula()&&i.isFormula(l)&&(l=i.resolveValue(n,this)),t!=="data"&&n.getAggFunc()&&typeof l=="object"&&l!=null)){if(typeof l.toNumber=="function")return l.toNumber();if("value"in l)return l.value}return l}updateHasChildren(){let e=this.group&&!this.footer||!!this.childrenAfterGroup?.length;const{rowChildrenSvc:t}=this.beans;t&&(e=t.getHasChildrenValue(this)),e!==this.__hasChildren&&(this.__hasChildren=!!e,this.dispatchRowEvent("hasChildrenChanged"))}hasChildren(){return this.__hasChildren==null&&this.updateHasChildren(),this.__hasChildren}dispatchCellChangedEvent(e,t,o){const s={type:"cellChanged",node:this,column:e,newValue:t,oldValue:o};this.__localEventService?.dispatchEvent(s)}resetQuickFilterAggregateText(){this.quickFilterAggregateText=null}isExpandable(){return this.beans.expansionSvc?.isExpandable(this)??!1}isSelected(){if(this.footer)return this.sibling.isSelected();const e=this.rowPinned&&this.pinnedSibling;return e?e.isSelected():this.__selected}depthFirstSearch(e){const t=this.childrenAfterGroup;if(t)for(let o=0,s=t.length;o<s;++o)t[o].depthFirstSearch(e);e(this)}getAggregatedChildren(e,t){const o=this.beans;return o.aggChildrenSvc?.getAggregatedChildren(this,o.colModel.getCol(e),t)??[]}dispatchRowEvent(e){this.__localEventService?.dispatchEvent({type:e,node:this})}setSelected(e,t=!1,o="api"){this.beans.selectionSvc?.setNodesSelected({nodes:[this],newValue:e,clearSelection:t,source:o})}isRowPinned(){return!!this.rowPinned}__addEventListener(e,t){(this.__localEventService??(this.__localEventService=new Ao)).addEventListener(e,t)}__removeEventListener(e,t){this.removeLocalListener(e,t)}addEventListener(e,t){this.beans.validation?.checkRowEvents(e);const o=this.__localEventService??(this.__localEventService=new Ao);this.frameworkEventListenerService=this.beans.frameworkOverrides.createLocalEventListenerWrapper?.(this.frameworkEventListenerService,o);const s=this.frameworkEventListenerService?.wrap(e,t)??t;o.addEventListener(e,s)}removeEventListener(e,t){const o=this.frameworkEventListenerService?.unwrap(e,t)??t;this.removeLocalListener(e,o)}removeLocalListener(e,t){const o=this.__localEventService;o&&(o.removeEventListener(e,t),o.noRegisteredListenersExist()&&(this.__localEventService=null))}isFullWidthCell(){if(D(61),this.detail)return!0;const e=this.beans.gos.getCallback("isFullWidthRow");return e?e({rowNode:this}):!1}getRoute(){if(this.level===-1)return[];if(this.key==null)return;const e=[];let t=this;for(;t?.key!=null;)e.push(t.key),t=t.parent;return e.reverse()}setRowIndex(e){this.rowIndex!==e&&(this.rowIndex=e,this.dispatchRowEvent("rowIndexChanged"))}setAllChildrenCount(e){this.allChildrenCount!==e&&(this.allChildrenCount=e,this.dispatchRowEvent("allChildrenCountChanged"))}setUiLevel(e){this.uiLevel!==e&&(this.uiLevel=e,this.dispatchRowEvent("uiLevelChanged"))}getFirstChild(){const e=this.childStore;return e?e.getFirstNode():this.childrenAfterSort?.[0]??null}_destroy(e){if(this.destroyed)return!1;this.destroyed=!0;const t=this.pinnedSibling;if(t?.rowPinned&&!this.rowPinned&&this.beans.pinnedRowModel?.pinRow(t,null),e?this.clearRowTopAndRowIndex():(this.setRowTop(null),this.setRowIndex(null)),!this.footer){const o=this.detailNode;o&&o._destroy(e);const s=this.sibling;s&&s._destroy(e)}return!0}};function hC(e,t,o){return K(t,{type:o,node:e,data:e.data,rowIndex:e.rowIndex,rowPinned:e.rowPinned})}var gC=new Set(["__autoHeights","__checkAutoHeightsDebounced","__localEventService","__objectId","_groupData","_leafs","childStore","groupValue","oldRowTop","sticky","treeNodeFlags","treeParent"]),pC=(e,t)=>{const o=new co(t);for(const s of Object.keys(e))gC.has(s)||(o[s]=e[s]);return o.oldRowTop=null,o},Gr=(e,t,o)=>{if(!o)return;let s=o.rowIndex;if(s==null)return;s+=t;const i=e.getRowCount();for(;s>=0&&s<i;){const n=e.getRow(s);if(!n||!n.footer&&!n.detail)return n;s+=t}},zl=class{constructor(e,t){this.beans=e,this.floating=t,this.all=new Set,this.visible=new Set,this.order=[],this.queued=new Set}size(){return this.visible.size}add(e){const{all:t,visible:o,order:s}=this;t.has(e)||(t.add(e),o.add(e),s.push(e),this.sort())}delete(e){this.all.delete(e),this.visible.delete(e),this.queued.delete(e.id),At(this.order,e)}has(e){return this.visible.has(e)}forEach(e){this.order.forEach(e)}getByIndex(e){return this.order[e]}getById(e){for(const t of this.visible)if(t.id==e)return t}clear(){const{all:e,visible:t,order:o,queued:s}=this;e.clear(),s.clear(),t.clear(),o.length=0}sort(){const{sortSvc:e,rowNodeSorter:t,gos:o}=this.beans,s=e?.getSortOptions()??[],i=this.order,n=CC(i);if(i.sort((a,l)=>t?.compareRowNodes(s,a,l)||(a.pinnedSibling?.rowIndex??0)-(l.pinnedSibling?.rowIndex??0)),!n)return;const r=iu(o);r==="bottom"||r==="pinnedBottom"?this.order.push(n):this.order.unshift(n)}hide(e){const{all:t,visible:o}=this,s=o.size;return t.forEach(i=>e(i)?o.delete(i):o.add(i)),this.order=Array.from(o),this.sort(),s!=o.size}queue(e){this.queued.add(e)}unqueue(e){this.queued.delete(e)}forEachQueued(e){this.queued.forEach(e)}};function Tu(e){if(e.level===-1)return!0;const t=e.parent;return t?.childrenAfterSort?.some(o=>o==e)?Tu(t):!1}function qn(e,t){const{gos:o,rowModel:s,filterManager:i}=e;return xs(o)?!s.getRowNode(t.id):i?.isAnyFilterPresent()?!Tu(t):o.get("pivotMode")?!t.group:!1}function fC(e){return!!e.footer&&e.level===-1}function mC(e){return!!e.pinnedSibling&&fC(e.pinnedSibling)}function CC(e){const t=e.findIndex(mC);if(t>-1)return e.splice(t,1)?.[0]}var _l=class extends x{constructor(){super(...arguments),this.csrm=null}postConstruct(){const{gos:e,beans:t}=this;this.top=new zl(t,"top"),this.bottom=new zl(t,"bottom"),this.csrm=Ot(t)??null;const o=i=>qn(t,i.pinnedSibling),s=()=>{const i=e.get("isRowPinned");i&&e.get("enableRowPinning")&&t.rowModel.forEachNode(n=>this.pinRow(n,i(n)),!0),this.refreshRowPositions(),this.dispatchRowPinnedEvents()};this.addManagedEventListeners({stylesChanged:this.onGridStylesChanges.bind(this),modelUpdated:({keepRenderedRows:i})=>{this.tryToEmptyQueues(),this.pinGrandTotalRow();let n=!1;this.forContainers(a=>{n||(n=a.hide(o))});const r=this.refreshRowPositions();(!i||r||n)&&this.dispatchRowPinnedEvents()},columnRowGroupChanged:()=>{this.forContainers(wC),this.refreshRowPositions()},rowNodeDataChanged:({node:i})=>{(e.get("isRowPinnable")?.(i)??!0)||this.pinRow(i,null)},firstDataRendered:s}),this.addManagedPropertyListener("pivotMode",()=>{this.forContainers(i=>i.hide(o)),this.dispatchRowPinnedEvents()}),this.addManagedPropertyListener("grandTotalRow",({currentValue:i})=>{this._grandTotalPinned=i==="pinnedBottom"?"bottom":i==="pinnedTop"?"top":null}),this.addManagedPropertyListener("isRowPinned",s)}destroy(){this.reset(!1),super.destroy()}reset(e=!0){this.forContainers(t=>{const o=[];t.forEach(s=>o.push(s)),o.forEach(s=>this.pinRow(s,null)),t.clear()}),e&&this.dispatchRowPinnedEvents()}pinRow(e,t,o){if(t!=null&&e.destroyed)return;if(e.footer){const r=e.level;if(r>-1)return;if(r===-1){this._grandTotalPinned=t,this.csrm?.reMapRows();return}}const s=e.rowPinned??e.pinnedSibling?.rowPinned;if(s!=null&&t!=null&&t!=s){const r=e.rowPinned?e:e.pinnedSibling,a=e.rowPinned?e.pinnedSibling:e;this.pinRow(r,null,o),this.pinRow(a,t,o);return}const n=o&&bC(this.beans,e,o);if(n){n.forEach(r=>this.pinRow(r,t));return}if(t==null){const r=e.rowPinned?e:e.pinnedSibling,a=this.findPinnedRowNode(r);if(!a)return;a.delete(r);const l=r.pinnedSibling;jn(r),this.refreshRowPositions(t),this.dispatchRowPinnedEvents(l)}else{const r=Ul(this.beans,e,t),a=this.getContainer(t);a.add(r),qn(this.beans,e)&&a.hide(l=>qn(this.beans,l.pinnedSibling)),this.refreshRowPositions(t),this.dispatchRowPinnedEvents(e)}}isManual(){return!0}isEmpty(e){return this.getContainer(e).size()===0}isRowsToRender(e){return!this.isEmpty(e)}ensureRowHeightsValid(){let e=!1,t=0;const o=s=>{if(s.rowHeightEstimated){const i=ro(this.beans,s);s.setRowTop(t),s.setRowHeight(i.height),t+=i.height,e=!0}};return this.bottom.forEach(o),t=0,this.top.forEach(o),this.eventSvc.dispatchEvent({type:"pinnedHeightChanged"}),e}getPinnedTopTotalHeight(){return $l(this.top)}getPinnedBottomTotalHeight(){return $l(this.bottom)}getPinnedTopRowCount(){return this.top.size()}getPinnedBottomRowCount(){return this.bottom.size()}getPinnedTopRow(e){return this.top.getByIndex(e)}getPinnedBottomRow(e){return this.bottom.getByIndex(e)}getPinnedRowById(e,t){return this.getContainer(t).getById(e)}forEachPinnedRow(e,t){this.getContainer(e).forEach(t)}getPinnedState(){const e=t=>{const o=[];return this.forEachPinnedRow(t,s=>{const i=s.pinnedSibling?.id;i!=null&&o.push(i)}),o};return{top:e("top"),bottom:e("bottom")}}setPinnedState(e){this.forContainers((t,o)=>{for(const s of e[o]){const i=this.beans.rowModel.getRowNode(s);i?this.pinRow(i,o):t.queue(s)}})}getGrandTotalPinned(){return this._grandTotalPinned}setGrandTotalPinned(e){this._grandTotalPinned=e}tryToEmptyQueues(){this.forContainers((e,t)=>{const o=new Set;e.forEachQueued(s=>{const i=this.beans.rowModel.getRowNode(s);i&&o.add(i)});for(const s of o)e.unqueue(s.id),this.pinRow(s,t)})}pinGrandTotalRow(){const{csrm:e,beans:t,_grandTotalPinned:o}=this;if(!e)return;const s=e.rootNode?.sibling;if(!s)return;const i=s.pinnedSibling,n=i&&this.findPinnedRowNode(i);if(o){if(n&&n.floating!==o&&(jn(i),n.delete(i)),!n||n.floating!==o){const r=Ul(t,s,o);this.getContainer(o).add(r)}}else{if(!n)return;jn(i),n.delete(i)}}onGridStylesChanges(e){e.rowHeightChanged&&this.forContainers(t=>t.forEach(o=>o.setRowHeight(o.rowHeight,!0)))}getContainer(e){return e==="top"?this.top:this.bottom}findPinnedRowNode(e){if(this.top.has(e))return this.top;if(this.bottom.has(e))return this.bottom}refreshRowPositions(e){const t=s=>vC(this.beans,s);if(e)return t(this.getContainer(e));let o=!1;return this.forContainers(s=>{const i=t(s);o||(o=i)}),o}forContainers(e){e(this.top,"top"),e(this.bottom,"bottom")}dispatchRowPinnedEvents(e){this.eventSvc.dispatchEvent({type:"pinnedRowsChanged"}),e?.dispatchRowEvent("rowPinned")}};function vC(e,t){let o=0,s=!1;return t.forEach((i,n)=>{if(s||(s=i.rowTop!==o),i.setRowTop(o),i.rowHeightEstimated||i.rowHeight==null){const r=ro(e,i).height;s||(s=i.rowHeight!==r),i.setRowHeight(r)}i.setRowIndex(n),o+=i.rowHeight}),s}function Ul(e,t,o){if(t.pinnedSibling)return t.pinnedSibling;const s=pC(t,e);s.setRowTop(null),s.setRowIndex(null),s.rowPinned=o;const i=o==="top"?Ha:Ba;return s.id=`${i}${o}-${t.id}`,s.pinnedSibling=t,t.pinnedSibling=s,s}function jn(e){if(!e.pinnedSibling)return;e.rowPinned=null,e._destroy(!1);const t=e.pinnedSibling;e.pinnedSibling=void 0,t&&(t.pinnedSibling=void 0,t.rowPinned=null)}function wC(e){const t=new Set;e.forEach(o=>{o.group&&t.add(o)}),t.forEach(o=>e.delete(o))}function bC(e,t,o){const{rowSpanSvc:s}=e,i=(o&&s?.isCellSpanning(o,t))??!1;if(o&&i)return s?.getCellSpan(o,t)?.spannedNodes}function $l(e){const t=e.size();if(t===0)return 0;const o=e.getByIndex(t-1);return o===void 0?0:o.rowTop+o.rowHeight}var Kl=class extends x{constructor(){super(...arguments),this.nextId=0,this.pinnedTopRows={cache:{},order:[]},this.pinnedBottomRows={cache:{},order:[]}}postConstruct(){const e=this.gos;this.setPinnedRowData(e.get("pinnedTopRowData"),"top"),this.setPinnedRowData(e.get("pinnedBottomRowData"),"bottom"),this.addManagedPropertyListener("pinnedTopRowData",t=>this.setPinnedRowData(t.currentValue,"top")),this.addManagedPropertyListener("pinnedBottomRowData",t=>this.setPinnedRowData(t.currentValue,"bottom")),this.addManagedEventListeners({stylesChanged:this.onGridStylesChanges.bind(this)})}reset(){}isEmpty(e){return this.getCache(e).order.length===0}isRowsToRender(e){return!this.isEmpty(e)}isManual(){return!1}pinRow(e,t){}onGridStylesChanges(e){if(e.rowHeightChanged){const t=o=>{o.setRowHeight(o.rowHeight,!0)};Is(this.pinnedBottomRows,t),Is(this.pinnedTopRows,t)}}ensureRowHeightsValid(){let e=!1,t=0;const o=s=>{if(s.rowHeightEstimated){const i=ro(this.beans,s);s.setRowTop(t),s.setRowHeight(i.height),t+=i.height,e=!0}};return Is(this.pinnedBottomRows,o),t=0,Is(this.pinnedTopRows,o),this.eventSvc.dispatchEvent({type:"pinnedHeightChanged"}),e}setPinnedRowData(e,t){this.updateNodesFromRowData(e,t),this.eventSvc.dispatchEvent({type:"pinnedRowDataChanged"})}updateNodesFromRowData(e,t){const o=this.getCache(t);if(e===void 0){o.order.length=0,o.cache={};return}const s=vs(this.gos),i=t==="top"?Ha:Ba,n=new Set(o.order),r=[],a=new Set;let l=0,c=-1;for(const d of e){const u=s?.({data:d,level:0,rowPinned:t})??i+this.nextId++;if(a.has(u)){D(96,{id:u,data:d});continue}c++,a.add(u),r.push(u);const h=zs(o,u);if(h!==void 0)h.data!==d&&h.updateData(d),l+=this.setRowTopAndRowIndex(h,l,c),n.delete(u);else{const g=new co(this.beans);g.id=u,g.data=d,g.rowPinned=t,l+=this.setRowTopAndRowIndex(g,l,c),o.cache[u]=g,o.order.push(u)}}for(const d of n)zs(o,d)?.clearRowTopAndRowIndex(),delete o.cache[d];o.order=r}setRowTopAndRowIndex(e,t,o){return e.setRowTop(t),e.setRowHeight(ro(this.beans,e).height),e.setRowIndex(o),e.rowHeight}getPinnedTopTotalHeight(){return ql(this.pinnedTopRows)}getPinnedBottomTotalHeight(){return ql(this.pinnedBottomRows)}getPinnedTopRowCount(){return Br(this.pinnedTopRows)}getPinnedBottomRowCount(){return Br(this.pinnedBottomRows)}getPinnedTopRow(e){return Hr(this.pinnedTopRows,e)}getPinnedBottomRow(e){return Hr(this.pinnedBottomRows,e)}getPinnedRowById(e,t){return zs(this.getCache(t),e)}forEachPinnedRow(e,t){return Is(this.getCache(e),t)}getCache(e){return e==="top"?this.pinnedTopRows:this.pinnedBottomRows}getPinnedState(){return{top:[],bottom:[]}}setPinnedState(){}getGrandTotalPinned(){}setGrandTotalPinned(){}};function ql(e){const t=Br(e);if(t===0)return 0;const o=Hr(e,t-1);return o===void 0?0:o.rowTop+o.rowHeight}function zs(e,t){return e.cache[t]}function Hr(e,t){return zs(e,e.order[t])}function Is(e,t){e.order.forEach((o,s)=>{const i=zs(e,o);i&&t(i,s)})}function Br(e){return e.order.length}var SC=class extends x{constructor(){super(...arguments),this.beanName="pinnedRowModel"}postConstruct(){const{gos:e}=this,t=()=>{const o=e.get("enableRowPinning"),s=iu(e),n=!!o||(s==="pinnedBottom"||s==="pinnedTop"),r=n?this.inner instanceof Kl:this.inner instanceof _l;this.inner&&r&&this.destroyBean(this.inner),(r||!this.inner)&&(this.inner=this.createManagedBean(n?new _l:new Kl))};this.addManagedPropertyListeners(["enableRowPinning","grandTotalRow"],t),t()}reset(){return this.inner.reset()}isEmpty(e){return this.inner.isEmpty(e)}isManual(){return this.inner.isManual()}isRowsToRender(e){return this.inner.isRowsToRender(e)}pinRow(e,t,o){return this.inner.pinRow(e,t,o)}ensureRowHeightsValid(){return this.inner.ensureRowHeightsValid()}getPinnedRowById(e,t){return this.inner.getPinnedRowById(e,t)}getPinnedTopTotalHeight(){return this.inner.getPinnedTopTotalHeight()}getPinnedBottomTotalHeight(){return this.inner.getPinnedBottomTotalHeight()}getPinnedTopRowCount(){return this.inner.getPinnedTopRowCount()}getPinnedBottomRowCount(){return this.inner.getPinnedBottomRowCount()}getPinnedTopRow(e){return this.inner.getPinnedTopRow(e)}getPinnedBottomRow(e){return this.inner.getPinnedBottomRow(e)}forEachPinnedRow(e,t){return this.inner.forEachPinnedRow(e,t)}getPinnedState(){return this.inner.getPinnedState()}setPinnedState(e){return this.inner.setPinnedState(e)}setGrandTotalPinned(e){return this.inner.setGrandTotalPinned(e)}getGrandTotalPinned(){return this.inner.getGrandTotalPinned()}},yC=500,RC=550,fi,FC=e=>{if(!fi)fi=new WeakSet;else if(fi.has(e))return!1;return fi.add(e),!0},bo=class{constructor(e,t=!1){this.eElement=e,this.preventClick=t,this.startListener=null,this.handlers=[],this.eventSvc=void 0,this.touchStart=null,this.lastTapTime=null,this.longPressTimer=0,this.moved=!1}addEventListener(e,t){let o=this.eventSvc;if(!o){if(o===null)return;this.eventSvc=o=new Ao;const s=this.onTouchStart.bind(this);this.startListener=s,this.eElement.addEventListener("touchstart",s,{passive:!0})}o.addEventListener(e,t)}removeEventListener(e,t){this.eventSvc?.removeEventListener(e,t)}onTouchStart(e){if(this.touchStart||!FC(e))return;const t=e.touches[0];this.touchStart=t;const o=this.handlers;if(!o.length){const s=this.eElement,i=s.ownerDocument,n=this.onTouchMove.bind(this),r=this.onTouchEnd.bind(this),a=this.onTouchCancel.bind(this),l={passive:!0},c={passive:!1};Di(o,[s,"touchmove",n,l],[i,"touchcancel",a,l],[i,"touchend",r,c],[i,"contextmenu",to,c])}this.clearLongPress(),this.longPressTimer=window.setTimeout(()=>{this.longPressTimer=0,this.touchStart===t&&!this.moved&&(this.moved=!0,this.eventSvc?.dispatchEvent({type:"longTap",touchStart:t,touchEvent:e}))},RC)}onTouchMove(e){const{moved:t,touchStart:o}=this;if(!t&&o){const s=rs(o,e.touches);s&&!Hd(s,o,4)&&(this.clearLongPress(),this.moved=!0)}}onTouchEnd(e){const t=this.touchStart;!t||!rs(t,e.changedTouches)||(this.moved||(this.eventSvc?.dispatchEvent({type:"tap",touchStart:t}),this.checkDoubleTap(t)),this.preventClick&&to(e),this.cancel())}onTouchCancel(e){const t=this.touchStart;!t||!rs(t,e.changedTouches)||(this.lastTapTime=null,this.cancel())}checkDoubleTap(e){let t=Date.now();const o=this.lastTapTime;o&&t-o>yC&&(this.eventSvc?.dispatchEvent({type:"doubleTap",touchStart:e}),t=null),this.lastTapTime=t}cancel(){this.clearLongPress(),Ra(this.handlers),this.touchStart=null}clearLongPress(){window.clearTimeout(this.longPressTimer),this.longPressTimer=0,this.moved=!1}destroy(){const e=this.startListener;e&&(this.startListener=null,this.eElement.removeEventListener("touchstart",e)),this.cancel(),this.eElement=null,this.eventSvc=null}},EC=1,xC=class{constructor(e){this.beans={},this.createdBeans=[],this.destroyed=!1,this.instanceId=EC++,e?.beanClasses&&(this.beanDestroyComparator=e.beanDestroyComparator,this.init(e))}init(e){this.id=e.id,this.beans.context=this,this.destroyCallback=e.destroyCallback;for(const t of Object.keys(e.providedBeanInstances))this.beans[t]=e.providedBeanInstances[t];for(const t of e.beanClasses){const o=new t;o.beanName?this.beans[o.beanName]=o:console.error(`Bean ${t.name} is missing beanName`),this.createdBeans.push(o)}for(const t of e.derivedBeans??[]){const{beanName:o,bean:s}=t(this);this.beans[o]=s,this.createdBeans.push(s)}e.beanInitComparator&&this.createdBeans.sort(e.beanInitComparator),this.initBeans(this.createdBeans)}getBeanInstances(){return Object.values(this.beans)}createBean(e,t){return this.initBeans([e],t),e}initBeans(e,t){const o=this.beans;for(const s of e)s.preWireBeans?.(o),s.wireBeans?.(o);for(const s of e)s.preConstruct?.();t&&e.forEach(t);for(const s of e)s.postConstruct?.()}getBeans(){return this.beans}getBean(e){return this.beans[e]}getId(){return this.id}destroy(){if(this.destroyed)return;this.destroyed=!0;const e=this.getBeanInstances();this.beanDestroyComparator&&e.sort(this.beanDestroyComparator),this.destroyBeans(e),this.beans={},this.createdBeans=[],this.destroyCallback?.()}destroyBean(e){e?.destroy?.()}destroyBeans(e){if(e)for(let t=0;t<e.length;t++)this.destroyBean(e[t]);return[]}isDestroyed(){return this.destroyed}};function PC(e){return{beanName:"gridApi",bean:e.getBean("apiFunctionSvc").api}}var DC=["licenseManager","environment","eventSvc","gos","paginationAutoPageSizeSvc","apiFunctionSvc","gridApi","registry","agCompUtils","userCompFactory","rowContainerHeight","horizontalResizeSvc","localeSvc","pinnedRowModel","dragSvc","colGroupSvc","visibleCols","popupSvc","selectionSvc","colFilter","quickFilter","filterManager","colModel","headerNavigation","pageBounds","pagination","pageBoundsListener","rowSpanSvc","stickyRowSvc","rowRenderer","expressionSvc","alignedGridsSvc","navigation","valueCache","valueSvc","autoWidthCalc","filterMenuFactory","dragAndDrop","focusSvc","cellNavigation","cellStyles","scrollVisibleSvc","sortSvc","colHover","colAnimation","autoColSvc","selectionColSvc","changeDetectionSvc","animationFrameSvc","undoRedo","colDefFactory","rowStyleSvc","rowNodeBlockLoader","rowNodeSorter","ctrlsSvc","pinnedCols","dataTypeSvc","syncSvc","overlays","stateSvc","expansionSvc","apiEventSvc","ariaAnnounce","menuSvc","colMoves","colAutosize","colFlex","colResize","pivotColsSvc","valueColsSvc","rowGroupColsSvc","colNames","colViewport","pivotResultCols","showRowGroupCols","validation"],jl=Object.fromEntries(DC.map((e,t)=>[e,t]));function MC(e,t){const o=(e.beanName?jl[e.beanName]:void 0)??Number.MAX_SAFE_INTEGER,s=(t.beanName?jl[t.beanName]:void 0)??Number.MAX_SAFE_INTEGER;return o-s}function TC(e,t){return e?.beanName==="gridDestroySvc"?-1:t?.beanName==="gridDestroySvc"?1:0}function IC(e){const{rowIndex:t,rowPinned:o,column:s}=e;return`${t}.${o??"null"}.${s.getId()}`}function Va(e,t){const o=e.column===t.column,s=e.rowPinned===t.rowPinned,i=e.rowIndex===t.rowIndex;return o&&s&&i}function AC(e,t){switch(e.rowPinned){case"top":if(t.rowPinned!=="top")return!0;break;case"bottom":if(t.rowPinned!=="bottom")return!1;break;default:if(L(t.rowPinned))return t.rowPinned!=="top";break}return e.rowIndex<t.rowIndex}function kC(e,t){return!e&&!t?!0:!e||!t?!1:e.rowIndex===t.rowIndex&&e.rowPinned==t.rowPinned}function Yl(e){let t=0,o;const{pinnedRowModel:s,rowModel:i,pageBounds:n}=e;return s?.getPinnedTopRowCount()?o="top":i.getRowCount()?(o=null,t=n.getFirstRow()):s?.getPinnedBottomRowCount()&&(o="bottom"),o===void 0?null:{rowIndex:t,rowPinned:o}}function Ql(e){let t,o=null;const{pinnedRowModel:s,pageBounds:i}=e,n=s?.getPinnedBottomRowCount(),r=s?.getPinnedTopRowCount();return n?(o="bottom",t=n-1):e.rowModel.getRowCount()?t=i.getLastRow():r&&(o="top",t=r-1),t===void 0?null:{rowIndex:t,rowPinned:o}}function kt(e,t){switch(t.rowPinned){case"top":return e.pinnedRowModel?.getPinnedTopRow(t.rowIndex);case"bottom":return e.pinnedRowModel?.getPinnedBottomRow(t.rowIndex);default:return e.rowModel.getRow(t.rowIndex)}}function es(e,t){const o=e.spannedRowRenderer?.getCellByPosition(t);if(o)return o;const s=e.rowRenderer.getRowByPosition(t);return s?s.getCellCtrl(t.column):null}function LC(e,t,o){const{rowModel:s,pinnedRowModel:i}=e;let n;return n??(n=s?.getRowNode(t)),o?n??(n=i?.getPinnedRowById(t,o)):(n??(n=i?.getPinnedRowById(t,"top")),n??(n=i?.getPinnedRowById(t,"bottom"))),n}function nn(e,t,o=!1){const{rowIndex:s,rowPinned:i}=t,{pageBounds:n,pinnedRowModel:r,rowModel:a}=e;if(s===0)return i==="top"?null:i==="bottom"&&a.isRowsToRender()?{rowIndex:n.getLastRow(),rowPinned:null}:r?.isRowsToRender("top")?{rowIndex:r.getPinnedTopRowCount()-1,rowPinned:"top"}:null;if(o){const l=i?void 0:a.getRow(s);return Iu(e,l,!0)??{rowIndex:s-1,rowPinned:i}}return{rowIndex:s-1,rowPinned:i}}function Zl(e,t,o=!1){const{rowIndex:s,rowPinned:i}=t,{pageBounds:n,pinnedRowModel:r,rowModel:a}=e;if(OC(e,t))return i==="bottom"?null:i==="top"&&a.isRowsToRender()?{rowIndex:n.getFirstRow(),rowPinned:null}:r?.isRowsToRender("bottom")?{rowIndex:0,rowPinned:"bottom"}:null;if(o){const l=i?void 0:a.getRow(s);return Iu(e,l)??{rowIndex:s+1,rowPinned:i}}return{rowIndex:s+1,rowPinned:i}}function Iu(e,t,o=!1){const{gos:s,rowRenderer:i}=e;if(!t?.sticky||!su(s))return;const n=i.getStickyTopRowCtrls(),r=i.getStickyBottomRowCtrls(),a=!r.some(u=>u.rowNode.rowIndex===t.rowIndex),l=a?n:r,c=(o?-1:1)*(a?-1:1);let d;for(let u=0;u<l.length;u++)if(l[u].rowNode.rowIndex===t.rowIndex){d=l[u+c];break}return d?{rowIndex:d.rowNode.rowIndex,rowPinned:null}:void 0}function OC(e,t){const{rowPinned:o,rowIndex:s}=t,{pinnedRowModel:i,pageBounds:n}=e;return o==="top"?(i?.getPinnedTopRowCount()??0)-1<=s:o==="bottom"?(i?.getPinnedBottomRowCount()??0)-1<=s:n.getLastRow()<=s}function GC(e,t,o){t.addManagedElementListeners(o,{keydown:s=>{if(!s.defaultPrevented&&!WC(s)&&s.key===R.TAB){const i=s.shiftKey;$o(e,o,!1,i)||bs(e,i)&&s.preventDefault()}}})}function HC(e,t){return e.ctrlsSvc.get("gridCtrl").focusInnerElement(t)}function pt(e){return e.gos.get("suppressHeaderFocus")||!!e.overlays?.exclusive}function si(e){return e.gos.get("suppressCellFocus")||!!e.overlays?.exclusive}function bs(e,t,o=!1){const s=e.ctrlsSvc.get("gridCtrl"),i=s.focusNextInnerContainer(t);return i===!0?!0:i===!1?i:((o||!t&&!s.isDetailGrid()&&s.isFocusInsideGridBody())&&s.forceFocusOutOfContainer(t),!1)}function BC(e,t){const o=e.focusSvc,s=o.getFocusedCell();if(s&&t&&Va(s,t)){const{rowIndex:i,rowPinned:n,column:r}=t;pa(e)&&o.setFocusedCell({rowIndex:i,column:r,rowPinned:n,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!Eu()})}}function VC(e,t){const o=e.getFocusableContainerName();return o==="gridBody"?t():Au(e,()=>To(e.getGui(),".ag-tab-guard").length>0)?o:null}function Au(e,t){e.setAllowFocus?.(!0);try{return t()}finally{e.setAllowFocus?.(!1)}}var NC="__ag_Grid_Skip_Focusable_Container";function WC(e){return e[NC]===!0}function lt(e){return e.ctrlsSvc.getHeaderRowContainerCtrl()?.getRowCount()??0}function Na(e){const t=[],o=e.ctrlsSvc.getHeaderRowContainerCtrls();for(const s of o){if(!s)continue;const i=s.getGroupRowCount()||0;for(let n=0;n<i;n++){const r=s.getGroupRowCtrlAtIndex(n),a=t[n];if(r){const l=zC(e,r);(a==null||l>a)&&(t[n]=l)}}}return t}function zC(e,t){let s=e.colModel.isPivotMode()?UC(e):Lu(e);const i=t.getHeaderCellCtrls();for(const n of i){const{column:r}=n,a=r.getAutoHeaderHeight();a!=null&&a>s&&r.isAutoHeaderHeight()&&(s=a)}return s}function Wa(e){let o=e.colModel.isPivotMode()?_C(e):ci(e);return e.colModel.forAllCols(s=>{const i=s.getAutoHeaderHeight();i!=null&&i>o&&s.isAutoHeaderHeight()&&(o=i)}),o}function ci(e){return e.gos.get("headerHeight")??e.environment.getDefaultHeaderHeight()}function ku(e){return e.gos.get("floatingFiltersHeight")??ci(e)}function Lu(e){return e.gos.get("groupHeaderHeight")??ci(e)}function _C(e){return e.gos.get("pivotHeaderHeight")??ci(e)}function UC(e){return e.gos.get("pivotGroupHeaderHeight")??Lu(e)}function $C(e,t){return e.headerRowIndex===t.headerRowIndex&&e.column===t.column}function KC(e){return e?.headerRowIndex!=null}var qC=class extends x{setComp(e,t,o){this.comp=e,this.eGui=t;const{beans:s}=this,{headerNavigation:i,touchSvc:n,ctrlsSvc:r}=s;i&&this.createManagedBean(new li(o,{onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.handleKeyDown.bind(this),onFocusOut:this.onFocusOut.bind(this)})),this.addManagedEventListeners({columnPivotModeChanged:this.onPivotModeChanged.bind(this,s),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this,s)}),this.onPivotModeChanged(s),this.setupHeaderHeight();const a=this.onHeaderContextMenu.bind(this);this.addManagedElementListeners(this.eGui,{contextmenu:a}),n?.mockHeaderContextMenu(this,a),r.register("gridHeaderCtrl",this)}setupHeaderHeight(){const e=this.setHeaderHeight.bind(this);e(),this.addManagedPropertyListeners(["headerHeight","pivotHeaderHeight","groupHeaderHeight","pivotGroupHeaderHeight","floatingFiltersHeight"],e),this.addManagedEventListeners({headerRowsChanged:e,columnHeaderHeightChanged:e,columnGroupHeaderHeightChanged:()=>qt(this.beans,()=>e()),stylesChanged:e,advancedFilterEnabledChanged:e})}setHeaderHeight(){const{beans:e}=this;let t=0;const o=Na(e).reduce((r,a)=>r+a,0),s=Wa(e);e.filterManager?.hasFloatingFilters()&&(t+=ku(e)),t+=o,t+=s;const i=e.environment.getHeaderRowBorderWidth(),n=t+i;if(this.headerHeightWithBorder!==n){this.headerHeightWithBorder=n;const r=`${n}px`;this.comp.setHeightAndMinHeight(r)}this.headerHeight!==t&&(this.headerHeight=t,this.eventSvc.dispatchEvent({type:"headerHeightChanged"}))}onPivotModeChanged(e){const t=e.colModel.isPivotMode();this.comp.toggleCss("ag-pivot-on",t),this.comp.toggleCss("ag-pivot-off",!t)}onDisplayedColumnsChanged(e){const o=e.visibleCols.allCols.some(s=>s.isSpanHeaderHeight());this.comp.toggleCss("ag-header-allow-overflow",o)}onTabKeyDown(e){const t=this.gos.get("enableRtl"),o=e.shiftKey,s=o!==t?"LEFT":"RIGHT",{beans:i}=this,{headerNavigation:n,focusSvc:r}=i;(n.navigateHorizontally(s,!0,e)||!o&&r.focusOverlay(!1)||bs(i,o,!0))&&e.preventDefault()}handleKeyDown(e){let t=null;const{headerNavigation:o}=this.beans;switch(e.key){case R.LEFT:t="LEFT";case R.RIGHT:{L(t)||(t="RIGHT"),o.navigateHorizontally(t,!1,e)&&e.preventDefault();break}case R.UP:t="UP";case R.DOWN:{L(t)||(t="DOWN"),o.navigateVertically(t,e)&&e.preventDefault();break}default:return}}onFocusOut(e){const{relatedTarget:t}=e,{eGui:o,beans:s}=this;!t&&o.contains(ve(s))||o.contains(t)||(s.focusSvc.focusedHeader=null)}onHeaderContextMenu(e,t,o){const{menuSvc:s,ctrlsSvc:i}=this.beans;if(!e&&!o||!s?.isHeaderContextMenuEnabled())return;const{target:n}=e??t;(n===this.eGui||n===i.getHeaderRowContainerCtrl()?.eViewport)&&s.showHeaderContextMenu(void 0,e,o)}},za=class extends x{constructor(e,t=!1){super(),this.callback=e,this.addSpacer=t}postConstruct(){const e=this.setWidth.bind(this);this.addManagedPropertyListener("domLayout",e),this.addManagedEventListeners({columnContainerWidthChanged:e,displayedColumnsChanged:e,leftPinnedWidthChanged:e}),this.addSpacer&&this.addManagedEventListeners({rightPinnedWidthChanged:e,scrollVisibilityChanged:e,scrollbarWidthChanged:e}),this.setWidth()}setWidth(){const e=Le(this.gos,"print"),{visibleCols:t,scrollVisibleSvc:o}=this.beans,s=t.bodyWidth,i=t.getColsLeftWidth(),n=t.getDisplayedColumnsRightWidth();let r;e?r=s+i+n:(r=s,this.addSpacer&&(this.gos.get("enableRtl")?i:n)===0&&o.verticalScrollShowing&&(r+=o.getScrollbarWidth())),this.callback(r)}},Ds=class extends x{};function di(e,t,o){return o&&e.addDestroyFunc(()=>t.destroyBean(o)),o??e}var _a=class extends x{constructor(e,t,o,s){super(),this.columnOrGroup=e,this.eCell=t,this.colsSpanning=s,this.columnOrGroup=e,this.ariaEl=t.querySelector("[role=columnheader]")||t,this.beans=o}setColsSpanning(e){this.colsSpanning=e,this.onLeftChanged()}getColumnOrGroup(){const{beans:e,colsSpanning:t}=this;return e.gos.get("enableRtl")&&t?he(t):this.columnOrGroup}postConstruct(){const e=this.onLeftChanged.bind(this);this.addManagedListeners(this.columnOrGroup,{leftChanged:e}),this.setLeftFirstTime(),this.addManagedEventListeners({displayedColumnsWidthChanged:e}),this.addManagedPropertyListener("domLayout",e)}setLeftFirstTime(){const{gos:e,colAnimation:t}=this.beans,o=e.get("suppressColumnMoveAnimation"),s=L(this.columnOrGroup.getOldLeft());t?.isActive()&&s&&!o?this.animateInLeft():this.onLeftChanged()}animateInLeft(){const e=this.getColumnOrGroup(),t=this.modifyLeftForPrintLayout(e,e.getOldLeft()),o=this.modifyLeftForPrintLayout(e,e.getLeft());this.setLeft(t),this.actualLeft=o,this.beans.colAnimation.executeNextVMTurn(()=>{this.actualLeft===o&&this.setLeft(o)})}onLeftChanged(){const e=this.getColumnOrGroup(),t=e.getLeft();this.actualLeft=this.modifyLeftForPrintLayout(e,t),this.setLeft(this.actualLeft)}modifyLeftForPrintLayout(e,t){const{gos:o,visibleCols:s}=this.beans;if(!Le(o,"print")||e.getPinned()==="left")return t;const n=s.getColsLeftWidth();if(e.getPinned()==="right"){const r=s.bodyWidth;return n+r+t}return n+t}setLeft(e){if(L(e)&&(this.eCell.style.left=`${e}px`),Fe(this.columnOrGroup)){const t=this.columnOrGroup.getLeafColumns();if(!t.length)return;t.length>1&&Vp(this.ariaEl,t.length)}}},jC="ag-column-first",YC="ag-column-last";function Ou(e,t,o,s){return we(e)?[]:ZC(e.headerClass,e,t,o,s)}function Gu(e,t,o){e.toggleCss(jC,o.isColAtEdge(t,"first")),e.toggleCss(YC,o.isColAtEdge(t,"last"))}function QC(e,t,o,s){return K(t,{colDef:e,column:o,columnGroup:s})}function ZC(e,t,o,s,i){if(we(e))return[];let n;if(typeof e=="function"){const r=QC(t,o,s,i);n=e(r)}else n=e;return typeof n=="string"?[n]:Array.isArray(n)?[...n]:[]}var JC=0,Hu="headerCtrl",Ua=class extends x{constructor(e,t){super(),this.column=e,this.rowCtrl=t,this.resizeToggleTimeout=0,this.resizeMultiplier=1,this.resizeFeature=null,this.lastFocusEvent=null,this.dragSource=null,this.reAttemptToFocus=!1,this.instanceId=e.getUniqueId()+"-"+JC++}postConstruct(){const e=this.refreshTabIndex.bind(this);this.addManagedPropertyListeners(["suppressHeaderFocus"],e),this.addManagedEventListeners({overlayExclusiveChanged:e})}setComp(e,t,o,s,i){t.setAttribute("col-id",this.column.colIdSanitised),this.wireComp(e,t,o,s,i),this.reAttemptToFocus&&(this.reAttemptToFocus=!1,this.focus(this.lastFocusEvent??void 0))}shouldStopEventPropagation(e){const{headerRowIndex:t,column:o}=this.beans.focusSvc.focusedHeader,s=o.getDefinition(),i=s?.suppressHeaderKeyboardEvent;if(!L(i))return!1;const n=K(this.gos,{colDef:s,column:o,headerRowIndex:t,event:e});return!!i(n)}getWrapperHasFocus(){return ve(this.beans)===this.eGui}setGui(e,t){this.eGui=e,this.addDomData(t),t.addManagedListeners(this.beans.eventSvc,{displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this)}),t.addManagedElementListeners(this.eGui,{focus:this.onGuiFocus.bind(this)}),this.onDisplayedColumnsChanged(),this.refreshTabIndex()}refreshHeaderStyles(){const e=this.column.getDefinition();if(!e)return;const{headerStyle:t}=e;let o;if(typeof t=="function"){const s=this.getHeaderClassParams();o=t(s)}else o=t;o&&this.comp.setUserStyles(o)}onGuiFocus(){this.eventSvc.dispatchEvent({type:"headerFocused",column:this.column})}setupAutoHeight(e){const{wrapperElement:t,checkMeasuringCallback:o,compBean:s}=e,{beans:i}=this,n=u=>{if(!this.isAlive()||!s.isAlive())return;const{paddingTop:h,paddingBottom:g,borderBottomWidth:f,borderTopWidth:m}=_o(this.eGui),C=h+g+f+m,w=t.offsetHeight+C;if(u<5){const y=!Pe(i)?.contains(t),S=w==0;if(y||S){xr(()=>n(u+1),"raf",i);return}}this.setColHeaderHeight(this.column,w)};let r=!1,a;const l=()=>{const u=this.column.isAutoHeaderHeight();u&&!r&&c(),!u&&r&&d()},c=()=>{r=!0,this.comp.toggleCss("ag-header-cell-auto-height",!0),n(0),a=Kt(this.beans,t,()=>n(0))},d=()=>{r=!1,a&&a(),this.comp.toggleCss("ag-header-cell-auto-height",!1),a=void 0};l(),s.addDestroyFunc(()=>d()),s.addManagedListeners(this.column,{widthChanged:()=>r&&n(0)}),s.addManagedEventListeners({sortChanged:()=>{r&&window.setTimeout(()=>n(0))}}),o&&o(l)}onDisplayedColumnsChanged(){const{comp:e,column:t,beans:o,eGui:s}=this;!e||!t||!s||(Gu(e,t,o.visibleCols),Md(s,o.visibleCols.getAriaColIndex(t)))}addResizeAndMoveKeyboardListeners(e){e.addManagedListeners(this.eGui,{keydown:this.onGuiKeyDown.bind(this),keyup:this.onGuiKeyUp.bind(this)})}refreshTabIndex(){const e=pt(this.beans);this.eGui&&Qe(this.eGui,"tabindex",e?null:"-1")}onGuiKeyDown(e){const t=ve(this.beans),o=e.key===R.LEFT||e.key===R.RIGHT;if(this.isResizing&&(e.preventDefault(),e.stopImmediatePropagation()),t!==this.eGui||!e.shiftKey&&!e.altKey&&!e.ctrlKey&&!e.metaKey)return;if((this.isResizing||o)&&(e.preventDefault(),e.stopImmediatePropagation()),(e.ctrlKey||e.metaKey)&&fu(e)===R.C)return this.beans.clipboardSvc?.copyToClipboard();if(!o)return;const n=e.key===R.LEFT!==this.gos.get("enableRtl")?"left":"right";if(e.altKey){this.isResizing=!0,this.resizeMultiplier+=1;const r=this.getViewportAdjustedResizeDiff(e);this.resizeHeader(r,e.shiftKey),this.resizeFeature?.toggleColumnResizing(!0)}else this.moveHeader(n)}moveHeader(e){this.beans.colMoves?.moveHeader(e,this.eGui,this.column,this.rowCtrl.pinned,this)}getViewportAdjustedResizeDiff(e){const t=this.getResizeDiff(e),{pinnedCols:o}=this.beans;return o?o.getHeaderResizeDiff(t,this.column):t}getResizeDiff(e){const{gos:t,column:o}=this;let s=e.key===R.LEFT!==t.get("enableRtl");const i=o.getPinned(),n=t.get("enableRtl");return i&&n!==(i==="right")&&(s=!s),(s?-1:1)*this.resizeMultiplier}onGuiKeyUp(){this.isResizing&&(this.resizeToggleTimeout&&(window.clearTimeout(this.resizeToggleTimeout),this.resizeToggleTimeout=0),this.isResizing=!1,this.resizeMultiplier=1,this.resizeToggleTimeout=window.setTimeout(()=>{this.resizeFeature?.toggleColumnResizing(!1)},150))}handleKeyDown(e){const t=this.getWrapperHasFocus();switch(e.key){case R.PAGE_DOWN:case R.PAGE_UP:case R.PAGE_HOME:case R.PAGE_END:t&&e.preventDefault()}}addDomData(e){const t=Hu,{eGui:o,gos:s}=this;Go(s,o,t,this),e.addDestroyFunc(()=>Go(s,o,t,null))}focus(e){if(!this.isAlive())return!1;const{eGui:t}=this;return t?(this.lastFocusEvent=e||null,t.focus()):this.reAttemptToFocus=!0,!0}focusThis(){this.beans.focusSvc.focusedHeader={headerRowIndex:this.rowCtrl.rowIndex,column:this.column}}removeDragSource(){this.dragSource&&(this.beans.dragAndDrop?.removeDragSource(this.dragSource),this.dragSource=null)}handleContextMenuMouseEvent(e,t,o){const s=e??t,{menuSvc:i,gos:n}=this.beans;n.get("preventDefaultOnContextMenu")&&s.preventDefault(),i?.isHeaderContextMenuEnabled(o)&&i.showHeaderContextMenu(o,e,t),this.dispatchColumnMouseEvent("columnHeaderContextMenu",o)}dispatchColumnMouseEvent(e,t){this.eventSvc.dispatchEvent({type:e,column:t})}setColHeaderHeight(e,t){if(!e.setAutoHeaderHeight(t))return;const{eventSvc:o}=this;e.isColumn?o.dispatchEvent({type:"columnHeaderHeightChanged",column:e,columns:[e],source:"autosizeColumnHeaderHeight"}):o.dispatchEvent({type:"columnGroupHeaderHeightChanged",columnGroup:e,source:"autosizeColumnGroupHeaderHeight"})}clearComponent(){this.removeDragSource(),this.resizeFeature=null,this.comp=null,this.eGui=null}destroy(){super.destroy(),this.column=null,this.lastFocusEvent=null,this.rowCtrl=null}},XC=class extends Ua{constructor(){super(...arguments),this.refreshFunctions={},this.userHeaderClasses=new Set,this.ariaDescriptionProperties=new Map}wireComp(e,t,o,s,i){this.comp=e;const{rowCtrl:n,column:r,beans:a}=this,{colResize:l,context:c,colHover:d,rangeSvc:u}=a,h=di(this,c,i);this.setGui(t,h),this.updateState(),this.setupWidth(h),this.setupMovingCss(h),this.setupMenuClass(h),this.setupSortableClass(h),this.setupWrapTextClass(),this.refreshSpanHeaderHeight(),this.setupAutoHeight({wrapperElement:s,checkMeasuringCallback:f=>this.setRefreshFunction("measuring",f),compBean:h}),this.addColumnHoverListener(h),this.setupFilterClass(h),this.setupStylesFromColDef(),this.setupClassesFromColDef(),this.setupTooltip(),this.addActiveHeaderMouseListeners(h),this.setupSelectAll(h),this.setupUserComp(),this.refreshAria(),l?this.resizeFeature=h.createManagedBean(l.createResizeFeature(n.pinned,r,o,e,this)):fe(o,!1),d?.createHoverFeature(h,[r],t),u?.createRangeHighlightFeature(h,r,e),h.createManagedBean(new _a(r,t,a)),h.createManagedBean(new li(t,{shouldStopEventPropagation:f=>this.shouldStopEventPropagation(f),onTabKeyDown:()=>null,handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this),onFocusOut:this.onFocusOut.bind(this)})),this.addResizeAndMoveKeyboardListeners(h),h.addManagedPropertyListeners(["suppressMovableColumns","suppressMenuHide","suppressAggFuncInHeader","enableAdvancedFilter"],()=>this.refresh()),h.addManagedListeners(r,{colDefChanged:()=>this.refresh(),formulaRefChanged:()=>this.refresh(),headerHighlightChanged:this.onHeaderHighlightChanged.bind(this)});const g=()=>this.checkDisplayName();h.addManagedEventListeners({columnValueChanged:g,columnRowGroupChanged:g,columnPivotChanged:g,headerHeightChanged:this.onHeaderHeightChanged.bind(this)}),h.addDestroyFunc(()=>{this.refreshFunctions={},this.selectAllFeature=null,this.dragSourceElement=void 0,this.userCompDetails=null,this.userHeaderClasses.clear(),this.ariaDescriptionProperties.clear(),this.clearComponent()})}resizeHeader(e,t){this.beans.colResize?.resizeHeader(this.column,e,t)}getHeaderClassParams(){const{column:e,beans:t}=this,o=e.colDef;return K(t.gos,{colDef:o,column:e,floatingFilter:!1})}setupUserComp(){const e=this.lookupUserCompDetails();e&&this.setCompDetails(e)}setCompDetails(e){this.userCompDetails=e,this.comp.setUserCompDetails(e)}lookupUserCompDetails(){const e=this.createParams(),t=this.column.getColDef();return Nm(this.beans.userCompFactory,t,e)}createParams(){const{menuSvc:e,sortSvc:t,colFilter:o,gos:s}=this.beans;return K(s,{column:this.column,displayName:this.displayName,enableSorting:this.column.isSortable(),enableMenu:this.menuEnabled,enableFilterButton:this.openFilterEnabled&&!!e?.isHeaderFilterButtonEnabled(this.column),enableFilterIcon:!!o&&(!this.openFilterEnabled||Ze(this.gos)),showColumnMenu:(n,r)=>{e?.showColumnMenu({column:this.column,buttonElement:n,positionBy:"button",onClosedCallback:r})},showColumnMenuAfterMouseClick:(n,r)=>{e?.showColumnMenu({column:this.column,mouseEvent:n,positionBy:"mouse",onClosedCallback:r})},showFilter:n=>{e?.showFilterMenu({column:this.column,buttonElement:n,containerType:"columnFilter",positionBy:"button"})},progressSort:n=>{t?.progressSort(this.column,!!n,"uiColumnSorted")},setSort:(n,r)=>{t?.setSortForColumn(this.column,ct(n),!!r,"uiColumnSorted")},eGridHeader:this.eGui,setTooltip:(n,r)=>{s.assertModuleRegistered("Tooltip",3),this.setupTooltip(n,r)}})}setupSelectAll(e){const{selectionSvc:t}=this.beans;t&&(this.selectAllFeature=e.createOptionalManagedBean(t.createSelectAllFeature(this.column)),this.selectAllFeature?.setComp(this),e.addManagedPropertyListener("rowSelection",()=>{const o=t.createSelectAllFeature(this.column);o&&!this.selectAllFeature?(this.selectAllFeature=e.createManagedBean(o),this.selectAllFeature?.setComp(this),this.comp.refreshSelectAllGui()):this.selectAllFeature&&!o&&(this.comp.removeSelectAllGui(),this.selectAllFeature=this.destroyBean(this.selectAllFeature))}))}getSelectAllGui(){return this.selectAllFeature?.getCheckboxGui()}handleKeyDown(e){super.handleKeyDown(e),e.key===R.SPACE?this.selectAllFeature?.onSpaceKeyDown(e):e.key===R.ENTER?this.onEnterKeyDown(e):e.key===R.DOWN&&e.altKey&&this.showMenuOnKeyPress(e,!1)}onEnterKeyDown(e){const{column:t,gos:o,sortable:s,beans:i}=this;let n=!1;(e.ctrlKey||e.metaKey)&&(n=this.showMenuOnKeyPress(e,!0)),n||(!e.altKey&&us(o)?i.rangeSvc?.handleColumnSelection(t,e):s&&i.sortSvc?.progressSort(t,e.shiftKey,"uiColumnSorted"))}showMenuOnKeyPress(e,t){const o=this.comp.getUserCompInstance();return Jl(o)&&o.onMenuKeyboardShortcut(t)?(e.preventDefault(),!0):!1}onFocusIn(e){this.eGui.contains(e.relatedTarget)||(this.focusThis(),this.announceAriaDescription()),Eu()&&this.setActiveHeader(!0)}onFocusOut(e){this.eGui.contains(e.relatedTarget)||this.setActiveHeader(!1)}setupTooltip(e,t){this.tooltipFeature=this.beans.tooltipSvc?.setupHeaderTooltip(this.tooltipFeature,this,e,t)}setupStylesFromColDef(){this.setRefreshFunction("headerStyles",this.refreshHeaderStyles.bind(this)),this.refreshHeaderStyles()}setupClassesFromColDef(){const e=()=>{const t=this.column.getColDef(),o=Ou(t,this.gos,this.column,null),s=this.userHeaderClasses;this.userHeaderClasses=new Set(o);for(const i of o)s.has(i)?s.delete(i):this.comp.toggleCss(i,!0);for(const i of s)this.comp.toggleCss(i,!1)};this.setRefreshFunction("headerClasses",e),e()}setDragSource(e){this.dragSourceElement=e,this.removeDragSource(),!(!e||!this.draggable)&&(this.dragSource=this.beans.colMoves?.setDragSourceForHeader(e,this.column,this.displayName)??null)}updateState(){const{menuSvc:e}=this.beans;this.menuEnabled=!!e?.isColumnMenuInHeaderEnabled(this.column),this.openFilterEnabled=!!e?.isFilterMenuInHeaderEnabled(this.column),this.sortable=this.column.isSortable(),this.displayName=this.calculateDisplayName(),this.draggable=this.workOutDraggable()}setRefreshFunction(e,t){this.refreshFunctions[e]=t}refresh(){this.updateState(),this.refreshHeaderComp(),this.refreshAria();for(const e of Object.values(this.refreshFunctions))e()}refreshHeaderComp(){const e=this.lookupUserCompDetails();if(!e)return;(this.comp.getUserCompInstance()!=null&&this.userCompDetails.componentClass==e.componentClass?this.attemptHeaderCompRefresh(e.params):!1)?this.setDragSource(this.dragSourceElement):this.setCompDetails(e)}attemptHeaderCompRefresh(e){const t=this.comp.getUserCompInstance();return!t||!t.refresh?!1:t.refresh(e)}calculateDisplayName(){return this.beans.colNames.getDisplayNameForColumn(this.column,"header",!0)}checkDisplayName(){this.displayName!==this.calculateDisplayName()&&this.refresh()}workOutDraggable(){const e=this.column.getColDef();return!!(!this.gos.get("suppressMovableColumns")&&!e.suppressMovable&&!e.lockPosition)||!!e.enableRowGroup||!!e.enablePivot}setupWidth(e){const t=()=>{const o=this.column.getActualWidth();this.comp.setWidth(`${o}px`)};e.addManagedListeners(this.column,{widthChanged:t}),t()}setupMovingCss(e){const t=()=>{this.comp.toggleCss("ag-header-cell-moving",this.column.isMoving())};e.addManagedListeners(this.column,{movingChanged:t}),t()}setupMenuClass(e){const t=()=>{this.comp?.toggleCss("ag-column-menu-visible",this.column.isMenuVisible())};e.addManagedListeners(this.column,{menuVisibleChanged:t}),t()}setupSortableClass(e){const t=()=>{this.comp.toggleCss("ag-header-cell-sortable",!!this.sortable)};t(),this.setRefreshFunction("updateSortable",t),e.addManagedEventListeners({sortChanged:this.refreshAriaSort.bind(this)})}setupFilterClass(e){const t=()=>{const o=this.column.isFilterActive();this.comp.toggleCss("ag-header-cell-filtered",o),this.refreshAria()};e.addManagedListeners(this.column,{filterActiveChanged:t}),t()}setupWrapTextClass(){const e=()=>{const t=!!this.column.getColDef().wrapHeaderText;this.comp.toggleCss("ag-header-cell-wrap-text",t)};e(),this.setRefreshFunction("wrapText",e)}onHeaderHighlightChanged(){const e=this.column.getHighlighted(),t=e===0,o=e===1;this.comp.toggleCss("ag-header-highlight-before",t),this.comp.toggleCss("ag-header-highlight-after",o)}onDisplayedColumnsChanged(){super.onDisplayedColumnsChanged(),this.isAlive()&&this.onHeaderHeightChanged()}onHeaderHeightChanged(){this.refreshSpanHeaderHeight()}refreshSpanHeaderHeight(){const{eGui:e,column:t,comp:o,beans:s}=this,i=Na(this.beans),n=i.reduce((h,g)=>h+g,0)===0;if(o.toggleCss("ag-header-parent-hidden",n),!t.isSpanHeaderHeight()){e.style.removeProperty("top"),e.style.removeProperty("height"),o.toggleCss("ag-header-span-height",!1),o.toggleCss("ag-header-span-total",!1);return}const{numberOfParents:r,isSpanningTotal:a}=this.column.getColumnGroupPaddingInfo();o.toggleCss("ag-header-span-height",r>0);const l=Wa(s);if(r===0){o.toggleCss("ag-header-span-total",!1),e.style.setProperty("top","0px"),e.style.setProperty("height",`${l}px`);return}o.toggleCss("ag-header-span-total",a);const c=(this.column.getFirstRealParent()?.getLevel()??-1)+1,d=i.length-c;let u=0;for(let h=0;h<d;h++)u+=i[i.length-1-h];e.style.setProperty("top",`${-u}px`),e.style.setProperty("height",`${l+u}px`)}refreshAriaSort(){let e=null;const{beans:t,column:o,comp:s,sortable:i}=this;if(i){const n=this.getLocaleTextFunc(),r=t.sortSvc?.getDisplaySortForColumn(o)??null;s.setAriaSort(Mp(r)),e=n("ariaSortableColumn","Press ENTER to sort")}else s.setAriaSort();this.setAriaDescriptionProperty("sort",e)}refreshAriaMenu(){let e=null;this.menuEnabled&&(e=this.getLocaleTextFunc()("ariaMenuColumn","Press ALT DOWN to open column menu")),this.setAriaDescriptionProperty("menu",e)}refreshAriaFilterButton(){let e=null;const{openFilterEnabled:t,gos:o}=this;t&&!Ze(o)&&(e=this.getLocaleTextFunc()("ariaFilterColumn","Press CTRL ENTER to open filter")),this.setAriaDescriptionProperty("filterButton",e)}refreshAriaFiltered(){let e=null;this.column.isFilterActive()&&(e=this.getLocaleTextFunc()("ariaColumnFiltered","Column Filtered")),this.setAriaDescriptionProperty("filter",e)}refreshAriaCellSelection(){let e=null;const{gos:t,column:o}=this;us(t)&&!Ue(o)&&(e=this.getLocaleTextFunc()("ariaColumnCellSelection","Press Enter to toggle selection for all visible cells in this column")),this.setAriaDescriptionProperty("cellSelection",e)}setAriaDescriptionProperty(e,t){const o=this.ariaDescriptionProperties;t!=null?o.set(e,t):o.delete(e)}announceAriaDescription(){const{beans:e,eGui:t,ariaDescriptionProperties:o}=this;if(!t.contains(ve(e)))return;const s=Array.from(o.keys()).sort((i,n)=>i==="filter"?-1:n.charCodeAt(0)-i.charCodeAt(0)).map(i=>o.get(i)).join(". ");e.ariaAnnounce?.announceValue(s,"columnHeader")}refreshAria(){this.refreshAriaSort(),this.refreshAriaMenu(),this.refreshAriaFilterButton(),this.refreshAriaFiltered(),this.refreshAriaCellSelection()}addColumnHoverListener(e){this.beans.colHover?.addHeaderColumnHoverListener(e,this.comp,this.column)}addActiveHeaderMouseListeners(e){const t=i=>this.handleMouseOverChange(i.type==="mouseenter"),o=()=>{this.setActiveHeader(!0),this.dispatchColumnMouseEvent("columnHeaderClicked",this.column)},s=i=>this.handleContextMenuMouseEvent(i,void 0,this.column);e.addManagedListeners(this.eGui,{mouseenter:t,mouseleave:t,click:o,contextmenu:s})}handleMouseOverChange(e){this.setActiveHeader(e),this.eventSvc.dispatchEvent({type:e?"columnHeaderMouseOver":"columnHeaderMouseLeave",column:this.column})}setActiveHeader(e){this.comp.toggleCss("ag-header-active",e)}getAnchorElementForMenu(e){const t=this.comp.getUserCompInstance();return Jl(t)?t.getAnchorElementForMenu(e):this.eGui}destroy(){this.tooltipFeature=this.destroyBean(this.tooltipFeature),super.destroy()}};function Jl(e){return typeof e?.getAnchorElementForMenu=="function"&&typeof e.onMenuKeyboardShortcut=="function"}var ev=0,Yn=class extends x{constructor(e,t,o){super(),this.rowIndex=e,this.pinned=t,this.type=o,this.instanceId=ev++,this.comp=null,this.allCtrls=[];let s="ag-header-row-column";o==="group"?s="ag-header-row-group":o==="filter"&&(s="ag-header-row-filter"),this.headerRowClass=`ag-header-row ${s}`}setRowIndex(e){this.rowIndex=e,this.comp?.setRowIndex(this.getAriaRowIndex()),this.onRowHeightChanged()}postConstruct(){this.isPrintLayout=Le(this.gos,"print"),this.isEnsureDomOrder=this.gos.get("ensureDomOrder")}areCellsRendered(){return this.comp?this.allCtrls.every(e=>e.eGui!=null):!1}setComp(e,t,o=!0){this.comp=e,t=di(this,this.beans.context,t),o&&(this.setRowIndex(this.rowIndex),this.onVirtualColumnsChanged()),this.setWidth(),this.addEventListeners(t)}getAriaRowIndex(){return this.rowIndex+1}addEventListeners(e){const t=this.onRowHeightChanged.bind(this),o=this.onDisplayedColumnsChanged.bind(this);e.addManagedEventListeners({columnResized:this.setWidth.bind(this),displayedColumnsChanged:o,virtualColumnsChanged:s=>this.onVirtualColumnsChanged(s.afterScroll),columnGroupHeaderHeightChanged:t,columnHeaderHeightChanged:t,stylesChanged:t,advancedFilterEnabledChanged:t}),e.addManagedPropertyListener("domLayout",o),e.addManagedPropertyListener("ensureDomOrder",s=>this.isEnsureDomOrder=s.currentValue),e.addManagedPropertyListeners(["headerHeight","pivotHeaderHeight","groupHeaderHeight","pivotGroupHeaderHeight","floatingFiltersHeight"],t)}onDisplayedColumnsChanged(){this.isPrintLayout=Le(this.gos,"print"),this.onVirtualColumnsChanged(),this.setWidth(),this.onRowHeightChanged()}setWidth(){if(!this.comp)return;const e=this.getWidthForRow();this.comp.setWidth(`${e}px`)}getWidthForRow(){const{visibleCols:e}=this.beans;return this.isPrintLayout?this.pinned!=null?0:e.getContainerWidth("right")+e.getContainerWidth("left")+e.getContainerWidth(null):e.getContainerWidth(this.pinned)}onRowHeightChanged(){if(!this.comp)return;const{topOffset:e,rowHeight:t}=this.getTopAndHeight();this.comp.setTop(e+"px"),this.comp.setHeight(t+"px")}getTopAndHeight(){let e=0;const t=Na(this.beans);for(let i=0;i<t.length;i++){if(i===this.rowIndex&&this.type==="group")return{topOffset:e,rowHeight:t[i]};e+=t[i]}const o=Wa(this.beans);if(this.type==="column")return{topOffset:e,rowHeight:o};e+=o;const s=ku(this.beans);return{topOffset:e,rowHeight:s}}onVirtualColumnsChanged(e=!1){if(!this.comp)return;const t=this.getUpdatedHeaderCtrls(),o=this.isEnsureDomOrder||this.isPrintLayout;this.comp.setHeaderCtrls(t,o,e)}getUpdatedHeaderCtrls(){const e=this.ctrlsById;this.ctrlsById=new Map;const t=this.getColumnsInViewport();for(const s of t)this.recycleAndCreateHeaderCtrls(s,this.ctrlsById,e);const o=s=>{const{focusSvc:i,visibleCols:n}=this.beans;return i.isHeaderWrapperFocused(s)?n.isVisible(s.column):!1};if(e)for(const[s,i]of e)o(i)?this.ctrlsById.set(s,i):this.destroyBean(i);return this.allCtrls=Array.from(this.ctrlsById.values()),this.allCtrls}getHeaderCellCtrls(){return this.allCtrls}recycleAndCreateHeaderCtrls(e,t,o){if(e.isEmptyGroup())return;const s=e.getUniqueId();let i;if(o&&(i=o.get(s),o.delete(s)),i&&i.column!=e&&(this.destroyBean(i),i=void 0),i==null)switch(this.type){case"filter":{i=this.createBean(this.beans.registry.createDynamicBean("headerFilterCellCtrl",!0,e,this));break}case"group":i=this.createBean(this.beans.registry.createDynamicBean("headerGroupCellCtrl",!0,e,this));break;default:i=this.createBean(new XC(e,this));break}t.set(s,i)}getColumnsInViewport(){if(!this.isPrintLayout)return this.getComponentsToRender();if(this.pinned)return[];const e=[];for(const t of["left",null,"right"])e.push(...this.getComponentsToRender(t));return e}getComponentsToRender(e=this.pinned){return this.type==="group"?this.beans.colViewport.getHeadersToRender(e,this.rowIndex):this.beans.colViewport.getColumnHeadersToRender(e)}focusHeader(e,t){const o=this.allCtrls.find(i=>i.column==e);return o?o.focus(t):!1}destroy(){this.allCtrls=this.destroyBeans(this.allCtrls),this.ctrlsById=void 0,this.comp=null,super.destroy()}},tv=class extends x{constructor(e){super(),this.pinned=e,this.hidden=!1,this.includeFloatingFilter=!1,this.groupsRowCtrls=[]}setComp(e,t){this.comp=e,this.eViewport=t;const{pinnedCols:o,ctrlsSvc:s,colModel:i,colMoves:n}=this.beans;this.setupCenterWidth(),o?.setupHeaderPinnedWidth(this),this.setupDragAndDrop(n,this.eViewport);const r=this.refresh.bind(this,!0);this.addManagedEventListeners({displayedColumnsChanged:r,advancedFilterEnabledChanged:r});const a=`${typeof this.pinned=="string"?this.pinned:"center"}Header`;s.register(a,this),i.ready&&this.refresh()}getAllCtrls(){const e=[...this.groupsRowCtrls];return this.columnsRowCtrl&&e.push(this.columnsRowCtrl),this.filtersRowCtrl&&e.push(this.filtersRowCtrl),e}refresh(e=!1){const{focusSvc:t,filterManager:o,visibleCols:s}=this.beans;let i=0;const n=t.getFocusHeaderToUseAfterRefresh(),r=()=>{const u=s.headerGroupRowCount;i=u,e||(this.groupsRowCtrls=this.destroyBeans(this.groupsRowCtrls));const h=this.groupsRowCtrls.length;if(h!==u){if(h>u){for(let g=u;g<h;g++)this.destroyBean(this.groupsRowCtrls[g]);this.groupsRowCtrls.length=u;return}for(let g=h;g<u;g++){const f=this.createBean(new Yn(g,this.pinned,"group"));this.groupsRowCtrls.push(f)}}},a=()=>{const u=i++;if(this.hidden){this.columnsRowCtrl=this.destroyBean(this.columnsRowCtrl);return}this.columnsRowCtrl==null||!e?(this.columnsRowCtrl=this.destroyBean(this.columnsRowCtrl),this.columnsRowCtrl=this.createBean(new Yn(u,this.pinned,"column"))):this.columnsRowCtrl.rowIndex!==u&&this.columnsRowCtrl.setRowIndex(u)},l=()=>{this.includeFloatingFilter=!!o?.hasFloatingFilters()&&!this.hidden;const u=()=>{this.filtersRowCtrl=this.destroyBean(this.filtersRowCtrl)};if(!this.includeFloatingFilter){u();return}e||u();const h=i++;this.filtersRowCtrl?this.filtersRowCtrl.rowIndex!==h&&this.filtersRowCtrl.setRowIndex(h):this.filtersRowCtrl=this.createBean(new Yn(h,this.pinned,"filter"))},c=this.getAllCtrls();r(),a(),l();const d=this.getAllCtrls();this.comp.setCtrls(d),this.restoreFocusOnHeader(t,n),c.length!==d.length&&this.beans.eventSvc.dispatchEvent({type:"headerRowsChanged"})}getHeaderCtrlForColumn(e){const t=o=>o?.getHeaderCellCtrls().find(s=>s.column===e);if(lo(e))return t(this.columnsRowCtrl);if(this.groupsRowCtrls.length!==0)for(let o=0;o<this.groupsRowCtrls.length;o++){const s=t(this.groupsRowCtrls[o]);if(s)return s}}getHtmlElementForColumnHeader(e){return this.getHeaderCtrlForColumn(e)?.eGui??null}getRowType(e){return this.getAllCtrls()[e]?.type}focusHeader(e,t,o){const i=this.getAllCtrls()[e];return i?i.focusHeader(t,o):!1}getGroupRowCount(){return this.groupsRowCtrls.length}getGroupRowCtrlAtIndex(e){return this.groupsRowCtrls[e]}getRowCount(){return this.groupsRowCtrls.length+(this.columnsRowCtrl?1:0)+(this.filtersRowCtrl?1:0)}setHorizontalScroll(e){this.comp.setViewportScrollLeft(e)}onScrollCallback(e){this.addManagedElementListeners(this.eViewport,{scroll:e})}destroy(){this.filtersRowCtrl=this.destroyBean(this.filtersRowCtrl),this.columnsRowCtrl=this.destroyBean(this.columnsRowCtrl),this.groupsRowCtrls=this.destroyBeans(this.groupsRowCtrls),super.destroy()}setupDragAndDrop(e,t){const o=e?.createBodyDropTarget(this.pinned,t);o&&this.createManagedBean(o)}restoreFocusOnHeader(e,t){if(!t)return;const{column:o}=t;o.getPinned()==this.pinned&&e.focusHeaderPosition({headerPosition:t,scroll:!1})}setupCenterWidth(){this.pinned==null&&this.createManagedBean(new za(e=>this.comp.setCenterWidth(`${e}px`),!0))}},Oi={AUTO_HEIGHT:"ag-layout-auto-height",NORMAL:"ag-layout-normal",PRINT:"ag-layout-print"},$a=class extends x{constructor(e){super(),this.view=e}postConstruct(){this.addManagedPropertyListener("domLayout",this.updateLayoutClasses.bind(this)),this.updateLayoutClasses()}updateLayoutClasses(){const e=this.gos.get("domLayout"),t={autoHeight:e==="autoHeight",normal:e==="normal",print:e==="print"},o=t.autoHeight?Oi.AUTO_HEIGHT:t.print?Oi.PRINT:Oi.NORMAL;this.view.updateLayoutClasses(o,t)}},Bu=class extends ye{constructor(e,t){super(),this.direction=t,this.eViewport=W,this.eContainer=W,this.hideTimeout=0,this.setTemplate(e)}postConstruct(){this.addManagedEventListeners({scrollVisibilityChanged:this.onScrollVisibilityChanged.bind(this)}),this.onScrollVisibilityChanged(),this.toggleCss("ag-apple-scrollbar",yu()||Mo())}destroy(){super.destroy(),window.clearTimeout(this.hideTimeout)}initialiseInvisibleScrollbar(){this.invisibleScrollbar===void 0&&(this.invisibleScrollbar=Fu(),this.invisibleScrollbar&&(this.hideAndShowInvisibleScrollAsNeeded(),this.addActiveListenerToggles()))}addActiveListenerToggles(){const e=this.getGui(),t=()=>this.toggleCss("ag-scrollbar-active",!0),o=()=>this.toggleCss("ag-scrollbar-active",!1);this.addManagedListeners(e,{mouseenter:t,mousedown:t,touchstart:t,mouseleave:o,touchend:o})}onScrollVisibilityChanged(){this.invisibleScrollbar===void 0&&this.initialiseInvisibleScrollbar(),qt(this.beans,()=>this.setScrollVisible())}hideAndShowInvisibleScrollAsNeeded(){this.addManagedEventListeners({bodyScroll:e=>{e.direction===this.direction&&(this.hideTimeout&&(window.clearTimeout(this.hideTimeout),this.hideTimeout=0),this.toggleCss("ag-scrollbar-scrolling",!0))},bodyScrollEnd:()=>{this.hideTimeout=window.setTimeout(()=>{this.toggleCss("ag-scrollbar-scrolling",!1),this.hideTimeout=0},400)}})}attemptSettingScrollPosition(e){const t=this.eViewport;uf(this,()=>vt(t),()=>this.setScrollPosition(e),100)}onScrollCallback(e){this.addManagedElementListeners(this.eViewport,{scroll:e})}},ov={tag:"div",cls:"ag-body-horizontal-scroll",attrs:{"aria-hidden":"true"},children:[{tag:"div",ref:"eLeftSpacer",cls:"ag-horizontal-left-spacer"},{tag:"div",ref:"eViewport",cls:"ag-body-horizontal-scroll-viewport",children:[{tag:"div",ref:"eContainer",cls:"ag-body-horizontal-scroll-container"}]},{tag:"div",ref:"eRightSpacer",cls:"ag-horizontal-right-spacer"}]},sv=class extends Bu{constructor(){super(ov,"horizontal"),this.eLeftSpacer=W,this.eRightSpacer=W,this.setScrollVisibleDebounce=0}wireBeans(e){this.visibleCols=e.visibleCols,this.scrollVisibleSvc=e.scrollVisibleSvc}postConstruct(){super.postConstruct();const e=this.setFakeHScrollSpacerWidths.bind(this);this.addManagedEventListeners({displayedColumnsChanged:e,displayedColumnsWidthChanged:e,pinnedRowDataChanged:this.refreshCompBottom.bind(this)}),this.addManagedPropertyListener("domLayout",e),this.beans.ctrlsSvc.register("fakeHScrollComp",this),this.createManagedBean(new za(t=>this.eContainer.style.width=`${t}px`)),this.addManagedPropertyListeners(["suppressHorizontalScroll"],this.onScrollVisibilityChanged.bind(this))}destroy(){window.clearTimeout(this.setScrollVisibleDebounce),super.destroy()}initialiseInvisibleScrollbar(){this.invisibleScrollbar===void 0&&(this.enableRtl=this.gos.get("enableRtl"),super.initialiseInvisibleScrollbar(),this.invisibleScrollbar&&this.refreshCompBottom())}refreshCompBottom(){if(!this.invisibleScrollbar)return;const e=this.beans.pinnedRowModel?.getPinnedBottomTotalHeight()??0;this.getGui().style.bottom=`${e}px`}onScrollVisibilityChanged(){super.onScrollVisibilityChanged(),this.setFakeHScrollSpacerWidths()}setFakeHScrollSpacerWidths(){const e=this.scrollVisibleSvc.verticalScrollShowing;let t=this.visibleCols.getDisplayedColumnsRightWidth();const o=!this.enableRtl&&e,s=this.scrollVisibleSvc.getScrollbarWidth();o&&(t+=s),Tt(this.eRightSpacer,t),this.eRightSpacer.classList.toggle("ag-scroller-corner",t<=s);let i=this.visibleCols.getColsLeftWidth();this.enableRtl&&e&&(i+=s),Tt(this.eLeftSpacer,i),this.eLeftSpacer.classList.toggle("ag-scroller-corner",i<=s)}setScrollVisible(){const e=this.scrollVisibleSvc.horizontalScrollShowing,t=this.invisibleScrollbar,o=this.gos.get("suppressHorizontalScroll"),s=e&&this.scrollVisibleSvc.getScrollbarWidth()||0,n=o?0:s===0&&t?16:s,r=()=>{this.setScrollVisibleDebounce=0,this.toggleCss("ag-scrollbar-invisible",t),Vs(this.getGui(),n),Vs(this.eViewport,n),Vs(this.eContainer,n),n||this.eContainer.style.setProperty("min-height","1px"),this.setVisible(e,{skipAriaHidden:!0})};window.clearTimeout(this.setScrollVisibleDebounce),e?this.setScrollVisibleDebounce=window.setTimeout(r,100):r()}getScrollPosition(){return Ui(this.eViewport,this.enableRtl)}setScrollPosition(e){vt(this.eViewport)||this.attemptSettingScrollPosition(e),$i(this.eViewport,e,this.enableRtl)}},Vu=class extends x{constructor(e,t){super(),this.eContainer=e,this.eViewport=t}postConstruct(){this.addManagedEventListeners({rowContainerHeightChanged:this.onHeightChanged.bind(this,this.beans.rowContainerHeight)})}onHeightChanged(e){const t=e.uiContainerHeight,o=t!=null?`${t}px`:"";this.eContainer.style.height=o,this.eViewport&&(this.eViewport.style.height=o)}},iv={tag:"div",cls:"ag-body-vertical-scroll",attrs:{"aria-hidden":"true"},children:[{tag:"div",ref:"eViewport",cls:"ag-body-vertical-scroll-viewport",children:[{tag:"div",ref:"eContainer",cls:"ag-body-vertical-scroll-container"}]}]},nv=class extends Bu{constructor(){super(iv,"vertical")}postConstruct(){super.postConstruct(),this.createManagedBean(new Vu(this.eContainer));const{ctrlsSvc:e}=this.beans;e.register("fakeVScrollComp",this),this.addManagedEventListeners({rowContainerHeightChanged:this.onRowContainerHeightChanged.bind(this,e)})}setScrollVisible(){const{scrollVisibleSvc:e}=this.beans,t=e.verticalScrollShowing,o=this.invisibleScrollbar,s=t&&e.getScrollbarWidth()||0,i=s===0&&o?16:s;this.toggleCss("ag-scrollbar-invisible",o),Tt(this.getGui(),i),Tt(this.eViewport,i),Tt(this.eContainer,i),this.setDisplayed(t,{skipAriaHidden:!0})}onRowContainerHeightChanged(e){const o=e.getGridBodyCtrl().eBodyViewport,s=this.getScrollPosition(),i=o.scrollTop;s!=i&&this.setScrollPosition(i,!0)}getScrollPosition(){return this.eViewport.scrollTop}setScrollPosition(e,t){!t&&!vt(this.eViewport)&&this.attemptSettingScrollPosition(e),this.eViewport.scrollTop=e}},Yt="Viewport",Xl="fakeVScrollComp",Qn=["fakeHScrollComp","centerHeader","topCenter","bottomCenter","stickyTopCenter","stickyBottomCenter"],ec=100,Zn=150,rv=class extends x{constructor(e){super(),this.clearRetryListenerFncs=[],this.lastScrollSource=[null,null],this.scrollLeft=-1,this.nextScrollTop=-1,this.scrollTop=-1,this.lastOffsetHeight=-1,this.lastScrollTop=-1,this.lastIsHorizontalScrollShowing=!1,this.scrollTimer=0,this.isScrollActive=!1,this.isVerticalPositionInvalidated=!0,this.isHorizontalPositionInvalidated=!0,this.eBodyViewport=e,this.resetLastHScrollDebounced=xe(this,()=>this.lastScrollSource[1]=null,Zn),this.resetLastVScrollDebounced=xe(this,()=>this.lastScrollSource[0]=null,Zn)}wireBeans(e){this.ctrlsSvc=e.ctrlsSvc,this.animationFrameSvc=e.animationFrameSvc,this.visibleCols=e.visibleCols}destroy(){super.destroy(),this.clearRetryListenerFncs=[],window.clearTimeout(this.scrollTimer)}postConstruct(){this.enableRtl=this.gos.get("enableRtl");const e=this.invalidateVerticalScroll.bind(this),t=this.invalidateHorizontalScroll.bind(this);this.addManagedEventListeners({displayedColumnsWidthChanged:this.onDisplayedColumnsWidthChanged.bind(this),bodyHeightChanged:e,scrollGapChanged:t}),this.addManagedElementListeners(this.eBodyViewport,{scroll:e}),this.ctrlsSvc.whenReady(this,o=>{this.centerRowsCtrl=o.center,this.fakeVScrollComp=o.fakeVScrollComp,this.fakeHScrollComp=o.fakeHScrollComp,this.onDisplayedColumnsWidthChanged(),this.addScrollListener()})}invalidateHorizontalScroll(){this.isHorizontalPositionInvalidated=!0}invalidateVerticalScroll(){this.isVerticalPositionInvalidated=!0}addScrollListener(){this.addHorizontalScrollListeners(),this.addVerticalScrollListeners()}addHorizontalScrollListeners(){this.addManagedElementListeners(this.centerRowsCtrl.eViewport,{scroll:this.onHScroll.bind(this,Yt)});for(const e of Qn){const t=this.ctrlsSvc.get(e);this.registerScrollPartner(t,this.onHScroll.bind(this,e))}}addVerticalScrollListeners(){const e=this.gos.get("debounceVerticalScrollbar"),t=e?xe(this,this.onVScroll.bind(this,Yt),ec):this.onVScroll.bind(this,Yt),o=e?xe(this,this.onVScroll.bind(this,Xl),ec):this.onVScroll.bind(this,Xl);this.addManagedElementListeners(this.eBodyViewport,{scroll:t}),this.registerScrollPartner(this.fakeVScrollComp,o)}registerScrollPartner(e,t){e.onScrollCallback(t)}onDisplayedColumnsWidthChanged(){this.enableRtl&&this.horizontallyScrollHeaderCenterAndFloatingCenter()}horizontallyScrollHeaderCenterAndFloatingCenter(e){this.centerRowsCtrl!=null&&(e===void 0&&(e=this.centerRowsCtrl.getCenterViewportScrollLeft()),this.setScrollLeftForAllContainersExceptCurrent(Math.abs(e)))}setScrollLeftForAllContainersExceptCurrent(e){for(const t of[...Qn,Yt]){if(this.lastScrollSource[1]===t)continue;const o=this.getViewportForSource(t);$i(o,e,this.enableRtl)}}getViewportForSource(e){return e===Yt?this.centerRowsCtrl.eViewport:this.ctrlsSvc.get(e).eViewport}isControllingScroll(e,t){return this.lastScrollSource[t]==null?(t===0?this.lastScrollSource[0]=e:this.lastScrollSource[1]=e,!0):this.lastScrollSource[t]===e}onHScroll(e){if(!this.isControllingScroll(e,1))return;const t=this.centerRowsCtrl.eViewport,{scrollLeft:o}=t;if(this.shouldBlockScrollUpdate(1,o,!0))return;const s=Ui(this.getViewportForSource(e),this.enableRtl);this.doHorizontalScroll(s),this.resetLastHScrollDebounced()}onVScroll(e){if(!this.isControllingScroll(e,0))return;const t=e===Yt?this.eBodyViewport.scrollTop:this.fakeVScrollComp.getScrollPosition();let o=t;if(this.shouldBlockScrollUpdate(0,o,!0))return;e===Yt?this.fakeVScrollComp.setScrollPosition(o):(this.eBodyViewport.scrollTop=t,o=this.eBodyViewport.scrollTop,this.invalidateVerticalScroll(),o!==t&&this.fakeVScrollComp.setScrollPosition(o,!0));const{animationFrameSvc:s}=this;s?.setScrollTop(o),this.nextScrollTop=o,s?.active?s.schedule():this.scrollGridIfNeeded(!0),this.resetLastVScrollDebounced()}doHorizontalScroll(e){const t=this.fakeHScrollComp.getScrollPosition();this.scrollLeft===e&&e===t||(this.scrollLeft=e,this.fireScrollEvent(1),this.horizontallyScrollHeaderCenterAndFloatingCenter(e),this.centerRowsCtrl.onHorizontalViewportChanged(!0))}isScrolling(){return this.isScrollActive}fireScrollEvent(e){const t={type:"bodyScroll",direction:e===1?"horizontal":"vertical",left:this.scrollLeft,top:this.scrollTop};this.isScrollActive=!0,this.eventSvc.dispatchEvent(t),window.clearTimeout(this.scrollTimer),this.scrollTimer=window.setTimeout(()=>{this.scrollTimer=0,this.isScrollActive=!1,this.eventSvc.dispatchEvent({...t,type:"bodyScrollEnd"})},Zn)}shouldBlockScrollUpdate(e,t,o=!1){return o&&!Mo()?!1:e===0?this.shouldBlockVerticalScroll(t):this.shouldBlockHorizontalScroll(t)}shouldBlockVerticalScroll(e){const t=wa(this.eBodyViewport),{scrollHeight:o}=this.eBodyViewport;return e<0||e+t>o}shouldBlockHorizontalScroll(e){const t=this.centerRowsCtrl.getCenterWidth(),{scrollWidth:o}=this.centerRowsCtrl.eViewport;if(this.enableRtl){if(e>0)return!0}else if(e<0)return!0;return Math.abs(e)+t>o}redrawRowsAfterScroll(){this.fireScrollEvent(0)}checkScrollLeft(){const e=this.scrollLeft;let t=!1;for(const o of Qn)if(this.getViewportForSource(o).scrollLeft!==e){t=!0;break}t&&this.onHScroll(Yt)}scrollGridIfNeeded(e=!1){const t=this.scrollTop!=this.nextScrollTop;return t&&(this.scrollTop=this.nextScrollTop,e&&this.invalidateVerticalScroll(),this.redrawRowsAfterScroll()),t}setHorizontalScrollPosition(e,t=!1){const s=this.centerRowsCtrl.eViewport.scrollWidth-this.centerRowsCtrl.getCenterWidth();!t&&this.shouldBlockScrollUpdate(1,e)&&(this.enableRtl?e=e>0?0:s:e=Math.min(Math.max(e,0),s)),$i(this.centerRowsCtrl.eViewport,Math.abs(e),this.enableRtl),this.doHorizontalScroll(e)}setVerticalScrollPosition(e){this.invalidateVerticalScroll(),this.eBodyViewport.scrollTop=e}getVScrollPosition(){if(!this.isVerticalPositionInvalidated){const{lastOffsetHeight:o,lastScrollTop:s}=this;return{top:s,bottom:s+o}}this.isVerticalPositionInvalidated=!1;const{scrollTop:e,offsetHeight:t}=this.eBodyViewport;return this.lastScrollTop=e,this.lastOffsetHeight=t,{top:e,bottom:e+t}}getApproximateVScollPosition(){return this.lastScrollTop>=0&&this.lastOffsetHeight>=0?{top:this.scrollTop,bottom:this.scrollTop+this.lastOffsetHeight}:this.getVScrollPosition()}getHScrollPosition(){return this.centerRowsCtrl.getHScrollPosition()}isHorizontalScrollShowing(){return this.isHorizontalPositionInvalidated&&(this.lastIsHorizontalScrollShowing=this.centerRowsCtrl.isHorizontalScrollShowing(),this.isHorizontalPositionInvalidated=!1),this.lastIsHorizontalScrollShowing}scrollHorizontally(e){const t=this.centerRowsCtrl.eViewport.scrollLeft;return this.setHorizontalScrollPosition(t+e),this.centerRowsCtrl.eViewport.scrollLeft-t}scrollToTop(){this.setVerticalScrollPosition(0)}ensureNodeVisible(e,t=null){const{rowModel:o}=this.beans,s=o.getRowCount();let i=-1;for(let n=0;n<s;n++){const r=o.getRow(n);if(typeof e=="function"){if(r&&e(r)){i=n;break}}else if(e===r||e===r.data){i=n;break}}i>=0&&this.ensureIndexVisible(i,t)}ensureIndexVisible(e,t,o=0){if(Le(this.gos,"print"))return;const{rowModel:s}=this.beans,i=s.getRowCount();if(typeof e!="number"||e<0||e>=i){D(88,{index:e});return}this.clearRetryListeners();const{frameworkOverrides:n,pageBounds:r,rowContainerHeight:a,rowRenderer:l}=this.beans;n.wrapIncoming(()=>{const c=this.ctrlsSvc.getGridBodyCtrl(),d=s.getRow(e);let u,h,g=0;this.invalidateVerticalScroll();do{const{stickyTopHeight:f,stickyBottomHeight:m}=c,C=d.rowTop,v=d.rowHeight,w=r.getPixelOffset(),b=d.rowTop-w,y=b+d.rowHeight,S=this.getVScrollPosition(),F=a.divStretchOffset,E=S.top+F,G=S.bottom+F,k=G-E,O=a.getScrollPositionForPixel(b),P=a.getScrollPositionForPixel(y-k),A=Math.min((O+P)/2,b),M=E+f>b,J=G-m<y;let T=null;t==="top"?T=O-f:t==="bottom"?T=P+m:t==="middle"?T=A:M?T=O-f:J&&(P-O>k?T=O-f:T=P+m),T!==null&&(this.setVerticalScrollPosition(T),l.redraw({afterScroll:!0})),u=C!==d.rowTop||v!==d.rowHeight,h=f!==c.stickyTopHeight||m!==c.stickyBottomHeight,g++}while((u||h)&&g<10);if(this.animationFrameSvc?.flushAllFrames(),o<10&&(d?.stub||!this.beans.rowAutoHeight?.areRowsMeasured())){const f=this.getVScrollPosition().top;this.clearRetryListenerFncs=this.addManagedEventListeners({bodyScroll:()=>{const m=this.getVScrollPosition().top;f!==m&&this.clearRetryListeners()},modelUpdated:()=>{this.clearRetryListeners(),!(e>=s.getRowCount())&&this.ensureIndexVisible(e,t,o+1)}})}})}clearRetryListeners(){for(const e of this.clearRetryListenerFncs)e();this.clearRetryListenerFncs=[]}ensureColumnVisible(e,t="auto"){const{colModel:o,frameworkOverrides:s}=this.beans,i=o.getCol(e);if(!i||i.isPinned()||!this.visibleCols.isColDisplayed(i))return;const n=this.getPositionedHorizontalScroll(i,t);s.wrapIncoming(()=>{n!==null&&this.centerRowsCtrl.setCenterViewportScrollLeft(n),this.centerRowsCtrl.onHorizontalViewportChanged(),this.animationFrameSvc?.flushAllFrames()})}getPositionedHorizontalScroll(e,t){const{columnBeforeStart:o,columnAfterEnd:s}=this.isColumnOutsideViewport(e),i=this.centerRowsCtrl.getCenterWidth()<e.getActualWidth(),n=this.centerRowsCtrl.getCenterWidth(),r=this.enableRtl;let a=(r?o:s)||i,l=r?s:o;t!=="auto"&&(a=t==="start",l=t==="end");const c=t==="middle";if(a||l||c){const{colLeft:d,colMiddle:u,colRight:h}=this.getColumnBounds(e);return c?u-n/2:a?r?h:d:r?d-n:h-n}return null}isColumnOutsideViewport(e){const{start:t,end:o}=this.getViewportBounds(),{colLeft:s,colRight:i}=this.getColumnBounds(e),n=this.enableRtl,r=n?t>i:o<i,a=n?o<s:t>s;return{columnBeforeStart:r,columnAfterEnd:a}}getColumnBounds(e){const t=this.enableRtl,o=this.visibleCols.bodyWidth,s=e.getActualWidth(),i=e.getLeft(),n=t?-1:1,r=t?o-i:i,a=r+s*n,l=r+s/2*n;return{colLeft:r,colMiddle:l,colRight:a}}getViewportBounds(){const e=this.centerRowsCtrl.getCenterWidth(),t=this.centerRowsCtrl.getCenterViewportScrollLeft(),o=t,s=e+t;return{start:o,end:s,width:e}}},tc={horizontal:{overflow:e=>e.scrollWidth-e.clientWidth,scrollSize:e=>e.scrollWidth,clientSize:e=>e.clientWidth,opposite:"vertical"},vertical:{overflow:e=>e.scrollHeight-e.clientHeight,scrollSize:e=>e.scrollHeight,clientSize:e=>e.clientHeight,opposite:"horizontal"}};function av(e,t,o=ka()||0,s,i){return Nu(e,t,"horizontal",o,s,i)}function lv(e,t,o=ka()||0,s,i){return Nu(e,t,"vertical",o,s,i)}function Nu(e,t,o,s,i,n){const r=tc[o],a=tc[r.opposite],l=i?vt(i):!0,c=n?vt(n):!0,d=r.overflow(e);if(d<=0)return!1;if(!t||s===0)return!0;const u=a.overflow(t);if(u<=0)return!0;if(d<=s){if(l&&c&&cv({candidateOverflow:u,candidateScrollSize:a.scrollSize(t),candidateClientSize:a.clientSize(t),scrollbarWidth:s}))return!1;const h=r.clientSize(e)+s;return r.scrollSize(e)<=h}return!0}function cv({candidateOverflow:e,candidateScrollSize:t,candidateClientSize:o,scrollbarWidth:s}){if(e<=0||e>s)return!1;const i=o+s;return t>o&&t<=i}var dv=class extends x{constructor(e){super(),this.centerContainerCtrl=e}wireBeans(e){this.scrollVisibleSvc=e.scrollVisibleSvc}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.gridBodyCtrl=e.gridBodyCtrl,this.listenForResize()}),this.addManagedEventListeners({scrollbarWidthChanged:this.onScrollbarWidthChanged.bind(this)}),this.addManagedPropertyListeners(["alwaysShowHorizontalScroll","alwaysShowVerticalScroll"],()=>{this.checkViewportAndScrolls()})}listenForResize(){const{beans:e,centerContainerCtrl:t,gridBodyCtrl:o}=this,s=()=>{qt(e,()=>{this.onCenterViewportResized()})};t.registerViewportResizeListener(s),o.registerBodyViewportResizeListener(s)}onScrollbarWidthChanged(){this.checkViewportAndScrolls()}onCenterViewportResized(){if(this.scrollVisibleSvc.updateScrollGap(),this.centerContainerCtrl.isViewportInTheDOMTree()){const{pinnedCols:e,colFlex:t}=this.beans;e?.keepPinnedColumnsNarrowerThanViewport(),this.checkViewportAndScrolls();const o=this.centerContainerCtrl.getCenterWidth();o!==this.centerWidth&&(this.centerWidth=o,t?.refreshFlexedColumns({viewportWidth:this.centerWidth,updateBodyWidths:!0,fireResizedEvent:!0}))}else this.bodyHeight=0}checkViewportAndScrolls(){this.updateScrollVisibleService(),this.checkBodyHeight(),this.onHorizontalViewportChanged(),this.gridBodyCtrl.scrollFeature.checkScrollLeft()}getBodyHeight(){return this.bodyHeight}checkBodyHeight(){const e=this.gridBodyCtrl.eBodyViewport,t=wa(e);this.bodyHeight!==t&&(this.bodyHeight=t,this.eventSvc.dispatchEvent({type:"bodyHeightChanged"}))}updateScrollVisibleService(){this.updateScrollVisibleServiceImpl(),setTimeout(this.updateScrollVisibleServiceImpl.bind(this),500)}updateScrollVisibleServiceImpl(){if(!this.isAlive())return;const e={horizontalScrollShowing:this.centerContainerCtrl.isHorizontalScrollShowing(),verticalScrollShowing:this.gridBodyCtrl.isVerticalScrollShowing()};this.scrollVisibleSvc.setScrollsVisible(e)}onHorizontalViewportChanged(){const{centerContainerCtrl:e,beans:t}=this,o=e.getCenterWidth(),s=e.getViewportScrollLeft();t.colViewport.setScrollPosition(o,s)}};function Wu(e){return e.altKey||e.ctrlKey||e.metaKey?!1:e.key?.length===1}function Gi(e,t,o,s){const i=t.getColDef().cellRendererParams?.suppressMouseEventHandling;return zu(e,t,o,s,i)}function uv(e,t,o,s){const i=t?.suppressMouseEventHandling;return zu(e,void 0,o,s,i)}function zu(e,t,o,s,i){return i?i(K(e,{column:t,node:o,event:s})):!1}function _u(e,t,o){let s=t;for(;s;){const i=ou(e,s,o);if(i)return i;s=s.parentElement}return null}var rn="cellCtrl";function Ka(e,t){return _u(e,t,rn)}var an="renderedRow";function hv(e,t){return _u(e,t,an)}function Vr(e,t,o,s,i){const n=s?s.getColDef().suppressKeyboardEvent:void 0;if(!n)return!1;const r=K(e,{event:t,editing:i,column:s,node:o,data:o.data,colDef:s.getColDef()});return!!(n&&n(r))}function gv(e){const{pinnedRowModel:t,rowModel:o,rangeSvc:s,visibleCols:i}=e;if(!s||i.allCols.length===0)return;const n=t?.isEmpty("top")??!0,r=t?.isEmpty("bottom")??!0,a=n?null:"top";let l,c;r?(l=null,c=o.getRowCount()-1):(l="bottom",c=t?.getPinnedBottomRowCount()??-1),s.setCellRange({rowStartIndex:0,rowStartPinned:a,rowEndIndex:c,rowEndPinned:l})}var pv=class extends x{constructor(e){super(),this.element=e}postConstruct(){this.addKeyboardListeners(),this.addMouseListeners(),this.beans.touchSvc?.mockRowContextMenu(this),this.editSvc=this.beans.editSvc}addKeyboardListeners(){const e="keydown",t=this.processKeyboardEvent.bind(this,e);this.addManagedElementListeners(this.element,{[e]:t})}addMouseListeners(){let e="mousedown";qi("pointerdown")?e="pointerdown":qi("touchstart")&&(e="touchstart");const t=["dblclick","contextmenu","mouseover","mouseout","click",e];for(const o of t){const s=this.processMouseEvent.bind(this,o);this.addManagedElementListeners(this.element,{[o]:s})}}processMouseEvent(e,t){if(!Xs(this.beans,t)||zt(t))return;const{cellCtrl:o,rowCtrl:s}=this.getControlsForEventTarget(t.target);e==="contextmenu"?(o?.column&&o.dispatchCellContextMenuEvent(t),this.beans.contextMenuSvc?.handleContextMenuMouseEvent(t,void 0,s,o)):(o&&o.onMouseEvent(e,t),s&&s.onMouseEvent(e,t))}getControlsForEventTarget(e){const{gos:t}=this;return{cellCtrl:Ka(t,e),rowCtrl:hv(t,e)}}processKeyboardEvent(e,t){const{cellCtrl:o,rowCtrl:s}=this.getControlsForEventTarget(t.target);t.defaultPrevented||(o?this.processCellKeyboardEvent(o,e,t):s?.isFullWidth()&&this.processFullWidthRowKeyboardEvent(s,e,t))}processCellKeyboardEvent(e,t,o){const s=this.editSvc?.isEditing(e,{withOpenEditor:!0})??!1;!Vr(this.gos,o,e.rowNode,e.column,s)&&t==="keydown"&&(!s&&this.beans.navigation?.handlePageScrollingKey(o)||e.onKeyDown(o),this.doGridOperations(o,s),Wu(o)&&e.processCharacter(o)),t==="keydown"&&this.eventSvc.dispatchEvent(e.createEvent(o,"cellKeyDown"))}processFullWidthRowKeyboardEvent(e,t,o){const{rowNode:s}=e,{focusSvc:i,navigation:n}=this.beans,a=i.getFocusedCell()?.column;if(!Vr(this.gos,o,s,a,!1)){const c=o.key;if(t==="keydown")switch(c){case R.PAGE_HOME:case R.PAGE_END:case R.PAGE_UP:case R.PAGE_DOWN:n?.handlePageScrollingKey(o,!0);break;case R.LEFT:case R.RIGHT:if(!this.gos.get("embedFullWidthRows"))break;case R.UP:case R.DOWN:e.onKeyboardNavigate(o);break;case R.TAB:e.onTabKeyDown(o);break}}t==="keydown"&&this.eventSvc.dispatchEvent(e.createRowEvent("cellKeyDown",o))}doGridOperations(e,t){if(!e.ctrlKey&&!e.metaKey||t||!Xs(this.beans,e))return;const o=fu(e),{clipboardSvc:s,undoRedo:i}=this.beans;if(o===R.A)return this.onCtrlAndA(e);if(o===R.C)return this.onCtrlAndC(s,e);if(o===R.D)return this.onCtrlAndD(s,e);if(o===R.V)return this.onCtrlAndV(s,e);if(o===R.X)return this.onCtrlAndX(s,e);if(o===R.Y)return this.onCtrlAndY(i);if(o===R.Z)return this.onCtrlAndZ(i,e)}onCtrlAndA(e){const{beans:{rowModel:t,rangeSvc:o,selectionSvc:s},gos:i}=this;o&&ao(i)&&!Nf(i)&&t.isRowsToRender()?gv(this.beans):s&&s.selectAllRowNodes({source:"keyboardSelectAll",selectAll:lu(i)}),e.preventDefault()}onCtrlAndC(e,t){if(!e||this.gos.get("enableCellTextSelection"))return;const{cellCtrl:o}=this.getControlsForEventTarget(t.target);this.editSvc?.isEditing(o,{withOpenEditor:!0})||(t.preventDefault(),e.copyToClipboard())}onCtrlAndX(e,t){if(!e||this.gos.get("enableCellTextSelection")||this.gos.get("suppressCutToClipboard"))return;const{cellCtrl:o}=this.getControlsForEventTarget(t.target);this.editSvc?.isEditing(o,{withOpenEditor:!0})||(t.preventDefault(),e.cutToClipboard(void 0,"ui"))}onCtrlAndV(e,t){const{cellCtrl:o}=this.getControlsForEventTarget(t.target);this.editSvc?.isEditing(o,{withOpenEditor:!0})||e&&!this.gos.get("suppressClipboardPaste")&&e.pasteFromClipboard()}onCtrlAndD(e,t){e&&!this.gos.get("suppressClipboardPaste")&&e.copyRangeDown(),t.preventDefault()}onCtrlAndZ(e,t){!this.gos.get("undoRedoCellEditing")||!e||(t.preventDefault(),t.shiftKey?e.redo("ui"):e.undo("ui"))}onCtrlAndY(e){e?.redo("ui")}},mi=e=>e.topRowCtrls,Ci=e=>e.getStickyTopRowCtrls(),vi=e=>e.getStickyBottomRowCtrls(),wi=e=>e.bottomRowCtrls,bi=e=>e.allRowCtrls,Jn=e=>e.getCtrls("top"),Xn=e=>e.getCtrls("center"),er=e=>e.getCtrls("bottom"),fv={center:{type:"center",name:"center-cols",getRowCtrls:bi,getSpannedRowCtrls:Xn},left:{type:"left",name:"pinned-left-cols",pinnedType:"left",getRowCtrls:bi,getSpannedRowCtrls:Xn},right:{type:"right",name:"pinned-right-cols",pinnedType:"right",getRowCtrls:bi,getSpannedRowCtrls:Xn},fullWidth:{type:"fullWidth",name:"full-width",fullWidth:!0,getRowCtrls:bi},topCenter:{type:"center",name:"floating-top",getRowCtrls:mi,getSpannedRowCtrls:Jn},topLeft:{type:"left",name:"pinned-left-floating",container:"ag-pinned-left-floating-top",pinnedType:"left",getRowCtrls:mi,getSpannedRowCtrls:Jn},topRight:{type:"right",name:"pinned-right-floating",container:"ag-pinned-right-floating-top",pinnedType:"right",getRowCtrls:mi,getSpannedRowCtrls:Jn},topFullWidth:{type:"fullWidth",name:"floating-top-full-width",fullWidth:!0,getRowCtrls:mi},stickyTopCenter:{type:"center",name:"sticky-top",getRowCtrls:Ci},stickyTopLeft:{type:"left",name:"pinned-left-sticky-top",container:"ag-pinned-left-sticky-top",pinnedType:"left",getRowCtrls:Ci},stickyTopRight:{type:"right",name:"pinned-right-sticky-top",container:"ag-pinned-right-sticky-top",pinnedType:"right",getRowCtrls:Ci},stickyTopFullWidth:{type:"fullWidth",name:"sticky-top-full-width",fullWidth:!0,getRowCtrls:Ci},stickyBottomCenter:{type:"center",name:"sticky-bottom",getRowCtrls:vi},stickyBottomLeft:{type:"left",name:"pinned-left-sticky-bottom",container:"ag-pinned-left-sticky-bottom",pinnedType:"left",getRowCtrls:vi},stickyBottomRight:{type:"right",name:"pinned-right-sticky-bottom",container:"ag-pinned-right-sticky-bottom",pinnedType:"right",getRowCtrls:vi},stickyBottomFullWidth:{type:"fullWidth",name:"sticky-bottom-full-width",fullWidth:!0,getRowCtrls:vi},bottomCenter:{type:"center",name:"floating-bottom",getRowCtrls:wi,getSpannedRowCtrls:er},bottomLeft:{type:"left",name:"pinned-left-floating-bottom",container:"ag-pinned-left-floating-bottom",pinnedType:"left",getRowCtrls:wi,getSpannedRowCtrls:er},bottomRight:{type:"right",name:"pinned-right-floating-bottom",container:"ag-pinned-right-floating-bottom",pinnedType:"right",getRowCtrls:wi,getSpannedRowCtrls:er},bottomFullWidth:{type:"fullWidth",name:"floating-bottom-full-width",fullWidth:!0,getRowCtrls:wi}};function Uu(e){return`ag-${ui(e).name}-viewport`}function $u(e){const t=ui(e);return t.container??`ag-${t.name}-container`}function mv(e){return`ag-${ui(e).name}-spanned-cells-container`}function ui(e){return fv[e]}var Cv=["topCenter","topLeft","topRight"],vv=["bottomCenter","bottomLeft","bottomRight"],wv=["center","left","right"],bv=["center","left","right","fullWidth"],Sv=["stickyTopCenter","stickyBottomCenter","center","topCenter","bottomCenter"],yv=["left","bottomLeft","topLeft","stickyTopLeft","stickyBottomLeft"],Rv=["right","bottomRight","topRight","stickyTopRight","stickyBottomRight"],Ku=["stickyTopCenter","stickyTopLeft","stickyTopRight"],qu=["stickyBottomCenter","stickyBottomLeft","stickyBottomRight"],Fv=[...Ku,"stickyTopFullWidth",...qu,"stickyBottomFullWidth"],Ev=[...Cv,...vv,...wv,...Ku,...qu],xv=class extends x{constructor(e){super(),this.name=e,this.visible=!0,this.EMPTY_CTRLS=[],this.options=ui(e)}postConstruct(){this.enableRtl=this.gos.get("enableRtl"),this.forContainers(["center"],()=>{this.viewportSizeFeature=this.createManagedBean(new dv(this)),this.addManagedEventListeners({stickyTopOffsetChanged:this.onStickyTopOffsetChanged.bind(this)})})}onStickyTopOffsetChanged(e){this.comp.setOffsetTop(`${e.offset}px`)}registerWithCtrlsService(){this.options.fullWidth||this.beans.ctrlsSvc.register(this.name,this)}forContainers(e,t){e.indexOf(this.name)>=0&&t()}setComp(e,t,o,s){this.comp=e,this.eContainer=t,this.eSpannedContainer=o,this.eViewport=s,this.createManagedBean(new pv(this.eViewport??this.eContainer)),this.addPreventScrollWhileDragging(),this.listenOnDomOrder();const{pinnedCols:i,rangeSvc:n}=this.beans,r=()=>this.onPinnedWidthChanged();this.forContainers(yv,()=>{this.pinnedWidthFeature=this.createOptionalManagedBean(i?.createPinnedWidthFeature(!0,this.eContainer,this.eSpannedContainer)),this.addManagedEventListeners({leftPinnedWidthChanged:r})}),this.forContainers(Rv,()=>{this.pinnedWidthFeature=this.createOptionalManagedBean(i?.createPinnedWidthFeature(!1,this.eContainer,this.eSpannedContainer)),this.addManagedEventListeners({rightPinnedWidthChanged:r})}),this.forContainers(bv,()=>this.createManagedBean(new Vu(this.eContainer,this.name==="center"?s:void 0))),n&&this.forContainers(Ev,()=>this.createManagedBean(n.createDragListenerFeature(this.eContainer))),this.forContainers(Sv,()=>this.createManagedBean(new za(a=>this.comp.setContainerWidth(`${a}px`)))),this.visible=this.isContainerVisible(),this.addListeners(),this.registerWithCtrlsService()}onScrollCallback(e){this.addManagedElementListeners(this.eViewport,{scroll:e})}addListeners(){const{spannedRowRenderer:e,gos:t}=this.beans,o=this.onDisplayedColumnsChanged.bind(this);this.addManagedEventListeners({displayedColumnsChanged:o,displayedColumnsWidthChanged:o,displayedRowsChanged:s=>this.onDisplayedRowsChanged(s.afterScroll)}),o(),this.onDisplayedRowsChanged(),e&&this.options.getSpannedRowCtrls&&t.get("enableCellSpan")&&this.addManagedListeners(e,{spannedRowsUpdated:()=>{const s=this.options.getSpannedRowCtrls(e);s&&this.comp.setSpannedRowCtrls(s,!1)}})}listenOnDomOrder(){if(Fv.indexOf(this.name)>=0){this.comp.setDomOrder(!0);return}const t=()=>{const o=this.gos.get("ensureDomOrder"),s=Le(this.gos,"print");this.comp.setDomOrder(o||s)};this.addManagedPropertyListener("domLayout",t),t()}onDisplayedColumnsChanged(){this.forContainers(["center"],()=>this.onHorizontalViewportChanged())}addPreventScrollWhileDragging(){const{dragSvc:e}=this.beans;if(!e)return;const t=o=>{e.dragging&&o.cancelable&&o.preventDefault()};this.eContainer.addEventListener("touchmove",t,{passive:!1}),this.addDestroyFunc(()=>this.eContainer.removeEventListener("touchmove",t))}onHorizontalViewportChanged(e=!1){const t=this.getCenterWidth(),o=this.getCenterViewportScrollLeft();this.beans.colViewport.setScrollPosition(t,o,e)}hasHorizontalScrollGap(){return this.eContainer.clientWidth-this.eViewport.clientWidth<0}hasVerticalScrollGap(){return this.eContainer.clientHeight-this.eViewport.clientHeight<0}getCenterWidth(){return Zs(this.eViewport)}getCenterViewportScrollLeft(){return Ui(this.eViewport,this.enableRtl)}registerViewportResizeListener(e){const t=Kt(this.beans,this.eViewport,e);this.addDestroyFunc(()=>t())}isViewportInTheDOMTree(){return Ld(this.eViewport)}getViewportScrollLeft(){return Ui(this.eViewport,this.enableRtl)}isHorizontalScrollShowing(){const{beans:e,gos:t,eViewport:o}=this,s=t.get("alwaysShowHorizontalScroll"),{ctrlsSvc:i}=e,n=i.getGridBodyCtrl()?.eBodyViewport,r=i.get("fakeHScrollComp")?.getGui(),a=i.get("fakeVScrollComp")?.getGui();return s||av(o,n,void 0,r,a)}setHorizontalScroll(e){this.comp.setHorizontalScroll(e)}getHScrollPosition(){return{left:this.eViewport.scrollLeft,right:this.eViewport.scrollLeft+this.eViewport.offsetWidth}}setCenterViewportScrollLeft(e){$i(this.eViewport,e,this.enableRtl)}isContainerVisible(){return!(this.options.pinnedType!=null)||!!this.pinnedWidthFeature&&this.pinnedWidthFeature.getWidth()>0}onPinnedWidthChanged(){const e=this.isContainerVisible();this.visible!=e&&(this.visible=e,this.onDisplayedRowsChanged())}onDisplayedRowsChanged(e=!1){const t=this.options.getRowCtrls(this.beans.rowRenderer);if(!this.visible||t.length===0){this.comp.setRowCtrls({rowCtrls:this.EMPTY_CTRLS});return}const o=Le(this.gos,"print"),i=this.gos.get("embedFullWidthRows")||o,n=t.filter(r=>{const a=r.isFullWidth();return this.options.fullWidth?!i&&a:i||!a});this.comp.setRowCtrls({rowCtrls:n,useFlushSync:e})}},Pv="ag-force-vertical-scroll",Dv="ag-selectable",Mv="ag-column-moving",Tv=class extends x{constructor(){super(...arguments),this.stickyTopHeight=0,this.stickyBottomHeight=0}wireBeans(e){this.ctrlsSvc=e.ctrlsSvc,this.colModel=e.colModel,this.scrollVisibleSvc=e.scrollVisibleSvc,this.pinnedRowModel=e.pinnedRowModel,this.filterManager=e.filterManager,this.rowGroupColsSvc=e.rowGroupColsSvc}setComp(e,t,o,s,i,n,r){this.comp=e,this.eGridBody=t,this.eBodyViewport=o,this.eTop=s,this.eBottom=i,this.eStickyTop=n,this.eStickyBottom=r,this.eCenterColsViewport=o.querySelector(`.${Uu("center")}`),this.eFullWidthContainer=o.querySelector(`.${$u("fullWidth")}`),this.setCellTextSelection(this.gos.get("enableCellTextSelection")),this.addManagedPropertyListener("enableCellTextSelection",a=>this.setCellTextSelection(a.currentValue)),this.createManagedBean(new $a(this.comp)),this.scrollFeature=this.createManagedBean(new rv(o)),this.beans.rowDragSvc?.setupRowDrag(o,this),this.setupRowAnimationCssClass(),this.addEventListeners(),this.addFocusListeners([s,o,i,n,r]),this.setGridRootRole(),this.onGridColumnsChanged(),this.addBodyViewportListener(),this.setFloatingHeights(),this.disableBrowserDragging(),this.addStopEditingWhenGridLosesFocus(),this.updateScrollingClasses(),this.filterManager?.setupAdvFilterHeaderComp(s),this.ctrlsSvc.register("gridBodyCtrl",this)}addEventListeners(){const e=this.setFloatingHeights.bind(this),t=this.setGridRootRole.bind(this),o=this.toggleRowResizeStyles.bind(this);this.addManagedEventListeners({gridColumnsChanged:this.onGridColumnsChanged.bind(this),scrollVisibilityChanged:this.onScrollVisibilityChanged.bind(this),scrollGapChanged:this.updateScrollingClasses.bind(this),pinnedRowDataChanged:e,pinnedHeightChanged:e,pinnedRowsChanged:e,headerHeightChanged:this.setStickyTopOffsetTop.bind(this),columnRowGroupChanged:t,columnPivotChanged:t,rowResizeStarted:o,rowResizeEnded:o}),this.addManagedPropertyListener("treeData",t)}toggleRowResizeStyles(e){const t=e.type==="rowResizeStarted";this.eBodyViewport.classList.toggle("ag-prevent-animation",t)}onGridColumnsChanged(){const e=this.beans.colModel.getCols();this.comp.setColumnCount(e.length)}onScrollVisibilityChanged(){const{scrollVisibleSvc:e}=this,t=e.verticalScrollShowing;this.setVerticalScrollPaddingVisible(t),this.setStickyWidth(t),this.setStickyBottomOffsetBottom();const o=t&&e.getScrollbarWidth()||0,s=Fu()?16:0,i=`calc(100% + ${o+s}px)`;qt(this.beans,()=>this.comp.setBodyViewportWidth(i)),this.updateScrollingClasses()}setGridRootRole(){const{rowGroupColsSvc:e,colModel:t,gos:o}=this;let s=o.get("treeData");if(!s){const i=t.isPivotMode();s=(e?e.columns.length:0)>=(i?2:1)}this.comp.setGridRootRole(s?"treegrid":"grid")}addFocusListeners(e){for(const t of e)this.addManagedElementListeners(t,{focusin:o=>{const{target:s}=o,i=Eo(s,"ag-root",t);t.classList.toggle("ag-has-focus",!i)},focusout:o=>{const{target:s,relatedTarget:i}=o,n=t.contains(i),r=Eo(i,"ag-root",t);Eo(s,"ag-root",t)||(!n||r)&&t.classList.remove("ag-has-focus")}})}setColumnMovingCss(e){this.comp.setColumnMovingCss(Mv,e)}setCellTextSelection(e=!1){this.comp.setCellSelectableCss(Dv,e)}updateScrollingClasses(){const{eGridBody:{classList:e},scrollVisibleSvc:t}=this;e.toggle("ag-body-vertical-content-no-gap",!t.verticalScrollGap),e.toggle("ag-body-horizontal-content-no-gap",!t.horizontalScrollGap)}disableBrowserDragging(){this.addManagedElementListeners(this.eGridBody,{dragstart:e=>{if(e.target instanceof HTMLImageElement)return e.preventDefault(),!1}})}addStopEditingWhenGridLosesFocus(){this.beans.editSvc?.addStopEditingWhenGridLosesFocus([this.eBodyViewport,this.eBottom,this.eTop,this.eStickyTop,this.eStickyBottom])}updateRowCount(){const e=(this.ctrlsSvc.getHeaderRowContainerCtrl()?.getRowCount()??0)+(this.filterManager?.getHeaderRowCount()??0),{rowModel:t}=this.beans,o=t.isLastRowIndexKnown()?t.getRowCount():-1,s=o===-1?-1:e+o;this.comp.setRowCount(s)}registerBodyViewportResizeListener(e){this.comp.registerBodyViewportResizeListener(e)}setVerticalScrollPaddingVisible(e){const t=e?"scroll":"hidden";this.comp.setPinnedTopBottomOverflowY(t)}isVerticalScrollShowing(){const{gos:e,comp:t,ctrlsSvc:o}=this,s=e.get("alwaysShowVerticalScroll"),i=s?Pv:null,n=Le(e,"normal");t.setAlwaysVerticalScrollClass(i,s);const r=o.get("center")?.eViewport,a=o.get("fakeHScrollComp")?.getGui(),l=o.get("fakeVScrollComp")?.getGui();return s||n&&lv(this.eBodyViewport,r,void 0,l,a)}setupRowAnimationCssClass(){const{rowContainerHeight:e,environment:t}=this.beans;let o=t.sizesMeasured;const s=()=>{const i=o&&cs(this.gos)&&!e.stretching,n=i?"ag-row-animation":"ag-row-no-animation";this.comp.setRowAnimationCssOnBodyViewport(n,i)};s(),this.addManagedEventListeners({heightScaleChanged:s}),this.addManagedPropertyListener("animateRows",s),this.addManagedEventListeners({stylesChanged:()=>{!o&&t.sizesMeasured&&(o=!0,s())}})}addBodyViewportListener(){const{eBodyViewport:e,eStickyTop:t,eStickyBottom:o,eTop:s,eBottom:i,beans:{popupSvc:n,touchSvc:r}}=this,a=this.onBodyViewportContextMenu.bind(this);this.addManagedElementListeners(e,{contextmenu:a}),r?.mockBodyContextMenu(this,a),this.addManagedElementListeners(e,{wheel:this.onBodyViewportWheel.bind(this,n)});const l=this.onStickyWheel.bind(this);for(const d of[t,o,s,i])this.addManagedElementListeners(d,{wheel:l});const c=this.onHorizontalWheel.bind(this);for(const d of["left","right","topLeft","topRight","bottomLeft","bottomRight"])this.addManagedElementListeners(this.ctrlsSvc.get(d).eContainer,{wheel:c});this.addFullWidthContainerWheelListener()}addFullWidthContainerWheelListener(){this.addManagedElementListeners(this.eFullWidthContainer,{wheel:e=>this.onFullWidthContainerWheel(e)})}onFullWidthContainerWheel(e){const{deltaX:t,deltaY:o,shiftKey:s}=e;(s||Math.abs(t)>Math.abs(o))&&Xs(this.beans,e)&&this.scrollGridBodyToMatchEvent(e)}onStickyWheel(e){const{deltaY:t}=e;this.scrollVertically(t)>0&&e.preventDefault()}onHorizontalWheel(e){const{deltaX:t,deltaY:o,shiftKey:s}=e;(s||Math.abs(t)>Math.abs(o))&&this.scrollGridBodyToMatchEvent(e)}scrollGridBodyToMatchEvent(e){const{deltaX:t,deltaY:o}=e;e.preventDefault(),this.eCenterColsViewport.scrollBy({left:t||o})}onBodyViewportContextMenu(e,t,o){if(!e&&!o)return;this.gos.get("preventDefaultOnContextMenu")&&(e||o).preventDefault();const{target:s}=e||t;(s===this.eBodyViewport||s===this.ctrlsSvc.get("center").eViewport)&&this.beans.contextMenuSvc?.showContextMenu({mouseEvent:e,touchEvent:o,value:null,anchorToElement:this.eGridBody,source:"ui"})}onBodyViewportWheel(e,t){this.gos.get("suppressScrollWhenPopupsAreOpen")&&e?.hasAnchoredPopup()&&t.preventDefault()}scrollVertically(e){const t=this.eBodyViewport.scrollTop;return this.scrollFeature.setVerticalScrollPosition(t+e),this.eBodyViewport.scrollTop-t}setFloatingHeights(){const{pinnedRowModel:e,beans:{environment:t}}=this,o=e?.getPinnedTopTotalHeight(),s=e?.getPinnedBottomTotalHeight(),i=t.getPinnedRowBorderWidth(),n=t.getRowBorderWidth(),r=i-n,a=o?r+o:0,l=s?r+s:0;this.comp.setTopHeight(a),this.comp.setBottomHeight(l),this.comp.setTopInvisible(a<=0),this.comp.setBottomInvisible(l<=0),this.setStickyTopOffsetTop(),this.setStickyBottomOffsetBottom()}setStickyTopHeight(e=0){this.comp.setStickyTopHeight(`${e}px`),this.stickyTopHeight=e}setStickyBottomHeight(e=0){this.comp.setStickyBottomHeight(`${e}px`),this.stickyBottomHeight=e}setStickyWidth(e){if(!e)this.comp.setStickyTopWidth("100%"),this.comp.setStickyBottomWidth("100%");else{const t=this.scrollVisibleSvc.getScrollbarWidth();this.comp.setStickyTopWidth(`calc(100% - ${t}px)`),this.comp.setStickyBottomWidth(`calc(100% - ${t}px)`)}}setStickyTopOffsetTop(){const t=this.ctrlsSvc.get("gridHeaderCtrl").headerHeight+(this.filterManager?.getHeaderHeight()??0),o=this.pinnedRowModel?.getPinnedTopTotalHeight()??0;let s=0;t>0&&(s+=t),o>0&&(s+=o),s>0&&(s+=1),this.comp.setStickyTopTop(`${s}px`)}setStickyBottomOffsetBottom(){const{pinnedRowModel:e,scrollVisibleSvc:t,comp:o}=this,s=e?.getPinnedBottomTotalHeight()??0,n=t.horizontalScrollShowing&&t.getScrollbarWidth()||0,r=s+n;o.setStickyBottomBottom(`${r}px`)}};function it(e){return Lo(e)}var ps={TAB_GUARD:"ag-tab-guard",TAB_GUARD_TOP:"ag-tab-guard-top",TAB_GUARD_BOTTOM:"ag-tab-guard-bottom"},ju=class extends qe{constructor(e,t){super(),this.stopPropagationCallbacks=t,this.skipTabGuardFocus=!1,this.forcingFocusOut=!1,this.allowFocus=!1;const{comp:o,eTopGuard:s,eBottomGuard:i,focusTrapActive:n,forceFocusOutWhenTabGuardsAreEmpty:r,isFocusableContainer:a,focusInnerElement:l,onFocusIn:c,onFocusOut:d,shouldStopEventPropagation:u,onTabKeyDown:h,handleKeyDown:g,isEmpty:f,eFocusableElement:m}=e;this.comp=o,this.eTopGuard=s,this.eBottomGuard=i,this.providedFocusInnerElement=l,this.eFocusableElement=m,this.focusTrapActive=!!n,this.forceFocusOutWhenTabGuardsAreEmpty=!!r,this.isFocusableContainer=!!a,this.providedFocusIn=c,this.providedFocusOut=d,this.providedShouldStopEventPropagation=u,this.providedOnTabKeyDown=h,this.providedHandleKeyDown=g,this.providedIsEmpty=f}postConstruct(){this.createManagedBean(new Pu(this.eFocusableElement,this.stopPropagationCallbacks,{shouldStopEventPropagation:()=>this.shouldStopEventPropagation(),onTabKeyDown:e=>this.onTabKeyDown(e),handleKeyDown:e=>this.handleKeyDown(e),onFocusIn:e=>this.onFocusIn(e),onFocusOut:e=>this.onFocusOut(e)})),this.activateTabGuards();for(const e of[this.eTopGuard,this.eBottomGuard])this.addManagedElementListeners(e,{focus:this.onFocus.bind(this)})}handleKeyDown(e){this.providedHandleKeyDown&&this.providedHandleKeyDown(e)}tabGuardsAreActive(){return!!this.eTopGuard&&this.eTopGuard.hasAttribute("tabIndex")}shouldStopEventPropagation(){return this.providedShouldStopEventPropagation?this.providedShouldStopEventPropagation():!1}activateTabGuards(){if(this.forcingFocusOut)return;const e=this.gos.get("tabIndex");this.comp.setTabIndex(e.toString())}deactivateTabGuards(){this.comp.setTabIndex()}onFocus(e){if(this.isFocusableContainer&&!this.eFocusableElement.contains(e.relatedTarget)&&!this.allowFocus){this.findNextElementOutsideAndFocus(e.target===this.eBottomGuard);return}if(this.skipTabGuardFocus){this.skipTabGuardFocus=!1;return}if(this.forceFocusOutWhenTabGuardsAreEmpty&&(this.providedIsEmpty?this.providedIsEmpty():To(this.eFocusableElement,".ag-tab-guard").length===0)){this.findNextElementOutsideAndFocus(e.target===this.eBottomGuard);return}if(this.isFocusableContainer&&this.eFocusableElement.contains(e.relatedTarget))return;const t=e.target===this.eBottomGuard;!(this.providedFocusInnerElement?this.providedFocusInnerElement(t):this.focusInnerElement(t))&&this.forceFocusOutWhenTabGuardsAreEmpty&&this.findNextElementOutsideAndFocus(e.target===this.eBottomGuard)}findNextElementOutsideAndFocus(e){const t=Pe(this.beans),o=To(t.body,null,!0),s=o.indexOf(e?this.eTopGuard:this.eBottomGuard);if(s===-1)return;let i,n;e?(i=0,n=s):(i=s+1,n=o.length);const r=o.slice(i,n),a=this.gos.get("tabIndex");r.sort((l,c)=>{const d=Number.parseInt(l.getAttribute("tabindex")||"0"),u=Number.parseInt(c.getAttribute("tabindex")||"0");return u===a?1:d===a?-1:d===0?1:u===0?-1:d-u}),r[e?r.length-1:0]?.focus()}onFocusIn(e){this.focusTrapActive||this.forcingFocusOut||(this.providedFocusIn&&this.providedFocusIn(e),this.isFocusableContainer||this.deactivateTabGuards())}onFocusOut(e){this.focusTrapActive||(this.providedFocusOut&&this.providedFocusOut(e),this.eFocusableElement.contains(e.relatedTarget)||this.activateTabGuards())}onTabKeyDown(e){if(this.providedOnTabKeyDown){this.providedOnTabKeyDown(e);return}if(this.focusTrapActive||e.defaultPrevented)return;const t=this.tabGuardsAreActive();t&&this.deactivateTabGuards();const o=this.getNextFocusableElement(e.shiftKey);t&&setTimeout(()=>this.activateTabGuards(),0),o&&(o.focus(),e.preventDefault())}focusInnerElement(e=!1){const t=To(this.eFocusableElement);return this.tabGuardsAreActive()&&(t.splice(0,1),t.splice(-1,1)),t.length?(t[e?t.length-1:0].focus({preventScroll:!0}),!0):!1}getNextFocusableElement(e){return $o(this.beans,this.eFocusableElement,!1,e)}forceFocusOutOfContainer(e=!1){if(this.forcingFocusOut)return;const t=e?this.eTopGuard:this.eBottomGuard;this.activateTabGuards(),this.skipTabGuardFocus=!0,this.forcingFocusOut=!0,t.focus(),window.setTimeout(()=>{this.forcingFocusOut=!1,this.activateTabGuards()})}isTabGuard(e,t){return e===this.eTopGuard&&!t||e===this.eBottomGuard&&(t??!0)}setAllowFocus(e){this.allowFocus=e}},Iv=class extends qe{constructor(e,t){super(),this.comp=e,this.stopPropagationCallbacks=t}initialiseTabGuard(e){this.eTopGuard=this.createTabGuard("top"),this.eBottomGuard=this.createTabGuard("bottom"),this.eFocusableElement=this.comp.getFocusableElement();const{eTopGuard:t,eBottomGuard:o,eFocusableElement:s,stopPropagationCallbacks:i}=this,n=[t,o],r={setTabIndex:v=>{for(const w of n)v==null?w.removeAttribute("tabindex"):w.setAttribute("tabindex",v)}};this.addTabGuards(t,o);const{focusTrapActive:a=!1,onFocusIn:l,onFocusOut:c,focusInnerElement:d,handleKeyDown:u,onTabKeyDown:h,shouldStopEventPropagation:g,isEmpty:f,forceFocusOutWhenTabGuardsAreEmpty:m,isFocusableContainer:C}=e;this.tabGuardCtrl=this.createManagedBean(new ju({comp:r,focusTrapActive:a,eTopGuard:t,eBottomGuard:o,eFocusableElement:s,onFocusIn:l,onFocusOut:c,focusInnerElement:d,handleKeyDown:u,onTabKeyDown:h,shouldStopEventPropagation:g,isEmpty:f,forceFocusOutWhenTabGuardsAreEmpty:m,isFocusableContainer:C},i))}getTabGuardCtrl(){return this.tabGuardCtrl}createTabGuard(e){const t=Pe(this.beans).createElement("div"),o=e==="top"?ps.TAB_GUARD_TOP:ps.TAB_GUARD_BOTTOM;return t.classList.add(ps.TAB_GUARD,o),ko(t,"presentation"),t}addTabGuards(e,t){const o=this.eFocusableElement;o.prepend(e),o.append(t)}removeAllChildrenExceptTabGuards(){const e=[this.eTopGuard,this.eBottomGuard];Xe(this.comp.getFocusableElement()),this.addTabGuards(...e)}forceFocusOutOfContainer(e=!1){this.tabGuardCtrl.forceFocusOutOfContainer(e)}appendChild(e,t,o){ya(t)||(t=t.getGui());const{eBottomGuard:s}=this;s?s.before(t):e(t,o)}destroy(){const{eTopGuard:e,eBottomGuard:t}=this;_t(e),_t(t),super.destroy()}},Av=class extends Ps{initialiseTabGuard(e,t){this.tabGuardFeature=this.createManagedBean(new Iv(this,t)),this.tabGuardFeature.initialiseTabGuard(e)}forceFocusOutOfContainer(e=!1){this.tabGuardFeature.forceFocusOutOfContainer(e)}appendChild(e,t){this.tabGuardFeature.appendChild(super.appendChild.bind(this),e,t)}},kv=class extends Av{initialiseTabGuard(t){super.initialiseTabGuard(t,La)}},oc=(e,t)=>Au(e,()=>Ho(e.getGui(),t,!1,!0)),sc=e=>e?.getFocusableContainerName()??"external",Lv=e=>e==null?"external":typeof e=="string"?e:"gridBody",Ov=class extends x{constructor(){super(...arguments),this.additionalFocusableContainers=new Set}setComp(e,t,o){this.view=e,this.eGridHostDiv=t,this.eGui=o,this.eGui.setAttribute("grid-id",this.beans.context.getId());const{dragAndDrop:s,ctrlsSvc:i}=this.beans;s?.registerGridDropTarget(()=>this.eGui,this),this.createManagedBean(new $a(this.view)),this.view.setRtlClass(this.gos.get("enableRtl")?"ag-rtl":"ag-ltr");const n=Kt(this.beans,this.eGridHostDiv,this.onGridSizeChanged.bind(this));this.addDestroyFunc(()=>n()),i.register("gridCtrl",this)}isDetailGrid(){return xu(this.getGui())?.getAttribute("row-id")?.startsWith("detail")||!1}getOptionalSelectors(){const e=this.beans;return{paginationSelector:e.pagination?.getPaginationSelector(),gridHeaderDropZonesSelector:e.registry?.getSelector("AG-GRID-HEADER-DROP-ZONES"),sideBarSelector:e.sideBar?.getSelector(),statusBarSelector:e.registry?.getSelector("AG-STATUS-BAR"),watermarkSelector:e.licenseManager?.getWatermarkSelector()}}onGridSizeChanged(){this.eventSvc.dispatchEvent({type:"gridSizeChanged",clientWidth:this.eGridHostDiv.clientWidth,clientHeight:this.eGridHostDiv.clientHeight})}destroyGridUi(){this.view.destroyGridUi()}getGui(){return this.eGui}setResizeCursor(e){const{view:t}=this;e===!1?t.setCursor(null):t.setCursor(e===1?"ew-resize":"ns-resize")}disableUserSelect(e){this.view.setUserSelect(e?"none":null)}focusNextInnerContainer(e){const t=this.getFocusableContainers(),{indexWithFocus:o,nextIndex:s}=this.getNextFocusableIndex(t,e),i=o===-1?e?t.length-1:0:s,{gos:n,beans:{focusSvc:r,navigation:a}}=this,l=n.getCallback("tabToNextGridContainer");if(l){const c=r.getDefaultTabToNextGridContainerTarget({backwards:e,focusableContainers:t,nextIndex:i}),d=sc(t[i]),u=c==null&&d==="gridBody"?"gridBody":Lv(c),h=l({backwards:e,previousContainer:sc(t[o]),nextContainer:u,defaultTarget:c});if(h!==void 0){if(typeof h=="boolean")return h;if(typeof h=="string"){if(h==="gridBody")return this.focusGridBodyDefault(e)||void 0;const g=t.find(f=>f.getFocusableContainerName()===h);if(!g){_d(`tabToNextGridContainer - ${h} container not found`);return}return oc(g,e)?!0:void 0}return KC(h)?r.focusHeaderPosition({headerPosition:h})||void 0:(a?.ensureCellVisible(h),r.setFocusedCell({...h,forceBrowserFocus:!0}),r.isCellFocused(h)||void 0)}}return this.focusNextInnerContainerDefault({backwards:e,focusableContainers:t,indexWithFocus:o,nextIndex:i})||void 0}focusInnerElement(e){const{gos:t,beans:o,beans:{focusSvc:s,visibleCols:i}}=this;if(t.getCallback("focusGridInnerElement")?.({fromBottom:!!e}))return!0;const r=this.getFocusableContainers();if(e)return this.focusNextInnerContainerDefault({backwards:!0,focusableContainers:r,indexWithFocus:r.length,nextIndex:r.length-1})?!0:s.focusGridView({column:he(i.allCols),backwards:!0});const a=i.allCols;if(t.get("headerHeight")===0||pt(o)){if(s.focusGridView({column:a[0],backwards:e}))return!0;for(let l=1;l<r.length;l++)if(Ho(r[l].getGui(),e))return!0;return!1}return s.focusFirstHeader()}forceFocusOutOfContainer(e=!1){this.view.forceFocusOutOfContainer(e)}isFocusInsideGridBody(){const e=this.getFocusableContainers(),{indexWithFocus:t}=this.getNextFocusableIndex(e);return e[t]?.getFocusableContainerName()==="gridBody"}addFocusableContainer(e){this.additionalFocusableContainers.add(e)}removeFocusableContainer(e){this.additionalFocusableContainers.delete(e)}allowFocusForNextCoreContainer(e){const t=this.view.getFocusableContainers(),{indexWithFocus:o,nextIndex:s}=this.getNextFocusableIndex(t,e);this.focusNextInnerContainerDefault({backwards:!!e,focusableContainers:t,indexWithFocus:o,nextIndex:s})||this.forceFocusOutOfContainer(e)}isFocusable(){const e=this.beans;return!si(e)||!pt(e)||!!e.sideBar?.comp?.isDisplayed()}getNextFocusableIndex(e,t){const o=ve(this.beans),s=e.findIndex(i=>i.getGui().contains(o));return{indexWithFocus:s,nextIndex:s+(t?-1:1)}}focusGridBodyDefault(e){const{gos:t,beans:o,beans:{focusSvc:s,visibleCols:{allCols:i}}}=this;return e?s.focusGridView({column:he(i),backwards:!0}):t.get("headerHeight")===0||pt(o)?s.focusGridView({column:i[0]}):s.focusFirstHeader()}focusNextInnerContainerDefault(e){const{backwards:t,focusableContainers:o,indexWithFocus:s}=e,i=t?-1:1;for(let n=e.nextIndex;n>=0&&n<o.length;n+=i){const r=o[n];if(r.getFocusableContainerName()==="gridBody"&&(s===-1||(t?s>n:s<n))){if(this.focusGridBodyDefault(t))return!0;continue}if(oc(r,t))return!0}return!1}getFocusableContainers(){return[...this.view.getFocusableContainers(),...this.additionalFocusableContainers]}destroy(){this.additionalFocusableContainers.clear(),super.destroy()}},Y=(e,t)=>{for(const o of Object.keys(t))t[o]=e;return t},ic={dispatchEvent:"CommunityCore",...Y("CommunityCore",{destroy:0,getGridId:0,getGridOption:0,isDestroyed:0,setGridOption:0,updateGridOptions:0,isModuleRegistered:0}),...Y("GridState",{getState:0,setState:0}),...Y("SharedRowSelection",{setNodesSelected:0,selectAll:0,deselectAll:0,selectAllFiltered:0,deselectAllFiltered:0,selectAllOnCurrentPage:0,deselectAllOnCurrentPage:0,getSelectedNodes:0,getSelectedRows:0}),...Y("RowApi",{redrawRows:0,setRowNodeExpanded:0,getRowNode:0,addRenderedRowListener:0,getRenderedNodes:0,forEachNode:0,getFirstDisplayedRowIndex:0,getLastDisplayedRowIndex:0,getDisplayedRowAtIndex:0,getDisplayedRowCount:0}),...Y("ScrollApi",{getVerticalPixelRange:0,getHorizontalPixelRange:0,ensureColumnVisible:0,ensureIndexVisible:0,ensureNodeVisible:0}),...Y("KeyboardNavigation",{getFocusedCell:0,clearFocusedCell:0,setFocusedCell:0,tabToNextCell:0,tabToPreviousCell:0,setFocusedHeader:0}),...Y("EventApi",{addEventListener:0,addGlobalListener:0,removeEventListener:0,removeGlobalListener:0}),...Y("ValueCache",{expireValueCache:0}),...Y("CellApi",{getCellValue:0}),...Y("SharedMenu",{showColumnMenu:0,hidePopupMenu:0}),...Y("Sort",{onSortChanged:0}),...Y("PinnedRow",{getPinnedTopRowCount:0,getPinnedBottomRowCount:0,getPinnedTopRow:0,getPinnedBottomRow:0,forEachPinnedRow:0}),...Y("Overlay",{showLoadingOverlay:0,showNoRowsOverlay:0,hideOverlay:0}),...Y("RenderApi",{setGridAriaProperty:0,refreshCells:0,refreshHeader:0,isAnimationFrameQueueEmpty:0,flushAllAnimationFrames:0,getSizesForCurrentTheme:0,getCellRendererInstances:0}),...Y("HighlightChanges",{flashCells:0}),...Y("RowDrag",{addRowDropZone:0,removeRowDropZone:0,getRowDropZoneParams:0,getRowDropPositionIndicator:0,setRowDropPositionIndicator:0}),...Y("ColumnApi",{getColumnDefs:0,getColumnDef:0,getDisplayNameForColumn:0,getColumn:0,getColumns:0,applyColumnState:0,getColumnState:0,resetColumnState:0,isPinning:0,isPinningLeft:0,isPinningRight:0,getDisplayedColAfter:0,getDisplayedColBefore:0,setColumnsVisible:0,setColumnsPinned:0,getAllGridColumns:0,getDisplayedLeftColumns:0,getDisplayedCenterColumns:0,getDisplayedRightColumns:0,getAllDisplayedColumns:0,getAllDisplayedVirtualColumns:0}),...Y("ColumnAutoSize",{sizeColumnsToFit:0,autoSizeColumns:0,autoSizeAllColumns:0}),...Y("ColumnGroup",{setColumnGroupOpened:0,getColumnGroup:0,getProvidedColumnGroup:0,getDisplayNameForColumnGroup:0,getColumnGroupState:0,setColumnGroupState:0,resetColumnGroupState:0,getLeftDisplayedColumnGroups:0,getCenterDisplayedColumnGroups:0,getRightDisplayedColumnGroups:0,getAllDisplayedColumnGroups:0}),...Y("ColumnMove",{moveColumnByIndex:0,moveColumns:0}),...Y("ColumnResize",{setColumnWidths:0}),...Y("ColumnHover",{isColumnHovered:0}),...Y("EditCore",{getCellEditorInstances:0,getEditingCells:0,getEditRowValues:0,stopEditing:0,startEditingCell:0,isEditing:0,validateEdit:0}),...Y("BatchEdit",{startBatchEdit:0,cancelBatchEdit:0,commitBatchEdit:0,isBatchEditing:0}),...Y("UndoRedoEdit",{undoCellEditing:0,redoCellEditing:0,getCurrentUndoSize:0,getCurrentRedoSize:0}),...Y("FilterCore",{isAnyFilterPresent:0,onFilterChanged:0}),...Y("ColumnFilter",{isColumnFilterPresent:0,getColumnFilterInstance:0,destroyFilter:0,setFilterModel:0,getFilterModel:0,getColumnFilterModel:0,setColumnFilterModel:0,showColumnFilter:0,hideColumnFilter:0,getColumnFilterHandler:0,doFilterAction:0}),...Y("QuickFilter",{isQuickFilterPresent:0,getQuickFilter:0,resetQuickFilter:0}),...Y("Find",{findGetActiveMatch:0,findGetTotalMatches:0,findGoTo:0,findNext:0,findPrevious:0,findGetNumMatches:0,findGetParts:0,findClearActive:0,findRefresh:0}),...Y("Pagination",{paginationIsLastPageFound:0,paginationGetPageSize:0,paginationGetCurrentPage:0,paginationGetTotalPages:0,paginationGetRowCount:0,paginationGoToNextPage:0,paginationGoToPreviousPage:0,paginationGoToFirstPage:0,paginationGoToLastPage:0,paginationGoToPage:0}),...Y("CsrmSsrmSharedApi",{expandAll:0,collapseAll:0,resetRowGroupExpansion:0}),...Y("SsrmInfiniteSharedApi",{setRowCount:0,getCacheBlockState:0,isLastRowIndexKnown:0}),...Y("ClientSideRowModelApi",{onGroupExpandedOrCollapsed:0,refreshClientSideRowModel:0,isRowDataEmpty:0,forEachLeafNode:0,forEachNodeAfterFilter:0,forEachNodeAfterFilterAndSort:0,applyTransaction:0,applyTransactionAsync:0,flushAsyncTransactions:0,getBestCostNodeSelection:0,onRowHeightChanged:0,resetRowHeights:0}),...Y("CsvExport",{getDataAsCsv:0,exportDataAsCsv:0}),...Y("InfiniteRowModel",{refreshInfiniteCache:0,purgeInfiniteCache:0,getInfiniteRowCount:0}),...Y("AdvancedFilter",{getAdvancedFilterModel:0,setAdvancedFilterModel:0,showAdvancedFilterBuilder:0,hideAdvancedFilterBuilder:0}),...Y("IntegratedCharts",{getChartModels:0,getChartRef:0,getChartImageDataURL:0,downloadChart:0,openChartToolPanel:0,closeChartToolPanel:0,createRangeChart:0,createPivotChart:0,createCrossFilterChart:0,updateChart:0,restoreChart:0}),...Y("Clipboard",{copyToClipboard:0,cutToClipboard:0,copySelectedRowsToClipboard:0,copySelectedRangeToClipboard:0,copySelectedRangeDown:0,pasteFromClipboard:0}),...Y("ExcelExport",{getDataAsExcel:0,exportDataAsExcel:0,getSheetDataForExcel:0,getMultipleSheetsAsExcel:0,exportMultipleSheetsAsExcel:0}),...Y("SharedMasterDetail",{addDetailGridInfo:0,removeDetailGridInfo:0,getDetailGridInfo:0,forEachDetailGridInfo:0}),...Y("ContextMenu",{showContextMenu:0}),...Y("ColumnMenu",{showColumnChooser:0,hideColumnChooser:0}),...Y("CellSelection",{getCellRanges:0,addCellRange:0,clearRangeSelection:0,clearCellSelection:0}),...Y("SharedRowGrouping",{setRowGroupColumns:0,removeRowGroupColumns:0,addRowGroupColumns:0,getRowGroupColumns:0,moveRowGroupColumn:0}),...Y("SharedAggregation",{addAggFuncs:0,clearAggFuncs:0,setColumnAggFunc:0}),...Y("SharedPivot",{isPivotMode:0,getPivotResultColumn:0,setValueColumns:0,getValueColumns:0,removeValueColumns:0,addValueColumns:0,setPivotColumns:0,removePivotColumns:0,addPivotColumns:0,getPivotColumns:0,setPivotResultColumns:0,getPivotResultColumns:0}),...Y("ServerSideRowModelApi",{getServerSideSelectionState:0,setServerSideSelectionState:0,applyServerSideTransaction:0,applyServerSideTransactionAsync:0,applyServerSideRowData:0,retryServerSideLoads:0,flushServerSideAsyncTransactions:0,refreshServerSide:0,getServerSideGroupLevelState:0,onRowHeightChanged:0,resetRowHeights:0}),...Y("SideBar",{isSideBarVisible:0,setSideBarVisible:0,setSideBarPosition:0,openToolPanel:0,closeToolPanel:0,getOpenedToolPanel:0,refreshToolPanel:0,isToolPanelShowing:0,getToolPanelInstance:0,getSideBar:0}),...Y("StatusBar",{getStatusPanel:0}),...Y("AiToolkit",{getStructuredSchema:0})},tr={isDestroyed:()=>!0,destroy(){},preConstruct(){},postConstruct(){},preWireBeans(){},wireBeans(){}},Gv=(e,t)=>e.eventSvc.dispatchEvent(t),Yu=class{};Reflect.defineProperty(Yu,"name",{value:"GridApi"});var Hv=class extends x{constructor(){super(),this.beanName="apiFunctionSvc",this.api=new Yu,this.fns={...tr,dispatchEvent:Gv},this.preDestroyLink="";const{api:e}=this;for(const t of Object.keys(ic))e[t]=this.makeApi(t)[t]}postConstruct(){this.preDestroyLink=this.beans.frameworkOverrides.getDocLink("grid-lifecycle/#grid-pre-destroyed")}addFunction(e,t){const{fns:o,beans:s}=this;o!==tr&&(o[e]=s?.validation?.validateApiFunction(e,t)??t)}makeApi(e){return{[e]:(...t)=>{const{beans:o,fns:{[e]:s}}=this;return s?s(o,...t):this.apiNotFound(e)}}}apiNotFound(e){const{beans:t,gos:o,preDestroyLink:s}=this;if(!t)D(26,{fnName:e,preDestroyLink:s});else{const i=ic[e];o.assertModuleRegistered(i,`api.${e}`)&&D(27,{fnName:e,module:i})}}destroy(){super.destroy(),this.fns=tr,this.beans=null}};function Qu(e){return e.context.getId()}function Bv(e){e.gridDestroySvc.destroy()}function Vv(e){return e.gridDestroySvc.destroyCalled}function Nv(e,t){return e.gos.get(t)}function Wv(e,t,o){Zu(e,{[t]:o})}function Zu(e,t){e.gos.updateGridOptions({options:t})}function zv(e,t){const o=t.replace(/Module$/,"");return e.gos.isModuleRegistered(o)}function _v(e,t,o){const s=Je(e,t,o);if(s){const{className:n}=s;if(typeof n=="string"&&n.includes("ag-icon")||typeof n=="object"&&n["ag-icon"])return s}const i=it({tag:"span"});return i.appendChild(s),i}function Je(e,t,o){let s=null;e==="smallDown"?D(262):e==="smallLeft"?D(263):e==="smallRight"&&D(264);const i=o?.getColDef().icons;if(i&&(s=i[e]),t.gos&&!s){const n=t.gos.get("icons");n&&(s=n[e])}if(s){let n;if(typeof s=="function")n=s();else if(typeof s=="string")n=s;else{D(38,{iconName:e});return}if(typeof n=="string")return ba(n);if(ya(n))return n;D(133,{iconName:e});return}else{const n=t.registry.getIcon(e);return n||t.validation?.validateIcon(e),it({tag:"span",cls:`ag-icon ag-icon-${n??e}`,role:"presentation",attrs:{unselectable:"on"}})}}var Uv={tag:"div",cls:"ag-drag-handle ag-row-drag",attrs:{draggable:"true"}},$v=class extends ye{constructor(e,t,o){super(Uv),this.rowNode=e,this.column=t,this.eCell=o}postConstruct(){this.getGui().appendChild(Je("rowDrag",this.beans,null)),this.addGuiEventListener("mousedown",t=>{t.stopPropagation()}),this.addDragSource(),this.checkVisibility()}addDragSource(){this.addGuiEventListener("dragstart",this.onDragStart.bind(this))}onDragStart(e){const{rowNode:t,column:o,eCell:s,gos:i}=this,n=o.getColDef().dndSourceOnRowDrag,r=e.dataTransfer;if(r.setDragImage(s,0,0),n){const a=K(i,{rowNode:t,dragEvent:e});n(a)}else try{const a=JSON.stringify(t.data);r.setData("application/json",a),r.setData("text/plain",a)}catch{}}checkVisibility(){const e=this.column.isDndSource(this.rowNode);this.setDisplayed(e)}},Kv=".ag-dnd-ghost{align-items:center;background-color:var(--ag-drag-and-drop-image-background-color);border:var(--ag-drag-and-drop-image-border);border-radius:var(--ag-border-radius);box-shadow:var(--ag-drag-and-drop-image-shadow);color:var(--ag-text-color);cursor:move;display:flex;font-weight:500;gap:var(--ag-cell-widget-spacing);height:var(--ag-header-height);overflow:hidden;padding-left:var(--ag-cell-horizontal-padding);padding-right:var(--ag-cell-horizontal-padding);text-overflow:ellipsis;transform:translateY(calc(var(--ag-spacing)*2));white-space:nowrap}.ag-dnd-ghost-not-allowed{border:var(--ag-drag-and-drop-image-not-allowed-border)}",qv={tag:"div",children:[{tag:"div",ref:"eGhost",cls:"ag-dnd-ghost ag-unselectable",children:[{tag:"span",ref:"eIcon",cls:"ag-dnd-ghost-icon ag-shake-left-to-right"},{tag:"div",ref:"eLabel",cls:"ag-dnd-ghost-label"}]}]},jv=class extends ye{constructor(){super(),this.dragSource=null,this.eIcon=W,this.eLabel=W,this.eGhost=W,this.registerCSS(Kv)}postConstruct(){const e=t=>_v(t,this.beans,null);this.dropIconMap={pinned:e("columnMovePin"),hide:e("columnMoveHide"),move:e("columnMoveMove"),left:e("columnMoveLeft"),right:e("columnMoveRight"),group:e("columnMoveGroup"),aggregate:e("columnMoveValue"),pivot:e("columnMovePivot"),notAllowed:e("dropNotAllowed")}}init(e){this.dragSource=e.dragSource,this.setTemplate(qv),this.beans.environment.applyThemeClasses(this.eGhost)}destroy(){this.dragSource=null,super.destroy()}setIcon(e,t){const{eGhost:o,eIcon:s,dragSource:i,dropIconMap:n,gos:r}=this;Xe(s);let a=null;e||(e=i?.getDefaultIconName?i.getDefaultIconName():"notAllowed"),a=n[e],o.classList.toggle("ag-dnd-ghost-not-allowed",e==="notAllowed"),s.classList.toggle("ag-shake-left-to-right",t),!(a===n.hide&&r.get("suppressDragLeaveHidesColumns"))&&a&&s.appendChild(a)}setLabel(e){this.eLabel.textContent=e}};function Yv(e,t){e.rowDragSvc?.rowDragFeature?.addRowDropZone(t)}function Qv(e,t){const o=e.dragAndDrop?.findExternalZone(t.getContainer());o&&e.dragAndDrop?.removeDropTarget(o)}function Zv(e,t){return e.rowDragSvc?.rowDragFeature?.getRowDropZone(t)}function Jv(e){const t=e.rowDropHighlightSvc;return t?{row:t.row,dropIndicatorPosition:t.position}:{row:null,dropIndicatorPosition:"none"}}function Xv(e,t){const o=e.rowDropHighlightSvc;if(!o)return;const s=t?.row;let i=t?.dropIndicatorPosition;i!=="above"&&i!=="below"&&i!=="inside"&&(i="none");const n=s?.rowIndex;n==null||i==="none"?o.clear():o.set(s,i)}var Ju=(e,t)=>{if(t!=null&&e?.setPointerCapture)try{return e.setPointerCapture(t),e.hasPointerCapture(t)}catch{}return!1},ew=(e,t)=>{if(typeof PointerEvent>"u"||!(t instanceof PointerEvent))return null;const o=t.pointerId;if(!Ju(e,o))return null;const s={eElement:e,pointerId:o,onLost(i){ow(s,i)}};return e.addEventListener("lostpointercapture",s.onLost),s},tw=e=>{if(!e)return;Xu(e);const{eElement:t,pointerId:o}=e;if(t){try{t.releasePointerCapture(o)}catch{}e.eElement=null}},Xu=e=>{const{eElement:t,onLost:o}=e;t&&o&&(t.removeEventListener("lostpointercapture",o),e.onLost=null)},ow=(e,t)=>{Xu(e);const{eElement:o,pointerId:s}=e;o&&t.pointerId===s&&Ju(o,s)},qo,ts,or={passive:!0},Qt={passive:!1},Rt=e=>{if(!ts)ts=new WeakSet;else if(ts.has(e))return!1;return ts.add(e),!0},sw=class extends qe{constructor(){super(...arguments),this.beanName="dragSvc",this.dragging=!1,this.drag=null,this.dragSources=[]}get startTarget(){return this.drag?.start.target??null}isPointer(){return!!qo?.has(gt(this.beans))}hasPointerCapture(){const e=this.drag?.pointerCapture;return!!(e&&this.beans.eRootDiv.hasPointerCapture?.(e.pointerId))}destroy(){this.drag&&this.cancelDrag();const e=this.dragSources;for(const t of e)nc(t);e.length=0,super.destroy()}removeDragSource(e){const t=this.dragSources;for(let o=0,s=t.length;o<s;++o){const i=t[o];if(i.params===e){t.splice(o,1),nc(i);break}}}addDragSource(e){if(!this.isAlive())return;const{eElement:t,includeTouch:o}=e,s=[];let i;if(o){const c=t.style;c&&(i=c.touchAction,c.touchAction="none")}const n={handlers:s,params:e,oldTouchAction:i};this.dragSources.push(n),Di(s,[t,"pointerdown",c=>this.onPointerDown(e,c),Qt],[t,"mousedown",c=>this.onMouseDown(e,c)]);const l=this.gos.get("suppressTouch");o&&!l&&Di(s,[t,"touchstart",d=>this.onTouchStart(e,d),Qt])}cancelDrag(e){const t=this.drag;e??(e=t?.eElement),e&&this.eventSvc.dispatchEvent({type:"dragCancelled",target:e}),t?.params.onDragCancel?.(),this.destroyDrag()}shouldPreventMouseEvent(e){const t=e.type;return(t==="mousemove"||t==="pointermove")&&e.cancelable&&Xs(this.beans,e)&&!Bs(ir(e))}initDrag(e,...t){this.drag=e;const o=this.beans,s=a=>this.onScroll(a),i=a=>this.onKeyDown(a),n=gt(o),r=Pe(o);Di(e.handlers,[n,"contextmenu",to],[n,"keydown",i],[r,"scroll",s,{capture:!0}],[r.defaultView||window,"scroll",s],...t)}destroyDrag(){this.dragging=!1;const e=this.drag;if(e){const t=e.rootEl;qo?.get(t)===e&&qo.delete(t),this.drag=null,tw(e.pointerCapture),Ra(e.handlers)}}onPointerDown(e,t){if(this.isPointer())return;const o=this.beans;if(ts?.has(t))return;const s=t.pointerType;if(s==="touch"&&(o.gos.get("suppressTouch")||!e.includeTouch||(e.stopPropagationForTouch&&t.stopPropagation(),Bs(ir(t))))||!t.isPrimary||s==="mouse"&&t.button!==0)return;this.destroyDrag();const i=gt(o),n=e.eElement,r=t.pointerId,a=new sr(i,e,t,r);qo??(qo=new WeakMap),qo.set(i,a);const l=h=>{h.pointerId===r&&this.onMouseOrPointerMove(h)},c=h=>{h.pointerId===r&&this.onMouseOrPointerUp(h)},d=h=>{h.pointerId===r&&Rt(h)&&this.cancelDrag()},u=h=>this.draggingPreventDefault(h);this.initDrag(a,[i,"pointerup",c],[i,"pointercancel",d],[i,"pointermove",l,Qt],[i,"touchmove",u,Qt],[n,"mousemove",u,Qt]),e.dragStartPixels===0?this.onMouseOrPointerMove(t):Rt(t)}onTouchStart(e,t){if(this.gos.get("suppressTouch")||!e.includeTouch||!Rt(t)||Bs(ir(t)))return;if(e.stopPropagationForTouch&&t.stopPropagation(),this.isPointer()){this.dragging&&to(t);return}this.destroyDrag();const s=this.beans,i=gt(s),n=new sr(i,e,t.touches[0]),r=h=>this.onTouchMove(h),a=h=>this.onTouchUp(h),l=h=>this.onTouchCancel(h),c=h=>this.draggingPreventDefault(h),d=gt(s),u=t.target??e.eElement;this.initDrag(n,[u,"touchmove",r,or],[u,"touchend",a,or],[u,"touchcancel",l,or],[d,"touchmove",c,Qt],[d,"touchend",a,Qt],[d,"touchcancel",l,Qt]),e.dragStartPixels===0&&this.onMove(n.start)}draggingPreventDefault(e){this.dragging&&to(e)}onMouseDown(e,t){if(t.button!==0||ts?.has(t)||this.isPointer())return;const o=this.beans;this.destroyDrag();const s=new sr(gt(o),e,t),i=a=>this.onMouseOrPointerMove(a),n=a=>this.onMouseOrPointerUp(a),r=gt(o);this.initDrag(s,[r,"mousemove",i],[r,"mouseup",n]),e.dragStartPixels===0?this.onMouseOrPointerMove(t):Rt(t)}onScroll(e){if(!Rt(e))return;const t=this.drag,o=t?.lastDrag;o&&this.dragging&&t.params?.onDragging?.(o)}onMouseOrPointerMove(e){Rt(e)&&(po()&&Pe(this.beans).getSelection()?.removeAllRanges(),this.shouldPreventMouseEvent(e)&&to(e),this.onMove(e))}onTouchCancel(e){const t=this.drag;!t||!Rt(e)||rs(t.start,e.changedTouches)&&this.cancelDrag()}onTouchMove(e){const t=this.drag;if(!t||!Rt(e))return;const o=rs(t.start,e.touches);o&&(this.onMove(o),this.draggingPreventDefault(e))}onMove(e){const t=this.drag;if(!t)return;t.lastDrag=e;const o=t.params;if(!this.dragging){const s=t.start,n=o.dragStartPixels??4;if(Hd(e,s,n)||(this.dragging=!0,o.capturePointer&&(t.pointerCapture=ew(this.beans.eRootDiv,e)),this.eventSvc.dispatchEvent({type:"dragStarted",target:o.eElement}),o.onDragStart?.(s),this.drag!==t)||(o.onDragging?.(s),this.drag!==t))return}o.onDragging?.(e)}onTouchUp(e){const t=this.drag;t&&Rt(e)&&this.onUp(rs(t.start,e.changedTouches))}onMouseOrPointerUp(e){Rt(e)&&this.onUp(e)}onUp(e){const t=this.drag;t&&(e||(e=t.lastDrag),e&&this.dragging&&(this.dragging=!1,t.params.onDragStop?.(e),this.eventSvc.dispatchEvent({type:"dragStopped",target:t.params.eElement})),this.destroyDrag())}onKeyDown(e){e.key===R.ESCAPE&&this.cancelDrag()}},nc=e=>{Ra(e.handlers);const t=e.oldTouchAction;if(t!=null){const o=e.params.eElement.style;o&&(o.touchAction=t)}},sr=class{constructor(e,t,o,s=null){this.rootEl=e,this.params=t,this.start=o,this.pointerId=s,this.handlers=[],this.lastDrag=null,this.pointerCapture=null,this.eElement=t.eElement}},ir=e=>{const t=e.target;return t instanceof Element?t:null},iw=class extends sw{shouldPreventMouseEvent(e){return this.gos.get("enableCellTextSelection")&&super.shouldPreventMouseEvent(e)}},nw=class extends x{constructor(){super(...arguments),this.beanName="horizontalResizeSvc"}addResizeBar(e){const t={dragStartPixels:e.dragStartPixels||0,eElement:e.eResizeBar,onDragStart:this.onDragStart.bind(this,e),onDragStop:this.onDragStop.bind(this,e),onDragging:this.onDragging.bind(this,e),onDragCancel:this.onDragStop.bind(this,e),includeTouch:!0,stopPropagationForTouch:!0},{dragSvc:o}=this.beans;return o.addDragSource(t),()=>o.removeDragSource(t)}onDragStart(e,t){this.dragStartX=t.clientX,this.setResizeIcons();const o=t instanceof MouseEvent&&t.shiftKey===!0;e.onResizeStart(o)}setResizeIcons(){const e=this.beans.ctrlsSvc.get("gridCtrl");e.setResizeCursor(1),e.disableUserSelect(!0)}onDragStop(e){e.onResizeEnd(this.resizeAmount),this.resetIcons()}resetIcons(){const e=this.beans.ctrlsSvc.get("gridCtrl");e.setResizeCursor(!1),e.disableUserSelect(!1)}onDragging(e,t){this.resizeAmount=t.clientX-this.dragStartX,e.onResizing(this.resizeAmount)}},rw={tag:"div",cls:"ag-drag-handle ag-row-drag",attrs:{"aria-hidden":"true"}},Si={skipAriaHidden:!0},aw=class extends ye{constructor(e,t,o,s,i,n=!1){super(),this.cellValueFn=e,this.rowNode=t,this.column=o,this.customGui=s,this.dragStartPixels=i,this.alwaysVisible=n,this.dragSource=null,this.disabled=!1}isCustomGui(){return this.customGui!=null}postConstruct(){const{beans:e,customGui:t}=this;t?this.setDragElement(t,this.dragStartPixels):(this.setTemplate(rw),this.getGui().appendChild(Je("rowDrag",e,null)),this.addDragSource()),this.alwaysVisible||this.initCellDrag()}initCellDrag(){const{beans:e,rowNode:t}=this,o=this.refreshVisibility.bind(this);this.addManagedListeners(e.eventSvc,{rowDragVisibilityChanged:o}),this.addManagedListeners(t,{dataChanged:o,cellChanged:o}),this.refreshVisibility()}setDragElement(e,t){this.setTemplateFromElement(e,void 0,void 0,!0),this.addDragSource(t)}refreshVisibility(){if(this.alwaysVisible)return;const{beans:e,column:t,rowNode:o}=this,{gos:s,dragAndDrop:i,rowDragSvc:n}=e,r=n?.visibility;let l=!(r==="suppress"||r==="hidden"&&!i?.hasExternalDropZones()),c=l;if(l&&!this.isCustomGui()&&t){const d=t.getColDef().rowDrag;if(d===!1)l=!1;else{const u=typeof d=="function";c=t.isRowDrag(o),l=u||c}}l&&c&&o.footer&&s.get("rowDragManaged")&&(c=!1,l=!0),c&&(c=l),l||this.setDisplayed(l,Si),c||this.setVisible(c,Si),this.setDisabled(!c||r==="disabled"&&!i?.hasExternalDropZones()),l&&this.setDisplayed(l,Si),c&&this.setVisible(c,Si)}setDisabled(e){e!==this.disabled&&(this.disabled=e,this.getGui()?.classList?.toggle("ag-drag-handle-disabled",e))}getSelectedNodes(){const e=this.rowNode;if(!this.gos.get("rowDragMultiRow"))return[e];const o=this.beans.selectionSvc?.getSelectedNodes()??[];return o.indexOf(e)!==-1?o:[e]}getDragItem(){const{column:e,rowNode:t}=this;return{rowNode:t,rowNodes:this.getSelectedNodes(),columns:e?[e]:void 0,defaultTextValue:this.cellValueFn()}}addDragSource(e=4){if(this.dragSource&&this.removeDragSource(),this.gos.get("rowDragManaged")&&this.rowNode.footer)return;const t=this.getGui();if(this.gos.get("enableCellTextSelection")){this.removeMouseDownListener();const s=qi("pointerdown")?{pointerdown:to}:{mousedown:to};this.mouseDownListener=this.addManagedElementListeners(t,s)[0]}const o=this.getLocaleTextFunc();this.dragSource={type:2,eElement:t,dragItemName:s=>this.getDragItemName(s,o),getDragItem:()=>this.getDragItem(),dragStartPixels:e,dragSourceDomDataKey:this.gos.getDomDataKey()},this.beans.dragAndDrop.addDragSource(this.dragSource,!0)}getDragItemName(e,t){const o=e?.dragItem||this.getDragItem(),s=(e?.dropTarget?.rows.length??o.rowNodes?.length)||1,i=this.column?.getColDef()?.rowDragText??this.gos.get("rowDragText");if(i)return i(o,s);if(s!==1)return`${s} ${t("rowDragRows","rows")}`;const n=this.cellValueFn();return n||`1 ${t("rowDragRow","rows")}`}destroy(){this.removeDragSource(),this.removeMouseDownListener(),super.destroy()}removeDragSource(){this.dragSource&&(this.beans.dragAndDrop.removeDragSource(this.dragSource),this.dragSource=null)}removeMouseDownListener(){this.mouseDownListener&&(this.mouseDownListener(),this.mouseDownListener=void 0)}},lw=class{constructor(e){this.tickingInterval=null,this.onScrollCallback=null,this.scrollContainer=e.scrollContainer,this.scrollHorizontally=e.scrollAxis.includes("x"),this.scrollVertically=e.scrollAxis.includes("y"),this.scrollByTick=e.scrollByTick??20,e.onScrollCallback&&(this.onScrollCallback=e.onScrollCallback),this.scrollVertically&&(this.getVerticalPosition=e.getVerticalPosition,this.setVerticalPosition=e.setVerticalPosition),this.scrollHorizontally&&(this.getHorizontalPosition=e.getHorizontalPosition,this.setHorizontalPosition=e.setHorizontalPosition),this.shouldSkipVerticalScroll=e.shouldSkipVerticalScroll||(()=>!1),this.shouldSkipHorizontalScroll=e.shouldSkipHorizontalScroll||(()=>!1)}get scrolling(){return this.tickingInterval!==null}check(e,t=!1){const o=!this.scrollVertically||t||this.shouldSkipVerticalScroll(),s=!this.scrollHorizontally||this.shouldSkipHorizontalScroll();if(o&&s)return;const i=this.scrollContainer.getBoundingClientRect(),n=this.scrollByTick;this.tickLeft=!s&&e.clientX<i.left+n,this.tickRight=!s&&e.clientX>i.right-n,this.tickUp=!o&&e.clientY<i.top+n,this.tickDown=!o&&e.clientY>i.bottom-n,this.tickLeft||this.tickRight||this.tickUp||this.tickDown?this.ensureTickingStarted():this.ensureCleared()}ensureTickingStarted(){this.tickingInterval===null&&(this.tickingInterval=window.setInterval(this.doTick.bind(this),100),this.tickCount=0)}doTick(){this.tickCount++;const e=this.tickCount>20?200:this.tickCount>10?80:40;if(this.scrollVertically){const t=this.getVerticalPosition();this.tickUp&&this.setVerticalPosition(t-e),this.tickDown&&this.setVerticalPosition(t+e)}if(this.scrollHorizontally){const t=this.getHorizontalPosition();this.tickLeft&&this.setHorizontalPosition(t-e),this.tickRight&&this.setHorizontalPosition(t+e)}this.onScrollCallback&&this.onScrollCallback()}ensureCleared(){this.tickingInterval&&(window.clearInterval(this.tickingInterval),this.tickingInterval=null)}},Hi=class{constructor(){this.reordered=!1,this.removals=[],this.updates=new Set,this.adds=new Set}},ln=e=>{let t=e.childrenAfterGroup;for(;t?.length;){const o=t[0];if(o.sourceRowIndex>=0)return o;t=o.childrenAfterGroup}},cw=(e,t,o,s)=>{if(!t.size||!e)return!1;let i=!1;const n=e.length??0;let r=-1;o&&(r=o.sourceRowIndex,o=r<0?ln(o):null,o&&(r=o.sourceRowIndex)),r<0||r>=n?r=n:s||++r;let a=r,l=Math.min(r,n-1);for(const u of t){const h=u.sourceRowIndex;h<a&&(a=h),h>l&&(l=h)}let c=a;for(let u=a;u<r;++u){const h=e[u];t.has(h)||(h.sourceRowIndex!==c&&(h.sourceRowIndex=c,e[c]=h,i=!0),++c)}let d=l;for(let u=l;u>=r;--u){const h=e[u];t.has(h)||(h.sourceRowIndex!==d&&(h.sourceRowIndex=d,e[d]=h,i=!0),--d)}for(const u of t)u.sourceRowIndex!==c&&(u.sourceRowIndex=c,e[c]=u,i=!0),++c;return i};function dw(e,t){return Ka(e,t.target)?.getFocusedCellPosition()??null}function rc(e,t){const o=Le(e.gos,"normal"),s=t;let i,n;s.clientX!=null||s.clientY!=null?(i=s.clientX,n=s.clientY):(i=s.x,n=s.y);const{pageFirstPixel:r}=e.pageBounds.getCurrentPagePixelRange();if(n+=r,o){const a=e.ctrlsSvc.getScrollFeature(),l=a.getVScrollPosition(),c=a.getHScrollPosition();i+=c.left,n+=l.top}return{x:i,y:n}}var uw=.25,hw=class extends x{constructor(e){super(),this.eContainer=e,this.lastDraggingEvent=null,this.autoScroll=null,this.autoScrollChanged=!1,this.autoScrollChanging=!1,this.autoScrollOldV=null}postConstruct(){const e=this.beans;e.ctrlsSvc.whenReady(this,t=>{const o=()=>t.gridBodyCtrl.scrollFeature.getVScrollPosition().top,s=new lw({scrollContainer:t.gridBodyCtrl.eBodyViewport,scrollAxis:"y",getVerticalPosition:o,setVerticalPosition:i=>t.gridBodyCtrl.scrollFeature.setVerticalScrollPosition(i),onScrollCallback:()=>{const i=o();if(this.autoScrollOldV!==i){this.autoScrollOldV=i,this.autoScrollChanging=!0;return}const n=this.autoScrollChanging;this.autoScrollChanged=n,this.autoScrollChanging=!1,n&&(e.dragAndDrop?.nudge(),this.autoScrollChanged=!1)}});this.autoScroll=s,this.clearAutoScroll()})}destroy(){super.destroy(),this.clearAutoScroll(),this.autoScroll=null,this.lastDraggingEvent=null,this.eContainer=null}getContainer(){return this.eContainer}isInterestedIn(e){return e===2}getIconName(e){return e?.dropTarget?.allowed===!1||this.beans.rowDragSvc.visibility!=="visible"?"notAllowed":"move"}getRowNodes(e){if(!this.isFromThisGrid(e))return e.dragItem.rowNodes||[];const t=e.dragItem.rowNode;if(this.gos.get("rowDragMultiRow")){const o=this.beans.selectionSvc?.getSelectedNodes();if(o&&o.indexOf(t)>=0)return o.slice().sort(gw)}return[t]}onDragEnter(e){this.dragging(e,!0)}onDragging(e){this.dragging(e,!1)}dragging(e,t){const{lastDraggingEvent:o,beans:s}=this;if(t){const a=this.getRowNodes(e);e.dragItem.rowNodes=a,lc(a,!0)}this.lastDraggingEvent=e;const i=e.fromNudge,n=this.makeRowsDrop(o,e,i,!1);s.rowDropHighlightSvc?.fromDrag(e),t&&this.dispatchGridEvent("rowDragEnter",e),this.dispatchGridEvent("rowDragMove",e);const r=this.autoScroll;n?.rowDragManaged&&n.moved&&n.allowed&&n.sameGrid&&!n.suppressMoveWhenRowDragging&&(!i&&!r?.scrolling||this.autoScrollChanged)&&this.dropRows(n),r?.check(e.event)}isFromThisGrid(e){return e.dragSource.dragSourceDomDataKey===this.gos.getDomDataKey()}makeRowsDrop(e,t,o,s){const{beans:i,gos:n}=this,r=this.newRowsDrop(t,s),a=i.rowModel;if(t.dropTarget=r,t.changed=!1,!r)return null;let{sameGrid:l,rootNode:c,source:d,target:u}=r;u??(u=a.getRow(a.getRowCount()-1)??null);const h=this.beans.groupEditSvc,g=!!h?.canSetParent(r);let f=null;if(u?.footer){const C=Gr(a,-1,u)??Gr(a,1,u);g&&(f=u.sibling??c),u=C??null}u?.detail&&(u=u.parent),r.moved&&(r.moved=d!==u);let m=.5;if(u&&(l&&r.moved&&(f||!g)?m=d.rowIndex>u.rowIndex?-.5:.5:m=(r.y-u.rowTop-u.rowHeight/2)/u.rowHeight||0),!g&&l&&u&&r.moved&&Se(n)){const C=pw(a,r);C&&(m=d.rowIndex>C.rowIndex?-.5:.5,u=C,r.moved&&(r.moved=d!==u))}return r.target=u,r.newParent=f,r.pointerPos=fw(u,r.y),r.yDelta=m,h?.fixRowsDrop(r,g,o,m),this.validateRowsDrop(r,g,s),t.changed||(t.changed=ac(e?.dropTarget,r)),r}newRowsDrop(e,t){const{beans:o,gos:s}=this,i=o.rowModel.rootNode,n=Se(s)?s.get("rowDragManaged"):!1,r=s.get("suppressMoveWhenRowDragging"),a=this.isFromThisGrid(e);let{rowNode:l,rowNodes:c}=e.dragItem;if(c||(c=l?[l]:[]),l||(l=c[0]),!l||!i)return null;const d=this.beans.dragAndDrop.isDropZoneWithinThisGrid(e);let u=!0;n&&(!c.length||o.rowDragSvc.visibility!=="visible"||(r||!a)&&!d)&&(u=!1);const h=rc(o,e).y,g=this.getOverNode(h);return{api:o.gridApi,context:o.gridOptions.context,draggingEvent:e,rowDragManaged:n,suppressMoveWhenRowDragging:r,sameGrid:a,withinGrid:d,treeData:!1,rootNode:i,moved:l!==g,y:h,overNode:g,overIndex:g?.rowIndex??-1,pointerPos:"none",position:"none",source:l,target:g??null,newParent:null,rows:c,allowed:u,highlight:!t&&n&&r&&(d||!a),yDelta:0,inside:!1,droppedManaged:!1}}validateRowsDrop(e,t,o){const{source:s,target:i,yDelta:n,inside:r,moved:a,rowDragManaged:l,suppressMoveWhenRowDragging:c}=e;e.moved&&(e.moved=s!==i);const{position:d,fallbackPosition:u}=this.computeDropPosition(a,r,n);e.position=d,t||(e.newParent=null),this.enforceSuppressMoveWhenRowDragging(e,c,"initial");const h=(!l||e.allowed)&&this.gos.get("isRowValidDropPosition");h&&this.applyDropValidator(e,t,o,l,h),l&&(e.rows=this.filterRows(e)),this.beans.groupEditSvc?.clearNewSameParent(e,t),this.enforceSuppressMoveWhenRowDragging(e,c,"final"),e.position==="inside"&&(!e.allowed||!e.newParent)&&(e.position=u)}computeDropPosition(e,t,o){const s=o<0?"above":"below";return e?{position:t?"inside":s,fallbackPosition:s}:{position:"none",fallbackPosition:s}}enforceSuppressMoveWhenRowDragging(e,t,o){if(t){if(o==="initial"){e.moved||(e.allowed=!1);return}(!e.rows.length||e.position==="none")&&(e.allowed=!1)}}applyDropValidator(e,t,o,s,i){this.beans.groupEditSvc?.clearNewSameParent(e,t);const n=i(e);if(!n){e.allowed=!1;return}if(typeof n!="object")return;n.rows!==void 0&&(e.rows=n.rows??[]),t&&n.newParent!==void 0&&(e.newParent=n.newParent),n.target!==void 0&&(e.target=n.target),n.position&&(e.position=n.position),n.allowed!==void 0?e.allowed=n.allowed:s||(e.allowed=!0);const r=e.draggingEvent;n.changed&&r&&(r.changed=!0),!o&&n.highlight!==void 0&&(e.highlight=n.highlight)}addRowDropZone(e){if(!e.getContainer()){D(55);return}const t=this.beans.dragAndDrop;if(t.findExternalZone(e.getContainer())){D(56);return}const o=e.fromGrid?e:{getContainer:e.getContainer,onDragEnter:e.onDragEnter&&(i=>e.onDragEnter(this.rowDragEvent("rowDragEnter",i))),onDragLeave:e.onDragLeave&&(i=>e.onDragLeave(this.rowDragEvent("rowDragLeave",i))),onDragging:e.onDragging&&(i=>e.onDragging(this.rowDragEvent("rowDragMove",i))),onDragStop:e.onDragStop&&(i=>e.onDragStop(this.rowDragEvent("rowDragEnd",i))),onDragCancel:e.onDragCancel&&(i=>e.onDragCancel(this.rowDragEvent("rowDragCancel",i)))},s={isInterestedIn:i=>i===2,getIconName:()=>"move",external:!0,...o};t.addDropTarget(s),this.addDestroyFunc(()=>t.removeDropTarget(s))}getRowDropZone(e){return{getContainer:this.getContainer.bind(this),onDragEnter:o=>{this.onDragEnter(o),e?.onDragEnter?.(this.rowDragEvent("rowDragEnter",o))},onDragLeave:o=>{this.onDragLeave(o),e?.onDragLeave?.(this.rowDragEvent("rowDragLeave",o))},onDragging:o=>{this.onDragging(o),e?.onDragging?.(this.rowDragEvent("rowDragMove",o))},onDragStop:o=>{this.onDragStop(o),e?.onDragStop?.(this.rowDragEvent("rowDragEnd",o))},onDragCancel:o=>{this.onDragCancel(o),e?.onDragCancel?.(this.rowDragEvent("rowDragCancel",o))},fromGrid:!0}}getOverNode(e){const{pageBounds:t,rowModel:o}=this.beans,i=e>t.getCurrentPagePixelRange().pageLastPixel?-1:o.getRowIndexAtPixel(e);return i>=0?o.getRow(i):void 0}rowDragEvent(e,t){const o=this.beans,{dragItem:s,dropTarget:i,event:n,vDirection:r}=t,a=i?.rootNode===o.rowModel.rootNode,l=a?i.y:rc(o,t).y,c=a?i.overNode:this.getOverNode(l),d=a?i.overIndex:c?.rowIndex??-1;return{api:o.gridApi,context:o.gridOptions.context,type:e,event:n,node:s.rowNode,nodes:s.rowNodes,overIndex:d,overNode:c,y:l,vDirection:r,rowsDrop:i}}dispatchGridEvent(e,t){const o=this.rowDragEvent(e,t);this.eventSvc.dispatchEvent(o)}onDragLeave(e){this.dispatchGridEvent("rowDragLeave",e),this.stopDragging(e,!1)}onDragStop(e){const t=this.lastDraggingEvent?.dropTarget??null,o=this.makeRowsDrop(this.lastDraggingEvent,e,!1,!0);this.dispatchGridEvent("rowDragEnd",e),o?.allowed&&o.rowDragManaged&&(!t?.droppedManaged||ac(t,o))&&this.dropRows(o),this.stopDragging(e,!0)}onDragCancel(e){this.dispatchGridEvent("rowDragCancel",e),this.stopDragging(e,!0)}stopDragging(e,t){this.clearAutoScroll(),this.beans.groupEditSvc?.stopDragging(t),this.beans.rowDropHighlightSvc?.fromDrag(null),lc(e.dragItem.rowNodes,!1),this.lastDraggingEvent=null}clearAutoScroll(){this.autoScroll?.ensureCleared(),this.autoScrollChanged=!1,this.autoScrollChanging=!1,this.autoScrollOldV=null}dropRows(e){return e.droppedManaged=!0,e.sameGrid?this.csrmMoveRows(e):this.csrmAddRows(e)}csrmAddRows({position:e,target:t,rows:o}){const s=vs(this.gos),i=this.beans.rowModel,n=o.filter(({data:a,rowPinned:l})=>!i.getRowNode(s?.({data:a,level:0,rowPinned:l})??a.id)).map(({data:a})=>a);if(n.length===0)return!1;let r;if(t){const a=t.sourceRowIndex>=0?t:ln(t);a&&(r=a.sourceRowIndex+(e==="above"?0:1))}return i.updateRowData({add:n,addIndex:r}),!0}filterRows(e){const{groupEditSvc:t}=this.beans,{rows:o,sameGrid:s}=e;let i;for(let n=0,r=o.length;n<r;++n){let a=!0;const l=o[n];(!l||l.footer||s&&l.destroyed&&!l.group||!this.csrmGetLeaf(l))&&(a=!1),a&&t&&!t.canDropRow(l,e)&&(a=!1),a?i?.push(l):i??(i=o.slice(0,n))}return i??o}csrmMoveRows(e){const t=this.beans.groupEditSvc;return t?.isGroupingDrop(e)?t.dropGroupEdit(e):this.csrmMoveRowsReorder(e)}csrmMoveRowsReorder({position:e,target:t,rows:o,newParent:s,rootNode:i}){let n=!1;const r=new Set;for(const h of o){s&&h.parent!==s&&(h.treeParent=s,n=!0);const g=this.csrmGetLeaf(h);g&&r.add(g)}if(!n&&r.size===0)return!1;const a=this.beans.focusSvc,l=a.getFocusedCell(),c=l&&es(this.beans,l);if(r.size&&cw(i._leafs,r,t,e==="above")&&(n=!0),!n)return!1;const d=this.beans.rowModel,u=new Hi;return u.reordered=!0,d.refreshModel({step:"group",keepRenderedRows:!0,animate:!this.gos.get("suppressAnimationFrame"),changedRowNodes:u}),c?c.focusCell():a.clearFocusedCell(),!0}csrmGetLeaf(e){if(e.sourceRowIndex>=0)return e.destroyed?void 0:e;const t=this.beans.groupEditSvc;return t?t.csrmFirstLeaf(e):ln(e)}},ac=(e,t)=>e!==t&&(!e||e.sameGrid!==t.sameGrid||e.allowed!==t.allowed||e.position!==t.position||e.target!==t.target||e.source!==t.source||e.newParent!==t.newParent||!ho(e.rows,t.rows)),gw=({rowIndex:e},{rowIndex:t})=>e!==null&&t!==null?e-t:0,lc=(e,t)=>{for(let o=0,s=e?.length||0;o<s;++o){const i=e[o];i.dragging!==t&&(i.dragging=t,i.dispatchRowEvent("draggingChanged"))}},pw=(e,t)=>{let o=null,s=t.target;if(s&&t.rows.indexOf(s)<0)return null;const i=t.source;if(!s||!i)return null;let n=s.rowIndex-i.rowIndex;const r=n<0?-1:1;n=t.suppressMoveWhenRowDragging?Math.abs(n):1;const a=new Set(t.rows);do{const l=Gr(e,r,s);if(!l)break;a.has(l)||(o=l,--n),s=l}while(n>0);return o},fw=(e,t)=>{const o=e?.rowTop,s=e?.rowHeight??0;if(o==null||!s||s<=0)return"none";const i=t-o,n=s*uw;return i<=n?"above":i>=s-n?"below":"inside"},mw=class extends x{constructor(){super(...arguments),this.beanName="rowDragSvc",this.rowDragFeature=null,this.visibility="suppress"}setupRowDrag(e,t){const o=t.createManagedBean(new hw(e)),s=this.beans.dragAndDrop;s.addDropTarget(o),t.addDestroyFunc(()=>s.removeDropTarget(o)),this.rowDragFeature=o;const i=()=>this.refreshVisibility();this.addManagedPropertyListeners(["rowDragManaged","suppressRowDrag","refreshAfterGroupEdit"],i),this.addManagedEventListeners({newColumnsLoaded:i,columnRowGroupChanged:i,columnPivotModeChanged:i,sortChanged:i,filterChanged:i}),this.visibility=this.computeVisibility()}createRowDragComp(e,t,o,s,i,n){return new aw(e,t,o,s,i,n)}createRowDragCompForRow(e,t){if(ao(this.gos))return;const o=this.getLocaleTextFunc();return this.createRowDragComp(()=>`1 ${o("rowDragRow","row")}`,e,void 0,t,void 0,!0)}createRowDragCompForCell(e,t,o,s,i,n){const r=this.gos;return r.get("rowDragManaged")&&(!Se(r)||r.get("pagination"))?void 0:this.createRowDragComp(o,e,t,s,i,n)}cancelRowDrag(){this.rowDragFeature?.lastDraggingEvent&&this.beans.dragSvc?.cancelDrag()}computeVisibility(){const e=this.beans,t=e.gos;if(t.get("suppressRowDrag"))return"suppress";if(!t.get("rowDragManaged"))return"visible";const s=e.colModel.isPivotMode();return(s||e.rowGroupColsSvc?.columns?.length)&&!t.get("refreshAfterGroupEdit")?"hidden":s||e.filterManager?.isAnyFilterPresent()||e.sortSvc?.isSortActive()?"disabled":"visible"}refreshVisibility(){const e=this.visibility,t=this.computeVisibility();e!==t&&(this.visibility=t,this.eventSvc?.dispatchEvent({type:"rowDragVisibilityChanged"}))}},Cw=class extends x{constructor(){super(...arguments),this.beanName="rowDropHighlightSvc",this.uiLevel=0,this.dragging=!1,this.row=null,this.position="none"}postConstruct(){this.addManagedEventListeners({modelUpdated:this.onModelUpdated.bind(this)})}onModelUpdated(){const e=this.row,t=this.dragging;!e||e?.rowIndex===null||this.position==="none"?this.clear():this.set(e,this.position),this.dragging=t}destroy(){this.clear(),super.destroy()}clear(){const e=this.row;this.dragging=!1,e&&(this.uiLevel=0,this.position="none",this.row=null,e.dispatchRowEvent("rowHighlightChanged"))}set(e,t){const o=e!==this.row,s=e.uiLevel,i=t!==this.position,n=s!==this.uiLevel;this.dragging=!1,(o||i||n)&&(o&&this.clear(),this.uiLevel=s,this.position=t,this.row=e,e.dispatchRowEvent("rowHighlightChanged"))}fromDrag(e){const t=e?.dropTarget;if(t){const{highlight:o,target:s,position:i}=t;if(o&&s&&i!=="none"){this.set(s,i),this.dragging=!0;return}}this.dragging&&this.clear()}},eh={moduleName:"Drag",version:I,beans:[iw]},vw={moduleName:"DragAndDrop",version:I,dynamicBeans:{dndSourceComp:$v},icons:{rowDrag:"grip"}},th={moduleName:"SharedDragAndDrop",version:I,beans:[Jm],dependsOn:[eh],userComponents:{agDragAndDropImage:jv},icons:{columnMovePin:"pin",columnMoveHide:"eye-slash",columnMoveMove:"arrows",columnMoveLeft:"left",columnMoveRight:"right",columnMoveGroup:"group",columnMoveValue:"aggregation",columnMovePivot:"pivot",dropNotAllowed:"not-allowed",rowDrag:"grip"}},ww={moduleName:"RowDrag",version:I,beans:[Cw,mw],apiFunctions:{addRowDropZone:Yv,removeRowDropZone:Qv,getRowDropZoneParams:Zv,getRowDropPositionIndicator:Jv,setRowDropPositionIndicator:Xv},dependsOn:[th]},bw={moduleName:"HorizontalResize",version:I,beans:[nw],dependsOn:[eh]},Sw=":where(.ag-ltr) :where(.ag-column-moving){.ag-cell,.ag-header-cell,.ag-spanned-cell-wrapper{transition:left .2s}.ag-header-group-cell{transition:left .2s,width .2s}}:where(.ag-rtl) :where(.ag-column-moving){.ag-cell,.ag-header-cell,.ag-spanned-cell-wrapper{transition:right .2s}.ag-header-group-cell{transition:right .2s,width .2s}}",yw=class extends x{constructor(){super(...arguments),this.beanName="colAnimation",this.executeNextFuncs=[],this.executeLaterFuncs=[],this.active=!1,this.activeNext=!1,this.suppressAnimation=!1,this.animationThreadCount=0}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>this.gridBodyCtrl=e.gridBodyCtrl)}isActive(){return this.active&&!this.suppressAnimation}setSuppressAnimation(e){this.suppressAnimation=e}start(){if(this.active)return;const{gos:e}=this;e.get("suppressColumnMoveAnimation")||e.get("enableRtl")||(this.ensureAnimationCssClassPresent(),this.active=!0,this.activeNext=!0)}finish(){this.active&&this.flush(()=>this.activeNext=!1,()=>this.active=!1)}executeNextVMTurn(e){this.activeNext?this.executeNextFuncs.push(e):e()}executeLaterVMTurn(e){this.active?this.executeLaterFuncs.push(e):e()}ensureAnimationCssClassPresent(){this.animationThreadCount++;const e=this.animationThreadCount,{gridBodyCtrl:t}=this;t.setColumnMovingCss(!0),this.executeLaterFuncs.push(()=>{this.animationThreadCount===e&&t.setColumnMovingCss(!1)})}flush(e,t){const{executeNextFuncs:o,executeLaterFuncs:s}=this;if(o.length===0&&s.length===0){e(),t();return}const i=n=>{for(;n.length;){const r=n.pop();r&&r()}};this.beans.frameworkOverrides.wrapIncoming(()=>{window.setTimeout(()=>{e(),i(o)},0),window.setTimeout(()=>{t(),i(s)},200)})}};function Rw(e,t,o){e.colMoves?.moveColumnByIndex(t,o,"api")}function Fw(e,t,o){e.colMoves?.moveColumns(t,o,"api")}var Ew=class extends x{constructor(e){super(),this.pinned=e,this.columnsToAggregate=[],this.columnsToGroup=[],this.columnsToPivot=[]}onDragEnter(e){if(this.clearColumnsList(),this.gos.get("functionsReadOnly"))return;const t=e.dragItem.columns;if(t)for(const o of t)o.isPrimary()&&(o.isAnyFunctionActive()||(o.isAllowValue()?this.columnsToAggregate.push(o):o.isAllowRowGroup()?this.columnsToGroup.push(o):o.isAllowPivot()&&this.columnsToPivot.push(o)))}getIconName(){return this.columnsToAggregate.length+this.columnsToGroup.length+this.columnsToPivot.length>0?this.pinned?"pinned":"move":null}onDragLeave(e){this.clearColumnsList()}clearColumnsList(){this.columnsToAggregate.length=0,this.columnsToGroup.length=0,this.columnsToPivot.length=0}onDragging(e){}onDragStop(e){const{valueColsSvc:t,rowGroupColsSvc:o,pivotColsSvc:s}=this.beans;this.columnsToAggregate.length>0&&t?.addColumns(this.columnsToAggregate,"toolPanelDragAndDrop"),this.columnsToGroup.length>0&&o?.addColumns(this.columnsToGroup,"toolPanelDragAndDrop"),this.columnsToPivot.length>0&&s?.addColumns(this.columnsToPivot,"toolPanelDragAndDrop")}onDragCancel(){this.clearColumnsList()}};function xw(e,t){!t||t.length<=1||t.filter(s=>e.indexOf(s)<0).length>0||t.sort((s,i)=>{const n=e.indexOf(s),r=e.indexOf(i);return n-r})}function Pw(e){const t=[...e];for(const o of e){let s=null,i=o.getParent();for(;i!=null&&i.getDisplayedLeafColumns().length===1;)s=i,i=i.getParent();if(s!=null){const r=!!s.getColGroupDef()?.marryChildren?s.getProvidedColumnGroup().getLeafColumns():s.getLeafColumns();for(const a of r)t.includes(a)||t.push(a)}}return t}function Dw(e,t,o,s){const i=s.allCols;let n=null,r=null;for(let a=0;a<e.length;a++){const l=e[a],c=o.getProposedColumnOrder(t,l);if(!o.doesOrderPassRules(c))continue;const d=c.filter(h=>i.includes(h));if(r===null)r=d;else if(!ho(d,r))break;const u=Tw(c);(n===null||u<n.fragCount)&&(n={move:l,fragCount:u})}return n}function oh(e){const{isFromHeader:t,fromLeft:o,xPosition:s,fromEnter:i,fakeEvent:n,pinned:r,gos:a,colModel:l,colMoves:c,visibleCols:d}=e;let{allMovingColumns:u}=e;t&&(u=Pw(u));const h=u.slice();xw(l.getCols(),h);const g=Aw({movingCols:h,draggingRight:o,xPosition:s,pinned:r,gos:a,colModel:l,visibleCols:d}),f=Mw(h,l);if(g.length===0)return;const m=g[0];if(f!==null&&(t||!i)&&!n&&(!o&&m>=f||o&&m<=f))return;const v=Dw(g,h,c,d);if(!v)return;const w=v.move;if(!(w>l.getCols().length-h.length))return{columns:h,toIndex:w}}function sh(e){const{columns:t,toIndex:o}=oh(e)||{},{finished:s,colMoves:i}=e;return!t||o==null?null:(i.moveColumns(t,o,"uiColumnMoved",s),s?null:{columns:t,toIndex:o})}function Mw(e,t){const o=t.getCols(),s=e.map(l=>o.indexOf(l)).sort((l,c)=>l-c),i=s[0];return he(s)-i!==s.length-1?null:i}function Tw(e){function t(s){const i=[];let n=s.getOriginalParent();for(;n!=null;)i.push(n),n=n.getOriginalParent();return i}let o=0;for(let s=0;s<e.length-1;s++){let i=t(e[s]),n=t(e[s+1]);[i,n]=i.length>n.length?[i,n]:[n,i];for(const r of i)n.indexOf(r)===-1&&o++}return o}function Iw(e,t){switch(t){case"left":return e.leftCols;case"right":return e.rightCols;default:return e.centerCols}}function Aw(e){const{movingCols:t,draggingRight:o,xPosition:s,pinned:i,gos:n,colModel:r,visibleCols:a}=e;if(n.get("suppressMovableColumns")||t.some(b=>b.getColDef().suppressMovable))return[];const c=Iw(a,i),d=r.getCols(),u=c.filter(b=>t.includes(b)),h=c.filter(b=>!t.includes(b)),g=d.filter(b=>!t.includes(b));let f=0,m=s;if(o){let b=0;for(const y of u)b+=y.getActualWidth();m-=b}if(m>0){for(let b=0;b<h.length;b++){const y=h[b];if(m-=y.getActualWidth(),m<0)break;f++}o&&f++}let C;if(f>0){const b=h[f-1];C=g.indexOf(b)+1}else C=g.indexOf(h[0]),C===-1&&(C=0);const v=[C],w=(b,y)=>b-y;if(o){let b=C+1;const y=d.length-1;for(;b<=y;)v.push(b),b++;v.sort(w)}else{let b=C;const y=d.length-1;let S=d[b];for(;b<=y&&c.indexOf(S)<0;)b++,v.push(b),S=d[b];b=C-1;const F=0;for(;b>=F;)v.push(b),b--;v.sort(w).reverse()}return v}function Nr(e){const{pinned:t,fromKeyboard:o,gos:s,ctrlsSvc:i,useHeaderRow:n,skipScrollPadding:r}=e;let a=i.getHeaderRowContainerCtrl(t)?.eViewport,{x:l}=e;return a?(o&&(l-=a.getBoundingClientRect().left),s.get("enableRtl")&&(n&&(a=a.querySelector(".ag-header-row")),l=a.clientWidth-l),t==null&&!r&&(l+=i.get("center").getCenterViewportScrollLeft()),l):0}function nr(e,t){for(const o of e)o.moving=t,o.dispatchColEvent("movingChanged","uiColumnMoved")}var cc=7,Wr=100,yi=Wr/2,kw=5,Lw=100,Ow=class extends x{constructor(e){super(),this.pinned=e,this.needToMoveLeft=!1,this.needToMoveRight=!1,this.lastMovedInfo=null,this.isCenterContainer=!L(e)}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.gridBodyCon=e.gridBodyCtrl})}getIconName(){const{pinned:e,lastDraggingEvent:t}=this,{dragItem:o}=t||{},s=o?.columns??[];for(const i of s){const n=i.getPinned();if(i.getColDef().lockPinned){if(n==e)return"move";continue}const r=o?.containerType;if(r===e||!e)return"move";if(e&&(!n||r!==e))return"pinned"}return"notAllowed"}onDragEnter(e){const t=e.dragItem,o=t.columns;if(e.dragSource.type===0)this.setColumnsVisible(o,!0,"uiColumnDragged");else{const i=t.visibleState,n=(o||[]).filter(r=>i[r.getId()]&&!r.isVisible());this.setColumnsVisible(n,!0,"uiColumnDragged")}this.gos.get("suppressMoveWhenColumnDragging")||this.attemptToPinColumns(o,this.pinned),this.onDragging(e,!0,!0)}onDragging(e=this.lastDraggingEvent,t=!1,o=!1,s=!1){const{gos:i,ctrlsSvc:n}=this.beans,r=i.get("suppressMoveWhenColumnDragging");if(s&&!r){this.finishColumnMoving();return}if(this.lastDraggingEvent=e,!e||!s&&we(e.hDirection))return;const a=Nr({x:e.x,pinned:this.pinned,gos:i,ctrlsSvc:n});t||this.checkCenterForScrolling(a),r?this.handleColumnDragWhileSuppressingMovement(e,t,o,a,s):this.handleColumnDragWhileAllowingMovement(e,t,o,a,s)}onDragLeave(){this.ensureIntervalCleared(),this.clearHighlighted(),this.updateDragItemContainerType(),this.lastMovedInfo=null}onDragStop(){this.onDragging(this.lastDraggingEvent,!1,!0,!0),this.ensureIntervalCleared(),this.lastMovedInfo=null}onDragCancel(){this.clearHighlighted(),this.ensureIntervalCleared(),this.lastMovedInfo=null}setColumnsVisible(e,t,o){if(!e?.length)return;const s=e.filter(i=>!i.getColDef().lockVisible);s.length&&this.beans.colModel.setColsVisible(s,t,o)}finishColumnMoving(){this.clearHighlighted();const e=this.lastMovedInfo;if(!e)return;const{columns:t,toIndex:o}=e;this.beans.colMoves.moveColumns(t,o,"uiColumnMoved",!0)}updateDragItemContainerType(){const{lastDraggingEvent:e}=this;if(this.gos.get("suppressMoveWhenColumnDragging")||!e)return;const t=e.dragItem;t&&(t.containerType=this.pinned)}handleColumnDragWhileSuppressingMovement(e,t,o,s,i){const n=this.getAllMovingColumns(e,!0);if(i){const r=this.isAttemptingToPin(n);r&&this.attemptToPinColumns(n,void 0,!0);const{fromLeft:a,xPosition:l}=this.getNormalisedXPositionInfo(n,r)||{};if(a==null||l==null){this.finishColumnMoving();return}this.moveColumnsAfterHighlight({allMovingColumns:n,xPosition:l,fromEnter:t,fakeEvent:o,fromLeft:a})}else{if(!this.beans.dragAndDrop.isDropZoneWithinThisGrid(e))return;this.highlightHoveredColumn(n,s)}}handleColumnDragWhileAllowingMovement(e,t,o,s,i){const n=this.getAllMovingColumns(e),r=this.normaliseDirection(e.hDirection)==="right",a=e.dragSource.type===1,l=this.getMoveColumnParams({allMovingColumns:n,isFromHeader:a,xPosition:s,fromLeft:r,fromEnter:t,fakeEvent:o}),c=sh({...l,finished:i});c&&(this.lastMovedInfo=c)}getAllMovingColumns(e,t=!1){const o=e.dragSource.getDragItem();let s=null;t?(s=o.columnsInSplit,s||(s=o.columns)):s=o.columns;const i=n=>n.getColDef().lockPinned?n.getPinned()==this.pinned:!0;return s?s.filter(i):[]}getMoveColumnParams(e){const{allMovingColumns:t,isFromHeader:o,xPosition:s,fromLeft:i,fromEnter:n,fakeEvent:r}=e,{gos:a,colModel:l,colMoves:c,visibleCols:d}=this.beans;return{allMovingColumns:t,isFromHeader:o,fromLeft:i,xPosition:s,pinned:this.pinned,fromEnter:n,fakeEvent:r,gos:a,colModel:l,colMoves:c,visibleCols:d}}highlightHoveredColumn(e,t){const{gos:o,colModel:s}=this.beans,i=o.get("enableRtl"),n=s.getCols().filter(d=>d.isVisible()&&d.getPinned()===this.pinned);let r=null,a=null,l=null;for(const d of n){if(a=d.getActualWidth(),r=this.getNormalisedColumnLeft(d,0,i),r!=null){const u=r+a;if(r<=t&&u>=t){l=d;break}}r=null,a=null}if(l)e.indexOf(l)!==-1&&(l=null);else{for(let d=n.length-1;d>=0;d--){const u=n[d],h=n[d].getParent();if(!h){l=u;break}const g=h?.getDisplayedLeafColumns();if(g.length){l=he(g);break}}if(!l)return;r=this.getNormalisedColumnLeft(l,0,i),a=l.getActualWidth()}if(l==null||r==null||a==null){this.lastHighlightedColumn?.column!==l&&this.clearHighlighted();return}let c;if(t-r<a/2){const d=n.indexOf(l);d===0?c=0:(c=1,l=n[d-1])}else c=1;(this.lastHighlightedColumn?.column!==l||this.lastHighlightedColumn?.position!==c)&&this.clearHighlighted(),dc(l,c),this.lastHighlightedColumn={column:l,position:c}}getNormalisedXPositionInfo(e,t){const{gos:o,visibleCols:s}=this.beans,i=o.get("enableRtl"),{firstMovingCol:n,column:r,position:a}=this.getColumnMoveAndTargetInfo(e,t,i);if(!n||!r||a==null)return;const l=s.allCols,c=l.indexOf(n),d=l.indexOf(r),u=a===0,h=c<d||c===d&&!u;let g=0;if(u?h&&(g-=1):h||(g+=1),d+g===c)return;const f=l[d+g];if(!f)return;const m=this.getNormalisedColumnLeft(f,20,i);return{fromLeft:h,xPosition:m}}getColumnMoveAndTargetInfo(e,t,o){const s=this.lastHighlightedColumn||{},{firstMovingCol:i,lastMovingCol:n}=Gw(e);if(!i||!n||s.column||!t)return{firstMovingCol:i,...s};const a=this.getPinDirection()==="left";return{firstMovingCol:i,position:a?1:0,column:a!==o?i:n}}normaliseDirection(e){if(this.gos.get("enableRtl"))switch(e){case"left":return"right";case"right":return"left"}return e}getNormalisedColumnLeft(e,t,o){const{gos:s,ctrlsSvc:i}=this.beans,n=e.getLeft();if(n==null)return null;const r=e.getActualWidth();return Nr({x:o?n+r-t:n+t,pinned:e.getPinned(),useHeaderRow:o,skipScrollPadding:!0,gos:s,ctrlsSvc:i})}isAttemptingToPin(e){const t=this.needToMoveLeft||this.needToMoveRight,o=this.failedMoveAttempts>cc;return t&&o||e.some(s=>s.getPinned()!==this.pinned)}moveColumnsAfterHighlight(e){const{allMovingColumns:t,xPosition:o,fromEnter:s,fakeEvent:i,fromLeft:n}=e,r=this.getMoveColumnParams({allMovingColumns:t,isFromHeader:!0,xPosition:o,fromLeft:n,fromEnter:s,fakeEvent:i}),{columns:a,toIndex:l}=oh(r)||{};a&&l!=null&&(this.lastMovedInfo={columns:a,toIndex:l}),this.finishColumnMoving()}clearHighlighted(){const{lastHighlightedColumn:e}=this;e&&(dc(e.column,null),this.lastHighlightedColumn=null)}checkCenterForScrolling(e){if(!this.isCenterContainer)return;const t=this.beans.ctrlsSvc.get("center"),o=t.getCenterViewportScrollLeft(),s=o+t.getCenterWidth();let i,n;this.gos.get("enableRtl")?(i=e<o+yi,n=e>s-yi):(n=e<o+yi,i=e>s-yi),this.needToMoveRight=i,this.needToMoveLeft=n,n||i?this.ensureIntervalStarted():this.ensureIntervalCleared()}ensureIntervalStarted(){this.movingIntervalId||(this.intervalCount=0,this.failedMoveAttempts=0,this.movingIntervalId=window.setInterval(this.moveInterval.bind(this),Lw),this.beans.dragAndDrop.setDragImageCompIcon(this.needToMoveLeft?"left":"right",!0))}ensureIntervalCleared(){this.movingIntervalId&&(window.clearInterval(this.movingIntervalId),this.movingIntervalId=null,this.failedMoveAttempts=0,this.beans.dragAndDrop.setDragImageCompIcon(this.getIconName()))}moveInterval(){let e;this.intervalCount++,e=10+this.intervalCount*kw,e>Wr&&(e=Wr);let t=null;const o=this.gridBodyCon.scrollFeature;if(this.needToMoveLeft?t=o.scrollHorizontally(-e):this.needToMoveRight&&(t=o.scrollHorizontally(e)),t!==0)this.onDragging(this.lastDraggingEvent),this.failedMoveAttempts=0;else{this.failedMoveAttempts++;const{pinnedCols:s,dragAndDrop:i,gos:n}=this.beans;if(this.failedMoveAttempts<=cc+1||!s)return;if(i.setDragImageCompIcon("pinned"),!n.get("suppressMoveWhenColumnDragging")){const r=this.lastDraggingEvent?.dragItem.columns;this.attemptToPinColumns(r,void 0,!0)}}}getPinDirection(){if(this.needToMoveLeft||this.pinned==="left")return"left";if(this.needToMoveRight||this.pinned==="right")return"right"}attemptToPinColumns(e,t,o=!1){const s=(e||[]).filter(r=>!r.getColDef().lockPinned);if(!s.length)return 0;o&&(t=this.getPinDirection());const{pinnedCols:i,dragAndDrop:n}=this.beans;return i?.setColsPinned(s,t,"uiColumnDragged"),o&&n.nudge(),s.length}destroy(){super.destroy(),this.lastDraggingEvent=null,this.clearHighlighted(),this.lastMovedInfo=null}};function dc(e,t){e.highlighted!==t&&(e.highlighted=t,e.dispatchColEvent("headerHighlightChanged","uiColumnMoved"))}function Gw(e){const t=e.length;let o,s;for(let i=0;i<t;i++){if(!o){const n=e[i];n.getLeft()!=null&&(o=n)}if(!s){const n=e[t-1-i];n.getLeft()!=null&&(s=n)}if(o&&s)break}return{firstMovingCol:o,lastMovingCol:s}}var Hw=class extends x{constructor(e,t){super(),this.pinned=e,this.eContainer=t}postConstruct(){const{ctrlsSvc:e,dragAndDrop:t}=this.beans,o=this.pinned;e.whenReady(this,s=>{let i;const n=s.gridBodyCtrl.eBodyViewport;switch(o){case"left":i=[[n,s.left.eContainer],[s.bottomLeft.eContainer],[s.topLeft.eContainer]];break;case"right":i=[[n,s.right.eContainer],[s.bottomRight.eContainer],[s.topRight.eContainer]];break;default:i=[[n,s.center.eViewport],[s.bottomCenter.eViewport],[s.topCenter.eViewport]];break}this.eSecondaryContainers=i}),this.moveColumnFeature=this.createManagedBean(new Ow(o)),this.bodyDropPivotTarget=this.createManagedBean(new Ew(o)),t.addDropTarget(this),this.addDestroyFunc(()=>t.removeDropTarget(this))}isInterestedIn(e){return e===1||e===0&&this.gos.get("allowDragFromColumnsToolPanel")}getSecondaryContainers(){return this.eSecondaryContainers}getContainer(){return this.eContainer}getIconName(){return this.currentDropListener.getIconName()}isDropColumnInPivotMode(e){return this.beans.colModel.isPivotMode()&&e.dragSource.type===0}onDragEnter(e){this.currentDropListener=this.isDropColumnInPivotMode(e)?this.bodyDropPivotTarget:this.moveColumnFeature,this.currentDropListener.onDragEnter(e)}onDragLeave(e){this.currentDropListener.onDragLeave(e)}onDragging(e){this.currentDropListener.onDragging(e)}onDragStop(e){this.currentDropListener.onDragStop(e)}onDragCancel(){this.currentDropListener.onDragCancel()}};function ih(e,t){const o=[],s=[],i=[];return e.forEach(r=>{const a=r.getColDef().lockPosition;a==="right"?i.push(r):a==="left"||a===!0?o.push(r):s.push(r)}),t.get("enableRtl")?[...i,...s,...o]:[...o,...s,...i]}function nh(e,t){let o=!0;return Wt(null,t,s=>{if(!Ve(s))return;const i=s;if(!i.getColGroupDef()?.marryChildren)return;const a=[];for(const h of i.getLeafColumns()){const g=e.indexOf(h);a.push(g)}const l=Math.max.apply(Math,a),c=Math.min.apply(Math,a),d=l-c,u=i.getLeafColumns().length-1;d>u&&(o=!1)}),o}var Bw=class extends x{constructor(){super(...arguments),this.beanName="colMoves"}moveColumnByIndex(e,t,o){const s=this.beans.colModel.getCols();if(!s)return;const i=s[e];this.moveColumns([i],t,o)}moveColumns(e,t,o,s=!0){const{colModel:i,colAnimation:n,visibleCols:r,eventSvc:a}=this.beans,l=i.getCols();if(!l)return;if(t>l.length-e.length){D(30,{toIndex:t});return}n?.start();const c=i.getColsForKeys(e);this.doesMovePassRules(c,t)&&(Pl(i.getCols(),c,t),r.refresh(o),a.dispatchEvent({type:"columnMoved",columns:c,column:c.length===1?c[0]:null,toIndex:t,finished:s,source:o})),n?.finish()}doesMovePassRules(e,t){const o=this.getProposedColumnOrder(e,t);return this.doesOrderPassRules(o)}doesOrderPassRules(e){const{colModel:t,gos:o}=this.beans;return!(!nh(e,t.getColTree())||!(i=>{const n=c=>c?c==="left"||c===!0?-1:1:0,r=o.get("enableRtl");let a=r?1:-1,l=!0;for(const c of i){const d=n(c.getColDef().lockPosition);r?d>a&&(l=!1):d<a&&(l=!1),a=d}return l})(e))}getProposedColumnOrder(e,t){const s=this.beans.colModel.getCols().slice();return Pl(s,e,t),s}createBodyDropTarget(e,t){return new Hw(e,t)}moveHeader(e,t,o,s,i){const{ctrlsSvc:n,gos:r,colModel:a,visibleCols:l,focusSvc:c}=this.beans,d=t.getBoundingClientRect(),u=d.left,h=Fe(o),g=h?d.width:o.getActualWidth(),f=e==="left"!==r.get("enableRtl"),m=Nr({x:f?u-20:u+g+20,pinned:s,fromKeyboard:!0,gos:r,ctrlsSvc:n}),C=c.focusedHeader;sh({allMovingColumns:h?o.getLeafColumns():[o],isFromHeader:!0,fromLeft:e==="right",xPosition:m,pinned:s,fromEnter:!1,fakeEvent:!1,gos:r,colModel:a,colMoves:this,visibleCols:l,finished:!0});let v;if(h){const w=o.getDisplayedLeafColumns();v=f?w[0]:he(w)}else v=o;if(n.getScrollFeature().ensureColumnVisible(v,"auto"),(!i.isAlive()||r.get("ensureDomOrder"))&&C){let w;if(h){const b=o.getGroupId(),y=o.getLeafColumns();if(!y.length)return;const S=y[0].getParent();if(!S)return;w=Vw(S,b)}else w=o;w&&c.focusHeaderPosition({headerPosition:{...C,column:w}})}}setDragSourceForHeader(e,t,o){const{gos:s,colModel:i,dragAndDrop:n,visibleCols:r}=this.beans;let a=!s.get("suppressDragLeaveHidesColumns");const l=Fe(t),c=l?t.getProvidedColumnGroup().getLeafColumns():[t],u={type:1,eElement:e,getDefaultIconName:()=>a?"hide":"notAllowed",getDragItem:l?()=>Ww(t,r.allCols):()=>Nw(t),dragItemName:o,onDragStarted:()=>{a=!s.get("suppressDragLeaveHidesColumns"),nr(c,!0)},onDragStopped:()=>nr(c,!1),onDragCancelled:()=>nr(c,!1),onGridEnter:h=>{if(a){const{columns:g=[],visibleState:f}=h??{},m=l?v=>!f||f[v.getColId()]:()=>!0,C=g.filter(v=>!v.getColDef().lockVisible&&m(v));i.setColsVisible(C,!0,"uiColumnMoved")}},onGridExit:h=>{if(a){const g=h?.columns?.filter(f=>!f.getColDef().lockVisible)||[];i.setColsVisible(g,!1,"uiColumnMoved")}}};return n.addDragSource(u,!0),u}};function Vw(e,t){for(;e;){if(e.getGroupId()===t)return e;e=e.getParent()}}function Nw(e){const t={};return t[e.getId()]=e.isVisible(),{columns:[e],visibleState:t,containerType:e.pinned}}function Ww(e,t){const o=e.getProvidedColumnGroup().getLeafColumns(),s={};for(const a of o)s[a.getId()]=a.isVisible();const i=[];for(const a of t)o.indexOf(a)>=0&&(i.push(a),At(o,a));for(const a of o)i.push(a);const n=[],r=e.getLeafColumns();for(const a of i)r.indexOf(a)!==-1&&n.push(a);return{columns:i,columnsInSplit:n,visibleState:s,containerType:n[0]?.pinned}}var zw={moduleName:"ColumnMove",version:I,beans:[Bw,yw],apiFunctions:{moveColumnByIndex:Rw,moveColumns:Fw},dependsOn:[th],css:[Sw]},_w=class extends x{constructor(){super(...arguments),this.beanName="autoWidthCalc"}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.centerRowContainerCtrl=e.center})}getPreferredWidthForColumn(e,t){const o=this.getHeaderCellForColumn(e);if(!o)return-1;const s=this.beans.rowRenderer.getAllCellsNotSpanningForColumn(e);return t||s.push(o),this.getPreferredWidthForElements(s)}getPreferredWidthForColumnGroup(e){const t=this.getHeaderCellForColumn(e);return t?this.getPreferredWidthForElements([t]):-1}getPreferredWidthForElements(e,t){const o=document.createElement("form");o.style.position="fixed";const s=this.centerRowContainerCtrl.eContainer;for(const n of e)this.cloneItemIntoDummy(n,o);s.appendChild(o);const i=Math.ceil(o.getBoundingClientRect().width);return o.remove(),t=t??this.gos.get("autoSizePadding"),i+t}getHeaderCellForColumn(e){let t=null;for(const o of this.beans.ctrlsSvc.getHeaderRowContainerCtrls()){const s=o.getHtmlElementForColumnHeader(e);s!=null&&(t=s)}return t}cloneItemIntoDummy(e,t){const o=e.cloneNode(!0);o.style.width="",o.style.position="static",o.style.left="";const s=document.createElement("div"),i=s.classList;["ag-header-cell","ag-header-group-cell"].some(a=>o.classList.contains(a))?(i.add("ag-header","ag-header-row"),s.style.position="static"):i.add("ag-row");let r=e.parentElement;for(;r;){if(["ag-header-row","ag-row"].some(l=>r.classList.contains(l))){for(let l=0;l<r.classList.length;l++){const c=r.classList[l];c!="ag-row-position-absolute"&&i.add(c)}break}r=r.parentElement}s.appendChild(o),t.appendChild(s)}},rh={moduleName:"AutoWidth",version:I,beans:[_w]};function Uw(e,t,o=!0,s="api"){e.colResize?.setColumnWidths(t,!1,o,s)}function ah(e,t){if(!e||e.length==0)return;const o=t(e[0]);for(let s=1;s<e.length;s++)if(o!==t(e[s]))return;return o}function lh(e,t,o){if(!t.length)return;const s=t.length===1?t[0]:null,i=ah(t,n=>n.getPinned());e.dispatchEvent({type:"columnPinned",pinned:i??null,columns:t,column:s,source:o})}function $w(e,t,o){if(!t.length)return;const s=t.length===1?t[0]:null,i=ah(t,n=>n.isVisible());e.dispatchEvent({type:"columnVisible",visible:i,columns:t,column:s,source:o})}function Kw(e,t,o,s){e.dispatchEvent({type:t,columns:o,column:o&&o.length==1?o[0]:null,source:s})}function Ss(e,t,o,s,i=null){t?.length&&e.dispatchEvent({type:"columnResized",columns:t,column:t.length===1?t[0]:null,flexColumns:i,finished:o,source:s})}var qw=class extends x{constructor(e,t,o,s){super(),this.comp=e,this.eResize=t,this.pinned=o,this.columnGroup=s}postConstruct(){if(!this.columnGroup.isResizable()){this.comp.setResizableDisplayed(!1);return}const{horizontalResizeSvc:e,gos:t,colAutosize:o}=this.beans,s=e.addResizeBar({eResizeBar:this.eResize,onResizeStart:this.onResizeStart.bind(this),onResizing:this.onResizing.bind(this,!1),onResizeEnd:this.onResizing.bind(this,!0)});this.addDestroyFunc(s),!t.get("suppressAutoSize")&&o&&this.addDestroyFunc(o.addColumnGroupResize(this.eResize,this.columnGroup,()=>this.resizeLeafColumnsToFit("uiColumnResized")))}onResizeStart(e){const{columnsToResize:t,resizeStartWidth:o,resizeRatios:s,groupAfterColumns:i,groupAfterStartWidth:n,groupAfterRatios:r}=this.getInitialValues(e);this.resizeCols=t,this.resizeStartWidth=o,this.resizeRatios=s,this.resizeTakeFromCols=i,this.resizeTakeFromStartWidth=n,this.resizeTakeFromRatios=r,this.toggleColumnResizing(!0)}onResizing(e,t,o="uiColumnResized"){const s=this.normaliseDragChange(t),i=this.resizeStartWidth+s;this.resizeColumnsFromLocalValues(i,o,e)}getInitialValues(e){const t=l=>l.reduce((c,d)=>c+d.getActualWidth(),0),o=(l,c)=>l.map(d=>d.getActualWidth()/c),s=this.getColumnsToResize(),i=t(s),n=o(s,i),r={columnsToResize:s,resizeStartWidth:i,resizeRatios:n};let a=null;if(e&&(a=this.beans.colGroupSvc?.getGroupAtDirection(this.columnGroup,"After")??null),a){const l=a.getDisplayedLeafColumns(),c=r.groupAfterColumns=l.filter(u=>u.isResizable()),d=r.groupAfterStartWidth=t(c);r.groupAfterRatios=o(c,d)}else r.groupAfterColumns=void 0,r.groupAfterStartWidth=void 0,r.groupAfterRatios=void 0;return r}resizeLeafColumnsToFit(e){const t=this.beans.autoWidthCalc.getPreferredWidthForColumnGroup(this.columnGroup),o=this.getInitialValues();t>o.resizeStartWidth&&this.resizeColumns(o,t,e,!0)}resizeColumnsFromLocalValues(e,t,o=!0){if(!this.resizeCols||!this.resizeRatios)return;const s={columnsToResize:this.resizeCols,resizeStartWidth:this.resizeStartWidth,resizeRatios:this.resizeRatios,groupAfterColumns:this.resizeTakeFromCols,groupAfterStartWidth:this.resizeTakeFromStartWidth,groupAfterRatios:this.resizeTakeFromRatios};this.resizeColumns(s,e,t,o)}resizeColumns(e,t,o,s=!0){const{columnsToResize:i,resizeStartWidth:n,resizeRatios:r,groupAfterColumns:a,groupAfterStartWidth:l,groupAfterRatios:c}=e,d=[];if(d.push({columns:i,ratios:r,width:t}),a){const u=t-n;d.push({columns:a,ratios:c,width:l-u})}this.beans.colResize?.resizeColumnSets({resizeSets:d,finished:s,source:o}),s&&this.toggleColumnResizing(!1)}toggleColumnResizing(e){this.comp.toggleCss("ag-column-resizing",e)}getColumnsToResize(){return this.columnGroup.getDisplayedLeafColumns().filter(t=>t.isResizable())}normaliseDragChange(e){let t=e;return this.gos.get("enableRtl")?this.pinned!=="left"&&(t*=-1):this.pinned==="right"&&(t*=-1),t}destroy(){super.destroy(),this.resizeCols=void 0,this.resizeRatios=void 0,this.resizeTakeFromCols=void 0,this.resizeTakeFromRatios=void 0}},jw=class extends x{constructor(e,t,o,s,i){super(),this.pinned=e,this.column=t,this.eResize=o,this.comp=s,this.ctrl=i}postConstruct(){const e=[];let t,o;const s=()=>{if(fe(this.eResize,t),!t)return;const{horizontalResizeSvc:r,colAutosize:a}=this.beans,l=r.addResizeBar({eResizeBar:this.eResize,onResizeStart:this.onResizeStart.bind(this),onResizing:this.onResizing.bind(this,!1),onResizeEnd:this.onResizing.bind(this,!0)});e.push(l),o&&a&&e.push(a.addColumnAutosizeListeners(this.eResize,this.column))},i=()=>{for(const r of e)r();e.length=0},n=()=>{const r=this.column.isResizable(),a=!this.gos.get("suppressAutoSize")&&!this.column.getColDef().suppressAutoSize;(r!==t||a!==o)&&(t=r,o=a,i(),s())};n(),this.addDestroyFunc(i),this.ctrl.setRefreshFunction("resize",n)}onResizing(e,t){const{column:o,lastResizeAmount:s,resizeStartWidth:i,beans:n}=this,r=this.normaliseResizeAmount(t),a=i+r,l=[{key:o,newWidth:a}],{pinnedCols:c,ctrlsSvc:d,colResize:u}=n;if(this.column.getPinned()){const h=c?.leftWidth??0,g=c?.rightWidth??0,f=Zs(d.getGridBodyCtrl().eBodyViewport)-50;if(h+g+(r-s)>f)return}this.lastResizeAmount=r,u?.setColumnWidths(l,this.resizeWithShiftKey,e,"uiColumnResized"),e&&this.toggleColumnResizing(!1)}onResizeStart(e){this.resizeStartWidth=this.column.getActualWidth(),this.lastResizeAmount=0,this.resizeWithShiftKey=e,this.toggleColumnResizing(!0)}toggleColumnResizing(e){this.column.resizing=e,this.comp.toggleCss("ag-column-resizing",e)}normaliseResizeAmount(e){let t=e;const o=this.pinned!=="left",s=this.pinned==="right";return this.gos.get("enableRtl")?o&&(t*=-1):s&&(t*=-1),t}},Yw=class extends x{constructor(){super(...arguments),this.beanName="colResize"}setColumnWidths(e,t,o,s){const i=[],{colModel:n,gos:r,visibleCols:a}=this.beans;for(const l of e){const c=n.getColDefCol(l.key)||n.getCol(l.key);if(!c)continue;if(i.push({width:l.newWidth,ratios:[1],columns:[c]}),r.get("colResizeDefault")==="shift"&&(t=!t),t){const u=a.getColAfter(c);if(!u)continue;const h=c.getActualWidth()-l.newWidth,g=u.getActualWidth()+h;i.push({width:g,ratios:[1],columns:[u]})}}i.length!==0&&this.resizeColumnSets({resizeSets:i,finished:o,source:s})}resizeColumnSets(e){const{resizeSets:t,finished:o,source:s}=e;if(!(!t||t.every(d=>Qw(d)))){if(o){const d=t&&t.length>0?t[0].columns:null;Ss(this.eventSvc,d,o,s)}return}const n=[],r=[];for(const d of t){const{width:u,columns:h,ratios:g}=d,f={},m={};for(const w of h)r.push(w);let C=!0,v=0;for(;C;){if(v++,v>1e3){ce(31);break}C=!1;const w=[];let b=0,y=u;h.forEach((F,E)=>{if(m[F.getId()])y-=f[F.getId()];else{w.push(F);const k=g[E];b+=k}});const S=1/b;w.forEach((F,E)=>{const G=E===w.length-1;let k;G?k=y:(k=Math.round(g[E]*u*S),y-=k);const O=F.getMinWidth(),P=F.getMaxWidth();k<O?(k=O,m[F.getId()]=!0,C=!0):P>0&&k>P&&(k=P,m[F.getId()]=!0,C=!0),f[F.getId()]=k})}for(const w of h){const b=f[w.getId()];w.getActualWidth()!==b&&(w.setActualWidth(b,s),n.push(w))}}const a=n.length>0;let l=[];if(a){const{colFlex:d,visibleCols:u,colViewport:h}=this.beans;l=d?.refreshFlexedColumns({resizingCols:r,skipSetLeft:!0})??[],u.setLeftValues(s),u.updateBodyWidths(),h.checkViewportColumns()}const c=r.concat(l);(a||o)&&Ss(this.eventSvc,c,o,s,l)}resizeHeader(e,t,o){if(!e.isResizable())return;const s=e.getActualWidth(),i=e.getMinWidth(),n=e.getMaxWidth(),r=Math.min(Math.max(s+t,i),n);this.setColumnWidths([{key:e,newWidth:r}],o,!0,"uiColumnResized")}createResizeFeature(e,t,o,s,i){return new jw(e,t,o,s,i)}createGroupResizeFeature(e,t,o,s){return new qw(e,t,o,s)}};function Qw(e){const{columns:t,width:o}=e;let s=0,i=0,n=!0;for(const l of t){const c=l.getMinWidth();s+=c||0;const d=l.getMaxWidth();d>0?i+=d:n=!1}const r=o>=s,a=!n||o<=i;return r&&a}var Zw={moduleName:"ColumnResize",version:I,beans:[Yw],apiFunctions:{setColumnWidths:Uw},dependsOn:[bw,rh]},Jw=class extends x{constructor(e,t){super(),this.removeChildListenersFuncs=[],this.columnGroup=t,this.comp=e}postConstruct(){this.addListenersToChildrenColumns(),this.addManagedListeners(this.columnGroup,{displayedChildrenChanged:this.onDisplayedChildrenChanged.bind(this)}),this.onWidthChanged(),this.addDestroyFunc(this.removeListenersOnChildrenColumns.bind(this))}addListenersToChildrenColumns(){this.removeListenersOnChildrenColumns();const e=this.onWidthChanged.bind(this);for(const t of this.columnGroup.getLeafColumns())t.__addEventListener("widthChanged",e),t.__addEventListener("visibleChanged",e),this.removeChildListenersFuncs.push(()=>{t.__removeEventListener("widthChanged",e),t.__removeEventListener("visibleChanged",e)})}removeListenersOnChildrenColumns(){for(const e of this.removeChildListenersFuncs)e();this.removeChildListenersFuncs=[]}onDisplayedChildrenChanged(){this.addListenersToChildrenColumns(),this.onWidthChanged()}onWidthChanged(){const e=this.columnGroup.getActualWidth();this.comp.setWidth(`${e}px`),this.comp.toggleCss("ag-hidden",e===0)}},Xw=class extends Ua{constructor(){super(...arguments),this.onSuppressColMoveChange=()=>{!this.isAlive()||this.isSuppressMoving()?this.removeDragSource():this.dragSource||this.setDragSource(this.eGui)}}wireComp(e,t,o,s,i){const{column:n,beans:r}=this,{context:a,colNames:l,colHover:c,rangeSvc:d,colResize:u}=r;this.comp=e,i=di(this,a,i),this.setGui(t,i),this.displayName=l.getDisplayNameForColumnGroup(n,"header"),this.refreshHeaderStyles(),this.addClasses(),this.setupMovingCss(i),this.setupExpandable(i),this.setupTooltip(),this.refreshAnnouncement(),this.setupAutoHeight({wrapperElement:s,compBean:i}),this.setupUserComp(),this.addHeaderMouseListeners(i,s),this.addManagedPropertyListener("groupHeaderHeight",this.refreshMaxHeaderHeight.bind(this)),this.refreshMaxHeaderHeight();const h=this.rowCtrl.pinned,g=n.getProvidedColumnGroup().getLeafColumns();c?.createHoverFeature(i,g,t),d?.createRangeHighlightFeature(i,n,e),i.createManagedBean(new _a(n,t,r)),i.createManagedBean(new Jw(e,n)),u?this.resizeFeature=i.createManagedBean(u.createGroupResizeFeature(e,o,h,n)):e.setResizableDisplayed(!1),i.createManagedBean(new li(t,{shouldStopEventPropagation:this.shouldStopEventPropagation.bind(this),onTabKeyDown:()=>{},handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this)})),this.addHighlightListeners(i,g),this.addManagedEventListeners({cellSelectionChanged:()=>this.refreshAnnouncement()}),i.addManagedPropertyListener("suppressMovableColumns",this.onSuppressColMoveChange),this.addResizeAndMoveKeyboardListeners(i),i.addDestroyFunc(()=>this.clearComponent())}getHeaderClassParams(){const{column:e,beans:t}=this,o=e.getDefinition();return K(t.gos,{colDef:o,columnGroup:e,floatingFilter:!1})}refreshMaxHeaderHeight(){const{gos:e,comp:t}=this,o=e.get("groupHeaderHeight");o!=null?o===0?t.setHeaderWrapperHidden(!0):t.setHeaderWrapperMaxHeight(o):(t.setHeaderWrapperHidden(!1),t.setHeaderWrapperMaxHeight(null))}addHighlightListeners(e,t){if(this.beans.gos.get("suppressMoveWhenColumnDragging"))for(const o of t)e.addManagedListeners(o,{headerHighlightChanged:this.onLeafColumnHighlightChanged.bind(this,o)})}onLeafColumnHighlightChanged(e){const t=this.column.getDisplayedLeafColumns(),o=t[0]===e,s=he(t)===e;if(!o&&!s)return;const i=e.getHighlighted(),n=!!this.rowCtrl.getHeaderCellCtrls().find(l=>l.column.isMoving());let r=!1,a=!1;if(n){const l=this.beans.gos.get("enableRtl"),c=i===1,d=i===0;o&&(l?a=c:r=d),s&&(l?r=d:a=c)}this.comp.toggleCss("ag-header-highlight-before",r),this.comp.toggleCss("ag-header-highlight-after",a)}resizeHeader(e,t){const{resizeFeature:o}=this;if(!o)return;const s=o.getInitialValues(t);o.resizeColumns(s,s.resizeStartWidth+e,"uiColumnResized",!0)}resizeLeafColumnsToFit(e){this.resizeFeature?.resizeLeafColumnsToFit(e)}setupUserComp(){const{colGroupSvc:e,userCompFactory:t,gos:o,enterpriseMenuFactory:s}=this.beans,i=this.column,n=i.getProvidedColumnGroup(),r=K(o,{displayName:this.displayName,columnGroup:i,setExpanded:l=>{e.setColumnGroupOpened(n,l,"gridInitializing")},setTooltip:(l,c)=>{o.assertModuleRegistered("Tooltip",3),this.setupTooltip(l,c)},showColumnMenu:(l,c)=>s?.showMenuAfterButtonClick(n,l,"columnMenu",c),showColumnMenuAfterMouseClick:(l,c)=>s?.showMenuAfterMouseEvent(n,l,"columnMenu",c),eGridHeader:this.eGui}),a=zm(t,r);a&&this.comp.setUserCompDetails(a)}addHeaderMouseListeners(e,t){const{column:o,comp:s,beans:{rangeSvc:i},gos:n}=this,r=d=>this.handleMouseOverChange(d.type==="mouseenter"),a=()=>this.dispatchColumnMouseEvent("columnHeaderClicked",o.getProvidedColumnGroup()),l=d=>this.handleContextMenuMouseEvent(d,void 0,o.getProvidedColumnGroup());e.addManagedListeners(this.eGui,{mouseenter:r,mouseleave:r,click:a,contextmenu:l}),s.toggleCss("ag-header-group-cell-selectable",us(n));const c=i?.createHeaderGroupCellMouseListenerFeature(this.column,t);c&&this.createManagedBean(c)}handleMouseOverChange(e){this.eventSvc.dispatchEvent({type:e?"columnHeaderMouseOver":"columnHeaderMouseLeave",column:this.column.getProvidedColumnGroup()})}setupTooltip(e,t){this.tooltipFeature=this.beans.tooltipSvc?.setupHeaderGroupTooltip(this.tooltipFeature,this,e,t)}setupExpandable(e){const t=this.column.getProvidedColumnGroup();this.refreshExpanded();const o=this.refreshExpanded.bind(this);e.addManagedListeners(t,{expandedChanged:o,expandableChanged:o})}refreshExpanded(){const{column:e}=this;this.expandable=e.isExpandable();const t=e.isExpanded();this.expandable?this.comp.setAriaExpanded(t?"true":"false"):this.comp.setAriaExpanded(void 0),this.refreshHeaderStyles()}addClasses(){const{column:e}=this,t=e.getColGroupDef(),o=Ou(t,this.gos,null,e);e.isPadding()?(o.push("ag-header-group-cell-no-group"),e.getLeafColumns().every(i=>i.isSpanHeaderHeight())&&o.push("ag-header-span-height")):(o.push("ag-header-group-cell-with-group"),t?.wrapHeaderText&&o.push("ag-header-cell-wrap-text"));for(const s of o)this.comp.toggleCss(s,!0)}setupMovingCss(e){const{column:t}=this,s=t.getProvidedColumnGroup().getLeafColumns(),i=()=>this.comp.toggleCss("ag-header-cell-moving",t.isMoving());for(const n of s)e.addManagedListeners(n,{movingChanged:i});i()}onFocusIn(e){this.eGui.contains(e.relatedTarget)||(this.focusThis(),this.announceAriaDescription())}handleKeyDown(e){if(super.handleKeyDown(e),!this.getWrapperHasFocus())return;const{column:o,expandable:s,gos:i,beans:n}=this,r=us(i);if(e.key==R.ENTER){if(r&&!e.altKey)n.rangeSvc?.handleColumnSelection(o,e);else if(s){const a=!o.isExpanded();n.colGroupSvc.setColumnGroupOpened(o.getProvidedColumnGroup(),a,"uiColumnExpanded")}}}refreshAnnouncement(){let e;const{gos:t}=this;us(t)&&(e=this.getLocaleTextFunc()("ariaColumnGroupCellSelection","Press Enter to toggle selection for all visible cells in this column group")),this.ariaAnnouncement=e}announceAriaDescription(){const{beans:e,eGui:t,ariaAnnouncement:o}=this;!o||!t.contains(ve(e))||e.ariaAnnounce?.announceValue(o,"columnHeader")}setDragSource(e){!this.isAlive()||this.isSuppressMoving()||(this.removeDragSource(),e&&(this.dragSource=this.beans.colMoves?.setDragSourceForHeader(e,this.column,this.displayName)??null))}isSuppressMoving(){return this.gos.get("suppressMovableColumns")||this.column.getLeafColumns().some(e=>e.getColDef().suppressMovable||e.getColDef().lockPosition)}destroy(){this.tooltipFeature=this.destroyBean(this.tooltipFeature),super.destroy()}};function eb(e,t,o){e.colGroupSvc?.setColumnGroupOpened(t,o,"api")}function tb(e,t,o){return e.colGroupSvc?.getColumnGroup(t,o)??null}function ob(e,t){return e.colGroupSvc?.getProvidedColGroup(t)??null}function sb(e,t,o){return e.colNames.getDisplayNameForColumnGroup(t,o)||""}function ib(e){return e.colGroupSvc?.getColumnGroupState()??[]}function nb(e,t){e.colGroupSvc?.setColumnGroupState(t,"api")}function rb(e){e.colGroupSvc?.resetColumnGroupState("api")}function ab(e){return e.visibleCols.treeLeft}function lb(e){return e.visibleCols.treeCenter}function cb(e){return e.visibleCols.treeRight}function db(e){return e.visibleCols.getAllTrees()}var ch=class{constructor(){this.existingIds={}}getInstanceIdForKey(e){const t=this.existingIds[e];let o;return typeof t!="number"?o=0:o=t+1,this.existingIds[e]=o,o}};function ub(e,t){for(let o=0;o<t.length;o++){const s=e.indexOf(t[o]);s>=0&&(e[s]=e[e.length-1],e.pop())}}var hb=class extends x{constructor(){super(...arguments),this.beanName="visibleCols",this.colsAndGroupsMap={},this.leftCols=[],this.rightCols=[],this.centerCols=[],this.allCols=[],this.headerGroupRowCount=0,this.bodyWidth=0,this.leftWidth=0,this.rightWidth=0,this.isBodyWidthDirty=!0}refresh(e,t=!1){const{colFlex:o,colModel:s,colGroupSvc:i,colViewport:n,selectionColSvc:r}=this.beans;t||this.buildTrees(s,i),i?.updateOpenClosedVisibility(),this.leftCols=rr(this.treeLeft),this.centerCols=rr(this.treeCenter),this.rightCols=rr(this.treeRight),r?.refreshVisibility(this.leftCols,this.centerCols,this.rightCols),this.joinColsAriaOrder(s),this.joinCols(),this.headerGroupRowCount=this.getHeaderRowCount(),this.setLeftValues(e),this.autoHeightCols=this.allCols.filter(a=>a.isAutoHeight()),o?.refreshFlexedColumns(),this.updateBodyWidths(),this.setFirstRightAndLastLeftPinned(s,this.leftCols,this.rightCols,e),n.checkViewportColumns(!1),this.eventSvc.dispatchEvent({type:"displayedColumnsChanged",source:e})}getHeaderRowCount(){if(!this.gos.get("hidePaddedHeaderRows"))return this.beans.colModel.cols.treeDepth;let e=0;for(const t of this.allCols){let o=t.getParent();for(;o;){if(!o.isPadding()){const s=o.getProvidedColumnGroup().getLevel()+1;s>e&&(e=s);break}o=o.getParent()}}return e}updateBodyWidths(){const e=Ht(this.centerCols),t=Ht(this.leftCols),o=Ht(this.rightCols);this.isBodyWidthDirty=this.bodyWidth!==e,(this.bodyWidth!==e||this.leftWidth!==t||this.rightWidth!==o)&&(this.bodyWidth=e,this.leftWidth=t,this.rightWidth=o,this.eventSvc.dispatchEvent({type:"columnContainerWidthChanged"}),this.eventSvc.dispatchEvent({type:"displayedColumnsWidthChanged"}))}setLeftValues(e){this.setLeftValuesOfCols(e),this.setLeftValuesOfGroups()}setFirstRightAndLastLeftPinned(e,t,o,s){let i,n;this.gos.get("enableRtl")?(i=t?t[0]:null,n=o?he(o):null):(i=t?he(t):null,n=o?o[0]:null);for(const r of e.getCols())r.setLastLeftPinned(r===i,s),r.setFirstRightPinned(r===n,s)}buildTrees(e,t){const o=e.getColsToShow(),s=o.filter(l=>l.getPinned()=="left"),i=o.filter(l=>l.getPinned()=="right"),n=o.filter(l=>l.getPinned()!="left"&&l.getPinned()!="right"),r=new ch,a=l=>t?t.createColumnGroups(l):l.columns;this.treeLeft=a({columns:s,idCreator:r,pinned:"left",oldDisplayedGroups:this.treeLeft}),this.treeRight=a({columns:i,idCreator:r,pinned:"right",oldDisplayedGroups:this.treeRight}),this.treeCenter=a({columns:n,idCreator:r,pinned:null,oldDisplayedGroups:this.treeCenter}),this.updateColsAndGroupsMap()}clear(){this.leftCols=[],this.rightCols=[],this.centerCols=[],this.allCols=[],this.ariaOrderColumns=[]}joinColsAriaOrder(e){const t=e.getCols(),o=[],s=[],i=[];for(const n of t){const r=n.getPinned();r?r===!0||r==="left"?o.push(n):i.push(n):s.push(n)}this.ariaOrderColumns=o.concat(s).concat(i)}getAriaColIndex(e){let t;return Fe(e)?t=e.getLeafColumns()[0]:t=e,this.ariaOrderColumns.indexOf(t)+1}setLeftValuesOfGroups(){for(const e of[this.treeLeft,this.treeRight,this.treeCenter])for(const t of e)Fe(t)&&t.checkLeft()}setLeftValuesOfCols(e){const{colModel:t}=this.beans;if(!t.getColDefCols())return;const s=t.getCols().slice(0),i=this.gos.get("enableRtl");for(const n of[this.leftCols,this.rightCols,this.centerCols]){if(i){let r=Ht(n);for(const a of n)r-=a.getActualWidth(),a.setLeft(r,e)}else{let r=0;for(const a of n)a.setLeft(r,e),r+=a.getActualWidth()}ub(s,n)}for(const n of s)n.setLeft(null,e)}joinCols(){this.gos.get("enableRtl")?this.allCols=this.rightCols.concat(this.centerCols).concat(this.leftCols):this.allCols=this.leftCols.concat(this.centerCols).concat(this.rightCols)}getAllTrees(){return this.treeLeft&&this.treeRight&&this.treeCenter?this.treeLeft.concat(this.treeCenter).concat(this.treeRight):null}isColDisplayed(e){return this.allCols.indexOf(e)>=0}getLeftColsForRow(e){const{leftCols:t,beans:{colModel:o}}=this;return o.colSpanActive?this.getColsForRow(e,t):t}getRightColsForRow(e){const{rightCols:t,beans:{colModel:o}}=this;return o.colSpanActive?this.getColsForRow(e,t):t}getColsForRow(e,t,o,s){const i=[];let n=null;for(let r=0;r<t.length;r++){const a=t[r],l=t.length-r,c=Math.min(a.getColSpan(e),l),d=[a];if(c>1){const h=c-1;for(let g=1;g<=h;g++)d.push(t[r+g]);r+=h}let u;if(o){u=!1;for(const h of d)o(h)&&(u=!0)}else u=!0;u&&(i.length===0&&n&&s&&s(a)&&i.push(n),i.push(a)),n=a}return i}getContainerWidth(e){switch(e){case"left":return this.leftWidth;case"right":return this.rightWidth;default:return this.bodyWidth}}getColBefore(e){const t=this.allCols,o=t.indexOf(e);return o>0?t[o-1]:null}isPinningLeft(){return this.leftCols.length>0}isPinningRight(){return this.rightCols.length>0}updateColsAndGroupsMap(){this.colsAndGroupsMap={};const e=t=>{this.colsAndGroupsMap[t.getUniqueId()]=t};Io(this.treeCenter,!1,e),Io(this.treeLeft,!1,e),Io(this.treeRight,!1,e)}isVisible(e){return this.colsAndGroupsMap[e.getUniqueId()]===e}getFirstColumn(){const e=this.gos.get("enableRtl"),t=["leftCols","centerCols","rightCols"];e&&t.reverse();for(let o=0;o<t.length;o++){const s=this[t[o]];if(s.length)return e?he(s):s[0]}return null}getColAfter(e){const t=this.allCols,o=t.indexOf(e);return o<t.length-1?t[o+1]:null}getColsLeftWidth(){return Ht(this.leftCols)}getDisplayedColumnsRightWidth(){return Ht(this.rightCols)}isColAtEdge(e,t){const o=this.allCols;if(!o.length)return!1;const s=t==="first";let i;if(Fe(e)){const n=e.getDisplayedLeafColumns();if(!n.length)return!1;i=s?n[0]:he(n)}else i=e;return(s?o[0]:he(o))===i}};function Io(e,t,o){if(e)for(let s=0;s<e.length;s++){const i=e[s];if(Fe(i)){const n=t?i.getDisplayedChildren():i.getChildren();Io(n,t,o)}o(i)}}function rr(e){const t=[];return Io(e,!0,o=>{lo(o)&&t.push(o)}),t}var gb=class extends x{constructor(){super(...arguments),this.beanName="colGroupSvc"}getColumnGroupState(){const e=[],t=this.beans.colModel.getColTree();return Wt(null,t,o=>{Ve(o)&&e.push({groupId:o.getGroupId(),open:o.isExpanded()})}),e}resetColumnGroupState(e){const t=this.beans.colModel.getColDefColTree();if(!t)return;const o=[];Wt(null,t,s=>{if(Ve(s)){const i=s.getColGroupDef(),n={groupId:s.getGroupId(),open:i?i.openByDefault:void 0};o.push(n)}}),this.setColumnGroupState(o,e)}setColumnGroupState(e,t){const{colModel:o,colAnimation:s,visibleCols:i,eventSvc:n}=this.beans;if(!o.getColTree().length)return;s?.start();const a=[];for(const l of e){const c=l.groupId,d=l.open,u=this.getProvidedColGroup(c);u&&u.isExpanded()!==d&&(u.setExpanded(d),a.push(u))}i.refresh(t,!0),a.length&&n.dispatchEvent({type:"columnGroupOpened",columnGroup:a.length===1?a[0]:void 0,columnGroups:a}),s?.finish()}setColumnGroupOpened(e,t,o){let s;Ve(e)?s=e.getId():s=e||"",this.setColumnGroupState([{groupId:s,open:t}],o)}getProvidedColGroup(e){let t=null;return Wt(null,this.beans.colModel.getColTree(),o=>{Ve(o)&&o.getId()===e&&(t=o)}),t}getGroupAtDirection(e,t){const o=e.getProvidedColumnGroup().getLevel()+e.getPaddingLevel(),s=e.getDisplayedLeafColumns(),i=t==="After"?he(s):s[0],n=`getCol${t}`;for(;;){const r=this.beans.visibleCols[n](i);if(!r)return null;const a=this.getColGroupAtLevel(r,o);if(a!==e)return a}}getColGroupAtLevel(e,t){let o=e.getParent(),s,i;for(;s=o.getProvidedColumnGroup().getLevel(),i=o.getPaddingLevel(),!(s+i<=t);)o=o.getParent();return o}updateOpenClosedVisibility(){const e=this.beans.visibleCols.getAllTrees();Io(e,!1,t=>{Fe(t)&&t.calculateDisplayedColumns()})}getColumnGroup(e,t){if(!e)return null;if(Fe(e))return e;const o=this.beans.visibleCols.getAllTrees(),s=typeof t=="number";let i=null;return Io(o,!1,n=>{if(Fe(n)){const r=n;let a;s?a=e===r.getGroupId()&&t===r.getPartId():a=e===r.getGroupId(),a&&(i=r)}}),i}createColumnGroups(e){const{columns:t,idCreator:o,pinned:s,oldDisplayedGroups:i,isStandaloneStructure:n}=e,r=this.mapOldGroupsById(i),a=[];let l=t;for(;l.length;){const c=l;l=[];let d=0;const u=h=>{const g=d;d=h;const f=c[g],C=(Fe(f)?f.getProvidedColumnGroup():f).getOriginalParent();if(C==null){for(let w=g;w<h;w++)a.push(c[w]);return}const v=this.createColumnGroup(C,o,r,s,n);for(let w=g;w<h;w++)v.addChild(c[w]);l.push(v)};for(let h=1;h<c.length;h++){const g=c[h],m=(Fe(g)?g.getProvidedColumnGroup():g).getOriginalParent(),C=c[d],w=(Fe(C)?C.getProvidedColumnGroup():C).getOriginalParent();m!==w&&u(h)}d<c.length&&u(c.length)}return n||this.setupParentsIntoCols(a,null),a}createProvidedColumnGroup(e,t,o,s,i,n,r){const a=i.getUniqueKey(t.groupId||null,null),l=Gl(this.beans,t,a),c=new Li(l,a,!1,o);this.createBean(c);const d=this.findExistingGroup(t,n);d&&n.splice(d.idx,1);const u=d?.group;u&&c.setExpanded(u.isExpanded());const h=du(this.beans,l.children,o+1,e,s,i,n,r);return c.setChildren(h),c}balanceColumnTree(e,t,o,s){const i=[];for(let n=0;n<e.length;n++){const r=e[n];if(Ve(r)){const a=r,l=this.balanceColumnTree(a.getChildren(),t+1,o,s);a.setChildren(l),i.push(a)}else{let a,l;for(let c=t;c<o;c++){const d=s.getUniqueKey(null,null),u=Gl(this.beans,null,d),h=new Li(u,d,!0,c);this.createBean(h),l&&l.setChildren([h]),l=h,a||(a=l)}if(a&&l)if(i.push(a),e.some(d=>Ve(d))){l.setChildren([r]);continue}else{l.setChildren(e);break}i.push(r)}}return i}findDepth(e){let t=0,o=e;for(;o?.[0]&&Ve(o[0]);)t++,o=o[0].getChildren();return t}findMaxDepth(e,t){let o=t;for(let s=0;s<e.length;s++){const i=e[s];if(Ve(i)){const n=i,r=this.findMaxDepth(n.getChildren(),t+1);o<r&&(o=r)}}return o}balanceTreeForAutoCols(e,t){const o=[];for(const s of e){let i=s;for(let n=t-1;n>=0;n--){const r=new Li(null,`FAKE_PATH_${s.getId()}_${n}`,!0,n);this.createBean(r),r.setChildren([i]),i.originalParent=r,i=r}t===0&&(s.originalParent=null),o.push(i)}return o}findExistingGroup(e,t){if(e.groupId!=null)for(let s=0;s<t.length;s++){const i=t[s];if(i.getColGroupDef()&&i.getId()===e.groupId)return{idx:s,group:i}}}createColumnGroup(e,t,o,s,i){const n=e.getGroupId(),r=t.getInstanceIdForKey(n),a=pu(n,r);let l=o[a];return l&&l.getProvidedColumnGroup()!==e&&(l=null),L(l)?l.reset():(l=new oi(e,n,r,s),i||this.createBean(l)),l}mapOldGroupsById(e){const t={},o=s=>{for(const i of s)if(Fe(i)){const n=i;t[i.getUniqueId()]=n,o(n.getChildren())}};return e&&o(e),t}setupParentsIntoCols(e,t){for(const o of e??[])if(o.parent!==t&&(this.beans.colViewport.colsWithinViewportHash=""),o.parent=t,Fe(o)){const s=o;this.setupParentsIntoCols(s.getChildren(),s)}}},pb={moduleName:"ColumnGroup",version:I,dynamicBeans:{headerGroupCellCtrl:Xw},beans:[gb],apiFunctions:{getAllDisplayedColumnGroups:db,getCenterDisplayedColumnGroups:lb,getColumnGroup:tb,getColumnGroupState:ib,getDisplayNameForColumnGroup:sb,getLeftDisplayedColumnGroups:ab,getProvidedColumnGroup:ob,getRightDisplayedColumnGroups:cb,resetColumnGroupState:rb,setColumnGroupOpened:eb,setColumnGroupState:nb}};function Ct(e,t,o){const{colModel:s,rowGroupColsSvc:i,pivotColsSvc:n,autoColSvc:r,selectionColSvc:a,colAnimation:l,visibleCols:c,pivotResultCols:d,environment:u,valueColsSvc:h,eventSvc:g,gos:f}=e,m=s.getColDefCols()??[],C=a?.getColumns();if(!m.length&&!C?.length)return!1;if(t?.state&&!t.state.forEach)return D(32),!1;const v=(S,F,E,G,k)=>{if(!S)return;const O=hm(F,t.defaultState),P=O("flex").value1,A=O("sort").value1,M=O("sortType").value1,J=io(A)||Da(M),T=Ut(M),j=yn(A),se=J?{type:T,direction:j}:void 0;if(uu(e,S,O("hide").value1,se,O("sortIndex").value1,O("pinned").value1,P,o),P==null){const $=O("width").value1;if($!=null){const Z=S.getColDef().minWidth??u.getDefaultColumnMinWidth();Z!=null&&$>=Z&&S.setActualWidth($,o)}}k||!S.isPrimary()||(h?.syncColumnWithState(S,o,O),i?.syncColumnWithState(S,o,O,E),n?.syncColumnWithState(S,o,O,G))},w=(S,F,E)=>{const G=dh(e,o),k=F.slice(),O={},P={},A=[],M=[],J=[];let T=0;const j=i?.columns.slice()??[],se=n?.columns.slice()??[];for(const z of S){const te=z.colId;if(te.startsWith(oo)){A.push(z),J.push(z);continue}if(go(te)){M.push(z),J.push(z);continue}const oe=E(te);oe?(v(oe,z,O,P,!1),At(k,oe)):(J.push(z),T+=1)}const $=z=>v(z,null,O,P,!1);k.forEach($),i?.sortColumns(uc.bind(i,O,j)),n?.sortColumns(uc.bind(n,P,se)),s.refreshCols(!1,o);const Z=(z,te,q=[])=>{for(const oe of te){const de=z(oe.colId);At(q,de),v(de,oe,null,null,!0)}q.forEach($)};return Z(z=>r?.getColumn(z)??null,A,r?.getColumns()?.slice()),Z(z=>a?.getColumn(z)??null,M,a?.getColumns()?.slice()),mb(t,s,f),c.refresh(o),g.dispatchEvent({type:"columnEverythingChanged",source:o}),G(),{unmatchedAndAutoStates:J,unmatchedCount:T}};l?.start();let{unmatchedAndAutoStates:b,unmatchedCount:y}=w(t.state||[],m,S=>s.getColDefCol(S));if(b.length>0||L(t.defaultState)){const S=d?.getPivotResultCols()?.list??[];y=w(b,S,F=>d?.getPivotResultCol(F)??null).unmatchedCount}return l?.finish(),y===0}function fb(e,t){const{colModel:o,autoColSvc:s,selectionColSvc:i,eventSvc:n,gos:r}=e,a=o.getColDefCols();if(!a?.length)return;const l=o.getColDefColTree(),c=hu(l),d=[];let u=1e3,h=1e3;const g=w=>{const b=uh(w);we(b.rowGroupIndex)&&b.rowGroup&&(b.rowGroupIndex=u++),we(b.pivotIndex)&&b.pivot&&(b.pivotIndex=h++),d.push(b)};s?.getColumns()?.forEach(g),i?.getColumns()?.forEach(g),c?.forEach(g),Ct(e,{state:d},t);const f=s?.getColumns()??[],v=[...i?.getColumns()??[],...f,...a].map(w=>({colId:w.colId}));Ct(e,{state:v,applyOrder:!0},t),n.dispatchEvent(K(r,{type:"columnsReset",source:t}))}function dh(e,t){const{rowGroupColsSvc:o,pivotColsSvc:s,valueColsSvc:i,colModel:n,sortSvc:r,eventSvc:a}=e,l={rowGroupColumns:o?.columns.slice()??[],pivotColumns:s?.columns.slice()??[],valueColumns:i?.columns.slice()??[]},c=cn(e),d={};for(const u of c)d[u.colId]=u;return()=>{const u=(F,E,G,k)=>{const O=E.map(k),P=G.map(k);if(ho(O,P))return;const M=new Set(E);for(const T of G)M.delete(T)||M.add(T);const J=[...M];a.dispatchEvent({type:F,columns:J,column:J.length===1?J[0]:null,source:t})},h=F=>{const E=[];return n.forAllCols(G=>{const k=d[G.getColId()];k&&F(k,G)&&E.push(G)}),E},g=F=>F.getColId();u("columnRowGroupChanged",l.rowGroupColumns,o?.columns??[],g),u("columnPivotChanged",l.pivotColumns,s?.columns??[],g);const m=h((F,E)=>{const G=F.aggFunc!=null,k=G!=E.isValueActive(),O=G&&F.aggFunc!=E.getAggFunc();return k||O});m.length>0&&Kw(a,"columnValueChanged",m,t),Ss(a,h((F,E)=>F.width!=E.getActualWidth()),!0,t),lh(a,h((F,E)=>F.pinned!=E.getPinned()),t),$w(a,h((F,E)=>F.hide==E.isVisible()),t);const y=h((F,E)=>!ki(E.getSortDef(),{type:Ut(F.sortType),direction:yn(F.sort)})||F.sortIndex!=E.getSortIndex());y.length>0&&r?.dispatchSortChangedEvents(t,y);const S=cn(e);vb(c,S,t,n,a)}}function cn(e){const{colModel:t,rowGroupColsSvc:o,pivotColsSvc:s}=e,i=t.getColDefCols();if(we(i)||!t.isAlive())return[];const n=o?.columns,r=s?.columns,a=[],l=d=>{const u=d.isRowGroupActive()&&n?n.indexOf(d):null,h=d.isPivotActive()&&r?r.indexOf(d):null,g=d.isValueActive()?d.getAggFunc():null,f=d.getSortIndex()!=null?d.getSortIndex():null;a.push({colId:d.getColId(),width:d.getActualWidth(),hide:!d.isVisible(),pinned:d.getPinned(),sort:d.getSort(),sortType:d.getSortDef()?.type,sortIndex:f,aggFunc:g,rowGroup:d.isRowGroupActive(),rowGroupIndex:u,pivot:d.isPivotActive(),pivotIndex:h,flex:d.getFlex()??null})};t.forAllCols(d=>l(d));const c=new Map(t.getCols().map((d,u)=>[d.getColId(),u]));return a.sort((d,u)=>{const h=c.has(d.colId)?c.get(d.colId):-1,g=c.has(u.colId)?c.get(u.colId):-1;return h-g}),a}function uh(e){const t=(C,v)=>C??v??null,o=e.getColDef(),s=ct(t(o.sort,o.initialSort)),i=s.direction,n=s.type,r=t(o.sortIndex,o.initialSortIndex),a=t(o.hide,o.initialHide),l=t(o.pinned,o.initialPinned),c=t(o.width,o.initialWidth),d=t(o.flex,o.initialFlex);let u=t(o.rowGroupIndex,o.initialRowGroupIndex),h=t(o.rowGroup,o.initialRowGroup);u==null&&!h&&(u=null,h=null);let g=t(o.pivotIndex,o.initialPivotIndex),f=t(o.pivot,o.initialPivot);g==null&&!f&&(g=null,f=null);const m=t(o.aggFunc,o.initialAggFunc);return{colId:e.getColId(),sort:i,sortType:n,sortIndex:r,hide:a,pinned:l,width:c,flex:d,rowGroup:h,rowGroupIndex:u,pivot:f,pivotIndex:g,aggFunc:m}}function mb(e,t,o){if(!e.applyOrder||!e.state)return;const s=[];for(const i of e.state)i.colId!=null&&s.push(i.colId);Cb(t.cols,s,t,o)}function Cb(e,t,o,s){if(e==null)return;let i=[];const n={};for(const a of t){if(n[a])continue;const l=e.map[a];l&&(i.push(l),n[a]=!0)}let r=0;for(const a of e.list){const l=a.getColId();if(n[l]!=null)continue;l.startsWith(oo)?i.splice(r++,0,a):i.push(a)}if(i=ih(i,s),!nh(i,o.getColTree())){D(39);return}e.list=i}function vb(e,t,o,s,i){const n={};for(const d of t)n[d.colId]=d;const r={};for(const d of e)n[d.colId]&&(r[d.colId]=!0);const a=e.filter(d=>r[d.colId]),l=t.filter(d=>r[d.colId]),c=[];l.forEach((d,u)=>{const h=a?.[u];if(h&&h.colId!==d.colId){const g=s.getCol(h.colId);g&&c.push(g)}}),c.length&&i.dispatchEvent({type:"columnMoved",columns:c,column:c.length===1?c[0]:null,finished:!0,source:o})}var uc=(e,t,o,s)=>{const i=e[o.getId()],n=e[s.getId()],r=i!=null,a=n!=null;if(r&&a)return i-n;if(r)return-1;if(a)return 1;const l=t.indexOf(o),c=t.indexOf(s),d=l>=0,u=c>=0;return d&&u?l-c:d?-1:1},wb=class extends x{constructor(){super(...arguments),this.beanName="colModel",this.pivotMode=!1,this.ready=!1,this.changeEventsDispatching=!1}postConstruct(){this.pivotMode=this.gos.get("pivotMode"),this.addManagedPropertyListeners(["groupDisplayType","treeData","treeDataDisplayType","groupHideOpenParents","groupHideColumnsUntilExpanded","rowNumbers","hidePaddedHeaderRows"],e=>this.refreshAll(gs(e.source))),this.addManagedPropertyListeners(["defaultColDef","defaultColGroupDef","columnTypes","suppressFieldDotNotation"],this.recreateColumnDefs.bind(this)),this.addManagedPropertyListener("pivotMode",e=>this.setPivotMode(this.gos.get("pivotMode"),gs(e.source)))}createColsFromColDefs(e){const{beans:t}=this,{valueCache:o,colAutosize:s,rowGroupColsSvc:i,pivotColsSvc:n,valueColsSvc:r,visibleCols:a,eventSvc:l,groupHierarchyColSvc:c}=t,d=this.colDefs?dh(t,e):void 0;o?.expire();const u=this.colDefCols?.list,h=this.colDefCols?.tree,g=tm(t,this.colDefs,!0,h,e);en(t,this.colDefCols?.tree,g.columnTree);const f=g.columnTree,m=g.treeDepth,C=hu(f),v={};for(const w of C)v[w.getId()]=w;this.colDefCols={tree:f,treeDepth:m,list:C,map:v},this.createColumnsForService([c],this.colDefCols,e),i?.extractCols(e,u),n?.extractCols(e,u),r?.extractCols(e,u),this.ready=!0,this.changeEventsDispatching=!0,this.refreshCols(!0,e),this.changeEventsDispatching=!1,a.refresh(e),l.dispatchEvent({type:"columnEverythingChanged",source:e}),d&&(this.changeEventsDispatching=!0,d(),this.changeEventsDispatching=!1),l.dispatchEvent({type:"newColumnsLoaded",source:e}),e==="gridInitializing"&&s?.applyAutosizeStrategy()}refreshCols(e,t){if(!this.colDefCols)return;const o=this.cols?.tree;this.saveColOrder();const{autoColSvc:s,selectionColSvc:i,rowNumbersSvc:n,quickFilter:r,pivotResultCols:a,showRowGroupCols:l,rowAutoHeight:c,visibleCols:d,colViewport:u,eventSvc:h,formula:g}=this.beans,f=this.selectCols(a,this.colDefCols);g?.setFormulasActive(f),this.createColumnsForService([s,i,n],f,t);const m=Mf(this.gos,this.showingPivotResult);(!e||m)&&this.restoreColOrder(f),this.positionLockedCols(f),l?.refresh(),r?.refreshCols(),this.setColSpanActive(),c?.setAutoHeightActive(f),d.clear(),u.clear(),ho(o,this.cols.tree)||h.dispatchEvent({type:"gridColumnsChanged"})}createColumnsForService(e,t,o){for(const s of e)s&&(s.createColumns(t,i=>{this.lastOrder=i(this.lastOrder),this.lastPivotOrder=i(this.lastPivotOrder)},o),s.addColumns(t))}selectCols(e,t){const o=e?.getPivotResultCols()??null;this.showingPivotResult=o!=null;const{map:s,list:i,tree:n,treeDepth:r}=o??t;return this.cols={list:i.slice(),map:{...s},tree:n.slice(),treeDepth:r},o&&(o.list.some(l=>this.cols?.map[l.getColId()]!==void 0)||(this.lastPivotOrder=null)),this.cols}getColsToShow(){if(!this.cols)return[];const{beans:e,showingPivotResult:t,cols:o}=this,{valueColsSvc:s,selectionColSvc:i,gos:n}=e,r=this.isPivotMode()&&!t,a=i?.isSelectionColumnEnabled(),l=Tf(e),c=s?.columns,d=kf(n);return o.list.filter(h=>{const g=Ia(h);return r?c?.includes(h)||g&&(!d||h.isVisible())||a&&go(h)||l&&Ue(h):g&&!d||h.isVisible()})}refreshAll(e){this.ready&&(this.refreshCols(!1,e),this.beans.visibleCols.refresh(e))}setColsVisible(e,t=!1,o){Ct(this.beans,{state:e.map(s=>({colId:typeof s=="string"?s:s.getColId(),hide:!t}))},o)}restoreColOrder(e){const t=this.showingPivotResult?this.lastPivotOrder:this.lastOrder;if(!t)return;const o=t.filter(u=>e.map[u.getId()]!=null);if(o.length===0)return;if(o.length===e.list.length){e.list=o;return}const s=u=>{const h=u.getOriginalParent();return h?h.getChildren().length>1?!0:s(h):!1};if(!o.some(u=>s(u))){const u=new Set(o);for(const h of e.list)u.has(h)||o.push(h);e.list=o;return}const i=new Map;for(let u=0;u<o.length;u++){const h=o[u];i.set(h,u)}const n=e.list.filter(u=>!i.has(u));if(n.length===0){e.list=o;return}const r=(u,h)=>{const g=h?h.getOriginalParent():u.getOriginalParent();if(!g)return null;let f=null,m=null;for(const C of g.getChildren())if(!(C===h||C===u)){if(C instanceof Uo){const v=i.get(C);if(v==null)continue;(f==null||f<v)&&(f=v,m=C);continue}C.forEachLeafColumn(v=>{const w=i.get(v);w!=null&&(f==null||f<w)&&(f=w,m=v)})}return m??r(u,g)},a=[],l=new Map;for(const u of n){const h=r(u,null);if(h==null){a.push(u);continue}const g=l.get(h);g===void 0?l.set(h,u):Array.isArray(g)?g.push(u):l.set(h,[g,u])}const c=new Array(e.list.length);let d=c.length-1;for(let u=a.length-1;u>=0;u--)c[d--]=a[u];for(let u=o.length-1;u>=0;u--){const h=o[u],g=l.get(h);if(g)if(Array.isArray(g))for(let f=g.length-1;f>=0;f--){const m=g[f];c[d--]=m}else c[d--]=g;c[d--]=h}e.list=c}positionLockedCols(e){e.list=ih(e.list,this.gos)}saveColOrder(){this.showingPivotResult?this.lastPivotOrder=this.cols?.list??null:this.lastOrder=this.cols?.list??null}getColumnDefs(e){return this.colDefCols&&this.beans.colDefFactory?.getColumnDefs(this.colDefCols.list,this.showingPivotResult,this.lastOrder,this.cols?.list??[],e)}setColSpanActive(){this.colSpanActive=!!this.cols?.list.some(e=>e.getColDef().colSpan!=null)}isPivotMode(){return this.pivotMode}setPivotMode(e,t){if(e===this.pivotMode||(this.pivotMode=e,!this.ready))return;this.refreshCols(!1,t);const{visibleCols:o,eventSvc:s}=this.beans;o.refresh(t),s.dispatchEvent({type:"columnPivotModeChanged"})}isPivotActive(){const e=this.beans.pivotColsSvc?.columns;return this.pivotMode&&!!e?.length}recreateColumnDefs(e){if(!this.cols)return;this.beans.autoColSvc?.updateColumns(e);const t=gs(e.source);this.createColsFromColDefs(t)}setColumnDefs(e,t){this.colDefs=e,this.createColsFromColDefs(t)}destroy(){en(this.beans,this.colDefCols?.tree),super.destroy()}getColTree(){return this.cols?.tree??[]}getColDefColTree(){return this.colDefCols?.tree??[]}getColDefCols(){return this.colDefCols?.list??null}getCols(){return this.cols?.list??[]}forAllCols(e){const{pivotResultCols:t,autoColSvc:o,selectionColSvc:s,groupHierarchyColSvc:i}=this.beans;Ts(this.colDefCols?.list,e)||Ts(o?.columns?.list,e)||Ts(s?.columns?.list,e)||Ts(i?.columns?.list,e)||Ts(t?.getPivotResultCols()?.list,e)}getColsForKeys(e){return e?e.map(t=>this.getCol(t)).filter(t=>t!=null):[]}getColDefCol(e){return this.colDefCols?.list?this.getColFromCollection(e,this.colDefCols):null}getCol(e){return e==null?null:this.getColFromCollection(e,this.cols)}getColById(e){return this.cols?.map[e]??null}getColFromCollection(e,t){if(t==null)return null;const{map:o,list:s}=t;if(typeof e=="string"&&o[e])return o[e];for(let a=0;a<s.length;a++)if(Ws(s[a],e))return s[a];const{autoColSvc:i,selectionColSvc:n,groupHierarchyColSvc:r}=this.beans;return i?.getColumn(e)??n?.getColumn(e)??r?.getColumn(e)??null}},bb=".ag-label{white-space:nowrap}:where(.ag-ltr) .ag-label{margin-right:var(--ag-spacing)}:where(.ag-rtl) .ag-label{margin-left:var(--ag-spacing)}:where(.ag-label-align-right) .ag-label{order:1}:where(.ag-ltr) :where(.ag-label-align-right) .ag-label{margin-left:var(--ag-spacing)}:where(.ag-rtl) :where(.ag-label-align-right) .ag-label{margin-right:var(--ag-spacing)}:where(.ag-label-align-right){.ag-label,.ag-wrapper{flex:none}}.ag-label-align-top{align-items:flex-start;flex-direction:column}:where(.ag-label-align-top){.ag-label,.ag-wrapper{align-self:stretch}}.ag-label-ellipsis{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:where(.ag-label-align-top) .ag-label{margin-bottom:calc(var(--ag-spacing)*.5)}",Sb=class extends Ps{constructor(e,t,o){super(t,o),this.labelSeparator="",this.labelAlignment="left",this.disabled=!1,this.label="",this.config=e||{},this.registerCSS(bb)}postConstruct(){this.addCss("ag-labeled"),this.eLabel.classList.add("ag-label");const{labelSeparator:e,label:t,labelWidth:o,labelAlignment:s,disabled:i,labelEllipsis:n}=this.config;i!=null&&this.setDisabled(i),e!=null&&this.setLabelSeparator(e),t!=null&&this.setLabel(t),o!=null&&this.setLabelWidth(o),n!=null&&this.setLabelEllipsis(n),this.setLabelAlignment(s||this.labelAlignment),this.refreshLabel()}refreshLabel(){const{label:e,eLabel:t}=this;Xe(t),typeof e=="string"?t.innerText=e+this.labelSeparator:e&&t.appendChild(e),e===""?(fe(t,!1),ko(t,"presentation")):(fe(t,!0),ko(t,null))}setLabelSeparator(e){return this.labelSeparator===e?this:(this.labelSeparator=e,this.label!=null&&this.refreshLabel(),this)}getLabelId(){const e=this.eLabel;return e.id=e.id||`ag-${this.getCompId()}-label`,e.id}getLabel(){return this.label}setLabel(e){return this.label===e?this:(this.label=e,this.refreshLabel(),this)}setLabelAlignment(e){const o=this.getGui().classList;return o.toggle("ag-label-align-left",e==="left"),o.toggle("ag-label-align-right",e==="right"),o.toggle("ag-label-align-top",e==="top"),this}setLabelEllipsis(e){return this.eLabel.classList.toggle("ag-label-ellipsis",e),this}setLabelWidth(e){return this.label==null?this:(Ki(this.eLabel,e),this)}setDisabled(e){e=!!e;const t=this.getGui();return Qs(t,e),t.classList.toggle("ag-disabled",e),this.disabled=e,this}isDisabled(){return!!this.disabled}},hh=class extends Sb{constructor(e,t,o,s){super(e,t,o),this.className=s}postConstruct(){super.postConstruct();const{width:e,value:t,onValueChange:o,ariaLabel:s}=this.config;e!=null&&this.setWidth(e),t!=null&&this.setValue(t),o!=null&&this.onValueChange(o),s!=null&&this.setAriaLabel(s),this.className&&this.addCss(this.className),this.refreshAriaLabelledBy()}setLabel(e){return super.setLabel(e),this.refreshAriaLabelledBy(),this}refreshAriaLabelledBy(){const e=this.getAriaElement(),t=this.getLabelId(),o=this.getLabel();o==null||o==""||Tp(e)!==null?Ys(e,""):Ys(e,t??"")}setAriaLabel(e){return Cs(this.getAriaElement(),e),this.refreshAriaLabelledBy(),this}onValueChange(e){return this.addManagedListeners(this,{fieldValueChanged:()=>e(this.getValue())}),this}getWidth(){return this.getGui().clientWidth}setWidth(e){return Tt(this.getGui(),e),this}getPreviousValue(){return this.previousValue}getValue(){return this.value}setValue(e,t){return this.value===e?this:(this.previousValue=this.value,this.value=e,t||this.dispatchLocalEvent({type:"fieldValueChanged"}),this)}};function yb(e){return{tag:"div",role:"presentation",children:[{tag:"div",ref:"eLabel",cls:"ag-input-field-label"},{tag:"div",ref:"eWrapper",cls:"ag-wrapper ag-input-wrapper",role:"presentation",children:[{tag:e,ref:"eInput",cls:"ag-input-field-input"}]}]}}var Fo=class extends hh{constructor(e,t,o="text",s="input"){super(e,e?.template??yb(s),[],t),this.inputType=o,this.displayFieldTag=s,this.eLabel=W,this.eWrapper=W,this.eInput=W}postConstruct(){super.postConstruct(),this.setInputType(this.inputType);const{eLabel:e,eWrapper:t,eInput:o,className:s}=this;e.classList.add(`${s}-label`),t.classList.add(`${s}-input-wrapper`),o.classList.add(`${s}-input`),this.addCss("ag-input-field"),o.id=o.id||`ag-${this.getCompId()}-input`;const{inputName:i,inputWidth:n,inputPlaceholder:r,autoComplete:a,tabIndex:l}=this.config;i!=null&&this.setInputName(i),n!=null&&this.setInputWidth(n),r!=null&&this.setInputPlaceholder(r),a!=null&&this.setAutoComplete(a),this.addInputListeners(),this.activateTabIndex([o],l)}addInputListeners(){this.addManagedElementListeners(this.eInput,{input:e=>this.setValue(e.target.value)})}setInputType(e){this.displayFieldTag==="input"&&(this.inputType=e,Qe(this.eInput,"type",e))}getInputElement(){return this.eInput}getWrapperElement(){return this.eWrapper}setInputWidth(e){return Ki(this.eWrapper,e),this}setInputName(e){return this.getInputElement().setAttribute("name",e),this}getFocusableElement(){return this.eInput}setMaxLength(e){const t=this.eInput;return t.maxLength=e,this}setInputPlaceholder(e){return Qe(this.eInput,"placeholder",e),this}setInputAriaLabel(e){return Cs(this.eInput,e),this.refreshAriaLabelledBy(),this}setDisabled(e){return Qs(this.eInput,e),super.setDisabled(e)}setAutoComplete(e){if(e===!0)Qe(this.eInput,"autocomplete",null);else{const t=typeof e=="string"?e:"off";Qe(this.eInput,"autocomplete",t)}return this}},qa=class extends Fo{constructor(e,t="ag-checkbox",o="checkbox"){super(e,t,o),this.labelAlignment="right",this.selected=!1,this.readOnly=!1,this.passive=!1}postConstruct(){super.postConstruct();const{readOnly:e,passive:t,name:o}=this.config;typeof e=="boolean"&&this.setReadOnly(e),typeof t=="boolean"&&this.setPassive(t),o!=null&&this.setName(o)}addInputListeners(){this.addManagedElementListeners(this.eInput,{click:this.onCheckboxClick.bind(this)}),this.addManagedElementListeners(this.eLabel,{click:this.toggle.bind(this)})}getNextValue(){return this.selected===void 0?!0:!this.selected}setPassive(e){this.passive=e}isReadOnly(){return this.readOnly}setReadOnly(e){this.eWrapper.classList.toggle("ag-disabled",e),this.eInput.disabled=e,this.readOnly=e}setDisabled(e){return this.eWrapper.classList.toggle("ag-disabled",e),super.setDisabled(e)}toggle(){if(this.eInput.disabled)return;const e=this.isSelected(),t=this.getNextValue();this.passive?this.dispatchChange(t,e):this.setValue(t)}getValue(){return this.isSelected()}setValue(e,t){return this.refreshSelectedClass(e),this.setSelected(e,t),this}setName(e){const t=this.getInputElement();return t.name=e,this}isSelected(){return this.selected}setSelected(e,t){if(this.isSelected()===e)return;this.previousValue=this.isSelected(),e=this.selected=typeof e=="boolean"?e:void 0;const o=this.eInput;o.checked=e,o.indeterminate=e===void 0,t||this.dispatchChange(this.selected,this.previousValue)}dispatchChange(e,t,o){this.dispatchLocalEvent({type:"fieldValueChanged",selected:e,previousValue:t,event:o});const s=this.getInputElement();this.eventSvc.dispatchEvent({type:"checkboxChanged",id:s.id,name:s.name,selected:e,previousValue:t})}onCheckboxClick(e){if(this.passive||this.eInput.disabled)return;const t=this.isSelected(),o=this.selected=e.target.checked;this.refreshSelectedClass(o),this.dispatchChange(o,t,e)}refreshSelectedClass(e){const t=this.eWrapper.classList;t.toggle("ag-checked",e===!0),t.toggle("ag-indeterminate",e==null)}},ja={selector:"AG-CHECKBOX",component:qa},Rb=".ag-checkbox-cell{height:100%}",Fb={tag:"div",cls:"ag-cell-wrapper ag-checkbox-cell",role:"presentation",children:[{tag:"ag-checkbox",ref:"eCheckbox",role:"presentation"}]},Eb=class extends ye{constructor(){super(Fb,[ja]),this.eCheckbox=W,this.registerCSS(Rb)}init(e){this.refresh(e);const{eCheckbox:t,beans:o}=this,s=t.getInputElement();s.setAttribute("tabindex","-1"),Pd(s,"polite"),this.addManagedListeners(s,{click:i=>{if(Bo(i),t.isDisabled())return;const n=t.getValue();this.onCheckboxChanged(n)},dblclick:i=>{Bo(i)}}),this.addManagedElementListeners(e.eGridCell,{keydown:i=>{if(i.key===R.SPACE&&!t.isDisabled()){e.eGridCell===ve(o)&&t.toggle();const n=t.getValue();this.onCheckboxChanged(n),i.preventDefault()}}})}refresh(e){return this.params=e,this.updateCheckbox(e),!0}updateCheckbox(e){let t,o=!0;const{value:s,column:i,node:n}=e;if(n.group&&i)if(typeof s=="boolean")t=s;else{const u=i.getColId();u.startsWith(oo)?t=s==null||s===""?void 0:s==="true":n.aggData&&n.aggData[u]!==void 0||n.sourceRowIndex>=0?t=s??void 0:o=!1}else t=s??void 0;const{eCheckbox:r}=this;if(!o){r.setDisplayed(!1);return}r.setValue(t);const a=e.disabled??!i?.isCellEditable(n);r.setDisabled(a);const l=this.getLocaleTextFunc(),c=bn(l,t),d=a?c:`${l("ariaToggleCellValue","Press SPACE to toggle cell value")} (${c})`;r.setInputAriaLabel(d)}onCheckboxChanged(e){const{params:t}=this,{column:o,node:s,value:i}=t,{editSvc:n}=this.beans;if(!o)return;const r={rowNode:s,column:o};n?.dispatchCellEvent(r,null,"cellEditingStarted",{value:i});const a=s.setDataValue(o,e,"ui");n?.dispatchCellEvent(r,null,"cellEditingStopped",{oldValue:i,newValue:e,valueChanged:a}),a||this.updateCheckbox(t)}},xb={tag:"div",cls:"ag-skeleton-container"},Pb=class extends ye{constructor(){super(xb)}init(t){const o=`ag-cell-skeleton-renderer-${this.getCompId()}`;this.getGui().setAttribute("id",o),this.addDestroyFunc(()=>Ys(t.eParentOfValue)),Ys(t.eParentOfValue,o),t.deferRender?this.setupLoading(t):t.node.failedLoad?this.setupFailed():this.setupLoading(t)}setupFailed(){const t=this.getLocaleTextFunc();this.getGui().textContent=t("loadingError","ERR");const o=t("ariaSkeletonCellLoadingFailed","Row failed to load");Cs(this.getGui(),o)}setupLoading(t){const o=it({tag:"div",cls:"ag-skeleton-effect"}),s=t.node.rowIndex;if(s!=null){const r=75+25*(s%2===0?Math.sin(s):Math.cos(s));o.style.width=`${r}%`}this.getGui().appendChild(o);const i=this.getLocaleTextFunc(),n=t.deferRender?i("ariaDeferSkeletonCellLoading","Cell is loading"):i("ariaSkeletonCellLoading","Row data is loading");Cs(this.getGui(),n)}refresh(t){return!1}},Db={moduleName:"CheckboxCellRenderer",version:I,userComponents:{agCheckboxCellRenderer:Eb}},Mb={moduleName:"SkeletonCellRenderer",version:I,userComponents:{agSkeletonCellRenderer:Pb}};function Tb(e,t){const o=e.colModel.getColDefCol(t);return o?o.getColDef():null}function Ib(e){return e.colModel.getColumnDefs(!0)}function Ab(e,t,o){return e.colNames.getDisplayNameForColumn(t,o)||""}function kb(e,t){return e.colModel.getColDefCol(t)}function Lb(e){return e.colModel.getColDefCols()}function Ob(e,t){return Ct(e,t,"api")}function Gb(e){return cn(e)}function Hb(e){fb(e,"api")}function Bb(e){return e.visibleCols.isPinningLeft()||e.visibleCols.isPinningRight()}function Vb(e){return e.visibleCols.isPinningLeft()}function Nb(e){return e.visibleCols.isPinningRight()}function Wb(e,t){return e.visibleCols.getColAfter(t)}function zb(e,t){return e.visibleCols.getColBefore(t)}function _b(e,t,o){e.colModel.setColsVisible(t,o,"api")}function Ub(e,t,o){e.pinnedCols?.setColsPinned(t,o,"api")}function $b(e){return e.colModel.getCols()}function Kb(e){return e.visibleCols.leftCols}function qb(e){return e.visibleCols.centerCols}function jb(e){return e.visibleCols.rightCols}function Yb(e){return e.visibleCols.allCols}function Qb(e){return e.colViewport.getViewportColumns()}function zr(e,t){if(!e)return;const o=e,s={};for(const i of Object.keys(o)){if(t&&t.indexOf(i)>=0||Vd.has(i))continue;const n=o[i];typeof n=="object"&&n!==null&&n.constructor===Object?s[i]=zr(n):s[i]=n}return s}var Zb=class extends x{constructor(){super(...arguments),this.beanName="colDefFactory"}wireBeans(e){this.rowGroupColsSvc=e.rowGroupColsSvc,this.pivotColsSvc=e.pivotColsSvc}getColumnDefs(e,t,o,s,i=!1){const n=e.slice();t?n.sort((l,c)=>o.indexOf(l)-o.indexOf(c)):(o||i)&&n.sort((l,c)=>s.indexOf(l)-s.indexOf(c));const r=this.rowGroupColsSvc?.columns,a=this.pivotColsSvc?.columns;return this.buildColumnDefs(n,r,a)}buildColumnDefs(e,t=[],o=[]){const s=[],i={};for(const n of e){const r=this.createDefFromColumn(n,t,o);let a=!0,l=r,c=n.getOriginalParent(),d=null;for(;c;){let u=null;if(c.isPadding()){c=c.getOriginalParent();continue}const h=i[c.getGroupId()];if(h){h.children.push(l),a=!1;break}if(u=this.createDefFromGroup(c),u&&(u.children=[l],i[u.groupId]=u,l=u,c=c.getOriginalParent()),c!=null&&d===c){a=!1;break}d=c}a&&s.push(l)}return s}createDefFromGroup(e){const t=zr(e.getColGroupDef(),["children"]);return t&&(t.groupId=e.getGroupId()),t}createDefFromColumn(e,t,o){const s=zr(e.getColDef());return s.colId=e.getColId(),s.width=e.getActualWidth(),s.rowGroup=e.isRowGroupActive(),s.rowGroupIndex=e.isRowGroupActive()?t.indexOf(e):null,s.pivot=e.isPivotActive(),s.pivotIndex=e.isPivotActive()?o.indexOf(e):null,s.aggFunc=e.isValueActive()?e.getAggFunc():null,s.hide=e.isVisible()?void 0:!0,s.pinned=e.isPinned()?e.getPinned():null,s.sort=e.getSortDef(),s.sortIndex=e.getSortIndex()!=null?e.getSortIndex():null,s}},Jb=class extends x{constructor(){super(...arguments),this.beanName="colFlex",this.columnsHidden=!1}refreshFlexedColumns(e={}){const t=e.source??"flex";e.viewportWidth!=null&&(this.flexViewportWidth=e.viewportWidth);const o=this.flexViewportWidth,{visibleCols:s,colDelayRenderSvc:i}=this.beans,n=s.centerCols;let r=-1;if(e.resizingCols){const m=new Set(e.resizingCols);for(let C=n.length-1;C>=0;C--)if(m.has(n[C])){r=C;break}}let a=!1;const l=n.map((m,C)=>{const v=m.getFlex(),w=v!=null&&v>0&&C>r;return a||(a=w),{col:m,isFlex:w,flex:Math.max(0,v??0),initialSize:m.getActualWidth(),min:m.getMinWidth(),max:m.getMaxWidth(),targetSize:0}});if(a?(i?.hideColumns("colFlex"),this.columnsHidden=!0):this.columnsHidden&&this.revealColumns(i),!o||!a)return[];let c=l.length,d=l.reduce((m,C)=>m+C.flex,0),u=o;const h=(m,C)=>{m.frozenSize=C,m.col.setActualWidth(C,t),u-=C,d-=m.flex,c-=1},g=m=>m.frozenSize!=null;for(const m of l)m.isFlex||h(m,m.initialSize);for(;c>0;){const m=Math.round(d<1?u*d:u);let C,v=0,w=0;for(const S of l){if(g(S))continue;C=S,w+=m*(S.flex/d);const F=w-v,E=Math.round(F);S.targetSize=E,v+=E}C&&(C.targetSize+=m-v);let b=0;for(const S of l){if(g(S))continue;const F=S.targetSize,E=Math.min(Math.max(F,S.min),S.max);b+=E-F,S.violationType=E===F?void 0:E<F?"max":"min",S.targetSize=E}const y=b===0?"all":b>0?"min":"max";for(const S of l)g(S)||(y==="all"||S.violationType===y)&&h(S,S.targetSize)}e.skipSetLeft||s.setLeftValues(t),e.updateBodyWidths&&s.updateBodyWidths();const f=l.filter(m=>m.isFlex&&!m.violationType).map(m=>m.col);if(e.fireResizedEvent){const m=l.filter(v=>v.initialSize!==v.frozenSize).map(v=>v.col),C=l.filter(v=>v.flex).map(v=>v.col);Ss(this.eventSvc,m,!0,t,C)}return this.revealColumns(i),f}revealColumns(e){this.columnsHidden&&(e?.revealColumns("colFlex"),this.columnsHidden=!1)}initCol(e){const{flex:t,initialFlex:o}=e.colDef;t!==void 0?e.flex=t:o!==void 0&&(e.flex=o)}setColFlex(e,t){e.flex=t??null,e.dispatchStateUpdatedEvent("flex")}},et=e=>{if(typeof e=="bigint")return e;let t;if(typeof e=="number")t=e;else if(typeof e=="string"&&(t=e.trim(),t===""||(t.endsWith("n")&&(t=t.slice(0,-1)),!/^[+-]?\d+$/.test(t))))return null;if(t==null)return null;try{return BigInt(t)}catch{return null}},Ya="T",Xb=new RegExp(`[${Ya} ]`),eS=new RegExp(`^\\d{4}-\\d{2}-\\d{2}(${Ya}\\d{2}:\\d{2}:\\d{2}\\D?)?`);function xt(e,t){return e.toString().padStart(t,"0")}function $e(e,t=!0,o=Ya){if(!e)return null;let s=[e.getFullYear(),e.getMonth()+1,e.getDate()].map(i=>xt(i,2)).join("-");return t&&(s+=o+[e.getHours(),e.getMinutes(),e.getSeconds()].map(i=>xt(i,2)).join(":")),s}function Ri(e,t=!0){return e?t?[String(e.getFullYear()),String(e.getMonth()+1),xt(e.getDate(),2),xt(e.getHours(),2),`:${xt(e.getMinutes(),2)}`,`:${xt(e.getSeconds(),2)}`]:[e.getFullYear(),e.getMonth()+1,xt(e.getDate(),2)].map(String):null}var ar=e=>{if(e>3&&e<21)return"th";switch(e%10){case 1:return"st";case 2:return"nd";case 3:return"rd"}return"th"},hc=["January","February","March","April","May","June","July","August","September","October","November","December"],lr=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];function tS(e,t){if(t==null)return $e(e,!1);const o=xt(e.getFullYear(),4),s={YYYY:()=>o.slice(o.length-4,o.length),YY:()=>o.slice(o.length-2,o.length),Y:()=>`${e.getFullYear()}`,MMMM:()=>hc[e.getMonth()],MMM:()=>hc[e.getMonth()].slice(0,3),MM:()=>xt(e.getMonth()+1,2),Mo:()=>`${e.getMonth()+1}${ar(e.getMonth()+1)}`,M:()=>`${e.getMonth()+1}`,Do:()=>`${e.getDate()}${ar(e.getDate())}`,DD:()=>xt(e.getDate(),2),D:()=>`${e.getDate()}`,dddd:()=>lr[e.getDay()],ddd:()=>lr[e.getDay()].slice(0,3),dd:()=>lr[e.getDay()].slice(0,2),do:()=>`${e.getDay()}${ar(e.getDay())}`,d:()=>`${e.getDay()}`},i=new RegExp(Object.keys(s).join("|"),"g");return t.replace(i,n=>n in s?s[n]():n)}function Bi(e,t=!1){return!!Ke(e,t)}function oS(e){return Bi(e,!0)}function Ke(e,t=!1,o){if(!e||!o&&!eS.test(e))return null;const[s,i]=e.split(Xb);if(!s)return null;const n=s.split("-").map(g=>Number.parseInt(g,10));if(n.filter(g=>!isNaN(g)).length!==3)return null;const[r,a,l]=n,c=new Date(r,a-1,l);if(c.getFullYear()!==r||c.getMonth()!==a-1||c.getDate()!==l||!i&&t)return null;if(!i||i==="00:00:00")return c;const[d,u,h]=i.split(":").map(g=>Number.parseInt(g,10));if(d>=0&&d<24)c.setHours(d);else if(t)return null;if(u>=0&&u<60)c.setMinutes(u);else if(t)return null;if(h>=0&&h<60)c.setSeconds(h);else if(t)return null;return c}function _s(e,t,o){if(!t||!e)return;if(!o)return e[t];const s=t.split(".");let i=e;for(let n=0;n<s.length;n++){if(i==null)return;i=i[s[n]]}return i}var sS=["dateTimeString","dateString","text","number","bigint","boolean","date"],iS=class extends x{constructor(){super(...arguments),this.beanName="dataTypeSvc",this.dataTypeDefinitions={},this.isPendingInference=!1,this.isColumnTypeOverrideInDataTypeDefinitions=!1,this.columnStateUpdatesPendingInference={},this.columnStateUpdateListenerDestroyFuncs=[],this.columnDefinitionPropsPerDataType={number(){return{cellEditor:"agNumberCellEditor"}},bigint({filterModuleBean:e}){return e?{cellEditor:"agTextCellEditor"}:{cellEditor:"agTextCellEditor",comparator:{default:lS,absolute:cS}}},boolean(){return{cellEditor:"agCheckboxCellEditor",cellRenderer:"agCheckboxCellRenderer",getFindText:()=>null,suppressKeyboardEvent:({node:e,event:t,column:o})=>t.key===R.SPACE&&o.isCellEditable(e)}},date({formatValue:e}){return{cellEditor:"agDateCellEditor",keyCreator:e}},dateString({formatValue:e}){return{cellEditor:"agDateStringCellEditor",keyCreator:e}},dateTime(e){return this.date(e)},dateTimeString(e){return this.dateString(e)},object({formatValue:e,colModel:t,colId:o}){return{cellEditorParams:{useFormatter:!0},comparator:(s,i)=>{const n=t.getColDefCol(o),r=n?.getColDef();if(!n||!r)return 0;const a=s==null?"":e({column:n,node:null,value:s}),l=i==null?"":e({column:n,node:null,value:i});return a===l?0:a>l?1:-1},keyCreator:e}},text(){return{}}}}wireBeans(e){this.colModel=e.colModel}postConstruct(){this.processDataTypeDefinitions(),this.addManagedPropertyListener("dataTypeDefinitions",e=>{this.processDataTypeDefinitions(),this.colModel.recreateColumnDefs(e)})}processDataTypeDefinitions(){const e=this.getDefaultDataTypes(),t={},o={},s=d=>u=>{const{column:h,node:g,value:f}=u;let m=h.getColDef().valueFormatter;return m===d.groupSafeValueFormatter&&(m=d.valueFormatter),this.beans.valueSvc.formatValue(h,g,f,m)};for(const d of Object.keys(e)){const u=e[d],h={...u,groupSafeValueFormatter:fc(u,this.gos)};t[d]=h,o[d]=s(h)}const i=this.gos.get("dataTypeDefinitions")??{},n={};for(const d of Object.keys(i)){const u=i[d],h=this.processDataTypeDefinition(u,i,[d],e);h&&(t[d]=h,u.dataTypeMatcher&&(n[d]=u.dataTypeMatcher),o[d]=s(h))}const{valueParser:r,valueFormatter:a}=e.object,{valueParser:l,valueFormatter:c}=t.object;this.hasObjectValueParser=l!==r,this.hasObjectValueFormatter=c!==a,this.formatValueFuncs=o,this.dataTypeDefinitions=t,this.dataTypeMatchers=this.sortKeysInMatchers(n,e)}sortKeysInMatchers(e,t){const o={...e};for(const s of sS)delete o[s],o[s]=e[s]??t[s].dataTypeMatcher;return o}processDataTypeDefinition(e,t,o,s){let i;const n=e.extendsDataType;if(e.columnTypes&&(this.isColumnTypeOverrideInDataTypeDefinitions=!0),e.extendsDataType===e.baseDataType){let r=s[n];const a=t[n];if(r&&a&&(r=a),!pc(e,r,n))return;i=gc(r,e)}else{if(o.includes(n)){D(44);return}const r=t[n];if(!pc(e,r,n))return;const a=this.processDataTypeDefinition(r,t,[...o,n],s);if(!a)return;i=gc(a,e)}return{...i,groupSafeValueFormatter:fc(i,this.gos)}}updateColDefAndGetColumnType(e,t,o){let{cellDataType:s}=t;s===void 0&&(s=e.cellDataType);const{field:i}=t;if((s==null||s===!0)&&(s=this.canInferCellDataType(e,t)?this.inferCellDataType(i,o):!1),this.addFormulaCellEditorToColDef(e,t),!s){e.cellDataType=!1;return}const n=this.dataTypeDefinitions[s];if(!n){D(47,{cellDataType:s});return}return e.cellDataType=s,n.groupSafeValueFormatter&&(e.valueFormatter=n.groupSafeValueFormatter),n.valueParser&&(e.valueParser=n.valueParser),n.suppressDefaultProperties||this.setColDefPropertiesForBaseDataType(e,s,n,o),n.columnTypes}addFormulaCellEditorToColDef(e,t){!(t.allowFormula??e.allowFormula)||t.cellEditor||(e.cellEditor="agFormulaCellEditor")}addColumnListeners(e){if(!this.isPendingInference)return;const t=this.columnStateUpdatesPendingInference[e.getColId()];if(!t)return;const o=s=>{t.add(s.key)};e.__addEventListener("columnStateUpdated",o),this.columnStateUpdateListenerDestroyFuncs.push(()=>e.__removeEventListener("columnStateUpdated",o))}canInferCellDataType(e,t){const{gos:o}=this;if(!Se(o))return!1;const s={cellRenderer:!0,valueGetter:!0,valueParser:!0,refData:!0};if(cr(t,s))return!1;const i=t.type===null?e.type:t.type;if(i){const n=o.get("columnTypes")??{};if(tn(i).some(a=>{const l=n[a.trim()];return l&&cr(l,s)}))return!1}return!cr(e,s)}inferCellDataType(e,t){if(!e)return;let o;const s=this.getInitialData();if(s){const n=e.includes(".")&&!this.gos.get("suppressFieldDotNotation");o=_s(s,e,n)}else this.initWaitForRowData(t);return o==null?void 0:Object.keys(this.dataTypeMatchers).find(n=>this.dataTypeMatchers[n](o))??"object"}getInitialData(){const e=this.gos.get("rowData");if(e?.length)return e[0];if(this.initialData)return this.initialData;{const t=this.beans.rowModel.rootNode?._leafs;if(t?.length)return t[0].data}return null}initWaitForRowData(e){if(this.columnStateUpdatesPendingInference[e]=new Set,this.isPendingInference)return;this.isPendingInference=!0;const t=this.isColumnTypeOverrideInDataTypeDefinitions,{colAutosize:o,eventSvc:s}=this.beans;t&&o&&(o.shouldQueueResizeOperations=!0);const[i]=this.addManagedEventListeners({rowDataUpdateStarted:n=>{const{firstRowData:r}=n;r&&(i?.(),this.isPendingInference=!1,this.processColumnsPendingInference(r,t),this.columnStateUpdatesPendingInference={},t&&o?.processResizeOperations(),s.dispatchEvent({type:"dataTypesInferred"}))}})}processColumnsPendingInference(e,t){this.initialData=e;const o=[];this.destroyColumnStateUpdateListeners();const s={},i={};for(const n of Object.keys(this.columnStateUpdatesPendingInference)){const r=this.columnStateUpdatesPendingInference[n],a=this.colModel.getCol(n);if(!a)continue;const l=a.getColDef();if(!this.resetColDefIntoCol(a,"cellDataTypeInferred"))continue;const c=a.getColDef();if(t&&c.type&&c.type!==l.type){const d=dS(a,r);d.rowGroup&&d.rowGroupIndex==null&&(s[n]=d),d.pivot&&d.pivotIndex==null&&(i[n]=d),o.push(d)}}t&&o.push(...this.generateColumnStateForRowGroupAndPivotIndexes(s,i)),o.length&&Ct(this.beans,{state:o},"cellDataTypeInferred"),this.initialData=null}generateColumnStateForRowGroupAndPivotIndexes(e,t){const o={},{rowGroupColsSvc:s,pivotColsSvc:i}=this.beans;return s?.restoreColumnOrder(o,e),i?.restoreColumnOrder(o,t),Object.values(o)}resetColDefIntoCol(e,t){const o=e.getUserProvidedColDef();if(!o)return!1;const s=Ir(this.beans,o,e.getColId());return e.setColDef(s,o,t),!0}getDateStringTypeDefinition(e){const{dateString:t}=this.dataTypeDefinitions;return e?this.getDataTypeDefinition(e)??t:t}getDateParserFunction(e){return this.getDateStringTypeDefinition(e).dateParser}getDateFormatterFunction(e){return this.getDateStringTypeDefinition(e).dateFormatter}getDateIncludesTimeFlag(e){return e==="dateTime"||e==="dateTimeString"}getDataTypeDefinition(e){const t=e.getColDef();if(t.cellDataType)return this.dataTypeDefinitions[t.cellDataType]}getBaseDataType(e){return this.getDataTypeDefinition(e)?.baseDataType}checkType(e,t){if(t==null)return!0;const o=this.getDataTypeDefinition(e)?.dataTypeMatcher;return!o||e.getColDef().allowFormula&&this.beans.formula?.isFormula(t)?!0:o(t)}validateColDef(e,t,o,s){if(e.cellDataType==="object"){const i=l=>l?.cellDataType==null||l?.cellDataType===!0,n=i(t)&&i(o),r=l=>D(48,{property:l,inferred:n,colId:s}),{object:a}=this.dataTypeDefinitions;e.valueFormatter===a.groupSafeValueFormatter&&!this.hasObjectValueFormatter&&r("Formatter"),e.editable&&e.valueParser===a.valueParser&&!this.hasObjectValueParser&&r("Parser")}}postProcess(e){const t=e.cellDataType;if(!t||typeof t!="string")return;const{dataTypeDefinitions:o,beans:s,formatValueFuncs:i}=this,n=o[t];n&&s.colFilter?.setColDefPropsForDataType(e,n,i[t])}getFormatValue(e){return this.formatValueFuncs[e]}isColPendingInference(e){return this.isPendingInference&&!!this.columnStateUpdatesPendingInference[e]}setColDefPropertiesForBaseDataType(e,t,o,s){const i=this.formatValueFuncs[t],n=this.columnDefinitionPropsPerDataType[o.baseDataType]({colDef:e,cellDataType:t,colModel:this.colModel,dataTypeDefinition:o,colId:s,formatValue:i,filterModuleBean:this.beans.filterManager});e.cellEditor==="agFormulaCellEditor"&&n.cellEditor!==e.cellEditor&&(n.cellEditor=e.cellEditor),Object.assign(e,n)}getDateObjectTypeDef(e){const t=this.getLocaleTextFunc(),o=this.getDateIncludesTimeFlag(e);return{baseDataType:e,valueParser:s=>Ke(s.newValue&&String(s.newValue)),valueFormatter:s=>s.value==null?"":!(s.value instanceof Date)||isNaN(s.value.getTime())?t("invalidDate","Invalid Date"):$e(s.value,o)??"",dataTypeMatcher:s=>s instanceof Date}}getDateStringTypeDef(e){const t=this.getDateIncludesTimeFlag(e);return{baseDataType:e,dateParser:o=>Ke(o)??void 0,dateFormatter:o=>$e(o??null,t)??void 0,valueParser:o=>Bi(String(o.newValue))?o.newValue:null,valueFormatter:o=>Bi(String(o.value))?String(o.value):"",dataTypeMatcher:o=>typeof o=="string"&&Bi(o)}}getDefaultDataTypes(){const e=this.getLocaleTextFunc();return{number:{baseDataType:"number",valueParser:t=>t.newValue?.trim?.()===""?null:Number(t.newValue),valueFormatter:t=>t.value==null?"":typeof t.value!="number"||isNaN(t.value)?e("invalidNumber","Invalid Number"):String(t.value),dataTypeMatcher:t=>typeof t=="number"},bigint:{baseDataType:"bigint",valueParser:t=>{const{newValue:o}=t;return o==null||typeof o=="string"&&o.trim()===""?null:et(o)},valueFormatter:t=>t.value==null?"":typeof t.value!="bigint"?e("invalidBigInt","Invalid BigInt"):String(t.value),dataTypeMatcher:t=>typeof t=="bigint"},text:{baseDataType:"text",valueParser:t=>t.newValue===""?null:Rr(t.newValue),dataTypeMatcher:t=>typeof t=="string"},boolean:{baseDataType:"boolean",valueParser:t=>t.newValue==null?t.newValue:t.newValue?.trim?.()===""?null:String(t.newValue).toLowerCase()==="true",valueFormatter:t=>t.value==null?"":String(t.value),dataTypeMatcher:t=>typeof t=="boolean"},date:this.getDateObjectTypeDef("date"),dateString:this.getDateStringTypeDef("dateString"),dateTime:this.getDateObjectTypeDef("dateTime"),dateTimeString:{...this.getDateStringTypeDef("dateTimeString"),dataTypeMatcher:t=>typeof t=="string"&&oS(t)},object:{baseDataType:"object",valueParser:()=>null,valueFormatter:t=>Rr(t.value)??""}}}destroyColumnStateUpdateListeners(){for(const e of this.columnStateUpdateListenerDestroyFuncs)e();this.columnStateUpdateListenerDestroyFuncs=[]}destroy(){this.dataTypeDefinitions={},this.dataTypeMatchers={},this.formatValueFuncs={},this.columnStateUpdatesPendingInference={},this.destroyColumnStateUpdateListeners(),super.destroy()}};function gc(e,t){const o={...e,...t};return e.columnTypes&&t.columnTypes&&t.appendColumnTypes&&(o.columnTypes=[...tn(e.columnTypes),...tn(t.columnTypes)]),o}function pc(e,t,o){return t?t.baseDataType!==e.baseDataType?(D(46),!1):!0:(D(45,{parentCellDataType:o}),!1)}var nS=e=>typeof e=="bigint"||typeof e=="number",rS=e=>e==="number"||e==="bigint";function fc(e,t){if(e.valueFormatter)return o=>{const{node:s,colDef:i,column:n,value:r}=o;if(s?.group){const a=(i.pivotValueColumn??n).getAggFunc();if(a){if(a==="first"||a==="last")return e.valueFormatter(o);const{baseDataType:l}=e;if(rS(l)&&a!=="count"){if(nS(r))return e.valueFormatter(o);if(r==null)return;if(typeof r=="object"){if(typeof r.toNumber=="function")return e.valueFormatter({...o,value:r.toNumber()});if("value"in r)return e.valueFormatter({...o,value:r.value})}}return}}else if(t.get("groupHideOpenParents")&&o.column.isRowGroupActive()&&typeof o.value=="string"&&!e.dataTypeMatcher?.(o.value))return;return e.valueFormatter(o)}}function aS(e,t,o,s){if(!t[o])return!1;const i=e[o];return i===null?(t[o]=!1,!1):s===void 0?!!i:i===s}function lS(e,t){if(e==null)return t==null?0:-1;if(t==null)return 1;const o=et(e),s=et(t);return o!=null&&s!=null?o===s?0:o>s?1:-1:0}function cS(e,t){if(e==null)return t==null?0:-1;if(t==null)return 1;const o=mc(e),s=mc(t);return o!=null&&s!=null?o===s?0:o>s?1:-1:0}function mc(e){const t=et(e);return t==null?null:t<0n?-t:t}function cr(e,t){return[["cellRenderer","agSparklineCellRenderer"],["valueGetter",void 0],["valueParser",void 0],["refData",void 0]].some(([o,s])=>aS(e,t,o,s))}function dS(e,t){const o=uh(e);for(const s of t)delete o[s],s==="rowGroup"?delete o.rowGroupIndex:s==="pivot"&&delete o.pivotIndex;return o}var uS={moduleName:"DataType",version:I,beans:[iS],dependsOn:[Db]},hS={moduleName:"ColumnFlex",version:I,beans:[Jb]},gh={moduleName:"ColumnApi",version:I,beans:[Zb],apiFunctions:{getColumnDef:Tb,getDisplayNameForColumn:Ab,getColumn:kb,getColumns:Lb,applyColumnState:Ob,getColumnState:Gb,resetColumnState:Hb,isPinning:Bb,isPinningLeft:Vb,isPinningRight:Nb,getDisplayedColAfter:Wb,getDisplayedColBefore:zb,setColumnsVisible:_b,setColumnsPinned:Ub,getAllGridColumns:$b,getDisplayedLeftColumns:Kb,getDisplayedCenterColumns:qb,getDisplayedRightColumns:jb,getAllDisplayedColumns:Yb,getAllDisplayedVirtualColumns:Qb,getColumnDefs:Ib}},gS=class extends x{constructor(){super(...arguments),this.beanName="colNames"}getDisplayNameForColumn(e,t,o=!1){if(!e)return null;const s=this.getHeaderName(e.getColDef(),e,null,null,t),{aggColNameSvc:i}=this.beans;return o&&i?i.getHeaderName(e,s):s}getDisplayNameForProvidedColumnGroup(e,t,o){const s=t?.getColGroupDef();return s?this.getHeaderName(s,null,e,t,o):null}getDisplayNameForColumnGroup(e,t){return this.getDisplayNameForProvidedColumnGroup(e,e.getProvidedColumnGroup(),t)}getHeaderName(e,t,o,s,i){const n=e.headerValueGetter;if(n){const r=K(this.gos,{colDef:e,column:t,columnGroup:o,providedColumnGroup:s,location:i});return typeof n=="function"?n(r):typeof n=="string"?this.beans.expressionSvc?.evaluate(n,r)??null:""}else{if(e.headerName!=null)return e.headerName;if(e.field)return xp(e.field)}return""}},pS=class extends x{constructor(){super(...arguments),this.beanName="colViewport",this.colsWithinViewport=[],this.headerColsWithinViewport=[],this.colsWithinViewportHash="",this.rowsOfHeadersToRenderLeft={},this.rowsOfHeadersToRenderRight={},this.rowsOfHeadersToRenderCenter={},this.columnsToRenderLeft=[],this.columnsToRenderRight=[],this.columnsToRenderCenter=[]}wireBeans(e){this.visibleCols=e.visibleCols,this.colModel=e.colModel}postConstruct(){this.suppressColumnVirtualisation=this.gos.get("suppressColumnVirtualisation")}getScrollPosition(){return this.scrollPosition}setScrollPosition(e,t,o=!1){const{visibleCols:s}=this,i=s.isBodyWidthDirty;if(!(e===this.scrollWidth&&t===this.scrollPosition&&!i)){if(this.scrollWidth=e,this.scrollPosition=t,s.isBodyWidthDirty=!0,this.gos.get("enableRtl")){const r=s.bodyWidth;this.viewportLeft=r-t-e,this.viewportRight=r-t}else this.viewportLeft=t,this.viewportRight=e+t;this.colModel.ready&&this.checkViewportColumns(o)}}getColumnHeadersToRender(e){switch(e){case"left":return this.columnsToRenderLeft;case"right":return this.columnsToRenderRight;default:return this.columnsToRenderCenter}}getHeadersToRender(e,t){let o;switch(e){case"left":o=this.rowsOfHeadersToRenderLeft[t];break;case"right":o=this.rowsOfHeadersToRenderRight[t];break;default:o=this.rowsOfHeadersToRenderCenter[t];break}return o??[]}extractViewportColumns(){const e=this.visibleCols.centerCols;this.isColumnVirtualisationSuppressed()?(this.colsWithinViewport=e,this.headerColsWithinViewport=e):(this.colsWithinViewport=e.filter(this.isColumnInRowViewport.bind(this)),this.headerColsWithinViewport=e.filter(this.isColumnInHeaderViewport.bind(this)))}isColumnVirtualisationSuppressed(){return this.suppressColumnVirtualisation||this.viewportRight===0}clear(){this.rowsOfHeadersToRenderLeft={},this.rowsOfHeadersToRenderRight={},this.rowsOfHeadersToRenderCenter={},this.colsWithinViewportHash=""}isColumnInHeaderViewport(e){return e.isAutoHeaderHeight()||fS(e)?!0:this.isColumnInRowViewport(e)}isColumnInRowViewport(e){if(e.isAutoHeight())return!0;const t=e.getLeft()||0,o=t+e.getActualWidth(),s=this.viewportLeft-200,i=this.viewportRight+200,n=t<s&&o<s,r=t>i&&o>i;return!n&&!r}getViewportColumns(){const{leftCols:e,rightCols:t}=this.visibleCols;return this.colsWithinViewport.concat(e).concat(t)}getColsWithinViewport(e){if(!this.colModel.colSpanActive)return this.colsWithinViewport;const t=n=>{const r=n.getLeft();return L(r)&&r>this.viewportLeft},o=this.isColumnVirtualisationSuppressed()?void 0:this.isColumnInRowViewport.bind(this),{visibleCols:s}=this,i=s.centerCols;return s.getColsForRow(e,i,o,t)}checkViewportColumns(e=!1){this.extractViewport()&&this.eventSvc.dispatchEvent({type:"virtualColumnsChanged",afterScroll:e})}calculateHeaderRows(){const{leftCols:e,rightCols:t}=this.visibleCols;this.columnsToRenderLeft=e,this.columnsToRenderRight=t,this.columnsToRenderCenter=this.colsWithinViewport;const o=s=>{const i=new Set,n={};for(const r of s){let a=r.getParent();const l=r.isSpanHeaderHeight();for(;a&&!i.has(a);){if(l&&a.isPadding()){a=a.getParent();continue}const d=a.getProvidedColumnGroup().getLevel();n[d]??(n[d]=[]),n[d].push(a),i.add(a),a=a.getParent()}}return n};this.rowsOfHeadersToRenderLeft=o(e),this.rowsOfHeadersToRenderRight=o(t),this.rowsOfHeadersToRenderCenter=o(this.headerColsWithinViewport)}extractViewport(){const e=s=>`${s.getId()}-${s.getPinned()||"normal"}`;this.extractViewportColumns();const t=this.getViewportColumns().map(e).join("#"),o=this.colsWithinViewportHash!==t;return o&&(this.colsWithinViewportHash=t,this.calculateHeaderRows()),o}};function fS(e){for(;e;){if(e.isAutoHeaderHeight())return!0;e=e.getParent()}return!1}var mS=class extends x{constructor(){super(...arguments),this.beanName="agCompUtils"}adaptFunction(e,t){if(!e.cellRenderer)return null;class o{refresh(){return!1}getGui(){return this.eGui}init(i){const n=t(i),r=typeof n;if(r==="string"||r==="number"||r==="boolean"){this.eGui=ba("<span>"+n+"</span>");return}if(n==null){this.eGui=it({tag:"span"});return}this.eGui=n}}return o}},CS={moduleName:"CellRendererFunction",version:I,beans:[mS]},vS=class extends qe{constructor(){super(...arguments),this.beanName="registry"}registerDynamicBeans(e){if(e){this.dynamicBeans??(this.dynamicBeans={});for(const t of Object.keys(e))this.dynamicBeans[t]=e[t]}}createDynamicBean(e,t,...o){if(!this.dynamicBeans)throw new Error(this.getDynamicError(e,!0));const s=this.dynamicBeans[e];if(s==null){if(t)throw new Error(this.getDynamicError(e,!1));return}return new s(...o)}};function wS(e){return typeof e=="object"&&!!e.getComp}var bS=class extends vS{constructor(){super(...arguments),this.agGridDefaults={},this.agGridDefaultOverrides={},this.jsComps={},this.selectors={},this.icons={}}postConstruct(){const e=this.gos.get("components");if(e!=null)for(const t of Object.keys(e))this.jsComps[t]=e[t]}registerModule(e){const{icons:t,userComponents:o,dynamicBeans:s,selectors:i}=e;if(o){const n=(r,a,l,c)=>{this.agGridDefaults[r]=a,(l||c)&&(this.agGridDefaultOverrides[r]={params:l,processParams:c})};for(const r of Object.keys(o)){let a=o[r];if(wS(a)&&(a=a.getComp(this.beans)),typeof a=="object"){const{classImp:l,params:c,processParams:d}=a;n(r,l,c,d)}else n(r,a)}}this.registerDynamicBeans(s);for(const n of i??[])this.selectors[n.selector]=n;if(t)for(const n of Object.keys(t))this.icons[n]=t[n]}getUserComponent(e,t){const o=(a,l,c,d)=>({componentFromFramework:l,component:a,params:c,processParams:d}),{frameworkOverrides:s}=this.beans,i=s.frameworkComponent(t,this.gos.get("components"));if(i!=null)return o(i,!0);const n=this.jsComps[t];if(n){const a=s.isFrameworkComponent(n);return o(n,a)}const r=this.agGridDefaults[t];if(r){const a=this.agGridDefaultOverrides[t];return o(r,!1,a?.params,a?.processParams)}return this.beans.validation?.missingUserComponent(e,t,this.agGridDefaults,this.jsComps),null}getSelector(e){return this.selectors[e]}getIcon(e){return this.icons[e]}getDynamicError(e,t){return t?It(279,{name:e}):this.beans.validation?.missingDynamicBean(e)??It(256)}},SS=23,yS=class extends x{constructor(){super(...arguments),this.beanName="ctrlsSvc",this.params={},this.ready=!1,this.readyCallbacks=[]}postConstruct(){this.addEventListener("ready",()=>{if(this.updateReady(),this.ready){for(const e of this.readyCallbacks)e(this.params);this.readyCallbacks.length=0}},this.beans.frameworkOverrides.runWhenReadyAsync?.()??!1)}updateReady(){const e=Object.values(this.params);this.ready=e.length===SS&&e.every(t=>t?.isAlive()??!1)}whenReady(e,t){this.ready?t(this.params):this.readyCallbacks.push(t),e.addDestroyFunc(()=>{const o=this.readyCallbacks.indexOf(t);o>=0&&this.readyCallbacks.splice(o,1)})}register(e,t){this.params[e]=t,this.updateReady(),this.ready&&this.dispatchLocalEvent({type:"ready"}),t.addDestroyFunc(()=>{this.updateReady()})}get(e){return this.params[e]}getGridBodyCtrl(){return this.params.gridBodyCtrl}getHeaderRowContainerCtrls(){const{leftHeader:e,centerHeader:t,rightHeader:o}=this.params;return[e,o,t]}getHeaderRowContainerCtrl(e){const t=this.params;switch(e){case"left":return t.leftHeader;case"right":return t.rightHeader;default:return t.centerHeader}}getScrollFeature(){return this.getGridBodyCtrl().scrollFeature}},RS=':where([class^=ag-]),:where([class^=ag-]):after,:where([class^=ag-]):before{box-sizing:border-box}:where([class^=ag-]):where(button){color:inherit}:where([class^=ag-]):where(div,span,label):focus-visible{box-shadow:inset var(--ag-focus-shadow);outline:none;&:where(.invalid){box-shadow:inset var(--ag-focus-error-shadow)}}:where([class^=ag-]) ::-ms-clear{display:none}.ag-hidden{display:none!important}.ag-invisible{visibility:hidden!important}.ag-tab-guard{display:block;height:0;position:absolute;width:0}.ag-tab-guard-top{top:1px}.ag-tab-guard-bottom{bottom:1px}.ag-measurement-container{height:0;overflow:hidden;visibility:hidden;width:0}.ag-measurement-element-border{display:inline-block}.ag-measurement-element-border:before{border-left:var(--ag-internal-measurement-border);content:"";display:block}.ag-popup-child{top:0;z-index:5}.ag-popup-child:where(:not(.ag-tooltip-custom)){box-shadow:var(--ag-popup-shadow)}.ag-input-wrapper,.ag-picker-field-wrapper{align-items:center;display:flex;flex:1 1 auto;line-height:normal;position:relative}.ag-input-field{align-items:center;display:flex;flex-direction:row}.ag-input-field-input:where(:not([type=checkbox],[type=radio])){flex:1 1 auto;min-width:0;width:100%}.ag-chart,.ag-dnd-ghost,.ag-external,.ag-popup,.ag-root-wrapper{cursor:default;line-height:normal;white-space:normal;-webkit-font-smoothing:antialiased;background-color:var(--ag-background-color);color:var(--ag-text-color);color-scheme:var(--ag-browser-color-scheme);font-family:var(--ag-font-family);font-size:var(--ag-font-size);font-weight:var(--ag-font-weight);--ag-indentation-level:0}:where(.ag-icon):before{align-items:center;background-color:currentcolor;color:inherit;content:"";display:flex;font-family:inherit;font-size:var(--ag-icon-size);font-style:normal;font-variant:normal;height:var(--ag-icon-size);justify-content:center;line-height:var(--ag-icon-size);-webkit-mask-size:contain;mask-size:contain;text-transform:none;width:var(--ag-icon-size)}.ag-icon{background-position:50%;background-repeat:no-repeat;background-size:contain;color:var(--ag-icon-color);display:block;height:var(--ag-icon-size);position:relative;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:var(--ag-icon-size)}.ag-disabled .ag-icon,[disabled] .ag-icon{opacity:.5}.ag-icon-grip.ag-disabled,.ag-icon-grip[disabled]{opacity:.35}.ag-icon-loading{animation-duration:1s;animation-iteration-count:infinite;animation-name:spin;animation-timing-function:linear}@keyframes spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.ag-resizer{pointer-events:none;position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none;z-index:1}:where(.ag-resizer){&.ag-resizer-topLeft{cursor:nwse-resize;height:5px;left:0;top:0;width:5px}&.ag-resizer-top{cursor:ns-resize;height:5px;left:5px;right:5px;top:0}&.ag-resizer-topRight{cursor:nesw-resize;height:5px;right:0;top:0;width:5px}&.ag-resizer-right{bottom:5px;cursor:ew-resize;right:0;top:5px;width:5px}&.ag-resizer-bottomRight{bottom:0;cursor:nwse-resize;height:5px;right:0;width:5px}&.ag-resizer-bottom{bottom:0;cursor:ns-resize;height:5px;left:5px;right:5px}&.ag-resizer-bottomLeft{bottom:0;cursor:nesw-resize;height:5px;left:0;width:5px}&.ag-resizer-left{bottom:5px;cursor:ew-resize;left:0;top:5px;width:5px}}.ag-menu{background-color:var(--ag-menu-background-color);border:var(--ag-menu-border);border-radius:var(--ag-border-radius);box-shadow:var(--ag-menu-shadow);color:var(--ag-menu-text-color);max-height:100%;overflow-y:auto;position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none}',Qa=typeof window!="object"||!window?.document?.fonts?.forEach,ph=!1,Vo=(e,t,o,s,i,n,r=!1)=>{if(Qa||ph)return;let a=e;s&&(a=`@layer ${CSS.escape(s).replaceAll("\\.",".")} { ${e} }`);let l=Pt.map.get(t);if(l||(l=[],Pt.map.set(t,l)),l.some(h=>h.injectedCss===a))return;const c=document.createElement("style");n&&c.setAttribute("nonce",n),c.dataset.agCss=o,c.dataset.agCssVersion=I,c.textContent=a;const d={rawCss:e,injectedCss:a,el:c,priority:i,isParams:r};let u;for(const h of l){if(h.priority>i)break;u=h}if(u){u.el.after(c);const h=l.indexOf(u);l.splice(h+1,0,d)}else t.nodeName==="STYLE"?t.after(c):t.insertBefore(c,t.querySelector(":not(title, meta)")),l.push(d)},fh=(e,t,o,s)=>{Vo(RS,e,"shared",t,0,o),s?.forEach((i,n)=>i.forEach(r=>Vo(r,e,n,t,0,o)))},FS=(e,t,o,s,i,n)=>{if(Qa||ph)return;const r=Pt.grids.get(e);r?r.paramsCss=t:Pt.grids.set(e,{styleContainer:s,paramsCss:t}),_r(s),t&&o&&Vo(t,s,o,i,2,n,!0)},ES=e=>{const t=Pt.grids.get(e)?.styleContainer;if(!t)return;Pt.grids.delete(e),Array.from(Pt.grids.values()).some(s=>s.styleContainer===t)?_r(t):(_r(t,!0),Pt.map.delete(t))},_r=(e,t=!1)=>{const o=new Set;for(const i of Pt.grids.values())i.styleContainer===e&&o.add(i.paramsCss);const s=Pt.map.get(e)??[];for(let i=s.length-1;i>=0;i--)(t||s[i].isParams&&!o.has(s[i].rawCss))&&(s[i].el.remove(),s.splice(i,1))},mh=()=>{const e=globalThis.agStyleInjectionVersions??(globalThis.agStyleInjectionVersions=new Map);let t=e.get(I);return t||(t={map:new WeakMap,grids:new Map,paramsId:0},e.set(I,t)),t},Pt=mh(),Ne=e=>new Ch(e),Xt="$default",xS=0,Ch=class{constructor({feature:e,params:t,modeParams:o={},css:s,cssImports:i}){this.feature=e,this.css=s,this.cssImports=i,this.modeParams={[Xt]:{...o[Xt]??{},...t??{}},...o}}use(e,t,o){let s=this._inject;if(s==null){let{css:i}=this;if(i){const n=`ag-theme-${this.feature??"part"}-${++xS}`;typeof i=="function"&&(i=i()),i=`:where(.${n}) {
|
|
4
|
+
${i}
|
|
5
|
+
}
|
|
6
|
+
`;for(const r of this.cssImports??[])i=`@import url(${JSON.stringify(r)});
|
|
7
|
+
${i}`;s={css:i,class:n}}else s=!1;this._inject=s}return s&&e&&Vo(s.css,e,s.class,t,1,o),s?s.class:!1}},PS=e=>e.replace(/[A-Z]|\d+/g,t=>`-${t}`).toLowerCase(),Za=e=>`--ag-${PS(e)}`,Lt=e=>`var(${Za(e)})`,DS=(e,t,o)=>Math.max(t,Math.min(o,e)),MS=e=>{const t=new Map;return o=>{const s=o;return t.has(s)||t.set(s,e(o)),t.get(s)}},Et=e=>({ref:"accentColor",mix:e}),ze=e=>({ref:"foregroundColor",mix:e}),ke=e=>({ref:"foregroundColor",mix:e,onto:"backgroundColor"}),TS=e=>({ref:"foregroundColor",mix:e,onto:"headerBackgroundColor"}),Ee={ref:"backgroundColor"},Dt={ref:"foregroundColor"},st={ref:"accentColor"},ii={backgroundColor:"#fff",foregroundColor:"#181d1f",borderColor:ze(.15),chromeBackgroundColor:ke(.02),browserColorScheme:"light"},IS={...ii,textColor:Dt,accentColor:"#2196f3",invalidColor:"#e02525",fontFamily:["-apple-system","BlinkMacSystemFont","Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue","sans-serif"],subtleTextColor:{ref:"textColor",mix:.5},borderWidth:1,borderRadius:4,spacing:8,fontSize:14,fontWeight:"inherit",focusShadow:{spread:3,color:Et(.5)},focusErrorShadow:{spread:3,color:{ref:"invalidColor",onto:"backgroundColor",mix:.5}},popupShadow:"0 0 16px #00000026",cardShadow:"0 1px 4px 1px #00000018",dropdownShadow:{ref:"cardShadow"},listItemHeight:{calc:"max(iconSize, dataFontSize) + widgetVerticalSpacing"},dragAndDropImageBackgroundColor:Ee,dragAndDropImageBorder:!0,dragAndDropImageNotAllowedBorder:{color:{ref:"invalidColor",onto:"dragAndDropImageBackgroundColor",mix:.5}},dragAndDropImageShadow:{ref:"popupShadow"},iconSize:16,iconColor:"inherit",toggleButtonWidth:28,toggleButtonHeight:18,toggleButtonOnBackgroundColor:st,toggleButtonOffBackgroundColor:ke(.3),toggleButtonSwitchBackgroundColor:Ee,toggleButtonSwitchInset:2,tooltipBackgroundColor:{ref:"chromeBackgroundColor"},tooltipErrorBackgroundColor:{ref:"invalidColor",onto:"backgroundColor",mix:.1},tooltipTextColor:{ref:"textColor"},tooltipErrorTextColor:{ref:"invalidColor"},tooltipBorder:!0,tooltipErrorBorder:{color:{ref:"invalidColor",onto:"backgroundColor",mix:.25}},panelBackgroundColor:Ee,panelTitleBarHeight:{ref:"headerHeight"},panelTitleBarBackgroundColor:{ref:"headerBackgroundColor"},panelTitleBarIconColor:{ref:"headerTextColor"},panelTitleBarTextColor:{ref:"headerTextColor"},panelTitleBarFontFamily:{ref:"headerFontFamily"},panelTitleBarFontSize:{ref:"headerFontSize"},panelTitleBarFontWeight:{ref:"headerFontWeight"},panelTitleBarBorder:!0,dialogShadow:{ref:"popupShadow"},dialogBorder:{color:ze(.2)},widgetContainerHorizontalPadding:{calc:"spacing * 1.5"},widgetContainerVerticalPadding:{calc:"spacing * 1.5"},widgetHorizontalSpacing:{calc:"spacing * 1.5"},widgetVerticalSpacing:{ref:"spacing"},dataFontSize:{ref:"fontSize"},headerBackgroundColor:{ref:"chromeBackgroundColor"},headerFontFamily:{ref:"fontFamily"},headerFontSize:{ref:"fontSize"},headerFontWeight:500,headerTextColor:{ref:"textColor"},headerHeight:{calc:"max(iconSize, dataFontSize) + spacing * 4 * headerVerticalPaddingScale"},headerVerticalPaddingScale:1,menuBorder:{color:ze(.2)},menuBackgroundColor:ke(.03),menuTextColor:ke(.95),menuShadow:{ref:"popupShadow"},menuSeparatorColor:{ref:"borderColor"}},AS=["colorScheme","color","length","scale","borderStyle","border","shadow","image","fontFamily","fontWeight","duration"],kS=MS(e=>(e=e.toLowerCase(),AS.find(t=>e.endsWith(t.toLowerCase()))??"length")),xn=e=>typeof e=="object"&&e?.ref?Lt(e.ref):typeof e=="string"?e:typeof e=="number"?String(e):!1,Ja=e=>{if(typeof e=="string")return e;if(typeof e=="object"&&e&&"ref"in e){const t=Lt(e.ref);return e.mix==null?t:`color-mix(in srgb, ${e.onto?Lt(e.onto):"transparent"}, ${t} ${DS(e.mix*100,0,100)}%)`}return!1},LS=xn,os=e=>typeof e=="string"?e:typeof e=="number"?`${e}px`:typeof e=="object"&&e&&"calc"in e?`calc(${e.calc.replace(/ ?[*/+] ?/g," $& ").replace(/-?\b[a-z][a-z0-9]*\b(?![-(])/gi,o=>o[0]==="-"?o:" "+Lt(o)+" ")})`:typeof e=="object"&&e&&"ref"in e?Lt(e.ref):!1,OS=xn,Ur=(e,t)=>typeof e=="string"?e:e===!0?Ur({},t):e===!1?t==="columnBorder"?Ur({color:"transparent"},t):"none":typeof e=="object"&&e&&"ref"in e?Lt(e.ref):vh(e.style??"solid")+" "+os(e.width??{ref:"borderWidth"})+" "+Ja(e.color??{ref:"borderColor"}),Cc=e=>[os(e.offsetX??0),os(e.offsetY??0),os(e.radius??0),os(e.spread??0),Ja(e.color??{ref:"foregroundColor"}),...e.inset?["inset"]:[]].join(" "),GS=e=>typeof e=="string"?e:e===!1?"none":typeof e=="object"&&e&&"ref"in e?Lt(e.ref):Array.isArray(e)?e.map(Cc).join(", "):Cc(e),vh=xn,wh=e=>typeof e=="string"?e.includes(",")?e:vc(e):typeof e=="object"&&e&&"googleFont"in e?wh(e.googleFont):typeof e=="object"&&e&&"ref"in e?Lt(e.ref):Array.isArray(e)?e.map(t=>(typeof t=="object"&&"googleFont"in t&&(t=t.googleFont),vc(t))).join(", "):!1,vc=e=>/^[\w-]+$|\w\(/.test(e)?e:JSON.stringify(e),HS=xn,bh=e=>typeof e=="string"?e:typeof e=="object"&&e&&"url"in e?`url(${JSON.stringify(e.url)})`:typeof e=="object"&&e&&"svg"in e?bh({url:`data:image/svg+xml,${encodeURIComponent(e.svg)}`}):typeof e=="object"&&e&&"ref"in e?Lt(e.ref):!1,BS=(e,t,o)=>typeof e=="string"?e:typeof e=="number"?(e>=10&&o?.warn(104,{value:e,param:t}),`${e}s`):typeof e=="object"&&e&&"ref"in e?Lt(e.ref):!1,VS={color:Ja,colorScheme:LS,length:os,scale:OS,border:Ur,borderStyle:vh,shadow:GS,image:bh,fontFamily:wh,fontWeight:HS,duration:BS},NS=(e,t,o)=>{const s=kS(e);return VS[s](t,e,o)},WS=(e,t)=>new Sh({themeLogger:e,overridePrefix:t}),Sh=class yh{constructor(t,o=[]){this.params=t,this.parts=o}withPart(t){return typeof t=="function"&&(t=t()),t instanceof Ch?new yh(this.params,[...this.parts,t]):(this.params.themeLogger.preInitErr(259,"Invalid part",{part:t}),this)}withoutPart(t){return this.withPart(Ne({feature:t}))}withParams(t,o=Xt){return this.withPart(Ne({modeParams:{[o]:t}}))}_startUse({styleContainer:t,cssLayer:o,nonce:s,loadThemeGoogleFonts:i,moduleCss:n}){if(Qa)return;_S(),fh(t,o,s,n);const r=zS(this);if(r.length>0)for(const a of r)i&&US(a,s);for(const a of this.parts)a.use(t,o,s)}_getCssClass(){return this._cssClassCache??(this._cssClassCache=wc(this.parts).map(t=>t.use(void 0,void 0,void 0)).filter(Boolean).concat(this._getParamsClassName()).join(" "))}_getParamsClassName(){return this._paramsClassName??(this._paramsClassName=`ag-theme-params-${++mh().paramsId}`)}_getModeParams(){let t=this._paramsCache;if(!t){const o={[Xt]:{...IS}};for(const s of wc(this.parts))for(const i of Object.keys(s.modeParams)){const n=s.modeParams[i];if(n){const r=o[i]??(o[i]={}),a=new Set;for(const l of Object.keys(n)){const c=n[l];c!==void 0&&(r[l]=c,a.add(l))}if(i===Xt)for(const l of Object.keys(o)){const c=o[l];if(l!==Xt)for(const d of a)delete c[d]}}}this._paramsCache=t=o}return t}_getParamsCss(){if(!this._paramsCssCache){let t="",o="";const s=this._getModeParams(),{overridePrefix:i,themeLogger:n}=this.params,r=i?`--ag-${i}-`:void 0;for(const c of Object.keys(s)){const d=s[c];if(c!==Xt){const h=`:where([data-ag-theme-mode="${typeof CSS=="object"?CSS.escape(c):c}"]) & {
|
|
8
|
+
`;t+=h,o+=h}for(const u of Object.keys(d).sort()){const h=d[u],g=NS(u,h,n);if(g===!1)n.error(107,{key:u,value:h});else{const f=Za(u),m=r?f.replace("--ag-",r):f,C=f.replace("--ag-","--ag-inherited-");t+=` ${f}: var(${C}, ${g});
|
|
9
|
+
`,o+=` ${C}: var(${m});
|
|
10
|
+
`}}c!==Xt&&(t+=`}
|
|
11
|
+
`,o+=`}
|
|
12
|
+
`)}const a=`:where(.${this._getParamsClassName()})`;let l=`${a} {
|
|
13
|
+
${t}}
|
|
14
|
+
`;l+=`:has(> ${a}):not(${a}) {
|
|
15
|
+
${o}}
|
|
16
|
+
`,this._paramsCssCache=l}return this._paramsCssCache}},wc=e=>{const t=new Map;for(const s of e)t.set(s.feature,s);const o=[];for(const s of e)(!s.feature||t.get(s.feature)===s)&&o.push(s);return o},zS=e=>{const t=new Set,o=n=>{if(Array.isArray(n))n.forEach(o);else{const r=n?.googleFont;typeof r=="string"&&t.add(r)}};return Object.values(e._getModeParams()).flatMap(n=>Object.values(n)).forEach(o),Array.from(t).sort()},bc=!1,_S=()=>{if(!bc){bc=!0;for(const e of Array.from(document.head.querySelectorAll('style[data-ag-scope="legacy"]')))e.remove()}},US=async(e,t)=>{const o=`@import url('https://${$S}/css2?family=${encodeURIComponent(e)}:wght@100;200;300;400;500;600;700;800;900&display=swap');
|
|
17
|
+
`;Vo(o,document.head,`googleFont:${e}`,void 0,0,t)},$S="fonts.googleapis.com",Sc={changeKey:"listItemHeight",type:"length",defaultValue:24},KS=class extends qe{constructor(){super(...arguments),this.beanName="environment",this.sizeEls=new Map,this.lastKnownValues=new Map,this.sizesMeasured=!1,this.globalCSS=[]}wireBeans(e){this.eRootDiv=e.eRootDiv}postConstruct(){const{gos:e,eRootDiv:t}=this;e.setInstanceDomData(t);const o=e.get("themeStyleContainer"),s=typeof ShadowRoot<"u",i=s&&t.getRootNode()instanceof ShadowRoot;this.eStyleContainer=(typeof o=="function"?o():o)??(i?t:document.head),!o&&!i&&s&&qS(t,this.shadowRootError.bind(this),this.addDestroyFunc.bind(this)),this.cssLayer=e.get("themeCssLayer"),this.styleNonce=e.get("styleNonce"),this.addManagedPropertyListener("theme",()=>this.handleThemeChange()),this.handleThemeChange(),this.getSizeEl(Sc),this.initVariables(),this.addDestroyFunc(()=>ES(this)),this.mutationObserver=new MutationObserver(()=>{this.fireStylesChangedEvent("theme")}),this.addDestroyFunc(()=>this.mutationObserver.disconnect())}applyThemeClasses(e,t=[]){const{theme:o}=this,s=o?o._getCssClass():this.applyLegacyThemeClasses();for(const i of Array.from(e.classList))i.startsWith("ag-theme-")&&e.classList.remove(i);if(s){const i=e.className;e.className=`${i}${i?" ":""}${s}${t?.length?" "+t.join(" "):""}`}}applyLegacyThemeClasses(){let e="";this.mutationObserver.disconnect();let t=this.eRootDiv;for(;t;){let o=!1;for(const s of Array.from(t.classList))s.startsWith("ag-theme-")&&(o=!0,e=e?`${e} ${s}`:s);o&&this.mutationObserver.observe(t,{attributes:!0,attributeFilter:["class"]}),t=t.parentElement}return e}addGlobalCSS(e,t){this.theme?Vo(e,this.eStyleContainer,t,this.cssLayer,0,this.styleNonce):this.globalCSS.push([e,t])}getDefaultListItemHeight(){return this.getCSSVariablePixelValue(Sc)}getCSSVariablePixelValue(e){const t=this.lastKnownValues.get(e);if(t!=null)return t;const o=this.measureSizeEl(e);return o==="detached"||o==="no-styles"?(e.cacheDefault&&this.lastKnownValues.set(e,e.defaultValue),e.defaultValue):(this.lastKnownValues.set(e,o),o)}measureSizeEl(e){const t=this.getSizeEl(e);if(t.offsetParent==null)return"detached";const o=t.offsetWidth;return o===dr?"no-styles":(this.sizesMeasured=!0,o)}getMeasurementContainer(){let e=this.eMeasurementContainer;return e||(e=this.eMeasurementContainer=Lo({tag:"div",cls:"ag-measurement-container"}),this.eRootDiv.appendChild(e)),e}getSizeEl(e){let t=this.sizeEls.get(e);if(t)return t;const o=this.getMeasurementContainer();t=Lo({tag:"div"});const s=this.setSizeElStyles(t,e);o.appendChild(t),this.sizeEls.set(e,t);const{type:i,noWarn:n}=e;if(i!=="length"&&i!=="border")return t;let r=this.measureSizeEl(e);r==="no-styles"&&!n&&this.varError(s,e.defaultValue);const a=Kt(this.beans,t,()=>{const l=this.measureSizeEl(e);l==="detached"||l==="no-styles"||(this.lastKnownValues.set(e,l),l!==r&&(r=l,this.fireStylesChangedEvent(e.changeKey)))});return this.addDestroyFunc(()=>a()),t}setSizeElStyles(e,t){const{changeKey:o,type:s}=t;let i=Za(o);return s==="border"?(i.endsWith("-width")&&(i=i.slice(0,-6)),e.className="ag-measurement-element-border",e.style.setProperty("--ag-internal-measurement-border",`var(${i}, solid ${dr}px)`)):e.style.width=`var(${i}, ${dr}px)`,i}handleThemeChange(){const{gos:e,theme:t}=this,o=e.get("theme");let s;if(o==="legacy")s=void 0;else{const i=o??this.getDefaultTheme();i instanceof Sh?s=i:this.themeError(i)}s!==t&&this.handleNewTheme(s),this.postProcessThemeChange(s,o)}handleNewTheme(e){const{gos:t,eRootDiv:o,globalCSS:s}=this,i=this.getAdditionalCss();if(e){fh(this.eStyleContainer,this.cssLayer,this.styleNonce,i);for(const[n,r]of s)Vo(n,this.eStyleContainer,r,this.cssLayer,0,this.styleNonce);s.length=0}this.theme=e,e?._startUse({loadThemeGoogleFonts:t.get("loadThemeGoogleFonts"),styleContainer:this.eStyleContainer,cssLayer:this.cssLayer,nonce:this.styleNonce,moduleCss:i}),FS(this,e?._getParamsCss()??null,e?._getParamsClassName()??null,this.eStyleContainer,this.cssLayer,this.styleNonce),this.applyThemeClasses(o),this.fireStylesChangedEvent("theme")}fireStylesChangedEvent(e){this.eventSvc.dispatchEvent({type:"stylesChanged",[`${e}Changed`]:!0})}},dr=15538,qS=(e,t,o)=>{let s=60;const i=setInterval(()=>{typeof ShadowRoot<"u"&&e.getRootNode()instanceof ShadowRoot&&(t(),clearInterval(i)),(e.isConnected||--s<0)&&clearInterval(i)},1e3);o(()=>clearInterval(i))},jS='.ag-aria-description-container{border:0;z-index:9999;clip:rect(1px,1px,1px,1px);height:1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}.ag-unselectable{-webkit-user-select:none;-moz-user-select:none;user-select:none}.ag-selectable{-webkit-user-select:text;-moz-user-select:text;user-select:text}.ag-shake-left-to-right{animation-direction:alternate;animation-duration:.2s;animation-iteration-count:infinite;animation-name:ag-shake-left-to-right}@keyframes ag-shake-left-to-right{0%{padding-left:6px;padding-right:2px}to{padding-left:2px;padding-right:6px}}.ag-body-horizontal-scroll-viewport,.ag-body-vertical-scroll-viewport,.ag-body-viewport,.ag-center-cols-viewport,.ag-floating-bottom-viewport,.ag-floating-top-viewport,.ag-header-viewport,.ag-sticky-bottom-viewport,.ag-sticky-top-viewport{flex:1 1 auto;height:100%;min-width:0;overflow:hidden;position:relative}.ag-viewport{position:relative}.ag-spanning-container{position:absolute;top:0;z-index:1}.ag-body-viewport,.ag-center-cols-viewport,.ag-floating-bottom-viewport,.ag-floating-top-viewport,.ag-header-viewport,.ag-sticky-bottom-viewport,.ag-sticky-top-viewport{overflow-x:auto;-ms-overflow-style:none!important;scrollbar-width:none!important}.ag-body-viewport::-webkit-scrollbar,.ag-center-cols-viewport::-webkit-scrollbar,.ag-floating-bottom-viewport::-webkit-scrollbar,.ag-floating-top-viewport::-webkit-scrollbar,.ag-header-viewport::-webkit-scrollbar,.ag-sticky-bottom-viewport::-webkit-scrollbar,.ag-sticky-top-viewport::-webkit-scrollbar{display:none!important}.ag-body-viewport{display:flex;overflow-x:hidden;&:where(.ag-layout-normal){overflow-y:auto;-webkit-overflow-scrolling:touch}}.ag-floating-bottom-container,.ag-floating-top-container,.ag-sticky-bottom-container,.ag-sticky-top-container{min-height:1px}.ag-center-cols-viewport{min-height:100%;width:100%}.ag-body-horizontal-scroll-viewport{overflow-x:scroll}.ag-body-vertical-scroll-viewport{overflow-y:scroll}.ag-body-container,.ag-body-horizontal-scroll-container,.ag-body-vertical-scroll-container,.ag-center-cols-container,.ag-floating-bottom-container,.ag-floating-bottom-full-width-container,.ag-floating-top-container,.ag-full-width-container,.ag-header-container,.ag-pinned-left-cols-container,.ag-pinned-left-sticky-bottom,.ag-pinned-right-cols-container,.ag-pinned-right-sticky-bottom,.ag-sticky-bottom-container,.ag-sticky-top-container{position:relative}.ag-floating-bottom-container,.ag-floating-top-container,.ag-header-container,.ag-pinned-left-floating-bottom,.ag-pinned-left-floating-top,.ag-pinned-right-floating-bottom,.ag-pinned-right-floating-top,.ag-sticky-bottom-container,.ag-sticky-top-container{height:100%;white-space:nowrap}.ag-center-cols-container,.ag-pinned-right-cols-container{display:block}.ag-body-horizontal-scroll-container{height:100%}.ag-body-vertical-scroll-container{width:100%}.ag-floating-bottom-full-width-container,.ag-floating-top-full-width-container,.ag-full-width-container,.ag-sticky-bottom-full-width-container,.ag-sticky-top-full-width-container{pointer-events:none;position:absolute;top:0}:where(.ag-ltr) .ag-floating-bottom-full-width-container,:where(.ag-ltr) .ag-floating-top-full-width-container,:where(.ag-ltr) .ag-full-width-container,:where(.ag-ltr) .ag-sticky-bottom-full-width-container,:where(.ag-ltr) .ag-sticky-top-full-width-container{left:0}:where(.ag-rtl) .ag-floating-bottom-full-width-container,:where(.ag-rtl) .ag-floating-top-full-width-container,:where(.ag-rtl) .ag-full-width-container,:where(.ag-rtl) .ag-sticky-bottom-full-width-container,:where(.ag-rtl) .ag-sticky-top-full-width-container{right:0}.ag-full-width-container{width:100%}.ag-floating-bottom-full-width-container,.ag-floating-top-full-width-container{display:inline-block;height:100%;overflow:hidden;width:100%}.ag-body{display:flex;flex:1 1 auto;flex-direction:row!important;min-height:0;position:relative}.ag-body-horizontal-scroll,.ag-body-vertical-scroll{display:flex;min-height:0;min-width:0;position:relative;&:where(.ag-scrollbar-invisible){bottom:0;position:absolute;&:where(.ag-apple-scrollbar){opacity:0;transition:opacity .4s;visibility:hidden;&:where(.ag-scrollbar-active),&:where(.ag-scrollbar-scrolling){opacity:1;visibility:visible}}}}.ag-body-horizontal-scroll{width:100%;&:where(.ag-scrollbar-invisible){left:0;right:0}}.ag-body-vertical-scroll{height:100%;&:where(.ag-scrollbar-invisible){top:0;z-index:10}}:where(.ag-ltr) .ag-body-vertical-scroll{&:where(.ag-scrollbar-invisible){right:0}}:where(.ag-rtl) .ag-body-vertical-scroll{&:where(.ag-scrollbar-invisible){left:0}}.ag-force-vertical-scroll{overflow-y:scroll!important}.ag-horizontal-left-spacer,.ag-horizontal-right-spacer{height:100%;min-width:0;overflow-x:scroll;&:where(.ag-scroller-corner){overflow-x:hidden}}:where(.ag-row-animation) .ag-row{transition:transform .4s,top .4s,opacity .2s;&:where(.ag-after-created){transition:transform .4s,top .4s,height .4s,opacity .2s}}:where(.ag-row-animation.ag-prevent-animation) .ag-row{transition:none!important;&:where(.ag-row.ag-after-created){transition:none!important}}:where(.ag-row-no-animation) .ag-row{transition:none}.ag-row-loading{align-items:center;display:flex}.ag-row-position-absolute{position:absolute}.ag-row-position-relative{position:relative}.ag-full-width-row{overflow:hidden;pointer-events:all}.ag-row-inline-editing{z-index:1}.ag-row-dragging{z-index:2}.ag-stub-cell{align-items:center;display:flex}.ag-cell{display:inline-block;height:100%;position:absolute;white-space:nowrap;&:focus-visible{box-shadow:none}}.ag-cell-value{flex:1 1 auto}.ag-cell-value:not(.ag-allow-overflow),.ag-group-value{overflow:hidden;text-overflow:ellipsis}.ag-cell-wrap-text{white-space:normal;word-break:break-word}:where(.ag-cell) .ag-icon{display:inline-block;vertical-align:middle}.ag-floating-top{display:flex;overflow:hidden;position:relative;white-space:nowrap;width:100%}:where(.ag-floating-top:not(.ag-invisible)){border-bottom:var(--ag-pinned-row-border)}.ag-floating-bottom{display:flex;overflow:hidden;position:relative;white-space:nowrap;width:100%}:where(.ag-floating-bottom:not(.ag-invisible)){border-top:var(--ag-pinned-row-border)}.ag-sticky-bottom,.ag-sticky-top{background-color:var(--ag-data-background-color);display:flex;height:0;overflow:hidden;position:absolute;width:100%;z-index:1}.ag-sticky-bottom{box-sizing:content-box!important;:where(.ag-pinned-left-sticky-bottom),:where(.ag-pinned-right-sticky-bottom),:where(.ag-sticky-bottom-container){border-top:var(--ag-row-border);box-sizing:border-box}}.ag-opacity-zero{opacity:0!important}.ag-cell-label-container{align-items:center;display:flex;flex-direction:row-reverse;height:100%;justify-content:space-between;width:100%}:where(.ag-right-aligned-header){.ag-cell-label-container{flex-direction:row}.ag-header-cell-text{text-align:end}}.ag-column-group-icons{display:block;:where(.ag-column-group-closed-icon),:where(.ag-column-group-opened-icon){cursor:pointer}}:where(.ag-ltr){direction:ltr;.ag-body,.ag-body-horizontal-scroll,.ag-body-viewport,.ag-floating-bottom,.ag-floating-top,.ag-header,.ag-sticky-bottom,.ag-sticky-top{flex-direction:row}}:where(.ag-rtl){direction:rtl;text-align:right;.ag-body,.ag-body-horizontal-scroll,.ag-body-viewport,.ag-floating-bottom,.ag-floating-top,.ag-header,.ag-sticky-bottom,.ag-sticky-top{flex-direction:row-reverse}.ag-icon-contracted,.ag-icon-expanded,.ag-icon-tree-closed{display:block}}:where(.ag-rtl){.ag-icon-contracted,.ag-icon-expanded,.ag-icon-tree-closed{transform:rotate(180deg)}}:where(.ag-rtl){.ag-icon-contracted,.ag-icon-expanded,.ag-icon-tree-closed{transform:rotate(-180deg)}}:where(.ag-ltr) .ag-row:not(.ag-row-level-0) .ag-pivot-leaf-group{margin-left:var(--ag-row-group-indent-size)}:where(.ag-rtl) .ag-row:not(.ag-row-level-0) .ag-pivot-leaf-group{margin-right:var(--ag-row-group-indent-size)}:where(.ag-ltr) .ag-row-group-leaf-indent{margin-left:calc(var(--ag-cell-widget-spacing) + var(--ag-icon-size))}:where(.ag-rtl) .ag-row-group-leaf-indent{margin-right:calc(var(--ag-cell-widget-spacing) + var(--ag-icon-size))}.ag-value-change-delta{padding:0 2px}.ag-value-change-delta-up{color:var(--ag-value-change-delta-up-color)}.ag-value-change-delta-down{color:var(--ag-value-change-delta-down-color)}.ag-value-change-value{background-color:transparent;border-radius:1px;padding-left:1px;padding-right:1px;transition:background-color 1s}.ag-value-change-value-highlight{background-color:var(--ag-value-change-value-highlight-background-color);transition:background-color .1s}.ag-cell-data-changed{background-color:var(--ag-value-change-value-highlight-background-color)!important}.ag-cell-data-changed-animation{background-color:transparent}.ag-cell-highlight{background-color:var(--ag-range-selection-highlight-color)!important}.ag-row,.ag-spanned-row{color:var(--ag-cell-text-color);font-family:var(--ag-cell-font-family);font-size:var(--ag-cell-font-size);font-weight:var(--ag-cell-font-weight);white-space:nowrap;--ag-internal-content-line-height:calc(min(var(--ag-row-height), var(--ag-line-height, 1000px)) - var(--ag-internal-row-border-width, 1px) - 2px)}.ag-row{background-color:var(--ag-data-background-color);border-bottom:var(--ag-row-border);height:var(--ag-row-height);width:100%;&.ag-row-editing-invalid{background-color:var(--ag-full-row-edit-invalid-background-color)}}:where(.ag-body-vertical-content-no-gap>div>div>div,.ag-body-vertical-content-no-gap>div>div>div>div)>.ag-row-last{border-bottom-color:transparent}.ag-group-contracted,.ag-group-expanded{cursor:pointer}.ag-cell,.ag-full-width-row .ag-cell-wrapper.ag-row-group{border:1px solid transparent;line-height:var(--ag-internal-content-line-height);-webkit-font-smoothing:subpixel-antialiased}:where(.ag-ltr) .ag-cell{border-right:var(--ag-column-border)}:where(.ag-rtl) .ag-cell{border-left:var(--ag-column-border)}.ag-spanned-cell-wrapper{background-color:var(--ag-data-background-color);position:absolute}.ag-spanned-cell-wrapper>.ag-spanned-cell{display:block;position:relative}:where(.ag-ltr) :where(.ag-body-horizontal-content-no-gap) .ag-column-last{border-right-color:transparent}:where(.ag-rtl) :where(.ag-body-horizontal-content-no-gap) .ag-column-last{border-left-color:transparent}.ag-cell-wrapper{align-items:center;display:flex;>:where(:not(.ag-cell-value,.ag-group-value)){align-items:center;display:flex;height:var(--ag-internal-content-line-height)}&:where(.ag-row-group){align-items:flex-start}:where(.ag-full-width-row) &:where(.ag-row-group){align-items:center;height:100%}}:where(.ag-ltr) .ag-cell-wrapper{padding-left:calc(var(--ag-indentation-level)*var(--ag-row-group-indent-size))}:where(.ag-rtl) .ag-cell-wrapper{padding-right:calc(var(--ag-indentation-level)*var(--ag-row-group-indent-size))}:where(.ag-cell-wrap-text:not(.ag-cell-auto-height)) .ag-cell-wrapper{align-items:normal;height:100%;:where(.ag-cell-value){height:100%}}:where(.ag-ltr) .ag-row>.ag-cell-wrapper.ag-row-group{padding-left:calc(var(--ag-cell-horizontal-padding) + var(--ag-row-group-indent-size)*var(--ag-indentation-level))}:where(.ag-rtl) .ag-row>.ag-cell-wrapper.ag-row-group{padding-right:calc(var(--ag-cell-horizontal-padding) + var(--ag-row-group-indent-size)*var(--ag-indentation-level))}.ag-cell-focus:not(.ag-cell-range-selected):focus-within,.ag-cell-range-single-cell,.ag-cell-range-single-cell.ag-cell-range-handle,.ag-context-menu-open .ag-cell-focus:not(.ag-cell-range-selected),.ag-context-menu-open .ag-full-width-row.ag-row-focus .ag-cell-wrapper.ag-row-group,.ag-full-width-row.ag-row-focus:focus .ag-cell-wrapper.ag-row-group{border:1px solid;border-color:var(--ag-range-selection-border-color);border-style:var(--ag-range-selection-border-style);outline:initial}.ag-full-width-row.ag-row-focus:focus{box-shadow:none}:where(.ag-ltr) .ag-group-contracted,:where(.ag-ltr) .ag-group-expanded,:where(.ag-ltr) .ag-row-drag,:where(.ag-ltr) .ag-selection-checkbox{margin-right:var(--ag-cell-widget-spacing)}:where(.ag-rtl) .ag-group-contracted,:where(.ag-rtl) .ag-group-expanded,:where(.ag-rtl) .ag-row-drag,:where(.ag-rtl) .ag-selection-checkbox{margin-left:var(--ag-cell-widget-spacing)}.ag-drag-handle-disabled{opacity:.35;pointer-events:none}:where(.ag-ltr) .ag-group-child-count{margin-left:3px}:where(.ag-rtl) .ag-group-child-count{margin-right:3px}.ag-row-highlight-above:after,.ag-row-highlight-below:after,.ag-row-highlight-inside:after{background-color:var(--ag-row-drag-indicator-color);border-radius:calc(var(--ag-row-drag-indicator-width)/2);content:"";height:var(--ag-row-drag-indicator-width);pointer-events:none;position:absolute;width:calc(100% - 1px)}:where(.ag-ltr) .ag-row-highlight-above:after,:where(.ag-ltr) .ag-row-highlight-below:after,:where(.ag-ltr) .ag-row-highlight-inside:after{left:1px}:where(.ag-rtl) .ag-row-highlight-above:after,:where(.ag-rtl) .ag-row-highlight-below:after,:where(.ag-rtl) .ag-row-highlight-inside:after{right:1px}.ag-row-highlight-above:after{top:0}.ag-row-highlight-below:after{bottom:0}.ag-row-highlight-indent:after{display:block;width:auto}:where(.ag-ltr) .ag-row-highlight-indent:after{left:calc((var(--ag-cell-widget-spacing) + var(--ag-icon-size))*2 + var(--ag-cell-horizontal-padding) + var(--ag-row-highlight-level)*var(--ag-row-group-indent-size));right:1px}:where(.ag-rtl) .ag-row-highlight-indent:after{left:1px;right:calc((var(--ag-cell-widget-spacing) + var(--ag-icon-size))*2 + var(--ag-cell-horizontal-padding) + var(--ag-row-highlight-level)*var(--ag-row-group-indent-size))}.ag-row-highlight-inside:after{background-color:var(--ag-selected-row-background-color);border:1px solid var(--ag-range-selection-border-color);display:block;height:auto;inset:0;width:auto}.ag-body,.ag-floating-bottom,.ag-floating-top{background-color:var(--ag-data-background-color)}.ag-row-odd{background-color:var(--ag-odd-row-background-color)}.ag-row-selected:before{background-color:var(--ag-selected-row-background-color);content:"";display:block;inset:0;pointer-events:none;position:absolute}.ag-row-hover.ag-full-width-row.ag-row-group:before,.ag-row-hover:not(.ag-full-width-row):before{background-color:var(--ag-row-hover-color);content:"";display:block;inset:0;pointer-events:none;position:absolute}.ag-row-hover.ag-row-selected:before{background-color:var(--ag-row-hover-color);background-image:linear-gradient(var(--ag-selected-row-background-color),var(--ag-selected-row-background-color))}.ag-row.ag-full-width-row.ag-row-group>*{position:relative}.ag-column-hover{background-color:var(--ag-column-hover-color)}.ag-header-range-highlight{background-color:var(--ag-range-header-highlight-color)}.ag-right-aligned-cell{font-variant-numeric:tabular-nums}:where(.ag-ltr) .ag-right-aligned-cell{text-align:right}:where(.ag-rtl) .ag-right-aligned-cell{text-align:left}.ag-right-aligned-cell .ag-cell-value,.ag-right-aligned-cell .ag-group-value{margin-left:auto}:where(.ag-ltr) .ag-cell:not(.ag-cell-inline-editing),:where(.ag-ltr) .ag-full-width-row .ag-cell-wrapper.ag-row-group{padding-left:calc(var(--ag-cell-horizontal-padding) - 1px + var(--ag-row-group-indent-size)*var(--ag-indentation-level));padding-right:calc(var(--ag-cell-horizontal-padding) - 1px)}:where(.ag-rtl) .ag-cell:not(.ag-cell-inline-editing),:where(.ag-rtl) .ag-full-width-row .ag-cell-wrapper.ag-row-group{padding-left:calc(var(--ag-cell-horizontal-padding) - 1px);padding-right:calc(var(--ag-cell-horizontal-padding) - 1px + var(--ag-row-group-indent-size)*var(--ag-indentation-level))}.ag-row>.ag-cell-wrapper{padding-left:calc(var(--ag-cell-horizontal-padding) - 1px);padding-right:calc(var(--ag-cell-horizontal-padding) - 1px)}.ag-row-dragging{cursor:move;opacity:.5}.ag-details-row{background-color:var(--ag-data-background-color);padding:calc(var(--ag-spacing)*3.75)}.ag-layout-auto-height,.ag-layout-print{.ag-center-cols-container,.ag-center-cols-viewport{min-height:150px}}.ag-overlay-exporting-wrapper,.ag-overlay-loading-wrapper,.ag-overlay-modal-wrapper{background-color:var(--ag-modal-overlay-background-color)}.ag-skeleton-container{align-content:center;height:100%;width:100%}.ag-skeleton-effect{animation:ag-skeleton-loading 1.5s ease-in-out .5s infinite;background-color:var(--ag-row-loading-skeleton-effect-color);border-radius:.25rem;height:1em;width:100%}:where(.ag-ltr) .ag-right-aligned-cell .ag-skeleton-effect{margin-left:auto}:where(.ag-rtl) .ag-right-aligned-cell .ag-skeleton-effect{margin-right:auto}@keyframes ag-skeleton-loading{0%{background-color:var(--ag-row-loading-skeleton-effect-color)}50%{background-color:color-mix(in srgb,transparent,var(--ag-row-loading-skeleton-effect-color) 40%)}to{background-color:var(--ag-row-loading-skeleton-effect-color)}}.ag-loading{align-items:center;display:flex;height:100%}:where(.ag-ltr) .ag-loading{padding-left:var(--ag-cell-horizontal-padding)}:where(.ag-rtl) .ag-loading{padding-right:var(--ag-cell-horizontal-padding)}:where(.ag-ltr) .ag-loading-icon{padding-right:var(--ag-cell-widget-spacing)}:where(.ag-rtl) .ag-loading-icon{padding-left:var(--ag-cell-widget-spacing)}.ag-header{background-color:var(--ag-header-background-color);border-bottom:var(--ag-header-row-border);color:var(--ag-header-text-color);display:flex;font-family:var(--ag-header-font-family);font-size:var(--ag-header-font-size);font-weight:var(--ag-header-font-weight);overflow:hidden;white-space:nowrap;width:100%}.ag-header-row{height:var(--ag-header-height);position:absolute}.ag-floating-filter-button-button,.ag-header-cell-filter-button,.ag-header-cell-menu-button,.ag-header-expand-icon,.ag-panel-title-bar-button,:where(.ag-header-cell-sortable) .ag-header-cell-label,:where(.ag-header-group-cell-selectable) .ag-header-cell-comp-wrapper{cursor:pointer}:where(.ag-ltr) .ag-header-expand-icon{margin-left:4px}:where(.ag-rtl) .ag-header-expand-icon{margin-right:4px}.ag-header-row:where(:not(:first-child)){:where(.ag-header-cell:not(.ag-header-span-height.ag-header-span-total,.ag-header-parent-hidden)),:where(.ag-header-group-cell.ag-header-group-cell-with-group){border-top:var(--ag-header-row-border)}}.ag-header-row:where(:not(.ag-header-row-column-group)){overflow:hidden}:where(.ag-header.ag-header-allow-overflow) .ag-header-row{overflow:visible}.ag-header-cell{display:inline-flex;overflow:hidden}.ag-header-group-cell{contain:paint;display:flex}.ag-header-cell,.ag-header-group-cell{align-items:center;gap:var(--ag-cell-widget-spacing);height:100%;padding:0 var(--ag-cell-horizontal-padding);position:absolute}@property --ag-internal-moving-color{syntax:"<color>";inherits:false;initial-value:transparent}@property --ag-internal-hover-color{syntax:"<color>";inherits:false;initial-value:transparent}.ag-header-cell:where(:not(.ag-floating-filter)):before,.ag-header-group-cell:before{background-image:linear-gradient(var(--ag-internal-hover-color),var(--ag-internal-hover-color)),linear-gradient(var(--ag-internal-moving-color),var(--ag-internal-moving-color));content:"";inset:0;position:absolute;--ag-internal-moving-color:transparent;--ag-internal-hover-color:transparent;transition:--ag-internal-moving-color var(--ag-header-cell-background-transition-duration),--ag-internal-hover-color var(--ag-header-cell-background-transition-duration)}.ag-header-cell:where(:not(.ag-floating-filter)):where(:hover):before,.ag-header-group-cell:where(:hover):before{--ag-internal-hover-color:var(--ag-header-cell-hover-background-color)}.ag-header-cell:where(:not(.ag-floating-filter)):where(.ag-header-cell-moving):before,.ag-header-group-cell:where(.ag-header-cell-moving):before{--ag-internal-moving-color:var(--ag-header-cell-moving-background-color);--ag-internal-hover-color:var(--ag-header-cell-hover-background-color)}:where(.ag-header-cell:not(.ag-floating-filter)>*,.ag-header-group-cell>*){position:relative;z-index:1}.ag-header-cell-menu-button:where(:not(.ag-header-menu-always-show)){opacity:0;transition:opacity .2s}.ag-header-cell-filter-button,:where(.ag-header-cell.ag-header-active) .ag-header-cell-menu-button{opacity:1}.ag-header-cell-label,.ag-header-group-cell-label{align-items:center;align-self:stretch;display:flex;flex:1 1 auto;overflow:hidden;padding:5px 0}:where(.ag-ltr) .ag-sort-indicator-icon{padding-left:var(--ag-spacing)}:where(.ag-rtl) .ag-sort-indicator-icon{padding-right:var(--ag-spacing)}.ag-header-cell-label{text-overflow:ellipsis}.ag-header-group-cell-label.ag-sticky-label{flex:none;max-width:100%;overflow:visible;position:sticky}:where(.ag-ltr) .ag-header-group-cell-label.ag-sticky-label{left:var(--ag-cell-horizontal-padding)}:where(.ag-rtl) .ag-header-group-cell-label.ag-sticky-label{right:var(--ag-cell-horizontal-padding)}.ag-header-cell-text,.ag-header-group-text{overflow:hidden;text-overflow:ellipsis}.ag-header-cell-text{word-break:break-word}.ag-header-cell-comp-wrapper{width:100%}:where(.ag-header-group-cell) .ag-header-cell-comp-wrapper{display:flex}:where(.ag-header-cell:not(.ag-header-cell-auto-height)) .ag-header-cell-comp-wrapper{align-items:center;display:flex;height:100%}.ag-header-cell-wrap-text .ag-header-cell-comp-wrapper{white-space:normal}.ag-header-cell-comp-wrapper-limited-height>*{overflow:hidden}:where(.ag-right-aligned-header) .ag-header-cell-label{flex-direction:row-reverse}:where(.ag-header-cell:not(.ag-right-aligned-header)){.ag-header-col-ref{color:var(--ag-subtle-text-color)}}:where(.ag-ltr) :where(.ag-header-cell:not(.ag-right-aligned-header)){.ag-header-col-ref{margin-right:var(--ag-spacing)}.ag-header-label-icon,.ag-header-menu-icon{margin-left:var(--ag-spacing)}}:where(.ag-rtl) :where(.ag-header-cell:not(.ag-right-aligned-header)){.ag-header-col-ref{margin-left:var(--ag-spacing)}.ag-header-label-icon,.ag-header-menu-icon{margin-right:var(--ag-spacing)}}:where(.ag-header-cell.ag-right-aligned-header){.ag-header-col-ref{color:var(--ag-subtle-text-color)}}:where(.ag-ltr) :where(.ag-header-cell.ag-right-aligned-header){.ag-header-col-ref{margin-left:var(--ag-spacing)}.ag-header-label-icon,.ag-header-menu-icon{margin-right:var(--ag-spacing)}}:where(.ag-rtl) :where(.ag-header-cell.ag-right-aligned-header){.ag-header-col-ref{margin-right:var(--ag-spacing)}.ag-header-label-icon,.ag-header-menu-icon{margin-left:var(--ag-spacing)}}.ag-header-cell:after,.ag-header-group-cell:where(:not(.ag-header-span-height.ag-header-group-cell-no-group)):after{content:"";height:var(--ag-header-column-border-height);position:absolute;top:calc(50% - var(--ag-header-column-border-height)*.5);z-index:1}:where(.ag-ltr) .ag-header-cell:after,:where(.ag-ltr) .ag-header-group-cell:where(:not(.ag-header-span-height.ag-header-group-cell-no-group)):after{border-right:var(--ag-header-column-border);right:0}:where(.ag-rtl) .ag-header-cell:after,:where(.ag-rtl) .ag-header-group-cell:where(:not(.ag-header-span-height.ag-header-group-cell-no-group)):after{border-left:var(--ag-header-column-border);left:0}.ag-header-highlight-after:after,.ag-header-highlight-before:after{background-color:var(--ag-column-drag-indicator-color);border-radius:calc(var(--ag-column-drag-indicator-width)/2);content:"";height:100%;position:absolute;top:0;width:var(--ag-column-drag-indicator-width)}:where(.ag-ltr) .ag-header-highlight-before:after{left:0}:where(.ag-rtl) .ag-header-highlight-before:after{right:0}:where(.ag-ltr) .ag-header-highlight-after:after{right:0;:where(.ag-pinned-left-header) &{right:1px}}:where(.ag-rtl) .ag-header-highlight-after:after{left:0;:where(.ag-pinned-left-header) &{left:1px}}.ag-header-cell-resize{align-items:center;cursor:ew-resize;display:flex;height:100%;position:absolute;top:0;width:8px;z-index:2}:where(.ag-ltr) .ag-header-cell-resize{right:-3px}:where(.ag-rtl) .ag-header-cell-resize{left:-3px}.ag-header-cell-resize:after{background-color:var(--ag-header-column-resize-handle-color);content:"";height:var(--ag-header-column-resize-handle-height);position:absolute;top:calc(50% - var(--ag-header-column-resize-handle-height)*.5);width:var(--ag-header-column-resize-handle-width);z-index:1}:where(.ag-ltr) .ag-header-cell-resize:after{left:calc(50% - var(--ag-header-column-resize-handle-width))}:where(.ag-rtl) .ag-header-cell-resize:after{right:calc(50% - var(--ag-header-column-resize-handle-width))}:where(.ag-header-cell.ag-header-span-height) .ag-header-cell-resize:after{height:calc(100% - var(--ag-spacing)*4);top:calc(var(--ag-spacing)*2)}.ag-header-group-cell-no-group:where(.ag-header-span-height){display:none}.ag-sort-indicator-container{display:flex;gap:var(--ag-spacing)}.ag-layout-print{&.ag-body{display:block;height:unset}&.ag-root-wrapper{container-type:normal;display:inline-block}.ag-body-horizontal-scroll,.ag-body-vertical-scroll{display:none}&.ag-force-vertical-scroll{overflow-y:visible!important}}@media print{.ag-root-wrapper.ag-layout-print{container-type:normal;display:table;.ag-body-horizontal-scroll-viewport,.ag-body-viewport,.ag-center-cols-container,.ag-center-cols-viewport,.ag-root,.ag-root-wrapper-body,.ag-virtual-list-viewport{display:block!important;height:auto!important;overflow:hidden!important}.ag-cell,.ag-row{-moz-column-break-inside:avoid;break-inside:avoid}}}ag-grid,ag-grid-angular{display:block}.ag-root-wrapper{border:var(--ag-wrapper-border);border-radius:var(--ag-wrapper-border-radius);container-type:inline-size;display:flex;flex-direction:column;overflow:hidden;position:relative;&.ag-layout-normal{height:100%}}.ag-root-wrapper-body{display:flex;flex-direction:row;&.ag-layout-normal{flex:1 1 auto;height:0;min-height:0}}.ag-root{display:flex;flex-direction:column;position:relative;&.ag-layout-auto-height,&.ag-layout-normal{flex:1 1 auto;overflow:hidden;width:0}&.ag-layout-normal{height:100%}}.ag-drag-handle{color:var(--ag-drag-handle-color);cursor:grab;:where(.ag-icon){color:var(--ag-drag-handle-color)}}.ag-chart-menu-icon,.ag-chart-settings-next,.ag-chart-settings-prev,.ag-column-group-icons,.ag-column-select-header-icon,.ag-filter-toolpanel-expand,.ag-floating-filter-button-button,.ag-group-title-bar-icon,.ag-header-cell-filter-button,.ag-header-cell-menu-button,.ag-header-expand-icon,.ag-panel-title-bar-button,.ag-panel-title-bar-button-icon,.ag-set-filter-group-icons,:where(.ag-group-contracted) .ag-icon,:where(.ag-group-expanded) .ag-icon{background-color:var(--ag-icon-button-background-color);border-radius:var(--ag-icon-button-border-radius);box-shadow:0 0 0 var(--ag-icon-button-background-spread) var(--ag-icon-button-background-color);color:var(--ag-icon-button-color)}.ag-chart-menu-icon:hover,.ag-chart-settings-next:hover,.ag-chart-settings-prev:hover,.ag-column-group-icons:hover,.ag-column-select-header-icon:hover,.ag-filter-toolpanel-expand:hover,.ag-floating-filter-button-button:hover,.ag-group-title-bar-icon:hover,.ag-header-cell-filter-button:hover,.ag-header-cell-menu-button:hover,.ag-header-expand-icon:hover,.ag-panel-title-bar-button-icon:hover,.ag-panel-title-bar-button:hover,.ag-set-filter-group-icons:hover,:where(.ag-group-contracted) .ag-icon:hover,:where(.ag-group-expanded) .ag-icon:hover{background-color:var(--ag-icon-button-hover-background-color);box-shadow:0 0 0 var(--ag-icon-button-background-spread) var(--ag-icon-button-hover-background-color);color:var(--ag-icon-button-hover-color)}:where(.ag-filter-active),:where(.ag-filter-toolpanel-group-instance-header-icon),:where(.ag-filter-toolpanel-instance-header-icon){position:relative}:where(.ag-filter-active):after,:where(.ag-filter-toolpanel-group-instance-header-icon):after,:where(.ag-filter-toolpanel-instance-header-icon):after{background-color:var(--ag-icon-button-active-indicator-color);border-radius:50%;content:"";height:6px;position:absolute;top:-1px;width:6px}:where(.ag-ltr) :where(.ag-filter-active):after,:where(.ag-ltr) :where(.ag-filter-toolpanel-group-instance-header-icon):after,:where(.ag-ltr) :where(.ag-filter-toolpanel-instance-header-icon):after{right:-1px}:where(.ag-rtl) :where(.ag-filter-active):after,:where(.ag-rtl) :where(.ag-filter-toolpanel-group-instance-header-icon):after,:where(.ag-rtl) :where(.ag-filter-toolpanel-instance-header-icon):after{left:-1px}.ag-filter-active{background-image:linear-gradient(var(--ag-icon-button-active-background-color),var(--ag-icon-button-active-background-color));border-radius:1px;outline:solid var(--ag-icon-button-background-spread) var(--ag-icon-button-active-background-color);:where(.ag-icon-filter){clip-path:path("M8,0C8,4.415 11.585,8 16,8L16,16L0,16L0,0L8,0Z");color:var(--ag-icon-button-active-color)}}',YS={wrapperBorder:!0,rowBorder:!0,headerRowBorder:!0,footerRowBorder:{ref:"rowBorder"},columnBorder:{style:"solid",width:1,color:"transparent"},headerColumnBorder:!1,headerColumnBorderHeight:"100%",pinnedColumnBorder:!0,pinnedRowBorder:!0,sidePanelBorder:!0,sideBarPanelWidth:250,sideBarPanelAnimationDuration:0,sideBarBackgroundColor:{ref:"chromeBackgroundColor"},sideButtonBarBackgroundColor:{ref:"sideBarBackgroundColor"},sideButtonBarTopPadding:0,sideButtonSelectedUnderlineWidth:2,sideButtonSelectedUnderlineColor:"transparent",sideButtonSelectedUnderlineTransitionDuration:0,sideButtonBackgroundColor:"transparent",sideButtonTextColor:{ref:"textColor"},sideButtonHoverBackgroundColor:{ref:"sideButtonBackgroundColor"},sideButtonHoverTextColor:{ref:"sideButtonTextColor"},sideButtonSelectedBackgroundColor:Ee,sideButtonSelectedTextColor:{ref:"sideButtonTextColor"},sideButtonBorder:"solid 1px transparent",sideButtonSelectedBorder:!0,sideButtonLeftPadding:{ref:"spacing"},sideButtonRightPadding:{ref:"spacing"},sideButtonVerticalPadding:{calc:"spacing * 3"},cellFontFamily:{ref:"fontFamily"},cellFontSize:{ref:"dataFontSize"},cellFontWeight:{ref:"fontWeight"},headerCellHoverBackgroundColor:"transparent",headerCellMovingBackgroundColor:{ref:"headerCellHoverBackgroundColor"},headerCellBackgroundTransitionDuration:"0.2s",cellTextColor:{ref:"textColor"},rangeSelectionBorderStyle:"solid",rangeSelectionBorderColor:st,rangeSelectionBackgroundColor:Et(.2),rangeSelectionChartBackgroundColor:"#0058FF1A",rangeSelectionChartCategoryBackgroundColor:"#00FF841A",rangeSelectionHighlightColor:Et(.5),rangeHeaderHighlightColor:TS(.08),rowNumbersSelectedColor:Et(.5),rowHoverColor:Et(.08),columnHoverColor:Et(.05),selectedRowBackgroundColor:Et(.12),modalOverlayBackgroundColor:{ref:"backgroundColor",mix:.66},dataBackgroundColor:Ee,oddRowBackgroundColor:{ref:"dataBackgroundColor"},wrapperBorderRadius:8,cellHorizontalPadding:{calc:"spacing * 2 * cellHorizontalPaddingScale"},cellWidgetSpacing:{calc:"spacing * 1.5"},cellHorizontalPaddingScale:1,rowGroupIndentSize:{calc:"cellWidgetSpacing + iconSize"},valueChangeDeltaUpColor:"#43a047",valueChangeDeltaDownColor:"#e53935",valueChangeValueHighlightBackgroundColor:"#16a08580",rowHeight:{calc:"max(iconSize, cellFontSize) + spacing * 3.25 * rowVerticalPaddingScale"},rowVerticalPaddingScale:1,paginationPanelHeight:{ref:"rowHeight",calc:"max(rowHeight, 22px)"},dragHandleColor:ze(.7),headerColumnResizeHandleHeight:"30%",headerColumnResizeHandleWidth:2,headerColumnResizeHandleColor:{ref:"borderColor"},iconButtonColor:{ref:"iconColor"},iconButtonBackgroundColor:"transparent",iconButtonBackgroundSpread:4,iconButtonBorderRadius:1,iconButtonHoverColor:{ref:"iconButtonColor"},iconButtonHoverBackgroundColor:ze(.1),iconButtonActiveColor:st,iconButtonActiveBackgroundColor:Et(.28),iconButtonActiveIndicatorColor:st,setFilterIndentSize:{ref:"iconSize"},chartMenuPanelWidth:260,chartMenuLabelColor:ze(.8),cellEditingBorder:{color:st},cellEditingShadow:{ref:"cardShadow"},fullRowEditInvalidBackgroundColor:{ref:"invalidColor",onto:"backgroundColor",mix:.25},columnSelectIndentSize:{ref:"iconSize"},toolPanelSeparatorBorder:!0,columnDropCellBackgroundColor:ze(.07),columnDropCellTextColor:{ref:"textColor"},columnDropCellDragHandleColor:{ref:"textColor"},columnDropCellBorder:{color:ze(.13)},selectCellBackgroundColor:ze(.07),selectCellBorder:{color:ze(.13)},advancedFilterBuilderButtonBarBorder:!0,advancedFilterBuilderIndentSize:{calc:"spacing * 2 + iconSize"},advancedFilterBuilderJoinPillColor:"#f08e8d",advancedFilterBuilderColumnPillColor:"#a6e194",advancedFilterBuilderOptionPillColor:"#f3c08b",advancedFilterBuilderValuePillColor:"#85c0e4",filterPanelApplyButtonColor:Ee,filterPanelApplyButtonBackgroundColor:st,columnPanelApplyButtonColor:Ee,columnPanelApplyButtonBackgroundColor:st,filterPanelCardSubtleColor:{ref:"textColor",mix:.7},filterPanelCardSubtleHoverColor:{ref:"textColor"},findMatchColor:Dt,findMatchBackgroundColor:"#ffff00",findActiveMatchColor:Dt,findActiveMatchBackgroundColor:"#ffa500",filterToolPanelGroupIndent:{ref:"spacing"},rowLoadingSkeletonEffectColor:ze(.15),statusBarLabelColor:Dt,statusBarLabelFontWeight:500,statusBarValueColor:Dt,statusBarValueFontWeight:500,pinnedSourceRowTextColor:{ref:"textColor"},pinnedSourceRowBackgroundColor:{ref:"dataBackgroundColor"},pinnedSourceRowFontWeight:600,pinnedRowFontWeight:600,pinnedRowBackgroundColor:{ref:"dataBackgroundColor"},pinnedRowTextColor:{ref:"textColor"},rowDragIndicatorColor:{ref:"rangeSelectionBorderColor"},rowDragIndicatorWidth:2,columnDragIndicatorColor:{ref:"accentColor"},columnDragIndicatorWidth:2},QS=".ag-cell-batch-edit{background-color:var(--ag-cell-batch-edit-background-color);color:var(--ag-cell-batch-edit-text-color);display:inherit}.ag-row-batch-edit{background-color:var(--ag-row-batch-edit-background-color);color:var(--ag-row-batch-edit-text-color)}",Rh={cellBatchEditBackgroundColor:"rgba(220 181 139 / 16%)",cellBatchEditTextColor:"#422f00",rowBatchEditBackgroundColor:{ref:"cellBatchEditBackgroundColor"},rowBatchEditTextColor:{ref:"cellBatchEditTextColor"}},ZS={...Rh,cellBatchEditTextColor:"#f3d0b3"},JS=()=>Ne({feature:"batchEditStyle",params:Rh,css:QS}),XS=JS(),Fh=":where(.ag-button){background:none;border:none;color:inherit;cursor:pointer;font-family:inherit;font-size:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0;text-indent:inherit;text-shadow:inherit;text-transform:inherit;word-spacing:inherit;&:disabled{cursor:default}&:focus-visible{box-shadow:var(--ag-focus-shadow);outline:none}}.ag-standard-button{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:var(--ag-button-background-color);border:var(--ag-button-border);border-radius:var(--ag-button-border-radius);color:var(--ag-button-text-color);cursor:pointer;font-weight:var(--ag-button-font-weight);padding:var(--ag-button-vertical-padding) var(--ag-button-horizontal-padding);&:active{background-color:var(--ag-button-active-background-color);border:var(--ag-button-active-border);color:var(--ag-button-active-text-color)}&:disabled{background-color:var(--ag-button-disabled-background-color);border:var(--ag-button-disabled-border);color:var(--ag-button-disabled-text-color)}}.ag-standard-button:hover{background-color:var(--ag-button-hover-background-color);border:var(--ag-button-hover-border);color:var(--ag-button-hover-text-color)}",Eh={buttonTextColor:"inherit",buttonFontWeight:"normal",buttonBackgroundColor:"transparent",buttonBorder:!1,buttonBorderRadius:{ref:"borderRadius"},buttonHorizontalPadding:{calc:"spacing * 2"},buttonVerticalPadding:{ref:"spacing"},buttonHoverTextColor:{ref:"buttonTextColor"},buttonHoverBackgroundColor:{ref:"buttonBackgroundColor"},buttonHoverBorder:{ref:"buttonBorder"},buttonActiveTextColor:{ref:"buttonHoverTextColor"},buttonActiveBackgroundColor:{ref:"buttonHoverBackgroundColor"},buttonActiveBorder:{ref:"buttonHoverBorder"},buttonDisabledTextColor:{ref:"inputDisabledTextColor"},buttonDisabledBackgroundColor:{ref:"inputDisabledBackgroundColor"},buttonDisabledBorder:{ref:"inputDisabledBorder"}},ey=()=>Ne({feature:"buttonStyle",params:{...Eh,buttonBackgroundColor:Ee,buttonBorder:!0,buttonHoverBackgroundColor:{ref:"rowHoverColor"},buttonActiveBorder:{color:st}},css:Fh}),ty=ey(),oy=()=>Ne({feature:"buttonStyle",params:{...Eh,buttonBorder:{color:Dt,width:2,style:"outset"},buttonActiveBorder:{color:Dt,width:2,style:"inset"},buttonBackgroundColor:ke(.07),buttonHoverBackgroundColor:Ee,buttonVerticalPadding:{calc:"spacing * 0.5"}},css:Fh}),sy=oy(),iy=".ag-column-drop-vertical-empty-message{align-items:center;border:dashed var(--ag-border-width);border-color:var(--ag-border-color);display:flex;inset:0;justify-content:center;margin:calc(var(--ag-spacing)*1.5) calc(var(--ag-spacing)*2);overflow:hidden;padding:calc(var(--ag-spacing)*2);position:absolute}",ny=".ag-column-drop-vertical-empty-message{color:var(--ag-subtle-text-color);font-size:calc(var(--ag-font-size) - 1px);font-weight:600;padding-top:var(--ag-spacing)}:where(.ag-ltr) .ag-column-drop-vertical-empty-message{padding-left:calc(var(--ag-icon-size) + var(--ag-spacing) + var(--ag-widget-horizontal-spacing));padding-right:var(--ag-spacing)}:where(.ag-rtl) .ag-column-drop-vertical-empty-message{padding-left:var(--ag-spacing);padding-right:calc(var(--ag-icon-size) + var(--ag-spacing) + var(--ag-widget-horizontal-spacing))}",ry=()=>Ne({feature:"columnDropStyle",css:iy}),xh=ry(),ay=()=>Ne({feature:"columnDropStyle",css:ny}),ly=ay(),cy={formulaToken1Color:"#3269c6",formulaToken1BackgroundColor:{ref:"formulaToken1Color",mix:.08},formulaToken1Border:{color:{ref:"formulaToken1Color"}},formulaToken2Color:"#c0343f",formulaToken2BackgroundColor:{ref:"formulaToken2Color",mix:.06},formulaToken2Border:{color:{ref:"formulaToken2Color"}},formulaToken3Color:"#8156b8",formulaToken3BackgroundColor:{ref:"formulaToken3Color",mix:.08},formulaToken3Border:{color:{ref:"formulaToken3Color"}},formulaToken4Color:"#007c1f",formulaToken4BackgroundColor:{ref:"formulaToken4Color",mix:.06},formulaToken4Border:{color:{ref:"formulaToken4Color"}},formulaToken5Color:"#b03e85",formulaToken5BackgroundColor:{ref:"formulaToken5Color",mix:.08},formulaToken5Border:{color:{ref:"formulaToken5Color"}},formulaToken6Color:"#b74900",formulaToken6BackgroundColor:{ref:"formulaToken6Color",mix:.06},formulaToken6Border:{color:{ref:"formulaToken6Color"}},formulaToken7Color:"#247492",formulaToken7BackgroundColor:{ref:"formulaToken7Color",mix:.08},formulaToken7Border:{color:{ref:"formulaToken7Color"}}},dy=()=>Ne({feature:"formulaStyle",params:cy}),uy=dy(),hy={warn:(...e)=>{D(e[0],e[1])},error:(...e)=>{ce(e[0],e[1])},preInitErr:(...e)=>{Ls(e[0],e[2],e[1])}},Ph=()=>WS(hy).withParams(YS).withPart(ty).withPart(xh).withPart(XS).withPart(uy),gy='.ag-checkbox-input-wrapper,.ag-radio-button-input-wrapper{background-color:var(--ag-checkbox-unchecked-background-color);border:solid var(--ag-checkbox-border-width) var(--ag-checkbox-unchecked-border-color);flex:none;height:var(--ag-icon-size);position:relative;width:var(--ag-icon-size);&:where(.ag-checked){background-color:var(--ag-checkbox-checked-background-color);border-color:var(--ag-checkbox-checked-border-color)}&:where(.ag-checked):after{background-color:var(--ag-checkbox-checked-shape-color)}&:where(.ag-disabled){filter:grayscale();opacity:.5}}.ag-checkbox-input,.ag-radio-button-input{-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:pointer;display:block;height:var(--ag-icon-size);margin:0;opacity:0;width:var(--ag-icon-size)}.ag-checkbox-input-wrapper:after,.ag-radio-button-input-wrapper:after{content:"";display:block;inset:0;-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;pointer-events:none;position:absolute}.ag-checkbox-input-wrapper:where(:focus-within,:active),.ag-radio-button-input-wrapper:where(:focus-within,:active){box-shadow:var(--ag-focus-shadow)}.ag-checkbox-input-wrapper{border-radius:var(--ag-checkbox-border-radius);&:where(.ag-checked):after{-webkit-mask-image:var(--ag-checkbox-checked-shape-image);mask-image:var(--ag-checkbox-checked-shape-image)}&:where(.ag-indeterminate){background-color:var(--ag-checkbox-indeterminate-background-color);border-color:var(--ag-checkbox-indeterminate-border-color)}&:where(.ag-indeterminate):after{background-color:var(--ag-checkbox-indeterminate-shape-color);-webkit-mask-image:var(--ag-checkbox-indeterminate-shape-image);mask-image:var(--ag-checkbox-indeterminate-shape-image)}}.ag-cell-editing-error .ag-checkbox-input-wrapper:focus-within{box-shadow:var(--ag-focus-error-shadow)}.ag-radio-button-input-wrapper{border-radius:100%;&:where(.ag-checked):after{-webkit-mask-image:var(--ag-radio-checked-shape-image);mask-image:var(--ag-radio-checked-shape-image)}}',py=()=>Ne({feature:"checkboxStyle",params:{checkboxBorderWidth:1,checkboxBorderRadius:{ref:"borderRadius"},checkboxUncheckedBackgroundColor:Ee,checkboxUncheckedBorderColor:ke(.3),checkboxCheckedBackgroundColor:st,checkboxCheckedBorderColor:{ref:"checkboxCheckedBackgroundColor"},checkboxCheckedShapeImage:{svg:'<svg xmlns="http://www.w3.org/2000/svg" width="10" height="7" fill="none"><path stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.75" d="M1 3.5 3.5 6l5-5"/></svg>'},checkboxCheckedShapeColor:Ee,checkboxIndeterminateBackgroundColor:ke(.3),checkboxIndeterminateBorderColor:{ref:"checkboxIndeterminateBackgroundColor"},checkboxIndeterminateShapeImage:{svg:'<svg xmlns="http://www.w3.org/2000/svg" width="10" height="2" fill="none"><rect width="10" height="2" fill="#000" rx="1"/></svg>'},checkboxIndeterminateShapeColor:Ee,radioCheckedShapeImage:{svg:'<svg xmlns="http://www.w3.org/2000/svg" width="6" height="6" fill="none"><circle cx="3" cy="3" r="3" fill="#000"/></svg>'}},css:gy}),Dh=py(),fy=()=>Ne({feature:"colorScheme",params:ii}),Mh=fy(),Th=()=>({...ii,...ZS,backgroundColor:"hsl(217, 0%, 17%)",foregroundColor:"#FFF",chromeBackgroundColor:ke(.05),rowHoverColor:Et(.15),selectedRowBackgroundColor:Et(.2),menuBackgroundColor:ke(.1),browserColorScheme:"dark",popupShadow:"0 0px 20px #000A",cardShadow:"0 1px 4px 1px #000A",advancedFilterBuilderJoinPillColor:"#7a3a37",advancedFilterBuilderColumnPillColor:"#355f2d",advancedFilterBuilderOptionPillColor:"#5a3168",advancedFilterBuilderValuePillColor:"#374c86",filterPanelApplyButtonColor:Dt,columnPanelApplyButtonColor:Dt,findMatchColor:Ee,findActiveMatchColor:Ee,checkboxUncheckedBorderColor:ke(.4),toggleButtonOffBackgroundColor:ke(.4),rowBatchEditBackgroundColor:ke(.1),formulaToken1Color:"#4da3e5",formulaToken2Color:"#f55864",formulaToken3Color:"#b688f2",formulaToken4Color:"#24bb4a",formulaToken5Color:"#e772ba",formulaToken6Color:"#f69b5f",formulaToken7Color:"#a3e6ff"}),my=()=>({...Th(),backgroundColor:"#1f2836"}),Cy=()=>Ne({feature:"colorScheme",params:ii,modeParams:{light:ii,dark:Th(),"dark-blue":my()}}),Ih=Cy(),vy=`.ag-icon-aggregation:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eaggregation%3C/title%3E%3Cpath d='M25.128 2.002c2.56.096 4.772 2.292 4.87 4.87a712 712 0 0 1 0 18.256c-.096 2.56-2.292 4.772-4.87 4.87a712 712 0 0 1-18.256 0c-2.558-.096-4.772-2.29-4.87-4.87a712 712 0 0 1 0-18.256c.096-2.56 2.292-4.772 4.87-4.87a712 712 0 0 1 18.256 0M7.006 4c-1.57.02-2.946 1.348-3.004 2.922-.078 6.078-.23 12.16.002 18.234.094 1.484 1.354 2.746 2.84 2.84 6.1.232 12.212.232 18.312 0 1.48-.094 2.746-1.35 2.84-2.84.232-6.1.232-12.212 0-18.312-.094-1.48-1.35-2.746-2.84-2.84C19.11 3.774 13.056 4 7.006 4M22 12h-2v-2h-8v.092c.056 1.352 3.426 2.598 4.472 4.404.682 1.174.438 2.754-.572 3.72C14.29 19.618 12 20.924 12 22h8v-2h2v4H10c0-1.586-.098-3.304 1.016-4.314 1.904-1.632 4.89-3.108 3.54-4.42-1.918-1.68-4.464-2.936-4.554-5.12L10 8h12z'/%3E%3C/svg%3E")}.ag-icon-arrows:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Earrows%3C/title%3E%3Cpath d='m6.414 17 2.294 2.292-1.416 1.416L2.586 16l4.706-4.708 1.416 1.416L6.414 15H15V6.414l-2.292 2.294-1.416-1.416L16 2.586l4.708 4.706-1.416 1.416L17 6.414V15h8.586l-2.294-2.292 1.416-1.416L29.414 16l-4.706 4.708-1.416-1.416L25.586 17H17v8.586l2.292-2.294 1.416 1.416L16 29.414l-4.708-4.706 1.416-1.416L15 25.586V17z'/%3E%3C/svg%3E")}.ag-icon-asc:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Easc%3C/title%3E%3Cpath d='m15 10.621-4.292 4.294-1.416-1.416L16 6.793l6.708 6.706-1.416 1.416L17 10.621v14.586h-2z'/%3E%3C/svg%3E")}.ag-icon-aasc:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 16 16'%3E%3Cpath fill='%23000' d='M13.201 8.08q.65 0 1.135.222.487.222.759.618.27.396.279.919H14.19a.72.72 0 0 0-.293-.536q-.26-.191-.705-.192-.302.001-.51.086a.7.7 0 0 0-.32.23.56.56 0 0 0-.108.338.5.5 0 0 0 .065.273.7.7 0 0 0 .204.203q.127.083.295.146.168.06.36.102l.525.125q.382.086.701.229.32.143.554.35.234.21.362.49.131.284.134.648a1.6 1.6 0 0 1-.273.93q-.27.391-.777.608-.504.214-1.217.214-.708 0-1.232-.217a1.8 1.8 0 0 1-.816-.642q-.29-.428-.305-1.058h1.194q.02.294.17.49.15.195.402.294.253.097.573.097.313 0 .544-.09a.84.84 0 0 0 .362-.255.6.6 0 0 0 .129-.374q0-.195-.117-.33a.9.9 0 0 0-.337-.228 3.4 3.4 0 0 0-.54-.171l-.635-.16q-.738-.18-1.166-.562t-.426-1.03a1.53 1.53 0 0 1 .284-.927q.287-.396.79-.618a2.8 2.8 0 0 1 1.14-.223'/%3E%3Cpath fill='%23000' fill-rule='evenodd' d='M5.813 14H4.489l-.432-1.332H1.948L1.515 14H.19l2.017-5.84h1.592zm-3.551-2.296h1.481l-.718-2.21H2.98zM8.452 8.16q.645 0 1.075.19.43.191.648.531a1.4 1.4 0 0 1 .217.775q0 .343-.137.602-.137.256-.376.422a1.6 1.6 0 0 1-.542.231v.057q.333.015.624.188.294.175.476.489.183.31.183.74 0 .466-.231.831a1.56 1.56 0 0 1-.676.573Q9.265 14 8.609 14H6.114V8.16zM7.35 12.99h1.006q.517 0 .753-.196a.66.66 0 0 0 .237-.531.8.8 0 0 0-.116-.428.8.8 0 0 0-.334-.29 1.15 1.15 0 0 0-.511-.106H7.349zm0-2.386h.916q.254 0 .45-.09a.75.75 0 0 0 .313-.256.67.67 0 0 0 .118-.396.64.64 0 0 0-.226-.511q-.223-.195-.633-.194H7.35z' clip-rule='evenodd'/%3E%3Cpath fill='%23000' d='M7.166.377a.75.75 0 0 1 .919.066l3.333 3a.75.75 0 0 1-1.003 1.115L7.609 2.033 5.113 4.53a.75.75 0 0 1-1.06-1.06l3-3z'/%3E%3C/svg%3E")}.ag-icon-cancel:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Ecancel%3C/title%3E%3Cpath d='M16 4C9.378 4 4 9.378 4 16s5.378 12 12 12 12-5.378 12-12S22.622 4 16 4m0 2c5.52 0 10 4.48 10 10s-4.48 10-10 10S6 21.52 6 16 10.48 6 16 6m0 8.586 5.292-5.294 1.416 1.416L17.414 16l5.294 5.292-1.416 1.416L16 17.414l-5.292 5.294-1.416-1.416L14.586 16l-5.294-5.292 1.416-1.416z'/%3E%3C/svg%3E")}.ag-icon-chart:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Echart%3C/title%3E%3Cpath d='M6.667 12.267h4v13.067h-4zm7.466-5.6h3.733v18.667h-3.733zM21.6 17.333h3.733v8H21.6z'/%3E%3C/svg%3E")}.ag-icon-color-picker:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Ecolor-picker%3C/title%3E%3Cpath d='M23.907 17.587 10.574 4.254l-1.88 1.88 3.173 3.173-8.28 8.28 10.16 10.16zm-16.547 0 6.387-6.387 6.387 6.387H7.361zm18.387 2s-2.667 2.893-2.667 4.667c0 1.467 1.2 2.667 2.667 2.667s2.667-1.2 2.667-2.667c0-1.773-2.667-4.667-2.667-4.667'/%3E%3C/svg%3E")}.ag-icon-columns:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Ecolumns%3C/title%3E%3Cpath d='M14 25h-2V7h2zm6 0h-2V7h2zm6 0h-2V7h2zM8 25H6V7h2z'/%3E%3C/svg%3E")}.ag-icon-contracted:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Econtracted%3C/title%3E%3Cpath d='m21.061 16-8.706 8.708-1.416-1.416L18.233 16l-7.294-7.292 1.416-1.416z'/%3E%3C/svg%3E")}.ag-icon-copy:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Ecopy%3C/title%3E%3Cpath d='M21.929 27.999h-7.828a5.09 5.09 0 0 1-5.086-5.086v-9.812a5.087 5.087 0 0 1 5.086-5.086h7.828a5.09 5.09 0 0 1 5.086 5.086v9.812a5.087 5.087 0 0 1-5.086 5.086m.16-17.984h-8.088a2.94 2.94 0 0 0-2.938 2.938v10.132a2.94 2.94 0 0 0 2.938 2.938h8.088a2.94 2.94 0 0 0 2.936-2.938V12.953a2.94 2.94 0 0 0-2.936-2.938M7.041 26.013h-2.05a4 4 0 0 1-.006-.228V9.065a5.07 5.07 0 0 1 5.064-5.064h12.812q.069 0 .134.002v2.012H9.915a2.876 2.876 0 0 0-2.874 2.874z'/%3E%3C/svg%3E")}.ag-icon-cross:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='4 4 24 24'%3E%3Ctitle%3Ecross%3C/title%3E%3Cpath d='m16 14.586 5.292-5.294 1.416 1.416L17.414 16l5.294 5.292-1.416 1.416L16 17.414l-5.292 5.294-1.416-1.416L14.586 16l-5.294-5.292 1.416-1.416z'/%3E%3C/svg%3E")}.ag-icon-csv:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M384 131.9c-7.753-8.433-110.425-128.473-114.9-133L48-.1C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48zm-35.9 2.1H257V27.9zM30 479V27h200l1 105c0 13.3-1.3 29 12 29h111l1 318z' style='fill-rule:nonzero' transform='translate(3.934 -.054)scale(.06285)'/%3E%3Cpath d='M.688-.226a.2.2 0 0 1-.017.074.28.28 0 0 1-.145.14.412.412 0 0 1-.234.013.28.28 0 0 1-.202-.168.468.468 0 0 1-.04-.19q0-.086.025-.155a.319.319 0 0 1 .182-.191.4.4 0 0 1 .134-.025q.087 0 .155.035a.3.3 0 0 1 .104.085.17.17 0 0 1 .036.097.06.06 0 0 1-.018.044.06.06 0 0 1-.042.019.06.06 0 0 1-.042-.013.2.2 0 0 1-.031-.046.2.2 0 0 0-.066-.079.16.16 0 0 0-.095-.027.17.17 0 0 0-.142.068.3.3 0 0 0-.053.193.4.4 0 0 0 .023.139.2.2 0 0 0 .067.083.2.2 0 0 0 .1.027q.063 0 .106-.031a.2.2 0 0 0 .065-.091.2.2 0 0 1 .023-.046q.014-.018.044-.018a.06.06 0 0 1 .044.018.06.06 0 0 1 .019.045' style='fill-rule:nonzero' transform='matrix(8.39799 0 0 12.455 7.122 25.977)'/%3E%3Cpath d='M.622-.215a.2.2 0 0 1-.033.117.23.23 0 0 1-.098.081.4.4 0 0 1-.153.029.34.34 0 0 1-.175-.04.23.23 0 0 1-.079-.077.17.17 0 0 1-.031-.093q0-.027.019-.045a.06.06 0 0 1 .046-.019.06.06 0 0 1 .039.014.1.1 0 0 1 .027.044.3.3 0 0 0 .03.057q.015.023.044.038.03.015.076.015.065 0 .105-.03a.09.09 0 0 0 .04-.075.08.08 0 0 0-.022-.058.14.14 0 0 0-.056-.034 1 1 0 0 0-.092-.025.7.7 0 0 1-.129-.042.2.2 0 0 1-.083-.066.17.17 0 0 1-.03-.104q0-.058.032-.105a.2.2 0 0 1 .093-.07.4.4 0 0 1 .144-.025q.066 0 .114.016a.3.3 0 0 1 .08.044.2.2 0 0 1 .046.057q.015.03.015.058a.07.07 0 0 1-.018.046.06.06 0 0 1-.046.021q-.025 0-.038-.012a.2.2 0 0 1-.028-.041.2.2 0 0 0-.047-.063Q.387-.625.326-.625a.15.15 0 0 0-.09.025q-.035.024-.035.059 0 .021.012.037a.1.1 0 0 0 .032.027.4.4 0 0 0 .111.036q.06.015.11.031.048.018.083.042a.2.2 0 0 1 .054.062.2.2 0 0 1 .019.091' style='fill-rule:nonzero' transform='matrix(8.39799 0 0 12.455 13.339 25.977)'/%3E%3Cpath d='m.184-.633.162.48.163-.483q.013-.038.019-.053a.062.062 0 0 1 .061-.039q.018 0 .034.009a.1.1 0 0 1 .025.025q.009.015.009.031L.654-.64l-.007.025-.009.024-.173.468-.019.051a.2.2 0 0 1-.021.042.1.1 0 0 1-.033.03.1.1 0 0 1-.049.012.1.1 0 0 1-.05-.011A.1.1 0 0 1 .26-.03a.2.2 0 0 1-.021-.042L.22-.123.05-.587.041-.612.033-.638.03-.662q0-.025.02-.046a.07.07 0 0 1 .05-.02q.037 0 .053.023.015.023.031.072' style='fill-rule:nonzero' transform='matrix(8.39799 0 0 12.455 18.94 25.977)'/%3E%3C/svg%3E")}.ag-icon-cut:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M14.703 15.096 6.215 4.719a1 1 0 1 1 1.548-1.267l13.058 15.965A5.001 5.001 0 0 1 28 23.916a5 5 0 0 1-4.999 4.999 5 5 0 0 1-4.999-4.999 4.98 4.98 0 0 1 1.23-3.283l-3.238-3.958-3.272 4.001a4.98 4.98 0 0 1 1.265 3.323 5 5 0 0 1-4.999 4.999 5 5 0 0 1-4.999-4.999 5 5 0 0 1 7.13-4.522zM8.991 20.8a3.1 3.1 0 0 0-3.1 3.1c0 1.711 1.389 3.1 3.1 3.1s3.1-1.389 3.1-3.1-1.389-3.1-3.1-3.1M23 20.8a3.1 3.1 0 0 0-3.1 3.1c0 1.711 1.389 3.1 3.1 3.1s3.1-1.389 3.1-3.1-1.389-3.1-3.1-3.1m-5.723-8.852 1.292 1.579 7.205-8.808a1 1 0 0 0-1.548-1.267z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-desc:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Edesc%3C/title%3E%3Cpath d='m17 21.379 4.292-4.294 1.416 1.416L16 25.207l-6.708-6.706 1.416-1.416L15 21.379V6.793h2z'/%3E%3C/svg%3E")}.ag-icon-adesc:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 16 16'%3E%3Cpath fill='%23000' d='M10.387 11.47a.75.75 0 0 1 1.06 1.06l-3 3-.113.093a.75.75 0 0 1-.919-.065l-3.333-3a.75.75 0 0 1 1.003-1.116l2.806 2.525zM13.201 3.08q.65 0 1.135.222.487.223.759.619.27.396.279.918H14.19a.72.72 0 0 0-.293-.536q-.26-.192-.705-.192-.302.001-.51.086a.7.7 0 0 0-.32.23.56.56 0 0 0-.108.338.5.5 0 0 0 .065.273.7.7 0 0 0 .204.203q.127.083.295.146.168.06.36.102l.525.125a3.7 3.7 0 0 1 .701.229q.32.143.554.35.234.21.362.492.131.282.134.647a1.6 1.6 0 0 1-.273.93 1.74 1.74 0 0 1-.777.607q-.504.214-1.217.214-.708 0-1.232-.217a1.8 1.8 0 0 1-.816-.641q-.29-.429-.305-1.059h1.194q.02.294.17.49.15.195.402.294.253.098.573.098.313 0 .544-.092a.84.84 0 0 0 .362-.254.6.6 0 0 0 .129-.373.5.5 0 0 0-.117-.33.9.9 0 0 0-.337-.23 3.4 3.4 0 0 0-.54-.17l-.635-.16q-.738-.18-1.166-.562t-.426-1.03a1.53 1.53 0 0 1 .284-.926q.287-.396.79-.62a2.8 2.8 0 0 1 1.14-.222'/%3E%3Cpath fill='%23000' fill-rule='evenodd' d='M5.813 9H4.489l-.432-1.332H1.948L1.515 9H.19l2.017-5.84h1.592zM2.262 6.704h1.481l-.718-2.21H2.98zM8.452 3.16q.645 0 1.075.19.43.192.648.53a1.4 1.4 0 0 1 .217.776q0 .342-.137.602a1.2 1.2 0 0 1-.376.423 1.6 1.6 0 0 1-.542.23v.058q.333.014.624.187.294.175.476.489.183.31.183.74 0 .465-.231.83a1.56 1.56 0 0 1-.676.574Q9.265 9 8.609 9H6.114V3.16zM7.35 7.99h1.006q.517 0 .753-.196a.66.66 0 0 0 .237-.531.8.8 0 0 0-.116-.428.8.8 0 0 0-.334-.291 1.15 1.15 0 0 0-.511-.106H7.349zm0-2.386h.916q.254 0 .45-.09a.75.75 0 0 0 .313-.256.67.67 0 0 0 .118-.397.64.64 0 0 0-.226-.51q-.223-.194-.633-.194H7.35z' clip-rule='evenodd'/%3E%3C/svg%3E")}.ag-icon-down:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Edesc%3C/title%3E%3Cpath d='m17 21.379 4.292-4.294 1.416 1.416L16 25.207l-6.708-6.706 1.416-1.416L15 21.379V6.793h2z'/%3E%3C/svg%3E")}.ag-icon-excel:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M384 131.9c-7.753-8.433-110.425-128.473-114.9-133L48-.1C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48zm-35.9 2.1H257V27.9zM30 479V27h200l1 105c0 13.3-1.3 29 12 29h111l1 318z' style='fill-rule:nonzero' transform='translate(3.934 -.054)scale(.06285)'/%3E%3Cpath d='m.052-.139.16-.234-.135-.208a.4.4 0 0 1-.028-.052.1.1 0 0 1-.01-.042.05.05 0 0 1 .018-.037.07.07 0 0 1 .045-.016q.03 0 .047.018a1 1 0 0 1 .047.066l.107.174.115-.174.024-.038.019-.026.021-.015a.1.1 0 0 1 .027-.005.06.06 0 0 1 .044.016.05.05 0 0 1 .018.039q0 .033-.038.089l-.141.211.152.234a.3.3 0 0 1 .03.051.1.1 0 0 1 .009.038.1.1 0 0 1-.008.031.1.1 0 0 1-.024.023.1.1 0 0 1-.034.008.1.1 0 0 1-.035-.008.1.1 0 0 1-.023-.022L.427-.067.301-.265l-.134.204-.022.034-.016.019a.1.1 0 0 1-.022.015.1.1 0 0 1-.03.005.06.06 0 0 1-.044-.016.06.06 0 0 1-.017-.047q0-.036.036-.088' style='fill-rule:nonzero' transform='matrix(17.82892 0 0 16.50777 10.371 25.928)'/%3E%3C/svg%3E")}.ag-icon-expanded:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eexpanded%3C/title%3E%3Cpath d='M21.061 8.708 13.767 16l7.294 7.292-1.416 1.416L10.939 16l8.706-8.708z'/%3E%3C/svg%3E")}.ag-icon-eye-slash:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eeye-slash%3C/title%3E%3Cpath d='M9.304 7.89a15.2 15.2 0 0 1 6.404-1.638c.294-.002.292-.002.584 0 5.956.174 11.328 4.088 13.62 9.748 0 0-1.318 3.178-3.224 5.174a13.6 13.6 0 0 1-2.226 1.874L26.414 25 25 26.414l-2.336-2.336C17.866 26.396 11.776 26.15 7.36 22.96a14.9 14.9 0 0 1-4.168-4.612c-.41-.71-.694-1.336-1.104-2.348 0 0 .898-2.218 2.002-3.718a14.6 14.6 0 0 1 3.442-3.334L5.586 7 7 5.586zm-.3 2.528c-2.038 1.344-3.708 3.246-4.724 5.508L4.248 16c2.46 5.762 9.622 9.064 15.63 7.15q.688-.219 1.342-.516l-.912-.912a6.96 6.96 0 0 1-4.19 1.394c-3.862 0-7-3.136-7-7 0-1.57.52-3.022 1.394-4.19zm14.032 11.204a13.25 13.25 0 0 0 4.684-5.548l.032-.074c-1.984-4.646-6.834-7.798-12.006-7.748-1.712.05-3.386.458-4.922 1.158l1.102 1.102a6.97 6.97 0 0 1 4.192-1.396 7.003 7.003 0 0 1 5.606 11.192zm-11.09-8.262a5.003 5.003 0 0 0 6.928 6.928zm8.342 5.514a5.002 5.002 0 0 0-6.928-6.928z'/%3E%3C/svg%3E")}.ag-icon-eye:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eeye%3C/title%3E%3Cpath d='M16.292 6.32c5.956.174 11.328 4.086 13.62 9.746 0 0-1.318 3.18-3.224 5.176-4.862 5.088-13.534 5.97-19.328 1.784a14.9 14.9 0 0 1-4.168-4.612c-.41-.71-.694-1.336-1.104-2.348 0 0 .898-2.216 2.002-3.716 2.678-3.64 7.03-5.896 11.618-6.03.294-.004.292-.004.584 0m-.546 2c-4.896.142-9.458 3.202-11.466 7.672l-.032.074c2.46 5.762 9.622 9.066 15.63 7.152 3.458-1.102 6.342-3.738 7.842-7.076l.032-.076C25.768 11.42 20.918 8.27 15.746 8.32m.254.946c3.754 0 6.8 3.048 6.8 6.8 0 3.754-3.046 6.8-6.8 6.8s-6.8-3.046-6.8-6.8c0-3.752 3.046-6.8 6.8-6.8m5 6.768V16c0-2.76-2.24-5-5-5s-5 2.24-5 5v.066c0 2.76 2.24 5 5 5s5-2.24 5-5z'/%3E%3C/svg%3E")}.ag-icon-filter:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Efilter%3C/title%3E%3Cpath d='M26 8.184c-.066 2.658-4.058 5.154-6.742 7.974a1.05 1.05 0 0 0-.258.682v3.66L13 25c0-2.74.066-5.482-.002-8.222a1.05 1.05 0 0 0-.256-.62C10.026 13.304 6.06 10.61 6 8.184V6h20zM8 8c0 .304.06.612.258.842 2.716 2.854 6.682 5.548 6.742 7.974V21l2-1.5v-2.684c.066-2.658 4.058-5.154 6.742-7.974.198-.23.258-.538.258-.842z'/%3E%3C/svg%3E")}.ag-icon-first:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Efirst%3C/title%3E%3Cpath d='M24.354 8.708 17.06 16l7.294 7.292-1.416 1.416L14.232 16l8.706-8.708zM9.646 8v16h-2V8z'/%3E%3C/svg%3E")}.ag-icon-group:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Egroup%3C/title%3E%3Cpath d='M25.128 2.002c2.56.096 4.772 2.292 4.87 4.87a712 712 0 0 1 0 18.256c-.096 2.56-2.292 4.772-4.87 4.87a712 712 0 0 1-18.256 0c-2.558-.096-4.772-2.29-4.87-4.87a712 712 0 0 1 0-18.256c.096-2.56 2.292-4.772 4.87-4.87a712 712 0 0 1 18.256 0M7.006 4c-1.57.02-2.946 1.348-3.004 2.922-.078 6.078-.23 12.16.002 18.234.094 1.484 1.354 2.746 2.84 2.84 6.1.232 12.212.232 18.312 0 1.48-.094 2.746-1.35 2.84-2.84.232-6.1.232-12.212 0-18.312-.094-1.48-1.35-2.746-2.84-2.84C19.11 3.774 13.056 4 7.006 4M14 21h-4v-2h4zm12 0H16v-2h10zm-12-4h-4v-2h4zm12 0H16v-2h10zm-16-4H6v-2h4zm16 0H12v-2h14z'/%3E%3C/svg%3E")}.ag-icon-last:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Elast%3C/title%3E%3Cpath d='m17.768 16-8.706 8.708-1.416-1.416L14.94 16 7.646 8.708l1.416-1.416zm6.586 8h-2V8h2z'/%3E%3C/svg%3E")}.ag-icon-left:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eleft%3C/title%3E%3Cpath d='m17.621 11-2 2h12.586v6H15.621l2 2-4.414 4.414L3.793 16l9.414-9.414zm-11 5 6.586 6.586L14.793 21l-4-4h15.414v-2H10.793l4-4-1.586-1.586z'/%3E%3C/svg%3E")}.ag-icon-linked:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Elinked%3C/title%3E%3Cpath d='M17.138 13.418a1.03 1.03 0 0 0-.298.658s.125.096.226.178c1.372 1.114 2.033 3.039 1.582 4.796a4.7 4.7 0 0 1-1.205 2.123c-1.145 1.151-2.296 2.294-3.445 3.441-1.241 1.232-3.185 1.691-4.864 1.105-1.546-.54-2.756-1.938-3.048-3.572-.267-1.496.246-3.108 1.319-4.186l.578-.578-.03-.092a10.5 10.5 0 0 1-.452-2.3v-.005c-.776.775-1.621 1.489-2.275 2.396-1.817 2.522-1.643 6.323.706 8.669 1.813 1.811 4.708 2.462 7.171 1.517a6.75 6.75 0 0 0 2.336-1.518l3.427-3.424c1.939-1.954 2.533-5.126 1.294-7.674a6.8 6.8 0 0 0-2.071-2.481l-.003-.002zM21.265 4a6.8 6.8 0 0 0-4.734 1.964l-3.427 3.424c-1.961 1.977-2.52 5.092-1.32 7.619a6.8 6.8 0 0 0 2.098 2.537l.003.002c.32-.32.643-.637.96-.96.167-.172.27-.401.286-.64l-.204-.167c-1.603-1.287-2.215-3.68-1.316-5.616a4.7 4.7 0 0 1 .918-1.32c1.145-1.151 2.296-2.294 3.445-3.441 1.239-1.23 3.178-1.694 4.864-1.105 1.83.639 3.16 2.498 3.12 4.493a4.8 4.8 0 0 1-1.391 3.265l-.578.578.03.092c.235.743.387 1.519.452 2.3v.005c.732-.731 1.521-1.406 2.162-2.244 1.192-1.559 1.643-3.651 1.204-5.575a6.8 6.8 0 0 0-3.98-4.703 6.8 6.8 0 0 0-2.529-.506h-.061z'/%3E%3C/svg%3E")}.ag-icon-loading:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eloading%3C/title%3E%3Cpath d='M17 29h-2v-8h2zm-3.586-9L7 26.414 5.586 25 12 18.586zm13 5L25 26.414 18.586 20 20 18.586zM29 17h-8v-2h8zm-18 0H3v-2h8zm2.414-5L12 13.414 5.586 7 7 5.586zm13-5L20 13.414 18.586 12 25 5.586zM17 11h-2V3h2z'/%3E%3C/svg%3E")}.ag-icon-maximize:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='3 3 26 26'%3E%3Ctitle%3Emaximize%3C/title%3E%3Cpath d='m7.54 17.4.1 6.98 6.96.1-2.24-2.24L16 18.6 13.4 16l-3.64 3.64zm16.92-2.8-.1-6.98-6.96-.1 2.24 2.24L16 13.4l2.6 2.6 3.64-3.64z'/%3E%3C/svg%3E")}.ag-icon-menu:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Emenu%3C/title%3E%3Cpath d='M26 23H6v-2h20zm0-6H6v-2h20zm0-6H6V9h20z'/%3E%3C/svg%3E")}.ag-icon-menu-alt:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none'%3E%3Cpath fill='%23000' d='M16 18a2 2 0 1 0 0-4 2 2 0 0 0 0 4m0-7a2 2 0 1 0 0-4 2 2 0 0 0 0 4m0 14a2 2 0 1 0 0-4 2 2 0 0 0 0 4'/%3E%3C/svg%3E")}.ag-icon-minimize:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='3 3 26 26'%3E%3Ctitle%3Eminimize%3C/title%3E%3Cpath d='m14.8 24.26-.1-6.96-6.96-.1 2.24 2.24-3.64 3.64 2.6 2.6 3.64-3.64zm2.4-16.52.1 6.96 6.96.1-2.24-2.24 3.64-3.64-2.6-2.6-3.64 3.64z'/%3E%3C/svg%3E")}.ag-icon-minus:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M7.515 7.515c-4.683 4.682-4.683 12.288 0 16.97 4.682 4.683 12.288 4.683 16.97 0 4.683-4.682 4.683-12.288 0-16.97-4.682-4.683-12.288-4.683-16.97 0m1.414 1.414c3.903-3.903 10.239-3.903 14.142 0s3.903 10.239 0 14.142-10.239 3.903-14.142 0-3.903-10.239 0-14.142m-1.414 6.07h16.97v2.002H7.515z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-next:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Enext%3C/title%3E%3Cpath d='m21.061 16-8.706 8.708-1.416-1.416L18.233 16l-7.294-7.292 1.416-1.416z'/%3E%3C/svg%3E")}.ag-icon-none:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Enone%3C/title%3E%3Cpath d='m10.044 21.258 4.478-4.198L16 18.444 9 25l-7-6.556 1.478-1.384 4.478 4.198V7h2.088zm14 3.742h-2.088V10.742l-4.478 4.198L16 13.556 23 7q3.5 3.28 7 6.556l-1.478 1.384-4.478-4.198z'/%3E%3C/svg%3E")}.ag-icon-not-allowed:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Enot-allowed%3C/title%3E%3Cpath d='M16.186 3.646c8.188.154 14.898 9.796 11.17 17.78-3.298 7.066-13.932 9.374-19.848 3.87-3.9-3.632-5.076-9.896-2.684-14.708 2.082-4.19 6.588-6.974 11.362-6.942m-.298 1.998c-6.922.132-12.578 8.308-9.33 15.052 3.342 6.934 15.246 7.646 18.932 0 3.076-6.386-1.988-15.1-9.602-15.052m7.596 6.422c2.864 5.33-1.744 13.186-8.306 12.536a8.6 8.6 0 0 1-3.232-.998l-1.266-.706L22.778 10.8q.351.633.706 1.266m-9.422 10.276c3.296 1.028 7.246-1.006 8.216-4.418a6.6 6.6 0 0 0-.056-3.742zm2.104-14.696a8.8 8.8 0 0 1 3.936 1.038l1.266.706L9.27 21.488c-3.018-5.41-.99-13.37 6.318-13.834q.289-.01.578-.008m-.31 2c-4.06.154-7.23 4.614-6.03 8.46l8.16-8.16a6.8 6.8 0 0 0-2.13-.3'/%3E%3C/svg%3E")}.ag-icon-paste:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Epaste%3C/title%3E%3Cpath d='M20 6.5c0-1-1-3-4-3s-4 2-4 3H8c-2.21 0-4 1.79-4 4v14c0 2.21 1.79 4 4 4h16c2.21 0 4-1.79 4-4v-14c0-2.21-1.79-4-4-4zm-4 .546c.734 0 1.334.572 1.334 1.272S16.734 9.59 16 9.59s-1.334-.572-1.334-1.272.6-1.272 1.334-1.272M24 26.5H8a2 2 0 0 1-2-2v-14a2 2 0 0 1 2-2h2v4h12v-4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2'/%3E%3C/svg%3E")}.ag-icon-pin:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Epin%3C/title%3E%3Cpath d='m10.78 19.777-4.668-4.666s.032-1 .67-1.87c1.366-1.86 4.052-1.96 6.056-1.572l3.158-3.108c-.7-2.342 3.352-5.046 3.352-5.046l9.166 9.168q-.334.447-.67.894c-1.074 1.426-2.538 2.63-4.272 2.338l-3.32 3.218c.046.344.042.03.118 1.152.144 2.13-.64 4.324-2.632 5.34l-.746.364-4.798-4.798-7.292 7.294-1.416-1.416zm8.24-13.672c-.688.568-1.416 1.45-1.024 2.072l.49.722-4.986 4.988c-1.988-.506-4.346-.636-5.156.614l9.02 9.032q.14-.099.272-.21c1.226-1.08.764-3.04.498-4.9l4.79-4.79s1.47.938 2.936-.776l-6.79-6.79q-.026.019-.05.038'/%3E%3C/svg%3E")}.ag-icon-pivot:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Epivot%3C/title%3E%3Cpath d='M25.128 2.002c2.56.096 4.772 2.292 4.87 4.87a712 712 0 0 1 0 18.256c-.096 2.56-2.292 4.772-4.87 4.87a712 712 0 0 1-18.256 0c-2.558-.096-4.772-2.29-4.87-4.87a712 712 0 0 1 0-18.256c.096-2.56 2.292-4.772 4.87-4.87a712 712 0 0 1 18.256 0m2.966 7.954H9.892v18.136c5.086.13 10.18.098 15.264-.096 1.48-.094 2.746-1.35 2.84-2.84.192-5.064.226-10.134.098-15.2M3.968 24.1q.015.528.036 1.056c.094 1.484 1.354 2.746 2.84 2.84l1.012.036V24.1zM22 15.414l-.292.294-1.416-1.416L23 11.586l2.708 2.706-1.416 1.416-.292-.294v3.592c-.032 2.604-2.246 4.892-4.872 4.992L15.414 24l.294.292-1.416 1.416L11.586 23l2.706-2.708 1.416 1.416-.322.32c3.372.03 6.578-.164 6.614-3.034zM3.88 18.038c.002 1.346.012 2.694.038 4.04h3.938v-4.04zm.05-6.062a681 681 0 0 0-.044 4.042h3.97v-4.042zm5.962-7.99Q8.449 3.999 7.006 4c-1.57.02-2.946 1.348-3.004 2.922q-.02 1.517-.042 3.034h3.896v-2.02h2.036zm14.244-.016v3.966h3.898q-.017-.546-.038-1.092c-.094-1.48-1.35-2.746-2.84-2.84q-.51-.019-1.02-.034m-8.14-.054q-2.035.022-4.07.048v3.972h4.07zm6.106.008c-1.358-.022-2.714-.026-4.07-.022v4.034h4.07z'/%3E%3C/svg%3E")}.ag-icon-plus:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M7.515 7.515c-4.683 4.682-4.683 12.288 0 16.97 4.682 4.683 12.288 4.683 16.97 0 4.683-4.682 4.683-12.288 0-16.97-4.682-4.683-12.288-4.683-16.97 0m1.414 1.414c3.903-3.903 10.239-3.903 14.142 0s3.903 10.239 0 14.142-10.239 3.903-14.142 0-3.903-10.239 0-14.142M15 15l-.001-7.485h2.002L17 15l7.485-.001v2.002L17 17l.001 7.485h-2.002L15 17l-7.485.001v-2.002z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-previous:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eprevious%3C/title%3E%3Cpath d='M21.061 8.708 13.767 16l7.294 7.292-1.416 1.416L10.939 16l8.706-8.708z'/%3E%3C/svg%3E")}.ag-icon-right:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eright%3C/title%3E%3Cpath d='m28.207 16-9.414 9.414L14.379 21l2-2H3.793v-6h12.586l-2-2 4.414-4.414zm-11-5 4 4H5.793v2h15.414l-4 4 1.586 1.586L25.379 16l-6.586-6.586z'/%3E%3C/svg%3E")}.ag-icon-save:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Esave%3C/title%3E%3Cpath d='M25.333 16v9.333H6.666V16H3.999v9.333C3.999 26.8 5.199 28 6.666 28h18.667C26.8 28 28 26.8 28 25.333V16zm-8 .893 3.453-3.44 1.88 1.88L15.999 22l-6.667-6.667 1.88-1.88 3.453 3.44V4h2.667v12.893z'/%3E%3C/svg%3E")}.ag-icon-small-down:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Esmall-down%3C/title%3E%3Cpath d='M24.708 12.355 16 21.061l-8.708-8.706 1.416-1.416L16 18.233l7.292-7.294z'/%3E%3C/svg%3E")}.ag-icon-small-left:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Esmall-left%3C/title%3E%3Cpath d='M21.061 8.708 13.767 16l7.294 7.292-1.416 1.416L10.939 16l8.706-8.708z'/%3E%3C/svg%3E")}.ag-icon-small-right:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Esmall-right%3C/title%3E%3Cpath d='m21.061 16-8.706 8.708-1.416-1.416L18.233 16l-7.294-7.292 1.416-1.416z'/%3E%3C/svg%3E")}.ag-icon-small-up:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Esmall-up%3C/title%3E%3Cpath d='m24.708 19.645-1.416 1.416L16 13.767l-7.292 7.294-1.416-1.416L16 10.939z'/%3E%3C/svg%3E")}.ag-icon-tick:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Etick%3C/title%3E%3Cpath d='M24.708 10.855 13 22.561l-5.708-5.706 1.416-1.416L13 19.733 23.292 9.439z'/%3E%3C/svg%3E")}.ag-icon-tree-closed:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Etree-closed%3C/title%3E%3Cpath d='m21.061 16-8.706 8.708-1.416-1.416L18.233 16l-7.294-7.292 1.416-1.416z'/%3E%3C/svg%3E")}.ag-icon-tree-indeterminate:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Etree-indeterminate%3C/title%3E%3Cpath d='M6 15h20v2H6z'/%3E%3C/svg%3E")}.ag-icon-tree-open:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Etree-open%3C/title%3E%3Cpath d='M24.708 12.355 16 21.061l-8.708-8.706 1.416-1.416L16 18.233l7.292-7.294z'/%3E%3C/svg%3E")}.ag-icon-unlinked:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eunlinked%3C/title%3E%3Cpath d='M5.35 3.999a.2.2 0 0 0-.14.058c-.388.38-.768.768-1.152 1.152a.21.21 0 0 0-.002.288c7.459 7.506 14.965 14.965 22.447 22.447a.21.21 0 0 0 .288.002q.576-.574 1.151-1.151a.21.21 0 0 0 .002-.288C20.484 19.002 12.979 11.542 5.497 4.06a.2.2 0 0 0-.146-.061zm.611 12.548c-1.933 1.939-2.538 5.119-1.289 7.688a6.79 6.79 0 0 0 4.891 3.672 6.82 6.82 0 0 0 5.893-1.866l1.984-1.984-1.438-1.438-1.986 1.986c-1.486 1.476-3.993 1.81-5.834.629a4.73 4.73 0 0 1-2.024-2.853 4.76 4.76 0 0 1 1.241-4.393l1.986-1.986-1.438-1.438-1.984 1.984zM21.273 3.999a6.78 6.78 0 0 0-4.727 1.963l-1.984 1.984L16 9.384l1.985-1.985a4.74 4.74 0 0 1 2.776-1.338c1.974-.224 4.045.926 4.845 2.834.712 1.699.329 3.778-1.004 5.12L22.616 16l1.439 1.438q1-1 2-2c2.012-2.031 2.557-5.368 1.112-7.982-1.144-2.07-3.432-3.441-5.834-3.459h-.061z'/%3E%3C/svg%3E")}.ag-icon-up:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Easc%3C/title%3E%3Cpath d='m15 10.621-4.292 4.294-1.416-1.416L16 6.793l6.708 6.706-1.416 1.416L17 10.621v14.586h-2z'/%3E%3C/svg%3E")}.ag-icon-grip:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Egrip%3C/title%3E%3Cpath d='M8 24H6v-4h2zm6 0h-2v-4h2zm6 0h-2v-4h2zm6 0h-2v-4h2zM8 18H6v-4h2zm6 0h-2v-4h2zm6 0h-2v-4h2zm6 0h-2v-4h2zM8 12H6V8h2zm6 0h-2V8h2zm6 0h-2V8h2zm6 0h-2V8h2z'/%3E%3C/svg%3E")}.ag-icon-settings:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='%23000' d='M30 8h-4.1c-.5-2.3-2.5-4-4.9-4s-4.4 1.7-4.9 4H2v2h14.1c.5 2.3 2.5 4 4.9 4s4.4-1.7 4.9-4H30zm-9 4c-1.7 0-3-1.3-3-3s1.3-3 3-3 3 1.3 3 3-1.3 3-3 3M2 24h4.1c.5 2.3 2.5 4 4.9 4s4.4-1.7 4.9-4H30v-2H15.9c-.5-2.3-2.5-4-4.9-4s-4.4 1.7-4.9 4H2zm9-4c1.7 0 3 1.3 3 3s-1.3 3-3 3-3-1.3-3-3 1.3-3 3-3'/%3E%3C/svg%3E")}.ag-icon-column-arrow:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M11 4a1 1 0 0 1 1 1v22a1 1 0 1 1-2 0V5a1 1 0 0 1 1-1' clip-rule='evenodd'/%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M2 13a1 1 0 0 1 1-1h23.5a1 1 0 1 1 0 2H3a1 1 0 0 1-1-1' clip-rule='evenodd'/%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M2 4h18v24H2zm2 2v20h14V6zM26.793 13 23 9.207l1.414-1.414L29.621 13l-5.207 5.207L23 16.793z' clip-rule='evenodd'/%3E%3C/svg%3E")}.ag-icon-un-pin:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='m6.112 15.111 3.272 3.271 1.436-1.402-2.476-2.479c.81-1.25 3.168-1.12 5.156-.614l4.986-4.988-.49-.722c-.392-.622.336-1.504 1.024-2.072l.008-.007.01-.006.032-.025 1.447 1.447 1.432-1.397-2.601-2.602s-4.052 2.704-3.352 5.046l-3.158 3.108c-2.004-.388-4.69-.288-6.056 1.572-.638.87-.67 1.87-.67 1.87m.581 11.582.014.014 5.502-5.501 4.783 4.783.746-.364c1.992-1.016 2.776-3.21 2.632-5.34-.055-.805-.068-.87-.088-.97-.008-.04-.017-.085-.03-.182l3.32-3.218c1.734.292 3.198-.912 4.272-2.338q.337-.447.67-.894l-.001-.001-.007-.007-.007-.007-.007-.007-3.87-3.87 1.585-1.584-1.414-1.414-14.381 14.38-1.237 1.209-5.69 5.687 1.417 1.416zM23.21 10.206l2.65 2.651c-1.465 1.714-2.935.776-2.935.776l-4.79 4.79q.041.291.087.583c.257 1.676.513 3.35-.585 4.317a4 4 0 0 1-.272.21l-3.739-3.744z' clip-rule='evenodd'/%3E%3C/svg%3E")}.ag-icon-pinned-top:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='currentColor' d='m16.708 10.878 8.708 8.706L24 21l-6.292-6.294V27h-2V14.706L9.416 21 8 19.584q4.348-4.344 8.691-8.69zM25 6H8v2h17z'/%3E%3C/svg%3E")}.ag-icon-pinned-bottom:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='currentColor' d='M16.708 22.122 8 13.416 9.416 12l6.292 6.294V6h2v12.294L24 12l1.416 1.416-8.691 8.69zM7.416 28h17v-2h-17z'/%3E%3C/svg%3E")}.ag-icon-chevron-up:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 16 16'%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M3.479 10.521a.75.75 0 0 1 0-1.06l4-4a.75.75 0 0 1 1.06 0l4 4a.75.75 0 0 1-1.06 1.06l-3.47-3.47-3.47 3.47a.75.75 0 0 1-1.06 0' clip-rule='evenodd'/%3E%3C/svg%3E")}.ag-icon-chevron-down:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 16 16'%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M12.521 5.461a.75.75 0 0 1 0 1.06l-4 4a.75.75 0 0 1-1.06 0l-4-4a.75.75 0 0 1 1.06-1.06l3.47 3.47 3.47-3.47a.75.75 0 0 1 1.06 0' clip-rule='evenodd'/%3E%3C/svg%3E")}.ag-icon-chevron-left:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 16 16'%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M10.53 12.512a.75.75 0 0 1-1.06 0l-4-4a.75.75 0 0 1 0-1.06l4-4a.75.75 0 0 1 1.06 1.06l-3.47 3.47 3.47 3.47a.75.75 0 0 1 0 1.06' clip-rule='evenodd'/%3E%3C/svg%3E")}.ag-icon-chevron-right:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 16 16'%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M5.47 3.47a.75.75 0 0 1 1.06 0l4 4a.75.75 0 0 1 0 1.06l-4 4a.75.75 0 0 1-1.06-1.06L8.94 8 5.47 4.53a.75.75 0 0 1 0-1.06' clip-rule='evenodd'/%3E%3C/svg%3E")}.ag-icon-filter-add:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='currentColor' d='M19.834 8H8c0 .304.06.612.258.842 2.716 2.854 6.682 5.548 6.742 7.974V21l2-1.5v-2.684c.056-2.267 2.968-4.417 5.49-6.75v3.087c-1.081.974-2.245 1.968-3.232 3.005a1.05 1.05 0 0 0-.258.682v3.66L13 25c0-2.74.066-5.482-.002-8.222a1.05 1.05 0 0 0-.256-.62C10.026 13.304 6.06 10.61 6 8.184V6h13.834z'/%3E%3Cpath fill='currentColor' d='M26 6h2.946v2.002H26v3.313h-2.002V8.002h-2.946V6h2.946V3.04H26z'/%3E%3C/svg%3E")}.ag-icon-edit:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='currentColor' d='M23.182 5a3.82 3.82 0 0 1 2.83 6.383l-.131.137-2.09 2.088a1 1 0 0 1-.084.099 1 1 0 0 1-.098.084L12.533 24.869a3 3 0 0 1-1.245.746l-4.353 1.32-.003.002a1.5 1.5 0 0 1-1.87-1.867l.003-.004 1.32-4.352v-.003l.06-.174c.13-.344.321-.661.565-.936l.126-.135L18.209 8.39a1 1 0 0 1 .18-.181l2.092-2.09.137-.132A3.82 3.82 0 0 1 23.182 5M8.548 20.883a1 1 0 0 0-.25.415l-1.049 3.451 3.457-1.048.114-.042q.17-.076.301-.206l10.458-10.46-2.572-2.572zM23.182 7c-.482 0-.946.19-1.287.531v.001l-1.474 1.475 2.572 2.572 1.474-1.474.121-.133A1.82 1.82 0 0 0 23.182 7'/%3E%3C/svg%3E")}`,wy=Ne({feature:"iconSet",css:vy}),Ah={aggregation:'<path d="M18 7V4H6l6 8-6 8h12v-3"/>',arrows:'<polyline points="5 9 2 12 5 15"/><polyline points="9 5 12 2 15 5"/><polyline points="15 19 12 22 9 19"/><polyline points="19 9 22 12 19 15"/><line x1="2" x2="22" y1="12" y2="12"/><line x1="12" x2="12" y1="2" y2="22"/>',asc:'<path d="m5 12 7-7 7 7"/><path d="M12 19V5"/>',cancel:'<path d="m18 6-12 12"/><path d="m6 6 12 12"/>',chart:'<line x1="18" x2="18" y1="20" y2="10"/><line x1="12" x2="12" y1="20" y2="4"/><line x1="6" x2="6" y1="20" y2="14"/>',"color-picker":'<path d="m19 11-8-8-8.6 8.6a2 2 0 0 0 0 2.8l5.2 5.2c.8.8 2 .8 2.8 0L19 11Z"/><path d="m5 2 5 5"/><path d="M2 13h15"/><path d="M22 20a2 2 0 1 1-4 0c0-1.6 1.7-2.4 2-4 .3 1.6 2 2.4 2 4Z"/>',columns:'<path d="M9 3H5a2 2 0 0 0-2 2v4m6-6h10a2 2 0 0 1 2 2v4M9 3v18m0 0h10a2 2 0 0 0 2-2V9M9 21H5a2 2 0 0 1-2-2V9m0 0h18"/>',contracted:'<path d="m9 18 6-6-6-6"/>',copy:'<rect width="14" height="14" x="8" y="8" rx="2" ry="2"/><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"/>',cross:'<path d="M18 6 6 18"/><path d="m6 6 12 12"/>',csv:'<path d="M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z"/><polyline points="14 2 14 8 20 8"/><path d="M8 13h2"/><path d="M8 17h2"/><path d="M14 13h2"/><path d="M14 17h2"/>',cut:'<circle cx="6" cy="6" r="3"/><path d="M8.12 8.12 12 12"/><path d="M20 4 8.12 15.88"/><circle cx="6" cy="18" r="3"/><path d="M14.8 14.8 20 20"/>',desc:'<path d="M12 5v14"/><path d="m19 12-7 7-7-7"/>',down:'<path d="M12 5v14"/><path d="m19 12-7 7-7-7"/>',excel:'<path d="M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z"/><polyline points="14 2 14 8 20 8"/><path d="M8 13h2"/><path d="M8 17h2"/><path d="M14 13h2"/><path d="M14 17h2"/>',expanded:'<path d="m15 18-6-6 6-6"/>',eye:'<path d="M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z"/><circle cx="12" cy="12" r="3"/>',"eye-slash":'<path d="M9.88 9.88a3 3 0 1 0 4.24 4.24"/><path d="M10.73 5.08A10.43 10.43 0 0 1 12 5c7 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68"/><path d="M6.61 6.61A13.526 13.526 0 0 0 2 12s3 7 10 7a9.74 9.74 0 0 0 5.39-1.61"/><line x1="2" x2="22" y1="2" y2="22"/>',filter:'<path d="M3 6h18"/><path d="M7 12h10"/><path d="M10 18h4"/>',first:'<path d="m17 18-6-6 6-6"/><path d="M7 6v12"/>',grip:'<circle cx="5" cy="8" r="0.5"/><circle cx="12" cy="8" r="0.5"/><circle cx="19" cy="8" r="0.5"/><circle cx="5" cy="16" r="0.5"/><circle cx="12" cy="16" r="0.5"/><circle cx="19" cy="16" r="0.5"/><g stroke="none" fill="currentColor"><circle cx="5" cy="8" r="1"/><circle cx="12" cy="8" r="1"/><circle cx="19" cy="8" r="1"/><circle cx="5" cy="16" r="1"/><circle cx="12" cy="16" r="1"/><circle cx="19" cy="16" r="1"/></g>',group:'<path d="M16 12H3"/><path d="M16 18H3"/><path d="M10 6H3"/><path d="M21 18V8a2 2 0 0 0-2-2h-5"/><path d="m16 8-2-2 2-2"/>',last:'<path d="m7 18 6-6-6-6"/><path d="M17 6v12"/>',left:'<path d="m12 19-7-7 7-7"/><path d="M19 12H5"/>',linked:'<path d="M9 17H7A5 5 0 0 1 7 7h2"/><path d="M15 7h2a5 5 0 1 1 0 10h-2"/><line x1="8" x2="16" y1="12" y2="12"/>',loading:'<line x1="12" x2="12" y1="2" y2="6"/><line x1="12" x2="12" y1="18" y2="22"/><line x1="4.93" x2="7.76" y1="4.93" y2="7.76"/><line x1="16.24" x2="19.07" y1="16.24" y2="19.07"/><line x1="2" x2="6" y1="12" y2="12"/><line x1="18" x2="22" y1="12" y2="12"/><line x1="4.93" x2="7.76" y1="19.07" y2="16.24"/><line x1="16.24" x2="19.07" y1="7.76" y2="4.93"/>',maximize:'<polyline points="15 3 21 3 21 9"/><polyline points="9 21 3 21 3 15"/><line x1="21" x2="14" y1="3" y2="10"/><line x1="3" x2="10" y1="21" y2="14"/>',menu:'<line x1="4" x2="20" y1="12" y2="12"/><line x1="4" x2="20" y1="6" y2="6"/><line x1="4" x2="20" y1="18" y2="18"/>',"menu-alt":'<circle cx="12" cy="5" r="0.75" fill="#D9D9D9"/><circle cx="12" cy="12" r="0.75" fill="#D9D9D9"/><circle cx="12" cy="19" r="0.75" fill="#D9D9D9"/>',minimize:'<polyline points="4 14 10 14 10 20"/><polyline points="20 10 14 10 14 4"/><line x1="14" x2="21" y1="10" y2="3"/><line x1="3" x2="10" y1="21" y2="14"/>',minus:'<circle cx="12" cy="12" r="10"/><path d="M8 12h8"/>',next:'<path d="m9 18 6-6-6-6"/>',none:'<path d="m7 15 5 5 5-5"/><path d="m7 9 5-5 5 5"/>',"not-allowed":'<circle cx="12" cy="12" r="10"/><path d="m4.9 4.9 14.2 14.2"/>',paste:'<path d="M15 2H9a1 1 0 0 0-1 1v2c0 .6.4 1 1 1h6c.6 0 1-.4 1-1V3c0-.6-.4-1-1-1Z"/><path d="M8 4H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2M16 4h2a2 2 0 0 1 2 2v2M11 14h10"/><path d="m17 10 4 4-4 4"/>',pin:'<line x1="12" x2="12" y1="17" y2="22"/><path d="M5 17h14v-1.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V6h1a2 2 0 0 0 0-4H8a2 2 0 0 0 0 4h1v4.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24Z"/>',pivot:'<path d="M15 3v18"/><rect width="18" height="18" x="3" y="3" rx="2"/><path d="M21 9H3"/><path d="M21 15H3"/>',plus:'<circle cx="12" cy="12" r="10"/><path d="M8 12h8"/><path d="M12 8v8"/>',previous:'<path d="m15 18-6-6 6-6"/>',right:'<path d="M5 12h14"/><path d="m12 5 7 7-7 7"/>',save:'<path d="M12 17V3"/><path d="m6 11 6 6 6-6"/><path d="M19 21H5"/>',settings:'<path d="M20 7h-9"/><path d="M14 17H5"/><circle cx="17" cy="17" r="3"/><circle cx="7" cy="7" r="3"/>',"small-left":'<path d="m15 18-6-6 6-6"/>',"small-right":'<path d="m9 18 6-6-6-6"/>',tick:'<path d="M20 6 9 17l-5-5"/>',"tree-closed":'<path d="m9 18 6-6-6-6"/>',"tree-indeterminate":'<path d="M5 12h14"/>',"tree-open":'<path d="m6 9 6 6 6-6"/>',unlinked:'<path d="M9 17H7A5 5 0 0 1 7 7"/><path d="M15 7h2a5 5 0 0 1 4 8"/><line x1="8" x2="12" y1="12" y2="12"/><line x1="2" x2="22" y1="2" y2="22"/>',up:'<path d="m5 12 7-7 7 7"/><path d="M12 19V5"/>'},kh={aasc:'<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M13.2012 8.07928C13.6346 8.0793 14.0128 8.15365 14.3359 8.30193C14.6609 8.45018 14.9141 8.65595 15.0947 8.9201C15.2754 9.18439 15.3683 9.49109 15.374 9.83904H14.1904C14.1676 9.60898 14.0695 9.4303 13.8965 9.30291C13.7235 9.1756 13.4889 9.1115 13.1924 9.1115C12.9909 9.1115 12.8204 9.1404 12.6816 9.19744C12.543 9.25255 12.4364 9.32917 12.3623 9.42791C12.2901 9.52678 12.2539 9.63933 12.2539 9.76482C12.2501 9.8692 12.272 9.9604 12.3193 10.0383C12.3688 10.1162 12.4369 10.1843 12.5225 10.2414C12.6079 10.2964 12.7064 10.3451 12.8184 10.3869C12.9304 10.4268 13.0505 10.4609 13.1777 10.4894L13.7031 10.6144C13.9578 10.6715 14.1914 10.7479 14.4043 10.8429C14.6173 10.938 14.8021 11.0547 14.958 11.1935C15.1138 11.3323 15.2348 11.4957 15.3203 11.6838C15.4077 11.8719 15.4522 12.088 15.4541 12.3312C15.4522 12.6885 15.3611 12.9986 15.1807 13.2609C15.0019 13.5214 14.7427 13.7248 14.4043 13.8693C14.0678 14.0118 13.6617 14.0832 13.1865 14.0832C12.7153 14.0832 12.3048 14.0107 11.9551 13.8664C11.6071 13.7219 11.3345 13.5071 11.1387 13.2238C10.9449 12.9387 10.8435 12.5862 10.834 12.1662H12.0283C12.0416 12.362 12.0984 12.5252 12.1973 12.6564C12.298 12.7857 12.4323 12.8838 12.5996 12.9504C12.7688 13.0149 12.96 13.047 13.1729 13.047C13.3817 13.047 13.563 13.0169 13.7168 12.9562C13.8727 12.8954 13.9935 12.8106 14.0791 12.7023C14.1647 12.5939 14.208 12.469 14.208 12.3283C14.2079 12.1974 14.1686 12.0875 14.0908 11.9982C14.0148 11.9089 13.9022 11.8324 13.7539 11.7697C13.6076 11.707 13.4276 11.6501 13.2148 11.5988L12.5791 11.4387C12.0869 11.3189 11.6982 11.1318 11.4131 10.8771C11.128 10.6224 10.9855 10.2793 10.9873 9.84783C10.9854 9.49418 11.0804 9.18439 11.2705 8.9201C11.4625 8.65603 11.7261 8.45015 12.0605 8.30193C12.3951 8.15369 12.7754 8.07928 13.2012 8.07928Z" fill="black"/><path fill-rule="evenodd" clip-rule="evenodd" d="M5.8125 14.0002H4.48926L4.05664 12.6681H1.94824L1.51465 14.0002H0.19043L2.20703 8.15935H3.79883L5.8125 14.0002ZM2.26172 11.7043H3.74316L3.02539 9.49334H2.98047L2.26172 11.7043Z" fill="black"/><path fill-rule="evenodd" clip-rule="evenodd" d="M8.45215 8.15935C8.88165 8.15935 9.24031 8.22251 9.52734 8.34978C9.81445 8.47717 10.0303 8.65477 10.1748 8.88103C10.3192 9.10536 10.3916 9.36368 10.3916 9.65642C10.3916 9.88452 10.3461 10.085 10.2549 10.258C10.1637 10.4289 10.0384 10.5696 9.87891 10.6799C9.72117 10.7882 9.54024 10.8657 9.33691 10.9113V10.9679C9.55917 10.9775 9.76716 11.0406 9.96094 11.1564C10.1568 11.2724 10.3158 11.4356 10.4375 11.6447C10.5591 11.8519 10.6201 12.099 10.6201 12.3859C10.6201 12.6958 10.5427 12.9727 10.3887 13.216C10.2366 13.4573 10.0113 13.6486 9.71289 13.7892C9.41443 13.9299 9.04655 14.0002 8.60938 14.0002H6.11426V8.15935H8.45215ZM7.34863 12.9904H8.35547C8.69943 12.9904 8.95057 12.9252 9.1084 12.7941C9.26621 12.661 9.34473 12.4834 9.34473 12.2629C9.34468 12.1014 9.30643 11.9587 9.22852 11.8351C9.15056 11.7116 9.03903 11.6145 8.89453 11.5441C8.75195 11.4738 8.58148 11.4387 8.38379 11.4387H7.34863V12.9904ZM7.34863 10.6037H8.26465C8.43369 10.6036 8.58376 10.5737 8.71484 10.5148C8.84793 10.454 8.95227 10.3683 9.02832 10.258C9.10628 10.1477 9.14551 10.0155 9.14551 9.8615C9.14546 9.65055 9.07008 9.48001 8.91992 9.35076C8.77165 9.22169 8.56064 9.15741 8.28711 9.1574H7.34863V10.6037Z" fill="black"/><path d="M7.16602 0.377127C7.44584 0.189493 7.82551 0.20905 8.08496 0.442557L11.418 3.44256C11.7257 3.71966 11.7507 4.19428 11.4736 4.50213C11.1966 4.80961 10.7228 4.83441 10.415 4.55779L7.60938 2.03338L5.11328 4.53045C4.82042 4.82326 4.34562 4.82322 4.05273 4.53045C3.75986 4.23757 3.75989 3.7628 4.05273 3.4699L7.05273 0.4699L7.16602 0.377127Z" fill="black"/></svg>',adesc:'<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M10.3867 11.4697C10.6796 11.1771 11.1544 11.1769 11.4473 11.4697C11.7399 11.7626 11.7399 12.2374 11.4473 12.5303L8.44727 15.5303L8.33398 15.623C8.05425 15.8106 7.67449 15.7909 7.41504 15.5576L4.08203 12.5576C3.77415 12.2805 3.74927 11.8059 4.02637 11.498C4.30342 11.1907 4.77722 11.1657 5.08496 11.4424L7.89062 13.9668L10.3867 11.4697Z" fill="black"/><path d="M13.2012 3.0791C13.6346 3.07912 14.0128 3.1535 14.3359 3.30176C14.6611 3.45006 14.9141 3.65661 15.0947 3.9209C15.2752 4.18513 15.3683 4.49104 15.374 4.83887H14.1904C14.1676 4.60882 14.0695 4.43012 13.8965 4.30273C13.7235 4.17546 13.4889 4.11133 13.1924 4.11133C12.9909 4.11133 12.8204 4.14023 12.6816 4.19727C12.5431 4.25236 12.4364 4.32902 12.3623 4.42773C12.2901 4.52659 12.2539 4.63919 12.2539 4.76465C12.2501 4.86901 12.272 4.96023 12.3193 5.03809C12.3688 5.11604 12.4369 5.18417 12.5225 5.24121C12.6079 5.29623 12.7064 5.34496 12.8184 5.38672C12.9304 5.42661 13.0505 5.46075 13.1777 5.48926L13.7031 5.61426C13.9578 5.67128 14.1914 5.74776 14.4043 5.84277C14.6172 5.93784 14.8021 6.05457 14.958 6.19336C15.1139 6.33216 15.2348 6.49633 15.3203 6.68457C15.4076 6.8727 15.4522 7.08885 15.4541 7.33203C15.4521 7.68929 15.3612 7.99944 15.1807 8.26172C15.0019 8.52216 14.7427 8.72465 14.4043 8.86914C14.0678 9.01165 13.6617 9.08301 13.1865 9.08301C12.7153 9.08299 12.3048 9.01057 11.9551 8.86621C11.6072 8.72173 11.3345 8.50786 11.1387 8.22461C10.9447 7.9394 10.8435 7.58622 10.834 7.16602H12.0283C12.0416 7.36176 12.0985 7.52509 12.1973 7.65625C12.298 7.78554 12.4323 7.88365 12.5996 7.9502C12.7688 8.01477 12.96 8.04785 13.1729 8.04785C13.3817 8.04781 13.5629 8.01678 13.7168 7.95605C13.8727 7.89522 13.9935 7.81051 14.0791 7.70215C14.1646 7.59387 14.2079 7.46965 14.208 7.3291C14.208 7.19796 14.1687 7.08739 14.0908 6.99805C14.0148 6.90868 13.9022 6.83228 13.7539 6.76953C13.6076 6.70685 13.4276 6.64993 13.2148 6.59863L12.5791 6.43848C12.0868 6.31871 11.6982 6.13163 11.4131 5.87695C11.1279 5.62221 10.9855 5.27916 10.9873 4.84766C10.9854 4.49404 11.0804 4.18517 11.2705 3.9209C11.4625 3.65661 11.7259 3.45006 12.0605 3.30176C12.3951 3.15353 12.7754 3.0791 13.2012 3.0791Z" fill="black"/><path fill-rule="evenodd" clip-rule="evenodd" d="M5.8125 9H4.48926L4.05664 7.66797H1.94824L1.51465 9H0.19043L2.20703 3.15918H3.79883L5.8125 9ZM2.26172 6.7041H3.74316L3.02539 4.49414H2.98047L2.26172 6.7041Z" fill="black"/><path fill-rule="evenodd" clip-rule="evenodd" d="M8.45215 3.15918C8.88181 3.15918 9.24025 3.22322 9.52734 3.35059C9.81445 3.47798 10.0303 3.6546 10.1748 3.88086C10.3193 4.10518 10.3916 4.36351 10.3916 4.65625C10.3916 4.88432 10.3461 5.08484 10.2549 5.25781C10.1636 5.4289 10.0386 5.57039 9.87891 5.68066C9.72118 5.78898 9.54022 5.86549 9.33691 5.91113V5.96875C9.55913 5.9783 9.76719 6.04044 9.96094 6.15625C10.1568 6.27223 10.3158 6.43538 10.4375 6.64453C10.5591 6.85173 10.6201 7.09875 10.6201 7.38574C10.6201 7.69567 10.5427 7.97245 10.3887 8.21582C10.2366 8.45719 10.0113 8.64841 9.71289 8.78906C9.41442 8.9297 9.04658 8.99999 8.60938 9H6.11426V3.15918H8.45215ZM7.34863 7.99023H8.35547C8.69948 7.99023 8.95057 7.92504 9.1084 7.79395C9.26621 7.66085 9.34473 7.48325 9.34473 7.2627C9.34466 7.10125 9.3064 6.95844 9.22852 6.83496C9.15056 6.71143 9.03899 6.61427 8.89453 6.54395C8.75196 6.47365 8.58145 6.43848 8.38379 6.43848H7.34863V7.99023ZM7.34863 5.60352H8.26465C8.43369 5.60347 8.58376 5.57354 8.71484 5.51465C8.84791 5.45381 8.95228 5.36807 9.02832 5.25781C9.10623 5.14755 9.14551 5.01529 9.14551 4.86133C9.14542 4.65046 9.07002 4.48078 8.91992 4.35156C8.77163 4.22228 8.56087 4.15724 8.28711 4.15723H7.34863V5.60352Z" fill="black"/></svg>',"chevron-down":'<svg width="16" height="16" viewBox="0 0 16 16" class="ag-icon" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M12 6L8 10L4 6" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>',"chevron-left":'<svg width="16" height="16" viewBox="0 0 16 16" class="ag-icon" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M10 12L6 8L10 4" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>',"chevron-right":'<svg width="16" height="16" viewBox="0 0 16 16" class="ag-icon" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M6 12L10 8L6 4" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>',"chevron-up":'<svg width="16" height="16" viewBox="0 0 16 16" class="ag-icon" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M4 10L8 6L12 10" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>',"column-arrow":'<svg xmlns="http://www.w3.org/2000/svg" class="ag-icon" fill="none" viewBox="0 0 32 32"><path fill-rule="evenodd" clip-rule="evenodd" d="M0 26C0 28.2092 1.79086 30 4 30H14C16.2091 30 18 28.2092 18 26V15H25.8786L24.4394 16.4393C23.8536 17.0251 23.8536 17.9749 24.4394 18.5607C25.0252 19.1464 25.9748 19.1464 26.5606 18.5607L30.5606 14.5607C31.1464 13.9749 31.1464 13.0251 30.5606 12.4393L26.5606 8.43934C25.9748 7.85356 25.0252 7.85356 24.4394 8.43934C23.8536 9.02512 23.8536 9.97488 24.4394 10.5607L25.8786 12H18V6C18 3.79086 16.2091 2 14 2H4C1.79086 2 0 3.79086 0 6V26ZM14 5H10.5V12H15V6C15 5.44772 14.5523 5 14 5ZM4 5H7.5V12H3V6C3 5.44772 3.44772 5 4 5ZM10.5 15H15V26C15 26.5522 14.5523 27 14 27H10.5V15ZM4 27H7.5V15H3V26C3 26.5522 3.44772 27 4 27Z" fill="currentColor"/></svg>',edit:'<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M3.5 10.6262V12.5012H5.375L10.905 6.97122L9.03 5.09622L3.5 10.6262ZM12.355 5.52122C12.4014 5.47497 12.4381 5.42002 12.4632 5.35953C12.4883 5.29905 12.5012 5.23421 12.5012 5.16872C12.5012 5.10324 12.4883 5.0384 12.4632 4.97791C12.4381 4.91742 12.4014 4.86248 12.355 4.81622L11.185 3.64622C11.1387 3.59987 11.0838 3.5631 11.0233 3.53801C10.9628 3.51291 10.898 3.5 10.8325 3.5C10.767 3.5 10.7022 3.51291 10.6417 3.53801C10.5812 3.5631 10.5263 3.59987 10.48 3.64622L9.565 4.56122L11.44 6.43622L12.355 5.52122Z" fill="currentColor"/></svg>',"filter-add":'<svg width="16" height="16" viewBox="0 0 16 16" class="ag-icon" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M5.12126 7.75L10.8517 7.75" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/><path d="M6.65934 11.748L9.32778 11.748" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/><path d="M12.2943 1.04872V6.19184M14.9886 3.74341H9.68478" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/><path d="M8.25488 3C8.04799 3.18323 7.91706 3.45099 7.91699 3.74902C7.91713 4.04868 8.04988 4.31681 8.25879 4.5H2C1.58579 4.5 1.25 4.16421 1.25 3.75C1.25 3.33579 1.58579 3 2 3H8.25488Z" fill="currentColor"/></svg>',"pinned-bottom":'<svg xmlns="http://www.w3.org/2000/svg" fill="none" class="ag-icon" viewBox="0 0 16 16"><path fill="currentColor" d="M3.47 12.28A.75.75 0 0 1 4 11h8a.75.75 0 0 1 0 1.5H4a.75.75 0 0 1-.53-.22ZM12.731 5.256a.75.75 0 0 1-.2.524l-4 4a.75.75 0 0 1-1.06 0l-4-4a.75.75 0 1 1 1.06-1.06l2.72 2.72V2a.75.75 0 0 1 1.5 0v5.44l2.72-2.72a.75.75 0 0 1 1.26.536Z"/></svg>',"pinned-top":'<svg xmlns="http://www.w3.org/2000/svg" class="ag-icon" fill="none" viewBox="0 0 16 16"><path fill="currentColor" d="M12.53 3.72A.75.75 0 0 1 12 5H4a.75.75 0 0 1 0-1.5h8a.75.75 0 0 1 .53.22ZM3.269 10.744a.75.75 0 0 1 .2-.524l4-4a.75.75 0 0 1 1.06 0l4 4a.75.75 0 1 1-1.06 1.06L8.75 8.56V14a.75.75 0 0 1-1.5 0V8.56l-2.72 2.72a.75.75 0 0 1-1.26-.536Z"/></svg>',"small-down":'<svg xmlns="http://www.w3.org/2000/svg" class="ag-icon" fill="black" stroke="none" viewBox="0 0 32 32"><path d="M7.334 10.667 16 21.334l8.667-10.667H7.334Z"/></svg>',"small-up":'<svg xmlns="http://www.w3.org/2000/svg" class="ag-icon" fill="black" stroke="none" viewBox="0 0 32 32"><path d="M7.334 21.333 16 10.666l8.667 10.667H7.334Z"/></svg>',"un-pin":'<svg xmlns="http://www.w3.org/2000/svg" fill="none" class="ag-icon" viewBox="0 0 16 16"><path fill="currentColor" d="M8 11a.75.75 0 0 0-.75.75v3.333a.75.75 0 1 0 1.5 0V11.75A.75.75 0 0 0 8 11Z"/><path fill="currentColor" d="M13.11 1.436a.75.75 0 0 0-1.22-.872l-10 14a.75.75 0 1 0 1.22.872L5.207 12.5h7.376a.75.75 0 0 0 .75-.75v-1.174a2.08 2.08 0 0 0-1.153-1.863l-1.185-.599-.005-.002a.58.58 0 0 1-.323-.522V5.165a2.083 2.083 0 0 0 1.854-2.904l.589-.825Zm-3.943 5.52v.634a2.08 2.08 0 0 0 1.153 1.863l1.185.6.005.002a.58.58 0 0 1 .323.522V11H6.28l2.887-4.044ZM9.277 1H5.25a2.084 2.084 0 0 0-.083 4.165v1.676l1.5-2.132v-.292a.75.75 0 0 0-.75-.75H5.25a.584.584 0 0 1 0-1.167h2.972L9.277 1Z"/></svg>'},by=(e={})=>{let t="";for(const o of[...Object.keys(Ah),...Object.keys(kh)]){const s=Sy(o,e.strokeWidth);t+=`.ag-icon-${o}::before { mask-image: url('data:image/svg+xml,${encodeURIComponent(s)}'); }
|
|
18
|
+
`}return t},Sy=(e,t=1.5)=>{const o=kh[e];if(o)return o;const s=Ah[e];if(!s)throw new Error(`Missing icon data for ${e}`);return`<svg xmlns="http://www.w3.org/2000/svg" class="ag-icon" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke="black" stroke-width="${t}" viewBox="0 0 24 24"><style>* { vector-effect: non-scaling-stroke; }</style>`+s+"</svg>"},yy=(e={})=>Ne({feature:"iconSet",css:()=>by(e)}),Ry=yy(),Fy=':where(.ag-input-field-input[type=number]:not(.ag-number-field-input-stepper)){-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield;&::-webkit-inner-spin-button,&::-webkit-outer-spin-button{-webkit-appearance:none;appearance:none;margin:0}}.ag-input-field-input:where(input:not([type]),input[type=text],input[type=number],input[type=tel],input[type=date],input[type=datetime-local],textarea){background-color:var(--ag-input-background-color);border:var(--ag-input-border);border-radius:var(--ag-input-border-radius);color:var(--ag-input-text-color);font-family:inherit;font-size:inherit;line-height:inherit;margin:0;min-height:var(--ag-input-height);padding:0;&:where(:disabled){background-color:var(--ag-input-disabled-background-color);border:var(--ag-input-disabled-border);color:var(--ag-input-disabled-text-color)}&:where(:focus){background-color:var(--ag-input-focus-background-color);border:var(--ag-input-focus-border);box-shadow:var(--ag-input-focus-shadow);color:var(--ag-input-focus-text-color);outline:none}&:where(:invalid){background-color:var(--ag-input-invalid-background-color);border:var(--ag-input-invalid-border);color:var(--ag-input-invalid-text-color)}&:where(.invalid){background-color:var(--ag-input-invalid-background-color);border:var(--ag-input-invalid-border);color:var(--ag-input-invalid-text-color)}&::-moz-placeholder{color:var(--ag-input-placeholder-text-color)}&::placeholder{color:var(--ag-input-placeholder-text-color)}}:where(.ag-ltr) .ag-input-field-input:where(input:not([type]),input[type=text],input[type=number],input[type=tel],input[type=date],input[type=datetime-local],textarea){padding-left:var(--ag-input-padding-start)}:where(.ag-rtl) .ag-input-field-input:where(input:not([type]),input[type=text],input[type=number],input[type=tel],input[type=date],input[type=datetime-local],textarea){padding-right:var(--ag-input-padding-start)}&:where(.ag-ltr,.ag-rtl) .ag-input-field-input:where(input:not([type]),input[type=text],input[type=number],input[type=tel],input[type=date],input[type=datetime-local],textarea){padding:0 var(--ag-input-padding-start)}:where(.ag-column-select-header-filter-wrapper),:where(.ag-filter-add-select),:where(.ag-filter-filter),:where(.ag-filter-toolpanel-search),:where(.ag-floating-filter-search-icon),:where(.ag-mini-filter){.ag-input-wrapper:before{background-color:currentcolor;color:var(--ag-input-icon-color);content:"";display:block;height:12px;-webkit-mask-image:url("data:image/svg+xml;charset=utf-8;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMiIgaGVpZ2h0PSIxMiIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMDAwIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIHN0cm9rZS13aWR0aD0iMS41Ij48cGF0aCBkPSJNNS4zIDlhMy43IDMuNyAwIDEgMCAwLTcuNSAzLjcgMy43IDAgMCAwIDAgNy41Wk0xMC41IDEwLjUgOC4zIDguMiIvPjwvc3ZnPg==");mask-image:url("data:image/svg+xml;charset=utf-8;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMiIgaGVpZ2h0PSIxMiIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMDAwIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIHN0cm9rZS13aWR0aD0iMS41Ij48cGF0aCBkPSJNNS4zIDlhMy43IDMuNyAwIDEgMCAwLTcuNSAzLjcgMy43IDAgMCAwIDAgNy41Wk0xMC41IDEwLjUgOC4zIDguMiIvPjwvc3ZnPg==");-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;opacity:.5;position:absolute;width:12px}}:where(.ag-ltr) :where(.ag-column-select-header-filter-wrapper),:where(.ag-ltr) :where(.ag-filter-add-select),:where(.ag-ltr) :where(.ag-filter-filter),:where(.ag-ltr) :where(.ag-filter-toolpanel-search),:where(.ag-ltr) :where(.ag-floating-filter-search-icon),:where(.ag-ltr) :where(.ag-mini-filter){.ag-input-wrapper:before{margin-left:var(--ag-spacing)}.ag-number-field-input,.ag-text-field-input{padding-left:calc(var(--ag-spacing)*1.5 + 12px)}}:where(.ag-rtl) :where(.ag-column-select-header-filter-wrapper),:where(.ag-rtl) :where(.ag-filter-add-select),:where(.ag-rtl) :where(.ag-filter-filter),:where(.ag-rtl) :where(.ag-filter-toolpanel-search),:where(.ag-rtl) :where(.ag-floating-filter-search-icon),:where(.ag-rtl) :where(.ag-mini-filter){.ag-input-wrapper:before{margin-right:var(--ag-spacing)}.ag-number-field-input,.ag-text-field-input{padding-right:calc(var(--ag-spacing)*1.5 + 12px)}}',Ey=".ag-input-field-input:where(input:not([type]),input[type=text],input[type=number],input[type=tel],input[type=date],input[type=datetime-local],textarea){&:focus{box-shadow:var(--ag-focus-shadow);&:where(.invalid),&:where(:invalid){box-shadow:var(--ag-focus-error-shadow)}}}",xy={inputBackgroundColor:"transparent",inputBorder:!1,inputBorderRadius:0,inputTextColor:{ref:"textColor"},inputPlaceholderTextColor:{ref:"inputTextColor",mix:.5},inputPaddingStart:0,inputHeight:{calc:"max(iconSize, fontSize) + spacing * 2"},inputFocusBackgroundColor:{ref:"inputBackgroundColor"},inputFocusBorder:{ref:"inputBorder"},inputFocusShadow:"none",inputFocusTextColor:{ref:"inputTextColor"},inputDisabledBackgroundColor:{ref:"inputBackgroundColor"},inputDisabledBorder:{ref:"inputBorder"},inputDisabledTextColor:{ref:"inputTextColor"},inputInvalidBackgroundColor:{ref:"inputBackgroundColor"},inputInvalidBorder:{ref:"inputBorder"},inputInvalidTextColor:{ref:"inputTextColor"},inputIconColor:{ref:"inputTextColor"},pickerButtonBorder:!1,pickerButtonFocusBorder:{ref:"inputFocusBorder"},pickerButtonBackgroundColor:{ref:"backgroundColor"},pickerButtonFocusBackgroundColor:{ref:"backgroundColor"},pickerListBorder:!1,pickerListBackgroundColor:{ref:"backgroundColor"},colorPickerThumbSize:18,colorPickerTrackSize:12,colorPickerThumbBorderWidth:3,colorPickerTrackBorderRadius:12,colorPickerColorBorderRadius:4},Py=()=>Ne({feature:"inputStyle",params:{...xy,inputBackgroundColor:Ee,inputBorder:!0,inputBorderRadius:{ref:"borderRadius"},inputPaddingStart:{ref:"spacing"},inputFocusBorder:{color:st},inputFocusShadow:{ref:"focusShadow"},inputDisabledBackgroundColor:ke(.06),inputDisabledTextColor:{ref:"textColor",mix:.5},inputInvalidBorder:{color:{ref:"invalidColor"}},pickerButtonBorder:!0,pickerListBorder:!0},css:()=>Fy+Ey}),Lh=Py(),Oh='.ag-tabs-header{background-color:var(--ag-tab-bar-background-color);border-bottom:var(--ag-tab-bar-border);display:flex;flex:1;gap:var(--ag-tab-spacing);padding:var(--ag-tab-bar-top-padding) var(--ag-tab-bar-horizontal-padding) 0}.ag-tabs-header-wrapper{display:flex}.ag-tabs-close-button-wrapper{align-items:center;border:0;display:flex;padding:var(--ag-spacing)}:where(.ag-ltr) .ag-tabs-close-button-wrapper{border-right:solid var(--ag-border-width) var(--ag-border-color)}:where(.ag-rtl) .ag-tabs-close-button-wrapper{border-left:solid var(--ag-border-width) var(--ag-border-color)}.ag-tabs-close-button{background-color:unset;border:0;cursor:pointer;padding:0}.ag-tab{align-items:center;background-color:var(--ag-tab-background-color);border-left:var(--ag-tab-selected-border-width) solid transparent;border-right:var(--ag-tab-selected-border-width) solid transparent;color:var(--ag-tab-text-color);cursor:pointer;display:flex;flex:1;justify-content:center;padding:var(--ag-tab-top-padding) var(--ag-tab-horizontal-padding) var(--ag-tab-bottom-padding);position:relative}.ag-tab:hover{background-color:var(--ag-tab-hover-background-color);color:var(--ag-tab-hover-text-color)}.ag-tab.ag-tab-selected{background-color:var(--ag-tab-selected-background-color);color:var(--ag-tab-selected-text-color)}:where(.ag-ltr) .ag-tab.ag-tab-selected:where(:not(:first-of-type)){border-left-color:var(--ag-tab-selected-border-color)}:where(.ag-rtl) .ag-tab.ag-tab-selected:where(:not(:first-of-type)){border-right-color:var(--ag-tab-selected-border-color)}:where(.ag-ltr) .ag-tab.ag-tab-selected:where(:not(:last-of-type)){border-right-color:var(--ag-tab-selected-border-color)}:where(.ag-rtl) .ag-tab.ag-tab-selected:where(:not(:last-of-type)){border-left-color:var(--ag-tab-selected-border-color)}.ag-tab:after{background-color:var(--ag-tab-selected-underline-color);bottom:0;content:"";display:block;height:var(--ag-tab-selected-underline-width);left:0;opacity:0;position:absolute;right:0;transition:opacity var(--ag-tab-selected-underline-transition-duration)}.ag-tab.ag-tab-selected:after{opacity:1}',Dy=".ag-tab{border-left:var(--ag-tab-selected-border-width) solid transparent;border-right:var(--ag-tab-selected-border-width) solid transparent;border-top:var(--ag-tab-selected-border-width) solid transparent;flex:none;&.ag-tab-selected{border-left-color:var(--ag-tab-selected-border-color);border-right-color:var(--ag-tab-selected-border-color);border-top-color:var(--ag-tab-selected-border-color);margin-bottom:-1px;padding-bottom:calc(var(--ag-tab-bottom-padding) + 1px)}}",Gh={tabBarBackgroundColor:"transparent",tabBarHorizontalPadding:0,tabBarTopPadding:0,tabBackgroundColor:"transparent",tabTextColor:{ref:"textColor"},tabHorizontalPadding:{ref:"spacing"},tabTopPadding:{ref:"spacing"},tabBottomPadding:{ref:"spacing"},tabSpacing:"0",tabHoverBackgroundColor:{ref:"tabBackgroundColor"},tabHoverTextColor:{ref:"tabTextColor"},tabSelectedBackgroundColor:{ref:"tabBackgroundColor"},tabSelectedTextColor:{ref:"tabTextColor"},tabSelectedBorderWidth:{ref:"borderWidth"},tabSelectedBorderColor:"transparent",tabSelectedUnderlineColor:"transparent",tabSelectedUnderlineWidth:0,tabSelectedUnderlineTransitionDuration:0,tabBarBorder:!1},My=()=>Ne({feature:"tabStyle",params:{...Gh,tabBarBorder:!0,tabBarBackgroundColor:ze(.05),tabTextColor:{ref:"textColor",mix:.7},tabSelectedTextColor:{ref:"textColor"},tabHoverTextColor:{ref:"textColor"},tabSelectedBorderColor:{ref:"borderColor"},tabSelectedBackgroundColor:Ee},css:Oh}),Ty=My(),Iy=()=>Ne({feature:"tabStyle",params:{...Gh,tabBarBackgroundColor:{ref:"chromeBackgroundColor"},tabBarHorizontalPadding:{ref:"spacing"},tabBarTopPadding:{ref:"spacing"},tabBarBorder:!0,tabHorizontalPadding:{calc:"spacing * 2"},tabTopPadding:{ref:"spacing"},tabBottomPadding:{ref:"spacing"},tabSpacing:{ref:"spacing"},tabSelectedBorderColor:{ref:"borderColor"},tabSelectedBackgroundColor:Ee},css:()=>Oh+Dy}),Ay=Iy(),ky=()=>({fontFamily:[{googleFont:"IBM Plex Sans"},"-apple-system","BlinkMacSystemFont","Segoe UI","Roboto","Oxygen-Sans","Ubuntu"]}),Ly=()=>Ph().withPart(Dh).withPart(Ih).withPart(Ry).withPart(Ty).withPart(Lh).withPart(xh).withParams(ky()),Oy=Ly(),Gy=()=>({accentColor:"#0091ea",borderColor:ze(.2),spacing:4,widgetVerticalSpacing:{calc:"max(8px, spacing)"},borderRadius:2,wrapperBorderRadius:2,headerColumnResizeHandleColor:"transparent",headerColumnBorder:!0,headerColumnBorderHeight:"50%",oddRowBackgroundColor:{ref:"chromeBackgroundColor",mix:.5},checkboxBorderRadius:2,checkboxBorderWidth:1,checkboxUncheckedBackgroundColor:Ee,checkboxUncheckedBorderColor:ke(.5),checkboxCheckedBackgroundColor:Ee,checkboxCheckedBorderColor:st,checkboxCheckedShapeColor:st,checkboxIndeterminateBackgroundColor:Ee,checkboxIndeterminateBorderColor:ke(.5),checkboxIndeterminateShapeColor:ke(.5),focusShadow:{radius:2,spread:1,color:st},headerTextColor:ze(.6),iconButtonHoverBackgroundColor:"transparent",iconButtonActiveBackgroundColor:"transparent",fontSize:12,tabSelectedBackgroundColor:Ee,headerFontWeight:"bold",toggleButtonWidth:32,toggleButtonHeight:16,toggleButtonSwitchInset:1,toggleButtonOffBackgroundColor:ke(.5),sideButtonBorder:!0,sideButtonBarTopPadding:{calc:"spacing * 4"},popupShadow:"5px 5px 10px rgba(0, 0, 0, 0.3)",statusBarLabelColor:ze(.54),statusBarLabelFontWeight:600,statusBarValueFontWeight:600,panelTitleBarIconColor:Dt,colorPickerThumbSize:13,colorPickerTrackSize:11,colorPickerThumbBorderWidth:2,colorPickerTrackBorderRadius:2,colorPickerColorBorderRadius:2}),Hy=()=>Ph().withPart(sy).withPart(Dh).withPart(Ih).withPart(wy).withPart(Ay).withPart(Lh).withPart(ly).withParams(Gy()),Hh=Hy(),fo=(e,t,o,s,i)=>({changeKey:e,type:t,defaultValue:o,noWarn:s,cacheDefault:i}),By=fo("cellHorizontalPadding","length",16),Vy=fo("indentationLevel","length",0,!0,!0),Ny=fo("rowGroupIndentSize","length",0),yc=fo("rowHeight","length",42),Rc=fo("headerHeight","length",48),ur=fo("rowBorderWidth","border",1),Fc=fo("pinnedRowBorderWidth","border",1),Wy=fo("headerRowBorderWidth","border",1);function zy(e,t){for(const o of t.sort((s,i)=>s.moduleName.localeCompare(i.moduleName))){const s=o.css;s&&e.set(`module-${o.moduleName}`,s)}}var _y=class extends KS{initVariables(){this.addManagedPropertyListener("rowHeight",()=>this.refreshRowHeightVariable()),this.getSizeEl(yc),this.getSizeEl(Rc),this.getSizeEl(ur),this.getSizeEl(Fc),this.refreshRowBorderWidthVariable()}getPinnedRowBorderWidth(){return this.getCSSVariablePixelValue(Fc)}getRowBorderWidth(){return this.getCSSVariablePixelValue(ur)}getHeaderRowBorderWidth(){return this.getCSSVariablePixelValue(Wy)}getDefaultRowHeight(){return this.getCSSVariablePixelValue(yc)}getDefaultHeaderHeight(){return this.getCSSVariablePixelValue(Rc)}getDefaultCellHorizontalPadding(){return this.getCSSVariablePixelValue(By)}getCellPaddingLeft(){const e=this.getDefaultCellHorizontalPadding(),t=this.getCSSVariablePixelValue(Vy),o=this.getCSSVariablePixelValue(Ny);return e-1+o*t}getCellPadding(){const e=this.getDefaultCellHorizontalPadding()-1;return this.getCellPaddingLeft()+e}getDefaultColumnMinWidth(){return Math.min(36,this.getDefaultRowHeight())}refreshRowHeightVariable(){const{eRootDiv:e}=this,t=e.style.getPropertyValue("--ag-line-height").trim(),o=this.gos.get("rowHeight");if(o==null||isNaN(o)||!isFinite(o))return t!==null&&e.style.setProperty("--ag-line-height",null),-1;const s=`${o}px`;return t!=s?(e.style.setProperty("--ag-line-height",s),o):t!=""?Number.parseFloat(t):-1}fireStylesChangedEvent(e){e==="rowBorderWidth"&&this.refreshRowBorderWidthVariable(),super.fireStylesChangedEvent(e)}refreshRowBorderWidthVariable(){const e=this.getCSSVariablePixelValue(ur);this.eRootDiv.style.setProperty("--ag-internal-row-border-width",`${e}px`)}postProcessThemeChange(e,t){e&&getComputedStyle(this.getMeasurementContainer()).getPropertyValue("--ag-legacy-styles-loaded")&&ce(t?106:239)}getAdditionalCss(){const e=new Map;return e.set("core",[jS]),zy(e,Array.from(wf())),e}getDefaultTheme(){return Oy}varError(e,t){D(9,{variable:{cssName:e,defaultValue:t}})}themeError(e){ce(240,{theme:e})}shadowRootError(){ce(293)}},Uy=class extends qe{constructor(){super(...arguments),this.beanName="eventSvc",this.eventServiceType="global",this.globalSvc=new Ao}addListener(e,t,o){this.globalSvc.addEventListener(e,t,o)}removeListener(e,t,o){this.globalSvc.removeEventListener(e,t,o)}addGlobalListener(e,t=!1){this.globalSvc.addGlobalListener(e,t)}removeGlobalListener(e,t=!1){this.globalSvc.removeGlobalListener(e,t)}dispatchEvent(e){this.globalSvc.dispatchEvent(this.gos.addCommon(e))}dispatchEventOnce(e){this.globalSvc.dispatchEventOnce(this.gos.addCommon(e))}},$y=class extends Uy{postConstruct(){const{globalListener:e,globalSyncListener:t}=this.beans;e&&this.addGlobalListener(e,!0),t&&this.addGlobalListener(t,!1)}};function $r(e,t,o){const s=e.visibleCols.headerGroupRowCount;if(o>=s)return{column:t,headerRowIndex:o};let i=t.getParent();for(;i&&i.getProvidedColumnGroup().getLevel()>o;)i=i.getParent();const n=t.isSpanHeaderHeight();return!i||n&&i.isPadding()?{column:t,headerRowIndex:s}:{column:i,headerRowIndex:i.getProvidedColumnGroup().getLevel()}}var Ky=class extends x{constructor(){super(...arguments),this.beanName="headerNavigation",this.currentHeaderRowWithoutSpan=-1}postConstruct(){const e=this.beans;e.ctrlsSvc.whenReady(this,o=>{this.gridBodyCon=o.gridBodyCtrl});const t=Pe(e);this.addManagedElementListeners(t,{mousedown:()=>{this.currentHeaderRowWithoutSpan=-1}})}getHeaderPositionForColumn(e,t){let o;const{colModel:s,colGroupSvc:i,ctrlsSvc:n}=this.beans;if(typeof e=="string"?(o=s.getCol(e),o||(o=i?.getColumnGroup(e)??null)):o=e,!o)return null;const a=n.getHeaderRowContainerCtrl()?.getAllCtrls(),l=he(a||[]).type==="filter",c=lt(this.beans)-1;let d=-1,u=o;for(;u;)d++,u=u.getParent();let h=d;return t&&l&&h===c-1&&h++,h===-1?null:{headerRowIndex:h,column:o}}navigateVertically(e,t){const{focusSvc:o,visibleCols:s}=this.beans,{focusedHeader:i}=o;if(!i)return!1;const{headerRowIndex:n}=i,r=i.column,a=lt(this.beans),l=this.getHeaderRowType(n),c=s.headerGroupRowCount;let{headerRowIndex:d,column:u,headerRowIndexWithoutSpan:h}=e==="UP"?qy(l,r,n):jy(r,n,c),g=!1;return d<0&&(d=0,u=r,g=!0),d>=a?(d=-1,this.currentHeaderRowWithoutSpan=-1):h!==void 0&&(this.currentHeaderRowWithoutSpan=h),!g&&!u?!1:o.focusHeaderPosition({headerPosition:{headerRowIndex:d,column:u},allowUserOverride:!0,event:t})}navigateHorizontally(e,t=!1,o){const{focusSvc:s,gos:i}=this.beans,n={...s.focusedHeader};let r,a;this.currentHeaderRowWithoutSpan!==-1?n.headerRowIndex=this.currentHeaderRowWithoutSpan:this.currentHeaderRowWithoutSpan=n.headerRowIndex,e==="LEFT"!==i.get("enableRtl")?(a="Before",r=this.findHeader(n,a)):(a="After",r=this.findHeader(n,a));const l=i.getCallback("tabToNextHeader");if(t&&l){const c=s.focusHeaderPositionFromUserFunc({userFunc:l,headerPosition:r,direction:a});if(c){const{headerRowIndex:d}=s.focusedHeader||{};d!=null&&d!=n.headerRowIndex&&(this.currentHeaderRowWithoutSpan=d)}return c}return r||!t?s.focusHeaderPosition({headerPosition:r,direction:a,fromTab:t,allowUserOverride:!0,event:o}):this.focusNextHeaderRow(n,a,o)}focusNextHeaderRow(e,t,o){const s=this.beans,i=e.headerRowIndex;let n=null,r;const a=lt(s),l=this.beans.visibleCols.allCols;if(t==="Before"){if(i<=0)return!1;n=he(l),r=i-1,this.currentHeaderRowWithoutSpan-=1}else n=l[0],r=i+1,this.currentHeaderRowWithoutSpan<a?this.currentHeaderRowWithoutSpan+=1:this.currentHeaderRowWithoutSpan=-1;let{column:c,headerRowIndex:d}=$r(this.beans,n,r);return d>=a&&(d=-1),s.focusSvc.focusHeaderPosition({headerPosition:{column:c,headerRowIndex:d},direction:t,fromTab:!0,allowUserOverride:!0,event:o})}scrollToColumn(e,t="After"){if(e.getPinned())return;let o;if(Fe(e)){const s=e.getDisplayedLeafColumns();o=t==="Before"?he(s):s[0]}else o=e;this.gridBodyCon.scrollFeature.ensureColumnVisible(o)}findHeader(e,t){const{colGroupSvc:o,visibleCols:s}=this.beans;let i=e.column;if(i instanceof oi){const l=i.getDisplayedLeafColumns();i=t==="Before"?l[0]:l[l.length-1]}const n=t==="Before"?s.getColBefore(i):s.getColAfter(i);if(!n)return;const r=s.headerGroupRowCount;if(e.headerRowIndex>=r)return{headerRowIndex:e.headerRowIndex,column:n};const a=o?.getColGroupAtLevel(n,e.headerRowIndex);return a?a.isPadding()&&n.isSpanHeaderHeight()?{headerRowIndex:s.headerGroupRowCount,column:n}:{headerRowIndex:e.headerRowIndex,column:a??n}:{headerRowIndex:n instanceof Uo&&n.isSpanHeaderHeight()?s.headerGroupRowCount:e.headerRowIndex,column:n}}getHeaderRowType(e){const t=this.beans.ctrlsSvc.getHeaderRowContainerCtrl();if(t)return t.getRowType(e)}};function qy(e,t,o){const s=o-1;if(e!=="filter"){const i=t instanceof Uo&&t.isSpanHeaderHeight();let n=t.getParent();for(;n&&(n.getProvidedColumnGroup().getLevel()>s||i&&n.isPadding());)n=n.getParent();if(n)return i?{column:n,headerRowIndex:n.getProvidedColumnGroup().getLevel(),headerRowIndexWithoutSpan:s}:{column:n,headerRowIndex:s,headerRowIndexWithoutSpan:s}}return{column:t,headerRowIndex:s,headerRowIndexWithoutSpan:s}}function jy(e,t,o){const s=t+1,i={column:e,headerRowIndex:s,headerRowIndexWithoutSpan:s};if(e instanceof oi){if(s>=o)return{column:e.getDisplayedLeafColumns()[0],headerRowIndex:o,headerRowIndexWithoutSpan:s};let r=e.getDisplayedChildren()[0];if(r instanceof oi&&r.isPadding()){const l=r.getDisplayedLeafColumns()[0];l.isSpanHeaderHeight()&&(r=l)}i.column=r,r instanceof Uo&&r.isSpanHeaderHeight()&&(i.headerRowIndex=o,i.headerRowIndexWithoutSpan=s)}return i}var Yy=class extends x{constructor(){super(...arguments),this.beanName="focusSvc",this.focusFallbackTimeout=null,this.needsFocusRestored=!1}wireBeans(e){this.colModel=e.colModel,this.visibleCols=e.visibleCols,this.rowRenderer=e.rowRenderer,this.navigation=e.navigation,this.filterManager=e.filterManager,this.overlays=e.overlays}postConstruct(){const e=this.clearFocusedCell.bind(this);this.addManagedEventListeners({columnPivotModeChanged:e,newColumnsLoaded:this.onColumnEverythingChanged.bind(this),columnGroupOpened:e,columnRowGroupChanged:e}),this.addDestroyFunc(rC(this.beans))}attemptToRecoverFocus(){this.needsFocusRestored=!0,this.focusFallbackTimeout!=null&&clearTimeout(this.focusFallbackTimeout),this.focusFallbackTimeout=window.setTimeout(this.setFocusRecovered.bind(this),100)}setFocusRecovered(){this.needsFocusRestored=!1,this.focusFallbackTimeout!=null&&(clearTimeout(this.focusFallbackTimeout),this.focusFallbackTimeout=null)}shouldTakeFocus(){return this.gos.get("suppressFocusAfterRefresh")?(this.setFocusRecovered(),!1):this.needsFocusRestored?(this.setFocusRecovered(),!0):this.doesRowOrCellHaveBrowserFocus()}onColumnEverythingChanged(){if(!this.focusedCell)return;const e=this.focusedCell.column,t=this.colModel.getCol(e.getId());e!==t&&this.clearFocusedCell()}getFocusCellToUseAfterRefresh(){const{gos:e,focusedCell:t}=this;return e.get("suppressFocusAfterRefresh")||e.get("suppressCellFocus")||!t||!this.doesRowOrCellHaveBrowserFocus()?null:t}getFocusHeaderToUseAfterRefresh(){return this.gos.get("suppressFocusAfterRefresh")||!this.focusedHeader||!this.isDomDataPresentInHierarchy(ve(this.beans),Hu)?null:this.focusedHeader}doesRowOrCellHaveBrowserFocus(){const e=ve(this.beans);return this.isDomDataPresentInHierarchy(e,rn,!0)?!0:this.isDomDataPresentInHierarchy(e,an,!0)}isDomDataPresentInHierarchy(e,t,o){let s=e;for(;s;){const i=ou(this.gos,s,t);if(i)return i.destroyed&&o?(this.attemptToRecoverFocus(),!1):!0;s=s.parentNode}return!1}getFocusedCell(){return this.focusedCell}getFocusEventParams(e){const{rowIndex:t,rowPinned:o,column:s}=e,i={rowIndex:t,rowPinned:o,column:s,isFullWidthCell:!1},n=this.rowRenderer.getRowByPosition({rowIndex:t,rowPinned:o});return n&&(i.isFullWidthCell=n.isFullWidth()),i}clearFocusedCell(){if(this.focusedCell==null)return;const e=this.getFocusEventParams(this.focusedCell);this.focusedCell=null,this.eventSvc.dispatchEvent({type:"cellFocusCleared",...e})}setFocusedCell(e){this.setFocusRecovered();const{column:t,rowIndex:o,rowPinned:s,forceBrowserFocus:i=!1,preventScrollOnBrowserFocus:n=!1,sourceEvent:r}=e,a=this.colModel.getCol(t);if(!a){this.focusedCell=null;return}this.focusedCell={rowIndex:o,rowPinned:Nt(s),column:a};const l=this.getFocusEventParams(this.focusedCell);this.eventSvc.dispatchEvent({type:"cellFocused",...l,...this.previousCellFocusParams&&{previousParams:this.previousCellFocusParams},forceBrowserFocus:i,preventScrollOnBrowserFocus:n,sourceEvent:r}),this.previousCellFocusParams=l}isCellFocused(e){return this.focusedCell==null?!1:Va(e,this.focusedCell)}isHeaderWrapperFocused(e){if(this.focusedHeader==null)return!1;const{column:t,rowCtrl:{rowIndex:o,pinned:s}}=e,{column:i,headerRowIndex:n}=this.focusedHeader;return t===i&&o===n&&s==i.getPinned()}focusHeaderPosition(e){if(this.setFocusRecovered(),pt(this.beans))return!1;const{direction:t,fromTab:o,allowUserOverride:s,event:i,fromCell:n,rowWithoutSpanValue:r,scroll:a=!0}=e;let{headerPosition:l}=e;if(n&&this.filterManager?.isAdvFilterHeaderActive())return this.focusAdvancedFilter(l);if(s){const c=this.focusedHeader,d=lt(this.beans);if(o){const u=this.gos.getCallback("tabToNextHeader");u&&(l=this.getHeaderPositionFromUserFunc({userFunc:u,direction:t,currentPosition:c,headerPosition:l,headerRowCount:d}))}else{const u=this.gos.getCallback("navigateToNextHeader");if(u&&i){const h={key:i.key,previousHeaderPosition:c,nextHeaderPosition:l,headerRowCount:d,event:i},g=u(h);l=g===null?c:g}}}return l?this.focusProvidedHeaderPosition({headerPosition:l,direction:t,event:i,fromCell:n,rowWithoutSpanValue:r,scroll:a}):!1}focusHeaderPositionFromUserFunc(e){if(pt(this.beans))return!1;const{userFunc:t,headerPosition:o,direction:s,event:i}=e,n=this.focusedHeader,r=lt(this.beans),a=this.getHeaderPositionFromUserFunc({userFunc:t,direction:s,currentPosition:n,headerPosition:o,headerRowCount:r});return!!a&&this.focusProvidedHeaderPosition({headerPosition:a,direction:s,event:i})}getHeaderPositionFromUserFunc(e){const{userFunc:t,direction:o,currentPosition:s,headerPosition:i,headerRowCount:n}=e,a=t({backwards:o==="Before",previousHeaderPosition:s,nextHeaderPosition:i,headerRowCount:n});return a===!0?s:a===!1?null:a}focusProvidedHeaderPosition(e){const{headerPosition:t,direction:o,fromCell:s,rowWithoutSpanValue:i,event:n,scroll:r=!0}=e,{column:a,headerRowIndex:l}=t,{filterManager:c,ctrlsSvc:d,headerNavigation:u}=this.beans;if(this.focusedHeader&&$C(e.headerPosition,this.focusedHeader))return!1;if(l===-1)return c?.isAdvFilterHeaderActive()?this.focusAdvancedFilter(t):this.focusGridView({column:a,event:n});r&&u?.scrollToColumn(a,o);const g=d.getHeaderRowContainerCtrl(a.getPinned())?.focusHeader(t.headerRowIndex,a,n)||!1;return u&&g&&(i!=null||s)&&(u.currentHeaderRowWithoutSpan=i??-1),g}focusFirstHeader(){if(this.overlays?.exclusive&&this.focusOverlay())return!0;const e=this.visibleCols.allCols[0];if(!e)return!1;const t=$r(this.beans,e,0);return this.focusHeaderPosition({headerPosition:t,rowWithoutSpanValue:0})}focusLastHeader(e){if(this.overlays?.exclusive&&this.focusOverlay(!0))return!0;const t=lt(this.beans)-1,o=he(this.visibleCols.allCols);return this.focusHeaderPosition({headerPosition:{headerRowIndex:t,column:o},rowWithoutSpanValue:-1,event:e})}focusPreviousFromFirstCell(e){return this.filterManager?.isAdvFilterHeaderActive()?this.focusAdvancedFilter(null):this.focusLastHeader(e)}isAnyCellFocused(){return!!this.focusedCell}isRowFocused(e,t){return this.focusedCell==null?!1:this.focusedCell.rowIndex===e&&this.focusedCell.rowPinned===Nt(t)}focusOverlay(e){const t=this.overlays?.isVisible()&&this.overlays.eWrapper?.getGui();return!!t&&Ho(t,e)}getDefaultTabToNextGridContainerTarget(e){const{backwards:t,focusableContainers:o}=e,s=t?-1:1;let i;const n=()=>(i===void 0&&(i=this.getGridBodyTabTarget(t)),i);for(let r=e.nextIndex;r>=0&&r<o.length;r+=s){const a=VC(o[r],n);if(a)return a}return null}getGridBodyTabTarget(e){if(e)return this.getGridViewTabTarget({column:he(this.visibleCols.allCols),backwards:!0});const t=this.visibleCols.allCols[0];return this.gos.get("headerHeight")===0||pt(this.beans)?this.getGridViewTabTarget({column:t}):t?$r(this.beans,t,0):null}getGridViewTabTarget(e){const{backwards:t=!1}=e,o=e.column??this.focusedHeader?.column;if(!o||this.overlays?.exclusive)return null;if(si(this.beans))return t&&!pt(this.beans)?{headerRowIndex:lt(this.beans)-1,column:o}:null;const s=t?Ql(this.beans):Yl(this.beans);if(s?.rowIndex==null){if(this.overlays?.isVisible())return null;if(t&&!pt(this.beans)){const n=he(this.visibleCols.allCols);if(n)return{headerRowIndex:lt(this.beans)-1,column:n}}return null}const i=kt(this.beans,s);return!i||o.isSuppressNavigable(i)||t&&this.rowRenderer.getRowByPosition(s)?.isFullWidth()?null:{rowIndex:s.rowIndex,rowPinned:s.rowPinned,column:o}}focusGridView(e){const{backwards:t=!1,canFocusOverlay:o=!0,event:s}=e;if(this.overlays?.exclusive)return o&&this.focusOverlay(t);if(si(this.beans))return t&&!pt(this.beans)?this.focusLastHeader():o&&this.focusOverlay(t)?!0:t?!1:bs(this.beans,t);const i=t?Ql(this.beans):Yl(this.beans);if(i){const n=e.column??this.focusedHeader?.column,{rowIndex:r,rowPinned:a}=i,l=kt(this.beans,i);if(!n||!l||r==null)return!1;if(n.isSuppressNavigable(l)){const c=this.gos.get("enableRtl");let d;return!s||s.key===R.TAB?d=c?R.LEFT:R.RIGHT:d=s.key,this.beans.navigation?.navigateToNextCell(null,d,{rowIndex:r,column:n,rowPinned:a||null},!0),!0}return this.navigation?.ensureCellVisible({rowIndex:r,column:n,rowPinned:a}),t&&this.rowRenderer.getRowByPosition(i)?.isFullWidth()&&this.navigation?.tryToFocusFullWidthRow(i,t)||(this.setFocusedCell({rowIndex:r,column:n,rowPinned:Nt(a),forceBrowserFocus:!0}),Ue(n)||this.beans.rangeSvc?.setRangeToCell({rowIndex:r,rowPinned:a,column:n})),!0}return!!(o&&this.focusOverlay(t)||t&&this.focusLastHeader())}focusAdvancedFilter(e){return this.advFilterFocusColumn=e?.column,this.beans.advancedFilter?.getCtrl().focusHeaderComp()??!1}focusNextFromAdvancedFilter(e,t){const o=(t?void 0:this.advFilterFocusColumn)??this.visibleCols.allCols?.[0];return e?this.focusHeaderPosition({headerPosition:{column:o,headerRowIndex:lt(this.beans)-1}}):this.focusGridView({column:o})}clearAdvancedFilterColumn(){this.advFilterFocusColumn=void 0}},Qy=class extends x{constructor(){super(...arguments),this.beanName="scrollVisibleSvc"}wireBeans(e){this.ctrlsSvc=e.ctrlsSvc,this.colAnimation=e.colAnimation}postConstruct(){const{gos:e}=this;this.horizontalScrollShowing=e.get("alwaysShowHorizontalScroll")===!0,this.verticalScrollShowing=e.get("alwaysShowVerticalScroll")===!0,this.getScrollbarWidth();const t=this.updateScrollVisible.bind(this);this.addManagedEventListeners({displayedColumnsChanged:t,displayedColumnsWidthChanged:t,newColumnsLoaded:t})}updateScrollVisible(){const{colAnimation:e}=this;e?.isActive()?e.executeLaterVMTurn(()=>{e.executeLaterVMTurn(()=>this.updateScrollVisibleImpl())}):this.updateScrollVisibleImpl()}updateScrollVisibleImpl(){const e=this.ctrlsSvc.get("center");if(!e||this.colAnimation?.isActive())return;const t={horizontalScrollShowing:e.isHorizontalScrollShowing(),verticalScrollShowing:this.verticalScrollShowing};this.setScrollsVisible(t),this.updateScrollGap()}updateScrollGap(){const e=this.ctrlsSvc.get("center"),t=e.hasHorizontalScrollGap(),o=e.hasVerticalScrollGap();(this.horizontalScrollGap!==t||this.verticalScrollGap!==o)&&(this.horizontalScrollGap=t,this.verticalScrollGap=o,this.eventSvc.dispatchEvent({type:"scrollGapChanged"}))}setScrollsVisible(e){(this.horizontalScrollShowing!==e.horizontalScrollShowing||this.verticalScrollShowing!==e.verticalScrollShowing)&&(this.horizontalScrollShowing=e.horizontalScrollShowing,this.verticalScrollShowing=e.verticalScrollShowing,this.eventSvc.dispatchEvent({type:"scrollVisibilityChanged"}))}getScrollbarWidth(){if(this.scrollbarWidth==null){const e=this.gos.get("scrollbarWidth"),o=typeof e=="number"&&e>=0?e:ka();o!=null&&(this.scrollbarWidth=o,this.eventSvc.dispatchEvent({type:"scrollbarWidthChanged"}))}return this.scrollbarWidth}},Zy=class extends x{constructor(){super(...arguments),this.beanName="gridDestroySvc",this.destroyCalled=!1}destroy(){if(this.destroyCalled)return;const{stateSvc:e,ctrlsSvc:t,context:o}=this.beans;this.eventSvc.dispatchEvent({type:"gridPreDestroyed",state:e?.getState()??{}}),this.destroyCalled=!0,t.get("gridCtrl")?.destroyGridUi(),o.destroy(),super.destroy()}},Jy=["columnEverythingChanged","newColumnsLoaded","columnPivotModeChanged","pivotMaxColumnsExceeded","columnRowGroupChanged","expandOrCollapseAll","columnPivotChanged","gridColumnsChanged","columnValueChanged","columnMoved","columnVisible","columnPinned","columnGroupOpened","columnResized","displayedColumnsChanged","virtualColumnsChanged","columnHeaderMouseOver","columnHeaderMouseLeave","columnHeaderClicked","columnHeaderContextMenu","asyncTransactionsFlushed","rowGroupOpened","rowDataUpdated","pinnedRowDataChanged","pinnedRowsChanged","rangeSelectionChanged","cellSelectionChanged","chartCreated","chartRangeSelectionChanged","chartOptionsChanged","chartDestroyed","toolPanelVisibleChanged","toolPanelSizeChanged","modelUpdated","cutStart","cutEnd","pasteStart","pasteEnd","fillStart","fillEnd","cellSelectionDeleteStart","cellSelectionDeleteEnd","rangeDeleteStart","rangeDeleteEnd","undoStarted","undoEnded","redoStarted","redoEnded","cellClicked","cellDoubleClicked","cellMouseDown","cellContextMenu","cellValueChanged","cellEditRequest","rowValueChanged","headerFocused","cellFocused","rowSelected","selectionChanged","tooltipShow","tooltipHide","cellKeyDown","cellMouseOver","cellMouseOut","filterChanged","filterModified","filterUiChanged","filterOpened","floatingFilterUiChanged","advancedFilterBuilderVisibleChanged","sortChanged","virtualRowRemoved","rowClicked","rowDoubleClicked","gridReady","gridPreDestroyed","gridSizeChanged","viewportChanged","firstDataRendered","dragStarted","dragStopped","dragCancelled","rowEditingStarted","rowEditingStopped","cellEditingStarted","cellEditingStopped","bodyScroll","bodyScrollEnd","paginationChanged","componentStateChanged","storeRefreshed","stateUpdated","columnMenuVisibleChanged","contextMenuVisibleChanged","rowDragEnter","rowDragMove","rowDragLeave","rowDragEnd","rowDragCancel","findChanged","rowResizeStarted","rowResizeEnded","columnsReset","bulkEditingStarted","bulkEditingStopped","batchEditingStarted","batchEditingStopped"],Vi=new Set(["gridPreDestroyed","fillStart","pasteStart"]),Xa=Jy.reduce((e,t)=>(e[t]=_f(t),e),{}),fs={agSetColumnFilter:"SetFilter",agSetColumnFloatingFilter:"SetFilter",agMultiColumnFilter:"MultiFilter",agMultiColumnFloatingFilter:"MultiFilter",agGroupColumnFilter:"GroupFilter",agGroupColumnFloatingFilter:"GroupFilter",agGroupCellRenderer:"GroupCellRenderer",agGroupRowRenderer:"GroupCellRenderer",agRichSelect:"RichSelect",agRichSelectCellEditor:"RichSelect",agDetailCellRenderer:"SharedMasterDetail",agSparklineCellRenderer:"Sparklines",agDragAndDropImage:"SharedDragAndDrop",agColumnHeader:"ColumnHeaderComp",agColumnGroupHeader:"ColumnGroupHeaderComp",agSortIndicator:"Sort",agAnimateShowChangeCellRenderer:"HighlightChanges",agAnimateSlideCellRenderer:"HighlightChanges",agLoadingCellRenderer:"LoadingCellRenderer",agSkeletonCellRenderer:"SkeletonCellRenderer",agCheckboxCellRenderer:"CheckboxCellRenderer",agLoadingOverlay:"Overlay",agExportingOverlay:"Overlay",agNoRowsOverlay:"Overlay",agNoMatchingRowsOverlay:"Overlay",agTooltipComponent:"Tooltip",agReadOnlyFloatingFilter:"CustomFilter",agTextColumnFilter:"TextFilter",agNumberColumnFilter:"NumberFilter",agBigIntColumnFilter:"BigIntFilter",agDateColumnFilter:"DateFilter",agDateInput:"DateFilter",agTextColumnFloatingFilter:"TextFilter",agNumberColumnFloatingFilter:"NumberFilter",agBigIntColumnFloatingFilter:"BigIntFilter",agDateColumnFloatingFilter:"DateFilter",agFormulaCellEditor:"Formula",agCellEditor:"TextEditor",agSelectCellEditor:"SelectEditor",agTextCellEditor:"TextEditor",agNumberCellEditor:"NumberEditor",agDateCellEditor:"DateEditor",agDateStringCellEditor:"DateEditor",agCheckboxCellEditor:"CheckboxEditor",agLargeTextCellEditor:"LargeTextEditor",agMenuItem:"MenuItem",agColumnsToolPanel:"ColumnsToolPanel",agFiltersToolPanel:"FiltersToolPanel",agNewFiltersToolPanel:"NewFiltersToolPanel",agAggregationComponent:"StatusBar",agSelectedRowCountComponent:"StatusBar",agTotalRowCountComponent:"StatusBar",agFilteredRowCountComponent:"StatusBar",agTotalAndFilteredRowCountComponent:"StatusBar",agFindCellRenderer:"Find"};function Ec(e){return`"${e}"`}var Xy=()=>({checkboxSelection:{version:"32.2",message:"Use `rowSelection.checkboxes` in `GridOptions` instead."},headerCheckboxSelection:{version:"32.2",message:"Use `rowSelection.headerCheckbox = true` in `GridOptions` instead."},headerCheckboxSelectionFilteredOnly:{version:"32.2",message:'Use `rowSelection.selectAll = "filtered"` in `GridOptions` instead.'},headerCheckboxSelectionCurrentPageOnly:{version:"32.2",message:'Use `rowSelection.selectAll = "currentPage"` in `GridOptions` instead.'},showDisabledCheckboxes:{version:"32.2",message:"Use `rowSelection.hideDisabledCheckboxes = true` in `GridOptions` instead."},rowGroupingHierarchy:{version:"34.3",message:"Use `colDef.groupHierarchy` instead."}}),e0={allowFormula:"Formula",aggFunc:"SharedAggregation",autoHeight:"RowAutoHeight",cellClass:"CellStyle",cellClassRules:"CellStyle",cellEditor:({cellEditor:e,editable:t,groupRowEditable:o})=>!!t||!!o?typeof e=="string"?fs[e]??"CustomEditor":"CustomEditor":null,cellRenderer:({cellRenderer:e})=>typeof e!="string"?null:fs[e],cellStyle:"CellStyle",columnChooserParams:"ColumnMenu",contextMenuItems:"ContextMenu",dndSource:"DragAndDrop",dndSourceOnRowDrag:"DragAndDrop",editable:({editable:e,cellEditor:t})=>e&&!t?"TextEditor":null,groupRowEditable:({groupRowEditable:e,cellEditor:t})=>e?t?"RowGroupingEdit":["RowGroupingEdit","TextEditor"]:null,groupRowValueSetter:({groupRowValueSetter:e})=>e?"RowGroupingEdit":null,enableCellChangeFlash:"HighlightChanges",enablePivot:"SharedPivot",enableRowGroup:"SharedRowGrouping",enableValue:"SharedAggregation",filter:({filter:e})=>e&&typeof e!="string"&&typeof e!="boolean"?"CustomFilter":typeof e=="string"?fs[e]??"ColumnFilter":"ColumnFilter",floatingFilter:"ColumnFilter",getQuickFilterText:"QuickFilter",headerTooltip:"Tooltip",headerTooltipValueGetter:"Tooltip",mainMenuItems:"ColumnMenu",menuTabs:e=>{const t=["columnsMenuTab","generalMenuTab"];return e.menuTabs?.some(o=>t.includes(o))?"ColumnMenu":null},pivot:"SharedPivot",pivotIndex:"SharedPivot",rowDrag:"RowDrag",rowGroup:"SharedRowGrouping",rowGroupIndex:"SharedRowGrouping",tooltipField:"Tooltip",tooltipValueGetter:"Tooltip",tooltipComponentSelector:"Tooltip",spanRows:"CellSpan",groupHierarchy:"SharedRowGrouping"},t0=()=>({autoHeight:{supportedRowModels:["clientSide","serverSide"],validate:(t,{paginationAutoPageSize:o})=>o?"colDef.autoHeight is not supported with paginationAutoPageSize.":null},allowFormula:{supportedRowModels:["clientSide"]},cellRendererParams:{validate:t=>(t.rowGroup!=null||t.rowGroupIndex!=null||t.cellRenderer==="agGroupCellRenderer")&&"checkbox"in t.cellRendererParams?'Since v33.0, `cellRendererParams.checkbox` has been deprecated. Use `rowSelection.checkboxLocation = "autoGroupColumn"` instead.':null},flex:{validate:(t,o)=>o.autoSizeStrategy?"colDef.flex is not supported with gridOptions.autoSizeStrategy":null},headerCheckboxSelection:{supportedRowModels:["clientSide","serverSide"],validate:(t,{rowSelection:o})=>o==="multiple"?null:"headerCheckboxSelection is only supported with rowSelection=multiple"},headerCheckboxSelectionCurrentPageOnly:{supportedRowModels:["clientSide"],validate:(t,{rowSelection:o})=>o==="multiple"?null:"headerCheckboxSelectionCurrentPageOnly is only supported with rowSelection=multiple"},headerCheckboxSelectionFilteredOnly:{supportedRowModels:["clientSide"],validate:(t,{rowSelection:o})=>o==="multiple"?null:"headerCheckboxSelectionFilteredOnly is only supported with rowSelection=multiple"},headerValueGetter:{validate:t=>{const o=t.headerValueGetter;return typeof o=="function"||typeof o=="string"?null:"headerValueGetter must be a function or a valid string expression"}},icons:{validate:({icons:t})=>{if(t){if(t.smallDown)return It(262);if(t.smallLeft)return It(263);if(t.smallRight)return It(264)}return null}},sort:{validate:t=>hs(t.sort)||io(t.sort)?null:`sort must be of type (SortDirection | SortDef), currently it is ${typeof t.sort=="object"?JSON.stringify(t.sort):Ti(t.sort)}`},initialSort:{validate:t=>hs(t.initialSort)||io(t.initialSort)?null:`initialSort must be of non-null type (SortDirection | SortDef), currently it is ${typeof t.initialSort=="object"?JSON.stringify(t.initialSort):Ti(t.initialSort)}`},sortingOrder:{validate:t=>{const o=t.sortingOrder;if(Array.isArray(o)&&o.length>0){const s=o.filter(i=>!(hs(i)||io(i)));if(s.length>0)return`sortingOrder must be an array of type non-null (SortDirection | SortDef)[], incorrect items are: [${s.map(i=>typeof i=="string"||i==null?Ti(i):JSON.stringify(i)).join(", ")}]`}else if(!Array.isArray(o)||!o.length)return`sortingOrder must be an array with at least one element, currently it is [${o}]`;return null}},type:{validate:t=>{const o=t.type;return o instanceof Array?o.some(i=>typeof i!="string")?"if colDef.type is supplied an array it should be of type 'string[]'":null:typeof o=="string"?null:"colDef.type should be of type 'string' | 'string[]'"}},rowSpan:{validate:(t,{suppressRowTransform:o})=>o?null:"colDef.rowSpan requires suppressRowTransform to be enabled."},spanRows:{dependencies:{editable:{required:[!1,void 0]},groupRowEditable:{required:[!1,void 0]},rowDrag:{required:[!1,void 0]},colSpan:{required:[void 0]},rowSpan:{required:[void 0]}},validate:(t,{rowSelection:o,cellSelection:s,suppressRowTransform:i,enableCellSpan:n,rowDragEntireRow:r,enableCellTextSelection:a})=>typeof o=="object"&&o?.mode==="singleRow"&&o?.enableClickSelection?"colDef.spanRows is not supported with rowSelection.clickSelection":s?"colDef.spanRows is not supported with cellSelection.":i?"colDef.spanRows is not supported with suppressRowTransform.":n?r?"colDef.spanRows is not supported with rowDragEntireRow.":a?"colDef.spanRows is not supported with enableCellTextSelection.":null:"colDef.spanRows requires enableCellSpan to be enabled."},groupHierarchy:{validate(t,{groupHierarchyConfig:o={}},s){const i=new Set(["year","quarter","month","formattedMonth","day","hour","minute","second"]),n=[];for(const r of t.groupHierarchy??[]){if(typeof r=="object"){s.validation?.validateColDef(r);continue}!i.has(r)&&!(r in o)&&n.push(Ec(r))}if(n.length>0){const r=`The following parts of colDef.groupHierarchy are not recognised: ${n.join(", ")}.`,a=`Choose one of ${[...i].map(Ec).join(", ")}, or define your own parts in gridOptions.groupHierarchyConfig.`;return`${r}
|
|
19
|
+
${a}`}return null}}}),o0={headerName:void 0,columnGroupShow:void 0,headerStyle:void 0,headerClass:void 0,toolPanelClass:void 0,headerValueGetter:void 0,pivotKeys:void 0,groupId:void 0,colId:void 0,sort:void 0,initialSort:void 0,field:void 0,type:void 0,cellDataType:void 0,tooltipComponent:void 0,tooltipField:void 0,headerTooltip:void 0,headerTooltipValueGetter:void 0,cellClass:void 0,showRowGroup:void 0,filter:void 0,initialAggFunc:void 0,defaultAggFunc:void 0,aggFunc:void 0,groupRowEditable:void 0,groupRowValueSetter:void 0,pinned:void 0,initialPinned:void 0,chartDataType:void 0,cellAriaRole:void 0,cellEditorPopupPosition:void 0,headerGroupComponent:void 0,headerGroupComponentParams:void 0,cellStyle:void 0,cellRenderer:void 0,cellRendererParams:void 0,cellEditor:void 0,cellEditorParams:void 0,filterParams:void 0,pivotValueColumn:void 0,headerComponent:void 0,headerComponentParams:void 0,floatingFilterComponent:void 0,floatingFilterComponentParams:void 0,tooltipComponentParams:void 0,refData:void 0,columnChooserParams:void 0,children:void 0,sortingOrder:void 0,allowedAggFuncs:void 0,menuTabs:void 0,pivotTotalColumnIds:void 0,cellClassRules:void 0,icons:void 0,sortIndex:void 0,initialSortIndex:void 0,flex:void 0,initialFlex:void 0,width:void 0,initialWidth:void 0,minWidth:void 0,maxWidth:void 0,rowGroupIndex:void 0,initialRowGroupIndex:void 0,pivotIndex:void 0,initialPivotIndex:void 0,suppressColumnsToolPanel:void 0,suppressFiltersToolPanel:void 0,openByDefault:void 0,marryChildren:void 0,suppressStickyLabel:void 0,hide:void 0,initialHide:void 0,rowGroup:void 0,initialRowGroup:void 0,pivot:void 0,initialPivot:void 0,checkboxSelection:void 0,showDisabledCheckboxes:void 0,headerCheckboxSelection:void 0,headerCheckboxSelectionFilteredOnly:void 0,headerCheckboxSelectionCurrentPageOnly:void 0,suppressHeaderMenuButton:void 0,suppressMovable:void 0,lockPosition:void 0,lockVisible:void 0,lockPinned:void 0,unSortIcon:void 0,suppressSizeToFit:void 0,suppressAutoSize:void 0,enableRowGroup:void 0,enablePivot:void 0,enableValue:void 0,editable:void 0,suppressPaste:void 0,suppressNavigable:void 0,enableCellChangeFlash:void 0,rowDrag:void 0,dndSource:void 0,autoHeight:void 0,wrapText:void 0,sortable:void 0,resizable:void 0,singleClickEdit:void 0,floatingFilter:void 0,cellEditorPopup:void 0,suppressFillHandle:void 0,wrapHeaderText:void 0,autoHeaderHeight:void 0,dndSourceOnRowDrag:void 0,valueGetter:void 0,valueSetter:void 0,filterValueGetter:void 0,keyCreator:void 0,valueFormatter:void 0,valueParser:void 0,comparator:void 0,equals:void 0,pivotComparator:void 0,suppressKeyboardEvent:void 0,suppressHeaderKeyboardEvent:void 0,colSpan:void 0,rowSpan:void 0,spanRows:void 0,getQuickFilterText:void 0,onCellValueChanged:void 0,onCellClicked:void 0,onCellDoubleClicked:void 0,onCellContextMenu:void 0,rowDragText:void 0,tooltipValueGetter:void 0,tooltipComponentSelector:void 0,cellRendererSelector:void 0,cellEditorSelector:void 0,suppressSpanHeaderHeight:void 0,useValueFormatterForExport:void 0,useValueParserForImport:void 0,mainMenuItems:void 0,contextMenuItems:void 0,suppressFloatingFilterButton:void 0,suppressHeaderFilterButton:void 0,suppressHeaderContextMenu:void 0,loadingCellRenderer:void 0,loadingCellRendererParams:void 0,loadingCellRendererSelector:void 0,context:void 0,dateComponent:void 0,dateComponentParams:void 0,getFindText:void 0,rowGroupingHierarchy:void 0,groupHierarchy:void 0,allowFormula:void 0},s0=()=>Object.keys(o0),i0=()=>({objectName:"colDef",allProperties:s0(),docsUrl:"column-properties/",deprecations:Xy(),validations:t0()}),n0=["overlayLoadingTemplate","overlayNoRowsTemplate","gridId","quickFilterText","rowModelType","editType","domLayout","clipboardDelimiter","rowGroupPanelShow","multiSortKey","pivotColumnGroupTotals","pivotRowTotals","pivotPanelShow","fillHandleDirection","groupDisplayType","treeDataDisplayType","treeDataChildrenField","treeDataParentIdField","colResizeDefault","tooltipTrigger","serverSidePivotResultFieldSeparator","columnMenu","tooltipShowMode","invalidEditValueMode","grandTotalRow","themeCssLayer","findSearchValue","styleNonce","renderingMode"],r0=["components","rowStyle","context","autoGroupColumnDef","localeText","icons","datasource","dragAndDropImageComponentParams","serverSideDatasource","viewportDatasource","groupRowRendererParams","aggFuncs","fullWidthCellRendererParams","defaultColGroupDef","defaultColDef","defaultCsvExportParams","defaultExcelExportParams","columnTypes","rowClassRules","detailCellRendererParams","loadingCellRendererParams","overlayComponentParams","loadingOverlayComponentParams","noRowsOverlayComponentParams","activeOverlayParams","popupParent","themeStyleContainer","statusBar","chartThemeOverrides","customChartThemes","chartToolPanelsDef","dataTypeDefinitions","advancedFilterParent","advancedFilterBuilderParams","advancedFilterParams","formulaDataSource","formulaFuncs","initialState","autoSizeStrategy","selectionColumnDef","findOptions","filterHandlers","groupHierarchyConfig"],a0=["sortingOrder","alignedGrids","rowData","columnDefs","excelStyles","pinnedTopRowData","pinnedBottomRowData","chartThemes","rowClass","paginationPageSizeSelector","suppressOverlays"],Bh=["rowHeight","detailRowHeight","rowBuffer","headerHeight","groupHeaderHeight","groupLockGroupColumns","floatingFiltersHeight","pivotHeaderHeight","pivotGroupHeaderHeight","groupDefaultExpanded","pivotDefaultExpanded","viewportRowModelPageSize","viewportRowModelBufferSize","autoSizePadding","maxBlocksInCache","maxConcurrentDatasourceRequests","tooltipShowDelay","tooltipSwitchShowDelay","tooltipHideDelay","cacheOverflowSize","paginationPageSize","cacheBlockSize","infiniteInitialRowCount","serverSideInitialRowCount","scrollbarWidth","asyncTransactionWaitMillis","blockLoadDebounceMillis","keepDetailRowsCount","undoRedoCellEditingLimit","cellFlashDuration","cellFadeDuration","tabIndex","pivotMaxGeneratedColumns","rowDragInsertDelay"],l0=["theme","rowSelection"],c0=["cellSelection","sideBar","rowNumbers","suppressGroupChangesColumnVisibility","groupAggFiltering","suppressStickyTotalRow","groupHideParentOfSingleChild","enableRowPinning"],Vh=["loadThemeGoogleFonts","suppressMakeColumnVisibleAfterUnGroup","suppressRowClickSelection","suppressCellFocus","suppressHeaderFocus","suppressHorizontalScroll","groupSelectsChildren","alwaysShowHorizontalScroll","alwaysShowVerticalScroll","debug","enableBrowserTooltips","enableCellExpressions","groupSuppressBlankHeader","suppressMenuHide","suppressRowDeselection","unSortIcon","suppressMultiSort","alwaysMultiSort","singleClickEdit","suppressLoadingOverlay","suppressNoRowsOverlay","suppressAutoSize","skipHeaderOnAutoSize","suppressColumnMoveAnimation","suppressMoveWhenColumnDragging","suppressMovableColumns","suppressFieldDotNotation","enableRangeSelection","enableRangeHandle","enableFillHandle","suppressClearOnFillReduction","deltaSort","suppressTouch","allowContextMenuWithControlKey","suppressContextMenu","suppressDragLeaveHidesColumns","suppressRowGroupHidesColumns","suppressMiddleClickScrolls","suppressPreventDefaultOnMouseWheel","suppressCopyRowsToClipboard","copyHeadersToClipboard","copyGroupHeadersToClipboard","pivotMode","suppressAggFuncInHeader","suppressColumnVirtualisation","alwaysAggregateAtRootLevel","suppressFocusAfterRefresh","functionsReadOnly","animateRows","groupSelectsFiltered","groupRemoveSingleChildren","groupRemoveLowestSingleChildren","enableRtl","enableCellSpan","suppressClickEdit","rowDragEntireRow","rowDragManaged","refreshAfterGroupEdit","suppressRowDrag","suppressMoveWhenRowDragging","rowDragMultiRow","enableGroupEdit","embedFullWidthRows","suppressPaginationPanel","groupHideOpenParents","groupHideColumnsUntilExpanded","groupAllowUnbalanced","pagination","paginationAutoPageSize","suppressScrollOnNewData","suppressScrollWhenPopupsAreOpen","purgeClosedRowNodes","cacheQuickFilter","includeHiddenColumnsInQuickFilter","ensureDomOrder","accentedSort","suppressChangeDetection","valueCache","valueCacheNeverExpires","aggregateOnlyChangedColumns","suppressAnimationFrame","suppressExcelExport","suppressCsvExport","includeHiddenColumnsInAdvancedFilter","suppressMultiRangeSelection","enterNavigatesVerticallyAfterEdit","enterNavigatesVertically","suppressPropertyNamesCheck","rowMultiSelectWithClick","suppressRowHoverHighlight","suppressRowTransform","suppressClipboardPaste","suppressLastEmptyLineOnPaste","enableCharts","suppressMaintainUnsortedOrder","enableCellTextSelection","suppressBrowserResizeObserver","suppressMaxRenderedRowRestriction","excludeChildrenWhenTreeDataFiltering","tooltipMouseTrack","tooltipInteraction","keepDetailRows","paginateChildRows","preventDefaultOnContextMenu","undoRedoCellEditing","allowDragFromColumnsToolPanel","pivotSuppressAutoColumn","suppressExpandablePivotGroups","debounceVerticalScrollbar","detailRowAutoHeight","serverSideSortAllLevels","serverSideEnableClientSideSort","serverSideOnlyRefreshFilteredGroups","suppressAggFilteredOnly","showOpenedGroup","suppressClipboardApi","suppressModelUpdateAfterUpdateTransaction","stopEditingWhenCellsLoseFocus","groupMaintainOrder","columnHoverHighlight","readOnlyEdit","suppressRowVirtualisation","enableCellEditingOnBackspace","resetRowDataOnUpdate","removePivotHeaderRowWhenSingleValueColumn","suppressCopySingleCellRanges","suppressGroupRowsSticky","suppressCutToClipboard","rowGroupPanelSuppressSort","allowShowChangeAfterFilter","enableAdvancedFilter","masterDetail","treeData","reactiveCustomComponents","applyQuickFilterBeforePivotOrAgg","suppressServerSideFullWidthLoadingRow","suppressAdvancedFilterEval","loading","maintainColumnOrder","enableStrictPivotColumnOrder","suppressSetFilterByDefault","enableFilterHandlers","suppressStartEditOnTab","hidePaddedHeaderRows","ssrmExpandAllAffectsAllRows","animateColumnResizing"],d0=["doesExternalFilterPass","processPivotResultColDef","processPivotResultColGroupDef","getBusinessKeyForNode","isRowSelectable","rowDragText","groupRowRenderer","dragAndDropImageComponent","fullWidthCellRenderer","loadingCellRenderer","overlayComponent","loadingOverlayComponent","noRowsOverlayComponent","overlayComponentSelector","activeOverlay","detailCellRenderer","quickFilterParser","quickFilterMatcher","getLocaleText","isExternalFilterPresent","getRowHeight","getRowClass","getRowStyle","getFullRowEditValidationErrors","getContextMenuItems","getMainMenuItems","processRowPostCreate","processCellForClipboard","getGroupRowAgg","isFullWidthRow","sendToClipboard","focusGridInnerElement","navigateToNextHeader","tabToNextHeader","navigateToNextCell","tabToNextCell","tabToNextGridContainer","processCellFromClipboard","getDocument","postProcessPopup","getChildCount","getDataPath","isRowMaster","postSortRows","processHeaderForClipboard","processUnpinnedColumns","processGroupHeaderForClipboard","paginationNumberFormatter","processDataFromClipboard","getServerSideGroupKey","isServerSideGroup","createChartContainer","getChartToolbarItems","fillOperation","isApplyServerSideTransaction","getServerSideGroupLevelParams","isServerSideGroupOpenByDefault","isGroupOpenByDefault","initialGroupOrderComparator","loadingCellRendererSelector","getRowId","chartMenuItems","groupTotalRow","alwaysPassFilter","isRowPinnable","isRowPinned","isRowValidDropPosition"],u0=()=>[...a0,...r0,...n0,...Bh,...d0,...Vh,...c0,...l0],h0=()=>({suppressLoadingOverlay:{version:"32",message:"Use `loading`=false instead."},enableFillHandle:{version:"32.2",message:"Use `cellSelection.handle` instead."},enableRangeHandle:{version:"32.2",message:"Use `cellSelection.handle` instead."},enableRangeSelection:{version:"32.2",message:"Use `cellSelection = true` instead."},suppressMultiRangeSelection:{version:"32.2",message:"Use `cellSelection.suppressMultiRanges` instead."},suppressClearOnFillReduction:{version:"32.2",message:"Use `cellSelection.handle.suppressClearOnFillReduction` instead."},fillHandleDirection:{version:"32.2",message:"Use `cellSelection.handle.direction` instead."},fillOperation:{version:"32.2",message:"Use `cellSelection.handle.setFillValue` instead."},suppressRowClickSelection:{version:"32.2",message:"Use `rowSelection.enableClickSelection` instead."},suppressRowDeselection:{version:"32.2",message:"Use `rowSelection.enableClickSelection` instead."},rowMultiSelectWithClick:{version:"32.2",message:"Use `rowSelection.enableSelectionWithoutKeys` instead."},groupSelectsChildren:{version:"32.2",message:'Use `rowSelection.groupSelects = "descendants"` instead.'},groupSelectsFiltered:{version:"32.2",message:'Use `rowSelection.groupSelects = "filteredDescendants"` instead.'},isRowSelectable:{version:"32.2",message:"Use `selectionOptions.isRowSelectable` instead."},suppressCopySingleCellRanges:{version:"32.2",message:"Use `rowSelection.copySelectedRows` instead."},suppressCopyRowsToClipboard:{version:"32.2",message:"Use `rowSelection.copySelectedRows` instead."},onRangeSelectionChanged:{version:"32.2",message:"Use `onCellSelectionChanged` instead."},onRangeDeleteStart:{version:"32.2",message:"Use `onCellSelectionDeleteStart` instead."},onRangeDeleteEnd:{version:"32.2",message:"Use `onCellSelectionDeleteEnd` instead."},suppressBrowserResizeObserver:{version:"32.2",message:"The grid always uses the browser's ResizeObserver, this grid option has no effect."},onColumnEverythingChanged:{version:"32.2",message:"Either use `onDisplayedColumnsChanged` which is fired at the same time, or use one of the more specific column events."},groupRemoveSingleChildren:{version:"33",message:"Use `groupHideParentOfSingleChild` instead."},groupRemoveLowestSingleChildren:{version:"33",message:'Use `groupHideParentOfSingleChild: "leafGroupsOnly"` instead.'},suppressRowGroupHidesColumns:{version:"33",message:'Use `suppressGroupChangesColumnVisibility: "suppressHideOnGroup"` instead.'},suppressMakeColumnVisibleAfterUnGroup:{version:"33",message:'Use `suppressGroupChangesColumnVisibility: "suppressShowOnUngroup"` instead.'},unSortIcon:{version:"33",message:"Use `defaultColDef.unSortIcon` instead."},sortingOrder:{version:"33",message:"Use `defaultColDef.sortingOrder` instead."},suppressPropertyNamesCheck:{version:"33",message:"`gridOptions` and `columnDefs` both have a `context` property that should be used for arbitrary user data. This means that column definitions and gridOptions should only contain valid properties making this property redundant."},suppressAdvancedFilterEval:{version:"34",message:"Advanced filter no longer uses function evaluation, so this option has no effect."}});function Ft(e,t,o){return typeof t=="number"||t==null?t==null||t>=o?null:`${e}: value should be greater than or equal to ${o}`:`${e}: value should be a number`}var g0={alignedGrids:"AlignedGrids",allowContextMenuWithControlKey:"ContextMenu",autoSizeStrategy:"ColumnAutoSize",cellSelection:"CellSelection",columnHoverHighlight:"ColumnHover",datasource:"InfiniteRowModel",doesExternalFilterPass:"ExternalFilter",editType:"EditCore",invalidEditValueMode:"EditCore",enableAdvancedFilter:"AdvancedFilter",enableCellSpan:"CellSpan",enableCharts:"IntegratedCharts",enableRangeSelection:"CellSelection",enableRowPinning:"PinnedRow",findSearchValue:"Find",getFullRowEditValidationErrors:"EditCore",getContextMenuItems:"ContextMenu",getLocaleText:"Locale",getMainMenuItems:"ColumnMenu",getRowClass:"RowStyle",getRowStyle:"RowStyle",groupTotalRow:"SharedRowGrouping",grandTotalRow:"ClientSideRowModelHierarchy",initialState:"GridState",isExternalFilterPresent:"ExternalFilter",isRowPinnable:"PinnedRow",isRowPinned:"PinnedRow",localeText:"Locale",masterDetail:"SharedMasterDetail",pagination:"Pagination",pinnedBottomRowData:"PinnedRow",pinnedTopRowData:"PinnedRow",pivotMode:"SharedPivot",pivotPanelShow:"RowGroupingPanel",quickFilterText:"QuickFilter",rowClass:"RowStyle",rowClassRules:"RowStyle",rowData:"ClientSideRowModel",rowDragManaged:"RowDrag",refreshAfterGroupEdit:["RowGrouping","TreeData"],rowGroupPanelShow:"RowGroupingPanel",rowNumbers:"RowNumbers",rowSelection:"SharedRowSelection",rowStyle:"RowStyle",serverSideDatasource:"ServerSideRowModel",sideBar:"SideBar",statusBar:"StatusBar",treeData:"SharedTreeData",undoRedoCellEditing:"UndoRedoEdit",valueCache:"ValueCache",viewportDatasource:"ViewportRowModel"},p0=()=>{const e={autoSizePadding:{validate({autoSizePadding:o}){return Ft("autoSizePadding",o,0)}},cacheBlockSize:{supportedRowModels:["serverSide","infinite"],validate({cacheBlockSize:o}){return Ft("cacheBlockSize",o,1)}},cacheOverflowSize:{validate({cacheOverflowSize:o}){return Ft("cacheOverflowSize",o,1)}},datasource:{supportedRowModels:["infinite"]},domLayout:{validate:o=>{const s=o.domLayout,i=["autoHeight","normal","print"];return s&&!i.includes(s)?`domLayout must be one of [${i.join()}], currently it's ${s}`:null}},enableFillHandle:{dependencies:{enableRangeSelection:{required:[!0]}}},enableRangeHandle:{dependencies:{enableRangeSelection:{required:[!0]}}},enableCellSpan:{supportedRowModels:["clientSide","serverSide"]},enableRangeSelection:{dependencies:{rowDragEntireRow:{required:[!1,void 0]}}},enableRowPinning:{supportedRowModels:["clientSide"],validate({enableRowPinning:o,pinnedTopRowData:s,pinnedBottomRowData:i}){return o&&(s||i)?"Manual row pinning cannot be used together with pinned row data. Either set `enableRowPinning` to `false`, or remove `pinnedTopRowData` and `pinnedBottomRowData`.":null}},isRowPinnable:{supportedRowModels:["clientSide"],validate({enableRowPinning:o,isRowPinnable:s,pinnedTopRowData:i,pinnedBottomRowData:n}){return s&&(i||n)?"Manual row pinning cannot be used together with pinned row data. Either remove `isRowPinnable`, or remove `pinnedTopRowData` and `pinnedBottomRowData`.":!o&&s?"`isRowPinnable` requires `enableRowPinning` to be set.":null}},isRowPinned:{supportedRowModels:["clientSide"],validate({enableRowPinning:o,isRowPinned:s,pinnedTopRowData:i,pinnedBottomRowData:n}){return s&&(i||n)?"Manual row pinning cannot be used together with pinned row data. Either remove `isRowPinned`, or remove `pinnedTopRowData` and `pinnedBottomRowData`.":!o&&s?"`isRowPinned` requires `enableRowPinning` to be set.":null}},groupDefaultExpanded:{supportedRowModels:["clientSide"]},groupHideColumnsUntilExpanded:{supportedRowModels:["clientSide"],validate({groupHideColumnsUntilExpanded:o,groupHideOpenParents:s,groupDisplayType:i}){return o&&!s&&i!=="multipleColumns"?"`groupHideColumnsUntilExpanded = true` requires either `groupDisplayType = 'multipleColumns'` or `groupHideOpenParents = true`":null}},groupHideOpenParents:{supportedRowModels:["clientSide","serverSide"],dependencies:{groupTotalRow:{required:[void 0,"bottom"]},treeData:{required:[void 0,!1],reason:"Tree Data has values at the group level so it doesn't make sense to hide them."}}},groupHideParentOfSingleChild:{dependencies:{groupHideOpenParents:{required:[void 0,!1]}}},groupRemoveLowestSingleChildren:{dependencies:{groupHideOpenParents:{required:[void 0,!1]},groupRemoveSingleChildren:{required:[void 0,!1]}}},groupRemoveSingleChildren:{dependencies:{groupHideOpenParents:{required:[void 0,!1]},groupRemoveLowestSingleChildren:{required:[void 0,!1]}}},groupSelectsChildren:{dependencies:{rowSelection:{required:["multiple"]}}},groupHierarchyConfig:{validate({groupHierarchyConfig:o={}},s,i){for(const n of Object.keys(o))i.validation?.validateColDef(o[n]);return null}},icons:{validate:({icons:o})=>{if(o){if(o.smallDown)return It(262);if(o.smallLeft)return It(263);if(o.smallRight)return It(264)}return null}},infiniteInitialRowCount:{validate({infiniteInitialRowCount:o}){return Ft("infiniteInitialRowCount",o,1)}},initialGroupOrderComparator:{supportedRowModels:["clientSide"]},ssrmExpandAllAffectsAllRows:{validate:o=>{if(typeof o.ssrmExpandAllAffectsAllRows=="boolean"){if(o.rowModelType!=="serverSide")return"'ssrmExpandAllAffectsAllRows' is only supported with the Server Side Row Model.";if(o.ssrmExpandAllAffectsAllRows&&typeof o.getRowId!="function")return"'getRowId' callback must be provided for Server Side Row Model grouping to work correctly."}return null}},keepDetailRowsCount:{validate({keepDetailRowsCount:o}){return Ft("keepDetailRowsCount",o,1)}},paginationPageSize:{validate({paginationPageSize:o}){return Ft("paginationPageSize",o,1)}},paginationPageSizeSelector:{validate:o=>{const s=o.paginationPageSizeSelector;return typeof s=="boolean"||s==null||s.length?null:`'paginationPageSizeSelector' cannot be an empty array.
|
|
20
|
+
If you want to hide the page size selector, set paginationPageSizeSelector to false.`}},pivotMode:{dependencies:{treeData:{required:[!1,void 0],reason:"Pivot Mode is not supported with Tree Data."}}},quickFilterText:{supportedRowModels:["clientSide"]},rowBuffer:{validate({rowBuffer:o}){return Ft("rowBuffer",o,0)}},rowClass:{validate:o=>typeof o.rowClass=="function"?"rowClass should not be a function, please use getRowClass instead":null},rowData:{supportedRowModels:["clientSide"]},rowDragManaged:{supportedRowModels:["clientSide"],dependencies:{pagination:{required:[!1,void 0]}}},rowSelection:{validate({rowSelection:o}){return o&&typeof o=="string"?'As of version 32.2.1, using `rowSelection` with the values "single" or "multiple" has been deprecated. Use the object value instead.':o&&typeof o!="object"?"Expected `RowSelectionOptions` object for the `rowSelection` property.":o&&o.mode!=="multiRow"&&o.mode!=="singleRow"?`Selection mode "${o.mode}" is invalid. Use one of 'singleRow' or 'multiRow'.`:null}},rowStyle:{validate:o=>{const s=o.rowStyle;return s&&typeof s=="function"?"rowStyle should be an object of key/value styles, not be a function, use getRowStyle() instead":null}},serverSideDatasource:{supportedRowModels:["serverSide"]},serverSideInitialRowCount:{supportedRowModels:["serverSide"],validate({serverSideInitialRowCount:o}){return Ft("serverSideInitialRowCount",o,1)}},serverSideOnlyRefreshFilteredGroups:{supportedRowModels:["serverSide"]},serverSideSortAllLevels:{supportedRowModels:["serverSide"]},sortingOrder:{validate:o=>{const s=o.sortingOrder;if(Array.isArray(s)&&s.length>0){const i=s.filter(n=>!ct(n));if(i.length>0)return`sortingOrder must be an array of type (SortDirection | SortDef)[], incorrect items are: ${i.map(n=>typeof n=="string"||n==null?Ti(n):JSON.stringify(n))}]`}else if(!Array.isArray(s)||!s.length)return`sortingOrder must be an array with at least one element, currently it's ${s}`;return null}},tooltipHideDelay:{validate:o=>o.tooltipHideDelay&&o.tooltipHideDelay<0?"tooltipHideDelay should not be lower than 0":null},tooltipShowDelay:{validate:o=>o.tooltipShowDelay&&o.tooltipShowDelay<0?"tooltipShowDelay should not be lower than 0":null},tooltipSwitchShowDelay:{validate:o=>o.tooltipSwitchShowDelay&&o.tooltipSwitchShowDelay<0?"tooltipSwitchShowDelay should not be lower than 0":null},treeData:{supportedRowModels:["clientSide","serverSide"],validate:o=>{const s=o.rowModelType??"clientSide";switch(s){case"clientSide":{const{treeDataChildrenField:i,treeDataParentIdField:n,getDataPath:r,getRowId:a}=o;if(!i&&!n&&!r)return"treeData requires either 'treeDataChildrenField' or 'treeDataParentIdField' or 'getDataPath' in the clientSide row model.";if(i){if(r)return"Cannot use both 'treeDataChildrenField' and 'getDataPath' at the same time.";if(n)return"Cannot use both 'treeDataChildrenField' and 'treeDataParentIdField' at the same time."}if(n){if(!a)return"getRowId callback not provided, tree data with parent id cannot be built.";if(r)return"Cannot use both 'treeDataParentIdField' and 'getDataPath' at the same time."}return null}case"serverSide":{const i=`treeData requires 'isServerSideGroup' and 'getServerSideGroupKey' in the ${s} row model.`;return o.isServerSideGroup&&o.getServerSideGroupKey?null:i}}return null}},viewportDatasource:{supportedRowModels:["viewport"]},viewportRowModelBufferSize:{validate({viewportRowModelBufferSize:o}){return Ft("viewportRowModelBufferSize",o,0)}},viewportRowModelPageSize:{validate({viewportRowModelPageSize:o}){return Ft("viewportRowModelPageSize",o,1)}},rowDragEntireRow:{dependencies:{cellSelection:{required:[void 0]}}},autoGroupColumnDef:{validate({autoGroupColumnDef:o,showOpenedGroup:s}){return o?.field&&s?"autoGroupColumnDef.field and showOpenedGroup are not supported when used together.":o?.valueGetter&&s?"autoGroupColumnDef.valueGetter and showOpenedGroup are not supported when used together.":null}},renderingMode:{validate:o=>{const s=o.renderingMode,i=["default","legacy"];return s&&!i.includes(s)?`renderingMode must be one of [${i.join()}], currently it's ${s}`:null}},autoSizeStrategy:{validate:({autoSizeStrategy:o})=>{if(!o)return null;const s=["fitCellContents","fitGridWidth","fitProvidedWidth"],i=o.type;return i!=="fitCellContents"&&i!=="fitGridWidth"&&i!=="fitProvidedWidth"?`Invalid Auto-size strategy. \`autoSizeStrategy\` must be one of ${s.map(n=>'"'+n+'"').join(", ")}, currently it's ${i}`:i==="fitProvidedWidth"&&typeof o.width!="number"?`When using the 'fitProvidedWidth' auto-size strategy, must provide a numeric \`width\`. You provided ${o.width}`:null}}},t={};for(const o of Vh)t[o]={expectedType:"boolean"};for(const o of Bh)t[o]={expectedType:"number"};return _e(t,e),t},f0=()=>({objectName:"gridOptions",allProperties:[...u0(),...Object.values(Xa)],propertyExceptions:["api"],docsUrl:"grid-options/",deprecations:h0(),validations:p0()}),m0=0,C0=0,xc="__ag_grid_instance",v0=class extends x{constructor(){super(...arguments),this.beanName="gos",this.domDataKey="__AG_"+Math.random().toString(),this.instanceId=C0++,this.gridReadyFired=!1,this.queueEvents=[],this.propEventSvc=new Ao,this.globalEventHandlerFactory=e=>(t,o)=>{if(!this.isAlive())return;const s=Vi.has(t);if(s&&!e||!s&&e||!w0(t))return;const i=(n,r)=>{const a=Xa[n],l=this.gridOptions[a];typeof l=="function"&&this.beans.frameworkOverrides.wrapOutgoing(()=>l(r))};if(this.gridReadyFired)i(t,o);else if(t==="gridReady"){i(t,o),this.gridReadyFired=!0;for(const n of this.queueEvents)i(n.eventName,n.event);this.queueEvents=[]}else this.queueEvents.push({eventName:t,event:o})}}wireBeans(e){this.gridOptions=e.gridOptions,this.validation=e.validation,this.api=e.gridApi,this.gridId=e.context.getId()}get gridOptionsContext(){return this.gridOptions.context}postConstruct(){this.validateGridOptions(this.gridOptions),this.eventSvc.addGlobalListener(this.globalEventHandlerFactory().bind(this),!0),this.eventSvc.addGlobalListener(this.globalEventHandlerFactory(!0).bind(this),!1),this.propEventSvc.setFrameworkOverrides(this.beans.frameworkOverrides),this.addManagedEventListeners({gridOptionsChanged:({options:e})=>{this.updateGridOptions({options:e,force:!0,source:"optionsUpdated"})}})}destroy(){super.destroy(),this.queueEvents=[]}get(e){return this.gridOptions[e]??Wd[e]}getCallback(e){return this.mergeGridCommonParams(this.gridOptions[e])}exists(e){return L(this.gridOptions[e])}mergeGridCommonParams(e){return e&&(o=>e(this.addCommon(o)))}updateGridOptions({options:e,force:t,source:o="api"}){const s={id:m0++,properties:[]},i=[],{gridOptions:n,validation:r}=this;for(const a of Object.keys(e)){const l=Ea.applyGlobalGridOption(a,e[a]);r?.warnOnInitialPropertyUpdate(o,a);const c=t||typeof l=="object"&&o==="api",d=n[a];if(c||d!==l){n[a]=l;const u={type:a,currentValue:l,previousValue:d,changeSet:s,source:o};i.push(u)}}this.validateGridOptions(this.gridOptions),s.properties=i.map(a=>a.type);for(const a of i)Oo(this,`Updated property ${a.type} from`,a.previousValue," to ",a.currentValue),this.propEventSvc.dispatchEvent(a)}addPropertyEventListener(e,t){this.propEventSvc.addEventListener(e,t)}removePropertyEventListener(e,t){this.propEventSvc.removeEventListener(e,t)}getDomDataKey(){return this.domDataKey}addCommon(e){return e.api=this.api,e.context=this.gridOptionsContext,e}validateOptions(e,t){for(const o of Object.keys(e)){const s=e[o];if(s==null||s===!1)continue;let i=t[o];typeof i=="function"&&(i=i(e,this.gridOptions,this.beans)),i&&this.assertModuleRegistered(i,o)}}validateGridOptions(e){this.validateOptions(e,g0),this.validation?.processGridOptions(e)}validateColDef(e,t,o){(o||!this.beans.dataTypeSvc?.isColPendingInference(t))&&(this.validateOptions(e,e0),this.validation?.validateColDef(e))}assertModuleRegistered(e,t){const o=Array.isArray(e)?e.some(s=>this.isModuleRegistered(s)):this.isModuleRegistered(e);return o||ce(200,{...this.getModuleErrorParams(),moduleName:e,reasonOrId:t}),o}getModuleErrorParams(){return{gridId:this.gridId,gridScoped:xa(),rowModelType:this.get("rowModelType"),isUmd:qd()}}isModuleRegistered(e){return Pr(e,this.gridId,this.get("rowModelType"))}setInstanceDomData(e){e[xc]=this.instanceId}isElementInThisInstance(e){let t=e;for(;t;){const o=t[xc];if(L(o))return o===this.instanceId;t=t.parentElement}return!1}};function w0(e){return!!Xa[e]}var b0=class extends x{constructor(e,t){super(),this.column=e,this.eGui=t,this.lastMovingChanged=0}postConstruct(){this.addManagedElementListeners(this.eGui,{click:e=>e&&this.onClick(e)}),this.addManagedListeners(this.column,{movingChanged:()=>{this.lastMovingChanged=Date.now()}})}onClick(e){const{sortSvc:t,rangeSvc:o,gos:s}=this.beans;if(!(us(s)?e.altKey:!0))o?.handleColumnSelection(this.column,e);else if(this.column.isSortable()){const n=this.column.isMoving(),a=Date.now()-this.lastMovingChanged<50;n||a||t?.progressSortFromEvent(this.column,e)}}};function S0(e,t){const o={"aria-hidden":"true"};return{tag:"div",cls:"ag-cell-label-container",role:"presentation",children:[{tag:"span",ref:"eMenu",cls:"ag-header-icon ag-header-cell-menu-button",attrs:o},{tag:"span",ref:"eFilterButton",cls:"ag-header-icon ag-header-cell-filter-button",attrs:o},{tag:"div",ref:"eLabel",cls:"ag-header-cell-label",role:"presentation",children:[e?{tag:"span",ref:"eColRef",cls:"ag-header-col-ref"}:null,{tag:"span",ref:"eText",cls:"ag-header-cell-text"},{tag:"span",ref:"eFilter",cls:"ag-header-icon ag-header-label-icon ag-filter-icon",attrs:o},t?{tag:"ag-sort-indicator",ref:"eSortIndicator"}:null]}]}}var y0=class extends ye{constructor(){super(...arguments),this.eFilter=W,this.eFilterButton=W,this.eSortIndicator=W,this.eMenu=W,this.eLabel=W,this.eText=W,this.eColRef=W,this.eSortOrder=W,this.eSortAsc=W,this.eSortDesc=W,this.eSortMixed=W,this.eSortNone=W,this.eSortAbsoluteAsc=W,this.eSortAbsoluteDesc=W,this.isLoadingInnerComponent=!1}refresh(e){const t=this.params;if(this.params=e,this.workOutTemplate(e,!!this.beans?.sortSvc)!=this.currentTemplate||this.workOutShowMenu()!=this.currentShowMenu||e.enableSorting!=this.currentSort||e.column.formulaRef!=this.currentRef||this.currentSuppressMenuHide!=null&&this.shouldSuppressMenuHide()!=this.currentSuppressMenuHide||t.enableFilterButton!=e.enableFilterButton||t.enableFilterIcon!=e.enableFilterIcon)return!1;if(this.innerHeaderComponent){const o={...e};_e(o,e.innerHeaderComponentParams),this.innerHeaderComponent.refresh?.(o)}else this.setDisplayName(e);return!0}workOutTemplate(e,t){const{formula:o}=this.beans,s=e.template;return s?s?.trim?s.trim():s:S0(!!o?.active,t)}init(e){this.params=e;const{sortSvc:t,touchSvc:o,rowNumbersSvc:s,userCompFactory:i}=this.beans,n=t?.getSortIndicatorSelector();this.currentTemplate=this.workOutTemplate(e,!!n),this.setTemplate(this.currentTemplate,n?[n]:void 0),this.eLabel&&(this.mouseListener??(this.mouseListener=this.createManagedBean(new b0(e.column,this.eLabel)))),o?.setupForHeader(this),this.setMenu(),this.setupSort(),this.setupColumnRefIndicator(),s?.setupForHeader(this),this.setupFilterIcon(),this.setupFilterButton(),this.workOutInnerHeaderComponent(i,e),this.setDisplayName(e)}workOutInnerHeaderComponent(e,t){const o=Wm(e,t,t);o&&(this.isLoadingInnerComponent=!0,o.newAgStackInstance().then(s=>{this.isLoadingInnerComponent=!1,s&&(this.isAlive()?(this.innerHeaderComponent=s,this.eText&&this.eText.appendChild(s.getGui())):this.destroyBean(s))}))}setDisplayName(e){const{displayName:t}=e,o=this.currentDisplayName;this.currentDisplayName=t,!(!this.eText||o===t||this.innerHeaderComponent||this.isLoadingInnerComponent)&&(this.eText.textContent=Es(t))}addInIcon(e,t,o){const s=Je(e,this.beans,o);s&&t.appendChild(s)}workOutShowMenu(){return this.params.enableMenu&&!!this.beans.menuSvc?.isHeaderMenuButtonEnabled()}shouldSuppressMenuHide(){return!!this.beans.menuSvc?.isHeaderMenuButtonAlwaysShowEnabled()}setMenu(){if(!this.eMenu)return;if(this.currentShowMenu=this.workOutShowMenu(),!this.currentShowMenu){_t(this.eMenu),this.eMenu=void 0;return}const{gos:e,eMenu:t,params:o}=this,s=Ze(e);this.addInIcon(s?"menu":"menuAlt",t,o.column),t.classList.toggle("ag-header-menu-icon",!s);const i=this.shouldSuppressMenuHide();this.currentSuppressMenuHide=i,this.addManagedElementListeners(t,{click:()=>this.showColumnMenu(this.eMenu)}),this.toggleMenuAlwaysShow(i)}toggleMenuAlwaysShow(e){this.eMenu?.classList.toggle("ag-header-menu-always-show",e)}showColumnMenu(e){const{currentSuppressMenuHide:t,params:o}=this;t||this.toggleMenuAlwaysShow(!0),o.showColumnMenu(e,()=>{t||this.toggleMenuAlwaysShow(!1)})}onMenuKeyboardShortcut(e){const{params:t,gos:o,beans:s,eMenu:i,eFilterButton:n}=this,r=t.column,a=Ze(o);if(e&&!a){if(s.menuSvc?.isFilterMenuInHeaderEnabled(r))return t.showFilter(n??i??this.getGui()),!0}else if(t.enableMenu)return this.showColumnMenu(i??n??this.getGui()),!0;return!1}setupSort(){const{sortSvc:e}=this.beans;if(!e)return;const{enableSorting:t,column:o}=this.params;if(this.currentSort=t,!this.eSortIndicator){this.eSortIndicator=this.createBean(e.createSortIndicator(!0));const{eSortIndicator:s,eSortOrder:i,eSortAsc:n,eSortDesc:r,eSortMixed:a,eSortNone:l,eSortAbsoluteAsc:c,eSortAbsoluteDesc:d}=this;s.attachCustomElements(i,n,r,a,l,c,d)}this.eSortIndicator.setupSort(o),this.currentSort&&e.setupHeader(this,o)}setupColumnRefIndicator(){const{eColRef:e,beans:{editModelSvc:t},params:o}=this;e&&(this.currentRef=o.column.formulaRef,e.textContent=this.currentRef,fe(e,!1),this.addManagedEventListeners({cellEditingStarted:()=>{const s=t?.getEditPositions(),i=!!this.currentRef&&!!s?.some(n=>n.column.isAllowFormula());fe(e,i)},cellEditingStopped:()=>{fe(e,!1)}}))}setupFilterIcon(){const{eFilter:e,params:t}=this;if(!e)return;const o=()=>{const s=t.column.isFilterActive();fe(e,s,{skipAriaHidden:!0})};this.configureFilter(t.enableFilterIcon,e,o,"filterActive")}setupFilterButton(){const{eFilterButton:e,params:t}=this;if(!e)return;this.configureFilter(t.enableFilterButton,e,this.onFilterChangedButton.bind(this),"filter")?this.addManagedElementListeners(e,{click:()=>t.showFilter(e)}):this.eFilterButton=void 0}configureFilter(e,t,o,s){if(!e)return _t(t),!1;const i=this.params.column;return this.addInIcon(s,t,i),this.addManagedListeners(i,{filterChanged:o}),o(),!0}onFilterChangedButton(){const e=this.params.column.isFilterActive();this.eFilterButton.classList.toggle("ag-filter-active",e)}getAnchorElementForMenu(e){const{eFilterButton:t,eMenu:o}=this;return e?t??o??this.getGui():o??t??this.getGui()}destroy(){super.destroy(),this.innerHeaderComponent=this.destroyBean(this.innerHeaderComponent),this.mouseListener=this.destroyBean(this.mouseListener)}},R0=class extends x{constructor(e,t){super(),this.eLabel=e,this.columnGroup=t,this.isSticky=!1,this.left=null,this.right=null}postConstruct(){const{columnGroup:e,beans:t}=this,{ctrlsSvc:o}=t;o.whenReady(this,()=>{const s=this.refreshPosition.bind(this);e.getPinned()==null&&this.addManagedEventListeners({bodyScroll:i=>{i.direction==="horizontal"&&this.updateSticky(i.left)}}),this.addManagedListeners(e,{leftChanged:s,displayedChildrenChanged:s}),this.addManagedEventListeners({columnResized:s}),this.refreshPosition()})}refreshPosition(){const{columnGroup:e,beans:t}=this,o=e.getLeft(),s=e.getActualWidth();if(o==null||s===0){this.left=null,this.right=null,this.setSticky(!1);return}this.left=o,this.right=o+s;const i=t.colViewport.getScrollPosition();i!=null&&this.updateSticky(i)}updateSticky(e){const{beans:t,left:o,right:s}=this;if(o==null||s==null){this.setSticky(!1);return}const{gos:i,visibleCols:n}=t,a=i.get("enableRtl")?n.bodyWidth-e:e;this.setSticky(o<a&&s>a)}setSticky(e){const{isSticky:t,eLabel:o}=this;t!==e&&(this.isSticky=e,o.classList.toggle("ag-sticky-label",e))}},F0={tag:"div",cls:"ag-header-group-cell-label",role:"presentation",children:[{tag:"span",ref:"agLabel",cls:"ag-header-group-text",role:"presentation"},{tag:"span",ref:"agOpened",cls:"ag-header-icon ag-header-expand-icon ag-header-expand-icon-expanded"},{tag:"span",ref:"agClosed",cls:"ag-header-icon ag-header-expand-icon ag-header-expand-icon-collapsed"}]},E0=class extends ye{constructor(){super(F0),this.agOpened=W,this.agClosed=W,this.agLabel=W,this.isLoadingInnerComponent=!1}init(e){const{userCompFactory:t,touchSvc:o}=this.beans;this.params=e,this.checkWarnings(),this.workOutInnerHeaderGroupComponent(t,e),this.setupLabel(e),this.addGroupExpandIcon(e),this.setupExpandIcons(),o?.setupForHeaderGroup(this)}checkWarnings(){this.params.template&&D(89)}workOutInnerHeaderGroupComponent(e,t){const o=_m(e,t,t);o&&(this.isLoadingInnerComponent=!0,o.newAgStackInstance().then(s=>{this.isLoadingInnerComponent=!1,s&&(this.isAlive()?(this.innerHeaderGroupComponent=s,this.agLabel.appendChild(s.getGui())):this.destroyBean(s))}))}setupExpandIcons(){const{agOpened:e,agClosed:t,params:{columnGroup:o},beans:{colGroupSvc:s}}=this;this.addInIcon("columnGroupOpened",e),this.addInIcon("columnGroupClosed",t);const i=l=>{if(zt(l))return;const c=!o.isExpanded();s.setColumnGroupOpened(o.getProvidedColumnGroup(),c,"uiColumnExpanded")};this.addTouchAndClickListeners(t,i),this.addTouchAndClickListeners(e,i);const n=l=>{Bo(l)};this.addManagedElementListeners(t,{dblclick:n}),this.addManagedElementListeners(e,{dblclick:n}),this.addManagedElementListeners(this.getGui(),{dblclick:i}),this.updateIconVisibility();const r=o.getProvidedColumnGroup(),a=this.updateIconVisibility.bind(this);this.addManagedListeners(r,{expandedChanged:a,expandableChanged:a})}addTouchAndClickListeners(e,t){this.beans.touchSvc?.setupForHeaderGroupElement(this,e,t),this.addManagedElementListeners(e,{click:t})}updateIconVisibility(){const{agOpened:e,agClosed:t,params:{columnGroup:o}}=this;if(o.isExpandable()){const s=o.isExpanded();fe(e,s),fe(t,!s)}else fe(e,!1),fe(t,!1)}addInIcon(e,t){const o=Je(e,this.beans,null);o&&t.appendChild(o)}addGroupExpandIcon(e){if(!e.columnGroup.isExpandable()){const{agOpened:t,agClosed:o}=this;fe(t,!1),fe(o,!1)}}setupLabel(e){const{displayName:t,columnGroup:o}=e,{innerHeaderGroupComponent:s,isLoadingInnerComponent:i}=this,n=s||i;L(t)&&!n&&(this.agLabel.textContent=Es(t)),o.getColGroupDef()?.suppressStickyLabel||this.createManagedBean(new R0(this.getGui(),o))}destroy(){super.destroy(),this.innerHeaderGroupComponent&&(this.destroyBean(this.innerHeaderGroupComponent),this.innerHeaderGroupComponent=void 0)}},x0={moduleName:"ColumnHeaderComp",version:I,userComponents:{agColumnHeader:y0},icons:{menu:"menu",menuAlt:"menu-alt"}},P0={moduleName:"ColumnGroupHeaderComp",version:I,userComponents:{agColumnGroupHeader:E0},icons:{columnGroupOpened:"expanded",columnGroupClosed:"contracted"}},D0=class extends x{constructor(){super(...arguments),this.beanName="animationFrameSvc",this.p1={list:[],sorted:!1},this.p2={list:[],sorted:!1},this.f1={list:[],sorted:!1},this.destroyTasks=[],this.ticking=!1,this.scrollGoingDown=!0,this.lastScrollTop=0,this.taskCount=0}setScrollTop(e){this.scrollGoingDown=e>=this.lastScrollTop,e===0&&(this.scrollGoingDown=!0),this.lastScrollTop=e}postConstruct(){this.active=!this.gos.get("suppressAnimationFrame"),this.batchFrameworkComps=this.beans.frameworkOverrides.batchFrameworkComps}verify(){this.active===!1&&D(92)}createTask(e,t,o,s,i=!1){this.verify();let n=o;s&&this.batchFrameworkComps&&(n="f1");const r={task:e,index:t,createOrder:++this.taskCount,deferred:i};this.addTaskToList(this[n],r),this.schedule()}addTaskToList(e,t){e.list.push(t),e.sorted=!1}sortTaskList(e){if(e.sorted)return;const t=this.scrollGoingDown?1:-1;e.list.sort((o,s)=>o.deferred!==s.deferred?o.deferred?-1:1:o.index!==s.index?t*(s.index-o.index):s.createOrder-o.createOrder),e.sorted=!0}addDestroyTask(e){this.verify(),this.destroyTasks.push(e),this.schedule()}executeFrame(e){const{p1:t,p2:o,f1:s,destroyTasks:i,beans:n}=this,{ctrlsSvc:r,frameworkOverrides:a}=n,l=t.list,c=o.list,d=s.list,u=Date.now();let h=0;const g=e<=0,f=r.getScrollFeature();for(;g||h<e;){if(!f.scrollGridIfNeeded()){let C;if(l.length)this.sortTaskList(t),C=l.pop().task;else if(c.length)this.sortTaskList(o),C=c.pop().task;else if(d.length)a.wrapOutgoing(()=>{for(;(g||h<e)&&!f.scrollGridIfNeeded();){if(d.length)this.sortTaskList(s),C=d.pop().task,C();else break;h=Date.now()-u}}),C=()=>{};else if(i.length)C=i.pop();else break;C()}h=Date.now()-u}l.length||c.length||d.length||i.length?this.requestFrame():this.ticking=!1}flushAllFrames(){this.active&&this.executeFrame(-1)}schedule(){this.active&&(this.ticking||(this.ticking=!0,this.requestFrame()))}requestFrame(){const e=this.executeFrame.bind(this,60);qt(this.beans,e)}isQueueEmpty(){return!this.ticking}},M0={moduleName:"AnimationFrame",version:I,beans:[D0]},T0=class extends x{constructor(){super(...arguments),this.beanName="iconSvc"}createIconNoSpan(e,t){return Je(e,this.beans,t?.column)}},I0=(e,t,o)=>t||e&&o,A0=class extends x{constructor(){super(...arguments),this.beanName="touchSvc"}mockBodyContextMenu(e,t){this.mockContextMenu(e,e.eBodyViewport,t)}mockHeaderContextMenu(e,t){this.mockContextMenu(e,e.eGui,t)}mockRowContextMenu(e){if(!Mo())return;const t=(o,s,i)=>{const{rowCtrl:n,cellCtrl:r}=e.getControlsForEventTarget(i?.target??null);r?.column&&r.dispatchCellContextMenuEvent(i??null),this.beans.contextMenuSvc?.handleContextMenuMouseEvent(void 0,i,n,r)};this.mockContextMenu(e,e.element,t)}handleCellDoubleClick(e,t){return(()=>{if(!Mo()||qi("dblclick"))return!1;const s=Date.now(),i=s-e.lastIPadMouseClickEvent<200;return e.lastIPadMouseClickEvent=s,i})()?(e.onCellDoubleClicked(t),t.preventDefault(),!0):!1}setupForHeader(e){const{gos:t,sortSvc:o,menuSvc:s}=this.beans;if(t.get("suppressTouch"))return;const{params:i,eMenu:n,eFilterButton:r}=e,a=new bo(e.getGui(),!0);e.addDestroyFunc(()=>a.destroy());const l=e.shouldSuppressMenuHide(),c=l&&L(n)&&i.enableMenu,d=!!s?.isHeaderContextMenuEnabled(i.column),u=I0(i.enableMenu,d,Ze(t));let h=a;c&&(h=new bo(n,!0),e.addDestroyFunc(()=>h.destroy()));const g=f=>i.showColumnMenuAfterMouseClick(f.touchStart);if(c&&i.enableMenu&&e.addManagedListeners(h,{tap:g}),u&&e.addManagedListeners(a,{longTap:g}),i.enableSorting){const f=m=>{const C=m.touchStart.target;l&&(n?.contains(C)||r?.contains(C))||o?.progressSort(i.column,!1,"uiColumnSorted")};e.addManagedListeners(a,{tap:f})}if(i.enableFilterButton&&r){const f=new bo(r,!0);e.addManagedListeners(f,{tap:()=>i.showFilter(r)}),e.addDestroyFunc(()=>f.destroy())}}setupForHeaderGroup(e){const t=e.params;if(this.beans.menuSvc?.isHeaderContextMenuEnabled(t.columnGroup.getProvidedColumnGroup())){const o=new bo(t.eGridHeader,!0),s=i=>t.showColumnMenuAfterMouseClick(i.touchStart);e.addManagedListeners(o,{longTap:s}),e.addDestroyFunc(()=>o.destroy())}}setupForHeaderGroupElement(e,t,o){const s=new bo(t,!0);e.addManagedListeners(s,{tap:o}),e.addDestroyFunc(()=>s.destroy())}mockContextMenu(e,t,o){if(!Mo())return;const s=new bo(t),i=n=>{Xs(this.beans,n.touchEvent)&&o(void 0,n.touchStart,n.touchEvent)};e.addManagedListeners(s,{longTap:i}),e.addDestroyFunc(()=>s.destroy())}},k0={moduleName:"Touch",version:I,beans:[A0]},L0=class extends x{constructor(){super(...arguments),this.beanName="cellNavigation"}wireBeans(e){this.rowSpanSvc=e.rowSpanSvc}getNextCellToFocus(e,t,o=!1){return o?this.getNextCellToFocusWithCtrlPressed(e,t):this.getNextCellToFocusWithoutCtrlPressed(e,t)}getNextCellToFocusWithCtrlPressed(e,t){const o=e===R.UP,s=e===R.DOWN,i=e===R.LEFT;let n,r;const{pageBounds:a,gos:l,visibleCols:c,pinnedRowModel:d}=this.beans,{rowPinned:u}=t;if(o||s)u&&d?o?r=0:r=u==="top"?d.getPinnedTopRowCount()-1:d.getPinnedBottomRowCount()-1:r=o?a.getFirstRow():a.getLastRow(),n=t.column;else{const h=l.get("enableRtl");r=t.rowIndex,n=(i!==h?c.allCols:[...c.allCols].reverse()).find(f=>!Ue(f)&&this.isCellGoodToFocusOn({rowIndex:r,rowPinned:null,column:f}))}return n?{rowIndex:r,rowPinned:u,column:n}:null}getNextCellToFocusWithoutCtrlPressed(e,t){let o=t,s=!1;for(;!s;){switch(e){case R.UP:o=this.getCellAbove(o);break;case R.DOWN:o=this.getCellBelow(o);break;case R.RIGHT:o=this.gos.get("enableRtl")?this.getCellToLeft(o):this.getCellToRight(o);break;case R.LEFT:o=this.gos.get("enableRtl")?this.getCellToRight(o):this.getCellToLeft(o);break;default:o=null,D(8,{key:e});break}o?s=this.isCellGoodToFocusOn(o):s=!0}return o}isCellGoodToFocusOn(e){const t=e.column;let o;const{pinnedRowModel:s,rowModel:i}=this.beans;switch(e.rowPinned){case"top":o=s?.getPinnedTopRow(e.rowIndex);break;case"bottom":o=s?.getPinnedBottomRow(e.rowIndex);break;default:o=i.getRow(e.rowIndex);break}return o?!this.isSuppressNavigable(t,o):!1}getCellToLeft(e){if(!e)return null;const t=this.beans.visibleCols.getColBefore(e.column);return t?{rowIndex:e.rowIndex,column:t,rowPinned:e.rowPinned}:null}getCellToRight(e){if(!e)return null;const t=this.beans.visibleCols.getColAfter(e.column);return t?{rowIndex:e.rowIndex,column:t,rowPinned:e.rowPinned}:null}getCellBelow(e){if(!e)return null;const t=this.rowSpanSvc?.getCellEnd(e)??e,o=Zl(this.beans,t,!0);return o?{rowIndex:o.rowIndex,column:e.column,rowPinned:o.rowPinned}:null}getCellAbove(e){if(!e)return null;const t=this.rowSpanSvc?.getCellStart(e)??e,o=nn(this.beans,{rowIndex:t.rowIndex,rowPinned:t.rowPinned},!0);return o?{rowIndex:o.rowIndex,column:e.column,rowPinned:o.rowPinned}:null}getNextTabbedCell(e,t){return t?this.getNextTabbedCellBackwards(e):this.getNextTabbedCellForwards(e)}getNextTabbedCellForwards(e){const{visibleCols:t,pagination:o}=this.beans,s=t.allCols;let i=e.rowIndex,n=e.rowPinned,r=t.getColAfter(e.column);if(!r){r=s[0];const a=Zl(this.beans,e,!0);if(we(a)||!a.rowPinned&&!(o?.isRowInPage(a.rowIndex)??!0))return null;i=a?a.rowIndex:null,n=a?a.rowPinned:null}return{rowIndex:i,column:r,rowPinned:n}}getNextTabbedCellBackwards(e){const{beans:t}=this,{visibleCols:o,pagination:s}=t,i=o.allCols;let n=e.rowIndex,r=e.rowPinned,a=o.getColBefore(e.column);if(!a){a=he(i);const l=nn(t,{rowIndex:e.rowIndex,rowPinned:e.rowPinned},!0);if(we(l)||!l.rowPinned&&!(s?.isRowInPage(l.rowIndex)??!0))return null;n=l?l.rowIndex:null,r=l?l.rowPinned:null}return{rowIndex:n,column:a,rowPinned:r}}isSuppressNavigable(e,t){const{suppressNavigable:o}=e.colDef;if(typeof o=="boolean")return o;if(typeof o=="function"){const s=e.createColumnFunctionCallbackParams(t);return o(s)}return!1}};function O0(e){return e.focusSvc.getFocusedCell()}function G0(e){return e.focusSvc.clearFocusedCell()}function H0(e,t,o,s){e.focusSvc.setFocusedCell({rowIndex:t,column:o,rowPinned:s,forceBrowserFocus:!0})}function B0(e,t){return e.navigation?.tabToNextCell(!1,t)??!1}function V0(e,t){return e.navigation?.tabToNextCell(!0,t)??!1}function N0(e,t,o=!1){const s=e.headerNavigation?.getHeaderPositionForColumn(t,o);s&&e.focusSvc.focusHeaderPosition({headerPosition:s})}function No(e){const t=e;return t?.getFrameworkComponentInstance!=null?t.getFrameworkComponentInstance():e}var W0=class extends x{constructor(){super(...arguments),this.beanName="editModelSvc",this.edits=new Map,this.cellValidations=new Nh,this.rowValidations=new Wh,this.suspendEdits=!1}suspend(e){this.suspendEdits=e}removeEdits({rowNode:e,column:t}){if(!this.hasEdits({rowNode:e})||!e)return;const o=this.getEditRow(e);t?o.delete(t):o.clear(),o.size===0&&this.edits.delete(e)}getEditRow(e,t={}){if(this.suspendEdits||this.edits.size===0)return;const o=e&&this.edits.get(e);if(o)return o;if(t.checkSiblings){const s=e.pinnedSibling;if(s)return this.getEditRow(s)}}getEditRowDataValue(e,{checkSiblings:t}={}){if(!e||this.edits.size===0)return;const o=this.getEditRow(e),s=e.pinnedSibling,i=t&&s&&this.getEditRow(s);if(!o&&!i)return;const n={...e.data},r=(a,l)=>a.forEach(({editorValue:c,pendingValue:d},u)=>{const h=c===void 0?d:c;h!==Ie&&(l[u.getColId()]=h)});return o&&r(o,n),i&&r(i,n),n}getEdit(e={},t){const{rowNode:o,column:s}=e,i=this.edits;if(this.suspendEdits||i.size===0||!o||!s)return;const n=i.get(o)?.get(s);if(n)return n;if(t?.checkSiblings){const r=o.pinnedSibling;if(r)return i.get(r)?.get(s)}}getEditMap(e=!0){if(this.suspendEdits||this.edits.size===0)return new Map;if(!e)return this.edits;const t=new Map;return this.edits.forEach((o,s)=>{const i=new Map;o.forEach(({editorState:n,...r},a)=>i.set(a,{...r})),t.set(s,i)}),t}setEditMap(e){this.edits.clear(),e.forEach((t,o)=>{const s=new Map;t.forEach((i,n)=>s.set(n,{...i})),this.edits.set(o,s)})}setEdit(e,t){const o=this.edits;(o.size===0||!o.has(e.rowNode))&&o.set(e.rowNode,new Map);const s=this.getEdit(e),i={editorState:{isCancelAfterEnd:void 0,isCancelBeforeStart:void 0},...s,...t};return this.getEditRow(e.rowNode).set(e.column,i),i}clearEditValue(e){const{rowNode:t,column:o}=e;if(!t)return;const s=n=>{n.editorValue=void 0,n.pendingValue=n.sourceValue,n.state="changed"};if(!o){this.getEditRow(t)?.forEach(s);return}const i=this.getEdit(e);i&&s(i)}getState(e){if(!this.suspendEdits)return this.getEdit(e)?.state}getEditPositions(e){if(this.suspendEdits||(e??this.edits).size===0)return[];const t=[];return(e??this.edits).forEach((o,s)=>{for(const i of o.keys()){const{editorState:n,...r}=o.get(i);t.push({rowNode:s,column:i,...r})}}),t}hasRowEdits(e,t){return this.suspendEdits||this.edits.size===0?!1:!!this.getEditRow(e,t)}hasEdits(e={},t={}){if(this.suspendEdits||this.edits.size===0)return!1;const{rowNode:o,column:s}=e,{withOpenEditor:i}=t;if(o){const n=this.getEditRow(o,t);return n?s?i?this.getEdit(e)?.state==="editing":n.has(s):n.size!==0?i?Array.from(n.values()).some(({state:r})=>r==="editing"):!0:!1:!1}return i?this.getEditPositions().some(({state:n})=>n==="editing"):this.edits.size>0}start(e){const t=this.getEditRow(e.rowNode)??new Map,{rowNode:o,column:s}=e;s&&!t.has(s)&&t.set(s,{editorValue:void 0,pendingValue:Ie,sourceValue:this.beans.valueSvc.getValue(s,o,"data"),state:"editing",editorState:{isCancelAfterEnd:void 0,isCancelBeforeStart:void 0}}),this.edits.set(o,t)}stop(e,t,o){if(this.hasEdits(e))if(t){const s=this.getEditRow(e.rowNode)?.get(e.column);s&&(s.pendingValue===Ie||s.pendingValue===s.sourceValue)?this.removeEdits(e):s&&o&&(s.editorValue=void 0)}else this.removeEdits(e)}clear(){for(const e of this.edits.values())e.clear();this.edits.clear()}getCellValidationModel(){return this.cellValidations}getRowValidationModel(){return this.rowValidations}setCellValidationModel(e){this.cellValidations=e}setRowValidationModel(e){this.rowValidations=e}destroy(){super.destroy(),this.clear()}},Nh=class{constructor(){this.cellValidations=new Map}getCellValidation(e){const{rowNode:t,column:o}=e||{};return this.cellValidations?.get(t)?.get(o)}hasCellValidation(e){return!e?.rowNode||!e.column?this.cellValidations.size>0:!!this.getCellValidation(e)}setCellValidation(e,t){const{rowNode:o,column:s}=e;this.cellValidations.has(o)||this.cellValidations.set(o,new Map),this.cellValidations.get(o).set(s,t)}clearCellValidation(e){const{rowNode:t,column:o}=e;this.cellValidations.get(t)?.delete(o)}setCellValidationMap(e){this.cellValidations=e}getCellValidationMap(){return this.cellValidations}clearCellValidationMap(){this.cellValidations.clear()}},Wh=class{constructor(){this.rowValidations=new Map}getRowValidation(e){const{rowNode:t}=e||{};return this.rowValidations.get(t)}hasRowValidation(e){return e?.rowNode?!!this.getRowValidation(e):this.rowValidations.size>0}setRowValidation({rowNode:e},t){this.rowValidations.set(e,t)}clearRowValidation({rowNode:e}){this.rowValidations.delete(e)}setRowValidationMap(e){this.rowValidations=e}getRowValidationMap(){return this.rowValidations}clearRowValidationMap(){this.rowValidations.clear()}};function dn(e,t={}){const{rowIndex:o,rowId:s,rowCtrl:i,rowPinned:n}=t;if(i)return i;const{rowModel:r,rowRenderer:a}=e;let{rowNode:l}=t;return l||(s?l=LC(e,s,n):o!=null&&(l=r.getRow(o))),l?a.getRowCtrlByNode(l):void 0}function re(e,t={}){const{cellCtrl:o,colId:s,columnId:i,column:n}=t;if(o)return o;const r=e.colModel.getCol(s??i??Kr(n)),a=t.rowCtrl??dn(e,t),l=a?.getCellCtrl(r)??void 0;if(l)return l;const c=t.rowNode??a?.rowNode;if(c)return e.rowRenderer.getCellCtrls([c],[r])?.[0]}function Pc(e){const{editSvc:t}=e;t?.isBatchEditing()?(so(e,{persist:!0}),eo(e)):t?.stopEditing(void 0,{source:"api"})}function z0(e,t,o){const{gos:s,popupSvc:i}=t;if(!s.get("stopEditingWhenCellsLoseFocus"))return;const n=r=>{const a=r.relatedTarget;if(Lr(a)===null){Pc(t);return}let l=o.some(c=>c.contains(a))&&s.isElementInThisInstance(a);l||(l=!!i&&(i.getActivePopups().some(c=>c.contains(a))||i.isElementWithinCustomPopup(a))),l||Pc(t)};for(const r of o)e.addManagedElementListeners(r,{focusout:n})}function Kr(e){if(e)return typeof e=="string"?e:e.getColId()}var Ie=Symbol("unedited"),_0=(e,t={})=>{const o=e.rowRenderer.getCellCtrls(t.rowNodes,t.columns),s=new Array(o.length);let i=0;for(let n=0,r=o.length;n<r;++n){const l=o[n].comp?.getCellEditor();l&&(s[i++]=No(l))}return s.length=i,s};function U0(e,t,o,s,i,n){t.length===0&&o?.rowNode&&o?.column&&Wo(e,o,{key:s,event:i,cellStartedEdit:n});const{valueSvc:r,editSvc:a,editModelSvc:l}=e,{rowNode:c,column:d}=o??{};for(const u of t){const{rowNode:h,column:g}=u,f=re(e,u);if(!f){if(h&&g){const C=r.getValue(g,h,"data"),b=(o?.rowNode===h&&o?.column===g&&s||void 0)??a?.getCellDataValue(u)??r.getValueForDisplay({column:g,node:h,from:"edit"})?.value??C??Ie;l?.setEdit(u,{pendingValue:ys(e,b,!1,g),sourceValue:C,state:"editing"})}continue}const m=n&&c===f.rowNode&&f.column===d;Wo(e,{rowNode:c,column:f.column},{key:m?s:null,event:m?i:null,cellStartedEdit:m&&n})}}function mt({pendingValue:e,sourceValue:t}){return e===Ie&&(e=t),e!==t}function $0(e){const t=new Map;for(const[o,s]of e){const i=new Map;for(const[n,r]of s)mt(r)&&i.set(n,r);i.size>0&&t.set(o,i)}return t}function Wo(e,t,o){const{key:s,event:i,cellStartedEdit:n,silent:r}=o??{},{editModelSvc:a,gos:l,userCompFactory:c}=e,d=re(e,t),u=d?.comp?.getCellEditor(),h=_h(e,t,s,n&&!r),g=a?.getEdit(t),f=h.value??g?.sourceValue;if(u){a?.setEdit(t,{editorValue:ys(e,f,!0,t.column),state:"editing"}),u.refresh?.(h);return}const m=t.column.getColDef(),C=vu(c,m,h);if(!C)return;const{popupFromSelector:v,popupPositionFromSelector:w}=C,b=v??!!m.cellEditorPopup,y=w??m.cellEditorPopupPosition;if(Uh(C.params,i),!d)return;const{rangeFeature:S,rowCtrl:F,comp:E,onEditorAttachedFuncs:G}=d;a?.setEdit(t,{editorValue:ys(e,f,!0,t.column),state:"editing",editorState:{cellStartedEditing:void 0,cellStoppedEditing:void 0}}),d.editCompDetails=C,G.push(()=>S?.unsetComp()),E?.setEditDetails(C,b,y,l.get("reactiveCustomComponents")),F?.refreshRow({suppressFlash:!0}),K0(e,t,i,f,r)}function K0(e,t,o,s,i){const{editSvc:n,editModelSvc:r}=e,a=r?.getEdit(t);!i&&a?.state==="editing"&&!a?.editorState?.cellStartedEditing&&(n?.dispatchCellEvent(t,o,"cellEditingStarted",{value:s}),r?.setEdit(t,{editorState:{cellStartedEditing:!0}}))}function zh(e,t,o){const s={editorValueExists:!1};if(el(e)&&(t.getValidationErrors?.()?.length??0)>0||o?.isCancelling)return s;if(o?.isStopping){const n=t?.isCancelAfterEnd?.();if(n)return{...s,isCancelAfterEnd:n}}return{editorValue:t.getValue(),editorValueExists:!0}}function _h(e,t,o,s){const{valueSvc:i,gos:n,editSvc:r}=e,a=e.gos.get("enableGroupEdit"),l=re(e,t),c=t.rowNode?.rowIndex??void 0,d=r?.isBatchEditing(),u=e.colModel.getCol(t.column.getId()),{rowNode:h,column:g}=t,f=l.comp?.getCellEditor(),m=r?.getCellDataValue(t),C=m===void 0?f?zh(e,f)?.editorValue:void 0:m,v=C===Ie?i.getValueForDisplay({column:u,node:h,from:"edit"})?.value:C;let w=a?C:v;return g.isAllowFormula()&&e.formula?.isFormula(w)&&(w=e.formula?.normaliseFormula(w,!0)??w),K(n,{value:w,eventKey:o??null,column:g,colDef:g.getColDef(),rowIndex:c,node:h,data:h.data,cellStartedEdit:!!s,onKeyDown:l?.onKeyDown.bind(l),stopEditing:b=>{r.stopEditing(t,{source:d?"ui":"api",suppressNavigateAfterEdit:b}),ni(e,t,{})},eGridCell:l?.eGui,parseValue:b=>i.parseValue(u,h,b,l?.value),formatValue:l?.formatValue.bind(l),validate:()=>{r?.validateEdit()}})}function Gs(e,t){const{editModelSvc:o}=e;o?.getEditMap().forEach((s,i)=>{s.forEach((n,r)=>{!t&&(n.state==="editing"||n.pendingValue===Ie)||!mt(n)&&(n.state!=="editing"||t)&&o?.removeEdits({rowNode:i,column:r})})})}function q0(e,t){const o=t.comp?.getCellEditor();if(!o?.refresh)return;const{eventKey:s,cellStartedEdit:i}=t.editCompDetails.params,{column:n}=t,r=_h(e,t,s,i),a=n.getColDef(),l=vu(e.userCompFactory,a,r);o.refresh(Uh(l.params,s))}function Uh(e,t){return t instanceof KeyboardEvent&&e.column.getColDef().cellEditor==="agNumberCellEditor"?e.suppressPreventDefault=["-","+",".","e"].includes(t?.key??"")||e.suppressPreventDefault:t?.preventDefault?.(),e}function so(e,t){for(const o of e.editModelSvc?.getEditPositions()??[]){const s=re(e,o);if(!s)continue;const i=s.comp?.getCellEditor();if(!i)continue;const{editorValue:n,editorValueExists:r,isCancelAfterEnd:a}=zh(e,i,t);if(a){const{cellStartedEditing:l,cellStoppedEditing:c}=e.editModelSvc?.getEdit(o)?.editorState||{};e.editModelSvc?.setEdit(o,{editorState:{isCancelAfterEnd:a,cellStartedEditing:l,cellStoppedEditing:c}})}Yo(e,o,n,void 0,!r,t)}}function Yo(e,t,o,s,i,n){const{editModelSvc:r,valueSvc:a}=e;if(!r)return;const{rowNode:l,column:c}=t;if(!(l&&c))return;let d=r.getEdit(t);if(d?.sourceValue===void 0){const u=d?ys(e,d.editorValue,!1,c):Ie,h={sourceValue:a.getValue(c,l,"data"),pendingValue:u};n?.persist&&(h.state="changed"),d=r.setEdit(t,h)}r.setEdit(t,{editorValue:i?ys(e,d.sourceValue,!0,c):o}),n?.persist&&j0(e,t)}function ys(e,t,o,s){const{formula:i}=e;return s.isAllowFormula()&&i?.isFormula(t)?i?.normaliseFormula(t,o)??t:t}function j0(e,t){const{editModelSvc:o}=e,s=o?.getEdit(t),n={pendingValue:ys(e,s?.editorValue,!1,t.column)};!s?.editorState?.cellStoppedEditing&&s?.state!=="editing"&&(n.state="changed"),o?.setEdit(t,n)}function eo(e,t,o={}){if(t||(t=e.editModelSvc?.getEditPositions()),t)for(const s of t)ni(e,s,o)}function ni(e,t,o,s=re(e,t)){const i=e.editModelSvc,n=i?.getEdit(t);let r;if(n&&n.state!=="editing"&&n.editorState?.cellStoppedEditing?r=n.state:r="changed",!s){n&&i?.setEdit(t,{state:r});return}const a=s.comp,l=a?.getCellEditor();if(a&&!l){if(s?.refreshCell(),n){i?.setEdit(t,{state:r});const d=e.gos.get("enableGroupEdit")?Dc(n,o?.cancel):{valueChanged:!1,newValue:void 0,oldValue:n.sourceValue};Mc(e,t,d,o)}return}if(el(e)){const d=n&&l?.getValidationErrors?.(),u=i?.getCellValidationModel();d?.length?u?.setCellValidation(t,{errorMessages:d}):u?.clearCellValidation(t)}n&&i?.setEdit(t,{state:r}),a?.setEditDetails(),a?.refreshEditStyles(!1,!1),s?.refreshCell({force:!0,suppressFlash:!0});const c=i?.getEdit(t);if(c&&c.state!=="editing"){const d=o?.cancel,u=e.gos.get("enableGroupEdit")?Dc(c,d):Y0(c,n,d);Mc(e,t,u,o)}}function Dc(e,t){const{sourceValue:o,pendingValue:s}=e;let i;return!t&&s!==Ie&&(i=s),{valueChanged:!t&&mt(e),newValue:i,oldValue:o,value:o}}function Y0(e,t,o){if(o||e.editorState.isCancelAfterEnd)return{valueChanged:!1,newValue:void 0,oldValue:e.sourceValue};let s=e.editorValue;return(s==null||s===Ie)&&(s=t?.pendingValue),s===Ie&&(s=void 0),{valueChanged:mt(e),newValue:s,oldValue:e.sourceValue}}function Mc(e,t,o,{silent:s,event:i}={}){const{editSvc:n,editModelSvc:r}=e,a=r?.getEdit(t),{editorState:l}=a||{},{isCancelBeforeStart:c,cellStartedEditing:d,cellStoppedEditing:u}=l||{};!s&&!c&&d&&!u&&(n?.dispatchCellEvent(t,i,"cellEditingStopped",o),r?.setEdit(t,{editorState:{cellStoppedEditing:!0}}))}function Q0(e){if(!e)return!1;for(let t=0,o=e.length;t<o;++t){const s=e[t],i=s.cellEditorParams;if(!(!i||!s.editable&&!s.groupRowEditable)&&(i.minLength!==void 0||i.maxLength!==void 0||i.getValidationErrors!==void 0||i.min!==void 0||i.max!==void 0))return!0}return!1}function Z0(e){const t=e.rowRenderer.getCellCtrls();for(let o=0,s=t.length;o<s;++o){const n=t[o].comp?.getCellEditor();if(n){const r=No(n);if(r.getValidationElement||r.getValidationErrors)return!0}}return!1}function el(e){return!!e.gos.get("getFullRowEditValidationErrors")||Q0(e.colModel.getColumnDefs())||Z0(e)}function no(e,t){if(!(t||el(e)))return;const o=new Nh,{ariaAnnounce:s,localeSvc:i,editModelSvc:n,gos:r}=e,a=r.get("editType")==="fullRow",c=Bd(i)("ariaValidationErrorPrefix","Cell Editor Validation"),d=new Set;for(const u of e.rowRenderer.getCellCtrls()){const h=u.comp?.getCellEditor();if(!h)continue;const g=No(h),{rowNode:f,column:m}=u,C=g.getValidationErrors?.()??[],v=g.getValidationElement?.(!1)||!g.isPopup?.()&&u.eGui;if(v){const w=C!=null&&C.length>0,b=w?C.join(". "):"";Ca(v,w),w&&s.announceValue(`${c} ${C}`,"editorValidation"),v instanceof HTMLInputElement?v.setCustomValidity(b):v.classList.toggle("invalid",w)}C?.length>0&&o.setCellValidation({rowNode:f,column:m},{errorMessages:C}),d.add(u.rowCtrl)}if(so(e,{persist:!1}),n?.setCellValidationModel(o),a){const u=J0(e);n?.setRowValidationModel(u)}for(const u of d.values()){u.rowEditStyleFeature?.applyRowStyles();for(const h of u.getAllCellCtrls())h.tooltipFeature?.refreshTooltip(!0),h.editorTooltipFeature?.refreshTooltip(!0),h.editStyleFeature?.applyCellStyles?.()}}var J0=e=>{const t=new Wh,o=e.gos.get("getFullRowEditValidationErrors"),s=e.editModelSvc?.getEditMap();if(!s)return t;for(const i of s.keys()){const n=s.get(i);if(!n)continue;const r=[],{rowIndex:a,rowPinned:l}=i;for(const d of n.keys()){const u=n.get(d);if(!u)continue;const{editorValue:h,pendingValue:g,sourceValue:f}=u,m=h??(g===Ie?void 0:g)??f;r.push({column:d,colId:d.getColId(),rowIndex:a,rowPinned:l,oldValue:f,newValue:m})}const c=o?.({editorsState:r})??[];c.length>0&&t.setRowValidation({rowNode:i},{errorMessages:c})}return t};function X0(e){no(e,!0);const t=e.editModelSvc?.getCellValidationModel().getCellValidationMap();if(!t)return null;const o=[];return t.forEach((s,i)=>{s.forEach(({errorMessages:n},r)=>{o.push({column:r,rowIndex:i.rowIndex,rowPinned:i.rowPinned,messages:n??null})})}),o}function Pn(e){return!!(e.rowPinned&&e.pinnedSibling)}function rt(e,t,o,s){const i=t==="top";if(!o)return rt(e,t,i?e.getPinnedTopRow(0):e.getPinnedBottomRow(0),s);if(!s){const l=i?e.getPinnedTopRowCount():e.getPinnedBottomRowCount();return rt(e,t,o,i?e.getPinnedTopRow(l-1):e.getPinnedBottomRow(l-1))}let n=!1,r=!1;const a=[];return e.forEachPinnedRow(t,l=>{if(l===o&&!n){n=!0,a.push(l);return}if(n&&l===s){r=!0,a.push(l);return}n&&!r&&a.push(l)}),a}function eR(e,t,o,{rowNode:s,column:i},n){return K(e.gos,{type:o,node:s,data:s.data,value:n,column:i,colDef:i.getColDef(),rowPinned:s.rowPinned,event:t,rowIndex:s.rowIndex})}function tR(e,t=!1){return e===R.DELETE?!0:!t&&e===R.BACKSPACE?yu():!1}var oR=class extends x{constructor(e,t,o,s){super(),this.cellCtrl=e,this.rowNode=o,this.rowCtrl=s,this.beans=t}init(){this.eGui=this.cellCtrl.eGui}onKeyDown(e){const t=e.key;if(!(t===R.ENTER&&Ue(this.cellCtrl.column)&&this.beans.rowNumbersSvc?.handleKeyDownOnCell(this.cellCtrl.cellPosition,e)))switch(t){case R.ENTER:this.onEnterKeyDown(e);break;case R.F2:this.onF2KeyDown(e);break;case R.ESCAPE:this.onEscapeKeyDown(e);break;case R.TAB:this.onTabKeyDown(e);break;case R.BACKSPACE:case R.DELETE:this.onBackspaceOrDeleteKeyDown(t,e);break;case R.DOWN:case R.UP:case R.RIGHT:case R.LEFT:this.onNavigationKeyDown(e,t);break}}onNavigationKeyDown(e,t){const{cellCtrl:o,beans:s}=this;if(!s.editSvc?.isEditing(o,{withOpenEditor:!0})){if(e.shiftKey&&o.isRangeSelectionEnabled())this.onShiftRangeSelect(e);else{const i=o.getFocusedCellPosition();s.navigation?.navigateToNextCell(e,t,i,!0)}e.preventDefault()}}onShiftRangeSelect(e){const{rangeSvc:t,navigation:o}=this.beans;if(!t)return;const s=t.extendLatestRangeInDirection(e);s&&(e.key===R.LEFT||e.key===R.RIGHT?o?.ensureColumnVisible(s.column):o?.ensureRowVisible(s.rowIndex))}onTabKeyDown(e){this.beans.navigation?.onTabKeyDown(this.cellCtrl,e)}onBackspaceOrDeleteKeyDown(e,t){const{cellCtrl:o,beans:s,rowNode:i}=this,{gos:n,rangeSvc:r,eventSvc:a,editSvc:l}=s;if(a.dispatchEvent({type:"keyShortcutChangedCellStart"}),tR(e,n.get("enableCellEditingOnBackspace"))&&!l?.isEditing(o,{withOpenEditor:!0})){if(r&&ao(n))r.clearCellRangeCellValues({dispatchWrapperEvents:!0,wrapperEventSource:"deleteKey"});else if(o.isCellEditable()){const c=s.valueSvc.getDeleteValue(o.column,i);i.setDataValue(o.column,c,"cellClear")}}else l?.isEditing(o,{withOpenEditor:!0})||s.editSvc?.startEditing(o,{startedEdit:!0,event:t});a.dispatchEvent({type:"keyShortcutChangedCellEnd"})}onEnterKeyDown(e){const{cellCtrl:t,beans:o}=this,{editSvc:s,navigation:i}=o,n=s?.isEditing(t,{withOpenEditor:!0}),r=t.rowNode,a=s?.isRowEditing(r,{withOpenEditor:!0}),l=c=>{s?.startEditing(c,{startedEdit:!0,event:e,source:"edit"})&&e.preventDefault()};if(n||a){if(this.isCtrlEnter(e)){s?.applyBulkEdit(t,o?.rangeSvc?.getCellRanges()||[]);return}if(no(o),s?.checkNavWithValidation(void 0,e)==="block-stop")return;s?.isEditing(t,{withOpenEditor:!0})?s?.stopEditing(t,{event:e,source:"edit"}):a&&!t.isCellEditable()?s?.stopEditing({rowNode:r},{event:e,source:"edit"}):l(t)}else if(o.gos.get("enterNavigatesVertically")){const c=e.shiftKey?R.UP:R.DOWN;i?.navigateToNextCell(null,c,t.cellPosition,!1)}else{if(s?.hasValidationErrors())return;s?.hasValidationErrors(t)&&s.revertSingleCellEdit(t,!0),l(t)}}isCtrlEnter(e){return(e.ctrlKey||e.metaKey)&&e.key===R.ENTER}onF2KeyDown(e){const{cellCtrl:t,beans:{editSvc:o}}=this;o?.isEditing()&&(no(this.beans),o?.checkNavWithValidation(void 0,e)==="block-stop")||o?.startEditing(t,{startedEdit:!0,event:e})}onEscapeKeyDown(e){const{cellCtrl:t,beans:{editSvc:o}}=this;o?.checkNavWithValidation(t,e)==="block-stop"&&o.revertSingleCellEdit(t),setTimeout(()=>{o?.stopEditing(t,{event:e,cancel:!0})})}processCharacter(e){const o=e.target!==this.eGui,{beans:{editSvc:s},cellCtrl:i}=this;if(o||s?.isEditing(i,{withOpenEditor:!0}))return;if(e.key===R.SPACE)this.onSpaceKeyDown(e);else if(s?.isCellEditable(i,"ui")){if(s?.hasValidationErrors()&&!s?.hasValidationErrors(i))return;s?.startEditing(i,{startedEdit:!0,event:e,source:"api",editable:!0}),!i.editCompDetails?.params?.suppressPreventDefault&&e.preventDefault()}}onSpaceKeyDown(e){const{gos:t,editSvc:o}=this.beans,{rowNode:s}=this.cellCtrl;!o?.isEditing(this.cellCtrl,{withOpenEditor:!0})&&Po(t)&&this.beans.selectionSvc?.handleSelectionEvent(e,s,"spaceKey"),e.preventDefault()}},sR=class extends x{constructor(e,t,o){super(),this.cellCtrl=e,this.column=o,this.beans=t}onMouseEvent(e,t){if(!zt(t))switch(e){case"click":this.onCellClicked(t);break;case"pointerdown":case"mousedown":case"touchstart":this.onMouseDown(t);break;case"dblclick":this.onCellDoubleClicked(t);break;case"mouseout":this.onMouseOut(t);break;case"mouseover":this.onMouseOver(t);break}}onCellClicked(e){if(this.beans.touchSvc?.handleCellDoubleClick(this,e))return;const{eventSvc:t,rangeSvc:o,editSvc:s,editModelSvc:i,frameworkOverrides:n,gos:r}=this.beans,a=e.ctrlKey||e.metaKey,{cellCtrl:l}=this,{column:c,cellPosition:d,rowNode:u}=l,h=Gi(r,c,u,e);o&&a&&!h&&o.getCellRangeCount(d)>1&&o.intersectLastRange(!0);const g=l.createEvent(e,"cellClicked");g.isEventHandlingSuppressed=h,t.dispatchEvent(g);const f=c.getColDef();if(f.onCellClicked&&window.setTimeout(()=>{n.wrapOutgoing(()=>{f.onCellClicked(g)})},0),!h&&i?.getState(l)!=="editing"){const m=s?.isEditing(),C=s?.isRangeSelectionEnabledWhileEditing(),v=i?.getCellValidationModel().getCellValidationMap().size??0,w=i?.getRowValidationModel().getRowValidationMap().size??0;if(m&&(C||v>0||w>0))return;s?.shouldStartEditing(l,e)?s?.startEditing(l,{event:e}):s?.shouldStopEditing(l,e)&&(this.beans.gos.get("editType")==="fullRow"?s?.stopEditing(l,{event:e,source:"edit"}):s?.stopEditing(void 0,{event:e,source:"edit"}))}}onCellDoubleClicked(e){const{column:t,beans:o,cellCtrl:s}=this,{eventSvc:i,frameworkOverrides:n,editSvc:r,editModelSvc:a,gos:l}=o,c=Gi(l,s.column,s.rowNode,e),d=t.getColDef(),u=s.createEvent(e,"cellDoubleClicked");if(u.isEventHandlingSuppressed=c,i.dispatchEvent(u),typeof d.onCellDoubleClicked=="function"&&window.setTimeout(()=>{n.wrapOutgoing(()=>{d.onCellDoubleClicked(u)})},0),!c&&r?.shouldStartEditing(s,e)&&a?.getState(s)!=="editing"){const h=r?.isEditing(),g=r?.isRangeSelectionEnabledWhileEditing(),f=a?.getCellValidationModel().getCellValidationMap().size??0,m=a?.getRowValidationModel().getRowValidationMap().size??0;if(h&&(g||f>0||m>0))return;r?.startEditing(s,{event:e})}}onMouseDown(e){const{shiftKey:t}=e,o=e.target,{cellCtrl:s,beans:i}=this,{eventSvc:n,rangeSvc:r,rowNumbersSvc:a,focusSvc:l,gos:c,editSvc:d}=i,{column:u,rowNode:h,cellPosition:g}=s,f=Gi(c,u,h,e),m=()=>{const b=s.createEvent(e,"cellMouseDown");b.isEventHandlingSuppressed=f,n.dispatchEvent(b)};if(f){m();return}if(this.isRightClickInExistingRange(e))return;const C=r&&!r.isEmpty(),v=this.containsWidget(o),w=Ue(u);if(!(a&&w&&!a.handleMouseDownOnCell(g,e))){if(!t||!C){const b=d?.isEditing(s),S=c.get("enableCellTextSelection")&&e.defaultPrevented,F=(po()||S)&&!b&&!Bs(o)&&!v;s.focusCell(F,e)}if(t&&C&&!l.isCellFocused(g)){e.preventDefault();const b=l.getFocusedCell();if(b){const{column:y,rowIndex:S,rowPinned:F}=b,E=!!d?.isRangeSelectionEnabledWhileEditing?.();d?.isEditing(b)&&!E&&d?.stopEditing(b),E||l.setFocusedCell({column:y,rowIndex:S,rowPinned:F,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0,sourceEvent:e})}}v||(r?.handleCellMouseDown(e,g),m())}}isRightClickInExistingRange(e){const{rangeSvc:t}=this.beans;if(t){const o=t.isCellInAnyRange(this.cellCtrl.cellPosition),s=Kf(this.beans,e);if(o&&s)return!0}return!1}containsWidget(e){return Eo(e,"ag-selection-checkbox",3)||Eo(e,"ag-drag-handle",3)}onMouseOut(e){if(this.mouseStayingInsideCell(e))return;const{eventSvc:t,colHover:o}=this.beans;t.dispatchEvent(this.cellCtrl.createEvent(e,"cellMouseOut")),o?.clearMouseOver()}onMouseOver(e){if(this.mouseStayingInsideCell(e))return;const{eventSvc:t,colHover:o}=this.beans;t.dispatchEvent(this.cellCtrl.createEvent(e,"cellMouseOver")),o?.setMouseOver([this.column])}mouseStayingInsideCell(e){if(!e.target||!e.relatedTarget)return!1;const t=this.cellCtrl.eGui,o=t.contains(e.target),s=t.contains(e.relatedTarget);return o&&s}},iR=class extends x{constructor(e,t){super(),this.cellCtrl=e,this.beans=t,this.column=e.column,this.rowNode=e.rowNode}setupRowSpan(){this.rowSpan=this.column.getRowSpan(this.rowNode),this.addManagedListeners(this.beans.eventSvc,{newColumnsLoaded:()=>this.onNewColumnsLoaded()})}init(){this.eSetLeft=this.cellCtrl.getRootElement(),this.eContent=this.cellCtrl.eGui;const e=this.cellCtrl.getCellSpan();if(e||(this.setupColSpan(),this.setupRowSpan()),this.onLeftChanged(),this.onWidthChanged(),e||this._legacyApplyRowSpan(),e){const t=this.refreshSpanHeight.bind(this,e);t(),this.addManagedListeners(this.beans.eventSvc,{paginationChanged:t,recalculateRowBounds:t,pinnedHeightChanged:t})}}refreshSpanHeight(e){const t=e.getCellHeight();t!=null&&(this.eContent.style.height=`${t}px`)}onNewColumnsLoaded(){const e=this.column.getRowSpan(this.rowNode);this.rowSpan!==e&&(this.rowSpan=e,this._legacyApplyRowSpan(!0))}onDisplayColumnsChanged(){const e=this.getColSpanningList();ho(this.colsSpanning,e)||(this.colsSpanning=e,this.onWidthChanged(),this.onLeftChanged())}setupColSpan(){this.column.getColDef().colSpan!=null&&(this.colsSpanning=this.getColSpanningList(),this.addManagedListeners(this.beans.eventSvc,{displayedColumnsChanged:this.onDisplayColumnsChanged.bind(this),displayedColumnsWidthChanged:this.onWidthChanged.bind(this)}))}onWidthChanged(){if(!this.eContent)return;const e=this.getCellWidth();this.eContent.style.width=`${e}px`}getCellWidth(){return this.colsSpanning?this.colsSpanning.reduce((e,t)=>e+t.getActualWidth(),0):this.column.getActualWidth()}getColSpanningList(){const{column:e,rowNode:t}=this,o=e.getColSpan(t),s=[];if(o===1)s.push(e);else{let i=e;const n=e.getPinned();for(let r=0;i&&r<o&&(s.push(i),i=this.beans.visibleCols.getColAfter(i),!(!i||we(i)||n!==i.getPinned()));r++);}return s}onLeftChanged(){if(!this.eSetLeft)return;const e=this.modifyLeftForPrintLayout(this.getCellLeft());this.eSetLeft.style.left=e+"px"}getCellLeft(){let e;return this.beans.gos.get("enableRtl")&&this.colsSpanning?e=he(this.colsSpanning):e=this.column,e.getLeft()}modifyLeftForPrintLayout(e){if(!this.cellCtrl.printLayout||this.column.getPinned()==="left")return e;const{visibleCols:t}=this.beans,o=t.getColsLeftWidth();if(this.column.getPinned()==="right"){const s=t.bodyWidth;return o+s+(e||0)}return o+(e||0)}_legacyApplyRowSpan(e){if(this.rowSpan===1&&!e)return;const o=Do(this.beans)*this.rowSpan;this.eContent.style.height=`${o}px`,this.eContent.style.zIndex="1"}destroy(){super.destroy()}},nR="ag-cell",rR="ag-cell-auto-height",aR="ag-cell-normal-height",lR="ag-cell-focus",cR="ag-cell-first-right-pinned",dR="ag-cell-last-left-pinned",uR="ag-cell-not-inline-editing",hR="ag-cell-wrap-text",gR=0,ms=class extends x{constructor(e,t,o,s){super(),this.column=e,this.rowNode=t,this.rowCtrl=s,this.rangeFeature=void 0,this.rowResizeFeature=void 0,this.positionFeature=void 0,this.customStyleFeature=void 0,this.editStyleFeature=void 0,this.mouseListener=void 0,this.keyboardListener=void 0,this.suppressRefreshCell=!1,this.onCompAttachedFuncs=[],this.onEditorAttachedFuncs=[],this.focusEventWhileNotReady=null,this.hasBeenFocused=!1,this.hasEdit=!1,this.tooltipFeature=void 0,this.editorTooltipFeature=void 0,this.beans=o,this.gos=o.gos,this.editSvc=o.editSvc,this.hasEdit=!!o.editSvc;const{colId:i}=e;this.instanceId=i+"-"+gR++,this.createCellPosition(),this.updateAndFormatValue(!1)}addFeatures(){const{beans:e}=this;this.positionFeature=new iR(this,e),this.customStyleFeature=e.cellStyles?.createCellCustomStyleFeature(this),this.editStyleFeature=e.editSvc?.createCellStyleFeature(this),this.mouseListener=new sR(this,e,this.column),this.keyboardListener=new oR(this,e,this.rowNode,this.rowCtrl),this.enableTooltipFeature();const{rangeSvc:t}=e;t&&ao(e.gos)&&(this.rangeFeature=t.createCellRangeFeature(this)),Ue(this.column)&&(this.rowResizeFeature=this.beans.rowNumbersSvc.createRowNumbersRowResizerFeature(this))}isCellSpanning(){return!1}getCellSpan(){}removeFeatures(){const e=this.beans.context;this.positionFeature=e.destroyBean(this.positionFeature),this.editorTooltipFeature=e.destroyBean(this.editorTooltipFeature),this.customStyleFeature=e.destroyBean(this.customStyleFeature),this.editStyleFeature=e.destroyBean(this.editStyleFeature),this.mouseListener=e.destroyBean(this.mouseListener),this.keyboardListener=e.destroyBean(this.keyboardListener),this.rangeFeature=e.destroyBean(this.rangeFeature),this.rowResizeFeature=e.destroyBean(this.rowResizeFeature),this.disableTooltipFeature()}enableTooltipFeature(e,t){this.tooltipFeature=this.beans.tooltipSvc?.enableCellTooltipFeature(this,e,t)}disableTooltipFeature(){this.tooltipFeature=this.beans.context.destroyBean(this.tooltipFeature)}enableEditorTooltipFeature(e){this.editorTooltipFeature&&this.disableEditorTooltipFeature(),this.editorTooltipFeature=this.beans.tooltipSvc?.setupCellEditorTooltip(this,e),no(this.beans)}disableEditorTooltipFeature(){this.editorTooltipFeature=this.beans.context.destroyBean(this.editorTooltipFeature)}setComp(e,t,o,s,i,n,r){this.comp=e,this.eGui=t,this.printLayout=i,r??(r=this),this.addDomData(r),this.addFeatures(),r.addDestroyFunc(()=>this.removeFeatures()),this.onSuppressCellFocusChanged(this.beans.gos.get("suppressCellFocus")),this.setupFocus(),this.applyStaticCssClasses(),this.setWrapText(),this.onFirstRightPinnedChanged(),this.onLastLeftPinnedChanged(),this.onColumnHover(),this.setupControlComps(),this.setupAutoHeight(s,r),this.refreshFirstAndLastStyles(),this.checkFormulaError(),this.refreshAriaRowIndex(),this.refreshAriaColIndex(),this.positionFeature?.init(),this.customStyleFeature?.setComp(e),this.editStyleFeature?.setComp(e),this.tooltipFeature?.refreshTooltip(),this.keyboardListener?.init(),this.rangeFeature?.setComp(e),this.rowResizeFeature?.refreshRowResizer();const a=n?this.isCellEditable():void 0,l=!a&&this.hasEdit&&this.editSvc?.isEditing(this,{withOpenEditor:!0});if(a||l?this.editSvc?.startEditing(this,{startedEdit:!1,source:"api",silent:!0,continueEditing:!0,editable:a}):this.showValue(!1,!0),this.onCompAttachedFuncs.length){for(const c of this.onCompAttachedFuncs)c();this.onCompAttachedFuncs=[]}}checkFormulaError(){const e=!!this.beans.formula?.getFormulaError(this.column,this.rowNode);this.eGui.classList.toggle("formula-error",e)}setupAutoHeight(e,t){this.isAutoHeight=this.beans.rowAutoHeight?.setupCellAutoHeight(this,e,t)??!1}getCellAriaRole(){return this.column.getColDef().cellAriaRole??"gridcell"}isCellRenderer(){const e=this.column.getColDef();return e.cellRenderer!=null||e.cellRendererSelector!=null}getValueToDisplay(){return this.valueFormatted??this.value}getDeferLoadingCellRenderer(){const{beans:e,column:t}=this,{userCompFactory:o,ctrlsSvc:s,eventSvc:i}=e,n=t.getColDef(),r=this.createCellRendererParams();r.deferRender=!0;const a=Bl(o,n,r);if(s.getGridBodyCtrl()?.scrollFeature?.isScrolling()){let l;const c=new ie(u=>{l=u}),[d]=this.addManagedListeners(i,{bodyScrollEnd:()=>{l(),d()}});return{loadingComp:a,onReady:c}}return{loadingComp:a,onReady:ie.resolve()}}showValue(e,t){const{beans:o,column:s,rowNode:i,rangeFeature:n}=this,{userCompFactory:r}=o;let a=this.getValueToDisplay(),l;const c=i.stub&&i.groupData?.[s.getId()]==null,d=s.getColDef();if(c||this.isCellRenderer()){const u=this.createCellRendererParams();!c||Ue(s)?l=Hl(r,d,u):l=Bl(r,d,u)}if(!l&&!c&&o.findSvc?.isMatch(i,s)){const u=this.createCellRendererParams();l=Hl(r,{...s.getColDef(),cellRenderer:"agFindCellRenderer"},u)}if(this.hasEdit&&this.editSvc.isBatchEditing()&&this.editSvc.isRowEditing(i,{checkSiblings:!0})){const u=this.editSvc.prepDetailsDuringBatch(this,{compDetails:l,valueToDisplay:a});u&&(u.compDetails?l=u.compDetails:u.valueToDisplay&&(a=u.valueToDisplay))}this.comp.setRenderDetails(l,a,e),this.customRowDragComp?.refreshVisibility(),!t&&n&&qt(o,()=>n?.refreshRangeStyleAndHandle()),this.rowResizeFeature?.refreshRowResizer()}setupControlComps(){const e=this.column.getColDef();this.includeSelection=this.isIncludeControl(this.isCheckboxSelection(e),!0),this.includeRowDrag=this.isIncludeControl(e.rowDrag),this.includeDndSource=this.isIncludeControl(e.dndSource),this.comp.setIncludeSelection(this.includeSelection),this.comp.setIncludeDndSource(this.includeDndSource),this.comp.setIncludeRowDrag(this.includeRowDrag)}isForceWrapper(){return this.beans.gos.get("enableCellTextSelection")||this.column.isAutoHeight()}getCellValueClass(){const e="ag-cell-value",t=this.column.getColDef().cellRenderer==="agCheckboxCellRenderer";let o="";return t&&(o=" ag-allow-overflow"),`${e}${o}`}isIncludeControl(e,t=!1){return(this.rowNode.rowPinned==null||t&&Pn(this.rowNode))&&!!e}isCheckboxSelection(e){const{rowSelection:t,groupDisplayType:o}=this.beans.gridOptions,s=Qi(t),i=go(this.column);return o==="custom"&&s!=="selectionColumn"&&i?!1:e.checkboxSelection||i&&typeof t=="object"&&ds(t)}refreshShouldDestroy(){const e=this.column.getColDef(),t=this.includeSelection!=this.isIncludeControl(this.isCheckboxSelection(e),!0),o=this.includeRowDrag!=this.isIncludeControl(e.rowDrag),s=this.includeDndSource!=this.isIncludeControl(e.dndSource),i=this.isAutoHeight!=this.column.isAutoHeight();return t||o||s||i}onPopupEditorClosed(e){const{editSvc:t}=this.beans;if(!t?.isEditing(this,{withOpenEditor:!0}))return;const o=e instanceof KeyboardEvent,s=e instanceof MouseEvent,i=o&&e.key===R.ESCAPE;t.stopEditing(this,{source:t.isBatchEditing()?"ui":"api",cancel:i,event:o||s?e:void 0}),i&&this.focusCell(!0,e)}stopEditing(e=!1){const{editSvc:t}=this.beans;return t?.stopEditing(this,{cancel:e,source:t?.isBatchEditing()?"ui":"api"})??!1}createCellRendererParams(){const{value:e,valueFormatted:t,column:o,rowNode:s,comp:i,eGui:n,beans:{valueSvc:r,gos:a,editSvc:l}}=this;return K(a,{value:e,valueFormatted:t,getValue:()=>r.getValueForDisplay({column:o,node:s,from:"edit"}).value,setValue:d=>l?.setDataValue({rowNode:s,column:o},d)||s.setDataValue(o,d),formatValue:this.formatValue.bind(this),data:s.data,node:s,pinned:o.getPinned(),colDef:o.getColDef(),column:o,refreshCell:this.refreshCell.bind(this),eGridCell:n,eParentOfValue:i.getParentOfValue(),registerRowDragger:(d,u,h,g)=>this.registerRowDragger(d,u,g),setTooltip:(d,u)=>{a.assertModuleRegistered("Tooltip",3),this.tooltipFeature&&this.disableTooltipFeature(),this.enableTooltipFeature(d,u),this.tooltipFeature?.refreshTooltip()}})}onCellChanged(e){e.column===this.column&&this.refreshCell()}refreshOrDestroyCell(e){if(this.refreshShouldDestroy()?this.rowCtrl?.recreateCell(this):this.refreshCell(e),this.hasEdit&&this.editCompDetails){const{editSvc:t,comp:o}=this;!o?.getCellEditor()&&t.isEditing(this,{withOpenEditor:!0})&&t.startEditing(this,{startedEdit:!1,source:"api",silent:!0})}}refreshCell(e){const{editStyleFeature:t,customStyleFeature:o,rowCtrl:{rowEditStyleFeature:s},beans:{cellFlashSvc:i,filterManager:n},column:r,comp:a,suppressRefreshCell:l,tooltipFeature:c}=this;if(l)return;const{field:d,valueGetter:u,showRowGroup:h,enableCellChangeFlash:g}=r.getColDef(),f=d==null&&u==null&&h==null,m=e?.newData??!1,C=f||e&&(e.force||m),v=!!a,w=this.updateAndFormatValue(v),b=C||w;if(v){if(b){this.showValue(!!m,!1);const y=n?.isSuppressFlashingCellsBecauseFiltering();!e?.suppressFlash&&!y&&g&&i?.flashCell(this),t?.applyCellStyles?.(),o?.applyUserStyles(),o?.applyClassesFromColDef(),s?.applyRowStyles(),this.checkFormulaError()}c?.refreshTooltip(),o?.applyCellClassRules()}}isCellEditable(){return this.column.isCellEditable(this.rowNode)}formatValue(e){return this.callValueFormatter(e)??e}callValueFormatter(e){return this.beans.valueSvc.formatValue(this.column,this.rowNode,e)}updateAndFormatValue(e){const t=this.value,o=this.valueFormatted,{value:s,valueFormatted:i}=this.beans.valueSvc.getValueForDisplay({column:this.column,node:this.rowNode,includeValueFormatted:!0,from:"edit"});return this.value=s,this.valueFormatted=i,e?!this.valuesAreEqual(t,this.value)||this.valueFormatted!=o:!0}valuesAreEqual(e,t){const o=this.column.getColDef();return o.equals?o.equals(e,t):e===t}addDomData(e){const t=this.eGui;Go(this.beans.gos,t,rn,this),e.addDestroyFunc(()=>Go(this.beans.gos,t,rn,null))}createEvent(e,t){const{rowNode:o,column:s,value:i,beans:n}=this;return eR(n,e,t,{rowNode:o,column:s},i)}processCharacter(e){this.keyboardListener?.processCharacter(e)}onKeyDown(e){this.keyboardListener?.onKeyDown(e)}onMouseEvent(e,t){this.mouseListener?.onMouseEvent(e,t)}getColSpanningList(){return this.positionFeature?.getColSpanningList()??[]}onLeftChanged(){this.comp&&this.positionFeature?.onLeftChanged()}onDisplayedColumnsChanged(){this.eGui&&(this.refreshAriaColIndex(),this.refreshFirstAndLastStyles())}refreshFirstAndLastStyles(){const{comp:e,column:t,beans:o}=this;Gu(e,t,o.visibleCols)}refreshAriaColIndex(){const e=this.beans.visibleCols.getAriaColIndex(this.column);Md(this.eGui,e)}onWidthChanged(){return this.positionFeature?.onWidthChanged()}getRowPosition(){const{rowIndex:e,rowPinned:t}=this.cellPosition;return{rowIndex:e,rowPinned:t}}updateRangeBordersIfRangeCount(){this.comp&&this.rangeFeature?.updateRangeBordersIfRangeCount()}onCellSelectionChanged(){this.comp&&this.rangeFeature?.onCellSelectionChanged()}isRangeSelectionEnabled(){return this.rangeFeature!=null}focusCell(e=!1,t){const o=this.editSvc?.allowedFocusTargetOnValidation(this);o&&o!==this||this.beans.focusSvc.setFocusedCell({...this.getFocusedCellPosition(),forceBrowserFocus:e,sourceEvent:t})}restoreFocus(e=!1){const{beans:{editSvc:t,focusSvc:o},comp:s}=this;if(!s||t?.isEditing(this)||!this.isCellFocused()||!o.shouldTakeFocus())return;const i=()=>{if(!this.isAlive())return;const n=s.getFocusableElement();this.isCellFocused()&&n.focus({preventScroll:!0})};if(e){setTimeout(i,0);return}i()}onRowIndexChanged(){this.createCellPosition(),this.refreshAriaRowIndex(),this.onCellFocused(),this.restoreFocus(),this.rangeFeature?.onCellSelectionChanged(),this.rowResizeFeature?.refreshRowResizer()}onSuppressCellFocusChanged(e){const t=this.eGui;t&&Qe(t,"tabindex",e?void 0:-1)}onFirstRightPinnedChanged(){if(!this.comp)return;const e=this.column.isFirstRightPinned();this.comp.toggleCss(cR,e)}onLastLeftPinnedChanged(){if(!this.comp)return;const e=this.column.isLastLeftPinned();this.comp.toggleCss(dR,e)}checkCellFocused(){return this.beans.focusSvc.isCellFocused(this.cellPosition)}isCellFocused(){const e=this.checkCellFocused();return this.hasBeenFocused||(this.hasBeenFocused=e),e}setupFocus(){this.restoreFocus(!0),this.onCellFocused(this.focusEventWhileNotReady??void 0)}onCellFocused(e){const{beans:t}=this;if(si(t))return;if(!this.comp){e&&(this.focusEventWhileNotReady=e);return}const o=this.isCellFocused(),s=t.editSvc?.isEditing(this)??!1;if(this.comp.toggleCss(lR,o),o&&(e?.forceBrowserFocus||!this.hasBrowserFocus()&&this.beans.focusSvc.shouldTakeFocus())){let i=this.comp.getFocusableElement();if(s){const r=To(i,null,!0);r.length&&(i=r[0])}const n=e?e.preventScrollOnBrowserFocus:!0;i.focus({preventScroll:n}),qp(t,i)}o&&this.focusEventWhileNotReady&&(this.focusEventWhileNotReady=null),o&&e&&this.rowCtrl.announceDescription()}createCellPosition(){const{rowIndex:e,rowPinned:t}=this.rowNode;this.cellPosition={rowIndex:e,rowPinned:Nt(t),column:this.column}}applyStaticCssClasses(){const{comp:e}=this;e.toggleCss(nR,!0),e.toggleCss(uR,!0);const t=this.column.isAutoHeight()==!0;e.toggleCss(rR,t),e.toggleCss(aR,!t)}onColumnHover(){this.beans.colHover?.onCellColumnHover(this.column,this.comp)}onColDefChanged(){this.comp&&(this.column.isTooltipEnabled()?(this.disableTooltipFeature(),this.enableTooltipFeature()):this.disableTooltipFeature(),this.setWrapText(),this.editSvc?.isEditing(this)?this.editSvc?.handleColDefChanged(this):this.refreshOrDestroyCell({force:!0,suppressFlash:!0}))}setWrapText(){const e=this.column.getColDef().wrapText==!0;this.comp.toggleCss(hR,e)}dispatchCellContextMenuEvent(e){const t=this.column.getColDef(),o=this.createEvent(e,"cellContextMenu"),{beans:s}=this;s.eventSvc.dispatchEvent(o),t.onCellContextMenu&&window.setTimeout(()=>{s.frameworkOverrides.wrapOutgoing(()=>{t.onCellContextMenu(o)})},0)}getCellRenderer(){return this.comp?.getCellRenderer()??null}destroy(){this.onCompAttachedFuncs=[],this.onEditorAttachedFuncs=[],this.isCellFocused()&&this.hasBrowserFocus()&&this.beans.focusSvc.attemptToRecoverFocus(),super.destroy()}hasBrowserFocus(){return this.eGui?.contains(ve(this.beans))??!1}createSelectionCheckbox(){const e=this.beans.selectionSvc?.createCheckboxSelectionComponent();if(e)return this.beans.context.createBean(e),e.init({rowNode:this.rowNode,column:this.column}),e}createDndSource(){const e=this.beans.registry.createDynamicBean("dndSourceComp",!1,this.rowNode,this.column,this.eGui);return e&&this.beans.context.createBean(e),e}registerRowDragger(e,t,o){if(this.customRowDragComp){this.customRowDragComp.setDragElement(e,t);return}const s=this.createRowDragComp(e,t,o);s&&(this.customRowDragComp=s,this.addDestroyFunc(()=>{this.beans.context.destroyBean(s),this.customRowDragComp=null}),s.refreshVisibility())}createRowDragComp(e,t,o){const s=this.beans.rowDragSvc?.createRowDragCompForCell(this.rowNode,this.column,()=>this.value,e,t,o);if(s)return this.beans.context.createBean(s),s}cellEditorAttached(){for(const e of this.onEditorAttachedFuncs)e();this.onEditorAttachedFuncs=[]}setFocusedCellPosition(e){}getFocusedCellPosition(){return this.cellPosition}refreshAriaRowIndex(){if(!Ue(this.column)||!this.eGui)return;const{ariaRowIndex:e}=this.rowCtrl;e!=null&&va(this.eGui,e)}getRootElement(){return this.eGui}};function tl(e,t,o,s,i,n){if(o==null&&t==null)return;const r={},a={},l=(c,d)=>{for(const u of c.split(" "))u.trim()!=""&&d(u)};if(o){const c=Object.keys(o);for(let d=0;d<c.length;d++){const u=c[d],h=o[u];let g;typeof h=="string"?g=e?e.evaluate(h,s):!0:typeof h=="function"&&(g=h(s)),l(u,f=>{g?r[f]=!0:a[f]=!0})}}if(t&&n)for(const c of Object.keys(t))l(c,d=>{r[d]||(a[d]=!0)});n&&Object.keys(a).forEach(n),Object.keys(r).forEach(i)}function Tc(e){if(e.group)return e.level;const t=e.parent;return t?t.level+1:0}var pR=class extends x{constructor(){super(...arguments),this.beanName="rowStyleSvc"}processClassesFromGridOptions(e,t){const o=this.gos,s=r=>{if(typeof r=="string")e.push(r);else if(Array.isArray(r))for(const a of r)e.push(a)},i=o.get("rowClass");i&&s(i);const n=o.getCallback("getRowClass");if(n){const r={data:t.data,node:t,rowIndex:t.rowIndex},a=n(r);s(a)}}preProcessRowClassRules(e,t){this.processRowClassRules(t,o=>{e.push(o)},()=>{})}processRowClassRules(e,t,o){const{gos:s,expressionSvc:i}=this.beans,n=K(s,{data:e.data,node:e,rowIndex:e.rowIndex});tl(i,void 0,s.get("rowClassRules"),n,t,o)}processStylesFromGridOptions(e){const t=this.gos,o=t.get("rowStyle"),s=t.getCallback("getRowStyle");let i;if(s){const n={data:e.data,node:e,rowIndex:e.rowIndex};i=s(n)}if(i||o)return Object.assign({},o,i)}},fR=0,un=class extends x{constructor(e,t,o,s,i){super(),this.rowNode=e,this.useAnimationFrameForCreate=s,this.printLayout=i,this.focusEventWhileNotReady=null,this.allRowGuis=[],this.active=!0,this.centerCellCtrls={list:[],map:{}},this.leftCellCtrls={list:[],map:{}},this.rightCellCtrls={list:[],map:{}},this.slideInAnimation={left:!1,center:!1,right:!1,fullWidth:!1},this.fadeInAnimation={left:!1,center:!1,right:!1,fullWidth:!1},this.rowDragComps=[],this.lastMouseDownOnDragger=!1,this.emptyStyle={},this.updateColumnListsPending=!1,this.rowId=null,this.ariaRowIndex=null,this.businessKey=null,this.beans=t,this.gos=t.gos,this.paginationPage=t.pagination?.getCurrentPage()??0,this.suppressRowTransform=this.gos.get("suppressRowTransform"),this.instanceId=e.id+"-"+fR++,this.rowId=Hs(e.id),this.initRowBusinessKey(),this.rowFocused=t.focusSvc.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned),this.rowLevel=Tc(this.rowNode),this.setRowType(),this.setAnimateFlags(o),this.rowStyles=this.processStylesFromGridOptions(),this.rowEditStyleFeature=t.editSvc?.createRowStyleFeature(this),this.addListeners()}initRowBusinessKey(){this.businessKeyForNodeFunc=this.gos.get("getBusinessKeyForNode"),this.updateRowBusinessKey()}updateRowBusinessKey(){if(typeof this.businessKeyForNodeFunc!="function")return;const e=this.businessKeyForNodeFunc(this.rowNode);this.businessKey=Hs(e)}updateGui(e,t){e==="left"?this.leftGui=t:e==="right"?this.rightGui=t:e==="fullWidth"?this.fullWidthGui=t:this.centerGui=t}setComp(e,t,o,s){const{context:i,rowRenderer:n}=this.beans;s=di(this,i,s);const r={rowComp:e,element:t,containerType:o,compBean:s};this.allRowGuis.push(r),this.updateGui(o,r),this.initialiseRowComp(r);const a=this.rowNode,l=this.rowType==="FullWidthLoading"||a.stub,c=!a.data&&this.beans.rowModel.getType()==="infinite";!l&&!c&&!a.rowPinned&&n.dispatchFirstDataRenderedEvent(),this.setupFocus()}unsetComp(e){this.allRowGuis=this.allRowGuis.filter(t=>t.containerType!==e),this.updateGui(e,void 0)}isCacheable(){return this.rowType==="FullWidthDetail"&&this.gos.get("keepDetailRows")}setCached(e){const t=e?"none":"";for(const o of this.allRowGuis)o.element.style.display=t}initialiseRowComp(e){const t=this.gos;this.onSuppressCellFocusChanged(this.beans.gos.get("suppressCellFocus")),this.listenOnDomOrder(e),this.onRowHeightChanged(e),this.updateRowIndexes(e),this.setFocusedClasses(e),this.setStylesFromGridOptions(!1,e),Po(t)&&this.rowNode.selectable&&this.onRowSelected(e),this.updateColumnLists(!this.useAnimationFrameForCreate);const o=e.rowComp,s=this.getInitialRowClasses(e.containerType);for(const i of s)o.toggleCss(i,!0);this.executeSlideAndFadeAnimations(e),this.rowNode.group&&Fr(e.element,!!this.rowNode.expanded),this.setRowCompRowId(o),this.setRowCompRowBusinessKey(o),Go(t,e.element,an,this),e.compBean.addDestroyFunc(()=>Go(t,e.element,an,null)),this.useAnimationFrameForCreate?this.beans.animationFrameSvc.createTask(this.addHoverFunctionality.bind(this,e),this.rowNode.rowIndex,"p2",!1):this.addHoverFunctionality(e),this.isFullWidth()&&this.setupFullWidth(e),t.get("rowDragEntireRow")&&this.addRowDraggerToRow(e),this.useAnimationFrameForCreate&&this.beans.animationFrameSvc.addDestroyTask(()=>{this.isAlive()&&e.rowComp.toggleCss("ag-after-created",!0)}),this.executeProcessRowPostCreateFunc()}setRowCompRowBusinessKey(e){this.businessKey!=null&&e.setRowBusinessKey(this.businessKey)}setRowCompRowId(e){const t=Hs(this.rowNode.id);this.rowId=t,t!=null&&e.setRowId(t)}executeSlideAndFadeAnimations(e){const{containerType:t}=e;this.slideInAnimation[t]&&(xr(()=>{this.onTopChanged()}),this.slideInAnimation[t]=!1),this.fadeInAnimation[t]&&(xr(()=>{e.rowComp.toggleCss("ag-opacity-zero",!1)}),this.fadeInAnimation[t]=!1)}addRowDraggerToRow(e){const t=this.beans.rowDragSvc?.createRowDragCompForRow(this.rowNode,e.element);if(!t)return;const o=this.createBean(t,this.beans.context);this.rowDragComps.push(o),e.compBean.addDestroyFunc(()=>{this.rowDragComps=this.rowDragComps.filter(s=>s!==o),this.rowEditStyleFeature=this.destroyBean(this.rowEditStyleFeature,this.beans.context),this.destroyBean(o,this.beans.context)})}setupFullWidth(e){const t=this.getPinnedForContainer(e.containerType),o=this.createFullWidthCompDetails(e.element,t);e.rowComp.showFullWidth(o)}getFullWidthCellRenderers(){return this.gos.get("embedFullWidthRows")?this.allRowGuis.map(e=>e?.rowComp?.getFullWidthCellRenderer()):[this.fullWidthGui?.rowComp?.getFullWidthCellRenderer()]}executeProcessRowPostCreateFunc(){const e=this.gos.getCallback("processRowPostCreate");if(!e||!this.areAllContainersReady())return;const t={eRow:this.centerGui.element,ePinnedLeftRow:this.leftGui?this.leftGui.element:void 0,ePinnedRightRow:this.rightGui?this.rightGui.element:void 0,node:this.rowNode,rowIndex:this.rowNode.rowIndex,addRenderedRowListener:this.addEventListener.bind(this)};e(t)}areAllContainersReady(){const{leftGui:e,centerGui:t,rightGui:o,beans:{visibleCols:s}}=this,i=!!e||!s.isPinningLeft(),n=!!t,r=!!o||!s.isPinningRight();return i&&n&&r}isNodeFullWidthCell(){if(this.rowNode.detail)return!0;const e=this.beans.gos.getCallback("isFullWidthRow");return e?e({rowNode:this.rowNode}):!1}setRowType(){const{rowNode:e,gos:t,beans:{colModel:o}}=this,s=e.stub&&!t.get("suppressServerSideFullWidthLoadingRow")&&!t.get("groupHideOpenParents"),i=this.isNodeFullWidthCell(),n=t.get("masterDetail")&&e.detail,r=o.isPivotMode(),a=ru(t,e,r);s?this.rowType="FullWidthLoading":n?this.rowType="FullWidthDetail":i?this.rowType="FullWidth":a?this.rowType="FullWidthGroup":this.rowType="Normal"}updateColumnLists(e=!1,t=!1){if(this.isFullWidth())return;const{animationFrameSvc:o}=this.beans;if(!o?.active||e||this.printLayout){this.updateColumnListsImpl(t);return}this.updateColumnListsPending||(o.createTask(()=>{this.active&&this.updateColumnListsImpl(!0)},this.rowNode.rowIndex,"p1",!1),this.updateColumnListsPending=!0)}getNewCellCtrl(e){if(!this.beans.rowSpanSvc?.isCellSpanning(e,this.rowNode))return new ms(e,this.rowNode,this.beans,this)}isCorrectCtrlForSpan(e){return!this.beans.rowSpanSvc?.isCellSpanning(e.column,this.rowNode)}createCellCtrls(e,t,o=null){const s={list:[],map:{}},i=(c,d,u)=>{u!=null?s.list.splice(u,0,d):s.list.push(d),s.map[c]=d},n=[];for(const c of t){const d=c.getInstanceId();let u=e.map[d];u&&!this.isCorrectCtrlForSpan(u)&&(u.destroy(),u=void 0),u||(u=this.getNewCellCtrl(c)),u&&i(d,u)}for(const c of e.list){const d=c.column.getInstanceId();if(s.map[d]!=null)continue;!this.isCellEligibleToBeRemoved(c,o)?n.push([d,c]):c.destroy()}if(n.length)for(const[c,d]of n){const u=s.list.findIndex(g=>g.column.getLeft()>d.column.getLeft()),h=u===-1?void 0:Math.max(u-1,0);i(c,d,h)}const{focusSvc:r,visibleCols:a}=this.beans,l=r.getFocusedCell();if(l&&l.column.getPinned()==o){const c=l.column.getInstanceId();if(!s.map[c]&&a.allCols.includes(l.column)){const u=this.createFocusedCellCtrl();if(u){const h=s.list.findIndex(f=>f.column.getLeft()>u.column.getLeft()),g=h===-1?void 0:Math.max(h-1,0);i(c,u,g)}}}return s}createFocusedCellCtrl(){const{focusSvc:e,rowSpanSvc:t}=this.beans,o=e.getFocusedCell();if(!o)return;const s=t?.getCellSpan(o.column,this.rowNode);if(s){if(s.firstNode!==this.rowNode||!s.doesSpanContain(o))return}else if(!e.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned))return;return this.getNewCellCtrl(o.column)}updateColumnListsImpl(e){this.updateColumnListsPending=!1,this.createAllCellCtrls(),this.setCellCtrls(e)}setCellCtrls(e){for(const t of this.allRowGuis){const o=this.getCellCtrlsForContainer(t.containerType);t.rowComp.setCellCtrls(o,e)}}getCellCtrlsForContainer(e){switch(e){case"left":return this.leftCellCtrls.list;case"right":return this.rightCellCtrls.list;case"fullWidth":return[];case"center":return this.centerCellCtrls.list}}createAllCellCtrls(){const e=this.beans.colViewport,t=this.beans.visibleCols;if(this.printLayout)this.centerCellCtrls=this.createCellCtrls(this.centerCellCtrls,t.allCols),this.leftCellCtrls={list:[],map:{}},this.rightCellCtrls={list:[],map:{}};else{const o=e.getColsWithinViewport(this.rowNode);this.centerCellCtrls=this.createCellCtrls(this.centerCellCtrls,o);const s=t.getLeftColsForRow(this.rowNode);this.leftCellCtrls=this.createCellCtrls(this.leftCellCtrls,s,"left");const i=t.getRightColsForRow(this.rowNode);this.rightCellCtrls=this.createCellCtrls(this.rightCellCtrls,i,"right")}}isCellEligibleToBeRemoved(e,t){const{column:i}=e;if(i.getPinned()!=t||!this.isCorrectCtrlForSpan(e))return!0;const{visibleCols:n,editSvc:r}=this.beans,a=r?.isEditing(e),l=e.isCellFocused();return a||l?!(n.allCols.indexOf(i)>=0):!0}getDomOrder(){return this.gos.get("ensureDomOrder")||Le(this.gos,"print")}listenOnDomOrder(e){const t=()=>{e.rowComp.setDomOrder(this.getDomOrder())};e.compBean.addManagedPropertyListeners(["domLayout","ensureDomOrder"],t)}setAnimateFlags(e){if(this.rowNode.sticky||!e)return;const t=L(this.rowNode.oldRowTop),{visibleCols:o}=this.beans,s=o.isPinningLeft(),i=o.isPinningRight();if(t){const{slideInAnimation:n}=this;if(this.isFullWidth()&&!this.gos.get("embedFullWidthRows")){n.fullWidth=!0;return}n.center=!0,n.left=s,n.right=i}else{const{fadeInAnimation:n}=this;if(this.isFullWidth()&&!this.gos.get("embedFullWidthRows")){n.fullWidth=!0;return}n.center=!0,n.left=s,n.right=i}}isFullWidth(){return this.rowType!=="Normal"}refreshFullWidth(){const e=(r,a)=>r?r.rowComp.refreshFullWidth(()=>this.createFullWidthCompDetails(r.element,a).params):!0,t=e(this.fullWidthGui,null),o=e(this.centerGui,null),s=e(this.leftGui,"left"),i=e(this.rightGui,"right");return t&&o&&s&&i}addListeners(){const{beans:e,gos:t,rowNode:o}=this,{expansionSvc:s,eventSvc:i,context:n,rowSpanSvc:r}=e;this.addManagedListeners(this.rowNode,{heightChanged:()=>this.onRowHeightChanged(),rowSelected:()=>this.onRowSelected(),rowIndexChanged:this.onRowIndexChanged.bind(this),topChanged:this.onTopChanged.bind(this),...s?.getRowExpandedListeners(this)??{}}),o.detail&&this.addManagedListeners(o.parent,{dataChanged:this.onRowNodeDataChanged.bind(this)}),this.addManagedListeners(o,{dataChanged:this.onRowNodeDataChanged.bind(this),cellChanged:this.postProcessCss.bind(this),rowHighlightChanged:this.onRowNodeHighlightChanged.bind(this),draggingChanged:this.postProcessRowDragging.bind(this),uiLevelChanged:this.onUiLevelChanged.bind(this),rowPinned:this.onRowPinned.bind(this)}),this.addManagedListeners(i,{paginationPixelOffsetChanged:this.onPaginationPixelOffsetChanged.bind(this),heightScaleChanged:this.onTopChanged.bind(this),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this),virtualColumnsChanged:this.onVirtualColumnsChanged.bind(this),cellFocused:this.onCellFocusChanged.bind(this),cellFocusCleared:this.onCellFocusChanged.bind(this),paginationChanged:this.onPaginationChanged.bind(this),modelUpdated:this.refreshFirstAndLastRowStyles.bind(this),columnMoved:()=>this.updateColumnLists()}),r&&this.addManagedListeners(r,{spannedCellsUpdated:({pinned:a})=>{a&&!o.rowPinned||this.updateColumnLists()}}),this.addDestroyFunc(()=>{this.rowDragComps=this.destroyBeans(this.rowDragComps,n),this.tooltipFeature=this.destroyBean(this.tooltipFeature,n),this.rowEditStyleFeature=this.destroyBean(this.rowEditStyleFeature,n)}),this.addManagedPropertyListeners(["rowStyle","getRowStyle","rowClass","getRowClass","rowClassRules"],this.postProcessCss.bind(this)),this.addManagedPropertyListener("rowDragEntireRow",()=>{if(t.get("rowDragEntireRow")){for(const l of this.allRowGuis)this.addRowDraggerToRow(l);return}this.rowDragComps=this.destroyBeans(this.rowDragComps,n)}),this.addListenersForCellComps()}addListenersForCellComps(){this.addManagedListeners(this.rowNode,{rowIndexChanged:()=>{for(const e of this.getAllCellCtrls())e.onRowIndexChanged()},cellChanged:e=>{for(const t of this.getAllCellCtrls())t.onCellChanged(e)}})}onRowPinned(){for(const e of this.allRowGuis)e.rowComp.toggleCss("ag-row-pinned-source",!!this.rowNode.pinnedSibling)}onRowNodeDataChanged(e){this.refreshRow({suppressFlash:!e.update,newData:!e.update})}refreshRow(e){if(this.isFullWidth()!==!!this.isNodeFullWidthCell()){this.beans.rowRenderer.redrawRow(this.rowNode);return}if(this.isFullWidth()){this.refreshFullWidth()||this.beans.rowRenderer.redrawRow(this.rowNode);return}for(const o of this.getAllCellCtrls())o.refreshCell(e);for(const o of this.allRowGuis)this.setRowCompRowId(o.rowComp),this.updateRowBusinessKey(),this.setRowCompRowBusinessKey(o.rowComp);this.onRowSelected(),this.postProcessCss()}postProcessCss(){this.setStylesFromGridOptions(!0),this.postProcessClassesFromGridOptions(),this.postProcessRowClassRules(),this.rowEditStyleFeature?.applyRowStyles(),this.postProcessRowDragging()}onRowNodeHighlightChanged(){const e=this.beans.rowDropHighlightSvc,t=e?.row===this.rowNode?e.position:"none",o=t==="above",s=t==="inside",i=t==="below",n=t!=="none",r=o||i,a=this.rowNode.uiLevel,l=r&&a>0,c=l?a.toString():"0";for(const d of this.allRowGuis){const u=d.rowComp;u.toggleCss("ag-row-highlight-above",o),u.toggleCss("ag-row-highlight-inside",s),u.toggleCss("ag-row-highlight-below",i),u.toggleCss("ag-row-highlight-indent",l),n?d.element.style.setProperty("--ag-row-highlight-level",c):d.element.style.removeProperty("--ag-row-highlight-level")}}postProcessRowDragging(){const e=this.rowNode.dragging;for(const t of this.allRowGuis)t.rowComp.toggleCss("ag-row-dragging",e)}onDisplayedColumnsChanged(){this.updateColumnLists(!0),this.beans.rowAutoHeight?.requestCheckAutoHeight()}onVirtualColumnsChanged(){this.updateColumnLists(!1,!0)}getRowPosition(){return{rowPinned:Nt(this.rowNode.rowPinned),rowIndex:this.rowNode.rowIndex}}onKeyboardNavigate(e){const t=this.findFullWidthInfoForEvent(e);if(!t)return;const{rowGui:o,column:s}=t;if(!(o.element===e.target))return;const r=this.rowNode,{focusSvc:a,navigation:l}=this.beans,c=a.getFocusedCell(),d={rowIndex:r.rowIndex,rowPinned:r.rowPinned,column:c?.column??s};l?.navigateToNextCell(e,e.key,d,!0),e.preventDefault()}onTabKeyDown(e){if(e.defaultPrevented||zt(e))return;const t=this.allRowGuis.find(a=>a.element.contains(e.target)),o=t?t.element:null,s=o===e.target,i=ve(this.beans);let n=!1;o&&i&&(n=o.contains(i)&&i.classList.contains("ag-cell"));let r=null;!s&&!n&&(r=$o(this.beans,o,!1,e.shiftKey)),(this.isFullWidth()&&s||!r)&&this.beans.navigation?.onTabKeyDown(this,e)}getFullWidthElement(){return this.fullWidthGui?this.fullWidthGui.element:null}getRowYPosition(){const e=this.allRowGuis.find(t=>vt(t.element))?.element;return e?e.getBoundingClientRect().top:0}onSuppressCellFocusChanged(e){const t=this.isFullWidth()&&e?void 0:this.gos.get("tabIndex");for(const o of this.allRowGuis)Qe(o.element,"tabindex",t)}setupFocus(){this.isFullWidth()&&(this.restoreFullWidthFocus(!0),this.onFullWidthRowFocused(this.focusEventWhileNotReady??void 0))}restoreFullWidthFocus(e=!1){const{focusSvc:t,editSvc:o}=this.beans;if(o?.isEditing(this)||!t.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned)||!t.shouldTakeFocus())return;const s=this.getFullWidthRowGuiForFocus();if(!s)return;const i=()=>{this.isAlive()&&t.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned)&&s.element.focus({preventScroll:!0})};if(e){setTimeout(i,0);return}i()}getFullWidthRowGuiForFocus(e){if(this.fullWidthGui)return this.fullWidthGui;const t=this.beans.focusSvc.getFocusedCell(),o=this.beans.colModel.getCol(e?.column??t?.column);if(!o)return;const s=o?.pinned;return s==="right"?this.rightGui:s==="left"?this.leftGui:this.centerGui}setFullWidthRowFocusedClass(e,t){this.forEachGui(void 0,o=>{o.element.classList.toggle("ag-full-width-focus",t&&o===e)})}onFullWidthRowFocused(e){const{focusSvc:t}=this.beans;if(!(this.isFullWidth()&&t.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned))){this.setFullWidthRowFocusedClass(void 0,!1);return}const s=this.getFullWidthRowGuiForFocus(e);if(!s){e&&(this.focusEventWhileNotReady=e),this.setFullWidthRowFocusedClass(void 0,!1);return}this.setFullWidthRowFocusedClass(s,!0),this.focusEventWhileNotReady=null,e?.forceBrowserFocus&&s.element.focus({preventScroll:!0})}recreateCell(e){this.centerCellCtrls=this.removeCellCtrl(this.centerCellCtrls,e),this.leftCellCtrls=this.removeCellCtrl(this.leftCellCtrls,e),this.rightCellCtrls=this.removeCellCtrl(this.rightCellCtrls,e),e.destroy(),this.updateColumnLists()}removeCellCtrl(e,t){const o={list:[],map:{}};for(const s of e.list)s!==t&&(o.list.push(s),o.map[s.column.getInstanceId()]=s);return o}onMouseEvent(e,t){switch(e){case"dblclick":this.onRowDblClick(t);break;case"click":this.onRowClick(t);break;case"pointerdown":case"touchstart":case"mousedown":this.onRowMouseDown(t);break}}createRowEvent(e,t){const{rowNode:o}=this;return K(this.gos,{type:e,node:o,data:o.data,rowIndex:o.rowIndex,rowPinned:o.rowPinned,event:t})}createRowEventWithSource(e,t){const o=this.createRowEvent(e,t);return o.source=this,o}onRowDblClick(e){if(zt(e))return;const t=this.createRowEventWithSource("rowDoubleClicked",e);t.isEventHandlingSuppressed=this.isSuppressMouseEvent(e),this.beans.eventSvc.dispatchEvent(t)}findFullWidthInfoForEvent(e){if(!e)return;const t=this.findFullWidthRowGui(e.target),o=this.getColumnForFullWidth(t);if(!(!t||!o))return{rowGui:t,column:o}}findFullWidthRowGui(e){return this.allRowGuis.find(t=>t.element.contains(e))}getColumnForFullWidth(e){const{visibleCols:t}=this.beans;switch(e?.containerType){case"center":return t.centerCols[0];case"left":return t.leftCols[0];case"right":return t.rightCols[0];default:return t.allCols[0]}}onRowMouseDown(e){if(this.lastMouseDownOnDragger=Eo(e.target,"ag-row-drag",3),!this.isFullWidth()||this.isSuppressMouseEvent(e))return;const{rangeSvc:t,focusSvc:o}=this.beans;t?.removeAllCellRanges();const s=this.findFullWidthInfoForEvent(e);if(!s)return;const{rowGui:i,column:n}=s,r=i.element,a=e.target,l=this.rowNode;let c=e.defaultPrevented||po();r&&r.contains(a)&&Bs(a)&&(c=!1),o.setFocusedCell({rowIndex:l.rowIndex,column:n,rowPinned:l.rowPinned,forceBrowserFocus:c})}isSuppressMouseEvent(e){const{gos:t,rowNode:o}=this;if(this.isFullWidth()){const i=this.findFullWidthRowGui(e.target);return uv(t,i?.rowComp.getFullWidthCellRendererParams(),o,e)}const s=Ka(t,e.target);return s!=null&&Gi(t,s.column,o,e)}onRowClick(e){if(zt(e)||this.lastMouseDownOnDragger)return;const o=this.isSuppressMouseEvent(e),{eventSvc:s,selectionSvc:i}=this.beans,n=this.createRowEventWithSource("rowClicked",e);n.isEventHandlingSuppressed=o,s.dispatchEvent(n),!o&&i?.handleSelectionEvent(e,this.rowNode,"rowClicked")}setupDetailRowAutoHeight(e){this.rowType==="FullWidthDetail"&&this.beans.masterDetailSvc?.setupDetailRowAutoHeight(this,e)}createFullWidthCompDetails(e,t){const{gos:o,rowNode:s}=this,i=K(o,{fullWidth:!0,data:s.data,node:s,value:s.key,valueFormatted:s.key,eGridCell:e,eParentOfValue:e,pinned:t,addRenderedRowListener:this.addEventListener.bind(this),registerRowDragger:(r,a,l,c)=>this.addFullWidthRowDragging(r,a,l,c),setTooltip:(r,a)=>{o.assertModuleRegistered("Tooltip",3),this.setupFullWidthRowTooltip(r,a)}}),n=this.beans.userCompFactory;switch(this.rowType){case"FullWidthDetail":return qm(n,i);case"FullWidthGroup":{const{value:r,valueFormatted:a}=this.beans.valueSvc.getValueForDisplay({node:this.rowNode,includeValueFormatted:!0,from:"edit"});return i.value=r,i.valueFormatted=a,Km(n,i)}case"FullWidthLoading":return $m(n,i);default:return Um(n,i)}}setupFullWidthRowTooltip(e,t){this.fullWidthGui&&(this.tooltipFeature=this.beans.tooltipSvc?.setupFullWidthRowTooltip(this.tooltipFeature,this,e,t))}addFullWidthRowDragging(e,t,o="",s){const{rowDragSvc:i,context:n}=this.beans;if(!i||!this.isFullWidth())return;const r=i.createRowDragComp(()=>o,this.rowNode,void 0,e,t,s);this.createBean(r,n),this.addDestroyFunc(()=>{this.destroyBean(r,n)})}onUiLevelChanged(){const e=Tc(this.rowNode);if(this.rowLevel!=e){const t="ag-row-level-"+e,o="ag-row-level-"+this.rowLevel;for(const s of this.allRowGuis)s.rowComp.toggleCss(t,!0),s.rowComp.toggleCss(o,!1)}this.rowLevel=e}isFirstRowOnPage(){return this.rowNode.rowIndex===this.beans.pageBounds.getFirstRow()}isLastRowOnPage(){return this.rowNode.rowIndex===this.beans.pageBounds.getLastRow()}refreshFirstAndLastRowStyles(){const e=this.isFirstRowOnPage(),t=this.isLastRowOnPage();if(this.firstRowOnPage!==e){this.firstRowOnPage=e;for(const o of this.allRowGuis)o.rowComp.toggleCss("ag-row-first",e)}if(this.lastRowOnPage!==t){this.lastRowOnPage=t;for(const o of this.allRowGuis)o.rowComp.toggleCss("ag-row-last",t)}}getAllCellCtrls(){return this.leftCellCtrls.list.length===0&&this.rightCellCtrls.list.length===0?this.centerCellCtrls.list:[...this.centerCellCtrls.list,...this.leftCellCtrls.list,...this.rightCellCtrls.list]}postProcessClassesFromGridOptions(){const e=[];if(this.beans.rowStyleSvc?.processClassesFromGridOptions(e,this.rowNode),!!e.length)for(const t of e)for(const o of this.allRowGuis)o.rowComp.toggleCss(t,!0)}postProcessRowClassRules(){this.beans.rowStyleSvc?.processRowClassRules(this.rowNode,e=>{for(const t of this.allRowGuis)t.rowComp.toggleCss(e,!0)},e=>{for(const t of this.allRowGuis)t.rowComp.toggleCss(e,!1)})}setStylesFromGridOptions(e,t){e&&(this.rowStyles=this.processStylesFromGridOptions()),this.forEachGui(t,o=>o.rowComp.setUserStyles(this.rowStyles))}getPinnedForContainer(e){return e==="left"||e==="right"?e:null}getInitialRowClasses(e){const t=this.getPinnedForContainer(e),o=this.isFullWidth(),{rowNode:s,beans:i}=this,n=[];n.push("ag-row"),n.push(this.rowFocused?"ag-row-focus":"ag-row-no-focus"),this.fadeInAnimation[e]&&n.push("ag-opacity-zero"),n.push(s.rowIndex%2===0?"ag-row-even":"ag-row-odd"),s.isRowPinned()&&(n.push("ag-row-pinned"),i.pinnedRowModel?.isManual()&&n.push("ag-row-pinned-manual")),!s.isRowPinned()&&s.pinnedSibling&&n.push("ag-row-pinned-source"),s.isSelected()&&n.push("ag-row-selected"),s.footer&&n.push("ag-row-footer"),n.push("ag-row-level-"+this.rowLevel),s.stub&&n.push("ag-row-loading"),o&&n.push("ag-full-width-row"),i.expansionSvc?.addExpandedCss(n,s),s.dragging&&n.push("ag-row-dragging");const{rowStyleSvc:r}=i;return r&&(r.processClassesFromGridOptions(n,s),r.preProcessRowClassRules(n,s)),n.push(this.printLayout?"ag-row-position-relative":"ag-row-position-absolute"),this.isFirstRowOnPage()&&n.push("ag-row-first"),this.isLastRowOnPage()&&n.push("ag-row-last"),o&&(t==="left"&&n.push("ag-cell-last-left-pinned"),t==="right"&&n.push("ag-cell-first-right-pinned")),n}processStylesFromGridOptions(){return this.beans.rowStyleSvc?.processStylesFromGridOptions(this.rowNode)??this.emptyStyle}onRowSelected(e){this.beans.selectionSvc?.onRowCtrlSelected(this,t=>{(t===this.centerGui||t===this.fullWidthGui)&&this.announceDescription()},e)}announceDescription(){this.beans.selectionSvc?.announceAriaRowSelection(this.rowNode)}addHoverFunctionality(e){if(!this.active)return;const{element:t,compBean:o}=e,{rowNode:s,beans:i,gos:n}=this;o.addManagedListeners(t,{pointerenter:r=>{r.pointerType==="mouse"&&s.dispatchRowEvent("mouseEnter")},pointerleave:r=>{r.pointerType==="mouse"&&s.dispatchRowEvent("mouseLeave")}}),o.addManagedListeners(s,{mouseEnter:()=>{!i.dragSvc?.dragging&&!n.get("suppressRowHoverHighlight")&&(t.classList.add("ag-row-hover"),s.setHovered(!0))},mouseLeave:()=>{this.resetHoveredStatus(t)}})}resetHoveredStatus(e){const t=e?[e]:this.allRowGuis.map(o=>o.element);for(const o of t)o.classList.remove("ag-row-hover");this.rowNode.setHovered(!1)}roundRowTopToBounds(e){const t=this.beans.ctrlsSvc.getScrollFeature().getApproximateVScollPosition(),o=this.applyPaginationOffset(t.top,!0)-100,s=this.applyPaginationOffset(t.bottom,!0)+100;return Math.min(Math.max(o,e),s)}forEachGui(e,t){if(e)t(e);else for(const o of this.allRowGuis)t(o)}isRowRendered(){return this.allRowGuis.length>0}onRowHeightChanged(e){if(this.rowNode.rowHeight==null)return;const t=this.rowNode.rowHeight,o=this.beans.environment.getDefaultRowHeight(),i=tu(this.gos)?ro(this.beans,this.rowNode).height:void 0,n=i?`${Math.min(o,i)-2}px`:void 0;this.forEachGui(e,r=>{r.element.style.height=`${t}px`,n&&r.element.style.setProperty("--ag-line-height",n)})}destroyFirstPass(e=!1){this.active=!1;const{rowNode:t}=this;if(!e&&cs(this.gos)&&!t.sticky)if(t.rowTop!=null){const i=this.roundRowTopToBounds(t.rowTop);this.setRowTop(i)}else for(const i of this.allRowGuis)i.rowComp.toggleCss("ag-opacity-zero",!0);this.fullWidthGui?.element.contains(ve(this.beans))&&this.beans.focusSvc.attemptToRecoverFocus(),t.setHovered(!1);const o=this.createRowEvent("virtualRowRemoved");this.dispatchLocalEvent(o),this.beans.eventSvc.dispatchEvent(o),super.destroy()}destroySecondPass(){this.allRowGuis.length=0;const e=t=>{for(const o of t.list)o.destroy();return{list:[],map:{}}};this.centerCellCtrls=e(this.centerCellCtrls),this.leftCellCtrls=e(this.leftCellCtrls),this.rightCellCtrls=e(this.rightCellCtrls)}setFocusedClasses(e){this.forEachGui(e,t=>{t.rowComp.toggleCss("ag-row-focus",this.rowFocused),t.rowComp.toggleCss("ag-row-no-focus",!this.rowFocused)})}onCellFocusChanged(){const{focusSvc:e}=this.beans,t=e.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned);t!==this.rowFocused&&(this.rowFocused=t,this.setFocusedClasses())}onPaginationChanged(){const e=this.beans.pagination?.getCurrentPage()??0;this.paginationPage!==e&&(this.paginationPage=e,this.onTopChanged()),this.refreshFirstAndLastRowStyles()}onTopChanged(){this.setRowTop(this.rowNode.rowTop)}onPaginationPixelOffsetChanged(){this.onTopChanged()}applyPaginationOffset(e,t=!1){if(this.rowNode.isRowPinned()||this.rowNode.sticky)return e;const o=this.beans.pageBounds.getPixelOffset();return e+o*(t?1:-1)}setRowTop(e){if(!this.printLayout&&L(e)){const t=this.applyPaginationOffset(e),i=`${this.rowNode.isRowPinned()||this.rowNode.sticky?t:this.beans.rowContainerHeight.getRealPixelPosition(t)}px`;this.setRowTopStyle(i)}}getInitialRowTop(e){return this.suppressRowTransform?this.getInitialRowTopShared(e):void 0}getInitialTransform(e){return this.suppressRowTransform?void 0:`translateY(${this.getInitialRowTopShared(e)})`}getInitialRowTopShared(e){if(this.printLayout)return"";const t=this.rowNode;let o;if(t.sticky)o=t.stickyRowTop;else{const s=this.slideInAnimation[e]?this.roundRowTopToBounds(t.oldRowTop):t.rowTop,i=this.applyPaginationOffset(s);o=t.isRowPinned()?i:this.beans.rowContainerHeight.getRealPixelPosition(i)}return o+"px"}setRowTopStyle(e){for(const t of this.allRowGuis)this.suppressRowTransform?t.rowComp.setTop(e):t.rowComp.setTransform(`translateY(${e})`)}getCellCtrl(e,t=!1){let o=null;for(const s of this.getAllCellCtrls())s.column==e&&(o=s);if(o!=null||t)return o;for(const s of this.getAllCellCtrls())s?.getColSpanningList().indexOf(e)>=0&&(o=s);return o}onRowIndexChanged(){this.rowNode.rowIndex!=null&&(this.onCellFocusChanged(),this.updateRowIndexes(),this.postProcessCss())}updateRowIndexes(e){const t=this.rowNode.getRowIndexString();if(t===null)return;const o=(this.beans.ctrlsSvc.getHeaderRowContainerCtrl()?.getRowCount()??0)+(this.beans.filterManager?.getHeaderRowCount()??0),s=this.rowNode.rowIndex%2===0,i=this.ariaRowIndex=o+this.rowNode.rowIndex+1;this.forEachGui(e,n=>{n.rowComp.setRowIndex(t),n.rowComp.toggleCss("ag-row-even",s),n.rowComp.toggleCss("ag-row-odd",!s),va(n.element,i)})}},mR=class extends x{constructor(){super(),this.beanName="navigation",this.onPageDown=Il(this.onPageDown,100),this.onPageUp=Il(this.onPageUp,100)}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.gridBodyCon=e.gridBodyCtrl})}handlePageScrollingKey(e,t=!1){const o=e.key,s=e.altKey,i=e.ctrlKey||e.metaKey,n=!!this.beans.rangeSvc&&e.shiftKey,r=dw(this.gos,e);let a=!1;switch(o){case R.PAGE_HOME:case R.PAGE_END:!i&&!s&&(this.onHomeOrEndKey(o),a=!0);break;case R.LEFT:case R.RIGHT:case R.UP:case R.DOWN:if(!r)return!1;i&&!s&&!n&&(this.onCtrlUpDownLeftRight(o,r),a=!0);break;case R.PAGE_DOWN:case R.PAGE_UP:!i&&!s&&(a=this.handlePageUpDown(o,r,t));break}return a&&e.preventDefault(),a}handlePageUpDown(e,t,o){return o&&(t=this.beans.focusSvc.getFocusedCell()),t?(e===R.PAGE_UP?this.onPageUp(t):this.onPageDown(t),!0):!1}navigateTo({scrollIndex:e,scrollType:t,scrollColumn:o,focusIndex:s,focusColumn:i,isAsync:n,rowPinned:r}){const{scrollFeature:a}=this.gridBodyCon;L(o)&&!o.isPinned()&&a.ensureColumnVisible(o),L(e)&&a.ensureIndexVisible(e,t),n||a.ensureIndexVisible(s);const{focusSvc:l}=this.beans;l.setFocusedCell({rowIndex:s,column:i,rowPinned:r,forceBrowserFocus:!0}),this.setRangeToCellIfSupported({rowIndex:s,rowPinned:r,column:i})}onPageDown(e){const t=this.beans,o=hr(t),s=this.getViewportHeight(),{pageBounds:i,rowModel:n,rowAutoHeight:r}=t,a=i.getPixelOffset(),l=o.top+s,c=n.getRowIndexAtPixel(l+a);r?.active?this.navigateToNextPageWithAutoHeight(e,c):this.navigateToNextPage(e,c)}onPageUp(e){const t=this.beans,o=hr(t),{pageBounds:s,rowModel:i,rowAutoHeight:n}=t,r=s.getPixelOffset(),a=o.top,l=i.getRowIndexAtPixel(a+r);n?.active?this.navigateToNextPageWithAutoHeight(e,l,!0):this.navigateToNextPage(e,l,!0)}navigateToNextPage(e,t,o=!1){const{pageBounds:s,rowModel:i}=this.beans,n=this.getViewportHeight(),r=s.getFirstRow(),a=s.getLastRow(),l=s.getPixelOffset(),c=i.getRow(e.rowIndex),d=o?c?.rowHeight-n-l:n-l,u=c?.rowTop+d;let h=i.getRowIndexAtPixel(u+l);if(h===e.rowIndex){const f=o?-1:1;t=h=e.rowIndex+f}let g;o?(g="bottom",h<r&&(h=r),t<r&&(t=r)):(g="top",h>a&&(h=a),t>a&&(t=a)),this.isRowTallerThanView(i.getRow(h))&&(t=h,g="top"),this.navigateTo({scrollIndex:t,scrollType:g,scrollColumn:null,focusIndex:h,focusColumn:e.column})}navigateToNextPageWithAutoHeight(e,t,o=!1){this.navigateTo({scrollIndex:t,scrollType:o?"bottom":"top",scrollColumn:null,focusIndex:t,focusColumn:e.column}),setTimeout(()=>{const s=this.getNextFocusIndexForAutoHeight(e,o);this.navigateTo({scrollIndex:t,scrollType:o?"bottom":"top",scrollColumn:null,focusIndex:s,focusColumn:e.column,isAsync:!0})},50)}getNextFocusIndexForAutoHeight(e,t=!1){const o=t?-1:1,s=this.getViewportHeight(),{pageBounds:i,rowModel:n}=this.beans,r=i.getLastRow();let a=0,l=e.rowIndex;for(;l>=0&&l<=r;){const c=n.getRow(l);if(c){const d=c.rowHeight??0;if(a+d>s)break;a+=d}l+=o}return Math.max(0,Math.min(l,r))}getViewportHeight(){const e=this.beans,t=hr(e),o=this.beans.scrollVisibleSvc.getScrollbarWidth();let s=t.bottom-t.top;return e.ctrlsSvc.get("center").isHorizontalScrollShowing()&&(s-=o),s}isRowTallerThanView(e){if(!e)return!1;const t=e.rowHeight;return typeof t!="number"?!1:t>this.getViewportHeight()}onCtrlUpDownLeftRight(e,t){const o=this.beans.cellNavigation.getNextCellToFocus(e,t,!0);if(!o)return;const s=this.getNormalisedPosition(o),{rowIndex:i,rowPinned:n,column:r}=s??o,a=r;this.navigateTo({scrollIndex:i,scrollType:null,scrollColumn:a,focusIndex:i,focusColumn:a,rowPinned:n})}onHomeOrEndKey(e){const t=e===R.PAGE_HOME,{visibleCols:o,pageBounds:s,rowModel:i}=this.beans,n=o.allCols,r=t?s.getFirstRow():s.getLastRow(),a=i.getRow(r);if(!a)return;const l=(t?n:[...n].reverse()).find(c=>!c.isSuppressNavigable(a)&&!Ue(c));l&&this.navigateTo({scrollIndex:r,scrollType:null,scrollColumn:l,focusIndex:r,focusColumn:l})}onTabKeyDown(e,t){const o=t.shiftKey,s=this.tabToNextCellCommon(e,o,t),i=this.beans,{ctrlsSvc:n,pageBounds:r,focusSvc:a,gos:l}=i;if(s!==!1){s?t.preventDefault():s===null&&n.get("gridCtrl").allowFocusForNextCoreContainer(o);return}if(o){const{rowIndex:c,rowPinned:d}=e.getRowPosition();(d?c===0:c===r.getFirstRow())&&(l.get("headerHeight")===0||pt(i)?bs(i,!0,!0):(t.preventDefault(),a.focusPreviousFromFirstCell(t)))}else e instanceof ms&&e.focusCell(!0),(a.focusOverlay(!1)||bs(i,o))&&t.preventDefault()}tabToNextCell(e,t){const o=this.beans,{focusSvc:s,rowRenderer:i}=o,n=s.getFocusedCell();if(!n)return!1;let r=es(o,n);return!r&&(r=i.getRowByPosition(n),!r?.isFullWidth())?!1:!!this.tabToNextCellCommon(r,e,t,"api")}tabToNextCellCommon(e,t,o,s="ui"){const{editSvc:i,focusSvc:n}=this.beans;let r;const a=e instanceof ms?e:e.getAllCellCtrls()?.[0];return i?.isEditing()?r=i?.moveToNextCell(a,t,o,s):r=this.moveToNextCellNotEditing(e,t,o),r===null?r:r||!!n.focusedHeader}moveToNextCellNotEditing(e,t,o){const s=this.beans.visibleCols.allCols;let i;if(e instanceof un){if(i={...e.getRowPosition(),column:t?s[0]:he(s)},this.gos.get("embedFullWidthRows")&&o){const r=e.findFullWidthInfoForEvent(o);r&&(i.column=r.column)}}else i=e.getFocusedCellPosition();const n=this.findNextCellToFocusOn(i,{backwards:t,startEditing:!1});if(n===!1)return null;if(n instanceof ms)n.focusCell(!0);else if(n)return this.tryToFocusFullWidthRow(n,t);return L(n)}findNextCellToFocusOn(e,{backwards:t,startEditing:o,skipToNextEditableCell:s}){let i=e;const n=this.beans,{cellNavigation:r,gos:a,focusSvc:l,rowRenderer:c}=n;for(;;){e!==i&&(e=i),t||(i=this.getLastCellOfColSpan(i)),i=r.getNextTabbedCell(i,t);const d=a.getCallback("tabToNextCell");if(L(d)){const f=d({backwards:t,editing:o,previousCellPosition:e,nextCellPosition:i||null});if(f===!0)i=e;else{if(f===!1)return!1;i={rowIndex:f.rowIndex,column:f.column,rowPinned:f.rowPinned}}}if(!i)return null;if(i.rowIndex<0){const g=lt(n);return l.focusHeaderPosition({headerPosition:{headerRowIndex:g+i.rowIndex,column:i.column},fromCell:!0}),null}const u=a.get("editType")==="fullRow";if(o&&(!u||s)&&!this.isCellEditable(i))continue;this.ensureCellVisible(i);const h=es(n,i);if(!h){const g=c.getRowByPosition(i);if(!g||!g.isFullWidth()||o)continue;return{...g.getRowPosition(),column:i?.column}}if(!r.isSuppressNavigable(h.column,h.rowNode))return h.setFocusedCellPosition(i),this.setRangeToCellIfSupported(i),h}}isCellEditable(e){const t=this.lookupRowNodeForCell(e);return t?e.column.isCellEditable(t):!1}lookupRowNodeForCell({rowIndex:e,rowPinned:t}){const{pinnedRowModel:o,rowModel:s}=this.beans;return t==="top"?o?.getPinnedTopRow(e):t==="bottom"?o?.getPinnedBottomRow(e):s.getRow(e)}navigateToNextCell(e,t,o,s){let i=o,n=!1;const r=this.beans,{cellNavigation:a,focusSvc:l,gos:c}=r;for(;i&&(i===o||!this.isValidNavigateCell(i));)c.get("enableRtl")?t===R.LEFT&&(i=this.getLastCellOfColSpan(i)):t===R.RIGHT&&(i=this.getLastCellOfColSpan(i)),i=a.getNextCellToFocus(t,i),n=we(i);if(n&&e&&e.key===R.UP&&(i={rowIndex:-1,rowPinned:null,column:o.column}),s){const u=c.getCallback("navigateToNextCell");if(L(u)){const g=u({key:t,previousCellPosition:o,nextCellPosition:i||null,event:e});L(g)?i={rowPinned:g.rowPinned,rowIndex:g.rowIndex,column:g.column}:i=null}}if(!i)return;if(i.rowIndex<0){const u=lt(r);l.focusHeaderPosition({headerPosition:{headerRowIndex:u+i.rowIndex,column:i.column??o.column},event:e||void 0,fromCell:!0});return}const d=this.getNormalisedPosition(i);d?this.focusPosition(d):this.tryToFocusFullWidthRow(i)}getNormalisedPosition(e){if(!!this.beans.spannedRowRenderer?.getCellByPosition(e))return e;this.ensureCellVisible(e);const o=es(this.beans,e);return o?(e=o.getFocusedCellPosition(),this.ensureCellVisible(e),e):null}tryToFocusFullWidthRow(e,t){const{visibleCols:o,rowRenderer:s,focusSvc:i,eventSvc:n}=this.beans,r=o.allCols;if(!s.getRowByPosition(e)?.isFullWidth())return!1;const l=i.getFocusedCell(),c={rowIndex:e.rowIndex,rowPinned:e.rowPinned,column:e.column||(t?he(r):r[0])};this.focusPosition(c);const d=t??(l!=null&&AC(c,l));return n.dispatchEvent({type:"fullWidthRowFocused",rowIndex:c.rowIndex,rowPinned:c.rowPinned,column:c.column,isFullWidthCell:!0,fromBelow:d}),!0}focusPosition(e){const{focusSvc:t}=this.beans;t.setFocusedCell({rowIndex:e.rowIndex,column:e.column,rowPinned:e.rowPinned,forceBrowserFocus:!0}),this.setRangeToCellIfSupported(e)}setRangeToCellIfSupported(e){Ue(e.column)||this.beans.rangeSvc?.setRangeToCell(e)}isValidNavigateCell(e){return!!kt(this.beans,e)}getLastCellOfColSpan(e){const t=es(this.beans,e);if(!t)return e;const o=t.getColSpanningList();return o.length===1?e:{rowIndex:e.rowIndex,column:he(o),rowPinned:e.rowPinned}}ensureCellVisible(e){const t=su(this.gos),o=this.beans.rowModel.getRow(e.rowIndex),s=t&&o?.sticky,{scrollFeature:i}=this.gridBodyCon;!s&&we(e.rowPinned)&&i.ensureIndexVisible(e.rowIndex),e.column.isPinned()||i.ensureColumnVisible(e.column)}ensureColumnVisible(e){const t=this.gridBodyCon.scrollFeature;e.isPinned()||t.ensureColumnVisible(e)}ensureRowVisible(e){this.gridBodyCon.scrollFeature.ensureIndexVisible(e)}};function hr(e){return e.ctrlsSvc.getScrollFeature().getVScrollPosition()}var CR={moduleName:"KeyboardNavigation",version:I,beans:[mR,L0,Ky],apiFunctions:{getFocusedCell:O0,clearFocusedCell:G0,setFocusedCell:H0,setFocusedHeader:N0,tabToNextCell:B0,tabToPreviousCell:V0}},vR=class extends x{constructor(){super(...arguments),this.beanName="pageBoundsListener"}postConstruct(){this.addManagedEventListeners({modelUpdated:this.onModelUpdated.bind(this),recalculateRowBounds:this.calculatePages.bind(this)}),this.onModelUpdated()}onModelUpdated(e){this.calculatePages(),this.eventSvc.dispatchEvent({type:"paginationChanged",animate:e?.animate??!1,newData:e?.newData??!1,newPage:e?.newPage??!1,newPageSize:e?.newPageSize??!1,keepRenderedRows:e?.keepRenderedRows??!1})}calculatePages(){const{pageBounds:e,pagination:t,rowModel:o}=this.beans;t?t.calculatePages():e.calculateBounds(0,o.getRowCount()-1)}},wR=class extends x{constructor(){super(...arguments),this.beanName="pageBounds",this.pixelOffset=0}getFirstRow(){return this.topRowBounds?.rowIndex??-1}getLastRow(){return this.bottomRowBounds?.rowIndex??-1}getCurrentPageHeight(){const{topRowBounds:e,bottomRowBounds:t}=this;return!e||!t?0:Math.max(t.rowTop+t.rowHeight-e.rowTop,0)}getCurrentPagePixelRange(){const{topRowBounds:e,bottomRowBounds:t}=this,o=e?.rowTop??0,s=t?t.rowTop+t.rowHeight:0;return{pageFirstPixel:o,pageLastPixel:s}}calculateBounds(e,t){const{rowModel:o}=this.beans,s=o.getRowBounds(e);s&&(s.rowIndex=e),this.topRowBounds=s;const i=o.getRowBounds(t);i&&(i.rowIndex=t),this.bottomRowBounds=i,this.calculatePixelOffset()}getPixelOffset(){return this.pixelOffset}calculatePixelOffset(){const e=this.topRowBounds?.rowTop??0;this.pixelOffset!==e&&(this.pixelOffset=e,this.eventSvc.dispatchEvent({type:"paginationPixelOffsetChanged"}))}},bR=".ag-pinned-left-floating-bottom,.ag-pinned-left-floating-top,.ag-pinned-right-floating-bottom,.ag-pinned-right-floating-top{min-width:0;overflow:hidden;position:relative}.ag-pinned-left-sticky-top,.ag-pinned-right-sticky-top{height:100%;overflow:hidden;position:relative}.ag-sticky-bottom-full-width-container,.ag-sticky-top-full-width-container{height:100%;overflow:hidden;width:100%}.ag-pinned-left-header,.ag-pinned-right-header{display:inline-block;height:100%;overflow:hidden;position:relative}.ag-body-horizontal-scroll:not(.ag-scrollbar-invisible){.ag-horizontal-left-spacer:not(.ag-scroller-corner){border-right:var(--ag-pinned-column-border)}.ag-horizontal-right-spacer:not(.ag-scroller-corner){border-left:var(--ag-pinned-column-border)}}.ag-pinned-right-header{border-left:var(--ag-pinned-column-border)}.ag-pinned-left-header{border-right:var(--ag-pinned-column-border)}.ag-cell.ag-cell-first-right-pinned:not(.ag-cell-range-left,.ag-cell-range-single-cell,.ag-cell-focus:not(.ag-cell-range-selected):focus-within){border-left:var(--ag-pinned-column-border)}.ag-cell.ag-cell-last-left-pinned:not(.ag-cell-range-right,.ag-cell-range-single-cell,.ag-cell-focus:not(.ag-cell-range-selected):focus-within){border-right:var(--ag-pinned-column-border)}.ag-pinned-left-header .ag-header-cell-resize:after{left:calc(50% - var(--ag-header-column-resize-handle-width))}.ag-pinned-right-header .ag-header-cell-resize:after{left:50%}.ag-pinned-left-header .ag-header-cell-resize{right:-3px}.ag-pinned-right-header .ag-header-cell-resize{left:-3px}",SR=class extends x{constructor(e,t){super(),this.isLeft=e,this.elements=t,this.getWidth=e?()=>this.beans.pinnedCols.leftWidth:()=>this.beans.pinnedCols.rightWidth}postConstruct(){this.addManagedEventListeners({[`${this.isLeft?"left":"right"}PinnedWidthChanged`]:this.onPinnedWidthChanged.bind(this)})}onPinnedWidthChanged(){const e=this.getWidth(),t=e>0;for(const o of this.elements)o&&(fe(o,t),Tt(o,e))}},yR=class extends x{constructor(){super(...arguments),this.beanName="pinnedCols"}postConstruct(){this.beans.ctrlsSvc.whenReady(this,t=>{this.gridBodyCtrl=t.gridBodyCtrl});const e=this.checkContainerWidths.bind(this);this.addManagedEventListeners({displayedColumnsChanged:e,displayedColumnsWidthChanged:e}),this.addManagedPropertyListener("domLayout",e)}checkContainerWidths(){const{gos:e,visibleCols:t,eventSvc:o}=this.beans,s=Le(e,"print"),i=s?0:t.getColsLeftWidth(),n=s?0:t.getDisplayedColumnsRightWidth();i!=this.leftWidth&&(this.leftWidth=i,o.dispatchEvent({type:"leftPinnedWidthChanged"})),n!=this.rightWidth&&(this.rightWidth=n,o.dispatchEvent({type:"rightPinnedWidthChanged"}))}keepPinnedColumnsNarrowerThanViewport(){const e=this.gridBodyCtrl.eBodyViewport,t=Zs(e);if(t<=50)return;const o=this.getPinnedColumnsOverflowingViewport(t-50),s=this.gos.getCallback("processUnpinnedColumns"),{columns:i,hasLockedPinned:n}=o;let r=i;!r.length&&!n||(s&&(r=s({columns:r,viewportWidth:t})),r?.length&&(r=r.filter(a=>!Ue(a)),this.setColsPinned(r,null,"viewportSizeFeature")))}createPinnedWidthFeature(e,...t){return new SR(e,t)}setColsPinned(e,t,o){const{colModel:s,colAnimation:i,visibleCols:n,gos:r}=this.beans;if(!s.cols||!e?.length)return;if(Le(r,"print")){D(37);return}i?.start();let a;t===!0||t==="left"?a="left":t==="right"?a="right":a=null;const l=[];for(const c of e){if(!c)continue;const d=s.getCol(c);d&&d.getPinned()!==a&&(this.setColPinned(d,a),l.push(d))}l.length&&(n.refresh(o),lh(this.eventSvc,l,o)),i?.finish()}initCol(e){const{pinned:t,initialPinned:o}=e.colDef;t!==void 0?this.setColPinned(e,t):this.setColPinned(e,o)}setColPinned(e,t){t===!0||t==="left"?e.pinned="left":t==="right"?e.pinned="right":e.pinned=null,e.dispatchStateUpdatedEvent("pinned")}setupHeaderPinnedWidth(e){const{scrollVisibleSvc:t}=this.beans;if(e.pinned==null)return;const o=e.pinned==="left",s=e.pinned==="right";e.hidden=!0;const i=()=>{const n=o?this.leftWidth:this.rightWidth;if(n==null)return;const r=n==0,a=e.hidden!==r,l=this.gos.get("enableRtl"),c=t.getScrollbarWidth(),u=t.verticalScrollShowing&&(l&&o||!l&&s)?n+c:n;e.comp.setPinnedContainerWidth(`${u}px`),e.comp.setDisplayed(!r),a&&(e.hidden=r,e.refresh())};e.addManagedEventListeners({leftPinnedWidthChanged:i,rightPinnedWidthChanged:i,scrollVisibilityChanged:i,scrollbarWidthChanged:i})}getHeaderResizeDiff(e,t){if(t.getPinned()){const{leftWidth:s,rightWidth:i}=this,n=Zs(this.beans.ctrlsSvc.getGridBodyCtrl().eBodyViewport)-50;if(s+i+e>n)if(n>s+i)e=n-s-i;else return 0}return e}getPinnedColumnsOverflowingViewport(e){const t=this.rightWidth??0,o=this.leftWidth??0,s=t+o;let i=!1;if(s<e)return{columns:[],hasLockedPinned:i};const{visibleCols:n}=this.beans,r=[...n.leftCols],a=[...n.rightCols];let l=0,c=0;const d=0,u=[];let h=s-d-e;for(;(c<r.length||l<a.length)&&h>0;){if(l<a.length){const g=a[l++];if(g.colDef.lockPinned){i=!0;continue}h-=g.getActualWidth(),u.push(g)}if(c<r.length&&h>0){const g=r[c++];if(g.colDef.lockPinned){i=!0;continue}h-=g.getActualWidth(),u.push(g)}}return{columns:u,hasLockedPinned:i}}},RR={moduleName:"PinnedColumn",version:I,beans:[yR],css:[bR]},FR=class extends qe{constructor(){super(),this.beanName="ariaAnnounce",this.descriptionContainer=null,this.pendingAnnouncements=new Map,this.lastAnnouncement="",this.updateAnnouncement=xe(this,this.updateAnnouncement.bind(this),200)}postConstruct(){const e=this.beans,t=Pe(e),o=this.descriptionContainer=t.createElement("div");o.classList.add("ag-aria-description-container"),Pd(o,"polite"),Ap(o,"additions text"),Ip(o,!0),e.eRootDiv.appendChild(o)}announceValue(e,t){this.pendingAnnouncements.set(t,e),this.updateAnnouncement()}updateAnnouncement(){if(!this.descriptionContainer)return;const e=Array.from(this.pendingAnnouncements.values()).join(". ");this.pendingAnnouncements.clear(),this.descriptionContainer.textContent="",setTimeout(()=>{this.handleAnnouncementUpdate(e)},50)}handleAnnouncementUpdate(e){if(!this.isAlive()||!this.descriptionContainer)return;let t=e;if(t==null||t.replace(/[ .]/g,"")==""){this.lastAnnouncement="";return}this.lastAnnouncement===t&&(t=`${t}`),this.lastAnnouncement=t,this.descriptionContainer.textContent=t}destroy(){super.destroy();const{descriptionContainer:e}=this;e&&(Xe(e),e.remove()),this.descriptionContainer=null,this.pendingAnnouncements.clear()}},ER=class extends FR{},xR={moduleName:"Aria",version:I,beans:[ER]},PR=":where(.ag-delay-render){.ag-cell,.ag-header-cell,.ag-header-group-cell,.ag-row,.ag-spanned-cell-wrapper{visibility:hidden}}",Ic="ag-delay-render",DR=class extends x{constructor(){super(...arguments),this.beanName="colDelayRenderSvc",this.hideRequested=!1,this.alreadyRevealed=!1,this.timesRetried=0,this.requesters=new Set}hideColumns(e){this.alreadyRevealed||this.requesters.has(e)||(this.requesters.add(e),this.hideRequested||(this.beans.ctrlsSvc.whenReady(this,t=>{t.gridBodyCtrl.eGridBody.classList.add(Ic)}),this.hideRequested=!0))}revealColumns(e){if(this.alreadyRevealed||!this.isAlive()||(this.requesters.delete(e),this.requesters.size>0))return;const{renderStatus:t,ctrlsSvc:o}=this.beans;if(t){if(!t.areHeaderCellsRendered()&&this.timesRetried<5){this.timesRetried++,setTimeout(()=>this.revealColumns(e));return}this.timesRetried=0}o.getGridBodyCtrl().eGridBody.classList.remove(Ic),this.alreadyRevealed=!0}},MR={moduleName:"ColumnDelayRender",version:I,beans:[DR],css:[PR]},Dn=class extends ye{constructor(){super()}},TR={tag:"div",cls:"ag-overlay-exporting-center",children:[{tag:"span",ref:"eExportingIcon",cls:"ag-loading-icon"},{tag:"span",ref:"eExportingText",cls:"ag-exporting-text"}]},IR=class extends Dn{constructor(){super(...arguments),this.eExportingIcon=W,this.eExportingText=W}init(e){const{beans:t}=this;this.setTemplate(TR);const o=Je("overlayExporting",t,null);o&&this.eExportingIcon.appendChild(o);const s=e.exporting?.overlayText??this.getLocaleTextFunc()("exportingOoo","Exporting...");this.eExportingText.textContent=s,t.ariaAnnounce.announceValue(s,"overlay")}},AR={tag:"div",cls:"ag-overlay-loading-center",children:[{tag:"span",ref:"eLoadingIcon",cls:"ag-loading-icon"},{tag:"span",ref:"eLoadingText",cls:"ag-loading-text"}]},kR=class extends Dn{constructor(){super(...arguments),this.eLoadingIcon=W,this.eLoadingText=W}init(e){const{beans:t,gos:o}=this,s=Nt(o.get("overlayLoadingTemplate")?.trim());if(this.setTemplate(s??AR),!s){const i=Je("overlayLoading",t,null);i&&this.eLoadingIcon.appendChild(i);const n=e.loading?.overlayText??this.getLocaleTextFunc()("loadingOoo","Loading...");this.eLoadingText.textContent=n,t.ariaAnnounce.announceValue(n,"overlay")}}},LR={tag:"span",cls:"ag-overlay-no-matching-rows-center"},OR=class extends Dn{init(e){const{beans:t}=this;this.setTemplate(LR);const o=e.noMatchingRows?.overlayText??this.getLocaleTextFunc()("noMatchingRows","No Matching Rows");this.getGui().textContent=o,t.ariaAnnounce.announceValue(o,"overlay")}},GR={tag:"span",cls:"ag-overlay-no-rows-center"},HR=class extends Dn{init(e){const{beans:t,gos:o}=this,s=Nt(o.get("overlayNoRowsTemplate")?.trim());if(this.setTemplate(s??GR),!s){const i=e.noRows?.overlayText??this.getLocaleTextFunc()("noRowsToShow","No Rows To Show");this.getGui().textContent=i,t.ariaAnnounce.announceValue(i,"overlay")}}};function BR(e){e.overlays?.showLoadingOverlay()}function VR(e){e.overlays?.showNoRowsOverlay()}function NR(e){e.overlays?.hideOverlay()}var WR=".ag-overlay{inset:0;pointer-events:none;position:absolute;z-index:2}.ag-overlay-panel,.ag-overlay-wrapper{display:flex;height:100%;width:100%}.ag-overlay-wrapper{align-items:center;flex:none;justify-content:center;text-align:center}.ag-overlay-exporting-wrapper,.ag-overlay-loading-wrapper,.ag-overlay-modal-wrapper{pointer-events:all}.ag-overlay-exporting-center,.ag-overlay-loading-center{background:var(--ag-background-color);border:solid var(--ag-border-width) var(--ag-border-color);border-radius:var(--ag-border-radius);box-shadow:var(--ag-popup-shadow);display:flex;padding:var(--ag-spacing)}",zR={tag:"div",cls:"ag-overlay",role:"presentation",children:[{tag:"div",cls:"ag-overlay-panel",role:"presentation",children:[{tag:"div",ref:"eOverlayWrapper",cls:"ag-overlay-wrapper",role:"presentation"}]}]},$h=class extends ye{constructor(){super(zR),this.eOverlayWrapper=W,this.activeOverlay=null,this.activePromise=null,this.activeCssClass=null,this.elToFocusAfter=null,this.overlayExclusive=!1,this.oldWrapperPadding=null,this.registerCSS(WR)}handleKeyDown(e){if(e.key!==R.TAB||e.defaultPrevented||zt(e))return;const{beans:t,eOverlayWrapper:o}=this;if(o&&$o(t,o,!1,e.shiftKey))return;let i=!1;e.shiftKey?i=t.focusSvc.focusGridView({column:he(t.visibleCols.allCols),backwards:!0,canFocusOverlay:!1}):i=bs(t,!1),i&&e.preventDefault()}updateLayoutClasses(e,t){const o=this.eOverlayWrapper;if(!o)return;const s=o.classList,{AUTO_HEIGHT:i,NORMAL:n,PRINT:r}=Oi;s.toggle(i,t.autoHeight),s.toggle(n,t.normal),s.toggle(r,t.print)}postConstruct(){this.createManagedBean(new $a(this)),this.setDisplayed(!1,{skipAriaHidden:!0}),this.beans.overlays.setWrapperComp(this,!1),this.addManagedElementListeners(this.getFocusableElement(),{keydown:this.handleKeyDown.bind(this)}),this.addManagedEventListeners({gridSizeChanged:this.refreshWrapperPadding.bind(this)})}setWrapperTypeClass(e){const t=this.eOverlayWrapper?.classList;if(!t){this.activeCssClass=null;return}this.activeCssClass&&t.toggle(this.activeCssClass,!1),this.activeCssClass=e,t.toggle(e,!0)}showOverlay(e,t,o){if(this.destroyActiveOverlay(),this.elToFocusAfter=null,this.activePromise=e,this.overlayExclusive=o,!e)return this.refreshWrapperPadding(),ie.resolve();if(this.setWrapperTypeClass(t),this.setDisplayed(!0,{skipAriaHidden:!0}),this.refreshWrapperPadding(),o&&this.isGridFocused()){const s=ve(this.beans);s&&!pa(this.beans)&&(this.elToFocusAfter=s)}return e.then(s=>{const i=this.eOverlayWrapper;if(!i){this.destroyBean(s);return}if(this.activePromise!==e){this.activeOverlay!==s&&(this.destroyBean(s),s=null);return}this.activePromise=null,s&&(this.activeOverlay!==s&&(i.appendChild(s.getGui()),this.activeOverlay=s),o&&this.isGridFocused()&&Ho(i))}),e}refreshWrapperPadding(){if(!this.eOverlayWrapper){this.oldWrapperPadding=null;return}const e=!!this.activeOverlay||!!this.activePromise;let t=0;e&&!this.overlayExclusive&&(t=this.beans.ctrlsSvc.get("gridHeaderCtrl")?.headerHeight||0),t!==this.oldWrapperPadding&&(this.oldWrapperPadding=t,this.eOverlayWrapper.style.setProperty("padding-top",`${t}px`))}destroyActiveOverlay(){this.activePromise=null;const e=this.activeOverlay;if(!e){this.overlayExclusive=!1,this.elToFocusAfter=null,this.refreshWrapperPadding();return}let t=this.elToFocusAfter;this.elToFocusAfter=null,this.activeOverlay=null,this.overlayExclusive=!1,t&&!this.isGridFocused()&&(t=null),this.destroyBean(e);const o=this.eOverlayWrapper;o&&Xe(o),t?.focus?.({preventScroll:!0}),this.refreshWrapperPadding()}hideOverlay(){this.destroyActiveOverlay(),this.setDisplayed(!1,{skipAriaHidden:!0})}isGridFocused(){const e=ve(this.beans);return!!e&&this.beans.eGridDiv.contains(e)}destroy(){this.elToFocusAfter=null,this.destroyActiveOverlay(),this.beans.overlays.setWrapperComp(this,!0),super.destroy(),this.eOverlayWrapper=null}},_R={selector:"AG-OVERLAY-WRAPPER",component:$h},UR=["refresh"],hi=e=>({name:e,optionalMethods:UR}),yo={id:"agLoadingOverlay",overlayType:"loading",comp:hi("loadingOverlayComponent"),wrapperCls:"ag-overlay-loading-wrapper",exclusive:!0,compKey:"loadingOverlayComponent",paramsKey:"loadingOverlayComponentParams",isSuppressed:e=>{const t=e.get("loading");return t===!1||e.get("suppressLoadingOverlay")===!0&&t!==!0}},ss={id:"agNoRowsOverlay",overlayType:"noRows",comp:hi("noRowsOverlayComponent"),wrapperCls:"ag-overlay-no-rows-wrapper",compKey:"noRowsOverlayComponent",paramsKey:"noRowsOverlayComponentParams",isSuppressed:e=>e.get("suppressNoRowsOverlay")},ol={id:"agNoMatchingRowsOverlay",overlayType:"noMatchingRows",comp:hi("noMatchingRowsOverlayComponent"),wrapperCls:"ag-overlay-no-matching-rows-wrapper"},hn={id:"agExportingOverlay",overlayType:"exporting",comp:hi("exportingOverlayComponent"),wrapperCls:"ag-overlay-exporting-wrapper",exclusive:!0},Ni={id:"activeOverlay",comp:hi("activeOverlay"),wrapperCls:"ag-overlay-modal-wrapper",exclusive:!0},$R=e=>e?{agLoadingOverlay:yo,agNoRowsOverlay:ss,agNoMatchingRowsOverlay:ol,agExportingOverlay:hn}[e]??Ni:null,KR=e=>e?{loading:yo,noRows:ss,noMatchingRows:ol,exporting:hn}[e]:null,qR=class extends x{constructor(){super(...arguments),this.beanName="overlays",this.eWrapper=void 0,this.exclusive=!1,this.oldExclusive=!1,this.currentDef=null,this.showInitialOverlay=!0,this.userForcedNoRows=!1,this.exportsInProgress=0,this.newColumnsLoadedCleanup=null}postConstruct(){const e=this.gos;this.showInitialOverlay=Se(e);const t=()=>{this.userForcedNoRows||this.updateOverlay(!1)},[o,s,i,n]=this.addManagedEventListeners({newColumnsLoaded:t,rowCountReady:()=>{this.disableInitialOverlay(),t(),s()},rowDataUpdated:t,modelUpdated:t});this.newColumnsLoadedCleanup=o,this.addManagedPropertyListeners(["loading","activeOverlay","activeOverlayParams","overlayComponentParams","loadingOverlayComponentParams","noRowsOverlayComponentParams"],r=>this.onPropChange(new Set(r.changeSet?.properties)))}destroy(){this.doHideOverlay(),super.destroy(),this.eWrapper=void 0}setWrapperComp(e,t){this.isAlive()&&(t?this.eWrapper===e&&(this.eWrapper=void 0):this.eWrapper=e,this.updateOverlay(!1))}isVisible(){return!!this.currentDef}showLoadingOverlay(){this.showInitialOverlay=!1;const e=this.gos;if(!this.eWrapper||e.get("activeOverlay")||this.isDisabled(yo))return;const t=e.get("loading");!t&&t!==void 0||this.doShowOverlay(yo)}showNoRowsOverlay(){this.showInitialOverlay=!1;const e=this.gos;!this.eWrapper||e.get("activeOverlay")||e.get("loading")||this.isDisabled(ss)||(this.userForcedNoRows=!0,this.doShowOverlay(ss))}async showExportOverlay(e){const{gos:t,beans:o}=this;if(!this.eWrapper||t.get("activeOverlay")||t.get("loading")||this.isDisabled(hn)||this.userForcedNoRows&&this.currentDef===ss){e();return}const s=this.getDesiredDefWithOverride(hn);if(!s){e();return}this.exportsInProgress++,this.focusedCell=o.focusSvc.getFocusedCell(),await this.doShowOverlay(s),await new Promise(n=>setTimeout(()=>n()));const i=Date.now();try{e()}finally{const n=Date.now()-i,r=Math.max(0,300-n),a=()=>{this.exportsInProgress--,this.exportsInProgress===0&&(this.updateOverlay(!1),BC(o,this.focusedCell),this.focusedCell=null)};r>0?setTimeout(()=>a(),r):a()}}hideOverlay(){const e=this.gos;this.showInitialOverlay=!1;const t=this.userForcedNoRows;if(this.userForcedNoRows=!1,e.get("loading")){D(99);return}if(e.get("activeOverlay")){D(296);return}if(this.currentDef===ol){D(297);return}this.doHideOverlay(),t&&this.getOverlayDef()!==ss&&this.updateOverlay(!1)}getOverlayWrapperSelector(){return _R}getOverlayWrapperCompClass(){return $h}onPropChange(e){const t=e.has("activeOverlay");if((t||e.has("loading"))&&this.updateOverlay(t))return;const o=this.currentDef,s=this.eWrapper?.activeOverlay;if(s&&o){const i=e.has("activeOverlayParams");if(o===Ni)i&&s.refresh?.(this.makeCompParams(!0));else{const n=o.paramsKey;(e.has("overlayComponentParams")||n&&e.has(n))&&s.refresh?.(this.makeCompParams(!1,n,o.overlayType))}}}updateOverlay(e){const t=this.eWrapper;if(!t)return this.currentDef=null,!1;const o=this.getDesiredDefWithOverride(),s=this.currentDef,i=o===Ni&&e;return o!==s?o?(this.doShowOverlay(o),!0):(this.disableInitialOverlay(),this.doHideOverlay()):i&&o?(t.hideOverlay(),this.doShowOverlay(o),!0):(o||this.disableInitialOverlay(),!1)}getDesiredDefWithOverride(e){const{gos:t}=this;let o=$R(t.get("activeOverlay"));return o||(o=e??this.getOverlayDef(),o&&this.isDisabled(o)&&(o=null)),o}getOverlayDef(){const{gos:e,beans:t}=this,{rowModel:o}=t,s=e.get("loading");if(s!==void 0){if(this.disableInitialOverlay(),s)return yo}else if(this.showInitialOverlay){if(!this.isDisabled(yo)&&(!e.get("columnDefs")||!e.get("rowData")))return yo;this.disableInitialOverlay()}else this.disableInitialOverlay();const n=o.getOverlayType();return KR(n)}disableInitialOverlay(){this.showInitialOverlay=!1,this.newColumnsLoadedCleanup?.(),this.newColumnsLoadedCleanup=null}doShowOverlay(e){const{gos:t,beans:o}=this,{userCompFactory:s}=o;this.currentDef=e;const i=e!==Ni,n=!!e.exclusive;this.exclusive=n;let r;(e.paramsKey&&t.get(e.paramsKey)||e.compKey&&t.get(e.compKey))&&(r=e.paramsKey);let a;i&&(t.get("overlayComponent")||t.get("overlayComponentSelector"))&&(a=s.getCompDetailsFromGridOptions({name:"overlayComponent",optionalMethods:["refresh"]},void 0,this.makeCompParams(!1,e.paramsKey,e.overlayType))),a??(a=s.getCompDetailsFromGridOptions(e.comp,i?e.id:void 0,this.makeCompParams(!i,r,e.overlayType),!1));const l=a?.newAgStackInstance()??null,c=this.eWrapper?this.eWrapper.showOverlay(l,e.wrapperCls,n):ie.resolve();return this.eWrapper?.refreshWrapperPadding(),this.setExclusive(n),c}makeCompParams(e,t,o){const{gos:s}=this,i=e?s.get("activeOverlayParams"):{...s.get("overlayComponentParams"),...t&&s.get(t)||null,overlayType:o};return K(s,i??{})}doHideOverlay(){let e=!1;this.currentDef&&(this.currentDef=null,e=!0),this.exclusive=!1;const t=this.eWrapper;return t&&(t.hideOverlay(),t.refreshWrapperPadding(),this.setExclusive(!1)),e}setExclusive(e){this.oldExclusive!==e&&(this.oldExclusive=e,this.eventSvc.dispatchEvent({type:"overlayExclusiveChanged"}))}isDisabled(e){const{gos:t}=this;return e.overlayType&&t.get("suppressOverlays")?.includes(e.overlayType)||e.isSuppressed?.(t)===!0}},jR={moduleName:"Overlay",version:I,userComponents:{agLoadingOverlay:kR,agNoRowsOverlay:HR,agNoMatchingRowsOverlay:OR,agExportingOverlay:IR},apiFunctions:{showLoadingOverlay:BR,showNoRowsOverlay:VR,hideOverlay:NR},icons:{overlayLoading:"loading",overlayExporting:"loading"},beans:[qR]},YR=class extends x{constructor(){super(...arguments),this.beanName="rowContainerHeight",this.scrollY=0,this.uiBodyHeight=0}postConstruct(){this.addManagedEventListeners({bodyHeightChanged:this.updateOffset.bind(this)}),this.maxDivHeight=sC(),Oo(this.gos,"RowContainerHeightService - maxDivHeight = "+this.maxDivHeight)}updateOffset(){if(!this.stretching)return;const e=this.beans.ctrlsSvc.getScrollFeature().getVScrollPosition().top,t=this.getUiBodyHeight();(e!==this.scrollY||t!==this.uiBodyHeight)&&(this.scrollY=e,this.uiBodyHeight=t,this.calculateOffset())}calculateOffset(){this.setUiContainerHeight(this.maxDivHeight),this.pixelsToShave=this.modelHeight-this.uiContainerHeight,this.maxScrollY=this.uiContainerHeight-this.uiBodyHeight;const e=this.scrollY/this.maxScrollY,t=e*this.pixelsToShave;Oo(this.gos,`RowContainerHeightService - Div Stretch Offset = ${t} (${this.pixelsToShave} * ${e})`),this.setDivStretchOffset(t)}setUiContainerHeight(e){e!==this.uiContainerHeight&&(this.uiContainerHeight=e,this.eventSvc.dispatchEvent({type:"rowContainerHeightChanged"}))}clearOffset(){this.setUiContainerHeight(this.modelHeight),this.pixelsToShave=0,this.setDivStretchOffset(0)}setDivStretchOffset(e){const t=typeof e=="number"?Math.floor(e):null;this.divStretchOffset!==t&&(this.divStretchOffset=t,this.eventSvc.dispatchEvent({type:"heightScaleChanged"}))}setModelHeight(e){this.modelHeight=e,this.stretching=e!=null&&this.maxDivHeight>0&&e>this.maxDivHeight,this.stretching?this.calculateOffset():this.clearOffset()}getRealPixelPosition(e){return e-this.divStretchOffset}getUiBodyHeight(){const e=this.beans.ctrlsSvc.getScrollFeature().getVScrollPosition();return e.bottom-e.top}getScrollPositionForPixel(e){if(this.pixelsToShave<=0)return e;const t=this.modelHeight-this.getUiBodyHeight(),o=e/t;return this.maxScrollY*o}},QR=400,ZR=class extends x{constructor(){super(...arguments),this.beanName="rowRenderer",this.destroyFuncsForColumnListeners=[],this.rowCtrlsByRowIndex={},this.zombieRowCtrls={},this.allRowCtrls=[],this.topRowCtrls=[],this.bottomRowCtrls=[],this.refreshInProgress=!1,this.dataFirstRenderedFired=!1,this.setupRangeSelectionListeners=()=>{const e=()=>{for(const n of this.getAllCellCtrls())n.onCellSelectionChanged()},t=()=>{for(const n of this.getAllCellCtrls())n.updateRangeBordersIfRangeCount()},o=()=>{this.eventSvc.addListener("cellSelectionChanged",e),this.eventSvc.addListener("columnMoved",t),this.eventSvc.addListener("columnPinned",t),this.eventSvc.addListener("columnVisible",t)},s=()=>{this.eventSvc.removeListener("cellSelectionChanged",e),this.eventSvc.removeListener("columnMoved",t),this.eventSvc.removeListener("columnPinned",t),this.eventSvc.removeListener("columnVisible",t)};this.addDestroyFunc(()=>s()),this.addManagedPropertyListeners(["enableRangeSelection","cellSelection"],()=>{ao(this.gos)?o():s()}),ao(this.gos)&&o()}}wireBeans(e){this.pageBounds=e.pageBounds,this.colModel=e.colModel,this.pinnedRowModel=e.pinnedRowModel,this.rowModel=e.rowModel,this.focusSvc=e.focusSvc,this.rowContainerHeight=e.rowContainerHeight,this.ctrlsSvc=e.ctrlsSvc,this.editSvc=e.editSvc}postConstruct(){this.ctrlsSvc.whenReady(this,e=>{this.gridBodyCtrl=e.gridBodyCtrl,this.initialise()})}initialise(){this.addManagedEventListeners({paginationChanged:this.onPageLoaded.bind(this),pinnedRowDataChanged:this.onPinnedRowDataChanged.bind(this),pinnedRowsChanged:this.onPinnedRowsChanged.bind(this),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this),bodyScroll:this.onBodyScroll.bind(this),bodyHeightChanged:this.redraw.bind(this,{})}),this.addManagedPropertyListeners(["domLayout","embedFullWidthRows"],()=>this.onDomLayoutChanged()),this.addManagedPropertyListeners(["suppressMaxRenderedRowRestriction","rowBuffer"],()=>this.redraw()),this.addManagedPropertyListener("suppressCellFocus",s=>this.onSuppressCellFocusChanged(s.currentValue)),this.addManagedPropertyListeners(["groupSuppressBlankHeader","getBusinessKeyForNode","fullWidthCellRenderer","fullWidthCellRendererParams","suppressStickyTotalRow","groupRowRenderer","groupRowRendererParams","loadingCellRenderer","loadingCellRendererParams","detailCellRenderer","detailCellRendererParams","enableRangeSelection","enableCellTextSelection"],()=>this.redrawRows()),this.addManagedPropertyListener("cellSelection",({currentValue:s,previousValue:i})=>{(!i&&s||i&&!s)&&this.redrawRows()});const{stickyRowSvc:e,gos:t,showRowGroupCols:o}=this.beans;if(o&&this.addManagedPropertyListener("showOpenedGroup",()=>{const s=o.columns;s.length&&this.refreshCells({columns:s,force:!0})}),e)this.stickyRowFeature=e.createStickyRowFeature(this,this.createRowCon.bind(this),this.destroyRowCtrls.bind(this));else{const s=this.gridBodyCtrl;s.setStickyTopHeight(0),s.setStickyBottomHeight(0)}this.registerCellEventListeners(),this.initialiseCache(),this.printLayout=Le(t,"print"),this.embedFullWidthRows=this.printLayout||t.get("embedFullWidthRows"),this.redrawAfterModelUpdate()}initialiseCache(){if(this.gos.get("keepDetailRows")){const e=this.getKeepDetailRowsCount(),t=e??3;this.cachedRowCtrls=new JR(t)}}getKeepDetailRowsCount(){return this.gos.get("keepDetailRowsCount")}getStickyTopRowCtrls(){return this.stickyRowFeature?.stickyTopRowCtrls??[]}getStickyBottomRowCtrls(){return this.stickyRowFeature?.stickyBottomRowCtrls??[]}updateAllRowCtrls(){const e=Object.values(this.rowCtrlsByRowIndex),t=Object.values(this.zombieRowCtrls),o=this.cachedRowCtrls?.getEntries()??[];t.length>0||o.length>0?this.allRowCtrls=[...e,...t,...o]:this.allRowCtrls=e}isCellBeingRendered(e,t){const o=this.rowCtrlsByRowIndex[e];return!t||!o?!!o:o.isFullWidth()?!0:!!this.beans.spannedRowRenderer?.getCellByPosition({rowIndex:e,column:t,rowPinned:null})||!!o.getCellCtrl(t)||!o.isRowRendered()}updateCellFocus(e){for(const t of this.getAllCellCtrls())t.onCellFocused(e);for(const t of this.getFullWidthRowCtrls())t.onFullWidthRowFocused(e)}onCellFocusChanged(e){if(e?.rowIndex!=null&&!e.rowPinned){const t=this.beans.colModel.getCol(e.column)??void 0;this.isCellBeingRendered(e.rowIndex,t)||this.redraw()}this.updateCellFocus(e)}onSuppressCellFocusChanged(e){for(const t of this.getAllCellCtrls())t.onSuppressCellFocusChanged(e);for(const t of this.getFullWidthRowCtrls())t.onSuppressCellFocusChanged(e)}registerCellEventListeners(){this.addManagedEventListeners({cellFocused:e=>this.onCellFocusChanged(e),cellFocusCleared:()=>this.updateCellFocus(),flashCells:e=>{const{cellFlashSvc:t}=this.beans;if(t)for(const o of this.getAllCellCtrls())t.onFlashCells(o,e)},columnHoverChanged:()=>{for(const e of this.getAllCellCtrls())e.onColumnHover()},displayedColumnsChanged:()=>{for(const e of this.getAllCellCtrls())e.onDisplayedColumnsChanged()},displayedColumnsWidthChanged:()=>{if(this.printLayout)for(const e of this.getAllCellCtrls())e.onLeftChanged()}}),this.setupRangeSelectionListeners(),this.refreshListenersToColumnsForCellComps(),this.addManagedEventListeners({gridColumnsChanged:this.refreshListenersToColumnsForCellComps.bind(this)}),this.addDestroyFunc(this.removeGridColumnListeners.bind(this))}removeGridColumnListeners(){for(const e of this.destroyFuncsForColumnListeners)e();this.destroyFuncsForColumnListeners.length=0}refreshListenersToColumnsForCellComps(){this.removeGridColumnListeners();const e=this.colModel.getCols();for(const t of e){const o=l=>{for(const c of this.getAllCellCtrls())c.column===t&&l(c)},s=()=>{o(l=>l.onLeftChanged())},i=()=>{o(l=>l.onWidthChanged())},n=()=>{o(l=>l.onFirstRightPinnedChanged())},r=()=>{o(l=>l.onLastLeftPinnedChanged())},a=()=>{o(l=>l.onColDefChanged())};t.__addEventListener("leftChanged",s),t.__addEventListener("widthChanged",i),t.__addEventListener("firstRightPinnedChanged",n),t.__addEventListener("lastLeftPinnedChanged",r),t.__addEventListener("colDefChanged",a),this.destroyFuncsForColumnListeners.push(()=>{t.__removeEventListener("leftChanged",s),t.__removeEventListener("widthChanged",i),t.__removeEventListener("firstRightPinnedChanged",n),t.__removeEventListener("lastLeftPinnedChanged",r),t.__removeEventListener("colDefChanged",a)})}}onDomLayoutChanged(){const e=Le(this.gos,"print"),t=e||this.gos.get("embedFullWidthRows"),o=t!==this.embedFullWidthRows||this.printLayout!==e;this.printLayout=e,this.embedFullWidthRows=t,o&&this.redrawAfterModelUpdate({domLayoutChanged:!0})}datasourceChanged(){this.firstRenderedRow=0,this.lastRenderedRow=-1;const e=Object.keys(this.rowCtrlsByRowIndex);this.removeRowCtrls(e)}onPageLoaded(e){const t={recycleRows:e.keepRenderedRows,animate:e.animate,newData:e.newData,newPage:e.newPage,onlyBody:!0};this.redrawAfterModelUpdate(t)}getAllCellsNotSpanningForColumn(e){const t=[];for(const o of this.getAllRowCtrls()){const s=o.getCellCtrl(e,!0)?.eGui;s&&t.push(s)}return t}refreshFloatingRowComps(e=!0){this.refreshFloatingRows(this.topRowCtrls,"top",e),this.refreshFloatingRows(this.bottomRowCtrls,"bottom",e)}refreshFloatingRows(e,t,o){const{pinnedRowModel:s,beans:i,printLayout:n}=this,r=Object.fromEntries(e.map(l=>[l.rowNode.id,l]));s?.forEachPinnedRow(t,(l,c)=>{const d=e[c];d&&s.getPinnedRowById(d.rowNode.id,t)===void 0&&(d.destroyFirstPass(),d.destroySecondPass()),l.id in r&&o?(e[c]=r[l.id],delete r[l.id]):e[c]=new un(l,i,!1,!1,n)});const a=(t==="top"?s?.getPinnedTopRowCount():s?.getPinnedBottomRowCount())??0;e.length=a}onPinnedRowDataChanged(){const e={recycleRows:!0};this.redrawAfterModelUpdate(e)}onPinnedRowsChanged(){this.redrawAfterModelUpdate({recycleRows:!0})}redrawRow(e,t=!1){if(e.sticky)this.stickyRowFeature?.refreshStickyNode(e);else if(this.cachedRowCtrls?.has(e)){this.cachedRowCtrls.removeRow(e);return}else{const o=s=>{const i=s[e.rowIndex];i&&i.rowNode===e&&(i.destroyFirstPass(),i.destroySecondPass(),s[e.rowIndex]=this.createRowCon(e,!1,!1))};switch(e.rowPinned){case"top":o(this.topRowCtrls);break;case"bottom":o(this.bottomRowCtrls);break;default:o(this.rowCtrlsByRowIndex),this.updateAllRowCtrls()}}t||this.dispatchDisplayedRowsChanged(!1)}redrawRows(e){const{editSvc:t}=this.beans;if(t?.isEditing()&&(t.isBatchEditing()?t.cleanupEditors():t.stopEditing(void 0,{source:"api"})),e!=null){for(const s of e??[])this.redrawRow(s,!0);this.dispatchDisplayedRowsChanged(!1);return}this.redrawAfterModelUpdate()}redrawAfterModelUpdate(e={}){this.getLockOnRefresh();const t=this.beans.focusSvc?.getFocusCellToUseAfterRefresh();this.updateContainerHeights(),this.scrollToTopIfNewData(e);const o=!e.domLayoutChanged&&!!e.recycleRows,s=e.animate&&cs(this.gos),i=o?this.getRowsToRecycle():null;o||this.removeAllRowComps(),this.workOutFirstAndLastRowsToRender();const{stickyRowFeature:n,gos:r}=this;if(n){n.checkStickyRows();const a=n.extraTopHeight+n.extraBottomHeight;a&&this.updateContainerHeights(a)}this.recycleRows(i,s),this.gridBodyCtrl.updateRowCount(),e.onlyBody||this.refreshFloatingRowComps(r.get("enableRowPinning")?o:void 0),this.dispatchDisplayedRowsChanged(),t!=null&&this.restoreFocusedCell(t),this.releaseLockOnRefresh()}scrollToTopIfNewData(e){const t=e.newData||e.newPage,o=this.gos.get("suppressScrollOnNewData");t&&!o&&(this.gridBodyCtrl.scrollFeature.scrollToTop(),this.stickyRowFeature?.resetOffsets())}updateContainerHeights(e=0){const{rowContainerHeight:t}=this;if(this.printLayout){t.setModelHeight(null);return}let o=this.pageBounds.getCurrentPageHeight();o===0&&(o=1),t.setModelHeight(o+e)}getLockOnRefresh(){if(this.refreshInProgress)throw new Error(It(252));this.refreshInProgress=!0,this.beans.frameworkOverrides.getLockOnRefresh?.()}releaseLockOnRefresh(){this.refreshInProgress=!1,this.beans.frameworkOverrides.releaseLockOnRefresh?.()}isRefreshInProgress(){return this.refreshInProgress}restoreFocusedCell(e){if(!e)return;const t=this.beans.focusSvc,o=this.findPositionToFocus(e);if(!o){t.focusHeaderPosition({headerPosition:{headerRowIndex:lt(this.beans)-1,column:e.column}});return}if(e.rowIndex!==o.rowIndex||e.rowPinned!=o.rowPinned){t.setFocusedCell({...o,preventScrollOnBrowserFocus:!0,forceBrowserFocus:!0});return}t.doesRowOrCellHaveBrowserFocus()||this.updateCellFocus(K(this.gos,{...o,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0,type:"cellFocused"}))}findPositionToFocus(e){const{pagination:t,pageBounds:o}=this.beans;let s=e;for(s.rowPinned==null&&t&&o&&!t.isRowInPage(s.rowIndex)&&(s={rowPinned:null,rowIndex:o.getFirstRow()});s;){if(s.rowPinned==null&&o)if(s.rowIndex<o.getFirstRow()){if(s=nn(this.beans,{rowPinned:null,rowIndex:0}),!s)return null}else s.rowIndex>o.getLastRow()&&(s={rowPinned:null,rowIndex:o.getLastRow()});const i=this.getRowByPosition(s);if(i?.isAlive())return{...i.getRowPosition(),column:e.column};s=nn(this.beans,s)}return null}getAllCellCtrls(){const e=[],t=this.getAllRowCtrls(),o=t.length;for(let s=0;s<o;s++){const i=t[s].getAllCellCtrls(),n=i.length;for(let r=0;r<n;r++)e.push(i[r])}return e}getAllRowCtrls(){const{spannedRowRenderer:e}=this.beans,t=this.getStickyTopRowCtrls(),o=this.getStickyBottomRowCtrls();return[...this.topRowCtrls,...this.bottomRowCtrls,...t,...o,...e?.getCtrls("top")??[],...e?.getCtrls("bottom")??[],...e?.getCtrls("center")??[],...Object.values(this.rowCtrlsByRowIndex)]}addRenderedRowListener(e,t,o){const s=this.rowCtrlsByRowIndex[t];s&&s.addEventListener(e,o)}refreshCells({rowNodes:e,columns:t,force:o,suppressFlash:s}={}){const i={force:o,newData:!1,suppressFlash:s};for(const n of this.getCellCtrls(e,t))n.refreshOrDestroyCell(i);this.refreshFullWidth(e)}refreshRows(e={}){for(const t of this.getRowCtrls(e.rowNodes))t.refreshRow(e);this.refreshFullWidth(e.rowNodes)}getRowCtrlByNode(e){const t=e.rowIndex;if(t==null)return;const o=e.rowPinned;if(o==="top"){const i=this.topRowCtrls[t];return i?.rowNode===e?i:void 0}if(o==="bottom"){const i=this.bottomRowCtrls[t];return i?.rowNode===e?i:void 0}const s=this.rowCtrlsByRowIndex[t];return s?.rowNode===e?s:this.getStickyRowCtrlByNode(e)}getStickyRowCtrlByNode(e){const t=this.stickyRowFeature;if(t){for(const o of t.stickyTopRowCtrls)if(o.rowNode===e)return o;for(const o of t.stickyBottomRowCtrls)if(o.rowNode===e)return o}}refreshRowByNode(e){e&&this.getRowCtrlByNode(e)?.refreshRow()}refreshFullWidth(e){if(!e)return;let t=!1;for(const o of this.getRowCtrls(e)){if(!o.isFullWidth())continue;o.refreshFullWidth()||(t=!0,this.redrawRow(o.rowNode,!0))}t&&this.dispatchDisplayedRowsChanged(!1)}getRowCtrls(e){const t=qr(e),o=this.getAllRowCtrls();return!e||!t?o:o.filter(s=>{const i=s.rowNode;return jr(i,t)})}getCellCtrls(e,t){let o;L(t)&&(o={},t.forEach(i=>{const n=this.colModel.getCol(i);L(n)&&(o[n.getId()]=!0)}));const s=[];for(const i of this.getRowCtrls(e))for(const n of i.getAllCellCtrls()){const r=n.column.getId();o&&!o[r]||s.push(n)}return s}destroy(){this.removeAllRowComps(!0),super.destroy()}removeAllRowComps(e=!1){const t=Object.keys(this.rowCtrlsByRowIndex);this.removeRowCtrls(t,e),this.stickyRowFeature?.destroyStickyCtrls()}getRowsToRecycle(){const e=[];for(const o of Object.keys(this.rowCtrlsByRowIndex))this.rowCtrlsByRowIndex[o].rowNode.id==null&&e.push(o);this.removeRowCtrls(e);const t={};for(const o of Object.values(this.rowCtrlsByRowIndex)){const s=o.rowNode;t[s.id]=o}return this.rowCtrlsByRowIndex={},t}removeRowCtrls(e,t=!1){for(const o of e){const s=this.rowCtrlsByRowIndex[o];s&&(s.destroyFirstPass(t),s.destroySecondPass()),delete this.rowCtrlsByRowIndex[o]}}onBodyScroll(e){e.direction==="vertical"&&this.redraw({afterScroll:!0})}redraw(e={}){const{focusSvc:t,animationFrameSvc:o}=this.beans,{afterScroll:s}=e;let i;const n=this.stickyRowFeature;n&&(i=t?.getFocusCellToUseAfterRefresh()||void 0);const r=this.firstRenderedRow,a=this.lastRenderedRow;this.workOutFirstAndLastRowsToRender();let l=!1;if(n){l=n.checkStickyRows();const d=n.extraTopHeight+n.extraBottomHeight;d&&this.updateContainerHeights(d)}const c=this.firstRenderedRow!==r||this.lastRenderedRow!==a;if(!(s&&!l&&!c)&&(this.getLockOnRefresh(),this.recycleRows(null,!1,s),this.releaseLockOnRefresh(),this.dispatchDisplayedRowsChanged(s&&!l),i!=null)){const d=t?.getFocusCellToUseAfterRefresh();i!=null&&d==null&&(o?.flushAllFrames(),this.restoreFocusedCell(i))}}removeRowCompsNotToDraw(e,t){const o={};for(const n of e)o[n]=!0;const i=Object.keys(this.rowCtrlsByRowIndex).filter(n=>!o[n]);this.removeRowCtrls(i,t)}calculateIndexesToDraw(e){const t=[];for(let r=this.firstRenderedRow;r<=this.lastRenderedRow;r++)t.push(r);const o=this.beans.pagination,s=this.beans.focusSvc?.getFocusedCell()?.rowIndex;s!=null&&(s<this.firstRenderedRow||s>this.lastRenderedRow)&&(!o||o.isRowInPage(s))&&s<this.rowModel.getRowCount()&&t.push(s);const i=r=>{const a=r.rowNode.rowIndex;a==null||a===s||(a<this.firstRenderedRow||a>this.lastRenderedRow)&&this.doNotUnVirtualiseRow(r)&&t.push(a)};for(const r of Object.values(this.rowCtrlsByRowIndex))i(r);if(e)for(const r of Object.values(e))i(r);t.sort((r,a)=>r-a);const n=[];for(let r=0;r<t.length;r++){const a=t[r],l=this.rowModel.getRow(a);l&&!l.sticky&&n.push(a)}return n}recycleRows(e,t=!1,o=!1){const s=this.calculateIndexesToDraw(e);(this.printLayout||o)&&(t=!1),this.removeRowCompsNotToDraw(s,!t);for(const i of s)this.createOrUpdateRowCtrl(i,e,t,o);if(e){const{animationFrameSvc:i}=this.beans;i?.active&&o&&!this.printLayout?i.addDestroyTask(()=>{this.destroyRowCtrls(e,t),this.updateAllRowCtrls(),this.dispatchDisplayedRowsChanged()}):this.destroyRowCtrls(e,t)}this.updateAllRowCtrls()}dispatchDisplayedRowsChanged(e=!1){this.eventSvc.dispatchEvent({type:"displayedRowsChanged",afterScroll:e})}onDisplayedColumnsChanged(){const{visibleCols:e}=this.beans,t=e.isPinningLeft(),o=e.isPinningRight();(this.pinningLeft!==t||o!==this.pinningRight)&&(this.pinningLeft=t,this.pinningRight=o,this.embedFullWidthRows&&this.redrawFullWidthEmbeddedRows())}redrawFullWidthEmbeddedRows(){const e=[];for(const t of this.getFullWidthRowCtrls()){const o=t.rowNode.rowIndex;e.push(o.toString())}this.refreshFloatingRowComps(),this.removeRowCtrls(e),this.redraw({afterScroll:!0})}getFullWidthRowCtrls(e){const t=qr(e);return this.getAllRowCtrls().filter(o=>{if(!o.isFullWidth())return!1;const s=o.rowNode;return!(t!=null&&!jr(s,t))})}createOrUpdateRowCtrl(e,t,o,s){let i,n=this.rowCtrlsByRowIndex[e];if(n||(i=this.rowModel.getRow(e),L(i)&&L(t)&&t[i.id]&&i.alreadyRendered&&(n=t[i.id],t[i.id]=null)),!n)if(i||(i=this.rowModel.getRow(e)),L(i))n=this.createRowCon(i,o,s);else return;i&&(i.alreadyRendered=!0),this.rowCtrlsByRowIndex[e]=n}destroyRowCtrls(e,t){const o=[];if(e){for(const s of Object.values(e))if(s){if(this.cachedRowCtrls&&s.isCacheable()){this.cachedRowCtrls.addRow(s);continue}if(s.destroyFirstPass(!t),t){const i=s.instanceId;this.zombieRowCtrls[i]=s,o.push(()=>{s.destroySecondPass(),delete this.zombieRowCtrls[i]})}else s.destroySecondPass()}}t&&(o.push(()=>{this.isAlive()&&(this.updateAllRowCtrls(),this.dispatchDisplayedRowsChanged())}),window.setTimeout(()=>{for(const s of o)s()},QR))}getRowBuffer(){return this.gos.get("rowBuffer")}getRowBufferInPixels(){const e=this.getRowBuffer(),t=Do(this.beans);return e*t}workOutFirstAndLastRowsToRender(){const{rowContainerHeight:e,pageBounds:t,rowModel:o}=this;e.updateOffset();let s,i;if(!o.isRowsToRender())s=0,i=-1;else if(this.printLayout)this.beans.environment.refreshRowHeightVariable(),s=t.getFirstRow(),i=t.getLastRow();else{const d=this.getRowBufferInPixels(),u=this.ctrlsSvc.getScrollFeature(),h=this.gos.get("suppressRowVirtualisation");let g=!1,f,m;do{const y=t.getPixelOffset(),{pageFirstPixel:S,pageLastPixel:F}=t.getCurrentPagePixelRange(),E=e.divStretchOffset,G=u.getVScrollPosition(),k=G.top,O=G.bottom;h?(f=S+E,m=F+E):(f=Math.max(k+y-d,S)+E,m=Math.min(O+y+d,F)+E),this.firstVisibleVPixel=Math.max(k+y,S)+E,this.lastVisibleVPixel=Math.min(O+y,F)+E,g=this.ensureAllRowsInRangeHaveHeightsCalculated(f,m)}while(g);let C=o.getRowIndexAtPixel(f),v=o.getRowIndexAtPixel(m);const w=t.getFirstRow(),b=t.getLastRow();C<w&&(C=w),v>b&&(v=b),s=C,i=v}const n=Le(this.gos,"normal"),r=this.gos.get("suppressMaxRenderedRowRestriction"),a=Math.max(this.getRowBuffer(),500);n&&!r&&i-s>a&&(i=s+a);const l=s!==this.firstRenderedRow,c=i!==this.lastRenderedRow;(l||c)&&(this.firstRenderedRow=s,this.lastRenderedRow=i,this.eventSvc.dispatchEvent({type:"viewportChanged",firstRow:s,lastRow:i}))}dispatchFirstDataRenderedEvent(){this.dataFirstRenderedFired||(this.dataFirstRenderedFired=!0,qt(this.beans,()=>{this.beans.eventSvc.dispatchEvent({type:"firstDataRendered",firstRow:this.firstRenderedRow,lastRow:this.lastRenderedRow})}))}ensureAllRowsInRangeHaveHeightsCalculated(e,t){const o=this.pinnedRowModel?.ensureRowHeightsValid(),s=this.stickyRowFeature?.ensureRowHeightsValid(),{pageBounds:i,rowModel:n}=this,r=n.ensureRowHeightsValid(e,t,i.getFirstRow(),i.getLastRow());return(r||s)&&this.eventSvc.dispatchEvent({type:"recalculateRowBounds"}),s||r||o?(this.updateContainerHeights(),!0):!1}doNotUnVirtualiseRow(e){const s=e.rowNode,i=this.focusSvc.isRowFocused(s.rowIndex,s.rowPinned),n=this.editSvc?.isEditing(e),r=s.detail;return i||n||r?!!this.isRowPresent(s):!1}isRowPresent(e){return this.rowModel.isRowPresent(e)?this.beans.pagination?.isRowInPage(e.rowIndex)??!0:!1}createRowCon(e,t,o){const s=this.cachedRowCtrls?.getRow(e)??null;if(s)return s;const i=o&&!this.printLayout&&!!this.beans.animationFrameSvc?.active;return new un(e,this.beans,t,i,this.printLayout)}getRenderedNodes(){const e=Object.values(this.rowCtrlsByRowIndex).map(s=>s.rowNode),t=this.getStickyTopRowCtrls().map(s=>s.rowNode),o=this.getStickyBottomRowCtrls().map(s=>s.rowNode);return[...t,...e,...o]}getRowByPosition(e){let t;const{rowIndex:o}=e;switch(e.rowPinned){case"top":t=this.topRowCtrls[o];break;case"bottom":t=this.bottomRowCtrls[o];break;default:t=this.rowCtrlsByRowIndex[o],t||(t=this.getStickyTopRowCtrls().find(s=>s.rowNode.rowIndex===o)||null,t||(t=this.getStickyBottomRowCtrls().find(s=>s.rowNode.rowIndex===o)||null));break}return t}isRangeInRenderedViewport(e,t){if(e==null||t==null)return!1;const s=e>this.lastRenderedRow;return!(t<this.firstRenderedRow)&&!s}},JR=class{constructor(e){this.entriesMap={},this.entriesList=[],this.maxCount=e}addRow(e){if(this.entriesMap[e.rowNode.id]=e,this.entriesList.push(e),e.setCached(!0),this.entriesList.length>this.maxCount){const t=this.entriesList[0];t.destroyFirstPass(),t.destroySecondPass(),this.removeFromCache(t)}}getRow(e){if(e?.id==null)return null;const t=this.entriesMap[e.id];return t?(this.removeFromCache(t),t.setCached(!1),t.rowNode!=e?null:t):null}has(e){return this.entriesMap[e.id]!=null}removeRow(e){const t=e.id,o=this.entriesMap[t];delete this.entriesMap[t],At(this.entriesList,o)}removeFromCache(e){const t=e.rowNode.id;delete this.entriesMap[t],At(this.entriesList,e)}getEntries(){return this.entriesList}};function qr(e){if(!e)return;const t={top:{},bottom:{},normal:{}};for(const o of e){const s=o.id;switch(o.rowPinned){case"top":t.top[s]=o;break;case"bottom":t.bottom[s]=o;break;default:t.normal[s]=o;break}}return t}function jr(e,t){const o=e.id;switch(e.rowPinned){case"top":return t.top[o]!=null;case"bottom":return t.bottom[o]!=null;default:return t.normal[o]!=null}}var XR=class extends x{constructor(){super(...arguments),this.beanName="rowNodeSorter",this.accentedSort=!1,this.primaryColumnsSortGroups=!1,this.pivotActive=!1}postConstruct(){this.firstLeaf=Se(this.gos)?ln:e1,this.addManagedPropertyListeners(["accentedSort","autoGroupColumnDef","treeData"],this.updateOptions.bind(this));const e=this.updatePivotModeState.bind(this);this.addManagedEventListeners({columnPivotModeChanged:e,columnPivotChanged:e}),this.updateOptions(),e()}updateOptions(){this.accentedSort=!!this.gos.get("accentedSort"),this.primaryColumnsSortGroups=Bt(this.gos)}updatePivotModeState(){this.pivotActive=this.beans.colModel.isPivotActive()}doFullSortInPlace(e,t){return e.sort((o,s)=>this.compareRowNodes(t,o,s))}compareRowNodes(e,t,o){if(t===o)return 0;const s=this.accentedSort;for(let i=0,n=e.length;i<n;++i){const r=e[i],a=r.sort==="desc";let l=this.getValue(t,r.column),c=this.getValue(o,r.column),d;const u=this.getComparator(r,t);if(u?d=u(l,c,t,o,a):(r.type==="absolute"&&(l=Ac(l),c=Ac(c)),d=Rp(l,c,s)),d)return r.sort==="asc"?d:-d}return 0}getComparator(e,t){const o=e.column.getColDef(),s=this.getComparatorFromColDef(o,e);if(s)return s;if(!o.showRowGroup)return;const i=!t.group&&o.field;if(!i)return;const n=this.beans.colModel.getColDefCol(i);if(n)return this.getComparatorFromColDef(n.getColDef(),e)}getComparatorFromColDef(e,t){const o=e.comparator;if(o!=null)return typeof o=="object"?o[Ut(t.type)]:o}getValue(e,t){const o=this.beans;if(this.primaryColumnsSortGroups){if(e.rowGroupColumn===t)return this.getGroupDataValue(e,t);if(e.group&&t.getColDef().showRowGroup)return}const s=o.valueSvc.getValue(t,e,"data");if(t.isAllowFormula()){const i=o.formula;if(i?.isFormula(s))return i.resolveValue(t,e)}return s}getGroupDataValue(e,t){if(nu(this.gos,this.pivotActive)){const s=this.firstLeaf(e);return s&&this.beans.valueSvc.getValue(t,s,"data")}const o=this.beans.showRowGroupCols?.getShowRowGroupCol(t.getId());return o?e.groupData?.[o.getId()]:void 0}},e1=e=>{if(e.data)return e;let t=e.childrenAfterGroup;for(;t?.length;){const o=t[0];if(o.data)return o;t=o.childrenAfterGroup}},Ac=e=>{if(!e)return e;if(typeof e=="bigint")return e<0n?-e:e;const t=Number(e);return isNaN(t)?e:Math.abs(t)};function t1(e){e.sortSvc?.onSortChanged("api")}var vo=(e,t)=>({tag:"span",ref:`eSort${e}`,cls:`ag-sort-indicator-icon ag-sort-${t} ag-hidden`,attrs:{"aria-hidden":"true"}}),o1={tag:"span",cls:"ag-sort-indicator-container",children:[vo("Order","order"),vo("Asc","ascending-icon"),vo("Desc","descending-icon"),vo("Mixed","mixed-icon"),vo("AbsoluteAsc","absolute-ascending-icon"),vo("AbsoluteDesc","absolute-descending-icon"),vo("None","none-icon")]},sl=class extends ye{constructor(e){super(),this.eSortOrder=W,this.eSortAsc=W,this.eSortDesc=W,this.eSortMixed=W,this.eSortNone=W,this.eSortAbsoluteAsc=W,this.eSortAbsoluteDesc=W,e||this.setTemplate(o1)}attachCustomElements(e,t,o,s,i,n,r){this.eSortOrder=e,this.eSortAsc=t,this.eSortDesc=o,this.eSortMixed=s,this.eSortNone=i,this.eSortAbsoluteAsc=n,this.eSortAbsoluteDesc=r}setupSort(e,t=!1,o){if(this.column=e,this.suppressOrder=t,this.getSortDefOverride=o,this.setupMultiSortIndicator(),!e.isSortable()&&!e.getColDef().showRowGroup)return;this.addInIcon("sortAscending",this.eSortAsc,e),this.addInIcon("sortDescending",this.eSortDesc,e),this.addInIcon("sortUnSort",this.eSortNone,e),this.addInIcon("sortAbsoluteAscending",this.eSortAbsoluteAsc,e),this.addInIcon("sortAbsoluteDescending",this.eSortAbsoluteDesc,e);const s=this.updateIcons.bind(this),i=this.onSortChanged.bind(this);this.addManagedPropertyListener("unSortIcon",s),this.addManagedEventListeners({newColumnsLoaded:s,sortChanged:i,columnRowGroupChanged:i}),this.onSortChanged()}addInIcon(e,t,o){if(t==null)return;const s=Je(e,this.beans,o);s&&t.appendChild(s)}onSortChanged(){this.updateIcons(),this.suppressOrder||this.updateSortOrder()}updateIcons(){const{eSortAsc:e,eSortDesc:t,eSortAbsoluteAsc:o,eSortAbsoluteDesc:s,eSortNone:i,column:n,gos:r,beans:a}=this,l=Zf(n,a,this.getSortDefOverride),c=l.isDefaultSortAllowed,d=l.isAbsoluteSortAllowed,{isAbsoluteSort:u,isDefaultSort:h,isAscending:g,isDescending:f,direction:m}=l;if(e&&fe(e,g&&h&&c,{skipAriaHidden:!0}),t&&fe(t,f&&h&&c,{skipAriaHidden:!0}),i){const C=!n.getColDef().unSortIcon&&!r.get("unSortIcon");fe(i,!C&&!m,{skipAriaHidden:!0})}o&&fe(o,g&&u&&d,{skipAriaHidden:!0}),s&&fe(s,f&&u&&d,{skipAriaHidden:!0})}setupMultiSortIndicator(){const{eSortMixed:e,column:t,gos:o}=this;this.addInIcon("sortUnSort",e,t);const s=t.getColDef().showRowGroup;Bt(o)&&s&&(this.addManagedEventListeners({sortChanged:this.updateMultiSortIndicator.bind(this),columnRowGroupChanged:this.updateMultiSortIndicator.bind(this)}),this.updateMultiSortIndicator())}updateMultiSortIndicator(){const{eSortMixed:e,beans:t,column:o}=this;if(e){const s=t.sortSvc.getDisplaySortForColumn(o)?.direction==="mixed";fe(e,s,{skipAriaHidden:!0})}}updateSortOrder(){const{eSortOrder:e,column:t,beans:{sortSvc:o}}=this;if(!e)return;const s=o.getColumnsWithSortingOrdered(),i=o.getDisplaySortIndexForColumn(t)??-1,n=s.some(a=>o.getDisplaySortIndexForColumn(a)??!1),r=i>=0&&n;fe(e,r,{skipAriaHidden:!0}),i>=0?e.textContent=(i+1).toString():Xe(e)}refresh(){this.onSortChanged()}},s1={selector:"AG-SORT-INDICATOR",component:sl},i1=class extends x{constructor(){super(...arguments),this.beanName="sortSvc"}progressSort(e,t,o){const s=this.getNextSortDirection(e);this.setSortForColumn(e,s,t,o)}progressSortFromEvent(e,t){const s=this.gos.get("multiSortKey")==="ctrl"?t.ctrlKey||t.metaKey:t.shiftKey;this.progressSort(e,s,"uiColumnSorted")}setSortForColumn(e,t,o,s){const{gos:i,showRowGroupCols:n}=this.beans,r=Bt(i);let a=[e];if(r&&e.getColDef().showRowGroup){const u=n?.getSourceColumnsForGroupColumn?.(e)?.filter(h=>h.isSortable());u&&(a=[e,...u])}for(const d of a)this.setColSort(d,t,s);const l=(o||i.get("alwaysMultiSort"))&&!i.get("suppressMultiSort"),c=[];if(!l){const d=this.clearSortBarTheseColumns(a,s);c.push(...d)}this.updateSortIndex(e),c.push(...a),this.dispatchSortChangedEvents(s,c)}updateSortIndex(e){const{gos:t,colModel:o,showRowGroupCols:s}=this.beans,i=Bt(t),n=s?.getShowRowGroupCol(e.getId()),r=i&&n||e,a=this.getColumnsWithSortingOrdered();o.forAllCols(d=>this.setColSortIndex(d,null));const l=a.filter(d=>i&&d.getColDef().showRowGroup?!1:d!==r);(r.getSortDef()?[...l,r]:l).forEach((d,u)=>this.setColSortIndex(d,u))}onSortChanged(e,t){this.dispatchSortChangedEvents(e,t)}isSortActive(){let e=!1;return this.beans.colModel.forAllCols(t=>{if(t.getSortDef())return e=!0,!0}),e}dispatchSortChangedEvents(e,t){const o={type:"sortChanged",source:e};t&&(o.columns=t),this.eventSvc.dispatchEvent(o)}clearSortBarTheseColumns(e,t){const o=[];return this.beans.colModel.forAllCols(s=>{e.includes(s)||(s.getSortDef()&&o.push(s),this.setColSort(s,void 0,t))}),o}getNextSortDirection(e,t){const o=e.getSortingOrder(),s=t===void 0?e.getSortDef():ct(t);let n=o.findIndex(r=>ki(r,s))+1;return n>=o.length&&(n=0),ct(o[n])}getIndexedSortMap(){const{gos:e,colModel:t,showRowGroupCols:o,rowGroupColsSvc:s}=this.beans;let i=[];if(t.forAllCols(c=>{c.getSortDef()&&i.push(c)}),t.isPivotMode()){const c=Bt(e);i=i.filter(d=>{const u=!!d.getAggFunc(),h=!d.isPrimary(),g=c?o?.getShowRowGroupCol(d.getId()):d.getColDef().showRowGroup;return u||h||g})}const n=s?.columns.filter(c=>!!c.getSortDef())??[],r={};i.forEach((c,d)=>r[c.getId()]=d),i.sort((c,d)=>{const u=c.getSortIndex(),h=d.getSortIndex();if(u!=null&&h!=null)return u-h;if(u==null&&h==null){const g=r[c.getId()],f=r[d.getId()];return g>f?1:-1}else return h==null?-1:1});const a=Bt(e)&&!!n.length;a&&(i=[...new Set(i.map(c=>o?.getShowRowGroupCol(c.getId())??c))]);const l=new Map;if(i.forEach((c,d)=>l.set(c,d)),a)for(const c of n){const d=o.getShowRowGroupCol(c.getId());l.set(c,l.get(d))}return l}getColumnsWithSortingOrdered(){return[...this.getIndexedSortMap().entries()].sort(([,e],[,t])=>e-t).map(([e])=>e)}collectSortItems(e=!1){const t=[],o=this.getColumnsWithSortingOrdered();for(const s of o){const i=s.getSortDef()?.direction;if(!i)continue;const n=Ut(s.getSortDef()?.type),r={sort:i,type:n};e?r.colId=s.getId():r.column=s,t.push(r)}return t}getSortModel(){return this.collectSortItems(!0)}getSortOptions(){return this.collectSortItems()}canColumnDisplayMixedSort(e){const t=Bt(this.gos),o=!!e.getColDef().showRowGroup;return t&&o}getDisplaySortForColumn(e){const t=this.beans.showRowGroupCols?.getSourceColumnsForGroupColumn(e);if(!this.canColumnDisplayMixedSort(e)||!t?.length)return e.getSortDef();const s=e.getColDef().field!=null||!!e.getColDef().valueGetter?[e,...t]:t,i=s[0].getSortDef();return s.every(r=>ki(r.getSortDef(),i))?i:{type:Ut(e.getSortDef()?.type),direction:"mixed"}}getDisplaySortIndexForColumn(e){return this.getIndexedSortMap().get(e)}setupHeader(e,t){const o=()=>{const{type:s,direction:i}=ct(t.getSortDef());if(e.toggleCss("ag-header-cell-sorted-asc",i==="asc"),e.toggleCss("ag-header-cell-sorted-desc",i==="desc"),e.toggleCss("ag-header-cell-sorted-abs-asc",s==="absolute"&&i==="asc"),e.toggleCss("ag-header-cell-sorted-abs-desc",s==="absolute"&&i==="desc"),e.toggleCss("ag-header-cell-sorted-none",!i),t.getColDef().showRowGroup){const a=!this.beans.showRowGroupCols?.getSourceColumnsForGroupColumn(t)?.every(l=>i==l.getSortDef()?.direction);e.toggleCss("ag-header-cell-sorted-mixed",a)}};e.addManagedEventListeners({sortChanged:o,columnPinned:o,columnRowGroupChanged:o,displayedColumnsChanged:o})}initCol(e){const{sortIndex:t,initialSortIndex:o}=e.colDef,s=gu(e.colDef);s&&e.setSortDef(s,!0),t!==void 0?t!==null&&(e.sortIndex=t):o!==null&&(e.sortIndex=o)}updateColSort(e,t,o){t!==void 0&&this.setColSort(e,ct(t),o)}setColSort(e,t,o){ki(e.getSortDef(),t)||(e.setSortDef(ct(t),t===void 0),e.dispatchColEvent("sortChanged",o)),e.dispatchStateUpdatedEvent("sort")}setColSortIndex(e,t){e.sortIndex=t,e.dispatchStateUpdatedEvent("sortIndex")}createSortIndicator(e){return new sl(e)}getSortIndicatorSelector(){return s1}},Kh={moduleName:"Sort",version:I,beans:[i1,XR],apiFunctions:{onSortChanged:t1},userComponents:{agSortIndicator:sl},icons:{sortAscending:"asc",sortDescending:"desc",sortUnSort:"none",sortAbsoluteAscending:"aasc",sortAbsoluteDescending:"adesc"}},n1=class extends x{constructor(){super(...arguments),this.beanName="syncSvc",this.waitingForColumns=!1}postConstruct(){this.addManagedPropertyListener("columnDefs",e=>this.setColumnDefs(e))}start(){this.beans.ctrlsSvc.whenReady(this,()=>{const e=this.gos.get("columnDefs");e?this.setColumnsAndData(e):this.waitingForColumns=!0,this.gridReady()})}setColumnsAndData(e){const{colModel:t,rowModel:o}=this.beans;t.setColumnDefs(e??[],"gridInitializing"),o.start()}gridReady(){const{eventSvc:e,gos:t}=this;e.dispatchEvent({type:"gridReady"}),Oo(t,`initialised successfully, enterprise = ${t.isModuleRegistered("EnterpriseCore")}`)}setColumnDefs(e){const t=this.gos.get("columnDefs");if(t){if(this.waitingForColumns){this.waitingForColumns=!1,this.setColumnsAndData(t);return}this.beans.colModel.setColumnDefs(t,gs(e.source))}}};function r1(e){e.valueCache?.expire()}function a1(e,t){const{colKey:o,rowNode:s,useFormatter:i,from:n="edit"}=t,r=e.colModel.getColDefCol(o)??e.colModel.getCol(o);if(!r)return null;const a=e.valueSvc.getValueForDisplay({column:r,node:s,includeValueFormatted:i,from:n});return i?a.valueFormatted??Es(a.value):a.value}var l1="paste",c1=class extends x{constructor(){super(...arguments),this.beanName="changeDetectionSvc",this.deferredDepth=0,this.batchedPath=null,this.batchedNodes=null}destroy(){super.destroy(),this.batchedPath=null,this.batchedNodes=null}postConstruct(){this.csrm=Ot(this.beans),this.addManagedEventListeners({cellValueChanged:this.onCellValueChanged.bind(this)})}beginDeferred(){this.deferredDepth++}endDeferred(){if(this.deferredDepth===0||--this.deferredDepth>0)return;const e=this.batchedPath,t=this.batchedNodes;this.batchedPath=null,this.batchedNodes=null,e&&this.csrm?.doAggregate(e);const{rowRenderer:o}=this.beans;if(t)for(const s of t)kc(o,s);if(e){const s=e.getSortedRows();for(let i=0,n=s.length;i<n;++i)kc(o,s[i])}(this.batchedPath||this.batchedNodes)&&(this.deferredDepth=1,this.endDeferred())}onCellValueChanged(e){const{gos:t,rowModel:o,changedPathFactory:s}=this.beans;if(e.source===l1||t.get("suppressChangeDetection")||!o.rootNode)return;const i=e.node.primaryRow;if(this.csrm){let n=this.batchedPath;n||(n=s?.newPath(t.get("aggregateOnlyChangedColumns"))??null,this.batchedPath=n);let r=i;i.group||((this.batchedNodes??(this.batchedNodes=new Set)).add(i),r=i.parent),n?.addCell(r,e.column.getColId())}else(this.batchedNodes??(this.batchedNodes=new Set)).add(i);this.deferredDepth===0&&(this.deferredDepth=1,this.endDeferred())}},kc=(e,t)=>{const{sibling:o,pinnedSibling:s}=t;e.refreshRowByNode(t),e.refreshRowByNode(o),e.refreshRowByNode(s),e.refreshRowByNode(o?.pinnedSibling),e.refreshRowByNode(s?.sibling)},d1=class extends x{constructor(){super(...arguments),this.beanName="expressionSvc",this.cache={}}evaluate(e,t){if(typeof e=="string")return this.evaluateExpression(e,t);ce(15,{expression:e})}evaluateExpression(e,t){try{return this.createExpressionFunction(e)(t.value,t.context,t.oldValue,t.newValue,t.value,t.node,t.data,t.colDef,t.rowIndex,t.api,t.getValue,t.column,t.columnGroup)}catch(o){return ce(16,{expression:e,params:t,e:o}),null}}createExpressionFunction(e){const t=this.cache;if(t[e])return t[e];const o=this.createFunctionBody(e),s=new Function("x, ctx, oldValue, newValue, value, node, data, colDef, rowIndex, api, getValue, column, columnGroup",o);return t[e]=s,s}createFunctionBody(e){return e.includes("return")?e:"return "+e+";"}},u1=class extends x{constructor(){super(...arguments),this.beanName="valueCache",this.cacheVersion=0}postConstruct(){const e=this.gos;this.active=e.get("valueCache"),this.neverExpires=e.get("valueCacheNeverExpires")}onDataChanged(){this.neverExpires||this.expire()}expire(){this.cacheVersion++}setValue(e,t,o){if(this.active){const s=this.cacheVersion;e.__cacheVersion!==s&&(e.__cacheVersion=s,e.__cacheData={}),e.__cacheData[t]=o}}getValue(e,t){if(!(!this.active||e.__cacheVersion!==this.cacheVersion))return e.__cacheData[t]}},h1={moduleName:"ValueCache",version:I,beans:[u1],apiFunctions:{expireValueCache:r1}},g1={moduleName:"Expression",version:I,beans:[d1]},p1={moduleName:"ChangeDetection",version:I,beans:[c1]},f1={moduleName:"CellApi",version:I,apiFunctions:{getCellValue:a1}},m1=class extends x{constructor(){super(...arguments),this.beanName="valueSvc",this.initialised=!1,this.isSsrm=!1}wireBeans(e){this.expressionSvc=e.expressionSvc,this.colModel=e.colModel,this.valueCache=e.valueCache,this.dataTypeSvc=e.dataTypeSvc,this.editSvc=e.editSvc,this.formulaDataSvc=e.formulaDataSvc,this.rowGroupColsSvc=e.rowGroupColsSvc}postConstruct(){this.initialised||this.init()}init(){const{gos:e,valueCache:t}=this;this.executeValueGetter=t?this.executeValueGetterWithValueCache.bind(this):this.executeValueGetterWithoutValueCache.bind(this),this.isSsrm=xs(e),this.cellExpressions=e.get("enableCellExpressions"),this.isTreeData=e.get("treeData"),this.initialised=!0;const o=s=>this.callColumnCellValueChangedHandler(s);this.eventSvc.addListener("cellValueChanged",o,!0),this.addDestroyFunc(()=>this.eventSvc.removeListener("cellValueChanged",o,!0)),this.addManagedPropertyListener("treeData",s=>this.isTreeData=s.currentValue)}getValueForDisplay(e){const t=this.beans,o=e.column,s=e.node,i=t.showRowGroupColValueSvc,n=!o&&s.group,r=o?.colDef.showRowGroup,a=!this.isTreeData||s.footer;if(i&&a&&(n||r)){const h=i.getGroupValue(s,o,this.displayIgnoresAggData(s));return h==null?{value:null,valueFormatted:null}:{value:h.value,valueFormatted:e.includeValueFormatted?i.formatAndPrefixGroupColValue(h,o,e.exporting):null}}if(!o)return{value:s.key,valueFormatted:null};let l=this.getValue(o,s,e.from,this.displayIgnoresAggData(s)),c=l;const d=t.formula;o.isAllowFormula()&&d?.isFormula(l)&&(e.useRawFormula?(l=d.normaliseFormula(l,!0),c=d.resolveValue(o,s)):(l=d.resolveValue(o,s),c=l));const u=e.includeValueFormatted&&!(e.exporting&&o.colDef.useValueFormatterForExport===!1);return{value:l,valueFormatted:u?this.formatValue(o,s,c):null}}getValue(e,t,o,s=!1){if(this.initialised||this.init(),!t)return;const i=e.colDef,n=t.group;if(!n){const l=i.pivotValueColumn;l&&(e=l)}const r=this.editSvc?.getPendingEditValue(t,e,o);if(r!==void 0)return r;let a=this.resolveValue(e,t,s,n);if(a===void 0){if(n){const l=i.showRowGroup;if(typeof l=="string"){const c=this.rowGroupColsSvc?.getColumnIndex(l);if(c!=null&&c>t.level)return null}}return}if(this.cellExpressions&&Dl(a)){const l=a.substring(1);a=this.executeValueGetter(l,t.data,e,t)}return a}displayIgnoresAggData(e){return!e.group||e.footer||e.level===-1||!e.sibling||this.gos.get("groupSuppressBlankHeader")||e.leafGroup&&this.colModel.isPivotMode()?!1:!!e.expanded}resolveValue(e,t,o,s){const i=e.colDef,n=e.colId,r=!s&&this.formulaDataSvc;if(r&&r.hasDataSource()&&i.allowFormula===!0){const w=r.getFormula({column:e,rowNode:t});if(Dl(w))return w}const a=s&&!o?t.aggData:void 0,l=this.isTreeData;if(l&&a?.[n]!==void 0)return a[n];const c=t.data,d=i.field,u=i.valueGetter;if(l){if(u)return this.executeValueGetter(u,c,e,t);if(d&&c)return _s(c,d,e.isFieldContainsDots())}const h=t.groupData;if(h&&n in h)return h[n];if(a?.[n]!==void 0)return a[n];const g=i.showRowGroup,f=typeof g!="string"||!s,m=this.isSsrm,C=m&&o&&!!i.aggFunc;if(u&&!C)return f?this.executeValueGetter(u,c,e,t):void 0;if(m&&t.footer&&t.field&&(g===!0||g===t.field))return _s(c,t.field,e.isFieldContainsDots());if(d&&c&&!C)return f?_s(c,d,e.isFieldContainsDots()):void 0}parseValue(e,t,o,s){const i=e.getColDef();if(i.allowFormula&&this.beans.formula?.isFormula(o))return o;const n=i.valueParser;if(L(n)){const r=K(this.gos,{node:t,data:t?.data,oldValue:s,newValue:o,colDef:i,column:e});return typeof n=="function"?n(r):this.expressionSvc?.evaluate(n,r)}return o}getDeleteValue(e,t){return L(e.getColDef().valueParser)?this.parseValue(e,t,"",this.getValueForDisplay({column:e,node:t,from:"edit"}).value)??null:null}formatValue(e,t,o,s,i=!0){const{expressionSvc:n}=this.beans;let r=null,a;const l=e.getColDef();if(s?a=s:i&&(a=l.valueFormatter),a){const c=t?t.data:null,d=K(this.gos,{value:o,node:t,data:c,colDef:l,column:e});typeof a=="function"?r=a(d):r=n?n.evaluate(a,d):null}else if(l.refData)return l.refData[o]||"";return r==null&&Array.isArray(o)&&(r=o.join(", ")),r}setValue(e,t,o,s){const i=t.getColDef();if(!e.data&&this.canCreateRowNodeData(e,i)&&(e.data={}),!this.isSetValueSupported(t,e,o,i))return!1;const n=this.getValue(t,e,"data"),r=K(this.gos,{node:e,data:e.data,oldValue:n,newValue:o,colDef:i,column:t});let a=!1;if(e.data){const c=this.handleExternalFormulaChange({column:t,eventSource:s,newValue:o,setterParams:r,rowNode:e});if(c!==null)return c;a=this.computeValueChange({column:t,rowNode:e,newValue:o,params:r,rowData:e.data,valueSetter:i.valueSetter,field:i.field})??!0}const l=this.beans.changeDetectionSvc;l?.beginDeferred();try{if(e.group){const c=this.beans.rowGroupingEditValueSvc?.setGroupDataValue(e,t,o,n,s,a||o!==n);if(c!==void 0)return!a&&!c?!1:this.finishValueChange(e,t,r,s,o)}return a?this.finishValueChange(e,t,r,s):!1}finally{l?.endDeferred()}}canCreateRowNodeData(e,t){return e.group?!(t.groupRowValueSetter!=null||t.groupRowEditable!=null||t.pivotValueColumn):!0}finishValueChange(e,t,o,s,i){e.resetQuickFilterAggregateText(),this.valueCache?.onDataChanged();const n=i===void 0?this.getValue(t,e,"data"):i;return this.dispatchCellValueChangedEvent(e,o,n,s),e.pinnedSibling&&this.dispatchCellValueChangedEvent(e.pinnedSibling,o,n,s),!0}isSetValueSupported(e,t,o,s){const{field:i,valueSetter:n}=s,r=this.beans.formula,a=e.isAllowFormula()&&r?.isFormula(o),l=!!this.formulaDataSvc?.hasDataSource();return we(i)&&we(n)&&!(l&&a)?t.group&&(s.groupRowValueSetter||s.groupRowEditable)?!0:(D(17),!1):this.dataTypeSvc&&!this.dataTypeSvc.checkType(e,o)?(D(135),!1):!0}handleExternalFormulaChange(e){const{column:t,rowNode:o,newValue:s,eventSource:i,setterParams:n}=e,r=this.beans.formula,a=this.formulaDataSvc;if(!a?.hasDataSource()||!t.isAllowFormula())return null;const l=r?.isFormula(s),c=a.getFormula({column:t,rowNode:o});if(l){if(!(c!==s))return!1;a.setFormula({column:t,rowNode:o,formula:s});const u=r?.resolveValue(t,o),h=t.getColDef();if(L(h.valueSetter)||!we(h.field)){const g={...n,newValue:u};this.computeValueChange({column:t,rowNode:o,newValue:u,params:g,rowData:o.data,valueSetter:h.valueSetter,field:h.field})}return this.finishValueChange(o,t,n,i)}return c!==void 0&&a.setFormula({column:t,rowNode:o,formula:void 0}),null}computeValueChange(e){const{valueSetter:t,params:o,rowData:s,field:i,column:n,newValue:r}=e;return L(t)?typeof t=="function"?t(o):this.expressionSvc?.evaluate(t,o):!!s&&this.setValueUsingField(s,i,r,n.isFieldContainsDots())}dispatchCellValueChangedEvent(e,t,o,s){this.eventSvc.dispatchEvent({type:"cellValueChanged",event:null,rowIndex:e.rowIndex,rowPinned:e.rowPinned,column:t.column,colDef:t.colDef,data:e.data,node:e,oldValue:t.oldValue,newValue:o,newRawValue:t.newValue,value:o,source:s})}callColumnCellValueChangedHandler(e){const t=e.colDef.onCellValueChanged;typeof t=="function"&&this.beans.frameworkOverrides.wrapOutgoing(()=>{t(e)})}setValueUsingField(e,t,o,s){if(!t)return!1;let i=!1;if(!s)i=e[t]===o,i||(e[t]=o);else{const n=t.split(".");let r=e;for(;n.length>0&&r;){const a=n.shift();n.length===0?(i=r[a]===o,i||(r[a]=o)):r=r[a]}}return!i}executeValueGetterWithValueCache(e,t,o,s){const i=o.getColId(),n=this.valueCache.getValue(s,i);if(n!==void 0)return n;const r=this.executeValueGetterWithoutValueCache(e,t,o,s);return this.valueCache.setValue(s,i,r),r}executeValueGetterWithoutValueCache(e,t,o,s){const i=K(this.gos,{data:t,node:s,column:o,colDef:o.getColDef(),getValue:r=>this.getValueCallback(s,r)});let n;return typeof e=="function"?n=e(i):n=this.expressionSvc?.evaluate(e,i),n}getValueCallback(e,t){const o=this.colModel.getColDefCol(t);return o?this.getValue(o,e,"data"):null}getKeyForNode(e,t){const o=this.getValue(e,t,"data"),s=e.getColDef().keyCreator;let i=o;if(s){const n=K(this.gos,{value:o,colDef:e.getColDef(),column:e,node:t,data:t.data});i=s(n)}return typeof i=="string"||i==null||(i=String(i),i==="[object Object]"&&D(121)),i}},C1={moduleName:"CommunityCore",version:I,beans:[Zy,Hv,bS,Rm,YR,hb,$y,v0,wb,wR,vR,ZR,m1,Yy,_y,Qy,yS,n1,gS,pS,T0],icons:{selectOpen:"small-down",smallDown:"small-down",colorPicker:"color-picker",smallUp:"small-up",checkboxChecked:"small-up",checkboxIndeterminate:"checkbox-indeterminate",checkboxUnchecked:"checkbox-unchecked",radioButtonOn:"radio-button-on",radioButtonOff:"radio-button-off",smallLeft:"small-left",smallRight:"small-right"},apiFunctions:{getGridId:Qu,destroy:Bv,isDestroyed:Vv,getGridOption:Nv,setGridOption:Wv,updateGridOptions:Zu,isModuleRegistered:zv},dependsOn:[uS,zw,Zw,Kh,x0,pb,P0,jR,p1,M0,CR,RR,xR,k0,CS,hS,g1,Mb,MR]};function Yr(e){const{inputValue:t,allSuggestions:o,hideIrrelevant:s,filterByPercentageOfBestMatch:i}=e;let n=(o??[]).map((l,c)=>({value:l,relevance:v1(t,l),idx:c}));if(n.sort((l,c)=>l.relevance-c.relevance),s&&(n=n.filter(l=>l.relevance<Math.max(l.value.length,t.length))),n.length>0&&i&&i>0){const c=n[0].relevance*i;n=n.filter(d=>c-d.relevance<0)}const r=[],a=[];for(const l of n)r.push(l.value),a.push(l.idx);return{values:r,indices:a}}function v1(e,t){const o=e.length,s=t.length;if(s===0)return o||0;let i=e.toLocaleLowerCase(),n=t.toLocaleLowerCase(),r;e.length<t.length&&(r=n,n=i,i=r,r=t,t=e,e=r);let a=new Uint16Array(s+1),l=new Uint16Array(s+1);for(let u=0;u<=s;u++)a[u]=u;let c=0;const d=o/2-10;for(let u=1;u<=o;u++){const h=e[u-1],g=i[u-1];l[0]=u;for(let f=1;f<=s;f++){const m=t[f-1],C=n[f-1];if(g!==C){const v=l[f-1],w=a[f],b=a[f-1];let y=v<w?v:w;b<y&&(y=b),l[f]=y+1|0;continue}if(c++,h===m&&c++,u>1&&f>1){const v=e[u-2],w=i[u-2],b=t[f-2],y=n[f-2];w===y&&(c++,v===b&&c++)}u<d&&c++,l[f]=a[f-1]}r=a,a=l,l=r}return a[s]/(c+1)}var qh={AdvancedFilter:1,AiToolkit:1,AllEnterprise:1,BatchEdit:1,CellSelection:1,Clipboard:1,ColumnMenu:1,ColumnsToolPanel:1,ContextMenu:1,ExcelExport:1,FiltersToolPanel:1,Find:1,GridCharts:1,IntegratedCharts:1,GroupFilter:1,MasterDetail:1,Menu:1,MultiFilter:1,NewFiltersToolPanel:1,Pivot:1,RangeSelection:1,RichSelect:1,RowNumbers:1,RowGrouping:1,RowGroupingEdit:1,RowGroupingPanel:1,ServerSideRowModelApi:1,ServerSideRowModel:1,SetFilter:1,SideBar:1,Sparklines:1,StatusBar:1,TreeData:1,ViewportRowModel:1,Formula:1},gr=["TextFilter","NumberFilter","BigIntFilter","DateFilter","SetFilter","MultiFilter","GroupFilter","CustomFilter"],w1={EditCore:["TextEditor","NumberEditor","DateEditor","CheckboxEditor","LargeTextEditor","SelectEditor","RichSelect","CustomEditor"],CheckboxCellRenderer:["AllCommunity"],ClientSideRowModelHierarchy:["RowGrouping","Pivot","TreeData"],ColumnFilter:gr,ColumnGroupHeaderComp:["AllCommunity"],ColumnGroup:["AllCommunity"],ColumnHeaderComp:["AllCommunity"],ColumnMove:["AllCommunity"],ColumnResize:["AllCommunity"],CommunityCore:["AllCommunity"],CsrmSsrmSharedApi:["ClientSideRowModelApi","ServerSideRowModelApi"],RowModelSharedApi:["ClientSideRowModelApi","ServerSideRowModelApi"],EnterpriseCore:["AllEnterprise"],FilterCore:[...gr,"QuickFilter","ExternalFilter","AdvancedFilter"],GroupCellRenderer:["RowGrouping","Pivot","TreeData","MasterDetail","ServerSideRowModel"],KeyboardNavigation:["AllCommunity"],LoadingCellRenderer:["ServerSideRowModel"],MenuCore:["ColumnMenu","ContextMenu"],MenuItem:["ColumnMenu","ContextMenu","MultiFilter","IntegratedCharts","ColumnsToolPanel"],Overlay:["AllCommunity"],PinnedColumn:["AllCommunity"],SharedAggregation:["RowGrouping","Pivot","TreeData","ServerSideRowModel"],SharedDragAndDrop:["AllCommunity"],SharedMasterDetail:["MasterDetail","ServerSideRowModel"],SharedMenu:[...gr,"ColumnMenu","ContextMenu"],SharedPivot:["Pivot","ServerSideRowModel"],SharedRowGrouping:["RowGrouping","ServerSideRowModel"],SharedRowSelection:["RowSelection","ServerSideRowModel"],SkeletonCellRenderer:["ServerSideRowModel"],Sort:["AllCommunity"],SsrmInfiniteSharedApi:["InfiniteRowModel","ServerSideRowModelApi"],SharedTreeData:["TreeData","ServerSideRowModel"]},b1={InfiniteRowModel:"infinite",ClientSideRowModelApi:"clientSide",ClientSideRowModel:"clientSide",ServerSideRowModelApi:"serverSide",ServerSideRowModel:"serverSide",ViewportRowModel:"viewport"};function S1(e,t){const o=[];for(const s of Array.isArray(e)?e:[e]){const i=w1[s];if(i)for(const n of i){const r=b1[n];(!r||r===t)&&o.push(n)}else o.push(s)}return o}var jh=()=>`No AG Grid modules are registered! It is recommended to start with all Community features via the AllCommunityModule:
|
|
21
|
+
|
|
22
|
+
import { ModuleRegistry, AllCommunityModule } from 'ag-grid-community';
|
|
23
|
+
|
|
24
|
+
ModuleRegistry.registerModules([ AllCommunityModule ]);
|
|
25
|
+
`,y1=e=>{const t=e.map(s=>`import { ${Us(s)} } from '${qh[s]?"ag-grid-enterprise":"ag-grid-community"}';`);return e.some(s=>s==="IntegratedCharts"||s==="Sparklines")&&t.push("import { AgChartsEnterpriseModule } from 'ag-charts-enterprise';"),`import { ModuleRegistry } from 'ag-grid-community';
|
|
26
|
+
${t.join(`
|
|
27
|
+
`)}
|
|
28
|
+
|
|
29
|
+
ModuleRegistry.registerModules([ ${e.map(s=>Us(s,!0)).join(", ")} ]);
|
|
30
|
+
|
|
31
|
+
For more info see: ${ls}/modules/`};function Us(e,t=!1){return t&&(e==="IntegratedCharts"||e==="Sparklines")?`${e}Module.with(AgChartsEnterpriseModule)`:`${e}Module`}function R1(e,t){const o=t.filter(n=>n==="IntegratedCharts"||n==="Sparklines");let s="";return!globalThis?.agCharts&&o.length>0?s=`Unable to use ${e} as either the ag-charts-community or ag-charts-enterprise script needs to be included alongside ag-grid-enterprise.
|
|
32
|
+
`:t.some(n=>qh[n])&&(s=s+`Unable to use ${e} as that requires the ag-grid-enterprise script to be included.
|
|
33
|
+
`),s}function Yh({moduleName:e,rowModelType:t}){return`To use the ${e}Module you must set the gridOption "rowModelType='${t}'"`}var Lc=({reasonOrId:e,moduleName:t,gridScoped:o,gridId:s,rowModelType:i,additionalText:n,isUmd:r})=>{const a=S1(t,i),l=typeof e=="string"?e:P1[e];if(r)return R1(l,a);const c=a.filter(h=>h==="IntegratedCharts"||h==="Sparklines"),d=c.length>0?`${c.map(h=>Us(h)).join()} must be initialised with an AG Charts module. One of 'AgChartsCommunityModule' / 'AgChartsEnterpriseModule'.`:"";return`${`Unable to use ${l} as ${a.length>1?"one of "+a.map(h=>Us(h)).join(", "):Us(a[0])} is not registered${o?" for gridId: "+s:""}. ${d} Check if you have registered the module:
|
|
34
|
+
`}
|
|
35
|
+
${y1(a)}`+(n?`
|
|
36
|
+
|
|
37
|
+
${n}`:"")},Oc=e=>`${e} must be initialised with an AG Charts module. One of 'AgChartsCommunityModule' / 'AgChartsEnterpriseModule'.
|
|
38
|
+
|
|
39
|
+
import { AgChartsEnterpriseModule } from 'ag-charts-enterprise';
|
|
40
|
+
import { ModuleRegistry } from 'ag-grid-community';
|
|
41
|
+
import { ${e} } from 'ag-grid-enterprise';
|
|
42
|
+
|
|
43
|
+
ModuleRegistry.registerModules([${e}.with(AgChartsEnterpriseModule)]);
|
|
44
|
+
`,F1=e=>`AG Grid: Unable to use the Clipboard API (navigator.clipboard.${e}()). The reason why it could not be used has been logged in the previous line. For this reason the grid has defaulted to using a workaround which doesn't perform as well. Either fix why Clipboard API is blocked, OR stop this message from appearing by setting grid property suppressClipboardApi=true (which will default the grid to using the workaround rather than the API.`,E1={1:()=>"`rowData` must be an array",2:({nodeId:e})=>`Duplicate node id '${e}' detected from getRowId callback, this could cause issues in your grid.`,3:()=>"Calling gridApi.resetRowHeights() makes no sense when using Auto Row Height.",4:({id:e})=>`Could not find row id=${e}, data item was not found for this id`,5:({data:e})=>["Could not find data item as object was not found.",e," Consider using getRowId to help the Grid find matching row data"],6:()=>"'groupHideOpenParents' only works when specifying specific columns for 'colDef.showRowGroup'",7:()=>"Pivoting is not supported with aligned grids as it may produce different columns in each grid.",8:({key:e})=>`Unknown key for navigation ${e}`,9:({variable:e})=>`No value for ${e?.cssName}. This usually means that the grid has been initialised before styles have been loaded. The default value of ${e?.defaultValue} will be used and updated when styles load.`,10:({eventType:e})=>`As of v33, the '${e}' event is deprecated. Use the global 'modelUpdated' event to determine when row children have changed.`,11:()=>"No gridOptions provided to createGrid",12:({colKey:e})=>["column ",e," not found"],13:()=>"Could not find rowIndex, this means tasks are being executed on a rowNode that has been removed from the grid.",14:({groupPrefix:e})=>`Row IDs cannot start with ${e}, this is a reserved prefix for AG Grid's row grouping feature.`,15:({expression:e})=>["value should be either a string or a function",e],16:({expression:e,params:t,e:o})=>["Processing of the expression failed","Expression = ",e,"Params = ",t,"Exception = ",o],17:()=>"you need either field or valueSetter set on colDef for editing to work",18:()=>"alignedGrids contains an undefined option.",19:()=>"alignedGrids - No api found on the linked grid.",20:()=>`You may want to configure via a callback to avoid setup race conditions:
|
|
45
|
+
"alignedGrids: () => [linkedGrid]"`,21:()=>"pivoting is not supported with aligned grids. You can only use one of these features at a time in a grid.",22:({key:e})=>`${e} is an initial property and cannot be updated.`,23:()=>"The return of `getRowHeight` cannot be zero. If the intention is to hide rows, use a filter instead.",24:()=>"row height must be a number if not using standard row model",25:({id:e})=>["The getRowId callback must return a string. The ID ",e," is being cast to a string."],26:({fnName:e,preDestroyLink:t})=>`Grid API function ${e}() cannot be called as the grid has been destroyed.
|
|
46
|
+
Either clear local references to the grid api, when it is destroyed, or check gridApi.isDestroyed() to avoid calling methods against a destroyed grid.
|
|
47
|
+
To run logic when the grid is about to be destroyed use the gridPreDestroy event. See: ${t}`,27:({fnName:e,module:t})=>`API function '${e}' not registered to module '${t}'`,28:()=>"setRowCount cannot be used while using row grouping.",29:()=>"tried to call sizeColumnsToFit() but the grid is coming back with zero width, maybe the grid is not visible yet on the screen?",30:({toIndex:e})=>["tried to insert columns in invalid location, toIndex = ",e,"remember that you should not count the moving columns when calculating the new index"],31:()=>"infinite loop in resizeColumnSets",32:()=>"applyColumnState() - the state attribute should be an array, however an array was not found. Please provide an array of items (one for each col you want to change) for state.",33:()=>"stateItem.aggFunc must be a string. if using your own aggregation functions, register the functions first before using them in get/set state. This is because it is intended for the column state to be stored and retrieved as simple JSON.",34:({key:e})=>`the column type '${e}' is a default column type and cannot be overridden.`,35:()=>"Column type definitions 'columnTypes' with a 'type' attribute are not supported because a column type cannot refer to another column type. Only column definitions 'columnDefs' can use the 'type' attribute to refer to a column type.",36:({t:e})=>"colDef.type '"+e+"' does not correspond to defined gridOptions.columnTypes",37:()=>"Changing the column pinning status is not allowed with domLayout='print'",38:({iconName:e})=>`provided icon '${e}' needs to be a string or a function`,39:()=>"Applying column order broke a group where columns should be married together. Applying new order has been discarded.",40:({e,method:t})=>`${e}
|
|
48
|
+
${F1(t)}`,41:()=>"Browser did not allow document.execCommand('copy'). Ensure 'api.copySelectedRowsToClipboard() is invoked via a user event, i.e. button click, otherwise the browser will prevent it for security reasons.",42:()=>"Browser does not support document.execCommand('copy') for clipboard operations",43:({iconName:e})=>`As of v33, icon '${e}' is deprecated. Use the icon CSS name instead.`,44:()=>'Data type definition hierarchies (via the "extendsDataType" property) cannot contain circular references.',45:({parentCellDataType:e})=>`The data type definition ${e} does not exist.`,46:()=>'The "baseDataType" property of a data type definition must match that of its parent.',47:({cellDataType:e})=>`Missing data type definition - "${e}"`,48:({property:e,inferred:t,colId:o})=>{const s=t?" (inferred)":"",i=o?` for column "${o}"`:"";return`Cell data type is "object"${s} but no Value ${e} has been provided${i}. Please either provide an object data type definition with a Value ${e}, or set:
|
|
49
|
+
- "colDef.value${e}"${t&&e==="Parser"?`
|
|
50
|
+
- "colDef.cellDataType = 'object'"`:""}`},49:({methodName:e})=>`Framework component is missing the method ${e}()`,50:({compName:e})=>`Could not find component ${e}, did you forget to configure this component?`,51:()=>"Export cancelled. Export is not allowed as per your configuration.",52:()=>"There is no `window` associated with the current `document`",53:()=>"unknown value type during csv conversion",54:()=>"Could not find document body, it is needed for drag and drop and context menu.",55:()=>"addRowDropZone - A container target needs to be provided",56:()=>"addRowDropZone - target already exists in the list of DropZones. Use `removeRowDropZone` before adding it again.",57:()=>"unable to show popup filter, filter instantiation failed",58:()=>"no values found for select cellEditor",59:()=>"cannot select pinned rows",60:()=>"cannot select node until it has finished loading",61:()=>"since version v32.2.0, rowNode.isFullWidthCell() has been deprecated. Instead check `rowNode.detail` followed by the user provided `isFullWidthRow` grid option.",62:({colId:e})=>`setFilterModel() - no column found for colId: ${e}`,63:({colId:e})=>`setFilterModel() - unable to fully apply model, filtering disabled for colId: ${e}`,64:({colId:e})=>`setFilterModel() - unable to fully apply model, unable to create filter for colId: ${e}`,65:()=>"filter missing setModel method, which is needed for setFilterModel",66:()=>"filter API missing getModel method, which is needed for getFilterModel",67:()=>"Filter is missing isFilterActive() method",68:()=>"Column Filter API methods have been disabled as Advanced Filters are enabled.",69:({guiFromFilter:e})=>`getGui method from filter returned ${e}; it should be a DOM element.`,70:({newFilter:e})=>`Grid option quickFilterText only supports string inputs, received: ${typeof e}`,71:()=>"debounceMs is ignored when apply button is present",72:({keys:e})=>["ignoring FilterOptionDef as it doesn't contain one of ",e],73:()=>"invalid FilterOptionDef supplied as it doesn't contain a 'displayKey'",74:()=>"no filter options for filter",75:()=>"Unknown button type specified",76:({filterModelType:e})=>['Unexpected type of filter "',e,'", it looks like the filter was configured with incorrect Filter Options'],77:()=>"Filter model is missing 'conditions'",78:()=>'Filter Model contains more conditions than "filterParams.maxNumConditions". Additional conditions have been ignored.',79:()=>'"filterParams.maxNumConditions" must be greater than or equal to zero.',80:()=>'"filterParams.numAlwaysVisibleConditions" must be greater than or equal to zero.',81:()=>'"filterParams.numAlwaysVisibleConditions" cannot be greater than "filterParams.maxNumConditions".',82:({param:e})=>`DateFilter ${e} is not a number`,83:()=>"DateFilter minValidYear should be <= maxValidYear",84:()=>"DateFilter minValidDate should be <= maxValidDate",85:()=>"DateFilter should not have both minValidDate and minValidYear parameters set at the same time! minValidYear will be ignored.",86:()=>"DateFilter should not have both maxValidDate and maxValidYear parameters set at the same time! maxValidYear will be ignored.",87:()=>"DateFilter parameter minValidDate should always be lower than or equal to parameter maxValidDate.",88:({index:e})=>`Invalid row index for ensureIndexVisible: ${e}`,89:()=>"A template was provided for Header Group Comp - templates are only supported for Header Comps (not groups)",90:()=>"datasource is missing getRows method",91:()=>"Filter is missing method doesFilterPass",92:()=>"AnimationFrameService called but animation frames are off",93:()=>"cannot add multiple ranges when `cellSelection.suppressMultiRanges = true`",94:({paginationPageSizeOption:e,pageSizeSet:t,pageSizesSet:o,pageSizeOptions:s})=>`'paginationPageSize=${e}'${t?"":" (default value)"}, but ${e} is not included in${o?"":" the default"} paginationPageSizeSelector=[${s?.join(", ")}].`,95:({paginationPageSizeOption:e,paginationPageSizeSelector:t})=>`Either set '${t}' to an array that includes ${e} or to 'false' to disable the page size selector.`,96:({id:e,data:t})=>["Duplicate ID",e,"found for pinned row with data",t,"When `getRowId` is defined, it must return unique IDs for all pinned rows. Use the `rowPinned` parameter."],97:({colId:e})=>`cellEditor for column ${e} is missing getGui() method`,98:()=>"popup cellEditor does not work with fullRowEdit - you cannot use them both - either turn off fullRowEdit, or stop using popup editors.",99:()=>"Since v32, `api.hideOverlay()` does not hide the loading overlay when `loading=true`. Set `loading=false` instead.",101:({propertyName:e,componentName:t,agGridDefaults:o,jsComps:s})=>{const i=[],n=[...Object.keys(o??[]).filter(a=>!["agCellEditor","agGroupRowRenderer","agSortIndicator"].includes(a)),...Object.keys(s??[]).filter(a=>!!s[a])],r=Yr({inputValue:t,allSuggestions:n,hideIrrelevant:!0,filterByPercentageOfBestMatch:.8}).values;return i.push(`Could not find '${t}' component. It was configured as "${e}: '${t}'" but it wasn't found in the list of registered components.
|
|
51
|
+
`),r.length>0&&i.push(` Did you mean: [${r.slice(0,3)}]?
|
|
52
|
+
`),i.push("If using a custom component check it has been registered correctly."),i},102:()=>"selectAll: 'filtered' only works when gridOptions.rowModelType='clientSide'",103:()=>"Invalid selection state. When using client-side row model, the state must conform to `string[]`.",104:({value:e,param:t})=>`Numeric value ${e} passed to ${t} param will be interpreted as ${e} seconds. If this is intentional use "${e}s" to silence this warning.`,105:({e})=>["chart rendering failed",e],106:()=>`Theming API and Legacy Themes are both used in the same page. A Theming API theme has been provided to the 'theme' grid option, but the file (ag-grid.css) is also included and will cause styling issues. Remove ag-grid.css from the page. See the migration guide: ${ls}/theming-migration/`,107:({key:e,value:t})=>`Invalid value for theme param ${e} - ${t}`,108:({e})=>["chart update failed",e],109:({inputValue:e,allSuggestions:t})=>{const o=Yr({inputValue:e,allSuggestions:t,hideIrrelevant:!0,filterByPercentageOfBestMatch:.8}).values;return[`Could not find '${e}' aggregate function. It was configured as "aggFunc: '${e}'" but it wasn't found in the list of registered aggregations.`,o.length>0?` Did you mean: [${o.slice(0,3)}]?`:"","If using a custom aggregation function check it has been registered correctly."].join(`
|
|
53
|
+
`)},110:()=>"groupHideOpenParents only works when specifying specific columns for colDef.showRowGroup",111:()=>"Invalid selection state. When `groupSelects` is enabled, the state must conform to `IServerSideGroupSelectionState`.",113:()=>"Set Filter cannot initialise because you are using a row model that does not contain all rows in the browser. Either use a different filter type, or configure Set Filter such that you provide it with values",114:({component:e})=>`Could not find component with name of ${e}. Is it in Vue.components?`,116:()=>"Invalid selection state. The state must conform to `IServerSideSelectionState`.",117:()=>"selectAll must be of boolean type.",118:()=>"Infinite scrolling must be enabled in order to set the row count.",119:()=>"Unable to instantiate filter",120:()=>"MultiFloatingFilterComp expects MultiFilter as its parent",121:()=>"a column you are grouping or pivoting by has objects as values. If you want to group by complex objects then either a) use a colDef.keyCreator (see AG Grid docs) or b) to toString() on the object to return a key",122:()=>"could not find the document, document is empty",123:()=>"Advanced Filter is only supported with the Client-Side Row Model or Server-Side Row Model.",124:()=>"No active charts to update.",125:({chartId:e})=>`Unable to update chart. No active chart found with ID: ${e}.`,126:()=>"unable to restore chart as no chart model is provided",127:({allRange:e})=>`unable to create chart as ${e?"there are no columns in the grid":"no range is selected"}.`,128:({feature:e})=>`${e} is only available if using 'multiRow' selection mode.`,129:({feature:e,rowModel:t})=>`${e} is only available if using 'clientSide' or 'serverSide' rowModelType, you are using ${t}.`,130:()=>'cannot multi select unless selection mode is "multiRow"',132:()=>"Row selection features are not available unless `rowSelection` is enabled.",133:({iconName:e})=>`icon '${e}' function should return back a string or a dom object`,134:({iconName:e})=>`Did not find icon '${e}'`,135:()=>"Data type of the new value does not match the cell data type of the column",136:()=>"Unable to update chart as the 'type' is missing. It must be either 'rangeChartUpdate', 'pivotChartUpdate', or 'crossFilterChartUpdate'.",137:({type:e,currentChartType:t})=>`Unable to update chart as a '${e}' update type is not permitted on a ${t}.`,138:({chartType:e})=>`invalid chart type supplied: ${e}`,139:({customThemeName:e})=>`a custom chart theme with the name ${e} has been supplied but not added to the 'chartThemes' list`,140:({name:e})=>`no stock theme exists with the name '${e}' and no custom chart theme with that name was supplied to 'customChartThemes'`,141:()=>"cross filtering with row grouping is not supported.",142:()=>"cross filtering is only supported in the client side row model.",143:({panel:e})=>`'${e}' is not a valid Chart Tool Panel name`,144:({type:e})=>`Invalid charts data panel group name supplied: '${e}'`,145:({group:e})=>`As of v32, only one charts customize panel group can be expanded at a time. '${e}' will not be expanded.`,146:({comp:e})=>`Unable to instantiate component '${e}' as its module hasn't been loaded. Add 'ValidationModule' to see which module is required.`,147:({group:e})=>`Invalid charts customize panel group name supplied: '${e}'`,148:({group:e})=>`invalid chartGroupsDef config '${e}'`,149:({group:e,chartType:t})=>`invalid chartGroupsDef config '${e}.${t}'`,150:()=>"'seriesChartTypes' are required when the 'customCombo' chart type is specified.",151:({chartType:e})=>`invalid chartType '${e}' supplied in 'seriesChartTypes', converting to 'line' instead.`,152:({colId:e})=>`no 'seriesChartType' found for colId = '${e}', defaulting to 'line'.`,153:({chartDataType:e})=>`unexpected chartDataType value '${e}' supplied, instead use 'category', 'series' or 'excluded'`,154:({colId:e})=>`cross filtering requires a 'agSetColumnFilter' or 'agMultiColumnFilter' to be defined on the column with id: ${e}`,155:({option:e})=>`'${e}' is not a valid Chart Toolbar Option`,156:({panel:e})=>`Invalid panel in chartToolPanelsDef.panels: '${e}'`,157:({unrecognisedGroupIds:e})=>["unable to find group(s) for supplied groupIds:",e],158:()=>"can not expand a column item that does not represent a column group header",159:()=>"Invalid params supplied to createExcelFileForExcel() - `ExcelExportParams.data` is empty.",160:()=>"Export cancelled. Export is not allowed as per your configuration.",161:()=>"The Excel Exporter is currently on Multi Sheet mode. End that operation by calling 'api.getMultipleSheetAsExcel()' or 'api.exportMultipleSheetsAsExcel()'",162:({id:e,dataType:t})=>`Unrecognized data type for excel export [${e}.dataType=${t}]`,163:({featureName:e})=>`Excel table export does not work with ${e}. The exported Excel file will not contain any Excel tables.
|
|
54
|
+
Please turn off ${e} to enable Excel table exports.`,164:()=>"Unable to add data table to Excel sheet: A table already exists.",165:()=>"Unable to add data table to Excel sheet: Missing required parameters.",166:({unrecognisedGroupIds:e})=>["unable to find groups for these supplied groupIds:",e],167:({unrecognisedColIds:e})=>["unable to find columns for these supplied colIds:",e],168:()=>"detailCellRendererParams.template should be function or string",169:()=>'Reference to eDetailGrid was missing from the details template. Please add data-ref="eDetailGrid" to the template.',170:({providedStrategy:e})=>`invalid cellRendererParams.refreshStrategy = ${e} supplied, defaulting to refreshStrategy = 'rows'.`,171:()=>"could not find detail grid options for master detail, please set gridOptions.detailCellRendererParams.detailGridOptions",172:()=>"could not find getDetailRowData for master / detail, please set gridOptions.detailCellRendererParams.getDetailRowData",173:({group:e})=>`invalid chartGroupsDef config '${e}'`,174:({group:e,chartType:t})=>`invalid chartGroupsDef config '${e}.${t}'`,175:({menuTabName:e,itemsToConsider:t})=>[`Trying to render an invalid menu item '${e}'. Check that your 'menuTabs' contains one of `,t],176:({key:e})=>`unknown menu item type ${e}`,177:()=>"valid values for cellSelection.handle.direction are 'x', 'y' and 'xy'. Default to 'xy'.",178:({colId:e})=>`column ${e} is not visible`,179:()=>"totalValueGetter should be either a function or a string (expression)",180:()=>"agRichSelectCellEditor requires cellEditorParams.values to be set",181:()=>"agRichSelectCellEditor cannot have `multiSelect` and `allowTyping` set to `true`. AllowTyping has been turned off.",182:()=>'you cannot mix groupDisplayType = "multipleColumns" with treeData, only one column can be used to display groups when doing tree data',183:()=>"Group Column Filter only works on group columns. Please use a different filter.",184:({parentGroupData:e,childNodeData:t})=>["duplicate group keys for row data, keys should be unique",[e,t]],185:({data:e})=>["getDataPath() should not return an empty path",[e]],186:({rowId:e,rowData:t,duplicateRowsData:o})=>["duplicate group keys for row data, keys should be unique",e,t,...o??[]],187:({rowId:e,firstData:t,secondData:o})=>[`Duplicate node id ${e}. Row IDs are provided via the getRowId() callback. Please modify the getRowId() callback code to provide unique row id values.`,"first instance",t,"second instance",o],188:e=>`getRowId callback must be provided for Server Side Row Model ${e?.feature||"selection"} to work correctly.`,189:({startRow:e})=>`invalid value ${e} for startRow, the value should be >= 0`,190:({rowGroupId:e,data:t})=>["null and undefined values are not allowed for server side row model keys",e?`column = ${e}`:"","data is ",t],194:({method:e})=>`calling gridApi.${e}() is only possible when using rowModelType=\`clientSide\`.`,195:({justCurrentPage:e})=>`selecting just ${e?"current page":"filtered"} only works when gridOptions.rowModelType='clientSide'`,196:({key:e})=>`Provided ids must be of string type. Invalid id provided: ${e}`,197:()=>"`toggledNodes` must be an array of string ids.",199:()=>"getSelectedNodes and getSelectedRows functions cannot be used with select all functionality with the server-side row model. Use `api.getServerSideSelectionState()` instead.",200:Lc,201:({rowModelType:e})=>`Could not find row model for rowModelType = ${e}`,202:()=>"`getSelectedNodes` and `getSelectedRows` functions cannot be used with `groupSelectsChildren` and the server-side row model. Use `api.getServerSideSelectionState()` instead.",203:()=>"Server Side Row Model does not support Dynamic Row Height and Cache Purging. Either a) remove getRowHeight() callback or b) remove maxBlocksInCache property. Purging has been disabled.",204:()=>"Server Side Row Model does not support Auto Row Height and Cache Purging. Either a) remove colDef.autoHeight or b) remove maxBlocksInCache property. Purging has been disabled.",205:({duplicateIdText:e})=>`Unable to display rows as duplicate row ids (${e}) were returned by the getRowId callback. Please modify the getRowId callback to provide unique ids.`,206:()=>"getRowId callback must be implemented for transactions to work. Transaction was ignored.",207:()=>'The Set Filter Parameter "defaultToNothingSelected" value was ignored because it does not work when "excelMode" is used.',208:()=>"Set Filter Value Formatter must return string values. Please ensure the Set Filter Value Formatter returns string values for complex objects.",209:()=>`Set Filter Key Creator is returning null for provided values and provided values are primitives. Please provide complex objects. See ${ls}/filter-set-filter-list/#filter-value-types`,210:()=>"Set Filter has a Key Creator, but provided values are primitives. Did you mean to provide complex objects?",211:()=>"property treeList=true for Set Filter params, but you did not provide a treeListPathGetter or values of type Date.",212:()=>"please review all your toolPanel components, it seems like at least one of them doesn't have an id",213:()=>"Advanced Filter does not work with Filters Tool Panel. Filters Tool Panel has been disabled.",214:({key:e})=>`unable to lookup Tool Panel as invalid key supplied: ${e}`,215:({key:e,defaultByKey:t})=>`the key ${e} is not a valid key for specifying a tool panel, valid keys are: ${Object.keys(t??{}).join(",")}`,216:({name:e})=>`Missing component for '${e}'`,217:({invalidColIds:e})=>["unable to find grid columns for the supplied colDef(s):",e],218:({property:e,defaultOffset:t})=>`${e} must be a number, the value you provided is not a valid number. Using the default of ${t}px.`,219:({property:e})=>`Property ${e} does not exist on the target object.`,220:({lineDash:e})=>`'${e}' is not a valid 'lineDash' option.`,221:()=>"agAggregationComponent should only be used with the client and server side row model.",222:()=>"agFilteredRowCountComponent should only be used with the client side row model.",223:()=>"agSelectedRowCountComponent should only be used with the client and server side row model.",224:()=>"agTotalAndFilteredRowCountComponent should only be used with the client side row model.",225:()=>"agTotalRowCountComponent should only be used with the client side row model.",226:()=>"viewport is missing init method.",227:()=>"menu item icon must be DOM node or string",228:({menuItemOrString:e})=>`unrecognised menu item ${e}`,230:()=>"detailCellRendererParams.template is not supported by AG Grid React. To change the template, provide a Custom Detail Cell Renderer. See https://www.ag-grid.com/react-data-grid/master-detail-custom-detail/",231:()=>"As of v32, using custom components with `reactiveCustomComponents = false` is deprecated.",232:()=>"Using both rowData and v-model. rowData will be ignored.",233:({methodName:e})=>`Framework component is missing the method ${e}()`,234:()=>'Group Column Filter does not work with the colDef property "field". This property will be ignored.',235:()=>'Group Column Filter does not work with the colDef property "filterValueGetter". This property will be ignored.',236:()=>'Group Column Filter does not work with the colDef property "filterParams". This property will be ignored.',237:()=>"Group Column Filter does not work with Tree Data enabled. Please disable Tree Data, or use a different filter.",238:()=>"setRowCount can only accept a positive row count.",239:()=>'Theming API and CSS File Themes are both used in the same page. In v33 we released the Theming API as the new default method of styling the grid. See the migration docs https://www.ag-grid.com/react-data-grid/theming-migration/. Because no value was provided to the `theme` grid option it defaulted to themeQuartz. But the file (ag-grid.css) is also included and will cause styling issues. Either pass the string "legacy" to the theme grid option to use v32 style themes, or remove ag-grid.css from the page to use Theming API.',240:({theme:e})=>`theme grid option must be a Theming API theme object or the string "legacy", received: ${e}`,243:()=>"Failed to deserialize state - each provided state object must be an object.",244:()=>"Failed to deserialize state - `selectAllChildren` must be a boolean value or undefined.",245:()=>"Failed to deserialize state - `toggledNodes` must be an array.",246:()=>"Failed to deserialize state - Every `toggledNode` requires an associated string id.",247:()=>`Row selection state could not be parsed due to invalid data. Ensure all child state has toggledNodes or does not conform with the parent rule.
|
|
55
|
+
Please rebuild the selection state and reapply it.`,248:()=>"SetFloatingFilter expects SetFilter as its parent",249:()=>"Must supply a Value Formatter in Set Filter params when using a Key Creator",250:()=>"Must supply a Key Creator in Set Filter params when `treeList = true` on a group column, and Tree Data or Row Grouping is enabled.",251:({chartType:e})=>`AG Grid: Unable to create chart as an invalid chartType = '${e}' was supplied.`,252:()=>`cannot get grid to draw rows when it is in the middle of drawing rows.
|
|
56
|
+
Your code probably called a grid API method while the grid was in the render stage.
|
|
57
|
+
To overcome this, put the API call into a timeout, e.g. instead of api.redrawRows(), call setTimeout(function() { api.redrawRows(); }, 0).
|
|
58
|
+
To see what part of your code that caused the refresh check this stacktrace.`,253:({version:e})=>["Illegal version string: ",e],254:()=>"Cannot create chart: no chart themes available.",255:({point:e})=>`Lone surrogate U+${e?.toString(16).toUpperCase()} is not a scalar value`,256:()=>"Unable to initialise. See validation error, or load ValidationModule if missing.",257:()=>Oc("IntegratedChartsModule"),258:()=>Oc("SparklinesModule"),259:({part:e})=>`the argument to theme.withPart must be a Theming API part object, received: ${e}`,260:({propName:e,compName:t,gridScoped:o,gridId:s,rowModelType:i})=>Lc({reasonOrId:`AG Grid '${e}' component: ${t}`,moduleName:fs[t],gridId:s,gridScoped:o,rowModelType:i}),261:()=>"As of v33, `column.isHovered()` is deprecated. Use `api.isColumnHovered(column)` instead.",262:()=>'As of v33, icon key "smallDown" is deprecated. Use "advancedFilterBuilderSelect" for Advanced Filter Builder dropdown, "selectOpen" for Select cell editor and dropdowns (e.g. Integrated Charts menu), "richSelectOpen" for Rich Select cell editor.',263:()=>'As of v33, icon key "smallLeft" is deprecated. Use "panelDelimiterRtl" for Row Group Panel / Pivot Panel, "subMenuOpenRtl" for sub-menus.',264:()=>'As of v33, icon key "smallRight" is deprecated. Use "panelDelimiter" for Row Group Panel / Pivot Panel, "subMenuOpen" for sub-menus.',265:({colId:e})=>`Unable to infer chart data type for column '${e}' if first data entry is null. Please specify "chartDataType", or a "cellDataType" in the column definition. For more information, see ${ls}/integrated-charts-range-chart#coldefchartdatatype .`,266:()=>'As of v33.1, using "keyCreator" with the Rich Select Editor has been deprecated. It now requires the "formatValue" callback to convert complex data to strings.',267:()=>"Detail grids can not use a different theme to the master grid, the `theme` detail grid option will be ignored.",268:()=>"Transactions aren't supported with tree data when using treeDataChildrenField",269:()=>"When `masterSelects: 'detail'`, detail grids must be configured with multi-row selection",270:({id:e,parentId:t})=>`Cycle detected for row with id='${e}' and parent id='${t}'. Resetting the parent for row with id='${e}' and showing it as a root-level node.`,271:({id:e,parentId:t})=>`Parent row not found for row with id='${e}' and parent id='${t}'. Showing row with id='${e}' as a root-level node.`,272:()=>jh(),273:({providedId:e,usedId:t})=>`Provided column id '${e}' was already in use, ensure all column and group ids are unique. Using '${t}' instead.`,274:({prop:e})=>{let t=`Since v33, ${e} has been deprecated.`;switch(e){case"maxComponentCreationTimeMs":t+=" This property is no longer required and so will be removed in a future version.";break;case"setGridApi":t+=" This method is not called by AG Grid. To access the GridApi see: https://ag-grid.com/react-data-grid/grid-interface/#grid-api ";break;case"children":t+=" For multiple versions AgGridReact does not support children.";break}return t},275:Yh,276:()=>"Row Numbers Row Resizer cannot be used when Grid Columns have `autoHeight` enabled.",277:({colId:e})=>`'enableFilterHandlers' is set to true, but column '${e}' does not have 'filter.doesFilterPass' or 'filter.handler' set.`,278:({colId:e})=>`Unable to create filter handler for column '${e}'`,279:e=>{},280:({colId:e})=>`'name' must be provided for custom filter components for column '${e}`,281:({colId:e})=>`Filter for column '${e}' does not have 'filterParams.buttons', but the new Filters Tool Panel has buttons configured. Either configure buttons for the filter, or disable buttons on the Filters Tool Panel.`,282:()=>"New filter tool panel requires `enableFilterHandlers: true`.",283:()=>"As of v34, use the same method on the filter handler (`api.getColumnFilterHandler(colKey)`) instead.",284:()=>"As of v34, filters are active when they have a model. Use `api.getColumnFilterModel()` instead.",285:()=>"As of v34, use (`api.getColumnFilterModel()`) instead.",286:()=>"As of v34, use (`api.setColumnFilterModel()`) instead.",287:()=>"`api.doFilterAction()` requires `enableFilterHandlers = true",288:()=>"`api.getColumnFilterModel(key, true)` requires `enableFilterHandlers = true",289:({rowModelType:e})=>`Row Model '${e}' is not supported with Batch Editing`,290:({rowIndex:e,rowPinned:t})=>`Row with index '${e}' and pinned state '${t}' not found`,291:()=>"License Key being set multiple times with different values. This can result in an incorrect license key being used,",292:({colId:e})=>`The Multi Filter for column '${e}' has buttons configured against the child filters. When 'enableFilterHandlers=true', buttons must instead be provided against the parent Multi Filter params. The child filter buttons will be ignored.`,293:()=>"The grid was initialised detached from the DOM and was then inserted into a Shadow Root. Theme styles are probably broken. Pass the themeStyleContainer grid option to let the grid know where in the document to insert theme CSS.",294:()=>"When using the `agRichSelectCellEditor` setting `filterListAsync = true` requires `allowTyping = true` and the `values()` callback must return a Promise of filtered values.",295:({blockedService:e})=>`colDef.allowFormula is not supported with ${e}. Formulas has been turned off.`,296:()=>"Since v35, `api.hideOverlay()` does not hide the overlay when `activeOverlay` is set. Set `activeOverlay=null` instead.",297:()=>'`api.hideOverlay()` does not hide the no matching rows overlay as it is only controlled by grid state. Set `suppressOverlays=["noMatchingRows"] to not show it.',298:()=>"Columns Tool Panel 'buttons' requires 'apply' to enable Deferred Updates."};function x1(e,t){const o=E1[e];if(!o)return[`Missing error text for error id ${e}!`];const s=o(t),n=`
|
|
59
|
+
See ${Xd(e,t)}`;return Array.isArray(s)?s.concat(n):[s,n]}var P1={1:"Charting Aggregation",2:"pivotResultFields",3:"setTooltip"},Qh=class{constructor(e="javascript"){this.frameworkName=e,this.renderingEngine="vanilla",this.batchFrameworkComps=!1,this.wrapIncoming=t=>t(),this.wrapOutgoing=t=>t(),this.baseDocLink=`${zd}/${this.frameworkName}-data-grid`,Rf(this.baseDocLink)}frameworkComponent(e){return null}isFrameworkComponent(e){return!1}getDocLink(e){return this.baseDocLink+(e?"/"+e:"")}},Gc=new WeakMap,Hc=new WeakMap,D1=1,M1=class{create(e,t,o,s,i,n){const r=Ea.applyGlobalGridOptions(t),a=r.gridId??String(D1++),l=this.getRegisteredModules(i,a,r.rowModelType),c=this.createBeansList(r.rowModelType,l,a),d=this.createProvidedBeans(e,r,i);if(!c)return;const h={providedBeanInstances:d,beanClasses:c,id:a,beanInitComparator:MC,beanDestroyComparator:TC,derivedBeans:[PC],destroyCallback:()=>{Hc.delete(f),Gc.delete(e),Cf(a),n?.()}},g=new xC(h);this.registerModuleFeatures(g,l),o(g),g.getBean("syncSvc").start(),s?.(g);const f=g.getBean("gridApi");return Gc.set(e,f),Hc.set(f,e),f}getRegisteredModules(e,t,o){return ei(C1,void 0,!0),e?.modules?.forEach(s=>ei(s,t)),vf(t,Bc(o))}registerModuleFeatures(e,t){const o=e.getBean("registry"),s=e.getBean("apiFunctionSvc");for(const i of t){o.registerModule(i);const n=i.apiFunctions;if(n){const r=Object.keys(n);for(const a of r)s?.addFunction(a,n[a])}}}createProvidedBeans(e,t,o){let s=o?o.frameworkOverrides:null;we(s)&&(s=new Qh);const i={gridOptions:t,eGridDiv:e,eRootDiv:e,globalListener:o?o.globalListener:null,globalSyncListener:o?o.globalSyncListener:null,frameworkOverrides:s,withinStudio:o?.withinStudio};return o?.providedBeanInstances&&Object.assign(i,o.providedBeanInstances),i}createBeansList(e,t,o){const s={clientSide:"ClientSideRowModel",infinite:"InfiniteRowModel",serverSide:"ServerSideRowModel",viewport:"ViewportRowModel"},i=Bc(e),n=s[i];if(!n){Ls(201,{rowModelType:i},`Unknown rowModelType ${i}.`);return}if(!Sf()){Ls(272,void 0,jh());return}if(!e){const a=Object.entries(s).filter(([l,c])=>Pr(c,o,l));if(a.length==1){const[l,c]=a[0];if(l!==i){const d={moduleName:c,rowModelType:l};Ls(275,d,Yh(d));return}}}if(!Pr(n,o,i)){const a=qd(),l=`rowModelType = '${i}'`,c=`Missing module ${n}Module for rowModelType ${i}.`;Ls(200,{reasonOrId:l,moduleName:n,gridScoped:xa(),gridId:o,rowModelType:i,isUmd:a},c);return}const r=new Set;for(const a of t)for(const l of a.beans??[])r.add(l);return Array.from(r)}};function Bc(e){return e??"clientSide"}function T1(e,t=!1){const o=[],s=[],i=[],n=[],r=[],a=[],l=[],c=[],d=[];let u=0;for(let h=0;h<e.length;h++){const{colId:g,sort:f,sortType:m,sortIndex:C,rowGroup:v,rowGroupIndex:w,aggFunc:b,pivot:y,pivotIndex:S,pinned:F,hide:E,width:G,flex:k}=e[h];d.push(g),f&&(o[C??u++]={colId:g,sort:f,type:m}),v&&(s[w??0]=g),typeof b=="string"&&i.push({colId:g,aggFunc:b}),y&&(n[S??0]=g),F&&(F==="right"?a:r).push(g),E&&l.push(g),(k!=null||G)&&c.push({colId:g,flex:k??void 0,width:G===null?void 0:G})}return{sort:o.length?{sortModel:pr(o)}:void 0,rowGroup:s.length?{groupColIds:pr(s)}:void 0,aggregation:i.length?{aggregationModel:i}:void 0,pivot:n.length||t?{pivotMode:t,pivotColIds:pr(n)}:void 0,columnPinning:r.length||a.length?{leftColIds:r,rightColIds:a}:void 0,columnVisibility:l.length?{hiddenColIds:l}:void 0,columnSizing:c.length?{columnSizingModel:c}:void 0,columnOrder:d.length?{orderedColIds:d}:void 0}}function pr(e){return e.filter(t=>t!=null)}function I1(e){const t=[];for(const{groupId:o,open:s}of e)s&&t.push(o);return t.length?{openColumnGroupIds:t}:void 0}var A1=class extends x{constructor(){super(...arguments),this.beanName="alignedGridsSvc",this.consuming=!1}getAlignedGridApis(){let e=this.gos.get("alignedGrids")??[];const t=typeof e=="function";return typeof e=="function"&&(e=e()),e.map(s=>{if(!s){ce(18),t||ce(20);return}if(this.isGridApi(s))return s;const i=s;return"current"in i?i.current?.api:(i.api||ce(19),i.api)}).filter(s=>!!s&&!s.isDestroyed())}isGridApi(e){return!!e&&!!e.dispatchEvent}postConstruct(){const e=this.fireColumnEvent.bind(this);this.addManagedEventListeners({columnMoved:e,columnVisible:e,columnPinned:e,columnGroupOpened:e,columnResized:e,bodyScroll:this.fireScrollEvent.bind(this),alignedGridColumn:({event:t})=>this.onColumnEvent(t),alignedGridScroll:({event:t})=>this.onScrollEvent(t)})}fireEvent(e){if(!this.consuming)for(const t of this.getAlignedGridApis())t.isDestroyed()||t.dispatchEvent(e)}onEvent(e){this.consuming=!0,e(),this.consuming=!1}fireColumnEvent(e){this.fireEvent({type:"alignedGridColumn",event:e})}fireScrollEvent(e){e.direction==="horizontal"&&this.fireEvent({type:"alignedGridScroll",event:e})}onScrollEvent(e){this.onEvent(()=>{this.beans.ctrlsSvc.getScrollFeature().setHorizontalScrollPosition(e.left,!0)})}extractDataFromEvent(e,t){const o=[];return e.columns?e.columns.forEach(s=>{o.push(t(s))}):e.column&&o.push(t(e.column)),o}getMasterColumns(e){return this.extractDataFromEvent(e,t=>t)}getColumnIds(e){return this.extractDataFromEvent(e,t=>t.getColId())}onColumnEvent(e){this.onEvent(()=>{switch(e.type){case"columnMoved":case"columnVisible":case"columnPinned":case"columnResized":{this.processColumnEvent(e);break}case"columnGroupOpened":{this.processGroupOpenedEvent(e);break}case"columnPivotChanged":D(21);break}})}processGroupOpenedEvent(e){const{colGroupSvc:t}=this.beans;if(t)for(const o of e.columnGroups){let s=null;o&&(s=t.getProvidedColGroup(o.getGroupId())),!(o&&!s)&&t.setColumnGroupOpened(s,o.isExpanded(),"alignedGridChanged")}}processColumnEvent(e){const t=e.column;let o=null;const s=this.beans,{colResize:i,ctrlsSvc:n,colModel:r}=s;if(t&&(o=r.getColDefCol(t.getColId())),t&&!o)return;const a=this.getMasterColumns(e);switch(e.type){case"columnMoved":{const u=e.api.getColumnState().map(h=>({colId:h.colId}));Ct(s,{state:u,applyOrder:!0},"alignedGridChanged")}break;case"columnVisible":{const u=e.api.getColumnState().map(h=>({colId:h.colId,hide:h.hide}));Ct(s,{state:u},"alignedGridChanged")}break;case"columnPinned":{const u=e.api.getColumnState().map(h=>({colId:h.colId,pinned:h.pinned}));Ct(s,{state:u},"alignedGridChanged")}break;case"columnResized":{const d=e,u={};for(const h of a)u[h.getId()]={key:h.getColId(),newWidth:h.getActualWidth()};for(const h of d.flexColumns??[])u[h.getId()]&&delete u[h.getId()];i?.setColumnWidths(Object.values(u),!1,d.finished,"alignedGridChanged");break}}const c=n.getGridBodyCtrl().isVerticalScrollShowing();for(const d of this.getAlignedGridApis())d.setGridOption("alwaysShowVerticalScroll",c)}},k1={moduleName:"AlignedGrids",version:I,beans:[A1],dependsOn:[gh]};function L1(e,t={}){const o=t?t.rowNodes:void 0;e.frameworkOverrides.wrapIncoming(()=>e.rowRenderer.redrawRows(o))}function Zh(e,t,o,s,i){t&&(s&&t.parent&&t.parent.level!==-1&&Zh(e,t.parent,o,s,i),t.setExpanded(o,void 0,i))}function O1(e,t){return e.rowModel.getRowNode(t)}function G1(e,t,o,s){e.rowRenderer.addRenderedRowListener(t,o,s)}function H1(e){return e.rowRenderer.getRenderedNodes()}function B1(e,t,o){e.rowModel.forEachNode(t,o)}function V1(e){return e.rowRenderer.firstRenderedRow}function N1(e){return e.rowRenderer.lastRenderedRow}function W1(e,t){return e.rowModel.getRow(t)}function z1(e){return e.rowModel.getRowCount()}function _1(e){return e.ctrlsSvc.getScrollFeature().getVScrollPosition()}function U1(e){return e.ctrlsSvc.getScrollFeature().getHScrollPosition()}function Jh(e,t,o="auto"){e.frameworkOverrides.wrapIncoming(()=>e.ctrlsSvc.getScrollFeature().ensureColumnVisible(t,o),"ensureVisible")}function Xh(e,t,o){e.frameworkOverrides.wrapIncoming(()=>e.ctrlsSvc.getScrollFeature().ensureIndexVisible(t,o),"ensureVisible")}function $1(e,t,o=null){e.frameworkOverrides.wrapIncoming(()=>e.ctrlsSvc.getScrollFeature().ensureNodeVisible(t,o),"ensureVisible")}var K1={moduleName:"RowApi",version:I,apiFunctions:{redrawRows:L1,setRowNodeExpanded:Zh,getRowNode:O1,addRenderedRowListener:G1,getRenderedNodes:H1,forEachNode:B1,getFirstDisplayedRowIndex:V1,getLastDisplayedRowIndex:N1,getDisplayedRowAtIndex:W1,getDisplayedRowCount:z1}},q1={moduleName:"ScrollApi",version:I,apiFunctions:{getVerticalPixelRange:_1,getHorizontalPixelRange:U1,ensureColumnVisible:Jh,ensureIndexVisible:Xh,ensureNodeVisible:$1}};function j1(e){e.expansionSvc?.expandAll(!0)}function Y1(e){e.expansionSvc?.expandAll(!1)}function eg(e){e.rowModel?.onRowHeightChanged()}function tg(e){if(e.rowAutoHeight?.active){D(3);return}e.rowModel?.resetRowHeights()}function Q1(e){e.expansionSvc?.resetExpansion()}function Z1(e,t,o){const s=dC(e);if(s){if(e.rowGroupColsSvc?.columns.length===0){if(t<0){ce(238);return}s.setRowCount(t,o);return}ce(28);return}En(e)?.setRowCount(t,o)}function J1(e){return xs(e.gos)?e.rowModel.getBlockStates():e.rowNodeBlockLoader?.getBlockState()??{}}function X1(e){return e.rowModel.isLastRowIndexKnown()}var eF={moduleName:"CsrmSsrmSharedApi",version:I,apiFunctions:{expandAll:j1,collapseAll:Y1,resetRowGroupExpansion:Q1}},tF={moduleName:"RowModelSharedApi",version:I,apiFunctions:{onRowHeightChanged:eg,resetRowHeights:tg}},oF={moduleName:"SsrmInfiniteSharedApi",version:I,apiFunctions:{setRowCount:Z1,getCacheBlockState:J1,isLastRowIndexKnown:X1}},og=(e,t)=>{for(let o=0,s=e.length;o<s;++o){const i=e[o],n=i.childrenAfterGroup;n!==null&&(og(n,t),t(i))}},zo=(e,t,o,s)=>{if(o!=null){const n=o.getSortedRows();for(let r=0,a=n.length;r<a;++r){const l=n[r];l.childrenAfterGroup!==null&&!l.destroyed&&s(l)}return}if(e==null)return;const i=e.childrenAfterGroup;i!==null&&(t&&og(i,s),s(e))},sF=class extends x{constructor(e){super(),this.rootNode=e,this.nextId=0,this.allNodesMap={},Vc(e)}getRowNode(e){return this.allNodesMap[e]}setNewRowData(e){this.dispatchRowDataUpdateStarted(e),this.destroyAllNodes();const t=Vc(this.rootNode),o=new Array(e.length);t._leafs=o;let s=0;const i=this.beans.groupStage?.getNestedDataGetter(),n=i?new Set:null,r=(a,l)=>{const c=a.level+1;for(let d=0,u=l.length;d<u;++d){const h=l[d];if(!h)continue;const g=this.createRowNode(h,c,s);if(o[s++]=g,n&&!n.has(h)){n.add(h),g.treeParent=a;const f=i(h);f&&r(g,f)}}};r(t,e),o.length=s}destroyAllNodes(){const{selectionSvc:e,pinnedRowModel:t,groupStage:o}=this.beans;e?.reset("rowDataChanged"),t?.isManual()&&t.reset(),o?.clearNonLeafs();const s=this.rootNode._leafs;if(s)for(let i=0,n=s.length;i<n;++i)s[i]._destroy(!1);this.allNodesMap=Object.create(null),this.nextId=0}setImmutableRowData(e,t){const{rootNode:o,gos:s}=this;this.dispatchRowDataUpdateStarted(t);const i=vs(s),n=e.changedRowNodes,{adds:r,updates:a}=n,l=new Set,c=[],d=this.beans.groupStage?.getNestedDataGetter();let u=s.get("suppressMaintainUnsortedOrder")?void 0:!1,h=-1,g=!1;const f=(v,w)=>{if(!u&&u!==void 0){const b=v.sourceRowIndex;u=b<=h,h=b}v.data!==w&&(v.updateData(w),r.has(v)||a.add(v),!v.selectable&&v.isSelected()&&c.push(v))},m=(v,w,b)=>{for(let y=0,S=w.length;y<S;++y){const F=w[y];if(!F)continue;let E=this.getRowNode(i({data:F,level:b}));if(E?(f(E,F),g||(g=!!d&&E.treeParent!==v)):(E=this.createRowNode(F,b),r.add(E)),!d||l.has(E)){l.add(E);continue}l.add(E),E.treeParent=v;const G=d(F);G&&m(E,G,b+1)}};m(o,t,0);const C=this.deleteUnusedNodes(l,n,c,!!e.animate)||u||r.size>0;if(C){const v=o._leafs??(o._leafs=[]);u===void 0?lF(v,l,n):aF(v,l)&&(n.reordered=!0)}(C||g||a.size)&&(e.rowDataUpdated=!0,this.deselect(c))}deleteUnusedNodes(e,{removals:t},o,s){const i=this.rootNode._leafs;for(let n=0,r=i.length;n<r;n++){const a=i[n];e.has(a)||this.destroyNode(a,s)&&(t.push(a),a.isSelected()&&o.push(a))}return t.length>0}updateRowData(e,t,o){if(this.dispatchRowDataUpdateStarted(e.add),this.beans.groupStage?.getNestedDataGetter())return D(268),{remove:[],update:[],add:[]};const s=[],i=vs(this.gos),n=this.executeRemove(i,e,t,s,o),r=this.executeUpdate(i,e,t,s),a=this.executeAdd(e,t);return this.deselect(s),{remove:n,update:r,add:a}}executeRemove(e,{remove:t},{adds:o,updates:s,removals:i},n,r){const a=this.rootNode._leafs,l=a?.length,c=t?.length;if(!c||!l)return[];let d=0,u=l,h=0;const g=new Array(c);for(let f=0;f<c;++f){const m=this.lookupNode(e,t[f]);if(!m)continue;const C=m.sourceRowIndex;C<u&&(u=C),C>h&&(h=C),g[d++]=m,this.destroyNode(m,r)&&(m.isSelected()&&n.push(m),o.delete(m)||(s.delete(m),i.push(m)))}return g.length=d,d&&rF(a,u,h),g}executeUpdate(e,{update:t},{adds:o,updates:s},i){const n=t?.length;if(!n)return[];const r=new Array(n);let a=0;for(let l=0;l<n;l++){const c=t[l],d=this.lookupNode(e,c);d&&(d.updateData(c),!d.selectable&&d.isSelected()&&i.push(d),r[a++]=d,o.has(d)||s.add(d))}return r.length=a,r}executeAdd(e,t){var o;const s=(o=this.rootNode)._leafs??(o._leafs=[]),i=s.length,n=e.add,r=n?.length;if(!r)return[];const a=i+r;let l=this.sanitizeAddIndex(s,e.addIndex);if(l<i){for(let u=i-1,h=a-1;u>=l;--u){const g=s[u];g.sourceRowIndex=h,s[h--]=g}t.reordered=!0}s.length=a;const c=new Array(r),d=t.adds;for(let u=0;u<r;u++){const h=this.createRowNode(n[u],0,l);d.add(h),s[l]=h,c[u]=h,l++}return c}dispatchRowDataUpdateStarted(e){this.eventSvc.dispatchEvent({type:"rowDataUpdateStarted",firstRowData:e?.length?e[0]:null})}deselect(e){const t="rowDataChanged",o=this.beans.selectionSvc;e.length&&o?.setNodesSelected({newValue:!1,nodes:e,suppressFinishActions:!0,source:t}),o?.updateGroupsFromChildrenSelections?.(t),e.length&&this.eventSvc.dispatchEvent({type:"selectionChanged",source:t,selectedNodes:o?.getSelectedNodes()??null,serverSideState:null})}createRowNode(e,t,o){const s=new co(this.beans);s.parent=this.rootNode,s.level=t,s.group=!1,o!=null&&(s.sourceRowIndex=o),s.setDataAndId(e,String(this.nextId++));const i=s.id,n=this.allNodesMap;return n[i]&&D(2,{nodeId:i}),n[i]=s,s}destroyNode(e,t){if(!e._destroy(t))return!1;const o=e.id,s=this.allNodesMap;return s[o]===e&&delete s[o],!0}lookupNode(e,t){if(!e)return nF(this.rootNode._leafs,t);const o=e({data:t,level:0}),s=this.allNodesMap[o];return s||(ce(4,{id:o}),null)}sanitizeAddIndex(e,t){const o=e.length;if(typeof t!="number"||t<0||t>=o||Number.isNaN(t))return o;t=Math.ceil(t);const s=this.gos;return t>0&&s.get("treeData")&&s.get("getDataPath")&&(t=iF(e,t)),t}},iF=(e,t)=>{for(let o=0,s=e.length;o<s;o++)if(e[o]?.rowIndex==t-1)return o+1;return t},Vc=e=>{e.group=!0,e.level=-1,e._expanded=!0,e.id="ROOT_NODE_ID",e._leafs?.length!==0&&(e._leafs=[]);const t=[],o=[],s=[],i=[];e.childrenAfterGroup=t,e.childrenAfterSort=o,e.childrenAfterAggFilter=s,e.childrenAfterFilter=i;const n=e.sibling;return n&&(n.childrenAfterGroup=t,n.childrenAfterSort=o,n.childrenAfterAggFilter=s,n.childrenAfterFilter=i,n.childrenMapped=e.childrenMapped),e.updateHasChildren(),e},nF=(e,t)=>{if(e)for(let o=0,s=e.length;o<s;o++){const i=e[o];if(i.data===t)return i}return ce(5,{data:t}),null},rF=(e,t,o)=>{t=Math.max(0,t);for(let s=t,i=e.length;s<i;++s){const n=e[s];s<=o&&n.destroyed||(n.sourceRowIndex=t,e[t++]=n)}e.length=t},aF=(e,t)=>{const o=t.size;e.length=o;let s=0,i=!1,n=!1;for(const r of t){const a=r.sourceRowIndex;a===s?n||(n=i):(a>=0?n=!0:i=!0,r.sourceRowIndex=s,e[s]=r),++s}return n},lF=(e,t,{adds:o})=>{const s=e.length,i=t.size;i>s&&(e.length=i);let n=0;for(let r=0;r<s;++r){const a=e[r];a.destroyed||(n!==r&&(a.sourceRowIndex=n,e[n]=a),++n)}for(const r of o)r.sourceRowIndex<0&&(r.sourceRowIndex=n,e[n++]=r);e.length=n};function Qr(e){const t=e.sibling;t&&(t.childrenAfterFilter=e.childrenAfterFilter)}var cF=class extends x{constructor(){super(...arguments),this.beanName="filterStage",this.step="filter",this.refreshProps=["excludeChildrenWhenTreeDataFiltering"]}wireBeans(e){this.filterManager=e.filterManager}execute(e){const t=!!this.filterManager?.isChildFilterPresent();this.beans.formula?.active?this.softFilter(t,e):this.filterNodes(t,e)}filterNodes(e,t){const o=(s,i)=>{s.hasChildren()&&e&&!i?s.childrenAfterFilter=s.childrenAfterGroup.filter(n=>{const r=n.childrenAfterFilter&&n.childrenAfterFilter.length>0,a=n.data&&this.filterManager.doesRowPassFilter({rowNode:n});return r||a}):s.childrenAfterFilter=s.childrenAfterGroup,Qr(s)};if(this.doingTreeDataFiltering()){const s=(i,n)=>{if(i.childrenAfterGroup)for(let r=0;r<i.childrenAfterGroup.length;r++){const a=i.childrenAfterGroup[r],l=n||this.filterManager.doesRowPassFilter({rowNode:a});a.childrenAfterGroup?s(i.childrenAfterGroup[r],l):o(a,l)}o(i,n)};s(this.beans.rowModel.rootNode,!1)}else{const s=i=>o(i,!1);zo(this.beans.rowModel.rootNode,this.beans.rowModel.hierarchical,t,s)}}softFilter(e,t){const o=i=>{if(i.childrenAfterFilter=i.childrenAfterGroup,i.hasChildren())for(const n of i.childrenAfterGroup)n.softFiltered=e&&!(n.data&&this.filterManager.doesRowPassFilter({rowNode:n}));Qr(i)},s=this.beans.rowModel;zo(s.rootNode,s.hierarchical,t,o)}doingTreeDataFiltering(){const{gos:e}=this;return!!this.beans.groupStage?.treeData&&!e.get("excludeChildrenWhenTreeDataFiltering")}},dF=4,uF=(e,t,o,s,i)=>{const n=t.childrenAfterSort,r=t.childrenAfterAggFilter;if(!r)return n&&n.length>0?n:[];const a=r.length;if(a<=1)return n?.length===a&&(a===0||n[0]===r[0])?n:r.slice();if(!n||a<=dF)return e.doFullSortInPlace(r.slice(),i);const l=new Map,{updates:c,adds:d}=o,u=[];for(let g=0;g<a;++g){const f=r[g];c.has(f)||d.has(f)||s?.hasRow(f)?(l.set(f,~g),u.push(f)):l.set(f,g)}const h=u.length;return h===0?a===n.length?n:gF(n,l,u):(u.sort((g,f)=>e.compareRowNodes(i,g,f)||~l.get(g)-~l.get(f)),h===a?u:hF(e,i,u,n,l,a))},hF=(e,t,o,s,i,n)=>{const r=new Array(n);let a=0,l=o[a],c,d=-1,u=0,h=0;const g=o.length,f=s.length;for(;;){if(d<0){if(u>=f)break;if(c=s[u++],d=i.get(c)??-1,d<0)continue}if((e.compareRowNodes(t,l,c)||~i.get(l)-d)<0){if(r[h++]=l,++a>=g)break;l=o[a]}else r[h++]=c,d=-1}for(;a<g;)r[h++]=o[a++];if(d<0)return r;for(r[h++]=c;u<f;){const m=s[u++];i.get(m)>=0&&(r[h++]=m)}return r},gF=(e,t,o)=>{let s=0;o.length=t.size;for(let i=0,n=e.length;i<n;++i){const r=e[i];t.has(r)&&(o[s++]=r)}return o.length=s,o},sg=e=>{const t=e.childrenAfterSort,o=e.sibling;if(o&&(o.childrenAfterSort=t),!!t)for(let s=0,i=t.length-1;s<=i;s++){const n=t[s],r=s===0,a=s===i;n.firstChild!==r&&(n.firstChild=r,n.dispatchRowEvent("firstChildChanged")),n.lastChild!==a&&(n.lastChild=a,n.dispatchRowEvent("lastChildChanged")),n.childIndex!==s&&(n.childIndex=s,n.dispatchRowEvent("childIndexChanged"))}},pF=class extends x{constructor(){super(...arguments),this.beanName="sortStage",this.step="sort",this.refreshProps=["postSortRows","groupDisplayType","accentedSort"]}execute(e,t){const o=this.beans.sortSvc.getSortOptions(),s=o.length>0&&!!t&&this.gos.get("deltaSort"),{gos:i,colModel:n,rowGroupColsSvc:r,rowNodeSorter:a,rowRenderer:l,showRowGroupCols:c}=this.beans,d=i.get("groupMaintainOrder"),u=n.getCols().some(w=>w.isRowGroupActive()),h=r?.columns,g=n.isPivotMode(),f=i.getCallback("postSortRows");let m=!1,C;const v=w=>{const b=g&&w.leafGroup;let y=d&&u&&!w.leafGroup;y&&(C??(C=this.shouldSortContainsGroupCols(o)),y&&(y=!C));let S=null;if(y){let F=!1;if(h){const E=w.level+1;E<h.length&&(F=h[E].wasSortExplicitlyRemoved)}F||(S=fF(w))}else!o.length||b||(s&&t?S=uF(a,w,t,e,o):S=a.doFullSortInPlace(w.childrenAfterAggFilter.slice(),o));if(S||(S=w.childrenAfterAggFilter?.slice()??[]),m||(m=w.childrenAfterSort?.[0]!==S[0]),w.childrenAfterSort=S,sg(w),f){const F={nodes:w.childrenAfterSort};f(F)}};if(zo(this.beans.rowModel.rootNode,this.beans.rowModel.hierarchical,e,v),m&&i.get("groupHideOpenParents")){const w=c?.columns;w?.length&&l.refreshCells({columns:w,force:!0})}}shouldSortContainsGroupCols(e){const t=e.length;if(!t)return!1;if(Bt(this.gos)){for(let o=0;o<t;++o){const s=e[o].column;if(s.isPrimary()&&s.isRowGroupActive())return!0}return!1}for(let o=0;o<t;++o)if(e[o].column.getColDef().showRowGroup)return!0;return!1}},fF=e=>{const t=e.childrenAfterSort,o=e.childrenAfterAggFilter,s=t?.length,i=o?.length;if(!s||!i)return null;const n=new Array(i),r=new Set;for(let l=0;l<i;++l)r.add(o[l]);let a=0;for(let l=0;l<s;++l){const c=t[l];r.delete(c)&&(n[a++]=c)}if(r.size===0&&a===s)return t;for(const l of r)n[a++]=l;return n.length=a,n},mF=class extends x{constructor(){super(...arguments),this.beanName="rowModel",this.rootNode=null,this.rowCountReady=!1,this.hierarchical=!1,this.nodeManager=void 0,this.rowsToDisplay=[],this.formulaRows=[],this.stages=null,this.asyncTransactions=null,this.asyncTransactionsTimer=0,this.started=!1,this.refreshingData=!1,this.rowDataUpdatedPending=!1,this.refreshingModel=!1,this.pendingNewData=!1,this.noKeepRenderedRows=!1,this.noKeepUndoRedoStack=!1,this.noAnimate=!1,this.rowNodesCountReady=!1,this.stagesRefreshProps=new Map,this.onRowHeightChanged_debounced=xe(this,this.onRowHeightChanged.bind(this),100)}postConstruct(){const e=this.beans,t=new co(e);this.rootNode=t,this.nodeManager=this.createBean(new sF(t));const o=()=>{this.beans.groupStage?.invalidateGroupCols(),this.refreshModel({step:"group",afterColumnsChanged:!0,keepRenderedRows:!0,animate:!this.gos.get("suppressAnimationFrame")})};this.addManagedEventListeners({newColumnsLoaded:o,columnRowGroupChanged:o,columnValueChanged:this.onValueChanged.bind(this),columnPivotChanged:()=>this.refreshModel({step:"pivot"}),columnPivotModeChanged:()=>this.refreshModel({step:"group"}),filterChanged:this.onFilterChanged.bind(this),sortChanged:this.onSortChanged.bind(this),stylesChanged:this.onGridStylesChanges.bind(this),gridReady:this.onGridReady.bind(this),rowExpansionStateChanged:this.onRowGroupOpened.bind(this)}),this.addPropertyListeners()}addPropertyListeners(){const{beans:e,stagesRefreshProps:t}=this,o=[e.groupStage,e.filterStage,e.pivotStage,e.aggStage,e.sortStage,e.filterAggStage,e.flattenStage].filter(s=>!!s);this.stages=o;for(let s=o.length-1;s>=0;--s){const i=o[s];for(const n of i.refreshProps)t.set(n,s)}this.addManagedPropertyListeners([...t.keys(),"rowData"],s=>{const i=s.changeSet?.properties;i&&this.onPropChange(i)}),this.addManagedPropertyListener("rowHeight",()=>this.resetRowHeights())}start(){this.started=!0,this.rowNodesCountReady?this.refreshModel({step:"group",rowDataUpdated:!0,newData:!0}):this.setInitialData()}setInitialData(){this.gos.get("rowData")&&this.onPropChange(["rowData"])}ensureRowHeightsValid(e,t,o,s){let i,n=!1;do{i=!1;const r=this.getRowIndexAtPixel(e),a=this.getRowIndexAtPixel(t),l=Math.max(r,o),c=Math.min(a,s);for(let d=l;d<=c;d++){const u=this.getRow(d);if(u.rowHeightEstimated){const h=ro(this.beans,u);u.setRowHeight(h.height),i=!0,n=!0}}i&&this.setRowTopAndRowIndex()}while(i);return n}onPropChange(e){const{nodeManager:t,gos:o,beans:s}=this,i=s.groupStage;if(!t)return;const n=new Set(e),r=i?.onPropChange(n);let a;n.has("rowData")?a=o.get("rowData"):r&&(a=i?.extractData()),a&&!Array.isArray(a)&&(a=null,D(1));const l={step:"nothing",changedProps:n};if(a){const d=!r&&!this.isEmpty()&&a.length>0&&o.exists("getRowId")&&!o.get("resetRowDataOnUpdate");this.refreshingData=!0,d?(l.keepRenderedRows=!0,l.animate=!o.get("suppressAnimationFrame"),l.changedRowNodes=new Hi,t.setImmutableRowData(l,a)):(l.rowDataUpdated=!0,l.newData=!0,t.setNewRowData(a),this.rowNodesCountReady=!0)}const c=l.rowDataUpdated?"group":this.getRefreshedStage(e);c&&(l.step=c,this.refreshModel(l))}getRefreshedStage(e){const{stages:t,stagesRefreshProps:o}=this;if(!t)return null;const s=t.length;let i=s;for(let n=0,r=e.length;n<r&&i;++n)i=Math.min(i,o.get(e[n])??i);return i<s?t[i].step:null}setRowTopAndRowIndex(e){const{beans:t,rowsToDisplay:o}=this,s=t.environment.getDefaultRowHeight();let i=0;const n=Le(this.gos,"normal");for(let r=0,a=o.length;r<a;++r){const l=o[r],c=l.id;if(c!=null&&e?.add(c),l.rowHeight==null){const d=ro(t,l,n,s);l.setRowHeight(d.height,d.estimated)}l.setRowTop(i),l.setRowIndex(r),i+=l.rowHeight}if(this.beans.formula?.active){const r=this.formulaRows;for(let a=0,l=r.length;a<l;++a){const c=r[a];c.formulaRowIndex=a}}}clearRowTopAndRowIndex(e,t){const o=n=>{n?.id!=null&&!t.has(n.id)&&n.clearRowTopAndRowIndex()},s=n=>{o(n),o(n.detailNode),o(n.sibling);const r=n.childrenAfterGroup;if(!(!n.hasChildren()||!r)&&!(e&&n.level!==-1&&!n.expanded))for(let a=0,l=r.length;a<l;++a)s(r[a])},i=this.rootNode;i&&s(i)}isLastRowIndexKnown(){return!0}getRowCount(){return this.rowsToDisplay.length}getTopLevelRowCount(){const{rootNode:e,rowsToDisplay:t}=this;if(!e||!t.length)return 0;if(t[0]===e)return 1;const s=e.sibling?.displayed?1:0;return(e.childrenAfterSort?.length??0)+s}getTopLevelRowDisplayedIndex(e){const{beans:t,rootNode:o,rowsToDisplay:s}=this;if(!o||!s.length||s[0]===o)return e;const n=o.childrenAfterSort,r=l=>{let c=n[l];if(this.gos.get("groupHideOpenParents"))for(;c.expanded&&c.childrenAfterSort&&c.childrenAfterSort.length>0;)c=c.childrenAfterSort[0];return c.rowIndex},a=t.footerSvc;return a?a?.getTopDisplayIndex(s,e,n,r):r(e)}getTopLevelIndexFromDisplayedIndex(e){const{rootNode:t,rowsToDisplay:o}=this;if(!t||!o.length||o[0]===t)return e;let i=this.getRow(e);i.footer&&(i=i.sibling);let n=i.parent;for(;n&&n!==t;)i=n,n=i.parent;const r=t.childrenAfterSort?.indexOf(i)??-1;return r>=0?r:e}getRowBounds(e){const t=this.rowsToDisplay[e];return t?{rowTop:t.rowTop,rowHeight:t.rowHeight}:null}onRowGroupOpened(){this.refreshModel({step:"map",keepRenderedRows:!0,animate:cs(this.gos)})}onFilterChanged({afterDataChange:e,columns:t}){if(!e){const s=t.length===0||t.some(i=>i.isPrimary())?"filter":"filter_aggregates";this.refreshModel({step:s,keepRenderedRows:!0,animate:cs(this.gos)})}}onSortChanged(){this.refreshModel({step:"sort",keepRenderedRows:!0,animate:cs(this.gos)})}getType(){return"clientSide"}onValueChanged(){this.refreshModel({step:this.beans.colModel.isPivotActive()?"pivot":"aggregate"})}isSuppressModelUpdateAfterUpdateTransaction(e){if(!this.gos.get("suppressModelUpdateAfterUpdateTransaction"))return!1;const{changedRowNodes:t,newData:o,rowDataUpdated:s}=e;return!(!t||o||!s||t.removals.length||t.adds.size)}reMapRows(){if(this.refreshingModel||this.refreshingData){this.noKeepRenderedRows=!0,this.noKeepUndoRedoStack=!0,this.noAnimate=!0;return}this.refreshModel({step:"map",keepRenderedRows:!1,keepUndoRedoStack:!1,animate:!1})}refreshModel(e){const{nodeManager:t,eventSvc:o,started:s}=this;if(!t)return;const i=!!e.rowDataUpdated;if(s&&i&&o.dispatchEvent({type:"rowDataUpdated"}),this.deferRefresh(e)){this.setPendingRefreshFlags(e),this.rowDataUpdatedPending||(this.rowDataUpdatedPending=i);return}this.rowDataUpdatedPending&&(this.rowDataUpdatedPending=!1,e.step="group"),this.updateRefreshParams(e);let n=!1;this.refreshingModel=!0;try{this.executeRefresh(e,i),n=!0}finally{this.refreshingData=!1,this.refreshingModel=!1,n||this.setPendingRefreshFlags(e)}this.clearPendingRefreshFlags(),o.dispatchEvent({type:"modelUpdated",animate:e.animate,keepRenderedRows:e.keepRenderedRows,newData:e.newData,newPage:!1,keepUndoRedoStack:e.keepUndoRedoStack})}executeRefresh(e,t){const{beans:o,rootNode:s}=this;o.masterDetailSvc?.refreshModel(e),t&&e.step!=="group"&&o.colFilter?.refreshModel();let i=e.changedPath;switch(i?.addRow(s),e.step==="group"&&(this.doGrouping(s,e),i??(i=e.changedPath)),i??(i=o.changedPathFactory?.ensureRowsPath(e,s)),e.step){case"group":case"filter":this.doFilter(i);case"pivot":this.doPivot(i)&&(i=void 0,e.changedPath=void 0);case"aggregate":this.doAggregate(i);case"filter_aggregates":this.doFilterAggregates(i);case"sort":this.doSort(i,e.changedRowNodes);case"map":this.doRowsToDisplay()}const n=new Set;this.setRowTopAndRowIndex(n),this.clearRowTopAndRowIndex(i,n),this.updateRefreshParams(e)}deferRefresh(e){return this.refreshingModel||this.beans.colModel.changeEventsDispatching?!0:this.isSuppressModelUpdateAfterUpdateTransaction(e)?(this.started&&(this.refreshingData=!1),!0):!this.started}setPendingRefreshFlags(e){this.pendingNewData||(this.pendingNewData=!!e.newData),this.noKeepRenderedRows||(this.noKeepRenderedRows=!e.keepRenderedRows),this.noKeepUndoRedoStack||(this.noKeepUndoRedoStack=!e.keepUndoRedoStack),this.noAnimate||(this.noAnimate=!e.animate)}clearPendingRefreshFlags(){this.pendingNewData=!1,this.noKeepRenderedRows=!1,this.noKeepUndoRedoStack=!1,this.noAnimate=!1}updateRefreshParams(e){e.newData=this.pendingNewData||!!e.newData,e.keepRenderedRows=!this.noKeepRenderedRows&&!!e.keepRenderedRows,e.keepUndoRedoStack=!this.noKeepUndoRedoStack&&!!e.keepUndoRedoStack,e.animate=!this.noAnimate&&!!e.animate}isEmpty(){return!this.rootNode?._leafs?.length||!this.beans.colModel?.ready}isRowsToRender(){return this.rowsToDisplay.length>0}getOverlayType(){const{beans:e,gos:t}=this;if(this.rootNode?._leafs?.length){if(e.filterManager?.isAnyFilterPresent()&&this.getRowCount()===0)return"noMatchingRows"}else if(this.rowCountReady||(t.get("rowData")?.length??0)==0)return"noRows";return null}getNodesInRangeForSelection(e,t){let o=!1,s=!1;const i=[],n=ti(this.gos);return this.forEachNodeAfterFilterAndSort(r=>{if(s)return;if(o&&(r===t||r===e)&&(s=!0,n&&r.group)){ig(i,r);return}if(!o){if(r!==t&&r!==e)return;o=!0,t===e&&(s=!0)}(!r.group||!n)&&i.push(r)}),i}getTopLevelNodes(){return this.rootNode?.childrenAfterGroup??null}getRow(e){return this.rowsToDisplay[e]}getFormulaRow(e){return this.formulaRows[e]}isRowPresent(e){return this.rowsToDisplay.indexOf(e)>=0}getRowIndexAtPixel(e){const t=this.rowsToDisplay,o=t.length;if(this.isEmpty()||o===0)return-1;let s=0,i=o-1;if(e<=0)return 0;if(t[i].rowTop<=e)return i;let r=-1,a=-1;for(;;){const l=Math.floor((s+i)/2),c=t[l];if(this.isRowInPixel(c,e)||(c.rowTop<e?s=l+1:c.rowTop>e&&(i=l-1),r===s&&a===i))return l;r=s,a=i}}isRowInPixel(e,t){const o=e.rowTop,s=o+e.rowHeight;return o<=t&&s>t}forEachLeafNode(e){const t=this.rootNode?._leafs;if(t)for(let o=0,s=t.length;o<s;++o)e(t[o],o)}forEachNode(e,t=!1){this.depthFirstSearchRowNodes(e,t)}forEachDisplayedNode(e){const t=this.rowsToDisplay;for(let o=0,s=t.length;o<s;++o)e(t[o],o)}forEachNodeAfterFilter(e,t=!1){this.depthFirstSearchRowNodes(e,t,o=>o.childrenAfterAggFilter)}forEachNodeAfterFilterAndSort(e,t=!1){this.depthFirstSearchRowNodes(e,t,o=>o.childrenAfterSort)}forEachPivotNode(e,t,o){const{colModel:s,rowGroupColsSvc:i}=this.beans;if(!s.isPivotMode())return;if(!i?.columns.length){e(this.rootNode,0);return}const n=o?"childrenAfterSort":"childrenAfterGroup";this.depthFirstSearchRowNodes(e,t,r=>r.leafGroup?null:r[n])}depthFirstSearchRowNodes(e,t=!1,o=n=>n.childrenAfterGroup,s=this.rootNode,i=0){let n=i;if(!s)return n;const r=s===this.rootNode;if(r||e(s,n++),s.hasChildren()&&!s.footer){const a=r||this.hierarchical?o(s):null;if(a){const l=this.beans.footerSvc;n=l?.addTotalRows(n,s,e,t,r,"top")??n;for(const c of a)n=this.depthFirstSearchRowNodes(e,t,o,c,n);return l?.addTotalRows(n,s,e,t,r,"bottom")??n}}return n}doAggregate(e){this.rootNode&&this.beans.aggStage?.execute(e)}doFilterAggregates(e){const t=this.rootNode,o=this.beans.filterAggStage;if(o&&this.hierarchical){o.execute(e);return}t.childrenAfterAggFilter=t.childrenAfterFilter;const s=t.sibling;s&&(s.childrenAfterAggFilter=t.childrenAfterFilter)}doSort(e,t){const o=this.beans.sortStage;if(o){o.execute(e,t);return}zo(this.rootNode,this.hierarchical,e,s=>{s.childrenAfterSort=s.childrenAfterAggFilter.slice(0),sg(s)})}doGrouping(e,t){const s=this.beans.groupStage?.execute(t);if(s===void 0){const i=e._leafs;e.childrenAfterGroup=i,e.updateHasChildren();const n=e.sibling;n&&(n.childrenAfterGroup=i)}(s||t.rowDataUpdated)&&this.beans.colFilter?.refreshModel(),!this.rowCountReady&&this.rowNodesCountReady&&(this.rowCountReady=!0,this.eventSvc.dispatchEventOnce({type:"rowCountReady"}))}doFilter(e){const t=this.beans.filterStage;if(t){t.execute(e);return}zo(this.rootNode,this.hierarchical,e,o=>{o.childrenAfterFilter=o.childrenAfterGroup,Qr(o)})}doPivot(e){return this.beans.pivotStage?.execute(e)??!1}getRowNode(e){const t=this.nodeManager?.getRowNode(e);return typeof t=="object"?t:this.beans.groupStage?.getNonLeaf(e)}batchUpdateRowData(e,t){if(!this.asyncTransactionsTimer){this.asyncTransactions=[];const o=this.gos.get("asyncTransactionWaitMillis");this.asyncTransactionsTimer=setTimeout(()=>this.executeBatchUpdateRowData(),o)}this.asyncTransactions.push({rowDataTransaction:e,callback:t})}flushAsyncTransactions(){const e=this.asyncTransactionsTimer;e&&(clearTimeout(e),this.executeBatchUpdateRowData())}executeBatchUpdateRowData(){const{nodeManager:e,beans:t,eventSvc:o,asyncTransactions:s}=this;if(!e)return;t.valueCache?.onDataChanged();const i=[],n=[],r=new Hi,a=!this.gos.get("suppressAnimationFrame");for(const{rowDataTransaction:l,callback:c}of s??[]){this.rowNodesCountReady=!0,this.refreshingData=!0;const d=e.updateRowData(l,r,a);i.push(d),c&&n.push(c.bind(null,d))}this.commitTransactions(r,a),n.length>0&&setTimeout(()=>{for(let l=0,c=n.length;l<c;l++)n[l]()},0),i.length>0&&o.dispatchEvent({type:"asyncTransactionsFlushed",results:i}),this.asyncTransactionsTimer=0,this.asyncTransactions=null}updateRowData(e){const t=this.nodeManager;if(!t)return null;this.beans.valueCache?.onDataChanged(),this.rowNodesCountReady=!0;const o=new Hi,s=!this.gos.get("suppressAnimationFrame");this.refreshingData=!0;const i=t.updateRowData(e,o,s);return this.commitTransactions(o,s),i}commitTransactions(e,t){this.refreshModel({step:"group",rowDataUpdated:!0,keepRenderedRows:!0,animate:t,changedRowNodes:e})}doRowsToDisplay(){const{rootNode:e,beans:t}=this;if(t.formula?.active){const i=e?.childrenAfterSort??[];this.formulaRows=i,this.rowsToDisplay=i.filter(n=>!n.softFiltered);for(const n of this.rowsToDisplay)n.setUiLevel(0);return}const o=t.flattenStage;if(o){this.rowsToDisplay=o.execute();return}const s=this.rootNode.childrenAfterSort??[];for(const i of s)i.setUiLevel(0);this.rowsToDisplay=s}onRowHeightChanged(){this.refreshModel({step:"map",keepRenderedRows:!0,keepUndoRedoStack:!0})}resetRowHeights(){const e=this.rootNode;if(!e)return;const t=this.resetRowHeightsForAllRowNodes();e.setRowHeight(e.rowHeight,!0);const o=e.sibling;o?.setRowHeight(o.rowHeight,!0),t&&this.onRowHeightChanged()}resetRowHeightsForAllRowNodes(){let e=!1;return this.forEachNode(t=>{t.setRowHeight(t.rowHeight,!0);const o=t.detailNode;o?.setRowHeight(o.rowHeight,!0);const s=t.sibling;s?.setRowHeight(s.rowHeight,!0),e=!0}),e}onGridStylesChanges(e){e.rowHeightChanged&&!this.beans.rowAutoHeight?.active&&this.resetRowHeights()}onGridReady(){this.started||this.setInitialData()}destroy(){super.destroy(),this.nodeManager=this.destroyBean(this.nodeManager),this.started=!1,this.rootNode=null,this.rowsToDisplay=[],this.asyncTransactions=null,this.stages=null,this.stagesRefreshProps.clear(),clearTimeout(this.asyncTransactionsTimer)}onRowHeightChangedDebounced(){this.onRowHeightChanged_debounced()}},ig=(e,t)=>{const o=t.childrenAfterGroup;if(o)for(let s=0,i=o.length;s<i;++s){const n=o[s];n.data&&e.push(n),n.group&&ig(e,n)}};function CF(e){e.expansionSvc?.onGroupExpandedOrCollapsed()}function vF(e,t){const o=Ot(e);o&&((!t||t==="everything")&&(t="group"),o.refreshModel({step:t,keepRenderedRows:!0,animate:!e.gos.get("suppressAnimationFrame")}))}function wF(e){return Ot(e)?.isEmpty()??!0}function bF(e,t){Ot(e)?.forEachLeafNode(t)}function SF(e,t){Ot(e)?.forEachNodeAfterFilter(t)}function yF(e,t){Ot(e)?.forEachNodeAfterFilterAndSort(t)}function RF(e,t){return e.frameworkOverrides.wrapIncoming(()=>Ot(e)?.updateRowData(t))}function FF(e,t,o){e.frameworkOverrides.wrapIncoming(()=>Ot(e)?.batchUpdateRowData(t,o))}function EF(e){e.frameworkOverrides.wrapIncoming(()=>Ot(e)?.flushAsyncTransactions())}function xF(e){return e.selectionSvc?.getBestCostNodeSelection()}var PF={moduleName:"ClientSideRowModel",version:I,rowModels:["clientSide"],beans:[mF,pF],dependsOn:[Kh]},DF={moduleName:"ClientSideRowModelApi",version:I,apiFunctions:{onGroupExpandedOrCollapsed:CF,refreshClientSideRowModel:vF,isRowDataEmpty:wF,forEachLeafNode:bF,forEachNodeAfterFilter:SF,forEachNodeAfterFilterAndSort:yF,applyTransaction:RF,applyTransactionAsync:FF,flushAsyncTransactions:EF,getBestCostNodeSelection:xF,resetRowHeights:tg,onRowHeightChanged:eg},dependsOn:[eF,tF]},MF=":where(.ag-ltr) :where(.ag-animate-autosize){.ag-cell,.ag-header-cell,.ag-header-group-cell{transition:width .2s ease-in-out,left .2s ease-in-out}}:where(.ag-rtl) :where(.ag-animate-autosize){.ag-cell,.ag-header-cell,.ag-header-group-cell{transition:width .2s ease-in-out,right .2s ease-in-out}}";function TF(e,t){typeof t=="number"?e.colAutosize?.sizeColumnsToFit(t,"api"):e.colAutosize?.sizeColumnsToFitGridBody(t)}function ng({colAutosize:e,visibleCols:t},o,s){Array.isArray(o)?e?.autoSizeCols({colKeys:o,skipHeader:s,source:"api"}):e?.autoSizeCols({...o,colKeys:o.colIds??t.allCols,source:"api"})}function IF(e,t){t&&typeof t=="object"?ng(e,t):e.colAutosize?.autoSizeAllColumns({source:"api",skipHeader:t})}var AF=class extends x{constructor(){super(...arguments),this.beanName="colAutosize",this.timesDelayed=0,this.shouldQueueResizeOperations=!1,this.resizeOperationQueue=[]}postConstruct(){const{gos:e}=this,t=e.get("autoSizeStrategy");if(t){let o=!1;const s=t.type;if(s==="fitGridWidth"||s==="fitProvidedWidth")o=!0;else if(s==="fitCellContents"){this.addManagedEventListeners({firstDataRendered:()=>this.onFirstDataRendered(t)});const i=e.get("rowData");o=i!=null&&i.length>0&&Se(e)}o&&this.beans.colDelayRenderSvc?.hideColumns(s)}}autoSizeCols(e){const{eventSvc:t,visibleCols:o,colModel:s}=this.beans;As(this.beans,!0),this.innerAutoSizeCols(e).then(i=>{const n=d=>Ss(t,Array.from(d),!0,"autosizeColumns");if(!e.scaleUpToFitGridWidth)return As(this.beans,!1),n(i);const r=Nc(this.beans),a=d=>o.leftCols.some(u=>Ws(u,d)),l=d=>o.rightCols.some(u=>Ws(u,d)),c=e.colKeys.filter(d=>!s.getCol(d)?.getColDef().suppressAutoSize&&!Ue(d)&&!a(d)&&!l(d));this.sizeColumnsToFit(r,e.source,!0,{defaultMaxWidth:e.defaultMaxWidth,defaultMinWidth:e.defaultMinWidth,columnLimits:e.columnLimits?.map(d=>({...d,key:d.colId})),colKeys:c,onlyScaleUp:!0,animate:!1}),As(this.beans,!1),n(i)})}innerAutoSizeCols(e){return new Promise((t,o)=>{if(this.shouldQueueResizeOperations)return this.pushResizeOperation(()=>this.innerAutoSizeCols(e).then(t,o));const{colKeys:s,skipHeader:i,skipHeaderGroups:n,stopAtGroup:r,defaultMaxWidth:a,defaultMinWidth:l,columnLimits:c=[],source:d="api"}=e,{animationFrameSvc:u,renderStatus:h,colModel:g,autoWidthCalc:f,visibleCols:m}=this.beans;if(u?.flushAllFrames(),this.timesDelayed<5&&h&&(!h.areHeaderCellsRendered()||!h.areCellsRendered())){this.timesDelayed++,setTimeout(()=>{this.isAlive()&&this.innerAutoSizeCols(e).then(t,o)});return}this.timesDelayed=0;const C=new Set;let v=-1;const w=Object.fromEntries(c.map(({colId:S,...F})=>[S,F])),b=i??this.gos.get("skipHeaderOnAutoSize"),y=n??b;for(;v!==0;){v=0;const S=[];for(const F of s){if(!F||cm(F))continue;const E=g.getCol(F);if(!E||C.has(E)||E.getColDef().suppressAutoSize)continue;const G=f.getPreferredWidthForColumn(E,b);if(G>0){const k=w[E.colId]??{};k.minWidth??(k.minWidth=l),k.maxWidth??(k.maxWidth=a);const O=kF(E,G,k);E.setActualWidth(O,d),C.add(E),v++}S.push(E)}S.length&&m.refresh(d)}y||this.autoSizeColumnGroupsByColumns(s,d,r),t(C)})}autoSizeColumn(e,t,o){this.autoSizeCols({colKeys:[e],skipHeader:o,skipHeaderGroups:!0,source:t})}autoSizeColumnGroupsByColumns(e,t,o){const{colModel:s,ctrlsSvc:i}=this.beans,n=new Set,r=s.getColsForKeys(e);for(const l of r){let c=l.getParent();for(;c&&c!=o;)c.isPadding()||n.add(c),c=c.getParent()}let a;for(const l of n){for(const c of i.getHeaderRowContainerCtrls())if(a=c.getHeaderCtrlForColumn(l),a)break;a?.resizeLeafColumnsToFit(t)}}autoSizeAllColumns(e){if(this.shouldQueueResizeOperations){this.pushResizeOperation(()=>this.autoSizeAllColumns(e));return}this.autoSizeCols({colKeys:this.beans.visibleCols.allCols,...e})}addColumnAutosizeListeners(e,t){const o=this.gos.get("skipHeaderOnAutoSize"),s=()=>{this.autoSizeColumn(t,"uiColumnResized",o)};e.addEventListener("dblclick",s);const i=new bo(e);return i.addEventListener("doubleTap",s),()=>{e.removeEventListener("dblclick",s),i.destroy()}}addColumnGroupResize(e,t,o){const s=this.gos.get("skipHeaderOnAutoSize"),i=()=>{const n=[],r=t.getDisplayedLeafColumns();for(const a of r)a.getColDef().suppressAutoSize||n.push(a.getColId());n.length>0&&this.autoSizeCols({colKeys:n,skipHeader:s,stopAtGroup:t,source:"uiColumnResized"}),o()};return e.addEventListener("dblclick",i),()=>e.removeEventListener("dblclick",i)}sizeColumnsToFitGridBody(e,t){if(!this.isAlive())return;const o=Nc(this.beans);if(o>0){this.sizeColumnsToFit(o,"sizeColumnsToFit",!1,e);return}t===void 0?window.setTimeout(()=>{this.sizeColumnsToFitGridBody(e,100)},0):t===100?window.setTimeout(()=>{this.sizeColumnsToFitGridBody(e,500)},100):t===500?window.setTimeout(()=>{this.sizeColumnsToFitGridBody(e,-1)},500):D(29)}sizeColumnsToFit(e,t="sizeColumnsToFit",o,s){if(this.shouldQueueResizeOperations){this.pushResizeOperation(()=>this.sizeColumnsToFit(e,t,o,s));return}const{beans:i}=this,n=s?.animate??!0;n&&As(i,!0);const r={};for(const{key:v,...w}of s?.columnLimits??[])r[typeof v=="string"?v:v.getColId()]=w;const a=i.visibleCols.allCols;if(e<=0||!a.length)return;const l=Ht(a);if(s?.onlyScaleUp&&l>e||e===l&&a.every(w=>{if(w.colDef.suppressSizeToFit)return!0;const b=r?.[w.getId()],y=b?.minWidth??s?.defaultMinWidth,S=b?.maxWidth??s?.defaultMaxWidth,F=w.getActualWidth();return(y==null||F>=y)&&(S==null||F<=S)}))return;const d=[],u=[];for(const v of a){const w=s?.colKeys?.some(b=>Ws(v,b))??!0;v.getColDef().suppressSizeToFit||!w?u.push(v):d.push(v)}const h=d.slice(0);let g=!1;const f=v=>{At(d,v),u.push(v)},m={};for(const v of d){s?.onlyScaleUp&&(m[v.getColId()]=v.getActualWidth()),v.resetActualWidth(t);const w=r?.[v.getId()],b=w?.minWidth??s?.defaultMinWidth??-1/0,y=w?.maxWidth??s?.defaultMaxWidth??1/0,S=v.getActualWidth(),F=Math.max(Math.min(S,y),b);F!=S&&v.setActualWidth(F,t,!0)}for(;!g;){g=!0;const v=e-Ht(u);if(v<=0)for(const w of d){const b=r?.[w.getId()]?.minWidth??s?.defaultMinWidth??w.minWidth;w.setActualWidth(b,t,!0)}else{const w=v/Ht(d);let b=v;for(let y=d.length-1;y>=0;y--){const S=d[y],F=S.getColId(),E=m[F],G=r?.[F],k=G?.minWidth??s?.defaultMinWidth??E,O=G?.maxWidth??s?.defaultMaxWidth,P=Math.max(k??-1/0,S.getMinWidth()),A=Math.min(O??1/0,S.getMaxWidth());let M=Math.round(S.getActualWidth()*w);M<P?(M=P,f(S),g=!1):M>A?(M=A,f(S),g=!1):y===0&&(M=b),S.setActualWidth(M,t,!0),b-=M}}}for(const v of h)v.fireColumnWidthChangedEvent(t);const C=i.visibleCols;C.setLeftValues(t),C.updateBodyWidths(),!o&&(Ss(this.eventSvc,h,!0,t),n&&As(i,!1))}applyAutosizeStrategy(){const{gos:e,colDelayRenderSvc:t}=this.beans,o=e.get("autoSizeStrategy");o?.type!=="fitGridWidth"&&o?.type!=="fitProvidedWidth"||setTimeout(()=>{if(!this.isAlive())return;const s=o.type;if(s==="fitGridWidth"){const{columnLimits:i,defaultMinWidth:n,defaultMaxWidth:r}=o,a=i?.map(({colId:l,minWidth:c,maxWidth:d})=>({key:l,minWidth:c,maxWidth:d}));this.sizeColumnsToFitGridBody({defaultMinWidth:n,defaultMaxWidth:r,columnLimits:a})}else s==="fitProvidedWidth"&&this.sizeColumnsToFit(o.width,"sizeColumnsToFit");t?.revealColumns(s)})}onFirstDataRendered({colIds:e,...t}){setTimeout(()=>{if(!this.isAlive())return;const o="autosizeColumns";e?this.autoSizeCols({...t,source:o,colKeys:e}):this.autoSizeAllColumns({...t,source:o}),this.beans.colDelayRenderSvc?.revealColumns(t.type)})}processResizeOperations(){this.shouldQueueResizeOperations=!1;for(const e of this.resizeOperationQueue)e();this.resizeOperationQueue=[]}pushResizeOperation(e){this.resizeOperationQueue.push(e)}destroy(){this.resizeOperationQueue.length=0,super.destroy()}};function kF(e,t,o={}){const s=o.minWidth??e.getMinWidth();t<s&&(t=s);const i=o.maxWidth??e.getMaxWidth();return t>i&&(t=i),t}function Nc({ctrlsSvc:e,scrollVisibleSvc:t}){const o=e.getGridBodyCtrl(),i=o.isVerticalScrollShowing()?t.getScrollbarWidth():0;return Zs(o.eGridBody)-i}var Wc="ag-animate-autosize";function As({ctrlsSvc:e,gos:t},o){if(!t.get("animateColumnResizing")||t.get("enableRtl")||!e.isAlive())return;const s=e.getGridBodyCtrl().eGridBody.classList;o?s.add(Wc):s.remove(Wc)}var LF={moduleName:"ColumnAutoSize",version:I,beans:[AF],apiFunctions:{sizeColumnsToFit:TF,autoSizeColumns:ng,autoSizeAllColumns:IF},dependsOn:[rh],css:[MF]};function OF(e,t){return!!e.colHover?.isHovered(t)}var GF=class extends x{constructor(e,t){super(),this.columns=e,this.element=t,this.destroyManagedListeners=[],this.enableFeature=o=>{const{beans:s,gos:i,element:n,columns:r}=this,a=s.colHover;if(o??!!i.get("columnHoverHighlight"))this.destroyManagedListeners=this.addManagedElementListeners(n,{mouseover:a.setMouseOver.bind(a,r),mouseout:a.clearMouseOver.bind(a)});else{for(const c of this.destroyManagedListeners)c();this.destroyManagedListeners=[]}}}postConstruct(){this.addManagedPropertyListener("columnHoverHighlight",({currentValue:e})=>{this.enableFeature(e)}),this.enableFeature()}destroy(){super.destroy(),this.destroyManagedListeners=null}},HF="ag-column-hover",BF=class extends x{constructor(){super(...arguments),this.beanName="colHover"}postConstruct(){this.addManagedPropertyListener("columnHoverHighlight",({currentValue:e})=>{e||this.clearMouseOver()})}setMouseOver(e){this.updateState(e)}clearMouseOver(){this.updateState(null)}isHovered(e){if(!this.gos.get("columnHoverHighlight"))return!1;const t=this.selectedColumns;return!!t&&t.indexOf(e)>=0}addHeaderColumnHoverListener(e,t,o){const s=()=>{const i=this.isHovered(o);t.toggleCss("ag-column-hover",i)};e.addManagedEventListeners({columnHoverChanged:s}),s()}onCellColumnHover(e,t){if(!t)return;const o=this.isHovered(e);t.toggleCss(HF,o)}addHeaderFilterColumnHoverListener(e,t,o,s){this.createHoverFeature(e,[o],s);const i=()=>{const n=this.isHovered(o);t.toggleCss("ag-column-hover",n)};e.addManagedEventListeners({columnHoverChanged:i}),i()}createHoverFeature(e,t,o){e.createManagedBean(new GF(t,o))}updateState(e){this.selectedColumns=e,this.eventSvc.dispatchEvent({type:"columnHoverChanged"})}},VF={moduleName:"ColumnHover",version:I,beans:[BF],apiFunctions:{isColumnHovered:OF}},NF=class extends x{constructor(){super(...arguments),this.beanName="gridSerializer"}wireBeans(e){this.visibleCols=e.visibleCols,this.colModel=e.colModel,this.rowModel=e.rowModel,this.pinnedRowModel=e.pinnedRowModel}serialize(e,t={}){const{allColumns:o,columnKeys:s,skipRowGroups:i,exportRowNumbers:n}=t,r=this.getColumnsToExport({allColumns:o,skipRowGroups:i,columnKeys:s,exportRowNumbers:n});return[this.prepareSession(r),this.prependContent(t),this.exportColumnGroups(t,r),this.exportHeaders(t,r),this.processPinnedTopRows(t,r),this.processRows(t,r),this.processPinnedBottomRows(t,r),this.appendContent(t)].reduce((a,l)=>l(a),e).parse()}processRow(e,t,o,s){const i=t.shouldRowBeSkipped||(()=>!1),r=t.rowPositions!=null||!!t.onlySelected,a=this.gos.get("groupHideOpenParents")&&!r,l=this.colModel.isPivotMode()?s.leafGroup:!s.group,c=!!s.footer,d=s.allChildrenCount===1&&s.childrenAfterGroup?.length===1&&Lf(this.gos,s);if(!l&&!c&&(t.skipRowGroups||d||a)||t.onlySelected&&!s.isSelected()||t.skipPinnedTop&&s.rowPinned==="top"||t.skipPinnedBottom&&s.rowPinned==="bottom"||s.stub||s.level===-1&&!l&&!c||i(K(this.gos,{node:s})))return;const g=e.onNewBodyRow(s);if(o.forEach((f,m)=>{g.onColumn(f,m,s)}),t.getCustomContentBelowRow){const f=t.getCustomContentBelowRow(K(this.gos,{node:s}));f&&e.addCustomContent(f)}}appendContent(e){return t=>{const o=e.appendContent;return o&&t.addCustomContent(o),t}}prependContent(e){return t=>{const o=e.prependContent;return o&&t.addCustomContent(o),t}}prepareSession(e){return t=>(t.prepare(e),t)}exportColumnGroups(e,t){return o=>{if(!e.skipColumnGroupHeaders){const s=new ch,{colGroupSvc:i}=this.beans,n=i?i.createColumnGroups({columns:t,idCreator:s,pinned:null,isStandaloneStructure:!0}):t;this.recursivelyAddHeaderGroups(n,o,e.processGroupHeaderCallback)}return o}}exportHeaders(e,t){return o=>{if(!e.skipColumnHeaders){const s=o.onNewHeaderRow();t.forEach((i,n)=>{s.onColumn(i,n,void 0)})}return o}}processPinnedTopRows(e,t){return o=>{const s=this.processRow.bind(this,o,e,t);return e.rowPositions?e.rowPositions.filter(i=>i.rowPinned==="top").sort((i,n)=>i.rowIndex-n.rowIndex).map(i=>this.pinnedRowModel?.getPinnedTopRow(i.rowIndex)).forEach(s):this.pinnedRowModel?.isManual()||this.pinnedRowModel?.forEachPinnedRow("top",s),o}}processRows(e,t){return o=>{const s=this.rowModel,i=Se(this.gos),n=xs(this.gos),r=!i&&e.onlySelected,a=this.processRow.bind(this,o,e,t),{exportedRows:l="filteredAndSorted"}=e;if(e.rowPositions)e.rowPositions.filter(c=>c.rowPinned==null).sort((c,d)=>c.rowIndex-d.rowIndex).map(c=>s.getRow(c.rowIndex)).forEach(a);else if(this.colModel.isPivotMode())i?s.forEachPivotNode(a,!0,l==="filteredAndSorted"):n?s.forEachNodeAfterFilterAndSort(a,!0):s.forEachNode(a);else if(e.onlySelectedAllPages||r){const c=this.beans.selectionSvc?.getSelectedNodes()??[];this.replicateSortedOrder(c),c.forEach(a)}else l==="all"?s.forEachNode(a):i||n?s.forEachNodeAfterFilterAndSort(a,!0):s.forEachNode(a);return o}}replicateSortedOrder(e){const{sortSvc:t,rowNodeSorter:o}=this.beans;if(!t||!o)return;const s=t.getSortOptions(),i=(n,r)=>n.rowIndex!=null&&r.rowIndex!=null?n.rowIndex-r.rowIndex:n.level===r.level?n.parent?.id===r.parent?.id?o.compareRowNodes(s,n,r)||(n.rowIndex??-1)-(r.rowIndex??-1):i(n.parent,r.parent):n.level>r.level?i(n.parent,r):i(n,r.parent);e.sort(i)}processPinnedBottomRows(e,t){return o=>{const s=this.processRow.bind(this,o,e,t);return e.rowPositions?e.rowPositions.filter(i=>i.rowPinned==="bottom").sort((i,n)=>i.rowIndex-n.rowIndex).map(i=>this.pinnedRowModel?.getPinnedBottomRow(i.rowIndex)).forEach(s):this.pinnedRowModel?.isManual()||this.pinnedRowModel?.forEachPinnedRow("bottom",s),o}}getColumnsToExport(e){const{allColumns:t=!1,skipRowGroups:o=!1,exportRowNumbers:s=!1,columnKeys:i}=e,{colModel:n,gos:r,visibleCols:a}=this,l=n.isPivotMode(),c=h=>go(h)?!1:!Ue(h)||s;if(i?.length)return n.getColsForKeys(i).filter(c);const d=r.get("treeData");let u=[];return t&&!l?u=n.getCols():u=a.allCols,u=u.filter(h=>c(h)&&(o&&!d?!Ia(h):!0)),u}recursivelyAddHeaderGroups(e,t,o){const s=[];for(const i of e){const n=i;if(n.getChildren)for(const r of n.getChildren()??[])s.push(r)}e.length>0&&Fe(e[0])&&this.doAddHeaderHeader(t,e,o),s&&s.length>0&&this.recursivelyAddHeaderGroups(s,t,o)}doAddHeaderHeader(e,t,o){const s=e.onNewHeaderGroupingRow();let i=0;for(const n of t){const r=n;let a;o?a=o(K(this.gos,{columnGroup:r})):a=this.beans.colNames.getDisplayNameForColumnGroup(r,"header");const c=(r.isExpandable()?r.getLeafColumns():[]).reduce((d,u,h,g)=>{let f=he(d);return u.getColumnGroupShow()==="open"?(!f||f[1]!=null)&&(f=[h],d.push(f)):f&&f[1]==null&&(f[1]=h-1),h===g.length-1&&f&&f[1]==null&&(f[1]=h),d},[]);s.onColumn(r,a||"",i++,r.getLeafColumns().length-1,c)}}},WF={moduleName:"SharedExport",version:I,beans:[NF]},zF=class extends x{getFileName(e){const t=this.getDefaultFileExtension();return e?.length||(e=this.getDefaultFileName()),e.includes(".")?e:`${e}.${t}`}getData(e){return this.beans.gridSerializer.serialize(this.createSerializingSession(e),e)}getDefaultFileName(){return`export.${this.getDefaultFileExtension()}`}};function _F(e,t){const o=document.defaultView||window;if(!o){D(52);return}const s=document.createElement("a"),i=o.URL.createObjectURL(t);s.setAttribute("href",i),s.setAttribute("download",e),s.style.display="none",document.body.appendChild(s),s.dispatchEvent(new MouseEvent("click",{bubbles:!1,cancelable:!0,view:o})),s.remove(),o.setTimeout(()=>{o.URL.revokeObjectURL(i)},0)}var UF=class{constructor(e){this.valueFrom="data";const{colModel:t,rowGroupColsSvc:o,colNames:s,valueSvc:i,gos:n,processCellCallback:r,processHeaderCallback:a,processGroupHeaderCallback:l,processRowGroupCallback:c,valueFrom:d}=e;this.colModel=t,this.rowGroupColsSvc=o,this.colNames=s,this.valueSvc=i,this.gos=n,this.processCellCallback=r,this.processHeaderCallback=a,this.processGroupHeaderCallback=l,this.processRowGroupCallback=c,d&&(this.valueFrom=d)}prepare(e){}extractHeaderValue(e){return this.getHeaderName(this.processHeaderCallback,e)??""}extractRowCellValue(e){const{column:t,node:o,currentColumnIndex:s,accumulatedRowIndex:i,type:n,useRawFormula:r}=e,a=s===0&&ru(this.gos,o,this.colModel.isPivotMode());if(this.processRowGroupCallback&&(this.gos.get("treeData")||o.group)&&(t.isRowGroupDisplayed(o.rowGroupColumn?.getColId()??"")||a))return{value:this.processRowGroupCallback(K(this.gos,{column:t,node:o}))??""};if(this.processCellCallback)return{value:this.processCellCallback(K(this.gos,{accumulatedRowIndex:i,column:t,node:o,value:this.valueSvc.getValueForDisplay({column:t,node:o,from:this.valueFrom}).value,type:n,parseValue:f=>this.valueSvc.parseValue(t,o,f,this.valueSvc.getValue(t,o,this.valueFrom)),formatValue:f=>this.valueSvc.formatValue(t,o,f)??f}))??""};const l=this.gos.get("treeData"),c=this.valueSvc,d=o.level===-1&&o.footer,u=t.colDef.showRowGroup===!0&&(o.group||l);if(!d&&(a||u)){let f="",m=o;for(;m&&m.level!==-1;){const{value:C,valueFormatted:v}=c.getValueForDisplay({column:a?void 0:t,node:m,includeValueFormatted:!0,exporting:!0,from:this.valueFrom});f=` -> ${v??C??""}${f}`,m=m.parent}return{value:f,valueFormatted:f}}const{value:h,valueFormatted:g}=c.getValueForDisplay({column:t,node:o,includeValueFormatted:!0,exporting:!0,useRawFormula:r,from:this.valueFrom});return{value:h??"",valueFormatted:g}}getHeaderName(e,t){return e?e(K(this.gos,{column:t})):this.colNames.getDisplayNameForColumn(t,"csv",!0)}},zc=`\r
|
|
60
|
+
`,$F=class extends UF{constructor(e){super(e),this.config=e,this.isFirstLine=!0,this.result="";const{suppressQuotes:t,columnSeparator:o}=e;this.suppressQuotes=t,this.columnSeparator=o}addCustomContent(e){e&&(typeof e=="string"?(/^\s*\n/.test(e)||this.beginNewLine(),e=e.replace(/\r?\n/g,zc),this.result+=e):e.forEach(t=>{this.beginNewLine(),t.forEach((o,s)=>{s!==0&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(o.data.value||""),o.mergeAcross&&this.appendEmptyCells(o.mergeAcross)})}))}onNewHeaderGroupingRow(){return this.beginNewLine(),{onColumn:this.onNewHeaderGroupingRowColumn.bind(this)}}onNewHeaderGroupingRowColumn(e,t,o,s){o!=0&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(t),this.appendEmptyCells(s)}appendEmptyCells(e){for(let t=1;t<=e;t++)this.result+=this.columnSeparator+this.putInQuotes("")}onNewHeaderRow(){return this.beginNewLine(),{onColumn:this.onNewHeaderRowColumn.bind(this)}}onNewHeaderRowColumn(e,t){t!=0&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(this.extractHeaderValue(e))}onNewBodyRow(){return this.beginNewLine(),{onColumn:this.onNewBodyRowColumn.bind(this)}}onNewBodyRowColumn(e,t,o){t!=0&&(this.result+=this.columnSeparator);const s=this.extractRowCellValue({column:e,node:o,currentColumnIndex:t,accumulatedRowIndex:t,type:"csv",useRawFormula:!1});this.result+=this.putInQuotes(s.valueFormatted??s.value)}putInQuotes(e){if(this.suppressQuotes)return e;if(e==null)return'""';let t;return typeof e=="string"?t=e:typeof e.toString=="function"?t=e.toString():(D(53),t=""),'"'+t.replace(/"/g,'""')+'"'}parse(){return this.result}beginNewLine(){this.isFirstLine||(this.result+=zc),this.isFirstLine=!1}},KF=class extends zF{constructor(){super(...arguments),this.beanName="csvCreator"}getMergedParams(e){const t=this.gos.get("defaultCsvExportParams");return Object.assign({},t,e)}export(e){if(this.isExportSuppressed()){D(51);return}const t=()=>{const s=this.getMergedParams(e),i=this.getData(s),n=new Blob(["\uFEFF",i],{type:"text/plain"}),r=s.fileName,a=typeof r=="function"?r(K(this.gos,{})):r;_F(this.getFileName(a),n)},{overlays:o}=this.beans;o?o.showExportOverlay(t):t()}exportDataAsCsv(e){this.export(e)}getDataAsCsv(e,t=!1){const o=t?Object.assign({},e):this.getMergedParams(e);return this.getData(o)}getDefaultFileExtension(){return"csv"}createSerializingSession(e){const{colModel:t,colNames:o,rowGroupColsSvc:s,valueSvc:i,gos:n}=this.beans,{processCellCallback:r,processHeaderCallback:a,processGroupHeaderCallback:l,processRowGroupCallback:c,suppressQuotes:d,columnSeparator:u,valueFrom:h}=e;return new $F({colModel:t,colNames:o,valueSvc:i,gos:n,processCellCallback:r||void 0,processHeaderCallback:a||void 0,processGroupHeaderCallback:l||void 0,processRowGroupCallback:c||void 0,suppressQuotes:d||!1,columnSeparator:u||",",rowGroupColsSvc:s,valueFrom:h})}isExportSuppressed(){return this.gos.get("suppressCsvExport")}};function qF(e,t){return e.csvCreator?.getDataAsCsv(t)}function jF(e,t){e.csvCreator?.exportDataAsCsv(t)}var YF={moduleName:"CsvExport",version:I,beans:[KF],apiFunctions:{getDataAsCsv:qF,exportDataAsCsv:jF},dependsOn:[WF]},rg=class extends qe{constructor(e,t){super(),this.ctrl=e,t&&(this.beans=t)}postConstruct(){this.refreshTooltip()}setBrowserTooltip(e,t){const o="title",s=this.ctrl.getGui();s&&(e!=null&&(e!=""||t)?s.setAttribute(o,e):s.removeAttribute(o))}updateTooltipText(){const{getTooltipValue:e}=this.ctrl;e&&(this.tooltip=e())}createTooltipFeatureIfNeeded(){if(this.tooltipManager==null){const e=this.beans.registry.createDynamicBean("tooltipStateManager",!0,this.ctrl,()=>this.tooltip);e&&(this.tooltipManager=this.createBean(e,this.beans.context))}}attemptToShowTooltip(){this.tooltipManager?.prepareToShowTooltip()}attemptToHideTooltip(){this.tooltipManager?.hideTooltip()}setTooltipAndRefresh(e){this.tooltip=e,this.refreshTooltip()}refreshTooltip(e){this.browserTooltips=this.beans.gos.get("enableBrowserTooltips"),this.updateTooltipText(),this.browserTooltips?(this.setBrowserTooltip(this.tooltip),this.tooltipManager=this.destroyBean(this.tooltipManager,this.beans.context)):(this.setBrowserTooltip(e?"":null,e),this.createTooltipFeatureIfNeeded())}destroy(){this.tooltipManager=this.destroyBean(this.tooltipManager,this.beans.context),super.destroy()}},QF=1e3,ZF=1e3,_c=100,Uc,Fi=!1,JF=class extends qe{constructor(e,t){super(),this.tooltipCtrl=e,this.getTooltipValue=t,this.interactionEnabled=!1,this.isInteractingWithTooltip=!1,this.state=0,this.tooltipInstanceCount=0,this.tooltipMouseTrack=!1}wireBeans(e){this.popupSvc=e.popupSvc}postConstruct(){this.gos.get("tooltipInteraction")&&(this.interactionEnabled=!0),this.tooltipTrigger=this.getTooltipTrigger(),this.tooltipMouseTrack=this.gos.get("tooltipMouseTrack");const e=this.tooltipCtrl.getGui();this.tooltipTrigger===0&&this.addManagedListeners(e,{mouseenter:this.onMouseEnter.bind(this),mouseleave:this.onMouseLeave.bind(this)}),this.tooltipTrigger===1&&this.addManagedListeners(e,{focusin:this.onFocusIn.bind(this),focusout:this.onFocusOut.bind(this)}),this.addManagedListeners(e,{mousemove:this.onMouseMove.bind(this)}),this.interactionEnabled||this.addManagedListeners(e,{mousedown:this.onMouseDown.bind(this),keydown:this.onKeyDown.bind(this)})}getGridOptionsTooltipDelay(e){const t=this.gos.get(e);return Math.max(200,t)}getTooltipDelay(e){return this.tooltipCtrl[`getTooltip${e}DelayOverride`]?.()??this.getGridOptionsTooltipDelay(`tooltip${e}Delay`)}destroy(){this.setToDoNothing(),super.destroy()}getTooltipTrigger(){const e=this.gos.get("tooltipTrigger");return!e||e==="hover"?0:1}onMouseEnter(e){this.interactionEnabled&&this.interactiveTooltipTimeoutId&&(this.unlockService(),this.startHideTimeout()),!Mo()&&(Fi?this.showTooltipTimeoutId=window.setTimeout(()=>{this.prepareToShowTooltip(e)},_c):this.prepareToShowTooltip(e))}onMouseMove(e){this.lastMouseEvent&&(this.lastMouseEvent=e),this.tooltipMouseTrack&&this.state===2&&this.tooltipComp&&this.positionTooltip()}onMouseDown(){this.setToDoNothing()}onMouseLeave(){this.interactionEnabled?this.lockService():this.setToDoNothing()}onFocusIn(){this.prepareToShowTooltip()}onFocusOut(e){const t=e.relatedTarget,o=this.tooltipCtrl.getGui(),s=this.tooltipComp?.getGui();this.isInteractingWithTooltip||o.contains(t)||this.interactionEnabled&&s?.contains(t)||this.setToDoNothing()}onKeyDown(){this.isInteractingWithTooltip&&(this.isInteractingWithTooltip=!1),this.setToDoNothing()}prepareToShowTooltip(e){if(this.state!=0||Fi)return;let t=0;e&&(t=this.isLastTooltipHiddenRecently()?this.getTooltipDelay("SwitchShow"):this.getTooltipDelay("Show")),this.lastMouseEvent=e||null,this.showTooltipTimeoutId=window.setTimeout(this.showTooltip.bind(this),t),this.state=1}isLastTooltipHiddenRecently(){return Date.now()-Uc<QF}setToDoNothing(e){!e&&this.state===2&&this.hideTooltip(),this.onBodyScrollEventCallback&&(this.onBodyScrollEventCallback(),this.onBodyScrollEventCallback=void 0),this.clearEventHandlers(),this.onDocumentKeyDownCallback&&(this.onDocumentKeyDownCallback(),this.onDocumentKeyDownCallback=void 0),this.clearTimeouts(),this.state=0,this.lastMouseEvent=null}showTooltip(){const e=this.getTooltipValue(),t=this.tooltipCtrl;if(!L(e)||t.shouldDisplayTooltip&&!t.shouldDisplayTooltip()){this.setToDoNothing();return}const o=this.gos.addCommon({location:t.getLocation?.()??"UNKNOWN",value:e,hideTooltipCallback:()=>this.hideTooltip(!0),...t.getAdditionalParams?.()});this.state=2,this.tooltipInstanceCount++;const s=this.newTooltipComponentCallback.bind(this,this.tooltipInstanceCount);this.createTooltipComp(o,s)}hideTooltip(e){!e&&this.isInteractingWithTooltip||(this.tooltipComp&&(this.destroyTooltipComp(),Uc=Date.now()),this.eventSvc.dispatchEvent({type:"tooltipHide",parentGui:this.tooltipCtrl.getGui()}),e&&(this.isInteractingWithTooltip=!1),this.setToDoNothing(!0))}newTooltipComponentCallback(e,t){if(this.state!==2||this.tooltipInstanceCount!==e){this.destroyBean(t);return}const s=t.getGui();this.tooltipComp=t,s.classList.contains("ag-tooltip")||s.classList.add("ag-tooltip-custom"),this.tooltipTrigger===0&&s.classList.add("ag-tooltip-animate"),this.interactionEnabled&&s.classList.add("ag-tooltip-interactive");const i=this.getLocaleTextFunc(),n=this.popupSvc?.addPopup({eChild:s,ariaLabel:i("ariaLabelTooltip","Tooltip")});if(n&&(this.tooltipPopupDestroyFunc=n.hideFunc),this.positionTooltip(),this.tooltipTrigger===1){const r=()=>this.setToDoNothing();[this.onBodyScrollEventCallback]=this.addManagedEventListeners({bodyScroll:r}),this.setEventHandlers(r)}this.interactionEnabled&&([this.tooltipMouseEnterListener,this.tooltipMouseLeaveListener]=this.addManagedElementListeners(s,{mouseenter:this.onTooltipMouseEnter.bind(this),mouseleave:this.onTooltipMouseLeave.bind(this)}),[this.onDocumentKeyDownCallback]=this.addManagedElementListeners(Pe(this.beans),{keydown:r=>{s.contains(r?.target)||this.onKeyDown()}}),this.tooltipTrigger===1&&([this.tooltipFocusInListener,this.tooltipFocusOutListener]=this.addManagedElementListeners(s,{focusin:this.onTooltipFocusIn.bind(this),focusout:this.onTooltipFocusOut.bind(this)}))),this.eventSvc.dispatchEvent({type:"tooltipShow",tooltipGui:s,parentGui:this.tooltipCtrl.getGui()}),this.startHideTimeout()}onTooltipMouseEnter(){this.isInteractingWithTooltip=!0,this.unlockService()}onTooltipMouseLeave(){this.isTooltipFocused()||(this.isInteractingWithTooltip=!1,this.lockService())}onTooltipFocusIn(){this.isInteractingWithTooltip=!0}isTooltipFocused(){const e=this.tooltipComp?.getGui(),t=ve(this.beans);return!!e&&e.contains(t)}onTooltipFocusOut(e){const t=this.tooltipCtrl.getGui();this.isTooltipFocused()||(this.isInteractingWithTooltip=!1,t.contains(e.relatedTarget)?this.startHideTimeout():this.hideTooltip())}positionTooltip(){const e={type:"tooltip",ePopup:this.tooltipComp.getGui(),nudgeY:18,skipObserver:this.tooltipMouseTrack};this.lastMouseEvent?this.popupSvc?.positionPopupUnderMouseEvent({...e,mouseEvent:this.lastMouseEvent}):this.popupSvc?.positionPopupByComponent({...e,eventSource:this.tooltipCtrl.getGui(),position:"under",keepWithinBounds:!0,nudgeY:5})}destroyTooltipComp(){this.tooltipComp.getGui().classList.add("ag-tooltip-hiding");const e=this.tooltipPopupDestroyFunc,t=this.tooltipComp,o=this.tooltipTrigger===0?ZF:0;window.setTimeout(()=>{e(),this.destroyBean(t)},o),this.clearTooltipListeners(),this.tooltipPopupDestroyFunc=void 0,this.tooltipComp=void 0}clearTooltipListeners(){for(const e of[this.tooltipMouseEnterListener,this.tooltipMouseLeaveListener,this.tooltipFocusInListener,this.tooltipFocusOutListener])e&&e();this.tooltipMouseEnterListener=this.tooltipMouseLeaveListener=this.tooltipFocusInListener=this.tooltipFocusOutListener=null}lockService(){Fi=!0,this.interactiveTooltipTimeoutId=window.setTimeout(()=>{this.unlockService(),this.setToDoNothing()},_c)}unlockService(){Fi=!1,this.clearInteractiveTimeout()}startHideTimeout(){this.clearHideTimeout(),this.hideTooltipTimeoutId=window.setTimeout(this.hideTooltip.bind(this),this.getTooltipDelay("Hide"))}clearShowTimeout(){this.showTooltipTimeoutId&&(window.clearTimeout(this.showTooltipTimeoutId),this.showTooltipTimeoutId=void 0)}clearHideTimeout(){this.hideTooltipTimeoutId&&(window.clearTimeout(this.hideTooltipTimeoutId),this.hideTooltipTimeoutId=void 0)}clearInteractiveTimeout(){this.interactiveTooltipTimeoutId&&(window.clearTimeout(this.interactiveTooltipTimeoutId),this.interactiveTooltipTimeoutId=void 0)}clearTimeouts(){this.clearShowTimeout(),this.clearHideTimeout(),this.clearInteractiveTimeout()}},XF=class extends rg{constructor(e,t,o){super(e,o),this.highlightTracker=t,this.onHighlight=this.onHighlight.bind(this)}postConstruct(){super.postConstruct(),this.wireHighlightListeners()}wireHighlightListeners(){this.addManagedPropertyListener("tooltipTrigger",({currentValue:e})=>{this.setTooltipMode(e)}),this.setTooltipMode(this.gos.get("tooltipTrigger")),this.highlightTracker.addEventListener("itemHighlighted",this.onHighlight)}onHighlight(e){this.tooltipMode===1&&(e.highlighted?this.attemptToShowTooltip():this.attemptToHideTooltip())}setTooltipMode(e="focus"){this.tooltipMode=e==="focus"?1:0}destroy(){this.highlightTracker.removeEventListener("itemHighlighted",this.onHighlight),super.destroy()}},eE=class extends Ga{constructor(){super({tag:"div",cls:"ag-tooltip"})}init(e){const{value:t}=e,o=this.getGui();o.textContent=Es(t);const s=e.location.replace(/([a-z])([A-Z0-9])/g,"$1-$2").toLowerCase();o.classList.add(`ag-${s}-tooltip`)}},tE=".ag-tooltip{background-color:var(--ag-tooltip-background-color);border:var(--ag-tooltip-border);border-radius:var(--ag-border-radius);color:var(--ag-tooltip-text-color);padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding);position:absolute;white-space:normal;z-index:99999;&:where(.ag-cell-editor-tooltip),&:where(.ag-cell-formula-tooltip){background-color:var(--ag-tooltip-error-background-color);border:var(--ag-tooltip-error-border);color:var(--ag-tooltip-error-text-color);font-weight:500}}.ag-tooltip-custom{position:absolute;z-index:99999}.ag-tooltip-custom:where(:not(.ag-tooltip-interactive)),.ag-tooltip:where(:not(.ag-tooltip-interactive)){pointer-events:none}.ag-tooltip-animate{transition:opacity 1s;&:where(.ag-tooltip-hiding){opacity:0}}",Ei=0,oE=200,sE=class extends qe{constructor(){super(...arguments),this.beanName="popupSvc",this.popupList=[]}postConstruct(){this.addManagedEventListeners({stylesChanged:this.handleThemeChange.bind(this)})}getPopupParent(){const e=this.gos.get("popupParent");return e||this.getDefaultPopupParent()}positionPopupUnderMouseEvent(e){const{ePopup:t,nudgeX:o,nudgeY:s,skipObserver:i}=e;this.positionPopup({ePopup:t,nudgeX:o,nudgeY:s,keepWithinBounds:!0,skipObserver:i,updatePosition:()=>this.calculatePointerAlign(e.mouseEvent),postProcessCallback:()=>this.callPostProcessPopup(e.additionalParams,e.type,e.ePopup,null,e.mouseEvent)})}calculatePointerAlign(e){const t=this.getParentRect();return{x:e.clientX-t.left,y:e.clientY-t.top}}positionPopupByComponent(e){const{ePopup:t,nudgeX:o,nudgeY:s,keepWithinBounds:i,eventSource:n,alignSide:r="left",position:a="over",type:l}=e,c=n.getBoundingClientRect(),d=this.getParentRect();this.setAlignedTo(n,t);const u=()=>{let h=c.left-d.left;r==="right"&&(h-=t.offsetWidth-c.width);let g;return a==="over"?(g=c.top-d.top,this.setAlignedStyles(t,"over")):(this.setAlignedStyles(t,"under"),this.shouldRenderUnderOrAbove(t,c,d,e.nudgeY||0)==="under"?g=c.top-d.top+c.height:g=c.top-t.offsetHeight-(s||0)*2-d.top),{x:h,y:g}};this.positionPopup({ePopup:t,nudgeX:o,nudgeY:s,keepWithinBounds:i,updatePosition:u,postProcessCallback:()=>this.callPostProcessPopup(e.additionalParams,l,t,n,null)})}positionPopupForMenu(e){const{eventSource:t,ePopup:o,event:s}=e,i=t.getBoundingClientRect(),n=this.getParentRect();this.setAlignedTo(t,o);let r=!1;const a=()=>{const l=this.keepXYWithinBounds(o,i.top-n.top,0),c=o.clientWidth>0?o.clientWidth:200;r||(o.style.minWidth=`${c}px`,r=!0);const u=n.right-n.left-c;let h;return this.gos.get("enableRtl")?(h=f(),h<0&&(h=g(),this.setAlignedStyles(o,"left")),h>u&&(h=0,this.setAlignedStyles(o,"right"))):(h=g(),h>u&&(h=f(),this.setAlignedStyles(o,"right")),h<0&&(h=0,this.setAlignedStyles(o,"left"))),{x:h,y:l};function g(){return i.right-n.left-2}function f(){return i.left-n.left-c}};this.positionPopup({ePopup:o,keepWithinBounds:!0,updatePosition:a,postProcessCallback:()=>this.callPostProcessPopup(e.additionalParams,"subMenu",o,t,s instanceof MouseEvent?s:void 0)})}shouldRenderUnderOrAbove(e,t,o,s){const i=o.bottom-t.bottom,n=t.top-o.top,r=e.offsetHeight+s;return i>r?"under":n>r||n>i?"above":"under"}setAlignedStyles(e,t){const o=this.getPopupIndex(e);if(o===-1)return;const s=this.popupList[o],{alignedToElement:i}=s;if(!i)return;const n=["right","left","over","above","under"];for(const r of n)i.classList.remove(`ag-has-popup-positioned-${r}`),e.classList.remove(`ag-popup-positioned-${r}`);t&&(i.classList.add(`ag-has-popup-positioned-${t}`),e.classList.add(`ag-popup-positioned-${t}`))}setAlignedTo(e,t){const o=this.getPopupIndex(t);if(o!==-1){const s=this.popupList[o];s.alignedToElement=e}}positionPopup(e){const{ePopup:t,keepWithinBounds:o,nudgeX:s,nudgeY:i,skipObserver:n,updatePosition:r}=e,a={width:0,height:0},l=(c=!1)=>{let{x:d,y:u}=r();c&&t.clientWidth===a.width&&t.clientHeight===a.height||(a.width=t.clientWidth,a.height=t.clientHeight,s&&(d+=s),i&&(u+=i),o&&(d=this.keepXYWithinBounds(t,d,1),u=this.keepXYWithinBounds(t,u,0)),t.style.left=`${d}px`,t.style.top=`${u}px`,e.postProcessCallback&&e.postProcessCallback())};if(l(),!n){const c=Kt(this.beans,t,()=>l(!0));setTimeout(()=>c(),oE)}}getParentRect(){const e=Pe(this.beans);let t=this.getPopupParent();return t===e.body?t=e.documentElement:getComputedStyle(t).position==="static"&&(t=t.offsetParent),kd(t)}keepXYWithinBounds(e,t,o){const s=o===0,i=s?"clientHeight":"clientWidth",n=s?"top":"left",r=s?"height":"width",a=s?"scrollTop":"scrollLeft",l=Pe(this.beans),c=l.documentElement,d=this.getPopupParent(),u=e.getBoundingClientRect(),h=d.getBoundingClientRect(),g=l.documentElement.getBoundingClientRect(),f=d===l.body,m=Math.ceil(u[r]);let v=f?(s?Ad:_i)(c)+c[a]:d[i];f&&(v-=Math.abs(g[n]-h[n]));const w=v-m;return Math.min(Math.max(t,0),Math.max(w,0))}addPopup(e){const{eChild:t,ariaLabel:o,ariaOwns:s,alwaysOnTop:i,positionCallback:n,anchorToElement:r}=e,a=this.getPopupIndex(t);if(a!==-1)return{hideFunc:this.popupList[a].hideFunc};this.initialisePopupPosition(t);const l=this.createPopupWrapper(t,!!i,o,s),c=this.addEventListenersToPopup({...e,wrapperEl:l});return n&&n(),this.addPopupToPopupList(t,l,c,r),{hideFunc:c}}initialisePopupPosition(e){const o=this.getPopupParent().getBoundingClientRect();L(e.style.top)||(e.style.top=`${o.top*-1}px`),L(e.style.left)||(e.style.left=`${o.left*-1}px`)}createPopupWrapper(e,t,o,s){const i=this.getPopupParent(),{environment:n,gos:r}=this.beans,a=Lo({tag:"div"});return n.applyThemeClasses(a),a.classList.add("ag-popup"),e.classList.add(r.get("enableRtl")?"ag-rtl":"ag-ltr","ag-popup-child"),e.hasAttribute("role")||ko(e,"dialog"),o?Cs(e,o):s&&(e.id||(e.id=`popup-component-${Ei}`),Ml(s,e.id)),a.appendChild(e),i.appendChild(a),t?this.setAlwaysOnTop(e,!0):this.bringPopupToFront(e),a}addEventListenersToPopup(e){const t=this.beans,o=Pe(t),{wrapperEl:s,eChild:i,closedCallback:n,afterGuiAttached:r,closeOnEsc:a,modal:l,ariaOwns:c}=e;let d=!1;const u=m=>{if(!s.contains(ve(t)))return;m.key===R.ESCAPE&&!this.isStopPropagation(m)&&f({keyboardEvent:m})},h=m=>f({mouseEvent:m}),g=m=>f({touchEvent:m}),f=(m={})=>{const{mouseEvent:C,touchEvent:v,keyboardEvent:w,forceHide:b}=m;!b&&(this.isEventFromCurrentPopup({mouseEvent:C,touchEvent:v},i)||d)||(d=!0,s.remove(),o.removeEventListener("keydown",u),o.removeEventListener("mousedown",h),o.removeEventListener("touchstart",g),o.removeEventListener("contextmenu",h),this.eventSvc.removeListener("dragStarted",h),n&&n(C||v||w),this.removePopupFromPopupList(i,c))};return r&&r({hidePopup:f}),window.setTimeout(()=>{a&&o.addEventListener("keydown",u),l&&(o.addEventListener("mousedown",h),this.eventSvc.addListener("dragStarted",h),o.addEventListener("touchstart",g),o.addEventListener("contextmenu",h))},0),f}addPopupToPopupList(e,t,o,s){this.popupList.push({element:e,wrapper:t,hideFunc:o,instanceId:Ei,isAnchored:!!s}),s&&this.setPopupPositionRelatedToElement(e,s),Ei=Ei+1}getPopupIndex(e){return this.popupList.findIndex(t=>t.element===e)}setPopupPositionRelatedToElement(e,t){const o=this.getPopupIndex(e);if(o===-1)return;const s=this.popupList[o];if(s.stopAnchoringPromise&&s.stopAnchoringPromise.then(n=>n&&n()),s.stopAnchoringPromise=void 0,s.isAnchored=!1,!t)return;const i=this.keepPopupPositionedRelativeTo({element:t,ePopup:e,hidePopup:s.hideFunc});return s.stopAnchoringPromise=i,s.isAnchored=!0,i}removePopupFromPopupList(e,t){this.setAlignedStyles(e,null),this.setPopupPositionRelatedToElement(e,null),t&&Ml(t,null),this.popupList=this.popupList.filter(o=>o.element!==e)}keepPopupPositionedRelativeTo(e){const t=this.getPopupParent(),o=t.getBoundingClientRect(),{element:s,ePopup:i}=e,n=s.getBoundingClientRect(),r=u=>Number.parseInt(u.substring(0,u.length-1),10),a=(u,h)=>{const g=o[u]-n[u],f=r(i.style[u]);return{initialDiff:g,lastDiff:g,initial:f,last:f,direction:h}},l=a("top",0),c=a("left",1),d=this.beans.frameworkOverrides;return new ie(u=>{d.wrapIncoming(()=>{bm(()=>{const h=t.getBoundingClientRect(),g=s.getBoundingClientRect();if(g.top==0&&g.left==0&&g.height==0&&g.width==0){e.hidePopup();return}const m=(C,v)=>{const w=r(i.style[v]);C.last!==w&&(C.initial=w,C.last=w);const b=h[v]-g[v];if(b!=C.lastDiff){const y=this.keepXYWithinBounds(i,C.initial+C.initialDiff-b,C.direction);i.style[v]=`${y}px`,C.last=y}C.lastDiff=b};m(l,"top"),m(c,"left")},200).then(h=>{u(()=>{h!=null&&window.clearInterval(h)})})},"popupPositioning")})}isEventFromCurrentPopup(e,t){const{mouseEvent:o,touchEvent:s}=e,i=o||s;if(!i)return!1;const n=this.getPopupIndex(t);if(n===-1)return!1;for(let r=n;r<this.popupList.length;r++){const a=this.popupList[r];if(Qp(a.element,i))return!0}return this.isElementWithinCustomPopup(i.target)}isElementWithinCustomPopup(e){const t=Pe(this.beans);for(;e&&e!==t.body;){if(e.classList.contains("ag-custom-component-popup")||e.parentElement===null)return!0;e=e.parentElement}return!1}getWrapper(e){for(;!e.classList.contains("ag-popup")&&e.parentElement;)e=e.parentElement;return e.classList.contains("ag-popup")?e:null}setAlwaysOnTop(e,t){const o=this.getWrapper(e);o&&(o.classList.toggle("ag-always-on-top",!!t),t&&this.bringPopupToFront(o))}bringPopupToFront(e){const t=this.getPopupParent(),o=Array.prototype.slice.call(t.querySelectorAll(".ag-popup")),s=o.length,i=this.getWrapper(e);if(!i||s<=1||!t.contains(e))return;const n=[],r=[];for(const h of o)h!==i&&(h.classList.contains("ag-always-on-top")?r.push(h):n.push(h));const a=[],l=r.length,u=i.classList.contains("ag-always-on-top")||!l?[...n,...r,i]:[...n,i,...r];for(let h=0;h<=s;h++){const g=u[h];if(o[h]===u[h]||g===i)continue;const f=g.querySelectorAll("div");for(const m of f)m.scrollTop!==0&&a.push([m,m.scrollTop]);h===0?t.prepend(g):u[h-1].after(g)}for(;a.length;){const h=a.pop();h[0].scrollTop=h[1]}}handleThemeChange(e){if(e.themeChanged){const t=this.beans.environment;for(const o of this.popupList)t.applyThemeClasses(o.wrapper)}}},iE=class extends sE{getDefaultPopupParent(){return this.beans.ctrlsSvc.get("gridCtrl").getGui()}callPostProcessPopup(e,t,o,s,i){const n=this.gos.getCallback("postProcessPopup");if(n){const{column:r,rowNode:a}=e??{};n({column:r,rowNode:a,ePopup:o,type:t,eventSource:s,mouseEvent:i})}}getActivePopups(){return this.popupList.map(e=>e.element)}hasAnchoredPopup(){return this.popupList.some(e=>e.isAnchored)}isStopPropagation(e){return zt(e)}},Mn={moduleName:"Popup",version:I,beans:[iE]};function Zr(e){return e.get("tooltipShowMode")==="whenTruncated"}var nE=(e,t)=>{const o=e;return typeof o.getTranslatedMessage=="function"?o.getTranslatedMessage(t):e.message},Jr=(e,t,o)=>{const{editModelSvc:s}=e,i=s?.getCellValidationModel()?.getCellValidation(t)?.errorMessages,n=s?.getRowValidationModel().getRowValidation(t)?.errorMessages,r=i||n;return r?.length?r.join(o("tooltipValidationErrorSeparator",". ")):void 0},rE=(e,t)=>{if(Zr(e.gos)){if(t.isCellRenderer()){const s=t.column.getColDef();return!!s.showRowGroup||s.cellRenderer==="agGroupCellRenderer"?Js(()=>{const n=t.eGui;return n.querySelector(".ag-group-value")||n.querySelector(".ag-cell-value")||n}):void 0}return Js(()=>{const s=t.eGui;return s.children.length===0?s:s.querySelector(".ag-cell-value")})}},aE=(e,t,o)=>{const{editSvc:s}=e,{column:i}=t,n=rE(e,t),r=()=>s?.isEditing(t)?!1:n?i.isTooltipEnabled()?n():!1:!0;return{shouldDisplayDefault:r,shouldDisplayColumnTooltip:r,shouldDisplayCustomTooltip:o??r}},lE=({beans:e,ctrl:t,value:o,displayFunctions:s,translate:i})=>{const{editSvc:n,formula:r,gos:a}=e,{column:l,rowNode:c}=t;if(r?.active&&l.isAllowFormula()){const C=r.getFormulaError(l,c);if(C)return{value:nE(C,i),location:"cellFormula",shouldDisplay:()=>!!r?.getFormulaError(l,c)}}if(!!!n?.isEditing(t)){const C=Jr(e,t,i);if(C)return{value:C,location:"cellEditor",shouldDisplay:()=>!n?.isEditing(t)&&!!Jr(e,t,i)}}const{shouldDisplayCustomTooltip:u,shouldDisplayColumnTooltip:h}=s;if(o!=null)return{value:o,location:"cell",shouldDisplay:u};const g=l.getColDef(),f=c.data;if(g.tooltipField&&L(f))return{value:_s(f,g.tooltipField,l.isTooltipFieldContainsDots()),location:"cell",shouldDisplay:h};const m=g.tooltipValueGetter;return m?{value:m(K(a,{location:"cell",colDef:l.getColDef(),column:l,rowIndex:t.cellPosition.rowIndex,node:c,data:c.data,value:t.value,valueFormatted:t.valueFormatted})),location:"cell",shouldDisplay:h}:null},cE=class extends x{constructor(){super(...arguments),this.beanName="tooltipSvc"}setupHeaderTooltip(e,t,o,s){e&&t.destroyBean(e);const i=this.gos,n=Zr(i),{column:r,eGui:a}=t,l=r.getColDef();!s&&n&&!l.headerComponent&&(s=Js(()=>a.querySelector(".ag-header-cell-text")));const c="header",u=this.beans.colNames.getDisplayNameForColumn(r,"header",!0),h=o??u,g={getGui:()=>a,getLocation:()=>c,getTooltipValue:()=>o??l?.headerTooltipValueGetter?.(K(i,{location:c,colDef:l,column:r,value:h,valueFormatted:u}))??l?.headerTooltip,shouldDisplayTooltip:s,getAdditionalParams:()=>({column:r,colDef:r.getColDef()})};let f=this.createTooltipFeature(g);return f&&(f=t.createBean(f),t.setRefreshFunction("tooltip",()=>f.refreshTooltip())),f}setupHeaderGroupTooltip(e,t,o,s){e&&t.destroyBean(e);const i=this.gos,n=Zr(i),{column:r,eGui:a}=t,l=r.getColGroupDef();!s&&n&&!l?.headerGroupComponent&&(s=Js(()=>a.querySelector(".ag-header-group-text")));const c="headerGroup",u=this.beans.colNames.getDisplayNameForColumnGroup(r,"header"),h=o??u,g={getGui:()=>a,getLocation:()=>c,getTooltipValue:()=>o??l?.headerTooltipValueGetter?.(K(i,{location:c,colDef:l,column:r,value:h,valueFormatted:u}))??l?.headerTooltip,shouldDisplayTooltip:s,getAdditionalParams:()=>{const m={column:r};return l&&(m.colDef=l),m}},f=this.createTooltipFeature(g);return f&&t.createBean(f)}enableCellTooltipFeature(e,t,o){const{beans:s}=this,{column:i,rowNode:n}=e,r=aE(s,e,o),a=this.getLocaleTextFunc();let l=null;const c=()=>(l=lE({beans:s,ctrl:e,value:t,displayFunctions:r,translate:a}),l),u={getGui:()=>e.eGui,getLocation:()=>l?.location??"cell",getTooltipValue:()=>c()?.value,shouldDisplayTooltip:()=>{const h=l??c();return h?h.shouldDisplay?h.shouldDisplay():!0:!1},getAdditionalParams:()=>({column:i,colDef:i.getColDef(),rowIndex:e.cellPosition.rowIndex,node:n,data:n.data,valueFormatted:e.valueFormatted})};return this.createTooltipFeature(u,s)}setupFullWidthRowTooltip(e,t,o,s){const i={getGui:()=>t.getFullWidthElement(),getTooltipValue:()=>o,getLocation:()=>"fullWidthRow",shouldDisplayTooltip:s},n=this.beans,r=n.context;e&&t.destroyBean(e,r);const a=this.createTooltipFeature(i,n);if(a)return t.createBean(a,r)}setupCellEditorTooltip(e,t){const{beans:o}=this,{context:s}=o,i=t.getValidationElement?.(!0)||!t.isPopup?.()&&e.eGui;if(!i)return;const n={getGui:()=>i,getTooltipValue:()=>Jr(o,e,this.getLocaleTextFunc()),getLocation:()=>"cellEditor",shouldDisplayTooltip:()=>{const{editModelSvc:a}=o,l=a?.getRowValidationModel()?.getRowValidationMap(),c=a?.getCellValidationModel()?.getCellValidationMap(),d=!!l&&l.size>0,u=!!c&&c.size>0;return d||u}},r=this.createTooltipFeature(n,o);if(r)return e.createBean(r,s)}initCol(e){const{colDef:t}=e;e.tooltipEnabled=L(t.tooltipField)||L(t.tooltipValueGetter)||L(t.tooltipComponent)}createTooltipFeature(e,t){return this.beans.registry.createDynamicBean("tooltipFeature",!1,e,t)}},dE=class extends JF{createTooltipComp(e,t){Qm(this.beans.userCompFactory,e)?.newAgStackInstance().then(t)}setEventHandlers(e){[this.onColumnMovedEventCallback]=this.addManagedEventListeners({columnMoved:e})}clearEventHandlers(){this.onColumnMovedEventCallback?.(),this.onColumnMovedEventCallback=void 0}},ag={moduleName:"Tooltip",version:I,beans:[cE],dynamicBeans:{tooltipFeature:rg,highlightTooltipFeature:XF,tooltipStateManager:dE},userComponents:{agTooltipComponent:eE},dependsOn:[Mn],css:[tE]},Qo=class{constructor(e){this.cellValueChanges=e}},fr=class extends Qo{constructor(e,t,o,s){super(e),this.initialRange=t,this.finalRange=o,this.ranges=s}},uE=10,$c=class{constructor(e){this.actionStack=[],this.maxStackSize=e||uE,this.actionStack=new Array(this.maxStackSize)}pop(){return this.actionStack.pop()}push(e){e.cellValueChanges&&e.cellValueChanges.length>0&&(this.actionStack.length===this.maxStackSize&&this.actionStack.shift(),this.actionStack.push(e))}clear(){this.actionStack=[]}getCurrentStackSize(){return this.actionStack.length}},hE=class extends x{constructor(){super(...arguments),this.beanName="undoRedo",this.cellValueChanges=[],this.activeCellEdit=null,this.activeRowEdit=null,this.isPasting=!1,this.isRangeInAction=!1,this.batchEditing=!1,this.bulkEditing=!1,this.onCellValueChanged=e=>{const t={column:e.column,rowIndex:e.rowIndex,rowPinned:e.rowPinned},o=this.activeCellEdit!==null&&Va(this.activeCellEdit,t),s=this.activeRowEdit!==null&&kC(this.activeRowEdit,t);if(!(o||s||this.isPasting||this.isRangeInAction))return;const{rowPinned:n,rowIndex:r,column:a,oldValue:l,value:c}=e,d={rowPinned:n,rowIndex:r,columnId:a.getColId(),newValue:c,oldValue:l};this.cellValueChanges.push(d)},this.clearStacks=()=>{this.undoStack.clear(),this.redoStack.clear()}}postConstruct(){const{gos:e,ctrlsSvc:t}=this.beans;if(!e.get("undoRedoCellEditing"))return;const o=e.get("undoRedoCellEditingLimit");if(o<=0)return;this.undoStack=new $c(o),this.redoStack=new $c(o),this.addListeners();const s=this.clearStacks.bind(this);this.addManagedEventListeners({cellValueChanged:this.onCellValueChanged.bind(this),modelUpdated:i=>{i.keepUndoRedoStack||this.clearStacks()},columnPivotModeChanged:s,newColumnsLoaded:s,columnGroupOpened:s,columnRowGroupChanged:s,columnMoved:s,columnPinned:s,columnVisible:s,rowDragEnd:s}),t.whenReady(this,i=>{this.gridBodyCtrl=i.gridBodyCtrl})}getCurrentUndoStackSize(){return this.undoStack?.getCurrentStackSize()??0}getCurrentRedoStackSize(){return this.redoStack?.getCurrentStackSize()??0}undo(e){const{eventSvc:t,undoStack:o,redoStack:s}=this;t.dispatchEvent({type:"undoStarted",source:e});const i=this.undoRedo(o,s,"initialRange","oldValue","undo");t.dispatchEvent({type:"undoEnded",source:e,operationPerformed:i})}redo(e){const{eventSvc:t,undoStack:o,redoStack:s}=this;t.dispatchEvent({type:"redoStarted",source:e});const i=this.undoRedo(s,o,"finalRange","newValue","redo");t.dispatchEvent({type:"redoEnded",source:e,operationPerformed:i})}undoRedo(e,t,o,s,i){if(!e)return!1;const n=e.pop();return n?.cellValueChanges?(this.processAction(n,r=>r[s],i),n instanceof fr?this.processRange(n.ranges||[n[o]]):this.processCell(n.cellValueChanges),t.push(n),!0):!1}processAction(e,t,o){const{changeDetectionSvc:s}=this.beans;s?.beginDeferred();try{for(const i of e.cellValueChanges){const{rowIndex:n,rowPinned:r,columnId:a}=i,l={rowIndex:n,rowPinned:r},c=kt(this.beans,l);c?.displayed&&c.setDataValue(a,t(i),o)}}finally{s?.endDeferred()}}processRange(e){let t;const o=this.beans.rangeSvc;o.removeAllCellRanges(!0),e.forEach((s,i)=>{if(!s)return;const n=s.startRow,r=s.endRow;i===e.length-1&&(t={rowPinned:n.rowPinned,rowIndex:n.rowIndex,columnId:s.startColumn.getColId()},this.setLastFocusedCell(t));const a={rowStartIndex:n.rowIndex,rowStartPinned:n.rowPinned,rowEndIndex:r.rowIndex,rowEndPinned:r.rowPinned,columnStart:s.startColumn,columns:s.columns};o.addCellRange(a)})}processCell(e){const t=e[0],{rowIndex:o,rowPinned:s}=t,i={rowIndex:o,rowPinned:s},n=kt(this.beans,i),r={rowPinned:t.rowPinned,rowIndex:n.rowIndex,columnId:t.columnId};this.setLastFocusedCell(r)}setLastFocusedCell(e){const{rowIndex:t,columnId:o,rowPinned:s}=e,{colModel:i,focusSvc:n,rangeSvc:r}=this.beans,a=i.getCol(o);if(!a)return;const{scrollFeature:l}=this.gridBodyCtrl;l.ensureIndexVisible(t),l.ensureColumnVisible(a);const c={rowIndex:t,column:a,rowPinned:s};n.setFocusedCell({...c,forceBrowserFocus:!0}),r?.setRangeToCell(c)}addListeners(){this.addManagedEventListeners({rowEditingStarted:e=>{this.activeRowEdit={rowIndex:e.rowIndex,rowPinned:e.rowPinned}},rowEditingStopped:()=>{const e=new Qo(this.cellValueChanges);this.pushActionsToUndoStack(e),this.activeRowEdit=null},cellEditingStarted:e=>{this.activeCellEdit={column:e.column,rowIndex:e.rowIndex,rowPinned:e.rowPinned}},cellEditingStopped:e=>{if(this.activeCellEdit=null,e.valueChanged&&!this.activeRowEdit&&!this.isPasting&&!this.isRangeInAction){const o=new Qo(this.cellValueChanges);this.pushActionsToUndoStack(o)}},pasteStart:()=>{this.isPasting=!0},pasteEnd:()=>{const e=new Qo(this.cellValueChanges);this.pushActionsToUndoStack(e),this.isPasting=!1},fillStart:()=>{this.isRangeInAction=!0},fillEnd:e=>{const t=new fr(this.cellValueChanges,e.initialRange,e.finalRange);this.pushActionsToUndoStack(t),this.isRangeInAction=!1},keyShortcutChangedCellStart:()=>{this.isRangeInAction=!0},keyShortcutChangedCellEnd:()=>{let e;const{rangeSvc:t,gos:o}=this.beans;t&&ao(o)?e=new fr(this.cellValueChanges,void 0,void 0,[...t.getCellRanges()]):e=new Qo(this.cellValueChanges),this.pushActionsToUndoStack(e),this.isRangeInAction=!1},batchEditingStarted:()=>this.startBigChange("batchEditing"),batchEditingStopped:({changes:e})=>this.stopBigChange("batchEditing",e),bulkEditingStarted:()=>this.startBigChange("bulkEditing"),bulkEditingStopped:({changes:e})=>this.stopBigChange("bulkEditing",e)})}startBigChange(e){this.updateBigChange(e,!0)}updateBigChange(e,t){e==="bulkEditing"?this.bulkEditing=t:this.batchEditing=t}stopBigChange(e,t){if(e==="bulkEditing"&&!this.bulkEditing||e==="batchEditing"&&!this.batchEditing||(this.updateBigChange(e,!1),t?.length===0))return;const o=new Qo(t??[]);this.pushActionsToUndoStack(o),this.cellValueChanges=[]}pushActionsToUndoStack(e){this.undoStack.push(e),this.cellValueChanges=[],this.redoStack.clear()}},gE=".ag-cell-inline-editing{border:var(--ag-cell-editing-border)!important;border-radius:var(--ag-border-radius);box-shadow:var(--ag-cell-editing-shadow);padding:0;z-index:1;.ag-cell-edit-wrapper,.ag-cell-editor,.ag-cell-wrapper,:where(.ag-cell-editor) .ag-input-field-input,:where(.ag-cell-editor) .ag-wrapper{height:100%;line-height:normal;min-height:100%;width:100%}&.ag-cell-editing-error{border-color:var(--ag-invalid-color)!important}}:where(.ag-popup-editor) .ag-large-text{background-color:var(--ag-background-color);border-radius:var(--ag-border-radius);box-shadow:var(--ag-dropdown-shadow);padding:0}.ag-large-text-input{display:block;height:auto;padding:var(--ag-cell-horizontal-padding)}:where(.ag-rtl .ag-large-text-input) .ag-text-area-input{resize:none}:where(.ag-ltr) .ag-checkbox-edit{padding-left:var(--ag-cell-horizontal-padding)}:where(.ag-rtl) .ag-checkbox-edit{padding-right:var(--ag-cell-horizontal-padding)}:where(.ag-row.ag-row-editing-invalid .ag-cell-inline-editing){opacity:.8}.ag-popup-editor{position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none}",pE={tag:"div",cls:"ag-cell-wrapper ag-cell-edit-wrapper ag-checkbox-edit",children:[{tag:"ag-checkbox",ref:"eEditor",role:"presentation"}]},fE=class extends Fn{constructor(){super(pE,[ja]),this.eEditor=W}initialiseEditor(e){this.agSetEditValue(e.value),this.eEditor.getInputElement().setAttribute("tabindex","-1"),this.addManagedListeners(this.eEditor,{fieldValueChanged:o=>this.setAriaLabel(o.selected)})}agSetEditValue(e){this.params.value=e;const t=e??void 0;this.eEditor.setValue(t,!0),this.setAriaLabel(t)}getValue(){return this.eEditor.getValue()}focusIn(){this.eEditor.getFocusableElement().focus()}afterGuiAttached(){this.params.cellStartedEdit&&this.focusIn()}isPopup(){return!1}setAriaLabel(e){const t=this.getLocaleTextFunc(),o=bn(t,e),s=t("ariaToggleCellValue","Press SPACE to toggle cell value");this.eEditor.setInputAriaLabel(`${s} (${o})`)}getValidationElement(e){return e?this.params.eGridCell:this.eEditor.getInputElement()}getValidationErrors(){const{params:e}=this,{getValidationErrors:t}=e,o=this.getValue();return t?t({value:o,internalErrors:null,cellEditorParams:e}):null}},$t=class extends Fo{constructor(e,t="ag-text-field",o="text"){super(e,t,o)}postConstruct(){super.postConstruct(),this.config.allowedCharPattern&&this.preventDisallowedCharacters()}setValue(e,t){const o=this.eInput;return o.value!==e&&(o.value=L(e)?e:""),super.setValue(e,t)}setStartValue(e){this.setValue(e,!0)}setCustomValidity(e){const t=this.eInput,o=e.length>0;t.setCustomValidity(e),o&&t.reportValidity(),Ca(t,o)}preventDisallowedCharacters(){const e=new RegExp(`[${this.config.allowedCharPattern}]`),t=o=>{Wu(o)&&o.key&&!e.test(o.key)&&o.preventDefault()};this.addManagedListeners(this.eInput,{keydown:t,paste:o=>{o.clipboardData?.getData("text")?.split("").some(i=>!e.test(i))&&o.preventDefault()}})}},Tn={selector:"AG-INPUT-TEXT-FIELD",component:$t},mE=class extends $t{constructor(e){super(e,"ag-date-field","date")}postConstruct(){super.postConstruct();const e=po();this.addManagedListeners(this.eInput,{wheel:this.onWheel.bind(this),mousedown:()=>{this.isDisabled()||e||this.eInput.focus()}}),this.eInput.step="any"}onWheel(e){ve(this.beans)===this.eInput&&e.preventDefault()}setMin(e){const t=e instanceof Date?$e(e??null,!!this.includeTime)??void 0:e;return this.min===t?this:(this.min=t,Qe(this.eInput,"min",t),this)}setMax(e){const t=e instanceof Date?$e(e??null,!!this.includeTime)??void 0:e;return this.max===t?this:(this.max=t,Qe(this.eInput,"max",t),this)}setStep(e){return this.step===e?this:(this.step=e,Qe(this.eInput,"step",e),this)}setIncludeTime(e){return this.includeTime===e?this:(this.includeTime=e,super.setInputType(e?"datetime-local":"date"),e&&this.setStep(1),this)}getDate(){if(this.eInput.validity.valid)return Ke(this.getValue())??void 0}setDate(e,t){this.setValue($e(e??null,this.includeTime),t)}},lg={selector:"AG-INPUT-DATE-FIELD",component:mE},In=class extends Fn{constructor(e){super(),this.cellEditorInput=e,this.eEditor=W}initialiseEditor(e){const{cellEditorInput:t}=this;this.setTemplate({tag:"div",cls:"ag-cell-edit-wrapper",children:[t.getTemplate()]},t.getAgComponents());const{eEditor:o}=this,{cellStartedEdit:s,eventKey:i,suppressPreventDefault:n}=e;o.getInputElement().setAttribute("title",""),t.init(o,e);let r,a=!0;s?(this.focusAfterAttached=!0,i===R.BACKSPACE||i===R.DELETE?r="":i&&i.length===1?n?a=!1:r=i:(r=t.getStartValue(),i!==R.F2&&(this.highlightAllOnFocus=!0))):(this.focusAfterAttached=!1,r=t.getStartValue()),a&&r!=null&&o.setStartValue(r),this.addGuiEventListener("keydown",l=>{const{key:c}=l;(c===R.PAGE_UP||c===R.PAGE_DOWN)&&l.preventDefault()})}afterGuiAttached(){const e=this.getLocaleTextFunc(),t=this.eEditor;if(t.setInputAriaLabel(e("ariaInputEditor","Input Editor")),!this.focusAfterAttached)return;po()||t.getFocusableElement().focus();const o=t.getInputElement();this.highlightAllOnFocus?o.select():this.cellEditorInput.setCaret?.()}focusIn(){const{eEditor:e}=this,t=e.getFocusableElement(),o=e.getInputElement();t.focus(),o.select()}getValue(){return this.cellEditorInput.getValue()}agSetEditValue(e){this.params.value=e;const t=this.cellEditorInput.getStartValue();this.eEditor.setStartValue(t??null)}isPopup(){return!1}getValidationElement(){return this.eEditor.getInputElement()}getValidationErrors(){return this.cellEditorInput.getValidationErrors()}},CE={tag:"ag-input-date-field",ref:"eEditor",cls:"ag-cell-editor"},vE=class{constructor(e,t){this.getDataTypeService=e,this.getLocaleTextFunc=t}getTemplate(){return CE}getAgComponents(){return[lg]}init(e,t){this.eEditor=e,this.params=t;const{min:o,max:s,step:i,colDef:n}=t;o!=null&&e.setMin(o),s!=null&&e.setMax(s),i!=null&&e.setStep(i),this.includeTime=t.includeTime??this.getDataTypeService()?.getDateIncludesTimeFlag?.(n.cellDataType),this.includeTime!=null&&e.setIncludeTime(this.includeTime)}getValidationErrors(){const t=this.eEditor.getInputElement().valueAsDate,{params:o}=this,{min:s,max:i,getValidationErrors:n}=o;let r=[];const a=this.getLocaleTextFunc();if(t instanceof Date&&!isNaN(t.getTime())){if(s){const l=s instanceof Date?s:new Date(s);if(t<l){const c=l.toLocaleDateString();r.push(a("minDateValidation",`Date must be after ${c}`,[c]))}}if(i){const l=i instanceof Date?i:new Date(i);if(t>l){const c=l.toLocaleDateString();r.push(a("maxDateValidation",`Date must be before ${c}`,[c]))}}}return r.length||(r=null),n?n({value:t,cellEditorParams:o,internalErrors:r}):r}getValue(){const{eEditor:e,params:t}=this,o=e.getDate();return!L(o)&&!L(t.value)?t.value:o??null}getStartValue(){const{value:e}=this.params;if(e instanceof Date)return $e(e,this.includeTime??!1)}},wE=class extends In{constructor(){super(new vE(()=>this.beans.dataTypeSvc,()=>this.getLocaleTextFunc()))}},bE={tag:"ag-input-date-field",ref:"eEditor",cls:"ag-cell-editor"},SE=class{constructor(e,t){this.getDataTypeService=e,this.getLocaleTextFunc=t}getTemplate(){return bE}getAgComponents(){return[lg]}init(e,t){this.eEditor=e,this.params=t;const{min:o,max:s,step:i,colDef:n}=t;o!=null&&e.setMin(o),s!=null&&e.setMax(s),i!=null&&e.setStep(i),this.includeTime=t.includeTime??this.getDataTypeService()?.getDateIncludesTimeFlag?.(n.cellDataType),this.includeTime!=null&&e.setIncludeTime(this.includeTime)}getValidationErrors(){const{eEditor:e,params:t}=this,o=e.getInputElement().value,s=this.formatDate(this.parseDate(o??void 0)),{min:i,max:n,getValidationErrors:r}=t;let a=[];if(s){const l=new Date(s),c=this.getLocaleTextFunc();if(i){const d=new Date(i);if(l<d){const u=d.toLocaleDateString();a.push(c("minDateValidation",`Date must be after ${u}`,[u]))}}if(n){const d=new Date(n);if(l>d){const u=d.toLocaleDateString();a.push(c("maxDateValidation",`Date must be before ${u}`,[u]))}}}return a.length||(a=null),r?r({value:this.getValue(),cellEditorParams:t,internalErrors:a}):a}getValue(){const{params:e,eEditor:t}=this,o=this.formatDate(t.getDate());return!L(o)&&!L(e.value)?e.value:e.parseValue(o??"")}getStartValue(){return $e(this.parseDate(this.params.value??void 0)??null,this.includeTime??!1)}parseDate(e){const t=this.getDataTypeService();return t?t.getDateParserFunction(this.params.column)(e):Ke(e)??void 0}formatDate(e){const t=this.getDataTypeService();return t?t.getDateFormatterFunction(this.params.column)(e):$e(e??null,this.includeTime??!1)??void 0}},yE=class extends In{constructor(){super(new SE(()=>this.beans.dataTypeSvc,()=>this.getLocaleTextFunc()))}},RE=class extends Fo{constructor(e){super(e,"ag-text-area",null,"textarea")}setValue(e,t){const o=super.setValue(e,t);return this.eInput.value=e,o}setCols(e){return this.eInput.cols=e,this}setRows(e){return this.eInput.rows=e,this}},FE={selector:"AG-INPUT-TEXT-AREA",component:RE},EE={tag:"div",cls:"ag-large-text",children:[{tag:"ag-input-text-area",ref:"eEditor",cls:"ag-large-text-input"}]},xE=class extends Fn{constructor(){super(EE,[FE]),this.eEditor=W}initialiseEditor(e){const{eEditor:t}=this,{cellStartedEdit:o,eventKey:s,maxLength:i,cols:n,rows:r}=e;this.focusAfterAttached=o,t.getInputElement().setAttribute("title",""),t.setMaxLength(i||200).setCols(n||60).setRows(r||10);let a;o?(this.focusAfterAttached=!0,s===R.BACKSPACE||s===R.DELETE?a="":s&&s.length===1?a=s:(a=this.getStartValue(e),s!==R.F2&&(this.highlightAllOnFocus=!0))):(this.focusAfterAttached=!1,a=this.getStartValue(e)),a!=null&&t.setValue(a,!0),this.addGuiEventListener("keydown",this.onKeyDown.bind(this)),this.activateTabIndex()}getStartValue(e){const{value:t}=e;return t?.toString()??t}agSetEditValue(e){this.params.value=e;const t=this.getStartValue(this.params);this.eEditor.setValue(t??"",!0)}onKeyDown(e){const t=e.key;(t===R.LEFT||t===R.UP||t===R.RIGHT||t===R.DOWN||e.shiftKey&&t===R.ENTER)&&e.stopPropagation()}afterGuiAttached(){const{eEditor:e,focusAfterAttached:t,highlightAllOnFocus:o}=this,s=this.getLocaleTextFunc();e.setInputAriaLabel(s("ariaInputEditor","Input Editor")),t&&(e.getFocusableElement().focus(),o&&e.getInputElement().select())}getValue(){const{eEditor:e,params:t}=this,{value:o}=t,s=e.getValue();return!L(s)&&!L(o)?o:t.parseValue(s)}getValidationElement(){return this.eEditor.getInputElement()}getValidationErrors(){const{params:e}=this,{maxLength:t,getValidationErrors:o}=e,s=this.getLocaleTextFunc(),i=this.getValue();let n=[];return typeof i=="string"&&t!=null&&i.length>t&&n.push(s("maxLengthValidation",`Must be ${t} characters or fewer.`,[String(t)])),n.length||(n=null),o?o({value:i,internalErrors:n,cellEditorParams:e}):n}},il=class extends $t{constructor(e){super(e,"ag-number-field","number")}postConstruct(){super.postConstruct();const e=this.eInput;this.addManagedListeners(e,{blur:()=>{const n=Number.parseFloat(e.value),r=isNaN(n)?"":this.normalizeValue(n.toString());this.value!==r&&this.setValue(r)},wheel:this.onWheel.bind(this)}),e.step="any";const{precision:t,min:o,max:s,step:i}=this.config;typeof t=="number"&&this.setPrecision(t),typeof o=="number"&&this.setMin(o),typeof s=="number"&&this.setMax(s),typeof i=="number"&&this.setStep(i)}onWheel(e){ve(this.beans)===this.eInput&&e.preventDefault()}normalizeValue(e){return e===""?"":(this.precision!=null&&(e=this.adjustPrecision(e)),e)}adjustPrecision(e,t){const o=this.precision;if(o==null)return e;if(t){const i=Number.parseFloat(e).toFixed(o);return Number.parseFloat(i).toString()}const s=String(e).split(".");if(s.length>1){if(s[1].length<=o)return e;if(o>0)return`${s[0]}.${s[1].slice(0,o)}`}return s[0]}setMin(e){return this.min===e?this:(this.min=e,Qe(this.eInput,"min",e),this)}setMax(e){return this.max===e?this:(this.max=e,Qe(this.eInput,"max",e),this)}setPrecision(e){return this.precision=e,this}setStep(e){return this.step===e?this:(this.step=e,Qe(this.eInput,"step",e),this)}setValue(e,t){return this.setValueOrInputValue(o=>super.setValue(o,t),()=>this,e)}setStartValue(e){return this.setValueOrInputValue(t=>super.setValue(t,!0),t=>{this.eInput.value=t},e)}setValueOrInputValue(e,t,o){if(L(o)){let s=this.isScientificNotation(o);if(s&&this.eInput.validity.valid)return e(o);if(!s){o=this.adjustPrecision(o);const i=this.normalizeValue(o);s=o!=i}if(s)return t(o)}return e(o)}getValue(e=!1){const t=this.eInput;if(!t.validity.valid&&!e)return;const o=t.value;return this.isScientificNotation(o)?this.adjustPrecision(o,!0):super.getValue()}isScientificNotation(e){return typeof e=="string"&&e.includes("e")}},PE={selector:"AG-INPUT-NUMBER-FIELD",component:il},DE={tag:"ag-input-number-field",ref:"eEditor",cls:"ag-cell-editor"},ME=class{constructor(e){this.getLocaleTextFunc=e}getTemplate(){return DE}getAgComponents(){return[PE]}init(e,t){this.eEditor=e,this.params=t;const{max:o,min:s,precision:i,step:n}=t;o!=null&&e.setMax(o),s!=null&&e.setMin(s),i!=null&&e.setPrecision(i),n!=null&&e.setStep(n);const r=e.getInputElement();t.preventStepping?e.addManagedElementListeners(r,{keydown:this.preventStepping}):t.showStepperButtons&&r.classList.add("ag-number-field-input-stepper")}getValidationErrors(){const{params:e}=this,{min:t,max:o,getValidationErrors:s}=e,n=this.eEditor.getInputElement().valueAsNumber,r=this.getLocaleTextFunc();let a=[];return typeof n=="number"&&(t!=null&&n<t&&a.push(r("minValueValidation",`Must be greater than or equal to ${t}.`,[String(t)])),o!=null&&n>o&&a.push(r("maxValueValidation",`Must be less than or equal to ${o}.`,[String(o)]))),a.length||(a=null),s?s({value:n,cellEditorParams:e,internalErrors:a}):a}preventStepping(e){(e.key===R.UP||e.key===R.DOWN)&&e.preventDefault()}getValue(){const{eEditor:e,params:t}=this,o=e.getValue();if(!L(o)&&!L(t.value))return t.value;let s=t.parseValue(o);if(s==null)return s;if(typeof s=="string"){if(s==="")return null;s=Number(s)}return isNaN(s)?null:s}getStartValue(){return this.params.value}setCaret(){po()&&this.eEditor.getInputElement().focus({preventScroll:!0})}},TE=class extends In{constructor(){super(new ME(()=>this.getLocaleTextFunc()))}},IE=".ag-list-item{align-items:center;display:flex;height:var(--ag-list-item-height);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;&.ag-active-item{background-color:var(--ag-row-hover-color)}}",AE="ag-active-item",kE=(e,t)=>({tag:"div",cls:`ag-list-item ag-${e}-list-item`,attrs:{role:"option"},children:[{tag:"span",cls:`ag-list-item-text ag-${e}-list-item-text`,ref:"eText",children:t}]}),LE=class extends Ps{constructor(e,t,o){super(kE(e,t)),this.label=t,this.value=o,this.eText=W}postConstruct(){this.createTooltip(),this.addEventListeners()}setHighlighted(e){const t=this.getGui();t.classList.toggle(AE,e),Td(t,e),this.dispatchLocalEvent({type:"itemHighlighted",highlighted:e})}getHeight(){return this.getGui().clientHeight}setIndex(e,t){const o=this.getGui();Op(o,e),Lp(o,t)}createTooltip(){const e={getTooltipValue:()=>this.label,getGui:()=>this.getGui(),getLocation:()=>"UNKNOWN",shouldDisplayTooltip:()=>Od(this.eText)},t=this.createOptionalManagedBean(this.beans.registry.createDynamicBean("highlightTooltipFeature",!1,e,this));t&&(this.tooltipFeature=t)}addEventListeners(){const e=this.getParentComponent();e&&(this.addGuiEventListener("mouseover",()=>{e.highlightItem(this)}),this.addGuiEventListener("mousedown",t=>{t.preventDefault(),t.stopPropagation(),e.setValue(this.value)}))}},OE=class extends Ps{constructor(e="default"){super({tag:"div",cls:`ag-list ag-${e}-list`}),this.cssIdentifier=e,this.options=[],this.listItems=[],this.highlightedItem=null,this.registerCSS(IE)}postConstruct(){const e=this.getGui();this.addManagedElementListeners(e,{mouseleave:()=>this.clearHighlighted()})}handleKeyDown(e){const t=e.key;switch(t){case R.ENTER:if(!this.highlightedItem)this.setValue(this.getValue());else{const o=this.listItems.indexOf(this.highlightedItem);this.setValueByIndex(o)}break;case R.DOWN:case R.UP:e.preventDefault(),this.navigate(t);break;case R.PAGE_DOWN:case R.PAGE_UP:case R.PAGE_HOME:case R.PAGE_END:e.preventDefault(),this.navigateToPage(t);break}}addOptions(e){for(const t of e)this.addOption(t);return this}addOption(e){const{value:t,text:o}=e,s=o??t;return this.options.push({value:t,text:s}),this.renderOption(t,s),this.updateIndices(),this}clearOptions(){this.options=[],this.reset(!0);for(const e of this.listItems)e.destroy();Xe(this.getGui()),this.listItems=[],this.refreshAriaRole()}updateOptions(e){const t=this.options!==e;return t&&(this.clearOptions(),this.addOptions(e)),t}setValue(e,t){if(this.value===e)return this.fireItemSelected(),this;if(e==null)return this.reset(t),this;const o=this.options.findIndex(s=>s.value===e);if(o!==-1){const s=this.options[o];this.value=s.value,this.displayValue=s.text,this.highlightItem(this.listItems[o]),t||this.fireChangeEvent()}return this}setValueByIndex(e){return this.setValue(this.options[e].value)}getValue(){return this.value}getDisplayValue(){return this.displayValue}refreshHighlighted(){this.clearHighlighted();const e=this.options.findIndex(t=>t.value===this.value);e!==-1&&this.highlightItem(this.listItems[e])}highlightItem(e){const t=e.getGui();if(!vt(t))return;this.clearHighlighted(),e.setHighlighted(!0),this.highlightedItem=e;const o=this.getGui(),{scrollTop:s,clientHeight:i}=o,{offsetTop:n,offsetHeight:r}=t;(n+r>s+i||n<s)&&t.scrollIntoView({block:"nearest"})}hideItemTooltip(){this.highlightedItem?.tooltipFeature?.attemptToHideTooltip()}destroy(){this.hideItemTooltip(),super.destroy()}reset(e){this.value=null,this.displayValue=null,this.clearHighlighted(),e||this.fireChangeEvent()}clearHighlighted(){this.highlightedItem?.setHighlighted(!1),this.highlightedItem=null}renderOption(e,t){const o=new LE(this.cssIdentifier,t,e);o.setParentComponent(this);const s=this.createManagedBean(o);this.listItems.push(s),this.getGui().appendChild(s.getGui())}navigate(e){const t=e===R.DOWN;let o;const{listItems:s,highlightedItem:i}=this;if(!i)o=t?s[0]:he(s);else{let r=s.indexOf(i)+(t?1:-1);r=Math.min(Math.max(r,0),s.length-1),o=s[r]}this.highlightItem(o)}navigateToPage(e){const{listItems:t,highlightedItem:o}=this;if(!o||t.length===0)return;const s=t.indexOf(o),i=this.options.length-1,n=t[0].getHeight(),r=Math.floor(this.getGui().clientHeight/n);let a=-1;e===R.PAGE_HOME?a=0:e===R.PAGE_END?a=i:e===R.PAGE_DOWN?a=Math.min(s+r,i):e===R.PAGE_UP&&(a=Math.max(s-r,0)),a!==-1&&this.highlightItem(t[a])}refreshAriaRole(){ko(this.getGui(),this.options.length===0?"presentation":"listbox")}updateIndices(){this.refreshAriaRole();const e=this.listItems,t=e.length;e.forEach((o,s)=>{o.setIndex(s+1,t)})}fireChangeEvent(){this.dispatchLocalEvent({type:"fieldValueChanged"}),this.fireItemSelected()}fireItemSelected(){this.dispatchLocalEvent({type:"selectedItem"})}},GE=".ag-picker-field-display{flex:1 1 auto}.ag-picker-field{align-items:center;display:flex}.ag-picker-field-icon{border:0;cursor:pointer;display:flex;margin:0;padding:0}.ag-picker-field-wrapper{background-color:var(--ag-picker-button-background-color);border:var(--ag-picker-button-border);border-radius:5px;min-height:max(var(--ag-list-item-height),calc(var(--ag-spacing)*4));overflow:hidden;&:where(.invalid){background-color:var(--ag-input-invalid-background-color);border:var(--ag-input-invalid-border);color:var(--ag-input-invalid-text-color)}}.ag-picker-field-wrapper:where(.ag-picker-has-focus),.ag-picker-field-wrapper:where(:focus-within){background-color:var(--ag-picker-button-focus-background-color);border:var(--ag-picker-button-focus-border);box-shadow:var(--ag-focus-shadow);&:where(.invalid){box-shadow:var(--ag-focus-error-shadow)}}.ag-picker-field-wrapper:disabled{opacity:.5}",HE={tag:"div",cls:"ag-picker-field",role:"presentation",children:[{tag:"div",ref:"eLabel"},{tag:"div",ref:"eWrapper",cls:"ag-wrapper ag-picker-field-wrapper ag-picker-collapsed",children:[{tag:"div",ref:"eDisplayField",cls:"ag-picker-field-display"},{tag:"div",ref:"eIcon",cls:"ag-picker-field-icon",attrs:{"aria-hidden":"true"}}]}]},BE=class extends hh{constructor(e){if(super(e,e?.template||HE,e?.agComponents||[],e?.className),this.isPickerDisplayed=!1,this.skipClick=!1,this.pickerGap=4,this.hideCurrentPicker=null,this.eLabel=W,this.eWrapper=W,this.eDisplayField=W,this.eIcon=W,this.registerCSS(GE),this.ariaRole=e?.ariaRole,this.onPickerFocusIn=this.onPickerFocusIn.bind(this),this.onPickerFocusOut=this.onPickerFocusOut.bind(this),!e)return;const{pickerGap:t,maxPickerHeight:o,variableWidth:s,minPickerWidth:i,maxPickerWidth:n}=e;t!=null&&(this.pickerGap=t),this.variableWidth=!!s,o!=null&&this.setPickerMaxHeight(o),i!=null&&this.setPickerMinWidth(i),n!=null&&this.setPickerMaxWidth(n)}postConstruct(){super.postConstruct(),this.setupAria();const e=`ag-${this.getCompId()}-display`;this.eDisplayField.setAttribute("id",e);const t=this.getAriaElement();this.addManagedElementListeners(t,{keydown:this.onKeyDown.bind(this)}),this.addManagedElementListeners(this.eLabel,{mousedown:this.onLabelOrWrapperMouseDown.bind(this)}),this.addManagedElementListeners(this.eWrapper,{mousedown:this.onLabelOrWrapperMouseDown.bind(this)});const{pickerIcon:o,inputWidth:s}=this.config;if(o){const i=this.beans.iconSvc.createIconNoSpan(o);i&&this.eIcon.appendChild(i)}s!=null&&this.setInputWidth(s)}setupAria(){const e=this.getAriaElement();e.setAttribute("tabindex",this.gos.get("tabIndex").toString()),Fr(e,!1),this.ariaRole&&ko(e,this.ariaRole)}onLabelOrWrapperMouseDown(e){if(e){const t=this.getFocusableElement();if(t!==this.eWrapper&&e?.target===t)return;e.preventDefault(),this.getFocusableElement().focus()}if(this.skipClick){this.skipClick=!1;return}this.isDisabled()||(this.isPickerDisplayed?this.hidePicker():this.showPicker())}onKeyDown(e){switch(e.key){case R.UP:case R.DOWN:case R.ENTER:case R.SPACE:e.preventDefault(),this.onLabelOrWrapperMouseDown();break;case R.ESCAPE:this.isPickerDisplayed&&(e.preventDefault(),e.stopPropagation(),this.hideCurrentPicker&&this.hideCurrentPicker());break}}showPicker(){this.isPickerDisplayed=!0,this.pickerComponent||(this.pickerComponent=this.createPickerComponent());const e=this.pickerComponent.getGui();e.addEventListener("focusin",this.onPickerFocusIn),e.addEventListener("focusout",this.onPickerFocusOut),this.hideCurrentPicker=this.renderAndPositionPicker(),this.toggleExpandedStyles(!0)}renderAndPositionPicker(){const e=this.pickerComponent.getGui();this.gos.get("suppressScrollWhenPopupsAreOpen")||([this.destroyMouseWheelFunc]=this.addManagedEventListeners({bodyScroll:()=>{this.hidePicker()}}));const t=this.getLocaleTextFunc(),{config:{pickerAriaLabelKey:o,pickerAriaLabelValue:s,modalPicker:i=!0},maxPickerHeight:n,minPickerWidth:r,maxPickerWidth:a,variableWidth:l,beans:c,eWrapper:d}=this,u={modal:i,eChild:e,closeOnEsc:!0,closedCallback:()=>{const m=pa(c);this.beforeHidePicker(),m&&this.isAlive()&&this.getFocusableElement().focus()},ariaLabel:t(o,s),anchorToElement:d};e.style.position="absolute";const h=c.popupSvc,g=h.addPopup(u);l?(r&&(e.style.minWidth=r),e.style.width=Sa(_i(d)),a&&(e.style.maxWidth=a)):Ki(e,a??_i(d));const f=n??`${wa(h.getPopupParent())}px`;return e.style.setProperty("max-height",f),this.alignPickerToComponent(),g.hideFunc}alignPickerToComponent(){if(!this.pickerComponent)return;const{pickerGap:e,config:{pickerType:t},beans:{popupSvc:o,gos:s},eWrapper:i,pickerComponent:n}=this,r=s.get("enableRtl")?"right":"left";o.positionPopupByComponent({type:t,eventSource:i,ePopup:n.getGui(),position:"under",alignSide:r,keepWithinBounds:!0,nudgeY:e})}beforeHidePicker(){this.destroyMouseWheelFunc&&(this.destroyMouseWheelFunc(),this.destroyMouseWheelFunc=void 0),this.toggleExpandedStyles(!1);const e=this.pickerComponent.getGui();e.removeEventListener("focusin",this.onPickerFocusIn),e.removeEventListener("focusout",this.onPickerFocusOut),this.isPickerDisplayed=!1,this.pickerComponent=void 0,this.hideCurrentPicker=null}toggleExpandedStyles(e){if(!this.isAlive())return;const t=this.getAriaElement();Fr(t,e);const o=this.eWrapper.classList;o.toggle("ag-picker-expanded",e),o.toggle("ag-picker-collapsed",!e)}onPickerFocusIn(){this.togglePickerHasFocus(!0)}onPickerFocusOut(e){this.pickerComponent?.getGui().contains(e.relatedTarget)||this.togglePickerHasFocus(!1)}togglePickerHasFocus(e){this.pickerComponent&&this.eWrapper.classList.toggle("ag-picker-has-focus",e)}hidePicker(){this.hideCurrentPicker&&(this.hideCurrentPicker(),this.dispatchLocalEvent({type:"pickerHidden"}))}setInputWidth(e){return Ki(this.eWrapper,e),this}getFocusableElement(){return this.eWrapper}setPickerGap(e){return this.pickerGap=e,this}setPickerMinWidth(e){return typeof e=="number"&&(e=`${e}px`),this.minPickerWidth=e??void 0,this}setPickerMaxWidth(e){return typeof e=="number"&&(e=`${e}px`),this.maxPickerWidth=e??void 0,this}setPickerMaxHeight(e){return typeof e=="number"&&(e=`${e}px`),this.maxPickerHeight=e??void 0,this}destroy(){this.hidePicker(),super.destroy()}},VE=".ag-select{align-items:center;display:flex;&.ag-disabled{opacity:.5}}.ag-select:where(:not(.ag-cell-editor,.ag-label-align-top)){min-height:var(--ag-list-item-height)}:where(.ag-select){.ag-picker-field-wrapper{cursor:default;padding-left:var(--ag-spacing);padding-right:var(--ag-spacing)}&.ag-disabled .ag-picker-field-wrapper:focus{box-shadow:none}.ag-picker-field-display{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ag-picker-field-icon{align-items:center;display:flex}}.ag-select-list{background-color:var(--ag-picker-list-background-color);border:var(--ag-picker-list-border);border-radius:var(--ag-border-radius);box-shadow:var(--ag-dropdown-shadow);overflow:hidden auto}.ag-select-list-item{cursor:default;-webkit-user-select:none;-moz-user-select:none;user-select:none}:where(.ag-ltr) .ag-select-list-item{padding-left:var(--ag-spacing)}:where(.ag-rtl) .ag-select-list-item{padding-right:var(--ag-spacing)}.ag-select-list-item-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}",nl=class extends BE{constructor(e){super({pickerAriaLabelKey:"ariaLabelSelectField",pickerAriaLabelValue:"Select Field",pickerType:"ag-list",className:"ag-select",pickerIcon:"selectOpen",ariaRole:"combobox",...e}),this.registerCSS(VE)}postConstruct(){this.tooltipFeature=this.createOptionalManagedBean(this.beans.registry.createDynamicBean("tooltipFeature",!1,{shouldDisplayTooltip:Js(()=>this.eDisplayField),getGui:()=>this.getGui()})),super.postConstruct(),this.createListComponent(),this.eWrapper.tabIndex=this.gos.get("tabIndex");const{options:e,value:t,placeholder:o}=this.config;e!=null&&this.addOptions(e),t!=null&&this.setValue(t,!0),o&&t==null&&(this.eDisplayField.textContent=o),this.addManagedElementListeners(this.eWrapper,{focusout:this.onWrapperFocusOut.bind(this)})}onWrapperFocusOut(e){this.eWrapper.contains(e.relatedTarget)||this.hidePicker()}createListComponent(){const e=this.createBean(new OE("select"));this.listComponent=e,e.setParentComponent(this);const t=e.getAriaElement(),o=`ag-select-list-${e.getCompId()}`;t.setAttribute("id",o),_p(this.getAriaElement(),t),e.addManagedElementListeners(e.getGui(),{mousedown:s=>{s?.preventDefault()}}),e.addManagedListeners(e,{selectedItem:()=>{this.hidePicker(),this.dispatchLocalEvent({type:"selectedItem"})},fieldValueChanged:()=>{this.listComponent&&(this.setValue(this.listComponent.getValue(),!1,!0),this.hidePicker())}})}createPickerComponent(){return this.listComponent}beforeHidePicker(){this.listComponent?.hideItemTooltip(),super.beforeHidePicker()}onKeyDown(e){const{key:t}=e;switch(t===R.TAB&&this.hidePicker(),t){case R.ENTER:case R.UP:case R.DOWN:case R.PAGE_UP:case R.PAGE_DOWN:case R.PAGE_HOME:case R.PAGE_END:e.preventDefault(),this.isPickerDisplayed?this.listComponent?.handleKeyDown(e):super.onKeyDown(e);break;case R.ESCAPE:super.onKeyDown(e);break;case R.SPACE:this.isPickerDisplayed?e.preventDefault():super.onKeyDown(e);break}}showPicker(){const e=this.listComponent;e&&(super.showPicker(),e.refreshHighlighted())}addOptions(e){for(const t of e)this.addOption(t);return this}addOption(e){return this.listComponent.addOption(e),this}clearOptions(){return this.listComponent?.clearOptions(),this.setValue(void 0,!0),this}updateOptions(e){return this.listComponent?.updateOptions(e)&&this.setValue(void 0,!0),this}setValue(e,t,o){const{listComponent:s,config:{placeholder:i},eDisplayField:n,tooltipFeature:r}=this;if(this.value===e||!s)return this;if(o||s.setValue(e,!0),s.getValue()===this.getValue())return this;let l=s.getDisplayValue();return l==null&&i&&(l=i),n.textContent=l,r?.setTooltipAndRefresh(l??null),super.setValue(e,t)}destroy(){this.listComponent=this.destroyBean(this.listComponent),super.destroy()}},NE={selector:"AG-SELECT",component:nl},WE={tag:"div",cls:"ag-cell-edit-wrapper",children:[{tag:"ag-select",ref:"eEditor",cls:"ag-cell-editor"}]},zE=class extends Fn{constructor(){super(WE,[NE]),this.eEditor=W,this.startedByEnter=!1}wireBeans(e){this.valueSvc=e.valueSvc}initialiseEditor(e){this.focusAfterAttached=e.cellStartedEdit;const{eEditor:t,valueSvc:o,gos:s}=this,{values:i,value:n,eventKey:r}=e;if(we(i)){D(58);return}this.startedByEnter=r!=null?r===R.ENTER:!1;let a=!1;i.forEach(u=>{const h={value:u},g=o.formatValue(e.column,null,u),f=g!=null;h.text=f?g:u,t.addOption(h),a=a||n===u}),a?t.setValue(e.value??void 0,!0):e.values.length&&t.setValue(e.values[0],!0);const{valueListGap:l,valueListMaxWidth:c,valueListMaxHeight:d}=e;l!=null&&t.setPickerGap(l),d!=null&&t.setPickerMaxHeight(d),c!=null&&t.setPickerMaxWidth(c),s.get("editType")!=="fullRow"&&this.addManagedListeners(this.eEditor,{selectedItem:()=>e.stopEditing()})}afterGuiAttached(){this.focusAfterAttached&&this.eEditor.getFocusableElement().focus(),this.startedByEnter&&setTimeout(()=>{this.isAlive()&&this.eEditor.showPicker()})}focusIn(){this.eEditor.getFocusableElement().focus()}agSetEditValue(e){this.params.value=e,this.eEditor.setValue(e??void 0,!0)}getValue(){return this.eEditor.getValue()}isPopup(){return!1}getValidationElement(){return this.eEditor.getAriaElement()}getValidationErrors(){const{params:e}=this,{values:t,getValidationErrors:o}=e,s=this.getValue();let i=[];if(t&&s!=null&&!t.includes(s)){const n=this.getLocaleTextFunc();i.push(n("invalidSelectionValidation","Invalid selection."))}else i=null;return o?o({value:s,internalErrors:i,cellEditorParams:e}):i}},_E={tag:"ag-input-text-field",ref:"eEditor",cls:"ag-cell-editor"},UE=class{constructor(e){this.getLocaleTextFunc=e}getTemplate(){return _E}getAgComponents(){return[Tn]}init(e,t){this.eEditor=e,this.params=t;const o=t.maxLength;o!=null&&e.setMaxLength(o)}getValidationErrors(){const{params:e}=this,{maxLength:t,getValidationErrors:o}=e,s=this.getValue(),i=this.getLocaleTextFunc();let n=[];return t!=null&&typeof s=="string"&&s.length>t&&n.push(i("maxLengthValidation",`Must be ${t} characters or fewer.`,[String(t)])),n.length||(n=null),o?o({value:s,cellEditorParams:e,internalErrors:n}):n}getValue(){const{eEditor:e,params:t}=this,o=e.getValue();return!L(o)&&!L(t.value)?t.value:t.parseValue(o)}getStartValue(){const e=this.params;return e.useFormatter||e.column.getColDef().refData?e.formatValue(e.value):e.value}setCaret(){po()&&this.eEditor.getInputElement().focus({preventScroll:!0});const e=this.eEditor,t=e.getValue(),o=L(t)&&t.length||0;o&&e.getInputElement().setSelectionRange(o,o)}},Kc=class extends In{constructor(){super(new UE(()=>this.getLocaleTextFunc()))}};function $E(e){e.undoRedo?.undo("api")}function KE(e){e.undoRedo?.redo("api")}function qE(e,t){return e.editModelSvc?.getEditRowDataValue(t,{checkSiblings:!0})}function jE(e){const t=e.editModelSvc?.getEditMap(),o=[];return t?.forEach((s,i)=>{const{rowIndex:n,rowPinned:r}=i;s.forEach((a,l)=>{const{editorValue:c,pendingValue:d,sourceValue:u,state:h}=a,g=mt(a);let f=c??d;f===Ie&&(f=void 0);const m={newValue:f,oldValue:u,state:h,column:l,colId:l.getColId(),colKey:l.getColId(),rowIndex:n,rowPinned:r},C=h==="editing";(C||!C&&g)&&o.push(m)})}),o}function YE(e,t=!1){const{editSvc:o}=e;if(o?.isBatchEditing()){if(t)for(const s of e.editModelSvc?.getEditPositions()??[])s.state==="editing"&&o.revertSingleCellEdit(s);else so(e,{persist:!0});eo(e,void 0,{cancel:t})}else o?.stopEditing(void 0,{cancel:t,source:"edit",forceStop:!t,forceCancel:t})}function QE(e,t){const o=re(e,t);return!!e.editSvc?.isEditing(o)}function ZE(e,t){const{key:o,colKey:s,rowIndex:i,rowPinned:n}=t,{editSvc:r,colModel:a}=e,l=a.getCol(s);if(!l){D(12,{colKey:s});return}const d=kt(e,{rowIndex:i,rowPinned:n||null});if(!d){D(290,{rowIndex:i,rowPinned:n});return}if(!r?.isCellEditable({rowNode:d,column:l},"api"))return;n==null&&Xh(e,i),Jh(e,s),r?.startEditing({rowNode:d,column:l},{event:o?new KeyboardEvent("keydown",{key:o}):void 0,source:"api",editable:!0})}function JE(e){return e.editSvc?.validateEdit()||null}function XE(e){return e.undoRedo?.getCurrentUndoStackSize()??0}function ex(e){return e.undoRedo?.getCurrentRedoStackSize()??0}var tx={tag:"div",cls:"ag-popup-editor",attrs:{tabindex:"-1"}},ox=class extends Ga{constructor(e){super(tx),this.params=e}postConstruct(){Go(this.gos,this.getGui(),"popupEditorWrapper",!0),this.addKeyDownListener()}addKeyDownListener(){const e=this.getGui(),t=this.params,o=s=>{Vr(this.gos,s,t.node,t.column,!0)||t.onKeyDown(s)};this.addManagedElementListeners(e,{keydown:o})}};function sx(e,{column:t},o,s,i="ui"){if(o instanceof KeyboardEvent&&(o.key===R.TAB||o.key===R.ENTER||o.key===R.F2||o.key===R.BACKSPACE&&s))return!0;if(o?.shiftKey&&e.rangeSvc?.getCellRanges().length!=0)return!1;const r=t?.getColDef(),a=ix(e.gos,r),l=o?.type;return l==="click"&&o?.detail===1&&a===1||l==="dblclick"&&o?.detail===2&&a===2?!0:i==="api"?!!s:!1}function ix(e,t){return e.get("suppressClickEdit")===!0?0:e.get("singleClickEdit")===!0||t?.singleClickEdit?1:2}function mr(e,t){return e.editModelSvc?.hasEdits(t,{withOpenEditor:!0})??!1}function Xr(e,t){const o=t.column,s=t.rowNode,i=o.getColDef();if(!s)return mr(e,t);const n=i.editable;return s.group&&i.groupRowEditable!=null?e.rowGroupingEditValueSvc?.isGroupCellEditable(s,o)?!0:mr(e,t):o.isColumnFunc(s,n)?!0:mr(e,t)}function nx(e,t,o="ui"){const s=Xr(e,t);if(s||o==="ui")return s;const{rowNode:i,column:n}=t;for(const r of e.colModel.getCols())if(r!==n&&Xr(e,{rowNode:i,column:r}))return!0;return!1}var gn=(e,t=!1)=>{if(e!==void 0)return mt(e)||t&&e.state==="editing"};function cg(e,t,o=!1){return gn(e.editModelSvc?.getEdit(t),o)}var dg=(e,t,o)=>{if(e)for(let s=0,i=e.length;s<i;++s){const n=e[s];if(n.data&&(gn(t?.getEdit({rowNode:n,column:o}))||gn(t?.getEdit({rowNode:n.pinnedSibling,column:o})))||dg(n.childrenAfterGroup,t,o))return!0}};function ug(e,t){const{column:o,rowNode:s}=t;return e.gos.get("groupTotalRow")&&!s?.footer?!1:dg(s?.childrenAfterGroup,e.editModelSvc,o)}function hg(e,{rowNode:t,column:o}){if(t=t.pinnedSibling,!!t)return gn(e.editModelSvc?.getEdit({rowNode:t,column:o}))}var rx=class extends x{constructor(e,t){super(),this.cellCtrl=e,this.beans=t,this.editSvc=t.editSvc,this.editModelSvc=t.editModelSvc}setComp(e){this.cellComp=e,this.applyCellStyles()}applyCellStyles(){const{cellCtrl:e,editSvc:t,beans:o}=this;if(t?.isBatchEditing()&&t.isEditing()){const i=cg(o,e)||ug(o,e)||hg(o,e);this.applyBatchingStyle(i)}else this.applyBatchingStyle(!1);const s=!!this.editModelSvc?.getCellValidationModel().hasCellValidation(this.cellCtrl);this.cellComp.toggleCss("ag-cell-editing-error",s)}applyBatchingStyle(e){this.cellComp.toggleCss("ag-cell-editing",e??!1),this.cellComp.toggleCss("ag-cell-batch-edit",(e&&this.editSvc?.isBatchEditing())??!1)}},ax=class extends x{constructor(e,t){super(),this.rowCtrl=e,this.beans=t,this.gos=t.gos,this.editSvc=t.editSvc,this.editModelSvc=t.editModelSvc}applyRowStyles(){const{rowCtrl:e,editModelSvc:t,beans:o}=this;let s=e.rowNode,i=t?.getEditRow(s);const n=this.editModelSvc?.getRowValidationModel().hasRowValidation({rowNode:s});if(!i&&s.pinnedSibling&&(s=s.pinnedSibling,i=t?.getEditRow(s)),i){const r=Array.from(i.keys()).some(a=>{const l={rowNode:s,column:a};return cg(o,l,!0)||ug(o,l)||hg(o,l)});this.applyStyle(n,r);return}this.applyStyle(n)}applyStyle(e=!1,t=!1){const o=!!this.editSvc?.isBatchEditing(),s=this.gos.get("editType")==="fullRow";this.rowCtrl?.forEachGui(void 0,({rowComp:i})=>{i.toggleCss("ag-row-editing",s&&t),i.toggleCss("ag-row-batch-edit",s&&t&&o),i.toggleCss("ag-row-inline-editing",t),i.toggleCss("ag-row-not-inline-editing",!t),i.toggleCss("ag-row-editing-invalid",s&&t&&e)})}},lx=({rowModel:e,pinnedRowModel:t,editModelSvc:o},s)=>{const i=new Set;e.forEachNode(n=>s.has(n)&&i.add(n)),t?.forEachPinnedRow("top",n=>s.has(n)&&i.add(n)),t?.forEachPinnedRow("bottom",n=>s.has(n)&&i.add(n));for(const n of s)i.has(n)||o.removeEdits({rowNode:n});return i},cx=({editModelSvc:e},t,o)=>{for(const s of t)e?.getEditRow(s)?.forEach((i,n)=>!o.has(n)&&e.removeEdits({rowNode:s,column:n}))},dx=e=>()=>{const t=new Set(e.colModel.getCols()),o=e.editModelSvc.getEditMap(!0),s=new Set(o.keys());cx(e,lx(e,s),t)},ux=new Set(["undo","redo","paste","bulk","rangeSvc"]),hx=new Set(["ui","api"]),gg={paste:"api",rangeSvc:"api",fillHandle:"api",cellClear:"api",bulk:"api"},gx=new Set(Object.keys(gg)),px=new Set(["paste","rangeSvc","cellClear","redo","undo"]),Cr={cancel:!0,source:"api"},fx={cancel:!1,source:"api"},wo={checkSiblings:!0},Zt={force:!0,suppressFlash:!0},mx={force:!0},Cx=class extends x{constructor(){super(...arguments),this.beanName="editSvc",this.committing=!1,this.batch=!1,this.batchStartDispatched=!1,this.stopping=!1,this.rangeSelectionWhileEditing=0}postConstruct(){const{beans:e}=this;this.model=e.editModelSvc,this.valueSvc=e.valueSvc,this.rangeSvc=e.rangeSvc,this.addManagedPropertyListener("editType",({currentValue:s})=>{this.stopEditing(void 0,Cr),this.createStrategy(s)});const t=dx(e),o=()=>{const s=this.model.getCellValidationModel().getCellValidationMap().size>0,i=this.model.getRowValidationModel().getRowValidationMap().size>0;return s||i?this.stopEditing(void 0,Cr):this.isEditing()&&(this.batch?eo(e,this.model.getEditPositions()):this.stopEditing(void 0,fx)),!1};this.addManagedEventListeners({columnPinned:t,columnVisible:t,columnRowGroupChanged:t,rowExpansionStateChanged:t,pinnedRowsChanged:t,displayedRowsChanged:t,sortChanged:o,filterChanged:o,cellFocused:this.onCellFocused.bind(this)})}isBatchEditing(){return this.batch}startBatchEditing(){this.batch||(this.batch=!0,this.batchStartDispatched=!1,this.stopEditing(void 0,Cr))}stopBatchEditing(e){this.batch&&(e&&this.stopEditing(void 0,e),this.batchStartDispatched&&this.dispatchBatchStopped(new Map,!1),this.batch=!1,this.batchStartDispatched=!1)}ensureBatchStarted(){!this.batch||this.batchStartDispatched||(this.batchStartDispatched=!0,this.dispatchBatchEvent("batchEditingStarted",new Map))}createStrategy(e){const{beans:t,gos:o,strategy:s}=this,i=qc(o,e);if(s){if(s.beanName===i)return s;this.destroyStrategy()}return this.strategy=this.createOptionalManagedBean(t.registry.createDynamicBean(i,!0))}destroyStrategy(){this.strategy&&(this.strategy.destroy(),this.strategy=this.destroyBean(this.strategy))}shouldStartEditing(e,t,o,s="ui"){const i=sx(this.beans,e,t,o,s);return i&&(this.strategy??(this.strategy=this.createStrategy())),i}shouldStopEditing(e,t,o="ui"){return this.strategy?.shouldStop(e,t,o)??null}shouldCancelEditing(e,t,o="ui"){return this.strategy?.shouldCancel(e,t,o)??null}validateEdit(){return X0(this.beans)}isEditing(e,t){return this.model.hasEdits(e??void 0,t??wo)}isRowEditing(e,t){return!!e&&this.model.hasRowEdits(e,t)}enableRangeSelectionWhileEditing(){this.beans.rangeSvc&&this.gos.get("cellSelection")&&this.rangeSelectionWhileEditing++}disableRangeSelectionWhileEditing(){this.rangeSelectionWhileEditing=Math.max(0,this.rangeSelectionWhileEditing-1)}isRangeSelectionEnabledWhileEditing(){return this.rangeSelectionWhileEditing>0}startEditing(e,t){const{startedEdit:o=!0,event:s=null,source:i="ui",ignoreEventKey:n=!1,silent:r}=t;if(this.strategy??(this.strategy=this.createStrategy()),!(t.editable??this.isCellEditable(e,"api")))return;const l=re(this.beans,e);if(l&&!l.comp){t.editable=void 0,l.onCompAttachedFuncs.push(()=>this.startEditing(e,t));return}const c=this.shouldStartEditing(e,s,o,i);if(c===!1&&i!=="api"){this.isEditing(e)&&this.stopEditing();return}!this.batch&&this.shouldStopEditing(e,void 0,i)&&!t.continueEditing&&this.stopEditing(void 0,{source:i}),c&&this.ensureBatchStarted(),this.strategy.start({position:e,event:s,source:i,ignoreEventKey:n,startedEdit:o,silent:r})}stopEditing(e,t){const o=this.prepareStopContext(e,t);if(!o)return!1;this.stopping=!0;let s=!1,{edits:i}=o;try{const n=this.processStopRequest(o);return s||(s=n.res),i=n.edits,this.finishStopEditing({...o,edits:i,params:t,position:e,res:s}),s}finally{this.rangeSelectionWhileEditing=0,this.stopping=!1}}prepareStopContext(e,t){const{event:o=null,cancel:s=!1,source:i="ui",forceCancel:n=!1,forceStop:r=!1,commit:a=!1}=t||{};if(gx.has(i)&&this.batch)return e?.rowNode&&e?.column&&this.bulkRefreshCell(e),null;const l=this.committing?gg[i]:i;if(!(this.committing||this.isEditing(e)||this.batch&&this.model.hasEdits(e,wo))||!this.strategy||this.stopping)return null;const d=re(this.beans,e);d&&(d.onEditorAttachedFuncs=[]);const u=!s&&(!!this.shouldStopEditing(e,o,l)||(this.committing||i==="paste")&&!this.batch)||r,h=s&&!!this.shouldCancelEditing(e,o,l)||n;return{cancel:s,cellCtrl:d,edits:this.model.getEditMap(!0),event:o??null,forceCancel:n,forceStop:r,commit:a,position:e,source:i,treatAsSource:l,willCancel:h,willStop:u}}processStopRequest(e){const{event:t,position:o,willCancel:s,willStop:i}=e;return i||s?this.handleStopOrCancel(e):this.shouldHandleMidBatchKey(t,o)?{res:!1,edits:this.handleMidBatchKey(t,o,e)}:(so(this.beans,{persist:!0}),this.batch&&this.strategy?.cleanupEditors(o),{res:!1,edits:this.model.getEditMap()})}handleStopOrCancel(e){const{beans:t,model:o}=this,{cancel:s,commit:i,edits:n,event:r,source:a,willCancel:l,willStop:c}=e,d=!this.batch||!l;so(t,{persist:d,isCancelling:l||s,isStopping:c});const u=o.getEditMap(),g=!l&&(!this.batch||i)?this.processEdits(u,a):[];s?this.strategy?.stopCancelled(e.forceCancel):this.strategy?.stopCommitted(r,i),this.clearValidationIfNoOpenEditors();for(const f of g)o.clearEditValue(f);this.bulkRefreshMap(n);for(const f of o.getEditPositions(u)){const m=re(t,f),C=mt(f);m?.refreshCell({force:!0,suppressFlash:!C})}return{res:c,edits:u}}shouldHandleMidBatchKey(e,t){return e instanceof KeyboardEvent&&this.batch&&!!this.strategy?.midBatchInputsAllowed(t)&&this.isEditing(t,{withOpenEditor:!0})}handleMidBatchKey(e,t,o){const{beans:s,model:i}=this,{cellCtrl:n,edits:r}=o,{key:a}=e,l=a===R.ENTER,c=a===R.ESCAPE,d=a===R.TAB;if(l||d||c){if(l||d)so(s,{persist:!0});else if(c&&n){const{rowNode:u,column:h}=n;if(this.batch&&u&&h){const g={rowNode:u,column:h};eo(s,[g],{silent:!0}),this.model.stop(g,!0,!0),re(s,g)?.refreshCell(Zt)}else this.revertSingleCellEdit(n)}return this.batch?this.strategy?.cleanupEditors():eo(s,i.getEditPositions(),{event:e,cancel:c}),e.preventDefault(),this.bulkRefreshMap(r,{suppressFlash:!0}),i.getEditMap()}return r}finishStopEditing({cellCtrl:e,edits:t,params:o,position:s,res:i,commit:n,forceCancel:r,willCancel:a,willStop:l}){const c=this.beans;i&&s&&(!this.batch||n)&&this.model.removeEdits(s),this.navigateAfterEdit(o,e?.cellPosition),Gs(c),this.clearValidationIfNoOpenEditors();const{rowRenderer:d,formula:u}=c;if(a&&d.refreshRows({rowNodes:Array.from(t.keys())}),this.batch){u?u.refreshFormulas(!0):d.refreshRows({suppressFlash:!0,force:!0});const h=l&&n;(h||a&&r)&&this.dispatchBatchStopped(t,h)}}dispatchBatchStopped(e,t){let o;t&&(o=$0(e),o.size>0&&this.ensureBatchStarted()),this.batchStartDispatched&&(this.batchStartDispatched=!1,this.dispatchBatchEvent("batchEditingStopped",o??new Map))}clearValidationIfNoOpenEditors(){this.model.hasEdits(void 0,{withOpenEditor:!0})||(this.model.getCellValidationModel().clearCellValidationMap(),this.model.getRowValidationModel().clearRowValidationMap())}navigateAfterEdit(e,t){if(!e||!t)return;const{event:o,suppressNavigateAfterEdit:s}=e;if(!(o instanceof KeyboardEvent)||s)return;const{key:n,shiftKey:r}=o,a=this.gos.get("enterNavigatesVerticallyAfterEdit");if(n!==R.ENTER||!a)return;const l=r?R.UP:R.DOWN;this.beans.navigation?.navigateToNextCell(null,l,t,!1)}processEdits(e,t){const o=Array.from(e.keys()),s=this.model.getCellValidationModel().getCellValidationMap().size>0||this.model.getRowValidationModel().getRowValidationMap().size>0,i=[],{changeDetectionSvc:n}=this.beans;n?.beginDeferred();try{for(const r of o){const a=e.get(r);for(const l of a.keys()){const c=a.get(l),d={rowNode:r,column:l};if(mt(c)&&!s){const u=re(this.beans,d);this.setNodeDataValue(r,l,c.pendingValue,u,t)||i.push(d)}}}}finally{n?.endDeferred()}return i}setNodeDataValue(e,t,o,s,i="edit"){const n=hx.has(i)?"edit":i;s&&(s.suppressRefreshCell=!0),this.committing=!0;try{return e.setDataValue(t,o,n)}finally{this.committing=!1,s&&(s.suppressRefreshCell=!1)}}syncEditAfterCommit(e,t){const o=this.model.getEdit(e);o&&o.state!=="editing"&&(t?this.beans.editModelSvc?.setEdit(e,{sourceValue:o.pendingValue}):this.model.clearEditValue(e))}setEditMap(e,t){this.strategy??(this.strategy=this.createStrategy()),this.strategy?.setEditMap(e,t),this.bulkRefreshMap(e);let o=Zt;t?.forceRefreshOfEditCellsOnly&&(o={...vx(e),...Zt}),this.beans.rowRenderer.refreshCells(o)}dispatchEditValuesChanged({rowNode:e,column:t},o={}){if(!e||!t||!o)return;const{pendingValue:s,sourceValue:i}=o,{rowIndex:n,rowPinned:r,data:a}=e;this.beans.eventSvc.dispatchEvent({type:"cellEditValuesChanged",node:e,rowIndex:n,rowPinned:r,column:t,source:"api",data:a,newValue:s,oldValue:i,value:s,colDef:t.getColDef()})}bulkRefreshCell(e,t){Se(this.gos,this.beans.rowModel)&&this.refCell(e,this.model.getEdit(e),t)}bulkRefreshMap(e,t){Se(this.gos,this.beans.rowModel)&&e.forEach((o,s)=>{for(const i of o.keys())this.refCell({rowNode:s,column:i},o.get(i),t)})}refCell({rowNode:e,column:t},o,s={}){const{beans:i,gos:n}=this,r=new Set([e]),a=new Set,l=e.pinnedSibling;l&&r.add(l);const c=e.sibling;c&&a.add(c);let d=e.parent;for(;d;)d.sibling?.footer&&n.get("groupTotalRow")||!d.parent&&d.sibling&&n.get("grandTotalRow")?a.add(d.sibling):a.add(d),d=d.parent;for(const u of r)this.dispatchEditValuesChanged({rowNode:u,column:t},o);for(const u of r)re(i,{rowNode:u,column:t})?.refreshCell(s);for(const u of a){const h=re(i,{rowNode:u,column:t});h&&(h.refreshCell(s),!s.force&&this.batch&&h.editStyleFeature?.applyCellStyles?.())}}stopAllEditing(e=!1,t="ui"){this.isEditing()&&this.stopEditing(void 0,{cancel:e,source:t})}isCellEditable(e,t="ui"){const{gos:o,beans:s}=this,i=e.rowNode;if(i.group&&e.column.getColDef().groupRowEditable==null){if(o.get("treeData")){if(!i.data&&!o.get("enableGroupEdit"))return!1}else if(!o.get("enableGroupEdit"))return!1}const n=qc(o)==="fullRow"?nx(s,e,t):Xr(s,e);return n&&(this.strategy??(this.strategy=this.createStrategy())),n}cellEditingInvalidCommitBlocks(){return this.gos.get("invalidEditValueMode")==="block"}checkNavWithValidation(e,t,o=!0){if(this.hasValidationErrors(e)){const s=re(this.beans,e);return this.cellEditingInvalidCommitBlocks()?(t?.preventDefault?.(),o&&(s&&!s.hasBrowserFocus()&&s.focusCell(),s?.comp?.getCellEditor()?.focusIn?.()),"block-stop"):(s&&this.revertSingleCellEdit(s),"revert-continue")}return"continue"}revertSingleCellEdit(e,t=!1){const o=re(this.beans,e);o?.comp?.getCellEditor()&&(eo(this.beans,[e],{silent:!0}),this.model.clearEditValue(e),Wo(this.beans,e,{silent:!0}),no(this.beans),o?.refreshCell(Zt),t&&(o?.focusCell(),o?.comp?.getCellEditor()?.focusIn?.()))}hasValidationErrors(e){no(this.beans);const t=re(this.beans,e);t&&(t.refreshCell(Zt),t.rowCtrl.rowEditStyleFeature?.applyRowStyles());let o=!1;return e?.rowNode?(o||(o=this.model.getRowValidationModel().hasRowValidation({rowNode:e.rowNode})),e.column&&(o||(o=this.model.getCellValidationModel().hasCellValidation({rowNode:e.rowNode,column:e.column})))):(o||(o=this.model.getCellValidationModel().getCellValidationMap().size>0),o||(o=this.model.getRowValidationModel().getRowValidationMap().size>0)),o}moveToNextCell(e,t,o,s="ui"){let i;const n=this.isEditing(),r=n&&this.checkNavWithValidation(void 0,o)==="block-stop";return e instanceof ms&&n&&(i=this.strategy?.moveToNextEditingCell(e,t,o,s,r)),i===null||(i=i||!!this.beans.focusSvc.focusedHeader,i===!1&&!r&&this.stopEditing()),i}getPendingEditValue(e,t,o){if(o==="data"||o==="batch"&&!this.batch)return;const s=this.model.getEdit({rowNode:e,column:t},wo);if(!s||this.stopping&&!this.batch&&!s.editorState?.cellStartedEditing)return;if(o==="edit"){const n=s.editorValue;if(n!=null&&n!==Ie)return n}const i=s.pendingValue;if(i!==Ie)return i}getCellDataValue(e){const t=this.model.getEdit(e,wo);if(t){const o=t.pendingValue;if(o!==Ie)return o;const s=t.sourceValue;if(s!=null)return s}return this.valueSvc.getValue(e.column,e.rowNode,"data")}addStopEditingWhenGridLosesFocus(e){z0(this,this.beans,e)}createPopupEditorWrapper(e){return new ox(e)}batchResetToSourceValue(e){if(!this.batch)return!1;const t=this.model.getEdit(e);if(!t)return!1;const{pendingValue:o,sourceValue:s,state:i}=t;return o===s||i==="editing"?!1:(this.dispatchEditValuesChanged(e,{...t,pendingValue:s}),this.beans.editModelSvc?.removeEdits(e),re(this.beans,e)?.refreshCell(Zt),!0)}setDataValue(e,t,o){try{const s=this.batch,i=this.isEditing(s?void 0:e);if((!i||this.committing)&&!s&&!px.has(o)||!i&&!s&&o==="paste"||o==="batch"&&!s)return;if(o==="edit"){if(i&&this.applyEditorValue(e,t))return!0;if(!s)return}if(this.strategy??(this.strategy=this.createStrategy()),o==="batch"||o==="edit")return this.applyDirectValue(e,t,o);const n=this.beans;let r;if(s?r="ui":this.committing?r=o??"api":r="api",!o||ux.has(o))return this.applyDirectValue(e,t,o);const a=this.applyExistingEdit(e,t,o,r);return a!==void 0?a:(Yo(n,e,t,o,void 0,{persist:!0}),this.ensureBatchStarted(),this.stopEditing(e,{source:r,suppressNavigateAfterEdit:!0}),!0)}finally{this.committing=!1}}applyExistingEdit(e,t,o,s){const i=this.model.getEdit(e);if(i)return i.pendingValue===t?!1:i.sourceValue!==t?(Yo(this.beans,e,t,o,void 0,{persist:!0}),this.ensureBatchStarted(),this.stopEditing(e,{source:s,suppressNavigateAfterEdit:!0}),!0):(this.beans.editModelSvc?.removeEdits(e),this.ensureBatchStarted(),this.dispatchEditValuesChanged(e,{...i,pendingValue:t}),!0)}applyEditorValue(e,t){const o=this.beans,s=re(o,e),i=s?.comp?.getCellEditor();return!s||!i?!1:(Yo(o,e,t,"edit",void 0,{persist:!0}),s.editStyleFeature?.applyCellStyles?.(),"agSetEditValue"in i?(i.agSetEditValue(t),!0):i.refresh&&s.editCompDetails?(i.refresh({...s.editCompDetails.params,value:t}),!0):(s.hasBrowserFocus()&&s.onEditorAttachedFuncs.push(()=>{const r=re(this.beans,e);r?.focusCell(!0),r?.comp?.getCellEditor()?.focusIn?.()}),eo(o,[e],{silent:!0,cancel:!0}),Wo(o,e,{silent:!0}),no(o),re(o,e)?.refreshCell(Zt),!0))}applyDirectValue(e,t,o){const s=this.beans;if(this.batch){if(o==="batch"&&re(s,e)?.comp?.getCellEditor()){const{editModelSvc:r,valueSvc:a}=s,{rowNode:l,column:c}=e;r?.getEdit(e)?.sourceValue===void 0&&r?.setEdit(e,{sourceValue:a.getValue(c,l,"data")}),r?.setEdit(e,{pendingValue:t})}else Yo(s,e,t,o,void 0,{persist:!0}),o!=="batch"&&this.cleanupEditors();return Gs(s),this.ensureBatchStarted(),this.bulkRefreshCell(e),!0}Yo(s,e,t,o,void 0,{persist:!0});const i=re(s,e),n=this.setNodeDataValue(e.rowNode,e.column,t,i,o);return this.syncEditAfterCommit(e,n),Gs(s),re(s,e)?.refreshCell(n?mx:Zt),n}handleColDefChanged(e){q0(this.beans,e)}destroy(){this.model.clear(),this.destroyStrategy(),super.destroy()}prepDetailsDuringBatch(e,t){const{model:o}=this;if(!this.batch||!o.hasRowEdits(e.rowNode,wo))return;const{rowNode:i}=e,{compDetails:n,valueToDisplay:r}=t;if(n){const{params:a}=n;return a.data=o.getEditRowDataValue(i,wo),{compDetails:n}}return{valueToDisplay:r}}cleanupEditors(){this.strategy?.cleanupEditors()}dispatchCellEvent(e,t,o,s){this.strategy?.dispatchCellEvent(e,t,o,s)}dispatchBatchEvent(e,t){this.eventSvc.dispatchEvent(this.createBatchEditEvent(e,t))}createBatchEditEvent(e,t){return K(this.gos,{type:e,...e==="batchEditingStopped"?{changes:this.toEventChangeList(t)}:{}})}toEventChangeList(e){return this.model.getEditPositions(e).map(t=>({rowIndex:t.rowNode.rowIndex,rowPinned:t.rowNode.rowPinned,columnId:t.column.getColId(),newValue:t.pendingValue,oldValue:t.sourceValue}))}applyBulkEdit({rowNode:e,column:t},o){if(!o||o.length===0)return;const{beans:s,rangeSvc:i,valueSvc:n}=this,{formula:r}=s;so(s,{persist:!0});const a=this.model.getEditMap(!0);let l=a.get(e)?.get(t)?.pendingValue,c=!1;this.batch||(this.eventSvc.dispatchEvent({type:"bulkEditingStarted"}),c=!0);const d=r?.isFormula(l)??!1;o.forEach(h=>{const g=h.columns.some(f=>f?.isAllowFormula());if(i?.forEachRowInRange(h,f=>{const m=kt(s,f);if(m===void 0)return;const C=a.get(m)??new Map;let v=l;for(const w of h.columns){if(!w)continue;const b=!!d&&w.isAllowFormula();if(this.isCellEditable({rowNode:m,column:w},"api")){const y=n.getValue(w,m,"data",!0);let S=n.parseValue(w,m??null,v,y);Number.isNaN(S)&&(S=null),C.set(w,{editorValue:void 0,pendingValue:S,sourceValue:y,state:"changed",editorState:{isCancelAfterEnd:void 0,isCancelBeforeStart:void 0}})}b&&(v=r?.updateFormulaByOffset({value:v,columnDelta:1}))}C.size>0&&a.set(m,C),d&&g&&(l=r?.updateFormulaByOffset({value:l,rowDelta:1}))}),this.setEditMap(a),this.batch){this.cleanupEditors(),Gs(s),this.ensureBatchStarted();return}this.committing=!0;try{this.stopEditing(void 0,{source:"bulk"})}finally{this.committing=!1,c&&this.eventSvc.dispatchEvent({type:"bulkEditingStopped",changes:this.toEventChangeList(a)})}});const u=re(s,{rowNode:e,column:t});u&&u.focusCell(!0)}createCellStyleFeature(e){return new rx(e,this.beans)}createRowStyleFeature(e){return new ax(e,this.beans)}setEditingCells(e,t){const{beans:o}=this,{colModel:s,valueSvc:i}=o,n=new Map;for(let{colId:r,column:a,colKey:l,rowIndex:c,rowPinned:d,newValue:u,state:h}of e){const g=r?s.getCol(r):l?s.getCol(l):a;if(!g)continue;const f=kt(o,{rowIndex:c,rowPinned:d});if(!f)continue;const m=i.getValue(g,f,"data",!0);if(!t?.forceRefreshOfEditCellsOnly&&!mt({pendingValue:u,sourceValue:m})&&h!=="editing")continue;let C=n.get(f);C||(C=new Map,n.set(f,C)),u===void 0&&(u=Ie),C.set(g,{editorValue:void 0,pendingValue:u,sourceValue:m,state:h??"changed",editorState:{isCancelAfterEnd:void 0,isCancelBeforeStart:void 0}})}this.setEditMap(n,t)}onCellFocused(e){const t=re(this.beans,e);if(!t||!this.isEditing(t,wo))return;const o=this.model.getEdit(t);if(!o||!mt(o))return;const i=this.getLocaleTextFunc()("ariaPendingChange","Pending Change");this.beans.ariaAnnounce?.announceValue(i,"pendingChange")}allowedFocusTargetOnValidation(e){return re(this.beans,e)}};function vx(e){return{rowNodes:e?Array.from(e.keys()):void 0,columns:e?[...new Set(Array.from(e.values()).flatMap(t=>Array.from(t.keys())))]:void 0}}function qc(e,t){return t??e.get("editType")??"singleCell"}var pg=class extends x{postConstruct(){this.model=this.beans.editModelSvc,this.editSvc=this.beans.editSvc,this.addManagedEventListeners({cellFocused:this.onCellFocusChanged?.bind(this),cellFocusCleared:this.onCellFocusChanged?.bind(this)})}clearEdits(e){this.model.clearEditValue(e)}onCellFocusChanged(e){let t;const o=e.previousParams,{editSvc:s,beans:i}=this,n=e.type==="cellFocused"?e.sourceEvent:null;o&&(t=re(i,o));const{gos:r,editModelSvc:a}=i,l=e.type==="cellFocusCleared";if(s.isEditing(void 0,{withOpenEditor:!0})){const{column:c,rowIndex:d,rowPinned:u}=e,h={column:c,rowNode:kt(i,{rowIndex:d,rowPinned:u})},g=r.get("invalidEditValueMode")==="block";if(g)return;const f=!g,m=!!a?.getCellValidationModel().hasCellValidation(h),C=f&&m;!(o||l)||s.stopEditing(void 0,{cancel:C,source:l&&f?"api":void 0,event:n})||(s.isBatchEditing()?s.cleanupEditors():s.stopEditing(void 0,{source:"api"}))}t?.refreshCell({suppressFlash:!0,force:!0})}stopCancelled(e){const t=this.editSvc.isBatchEditing()&&!e;for(const o of this.model.getEditPositions())ni(this.beans,o,{cancel:!0},re(this.beans,o)),this.model.stop(o,t,!0);return!0}stopCommitted(e,t){const o=this.model.getEditPositions(),s={all:[],pass:[],fail:[]};for(const r of o)s.all.push(r),(this.model.getCellValidationModel().getCellValidation(r)?.errorMessages?.length??0)>0?s.fail.push(r):s.pass.push(r);const i=this.processValidationResults(s),n=this.editSvc.isBatchEditing()&&!t;for(const r of i.destroy)ni(this.beans,r,{event:e},re(this.beans,r)),this.model.stop(r,n,!1);for(const r of i.keep){const a=re(this.beans,r);!this.editSvc.cellEditingInvalidCommitBlocks()&&a&&this.editSvc.revertSingleCellEdit(a)}return!0}cleanupEditors({rowNode:e}={},t){so(this.beans,{persist:!1});const o=this.model.getEditPositions(),s=[];if(e)for(const i of o)i.rowNode!==e&&s.push(i);else for(const i of o)s.push(i);eo(this.beans,s),Gs(this.beans,t)}setFocusOutOnEditor(e){e.comp?.getCellEditor()?.focusOut?.()}setFocusInOnEditor(e){const t=e.comp,o=t?.getCellEditor();if(o?.focusIn)o.focusIn();else{const s=this.beans.gos.get("editType")==="fullRow";e.focusCell(s),e.onEditorAttachedFuncs.push(()=>t?.getCellEditor()?.focusIn?.())}}setupEditors(e){const{event:t,ignoreEventKey:o=!1,startedEdit:s,position:i,cells:n=this.model.getEditPositions()}=e,r=t instanceof KeyboardEvent&&!o&&t.key||void 0;U0(this.beans,n,i,r,t,s)}dispatchCellEvent(e,t,o,s){const i=re(this.beans,e);i&&this.eventSvc.dispatchEvent({...i.createEvent(t??null,o),...s})}dispatchRowEvent(e,t,o){if(o)return;const s=dn(this.beans,e);s&&this.eventSvc.dispatchEvent(s.createRowEvent(t))}shouldStop(e,t,o="ui"){const s=this.editSvc.isBatchEditing();return s&&o==="api"?!0:s&&(o==="ui"||o==="edit")?!1:o==="api"?!0:t instanceof KeyboardEvent&&!s?t.key===R.ENTER:null}shouldCancel(e,t,o="ui"){const s=this.editSvc.isBatchEditing();return!!(t instanceof KeyboardEvent&&!s&&t.key===R.ESCAPE||s&&o==="api"||o==="api")}setEditMap(e,t){t?.update||this.editSvc.stopEditing(void 0,{cancel:!0,source:"api"});const o=[];if(e.forEach((s,i)=>{s.forEach((n,r)=>{n.state==="editing"&&o.push({...n,rowNode:i,column:r})})}),t?.update&&(e=new Map([...this.model.getEditMap(),...e])),this.model?.setEditMap(e),o.length>0){const s=o.at(-1),i=s.pendingValue===Ie?void 0:s.pendingValue;this.start({position:s,event:new KeyboardEvent("keydown",{key:i}),source:"api"});const n=re(this.beans,s);n&&this.setFocusInOnEditor(n)}}destroy(){this.cleanupEditors(),super.destroy()}},wx=class extends pg{constructor(){super(...arguments),this.beanName="fullRow",this.startedRows=new Set}shouldStop(e,t,o="ui"){const{rowNode:s,beans:i}=this,{rowNode:n}=e||{};if(!dn(i,{rowNode:s}))return!0;const a=super.shouldStop({rowNode:s},t,o);return a!==null?a:s?n!==s:!1}midBatchInputsAllowed({rowNode:e}){return e?this.model.hasEdits({rowNode:e}):!1}clearEdits(e){this.model.clearEditValue(e)}start(e){const{position:t,silent:o,startedEdit:s,event:i,ignoreEventKey:n}=e,{rowNode:r}=t,{beans:a,model:l,startedRows:c}=this;this.rowNode!==r&&super.cleanupEditors(t);const d=a.visibleCols.allCols,u=[],h=[];for(const g of d)g.isCellEditable(r)&&h.push(g);if(h.length!=0){c.has(r)||(this.dispatchRowEvent({rowNode:r},"rowEditingStarted",o),c.add(r));for(const g of h){const f={rowNode:r,column:g};u.push(f),l.start(f)}this.rowNode=r,this.setupEditors({cells:u,position:t,startedEdit:s,event:i,ignoreEventKey:n})}}processValidationResults(e){return e.fail.length>0&&this.editSvc.cellEditingInvalidCommitBlocks()?{destroy:[],keep:e.all}:{destroy:e.all,keep:[]}}stopCancelled(e){const{rowNode:t,model:o}=this;return t&&!o.hasRowEdits(t)?!1:(super.stopCancelled(e),this.cleanupEditors({rowNode:t},!0),this.rowNode=void 0,!0)}stopCommitted(e,t){const{rowNode:o,beans:s,model:i,editSvc:n}=this;if(o&&!i.hasRowEdits(o))return!1;const r=[];if(i.getEditMap().forEach((a,l)=>{if(!(!a||a.size===0)){for(const c of a.values())if(mt(c)){r.push(l);break}}}),no(s),n.checkNavWithValidation({rowNode:o})==="block-stop")return!1;if(super.stopCommitted(e,t),t||!n.isBatchEditing())for(const a of r)this.dispatchRowEvent({rowNode:a},"rowValueChanged");return this.cleanupEditors({rowNode:o},!0),this.rowNode=void 0,!0}onCellFocusChanged(e){const{rowIndex:t}=e,o=e.previousParams;if(o?.rowIndex===t||e.sourceEvent instanceof KeyboardEvent)return;const{beans:s,gos:i,model:n}=this;if(s.editSvc?.isRangeSelectionEnabledWhileEditing())return;const r=re(s,o);i.get("invalidEditValueMode")==="block"&&r&&(n.getCellValidationModel().getCellValidation(r)||n.getRowValidationModel().getRowValidation(r))||super.onCellFocusChanged(e)}cleanupEditors(e={},t){super.cleanupEditors(e,t);const{startedRows:o}=this;for(const s of o)this.dispatchRowEvent({rowNode:s},"rowEditingStopped"),this.destroyEditorsForRow(s);o.clear()}destroyEditorsForRow(e){const t=dn(this.beans,{rowNode:e});if(!t)return;const o={};for(const s of t.getAllCellCtrls())s.comp?.getCellEditor()&&ni(this.beans,s,o,s)}moveToNextEditingCell(e,t,o,s="ui",i=!1){const{beans:n,model:r,gos:a,editSvc:l}=this,c=e.cellPosition;let d;r.suspend(!0);try{d=n.navigation?.findNextCellToFocusOn(c,{backwards:t,startEditing:!0,skipToNextEditableCell:!1})}finally{r.suspend(!1)}if(d===!1)return null;if(d==null)return!1;const u=d.cellPosition,h=e.isCellEditable(),g=d.isCellEditable(),f=u&&c.rowIndex===u.rowIndex&&c.rowPinned===u.rowPinned;h&&this.setFocusOutOnEditor(e),this.restoreEditors();const m=a.get("suppressStartEditOnTab");return g&&!i?m?d.focusCell(!0,o):(d.comp?.getCellEditor()||Wo(n,d,{event:o,cellStartedEdit:!0}),this.setFocusInOnEditor(d),d.focusCell(!1,o)):(g&&i&&this.setFocusInOnEditor(d),d.focusCell(!0,o)),!f&&!i&&(l?.stopEditing({rowNode:e.rowNode},{event:o,forceStop:!0}),l?.isRowEditing(e.rowNode,{withOpenEditor:!0})&&this.cleanupEditors(d,!0),m?d.focusCell(!0,o):l.startEditing(d,{startedEdit:!0,event:o,source:s,ignoreEventKey:!0,editable:g||void 0})),e.rowCtrl?.refreshRow({suppressFlash:!0,force:!0}),!0}restoreEditors(){const{beans:e,model:t}=this;t.getEditMap().forEach((o,s)=>o.forEach(({state:i},n)=>{if(i!=="editing")return;const r=re(e,{rowNode:s,column:n});r&&!r.comp?.getCellEditor()&&Wo(e,r,{silent:!0})}))}destroy(){super.destroy(),this.rowNode=void 0,this.startedRows.clear()}},bx=class extends pg{constructor(){super(...arguments),this.beanName="singleCell"}shouldStop(e,t,o="ui"){const s=super.shouldStop(e,t,o);if(s!==null)return s;const i=e?.rowNode,n=e?.column,r=this.rowNode,a=this.column;return(!r||!a)&&i&&n?null:r!==i||a!==n?!0:!r&&!a?this.model.hasEdits(void 0,{withOpenEditor:!0}):!1}midBatchInputsAllowed(e){return this.model.hasEdits(e)}start(e){const{position:t,startedEdit:o,event:s,ignoreEventKey:i}=e;(this.rowNode!==t.rowNode||this.column!==t.column)&&super.cleanupEditors(),this.rowNode=t.rowNode,this.column=t.column,this.model.start(t),this.setupEditors({cells:[t],position:t,startedEdit:o,event:s,ignoreEventKey:i})}dispatchRowEvent(e,t,o){}processValidationResults(e){return e.fail.length>0&&this.editSvc.cellEditingInvalidCommitBlocks()?{destroy:[],keep:e.all}:{destroy:e.all,keep:[]}}stopCancelled(e){return super.stopCancelled(e),this.clearPosition()}stopCommitted(e,t){return super.stopCommitted(e,t),this.clearPosition()}clearPosition(){return this.rowNode=void 0,this.column=void 0,!0}onCellFocusChanged(e){const{colModel:t,editSvc:o}=this.beans,{rowIndex:s,column:i,rowPinned:n}=e,r=kt(this.beans,{rowIndex:s,rowPinned:n}),a=Kr(i),l=t.getCol(a),c=e.previousParams;if(c){const d=Kr(c.column);if(c?.rowIndex===s&&d===a&&c?.rowPinned===n)return}e.type=="cellFocused"&&(o?.isRangeSelectionEnabledWhileEditing()||o?.isEditing({rowNode:r,column:l},{withOpenEditor:!0}))||super.onCellFocusChanged(e)}moveToNextEditingCell(e,t,o,s="ui",i=!1){const n=this.beans.focusSvc.getFocusedCell();n&&(e=es(this.beans,n)??e);const r=e.cellPosition;let a;const l=this.beans.gos.get("editType")==="fullRow";l&&this.model.suspend(!0),i||(e.eGui.focus(),this.editSvc?.stopEditing(e,{source:this.editSvc?.isBatchEditing()?"ui":"api",event:o}));try{a=this.beans.navigation?.findNextCellToFocusOn(r,{backwards:t,startEditing:!0})}finally{l&&this.model.suspend(!1)}if(a===!1)return null;if(a==null)return!1;const c=a.cellPosition,d=e.isCellEditable(),u=a.isCellEditable(),h=c&&r.rowIndex===c.rowIndex&&r.rowPinned===c.rowPinned;d&&!i&&this.setFocusOutOnEditor(e);const g=this.gos.get("suppressStartEditOnTab");let f=!1;if(!h&&!i&&(super.cleanupEditors(a,!0),g?a.focusCell(!0,o):(f=!0,this.editSvc.startEditing(a,{startedEdit:!0,event:o,source:s,ignoreEventKey:!0,editable:u}))),u&&!i){if(a.focusCell(!1,o),g)a.focusCell(!0,o);else if(!a.comp?.getCellEditor()){if(!f){const m=this.editSvc?.isEditing(a,{withOpenEditor:!0});Wo(this.beans,a,{event:o,cellStartedEdit:!0,silent:m})}this.setFocusInOnEditor(a),this.cleanupEditors(a)}}else u&&i&&this.setFocusInOnEditor(a),a.focusCell(!0,o);return e.rowCtrl?.refreshRow({suppressFlash:!0,force:!0}),!0}destroy(){super.destroy(),this.rowNode=void 0,this.column=void 0}},mo={moduleName:"EditCore",version:I,beans:[W0,Cx],apiFunctions:{getEditingCells:jE,getEditRowValues:qE,getCellEditorInstances:_0,startEditingCell:ZE,stopEditing:YE,isEditing:QE,validateEdit:JE},dynamicBeans:{singleCell:bx,fullRow:wx},dependsOn:[Mn,ag],css:[gE]},Sx={moduleName:"UndoRedoEdit",version:I,beans:[hE],apiFunctions:{undoCellEditing:$E,redoCellEditing:KE,getCurrentUndoSize:XE,getCurrentRedoSize:ex},dependsOn:[mo]},yx={moduleName:"TextEditor",version:I,userComponents:{agCellEditor:Kc,agTextCellEditor:Kc},dependsOn:[mo]},Rx={moduleName:"NumberEditor",version:I,userComponents:{agNumberCellEditor:{classImp:TE}},dependsOn:[mo]},Fx={moduleName:"DateEditor",version:I,userComponents:{agDateCellEditor:wE,agDateStringCellEditor:yE},dependsOn:[mo]},Ex={moduleName:"CheckboxEditor",version:I,userComponents:{agCheckboxCellEditor:fE},dependsOn:[mo]},xx={moduleName:"SelectEditor",version:I,userComponents:{agSelectCellEditor:zE},dependsOn:[mo]},Px={moduleName:"LargeTextEditor",version:I,userComponents:{agLargeTextCellEditor:xE},dependsOn:[mo]},Dx={moduleName:"CustomEditor",version:I,dependsOn:[mo]},fg={agSetColumnFilter:"agSetColumnFilterHandler",agMultiColumnFilter:"agMultiColumnFilterHandler",agGroupColumnFilter:"agGroupColumnFilterHandler",agNumberColumnFilter:"agNumberColumnFilterHandler",agBigIntColumnFilter:"agBigIntColumnFilterHandler",agDateColumnFilter:"agDateColumnFilterHandler",agTextColumnFilter:"agTextColumnFilterHandler"},Mx=new Set(Object.values(fg));function Jt(e,t){const o=e.filterUi;if(!o)return null;if(o.created)return o.promise;if(t)return null;const s=o.create(o.refreshed),i=o;return i.created=!0,i.promise=s,s}function Tx(e,t,o,s,i,n,r){return t.refresh?.({...o,model:s,source:n,additionalEventAttributes:r}),e().then(a=>{if(a){const{filter:l,filterParams:c}=a;mg(l,c,s,i,n,r)}})}function mg(e,t,o,s,i,n){e?.refresh?.({...t,model:o,state:s,source:i,additionalEventAttributes:n})}function Cg(e,t,o,s){const i=e();i?.created&&i.promise.then(n=>{const r=t();mg(n,i.filterParams,r,o()??{model:r},"ui",s)})}function jc(e){let t,o=!1,s;const{action:i,filterParams:n,getFilterUi:r,getModel:a,getState:l,updateState:c,updateModel:d,processModelToApply:u}=e;switch(i){case"apply":{const h=l();s=h?.model??null,u&&(s=u(s)),t={state:h?.state,model:s},o=!0;break}case"clear":{t={model:null},n?.buttons?.includes("apply")||(o=!0,s=null);break}case"reset":{t={model:null},o=!0,s=null;break}case"cancel":{t={model:a()};break}}c(t),o?d(s):Cg(r,a,l,{fromAction:i})}function Te(e,t){return e[t]??null}var Ix=class extends Ua{constructor(){super(...arguments),this.iconCreated=!1}wireComp(e,t,o,s,i){this.comp=e;const n=di(this,this.beans.context,i);this.eButtonShowMainFilter=o,this.eFloatingFilterBody=s,this.setGui(t,n),this.setupActive(),this.refreshHeaderStyles(),this.setupWidth(n),this.setupLeft(n),this.setupHover(n),this.setupFocus(n),this.setupAria(),this.setupFilterButton(),this.setupUserComp(),this.setupSyncWithFilter(n),this.setupUi(),n.addManagedElementListeners(this.eButtonShowMainFilter,{click:this.showParentFilter.bind(this)}),this.setupFilterChangedListener(n);const r=()=>this.onColDefChanged(n);n.addManagedListeners(this.column,{colDefChanged:r}),n.addManagedEventListeners({filterSwitched:({column:a})=>{a===this.column&&r()}}),n.addDestroyFunc(()=>{this.eButtonShowMainFilter=null,this.eFloatingFilterBody=null,this.userCompDetails=null,this.clearComponent()})}resizeHeader(){}moveHeader(){}getHeaderClassParams(){const{column:e,beans:t}=this,o=e.colDef;return K(t.gos,{colDef:o,column:e,floatingFilter:!0})}setupActive(){const e=this.column.getColDef(),t=!!e.filter,o=!!e.floatingFilter;this.active=t&&o}setupUi(){if(this.comp.setButtonWrapperDisplayed(!this.suppressFilterButton&&this.active),this.comp.addOrRemoveBodyCssClass("ag-floating-filter-full-body",this.suppressFilterButton),this.comp.addOrRemoveBodyCssClass("ag-floating-filter-body",!this.suppressFilterButton),!this.active||this.iconCreated)return;const e=Je("filter",this.beans,this.column);e&&(this.iconCreated=!0,this.eButtonShowMainFilter.appendChild(e))}setupFocus(e){e.createManagedBean(new li(this.eGui,{shouldStopEventPropagation:this.shouldStopEventPropagation.bind(this),onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this)}))}setupAria(){const e=this.getLocaleTextFunc();Cs(this.eButtonShowMainFilter,e("ariaFilterMenuOpen","Open Filter Menu"))}onTabKeyDown(e){const{beans:t}=this;if(ve(t)===this.eGui)return;const i=$o(t,this.eGui,null,e.shiftKey);if(i){t.headerNavigation?.scrollToColumn(this.column),e.preventDefault(),i.focus();return}const n=this.findNextColumnWithFloatingFilter(e.shiftKey);n&&t.focusSvc.focusHeaderPosition({headerPosition:{headerRowIndex:this.rowCtrl.rowIndex,column:n},event:e})&&e.preventDefault()}findNextColumnWithFloatingFilter(e){const t=this.beans.visibleCols;let o=this.column;do if(o=e?t.getColBefore(o):t.getColAfter(o),!o)break;while(!o.getColDef().filter||!o.getColDef().floatingFilter);return o}handleKeyDown(e){super.handleKeyDown(e);const t=this.getWrapperHasFocus();switch(e.key){case R.UP:case R.DOWN:case R.LEFT:case R.RIGHT:if(t)return;Bo(e);case R.ENTER:t&&Ho(this.eGui)&&e.preventDefault();break;case R.ESCAPE:t||this.eGui.focus()}}onFocusIn(e){if(this.eGui.contains(e.relatedTarget))return;const o=!!e.relatedTarget&&!e.relatedTarget.classList.contains("ag-floating-filter"),s=!!e.relatedTarget&&Eo(e.relatedTarget,"ag-floating-filter");if(o&&s&&e.target===this.eGui){const i=this.lastFocusEvent,n=!!(i&&i.key===R.TAB);if(i&&n){const r=i.shiftKey;Ho(this.eGui,r)}}this.focusThis()}setupHover(e){this.beans.colHover?.addHeaderFilterColumnHoverListener(e,this.comp,this.column,this.eGui)}setupLeft(e){const t=new _a(this.column,this.eGui,this.beans);e.createManagedBean(t)}setupFilterButton(){this.suppressFilterButton=!this.beans.menuSvc?.isFloatingFilterButtonEnabled(this.column),this.highlightFilterButtonWhenActive=!Ze(this.gos)}setupUserComp(){if(!this.active)return;const e=this.beans.colFilter?.getFloatingFilterCompDetails(this.column,()=>this.showParentFilter());e&&this.setCompDetails(e)}setCompDetails(e){this.userCompDetails=e,this.comp.setCompDetails(e)}showParentFilter(){const e=this.suppressFilterButton?this.eFloatingFilterBody:this.eButtonShowMainFilter;this.beans.menuSvc?.showFilterMenu({column:this.column,buttonElement:e,containerType:"floatingFilter",positionBy:"button"})}setupSyncWithFilter(e){if(!this.active)return;const{beans:{colFilter:t},column:o,gos:s}=this,i=n=>{if(n?.source==="filterDestroyed"&&(!this.isAlive()||!t?.isAlive()))return;const r=this.comp.getFloatingFilterComp();r&&r.then(a=>{if(a){if(s.get("enableFilterHandlers")){const d=n;let u="filter";d?.afterFloatingFilter?u="ui":d?.afterDataChange?u="dataChanged":n?.source==="api"&&(u="api"),this.updateFloatingFilterParams(this.userCompDetails,u);return}const l=t?.getCurrentFloatingFilterParentModel(o),c=n?{...n,columns:n.columns??[],source:n.source==="api"?"api":"columnFilter"}:null;a.onParentModelChanged(l,c)}})};[this.destroySyncListener]=e.addManagedListeners(o,{filterChanged:i}),t?.isFilterActive(o)&&i(null)}setupWidth(e){const t=()=>{const o=`${this.column.getActualWidth()}px`;this.comp.setWidth(o)};e.addManagedListeners(this.column,{widthChanged:t}),t()}setupFilterChangedListener(e){this.active&&([this.destroyFilterChangedListener]=e.addManagedListeners(this.column,{filterChanged:this.updateFilterButton.bind(this)}),this.updateFilterButton())}updateFilterButton(){if(!this.suppressFilterButton&&this.comp){const e=!!this.beans.filterManager?.isFilterAllowed(this.column);this.comp.setButtonWrapperDisplayed(e),this.highlightFilterButtonWhenActive&&e&&this.eButtonShowMainFilter.classList.toggle("ag-filter-active",this.column.isFilterActive())}}onColDefChanged(e){const t=this.active;this.setupActive();const o=!t&&this.active;t&&!this.active&&(this.destroySyncListener(),this.destroyFilterChangedListener());const s=this.beans.colFilter,i=this.active?s?.getFloatingFilterCompDetails(this.column,()=>this.showParentFilter()):null,n=this.comp.getFloatingFilterComp();!n||!i?this.updateCompDetails(e,i,o):n.then(r=>{!r||s?.areFilterCompsDifferent(this.userCompDetails??null,i)?this.updateCompDetails(e,i,o):this.updateFloatingFilterParams(i,"colDef")})}updateCompDetails(e,t,o){this.isAlive()&&(this.setCompDetails(t),this.setupFilterButton(),this.setupUi(),o&&(this.setupSyncWithFilter(e),this.setupFilterChangedListener(e)))}updateFloatingFilterParams(e,t){if(!e)return;let o=e.params;this.comp.getFloatingFilterComp()?.then(s=>{typeof s?.refresh=="function"&&(this.gos.get("enableFilterHandlers")&&(o={...o,model:Te(this.beans.colFilter?.model??{},this.column.getColId()),source:t}),s.refresh(o))})}addResizeAndMoveKeyboardListeners(){}destroy(){super.destroy(),this.destroySyncListener=null,this.destroyFilterChangedListener=null}};function Ax(e,t){const o=e.colModel.getCol(t);if(!o){ce(12,{colKey:t});return}e.menuSvc?.showColumnMenu({column:o,positionBy:"auto"})}function kx(e){e.menuSvc?.hidePopupMenu()}var Lx=class extends x{constructor(){super(...arguments),this.beanName="menuSvc"}postConstruct(){const{enterpriseMenuFactory:e,filterMenuFactory:t}=this.beans;this.activeMenuFactory=e??t}showColumnMenu(e){this.showColumnMenuCommon(this.activeMenuFactory,e,"columnMenu")}showFilterMenu(e){this.showColumnMenuCommon(Qc(this.beans),e,e.containerType,!0)}showHeaderContextMenu(e,t,o){this.activeMenuFactory?.showMenuAfterContextMenuEvent(e,t,o)}hidePopupMenu(){this.beans.contextMenuSvc?.hideActiveMenu(),this.activeMenuFactory?.hideActiveMenu()}hideFilterMenu(){Qc(this.beans)?.hideActiveMenu()}isColumnMenuInHeaderEnabled(e){const{suppressHeaderMenuButton:t}=e.getColDef();return!t&&!!this.activeMenuFactory?.isMenuEnabled(e)&&(Ze(this.gos)||!!this.beans.enterpriseMenuFactory)}isFilterMenuInHeaderEnabled(e){return!e.getColDef().suppressHeaderFilterButton&&!!this.beans.filterManager?.isFilterAllowed(e)}isHeaderContextMenuEnabled(e){return!(e&&lo(e)?e.getColDef():e?.getColGroupDef())?.suppressHeaderContextMenu&&this.gos.get("columnMenu")==="new"}isHeaderMenuButtonAlwaysShowEnabled(){return this.isSuppressMenuHide()}isHeaderMenuButtonEnabled(){const e=!this.isSuppressMenuHide();return!(Mo()&&e)}isHeaderFilterButtonEnabled(e){return this.isFilterMenuInHeaderEnabled(e)&&!Ze(this.gos)&&!this.isFloatingFilterButtonDisplayed(e)}isFilterMenuItemEnabled(e){return!!this.beans.filterManager?.isFilterAllowed(e)&&!Ze(this.gos)&&!this.isFilterMenuInHeaderEnabled(e)&&!this.isFloatingFilterButtonDisplayed(e)}isFloatingFilterButtonEnabled(e){return!e.getColDef().suppressFloatingFilterButton}isFloatingFilterButtonDisplayed(e){return!!e.getColDef().floatingFilter&&this.isFloatingFilterButtonEnabled(e)}isSuppressMenuHide(){const e=this.gos,t=e.get("suppressMenuHide");return Ze(e)?e.exists("suppressMenuHide")?t:!1:t}showColumnMenuCommon(e,t,o,s){const{positionBy:i,onClosedCallback:n}=t,r=t.column;if(i==="button"){const{buttonElement:a}=t;e?.showMenuAfterButtonClick(r,a,o,n,s)}else if(i==="mouse"){const{mouseEvent:a}=t;e?.showMenuAfterMouseEvent(r,a,o,n,s)}else if(r){const a=this.beans,l=a.ctrlsSvc;l.getScrollFeature().ensureColumnVisible(r,"auto"),qt(a,()=>{const c=l.getHeaderRowContainerCtrl(r.getPinned())?.getHeaderCtrlForColumn(r);c&&e?.showMenuAfterButtonClick(r,c.getAnchorElementForMenu(s),o,n,s)})}}};function Yc(e,t,o){e.menuVisible!==t&&(e.menuVisible=t,e.dispatchColEvent("menuVisibleChanged",o))}function Qc(e){const{enterpriseMenuFactory:t,filterMenuFactory:o,gos:s}=e;return t&&Ze(s)?t:o}var Ox={moduleName:"SharedMenu",version:I,beans:[Lx],apiFunctions:{showColumnMenu:Ax,hidePopupMenu:kx}},Gx=".ag-set-filter{--ag-indentation-level:0}.ag-set-filter-item{align-items:center;display:flex;height:100%}:where(.ag-ltr) .ag-set-filter-item{padding-left:calc(var(--ag-widget-container-horizontal-padding) + var(--ag-indentation-level)*var(--ag-set-filter-indent-size))}:where(.ag-rtl) .ag-set-filter-item{padding-right:calc(var(--ag-widget-container-horizontal-padding) + var(--ag-indentation-level)*var(--ag-set-filter-indent-size))}.ag-set-filter-item-checkbox{display:flex;height:100%;width:100%}.ag-set-filter-group-icons{display:block;:where(.ag-set-filter-group-closed-icon),:where(.ag-set-filter-group-indeterminate-icon),:where(.ag-set-filter-group-opened-icon){cursor:pointer}}:where(.ag-ltr) .ag-set-filter-group-icons{margin-right:var(--ag-widget-container-horizontal-padding)}:where(.ag-rtl) .ag-set-filter-group-icons{margin-left:var(--ag-widget-container-horizontal-padding)}.ag-filter-body-wrapper{display:flex;flex-direction:column}:where(.ag-menu:not(.ag-tabs) .ag-filter) .ag-filter-body-wrapper{min-width:180px}.ag-filter-filter{flex:1 1 0px}.ag-filter-condition{display:flex;justify-content:center}.ag-floating-filter-body{display:flex;flex:1 1 auto;height:100%;position:relative}.ag-floating-filter-full-body{align-items:center;display:flex;flex:1 1 auto;height:100%;overflow:hidden;width:100%}.ag-floating-filter-input{align-items:center;display:flex;width:100%;>:where(.ag-date-floating-filter-wrapper),>:where(.ag-floating-filter-input),>:where(.ag-input-field){flex:1 1 auto}:where(.ag-input-field-input[type=date]),:where(.ag-input-field-input[type=datetime-local]){width:1px}}.ag-floating-filter-button{display:flex;flex:none}.ag-date-floating-filter-wrapper{display:flex}.ag-set-floating-filter-input :where(.ag-input-field-input)[disabled]{pointer-events:none}.ag-floating-filter-button-button{-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;height:var(--ag-icon-size);width:var(--ag-icon-size)}.ag-filter-loading{align-items:unset;background-color:var(--ag-chrome-background-color);height:100%;padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding);position:absolute;width:100%;z-index:1;:where(.ag-menu) &{background-color:var(--ag-menu-background-color)}}.ag-filter-separator{border-top:solid var(--ag-border-width) var(--menu-separator-color)}:where(.ag-filter-select) .ag-picker-field-wrapper{width:0}.ag-filter-condition-operator{height:17px}:where(.ag-ltr) .ag-filter-condition-operator-or{margin-left:calc(var(--ag-spacing)*2)}:where(.ag-rtl) .ag-filter-condition-operator-or{margin-right:calc(var(--ag-spacing)*2)}.ag-set-filter-select-all{padding-top:var(--ag-widget-container-vertical-padding)}.ag-filter-no-matches,.ag-set-filter-list{height:calc(var(--ag-list-item-height)*6)}.ag-filter-no-matches{padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding)}.ag-set-filter-tree-list{height:calc(var(--ag-list-item-height)*10)}.ag-set-filter-filter{margin-left:var(--ag-widget-container-horizontal-padding);margin-right:var(--ag-widget-container-horizontal-padding);margin-top:var(--ag-widget-container-vertical-padding)}.ag-filter-to{margin-top:var(--ag-widget-vertical-spacing)}.ag-mini-filter{margin:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding)}:where(.ag-ltr) .ag-set-filter-add-group-indent{margin-left:calc(var(--ag-icon-size) + var(--ag-widget-container-horizontal-padding))}:where(.ag-rtl) .ag-set-filter-add-group-indent{margin-right:calc(var(--ag-icon-size) + var(--ag-widget-container-horizontal-padding))}:where(.ag-filter-menu) .ag-set-filter-list{min-width:200px}.ag-filter-virtual-list-item:focus-visible{box-shadow:inset var(--ag-focus-shadow)}.ag-filter-apply-panel{display:flex;justify-content:flex-end;overflow:hidden;padding:var(--ag-widget-vertical-spacing) var(--ag-widget-container-horizontal-padding) var(--ag-widget-container-vertical-padding)}.ag-filter-apply-panel-button{line-height:1.5}:where(.ag-ltr) .ag-filter-apply-panel-button{margin-left:calc(var(--ag-spacing)*2)}:where(.ag-rtl) .ag-filter-apply-panel-button{margin-right:calc(var(--ag-spacing)*2)}.ag-simple-filter-body-wrapper{display:flex;flex-direction:column;gap:var(--ag-widget-vertical-spacing);min-height:calc(var(--ag-list-item-height) + var(--ag-widget-container-vertical-padding) + var(--ag-widget-vertical-spacing));overflow-y:auto;padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding);padding-bottom:var(--ag-widget-container-vertical-padding);:where(.ag-resizer-wrapper){margin:0}}.ag-multi-filter-menu-item{margin:var(--ag-spacing) 0}.ag-multi-filter-group-title-bar{background-color:transparent;color:var(--ag-header-text-color);font-weight:500;padding:calc(var(--ag-spacing)*1.5) var(--ag-spacing)}.ag-group-filter-field-select-wrapper{display:flex;flex-direction:column;gap:var(--ag-widget-vertical-spacing);padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding)}";function Hx(e){const t=e.filterManager;return!!t?.isColumnFilterPresent()||!!t?.isAggregateFilterPresent()}function Bx(e,t){return e.filterManager?.getColumnFilterInstance(t)??Promise.resolve(void 0)}function Vx(e,t){const o=e.colModel.getColDefCol(t);if(o)return e.colFilter?.destroyFilter(o,"api")}function Nx(e,t){e.frameworkOverrides.wrapIncoming(()=>e.filterManager?.setFilterModel(t))}function Wx(e){return e.filterManager?.getFilterModel()??{}}function zx(e,t,o){const{gos:s,colModel:i,colFilter:n}=e;o&&!s.get("enableFilterHandlers")&&(D(288),o=!1);const r=i.getColDefCol(t);return r?n?.getModelForColumn(r,o)??null:null}function _x(e,t,o){return e.filterManager?.setColumnFilterModel(t,o)??Promise.resolve()}function Ux(e,t){const o=e.colModel.getCol(t);if(!o){ce(12,{colKey:t});return}e.menuSvc?.showFilterMenu({column:o,containerType:"columnFilter",positionBy:"auto"})}function $x(e){e.menuSvc?.hideFilterMenu()}function Kx(e,t){const o=e.colModel.getCol(t);if(!o){ce(12,{colKey:t});return}return e.colFilter?.getHandler(o,!0)}function qx(e,t){const{colModel:o,colFilter:s,gos:i}=e;if(!i.get("enableFilterHandlers")){D(287);return}const{colId:n,action:r}=t;if(n){const a=o.getColById(n);a&&s?.updateModel(a,r)}else s?.updateAllModels(r)}var Zc={january:"January",february:"February",march:"March",april:"April",may:"May",june:"June",july:"July",august:"August",september:"September",october:"October",november:"November",december:"December"},Jc=["january","february","march","april","may","june","july","august","september","october","november","december"];function jx(e,t){return e==null?-1:t==null?1:Number.parseFloat(e)-Number.parseFloat(t)}function Yx(e,t){if(e==null)return-1;if(t==null)return 1;const o=et(e),s=et(t);return o!=null&&s!=null?o===s?0:o>s?1:-1:String(e).localeCompare(String(t))}function Xc(e){return e instanceof Date&&!isNaN(e.getTime())}var ea={number:()=>{},bigint:()=>{},boolean:()=>({maxNumConditions:1,debounceMs:0,filterOptions:["empty",{displayKey:"true",displayName:"True",predicate:(e,t)=>t,numberOfInputs:0},{displayKey:"false",displayName:"False",predicate:(e,t)=>t===!1,numberOfInputs:0}]}),date:()=>({isValidDate:Xc}),dateString:({dataTypeDefinition:e})=>({comparator:(t,o)=>{const s=e.dateParser(o);return o==null||s<t?-1:s>t?1:0},isValidDate:t=>typeof t=="string"&&Xc(e.dateParser(t))}),dateTime:e=>ea.date(e),dateTimeString:e=>ea.dateString(e),object:()=>{},text:()=>{}},ta={number:()=>({comparator:jx}),bigint:()=>({comparator:Yx}),boolean:({t:e})=>({valueFormatter:t=>L(t.value)?e(String(t.value),t.value?"True":"False"):e("blanks","(Blanks)")}),date:({formatValue:e,t})=>({valueFormatter:o=>{const s=e(o);return L(s)?s:t("blanks","(Blanks)")},treeList:!0,treeListFormatter:(o,s)=>{if(o==="NaN")return t("invalidDate","Invalid Date");if(s===1&&o!=null){const i=Jc[Number(o)-1];return t(i,Zc[i])}return o??t("blanks","(Blanks)")},treeListPathGetter:o=>Ri(o,!1)}),dateString:({formatValue:e,dataTypeDefinition:t,t:o})=>({valueFormatter:s=>{const i=e(s);return L(i)?i:o("blanks","(Blanks)")},treeList:!0,treeListPathGetter:s=>Ri(t.dateParser(s??void 0),!1),treeListFormatter:(s,i)=>{if(i===1&&s!=null){const n=Jc[Number(s)-1];return o(n,Zc[n])}return s??o("blanks","(Blanks)")}}),dateTime:e=>{const t=ta.date(e);return t.treeListPathGetter=Ri,t},dateTimeString(e){const t=e.dataTypeDefinition.dateParser,o=ta.dateString(e);return o.treeListPathGetter=s=>Ri(t(s??void 0)),o},object:({formatValue:e,t})=>({valueFormatter:o=>{const s=e(o);return L(s)?s:t("blanks","(Blanks)")}}),text:()=>{}};function Qx(e,t,o,s,i,n,r){let a=t,l=o;const c=e==="agSetColumnFilter";!l&&s.baseDataType==="object"&&!c&&(l=({column:g,node:f})=>i({column:g,node:f,value:n.valueSvc.getValue(g,f,"data")}));const u=(c?ta:ea)[s.baseDataType],h=u({dataTypeDefinition:s,formatValue:i,t:r});return a=typeof t=="object"?{...h,...t}:h,{filterParams:a,filterValueGetter:l}}var Zx={boolean:"agTextColumnFilter",date:"agDateColumnFilter",dateString:"agDateColumnFilter",dateTime:"agDateColumnFilter",dateTimeString:"agDateColumnFilter",bigint:"agBigIntColumnFilter",number:"agNumberColumnFilter",object:"agTextColumnFilter",text:"agTextColumnFilter"},Jx={boolean:"agTextColumnFloatingFilter",date:"agDateColumnFloatingFilter",dateString:"agDateColumnFloatingFilter",dateTime:"agDateColumnFloatingFilter",dateTimeString:"agDateColumnFloatingFilter",bigint:"agBigIntColumnFloatingFilter",number:"agNumberColumnFloatingFilter",object:"agTextColumnFloatingFilter",text:"agTextColumnFloatingFilter"};function Xx(e,t=!1){return(t?Jx:Zx)[e??"text"]}function eP(e,t,o){if(t==null)return null;let s=null;const{compName:i,jsComp:n,fwComp:r}=wu(e,t);return i?s={agSetColumnFilter:"agSetColumnFloatingFilter",agMultiColumnFilter:"agMultiColumnFloatingFilter",agGroupColumnFilter:"agGroupColumnFloatingFilter",agNumberColumnFilter:"agNumberColumnFloatingFilter",agBigIntColumnFilter:"agBigIntColumnFloatingFilter",agDateColumnFilter:"agDateColumnFloatingFilter",agTextColumnFilter:"agTextColumnFloatingFilter"}[i]:n==null&&r==null&&t.filter===!0&&(s=o()),s}var tP={filterHandler:()=>({doesFilterPass:()=>!0})};function ed(e,t,o,s){if(!e.isPrimary())return!0;const n=!o;return!e.isValueActive()||!n?!1:t?!0:s}var oP=class extends x{constructor(){super(...arguments),this.beanName="colFilter",this.allColumnFilters=new Map,this.allColumnListeners=new Map,this.activeAggregateFilters=[],this.activeColumnFilters=[],this.processingFilterChange=!1,this.modelUpdates=[],this.columnModelUpdates=[],this.state=new Map,this.handlerMap={...fg},this.isGlobalButtons=!1,this.activeFilterComps=new Set}postConstruct(){this.addManagedEventListeners({gridColumnsChanged:this.onColumnsChanged.bind(this),dataTypesInferred:this.processFilterModelUpdateQueue.bind(this)}),this.addManagedPropertyListener("pivotMode",this.onPivotModeChanged.bind(this));const e=this.gos,t={...e.get("initialState")?.filter?.filterModel??{}};this.initialModel=t,this.model={...t},e.get("enableFilterHandlers")||delete this.handlerMap.agMultiColumnFilter}refreshModel(){this.onNewRowsLoaded("rowDataUpdated")}setModel(e,t="api",o){const{colModel:s,dataTypeSvc:i,filterManager:n}=this.beans;if(i?.isPendingInference){this.modelUpdates.push({model:e,source:t});return}const r=[],a=this.getModel(!0);if(e){const l=new Set(Object.keys(e));this.allColumnFilters.forEach((c,d)=>{const u=e[d];r.push(this.setModelOnFilterWrapper(c,u)),l.delete(d)}),l.forEach(c=>{const d=s.getColDefCol(c)||s.getCol(c);if(!d){D(62,{colId:c});return}if(!d.isFilterAllowed()){D(63,{colId:c});return}const u=this.getOrCreateFilterWrapper(d,!0);if(!u){D(64,{colId:c});return}r.push(this.setModelOnFilterWrapper(u,e[c],!0))})}else this.model={},this.allColumnFilters.forEach(l=>{r.push(this.setModelOnFilterWrapper(l,null))});ie.all(r).then(()=>{const l=this.getModel(!0),c=[];this.allColumnFilters.forEach((d,u)=>{const h=a?a[u]:null,g=l?l[u]:null;js(h,g)||c.push(d.column)}),c.length>0?n?.onFilterChanged({columns:c,source:t}):o&&this.updateActive("filterChanged")})}getModel(e){const t={},{allColumnFilters:o,initialModel:s,beans:{colModel:i}}=this;if(o.forEach((n,r)=>{const a=this.getModelFromFilterWrapper(n);L(a)&&(t[r]=a)}),!e)for(const n of Object.keys(s)){const r=s[n];L(r)&&!o.has(n)&&i.getCol(n)?.isFilterAllowed()&&(t[n]=r)}return t}setState(e,t,o="api"){if(this.state.clear(),t)for(const s of Object.keys(t)){const i=t[s];this.state.set(s,{model:Te(this.model,s),state:i})}this.setModel(e,o,!0)}getState(){const e=this.state;if(!e.size)return;const t={};let o=!1;return e.forEach((s,i)=>{const n=s.state;n!=null&&(o=!0,t[i]=n)}),o?t:void 0}getModelFromFilterWrapper(e){const o=e.column.getColId();if(e.isHandler)return Te(this.model,o);const s=e.filter;return s?typeof s.getModel!="function"?(D(66),null):s.getModel():Te(this.initialModel,o)}isFilterPresent(){return this.activeColumnFilters.length>0}isAggFilterPresent(){return!!this.activeAggregateFilters.length}disableFilters(){this.initialModel={};const{allColumnFilters:e}=this;return e.size?(e.forEach(t=>this.disposeFilterWrapper(t,"advancedFilterEnabled")),!0):!1}updateActiveFilters(){const e=l=>l?l.isFilterActive?l.isFilterActive():(D(67),!1):!1,{colModel:t,gos:o}=this.beans,s=!!Yi(o),i=[],n=[],r=(l,c,d)=>{c&&(ed(l,t.isPivotMode(),t.isPivotActive(),s)?i.push(d):n.push(d))},a=[];return this.allColumnFilters.forEach(l=>{const c=l.column,d=c.getColId();if(l.isHandler)a.push(ie.resolve().then(()=>{r(c,this.isHandlerActive(c),{colId:d,isHandler:!0,handler:l.handler,handlerParams:l.handlerParams})}));else{const u=Jt(l);u&&a.push(u.then(h=>{r(c,e(h),{colId:d,isHandler:!1,comp:h})}))}}),ie.all(a).then(()=>{this.activeAggregateFilters=i,this.activeColumnFilters=n})}updateFilterFlagInColumns(e,t){const o=[];return this.allColumnFilters.forEach(s=>{const i=s.column;if(s.isHandler)o.push(ie.resolve().then(()=>{this.setColFilterActive(i,this.isHandlerActive(i),e,t)}));else{const n=Jt(s);n&&o.push(n.then(r=>{this.setColFilterActive(i,r.isFilterActive(),e,t)}))}}),this.beans.groupFilter?.updateFilterFlags(e,t),ie.all(o)}doFiltersPass(e,t,o){const{data:s,aggData:i}=e,n=o?this.activeAggregateFilters:this.activeColumnFilters,r=o?i:s,a=this.model;for(let l=0;l<n.length;l++){const c=n[l],{colId:d,isHandler:u}=c;if(d!==t)if(u){const{handler:h,handlerParams:g}=c;if(!h.doesFilterPass({node:e,data:r,model:Te(a,d),handlerParams:g}))return!1}else{const h=c.comp;if(typeof h.doesFilterPass!="function"){ce(91);continue}if(!h.doesFilterPass({node:e,data:r}))return!1}}return!0}getHandlerParams(e){const t=this.allColumnFilters.get(e.getColId());return t?.isHandler?t.handlerParams:void 0}callOnFilterChangedOutsideRenderCycle(e){const{rowRenderer:t,filterManager:o}=this.beans,s=()=>{this.isAlive()&&o?.onFilterChanged(e)};t.isRefreshInProgress()?setTimeout(s,0):s()}updateBeforeFilterChanged(e={}){const{column:t,additionalEventAttributes:o}=e,s=t?.getColId();return this.updateActiveFilters().then(()=>this.updateFilterFlagInColumns("filterChanged",o).then(()=>{this.allColumnFilters.forEach(i=>{const{column:n,isHandler:r}=i;s!==n.getColId()&&(r&&i.handler.onAnyFilterChanged?.(),Jt(i,r)?.then(a=>{typeof a?.onAnyFilterChanged=="function"&&a.onAnyFilterChanged()}))}),this.processingFilterChange=!0}))}updateAfterFilterChanged(){this.processingFilterChange=!1}isSuppressFlashingCellsBecauseFiltering(){return!(this.gos.get("allowShowChangeAfterFilter")??!1)&&this.processingFilterChange}onNewRowsLoaded(e){const t=[];this.allColumnFilters.forEach(o=>{const s=o.isHandler;s&&o.handler.onNewRowsLoaded?.();const i=Jt(o,s);i&&t.push(i.then(n=>{n.onNewRowsLoaded?.()}))}),ie.all(t).then(()=>this.updateActive(e,{afterDataChange:!0}))}updateActive(e,t){this.updateFilterFlagInColumns(e,t).then(()=>this.updateActiveFilters())}createGetValue(e,t){const{filterValueSvc:o,colModel:s}=this.beans;return(i,n)=>{const r=n?s.getCol(n):e;return r?o.getValue(r,i,t):void 0}}isFilterActive(e){const t=this.cachedFilter(e);if(t?.isHandler)return this.isHandlerActive(e);const o=t?.filter;return o?o.isFilterActive():Te(this.initialModel,e.getColId())!=null}isHandlerActive(e){const t=L(Te(this.model,e.getColId()));if(t)return t;const o=this.beans.groupFilter;return o?.isGroupFilter(e)?o.isFilterActive(e):!1}getOrCreateFilterUi(e){const t=this.getOrCreateFilterWrapper(e,!0);return t?Jt(t):null}getFilterUiForDisplay(e){const t=this.getOrCreateFilterWrapper(e,!0);if(!t)return null;const o=Jt(t);return o?o.then(s=>({comp:s,params:t.filterUi.filterParams,isHandler:t.isHandler})):null}getHandler(e,t){const o=this.getOrCreateFilterWrapper(e,t);return o?.isHandler?o.handler:void 0}getOrCreateFilterWrapper(e,t){if(!e.isFilterAllowed())return;let o=this.cachedFilter(e);return!o&&t&&(o=this.createFilterWrapper(e),this.setColumnFilterWrapper(e,o)),o}cachedFilter(e){return this.allColumnFilters.get(e.getColId())}getDefaultFilter(e,t=!1){return this.getDefaultFilterFromDataType(()=>this.beans.dataTypeSvc?.getBaseDataType(e),t)}getDefaultFilterFromDataType(e,t=!1){return Wf(this.gos)?t?"agSetColumnFloatingFilter":"agSetColumnFilter":Xx(e(),t)}getDefaultFloatingFilter(e){return this.getDefaultFilter(e,!0)}createFilterComp(e,t,o,s,i,n){const r=()=>{const c=this.createFilterCompParams(e,i,n),d=s(c,i);return jm(this.beans.userCompFactory,t,d,o)},a=r();return a?{compDetails:a,createFilterUi:c=>(c?r():a).newAgStackInstance()}:null}createFilterInstance(e,t,o,s){const i=this.beans.selectableFilter;i?.isSelectable(t)&&(t=i.getFilterDef(e,t));const{handler:n,handlerParams:r,handlerGenerator:a}=this.createHandler(e,t,o)??{},l=this.createFilterComp(e,t,o,s,!!n,"init");if(!l)return{compDetails:null,createFilterUi:null,handler:n,handlerGenerator:a,handlerParams:r};const{compDetails:c,createFilterUi:d}=l;return this.isGlobalButtons&&(c.params?.buttons?.length||D(281,{colId:e.getColId()})),{compDetails:c,handler:n,handlerGenerator:a,handlerParams:r,createFilterUi:d}}createBaseFilterParams(e,t){const{filterManager:o,rowModel:s}=this.beans;return K(this.gos,{column:e,colDef:e.getColDef(),getValue:this.createGetValue(e),doesRowPassOtherFilter:t?()=>!0:i=>o?.doesRowPassOtherFilters(e.getColId(),i)??!0,rowModel:s})}createFilterCompParams(e,t,o,s){const i=this.filterChangedCallbackFactory(e),n=this.createBaseFilterParams(e,s);if(n.filterChangedCallback=i,n.filterModifiedCallback=s?()=>{}:r=>this.filterModified(e,r),t){const r=n,a=e.getColId(),l=Te(this.model,a);r.model=l,r.state=this.state.get(a)??{model:l},r.onModelChange=(c,d)=>{this.updateStoredModel(a,c),this.refreshHandlerAndUi(e,c,"ui",!1,d).then(()=>{i({...d,source:"columnFilter"})})},r.onStateChange=c=>{this.updateState(e,c),this.updateOrRefreshFilterUi(e)},r.onAction=(c,d,u)=>{this.updateModel(e,c,d),this.dispatchLocalEvent({type:"filterAction",column:e,action:c,event:u})},r.getHandler=()=>this.getHandler(e,!0),r.onUiChange=c=>this.filterUiChanged(e,c),r.source=o}return n}createFilterUiForHandler(e,t){return t?{created:!1,create:t,filterParams:e.params,compDetails:e}:null}createFilterUiLegacy(e,t,o){const s=t(),i={created:!0,create:t,filterParams:e.params,compDetails:e,promise:s};return s.then(o),i}createFilterWrapper(e){const{compDetails:t,handler:o,handlerGenerator:s,handlerParams:i,createFilterUi:n}=this.createFilterInstance(e,e.getColDef(),this.getDefaultFilter(e),a=>a),r=e.getColId();if(o)return delete this.initialModel[r],o.init?.({...i,source:"init",model:Te(this.model,r)}),{column:e,isHandler:!0,handler:o,handlerGenerator:s,handlerParams:i,filterUi:this.createFilterUiForHandler(t,n)};if(n){const a={column:e,filterUi:null,isHandler:!1};return a.filterUi=this.createFilterUiLegacy(t,n,l=>{a.filter=l??void 0}),a}return{column:e,filterUi:null,isHandler:!1}}createHandlerFunc(e,t,o){const{gos:s,frameworkOverrides:i,registry:n}=this.beans;let r;const a=g=>{const f=g.filter;if(mu(f)){const m=f.handler;return m||(r=f.doesFilterPass,r?()=>({doesFilterPass:r}):void 0)}return typeof f=="string"?f:void 0},l=s.get("enableFilterHandlers"),c=l?a(t):void 0,d=g=>()=>this.createBean(n.createDynamicBean(g,!0));let u,h;if(typeof c=="string"){const g=s.get("filterHandlers")?.[c];g!=null?u=g:Mx.has(c)&&(u=d(c),h=c)}else u=c;if(!u){let g;const{compName:f,jsComp:m,fwComp:C}=wu(i,t);f?g=f:m==null&&C==null&&t.filter===!0&&(g=o),h=this.handlerMap[g],h&&(u=d(h))}return u?{filterHandler:u,handlerNameOrCallback:r??h}:l?(Se(s)&&D(277,{colId:e.getColId()}),tP):void 0}createHandler(e,t,o){const s=this.createHandlerFunc(e,t,o);if(!s)return;const i=Wn(this.beans.userCompFactory,t,this.createFilterCompParams(e,!0,"init")),{handlerNameOrCallback:n,filterHandler:r}=s,{handler:a,handlerParams:l}=this.createHandlerFromFunc(e,r,i);return{handler:a,handlerParams:l,handlerGenerator:n??r}}createHandlerFromFunc(e,t,o){const s=e.getColDef(),i=t(K(this.gos,{column:e,colDef:s})),n=this.createHandlerParams(e,o);return{handler:i,handlerParams:n}}createHandlerParams(e,t){const o=e.getColDef(),s=e.getColId(),i=this.filterChangedCallbackFactory(e);return K(this.gos,{colDef:o,column:e,getValue:this.createGetValue(e),doesRowPassOtherFilter:n=>this.beans.filterManager?.doesRowPassOtherFilters(s,n)??!0,onModelChange:(n,r)=>{this.updateStoredModel(s,n),this.refreshHandlerAndUi(e,n,"handler",!1,r).then(()=>{i({...r,source:"columnFilter"})})},onModelAsStringChange:()=>{e.dispatchColEvent("filterChanged","filterChanged"),this.dispatchLocalEvent({type:"filterModelAsStringChanged",column:e})},filterParams:t})}onColumnsChanged(){const e=[],{colModel:t,filterManager:o,groupFilter:s}=this.beans;this.allColumnFilters.forEach((n,r)=>{let a;n.column.isPrimary()?a=t.getColDefCol(r):a=t.getCol(r),!(a&&a===n.column)&&(e.push(n.column),this.disposeFilterWrapper(n,"columnChanged"),this.disposeColumnListener(r))});const i=s&&e.every(n=>s.isGroupFilter(n));e.length>0&&!i&&o?.onFilterChanged({columns:e,source:"api"})}isFilterAllowed(e){if(!e.isFilterAllowed())return!1;const o=this.beans.groupFilter;return o?.isGroupFilter(e)?o.isFilterAllowed(e):!0}getFloatingFilterCompDetails(e,t){const{userCompFactory:o,frameworkOverrides:s,selectableFilter:i,gos:n}=this.beans,r=g=>{this.getOrCreateFilterUi(e)?.then(m=>{g(No(m))})},a=e.getColDef(),l=i?.isSelectable(a)?i.getFilterDef(e,a):a,c=eP(s,l,()=>this.getDefaultFloatingFilter(e))??"agReadOnlyFloatingFilter",d=n.get("enableFilterHandlers"),u=Wn(o,l,this.createFilterCompParams(e,d,"init",!0)),h=K(n,{column:e,filterParams:u,currentParentModel:()=>this.getCurrentFloatingFilterParentModel(e),parentFilterInstance:r,showParentFilter:t});if(d){const g=h,f=e.getColId(),m=this.filterChangedCallbackFactory(e);g.onUiChange=C=>this.floatingFilterUiChanged(e,C),g.model=Te(this.model,f),g.onModelChange=(C,v)=>{this.updateStoredModel(f,C),this.refreshHandlerAndUi(e,C,"floating",!0,v).then(()=>{m({...v,source:"columnFilter"})})},g.getHandler=()=>this.getHandler(e,!0),g.source="init"}return Zm(o,a,h,c)}getCurrentFloatingFilterParentModel(e){return this.getModelFromFilterWrapper(this.cachedFilter(e)??{column:e})}destroyFilterUi(e,t,o,s){const i="paramsUpdated";if(e.isHandler){const n=t.getColId();delete this.initialModel[n],this.state.delete(n);const r=e.filterUi,a=this.createFilterUiForHandler(o,s);e.filterUi=a;const l=this.eventSvc;r?.created?r.promise.then(c=>{this.destroyBean(c),l.dispatchEvent({type:"filterDestroyed",source:i,column:t})}):l.dispatchEvent({type:"filterHandlerDestroyed",source:i,column:t})}else this.destroyFilter(t,i)}destroyFilter(e,t="api"){const o=e.getColId(),s=this.allColumnFilters.get(o);this.disposeColumnListener(o),delete this.initialModel[o],s&&this.disposeFilterWrapper(s,t).then(i=>{i&&this.isAlive()&&this.beans.filterManager?.onFilterChanged({columns:[e],source:"api"})})}disposeColumnListener(e){const t=this.allColumnListeners.get(e);t&&(this.allColumnListeners.delete(e),t())}disposeFilterWrapper(e,t){let o=!1;const{column:s,isHandler:i,filterUi:n}=e,r=s.getColId();i&&(o=this.isHandlerActive(s),this.destroyBean(e.handler),delete this.model[r],this.state.delete(r));const a=()=>{this.setColFilterActive(s,!1,"filterDestroyed"),this.allColumnFilters.delete(r),this.eventSvc.dispatchEvent({type:"filterDestroyed",source:t,column:s})};if(n){if(n.created)return n.promise.then(l=>(o=i?o:!!l?.isFilterActive(),this.destroyBean(l),a(),o));a()}return ie.resolve(o)}filterChangedCallbackFactory(e){return t=>{this.callOnFilterChangedOutsideRenderCycle({additionalEventAttributes:t,columns:[e],column:e,source:t?.source??"columnFilter"})}}filterParamsChanged(e,t="api"){const o=this.allColumnFilters.get(e);if(!o)return;const s=this.beans,i=o.column,n=i.getColDef(),r=i.isFilterAllowed(),a=this.getDefaultFilter(i),l=s.selectableFilter,c=l?.isSelectable(n)?l.getFilterDef(i,n):n,d=r?this.createHandlerFunc(i,c,this.getDefaultFilter(i)):void 0,u=!!d,h=o.isHandler;if(h!=u){this.destroyFilter(i,"paramsUpdated");return}const{compDetails:g,createFilterUi:f}=(r?this.createFilterComp(i,c,a,C=>C,u,"colDef"):null)??{compDetails:null,createFilterUi:null},m=g?.params??Wn(s.userCompFactory,c,this.createFilterCompParams(i,u,"colDef"));if(h){const C=d?.handlerNameOrCallback??d?.filterHandler,v=Te(this.model,e);if(o.handlerGenerator!=C){const w=o.handler,{handler:b,handlerParams:y}=this.createHandlerFromFunc(i,d.filterHandler,m);o.handler=b,o.handlerParams=y,o.handlerGenerator=C,delete this.model[e],b.init?.({...y,source:"init",model:null}),this.destroyBean(w),v!=null&&this.beans.filterManager?.onFilterChanged({columns:[i],source:t})}else{const w=this.createHandlerParams(i,g?.params);o.handlerParams=w,o.handler.refresh?.({...w,source:"colDef",model:v})}}if(this.areFilterCompsDifferent(o.filterUi?.compDetails??null,g)||!o.filterUi||!g){this.destroyFilterUi(o,i,g,f);return}o.filterUi.filterParams=m,Jt(o,h)?.then(C=>{(C?.refresh?C.refresh(m):!0)===!1?this.destroyFilterUi(o,i,g,f):this.dispatchLocalEvent({type:"filterParamsChanged",column:i,params:m})})}refreshHandlerAndUi(e,t,o,s,i){const n=this.cachedFilter(e);if(!n)return s&&this.getOrCreateFilterWrapper(e,!0),ie.resolve();if(!n.isHandler)return ie.resolve();const{filterUi:r,handler:a,handlerParams:l}=n;return Tx(()=>{if(r){const{created:c,filterParams:d}=r;if(c)return r.promise.then(u=>u?{filter:u,filterParams:d}:void 0);r.refreshed=!0}return ie.resolve(void 0)},a,l,t,this.state.get(e.getColId())??{model:t},o,i)}setColumnFilterWrapper(e,t){const o=e.getColId();this.allColumnFilters.set(o,t),this.allColumnListeners.set(o,this.addManagedListeners(e,{colDefChanged:()=>this.filterParamsChanged(o)})[0])}areFilterCompsDifferent(e,t){if(!t||!e)return!0;const{componentClass:o}=e,{componentClass:s}=t;return!(o===s||o?.render&&s?.render&&o.render===s.render)}hasFloatingFilters(){return this.beans.colModel.getCols().some(t=>t.getColDef().floatingFilter)}getFilterInstance(e){const t=this.beans.colModel.getColDefCol(e);if(!t)return Promise.resolve(void 0);const o=this.getOrCreateFilterUi(t);return o?new Promise(s=>{o.then(i=>{s(No(i))})}):Promise.resolve(null)}processFilterModelUpdateQueue(){this.modelUpdates.forEach(({model:e,source:t})=>this.setModel(e,t)),this.modelUpdates=[],this.columnModelUpdates.forEach(({key:e,model:t,resolve:o})=>{this.setModelForColumn(e,t).then(()=>o())}),this.columnModelUpdates=[]}getModelForColumn(e,t){if(t){const{state:s,model:i}=this,n=e.getColId(),r=s.get(n);return r?r.model??null:Te(i,n)}const o=this.cachedFilter(e);return o?this.getModelFromFilterWrapper(o):null}setModelForColumn(e,t){if(this.beans.dataTypeSvc?.isPendingInference){let o=()=>{};const s=new Promise(i=>{o=i});return this.columnModelUpdates.push({key:e,model:t,resolve:o}),s}return new Promise(o=>{this.setModelForColumnLegacy(e,t).then(s=>o(s))})}getStateForColumn(e){return this.state.get(e)??{model:Te(this.model,e)}}setModelForColumnLegacy(e,t){const o=this.beans.colModel.getColDefCol(e),s=o?this.getOrCreateFilterWrapper(o,!0):null;return s?this.setModelOnFilterWrapper(s,t):ie.resolve()}setColDefPropsForDataType(e,t,o){const s=e.filter,i=s===!0?this.getDefaultFilterFromDataType(()=>t.baseDataType):s;if(typeof i!="string")return;let n,r;const a=this.beans,{filterParams:l,filterValueGetter:c}=e;i==="agMultiColumnFilter"?{filterParams:n,filterValueGetter:r}=a.multiFilter?.getParamsForDataType(l,c,t,o)??{}:{filterParams:n,filterValueGetter:r}=Qx(i,l,c,t,o,a,this.getLocaleTextFunc()),e.filterParams=n,r&&(e.filterValueGetter=r)}setColFilterActive(e,t,o,s){e.filterActive!==t&&(e.filterActive=t,e.dispatchColEvent("filterActiveChanged",o)),e.dispatchColEvent("filterChanged",o,s)}setModelOnFilterWrapper(e,t,o){return new ie(s=>{if(e.isHandler){const n=e.column,r=n.getColId(),a=this.model[r];if(this.updateStoredModel(r,t),o&&t===a){s();return}this.refreshHandlerAndUi(n,t,"api").then(()=>s());return}const i=Jt(e);if(i){i.then(n=>{if(typeof n?.setModel!="function"){D(65),s();return}(n.setModel(t)||ie.resolve()).then(()=>s())});return}s()})}updateStoredModel(e,t){L(t)?this.model[e]=t:delete this.model[e];const o=this.state.get(e),s={model:t,state:o?.state};this.state.set(e,s)}filterModified(e,t){this.getOrCreateFilterUi(e)?.then(o=>{this.eventSvc.dispatchEvent({type:"filterModified",column:e,filterInstance:o,...t})})}filterUiChanged(e,t){this.gos.get("enableFilterHandlers")&&this.eventSvc.dispatchEvent({type:"filterUiChanged",column:e,...t})}floatingFilterUiChanged(e,t){this.gos.get("enableFilterHandlers")&&this.eventSvc.dispatchEvent({type:"floatingFilterUiChanged",column:e,...t})}updateModel(e,t,o){const s=e.getColId(),i=this.cachedFilter(e),n=()=>i?.filterUi;jc({action:t,filterParams:i?.filterUi?.filterParams,getFilterUi:n,getModel:()=>Te(this.model,s),getState:()=>this.state.get(s),updateState:r=>this.updateState(e,r),updateModel:r=>n()?.filterParams?.onModelChange(r,{...o,fromAction:t}),processModelToApply:i?.isHandler?i.handler.processModelToApply?.bind(i.handler):void 0})}updateAllModels(e,t){const o=[];this.allColumnFilters.forEach((s,i)=>{const n=this.beans.colModel.getColDefCol(i);n&&jc({action:e,filterParams:s.filterUi?.filterParams,getFilterUi:()=>s.filterUi,getModel:()=>Te(this.model,i),getState:()=>this.state.get(i),updateState:r=>this.updateState(n,r),updateModel:r=>{this.updateStoredModel(i,r),this.dispatchLocalEvent({type:"filterAction",column:n,action:e}),o.push(this.refreshHandlerAndUi(n,r,"ui"))},processModelToApply:s?.isHandler?s.handler.processModelToApply?.bind(s.handler):void 0})}),o.length&&ie.all(o).then(()=>{this.callOnFilterChangedOutsideRenderCycle({source:"columnFilter",additionalEventAttributes:t,columns:[]})})}updateOrRefreshFilterUi(e){const t=e.getColId();Cg(()=>this.cachedFilter(e)?.filterUi,()=>Te(this.model,t),()=>this.state.get(t))}updateState(e,t){this.state.set(e.getColId(),t),this.dispatchLocalEvent({type:"filterStateChanged",column:e,state:t})}canApplyAll(){const{state:e,model:t,activeFilterComps:o}=this;for(const i of o)if(i.source==="COLUMN_MENU")return!1;let s=!1;for(const i of e.keys()){const n=e.get(i);if(n.valid===!1)return!1;(n.model??null)!==Te(t,i)&&(s=!0)}return s}hasUnappliedModel(e){const{model:t,state:o}=this;return(o.get(e)?.model??null)!==Te(t,e)}setGlobalButtons(e){this.isGlobalButtons=e,this.dispatchLocalEvent({type:"filterGlobalButtons",isGlobal:e})}shouldKeepStateOnDetach(e,t){if(t==="newFiltersToolPanel")return!0;const o=this.beans.filterPanelSvc;return o?.isActive?!!o.getState(e.getColId()):!1}onPivotModeChanged(e){const{colModel:t,pivotColsSvc:o}=this.beans,s=!!Yi(this.gos),i=e.currentValue,n=i?this.activeColumnFilters:this.activeAggregateFilters,r=i?this.activeAggregateFilters:this.activeColumnFilters,a=[];for(const l of n){const c=t.getColById(l.colId),d=i&&!!o?.columns.length;c&&i===ed(c,i,d,s)&&(r.push(l),a.push(l))}yp(n,a)}destroy(){super.destroy(),this.allColumnFilters.forEach(e=>this.disposeFilterWrapper(e,"gridDestroyed")),this.allColumnListeners.clear(),this.state.clear(),this.activeFilterComps.clear()}};function sP(e){return!!e.filterManager?.isAnyFilterPresent()}function iP(e,t="api"){e.filterManager?.onFilterChanged({source:t})}var nP=class extends x{constructor(){super(...arguments),this.beanName="filterManager",this.advFilterModelUpdateQueue=[]}wireBeans(e){this.quickFilter=e.quickFilter,this.advancedFilter=e.advancedFilter,this.colFilter=e.colFilter}postConstruct(){const e=this.refreshFiltersForAggregations.bind(this),t=this.updateAdvFilterColumns.bind(this);this.addManagedEventListeners({columnValueChanged:e,columnPivotChanged:e,columnPivotModeChanged:e,newColumnsLoaded:t,columnVisible:t,advancedFilterEnabledChanged:({enabled:s})=>this.onAdvFilterEnabledChanged(s),dataTypesInferred:this.processFilterModelUpdateQueue.bind(this)}),this.externalFilterPresent=this.isExternalFilterPresentCallback(),this.addManagedPropertyListeners(["isExternalFilterPresent","doesExternalFilterPass"],()=>{this.onFilterChanged({source:"api"})}),this.updateAggFiltering(),this.addManagedPropertyListener("groupAggFiltering",()=>{this.updateAggFiltering(),this.onFilterChanged()}),this.quickFilter&&this.addManagedListeners(this.quickFilter,{quickFilterChanged:()=>this.onFilterChanged({source:"quickFilter"})});const{gos:o}=this;this.alwaysPassFilter=o.get("alwaysPassFilter"),this.addManagedPropertyListener("alwaysPassFilter",()=>{this.alwaysPassFilter=o.get("alwaysPassFilter"),this.onFilterChanged({source:"api"})})}isExternalFilterPresentCallback(){const e=this.gos.getCallback("isExternalFilterPresent");return typeof e=="function"&&e({})}doesExternalFilterPass(e){const t=this.gos.get("doesExternalFilterPass");return typeof t=="function"&&t(e)}setFilterState(e,t,o="api"){this.isAdvFilterEnabled()||this.colFilter?.setState(e,t,o)}setFilterModel(e,t="api",o){if(this.isAdvFilterEnabled()){o||this.warnAdvFilters();return}this.colFilter?.setModel(e,t)}getFilterModel(){return this.colFilter?.getModel()??{}}getFilterState(){return this.colFilter?.getState()}isColumnFilterPresent(){return!!this.colFilter?.isFilterPresent()}isAggregateFilterPresent(){return!!this.colFilter?.isAggFilterPresent()}isChildFilterPresent(){return this.isColumnFilterPresent()||this.isQuickFilterPresent()||this.externalFilterPresent||this.isAdvFilterPresent()}isAnyFilterPresent(){return this.isChildFilterPresent()||this.isAggregateFilterPresent()}isAdvFilterPresent(){return this.isAdvFilterEnabled()&&this.advancedFilter.isFilterPresent()}onAdvFilterEnabledChanged(e){e?this.colFilter?.disableFilters()&&this.onFilterChanged({source:"advancedFilter"}):this.advancedFilter?.isFilterPresent()&&(this.advancedFilter.setModel(null),this.onFilterChanged({source:"advancedFilter"}))}isAdvFilterEnabled(){return!!this.advancedFilter?.isEnabled()}isAdvFilterHeaderActive(){return this.isAdvFilterEnabled()&&this.advancedFilter.isHeaderActive()}refreshFiltersForAggregations(){Yi(this.gos)&&this.isAnyFilterPresent()&&this.onFilterChanged()}onFilterChanged(e={}){const{source:t,additionalEventAttributes:o,columns:s=[]}=e;this.externalFilterPresent=this.isExternalFilterPresentCallback(),(this.colFilter?this.colFilter.updateBeforeFilterChanged(e):ie.resolve()).then(()=>{const i={source:t,type:"filterChanged",columns:s};o&&_e(i,o),this.eventSvc.dispatchEvent(i),this.colFilter?.updateAfterFilterChanged()})}isSuppressFlashingCellsBecauseFiltering(){return!!this.colFilter?.isSuppressFlashingCellsBecauseFiltering()}isQuickFilterPresent(){return!!this.quickFilter?.isFilterPresent()}updateAggFiltering(){this.aggFiltering=!!Yi(this.gos)}isAggregateQuickFilterPresent(){return this.isQuickFilterPresent()&&this.shouldApplyQuickFilterAfterAgg()}isNonAggregateQuickFilterPresent(){return this.isQuickFilterPresent()&&!this.shouldApplyQuickFilterAfterAgg()}shouldApplyQuickFilterAfterAgg(){return(this.aggFiltering||this.beans.colModel.isPivotMode())&&!this.gos.get("applyQuickFilterBeforePivotOrAgg")}doesRowPassOtherFilters(e,t){return this.doesRowPassFilter({rowNode:t,colIdToSkip:e})}doesRowPassAggregateFilters(e){const{rowNode:t}=e;return this.alwaysPassFilter?.(t)?!0:!(this.isAggregateQuickFilterPresent()&&!this.quickFilter.doesRowPass(t)||this.isAggregateFilterPresent()&&!this.colFilter.doFiltersPass(t,e.colIdToSkip,!0))}doesRowPassFilter(e){const{rowNode:t}=e;return this.alwaysPassFilter?.(t)?!0:!(this.isNonAggregateQuickFilterPresent()&&!this.quickFilter.doesRowPass(t)||this.externalFilterPresent&&!this.doesExternalFilterPass(t)||this.isColumnFilterPresent()&&!this.colFilter.doFiltersPass(t,e.colIdToSkip)||this.isAdvFilterPresent()&&!this.advancedFilter.doesFilterPass(t))}isFilterAllowed(e){return this.isAdvFilterEnabled()?!1:!!this.colFilter?.isFilterAllowed(e)}getAdvFilterModel(){return this.isAdvFilterEnabled()?this.advancedFilter.getModel():null}setAdvFilterModel(e,t="api"){if(this.isAdvFilterEnabled()){if(this.beans.dataTypeSvc?.isPendingInference){this.advFilterModelUpdateQueue.push(e);return}this.advancedFilter.setModel(e??null),this.onFilterChanged({source:t})}}toggleAdvFilterBuilder(e,t){this.isAdvFilterEnabled()&&this.advancedFilter.getCtrl().toggleFilterBuilder({source:t,force:e})}updateAdvFilterColumns(){this.isAdvFilterEnabled()&&this.advancedFilter.updateValidity()&&this.onFilterChanged({source:"advancedFilter"})}hasFloatingFilters(){return this.isAdvFilterEnabled()?!1:!!this.colFilter?.hasFloatingFilters()}getColumnFilterInstance(e){return this.isAdvFilterEnabled()?(this.warnAdvFilters(),Promise.resolve(void 0)):this.colFilter?.getFilterInstance(e)??Promise.resolve(void 0)}warnAdvFilters(){D(68)}setupAdvFilterHeaderComp(e){this.advancedFilter?.getCtrl().setupHeaderComp(e)}getHeaderRowCount(){return this.isAdvFilterHeaderActive()?1:0}getHeaderHeight(){return this.isAdvFilterHeaderActive()?this.advancedFilter.getCtrl().getHeaderHeight():0}processFilterModelUpdateQueue(){for(const e of this.advFilterModelUpdateQueue)this.setAdvFilterModel(e);this.advFilterModelUpdateQueue=[]}setColumnFilterModel(e,t){return this.isAdvFilterEnabled()?(this.warnAdvFilters(),Promise.resolve()):this.colFilter?.setModelForColumn(e,t)??Promise.resolve()}};function rP(e){return{tag:"div",cls:e}}var aP=class extends ye{constructor(e){const{className:t="ag-filter-apply-panel"}=e??{};super(rP(t)),this.listeners=[],this.validationMessage=null,this.className=t}updateButtons(e,t){const o=this.buttons;if(this.buttons=e,o===e)return;const s=this.getGui();Xe(s);let i;this.destroyListeners();const n=document.createDocumentFragment(),r=this.className,a=({type:c,label:d})=>{const u=v=>{this.dispatchLocalEvent({type:c,event:v})};["apply","clear","reset","cancel"].includes(c)||D(75);const h=c==="apply",f=it({tag:"button",attrs:{type:h&&t?"submit":"button"},ref:`${c}FilterButton`,cls:`ag-button ag-standard-button ${r}-button${h?" "+r+"-apply-button":""}`,children:d});this.activateTabIndex([f]),h&&(i=f);const m=v=>{v.key===R.ENTER&&(v.preventDefault(),u(v))},C=this.listeners;f.addEventListener("click",u),C.push(()=>f.removeEventListener("click",u)),f.addEventListener("keydown",m),C.push(()=>f.removeEventListener("keydown",m)),n.append(f)};for(const c of e)a(c);this.eApply=i;const l=this.validationTooltipFeature;i&&!l?this.validationTooltipFeature=this.createOptionalManagedBean(this.beans.registry.createDynamicBean("tooltipFeature",!1,{getGui:()=>this.eApply,getLocation:()=>"advancedFilter",getTooltipShowDelayOverride:()=>1e3})):!i&&l&&(this.validationTooltipFeature=this.destroyBean(l)),s.append(n)}getApplyButton(){return this.eApply}updateValidity(e,t=null){const o=this.eApply;o&&(Qs(o,!e),this.validationMessage=t,this.validationTooltipFeature?.setTooltipAndRefresh(this.validationMessage))}destroyListeners(){for(const e of this.listeners)e();this.listeners=[]}destroy(){this.destroyListeners(),super.destroy()}},lP=class extends ye{constructor(e,t,o,s,i,n){super(),this.column=e,this.wrapper=t,this.eventParent=o,this.updateModel=s,this.isGlobalButtons=i,this.enableGlobalButtonCheck=n,this.hidePopup=null,this.applyActive=!1}postConstruct(){const{comp:e,params:t}=this.wrapper,o=t,s=o.useForm,i=s?"form":"div";this.setTemplate({tag:i,cls:"ag-filter-wrapper"}),s&&this.addManagedElementListeners(this.getGui(),{submit:n=>{n?.preventDefault()},keydown:this.handleKeyDown.bind(this)}),this.appendChild(e.getGui()),this.params=o,this.resetButtonsPanel(o),this.addManagedListeners(this.eventParent,{filterParamsChanged:({column:n,params:r})=>{n===this.column&&this.resetButtonsPanel(r,this.params)},filterStateChanged:({column:n,state:r})=>{n===this.column&&this.eButtons?.updateValidity(r.valid!==!1)},filterAction:({column:n,action:r,event:a})=>{n===this.column&&this.afterAction(r,a)},...this.enableGlobalButtonCheck?{filterGlobalButtons:({isGlobal:n})=>{if(n!==this.isGlobalButtons){this.isGlobalButtons=n;const r=this.params;this.resetButtonsPanel(r,r,!0)}}}:void 0})}afterGuiAttached(e){e&&(this.hidePopup=e.hidePopup)}resetButtonsPanel(e,t,o){const{buttons:s,readOnly:i}=t??{},{buttons:n,readOnly:r,useForm:a}=e;if(!o&&i===r&&js(s,n))return;const l=n&&n.length>0&&!e.readOnly&&!this.isGlobalButtons;let c=this.eButtons;if(l){const d=n.map(u=>{const h=`${u}Filter`;return{type:u,label:ft(this,h)}});if(this.applyActive=Rn(this.params),!c){c=this.createBean(new aP),this.appendChild(c.getGui());const u=this.column,h=g=>({event:f})=>{this.updateModel(u,g,{fromButtons:!0}),this.afterAction(g,f)};c?.addManagedListeners(c,{apply:h("apply"),clear:h("clear"),reset:h("reset"),cancel:h("cancel")}),this.eButtons=c}c.updateButtons(d,a)}else this.applyActive=!1,c&&(_t(c.getGui()),this.eButtons=this.destroyBean(c))}close(e){const t=this.hidePopup;if(!t)return;const o=e,s=o?.key;let i;(s===R.ENTER||s===R.SPACE)&&(i={keyboardEvent:o}),t(i),this.hidePopup=null}afterAction(e,t){const{params:o,applyActive:s}=this,i=o?.closeOnApply;switch(e){case"apply":{t?.preventDefault(),i&&s&&this.close(t);break}case"reset":{i&&s&&this.close();break}case"cancel":{i&&this.close(t);break}}}handleKeyDown(e){!e.defaultPrevented&&e.key===R.ENTER&&this.applyActive&&(this.updateModel(this.column,"apply",{fromButtons:!0}),this.afterAction("apply",e))}destroy(){this.hidePopup=null,this.eButtons=this.destroyBean(this.eButtons)}},cP=":where(.ag-menu:not(.ag-tabs) .ag-filter)>:not(.ag-filter-wrapper){min-width:180px}",dP={tag:"div",cls:"ag-filter"},uP=class extends ye{constructor(e,t,o){super(dP),this.column=e,this.source=t,this.enableGlobalButtonCheck=o,this.wrapper=null}postConstruct(){this.beans.colFilter?.activeFilterComps.add(this),this.createFilter(!0),this.addManagedEventListeners({filterDestroyed:this.onFilterDestroyed.bind(this)})}hasFilter(){return this.wrapper!=null}getFilter(){return this.wrapper?.then(e=>e.comp)??null}afterInit(){return this.wrapper?.then(()=>{})??ie.resolve()}afterGuiAttached(e){this.afterGuiAttachedParams=e,this.wrapper?.then(t=>{this.comp?.afterGuiAttached(e),t?.comp?.afterGuiAttached?.(e)})}afterGuiDetached(){this.wrapper?.then(e=>{e?.comp?.afterGuiDetached?.()})}createFilter(e){const{column:t,source:o,beans:{colFilter:s}}=this,i=s.getFilterUiForDisplay(t)??null;this.wrapper=i,i?.then(n=>{if(!n)return;const{isHandler:r,comp:a}=n;let l;if(r){const c=!!this.enableGlobalButtonCheck,d=this.createBean(new lP(t,n,s,s.updateModel.bind(s),c&&s.isGlobalButtons,c));this.comp=d,l=d.getGui()}else this.registerCSS(cP),l=a.getGui(),L(l)||D(69,{guiFromFilter:l});this.appendChild(l),e?this.eventSvc.dispatchEvent({type:"filterOpened",column:t,source:o,eGui:this.getGui()}):a.afterGuiAttached?.(this.afterGuiAttachedParams)})}onFilterDestroyed(e){const{source:t,column:o}=e;(t==="api"||t==="paramsUpdated")&&o.getId()===this.column.getId()&&this.beans.colModel.getColDefCol(this.column)&&(Xe(this.getGui()),this.comp=this.destroyBean(this.comp),this.createFilter())}destroy(){this.beans.colFilter?.activeFilterComps.delete(this),this.eventSvc.dispatchEvent({type:"filterClosed",column:this.column}),this.wrapper=null,this.comp=this.destroyBean(this.comp),this.afterGuiAttachedParams=void 0,super.destroy()}},hP=class extends x{constructor(){super(...arguments),this.beanName="filterMenuFactory"}wireBeans(e){this.popupSvc=e.popupSvc}hideActiveMenu(){this.hidePopup?.()}showMenuAfterMouseEvent(e,t,o,s){e&&!e.isColumn||this.showPopup(e,i=>{this.popupSvc?.positionPopupUnderMouseEvent({additionalParams:{column:e},type:o,mouseEvent:t,ePopup:i})},o,t.target,Ze(this.gos),s)}showMenuAfterButtonClick(e,t,o,s){if(e&&!e.isColumn)return;let i=-1,n="left";const r=Ze(this.gos);!r&&this.gos.get("enableRtl")&&(i=1,n="right");const a=r?void 0:4*i,l=r?void 0:4;this.showPopup(e,c=>{this.popupSvc?.positionPopupByComponent({type:o,eventSource:t,ePopup:c,nudgeX:a,nudgeY:l,alignSide:n,keepWithinBounds:!0,position:"under",additionalParams:{column:e}})},o,t,r,s)}showPopup(e,t,o,s,i,n){const r=e?this.createBean(new uP(e,"COLUMN_MENU")):void 0;if(this.activeMenu=r,!r?.hasFilter()||!e){ce(57);return}const a=it({tag:"div",cls:`ag-menu${i?"":" ag-filter-menu"}`,role:"presentation"});[this.tabListener]=this.addManagedElementListeners(a,{keydown:m=>this.trapFocusWithin(m,a)}),a.appendChild(r?.getGui());let l;const c=()=>r?.afterGuiDetached(),d=zf(this.gos)?s??this.beans.ctrlsSvc.getGridBodyCtrl().eGridBody:void 0,u=m=>{Yc(e,!1,"contextMenu");const C=m instanceof KeyboardEvent;this.tabListener&&(this.tabListener=this.tabListener()),C&&s&&vt(s)&&xu(s)?.focus({preventScroll:!0}),c(),this.destroyBean(this.activeMenu),this.dispatchVisibleChangedEvent(!1,o,e),n?.()},h=this.getLocaleTextFunc(),g=i&&o!=="columnFilter"?h("ariaLabelColumnMenu","Column Menu"):h("ariaLabelColumnFilter","Column Filter"),f=this.popupSvc?.addPopup({modal:!0,eChild:a,closeOnEsc:!0,closedCallback:u,positionCallback:()=>t(a),anchorToElement:d,ariaLabel:g});f&&(this.hidePopup=l=f.hideFunc),r.afterInit().then(()=>{t(a),r.afterGuiAttached({container:o,hidePopup:l})}),Yc(e,!0,"contextMenu"),this.dispatchVisibleChangedEvent(!0,o,e)}trapFocusWithin(e,t){e.key!==R.TAB||e.defaultPrevented||$o(this.beans,t,!1,e.shiftKey)||(e.preventDefault(),Ho(t,e.shiftKey))}dispatchVisibleChangedEvent(e,t,o){this.eventSvc.dispatchEvent({type:"columnMenuVisibleChanged",visible:e,switchingTab:!1,key:t,column:o??null,columnGroup:null})}isMenuEnabled(e){return e.isFilterAllowed()&&(e.getColDef().menuTabs??["filterMenuTab"]).includes("filterMenuTab")}showMenuAfterContextMenuEvent(){}destroy(){this.destroyBean(this.activeMenu),super.destroy()}},gP=class extends x{constructor(){super(...arguments),this.beanName="filterValueSvc"}getValue(e,t,o){if(!t)return;const s=e.getColDef(),{selectableFilter:i,valueSvc:n,formula:r}=this.beans,a=o??i?.getFilterValueGetter(e.getColId())??s.filterValueGetter;if(a)return this.executeFilterValueGetter(a,t.data,e,t,s);const l=n.getValue(e,t,"data");return e.isAllowFormula()&&r?.isFormula(l)?r.resolveValue(e,t):l}executeFilterValueGetter(e,t,o,s,i){const{expressionSvc:n,valueSvc:r}=this.beans,a=K(this.gos,{data:t,node:s,column:o,colDef:i,getValue:r.getValueCallback.bind(r,s)});return typeof e=="function"?e(a):n?.evaluate(e,a)}},pP={tag:"div",cls:"ag-floating-filter-input",role:"presentation",children:[{tag:"ag-input-text-field",ref:"eFloatingFilterText"}]},fP=class extends ye{constructor(){super(pP,[Tn]),this.eFloatingFilterText=W}init(e){this.params=e;const t=this.beans.colNames.getDisplayNameForColumn(e.column,"header",!0);if(this.eFloatingFilterText.setDisabled(!0).setInputAriaLabel(`${t} ${this.getLocaleTextFunc()("ariaFilterInput","Filter Input")}`),this.gos.get("enableFilterHandlers")){const o=e,s=o.getHandler();if(s.getModelAsString){const i=s.getModelAsString(o.model);this.eFloatingFilterText.setValue(i)}}}onParentModelChanged(e){if(e==null){this.eFloatingFilterText.setValue("");return}this.params.parentFilterInstance(t=>{if(t.getModelAsString){const o=t.getModelAsString(e);this.eFloatingFilterText.setValue(o)}})}refresh(e){this.init(e)}},mP=class extends qa{constructor(e){super(e,"ag-radio-button","radio")}isSelected(){return this.eInput.checked}toggle(){this.eInput.disabled||this.isSelected()||this.setValue(!0)}addInputListeners(){super.addInputListeners(),this.addManagedEventListeners({checkboxChanged:this.onChange.bind(this)})}onChange(e){const t=this.eInput;e.selected&&e.name&&t.name&&t.name===e.name&&e.id&&t.id!==e.id&&this.setValue(!1,!0)}},rl=class{constructor(){this.customFilterOptions={}}init(e,t){this.filterOptions=e.filterOptions??t,this.mapCustomOptions(),this.defaultOption=this.getDefaultItem(e.defaultOption)}refresh(e,t){const o=e.filterOptions??t;this.filterOptions!==o&&(this.filterOptions=o,this.customFilterOptions={},this.mapCustomOptions()),this.defaultOption=this.getDefaultItem(e.defaultOption)}mapCustomOptions(){const{filterOptions:e}=this;if(e)for(const t of e){if(typeof t=="string")continue;const o=[["displayKey"],["displayName"],["predicate","test"]],s=i=>i.some(n=>t[n]!=null)?!0:(D(72,{keys:i}),!1);if(!o.every(s)){this.filterOptions=e.filter(i=>i===t)||[];continue}this.customFilterOptions[t.displayKey]=t}}getDefaultItem(e){const{filterOptions:t}=this;if(e)return e;if(t.length>=1){const o=t[0];if(typeof o=="string")return o;if(o.displayKey)return o.displayKey;D(73)}else D(74)}getCustomOption(e){return this.customFilterOptions[e]}};function $s(e,t,o){return o==null?e.splice(t):e.splice(t,o)}function pn(e){return e==null||typeof e=="string"&&e.trim().length===0}function CP(e){return e==="AND"||e==="OR"?e:"AND"}function vP(e,t,o){if(e==null)return;const{predicate:s}=e;if(s!=null&&!t.some(i=>i==null))return s(t,o)}function wP(e,t){let o=e.length;return o>t&&(e.splice(t),D(78),o=t),o}var bP=new Set(["empty","notBlank","blank","today","yesterday","tomorrow","thisWeek","lastWeek","nextWeek","thisMonth","lastMonth","nextMonth","thisQuarter","lastQuarter","nextQuarter","thisYear","lastYear","nextYear","yearToDate","last7Days","last30Days","last90Days","last6Months","last12Months","last24Months"]);function uo(e,t){const o=t.getCustomOption(e);if(o){const{numberOfInputs:s}=o;return s??1}return e&&bP.has(e)?0:e==="inRange"?2:1}var An=class extends cC{constructor(e,t,o){super(e,"simple-filter"),this.mapValuesFromModel=t,this.defaultOptions=o,this.eTypes=[],this.eJoinPanels=[],this.eJoinAnds=[],this.eJoinOrs=[],this.eConditionBodies=[],this.listener=()=>this.onUiChanged(),this.lastUiCompletePosition=null,this.joinOperatorId=0}setParams(e){super.setParams(e);const t=new rl;this.optionsFactory=t,t.init(e,this.defaultOptions),this.commonUpdateSimpleParams(e),this.createOption(),this.createMissingConditionsAndOperators()}updateParams(e,t){this.optionsFactory.refresh(e,this.defaultOptions),super.updateParams(e,t),this.commonUpdateSimpleParams(e)}commonUpdateSimpleParams(e){this.setNumConditions(e),this.defaultJoinOperator=CP(e.defaultJoinOperator),this.filterPlaceholder=e.filterPlaceholder,this.createFilterListOptions(),Qe(this.getGui(),"tabindex",this.isReadOnly()?"-1":null)}onFloatingFilterChanged(e,t){this.setTypeFromFloatingFilter(e),this.setValueFromFloatingFilter(t),this.onUiChanged("immediately",!0)}setTypeFromFloatingFilter(e){this.eTypes.forEach((t,o)=>{const s=o===0?e:this.optionsFactory.defaultOption;t.setValue(s,!0)})}getModelFromUi(){const e=this.getUiCompleteConditions();return e.length===0?null:this.maxNumConditions>1&&e.length>1?{filterType:this.filterType,operator:this.getJoinOperator(),conditions:e}:e[0]}getConditionTypes(){return this.eTypes.map(e=>e.getValue())}getConditionType(e){return this.eTypes[e].getValue()}getJoinOperator(){const{eJoinOrs:e,defaultJoinOperator:t}=this;return e.length===0?t:e[0].getValue()===!0?"OR":"AND"}areNonNullModelsEqual(e,t){const o=!e.operator,s=!t.operator;if(!o&&s||o&&!s)return!1;let n;if(o){const r=e,a=t;n=this.areSimpleModelsEqual(r,a)}else{const r=e,a=t;n=r.operator===a.operator&&ho(r.conditions,a.conditions,(l,c)=>this.areSimpleModelsEqual(l,c))}return n}setModelIntoUi(e,t){if(e==null)return this.resetUiToDefaults(t),ie.resolve();if(e.operator){const s=e;let i=s.conditions;i==null&&(i=[],D(77));const n=wP(i,this.maxNumConditions),r=this.getNumConditions();if(n<r)this.removeConditionsAndOperators(n);else if(n>r)for(let l=r;l<n;l++)this.createJoinOperatorPanel(),this.createOption();const a=s.operator==="OR";this.eJoinAnds.forEach(l=>l.setValue(!a,!0)),this.eJoinOrs.forEach(l=>l.setValue(a,!0)),i.forEach((l,c)=>{this.eTypes[c].setValue(l.type,!0),this.setConditionIntoUi(l,c)})}else{const s=e;this.getNumConditions()>1&&this.removeConditionsAndOperators(1),this.eTypes[0].setValue(s.type,!0),this.setConditionIntoUi(s,0)}return this.lastUiCompletePosition=this.getNumConditions()-1,this.createMissingConditionsAndOperators(),this.updateUiVisibility(),t||this.params.onUiChange(this.getUiChangeEventParams()),ie.resolve()}setNumConditions(e){let t=e.maxNumConditions??2;t<1&&(D(79),t=1),this.maxNumConditions=t;let o=e.numAlwaysVisibleConditions??1;o<1&&(D(80),o=1),o>t&&(D(81),o=t),this.numAlwaysVisibleConditions=o}createOption(){const e=this.getGui(),t=this.createManagedBean(new nl);this.eTypes.push(t),t.addCss("ag-filter-select"),e.appendChild(t.getGui());const o=this.createEValue();this.eConditionBodies.push(o),e.appendChild(o),this.putOptionsIntoDropdown(t),this.resetType(t);const s=this.getNumConditions()-1;this.forEachPositionInput(s,i=>this.resetInput(i)),this.addChangedListeners(t,s)}createJoinOperatorPanel(){const e=it({tag:"div",cls:"ag-filter-condition"});this.eJoinPanels.push(e);const t=this.createJoinOperator(this.eJoinAnds,e,"and"),o=this.createJoinOperator(this.eJoinOrs,e,"or");this.getGui().appendChild(e);const s=this.eJoinPanels.length-1,i=this.joinOperatorId++;this.resetJoinOperatorAnd(t,s,i),this.resetJoinOperatorOr(o,s,i),this.isReadOnly()||(t.onValueChange(this.listener),o.onValueChange(this.listener))}createJoinOperator(e,t,o){const s=this.createManagedBean(new mP);e.push(s);const i="ag-filter-condition-operator";return s.addCss(i),s.addCss(`${i}-${o}`),t.appendChild(s.getGui()),s}createFilterListOptions(){this.filterListOptions=this.optionsFactory.filterOptions.map(e=>typeof e=="string"?this.createBoilerplateListOption(e):this.createCustomListOption(e))}putOptionsIntoDropdown(e){const{filterListOptions:t}=this;for(const o of t)e.addOption(o);e.setDisabled(t.length<=1)}createBoilerplateListOption(e){return{value:e,text:this.translate(e)}}createCustomListOption(e){const{displayKey:t}=e,o=this.optionsFactory.getCustomOption(e.displayKey);return{value:t,text:o?this.getLocaleTextFunc()(o.displayKey,o.displayName):this.translate(t)}}createBodyTemplate(){return null}getAgComponents(){return[]}updateUiVisibility(){const e=this.getJoinOperator();this.updateNumConditions(),this.updateConditionStatusesAndValues(this.lastUiCompletePosition,e)}updateNumConditions(){let e=-1,t=!0;for(let o=0;o<this.getNumConditions();o++)this.isConditionUiComplete(o)?e=o:t=!1;if(this.shouldAddNewConditionAtEnd(t))this.createJoinOperatorPanel(),this.createOption();else{const o=this.lastUiCompletePosition??this.getNumConditions()-2;if(e<o){this.removeConditionsAndOperators(o+1);const s=e+1,i=o-s;i>0&&this.removeConditionsAndOperators(s,i),this.createMissingConditionsAndOperators()}}this.lastUiCompletePosition=e}updateConditionStatusesAndValues(e,t){this.eTypes.forEach((s,i)=>{const n=this.isConditionDisabled(i,e);s.setDisabled(n||this.filterListOptions.length<=1),i===1&&(Qs(this.eJoinPanels[0],n),this.eJoinAnds[0].setDisabled(n),this.eJoinOrs[0].setDisabled(n))}),this.eConditionBodies.forEach((s,i)=>{fe(s,this.isConditionBodyVisible(i))});const o=(t??this.getJoinOperator())==="OR";for(const s of this.eJoinAnds)s.setValue(!o,!0);for(const s of this.eJoinOrs)s.setValue(o,!0);this.forEachInput((s,i,n,r)=>{this.setElementDisplayed(s,i<r),this.setElementDisabled(s,this.isConditionDisabled(n,e))}),this.resetPlaceholder()}shouldAddNewConditionAtEnd(e){return e&&this.getNumConditions()<this.maxNumConditions&&!this.isReadOnly()}removeConditionsAndOperators(e,t){if(e>=this.getNumConditions())return;const{eTypes:o,eConditionBodies:s,eJoinPanels:i,eJoinAnds:n,eJoinOrs:r}=this;this.removeComponents(o,e,t),this.removeElements(s,e,t),this.removeEValues(e,t);const a=Math.max(e-1,0);this.removeElements(i,a,t),this.removeComponents(n,a,t),this.removeComponents(r,a,t)}removeElements(e,t,o){const s=$s(e,t,o);for(const i of s)_t(i)}removeComponents(e,t,o){const s=$s(e,t,o);for(const i of s)_t(i.getGui()),this.destroyBean(i)}afterGuiAttached(e){if(super.afterGuiAttached(e),this.resetPlaceholder(),!e?.suppressFocus){let t;if(!this.isReadOnly()){const o=this.getInputs(0)[0];o instanceof Fo&&this.isConditionBodyVisible(0)?t=o.getInputElement():t=this.eTypes[0]?.getFocusableElement()}(t??this.getGui()).focus({preventScroll:!0})}}shouldKeepInvalidInputState(){return!1}afterGuiDetached(){super.afterGuiDetached();const e=this.params;if(this.beans.colFilter?.shouldKeepStateOnDetach(e.column)||this.shouldKeepInvalidInputState())return;e.onStateChange({model:e.model});let t=-1,o=-1,s=!1;const i=this.getJoinOperator();for(let r=this.getNumConditions()-1;r>=0;r--)if(this.isConditionUiComplete(r))t===-1&&(t=r,o=r);else{const a=r>=this.numAlwaysVisibleConditions&&!this.isConditionUiComplete(r-1),l=r<t;(a||l)&&(this.removeConditionsAndOperators(r,1),s=!0,l&&o--)}let n=!1;this.getNumConditions()<this.numAlwaysVisibleConditions&&(this.createMissingConditionsAndOperators(),n=!0),this.shouldAddNewConditionAtEnd(o===this.getNumConditions()-1)&&(this.createJoinOperatorPanel(),this.createOption(),n=!0),n&&this.updateConditionStatusesAndValues(o,i),s&&this.updateJoinOperatorsDisabled(),this.lastUiCompletePosition=o}getModelAsString(e){return this.params.getHandler()?.getModelAsString?.(e)??""}resetPlaceholder(){const e=this.getLocaleTextFunc(),{filterPlaceholder:t,eTypes:o}=this;this.forEachInput((s,i,n,r)=>{if(!(s instanceof Fo))return;const a=i===0&&r>1?"inRangeStart":i===0?"filterOoo":"inRangeEnd",l=i===0&&r>1?e("ariaFilterFromValue","Filter from value"):i===0?e("ariaFilterValue","Filter Value"):e("ariaFilterToValue","Filter to Value"),c=o[n].getValue(),d=Mu(this,t,a,c);s.setInputPlaceholder(d),s.setInputAriaLabel(l)})}setElementValue(e,t,o){e instanceof Fo&&e.setValue(t!=null?String(t):null,!0)}setElementDisplayed(e,t){Vl(e)&&fe(e.getGui(),t)}setElementDisabled(e,t){Vl(e)&&Qs(e.getGui(),t)}attachElementOnChange(e,t){e instanceof Fo&&e.onValueChange(t)}forEachInput(e){this.getConditionTypes().forEach((t,o)=>{this.forEachPositionTypeInput(o,t,e)})}forEachPositionInput(e,t){const o=this.getConditionType(e);this.forEachPositionTypeInput(e,o,t)}forEachPositionTypeInput(e,t,o){const s=uo(t,this.optionsFactory),i=this.getInputs(e);for(let n=0;n<i.length;n++){const r=i[n];r!=null&&o(r,n,e,s)}}isConditionDisabled(e,t){return this.isReadOnly()?!0:e===0?!1:e>t+1}isConditionBodyVisible(e){const t=this.getConditionType(e);return uo(t,this.optionsFactory)>0}isConditionUiComplete(e){return!(e>=this.getNumConditions()||this.getConditionType(e)==="empty"||this.getValues(e).some(o=>o==null)||this.positionHasInvalidInputs(e))}getNumConditions(){return this.eTypes.length}getUiCompleteConditions(){const e=[];for(let t=0;t<this.getNumConditions();t++)this.isConditionUiComplete(t)&&e.push(this.createCondition(t));return e}createMissingConditionsAndOperators(){if(!this.isReadOnly())for(let e=this.getNumConditions();e<this.numAlwaysVisibleConditions;e++)this.createJoinOperatorPanel(),this.createOption()}resetUiToDefaults(e){this.removeConditionsAndOperators(this.isReadOnly()?1:this.numAlwaysVisibleConditions),this.eTypes.forEach(t=>this.resetType(t)),this.eJoinAnds.forEach((t,o)=>this.resetJoinOperatorAnd(t,o,this.joinOperatorId+o)),this.eJoinOrs.forEach((t,o)=>this.resetJoinOperatorOr(t,o,this.joinOperatorId+o)),this.joinOperatorId++,this.forEachInput(t=>this.resetInput(t)),this.resetPlaceholder(),this.createMissingConditionsAndOperators(),this.lastUiCompletePosition=null,this.updateUiVisibility(),e||this.params.onUiChange(this.getUiChangeEventParams())}resetType(e){const o=this.getLocaleTextFunc()("ariaFilteringOperator","Filtering operator");e.setValue(this.optionsFactory.defaultOption,!0).setAriaLabel(o).setDisabled(this.isReadOnly()||this.filterListOptions.length<=1)}resetJoinOperatorAnd(e,t,o){this.resetJoinOperator(e,t,this.defaultJoinOperator==="AND",this.translate("andCondition"),o)}resetJoinOperatorOr(e,t,o){this.resetJoinOperator(e,t,this.defaultJoinOperator==="OR",this.translate("orCondition"),o)}resetJoinOperator(e,t,o,s,i){this.updateJoinOperatorDisabled(e.setValue(o,!0).setName(`ag-simple-filter-and-or-${this.getCompId()}-${i}`).setLabel(s),t)}updateJoinOperatorsDisabled(){const e=(t,o)=>this.updateJoinOperatorDisabled(t,o);this.eJoinAnds.forEach(e),this.eJoinOrs.forEach(e)}updateJoinOperatorDisabled(e,t){e.setDisabled(this.isReadOnly()||t>0)}resetInput(e){this.setElementValue(e,null),this.setElementDisabled(e,this.isReadOnly())}setConditionIntoUi(e,t){const o=this.mapValuesFromModel(e,this.optionsFactory);this.forEachInput((s,i,n)=>{n===t&&this.setElementValue(s,o[i]!=null?o[i]:null)})}setValueFromFloatingFilter(e){this.forEachInput((t,o,s)=>{this.setElementValue(t,o===0&&s===0?e:null,!0)})}addChangedListeners(e,t){this.isReadOnly()||(e.onValueChange(this.listener),this.forEachPositionInput(t,o=>{this.attachElementOnChange(o,this.listener)}))}hasInvalidInputs(){return!1}positionHasInvalidInputs(e){return!1}isReadOnly(){return!!this.params.readOnly}},al=["equals","notEqual","greaterThan","greaterThanOrEqual","lessThan","lessThanOrEqual","inRange","blank","notBlank"];function oa(e){return e?.allowedCharPattern??null}function vg(e,t){const{filter:o,filterTo:s,type:i}=e||{};return[et(o),et(s)].slice(0,uo(i,t))}var SP=class extends An{constructor(){super("bigintFilter",vg,al),this.eValuesFrom=[],this.eValuesTo=[],this.filterType="bigint",this.defaultDebounceMs=500}afterGuiAttached(e){super.afterGuiAttached(e),this.refreshInputValidation()}shouldKeepInvalidInputState(){return!ws()&&this.hasInvalidInputs()&&this.getConditionTypes().includes("inRange")}refreshInputValidation(){for(let e=0;e<this.eValuesFrom.length;e++){const t=this.eValuesFrom[e],o=this.eValuesTo[e];this.refreshInputPairValidation(t,o)}}refreshInputPairValidation(e,t,o=!1){const{bigintParser:s}=this.params,i=this.getParsedValue(e,s),n=this.getParsedValue(t,s),r=this.isInvalidValue(e,i),a=this.isInvalidValue(t,n),l=o?e:t,c=o?t:e,d=o?r:a,u=o?a:r;let h="";if(d)h=this.getLocaleTextFunc()("invalidBigInt","Invalid BigInt");else if(!r&&!a){const g=yP(i,n,o);g&&(h=this.translate(g,[String(o?t.getValue():e.getValue())]))}l.setCustomValidity(h),u||c.setCustomValidity(""),h.length>0&&this.beans.ariaAnnounce.announceValue(h,"dateFilter")}getState(){return{isInvalid:this.hasInvalidInputs()}}areStatesEqual(e,t){return(e?.isInvalid??!1)===(t?.isInvalid??!1)}refresh(e){const t=super.refresh(e),{state:o,additionalEventAttributes:s}=e,i=this.state,n=s?.fromAction;return(n&&n!="apply"||o.model!==i.model||!this.areStatesEqual(o.state,i.state))&&this.refreshInputValidation(),t}setElementValue(e,t,o){super.setElementValue(e,t,o),t===null&&e.setCustomValidity("")}createEValue(){const{params:e,eValuesFrom:t,eValuesTo:o}=this,s=oa(e),i=it({tag:"div",cls:"ag-filter-body",role:"presentation"}),n=this.createFromToElement(i,t,"from",s),r=this.createFromToElement(i,o,"to",s),a=(d,u,h)=>()=>this.refreshInputPairValidation(d,u,h),l=a(n,r,!0);n.onValueChange(l),n.addGuiEventListener("focusin",l);const c=a(n,r,!1);return r.onValueChange(c),r.addGuiEventListener("focusin",c),i}createFromToElement(e,t,o,s){const i=this.createManagedBean(s?new $t({allowedCharPattern:s}):new $t);return i.addCss(`ag-filter-${o}`),i.addCss("ag-filter-filter"),t.push(i),e.appendChild(i.getGui()),i}removeEValues(e,t){const o=s=>this.removeComponents(s,e,t);o(this.eValuesFrom),o(this.eValuesTo)}getValues(e){const t=[];return this.forEachPositionInput(e,(o,s,i,n)=>{s<n&&t.push(et(o.getValue()??null))}),t}areSimpleModelsEqual(e,t){return e.filter===t.filter&&e.filterTo===t.filterTo&&e.type===t.type}createCondition(e){const t=this.getConditionType(e),o={filterType:this.filterType,type:t},s=this.getValues(e);return s.length>0&&(o.filter=String(s[0])),s.length>1&&(o.filterTo=String(s[1])),o}removeConditionsAndOperators(e,t){if(!this.hasInvalidInputs())return super.removeConditionsAndOperators(e,t)}getInputs(e){const{eValuesFrom:t,eValuesTo:o}=this;return e>=t.length?[null,null]:[t[e],o[e]]}hasInvalidInputs(){let e=!1;return this.forEachInput(t=>e||(e=!t.getInputElement().validity.valid)),e}positionHasInvalidInputs(e){let t=!1;return this.forEachPositionInput(e,o=>t||(t=!o.getInputElement().validity.valid)),t}canApply(e){return!this.hasInvalidInputs()}getParsedValue(e,t){const o=e.getValue();return o==null||typeof o=="string"&&o.trim()===""?null:t?t(o):et(o)}isInvalidValue(e,t){const o=e.getValue();return o!=null&&String(o).trim()!==""&&t===null}};function yP(e,t,o){return e!=null&&t!=null&&e>=t?`strict${o?"Max":"Min"}ValueValidation`:null}var wg=class extends x{constructor(e,t){super(),this.mapValuesFromModel=e,this.defaultOptions=t}init(e){const t=e.filterParams,o=new rl;this.optionsFactory=o,o.init(t,this.defaultOptions),this.filterModelFormatter=this.createManagedBean(new this.FilterModelFormatterClass(o,t)),this.updateParams(e),this.validateModel(e)}refresh(e){if(e.source==="colDef"){const t=e.filterParams,o=this.optionsFactory;o.refresh(t,this.defaultOptions),this.filterModelFormatter.updateParams({optionsFactory:o,filterParams:t}),this.updateParams(e)}this.validateModel(e)}updateParams(e){this.params=e}doesFilterPass(e){const t=e.model;if(t==null)return!0;const{operator:o}=t,s=[];if(o){const r=t;s.push(...r.conditions??[])}else s.push(t);const i=o&&o==="OR"?"some":"every",n=this.params.getValue(e.node);return s[i](r=>this.individualConditionPasses(e,r,n))}getModelAsString(e,t){return this.filterModelFormatter.getModelAsString(e,t)??""}validateModel(e){const{model:t,filterParams:{filterOptions:o,maxNumConditions:s}}=e;if(t==null)return;let n=bu(t)?t.conditions:[t];const r=o?.map(d=>typeof d=="string"?d:d.displayKey)??this.defaultOptions;if(!(!n||n.every(d=>r.find(u=>u===d.type)!==void 0))){this.params={...e,model:null},e.onModelChange(null);return}let l=!1;const c=this.filterType;if((n&&!n.every(d=>d.filterType===c)||t.filterType!==c)&&(n=n.map(d=>({...d,filterType:c})),l=!0),typeof s=="number"&&n&&n.length>s&&(n=n.slice(0,s),l=!0),l){const d=n.length>1?{...t,filterType:c,conditions:n}:{...n[0],filterType:c};this.params={...e,model:d},e.onModelChange(d)}}individualConditionPasses(e,t,o){const s=this.optionsFactory,i=this.mapValuesFromModel(t,s),n=s.getCustomOption(t.type),r=vP(n,i,o);return r??(o==null?this.evaluateNullValue(t.type):this.evaluateNonNullValue(i,o,t,e))}},ll=class extends wg{evaluateNullValue(e){const{includeBlanksInEquals:t,includeBlanksInNotEqual:o,includeBlanksInGreaterThan:s,includeBlanksInLessThan:i,includeBlanksInRange:n}=this.params.filterParams;switch(e){case"equals":if(t)return!0;break;case"notEqual":if(o)return!0;break;case"greaterThan":case"greaterThanOrEqual":if(s)return!0;break;case"lessThan":case"lessThanOrEqual":if(i)return!0;break;case"inRange":if(n)return!0;break;case"blank":return!0;case"notBlank":return!1}return!1}evaluateNonNullValue(e,t,o){const s=o.type;if(!this.isValid(t))return s==="notEqual"||s==="notBlank";const i=this.comparator(),n=e[0]!=null?i(e[0],t):0;switch(s){case"equals":return n===0;case"notEqual":return n!==0;case"greaterThan":return n>0;case"greaterThanOrEqual":return n>=0;case"lessThan":return n<0;case"lessThanOrEqual":return n<=0;case"inRange":{const r=i(e[1],t);return this.params.filterParams.inRangeInclusive?n>=0&&r<=0:n>0&&r<0}case"blank":return pn(t);case"notBlank":return!pn(t);default:return D(76,{filterModelType:s}),!0}}},cl={equals:"Equals",notEqual:"NotEqual",greaterThan:"GreaterThan",greaterThanOrEqual:"GreaterThanOrEqual",lessThan:"LessThan",lessThanOrEqual:"LessThanOrEqual",inRange:"InRange"},RP={contains:"Contains",notContains:"NotContains",equals:"TextEquals",notEqual:"TextNotEqual",startsWith:"StartsWith",endsWith:"EndsWith",inRange:"InRange"},kn=class extends x{constructor(e,t,o){super(),this.optionsFactory=e,this.filterParams=t,this.valueFormatter=o}getModelAsString(e,t){const o=this.getLocaleTextFunc(),s=t==="filterToolPanel";if(!e)return s?ft(this,"filterSummaryInactive"):null;if(e.operator!=null){const n=e,a=(n.conditions??[]).map(c=>this.getModelAsString(c,t)),l=n.operator==="AND"?"andCondition":"orCondition";return a.join(` ${ft(this,l)} `)}else{if(e.type==="blank"||e.type==="notBlank")return s?ft(this,e.type==="blank"?"filterSummaryBlank":"filterSummaryNotBlank"):o(e.type,e.type);{const n=e,r=this.optionsFactory.getCustomOption(n.type),{displayKey:a,displayName:l,numberOfInputs:c}=r||{};return a&&l&&c===0?o(a,l):this.conditionToString(n,s,n.type==="inRange"||c===2,a,l)}}}updateParams(e){const{optionsFactory:t,filterParams:o}=e;this.optionsFactory=t,this.filterParams=o}conditionForToolPanel(e,t,o,s,i,n){let r;const a=this.getTypeKey(e);return a&&(r=ft(this,a)),i&&n&&(r=this.getLocaleTextFunc()(i,n)),r!=null?t?`${r} ${ft(this,"filterSummaryInRangeValues",[o(),s()])}`:`${r} ${o()}`:null}getTypeKey(e){const t=this.filterTypeKeys[e];return t?`filterSummary${t}`:null}formatValue(e){const t=this.valueFormatter;return t?t(e??null)??"":String(e)}},bg=class extends kn{constructor(e,t){super(e,t,t.bigintFormatter),this.filterTypeKeys=cl}conditionToString(e,t,o,s,i){const{filter:n,filterTo:r,type:a}=e,l=this.formatValue.bind(this),c=et(n),d=et(r);if(t){const u=this.conditionForToolPanel(a,o,()=>l(c),()=>l(d),s,i);if(u!=null)return u}return o?`${l(c)}-${l(d)}`:n!=null?l(c):`${a}`}},FP=class extends ll{constructor(){super(vg,al),this.filterType="bigint",this.FilterModelFormatterClass=bg}comparator(){return(e,t)=>e===t?0:e<t?1:-1}isValid(e){return et(e)!==null}},dl=class extends x{constructor(e){super(),this.params=e,this.eInput=W,this.onValueChanged=()=>{}}setupGui(e){this.eInput=this.createManagedBean(new $t(this.params?.config));const t=this.eInput.getGui();e.appendChild(t);const o=s=>this.onValueChanged(s);this.addManagedListeners(t,{input:o,keydown:o})}setEditable(e){this.eInput.setDisabled(!e)}getValue(){return this.eInput.getValue()}setValue(e,t){this.eInput.setValue(e,t)}setValueChangedListener(e){this.onValueChanged=e}setParams({ariaLabel:e,autoComplete:t,placeholder:o}){const{eInput:s}=this;s.setInputAriaLabel(e),t!==void 0&&s.setAutoComplete(t),s.toggleCss("ag-floating-filter-search-icon",!!o),s.setInputPlaceholder(o)}};function sa(e){const t=e?.trim();return t===""?e:t}function Sg(e,t){const{filter:o,filterTo:s,type:i}=e||{};return[o||null,s||null].slice(0,uo(i,t))}var yg=class extends ye{constructor(){super(...arguments),this.defaultDebounceMs=0}setLastTypeFromModel(e){if(!e){this.lastType=this.optionsFactory.defaultOption;return}const t=e.operator;let o;t?o=e.conditions[0]:o=e,this.lastType=o.type}canWeEditAfterModelFromParentFilter(e){if(!e)return this.isTypeEditable(this.lastType);if(e.operator)return!1;const o=e;return this.isTypeEditable(o.type)}init(e){this.params=e;const t=this.gos.get("enableFilterHandlers");if(this.reactive=t,this.setParams(e),t){const o=e;this.onModelUpdated(o.model)}}setParams(e){const t=new rl;this.optionsFactory=t,t.init(e.filterParams,this.defaultOptions),this.filterModelFormatter=this.createManagedBean(new this.FilterModelFormatterClass(t,e.filterParams)),this.setSimpleParams(e,!1)}setSimpleParams(e,t=!0){const o=this.optionsFactory.defaultOption;t||(this.lastType=o),this.readOnly=!!e.filterParams.readOnly;const s=this.isTypeEditable(o);this.setEditable(s)}refresh(e){this.params=e;const t=e,o=this.reactive;if((!o||t.source==="colDef")&&this.updateParams(e),o){const{source:s,model:i}=t;if(s==="dataChanged"||s==="ui")return;this.onModelUpdated(i)}}updateParams(e){const t=this.optionsFactory;t.refresh(e.filterParams,this.defaultOptions),this.setSimpleParams(e),this.filterModelFormatter.updateParams({optionsFactory:t,filterParams:e.filterParams})}onParentModelChanged(e,t){t?.afterFloatingFilter||t?.afterDataChange||this.onModelUpdated(e)}isTypeEditable(e){return!!e&&!this.readOnly&&uo(e,this.optionsFactory)===1}getAriaLabel(e){return`${this.beans.colNames.getDisplayNameForColumn(e,"header",!0)} ${this.getLocaleTextFunc()("ariaFilterInput","Filter Input")}`}},EP={tag:"div",ref:"eFloatingFilterInputContainer",cls:"ag-floating-filter-input",role:"presentation"},ul=class extends yg{constructor(){super(...arguments),this.eFloatingFilterInputContainer=W,this.defaultDebounceMs=500}postConstruct(){this.setTemplate(EP)}onModelUpdated(e){this.setLastTypeFromModel(e),this.setEditable(this.canWeEditAfterModelFromParentFilter(e)),this.inputSvc.setValue(this.filterModelFormatter.getModelAsString(e))}setParams(e){this.setupFloatingFilterInputService(e),super.setParams(e),this.setTextInputParams(e)}setupFloatingFilterInputService(e){this.inputSvc=this.createFloatingFilterInputService(e),this.inputSvc.setupGui(this.eFloatingFilterInputContainer)}setTextInputParams(e){const{inputSvc:t,defaultDebounceMs:o,readOnly:s}=this,{filterPlaceholder:i,column:n,browserAutoComplete:r,filterParams:a}=e,l=this.lastType??this.optionsFactory.defaultOption,c=e.filterParams.filterPlaceholder,d=i===!0?Mu(this,c,"filterOoo",l):i||void 0;if(t.setParams({ariaLabel:this.getAriaLabel(n),autoComplete:r??!1,placeholder:d}),this.applyActive=Rn(a),!s){const u=Oa(a,o);t.setValueChangedListener(xe(this,this.syncUpWithParentFilter.bind(this),u))}}updateParams(e){super.updateParams(e),this.setTextInputParams(e)}recreateFloatingFilterInputService(e){const{inputSvc:t}=this,o=t.getValue();Xe(this.eFloatingFilterInputContainer),this.destroyBean(t),this.setupFloatingFilterInputService(e),t.setValue(o,!0)}syncUpWithParentFilter(e){const t=e.key===R.ENTER,o=this.reactive;if(o&&this.params.onUiChange(),this.applyActive&&!t)return;const{inputSvc:s,params:i,lastType:n}=this;let r=s.getValue();if(i.filterParams.trimInput&&(r=sa(r),s.setValue(r,!0)),o){const a=i,l=a.model,c=this.convertValue(r),d=c==null?null:{...l??{filterType:this.filterType,type:n??this.optionsFactory.defaultOption},filter:c};a.onModelChange(d,{afterFloatingFilter:!0})}else i.parentFilterInstance(a=>{a?.onFloatingFilterChanged(n||null,r||null)})}convertValue(e){return e||null}setEditable(e){this.inputSvc.setEditable(e)}},xP=class extends ul{constructor(){super(...arguments),this.FilterModelFormatterClass=bg,this.filterType="bigint",this.defaultOptions=al}updateParams(e){const t=e.filterParams;oa(t)!==this.allowedCharPattern&&this.recreateFloatingFilterInputService(e),this.bigintParser=t?.bigintParser,super.updateParams(e)}createFloatingFilterInputService(e){const t=e.filterParams;this.allowedCharPattern=oa(t),this.bigintParser=t?.bigintParser;const o=this.allowedCharPattern?{allowedCharPattern:this.allowedCharPattern}:void 0;return this.createManagedBean(new dl({config:o}))}convertValue(e){return e==null||e===""?null:this.bigintParser?this.bigintParser(e):et(e)}},td=".ag-input-field-input",Rg=class{constructor(e,t,o,s,i,n){this.context=e,this.eParent=i,this.alive=!0,this.debouncedReport=xe({isAlive:()=>this.alive},od,500),this.timeoutHandle=null,Ym(t,o,s)?.newAgStackInstance().then(a=>{if(!this.alive){e.destroyBean(a);return}if(this.dateComp=a,!a)return;i.appendChild(a.getGui()),a?.afterGuiAttached?.();const{tempValue:l,disabled:c}=this;l&&a.setDate(l),c!=null&&a.setDisabled?.(c),n?.(this)})}destroy(){this.alive=!1,this.dateComp=this.context.destroyBean(this.dateComp)}getDate(){return this.dateComp?this.dateComp.getDate():this.tempValue}setDate(e){const t=this.dateComp;t?t.setDate(e):this.tempValue=e}setDisabled(e){const t=this.dateComp;t?t.setDisabled?.(e):this.disabled=e}setDisplayed(e){fe(this.eParent,e)}setInputPlaceholder(e){this.dateComp?.setInputPlaceholder?.(e)}setInputAriaLabel(e){this.dateComp?.setInputAriaLabel?.(e)}afterGuiAttached(e){this.dateComp?.afterGuiAttached?.(e)}updateParams(e){this.dateComp?.refresh?.(e)}setCustomValidity(e,t=!1){const o=this.dateComp?.getGui().querySelector(td);if(o&&"setCustomValidity"in o){const s=e.length>0;o.setCustomValidity(e),s?t?this.timeoutHandle=this.debouncedReport(o):od(o):this.timeoutHandle&&window.clearTimeout(this.timeoutHandle),Ca(o,s)}}getValidity(){return this.dateComp?.getGui().querySelector(td)?.validity}};function od(e){e.reportValidity()}var hl=["equals","notEqual","lessThan","greaterThan","inRange","blank","notBlank"];function Fg(e,t){const{dateFrom:o,dateTo:s,type:i}=e||{};return[o&&Ke(o,void 0,!0)||null,s&&Ke(s,void 0,!0)||null].slice(0,uo(i,t))}var sd=1e3,id=1/0,PP=class extends An{constructor(){super("dateFilter",Fg,hl),this.eConditionPanelsFrom=[],this.eConditionPanelsTo=[],this.dateConditionFromComps=[],this.dateConditionToComps=[],this.minValidYear=sd,this.maxValidYear=id,this.minValidDate=null,this.maxValidDate=null,this.filterType="date"}afterGuiAttached(e){super.afterGuiAttached(e),this.dateConditionFromComps[0].afterGuiAttached(e),this.refreshInputValidation()}shouldKeepInvalidInputState(){return!ws()&&this.hasInvalidInputs()&&this.getConditionTypes().includes("inRange")}commonUpdateSimpleParams(e){super.commonUpdateSimpleParams(e);const t=(l,c)=>{const d=e[l];if(d!=null)if(isNaN(d))D(82,{param:l});else return d==null?c:Number(d);return c},o=t("minValidYear",sd),s=t("maxValidYear",id);this.minValidYear=o,this.maxValidYear=s,o>s&&D(83);const{minValidDate:i,maxValidDate:n}=e,r=i instanceof Date?i:Ke(i);this.minValidDate=r;const a=n instanceof Date?n:Ke(n);this.maxValidDate=a,r&&a&&r>a&&D(84)}refreshInputValidation(){for(let e=0;e<this.dateConditionFromComps.length;e++)this.refreshInputPairValidation(e,!1,!0)}refreshInputPairValidation(e,t=!1,o=!1){const{dateConditionFromComps:s,dateConditionToComps:i,beans:n}=this,r=s[e],a=i[e],l=uo(this.getConditionType(e),this.optionsFactory),c=r.getDate(),d=a.getDate(),u=l>=2?DP(c,d,t):null,h=u?this.translate(u,[String(t?d:c)]):"",g=!ws()&&!o;(t?r:a).setCustomValidity(h,g),(t?a:r).setCustomValidity("",g),h.length>0&&n.ariaAnnounce.announceValue(h,"dateFilter")}createDateCompWrapper(e,t,o){const{beans:{userCompFactory:s,context:i,gos:n},params:r}=this,a=o==="from",l=new Rg(i,s,r.colDef,K(n,{onDateChanged:()=>{this.refreshInputPairValidation(t,a),this.onUiChanged()},onFocusIn:()=>this.refreshInputPairValidation(t,a),filterParams:r,location:"filter"}),e);return this.addDestroyFunc(()=>l.destroy()),l}getState(){return{isInvalid:this.hasInvalidInputs()}}areStatesEqual(e,t){return(e?.isInvalid??!1)===(t?.isInvalid??!1)}setElementValue(e,t){e.setDate(t),t||e.setCustomValidity("")}setElementDisplayed(e,t){e.setDisplayed(t)}setElementDisabled(e,t){e.setDisabled(t)}createEValue(){const e=it({tag:"div",cls:"ag-filter-body"});return this.createFromToElement(e,this.eConditionPanelsFrom,this.dateConditionFromComps,"from"),this.createFromToElement(e,this.eConditionPanelsTo,this.dateConditionToComps,"to"),e}createFromToElement(e,t,o,s){const i=it({tag:"div",cls:`ag-filter-${s} ag-filter-date-${s}`});t.push(i),e.appendChild(i),o.push(this.createDateCompWrapper(i,t.length-1,s))}removeEValues(e,t){this.removeDateComps(this.dateConditionFromComps,e,t),this.removeDateComps(this.dateConditionToComps,e,t),$s(this.eConditionPanelsFrom,e,t),$s(this.eConditionPanelsTo,e,t)}removeDateComps(e,t,o){const s=$s(e,t,o);for(const i of s)i.destroy()}isValidDateValue(e){if(e===null)return!1;const{minValidDate:t,maxValidDate:o,minValidYear:s,maxValidYear:i}=this;if(t){if(e<t)return!1}else if(e.getUTCFullYear()<s)return!1;if(o){if(e>o)return!1}else if(e.getUTCFullYear()>i)return!1;return!0}hasInvalidInputs(){let e=!1;return this.forEachInput(t=>e||(e=t.getDate()!=null&&!(t.getValidity()?.valid??!0))),e}positionHasInvalidInputs(e){let t=!1;return this.forEachPositionInput(e,o=>t||(t=!(o.getValidity()?.valid??!0))),t}canApply(e){return!this.hasInvalidInputs()}isConditionUiComplete(e){if(!super.isConditionUiComplete(e))return!1;let t=!0;return this.forEachPositionInput(e,(o,s,i,n)=>{!t||s>=n||t&&(t=this.isValidDateValue(o.getDate()))}),t}areSimpleModelsEqual(e,t){return e.dateFrom===t.dateFrom&&e.dateTo===t.dateTo&&e.type===t.type}createCondition(e){const t=this.getConditionType(e),o={},{params:s,filterType:i}=this,n=this.getValues(e),r=s.useIsoSeparator?"T":" ";return n.length>0&&(o.dateFrom=$e(n[0],!0,r)),n.length>1&&(o.dateTo=$e(n[1],!0,r)),{dateFrom:null,dateTo:null,filterType:i,type:t,...o}}removeConditionsAndOperators(e,t){if(!this.hasInvalidInputs())return super.removeConditionsAndOperators(e,t)}resetPlaceholder(){const e=this.getLocaleTextFunc(),t=this.translate("dateFormatOoo"),o=e("ariaFilterValue","Filter Value");this.forEachInput(s=>{s.setInputPlaceholder(t),s.setInputAriaLabel(o)})}getInputs(e){const{dateConditionFromComps:t,dateConditionToComps:o}=this;return e>=t.length?[null,null]:[t[e],o[e]]}getValues(e){const t=[];return this.forEachPositionInput(e,(o,s,i,n)=>{s<n&&t.push(o.getDate())}),t}translate(e,t){let o=e;return e==="lessThan"?o="before":e==="greaterThan"&&(o="after"),super.translate(o,t)}};function DP(e,t,o){return e!=null&&t!=null&&e>=t?`${o?"max":"min"}DateValidation`:null}var Eg=class extends kn{constructor(e,t){super(e,t,o=>{const{dataTypeSvc:s,valueSvc:i}=this.beans,n=t.column,r=s?.getDateFormatterFunction(n),a=r?r(o??void 0):o;return i.formatValue(n,null,a)}),this.filterTypeKeys=cl}conditionToString(e,t,o,s,i){const{type:n}=e,r=Ke(e.dateFrom),a=Ke(e.dateTo),l=this.filterParams.inRangeFloatingFilterDateFormat,c=t?this.formatValue.bind(this):h=>tS(h,l),d=()=>r!==null?c(r):"null",u=()=>a!==null?c(a):"null";if(r==null&&a==null)return ft(this,n);if(t){const h=this.conditionForToolPanel(n,o,d,u,s,i);if(h!=null)return h}return o?`${d()}-${u()}`:r!=null?c(r):`${n}`}};function MP(e,t){const o=t;return o<e?-1:o>e?1:0}var TP=class extends ll{constructor(){super(Fg,hl),this.filterType="date",this.FilterModelFormatterClass=Eg,this.filterTypeToRangeCache=new Map}getOrRefreshRangeCacheItem(e,t){const{filterTypeToRangeCache:o}=this,s=Date.now();let i=o.get(e);if(i&&i.expires<s&&(i=void 0),!i){const[n,r]=t(new Date(s),new Date(s));i={from:n,to:r,expires:ut(new Date(s)).getTime()-s},o.set(e,i)}return i}comparator(){return this.params.filterParams.comparator??MP}isValid(e){const t=this.params.filterParams.isValidDate;return!t||t(e)}evaluateNonNullValue(e,t,o){const s=o.type,i=this.comparator();if(!this.isValid(t))return s==="notEqual"||s==="notBlank";const n=s,r=QP[n];if(r){const{from:a,to:l}=this.getOrRefreshRangeCacheItem(n,r);return i(a,t)>=0&&i(l,t)<0}return super.evaluateNonNullValue(e,t,o)}},IP=1,xi=null,AP=()=>{if(xi!=null)return xi;let e;const t=typeof navigator>"u"?void 0:navigator.languages?.[0]??navigator.language;if(t&&typeof Intl<"u"&&typeof Intl.Locale=="function")try{e=new Intl.Locale(t).getWeekInfo?.()?.firstDay}catch{e=void 0}return xi=e==null?IP:e%7,xi},nt=e=>(e.setHours(0,0,0,0),e),Ln=e=>{const t=e.getDay(),o=AP(),s=(t-o+7)%7;return e.setDate(e.getDate()-s),nt(e)},On=(e,t=1)=>(e.setDate(e.getDate()-t),e),ut=e=>(e.setDate(e.getDate()+1),nt(e)),xg=e=>(Ln(e),e.setDate(e.getDate()+6),ut(e)),Gn=e=>(e.setDate(1),nt(e)),gl=e=>(e.setDate(1),e.setMonth(e.getMonth()+1),nt(e)),pl=e=>{const t=Math.floor(e.getMonth()/3);return e.setMonth(t*3),Gn(e)},Pg=e=>{const t=Math.floor(e.getMonth()/3);return e.setMonth(t*3+2),gl(e)},fl=e=>(e.setMonth(0,1),nt(e)),Dg=e=>(e.setMonth(12,0),ut(e)),Rs=e=>On(e),ia=e=>Rs(Ln(e)),na=e=>Rs(Gn(e)),ra=e=>Rs(pl(e)),ml=(e,t)=>[nt(e),ut(t)],kP=(e,t)=>ml(Rs(e),Rs(t)),Cl=(e,t)=>[Ln(e),xg(t)],LP=(e,t)=>Cl(ia(e),ia(t)),vl=(e,t)=>[Gn(e),gl(t)],OP=(e,t)=>vl(na(e),na(t)),wl=(e,t)=>[pl(e),Pg(t)],GP=(e,t)=>wl(ra(e),ra(t)),bl=(e,t)=>[fl(e),Dg(t)],HP=(e,t)=>[fl(e),ut(t)],BP=(e,t)=>[nt(On(e,7)),ut(t)],VP=(e,t)=>[nt(On(e,30)),ut(t)],NP=(e,t)=>[nt(On(e,90)),ut(t)],WP=(e,t)=>(e.setFullYear(e.getFullYear()-1),e.setMonth(e.getMonth()+6),[nt(e),ut(t)]),zP=(e,t)=>(e.setFullYear(e.getFullYear()-1),[nt(e),ut(t)]),_P=(e,t)=>(e.setFullYear(e.getFullYear()-2),[nt(e),ut(t)]),UP=(e,t)=>(e.setFullYear(e.getFullYear()-1),t.setFullYear(t.getFullYear()-1),bl(e,t)),$P=(e,t)=>(e.setFullYear(e.getFullYear()+1),t.setFullYear(t.getFullYear()+1),bl(e,t)),KP=(e,t)=>(e.setMonth(e.getMonth()+3),t.setMonth(t.getMonth()+3),wl(e,t)),qP=(e,t)=>(e.setMonth(e.getMonth()+1),t.setMonth(t.getMonth()+1),vl(e,t)),jP=(e,t)=>(e.setDate(e.getDate()+7),t.setDate(t.getDate()+7),Cl(e,t)),YP=(e,t)=>(e.setDate(e.getDate()+1),t.setDate(t.getDate()+1),ml(e,t)),QP={today:ml,yesterday:kP,tomorrow:YP,thisWeek:Cl,lastWeek:LP,nextWeek:jP,thisMonth:vl,lastMonth:OP,nextMonth:qP,thisQuarter:wl,lastQuarter:GP,nextQuarter:KP,thisYear:bl,lastYear:UP,nextYear:$P,yearToDate:HP,last7Days:BP,last30Days:VP,last90Days:NP,last6Months:WP,last12Months:zP,last24Months:_P,setStartOfDay:nt,setStartOfWeek:Ln,setStartOfNextDay:ut,setStartOfNextWeek:xg,setStartOfMonth:Gn,setStartOfNextMonth:gl,setStartOfQuarter:pl,setStartOfNextQuarter:Pg,setStartOfYear:fl,setStartOfNextYear:Dg,setPreviousDay:Rs,setPreviousWeek:ia,setPreviousMonth:na,setPreviousQuarter:ra},ZP={tag:"div",cls:"ag-floating-filter-input",role:"presentation",children:[{tag:"ag-input-text-field",ref:"eReadOnlyText"},{tag:"div",ref:"eDateWrapper",cls:"ag-date-floating-filter-wrapper"}]},JP=class extends yg{constructor(){super(ZP,[Tn]),this.eReadOnlyText=W,this.eDateWrapper=W,this.FilterModelFormatterClass=Eg,this.filterType="date",this.defaultOptions=hl}setParams(e){super.setParams(e),this.createDateComponent();const t=this.getLocaleTextFunc();this.eReadOnlyText.setDisabled(!0).setInputAriaLabel(t("ariaDateFilterInput","Date Filter Input"))}updateParams(e){super.updateParams(e),this.dateComp.updateParams(this.getDateComponentParams()),this.updateCompOnModelChange(e.currentParentModel())}updateCompOnModelChange(e){const t=!this.readOnly&&this.canWeEditAfterModelFromParentFilter(e);if(this.setEditable(t),t){const o=e?Ke(e.dateFrom):null;this.dateComp.setDate(o),this.eReadOnlyText.setValue("")}else this.eReadOnlyText.setValue(this.filterModelFormatter.getModelAsString(e)),this.dateComp.setDate(null)}setEditable(e){fe(this.eDateWrapper,e),fe(this.eReadOnlyText.getGui(),!e)}onModelUpdated(e){super.setLastTypeFromModel(e),this.updateCompOnModelChange(e)}onDateChanged(){const e=this.dateComp.getDate();if(this.reactive){const t=this.params;t.onUiChange();const o=t.model,s=$e(e),i=s==null?null:{...o??{filterType:this.filterType,type:this.lastType??this.optionsFactory.defaultOption},dateFrom:s};t.onModelChange(i,{afterFloatingFilter:!0})}else this.params.parentFilterInstance(t=>{t?.onFloatingFilterChanged(this.lastType||null,e)})}getDateComponentParams(){const{filterParams:e}=this.params,t=Oa(e,this.defaultDebounceMs);return K(this.gos,{onDateChanged:xe(this,this.onDateChanged.bind(this),t),filterParams:e,location:"floatingFilter"})}createDateComponent(){const{beans:{context:e,userCompFactory:t},eDateWrapper:o,params:{column:s}}=this;this.dateComp=new Rg(e,t,s.getColDef(),this.getDateComponentParams(),o,i=>{i.setInputAriaLabel(this.getAriaLabel(s))}),this.addDestroyFunc(()=>this.dateComp.destroy())}},XP={tag:"div",cls:"ag-filter-filter",children:[{tag:"ag-input-text-field",ref:"eDateInput",cls:"ag-date-filter"}]},eD=class extends ye{constructor(){super(XP,[Tn]),this.eDateInput=W,this.isApply=!1,this.applyOnFocusOut=!1}init(e){this.params=e,this.setParams(e);const t=this.eDateInput.getInputElement();this.addManagedListeners(t,{mouseDown:()=>{this.eDateInput.isDisabled()||this.usingSafariDatePicker||t.focus({preventScroll:!0})},input:this.handleInput.bind(this,!1),change:this.handleInput.bind(this,!0),focusout:this.handleFocusOut.bind(this),focusin:this.handleFocusIn.bind(this)})}handleInput(e){if(!this.eDateInput.isDisabled()){if(this.isApply){this.applyOnFocusOut=!e,e&&this.params.onDateChanged();return}e||this.params.onDateChanged()}}handleFocusOut(){this.applyOnFocusOut&&(this.applyOnFocusOut=!1,this.params.onDateChanged())}handleFocusIn(){this.params.onFocusIn?.()}setParams(e){const t=this.eDateInput.getInputElement(),o=this.shouldUseBrowserDatePicker(e);this.usingSafariDatePicker=o&&po();const{minValidYear:s,maxValidYear:i,minValidDate:n,maxValidDate:r,buttons:a,includeTime:l,colDef:c}=e.filterParams||{},d=this.beans.dataTypeSvc,u=l??d?.getDateIncludesTimeFlag?.(c.cellDataType)??!1;o?u?(t.type="datetime-local",t.step="1"):t.type="date":t.type="text";const h=nd(n,s,!0),g=nd(r,i,!1);h&&g&&h.getTime()>g.getTime()&&D(87),h&&(t.min=$e(h,u)),g&&(t.max=$e(g,u)),this.isApply=e.location==="floatingFilter"&&!!a?.includes("apply")}refresh(e){this.params=e,this.setParams(e)}getDate(){return Ke(this.eDateInput.getValue())}setDate(e){const t=this.params.filterParams.colDef.cellDataType,o=this.beans.dataTypeSvc?.getDateIncludesTimeFlag(t)??!1;this.eDateInput.setValue($e(e,o))}setInputPlaceholder(e){this.eDateInput.setInputPlaceholder(e)}setInputAriaLabel(e){this.eDateInput.setAriaLabel(e)}setDisabled(e){this.eDateInput.setDisabled(e)}afterGuiAttached(e){e?.suppressFocus||this.eDateInput.getInputElement().focus({preventScroll:!0})}shouldUseBrowserDatePicker(e){return e?.filterParams?.browserDatePicker??!0}};function nd(e,t,o){return e&&t&&D(o?85:86),e instanceof Date?e:e?Ke(e):t?Ke(`${t}-${o?"01-01":"12-31"}`):null}var Sl=["equals","notEqual","greaterThan","greaterThanOrEqual","lessThan","lessThanOrEqual","inRange","blank","notBlank"];function aa(e){return e?.allowedCharPattern??null}function fn(e){return e==null||isNaN(e)?null:e}function Mg(e,t){const{filter:o,filterTo:s,type:i}=e||{};return[fn(o),fn(s)].slice(0,uo(i,t))}var tD=class extends An{constructor(){super("numberFilter",Mg,Sl),this.eValuesFrom=[],this.eValuesTo=[],this.filterType="number",this.defaultDebounceMs=500}afterGuiAttached(e){super.afterGuiAttached(e),this.refreshInputValidation()}shouldKeepInvalidInputState(){return!ws()&&this.hasInvalidInputs()&&this.getConditionTypes().includes("inRange")}refreshInputValidation(){for(let e=0;e<this.eValuesFrom.length;e++){const t=this.eValuesFrom[e],o=this.eValuesTo[e];this.refreshInputPairValidation(t,o)}}refreshInputPairValidation(e,t,o=!1){const s=this.params.numberParser,i=rd(s,e),n=rd(s,t),r=oD(i,n,o),a=r?this.translate(r,[String(o?n:i)]):"";(o?e:t).setCustomValidity(a),(o?t:e).setCustomValidity(""),a.length>0&&this.beans.ariaAnnounce.announceValue(a,"dateFilter")}getState(){return{isInvalid:this.hasInvalidInputs()}}areStatesEqual(e,t){return(e?.isInvalid??!1)===(t?.isInvalid??!1)}refresh(e){const t=super.refresh(e),{state:o,additionalEventAttributes:s}=e,i=this.state,n=s?.fromAction;return(n&&n!="apply"||o.model!==i.model||!this.areStatesEqual(o.state,i.state))&&this.refreshInputValidation(),t}setElementValue(e,t,o){const{numberFormatter:s}=this.params,i=!o&&s?s(t??null):t;super.setElementValue(e,i),i===null&&e.setCustomValidity("")}createEValue(){const{params:e,eValuesFrom:t,eValuesTo:o}=this,s=aa(e),i=it({tag:"div",cls:"ag-filter-body",role:"presentation"}),n=this.createFromToElement(i,t,"from",s),r=this.createFromToElement(i,o,"to",s),a=(d,u,h)=>()=>this.refreshInputPairValidation(d,u,h),l=a(n,r,!0);n.onValueChange(l),n.addGuiEventListener("focusin",l);const c=a(n,r,!1);return r.onValueChange(c),r.addGuiEventListener("focusin",c),i}createFromToElement(e,t,o,s){const i=this.createManagedBean(s?new $t({allowedCharPattern:s}):new il);return i.addCss(`ag-filter-${o}`),i.addCss("ag-filter-filter"),t.push(i),e.appendChild(i.getGui()),i}removeEValues(e,t){const o=s=>this.removeComponents(s,e,t);o(this.eValuesFrom),o(this.eValuesTo)}getValues(e){const t=[];return this.forEachPositionInput(e,(o,s,i,n)=>{s<n&&t.push(fn(Tg(this.params.numberParser,o.getValue())))}),t}areSimpleModelsEqual(e,t){return e.filter===t.filter&&e.filterTo===t.filterTo&&e.type===t.type}createCondition(e){const t=this.getConditionType(e),o={filterType:this.filterType,type:t},s=this.getValues(e);return s.length>0&&(o.filter=s[0]),s.length>1&&(o.filterTo=s[1]),o}removeConditionsAndOperators(e,t){if(!this.hasInvalidInputs())return super.removeConditionsAndOperators(e,t)}getInputs(e){const{eValuesFrom:t,eValuesTo:o}=this;return e>=t.length?[null,null]:[t[e],o[e]]}hasInvalidInputs(){let e=!1;return this.forEachInput(t=>e||(e=!t.getInputElement().validity.valid)),e}positionHasInvalidInputs(e){let t=!1;return this.forEachPositionInput(e,o=>t||(t=!o.getInputElement().validity.valid)),t}canApply(e){return!this.hasInvalidInputs()}};function Tg(e,t){if(typeof t=="number")return t;let o=Nt(t);return o!=null&&o.trim()===""&&(o=null),e?e(o):o==null||o.trim()==="-"?null:Number.parseFloat(o)}function rd(e,t){return fn(Tg(e,t.getValue(!0)))}function oD(e,t,o){return e!=null&&t!=null&&e>=t?`strict${o?"Max":"Min"}ValueValidation`:null}var Ig=class extends kn{constructor(e,t){super(e,t,t.numberFormatter),this.filterTypeKeys=cl}conditionToString(e,t,o,s,i){const{filter:n,filterTo:r,type:a}=e,l=this.formatValue.bind(this);if(t){const c=this.conditionForToolPanel(a,o,()=>l(n),()=>l(r),s,i);if(c!=null)return c}return o?`${l(n)}-${l(r)}`:n!=null?l(n):`${a}`}},sD=class extends ll{constructor(){super(Mg,Sl),this.filterType="number",this.FilterModelFormatterClass=Ig}comparator(){return(e,t)=>e===t?0:e<t?1:-1}isValid(e){return!isNaN(e)}},iD=class extends x{constructor(){super(...arguments),this.onValueChanged=()=>{},this.numberInputActive=!0}setupGui(e){this.eNumberInput=this.createManagedBean(new il),this.eTextInput=this.createManagedBean(new $t),this.eTextInput.setDisabled(!0);const t=this.eNumberInput.getGui(),o=this.eTextInput.getGui();e.appendChild(t),e.appendChild(o),this.setupListeners(t,s=>this.onValueChanged(s)),this.setupListeners(o,s=>this.onValueChanged(s))}setEditable(e){this.numberInputActive=e,this.eNumberInput.setDisplayed(this.numberInputActive),this.eTextInput.setDisplayed(!this.numberInputActive)}setAutoComplete(e){this.eNumberInput.setAutoComplete(e),this.eTextInput.setAutoComplete(e)}getValue(){return this.getActiveInputElement().getValue()}setValue(e,t){this.getActiveInputElement().setValue(e,t)}getActiveInputElement(){return this.numberInputActive?this.eNumberInput:this.eTextInput}setValueChangedListener(e){this.onValueChanged=e}setupListeners(e,t){this.addManagedListeners(e,{input:t,keydown:t})}setParams({ariaLabel:e,autoComplete:t,placeholder:o}){this.setAriaLabel(e),t!==void 0&&this.setAutoComplete(t),this.setPlaceholder(this.eNumberInput,o),this.setPlaceholder(this.eTextInput,o)}setPlaceholder(e,t){e.toggleCss("ag-floating-filter-search-icon",!!t),e.setInputPlaceholder(t)}setAriaLabel(e){this.eNumberInput.setInputAriaLabel(e),this.eTextInput.setInputAriaLabel(e)}},nD=class extends ul{constructor(){super(...arguments),this.FilterModelFormatterClass=Ig,this.filterType="number",this.defaultOptions=Sl}updateParams(e){aa(e.filterParams)!==this.allowedCharPattern&&this.recreateFloatingFilterInputService(e),super.updateParams(e)}createFloatingFilterInputService(e){return this.allowedCharPattern=aa(e.filterParams),this.allowedCharPattern?this.createManagedBean(new dl({config:{allowedCharPattern:this.allowedCharPattern}})):this.createManagedBean(new iD)}convertValue(e){return e?Number(e):null}},yl=["contains","notContains","equals","notEqual","startsWith","endsWith","blank","notBlank"],rD=class extends An{constructor(){super("textFilter",Sg,yl),this.filterType="text",this.eValuesFrom=[],this.eValuesTo=[],this.defaultDebounceMs=500}createCondition(e){const t=this.getConditionType(e),o={filterType:this.filterType,type:t},s=this.getValues(e);return s.length>0&&(o.filter=s[0]),s.length>1&&(o.filterTo=s[1]),o}areSimpleModelsEqual(e,t){return e.filter===t.filter&&e.filterTo===t.filterTo&&e.type===t.type}getInputs(e){const{eValuesFrom:t,eValuesTo:o}=this;return e>=t.length?[null,null]:[t[e],o[e]]}getValues(e){const t=[];return this.forEachPositionInput(e,(o,s,i,n)=>{s<n&&t.push(Nt(o.getValue()))}),t}createEValue(){const e=it({tag:"div",cls:"ag-filter-body",role:"presentation"}),{eValuesFrom:t,eValuesTo:o}=this;return this.createFromToElement(e,t,"from"),this.createFromToElement(e,o,"to"),e}createFromToElement(e,t,o){const s=this.createManagedBean(new $t);s.addCss(`ag-filter-${o}`),s.addCss("ag-filter-filter"),t.push(s),e.appendChild(s.getGui())}removeEValues(e,t){const o=n=>this.removeComponents(n,e,t),{eValuesFrom:s,eValuesTo:i}=this;o(s),o(i)}},Ag=class extends kn{constructor(){super(...arguments),this.filterTypeKeys=RP}conditionToString(e,t,o,s,i){const{filter:n,filterTo:r,type:a}=e;if(t){const l=d=>()=>ft(this,"filterSummaryTextQuote",[d]),c=this.conditionForToolPanel(a,o,l(n),l(r),s,i);if(c!=null)return c}return o?`${n}-${r}`:n!=null?`${n}`:`${a}`}},aD=({filterOption:e,value:t,filterText:o})=>{if(o==null)return!1;switch(e){case"contains":return t.includes(o);case"notContains":return!t.includes(o);case"equals":return t===o;case"notEqual":return t!=o;case"startsWith":return t.indexOf(o)===0;case"endsWith":{const s=t.lastIndexOf(o);return s>=0&&s===t.length-o.length}default:return!1}},lD=e=>e,cD=e=>e==null?null:e.toString().toLowerCase(),dD=class extends wg{constructor(){super(Sg,yl),this.filterType="text",this.FilterModelFormatterClass=Ag}updateParams(e){super.updateParams(e);const t=e.filterParams;this.matcher=t.textMatcher??aD,this.formatter=t.textFormatter??(t.caseSensitive?lD:cD)}evaluateNullValue(e){return e?["notEqual","notContains","blank"].indexOf(e)>=0:!1}evaluateNonNullValue(e,t,o,s){const i=e.map(h=>this.formatter(h))||[],n=this.formatter(t),{api:r,colDef:a,column:l,context:c,filterParams:{textFormatter:d}}=this.params;if(o.type==="blank")return pn(t);if(o.type==="notBlank")return!pn(t);const u={api:r,colDef:a,column:l,context:c,node:s.node,data:s.data,filterOption:o.type,value:n,textFormatter:d};return i.some(h=>this.matcher({...u,filterText:h}))}processModelToApply(e){if(e&&this.params.filterParams.trimInput){const t=o=>{const s={...o},{filter:i,filterTo:n}=o;return i&&(s.filter=sa(i)??null),n&&(s.filterTo=sa(n)??null),s};return bu(e)?{...e,conditions:e.conditions.map(t)}:t(e)}return e}},uD=class extends ul{constructor(){super(...arguments),this.FilterModelFormatterClass=Ag,this.filterType="text",this.defaultOptions=yl}createFloatingFilterInputService(){return this.createManagedBean(new dl)}};function hD(e){return!!e.quickFilter?.isFilterPresent()}function gD(e){return e.quickFilter?.getText()}function pD(e){e.quickFilter?.resetCache()}var fD=class extends x{constructor(){super(...arguments),this.beanName="quickFilter",this.quickFilter=null,this.quickFilterParts=null}postConstruct(){const e=this.resetCache.bind(this),t=this.gos;this.addManagedEventListeners({columnPivotModeChanged:e,newColumnsLoaded:e,columnRowGroupChanged:e,columnVisible:()=>{t.get("includeHiddenColumnsInQuickFilter")||this.resetCache()}}),this.addManagedPropertyListener("quickFilterText",o=>this.setFilter(o.currentValue)),this.addManagedPropertyListeners(["includeHiddenColumnsInQuickFilter","applyQuickFilterBeforePivotOrAgg"],()=>this.onColumnConfigChanged()),this.quickFilter=this.parseFilter(t.get("quickFilterText")),this.parser=t.get("quickFilterParser"),this.matcher=t.get("quickFilterMatcher"),this.setFilterParts(),this.addManagedPropertyListeners(["quickFilterMatcher","quickFilterParser"],()=>this.setParserAndMatcher())}refreshCols(){const{autoColSvc:e,colModel:t,gos:o,pivotResultCols:s}=this.beans,i=t.isPivotMode(),n=e?.getColumns(),r=t.getColDefCols();let a=(i&&!o.get("applyQuickFilterBeforePivotOrAgg")?s?.getPivotResultCols()?.list:r)??[];n&&(a=a.concat(n)),this.colsToUse=o.get("includeHiddenColumnsInQuickFilter")?a:a.filter(l=>l.isVisible()||l.isRowGroupActive())}isFilterPresent(){return this.quickFilter!==null}doesRowPass(e){const t=this.gos.get("cacheQuickFilter");return this.matcher?this.doesRowPassMatcher(t,e):this.quickFilterParts.every(o=>t?this.doesRowPassCache(e,o):this.doesRowPassNoCache(e,o))}resetCache(){this.beans.rowModel.forEachNode(e=>e.quickFilterAggregateText=null)}getText(){return this.gos.get("quickFilterText")}setFilterParts(){const{quickFilter:e,parser:t}=this;e?this.quickFilterParts=t?t(e):e.split(" "):this.quickFilterParts=null}parseFilter(e){return L(e)?e.toUpperCase():null}setFilter(e){if(e!=null&&typeof e!="string"){D(70,{newFilter:e});return}const t=this.parseFilter(e);this.quickFilter!==t&&(this.quickFilter=t,this.setFilterParts(),this.dispatchLocalEvent({type:"quickFilterChanged"}))}setParserAndMatcher(){const e=this.gos.get("quickFilterParser"),t=this.gos.get("quickFilterMatcher"),o=e!==this.parser||t!==this.matcher;this.parser=e,this.matcher=t,o&&(this.setFilterParts(),this.dispatchLocalEvent({type:"quickFilterChanged"}))}onColumnConfigChanged(){this.refreshCols(),this.resetCache(),this.isFilterPresent()&&this.dispatchLocalEvent({type:"quickFilterChanged"})}doesRowPassNoCache(e,t){return this.colsToUse.some(o=>{const s=this.getTextForColumn(o,e);return L(s)&&s.includes(t)})}doesRowPassCache(e,t){return this.checkGenerateAggText(e),e.quickFilterAggregateText.includes(t)}doesRowPassMatcher(e,t){let o;e?(this.checkGenerateAggText(t),o=t.quickFilterAggregateText):o=this.getAggText(t);const{quickFilterParts:s,matcher:i}=this;return i(s,o)}checkGenerateAggText(e){e.quickFilterAggregateText||(e.quickFilterAggregateText=this.getAggText(e))}getTextForColumn(e,t){let o=this.beans.filterValueSvc.getValue(e,t);const s=e.getColDef();if(s.getQuickFilterText){const i=K(this.gos,{value:o,node:t,data:t.data,column:e,colDef:s});o=s.getQuickFilterText(i)}return L(o)?o.toString().toUpperCase():null}getAggText(e){const t=[];for(const o of this.colsToUse){const s=this.getTextForColumn(o,e);L(s)&&t.push(s)}return t.join(`
|
|
61
|
+
`)}},mD={moduleName:"ClientSideRowModelFilter",version:I,rowModels:["clientSide"],beans:[cF]},Rl={moduleName:"FilterCore",version:I,beans:[nP],apiFunctions:{isAnyFilterPresent:sP,onFilterChanged:iP},css:[Gx],dependsOn:[mD]},kg={moduleName:"FilterValue",version:I,beans:[gP]},gi={moduleName:"ColumnFilter",version:I,beans:[oP,hP],dynamicBeans:{headerFilterCellCtrl:Ix},icons:{filter:"filter",filterActive:"filter"},apiFunctions:{isColumnFilterPresent:Hx,getColumnFilterInstance:Bx,destroyFilter:Vx,setFilterModel:Nx,getFilterModel:Wx,getColumnFilterModel:zx,setColumnFilterModel:_x,showColumnFilter:Ux,hideColumnFilter:$x,getColumnFilterHandler:Kx,doFilterAction:qx},dependsOn:[Rl,Mn,kg,Ox]},CD={moduleName:"CustomFilter",version:I,userComponents:{agReadOnlyFloatingFilter:fP},dependsOn:[gi]},vD={moduleName:"TextFilter",version:I,dependsOn:[gi],userComponents:{agTextColumnFilter:{classImp:rD,params:{useForm:!0}},agTextColumnFloatingFilter:uD},dynamicBeans:{agTextColumnFilterHandler:dD}},wD={moduleName:"NumberFilter",version:I,dependsOn:[gi],userComponents:{agNumberColumnFilter:{classImp:tD,params:{useForm:!0}},agNumberColumnFloatingFilter:nD},dynamicBeans:{agNumberColumnFilterHandler:sD}},bD={moduleName:"BigIntFilter",version:I,dependsOn:[gi],userComponents:{agBigIntColumnFilter:{classImp:SP,params:{useForm:!0}},agBigIntColumnFloatingFilter:xP},dynamicBeans:{agBigIntColumnFilterHandler:FP}},SD={moduleName:"DateFilter",version:I,dependsOn:[gi],userComponents:{agDateColumnFilter:{classImp:PP,params:{useForm:!0}},agDateInput:eD,agDateColumnFloatingFilter:JP},dynamicBeans:{agDateColumnFilterHandler:TP}},yD={moduleName:"QuickFilterCore",version:I,rowModels:["clientSide"],beans:[fD],dependsOn:[Rl,kg]},RD={moduleName:"QuickFilter",version:I,apiFunctions:{isQuickFilterPresent:hD,getQuickFilter:gD,resetQuickFilter:pD},dependsOn:[yD]},FD={moduleName:"ExternalFilter",version:I,dependsOn:[Rl]},ED=class extends x{constructor(e,t,o){super(),this.id=e,this.parentCache=t,this.params=o,this.state="needsLoading",this.version=0,this.startRow=e*o.blockSize,this.endRow=this.startRow+o.blockSize}load(){this.state="loading",this.loadFromDatasource()}setStateWaitingToLoad(){this.version++,this.state="needsLoading"}pageLoadFailed(e){this.isRequestMostRecentAndLive(e)&&(this.state="failed"),this.dispatchLocalEvent({type:"loadComplete"})}pageLoaded(e,t,o){this.successCommon(e,{rowData:t,rowCount:o})}isRequestMostRecentAndLive(e){const t=e===this.version,o=this.isAlive();return t&&o}successCommon(e,t){this.dispatchLocalEvent({type:"loadComplete"}),this.isRequestMostRecentAndLive(e)&&(this.state="loaded",this.processServerResult(t))}postConstruct(){this.rowNodes=[];const{params:{blockSize:e,rowHeight:t},startRow:o,beans:s,rowNodes:i}=this;for(let n=0;n<e;n++){const r=o+n,a=new co(s);a.setRowHeight(t),a.uiLevel=0,a.setRowIndex(r),a.setRowTop(t*r),i.push(a)}}getBlockStateJson(){const{id:e,startRow:t,endRow:o,state:s}=this;return{id:""+e,state:{blockNumber:e,startRow:t,endRow:o,pageStatus:s}}}setDataAndId(e,t,o){L(t)?e.setDataAndId(t,o.toString()):e.setDataAndId(void 0,void 0)}loadFromDatasource(){const e=this.createLoadParams();if(we(this.params.datasource.getRows)){D(90);return}window.setTimeout(()=>{this.params.datasource.getRows(e)},0)}createLoadParams(){const{startRow:e,endRow:t,version:o,params:{sortModel:s,filterModel:i},gos:n}=this;return K(n,{startRow:e,endRow:t,successCallback:this.pageLoaded.bind(this,o),failCallback:this.pageLoadFailed.bind(this,o),sortModel:s,filterModel:i})}forEachNode(e,t,o){this.rowNodes.forEach((s,i)=>{this.startRow+i<o&&e(s,t.value++)})}getRow(e,t=!1){t||(this.lastAccessed=this.params.lastAccessedSequence.value++);const o=e-this.startRow;return this.rowNodes[o]}processServerResult(e){const{rowNodes:t,beans:o}=this;t.forEach((i,n)=>{const r=e.rowData?e.rowData[n]:void 0;!i.id&&i.alreadyRendered&&r&&(t[n]=new co(o),t[n].setRowIndex(i.rowIndex),t[n].setRowTop(i.rowTop),t[n].setRowHeight(i.rowHeight),i._destroy(!0)),this.setDataAndId(t[n],r,this.startRow+n)});const s=e.rowCount!=null&&e.rowCount>=0?e.rowCount:void 0;this.parentCache.pageLoaded(this,s)}destroy(){const e=this.rowNodes;for(let t=0,o=e.length;t<o;t++)e[t]._destroy(!1);e.length=0,super.destroy()}},xD=2,PD=class extends x{constructor(e){super(),this.params=e,this.lastRowIndexKnown=!1,this.blocks={},this.blockCount=0,this.rowCount=e.initialRowCount}getRow(e,t=!1){const o=Math.floor(e/this.params.blockSize);let s=this.blocks[o];if(!s){if(t)return;s=this.createBlock(o)}return s.getRow(e)}createBlock(e){const t=this.params,o=this.createBean(new ED(e,this,t));return this.blocks[o.id]=o,this.blockCount++,this.purgeBlocksIfNeeded(o),t.rowNodeBlockLoader.addBlock(o),o}refreshCache(){if(this.blockCount==0){this.purgeCache();return}for(const t of this.getBlocksInOrder())t.setStateWaitingToLoad();this.params.rowNodeBlockLoader.checkBlockToLoad()}destroy(){for(const e of this.getBlocksInOrder())this.destroyBlock(e);super.destroy()}getRowCount(){return this.rowCount}isLastRowIndexKnown(){return this.lastRowIndexKnown}pageLoaded(e,t){this.isAlive()&&(Oo(this.gos,`InfiniteCache - onPageLoaded: page = ${e.id}, lastRow = ${t}`),this.checkRowCount(e,t),this.onCacheUpdated())}purgeBlocksIfNeeded(e){const t=this.getBlocksInOrder().filter(r=>r!=e),o=(r,a)=>a.lastAccessed-r.lastAccessed;t.sort(o);const s=this.params.maxBlocksInCache>0,i=s?this.params.maxBlocksInCache-1:null,n=xD-1;t.forEach((r,a)=>{const l=r.state==="needsLoading"&&a>=n,c=s?a>=i:!1;if(l||c){if(this.isBlockCurrentlyDisplayed(r)||this.isBlockFocused(r))return;this.removeBlockFromCache(r)}})}isBlockFocused(e){const t=this.beans.focusSvc.getFocusCellToUseAfterRefresh();if(!t||t.rowPinned!=null)return!1;const{startRow:o,endRow:s}=e;return t.rowIndex>=o&&t.rowIndex<s}isBlockCurrentlyDisplayed(e){const{startRow:t,endRow:o}=e;return this.beans.rowRenderer.isRangeInRenderedViewport(t,o-1)}removeBlockFromCache(e){e&&this.destroyBlock(e)}checkRowCount(e,t){if(typeof t=="number"&&t>=0)this.rowCount=t,this.lastRowIndexKnown=!0;else if(!this.lastRowIndexKnown){const{blockSize:o,overflowSize:s}=this.params,n=(e.id+1)*o+s;this.rowCount<n&&(this.rowCount=n)}}setRowCount(e,t){this.rowCount=e,L(t)&&(this.lastRowIndexKnown=t),this.lastRowIndexKnown||this.rowCount%this.params.blockSize===0&&this.rowCount++,this.onCacheUpdated()}forEachNodeDeep(e){const t={value:0};for(const o of this.getBlocksInOrder())o.forEachNode(e,t,this.rowCount)}getBlocksInOrder(){const e=(o,s)=>o.id-s.id;return Object.values(this.blocks).sort(e)}destroyBlock(e){delete this.blocks[e.id],this.destroyBean(e),this.blockCount--,this.params.rowNodeBlockLoader.removeBlock(e)}onCacheUpdated(){this.isAlive()&&(this.destroyAllBlocksPastVirtualRowCount(),this.eventSvc.dispatchEvent({type:"storeUpdated"}))}destroyAllBlocksPastVirtualRowCount(){const e=[];for(const t of this.getBlocksInOrder())t.id*this.params.blockSize>=this.rowCount&&e.push(t);if(e.length>0)for(const t of e)this.destroyBlock(t)}purgeCache(){for(const e of this.getBlocksInOrder())this.removeBlockFromCache(e);this.lastRowIndexKnown=!1,this.rowCount===0&&(this.rowCount=this.params.initialRowCount),this.onCacheUpdated()}getRowNodesInRange(e,t){const o=[];let s=-1,i=!1;const n={value:0};let r=!1;for(const l of this.getBlocksInOrder())if(!r){if(i&&s+1!==l.id){r=!0;continue}s=l.id,l.forEachNode(c=>{const d=c===e||c===t;(i||d)&&o.push(c),d&&(i=!i)},n,this.rowCount)}return r||i?[]:o}},DD=class extends x{constructor(){super(...arguments),this.beanName="rowModel",this.rootNode=null,this.hierarchical=!1}getRowBounds(e){return{rowHeight:this.rowHeight,rowTop:this.rowHeight*e}}ensureRowHeightsValid(){return!1}postConstruct(){if(this.gos.get("rowModelType")!=="infinite")return;const e=this.beans,t=new co(e);this.rootNode=t,t.level=-1,this.rowHeight=Do(e),this.addEventListeners(),this.addDestroyFunc(()=>this.destroyCache())}start(){this.setDatasource(this.gos.get("datasource"))}destroy(){this.destroyDatasource(),super.destroy(),this.rootNode=null}destroyDatasource(){this.datasource&&(this.destroyBean(this.datasource),this.beans.rowRenderer.datasourceChanged(),this.datasource=null)}addEventListeners(){this.addManagedEventListeners({filterChanged:this.reset.bind(this),sortChanged:this.reset.bind(this),newColumnsLoaded:this.onColumnEverything.bind(this),storeUpdated:this.dispatchModelUpdatedEvent.bind(this)}),this.addManagedPropertyListener("datasource",()=>this.setDatasource(this.gos.get("datasource"))),this.addManagedPropertyListener("cacheBlockSize",()=>this.resetCache()),this.addManagedPropertyListener("rowHeight",()=>{this.rowHeight=Do(this.beans),this.cacheParams.rowHeight=this.rowHeight,this.updateRowHeights()})}onColumnEverything(){let e;this.cacheParams?e=!js(this.cacheParams.sortModel,this.beans.sortSvc?.getSortModel()??[]):e=!0,e&&this.reset()}getType(){return"infinite"}setDatasource(e){this.destroyDatasource(),this.datasource=e,e&&this.reset()}isEmpty(){return!this.infiniteCache}isRowsToRender(){return!!this.infiniteCache}getOverlayType(){return this.infiniteCache?.getRowCount()===0?this.beans.filterManager?.isAnyFilterPresent()?"noMatchingRows":"noRows":null}getNodesInRangeForSelection(e,t){return this.infiniteCache?.getRowNodesInRange(e,t)??[]}reset(){if(!this.datasource)return;vs(this.gos)!=null||this.beans.selectionSvc?.reset("rowDataChanged"),this.resetCache()}dispatchModelUpdatedEvent(){this.eventSvc.dispatchEvent({type:"modelUpdated",newPage:!1,newPageSize:!1,newData:!1,keepRenderedRows:!0,animate:!1})}resetCache(){this.destroyCache();const e=this.beans,{filterManager:t,sortSvc:o,rowNodeBlockLoader:s,eventSvc:i,gos:n}=e;this.cacheParams={datasource:this.datasource,filterModel:t?.getFilterModel()??{},sortModel:o?.getSortModel()??[],rowNodeBlockLoader:s,initialRowCount:n.get("infiniteInitialRowCount"),maxBlocksInCache:n.get("maxBlocksInCache"),rowHeight:Do(e),overflowSize:n.get("cacheOverflowSize"),blockSize:n.get("cacheBlockSize"),lastAccessedSequence:{value:0}},this.infiniteCache=this.createBean(new PD(this.cacheParams)),i.dispatchEventOnce({type:"rowCountReady"}),this.dispatchModelUpdatedEvent()}updateRowHeights(){this.forEachNode(e=>{e.setRowHeight(this.rowHeight),e.setRowTop(this.rowHeight*e.rowIndex)}),this.dispatchModelUpdatedEvent()}destroyCache(){this.infiniteCache=this.destroyBean(this.infiniteCache)}getRow(e){const t=this.infiniteCache;if(t&&!(e>=t.getRowCount()))return t.getRow(e)}getRowNode(e){let t;return this.forEachNode(o=>{o.id===e&&(t=o)}),t}forEachNode(e){this.infiniteCache?.forEachNodeDeep(e)}getTopLevelRowCount(){return this.getRowCount()}getTopLevelRowDisplayedIndex(e){return e}getRowIndexAtPixel(e){if(this.rowHeight!==0){const t=Math.floor(e/this.rowHeight),o=this.getRowCount()-1;return t>o?o:t}return 0}getRowCount(){return this.infiniteCache?this.infiniteCache.getRowCount():0}isRowPresent(e){return!!this.getRowNode(e.id)}refreshCache(){this.infiniteCache?.refreshCache()}purgeCache(){this.infiniteCache?.purgeCache()}isLastRowIndexKnown(){return this.infiniteCache?.isLastRowIndexKnown()??!1}setRowCount(e,t){this.infiniteCache?.setRowCount(e,t)}resetRowHeights(){}onRowHeightChanged(){}};function MD(e){En(e)?.refreshCache()}function TD(e){En(e)?.purgeCache()}function ID(e){return En(e)?.getRowCount()}var AD=class extends x{constructor(){super(...arguments),this.beanName="rowNodeBlockLoader",this.activeBlockLoadsCount=0,this.blocks=[],this.active=!0}postConstruct(){this.maxConcurrentRequests=Of(this.gos);const e=this.gos.get("blockLoadDebounceMillis");e&&e>0&&(this.checkBlockToLoadDebounce=xe(this,this.performCheckBlocksToLoad.bind(this),e))}addBlock(e){this.blocks.push(e),e.addEventListener("loadComplete",this.loadComplete.bind(this)),this.checkBlockToLoad()}removeBlock(e){At(this.blocks,e)}destroy(){super.destroy(),this.active=!1}loadComplete(){this.activeBlockLoadsCount--,this.checkBlockToLoad()}checkBlockToLoad(){this.checkBlockToLoadDebounce?this.checkBlockToLoadDebounce():this.performCheckBlocksToLoad()}performCheckBlocksToLoad(){if(!this.active)return;if(this.printCacheStatus(),this.maxConcurrentRequests!=null&&this.activeBlockLoadsCount>=this.maxConcurrentRequests){Oo(this.gos,"RowNodeBlockLoader - checkBlockToLoad: max loads exceeded");return}const e=this.maxConcurrentRequests!=null?this.maxConcurrentRequests-this.activeBlockLoadsCount:1,t=this.blocks.filter(o=>o.state==="needsLoading").slice(0,e);this.activeBlockLoadsCount+=t.length;for(const o of t)o.load();this.printCacheStatus()}getBlockState(){const e={};return this.blocks.forEach(t=>{const{id:o,state:s}=t.getBlockStateJson();e[o]=s}),e}printCacheStatus(){Oo(this.gos,`RowNodeBlockLoader - printCacheStatus: activePageLoadsCount = ${this.activeBlockLoadsCount}, blocks = ${JSON.stringify(this.getBlockState())}`)}},kD={moduleName:"InfiniteRowModelCore",version:I,rowModels:["infinite"],beans:[DD,AD]},LD={moduleName:"InfiniteRowModel",version:I,apiFunctions:{refreshInfiniteCache:MD,purgeInfiniteCache:TD,getInfiniteRowCount:ID},dependsOn:[kD,oF]},OD=class extends x{constructor(){super(...arguments),this.beanName="apiEventSvc",this.syncListeners=new Map,this.asyncListeners=new Map,this.syncGlobalListeners=new Set,this.globalListenerPairs=new Map}postConstruct(){this.wrapSvc=this.beans.frameworkOverrides.createGlobalEventListenerWrapper?.()}addListener(e,t){const o=this.wrapSvc?.wrap(e,t)??t,s=!Vi.has(e),i=s?this.asyncListeners:this.syncListeners;i.has(e)||i.set(e,new Set),i.get(e).add(o),this.eventSvc.addListener(e,o,s)}removeListener(e,t){const o=this.wrapSvc?.unwrap(e,t)??t,i=!!this.asyncListeners.get(e)?.delete(o);i||this.syncListeners.get(e)?.delete(o),this.eventSvc.removeListener(e,o,i)}addGlobalListener(e){const t=this.wrapSvc?.wrapGlobal(e)??e,o=(n,r)=>{Vi.has(n)&&t(n,r)},s=(n,r)=>{Vi.has(n)||t(n,r)};this.globalListenerPairs.set(e,{syncListener:o,asyncListener:s});const i=this.eventSvc;i.addGlobalListener(o,!1),i.addGlobalListener(s,!0)}removeGlobalListener(e){const{eventSvc:t,wrapSvc:o,globalListenerPairs:s}=this,i=o?.unwrapGlobal(e)??e;if(s.has(i)){const{syncListener:r,asyncListener:a}=s.get(i);t.removeGlobalListener(r,!1),t.removeGlobalListener(a,!0),s.delete(e)}else this.syncGlobalListeners.delete(i),t.removeGlobalListener(i,!1)}destroyEventListeners(e,t){e.forEach((o,s)=>{o.forEach(i=>this.eventSvc.removeListener(s,i,t)),o.clear()}),e.clear()}destroyGlobalListeners(e,t){for(const o of e)this.eventSvc.removeGlobalListener(o,t);e.clear()}destroy(){super.destroy(),this.destroyEventListeners(this.syncListeners,!1),this.destroyEventListeners(this.asyncListeners,!0),this.destroyGlobalListeners(this.syncGlobalListeners,!1);const{globalListenerPairs:e,eventSvc:t}=this;e.forEach(({syncListener:o,asyncListener:s})=>{t.removeGlobalListener(o,!1),t.removeGlobalListener(s,!0)}),e.clear()}};function GD(e,t,o){e.apiEventSvc?.addListener(t,o)}function HD(e,t,o){e.apiEventSvc?.removeListener(t,o)}function BD(e,t){e.apiEventSvc?.addGlobalListener(t)}function VD(e,t){e.apiEventSvc?.removeGlobalListener(t)}var ND={moduleName:"EventApi",version:I,apiFunctions:{addEventListener:GD,addGlobalListener:BD,removeEventListener:HD,removeGlobalListener:VD},beans:[OD]},WD=class extends x{constructor(){super(...arguments),this.beanName="localeSvc"}getLocaleTextFunc(){const e=this.gos,t=e.getCallback("getLocaleText");return t?nf(t):rf(e.get("localeText"))}},zD={moduleName:"Locale",version:I,beans:[WD]};function _D(e){return e.stateSvc?.getState()??{}}function UD(e,t,o){return e.stateSvc?.setState(t,o)}function ad(e){return e={...e},e.version||(e.version="32.1.0"),e.version==="32.1.0"&&(e=$D(e)),e.version=I,e}function $D(e){return e.cellSelection=KD(e,"rangeSelection"),e}function KD(e,t){if(e&&typeof e=="object")return e[t]}var qD=class extends x{constructor(){super(...arguments),this.beanName="stateSvc",this.updateRowGroupExpansionStateTimer=0,this.suppressEvents=!0,this.queuedUpdateSources=new Set,this.dispatchStateUpdateEventDebounced=xe(this,()=>this.dispatchQueuedStateUpdateEvents(),0),this.onRowGroupOpenedDebounced=xe(this,()=>this.updateGroupExpansionState(),0),this.onRowSelectedDebounced=xe(this,()=>{this.staleStateKeys.delete("rowSelection"),this.updateCachedState("rowSelection",this.getRowSelectionState())},0),this.staleStateKeys=new Set}postConstruct(){const{gos:e,ctrlsSvc:t,colDelayRenderSvc:o}=this.beans;this.isClientSideRowModel=Se(e);const s=ad(e.get("initialState")??{}),i=s.partialColumnState;delete s.partialColumnState,this.cachedState=s;const n=this.suppressEventsAndDispatchInitEvent.bind(this);t.whenReady(this,()=>n(()=>this.setupStateOnGridReady(s))),(s.columnOrder||s.columnVisibility||s.columnSizing||s.columnPinning||s.columnGroup)&&o?.hideColumns("columnState");const[r,a,l]=this.addManagedEventListeners({newColumnsLoaded:({source:c})=>{c==="gridInitializing"&&(r(),n(()=>{this.setupStateOnColumnsInitialised(s,!!i),o?.revealColumns("columnState")}))},rowCountReady:()=>{a?.(),n(()=>this.setupStateOnRowCountReady(s))},firstDataRendered:()=>{l?.(),n(()=>this.setupStateOnFirstDataRendered(s))}})}destroy(){super.destroy(),clearTimeout(this.updateRowGroupExpansionStateTimer),this.queuedUpdateSources.clear()}getState(){return this.staleStateKeys.size&&this.refreshStaleState(),this.cachedState}setState(e,t){const o=ad(e);delete o.partialColumnState,this.cachedState=o,this.startSuppressEvents();const s="api",i=t?new Set(t):void 0;this.setGridReadyState(o,s,i),this.setColumnsInitialisedState(o,s,!!i,i),this.setRowCountState(o,s,i),setTimeout(()=>{this.isAlive()&&this.setFirstDataRenderedState(o,s,i),this.stopSuppressEvents(s)})}setGridReadyState(e,t,o){t==="api"&&!o?.has("sideBar")&&this.beans.sideBar?.comp?.setState(e.sideBar),this.updateCachedState("sideBar",this.getSideBarState())}setupStateOnGridReady(e){this.setGridReadyState(e,"gridInitializing");const t=()=>this.updateCachedState("sideBar",this.getSideBarState());this.addManagedEventListeners({toolPanelVisibleChanged:t,sideBarUpdated:t})}updateColumnAndGroupState(){this.updateColumnState(["aggregation","columnOrder","columnPinning","columnSizing","columnVisibility","pivot","rowGroup","sort"]),this.updateCachedState("columnGroup",this.getColumnGroupState())}setColumnsInitialisedState(e,t,o,s){this.setColumnState(e,t,o,s),this.setColumnGroupState(e,t,s),this.updateColumnAndGroupState()}setupStateOnColumnsInitialised(e,t){this.setColumnsInitialisedState(e,"gridInitializing",t);const o=s=>()=>this.updateColumnState([s]);this.addManagedEventListeners({columnValueChanged:o("aggregation"),columnMoved:o("columnOrder"),columnPinned:o("columnPinning"),columnResized:o("columnSizing"),columnVisible:o("columnVisibility"),columnPivotChanged:o("pivot"),columnPivotModeChanged:o("pivot"),columnRowGroupChanged:o("rowGroup"),sortChanged:o("sort"),newColumnsLoaded:({source:s})=>{this.updateColumnAndGroupState(),s!=="gridInitializing"&&this.isClientSideRowModel&&this.onRowGroupOpenedDebounced()},columnGroupOpened:()=>this.updateCachedState("columnGroup",this.getColumnGroupState())})}setRowCountState(e,t,o){const{filter:s,rowGroupExpansion:i,ssrmRowGroupExpansion:n,rowSelection:r,pagination:a,rowPinning:l}=e,c=(u,h)=>!o?.has(u)&&(h||t==="api");c("filter",s)&&this.setFilterState(s),(c("rowGroupExpansion",i)||c("ssrmRowGroupExpansion",n))&&this.setRowGroupExpansionState(n,i,t),c("rowSelection",r)&&this.setRowSelectionState(r,t),c("pagination",a)&&this.setPaginationState(a,t),c("rowPinning",l)&&this.setRowPinningState(l);const d=this.updateCachedState.bind(this);d("filter",this.getFilterState()),this.updateGroupExpansionState(),d("rowSelection",this.getRowSelectionState()),d("pagination",this.getPaginationState())}setupStateOnRowCountReady(e){this.setRowCountState(e,"gridInitializing");const t=this.updateCachedState.bind(this),o=()=>{this.updateRowGroupExpansionStateTimer=0,this.updateGroupExpansionState()},s=()=>t("filter",this.getFilterState()),{gos:i,colFilter:n,selectableFilter:r}=this.beans;this.addManagedEventListeners({filterChanged:s,rowExpansionStateChanged:this.onRowGroupOpenedDebounced,expandOrCollapseAll:o,columnRowGroupChanged:o,rowDataUpdated:()=>{(i.get("groupDefaultExpanded")!==0||i.get("isGroupOpenByDefault"))&&(this.updateRowGroupExpansionStateTimer||(this.updateRowGroupExpansionStateTimer=setTimeout(o)))},selectionChanged:()=>{this.staleStateKeys.add("rowSelection"),this.onRowSelectedDebounced()},paginationChanged:a=>{(a.newPage||a.newPageSize)&&t("pagination",this.getPaginationState())},pinnedRowsChanged:()=>t("rowPinning",this.getRowPinningState())}),n&&this.addManagedListeners(n,{filterStateChanged:s}),r&&this.addManagedListeners(r,{selectedFilterChanged:s})}setFirstDataRenderedState(e,t,o){const{scroll:s,cellSelection:i,focusedCell:n,columnOrder:r}=e,a=(d,u)=>!o?.has(d)&&(u||t==="api");a("focusedCell",n)&&this.setFocusedCellState(n),a("cellSelection",i)&&this.setCellSelectionState(i),a("scroll",s)&&this.setScrollState(s),this.setColumnPivotState(!!r?.orderedColIds,t);const l=this.updateCachedState.bind(this);l("sideBar",this.getSideBarState()),l("focusedCell",this.getFocusedCellState());const c=this.getRangeSelectionState();l("rangeSelection",c),l("cellSelection",c),l("scroll",this.getScrollState())}setupStateOnFirstDataRendered(e){this.setFirstDataRenderedState(e,"gridInitializing");const t=this.updateCachedState.bind(this),o=()=>t("focusedCell",this.getFocusedCellState());this.addManagedEventListeners({cellFocused:o,cellFocusCleared:o,cellSelectionChanged:s=>{if(s.finished){const i=this.getRangeSelectionState();t("rangeSelection",i),t("cellSelection",i)}},bodyScrollEnd:()=>t("scroll",this.getScrollState())})}getColumnState(){const e=this.beans;return T1(cn(e),e.colModel.isPivotMode())}setColumnState(e,t,o,s){const{sort:i,rowGroup:n,aggregation:r,pivot:a,columnPinning:l,columnVisibility:c,columnSizing:d,columnOrder:u}=e;let h=!1;const g=(P,A)=>{const M=!s?.has(P)&&!!(A||t==="api");return h||(h=M),M},f={},m=P=>{let A=f[P];return A||(A={colId:P},f[P]=A,A)},C={},v=g("sort",i);v&&i?.sortModel.forEach(({colId:P,sort:A,type:M},J)=>{const T=m(P);T.sort=A,T.sortIndex=J,T.sortType=M}),(v||!o)&&(C.sort=null,C.sortIndex=null);const w=g("rowGroup",n);w&&n?.groupColIds.forEach((P,A)=>{const M=m(P);M.rowGroup=!0,M.rowGroupIndex=A}),(w||!o)&&(C.rowGroup=null,C.rowGroupIndex=null);const b=g("aggregation",r);b&&r?.aggregationModel.forEach(({colId:P,aggFunc:A})=>{m(P).aggFunc=A}),(b||!o)&&(C.aggFunc=null);const y=g("pivot",a);y&&(a?.pivotColIds.forEach((P,A)=>{const M=m(P);M.pivot=!0,M.pivotIndex=A}),this.gos.updateGridOptions({options:{pivotMode:!!a?.pivotMode},source:t})),(y||!o)&&(C.pivot=null,C.pivotIndex=null);const S=g("columnPinning",l);if(S){for(const P of l?.leftColIds??[])m(P).pinned="left";for(const P of l?.rightColIds??[])m(P).pinned="right"}(S||!o)&&(C.pinned=null);const F=g("columnVisibility",c);if(F)for(const P of c?.hiddenColIds??[])m(P).hide=!0;(F||!o)&&(C.hide=null);const E=g("columnSizing",d);if(E)for(const{colId:P,flex:A,width:M}of d?.columnSizingModel??[]){const J=m(P);J.flex=A??null,J.width=M}(E||!o)&&(C.flex=null);const G=u?.orderedColIds,k=!!G?.length&&!s?.has("columnOrder"),O=k?G.map(P=>m(P)):Object.values(f);(O.length||h)&&(this.columnStates=O,Ct(this.beans,{state:O,applyOrder:k,defaultState:C},t))}setColumnPivotState(e,t){const o=this.columnStates;this.columnStates=void 0;const s=this.columnGroupStates;this.columnGroupStates=void 0;const i=this.beans,{pivotResultCols:n,colGroupSvc:r}=i;if(n?.isPivotResultColsPresent()){if(o){const a=[];for(const l of o)n.getPivotResultCol(l.colId)&&a.push(l);Ct(i,{state:a,applyOrder:e},t)}s&&r?.setColumnGroupState(s,t)}}getColumnGroupState(){const e=this.beans.colGroupSvc;if(!e)return;const t=e.getColumnGroupState();return I1(t)}setColumnGroupState(e,t,o){const s=this.beans.colGroupSvc;if(!s||o?.has("columnGroup")||t!=="api"&&!Object.prototype.hasOwnProperty.call(e,"columnGroup"))return;const i=new Set(e.columnGroup?.openColumnGroupIds),r=s.getColumnGroupState().map(({groupId:a})=>{const l=i.has(a);return l&&i.delete(a),{groupId:a,open:l}});for(const a of i)r.push({groupId:a,open:!0});r.length&&(this.columnGroupStates=r),s.setColumnGroupState(r,t)}getFilterState(){const{filterManager:e,selectableFilter:t}=this.beans;let o=e?.getFilterModel();o&&Object.keys(o).length===0&&(o=void 0);const s=e?.getFilterState(),i=e?.getAdvFilterModel()??void 0,n=t?.getState();return o||i||s||n?{filterModel:o,columnFilterState:s,advancedFilterModel:i,selectableFilters:n}:void 0}setFilterState(e){const{filterManager:t,selectableFilter:o}=this.beans,{filterModel:s,columnFilterState:i,advancedFilterModel:n,selectableFilters:r}=e??{filterModel:null,columnFilterState:null,advancedFilterModel:null};r!==void 0&&o?.setState(r??{}),(s!==void 0||i!==void 0)&&t?.setFilterState(s??null,i??null,"columnFilter"),n!==void 0&&t?.setAdvFilterModel(n??null,"advancedFilter")}getRangeSelectionState(){const e=this.beans.rangeSvc?.getCellRanges().map(t=>{const{id:o,type:s,startRow:i,endRow:n,columns:r,startColumn:a}=t;return{id:o,type:s,startRow:i,endRow:n,colIds:r.map(l=>l.getColId()),startColId:a.getColId()}});return e?.length?{cellRanges:e}:void 0}setCellSelectionState(e){const{gos:t,rangeSvc:o,colModel:s,visibleCols:i}=this.beans;if(!ao(t)||!o)return;const n=[];for(const r of e?.cellRanges??[]){const a=[];for(const c of r.colIds){const d=s.getCol(c);d&&a.push(d)}if(!a.length)continue;let l=s.getCol(r.startColId);if(!l){const c=i.allCols,d=new Set(a);l=c.find(u=>d.has(u))}n.push({...r,columns:a,startColumn:l})}o.setCellRanges(n)}getScrollState(){if(!this.isClientSideRowModel)return;const e=this.beans.ctrlsSvc.getScrollFeature(),{left:t}=e?.getHScrollPosition()??{left:0},{top:o}=e?.getVScrollPosition()??{top:0};return o||t?{top:o,left:t}:void 0}setScrollState(e){if(!this.isClientSideRowModel)return;const{top:t,left:o}=e??{top:0,left:0},{frameworkOverrides:s,rowRenderer:i,animationFrameSvc:n,ctrlsSvc:r}=this.beans;s.wrapIncoming(()=>{r.get("center").setCenterViewportScrollLeft(o),r.getScrollFeature()?.setVerticalScrollPosition(t),i.redraw({afterScroll:!0}),n?.flushAllFrames()})}getSideBarState(){return this.beans.sideBar?.comp?.getState()}getFocusedCellState(){if(!this.isClientSideRowModel)return;const e=this.beans.focusSvc.getFocusedCell();if(e){const{column:t,rowIndex:o,rowPinned:s}=e;return{colId:t.getColId(),rowIndex:o,rowPinned:s}}}setFocusedCellState(e){if(!this.isClientSideRowModel)return;const{focusSvc:t,colModel:o}=this.beans;if(!e){t.clearFocusedCell();return}const{colId:s,rowIndex:i,rowPinned:n}=e;t.setFocusedCell({column:o.getCol(s),rowIndex:i,rowPinned:n,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0})}getPaginationState(){const{pagination:e,gos:t}=this.beans;if(!e)return;const o=e.getCurrentPage(),s=t.get("paginationAutoPageSize")?void 0:e.getPageSize();if(!(!o&&!s))return{page:o,pageSize:s}}setPaginationState(e,t){const{pagination:o,gos:s}=this.beans;if(!o)return;const{pageSize:i,page:n}=e??{page:0,pageSize:s.get("paginationPageSize")},r=t==="gridInitializing";i&&!s.get("paginationAutoPageSize")&&o.setPageSize(i,r?"initialState":"pageSizeSelector"),typeof n=="number"&&(r?o.setPage(n):o.goToPage(n))}getRowSelectionState(){const e=this.beans.selectionSvc;if(!e)return;const t=e.getSelectionState();return!t||!Array.isArray(t)&&(t.selectAll===!1||t.selectAllChildren===!1)&&!t?.toggledNodes?.length?void 0:t}setRowSelectionState(e,t){this.beans.selectionSvc?.setSelectionState(e,t,t==="api")}updateGroupExpansionState(){const{expansionSvc:e,gos:t}=this.beans,o=e?.getExpansionState(),s=t.get("ssrmExpandAllAffectsAllRows");this.updateCachedState("ssrmRowGroupExpansion",s?o:void 0),this.updateCachedState("rowGroupExpansion",s?void 0:o)}getRowPinningState(){return this.beans.pinnedRowModel?.getPinnedState()}setRowPinningState(e){const t=this.beans.pinnedRowModel;e?t?.setPinnedState(e):t?.reset()}setRowGroupExpansionState(e,t,o){const s=e??t??{expandedRowGroupIds:[],collapsedRowGroupIds:[]};this.beans.expansionSvc?.setExpansionState(s,o)}updateColumnState(e){const t=this.getColumnState();let o=!1;const s=this.cachedState;for(const i of Object.keys(t)){const n=t[i];js(n,s[i])||(o=!0)}this.cachedState={...s,...t},o&&this.dispatchStateUpdateEvent(e)}updateCachedState(e,t){const o=this.cachedState[e];this.setCachedStateValue(e,t),js(t,o)||this.dispatchStateUpdateEvent([e])}setCachedStateValue(e,t){this.cachedState={...this.cachedState,[e]:t}}refreshStaleState(){const e=this.staleStateKeys;for(const t of e)t==="rowSelection"&&this.setCachedStateValue(t,this.getRowSelectionState());e.clear()}dispatchStateUpdateEvent(e){if(!this.suppressEvents){for(const t of e)this.queuedUpdateSources.add(t);this.dispatchStateUpdateEventDebounced()}}dispatchQueuedStateUpdateEvents(){const e=this.queuedUpdateSources,t=Array.from(e);e.clear(),this.eventSvc.dispatchEvent({type:"stateUpdated",sources:t,state:this.cachedState})}startSuppressEvents(){this.suppressEvents=!0,this.beans.colAnimation?.setSuppressAnimation(!0)}stopSuppressEvents(e){setTimeout(()=>{this.suppressEvents=!1,this.queuedUpdateSources.clear(),this.isAlive()&&(this.beans.colAnimation?.setSuppressAnimation(!1),this.dispatchStateUpdateEvent([e]))})}suppressEventsAndDispatchInitEvent(e){this.startSuppressEvents(),e(),this.stopSuppressEvents("gridInitializing")}},jD={moduleName:"GridState",version:I,beans:[qD],apiFunctions:{getState:_D,setState:UD}};function YD(e){return e.rowModel.isLastRowIndexKnown()}function QD(e){return e.pagination?.getPageSize()??100}function ZD(e){return e.pagination?.getCurrentPage()??0}function JD(e){return e.pagination?.getTotalPages()??1}function XD(e){return e.pagination?e.pagination.getMasterRowCount():e.rowModel.getRowCount()}function eM(e){e.pagination?.goToNextPage()}function tM(e){e.pagination?.goToPreviousPage()}function oM(e){e.pagination?.goToFirstPage()}function sM(e){e.pagination?.goToLastPage()}function iM(e,t){e.pagination?.goToPage(t)}var nM=class extends x{constructor(){super(...arguments),this.beanName="paginationAutoPageSizeSvc"}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.centerRowsCtrl=e.center;const t=this.checkPageSize.bind(this);this.addManagedEventListeners({bodyHeightChanged:t,scrollVisibilityChanged:t}),this.addManagedPropertyListener("paginationAutoPageSize",this.onPaginationAutoSizeChanged.bind(this)),this.checkPageSize()})}notActive(){return!this.gos.get("paginationAutoPageSize")||this.centerRowsCtrl==null}onPaginationAutoSizeChanged(){this.notActive()?this.beans.pagination.unsetAutoCalculatedPageSize():this.checkPageSize()}checkPageSize(){if(this.notActive())return;const e=this.centerRowsCtrl.viewportSizeFeature.getBodyHeight();if(e>0){const t=this.beans,o=()=>{const s=Math.max(Do(t),1),i=Math.floor(e/s);t.pagination.setPageSize(i,"autoCalculated")};this.isBodyRendered?xe(this,o,50)():(o(),this.isBodyRendered=!0)}else this.isBodyRendered=!1}};function rM(e,t){if(typeof e!="number")return"";const o=t(),s=o("thousandSeparator",","),i=o("decimalSeparator",".");return e.toString().replace(".",i).replace(/(\d)(?=(\d{3})+(?!\d))/g,`$1${s}`)}var ks="paginationPageSizeSelector",aM={tag:"span",cls:"ag-paging-page-size"},lM=class extends ye{constructor(){super(aM),this.hasEmptyOption=!1,this.handlePageSizeItemSelected=()=>{if(!this.selectPageSizeComp)return;const e=this.selectPageSizeComp.getValue();if(!e)return;const t=Number(e);isNaN(t)||t<1||t===this.pagination.getPageSize()||(this.pagination.setPageSize(t,"pageSizeSelector"),this.hasEmptyOption&&this.toggleSelectDisplay(!0),this.selectPageSizeComp.getFocusableElement().focus())}}wireBeans(e){this.pagination=e.pagination}postConstruct(){this.addManagedPropertyListener(ks,()=>{this.onPageSizeSelectorValuesChange()}),this.addManagedEventListeners({paginationChanged:e=>this.handlePaginationChanged(e)})}handlePaginationChanged(e){if(!this.selectPageSizeComp||!e?.newPageSize)return;const t=this.pagination.getPageSize();this.getPageSizeSelectorValues().includes(t)?this.selectPageSizeComp.setValue(t.toString()):this.hasEmptyOption?this.selectPageSizeComp.setValue(""):this.toggleSelectDisplay(!0)}toggleSelectDisplay(e){this.selectPageSizeComp&&!e&&this.reset(),e&&(this.reloadPageSizesSelector(),this.selectPageSizeComp)}reset(){Xe(this.getGui()),this.selectPageSizeComp&&(this.selectPageSizeComp=this.destroyBean(this.selectPageSizeComp))}onPageSizeSelectorValuesChange(){this.selectPageSizeComp&&this.shouldShowPageSizeSelector()&&this.reloadPageSizesSelector()}shouldShowPageSizeSelector(){return this.gos.get("pagination")&&!this.gos.get("suppressPaginationPanel")&&!this.gos.get("paginationAutoPageSize")&&this.gos.get(ks)!==!1}reloadPageSizesSelector(){const e=this.getPageSizeSelectorValues(),t=this.pagination.getPageSize(),o=!t||!e.includes(t);if(o){const i=this.gos.exists("paginationPageSize"),n=this.gos.get(ks)!==!0;D(94,{pageSizeSet:i,pageSizesSet:n,pageSizeOptions:e,paginationPageSizeOption:t}),n||D(95,{paginationPageSizeOption:t,paginationPageSizeSelector:ks}),e.unshift("")}const s=String(o?"":t);this.selectPageSizeComp?(ho(this.pageSizeOptions,e)||(this.selectPageSizeComp.clearOptions().addOptions(this.createPageSizeSelectOptions(e)),this.pageSizeOptions=e),this.selectPageSizeComp.setValue(s,!0)):this.createPageSizeSelectorComp(e,s),this.hasEmptyOption=o}createPageSizeSelectOptions(e){return e.map(t=>({value:String(t)}))}createPageSizeSelectorComp(e,t){const o=this.getLocaleTextFunc(),s=o("pageSizeSelectorLabel","Page Size:"),i=o("ariaPageSizeSelectorLabel","Page Size");this.selectPageSizeComp=this.createManagedBean(new nl).addOptions(this.createPageSizeSelectOptions(e)).setValue(t).setAriaLabel(i).setLabel(s).onValueChange(()=>this.handlePageSizeItemSelected()),this.appendChild(this.selectPageSizeComp)}getPageSizeSelectorValues(){const e=[20,50,100],t=this.gos.get(ks);return!Array.isArray(t)||!t?.length?e:[...t].sort((o,s)=>o-s)}destroy(){this.toggleSelectDisplay(!1),super.destroy()}},cM={selector:"AG-PAGE-SIZE-SELECTOR",component:lM},dM=".ag-paging-panel{align-items:center;border-top:var(--ag-footer-row-border);display:flex;flex-wrap:wrap-reverse;gap:calc(var(--ag-spacing)*4);justify-content:flex-end;min-height:var(--ag-pagination-panel-height);padding:calc(var(--ag-spacing)*.5) var(--ag-cell-horizontal-padding);row-gap:calc(var(--ag-spacing)*.5);@container (width < 600px){justify-content:center}}:where(.ag-paging-page-size) .ag-wrapper{min-width:50px}.ag-paging-page-summary-panel,.ag-paging-row-summary-panel{margin:calc(var(--ag-spacing)*.5)}.ag-paging-page-summary-panel{align-items:center;display:flex;gap:var(--ag-cell-widget-spacing);.ag-disabled &{pointer-events:none}}.ag-paging-button{cursor:pointer;position:relative;&.ag-disabled{cursor:default;opacity:.5}}.ag-paging-number,.ag-paging-row-summary-panel-number{font-weight:500}.ag-paging-description{line-height:0}",uM=class extends kv{constructor(){super(),this.btFirst=W,this.btPrevious=W,this.btNext=W,this.btLast=W,this.lbRecordCount=W,this.lbFirstRowOnPage=W,this.lbLastRowOnPage=W,this.lbCurrent=W,this.lbTotal=W,this.pageSizeComp=W,this.previousAndFirstButtonsDisabled=!1,this.nextButtonDisabled=!1,this.lastButtonDisabled=!1,this.areListenersSetup=!1,this.allowFocusInnerElement=!1,this.registerCSS(dM)}wireBeans(e){this.rowModel=e.rowModel,this.pagination=e.pagination,this.ariaAnnounce=e.ariaAnnounce}postConstruct(){const e=this.gos.get("enableRtl");this.setTemplate(this.getTemplate(),[cM]);const{btFirst:t,btPrevious:o,btNext:s,btLast:i}=this;this.activateTabIndex([t,o,s,i]),t.insertAdjacentElement("afterbegin",Je(e?"last":"first",this.beans)),o.insertAdjacentElement("afterbegin",Je(e?"next":"previous",this.beans)),s.insertAdjacentElement("afterbegin",Je(e?"previous":"next",this.beans)),i.insertAdjacentElement("afterbegin",Je(e?"first":"last",this.beans)),this.addManagedPropertyListener("pagination",this.onPaginationChanged.bind(this)),this.addManagedPropertyListener("suppressPaginationPanel",this.onPaginationChanged.bind(this)),this.addManagedPropertyListeners(["paginationPageSizeSelector","paginationAutoPageSize","suppressPaginationPanel"],()=>this.onPageSizeRelatedOptionsChange()),this.pageSizeComp.toggleSelectDisplay(this.pageSizeComp.shouldShowPageSizeSelector()),this.initialiseTabGuard({onTabKeyDown:()=>{},focusInnerElement:n=>this.allowFocusInnerElement?this.tabGuardFeature.getTabGuardCtrl().focusInnerElement(n):HC(this.beans,n),forceFocusOutWhenTabGuardsAreEmpty:!0}),this.onPaginationChanged()}setAllowFocus(e){this.allowFocusInnerElement=e}getFocusableContainerName(){return"pagination"}onPaginationChanged(){const t=this.gos.get("pagination")&&!this.gos.get("suppressPaginationPanel");this.setDisplayed(t),t&&(this.setupListeners(),this.enableOrDisableButtons(),this.updateLabels(),this.onPageSizeRelatedOptionsChange())}onPageSizeRelatedOptionsChange(){this.pageSizeComp.toggleSelectDisplay(this.pageSizeComp.shouldShowPageSizeSelector())}setupListeners(){if(!this.areListenersSetup){this.addManagedEventListeners({paginationChanged:this.onPaginationChanged.bind(this)});for(const e of[{el:this.btFirst,fn:this.onBtFirst.bind(this)},{el:this.btPrevious,fn:this.onBtPrevious.bind(this)},{el:this.btNext,fn:this.onBtNext.bind(this)},{el:this.btLast,fn:this.onBtLast.bind(this)}]){const{el:t,fn:o}=e;this.addManagedListeners(t,{click:o,keydown:s=>{(s.key===R.ENTER||s.key===R.SPACE)&&(s.preventDefault(),o())}})}GC(this.beans,this,this.getGui()),this.areListenersSetup=!0}}onBtFirst(){this.previousAndFirstButtonsDisabled||this.pagination.goToFirstPage()}formatNumber(e){const t=this.gos.getCallback("paginationNumberFormatter");return t?t({value:e}):rM(e,this.getLocaleTextFunc.bind(this))}getTemplate(){const e=this.getLocaleTextFunc(),t=`ag-${this.getCompId()}`;return{tag:"div",cls:"ag-paging-panel ag-unselectable",attrs:{id:`${t}`},children:[{tag:"ag-page-size-selector",ref:"pageSizeComp"},{tag:"span",cls:"ag-paging-row-summary-panel",children:[{tag:"span",ref:"lbFirstRowOnPage",cls:"ag-paging-row-summary-panel-number",attrs:{id:`${t}-first-row`}},{tag:"span",attrs:{id:`${t}-to`},children:e("to","to")},{tag:"span",ref:"lbLastRowOnPage",cls:"ag-paging-row-summary-panel-number",attrs:{id:`${t}-last-row`}},{tag:"span",attrs:{id:`${t}-of`},children:e("of","of")},{tag:"span",ref:"lbRecordCount",cls:"ag-paging-row-summary-panel-number",attrs:{id:`${t}-row-count`}}]},{tag:"span",cls:"ag-paging-page-summary-panel",role:"presentation",children:[{tag:"div",ref:"btFirst",cls:"ag-button ag-paging-button",role:"button",attrs:{"aria-label":e("firstPage","First Page")}},{tag:"div",ref:"btPrevious",cls:"ag-button ag-paging-button",role:"button",attrs:{"aria-label":e("previousPage","Previous Page")}},{tag:"span",cls:"ag-paging-description",children:[{tag:"span",attrs:{id:`${t}-start-page`},children:e("page","Page")},{tag:"span",ref:"lbCurrent",cls:"ag-paging-number",attrs:{id:`${t}-start-page-number`}},{tag:"span",attrs:{id:`${t}-of-page`},children:e("of","of")},{tag:"span",ref:"lbTotal",cls:"ag-paging-number",attrs:{id:`${t}-of-page-number`}}]},{tag:"div",ref:"btNext",cls:"ag-button ag-paging-button",role:"button",attrs:{"aria-label":e("nextPage","Next Page")}},{tag:"div",ref:"btLast",cls:"ag-button ag-paging-button",role:"button",attrs:{"aria-label":e("lastPage","Last Page")}}]}]}}onBtNext(){this.nextButtonDisabled||this.pagination.goToNextPage()}onBtPrevious(){this.previousAndFirstButtonsDisabled||this.pagination.goToPreviousPage()}onBtLast(){this.lastButtonDisabled||this.pagination.goToLastPage()}enableOrDisableButtons(){const e=this.pagination.getCurrentPage(),t=this.rowModel.isLastRowIndexKnown(),o=this.pagination.getTotalPages();this.previousAndFirstButtonsDisabled=e===0,this.toggleButtonDisabled(this.btFirst,this.previousAndFirstButtonsDisabled),this.toggleButtonDisabled(this.btPrevious,this.previousAndFirstButtonsDisabled);const s=this.isZeroPagesToDisplay(),i=e===o-1;this.nextButtonDisabled=i||s,this.lastButtonDisabled=!t||s||e===o-1,this.toggleButtonDisabled(this.btNext,this.nextButtonDisabled),this.toggleButtonDisabled(this.btLast,this.lastButtonDisabled)}toggleButtonDisabled(e,t){kp(e,t),e.classList.toggle("ag-disabled",t)}isZeroPagesToDisplay(){const e=this.rowModel.isLastRowIndexKnown(),t=this.pagination.getTotalPages();return e&&t===0}updateLabels(){const e=this.rowModel.isLastRowIndexKnown(),t=this.pagination.getTotalPages(),o=this.pagination.getMasterRowCount(),s=e?o:null,i=this.pagination.getCurrentPage(),n=this.pagination.getPageSize();let r,a;this.isZeroPagesToDisplay()?r=a=0:(r=n*i+1,a=r+n-1,e&&a>s&&(a=s));const l=r+n-1,c=!e&&o<l,d=this.formatNumber(r);this.lbFirstRowOnPage.textContent=d;let u;const h=this.getLocaleTextFunc();c?u=h("pageLastRowUnknown","?"):u=this.formatNumber(a),this.lbLastRowOnPage.textContent=u;const f=t>0?i+1:0,m=this.formatNumber(f);this.lbCurrent.textContent=m;let C,v;if(e)C=this.formatNumber(t),v=this.formatNumber(s);else{const w=h("more","more");C=w,v=w}this.lbTotal.textContent=C,this.lbRecordCount.textContent=v,this.announceAriaStatus(d,u,v,m,C)}announceAriaStatus(e,t,o,s,i){const n=this.getLocaleTextFunc(),r=n("page","Page"),a=n("to","to"),l=n("of","of"),c=`${e} ${a} ${t} ${l} ${o}`,d=`${r} ${s} ${l} ${i}`;c!==this.ariaRowStatus&&(this.ariaRowStatus=c,this.ariaAnnounce?.announceValue(c,"paginationRow")),d!==this.ariaPageStatus&&(this.ariaPageStatus=d,this.ariaAnnounce?.announceValue(d,"paginationPage"))}},hM={selector:"AG-PAGINATION",component:uM},gM=100,pM=class extends x{constructor(){super(...arguments),this.beanName="pagination",this.currentPage=0,this.topDisplayedRowIndex=0,this.bottomDisplayedRowIndex=0,this.masterRowCount=0}postConstruct(){const e=this.gos;this.active=e.get("pagination"),this.pageSizeFromGridOptions=e.get("paginationPageSize"),this.paginateChildRows=this.isPaginateChildRows(),this.addManagedPropertyListener("pagination",this.onPaginationGridOptionChanged.bind(this)),this.addManagedPropertyListener("paginationPageSize",this.onPageSizeGridOptionChanged.bind(this))}getPaginationSelector(){return hM}isPaginateChildRows(){const e=this.gos;return e.get("groupHideParentOfSingleChild")||e.get("groupRemoveSingleChildren")||e.get("groupRemoveLowestSingleChildren")?!0:e.get("paginateChildRows")}onPaginationGridOptionChanged(){this.active=this.gos.get("pagination"),this.calculatePages(),this.dispatchPaginationChangedEvent({keepRenderedRows:!0})}onPageSizeGridOptionChanged(){this.setPageSize(this.gos.get("paginationPageSize"),"gridOptions")}goToPage(e){const t=this.currentPage;if(!this.active||t===e||typeof t!="number")return;const{editSvc:o}=this.beans;o?.isEditing()&&(o.isBatchEditing()?o.cleanupEditors():o.stopEditing(void 0,{source:"api"})),this.currentPage=e,this.calculatePages(),this.dispatchPaginationChangedEvent({newPage:!0})}goToPageWithIndex(e){if(!this.active)return;let t=e;this.paginateChildRows||(t=this.beans.rowModel.getTopLevelIndexFromDisplayedIndex?.(e)??e),this.goToPage(Math.floor(t/this.pageSize))}isRowInPage(e){return this.active?e>=this.topDisplayedRowIndex&&e<=this.bottomDisplayedRowIndex:!0}getCurrentPage(){return this.currentPage}goToNextPage(){this.goToPage(this.currentPage+1)}goToPreviousPage(){this.goToPage(this.currentPage-1)}goToFirstPage(){this.goToPage(0)}goToLastPage(){const e=this.beans.rowModel.getRowCount(),t=Math.floor(e/this.pageSize);this.goToPage(t)}getPageSize(){return this.pageSize}getTotalPages(){return this.totalPages}setPage(e){this.currentPage=e}get pageSize(){return L(this.pageSizeAutoCalculated)&&this.gos.get("paginationAutoPageSize")?this.pageSizeAutoCalculated:L(this.pageSizeFromPageSizeSelector)?this.pageSizeFromPageSizeSelector:L(this.pageSizeFromInitialState)?this.pageSizeFromInitialState:L(this.pageSizeFromGridOptions)?this.pageSizeFromGridOptions:gM}calculatePages(){this.active?this.paginateChildRows?this.calculatePagesAllRows():this.calculatePagesMasterRowsOnly():this.calculatedPagesNotActive(),this.beans.pageBounds.calculateBounds(this.topDisplayedRowIndex,this.bottomDisplayedRowIndex)}unsetAutoCalculatedPageSize(){if(this.pageSizeAutoCalculated===void 0)return;const e=this.pageSizeAutoCalculated;this.pageSizeAutoCalculated=void 0,this.pageSize!==e&&(this.calculatePages(),this.dispatchPaginationChangedEvent({newPageSize:!0}))}setPageSize(e,t){const o=this.pageSize;switch(t){case"autoCalculated":this.pageSizeAutoCalculated=e;break;case"pageSizeSelector":this.pageSizeFromPageSizeSelector=e,this.currentPage!==0&&this.goToFirstPage();break;case"initialState":this.pageSizeFromInitialState=e;break;case"gridOptions":this.pageSizeFromGridOptions=e,this.pageSizeFromInitialState=void 0,this.pageSizeFromPageSizeSelector=void 0,this.currentPage!==0&&this.goToFirstPage();break}o!==this.pageSize&&(this.calculatePages(),this.dispatchPaginationChangedEvent({newPageSize:!0,keepRenderedRows:!0}))}setZeroRows(){this.masterRowCount=0,this.topDisplayedRowIndex=0,this.bottomDisplayedRowIndex=-1,this.currentPage=0,this.totalPages=0}adjustCurrentPageIfInvalid(){const e=this.totalPages;this.currentPage>=e&&(this.currentPage=e-1);const t=this.currentPage;(!isFinite(t)||isNaN(t)||t<0)&&(this.currentPage=0)}calculatePagesMasterRowsOnly(){const e=this.beans.rowModel,t=e.getTopLevelRowCount();if(this.masterRowCount=t,t<=0){this.setZeroRows();return}const o=this.pageSize,s=t-1;this.totalPages=Math.floor(s/o)+1,this.adjustCurrentPageIfInvalid();const i=this.currentPage,n=o*i;let r=o*(i+1)-1;if(r>s&&(r=s),this.topDisplayedRowIndex=e.getTopLevelRowDisplayedIndex(n),r===s)this.bottomDisplayedRowIndex=e.getRowCount()-1;else{const a=e.getTopLevelRowDisplayedIndex(r+1);this.bottomDisplayedRowIndex=a-1}}getMasterRowCount(){return this.masterRowCount}calculatePagesAllRows(){const e=this.beans.rowModel.getRowCount();if(this.masterRowCount=e,e===0){this.setZeroRows();return}const{pageSize:t,currentPage:o}=this,s=e-1;this.totalPages=Math.floor(s/t)+1,this.adjustCurrentPageIfInvalid(),this.topDisplayedRowIndex=t*o,this.bottomDisplayedRowIndex=t*(o+1)-1,this.bottomDisplayedRowIndex>s&&(this.bottomDisplayedRowIndex=s)}calculatedPagesNotActive(){this.setPageSize(void 0,"autoCalculated"),this.totalPages=1,this.currentPage=0,this.topDisplayedRowIndex=0,this.bottomDisplayedRowIndex=this.beans.rowModel.getRowCount()-1}dispatchPaginationChangedEvent(e){const{keepRenderedRows:t=!1,newPage:o=!1,newPageSize:s=!1}=e;this.eventSvc.dispatchEvent({type:"paginationChanged",animate:!1,newData:!1,newPage:o,newPageSize:s,keepRenderedRows:t})}},fM={moduleName:"Pagination",version:I,beans:[pM,nM],icons:{first:"first",previous:"previous",next:"next",last:"last"},apiFunctions:{paginationIsLastPageFound:YD,paginationGetPageSize:QD,paginationGetCurrentPage:ZD,paginationGetTotalPages:JD,paginationGetRowCount:XD,paginationGoToNextPage:eM,paginationGoToPreviousPage:tM,paginationGoToFirstPage:oM,paginationGoToLastPage:sM,paginationGoToPage:iM},dependsOn:[Mn]},mM=".ag-row-pinned-source{background-color:var(--ag-pinned-source-row-background-color);color:var(--ag-pinned-source-row-text-color);font-weight:var(--ag-pinned-source-row-font-weight)}.ag-row-pinned-manual{background-color:var(--ag-pinned-row-background-color);color:var(--ag-pinned-row-text-color);font-weight:var(--ag-pinned-row-font-weight)}";function CM(e){return e.pinnedRowModel?.getPinnedTopRowCount()??0}function vM(e){return e.pinnedRowModel?.getPinnedBottomRowCount()??0}function wM(e,t){return e.pinnedRowModel?.getPinnedTopRow(t)}function bM(e,t){return e.pinnedRowModel?.getPinnedBottomRow(t)}function SM(e,t,o){return e.pinnedRowModel?.forEachPinnedRow(t,o)}var yM={moduleName:"PinnedRow",version:I,beans:[SC],css:[mM],apiFunctions:{getPinnedTopRowCount:CM,getPinnedBottomRowCount:vM,getPinnedTopRow:wM,getPinnedBottomRow:bM,forEachPinnedRow:SM},icons:{rowPin:"pin",rowPinTop:"pinned-top",rowPinBottom:"pinned-bottom",rowUnpin:"un-pin"}},RM="↑",FM="↓",EM={tag:"span",children:[{tag:"span",ref:"eDelta",cls:"ag-value-change-delta"},{tag:"span",ref:"eValue",cls:"ag-value-change-value"}]},xM=class extends ye{constructor(){super(EM),this.eValue=W,this.eDelta=W,this.refreshCount=0}init(e){this.refresh(e,!0)}showDelta(e,t){const o=Math.abs(t),s=e.formatValue(o),i=L(s)?s:o,n=t>=0,r=this.eDelta;n?r.textContent=RM+i:r.textContent=FM+i,r.classList.toggle("ag-value-change-delta-up",n),r.classList.toggle("ag-value-change-delta-down",!n)}setTimerToRemoveDelta(){this.refreshCount++;const e=this.refreshCount;this.beans.frameworkOverrides.wrapIncoming(()=>{window.setTimeout(()=>{e===this.refreshCount&&this.hideDeltaValue()},2e3)})}hideDeltaValue(){this.eValue.classList.remove("ag-value-change-value-highlight"),Xe(this.eDelta)}refresh(e,t=!1){const{value:o,valueFormatted:s}=e,{eValue:i,lastValue:n,beans:r}=this;if(o===n||(L(s)?i.textContent=s:L(o)?i.textContent=o:Xe(i),r.filterManager?.isSuppressFlashingCellsBecauseFiltering()))return!1;const a=o&&typeof o=="object"&&"toNumber"in o?o.toNumber():o,l=n&&typeof n=="object"&&"toNumber"in n?n.toNumber():n;if(a===l)return!1;if(typeof a=="number"&&typeof l=="number"){const c=a-l;this.showDelta(e,c)}return n&&i.classList.add("ag-value-change-value-highlight"),t||this.setTimerToRemoveDelta(),this.lastValue=o,!0}},PM=".ag-value-slide-out{opacity:1}:where(.ag-ltr) .ag-value-slide-out{margin-right:5px;transition:opacity 3s,margin-right 3s}:where(.ag-rtl) .ag-value-slide-out{margin-left:5px;transition:opacity 3s,margin-left 3s}:where(.ag-ltr,.ag-rtl) .ag-value-slide-out{transition-timing-function:linear}.ag-value-slide-out-end{opacity:0}:where(.ag-ltr) .ag-value-slide-out-end{margin-right:10px}:where(.ag-rtl) .ag-value-slide-out-end{margin-left:10px}",DM={tag:"span",children:[{tag:"span",ref:"eCurrent",cls:"ag-value-slide-current"}]},MM=class extends ye{constructor(){super(DM),this.eCurrent=W,this.refreshCount=0,this.registerCSS(PM)}init(e){this.refresh(e,!0)}addSlideAnimation(){this.refreshCount++;const e=this.refreshCount;this.ePrevious?.remove();const{beans:t,eCurrent:o}=this,s=it({tag:"span",cls:"ag-value-slide-previous ag-value-slide-out"});this.ePrevious=s,s.textContent=o.textContent,this.getGui().insertBefore(s,o),t.frameworkOverrides.wrapIncoming(()=>{window.setTimeout(()=>{e===this.refreshCount&&this.ePrevious.classList.add("ag-value-slide-out-end")},50),window.setTimeout(()=>{e===this.refreshCount&&(this.ePrevious?.remove(),this.ePrevious=null)},3e3)})}refresh(e,t=!1){let o=e.value;if(we(o)&&(o=""),o===this.lastValue||this.beans.filterManager?.isSuppressFlashingCellsBecauseFiltering())return!1;t||this.addSlideAnimation(),this.lastValue=o;const s=this.eCurrent;return L(e.valueFormatted)?s.textContent=e.valueFormatted:L(e.value)?s.textContent=o:Xe(s),!0}},TM=class extends x{constructor(){super(...arguments),this.beanName="cellFlashSvc",this.nextAnimationTime=null,this.nextAnimationCycle=null,this.animations={highlight:new Map,"data-changed":new Map}}animateCell(e,t,o=this.beans.gos.get("cellFlashDuration"),s=this.beans.gos.get("cellFadeDuration")){const i=this.animations[t];i.delete(e);const n=Date.now(),r=n+o,a=n+o+s,l={phase:"flash",flashEndTime:r,fadeEndTime:a};i.set(e,l);const c=`ag-cell-${t}`,d=`${c}-animation`,{comp:u,eGui:{style:h}}=e;u.toggleCss(c,!0),u.toggleCss(d,!1),h.removeProperty("transition"),h.removeProperty("transition-delay"),this.nextAnimationTime&&r+15<this.nextAnimationTime&&(clearTimeout(this.nextAnimationCycle),this.nextAnimationCycle=null,this.nextAnimationTime=null),this.nextAnimationCycle||(this.beans.frameworkOverrides.wrapIncoming(()=>{this.nextAnimationCycle=setTimeout(this.advanceAnimations.bind(this),o)}),this.nextAnimationTime=r)}advanceAnimations(){const e=Date.now();let t=null;for(const o of Object.keys(this.animations)){const s=this.animations[o],i=`ag-cell-${o}`,n=`${i}-animation`;for(const[r,a]of s){if(!r.isAlive()||!r.comp){s.delete(r);continue}const{phase:l,flashEndTime:c,fadeEndTime:d}=a,u=l==="flash"?c:d;if(!(e+15>=u)){t=Math.min(u,t??1/0);continue}const{comp:g,eGui:{style:f}}=r;switch(l){case"flash":g.toggleCss(i,!1),g.toggleCss(n,!0),f.transition=`background-color ${d-c}ms`,f.transitionDelay=`${c-e}ms`,t=Math.min(d,t??1/0),a.phase="fade";break;case"fade":g.toggleCss(i,!1),g.toggleCss(n,!1),f.removeProperty("transition"),f.removeProperty("transition-delay"),s.delete(r);break}}}t==null?(this.nextAnimationTime=null,this.nextAnimationCycle=null):t&&(this.nextAnimationCycle=setTimeout(this.advanceAnimations.bind(this),t-e),this.nextAnimationTime=t)}onFlashCells(e,t){if(!e.comp)return;const o=IC(e.cellPosition);t.cells[o]&&this.animateCell(e,"highlight")}flashCell(e,t){this.animateCell(e,"data-changed",t?.flashDuration,t?.fadeDuration)}destroy(){for(const e of Object.keys(this.animations))this.animations[e].clear()}};function IM(e,t={}){const{cellFlashSvc:o}=e;o&&e.frameworkOverrides.wrapIncoming(()=>{for(const s of e.rowRenderer.getCellCtrls(t.rowNodes,t.columns))o.flashCell(s,t)})}var AM={moduleName:"HighlightChanges",version:I,beans:[TM],userComponents:{agAnimateShowChangeCellRenderer:xM,agAnimateSlideCellRenderer:MM},apiFunctions:{flashCells:IM}};function kM(e,t,o){if(!t)return;const s=e.ctrlsSvc.getGridBodyCtrl().eGridBody,i=`aria-${t}`;o===null?s.removeAttribute(i):s.setAttribute(i,o)}function LM(e,t={}){e.frameworkOverrides.wrapIncoming(()=>e.rowRenderer.refreshCells(t))}function OM(e){e.frameworkOverrides.wrapIncoming(()=>{for(const t of e.ctrlsSvc.getHeaderRowContainerCtrls())t.refresh()})}function GM(e){return e.animationFrameSvc?.isQueueEmpty()??!0}function HM(e){e.animationFrameSvc?.flushAllFrames()}function BM(e){return{rowHeight:Do(e),headerHeight:ci(e)}}function VM(e,t={}){const o=[];for(const n of e.rowRenderer.getCellCtrls(t.rowNodes,t.columns)){const r=n.getCellRenderer();r!=null&&o.push(No(r))}if(t.columns?.length)return o;const s=[],i=qr(t.rowNodes);for(const n of e.rowRenderer.getAllRowCtrls()){if(i&&!jr(n.rowNode,i)||!n.isFullWidth())continue;const r=n.getFullWidthCellRenderers();for(let a=0;a<r.length;a++){const l=r[a];l!=null&&s.push(No(l))}}return[...s,...o]}var NM={moduleName:"RenderApi",version:I,apiFunctions:{setGridAriaProperty:kM,refreshCells:LM,refreshHeader:OM,isAnimationFrameQueueEmpty:GM,flushAllAnimationFrames:HM,getSizesForCurrentTheme:BM,getCellRendererInstances:VM}},WM=class extends x{constructor(){super(...arguments),this.beanName="rowAutoHeight",this.wasEverActive=!1,this._debouncedCalculateRowHeights=xe(this,this.calculateRowHeights.bind(this),1)}requestCheckAutoHeight(){this.wasEverActive&&this._debouncedCalculateRowHeights()}calculateRowHeights(){const{visibleCols:e,rowModel:t,rowSpanSvc:o,pinnedRowModel:s}=this.beans,i=e.autoHeightCols;let n=!1;const r=a=>{const l=a.__autoHeights;let c=ro(this.beans,a).height;for(const d of i){let u=l?.[d.getColId()];const h=o?.getCellSpan(d,a);if(h){if(h.getLastNode()!==a)continue;if(u=o?.getCellSpan(d,a)?.getLastNodeAutoHeight(),!u)return}if(u==null){if(this.colSpanSkipCell(d,a))continue;return}c=Math.max(u,c)}c!==a.rowHeight&&(a.setRowHeight(c),n=!0)};s?.forEachPinnedRow?.("top",r),s?.forEachPinnedRow?.("bottom",r),t.forEachDisplayedNode?.(r),n&&t.onRowHeightChanged?.()}setRowAutoHeight(e,t,o){if(e.__autoHeights??(e.__autoHeights={}),t==null){delete e.__autoHeights[o.getId()];return}const s=e.__autoHeights[o.getId()];e.__autoHeights[o.getId()]=t,s!==t&&this.requestCheckAutoHeight()}colSpanSkipCell(e,t){const{colModel:o,colViewport:s,visibleCols:i}=this.beans;if(!o.colSpanActive)return!1;let n=[];switch(e.getPinned()){case"left":n=i.getLeftColsForRow(t);break;case"right":n=i.getRightColsForRow(t);break;case null:n=s.getColsWithinViewport(t);break}return!n.includes(e)}setupCellAutoHeight(e,t,o){if(!e.column.isAutoHeight()||!t)return!1;this.wasEverActive=!0;const s=t.parentElement,{rowNode:i,column:n}=e,r=this.beans,a=d=>{if(this.beans.editSvc?.isEditing(e)||!e.isAlive()||!o.isAlive())return;const{paddingTop:u,paddingBottom:h,borderBottomWidth:g,borderTopWidth:f}=_o(s),m=u+h+g+f,v=t.offsetHeight+m;if(d<5){const b=!Pe(r)?.contains(t),y=v==0;if(b||y){window.setTimeout(()=>a(d+1),0);return}}this.setRowAutoHeight(i,v,n)},l=()=>a(0);l();const c=Kt(r,t,l);return o.addDestroyFunc(()=>{c(),this.setRowAutoHeight(i,void 0,n)}),!0}setAutoHeightActive(e){this.active=e.list.some(t=>t.isVisible()&&t.isAutoHeight())}areRowsMeasured(){if(!this.active)return!0;const e=this.beans.rowRenderer.getAllRowCtrls();let t=null;for(const{rowNode:o}of e)if((!t||this.beans.colModel.colSpanActive)&&(t=this.beans.colViewport.getColsWithinViewport(o).filter(i=>i.isAutoHeight())),t.length!==0){if(!o.__autoHeights)return!1;for(const s of t){const i=o.__autoHeights[s.getColId()];if(!i||o.rowHeight<i)return!1}}return!0}},zM={moduleName:"RowAutoHeight",version:I,beans:[WM]},_M=class{constructor(e,t){this.col=e,this.firstNode=t,this.cellSpan=!0,this.spannedNodes=new Set,this.addSpannedNode(t)}reset(){this.spannedNodes.clear(),this.addSpannedNode(this.firstNode)}addSpannedNode(e){this.spannedNodes.add(e),this.lastNode=e}getLastNode(){return this.lastNode}getCellHeight(){return this.lastNode.rowTop+this.lastNode.rowHeight-this.firstNode.rowTop-1}doesSpanContain(e){return e.column!==this.col||e.rowPinned!=this.firstNode.rowPinned?!1:this.firstNode.rowIndex<=e.rowIndex&&e.rowIndex<=this.lastNode.rowIndex}getLastNodeAutoHeight(){const e=this.firstNode.__autoHeights?.[this.col.getColId()];if(e==null)return;let t=0;for(const o of this.spannedNodes)o!==this.lastNode&&(t+=o.rowHeight);return e-t}},UM=class extends x{constructor(e){super(),this.column=e}buildCache(e){const{column:t,beans:{gos:o,pinnedRowModel:s,rowModel:i,valueSvc:n,pagination:r}}=this,{colDef:a}=t,l=this.getNodeMap(e),c=new Map,d=o.getCallback("isFullWidthRow"),u=a.equals,h=a.spanRows,g=typeof h=="function";let f=null,m=null,C;const v=(b,y)=>{f=b,m=null,C=y},w=b=>{const y=!b.isExpandable()&&!b.group&&!b.detail&&(d?!d({rowNode:b}):!0);if(b.rowIndex==null||!y){v(null,null);return}if(f==null||b.level!==f.level||b.footer||m&&b.rowIndex-1!==m?.getLastNode().rowIndex){v(b,n.getValue(t,b,"data"));return}const S=n.getValue(t,b,"data");if(g){const F=K(o,{valueA:C,nodeA:f,valueB:S,nodeB:b,column:t,colDef:a});if(!h(F)){v(b,S);return}}else if(u?!u(C,S):C!==S){v(b,S);return}if(!m){const F=l?.get(f);F?.firstNode===f?(F.reset(),m=F):m=new _M(t,f),c.set(f,m)}m.addSpannedNode(b),c.set(b,m)};switch(e){case"center":i.forEachDisplayedNode?.(b=>{(!r||r.isRowInPage(b.rowIndex))&&w(b)}),this.centerValueNodeMap=c;break;case"top":s?.forEachPinnedRow("top",w),this.topValueNodeMap=c;break;case"bottom":s?.forEachPinnedRow("bottom",w),this.bottomValueNodeMap=c;break}}isCellSpanning(e){return!!this.getCellSpan(e)}getCellSpan(e){return this.getNodeMap(e.rowPinned).get(e)}getNodeMap(e){switch(e){case"top":return this.topValueNodeMap;case"bottom":return this.bottomValueNodeMap;default:return this.centerValueNodeMap}}},$M=class extends x{constructor(){super(...arguments),this.beanName="rowSpanSvc",this.spanningColumns=new Map,this.debouncePinnedEvent=xe(this,this.dispatchCellsUpdatedEvent.bind(this,!0),0),this.debounceModelEvent=xe(this,this.dispatchCellsUpdatedEvent.bind(this,!1),0),this.pinnedTimeout=null,this.modelTimeout=null}postConstruct(){const e=this.onRowDataUpdated.bind(this),t=this.buildPinnedCaches.bind(this);this.addManagedEventListeners({paginationChanged:this.buildModelCaches.bind(this),pinnedRowDataChanged:t,pinnedRowsChanged:t,rowNodeDataChanged:e,cellValueChanged:e})}register(e){const{gos:t}=this.beans;if(!t.get("enableCellSpan")||this.spanningColumns.has(e))return;const o=this.createManagedBean(new UM(e));this.spanningColumns.set(e,o),o.buildCache("top"),o.buildCache("bottom"),o.buildCache("center"),this.debouncePinnedEvent(),this.debounceModelEvent()}dispatchCellsUpdatedEvent(e){this.dispatchLocalEvent({type:"spannedCellsUpdated",pinned:e})}deregister(e){this.spanningColumns.delete(e)}onRowDataUpdated({node:e}){const{spannedRowRenderer:t}=this.beans;if(e.rowPinned){if(this.pinnedTimeout!=null)return;this.pinnedTimeout=window.setTimeout(()=>{this.pinnedTimeout=null,this.buildPinnedCaches(),t?.createCtrls("top"),t?.createCtrls("bottom")},0);return}this.modelTimeout==null&&(this.modelTimeout=window.setTimeout(()=>{this.modelTimeout=null,this.buildModelCaches(),t?.createCtrls("center")},0))}buildModelCaches(){this.modelTimeout!=null&&clearTimeout(this.modelTimeout),this.spanningColumns.forEach(e=>e.buildCache("center")),this.debounceModelEvent()}buildPinnedCaches(){this.pinnedTimeout!=null&&clearTimeout(this.pinnedTimeout),this.spanningColumns.forEach(e=>{e.buildCache("top"),e.buildCache("bottom")}),this.debouncePinnedEvent()}isCellSpanning(e,t){const o=this.spanningColumns.get(e);return o?o.isCellSpanning(t):!1}getCellSpanByPosition(e){const{pinnedRowModel:t,rowModel:o}=this.beans,s=e.column,i=e.rowIndex,n=this.spanningColumns.get(s);if(!n)return;let r;switch(e.rowPinned){case"top":r=t?.getPinnedTopRow(i);break;case"bottom":r=t?.getPinnedBottomRow(i);break;default:r=o.getRow(i)}if(r)return n.getCellSpan(r)}getCellStart(e){const t=this.getCellSpanByPosition(e);return t?{...e,rowIndex:t.firstNode.rowIndex}:e}getCellEnd(e){const t=this.getCellSpanByPosition(e);return t?{...e,rowIndex:t.getLastNode().rowIndex}:e}getCellSpan(e,t){const o=this.spanningColumns.get(e);if(o)return o.getCellSpan(t)}forEachSpannedColumn(e,t){for(const[o,s]of this.spanningColumns)if(s.isCellSpanning(e)){const i=s.getCellSpan(e);t(o,i)}}destroy(){super.destroy(),this.spanningColumns.clear()}},KM=class extends ms{constructor(e,t,o){super(e.col,e.firstNode,o,t),this.cellSpan=e,this.SPANNED_CELL_CSS_CLASS="ag-spanned-cell"}setComp(e,t,o,s,i,n,r){this.eWrapper=o,super.setComp(e,t,o,s,i,n,r),this.setAriaRowSpan()}isCellSpanning(){return!0}getCellSpan(){return this.cellSpan}refreshAriaRowIndex(){const{eGui:e,rowNode:t}=this;!e||t.rowIndex==null||va(e,t.rowIndex)}setAriaRowSpan(){Hp(this.eGui,this.cellSpan.spannedNodes.size)}setFocusedCellPosition(e){this.focusedCellPosition=e}getFocusedCellPosition(){return this.focusedCellPosition??this.cellPosition}checkCellFocused(){const e=this.beans.focusSvc.getFocusedCell();return!!e&&this.cellSpan.doesSpanContain(e)}applyStaticCssClasses(){super.applyStaticCssClasses(),this.comp.toggleCss(this.SPANNED_CELL_CSS_CLASS,!0)}onCellFocused(e){const{beans:t}=this;if(si(t)){this.focusedCellPosition=void 0;return}const o=this.isCellFocused();o||(this.focusedCellPosition=void 0),e&&o&&(this.focusedCellPosition={rowIndex:e.rowIndex,rowPinned:e.rowPinned,column:e.column}),super.onCellFocused(e)}getRootElement(){return this.eWrapper}},qM=class extends un{getInitialRowClasses(e){return["ag-spanned-row"]}getNewCellCtrl(e){const t=this.beans.rowSpanSvc?.getCellSpan(e,this.rowNode);if(!(!t||t.firstNode!==this.rowNode))return new KM(t,this,this.beans)}isCorrectCtrlForSpan(e){const t=this.beans.rowSpanSvc?.getCellSpan(e.column,this.rowNode);return!t||t.firstNode!==this.rowNode?!1:e.getCellSpan()===t}onRowHeightChanged(){}refreshFirstAndLastRowStyles(){}addHoverFunctionality(){}resetHoveredStatus(){}},jM=class extends x{constructor(){super(...arguments),this.beanName="spannedRowRenderer",this.topCtrls=new Map,this.bottomCtrls=new Map,this.centerCtrls=new Map}postConstruct(){this.addManagedEventListeners({displayedRowsChanged:this.createAllCtrls.bind(this)})}createAllCtrls(){this.createCtrls("top"),this.createCtrls("bottom"),this.createCtrls("center")}createCtrls(e){const{rowSpanSvc:t}=this.beans,o=this.getCtrlsMap(e),s=o.size,i=this.getAllRelevantRowControls(e),n=new Map;let r=!1;for(const l of i)l.isAlive()&&t?.forEachSpannedColumn(l.rowNode,(c,d)=>{if(n.has(d.firstNode))return;const u=o.get(d.firstNode);if(u){n.set(d.firstNode,u),o.delete(d.firstNode);return}r=!0;const h=new qM(d.firstNode,this.beans,!1,!1,!1);n.set(d.firstNode,h)});this.setCtrlsMap(e,n);const a=n.size===s;if(!(!r&&a)){for(const l of o.values())l.destroyFirstPass(!0),l.destroySecondPass();this.dispatchLocalEvent({type:"spannedRowsUpdated",ctrlsKey:e})}}getAllRelevantRowControls(e){const{rowRenderer:t}=this.beans;switch(e){case"top":return t.topRowCtrls;case"bottom":return t.bottomRowCtrls;case"center":return t.allRowCtrls}}getCellByPosition(e){const{rowSpanSvc:t}=this.beans,o=t?.getCellSpanByPosition(e);if(!o)return;const s=this.getCtrlsMap(e.rowPinned).get(o.firstNode);if(s)return s.getAllCellCtrls().find(i=>i.column===e.column)}getCtrls(e){return[...this.getCtrlsMap(e).values()]}destroyRowCtrls(e){for(const t of this.getCtrlsMap(e).values())t.destroyFirstPass(!0),t.destroySecondPass();this.setCtrlsMap(e,new Map)}getCtrlsMap(e){switch(e){case"top":return this.topCtrls;case"bottom":return this.bottomCtrls;default:return this.centerCtrls}}setCtrlsMap(e,t){switch(e){case"top":this.topCtrls=t;break;case"bottom":this.bottomCtrls=t;break;default:this.centerCtrls=t;break}}destroy(){super.destroy(),this.destroyRowCtrls("top"),this.destroyRowCtrls("bottom"),this.destroyRowCtrls("center")}},YM={moduleName:"CellSpan",version:I,beans:[$M,jM]},QM=class extends x{constructor(){super(...arguments),this.beanName="selectionColSvc"}postConstruct(){this.addManagedPropertyListener("rowSelection",e=>{this.onSelectionOptionsChanged(e.currentValue,e.previousValue,gs(e.source))}),this.addManagedPropertyListener("selectionColumnDef",this.updateColumns.bind(this))}addColumns(e){const t=this.columns;t!=null&&(e.list=t.list.concat(e.list),e.tree=t.tree.concat(e.tree),um(e))}createColumns(e,t){const o=()=>{en(this.beans,this.columns?.tree),this.columns=null},s=e.treeDepth,n=(this.columns?.treeDepth??-1)==s,r=this.generateSelectionCols();if(dm(r,this.columns?.list??[])&&n)return;o();const{colGroupSvc:l}=this.beans,c=l?.findDepth(e.tree)??0,d=l?.balanceTreeForAutoCols(r,c)??[];this.columns={list:r,tree:d,treeDepth:c,map:{}},t(h=>{if(!h)return null;const g=h.filter(f=>!go(f));return[...r,...g]})}updateColumns(e){const t=gs(e.source),{beans:o}=this;for(const s of this.columns?.list??[]){const i=this.createSelectionColDef(e.currentValue);s.setColDef(i,null,t),Ct(o,{state:[gm(i,s.colId)]},t)}}getColumn(e){return this.columns?.list.find(t=>Ws(t,e))??null}getColumns(){return this.columns?.list??null}isSelectionColumnEnabled(){const{gos:e,beans:t}=this,o=e.get("rowSelection");if(typeof o!="object"||!Po(e))return!1;const s=(t.autoColSvc?.getColumns()?.length??0)>0;if(o.checkboxLocation==="autoGroupColumn"&&s)return!1;const i=!!ds(o),n=Ii(o);return i||n}createSelectionColDef(e){const{gos:t}=this,o=e??t.get("selectionColumnDef"),s=t.get("enableRtl"),{rowSpan:i,spanRows:n,...r}=o??{};return{width:50,resizable:!1,suppressHeaderMenuButton:!0,sortable:!1,suppressMovable:!0,lockPosition:s?"right":"left",comparator(a,l,c,d){const u=c.isSelected(),h=d.isSelected();return u===h?0:u?1:-1},editable:!1,suppressFillHandle:!0,suppressAutoSize:!0,pinned:null,...r,colId:Ma,chartDataType:"excluded"}}generateSelectionCols(){if(!this.isSelectionColumnEnabled())return[];const e=this.createSelectionColDef(),t=e.colId;this.gos.validateColDef(e,t,!0);const o=new Uo(e,null,t,!1);return this.createBean(o),[o]}onSelectionOptionsChanged(e,t,o){const s=t&&typeof t!="string"?ds(t):void 0,i=e&&typeof e!="string"?ds(e):void 0,n=s!==i,r=t&&typeof t!="string"?Ii(t):void 0,a=e&&typeof e!="string"?Ii(e):void 0,l=r!==a,c=Qi(e),d=Qi(t);(n||l||c!==d)&&this.beans.colModel.refreshAll(o)}destroy(){en(this.beans,this.columns?.tree),super.destroy()}refreshVisibility(e,t,o){if(!this.columns?.list.length)return;const s=e.length+t.length+o.length;if(s===0)return;const i=this.columns.list[0];if(!i.isVisible())return;const n=()=>{let l;switch(i.pinned){case"left":case!0:l=e;break;case"right":l=o;break;default:l=t}l&&At(l,i)};(this.beans.rowNumbersSvc?.getColumn(Ta)?2:1)===s&&n()}},ZM=':where(.ag-selection-checkbox) .ag-checkbox-input-wrapper:before{content:"";cursor:pointer;inset:-8px;position:absolute}';function JM(e,t){if(!t.nodes.every(r=>r.rowPinned&&!Pn(r)?(D(59),!1):r.id===void 0?(D(60),!1):!0))return;const{nodes:s,source:i,newValue:n}=t;e.selectionSvc?.setNodesSelected({nodes:s,source:i??"api",newValue:n})}function XM(e,t,o="apiSelectAll"){e.selectionSvc?.selectAllRowNodes({source:o,selectAll:t})}function eT(e,t,o="apiSelectAll"){e.selectionSvc?.deselectAllRowNodes({source:o,selectAll:t})}function tT(e,t="apiSelectAllFiltered"){e.selectionSvc?.selectAllRowNodes({source:t,selectAll:"filtered"})}function oT(e,t="apiSelectAllFiltered"){e.selectionSvc?.deselectAllRowNodes({source:t,selectAll:"filtered"})}function sT(e,t="apiSelectAllCurrentPage"){e.selectionSvc?.selectAllRowNodes({source:t,selectAll:"currentPage"})}function iT(e,t="apiSelectAllCurrentPage"){e.selectionSvc?.deselectAllRowNodes({source:t,selectAll:"currentPage"})}function nT(e){return e.selectionSvc?.getSelectedNodes()??[]}function rT(e){return e.selectionSvc?.getSelectedRows()??[]}var aT={tag:"div",cls:"ag-selection-checkbox",role:"presentation",children:[{tag:"ag-checkbox",ref:"eCheckbox",role:"presentation"}]},lT=class extends ye{constructor(){super(aT,[ja]),this.eCheckbox=W}postConstruct(){this.eCheckbox.setPassive(!0)}onDataChanged(){this.onSelectionChanged()}onSelectableChanged(){this.showOrHideSelect()}onSelectionChanged(){const e=this.getLocaleTextFunc(),{rowNode:t,eCheckbox:o}=this,s=t.isSelected(),i=bn(e,s),[n,r]=t.selectable?["ariaRowToggleSelection","Press Space to toggle row selection"]:["ariaRowSelectionDisabled","Row Selection is disabled for this row"],a=e(n,r);o.setValue(s,!0),o.setInputAriaLabel(`${a} (${i})`)}init(e){if(this.rowNode=e.rowNode,this.column=e.column,this.overrides=e.overrides,this.onSelectionChanged(),this.addManagedListeners(this.eCheckbox.getWrapperElement(),{dblclick:Bo,click:s=>{Bo(s),!this.eCheckbox.isDisabled()&&this.beans.selectionSvc?.handleSelectionEvent(s,this.rowNode,"checkboxSelected")}}),this.addManagedListeners(this.rowNode,{rowSelected:this.onSelectionChanged.bind(this),dataChanged:this.onDataChanged.bind(this),selectableChanged:this.onSelectableChanged.bind(this)}),this.addManagedPropertyListener("rowSelection",({currentValue:s,previousValue:i})=>{const n=typeof s=="object"?Nn(s):void 0,r=typeof i=="object"?Nn(i):void 0;n!==r&&this.onSelectableChanged()}),Tr(this.gos)||typeof this.getIsVisible()=="function"){const s=this.showOrHideSelect.bind(this);this.addManagedEventListeners({displayedColumnsChanged:s}),this.addManagedListeners(this.rowNode,{dataChanged:s,cellChanged:s}),this.showOrHideSelect()}this.eCheckbox.getInputElement().setAttribute("tabindex","-1")}showOrHideSelect(){const{column:e,rowNode:t,overrides:o,gos:s}=this,i=t.selectable,n=this.getIsVisible();let r;if(typeof n=="function"){const u=o?.callbackParams;if(!e)r=n({...u,node:t,data:t.data});else{const h=e.createColumnFunctionCallbackParams(t);r=n({...u,...h})}}else r=n??!1;const a=i&&!r||!i&&r,l=i||r,c=s.get("rowSelection"),d=c&&typeof c!="string"?!Nn(c):!!e?.getColDef().showDisabledCheckboxes;this.setVisible(l&&(a?d:!0)),this.setDisplayed(l&&(a?d:!0)),l&&this.eCheckbox.setDisabled(a),o?.removeHidden&&this.setDisplayed(l)}getIsVisible(){const e=this.overrides;if(e)return e.isVisible;const t=this.gos.get("rowSelection");return t&&typeof t!="string"?ds(t):this.column?.getColDef()?.checkboxSelection}},cT=class{constructor(e,t){this.rowModel=e,this.pinnedRowModel=t,this.selectAll=!1,this.rootId=null,this.endId=null,this.cachedRange=[]}reset(){this.rootId=null,this.endId=null,this.cachedRange.length=0}setRoot(e){this.rootId=e.id,this.endId=null,this.cachedRange.length=0}setEndRange(e){this.endId=e.id,this.cachedRange.length=0}getRange(){if(this.cachedRange.length===0){const e=this.getRoot(),t=this.getEnd();if(e==null||t==null)return this.cachedRange;this.cachedRange=this.getNodesInRange(e,t)??[]}return this.cachedRange}isInRange(e){return this.rootId===null?!1:this.getRange().some(t=>t.id===e.id)}getRoot(e){if(this.rootId)return this.getRowNode(this.rootId);if(e)return this.setRoot(e),e}getEnd(){if(this.endId)return this.getRowNode(this.endId)}getRowNode(e){let t;const{rowModel:o,pinnedRowModel:s}=this;return t??(t=o.getRowNode(e)),s?.isManual()&&(t??(t=s.getPinnedRowById(e,"top")),t??(t=s.getPinnedRowById(e,"bottom"))),t}truncate(e){const t=this.getRange();if(t.length===0)return{keep:[],discard:[]};const o=t[0].id===this.rootId,s=t.findIndex(i=>i.id===e.id);if(s>-1){const i=t.slice(0,s),n=t.slice(s+1);return this.setEndRange(e),o?{keep:i,discard:n}:{keep:n,discard:i}}else return{keep:t,discard:[]}}extend(e,t=!1){const o=this.getRoot();if(o==null){const i=this.getRange().slice();return t&&e.depthFirstSearch(n=>!n.group&&i.push(n)),i.push(e),this.setRoot(e),{keep:i,discard:[]}}const s=this.getNodesInRange(o,e);if(!s)return this.setRoot(e),{keep:[e],discard:[]};if(s.find(i=>i.id===this.endId))return this.setEndRange(e),{keep:this.getRange(),discard:[]};{const i=this.getRange().slice();return this.setEndRange(e),{keep:this.getRange(),discard:i}}}getNodesInRange(e,t){const{pinnedRowModel:o,rowModel:s}=this;if(!o?.isManual())return s.getNodesInRangeForSelection(e,t);if(e.rowPinned==="top"&&!t.rowPinned)return rt(o,"top",e,void 0).concat(s.getNodesInRangeForSelection(s.getRow(0),t)??[]);if(e.rowPinned==="bottom"&&!t.rowPinned){const i=rt(o,"bottom",void 0,e),n=s.getRowCount(),r=s.getRow(n-1);return(s.getNodesInRangeForSelection(t,r)??[]).concat(i)}if(!e.rowPinned&&!t.rowPinned)return s.getNodesInRangeForSelection(e,t);if(e.rowPinned==="top"&&t.rowPinned==="top")return rt(o,"top",e,t);if(e.rowPinned==="bottom"&&t.rowPinned==="top"){const i=rt(o,"top",t,void 0),n=rt(o,"bottom",void 0,e),r=s.getRow(0),a=s.getRow(s.getRowCount()-1);return i.concat(s.getNodesInRangeForSelection(r,a)??[]).concat(n)}if(!e.rowPinned&&t.rowPinned==="top")return rt(o,"top",t,void 0).concat(s.getNodesInRangeForSelection(s.getRow(0),e)??[]);if(e.rowPinned==="top"&&t.rowPinned==="bottom"){const i=rt(o,"top",e,void 0),n=rt(o,"bottom",void 0,t),r=s.getRow(0),a=s.getRow(s.getRowCount()-1);return i.concat(s.getNodesInRangeForSelection(r,a)??[]).concat(n)}if(e.rowPinned==="bottom"&&t.rowPinned==="bottom")return rt(o,"bottom",e,t);if(!e.rowPinned&&t.rowPinned==="bottom"){const i=rt(o,"bottom",void 0,t),n=s.getRow(s.getRowCount());return(s.getNodesInRangeForSelection(e,n)??[]).concat(i)}return null}},dT=class extends x{constructor(e){super(),this.column=e,this.cbSelectAllVisible=!1,this.processingEventFromCheckbox=!1}onSpaceKeyDown(e){const t=this.cbSelectAll;t.isDisplayed()&&!t.getGui().contains(ve(this.beans))&&(e.preventDefault(),t.setValue(!t.getValue()))}getCheckboxGui(){return this.cbSelectAll.getGui()}setComp(e){this.headerCellCtrl=e;const t=this.createManagedBean(new qa);this.cbSelectAll=t,t.addCss("ag-header-select-all"),ko(t.getGui(),"presentation"),this.showOrHideSelectAll();const o=this.updateStateOfCheckbox.bind(this);this.addManagedEventListeners({newColumnsLoaded:()=>this.showOrHideSelectAll(),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this),selectionChanged:o,paginationChanged:o,modelUpdated:o}),this.addManagedPropertyListener("rowSelection",({currentValue:s,previousValue:i})=>{const n=r=>typeof r=="string"||!r||r.mode==="singleRow"?void 0:r.selectAll;n(s)!==n(i)&&this.showOrHideSelectAll(),this.updateStateOfCheckbox()}),this.addManagedListeners(t,{fieldValueChanged:this.onCbSelectAll.bind(this)}),t.getInputElement().setAttribute("tabindex","-1"),this.refreshSelectAllLabel()}onDisplayedColumnsChanged(e){this.isAlive()&&this.showOrHideSelectAll(e.source==="uiColumnMoved")}showOrHideSelectAll(e=!1){const t=this.isCheckboxSelection();this.cbSelectAllVisible=t,this.cbSelectAll.setDisplayed(t),t&&(this.checkRightRowModelType("selectAllCheckbox"),this.checkSelectionType("selectAllCheckbox"),this.updateStateOfCheckbox()),this.refreshSelectAllLabel(e)}updateStateOfCheckbox(){if(!this.cbSelectAllVisible||this.processingEventFromCheckbox)return;this.processingEventFromCheckbox=!0;const e=this.getSelectAllMode(),t=this.beans.selectionSvc,o=this.cbSelectAll,s=t.getSelectAllState(e);o.setValue(s);const i=t.hasNodesToSelect(e);o.setDisabled(!i),this.refreshSelectAllLabel(),this.processingEventFromCheckbox=!1}refreshSelectAllLabel(e=!1){const t=this.getLocaleTextFunc(),{headerCellCtrl:o,cbSelectAll:s,cbSelectAllVisible:i}=this,n=s.getValue(),r=bn(t,n),a=t("ariaRowSelectAll","Press Space to toggle all rows selection");o.setAriaDescriptionProperty("selectAll",i?`${a} (${r})`:null),s.setInputAriaLabel(t("ariaHeaderSelection","Column with Header Selection")),e||o.announceAriaDescription()}checkSelectionType(e){return Ji(this.gos)?!0:(D(128,{feature:e}),!1)}checkRightRowModelType(e){const{gos:t,rowModel:o}=this.beans;return Se(t)||xs(t)?!0:(D(129,{feature:e,rowModel:o.getType()}),!1)}onCbSelectAll(){if(this.processingEventFromCheckbox||!this.cbSelectAllVisible)return;const e=this.cbSelectAll.getValue(),t=this.getSelectAllMode();let o="uiSelectAll";t==="currentPage"?o="uiSelectAllCurrentPage":t==="filtered"&&(o="uiSelectAllFiltered");const s={source:o,selectAll:t},i=this.beans.selectionSvc;e?i.selectAllRowNodes(s):i.deselectAllRowNodes(s)}isCheckboxSelection(){const{column:e,gos:t,beans:o}=this,n=typeof t.get("rowSelection")=="object"?"headerCheckbox":"headerCheckboxSelection";return Lg(o,e)&&this.checkRightRowModelType(n)&&this.checkSelectionType(n)}getSelectAllMode(){const e=lu(this.gos,!1);if(e)return e;const{headerCheckboxSelectionCurrentPageOnly:t,headerCheckboxSelectionFilteredOnly:o}=this.column.getColDef();return t?"currentPage":o?"filtered":"all"}destroy(){super.destroy(),this.cbSelectAll=void 0,this.headerCellCtrl=void 0}};function Lg({gos:e,selectionColSvc:t},o){const s=e.get("rowSelection"),i=o.getColDef(),{headerCheckboxSelection:n}=i;let r=!1;if(typeof s=="object"){const l=go(o),c=Ia(o);(Qi(s)==="autoGroupColumn"&&c||l&&t?.isSelectionColumnEnabled())&&(r=Ii(s))}else typeof n=="function"?r=n(K(e,{column:o,colDef:i})):r=!!n;return r}var uT=class extends x{postConstruct(){const{gos:e,beans:t}=this;this.selectionCtx=new cT(t.rowModel,t.pinnedRowModel),this.addManagedPropertyListeners(["isRowSelectable","rowSelection"],()=>{const o=Tr(e);o!==this.isRowSelectable&&(this.isRowSelectable=o,this.updateSelectable())}),this.isRowSelectable=Tr(e),this.addManagedEventListeners({cellValueChanged:o=>this.updateRowSelectable(o.node),rowNodeDataChanged:o=>this.updateRowSelectable(o.node)})}destroy(){super.destroy(),this.selectionCtx.reset()}createCheckboxSelectionComponent(){return new lT}createSelectAllFeature(e){if(Lg(this.beans,e))return new dT(e)}isMultiSelect(){return Ji(this.gos)}onRowCtrlSelected(e,t,o){const s=!!e.rowNode.isSelected();e.forEachGui(o,i=>{i.rowComp.toggleCss("ag-row-selected",s);const n=i.element;Td(n,s),n.contains(ve(this.beans))&&t(i)})}announceAriaRowSelection(e){if(this.isRowSelectionBlocked(e))return;const t=e.isSelected(),o=this.beans.editSvc?.isEditing({rowNode:e});if(!e.selectable||o)return;const i=this.getLocaleTextFunc()(t?"ariaRowDeselect":"ariaRowSelect",`Press SPACE to ${t?"deselect":"select"} this row`);this.beans.ariaAnnounce?.announceValue(i,"rowSelection")}isRowSelectionBlocked(e){return!e.selectable||e.rowPinned&&!Pn(e)||!Po(this.gos)}updateRowSelectable(e,t){const o=e.rowPinned&&e.pinnedSibling?e.pinnedSibling.selectable:this.isRowSelectable?.(e)??!0;return this.setRowSelectable(e,o,t),o}setRowSelectable(e,t,o){if(e.selectable!==t){if(e.selectable=t,e.dispatchRowEvent("selectableChanged"),o)return;if(ti(this.gos)){const i=this.calculateSelectedFromChildren(e);this.setNodesSelected({nodes:[e],newValue:i??!1,source:"selectableChanged"});return}e.isSelected()&&!e.selectable&&this.setNodesSelected({nodes:[e],newValue:!1,source:"selectableChanged"})}}calculateSelectedFromChildren(e){let t=!1,o=!1;if(!e.childrenAfterGroup?.length)return e.selectable?e.__selected:null;for(let s=0;s<e.childrenAfterGroup.length;s++){const i=e.childrenAfterGroup[s];let n=i.isSelected();if(!i.selectable){const r=this.calculateSelectedFromChildren(i);if(r===null)continue;n=r}switch(n){case!0:t=!0;break;case!1:o=!0;break;default:return}}if(!(t&&o))return t?!0:o?!1:e.selectable?e.__selected:null}selectRowNode(e,t,o,s="api"){if(t&&e.destroyed)return!1;const i=!e.selectable&&t,n=e.__selected===t;if(i||n)return!1;e.__selected=t,e.dispatchRowEvent("rowSelected");const r=e.sibling;r&&r.footer&&r.__localEventService&&r.dispatchRowEvent("rowSelected");const a=e.pinnedSibling;return a?.rowPinned&&a.__localEventService&&a.dispatchRowEvent("rowSelected"),this.eventSvc.dispatchEvent({...hC(e,this.gos,"rowSelected"),event:o||null,source:s}),!0}isCellCheckboxSelection(e,t){const o=this.gos.get("rowSelection");if(o&&typeof o!="string"){const s=go(e)&&ds(o);return e.isColumnFunc(t,s)}else return e.isColumnFunc(t,e.colDef.checkboxSelection)}inferNodeSelections(e,t,o,s){const{gos:i,selectionCtx:n}=this,r=e.isSelected(),a=ti(i),l=Hf(i),c=Bf(i),d=this.isMultiSelect(),u=s==="rowClicked";if(u&&!(l||c))return null;if(t&&o&&d){const h=n.getRoot();if(h)if(h.isSelected()){const g=n.isInRange(e)?n.truncate(e):n.extend(e,a);return{deselect:g.discard,select:g.keep,reset:!1}}else{const g=n.extend(e,a);return{select:[],deselect:g.keep,reset:!1}}else return null}else if(t&&d){const h=n.selectAll?this.beans.rowModel.getRow(0):void 0,g=n.getRoot(h),f=n.isInRange(e)?n.truncate(e):n.extend(e,a);return{select:f.keep,deselect:f.discard,reset:n.selectAll||!!(g&&!g.isSelected())}}else if(o){if(u){const h=!r;return h&&!l||!h&&!c?null:(n.setRoot(e),{node:e,newValue:h,clearSelection:!1})}return n.setRoot(e),{node:e,newValue:!r,clearSelection:!d}}else{n.setRoot(e);const h=Vf(i),g=Xi(i)==="filteredDescendants",f=u&&(!h||!l);if(g&&r===void 0&&Se(i))return{node:e,newValue:!1,checkFilteredNodes:!0,clearSelection:!d||f};if(u){const m=r?!h:l;return m===r&&!f||m&&!l||!m&&!c?null:{node:e,newValue:m,clearSelection:!d||f,keepDescendants:e.group&&a}}return{node:e,newValue:!r,clearSelection:!d||f}}}},hT=class extends uT{constructor(){super(...arguments),this.beanName="selectionSvc",this.selectedNodes=new Map,this.detailSelection=new Map,this.masterSelectsDetail=!1}postConstruct(){super.postConstruct();const{gos:e}=this;this.mode=Zi(e),this.groupSelectsDescendants=ti(e),this.groupSelectsFiltered=Xi(e)==="filteredDescendants",this.masterSelectsDetail=Ol(e)==="detail",this.addManagedPropertyListeners(["groupSelectsChildren","groupSelectsFiltered","rowSelection"],()=>{const t=ti(e),o=Zi(e),s=Xi(e)==="filteredDescendants";this.masterSelectsDetail=Ol(e)==="detail",(t!==this.groupSelectsDescendants||s!==this.groupSelectsFiltered||o!==this.mode)&&(this.deselectAllRowNodes({source:"api"}),this.groupSelectsDescendants=t,this.groupSelectsFiltered=s,this.mode=o)}),this.addManagedEventListeners({rowSelected:this.onRowSelected.bind(this)})}destroy(){super.destroy(),this.resetNodes()}handleSelectionEvent(e,t,o){if(this.isRowSelectionBlocked(t))return 0;const s=this.inferNodeSelections(t,e.shiftKey,e.metaKey||e.ctrlKey,o);if(s==null)return 0;if(this.selectionCtx.selectAll=!1,"select"in s)return s.reset?this.resetNodes():this.selectRange(s.deselect,!1,o),this.selectRange(s.select,!0,o);{const i=s.checkFilteredNodes?Gg(s.node):s.newValue;return this.setNodesSelected({nodes:[s.node],newValue:i,clearSelection:s.clearSelection,keepDescendants:s.keepDescendants,event:e,source:o})}}setNodesSelected({newValue:e,clearSelection:t,suppressFinishActions:o,nodes:s,event:i,source:n,keepDescendants:r=!1}){if(s.length===0)return 0;const{gos:a}=this;if(!Po(a)&&e)return D(132),0;if(s.length>1&&!this.isMultiSelect())return D(130),0;let l=0;for(let c=0;c<s.length;c++){const d=s[c],u=d.primaryRow;if(u.rowPinned&&!Pn(u)){D(59);continue}if(u.id===void 0){D(60);continue}if(e&&d.destroyed)continue;this.groupSelectsFiltered&&u.group&&!a.get("treeData")||this.selectRowNode(u,e,i,n)&&(this.detailSelection.delete(u.id),l++),this.groupSelectsDescendants&&u.childrenAfterGroup?.length&&(l+=this.selectChildren(u,e,n))}return o||(s.length===1&&n==="api"&&this.selectionCtx.setRoot(s[0].primaryRow),e&&(t||!this.isMultiSelect())&&(l+=this.clearOtherNodes(s[0].primaryRow,r,n)),l>0&&(this.updateGroupsFromChildrenSelections(n),this.dispatchSelectionChanged(n))),l}selectRange(e,t,o){let s=0;return e.forEach(i=>{const n=i.primaryRow;if(n.group&&this.groupSelectsDescendants)return;this.selectRowNode(n,t,void 0,o)&&s++}),s>0&&(this.updateGroupsFromChildrenSelections(o),this.dispatchSelectionChanged(o)),s}selectChildren(e,t,o){const s=this.groupSelectsFiltered?e.childrenAfterAggFilter:e.childrenAfterGroup;return s?this.setNodesSelected({newValue:t,clearSelection:!1,suppressFinishActions:!0,source:o,nodes:s}):0}getSelectedNodes(){return Array.from(this.selectedNodes.values())}getSelectedRows(){const e=[];return this.selectedNodes.forEach(t=>t.data&&e.push(t.data)),e}getSelectionCount(){return this.selectedNodes.size}filterFromSelection(e){const t=new Map;this.selectedNodes.forEach((o,s)=>{e(o)&&t.set(s,o)}),this.selectedNodes=t}updateGroupsFromChildrenSelections(e,t){if(!this.groupSelectsDescendants)return!1;const{gos:o,rowModel:s}=this.beans;if(!Se(o))return!1;const i=s.rootNode;if(!i)return!1;let n=!1;const r=a=>{if(a!==i){const l=this.calculateSelectedFromChildren(a);n=this.selectRowNode(a,l===null?!1:l,void 0,e)||n}};return zo(i,this.beans.rowModel.hierarchical,t,r),n}clearOtherNodes(e,t,o){const s=new Map;let i=0;return this.selectedNodes.forEach(n=>{const r=n.id==e.id;if((t?!pT(e,n):!0)&&!r){const l=this.selectedNodes.get(n.id);i+=this.setNodesSelected({nodes:[l],newValue:!1,clearSelection:!1,suppressFinishActions:!0,source:o}),this.groupSelectsDescendants&&n.parent&&s.set(n.parent.id,n.parent)}}),s.forEach(n=>{const r=this.calculateSelectedFromChildren(n);this.selectRowNode(n,r===null?!1:r,void 0,o)}),i}onRowSelected(e){const t=e.node;this.groupSelectsDescendants&&t.group||(t.isSelected()?this.selectedNodes.set(t.id,t):this.selectedNodes.delete(t.id))}syncInRowNode(e,t){this.syncInOldRowNode(e,t),this.syncInNewRowNode(e)}createDaemonNode(e){if(!e.id)return;const t=new co(this.beans);return t.id=e.id,t.data=e.data,t.__selected=e.__selected,t.level=e.level,t}syncInOldRowNode(e,t){t&&e.id!==t.id&&this.selectedNodes.get(t.id)==e&&this.selectedNodes.set(t.id,t)}syncInNewRowNode(e){this.selectedNodes.has(e.id)?(e.__selected=!0,this.selectedNodes.set(e.id,e)):e.__selected=!1}reset(e){const t=this.getSelectionCount();this.resetNodes(),t&&this.dispatchSelectionChanged(e)}resetNodes(){this.selectedNodes.forEach(e=>{this.selectRowNode(e,!1)}),this.selectedNodes.clear()}getBestCostNodeSelection(){const{gos:e,rowModel:t}=this.beans;if(!Se(e))return;const o=t.getTopLevelNodes();if(o===null)return;const s=[];function i(n){for(let r=0,a=n.length;r<a;r++){const l=n[r];l.isSelected()?s.push(l):l.group&&l.childrenAfterGroup&&i(l.childrenAfterGroup)}}return i(o),s}isEmpty(){return this.getSelectionCount()===0}deselectAllRowNodes({source:e,selectAll:t}){const o=Se(this.gos);let s=!1;const i=n=>{const r=this.selectRowNode(n.primaryRow,!1,void 0,e);s||(s=r)};if(t==="currentPage"||t==="filtered"){if(!o){ce(102);return}this.getNodesToSelect(t).forEach(i)}else this.selectedNodes.forEach(i),this.reset(e);if(this.selectionCtx.selectAll=!1,o&&this.groupSelectsDescendants){const n=this.updateGroupsFromChildrenSelections(e);s||(s=n)}s&&this.dispatchSelectionChanged(e)}getSelectedCounts(e){let t=0,o=0;return this.getNodesToSelect(e).forEach(s=>{this.groupSelectsDescendants&&s.group||(s.isSelected()?t++:s.selectable&&o++)}),{selectedCount:t,notSelectedCount:o}}getSelectAllState(e){const{selectedCount:t,notSelectedCount:o}=this.getSelectedCounts(e);return Og(t,o)??null}hasNodesToSelect(e){return this.getNodesToSelect(e).filter(t=>t.selectable).length>0}getNodesToSelect(e){if(!this.canSelectAll())return[];const t=[],o=i=>t.push(i);if(e==="currentPage")return this.forEachNodeOnPage(i=>{if(!i.group){o(i);return}if(!i.footer&&!i.expanded){const n=r=>{o(r);const a=r.childrenAfterFilter;if(a)for(let l=0,c=a.length;l<c;++l)n(a[l])};n(i);return}this.groupSelectsDescendants||o(i)}),t;const s=this.beans.rowModel;return e==="filtered"?(s.forEachNodeAfterFilter(o),t):(s.forEachNode(o),t)}forEachNodeOnPage(e){const{pageBounds:t,rowModel:o}=this.beans,s=t.getFirstRow(),i=t.getLastRow();for(let n=s;n<=i;n++){const r=o.getRow(n);r&&e(r)}}selectAllRowNodes(e){const{gos:t,selectionCtx:o}=this;if(!Po(t)){D(132);return}if(Gf(t)&&!Ji(t)){D(130);return}if(!this.canSelectAll())return;const{source:s,selectAll:i}=e;let n=!1;if(this.getNodesToSelect(i).forEach(r=>{const a=this.selectRowNode(r.primaryRow,!0,void 0,s);n||(n=a)}),o.selectAll=!0,Se(t)&&this.groupSelectsDescendants){const r=this.updateGroupsFromChildrenSelections(s);n||(n=r)}n&&this.dispatchSelectionChanged(s)}getSelectionState(){return this.isEmpty()?null:Array.from(this.selectedNodes.keys())}setSelectionState(e,t,o){if(e||(e=[]),!Array.isArray(e)){ce(103);return}const s=new Set(e),i=[];this.beans.rowModel.forEachNode(n=>{s.has(n.id)&&i.push(n)}),o&&this.resetNodes(),this.setNodesSelected({newValue:!0,nodes:i,source:t})}canSelectAll(){return Se(this.beans.gos)}updateSelectable(e){const{gos:t,rowModel:o}=this.beans;if(!Po(t))return;const s="selectableChanged",i=Se(t)&&this.groupSelectsDescendants,n=[];if(i){const r=o.rootNode;r&&zo(r,o.hierarchical,e,a=>{let l=!1;for(const c of a.childrenAfterGroup)l||(l=c.selectable),!c.group&&!this.updateRowSelectable(c,!0)&&c.isSelected()&&n.push(c);this.setRowSelectable(a,l,!0)})}else o.forEachNode(r=>{!this.updateRowSelectable(r,!0)&&r.isSelected()&&n.push(r)});n.length&&this.setNodesSelected({nodes:n,newValue:!1,source:s}),!e&&i&&this.updateGroupsFromChildrenSelections?.(s)}updateSelectableAfterGrouping(e){this.updateSelectable(e),this.groupSelectsDescendants&&this.updateGroupsFromChildrenSelections?.("rowGroupChanged",e)&&this.dispatchSelectionChanged("rowGroupChanged")}refreshMasterNodeState(e,t){if(!this.masterSelectsDetail)return;const o=e.detailNode?.detailGridInfo?.api;if(!o)return;const s=gT(o);e.isSelected()!==s&&this.selectRowNode(e,s,t,"masterDetail")&&this.dispatchSelectionChanged("masterDetail"),s||this.detailSelection.set(e.id,new Set(o.getSelectedNodes().map(n=>n.id)))}setDetailSelectionState(e,t,o){if(this.masterSelectsDetail){if(!Ji(t)){D(269);return}switch(e.isSelected()){case!0:{o.selectAll();break}case!1:{o.deselectAll();break}case void 0:{const s=this.detailSelection.get(e.id);if(s){const i=[];for(const n of s){const r=o.getRowNode(n);r&&i.push(r)}o.setNodesSelected({nodes:i,newValue:!0,source:"masterDetail"})}break}}}}dispatchSelectionChanged(e){this.eventSvc.dispatchEvent({type:"selectionChanged",source:e,selectedNodes:this.getSelectedNodes(),serverSideState:null})}};function gT(e){let t=0,o=0;return e.forEachNode(s=>{s.isSelected()?t++:s.selectable&&o++}),Og(t,o)}function Og(e,t){if(e===0&&t===0)return!1;if(!(e>0&&t>0))return e>0}function pT(e,t){let o=t.parent;for(;o;){if(o===e)return!0;o=o.parent}return!1}function Gg(e){const t=e.isSelected()===!1,o=e.childrenAfterFilter?.some(Gg)??!1;return t||o}var fT={moduleName:"SharedRowSelection",version:I,beans:[QM],css:[ZM],apiFunctions:{setNodesSelected:JM,selectAll:XM,deselectAll:eT,selectAllFiltered:tT,deselectAllFiltered:oT,selectAllOnCurrentPage:sT,deselectAllOnCurrentPage:iT,getSelectedNodes:nT,getSelectedRows:rT}},mT={moduleName:"RowSelection",version:I,rowModels:["clientSide","infinite","viewport"],beans:[hT],dependsOn:[fT]},CT=class extends x{constructor(e,t){super(),this.cellCtrl=e,this.staticClasses=[],this.beans=t,this.column=e.column}setComp(e){this.cellComp=e,this.applyUserStyles(),this.applyCellClassRules(),this.applyClassesFromColDef()}applyCellClassRules(){const{column:e,cellComp:t}=this,o=e.colDef,s=o.cellClassRules,i=this.getCellClassParams(e,o);tl(this.beans.expressionSvc,s===this.cellClassRules?void 0:this.cellClassRules,s,i,n=>t.toggleCss(n,!0),n=>t.toggleCss(n,!1)),this.cellClassRules=s}applyUserStyles(){const e=this.column,t=e.colDef,o=t.cellStyle;if(!o)return;let s;if(typeof o=="function"){const i=this.getCellClassParams(e,t);s=o(i)}else s=o;s&&this.cellComp.setUserStyles(s)}applyClassesFromColDef(){const{column:e,cellComp:t}=this,o=e.colDef,s=this.getCellClassParams(e,o);for(const n of this.staticClasses)t.toggleCss(n,!1);const i=this.beans.cellStyles.getStaticCellClasses(o,s);this.staticClasses=i;for(const n of i)t.toggleCss(n,!0)}getCellClassParams(e,t){const{value:o,rowNode:s}=this.cellCtrl;return K(this.beans.gos,{value:o,data:s.data,node:s,colDef:t,column:e,rowIndex:s.rowIndex})}},vT=class extends x{constructor(){super(...arguments),this.beanName="cellStyles"}processAllCellClasses(e,t,o,s){tl(this.beans.expressionSvc,void 0,e.cellClassRules,t,o,s),this.processStaticCellClasses(e,t,o)}getStaticCellClasses(e,t){const{cellClass:o}=e;if(!o)return[];let s;return typeof o=="function"?s=o(t):s=o,typeof s=="string"&&(s=[s]),s||[]}createCellCustomStyleFeature(e){return new CT(e,this.beans)}processStaticCellClasses(e,t,o){this.getStaticCellClasses(e,t).forEach(i=>{o(i)})}},wT={moduleName:"CellStyle",version:I,beans:[vT]},bT={moduleName:"RowStyle",version:I,beans:[pR]},ST={enableBrowserTooltips:!0,tooltipTrigger:!0,tooltipMouseTrack:!0,tooltipShowMode:!0,tooltipInteraction:!0,defaultColGroupDef:!0,suppressAutoSize:!0,skipHeaderOnAutoSize:!0,autoSizeStrategy:!0,components:!0,stopEditingWhenCellsLoseFocus:!0,undoRedoCellEditing:!0,undoRedoCellEditingLimit:!0,excelStyles:!0,cacheQuickFilter:!0,customChartThemes:!0,chartThemeOverrides:!0,chartToolPanelsDef:!0,loadingCellRendererSelector:!0,localeText:!0,keepDetailRows:!0,keepDetailRowsCount:!0,detailRowHeight:!0,detailRowAutoHeight:!0,tabIndex:!0,valueCache:!0,valueCacheNeverExpires:!0,enableCellExpressions:!0,suppressTouch:!0,suppressBrowserResizeObserver:!0,suppressPropertyNamesCheck:!0,debug:!0,dragAndDropImageComponent:!0,overlayComponent:!0,suppressOverlays:!0,loadingOverlayComponent:!0,suppressLoadingOverlay:!0,noRowsOverlayComponent:!0,paginationPageSizeSelector:!0,paginateChildRows:!0,pivotPanelShow:!0,pivotSuppressAutoColumn:!0,suppressExpandablePivotGroups:!0,aggFuncs:!0,allowShowChangeAfterFilter:!0,ensureDomOrder:!0,enableRtl:!0,suppressColumnVirtualisation:!0,suppressMaxRenderedRowRestriction:!0,suppressRowVirtualisation:!0,rowDragText:!0,groupLockGroupColumns:!0,suppressGroupRowsSticky:!0,rowModelType:!0,cacheOverflowSize:!0,infiniteInitialRowCount:!0,serverSideInitialRowCount:!0,maxBlocksInCache:!0,maxConcurrentDatasourceRequests:!0,blockLoadDebounceMillis:!0,serverSideOnlyRefreshFilteredGroups:!0,serverSidePivotResultFieldSeparator:!0,viewportRowModelPageSize:!0,viewportRowModelBufferSize:!0,debounceVerticalScrollbar:!0,suppressAnimationFrame:!0,suppressPreventDefaultOnMouseWheel:!0,scrollbarWidth:!0,icons:!0,suppressRowTransform:!0,gridId:!0,enableGroupEdit:!0,initialState:!0,processUnpinnedColumns:!0,createChartContainer:!0,getLocaleText:!0,getRowId:!0,reactiveCustomComponents:!0,renderingMode:!0,columnMenu:!0,suppressSetFilterByDefault:!0,getDataPath:!0,enableCellSpan:!0,enableFilterHandlers:!0,filterHandlers:!0},Ye="clientSide",Be="serverSide",jo="infinite",yT={onGroupExpandedOrCollapsed:[Ye],refreshClientSideRowModel:[Ye],isRowDataEmpty:[Ye],forEachLeafNode:[Ye],forEachNodeAfterFilter:[Ye],forEachNodeAfterFilterAndSort:[Ye],resetRowHeights:[Ye,Be],applyTransaction:[Ye],applyTransactionAsync:[Ye],flushAsyncTransactions:[Ye],getBestCostNodeSelection:[Ye],getServerSideSelectionState:[Be],setServerSideSelectionState:[Be],applyServerSideTransaction:[Be],applyServerSideTransactionAsync:[Be],applyServerSideRowData:[Be],retryServerSideLoads:[Be],flushServerSideAsyncTransactions:[Be],refreshServerSide:[Be],getServerSideGroupLevelState:[Be],refreshInfiniteCache:[jo],purgeInfiniteCache:[jo],getInfiniteRowCount:[jo],isLastRowIndexKnown:[jo,Be],expandAll:[Ye,Be],collapseAll:[Ye,Be],onRowHeightChanged:[Ye,Be],setRowCount:[jo,Be],getCacheBlockState:[jo,Be]},RT={showLoadingOverlay:{version:"v32",message:'`showLoadingOverlay` is deprecated. Use the grid option "loading"=true instead or setGridOption("loading", true).'},clearRangeSelection:{version:"v32.2",message:"Use `clearCellSelection` instead."},getInfiniteRowCount:{version:"v32.2",old:"getInfiniteRowCount()",new:"getDisplayedRowCount()"},selectAllFiltered:{version:"v33",old:"selectAllFiltered()",new:'selectAll("filtered")'},deselectAllFiltered:{version:"v33",old:"deselectAllFiltered()",new:'deselectAll("filtered")'},selectAllOnCurrentPage:{version:"v33",old:"selectAllOnCurrentPage()",new:'selectAll("currentPage")'},deselectAllOnCurrentPage:{version:"v33",old:"deselectAllOnCurrentPage()",new:'deselectAll("currentPage")'}};function FT(e,t,o){const s=RT[e];if(s){const{version:n,new:r,old:a,message:l}=s,c=a??e;return(...d)=>{const u=r?`Please use ${r} instead. `:"";return Ns(`Since ${n} api.${c} is deprecated. ${u}${l??""}`),t.apply(t,d)}}const i=yT[e];return i?(...n)=>{const r=o.rowModel.getType();if(!i.includes(r)){as(`api.${e} can only be called when gridOptions.rowModelType is ${i.join(" or ")}`);return}return t.apply(t,n)}:t}var ET={detailCellRendererCtrl:"SharedMasterDetail",dndSourceComp:"DragAndDrop",fillHandle:"CellSelection",groupCellRendererCtrl:"GroupCellRenderer",headerFilterCellCtrl:"ColumnFilter",headerGroupCellCtrl:"ColumnGroup",rangeHandle:"CellSelection",tooltipFeature:"Tooltip",highlightTooltipFeature:"Tooltip",tooltipStateManager:"Tooltip",groupStrategy:"RowGrouping",treeGroupStrategy:"TreeData",rowNumberRowResizer:"RowNumbers",singleCell:"EditCore",fullRow:"EditCore",agSetColumnFilterHandler:"SetFilter",agMultiColumnFilterHandler:"MultiFilter",agGroupColumnFilterHandler:"GroupFilter",agNumberColumnFilterHandler:"NumberFilter",agBigIntColumnFilterHandler:"BigIntFilter",agDateColumnFilterHandler:"DateFilter",agTextColumnFilterHandler:"TextFilter"},xT={expanded:1,contracted:1,"tree-closed":1,"tree-open":1,"tree-indeterminate":1,pin:1,"eye-slash":1,arrows:1,left:1,right:1,group:1,aggregation:1,pivot:1,"not-allowed":1,chart:1,cross:1,cancel:1,tick:1,first:1,previous:1,next:1,last:1,linked:1,unlinked:1,"color-picker":1,loading:1,menu:1,"menu-alt":1,filter:1,"filter-add":1,columns:1,maximize:1,minimize:1,copy:1,cut:1,paste:1,grip:1,save:1,csv:1,excel:1,"small-down":1,"small-left":1,"small-right":1,"small-up":1,asc:1,desc:1,aasc:1,adesc:1,none:1,up:1,down:1,plus:1,minus:1,settings:1,"checkbox-checked":1,"checkbox-indeterminate":1,"checkbox-unchecked":1,"radio-button-on":1,"radio-button-off":1,eye:1,"column-arrow":1,"un-pin":1,"pinned-top":1,"pinned-bottom":1,"chevron-up":1,"chevron-down":1,"chevron-left":1,"chevron-right":1,edit:1},PT={chart:"MenuCore",cancel:"EnterpriseCore",first:"Pagination",previous:"Pagination",next:"Pagination",last:"Pagination",linked:"IntegratedCharts",loadingMenuItems:"MenuCore",unlinked:"IntegratedCharts",menu:"ColumnHeaderComp",legacyMenu:"ColumnMenu",filter:"ColumnFilter",filterActive:"ColumnFilter",filterAdd:"NewFiltersToolPanel",filterCardCollapse:"NewFiltersToolPanel",filterCardExpand:"NewFiltersToolPanel",filterCardEditing:"NewFiltersToolPanel",filterTab:"ColumnMenu",filtersToolPanel:"FiltersToolPanel",columns:["MenuCore"],columnsToolPanel:["ColumnsToolPanel"],maximize:"EnterpriseCore",minimize:"EnterpriseCore",save:"MenuCore",columnGroupOpened:"ColumnGroupHeaderComp",columnGroupClosed:"ColumnGroupHeaderComp",accordionOpen:"EnterpriseCore",accordionClosed:"EnterpriseCore",accordionIndeterminate:"EnterpriseCore",columnSelectClosed:["ColumnsToolPanel","ColumnMenu"],columnSelectOpen:["ColumnsToolPanel","ColumnMenu"],columnSelectIndeterminate:["ColumnsToolPanel","ColumnMenu"],columnMovePin:"SharedDragAndDrop",columnMoveHide:"SharedDragAndDrop",columnMoveMove:"SharedDragAndDrop",columnMoveLeft:"SharedDragAndDrop",columnMoveRight:"SharedDragAndDrop",columnMoveGroup:"SharedDragAndDrop",columnMoveValue:"SharedDragAndDrop",columnMovePivot:"SharedDragAndDrop",dropNotAllowed:"SharedDragAndDrop",ensureColumnVisible:["ColumnsToolPanel","ColumnMenu"],groupContracted:"GroupCellRenderer",groupExpanded:"GroupCellRenderer",setFilterGroupClosed:"SetFilter",setFilterGroupOpen:"SetFilter",setFilterGroupIndeterminate:"SetFilter",setFilterLoading:"SetFilter",close:"EnterpriseCore",check:"MenuItem",colorPicker:"CommunityCore",groupLoading:"LoadingCellRenderer",overlayLoading:"Overlay",overlayExporting:"Overlay",menuAlt:"ColumnHeaderComp",menuPin:"MenuCore",menuValue:"MenuCore",menuAddRowGroup:["MenuCore","ColumnsToolPanel"],menuRemoveRowGroup:["MenuCore","ColumnsToolPanel"],clipboardCopy:"MenuCore",clipboardCut:"MenuCore",clipboardPaste:"MenuCore",pivotPanel:["ColumnsToolPanel","RowGroupingPanel"],rowGroupPanel:["ColumnsToolPanel","RowGroupingPanel"],valuePanel:"ColumnsToolPanel",columnDrag:"EnterpriseCore",rowDrag:["RowDrag","DragAndDrop"],csvExport:"MenuCore",excelExport:"MenuCore",smallDown:"CommunityCore",selectOpen:"CommunityCore",richSelectOpen:"RichSelect",richSelectRemove:"RichSelect",richSelectLoading:"RichSelect",smallLeft:"CommunityCore",smallRight:"CommunityCore",subMenuOpen:"MenuItem",subMenuOpenRtl:"MenuItem",panelDelimiter:"RowGroupingPanel",panelDelimiterRtl:"RowGroupingPanel",smallUp:"CommunityCore",sortAscending:["MenuCore","Sort"],sortDescending:["MenuCore","Sort"],sortAbsoluteAscending:["MenuCore","Sort"],sortAbsoluteDescending:["MenuCore","Sort"],sortUnSort:["MenuCore","Sort"],advancedFilterBuilder:"AdvancedFilter",advancedFilterBuilderDrag:"AdvancedFilter",advancedFilterBuilderInvalid:"AdvancedFilter",advancedFilterBuilderMoveUp:"AdvancedFilter",advancedFilterBuilderMoveDown:"AdvancedFilter",advancedFilterBuilderAdd:"AdvancedFilter",advancedFilterBuilderRemove:"AdvancedFilter",advancedFilterBuilderSelectOpen:"AdvancedFilter",chartsMenu:"IntegratedCharts",chartsMenuEdit:"IntegratedCharts",chartsMenuAdvancedSettings:"IntegratedCharts",chartsMenuAdd:"IntegratedCharts",chartsColorPicker:"IntegratedCharts",chartsThemePrevious:"IntegratedCharts",chartsThemeNext:"IntegratedCharts",chartsDownload:"IntegratedCharts",checkboxChecked:"CommunityCore",checkboxIndeterminate:"CommunityCore",checkboxUnchecked:"CommunityCore",radioButtonOn:"CommunityCore",radioButtonOff:"CommunityCore",rowPin:"PinnedRow",rowUnpin:"PinnedRow",rowPinBottom:"PinnedRow",rowPinTop:"PinnedRow"},DT=new Set(["colorPicker","smallUp","checkboxChecked","checkboxIndeterminate","checkboxUnchecked","radioButtonOn","radioButtonOff","smallDown","smallLeft","smallRight"]),MT=class extends x{constructor(){super(...arguments),this.beanName="validation"}wireBeans(e){this.gridOptions=e.gridOptions,yf(x1)}warnOnInitialPropertyUpdate(e,t){e==="api"&&ST[t]&&D(22,{key:t})}processGridOptions(e){this.processOptions(e,f0())}validateApiFunction(e,t){return FT(e,t,this.beans)}missingUserComponent(e,t,o,s){const i=fs[t];i?this.gos.assertModuleRegistered(i,`AG Grid '${e}' component: ${t}`):D(101,{propertyName:e,componentName:t,agGridDefaults:o,jsComps:s})}missingDynamicBean(e){const t=ET[e];return t?It(200,{...this.gos.getModuleErrorParams(),moduleName:t,reasonOrId:e}):void 0}checkRowEvents(e){IT.has(e)&&D(10,{eventType:e})}validateIcon(e){if(DT.has(e)&&D(43,{iconName:e}),xT[e])return;const t=PT[e];if(t){ce(200,{reasonOrId:`icon '${e}'`,moduleName:t,gridScoped:xa(),gridId:this.beans.context.getId(),rowModelType:this.gos.get("rowModelType"),additionalText:"Alternatively, use the CSS icon name directly."});return}D(134,{iconName:e})}isProvidedUserComp(e){return!!fs[e]}validateColDef(e){this.processOptions(e,i0())}processOptions(e,t){const{validations:o,deprecations:s,allProperties:i,propertyExceptions:n,objectName:r,docsUrl:a}=t;i&&this.gridOptions.suppressPropertyNamesCheck!==!0&&this.checkProperties(e,[...n??[],...Object.keys(s)],i,r,a);const l=new Set;if(Object.keys(e).forEach(d=>{const u=s[d];if(u){const{message:w,version:b}=u;l.add(`As of v${b}, ${String(d)} is deprecated. ${w??""}`)}const h=e[d];if(h==null||h===!1)return;const g=o[d];if(!g)return;const{dependencies:f,validate:m,supportedRowModels:C,expectedType:v}=g;if(v){const w=typeof h;if(w!==v){l.add(`${String(d)} should be of type '${v}' but received '${w}' (${h}).`);return}}if(C){const w=this.gridOptions.rowModelType??"clientSide";if(!C.includes(w)){l.add(`${String(d)} is not supported with the '${w}' row model. It is only valid with: ${C.join(", ")}.`);return}}if(f){const w=this.checkForRequiredDependencies(d,f,e);if(w){l.add(w);return}}if(m){const w=m(e,this.gridOptions,this.beans);if(w){l.add(w);return}}}),l.size>0)for(const d of l)Ns(d)}checkForRequiredDependencies(e,t,o){const i=Object.entries(t).filter(([n,r])=>{const a=o[n];return!r.required.includes(a)});return i.length===0?null:i.map(([n,r])=>`'${String(e)}' requires '${n}' to be one of [${r.required.map(a=>a===null?"null":a===void 0?"undefined":a).join(", ")}]. ${r.reason??""}`).join(`
|
|
62
|
+
`)}checkProperties(e,t,o,s,i){const n=["__ob__","__v_skip","__metadata__"],r=TT(Object.getOwnPropertyNames(e),[...n,...t,...o],o),a=Object.keys(r);for(const l of a){const c=r[l];let d=`invalid ${s} property '${l}' did you mean any of these: ${c.slice(0,8).join(", ")}.`;o.includes("context")&&(d+=`
|
|
63
|
+
If you are trying to annotate ${s} with application data, use the '${s}.context' property instead.`),Ns(d)}if(a.length>0&&i){const l=this.beans.frameworkOverrides.getDocLink(i);Ns(`to see all the valid ${s} properties please check: ${l}`)}}};function TT(e,t,o){const s={},i=e.filter(n=>!t.some(r=>r===n));if(i.length>0)for(const n of i)s[n]=Yr({inputValue:n,allSuggestions:o}).values;return s}var IT=new Set(["firstChildChanged","lastChildChanged","childIndexChanged"]),AT={moduleName:"Validation",version:I,beans:[MT]},kT={moduleName:"AllCommunity",version:I,dependsOn:[PF,YF,LD,AT,yx,Rx,Fx,Ex,xx,Px,Dx,Sx,vD,wD,bD,SD,CD,RD,FD,jD,k1,fM,gh,K1,q1,NM,LF,ww,yM,mT,h1,wT,VF,bT,ND,f1,AM,ag,zD,zM,vw,DF,YM]};function N(e,t={}){const o=Object.keys(t).map(s=>{const i=t[s];return i!=null?`${s}=${i}`:null}).filter(Boolean).join(";");return[e,o].filter(s=>s.length>0).join(":")}var B={grid(e){return N("ag-grid-root",{gridId:e})},headerGroupCell(e){return N("ag-header-group-cell",{colId:e})},headerCell(e){return N("ag-header-cell",{colId:e})},headerCheckbox(e){return N("ag-header-selection-checkbox",{colId:e})},headerFilterButton(e){return N("ag-header-cell-filter-button",{colId:e})},floatingFilter(e){return N("ag-floating-filter",{colId:e})},floatingFilterButton(e){return N("ag-floating-filter-button",{colId:e})},headerCellMenuButton(e){return N("ag-header-cell-menu-button",{colId:e})},headerResizeHandle(e){return N("ag-header-cell-resize",{colId:e})},filterInstancePickerDisplay(e){return N(`ag-${e.source}-picker-display`,Pi(e))},numberFilterInstanceInput(e){return N(`ag-${e.source}-number-input`,Pi(e))},textFilterInstanceInput(e){return N(`ag-${e.source}-text-input`,Pi(e))},dateFilterInstanceInput(e){return N(`ag-${e.source}-date-input`,Pi(e))},setFilterInstanceMiniFilterInput(e){return N(`ag-${e.source}-set-filter-mini-filter-input`,e.source==="filter-toolpanel"?{label:e.colLabel}:{colId:e.colId})},setFilterInstanceItem(e,t){return N(`ag-${e.source}-set-filter-item`,e.source==="filter-toolpanel"?{colLabel:e.colLabel,itemLabel:t}:{colId:e.colId,itemLabel:t})},setFilterApplyPanelButton(e,t){return N(`ag-${e.source}-set-filter-apply-panel-button`,e.source==="filter-toolpanel"?{colLabel:e.colLabel,buttonLabel:t}:{colId:e.colId,buttonLabel:t})},filterConditionRadioButton(e,t){return N(`ag-${e.source}-filter-condition-radio-button`,e.source==="filter-toolpanel"?{colLabel:e.colLabel,buttonLabel:t}:{colId:e.colId,buttonLabel:t})},advancedFilterInput(){return N("ag-advanced-filter-input")},advancedFilterButton(e){return N("ag-advanced-filter-button",{label:e})},advancedFilterBuilderButton(){return N("ag-advanced-filter-builder-button")},advancedFilterPanelMaximiseButton(){return N("ag-advanced-filter-builder-panel-maximise")},advancedFilterPanelCloseButton(){return N("ag-advanced-filter-builder-panel-close")},advancedFilterPill(e){return N("ag-advanced-filter-builder-pill",{label:e})},advancedFilterBuilderAddItemButton(){return N("ag-advanced-filter-builder-add-item-button")},rowNode(e){return N("ag-row",{"row-id":e})},cell(e,t){return N("ag-cell",{"row-id":e,colId:t})},autoGroupCell(e){return B.cell(e,oo)},checkbox(e,t){return N("ag-selection-checkbox",{"row-id":e,colId:t})},selectionColumnCheckbox(e){return B.checkbox(e,Ma)},autoGroupColumnCheckbox(e){return B.checkbox(e,oo)},dragHandle(e,t){return N("ag-drag-handle",{"row-id":e,colId:t})},groupContracted(e,t){return N("ag-group-contracted",{"row-id":e,colId:t})},groupExpanded(e,t){return N("ag-group-expanded",{"row-id":e,colId:t})},autoGroupContracted(e){return B.groupContracted(e,oo)},autoGroupExpanded(e){return B.groupExpanded(e,oo)},rowNumber(e){return B.cell(e,Ta)},menu(){return N("ag-menu")},menuOption(e){return N("ag-menu-option",{option:e})},sideBar(){return N("ag-side-bar")},sideBarButton(e){return N("ag-side-button",{label:e})},columnToolPanel(){return N("ag-column-panel")},pivotModeSelect(){return N("ag-pivot-mode-select")},columnPanelSelectHeaderCheckbox(){return N("ag-column-panel-select-header-checkbox")},columnPanelSelectHeaderFilter(){return N("ag-column-panel-select-header-filter")},columnSelectListItemGroupClosedIcon(e){return N("ag-column-select-list-item-group-closed-icon",{label:e})},columnSelectListItemCheckbox(e){return N("ag-column-select-list-item-checkbox",{label:e})},columnSelectListItemDragHandle(e){return N("ag-column-select-list-item-drag-handle",{label:e})},columnDropCellDragHandle(e,t,o){return N("ag-column-drop-cell-drag-handle",{source:e,area:t,label:o})},columnDropCellCancelButton(e,t,o){return N("ag-column-drop-cell-cancel",{source:e,area:t,label:o})},columnDropArea(e,t){return N("ag-column-drop-area",{source:e,name:t})},filterToolPanel(){return N("ag-filter-panel")},filterToolPanelAddFilterButton(){return N("ag-filter-panel-add-filter-button")},filterToolPanelFilterTypeSelector(e){return N("ag-filter-panel-filter-type-selector",{colLabel:e})},filterToolPanelSearchInput(){return N("ag-filter-toolpanel-search-input")},filterToolPanelGroup(e){return N("ag-filter-toolpanel-group",{title:e})},filterToolPanelGroupCollapsedIcon(e){return N("ag-filter-toolpanel-group-collapsed-icon",{title:e})},statusBarTotalAndFilteredRowCount(){return N("ag-status-bar-total-and-filtered-row-count")},statusBarTotalRowCount(){return N("ag-status-bar-total-row-count")},statusBarFilteredRowCount(){return N("ag-status-bar-filtered-row-count")},statusBarSelectedRowCount(){return N("ag-status-bar-selected-row-count")},statusBarAggregations(){return N("ag-status-bar-aggregations")},paginationPanelSizePickerDisplay(e){return N("ag-pagination-page-size-picker-field-display",{value:e})},paginationPanelFirstRowOnPage(e){return N("ag-paging-row-summary-panel-first-row-on-page",{value:e})},paginationPanelLastRowOnPage(e){return N("ag-paging-row-summary-panel-last-row-on-page",{value:e})},paginationPanelRecordCount(e){return N("ag-paging-row-summary-panel-record-count",{value:e})},paginationSummaryPanelButton(e){return N("ag-paging-page-summary-panel-btn",{label:e})},paginationSummaryPanelCurrentPage(e){return N("ag-paging-page-summary-panel-current-page",{value:e})},paginationSummaryPanelTotalPage(e){return N("ag-paging-page-summary-panel-total-page",{value:e})},fillHandle(){return N("ag-fill-handle")},columnChooserCloseButton(){return N("ag-column-chooser-close-button")},columnChooserSearchBarCheckbox(){return N("ag-column-chooser-header-checkbox")},columnChooserSearchBarFilter(){return N("ag-column-chooser-searchbar-filter")},columnChooserListItemGroupClosedIcon(e){return N("ag-column-chooser-list-item-group-closed-icon",{label:e})},columnChooserListItemCheckbox(e){return N("ag-column-chooser-list-item-checkbox",{label:e})},columnChooserListItemDragHandle(e){return N("ag-column-chooser-list-item-drag-handle",{label:e})},overlay(){return N("ag-overlay")}};function LT(e,t){const o={};for(const s of Object.keys(e))t[s]!==null&&(o[t[s]??s]=e[s]);return o}function OT(e){return e.source!=="floating-filter"?{index:0,...e}:e}function Pi(e){return LT(OT(e),{colLabel:"label"})}var Hg="data-testid";function _(e,t){e?.setAttribute(Hg,t)}function GT(e){Hg=e}var HT=class extends x{constructor(){super(...arguments),this.beanName="testIdSvc"}postConstruct(){const e=xe(this,()=>this.setupAllTestIds(),500),t=xe(this,()=>{this.setupAllTestIds(),e()},0);this.addManagedEventListeners({firstDataRendered:t,displayedRowsChanged:t,displayedColumnsChanged:t,displayedColumnsWidthChanged:t,virtualColumnsChanged:t,columnMenuVisibleChanged:t,contextMenuVisibleChanged:t,advancedFilterBuilderVisibleChanged:t,fieldPickerValueSelected:t,modelUpdated:t,sideBarUpdated:t,pinnedHeightChanged:t,gridReady:t,overlayExclusiveChanged:t,rowGroupOpened:t,scrollVisibilityChanged:t,gridSizeChanged:t,filterOpened:t,filterChanged:t,cellSelectionChanged:t})}setupAllTestIds(){const e=gt(this.beans),t=Qu(this.beans),o=e.querySelector(`[grid-id="${t}"]`);_(o,B.grid(t)),e.querySelectorAll(".ag-header-group-cell").forEach(n=>{_(n,B.headerGroupCell(n.getAttribute("col-id")))}),e.querySelectorAll(".ag-header-cell").forEach(n=>{const r=n.getAttribute("col-id"),l=n.classList.contains("ag-floating-filter")?B.floatingFilter(r):B.headerCell(r);_(n,l),_(n.querySelector(".ag-header-cell-filter-button"),B.headerFilterButton(r)),_(n.querySelector(".ag-header-cell-menu-button"),B.headerCellMenuButton(r)),_(n.querySelector(".ag-header-cell-resize"),B.headerResizeHandle(r)),_(n.querySelector(".ag-checkbox input[type=checkbox]"),B.headerCheckbox(r)),_(n.querySelector(".ag-floating-filter-button button"),B.floatingFilterButton(r)),this.setupFilterInstance(n.querySelector(".ag-floating-filter-body"),{source:"floating-filter",colId:r})});const s=e.querySelector(".ag-filter-menu");this.setupFilterInstance(s,{source:"column-filter"}),_(e.querySelector(".ag-advanced-filter input[type=text]"),B.advancedFilterInput()),e.querySelectorAll(".ag-advanced-filter-buttons button").forEach(n=>{_(n,B.advancedFilterButton(n.textContent))}),_(e.querySelector("button.ag-advanced-filter-builder-button"),B.advancedFilterBuilderButton()),e.querySelectorAll('.ag-panel[aria-label="Advanced Filter"] .ag-panel-title-bar-button').forEach((n,r)=>{_(n,r===0?B.advancedFilterPanelMaximiseButton():B.advancedFilterPanelCloseButton())}),e.querySelectorAll('.ag-panel[aria-lable="Advanced Filter"] .ag-advanced-filter-builder-pill').forEach(n=>{_(n,B.advancedFilterPill(n.querySelector(".ag-picker-field-display")?.textContent))}),_(e.querySelector('.ag-panel[aria-label="Advanced Filter"] .ag-advanced-filter-builder-item-button'),B.advancedFilterBuilderAddItemButton()),e.querySelectorAll(".ag-row").forEach(n=>{const r=n.getAttribute("row-id");_(n,B.rowNode(r)),n.querySelectorAll(".ag-cell").forEach(a=>{const l=a.getAttribute("col-id");_(a,B.cell(r,l)),_(a.querySelector(".ag-selection-checkbox input[type=checkbox]"),B.checkbox(r,l)),_(a.querySelector(".ag-drag-handle"),B.dragHandle(r,l)),_(a.querySelector(".ag-group-contracted"),B.groupContracted(r,l)),_(a.querySelector(".ag-group-expanded"),B.groupExpanded(r,l))})}),e.querySelectorAll(".ag-menu-list").forEach(n=>{_(n,B.menu()),n.querySelectorAll(".ag-menu-option").forEach(r=>{_(r,B.menuOption(r.querySelector(".ag-menu-option-text")?.textContent))})}),e.querySelectorAll(".ag-side-bar").forEach(n=>{_(n,B.sideBar()),n.querySelectorAll(".ag-side-button button").forEach(r=>{_(r,B.sideBarButton(r.querySelector(".ag-side-button-label")?.textContent))}),n.querySelectorAll(".ag-column-panel").forEach(r=>{_(r,B.columnToolPanel()),_(r.querySelector(".ag-pivot-mode-select input[type=checkbox]"),B.pivotModeSelect()),_(r.querySelector(".ag-column-select-header-checkbox input[type=checkbox]"),B.columnPanelSelectHeaderCheckbox()),_(r.querySelector(".ag-column-select-header-filter-wrapper input[type=text]"),B.columnPanelSelectHeaderFilter()),r.querySelectorAll(".ag-column-select-list").forEach(a=>{a.querySelectorAll(".ag-column-select-virtual-list-item").forEach(l=>{const c=l.getAttribute("aria-label");_(l.querySelector(".ag-column-group-closed-icon"),B.columnSelectListItemGroupClosedIcon(c)),_(l.querySelector(".ag-column-select-checkbox input[type=checkbox]"),B.columnSelectListItemCheckbox(c)),_(l.querySelector(".ag-drag-handle"),B.columnSelectListItemDragHandle(c))})}),this.setupColumnDropArea(r,"toolbar")}),n.querySelectorAll(".ag-filter-panel").forEach(r=>{_(r,B.filterToolPanel()),_(r.querySelector("button.ag-filter-add-button"),B.filterToolPanelAddFilterButton()),r.querySelectorAll(".ag-filter-card").forEach(a=>{const l=a.querySelector(".ag-filter-card-title")?.textContent,c=a.querySelector(".ag-filter-type-select");_(c,B.filterToolPanelFilterTypeSelector(l)),a.querySelectorAll(".ag-filter").forEach(d=>this.setupFilterInstance(d,{source:"filter-toolpanel",colLabel:l}))})}),n.querySelectorAll(".ag-filter-toolpanel").forEach(r=>{_(r.querySelector(".ag-filter-toolpanel-search-input input[type=text]"),B.filterToolPanelSearchInput()),r.querySelectorAll(".ag-filter-toolpanel-group").forEach(a=>{const l=a.querySelector(".ag-filter-toolpanel-group-title")?.textContent;_(a,B.filterToolPanelGroup(l)),_(a.querySelector(".ag-filter-toolpanel-group-title-bar-icon .ag-icon-tree-closed"),B.filterToolPanelGroupCollapsedIcon(l));const c=a.querySelector(".ag-filter-toolpanel-instance-filter");c&&this.setupFilterInstance(c,{source:"filter-toolpanel",colLabel:l})})})}),_(e.querySelector(".ag-status-bar .ag-status-panel-total-and-filtered-row-count"),B.statusBarTotalAndFilteredRowCount()),_(e.querySelector(".ag-status-bar .ag-status-panel-total-row-count"),B.statusBarTotalRowCount()),_(e.querySelector(".ag-status-bar .ag-status-panel-filtered-row-count"),B.statusBarFilteredRowCount()),_(e.querySelector(".ag-status-bar .ag-status-panel-selected-row-count"),B.statusBarSelectedRowCount()),_(e.querySelector(".ag-status-bar .ag-status-panel-filtered-row-count"),B.statusBarAggregations()),e.querySelectorAll(".ag-paging-panel").forEach(n=>{_(n.querySelector(".ag-paging-page-size .ag-picker-field-display"),B.paginationPanelSizePickerDisplay(n.querySelector(".ag-paging-page-size .ag-picker-field-display")?.textContent)),n.querySelectorAll(".ag-paging-row-summary-panel-number").forEach(r=>{switch(r.getAttribute("data-ref")){case"lbFirstRowOnPage":_(r,B.paginationPanelFirstRowOnPage(r.textContent));break;case"lbLastRowOnPage":_(r,B.paginationPanelLastRowOnPage(r.textContent));break;case"lbRecordCount":_(r,B.paginationPanelRecordCount(r.textContent));break}}),n.querySelectorAll(".ag-paging-page-summary-panel .ag-button").forEach(r=>{_(r,B.paginationSummaryPanelButton(r.getAttribute("aria-label")?.toLowerCase()))}),n.querySelectorAll(".ag-paging-page-summary-panel .ag-paging-number").forEach(r=>{switch(r.getAttribute("data-ref")){case"lbCurrent":_(r,B.paginationSummaryPanelCurrentPage(r.textContent));break;case"lbTotal":_(r,B.paginationSummaryPanelTotalPage(r.textContent));break}})}),_(e.querySelector(".ag-fill-handle"),B.fillHandle()),e.querySelectorAll('.ag-panel[aria-label="Choose Columns"]').forEach(n=>{_(n.querySelector(".ag-panel-title-bar-button-icon"),B.columnChooserCloseButton()),_(n.querySelector('.ag-column-select-header-checkbox input[type="checkbox"]'),B.columnChooserSearchBarCheckbox()),_(n.querySelector('.ag-column-select-header-filter-wrapper input[type="text"]'),B.columnChooserSearchBarFilter()),n.querySelectorAll(".ag-column-select-list").forEach(r=>{r.querySelectorAll(".ag-column-select-virtual-list-item").forEach(a=>{const l=a.getAttribute("aria-label");_(a.querySelector(".ag-column-group-closed-icon"),B.columnChooserListItemGroupClosedIcon(l)),_(a.querySelector(".ag-column-select-checkbox input[type=checkbox]"),B.columnChooserListItemCheckbox(l)),_(a.querySelector(".ag-drag-handle"),B.columnChooserListItemDragHandle(l))})})}),_(e.querySelector(".ag-overlay-wrapper"),B.overlay());const i=e.querySelector(".ag-column-drop-wrapper");i&&this.setupColumnDropArea(i,"panel")}setupFilterInstance(e,t){if(!e)return;e.querySelectorAll(".ag-filter-select .ag-picker-field-display").forEach(i=>{_(i,B.filterInstancePickerDisplay(t))});const o=t.source==="floating-filter"?".ag-floating-filter-body":".ag-filter-body";e.querySelectorAll(`${o} .ag-input-field:not(.ag-hidden) input[type="number"]`).forEach((i,n,r)=>{const l=r.length>1?{...t,index:n}:t;_(i,B.numberFilterInstanceInput(l))}),e.querySelectorAll(`${o} .ag-input-field:not(.ag-hidden) input[type="text"]`).forEach((i,n,r)=>{const l=r.length>1?{...t,index:n}:t;_(i,B.textFilterInstanceInput(l))}),e.querySelectorAll(`${o} .ag-input-field:not(.ag-hidden) input[type="date"]`).forEach((i,n,r)=>{const l=r.length>1?{...t,index:n}:t;_(i,B.dateFilterInstanceInput(l))});const s=e.querySelector('.ag-mini-filter input[type="text"]');_(s,B.setFilterInstanceMiniFilterInput(t)),e.querySelectorAll(".ag-set-filter-list .ag-set-filter-item").forEach(i=>{const n=i.querySelector(".ag-checkbox-label")?.textContent,r=i.querySelector('input[type="checkbox"]');_(r,B.setFilterInstanceItem(t,n))}),e.querySelectorAll(".ag-filter-apply-panel button").forEach(i=>{_(i,B.setFilterApplyPanelButton(t,i.textContent))}),e.querySelectorAll(".ag-filter-condition .ag-radio-button").forEach(i=>{const n=i.querySelector(".ag-radio-button-label")?.textContent;_(i.querySelector("input[type=radio]"),B.filterConditionRadioButton(t,n))})}setupColumnDropArea(e,t){e.querySelectorAll(".ag-column-drop").forEach(o=>{const s=o.querySelector(".ag-column-drop-list")?.getAttribute("aria-label");_(o,B.columnDropArea(t,s)),o.querySelectorAll(".ag-column-drop-cell").forEach(i=>{const n=i.querySelector(".ag-column-drop-cell-text")?.textContent;_(i.querySelector(".ag-drag-handle"),B.columnDropCellDragHandle(t,s,n)),_(i.querySelector(".ag-column-drop-cell-button .ag-icon-cancel"),B.columnDropCellCancelButton(t,s,n))})})}},BT={moduleName:"Testing",version:I,beans:[HT]};function VT({testIdAttribute:e}={}){e&>(e),jd.registerModules([BT])}var NT=class{wrap(e,t,o,s){const i=this.createWrapper(e,s);for(const n of t??[])this.createMethod(i,n,!0);for(const n of o??[])this.createMethod(i,n,!1);return i}createMethod(e,t,o){e.addMethod(t,this.createMethodProxy(e,t,o))}createMethodProxy(e,t,o){return function(){return e.hasMethod(t)?e.callMethod(t,arguments):(o&&D(49,{methodName:t}),null)}}},WT=class extends ju{constructor(e){super(e,La)}},We=p.createContext({}),Bg=p.createContext("default"),pi=(e,t,o,s)=>{if(!e||e.componentFromFramework||t.isDestroyed())return;const n=e.newAgStackInstance();let r,a,l=!1;return n.then(c=>{if(l){t.destroyBean(c);return}r=c,a=r.getGui(),o.appendChild(a),ld(s,r)}),()=>{l=!0,r&&(a?.remove(),t.destroyBean(r),s&&ld(s,void 0))}},ld=(e,t)=>{if(e)if(e instanceof Function)e(t);else{const o=e;o.current=t}},at=(...e)=>e.filter(o=>o!=null&&o!=="").join(" "),dt=class Vg{constructor(...t){this.classesMap={};for(const o of t)this.classesMap[o]=!0}setClass(t,o){if(!!this.classesMap[t]==o)return this;const i=new Vg;return i.classesMap={...this.classesMap},i.classesMap[t]=o,i}toString(){return Object.keys(this.classesMap).filter(o=>this.classesMap[o]).join(" ")}},Ms=e=>{const t=()=>typeof Symbol=="function"&&Symbol.for,o=()=>t()?Symbol.for("react.memo"):60115;return typeof e=="function"&&!(e.prototype&&e.prototype.isReactComponent)||typeof e=="object"&&e.$$typeof===o()},la=p.version?.split(".")[0],Ng=la==="16"||la==="17";function zT(){return la==="19"}var Wi=!1;function _T(e){return Wi||setTimeout(()=>Wi=!1,0),Wi=!0,e()}var ri=(e,t)=>{!Ng&&e&&!Wi?ha.flushSync(t):t()},UT=e=>{Ng?e():p.startTransition(e)};function $T(e,t,o){return p.useSyncExternalStore?p.useSyncExternalStore(e,t):o}function mn(e,t,o){if(t==null||e==null)return t;if(e===t||t.length===0&&e.length===0)return e;if(o||e.length===0&&t.length>0||e.length>0&&t.length===0)return t;const s=[],i=[],n=new Map,r=new Map;for(let a=0;a<t.length;a++){const l=t[a];r.set(l.instanceId,l)}for(let a=0;a<e.length;a++){const l=e[a];n.set(l.instanceId,l),r.has(l.instanceId)&&s.push(l)}for(let a=0;a<t.length;a++){const l=t[a],c=l.instanceId;n.has(c)||i.push(l)}return s.length===e.length&&i.length===0?e:s.length===0&&i.length===t.length?t:s.length===0?i:i.length===0?s:[...s,...i]}var Wg=p.forwardRef((e,t)=>{const{registry:o,context:s}=p.useContext(We),i=p.useRef(null),n=p.useRef(null),r=p.useRef(null),a=p.useRef(null),l=p.useRef(null),c=p.useRef(),[d,u]=p.useState(),[h,g]=p.useState(),[f,m]=p.useState(),[C,v]=p.useState(()=>new dt),[w,b]=p.useState(()=>new dt("ag-hidden")),[y,S]=p.useState(()=>new dt("ag-hidden")),[F,E]=p.useState(()=>new dt("ag-invisible"));p.useImperativeHandle(t,()=>({refresh(){return!1}})),p.useLayoutEffect(()=>pi(d,s,n.current),[d]);const G=p.useCallback(se=>{if(i.current=se,!se||s.isDestroyed()){c.current=s.destroyBean(c.current);return}const $={setInnerRenderer:(z,te)=>{u(z),m(te)},setChildCount:z=>g(z),toggleCss:(z,te)=>v(q=>q.setClass(z,te)),setContractedDisplayed:z=>S(te=>te.setClass("ag-hidden",!z)),setExpandedDisplayed:z=>b(te=>te.setClass("ag-hidden",!z)),setCheckboxVisible:z=>E(te=>te.setClass("ag-invisible",!z)),setCheckboxSpacing:z=>E(te=>te.setClass("ag-group-checkbox-spacing",z))},Z=o.createDynamicBean("groupCellRendererCtrl",!0);Z&&(c.current=s.createBean(Z),c.current.init($,se,r.current,a.current,l.current,Wg,e))},[]),k=p.useMemo(()=>`ag-cell-wrapper ${C.toString()}`,[C]),O=p.useMemo(()=>`ag-group-expanded ${w.toString()}`,[w]),P=p.useMemo(()=>`ag-group-contracted ${y.toString()}`,[y]),A=p.useMemo(()=>`ag-group-checkbox ${F.toString()}`,[F]),M=d?.componentFromFramework,J=M?d.componentClass:void 0,T=d==null&&f!=null,j=Es(f);return p.createElement("span",{className:k,ref:G,...e.colDef?{}:{role:c.current?.getCellAriaRole()}},p.createElement("span",{className:O,ref:a}),p.createElement("span",{className:P,ref:l}),p.createElement("span",{className:A,ref:r}),p.createElement("span",{className:"ag-group-value",ref:n},T?j:M?p.createElement(J,{...d.params}):null),p.createElement("span",{className:"ag-group-child-count"},h))}),cd=Wg,Fl=p.createContext({setMethods:()=>{}}),KT=e=>{const{initialProps:t,addUpdateCallback:o,CustomComponentClass:s,setMethods:i}=e,[{key:n,...r},a]=p.useState(t);return p.useEffect(()=>{o(l=>a(l))},[]),p.createElement(Fl.Provider,{value:{setMethods:i}},p.createElement(s,{key:n,...r}))},qT=p.memo(KT),jT=0;function dd(){return`agPortalKey_${++jT}`}var zg=class{constructor(e,t,o,s){this.portal=null,this.oldPortal=null,this.reactComponent=e,this.portalManager=t,this.componentType=o,this.suppressFallbackMethods=!!s,this.statelessComponent=this.isStateless(this.reactComponent),this.key=dd(),this.portalKey=dd(),this.instanceCreated=this.isStatelessComponent()?ie.resolve(!1):new ie(i=>{this.resolveInstanceCreated=i})}getGui(){return this.eParentElement}getRootElement(){return this.eParentElement.firstChild}destroy(){this.componentInstance&&typeof this.componentInstance.destroy=="function"&&this.componentInstance.destroy();const e=this.portal;e&&this.portalManager.destroyPortal(e)}createParentElement(e){const t=this.portalManager.getComponentWrappingElement(),o=document.createElement(t||"div");return o.classList.add("ag-react-container"),e.reactContainer=o,o}statelessComponentRendered(){return this.eParentElement.childElementCount>0||this.eParentElement.childNodes.length>0}getFrameworkComponentInstance(){return this.componentInstance}isStatelessComponent(){return this.statelessComponent}getReactComponentName(){return this.reactComponent.name}getMemoType(){return this.hasSymbol()?Symbol.for("react.memo"):60115}hasSymbol(){return typeof Symbol=="function"&&Symbol.for}isStateless(e){return typeof e=="function"&&!(e.prototype&&e.prototype.isReactComponent)||typeof e=="object"&&e.$$typeof===this.getMemoType()}hasMethod(e){const t=this.getFrameworkComponentInstance();return!!t&&t[e]!=null||this.fallbackMethodAvailable(e)}callMethod(e,t){const o=this.getFrameworkComponentInstance();if(this.isStatelessComponent())return this.fallbackMethod(e,t&&t[0]?t[0]:{});if(!o){setTimeout(()=>this.callMethod(e,t));return}const s=o[e];if(s)return s.apply(o,t);if(this.fallbackMethodAvailable(e))return this.fallbackMethod(e,t&&t[0]?t[0]:{})}addMethod(e,t){this[e]=t}init(e){return this.eParentElement=this.createParentElement(e),this.createOrUpdatePortal(e),new ie(t=>this.createReactComponent(t))}createOrUpdatePortal(e){this.isStatelessComponent()||(this.ref=t=>{this.componentInstance=t,this.resolveInstanceCreated?.(!0),this.resolveInstanceCreated=void 0},e.ref=this.ref),this.reactElement=this.createElement(this.reactComponent,{...e,key:this.key}),this.portal=ha.createPortal(this.reactElement,this.eParentElement,this.portalKey)}createElement(e,t){return p.createElement(e,t)}createReactComponent(e){this.portalManager.mountReactPortal(this.portal,this,e)}rendered(){return this.isStatelessComponent()&&this.statelessComponentRendered()||!!(!this.isStatelessComponent()&&this.getFrameworkComponentInstance())}refreshComponent(e){this.oldPortal=this.portal,this.createOrUpdatePortal(e),this.portalManager.updateReactPortal(this.oldPortal,this.portal)}fallbackMethod(e,t){const o=this[`${e}Component`];if(!this.suppressFallbackMethods&&o)return o.bind(this)(t)}fallbackMethodAvailable(e){return this.suppressFallbackMethods?!1:!!this[`${e}Component`]}};function Hn(e,t,o){for(const s of e){const i=t[s];i&&(o[s]=i)}}var ht=class extends zg{constructor(){super(...arguments),this.awaitUpdateCallback=new ie(e=>{this.resolveUpdateCallback=e}),this.wrapperComponent=qT}init(e){return this.sourceParams=e,super.init(this.getProps())}addMethod(){}getInstance(){return this.instanceCreated.then(()=>this.componentInstance)}getFrameworkComponentInstance(){return this}createElement(e,t){return super.createElement(this.wrapperComponent,{initialProps:t,CustomComponentClass:e,setMethods:o=>this.setMethods(o),addUpdateCallback:o=>{this.updateCallback=()=>(o(this.getProps()),new ie(s=>{setTimeout(()=>{s()})})),this.resolveUpdateCallback()}})}setMethods(e){this.providedMethods=e,Hn(this.getOptionalMethods(),this.providedMethods,this)}getOptionalMethods(){return[]}getProps(){return{...this.sourceParams,key:this.key,ref:this.ref}}refreshProps(){return this.updateCallback?this.updateCallback():new ie(e=>this.awaitUpdateCallback.then(()=>{this.updateCallback().then(()=>e())}))}},YT=class extends ht{refresh(e){return this.sourceParams=e,this.refreshProps(),!0}},QT=class extends ht{refresh(e){this.sourceParams=e,this.refreshProps()}},ZT=class extends ht{constructor(){super(...arguments),this.date=null,this.onDateChange=e=>this.updateDate(e)}getDate(){return this.date}setDate(e){this.date=e,this.refreshProps()}refresh(e){this.sourceParams=e,this.refreshProps()}getOptionalMethods(){return["afterGuiAttached","setInputPlaceholder","setInputAriaLabel","setDisabled"]}updateDate(e){this.setDate(e),this.sourceParams.onDateChanged()}getProps(){const e=super.getProps();return e.date=this.date,e.onDateChange=this.onDateChange,delete e.onDateChanged,e}},JT=class extends ht{constructor(){super(...arguments),this.label="",this.icon=null,this.shake=!1}setIcon(e,t){this.icon=e,this.shake=t,this.refreshProps()}setLabel(e){this.label=e,this.refreshProps()}getProps(){const e=super.getProps(),{label:t,icon:o,shake:s}=this;return e.label=t,e.icon=o,e.shake=s,e}},XT=class extends ht{constructor(){super(...arguments),this.model=null,this.onModelChange=e=>this.updateModel(e),this.onUiChange=()=>this.sourceParams.filterModifiedCallback(),this.expectingNewMethods=!0,this.hasBeenActive=!1,this.awaitSetMethodsCallback=new ie(e=>{this.resolveSetMethodsCallback=e})}isFilterActive(){return this.model!=null}doesFilterPass(e){return this.providedMethods.doesFilterPass(e)}getModel(){return this.model}setModel(e){return this.expectingNewMethods=!0,this.model=e,this.hasBeenActive||(this.hasBeenActive=this.isFilterActive()),this.refreshProps()}refresh(e){return this.sourceParams=e,this.refreshProps(),!0}afterGuiAttached(e){const t=this.providedMethods;t?t.afterGuiAttached?.(e):this.awaitSetMethodsCallback.then(()=>this.providedMethods?.afterGuiAttached?.(e))}getOptionalMethods(){return["afterGuiDetached","onNewRowsLoaded","getModelAsString","onAnyFilterChanged"]}setMethods(e){this.expectingNewMethods===!1&&this.hasBeenActive&&this.providedMethods?.doesFilterPass!==e?.doesFilterPass&&setTimeout(()=>{this.sourceParams.filterChangedCallback()}),this.expectingNewMethods=!1,super.setMethods(e),this.resolveSetMethodsCallback(),this.resolveFilterPassCallback?.(),this.resolveFilterPassCallback=void 0}updateModel(e){this.resolveFilterPassCallback?.();const t=new ie(o=>{this.resolveFilterPassCallback=o});this.setModel(e).then(()=>{t.then(()=>{this.sourceParams.filterChangedCallback()})})}getProps(){const e=super.getProps();return e.model=this.model,e.onModelChange=this.onModelChange,e.onUiChange=this.onUiChange,delete e.filterChangedCallback,e}},e2=class extends ht{constructor(){super(...arguments),this.awaitSetMethodsCallback=new ie(e=>{this.resolveSetMethodsCallback=e})}refresh(e){return this.sourceParams=e,this.refreshProps(),!0}afterGuiAttached(e){const t=this.providedMethods;t?t.afterGuiAttached?.(e):this.awaitSetMethodsCallback.then(()=>this.providedMethods?.afterGuiAttached?.(e))}getOptionalMethods(){return["afterGuiDetached","onNewRowsLoaded","onAnyFilterChanged"]}setMethods(e){super.setMethods(e),this.resolveSetMethodsCallback()}};function _g(e,t){e.parentFilterInstance(o=>{(o.setModel(t)||ie.resolve()).then(()=>{e.filterParams.filterChangedCallback()})})}var t2=class{constructor(e,t){this.floatingFilterParams=e,this.refreshProps=t,this.model=null,this.onModelChange=o=>this.updateModel(o)}getProps(){return{...this.floatingFilterParams,model:this.model,onModelChange:this.onModelChange}}onParentModelChanged(e){this.model=e,this.refreshProps()}refresh(e){this.floatingFilterParams=e,this.refreshProps()}setMethods(e){Hn(this.getOptionalMethods(),e,this)}getOptionalMethods(){return["afterGuiAttached"]}updateModel(e){this.model=e,this.refreshProps(),_g(this.floatingFilterParams,e)}},o2=class extends ht{constructor(){super(...arguments),this.model=null,this.onModelChange=e=>this.updateModel(e)}onParentModelChanged(e){this.model=e,this.refreshProps()}refresh(e){this.sourceParams=e,this.refreshProps()}getOptionalMethods(){return["afterGuiAttached"]}updateModel(e){this.model=e,this.refreshProps(),_g(this.sourceParams,e)}getProps(){const e=super.getProps();return e.model=this.model,e.onModelChange=this.onModelChange,e}},s2=class extends ht{refresh(e){this.sourceParams=e,this.refreshProps()}getOptionalMethods(){return["afterGuiAttached"]}},i2=class extends ht{refresh(e){return this.sourceParams=e,this.refreshProps(),!0}},n2=class extends ht{constructor(){super(...arguments),this.active=!1,this.expanded=!1,this.onActiveChange=e=>this.updateActive(e)}setActive(e){this.awaitSetActive(e)}setExpanded(e){this.expanded=e,this.refreshProps()}getOptionalMethods(){return["select","configureDefaults"]}awaitSetActive(e){return this.active=e,this.refreshProps()}updateActive(e){const t=this.awaitSetActive(e);e&&t.then(()=>this.sourceParams.onItemActivated())}getProps(){const e=super.getProps();return e.active=this.active,e.expanded=this.expanded,e.onActiveChange=this.onActiveChange,delete e.onItemActivated,e}},r2=class extends ht{refresh(e){return this.sourceParams=e,this.refreshProps(),!0}},a2=class extends ht{constructor(){super(...arguments),this.onStateChange=e=>this.updateState(e)}refresh(e){return this.sourceParams=e,this.refreshProps(),!0}getState(){return this.state}updateState(e){this.state=e,this.refreshProps(),this.sourceParams.onStateUpdated()}getProps(){const e=super.getProps();return e.state=this.state,e.onStateChange=this.onStateChange,e}};function El(){D(231)}var l2=1e3,c2=class{constructor(e,t,o){this.destroyed=!1,this.portals=[],this.hasPendingPortalUpdate=!1,this.wrappingElement=t||"div",this.refresher=e,this.maxComponentCreationTimeMs=o||l2}getPortals(){return this.portals}destroy(){this.destroyed=!0}destroyPortal(e){this.portals=this.portals.filter(t=>t!==e),this.batchUpdate()}getComponentWrappingElement(){return this.wrappingElement}mountReactPortal(e,t,o){this.portals=[...this.portals,e],this.waitForInstance(t,o),this.batchUpdate()}updateReactPortal(e,t){this.portals[this.portals.indexOf(e)]=t,this.batchUpdate()}batchUpdate(){this.hasPendingPortalUpdate||(setTimeout(()=>{this.destroyed||(this.refresher(),this.hasPendingPortalUpdate=!1)}),this.hasPendingPortalUpdate=!0)}waitForInstance(e,t,o=Date.now()){if(this.destroyed){t(null);return}if(e.rendered())t(e);else{if(Date.now()-o>=this.maxComponentCreationTimeMs&&!this.hasPendingPortalUpdate){ri(!0,()=>this.refresher()),e.rendered()&&t(e);return}window.setTimeout(()=>{this.waitForInstance(e,t,o)})}}},d2=p.createContext([]),u2=p.createContext(void 0),h2=({ctrl:e})=>{const t=e.isAlive(),{context:o}=p.useContext(We),[s,i]=p.useState(),[n,r]=p.useState(),a=p.useRef(),l=p.useRef(null),c=p.useRef(null),d=p.useRef(null),u=p.useRef(),h=p.useRef();t&&!h.current&&(h.current=new ai(()=>l.current));const g=p.useCallback(v=>{if(l.current=v,!v||!e.isAlive()||o.isDestroyed()){a.current=o.destroyBean(a.current);return}a.current=o.createBean(new Ds);const w=()=>{const y=e.getSelectAllGui();y&&(c.current?.insertAdjacentElement("afterend",y),a.current.addDestroyFunc(()=>y.remove()))},b={setWidth:y=>{l.current&&(l.current.style.width=y)},toggleCss:(y,S)=>h.current.toggleCss(y,S),setUserStyles:y=>r(y),setAriaSort:y=>{l.current&&(y?Np(l.current,y):Wp(l.current))},setUserCompDetails:y=>i(y),getUserCompInstance:()=>u.current||void 0,refreshSelectAllGui:w,removeSelectAllGui:()=>e.getSelectAllGui()?.remove()};e.setComp(b,v,c.current,d.current,a.current),w()},[]);p.useLayoutEffect(()=>pi(s,o,d.current,u),[s]),p.useEffect(()=>{e.setDragSource(l.current)},[s]);const f=p.useMemo(()=>!!(s?.componentFromFramework&&Ms(s.componentClass)),[s]),m=s?.componentFromFramework,C=s?.componentClass;return p.createElement("div",{ref:g,style:n,className:"ag-header-cell",role:"columnheader"},p.createElement("div",{ref:c,className:"ag-header-cell-resize",role:"presentation"}),p.createElement("div",{ref:d,className:"ag-header-cell-comp-wrapper",role:"presentation"},m?f?p.createElement(C,{...s.params}):p.createElement(C,{...s.params,ref:u}):null))},g2=p.memo(h2),p2=class{constructor(e,t){this.floatingFilterParams=e,this.refreshProps=t}getProps(){return this.floatingFilterParams}refresh(e){this.floatingFilterParams=e,this.refreshProps()}setMethods(e){Hn(this.getOptionalMethods(),e,this)}getOptionalMethods(){return["afterGuiAttached"]}},f2=({ctrl:e})=>{const{context:t,gos:o}=p.useContext(We),[s,i]=p.useState(),[n,r]=p.useState(()=>new dt("ag-header-cell","ag-floating-filter")),[a,l]=p.useState(()=>new dt),[c,d]=p.useState(()=>new dt("ag-floating-filter-button","ag-hidden")),[u,h]=p.useState("false"),[g,f]=p.useState(),[,m]=p.useState(1),C=p.useRef(),v=p.useRef(null),w=p.useRef(null),b=p.useRef(null),y=p.useRef(null),S=p.useRef(),F=p.useRef(),E=z=>{z!=null&&S.current?.(z)},G=p.useCallback(z=>{if(v.current=z,!z||!e.isAlive()||t.isDestroyed()){C.current=t.destroyBean(C.current);return}C.current=t.createBean(new Ds),F.current=new ie(q=>{S.current=q});const te={toggleCss:(q,oe)=>r(de=>de.setClass(q,oe)),setUserStyles:q=>i(q),addOrRemoveBodyCssClass:(q,oe)=>l(de=>de.setClass(q,oe)),setButtonWrapperDisplayed:q=>{d(oe=>oe.setClass("ag-hidden",!q)),h(q?"false":"true")},setWidth:q=>{v.current&&(v.current.style.width=q)},setCompDetails:q=>f(q),getFloatingFilterComp:()=>F.current?F.current:null,setMenuIcon:q=>y.current?.appendChild(q)};e.setComp(te,z,y.current,w.current,C.current)},[]);p.useLayoutEffect(()=>pi(g,t,w.current,E),[g]);const k=p.useMemo(()=>n.toString(),[n]),O=p.useMemo(()=>a.toString(),[a]),P=p.useMemo(()=>c.toString(),[c]),A=p.useMemo(()=>!!(g&&g.componentFromFramework&&Ms(g.componentClass)),[g]),M=p.useMemo(()=>o.get("reactiveCustomComponents"),[]),J=p.useMemo(()=>o.get("enableFilterHandlers"),[]),[T,j]=p.useState();p.useEffect(()=>{if(g?.componentFromFramework)if(M){const z=J?p2:t2,te=new z(g.params,()=>m(q=>q+1));E(te),j(te)}else El()},[g]);const se=T?.getProps(),$=g?.componentFromFramework,Z=g?.componentClass;return p.createElement("div",{ref:G,style:s,className:k,role:"gridcell"},p.createElement("div",{ref:w,className:O,role:"presentation"},$?M?se&&p.createElement(Fl.Provider,{value:{setMethods:z=>T.setMethods(z)}},p.createElement(Z,{...se})):p.createElement(Z,{...g.params,ref:A?()=>{}:E}):null),p.createElement("div",{ref:b,"aria-hidden":u,className:P,role:"presentation"},p.createElement("button",{ref:y,type:"button",className:"ag-button ag-floating-filter-button-button",tabIndex:-1})))},m2=p.memo(f2),C2=({ctrl:e})=>{const{context:t}=p.useContext(We),[o,s]=p.useState(),[i,n]=p.useState(()=>new dt),[r,a]=p.useState(()=>new dt),[l,c]=p.useState("false"),[d,u]=p.useState(),[h,g]=p.useState(),f=p.useRef(),m=p.useRef(null),C=p.useRef(null),v=p.useRef(null),w=p.useRef(),b=p.useCallback(k=>{if(m.current=k,!k||!e.isAlive()||t.isDestroyed()){f.current=t.destroyBean(f.current);return}f.current=t.createBean(new Ds);const O={setWidth:P=>{m.current&&(m.current.style.width=P)},toggleCss:(P,A)=>n(M=>M.setClass(P,A)),setUserStyles:P=>s(P),setHeaderWrapperHidden:P=>{const A=v.current;A&&(P?A.style.setProperty("display","none"):A.style.removeProperty("display"))},setHeaderWrapperMaxHeight:P=>{const A=v.current;A&&(P!=null?A.style.setProperty("max-height",`${P}px`):A.style.removeProperty("max-height"),A.classList.toggle("ag-header-cell-comp-wrapper-limited-height",P!=null))},setUserCompDetails:P=>g(P),setResizableDisplayed:P=>{a(A=>A.setClass("ag-hidden",!P)),c(P?"false":"true")},setAriaExpanded:P=>u(P),getUserCompInstance:()=>w.current||void 0};e.setComp(O,k,C.current,v.current,f.current)},[]);p.useLayoutEffect(()=>pi(h,t,v.current),[h]),p.useEffect(()=>{m.current&&e.setDragSource(m.current)},[h]);const y=p.useMemo(()=>!!(h?.componentFromFramework&&Ms(h.componentClass)),[h]),S=p.useMemo(()=>"ag-header-group-cell "+i.toString(),[i]),F=p.useMemo(()=>"ag-header-cell-resize "+r.toString(),[r]),E=h?.componentFromFramework,G=h?.componentClass;return p.createElement("div",{ref:b,style:o,className:S,role:"columnheader","aria-expanded":d},p.createElement("div",{ref:v,className:"ag-header-cell-comp-wrapper",role:"presentation"},E?y?p.createElement(G,{...h.params}):p.createElement(G,{...h.params,ref:w}):null),p.createElement("div",{ref:C,"aria-hidden":l,className:F}))},v2=p.memo(C2),w2=({ctrl:e})=>{const{gos:t,context:o}=p.useContext(We),{topOffset:s,rowHeight:i}=p.useMemo(()=>e.getTopAndHeight(),[]),n=p.useMemo(()=>t.get("tabIndex"),[]),[r,a]=p.useState(()=>e.getAriaRowIndex()),l=e.headerRowClass,[c,d]=p.useState(()=>i+"px"),[u,h]=p.useState(()=>s+"px"),g=p.useRef(null),[f,m]=p.useState(()=>e.getUpdatedHeaderCtrls()),C=p.useRef(),v=p.useRef(null),w=p.useCallback(S=>{if(v.current=S,!S||!e.isAlive()||o.isDestroyed()){C.current=o.destroyBean(C.current);return}C.current=o.createBean(new Ds);const F={setHeight:E=>d(E),setTop:E=>h(E),setHeaderCtrls:(E,G,k)=>{const O=g.current,P=mn(O,E,G);P!==O&&(g.current=P,ri(k,()=>m(P)))},setWidth:E=>{v.current&&(v.current.style.width=E)},setRowIndex:E=>{a(E)}};e.setComp(F,C.current,!1)},[]),b=p.useMemo(()=>({height:c,top:u}),[c,u]),y=p.useCallback(S=>{switch(e.type){case"group":return p.createElement(v2,{ctrl:S,key:S.instanceId});case"filter":return p.createElement(m2,{ctrl:S,key:S.instanceId});default:return p.createElement(g2,{ctrl:S,key:S.instanceId})}},[]);return p.createElement("div",{ref:w,className:l,role:"row",style:b,tabIndex:n,"aria-rowindex":r},f.map(y))},b2=p.memo(w2),S2=({pinned:e})=>{const[t,o]=p.useState(!0),[s,i]=p.useState([]),{context:n}=p.useContext(We),r=p.useRef(null),a=p.useRef(null),l=p.useRef(),c=e==="left",d=e==="right",u=!c&&!d,h=p.useCallback(m=>{if(r.current=m,!m||n.isDestroyed()){l.current=n.destroyBean(l.current);return}l.current=n.createBean(new tv(e));const C={setDisplayed:o,setCtrls:v=>i(v),setCenterWidth:v=>{a.current&&(a.current.style.width=v)},setViewportScrollLeft:v=>{r.current&&(r.current.scrollLeft=v)},setPinnedContainerWidth:v=>{r.current&&(r.current.style.width=v,r.current.style.minWidth=v,r.current.style.maxWidth=v)}};l.current.setComp(C,r.current)},[]),g=t?"":"ag-hidden",f=()=>s.map(m=>p.createElement(b2,{ctrl:m,key:m.instanceId}));return c?p.createElement("div",{ref:h,className:"ag-pinned-left-header "+g,"aria-hidden":!t,role:"rowgroup"},f()):d?p.createElement("div",{ref:h,className:"ag-pinned-right-header "+g,"aria-hidden":!t,role:"rowgroup"},f()):u?p.createElement("div",{ref:h,className:"ag-header-viewport "+g,role:"rowgroup",tabIndex:-1},p.createElement("div",{ref:a,className:"ag-header-container",role:"presentation"},f())):null},vr=p.memo(S2),y2=()=>{const[e,t]=p.useState(()=>new dt),[o,s]=p.useState(),{context:i}=p.useContext(We),n=p.useRef(null),r=p.useRef(),a=p.useCallback(d=>{if(n.current=d,!d||i.isDestroyed()){r.current=i.destroyBean(r.current);return}r.current=i.createBean(new qC);const u={toggleCss:(h,g)=>t(f=>f.setClass(h,g)),setHeightAndMinHeight:h=>s(h)};r.current.setComp(u,d,d)},[]),l=p.useMemo(()=>"ag-header "+e.toString(),[e]),c=p.useMemo(()=>({height:o,minHeight:o}),[o]);return p.createElement("div",{ref:a,className:l,style:c,role:"presentation"},p.createElement(vr,{pinned:"left"}),p.createElement(vr,{pinned:null}),p.createElement(vr,{pinned:"right"}))},R2=p.memo(y2),F2=(e,t)=>{p.useEffect(()=>{const o=t.current;if(o){const s=o.parentElement;if(s){const i=document.createComment(e);return s.insertBefore(i,o),()=>{i.remove()}}}},[e])},Ro=F2,E2=class{constructor(e,t){this.cellEditorParams=e,this.refreshProps=t,this.instanceCreated=new ie(o=>{this.resolveInstanceCreated=o}),this.onValueChange=o=>this.updateValue(o),this.value=e.value}getProps(){return{...this.cellEditorParams,initialValue:this.cellEditorParams.value,value:this.value,onValueChange:this.onValueChange}}getValue(){return this.value}refresh(e){this.cellEditorParams=e,this.refreshProps()}setMethods(e){Hn(this.getOptionalMethods(),e,this)}getInstance(){return this.instanceCreated.then(()=>this.componentInstance)}setRef(e){this.componentInstance=e,this.resolveInstanceCreated?.(),this.resolveInstanceCreated=void 0}getOptionalMethods(){return["isCancelBeforeStart","isCancelAfterEnd","focusIn","focusOut","afterGuiAttached","getValidationErrors","getValidationElement"]}updateValue(e){this.value=e,this.refreshProps()}},x2=e=>{const t=p.useRef(e),o=p.useRef(),s=p.useRef(!1),i=p.useRef(!1),[,n]=p.useState(0);s.current&&(i.current=!0),p.useEffect(()=>(s.current||(o.current=t.current(),s.current=!0),n(r=>r+1),()=>{i.current&&o.current?.()}),[])},P2=e=>{const[t,o]=p.useState(),s=p.useContext(We),{context:i,popupSvc:n,gos:r,editSvc:a}=s,{editDetails:l,cellCtrl:c,eParentCell:d}=e;return x2(()=>{const{compDetails:u}=l,h=r.get("stopEditingWhenCellsLoseFocus");let g,f;if(!i.isDestroyed()){f=i.createBean(a.createPopupEditorWrapper(u.params));const m=f.getGui();if(e.jsChildComp){const S=e.jsChildComp.getGui();S&&m.appendChild(S)}const{column:C,rowNode:v}=c,w={column:C,rowNode:v,type:"popupCellEditor",eventSource:d,ePopup:m,position:l.popupPosition,keepWithinBounds:!0},b=n?.positionPopupByComponent.bind(n,w),y=n?.addPopup({modal:h,eChild:m,closeOnEsc:!0,closedCallback:S=>{c.onPopupEditorClosed(S)},anchorToElement:d,positionCallback:b,ariaOwns:d});g=y?y.hideFunc:void 0,o(f),e.jsChildComp?.afterGuiAttached?.()}return()=>{g?.(),i.destroyBean(f)}}),p.useLayoutEffect(()=>()=>{c.isCellFocused()&&t?.getGui().contains(ve(s))&&d.focus({preventScroll:!0})},[t]),t&&e.wrappedContent?ha.createPortal(e.wrappedContent,t.getGui()):null},ud=p.memo(P2),D2=(e,t,o)=>{const{compProxy:s}=e;o(s);const i=s.getProps(),n=Ms(t);return p.createElement(Fl.Provider,{value:{setMethods:r=>s.setMethods(r)}},n?p.createElement(t,{...i}):p.createElement(t,{...i,ref:r=>s.setRef(r)}))},hd=(e,t,o)=>e.compProxy?D2(e,t,o):p.createElement(t,{...e.compDetails.params,ref:o}),M2=(e,t,o,s,i)=>{const n=e.compDetails,r=n.componentClass,a=n.componentFromFramework&&!e.popup,l=n.componentFromFramework&&e.popup,c=!n.componentFromFramework&&e.popup;return a?hd(e,r,t):l?p.createElement(ud,{editDetails:e,cellCtrl:s,eParentCell:o,wrappedContent:hd(e,r,t)}):c&&i?p.createElement(ud,{editDetails:e,cellCtrl:s,eParentCell:o,jsChildComp:i}):null},T2=(e,t,o,s,i,n,r=!1)=>{const{context:a}=p.useContext(We),l=p.useCallback(()=>{const c=i.current;if(!c)return;const d=c.getGui();d&&d.parentElement&&d.remove(),a.destroyBean(c),i.current=void 0},[]);p.useEffect(()=>{const c=e!=null&&!r,d=e?.compDetails&&!e.compDetails.componentFromFramework,u=t&&o==null;if(!(c&&d&&!u)){l();return}const g=e.compDetails;if(i.current){const m=i.current,v=m.refresh!=null&&e.force==!1?m.refresh(g.params):!1;if(v===!0||v===void 0)return;l()}g.newAgStackInstance().then(m=>{if(!m)return;const C=m.getGui();if(!C)return;(t?o:n.current).appendChild(C),i.current=m})},[e,t,s,r]),p.useEffect(()=>l,[])},Ug=T2,I2=({cellCtrl:e,parent:t})=>{const o=p.useRef(),s=p.useMemo(()=>{const{loadingComp:i}=e.getDeferLoadingCellRenderer();return i?{value:void 0,compDetails:i,force:!1}:void 0},[e]);if(Ug(s,!1,void 0,1,o,t),s?.compDetails?.componentFromFramework){const i=s.compDetails.componentClass;return p.createElement(i,{...s.compDetails.params})}return p.createElement(p.Fragment,null)},A2=({cellCtrl:e,printLayout:t,editingCell:o})=>{const s=p.useContext(We),{context:i}=s,{column:{colIdSanitised:n},instanceId:r}=e,a=p.useRef(),[l,c]=p.useState(()=>e.isCellRenderer()?void 0:{compDetails:void 0,value:e.getValueToDisplay(),force:!1}),[d,u]=p.useState(),[h,g]=p.useState(1),[f,m]=p.useState(),[C,v]=p.useState(!1),[w,b]=p.useState(!1),[y,S]=p.useState(!1),F=p.useRef(null),[E,G]=p.useState(),k=p.useMemo(()=>e.isForceWrapper(),[e]),O=p.useMemo(()=>e.getCellAriaRole(),[e]),P=p.useRef(null),A=p.useRef(null),M=p.useRef(null),J=p.useRef(),T=p.useRef(),j=p.useRef(),se=p.useRef([]),$=p.useRef(),Z=p.useRef(),[z,te]=p.useState(0),q=p.useCallback(ee=>{Z.current=ee,te(ae=>ae+1)},[]),oe=l!=null&&(C||y||w)&&(d==null||!!d.popup),de=k||oe,Oe=p.useMemo(()=>e.getCellValueClass(),[e]),Ge=p.useCallback(ee=>{if(T.current=ee,ee){const ae=ee.isCancelBeforeStart&&ee.isCancelBeforeStart();setTimeout(()=>{ae?(e.stopEditing(!0),e.focusCell(!0)):(e.cellEditorAttached(),e.enableEditorTooltipFeature(ee))})}},[e]),je=p.useRef();je.current||(je.current=new ai(()=>P.current));const St=!!d&&!d.popup;Ug(l,de,Z.current,z,J,P,St);const yt=p.useRef();p.useLayoutEffect(()=>{const ee=yt.current,ae=l;if(yt.current=l,ee==null||ee.compDetails==null||ae==null||ae.compDetails==null)return;$.current?.refreshVisibility();const Ce=ee.compDetails,ue=ae.compDetails;if(Ce.componentClass!=ue.componentClass||M.current?.refresh==null)return;M.current.refresh(ue.params)!=!0&&g(Re=>Re+1)},[l]),p.useLayoutEffect(()=>{if(!(d&&!d.compDetails.componentFromFramework)||i.isDestroyed())return;const ae=d.compDetails,Ce=d.popup===!0,ue=ae.newAgStackInstance();return ue.then(X=>{if(!X)return;const Re=X.getGui();Ge(X),Ce||((k?j:P).current?.appendChild(Re),X.afterGuiAttached?.()),G(X)}),()=>{ue.then(X=>{const Re=X.getGui();e.disableEditorTooltipFeature(),i.destroyBean(X),Ge(void 0),G(void 0),Re?.remove()})}},[d]);const ge=p.useCallback(ee=>{if(j.current=ee,!ee||i.isDestroyed()||!e.isAlive()){const ue=se.current;se.current=[];for(const X of ue)X();return}let ae;const Ce=ue=>{ue&&(ee.insertAdjacentElement("afterbegin",ue.getGui()),se.current.push(()=>{_t(ue.getGui()),i.destroyBean(ue),$.current===ae&&($.current=void 0)}))};C&&Ce(e.createSelectionCheckbox()),y&&Ce(e.createDndSource()),w&&(ae=e.createRowDragComp(),$.current=ae,ae&&(Ce(ae),ae.refreshVisibility()))},[e,i,y,w,C]),U=p.useCallback(()=>{const ee=!e.isCellSpanning()||A.current,ae=P.current;if(!ae||!ee||!e||!e.isAlive()||i.isDestroyed()){a.current=i.destroyBean(a.current);return}a.current=i.createBean(new Ds);const Ce={toggleCss:(X,Re)=>je.current.toggleCss(X,Re),setUserStyles:X=>m(X),getFocusableElement:()=>P.current,setIncludeSelection:X=>v(X),setIncludeRowDrag:X=>b(X),setIncludeDndSource:X=>S(X),setRowResizerElement:X=>{F.current&&_t(F.current),F.current=X,X&&P.current&&P.current.appendChild(X)},getCellEditor:()=>T.current??null,getCellRenderer:()=>M.current??J.current,getParentOfValue:()=>Z.current??j.current??P.current,setRenderDetails:(X,Re,He)=>{const Co=()=>{c(tt=>tt?.compDetails!==X||tt?.value!==Re||tt?.force!==He?{value:Re,compDetails:X,force:He}:tt)};if(X?.params?.deferRender&&!e.rowNode.group){const{loadingComp:tt,onReady:Ko}=e.getDeferLoadingCellRenderer();if(tt){c({value:void 0,compDetails:tt,force:!1}),Ko.then(()=>UT(Co));return}}Co()},setEditDetails:(X,Re,He,Co)=>{if(X){let tt;X.componentFromFramework&&(Co?tt=new E2(X.params,()=>g(Ko=>Ko+1)):El()),u({compDetails:X,popup:Re,popupPosition:He,compProxy:tt}),Re||c(void 0)}else e.hasBrowserFocus()&&Ce.getFocusableElement().focus({preventScroll:!0}),T.current=void 0,u(void 0)},refreshEditStyles:(X,Re)=>{if(!P.current)return;const{current:He}=je;He.toggleCss("ag-cell-value",!de),He.toggleCss("ag-cell-inline-editing",!!X&&!Re),He.toggleCss("ag-cell-popup-editing",!!X&&!!Re),He.toggleCss("ag-cell-not-inline-editing",!X||!!Re)}},ue=j.current||void 0;e.setComp(Ce,ae,A.current??void 0,ue,t,o,a.current)},[]),ne=p.useCallback(ee=>{P.current=ee,U()},[]),V=p.useCallback(ee=>{A.current=ee,U()},[]),Q=p.useMemo(()=>!!(l?.compDetails?.componentFromFramework&&Ms(l.compDetails.componentClass)),[l]);p.useLayoutEffect(()=>{if(!P.current)return;const{current:ee}=je;ee.toggleCss("ag-cell-value",!de),ee.toggleCss("ag-cell-inline-editing",!!d&&!d.popup),ee.toggleCss("ag-cell-popup-editing",!!d&&!!d.popup),ee.toggleCss("ag-cell-not-inline-editing",!d||!!d.popup)});const le=()=>{const{compDetails:ee,value:ae}=l;if(!ee)return ae?.toString?.()??ae;if(ee.componentFromFramework){const Ce=ee.componentClass;return p.createElement(p.Suspense,{fallback:p.createElement(I2,{cellCtrl:e,parent:P})},Q?p.createElement(Ce,{...ee.params,key:h}):p.createElement(Ce,{...ee.params,key:h,ref:M}))}},Me=()=>{const ee=()=>l==null?null:de?p.createElement("span",{role:"presentation",id:`cell-${r}`,className:Oe,ref:q},le()):le(),ae=Ce=>M2(Ce,Ge,P.current,e,E);return d!=null?d.popup?p.createElement(p.Fragment,null,ee(),ae(d)):ae(d):ee()},Ae=()=>p.createElement("div",{ref:ne,style:f,role:O,"col-id":n},de?p.createElement("div",{className:"ag-cell-wrapper",role:"presentation",ref:ge},Me()):Me());return e.isCellSpanning()?p.createElement("div",{ref:V,className:"ag-spanned-cell-wrapper",role:"presentation"},Ae()):Ae()},k2=p.memo(A2),L2=({rowCtrl:e,containerType:t})=>{const{context:o,gos:s,editSvc:i}=p.useContext(We),n=p.useContext(Bg)==="default",r=p.useRef(),a=p.useRef(e.getDomOrder()),l=e.isFullWidth(),c=e.rowNode.displayed,[d,u]=p.useState(()=>c?e.rowNode.getRowIndexString():null),[h,g]=p.useState(()=>e.rowId),[f,m]=p.useState(()=>e.businessKey),[C,v]=p.useState(()=>e.rowStyles),w=p.useRef(null),[b,y]=p.useState(()=>null),[S,F]=p.useState(),[E,G]=p.useState(()=>c?e.getInitialRowTop(t):void 0),[k,O]=p.useState(()=>c?e.getInitialTransform(t):void 0),P=p.useRef(null),A=p.useRef(),M=p.useRef(),J=p.useRef(!1),[T,j]=p.useState(0);p.useEffect(()=>{if(J.current||!S||T>10)return;const ge=P.current?.firstChild;ge?(e.setupDetailRowAutoHeight(ge),J.current=!0):j(U=>U+1)},[S,T]);const se=p.useRef();se.current||(se.current=new ai(()=>P.current));const $=p.useRef(()=>{}),Z=p.useCallback(ge=>($.current=ge,()=>{$.current=()=>{}}),[]),z=$T(Z,()=>w.current,[]),te=n?z:b,q=p.useCallback(ge=>{if(P.current=ge,r.current=ge?o.createBean(new Ds):o.destroyBean(r.current),!ge){e.unsetComp(t);return}if(!e.isAlive()||o.isDestroyed())return;const U={setTop:G,setTransform:O,toggleCss:(ne,V)=>se.current.toggleCss(ne,V),setDomOrder:ne=>a.current=ne,setRowIndex:u,setRowId:g,setRowBusinessKey:m,setUserStyles:v,setCellCtrls:(ne,V)=>{const Q=w.current,le=mn(Q,ne,a.current);le!==Q&&(w.current=le,n?$.current():ri(V,()=>y(le)))},showFullWidth:ne=>{M.current=ne.params,F(ne)},getFullWidthCellRenderer:()=>A.current,getFullWidthCellRendererParams:()=>M.current,refreshFullWidth:ne=>{const V=ne();return M.current=V,je.current?(F(Q=>({...Q,params:V})),!0):!A.current||!A.current.refresh?!1:A.current.refresh(V)}};e.setComp(U,ge,t,r.current)},[]);p.useLayoutEffect(()=>pi(S,o,P.current,A),[S]);const oe=p.useMemo(()=>{const ge={top:E,transform:k};return Object.assign(ge,C),ge},[E,k,C]),de=l&&S?.componentFromFramework,Oe=!l&&te!=null,Ge=p.useMemo(()=>!!(S?.componentFromFramework&&Ms(S.componentClass)),[S]),je=p.useRef(!1);p.useEffect(()=>{je.current=Ge&&!!S&&!!s.get("reactiveCustomComponents")},[Ge,S]);const St=()=>te?.map(ge=>p.createElement(k2,{cellCtrl:ge,editingCell:i?.isEditing(ge,{withOpenEditor:!0})??!1,printLayout:e.printLayout,key:ge.instanceId})),yt=()=>{const ge=S.componentClass;return Ge?p.createElement(ge,{...S.params}):p.createElement(ge,{...S.params,ref:A})};return p.createElement("div",{ref:q,role:"row",style:oe,"row-index":d,"row-id":h,"row-business-key":f},Oe?St():de?yt():null)},gd=p.memo(L2),O2=({name:e})=>{const{context:t,gos:o}=p.useContext(We),s=p.useMemo(()=>ui(e),[e]),i=p.useRef(null),n=p.useRef(null),r=p.useRef(null),a=p.useRef([]),l=p.useRef([]),[c,d]=p.useState(()=>[]),u=!!o.get("enableCellSpan")&&!!s.getSpannedRowCtrls,h=p.useRef([]),g=p.useRef([]),[f,m]=p.useState(()=>[]),C=p.useRef(!1),v=p.useRef(),w=p.useMemo(()=>at("ag-viewport",Uu(e)),[e]),b=p.useMemo(()=>at($u(e)),[e]),y=p.useMemo(()=>at("ag-spanning-container",mv(e)),[e]),S=s.type==="center"||u,F=S?i:n;Ro(" AG Row Container "+e+" ",F);const E=p.useCallback(()=>{const T=!S||i.current!=null,j=n.current!=null,se=!u||r.current!=null;return T&&j&&se},[]),G=p.useCallback(()=>i.current==null&&n.current==null&&r.current==null,[]),k=p.useCallback(()=>{if(G()&&(v.current=t.destroyBean(v.current)),!t.isDestroyed()&&E()){const T=$=>{const Z=mn(l.current,a.current,C.current);Z!==l.current&&(l.current=Z,ri($,()=>d(Z)))},j=$=>{const Z=mn(g.current,h.current,C.current);Z!==g.current&&(g.current=Z,ri($,()=>m(Z)))},se={setHorizontalScroll:$=>{i.current&&(i.current.scrollLeft=$)},setViewportHeight:$=>{i.current&&(i.current.style.height=$)},setRowCtrls:({rowCtrls:$,useFlushSync:Z})=>{const z=!!Z&&a.current.length>0&&$.length>0;a.current=$,T(z)},setSpannedRowCtrls:($,Z)=>{const z=!!Z&&h.current.length>0&&$.length>0;h.current=$,j(z)},setDomOrder:$=>{C.current!=$&&(C.current=$,T(!1))},setContainerWidth:$=>{n.current&&(n.current.style.width=$)},setOffsetTop:$=>{n.current&&(n.current.style.transform=`translateY(${$})`)}};v.current=t.createBean(new xv(e)),v.current.setComp(se,n.current,r.current??void 0,i.current)}},[E,G]),O=p.useCallback(T=>{n.current=T,k()},[k]),P=p.useCallback(T=>{r.current=T,k()},[k]),A=p.useCallback(T=>{i.current=T,k()},[k]),M=()=>p.createElement("div",{className:b,ref:O,role:S?"presentation":"rowgroup"},c.map(T=>p.createElement(gd,{rowCtrl:T,containerType:s.type,key:T.instanceId})));if(!S)return M();const J=()=>p.createElement("div",{className:y,ref:P,role:"presentation"},f.map(T=>p.createElement(gd,{rowCtrl:T,containerType:s.type,key:T.instanceId})));return p.createElement("div",{className:w,ref:A,role:"rowgroup"},M(),u?J():null)},G2=p.memo(O2),H2=()=>{const e=p.useContext(We),{context:t,overlays:o}=e,[s,i]=p.useState(""),[n,r]=p.useState(0),[a,l]=p.useState(0),[c,d]=p.useState("0px"),[u,h]=p.useState("0px"),[g,f]=p.useState("100%"),[m,C]=p.useState("0px"),[v,w]=p.useState("0px"),[b,y]=p.useState("100%"),[S,F]=p.useState(!0),[E,G]=p.useState(!0),[k,O]=p.useState(null),[P,A]=p.useState(""),[M,J]=p.useState(null),[T,j]=p.useState("ag-layout-normal"),se=p.useRef();se.current||(se.current=new ai(()=>$.current));const $=p.useRef(null),Z=p.useRef(null),z=p.useRef(null),te=p.useRef(null),q=p.useRef(null),oe=p.useRef(null),de=p.useRef(null),Oe=p.useRef([]),Ge=p.useRef([]);Ro(" AG Grid Body ",$),Ro(" AG Pinned Top ",Z),Ro(" AG Sticky Top ",z),Ro(" AG Middle ",oe),Ro(" AG Pinned Bottom ",de);const je=p.useCallback(ue=>{if($.current=ue,!ue||t.isDestroyed()){Oe.current=t.destroyBeans(Oe.current);for(const be of Ge.current)be();Ge.current=[];return}const X=(be,ot)=>{be.appendChild(ot),Ge.current.push(()=>ot.remove())},Re=be=>{const ot=t.createBean(new be);return Oe.current.push(ot),ot},He=(be,ot,cp)=>{X(be,document.createComment(cp)),X(be,Re(ot).getGui())};He(ue,sv," AG Fake Horizontal Scroll ");const Co=o?.getOverlayWrapperCompClass();Co&&He(ue,Co," AG Overlay Wrapper "),q.current&&He(q.current,nv," AG Fake Vertical Scroll ");const tt={setRowAnimationCssOnBodyViewport:i,setColumnCount:be=>{$.current&&Bp($.current,be)},setRowCount:be=>{$.current&&Gp($.current,be)},setTopHeight:r,setBottomHeight:l,setStickyTopHeight:d,setStickyTopTop:h,setStickyTopWidth:f,setTopInvisible:F,setBottomInvisible:G,setColumnMovingCss:(be,ot)=>se.current.toggleCss(be,ot),updateLayoutClasses:j,setAlwaysVerticalScrollClass:O,setPinnedTopBottomOverflowY:A,setCellSelectableCss:(be,ot)=>J(ot?be:null),setBodyViewportWidth:be=>{oe.current&&(oe.current.style.width=be)},registerBodyViewportResizeListener:be=>{if(oe.current){const ot=Kt(e,oe.current,be);Ge.current.push(()=>ot())}},setStickyBottomHeight:C,setStickyBottomBottom:w,setStickyBottomWidth:y,setGridRootRole:be=>ue.setAttribute("role",be)},Ko=t.createBean(new Tv);Oe.current.push(Ko),Ko.setComp(tt,ue,oe.current,Z.current,de.current,z.current,te.current)},[]),St=p.useMemo(()=>at("ag-root","ag-unselectable",T),[T]),yt=p.useMemo(()=>at("ag-body-viewport",s,T,k,M),[s,T,k,M]),ge=p.useMemo(()=>at("ag-body",T),[T]),U=p.useMemo(()=>at("ag-floating-top",S?"ag-invisible":null,M),[M,S]),ne=p.useMemo(()=>at("ag-sticky-top",M),[M]),V=p.useMemo(()=>at("ag-sticky-bottom",m==="0px"?"ag-invisible":null,M),[M,m]),Q=p.useMemo(()=>at("ag-floating-bottom",E?"ag-invisible":null,M),[M,E]),le=p.useMemo(()=>({height:n,minHeight:n,overflowY:P}),[n,P]),Me=p.useMemo(()=>({height:c,top:u,width:g}),[c,u,g]),Ae=p.useMemo(()=>({height:m,bottom:v,width:b}),[m,v,b]),ee=p.useMemo(()=>({height:a,minHeight:a,overflowY:P}),[a,P]),ae=ue=>p.createElement(G2,{name:ue,key:`${ue}-container`}),Ce=({section:ue,children:X,className:Re,style:He})=>p.createElement("div",{ref:ue,className:Re,role:"presentation",style:He},X.map(ae));return p.createElement("div",{ref:je,className:St},p.createElement(R2,null),Ce({section:Z,className:U,style:le,children:["topLeft","topCenter","topRight","topFullWidth"]}),p.createElement("div",{className:ge,ref:q,role:"presentation"},Ce({section:oe,className:yt,children:["left","center","right","fullWidth"]})),Ce({section:z,className:ne,style:Me,children:["stickyTopLeft","stickyTopCenter","stickyTopRight","stickyTopFullWidth"]}),Ce({section:te,className:V,style:Ae,children:["stickyBottomLeft","stickyBottomCenter","stickyBottomRight","stickyBottomFullWidth"]}),Ce({section:de,className:Q,style:ee,children:["bottomLeft","bottomCenter","bottomRight","bottomFullWidth"]}))},B2=p.memo(H2),V2=(e,t)=>{const{children:o,eFocusableElement:s,onTabKeyDown:i,gridCtrl:n,forceFocusOutWhenTabGuardsAreEmpty:r,isEmpty:a}=e,{context:l}=p.useContext(We),c=p.useRef(null),d=p.useRef(null),u=p.useRef(),h=v=>{const w=v==null?void 0:parseInt(v,10).toString();for(const b of[c,d])w===void 0?b.current?.removeAttribute("tabindex"):b.current?.setAttribute("tabindex",w)};p.useImperativeHandle(t,()=>({forceFocusOutOfContainer(v){u.current?.forceFocusOutOfContainer(v)}}));const g=p.useCallback(()=>{const v=c.current,w=d.current;if(!v&&!w||l.isDestroyed()){u.current=l.destroyBean(u.current);return}if(v&&w){const b={setTabIndex:h};u.current=l.createBean(new WT({comp:b,eTopGuard:v,eBottomGuard:w,eFocusableElement:s,onTabKeyDown:i,forceFocusOutWhenTabGuardsAreEmpty:r,focusInnerElement:y=>n.focusInnerElement(y),isEmpty:a}))}},[]),f=p.useCallback(v=>{c.current=v,g()},[g]),m=p.useCallback(v=>{d.current=v,g()},[g]),C=v=>{const w=v==="top"?ps.TAB_GUARD_TOP:ps.TAB_GUARD_BOTTOM;return p.createElement("div",{className:`${ps.TAB_GUARD} ${w}`,role:"presentation",ref:v==="top"?f:m})};return p.createElement(p.Fragment,null,C("top"),o,C("bottom"))},N2=p.forwardRef(V2),W2=p.memo(N2),z2=({context:e})=>{const[t,o]=p.useState(""),[s,i]=p.useState(""),[n,r]=p.useState(null),[a,l]=p.useState(null),[c,d]=p.useState(!1),[u,h]=p.useState(),g=p.useRef(),f=p.useRef(null),m=p.useRef(),[C,v]=p.useState(null),w=p.useRef(()=>{}),b=p.useRef(),y=p.useRef([]),S=p.useCallback(()=>{},[]);Ro(" AG Grid ",f);const F=p.useCallback(A=>{if(f.current=A,g.current=A?e.createBean(new Ov):e.destroyBean(g.current),!A||e.isDestroyed())return;const M=g.current;w.current=M.focusInnerElement.bind(M);const J={destroyGridUi:()=>{},setRtlClass:o,forceFocusOutOfContainer:T=>{if(!T&&b.current?.isDisplayed()){b.current.forceFocusOutOfContainer(T);return}m.current?.forceFocusOutOfContainer(T)},updateLayoutClasses:i,getFocusableContainers:()=>{const T=[],j=[],se=f.current?.querySelector(".ag-root");for(const Z of y.current){if(!Z.isDisplayed())continue;const z=Z.getFocusableContainerName();if(z==="rowGroupToolbar"||z==="pivotToolbar"){T.push(Z);continue}j.push(Z)}const $=[...T];return se&&$.push({getGui:()=>se,getFocusableContainerName:()=>"gridBody"}),$.push(...j),$},setCursor:r,setUserSelect:l};M.setComp(J,A,A),d(!0)},[]);p.useEffect(()=>{const A=g.current,M=f.current;if(!u||!A||!C||!M||e.isDestroyed())return;const J=[];y.current=[],b.current=void 0;const{watermarkSelector:T,paginationSelector:j,sideBarSelector:se,statusBarSelector:$,gridHeaderDropZonesSelector:Z}=A.getOptionalSelectors(),z=[];if(Z){const q=e.createBean(new Z.component),oe=q.getGui();M.insertAdjacentElement("afterbegin",oe),z.push(oe),J.push(q),y.current.push(...q.getFocusableContainers?.()??[])}if(se){const q=e.createBean(new se.component),oe=q.getGui(),de=C.querySelector(".ag-tab-guard-bottom");de&&(de.insertAdjacentElement("beforebegin",oe),z.push(oe)),J.push(q),y.current.push(q)}const te=q=>{const oe=e.createBean(new q),de=oe.getGui();return M.insertAdjacentElement("beforeend",de),z.push(de),J.push(oe),oe};if($){const q=te($.component);y.current.push(q)}if(j){const q=te(j.component);b.current=q,y.current.push(q)}return T&&te(T.component),()=>{e.destroyBeans(J),y.current=[],b.current=void 0;for(const q of z)q.remove()}},[u,C,e]);const E=p.useMemo(()=>at("ag-root-wrapper",t,s),[t,s]),G=p.useMemo(()=>at("ag-root-wrapper-body","ag-focus-managed",s),[s]),k=p.useMemo(()=>({userSelect:a??"",WebkitUserSelect:a??"",cursor:n??""}),[a,n]),O=p.useCallback(A=>{m.current=A,h(A!==null)},[]),P=p.useCallback(()=>!g.current?.isFocusable(),[]);return p.createElement("div",{ref:F,className:E,style:k,role:"presentation"},p.createElement("div",{className:G,ref:v,role:"presentation"},c&&C&&!e.isDestroyed()&&p.createElement(We.Provider,{value:e.getBeans()},p.createElement(W2,{ref:O,eFocusableElement:C,onTabKeyDown:S,gridCtrl:g.current,forceFocusOutWhenTabGuardsAreEmpty:!0,isEmpty:P},p.createElement(B2,null)))))},_2=p.memo(z2),U2=class extends x{postConstruct(){if(this.beans.colAutosize){const e=this.queueResizeOperationsForTick.bind(this);this.addManagedEventListeners({rowExpansionStateChanged:e,expandOrCollapseAll:e,cellValueChanged:e,rowNodeDataChanged:e,rowDataUpdated:e})}}queueResizeOperationsForTick(){const e=this.beans.colAutosize;e.shouldQueueResizeOperations=!0,setTimeout(()=>{e.processResizeOperations()},0)}areHeaderCellsRendered(){return this.beans.ctrlsSvc.getHeaderRowContainerCtrls().every(e=>e.getAllCtrls().every(t=>t.areCellsRendered()))}areCellsRendered(){return this.beans.rowRenderer.getAllRowCtrls().every(e=>e.isRowRendered()&&e.getAllCellCtrls().every(t=>!!t.eGui))}},$2=typeof window>"u"?p.useEffect:p.useLayoutEffect,$g={setGridApi:void 0,maxComponentCreationTimeMs:void 0,children:void 0},K2={gridOptions:void 0,modules:void 0,containerStyle:void 0,className:void 0,passGridApi:void 0,componentWrappingElement:void 0,...$g},Kg=new Set(Object.keys(K2)),q2=new Set(Object.keys($g)),qg=e=>{const t=p.useContext(d2),o=p.useContext(u2),s=p.useRef(),i=p.useRef(null),n=p.useRef(null),r=p.useRef([]),a=p.useRef([]),l=p.useRef(e),c=p.useRef(),d=p.useRef(),u=p.useRef(!1),[h,g]=p.useState(void 0),[,f]=p.useState(0),m=p.useRef(),C=S=>{const F=i.current?.classList,E=(G="")=>G.trim().split(/\s+/g).filter(Boolean);if(m.current!==S){for(const G of E(m.current))F?.contains(G)&&F.remove(G);for(const G of E(S))F?.contains(G)||F?.add(G);m.current=S}};$2(()=>{C(e.className)},[e.className]);const v=p.useCallback(S=>{if(i.current=S,C(e.className),!S){for(const T of r.current)T();r.current.length=0;return}const F=[...e.modules??[],...t??[]];o&&Yd(F)?.setLicenseKey(o),n.current||(n.current=new c2(()=>f(T=>T+1),e.componentWrappingElement,e.maxComponentCreationTimeMs),r.current.push(()=>{n.current?.destroy(),n.current=null}));const E=Uf(e.gridOptions,e,Object.keys(e).filter(T=>!Kg.has(T))),G=()=>{if(u.current){const T=()=>c.current?.shouldQueueUpdates()?void 0:a.current.shift();let j=T();for(;j;)j(),j=T()}},k=new Z2(G);c.current=k;const O=new U2,P={providedBeanInstances:{frameworkCompWrapper:new Y2(n.current,E),renderStatus:O},modules:F,frameworkOverrides:k,setThemeOnGridDiv:!0},A=T=>{g(T),T.createBean(O),r.current.push(()=>{T.destroy()}),T.getBean("ctrlsSvc").whenReady({addDestroyFunc:j=>{r.current.push(j)}},()=>{if(T.isDestroyed())return;const j=s.current;j&&e.passGridApi?.(j)})},M=T=>{T.getBean("ctrlsSvc").whenReady({addDestroyFunc:j=>{r.current.push(j)}},()=>{for(const j of a.current)j();a.current.length=0,u.current=!0})},J=new M1;E.gridId??(E.gridId=d.current),s.current=J.create(S,E,A,M,P),r.current.push(()=>{s.current=void 0}),s.current&&(d.current=s.current.getGridId())},[]),w=p.useMemo(()=>({height:"100%",...e.containerStyle||{}}),[e.containerStyle]),b=p.useCallback(S=>{u.current&&!c.current?.shouldQueueUpdates()?S():a.current.push(S)},[]);p.useEffect(()=>{const S=j2(l.current,e);l.current=e,b(()=>{s.current&&$f(S,s.current)})},[e]);const y=!p.useSyncExternalStore||Ai(e,"renderingMode")==="legacy"?"legacy":"default";return p.createElement("div",{style:w,ref:v},p.createElement(Bg.Provider,{value:y},h&&!h.isDestroyed()?p.createElement(_2,{key:h.instanceId,context:h}):null,n.current?.getPortals()??null))};function j2(e,t){const o={};for(const s of Object.keys(t)){if(Kg.has(s)){q2.has(s)&&D(274,{prop:s});continue}const i=t[s];e[s]!==i&&(o[s]=i)}return o}var Y2=class extends NT{constructor(e,t){super(),this.parent=e,this.gridOptions=t}createWrapper(e,t){const o=this.gridOptions;if(Ai(o,"reactiveCustomComponents")){const r=(a=>{switch(a){case"filter":return Ai(o,"enableFilterHandlers")?e2:XT;case"floatingFilterComponent":return Ai(o,"enableFilterHandlers")?s2:o2;case"dateComponent":return ZT;case"dragAndDropImageComponent":return JT;case"loadingOverlayComponent":case"noRowsOverlayComponent":case"activeOverlay":return QT;case"statusPanel":return r2;case"toolPanel":return a2;case"menuItem":return n2;case"cellRenderer":return YT;case"innerHeaderComponent":return i2}})(t.name);if(r)return new r(e,this.parent,t)}else switch(t.name){case"filter":case"floatingFilterComponent":case"dateComponent":case"dragAndDropImageComponent":case"loadingOverlayComponent":case"noRowsOverlayComponent":case"activeOverlay":case"statusPanel":case"toolPanel":case"menuItem":case"cellRenderer":El();break}const i=!t.cellRenderer&&t.name!=="toolPanel";return new zg(e,this.parent,t,i)}},Q2=p.forwardRef((e,t)=>{const o=p.useContext(We),{registry:s,context:i,gos:n,rowModel:r}=o,[a,l]=p.useState(()=>new dt),[c,d]=p.useState(()=>new dt),[u,h]=p.useState(),[g,f]=p.useState(),m=p.useRef(),C=p.useRef(null),v=p.useRef(),w=p.useMemo(()=>bf(e.api.getGridId(),u?.rowModelType??"clientSide"),[e]),b=p.useMemo(()=>a.toString()+" ag-details-row",[a]),y=p.useMemo(()=>c.toString()+" ag-details-grid",[c]);t&&p.useImperativeHandle(t,()=>({refresh(){return m.current?.refresh()??!1}})),e.template&&D(230);const S=p.useCallback(E=>{if(C.current=E,!E||i.isDestroyed()){m.current=i.destroyBean(m.current),v.current?.();return}const G={toggleCss:(O,P)=>l(A=>A.setClass(O,P)),toggleDetailGridCss:(O,P)=>d(A=>A.setClass(O,P)),setDetailGrid:O=>h(O),setRowData:O=>f(O),getGui:()=>C.current},k=s.createDynamicBean("detailCellRendererCtrl",!0);if(k&&(i.createBean(k),k.init(G,e),m.current=k,n.get("detailRowAutoHeight"))){const O=()=>{if(C.current==null)return;const P=C.current.clientHeight;P!=null&&P>0&&setTimeout(()=>{e.node.setRowHeight(P),(Se(n)||xs(n))&&r.onRowHeightChanged()},0)};v.current=Kt(o,E,O),O()}},[]),F=p.useCallback(E=>{m.current?.registerDetailWithMaster(E)},[]);return p.createElement("div",{className:b,ref:S},u&&p.createElement(qg,{className:y,...u,modules:w,rowData:g,passGridApi:F}))}),Z2=class extends Qh{constructor(e){super("react"),this.processQueuedUpdates=e,this.queueUpdates=!1,this.renderingEngine="react",this.frameworkComponents={agGroupCellRenderer:cd,agGroupRowRenderer:cd,agDetailCellRenderer:Q2},this.wrapIncoming=(t,o)=>o==="ensureVisible"?_T(t):t()}frameworkComponent(e){return this.frameworkComponents[e]}isFrameworkComponent(e){if(!e)return!1;const t=e.prototype;return!(t&&"getGui"in t)}getLockOnRefresh(){this.queueUpdates=!0}releaseLockOnRefresh(){this.queueUpdates=!1,this.processQueuedUpdates()}shouldQueueUpdates(){return this.queueUpdates}runWhenReadyAsync(){return zT()}},jg=class extends p.Component{constructor(){super(...arguments),this.apiListeners=[],this.setGridApi=e=>{this.api=e;for(const t of this.apiListeners)t(e)}}registerApiListener(e){this.apiListeners.push(e)}componentWillUnmount(){this.apiListeners.length=0}render(){return p.createElement(qg,{...this.props,passGridApi:this.setGridApi})}},Yg=(e=>(e.Dropdown="dropdown",e.Menu="menu",e))(Yg||{}),Vt=(e=>(e.Click="click",e.Hover="hover",e.ContextMenu="contextMenu",e))(Vt||{}),Cn=(e=>(e.Item="item",e.Divider="divider",e.PlainText="plainText",e))(Cn||{});const J2=me("flex items-center gap-2 align-middle","h-auto px-0 bg-transparent border-0"),X2=me("z-[53] overflow-auto rounded bg-layer-0 text-primary shadow focus-visible:outline-none"),ca=me("flex w-full cursor-pointer items-center gap-3","focus-visible:border-none focus-visible:outline-none","hover:bg-accent-primary-alpha px-3","dial-small-text h-[34px] rounded text-primary"),da="opacity-75 !cursor-not-allowed",Qg="text-error",eI="my-1 border-t border-hover border-secondary",Zo=4,tI=H.jsx(vn.IconChevronRight,{size:14}),Zg=({ariaLabel:e,className:t,size:o=24,onClose:s,...i})=>H.jsx(Sd,{"aria-label":e,className:Mt.mergeClasses(t,"w-auto h-auto"),onClick:s,icon:H.jsx(vn.IconX,{size:o}),...i});function Jg(e,t="menu",o=!1,s){const[i,n]=p.useState(!1),r=pe.useFloatingNodeId(),{refs:a,floatingStyles:l,context:c}=pe.useFloating({nodeId:r,placement:"right-start",open:i,onOpenChange:n,whileElementsMounted:pe.autoUpdate,middleware:[pe.offset({mainAxis:0,crossAxis:-4}),pe.flip({padding:e}),pe.shift({padding:e})]}),d=pe.useHover(c,{enabled:!o,move:!1,handleClose:pe.safePolygon(),delay:{open:80,close:80}}),u=pe.useClick(c,{enabled:!o}),h=pe.useDismiss(c,{bubbles:{escapeKey:!1,outsidePress:!0}}),g=pe.useRole(c,{role:t}),{getReferenceProps:f,getFloatingProps:m}=pe.useInteractions([d,u,h,g]);return{isOpen:i,nodeId:r,refs:a,floatingStyles:l,context:c,getReferenceProps:f,getFloatingProps:m}}const oI="rounded bg-layer-0 shadow",Xg=({refs:e,floatingStyles:t,context:o,getFloatingProps:s,role:i,surfaceClassName:n,className:r,children:a})=>{const l=yd();return H.jsx(pe.FloatingPortal,{children:H.jsx(pe.FloatingFocusManager,{context:o,modal:!1,initialFocus:-1,returnFocus:!0,children:H.jsx("div",{ref:e.setFloating,style:t,role:i,className:me("z-[53] overflow-auto text-primary focus-visible:outline-none",n??oI,l,r),...s(),children:a})})})},sI=({item:e,onRootClose:t})=>{const{isOpen:o,refs:s,floatingStyles:i,context:n,getReferenceProps:r,getFloatingProps:a}=Jg(Zo,"menu",!!e.disabled),l=p.useCallback(c=>d=>{c.disabled||(c.onClick?.({key:c.key,domEvent:d}),t())},[t]);return H.jsxs(H.Fragment,{children:[H.jsxs("button",{ref:s.setReference,type:"button",role:"menuitem","aria-haspopup":"menu","aria-expanded":o,"aria-disabled":!!e.disabled,disabled:e.disabled,className:me(ca,e.disabled&&da,e.className),...r(),children:[e.icon&&H.jsx("span",{className:me(e.disabled&&"text-secondary"),children:H.jsx(zi,{icon:e.icon})}),H.jsx("span",{className:me("flex-1 truncate text-start",e.disabled&&"text-secondary"),children:e.label}),H.jsx("span",{className:me("ml-auto shrink-0",e.disabled&&"text-secondary"),children:tI})]}),o&&H.jsx(Xg,{refs:s,floatingStyles:i,context:n,getFloatingProps:a,role:"menu",className:"w-max",children:H.jsx("div",{role:"none",className:"py-1",children:e.children.map(c=>H.jsxs("button",{role:"menuitem",type:"button","aria-disabled":!!c.disabled,disabled:c.disabled,className:me(ca,c.disabled&&da,c.danger&&Qg,c.className),onClick:l(c),children:[c.icon&&H.jsx("span",{className:me(c.danger&&"text-error",c.disabled&&"text-secondary"),children:H.jsx(zi,{icon:c.icon})}),H.jsx("span",{className:me("flex-1 truncate text-start",c.danger&&"text-error",c.disabled&&"text-secondary"),children:c.label})]},c.key))})})]})},iI=e=>"clientWidth"in e?e.clientWidth:e.getBoundingClientRect?.()?.width??0,ua=({children:e,items:t,onItemClick:o,menuHeader:s,menuFooter:i,renderOverlay:n,trigger:r=[Vt.Click],placement:a,disabled:l=!1,open:c,defaultOpen:d=!1,onOpenChange:u,closable:h=!1,onClose:g,className:f,overlayContentClassName:m,separatorClassName:C,listClassName:v,outsidePressIgnoreRef:w,outsideClosable:b=!0,allowedPlacements:y,anchorToMouse:S=!1,matchReferenceWidth:F=!0,maxDropdownHeight:E})=>{const[G,k]=p.useState(d),O=c!==void 0,P=O?!!c:G,A=p.useRef(null),M=p.useCallback(U=>{O||k(U),u?.(U)},[O,u]),J=p.useId(),T=a===void 0,{refs:j,floatingStyles:se,context:$}=pe.useFloating({placement:a,open:P,onOpenChange:M,whileElementsMounted:pe.autoUpdate,middleware:[pe.offset({mainAxis:Zo,crossAxis:0}),T?pe.autoPlacement({alignment:"start",crossAxis:!0,padding:Zo,allowedPlacements:y}):pe.flip({padding:Zo}),pe.shift({padding:Zo}),pe.size({padding:Zo,apply({availableWidth:U,availableHeight:ne,elements:V}){const Q=V.floating,le=iI(V.reference);Q.style.setProperty("--fui-available-height",`${Math.floor(ne)}px`),Q.style.setProperty("--reference-width",F?`${Math.round(le)}px`:"0px"),F?Q.style.minWidth=`${Math.round(le)}px`:Q.style.removeProperty("min-width"),Q.style.maxWidth=`${Math.floor(U)}px`;const Me=Math.floor(ne);Q.style.maxHeight=`${E?Math.min(Me,E):Me}px`}})]}),Z=pe.useClick($,{enabled:r.includes(Vt.Click)&&!l}),z=pe.useHover($,{enabled:r.includes(Vt.Hover)&&!l,move:!1,restMs:40,delay:{open:80,close:80}}),te=pe.useDismiss($,{bubbles:!0,referencePress:!1,outsidePress:U=>{if(!b)return!1;const ne=U.target;return!(w?.current&&ne instanceof Node&&w.current.contains(ne))}}),q=pe.useRole($,{role:"menu"}),{getReferenceProps:oe,getFloatingProps:de}=pe.useInteractions([Z,z,te,q]),Oe=p.useCallback((U,ne)=>{j.setPositionReference({getBoundingClientRect:()=>({width:0,height:0,x:U,y:ne,top:ne,left:U,right:U,bottom:ne})})},[j]),Ge=p.useCallback(U=>{!r.includes(Vt.ContextMenu)||l||(U.preventDefault(),S&&(Oe(U.clientX,U.clientY),A.current=document.elementFromPoint(U.clientX,U.clientY)),M(!0))},[S,l,M,Oe,r]),je=p.useCallback(U=>{!S||l||(r.includes(Vt.ContextMenu)&&P&&M(!1),Oe(U.clientX,U.clientY),A.current=document.elementFromPoint(U.clientX,U.clientY))},[S,l,Oe,P,r,M]);p.useEffect(()=>{l&&P&&M(!1)},[l,P,M]);const St=p.useCallback(U=>ne=>{U.disabled||(U.onClick?.({key:U.key,domEvent:ne}),o?.({key:U.key,domEvent:ne}),M(!1))},[o,M]),yt=p.useMemo(()=>n?n():t?H.jsxs(H.Fragment,{children:[s&&H.jsx(H.Fragment,{children:typeof s=="function"?s():s}),H.jsx("div",{role:"none",className:Mt.mergeClasses("py-1",m),"aria-label":"dropdown",children:t.map(U=>U.type===Cn.Divider?H.jsx("div",{role:"separator",className:Mt.mergeClasses(eI,C)},U.key):U.type===Cn.PlainText?H.jsx("div",{className:Mt.mergeClasses("px-3 py-2 text-secondary dial-caption-text",U.className),children:U.label},U.key):U.children?.length?H.jsx(sI,{item:U,onRootClose:()=>M(!1)},U.key):H.jsxs("button",{role:"menuitem",type:"button","aria-disabled":!!U.disabled,className:me(ca,U.disabled&&da,U.danger&&Qg,U.className),disabled:U.disabled,onClick:St(U),children:[U.icon&&H.jsx("span",{className:me(U.danger&&"text-error",U.disabled&&"text-secondary"),children:H.jsx(zi,{icon:U.icon})}),H.jsx("span",{className:me("flex-1 truncate text-start",U.danger&&"text-error",U.disabled&&"text-secondary"),"aria-labelledby":"item-text",children:U.label})]},U.key))}),i&&H.jsx(H.Fragment,{children:typeof i=="function"?i():i})]}):null,[St,t,i,s,n,M,m,C]),ge=oe({onContextMenu:Ge,onMouseDown:je});return p.useEffect(()=>{if(!P)return;const U=j.reference.current;let ne=null;if(U instanceof Element?ne=U:A.current instanceof Element&&(ne=A.current),!ne)return;const V=new IntersectionObserver(([Q])=>{Q.isIntersecting||M(!1)},{root:null,threshold:0});return V.observe(ne),()=>V.disconnect()},[P,j.reference,M]),H.jsxs(H.Fragment,{children:[H.jsx("span",{ref:j.setReference,className:me(J2,l&&"!cursor-not-allowed opacity-75",f),"aria-haspopup":"menu","aria-expanded":P,"aria-controls":J,...ge,children:e}),P&&H.jsx(pe.FloatingPortal,{children:H.jsx(pe.FloatingFocusManager,{context:$,modal:!1,initialFocus:-1,returnFocus:!0,children:H.jsxs("div",{id:J,ref:j.setFloating,style:se,className:me(X2,!F&&"w-max",v),...de(),children:[h&&H.jsx("div",{className:"flex items-center justify-between px-2 pt-2",children:H.jsx(Zg,{ariaLabel:"Close dropdown",onClose:U=>{g?.(U),M(!1)}})}),yt]})})})]})},ep="en-US",tp={year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"},nI="text-primary",wr=40,op={minWidth:wr,width:wr,maxWidth:wr},rI={cellClass:"ag-grid-no-checkbox",...op},aI={...op};var Ks=(e=>(e.MULTIPLE="MULTIPLE",e.SINGLE="SINGLE",e))(Ks||{});const lI=new Intl.Collator(void 0,{sensitivity:"base",numeric:!0}),sp=(e,t,o,s,i)=>{if(typeof e=="string"&&typeof t=="string"&&e&&t){const n=lI.compare(e,t);return n===0?0:n>0?1:-1}return e===t?0:e?t?e>t?1:-1:i?1:-1:i?-1:1},ip=e=>e?Object.fromEntries(Object.entries(e).filter(([,t])=>t!==void 0)):{},cI=(e,t)=>e.some((o,s)=>o.field!==t[s].field?!0:o.hide!==t[s].hide),dI="h-full w-full",pd=".ag-checkbox-input",br={accentColor:"var(--bg-control-accent, var(--bg-accent-primary, #3664E2))",backgroundColor:"var(--bg-layer-raised, var(--bg-layer-3, #1D2439))",oddRowBackgroundColor:"var(--bg-layer-sunken, var(--bg-layer-2, #161B2D))",selectedRowBackgroundColor:"var(--bg-accent-primary-alpha, #7DA4FF26)",borderColor:"var(--bg-layer-4, #242C42)",rowBorder:"1px solid var(--stroke-tertiary, var(--stroke-primary, #696E7C))",rowHoverColor:"var(--bg-accent-primary-alpha, #7DA4FF26)",borderRadius:3,browserColorScheme:"dark",chromeBackgroundColor:"var(--bg-layer-1, #0C101D)",foregroundColor:"var(--text-primary, #EEF1F7)",headerFontSize:14,headerFontWeight:600,headerTextColor:"var(--text-secondary, #9FA6BD)",spacing:4,wrapperBorderRadius:3,fontSize:14,fontFamily:"var(--theme-font, var(--font-inter))"},fd=40;var So=(e=>(e.API="api",e.ROW_DATA_CHANGED="rowDataChanged",e.CHECKBOX_SELECTED="checkboxSelected",e))(So||{}),is=(e=>(e.Undefined="undefined",e.Mobile="mobile",e.Tablet="tablet",e.Desktop="desktop",e))(is||{});const md=()=>typeof window<"u"&&window.innerWidth<1279,Cd=()=>typeof window<"u"&&window.innerWidth<640,uI=()=>{if(typeof window>"u")return is.Undefined;const e=window.innerWidth;return e>=1024?is.Desktop:e<640?is.Mobile:is.Tablet},np=()=>{const[e,t]=p.useState(Cd());return p.useEffect(()=>{const o=()=>t(Cd());return window.addEventListener("resize",o),()=>window.removeEventListener("resize",o)},[]),e},rp=()=>{const[e,t]=p.useState(md());return p.useEffect(()=>{const o=()=>t(md());return window.addEventListener("resize",o),()=>window.removeEventListener("resize",o)},[]),e};function ap(e,t){let o=null;return(...s)=>{o&&clearTimeout(o),o=setTimeout(()=>e(...s),t)}}let vd=!1;const lp=()=>{vd||(vd=!0,VT({testIdAttribute:"dataQA"}),jd.registerModules([kT]))},hI=({columnDefs:e,rowData:t,additionalGridOptions:o,getContextMenuItems:s,className:i,ariaLabel:n="Data grid",wrapCustomCellRenderers:r=!0,disabledRowIds:a,selectedRowIds:l,onSelectionChange:c,onGridApiChange:d,getRowId:u=F=>String(F.id??JSON.stringify(F)),alternateOddRowColors:h=!1,filterPlaceholder:g="Enter value",emptyStateIcon:f,emptyStateTitle:m="No results found",emptyStateDescription:C="Sorry, we couldn't find any results for your search.",loading:v=!1,wrapperBorder:w=!0,withoutHeaderBorders:b=!1,allowDisabledContextMenu:y=!1,selectionMode:S})=>{lp();const[F,E]=p.useState(),G=p.useId(),k=np(),O=rp(),P=p.useRef(new Set),A=p.useRef(void 0),M=p.useMemo(()=>({...br,oddRowBackgroundColor:h?br.oddRowBackgroundColor:br.backgroundColor,wrapperBorder:w}),[h,w]),J=p.useCallback(V=>{V.api.sizeColumnsToFit()},[]),T=p.useCallback(V=>{if(V.data){const Q=u(V.data),le=a?.has(Q)??!1,Me=le&&!y,Ae=V.value==null?"":String(V.value),ee=s?.(V.data)??[];return H.jsx(ua,{trigger:[Vt.ContextMenu],items:ee,anchorToMouse:!0,matchReferenceWidth:!0,className:"w-full",disabled:Me,children:H.jsx("span",{className:"block min-w-0 h-full max-w-full",children:H.jsx(ga,{text:Ae,className:"max-w-full h-full",hideTooltip:le})})})}},[s,a,u,y]),j=p.useCallback(V=>V===So.API||V===So.ROW_DATA_CHANGED,[]),se=p.useCallback(V=>{if(!F)return;const le=(V.selectedNodes||[]).map(Ae=>Ae.data),Me=new Set(le.map(u));P.current=Me,A.current=V.source,j(V.source)||c?.(Me,le)},[F,u,j,c]),$=p.useMemo(()=>ap(V=>se?.(V),100),[se]),Z=p.useCallback(V=>{if(!V.data)return null;const Q=u(V.data),le=V.node.isSelected(),Me=a?.has(Q),Ae=`row-select-${Q}`;return H.jsx("div",{className:"size-6 flex items-center justify-center",children:H.jsx(Rd,{className:"size-[18px]",inputId:Ae,checked:le,disabled:Me,name:"gridradiobutton",value:"selected",onChange:()=>{Me||(V.node.setSelected(!0,!0,So.CHECKBOX_SELECTED),V.api.refreshCells({columns:[V.column?.getColId()]}))}})})},[u,a]),z=p.useCallback(()=>{const V="dial-row-select",Q="dial-row-select-visible";return k||O||l&&l.size>0?`${V} ${Q}`:!l||l.size===0?V:`${V} ${Q}`},[k,O,l]),te=p.useCallback(()=>k||O?z():!l||l.size===0?"dial-row-not-select-header":z(),[z,k,O,l]),q=p.useMemo(()=>{if(S===Ks.SINGLE)return{...rI,cellRenderer:Z};if(S===Ks.MULTIPLE)return{...aI,headerClass:()=>te(),cellClass:V=>{const Q=V.data?u(V.data):null;let le=z();return Q&&a?.has(Q)&&(le+=" opacity-50 pointer-events-none"),le}}},[S,Z,te,u,z,a]),oe=p.useCallback(V=>{const Q=typeof r=="function"?r(V):!!r;if(!V.cellRenderer)return{...V,cellRenderer:T};if(!Q)return V;const le=V.cellRenderer;return{...V,cellRenderer:Ae=>{const ee=Ae.data?s?.(Ae.data)??[]:[];let ae=null;if(typeof le=="function"){const X=le;ae=H.jsx(X,{...Ae})}else ae=T(Ae);const Ce=Ae.data?u(Ae.data):null,ue=Ce?a?.has(Ce):!1;return H.jsx(ua,{trigger:[Vt.ContextMenu],items:ee,anchorToMouse:!0,matchReferenceWidth:!0,className:me("w-full h-full",ue&&"!cursor-not-allowed opacity-75"),disabled:ue&&!y,children:H.jsx("span",{className:"block min-w-0 max-w-full flex-1",children:ae})})}}},[a,s,u,T,r,y]),de=p.useMemo(()=>r?(e??[]).map(oe):e??[],[e,r,r?oe:null]),{defaultColDef:Oe,...Ge}=o??{},je=p.useMemo(()=>({minWidth:150,resizable:!0,sortable:!0,floatingFilter:!0,filter:"agTextColumnFilter",filterParams:{filterPlaceholder:g,buttons:["reset"]},comparator:sp,...ip(Oe)}),[g,Oe]),St=V=>{const Q=document.querySelector(pd);Q&&Q.setAttribute("aria-description",yr);const le=de.map(Me=>({...Me,sort:void 0}));V.api.updateGridOptions({columnDefs:le,rowData:t}),V.api.sizeColumnsToFit(),E(V.api),o?.onGridReady?.(V),d?.(V.api)};p.useEffect(()=>{F&&t&&F.setGridOption("rowData",t)},[F,t]);const yt=p.useCallback(()=>H.jsx(Fd,{title:m,description:C,containerClassName:"gap-3",titleClassName:"mt-2 !text-lg",icon:f||H.jsx(vn.IconZoomCancel,{size:100,stroke:.5,className:"text-secondary"})}),[m,C,f]),ge=p.useMemo(()=>{if(S)return{mode:S===Ks.SINGLE?"singleRow":"multiRow",isRowSelectable:V=>{const Q=V.data?u(V.data):null;return Q?!a?.has(Q):!0}}},[a,u,S]);p.useEffect(()=>{F&&t&&P.current.size&&P.current.forEach(V=>{const Q=F.getRowNode(V);Q&&!Q.isSelected()&&Q.setSelected(!0,!1,So.API)})},[F,t]),p.useEffect(()=>{F&&l&&(F.deselectAll("all",So.API),l.forEach(V=>{const Q=F.getRowNode(V);Q&&!Q.isSelected()&&Q.setSelected(!0,!1,So.API)}))},[F,l]);const U=p.useCallback(V=>V.data?u(V.data):"",[u]),ne=p.useCallback(()=>{document.querySelectorAll(`.ag-row ${pd}`).forEach(V=>{V.setAttribute("aria-description",yr)})},[]);return p.useEffect(()=>{const V=j(A.current);if(F&&l?.size&&V){const Q=Array.from(l)[0];if(Q){const le=F.getRowNode(Q);le&&F.ensureNodeVisible(le)}}},[F,j,l]),H.jsx("div",{className:me(dI,i,S&&"with-selection-column",b&&"dial-without-header-borders"),"aria-label":n,role:"region","aria-busy":v,children:H.jsx("div",{className:"h-full overflow-x-auto",role:"table","aria-describedby":G,children:H.jsx(jg,{rowModelType:"clientSide",headerHeight:fd,rowHeight:fd,cellSelection:!1,theme:Hh.withPart(Mh).withParams({...M}),autoSizeStrategy:{type:"fitGridWidth"},columnDefs:de,defaultColDef:je,selectionColumnDef:q,onGridSizeChanged:J,onGridReady:St,loading:v,suppressCellFocus:!0,suppressDragLeaveHidesColumns:!0,noRowsOverlayComponent:yt,rowData:t,rowSelection:ge,onSelectionChanged:$,getRowId:U,onRowDataUpdated:ne,onBodyScroll:ne,onFirstDataRendered:ne,...Ge})})})},xl=e=>{if(!e)return null;if(e instanceof Date)return isFinite(e.getTime())?e:null;if(typeof e=="number"){const t=new Date(e);return isFinite(t.getTime())?t:null}if(typeof e=="string"){const t=e.trim();if(/^-?\d+$/.test(t))return xl(Number(t));const o=new Date(t);return isFinite(o.getTime())?o:null}return null},gI=({value:e,locale:t=ep,options:o=tp,emptyPlaceholder:s,className:i,hideTooltip:n=!1})=>{const r=xl(e),a=p.useMemo(()=>r?new Intl.DateTimeFormat(t,o).format(r):s,[r,s,t,o]),l=r?r.toISOString():void 0;return H.jsx(ga,{text:l?H.jsx("time",{dateTime:l,children:a}):H.jsx("span",{children:a}),className:me(nI,i),hideTooltip:n})};exports.AgGridReact=jg;exports.DEFAULT_DATE_FORMAT_OPTIONS=tp;exports.DEFAULT_LOCALE=ep;exports.DialCloseButton=Zg;exports.DialDangerIconButton=Cp;exports.DialDateCellRenderer=gI;exports.DialDropdown=ua;exports.DialEllipsisTooltip=ga;exports.DialGhostIconButton=Sd;exports.DialGrid=hI;exports.DialIcon=zi;exports.DialNeutralIconButton=mp;exports.DialNoDataContent=Fd;exports.DialPrimaryIconButton=fp;exports.DialRadioButton=Rd;exports.DialSecondaryIconButton=vp;exports.DialSuccessIconButton=bp;exports.DialTertiaryIconButton=wp;exports.DropdownItemType=Cn;exports.DropdownTrigger=Vt;exports.DropdownType=Yg;exports.GridSelectionMode=Ks;exports.ScreenType=is;exports.SubMenuPanel=Xg;exports.ThemeScope=Sp;exports.ariaDescription=yr;exports.baseColumnComparator=sp;exports.checkColDefsChanges=cI;exports.colorSchemeLight=Mh;exports.convertToDate=xl;exports.debounceFn=ap;exports.getScreenType=uI;exports.observeElementSize=bd;exports.omitUndefined=ip;exports.registerAgGridModulesOnce=lp;exports.scheduleMeasure=wn;exports.themeBalham=Hh;exports.useIsMobileScreen=np;exports.useIsTabletScreen=rp;exports.useSubMenuFloating=Jg;exports.useThemeScope=yd;
|