1"use strict";(self.webpackChunkwapp_rcopia4ui=self.webpackChunkwapp_rcopia4ui||[]).push([[952],{40952:(Fh,Yr,Ls)=>{Ls.d(Yr,{$V:()=>Vo,xs:()=>Ms});var D=Ls(31957),Dt=Ls(56255);let Oo=(()=>{class X extends Dt.pow{constructor(x){super("angular"),this._ngZone=x,this.isRunningWithinTestZone=!1,this.wrapIncoming=($,z)=>this.runOutside($,z),this.wrapOutgoing=$=>this.runInsideAngular($),this.isRunningWithinTestZone=window?.AG_GRID_UNDER_TEST??!!window?.Zone?.AsyncTestZoneSpec,this.runOutside=this._ngZone?this.isRunningWithinTestZone?($,z)=>"resize-observer"===z?this._ngZone.runOutsideAngular($):$():$=>this._ngZone.runOutsideAngular($):$=>$();}get shouldWrapOutgoing(){return this._ngZone&&D.SKi.isInAngularZone();}isFrameworkComponent(x){if(!x)return!1;const $=x.prototype;return $&&"agInit"in $;}runInsideAngular(x){return this._ngZone?this._ngZone.run(x):x();}runOutsideAngular(x,$){return this.runOutside(x,$);}}return X.ɵfac=function(x){return new(x||X)(D.KVO(D.SKi));},X.ɵprov=D.jDH({token:X,factory:X.ɵfac}),X;})(),_o=(()=>{class X extends Dt.Cf3{setViewContainerRef(x,$){this.viewContainerRef=x,this.angularFrameworkOverrides=$;}createWrapper(x,$){let z=this.angularFrameworkOverrides,d=this,bt=new class be extends Wi{init(y){z.runInsideAngular(()=>{super.init(y),this._componentRef.changeDetectorRef.detectChanges();});}createComponent(){return z.runInsideAngular(()=>d.createComponent(x));}hasMethod(y){return null!=bt.getFrameworkComponentInstance()[y];}callMethod(y,_){const Me=this.getFrameworkComponentInstance();return z.runInsideAngular(()=>bt.getFrameworkComponentInstance()[y].apply(Me,_));}addMethod(y,_){bt[y]=_;}}();return bt;}createComponent(x){return this.viewContainerRef.createComponent(x);}}return X.ɵfac=function(){let M;return function($){return(M||(M=D.xGo(X)))($||X);};}(),X.ɵprov=D.jDH({token:X,factory:X.ɵfac}),X;})();class Wi{init(M){this._params=M,this._componentRef=this.createComponent(),this._agAwareComponent=this._componentRef.instance,this._frameworkComponentInstance=this._componentRef.instance,this._eGui=this._componentRef.location.nativeElement,this._agAwareComponent.agInit(this._params);}getGui(){return this._eGui;}getRootElement(){return this._eGui.firstChild;}destroy(){this._frameworkComponentInstance&&"function"==typeof this._frameworkComponentInstance.destroy&&this._frameworkComponentInstance.destroy(),this._componentRef&&this._componentRef.destroy();}getFrameworkComponentInstance(){return this._frameworkComponentInstance;}}let Ms=(()=>{class X{constructor(x,$,z,d){this.viewContainerRef=$,this.angularFrameworkOverrides=z,this.frameworkComponentWrapper=d,this._initialised=!1,this._destroyed=!1,this._fullyReady=Dt.oY$.resolve(!0),this.statusBar=void 0,this.sideBar=void 0,this.suppressContextMenu=void 0,this.preventDefaultOnContextMenu=void 0,this.allowContextMenuWithControlKey=void 0,this.columnMenu=void 0,this.suppressMenuHide=void 0,this.enableBrowserTooltips=void 0,this.tooltipTrigger=void 0,this.tooltipShowDelay=void 0,this.tooltipHideDelay=void 0,this.tooltipMouseTrack=void 0,this.tooltipShowMode=void 0,this.tooltipInteraction=void 0,this.popupParent=void 0,this.copyHeadersToClipboard=void 0,this.copyGroupHeadersToClipboard=void 0,this.clipboardDelimiter=void 0,this.suppressCopyRowsToClipboard=void 0,this.suppressCopySingleCellRanges=void 0,this.suppressLastEmptyLineOnPaste=void 0,this.suppressClipboardPaste=void 0,this.suppressClipboardApi=void 0,this.suppressCutToClipboard=void 0,this.columnDefs=void 0,this.defaultColDef=void 0,this.defaultColGroupDef=void 0,this.columnTypes=void 0,this.dataTypeDefinitions=void 0,this.maintainColumnOrder=void 0,this.suppressFieldDotNotation=void 0,this.headerHeight=void 0,this.groupHeaderHeight=void 0,this.floatingFiltersHeight=void 0,this.pivotHeaderHeight=void 0,this.pivotGroupHeaderHeight=void 0,this.allowDragFromColumnsToolPanel=void 0,this.suppressMovableColumns=void 0,this.suppressColumnMoveAnimation=void 0,this.suppressDragLeaveHidesColumns=void 0,this.suppressRowGroupHidesColumns=void 0,this.colResizeDefault=void 0,this.suppressAutoSize=void 0,this.autoSizePadding=void 0,this.skipHeaderOnAutoSize=void 0,this.autoSizeStrategy=void 0,this.components=void 0,this.editType=void 0,this.singleClickEdit=void 0,this.suppressClickEdit=void 0,this.readOnlyEdit=void 0,this.stopEditingWhenCellsLoseFocus=void 0,this.enterMovesDown=void 0,this.enterMovesDownAfterEdit=void 0,this.enterNavigatesVertically=void 0,this.enterNavigatesVerticallyAfterEdit=void 0,this.enableCellEditingOnBackspace=void 0,this.undoRedoCellEditing=void 0,this.undoRedoCellEditingLimit=void 0,this.defaultCsvExportParams=void 0,this.suppressCsvExport=void 0,this.defaultExcelExportParams=void 0,this.suppressExcelExport=void 0,this.excelStyles=void 0,this.quickFilterText=void 0,this.cacheQuickFilter=void 0,this.excludeHiddenColumnsFromQuickFilter=void 0,this.includeHiddenColumnsInQuickFilter=void 0,this.quickFilterParser=void 0,this.quickFilterMatcher=void 0,this.applyQuickFilterBeforePivotOrAgg=void 0,this.excludeChildrenWhenTreeDataFiltering=void 0,this.enableAdvancedFilter=void 0,this.advancedFilterModel=void 0,this.includeHiddenColumnsInAdvancedFilter=void 0,this.advancedFilterParent=void 0,this.advancedFilterBuilderParams=void 0,this.suppressAdvancedFilterEval=void 0,this.enableCharts=void 0,this.chartThemes=void 0,this.customChartThemes=void 0,this.chartThemeOverrides=void 0,this.enableChartToolPanelsButton=void 0,this.suppressChartToolPanelsButton=void 0,this.chartToolPanelsDef=void 0,this.chartMenuItems=void 0,this.loadingCellRenderer=void 0,this.loadingCellRendererParams=void 0,this.loadingCellRendererSelector=void 0,this.localeText=void 0,this.masterDetail=void 0,this.keepDetailRows=void 0,this.keepDetailRowsCount=void 0,this.detailCellRenderer=void 0,this.detailCellRendererParams=void 0,this.detailRowHeight=void 0,this.detailRowAutoHeight=void 0,this.context=void 0,this.alignedGrids=void 0,this.tabIndex=void 0,this.rowBuffer=void 0,this.valueCache=void 0,this.valueCacheNeverExpires=void 0,this.enableCellExpressions=void 0,this.suppressParentsInRowNodes=void 0,this.suppressTouch=void 0,this.suppressFocusAfterRefresh=void 0,this.suppressAsyncEvents=void 0,this.suppressBrowserResizeObserver=void 0,this.suppressPropertyNamesCheck=void 0,this.suppressChangeDetection=void 0,this.debug=void 0,this.overlayLoadingTemplate=void 0,this.loadingOverlayComponent=void 0,this.loadingOverlayComponentParams=void 0,this.suppressLoadingOverlay=void 0,this.overlayNoRowsTemplate=void 0,this.noRowsOverlayComponent=void 0,this.noRowsOverlayComponentParams=void 0,this.suppressNoRowsOverlay=void 0,this.pagination=void 0,this.paginationPageSize=void 0,this.paginationPageSizeSelector=void 0,this.paginationAutoPageSize=void 0,this.paginateChildRows=void 0,this.suppressPaginationPanel=void 0,this.pivotMode=void 0,this.pivotPanelShow=void 0,this.pivotMaxGeneratedColumns=void 0,this.pivotDefaultExpanded=void 0,this.pivotColumnGroupTotals=void 0,this.pivotRowTotals=void 0,this.pivotSuppressAutoColumn=void 0,this.suppressExpandablePivotGroups=void 0,this.functionsReadOnly=void 0,this.aggFuncs=void 0,this.suppressAggFuncInHeader=void 0,this.alwaysAggregateAtRootLevel=void 0,this.suppressAggAtRootLevel=void 0,this.aggregateOnlyChangedColumns=void 0,this.suppressAggFilteredOnly=void 0,this.removePivotHeaderRowWhenSingleValueColumn=void 0,this.animateRows=void 0,this.enableCellChangeFlash=void 0,this.cellFlashDuration=void 0,this.cellFlashDelay=void 0,this.cellFadeDuration=void 0,this.cellFadeDelay=void 0,this.allowShowChangeAfterFilter=void 0,this.domLayout=void 0,this.ensureDomOrder=void 0,this.enableRtl=void 0,this.suppressColumnVirtualisation=void 0,this.suppressMaxRenderedRowRestriction=void 0,this.suppressRowVirtualisation=void 0,this.rowDragManaged=void 0,this.suppressRowDrag=void 0,this.suppressMoveWhenRowDragging=void 0,this.rowDragEntireRow=void 0,this.rowDragMultiRow=void 0,this.rowDragText=void 0,this.fullWidthCellRenderer=void 0,this.fullWidthCellRendererParams=void 0,this.embedFullWidthRows=void 0,this.suppressGroupMaintainValueType=void 0,this.groupDisplayType=void 0,this.groupDefaultExpanded=void 0,this.autoGroupColumnDef=void 0,this.groupMaintainOrder=void 0,this.groupSelectsChildren=void 0,this.groupLockGroupColumns=void 0,this.groupAggFiltering=void 0,this.groupIncludeFooter=void 0,this.groupIncludeTotalFooter=void 0,this.groupTotalRow=void 0,this.grandTotalRow=void 0,this.suppressStickyTotalRow=void 0,this.groupSuppressBlankHeader=void 0,this.groupSelectsFiltered=void 0,this.showOpenedGroup=void 0,this.groupRemoveSingleChildren=void 0,this.groupRemoveLowestSingleChildren=void 0,this.groupHideOpenParents=void 0,this.groupAllowUnbalanced=void 0,this.rowGroupPanelShow=void 0,this.groupRowRenderer=void 0,this.groupRowRendererParams=void 0,this.suppressMakeColumnVisibleAfterUnGroup=void 0,this.treeData=void 0,this.rowGroupPanelSuppressSort=void 0,this.suppressGroupRowsSticky=void 0,this.pinnedTopRowData=void 0,this.pinnedBottomRowData=void 0,this.rowModelType=void 0,this.rowData=void 0,this.asyncTransactionWaitMillis=void 0,this.suppressModelUpdateAfterUpdateTransaction=void 0,this.datasource=void 0,this.cacheOverflowSize=void 0,this.infiniteInitialRowCount=void 0,this.serverSideInitialRowCount=void 0,this.suppressServerSideInfiniteScroll=void 0,this.suppressServerSideFullWidthLoadingRow=void 0,this.cacheBlockSize=void 0,this.maxBlocksInCache=void 0,this.maxConcurrentDatasourceRequests=void 0,this.blockLoadDebounceMillis=void 0,this.purgeClosedRowNodes=void 0,this.serverSideDatasource=void 0,this.serverSideSortAllLevels=void 0,this.serverSideEnableClientSideSort=void 0,this.serverSideOnlyRefreshFilteredGroups=void 0,this.serverSideFilterAllLevels=void 0,this.serverSideSortOnServer=void 0,this.serverSideFilterOnServer=void 0,this.serverSidePivotResultFieldSeparator=void 0,this.viewportDatasource=void 0,this.viewportRowModelPageSize=void 0,this.viewportRowModelBufferSize=void 0,this.alwaysShowHorizontalScroll=void 0,this.alwaysShowVerticalScroll=void 0,this.debounceVerticalScrollbar=void 0,this.suppressHorizontalScroll=void 0,this.suppressScrollOnNewData=void 0,this.suppressScrollWhenPopupsAreOpen=void 0,this.suppressAnimationFrame=void 0,this.suppressMiddleClickScrolls=void 0,this.suppressPreventDefaultOnMouseWheel=void 0,this.scrollbarWidth=void 0,this.rowSelection=void 0,this.rowMultiSelectWithClick=void 0,this.suppressRowDeselection=void 0,this.suppressRowClickSelection=void 0,this.suppressCellFocus=void 0,this.suppressHeaderFocus=void 0,this.suppressMultiRangeSelection=void 0,this.enableCellTextSelection=void 0,this.enableRangeSelection=void 0,this.enableRangeHandle=void 0,this.enableFillHandle=void 0,this.fillHandleDirection=void 0,this.suppressClearOnFillReduction=void 0,this.sortingOrder=void 0,this.accentedSort=void 0,this.unSortIcon=void 0,this.suppressMultiSort=void 0,this.alwaysMultiSort=void 0,this.multiSortKey=void 0,this.suppressMaintainUnsortedOrder=void 0,this.icons=void 0,this.rowHeight=void 0,this.rowStyle=void 0,this.rowClass=void 0,this.rowClassRules=void 0,this.suppressRowHoverHighlight=void 0,this.suppressRowTransform=void 0,this.columnHoverHighlight=void 0,this.gridId=void 0,this.deltaSort=void 0,this.treeDataDisplayType=void 0,this.functionsPassive=void 0,this.enableGroupEdit=void 0,this.initialState=void 0,this.getContextMenuItems=void 0,this.getMainMenuItems=void 0,this.postProcessPopup=void 0,this.processUnpinnedColumns=void 0,this.processCellForClipboard=void 0,this.processHeaderForClipboard=void 0,this.processGroupHeaderForClipboard=void 0,this.processCellFromClipboard=void 0,this.sendToClipboard=void 0,this.processDataFromClipboard=void 0,this.isExternalFilterPresent=void 0,this.doesExternalFilterPass=void 0,this.getChartToolbarItems=void 0,this.createChartContainer=void 0,this.navigateToNextHeader=void 0,this.tabToNextHeader=void 0,this.navigateToNextCell=void 0,this.tabToNextCell=void 0,this.getLocaleText=void 0,this.getDocument=void 0,this.paginationNumberFormatter=void 0,this.getGroupRowAgg
1=void 0,this.isGroupOpenByDefault=void 0,this.initialGroupOrderComparator=void 0,this.processPivotResultColDef=void 0,this.processPivotResultColGroupDef=void 0,this.getDataPath=void 0,this.getChildCount=void 0,this.getServerSideGroupLevelParams=void 0,this.isServerSideGroupOpenByDefault=void 0,this.isApplyServerSideTransaction=void 0,this.isServerSideGroup=void 0,this.getServerSideGroupKey=void 0,this.getBusinessKeyForNode=void 0,this.getRowId=void 0,this.resetRowDataOnUpdate=void 0,this.processRowPostCreate=void 0,this.isRowSelectable=void 0,this.isRowMaster=void 0,this.fillOperation=void 0,this.postSortRows=void 0,this.getRowStyle=void 0,this.getRowClass=void 0,this.getRowHeight=void 0,this.isFullWidthRow=void 0,this.toolPanelVisibleChanged=new D.bkB(),this.toolPanelSizeChanged=new D.bkB(),this.columnMenuVisibleChanged=new D.bkB(),this.contextMenuVisibleChanged=new D.bkB(),this.cutStart=new D.bkB(),this.cutEnd=new D.bkB(),this.pasteStart=new D.bkB(),this.pasteEnd=new D.bkB(),this.columnVisible=new D.bkB(),this.columnPinned=new D.bkB(),this.columnResized=new D.bkB(),this.columnMoved=new D.bkB(),this.columnValueChanged=new D.bkB(),this.columnPivotModeChanged=new D.bkB(),this.columnPivotChanged=new D.bkB(),this.columnGroupOpened=new D.bkB(),this.newColumnsLoaded=new D.bkB(),this.gridColumnsChanged=new D.bkB(),this.displayedColumnsChanged=new D.bkB(),this.virtualColumnsChanged=new D.bkB(),this.columnEverythingChanged=new D.bkB(),this.columnHeaderMouseOver=new D.bkB(),this.columnHeaderMouseLeave=new D.bkB(),this.columnHeaderClicked=new D.bkB(),this.columnHeaderContextMenu=new D.bkB(),this.componentStateChanged=new D.bkB(),this.cellValueChanged=new D.bkB(),this.cellEditRequest=new D.bkB(),this.rowValueChanged=new D.bkB(),this.cellEditingStarted=new D.bkB(),this.cellEditingStopped=new D.bkB(),this.rowEditingStarted=new D.bkB(),this.rowEditingStopped=new D.bkB(),this.undoStarted=new D.bkB(),this.undoEnded=new D.bkB(),this.redoStarted=new D.bkB(),this.redoEnded=new D.bkB(),this.rangeDeleteStart=new D.bkB(),this.rangeDeleteEnd=new D.bkB(),this.fillStart=new D.bkB(),this.fillEnd=new D.bkB(),this.filterOpened=new D.bkB(),this.filterChanged=new D.bkB(),this.filterModified=new D.bkB(),this.advancedFilterBuilderVisibleChanged=new D.bkB(),this.chartCreated=new D.bkB(),this.chartRangeSelectionChanged=new D.bkB(),this.chartOptionsChanged=new D.bkB(),this.chartDestroyed=new D.bkB(),this.cellKeyDown=new D.bkB(),this.gridReady=new D.bkB(),this.gridPreDestroyed=new D.bkB(),this.firstDataRendered=new D.bkB(),this.gridSizeChanged=new D.bkB(),this.modelUpdated=new D.bkB(),this.virtualRowRemoved=new D.bkB(),this.viewportChanged=new D.bkB(),this.bodyScroll=new D.bkB(),this.bodyScrollEnd=new D.bkB(),this.dragStarted=new D.bkB(),this.dragStopped=new D.bkB(),this.stateUpdated=new D.bkB(),this.paginationChanged=new D.bkB(),this.rowDragEnter=new D.bkB(),this.rowDragMove=new D.bkB(),this.rowDragLeave=new D.bkB(),this.rowDragEnd=new D.bkB(),this.columnRowGroupChanged=new D.bkB(),this.rowGroupOpened=new D.bkB(),this.expandOrCollapseAll=new D.bkB(),this.pivotMaxColumnsExceeded=new D.bkB(),this.pinnedRowDataChanged=new D.bkB(),this.rowDataUpdated=new D.bkB(),this.asyncTransactionsFlushed=new D.bkB(),this.storeRefreshed=new D.bkB(),this.cellClicked=new D.bkB(),this.cellDoubleClicked=new D.bkB(),this.cellFocused=new D.bkB(),this.cellMouseOver=new D.bkB(),this.cellMouseOut=new D.bkB(),this.cellMouseDown=new D.bkB(),this.rowClicked=new D.bkB(),this.rowDoubleClicked=new D.bkB(),this.rowSelected=new D.bkB(),this.selectionChanged=new D.bkB(),this.cellContextMenu=new D.bkB(),this.rangeSelectionChanged=new D.bkB(),this.tooltipShow=new D.bkB(),this.tooltipHide=new D.bkB(),this.sortChanged=new D.bkB(),this.columnRowGroupChangeRequest=new D.bkB(),this.columnPivotChangeRequest=new D.bkB(),this.columnValueChangeRequest=new D.bkB(),this.columnAggFuncChangeRequest=new D.bkB(),this._nativeElement=x.nativeElement;}ngAfterViewInit(){this.angularFrameworkOverrides.runOutsideAngular(()=>{this.frameworkComponentWrapper.setViewContainerRef(this.viewContainerRef,this.angularFrameworkOverrides);const x=Dt.kNx.combineAttributesAndGridOptions(this.gridOptions,this);this.gridParams={globalEventListener:this.globalEventListener.bind(this),frameworkOverrides:this.angularFrameworkOverrides,providedBeanInstances:{frameworkComponentWrapper:this.frameworkComponentWrapper},modules:this.modules||[]};const $=(0,Dt.Dvw)(this._nativeElement,x,this.gridParams);$&&(this.api=$,this.columnApi=new Dt.jf3($));const z=this.gridPreDestroyed;(z.observed??z.observers.length>0)&&console.warn('AG Grid: gridPreDestroyed event listener registered via (gridPreDestroyed)="method($event)" will be ignored! Please assign via gridOptions.gridPreDestroyed and pass to the grid as [gridOptions]="gridOptions"'),this._initialised=!0,this._fullyReady.resolveNow(null,d=>d);});}
1ngOnChanges(x){this._initialised&&this.angularFrameworkOverrides.runOutsideAngular(()=>{const $={};Object.entries(x).forEach(([z,d])=>{$[z]=d.currentValue;}),Dt.kNx.processOnChange($,this.api);});}ngOnDestroy(){this._initialised&&(this._destroyed=!0,this.api?.destroy());}isEmitterUsed(x){const z=this[x],d=z?.observed??z?.observers?.length>0,be=`on${x.charAt(0).toUpperCase()}${x.substring(1)}`;return d||!!this.gridOptions&&!!this.gridOptions[be];}globalEventListener(x,$){if(this._destroyed)return;const z=this[x];if(z&&this.isEmitterUsed(x)){const d=()=>this.angularFrameworkOverrides.runInsideAngular(()=>z.emit($));"gridReady"===x?this._fullyReady.then(()=>d()):d();}}}return X.ɵfac=function(x){return new(x||X)(D.rXU(D.aKT),D.rXU(D.c1b),D.rXU(Oo),D.rXU(_o));},X.ɵcmp=D.VBU({type:X,selectors:[["ag-grid-angular"]],inputs:{gridOptions:"gridOptions",modules:"modules",statusBar:"statusBar",sideBar:"sideBar",suppressContextMenu:"suppressContextMenu",preventDefaultOnContextMenu:"preventDefaultOnContextMenu",allowContextMenuWithControlKey:"allowContextMenuWithControlKey",columnMenu:"columnMenu",suppressMenuHide:"suppressMenuHide",enableBrowserTooltips:"enableBrowserTooltips",tooltipTrigger:"tooltipTrigger",tooltipShowDelay:"tooltipShowDelay",tooltipHideDelay:"tooltipHideDelay",tooltipMouseTrack:"tooltipMouseTrack",tooltipShowMode:"tooltipShowMode",tooltipInteraction:"tooltipInteraction",popupParent:"popupParent",copyHeadersToClipboard:"copyHeadersToClipboard",copyGroupHeadersToClipboard:"copyGroupHeadersToClipboard",clipboardDelimiter:"clipboardDelimiter",suppressCopyRowsToClipboard:"suppressCopyRowsToClipboard",suppressCopySingleCellRanges:"suppressCopySingleCellRanges",suppressLastEmptyLineOnPaste:"suppressLastEmptyLineOnPaste",suppressClipboardPaste:"suppressClipboardPaste",suppressClipboardApi:"suppressClipboardApi",suppressCutToClipboard:"suppressCutToClipboard",columnDefs:"columnDefs",defaultColDef:"defaultColDef",defaultColGroupDef:"defaultColGroupDef",columnTypes:"columnTypes",dataTypeDefinitions:"dataTypeDefinitions",maintainColumnOrder:"maintainColumnOrder",suppressFieldDotNotation:"suppressFieldDotNotation",headerHeight:"headerHeight",groupHeaderHeight:"groupHeaderHeight",floatingFiltersHeight:"floatingFiltersHeight",pivotHeaderHeight:"pivotHeaderHeight",pivotGroupHeaderHeight:"pivotGroupHeaderHeight",allowDragFromColumnsToolPanel:"allowDragFromColumnsToolPanel",suppressMovableColumns:"suppressMovableColumns",suppressColumnMoveAnimation:"suppressColumnMoveAnimation",suppressDragLeaveHidesColumns:"suppressDragLeaveHidesColumns",suppressRowGroupHidesColumns:"suppressRowGroupHidesColumns",colResizeDefault:"colResizeDefault",suppressAutoSize:"suppressAutoSize",autoSizePadding:"autoSizePadding",skipHeaderOnAutoSize:"skipHeaderOnAutoSize",autoSizeStrategy:"autoSizeStrategy",components:"components",editType:"editType",singleClickEdit:"singleClickEdit",suppressClickEdit:"suppressClickEdit",readOnlyEdit:"readOnlyEdit",stopEditingWhenCellsLoseFocus:"stopEditingWhenCellsLoseFocus",enterMovesDown:"enterMovesDown",enterMovesDownAfterEdit:"enterMovesDownAfterEdit",enterNavigatesVertically:"enterNavigatesVertically",enterNavigatesVerticallyAfterEdit:"enterNavigatesVerticallyAfterEdit",enableCellEditingOnBackspace:"enableCellEditingOnBackspace",undoRedoCellEditing:"undoRedoCellEditing",undoRedoCellEditingLimit:"undoRedoCellEditingLimit",defaultCsvExportParams:"defaultCsvExportParams",suppressCsvExport:"suppressCsvExport",defaultExcelExportParams:"defaultExcelExportParams",suppressExcelExport:"suppressExcelExport",excelStyles:"excelStyles",quickFilterText:"quickFilterText",cacheQuickFilter:"cacheQuickFilter",excludeHiddenColumnsFromQuickFilter:"excludeHiddenColumnsFromQuickFilter",includeHiddenColumnsInQuickFilter:"includeHiddenColumnsInQuickFilter",quickFilterParser:"quickFilterParser",quickFilterMatcher:"quickFilterMatcher",applyQuickFilterBeforePivotOrAgg:"applyQuickFilterBeforePivotOrAgg",excludeChildrenWhenTreeDataFiltering:"excludeChildrenWhenTreeDataFiltering",enableAdvancedFilter:"enableAdvancedFilter",advancedFilterModel:"advancedFilterModel",includeHiddenColumnsInAdvancedFilter:"includeHiddenColumnsInAdvancedFilter",advancedFilterParent:"advancedFilterParent",advancedFilterBuilderParams:"advancedFilterBuilderParams",suppressAdvancedFilterEval:"suppressAdvancedFilterEval",enableCharts:"enableCharts",chartThemes:"chartThemes",customChartThemes:"customChartThemes",chartThemeOverrides:"chartThemeOverrides",enableChartToolPanelsButton:"enableChartToolPanelsButton",suppressChartToolPanelsButton:"suppressChartToolPanelsButton",chartToolPanelsDef:"chartToolPanelsDef",chartMenuItems:"chartMenuItems",loadingCellRenderer:"loadingCellRenderer",loadingCellRendererParams:"loadingCellRendererParams",loadingCellRendererSelector:"loadingCellRendererSelector",localeText:"localeText",masterDetail:"masterDetail",keepDetailRows:"keepDetailRows",keepDetailRowsCount:"keepDetailRowsCount",detailCellRenderer:"detailCellRenderer",detailCellRendererParams:"detailCellRendererParams",detailRowHeight:"detailRowHeight",detailRowAutoHeight:"detailRowAutoHeight",context:"context",alignedGrids:"al
1ignedGrids",tabIndex:"tabIndex",rowBuffer:"rowBuffer",valueCache:"valueCache",valueCacheNeverExpires:"valueCacheNeverExpires",enableCellExpressions:"enableCellExpressions",suppressParentsInRowNodes:"suppressParentsInRowNodes",suppressTouch:"suppressTouch",suppressFocusAfterRefresh:"suppressFocusAfterRefresh",suppressAsyncEvents:"suppressAsyncEvents",suppressBrowserResizeObserver:"suppressBrowserResizeObserver",suppressPropertyNamesCheck:"suppressPropertyNamesCheck",suppressChangeDetection:"suppressChangeDetection",debug:"debug",overlayLoadingTemplate:"overlayLoadingTemplate",loadingOverlayComponent:"loadingOverlayComponent",loadingOverlayComponentParams:"loadingOverlayComponentParams",suppressLoadingOverlay:"suppressLoadingOverlay",overlayNoRowsTemplate:"overlayNoRowsTemplate",noRowsOverlayComponent:"noRowsOverlayComponent",noRowsOverlayComponentParams:"noRowsOverlayComponentParams",suppressNoRowsOverlay:"suppressNoRowsOverlay",pagination:"pagination",paginationPageSize:"paginationPageSize",paginationPageSizeSelector:"paginationPageSizeSelector",paginationAutoPageSize:"paginationAutoPageSize",paginateChildRows:"paginateChildRows",suppressPaginationPanel:"suppressPaginationPanel",pivotMode:"pivotMode",pivotPanelShow:"pivotPanelShow",pivotMaxGeneratedColumns:"pivotMaxGeneratedColumns",pivotDefaultExpanded:"pivotDefaultExpanded",pivotColumnGroupTotals:"pivotColumnGroupTotals",pivotRowTotals:"pivotRowTotals",pivotSuppressAutoColumn:"pivotSuppressAutoColumn",suppressExpandablePivotGroups:"suppressExpandablePivotGroups",functionsReadOnly:"functionsReadOnly",aggFuncs:"aggFuncs",suppressAggFuncInHeader:"suppressAggFuncInHeader",alwaysAggregateAtRootLevel:"alwaysAggregateAtRootLevel",suppressAggAtRootLevel:"suppressAggAtRootLevel",aggregateOnlyChangedColumns:"aggregateOnlyChangedColumns",suppressAggFilteredOnly:"suppressAggFilteredOnly",removePivotHeaderRowWhenSingleValueColumn:"removePivotHeaderRowWhenSingleValueColumn",animateRows:"animateRows",enableCellChangeFlash:"enableCellChangeFlash",cellFlashDuration:"cellFlashDuration",cellFlashDelay:"cellFlashDelay",cellFadeDuration:"cellFadeDuration",cellFadeDelay:"cellFadeDelay",allowShowChangeAfterFilter:"allowShowChangeAfterFilter",domLayout:"domLayout",ensureDomOrder:"ensureDomOrder",enableRtl:"enableRtl",suppressColumnVirtualisation:"suppressColumnVirtualisation",suppressMaxRenderedRowRestriction:"suppressMaxRenderedRowRestriction",suppressRowVirtualisation:"suppressRowVirtualisation",rowDragManaged:"rowDragManaged",suppressRowDrag:"suppressRowDrag",suppressMoveWhenRowDragging:"suppressMoveWhenRowDragging",rowDragEntireRow:"rowDragEntireRow",rowDragMultiRow:"rowDragMultiRow",rowDragText:"rowDragText",fullWidthCellRenderer:"fullWidthCellRenderer",fullWidthCellRendererParams:"fullWidthCellRendererParams",embedFullWidthRows:"embedFullWidthRows",suppressGroupMaintainValueType:"suppressGroupMaintainValueType",groupDisplayType:"groupDisplayType",groupDefaultExpanded:"groupDefaultExpanded",autoGroupColumnDef:"autoGroupColumnDef",groupMaintainOrder:"groupMaintainOrder",groupSelectsChildren:"groupSelectsChildren",groupLockGroupColumns:"groupLockGroupColumns",groupAggFiltering:"groupAggFiltering",groupIncludeFooter:"groupIncludeFooter",groupIncludeTotalFooter:"groupIncludeTotalFooter",groupTotalRow:"groupTotalRow",grandTotalRow:"grandTotalRow",suppressStickyTotalRow:"suppressStickyTotalRow",groupSuppressBlankHeader:"groupSuppressBlankHeader",groupSelectsFiltered:"groupSelectsFiltered",showOpenedGroup:"showOpenedGroup",groupRemoveSingleChildren:"groupRemoveSingleChildren",groupRemoveLowestSingleChildren:"groupRemoveLowestSingleChildren",groupHideOpenParents:"groupHideOpenParents",groupAllowUnbalanced:"groupAllowUnbalanced",rowGroupPanelShow:"rowGroupPanelShow",groupRowRenderer:"groupRowRenderer",groupRowRendererParams:"groupRowRendererParams",suppressMakeColumnVisibleAfterUnGroup:"suppressMakeColumnVisibleAfterUnGroup",treeData:"treeData",rowGroupPanelSuppressSort:"rowGroupPanelSuppressSort",suppressGroupRowsSticky:"suppressGroupRowsSticky",pinnedTopRowData:"pinnedTopRowData",pinnedBottomRowData:"pinnedBottomRowData",rowModelType:"rowModelType",rowData:"rowData",asyncTransactionWaitMillis:"asyncTransactionWaitMillis",suppressModelUpdateAfterUpdateTransaction:"suppressModelUpdateAfterUpdateTransaction",datasource:"datasource",cac
1heOverflowSize:"cacheOverflowSize",infiniteInitialRowCount:"infiniteInitialRowCount",serverSideInitialRowCount:"serverSideInitialRowCount",suppressServerSideInfiniteScroll:"suppressServerSideInfiniteScroll",suppressServerSideFullWidthLoadingRow:"suppressServerSideFullWidthLoadingRow",cacheBlockSize:"cacheBlockSize",maxBlocksInCache:"maxBlocksInCache",maxConcurrentDatasourceRequests:"maxConcurrentDatasourceRequests",blockLoadDebounceMillis:"blockLoadDebounceMillis",purgeClosedRowNodes:"purgeClosedRowNodes",serverSideDatasource:"serverSideDatasource",serverSideSortAllLevels:"serverSideSortAllLevels",serverSideEnableClientSideSort:"serverSideEnableClientSideSort",serverSideOnlyRefreshFilteredGroups:"serverSideOnlyRefreshFilteredGroups",serverSideFilterAllLevels:"serverSideFilterAllLevels",serverSideSortOnServer:"serverSideSortOnServer",serverSideFilterOnServer:"serverSideFilterOnServer",serverSidePivotResultFieldSeparator:"serverSidePivotResultFieldSeparator",viewportDatasource:"viewportDatasource",viewportRowModelPageSize:"viewportRowModelPageSize",viewportRowModelBufferSize:"viewportRowModelBufferSize",alwaysShowHorizontalScroll:"alwaysShowHorizontalScroll",alwaysShowVerticalScroll:"alwaysShowVerticalScroll",debounceVerticalScrollbar:"debounceVerticalScrollbar",suppressHorizontalScroll:"suppressHorizontalScroll",suppressScrollOnNewData:"suppressScrollOnNewData",suppressScrollWhenPopupsAreOpen:"suppressScrollWhenPopupsAreOpen",suppressAnimationFrame:"suppressAnimationFrame",suppressMiddleClickScrolls:"suppressMiddleClickScrolls",suppressPreventDefaultOnMouseWheel:"suppressPreventDefaultOnMouseWheel",scrollbarWidth:"scrollbarWidth",rowSelection:"rowSelection",rowMultiSelectWithClick:"rowMultiSelectWithClick",suppressRowDeselection:"suppressRowDeselection",suppressRowClickSelection:"suppressRowClickSelection",suppressCellFocus:"suppressCellFocus",suppressHeaderFocus:"suppressHeaderFocus",suppressMultiRangeSelection:"suppressMultiRangeSelection",enableCellTextSelection:"enableCellTextSelection",enableRangeSelection:"enableRangeSelection",enableRangeHandle:"enableRangeHandle",enableFillHandle:"enableFillHandle",fillHandleDirection:"fillHandleDirection",suppressClearOnFillReduction:"suppressClearOnFillReduction",sortingOrder:"sortingOrder",accentedSort:"accentedSort",unSortIcon:"unSortIcon",suppressMultiSort:"suppressMultiSort",alwaysMultiSort:"alwaysMultiSort",multiSortKey:"multiSortKey",suppressMaintainUnsortedOrder:"suppressMaintainUnsortedOrder",icons:"icons",rowHeight:"rowHeight",rowStyle:"rowStyle",rowClass:"rowClass",rowClassRules:"rowClassRules",suppressRowHoverHighlight:"suppressRowHoverHighlight",suppressRowTransform:"suppressRowTransform",columnHoverHighlight:"columnHoverHighlight",gridId:"gridId",deltaSort:"deltaSort",treeDataDisplayType:"treeDataDisplayType",functionsPassive:"functionsPassive",enableGroupEdit:"enableGroupEdit",initialState:"initialState",getContextMenuItems:"getContextMenuItems",getMainMenuItems:"getMainMenuItems",postProcessPopup:"postProcessPopup",processUnpinnedColumns:"processUnpinnedColumns",processCellForClipboard:"processCellForClipboard",processHeaderForClipboard:"processHeaderForClipboard",processGroupHeaderForClipboard:"processGroupHeaderForClipboard",processCellFromClipboard:"processCellFromClipboard",sendToClipboard:"sendToClipboard",processDataFromClipboard:"processDataFromClipboard",isExternalFilterPresent:"isExternalFilterPresent",doesExternalFilterPass:"doesExternalFilterPass",getChartToolbarItems:"getChartToolbarItems",createChartContainer:"createChartContainer",navigateToNextHeader:"navigateToNextHeader",tabToNextHeader:"tabToNextHeader",navigateToNextCell:"navigateToNextCell",tabToNextCell:"tabToNextCell",getLocaleText:"getLocaleText",getDocument:"getDocument",paginationNumberFormatter:"paginationNumberFormatter",getGroupRowAgg:"getGroupRowAgg",isGroupOpenByDefault:"isGroupOpenByDefault",initialGroupOrderComparator:"initialGroupOrderComparator",processPivotResultColDef:"processPivotResultColDef",processPivotResultColGroupDef:"processPivotResultColGroupDef",getDataPath:"getDataPath",getChildCount:"getChildCount",getServerSideGroupLevelParams:"getServerSideGroupLevelParams",isServerSideGroupOpenByDefault:"isServerSideGroupOpenByDefault",isApplyServerSideTransaction:"isApplyServerSideTransaction",isServerSideGroup:"isServerSideGroup",getServerSideGroupKey:"getServerSideGroupKey",getBusinessKeyForNode:"getBusinessKeyForNode",getRowId:"getRowId",resetRowDataOnUpdate:"resetRowDataOnUpdate",processRowPostCreate:"processRowPostCreate",isRowSelectable:"isRowSelectable",isRowMaster:"isRowMaster",fillOperation:"fillOperation",postSortRows:"postSortRows",getRowStyle:"getRowStyle",getRowClass:"getRowClass",getRowHeight:"getRowHeight",isFullWidthRow:"isFullWidthRow"},outputs:{toolPanelVisibleChanged:"toolPanelVisibleChanged",toolPanelSizeChanged:"toolPanelSizeChanged",columnMenuVisibleChanged:"columnMenuVisibleChanged",contextMenuVisibleChanged:"contextMenuVisibleChanged",cutStart:"cutStart",cutEnd:"cutEnd",pasteStart:"pasteStart",pasteEnd:"pasteEnd",columnVisible:"columnVisible",columnPinned:"columnPinned",columnResized:"columnResized",columnMoved:"columnMoved",columnValueChanged:"columnValueChanged",columnPivotModeChanged:"columnPivotModeChanged",columnPivotChanged:"columnPivotChanged",columnGroupOpened:"columnGroupOpened",newColumnsLoaded:"newColumnsLoaded",gridColumnsChanged:"gridColumnsChanged",displayedColumnsChanged:"displayedColumnsChanged",virtualColumnsChanged:"virtualColumnsChanged",columnEverythingChanged:"columnEverythingChanged",columnHeaderMouseOver:"columnHeaderMouseOver",columnHeaderMouseLeave:"columnHeaderMouseLeave",columnHeaderClicked:"columnHeaderClicked",columnHeaderContextMenu:"columnHeaderContextMenu",componentStateChanged:"componentStateChanged",cellValueChanged:"cellV
1alueChanged",cellEditRequest:"cellEditRequest",rowValueChanged:"rowValueChanged",cellEditingStarted:"cellEditingStarted",cellEditingStopped:"cellEditingStopped",rowEditingStarted:"rowEditingStarted",rowEditingStopped:"rowEditingStopped",undoStarted:"undoStarted",undoEnded:"undoEnded",redoStarted:"redoStarted",redoEnded:"redoEnded",rangeDeleteStart:"rangeDeleteStart",rangeDeleteEnd:"rangeDeleteEnd",fillStart:"fillStart",fillEnd:"fillEnd",filterOpened:"filterOpened",filterChanged:"filterChanged",filterModified:"filterModified",advancedFilterBuilderVisibleChanged:"advancedFilterBuilderVisibleChanged",chartCreated:"chartCreated",chartRangeSelectionChanged:"chartRangeSelectionChanged",chartOptionsChanged:"chartOptionsChanged",chartDestroyed:"chartDestroyed",cellKeyDown:"cellKeyDown",gridReady:"gridReady",gridPreDestroyed:"gridPreDestroyed",firstDataRendered:"firstDataRendered",gridSizeChanged:"gridSizeChanged",modelUpdated:"modelUpdated",virtualRowRemoved:"virtualRowRemoved",viewportChanged:"viewportChanged",bodyScroll:"bodyScroll",bodyScrollEnd:"bodyScrollEnd",dragStarted:"dragStarted",dragStopped:"dragStopped",stateUpdated:"stateUpdated",paginationChanged:"paginationChanged",rowDragEnter:"rowDragEnter",rowDragMove:"rowDragMove",rowDragLeave:"rowDragLeave",rowDragEnd:"rowDragEnd",columnRowGroupChanged:"columnRowGroupChanged",rowGroupOpened:"rowGroupOpened",expandOrCollapseAll:"expandOrCollapseAll",pivotMaxColumnsExceeded:"pivotMaxColumnsExceeded",pinnedRowDataChanged:"pinnedRowDataChanged",rowDataUpdated:"rowDataUpdated",asyncTransactionsFlushed:"asyncTransactionsFlushed",storeRefreshed:"storeRefreshed",cellClicked:"cellClicked",cellDoubleClicked:"cellDoubleClicked",cellFocused:"cellFocused",cellMouseOver:"cellMouseOver",cellMouseOut:"cellMouseOut",cellMouseDown:"cellMouseDown",rowClicked:"rowClicked",rowDoubleClicked:"rowDoubleClicked",rowSelected:"rowSelected",selectionChanged:"selectionChanged",cellContextMenu:"cellContextMenu",rangeSelectionChanged:"rangeSelectionChanged",tooltipShow:"tooltipShow",tooltipHide:"tooltipHide",sortChanged:"sortChanged",columnRowGroupChangeRequest:"columnRowGroupChangeRequest",columnPivotChangeRequest:"columnPivotChangeRequest",columnValueChangeRequest:"columnValueChangeRequest",columnAggFuncChangeRequest:"columnAggFuncChangeRequest"},standalone:!0,features:[D.Jv_([Oo,_o]),D.OA$,D.aNF],decls:0,vars:0,template:function(x,$){},encapsulation:2}),X;})(),Vo=(()=>{class X{}return X.ɵfac=function(x){return new(x||X)();},X.ɵmod=D.$C({type:X}),X.ɵinj=D.G2t({imports:[Ms]}),X;})();},56255:(Fh,Yr,Ls)=>{Ls.d(Yr,{$1h:()=>qe,$Y_:()=>oo,BFs:()=>au,B_v:()=>Ri,CJG:()=>Yt,CS5:()=>ws,CSq:()=>eu,Cf3:()=>ng,CvR:()=>mt,D45:()=>ae,DDm:()=>C,DKR:()=>ur,Dvw:()=>sg,E1g:()=>_r,E3M:()=>j,EJF:()=>co,FiP:()=>Bd,G21:()=>Lt,GPp:()=>Td,GsR:()=>Ss,HDb:()=>Qo,HHt:()=>Ut,HLc:()=>Gi,HM$:()=>Gr,H_$:()=>al,HiW:()=>ou,HvL:()=>Vt,Hyp:()=>Dr,IGk:()=>Kd,IqQ:()=>it,Iu8:()=>ll,J1w:()=>Bl,JPk:()=>di,JWk:()=>jn,Ju4:()=>js,K02:()=>fe,K42:()=>Yi,K4S:()=>Ii,Kb3:()=>lu,LFT:()=>Ti,LIk:()=>Yd,LT8:()=>wu,LfH:()=>Mp,Lhl:()=>ru,M4G:()=>hc,MDK:()=>k,MSA:()=>gl,MVO:()=>me,NF5:()=>ku,Nat:()=>ig,OH$:()=>Cs,OPU:()=>jt,OQA:()=>qn,OQU:()=>vt,OnL:()=>jd,PC7:()=>so,PIB:()=>A,PJL:()=>ne,PLc:()=>Co,Pk_:()=>Cu,Pmj:()=>xt,Q5x:()=>Ys,Q90:()=>Iu,QBm:()=>rs,Qgm:()=>Xt,R4L:()=>yr,RI_:()=>gi,RRV:()=>ht,RYS:()=>gu,Rdv:()=>Ct,Rlq:()=>Sl,Ry8:()=>qt,SEh:()=>ld,Sko:()=>Gu,SpC:()=>pr,T6X:()=>Uu,TJD:()=>Js,TOO:()=>us,TUE:()=>W,TYQ:()=>ti,TaT:()=>ce,U$F:()=>gr,U3q:()=>br,USV:()=>Qe,U_L:()=>bd,Udn:()=>Tr,Ug$:()=>Hl,Unm:()=>qs,VPZ:()=>Z,Vf_:()=>Ue,VyI:()=>Mr,WO_:()=>H,XQb:()=>R,Xx1:()=>Q,Y0b:()=>Vd,YD7:()=>mu,YEH:()=>rl,YHi:()=>wo,YtK:()=>su,Yx9:()=>Ns,YzF:()=>Hu,ZvW:()=>Zn,_:()=>B,_7R:()=>Bu,a1W:()=>Yl,a8A:()=>cu,aBp:()=>Ot,aJZ:()=>ns,aP4:()=>as,aS7:()=>Eg,aq:()=>pl,atK:()=>Ji,auO:()=>bi,bB5:()=>Eu,bBw:()=>_t,bLJ:()=>Dl,c4$:()=>J,dR4:()=>L,dcM:()=>xd,dsm:()=>g,eAL:()=>Cr,ehA:()=>iu,fAn:()=>U,fK3:()=>sn,fNJ:()=>Su,fNO:()=>Vp,fRK:()=>os,fVA:()=>yi,fnn:()=>Mu,gay:()=>zd,gvq:()=>ni,hK9:()=>Fi,hv8:()=>ad,i9O:()=>Pr,iEP:()=>Fr,iH9:()=>Nr,ia$:()=>ml,ihO:()=>Ci,j19:()=>hl,jf3:()=>Mi,jfj:()=>to,k$d:()=>ho,k4Y:()=>mo,k7d:()=>He,kNx:()=>cn,kOq:()=>nl,kem:()=>Ar,lon:()=>Zd,m20:()=>Re,m5s:()=>Wd,mE1:()=>Ni,mSN:()=>dd,mqe:()=>Ad,n76:()=>zu,o7C:()=>T,oY$:()=>$e,o_p:()=>we,obS:()=>ea,ock:()=>pe,ofN:()=>Od,pA9:()=>uu,pE7:()=>mr,pK6:()=>ct,pNP:()=>go,pkb:()=>ls,pow:()=>Ru,qRA:()=>Fd,qdQ:()=>si,qh$:()=>je,qkt:()=>Fl,qyQ:()=>fi,rdE:()=>Ud,s1r:()=>ii,sVA:()=>c,stt:()=>zt,syG:()=>q,tbO:()=>Ki,tj3:()=>_d,tyx:()=>dl,uAl:()=>V,uf_:()=>hn,uij:()=>ro,utH:()=>eo,uvO:()=>Jd,v26:()=>yu,vBt:()=>Qt,vXh:()=>pu,wX9:()=>$t,wjn:()=>Tl,xA9:()=>
1og,xMA:()=>It,xSC:()=>oi,yGC:()=>Kt,yLQ:()=>tl,yLT:()=>pc,yOL:()=>Xo,yah:()=>Ee,ycK:()=>fu,yuY:()=>fo,zCV:()=>du,zIT:()=>ol,zOQ:()=>hu,zmE:()=>tu,zsj:()=>tn});var D=Object.defineProperty,Dt=Object.defineProperties,Oo=Object.getOwnPropertyDescriptor,_o=Object.getOwnPropertyDescriptors,Wi=Object.getOwnPropertySymbols,Ms=Object.prototype.hasOwnProperty,Vo=Object.prototype.propertyIsEnumerable,X=(e,t,i)=>t in e?D(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,M=(e,t)=>{for(var i in t||(t={}))Ms.call(t,i)&&X(e,i,t[i]);if(Wi)for(var i of Wi(t))Vo.call(t,i)&&X(e,i,t[i]);return e;},x=(e,t)=>Dt(e,_o(t)),z=(e,t)=>{for(var i in t)D(e,i,{get:t[i],enumerable:!0});},d=(e,t,i,s)=>{for(var n,o=s>1?void 0:s?Oo(t,i):t,r=e.length-1;r>=0;r--)(n=e[r])&&(o=(s?n(t,i,o):n(o))||o);return s&&o&&D(t,i,o),o;},be=(e,t)=>(i,s)=>t(i,s,e),bt={};function ot(e){return null==e||""===e?null:e;}function y(e,t=!1){return null!=e&&(""!==e||t);}function _(e){return!y(e);}function Me(e){return null==e||0===e.length;}function Is(e){return null!=e&&"function"==typeof e.toString?e.toString():null;}function Ht(e){if(void 0===e)return;if(null===e||""===e)return null;if("number"==typeof e)return isNaN(e)?void 0:e;const t=parseInt(e,10);return isNaN(t)?void 0:t;}function Ho(e){if(void 0!==e)return null!==e&&""!==e&&("boolean"==typeof e?e:/true/i.test(e));}function Ph(e){if(null!=e&&""!==e)return e;}function jr(e,t){return(e?JSON.stringify(e):null)===(t?JSON.stringify(t):null);}function Lh(e,t,i=!1){const s=null==e,o=null==t;if(e&&e.toNumber&&(e=e.toNumber()),t&&t.toNumber&&(t=t.toNumber()),s&&o)return 0;if(s)return-1;if(o)return 1;function r(n,l){return n>l?1:n<l?-1:0;}if("string"!=typeof e||!i)return r(e,t);try{return e.localeCompare(t);}catch{return r(e,t);}}function li(e){if(e instanceof Set||e instanceof Map){const t=[];return e.forEach(i=>t.push(i)),t;}return Object.values(e);}z(bt,{attrToBoolean:()=>Ho,attrToNumber:()=>Ht,attrToString:()=>Ph,defaultComparator:()=>Lh,exists:()=>y,jsonEquals:()=>jr,makeNull:()=>
1ot,missing:()=>_,missingOrEmpty:()=>Me,toStringOrNull:()=>Is,values:()=>li});var Yl=class{constructor(){this.existingKeys={};}addExistingKeys(e){for(let t=0;t<e.length;t++)this.existingKeys[e[t]]=!0;}getUniqueKey(e,t){e=Is(e);let i=0;for(;;){let s;if(e?(s=e,0!==i&&(s+="_"+i)):t?(s=t,0!==i&&(s+="_"+i)):s=i,!this.existingKeys[s])return this.existingKeys[s]=!0,String(s);i++;}}},jl={};z(jl,{SKIP_JS_BUILTINS:()=>ko,cloneObject:()=>qr,deepCloneDefinition:()=>Bo,getAllValuesInObject:()=>kt,getValueUsingField:()=>Ui,isNonNullObject:()=>Wo,iterateObject:()=>Se,mergeDeep:()=>Ie,removeAllReferences:()=>ql});var ko=new Set(["__proto__","constructor","prototype"]);function Se(e,t){if(null!=e){if(Array.isArray(e)){for(let i=0;i<e.length;i++)t(i.toString(),e[i]);return;}for(const[i,s]of Object.entries(e))t(i,s);}}function qr(e){const t={},i=Object.keys(e);for(let s=0;s<i.length;s++){if(ko.has(i[s]))continue;const o=i[s];t[o]=e[o];}return t;}function Bo(e,t){if(!e)return;const i=e,s={};return Object.keys(i).forEach(o=>{if(t&&t.indexOf(o)>=0||ko.has(o))return;const r=i[o];s[o]=Wo(r)&&r.constructor===Object?Bo(r):r;}),s;}function kt(e){if(!e)return[];const t=Object;if("function"==typeof t.values)return t.values(e);const i=[];for(const s in e)e.hasOwnProperty(s)&&e.propertyIsEnumerable(s)&&i.push(e[s]);return i;}function Ie(e,t,i=!0,s=!1){y(t)&&Se(t,(o,r)=>{if(ko.has(o))return;let n=e[o];n!==r&&(s&&null==n&&null!=r&&"object"==typeof r&&r.constructor===Object&&(n={},e[o]=n),Wo(r)&&Wo(n)&&!Array.isArray(n)?Ie(n,r,i,s):(i||void 0!==r)&&(e[o]=r));});}function Ui(e,t,i){if(!t||!e)return;if(!i)return e[t];const s=t.split(".");let o=e;for(let r=0;r<s.length;r++){if(null==o)return;o=o[s[r]];}return o;}function ql(e,t=[],i){Object.keys(e).forEach(n=>{"object"==typeof e[n]&&!t.includes(n)&&(e[n]=void 0);});const s=Object.getPrototypeOf(e),o={};Object.getOwnPropertyNames(s).forEach(n=>{if("function"==typeof s[n]&&!t.includes(n)){const a=()=>{console.warn((n=>`AG Grid: Grid API function ${n}() cannot be called as the grid has been destroyed.\n It is recommended to remove local references to the grid api. Alternatively, check gridApi.isDestroyed() to avoid calling methods against a destroyed grid.\n To run logic when the grid is about to be destroyed use the gridPreDestroy event. See: ${i}`)(n));};o[n]={value:a,writable:!0};}}),Object.defineProperties(e,o);}function Wo(e){return"object"==typeof e&&null!==e;}var Ql={};z(Ql,{compose:()=>Mh,debounce:()=>Te,doOnce:()=>zi,errorOnce:()=>rt,executeAfter:()=>Jl,executeInAWhile:()=>Zl,executeNextVMTurn:()=>Zr,getFunctionName:()=>Uo,isFunction:()=>zo,noop:()=>Ih,throttle:()=>Jr,waitUntil:()=>en,warnOnce:()=>O});var Xl={};function zi(e,t){Xl[t]||(e(),Xl[t]=!0);}function O(e){zi(()=>console.warn("AG Grid: "+e),e);}function rt(e){zi(()=>console.error("AG Grid: "+e),e);}function Uo(e){if(e.name)return e.name;const t=/function\s+([^\(]+)/.exec(e.toString());return t&&2===t.length?t[1].trim():null;}function zo(e){return!!(e&&e.constructor&&e.call&&e.apply);}function Zl(e){Jl(e,400);}var Qr=[],Xr=!1;function Zr(e){Qr.push(e),!Xr&&(Xr=!0,window.setTimeout(()=>{const t=Qr.slice();Qr.length=0,Xr=!1,t.forEach(i=>i());},0));}function Jl(e,t=0){e.length>0&&window.setTimeout(()=>e.forEach(i=>i()),t);}function Te(e,t){let i;return function(...s){const o=this;window.clearTimeout(i),i=window.setTimeout(function(){e.apply(o,s);},t);};}function Jr(e,t){let i=0;return function(...s){const r=new Date().getTime();r-i<t||(i=r,e.apply(this,s));};}function en(e,t,i=100,s){const o=new Date().getTime();let r=null,n=!1;const l=()=>{const a=new Date().getTime()-o>i;(e()||a)&&(t(),n=!0,null!=r&&(window.clearInterval(r),r=null),a&&s&&console.warn(s));};l(),n||(r=window.setInterval(l,10));}function Mh(...e){return t=>e.reduce((i,s)=>s(i),t);}var Ih=()=>{},tn=(e=>(e.CommunityCoreModule="@ag-grid-community/core",e.InfiniteRowModelModule="@ag-grid-community/infinite-row-model",e.ClientSideRowModelModule="@ag-grid-community/client-side-row-model",e.CsvExportModule="@ag-grid-community/csv-export",e.EnterpriseCoreModule="@ag-grid-enterprise/core",e.RowGroupingModule="@ag-grid-enterprise/row-grouping",e.ColumnsToolPanelModule="@ag-grid-enterprise/column-tool-panel",e.FiltersToolPanelModule="@ag-grid-enterprise/filter-tool-panel",e.MenuModule="@ag-grid-enterprise/menu",e.SetFilterModule="@ag-grid-enterprise/set-filter",e.MultiFilterModule="@ag-grid-enterprise/multi-filter",e.StatusBarModule="@ag-grid-enterprise/status-bar",e.SideBarModule="@ag-grid-enterprise/side-bar",e.RangeSelectionModule="@ag-grid-enterprise/range-selection",e.MasterDetailModule="@ag-grid-enterprise/master-detail",e.RichSelectModule="@ag-grid-enterprise/rich-select",e.GridChartsModule="@ag-grid-enterprise/charts",e.Vie
1wportRowModelModule="@ag-grid-enterprise/viewport-row-model",e.ServerSideRowModelModule="@ag-grid-enterprise/server-side-row-model",e.ExcelExportModule="@ag-grid-enterprise/excel-export",e.ClipboardModule="@ag-grid-enterprise/clipboard",e.SparklinesModule="@ag-grid-enterprise/sparklines",e.AdvancedFilterModule="@ag-grid-enterprise/advanced-filter",e.AngularModule="@ag-grid-community/angular",e.ReactModule="@ag-grid-community/react",e.VueModule="@ag-grid-community/vue",e))(tn||{}),Ko=class ee{static register(t){ee.__register(t,!0,void 0);}static registerModules(t){ee.__registerModules(t,!0,void 0);}static __register(t,i,s){ee.runVersionChecks(t),void 0!==s?(ee.areGridScopedModules=!0,void 0===ee.gridModulesMap[s]&&(ee.gridModulesMap[s]={}),ee.gridModulesMap[s][t.moduleName]=t):ee.globalModulesMap[t.moduleName]=t,ee.setModuleBased(i);}static __unRegisterGridModules(t){delete ee.gridModulesMap[t];}static __registerModules(t,i,s){ee.setModuleBased(i),t&&t.forEach(o=>ee.__register(o,i,s));}static isValidModuleVersion(t){const[i,s]=t.version.split(".")||[],[o,r]=ee.currentModuleVersion.split(".")||[];return i===o&&s===r;}static runVersionChecks(t){if(ee.currentModuleVersion||(ee.currentModuleVersion=t.version),t.version?ee.isValidModuleVersion(t)||console.error(`AG Grid: You are using incompatible versions of AG Grid modules. Major and minor versions should always match across modules. '${t.moduleName}' is version ${t.version} but the other modules are version ${this.currentModuleVersion}. Please update all modules to the same version.`):console.error(`AG Grid: You are using incompatible versions of AG Grid modules. Major and minor versions should always match across modules. '${t.moduleName}' is incompatible. Please update all modules to the same version.`),t.validate){const i=t.validate();i.isValid||console.error(`AG Grid: ${i.message}`);}}static setModuleBased(t){void 0===ee.moduleBased?ee.moduleBased=t:ee.moduleBased!==t&&zi(()=>{console.warn("AG Grid: You are mixing modules (i.e. @ag-grid-community/core) and packages (ag-grid-community)
1- you can only use one or the other of these mechanisms."),console.warn("Please see https://www.ag-grid.com/javascript-grid/modules/ for more information.");},"ModulePackageCheck");}static __setIsBundled(){ee.isBundled=!0;}static __assertRegistered(t,i,s){var o;if(this.__isRegistered(t,s))return!0;const r=i+t;let n;if(ee.isBundled)n=`AG Grid: unable to use ${i} as 'ag-grid-enterprise' has not been loaded. Check you are using the Enterprise bundle:\n \n <script src="https://cdn.jsdelivr.net/npm/ag-grid-enterprise@AG_GRID_VERSION/dist/ag-grid-enterprise.min.js"><\/script>\n \nFor more info see: https://ag-grid.com/javascript-data-grid/getting-started/#getting-started-with-ag-grid-enterprise`;else if(ee.moduleBased||void 0===ee.moduleBased){let l=null==(o=Object.entries(tn).find(([a,u])=>u===t))?void 0:o[0];n=`AG Grid: unable to use ${i} as the ${l} is not registered${ee.areGridScopedModules?` for gridId: ${s}`:""}. Check if you have registered the module:\n \n import { ModuleRegistry } from '@ag-grid-community/core';\n import { ${l} } from '${t}';\n \n ModuleRegistry.registerModules([ ${l} ]);\n\nFor more info see: https://www.ag-grid.com/javascript-grid/modules/`;}else n=`AG Grid: unable to use ${i} as package 'ag-grid-enterprise' has not been imported. Check that you have imported the package:\n \n import 'ag-grid-enterprise';`;return zi(()=>{console.warn(n);},r),!1;}static __isRegistered(t,i){var s;return!!ee.globalModulesMap[t]||!(null==(s=ee.gridModulesMap[i])||!s[t]);}static __getRegisteredModules(t){return[...li(ee.globalModulesMap),...li(ee.gridModulesMap[t]||{})];}static __getGridRegisteredModules(t){var i;return li(null!=(i=ee.gridModulesMap[t])?i:{})||[];}static __isPackageBased(){return!ee.moduleBased;}};Ko.globalModulesMap={},Ko.gridModulesMap={},Ko.areGridScopedModules=!1;var q=Ko,ea=class{constructor(e,t){if(this.beanWrappers={}
1,this.destroyed=!1,!e||!e.beanClasses)return;this.contextParams=e,this.logger=t,this.logger.log(">> creating ag-Application Context"),this.createBeans();const i=this.getBeanInstances();this.wireBeans(i),this.logger.log(">> ag-Application Context ready - component is alive");}getBeanInstances(){return li(this.beanWrappers).map(e=>e.beanInstance);}createBean(e,t){if(!e)throw Error("Can't wire to bean since it is null");return this.wireBeans([e],t),e;}wireBeans(e,t){this.autoWireBeans(e),this.methodWireBeans(e),this.callLifeCycleMethods(e,"preConstructMethods"),y(t)&&e.forEach(t),this.callLifeCycleMethods(e,"postConstructMethods");}createBeans(){this.contextParams.beanClasses.forEach(this.createBeanWrapper.bind(this)),Se(this.beanWrappers,(t,i)=>{let s;i.bean.__agBeanMetaData&&i.bean.__agBeanMetaData.autowireMethods&&i.bean.__agBeanMetaData.autowireMethods.agConstructor&&(s=i.bean.__agBeanMetaData.autowireMethods.agConstructor);const o=this.getBeansForParameters(s,i.bean.name),r=new(i.bean.bind.apply(i.bean,[null,...o]))();i.beanInstance=r;});const e=Object.keys(this.beanWrappers).join(", ");this.logger.log(`created beans: ${e}`);}createBeanWrapper(e){const t=e.__agBeanMetaData;if(!t){let s;return s=e.prototype.constructor?Uo(e.prototype.constructor):""+e,void console.error(`Context item ${s} is not a bean`);}this.beanWrappers[t.beanName]={bean:e,beanInstance:null,beanName:t.beanName};}autoWireBeans(e){e.forEach(t=>{this.forEachMetaDataInHierarchy(t,(i,s)=>{const o=i.agClassAttributes;o&&o.forEach(r=>{const n=this.lookupBeanInstance(s,r.beanName,r.optional);t[r.attributeName]=n;});});});}methodWireBeans(e){e.forEach(t=>{this.forEachMetaDataInHierarchy(t,(i,s)=>{Se(i.autowireMethods,(o,r)=>{if("agConstructor"===o)return;const n=this.getBeansForParameters(r,s);t[o].apply(t,n);});});});}forEachMetaDataInHierarchy(e,t){let i=Object.getPrototypeOf(e);for(;null!=i;){const s=i.constructor;s.hasOwnProperty("__agBeanMetaData")&&t(s.__agBeanMetaData,this.getBeanName(s)),i=Object.getPrototypeOf(i);}}getBeanName(e){if(e.__agBeanMetaData&&e.__agBeanMetaData.beanName)return e.__agBeanMetaData.beanName;const t=e.toString();return t.substring(9,t.indexOf("("));}
1getBeansForParameters(e,t){const i=[];return e&&Se(e,(s,o)=>{const r=this.lookupBeanInstance(t,o);i[Number(s)]=r;}),i;}lookupBeanInstance(e,t,i=!1){if(this.destroyed)return this.logger.log(`AG Grid: bean reference ${t} is used after the grid is destroyed!`),null;if("context"===t)return this;if(this.contextParams.providedBeanInstances&&this.contextParams.providedBeanInstances.hasOwnProperty(t))return this.contextParams.providedBeanInstances[t];const s=this.beanWrappers[t];return s?s.beanInstance:(i||console.error(`AG Grid: unable to find bean reference ${t} while initialising ${e}`),null);}callLifeCycleMethods(e,t){e.forEach(i=>this.callLifeCycleMethodsOnBean(i,t));}callLifeCycleMethodsOnBean(e,t,i){const s={};this.forEachMetaDataInHierarchy(e,r=>{const n=r[t];n&&n.forEach(l=>{l!=i&&(s[l]=!0);});}),Object.keys(s).forEach(r=>e[r]());}getBean(e){return this.lookupBeanInstance("getBean",e,!0);}destroy(){if(this.destroyed)return;this.destroyed=!0,this.logger.log(">> Shutting down ag-Application Context");const e=this.getBeanInstances();this.destroyBeans(e),this.contextParams.providedBeanInstances=null,q.__unRegisterGridModules(this.contextParams.gridId),this.logger.log(">> ag-Application Context shut down - component is dead");}destroyBean(e){e&&this.destroyBeans([e]);}destroyBeans(e){return e?(e.forEach(t=>{this.callLifeCycleMethodsOnBean(t,"preDestroyMethods","destroy"),"function"==typeof t.destroy&&t.destroy();}),[]):[];}isDestroyed(){return this.destroyed;}getGridId(){return this.contextParams.gridId;}};function sn(e,t,i){const s=ai(e.constructor);s.preConstructMethods||(s.preConstructMethods=[]),s.preConstructMethods.push(t);}function T(e,t,i){const s=ai(e.constructor);s.postConstructMethods||(s.postConstructMethods=[]),s.postConstructMethods.push(t);}function Ee(e,t,i){const s=ai(e.constructor);s.preDestroyMethods||(s.preDestroyMethods=[]),s.preDestroyMethods.push(t);}function L(e){return t=>{ai(t).beanName=e;};}function g(e){return(t,i,s)=>{ta(t,e,!1,0,i,null);};}function Q(e){return(t,i,s)=>{ta(t,e,!0,0,i,null);};}function ta(e,t,i,s,o,r){if(null===t)return void console.error("AG Grid: Autowired name should not be null");if("number"==typeof r)return void console.error("AG Grid: Autowired should be on an attribute");const n=ai(e.constructor);n.agClassAttributes||(n.agClassAttributes=[]),n.agClassAttributes.push({attributeName:o,beanName:t,optional:i});}function Ue(e){return(t,i,s)=>{const o="function"==typeof t?t:t.constructor;let r;if("number"==typeof s){let n;i?(r=ai(o),n=i):(r=ai(o),n="agConstructor"),r.autowireMethods||(r.autowireMethods={}),r.autowireMethods[n]||(r.autowireMethods[n]={}),r.autowireMethods[n][s]=e;}};}function ai(e){return e.hasOwnProperty("__agBeanMetaData")||(e.__agBeanMetaData={}),e.__agBeanMetaData;}var Qe=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={};}setBeans(e,t,i=null,s=null){if(this.frameworkOverrides=t,this.gos=e,i){const o=e.useAsyncEvents();this.addGlobalListener(i,o);}s&&this.addGlobalListener(s,!1);}setFrameworkOverrides(e){this.frameworkOverrides=e;}getListeners(e,t,i){const s=t?this.allAsyncListeners:this.allSyncListeners;let o=s.get(e);return!o&&i&&(o=new Set(),s.set(e,o)),o;}noRegisteredListenersExist(){return 0===this.allSyncListeners.size&&0===this.allAsyncListeners.size&&0===this.globalSyncListeners.size&&0===this.globalAsyncListeners.size;}addEventListener(e,t,i=!1){this.getListeners(e,i,!0).add(t);}removeEventListener(e,t,i=!1){const s=this.getListeners(e,i,!1);s&&(s.delete(t),0===s.size&&(i?this.allAsyncListeners:this.allSyncListeners).delete(e));}addGlobalListener(e,t=!1){(t?this.globalAsyncListeners:this.globalSyncListeners).add(e);}removeGlobalListener(e,t=!1){(t?this.globalAsyncListeners:this.globalSyncListeners).delete(e);}dispatchEvent(e){let t=e;this.gos&&this.gos.addGridCommonParams(t),this.dispatchToListeners(t,!0),this.dispatchToListeners(t,!1),this.firedEvents[t.type]=!0;}dispatchEventOnce(e){this.firedEvents[e.type]||this.dispatchEvent(e);}dispatchToListeners(e,t){var i;const s=e.type;if(t&&"event"in e){const a=e.event;a instanceof Event&&(e.eventPath=a.composedPath());}const r=null!=(i=this.getListeners(s,t,!1))?i:new Set(),n=new Set(r);n.size>0&&((a,u)=>{a.forEach(h=>{if(!u.has(h))return;const p=this.frameworkOverrides?()=>this.frameworkOverrides.wrapIncoming(()=>h(e)):()=>h(e);
1t?this.dispatchAsync(p):p();});})(n,r),new Set(t?this.globalAsyncListeners:this.globalSyncListeners).forEach(a=>{const u=this.frameworkOverrides?()=>this.frameworkOverrides.wrapIncoming(()=>a(s,e)):()=>a(s,e);t?this.dispatchAsync(u):u();});}dispatchAsync(e){this.asyncFunctionsQueue.push(e),this.scheduled||(this.frameworkOverrides.wrapIncoming(()=>{window.setTimeout(this.flushAsyncQueue.bind(this),0);}),this.scheduled=!0);}flushAsyncQueue(){this.scheduled=!1;const e=this.asyncFunctionsQueue.slice();this.asyncFunctionsQueue=[],e.forEach(t=>t());}};d([be(0,Ue("gridOptionsService")),be(1,Ue("frameworkOverrides")),be(2,Ue("globalEventListener")),be(3,Ue("globalSyncEventListener"))],Qe.prototype,"setBeans",1),Qe=d([L("eventService")],Qe);var on=class{constructor(e){this.frameworkOverrides=e,this.wrappedListeners=new Map(),this.wrappedGlobalListeners=new Map();}wrap(e){let t=e;return this.frameworkOverrides.shouldWrapOutgoing&&(t=i=>{this.frameworkOverrides.wrapOutgoing(()=>e(i));},this.wrappedListeners.set(e,t)),t;}wrapGlobal(e){let t=e;return this.frameworkOverrides.shouldWrapOutgoing&&(t=(i,s)=>{this.frameworkOverrides.wrapOutgoing(()=>e(i,s));},this.wrappedGlobalListeners.set(e,t)),t;}unwrap(e){var t;return null!=(t=this.wrappedListeners.get(e))?t:e;}unwrapGlobal(e){var t;return null!=(t=this.wrappedGlobalListeners.get(e))?t:e;}},Gh={resizable:!0,sortable:!0},Nh=0;function ia(){return Nh++;}var ue=class Qu{constructor(t,i,s,o){this.instanceId=ia(),this.autoHeaderHeight=null,this.moving=!1,this.menuVisible=!1,this.lastLeftPinned=!1,this.firstRightPinned=!1,this.filterActive=!1,this.eventService=new Qe(),this.tooltipEnabled=!1,this.rowGroupActive=!1,this.pivotActive=!1,this.aggregationActive=!1,this.colDef=t,this.userProvidedColDef=i,this.colId=s,this.primary=o,this.setState(t);}getInstanceId(){return this.instanceId;}setState(t){void 0!==t.sort?("asc"===t.sort||"desc"===t.sort)&&(this.sort=t.sort):("asc"===t.initialSort||"desc"===t.initialSort)&&(this.sort=t.initialSort);const i=t.sortIndex,s=t.initialSortIndex;void 0!==i?null!==i&&(this.sortIndex=i):null!==s&&(this.sortIndex=s);const o=t.hide;this.visible=void 0!==o?!o:!t.initialHide,this.setPinned(void 0!==t.pinned?t.pinned:t.initialPinned);const n=t.flex,l=t.initialFlex;void 0!==n?this.flex=n:void 0!==l&&(this.flex=l);}setColDef(t,i,s){this.colDef=t,this.userProvidedColDef=i,this.initMinAndMaxWidths(),this.initDotNotation(),this.initTooltip(),this.eventService.dispatchEvent(this.createColumnEvent("colDefChanged",s));}getUserProvidedColDef(){return this.userProvidedColDef;}setParent(t){this.parent=t;}getParent(){return this.parent;}setOriginalParent(t){this.originalParent=t;}getOriginalParent(){return this.originalParent;}initialise(){this.initMinAndMaxWidths(),this.resetActualWidth("gridInitializing"),this.initDotNotation(),this.initTooltip();}initDotNotation(){const t=this.gos.get("suppressFieldDotNotation");this.fieldContainsDots=y(this.colDef.field)&&this.colDef.field.indexOf(".")>=0&&!t,this.tooltipFieldContainsDots=y(this.colDef.tooltipField)&&this.colDef.tooltipField.indexOf(".")>=0&&!t;}initMinAndMaxWidths(){var t,i;const s=this.colDef;this.minWidth=null!=(t=s.minWidth)?t:this.environment.getMinColWidth(),this.maxWidth=null!=(i=s.maxWidth)?i:Number.MAX_SAFE_INTEGER;}initTooltip(){this.tooltipEnabled=y(this.colDef.tooltipField)||y(this.colDef.tooltipValueGetter)||y(this.colDef.tooltipComponent);}resetActualWidth(t){const i=this.calculateColInitialWidth(this.colDef);this.setActualWidth(i,t,!0);}calculateColInitialWidth(t){var i,s;const o=null!=(i=t.minWidth)?i:this.environment.getMinColWidth(),r=null!=(s=t.maxWidth)?s:Number.MAX_SAFE_INTEGER;let n;const l=Ht(t.width),a=Ht(t.initialWidth);return n=null!=l?l:null!=a?a:200,Math.max(Math.min(n,r),o);}isEmptyGroup(){return!1;}isRowGroupDisplayed(t){return!_(this.colDef)&&!_(this.colDef.showRowGroup)&&(!0===this.colDef.showRowGroup||this.colDef.showRowGroup===t);}isPrimary(){return this.primary;}isFilterAllowed(){return!!this.colDef.filter;}isFieldContainsDots(){return this.fieldContainsDots;}isTooltipEnabled(){return this.tooltipEnabled;}isTooltipFieldContainsDots(){return this.tooltipFieldContainsDots;}addEventListener(t,i){var s,o;this.frameworkOverrides.shouldWrapOutgoing&&!this.frameworkEventListenerService&&(this.eventService.setFrameworkOverrides(this.frameworkOverrides),this.frameworkEventListenerService=new on(this.frameworkOverrides));const r=null!=(o=null==(s=this.frameworkEventListenerService)?void 0:s.wrap(i))?o:i;this.eventService.addEventListener(t,r);}removeEventListener(t,i){var s,o;const r=null!=(o=null==(s=this.frameworkEventListenerService)?void 0:s.unwrap(i))?o:i;this.eventService.removeEventListener(t,r);}createColumnFunctionCallbackParams(t){return this.gos.addGridCommonParams({node:t,data:t.data,column:this,colDef:this.colDef});}isSuppressNavigable(t){if("boolean"==typeof this.colDef.suppressNavigable)return this.colDef.suppressNavigable;if("function"==typeof this.colDef.suppressNavigable){const i=this.createColumnFunctionCallbackParams(t);return(0,this.colDef.suppressNavigable)(i);}return!1;}isCellEditable(t){return!(t.group&&!this.gos.get("enableGroupEdit"))&&this.isColumnFunc(t,this.colDef.editable);}isSuppressFillHandle(){return!!this.colDef.suppressFillHandle;}isAutoHeight(){return!!this.colDef.autoHeight;}isAutoHeaderHeight(){return!!this.colDef.autoHeaderHeight;}isRowDrag(t){return this.isColumnFunc(t,this.colDef.rowDrag);}isDndSource(t){return this.isColumnFunc(t,this.colDef.dndSource);}isCellCheckboxSelection(t){return this.isColumnFunc(t,this.colDef.checkboxSelection);}isSuppressPaste(t){return this.isColumnFunc(t,this.colDef?this.colDef.suppressPaste:null);}isResizable(){return!!this.getColDefValue("resizable");}getColDefValue(t){var i;return null!=(i=this.colDef[t])?i:Gh[t];}isColumnFunc(t,i){return"boolean"==typeof i?i:"function"==typeof i&&i(this.createColumnFunctionCallbackParams(t));}setMoving(t,i){this.moving=t,this.eventService.dispatchEvent(this.createColumnEvent("movingChanged",i));}createColumnEvent(t,i){return this.gos.addGridCommonParams({type:t,column:this,columns:[this],source:i});}isMoving(){return this.moving;}getSort(){return this.sort;}setSort(t,i){this.sort!==t&&(this.sort=t,this.eventService.dispatchEvent(this.createColumnEvent("sortChanged",i))),this.dispatchStateUpdatedEvent("sort");}setMenuVisible(t,i){this.menuVisible!==t&&(this.menuVisible=t,this.eventService.dispatchEvent(this.createColumnEvent("menuVisibleChanged",i)));}isMenuVisible(){return this.menuVisible;}isSortable(){return!!this.getColDefValue("sortable");}isSortAscending(){return"asc"===this.sort;}isSortDescending(){return"desc"===this.sort;}isSortNone(){return _(this.sort);}isSorting(){return y(this.sort);}getSortIndex(){return this.sortIndex;}setSortIndex(t){this.sortIndex=t,this.dispatchStateUpdatedEvent("sortIndex");}setAggFunc(t){this.aggFunc=t,this.dispatchStateUpdatedEvent("aggFunc");}getAggFunc(){return this.aggFunc;}getLeft(){return this.left;}getOldLeft(){return this.oldLeft;}getRight(){return this.left+this.actualWidth;}setLeft(t,i){this.oldLeft=this.left,this.left!==t&&(this.left=t,this.eventService.dispatchEvent(this.createColumnEvent("leftChanged",i)));}isFilterActive(){return this.filterActive;}setFilterActive(t,i,s){this.filterActive!==t&&(this.filterActive=t,this.eventService.dispatchEvent(this.createColumnEvent("filterActiveChanged",i)));const o=this.createColumnEvent("filterChanged",i);s&&Ie(o,s),this.eventService.dispatchEvent(o);}isHovered(){return this.columnHoverService.isHovered(this);}setPinned(t){this.pinned=!0===t||"left"===t?"left":"right"===t?"right":null,this.dispatchStateUpdatedEvent("pinned");}setFirstRightPinned(t,i){this.firstRightPinned!==t&&(this.firstRightPinned=t,this.eventService.dispatchEvent(this.createColumnEvent("firstRightPinnedChanged",i)));}setLastLeftPinned(t,i){this.lastLeftPinned!==t&&(this.lastLeftPinned=t,this.eventService.dispatchEvent(this.createColumnEvent("lastLeftPinnedChanged",i)));}isFirstRightPinned(){return this.firstRightPinned;}isLastLeftPinned(){return this.lastLeftPinned;}isPinned(){return"left"===this.pinned||"right"===this.pinned;}isPinnedLeft(){return"left"===this.pinned;}isPinnedRight(){return"right"===this.pinned;}getPinned(){return this.pinned;}setVisible(t,i){const s=!0===t;this.visible!==s&&(this.visible=s,this.eventService.dispatchEvent(this.createColumnEvent("visibleChanged",i))),this.dispatchStateUpdatedEvent("hide");}isVisible(){return this.visible;}isSpanHeaderHeight(){const t=this.getColDef();
1return!t.suppressSpanHeaderHeight&&!t.autoHeaderHeight;}getColumnGroupPaddingInfo(){let t=this.getParent();if(!t||!t.isPadding())return{numberOfParents:0,isSpanningTotal:!1};const i=t.getPaddingLevel()+1;let s=!0;for(;t;){if(!t.isPadding()){s=!1;break;}t=t.getParent();}return{numberOfParents:i,isSpanningTotal:s};}getColDef(){return this.colDef;}getColumnGroupShow(){return this.colDef.columnGroupShow;}getColId(){return this.colId;}getId(){return this.colId;}getUniqueId(){return this.colId;}getDefinition(){return this.colDef;}getActualWidth(){return this.actualWidth;}getAutoHeaderHeight(){return this.autoHeaderHeight;}setAutoHeaderHeight(t){const i=t!==this.autoHeaderHeight;return this.autoHeaderHeight=t,i;}createBaseColDefParams(t){return this.gos.addGridCommonParams({node:t,data:t.data,colDef:this.colDef,column:this});}getColSpan(t){if(_(this.colDef.colSpan))return 1;const i=this.createBaseColDefParams(t),s=this.colDef.colSpan(i);return Math.max(s,1);}getRowSpan(t){if(_(this.colDef.rowSpan))return 1;const i=this.createBaseColDefParams(t),s=this.colDef.rowSpan(i);return Math.max(s,1);}setActualWidth(t,i,s=!1){null!=this.minWidth&&(t=Math.max(t,this.minWidth)),null!=this.maxWidth&&(t=Math.min(t,this.maxWidth)),this.actualWidth!==t&&(this.actualWidth=t,this.flex&&"flex"!==i&&"gridInitializing"!==i&&(this.flex=null),s||this.fireColumnWidthChangedEvent(i)),this.dispatchStateUpdatedEvent("width");}fireColumnWidthChangedEvent(t){this.eventService.dispatchEvent(this.createColumnEvent("widthChanged",t));}isGreaterThanMax(t){return null!=this.maxWidth&&t>this.maxWidth;}getMinWidth(){return this.minWidth;}getMaxWidth(){return this.maxWidth;}getFlex(){return this.flex||0;}setFlex(t){this.flex!==t&&(this.flex=t),this.dispatchStateUpdatedEvent("flex");}setMinimum(t){y(this.minWidth)&&this.setActualWidth(this.minWidth,t);}setRowGroupActive(t,i){this.rowGroupActive!==t&&(this.rowGroupActive=t,this.eventService.dispatchEvent(this.createColumnEvent("columnRowGroupChanged",i))),this.dispatchStateUpdatedEvent("rowGroup");}isRowGroupActive(){return this.rowGroupActive;}setPivotActive(t,i){this.pivotActive!==t&&(this.pivotActive=t,this.eventService.dispatchEvent(this.createColumnEvent("columnPivotChanged",i))),this.dispatchStateUpdatedEvent("pivot");}isPivotActive(){return this.pivotActive;}isAnyFunctionActive(){return this.isPivotActive()||this.isRowGroupActive()||this.isValueActive();}isAnyFunctionAllowed(){return this.isAllowPivot()||this.isAllowRowGroup()||this.isAllowValue();}setValueActive(t,i){this.aggregationActive!==t&&(this.aggregationActive=t,this.eventService.dispatchEvent(this.createColumnEvent("columnValueChanged",i)));}isValueActive(){return this.aggregationActive;}isAllowPivot(){return!0===this.colDef.enablePivot;}isAllowValue(){return!0===this.colDef.enableValue;}isAllowRowGroup(){return!0===this.colDef.enableRowGroup;}getMenuTabs(t){O("As of v31.1, 'getMenuTabs' is deprecated. Use 'getColDef().menuTabs ?? defaultValues' instead.");let i=this.getColDef().menuTabs;return null==i&&(i=t),i;}dispatchStateUpdatedEvent(t){this.eventService.dispatchEvent({type:Qu.EVENT_STATE_UPDATED,key:t});}};ue.EVENT_MOVING_CHANGED="movingChanged",ue.EVENT_LEFT_CHANGED="leftChanged",ue.EVENT_WIDTH_CHANGED="widthChanged",ue.EVENT_LAST_LEFT_PINNED_CHANGED="lastLeftPinnedChanged",ue.EVENT_FIRST_RIGHT_PINNED_CHANGED="firstRightPinnedChanged",ue.EVENT_VISIBLE_CHANGED="visibleChanged",ue.EVENT_FILTER_CHANGED="filterChanged",ue.EVENT_FILTER_ACTIVE_CHANGED="filterActiveChanged",ue.EVENT_SORT_CHANGED="sortChanged",ue.EVENT_COL_DEF_CHANGED="colDefChanged",ue.EVENT_MENU_VISIBLE_CHANGED="menuVisibleChanged",ue.EVENT_ROW_GROUP_CHANGED="columnRowGroupChanged",ue.EVENT_PIVOT_CHANGED="columnPivotChanged",ue.EVENT_VALUE_CHANGED="columnValueChanged",ue.EVENT_STATE_UPDATED="columnStateUpdated",d([g("gridOptionsService")],ue.prototype,"gos",2),d([g("environment")],ue.prototype,"environment",2),d([g("columnHoverService")],ue.prototype,"columnHoverService",2),d([g("frameworkOverrides")],ue.prototype,"frameworkOverrides",2),d([T],ue.prototype,"initialise",1);var Z=ue,$o=class Mo{constructor(t,i,s,o){this.localEventService=new Qe(),this.expandable=!1,this.instanceId=ia(),this.expandableListenerRemoveCallback=null,this.colGroupDef=t,this.groupId=i,this.expanded=!!t&&!!t.openByDefault,this.padding=s,this.level=o;}destroy(){this.expandableListenerRemoveCallback&&this.reset(null,void 0);}reset(t,i){this.colGroupDef=t,this.level=i,this.originalParent=null,this.expandableListenerRemoveCallback&&this.expandableListenerRemoveCallback(),this.children=void 0,this.expandable=void 0;}getInstanceId(){return this.instanceId;}setOriginalParent(t){this.originalParent=t;}getOriginalParent(){return this.originalParent;}getLevel(){return this.level;}isVisible(){return!!this.children&&this.children.some(t=>t.isVisible());}isPadding(){return this.padding;}setExpanded(t){this.expanded=void 0!==t&&t,this.localEventService.dispatchEvent({type:Mo.EVENT_EXPANDED_CHANGED});}isExpandable(){return this.expandable;}isExpanded(){return this.expanded;}getGroupId(){return this.groupId;}getId(){return this.getGroupId();}setChildren(t){this.children=t;}getChildren(){return this.children;}getColGroupDef(){return this.colGroupDef;}getLeafColumns(){const t=[];return this.addLeafColumns(t),t;}
1addLeafColumns(t){this.children&&this.children.forEach(i=>{i instanceof Z?t.push(i):i instanceof Mo&&i.addLeafColumns(t);});}getColumnGroupShow(){const t=this.colGroupDef;if(t)return t.columnGroupShow;}setupExpandable(){this.setExpandable(),this.expandableListenerRemoveCallback&&this.expandableListenerRemoveCallback();const t=this.onColumnVisibilityChanged.bind(this);this.getLeafColumns().forEach(i=>i.addEventListener("visibleChanged",t)),this.expandableListenerRemoveCallback=()=>{this.getLeafColumns().forEach(i=>i.removeEventListener("visibleChanged",t)),this.expandableListenerRemoveCallback=null;};}setExpandable(){if(this.isPadding())return;let t=!1,i=!1,s=!1;const o=this.findChildrenRemovingPadding();for(let n=0,l=o.length;n<l;n++){const a=o[n];if(!a.isVisible())continue;const u=a.getColumnGroupShow();"open"===u?(t=!0,s=!0):"closed"===u?(i=!0,s=!0):(t=!0,i=!0);}const r=t&&i&&s;this.expandable!==r&&(this.expandable=r,this.localEventService.dispatchEvent({type:Mo.EVENT_EXPANDABLE_CHANGED}));}findChildrenRemovingPadding(){const t=[],i=s=>{s.forEach(o=>{o instanceof Mo&&o.isPadding()?i(o.children):t.push(o);});};return i(this.children),t;}onColumnVisibilityChanged(){this.setExpandable();}addEventListener(t,i){this.localEventService.addEventListener(t,i);}removeEventListener(t,i){this.localEventService.removeEventListener(t,i);}};$o.EVENT_EXPANDED_CHANGED="expandedChanged",$o.EVENT_EXPANDABLE_CHANGED="expandableChanged",d([Ee],$o.prototype,"destroy",1);var ae=$o,xh={numericColumn:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"},rightAligned:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"}},sa={};z(sa,{addSafePassiveEventListener:()=>pa,createEventPath:()=>ha,getCtrlForEventTarget:()=>Yo,getEventPath:()=>ca,isElementInEventPath:()=>jo,isEventSupported:()=>un,isStopPropagationForAgGrid:()=>lt,stopPropagationForAgGrid:()=>nt});var oa={};function ra(e){return null!=e&&e.length>0;}function Y(e){if(e&&e.length)return e[e.length-1];}function pt(e,t,i){return null==e&&null==t||null!=e&&null!=t&&e.length===t.length&&e.every((s,o)=>i?i(s,t[o]):t[o]===s);}function Oh(e,t){return pt(e,t);}function na(e){return e.sort((t,i)=>t-i);}function _h(e,t){if(e)for(let i=e.length-2;i>=0;i--)e[i]===t&&e[i+1]===t&&e.splice(i+1,1);}function rn(e,t){const i=e.indexOf(t);i>=0&&(e[i]=e[e.length-1],e.pop());}function Ge(e,t){const i=e.indexOf(t);i>=0&&e.splice(i,1);}function la(e,t){for(let i=0;i<t.length;i++)rn(e,t[i]);}function aa(e,t){for(let i=0;i<t.length;i++)Ge(e,t[i]);}function Gs(e,t,i){e.splice(i,0,t);}function nn(e,t,i){if(null!=e&&null!=t)for(let s=t.length-1;s>=0;s--)Gs(e,t[s],i);}function ln(e,t,i){aa(e,t),t.slice().reverse().forEach(s=>Gs(e,s,i));}function ze(e,t){return e.indexOf(t)>-1;}function da(e){return[].concat.apply([],e);}function an(e,t){null==t||null==e||t.forEach(i=>e.push(i));}function Vh(e){return e.map(Is);}function Hh(e,t){if(null!=e)for(let i=e.length-1;i>=0;i--)t(e[i],i);}z(oa,{areEqual:()=>pt,existsAndNotEmpty:()=>ra,flatten:()=>da,forEachReverse:()=>Hh,includes:()=>ze,insertArrayIntoArray:()=>nn,insertIntoArray:()=>Gs,last:()=>Y,moveInArray:()=>ln,pushAll:()=>an,removeAllFromArray:()=>aa,removeAllFromUnorderedArray:()=>la,removeFromArray:()=>Ge,removeFromUnorderedArray:()=>rn,removeRepeatsFromArray:()=>_h,shallowCompare:()=>Oh,sortNumerically:()=>na,toStrings:()=>Vh});var ua="__ag_Grid_Stop_Propagation",kh=["touchstart","touchend","touchmove","touchcancel","scroll"],dn={};function nt(e){e[ua]=!0;}function lt(e){return!0===e[ua];}var un=(()=>{const e={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return i=>{if("boolean"==typeof dn[i])return dn[i];const s=document.createElement(e[i]||"div");return dn[i="on"+i]=i in s;};})();function Yo(e,t,i){let s=t;for(;s;){const o=e.getDomData(s,i);if(o)return o;s=s.parentElement;}return null;}function jo(e,t){return!(!t||!e)&&ca(t).indexOf(e)>=0;}function ha(e){const t=[];let i=e.target;for(;i;)t.push(i),i=i.parentElement;return t;}function ca(e){const t=e;return t.path?t.path:t.composedPath?t.composedPath():ha(t);}function pa(e,t,i,s){const r=ze(kh,i)?{passive:!0}:void 0;e&&e.addEventListener&&e.addEventListener(t,i,s,r);}var Tt=class Xu{constructor(){this.destroyFunctions=[],this.destroyed=!1,this.__v_skip=!0,this.lastChangeSetIdLookup={},this.propertyListenerId=0,this.isAlive=()=>!this.destroyed;}getFrameworkOverrides(){return this.frameworkOverrides;}getContext(){return this.context;}destroy(){for(let t=0;t<this.destroyFunctions.length;t++)this.destroyFunctions[t]();this.destroyFunctions.length=0,this.destroyed=!0,this.dispatchEvent({type:Xu.EVENT_DESTROYED});}addEventListener(t,i){this.localEventService||(this.localEventService=new Qe()),this.localEventService.addEventListener(t,i);}removeEventListener(t,i){this.localEventService&&this.localEventService.removeEventListener(t,i);}dispatchEvent(t){this.localEventService&&this.localEventService.dispatchEvent(t);}addManagedListener(t,i,s){if(this.destroyed)return;t instanceof HTMLElement?pa(this.getFrameworkOverrides(),t,i,s):t.addEventListener(i,s);const o=()=>(t.removeEventListener(i,s),null);return this.destroyFunctions.push(o),()=>(o(),this.destroyFunctions=this.destroyFunctions.filter(r=>r!==o),null);}setupGridOptionListener(t,i){this.gos.addEventListener(t,i);const s=()=>(this.gos.removeEventListener(t,i),null);return this.destroyFunctions.push(s),()=>(s(),this.destroyFunctions=this.destroyFunctions.filter(o=>o!==s),null);}addManagedPropertyListener(t,i){return this.destroyed?()=>
1null:this.setupGridOptionListener(t,i);}addManagedPropertyListeners(t,i){if(this.destroyed)return;const s=t.join("-")+this.propertyListenerId++,o=r=>{if(r.changeSet){if(r.changeSet&&r.changeSet.id===this.lastChangeSetIdLookup[s])return;this.lastChangeSetIdLookup[s]=r.changeSet.id;}i({type:"gridPropertyChanged",changeSet:r.changeSet,source:r.source});};t.forEach(r=>this.setupGridOptionListener(r,o));}addDestroyFunc(t){this.isAlive()?this.destroyFunctions.push(t):t();}createManagedBean(t,i){const s=this.createBean(t,i);return this.addDestroyFunc(this.destroyBean.bind(this,t,i)),s;}createBean(t,i,s){return(i||this.getContext()).createBean(t,s);}destroyBean(t,i){return(i||this.getContext()).destroyBean(t);}destroyBeans(t,i){if(t)for(let s=0;s<t.length;s++)this.destroyBean(t[s],i);return[];}};Tt.EVENT_DESTROYED="destroyed",d([g("frameworkOverrides")],Tt.prototype,"frameworkOverrides",2),d([g("context")],Tt.prototype,"context",2),d([g("eventService")],Tt.prototype,"eventService",2),d([g("gridOptionsService")],Tt.prototype,"gos",2),d([g("localeService")],Tt.prototype,"localeService",2),d([g("environment")],Tt.prototype,"environment",2),d([Ee],Tt.prototype,"destroy",1);var R=Tt,Ki=class extends R{setBeans(e){this.logger=e.create("ColumnFactory");}createColumnTree(e,t,i,s){const o=new Yl(),{existingCols:r,existingGroups:n,existingColKeys:l}=this.extractExistingTreeData(i);o.addExistingKeys(l);const a=this.recursivelyCreateColumns(e,0,t,r,o,n,s),u=this.findMaxDept(a,0);this.logger.log("Number of levels for grouped columns is "+u);const h=this.balanceColumnTree(a,0,u,o);return At(null,h,(f,m)=>{f instanceof ae&&f.setupExpandable(),f.setOriginalParent(m);}),{columnTree:h,treeDept:u};}extractExistingTreeData(e){const t=[],i=[],s=[];return e&&At(null,e,o=>{if(o instanceof ae)i.push(o);else{const r=o;s.push(r.getId()),t.push(r);}}),{existingCols:t,existingGroups:i,existingColKeys:s};}createForAutoGroups(e,t){return e.map(i=>this.createAutoGroupTreeItem(t,i));}createAutoGroupTreeItem(e,t){const i=this.findDepth(e);let s=t;for(let o=i-1;o>=0;o--){const r=new ae(null,`FAKE_PATH_${t.getId()}}_${o}`,!0,o);this.createBean(r),r.setChildren([s]),s.setOriginalParent(r),s=r;}return 0===i&&t.setOriginalParent(null),s;}findDepth(e){let t=0,i=e;for(;i&&i[0]&&i[0]instanceof ae;)t++,i=i[0].getChildren();return t;}balanceColumnTree(e,t,i,s){const o=[];for(let r=0;r<e.length;r++){const n=e[r];if(n instanceof ae){const l=n,a=this.balanceColumnTree(l.getChildren(),t+1,i,s);l.setChildren(a),o.push(l);}else{let l,a;for(let u=i-1;u>=t;u--){const h=s.getUniqueKey(null,null),p=this.createMergedColGroupDef(null),f=new ae(p,h,!0,t);this.createBean(f),a&&a.setChildren([f]),a=f,l||(l=a);}if(l&&a){if(o.push(l),e.some(h=>h instanceof ae)){a.setChildren([n]);continue;}a.setChildren(e);break;}o.push(n);}}return o;}findMaxDept(e,t){let i=t;for(let s=0;s<e.length;s++){const o=e[s];if(o instanceof ae){const n=this.findMaxDept(o.getChildren(),t+1);i<n&&(i=n);}}return i;}recursivelyCreateColumns(e,t,i,s,o,r,n){if(!e)return[];const l=new Array(e.length);for(let a=0;a<l.length;a++){const u=e[a];l[a]=this.isColumnGroup(u)?this.createColumnGroup(i,u,t,s,o,r,n):this.createColumn(i,u,s,o,n);}return l;}createColumnGroup(e,t,i,s,o,r,n){const l=this.createMergedColGroupDef(t),a=o.getUniqueKey(l.groupId||null,null),u=new ae(l,a,!1,i);this.createBean(u);const h=this.findExistingGroup(t,r);h&&r.splice(h.idx,1);let p=h?.group;p&&u.setExpanded(p.isExpanded());const f=this.recursivelyCreateColumns(l.children,i+1,e,s,o,r,n);return u.setChildren(f),u;}createMergedColGroupDef(e){const t={};return Object.assign(t,this.gos.get("defaultColGroupDef")),Object.assign(t,e),t;}createColumn(e,t,i,s,o){const r=this.findExistingColumn(t,i);r&&i?.splice(r.idx,1);let n=r?.column;if(n){const l=this.addColumnDefaultAndTypes(t,n.getColId());n.setColDef(l,t,o),this.applyColumnState(n,l,o);}else{const l=s.getUniqueKey(t.colId,t.field),a=this.addColumnDefaultAndTypes(t,l);n=new Z(a,t,l,e),this.context.createBean(n);}return this.dataTypeService.addColumnListeners(n),n;}applyColumnState(e,t,i){const s=Ht(t.flex);if(void 0!==s&&e.setFlex(s),e.getFlex()<=0){const l=Ht(t.width);if(null!=l)e.setActualWidth(l,i);else{const a=e.getActualWidth();e.setActualWidth(a,i);}}void 0!==t.sort&&e.setSort("asc"==t.sort||"desc"==t.sort?t.sort:void 0,i);const r=Ht(t.sortIndex);void 0!==r&&e.setSortIndex(r);const n=Ho(t.hide);void 0!==n&&e.setVisible(!n,i),void 0!==t.pinned&&e.setPinned(t.pinned);}findExistingColumn(e,t){if(t)for(let i=0;i<t.length;i++){const s=t[i].getUserProvidedColDef();if(s)if(null==e.colId){if(null==e.field){if(s===e)return{idx:i,column:t[i]};}else if(s.field===e.field)return{idx:i,column:t[i]};}else if(t[i].getId()===e.colId)return{idx:i,column:t[i]};}}findExistingGroup(e,t){if(null!=e.groupId)for(let s=0;s<t.length;s++){const o=t[s];if(o.getColGroupDef()&&o.getId()===e.groupId)return{idx:s,group:o};}}addColumnDefaultAndTypes(e,t){const i={};Ie(i,this.gos.get("defaultColDef"),!1,!0);const o=this.dataTypeService.updateColDefAndGetColumnType(i,e,t);o&&this.assignColumnTypes(o,i),Ie(i,e,!1,!0);const r=this.gos.get("autoGroupColumnDef"),n=this.gos.isColumnsSortingCoupledToGroup();return e.rowGroup&&r&&n&&Ie(i,{sort:r.sort,initialSort:r.initialSort},!1,!0),this.dataTypeService.validateColDef(i),i;}assignColumnTypes(e,t){if(!e.length)return;const i=Object.assign({},xh);Se(this.gos.get("columnTypes")||{},(o,r)=>{o in i?console.warn(`AG Grid: the column type '${o}' is a default column type and cannot be overridden.`):(r.type&&O("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."),i[o]=r);}),e.forEach(o=>{const r=i[o.trim()];r?Ie(t,r,!1,!0):console.warn("AG Grid: colDef.type '"+o+"' does not correspond to defined gridOptions.columnTypes");});}isColumnGroup(e){return void 0!==e.children;}};function At(e,t,i){if(t)for(let s=0;s<t.length;s++){const o=t[s];o instanceof ae&&At(o,o.getChildren(),i),i(o,e);}}d([g("dataTypeService")],Ki.prototype,"dataTypeService",2),d([be(0,Ue("loggerFactory"))],Ki.prototype,"setBeans",1),Ki=d([L("columnFactory")],Ki);var qo=class yt{constructor(t,i,s,o){this.displayedChildren=[],this.localEventService=new Qe(),this.groupId=i,this.partId=s,this.providedColumnGroup=t,this.pinned=o;}static createUniqueId(t,i){return t+"_"+i;}reset(){this.parent=null,this.children=null,this.displayedChildren=null;}getParent(){return this.parent;}setParent(t){this.parent=t;}getUniqueId(){return yt.createUniqueId(this.groupId,this.partId);}isEmptyGroup(){return 0===this.displayedChildren.length;}isMoving(){const t=this.getProvidedColumnGroup().getLeafColumns();return!(!t||0===t.length)&&t.every(i=>i.isMoving());}
1checkLeft(){if(this.displayedChildren.forEach(t=>{t instanceof yt&&t.checkLeft();}),this.displayedChildren.length>0){if(this.gos.get("enableRtl")){const i=Y(this.displayedChildren).getLeft();this.setLeft(i);}else{const t=this.displayedChildren[0].getLeft();this.setLeft(t);}}else this.setLeft(null);}getLeft(){return this.left;}getOldLeft(){return this.oldLeft;}setLeft(t){this.oldLeft=this.left,this.left!==t&&(this.left=t,this.localEventService.dispatchEvent(this.createAgEvent(yt.EVENT_LEFT_CHANGED)));}getPinned(){return this.pinned;}createAgEvent(t){return{type:t};}addEventListener(t,i){this.localEventService.addEventListener(t,i);}removeEventListener(t,i){this.localEventService.removeEventListener(t,i);}getGroupId(){return this.groupId;}getPartId(){return this.partId;}isChildInThisGroupDeepSearch(t){let i=!1;return this.children.forEach(s=>{t===s&&(i=!0),s instanceof yt&&s.isChildInThisGroupDeepSearch(t)&&(i=!0);}),i;}getActualWidth(){let t=0;return this.displayedChildren&&this.displayedChildren.forEach(i=>{t+=i.getActualWidth();}),t;}isResizable(){if(!this.displayedChildren)return!1;let t=!1;return this.displayedChildren.forEach(i=>{i.isResizable()&&(t=!0);}),t;}getMinWidth(){let t=0;return this.displayedChildren.forEach(i=>{t+=i.getMinWidth()||0;}),t;}addChild(t){this.children||(this.children=[]),this.children.push(t);}getDisplayedChildren(){return this.displayedChildren;}getLeafColumns(){const t=[];return this.addLeafColumns(t),t;}getDisplayedLeafColumns(){const t=[];return this.addDisplayedLeafColumns(t),t;}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(t){this.providedColumnGroup.setExpanded(t);}addDisplayedLeafColumns(t){this.displayedChildren.forEach(i=>{i instanceof Z?t.push(i):i instanceof yt&&i.addDisplayedLeafColumns(t);});}addLeafColumns(t){this.children.forEach(i=>{i instanceof Z?t.push(i):i instanceof yt&&i.addLeafColumns(t);});}getChildren(){return this.children;}getColumnGroupShow(){return this.providedColumnGroup.getColumnGroupShow();}getProvidedColumnGroup(){return this.providedColumnGroup;}getPaddingLevel(){const t=this.getParent();return this.isPadding()&&t&&t.isPadding()?1+t.getPaddingLevel():0;}calculateDisplayedColumns(){this.displayedChildren=[];let t=this;for(;null!=t&&t.isPadding();)t=t.getParent();if(!t||!t.providedColumnGroup.isExpandable())return this.displayedChildren=this.children,void this.localEventService.dispatchEvent(this.createAgEvent(yt.EVENT_DISPLAYED_CHILDREN_CHANGED));this.children.forEach(s=>{if(!(s instanceof yt)||s.displayedChildren&&s.displayedChildren.length)switch(s.getColumnGroupShow()){case"open":t.providedColumnGroup.isExpanded()&&this.displayedChildren.push(s);break;case"closed":t.providedColumnGroup.isExpanded()||this.displayedChildren.push(s);break;default:this.displayedChildren.push(s);}}),this.localEventService.dispatchEvent(this.createAgEvent(yt.EVENT_DISPLAYED_CHILDREN_CHANGED));}};qo.EVENT_LEFT_CHANGED="leftChanged",qo.EVENT_DISPLAYED_CHILDREN_CHANGED="displayedChildrenChanged",d([g("gridOptionsService")],qo.prototype,"gos",2);var pe=qo,c=class{};c.EVENT_COLUMN_EVERYTHING_CHANGED="columnEverythingChanged",c.EVENT_NEW_COLUMNS_LOADED="newColumnsLoaded",c.EVENT_COLUMN_PIVOT_MODE_CHANGED="columnPivotModeChanged",c.EVENT_PIVOT_MAX_COLUMNS_EXCEEDED="pivotMaxColumnsExceeded",c.EVENT_COLUMN_ROW_GROUP_CHANGED="columnRowGroupChanged",c.EVENT_EXPAND_COLLAPSE_ALL="expandOrCollapseAll",c.EVENT_COLUMN_PIVOT_CHANGED="columnPivotChanged",c.EVENT_GRID_COLUMNS_CHANGED="gridColumnsChanged",c.EVENT_COLUMN_VALUE_CHANGED="columnValueChanged",c.EVENT_COLUMN_MOVED="columnMoved",c.EVENT_COLUMN_VISIBLE="columnVisible",c.EVENT_COLUMN_PINNED="columnPinned",c.EVENT_COLUMN_GROUP_OPENED="columnGroupOpened",c.EVENT_COLUMN_RESIZED="columnResized",c.EVENT_DISPLAYED_COLUMNS_CHANGED="displayedColumnsChanged",c.EVENT_SUPPRESS_COLUMN_MOVE_CHANGED="suppressMovableColumns",c.EVENT_SUPPRESS_MENU_HIDE_CHANGED="suppressMenuHide",c.EVENT_SUPPRESS_FIELD_DOT_NOTATION="suppressFieldDotNotation",c.EVENT_VIRTUAL_COLUMNS_CHANGED="virtualColumnsChanged",c.EVENT_COLUMN_HEADER_MOUSE_OVER="columnHeaderMouseOver",c.EVENT_COLUMN_HEADER_MOUSE_LEAVE="columnHeaderMouseLeave",c.EVENT_COLUMN_HEADER_CLICKED="columnHeaderClicked",c.EVENT_COLUMN_HEADER_CONTEXT_MENU="columnHeaderContextMenu",c.EVENT_ASYNC_TRANSACTIONS_FLUSHED="asyncTransactionsFlushed",c.EVENT_ROW_GROUP_OPENED="rowGroupOpened",c.EVENT_ROW_DATA_UPDATED="rowDataUpdated",c.EVENT_PINNED_ROW_DATA_CHANGED="pinnedRowDataChanged",c.EVENT_RANGE_SELECTION_CHANGED="rangeSelectionChanged",c.EVENT_CHART_CREATED="chartCreated",c.EVENT_CHART_RANGE_SELECTION_CHANGED="chartRangeSelectionChanged",c.EVENT_CHART_OPTIONS_CHANGED="chartOptionsChanged",c.EVENT_CHART_DESTROYED="chartDe
1stroyed",c.EVENT_TOOL_PANEL_VISIBLE_CHANGED="toolPanelVisibleChanged",c.EVENT_TOOL_PANEL_SIZE_CHANGED="toolPanelSizeChanged",c.EVENT_COLUMN_PANEL_ITEM_DRAG_START="columnPanelItemDragStart",c.EVENT_COLUMN_PANEL_ITEM_DRAG_END="columnPanelItemDragEnd",c.EVENT_MODEL_UPDATED="modelUpdated",c.EVENT_CUT_START="cutStart",c.EVENT_CUT_END="cutEnd",c.EVENT_PASTE_START="pasteStart",c.EVENT_PASTE_END="pasteEnd",c.EVENT_FILL_START="fillStart",c.EVENT_FILL_END="fillEnd",c.EVENT_RANGE_DELETE_START="rangeDeleteStart",c.EVENT_RANGE_DELETE_END="rangeDeleteEnd",c.EVENT_UNDO_STARTED="undoStarted",c.EVENT_UNDO_ENDED="undoEnded",c.EVENT_REDO_STARTED="redoStarted",c.EVENT_REDO_ENDED="redoEnded",c.EVENT_KEY_SHORTCUT_CHANGED_CELL_START="keyShortcutChangedCellStart",c.EVENT_KEY_SHORTCUT_CHANGED_CELL_END="keyShortcutChangedCellEnd",c.EVENT_CELL_CLICKED="cellClicked",c.EVENT_CELL_DOUBLE_CLICKED="cellDoubleClicked",c.EVENT_CELL_MOUSE_DOWN="cellMouseDown",c.EVENT_CELL_CONTEXT_MENU="cellContextMenu",c.EVENT_CELL_VALUE_CHANGED="cellValueChanged",c.EVENT_CELL_EDIT_REQUEST="cellEditRequest",c.EVENT_ROW_VALUE_CHANGED="rowValueChanged",c.EVENT_CELL_FOCUSED="cellFocused",c.EVENT_CELL_FOCUS_CLEARED="cellFocusCleared",c.EVENT_FULL_WIDTH_ROW_FOCUSED="fullWidthRowFocused",c.EVENT_ROW_SELECTED="rowSelected",c.EVENT_SELECTION_CHANGED="selectionChanged",c.EVENT_TOOLTIP_SHOW="tooltipShow",c.EVENT_TOOLTIP_HIDE="tooltipHide",c.EVENT_CELL_KEY_DOWN="cellKeyDown",c.EVENT_CELL_MOUSE_OVER="cellMouseOver",c.EVENT_CELL_MOUSE_OUT="cellMouseOut",c.EVENT_FILTER_CHANGED="filterChanged",c.EVENT_FILTER_MODIFIED="filterModified",c.EVENT_FILTER_OPENED="filterOpened",c.EVENT_ADVANCED_FILTER_BUILDER_VISIBLE_CHANGED="advancedFilterBuilderVisibleChanged",c.EVENT_SORT_CHANGED="sortChanged",c.EVENT_VIRTUAL_ROW_REMOVED="virtualRowRemoved",c.EVENT_ROW_CLICKED="rowClicked",c.EVENT_ROW_DOUBLE_CLICKED="rowDoubleClicked",c.EVENT_GRID_READY="gridReady",c.EVENT_GRID_PRE_DESTROYED="gridPreDestroyed",c.EVENT_GRID_SIZE_CHANGED="gridSizeChanged",c.EVENT_VIEWPORT_CHANGED="viewportChanged",c.EVENT_SCROLLBAR_WIDTH_CHANGED="scrollbarWidthChanged",c.EVENT_FIRST_DATA_RENDERED="firstDataRendered",c.EVENT_DRAG_STARTED="dragStarted",c.EVENT_DRAG_STOPPED="dragStopped",c.EVENT_CHECKBOX_CHANGED="checkboxChanged",c.EVENT_ROW_EDITING_STARTED="rowEditingStarted",c.EVENT_ROW_EDITING_STOPPED="rowEditingStopped",c.EVENT_CELL_EDITING_STARTED="cellEditingStarted",c.EVENT_CELL_EDITING_STOPPED="cellEditingStopped",c.EVENT_BODY_SCROLL="bodyScroll",c.EVENT_BODY_SCROLL_END="bodyScrollEnd",c.EVENT_HEIGHT_SCALE_CHANGED="heightScaleChanged",c.EVENT_PAGINATION_CHANGED="paginationChanged",c.EVENT_COMPONENT_STATE_CHANGED="componentStateChanged",c.EVENT_STORE_REFRESHED="storeRefreshed",c.EVENT_STATE_UPDATED="stateUpdated",c.EVENT_COLUMN_MENU_VISIBLE_CHANGED="columnMenuVisibleChanged",c.EVENT_CONTEXT_MENU_VISIBLE_CHANGED="contextMenuVisibleChanged",c.EVENT_BODY_HEIGHT_CHANGED="bodyHeightChanged",c.EVENT_COLUMN_CONTAINER_WIDTH_CHANGED="columnContainerWidthChanged",c.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED="displayedColumnsWidthChanged",c.EVENT_SCROLL_VISIBILITY_CHANGED="scrollVisibilityChanged",c.EVENT_COLUMN_HOVER_CHANGED="columnHoverChanged",c.EVENT_FLASH_CELLS="flashCells",c.EVENT_PAGINATION_PIXEL_OFFSET_CHANGED="paginationPixelOffsetChanged",c.EVENT_DISPLAYED_ROWS_CHANGED="displayedRowsChanged",c.EVENT_LEFT_PINNED_WIDTH_CHANGED="leftPinnedWidthChanged",c.EVENT_RIGHT_PINNED_WIDTH_CHANGED="rightPinnedWidthChanged",c.EVENT_ROW_CONTAINER_HEIGHT_CHANGED="rowContainerHeightChanged",c.EVENT_HEADER_HEIGHT_CHANGED="headerHeightChanged",c.EVENT_COLUMN_HEADER_HEIGHT_CHANGED="columnHeaderHeightChanged",c.EVENT_ROW_DRAG_ENTER="rowDragEnter",c.EVENT_ROW_DRAG_MOVE="rowDragMove",c.EVENT_ROW_DRAG_LEAVE="rowDragLeave",c.EVENT_ROW_DRAG_END="rowDragEnd",c.EVENT_GRID_STYLES_CHANGED="gridStylesChanged",c.EVENT_COLUMN_ROW_GROUP_CHANGE_REQUEST="columnRowGroupChangeRequest",c.EVENT_COLUMN_PIVOT_CHANGE_REQUEST="columnPivotChangeRequest",c.EVENT_COLUMN_VALUE_CHANGE_REQUEST="columnValueChangeRequest",c.EVENT_COLUMN_AGG_FUNC_CHANGE_REQUEST="columnAggFuncChangeRequest",c.EVENT_STORE_UPDATED="storeUpdated",c.EVENT_FILTER_DESTROYED="filterDestroyed",c.EVENT_ROW_DATA_UPDATE_STARTED="rowDataUpdateStarted",c.EVENT_ROW_COUNT_READY="rowCountReady",c.EVENT_ADVANCED_FILTER_ENABLED_CHANGED="advancedFilterEnabledChanged",c.EVENT_DATA_TYPES_INFERRED="dataTypesInferred",c.EVENT_FIELD_VALUE_CHANGED="fieldValueChanged",c.EVENT_FIELD_PICKER_VALUE_SELECTED="fieldPickerValueSelected",c.EVENT_SIDE_BAR_UPDATED="sideBarUpdated";var Ns=new Set([c.EVENT_GRID_PRE_DESTROYED,c.EVENT_FILL_START]),hn=class{constructor(){this.existingIds={};}getInstanceIdForKey(e){const t=this.existingIds[e];let i;return i="number"!=typeof t?0:t+1,this.existingIds[e]=i,i;}},di="ag-Grid-AutoColumn",xs=class extends R{createAutoGroupColumns(e){const t=[],i=this.gos.get("treeData");let s=this.gos.isGroupMultiAutoColumn();return i&&s&&(console.warn('AG Grid: you cannot mix groupDisplayType = "multipleColumns" with treeData, only one column can be used to display groups when doing tree data'),s=!1),s?e.forEach((o,r)=>
1{t.push(this.createOneAutoGroupColumn(o,r));}):t.push(this.createOneAutoGroupColumn()),t;}updateAutoGroupColumns(e,t){e.forEach((i,s)=>this.updateOneAutoGroupColumn(i,s,t));}createOneAutoGroupColumn(e,t){let i;i=e?`${di}-${e.getId()}`:di;const s=this.createAutoGroupColDef(i,e,t);s.colId=i;const o=new Z(s,null,i,!0);return this.context.createBean(o),o;}updateOneAutoGroupColumn(e,t,i){const s=e.getColDef(),o="string"==typeof s.showRowGroup?s.showRowGroup:void 0,r=null!=o?this.columnModel.getPrimaryColumn(o):void 0,n=this.createAutoGroupColDef(e.getId(),r??void 0,t);e.setColDef(n,null,i),this.columnFactory.applyColumnState(e,n,i);}createAutoGroupColDef(e,t,i){let s=this.createBaseColDef(t);return Ie(s,this.gos.get("autoGroupColumnDef")),s=this.columnFactory.addColumnDefaultAndTypes(s,e),this.gos.get("treeData")||_(s.field)&&_(s.valueGetter)&&_(s.filterValueGetter)&&"agGroupColumnFilter"!==s.filter&&(s.filter=!1),i&&i>0&&(s.headerCheckboxSelection=!1),this.gos.isColumnsSortingCoupledToGroup()&&!(s.valueGetter||null!=s.field)&&(s.sortIndex=void 0,s.initialSort=void 0),s;}createBaseColDef(e){const t=this.gos.get("autoGroupColumnDef"),s={headerName:this.localeService.getLocaleTextFunc()("group","Group")};if(t&&(t.cellRenderer||t.cellRendererSelector)||(s.cellRenderer="agGroupCellRenderer"),e){const r=e.getColDef();Object.assign(s,{headerName:this.columnModel.getDisplayNameForColumn(e,"header"),headerValueGetter:r.headerValueGetter}),r.cellRenderer&&Object.assign(s,{cellRendererParams:{innerRenderer:r.cellRenderer,innerRendererParams:r.cellRendererParams}}),s.showRowGroup=e.getColId();}else s.showRowGroup=!0;return s;}};d([g("columnModel")],xs.prototype,"columnModel",2),d([g("columnFactory")],xs.prototype,"columnFactory",2),xs=d([L("autoGroupColService")],xs);var ga={};z(ga,{camelCaseToHumanText:()=>fa,camelCaseToHyphenated:()=>ma,capitalise:()=>zh,escapeString:()=>he,utf8_encode:()=>Uh});var Bh=/[&<>"']/g,Wh={"&":"&","<":"<",">":">",'"':""","'":"'"};function Uh(e){const t=String.fromCharCode;function o(p,f){return t(p>>f&63|128);}function r(p){if(p>=0&&p<=31&&10!==p)return`_x${p.toString(16).toUpperCase().padStart(4,"0")}_`;if(!(4294967168&p))return t(p);let f="";return 4294965248&p?4294901760&p?4292870144&p||(f=t(p>>18&7|240),f+=o(p,12),f+=o(p,6)):(function s(p){if(p>=55296&&p<=57343)throw Error("Lone surrogate U+"+p.toString(16).toUpperCase()+" is not a scalar value");}(p),f=t(p>>12&15|224),f+=o(p,6)):f=t(p>>6&31|192),f+=t(63&p|128),f;}const n=function i(p){const f=[];if(!p)return[];const m=p.length;let w,S,v=0;for(;v<m;)w=p.charCodeAt(v++),w>=55296&&w<=56319&&v<m?(S=p.charCodeAt(v++),56320==(64512&S)?f.push(((1023&w)<<10)+(1023&S)+65536):(f.push(w),v--)):f.push(w);return f;}(e),l=n.length;let u,a=-1,h="";for(;++a<l;)u=n[a],h+=r(u);return h;}function zh(e){return e[0].toUpperCase()+e.substring(1).toLowerCase();}function he(e,t){if(null==e)return null;const i=e.toString().toString();return t?i:i.replace(Bh,s=>Wh[s]);}function fa(e){return e&&null!=e?e.replace(/([a-z])([A-Z])/g,"$1 $2").replace(/([A-Z]+)([A-Z])([a-z])/g,"$1 $2$3").replace(/\./g," ").split(" ").map(o=>o.substring(0,1).toUpperCase()+(o.length>1?o.substring(1,o.length):"")).join(" "):null;}function ma(e){return e.replace(/[A-Z]/g,t=>`-${t.toLocaleLowerCase()}`);}var Ca={};function Bt(e){const t=new Map();return e.forEach(i=>t.set(i[0],i[1])),t;}function Kh(e,t){const i=new Map();return e.forEach(s=>i.set(t(s),s)),i;}function $h(e){const t=[];return e.forEach((i,s)=>t.push(s)),t;}z(Ca,{convertToMap:()=>Bt,keys:()=>$h,mapById:()=>Kh});var fe=class extends R{constructor(){super(...arguments),this.primaryHeaderRowCount=0,this.secondaryHeaderRowCount=0,this.gridHeaderRowCount=0,this.displayedColumnsLeft=[],this.displayedColumnsRight=[],this.displayedColumnsCenter=[],this.displayedColumns=[],this.displayedColumnsAndGroupsMap={},this.viewportColumns=[],this.viewportColumnsHash="",this.headerViewportColumns=[],this.viewportColumnsCenter=[],this.headerViewportColumnsCenter=[],this.viewportRowLeft={},this.viewportRowRight={},this.viewportRowCenter={},this.autoHeightActiveAtLeastOnce=!1,this.rowGroupColumns=[],this.valueColumns=[],this.pivotColumns=[],this.ready=!1,this.changeEventsDispat
1ching=!1,this.autoGroupsNeedBuilding=!1,this.forceRecreateAutoGroups=!1,this.pivotMode=!1,this.bodyWidth=0,this.leftWidth=0,this.rightWidth=0,this.bodyWidthDirty=!0,this.shouldQueueResizeOperations=!1,this.resizeOperationQueue=[];}init(){this.suppressColumnVirtualisation=this.gos.get("suppressColumnVirtualisation");const e=this.gos.get("pivotMode");this.isPivotSettingAllowed(e)&&(this.pivotMode=e),this.addManagedPropertyListeners(["groupDisplayType","treeData","treeDataDisplayType","groupHideOpenParents"],t=>this.buildAutoGroupColumns($i(t.source))),this.addManagedPropertyListener("autoGroupColumnDef",t=>this.onAutoGroupColumnDefChanged($i(t.source))),this.addManagedPropertyListeners(["defaultColDef","columnTypes","suppressFieldDotNotation"],t=>this.onSharedColDefChanged($i(t.source))),this.addManagedPropertyListener("pivotMode",t=>this.setPivotMode(this.gos.get("pivotMode"),$i(t.source))),this.addManagedListener(this.eventService,c.EVENT_FIRST_DATA_RENDERED,()=>this.onFirstDataRendered());}buildAutoGroupColumns(e){this.columnDefs&&(this.autoGroupsNeedBuilding=!0,this.forceRecreateAutoGroups=!0,this.updateGridColumns(),this.updateDisplayedColumns(e));}onAutoGroupColumnDefChanged(e){this.groupAutoColumns&&this.autoGroupColService.updateAutoGroupColumns(this.groupAutoColumns,e);}onSharedColDefChanged(e){this.gridColumns&&(this.groupAutoColumns&&this.autoGroupColService.updateAutoGroupColumns(this.groupAutoColumns,e),this.createColumnsFromColumnDefs(!0,e));}setColumnDefs(e,t){const i=!!this.columnDefs;this.columnDefs=e,this.createColumnsFromColumnDefs(i,t);}recreateColumnDefs(e){this.onSharedColDefChanged(e);}destroyOldColumns(e,t){const i={};if(!e)return;At(null,e,o=>{i[o.getInstanceId()]=o;}),t&&At(null,t,o=>{i[o.getInstanceId()]=null;});const s=Object.values(i).filter(o=>null!=o);this.destroyBeans(s);}destroyColumns(){this.destroyOldColumns(this.primaryColumnTree),this.destroyOldColumns(this.secondaryBalancedTree),this.destroyOldColumns(this.groupAutoColsBalancedTree);}createColumnsFromColumnDefs(e,t){const i=e?this.compareColumnStatesAndDispatchEvents(t):void 0;this.valueCache.expire(),this.autoGroupsNeedBuilding=!0;const s=this.primaryColumns,r=this.columnFactory.createColumnTree(this.columnDefs,!0,this.primaryColumnTree,t);this.destroyOldColumns(this.primaryColumnTree,r.columnTree),this.primaryColumnTree=r.columnTree,this.primaryHeaderRowCount=r.treeDept+1,this.primaryColumns=this.getColumnsFromTree(this.primaryColumnTree),this.primaryColumnsMap={},this.primaryColumns.forEach(a=>this.primaryColumnsMap[a.getId()]=a),this.extractRowGroupColumns(t,s),this.extractPivotColumns(t,s),this.extractValueColumns(t,s),this.ready=!0,(this.gridColsArePrimary||void 0===this.gridColsArePrimary||this.autoGroupsNeedBuilding)&&(this.updateGridColumns(),e&&this.gridColsArePrimary&&!this.gos.get("maintainColumnOrder")&&this.orderGridColumnsLikePrimary(),this.updateDisplayedColumns(t),this.checkViewportColumns()),this.dispatchEverythingChanged(t),this.changeEventsDispatching=!0,i&&i(),this.changeEventsDispatching=!1,this.dispatchNewColumnsLoaded(t);}shouldRowModelIgnoreRefresh(){return this.changeEventsDispatching;}dispatchNewColumnsLoaded(e){this.eventService.dispatchEvent({type:c.EVENT_NEW_COLUMNS_LOADED,source:e}),"gridInitializing"===e&&this.onColumnsReady();}dispatchEverythingChanged(e){this.eventService.dispatchEvent({type:c.EVENT_COLUMN_EVERYTHING_CHANGED,source:e});}orderGridColumnsLikePrimary(){const e=this.primaryColumns;if(!e)return;const t=e.filter(s=>this.gridColumns.indexOf(s)>=0),i=this.gridColumns.filter(s=>t.indexOf(s)<0);this.gridColumns=[...i,...t],this.gridColumns=this.placeLockedColumns(this.gridColumns);}getAllDisplayedAutoHeightCols(){return this.displayedAutoHeightCols;}setViewport(){this.gos.get("enableRtl")?(this.viewportLeft=this.bodyWidth-this.scrollPosition-this.scrollWidth,this.viewportRight=this.bodyWidth-this.scrollPosition):(this.viewportLeft=this.scrollPosition,this.viewportRight=this.scrollWidth+this.scrollPosition);}checkViewportColumns(e=!1){null!=this.displayedColumnsCenter&&this.extractViewport()&&this.eventService.dispatchEvent({type:c.EVENT_VIRTUAL_COLUMNS_CHANGED,afterScroll:e});}setViewportPosition(e,t,i=!1){(e!==this.scrollWidth||t!==this.scrollPosition||this.bodyWidthDirty)&&
1(this.scrollWidth=e,this.scrollPosition=t,this.bodyWidthDirty=!0,this.setViewport(),this.ready&&this.checkViewportColumns(i));}isPivotMode(){return this.pivotMode;}isPivotSettingAllowed(e){return!e||!this.gos.get("treeData")||(O("Pivot mode not available with treeData."),!1);}setPivotMode(e,t){e!==this.pivotMode&&this.isPivotSettingAllowed(this.pivotMode)&&(this.pivotMode=e,this.gridColumns)&&(this.autoGroupsNeedBuilding=!0,this.updateGridColumns(),this.updateDisplayedColumns(t),this.eventService.dispatchEvent({type:c.EVENT_COLUMN_PIVOT_MODE_CHANGED}));}getSecondaryPivotColumn(e,t){if(_(this.secondaryColumns))return null;const i=this.getPrimaryColumn(t);let s=null;return this.secondaryColumns.forEach(o=>{const r=o.getColDef().pivotKeys,n=o.getColDef().pivotValueColumn;pt(r,e)&&n===i&&(s=o);}),s;}setBeans(e){this.logger=e.create("columnModel");}setFirstRightAndLastLeftPinned(e){let t,i;this.gos.get("enableRtl")?(t=this.displayedColumnsLeft?this.displayedColumnsLeft[0]:null,i=this.displayedColumnsRight?Y(this.displayedColumnsRight):null):(t=this.displayedColumnsLeft?Y(this.displayedColumnsLeft):null,i=this.displayedColumnsRight?this.displayedColumnsRight[0]:null),this.gridColumns.forEach(s=>{s.setLastLeftPinned(s===t,e),s.setFirstRightPinned(s===i,e);});}autoSizeColumns(e){if(this.shouldQueueResizeOperations)return void this.resizeOperationQueue.push(()=>this.autoSizeColumns(e));const{columns:t,skipHeader:i,skipHeaderGroups:s,stopAtGroup:o,source:r="api"}=e;this.animationFrameService.flushAllFrames();const n=[];let l=-1;const a=i??this.gos.get("skipHeaderOnAutoSize"),u=s??a;for(;0!==l;)l=0,this.actionOnGridColumns(t,h=>{if(n.indexOf(h)>=0)return!1;const p=this.autoWidthCalculator.getPreferredWidthForColumn(h,a);if(p>0){const f=this.normaliseColumnWidth(h,p);h.setActualWidth(f,r),n.push(h),l++;}return!0;},r);u||this.autoSizeColumnGroupsByColumns(t,r,o),this.dispatchColumnResizedEvent(n,!0,"autosizeColumns");}dispatchColumnResizedEvent(e,t,i,s=null){e&&e.length&&this.eventService.dispatchEvent({type:c.EVENT_COLUMN_RESIZED,columns:e,column:1===e.length?e[0]:null,flexColumns:s,finished:t,source:i});}dispatchColumnChangedEvent(e,t,i){this.eventService.dispatchEvent({type:e,columns:t,column:t&&1==t.length?t[0]:null,source:i});}dispatchColumnMovedEvent(e){const{movedColumns:t,source:i,toIndex:s,finished:o}=e;this.eventService.dispatchEvent({type:c.EVENT_COLUMN_MOVED,columns:t,column:t&&1===t.length?t[0]:null,toIndex:s,finished:o,source:i});}dispatchColumnPinnedEvent(e,t){if(!e.length)return;const i=1===e.length?e[0]:null,s=this.getCommonValue(e,r=>r.getPinned());this.eventService.dispatchEvent({type:c.EVENT_COLUMN_PINNED,pinned:s??null,columns:e,column:i,source:t});}dispatchColumnVisibleEvent(e,t){if(!e.length)return;const i=1===e.length?e[0]:null,s=this.getCommonValue(e,r=>r.isVisible());this.eventService.dispatchEvent({type:c.EVENT_COLUMN_VISIBLE,visible:s,columns:e,column:i,source:t});}autoSizeColumn(e,t,i){e&&this.autoSizeColumns({columns:[e],skipHeader:i,skipHeaderGroups:!0,source:t});}autoSizeColumnGroupsByColumns(e,t,i){const s=new Set();let r;this.getGridColumns(e).forEach(l=>{let a=l.getParent();for(;a&&a!=i;)a.isPadding()||s.add(a),a=a.getParent();});for(const l of s){for(const a of this.ctrlsService.getHeaderRowContainerCtrls())if(r=a.getHeaderCtrlForColumn(l),r)break;r&&r.resizeLeafColumnsToFit(t);}return[];}autoSizeAllColumns(e,t){if(this.shouldQueueResizeOperations)return void this.resizeOperationQueue.push(()=>this.autoSizeAllColumns(e,t));const i=this.getAllDisplayedColumns();this.autoSizeColumns({columns:i,skipHeader:t,source:e});}getColumnsFromTree(e){const t=[],i=s=>{for(let o=0;o<s.length;o++){const r=s[o];r instanceof Z?t.push(r):r instanceof ae&&i(r.getChildren());}};return i(e),t;}getAllDisplayedTrees(){return this.displayedTreeLeft&&this.displayedTreeRight&&this.displayedTreeCentre?this.displayedTreeLeft.concat(this.displayedTreeCentre).concat(this.displayedTreeRight):null;}getPrimaryColumnTree(){return this.primaryColumnTree;}getHeaderRowCount(){return this.gridHeaderRowCount;}getDisplayedTreeLeft(){return this.displayedTreeLeft;}getDisplayedTreeRight(){return this.displayedTreeRight;}getDisplayedTreeCentre(){return this.displayedTreeCentre;}isColumnDisplayed(e){return this.getAllDisplayedColumns().indexOf(e)>=0;}getAllDisplayedColumns(){return this.displayedColumns;}getViewportColumns(){return this.viewportColumns;}getDisplayedLeftColumnsForRow(e){return this.colSpanActive?this.getDisplayedColumnsForRow(e,this.displayedColumnsLeft):this.displayedColumnsLeft;}getDisplayedRightColumnsForRow(e){return this.colSpanActive?this.getDisplayedColumnsForRow(e,this.displayedColumnsRight):this.displayedColumnsRight;}isColSpanActive(){return this.colSpanActive;}getDisplayedColumnsForRow(e,t,i,s){const o=[];let r=null;for(let n=0;n<t.length;n++){const l=t[n],a=t.length-n,u=Math.min(l.getColSpan(e),a),h=[l];if(u>1){const f=u-1;for(let m=1;m<=f;m++)h.push(t[n+m]);n+=f;}let p;i?(p=!1,h.forEach(f=>{i(f)&&(p=!0);})):p=!0,p&&(0===o.length&&r&&s&&s(l)&&o.push(r),o.push(l)),r=l;}return o;}getViewportCenterColumnsForRow(e){if(!this.colSpanActive)return this.viewportColumnsCenter;const i=this.isColumnVirtualisationSuppressed()?null:this.isColumnInRowViewport.bind(this);return this.getDisplayedColumnsForRow(e,this.displayedColumnsCenter,i,s=>{const o=s.getLeft();return y(o)&&o>this.viewportLeft;});}isColumnAtEdge(e,t){const i=this.getAllDisplayedColumns();if(!i.length)return!1;const s="first"===t;let o;if(e instanceof pe){const r=e.getDisplayedLeafColumns();if(!r.length)return!1;o=s?r[0]:Y(r);}else o=e;return(s?i[0]:Y(i))===o;}getAriaColumnIndex(e){let t;return t=e instanceof pe?e.getLeafColumns()[0]:e,this.ariaOrderColumns.indexOf(t)+1;}isColumnInHeaderViewport(e){return!!e.isAutoHeaderHeight()||this.isColumnInRowViewport(e);}isColumnInRowViewport(e){if(e.isAutoHeight())return!0;const t=e.getLeft()||0,i=t+e.getActualWidth(),s=this.viewportLeft-200,o=this.viewportRight+200;return!(t<s&&i<s||t>o&&i>
1o);}getDisplayedColumnsLeftWidth(){return this.getWidthOfColsInList(this.displayedColumnsLeft);}getDisplayedColumnsRightWidth(){return this.getWidthOfColsInList(this.displayedColumnsRight);}updatePrimaryColumnList(e,t,i,s,o,r){if(!e||Me(e))return;let n=!1;e.forEach(a=>{if(!a)return;const u=this.getPrimaryColumn(a);if(u){if(i){if(t.indexOf(u)>=0)return;t.push(u);}else{if(t.indexOf(u)<0)return;Ge(t,u);}s(u),n=!0;}}),n&&(this.autoGroupsNeedBuilding&&this.updateGridColumns(),this.updateDisplayedColumns(r),this.eventService.dispatchEvent({type:o,columns:t,column:1===t.length?t[0]:null,source:r}));}setRowGroupColumns(e,t){this.autoGroupsNeedBuilding=!0,this.setPrimaryColumnList(e,this.rowGroupColumns,c.EVENT_COLUMN_ROW_GROUP_CHANGED,!0,this.setRowGroupActive.bind(this),t);}setRowGroupActive(e,t,i){e!==t.isRowGroupActive()&&(t.setRowGroupActive(e,i),e&&!this.gos.get("suppressRowGroupHidesColumns")&&this.setColumnsVisible([t],!1,i),!e&&!this.gos.get("suppressMakeColumnVisibleAfterUnGroup")&&this.setColumnsVisible([t],!0,i));}addRowGroupColumns(e,t){this.autoGroupsNeedBuilding=!0,this.updatePrimaryColumnList(e,this.rowGroupColumns,!0,this.setRowGroupActive.bind(this,!0),c.EVENT_COLUMN_ROW_GROUP_CHANGED,t);}removeRowGroupColumns(e,t){this.autoGroupsNeedBuilding=!0,this.updatePrimaryColumnList(e,this.rowGroupColumns,!1,this.setRowGroupActive.bind(this,!1),c.EVENT_COLUMN_ROW_GROUP_CHANGED,t);}addPivotColumns(e,t){this.updatePrimaryColumnList(e,this.pivotColumns,!0,i=>i.setPivotActive(!0,t),c.EVENT_COLUMN_PIVOT_CHANGED,t);}setPivotColumns(e,t){this.setPrimaryColumnList(e,this.pivotColumns,c.EVENT_COLUMN_PIVOT_CHANGED,!0,(i,s)=>{s.setPivotActive(i,t);},t);}removePivotColumns(e,t){this.updatePrimaryColumnList(e,this.pivotColumns,!1,i=>i.setPivotActive(!1,t),c.EVENT_COLUMN_PIVOT_CHANGED,t);}setPrimaryColumnList(e,t,i,s,o,r){if(!this.gridColumns)return;const n=new Map();t.forEach((l,a)=>n.set(l,a)),t.length=0,y(e)&&e.forEach(l=>{const a=this.getPrimaryColumn(l);a&&t.push(a);}),t.forEach((l,a)=>{const u=n.get(l);void 0!==u?s&&u!==a||n.delete(l):n.set(l,0);}),(this.primaryColumns||[]).forEach(l=>{const a=t.indexOf(l)>=0;o(a,l);}),this.autoGroupsNeedBuilding&&this.updateGridColumns(),this.updateDisplayedColumns(r),this.dispatchColumnChangedEvent(i,[...n.keys()],r);}setValueColumns(e,t){this.setPrimaryColumnList(e,this.valueColumns,c.EVENT_COLUMN_VALUE_CHANGED,!1,this.setValueActive.bind(this),t);}setValueActive(e,t,i){if(e!==t.isValueActive()&&(t.setValueActive(e,i),e&&!t.getAggFunc()&&this.aggFuncService)){const s=this.aggFuncService.getDefaultAggFunc(t);t.setAggFunc(s);}}addValueColumns(e,t){this.updatePrimaryColumnList(e,this.valueColumns,!0,this.setValueActive.bind(this,!0),c.EVENT_COLUMN_VALUE_CHANGED,t);}removeValueColumns(e,t){this.updatePrimaryColumnList(e,this.valueColumns,!1,this.setValueActive.bind(this,!1),c.EVENT_COLUMN_VALUE_CHANGED,t);}normaliseColumnWidth(e,t){const i=e.getMinWidth();y(i)&&t<i&&(t=i);const s=e.getMaxWidth();return y(s)&&e.isGreaterThanMax(t)&&(t=s),t;}getPrimaryOrGridColumn(e){return this.getPrimaryColumn(e)||this.getGridColumn(e);}setColumnWidths(e,t,i,s){const o=[];e.forEach(r=>{const n=this.getPrimaryOrGridColumn(r.key);if(n&&(o.push({width:r.newWidth,ratios:[1],columns:[n]}),"shift"===this.gos.get("colResizeDefault")&&(t=!t),t)){const a=this.getDisplayedColAfter(n);if(!a)return;const u=n.getActualWidth()-r.newWidth,h=a.getActualWidth()+u;o.push({width:h,ratios:[1],columns:[a]});}}),0!==o.length&&this.resizeColumnSets({resizeSets:o,finished:i,source:s});}checkMinAndMaxWidthsForSet(e){const{columns:t,width:i}=e;let s=0,o=0,r=!0;return t.forEach(a=>{const u=a.getMinWidth();s+=u||0;const h=a.getMaxWidth();y(h)&&h>0?o+=h:r=!1;}),i>=s&&(!r||i<=o);}resizeColumnSets(e){const{resizeSets:t,finished:i,source:s}=e;if(t&&!t.every(h=>this.checkMinAndMaxWidthsForSet(h)))return void(i&&this.dispatchColumnResizedEvent(t&&t.length>0?t[0].columns:null,i,s));const r=[],n=[];t.forEach(h=>{const{width:p,columns:f,ratios:m}=h,v={},w={};f.forEach(E=>n.push(E));let S=!0,b=0;for(;S;){if(b++,b>1e3){console.error("AG Grid: infinite loop in resizeColumnSets");break;}S=!1;const E=[];let F=0,P=p;f.forEach((G,N)=>{w[G.getId()]?P-=v[G.getId()]:(E.push(G),F+=m[N]);});const I=1/F;
1E.forEach((G,N)=>{let te;N===E.length-1?te=P:(te=Math.round(m[N]*p*I),P-=te);const st=G.getMinWidth(),We=G.getMaxWidth();y(st)&&te<st?(te=st,w[G.getId()]=!0,S=!0):y(We)&&We>0&&te>We&&(te=We,w[G.getId()]=!0,S=!0),v[G.getId()]=te;});}f.forEach(E=>{const F=v[E.getId()];E.getActualWidth()!==F&&(E.setActualWidth(F,s),r.push(E));});});const l=r.length>0;let a=[];l&&(a=this.refreshFlexedColumns({resizingCols:n,skipSetLeft:!0}),this.setLeftValues(s),this.updateBodyWidths(),this.checkViewportColumns());const u=n.concat(a);(l||i)&&this.dispatchColumnResizedEvent(u,i,s,a);}setColumnAggFunc(e,t,i){if(!e)return;const s=this.getPrimaryColumn(e);s&&(s.setAggFunc(t),this.dispatchColumnChangedEvent(c.EVENT_COLUMN_VALUE_CHANGED,[s],i));}moveRowGroupColumn(e,t,i){if(this.isRowGroupEmpty())return;const s=this.rowGroupColumns[e],o=this.rowGroupColumns.slice(e,t);this.rowGroupColumns.splice(e,1),this.rowGroupColumns.splice(t,0,s),this.eventService.dispatchEvent({type:c.EVENT_COLUMN_ROW_GROUP_CHANGED,columns:o,column:1===o.length?o[0]:null,source:i});}moveColumns(e,t,i,s=!0){if(!this.gridColumns)return;if(this.columnAnimationService.start(),t>this.gridColumns.length-e.length)return console.warn("AG Grid: tried to insert columns in invalid location, toIndex = "+t),void console.warn("AG Grid: remember that you should not count the moving columns when calculating the new index");const o=this.getGridColumns(e);this.doesMovePassRules(o,t)&&(ln(this.gridColumns,o,t),this.updateDisplayedColumns(i),this.dispatchColumnMovedEvent({movedColumns:o,source:i,toIndex:t,finished:s}),this.columnAnimationService.finish());}doesMovePassRules(e,t){const i=this.getProposedColumnOrder(e,t);return this.doesOrderPassRules(i);}doesOrderPassRules(e){return!(!this.doesMovePassMarryChildren(e)||!this.doesMovePassLockedPositions(e));}getProposedColumnOrder(e,t){const i=this.gridColumns.slice();return ln(i,e,t),i;}sortColumnsLikeGridColumns(e){!e||e.length<=1||e.filter(i=>this.gridColumns.indexOf(i)<0).length>0||e.sort((i,s)=>this.gridColumns.indexOf(i)-this.gridColumns.indexOf(s));}doesMovePassLockedPositions(e){let t=0,i=!0;return e.forEach(o=>{const r=(o=>o?!0===o||"left"===o?0:2:1)(o.getColDef().lockPosition);r<t&&(i=!1),t=r;}),i;}doesMovePassMarryChildren(e){let t=!0;return At(null,this.gridBalancedTree,i=>{if(!(i instanceof ae))return;const s=i,o=s.getColGroupDef();if(!o||!o.marryChildren)return;const n=[];s.getLeafColumns().forEach(p=>{const f=e.indexOf(p);n.push(f);}),Math.max.apply(Math,n)-Math.min.apply(Math,n)>s.getLeafColumns().length-1&&(t=!1);}),t;}moveColumnByIndex(e,t,i){this.gridColumns&&this.moveColumns([this.gridColumns[e]],t,i);}getColumnDefs(){if(!this.primaryColumns)return;const e=this.primaryColumns.slice();return this.gridColsArePrimary?e.sort((t,i)=>this.gridColumns.indexOf(t)-this.gridColumns.indexOf(i)):this.lastPrimaryOrder&&e.sort((t,i)=>this.lastPrimaryOrder.indexOf(t)-this.lastPrimaryOrder.indexOf(i)),this.columnDefFactory.buildColumnDefs(e,this.rowGroupColumns,this.pivotColumns);}getBodyContainerWidth(){return this.bodyWidth;}getContainerWidth(e){switch(e){case"left":return this.leftWidth;case"right":return this.rightWidth;default:return this.bodyWidth;}}updateBodyWidths(){const e=this.getWidthOfColsInList(this.displayedColumnsCenter),t=this.getWidthOfColsInList(this.displayedColumnsLeft),i=this.getWidthOfColsInList(this.displayedColumnsRight);this.bodyWidthDirty=this.bodyWidth!==e,(this.bodyWidth!==e||this.leftWidth!==t||this.rightWidth!==i)&&(this.bodyWidth=e,this.leftWidth=t,this.rightWidth=i,this.eventService.dispatchEvent({type:c.EVENT_COLUMN_CONTAINER_WIDTH_CHANGED}),this.eventService.dispatchEvent({type:c.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED}));}getValueColumns(){return this.valueColumns?this.valueColumns:[];}getPivotColumns(){return this.pivotColumns?this.pivotColumns:[];}isPivotActive(){return this.pivotColumns&&this.pivotColumns.length>0&&this.pivotMode;}getRowGroupColumns(){return this.rowGroupColumns?this.rowGroupColumns:[];}getDisplayedCenterColumns(){return this.displayedColumnsCenter;}getDisplayedLeftColumns(){return this.displayedColumnsLeft;}getDisplayedRightColumns(){return this.displayedColumnsRight;}getAllPrimaryColumns(){return this.primaryColumns?this.primaryColumns:null;}getSecondaryColumns(){return this.secondaryColumns?this.secondaryColumns:null;}getAllColumnsForQuickFilter(){return this.columnsForQuickFilter;}getAllGridColumns(){var e;return null!=(e=this.gridColumns)?e:[];}isRowGroupEmpty(){return Me(this.rowGroupColumns);}setColumnsVisible(e,t=!1,i){this.applyColumnState({state:e.map(s=>({colId:"string"==typeof s?s:s.getColId(),hide:!t}))},i);}setColumnsPinned(e,t,i){if(!this.gridColumns)return;if(this.gos.isDomLayout("print"))return void console.warn("AG Grid: Changing the column pinning status is not allowed with domLayout='print'");let s;this.columnAnimationService.start(),s=!0===t||"left"===t?"left":"right"===t?"right":null,this.actionOnGridColumns(e,o=>o.getPinned()!==s&&(o.setPinned(s),!0),i,()=>({type:c.EVENT_COLUMN_PINNED,pinned:s,column:null,columns:null,source:i})),this.columnAnimationService.finish();}actionOnGridColumns(e,t,i,s){if(Me(e))return;const o=[];if(e.forEach(r=>{if(!r)return;const n=this.getGridColumn(r);n&&!1!==t(n)&&o.push(n);}),o.length&&(this.updateDisplayedColumns(i),y(s)&&s)){const r=s();r.columns=o,r.column=1===o.length?o[0]:null,this.eventService.dispatchEvent(r);}}getDisplayedColBefore(e){const t=this.getAllDisplayedColumns(),i=t.indexOf(e);return i>0?t[i-1]:null;}getDisplayedColAfter(e){const t=this.getAllDisplayedColumns(),i=t.indexOf(e);return i<t.length-1?t[i+1]:null;}getDisplayedGroupAtDirection(e,t){const i=e.getProvidedColumnGroup().getLevel()+e.getPaddingLevel(),s=e.getDisplayedLeafColumns(),o="After"===t?Y(s):s[0],r=`getDisplayedCol${t}`;for(;;){const n=this[r](o);if(!n)return null;const l=this.getColumnGroupAtLevel(n,i);if(l!==e)return l;}}getColumnGroupAtLevel(e,t){let s,o,i=e.getParent();for(;s=i.getProvidedColumnGroup().getLevel(),o=i.getPaddingLevel(),!(s+o<=t);)i=i.getParent();return i;}isPinningLeft(){return this.displayedColumnsLeft.length>0;}isPinningRight(){return this.displayedColumnsRight.length>0;}getPrimaryAndSecondaryAndAutoColumns(){return[].concat(this.primaryColumns||[],this.groupAutoColumns||[],this.secondaryColumns||[]);}createStateItemFromColumn(e){const t=e.isRowGroupActive()?this.rowGroupColumns.indexOf(e):null,i=e.isPivotActive()?this.pivotColumns.indexOf(e):null,s=e.isValueActive()?e.getAggFunc():null,o=null!=e.getSort()?e.getSort():null,r=null!=e.getSortIndex()?e.getSortIndex():null,n=null!=e.getFlex()&&e.getFlex()>0?e.getFlex():null;return{colId:e.getColId(),width:e.getActualWidth(),hide:!e.isVisible(),pinned:e.getPinned(),sort:o,sortIndex:r,aggFunc:s,rowGroup:e.isRowGroupActive(),rowGroupIndex:t,pivot:e.isPivotActive(),pivotIndex:i,flex:n};}getColumnState(){if(_(this.primaryColumns)||!this.isAlive())return[];const t=this.getPrimaryAndSecondaryAndAutoColumns().map(this.createStateItemFromColumn.bind(this));return this.orderColumnStateList(t),t;}orderColumnStateList(e){const t=Bt(this.gridColumns.map((i,s)=>[i.getColId(),s]));e.sort((i,s)=>(t.has(i.colId)?t.get(i.colId):-1)-(t.has(s.colId)?t.get(s.colId):-1));}resetColumnState(e){if(Me(this.primaryColumns))return;const t=this.getColumnsFromTree(this.primaryColumnTree),i=[];let s=1e3,o=1e3,r=[];this.groupAutoColumns&&(r=r.concat(this.groupAutoColumns)),t&&(r=r.concat(t)),r.forEach(n=>{const l=this.getColumnStateFromColDef(n);_(l.rowGroupIndex)&&l.rowGroup&&(l.rowGroupIndex=s++),_(l.pivotIndex)&&l.pivot&&(l.pivotIndex=o++),i.push(l);}),this.applyColumnState({state:i,applyOrder:!0},e);}getColumnStateFromColDef(e){const t=(v,w)=>v??w??null,i=e.getColDef(),s=t(i.sort,i.initialSort),o=t(i.sortIndex,i.initialSortIndex),r=t(i.hide,i.initialHide),n=t(i.pinned,i.initialPinned),l=t(i.width,i.initialWidth),a=t(i.flex,i.initialFlex);let u=t(i.rowGroupIndex,i.initialRowGroupIndex),h=t(i.rowGroup,i.initialRowGroup);null==u&&(null==h||0==h)&&(u=null,h=null);let p=t(i.pivotIndex,i.initialPivotIndex),f=t(i.pivot,i.initialPivot);null==p&&(null==f||0==f)&&(p=null,f=null);const m=t(i.aggFunc,i.initialAggFunc);return{colId:e.getColId(),sort:s,sortIndex:o,hide:r,pinned:n,width:l,flex:a,rowGroup:h,rowGroupIndex:u,pivot:f,pivotIndex:p,aggFunc:m};}applyColumnState(e,t){if(Me(this.primaryColumns))return!1;if(e&&e.state&&!e.state.forEach)return console.warn("AG Grid: 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."),!1;const i=(r,n,l)=>{const a=this.compareColumnStatesAndDispatchEvents(t);this.autoGroupsNeedBuilding=!0;const u=n.slice(),h={},p={},f=[],m=[];let v=0;const w=this.rowGroupColumns.slice(),S=this.pivotColumns.slice();r.forEach(P=>{const I=P.colId||"";if(I.startsWith(di))return f.push(P),void m.push(P);const N=l(I);N?(this.syncColumnWithStateItem(N,P,e.defaultState,h,p,!1,t),Ge(u,N)):(m.push(P),v+=1);});const b=P=>this.syncColumnWithStateItem(P,null,e.defaultState,h,p,!1,t);u.forEach(b);const E=(P,I,G,N)=>{const oe=P[G.getId()],te=P[N.getId()],st=null!=oe,We=null!=te;if(st&&We)return oe-te;if(st)return-1;if(We)return 1;const bs=I.indexOf(G),Et=I.indexOf(N),qu=bs>=0;return qu&&Et>=0?bs-Et:qu?-1:1;};this.rowGroupColumns.sort(E.bind(this,h,w)),this.pivotColumns.sort(E.bind(this,p,S)),this.updateGridColumns();const F=this.groupAutoColumns?this.groupAutoColumns.slice():[];return f.forEach(P=>{const I=this.getAutoColumn(P.colId);Ge(F,I),this.syncColumnWithStateItem(I,P,e.defaultState,null,null,!0,t);}),F.forEach(b),this.applyOrderAfterApplyState(e),this.updateDisplayedColumns(t),this.dispatchEverythingChanged(t),a(),{unmatchedAndAutoStates:m,unmatchedCount:v};};this.columnAnimationService.start();let{unmatchedAndAutoStates:s,unmatchedCount:o}=i(e.state||[],this.primaryColumns||[],r=>this.getPrimaryColumn(r));return(s.length>0||y(e.defaultState))&&(o=i(s,this.secondaryColumns||[],r=>this.getSecondaryColumn(r)).unmatchedCount),this.columnAnimationService.finish(),0===o;}applyOrderAfterApplyState(e){if(!e.applyOrder||!e.state)return;let t=[];const i={};e.state.forEach(o=>{if(!o.colId||i[o.colId])return;const r=this.gridColumnsMap[o.colId];r&&(t.push(r),i[o.colId]=!0);});let s=0;this.gridColumns.forEach(o=>{const r=o.getColId();null==i[r]&&(r.startsWith(di)?Gs(t,o,s++):t.push(o));}),t=this.placeLockedColumns(t),this.doesMovePassMarryChildren(t)?this.gridColumns=t:console.warn("AG Grid: Applying column order broke a group where columns should be married together. Applying new order has been discarded.");}compareColumnStatesAndDispatchEvents(e){const t={rowGroupColumns:this.rowGroupColumns.slice(),pivotColumns:this.pivotColumns.slice(),valueColumns:this.valueColumns.slice()},i=this.getColumnState(),s={};
1return i.forEach(o=>{s[o.colId]=o;}),()=>{const o=this.getPrimaryAndSecondaryAndAutoColumns(),r=(w,S,b,E)=>{if(pt(S.map(E),b.map(E)))return;const G=new Set(S);b.forEach(te=>{G.delete(te)||G.add(te);});const N=[...G];this.eventService.dispatchEvent({type:w,columns:N,column:1===N.length?N[0]:null,source:e});},n=w=>{const S=[];return o.forEach(b=>{const E=s[b.getColId()];E&&w(E,b)&&S.push(b);}),S;},l=w=>w.getColId();r(c.EVENT_COLUMN_ROW_GROUP_CHANGED,t.rowGroupColumns,this.rowGroupColumns,l),r(c.EVENT_COLUMN_PIVOT_CHANGED,t.pivotColumns,this.pivotColumns,l);const u=n((w,S)=>{const b=null!=w.aggFunc,E=b!=S.isValueActive(),F=b&&w.aggFunc!=S.getAggFunc();return E||F;});u.length>0&&this.dispatchColumnChangedEvent(c.EVENT_COLUMN_VALUE_CHANGED,u,e),this.dispatchColumnResizedEvent(n((w,S)=>w.width!=S.getActualWidth()),!0,e),this.dispatchColumnPinnedEvent(n((w,S)=>w.pinned!=S.getPinned()),e),this.dispatchColumnVisibleEvent(n((w,S)=>w.hide==S.isVisible()),e);const v=n((w,S)=>w.sort!=S.getSort()||w.sortIndex!=S.getSortIndex());v.length>0&&this.sortController.dispatchSortChangedEvents(e,v),this.normaliseColumnMovedEventForColumnState(i,e);};}getCommonValue(e,t){if(!e||0==e.length)return;const i=t(e[0]);for(let s=1;s<e.length;s++)if(i!==t(e[s]))return;return i;}normaliseColumnMovedEventForColumnState(e,t){const i=this.getColumnState(),s={};i.forEach(a=>s[a.colId]=a);const o={};e.forEach(a=>{s[a.colId]&&(o[a.colId]=!0);});const r=e.filter(a=>o[a.colId]),n=i.filter(a=>o[a.colId]),l=[];n.forEach((a,u)=>{const h=r&&r[u];if(h&&h.colId!==a.colId){const p=this.getGridColumn(h.colId);p&&l.push(p);}}),l.length&&this.dispatchColumnMovedEvent({movedColumns:l,source:t,finished:!0});}syncColumnWithStateItem(e,t,i,s,o,r,n){var l;if(!e)return;const a=(P,I)=>{const G={value1:void 0,value2:void 0};let N=!1;return t&&(void 0!==t[P]&&(G.value1=t[P],N=!0),y(I)&&void 0!==t[I]&&(G.value2=t[I],N=!0)),!N&&i&&(void 0!==i[P]&&(G.value1=i[P]),y(I)&&void 0!==i[I]&&(G.value2=i[I])),G;},u=a("hide").value1;void 0!==u&&e.setVisible(!u,n);const h=a("pinned").value1;void 0!==h&&e.setPinned(h);const p=null!=(l=e.getColDef().minWidth)?l:this.environment.getMinColWidth(),f=a("flex").value1;if(void 0!==f&&e.setFlex(f),null==f){const P=a("width").value1;null!=P&&null!=p&&P>=p&&e.setActualWidth(P,n);}const m=a("sort").value1;void 0!==m&&e.setSort("desc"===m||"asc"===m?m:void 0,n);const v=a("sortIndex").value1;if(void 0!==v&&e.setSortIndex(v),r||!e.isPrimary())return;const w=a("aggFunc").value1;void 0!==w&&("string"==typeof w?(e.setAggFunc(w),e.isValueActive()||(e.setValueActive(!0,n),this.valueColumns.push(e))):(y(w)&&console.warn("AG Grid: 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."),e.isValueActive()&&(e.setValueActive(!1,n),Ge(this.valueColumns,e))));const{value1:S,value2:b}=a("rowGroup","rowGroupIndex");(void 0!==S||void 0!==b)&&("number"==typeof b||S?(e.isRowGroupActive()||(e.setRowGroupActive(!0,n),this.rowGroupColumns.push(e)),s&&"number"==typeof b&&(s[e.getId()]=b)):e.isRowGroupActive()&&(e.setRowGroupActive(!1,n),Ge(this.rowGroupColumns,e)));const{value1:E,value2:F}=a("pivot","pivotIndex");(void 0!==E||void 0!==F)&&("number"==typeof F||E?(e.isPivotActive()||(e.setPivotActive(!0,n),this.pivotColumns.push(e)),o&&"number"==typeof F&&(o[e.getId()]=F)):e.isPivotActive()&&(e.setPivotActive(!1,n),Ge(this.pivotColumns,e)));}getGridColumns(e){return this.getColumns(e,this.getGridColumn.bind(this));}getColumns(e,t){const i=[];return e&&e.forEach(s=>{const o=t(s);o&&i.push(o);}),i;}getColumnWithValidation(e){if(null==e)return null;const t=this.getGridColumn(e);return t||console.warn("AG Grid: could not find column "+e),t;}getPrimaryColumn(e){return this.primaryColumns?this.getColumn(e,this.primaryColumns,this.primaryColumnsMap):null;}getGridColumn(e){return this.getColumn(e,this.gridColumns,this.gridColumnsMap);}lookupGridColumn(e){return this.gridColumnsMap[e];}getSecondaryColumn(e){return this.secondaryColumns?this.getColumn(e,this.secondaryColumns,this.secondaryColumnsMap):null;}getColumn(e,t,i){if(!e||!i)return null;if("string"==typeof e&&i[e])return i[e];for(let s=0;s<t.length;s++)if(this.columnsMatch(t[s],e))return t[s];return this.getAutoColumn(e);}getSourceColumnsForGroupColumn(e){const t=e.getColDef().showRowGroup;if(!t)return null;if(!0===t)return this.rowGroupColumns.slice(0);const i=this.getPrimaryColumn(t);return i?[i]:null;}getAutoColumn(e){return this.groupAutoColumns&&y(this.groupAutoColumns)&&!_(this.groupAutoColumns)&&this.groupAutoColumns.find(t=>this.columnsMatch(t,e))||null;}columnsMatch(e,t){const i=e===t,s=e.getColDef()===t,o=e.getColId()==t;return i||s||o;}getDisplayNameForColumn(e,t,i=!1){if(!e)return null;const s=this.getHeaderName(e.getColDef(),e,null,null,t);return i?this.wrapHeaderNameWithAggFunc(e,s):s;}getDisplayNameForProvidedColumnGroup(e,t,i){const s=t?t.getColGroupDef():null;return s?this.getHeaderName(s,null,e,t,i):null;}getDisplayNameForColumnGroup(e,t){return this.getDisplayNameForProvidedColumnGroup(e,e.getProvidedColumnGroup(),t);}getHeaderName(e,t,i,s,o){const r=e.headerValueGetter;if(r){const n=this.gos.addGridCommonParams({colDef:e,column:t,columnGroup:i,providedColumnGroup:s,location:o});return"function"==typeof r?r(n):"string"==typeof r?this.expressionService.evaluate(r,n):(console.warn("AG Grid: headerValueGetter must be a function or a string"),"");}return null!=e.headerName?e.headerName:e.field?fa(e.field):"";}wrapHeaderNameWithAggFunc(e,t){if(this.gos.get("suppressAggFuncInHeader"))return t;const i=e.getColDef().pivotValueColumn;let r,o=null;if(y(i)){const n=this.gos.get("removePivotHeaderRowWhenSingleValueColumn")&&1===this.valueColumns.length,l=void 0!==e.getColDef().pivotTotalColumnIds;if(n&&!l)return t;o=i?i.getAggFunc():null,r=!0;}else{const n=e.isValueActive(),l=this.pivotMode||!this.isRowGroupEmpty();n&&l?(o=e.getAggFunc(),r=!0):r=!1;}if(r){const n="string"==typeof o?o:"func";return`${this.localeService.getLocaleTextFunc()(n,n)}(${t})`;}return t;}getColumnGroup(e,t){if(!e)return null;if(e instanceof pe)return e;const i=this.getAllDisplayedTrees(),s="number"==typeof t;let o=null;return ui(i,!1,r=>{if(r instanceof pe){const n=r;let l;l=s?e===n.getGroupId()&&t===n.getPartId():e===n.getGroupId(),l&&(o=n);}}),o;}isReady(){return this.ready;}extractValueColumns(e,t){this.valueColumns=this.extractColumns(t,this.valueColumns,(i,s)=>i.setValueActive(s,e),()=>{},()=>{},i=>{const s=i.aggFunc;return null===s||""===s?null:void 0!==s?!!s:void 0;},i=>null!=i.initialAggFunc&&""!=i.initialAggFunc),this.valueColumns.forEach(i=>
1{const s=i.getColDef();null!=s.aggFunc&&""!=s.aggFunc?i.setAggFunc(s.aggFunc):i.getAggFunc()||i.setAggFunc(s.initialAggFunc);});}extractRowGroupColumns(e,t){this.rowGroupColumns=this.extractColumns(t,this.rowGroupColumns,(i,s)=>i.setRowGroupActive(s,e),i=>i.rowGroupIndex,i=>i.initialRowGroupIndex,i=>i.rowGroup,i=>i.initialRowGroup);}extractColumns(e=[],t=[],i,s,o,r,n){const l=[],a=[];(this.primaryColumns||[]).forEach(p=>{const f=e.indexOf(p)<0,m=p.getColDef(),v=Ho(r(m)),w=Ho(n(m)),S=Ht(s(m)),b=Ht(o(m));let E;E=void 0!==v?v:void 0!==S?null!==S&&S>=0:f?void 0!==w?w:void 0!==b&&null!=b&&b>=0:t.indexOf(p)>=0,E&&((f?null!=S||null!=b:null!=S)?l.push(p):a.push(p));});const u=p=>{const f=s(p.getColDef()),m=o(p.getColDef());return f??m;};l.sort((p,f)=>{const m=u(p),v=u(f);return m===v?0:m<v?-1:1;});const h=[].concat(l);return t.forEach(p=>{a.indexOf(p)>=0&&h.push(p);}),a.forEach(p=>{h.indexOf(p)<0&&h.push(p);}),t.forEach(p=>{h.indexOf(p)<0&&i(p,!1);}),h.forEach(p=>{t.indexOf(p)<0&&i(p,!0);}),h;}extractPivotColumns(e,t){this.pivotColumns=this.extractColumns(t,this.pivotColumns,(i,s)=>i.setPivotActive(s,e),i=>i.pivotIndex,i=>i.initialPivotIndex,i=>i.pivot,i=>i.initialPivot);}resetColumnGroupState(e){if(!this.primaryColumnTree)return;const t=[];At(null,this.primaryColumnTree,i=>{if(i instanceof ae){const s=i.getColGroupDef(),o={groupId:i.getGroupId(),open:s?s.openByDefault:void 0};t.push(o);}}),this.setColumnGroupState(t,e);}getColumnGroupState(){const e=[];return At(null,this.gridBalancedTree,t=>{t instanceof ae&&e.push({groupId:t.getGroupId(),open:t.isExpanded()});}),e;}setColumnGroupState(e,t){if(!this.gridBalancedTree)return;this.columnAnimationService.start();const i=[];e.forEach(s=>{const r=s.open,n=this.getProvidedColumnGroup(s.groupId);n&&n.isExpanded()!==r&&(this.logger.log("columnGroupOpened("+n.getGroupId()+","+r+")"),n.setExpanded(r),i.push(n));}),this.updateGroupsAndDisplayedColumns(t),this.setFirstRightAndLastLeftPinned(t),i.length&&this.eventService.dispatchEvent({type:c.EVENT_COLUMN_GROUP_OPENED,columnGroup:1===ae.length?i[0]:void 0,columnGroups:i}),this.columnAnimationService.finish();}setColumnGroupOpened(e,t,i){let s;s=e instanceof ae?e.getId():e||"",this.setColumnGroupState([{groupId:s,open:t}],i);}getProvidedColumnGroup(e){"string"!=typeof e&&console.error("AG Grid: group key must be a string");let t=null;return At(null,this.gridBalancedTree,i=>{i instanceof ae&&i.getId()===e&&(t=i);}),t;}calculateColumnsForDisplay(){let e;return e=this.pivotMode&&_(this.secondaryColumns)?this.gridColumns.filter(t=>{const i=this.groupAutoColumns&&ze(this.groupAutoColumns,t),s=this.valueColumns&&ze(this.valueColumns,t);return i||s;}):this.gridColumns.filter(t=>this.groupAutoColumns&&ze(this.groupAutoColumns,t)||t.isVisible()),e;}checkColSpanActiveInCols(e){let t=!1;return e.forEach(i=>{y(i.getColDef().colSpan)&&(t=!0);}),t;}calculateColumnsForGroupDisplay(){this.groupDisplayColumns=[],this.groupDisplayColumnsMap={},this.gridColumns.forEach(t=>{const i=t.getColDef(),s=i.showRowGroup;i&&y(s)&&(this.groupDisplayColumns.push(t),"string"==typeof s?this.groupDisplayColumnsMap[s]=t:!0===s&&this.getRowGroupColumns().forEach(o=>{this.groupDisplayColumnsMap[o.getId()]=t;}));});}getGroupDisplayColumns(){return this.groupDisplayColumns;}getGroupDisplayColumnForGroup(e){return this.groupDisplayColumnsMap[e];}updateDisplayedColumns(e){const t=this.calculateColumnsForDisplay();this.buildDisplayedTrees(t),this.updateGroupsAndDisplayedColumns(e),this.setFirstRightAndLastLeftPinned(e);}isSecondaryColumnsPresent(){return y(this.secondaryColumns);}setSecondaryColumns(e,t){if(!this.gridColumns)return;const i=e;if(i||!_(this.secondaryColumns)){if(i){this.processSecondaryColumnDefinitions(e);const s=this.columnFactory.createColumnTree(e,!1,this.secondaryBalancedTree||this.previousSecondaryColumns||void 0,t);this.destroyOldColumns(this.secondaryBalancedTree,s.columnTree),this.secondaryBalancedTree=s.columnTree,this.secondaryHeaderRowCount=s.treeDept+1,this.secondaryColumns=this.getColumnsFromTree(this.secondaryBalancedTree),this.secondaryColumnsMap={},this.secondaryColumns.forEach(o=>this.secondaryColumnsMap[o.getId()]=o),this.previousSecondaryColumns=null;}else this.previousSecondaryColumns=this.secondaryBalancedTree,this.secondaryBalancedTree=null,this.secondaryHeaderRowCount=-1,this.secondaryColumns=null,this.secondaryColumnsMap={};this.updateGridColumns(),this.updateDisplayedColumns(t);}}processSecondaryColumnDefinitions(e){const t=this.gos.get("processPivotResultColDef"),i=this.gos.get("processPivotResultColGroupDef");if(!t&&!i)return;const s=o=>{o.forEach(r=>{if(y(r.children)){const l=r;i&&i(l),s(l.children);}else t&&t(r);});};e&&s(e);}updateGridColumns(){const e=this.gridBalancedTree;if(this.gridColsArePrimary?this.lastPrimaryOrder=this.gridColumns:this.lastSecondaryOrder=this.gridColumns,this.createGroupAutoColumnsIfNeeded()){const s=Bt
1(this.groupAutoColumns.map(o=>[o,!0]));this.lastPrimaryOrder&&(this.lastPrimaryOrder=this.lastPrimaryOrder.filter(o=>!s.has(o)),this.lastPrimaryOrder=[...this.groupAutoColumns,...this.lastPrimaryOrder]),this.lastSecondaryOrder&&(this.lastSecondaryOrder=this.lastSecondaryOrder.filter(o=>!s.has(o)),this.lastSecondaryOrder=[...this.groupAutoColumns,...this.lastSecondaryOrder]);}let i;if(this.secondaryColumns&&this.secondaryBalancedTree){const s=this.secondaryColumns.some(o=>void 0!==this.gridColumnsMap[o.getColId()]);this.gridBalancedTree=this.secondaryBalancedTree.slice(),this.gridHeaderRowCount=this.secondaryHeaderRowCount,this.gridColumns=this.secondaryColumns.slice(),this.gridColsArePrimary=!1,s&&(i=this.lastSecondaryOrder);}else this.primaryColumns&&(this.gridBalancedTree=this.primaryColumnTree.slice(),this.gridHeaderRowCount=this.primaryHeaderRowCount,this.gridColumns=this.primaryColumns.slice(),this.gridColsArePrimary=!0,i=this.lastPrimaryOrder);this.addAutoGroupToGridColumns(),this.orderGridColsLike(i),this.gridColumns=this.placeLockedColumns(this.gridColumns),this.calculateColumnsForGroupDisplay(),this.refreshQuickFilterColumns(),this.clearDisplayedAndViewportColumns(),this.colSpanActive=this.checkColSpanActiveInCols(this.gridColumns),this.gridColumnsMap={},this.gridColumns.forEach(s=>this.gridColumnsMap[s.getId()]=s),this.setAutoHeightActive(),pt(e,this.gridBalancedTree)||this.eventService.dispatchEvent({type:c.EVENT_GRID_COLUMNS_CHANGED});}setAutoHeightActive(){this.autoHeightActive=this.gridColumns.filter(e=>e.isAutoHeight()).length>0,this.autoHeightActive&&(this.autoHeightActiveAtLeastOnce=!0,this.gos.isRowModelType("clientSide")||this.gos.isRowModelType("serverSide")||O("autoHeight columns only work with Client Side Row Model and Server Side Row Model."));}orderGridColsLike(e){if(_(e))return;const t=Bt(e.map((a,u)=>[a,u]));let i=!0;if(this.gridColumns.forEach(a=>{t.has(a)&&(i=!1);}),i)return;const s=Bt(this.gridColumns.map(a=>[a,!0])),o=e.filter(a=>s.has(a)),r=Bt(o.map(a=>[a,!0])),n=this.gridColumns.filter(a=>!r.has(a)),l=o.slice();n.forEach(a=>{let u=a.getOriginalParent();if(!u)return void l.push(a);const h=[];for(;!h.length&&u;)u.getLeafColumns().forEach(v=>{const w=l.indexOf(v)>=0,S=h.indexOf(v)<0;w&&S&&h.push(v);}),u=u.getOriginalParent();if(!h.length)return void l.push(a);const p=h.map(m=>l.indexOf(m)),f=Math.max(...p);Gs(l,a,f+1);}),this.gridColumns=l;}isPrimaryColumnGroupsPresent(){return this.primaryHeaderRowCount>1;}refreshQuickFilterColumns(){var e;let t=null!=(e=this.isPivotMode()&&!this.gos.get("applyQuickFilterBeforePivotOrAgg")?this.secondaryColumns:this.primaryColumns)?e:[];this.groupAutoColumns&&(t=t.concat(this.groupAutoColumns)),this.columnsForQuickFilter=this.gos.get("includeHiddenColumnsInQuickFilter")?t:t.filter(i=>i.isVisible()||i.isRowGroupActive());}placeLockedColumns(e){const t=[],i=[],s=[];return e.forEach(o=>{const r=o.getColDef().lockPosition;"right"===r?s.push(o):"left"===r||!0===r?t.push(o):i.push(o);}),[...t,...i,...s];}addAutoGroupToGridColumns(){if(_(this.groupAutoColumns))return this.destroyOldColumns(this.groupAutoColsBalancedTree),void(this.groupAutoColsBalancedTree=null);this.gridColumns=this.groupAutoColumns?this.groupAutoColumns.concat(this.gridColumns):this.gridColumns;const e=this.columnFactory.createForAutoGroups(this.groupAutoColumns,this.gridBalancedTree);this.destroyOldColumns(this.groupAutoColsBalancedTree,e),this.groupAutoColsBalancedTree=e,this.gridBalancedTree=e.concat(this.gridBalancedTree);}clearDisplayedAndViewportColumns(){this.viewportRowLeft={},this.viewportRowRight={},this.viewportRowCenter={},this.displayedColumnsLeft=[],this.displayedColumnsRight=[],this.displayedColumnsCenter=[],this.displayedColumns=[],this.ariaOrderColumns=[],this.viewportColumns=[],this.headerViewportColumns=[],this.viewportColumnsHash="";}updateGroupsAndDisplayedColumns(e){this.updateOpenClosedVisibilityInColumnGroups(),this.deriveDisplayedColumns(e),this.refreshFlexedColumns(),this.extractViewport(),this.updateBodyWidths(),this.eventService.dispatchEvent({type:c.EVENT_DISPLAYED_COLUMNS_CHANGED});}deriveDisplayedColumns(e){this.derivedDisplayedColumnsFromDisplayedTree(this.displayedTreeLeft,this.displayedColumnsLeft),this.derivedDisplayedColumnsFromDisplayedTree(this.displayedTreeCentre,this.displayedColumnsCenter),this.derivedDisplayedColumnsFromDisplayedTree(this.displayedTreeRight,this.displayedColumnsRight),this.joinColumnsAriaOrder(),this.joinDisplayedColumns(),this.setLeftValues(e),this.displayedAutoHeightCols=this.displayedColumns.filter(t=>t.isAutoHeight());}isAutoRowHeightActive(){return this.autoHeightActive;}wasAutoRowHeightEverActive(){return this.autoHeightActiveAtLeastOnce;}joinColumnsAriaOrder(){const e=this.getAllGridColumns(),t=[],i=[],s=[];for(const o of e){const r=o.getPinned();r?!0===r||"left"===r?t.push(o):s.push(o):i.push(o);}
1this.ariaOrderColumns=t.concat(i).concat(s);}joinDisplayedColumns(){this.displayedColumns=this.gos.get("enableRtl")?this.displayedColumnsRight.concat(this.displayedColumnsCenter).concat(this.displayedColumnsLeft):this.displayedColumnsLeft.concat(this.displayedColumnsCenter).concat(this.displayedColumnsRight);}setLeftValues(e){this.setLeftValuesOfColumns(e),this.setLeftValuesOfGroups();}setLeftValuesOfColumns(e){if(!this.primaryColumns)return;const t=this.getPrimaryAndSecondaryAndAutoColumns().slice(0),i=this.gos.get("enableRtl");[this.displayedColumnsLeft,this.displayedColumnsRight,this.displayedColumnsCenter].forEach(s=>{if(i){let o=this.getWidthOfColsInList(s);s.forEach(r=>{o-=r.getActualWidth(),r.setLeft(o,e);});}else{let o=0;s.forEach(r=>{r.setLeft(o,e),o+=r.getActualWidth();});}la(t,s);}),t.forEach(s=>{s.setLeft(null,e);});}setLeftValuesOfGroups(){[this.displayedTreeLeft,this.displayedTreeRight,this.displayedTreeCentre].forEach(e=>{e.forEach(t=>{t instanceof pe&&t.checkLeft();});});}derivedDisplayedColumnsFromDisplayedTree(e,t){t.length=0,ui(e,!0,i=>{i instanceof Z&&t.push(i);});}isColumnVirtualisationSuppressed(){return this.suppressColumnVirtualisation||0===this.viewportRight;}extractViewportColumns(){this.isColumnVirtualisationSuppressed()?(this.viewportColumnsCenter=this.displayedColumnsCenter,this.headerViewportColumnsCenter=this.displayedColumnsCenter):(this.viewportColumnsCenter=this.displayedColumnsCenter.filter(this.isColumnInRowViewport.bind(this)),this.headerViewportColumnsCenter=this.displayedColumnsCenter.filter(this.isColumnInHeaderViewport.bind(this))),this.viewportColumns=this.viewportColumnsCenter.concat(this.displayedColumnsLeft).concat(this.displayedColumnsRight),this.headerViewportColumns=this.headerViewportColumnsCenter.concat(this.displayedColumnsLeft).concat(this.displayedColumnsRight);}getVirtualHeaderGroupRow(e,t){let i;switch(e){case"left":i=this.viewportRowLeft[t];break;case"right":i=this.viewportRowRight[t];break;default:i=this.viewportRowCenter[t];}return _(i)&&(i=[]),i;}calculateHeaderRows(){this.viewportRowLeft={},this.viewportRowRight={},this.viewportRowCenter={};const e={};this.headerViewportColumns.forEach(i=>e[i.getId()]=!0);const t=(i,s,o)=>{let r=!1;for(let n=0;n<i.length;n++){const l=i[n];let a=!1;if(l instanceof Z)a=!0===e[l.getId()];else{const h=l.getDisplayedChildren();h&&(a=t(h,s,o+1));}a&&(r=!0,s[o]||(s[o]=[]),s[o].push(l));}return r;};t(this.displayedTreeLeft,this.viewportRowLeft,0),t(this.displayedTreeRight,this.viewportRowRight,0),t(this.displayedTreeCentre,this.viewportRowCenter,0);}extractViewport(){this.extractViewportColumns();const t=this.viewportColumns.map(s=>`${s.getId()}-${s.getPinned()||"normal"}`).join("#"),i=this.viewportColumnsHash!==t;return i&&(this.viewportColumnsHash=t,this.calculateHeaderRows()),i;}refreshFlexedColumns(e={}){var t;const i=e.source?e.source:"flex";if(null!=e.viewportWidth&&(this.flexViewportWidth=e.viewportWidth),!this.flexViewportWidth)return[];let s=-1;if(e.resizingCols){const f=new Set(e.resizingCols);let m=this.displayedColumnsCenter;for(let v=m.length-1;v>=0;v--)if(f.has(m[v])){s=v;break;}}let o=0,r=[],n=0,l=0;for(let f=0;f<this.displayedColumnsCenter.length;f++)this.displayedColumnsCenter[f].getFlex()&&f>s?(r.push(this.displayedColumnsCenter[f]),l+=this.displayedColumnsCenter[f].getFlex(),n+=null!=(t=this.displayedColumnsCenter[f].getMinWidth())?t:0):o+=this.displayedColumnsCenter[f].getActualWidth();if(!r.length)return[];let a=[];o+n>this.flexViewportWidth&&(r.forEach(f=>{var m;return f.setActualWidth(null!=(m=f.getMinWidth())?m:0,i);}),a=r,r=[]);const u=[];let h;e:for(;;){h=this.flexViewportWidth-o;const f=h/l;for(let m=0;m<r.length;m++){const v=r[m],w=f*v.getFlex();let S=0;const b=v.getMinWidth(),E=v.getMaxWidth();if(y(b)&&w<b?S=b:y(E)&&w>E&&(S=E),S){v.setActualWidth(S,i),rn(r,v),l-=v.getFlex(),a.push(v),o+=v.getActualWidth();continue e;}u[m]=Math.round(w);}break;}let p=h;return r.forEach((f,m)=>{f.setActualWidth(Math.min(u[m],p),i),a.push(f),p-=u[m];}),e.skipSetLeft||this.setLeftValues(i),e.updateBodyWidths&&this.updateBodyWidths(),e.fireResizedEvent&&this.dispatchColumnResizedEvent(a,!0,i,r),r;}sizeColumnsToFit(e,t="sizeColumnsToFit",i,s){var o,r,n,l,a;if(this.shouldQueueResizeOperations)return void this.resizeOperation
1Queue.push(()=>this.sizeColumnsToFit(e,t,i,s));const u={};s&&(null==(o=s?.columnLimits)||o.forEach(b=>{var E=b,{key:F}=E,P=((e,t)=>{var i={};for(var s in e)Ms.call(e,s)&&t.indexOf(s)<0&&(i[s]=e[s]);if(null!=e&&Wi)for(var s of Wi(e))t.indexOf(s)<0&&Vo.call(e,s)&&(i[s]=e[s]);return i;})(E,["key"]);u["string"==typeof F?F:F.getColId()]=P;}));const h=this.getAllDisplayedColumns(),p=e===this.getWidthOfColsInList(h);if(e<=0||!h.length||p)return;const f=[],m=[];h.forEach(b=>{!0===b.getColDef().suppressSizeToFit?m.push(b):f.push(b);});const v=f.slice(0);let w=!1;const S=b=>{Ge(f,b),m.push(b);};for(f.forEach(b=>{var E,F;b.resetActualWidth(t);const P=u?.[b.getId()],I=null!=(E=P?.minWidth)?E:s?.defaultMinWidth,G=null!=(F=P?.maxWidth)?F:s?.defaultMaxWidth,N=b.getActualWidth();"number"==typeof I&&N<I?b.setActualWidth(I,t,!0):"number"==typeof G&&N>G&&b.setActualWidth(G,t,!0);});!w;){w=!0;const b=e-this.getWidthOfColsInList(m);if(b<=0)f.forEach(E=>{var F,P;const I=null!=(P=null==(F=u?.[E.getId()])?void 0:F.minWidth)?P:s?.defaultMinWidth;"number"!=typeof I?E.setMinimum(t):E.setActualWidth(I,t,!0);});else{const E=b/this.getWidthOfColsInList(f);let F=b;for(let P=f.length-1;P>=0;P--){const I=f[P],G=u?.[I.getId()],N=null!=(r=G?.minWidth)?r:s?.defaultMinWidth,oe=null!=(n=G?.maxWidth)?n:s?.defaultMaxWidth,te=null!=(l=I.getMinWidth())?l:0,st=null!=(a=I.getMaxWidth())?a:Number.MAX_VALUE,We="number"==typeof N&&N>te?N:I.getMinWidth(),bs="number"==typeof oe&&oe<st?oe:I.getMaxWidth();let Et=Math.round(I.getActualWidth()*E);y(We)&&Et<We?(Et=We,S(I),w=!1):y(bs)&&Et>bs?(Et=bs,S(I),w=!1):0===P&&(Et=F),I.setActualWidth(Et,t,!0),F-=Et;}}}v.forEach(b=>{b.fireColumnWidthChangedEvent(t);}),this.setLeftValues(t),this.updateBodyWidths(),!i&&this.dispatchColumnResizedEvent(v,!0,t);}buildDisplayedTrees(e){const t=[],i=[],s=[];e.forEach(r=>{switch(r.getPinned()){case"left":t.push(r);break;case"right":i.push(r);break;default:s.push(r);}});const o=new hn();this.displayedTreeLeft=this.displayedGroupCreator.createDisplayedGroups(t,o,"left",this.displayedTreeLeft),this.displayedTreeRight=this.displayedGroupCreator.createDisplayedGroups(i,o,"right",this.displayedTreeRight),this.displayedTreeCentre=this.displayedGroupCreator.createDisplayedGroups(s,o,null,this.displayedTreeCentre),this.updateDisplayedMap();}updateDisplayedMap(){this.displayedColumnsAndGroupsMap={};const e=t=>{this.displayedColumnsAndGroupsMap[t.getUniqueId()]=t;};ui(this.displayedTreeCentre,!1,e),ui(this.displayedTreeLeft,!1,e),ui(this.displayedTreeRight,!1,e);}isDisplayed(e){return this.displayedColumnsAndGroupsMap[e.getUniqueId()]===e;}updateOpenClosedVisibilityInColumnGroups(){ui(this.getAllDisplayedTrees(),!1,t=>{t instanceof pe&&t.calculateDisplayedColumns();});}getGroupAutoColumns(){return this.groupAutoColumns;}createGroupAutoColumnsIfNeeded(){const e=this.forceRecreateAutoGroups;if(this.forceRecreateAutoGroups=!1,!this.autoGroupsNeedBuilding)return!1;this.autoGroupsNeedBuilding=!1;const t=this.gos.isGroupUseEntireRow(this.pivotMode),i=this.pivotMode?this.gos.get("pivotSuppressAutoColumn"):this.isGroupSuppressAutoColumn();if(!(this.rowGroupColumns.length>0||this.gos.get("treeData"))||i||t)this.groupAutoColumns=null;else{const r=this.autoGroupColService.createAutoGroupColumns(this.rowGroupColumns);if(!this.autoColsEqual(r,this.groupAutoColumns)||e)return this.groupAutoColumns=r,!0;}return!1;}isGroupSuppressAutoColumn(){return"custom"===this.gos.get("groupDisplayType")||"custom"===this.gos.get("treeDataDisplayType");}autoColsEqual(e,t){return pt(e,t,(i,s)=>i.getColId()===s.getColId());}getWidthOfColsInList(e){return e.reduce((t,i)=>t+i.getActualWidth(),0);}getFirstDisplayedColumn(){const e=this.gos.get("enableRtl"),t=["getDisplayedLeftColumns","getDisplayedCenterColumns","getDisplayedRightColumns"];e&&t.reverse();for(let i=0;i<t.length;i++){const s=this[t[i]]();if(s.length)return e?Y(s):s[0];}return null;}setColumnHeaderHeight(e,t){e.setAutoHeaderHeight(t)&&this.eventService.dispatchEvent({type:c.EVENT_COLUMN_HEADER_HEIGHT_CHANGED,column:e,columns:[e],source:"autosizeColumnHeaderHeight"});}getColumnGroupHeaderRowHeight(){return this.isPivotMode()?this.getPivotGroupHeaderHeight():this.getGroupHeaderHeight();}getColumnHeaderRowHeight(){const e=this.isPivotMode()?this.getPivotHeaderHeight():this.getHeaderHeight(),t=this.getAllDisplayedColumns().filter(i=>i.isAutoHeaderHeight()).map(i=>i.getAutoHeaderHeight()||0);return Math.max(e,...t);}getHeaderHeight(){var e;return null!=(e=this.gos.get("headerHeight"))?e:this.environment.getFromTheme(25,"headerHeight");}getFloatingFiltersHeight(){var e;return null!=(e=this.gos.get("floatingFiltersHeight"))?e:this.getHeaderHeight();}getGroupHeaderHeight(){var e;return null!=(e=this.gos.get("groupHeaderHeight"))?e:this.getHeaderHeight();}getPivotHeaderHeight(){var e;return null!=(e=this.gos.get("pivotHeaderHeight"))?e:this.getHeaderHeight();}getPivotGroupHeaderHeight(){var e;return null!=(e=this.gos.get("pivotGroupHeaderHeight"))?e:this.getGroupHeaderHeight();}queueResizeOperations(){this.shouldQueueResizeOperations=!0;}processResizeOperations(){this.shouldQueueResizeOperations=!1,this.resizeOperation
1Queue.forEach(e=>e()),this.resizeOperationQueue=[];}resetColumnDefIntoColumn(e,t){const i=e.getUserProvidedColDef();if(!i)return!1;const s=this.columnFactory.addColumnDefaultAndTypes(i,e.getColId());return e.setColDef(s,i,t),!0;}isColumnGroupingLocked(e){const t=this.gos.get("groupLockGroupColumns");return!(!e.isRowGroupActive()||0===t)&&(-1===t||t>this.rowGroupColumns.findIndex(s=>s.getColId()===e.getColId()));}generateColumnStateForRowGroupAndPivotIndexes(e,t){let i={};const s=(o,r,n,l,a,u)=>{if(!r.length||!this.primaryColumns)return[];const h=Object.keys(o),p=new Set(h),f=new Set(h),m=new Set(r.map(I=>{const G=I.getColId();return f.delete(G),G;}).concat(h)),v=[],w={};let S=0;for(let I=0;I<this.primaryColumns.length;I++){const G=this.primaryColumns[I].getColId();m.has(G)&&(v.push(G),w[G]=S++);}let b=1e3,E=!1,F=0;const P=I=>{const G=w[I];for(let N=F;N<G;N++){const oe=v[N];f.has(oe)&&(o[oe][a]=b++,f.delete(oe));}F=G;};r.forEach(I=>{const G=I.getColId();if(p.has(G))P(G),o[G][a]=b++;else{const N=I.getColDef();(null===N[a]||void 0===N[a]&&null==N[u])&&(E||(N[n]||void 0===N[n]&&N[l]?P(G):(f.forEach(st=>{o[st][a]=b+w[st];}),b+=v.length,E=!0)),i[G]||(i[G]={colId:G}),i[G][a]=b++);}});};return s(e,this.rowGroupColumns,"rowGroup","initialRowGroup","rowGroupIndex","initialRowGroupIndex"),s(t,this.pivotColumns,"pivot","initialPivot","pivotIndex","initialPivotIndex"),Object.values(i);}onColumnsReady(){const e=this.gos.get("autoSizeStrategy");if(!e)return;const{type:t}=e;setTimeout(()=>{if("fitGridWidth"===t){const{columnLimits:i,defaultMinWidth:s,defaultMaxWidth:o}=e,r=i?.map(({colId:n,minWidth:l,maxWidth:a})=>({key:n,minWidth:l,maxWidth:a}));this.ctrlsService.getGridBodyCtrl().sizeColumnsToFit({defaultMinWidth:s,defaultMaxWidth:o,columnLimits:r});}else"fitProvidedWidth"===t&&this.sizeColumnsToFit(e.width,"sizeColumnsToFit");});}onFirstDataRendered(){const e=this.gos.get("autoSizeStrategy");if("fitCellContents"!==e?.type)return;const{colIds:t,skipHeader:i}=e;setTimeout(()=>{t?this.autoSizeColumns({columns:t,skipHeader:i,source:"autosizeColumns"}):this.autoSizeAllColumns("autosizeColumns",i);});}};function $i(e){return"gridOptionsUpdated"===e?"gridOptionsChanged":e;}function ui(e,t,i){if(e)for(let s=0;s<e.length;s++){const o=e[s];o instanceof pe&&ui(t?o.getDisplayedChildren():o.getChildren(),t,i),i(o);}}d([g("expressionService")],fe.prototype,"expressionService",2),d([g("columnFactory")],fe.prototype,"columnFactory",2),d([g("displayedGroupCreator")],fe.prototype,"displayedGroupCreator",2),d([g("ctrlsService")],fe.prototype,"ctrlsService",2),d([g("autoWidthCalculator")],fe.prototype,"autoWidthCalculator",2),d([g("columnAnimationService")],fe.prototype,"columnAnimationService",2),d([g("autoGroupColService")],fe.prototype,"autoGroupColService",2),d([g("valueCache")],fe.prototype,"valueCache",2),d([g("animationFrameService")],fe.prototype,"animationFrameService",2),d([g("sortController")],fe.prototype,"sortController",2),d([g("columnDefFactory")],fe.prototype,"columnDefFactory",2),d([Q("aggFuncService")],fe.prototype,"aggFuncService",2),d([T],fe.prototype,"init",1),d([Ee],fe.prototype,"destroyColumns",1),d([be(0,Ue("loggerFactory"))],fe.prototype,"setBeans",1),fe=d([L("columnModel")],fe);var Qo=class extends R{createDisplayedGroups(e,t,i,s){const o=this.mapOldGroupsById(s),r=[];let n=e;for(;n.length;){const l=n;n=[];let a=0;const u=h=>{const p=a;a=h;const f=l[p],v=(f instanceof pe?f.getProvidedColumnGroup():f).getOriginalParent();if(null==v){for(let S=p;S<h;S++)r.push(l[S]);return;}const w=this.createColumnGroup(v,t,o,i);for(let S=p;S<h;S++)w.addChild(l[S]);n.push(w);};for(let h=1;h<l.length;h++){const p=l[h],m=(p instanceof pe?p.getProvidedColumnGroup():p).getOriginalParent(),v=l[a];m!==(v instanceof pe?v.getProvidedColumnGroup():v).getOriginalParent()&&u(h);}a<l.length&&u(l.length);}return this.setupParentsIntoColumns(r,null),r;}createColumnGroup(e,t,i,s){const o=e.getGroupId(),r=t.getInstanceIdForKey(o);let l=i[pe.createUniqueId(o,r)];return l&&l.getProvidedColumnGroup()!==e&&(l=null),y(l)?l.reset():(l=new pe(e,o,r,s),this.context.createBean(l)),l;}
1mapOldGroupsById(e){const t={},i=s=>{s.forEach(o=>{if(o instanceof pe){const r=o;t[o.getUniqueId()]=r,i(r.getChildren());}});};return e&&i(e),t;}setupParentsIntoColumns(e,t){e.forEach(i=>{if(i.setParent(t),i instanceof pe){const s=i;this.setupParentsIntoColumns(s.getChildren(),s);}});}};Qo=d([L("displayedGroupCreator")],Qo);var Yh={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,excludeHiddenColumnsFromQuickFilter:!0,advancedFilterModel:!0,customChartThemes:!0,chartThemeOverrides:!0,enableChartToolPanelsButton:!0,suppressChartToolPanelsButton:!0,chartToolPanelsDef:!0,loadingCellRendererSelector:!0,localeText:!0,keepDetailRows:!0,keepDetailRowsCount:!0,detailRowHeight:!0,detailRowAutoHeight:!0,tabIndex:!0,valueCache:!0,valueCacheNeverExpires:!0,enableCellExpressions:!0,suppressParentsInRowNodes:!0,suppressTouch:!0,suppressAsyncEvents:!0,suppressBrowserResizeObserver:!0,suppressPropertyNamesCheck:!0,debug:!0,loadingOverlayComponent:!0,suppressLoadingOverlay:!0,noRowsOverlayComponent:!0,paginationPageSizeSelector:!0,paginateChildRows:!0,pivotPanelShow:!0,pivotSuppressAutoColumn:!0,suppressExpandablePivotGroups:!0,aggFuncs:!0,suppressAggFuncInHeader:!0,suppressAggAtRootLevel:!0,removePivotHeaderRowWhenSingleValueColumn:!0,allowShowChangeAfterFilter:!0,ensureDomOrder:!0,enableRtl:!0,suppressColumnVirtualisation:!0,suppressMaxRenderedRowRestriction:!0,suppressRowVirtualisation:!0,rowDragText:!0,suppressGroupMaintainValueType:!0,groupLockGroupColumns:!0,rowGroupPanelSuppressSort:!0,suppressGroupRowsSticky:!0,rowModelType:!0,cacheOverflowSize:!0,infiniteInitialRowCount:!0,serverSideInitialRowCount:!0,suppressServerSideInfiniteScroll:!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,functionsPassive:!0,enableGroupEdit:!0,initialState:!0,processUnpinnedColumns:!0,createChartContainer:!0,getLocaleText:!0,getRowId:!0,reactiveCustomComponents:!0,columnMenu:!0},ge=class{};ge.STRING_PROPERTIES=["rowSelection","overlayLoadingTemplate","overlayNoRowsTemplate","gridId","quickFilterText","rowModelType","editType","domLayout","clipboardDelimiter","rowGroupPanelShow","multiSortKey","pivotColumnGroupTotals","pivotRowTotals","pivotPanelShow","fillHandleDirection","groupDisplayType","treeDataDisplayType","colResizeDefault","tooltipTrigger","serverSidePivotResultFieldSeparator","columnMenu","tooltipShowMode","grandTotalRow"],ge.OBJECT_PROPERTIES=["components","rowStyle","context","autoGroupColumnDef","localeText","icons","datasource","serverSideDatasource","viewportDatasource","groupRowRendererParams","aggFuncs","fullWidthCellRendererParams","defaultColGroupDef","defaultColDef","defaultCsvExportParams","defaultExcelExportParams","columnTypes","rowClassRules","detailCellRendererParams","loadingCellRendererParams","loadingOverlayComponentParams","noRowsOverlayComponentParams","popupParent","statusBar","sideBar","chartThemeOverrides","customChartThemes","chartToolPanelsDef","dataTypeDefinitions","advancedFilterModel","advancedFilterParent","advancedFilterBuilderParams","initialState","autoSizeStrategy"],ge.ARRAY_PROPERTIES=["sortingOrder","alignedGrids","rowData","columnDefs","excelStyles","pinnedTopRowData","pinnedBottomRowData","chartThemes","rowClass","paginationPageSizeSelector"],ge.NUMBER_PROPERTIES=["rowHeight","detailRowHeight","rowBuffer","headerHeight","groupHeaderHeight","groupLockGroupColumns","floatingFiltersHeight","pivotHeaderHeight","pivotGroupHeaderHeight","groupDefaultExpanded","pivotDefaultExpanded","viewportRowModelPageSize","viewportRowModelBufferSize","autoSizePadding","maxBlocksInCache","maxConcurrentDatasourceRequests","tooltipShowDelay","tooltipHideDelay","cacheOverflowSize","paginationPageSize","cacheBlockSize","infiniteInitialRowCount","serverSideInitialRowCount","scrollbarWidth","asyncTransactionWaitMillis","blockLoadDebounceMillis","keepDetailRowsCount","undoRedoCellEditingLimit","cellFlashDelay","cellFadeDelay","cellFlashDuration","cellFadeDuration","tabIndex","pivotMaxGeneratedColumns"],ge.BOOLEAN_PROPERTIES=["suppressMakeColumnVisibleAfterUnGroup","suppressRowClickSelection","suppressCellFocus","suppressHeaderFocus","suppressHorizontalScroll","groupSelectsChildren","alwaysShowHorizontalScroll","alwaysShowVerticalScroll","debug","enableBrowserTooltips","enableCellExpressions","groupIncludeTotalFooter","groupSuppressBlankHeader","suppressMenuHide","suppressRowDeselection","unSortIcon","suppressMultiSort","alwaysMultiSort","singleClickEdit","suppressLoadingOverlay","suppressNoRowsOverlay","suppressAutoSize","skipHeaderOnAutoSize","suppressParentsInRowNodes","suppressColumnMoveAnimation","suppressMovableColumns","suppressFieldDotNotation","enableRangeSelection","enableRangeHandle","enableFillHandle","suppressClearOnFillReduction","deltaSort","suppressTouch","suppressAsyncEvents","allowContextMenuWithControlKey","suppressContextMenu","enableCellChangeFlash","suppressDragLeaveHidesColumns","suppressRowGroupHidesColumns","suppressMiddleClickScrolls","suppressPreventDefaultOnMouseWheel","suppressCopyRowsToClipboard","copyHeadersToClipboard","copyGroupHeadersToClipboard","pivotMode","suppressAggFuncInHeader","suppressColumnVirtualisation","alwaysAggregateAtRootLevel","suppressAggAtRootLevel","suppressFocusAfterRefresh","functionsPassive","functionsReadOnly","animateRows","groupSelectsFiltered","groupRemoveSingleChildren","groupRemoveLowestSingleChildren","enableRtl","suppressClickEdit","rowDragEntireRow","rowDragManaged","suppressRowDrag","suppressMoveWhenRowDragging","rowDragMultiRow","enableGroupEdit","embedFullWidthRows","suppressPaginationPanel","groupHideOpenParents","groupAllowUnbalanced","pagination","paginationAutoPageSize","suppressScrollOnNewData","suppressScrollWhenPopupsAreOpen","purgeClosedRowNodes","cacheQuickFilter","includeHiddenColumnsInQuickFilter","excludeHiddenColumnsFromQuickFilter","ensureDomOrder","accentedSort","suppressChangeDetection","valueCache","valueCacheNeverExpires","aggregateOnlyChangedColumns","suppressAnimationFrame","suppressExcelExport","suppressCsvExport","includeHiddenColumnsInAdvancedFilter","suppressMultiRangeSelection","enterMovesDown","enterMovesDownAfterEdit","enterNavigatesVerticallyAfterEdit","enterNavigatesVertically","suppressPropertyNamesCheck","rowMultiSelectWithClick","suppressRowHoverHighlight","suppressRowTransform","suppressClipboardPaste","suppressLastEmptyLineOnPaste","enableCharts","enableChartToolPanelsButton","suppressChartToolPanelsButton","suppressMaintainUnsortedOrder","enableCellTextSelection","suppressBrowserResizeObserver","suppressMaxRenderedRowRestriction","excludeChildrenWhenTreeDataFiltering","tooltipMouseTrack","tooltipInteraction","keepDetailRows","paginateChildRows","preventDefaultOnContextMenu","undoRedoCellEditing","allowDragFromColumnsToolPanel","pivotSuppressAutoColumn","suppressExpandablePivotGroups","debounceVerticalScrollbar","detailRowAutoHeight","serverSideFilterAllLevels","serverSideSortAllLevels","serverSideEnableClientSideSort","serverSideOnlyRefreshFilteredGroups","serverSideSortOnServer","serverSideFilterOnServer","suppressAggFilteredOnly","showOpenedGroup","suppressClipboardApi","suppressModelUpdateAfterUpdateTransaction","stopEditingWhenCellsLoseFocus","maintainColumnOrder","groupMaintainOrder","columnHoverHighlight","readOnlyEdit","suppressRowVirtualisation","enableCellEditingOnBackspace","resetRowDataOnUpdate","removePivotHeaderRowWhenSingleValueColumn","suppressCopySingleCellRanges","suppressGroupRowsSticky","suppressCutToClipboard","suppressServerSideInfiniteScroll","rowGroupPanelSuppressSort","allowShowChangeAfterFilter","enableAdvancedFilter","masterDetail","treeData","suppressGroupMaintainValueType","reactiveCustomComponents","applyQuickFilterBeforePivotOrAgg","suppressServerSideFullWidthLoadingRow","suppressAdvancedFilterEval"],ge.OTHER_PROPERTIES=["suppressStickyTotalRow"],ge.FUNCTIONAL_PROPERTIES=["doesExternalFilterPass","processPivotResultColDef","processPivotResultColGroupDef","getBusinessKeyForNode","isRowSelectable","rowDragText","groupRowRenderer","fullWidthCellRenderer","loadingCellRenderer","loadingOverlayComponent","noRowsOverlayComponent","detailCellRenderer","quickFilterParser","quickFilterMatcher"],ge.CALLBACK_PROPERTIES=["getLocaleText","isExternalFilterPresent","getRowHeight","getRowClass","getRowStyle","getContextMenuItems","getMainMenuItems","processRowPostCreate","processCellForClipboard","getGroupRowAgg","isFullWidthRow","
1sendToClipboard","navigateToNextHeader","tabToNextHeader","navigateToNextCell","tabToNextCell","processCellFromClipboard","getDocument","postProcessPopup","getChildCount","getDataPath","isRowMaster","postSortRows","processHeaderForClipboard","processUnpinnedColumns","processGroupHeaderForClipboard","paginationNumberFormatter","processDataFromClipboard","getServerSideGroupKey","isServerSideGroup","createChartContainer","getChartToolbarItems","fillOperation","isApplyServerSideTransaction","getServerSideGroupLevelParams","isServerSideGroupOpenByDefault","isGroupOpenByDefault","initialGroupOrderComparator","groupIncludeFooter","loadingCellRendererSelector","getRowId","groupAggFiltering","chartMenuItems","groupTotalRow"],ge.FUNCTION_PROPERTIES=[...ge.FUNCTIONAL_PROPERTIES,...ge.CALLBACK_PROPERTIES],ge.ALL_PROPERTIES=[...ge.ARRAY_PROPERTIES,...ge.OBJECT_PROPERTIES,...ge.STRING_PROPERTIES,...ge.NUMBER_PROPERTIES,...ge.FUNCTION_PROPERTIES,...ge.BOOLEAN_PROPERTIES,...ge.OTHER_PROPERTIES];var Yi=ge,ve=class Wr{static getCallbackForEvent(t){return!t||t.length<2?t:"on"+t[0].toUpperCase()+t.substring(1);}static getGridOptionKeys(){return this.ALL_PROPERTIES_AND_CALLBACKS;}static combineAttributesAndGridOptions(t,i){"object"!=typeof t&&(t={});const s=M({},t);return Wr.getGridOptionKeys().forEach(r=>{const n=i[r];typeof n<"u"&&n!==Wr.VUE_OMITTED_PROPERTY&&(s[r]=n);}),s;}static processOnChange(t,i,s){if(!t)return;const o={};let r=!1;if(Object.keys(t).filter(l=>Wr.ALL_PROPERTIES_AND_CALLBACKS_SET.has(l)).forEach(l=>{o[l]=t[l],r=!0;}),!r)return;i.__internalUpdateGridOptions(o,!0);const n={type:c.EVENT_COMPONENT_STATE_CHANGED};Se(o,(l,a)=>{n[l]=a;}),i.dispatchEvent(n);}};ve.EVENTS=li(c),ve.VUE_OMITTED_PROPERTY="AG-VUE-OMITTED-PROPERTY",ve.EXCLUDED_INTERNAL_EVENTS=[c.EVENT_SCROLLBAR_WIDTH_CHANGED,c.EVENT_CHECKBOX_CHANGED,c.EVENT_HEIGHT_SCALE_CHANGED,c.EVENT_BODY_HEIGHT_CHANGED,c.EVENT_COLUMN_CONTAINER_WIDTH_CHANGED,c.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,c.EVENT_SCROLL_VISIBILITY_CHANGED,c.EVENT_COLUMN_HOVER_CHANGED,c.EVENT_FLASH_CELLS,c.EVENT_PAGINATION_PIXEL_OFFSET_CHANGED,c.EVENT_DISPLAYED_ROWS_CHANGED,c.EVENT_LEFT_PINNED_WIDTH_CHANGED,c.EVENT_RIGHT_PINNED_WIDTH_CHANGED,c.EVENT_ROW_CONTAINER_HEIGHT_CHANGED,c.EVENT_STORE_UPDATED,c.EVENT_COLUMN_PANEL_ITEM_DRAG_START,c.EVENT_COLUMN_PANEL_ITEM_DRAG_END,c.EVENT_KEY_SHORTCUT_CHANGED_CELL_START,c.EVENT_KEY_SHORTCUT_CHANGED_CELL_END,c.EVENT_FULL_WIDTH_ROW_FOCUSED,c.EVENT_HEADER_HEIGHT_CHANGED,c.EVENT_COLUMN_HEADER_HEIGHT_CHANGED,c.EVENT_CELL_FOCUS_CLEARED,c.EVENT_GRID_STYLES_CHANGED,c.EVENT_FILTER_DESTROYED,c.EVENT_ROW_DATA_UPDATE_STARTED,c.EVENT_ADVANCED_FILTER_ENABLED_CHANGED,c.EVENT_DATA_TYPES_INFERRED,c.EVENT_FIELD_VALUE_CHANGED,c.EVENT_FIELD_PICKER_VALUE_SELECTED,c.EVENT_SUPPRESS_COLUMN_MOVE_CHANGED,c.EVENT_SUPPRESS_MENU_HIDE_CHANGED,c.EVENT_SUPPRESS_FIELD_DOT_NOTATION,c.EVENT_ROW_COUNT_READY,c.EVENT_SIDE_BAR_UPDATED],ve.PUBLIC_EVENTS=ve.EVENTS.filter(e=>!ze(ve.EXCLUDED_INTERNAL_EVENTS,e)),ve.EVENT_CALLBACKS=ve.EVENTS.map(e=>ve.getCallbackForEvent(e)),ve.BOOLEAN_PROPERTIES=Yi.BOOLEAN_PROPERTIES,ve.ALL_PROPERTIES=Yi.ALL_PROPERTIES,ve.ALL_PROPERTIES_AND_CALLBACKS=[...ve.ALL_PROPERTIES,...ve.EVENT_CALLBACKS],ve.ALL_PROPERTIES_AND_CALLBACKS_SET=new Set(ve.ALL_PROPERTIES_AND_CALLBACKS);var cn=ve,Xo=class extends R{constructor(){super(...arguments),this.componentsMappedByName={};}setupComponents(e){e&&e.forEach(t=>this.addComponent(t));}addComponent(e){const i=e.componentName.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase().toUpperCase();this.componentsMappedByName[i]=e.componentClass;}getComponentClass(e){return this.componentsMappedByName[e];}};Xo=d([L("agStackComponentsRegistry")],Xo);var va={};function Xe(e,t,i){null==i||"string"==typeof i&&""==i?pn(e,t):Ze(e,t,i);}function Ze(e,t,i){e.setAttribute(wa(t),i.toString());}function pn(e,t){e.removeAttribute(wa(t));}function wa(e){return`aria-${e}`;}function le(e,t){t?e.setAttribute("role",t):e.removeAttribute("role");}function Sa(e){let t;return t="asc"===e?"ascending":"desc"===e?"descending":"mixed"===e?"other":"none",t;}function jh(e){return parseInt(e.getAttribute("aria-level"),10);}function Ea(e){return parseInt(e.getAttribute("aria-posinset"),10);}function ya(e){return e.getAttribute("aria-label");}function Ke(e,t){Xe(e,"label",t);}function ji(e,t){Xe(e,"labelledby",t);}function qh(e,t){Xe(e,"describedby",t);}function gn(e,t){Xe(e,"live",t);}function Ra(e,t){Xe(e,"atomic",t);}function Da(e,t){Xe(e,"relevant",t);}function ba(e,t){Xe(e,"level",t);}function fn(e,t){Xe(e,"disabled",t);}function Os(e,t){Xe(e,"hidden",t);}function mn(e,t){Xe(e,"activedescendant",t);}function Ft(e,t){Ze(e,"expanded",t);}function Ta(e){pn(e,"expanded");}function Zo(e,t){Ze(e,"setsize",t);}function Jo(e,t){Ze(e,"posinset",t);}function Aa(e,t){Ze(e,"multiselectable",t);}function Fa(e,t){Ze(e,"rowcount",t);}function Cn(e,t){Ze(e,"rowindex",t);}function Pa(e,t){Ze(e,"colcount",t);}function vn(e,t){Ze(e,"colindex",t);}function La(e,t){Ze(e,"colspan",t);}function Ma(e,t){Ze(e,"sort",t);}function Ia(e){pn(e,"sort");}function qi(e,t){Xe(e,"selected",t);}function Qh(e,t){Ze(e,"checked",void 0===t?"mixed":t);}function wn(e,t){Xe(e,"controls",t.id),ji(t,e.id);}function er(e,t){return void 0===t?e("ariaIndeterminate","indeterminate"):!0===t?e("ariaChecked","checked"):e("ariaUnchecked","unchecked");}z(va,{getAriaCheckboxStateName:()=>
1er,getAriaLabel:()=>ya,getAriaLevel:()=>jh,getAriaPosInSet:()=>Ea,getAriaSortState:()=>Sa,removeAriaExpanded:()=>Ta,removeAriaSort:()=>Ia,setAriaActiveDescendant:()=>mn,setAriaAtomic:()=>Ra,setAriaChecked:()=>Qh,setAriaColCount:()=>Pa,setAriaColIndex:()=>vn,setAriaColSpan:()=>La,setAriaControls:()=>wn,setAriaDescribedBy:()=>qh,setAriaDisabled:()=>fn,setAriaExpanded:()=>Ft,setAriaHidden:()=>Os,setAriaLabel:()=>Ke,setAriaLabelledBy:()=>ji,setAriaLevel:()=>ba,setAriaLive:()=>gn,setAriaMultiSelectable:()=>Aa,setAriaPosInSet:()=>Jo,setAriaRelevant:()=>Da,setAriaRole:()=>le,setAriaRowCount:()=>Fa,setAriaRowIndex:()=>Cn,setAriaSelected:()=>qi,setAriaSetSize:()=>Zo,setAriaSort:()=>Ma});var Sn,tr,En,yn,Rn,Dn,bn,Tn,Ga={};function gt(){return void 0===Sn&&(Sn=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)),Sn;}function An(){if(void 0===tr)if(gt()){const e=navigator.userAgent.match(/version\/(\d+)/i);e&&(tr=null!=e[1]?parseFloat(e[1]):0);}else tr=0;return tr;}function ir(){if(void 0===En){const e=window;En=!!e.chrome&&(!!e.chrome.webstore||!!e.chrome.runtime)||/Chrome/.test(navigator.userAgent)&&/Google Inc/.test(navigator.vendor);}return En;}function Fn(){return void 0===yn&&(yn=/(firefox)/i.test(navigator.userAgent)),yn;}function Pn(){return void 0===Rn&&(Rn=/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)),Rn;}function Pt(){return void 0===Dn&&(Dn=/iPad|iPhone|iPod/.test(navigator.platform)||"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1),Dn;}function Ln(){return!gt()||An()>=15;}function sr(e){if(!e)return null;const t=e.tabIndex,i=e.getAttribute("tabIndex");return-1!==t||null!==i&&(""!==i||Fn())?t.toString():null;}function Na(){if(!document.body)return-1;let e=1e6;const t=navigator.userAgent.toLowerCase().match(/firefox/)?6e6:1e9,i=document.createElement("div");for(document.body.appendChild(i);;){const s=2*e;if(i.style.height=s+"px",s>t||i.clientHeight!==s)break;e=s;}return document.body.removeChild(i),e;}function xa(){var e,t,i;return null!=(i=null==(e=document.body)?void 0:e.clientWidth)?i:window.innerHeight||(null==(t=document.documentElement)?void 0:t.clientWidth)||-1;}function Oa(){var e,t,i;return null!=(i=null==(e=document.body)?void 0:e.clientHeight)?i:window.innerHeight||(null==(t=document.documentElement)?void 0:t.clientHeight)||-1;}function _a(){return null==Tn&&Va(),Tn;}function Va(){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 i=t.offsetWidth-t.clientWidth;0===i&&0===t.clientWidth&&(i=null),t.parentNode&&t.parentNode.removeChild(t),null!=i&&(Tn=i,bn=0===i);}function Mn(){return null==bn&&Va(),bn;}z(Ga,{browserSupportsPreventScroll:()=>Ln,getBodyHeight:()=>Oa,getBodyWidth:()=>xa,getMaxDivHeight:()=>Na,getSafariVersion:()=>An,getScrollbarWidth:()=>_a,getTabIndex:()=>sr,isBrowserChrome:()=>ir,isBrowserFirefox:()=>Fn,isBrowserSafari:()=>gt,isIOSUserAgent:()=>Pt,isInvisibleScrollbar:()=>Mn,isMacOsUserAgent:()=>Pn});var Ha={};z(Ha,{dateToFormattedString:()=>Xi,parseDateTimeFromString:()=>Ne,serialiseDate:()=>Je});var ka={};function Qi(e,t){return e.toString().padStart(t,"0");}function Ba(e,t){const i=[];for(let s=e;s<=t;s++)i.push(s);return i;}function Xh(e){return"string"==typeof e&&(e=parseInt(e,10)),"number"==typeof e?Math.floor(e):null;}function Zh(e,t){let i="";for(let s=0;s<t;s++)i+=String.fromCharCode(255&e),e>>>=8;return i;}function Jh(e,t,i){return"number"!=typeof e?"":In(Math.round(100*e)/100,t,i);}function In(e,t,i){return"number"!=typeof e?"":e.toString().replace(".",i).replace(/(\d)(?=(\d{3})+(?!\d))/g,`$1${t}`);}function ec(e){return null==e?null:e.reduce((t,i)=>t+i,0);}function Je(e,t=!0,i="-"){if(!e)return null;let s=[e.getFullYear(),e.getMonth()+1,e.getDate()].map(o=>Qi(o,2)).join(i);return t&&(s+=" "+[e.getHours(),e.getMinutes(),e.getSeconds()].map(o=>Qi(o,2)).join(":")),s;}z(ka,{cleanNumber:()=>Xh,createArrayOfNumbers:()=>Ba,decToHex:()=>Zh,formatNumberCommas:()=>In,formatNumberTwoDecimalPlacesAndCommas:()=>Jh,padStartWidthZeros:()=>Qi,sum:()=>ec});var Gn=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";};function Xi(e,t="YYYY-MM-DD"){const i=Qi(e.getFullYear(),4),s=["January","February","March","April","May","June","July","August","September","October","November","December"],o=["Sunday","Monday","Tuesday","Wednesday","Thursday","Frid
1ay","Saturday"],r={YYYY:()=>i.slice(i.length-4,i.length),YY:()=>i.slice(i.length-2,i.length),Y:()=>`${e.getFullYear()}`,MMMM:()=>s[e.getMonth()],MMM:()=>s[e.getMonth()].slice(0,3),MM:()=>Qi(e.getMonth()+1,2),Mo:()=>`${e.getMonth()+1}${Gn(e.getMonth()+1)}`,M:()=>`${e.getMonth()+1}`,Do:()=>`${e.getDate()}${Gn(e.getDate())}`,DD:()=>Qi(e.getDate(),2),D:()=>`${e.getDate()}`,dddd:()=>o[e.getDay()],ddd:()=>o[e.getDay()].slice(0,3),dd:()=>o[e.getDay()].slice(0,2),do:()=>`${e.getDay()}${Gn(e.getDay())}`,d:()=>`${e.getDay()}`},n=new RegExp(Object.keys(r).join("|"),"g");return t.replace(n,l=>l in r?r[l]():l);}function Ne(e){if(!e)return null;const[t,i]=e.split(" ");if(!t)return null;const s=t.split("-").map(p=>parseInt(p,10));if(3!==s.filter(p=>!isNaN(p)).length)return null;const[o,r,n]=s,l=new Date(o,r-1,n);if(l.getFullYear()!==o||l.getMonth()!==r-1||l.getDate()!==n)return null;if(!i||"00:00:00"===i)return l;const[a,u,h]=i.split(":").map(p=>parseInt(p,10));return a>=0&&a<24&&l.setHours(a),u>=0&&u<60&&l.setMinutes(u),h>=0&&h<60&&l.setSeconds(h),l;}var or,Wa={};function Nn(e,t,i){const s=e.parentElement;let o=s&&s.firstChild;for(;o;)t&&o.classList.toggle(t,o===e),i&&o.classList.toggle(i,o!==e),o=o.nextSibling;}z(Wa,{FOCUSABLE_EXCLUDE:()=>xn,FOCUSABLE_SELECTOR:()=>Ua,addOrRemoveAttribute:()=>ft,addStylesToElement:()=>Wn,bindCellRendererToHtmlElement:()=>zn,clearElement:()=>de,copyNodeList:()=>ja,ensureDomOrder:()=>kn,formatSize:()=>rr,getAbsoluteHeight:()=>_n,getAbsoluteWidth:()=>Vs,getElementRectWithOffset:()=>Vn,getElementSize:()=>Wt,getInnerHeight:()=>_s,getInnerWidth:()=>ci,getScrollLeft:()=>ks,insertWithDomOrder:()=>Ka,isElementChildOfClass:()=>hi,isFocusableFormField:()=>On,isHorizontalScrollShowing:()=>$a,isInDOM:()=>Hn,isNodeOrElement:()=>Us,isRtlNegativeScroll:()=>Hs,isVerticalScrollShowing:()=>Ya,isVisible:()=>xe,iterateNamedNodeMap:()=>qa,loadTemplate:()=>Oe,nodeListForEach:()=>Un,radioCssClass:()=>Nn,removeFromParent:()=>at,setDisabled:()=>Zi,setDisplayed:()=>K,setDomChildOrder:()=>Bn,setElementHeight:()=>tc,setElementWidth:()=>Ws,setFixedHeight:()=>pi,setFixedWidth:()=>et,setScrollLeft:()=>Bs,setVisible:()=>za});var Ua="[tabindex], input, select, button, textarea, [href]",xn="[disabled], .ag-disabled:not(.ag-button), .ag-disabled *";function On(e){const t=Element.prototype.matches||Element.prototype.msMatchesSelector,s=t.call(e,"input, select, button, textarea"),o=t.call(e,xn),r=xe(e);return s&&!o&&r;}function K(e,t,i={}){const{skipAriaHidden:s}=i;e.classList.toggle("ag-hidden",!t),s||Os(e,!t);}function za(e,t,i={}){const{skipAriaHidden:s}=i;e.classList.toggle("ag-invisible",!t),s||Os(e,!t);}function Zi(e,t){const i="disabled",s=t?o=>o.setAttribute(i,""):o=>o.removeAttribute(i);s(e),Un(e.querySelectorAll("input"),o=>s(o));}function hi(e,t,i){let s=0;for(;e;){if(e.classList.contains(t))return!0;if(e=e.parentElement,"number"==typeof i){if(++s>i)break;}else if(e===i)break;}return!1;}function Wt(e){const{height:t,width:i,borderTopWidth:s,borderRightWidth:o,borderBottomWidth:r,borderLeftWidth:n,paddingTop:l,paddingRight:a,paddingBottom:u,paddingLeft:h,marginTop:p,marginRight:f,marginBottom:m,marginLeft:v,boxSizing:w}=window.getComputedStyle(e);return{height:parseFloat(t||"0"),width:parseFloat(i||"0"),borderTopWidth:parseFloat(s||"0"),borderRightWidth:parseFloat(o||"0"),borderBottomWidth:parseFloat(r||"0"),borderLeftWidth:parseFloat(n||"0"),paddingTop:parseFloat(l||"0"),paddingRight:parseFloat(a||"0"),paddingBottom:parseFloat(u||"0"),paddingLeft:parseFloat(h||"0"),marginTop:parseFloat(p||"0"),marginRight:parseFloat(f||"0"),marginBottom:parseFloat(m||"0"),marginLeft:parseFloat(v||"0"),boxSizing:w};}function _s(e){const t=Wt(e);return"border-box"===t.boxSizing?t.height-t.paddingTop-t.paddingBottom:t.height;}function ci(e){const t=Wt(e);return"border-box"===t.boxSizing?t.width-t.paddingLeft-t.paddingRight:t.width;}function _n(e){const t=Wt(e);return Math.ceil(e.offsetHeight+(t.marginBottom+t.marginTop));}function Vs(e){const t=Wt(e);return Math.ceil(e.offsetWidth+(t.marginLeft+t.marginRight));}function Vn(e){const t=e.getBoundingClientRect(),{borderTopWidth:i,borderLeftWidth:s,borderRightWidth:o,borderBottomWidth:r}=Wt(e);
1return{top:t.top+(i||0),left:t.left+(s||0),right:t.right+(o||0),bottom:t.bottom+(r||0)};}function Hs(){if("boolean"==typeof or)return or;const e=document.createElement("div");return e.style.direction="rtl",e.style.width="1px",e.style.height="1px",e.style.position="fixed",e.style.top="0px",e.style.overflow="hidden",e.dir="rtl",e.innerHTML='<div style="width: 2px">\n <span style="display: inline-block; width: 1px"></span>\n <span style="display: inline-block; width: 1px"></span>\n </div>',document.body.appendChild(e),e.scrollLeft=1,or=0===Math.floor(e.scrollLeft),document.body.removeChild(e),or;}function ks(e,t){let i=e.scrollLeft;return t&&(i=Math.abs(i),ir()&&!Hs()&&(i=e.scrollWidth-e.clientWidth-i)),i;}function Bs(e,t,i){i&&(Hs()?t*=-1:(gt()||ir())&&(t=e.scrollWidth-e.clientWidth-t)),e.scrollLeft=t;}function de(e){for(;e&&e.firstChild;)e.removeChild(e.firstChild);}function at(e){e&&e.parentNode&&e.parentNode.removeChild(e);}function Hn(e){return!!e.offsetParent;}function xe(e){return e.checkVisibility?e.checkVisibility({checkVisibilityCSS:!0}):!(!Hn(e)||"visible"!==window.getComputedStyle(e).visibility);}function Oe(e){const t=document.createElement("div");return t.innerHTML=(e||"").trim(),t.firstChild;}function kn(e,t,i){i&&i.nextSibling===t||(i?i.nextSibling?e.insertBefore(t,i.nextSibling):e.appendChild(t):e.firstChild&&e.firstChild!==t&&e.insertAdjacentElement("afterbegin",t));}function Bn(e,t){for(let i=0;i<t.length;i++){const s=t[i],o=e.children[i];o!==s&&e.insertBefore(s,o);}}function Ka(e,t,i){i?i.insertAdjacentElement("afterend",t):e.firstChild?e.insertAdjacentElement("afterbegin",t):e.appendChild(t);}function Wn(e,t){if(t)for(const[i,s]of Object.entries(t)){if(!i||!i.length||null==s)continue;const o=ma(i),r=s.toString(),n=r.replace(/\s*!important/g,"");e.style.setProperty(o,n,n.length!=r.length?"important":void 0);}}function $a(e){return e.clientWidth<e.scrollWidth;}function Ya(e){return e.clientHeight<e.scrollHeight;}function Ws(e,t){"flex"===t?(e.style.removeProperty("width"),e.style.removeProperty("minWidth"),e.style.removeProperty("maxWidth"),e.style.flex="1 1 auto"):et(e,t);}function et(e,t){t=rr(t),e.style.width=t.toString(),e.style.maxWidth=t.toString(),e.style.minWidth=t.toString();}function tc(e,t){"flex"===t?(e.style.removeProperty("height"),e.style.removeProperty("minHeight"),e.style.removeProperty("maxHeight"),e.style.flex="1 1 auto"):pi(e,t);}function pi(e,t){t=rr(t),e.style.height=t.toString(),e.style.maxHeight=t.toString(),e.style.minHeight=t.toString();}function rr(e){return"number"==typeof e?`${e}px`:e;}function Us(e){return e instanceof Node||e instanceof HTMLElement;}function ja(e){if(null==e)return[];const t=[];return Un(e,i=>t.push(i)),t;}function qa(e,t){if(e)for(let i=0;i<e.length;i++){const s=e[i];t(s.name,s.value);}}function ft(e,t,i){null==i?e.removeAttribute(t):e.setAttribute(t,i.toString());}function Un(e,t){if(null!=e)for(let i=0;i<e.length;i++)t(e[i]);}function zn(e,t){e.then(i=>{const s=i.getGui();null!=s&&("object"==typeof s?t.appendChild(s):t.innerHTML=s);});}var Qa={};function Xa(e,t,i){const s={},o=e.filter(r=>!t.some(n=>n===r));return o.length>0&&o.forEach(r=>s[r]=zs(r,i).values),s;}function zs(e,t,i,s){let o=t.map((l,a)=>({value:l,relevance:ic(e.toLowerCase(),l.toLocaleLowerCase()),idx:a}));if(o.sort((l,a)=>a.relevance-l.relevance),i&&(o=o.filter(l=>0!==l.relevance)),o.length>0&&s&&s>0){const a=o[0].relevance*s;o=o.filter(u=>a-u.relevance<0);}const r=[],n=[];for(const l of o)r.push(l.value),n.push(l.idx);return{values:r,indices:n};}function ic(e,t){const i=e.replace(/\s/g,""),s=t.replace(/\s/g,"");let o=0,r=-1;for(let n=0;n<i.length;n++){const l=s.indexOf(i[n],r+1);-1!==l&&(r=l,o+=100-100*r/1e4*100);}return o;}z(Qa,{fuzzyCheckStrings:()=>Xa,fuzzySuggestions:()=>zs});var Za={};z(Za,{createIcon:()=>tt,createIconNoSpan:()=>re,iconNameClassMap:()=>Ja});var Ja={columnGroupOpened:"expanded",columnGroupClosed:"contracted",columnSelectClosed:"tree-closed",columnSelectOpen:"tree-open",columnSelectIndeterminate:"tree-indeterminate",columnMovePin:"pin",columnMoveHide:"eye-slash",columnMoveMove:"arrows",columnMoveLeft:"left",columnMoveRight:"right",columnMoveGroup:"group",columnMoveValue:"aggregation",columnMovePivot:"pivot",dropNotAllowed:"not-allowed",groupContracted:"tree-closed",groupExpanded:"tree-open",setFilterGroupClosed:"tree-closed",setFilterGroupOpen:"tree-open",setFilterGroupIndeterminate:"tree-indeterminate",chart:"chart",close:"cross",cancel:"cancel",check:"tick",first:"first",previous:"previous",next:"next",last:"last",linked:"linked",unlinked:"unlinked",colorPicker:"color-picker",groupLoading:"loading",menu:"menu",menuAlt:"menu-alt",filter:"filter",columns:"columns",maximize:"maximize",minimize:"minimize",menuPin:"pin",menuValue:"aggregation",menuAddRowGroup:"group",menuRemoveRowGroup:"group",clipboardCopy:"copy",clipboardCut:"cut",clipboardPaste:"paste",pivotPanel:"pivot",rowGroupPanel:"group",valuePanel:"aggregation",columnDrag:"grip",rowDrag:"grip",save:"save",csvExport:"csv",excelExport:"excel",smallDown:"small-down",smallLeft:"small-left",smallRight:"small-right",smallUp:"small-up",sortAscending:"asc",sortDescending:"desc",sortUnSort:"none",advancedFilterBuilder:"group",advancedFilterBuilderDrag:"grip",advancedFilterBuilderInvalid:"not-allowed",advancedFilterBuilderMoveUp:"up",advancedFilterBuilderMoveDown:"down",advancedFilterBuilderAdd:"plus",advancedFilterBuilderRemove:"minus",chartsMenuEdit:"chart",chartsMenuAdvancedSettings:"settings",chartsMenuAdd:"plus"};function tt(e,t,i){const s=re(e,t,i);if(s){const{className:r}=s;if("string"==typeof r&&r.indexOf("ag-icon")>-1||"object"==typeof r&&r["ag-icon"])return s;}const o=document.createElement("span");return o.appendChild(s),o;}function re(e,t,i,s){let o=null;const r=i&&i.getColDef().icons;
1if(r&&(o=r[e]),t&&!o){const n=t.get("icons");n&&(o=n[e]);}if(!o){const n=document.createElement("span");let l=Ja[e];return l||(s?l=e:(console.warn(`AG Grid: Did not find icon ${e}`),l="")),n.setAttribute("class",`ag-icon ag-icon-${l}`),n.setAttribute("unselectable","on"),le(n,"presentation"),n;}{let n;if("function"==typeof o)n=o();else{if("string"!=typeof o)throw new Error("icon from grid options needs to be a string or a function");n=o;}if("string"==typeof n)return Oe(n);if(Us(n))return n;console.warn("AG Grid: iconRenderer should return back a string or a dom object");}}var ed={};z(ed,{isDeleteKey:()=>sd,isEventFromPrintableCharacter:()=>nr,isUserSuppressingHeaderKeyboardEvent:()=>td,isUserSuppressingKeyboardEvent:()=>lr,normaliseQwertyAzerty:()=>id});var C=class{};C.BACKSPACE="Backspace",C.TAB="Tab",C.ENTER="Enter",C.ESCAPE="Escape",C.SPACE=" ",C.LEFT="ArrowLeft",C.UP="ArrowUp",C.RIGHT="ArrowRight",C.DOWN="ArrowDown",C.DELETE="Delete",C.F2="F2",C.PAGE_UP="PageUp",C.PAGE_DOWN="PageDown",C.PAGE_HOME="Home",C.PAGE_END="End",C.A="KeyA",C.C="KeyC",C.D="KeyD",C.V="KeyV",C.X="KeyX",C.Y="KeyY",C.Z="KeyZ";var sc=65,oc=67,rc=86,nc=68,lc=90,ac=89;function nr(e){return!(e.altKey||e.ctrlKey||e.metaKey)&&1===e.key.length;}function lr(e,t,i,s,o){const r=s?s.getColDef().suppressKeyboardEvent:void 0;if(!r)return!1;const n=e.addGridCommonParams({event:t,editing:o,column:s,node:i,data:i.data,colDef:s.getColDef()});return!(!r||!r(n));}function td(e,t,i,s){const o=s.getDefinition(),r=o&&o.suppressHeaderKeyboardEvent;return!!y(r)&&!!r(e.addGridCommonParams({colDef:o,column:s,headerRowIndex:i,event:t}));}function id(e){const{keyCode:t}=e;let i;switch(t){case sc:i=C.A;break;case oc:i=C.C;break;case rc:i=C.V;break;case nc:i=C.D;break;case lc:i=C.Z;break;case ac:i=C.Y;break;default:i=e.code;}return i;}function sd(e,t=!1){return e===C.DELETE||!t&&e===C.BACKSPACE&&Pn();}var od={};function Kn(e,t,i){if(0===i)return!1;const s=Math.abs(e.clientX-t.clientX),o=Math.abs(e.clientY-t.clientY);return Math.max(s,o)<=i;}z(od,{areEventsNear:()=>Kn});var rd={};function dc(e,t){if(!e)return!1;const i=(n,l)=>{const a=t[n.id],u=t[l.id],h=void 0!==a,p=void 0!==u;return h&&p?a-u:h||p?h?1:-1:n.__objectId-l.__objectId;};let s,o,r=!1;for(let n=0;n<e.length-1;n++)if(s=e[n],o=e[n+1],i(s,o)>0){r=!0;break;}return!!r&&(e.sort(i),!0);}z(rd,{sortRowNodesByOrder:()=>dc});var nd={};function $n(e){const t=new Set();return e.forEach(i=>t.add(i)),t;}z(nd,{convertToSet:()=>$n});var B=M(M(M(M(M(M(M(M(M(M(M(M(M(M(M(M(M(M({},va),oa),Ga),Ha),Wa),sa),Ql),Qa),bt),Za),ed),Ca),od),ka),jl),rd),nd),ga),gi=class{constructor(e=0,t=1){this.nextValue=e,this.step=t;}next(){const e=this.nextValue;return this.nextValue+=this.step,e;}peek(){return this.nextValue;}skip(e){this.nextValue+=e;}},ld=(e=>(e[e.IN_PROGRESS=0]="IN_PROGRESS",e[e.RESOLVED=1]="RESOLVED",e))(ld||{}),$e=class Ur{constructor(t){this.status=0,this.resolution=null,this.waiters=[],t(i=>this.onDone(i),i=>this.onReject(i));}static all(t){return new Ur(i=>{let s=t.length;const o=new Array(s);t.forEach((r,n)=>{r.then(l=>{o[n]=l,s--,0===s&&i(o);});});});}static resolve(t=null){return new Ur(i=>i(t));}then(t){return new Ur(i=>{1===this.status?i(t(this.resolution)):this.waiters.push(s=>i(t(s)));});}resolveNow(t,i){return 1===this.status?i(this.resolution):t;}onDone(t){this.status=1,this.resolution=t,this.waiters.forEach(i=>i(t));}onReject(t){console.warn("TBI");}},hc=class{constructor(){this.timestamp=new Date().getTime();}print(e){console.info(`${e} = ${new Date().getTime()-this.timestamp}`),this.timestamp=new Date().getTime();}},ad=class{constructor(e){this.cssClassStates={},this.getGui=e;}addCssClass(e){const t=(e||"").split(" ");if(t.length>1)t.forEach(s=>this.addCssClass(s));else if(!0!==this.cssClassStates[e]&&e.length){const s=this.getGui();s&&s.classList.add(e),this.cssClassStates[e]=!0;}}removeCssClass(e){const t=(e||"").split(" ");if(t.length>1)t.forEach(s=>this.removeCssClass(s));else if(!1!==this.cssClassStates[e]&&e.length){const s=this.getGui();s&&s.classList.remove(e),this.cssClassStates[e]=!1;}}containsCssClass(e){const t=this.getGui();return!!t&&t.classList.contains(e);}addOrRemoveCssClass(e,t){if(e){if(e.indexOf(" ")>=0){const s=(e||"").split(" ");if(s.length>
11)return void s.forEach(o=>this.addOrRemoveCssClass(o,t));}if(this.cssClassStates[e]!==t&&e.length){const s=this.getGui();s&&s.classList.toggle(e,t),this.cssClassStates[e]=t;}}}},Ks=class ki extends R{constructor(t,i,s,o){super(),this.parentComp=t,this.tooltipShowDelayOverride=i,this.tooltipHideDelayOverride=s,this.shouldDisplayTooltip=o,this.SHOW_QUICK_TOOLTIP_DIFF=1e3,this.FADE_OUT_TOOLTIP_TIMEOUT=1e3,this.INTERACTIVE_HIDE_DELAY=100,this.interactionEnabled=!1,this.isInteractingWithTooltip=!1,this.state=0,this.tooltipInstanceCount=0,this.tooltipMouseTrack=!1;}postConstruct(){this.gos.get("tooltipInteraction")&&(this.interactionEnabled=!0),this.tooltipTrigger=this.getTooltipTrigger(),this.tooltipMouseTrack=this.gos.get("tooltipMouseTrack");const t=this.parentComp.getGui();0===this.tooltipTrigger&&(this.addManagedListener(t,"mouseenter",this.onMouseEnter.bind(this)),this.addManagedListener(t,"mouseleave",this.onMouseLeave.bind(this))),1===this.tooltipTrigger&&(this.addManagedListener(t,"focusin",this.onFocusIn.bind(this)),this.addManagedListener(t,"focusout",this.onFocusOut.bind(this))),this.addManagedListener(t,"mousemove",this.onMouseMove.bind(this)),this.interactionEnabled||(this.addManagedListener(t,"mousedown",this.onMouseDown.bind(this)),this.addManagedListener(t,"keydown",this.onKeyDown.bind(this)));}getGridOptionsTooltipDelay(t){const i=this.gos.get(t);return i<0&&O(`${t} should not be lower than 0`),Math.max(200,i);}getTooltipDelay(t){var i,s;return"show"===t?null!=(i=this.tooltipShowDelayOverride)?i:this.getGridOptionsTooltipDelay("tooltipShowDelay"):null!=(s=this.tooltipHideDelayOverride)?s:this.getGridOptionsTooltipDelay("tooltipHideDelay");}destroy(){this.setToDoNothing(),super.destroy();}getTooltipTrigger(){const t=this.gos.get("tooltipTrigger");return t&&"hover"!==t?1:0;}onMouseEnter(t){this.interactionEnabled&&this.interactiveTooltipTimeoutId&&(this.unlockService(),this.startHideTimeout()),!Pt()&&(ki.isLocked?this.showTooltipTimeoutId=window.setTimeout(()=>{this.prepareToShowTooltip(t);},this.INTERACTIVE_HIDE_DELAY):this.prepareToShowTooltip(t));}onMouseMove(t){this.lastMouseEvent&&(this.lastMouseEvent=t),this.tooltipMouseTrack&&2===this.state&&this.tooltipComp&&this.positionTooltip();}onMouseDown(){this.setToDoNothing();}onMouseLeave(){this.interactionEnabled?this.lockService():this.setToDoNothing();}onFocusIn(){this.prepareToShowTooltip();}onFocusOut(t){var i;const s=t.relatedTarget,o=this.parentComp.getGui(),r=null==(i=this.tooltipComp)?void 0:i.getGui();this.isInteractingWithTooltip||o.contains(s)||this.interactionEnabled&&r?.contains(s)||this.setToDoNothing();}onKeyDown(){this.setToDoNothing();}prepareToShowTooltip(t){if(0!=this.state||ki.isLocked)return;let i=0;t&&(i=this.isLastTooltipHiddenRecently()?200:this.getTooltipDelay("show")),this.lastMouseEvent=t||null,this.showTooltipTimeoutId=window.setTimeout(this.showTooltip.bind(this),i),this.state=1;}isLastTooltipHiddenRecently(){return new Date().getTime()-ki.lastTooltipHideTime<this.SHOW_QUICK_TOOLTIP_DIFF;}setToDoNothing(){2===this.state&&this.hideTooltip(),this.onBodyScrollEventCallback&&(this.onBodyScrollEventCallback(),this.onBodyScrollEventCallback=void 0),this.onColumnMovedEventCallback&&(this.onColumnMovedEventCallback(),this.onColumnMovedEventCallback=void 0),this.clearTimeouts(),this.state=0,this.lastMouseEvent=null;}showTooltip(){const t=M({},this.parentComp.getTooltipParams());if(!y(t.value)||this.shouldDisplayTooltip&&!this.shouldDisplayTooltip())return void this.setToDoNothing();this.state=2,this.tooltipInstanceCount++;const i=this.newTooltipComponentCallback.bind(this,this.tooltipInstanceCount);this.userComponentFactory.getTooltipCompDetails(t).newAgStackInstance().then(i);}hideTooltip(t){if(!t&&this.isInteractingWithTooltip)return;this.tooltipComp&&(this.destroyTooltipComp(),ki.lastTooltipHideTime=new Date().getTime());const i={type:c.EVENT_TOOLTIP_HIDE,parentGui:this.parentComp.getGui()};this.eventService.dispatchEvent(i),this.state=0;}newTooltipComponentCallback(t,i){if(2!==this.state||this.tooltipInstanceCount!==t)return void this.getContext().destroyBean(i);const o=i.getGui();this.tooltipComp=i,o.classList.contains("ag-tooltip")||o.classList.add("ag-tooltip-custom"),0===this.tooltipTrigger&&o.classList.add("ag-tooltip-animate"),this.interactionEnabled&&o.classList.add("ag-tooltip-interactive");const r=this.localeService.getLocaleTextFunc(),n=this.popupService.addPopup({eChild:o,ariaLabel:r("ariaLabelTooltip","Tooltip")});n&&(this.tooltipPopupDestroyFunc=n.hideFunc),this.positionTooltip(),1===this.tooltipTrigger&&(this.onBodyScrollEventCallback=this.addManagedListener(this.eventService,c.EVENT_BODY_SCROLL,this.setToDoNothing.bind(this)),this.onColumnMovedEventCallback=this.addManagedListener(this.eventService,c.EVENT_COLUMN_MOVED,this.setToDoNothing.bind(this))),this.interactionEnabled&&(0===this.tooltipTrigger?(this.tooltipMouseEnterListener=this.addManagedListener(o,"mouseenter",this.onTooltipMouseEnter.bind(this))||null,this.tooltipMouseLeaveListener=this.addManagedListener(o,"mouseleave",this.onTooltipMouseLeave.bind(this))||null):(this.tooltipFocusInListener=this.addManagedListener(o,"focusin",this.onTooltipFocusIn.bind(this))||null,this.tooltipFocusOutListener=this.addManagedListener(o,"focusout",this.onTooltipFocusOut.bind(this))||null));const l={type:c.EVENT_TOOLTIP_SHOW,tooltipGui:o,parentGui:this.parentComp.getGui()};this.eventService.dispatchEvent(l),this.startHideTimeout();}onTooltipMouseEnter(){this.isInteractingWithTooltip=!0,this.unlockService();}onTooltipMouseLeave(){this.isInteractingWithTooltip=!1,this.lockService();}onTooltipFocusIn(){this.isInteractingWithTooltip=!0;}onTooltipFocusOut(t){var i;const s=this.parentComp.getGui(),o=null==(i=this.tooltipComp)?void 0:i.getGui(),r=t.relatedTarget;o?.contains(r)||(this.isInteractingWithTooltip=!1,s.contains(r)?this.startHideTimeout():this.hideTooltip());}positionTooltip(){const t={type:"tooltip",ePopup:this.tooltipComp.getGui(),nudgeY:18,skipObserver:this.tooltipMouseTrack};this.lastMouseEvent?this.popupService.positionPopupUnderMouseEvent(x(M({},t),{mouseEvent:this.lastMouseEvent})):this.popupService.positionPopupByComponent(x(M({},t),{eventSource:this.parentComp.getGui(),position:"under",keepWithinBounds:!0,nudgeY:5}));}destroyTooltipComp(){this.tooltipComp.getGui().classList.add("ag-tooltip-hiding");const t=this.tooltipPopupDestroyFunc,i=this.tooltipComp;window.setTimeout(()=>{t(),this.getContext().destroyBean(i);},0===this.tooltipTrigger?this.FADE_OUT_TOOLTIP_TIMEOUT:0),this.clearTooltipListeners(),this.tooltipPopupDestroyFunc=void 0,this.tooltipComp=void 0;}clearTooltipListeners(){[this.tooltipMouseEnterListener,this.tooltipMouseLeaveListener,this.tooltipFocusInListener,this.tooltipFocusOutListener].forEach(t=>{t&&t();}),this.tooltipMouseEnterListener=this.tooltipMouseLeaveListener=this.tooltipFocusInListener=this.tooltipFocusOutListener=null;}lockService(){ki.isLocked=!0,this.interactiveTooltipTimeoutId=window.setTimeout(()=>{this.unlockService(),this.setToDoNothing();},this.INTERACTIVE_HIDE_DELAY);}unlockService(){ki.isLocked=!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();}};Ks.isLocked=!1,d([g("popupService")],Ks.prototype,"popupService",2),d([g("userComponentFactory")],Ks.prototype,"userComponentFactory",2),d([T],Ks.prototype,"postConstruct",1);var dd=Ks,mt=class extends R{constructor(e,t){super(),this.ctrl=e,t&&(this.beans=t);}postConstruct(){this.refreshToolTip();}setBrowserTooltip(e){const t="title",i=this.ctrl.getGui();i&&(null!=e&&""!=e?i.setAttribute(t,e):i.removeAttribute(t));}updateTooltipText(){this.tooltip=this.ctrl.getTooltipValue();}createTooltipFeatureIfNeeded(){var e,t,i,s;null==this.tooltipManager&&(this.tooltipManager=this.createBean(new dd({getTooltipParams:()=>this.getTooltipParams(),getGui:()=>this.ctrl.getGui()},null==(t=(e=this.ctrl).getTooltipShowDelayOverride)?void 0:t.call(e),null==(s=(i=this.ctrl).getTooltipHideDelayOverride)?void 0:s.call(i),this.ctrl.
1shouldDisplayTooltip),this.beans.context));}refreshToolTip(){this.browserTooltips=this.beans.gos.get("enableBrowserTooltips"),this.updateTooltipText(),this.browserTooltips?(this.setBrowserTooltip(this.tooltip),this.tooltipManager&&(this.tooltipManager=this.destroyBean(this.tooltipManager,this.beans.context))):(this.setBrowserTooltip(null),this.createTooltipFeatureIfNeeded());}getTooltipParams(){const e=this.ctrl,t=e.getColumn?e.getColumn():void 0,i=e.getColDef?e.getColDef():void 0,s=e.getRowNode?e.getRowNode():void 0;return{location:e.getLocation(),colDef:i,column:t,rowIndex:e.getRowIndex?e.getRowIndex():void 0,node:s,data:s?s.data:void 0,value:this.getTooltipText(),valueFormatted:e.getValueFormatted?e.getValueFormatted():void 0,hideTooltipCallback:()=>{var o;return null==(o=this.tooltipManager)?void 0:o.hideTooltip(!0);}};}getTooltipText(){return this.tooltip;}destroy(){this.tooltipManager&&(this.tooltipManager=this.destroyBean(this.tooltipManager,this.beans.context)),super.destroy();}};d([g("beans")],mt.prototype,"beans",2),d([T],mt.prototype,"postConstruct",1);var cc=new gi(),$s=class Wl extends R{constructor(t){super(),this.displayed=!0,this.visible=!0,this.compId=cc.next(),this.cssClassManager=new ad(()=>this.eGui),t&&this.setTemplate(t);}preConstructOnComponent(){this.usingBrowserTooltips=this.gos.get("enableBrowserTooltips");}getCompId(){return this.compId;}getTooltipParams(){return{value:this.tooltipText,location:"UNKNOWN"};}setTooltip(t){const{newTooltipText:i,showDelayOverride:s,hideDelayOverride:o,location:r,shouldDisplayTooltip:n}=t||{};this.tooltipFeature&&(this.tooltipFeature=this.destroyBean(this.tooltipFeature)),this.tooltipText!==i&&(this.tooltipText=i),null!=i&&(this.tooltipFeature=this.createBean(new mt({getTooltipValue:()=>this.tooltipText,getGui:()=>this.getGui(),getLocation:()=>r??"UNKNOWN",getColDef:t?.getColDef,getColumn:t?.getColumn,getTooltipShowDelayOverride:null!=s?()=>s:void 0,getTooltipHideDelayOverride:null!=o?()=>o:void 0,shouldDisplayTooltip:n})));}createChildComponentsFromTags(t,i){ja(t.childNodes).forEach(o=>{if(!(o instanceof HTMLElement))return;const r=this.createComponentFromElement(o,n=>{n.getGui()&&this.copyAttributesFromNode(o,n.getGui());},i);if(r){if(r.addItems&&o.children.length){this.createChildComponentsFromTags(o,i);const n=Array.prototype.slice.call(o.children);r.addItems(n);}this.swapComponentForNode(r,t,o);}else o.childNodes&&this.createChildComponentsFromTags(o,i);});}createComponentFromElement(t,i,s){const o=t.nodeName,r=s?s[t.getAttribute("ref")]:void 0,n=this.agStackComponentsRegistry.getComponentClass(o);if(n){Wl.elementGettingCreated=t;const l=new n(r);return l.setParentComponent(this),this.createBean(l,null,i),l;}return null;}copyAttributesFromNode(t,i){qa(t.attributes,(s,o)=>i.setAttribute(s,o));}swapComponentForNode(t,i,s){const o=t.getGui();i.replaceChild(o,s),i.insertBefore(document.createComment(s.nodeName),o),this.addDestroyFunc(this.destroyBean.bind(this,t)),this.swapInComponentForQuerySelectors(t,s);}swapInComponentForQuerySelectors(t,i){const s=this;this.iterateOverQuerySelectors(o=>{s[o.attributeName]===i&&(s[o.attributeName]=t);});}iterateOverQuerySelectors(t){let i=Object.getPrototypeOf(this);for(;null!=i;){const s=i.__agComponentMetaData,o=Uo(i.constructor);s&&s[o]&&s[o].querySelectors&&s[o].querySelectors.forEach(r=>t(r)),i=Object.getPrototypeOf(i);}}activateTabIndex(t){const i=this.gos.get("tabIndex");t||(t=[]),t.length||t.push(this.getGui()),t.forEach(s=>s.setAttribute("tabindex",i.toString()));}setTemplate(t,i){const s=Oe(t);this.setTemplateFromElement(s,i);}setTemplateFromElement(t,i){this.eGui=t,this.eGui.__agComponent=this,this.wireQuerySelectors(),this.getContext()&&this.createChildComponentsFromTags(this.getGui(),i);}createChildComponentsPreConstruct(){this.getGui()&&this.createChildComponentsFromTags(this.getGui());}wireQuerySelectors(){if(!this.eGui)return;const t=this;this.iterateOverQuerySelectors(i=>{const s=r=>t[i.attributeName]=r;if(i.refSelector&&this.getAttribute("ref")===i.refSelector)s(this.eGui);else{const r=this.eGui.querySelector(i.querySelector);r&&s(r.__agComponent||r);}});}getGui(){return this.eGui;}getFocusableElement(){return this.eGui;}getAriaElement(){return this.getFocusableElement();}setParentComponent(t){this.parentComponent=t;}getParentComponent(){return this.parentComponent;}setGui(t){this.eGui=t;}queryForHtmlElement(t){return this.eGui.querySelector(t);}queryForHtmlInputElement(t){return this.eGui.querySelector(t);}appendChild(t,i){null!=t&&(i||(i=this.eGui),Us(t)?i.appendChild(t):i.appendChild(t.getGui()));}isDisplayed(){return this.displayed;}setVisible(t,i={}){if(t!==this.visible){this.visible=t;const{skipAriaHidden:s}=i;za(this.eGui,t,{skipAriaHidden:s});}}setDisplayed(t,i={}){if(t!==this.displayed){this.displayed=t;const{skipAriaHidden:s}=i;K(this.eGui,t,{skipAriaHidden:s}),this.dispatchEvent({type:Wl.EVENT_DISPLAYED_CHANGED,visible:this.displayed});}}destroy(){this.parentComponent&&(this.parentComponent=void 0),this.tooltipFeature&&(this.tooltipFeature=this.destroyBean(this.tooltipFeature));const t=this.eGui;t&&t.__agComponent&&(t.__agComponent=void 0),super.destroy();}addGuiEventListener(t,i,s){this.eGui.addEventListener(t,i,s),this.addDestroyFunc(()=>this.eGui.removeEventListener(t,i));}addCssClass(t){this.cssClassManager.addCssClass(t);}removeCssClass(t){this.cssClassManager.removeCssClass(t);}containsCssClass(t){return this.cssClassManager.containsCssClass(t);}addOrRemoveCssClass(t,i){this.cssClassManager.addOrRemoveCssClass(t,i);}getAttribute(t){const{eGui:i}=this;return i?i.getAttribute(t):null;}getRefElement(t){return this.queryForHtmlElement(`[ref="${t}"]`);}};$s.EVENT_DISPLAYED_CHANGED="displayedChanged",d([g("agStackComponentsRegistry")],$s.prototype,"agStackComponentsRegistry",2),d([sn],$s.prototype,"preConstructOnComponent",1),d([sn],$s.prototype,"createChildComponentsPreConstruct",1);var V=$s;function pc(e){return ud.bind(this,e,void 0);}function A(e){return ud.bind(this,`[ref=${e}]`,e);}function ud(e,t,i,s,o){null!==e?"number"!=typeof o?function gc(e,t,i){const s=function fc(e,t){return e.__agComponentMetaData||(e.__agComponentMetaData={}),e.__agComponentMetaData[t]||(e.__agComponentMetaData[t]={}),e.__agComponentMetaData[t];}(e,Uo(e.constructor));s[t]||(s[t]=[]),s[t].push(i);}(i,"querySelectors",{attributeName:s,querySelector:e,refSelector:t}):console.error("AG Grid: QuerySelector should be on an attribute"):console.error("AG Grid: QuerySelector selector should not be null");}var Yn=class extends V{constructor(){super('\n <div class="ag-floating-filter-input" role="presentation">\n <ag-input-text-field ref="eFloatingFilterText"></ag-input-text-field>\n </div>');}destroy(){super.destroy();}init(e){this.params=e;const t=this.columnModel.getDisplayNameForColumn(e.column,"header",!0),i=this.localeService.getLocaleTextFunc();this.eFloatingFilterText.setDisabled(!0).setInputAriaLabel(`${t} ${i("ariaFilterInput","Filter Input")}`);}onParentModelChanged(e){null!=e?this.params.parentFilterInstance(t=>{if(t.getModelAsString){const i=t.getModelAsString(e);this.eFloatingFilterText.setValue(i);}}):this.eFloatingFilterText.setValue("");}onParamsUpdated(e){this.refresh(e);}refresh(e){this.init(e);}};d([A("eFloatingFilterText")],Yn.prototype,"eFloatingFilterText",2),d([g("columnModel")],Yn.prototype,"columnModel",2);var hd=class{constructor(e,t,i,s,o){this.alive=!0,this.context=e,this.eParent=s,t.getDateCompDetail
1s(i).newAgStackInstance().then(l=>{this.alive?(this.dateComp=l,l&&(s.appendChild(l.getGui()),l.afterGuiAttached&&l.afterGuiAttached(),this.tempValue&&l.setDate(this.tempValue),null!=this.disabled&&this.setDateCompDisabled(this.disabled),o?.(this))):e.destroyBean(l);});}destroy(){this.alive=!1,this.dateComp=this.context.destroyBean(this.dateComp);}getDate(){return this.dateComp?this.dateComp.getDate():this.tempValue;}setDate(e){this.dateComp?this.dateComp.setDate(e):this.tempValue=e;}setDisabled(e){this.dateComp?this.setDateCompDisabled(e):this.disabled=e;}setDisplayed(e){K(this.eParent,e);}setInputPlaceholder(e){this.dateComp&&this.dateComp.setInputPlaceholder&&this.dateComp.setInputPlaceholder(e);}setInputAriaLabel(e){this.dateComp&&this.dateComp.setInputAriaLabel&&this.dateComp.setInputAriaLabel(e);}afterGuiAttached(e){this.dateComp&&"function"==typeof this.dateComp.afterGuiAttached&&this.dateComp.afterGuiAttached(e);}updateParams(e){var t,i;let s=!1;null!=(t=this.dateComp)&&t.refresh&&"function"==typeof this.dateComp.refresh&&null!==this.dateComp.refresh(e)&&(s=!0),!s&&null!=(i=this.dateComp)&&i.onParamsUpdated&&"function"==typeof this.dateComp.onParamsUpdated&&null!==this.dateComp.onParamsUpdated(e)&&O("Custom date component method 'onParamsUpdated' is deprecated. Use 'refresh' instead.");}setDateCompDisabled(e){null!=this.dateComp&&null!=this.dateComp.setDisabled&&this.dateComp.setDisabled(e);}},cd=class{constructor(){this.customFilterOptions={};}init(e,t){this.filterOptions=e.filterOptions||t,this.mapCustomOptions(),this.selectDefaultItem(e);}getFilterOptions(){return this.filterOptions;}mapCustomOptions(){this.filterOptions&&this.filterOptions.forEach(e=>{"string"!=typeof e&&([["displayKey"],["displayName"],["predicate","test"]].every(s=>!!s.some(o=>null!=e[o])||(console.warn(`AG Grid: ignoring FilterOptionDef as it doesn't contain one of '${s}'`),!1))?this.customFilterOptions[e.displayKey]=e:this.filterOptions=this.filterOptions.filter(s=>s===e)||[]);});}selectDefaultItem(e){if(e.defaultOption)this.defaultOption=e.defaultOption;else if(this.filterOptions.length>=1){const t=this.filterOptions[0];"string"==typeof t?this.defaultOption=t:t.displayKey?this.defaultOption=t.displayKey:console.warn("AG Grid: invalid FilterOptionDef supplied as it doesn't contain a 'displayKey'");}else console.warn("AG Grid: no filter options for filter");}getDefaultOption(){return this.defaultOption;}getCustomOption(e){return this.customFilterOptions[e];}},pd={applyFilter:"Apply",clearFilter:"Clear",resetFilter:"Reset",cancelFilter:"Cancel",textFilter:"Text Filter",numberFilter:"Number 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"},ar=class Zu extends R{constructor(t,i={}){super(),this.eFocusableElement=t,this.callbacks=i,this.callbacks=M({shouldStopEventPropagation:()=>!1,onTabKeyDown:s=>{if(s.defaultPrevented)return;const o=this.focusService.findNextFocusableElement(this.eFocusableElement,!1,s.shiftKey);o&&(o.focus(),s.preventDefault());}},i);}postConstruct(){this.eFocusableElement.classList.add(Zu.FOCUS_MANAGED_CLASS),this.addKeyDownListeners(this.eFocusableElement),this.callbacks.onFocusIn&&this.addManagedListener(this.eFocusableElement,"focusin",this.callbacks.onFocusIn),this.callbacks.onFocusOut&&this.addManagedListener(this.eFocusableElement,"focusout",this.callbacks.onFocusOut);}addKeyDownListeners(t){this.addManagedListener(t,"keydown",i=>{if(!i.defaultPrevented&&!lt(i)){if(this.callbacks.shouldStopEventPropagation(i))return void nt(i);i.key===C.TAB?this.callbacks.onTabKeyDown(i):this.callbacks.handleKeyDown&&this.callbacks.handleKeyDown(i);}});}};ar.FOCUS_MANAGED_CLASS="ag-focus-managed",d([g("focusService")],ar.prototype,"focusService",2),d([T],ar.prototype,"postConstruct",1);var Lt=ar,gd="ag-resizer-wrapper",mc=`<div class="${gd}">\n <div ref="eTopLeftResizer" class="ag-resizer ag-resizer-topLeft"></div>\n <div ref="eTopResizer" class="ag-resizer ag-resizer-top"></div>\n <div ref="eTopRightResizer" class="ag-resizer ag-resizer-topRight"></div>\n <div ref="eRightResizer" class="ag-resizer ag-resizer-right"></div>\n <div ref="eBottomRightResizer" class="ag-resizer ag-resizer-bottomRight"></div>\n <div ref="eBottomResizer" class="ag-resizer ag-resizer-bottom"></div>\n <div ref="eBottomLeftResizer" class="ag-resizer ag-resizer-bottomLeft"></div>\n <div ref="eLeftResizer" class="ag-resizer ag-resizer-left"></div>\n </div>`,fi=class extends R{constructor(e,t){super(),this.element=e,this.dragStartPosition={x:0,y:0},this.position={x:0,y:0}
1,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=Object.assign({},{popup:!1},t);}center(){const{clientHeight:e,clientWidth:t}=this.offsetParent,i=t/2-this.getWidth()/2,s=e/2-this.getHeight()/2;this.offsetElement(i,s);}initialisePosition(){if(this.positioned)return;const{centered:e,forcePopupParentAsOffsetParent:t,minWidth:i,width:s,minHeight:o,height:r,x:n,y:l}=this.config;this.offsetParent||this.setOffsetParent();let a=0,u=0;const h=xe(this.element);if(h){const p=this.findBoundaryElement(),f=window.getComputedStyle(p);if(null!=f.minWidth){const m=p.offsetWidth-this.element.offsetWidth;u=parseInt(f.minWidth,10)-m;}if(null!=f.minHeight){const m=p.offsetHeight-this.element.offsetHeight;a=parseInt(f.minHeight,10)-m;}}if(this.minHeight=o||a,this.minWidth=i||u,s&&this.setWidth(s),r&&this.setHeight(r),(!s||!r)&&this.refreshSize(),e)this.center();else if(n||l)this.offsetElement(n,l);else if(h&&t){let p=this.boundaryEl,f=!0;if(p||(p=this.findBoundaryElement(),f=!1),p){const m=parseFloat(p.style.top),v=parseFloat(p.style.left);f?this.offsetElement(isNaN(v)?0:v,isNaN(m)?0:m):this.setPosition(v,m);}}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 i=this.moveElementDragListener||{eElement:t,onDragStart:this.onMoveStart.bind(this),onDragging:this.onMove.bind(this),onDragStop:this.onMoveEnd.bind(this)};e?(this.dragService.addDragSource(i),this.moveElementDragListener=i):(this.dragService.removeDragSource(i),this.moveElementDragListener=void 0);}setResizable(e){if(this.clearResizeListeners(),e?this.addResizers():this.removeResizers(),"boolean"==typeof e){if(!1===e)return;e={topLeft:e,top:e,topRight:e,right:e,bottomRight:e,bottom:e,bottomLeft:e,left:e};}Object.keys(e).forEach(t=>{const s=!!e[t],o=this.getResizerElement(t),r={dragStartPixels:0,eElement:o,onDragStart:n=>this.onResizeStart(n,t),onDragging:this.onResize.bind(this),onDragStop:n=>this.onResizeEnd(n,t)};(s||!this.isAlive()&&!s)&&(s?(this.dragService.addDragSource(r),this.resizeListeners.push(r),o.style.pointerEvents="all"):o.style.pointerEvents="none",this.resizable[t]=s);});}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;-1!==t&&(this.element.style.width=`${t}px`),-1!==e&&(this.element.style.height=`${e}px`);}getHeight(){return this.element.offsetHeight;}setHeight(e){const{popup:t}=this.config,i=this.element;let s=!1;if("string"==typeof e&&-1!==e.indexOf("%"))pi(i,e),e=_n(i),s=!0;else if(e=Math.max(this.minHeight,e),this.positioned){const o=this.getAvailableHeight();o&&e>o&&(e=o);}this.getHeight()!==e&&(s?(i.style.maxHeight="unset",i.style.minHeight="unset"):t?pi(i,e):(i.style.height=`${e}px`,i.style.flex="0 0 auto",this.lastSize.height="number"==typeof e?e:parseFloat(e)));}getAvailableHeight(){const{popup:e,forcePopupParentAsOffsetParent:t}=this.config;this.positioned||this.initialisePosition();const{clientHeight:i}=this.offsetParent;if(!i)return null;const s=this.element.getBoundingClientRect(),o=this.offsetParent.getBoundingClientRect(),r=e?this.position.y:s.top,n=e?0:o.top;let l=0;if(t){const u=this.element.parentElement;if(u){const{bottom:h}=u.getBoundingClientRect();l=h-s.bottom;}}return i+n-r-l;}getWidth(){return this.element.offsetWidth;}setWidth(e){const t=this.element,{popup:i}=this.config;let s=!1;if("string"==typeof e&&-1!==e.indexOf("%"))et(t,e),e=Vs(t),s=!0;else if(this.positioned){e=Math.max(this.minWidth,e);const{clientWidth:o}=this.offsetParent,r=i?this.position.x:this.element.getBoundingClientRect().left;o&&e+r>o&&(e=o-r);}this.getWidth()!==e&&(s?(t.style.maxWidth="unset",t.style.minWidth="unset"):this.config.popup?et(t,e):(t.style.width=`${e}px`,t.style.flex=" unset",this.lastSize.width="number"==typeof e?e:parseFloat(e)));}offsetElement(e=0,t=0){const{forcePopupParentAsOffsetParent:i}=this.config,s=i?this.boundaryEl:this.element;s&&(this.popupService.positionPopup({ePopup:s,keepWithinBounds:!0,skipObserver:this.movable||this.isResizable(),updatePosition:()=>({x:e,y:t})}),this.setPosition(parseFloat(s.style.left),parseFloat(s.style.top)));}constrainSizeToAvailableHeight(e){this.config.forcePopupParentAsOffsetParent&&(e?this.resizeObserverSubscriber=this.resizeObserverService.observeResize(this.popupService.getPopupParent(),()=>{const i=this.getAvailableHeight();this.element.style.setProperty("max-height",`${i}px`);}):(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:i,isTop:s,anywhereWithin:o,topBuffer:r}=e,n=t.clientX-this.dragStartPosition.x,l=t.clientY-this.dragStartPosition.y;return{movementX:this.shouldSkipX(t,!!i,!!o,n)?0:n,movementY:this.shouldSkipY(t,!!s,r,l)?0:l};}shouldSkipX(e,t,i,s){const o=this.element.getBoundingClientRect(),r=this.offsetParent.getBoundingClientRect(),n=this.boundaryEl.getBoundingClientRect(),l=this.config.popup?this.position.x:o.left;let a=l<=0&&r.left>=e.clientX||r.right<=e.clientX&&r.right<=n.right;return!!a||(a=t?s<0&&e.clientX>l+r.left||s>0&&e.clientX<l+r.left:i?s<0&&e.clientX>n.right||s>0&&e.clientX<l+r.left:s<0&&e.clientX>n.right||s>0&&e.clientX<n.right,a);}shouldSkipY(e,t,i=0,s){const o=this.element.getBoundingClientRect(),r=this.offsetParent.getBoundingClientRect(),n=this.boundaryEl.getBoundingClientRect(),l=this.config.popup?this.position.y:o.top;let a=l<=0&&r.top>=e.clientY||r.bottom<=e.clientY&&r.bottom<=n.bottom;return!!a||(a=t?s<0&&e.clientY>l+r.top+i||s>
10&&e.clientY<l+r.top:s<0&&e.clientY>n.bottom||s>0&&e.clientY<n.bottom,a);}createResizeMap(){const e=this.element;this.resizerMap={topLeft:{element:e.querySelector("[ref=eTopLeftResizer]")},top:{element:e.querySelector("[ref=eTopResizer]")},topRight:{element:e.querySelector("[ref=eTopRightResizer]")},right:{element:e.querySelector("[ref=eRightResizer]")},bottomRight:{element:e.querySelector("[ref=eBottomRightResizer]")},bottom:{element:e.querySelector("[ref=eBottomResizer]")},bottomLeft:{element:e.querySelector("[ref=eBottomLeftResizer]")},left:{element:e.querySelector("[ref=eLeftResizer]")}};}addResizers(){if(this.resizersAdded)return;const e=this.element;if(!e)return;const i=new DOMParser().parseFromString(mc,"text/html").body;e.appendChild(i.firstChild),this.createResizeMap(),this.resizersAdded=!0;}removeResizers(){this.resizerMap=void 0;const e=this.element.querySelector(`.${gd}`);e&&this.element.removeChild(e),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:i,forcePopupParentAsOffsetParent:s}=this.config;!i&&!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(i=>!i.classList.contains("ag-hidden")):null;}getMinSizeOfSiblings(){const e=this.getSiblings()||[];let t=0,i=0;for(let s=0;s<e.length;s++){const o=e[s],r=!!o.style.flex&&"0 0 auto"!==o.style.flex;if(o===this.element)continue;let n=this.minHeight||0,l=this.minWidth||0;if(r){const a=window.getComputedStyle(o);a.minHeight&&(n=parseInt(a.minHeight,10)),a.minWidth&&(l=parseInt(a.minWidth,10));}else n=o.offsetHeight,l=o.offsetWidth;t+=n,i+=l;}return{height:t,width:i};}applySizeToSiblings(e){let t=null;const i=this.getSiblings();if(i){for(let s=0;s<i.length;s++){const o=i[s];o!==t&&(e?o.style.height=`${o.offsetHeight}px`:o.style.width=`${o.offsetWidth}px`,o.style.flex="0 0 auto",o===this.element&&(t=i[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:i}=this.config,{isTop:s,isRight:o,isBottom:r,isLeft:n}=this.currentResizer,l=o||n,a=r||s,{movementX:u,movementY:h}=this.calculateMouseMovement({e,isLeft:n,isTop:s}),p=this.position.x,f=this.position.y;let m=0,v=0;if(l&&u){const w=n?-1:1,S=this.getWidth(),b=S+u*w;let E=!1;n&&(m=S-b,(p+m<=0||b<=this.minWidth)&&(E=!0,m=0)),E||this.setWidth(b);}if(a&&h){const w=s?-1:1,S=this.getHeight(),b=S+h*w;let E=!1;s?(v=S-b,(f+v<=0||b<=this.minHeight)&&(E=!0,v=0)):!this.config.popup&&!this.config.forcePopupParentAsOffsetParent&&S<b&&this.getMinSizeOfSiblings().height+b>this.element.parentElement.offsetHeight&&(E=!0),E||this.setHeight(b);}this.updateDragStartPosition(e.clientX,e.clientY),((t||i)&&m||v)&&this.offsetElement(p+m,f+v);}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.dispatchEvent({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:i}=this.position;let s;this.config.calculateTopBuffer&&(s=this.config.calculateTopBuffer());const{movementX:o,movementY:r}=this.calculateMouseMovement({e,isTop:!0,anywhereWithin:!0,topBuffer:s});this.offsetElement(t+o,i+r),this.updateDragStartPosition(e.clientX,e.clientY);}onMoveEnd(){this.isMoving=!1,this.boundaryEl=null,this.element.classList.remove("ag-moving");}setOffsetParent(){this.offsetParent=this.config.forcePopupParentAsOffsetParent?this.popupService.getPopupParent():this.element.offsetParent;}findBoundaryElement(){let e=this.element;for(;e;){if("static"!==window.getComputedStyle(e).position)return e;e=e.parentElement;}return this.element;}clearResizeListeners(){for(;this.resizeListeners.length;){const e=this.resizeListeners.pop();this.dragService.removeDragSource(e);}}destroy(){super.destroy(),this.moveElementDragListener&&this.dragService.removeDragSource(this.moveElementDragListener),this.constrainSizeToAvailableHeight(!1),this.clearResizeListeners(),this.removeResizers();}};d([g("popupService")],fi.prototype,"popupService",2),d([g("resizeObserverService")],fi.prototype,"resizeObserverService",2),d([g("dragService")],fi.prototype,"dragService",2);var dr=class Io extends V{constructor(t){super(),this.filterNameKey=t,this.applyActive=!1,this.hidePopup=null,this.debouncePending=!1,this.appliedModel=null,this.buttonListeners=[];}postConstruct(){this.resetTemplate(),this.createManagedBean(new Lt(this.getFocusableElement(),{handleKeyDown:this.handleKeyDown.bind(this)})),this.positionableFeature=new fi(this.getPositionableElement(),{forcePopupParentAsOffsetParent:!0}),this.createBean(this.positionableFeature);}handleKeyDown(t){}getFilterTitle(){return this.translate(this.filterNameKey);}isFilterActive(){return!!this.appliedModel;}resetTemplate(t){let i=this.getGui();i&&i.removeEventListener("submit",this.onFormSubmit);const s=`\n <form class="ag-filter-wrapper">\n <div class="ag-filter-body-wrapper ag-${this.getCssIdentifier()}-body-wrapper" ref="eFilterBody">\n ${this.createBodyTemplate()}\n </div>\n </form>`;this.setTemplate(s,t),i=this.getGui(),i&&i.addEventListener("submit",this.onFormSubmit);}isReadOnly(){return!!this.providedFilterParams.readOnly;}init(t){this.setParams(t),this.resetUiToDefaults(!0).then(()=>{this.updateUiVisibility(),this.setupOnBtApplyDebounce();});}setParams(t){this.providedFilterParams=t,this.applyActive=Io.isUseApplyButton(t),this.resetButtonsPanel();}updateParams(t){this.providedFilterParams=t,this.applyActive=Io.isUseApplyButton(t),this.resetUiToActiveModel(this.getModel(),()=>{this.updateUiVisibility(),this.setupOnBtApplyDebounce();});}resetButtonsPanel(){const{buttons:t}=this.providedFilterParams,i=t&&t.length>0&&!this.isReadOnly();if(this.eButtonsPanel?(de(this.eButtonsPanel),this.buttonListeners.forEac
1h(r=>r?.()),this.buttonListeners=[]):i&&(this.eButtonsPanel=document.createElement("div"),this.eButtonsPanel.classList.add("ag-filter-apply-panel")),!i)return void(this.eButtonsPanel&&at(this.eButtonsPanel));const s=document.createDocumentFragment(),o=r=>{let n,l;switch(r){case"apply":n=this.translate("applyFilter"),l=h=>this.onBtApply(!1,!1,h);break;case"clear":n=this.translate("clearFilter"),l=()=>this.onBtClear();break;case"reset":n=this.translate("resetFilter"),l=()=>this.onBtReset();break;case"cancel":n=this.translate("cancelFilter"),l=h=>{this.onBtCancel(h);};break;default:return void console.warn("AG Grid: Unknown button type specified");}const u=Oe(`<button\n type="${"apply"===r?"submit":"button"}"\n ref="${r}FilterButton"\n class="ag-button ag-standard-button ag-filter-apply-panel-button"\n >${n}\n </button>`);this.buttonListeners.push(this.addManagedListener(u,"click",l)),s.append(u);};$n(t).forEach(r=>o(r)),this.eButtonsPanel.append(s),this.getGui().appendChild(this.eButtonsPanel);}getDefaultDebounceMs(){return 0;}setupOnBtApplyDebounce(){const t=Io.getDebounceMs(this.providedFilterParams,this.getDefaultDebounceMs()),i=Te(this.checkApplyDebounce.bind(this),t);this.onBtApplyDebounce=()=>{this.debouncePending=!0,i();};}checkApplyDebounce(){this.debouncePending&&(this.debouncePending=!1,this.onBtApply());}getModel(){return this.appliedModel?this.appliedModel:null;}setModel(t){return(null!=t?this.setModelIntoUi(t):this.resetUiToDefaults()).then(()=>{this.updateUiVisibility(),this.applyModel("api");});}onBtCancel(t){this.resetUiToActiveModel(this.getModel(),()=>{this.handleCancelEnd(t);});}handleCancelEnd(t){this.providedFilterParams.closeOnApply&&this.close(t);}resetUiToActiveModel(t,i){const s=()=>{this.onUiChanged(!1,"prevent"),i?.();};null!=t?this.setModelIntoUi(t).then(s):this.resetUiToDefaults().then(s);}onBtClear(){this.resetUiToDefaults().then(()=>this.onUiChanged());}onBtReset(){this.onBtClear(),this.onBtApply();}applyModel(t="api"){const i=this.getModelFromUi();if(!this.isModelValid(i))return!1;const s=this.appliedModel;return this.appliedModel=i,!this.areModelsEqual(s,i);}isModelValid(t){return!0;}onFormSubmit(t){t.preventDefault();}onBtApply(t=!1,i=!1,s){s&&s.preventDefault(),this.applyModel(i?"rowDataUpdated":"ui")&&this.providedFilterParams.filterChangedCallback({afterFloatingFilter:t,afterDataChange:i,source:"columnFilter"});const{closeOnApply:o}=this.providedFilterParams;o&&this.applyActive&&!t&&!i&&this.close(s);}onNewRowsLoaded(){}close(t){if(!this.hidePopup)return;const s=t&&t.key;let o;("Enter"===s||"Space"===s)&&(o={keyboardEvent:t}),this.hidePopup(o),this.hidePopup=null;}onUiChanged(t=!1,i){if(this.updateUiVisibility(),this.providedFilterParams.filterModifiedCallback(),this.applyActive&&!this.isReadOnly()){const s=this.isModelValid(this.getModelFromUi()),o=this.getRefElement("applyFilterButton");o&&Zi(o,!s);}t&&!i||"immediately"===i?this.onBtApply(t):(!this.applyActive&&!i||"debounce"===i)&&this.onBtApplyDebounce();}afterGuiAttached(t){t&&(this.hidePopup=t.hidePopup),this.refreshFilterResizer(t?.container);}refreshFilterResizer(t){if(!this.positionableFeature||"toolPanel"===t)return;const i="floatingFilter"===t||"columnFilter"===t,{positionableFeature:s,gos:o}=this;i?(s.restoreLastSize(),s.setResizable(o.get("enableRtl")?{bottom:!0,bottomLeft:!0,left:!0}:{bottom:!0,bottomRight:!0,right:!0})):(this.positionableFeature.removeSizeFromEl(),this.positionableFeature.setResizable(!1)),this.positionableFeature.constrainSizeToAvailableHeight(!0);}afterGuiDetached(){this.checkApplyDebounce(),this.positionableFeature&&this.positionableFeature.constrainSizeToAvailableHeight(!1);}static getDebounceMs(t,i){return Io.isUseApplyButton(t)?(null!=t.debounceMs&&console.warn("AG Grid: debounceMs is ignored when apply button is present"),0):null!=t.debounceMs?t.debounceMs:i;}static isUseApplyButton(t){return!!t.buttons&&t.buttons.indexOf("apply")>=0;}refresh(t){return this.providedFilterParams=t,!0;}destroy(){const t=this.getGui();t&&t.removeEventListener("submit",this.onFormSubmit),this.hidePopup=null,this.positionableFeature&&(this.positionableFeature=this.destroyBean(this.positionableFeature)),this.appliedModel=null,super.destroy();}translate(t){return this.localeService.getLocaleTextFunc()(t,pd[t]);}getCellValue(t){return this.providedFilterParams.getValue(t);}getPositionableElement(){return this.eFilterBody;}};d([g("rowModel")],dr.prototype,"rowModel",2),d([A("eFilterBody")],dr.prototype,"eFilterBody",2),d([T],dr.prototype,"postConstruct",1);var Ys=dr,ur=class extends V{constructor(e,t){super(t),this.labelSeparator="",this.labelAlignment="left",this.disabled=!1,this.label="",this.config=e||{};}postConstruct(){this.addCssClass("ag-labeled"),this.eLabel.classList.add("ag-label");const{labelSeparator:e,label:t,labelWidth:i,labelAlignment:s,disabled:o}=this.config;null!=o&&this.setDisabled(o),null!=e&&this.setLabelSeparator(e),null!=t&&this.setLabel(t),null!=i&&this.setLabelWidth(i),this.setLabelAlignment(s||this.labelAlignment),this.refreshLabel();}refreshLabel(){de(this.eLabel),"string"==typeof this.label?this.eLabel.innerText=this.label+this.labelSeparator:this.label&&this.eLabel.appendChild(this.label),""===this.label?(K(this.eLabel,!1),le(this.eLabel,"presentation")):(K(this.eLabel,!0),le(this.eLabel,null));}setLabelSeparator(e){return this.labelSeparator===e||(this.labelSeparator=e,null!=this.label&&this.refreshLabel()),this;}getLabelId(){return this.eLabel.id=this.eLabel.id||`ag-${this.getCompId()}-label`,this.eLabel.id;}getLabel(){return this.label;}setLabel(e){return this.label===e||(this.label=e,this.refreshLabel()),this;}setLabelAlignment(e){const i=this.getGui().classList;return i.toggle("ag-label-align-left","left"===e),i.toggle("ag-label-align-right","right"===e),i.toggle("ag-label-align-top","top"===e),this;}setLabelEllipsis(e){return this.eLabel.classList.toggle("ag-label-ellipsis",e),this;}setLabelWidth(e){return null==this.label||Ws(this.eLabel,e),this;}setDisabled(e){e=!!e;const t=this.getGui();return Zi(t,e),t.classList.toggle("ag-disabled",e),this.disabled=e,this;}isDisabled(){return!!this.disabled;}};d([T],ur.prototype,"postConstruct",1);var jn=class extends ur{constructor(e,t,i){super(e,t),this.className=i;}
1postConstruct(){super.postConstruct();const{width:e,value:t,onValueChange:i}=this.config;null!=e&&this.setWidth(e),null!=t&&this.setValue(t),null!=i&&this.onValueChange(i),this.className&&this.addCssClass(this.className),this.refreshAriaLabelledBy();}refreshAriaLabelledBy(){const e=this.getAriaElement(),t=this.getLabelId();null!==ya(e)?ji(e,""):ji(e,t??"");}setAriaLabel(e){return Ke(this.getAriaElement(),e),this.refreshAriaLabelledBy(),this;}onValueChange(e){return this.addManagedListener(this,c.EVENT_FIELD_VALUE_CHANGED,()=>e(this.getValue())),this;}getWidth(){return this.getGui().clientWidth;}setWidth(e){return et(this.getGui(),e),this;}getPreviousValue(){return this.previousValue;}getValue(){return this.value;}setValue(e,t){return this.value===e||(this.previousValue=this.value,this.value=e,t||this.dispatchEvent({type:c.EVENT_FIELD_VALUE_CHANGED})),this;}},Ut=class extends jn{constructor(e){if(super(e,e?.template||'\n <div class="ag-picker-field" role="presentation">\n <div ref="eLabel"></div>\n <div ref="eWrapper" class="ag-wrapper ag-picker-field-wrapper ag-picker-collapsed">\n <div ref="eDisplayField" class="ag-picker-field-display"></div>\n <div ref="eIcon" class="ag-picker-field-icon" aria-hidden="true"></div>\n </div>\n </div>',e?.className),this.isPickerDisplayed=!1,this.skipClick=!1,this.pickerGap=4,this.hideCurrentPicker=null,this.ariaRole=e?.ariaRole,this.onPickerFocusIn=this.onPickerFocusIn.bind(this),this.onPickerFocusOut=this.onPickerFocusOut.bind(this),!e)return;const{pickerGap:t,maxPickerHeight:i,variableWidth:s,minPickerWidth:o,maxPickerWidth:r}=e;null!=t&&(this.pickerGap=t),this.variableWidth=!!s,null!=i&&this.setPickerMaxHeight(i),null!=o&&this.setPickerMinWidth(o),null!=r&&this.setPickerMaxWidth(r);}postConstruct(){super.postConstruct(),this.setupAria();const e=`ag-${this.getCompId()}-display`;this.eDisplayField.setAttribute("id",e);const t=this.getAriaElement();this.addManagedListener(t,"keydown",this.onKeyDown.bind(this)),this.addManagedListener(this.eLabel,"mousedown",this.onLabelOrWrapperMouseDown.bind(this)),this.addManagedListener(this.eWrapper,"mousedown",this.onLabelOrWrapperMouseDown.bind(this));const{pickerIcon:i,inputWidth:s}=this.config;if(i){const o=re(i,this.gos);o&&this.eIcon.appendChild(o);}null!=s&&this.setInputWidth(s);}setupAria(){const e=this.getAriaElement();e.setAttribute("tabindex",this.gos.get("tabIndex").toString()),Ft(e,!1),this.ariaRole&&le(e,this.ariaRole);}onLabelOrWrapperMouseDown(e){if(e){const t=this.getFocusableElement();if(t!==this.eWrapper&&e?.target===t)return;e.preventDefault(),this.getFocusableElement().focus();}this.skipClick?this.skipClick=!1:this.isDisabled()||(this.isPickerDisplayed?this.hidePicker():this.showPicker());}onKeyDown(e){switch(e.key){case C.UP:case C.DOWN:case C.ENTER:case C.SPACE:e.preventDefault(),this.onLabelOrWrapperMouseDown();break;case C.ESCAPE:this.isPickerDisplayed&&(e.preventDefault(),e.stopPropagation(),this.hideCurrentPicker&&this.hideCurrentPicker());}}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.gos.getDocument(),t=this.pickerComponent.getGui();this.gos.get("suppressScrollWhenPopupsAreOpen")||(this.destroyMouseWheelFunc=this.addManagedListener(this.eventService,c.EVENT_BODY_SCROLL,()=>{this.hidePicker();}));const i=this.localeService.getLocaleTextFunc(),{pickerAriaLabelKey:s,pickerAriaLabelValue:o,modalPicker:r=!0}=this.config,n={modal:r,eChild:t,closeOnEsc:!0,closedCallback:()=>{const m=this.gos.getActiveDomElement(),v=!m||m===e.body;this.beforeHidePicker(),v&&this.isAlive()&&this.getFocusableElement().focus();},ariaLabel:i(s,o)},l=this.popupService.addPopup(n),{maxPickerHeight:a,minPickerWidth:u,maxPickerWidth:h,variableWidth:p}=this;p?(u&&(t.style.minWidth=u),t.style.width=rr(Vs(this.eWrapper)),h&&(t.style.maxWidth=h)):Ws(t,h??Vs(this.eWrapper));const f=a??`${_s(this.popupService.getPopupParent())}px`;return t.style.setProperty("max-height",f),t.style.position="absolute",this.alignPickerToComponent(),l.hideFunc;}alignPickerToComponent(){if(!this.pickerComponent)return;const{pickerType:e}=this.config,{pickerGap:t}=this,i=this.gos.get("enableRtl")?"right":"left";this.popupService.positionPopupByComponent({type:e,eventSource:this.eWrapper,ePopup:this.pickerComponent.getGui(),position:"under",alignSide:i,keepWithinBounds:!0,nudgeY:t});}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){this.isAlive()&&(Ft(this.getAriaElement(),e),this.eWrapper.classList.toggle("ag-picker-expanded",e),this.eWrapper.classList.toggle("ag-picker-collapsed",!e));}onPickerFocusIn(){this.togglePickerHasFocus(!0);}onPickerFocusOut(e){var t;null!=(t=this.pickerComponent)&&t.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();}setInputWidth(e){return Ws(this.eWrapper,e),this;}getFocusableElement(){return this.eWrapper;}setPickerGap(e){return this.pickerGap=e,this;}setPickerMinWidth(e){return"number"==typeof e&&(e=`${e}px`),this.minPickerWidth=e??void 0,this;}setPickerMaxWidth(e){return"number"==typeof e&&(e=`${e}px`),this.maxPickerWidth=e??void 0,this;}setPickerMaxHeight(e){return"number"==typeof e&&(e=`${e}px`),this.maxPickerHeight=e??void 0,this;}destroy(){this.hidePicker(),super.destroy();}};d([g("popupService")],Ut.prototype,"popupService",2),d([A("eLabel")],Ut.prototype,"eLabel",2),d([A("eWrapper")],Ut.prototype,"eWrapper",2),d([A("eDisplayField")],Ut.prototype,"eDisplayField",2),d([A("eIcon")],Ut.prototype,"eIcon",2);var hr=class zr extends V{constructor(t="default",i=!1){super(`<div class="ag-list ag-${t}-list" role="listbox"></div>`),this.cssIdentifier=t,this.unFocusable=i,this.options=[],this.itemEls=[];}init(){const t=this.getGui();this.addManagedListener(t,"mouseleave",()=>this.clearHighlighted()),!this.unFocusable&&this.addManagedListener(t,"keydown",this.handleKeyDown.bind(this));}handleKeyDown(t){const i=t.key;
1switch(i){case C.ENTER:if(this.highlightedEl){const s=this.itemEls.indexOf(this.highlightedEl);this.setValueByIndex(s);}else this.setValue(this.getValue());break;case C.DOWN:case C.UP:t.preventDefault(),this.navigate(i);break;case C.PAGE_DOWN:case C.PAGE_UP:case C.PAGE_HOME:case C.PAGE_END:t.preventDefault(),this.navigateToPage(i);}}navigate(t){const i=t===C.DOWN;let s;if(this.highlightedEl){let r=this.itemEls.indexOf(this.highlightedEl)+(i?1:-1);r=Math.min(Math.max(r,0),this.itemEls.length-1),s=this.itemEls[r];}else s=this.itemEls[i?0:this.itemEls.length-1];this.highlightItem(s);}navigateToPage(t){if(!this.highlightedEl||0===this.itemEls.length)return;const i=this.itemEls.indexOf(this.highlightedEl),s=this.options.length-1,o=this.itemEls[0].clientHeight,r=Math.floor(this.getGui().clientHeight/o);let n=-1;t===C.PAGE_HOME?n=0:t===C.PAGE_END?n=s:t===C.PAGE_DOWN?n=Math.min(i+r,s):t===C.PAGE_UP&&(n=Math.max(i-r,0)),-1!==n&&this.highlightItem(this.itemEls[n]);}addOptions(t){return t.forEach(i=>this.addOption(i)),this;}addOption(t){const{value:i,text:s}=t,o=s||i;return this.options.push({value:i,text:o}),this.renderOption(i,o),this.updateIndices(),this;}clearOptions(){this.options=[],this.reset(!0),this.itemEls.forEach(t=>{at(t);}),this.itemEls=[];}updateIndices(){const t=this.getGui().querySelectorAll(".ag-list-item");t.forEach((i,s)=>{Jo(i,s+1),Zo(i,t.length);});}renderOption(t,i){const s=this.gos.getDocument(),o=s.createElement("div");le(o,"option"),o.classList.add("ag-list-item",`ag-${this.cssIdentifier}-list-item`);const r=s.createElement("span");o.appendChild(r),r.textContent=i,this.unFocusable||(o.tabIndex=-1),this.itemEls.push(o),this.addManagedListener(o,"mousemove",()=>this.highlightItem(o)),this.addManagedListener(o,"mousedown",n=>{n.preventDefault(),this.setValue(t);}),this.createManagedBean(new mt({getTooltipValue:()=>i,getGui:()=>o,getLocation:()=>"UNKNOWN",shouldDisplayTooltip:()=>r.scrollWidth>r.clientWidth})),this.getGui().appendChild(o);}setValue(t,i){if(this.value===t)return this.fireItemSelected(),this;if(null==t)return this.reset(i),this;const s=this.options.findIndex(o=>o.value===t);if(-1!==s){const o=this.options[s];this.value=o.value,this.displayValue=o.text,this.highlightItem(this.itemEls[s]),i||this.fireChangeEvent();}return this;}setValueByIndex(t){return this.setValue(this.options[t].value);}getValue(){return this.value;}getDisplayValue(){return this.displayValue;}refreshHighlighted(){this.clearHighlighted();const t=this.options.findIndex(i=>i.value===this.value);-1!==t&&this.highlightItem(this.itemEls[t]);}reset(t){this.value=null,this.displayValue=null,this.clearHighlighted(),t||this.fireChangeEvent();}highlightItem(t){if(!xe(t))return;this.clearHighlighted(),this.highlightedEl=t,this.highlightedEl.classList.add(zr.ACTIVE_CLASS),qi(this.highlightedEl,!0);const i=this.getGui(),{scrollTop:s,clientHeight:o}=i,{offsetTop:r,offsetHeight:n}=t;(r+n>s+o||r<s)&&this.highlightedEl.scrollIntoView({block:"nearest"}),this.unFocusable||this.highlightedEl.focus();}clearHighlighted(){!this.highlightedEl||!xe(this.highlightedEl)||(this.highlightedEl.classList.remove(zr.ACTIVE_CLASS),qi(this.highlightedEl,!1),this.highlightedEl=null);}fireChangeEvent(){this.dispatchEvent({type:c.EVENT_FIELD_VALUE_CHANGED}),this.fireItemSelected();}fireItemSelected(){this.dispatchEvent({type:zr.EVENT_ITEM_SELECTED});}};hr.EVENT_ITEM_SELECTED="selectedItem",hr.ACTIVE_CLASS="ag-active-item",d([T],hr.prototype,"init",1);var fd=hr,md=class Ju extends Ut{constructor(t){super(M({pickerAriaLabelKey:"ariaLabelSelectField",pickerAriaLabelValue:"Select Field",pickerType:"ag-list",className:"ag-select",pickerIcon:"smallDown",ariaRole:"combobox"},t));}postConstruct(){super.postConstruct(),this.createListComponent(),this.eWrapper.tabIndex=this.gos.get("tabIndex");const{options:t,value:i,placeholder:s}=this.config;null!=t&&this.addOptions(t),null!=i&&this.setValue(i,!0),s&&null==i&&(this.eDisplayField.textContent=s),this.addManagedListener(this.eWrapper,"focusout",this.onWrapperFocusOut.bind(this));}onWrapperFocusOut(t){this.eWrapper.contains(t.relatedTarget)||this.hidePicker();}createListComponent(){this.listComponent=this.createBean(new fd("select",!0)),this.listComponent.setParentComponent(this);const t=this.listComponent.getAriaElement(),i=`ag-select-list-${this.listComponent.getCompId()}`;t.setAttribute("id",i),wn(this.getAriaElement(),t),this.listComponent.addManagedListener(this.listComponent,fd.EVENT_ITEM_SELECTED,()=>{this.hidePicker(),this.dispatchEvent({type:Ju.EVENT_ITEM_SELECTED});}),this.listComponent.addManagedListener(this.listComponent,c.EVENT_FIELD_VALUE_CHANGED,(
1)=>{this.listComponent&&(this.setValue(this.listComponent.getValue(),!1,!0),this.hidePicker());});}createPickerComponent(){return this.listComponent;}onKeyDown(t){var i;const{key:s}=t;switch(s===C.TAB&&this.hidePicker(),s){case C.ENTER:case C.UP:case C.DOWN:case C.PAGE_UP:case C.PAGE_DOWN:case C.PAGE_HOME:case C.PAGE_END:t.preventDefault(),this.isPickerDisplayed?null==(i=this.listComponent)||i.handleKeyDown(t):super.onKeyDown(t);break;case C.ESCAPE:super.onKeyDown(t);}}showPicker(){this.listComponent&&(super.showPicker(),this.listComponent.refreshHighlighted());}addOptions(t){return t.forEach(i=>this.addOption(i)),this;}addOption(t){return this.listComponent.addOption(t),this;}clearOptions(){var t;return null==(t=this.listComponent)||t.clearOptions(),this;}setValue(t,i,s){if(this.value===t||!this.listComponent)return this;if(s||this.listComponent.setValue(t,!0),this.listComponent.getValue()===this.getValue())return this;let r=this.listComponent.getDisplayValue();return null==r&&this.config.placeholder&&(r=this.config.placeholder),this.eDisplayField.textContent=r,this.setTooltip({newTooltipText:r??null,shouldDisplayTooltip:()=>this.eDisplayField.scrollWidth>this.eDisplayField.clientWidth}),super.setValue(t,i);}destroy(){this.listComponent&&(this.destroyBean(this.listComponent),this.listComponent=void 0),super.destroy();}};md.EVENT_ITEM_SELECTED="selectedItem";var js=md,dt=class extends jn{constructor(e,t,i="text",s="input"){super(e,`\n <div role="presentation">\n <div ref="eLabel" class="ag-input-field-label"></div>\n <div ref="eWrapper" class="ag-wrapper ag-input-wrapper" role="presentation">\n <${s} ref="eInput" class="ag-input-field-input"></${s}>\n </div>\n </div>`,t),this.inputType=i,this.displayFieldTag=s;}postConstruct(){super.postConstruct(),this.setInputType(),this.eLabel.classList.add(`${this.className}-label`),this.eWrapper.classList.add(`${this.className}-input-wrapper`),this.eInput.classList.add(`${this.className}-input`),this.addCssClass("ag-input-field"),this.eInput.id=this.eInput.id||`ag-${this.getCompId()}-input`;const{inputName:e,inputWidth:t}=this.config;null!=e&&this.setInputName(e),null!=t&&this.setInputWidth(t),this.addInputListeners(),this.activateTabIndex([this.eInput]);}addInputListeners(){this.addManagedListener(this.eInput,"input",e=>this.setValue(e.target.value));}setInputType(){"input"===this.displayFieldTag&&this.eInput.setAttribute("type",this.inputType);}getInputElement(){return this.eInput;}setInputWidth(e){return Ws(this.eWrapper,e),this;}setInputName(e){return this.getInputElement().setAttribute("name",e),this;}getFocusableElement(){return this.eInput;}setMaxLength(e){return this.eInput.maxLength=e,this;}setInputPlaceholder(e){return ft(this.eInput,"placeholder",e),this;}setInputAriaLabel(e){return Ke(this.eInput,e),this.refreshAriaLabelledBy(),this;}setDisabled(e){return Zi(this.eInput,e),super.setDisabled(e);}setAutoComplete(e){return ft(this.eInput,"autocomplete",!0===e?null:"string"==typeof e?e:"off"),this;}};d([A("eLabel")],dt.prototype,"eLabel",2),d([A("eWrapper")],dt.prototype,"eWrapper",2),d([A("eInput")],dt.prototype,"eInput",2);var qs=class extends dt{constructor(e,t="ag-checkbox",i="checkbox"){super(e,t,i),this.labelAlignment="right",this.selected=!1,this.readOnly=!1,this.passive=!1;}postConstruct(){super.postConstruct();const{readOnly:e,passive:t}=this.config;"boolean"==typeof e&&this.setReadOnly(e),"boolean"==typeof t&&this.setPassive(t);}addInputListeners(){this.addManagedListener(this.eInput,"click",this.onCheckboxClick.bind(this)),this.addManagedListener(this.eLabel,"click",this.toggle.bind(this));}getNextValue(){return void 0===this.selected||!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){return this.getInputElement().name=e,this;}isSelected(){return this.selected;}setSelected(e,t){this.isSelected()!==e&&(this.previousValue=this.isSelected(),e=this.selected="boolean"==typeof e?e:void 0,this.eInput.checked=e,this.eInput.indeterminate=void 0===e,t||this.dispatchChange(this.selected,this.previousValue));}dispatchChange(e,t,i){this.dispatchEvent({type:c.EVENT_FIELD_VALUE_CHANGED,selected:e,previousValue:t,event:i});const s=this.getInputElement();this.eventService.dispatchEvent({type:c.EVENT_CHECKBOX_CHANGED,id:s.id,name:s.name,selected:e,previousValue:t});}onCheckboxClick(e){if(this.passive||this.eInput.disabled)return;const t=this.isSelected(),i=this.selected=e.target.checked;this.refreshSelectedClass(i),this.dispatchChange(i,t,e);}refreshSelectedClass(e){this.eWrapper.classList.toggle("ag-checked",!0===e),this.eWrapper.classList.toggle("ag-indeterminate",null==e);}},qn=class extends qs{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.addManagedListener(this.eventService,c.EVENT_CHECKBOX_CHANGED,this.onChange.bind(this));}onChange(e){e.selected&&e.name&&this.eInput.name&&this.eInput.name===e.name&&e.id&&this.eInput.id!==e.id&&this.setValue(!1,!0);}},Qn=class{constructor(e,t,i){this.localeService=e,this.optionsFactory=t,this.valueFormatter=i;}getModelAsString(e){if(!e)return null;const t=null!=e.operator,i=this.localeService.getLocaleTextFunc();if(t){const s=e;let{conditions:o}=s;if(!o){const{condition1:l,condition2:a}=s;o=[l,a];}const r=o.map(l=>this.getModelAsString(l)),n="AND"===s.operator?"andCondition":"orCondition";return r.join(` ${i(n,pd[n])} `);}if(e.type===ne.BLANK||e.type===ne.NOT_BLANK)return i(e.type,e.type);{const s=e,o=this.optionsFactory.getCustomOption(s.type),{displayKey:r,displayName:n,numberOfInputs:l}=o||{};return r&&n&&0===l?(i(r,n),n):this.conditionToString(s,o);}}updateParams(e){this.optionsFactory=e.optionsFactory;}formatValue(e){var t;return this.valueFormatter?null!=(t=this.valueFormatter(e??null))?t:"":String(e);}},Ae=class Ts extends Ys{constructor(){super(...arguments),this.eTypes=[],this.eJoinOperatorPanels=[],this.eJoinOperatorsAnd=[],this.eJoinOperatorsOr=[],this.eConditionBodies=[],this.listener=()=>this.onUiChanged(),this.lastUiCompletePosition=null,this.joinOperatorId=0;}getNumberOfInputs(t){const i=this.optionsFactory.getCustomOption(t);
1if(i){const{numberOfInputs:o}=i;return o??1;}return t&&[Ts.EMPTY,Ts.NOT_BLANK,Ts.BLANK].indexOf(t)>=0?0:t===Ts.IN_RANGE?2:1;}onFloatingFilterChanged(t,i){this.setTypeFromFloatingFilter(t),this.setValueFromFloatingFilter(i),this.onUiChanged(!0);}setTypeFromFloatingFilter(t){this.eTypes.forEach((i,s)=>{i.setValue(0===s?t:this.optionsFactory.getDefaultOption(),!0);});}getModelFromUi(){const t=this.getUiCompleteConditions();return 0===t.length?null:this.maxNumConditions>1&&t.length>1?{filterType:this.getFilterType(),operator:this.getJoinOperator(),condition1:t[0],condition2:t[1],conditions:t}:t[0];}getConditionTypes(){return this.eTypes.map(t=>t.getValue());}getConditionType(t){return this.eTypes[t].getValue();}getJoinOperator(){return 0===this.eJoinOperatorsOr.length?this.defaultJoinOperator:!0===this.eJoinOperatorsOr[0].getValue()?"OR":"AND";}areModelsEqual(t,i){if(!t&&!i)return!0;if(!t&&i||t&&!i)return!1;const s=!t.operator,o=!i.operator;if(!s&&o||s&&!o)return!1;let n;return n=s?this.areSimpleModelsEqual(t,i):t.operator===i.operator&&pt(t.conditions,i.conditions,(u,h)=>this.areSimpleModelsEqual(u,h)),n;}shouldRefresh(t){var i,s,o;const r=this.getModel(),n=r?null!=(i=r.conditions)?i:[r]:null,l=null!=(o=null==(s=t.filterOptions)?void 0:s.map(u=>"string"==typeof u?u:u.displayKey))?o:this.getDefaultFilterOptions();return!(n&&!n.every(u=>void 0!==l.find(h=>h===u.type))||"number"==typeof t.maxNumConditions&&n&&n.length>t.maxNumConditions);}refresh(t){return!(!this.shouldRefresh(t)||!super.refresh(t)||(this.setParams(t),this.removeConditionsAndOperators(0),this.createOption(),this.setModel(this.getModel()),0));}setModelIntoUi(t){if(t.operator){let s=t;s.conditions||(s.conditions=[s.condition1,s.condition2]);const o=this.validateAndUpdateConditions(s.conditions),r=this.getNumConditions();if(o<r)this.removeConditionsAndOperators(o);else if(o>r)for(let l=r;l<o;l++)this.createJoinOperatorPanel(),this.createOption();const n="OR"===s.operator;this.eJoinOperatorsAnd.forEach(l=>l.setValue(!n,!0)),this.eJoinOperatorsOr.forEach(l=>l.setValue(n,!0)),s.conditions.forEach((l,a)=>{this.eTypes[a].setValue(l.type,!0),this.setConditionIntoUi(l,a);});}else{const s=t;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.onUiChanged(),$e.resolve();}validateAndUpdateConditions(t){let i=t.length;return i>this.maxNumConditions&&(t.splice(this.maxNumConditions),O('Filter Model contains more conditions than "filterParams.maxNumConditions". Additional conditions have been ignored.'),i=this.maxNumConditions),i;}doesFilterPass(t){var i;const s=this.getModel();if(null==s)return!0;const{operator:o}=s,r=[];return o?r.push(...(null!=(i=s.conditions)?i:[])):r.push(s),r[o&&"OR"===o?"some":"every"](l=>this.individualConditionPasses(t,l));}setParams(t){super.setParams(t),this.setNumConditions(t),this.defaultJoinOperator=this.getDefaultJoinOperator(t.defaultJoinOperator),this.filterPlaceholder=t.filterPlaceholder,this.optionsFactory=new cd(),this.optionsFactory.init(t,this.getDefaultFilterOptions()),this.createFilterListOptions(),this.createOption(),this.createMissingConditionsAndOperators(),this.isReadOnly()&&this.eFilterBody.setAttribute("tabindex","-1");}setNumConditions(t){var i,s;null!=t.suppressAndOrCondition&&O('Since v29.2 "filterParams.suppressAndOrCondition" is deprecated. Use "filterParams.maxNumConditions = 1" instead.'),null!=t.alwaysShowBothConditions&&O('Since v29.2 "filterParams.alwaysShowBothConditions" is deprecated. Use "filterParams.numAlwaysVisibleConditions = 2" instead.'),this.maxNumConditions=null!=(i=t.maxNumConditions)?i:t.suppressAndOrCondition?1:2,this.maxNumConditions<1&&(O('"filterParams.maxNumConditions" must be greater than or equal to zero.'),this.maxNumConditions=1),this.numAlwaysVisibleConditions=null!=(s=t.numAlwaysVisibleConditions)?s:t.alwaysShowBothConditions?2:1,this.numAlwaysVisibleConditions<1&&(O('"filterParams.numAlwaysVisibleConditions" must be greater than or equal to zero.'),this.numAlwaysVisibleConditions=1),this.numAlwaysVisibleConditions>this.maxNumConditions&&(O('"filterParams.numAlwaysVisibleConditions" cannot be greater than "filterParams.maxNumConditions".'),this.numAlwaysVisibleConditions=this.maxNumConditions);}createOption(){const t=this.createManagedBean(new js());this.eTypes.push(t),t.addCssClass("ag-filter-select"),this.eFilterBody.appendChild(t.getGui());const i=this.createValueElement();this.eConditionBodies.push(i),this.eFilterBody.appendChild(i),this.putOptionsIntoDropdown(t),this.resetType(t);
1const s=this.getNumConditions()-1;this.forEachPositionInput(s,o=>this.resetInput(o)),this.addChangedListeners(t,s);}createJoinOperatorPanel(){const t=document.createElement("div");this.eJoinOperatorPanels.push(t),t.classList.add("ag-filter-condition");const i=this.createJoinOperator(this.eJoinOperatorsAnd,t,"and"),s=this.createJoinOperator(this.eJoinOperatorsOr,t,"or");this.eFilterBody.appendChild(t);const o=this.eJoinOperatorPanels.length-1,r=this.joinOperatorId++;this.resetJoinOperatorAnd(i,o,r),this.resetJoinOperatorOr(s,o,r),this.isReadOnly()||(i.onValueChange(this.listener),s.onValueChange(this.listener));}createJoinOperator(t,i,s){const o=this.createManagedBean(new qn());return t.push(o),o.addCssClass("ag-filter-condition-operator"),o.addCssClass(`ag-filter-condition-operator-${s}`),i.appendChild(o.getGui()),o;}getDefaultJoinOperator(t){return"AND"===t||"OR"===t?t:"AND";}createFilterListOptions(){const t=this.optionsFactory.getFilterOptions();this.filterListOptions=t.map(i=>"string"==typeof i?this.createBoilerplateListOption(i):this.createCustomListOption(i));}putOptionsIntoDropdown(t){this.filterListOptions.forEach(i=>{t.addOption(i);}),t.setDisabled(this.filterListOptions.length<=1);}createBoilerplateListOption(t){return{value:t,text:this.translate(t)};}createCustomListOption(t){const{displayKey:i}=t,s=this.optionsFactory.getCustomOption(t.displayKey);return{value:i,text:s?this.localeService.getLocaleTextFunc()(s.displayKey,s.displayName):this.translate(i)};}isAllowTwoConditions(){return this.maxNumConditions>=2;}createBodyTemplate(){return"";}getCssIdentifier(){return"simple-filter";}updateUiVisibility(){const t=this.getJoinOperator();this.updateNumConditions(),this.updateConditionStatusesAndValues(this.lastUiCompletePosition,t);}updateNumConditions(){var t;let i=-1,s=!0;for(let o=0;o<this.getNumConditions();o++)this.isConditionUiComplete(o)?i=o:s=!1;if(this.shouldAddNewConditionAtEnd(s))this.createJoinOperatorPanel(),this.createOption();else{const o=null!=(t=this.lastUiCompletePosition)?t:this.getNumConditions()-2;if(i<o){this.removeConditionsAndOperators(o+1);const r=i+1,n=o-r;n>0&&this.removeConditionsAndOperators(r,n),this.createMissingConditionsAndOperators();}}this.lastUiCompletePosition=i;}updateConditionStatusesAndValues(t,i){this.eTypes.forEach((o,r)=>{const n=this.isConditionDisabled(r,t);o.setDisabled(n||this.filterListOptions.length<=1),1===r&&(Zi(this.eJoinOperatorPanels[0],n),this.eJoinOperatorsAnd[0].setDisabled(n),this.eJoinOperatorsOr[0].setDisabled(n));}),this.eConditionBodies.forEach((o,r)=>{K(o,this.isConditionBodyVisible(r));});const s="OR"===(i??this.getJoinOperator());this.eJoinOperatorsAnd.forEach((o,r)=>{o.setValue(!s,!0);}),this.eJoinOperatorsOr.forEach((o,r)=>{o.setValue(s,!0);}),this.forEachInput((o,r,n,l)=>{this.setElementDisplayed(o,r<l),this.setElementDisabled(o,this.isConditionDisabled(n,t));}),this.resetPlaceholder();}shouldAddNewConditionAtEnd(t){return t&&this.getNumConditions()<this.maxNumConditions&&!this.isReadOnly();}removeConditionsAndOperators(t,i){if(t>=this.getNumConditions())return;this.removeComponents(this.eTypes,t,i),this.removeElements(this.eConditionBodies,t,i),this.removeValueElements(t,i);const s=Math.max(t-1,0);this.removeElements(this.eJoinOperatorPanels,s,i),this.removeComponents(this.eJoinOperatorsAnd,s,i),this.removeComponents(this.eJoinOperatorsOr,s,i);}removeElements(t,i,s){this.removeItems(t,i,s).forEach(r=>at(r));}removeComponents(t,i,s){this.removeItems(t,i,s).forEach(r=>{at(r.getGui()),this.destroyBean(r);});}removeItems(t,i,s){return null==s?t.splice(i):t.splice(i,s);}afterGuiAttached(t){if(super.afterGuiAttached(t),this.resetPlaceholder(),!t?.suppressFocus)if(this.isReadOnly())this.eFilterBody.focus();else{const i=this.getInputs(0)[0];if(!i)return;i instanceof dt&&i.getInputElement().focus();}}afterGuiDetached(){super.afterGuiDetached();const t=this.getModel();this.resetUiToActiveModel(t);let i=-1,s=-1,o=!1;const r=this.getJoinOperator();for(let l=this.getNumConditions()-1;l>=0;l--)if(this.isConditionUiComplete(l))-1===i&&(i=l,s=l);else{const u=l<i;(l>=this.numAlwaysVisibleConditions&&!this.isConditionUiComplete(l-1)||u)&&(this.removeConditionsAndOperators(l,1),o=!0,u&&s--);}let n=!1;
1this.getNumConditions()<this.numAlwaysVisibleConditions&&(this.createMissingConditionsAndOperators(),n=!0),this.shouldAddNewConditionAtEnd(s===this.getNumConditions()-1)&&(this.createJoinOperatorPanel(),this.createOption(),n=!0),n&&this.updateConditionStatusesAndValues(s,r),o&&this.updateJoinOperatorsDisabled(),this.lastUiCompletePosition=s;}getPlaceholderText(t,i){let s=this.translate(t);if(zo(this.filterPlaceholder)){const o=this.filterPlaceholder,r=this.eTypes[i].getValue();s=o({filterOptionKey:r,filterOption:this.translate(r),placeholder:s});}else"string"==typeof this.filterPlaceholder&&(s=this.filterPlaceholder);return s;}resetPlaceholder(){const t=this.localeService.getLocaleTextFunc();this.forEachInput((i,s,o,r)=>{if(!(i instanceof dt))return;const n=0===s&&r>1?"inRangeStart":0===s?"filterOoo":"inRangeEnd",l=0===s&&r>1?t("ariaFilterFromValue","Filter from value"):0===s?t("ariaFilterValue","Filter Value"):t("ariaFilterToValue","Filter to Value");i.setInputPlaceholder(this.getPlaceholderText(n,o)),i.setInputAriaLabel(l);});}setElementValue(t,i,s){t instanceof dt&&t.setValue(null!=i?String(i):null,!0);}setElementDisplayed(t,i){t instanceof V&&K(t.getGui(),i);}setElementDisabled(t,i){t instanceof V&&Zi(t.getGui(),i);}attachElementOnChange(t,i){t instanceof dt&&t.onValueChange(i);}forEachInput(t){this.getConditionTypes().forEach((i,s)=>{this.forEachPositionTypeInput(s,i,t);});}forEachPositionInput(t,i){const s=this.getConditionType(t);this.forEachPositionTypeInput(t,s,i);}forEachPositionTypeInput(t,i,s){const o=this.getNumberOfInputs(i),r=this.getInputs(t);for(let n=0;n<r.length;n++){const l=r[n];null!=l&&s(l,n,t,o);}}isConditionDisabled(t,i){return!!this.isReadOnly()||0!==t&&t>i+1;}isConditionBodyVisible(t){const i=this.getConditionType(t);return this.getNumberOfInputs(i)>0;}isConditionUiComplete(t){return!(t>=this.getNumConditions()||this.getConditionType(t)===Ts.EMPTY||this.getValues(t).some(s=>null==s));}getNumConditions(){return this.eTypes.length;}
1getUiCompleteConditions(){const t=[];for(let i=0;i<this.getNumConditions();i++)this.isConditionUiComplete(i)&&t.push(this.createCondition(i));return t;}createMissingConditionsAndOperators(){if(!this.isReadOnly())for(let t=this.getNumConditions();t<this.numAlwaysVisibleConditions;t++)this.createJoinOperatorPanel(),this.createOption();}resetUiToDefaults(t){return this.removeConditionsAndOperators(this.isReadOnly()?1:this.numAlwaysVisibleConditions),this.eTypes.forEach(i=>this.resetType(i)),this.eJoinOperatorsAnd.forEach((i,s)=>this.resetJoinOperatorAnd(i,s,this.joinOperatorId+s)),this.eJoinOperatorsOr.forEach((i,s)=>this.resetJoinOperatorOr(i,s,this.joinOperatorId+s)),this.joinOperatorId++,this.forEachInput(i=>this.resetInput(i)),this.resetPlaceholder(),this.createMissingConditionsAndOperators(),this.lastUiCompletePosition=null,t||this.onUiChanged(),$e.resolve();}resetType(t){const s=this.localeService.getLocaleTextFunc()("ariaFilteringOperator","Filtering operator");t.setValue(this.optionsFactory.getDefaultOption(),!0).setAriaLabel(s).setDisabled(this.isReadOnly()||this.filterListOptions.length<=1);}resetJoinOperatorAnd(t,i,s){this.resetJoinOperator(t,i,this.isDefaultOperator("AND"),this.translate("andCondition"),s);}resetJoinOperatorOr(t,i,s){this.resetJoinOperator(t,i,this.isDefaultOperator("OR"),this.translate("orCondition"),s);}resetJoinOperator(t,i,s,o,r){this.updateJoinOperatorDisabled(t.setValue(s,!0).setName(`ag-simple-filter-and-or-${this.getCompId()}-${r}`).setLabel(o),i);}updateJoinOperatorsDisabled(){this.eJoinOperatorsAnd.forEach((t,i)=>this.updateJoinOperatorDisabled(t,i)),this.eJoinOperatorsOr.forEach((t,i)=>this.updateJoinOperatorDisabled(t,i));}updateJoinOperatorDisabled(t,i){t.setDisabled(this.isReadOnly()||i>0);}resetInput(t){this.setElementValue(t,null),this.setElementDisabled(t,this.isReadOnly());}setConditionIntoUi(t,i){const s=this.mapValuesFromModel(t);this.forEachInput((o,r,n,l)=>{n===i&&this.setElementValue(o,null!=s[r]?s[r]:null);});}setValueFromFloatingFilter(t){this.forEachInput((i,s,o,r)=>{this.setElementValue(i,0===s&&0===o?t:null,!0);});}isDefaultOperator(t){return t===this.defaultJoinOperator;}addChangedListeners(t,i){this.isReadOnly()||(t.onValueChange(this.listener),this.forEachPositionInput(i,s=>{this.attachElementOnChange(s,this.listener);}));}individualConditionPasses(t,i){const s=this.getCellValue(t.node),o=this.mapValuesFromModel(i),r=this.optionsFactory.getCustomOption(i.type);return this.evaluateCustomFilter(r,o,s)??(null==s?this.evaluateNullValue(i.type):this.evaluateNonNullValue(o,s,i,t));}evaluateCustomFilter(t,i,s){if(null==t)return;const{predicate:o}=t;return null==o||i.some(r=>null==r)?void 0:o(i,s);}isBlank(t){return null==t||"string"==typeof t&&0===t.trim().length;}hasInvalidInputs(){return!1;}};Ae.EMPTY="empty",Ae.BLANK="blank",Ae.NOT_BLANK="notBlank",Ae.EQUALS="equals",Ae.NOT_EQUAL="notEqual",Ae.LESS_THAN="lessThan",Ae.LESS_THAN_OR_EQUAL="lessThanOrEqual",Ae.GREATER_THAN="greaterThan",Ae.GREATER_THAN_OR_EQUAL="greaterThanOrEqual",Ae.IN_RANGE="inRange",Ae.CONTAINS="contains",Ae.NOT_CONTAINS="notContains",Ae.STARTS_WITH="startsWith",Ae.ENDS_WITH="endsWith";var ne=Ae,ce=class Ce extends ne{setParams(t){super.setParams(t),this.scalarFilterParams=t;}evaluateNullValue(t){switch(t){case Ce.EQUALS:case Ce.NOT_EQUAL:if(this.scalarFilterParams.includeBlanksInEquals)return!0;break;case Ce.GREATER_THAN:case Ce.GREATER_THAN_OR_EQUAL:if(this.scalarFilterParams.includeBlanksInGreaterThan)return!0;break;case Ce.LESS_THAN:case Ce.LESS_THAN_OR_EQUAL:if(this.scalarFilterParams.includeBlanksInLessThan)return!0;break;case Ce.IN_RANGE:if(this.scalarFilterParams.includeBlanksInRange)return!0;break;case Ce.BLANK:return!0;case Ce.NOT_BLANK:return!1;}return!1;}evaluateNonNullValue(t,i,s){const o=this.comparator(),r=null!=t[0]?o(t[0],i):0;switch(s.type){case Ce.EQUALS:return 0===r;case Ce.NOT_EQUAL:return 0!==r;case Ce.GREATER_THAN:return r>0;case Ce.GREATER_THAN_OR_EQUAL:return r>=0;case Ce.LESS_THAN:return r<0;case Ce.LESS_THAN_OR_EQUAL:return r<=0;case Ce.IN_RANGE:{const n=o(t[1],i);return this.scalarFilterParams.inRangeInclusive?r>=0&&n<=0:r>0&&n<0;}case Ce.BLANK:return this.isBlank(i);case Ce.NOT_BLANK:return!this.isBlank(i);default:return console.warn('AG Grid: Unexpected type of filter "'+s.type+'", it looks like the filter was configured with incorrect Filter Options'),!0;}}},wd=class extends Qn{constructor(e,t,i){super(t,i),this.dateFilterParams=e;}conditionToString(e,t){const{type:i}=e,{numberOfInputs:s}=t||{},o=i==ne.IN_RANGE||2===s,r=Ne(e.dateFrom),n=Ne(e.dateTo),l=this.dateFilterParams.inRangeFloatingFilterDateFormat;return o?`${null!==r?Xi(r,l):"null"}-${null!==n?Xi(n,l):"null"}`:null!=r?Xi(r,l):`${i}`;}updateParams(e){super.updateParams(e),this.dateFilterParams=e.dateFilterParams;}},Xn=class eh extends ce{constructor(){super("dateFilter"),this.eConditionPanelsFrom=[],this.eConditionPanelsTo=[],this.dateConditionFromComps=[],this.dateConditionToComps=[],this.minValidYear=1e3,this.maxValidYear=1/0,this.minValidDate=null,this.maxValidDate=null;}afterGuiAttached(t){super.afterGuiAttached(t),this.dateConditionFromComps[0].afterGuiAttached(t);}mapValuesFromModel(t){const{dateFrom:i,dateTo:s,type:o}=t||{};return[i&&Ne(i)||null,s&&Ne(s)||null].slice(0,this.getNumberOfInputs(o));}comparator(){return this.dateFilterParams.comparator?this.dateFilterParams.comparator:this.defaultComparator.bind(this);}defaultComparator(t,i){return null==i||i<t?-1:i>t?1:0;}setParams(t){this.dateFilterParams=t,super.setParams(t);const i=(s,o)=>
1{if(null!=t[s]){if(!isNaN(t[s]))return null==t[s]?o:Number(t[s]);console.warn(`AG Grid: DateFilter ${s} is not a number`);}return o;};this.minValidYear=i("minValidYear",1e3),this.maxValidYear=i("maxValidYear",1/0),this.minValidYear>this.maxValidYear&&console.warn("AG Grid: DateFilter minValidYear should be <= maxValidYear"),this.minValidDate=t.minValidDate?t.minValidDate instanceof Date?t.minValidDate:Ne(t.minValidDate):null,this.maxValidDate=t.maxValidDate?t.maxValidDate instanceof Date?t.maxValidDate:Ne(t.maxValidDate):null,this.minValidDate&&this.maxValidDate&&this.minValidDate>this.maxValidDate&&console.warn("AG Grid: DateFilter minValidDate should be <= maxValidDate"),this.filterModelFormatter=new wd(this.dateFilterParams,this.localeService,this.optionsFactory);}createDateCompWrapper(t){const i=new hd(this.getContext(),this.userComponentFactory,{onDateChanged:()=>this.onUiChanged(),filterParams:this.dateFilterParams},t);return this.addDestroyFunc(()=>i.destroy()),i;}setElementValue(t,i){t.setDate(i);}setElementDisplayed(t,i){t.setDisplayed(i);}setElementDisabled(t,i){t.setDisabled(i);}getDefaultFilterOptions(){return eh.DEFAULT_FILTER_OPTIONS;}createValueElement(){const i=this.gos.getDocument().createElement("div");return i.classList.add("ag-filter-body"),this.createFromToElement(i,this.eConditionPanelsFrom,this.dateConditionFromComps,"from"),this.createFromToElement(i,this.eConditionPanelsTo,this.dateConditionToComps,"to"),i;}createFromToElement(t,i,s,o){const n=this.gos.getDocument().createElement("div");n.classList.add(`ag-filter-${o}`),n.classList.add(`ag-filter-date-${o}`),i.push(n),t.appendChild(n),s.push(this.createDateCompWrapper(n));}removeValueElements(t,i){this.removeDateComps(this.dateConditionFromComps,t,i),this.removeDateComps(this.dateConditionToComps,t,i),this.removeItems(this.eConditionPanelsFrom,t,i),this.removeItems(this.eConditionPanelsTo,t,i);}removeDateComps(t,i,s){this.removeItems(t,i,s).forEach(r=>r.destroy());}isValidDateValue(t){if(null===t)return!1;if(this.minValidDate){if(t<this.minValidDate)return!1;}else if(t.getUTCFullYear()<this.minValidYear)return!1;if(this.maxValidDate){if(t>this.maxValidDate)return!1;}else if(t.getUTCFullYear()>this.maxValidYear)return!1;return!0;}isConditionUiComplete(t){if(!super.isConditionUiComplete(t))return!1;let i=!0;return this.forEachInput((s,o,r,n)=>{r!==t||!i||o>=n||(i=i&&this.isValidDateValue(s.getDate()));}),i;}areSimpleModelsEqual(t,i){return t.dateFrom===i.dateFrom&&t.dateTo===i.dateTo&&t.type===i.type;}getFilterType(){return"date";}createCondition(t){const i=this.getConditionType(t),s={},o=this.getValues(t);return o.length>0&&(s.dateFrom=Je(o[0])),o.length>1&&(s.dateTo=Je(o[1])),M({dateFrom:null,dateTo:null,filterType:this.getFilterType(),type:i},s);}resetPlaceholder(){const t=this.localeService.getLocaleTextFunc(),i=this.translate("dateFormatOoo"),s=t("ariaFilterValue","Filter Value");this.forEachInput(o=>{o.setInputPlaceholder(i),o.setInputAriaLabel(s);});}getInputs(t){return t>=this.dateConditionFromComps.length?[null,null]:[this.dateConditionFromComps[t],this.dateConditionToComps[t]];}getValues(t){const i=[];return this.forEachPositionInput(t,(s,o,r,n)=>{o<n&&i.push(s.getDate());}),i;}translate(t){return super.translate(t===ce.LESS_THAN?"before":t===ce.GREATER_THAN?"after":t);}getModelAsString(t){var i;return null!=(i=this.filterModelFormatter.getModelAsString(t))?i:"";}};Xn.DEFAULT_FILTER_OPTIONS=[ce.EQUALS,ce.NOT_EQUAL,ce.LESS_THAN,ce.GREATER_THAN,ce.IN_RANGE,ce.BLANK,ce.NOT_BLANK],d([g("userComponentFactory")],Xn.prototype,"userComponentFactory",2);var Zn=Xn,Jn=class extends V{getDefaultDebounceMs(){return 0;}destroy(){super.destroy();}isEventFromFloatingFilter(e){return e&&e.afterFloatingFilter;}isEventFromDataChange(e){return e?.afterDataChange;}getLastType(){return this.lastType;}isReadOnly(){return this.readOnly;}setLastTypeFromModel(e){if(!e)return void(this.lastType=this.optionsFactory.getDefaultOption());let i;i=e.operator?e.conditions[0]:e,this.lastType=i.type;}canWeEditAfterModelFromParentFilter(e){return e?!e.operator&&this.isTypeEditable(e.type):this.isTypeEditable(this.lastType);}
1init(e){this.setSimpleParams(e,!1);}setSimpleParams(e,t=!0){this.optionsFactory=new cd(),this.optionsFactory.init(e.filterParams,this.getDefaultFilterOptions()),t||(this.lastType=this.optionsFactory.getDefaultOption()),this.readOnly=!!e.filterParams.readOnly;const i=this.isTypeEditable(this.optionsFactory.getDefaultOption());this.setEditable(i);}onParamsUpdated(e){this.refresh(e);}refresh(e){this.setSimpleParams(e);}doesFilterHaveSingleInput(e){const t=this.optionsFactory.getCustomOption(e),{numberOfInputs:i}=t||{};return null==i||1==i;}isTypeEditable(e){const t=[ne.IN_RANGE,ne.EMPTY,ne.BLANK,ne.NOT_BLANK];return!!e&&!this.isReadOnly()&&this.doesFilterHaveSingleInput(e)&&t.indexOf(e)<0;}getAriaLabel(e){return`${this.columnModel.getDisplayNameForColumn(e.column,"header",!0)} ${this.localeService.getLocaleTextFunc()("ariaFilterInput","Filter Input")}`;}};d([g("columnModel")],Jn.prototype,"columnModel",2);var cr=class extends Jn{constructor(){super('\n <div class="ag-floating-filter-input" role="presentation">\n <ag-input-text-field ref="eReadOnlyText"></ag-input-text-field>\n <div ref="eDateWrapper" style="display: flex;"></div>\n </div>');}getDefaultFilterOptions(){return Zn.DEFAULT_FILTER_OPTIONS;}init(e){super.init(e),this.params=e,this.filterParams=e.filterParams,this.createDateComponent(),this.filterModelFormatter=new wd(this.filterParams,this.localeService,this.optionsFactory);const t=this.localeService.getLocaleTextFunc();this.eReadOnlyText.setDisabled(!0).setInputAriaLabel(t("ariaDateFilterInput","Date Filter Input"));}onParamsUpdated(e){this.refresh(e);}refresh(e){super.refresh(e),this.params=e,this.filterParams=e.filterParams,this.updateDateComponent(),this.filterModelFormatter.updateParams({optionsFactory:this.optionsFactory,dateFilterParams:this.filterParams}),this.updateCompOnModelChange(e.currentParentModel());}updateCompOnModelChange(e){const t=!this.isReadOnly()&&this.canWeEditAfterModelFromParentFilter(e);this.setEditable(t),t?(this.dateComp.setDate(e?Ne(e.dateFrom):null),this.eReadOnlyText.setValue("")):(this.eReadOnlyText.setValue(this.filterModelFormatter.getModelAsString(e)),this.dateComp.setDate(null));}setEditable(e){K(this.eDateWrapper,e),K(this.eReadOnlyText.getGui(),!e);}onParentModelChanged(e,t){this.isEventFromFloatingFilter(t)||this.isEventFromDataChange(t)||(super.setLastTypeFromModel(e),this.updateCompOnModelChange(e));}onDateChanged(){const t=Je(this.dateComp.getDate());this.params.parentFilterInstance(i=>{if(i){const s=Ne(t);i.onFloatingFilterChanged(this.getLastType()||null,s);}});}getDateComponentParams(){const e=Ys.getDebounceMs(this.params.filterParams,this.getDefaultDebounceMs());return{onDateChanged:Te(this.onDateChanged.bind(this),e),filterParams:this.params.column.getColDef().filterParams};}createDateComponent(){this.dateComp=new hd(this.getContext(),this.userComponentFactory,this.getDateComponentParams(),this.eDateWrapper,e=>{e.setInputAriaLabel(this.getAriaLabel(this.params));}),this.addDestroyFunc(()=>this.dateComp.destroy());}updateDateComponent(){const e=this.gos.addGridCommonParams(this.getDateComponentParams());this.dateComp.updateParams(e);}getFilterModelFormatter(){return this.filterModelFormatter;}};d([g("userComponentFactory")],cr.prototype,"userComponentFactory",2),d([A("eReadOnlyText")],cr.prototype,"eReadOnlyText",2),d([A("eDateWrapper")],cr.prototype,"eDateWrapper",2);var Sd=class extends V{constructor(){super('\n <div class="ag-filter-filter">\n <ag-input-text-field class="ag-date-filter" ref="eDateInput"></ag-input-text-field>\n </div>');}destroy(){super.destroy();}init(e){this.params=e,this.setParams(e);const t=this.eDateInput.getInputElement();this.addManagedListener(t,"mousedown",()=>{this.eDateInput.isDisabled()||this.usingSafariDatePicker||t.focus();}),this.addManagedListener(t,"input",i=>{i.target===this.gos.getActiveDomElement()&&(this.eDateInput.isDisabled()||this.params.onDateChanged());});}setParams(e){const t=this.eDateInput.getInputElement(),i=this.shouldUseBrowserDatePicker(e);this.usingSafariDatePicker=i&>(),t.type=i?"date":"text";const{minValidYear:s,maxValidYear:o,minValidDate:r,maxValidDate:n}=e.filterParams||{};if(r&&s&&O("DateFilter should not have both minValidDate and minValidYear parameters set at the same time! minValidYear will be ignored."),n&&o&&O("DateFilter should not have both maxValidDate and maxValidYear parameters set at the same time! maxValidYear will be ignored."),r&&n){const[l,a]=[r,n].map(u=>u instanceof Date?u:Ne(u));l&&a&&l.getTime()>a.getTime()&&O("DateFilter parameter minValidDate should always be lower than or equal to parameter maxValidDate.");}r?t.min=r instanceof Date?Xi(r):r:s&&(t.min=`${s}-01-01`),n?t.max=n instanceof Date?Xi(n):n:o&&(t.max=`${o}-12-31`);}onParamsUpdated(e){this.refresh(e);}refresh(e){this.params=e,this.setParams(e);}getDate(){return Ne(this.eDateInput.getValue());}setDate(e){this.eDateInput.setValue(Je(e,!1));}setInputPlaceholder(e){this.eDateInput.setInputPlaceholder(e);}setInputAriaLabel(e){this.eDateInput.setAriaLabel(e);}setDisabled(e){this.eDateInput.setDisabled(e);}afterGuiAttached(e){(!e||!e.suppressFocus)&&this.eDateInput.getInputElement().focus();}
1shouldUseBrowserDatePicker(e){return e.filterParams&&null!=e.filterParams.browserDatePicker?e.filterParams.browserDatePicker:ir()||Fn()||gt()&&An()>=14.1;}};d([A("eDateInput")],Sd.prototype,"eDateInput",2);var zt=class extends dt{constructor(e,t="ag-text-field",i="text"){super(e,t,i);}postConstruct(){super.postConstruct(),this.config.allowedCharPattern&&this.preventDisallowedCharacters();}setValue(e,t){return this.eInput.value!==e&&(this.eInput.value=y(e)?e:""),super.setValue(e,t);}setStartValue(e){this.setValue(e,!0);}preventDisallowedCharacters(){const e=new RegExp(`[${this.config.allowedCharPattern}]`);this.addManagedListener(this.eInput,"keydown",i=>{nr(i)&&i.key&&!e.test(i.key)&&i.preventDefault();}),this.addManagedListener(this.eInput,"paste",i=>{var s;const o=null==(s=i.clipboardData)?void 0:s.getData("text");o&&o.split("").some(r=>!e.test(r))&&i.preventDefault();});}},pr=class extends zt{constructor(e){super(e,"ag-number-field","number");}postConstruct(){super.postConstruct(),this.addManagedListener(this.eInput,"blur",()=>{const o=parseFloat(this.eInput.value),r=isNaN(o)?"":this.normalizeValue(o.toString());this.value!==r&&this.setValue(r);}),this.addManagedListener(this.eInput,"wheel",this.onWheel.bind(this)),this.eInput.step="any";const{precision:e,min:t,max:i,step:s}=this.config;"number"==typeof e&&this.setPrecision(e),"number"==typeof t&&this.setMin(t),"number"==typeof i&&this.setMax(i),"number"==typeof s&&this.setStep(s);}onWheel(e){this.gos.getActiveDomElement()===this.eInput&&e.preventDefault();}normalizeValue(e){if(""===e)return"";null!=this.precision&&(e=this.adjustPrecision(e));const t=parseFloat(e);return null!=this.min&&t<this.min?e=this.min.toString():null!=this.max&&t>this.max&&(e=this.max.toString()),e;}adjustPrecision(e,t){if(null==this.precision)return e;if(t){const s=parseFloat(e).toFixed(this.precision);return parseFloat(s).toString();}const i=String(e).split(".");if(i.length>1){if(i[1].length<=this.precision)return e;if(this.precision>0)return`${i[0]}.${i[1].slice(0,this.precision)}`;}return i[0];}setMin(e){return this.min===e||(this.min=e,ft(this.eInput,"min",e)),this;}setMax(e){return this.max===e||(this.max=e,ft(this.eInput,"max",e)),this;}setPrecision(e){return this.precision=e,this;}setStep(e){return this.step===e||(this.step=e,ft(this.eInput,"step",e)),this;}setValue(e,t){return this.setValueOrInputValue(i=>super.setValue(i,t),()=>this,e);}setStartValue(e){return this.setValueOrInputValue(t=>super.setValue(t,!0),t=>{this.eInput.value=t;},e);}setValueOrInputValue(e,t,i){if(y(i)){let s=this.isScientificNotation(i);if(s&&this.eInput.validity.valid)return e(i);if(s||(s=(i=this.adjustPrecision(i))!=this.normalizeValue(i)),s)return t(i);}return e(i);}getValue(){if(!this.eInput.validity.valid)return;const e=this.eInput.value;return this.isScientificNotation(e)?this.adjustPrecision(e,!0):super.getValue();}isScientificNotation(e){return"string"==typeof e&&e.includes("e");}},Ed=class extends Qn{conditionToString(e,t){const{numberOfInputs:i}=t||{};return e.type==ne.IN_RANGE||2===i?`${this.formatValue(e.filter)}-${this.formatValue(e.filterTo)}
1`:null!=e.filter?this.formatValue(e.filter):`${e.type}`;}};function el(e){const{allowedCharPattern:t}=e??{};return t??null;}var yd=class th extends ce{constructor(){super("numberFilter"),this.eValuesFrom=[],this.eValuesTo=[];}refresh(t){return this.numberFilterParams.allowedCharPattern===t.allowedCharPattern&&super.refresh(t);}mapValuesFromModel(t){const{filter:i,filterTo:s,type:o}=t||{};return[this.processValue(i),this.processValue(s)].slice(0,this.getNumberOfInputs(o));}getDefaultDebounceMs(){return 500;}comparator(){return(t,i)=>t===i?0:t<i?1:-1;}setParams(t){this.numberFilterParams=t,super.setParams(t),this.filterModelFormatter=new Ed(this.localeService,this.optionsFactory,this.numberFilterParams.numberFormatter);}getDefaultFilterOptions(){return th.DEFAULT_FILTER_OPTIONS;}setElementValue(t,i,s){const o=!s&&this.numberFilterParams.numberFormatter?this.numberFilterParams.numberFormatter(i??null):i;super.setElementValue(t,o);}createValueElement(){const t=el(this.numberFilterParams),i=document.createElement("div");return i.classList.add("ag-filter-body"),le(i,"presentation"),this.createFromToElement(i,this.eValuesFrom,"from",t),this.createFromToElement(i,this.eValuesTo,"to",t),i;}createFromToElement(t,i,s,o){const r=this.createManagedBean(o?new zt({allowedCharPattern:o}):new pr());r.addCssClass(`ag-filter-${s}`),r.addCssClass("ag-filter-filter"),i.push(r),t.appendChild(r.getGui());}removeValueElements(t,i){this.removeComponents(this.eValuesFrom,t,i),this.removeComponents(this.eValuesTo,t,i);}getValues(t){const i=[];return this.forEachPositionInput(t,(s,o,r,n)=>{o<n&&i.push(this.processValue(this.stringToFloat(s.getValue())));}),i;}areSimpleModelsEqual(t,i){return t.filter===i.filter&&t.filterTo===i.filterTo&&t.type===i.type;}getFilterType(){return"number";}processValue(t){return null==t||isNaN(t)?null:t;}stringToFloat(t){if("number"==typeof t)return t;let i=ot(t);return null!=i&&""===i.trim()&&(i=null),this.numberFilterParams.numberParser?this.numberFilterParams.numberParser(i):null==i||"-"===i.trim()?null:parseFloat(i);}createCondition(t){const i=this.getConditionType(t),s={filterType:this.getFilterType(),type:i},o=this.getValues(t);return o.length>0&&(s.filter=o[0]),o.length>1&&(s.filterTo=o[1]),s;}getInputs(t){return t>=this.eValuesFrom.length?[null,null]:[this.eValuesFrom[t],this.eValuesTo[t]];}getModelAsString(t){var i;return null!=(i=this.filterModelFormatter.getModelAsString(t))?i:"";}hasInvalidInputs(){let t=!1;return this.forEachInput(i=>{i.getInputElement().validity.valid||(t=!0);}),t;}};yd.DEFAULT_FILTER_OPTIONS=[ce.EQUALS,ce.NOT_EQUAL,ce.GREATER_THAN,ce.GREATER_THAN_OR_EQUAL,ce.LESS_THAN,ce.LESS_THAN_OR_EQUAL,ce.IN_RANGE,ce.BLANK,ce.NOT_BLANK];var tl=yd,Rd=class extends Qn{conditionToString(e,t){const{numberOfInputs:i}=t||{};return e.type==ne.IN_RANGE||2===i?`${e.filter}-${e.filterTo}
1`:null!=e.filter?`${e.filter}`:`${e.type}`;}},ut=class As extends ne{constructor(){super("textFilter"),this.eValuesFrom=[],this.eValuesTo=[];}static trimInput(t){const i=t&&t.trim();return""===i?t:i;}getDefaultDebounceMs(){return 500;}setParams(t){this.textFilterParams=t,super.setParams(t),this.matcher=this.getTextMatcher(),this.formatter=this.textFilterParams.textFormatter||(this.textFilterParams.caseSensitive?As.DEFAULT_FORMATTER:As.DEFAULT_LOWERCASE_FORMATTER),this.filterModelFormatter=new Rd(this.localeService,this.optionsFactory);}getTextMatcher(){const t=this.textFilterParams.textCustomComparator;return t?(B.warnOnce("textCustomComparator is deprecated, use textMatcher instead."),({filterOption:i,value:s,filterText:o})=>t(i,s,o)):this.textFilterParams.textMatcher||As.DEFAULT_MATCHER;}createCondition(t){const i=this.getConditionType(t),s={filterType:this.getFilterType(),type:i},o=this.getValuesWithSideEffects(t,!0);return o.length>0&&(s.filter=o[0]),o.length>1&&(s.filterTo=o[1]),s;}getFilterType(){return"text";}areSimpleModelsEqual(t,i){return t.filter===i.filter&&t.filterTo===i.filterTo&&t.type===i.type;}getInputs(t){return t>=this.eValuesFrom.length?[null,null]:[this.eValuesFrom[t],this.eValuesTo[t]];}getValues(t){return this.getValuesWithSideEffects(t,!1);}getValuesWithSideEffects(t,i){const s=[];return this.forEachPositionInput(t,(o,r,n,l)=>{var a;if(r<l){let u=ot(o.getValue());i&&this.textFilterParams.trimInput&&(u=null!=(a=As.trimInput(u))?a:null,o.setValue(u,!0)),s.push(u);}}),s;}getDefaultFilterOptions(){return As.DEFAULT_FILTER_OPTIONS;}createValueElement(){const t=document.createElement("div");return t.classList.add("ag-filter-body"),le(t,"presentation"),this.createFromToElement(t,this.eValuesFrom,"from"),this.createFromToElement(t,this.eValuesTo,"to"),t;}createFromToElement(t,i,s){const o=this.createManagedBean(new zt());o.addCssClass(`ag-filter-${s}`),o.addCssClass("ag-filter-filter"),i.push(o),t.appendChild(o.getGui());}removeValueElements(t,i){this.removeComponents(this.eValuesFrom,t,i),this.removeComponents(this.eValuesTo,t,i);}mapValuesFromModel(t){const{filter:i,filterTo:s,type:o}=t||{};return[i||null,s||null].slice(0,this.getNumberOfInputs(o));}evaluateNullValue(t){return!!t&&[ne.NOT_EQUAL,ne.NOT_CONTAINS,ne.BLANK].indexOf(t)>=0;}evaluateNonNullValue(t,i,s,o){const r=t.map(v=>this.formatter(v))||[],n=this.formatter(i),{api:l,colDef:a,column:u,columnApi:h,context:p,textFormatter:f}=this.textFilterParams;if(s.type===ne.BLANK)return this.isBlank(i);if(s.type===ne.NOT_BLANK)return!this.isBlank(i);const m={api:l,colDef:a,column:u,columnApi:h,context:p,node:o.node,data:o.data,filterOption:s.type,value:n,textFormatter:f};return r.some(v=>this.matcher(x(M({},m),{filterText:v})));}getModelAsString(t){var i;return null!=(i=this.filterModelFormatter.getModelAsString(t))?i:"";}};ut.DEFAULT_FILTER_OPTIONS=[ne.CONTAINS,ne.NOT_CONTAINS,ne.EQUALS,ne.NOT_EQUAL,ne.STARTS_WITH,ne.ENDS_WITH,ne.BLANK,ne.NOT_BLANK],ut.DEFAULT_FORMATTER=e=>e,ut.DEFAULT_LOWERCASE_FORMATTER=e=>null==e?null:e.toString().toLowerCase(),ut.DEFAULT_MATCHER=({filterOption:e,value:t,filterText:i})=>{if(null==i)return!1;switch(e){case ut.CONTAINS:return t.indexOf(i)>=0;case ut.NOT_CONTAINS:return t.indexOf(i)<0;case ut.EQUALS:return t===i;case ut.NOT_EQUAL:return t!=i;case ut.STARTS_WITH:return 0===t.indexOf(i);case ut.ENDS_WITH:const s=t.lastIndexOf(i);return s>=0&&s===t.length-i.length;default:return!1;}};var gr=ut,Dd=class extends R{constructor(e){super(),this.params=e,this.valueChangedListener=()=>{};}setupGui(e){var t;this.eFloatingFilterTextInput=this.createManagedBean(new zt(null==(t=this.params)?void 0:t.config));const i=this.eFloatingFilterTextInput.getGui();e.appendChild(i),this.addManagedListener(i,"input",s=>this.valueChangedListener(s)),this.addManagedListener(i,"keydown",s=>this.valueChangedListener(s));}setEditable(e){this.eFloatingFilterTextInput.setDisabled(!e);}setAutoComplete(e){this.eFloatingFilterTextInput.setAutoComplete(e);}getValue(){return this.eFloatingFilterTextInput.getValue();}setValue(e,t){this.eFloatingFilterTextInput.setValue(e,t);}setValueChangedListener(e){this.valueChangedListener=e;}setParams(e){this.setAriaLabel(e.ariaLabel),void 0!==e.autoComplete&&this.setAutoComplete(e.autoComplete);}setAriaLabel(e){this.eFloatingFilterTextInput.setInputAriaLabel(e);}},fr=class extends Jn{postConstruct(){this.setTemplate('\n <div class="ag-floating-filter-input" role="presentation" ref="eFloatingFilterInputContainer"></div>\n ');}getDefaultDebounceMs(){return 500;}onParentModelChanged(e,t){this.isEventFromFloatingFilter(t)||this.isEventFromDataChange(t)||(this.setLastTypeFromModel(e),this.setEditable(this.canWeEditAfterModelFromParentFilter(e)),this.floatingFilterInputService.setValue(this.getFilterModelFormatter().getModelAsString(e)));}init(e){this.setupFloatingFilterInputService(e),super.init(e),this.setTextInputParams(e);}setupFloatingFilterInputService(e){this.floatingFilterInputService=this.createFloatingFilterInputService(e),this.floatingFilterInputService.setupGui(this.eFloatingFilterInputContainer);}setTextInputParams(e){var t;this.params=e;const i=null!=(t=e.browserAutoComplete)&&t;if(this.floatingFilterInputService.setParams({ariaLabel:this.getAriaLabel(e),autoComplete:i}),this.applyActive=Ys.isUseApplyButton(this.params.filterParams),!this.isReadOnly()){const s=Ys.getDebounceMs(this.params.filterParams,this.getDefaultDebounceMs()),o=Te(this.syncUpWithParentFilter.bind(this),s);this.floatingFilterInputService.setValueChangedListener(o);}}onParamsUpdated(e){this.refresh(e);}refresh(e){super.refresh(e),this.setTextInputParams(e);}recreateFloatingFilterInputService(e){const t=this.floatingFilterInputService.getValue();de(this.eFloatingFilterInputContainer),this.destroyBean(this.floatingFilterInputService),this.setupFloatingFilterInputService(e),this.floatingFilterInputService.setValue(t,!0);}syncUpWithParentFilter(e){if(this.applyActive&&e.key!==C.ENTER)return;let i=this.floatingFilterInputService.getValue();
1this.params.filterParams.trimInput&&(i=gr.trimInput(i),this.floatingFilterInputService.setValue(i,!0)),this.params.parentFilterInstance(s=>{s&&s.onFloatingFilterChanged(this.getLastType()||null,i||null);});}setEditable(e){this.floatingFilterInputService.setEditable(e);}};d([A("eFloatingFilterInputContainer")],fr.prototype,"eFloatingFilterInputContainer",2),d([T],fr.prototype,"postConstruct",1);var vc=class extends R{constructor(){super(...arguments),this.valueChangedListener=()=>{},this.numberInputActive=!0;}setupGui(e){this.eFloatingFilterNumberInput=this.createManagedBean(new pr()),this.eFloatingFilterTextInput=this.createManagedBean(new zt()),this.eFloatingFilterTextInput.setDisabled(!0);const t=this.eFloatingFilterNumberInput.getGui(),i=this.eFloatingFilterTextInput.getGui();e.appendChild(t),e.appendChild(i),this.setupListeners(t,s=>this.valueChangedListener(s)),this.setupListeners(i,s=>this.valueChangedListener(s));}setEditable(e){this.numberInputActive=e,this.eFloatingFilterNumberInput.setDisplayed(this.numberInputActive),this.eFloatingFilterTextInput.setDisplayed(!this.numberInputActive);}setAutoComplete(e){this.eFloatingFilterNumberInput.setAutoComplete(e),this.eFloatingFilterTextInput.setAutoComplete(e);}getValue(){return this.getActiveInputElement().getValue();}setValue(e,t){this.getActiveInputElement().setValue(e,t);}getActiveInputElement(){return this.numberInputActive?this.eFloatingFilterNumberInput:this.eFloatingFilterTextInput;}setValueChangedListener(e){this.valueChangedListener=e;}setupListeners(e,t){this.addManagedListener(e,"input",t),this.addManagedListener(e,"keydown",t);}setParams(e){this.setAriaLabel(e.ariaLabel),void 0!==e.autoComplete&&this.setAutoComplete(e.autoComplete);}setAriaLabel(e){this.eFloatingFilterNumberInput.setInputAriaLabel(e),this.eFloatingFilterTextInput.setInputAriaLabel(e);}},wc=class extends fr{init(e){var t;super.init(e),this.filterModelFormatter=new Ed(this.localeService,this.optionsFactory,null==(t=e.filterParams)?void 0:t.numberFormatter);}onParamsUpdated(e){this.refresh(e);}refresh(e){el(e.filterParams)!==this.allowedCharPattern&&this.recreateFloatingFilterInputService(e),super.refresh(e),this.filterModelFormatter.updateParams({optionsFactory:this.optionsFactory});}getDefaultFilterOptions(){return tl.DEFAULT_FILTER_OPTIONS;}getFilterModelFormatter(){return this.filterModelFormatter;}createFloatingFilterInputService(e){return this.allowedCharPattern=el(e.filterParams),this.createManagedBean(this.allowedCharPattern?new Dd({config:{allowedCharPattern:this.allowedCharPattern}}):new vc());}},bd=class extends fr{init(e){super.init(e),this.filterModelFormatter=new Rd(this.localeService,this.optionsFactory);}onParamsUpdated(e){this.refresh(e);}refresh(e){super.refresh(e),this.filterModelFormatter.updateParams({optionsFactory:this.optionsFactory});}getDefaultFilterOptions(){return gr.DEFAULT_FILTER_OPTIONS;}getFilterModelFormatter(){return this.filterModelFormatter;}createFloatingFilterInputService(){return this.createManagedBean(new Dd());}},Qs=class Go{constructor(t,i=!1){this.destroyFuncs=[],this.touching=!1,this.eventService=new Qe(),this.eElement=t,this.preventMouseClick=i;const s=this.onTouchStart.bind(this),o=this.onTouchMove.bind(this),r=this.onTouchEnd.bind(this);this.eElement.addEventListener("touchstart",s,{passive:!0}),this.eElement.addEventListener("touchmove",o,{passive:!0}),this.eElement.addEventListener("touchend",r,{passive:!1}),this.destroyFuncs.push(()=>{this.eElement.removeEventListener("touchstart",s,{passive:!0}),this.eElement.removeEventListener("touchmove",o,{passive:!0}),this.eElement.removeEventListener("touchend",r,{passive:!1});});}getActiveTouch(t){for(let i=0;i<t.length;i++)if(t[i].identifier===this.touchStart.identifier)return t[i];return null;}addEventListener(t,i){this.eventService.addEventListener(t,i);}removeEventListener(t,i){this.eventService.removeEventListener(t,i);}onTouchStart(t){if(this.touching)return;this.touchStart=t.touches[0],this.touching=!0,this.moved=!1;const i=this.touchStart;window.setTimeout(()=>{this.touching&&this.touchStart===i&&!this.moved&&(this.moved=!0,this.eventService.dispatchEvent({type:Go.EVENT_LONG_TAP,touchStart:this.touchStart,touchEvent:t}));},500);}onTouchMove(t){if(!this.touching)return;const i=this.getActiveTouch(t.touches);i&&!Kn(i,this.touchStart,4)&&(this.moved=!0);}onTouchEnd(t){this.touching&&(this.moved||(this.eventService.dispatchEvent({type:Go.EVENT_TAP,touchStart:this.touchStart}),this.checkForDoubleTap()),this.preventMouseClick&&t.cancelable&&t.preventDefault(),this.touching=!1);}checkForDoubleTap(){const t=new Date().getTime();this.lastTapTime&&this.lastTapTime>0&&t-this.lastTapTime>Go.DOUBLE_TAP_MILLIS?(this.eventService.dispatchEvent({type:Go.EVENT_DOUBLE_TAP,touchStart:this.touchStart}),this.lastTapTime=null):this.lastTapTime=t;}destroy(){this.destroyFuncs.forEach(t=>t());}};Qs.EVENT_TAP="tap",Qs.EVENT_DOUBLE_TAP="doubleTap",Qs.EVENT_LONG_TAP="longTap",Qs.DOU
1BLE_TAP_MILLIS=500;var me=Qs,Mt=class ih extends V{constructor(t){super(),t||this.setTemplate(ih.TEMPLATE);}attachCustomElements(t,i,s,o,r){this.eSortOrder=t,this.eSortAsc=i,this.eSortDesc=s,this.eSortMixed=o,this.eSortNone=r;}setupSort(t,i=!1){this.column=t,this.suppressOrder=i,this.setupMultiSortIndicator(),(this.column.isSortable()||this.column.getColDef().showRowGroup)&&(this.addInIcon("sortAscending",this.eSortAsc,t),this.addInIcon("sortDescending",this.eSortDesc,t),this.addInIcon("sortUnSort",this.eSortNone,t),this.addManagedPropertyListener("unSortIcon",()=>this.updateIcons()),this.addManagedListener(this.eventService,c.EVENT_NEW_COLUMNS_LOADED,()=>this.updateIcons()),this.addManagedListener(this.eventService,c.EVENT_SORT_CHANGED,()=>this.onSortChanged()),this.addManagedListener(this.eventService,c.EVENT_COLUMN_ROW_GROUP_CHANGED,()=>this.onSortChanged()),this.onSortChanged());}addInIcon(t,i,s){if(null==i)return;const o=re(t,this.gos,s);o&&i.appendChild(o);}onSortChanged(){this.updateIcons(),this.suppressOrder||this.updateSortOrder();}updateIcons(){const t=this.sortController.getDisplaySortForColumn(this.column);if(this.eSortAsc&&K(this.eSortAsc,"asc"===t,{skipAriaHidden:!0}),this.eSortDesc&&K(this.eSortDesc,"desc"===t,{skipAriaHidden:!0}),this.eSortNone){const i=!this.column.getColDef().unSortIcon&&!this.gos.get("unSortIcon");K(this.eSortNone,!i&&null==t,{skipAriaHidden:!0});}}setupMultiSortIndicator(){this.addInIcon("sortUnSort",this.eSortMixed,this.column);const t=this.column.getColDef().showRowGroup;this.gos.isColumnsSortingCoupledToGroup()&&t&&(this.addManagedListener(this.eventService,c.EVENT_SORT_CHANGED,()=>this.updateMultiSortIndicator()),this.addManagedListener(this.eventService,c.EVENT_COLUMN_ROW_GROUP_CHANGED,()=>this.updateMultiSortIndicator()),this.updateMultiSortIndicator());}updateMultiSortIndicator(){if(this.eSortMixed){const t="mixed"===this.sortController.getDisplaySortForColumn(this.column);K(this.eSortMixed,t,{skipAriaHidden:!0});}}updateSortOrder(){var t;if(!this.eSortOrder)return;const i=this.sortController.getColumnsWithSortingOrdered(),s=null!=(t=this.sortController.getDisplaySortIndexForColumn(this.column))?t:-1,o=i.some(n=>{var l;return null!=(l=this.sortController.getDisplaySortIndexForColumn(n))&&l;});K(this.eSortOrder,s>=0&&o,{skipAriaHidden:!0}),s>=0?this.eSortOrder.textContent=(s+1).toString():de(this.eSortOrder);}};Mt.TEMPLATE='<span class="ag-sort-indicator-container">\n <span ref="eSortOrder" class="ag-sort-indicator-icon ag-sort-order ag-hidden" aria-hidden="true"></span>\n <span ref="eSortAsc" class="ag-sort-indicator-icon ag-sort-ascending-icon ag-hidden" aria-hidden="true"></span>\n <span ref="eSortDesc" class="ag-sort-indicator-icon ag-sort-descending-icon ag-hidden" aria-hidden="true"></span>\n <span ref="eSortMixed" class="ag-sort-indicator-icon ag-sort-mixed-icon ag-hidden" aria-hidden="true"></span>\n <span ref="eSortNone" class="ag-sort-indicator-icon ag-sort-none-icon ag-hidden" aria-hidden="true"></span>\n </span>',d([A("eSortOrder")],Mt.prototype,"eSortOrder",2),d([A("eSortAsc")],Mt.prototype,"eSortAsc",2),d([A("eSortDesc")],Mt.prototype,"eSortDesc",2),d([A("eSortMixed")],Mt.prototype,"eSortMixed",2),d([A("eSortNone")],Mt.prototype,"eSortNone",2),d([g("columnModel")],Mt.prototype,"columnModel",2),d([g("sortController")],Mt.prototype,"sortController",2);var mr=Mt,ye=class sh extends V{constructor(){super(...arguments),this.lastMovingChanged=0;}destroy(){super.destroy();}refresh(t){const i=this.params;return this.params=t,this.workOutTemplate()==this.currentTemplate&&this.workOutShowMenu()==this.currentShowMenu&&this.workOutSort()==this.currentSort&&this.shouldSuppressMenuHide()==this.currentSuppressMenuHide&&i.enableFilterButton==t.enableFilterButton&&i.enableFilterIcon==t.enableFilterIcon&&(this.setDisplayName(t),!0);}workOutTemplate(){var t;let i=null!=(t=this.params.template)?t:sh.TEMPLATE;return i=i&&i.trim?i.trim():i,i;}init(t){this.params=t,this.currentTemplate=this.workOutTemplate(),this.setTemplate(this.currentTemplate),this.setupTap(),this.setMenu(),this.setupSort(),this.setupFilterIcon(),this.setupFilterButton(),this.setDisplayName(t);}setDisplayName(t){if(this.currentDisplayName!=t.displayName){this.currentDisplayName=t.displayName;const i=he(this.currentDisplayName,!0);this.eText&&(this.eText.textContent=i);}}addInIcon(t,i,s){if(null==i)return;const o=re(t,this.gos,s);o&&i.appendChild(o);}setupTap(){const{gos:t}=this;if(t.get("suppressTouch"))return;const i=new me(this.getGui(),!0),s=this.shouldSuppressMenuHide(),o=s&&y(this.eMenu),r=o?new me(this.eMenu,!0):i;if(this.params.enableMenu&&this.addManagedListener(r,me[o?"EVENT_TAP":"EVENT_LONG_TAP"],a=>this.params.showColumnMenuAfterMouseClick(a.touchStart)),this.params.enableSorting&&this.addManagedListener(i,me.EVENT_TAP,l=>{var a,u;const h=l.touchStart.target;s&&(null!=(a=this.eMenu)&&a.contains(h)||null!=(u=this.eFilterButton)&&u.contains(h))||this.sortController.progressSort(this.params.column,!1,"uiColumnSorted");}),this.params.enableFilterButton){const n=new me(this.eFilterButton,!0);this.addManagedListener(n,"tap",()=>this.params.showFilter(this.eFilterButton)),this.addDestroyFunc(()=>n.destroy());}this.addDestroyFunc(()=>i.destroy()),o&&this.addDestroyFunc(()=>r.destroy());}workOutShowMenu(){return this.params.enableMenu&&this.menuService.isHeaderMenuButtonEnabled();}shouldSuppressMenuHide(){return this.menuService.isHeaderMenuButtonAlwaysShowEnabled();}
1setMenu(){if(!this.eMenu)return;if(this.currentShowMenu=this.workOutShowMenu(),!this.currentShowMenu)return at(this.eMenu),void(this.eMenu=void 0);const t=this.menuService.isLegacyMenuEnabled();this.addInIcon(t?"menu":"menuAlt",this.eMenu,this.params.column),this.eMenu.classList.toggle("ag-header-menu-icon",!t),this.currentSuppressMenuHide=this.shouldSuppressMenuHide(),this.addManagedListener(this.eMenu,"click",()=>this.params.showColumnMenu(this.eMenu)),this.eMenu.classList.toggle("ag-header-menu-always-show",this.currentSuppressMenuHide);}onMenuKeyboardShortcut(t){var i,s,o,r;const{column:n}=this.params,l=this.menuService.isLegacyMenuEnabled();if(t&&!l){if(this.menuService.isFilterMenuInHeaderEnabled(n))return this.params.showFilter(null!=(s=null!=(i=this.eFilterButton)?i:this.eMenu)?s:this.getGui()),!0;}else if(this.params.enableMenu)return this.params.showColumnMenu(null!=(r=null!=(o=this.eMenu)?o:this.eFilterButton)?r:this.getGui()),!0;return!1;}workOutSort(){return this.params.enableSorting;}setupSort(){if(this.currentSort=this.params.enableSorting,this.eSortIndicator||(this.eSortIndicator=this.context.createBean(new mr(!0)),this.eSortIndicator.attachCustomElements(this.eSortOrder,this.eSortAsc,this.eSortDesc,this.eSortMixed,this.eSortNone)),this.eSortIndicator.setupSort(this.params.column),!this.currentSort)return;this.addManagedListener(this.params.column,Z.EVENT_MOVING_CHANGED,()=>{this.lastMovingChanged=new Date().getTime();}),this.eLabel&&this.addManagedListener(this.eLabel,"click",i=>{if(!(this.params.column.isMoving()||new Date().getTime()-this.lastMovingChanged<50)){const a="ctrl"===this.gos.get("multiSortKey")?i.ctrlKey||i.metaKey:i.shiftKey;this.params.progressSort(a);}});const t=()=>{if(this.addOrRemoveCssClass("ag-header-cell-sorted-asc",this.params.column.isSortAscending()),this.addOrRemoveCssClass("ag-header-cell-sorted-desc",this.params.column.isSortDescending()),this.addOrRemoveCssClass("ag-header-cell-sorted-none",this.params.column.isSortNone()),this.params.column.getColDef().showRowGroup){const i=this.columnModel.getSourceColumnsForGroupColumn(this.params.column),o=!i?.every(r=>this.params.column.getSort()==r.getSort());this.addOrRemoveCssClass("ag-header-cell-sorted-mixed",o);}};this.addManagedListener(this.eventService,c.EVENT_SORT_CHANGED,t),this.addManagedListener(this.eventService,c.EVENT_COLUMN_ROW_GROUP_CHANGED,t);}setupFilterIcon(){this.eFilter&&this.configureFilter(this.params.enableFilterIcon,this.eFilter,this.onFilterChangedIcon.bind(this));}setupFilterButton(){this.eFilterButton&&(this.configureFilter(this.params.enableFilterButton,this.eFilterButton,this.onFilterChangedButton.bind(this))?this.addManagedListener(this.eFilterButton,"click",()=>this.params.showFilter(this.eFilterButton)):this.eFilterButton=void 0);}configureFilter(t,i,s){if(!t)return at(i),!1;const{column:o}=this.params;return this.addInIcon("filter",i,o),this.addManagedListener(o,Z.EVENT_FILTER_CHANGED,s),s(),!0;}onFilterChangedIcon(){const t=this.params.column.isFilterActive();K(this.eFilter,t,{skipAriaHidden:!0});}onFilterChangedButton(){const t=this.params.column.isFilterActive();this.eFilterButton.classList.toggle("ag-filter-active",t);}getAnchorElementForMenu(t){var i,s,o,r;return t?null!=(s=null!=(i=this.eFilterButton)?i:this.eMenu)?s:this.getGui():null!=(r=null!=(o=this.eMenu)?o:this.eFilterButton)?r:this.getGui();}};ye.TEMPLATE='<div class="ag-cell-label-container" role="presentation">\n <span ref="eMenu" class="ag-header-icon ag-header-cell-menu-button" aria-hidden="true"></span>\n <span ref="eFilterButton" class="ag-header-icon ag-header-cell-filter-button" aria-hidden="true"></span>\n <div ref="eLabel" class="ag-header-cell-label" role="presentation">\n <span ref="eText" class="ag-header-cell-text"></span>\n <span ref="eFilter" class="ag-header-icon ag-header-label-icon ag-filter-icon" aria-hidden="true"></span>\n <ag-sort-indicator ref="eSortIndicator"></ag-sort-indicator>\n </div>\n </div>',d([g("sortController")],ye.prototype,"sortController",2),d([g("menuService")],ye.prototype,"menuService",2),d([g("columnModel")],ye.prototype,"columnModel",2),d([A("eFilter")],ye.prototype,"eFilter",2),d([A("eFilterButton")],ye.prototype,"eFilterButton",2),d([A("eSortIndicator")],ye.prototype,"eSortIndicator",2),d([A("eMenu")],ye.prototype,"eMenu",2),d([A("eLabel")],ye.prototype,"eLabel",2),d([A("eText")],ye.prototype,"eText",2),d([A("eSortOrder")],ye.prototype,"eSortOrder",2),d([A("eSortAsc")],ye.prototype,"eSortAsc",2),d([A("eSortDe
1sc")],ye.prototype,"eSortDesc",2),d([A("eSortMixed")],ye.prototype,"eSortMixed",2),d([A("eSortNone")],ye.prototype,"eSortNone",2);var il=ye,Xs=class oh extends V{constructor(){super(oh.TEMPLATE);}destroy(){super.destroy();}init(t){this.params=t,this.checkWarnings(),this.setupLabel(),this.addGroupExpandIcon(),this.setupExpandIcons();}checkWarnings(){this.params.template&&O("A template was provided for Header Group Comp - templates are only supported for Header Comps (not groups)");}setupExpandIcons(){this.addInIcon("columnGroupOpened","agOpened"),this.addInIcon("columnGroupClosed","agClosed");const t=o=>{if(lt(o))return;const r=!this.params.columnGroup.isExpanded();this.columnModel.setColumnGroupOpened(this.params.columnGroup.getProvidedColumnGroup(),r,"uiColumnExpanded");};this.addTouchAndClickListeners(this.eCloseIcon,t),this.addTouchAndClickListeners(this.eOpenIcon,t);const i=o=>{nt(o);};this.addManagedListener(this.eCloseIcon,"dblclick",i),this.addManagedListener(this.eOpenIcon,"dblclick",i),this.addManagedListener(this.getGui(),"dblclick",t),this.updateIconVisibility();const s=this.params.columnGroup.getProvidedColumnGroup();this.addManagedListener(s,ae.EVENT_EXPANDED_CHANGED,this.updateIconVisibility.bind(this)),this.addManagedListener(s,ae.EVENT_EXPANDABLE_CHANGED,this.updateIconVisibility.bind(this));}addTouchAndClickListeners(t,i){const s=new me(t,!0);this.addManagedListener(s,me.EVENT_TAP,i),this.addDestroyFunc(()=>s.destroy()),this.addManagedListener(t,"click",i);}updateIconVisibility(){if(this.params.columnGroup.isExpandable()){const i=this.params.columnGroup.isExpanded();K(this.eOpenIcon,i),K(this.eCloseIcon,!i);}else K(this.eOpenIcon,!1),K(this.eCloseIcon,!1);}addInIcon(t,i){const s=re(t,this.gos,null);s&&this.getRefElement(i).appendChild(s);}addGroupExpandIcon(){if(!this.params.columnGroup.isExpandable())return K(this.eOpenIcon,!1),void K(this.eCloseIcon,!1);}setupLabel(){var t;const{displayName:i,columnGroup:s}=this.params;if(y(i)){const o=he(i,!0);this.getRefElement("agLabel").textContent=o;}this.addOrRemoveCssClass("ag-sticky-label",!(null!=(t=s.getColGroupDef())&&t.suppressStickyLabel));}};Xs.TEMPLATE='<div class="ag-header-group-cell-label" ref="agContainer" role="presentation">\n <span ref="agLabel" class="ag-header-group-text" role="presentation"></span>\n <span ref="agOpened" class="ag-header-icon ag-header-expand-icon ag-header-expand-icon-expanded"></span>\n <span ref="agClosed" class="ag-header-icon ag-header-expand-icon ag-header-expand-icon-collapsed"></span>\n </div>',d([g("columnModel")],Xs.prototype,"columnModel",2),d([A("agOpened")],Xs.prototype,"eOpenIcon",2),d([A("agClosed")],Xs.prototype,"eCloseIcon",2);var Sc=Xs,Kt=class extends V{isPopup(){return!0;}setParentComponent(e){e.addCssClass("ag-has-popup"),super.setParentComponent(e);}destroy(){const e=this.parentComponent;e&&e.isAlive()&&e.getGui().classList.remove("ag-has-popup"),super.destroy();}},sl=class rh extends Kt{constructor(){super(rh.TEMPLATE);}init(t){this.params=t,this.focusAfterAttached=t.cellStartedEdit,this.eTextArea.setMaxLength(t.maxLength||200).setCols(t.cols||60).setRows(t.rows||10),y(t.value,!0)&&this.eTextArea.setValue(t.value.toString(),!0),this.addGuiEventListener("keydown",this.onKeyDown.bind(this)),this.activateTabIndex();}onKeyDown(t){const i=t.key;(i===C.LEFT||i===C.UP||i===C.RIGHT||i===C.DOWN||t.shiftKey&&i===C.ENTER)&&t.stopPropagation();}afterGuiAttached(){const t=this.localeService.getLocaleTextFunc();this.eTextArea.setInputAriaLabel(t("ariaInputEditor","Input Editor")),this.focusAfterAttached&&this.eTextArea.getFocusableElement().focus();}getValue(){const t=this.eTextArea.getValue();return y(t)||y(this.params.value)?this.params.parseValue(t):this.params.value;}};sl.TEMPLATE='<div class="ag-large-text">\n <ag-input-text-area ref="eTextArea" class="ag-large-text-input"></ag-input-text-area>\n </div>',d([A("eTextArea")],sl.prototype,"eTextArea",2);var Td=sl,Cr=class extends Kt{constructor(){super('<div class="ag-cell-edit-wrapper">\n <ag-select class="ag-cell-editor" ref="eSelect"></ag-select>\n </div>'),this.startedByEnter=!1;}init(e){this.focusAfterAttached=e.cellStartedEdit;const{eSelect:t,valueService:i,gos:s}
1=this,{values:o,value:r,eventKey:n}=e;if(_(o))return void console.warn("AG Grid: no values found for select cellEditor");this.startedByEnter=null!=n&&n===C.ENTER;let l=!1;o.forEach(p=>{const f={value:p},m=i.formatValue(e.column,null,p);f.text=null!=m?m:p,t.addOption(f),l=l||r===p;}),l?t.setValue(e.value,!0):e.values.length&&t.setValue(e.values[0],!0);const{valueListGap:a,valueListMaxWidth:u,valueListMaxHeight:h}=e;null!=a&&t.setPickerGap(a),null!=h&&t.setPickerMaxHeight(h),null!=u&&t.setPickerMaxWidth(u),"fullRow"!==s.get("editType")&&this.addManagedListener(this.eSelect,js.EVENT_ITEM_SELECTED,()=>e.stopEditing());}afterGuiAttached(){this.focusAfterAttached&&this.eSelect.getFocusableElement().focus(),this.startedByEnter&&setTimeout(()=>{this.isAlive()&&this.eSelect.showPicker();});}focusIn(){this.eSelect.getFocusableElement().focus();}getValue(){return this.eSelect.getValue();}isPopup(){return!1;}};d([g("valueService")],Cr.prototype,"valueService",2),d([A("eSelect")],Cr.prototype,"eSelect",2);var Zs=class extends Kt{constructor(e){super(`\n <div class="ag-cell-edit-wrapper">\n ${e.getTemplate()}\n </div>`),this.cellEditorInput=e;}init(e){this.params=e;const t=this.eInput;let i;if(this.cellEditorInput.init(t,e),e.cellStartedEdit){this.focusAfterAttached=!0;const s=e.eventKey;s===C.BACKSPACE||e.eventKey===C.DELETE?i="":s&&1===s.length?i=s:(i=this.cellEditorInput.getStartValue(),s!==C.F2&&(this.highlightAllOnFocus=!0));}else this.focusAfterAttached=!1,i=this.cellEditorInput.getStartValue();null!=i&&t.setStartValue(i),this.addManagedListener(t.getGui(),"keydown",s=>{const{key:o}=s;(o===C.PAGE_UP||o===C.PAGE_DOWN)&&s.preventDefault();});}afterGuiAttached(){var e,t;const i=this.localeService.getLocaleTextFunc(),s=this.eInput;if(s.setInputAriaLabel(i("ariaInputEditor","Input Editor")),!this.focusAfterAttached)return;gt()||s.getFocusableElement().focus();const o=s.getInputElement();this.highlightAllOnFocus?o.select():null==(t=(e=this.cellEditorInput).setCaret)||t.call(e);}focusIn(){const e=this.eInput,t=e.getFocusableElement(),i=e.getInputElement();t.focus(),i.select();}getValue(){return this.cellEditorInput.getValue();}isPopup(){return!1;}};d([A("eInput")],Zs.prototype,"eInput",2);var ol=class extends Zs{constructor(){super(new class{getTemplate(){return'<ag-input-text-field class="ag-cell-editor" ref="eInput"></ag-input-text-field>';}init(e,t){this.eInput=e,this.params=t,null!=t.maxLength&&e.setMaxLength(t.maxLength);}getValue(){const e=this.eInput.getValue();return y(e)||y(this.params.value)?this.params.parseValue(e):this.params.value;}getStartValue(){return this.params.useFormatter||this.params.column.getColDef().refData?this.params.formatValue(this.params.value):this.params.value;}setCaret(){const e=this.eInput.getValue(),t=y(e)&&e.length||0;t&&this.eInput.getInputElement().setSelectionRange(t,t);}}());}},rl=class extends V{constructor(){super(),this.refreshCount=0;const e=document.createElement("span"),t=document.createElement("span");t.setAttribute("class","ag-value-change-delta");const i=document.createElement("span");i.setAttribute("class","ag-value-change-value"),e.appendChild(t),e.appendChild(i),this.setTemplateFromElement(e);}init(e){this.eValue=this.queryForHtmlElement(".ag-value-change-value"),this.eDelta=this.queryForHtmlElement(".ag-value-change-delta"),this.refresh(e,!0);}showDelta(e,t){const i=Math.abs(t),s=e.formatValue(i),o=y(s)?s:i,r=t>=0;this.eDelta.textContent=r?"\u2191"+o:"\u2193"+o,this.eDelta.classList.toggle("ag-value-change-delta-up",r),this.eDelta.classList.toggle("ag-value-change-delta-down",!r);}setTimerToRemoveDelta(){this.refreshCount++;const e=this.refreshCount;this.getFrameworkOverrides().wrapIncoming(()=>{window.setTimeout(()=>{e===this.refreshCount&&this.hideDeltaValue();},2e3);});}hideDeltaValue(){this.eValue.classList.remove("ag-value-change-value-highlight"),de(this.eDelta);}refresh(e,t=!1){const i=e.value;return i!==this.lastValue&&(y(e.valueFormatted)?this.eValue.textContent=e.valueFormatted:y(e.value)?this.eValue.textContent=i:de(this.eValue),!this.filterManager.isSuppressFlashingCellsBecauseFiltering())&&
1("number"==typeof i&&"number"==typeof this.lastValue&&this.showDelta(e,i-this.lastValue),this.lastValue&&this.eValue.classList.add("ag-value-change-value-highlight"),t||this.setTimerToRemoveDelta(),this.lastValue=i,!0);}};d([g("filterManager")],rl.prototype,"filterManager",2);var nl=class extends V{constructor(){super(),this.refreshCount=0;const e=document.createElement("span"),t=document.createElement("span");t.setAttribute("class","ag-value-slide-current"),e.appendChild(t),this.setTemplateFromElement(e),this.eCurrent=this.queryForHtmlElement(".ag-value-slide-current");}init(e){this.refresh(e,!0);}addSlideAnimation(){this.refreshCount++;const e=this.refreshCount;this.ePrevious&&this.getGui().removeChild(this.ePrevious);const t=document.createElement("span");t.setAttribute("class","ag-value-slide-previous ag-value-slide-out"),this.ePrevious=t,this.ePrevious.textContent=this.eCurrent.textContent,this.getGui().insertBefore(this.ePrevious,this.eCurrent),this.getFrameworkOverrides().wrapIncoming(()=>{window.setTimeout(()=>{e===this.refreshCount&&this.ePrevious.classList.add("ag-value-slide-out-end");},50),window.setTimeout(()=>{e===this.refreshCount&&(this.getGui().removeChild(this.ePrevious),this.ePrevious=null);},3e3);});}refresh(e,t=!1){let i=e.value;return _(i)&&(i=""),i!==this.lastValue&&!this.filterManager.isSuppressFlashingCellsBecauseFiltering()&&(t||this.addSlideAnimation(),this.lastValue=i,y(e.valueFormatted)?this.eCurrent.textContent=e.valueFormatted:y(e.value)?this.eCurrent.textContent=i:de(this.eCurrent),!0);}};d([g("filterManager")],nl.prototype,"filterManager",2);var se=class ie{constructor(t){this.rowIndex=null,this.key=null,this.childrenMapped={},this.displayed=!1,this.rowTop=null,this.oldRowTop=null,this.selectable=!0,this.__objectId=ie.OBJECT_ID_SEQUENCE++,this.__autoHeights={},this.alreadyRendered=!1,this.highlighted=null,this.hovered=!1,this.selected=!1,this.beans=t;}setData(t){this.setDataCommon(t,!1);}updateData(t){this.setDataCommon(t,!0);}setDataCommon(t,i){const s=this.data;this.data=t,this.beans.valueCache.onDataChanged(),this.updateDataOnDetailNode(),this.checkRowSelectable(),this.resetQuickFilterAggregateText();const o=this.createDataChangedEvent(t,s,i);this.dispatchLocalEvent(o);}updateDataOnDetailNode(){this.detailNode&&(this.detailNode.data=this.data);}createDataChangedEvent(t,i,s){return{type:ie.EVENT_DATA_CHANGED,node:this,oldData:i,newData:t,update:s};}createLocalRowEvent(t){return{type:t,node:this};}getRowIndexString(){return"top"===this.rowPinned?"t-"+this.rowIndex:"bottom"===this.rowPinned?"b-"+this.rowIndex:this.rowIndex.toString();}createDaemonNode(){const t=new ie(this.beans);return t.id=this.id,t.data=this.data,t.__daemon=!0,t.selected=this.selected,t.level=this.level,t;}setDataAndId(t,i){const s=y(this.id)?this.createDaemonNode():null,o=this.data;this.data=t,this.updateDataOnDetailNode(),this.setId(i),this.checkRowSelectable(),this.beans.selectionService.syncInRowNode(this,s);const r=this.createDataChangedEvent(t,o,!1);this.dispatchLocalEvent(r);}checkRowSelectable(){const t=this.beans.gos.get("isRowSelectable");this.setRowSelectable(!t||t(this));}setRowSelectable(t,i){if(this.selectable!==t){if(this.selectable=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(ie.EVENT_SELECTABLE_CHANGED)),i)return;if(this.beans.gos.get("groupSelectsChildren")){const o=this.calculateSelectedFromChildren();return void this.setSelectedParams({newValue:o??!1,source:"selectableChanged"});}this.isSelected()&&!this.selectable&&this.setSelectedParams({newValue:!1,source:"selectableChanged"});}}setId(t){const i=this.beans.gos.getCallback("getRowId");if(i){if(this.data){const s=this.getGroupKeys(!0);this.id=i({data:this.data,parentKeys:s.length>0?s:void 0,level:this.level}),null!==this.id&&"string"==typeof this.id&&this.id.startsWith(ie.ID_PREFIX_ROW_GROUP)&&console.error(`AG Grid: Row IDs cannot start with ${ie.ID_PREFIX_ROW_GROUP}, this is a reserved prefix for AG Grid's row grouping feature.`),null!==this.id&&"string"!=typeof this.id&&(this.id=""+this.id);}else this.id=void 0;}else this.id=t;}getGroupKeys(t=!1){const i=[];let s=this;for(t&&(s=s.parent);s&&s.level>=0;)i.push(s.key),s=s.parent;return i.reverse(),i;}
1isPixelInRange(t){return!(!y(this.rowTop)||!y(this.rowHeight))&&t>=this.rowTop&&t<this.rowTop+this.rowHeight;}setFirstChild(t){this.firstChild!==t&&(this.firstChild=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(ie.EVENT_FIRST_CHILD_CHANGED)));}setLastChild(t){this.lastChild!==t&&(this.lastChild=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(ie.EVENT_LAST_CHILD_CHANGED)));}setChildIndex(t){this.childIndex!==t&&(this.childIndex=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(ie.EVENT_CHILD_INDEX_CHANGED)));}setRowTop(t){this.oldRowTop=this.rowTop,this.rowTop!==t&&(this.rowTop=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(ie.EVENT_TOP_CHANGED)),this.setDisplayed(null!==t));}clearRowTopAndRowIndex(){this.oldRowTop=null,this.setRowTop(null),this.setRowIndex(null);}setDisplayed(t){this.displayed!==t&&(this.displayed=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(ie.EVENT_DISPLAYED_CHANGED)));}setDragging(t){this.dragging!==t&&(this.dragging=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(ie.EVENT_DRAGGING_CHANGED)));}setHighlighted(t){t!==this.highlighted&&(this.highlighted=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(ie.EVENT_HIGHLIGHT_CHANGED)));}setHovered(t){this.hovered!==t&&(this.hovered=t);}isHovered(){return this.hovered;}setAllChildrenCount(t){this.allChildrenCount!==t&&(this.allChildrenCount=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(ie.EVENT_ALL_CHILDREN_COUNT_CHANGED)));}setMaster(t){this.master!==t&&(this.master&&!t&&(this.expanded=!1),this.master=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(ie.EVENT_MASTER_CHANGED)));}setGroup(t){this.group!==t&&(this.group&&!t&&(this.expanded=!1),this.group=t,this.updateHasChildren(),this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(ie.EVENT_GROUP_CHANGED)));}setRowHeight(t,i=!1){this.rowHeight=t,this.rowHeightEstimated=i,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(ie.EVENT_HEIGHT_CHANGED));}setRowAutoHeight(t,i){this.__autoHeights||(this.__autoHeights={}),this.__autoHeights[i.getId()]=t,null!=t&&(null==this.checkAutoHeightsDebounced&&(this.checkAutoHeightsDebounced=Te(this.checkAutoHeights.bind(this),1)),this.checkAutoHeightsDebounced());}checkAutoHeights(){let t=!1,i=!0,s=0;const o=this.__autoHeights;if(null==o||(this.beans.columnModel.getAllDisplayedAutoHeightCols().forEach(l=>{let a=o[l.getId()];if(null==a){if(!this.beans.columnModel.isColSpanActive())return void(t=!0);{let u=[];switch(l.getPinned()){case"left":u=this.beans.columnModel.getDisplayedLeftColumnsForRow(this);break;case"right":u=this.beans.columnModel.getDisplayedRightColumnsForRow(this);break;case null:u=this.beans.columnModel.getViewportCenterColumnsForRow(this);}if(u.includes(l))return void(t=!0);a=-1;}}else i=!1;a>s&&(s=a);}),t)||((i||s<10)&&(s=this.beans.gos.getRowHeightForNode(this).height),s==this.rowHeight))return;this.setRowHeight(s);const n=this.beans.rowModel;n.onRowHeightChangedDebounced&&n.onRowHeightChangedDebounced();}setRowIndex(t){this.rowIndex!==t&&(this.rowIndex=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(ie.EVENT_ROW_INDEX_CHANGED)));}setUiLevel(t){this.uiLevel!==t&&(this.uiLevel=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(ie.EVENT_UI_LEVEL_CHANGED)));}setExpanded(t,i,s){if(this.expanded===t)return;this.expanded=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(ie.EVENT_EXPANDED_CHANGED));const o=Object.assign({},this.createGlobalRowEvent(c.EVENT_ROW_GROUP_OPENED),{expanded:t,event:i||null});this.beans.rowNodeEventThrottle.dispatchExpanded(o,s),this.beans.rowRenderer.refreshCells({rowNodes:[this]});}createGlobalRowEvent(t){return this.beans.gos.addGridCommonParams({type:t,node:this,data:this.data,rowIndex:this.rowIndex,rowPinned:this.rowPinned});}dispatchLocalEvent(t){this.eventService&&this.eventService.dispatchEvent(t);}setDataValue(t,i,s){const r=(()=>{var a;return"string"!=typeof t?t:null!=(a=this.beans.columnModel.getGridColumn(t))?a:this.beans.columnModel.getPrimaryColumn(t);})(),n=this.getValueFromValueService(r);if(this.beans.gos.get("readOnlyEdit"))return this.dispatchEventForSaveValueReadOnly(r,n,i,s),!1;const l=this.beans.valueService.setValue(this,r,i,s);return this.dispatchCellChangedEvent(r,i,n),this.checkRowSelectable(),l;}getValueFromValueService(t){var i,s;const o=this.leafGroup&&this.beans.columnModel.isPivotMode(),r=this.group&&this.expanded&&!this.footer&&!o;let n=!1;const l=null!=(i=this.beans.gos.get("groupTotalRow"))?i:this.beans.gos.get("groupIncludeFooter");
1n="function"!=typeof l?!!l:!!(null!=(s=this.beans.gos.getCallback("groupTotalRow"))?s:this.beans.gos.getCallback("groupIncludeFooter"))({node:this});const a=this.beans.gos.get("groupSuppressBlankHeader");return this.beans.valueService.getValue(t,this,!1,r&&n&&!a);}dispatchEventForSaveValueReadOnly(t,i,s,o){const r=this.beans.gos.addGridCommonParams({type:c.EVENT_CELL_EDIT_REQUEST,event:null,rowIndex:this.rowIndex,rowPinned:this.rowPinned,column:t,colDef:t.getColDef(),data:this.data,node:this,oldValue:i,newValue:s,value:s,source:o});this.beans.eventService.dispatchEvent(r);}setGroupValue(t,i){const s=this.beans.columnModel.getGridColumn(t);_(this.groupData)&&(this.groupData={});const o=s.getColId(),r=this.groupData[o];r!==i&&(this.groupData[o]=i,this.dispatchCellChangedEvent(s,i,r));}setAggData(t){const i=this.aggData;if(this.aggData=t,this.eventService){const s=o=>{const r=this.aggData?this.aggData[o]:void 0,n=i?i[o]:void 0;if(r===n)return;const l=this.beans.columnModel.lookupGridColumn(o);l&&this.dispatchCellChangedEvent(l,r,n);};for(const o in this.aggData)s(o);for(const o in t)o in this.aggData||s(o);}}updateHasChildren(){let t=this.group&&!this.footer||this.childrenAfterGroup&&this.childrenAfterGroup.length>0;if(this.beans.gos.isRowModelType("serverSide")){const s=this.beans.gos.get("treeData"),o=this.beans.gos.get("isServerSideGroup");t=!this.stub&&!this.footer&&(s?!!o&&o(this.data):!!this.group);}t!==this.__hasChildren&&(this.__hasChildren=!!t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(ie.EVENT_HAS_CHILDREN_CHANGED)));}hasChildren(){return null==this.__hasChildren&&this.updateHasChildren(),this.__hasChildren;}isEmptyRowGroupNode(){return this.group&&Me(this.childrenAfterGroup);}dispatchCellChangedEvent(t,i,s){this.dispatchLocalEvent({type:ie.EVENT_CELL_CHANGED,node:this,column:t,newValue:i,oldValue:s});}resetQuickFilterAggregateText(){this.quickFilterAggregateText=null;}isExpandable(){return!this.footer&&(this.beans.columnModel.isPivotMode()?this.hasChildren()&&!this.leafGroup:this.hasChildren()||!!this.master);}isSelected(){return this.footer?this.sibling.isSelected():this.selected;}depthFirstSearch(t){this.childrenAfterGroup&&this.childrenAfterGroup.forEach(i=>i.depthFirstSearch(t)),t(this);}calculateSelectedFromChildren(){var t;let i=!1,s=!1,o=!1;if(null==(t=this.childrenAfterGroup)||!t.length)return this.selectable?this.selected:null;for(let r=0;r<this.childrenAfterGroup.length;r++){const n=this.childrenAfterGroup[r];let l=n.isSelected();if(!n.selectable){const a=n.calculateSelectedFromChildren();if(null===a)continue;l=a;}switch(l){case!0:i=!0;break;case!1:s=!0;break;default:o=!0;}}return o||i&&s?void 0:!!i||!s&&(this.selectable?this.selected:null);}setSelectedInitialValue(t){this.selected=t;}selectThisNode(t,i,s="api"){if(!this.selectable&&t||this.selected===t)return!1;this.selected=t,this.eventService&&this.dispatchLocalEvent(this.createLocalRowEvent(ie.EVENT_ROW_SELECTED));const n=this.sibling;n&&n.footer&&n.eventService&&n.dispatchLocalEvent(n.createLocalRowEvent(ie.EVENT_ROW_SELECTED));const l=x(M({},this.createGlobalRowEvent(c.EVENT_ROW_SELECTED)),{event:i||null,source:s});return this.beans.eventService.dispatchEvent(l),!0;}setSelected(t,i=!1,s="api"){"boolean"!=typeof s?this.setSelectedParams({newValue:t,clearSelection:i,rangeSelect:!1,source:s}):console.warn("AG Grid: since version v30, rowNode.setSelected() property `suppressFinishActions` has been removed, please use `gridApi.setNodesSelected()` for bulk actions, and the event `source` property for ignoring events instead.");}setSelectedParams(t){return this.rowPinned?(console.warn("AG Grid: cannot select pinned rows"),0):void 0===this.id?(console.warn("AG Grid: cannot select node until id for node is known"),0):this.beans.selectionService.setNodesSelected(x(M({},t),{nodes:[this.footer?this.sibling:this]}));}isRowPinned(){return"top"===this.rowPinned||"bottom"===this.rowPinned;}isParentOfNode(t){let i=this.parent;for(;i;){if(i===t)return!0;i=i.parent;}return!1;}addEventListener(t,i){var s,o;this.eventService||(this.eventService=new Qe()),this.beans.frameworkOverrides.shouldWrapOutgoing&&!this.frameworkEventListenerService&&(this.eventService.setFrameworkOverrides(this.beans.frameworkOverrides),this.frameworkEventListenerService=new on(this.beans.frameworkOverrides));const r=null!=(o=null==(s=this.frameworkEventListenerService)?void 0:s.wrap(i))?o:i;this.eventService.addEventListener(t,r);}removeEventListener(t,i){var s,o;if(!this.eventService)return;const r=null!=(o=null==(s=this.frameworkEventListenerService)?void 0:s.unwrap(i))?o:i;
1this.eventService.removeEventListener(t,r),this.eventService.noRegisteredListenersExist()&&(this.eventService=null);}onMouseEnter(){this.dispatchLocalEvent(this.createLocalRowEvent(ie.EVENT_MOUSE_ENTER));}onMouseLeave(){this.dispatchLocalEvent(this.createLocalRowEvent(ie.EVENT_MOUSE_LEAVE));}getFirstChildOfFirstChild(t){let i=this,s=!0,o=!1,r=null;for(;s&&!o;){const n=i.parent;y(n)&&i.firstChild?n.rowGroupColumn===t&&(o=!0,r=n):s=!1,i=n;}return o?r:null;}isFullWidthCell(){if(this.detail)return!0;const t=this.beans.gos.getCallback("isFullWidthRow");return!!t&&t({rowNode:this});}getRoute(){if(null==this.key)return;const t=[];let i=this;for(;null!=i.key;)t.push(i.key),i=i.parent;return t.reverse();}createFooter(){if(this.sibling)return;const t=new Set(["eventService","__objectId","sticky"]),i=new ie(this.beans);Object.keys(this).forEach(s=>{t.has(s)||(i[s]=this[s]);}),i.footer=!0,i.setRowTop(null),i.setRowIndex(null),i.oldRowTop=null,i.id="rowGroupFooter_"+this.id,i.sibling=this,this.sibling=i;}destroyFooter(){this.sibling&&(this.sibling.setRowTop(null),this.sibling.setRowIndex(null),this.sibling=void 0);}};se.ID_PREFIX_ROW_GROUP="row-group-",se.ID_PREFIX_TOP_PINNED="t-",se.ID_PREFIX_BOTTOM_PINNED="b-",se.OBJECT_ID_SEQUENCE=0,se.EVENT_ROW_SELECTED="rowSelected",se.EVENT_DATA_CHANGED="dataChanged",se.EVENT_CELL_CHANGED="cellChanged",se.EVENT_ALL_CHILDREN_COUNT_CHANGED="allChildrenCountChanged",se.EVENT_MASTER_CHANGED="masterChanged",se.EVENT_GROUP_CHANGED="groupChanged",se.EVENT_MOUSE_ENTER="mouseEnter",se.EVENT_MOUSE_LEAVE="mouseLeave",se.EVENT_HEIGHT_CHANGED="heightChanged",se.EVENT_TOP_CHANGED="topChanged",se.EVENT_DISPLAYED_CHANGED="displayedChanged",se.EVENT_FIRST_CHILD_CHANGED="firstChildChanged",se.EVENT_LAST_CHILD_CHANGED="lastChildChanged",se.EVENT_CHILD_INDEX_CHANGED="childIndexChanged",se.EVENT_ROW_INDEX_CHANGED="rowIndexChanged",se.EVENT_EXPANDED_CHANGED="expandedChanged",se.EVENT_HAS_CHILDREN_CHANGED="hasChildrenChanged",se.EVENT_SELECTABLE_CHANGED="selectableChanged",se.EVENT_UI_LEVEL_CHANGED="uiLevelChanged",se.EVENT_HIGHLIGHT_CHANGED="rowHighlightChanged",se.EVENT_DRAGGING_CHANGED="draggingChanged";var W=se,Js=class extends V{constructor(){super('\n <div class="ag-selection-checkbox" role="presentation">\n <ag-checkbox role="presentation" ref="eCheckbox"></ag-checkbox>\n </div>');}postConstruct(){this.eCheckbox.setPassive(!0);}getCheckboxId(){return this.eCheckbox.getInputElement().id;}onDataChanged(){this.onSelectionChanged();}onSelectableChanged(){this.showOrHideSelect();}onSelectionChanged(){const e=this.localeService.getLocaleTextFunc(),t=this.rowNode.isSelected(),i=er(e,t),[s,o]=this.rowNode.selectable?["ariaRowToggleSelection","Press Space to toggle row selection"]:["ariaRowSelectionDisabled","Row Selection is disabled for this row"],r=e(s,o);this.eCheckbox.setValue(t,!0),this.eCheckbox.setInputAriaLabel(`${r} (${i})`);}onClicked(e,t,i){return this.rowNode.setSelectedParams({newValue:e,rangeSelect:i.shiftKey,groupSelectsFiltered:t,event:i,source:"checkboxSelected"});}init(e){if(this.rowNode=e.rowNode,this.column=e.column,this.overrides=e.overrides,this.onSelectionChanged(),this.addManagedListener(this.eCheckbox.getInputElement(),"dblclick",s=>{nt(s);}),this.addManagedListener(this.eCheckbox.getInputElement(),"click",s=>{nt(s);const o=this.gos.get("groupSelectsFiltered"),r=this.eCheckbox.getValue();this.shouldHandleIndeterminateState(r,o)?0===this.onClicked(!0,o,s||{})&&this.onClicked(!1,o,s):r?this.onClicked(!1,o,s):this.onClicked(!0,o,s||{});}),this.addManagedListener(this.rowNode,W.EVENT_ROW_SELECTED,this.onSelectionChanged.bind(this)),this.addManagedListener(this.rowNode,W.EVENT_DATA_CHANGED,this.onDataChanged.bind(this)),this.addManagedListener(this.rowNode,W.EVENT_SELECTABLE_CHANGED,this.onSelectableChanged.bind(this)),this.gos.get("isRowSelectable")||"function"==typeof this.getIsVisible()){const s=this.showOrHideSelect.bind(this);this.addManagedListener(this.eventService,c.EVENT_DISPLAYED_COLUMNS_CHANGED,s),this.addManagedListener(this.rowNode,W.EVENT_DATA_CHANGED,s),this.addManagedListener(this.rowNode,W.EVENT_CELL_CHANGED,s),this.showOrHideSelect();}this.eCheckbox.getInputElement().setAttribute("tabindex","-1");}shouldHandleIndeterminateState(e,t){return t&&(void 0===this.eCheckbox.getPreviousValue()||void 0===e)&&this.gos.isRowModelType("clientSide");}showOrHideSelect(){var e,t,i;let s=this.rowNode.selectable;const o=this.getIsVisible();if(s)if("function"==typeof o){const n=null==(e=this.overrides)?void 0:e.callbackParams;if(this.column){const l=this.column.createColumnFunctionCallbackParams(this.rowNode);s=o(M(M({},n),l));}else s=o(x(M({},n),{node:this.rowNode,data:this.rowNode.data}));}else s=o??!1;if(null==(t=this.column)?void 0:t.getColDef().showDisabledCheckboxes)return this.eCheckbox.setDisabled(!s),this.setVisible(!0),void this.setDisplayed(!0);null!=(i=this.overrides)&&i.removeHidden?this.setDisplayed(s):this.setVisible(s);}getIsVisible(){var e,t;return this.overrides?this.overrides.isVisible:null==(t=null==(e=this.column)?void 0:e.getColDef())?void 0:t.checkboxSelection;}};d([A("eCheckbox")],Js.prototype,"eCheckbox",2),d([T],Js.prototype,"postConstruct",1);var Ad=(e=>(e[e.Up=0]="Up",e[e.Down=1]="Down",e))(Ad||{}),ll=(e=>(e[e.Left=0]="Left",e[e.Right=1]="Right",e))(ll||{}),Fd=(e=>(e[e.ToolPanel=0]="ToolPanel",e[e.HeaderCell=1]="HeaderCell",e[e.RowDrag=2]="RowDrag",e[e.ChartPanel=3]="ChartPanel",e[e.AdvancedFilterBuilder=4]="AdvancedFilterBuilder",e))(Fd||{}),H=class extends R{constructor(){super(...arguments),this.dragSourceAndParamsList=[],this.dropTargets=[];}init(){this.ePinnedIcon=tt("columnMovePin",this.gos,null),this.eHideIcon=tt("columnMoveHide",this.gos,null),this.eMoveIcon=tt("columnMoveMove",this.gos,null),this.eLeftIcon=tt("columnMoveLeft",this.gos,null),this.eRightIcon=tt("columnMoveRight",this.gos,null),this.eGroupIcon=tt("columnMoveGroup",this.gos,null),this.eAggregateIcon=tt("columnMoveValue",this.gos,null),this.ePivotIcon=tt("columnMovePivot",this.gos,null),this.eDropNotAllowedIcon=tt("dropNotAllowed",this.gos,null);}addDragSource(e,t=!1){const i={eElement:e.eElement,dragStartPixels:e.dragStartPixels,onDragStart:this.onDragStart.bind(this,e),onDragStop:this.onDragStop.bind(this),onDragging:this.onDragging.bind(this),includeTouch:t};this.dragSourceAndParamsList.push({params:i,dragSource:e}),this.dragService.addDragSource(i);}removeDragSource(e){const t=this.dragSourceAndParamsList.find(i=>i.dragSource===e);t&&(this.dragService.removeDragSource(t.params),Ge(this.dragSourceAndParamsList,t));}clearDragSourceParamsList(){this.dragSourceAndParamsList.forEach(e
1=>this.dragService.removeDragSource(e.params)),this.dragSourceAndParamsList.length=0,this.dropTargets.length=0;}nudge(){this.dragging&&this.onDragging(this.eventLastTime,!0);}onDragStart(e,t){this.dragging=!0,this.dragSource=e,this.eventLastTime=t,this.dragItem=this.dragSource.getDragItem(),this.lastDropTarget=void 0,this.dragSource.onDragStarted&&this.dragSource.onDragStarted(),this.createGhost();}onDragStop(e){if(this.eventLastTime=null,this.dragging=!1,this.dragSource.onDragStopped&&this.dragSource.onDragStopped(),this.lastDropTarget&&this.lastDropTarget.onDragStop){const t=this.createDropTargetEvent(this.lastDropTarget,e,null,null,!1);this.lastDropTarget.onDragStop(t);}this.lastDropTarget=null,this.dragItem=null,this.removeGhost();}onDragging(e,t){var i,s,o,r;const n=this.getHorizontalDirection(e),l=this.getVerticalDirection(e);this.eventLastTime=e,this.positionGhost(e);const a=this.dropTargets.filter(h=>this.isMouseOnDropTarget(e,h)),u=this.findCurrentDropTarget(e,a);if(u!==this.lastDropTarget)this.leaveLastTargetIfExists(e,n,l,t),null!==this.lastDropTarget&&null===u&&(null==(s=(i=this.dragSource).onGridExit)||s.call(i,this.dragItem)),null===this.lastDropTarget&&null!==u&&(null==(r=(o=this.dragSource).onGridEnter)||r.call(o,this.dragItem)),this.enterDragTargetIfExists(u,e,n,l,t),this.lastDropTarget=u;else if(u&&u.onDragging){const h=this.createDropTargetEvent(u,e,n,l,t);u.onDragging(h);}}getAllContainersFromDropTarget(e){const t=e.getSecondaryContainers?e.getSecondaryContainers():null,i=[[e.getContainer()]];return t?i.concat(t):i;}allContainersIntersect(e,t){for(const i of t){const s=i.getBoundingClientRect();if(0===s.width||0===s.height)return!1;if(!(e.clientX>=s.left&&e.clientX<s.right&&e.clientY>=s.top&&e.clientY<s.bottom))return!1;}return!0;}isMouseOnDropTarget(e,t){const i=this.getAllContainersFromDropTarget(t);let s=!1;for(const o of i)if(this.allContainersIntersect(e,o)){s=!0;break;}return!(t.targetContainsSource&&!t.getContainer().contains(this.dragSource.eElement))&&s&&t.isInterestedIn(this.dragSource.type,this.dragSource.eElement);}findCurrentDropTarget(e,t){const i=t.length;if(0===i)return null;if(1===i)return t[0];const o=this.gos.getRootNode().elementsFromPoint(e.clientX,e.clientY);for(const r of o)for(const n of t)if(-1!==da(this.getAllContainersFromDropTarget(n)).indexOf(r))return n;return null;}enterDragTargetIfExists(e,t,i,s,o){if(e){if(e.onDragEnter){const r=this.createDropTargetEvent(e,t,i,s,o);e.onDragEnter(r);}this.setGhostIcon(e.getIconName?e.getIconName():null);}}leaveLastTargetIfExists(e,t,i,s){if(this.lastDropTarget){if(this.lastDropTarget.onDragLeave){const o=this.createDropTargetEvent(this.lastDropTarget,e,t,i,s);this.lastDropTarget.onDragLeave(o);}this.setGhostIcon(null);}}addDropTarget(e){this.dropTargets.push(e);}removeDropTarget(e){this.dropTargets=this.dropTargets.filter(t=>t.getContainer()!==e.getContainer());}hasExternalDropZones(){return this.dropTargets.some(e=>e.external);}findExternalZone(e){return this.dropTargets.filter(i=>i.external).find(i=>i.getContainer()===e.getContainer())||null;}getHorizontalDirection(e){const t=this.eventLastTime&&this.eventLastTime.clientX,i=e.clientX;return t===i?null:t>i?0:1;}getVerticalDirection(e){const t=this.eventLastTime&&this.eventLastTime.clientY,i=e.clientY;return t===i?null:t>i?0:1;}createDropTargetEvent(e,t,i,s,o){const r=e.getContainer(),n=r.getBoundingClientRect(),{gridApi:l,columnApi:a,dragItem:u,dragSource:h}=this;return{event:t,x:t.clientX-n.left,y:t.clientY-n.top,vDirection:s,hDirection:i,dragSource:h,fromNudge:o,dragItem:u,api:l,columnApi:a,dropZoneTarget:r};}positionGhost(e){const t=this.eGhost;if(!t)return;const s=t.getBoundingClientRect().height,o=xa()-2,r=Oa()-2,n=Vn(t.offsetParent),{clientY:l,clientX:a}=e;let u=l-n.top-s/2,h=a-n.left-10;const p=this.gos.getDocument(),f=p.defaultView||window,m=f.pageYOffset||p.documentElement.scrollTop,v=f.pageXOffset||p.documentElement.scrollLeft;o>0&&h+t.clientWidth>o+v&&(h=o+v-t.clientWidth),h<0&&(h=0),r>0&&u+t.clientHeight>r+m&&(u=r+m-t.clientHeight),u<0&&(u=0),t.style.left=`${h}px`,t.style.top=`${u}px`;}removeGhost(){this.eGhost&&this.eGhostParent&&this.eGhostParent.removeChild(this.eGhost),this.eGhost=null;}createGhost(){this.eGhost=Oe(H.GHOST_TEMPLATE),this.mouseEventService.stampTopLevelGridCompWithGridInstance(this.eGhost);const{theme:e}=this.environment.getTheme();e&&this.eGhost.classList.add(e),this.eGhostIcon=this.eGhost.querySelector(".ag-dnd-ghost-icon"),this.setGhostIcon(null);const t=this.eGhost.querySelector(".ag-dnd-ghost-label");let i=this.dragSource.dragItemName;zo(i)&&(i=i()),t.innerHTML=he(i)||"",this.eGhost.style.height="25px",this.eGhost.style.top="20px",this.eGhost.style.left="20px";const s=this.gos.getDocument();let o=null,r=null;try{o=s.fullscreenElement;}catch{}finally{o||(o=this.gos.getRootNode());r=o.querySelector("body")||(o instanceof ShadowRoot?o:o instanceof Document?o?.documentElement:o);}this.eGhostParent=r,this.eGhostParent?this.eGhostParent.appendChild(this.eGhost):console.warn("AG Grid: could not find document body, it is needed for dragging columns");}setGhostIcon(e,t=!1){de(this.eGhostIcon);let i=null;switch(e||(e=this.dragSource.getDefaultIconName?this.dragSource.getDefaultIconName():H.ICON_NOT_ALLOWED),e){case H.ICON_PINNED:i=this.ePinnedIcon;break;case H.ICON_MOVE:i=this.eMoveIcon;break;case H.ICON_LEFT:i=this.eLeftIcon;break;case H.ICON_RIGHT:i=this.eRightIcon;break;case H.ICON_GROUP:i=this.eGroupIcon;break;case H.ICON_AGGREGATE:i=this.eAggregateIcon;break;case H.ICON_PIVOT:i=this.ePivotIcon;break;case H.ICON_NOT_ALLOWED:i=this.eDropNotAllowedIcon;break;case H.ICON_HIDE:i=this.eHideIcon;}this.eGhostIcon.classList.toggle("ag-shake-left-to-right",t),(i!==this.eHideIcon||!this.gos.get("suppressDragLeaveHidesColumns"))&&i&&this.eGhostIcon.appendChild(i);}};H.ICON_PINNED="pinned",H.ICON_MOVE="move",H.ICON_LEFT="left",H.ICON_RIGHT="right",H.ICON_GROUP="group",H.ICON_AGGREGATE="aggregate",H.ICON_PIVOT="pivot",H.ICON_NOT_ALLOWED="notAllowed",H.ICON_HIDE="hide",H.GHOST_TEMPLATE='<div class="ag-dnd-ghost ag-unselectable">
1\n <span class="ag-dnd-ghost-icon ag-shake-left-to-right"></span>\n <div class="ag-dnd-ghost-label"></div>\n </div>',d([g("dragService")],H.prototype,"dragService",2),d([g("mouseEventService")],H.prototype,"mouseEventService",2),d([g("columnApi")],H.prototype,"columnApi",2),d([g("gridApi")],H.prototype,"gridApi",2),d([T],H.prototype,"init",1),d([Ee],H.prototype,"clearDragSourceParamsList",1),H=d([L("dragAndDropService")],H);var mi=class extends V{constructor(e,t,i,s,o,r){super(),this.cellValueFn=e,this.rowNode=t,this.column=i,this.customGui=s,this.dragStartPixels=o,this.suppressVisibilityChange=r,this.dragSource=null;}isCustomGui(){return null!=this.customGui;}postConstruct(){if(this.customGui?this.setDragElement(this.customGui,this.dragStartPixels):(this.setTemplate('<div class="ag-drag-handle ag-row-drag" aria-hidden="true"></div>'),this.getGui().appendChild(re("rowDrag",this.gos,null)),this.addDragSource()),this.checkCompatibility(),!this.suppressVisibilityChange){const e=this.gos.get("rowDragManaged")?new Md(this,this.beans,this.rowNode,this.column):new Ld(this,this.beans,this.rowNode,this.column);this.createManagedBean(e,this.beans.context);}}setDragElement(e,t){this.setTemplateFromElement(e),this.addDragSource(t);}getSelectedNodes(){if(!this.gos.get("rowDragMultiRow"))return[this.rowNode];const t=this.beans.selectionService.getSelectedNodes();return-1!==t.indexOf(this.rowNode)?t:[this.rowNode];}checkCompatibility(){const e=this.gos.get("rowDragManaged");this.gos.get("treeData")&&e&&O("If using row drag with tree data, you cannot have rowDragManaged=true");}getDragItem(){return{rowNode:this.rowNode,rowNodes:this.getSelectedNodes(),columns:this.column?[this.column]:void 0,defaultTextValue:this.cellValueFn()};}getRowDragText(e){if(e){const t=e.getColDef();if(t.rowDragText)return t.rowDragText;}return this.gos.get("rowDragText");}addDragSource(e=4){this.dragSource&&this.removeDragSource();const t=this.localeService.getLocaleTextFunc();this.dragSource={type:2,eElement:this.getGui(),dragItemName:()=>{var i;const s=this.getDragItem(),o=(null==(i=s.rowNodes)?void 0:i.length)||1,r=this.getRowDragText(this.column);return r?r(s,o):1===o?this.cellValueFn():`${o} ${t("rowDragRows","rows")}`;},getDragItem:()=>this.getDragItem(),dragStartPixels:e,dragSourceDomDataKey:this.gos.getDomDataKey()},this.beans.dragAndDropService.addDragSource(this.dragSource,!0);}removeDragSource(){this.dragSource&&this.beans.dragAndDropService.removeDragSource(this.dragSource),this.dragSource=null;}};d([g("beans")],mi.prototype,"beans",2),d([T],mi.prototype,"postConstruct",1),d([Ee],mi.prototype,"removeDragSource",1);var Pd=class extends R{constructor(e,t,i){super(),this.parent=e,this.rowNode=t,this.column=i;}setDisplayedOrVisible(e){const t={skipAriaHidden:!0};if(e)this.parent.setDisplayed(!1,t);else{let i=!0,s=!1;this.column&&(i=this.column.isRowDrag(this.rowNode)||this.parent.isCustomGui(),s=zo(this.column.getColDef().rowDrag)),s?(this.parent.setDisplayed(!0,t),this.parent.setVisible(i,t)):(this.parent.setDisplayed(i,t),this.parent.setVisible(!0,t));}}},Ld=class extends Pd{constructor(e,t,i,s){super(e,i,s),this.beans=t;}postConstruct(){this.addManagedPropertyListener("suppressRowDrag",this.onSuppressRowDrag.bind(this)),this.addManagedListener(this.rowNode,W.EVENT_DATA_CHANGED,this.workOutVisibility.bind(this)),this.addManagedListener(this.rowNode,W.EVENT_CELL_CHANGED,this.workOutVisibility.bind(this)),this.addManagedListener(this.rowNode,W.EVENT_CELL_CHANGED,this.workOutVisibility.bind(this)),this.addManagedListener(this.beans.eventService,c.EVENT_NEW_COLUMNS_LOADED,this.workOutVisibility.bind(this)),this.workOutVisibility();}onSuppressRowDrag(){this.workOutVisibility();}workOutVisibility(){const e=this.gos.get("suppressRowDrag");this.setDisplayedOrVisible(e);}};d([T],Ld.prototype,"postConstruct",1);var Md=class extends Pd{constructor(e,t,i,s){super(e,i,s),this.beans=t;}postConstruct(){this.addManagedListener(this.beans.eventService,c.EVENT_SORT_CHANGED,this.workOutVisibility.bind(this)),this.addManagedListener(this.beans.eventService,c.EVENT_FILTER_CHANGED,this.workOutVisibility.bind(this)),this.addManagedListener(this.beans.eventService,c.EVENT_COLUMN_ROW_GROUP_CHANGED,this.workOutVisibility.bind(this)),this.addManagedListener(this.beans.eventService,c.EVENT_NEW_COLUMNS_LOADED,this.workOutVisibility.bind(this)),this.addManagedListener(this.rowNode,W.EVENT_DATA_CHANGED,this.workOutVisibility.bind(this)),this.addManagedListener(this.rowNode,W.EVENT_CELL_CHANGED,this.workOutVisibility.bind(this)),this.addManagedPropertyListener("suppressRowDrag",this.onSuppressRowDrag.bind(this)),this.workOutVisibility();}onSuppressRowDrag(){this.workOutVisibility();}workOutVisibility(){const t=this.beans.ctrlsService.getGridBodyCtrl().getRowDragFeature
1(),i=t&&t.shouldPreventRowMove(),s=this.gos.get("suppressRowDrag"),o=this.beans.dragAndDropService.hasExternalDropZones();this.setDisplayedOrVisible(i&&!o||s);}};d([T],Md.prototype,"postConstruct",1);var Ci=class extends R{init(e,t,i,s,o,r,n){var l,a,u,h;this.params=n,this.eGui=t,this.eCheckbox=i,this.eExpanded=s,this.eContracted=o,this.comp=e,this.compClass=r;const{node:p,colDef:m}=n,v=this.isTopLevelFooter();if(!v){if(this.isEmbeddedRowMismatch())return;if(p.footer&&this.gos.get("groupHideOpenParents")&&(m&&m.showRowGroup)!==(p.rowGroupColumn&&p.rowGroupColumn.getColId()))return;}if(this.setupShowingValueForOpenedParent(),this.findDisplayedGroupNode(),!v){const w=n.node.footer&&n.node.rowGroupIndex===this.columnModel.getRowGroupColumns().findIndex(G=>{var N;return G.getColId()===(null==(N=n.colDef)?void 0:N.showRowGroup);}),b="multipleColumns"!=this.gos.get("groupDisplayType")||this.gos.get("treeData")||this.gos.get("showOpenedGroup")&&!n.node.footer&&(!n.node.group||null!=n.node.rowGroupIndex&&n.node.rowGroupIndex>this.columnModel.getRowGroupColumns().findIndex(G=>{var N;return G.getColId()===(null==(N=n.colDef)?void 0:N.showRowGroup);})),E=!p.group&&((null==(l=this.params.colDef)?void 0:l.field)||(null==(a=this.params.colDef)?void 0:a.valueGetter)),F=this.isExpandable(),P=this.columnModel.isPivotMode()&&p.leafGroup&&(null==(u=p.rowGroupColumn)?void 0:u.getColId())===(null==(h=n.column)?void 0:h.getColDef().showRowGroup);if(!(this.showingValueForOpenedParent||F||E||b||w||P))return;}this.addExpandAndContract(),this.addFullWidthRowDraggerIfNeeded(),this.addCheckboxIfNeeded(),this.addValueElement(),this.setupIndent(),this.refreshAriaExpanded();}getCellAriaRole(){var e,t;const i=null==(e=this.params.colDef)?void 0:e.cellAriaRole,s=null==(t=this.params.column)?void 0:t.getColDef().cellAriaRole;return i||s||"gridcell";}destroy(){super.destroy(),this.expandListener=null;}refreshAriaExpanded(){const{node:e,eGridCell:t}=this.params;if(this.expandListener&&(this.expandListener=this.expandListener()),!this.isExpandable())return void Ta(t);const i=()=>{Ft(t,!!e.expanded);};this.expandListener=this.addManagedListener(e,W.EVENT_EXPANDED_CHANGED,i)||null,i();}isTopLevelFooter(){if(!this.gos.getGrandTotalRow()||null!=this.params.value||-1!=this.params.node.level)return!1;const t=this.params.colDef;if(null==t||!0===t.showRowGroup)return!0;const s=this.columnModel.getRowGroupColumns();return!s||0===s.length||s[0].getId()===t.showRowGroup;}isEmbeddedRowMismatch(){if(!this.params.fullWidth||!this.gos.get("embedFullWidthRows"))return!1;
1const e="left"===this.params.pinned,t="right"===this.params.pinned,i=!e&&!t;return this.gos.get("enableRtl")?this.columnModel.isPinningLeft()?!t:!i:this.columnModel.isPinningLeft()?!e:!i;}findDisplayedGroupNode(){const e=this.params.column,t=this.params.node;if(this.showingValueForOpenedParent){let i=t.parent;for(;null!=i;){if(i.rowGroupColumn&&e.isRowGroupDisplayed(i.rowGroupColumn.getId())){this.displayedGroupNode=i;break;}i=i.parent;}}_(this.displayedGroupNode)&&(this.displayedGroupNode=t);}setupShowingValueForOpenedParent(){const e=this.params.node,t=this.params.column;if(!this.gos.get("groupHideOpenParents"))return void(this.showingValueForOpenedParent=!1);if(!e.groupData)return void(this.showingValueForOpenedParent=!1);if(null!=e.rowGroupColumn){const o=e.rowGroupColumn.getId();if(t.isRowGroupDisplayed(o))return void(this.showingValueForOpenedParent=!1);}const s=null!=e.groupData[t.getId()];this.showingValueForOpenedParent=s;}addValueElement(){this.displayedGroupNode.footer?this.addFooterValue():(this.addGroupValue(),this.addChildCount());}addGroupValue(){var e;const t=this.adjustParamsWithDetailsFromRelatedColumn(),i=this.getInnerCompDetails(t),{valueFormatted:s,value:o}=t;let r=s;if(null==r){const n=this.displayedGroupNode.rowGroupColumn&&(null==(e=this.params.column)?void 0:e.isRowGroupDisplayed(this.displayedGroupNode.rowGroupColumn.getId()));r=""===this.displayedGroupNode.key&&this.displayedGroupNode.group&&n?this.localeService.getLocaleTextFunc()("blanks","(Blanks)"):o??null;}this.comp.setInnerRenderer(i,r);}adjustParamsWithDetailsFromRelatedColumn(){const e=this.displayedGroupNode.rowGroupColumn,t=this.params.column;if(!e)return this.params;if(null!=t&&!t.isRowGroupDisplayed(e.getId()))return this.params;const s=this.params,{value:o,node:r}=this.params,n=this.valueService.formatValue(e,r,o);return x(M({},s),{valueFormatted:n});}addFooterValue(){let e=this.params.totalValueGetter;if(!e){const s=this.params.footerValueGetter;s&&(e=s,O("As of v31.3, footerValueGetter is deprecated. Use `totalValueGetter` instead."));}let t="";if(e){const s=qr(this.params);s.value=this.params.value,"function"==typeof e?t=e(s):"string"==typeof e?t=this.expressionService.evaluate(e,s):console.warn("AG Grid: footerValueGetter should be either a function or a string (expression)");}else t=this.localeService.getLocaleTextFunc()("footerTotal","Total")+" "+(null!=this.params.value?this.params.value:"");const i=this.getInnerCompDetails(this.params);this.comp.setInnerRenderer(i,t);}getInnerCompDetails(e){if(e.fullWidth)return this.userComponentFactory.getFullWidthGroupRowInnerCellRenderer(this.gos.get("groupRowRendererParams"),e);const t=this.userComponentFactory.getInnerRendererDetails(e,e),i=n=>n&&n.componentClass==this.compClass;if(t&&!i(t))return t;const s=this.displayedGroupNode.rowGroupColumn,o=s?s.getColDef():void 0;if(!o)return;const r=this.userComponentFactory.getCellRendererDetails(o,e);return r&&!i(r)?r:i(r)&&o.cellRendererParams&&o.cellRendererParams.innerRenderer?this.userComponentFactory.getInnerRendererDetails(o.cellRendererParams,e):void 0;}addChildCount(){this.params.suppressCount||(this.addManagedListener(this.displayedGroupNode,W.EVENT_ALL_CHILDREN_COUNT_CHANGED,this.updateChildCount.bind(this)),this.updateChildCount());}updateChildCount(){const e=this.displayedGroupNode.allChildrenCount,s=this.isShowRowGroupForThisRow()&&null!=e&&e>=0?`(${e})`:"";this.comp.setChildCount(s);}isShowRowGroupForThisRow(){if(this.gos.get("treeData"))return!0;const e=this.displayedGroupNode.rowGroupColumn;if(!e)return!1;const t=this.params.column;return null==t||t.isRowGroupDisplayed(e.getId());}addExpandAndContract(){var e;const t=this.params,i=re("groupExpanded",this.gos,null),s=re("groupContracted",this.gos,null);i&&this.eExpanded.appendChild(i),s&&this.eContracted.appendChild(s);const o=t.eGridCell;!((null==(e=this.params.column)?void 0:e.isCellEditable(t.node))&&this.gos.get("enableGroupEdit"))&&this.isExpandable()&&!t.suppressDoubleClickExpand&&this.addManagedListener(o,"dblclick",this.onCellDblClicked.bind(this)),this.addManagedListener(this.eExpanded,"click",this.onExpandClicked.bind(this)),this.addManagedListener(this.eContracted,"click",this.onExpandClicked.bind(this)),this.addManagedListener(o,"keydown",this.onKeyDown.bind(this)),this.addManagedListener(t.node,W.EVENT_EXPANDED_CHANGED,this.showExpandAndContractIcons.bind(this)),this.showExpandAndContractIcons();const n=this.onRowNodeIsExpandableChanged.bind(this);this.addManagedListener(this.displayedGroupNode,W.EVENT_ALL_CHILDREN_COUNT_CHANGED,n),this.addManagedListener(this.displayedGroupNode,W.EVENT_MASTER_CHANGED,n),this.addManagedListener(this.displayedGroupNode,W.EVENT_GROUP_CHANGED,n),this.addManagedListener(this.displayedGroupNode,W.EVENT_HAS_CHILDREN_CHANGED,n);}onExpandClicked(e){lt(e)||(nt(e),this.onExpandOrContract(e));}onExpandOrContract(e){const t=this.displayedGroupNode,i=!t.expanded;!i&&t.sticky&&this.scrollToStickyNode(t),t.setExpanded(i,e);}scrollToStickyNode(e){this.ctrlsService.getGridBodyCtrl().getScrollFeature
1().setVerticalScrollPosition(e.rowTop-e.stickyRowTop);}isExpandable(){if(this.showingValueForOpenedParent)return!0;const e=this.displayedGroupNode,t=this.columnModel.isPivotMode()&&e.leafGroup;if(!e.isExpandable()||e.footer||t)return!1;const s=this.params.column;return null==s||"string"!=typeof s.getColDef().showRowGroup||this.isShowRowGroupForThisRow();}showExpandAndContractIcons(){const{params:e,displayedGroupNode:t,columnModel:i}=this,{node:s}=e,o=this.isExpandable();if(o){const u=!!this.showingValueForOpenedParent||s.expanded;this.comp.setExpandedDisplayed(u),this.comp.setContractedDisplayed(!u);}else this.comp.setExpandedDisplayed(!1),this.comp.setContractedDisplayed(!1);const r=i.isPivotMode(),n=r&&t.leafGroup,l=o&&!n,a=s.footer&&-1===s.level;this.comp.addOrRemoveCssClass("ag-cell-expandable",l),this.comp.addOrRemoveCssClass("ag-row-group",l),r?this.comp.addOrRemoveCssClass("ag-pivot-leaf-group",n):a||this.comp.addOrRemoveCssClass("ag-row-group-leaf-indent",!l);}onRowNodeIsExpandableChanged(){this.showExpandAndContractIcons(),this.setIndent(),this.refreshAriaExpanded();}setupIndent(){this.params.suppressPadding||(this.addManagedListener(this.params.node,W.EVENT_UI_LEVEL_CHANGED,this.setIndent.bind(this)),this.setIndent());}setIndent(){if(this.gos.get("groupHideOpenParents"))return;const e=this.params,t=e.node,i=!!e.colDef,s=this.gos.get("treeData"),r=!i||s||!0===e.colDef.showRowGroup?t.uiLevel:0;this.indentClass&&this.comp.addOrRemoveCssClass(this.indentClass,!1),this.indentClass="ag-row-group-indent-"+r,this.comp.addOrRemoveCssClass(this.indentClass,!0);}addFullWidthRowDraggerIfNeeded(){if(!this.params.fullWidth||!this.params.rowDrag)return;const e=new mi(()=>this.params.value,this.params.node);this.createManagedBean(e,this.context),this.eGui.insertAdjacentElement("afterbegin",e.getGui());}isUserWantsSelected(){const e=this.params.checkbox;return"function"==typeof e||!0===e;}addCheckboxIfNeeded(){const e=this.displayedGroupNode,t=this.isUserWantsSelected()&&!e.footer&&!e.rowPinned&&!e.detail;if(t){const i=new Js();this.getContext().createBean(i),i.init({rowNode:this.params.node,column:this.params.column,overrides:{isVisible:this.params.checkbox,callbackParams:this.params,removeHidden:!0}}),this.eCheckbox.appendChild(i.getGui()),this.addDestroyFunc(()=>this.getContext().destroyBean(i));}this.comp.setCheckboxVisible(t);}onKeyDown(e){e.key!==C.ENTER||this.params.suppressEnterExpand||this.params.column&&this.params.column.isCellEditable(this.params.node)||this.onExpandOrContract(e);}onCellDblClicked(e){lt(e)||jo(this.eExpanded,e)||jo(this.eContracted,e)||this.onExpandOrContract(e);}};d([g("expressionService")],Ci.prototype,"expressionService",2),d([g("valueService")],Ci.prototype,"valueService",2),d([g("columnModel")],Ci.prototype,"columnModel",2),d([g("userComponentFactory")],Ci.prototype,"userComponentFactory",2),d([g("ctrlsService")],Ci.prototype,"ctrlsService",2);var vi=class nh extends V{constructor(){super(nh.TEMPLATE);}init(t){const i={setInnerRenderer:(n,l)=>this.setRenderDetails(n,l),setChildCount:n=>this.eChildCount.textContent=n,addOrRemoveCssClass:(n,l)=>this.addOrRemoveCssClass(n,l),setContractedDisplayed:n=>K(this.eContracted,n),setExpandedDisplayed:n=>K(this.eExpanded,n),setCheckboxVisible:n=>this.eCheckbox.classList.toggle("ag-invisible",!n)},s=this.createManagedBean(new Ci()),o=!t.colDef,r=this.getGui();s.init(i,r,this.eCheckbox,this.eExpanded,this.eContracted,this.constructor,t),o&&le(r,s.getCellAriaRole());}setRenderDetails(t,i){if(t){const s=t.newAgStackInstance();if(!s)return;s.then(o=>{if(!o)return;const r=()=>this.context.destroyBean(o);this.isAlive()?(this.eValue.appendChild(o.getGui()),this.addDestroyFunc(r)):r();});}else this.eValue.innerText=i;}destroy(){this.getContext().destroyBean(this.innerCellRenderer),super.destroy();}refresh(){return!1;}};vi.TEMPLATE='<span class="ag-cell-wrapper">\n <span class="ag-group-expanded" ref="eExpanded"></span>\n <span class="ag-group-contracted" ref="eContracted"></span>\n <span class="ag-group-checkbox ag-invisible" ref="eCheckbox"></span>
1\n <span class="ag-group-value" ref="eValue"></span>\n <span class="ag-group-child-count" ref="eChildCount"></span>\n </span>',d([A("eExpanded")],vi.prototype,"eExpanded",2),d([A("eContracted")],vi.prototype,"eContracted",2),d([A("eCheckbox")],vi.prototype,"eCheckbox",2),d([A("eValue")],vi.prototype,"eValue",2),d([A("eChildCount")],vi.prototype,"eChildCount",2);var al=vi,vr=class lh extends V{constructor(){super(lh.TEMPLATE);}init(t){t.node.failedLoad?this.setupFailed():this.setupLoading();}setupFailed(){const t=this.localeService.getLocaleTextFunc();this.eLoadingText.innerText=t("loadingError","ERR");}setupLoading(){const t=re("groupLoading",this.gos,null);t&&this.eLoadingIcon.appendChild(t);const i=this.localeService.getLocaleTextFunc();this.eLoadingText.innerText=i("loadingOoo","Loading");}refresh(t){return!1;}destroy(){super.destroy();}};vr.TEMPLATE='<div class="ag-loading">\n <span class="ag-loading-icon" ref="eLoadingIcon"></span>\n <span class="ag-loading-text" ref="eLoadingText"></span>\n </div>',d([A("eLoadingIcon")],vr.prototype,"eLoadingIcon",2),d([A("eLo
1adingText")],vr.prototype,"eLoadingText",2);var Dc=vr,Id=class ah extends V{constructor(){super(ah.TEMPLATE);}init(t){const i=`ag-cell-skeleton-renderer-${this.getCompId()}`;this.getGui().setAttribute("id",i),this.addDestroyFunc(()=>ji(t.eParentOfValue)),ji(t.eParentOfValue,i),t.node.failedLoad?this.setupFailed():this.setupLoading();}setupFailed(){const t=this.localeService.getLocaleTextFunc();this.getGui().innerText=t("loadingError","ERR");const i=t("ariaSkeletonCellLoadingFailed","Row failed to load");Ke(this.getGui(),i);}setupLoading(){const i=this.gos.getDocument().createElement("div");i.classList.add("ag-skeleton-effect"),this.getGui().appendChild(i);const o=this.localeService.getLocaleTextFunc()("ariaSkeletonCellLoading","Row data is loading");Ke(this.getGui(),o);}refresh(t){return!1;}destroy(){super.destroy();}};Id.TEMPLATE='<div class="ag-skeleton-container"></div>';var bc=Id,Gd=class dh extends V{constructor(){super();}destroy(){super.destroy();}init(t){const i=this.gos.get("overlayLoadingTemplate");if(this.setTemplate(i??dh.DEFAULT_LOADING_OVERLAY_TEMPLATE),!i){const s=this.localeService.getLocaleTextFunc();setTimeout(()=>{this.getGui().textContent=s("loadingOoo","Loading...");});}}};Gd.DEFAULT_LOADING_OVERLAY_TEMPLATE='<span aria-live="polite" aria-atomic="true" class="ag-overlay-loading-center"></span>';var Tc=Gd,Nd=class uh extends V{constructor(){super();}destroy(){super.destroy();}init(t){const i=this.gos.get("overlayNoRowsTemplate");if(this.setTemplate(i??uh.DEFAULT_NO_ROWS_TEMPLATE),!i){const s=this.localeService.getLocaleTextFunc();setTimeout(()=>{this.getGui().textContent=s("noRowsToShow","No Rows To Show");});}}};Nd.DEFAULT_NO_ROWS_TEMPLATE='<span class="ag-overlay-no-rows-center"></span>';var Ac=Nd,Fc=class extends Kt{constructor(){super('<div class="ag-tooltip"></div>');}init(e){const{value:t}=e;this.getGui().textContent=he(t,!0);}},xd=class extends Zs{constructor(){super(new class{getTemplate(){return'<ag-input-number-field class="ag-cell-editor" ref="eInput"></ag-input-number-field>';}init(e,t){this.eInput=e,this.params=t,null!=t.max&&e.setMax(t.max),null!=t.min&&e.setMin(t.min),null!=t.precision&&e.setPrecision(t.precision),null!=t.step&&e.setStep(t.step);const i=e.getInputElement();t.preventStepping?e.addManagedListener(i,"keydown",this.preventStepping):t.showStepperButtons&&i.classList.add("ag-number-field-input-stepper");}preventStepping(e){(e.key===C.UP||e.key===C.DOWN)&&e.preventDefault();}getValue(){const e=this.eInput.getValue();if(!y(e)&&!y(this.params.value))return this.params.value;let t=this.params.parseValue(e);if(null==t)return t;if("string"==typeof t){if(""===t)return null;t=Number(t);}return isNaN(t)?null:t;}getStartValue(){return this.params.value;}}());}},Od=class extends Zs{constructor(){super(new class{getTemplate(){return'<ag-input-date-field class="ag-cell-editor" ref="eInput"></ag-input-date-field>';}init(e,t){this.eInput=e,this.params=t,null!=t.min&&e.setMin(t.min),null!=t.max&&e.setMax(t.max),null!=t.step&&e.setStep(t.step);}getValue(){const e=this.eInput.getDate();return y(e)||y(this.params.value)?e??null:this.params.value;}getStartValue(){const{value:e}=this.params;if(e instanceof Date)return Je(e,!1);}}());}},dl=class extends Zs{constructor(){super(new class{constructor(e){this.getDataTypeService=e;}getTemplate(){return'<ag-input-date-field class="ag-cell-editor" ref="eInput"></ag-input-date-field>';}init(e,t){this.eInput=e,this.params=t,null!=t.min&&e.setMin(t.min),null!=t.max&&e.setMax(t.max),null!=t.step&&e.setStep(t.step);}getValue(){const e=this.formatDate(this.eInput.getDate());return y(e)||y(this.params.value)?this.params.parseValue(e??""):this.params.value;}getStartValue(){var e,t;return Je(null!=(t=this.parseDate(null!=(e=this.params.value)?e:void 0))?t:null,!1);}parseDate(e){return this.getDataTypeService().getDateParserFunction(this.params.column)(e);}formatDate(e){return this.getDataTypeService().getDateFormatterFunction(this.params.column)(e);}}(()=>this.dataTypeService));}};d([g("dataTypeService")],dl.prototype,"dataTypeService",2);var ul=class hh extends V{constructor(){super(hh.TEMPLATE);}init(t){this.params=t,this.updateCheckbox(t);const i=this.eCheckbox.getInputElement();i.setAttribute("tabindex","-1"),gn(i,"polite"),this.addManagedListener(i,"click",s=>{if(nt(s),this.eCheckbox.isDisabled())return;const o=this.eCheckbox.getValue();this.onCheckboxChanged(o);}
1),this.addManagedListener(i,"dblclick",s=>{nt(s);}),this.addManagedListener(this.params.eGridCell,"keydown",s=>{if(s.key===C.SPACE&&!this.eCheckbox.isDisabled()){this.params.eGridCell===this.gos.getActiveDomElement()&&this.eCheckbox.toggle();const o=this.eCheckbox.getValue();this.onCheckboxChanged(o),s.preventDefault();}});}refresh(t){return this.params=t,this.updateCheckbox(t),!0;}updateCheckbox(t){var i,s,o;let r,n=!0;if(t.node.group&&t.column){const p=t.column.getColId();p.startsWith(di)?r=null==t.value||""===t.value?void 0:"true"===t.value:t.node.aggData&&void 0!==t.node.aggData[p]?r=null!=(i=t.value)?i:void 0:n=!1;}else r=null!=(s=t.value)?s:void 0;if(!n)return void this.eCheckbox.setDisplayed(!1);this.eCheckbox.setValue(r);const l=null!=t.disabled?t.disabled:!(null!=(o=t.column)&&o.isCellEditable(t.node));this.eCheckbox.setDisabled(l);const a=this.localeService.getLocaleTextFunc(),u=er(a,r),h=l?u:`${a("ariaToggleCellValue","Press SPACE to toggle cell value")} (${u})`;this.eCheckbox.setInputAriaLabel(h);}onCheckboxChanged(t){const{column:i,node:s,rowIndex:o,value:r}=this.params,n={type:c.EVENT_CELL_EDITING_STARTED,column:i,colDef:i?.getColDef(),data:s.data,node:s,rowIndex:o,rowPinned:s.rowPinned,value:r};this.eventService.dispatchEvent(n);const l=this.params.node.setDataValue(this.params.column,t,"edit"),a={type:c.EVENT_CELL_EDITING_STOPPED,column:i,colDef:i?.getColDef(),data:s.data,node:s,rowIndex:o,rowPinned:s.rowPinned,value:r,oldValue:r,newValue:t,valueChanged:l};this.eventService.dispatchEvent(a);}};ul.TEMPLATE='\n <div class="ag-cell-wrapper ag-checkbox-cell" role="presentation">\n <ag-checkbox role="presentation" ref="eCheckbox"></ag-checkbox>\n </div>',d([A("eCheckbox")],ul.prototype,"eCheckbox",2);var _d=ul,hl=class extends Kt{constructor(){super('\n <div class="ag-cell-wrapper ag-cell-edit-wrapper ag-checkbox-edit">\n <ag-checkbox role="presentation" ref="eCheckbox"></ag-checkbox>\n </div>');}init(e){var t;this.params=e;const i=null!=(t=e.value)?t:void 0;this.eCheckbox.setValue(i),this.eCheckbox.getInputElement().setAttribute("tabindex","-1"),this.setAriaLabel(i),this.addManagedListener(this.eCheckbox,c.EVENT_FIELD_VALUE_CHANGED,o=>this.setAriaLabel(o.selected));}getValue(){return this.eCheckbox.getValue();}focusIn(){this.eCheckbox.getFocusableElement().focus();}afterGuiAttached(){this.params.cellStartedEdit&&this.focusIn();}isPopup(){return!1;}setAriaLabel(e){const t=this.localeService.getLocaleTextFunc(),i=er(t,e),s=t("ariaToggleCellValue","Press SPACE to toggle cell value");this.eCheckbox.setInputAriaLabel(`${s} (${i})`);}};d([A("eCheckbox")],hl.prototype,"eCheckbox",2);var Vd=class extends V{constructor(){super(),this.setTemplate("<div></div>");}init(e){var t;this.params=e,this.cssClassPrefix=null!=(t=this.params.cssClassPrefix)?t:"ag-menu-option",this.addIcon(),this.addName(),this.addShortcut(),this.addSubMenu();}configureDefaults(){return!0;}addIcon(){if(this.params.isCompact)return;const e=Oe(`<span ref="eIcon" class="${this.getClassName("part")} ${this.getClassName("icon")}" role="presentation"></span>`);this.params.checked?e.appendChild(re("check",this.gos)):this.params.icon&&(Us(this.params.icon)?e.appendChild(this.params.icon):"string"==typeof this.params.icon?e.innerHTML=this.params.icon:console.warn("AG Grid: menu item icon must be DOM node or string")),this.getGui().appendChild(e);}addName(){const e=Oe(`<span ref="eName" class="${this.getClassName("part")} ${this.getClassName("text")}">${this.params.name||""}</span>`);this.getGui().appendChild(e);}addShortcut(){if(this.params.isCompact)return;const e=Oe(`<span ref="eShortcut" class="${this.getClassName("part")} ${this.getClassName("shortcut")}">${this.params.shortcut||""}</span>`);this.getGui().appendChild(e);}addSubMenu(){const e=Oe(`<span ref="ePopupPointer" class="${this.getClassName("part")} ${this.getClassName("popup-pointer")}"></span>`),t=this.getGui();if(this.params.subMenu){const i=this.gos.get("enableRtl")?"smallLeft":"smallRight";Ft(t,!1),e.appendChild(re(i,this.gos));}t.appendChild(e);}getClassName(e){return`${this.cssClassPrefix}-${e}`;}destroy(){super.destroy();}},eo=class extends R{constructor(){super(...arguments),this.agGridDefaults={agDateInput:Sd,ag
1ColumnHeader:il,agColumnGroupHeader:Sc,agSortIndicator:mr,agTextColumnFloatingFilter:bd,agNumberColumnFloatingFilter:wc,agDateColumnFloatingFilter:cr,agReadOnlyFloatingFilter:Yn,agAnimateShowChangeCellRenderer:rl,agAnimateSlideCellRenderer:nl,agGroupCellRenderer:al,agGroupRowRenderer:al,agLoadingCellRenderer:Dc,agSkeletonCellRenderer:bc,agCheckboxCellRenderer:_d,agCellEditor:ol,agTextCellEditor:ol,agNumberCellEditor:xd,agDateCellEditor:Od,agDateStringCellEditor:dl,agSelectCellEditor:Cr,agLargeTextCellEditor:Td,agCheckboxCellEditor:hl,agTextColumnFilter:gr,agNumberColumnFilter:tl,agDateColumnFilter:Zn,agLoadingOverlay:Tc,agNoRowsOverlay:Ac,agTooltipComponent:Fc,agMenuItem:Vd},this.enterpriseAgDefaultCompsModule={agSetColumnFilter:"@ag-grid-enterprise/set-filter",agSetColumnFloatingFilter:"@ag-grid-enterprise/set-filter",agMultiColumnFilter:"@ag-grid-enterprise/multi-filter",agMultiColumnFloatingFilter:"@ag-grid-enterprise/multi-filter",agGroupColumnFilter:"@ag-grid-enterprise/row-grouping",agGroupColumnFloatingFilter:"@ag-grid-enterprise/row-grouping",agRichSelect:"@ag-grid-enterprise/rich-select",agRichSelectCellEditor:"@ag-grid-enterprise/rich-select",agDetailCellRenderer:"@ag-grid-enterprise/master-detail",agSparklineCellRenderer:"@ag-grid-enterprise/sparklines"},this.jsComps={};}init(){const e=this.gos.get("components");null!=e&&Se(e,(t,i)=>this.registerJsComponent(t,i));}registerDefaultComponent(e,t){this.agGridDefaults[e]?console.error("Trying to overwrite a default component. You should call registerComponent"):this.agGridDefaults[e]=t;}registerJsComponent(e,t){this.jsComps[e]=t;}retrieve(e,t){const i=(l,a)=>({componentFromFramework:a,component:l}),s=this.getFrameworkOverrides().frameworkComponent(t,this.gos.get("components"));if(null!=s)return i(s,!0);const o=this.jsComps[t];if(o)return i(o,this.getFrameworkOverrides().isFrameworkComponent(o));const r=this.agGridDefaults[t];if(r)return i(r,!1);const n=this.enterpriseAgDefaultCompsModule[t];return n?q.__assertRegistered(n,`AG Grid '${e}' component: ${t}`,this.context.getGridId()):zi(()=>{this.warnAboutMissingComponent(e,t);},"MissingComp"+t),null;}warnAboutMissingComponent(e,t){const s=zs(t,[...Object.keys(this.agGridDefaults).filter(o=>!["agCellEditor","agGroupRowRenderer","agSortIndicator"].includes(o)),...Object.keys(this.jsComps)],!0,.8).values;console.warn(`AG Grid: Could not find '${t}' component. It was configured as "${e}: '${t}'" but it wasn't found in the list of registered components.`),s.length>0&&console.warn(` Did you mean: [${s.slice(0,3)}]?`),console.warn(`If using a custom component check it has been registered as described in: ${this.getFrameworkOverrides().getDocLink("components/")}`);}};d([T],eo.prototype,"init",1),eo=d([L("userComponentRegistry")],eo);var Ic={propertyName:"dateComponent",cellRenderer:!1},Gc={propertyName:"headerComponent",cellRenderer:!1},Nc={propertyName:"headerGroupComponent",cellRenderer:!1},Hd={propertyName:"cellRenderer",cellRenderer:!0},xc={propertyName:"loadingCellRenderer",cellRenderer:!0},Oc={propertyName:"cellEditor",cellRenderer:!1},kd={propertyName:"innerRenderer",cellRenderer:!0},_c={propertyName:"loadingOverlayComponent",cellRenderer:!1},Vc={propertyName:"noRowsOverlayComponent",cellRenderer:!1},Hc={propertyName:"tooltipComponent",cellRenderer:!1},cl={propertyName:"filter",cellRenderer:!1},kc={propertyName:"floatingFilterComponent",cellRenderer:!1},Bc={propertyName:"toolPanel",cellRenderer:!1},Wc={propertyName:"statusPanel",cellRenderer:!1},Uc={propertyName:"fullWidthCellRenderer",cellRenderer:!0},zc={propertyName:"loadingCellRenderer",cellRenderer:!0},Kc={propertyName:"groupRowRenderer",cellRenderer:!0},$c={propertyName:"detailCellRenderer",cellRenderer:!0},Yc={propertyName:"menuItem",cellRenderer:!1},pl=class{static getFloatingFilterType(e){return this.filterToFloatingFilterMapping[e];}};pl.filterToFloatingFilterMapping={set:"agSetColumnFloatingFilter",agSetColumnFilter:"agSetColumnFloatingFilter",multi:"agMultiColumnFloatingFilter",agMultiColumnFilter:"agMultiColumnFloatingFilter",group:"agGroupColumnFloatingFilter",agGroupColumnFilter:"agGroupColumnFloatingFilter",number:"agNumberColumnFloatingFilter",agNumberColumnFilter:"agNumberColumnFloatingFilter",date:"agDateColumnFloatingFilter",agDateColumnFilter:"agDateColumnFloatingFilter",text:"agTextColumnFloatingFilter",agTextColumnFilter:"agTextColumnFloatingFilter"};
1var It=class extends R{getHeaderCompDetails(e,t){return this.getCompDetails(e,Gc,"agColumnHeader",t);}getHeaderGroupCompDetails(e){const t=e.columnGroup.getColGroupDef();return this.getCompDetails(t,Nc,"agColumnGroupHeader",e);}getFullWidthCellRendererDetails(e){return this.getCompDetails(this.gridOptions,Uc,null,e,!0);}getFullWidthLoadingCellRendererDetails(e){return this.getCompDetails(this.gridOptions,zc,"agLoadingCellRenderer",e,!0);}getFullWidthGroupCellRendererDetails(e){return this.getCompDetails(this.gridOptions,Kc,"agGroupRowRenderer",e,!0);}getFullWidthDetailCellRendererDetails(e){return this.getCompDetails(this.gridOptions,$c,"agDetailCellRenderer",e,!0);}getInnerRendererDetails(e,t){return this.getCompDetails(e,kd,null,t);}getFullWidthGroupRowInnerCellRenderer(e,t){return this.getCompDetails(e,kd,null,t);}getCellRendererDetails(e,t){return this.getCompDetails(e,Hd,null,t);}getLoadingCellRendererDetails(e,t){return this.getCompDetails(e,xc,"agSkeletonCellRenderer",t,!0);}getCellEditorDetails(e,t){return this.getCompDetails(e,Oc,"agCellEditor",t,!0);}getFilterDetails(e,t,i){return this.getCompDetails(e,cl,i,t,!0);}getDateCompDetails(e){return this.getCompDetails(this.gridOptions,Ic,"agDateInput",e,!0);}getLoadingOverlayCompDetails(e){return this.getCompDetails(this.gridOptions,_c,"agLoadingOverlay",e,!0);}getNoRowsOverlayCompDetails(e){return this.getCompDetails(this.gridOptions,Vc,"agNoRowsOverlay",e,!0);}getTooltipCompDetails(e){return this.getCompDetails(e.colDef,Hc,"agTooltipComponent",e,!0);}getSetFilterCellRendererDetails(e,t){return this.getCompDetails(e,Hd,null,t);}getFloatingFilterCompDetails(e,t,i){return this.getCompDetails(e,kc,i,t);}getToolPanelCompDetails(e,t){return this.getCompDetails(e,Bc,null,t,!0);}getStatusPanelCompDetails(e,t){return this.getCompDetails(e,Wc,null,t,!0);}getMenuItemCompDetails(e,t){return this.getCompDetails(e,Yc,"agMenuItem",t,!0);}getCompDetails(e,t,i,s,o=!1){const{propertyName:r,cellRenderer:n}=t;let{compName:l,jsComp:a,fwComp:u,paramsFromSelector:h,popupFromSelector:p,popupPositionFromSelector:f}=this.getCompKeys(e,t,s);const m=b=>{const E=this.userComponentRegistry.retrieve(r,b);E&&(a=E.componentFromFramework?void 0:E.component,u=E.componentFromFramework?E.component:void 0);};if(null!=l&&m(l),null==a&&null==u&&null!=i&&m(i),a&&n&&!this.agComponentUtils.doesImplementIComponent(a)&&(a=this.agComponentUtils.adaptFunction(r,a)),!a&&!u)return void(o&&console.error(`AG Grid: Could not find component ${l}, did you forget to configure this component?`));
1const v=this.mergeParamsWithApplicationProvidedParams(e,t,s,h),w=null==a,S=a||u;return{componentFromFramework:w,componentClass:S,params:v,type:t,popupFromSelector:p,popupPositionFromSelector:f,newAgStackInstance:()=>this.newAgStackInstance(S,w,v,t)};}getCompKeys(e,t,i){const{propertyName:s}=t;let o,r,n,l,a,u;if(e){const h=e,p=h[s+"Selector"],f=p?p(i):null,m=v=>{"string"==typeof v?o=v:null!=v&&!0!==v&&(this.getFrameworkOverrides().isFrameworkComponent(v)?n=v:r=v);};f?(m(f.component),l=f.params,a=f.popup,u=f.popupPosition):m(h[s]);}return{compName:o,jsComp:r,fwComp:n,paramsFromSelector:l,popupFromSelector:a,popupPositionFromSelector:u};}newAgStackInstance(e,t,i,s){let n;if(t){const a=this.componentMetadataProvider.retrieve(s.propertyName);n=this.frameworkComponentWrapper.wrap(e,a.mandatoryMethodList,a.optionalMethodList,s);}else n=new e();const l=this.initComponent(n,i);return null==l?$e.resolve(n):l.then(()=>n);}mergeParamsWithApplicationProvidedParams(e,t,i,s=null){const o=this.gos.getGridCommonParams();Ie(o,i);const n=e&&e[t.propertyName+"Params"];return"function"==typeof n?Ie(o,n(i)):"object"==typeof n&&Ie(o,n),Ie(o,s),o;}initComponent(e,t){if(this.context.createBean(e),null!=e.init)return e.init(t);}getDefaultFloatingFilterType(e,t){if(null==e)return null;let i=null,{compName:s,jsComp:o,fwComp:r}=this.getCompKeys(e,cl);return s?i=pl.getFloatingFilterType(s):null==o&&null==r&&!0===e.filter&&(i=t()),i;}};d([g("gridOptions")],It.prototype,"gridOptions",2),d([g("agComponentUtils")],It.prototype,"agComponentUtils",2),d([g("componentMetadataProvider")],It.prototype,"componentMetadataProvider",2),d([g("userComponentRegistry")],It.prototype,"userComponentRegistry",2),d([Q("frameworkComponentWrapper")],It.prototype,"frameworkComponentWrapper",2),It=d([L("userComponentFactory")],It);var Bd=(e=>(e[e.SINGLE_SHEET=0]="SINGLE_SHEET",e[e.MULTI_SHEET=1]="MULTI_SHEET",e))(Bd||{}),Wd=(e=>(e[e.Above=0]="Above",e[e.Below=1]="Below",e))(Wd||{}),gl=class{constructor(e){this.tickingInterval=null,this.onScrollCallback=null,this.scrollContainer=e.scrollContainer,this.scrollHorizontally=-1!==e.scrollAxis.indexOf("x"),this.scrollVertically=-1!==e.scrollAxis.indexOf("y"),this.scrollByTick=null!=e.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);}check(e,t=!1){const i=t||this.shouldSkipVerticalScroll();if(i&&this.shouldSkipHorizontalScroll())return;const s=this.scrollContainer.getBoundingClientRect(),o=this.scrollByTick;this.tickLeft=e.clientX<s.left+o,this.tickRight=e.clientX>s.right-o,this.tickUp=e.clientY<s.top+o&&!i,this.tickDown=e.clientY>s.bottom-o&&!i,this.tickLeft||this.tickRight||this.tickUp||this.tickDown?this.ensureTickingStarted():this.ensureCleared();}ensureTickingStarted(){null===this.tickingInterval&&(this.tickingInterval=window.setInterval(this.doTick.bind(this),100),this.tickCount=0);}doTick(){let e;if(this.tickCount++,e=this.tickCount>20?200:this.tickCount>10?80:40,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);}},Ye=class extends R{constructor(e){super(),this.eContainer=e;}postConstruct(){this.gos.isRowModelType("clientSide")&&(this.clientSideRowModel=this.rowModel),this.ctrlsService.whenReady(e=>{const t=e.gridBodyCtrl;this.autoScrollService=new gl({scrollContainer:t.getBodyViewportElement(),scrollAxis:"y",getVerticalPosition:()=>
1t.getScrollFeature().getVScrollPosition().top,setVerticalPosition:i=>t.getScrollFeature().setVerticalScrollPosition(i),onScrollCallback:()=>{this.onDragging(this.lastDraggingEvent);}});});}getContainer(){return this.eContainer;}isInterestedIn(e){return 2===e;}getIconName(){return this.gos.get("rowDragManaged")&&this.shouldPreventRowMove()?H.ICON_NOT_ALLOWED:H.ICON_MOVE;}shouldPreventRowMove(){return!!(this.columnModel.getRowGroupColumns().length||this.filterManager.isAnyFilterPresent()||this.sortController.isSortActive());}getRowNodes(e){if(!this.isFromThisGrid(e))return e.dragItem.rowNodes||[];const t=e.dragItem.rowNode;if(this.gos.get("rowDragMultiRow")){const s=[...this.selectionService.getSelectedNodes()].sort((o,r)=>null==o.rowIndex||null==r.rowIndex?0:this.getRowIndexNumber(o)-this.getRowIndexNumber(r));if(-1!==s.indexOf(t))return s;}return[t];}onDragEnter(e){e.dragItem.rowNodes=this.getRowNodes(e),this.dispatchGridEvent(c.EVENT_ROW_DRAG_ENTER,e),this.getRowNodes(e).forEach(t=>{t.setDragging(!0);}),this.onEnterOrDragging(e);}onDragging(e){this.onEnterOrDragging(e);}isFromThisGrid(e){const{dragSourceDomDataKey:t}=e.dragSource;return t===this.gos.getDomDataKey();}isDropZoneWithinThisGrid(e){const i=this.ctrlsService.getGridBodyCtrl().getGui(),{dropZoneTarget:s}=e;return!i.contains(s);}onEnterOrDragging(e){this.dispatchGridEvent(c.EVENT_ROW_DRAG_MOVE,e),this.lastDraggingEvent=e;const t=this.mouseEventService.getNormalisedPosition(e).y;this.gos.get("rowDragManaged")&&this.doManagedDrag(e,t),this.autoScrollService.check(e.event);}doManagedDrag(e,t){const i=this.isFromThisGrid(e),s=this.gos.get("rowDragManaged"),o=e.dragItem.rowNodes;s&&this.shouldPreventRowMove()||(this.gos.get("suppressMoveWhenRowDragging")||!i?this.isDropZoneWithinThisGrid(e)||this.clientSideRowModel.highlightRowAtPixel(o[0],t):this.moveRows(o,t));}getRowIndexNumber(e){return parseInt(Y(e.getRowIndexString().split("-")),10);}moveRowAndClearHighlight(e){const t=this.clientSideRowModel.getLastHighlightedRowNode(),i=t&&1===t.highlighted,s=this.mouseEventService.getNormalisedPosition(e).y,o=e.dragItem.rowNodes;let r=i?1:0;if(this.isFromThisGrid(e))o.forEach(n=>{n.rowTop<s&&(r-=1);}),this.moveRows(o,s,r);else{const n=this.gos.getCallback("getRowId");let l=this.clientSideRowModel.getRowIndexAtPixel(s)+1;0===this.clientSideRowModel.getHighlightPosition(s)&&l--,this.clientSideRowModel.updateRowData({add:o.map(a=>a.data).filter(a=>!this.clientSideRowModel.getRowNode(n?n({data:a,level:0}):a.id)),addIndex:l});}this.clearRowHighlight();}clearRowHighlight(){this.clientSideRowModel.highlightRowAtPixel(null);}moveRows(e,t,i=0){var s;this.clientSideRowModel.ensureRowsAtPixel(e,t,i)&&(this.focusService.clearFocusedCell(),null==(s=this.rangeService)||s.removeAllCellRanges());}addRowDropZone(e){if(!e.getContainer())return void O("addRowDropZone - A container target needs to be provided");if(this.dragAndDropService.findExternalZone(e))return void console.warn("AG Grid: addRowDropZone - target already exists in the list of DropZones. Use `removeRowDropZone` before adding it again.");let t={getContainer:e.getContainer};e.fromGrid?t=e:(e.onDragEnter&&(t.onDragEnter=i=>{e.onDragEnter(this.draggingToRowDragEvent(c.EVENT_ROW_DRAG_ENTER,i));}),e.onDragLeave&&(t.onDragLeave=i=>{e.onDragLeave(this.draggingToRowDragEvent(c.EVENT_ROW_DRAG_LEAVE,i));}),e.onDragging&&(t.onDragging=i=>{e.onDragging(this.draggingToRowDragEvent(c.EVENT_ROW_DRAG_MOVE,i));}),e.onDragStop&&(t.onDragStop=i=>{e.onDragStop(this.draggingToRowDragEvent(c.EVENT_ROW_DRAG_END,i));})),this.dragAndDropService.addDropTarget(M({isInterestedIn:i=>2===i,getIconName:()=>H.ICON_MOVE,external:!0},t));}getRowDropZone(e){const t=this.getContainer.bind(this),i=this.onDragEnter.bind(this),s=this.onDragLeave.bind(this),o=this.onDragging.bind(this),r=this.onDragStop.bind(this);return e?{getContainer:t,onDragEnter:e.onDragEnter?n=>{i(n),e.onDragEnter(this.draggingToRowDragEvent(c.EVENT_ROW_DRAG_ENTER,n));}:i,onDragLeave:e.onDragLeave?n=>{s(n),e.onDragLeave(this.draggingToRowDragEvent(c.EVENT_ROW_DRAG_LEAVE,n));}:s,onDragging:e.onDragging?n=>{o(n),e.onDragging(this.draggingToRowDragEvent(c.EVENT_ROW_DRAG_MOVE,n));}:o,onDragStop:e.onDragStop?n=>{r(n),e.onDragStop(this.draggingToRowDragEvent(c.EVENT_ROW_DRAG_END,n));}:r,fromGrid:!0}:{getContainer:t,onDragEnter:i,onDragLeave:s,onDragging:o,onDragStop:r,fromGrid:!0};}draggingToRowDragEvent(e,t){const i=this.mouseEventService.getNormalisedPosition(t).y;let r,n,o=-1;switch(i>this.paginationProxy.getCurrentPageHeight()||(o=this.rowModel.getRowIndexAtPixel(i),r=this.rowModel.getRow(o)),t.vDirection){case 1:n="down";break;case 0:n="up";break;default:n=null;}return this.gos.addGridCommonParams({type:e,event:t.event,node:t.dragItem.rowNode,nodes:t.dragItem.rowNodes,overIndex:o,overNode:r,y:i,vDirection:n});}dispatchGridEvent(e,t){const i=this.draggingToRowDragEvent(e,t);this.eventService.dispatchEvent(i);}onDragLeave(e){this.dispatchGridEvent(c.EVENT_ROW_DRAG_LEAVE,e),this.stopDragging(e),this.gos.get("rowDragManaged")&&this.clearRowHighlight();}onDragStop(e){this.dispatchGridEvent(c.EVENT_ROW_DRAG_END,e),this.stopDragging(e),this.gos.get("rowDragManaged")&&(this.gos.get("suppressMoveWhenRowDragging")||!this.isFromThisGrid(e))&&!this.isDropZoneWithinThisGrid(e)&&this.moveRowAndClearHighlight(e);}stopDragging(e){this.autoScrollService.ensureCleared(),this.getRowNodes(e).forEach(t=>{t.setDragging(!1);});}};d([g("dragAndDropService")],Ye.prototype,"dragAndDropService",2),d([g("rowModel")],Ye.prototype,"rowModel",2),d([g("paginationProxy")],Ye.prototype,"paginationProxy",2),d([g("columnModel")],Ye.prototype,"columnModel",2),d([g("focusService")],Ye.prototype,"focusService",2),d([g("sortController")],Ye.prototype,"sortController",2),d([g("filterManager")],Ye.prototype,"filterManager",2),d([g("selectionService")],Ye.prototype,"selectionService",2),d([g("mouseEventService")],Ye.prototype,"mouseEventService",2),d([g("ctrlsService")],Ye.prototype,"ctrlsService",2),d([Q("rangeService")],Ye.prototype,"rangeService",2),d([T],Ye.prototype,"postConstruct",1);var Ji=class extends R{constructor(){super(...arguments),this.dragEndFunctions=[],this.dragSources=[];}
1removeAllListeners(){this.dragSources.forEach(this.removeListener.bind(this)),this.dragSources.length=0;}removeListener(e){const t=e.dragSource.eElement;t.removeEventListener("mousedown",e.mouseDownListener),e.touchEnabled&&t.removeEventListener("touchstart",e.touchStartListener,{passive:!0});}removeDragSource(e){const t=this.dragSources.find(i=>i.dragSource===e);t&&(this.removeListener(t),Ge(this.dragSources,t));}isDragging(){return this.dragging;}addDragSource(e){const t=this.onMouseDown.bind(this,e),{eElement:i,includeTouch:s,stopPropagationForTouch:o}=e;i.addEventListener("mousedown",t);let r=null;const n=this.gos.get("suppressTouch");s&&!n&&(r=l=>{On(l.target)||(l.cancelable&&(l.preventDefault(),o&&l.stopPropagation()),this.onTouchStart(e,l));},i.addEventListener("touchstart",r,{passive:!1})),this.dragSources.push({dragSource:e,mouseDownListener:t,touchStartListener:r,touchEnabled:!!s});}getStartTarget(){return this.startTarget;}onTouchStart(e,t){this.currentDragParams=e,this.dragging=!1;const i=t.touches[0];this.touchLastTime=i,this.touchStart=i;const o=a=>this.onTouchUp(a,e.eElement),n=t.target,l=[{target:this.gos.getRootNode(),type:"touchmove",listener:a=>{a.cancelable&&a.preventDefault();},options:{passive:!1}},{target:n,type:"touchmove",listener:a=>this.onTouchMove(a,e.eElement),options:{passive:!0}},{target:n,type:"touchend",listener:o,options:{passive:!0}},{target:n,type:"touchcancel",listener:o,options:{passive:!0}}];this.addTemporaryEvents(l),0===e.dragStartPixels&&this.onCommonMove(i,this.touchStart,e.eElement);}onMouseDown(e,t){const i=t;if(e.skipMouseEvent&&e.skipMouseEvent(t)||i._alreadyProcessedByDragService||(i._alreadyProcessedByDragService=!0,0!==t.button))return;this.shouldPreventMouseEvent(t)&&t.preventDefault(),this.currentDragParams=e,this.dragging=!1,this.mouseStartEvent=t,this.startTarget=t.target;const n=this.gos.getRootNode();this.addTemporaryEvents([{target:n,type:"mousemove",listener:a=>this.onMouseMove(a,e.eElement)},{target:n,type:"mouseup",listener:a=>this.onMouseUp(a,e.eElement)},{target:n,type:"contextmenu",listener:a=>a.preventDefault()}]),0===e.dragStartPixels&&this.onMouseMove(t,e.eElement);}addTemporaryEvents(e){e.forEach(t=>{const{target:i,type:s,listener:o,options:r}=t;i.addEventListener(s,o,r);}),this.dragEndFunctions.push(()=>{e.forEach(t=>{const{target:i,type:s,listener:o,options:r}=t;i.removeEventListener(s,o,r);});});}isEventNearStartEvent(e,t){const{dragStartPixels:i}=this.currentDragParams;return Kn(e,t,y(i)?i:4);}getFirstActiveTouch(e){for(let t=0;t<e.length;t++)if(e[t].identifier===this.touchStart.identifier)return e[t];return null;}onCommonMove(e,t,i){if(!this.dragging){if(!this.dragging&&this.isEventNearStartEvent(e,t))return;this.dragging=!0,this.eventService.dispatchEvent({type:c.EVENT_DRAG_STARTED,target:i}),this.currentDragParams.onDragStart(t),this.currentDragParams.onDragging(t);}this.currentDragParams.onDragging(e);}onTouchMove(e,t){const i=this.getFirstActiveTouch(e.touches);i&&this.onCommonMove(i,this.touchStart,t);}onMouseMove(e,t){var i;gt()&&(null==(i=this.gos.getDocument().getSelection())||i.removeAllRanges()),this.shouldPreventMouseEvent(e)&&e.preventDefault(),this.onCommonMove(e,this.mouseStartEvent,t);}shouldPreventMouseEvent(e){return this.gos.get("enableCellTextSelection")&&"mousemove"===e.type&&e.cancelable&&this.mouseEventService.isEventFromThisGrid(e)&&!this.isOverFormFieldElement(e);}isOverFormFieldElement(e){const t=e.target,i=t?.tagName.toLocaleLowerCase();return!!i?.match("^a$|textarea|input|select|button");}onTouchUp(e,t){let i=this.getFirstActiveTouch(e.changedTouches);i||(i=this.touchLastTime),this.onUpCommon(i,t);}onMouseUp(e,t){this.onUpCommon(e,t);}onUpCommon(e,t){this.dragging&&(this.dragging=!1,this.currentDragParams.onDragStop(e),this.eventService.dispatchEvent({type:c.EVENT_DRAG_STOPPED,target:t})),this.mouseStartEvent=null,this.startTarget=null,this.touchStart=null,this.touchLastTime=null,this.currentDragParams=null,this.dragEndFunctions.forEach(i=>i()),this.dragEndFunctions.length=0;}};d([g("mouseEventService")],Ji.prototype,"mouseEventService",2),d([Ee],Ji.prototype,"removeAllListeners",1),Ji=d([L("dragService")],Ji);var fl="ag-list-item-hovered",ml=class extends R{constructor(e,t,i){super(),this.comp=e,this.virtualList=t,this.params=i,this.currentDragValue=null,this.lastHoveredListItem=null;}postConstruct(){this.addManagedListener(this.params.eventSource,this.params.listItemDragStartEvent,this.listItemDragStart.bind(this)),this.addManagedListener(this.params.eventSource,this.params.listItemDragEndEvent,this.listItemDragEnd.bind(this)),this.createDropTarget(),this.createAutoScrollService();}listItemDragStart(e){this.currentDragValue=this.params.getCurrentDragValue(e),this.moveBlocked=this.params.isMoveBlocked(this.currentDragValue);}listItemDragEnd(){window.setTimeout(()=>{this.currentDragValue=null,this.moveBlocked=!1;},10);}createDropTarget(){this.dragAndDropService.addDropTarget({isInterestedIn:t=>t===this.params.dragSourceType,getIconName:()=>this.moveBlocked?H.ICON_PINNED:H.ICON_MOVE,getContainer:()=>this.comp.getGui(),onDragging:t=>this.onDragging(t),onDragStop:()=>this.onDragStop(),onDragLeave:()=>this.onDragLeave()});}createAutoScrollService(){const e=this.virtualList.getGui();
1this.autoScrollService=new gl({scrollContainer:e,scrollAxis:"y",getVerticalPosition:()=>e.scrollTop,setVerticalPosition:t=>e.scrollTop=t});}onDragging(e){if(!this.currentDragValue||this.moveBlocked)return;const t=this.getListDragItem(e),i=this.virtualList.getComponentAt(t.rowIndex);if(!i)return;const s=i.getGui().parentElement;this.lastHoveredListItem&&this.lastHoveredListItem.rowIndex===t.rowIndex&&this.lastHoveredListItem.position===t.position||(this.autoScrollService.check(e.event),this.clearHoveredItems(),this.lastHoveredListItem=t,Nn(s,fl),Nn(s,`ag-item-highlight-${t.position}`));}getListDragItem(e){const t=this.virtualList.getGui(),i=parseFloat(window.getComputedStyle(t).paddingTop),s=this.virtualList.getRowHeight(),o=this.virtualList.getScrollTop(),r=Math.max(0,(e.y-i+o)/s),n=this.params.getNumRows(this.comp)-1,l=0|Math.min(n,r);return{rowIndex:l,position:Math.round(r)>r||r>n?"bottom":"top",component:this.virtualList.getComponentAt(l)};}onDragStop(){this.moveBlocked||(this.params.moveItem(this.currentDragValue,this.lastHoveredListItem),this.clearHoveredItems(),this.autoScrollService.ensureCleared());}onDragLeave(){this.clearHoveredItems(),this.autoScrollService.ensureCleared();}clearHoveredItems(){this.virtualList.getGui().querySelectorAll(`.${fl}`).forEach(t=>{[fl,"ag-item-highlight-top","ag-item-highlight-bottom"].forEach(i=>{t.classList.remove(i);});}),this.lastHoveredListItem=null;}};function wi(e){return null!=e&&null!=e.getFrameworkComponentInstance?e.getFrameworkComponentInstance():e;}d([g("dragAndDropService")],ml.prototype,"dragAndDropService",2),d([T],ml.prototype,"postConstruct",1);var U=class{constructor(){this.detailGridInfoMap={},this.destroyCalled=!1;}init(){switch(this.rowModel.getType()){case"clientSide":this.clientSideRowModel=this.rowModel;break;case"infinite":this.infiniteRowModel=this.rowModel;break;case"serverSide":this.serverSideRowModel=this.rowModel;}this.ctrlsService.whenReady(e=>{this.gridBodyCtrl=e.gridBodyCtrl;});}__getAlignedGridService(){return this.alignedGridsService;}getGridId(){return this.context.getGridId();}addDetailGridInfo(e,t){this.detailGridInfoMap[e]=t;}removeDetailGridInfo(e){delete this.detailGridInfoMap[e];}getDetailGridInfo(e){return this.detailGridInfoMap[e];}forEachDetailGridInfo(e){let t=0;Se(this.detailGridInfoMap,(i,s)=>{y(s)&&(e(s,t),t++);});}getDataAsCsv(e){if(q.__assertRegistered("@ag-grid-community/csv-export","api.getDataAsCsv",this.context.getGridId()))return this.csvCreator.getDataAsCsv(e);}exportDataAsCsv(e){q.__assertRegistered("@ag-grid-community/csv-export","api.exportDataAsCsv",this.context.getGridId())&&this.csvCreator.exportDataAsCsv(e);}assertNotExcelMultiSheet(e,t){return!(!q.__assertRegistered("@ag-grid-enterprise/excel-export","api."+e,this.context.getGridId())||1===this.excelCreator.getFactoryMode()&&(console.warn("AG Grid: The Excel Exporter is currently on Multi Sheet mode. End that operation by calling 'api.getMultipleSheetAsExcel()' or 'api.exportMultipleSheetsAsExcel()'"),1));}getDataAsExcel(e){if(this.assertNotExcelMultiSheet("getDataAsExcel",e))return this.excelCreator.getDataAsExcel(e);}exportDataAsExcel(e){this.assertNotExcelMultiSheet("exportDataAsExcel",e)&&this.excelCreator.exportDataAsExcel(e);}getSheetDataForExcel(e){if(q.__assertRegistered("@ag-grid-enterprise/excel-export","api.getSheetDataForExcel",this.context.getGridId()))return this.excelCreator.setFactoryMode(1),this.excelCreator.getSheetDataForExcel(e);}getMultipleSheetsAsExcel(e){if(q.__assertRegistered("@ag-grid-enterprise/excel-export","api.getMultipleSheetsAsExcel",this.context.getGridId()))return this.excelCreator.getMultipleSheetsAsExcel(e);}exportMultipleSheetsAsExcel(e){q.__assertRegistered("@ag-grid-enterprise/excel-export","api.exportMultipleSheetsAsExcel",this.context.getGridId())&&this.excelCreator.exportMultipleSheetsAsExcel(e);}setGridAriaProperty(e,t){if(!e)return;const i=this.ctrlsService.getGridBodyCtrl().getGui(),s=`aria-${e}`;null===t?i.removeAttribute(s):i.setAttribute(s,t);}logMissingRowModel(e,...t){console.error(`AG Grid: api.${e} can only be called when gridOptions.rowModelType is ${t.join(" or ")}`);}logDeprecation(e,t,i,s){O(`Since ${e} api.${t} is deprecated. Please use ${i} instead. ${s??""}`);}getPinnedTopRowCount(){return this.pinnedRowModel.getPinnedTopRowCount();}getPinnedBottomRowCount(){return this.pinnedRowModel.getPinnedBottomRowCount();}getPinnedTopRow(e){return this.pinnedRowModel.getPinnedTopRow(e);}getPinnedBottomRow(e){return this.pinnedRowModel.getPinnedBottomRow(e);}expireValueCache(){this.valueCache.expire();}getVerticalPixelRange(){return this.gridBodyCtrl.getScrollFeature
1().getVScrollPosition();}getHorizontalPixelRange(){return this.gridBodyCtrl.getScrollFeature().getHScrollPosition();}refreshCells(e={}){this.frameworkOverrides.wrapIncoming(()=>this.rowRenderer.refreshCells(e));}flashCells(e={}){const t=i=>O(`Since v31.1 api.flashCells parameter '${i}Delay' is deprecated. Please use '${i}Duration' instead.`);y(e.fadeDelay)&&t("fade"),y(e.flashDelay)&&t("flash"),this.frameworkOverrides.wrapIncoming(()=>this.rowRenderer.flashCells(e));}redrawRows(e={}){const t=e?e.rowNodes:void 0;this.frameworkOverrides.wrapIncoming(()=>this.rowRenderer.redrawRows(t));}refreshHeader(){this.frameworkOverrides.wrapIncoming(()=>this.ctrlsService.getHeaderRowContainerCtrls().forEach(e=>e.refresh()));}isAnyFilterPresent(){return this.filterManager.isAnyFilterPresent();}isColumnFilterPresent(){return this.filterManager.isColumnFilterPresent()||this.filterManager.isAggregateFilterPresent();}isQuickFilterPresent(){return this.filterManager.isQuickFilterPresent();}getModel(){return O("Since v31.1 getModel() is deprecated. Please use the appropriate grid API methods instead."),this.rowModel;}setRowNodeExpanded(e,t,i,s){this.expansionService.setRowNodeExpanded(e,t,i,s);}onGroupExpandedOrCollapsed(){_(this.clientSideRowModel)?this.logMissingRowModel("onGroupExpandedOrCollapsed","clientSide"):this.expansionService.onGroupExpandedOrCollapsed();}refreshClientSideRowModel(e){_(this.clientSideRowModel)?this.logMissingRowModel("refreshClientSideRowModel","clientSide"):this.clientSideRowModel.refreshModel(e);}isAnimationFrameQueueEmpty(){return this.animationFrameService.isQueueEmpty();}flushAllAnimationFrames(){this.animationFrameService.flushAllFrames();}getRowNode(e){return this.rowModel.getRowNode(e);}getSizesForCurrentTheme(){return{rowHeight:this.gos.getRowHeightAsNumber(),headerHeight:this.columnModel.getHeaderHeight()};}expandAll(){this.clientSideRowModel||this.serverSideRowModel?this.expansionService.expandAll(!0):this.logMissingRowModel("expandAll","clientSide","serverSide");}collapseAll(){this.clientSideRowModel||this.serverSideRowModel?this.expansionService.expandAll(!1):this.logMissingRowModel("collapseAll","clientSide","serverSide");}addRenderedRowListener(e,t,i){this.rowRenderer.addRenderedRowListener(e,t,i);}getQuickFilter(){return this.gos.get("quickFilterText");}getAdvancedFilterModel(){return q.__assertRegistered("@ag-grid-enterprise/advanced-filter","api.getAdvancedFilterModel",this.context.getGridId())?this.filterManager.getAdvancedFilterModel():null;}setAdvancedFilterModel(e){this.filterManager.setAdvancedFilterModel(e);}showAdvancedFilterBuilder(){q.__assertRegistered("@ag-grid-enterprise/advanced-filter","api.setAdvancedFilterModel",this.context.getGridId())&&this.filterManager.showAdvancedFilterBuilder("api");}setNodesSelected(e){if(!e.nodes.every(n=>n.rowPinned?(console.warn("AG Grid: cannot select pinned rows"),!1):void 0!==n.id||(console.warn("AG Grid: cannot select node until id for node is known"),!1)))return;const{nodes:i,source:s,newValue:o}=e;this.selectionService.setNodesSelected({nodes:i,source:s??"api",newValue:o});}selectAll(e="apiSelectAll"){this.selectionService.selectAllRowNodes({source:e});}deselectAll(e="apiSelectAll"){this.selectionService.deselectAllRowNodes({source:e});}selectAllFiltered(e="apiSelectAllFiltered"){this.selectionService.selectAllRowNodes({source:e,justFiltered:!0});}deselectAllFiltered(e="apiSelectAllFiltered"){this.selectionService.deselectAllRowNodes({source:e,justFiltered:!0});}getServerSideSelectionState(){return _(this.serverSideRowModel)?(this.logMissingRowModel("getServerSideSelectionState","serverSide"),null):this.selectionService.getSelectionState();}setServerSideSelectionState(e){_(this.serverSideRowModel)?this.logMissingRowModel("setServerSideSelectionState","serverSide"):this.selectionService.setSelectionState(e,"api");}selectAllOnCurrentPage(e="apiSelectAllCurrentPage"){this.selectionService.selectAllRowNodes({source:e,justCurrentPage:!0});}deselectAllOnCurrentPage(e="apiSelectAllCurrentPage"){this.selectionService.deselectAllRowNodes({source:e,justCurrentPage:!0});}showLoadingOverlay(){this.overlayService.showLoadingOverlay();}showNoRowsOverlay(){this.overlayService.showNoRowsOverlay();}hideOverlay(){this.overlayService.hideOverlay();}getSelectedNodes(){return this.selectionService.getSelectedNodes();}getSelectedRows(){return this.selectionService.getSelectedRows();}getBestCostNodeSelection(){if(!_(this.clientSideRowModel))return this.selectionService.getBe
1stCostNodeSelection();this.logMissingRowModel("getBestCostNodeSelection","clientSide");}getRenderedNodes(){return this.rowRenderer.getRenderedNodes();}ensureColumnVisible(e,t="auto"){this.frameworkOverrides.wrapIncoming(()=>this.gridBodyCtrl.getScrollFeature().ensureColumnVisible(e,t),"ensureVisible");}ensureIndexVisible(e,t){this.frameworkOverrides.wrapIncoming(()=>this.gridBodyCtrl.getScrollFeature().ensureIndexVisible(e,t),"ensureVisible");}ensureNodeVisible(e,t=null){this.frameworkOverrides.wrapIncoming(()=>this.gridBodyCtrl.getScrollFeature().ensureNodeVisible(e,t),"ensureVisible");}forEachLeafNode(e){_(this.clientSideRowModel)?this.logMissingRowModel("forEachLeafNode","clientSide"):this.clientSideRowModel.forEachLeafNode(e);}forEachNode(e,t){this.rowModel.forEachNode(e,t);}forEachNodeAfterFilter(e){_(this.clientSideRowModel)?this.logMissingRowModel("forEachNodeAfterFilter","clientSide"):this.clientSideRowModel.forEachNodeAfterFilter(e);}forEachNodeAfterFilterAndSort(e){_(this.clientSideRowModel)?this.logMissingRowModel("forEachNodeAfterFilterAndSort","clientSide"):this.clientSideRowModel.forEachNodeAfterFilterAndSort(e);}getFilterInstance(e,t){return O("'getFilterInstance' is deprecated. To get/set individual filter models, use 'getColumnFilterModel' or 'setColumnFilterModel' instead. To get hold of the filter instance, use 'getColumnFilterInstance' which returns the instance asynchronously."),this.filterManager.getFilterInstance(e,t);}getColumnFilterInstance(e){return this.filterManager.getColumnFilterInstance(e);}destroyFilter(e){const t=this.columnModel.getPrimaryColumn(e);if(t)return this.filterManager.destroyFilter(t,"api");}getStatusPanel(e){if(q.__assertRegistered("@ag-grid-enterprise/status-bar","api.getStatusPanel",this.context.getGridId()))return wi(this.statusBarService.getStatusPanel(e));}getColumnDef(e){const t=this.columnModel.getPrimaryColumn(e);return t?t.getColDef():null;}getColumnDefs(){return this.columnModel.getColumnDefs();}onFilterChanged(e="api"){this.filterManager.onFilterChanged({source:e});}onSortChanged(){this.sortController.onSortChanged("api");}setFilterModel(e){this.frameworkOverrides.wrapIncoming(()=>this.filterManager.setFilterModel(e));}getFilterModel(){return this.filterManager.getFilterModel();}getColumnFilterModel(e){return this.filterManager.getColumnFilterModel(e);}setColumnFilterModel(e,t){return this.filterManager.setColumnFilterModel(e,t);}getFocusedCell(){return this.focusService.getFocusedCell();}clearFocusedCell(){return this.focusService.clearFocusedCell();}setFocusedCell(e,t,i){this.focusService.setFocusedCell({rowIndex:e,column:t,rowPinned:i,forceBrowserFocus:!0});}addRowDropZone(e){this.gridBodyCtrl.getRowDragFeature().addRowDropZone(e);}removeRowDropZone(e){const t=this.dragAndDropService.findExternalZone(e);t&&this.dragAndDropService.removeDropTarget(t);}getRowDropZoneParams(e){return this.gridBodyCtrl.getRowDragFeature().getRowDropZone(e);}assertSideBarLoaded(e){return q.__assertRegistered("@ag-grid-enterprise/side-bar","api."+e,this.context.getGridId());}isSideBarVisible(){return this.assertSideBarLoaded("isSideBarVisible")&&this.sideBarService.getSideBarComp().isDisplayed();}setSideBarVisible(e){this.assertSideBarLoaded("setSideBarVisible")&&this.sideBarService.getSideBarComp().setDisplayed(e);}setSideBarPosition(e){this.assertSideBarLoaded("setSideBarPosition")&&this.sideBarService.getSideBarComp().setSideBarPosition(e);}openToolPanel(e){this.assertSideBarLoaded("openToolPanel")&&this.sideBarService.getSideBarComp().openToolPanel(e,"api");}closeToolPanel(){this.assertSideBarLoaded("closeToolPanel")&&this.sideBarService.getSideBarComp().close("api");}getOpenedToolPanel(){return this.assertSideBarLoaded("getOpenedToolPanel")?this.sideBarService.getSideBarComp().openedItem():null;}refreshToolPanel(){this.assertSideBarLoaded("refreshToolPanel")&&this.sideBarService.getSideBarComp().refresh();}isToolPanelShowing(){return this.assertSideBarLoaded("isToolPanelShowing")&&this.sideBarService.getSideBarComp().isToolPanelShowing();}getToolPanelInstance(e){if(this.assertSideBarLoaded("getToolPanelInstance"))return wi(this.sideBarService.getSideBarComp().getToolPanelInstance(e));}getSideBar(){if(this.assertSideBarLoaded("getSideBar"))return this.sideBarService.getSideBarComp().getDef();}resetRowHeights(){if(y(this.clientSideRowModel)){if(this.columnModel.isAutoRowHeightActive())return void console.warn("AG Grid: calling gridApi.resetRowHeights() makes no sense when using Auto Row Height.");this.clientSideRowModel.resetRowHeights();}}setRowCount(e,t){if(this.serverSideRowModel)return this.columnModel.isRowGroupEmpty()?void this.serverSideRowModel.setRowCount(e,t):void console.error("AG Grid: setRowCount cannot be used while using row grouping.");this.infiniteRowModel?this.infiniteRowModel.setRowCount(e,t):this.logMissingRowModel("setRowCount","
1infinite","serverSide");}onRowHeightChanged(){this.clientSideRowModel?this.clientSideRowModel.onRowHeightChanged():this.serverSideRowModel&&this.serverSideRowModel.onRowHeightChanged();}getValue(e,t){return this.logDeprecation("31.3","getValue","getCellValue"),this.getCellValue({colKey:e,rowNode:t});}getCellValue(e){var t;const{colKey:i,rowNode:s,useFormatter:o}=e;let r=null!=(t=this.columnModel.getPrimaryColumn(i))?t:this.columnModel.getGridColumn(i);if(_(r))return null;const n=this.valueService.getValue(r,s);return o?this.valueService.formatValue(r,s,n)??he(n,!0):n;}addEventListener(e,t){this.apiEventService.addEventListener(e,t);}addGlobalListener(e){this.apiEventService.addGlobalListener(e);}removeEventListener(e,t){this.apiEventService.removeEventListener(e,t);}removeGlobalListener(e){this.apiEventService.removeGlobalListener(e);}dispatchEvent(e){this.eventService.dispatchEvent(e);}destroy(){var e;const t=`See ${this.frameworkOverrides.getDocLink("grid-lifecycle/#grid-pre-destroyed")}`;if(this.destroyCalled)return;const i={type:c.EVENT_GRID_PRE_DESTROYED,state:this.getState()};this.dispatchEvent(i),this.destroyCalled=!0,null==(e=this.ctrlsService.get("gridCtrl"))||e.destroyGridUi(),this.context.destroy(),this.detailGridInfoMap={},ql(this,["isDestroyed"],t);}isDestroyed(){return this.destroyCalled;}resetQuickFilter(){this.filterManager.resetQuickFilterCache();}getCellRanges(){return this.rangeService?this.rangeService.getCellRanges():(q.__assertRegistered("@ag-grid-enterprise/range-selection","api.getCellRanges",this.context.getGridId()),null);}addCellRange(e){this.rangeService?this.rangeService.addCellRange(e):q.__assertRegistered("@ag-grid-enterprise/range-selection","api.addCellRange",this.context.getGridId());}clearRangeSelection(){this.rangeService&&this.rangeService.removeAllCellRanges(),q.__assertRegistered("@ag-grid-enterprise/range-selection","gridApi.clearRangeSelection",this.context.getGridId());}undoCellEditing(){this.undoRedoService.undo("api");}redoCellEditing(){this.undoRedoService.redo("api");}getCurrentUndoSize(){return this.undoRedoService.getCurrentUndoStackSize();}getCurrentRedoSize(){return this.undoRedoService.getCurrentRedoStackSize();}assertChart(e,t){if(q.__assertRegistered("@ag-grid-enterprise/charts","api."+e,this.context.getGridId()))return this.frameworkOverrides.wrapIncoming(()=>t());}getChartModels(){return this.assertChart("getChartModels",()=>this.chartService.getChartModels());}getChartRef(e){return this.assertChart("getChartRef",()=>this.chartService.getChartRef(e));}getChartImageDataURL(e){return this.assertChart("getChartImageDataURL",()=>this.chartService.getChartImageDataURL(e));}downloadChart(e){return this.assertChart("downloadChart",()=>this.chartService.downloadChart(e));}openChartToolPanel(e){return this.assertChart("openChartToolPanel",()=>this.chartService.openChartToolPanel(e));}closeChartToolPanel(e){return this.assertChart("closeChartToolPanel",()=>this.chartService.closeChartToolPanel(e.chartId));}createRangeChart(e){return this.assertChart("createRangeChart",()=>this.chartService.createRangeChart(e));}createPivotChart(e){return this.assertChart("createPivotChart",()=>this.chartService.createPivotChart(e));}createCrossFilterChart(e){return this.assertChart("createCrossFilterChart",()=>this.chartService.createCrossFilterChart(e));}updateChart(e){return this.assertChart("updateChart",()=>this.chartService.updateChart(e));}restoreChart(e,t){return this.assertChart("restoreChart",()=>this.chartService.restoreChart(e,t));}assertClipboard(e,t){q.__assertRegistered("@ag-grid-enterprise/clipboard","api"+e,this.context.getGridId())&&t();}copyToClipboard(e){this.assertClipboard("copyToClipboard",()=>this.clipboardService.copyToClipboard(e));}cutToClipboard(e){this.assertClipboard("cutToClipboard",()=>this.clipboardService.cutToClipboard(e));}copySelectedRowsToClipboard(e){this.assertClipboard("copySelectedRowsToClipboard",()=>this.clipboardService.copySelectedRowsToClipboard(e));}copySelectedRangeToClipboard(e){this.assertClipboard("copySelectedRangeToClipboard",()=>this.clipboardService.copySelectedRangeToClipboard(e));}copySelectedRangeDown(){this.assertClipboard("copySelectedRangeDown",()=>this.clipboardService.copyRangeDown());}pasteFromClipboard(){this.assertClipboard("pasteFromClipboard",()=>this.clipboardService.pasteFromClipboard());}showColumnMenuAfterButtonClick(e,t){O("'showColumnMenuAfterButtonClick' is deprecated. Use 'IHeaderParams.showColumnMenu' within a header component, or 'api.showColumnMenu' elsewhere.");const i=this.columnModel.getGridColumn(e);this.menuService.showColumnMenu({column:i,buttonElement:t,positionBy:"button"});}showColumnMenuAfterMouseClick(e,t){O("'showColumnMenuAfterMouseClick' is deprecated. Use 'IHeaderParams.showColumnMenuAfterMouseClick' within a header component, or 'api.showColumnMenu' elsewhere.");let i=this.columnModel.getGridColumn(e);i||(i=this.columnModel.getPrimaryColumn(e)),i?this.menuService.showColumnMenu({column:i,mouseEvent:t,positionBy:"mouse"}):console.error(`AG Grid: column '${e}' not found`);}showContextMenu(e){const{rowNode:t,column:i,value:s,x:o,y:r}=e||{};let{x:n,y:l}=this.menuService.getContextMenuPosition(t,i);null!=o&&(n=o),null!=r&&(l=r),this.menuService.showContextMenu({mouseEvent:ne
1w MouseEvent("mousedown",{clientX:n,clientY:l}),rowNode:t,column:i,value:s});}showColumnChooser(e){this.menuService.showColumnChooser({chooserParams:e});}showColumnFilter(e){const t=this.columnModel.getGridColumn(e);t?this.menuService.showFilterMenu({column:t,containerType:"columnFilter",positionBy:"auto"}):console.error(`AG Grid: column '${e}' not found`);}showColumnMenu(e){const t=this.columnModel.getGridColumn(e);t?this.menuService.showColumnMenu({column:t,positionBy:"auto"}):console.error(`AG Grid: column '${e}' not found`);}hidePopupMenu(){this.menuService.hidePopupMenu();}hideColumnChooser(){this.menuService.hideColumnChooser();}tabToNextCell(e){return this.navigationService.tabToNextCell(!1,e);}tabToPreviousCell(e){return this.navigationService.tabToNextCell(!0,e);}getCellRendererInstances(e={}){return this.rowRenderer.getCellRendererInstances(e).map(wi);}getCellEditorInstances(e={}){return this.rowRenderer.getCellEditorInstances(e).map(wi);}getEditingCells(){return this.rowRenderer.getEditingCells();}stopEditing(e=!1){this.rowRenderer.stopEditing(e);}startEditingCell(e){const t=this.columnModel.getGridColumn(e.colKey);if(!t)return void console.warn(`AG Grid: no column found for ${e.colKey}`);const i={rowIndex:e.rowIndex,rowPinned:e.rowPinned||null,column:t};null==e.rowPinned&&this.ensureIndexVisible(e.rowIndex),this.ensureColumnVisible(e.colKey);const o=this.navigationService.getCellByPosition(i);o&&(this.focusService.isCellFocused(i)||this.focusService.setFocusedCell(i),o.startRowOrCellEdit(e.key));}addAggFunc(e,t){this.logDeprecation("v31.1","addAggFunc(key, func)","addAggFuncs({ key: func })"),this.aggFuncService&&this.aggFuncService.addAggFuncs({key:t});}addAggFuncs(e){this.aggFuncService&&this.aggFuncService.addAggFuncs(e);}clearAggFuncs(){this.aggFuncService&&this.aggFuncService.clear();}applyServerSideTransaction(e){if(this.serverSideTransactionManager)return this.serverSideTransactionManager.applyTransaction(e);this.logMissingRowModel("applyServerSideTransaction","serverSide");}applyServerSideTransactionAsync(e,t){if(this.serverSideTransactionManager)return this.serverSideTransactionManager.applyTransactionAsync(e,t);this.logMissingRowModel("applyServerSideTransactionAsync","serverSide");}applyServerSideRowData(e){var t,i;const s=null!=(t=e.startRow)?t:0,o=null!=(i=e.route)?i:[];s<0?console.warn(`AG Grid: invalid value ${e.startRow} for startRow, the value should be >= 0`):this.serverSideRowModel?this.serverSideRowModel.applyRowData(e.successParams,s,o):this.logMissingRowModel("setServerSideDatasource","serverSide");}retryServerSideLoads(){this.serverSideRowModel?this.serverSideRowModel.retryLoads():this.logMissingRowModel("retryServerSideLoads","serverSide");}flushServerSideAsyncTransactions(){if(this.serverSideTransactionManager)return this.serverSideTransactionManager.flushAsyncTransactions();this.logMissingRowModel("flushServerSideAsyncTransactions","serverSide");}applyTransaction(e){if(this.clientSideRowModel)return this.frameworkOverrides.wrapIncoming(()=>this.clientSideRowModel.updateRowData(e));this.logMissingRowModel("applyTransaction","clientSide");}applyTransactionAsync(e,t){this.clientSideRowModel?this.frameworkOverrides.wrapIncoming(()=>this.clientSideRowModel.batchUpdateRowData(e,t)):this.logMissingRowModel("applyTransactionAsync","clientSide");}flushAsyncTransactions(){this.clientSideRowModel?this.frameworkOverrides.wrapIncoming(()=>this.clientSideRowModel.flushAsyncTransactions()):this.logMissingRowModel("flushAsyncTransactions","clientSide");}refreshInfiniteCache(){this.infiniteRowModel?this.infiniteRowModel.refreshCache():this.logMissingRowModel("refreshInfiniteCache","infinite");}purgeInfiniteCache(){this.infiniteRowModel?this.infiniteRowModel.purgeCache():this.logMissingRowModel("purgeInfiniteCache","infinite");}refreshServerSide(e){this.serverSideRowModel?this.serverSideRowModel.refreshStore(e):this.logMissingRowModel("refreshServerSide","serverSide");}getServerSideGroupLevelState(){return this.serverSideRowModel?this.serverSideRowModel.getStoreState():(this.logMissingRowModel("getServerSideGroupLevelState","serverSide"),[]);}getInfiniteRowCount(){if(this.infiniteRowModel)return this.infiniteRowModel.getRowCount();
1this.logMissingRowModel("getInfiniteRowCount","infinite");}isLastRowIndexKnown(){if(this.infiniteRowModel)return this.infiniteRowModel.isLastRowIndexKnown();this.logMissingRowModel("isLastRowIndexKnown","infinite");}getCacheBlockState(){return this.rowNodeBlockLoader.getBlockState();}getFirstDisplayedRow(){return this.logDeprecation("v31.1","getFirstDisplayedRow","getFirstDisplayedRowIndex"),this.getFirstDisplayedRowIndex();}getFirstDisplayedRowIndex(){return this.rowRenderer.getFirstVirtualRenderedRow();}getLastDisplayedRow(){return this.logDeprecation("v31.1","getLastDisplayedRow","getLastDisplayedRowIndex"),this.getLastDisplayedRowIndex();}getLastDisplayedRowIndex(){return this.rowRenderer.getLastVirtualRenderedRow();}getDisplayedRowAtIndex(e){return this.rowModel.getRow(e);}getDisplayedRowCount(){return this.rowModel.getRowCount();}paginationIsLastPageFound(){return this.paginationProxy.isLastPageFound();}paginationGetPageSize(){return this.paginationProxy.getPageSize();}paginationGetCurrentPage(){return this.paginationProxy.getCurrentPage();}paginationGetTotalPages(){return this.paginationProxy.getTotalPages();}paginationGetRowCount(){return this.paginationProxy.getMasterRowCount();}paginationGoToNextPage(){this.paginationProxy.goToNextPage();}paginationGoToPreviousPage(){this.paginationProxy.goToPreviousPage();}paginationGoToFirstPage(){this.paginationProxy.goToFirstPage();}paginationGoToLastPage(){this.paginationProxy.goToLastPage();}paginationGoToPage(e){this.paginationProxy.goToPage(e);}sizeColumnsToFit(e){"number"==typeof e?this.columnModel.sizeColumnsToFit(e,"api"):this.gridBodyCtrl.sizeColumnsToFit(e);}setColumnGroupOpened(e,t){this.columnModel.setColumnGroupOpened(e,t,"api");}getColumnGroup(e,t){return this.columnModel.getColumnGroup(e,t);}getProvidedColumnGroup(e){return this.columnModel.getProvidedColumnGroup(e);}getDisplayNameForColumn(e,t){return this.columnModel.getDisplayNameForColumn(e,t)||"";}getDisplayNameForColumnGroup(e,t){return this.columnModel.getDisplayNameForColumnGroup(e,t)||"";}getColumn(e){return this.columnModel.getPrimaryColumn(e);}getColumns(){return this.columnModel.getAllPrimaryColumns();}applyColumnState(e){return this.columnModel.applyColumnState(e,"api");}getColumnState(){return this.columnModel.getColumnState();}resetColumnState(){this.columnModel.resetColumnState("api");}getColumnGroupState(){return this.columnModel.getColumnGroupState();}setColumnGroupState(e){this.columnModel.setColumnGroupState(e,"api");}resetColumnGroupState(){this.columnModel.resetColumnGroupState("api");}isPinning(){return this.columnModel.isPinningLeft()||this.columnModel.isPinningRight();}isPinningLeft(){return this.columnModel.isPinningLeft();}isPinningRight(){return this.columnModel.isPinningRight();}getDisplayedColAfter(e){return this.columnModel.getDisplayedColAfter(e);}getDisplayedColBefore(e){return this.columnModel.getDisplayedColBefore(e);}setColumnVisible(e,t){this.logDeprecation("v31.1","setColumnVisible(key,visible)","setColumnsVisible([key],visible)"),this.columnModel.setColumnsVisible([e],t,"api");}setColumnsVisible(e,t){this.columnModel.setColumnsVisible(e,t,"api");}setColumnPinned(e,t){this.logDeprecation("v31.1","setColumnPinned(key,pinned)","setColumnsPinned([key],pinned)"),this.columnModel.setColumnsPinned([e],t,"api");}setColumnsPinned(e,t){this.columnModel.setColumnsPinned(e,t,"api");}getAllGridColumns(){return this.columnModel.getAllGridColumns();}getDisplayedLeftColumns(){return this.columnModel.getDisplayedLeftColumns();}getDisplayedCenterColumns(){return this.columnModel.getDisplayedCenterColumns();}getDisplayedRightColumns(){return this.columnModel.getDisplayedRightColumns();}getAllDisplayedColumns(){return this.columnModel.getAllDisplayedColumns();}getAllDisplayedVirtualColumns(){return this.columnModel.getViewportColumns();}moveColumn(e,t){this.logDeprecation("v31.1","moveColumn(key, toIndex)","moveColumns([key], toIndex)"),this.columnModel.moveColumns([e],t,"api");}moveColumnByIndex(e,t){this.columnModel.moveColumnByIndex(e,t,"api");}moveColumns(e,t){this.columnModel.moveColumns(e,t,"api");}moveRowGroupColumn(e,t){this.columnModel.moveRowGroupColumn(e,t,"api");}
1setColumnAggFunc(e,t){this.columnModel.setColumnAggFunc(e,t,"api");}setColumnWidth(e,t,i=!0,s="api"){this.logDeprecation("v31.1","setColumnWidth(col, width)","setColumnWidths([{key: col, newWidth: width}])"),this.columnModel.setColumnWidths([{key:e,newWidth:t}],!1,i,s);}setColumnWidths(e,t=!0,i="api"){this.columnModel.setColumnWidths(e,!1,t,i);}isPivotMode(){return this.columnModel.isPivotMode();}getPivotResultColumn(e,t){return this.columnModel.getSecondaryPivotColumn(e,t);}setValueColumns(e){this.columnModel.setValueColumns(e,"api");}getValueColumns(){return this.columnModel.getValueColumns();}removeValueColumn(e){this.logDeprecation("v31.1","removeValueColumn(colKey)","removeValueColumns([colKey])"),this.columnModel.removeValueColumns([e],"api");}removeValueColumns(e){this.columnModel.removeValueColumns(e,"api");}addValueColumn(e){this.logDeprecation("v31.1","addValueColumn(colKey)","addValueColumns([colKey])"),this.columnModel.addValueColumns([e],"api");}addValueColumns(e){this.columnModel.addValueColumns(e,"api");}setRowGroupColumns(e){this.columnModel.setRowGroupColumns(e,"api");}removeRowGroupColumn(e){this.logDeprecation("v31.1","removeRowGroupColumn(colKey)","removeRowGroupColumns([colKey])"),this.columnModel.removeRowGroupColumns([e],"api");}removeRowGroupColumns(e){this.columnModel.removeRowGroupColumns(e,"api");}addRowGroupColumn(e){this.logDeprecation("v31.1","addRowGroupColumn(colKey)","addRowGroupColumns([colKey])"),this.columnModel.addRowGroupColumns([e],"api");}addRowGroupColumns(e){this.columnModel.addRowGroupColumns(e,"api");}getRowGroupColumns(){return this.columnModel.getRowGroupColumns();}setPivotColumns(e){this.columnModel.setPivotColumns(e,"api");}removePivotColumn(e){this.logDeprecation("v31.1","removePivotColumn(colKey)","removePivotColumns([colKey])"),this.columnModel.removePivotColumns([e],"api");}removePivotColumns(e){this.columnModel.removePivotColumns(e,"api");}addPivotColumn(e){this.logDeprecation("v31.1","addPivotColumn(colKey)","addPivotColumns([colKey])"),this.columnModel.addPivotColumns([e],"api");}addPivotColumns(e){this.columnModel.addPivotColumns(e,"api");}getPivotColumns(){return this.columnModel.getPivotColumns();}getLeftDisplayedColumnGroups(){return this.columnModel.getDisplayedTreeLeft();}getCenterDisplayedColumnGroups(){return this.columnModel.getDisplayedTreeCentre();}getRightDisplayedColumnGroups(){return this.columnModel.getDisplayedTreeRight();}getAllDisplayedColumnGroups(){return this.columnModel.getAllDisplayedTrees();}autoSizeColumn(e,t){return this.logDeprecation("v31.1","autoSizeColumn(key, skipHeader)","autoSizeColumns([key], skipHeader)"),this.columnModel.autoSizeColumns({columns:[e],skipHeader:t,source:"api"});}autoSizeColumns(e,t){this.columnModel.autoSizeColumns({columns:e,skipHeader:t,source:"api"});}autoSizeAllColumns(e){this.columnModel.autoSizeAllColumns("api",e);}setPivotResultColumns(e){this.columnModel.setSecondaryColumns(e,"api");}getPivotResultColumns(){return this.columnModel.getSecondaryColumns();}getState(){return this.stateService.getState();}getGridOption(e){return this.gos.get(e);}setGridOption(e,t){this.updateGridOptions({[e]:t});}updateGridOptions(e){this.gos.updateGridOptions({options:e});}__internalUpdateGridOptions(e,t){this.gos.updateGridOptions({options:e,force:t,source:"gridOptionsUpdated"});}deprecatedUpdateGridOption(e,t){O(`set${e.charAt(0).toUpperCase()}${e.slice(1,e.length)} is deprecated. Please use 'api.setGridOption('${e}', newValue)' or 'api.updateGridOptions({ ${e}: newValue })' instead.`),this.setGridOption(e,t);}setPivotMode(e){this.deprecatedUpdateGridOption("pivotMode",e);}setPinnedTopRowData(e){this.deprecatedUpdateGridOption("pinnedTopRowData",e);}setPinnedBottomRowData(e){this.deprecatedUpdateGridOption("pinnedBottomRowData",e);}setPopupParent(e){this.deprecatedUpdateGridOption("popupParent",e);}setSuppressModelUpdateAfterUpdateTransaction(e){this.deprecatedUpdateGridOption("suppressModelUpdateAfterUpdateTransaction",e);}setDataTypeDefinitions(e){this.deprecatedUpdateGridOption("dataTypeDefinitions",e);}setPagination(e){this.deprecatedUpdateGridOption("pagination",e);}paginationSetPageSize(e){this.deprecatedUpdateGridOption("paginationPageSize",e);}setSideBar(e){this.deprecatedUpdateGridOption("sideBar",e);}setSuppressClipboardPaste(e){this.deprecatedUpdateGridOption("suppressClipboardPaste",e);}setGroupRemoveSingleChildren(e){this.deprecatedUpdateGridOption("groupRemoveSingleChildren",e);}setGroupRemoveLowestSingleChildren(e){this.deprecatedUpdateGridOption("groupRemoveLowestSingleChildren",e);}setGroupDisplayType(e){this.deprecatedUpdateGridOption("groupDisplayType",e);}setGroupIncludeFooter(e){this.deprecatedUpdateGridOption("groupIncludeFooter",e);}setGroupIncludeTotalFooter(e){this.deprecatedUpdateGridOption("groupIncludeTotalFooter",e);}setRowClass(e){this.deprecatedUpdateGridOption("rowClass",e);}setDeltaSort(e){this.deprecatedUpdateGridOption("deltaSort",e);}setSuppressRowDrag(e){this.deprecatedUpdateGridOption("suppressRowDrag",e);}setSuppressMoveWhenRowDragging(e){this.deprecatedUpdateGridOption("suppressMoveWhenRowDragging",e);}setSuppressRowClickSelection(e){this.deprecatedUpdateGridOption("suppressRowClickSelection",e);}setEnableAdvancedFilter(e){this.deprecatedUpdateGridOption("enableAdvancedFilter",e);}setIncludeHiddenColumnsInAdvancedFilter(e){this.deprecatedUpdateGridOption("includeHiddenColumnsInAdvancedFilter",e);}setAdvancedFilterParent(e){this.deprecatedUpdateGridOption("advancedFilterParent",e);}setAdvancedFilterBuilderParams(e){this.deprecatedUpdateGridOption("advancedFilterBuilderParams",e);}setQuickFilter(e){O("setQuickFilter is deprecated. Please use 'api.setGridOption('quickFilterText', newValue)' or 'api.updateGridOptions({ quickFilterText: newValue })' instead."),this.gos.updateGridOptions({options:{quickFilterText:e}});}setExcludeHiddenColumnsFromQuickFilter(e){this.deprecatedUpdateGridOption("includeHiddenColumnsInQuickFilter",!e);}setIncludeHiddenColumnsInQuickFilter(e){this.deprecatedUpdateGridOption("includeHiddenColumnsInQuickFilter",e);}setQuickFilterParser(e){this.deprecatedUpdateGridOption("quickFilterParser",e);}setQuickFilterMatcher(e){this.deprecatedUpdateGridOption("quickFilterMatcher",e);}setAlwaysShowHorizontalScroll(e){this.deprecatedUpdateGridOption("alwaysShowHorizontalScroll",e);}setAlwaysShowVerticalScroll(e){this.deprecatedUpdateGridOption("alwaysShowVerticalScroll",e);}setFunctionsReadOnly(e){this.deprecatedUpdateGridOption("functionsReadOnly",e);}setColumnDefs(e,t="api"){O("setColumnDefs is deprecated. Please use 'api.setGridOption('columnDefs', newValue)' or 'api.updateGridOptions({ columnDefs: newValue })' instead."),this.gos.updateGridOptions({options:{columnDefs:e},source:t});}setAutoGroupColumnDef(e,t="api"){O("setAutoGroupColumnDef is deprecated. Please use 'api.setGridOption('autoGroupColumnDef', newValue)' or 'api.updateGridOptions({ autoGroupColumnDef: newValue })' instead."),this.gos.updateGridOptions({options:{autoGroupColumnDef:e},source:t});}setDefaultColDef(e,t="api"){O("setDefaultColDef is deprecated. Please use 'api.setGridOption('defaultColDef', newValue)' or 'api.updateGridOptions({ defaultColDef: newValue })' instead."),this.gos.updateGridOptions({options:{defaultColDef:e},source:t});}setColumnTypes(e,t="api"){O("setColumnTypes is deprecated. Please use 'api.setGridOption('columnTypes', newValue)' or 'api.updateGridOptions({ columnTypes: newValue })' instead."),this.gos.updateGridOptions({options:{columnTypes:e},source:t});}setTreeData(e){this.deprecatedUpdateGridOption("treeData",e);}setServerSideDatasource(e){this.deprecatedUpdateGridOption("serverSideDatasource",e);}setCacheBlockSize(e){this.deprecatedUpdateGridOption("cacheBlockSize",e);}setDatasource(e){this.deprecatedUpdateGridOption("datasource",e);}setViewportDatasource(e){this.deprecatedUpdateGridOption("viewportDatasource",e);}setRowData(e){this.deprecatedUpdateGridOption("rowData",e);}setEnableCellTextSelection(e){this.deprecatedUpdateGridOption("enableCellTextSelection",e);}setHeaderHeight(e){this.deprecatedUpdateGridOption("headerHeight",e);}setDomLayout(e){this.deprecatedUpdateGridOption("domLayout",e);}setFillHandleDirection(e){this.deprecatedUpdateGridOption("fillHandleDirection",e);}setGroupHeaderHeight(e){this.deprecatedUpdateGridOption("groupHeaderHeight",e);}setFloatingFiltersHeight(e){this.deprecatedUpdateGridOption("floatingFiltersHeight",e);}setPivotHeaderHeight(e){this.deprecatedUpdateGridOption("pivotHeaderHeight",e);}setPivotGroupHeaderHeight(e){this.deprecatedUpdateGridOption("pivotGroupHeaderHeight",e);}setAnimateRows(e){this.deprecatedUpdateGridOption("animateRows",e);}setIsExternalFilterPresent(e){this.deprecatedUpdateGridOption("isExternalFilterPresent",e);}setDoesExternalFilterPass(e){this.deprecatedUpdateGridOption("doesExternalFilterPass",e);}setNavigateToNextCell(e){this.deprecatedUpdateGridOption("navigateToNextCell",e);}setTabToNextCell(e){this.deprecatedUpdateGridOption("tabToNextCell",e);}setTabToNextHeader(e){this.deprecatedUpdateGridOption("tabToNextHeader",e);}setNavigateToNextHeader(e){this.deprecatedUpdateGridOption("navigateToNextHeader",e);}setRowGroupPanelShow(e){this.deprecatedUpdateGridOption("rowGroupPanelShow",e);}setGetGroupRowAgg(e){this.deprecatedUpdateGridOption("getGroupRowAgg",e);}setGetBusinessKeyForNode(e){this.deprecatedUpdateGridOption("getBusinessKeyForNode",e);}setGetChildCount(e){this.deprecatedUpdateGridOption("getChildCount",e);}setProcessRowPostCreate(e){this.deprecatedUpdateGridOption("processRowPostCreate",e);}setGetRowId(e){O("getRowId is a static property and can no longer be updated.");}setGetRowClass(e){this.deprecatedUpdateGridOption("getRowClass",e);}setIsFullWidthRow(e){this.deprecatedUpdateGridOption("isFullWidthRow",e);}setIsRowSelectable(e){this.deprecatedUpdateGridOption("isRowSelectable",e);}setIsRowMaster(e){this.deprecatedUpdateGridOption("isRowMaster",e);}setPostSortRows(e){this.deprecatedUpdateGridOption("postSortRows",e);}setGetDocument(e){this.deprecatedUpdateGridOption("getDocument",e);}setGetContextMenuItems(e){this.deprecatedUpdateGridOption("getContextMenuItems",e);}setGetMainMenuItems(e){this.deprecatedUpdateGridOption("getMainMenuItems",e);}setProcessCellForClipboard(e){this.deprecatedUpdateGridOption("processCellForClipboard",e);}setSendToClipboard(e){this.deprecatedUpdateGridOption("sendToClipboard",e);}setProcessCellFromClipboard(e){this.deprecatedUpdateGridOption("processCellFromClipboard",e);}setProcessPivotResultColDef(e){this.deprecatedUpdateGridOption("processPivotResultColDef",e);}setProcessPivotResultColGroupDef(e){this.deprecatedUpdateGridOption("processPivotResultColGroupDef",e);}setPostProcessPopup(e){this.deprecatedUpdateGridOption("postProcessPopup",e);}setInitialGroupOrderComparator(e){this.deprecatedUpdateGridOption("initialGroupOrderComparator",e);}setGetChartToolbarItems(e){this.deprecatedUpdateGridOption("getChartToolbarItems",e);}setPaginationNumberFormatter(e){this.deprecatedUpdateGridOption("paginationNumberFormatter",e);}setGetServerSideGroupLevelParams(e){this.deprecatedUpdateGridOption("getServerSideGroupLevelParams",e);}setIsServerSideGroupOpenByDefault(e){this.deprecatedUpdateGridOption("isServerSideGroupOpenByDefault",e);}setIsApplyServerSideTransaction(e){this.deprecatedUpdateGridOption("isApplyServerSideTransaction",e);}setIsServerSideGroup(e){this.deprecatedUpdateGridOption("isServerSideGroup",e);}setGetServerSideGroupKey(e){this.deprecatedUpdateGridOption("getServerSideGroupKey",e);}setGetRowStyle(e){this.deprecatedUpdateGridOption("getRowStyle",e);}setGetRowHeight(e){this.deprecatedUpdateGridOption("getRowHeight",e);}};d([g("rowRenderer")],U.prototype,"rowRenderer",2),d([g("navigationService")],U.prototype,"navigationService",2),d([g("filterManager")],U.prototype,"filterManager",2),d([g("columnModel")],U.prototype,"columnModel",2),d([g("selectionService")],U.prototype,"selectionService",2),d([g("gridOptionsService")],U.prototype,"gos",2),d([g("valueService")],U.prototype,"valueService",2),d([g("alignedGridsService")],U.prototype,"alignedGridsService",2),d([g("eventService")],U.prototype,"eventService",2),d([g("pinnedRowModel")],U.prototype,"pinnedRowModel",2),d([g("context")],U.prototype,"context",2),d([g("rowModel")],U.prototype,"rowModel",2),d([g("sortController")],U.prototype,"sortController",2),d([g("paginationProxy")],U.prototype,"paginationProxy",2),d([g("focusService")],U.prototype,"focusService",2),d([g("dragAndDropService")],U.prototype,"dragAndDropService",2),d([g("menuService")],U.prototype,"menuService",2),d([g("valueCache")],U.prototype,"valueCache",2),d([g("animationFrameService")],U.prototype,"animationFrameService",2),d([g("ctrlsService")],U.prototype,"ctrlsService",2),d([g("overlayService")],U.prototype,"overlayService",2),d([g("stateService")],U.prototype,"stateService",2),d([g("expansionService")],U.prototype,"expansionService",2),d([g("apiEventService")],U.prototype,"apiEventService",2),d([g("frameworkOverrides")],U.prototype,"frameworkOverrides",2),d([g("undoRedoService")],U.prototype,"undoRedoService",2),d([g("rowNodeBlockLoader")],U.prototype,"rowNodeBlockLoader",2),d([Q("csvCreator")],U.prototype,"csvCreator",2),d([Q("excelCreator")],U.prototype,"excelCreator",2),d([Q("rangeService")],U.prototype,"rangeService",2),d([Q("clipboardService")],U.prototype,"clipboardService",2),d([Q("aggFuncService")],U.prototype,"aggFuncService",2),d([Q("statusBarService")],U.prototype,"statusBarService",2),d([Q("chartService")],U.prototype,"chartService",2),d([Q("ssrmTransactionManager")],U.prototype,"serverSideTransactionManager",2),d([Q("sideBarService")],U.prototype,"sideBarService",2),d([T],U.prototype,"init",1),U=d([L("gridApi")],U);var _e=class extends R{constructor(){super(...arguments),this.quickFilter=null,this.quickFilterParts=null;}postConstruct(){this.addManagedListener(this.eventService,c.EVENT_COLUMN_PIVOT_MODE_CHANGED,(
1)=>this.resetQuickFilterCache()),this.addManagedListener(this.eventService,c.EVENT_NEW_COLUMNS_LOADED,()=>this.resetQuickFilterCache()),this.addManagedListener(this.eventService,c.EVENT_COLUMN_ROW_GROUP_CHANGED,()=>this.resetQuickFilterCache()),this.addManagedListener(this.eventService,c.EVENT_COLUMN_VISIBLE,()=>{this.gos.get("includeHiddenColumnsInQuickFilter")||this.resetQuickFilterCache();}),this.addManagedPropertyListener("quickFilterText",e=>this.setQuickFilter(e.currentValue)),this.addManagedPropertyListeners(["includeHiddenColumnsInQuickFilter","applyQuickFilterBeforePivotOrAgg"],()=>this.onQuickFilterColumnConfigChanged()),this.quickFilter=this.parseQuickFilter(this.gos.get("quickFilterText")),this.parser=this.gos.get("quickFilterParser"),this.matcher=this.gos.get("quickFilterMatcher"),this.setQuickFilterParts(),this.addManagedPropertyListeners(["quickFilterMatcher","quickFilterParser"],()=>this.setQuickFilterParserAndMatcher());}isQuickFilterPresent(){return null!==this.quickFilter;}doesRowPassQuickFilter(e){const t=this.gos.get("cacheQuickFilter");return this.matcher?this.doesRowPassQuickFilterMatcher(t,e):this.quickFilterParts.every(i=>t?this.doesRowPassQuickFilterCache(e,i):this.doesRowPassQuickFilterNoCache(e,i));}resetQuickFilterCache(){this.rowModel.forEachNode(e=>e.quickFilterAggregateText=null);}setQuickFilterParts(){const{quickFilter:e,parser:t}=this;this.quickFilterParts=e?t?t(e):e.split(" "):null;}parseQuickFilter(e){return y(e)?this.gos.isRowModelType("clientSide")?e.toUpperCase():(console.warn("AG Grid - Quick filtering only works with the Client-Side Row Model"),null):null;}setQuickFilter(e){if(null!=e&&"string"!=typeof e)return void console.warn("AG Grid - Grid option quickFilterText only supports string inputs, received: "+typeof e);const t=this.parseQuickFilter(e);this.quickFilter!==t&&(this.quickFilter=t,this.setQuickFilterParts(),this.dispatchEvent({type:_e.EVENT_QUICK_FILTER_CHANGED}));}setQuickFilterParserAndMatcher(){const e=this.gos.get("quickFilterParser"),t=this.gos.get("quickFilterMatcher"),i=e!==this.parser||t!==this.matcher;this.parser=e,this.matcher=t,i&&(this.setQuickFilterParts(),this.dispatchEvent({type:_e.EVENT_QUICK_FILTER_CHANGED}));}onQuickFilterColumnConfigChanged(){this.columnModel.refreshQuickFilterColumns(),this.resetQuickFilterCache(),this.isQuickFilterPresent()&&this.dispatchEvent({type:_e.EVENT_QUICK_FILTER_CHANGED});}doesRowPassQuickFilterNoCache(e,t){return this.columnModel.getAllColumnsForQuickFilter().some(s=>{const o=this.getQuickFilterTextForColumn(s,e);return y(o)&&o.indexOf(t)>=0;});}doesRowPassQuickFilterCache(e,t){return this.checkGenerateQuickFilterAggregateText(e),e.quickFilterAggregateText.indexOf(t)>=0;}doesRowPassQuickFilterMatcher(e,t){let i;e?(this.checkGenerateQuickFilterAggregateText(t),i=t.quickFilterAggregateText):i=this.getQuickFilterAggregateText(t);const{quickFilterParts:s,matcher:o}=this;return o(s,i);}checkGenerateQuickFilterAggregateText(e){e.quickFilterAggregateText||(e.quickFilterAggregateText=this.getQuickFilterAggregateText(e));}getQuickFilterTextForColumn(e,t){let i=this.valueService.getValue(e,t,!0);const s=e.getColDef();if(s.getQuickFilterText){const o=this.gos.addGridCommonParams({value:i,node:t,data:t.data,column:e,colDef:s});i=s.getQuickFilterText(o);}return y(i)?i.toString().toUpperCase():null;}getQuickFilterAggregateText(e){const t=[];return this.columnModel.getAllColumnsForQuickFilter().forEach(s=>{const o=this.getQuickFilterTextForColumn(s,e);y(o)&&t.push(o);}),t.join(_e.QUICK_FILTER_SEPARATOR);}};_e.EVENT_QUICK_FILTER_CHANGED="quickFilterChanged",_e.QUICK_FILTER_SEPARATOR="\n",d([g("valueService")],_e.prototype,"valueService",2),d([g("columnModel")],_e.prototype,"columnModel",2),d([g("rowModel")],_e.prototype,"rowModel",2),d([T],_e.prototype,"postConstruct",1),_e=d([L("quickFilterService")],_e);var je=class extends R{constructor(){super(...arguments),this.allColumnFilters=new Map(),this.allColumnListeners=new Map(),this.activeAggregateFilters=[],this.activeColumnFilters=[],this.processingFilterChange=!1,this.filterModelUpdateQueue=[],this.columnFilterModelUpdateQueue=[],this.advancedFilterModelUpdateQueue=[];}init(){var e,t,i;this.addManagedListener(this.eventService,c.EVENT_GRID_COLUMNS_CHANGED,(
1)=>this.onColumnsChanged()),this.addManagedListener(this.eventService,c.EVENT_COLUMN_VALUE_CHANGED,()=>this.refreshFiltersForAggregations()),this.addManagedListener(this.eventService,c.EVENT_COLUMN_PIVOT_CHANGED,()=>this.refreshFiltersForAggregations()),this.addManagedListener(this.eventService,c.EVENT_COLUMN_PIVOT_MODE_CHANGED,()=>this.refreshFiltersForAggregations()),this.addManagedListener(this.eventService,c.EVENT_NEW_COLUMNS_LOADED,()=>this.updateAdvancedFilterColumns()),this.addManagedListener(this.eventService,c.EVENT_COLUMN_VISIBLE,()=>this.updateAdvancedFilterColumns()),this.addManagedListener(this.eventService,c.EVENT_ROW_DATA_UPDATED,()=>this.onNewRowsLoaded("rowDataUpdated")),this.externalFilterPresent=this.isExternalFilterPresentCallback(),this.addManagedPropertyListeners(["isExternalFilterPresent","doesExternalFilterPass"],()=>{this.onFilterChanged({source:"api"});}),this.updateAggFiltering(),this.addManagedPropertyListener("groupAggFiltering",()=>{this.updateAggFiltering(),this.onFilterChanged();}),this.addManagedPropertyListener("advancedFilterModel",s=>this.setAdvancedFilterModel(s.currentValue)),this.addManagedListener(this.eventService,c.EVENT_ADVANCED_FILTER_ENABLED_CHANGED,({enabled:s})=>this.onAdvancedFilterEnabledChanged(s)),this.addManagedListener(this.eventService,c.EVENT_DATA_TYPES_INFERRED,()=>this.processFilterModelUpdateQueue()),this.addManagedListener(this.quickFilterService,_e.EVENT_QUICK_FILTER_CHANGED,(
1)=>this.onFilterChanged({source:"quickFilter"})),this.initialFilterModel=M({},null!=(i=null==(t=null==(e=this.gos.get("initialState"))?void 0:e.filter)?void 0:t.filterModel)?i:{});}isExternalFilterPresentCallback(){const e=this.gos.getCallback("isExternalFilterPresent");return"function"==typeof e&&e({});}doesExternalFilterPass(e){const t=this.gos.get("doesExternalFilterPass");return"function"==typeof t&&t(e);}setFilterModel(e,t="api"){if(this.isAdvancedFilterEnabled())return void this.warnAdvancedFilters();if(this.dataTypeService.isPendingInference())return void this.filterModelUpdateQueue.push({model:e,source:t});const i=[],s=this.getFilterModel();if(e){const o=$n(Object.keys(e));this.allColumnFilters.forEach((r,n)=>{i.push(this.setModelOnFilterWrapper(r.filterPromise,e[n])),o.delete(n);}),o.forEach(r=>{const n=this.columnModel.getPrimaryColumn(r)||this.columnModel.getGridColumn(r);if(!n)return void console.warn("AG Grid: setFilterModel() - no column found for colId: "+r);if(!n.isFilterAllowed())return void console.warn("AG Grid: setFilterModel() - unable to fully apply model, filtering disabled for colId: "+r);const l=this.getOrCreateFilterWrapper(n,"NO_UI");l?i.push(this.setModelOnFilterWrapper(l.filterPromise,e[r])):console.warn("AG-Grid: setFilterModel() - unable to fully apply model, unable to create filter for colId: "+r);});}else this.allColumnFilters.forEach(o=>{i.push(this.setModelOnFilterWrapper(o.filterPromise,null));});$e.all(i).then(()=>{const o=this.getFilterModel(),r=[];this.allColumnFilters.forEach((n,l)=>{B.jsonEquals(s?s[l]:null,o?o[l]:null)||r.push(n.column);}),r.length>0&&this.onFilterChanged({columns:r,source:t});});}setModelOnFilterWrapper(e,t){return new $e(i=>{e.then(s=>{"function"!=typeof s.setModel&&(console.warn("AG Grid: filter missing setModel method, which is needed for setFilterModel"),i()),(s.setModel(t)||$e.resolve()).then(()=>i());});});}getFilterModel(){const e={};return this.allColumnFilters.forEach((t,i)=>{const s=this.getModelFromFilterWrapper(t);y(s)&&(e[i]=s);}),e;}getModelFromFilterWrapper(e){var t;const s=e.filterPromise.resolveNow(null,o=>o);return null==s?null!=(t=this.initialFilterModel[e.column.getColId()])?t:null:"function"!=typeof s.getModel?(console.warn("AG Grid: filter API missing getModel method, which is needed for getFilterModel"),null):s.getModel();}isColumnFilterPresent(){return this.activeColumnFilters.length>0;}isAggregateFilterPresent(){return!!this.activeAggregateFilters.length;}isExternalFilterPresent(){return this.externalFilterPresent;}isChildFilterPresent(){return this.isColumnFilterPresent()||this.isQuickFilterPresent()||this.isExternalFilterPresent()||this.isAdvancedFilterPresent();}isAdvancedFilterPresent(){return this.isAdvancedFilterEnabled()&&this.advancedFilterService.isFilterPresent();}onAdvancedFilterEnabledChanged(e){var t;e?this.allColumnFilters.size&&(this.allColumnFilters.forEach(i=>this.disposeFilterWrapper(i,"advancedFilterEnabled")),this.onFilterChanged({source:"advancedFilter"})):null!=(t=this.advancedFilterService)&&t.isFilterPresent()&&(this.advancedFilterService.setModel(null),this.onFilterChanged({source:"advancedFilter"}));}isAdvancedFilterEnabled(){var e;return!(null==(e=this.advancedFilterService)||!e.isEnabled());}isAdvancedFilterHeaderActive(){return this.isAdvancedFilterEnabled()&&this.advancedFilterService.isHeaderActive();}doAggregateFiltersPass(e,t){return this.doColumnFiltersPass(e,t,!0);}updateActiveFilters(){this.activeColumnFilters.length=0,this.activeAggregateFilters.length=0;const e=s=>!!s&&(s.isFilterActive?s.isFilterActive():(console.warn("AG Grid: Filter is missing isFilterActive() method"),!1)),t=!!this.gos.getGroupAggFiltering(),i=s=>{if(!s.isPrimary())return!0;const r=!this.columnModel.isPivotActive();return!(!s.isValueActive()||!r)&&(!!this.columnModel.isPivotMode()||t);};this.allColumnFilters.forEach(s=>{if(s.filterPromise.resolveNow(!1,e)){const o=s.filterPromise.resolveNow(null,r=>r);i(s.column)?this.activeAggregateFilters.push(o):this.activeColumnFilters.push(o);}});}
1updateFilterFlagInColumns(e,t){this.allColumnFilters.forEach(i=>{const s=i.filterPromise.resolveNow(!1,o=>o.isFilterActive());i.column.setFilterActive(s,e,t);});}isAnyFilterPresent(){return this.isQuickFilterPresent()||this.isColumnFilterPresent()||this.isAggregateFilterPresent()||this.isExternalFilterPresent()||this.isAdvancedFilterPresent();}doColumnFiltersPass(e,t,i){const{data:s,aggData:o}=e,r=i?this.activeAggregateFilters:this.activeColumnFilters,n=i?o:s;for(let l=0;l<r.length;l++){const a=r[l];if(null!=a&&a!==t){if("function"!=typeof a.doesFilterPass)throw new Error("Filter is missing method doesFilterPass");if(!a.doesFilterPass({node:e,data:n}))return!1;}}return!0;}resetQuickFilterCache(){this.quickFilterService.resetQuickFilterCache();}refreshFiltersForAggregations(){this.gos.getGroupAggFiltering()&&this.onFilterChanged();}callOnFilterChangedOutsideRenderCycle(e){const t=()=>this.onFilterChanged(e);this.rowRenderer.isRefreshInProgress()?setTimeout(t,0):t();}onFilterChanged(e={}){const{source:t,filterInstance:i,additionalEventAttributes:s,columns:o}=e;this.updateDependantFilters(),this.updateActiveFilters(),this.updateFilterFlagInColumns("filterChanged",s),this.externalFilterPresent=this.isExternalFilterPresentCallback(),this.allColumnFilters.forEach(n=>{n.filterPromise&&n.filterPromise.then(l=>{l&&l!==i&&l.onAnyFilterChanged&&l.onAnyFilterChanged();});});const r={source:t,type:c.EVENT_FILTER_CHANGED,columns:o||[]};s&&Ie(r,s),this.processingFilterChange=!0,this.eventService.dispatchEvent(r),this.processingFilterChange=!1;}isSuppressFlashingCellsBecauseFiltering(){var e;return!(null!=(e=this.gos.get("allowShowChangeAfterFilter"))&&e)&&this.processingFilterChange;}isQuickFilterPresent(){return this.quickFilterService.isQuickFilterPresent();}updateAggFiltering(){this.aggFiltering=!!this.gos.getGroupAggFiltering();}isAggregateQuickFilterPresent(){return this.isQuickFilterPresent()&&this.shouldApplyQuickFilterAfterAgg();}isNonAggregateQuickFilterPresent(){return this.isQuickFilterPresent()&&!this.shouldApplyQuickFilterAfterAgg();}shouldApplyQuickFilterAfterAgg(){return(this.aggFiltering||this.columnModel.isPivotMode())&&!this.gos.get("applyQuickFilterBeforePivotOrAgg");}doesRowPassOtherFilters(e,t){return this.doesRowPassFilter({rowNode:t,filterInstanceToSkip:e});}doesRowPassAggregateFilters(e){return!(this.isAggregateQuickFilterPresent()&&!this.quickFilterService.doesRowPassQuickFilter(e.rowNode)||this.isAggregateFilterPresent()&&!this.doAggregateFiltersPass(e.rowNode,e.filterInstanceToSkip));}doesRowPassFilter(e){return!(this.isNonAggregateQuickFilterPresent()&&!this.quickFilterService.doesRowPassQuickFilter(e.rowNode)||this.isExternalFilterPresent()&&!this.doesExternalFilterPass(e.rowNode)||this.isColumnFilterPresent()&&!this.doColumnFiltersPass(e.rowNode,e.filterInstanceToSkip)||this.isAdvancedFilterPresent()&&!this.advancedFilterService.doesFilterPass(e.rowNode));}onNewRowsLoaded(e){this.allColumnFilters.forEach(t=>{t.filterPromise.then(i=>{i.onNewRowsLoaded&&i.onNewRowsLoaded();});}),this.updateFilterFlagInColumns(e,{afterDataChange:!0}),this.updateActiveFilters();}createValueGetter(e){return({node:t})=>this.valueService.getValue(e,t,!0);}createGetValue(e){return(t,i)=>{const s=i?this.columnModel.getGridColumn(i):e;return s?this.valueService.getValue(s,t,!0):void 0;};}getFilterComponent(e,t,i=!0){var s;if(i)return(null==(s=this.getOrCreateFilterWrapper(e,t))?void 0:s.filterPromise)||null;const o=this.cachedFilter(e);return o?o.filterPromise:null;}isFilterActive(e){const t=this.cachedFilter(e);return!!t&&t.filterPromise.resolveNow(!1,i=>i.isFilterActive());}getOrCreateFilterWrapper(e,t){if(!e.isFilterAllowed())return null;let i=this.cachedFilter(e);return i||(i=this.createFilterWrapper(e,t),this.setColumnFilterWrapper(e,i)),i;}cachedFilter(e){return this.allColumnFilters.get(e.getColId());}getDefaultFilter(e){let t;if(q.__isRegistered("@ag-grid-enterprise/set-filter",this.context.getGridId()))t="agSetColumnFilter";else{const i=this.dataTypeService.getBaseDataType(e);t="number"===i?"agNumberColumnFilter":"date"===i||"dateString"===i?"agDateColumnFilter":"agTextColumnFilter";}return t;}getDefaultFloatingFilter(e){let t;if(q.__isRegistered("@ag-grid-enterprise/set-filter",this.context.getGridId()))t="agSetColumnFloatingFilter";else{const i=this.dataTypeService.getBaseDataType(e);t="number"===i?"agNumberColumnFloatingFilter":"date"===i||"dateString"===i?"agDateColumnFloatingFilter":"agTextColumnFloatingFilter";}return t;}createFilterInstance(e){const t=this.getDefaultFilter(e),i=e.getColDef();let s;const o=x(M({},this.createFilterParams(e,i)),{filterModifiedCallback:()=>this.filterModifiedCallbackFactory(s,e)(),filterChangedCallback:n=>this.filterChangedCallbackFactory(s,e)(n),doesRowPassOtherFilter:n=>this.doesRowPassOtherFilters(s,n)}),r=this.userComponentFactory.getFilterDetails(i,o,t);return r?{filterPromise:()=>{const n=r.newAgStackInstance();return n&&n.then(l=>s=l),n;}
1,compDetails:r}:{filterPromise:null,compDetails:null};}createFilterParams(e,t){return this.gos.addGridCommonParams({column:e,colDef:qr(t),rowModel:this.rowModel,filterChangedCallback:()=>{},filterModifiedCallback:()=>{},valueGetter:this.createValueGetter(e),getValue:this.createGetValue(e),doesRowPassOtherFilter:()=>!0});}createFilterWrapper(e,t){var i;const s={column:e,filterPromise:null,compiledElement:null,compDetails:null},{filterPromise:o,compDetails:r}=this.createFilterInstance(e);return s.filterPromise=null!=(i=o?.())?i:null,s.compDetails=r,s;}onColumnsChanged(){const e=[];this.allColumnFilters.forEach((t,i)=>{let s;s=t.column.isPrimary()?this.columnModel.getPrimaryColumn(i):this.columnModel.getGridColumn(i),(!s||s!==t.column)&&(e.push(t.column),this.disposeFilterWrapper(t,"columnChanged"),this.disposeColumnListener(i));}),e.length>0?this.onFilterChanged({columns:e,source:"api"}):this.updateDependantFilters();}updateDependantFilters(){const e=this.columnModel.getGroupAutoColumns();e?.forEach(t=>{"agGroupColumnFilter"===t.getColDef().filter&&this.getOrCreateFilterWrapper(t,"NO_UI");});}isFilterAllowed(e){var t,i;if(this.isAdvancedFilterEnabled()||!e.isFilterAllowed())return!1;const o=this.allColumnFilters.get(e.getColId());return null==(i=null==(t=o?.filterPromise)?void 0:t.resolveNow(!0,r=>"function"!=typeof r?.isFilterAllowed||r?.isFilterAllowed()))||i;}getFloatingFilterCompDetails(e,t){const i=a=>{const u=this.getFilterComponent(e,"NO_UI");u?.then(h=>{a(wi(h));});},s=e.getColDef(),o=x(M({},this.createFilterParams(e,s)),{filterChangedCallback:()=>i(a=>this.filterChangedCallbackFactory(a,e)())}),r=this.userComponentFactory.mergeParamsWithApplicationProvidedParams(s,cl,o);let n=this.userComponentFactory.getDefaultFloatingFilterType(s,()=>this.getDefaultFloatingFilter(e));return null==n&&(n="agReadOnlyFloatingFilter"),this.userComponentFactory.getFloatingFilterCompDetails(s,{column:e,filterParams:r,currentParentModel:()=>this.getCurrentFloatingFilterParentModel(e),parentFilterInstance:i,showParentFilter:t,suppressFilterButton:!1},n);}getCurrentFloatingFilterParentModel(e){const t=this.getFilterComponent(e,"NO_UI",!1);return t?t.resolveNow(null,i=>i&&i.getModel()):null;}destroyFilter(e,t="api"){const i=e.getColId(),s=this.allColumnFilters.get(i);this.disposeColumnListener(i),delete this.initialFilterModel[i],s&&(this.disposeFilterWrapper(s,t),this.onFilterChanged({columns:[e],source:"api"}));}disposeColumnListener(e){const t=this.allColumnListeners.get(e);t&&(this.allColumnListeners.delete(e),t());}disposeFilterWrapper(e,t){e.filterPromise.then(i=>{this.getContext().destroyBean(i),e.column.setFilterActive(!1,"filterDestroyed"),this.allColumnFilters.delete(e.column.getColId()),this.eventService.dispatchEvent({type:c.EVENT_FILTER_DESTROYED,source:t,column:e.column});});}filterModifiedCallbackFactory(e,t){return()=>{this.eventService.dispatchEvent({type:c.EVENT_FILTER_MODIFIED,column:t,filterInstance:e});};}filterChangedCallbackFactory(e,t){return i=>{var s;const o=null!=(s=i?.source)?s:"api";this.callOnFilterChangedOutsideRenderCycle({filter:e,additionalEventAttributes:i,columns:[t],source:o});};}checkDestroyFilter(e){const t=this.allColumnFilters.get(e);if(!t)return;const i=t.column,{compDetails:s}=i.isFilterAllowed()?this.createFilterInstance(i):{compDetails:null};if(this.areFilterCompsDifferent(t.compDetails,s))return void this.destroyFilter(i,"paramsUpdated");const o=i.getColDef().filterParams;t.filterPromise?t.filterPromise.then(r=>{!1===(!r?.refresh||r.refresh(M(x(M({},this.createFilterParams(i,i.getColDef())),{filterModifiedCallback:this.filterModifiedCallbackFactory(r,i),filterChangedCallback:this.filterChangedCallbackFactory(r,i),doesRowPassOtherFilter:l=>this.doesRowPassOtherFilters(r,l)}),o)))&&this.destroyFilter(i,"paramsUpdated");}):this.destroyFilter(i,"paramsUpdated");}setColumnFilterWrapper(e,t){const i=e.getColId();this.allColumnFilters.set(i,t),this.allColumnListeners.set(i,this.addManagedListener(e,Z.EVENT_COL_DEF_CHANGED,(
1)=>this.checkDestroyFilter(i)));}areFilterCompsDifferent(e,t){if(!t||!e)return!0;const{componentClass:i}=e,{componentClass:s}=t;return!(i===s||i?.render&&s?.render&&i.render===s.render);}getAdvancedFilterModel(){return this.isAdvancedFilterEnabled()?this.advancedFilterService.getModel():null;}setAdvancedFilterModel(e){if(this.isAdvancedFilterEnabled()){if(this.dataTypeService.isPendingInference())return void this.advancedFilterModelUpdateQueue.push(e);this.advancedFilterService.setModel(e??null),this.onFilterChanged({source:"advancedFilter"});}}showAdvancedFilterBuilder(e){this.isAdvancedFilterEnabled()&&this.advancedFilterService.getCtrl().toggleFilterBuilder(e,!0);}updateAdvancedFilterColumns(){this.isAdvancedFilterEnabled()&&this.advancedFilterService.updateValidity()&&this.onFilterChanged({source:"advancedFilter"});}hasFloatingFilters(){return!this.isAdvancedFilterEnabled()&&this.columnModel.getAllGridColumns().some(t=>t.getColDef().floatingFilter);}getFilterInstance(e,t){if(this.isAdvancedFilterEnabled())return void this.warnAdvancedFilters();const i=this.getFilterInstanceImpl(e,o=>{if(!t)return;const r=wi(o);t(r);});return wi(i);}getColumnFilterInstance(e){return new Promise(t=>{this.getFilterInstance(e,i=>{t(i);});});}getFilterInstanceImpl(e,t){const i=this.columnModel.getPrimaryColumn(e);if(!i)return;const s=this.getFilterComponent(i,"NO_UI"),o=s&&s.resolveNow(null,r=>r);return o?setTimeout(t,0,o):s&&s.then(r=>{t(r);}),o;}warnAdvancedFilters(){O("Column Filter API methods have been disabled as Advanced Filters are enabled.");}setupAdvancedFilterHeaderComp(e){var t;null==(t=this.advancedFilterService)||t.getCtrl().setupHeaderComp(e);}getHeaderRowCount(){return this.isAdvancedFilterHeaderActive()?1:0;}getHeaderHeight(){return this.isAdvancedFilterHeaderActive()?this.advancedFilterService.getCtrl().getHeaderHeight():0;}processFilterModelUpdateQueue(){this.filterModelUpdateQueue.forEach(({model:e,source:t})=>this.setFilterModel(e,t)),this.filterModelUpdateQueue=[],this.columnFilterModelUpdateQueue.forEach(({key:e,model:t,resolve:i})=>{this.setColumnFilterModel(e,t).then(()=>i());}),this.columnFilterModelUpdateQueue=[],this.advancedFilterModelUpdateQueue.forEach(e=>this.setAdvancedFilterModel(e)),this.advancedFilterModelUpdateQueue=[];}getColumnFilterModel(e){const t=this.getFilterWrapper(e);return t?this.getModelFromFilterWrapper(t):null;}setColumnFilterModel(e,t){if(this.isAdvancedFilterEnabled())return this.warnAdvancedFilters(),Promise.resolve();if(this.dataTypeService.isPendingInference()){let r=()=>{};const n=new Promise(l=>{r=l;});return this.columnFilterModelUpdateQueue.push({key:e,model:t,resolve:r}),n;}const i=this.columnModel.getPrimaryColumn(e),s=i?this.getOrCreateFilterWrapper(i,"NO_UI"):null;return s?(r=this.setModelOnFilterWrapper(s.filterPromise,t),new Promise(n=>{r.then(l=>n(l));})):Promise.resolve();var r;}getFilterWrapper(e){var t;const i=this.columnModel.getPrimaryColumn(e);return i&&null!=(t=this.cachedFilter(i))?t:null;}destroy(){super.destroy(),this.allColumnFilters.forEach(e=>this.disposeFilterWrapper(e,"gridDestroyed")),this.allColumnListeners.clear();}};d([g("valueService")],je.prototype,"valueService",2),d([g("columnModel")],je.prototype,"columnModel",2),d([g("rowModel")],je.prototype,"rowModel",2),d([g("userComponentFactory")],je.prototype,"userComponentFactory",2),d([g("rowRenderer")],je.prototype,"rowRenderer",2),d([g("dataTypeService")],je.prototype,"dataTypeService",2),d([g("quickFilterService")],je.prototype,"quickFilterService",2),d([Q("advancedFilterService")],je.prototype,"advancedFilterService",2),d([T],je.prototype,"init",1),je=d([L("filterManager")],je);var to=class extends V{constructor(e,t){super('<div class="ag-filter"></div>'),this.column=e,this.source=t,this.filterWrapper=null;}postConstruct(){this.createFilter(!0),this.addManagedListener(this.eventService,c.EVENT_FILTER_DESTROYED,this.onFilterDestroyed.bind(this));}hasFilter(){return!!this.filterWrapper;}getFilter(){var e,t;return null!=(t=null==(e=this.filterWrapper)?void 0:e.filterPromise)?t:null;}afterInit(){var e,t,i;return null!=(i=null==(t=null==(e=this.filterWrapper)?void 0:e.filterPromise)?void 0:t.then(()=>{}))?i:$e.resolve();}afterGuiAttached(e){var t,i;null==(i=null==(t=this.filterWrapper)?void 0:t.filterPromise)||i.then(s=>{var o;null==(o=s?.afterGuiAttached)||o.call(s,e);});}afterGuiDetached(){var e,t;null==(t=null==(e=this.filterWrapper)?void 0:e.filterPromise)||t.then(i=>{var s;null==(s=i?.afterGuiDetached)||s.call(i);});}createFilter(e){var t;const{column:i,source:s}=this;this.filterWrapper=this.filterManager.getOrCreateFilterWrapper(i,s),null!=(t=this.filterWrapper)&&t.filterPromise&&this.filterWrapper.filterPromise.then(o=>{let r=o.getGui();if(y(r)||console.warn(`AG Grid: getGui method from filter returned ${r}, it should be a DOM element or an HTML template string.`),"string"==typeof r&&(r=Oe(r)),this.appendChild(r),e){const n={type:c.EVENT_FILTER_OPENED,column:i,source:s,eGui:this.getGui()};this.eventService.dispatchEvent(n);}});}onFilterDestroyed(e){("api"===e.source||"paramsUpdated"===e.source)&&e.column.getId()===this.column.getId()&&this.columnModel.getPrimaryColumn(this.column)&&(de(this.getGui()),this.createFilter());}destroy(){this.filterWrapper=null,super.destroy();}};d([g("filterManager")],to.prototype,"filterManager",2),d([g("columnModel")],to.prototype,"columnModel",2),d([T],to.prototype,"postConstruct",1);var Cl=class extends V{constructor(e,t){super(e),this.ctrl=t;}getCtrl(){return this.ctrl;}},Si=class ch extends Cl{constructor(t){super(ch.TEMPLATE,t);}postConstruct(){const t=this.getGui();
1this.ctrl.setComp({addOrRemoveCssClass:(s,o)=>this.addOrRemoveCssClass(s,o),addOrRemoveBodyCssClass:(s,o)=>this.eFloatingFilterBody.classList.toggle(s,o),setButtonWrapperDisplayed:s=>K(this.eButtonWrapper,s),setCompDetails:s=>this.setCompDetails(s),getFloatingFilterComp:()=>this.compPromise,setWidth:s=>t.style.width=s,setMenuIcon:s=>this.eButtonShowMainFilter.appendChild(s)},t,this.eButtonShowMainFilter,this.eFloatingFilterBody);}setCompDetails(t){if(!t)return this.destroyFloatingFilterComp(),void(this.compPromise=null);this.compPromise=t.newAgStackInstance(),this.compPromise.then(i=>this.afterCompCreated(i));}destroyFloatingFilterComp(){this.floatingFilterComp&&(this.eFloatingFilterBody.removeChild(this.floatingFilterComp.getGui()),this.floatingFilterComp=this.destroyBean(this.floatingFilterComp));}afterCompCreated(t){if(t){if(!this.isAlive())return void this.destroyBean(t);this.destroyFloatingFilterComp(),this.floatingFilterComp=t,this.eFloatingFilterBody.appendChild(t.getGui()),t.afterGuiAttached&&t.afterGuiAttached();}}};Si.TEMPLATE='<div class="ag-header-cell ag-floating-filter" role="gridcell">\n <div ref="eFloatingFilterBody" role="presentation"></div>\n <div class="ag-floating-filter-button ag-hidden" ref="eButtonWrapper" role="presentation">\n <button type="button" class="ag-button ag-floating-filter-button-button" ref="eButtonShowMainFilter" tabindex="-1"></button>\n </div>\n </div>',d([A("eFloatingFilterBody")],Si.prototype,"eFloatingFilterBody",2),d([A("eButtonWrapper")],Si.prototype,"eButtonWrapper",2),d([A("eButtonShowMainFilter")],Si.prototype,"eButtonShowMainFilter",2),d([T],Si.prototype,"postConstruct",1),d([Ee],Si.prototype,"destroyFloatingFilterComp",1);var Ud=Si,zd=(e=>(e.AUTO_HEIGHT="ag-layout-auto-height",e.NORMAL="ag-layout-normal",e.PRINT="ag-layout-print",e))(zd||{}),wr=class extends R{constructor(e){super(),this.view=e;}postConstruct(){this.addManagedPropertyListener("domLayout",this.updateLayoutClasses.bind(this)),this.updateLayoutClasses();}updateLayoutClasses(){const e=this.getDomLayout(),t={autoHeight:"autoHeight"===e,normal:"normal"===e,print:"print"===e};this.view.updateLayoutClasses(t.autoHeight?"ag-layout-auto-height":t.print?"ag-layout-print":"ag-layout-normal",t);}getDomLayout(){var e;const t=null!=(e=this.gos.get("domLayout"))?e:"normal";return-1===["normal","print","autoHeight"].indexOf(t)?(O(`${t} is not valid for DOM Layout, valid values are 'normal', 'autoHeight', 'print'.`),"normal"):t;}};d([T],wr.prototype,"postConstruct",1);var Gt=class extends R{constructor(e){super(),this.lastScrollSource=[null,null],this.scrollLeft=-1,this.nextScrollTop=-1,this.scrollTop=-1,this.lastOffsetHeight=-1,this.lastScrollTop=-1,this.eBodyViewport=e,this.resetLastHScrollDebounced=Te(()=>this.lastScrollSource[1]=null,500),this.resetLastVScrollDebounced=Te(()=>this.lastScrollSource[0]=null,500);}postConstruct(){this.enableRtl=this.gos.get("enableRtl"),this.addManagedListener(this.eventService,c.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,this.onDisplayedColumnsWidthChanged.bind(this)),this.ctrlsService.whenReady(e=>{this.centerRowsCtrl=e.center,this.onDisplayedColumnsWidthChanged(),this.addScrollListener();});}addScrollListener(){const{fakeHScrollComp:e,fakeVScrollComp:t}=this.ctrlsService.getParams();this.addManagedListener(this.centerRowsCtrl.getViewportElement(),"scroll",this.onHScroll.bind(this)),e.onScrollCallback(this.onFakeHScroll.bind(this));const i=this.gos.get("debounceVerticalScrollbar"),s=i?Te(this.onVScroll.bind(this),100):this.onVScroll.bind(this),o=i?Te(this.onFakeVScroll.bind(this),100):this.onFakeVScroll.bind(this);this.addManagedListener(this.eBodyViewport,"scroll",s),t.onScrollCallback(o);}onDisplayedColumnsWidthChanged(){this.enableRtl&&this.horizontallyScrollHeaderCenterAndFloatingCenter();}horizontallyScrollHeaderCenterAndFloatingCenter(e){if(null==this.centerRowsCtrl)return;void 0===e&&(e=this.centerRowsCtrl.getCenterViewportScrollLeft());const i=this.enableRtl?e:-e,{topCenter:s,stickyTopCenter:o,stickyBottomCenter:r,centerHeader:n,bottomCenter:l,fakeHScrollComp:a}=this.ctrlsService.getParams();n.setHorizontalScroll(-i),l.setContainerTranslateX(i),s.setContainerTranslateX(i),o.setContainerTranslateX(i),r.setContainerTranslateX(i);const u=this.centerRowsCtrl.getViewportElement(),h=0===this.lastScrollSource[1];e=Math.abs(e),h?a.setScrollPosition(e):Bs(u,e,this.enableRtl);}isControllingScroll(e,t){return null==this.lastScrollSource[t]?(this.lastScrollSource[t]=e,!0):this.lastScrollSource[t]===e;}onFakeHScroll(){this.isControllingScroll(1,1)&&this.onHScrollCommon(1);}onHScroll(){this.isControllingScroll(0,1)&&this.onHScrollCommon(0);}onHScrollCommon(e){const t=this.centerRowsCtrl.getViewportElement(),{scrollLeft:i}=t;if(this.shouldBlockScrollUpdate(1,i,!0))return;let s;s=0===e?ks(t,this.enableRtl):this.ctrlsService.get("fakeHScrollComp").getScrollPosition(),this.doHorizontalScroll(Math.round(s)),this.resetLastHScrollDebounced();}onFakeVScroll(){this.isControllingScroll(1,0)&&this.onVScrollCommon(1);}onVScroll(){this.isControllingScroll(0,0)&&this.onVScrollCommon(0);}onVScrollCommon(e){let t;t=0===e?this.eBodyViewport.scrollTop:this.ctrlsService.get("fakeVScrollComp").getScrollPosition(),!this.shouldBlockScrollUpdate(0,t,!0)&&(this.animationFrameService.setScrollTop(t),this.nextScrollTop=t,0===e?this.ctrlsService.get("fakeVScrollComp").setScrollPosition(t):this.eBodyViewport.scrollTop=t,this.gos.get("suppressAnimationFrame")?this.scrollGridIfNeeded():this.animationFrameService.schedule(),this.resetLastVScrollDebounced());}doHorizontalScroll(e){const t=this.ctrlsService.get("fakeHScrollComp").getScrollPosition();this.scrollLeft===e&&e===t||(this.scrollLeft=e,this.fireScrollEvent(1),this.horizontallyScrollHeaderCenterAndFloating
1Center(e),this.centerRowsCtrl.onHorizontalViewportChanged(!0));}fireScrollEvent(e){const t={type:c.EVENT_BODY_SCROLL,direction:1===e?"horizontal":"vertical",left:this.scrollLeft,top:this.scrollTop};this.eventService.dispatchEvent(t),window.clearTimeout(this.scrollTimer),this.scrollTimer=void 0,this.scrollTimer=window.setTimeout(()=>{const i=x(M({},t),{type:c.EVENT_BODY_SCROLL_END});this.eventService.dispatchEvent(i);},100);}shouldBlockScrollUpdate(e,t,i=!1){return!(i&&!Pt())&&(0===e?this.shouldBlockVerticalScroll(t):this.shouldBlockHorizontalScroll(t));}shouldBlockVerticalScroll(e){const t=_s(this.eBodyViewport),{scrollHeight:i}=this.eBodyViewport;return e<0||e+t>i;}shouldBlockHorizontalScroll(e){const t=this.centerRowsCtrl.getCenterWidth(),{scrollWidth:i}=this.centerRowsCtrl.getViewportElement();if(this.enableRtl&&Hs()){if(e>0)return!0;}else if(e<0)return!0;return Math.abs(e)+t>i;}redrawRowsAfterScroll(){this.fireScrollEvent(0);}checkScrollLeft(){this.scrollLeft!==this.centerRowsCtrl.getCenterViewportScrollLeft()&&this.onHScrollCommon(0);}scrollGridIfNeeded(){const e=this.scrollTop!=this.nextScrollTop;return e&&(this.scrollTop=this.nextScrollTop,this.redrawRowsAfterScroll()),e;}setHorizontalScrollPosition(e,t=!1){const s=this.centerRowsCtrl.getViewportElement().scrollWidth-this.centerRowsCtrl.getCenterWidth();!t&&this.shouldBlockScrollUpdate(1,e)&&(e=this.enableRtl&&Hs()?e>0?0:s:Math.min(Math.max(e,0),s)),Bs(this.centerRowsCtrl.getViewportElement(),Math.abs(e),this.enableRtl),this.doHorizontalScroll(e);}setVerticalScrollPosition(e){this.eBodyViewport.scrollTop=e;}getVScrollPosition(){return this.lastScrollTop=this.eBodyViewport.scrollTop,this.lastOffsetHeight=this.eBodyViewport.offsetHeight,{top:this.lastScrollTop,bottom:this.lastScrollTop+this.lastOffsetHeight};}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.centerRowsCtrl.isHorizontalScrollShowing();}scrollHorizontally(e){const t=this.centerRowsCtrl.getViewportElement().scrollLeft;return this.setHorizontalScrollPosition(t+e),this.centerRowsCtrl.getViewportElement().scrollLeft-t;}scrollToTop(){this.eBodyViewport.scrollTop=0;}ensureNodeVisible(e,t=null){const i=this.rowModel.getRowCount();let s=-1;for(let o=0;o<i;o++){const r=this.rowModel.getRow(o);if("function"==typeof e){if(r&&e(r)){s=o;break;}}else if(e===r||e===r.data){s=o;break;}}s>=0&&this.ensureIndexVisible(s,t);}ensureIndexVisible(e,t){if(this.gos.isDomLayout("print"))return;const i=this.paginationProxy.getRowCount();if("number"!=typeof e||e<0||e>=i)return void console.warn("AG Grid: Invalid row index for ensureIndexVisible: "+e);const o=this.gos.get("pagination")&&!this.gos.get("suppressPaginationPanel");this.getFrameworkOverrides().wrapIncoming(()=>{o||this.paginationProxy.goToPageWithIndex(e);const r=this.ctrlsService.getGridBodyCtrl(),n=r.getStickyTopHeight(),l=r.getStickyBottomHeight(),a=this.paginationProxy.getRow(e);let u;do{const h=a.rowTop,p=a.rowHeight,f=this.paginationProxy.getPixelOffset(),m=a.rowTop-f,v=m+a.rowHeight,w=this.getVScrollPosition(),S=this.heightScaler.getDivStretchOffset(),b=w.top+S,E=w.bottom+S,F=E-b,P=this.heightScaler.getScrollPositionForPixel(m),I=this.heightScaler.getScrollPositionForPixel(v-F),G=Math.min((P+I)/2,m);let te=null;"top"===t?te=P:"bottom"===t?te=I:"middle"===t?te=G:b+n>m?te=P-n:E-l<v&&(te=I+l),null!==te&&(this.setVerticalScrollPosition(te),this.rowRenderer.redraw({afterScroll:!0})),u=h!==a.rowTop||p!==a.rowHeight;}while(u);this.animationFrameService.flushAllFrames();});}ensureColumnVisible(e,t="auto"){const i=this.columnModel.getGridColumn(e);if(!i||i.isPinned()||!this.columnModel.isColumnDisplayed(i))return;const s=this.getPositionedHorizontalScroll(i,t);this.getFrameworkOverrides().wrapIncoming(()=>{null!==s&&this.centerRowsCtrl.setCenterViewportScrollLeft(s),this.centerRowsCtrl.onHorizontalViewportChanged(),this.animationFrameService.flushAllFrames();});}setScrollPosition(e,t){this.getFrameworkOverrides().wrapIncoming(()=>{this.centerRowsCtrl.setCenterViewportScrollLeft(t),this.setVerticalScrollPosition(e),this.rowRenderer.redraw({afterScroll:!0}),this.animationFrameService.flushAllFrames();});}getPositionedHorizontalScroll(e,t){const{columnBeforeStart:i,columnAfterEnd:s}=this.isColumnOutsideViewport(e),o=this.centerRowsCtrl.getCenterWidth()<e.getActualWidth(),r=this.centerRowsCtrl.getCenterWidth(),n=this.enableRtl;let l=(n?i:s)||o,a=n?s:i;"auto"!==t&&(l="start"===t,a="end"===t);const u="middle"===t;if(l||a||u){const{colLeft:h,colMiddle:p,colRight:f}=this.getColumnBounds(e);return u?p-r/2:l?n?f:h:n?h-r:f-r;}return null;}isColumnOutsideViewport(e){const{start:t,end:i}=this.getViewportBounds(),{colLeft:s,colRight:o}=this.getColumnBounds(e),r=this.enableRtl;return{columnBeforeStart:r?t>o:i<o,columnAfterEnd:r?i<s:t>s};}getColumnBounds(e){const t=this.enableRtl,i=this.columnModel.getBodyContainerWidth(),s=e.getActualWidth(),o=e.getLeft(),r=t?-1:1,n=t?i-o:o;return{colLeft:n,colMiddle:n+s/2*r,colRight:n+s*r};}getViewportBounds(){const e=this.centerRowsCtrl.getCenterWidth(),t=this.centerRowsCtrl.getCenterViewportScrollLeft();return{start:t,end:e+t,width:e};}};d([g("ctrlsService")],Gt.prototype,"ctrlsService",2),d([g("animationFrameService")],Gt.prototype,"animationFrameService",2),d([g("paginationProxy")],Gt.prototype,"paginationProxy",2),d([g("rowModel")],Gt.prototype,"rowModel",2),d([g("rowContainerHeightService")],Gt.prototype,"heightScaler",2),d([g("rowRenderer")],Gt.prototype,"rowRenderer",2),d([g("columnModel")],Gt.prototype,"columnModel",2),d([T],Gt.prototype,"postConstruct",1);var Kd=(e=>(e.ANIMATION_ON="ag-row-animation",e.ANIMATION_OFF="ag-row-no-animation",e))(Kd||{}),$d="ag-force-vertical-scroll",Re=class extends R{constructor(){super(...arguments),this.stickyTopHeight=0,this.stickyBottomHeight=0;}
1getScrollFeature(){return this.bodyScrollFeature;}getBodyViewportElement(){return this.eBodyViewport;}setComp(e,t,i,s,o,r,n){this.comp=e,this.eGridBody=t,this.eBodyViewport=i,this.eTop=s,this.eBottom=o,this.eStickyTop=r,this.eStickyBottom=n,this.setCellTextSelection(this.gos.get("enableCellTextSelection")),this.addManagedPropertyListener("enableCellTextSelection",l=>this.setCellTextSelection(l.currentValue)),this.createManagedBean(new wr(this.comp)),this.bodyScrollFeature=this.createManagedBean(new Gt(this.eBodyViewport)),this.addRowDragListener(),this.setupRowAnimationCssClass(),this.addEventListeners(),this.addFocusListeners([s,i,o,r,n]),this.onGridColumnsChanged(),this.addBodyViewportListener(),this.setFloatingHeights(),this.disableBrowserDragging(),this.addStopEditingWhenGridLosesFocus(),this.filterManager.setupAdvancedFilterHeaderComp(s),this.ctrlsService.register("gridBodyCtrl",this);}getComp(){return this.comp;}addEventListeners(){this.addManagedListener(this.eventService,c.EVENT_GRID_COLUMNS_CHANGED,this.onGridColumnsChanged.bind(this)),this.addManagedListener(this.eventService,c.EVENT_SCROLL_VISIBILITY_CHANGED,this.onScrollVisibilityChanged.bind(this)),this.addManagedListener(this.eventService,c.EVENT_PINNED_ROW_DATA_CHANGED,this.onPinnedRowDataChanged.bind(this)),this.addManagedListener(this.eventService,c.EVENT_HEADER_HEIGHT_CHANGED,this.onHeaderHeightChanged.bind(this));}addFocusListeners(e){e.forEach(t=>{this.addManagedListener(t,"focusin",i=>{const{target:s}=i,o=hi(s,"ag-root",t);t.classList.toggle("ag-has-focus",!o);}),this.addManagedListener(t,"focusout",i=>{const{target:s,relatedTarget:o}=i,r=t.contains(o),n=hi(o,"ag-root",t);hi(s,"ag-root",t)||(!r||n)&&t.classList.remove("ag-has-focus");});});}setColumnMovingCss(e){this.comp.setColumnMovingCss("ag-column-moving",e);}setCellTextSelection(e=!1){this.comp.setCellSelectableCss("ag-selectable",e);}onScrollVisibilityChanged(){const e=this.scrollVisibleService.isVerticalScrollShowing();this.setVerticalScrollPaddingVisible(e),this.setStickyWidth(e),this.setStickyBottomOffsetBottom();const s=`calc(100% + ${(e&&this.gos.getScrollbarWidth()||0)+(Mn()?16:0)}px)`;this.animationFrameService.requestAnimationFrame(()=>this.comp.setBodyViewportWidth(s));}onGridColumnsChanged(){const e=this.columnModel.getAllGridColumns();this.comp.setColumnCount(e.length);}disableBrowserDragging(){this.addManagedListener(this.eGridBody,"dragstart",e=>{if(e.target instanceof HTMLImageElement)return e.preventDefault(),!1;});}addStopEditingWhenGridLosesFocus(){if(!this.gos.get("stopEditingWhenCellsLoseFocus"))return;const e=i=>{const s=i.relatedTarget;if(null===sr(s))return void this.rowRenderer.stopEditing();let o=t.some(r=>r.contains(s))&&this.mouseEventService.isElementInThisGrid(s);if(!o){const r=this.popupService;o=r.getActivePopups().some(n=>n.contains(s))||r.isElementWithinCustomPopup(s);}o||this.rowRenderer.stopEditing();},t=[this.eBodyViewport,this.eBottom,this.eTop,this.eStickyTop,this.eStickyBottom];t.forEach(i=>this.addManagedListener(i,"focusout",e));}updateRowCount(){const e=this.headerNavigationService.getHeaderRowCount()+this.filterManager.getHeaderRowCount(),t=this.rowModel.isLastRowIndexKnown()?this.rowModel.getRowCount():-1;this.comp.setRowCount(-1===t?-1:e+t);}registerBodyViewportResizeListener(e){this.comp.registerBodyViewportResizeListener(e);}setVerticalScrollPaddingVisible(e){this.comp.setPinnedTopBottomOverflowY(e?"scroll":"hidden");}isVerticalScrollShowing(){const e=this.gos.get("alwaysShowVerticalScroll"),t=e?$d:null,i=this.gos.isDomLayout("normal");return this.comp.setAlwaysVerticalScrollClass(t,e),e||i&&Ya(this.eBodyViewport);}setupRowAnimationCssClass(){const e=()=>{const t=this.gos.isAnimateRows()&&!this.rowContainerHeightService.isStretching();this.comp.setRowAnimationCssOnBodyViewport(t?"ag-row-animation":"ag-row-no-animation",t);};e(),this.addManagedListener(this.eventService,c.EVENT_HEIGHT_SCALE_CHANGED,e),this.addManagedPropertyListener("animateRows",e);}getGridBodyElement(){return this.eGridBody;}addBodyViewportListener(){const e=this.onBodyViewportContextMenu.bind(this);this.addManagedListener(this.eBodyViewport,"contextmenu",e),this.mockContextMenuForIPad(e),this.addManagedListener(this.eBodyViewport,"wheel",this.onBodyViewportWheel.bind(this)),this.addManagedListener(this.eStickyTop,"wheel",this.onStickyWheel.bind(this)),this.addManagedListener(this.eStickyBottom,"wheel",this.onStickyWheel.bind(this)),this.addFullWidthContainerWheelListener();}addFullWidthContainerWheelListener(){const e=this.eBodyViewport.querySelector(".ag-full-width-container"),t=this.eBodyViewport.querySelector(".ag-center-cols-viewport");e&&t&&this.addManagedListener(e,"wheel",i=>this.onFullWidthContainerWheel(i,t));}onFullWidthContainerWheel(e,t){!e.deltaX||Math.abs(e.deltaY)>Math.abs(e.deltaX)||!this.mouseEventService.isEventFromThisGrid(e)||(e.preventDefault(),t.scrollBy({left:e.deltaX}));}onBodyViewportContextMenu(e,t,i){if(!e&&!i)return;this.gos.get("preventDefaultOnContextMenu")&&(e||i).preventDefault();const{target:s}=e||t;
1(s===this.eBodyViewport||s===this.ctrlsService.get("center").getViewportElement())&&this.menuService.showContextMenu({mouseEvent:e,touchEvent:i,value:null,anchorToElement:this.eGridBody});}mockContextMenuForIPad(e){if(!Pt())return;const t=new me(this.eBodyViewport);this.addManagedListener(t,me.EVENT_LONG_TAP,s=>{e(void 0,s.touchStart,s.touchEvent);}),this.addDestroyFunc(()=>t.destroy());}onBodyViewportWheel(e){this.gos.get("suppressScrollWhenPopupsAreOpen")&&this.popupService.hasAnchoredPopup()&&e.preventDefault();}onStickyWheel(e){e.preventDefault(),e.offsetY&&this.scrollVertically(e.deltaY);}getGui(){return this.eGridBody;}scrollVertically(e){const t=this.eBodyViewport.scrollTop;return this.bodyScrollFeature.setVerticalScrollPosition(t+e),this.eBodyViewport.scrollTop-t;}addRowDragListener(){this.rowDragFeature=this.createManagedBean(new Ye(this.eBodyViewport)),this.dragAndDropService.addDropTarget(this.rowDragFeature);}getRowDragFeature(){return this.rowDragFeature;}onPinnedRowDataChanged(){this.setFloatingHeights();}setFloatingHeights(){const{pinnedRowModel:e}=this;let t=e.getPinnedTopTotalHeight(),i=e.getPinnedBottomTotalHeight();this.comp.setTopHeight(t),this.comp.setBottomHeight(i),this.comp.setTopDisplay(t?"inherit":"none"),this.comp.setBottomDisplay(i?"inherit":"none"),this.setStickyTopOffsetTop(),this.setStickyBottomOffsetBottom();}setStickyTopHeight(e=0){this.comp.setStickyTopHeight(`${e}px`),this.stickyTopHeight=e;}getStickyTopHeight(){return this.stickyTopHeight;}setStickyBottomHeight(e=0){this.comp.setStickyBottomHeight(`${e}px`),this.stickyBottomHeight=e;}getStickyBottomHeight(){return this.stickyBottomHeight;}setStickyWidth(e){if(e){const t=this.gos.getScrollbarWidth();this.comp.setStickyTopWidth(`calc(100% - ${t}px)`),this.comp.setStickyBottomWidth(`calc(100% - ${t}px)`);}else this.comp.setStickyTopWidth("100%"),this.comp.setStickyBottomWidth("100%");}onHeaderHeightChanged(){this.setStickyTopOffsetTop();}setStickyTopOffsetTop(){const t=this.ctrlsService.get("gridHeaderCtrl").getHeaderHeight()+this.filterManager.getHeaderHeight(),i=this.pinnedRowModel.getPinnedTopTotalHeight();let s=0;t>0&&(s+=t),i>0&&(s+=i),s>0&&(s+=1),this.comp.setStickyTopTop(`${s}px`);}setStickyBottomOffsetBottom(){const e=this.pinnedRowModel.getPinnedBottomTotalHeight(),i=this.scrollVisibleService.isHorizontalScrollShowing()&&this.gos.getScrollbarWidth()||0;this.comp.setStickyBottomBottom(`${e+i}px`);}sizeColumnsToFit(e,t){const s=this.isVerticalScrollShowing()?this.gos.getScrollbarWidth():0,r=ci(this.eGridBody)-s;r>0?this.columnModel.sizeColumnsToFit(r,"sizeColumnsToFit",!1,e):void 0===t?window.setTimeout(()=>{this.sizeColumnsToFit(e,100);},0):100===t?window.setTimeout(()=>{this.sizeColumnsToFit(e,500);},100):500===t?window.setTimeout(()=>{this.sizeColumnsToFit(e,-1);},500):console.warn("AG Grid: tried to call sizeColumnsToFit() but the grid is coming back with zero width, maybe the grid is not visible yet on the screen?");}addScrollEventListener(e){this.eBodyViewport.addEventListener("scroll",e,{passive:!0});}removeScrollEventListener(e){this.eBodyViewport.removeEventListener("scroll",e);}};d([g("animationFrameService")],Re.prototype,"animationFrameService",2),d([g("rowContainerHeightService")],Re.prototype,"rowContainerHeightService",2),d([g("ctrlsService")],Re.prototype,"ctrlsService",2),d([g("columnModel")],Re.prototype,"columnModel",2),d([g("scrollVisibleService")],Re.prototype,"scrollVisibleService",2),d([g("menuService")],Re.prototype,"menuService",2),d([g("headerNavigationService")],Re.prototype,"headerNavigationService",2),d([g("dragAndDropService")],Re.prototype,"dragAndDropService",2),d([g("pinnedRowModel")],Re.prototype,"pinnedRowModel",2),d([g("rowRenderer")],Re.prototype,"rowRenderer",2),d([g("popupService")],Re.prototype,"popupService",2),d([g("mouseEventService")],Re.prototype,"mouseEventService",2),d([g("rowModel")],Re.prototype,"rowModel",2),d([g("filterManager")],Re.prototype,"filterManager",2);var Yd=(e=>(e[e.FILL=0]="FILL",e[e.RANGE=1]="RANGE",e))(Yd||{}),jd=(e=>(e[e.VALUE=0]="VALUE",e[e.DIMENSION=1]="DIMENSION",e))(jd||{}),io="ag-cell-range-selected",rp=class extends R{constructor(e,t){super(),this.cellCtrl=e,this.beans=t,this.column=e.getColumn(),this.rowNode=e.getRowNode();}setupRowSpan(){this.rowSpan=this.column.getRowSpan(this.rowNode),this.addManagedListener(this.beans.eventService,c.EVENT_NEW_COLUMNS_LOADED,()=>this.onNewColumnsLoaded());}setComp(e){this.eGui=e,this.setupColSpan(),this.setupRowSpan(),this.onLeftChanged(),this.onWidthChanged(),this.applyRowSpan();}onNewColumnsLoaded(){const e=this.column.getRowSpan(this.rowNode);this.rowSpan!==e&&(this.rowSpan=e,this.applyRowSpan(!0));}
1onDisplayColumnsChanged(){const e=this.getColSpanningList();pt(this.colsSpanning,e)||(this.colsSpanning=e,this.onWidthChanged(),this.onLeftChanged());}setupColSpan(){null!=this.column.getColDef().colSpan&&(this.colsSpanning=this.getColSpanningList(),this.addManagedListener(this.beans.eventService,c.EVENT_DISPLAYED_COLUMNS_CHANGED,this.onDisplayColumnsChanged.bind(this)),this.addManagedListener(this.beans.eventService,c.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,this.onWidthChanged.bind(this)));}onWidthChanged(){if(!this.eGui)return;const e=this.getCellWidth();this.eGui.style.width=`${e}px`;}getCellWidth(){return this.colsSpanning?this.colsSpanning.reduce((e,t)=>e+t.getActualWidth(),0):this.column.getActualWidth();}getColSpanningList(){const e=this.column.getColSpan(this.rowNode),t=[];if(1===e)t.push(this.column);else{let i=this.column;const s=this.column.getPinned();for(let o=0;i&&o<e&&(t.push(i),i=this.beans.columnModel.getDisplayedColAfter(i),i&&!_(i)&&s===i.getPinned());o++);}return t;}onLeftChanged(){if(!this.eGui)return;const e=this.modifyLeftForPrintLayout(this.getCellLeft());this.eGui.style.left=e+"px";}getCellLeft(){let e;return e=this.beans.gos.get("enableRtl")&&this.colsSpanning?Y(this.colsSpanning):this.column,e.getLeft();}modifyLeftForPrintLayout(e){if(!this.cellCtrl.isPrintLayout()||"left"===this.column.getPinned())return e;const t=this.beans.columnModel.getDisplayedColumnsLeftWidth();return"right"===this.column.getPinned()?t+this.beans.columnModel.getBodyContainerWidth()+(e||0):t+(e||0);}applyRowSpan(e){if(1===this.rowSpan&&!e)return;const i=this.beans.gos.getRowHeightAsNumber()*this.rowSpan;this.eGui.style.height=`${i}px`,this.eGui.style.zIndex="1";}destroy(){super.destroy();}},np=class extends R{constructor(e,t){super(),this.staticClasses=[],this.cellCtrl=e,this.beans=t,this.column=e.getColumn(),this.rowNode=e.getRowNode();}setComp(e){this.cellComp=e,this.applyUserStyles(),this.applyCellClassRules(),this.applyClassesFromColDef();}applyCellClassRules(){const e=this.column.getColDef(),{cellClassRules:t}=e,i=this.beans.gos.addGridCommonParams({value:this.cellCtrl.getValue(),data:this.rowNode.data,node:this.rowNode,colDef:e,column:this.column,rowIndex:this.rowNode.rowIndex});this.beans.stylingService.processClassRules(t===this.cellClassRules?void 0:this.cellClassRules,t,i,s=>this.cellComp.addOrRemoveCssClass(s,!0),s=>this.cellComp.addOrRemoveCssClass(s,!1)),this.cellClassRules=t;}applyUserStyles(){const e=this.column.getColDef();if(!e.cellStyle)return;let t;if("function"==typeof e.cellStyle){const i=this.beans.gos.addGridCommonParams({column:this.column,value:this.cellCtrl.getValue(),colDef:e,data:this.rowNode.data,node:this.rowNode,rowIndex:this.rowNode.rowIndex});t=(0,e.cellStyle)(i);}else t=e.cellStyle;t&&this.cellComp.setUserStyles(t);}applyClassesFromColDef(){const e=this.column.getColDef(),t=this.beans.gos.addGridCommonParams({value:this.cellCtrl.getValue(),data:this.rowNode.data,node:this.rowNode,column:this.column,colDef:e,rowIndex:this.rowNode.rowIndex});this.staticClasses.length&&this.staticClasses.forEach(i=>this.cellComp.addOrRemoveCssClass(i,!1)),this.staticClasses=this.beans.stylingService.getStaticCellClasses(e,t),this.staticClasses.length&&this.staticClasses.forEach(i=>this.cellComp.addOrRemoveCssClass(i,!0));}destroy(){super.destroy();}},k=class{postConstruct(){this.gos.isRowModelType("clientSide")&&(this.clientSideRowModel=this.rowModel),this.gos.isRowModelType("serverSide")&&(this.serverSideRowModel=this.rowModel);}};d([g("resizeObserverService")],k.prototype,"resizeObserverService",2),d([g("paginationProxy")],k.prototype,"paginationProxy",2),d([g("context")],k.prototype,"context",2),d([g("gridOptionsService")],k.prototype,"gos",2),d([g("environment")],k.prototype,"environment",2),d([g("rowRenderer")],k.prototype,"rowRenderer",2),d([g("valueService")],k.prototype,"valueService",2),d([g("eventService")],k.prototype,"eventService",2),d([g("columnModel")],k.prototype,"columnModel",2),d([g("headerNavigationService")],k.prototype,"headerNavigationService",2),d([g("navigationService")],k.prototype,"navigationService",2),d([g("columnAnimationService")],k.prototype,"columnAnimationService",2),d([g("focusService")],k.prototype,"focusService",2),d([g("popupService")],k.prototype,"popupService",2),d([g("stylingService")],k.prototype,"stylingService",2),d([g("columnHoverService")],k.prototype,"columnHoverService",2),d([g("userComponentFactory")],k.prototype,"userComponentFactory",2),d([g("userComponentRegistry")],k.prototype,"userComponentRegistry",2),d([g("animationFrameService")],k.prototype,"animationFrameService",2),d([g("dragService")],k.prototype,"dragService",2),d([g("dragAndDropService")],k.prototype,"dragAndDropService",2),d([g("sortController")],k.prototype,"sortController",2),d([g("filterManager")],k.prototype,"filterManager",2),d([g("rowContainerHeightService")],k.prototype,"rowContainerHeightService",2),d([g("frameworkOverrides")],k.prototype,"frameworkOverrides",2),d([g("cellPositionUtils")],k.prototype,"cellPositionUtils",2),d([g("rowPositionUtils")],k.prototype,"rowPositionUtils",2),d([g("selectionService")],k.prototype,"selectionService",2),d([g("rowCssClassCalculator")],k.prototype,"rowCssClassCalculator",2),d([g("rowModel")],k.prototype,"rowModel",2),d([g("ctrlsService")],k.prototype,"ctrlsService",2),d([g("ctrlsFactory")],k.prototype,"ctrlsFactory",2),d([g("agStackComponentsRegistry")],k.prototype,"agStackComponentsRegistry",2),d([g("valueCache")],k.prototype,"valueCache",2),d([g("rowNodeEventThrottle")],k.prototype,"rowNodeEventThrottle",2),d([g("localeService")],k.prototype,"localeService",2),d([g("syncService")],k.prototype,"syncService",2),d([g("ariaAnnouncementService")],k.prototype,"ariaAnnouncementService",2),d([Q("rangeService")],k.prototype,"rangeService",2),d([Q("selectionHandleFactory")],k.prototype,"selectionHandleFactory",2),d([T],k.prototype,"postConstruct",1),k=d([L("beans")],k);var lp=class extends k{constructor(e,t,i){super(),this.cellCtrl=e,this.beans=t,this.column=i;}onMouseEvent(e,t){if(!lt(t))switch(e){case"click":this.onCellClicked(t);break;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);}}onCellClicked(e){if(this.isDoubleClickOnIPad())return this.onCellDoubleClicked(e),void e.preventDefault();const{eventService:t,rangeService:i,gos:s}=this.beans;i&&(e.ctrlKey||e.metaKey)&&i.getCellRangeCount(this.cellCtrl.getCellPosition())>1&&i.intersectLastRange(!0);const r=this.cellCtrl.createEvent(e,c.EVENT_CELL_CLICKED);t.dispatchEvent(r);const n=this.column.getColDef();n.onCellClicked&&window.setTimeout(()=>{this.beans.frameworkOverrides.wrapOutgoing(()=>{n.onCellClicked(r);});},0),(s.get("singleClickEdit")||n.singleClickEdit)&&!s.get("suppressClickEdit")&&(!e.shiftKey||0==i?.getCellRanges().length)&&this.cellCtrl.
1startRowOrCellEdit();}isDoubleClickOnIPad(){if(!Pt()||un("dblclick"))return!1;const e=new Date().getTime(),t=e-this.lastIPadMouseClickEvent<200;return this.lastIPadMouseClickEvent=e,t;}onCellDoubleClicked(e){const t=this.column.getColDef(),i=this.cellCtrl.createEvent(e,c.EVENT_CELL_DOUBLE_CLICKED);this.beans.eventService.dispatchEvent(i),"function"==typeof t.onCellDoubleClicked&&window.setTimeout(()=>{this.beans.frameworkOverrides.wrapOutgoing(()=>{t.onCellDoubleClicked(i);});},0),!this.beans.gos.get("singleClickEdit")&&!this.beans.gos.get("suppressClickEdit")&&this.cellCtrl.startRowOrCellEdit(null,e);}onMouseDown(e){const{ctrlKey:t,metaKey:i,shiftKey:s}=e,o=e.target,{cellCtrl:r,beans:n}=this,{eventService:l,rangeService:a,focusService:u}=n;if(this.isRightClickInExistingRange(e))return;const h=a&&0!=a.getCellRanges().length;if(!s||!h){const p=gt()&&!r.isEditing()&&!On(o);r.focusCell(p);}if(s&&h&&!u.isCellFocused(r.getCellPosition())){e.preventDefault();const p=u.getFocusedCell();if(p){const{column:f,rowIndex:m,rowPinned:v}=p,w=n.rowRenderer.getRowByPosition({rowIndex:m,rowPinned:v}),S=w?.getCellCtrl(f);S?.isEditing()&&S.stopEditing(),u.setFocusedCell({column:f,rowIndex:m,rowPinned:v,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0});}}if(!this.containsWidget(o)){if(a){const p=this.cellCtrl.getCellPosition();s?a.extendLatestRangeToCell(p):a.setRangeToCell(p,t||i);}l.dispatchEvent(this.cellCtrl.createEvent(e,c.EVENT_CELL_MOUSE_DOWN));}}isRightClickInExistingRange(e){const{rangeService:t}=this.beans;if(t){const i=t.isCellInAnyRange(this.cellCtrl.getCellPosition()),s=2===e.button||e.ctrlKey&&this.beans.gos.get("allowContextMenuWithControlKey");if(i&&s)return!0;}return!1;}containsWidget(e){return hi(e,"ag-selection-checkbox",3);}onMouseOut(e){if(this.mouseStayingInsideCell(e))return;const t=this.cellCtrl.createEvent(e,c.EVENT_CELL_MOUSE_OUT);this.beans.eventService.dispatchEvent(t),this.beans.columnHoverService.clearMouseOver();}onMouseOver(e){if(this.mouseStayingInsideCell(e))return;const t=this.cellCtrl.createEvent(e,c.EVENT_CELL_MOUSE_OVER);this.beans.eventService.dispatchEvent(t),this.beans.columnHoverService.setMouseOver([this.column]);}mouseStayingInsideCell(e){if(!e.target||!e.relatedTarget)return!1;const t=this.cellCtrl.getGui(),i=t.contains(e.target),s=t.contains(e.relatedTarget);return i&&s;}destroy(){}},ap=class extends R{constructor(e,t,i,s,o){super(),this.cellCtrl=e,this.beans=t,this.rowNode=s,this.rowCtrl=o;}setComp(e){this.eGui=e;}onKeyDown(e){const t=e.key;switch(t){case C.ENTER:this.onEnterKeyDown(e);break;case C.F2:this.onF2KeyDown(e);break;case C.ESCAPE:this.onEscapeKeyDown(e);break;case C.TAB:this.onTabKeyDown(e);break;case C.BACKSPACE:case C.DELETE:this.onBackspaceOrDeleteKeyDown(t,e);break;case C.DOWN:case C.UP:case C.RIGHT:case C.LEFT:this.onNavigationKeyDown(e,t);}}onNavigationKeyDown(e,t){this.cellCtrl.isEditing()||(e.shiftKey&&this.cellCtrl.isRangeSelectionEnabled()?this.onShiftRangeSelect(e):this.beans.navigationService.navigateToNextCell(e,t,this.cellCtrl.getCellPosition(),!0),e.preventDefault());}onShiftRangeSelect(e){if(!this.beans.rangeService)return;const t=this.beans.rangeService.extendLatestRangeInDirection(e);t&&this.beans.navigationService.ensureCellVisible(t);}onTabKeyDown(e){this.beans.navigationService.onTabKeyDown(this.cellCtrl,e);}onBackspaceOrDeleteKeyDown(e,t){var i;const{cellCtrl:s,beans:o,rowNode:r}=this,{gos:n,rangeService:l,eventService:a}=o;if(!s.isEditing()){if(a.dispatchEvent({type:c.EVENT_KEY_SHORTCUT_CHANGED_CELL_START}),sd(e,n.get("enableCellEditingOnBackspace"))){if(l&&n.get("enableRangeSelection"))l.clearCellRangeCellValues({dispatchWrapperEvents:!0,wrapperEventSource:"deleteKey"});else if(s.isCellEditable()){const u=s.getColumn(),h=null!=(i=this.beans.valueService.parseValue(u,r,"",r.getValueFromValueService(u)))?i:null;r.setDataValue(u,h,"cellClear");}}else s.startRowOrCellEdit(e,t);a.dispatchEvent({type:c.EVENT_KEY_SHORTCUT_CHANGED_CELL_END});}}onEnterKeyDown(e){this.cellCtrl.isEditing()||this.rowCtrl.isEditing()?this.cellCtrl.stopEditingAndFocus(!1,e.shiftKey):this.beans.gos.get("enterNavigatesVertically")?this.beans.navigationService.navigateToNextCell(null,e.shiftKey?C.UP:C.DOWN,this.cellCtrl.getCellPosition(),!1):(this.cellCtrl.
1startRowOrCellEdit(C.ENTER,e),this.cellCtrl.isEditing()&&e.preventDefault());}onF2KeyDown(e){this.cellCtrl.isEditing()||this.cellCtrl.startRowOrCellEdit(C.F2,e);}onEscapeKeyDown(e){this.cellCtrl.isEditing()&&(this.cellCtrl.stopRowOrCellEdit(!0),this.cellCtrl.focusCell(!0));}processCharacter(e){if(e.target!==this.eGui||this.cellCtrl.isEditing())return;const s=e.key;" "===s?this.onSpaceKeyDown(e):(this.cellCtrl.startRowOrCellEdit(s,e),e.preventDefault());}onSpaceKeyDown(e){const{gos:t}=this.beans;if(!this.cellCtrl.isEditing()&&t.isRowSelection()){const i=this.rowNode.isSelected(),s=!i;if(s||!t.get("suppressRowDeselection")){const o=this.beans.gos.get("groupSelectsFiltered"),r=this.rowNode.setSelectedParams({newValue:s,rangeSelect:e.shiftKey,groupSelectsFiltered:o,event:e,source:"spaceKey"});void 0===i&&0===r&&this.rowNode.setSelectedParams({newValue:!1,rangeSelect:e.shiftKey,groupSelectsFiltered:o,event:e,source:"spaceKey"});}}e.preventDefault();}destroy(){super.destroy();}},qd=class extends V{constructor(e,t,i){super('<div class="ag-drag-handle ag-row-drag" draggable="true"></div>'),this.rowNode=e,this.column=t,this.eCell=i;}postConstruct(){this.getGui().appendChild(re("rowDrag",this.gos,null)),this.addGuiEventListener("mousedown",t=>{t.stopPropagation();}),this.addDragSource(),this.checkVisibility();}addDragSource(){this.addGuiEventListener("dragstart",this.onDragStart.bind(this));}onDragStart(e){const t=this.column.getColDef().dndSourceOnRowDrag;e.dataTransfer.setDragImage(this.eCell,0,0),t?t(this.gos.addGridCommonParams({rowNode:this.rowNode,dragEvent:e})):(()=>{try{const s=JSON.stringify(this.rowNode.data);e.dataTransfer.setData("application/json",s),e.dataTransfer.setData("text/plain",s);}catch{}})();}checkVisibility(){const e=this.column.isDndSource(this.rowNode);this.setDisplayed(e);}};d([T],qd.prototype,"postConstruct",1);var so=class{static getHeaderClassesFromColDef(e,t,i,s){return _(e)?[]:this.getColumnClassesFromCollDef(e.headerClass,e,t,i,s);}static getToolPanelClassesFromColDef(e,t,i,s){return _(e)?[]:this.getColumnClassesFromCollDef(e.toolPanelClass,e,t,i,s);}static refreshFirstAndLastStyles(e,t,i){e.addOrRemoveCssClass("ag-column-first",i.isColumnAtEdge(t,"first")),e.addOrRemoveCssClass("ag-column-last",i.isColumnAtEdge(t,"last"));}static getClassParams(e,t,i,s){return t.addGridCommonParams({colDef:e,column:i,columnGroup:s});}static getColumnClassesFromCollDef(e,t,i,s,o){if(_(e))return[];let r;return r="function"==typeof e?e(this.getClassParams(t,i,s,o)):e,"string"==typeof r?[r]:Array.isArray(r)?[...r]:[];}},Sp=0,Qd=class Ul extends R{constructor(t,i,s,o){super(),this.cellRangeFeature=null,this.cellPositionFeature=null,this.cellCustomStyleFeature=null,this.tooltipFeature=null,this.cellMouseListenerFeature=null,this.cellKeyboardListenerFeature=null,this.suppressRefreshCell=!1,this.onCellCompAttachedFuncs=[],this.column=t,this.rowNode=i,this.beans=s,this.rowCtrl=o,this.instanceId=t.getId()+"-"+Sp++,this.colIdSanitised=he(this.column.getId()),s.gos.get("suppressCellFocus")||(this.tabIndex=-1),this.createCellPosition(),this.addFeatures(),this.updateAndFormatValue(!1);}shouldRestoreFocus(){return this.beans.focusService.shouldRestoreFocus(this.cellPosition);}addFeatures(){this.cellPositionFeature=new rp(this,this.beans),this.addDestroyFunc(()=>{var i;null==(i=this.cellPositionFeature)||i.destroy(),this.cellPositionFeature=null;}),this.cellCustomStyleFeature=new np(this,this.beans),this.addDestroyFunc(()=>{var i;null==(i=this.cellCustomStyleFeature)||i.destroy(),this.cellCustomStyleFeature=null;}),this.cellMouseListenerFeature=new lp(this,this.beans,this.column),this.addDestroyFunc(()=>{var i;null==(i=this.cellMouseListenerFeature)||i.destroy(),this.cellMouseListenerFeature=null;}),this.cellKeyboardListenerFeature=new ap(this,this.beans,this.column,this.rowNode,this.rowCtrl),this.addDestroyFunc(()=>{var i;null==(i=this.cellKeyboardListenerFeature)||i.destroy(),this.cellKeyboardListenerFeature=null;}),this.column.isTooltipEnabled()&&(this.enableTooltipFeature(),this.addDestroyFunc(()=>{this.disableTooltipFeature();})),this.beans.rangeService&&this.beans.gos.get("enableRangeSelection")&&(this.cellRangeFeature=new class{constructor(e,t){this.beans=e,this.rangeService=e.rangeService,this.selectionHandleFactory=e.selectionHandleFactory,this.cellCtrl=t;}setComp(e,t){this.cellComp=e,this.eGui=t,this.onRangeSelectionChanged();}onRangeSelectionChanged(){this.cellComp&&(this.rangeCount=this.rangeService.getCellRangeCount(this.cellCtrl.getCellPosition()),this.hasChartRange=this.getHasChartRange(),this.cellComp.addOrRemoveCssClass(io,0!==this.rangeCount),this.cellComp.addOrRemoveCssClass(`${io}-1`,1===this.rangeCount),this.cellComp.addOrRemoveCssClass(`${io}-2`,2===this.rangeCount),this.cellComp.addOrRemoveCssClass(`${io}-3`,3===this.rangeCount),this.cellComp.addOrRemoveCssClass(`${io}-4`,this.rangeCount>=4),this.cellComp.addOrRemoveCssClass("ag-cell-range-chart",this.hasChartRange),qi(this.eGui,this.rangeCount>0||void 0),this.cellComp.addOrRemoveCssClass("ag-cell-range-single-cell",this.isSingleCell()),this.updateRangeBorders(),this.refreshHandle());}updateRangeBorders(){const e=this.getRangeBorders(),t=this.isSingleCell(),s=!t&&e.right,o=!t&&e.bottom,r=!t&&e.left;this.cellComp.addOrRemoveCssClass("ag-cell-range-top",!t&&e.top),this.cellComp.addOrRemoveCssClass("ag-cell-range-right",s),this.cellComp.addOrRemoveCssClass("ag-cell-range-bottom",o),this.cellComp.addOrRemoveCssClass("ag-cell-range-left",r);}isSingleCell(){const{rangeService:e}=this.beans;return 1===this.rangeCount&&!!e&&!e.isMoreThanOneCell();}getHasChartRange(){const{rangeService:e}=this.beans;if(!this.rangeCount||!e)return!1;const t=e.getCellRanges();return t.length>0&&t.every(i=>ze([1,0],i.type));}updateRangeBordersIfRangeCount(){this.rangeCount>0&&(this.updateRangeBorders(),this.refreshHandle());}getRangeBorders(){const e=this.beans.gos.get("enableRtl");let t=!1,i=!1,s=!1,o=!1;const r=this.cellCtrl.getCellPosition().column,n=this.beans.columnModel;let l,a;e?(l=n.getDisplayedColAfter(r),a=n.getDisplayedColBefore(r)):(l=n.getDisplayedColBefore(r),a=n.getDisplayedColAfter(r));const u=this.rangeService.getCellRanges().filter(h=>this.rangeService.isCellInSpecificRange(this.cellCtrl.getCellPosition(),h));l||(o=!0),a||(i=!0);for(let h=0;h<u.length&&!(t&&i&&s&&o);h++){const p=u[h],f=this.rangeService.getRangeStartRow(p),m=this.rangeService.getRangeEndRow(p);!t&&this.beans.rowPositionUtils.sameRow(f,this.cellCtrl.getCellPosition())&&(t=!0),!s&&this.beans.rowPositionUtils.sameRow(m,this.cellCtrl.getCellPosition())&&(s=!0),!o&&l&&p.columns.indexOf(l)<0&&(o=!0),!i&&a&&p.columns.indexOf(a)<0&&(i=!0);}return{top:t,right:i,bottom:s,left:o};}
1refreshHandle(){if(this.beans.context.isDestroyed())return;const e=this.shouldHaveSelectionHandle();this.selectionHandle&&!e&&(this.selectionHandle=this.beans.context.destroyBean(this.selectionHandle)),e&&this.addSelectionHandle(),this.cellComp.addOrRemoveCssClass("ag-cell-range-handle",!!this.selectionHandle);}shouldHaveSelectionHandle(){const e=this.beans.gos,t=this.rangeService.getCellRanges(),i=t.length;if(this.rangeCount<1||i<1)return!1;const s=Y(t),o=this.cellCtrl.getCellPosition(),r=e.get("enableFillHandle")&&!this.cellCtrl.isSuppressFillHandle(),n=e.get("enableRangeHandle");let l=1===i&&!this.cellCtrl.isEditing()&&(r||n);if(this.hasChartRange){const u=1===t[0].type&&this.rangeService.isCellInSpecificRange(o,t[0]);this.cellComp.addOrRemoveCssClass("ag-cell-range-chart-category",u),l=0===s.type;}return l&&null!=s.endRow&&this.rangeService.isContiguousRange(s)&&this.rangeService.isBottomRightCell(s,o);}addSelectionHandle(){const e=this.beans.gos,t=Y(this.rangeService.getCellRanges()).type,s=e.get("enableFillHandle")&&_(t)?0:1;this.selectionHandle&&this.selectionHandle.getType()!==s&&(this.selectionHandle=this.beans.context.destroyBean(this.selectionHandle)),this.selectionHandle||(this.selectionHandle=this.selectionHandleFactory.createSelectionHandle(s)),this.selectionHandle.refresh(this.cellCtrl);}destroy(){this.beans.context.destroyBean(this.selectionHandle);}}(this.beans,this),this.addDestroyFunc(()=>{var i;null==(i=this.cellRangeFeature)||i.destroy(),this.cellRangeFeature=null;}));}enableTooltipFeature(t,i){const o="whenTruncated"===this.beans.gos.get("tooltipShowMode");!i&&o&&!this.isCellRenderer()&&(i=()=>{const n=this.getGui(),l=0===n.children.length?n:n.querySelector(".ag-cell-value");return!l||l.scrollWidth>l.clientWidth;}),this.tooltipFeature=new mt({getColumn:()=>this.column,getColDef:()=>this.column.getColDef(),getRowIndex:()=>this.cellPosition.rowIndex,getRowNode:()=>this.rowNode,getGui:()=>this.getGui(),getLocation:()=>"cell",getTooltipValue:null!=t?()=>t:()=>{const n=this.column.getColDef(),l=this.rowNode.data;if(n.tooltipField&&y(l))return Ui(l,n.tooltipField,this.column.isTooltipFieldContainsDots());const a=n.tooltipValueGetter;return a?a(this.beans.gos.addGridCommonParams({location:"cell",colDef:this.column.getColDef(),column:this.column,rowIndex:this.cellPosition.rowIndex,node:this.rowNode,data:this.rowNode.data,value:this.value,valueFormatted:this.valueFormatted})):null;},getValueFormatted:()=>this.valueFormatted,shouldDisplayTooltip:i},this.beans);}disableTooltipFeature(){this.tooltipFeature&&(this.tooltipFeature.destroy(),this.tooltipFeature=null);}setComp(t,i,s,o,r){var n,l,a,u;this.cellComp=t,this.eGui=i,this.printLayout=o,this.addDomData(),this.onCellFocused(this.focusEventToRestore),this.applyStaticCssClasses(),this.setWrapText(),this.onFirstRightPinnedChanged(),this.onLastLeftPinnedChanged(),this.onColumnHover(),this.setupControlComps(),this.setupAutoHeight(s),this.refreshFirstAndLastStyles(),this.refreshAriaColIndex(),null==(n=this.cellPositionFeature)||n.setComp(i),null==(l=this.cellCustomStyleFeature)||l.setComp(t),null==(a=this.tooltipFeature)||a.refreshToolTip(),null==(u=this.cellKeyboardListenerFeature)||u.setComp(this.eGui),this.cellRangeFeature&&this.cellRangeFeature.setComp(t,i),r&&this.isCellEditable()?this.startEditing():this.showValue(),this.onCellCompAttachedFuncs.length&&(this.onCellCompAttachedFuncs.forEach(h=>h()),this.onCellCompAttachedFuncs=[]);}setupAutoHeight(t){if(this.isAutoHeight=this.column.isAutoHeight(),!this.isAutoHeight||!t)return;const i=t.parentElement,s=this.beans.gos.getRowHeightForNode(this.rowNode).height,o=l=>{if(this.editing||!this.isAlive())return;const{paddingTop:a,paddingBottom:u,borderBottomWidth:h,borderTopWidth:p}=Wt(i),v=t.offsetHeight+(a+u+h+p);if(l<5){const S=this.beans.gos.getDocument();if(!S||!S.contains(t)||0==v)return void window.setTimeout(()=>o(l+1),0);}const w=Math.max(v,s);this.rowNode.setRowAutoHeight(w,this.column);},r=()=>o(0);r();const n=this.beans.resizeObserverService.observeResize(t,r);this.addDestroyFunc(()=>{n(),this.rowNode.setRowAutoHeight(void 0,this.column);});}getCellAriaRole(){var t;return null!=(t=this.column.getColDef().cellAriaRole)?t:"gridcell";}getInstanceId(){return this.instanceId;}getColumnIdSanitised(){return this.colIdSanitised;}getTabIndex(){return this.tabIndex;}isCellRenderer(){const t=this.column.getColDef();return null!=t.cellRenderer||null!=t.cellRendererSelector;}getValueToDisplay(){var t;return null!=(t=this.valueFormatted)?t:this.value;}showValue(t=!1){var i;const s=this.getValueToDisplay();let o;if(this.rowNode.stub){const r=this.createCellRendererParams();o=this.beans.userComponentFactory.getLoadingCellRendererDetails(this.column.getColDef(),r);}else if(this.isCellRenderer()){const r=this.createCellRendererParams();o=this.beans.userComponentFactory.getCellRendererDetails(this.column.getColDef(),r);}this.cellComp.setRenderDetails(o,s,t),null==(i=this.cellRangeFeature)||i.refreshHandle();}setupControlComps(){const t=this.column.getColDef();this.includeSelection=this.isIncludeControl(t.checkboxSelection),this.includeRowDrag=this.isIncludeControl(t.rowDrag),this.includeDndSource=this.isIncludeControl(t.dndSource),this.cellComp.setIncludeSelection(this.includeSelection),this.cellComp.setIncludeDndSource(this.includeDndSource),this.cellComp.setIncludeRowDrag(this.includeRowDrag);}isForceWrapper(){return this.beans.gos.get("enableCellTextSelection")||this.column.isAutoHeight();}isIncludeControl(t){return null==this.rowNode.rowPinned&&("function"==typeof t||!0===t);}refreshShouldDestroy(){const t=this.column.getColDef(),i=this.includeSelection!=this.isIncludeControl(t.checkboxSelection),s=this.includeRowDrag!=this.isIncludeControl(t.rowDrag),o=this.includeDndSource!=this.isIncludeControl(t.dndSource),r=this.isAutoHeight!=this.column.isAutoHeight();return i||s||o||r;}startEditing(t=null,i=!1,s=null){if(!this.isCellEditable()||this.editing)return;if(!this.cellComp)return void this.onCellCompAttachedFuncs.push(()=>{this.startEditing(t,i,s);});const o=this.createCellEditorParams(t,i),r=this.column.getColDef(),n=this.beans.userComponentFactory.getCellEditorDetails(r,o);
1this.editCompDetails=n;const l=null!=n?.popupFromSelector?n.popupFromSelector:!!r.cellEditorPopup,a=null!=n?.popupPositionFromSelector?n.popupPositionFromSelector:r.cellEditorPopupPosition;this.setEditing(!0),this.cellComp.setEditDetails(n,l,a,this.beans.gos.get("reactiveCustomComponents"));const u=this.createEvent(s,c.EVENT_CELL_EDITING_STARTED);this.beans.eventService.dispatchEvent(u);}setEditing(t){var i;this.editing!==t&&(this.editing=t,null==(i=this.cellRangeFeature)||i.refreshHandle());}stopRowOrCellEdit(t=!1){"fullRow"===this.beans.gos.get("editType")?this.rowCtrl.stopEditing(t):this.stopEditing(t);}onPopupEditorClosed(){this.isEditing()&&this.stopEditingAndFocus();}takeValueFromCellEditor(t){const i={newValueExists:!1};if(t)return i;const s=this.cellComp.getCellEditor();return!s||s.isCancelAfterEnd&&s.isCancelAfterEnd()?i:{newValue:s.getValue(),newValueExists:!0};}saveNewValue(t,i){if(i===t)return!1;this.suppressRefreshCell=!0;const s=this.rowNode.setDataValue(this.column,i,"edit");return this.suppressRefreshCell=!1,s;}stopEditing(t=!1){if(!this.editing)return!1;const{newValue:i,newValueExists:s}=this.takeValueFromCellEditor(t),o=this.rowNode.getValueFromValueService(this.column);let r=!1;return s&&(r=this.saveNewValue(o,i)),this.setEditing(!1),this.cellComp.setEditDetails(),this.editCompDetails=void 0,this.updateAndFormatValue(!1),this.refreshCell({forceRefresh:!0,suppressFlash:!0}),this.dispatchEditingStoppedEvent(o,i,!t&&!!r),r;}dispatchEditingStoppedEvent(t,i,s){const o=x(M({},this.createEvent(null,c.EVENT_CELL_EDITING_STOPPED)),{oldValue:t,newValue:i,valueChanged:s});this.beans.eventService.dispatchEvent(o);}createCellEditorParams(t,i){return this.beans.gos.addGridCommonParams({value:this.rowNode.getValueFromValueService(this.column),eventKey:t,column:this.column,colDef:this.column.getColDef(),rowIndex:this.getCellPosition().rowIndex,node:this.rowNode,data:this.rowNode.data,cellStartedEdit:i,onKeyDown:this.onKeyDown.bind(this),stopEditing:this.stopEditingAndFocus.bind(this),eGridCell:this.getGui(),parseValue:this.parseValue.bind(this),formatValue:this.formatValue.bind(this)});}createCellRendererParams(){return this.beans.gos.addGridCommonParams({value:this.value,valueFormatted:this.valueFormatted,getValue:()=>this.rowNode.getValueFromValueService(this.column),setValue:i=>this.beans.valueService.setValue(this.rowNode,this.column,i),formatValue:this.formatValue.bind(this),data:this.rowNode.data,node:this.rowNode,pinned:this.column.getPinned(),colDef:this.column.getColDef(),column:this.column,rowIndex:this.getCellPosition().rowIndex,refreshCell:this.refreshCell.bind(this),eGridCell:this.getGui(),eParentOfValue:this.cellComp.getParentOfValue(),registerRowDragger:(i,s,o,r)=>this.registerRowDragger(i,s,r),setTooltip:(i,s)=>{var o;this.tooltipFeature&&this.disableTooltipFeature(),this.enableTooltipFeature(i,s),null==(o=this.tooltipFeature)||o.refreshToolTip();}});}parseValue(t){return this.beans.valueService.parseValue(this.column,this.rowNode,t,this.getValue());}setFocusOutOnEditor(){if(!this.editing)return;const t=this.cellComp.getCellEditor();t&&t.focusOut&&t.focusOut();}setFocusInOnEditor(){if(!this.editing)return;const t=this.cellComp.getCellEditor();t&&t.focusIn?t.focusIn():this.focusCell(!0);}onCellChanged(t){t.column===this.column&&this.refreshCell({});}refreshOrDestroyCell(t){var i;this.refreshShouldDestroy()?null==(i=this.rowCtrl)||i.recreateCell(this):this.refreshCell(t);}refreshCell(t){var i,s,o,r;if(this.suppressRefreshCell||this.editing)return;const n=this.column.getColDef(),l=null!=t&&!!t.newData,a=null!=t&&!!t.suppressFlash||!!n.suppressCellFlash,h=t&&t.forceRefresh||null==n.field&&null==n.valueGetter&&null==n.showRowGroup||l,p=!!this.cellComp,f=this.updateAndFormatValue(p);if(p){if(h||f){this.showValue(l);const v=this.beans.filterManager.isSuppressFlashingCellsBecauseFiltering();!a&&!v&&(this.beans.gos.get("enableCellChangeFlash")||n.enableCellChangeFlash)&&this.flashCell(),null==(i=this.cellCustomStyleFeature)||i.applyUserStyles(),null==(s=this.cellCustomStyleFeature)||s.applyClassesFromColDef();}null==(o=this.tooltipFeature)||o.refreshToolTip(),null==(r=this.cellCustomStyleFeature)||r.applyCellClassRules();}}stopEditingAndFocus(t=!1,i=!1){this.stopRowOrCellEdit(),this.focusCell(!0),t||this.navigateAfterEdit(i);}navigateAfterEdit(t){this.beans.gos.get("enterNavigatesVerticallyAfterEdit")&&this.beans.navigationService.navigateToNextCell(null,t?C.UP:C.DOWN,this.getCellPosition(),!1);}flashCell(t){var i,s;const o=null!=(i=t?.flashDuration)?i:t?.flashDelay,r=null!=(s=t?.fadeDuration)?s:t?.fadeDelay;this.animateCell("data-changed",o,r);}animateCell(t,i,s){if(!this.cellComp)return;const o=`ag-cell-${t}`,r=`ag-cell-${t}-animation`,{gos:n}=this.beans;i||(i=n.get("cellFlashDuration")),y(s)||(s=n.get("cellFadeDuration")),this.cellComp.addOrRemoveCssClass(o,!0),this.cellComp.addOrRemoveCssClass(r,!1),this.beans.frameworkOverrides.wrapIncoming(()=>{window.setTimeout(()=>{this.isAlive()&&(this.cellComp.addOrRemoveCssClass(o,!1),this.cellComp.addOrRemoveCssClass(r,!0),this.eGui.style.transition=`background-color ${s}ms`,window.setTimeout(()=>{this.isAlive()&&(this.cellComp.addOrRemoveCssClass(r,!1),this.eGui.style.transition="");},s));},i);});}onFlashCells(t){if(!this.cellComp)return;const i=this.beans.cellPositionUtils.createId(this.getCellPosition());t.cells[i]&&this.animateCell("highlight");}isCellEditable(){return this.column.isCellEditable(this.rowNode);}isSuppressFillHandle(){return this.column.isSuppressFillHandle();}formatValue(t){var i;return null!=(i=this.callValueFormatter(t))?i:t;}callValueFormatter(t){return this.beans.valueService.formatValue(this.column,this.rowNode,t);}updateAndFormatValue(t){const i=this.value,s=this.valueFormatted;return this.value=this.rowNode.getValueFromValueService(this.column),this.valueFormatted=this.callValueFormatter(this.value),!t||!this.valuesAreEqual(i,this.value)||this.valueFormatted!=s;}valuesAreEqual(t,i){const s=this.column.getColDef();return s.equals?s.equals(t,i):t===i;}getComp(){return this.cellComp;}getValue(){return this.value;}addDomData(){const t=this.getGui();this.beans.gos.setDomData(t,Ul.DOM_DATA_KEY_CELL_CTRL,this),this.addDestroyFunc(()=>this.beans.gos.setDomData(t,Ul.DOM_DATA_KEY_CELL_CTRL,null));}createEvent(t,i){return this.beans.gos.addGridCommonParams({type:i,node:this.rowNode,data:this.rowNode.data,value:this.value,column:this.column,colDef:this.column.getColDef(),rowPinned:this.rowNode.rowPinned,event:t,rowIndex:this.rowNode.rowIndex});}processCharacter(t){var i;null==(i=this.cellKeyboardListenerFeature)||i.processCharacter(t);}onKeyDown(t){var i;null==(i=this.cellKeyboardListenerFeature)||i.onKeyDown(t);}onMouseEvent(t,i){var s;null==(s=this.cellMouseListenerFeature)||s.onMouseEvent(t,i);}getGui(){return this.eGui;}
1getColSpanningList(){return this.cellPositionFeature.getColSpanningList();}onLeftChanged(){var t;this.cellComp&&(null==(t=this.cellPositionFeature)||t.onLeftChanged());}onDisplayedColumnsChanged(){this.eGui&&(this.refreshAriaColIndex(),this.refreshFirstAndLastStyles());}refreshFirstAndLastStyles(){const{cellComp:t,column:i,beans:s}=this;so.refreshFirstAndLastStyles(t,i,s.columnModel);}refreshAriaColIndex(){const t=this.beans.columnModel.getAriaColumnIndex(this.column);vn(this.getGui(),t);}isSuppressNavigable(){return this.column.isSuppressNavigable(this.rowNode);}onWidthChanged(){var t;return null==(t=this.cellPositionFeature)?void 0:t.onWidthChanged();}getColumn(){return this.column;}getRowNode(){return this.rowNode;}isPrintLayout(){return this.printLayout;}getCellPosition(){return this.cellPosition;}isEditing(){return this.editing;}startRowOrCellEdit(t,i=null){this.cellComp?"fullRow"===this.beans.gos.get("editType")?this.rowCtrl.startRowEditing(t,this):this.startEditing(t,!0,i):this.onCellCompAttachedFuncs.push(()=>{this.startRowOrCellEdit(t,i);});}getRowCtrl(){return this.rowCtrl;}getRowPosition(){return{rowIndex:this.cellPosition.rowIndex,rowPinned:this.cellPosition.rowPinned};}updateRangeBordersIfRangeCount(){this.cellComp&&this.cellRangeFeature&&this.cellRangeFeature.updateRangeBordersIfRangeCount();}onRangeSelectionChanged(){this.cellComp&&this.cellRangeFeature&&this.cellRangeFeature.onRangeSelectionChanged();}isRangeSelectionEnabled(){return null!=this.cellRangeFeature;}focusCell(t=!1){this.beans.focusService.setFocusedCell({rowIndex:this.getCellPosition().rowIndex,column:this.column,rowPinned:this.rowNode.rowPinned,forceBrowserFocus:t});}onRowIndexChanged(){this.createCellPosition(),this.onCellFocused(),this.cellRangeFeature&&this.cellRangeFeature.onRangeSelectionChanged();}onFirstRightPinnedChanged(){if(!this.cellComp)return;const t=this.column.isFirstRightPinned();this.cellComp.addOrRemoveCssClass("ag-cell-first-right-pinned",t);}onLastLeftPinnedChanged(){if(!this.cellComp)return;const t=this.column.isLastLeftPinned();this.cellComp.addOrRemoveCssClass("ag-cell-last-left-pinned",t);}onCellFocused(t){if(this.beans.gos.get("suppressCellFocus"))return;const i=this.beans.focusService.isCellFocused(this.cellPosition);if(!this.cellComp)return void(i&&t?.forceBrowserFocus&&(this.focusEventToRestore=t));this.focusEventToRestore=void 0,this.cellComp.addOrRemoveCssClass("ag-cell-focus",i),i&&t&&t.forceBrowserFocus&&this.cellComp.getFocusableElement().focus({preventScroll:!!t.preventScrollOnBrowserFocus});const s="fullRow"===this.beans.gos.get("editType");!i&&!s&&this.editing&&this.stopRowOrCellEdit(),i&&this.rowCtrl.announceDescription();}createCellPosition(){this.cellPosition={rowIndex:this.rowNode.rowIndex,rowPinned:ot(this.rowNode.rowPinned),column:this.column};}applyStaticCssClasses(){this.cellComp.addOrRemoveCssClass("ag-cell",!0),this.cellComp.addOrRemoveCssClass("ag-cell-not-inline-editing",!0);const t=1==this.column.isAutoHeight();this.cellComp.addOrRemoveCssClass("ag-cell-auto-height",t),this.cellComp.addOrRemoveCssClass("ag-cell-normal-height",!t);}onColumnHover(){if(!this.cellComp||!this.beans.gos.get("columnHoverHighlight"))return;const t=this.beans.columnHoverService.isHovered(this.column);this.cellComp.addOrRemoveCssClass("ag-column-hover",t);}onColDefChanged(){if(this.cellComp)if(this.column.isTooltipEnabled()?(this.disableTooltipFeature(),this.enableTooltipFeature()):this.disableTooltipFeature(),this.setWrapText(),this.editing){const i=this.getCellEditor();if(i?.refresh){const{eventKey:s,cellStartedEdit:o}=this.editCompDetails.params,r=this.createCellEditorParams(s,o),n=this.column.getColDef(),l=this.beans.userComponentFactory.getCellEditorDetails(n,r);i.refresh(l.params);}}else this.refreshOrDestroyCell({forceRefresh:!0,suppressFlash:!0});}setWrapText(){const t=1==this.column.getColDef().wrapText;this.cellComp.addOrRemoveCssClass("ag-cell-wrap-text",t);}dispatchCellContextMenuEvent(t){const i=this.column.getColDef(),s=this.createEvent(t,c.EVENT_CELL_CONTEXT_MENU);this.beans.eventService.dispatchEvent(s),i.onCellContextMenu&&window.setTimeout(()=>{this.beans.frameworkOverrides.wrapOutgoing(()=>{i.onCellContextMenu(s);});},0);}getCellRenderer(){return this.cellComp?this.cellComp.getCellRenderer():null;}getCellEditor(){return this.cellComp?this.cellComp.getCellEditor():null;}destroy(){this.onCellCompAttachedFuncs=[],super.destroy();}createSelectionCheckbox(){const t=new Js();return this.beans.context.createBean(t),t.init({rowNode:this.rowNode,column:this.column}),t;}createDndSource(){const t=new qd(this.rowNode,this.column,this.eGui);return this.beans.context.createBean(t),t;}registerRowDragger(t,i,s){if(this.customRowDragComp)return void this.customRowDragComp.setDragElement(t,i);const o=this.createRowDragComp(t,i,s);o&&(this.customRowDragComp=o,this.addDestroyFunc(()=>{this.beans.context.destroyBean(o),this.customRowDragComp=null;}));}createRowDragComp(t,i,s){const o=this.beans.gos.get("pagination"),r=this.beans.gos.get("rowDragManaged"),n=this.beans.gos.isRowModelType("clientSide");if(r){if(!n)return void O("managed row dragging is only allowed in the Client Side Row Model");if(o)return void O("managed row dragging is not possible when doing pagination");}const l=new mi(()=>this.value,this.rowNode,this.column,t,i,s);return this.beans.context.createBean(l),l;}};Qd.DOM_DATA_KEY_CELL_CTRL="cellCtrl";var $t=Qd,Ep=0,Xd=class zl extends R{constructor(t,i,s,o,r){super(),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.businessKeySanitised=null,this.beans=i,this.gos=i.gos,this.rowNode=t,this.paginationPage=i.paginationProxy.getCurrentPage(),this.useAnimationFrameForCreate=o,this.printLayout=r,this.suppressRowTransform=this.gos.get("suppressRowTransform"),this.instanceId=t.id+"-"+Ep++,this.rowId=he(t.id),this.initRowBusinessKey(),this.rowFocused=i.focusService.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned),this.rowLevel=i.rowCssClassCalculator.calculateRowLevel(this.rowNode),this.setRowType(),this.setAnimateFlags(s),this.rowStyles=this.processStylesFromGridOptions(),this.isFullWidth()&&!this.gos.get("suppressCellFocus")&&(this.tabIndex=-1),this.addListeners();}initRowBusinessKey(){this.businessKeyForNodeFunc=this.gos.get("getBusinessKeyForNode"),this.updateRowBusinessKey();}updateRowBusinessKey(){if("function"!=typeof this.businessKeyForNodeFunc)return;const t=this.businessKeyForNodeFunc(this.rowNode);this.businessKeySanitised=he(t);}getRowId(){return this.rowId;}getRowStyles(){return this.rowStyles;}getTabIndex(){return this.tabIndex;}isSticky(){return this.rowNode.sticky;}getInstanceId(){return this.instanceId;}
1setComp(t,i,s){const o={rowComp:t,element:i,containerType:s};this.allRowGuis.push(o),"left"===s?this.leftGui=o:"right"===s?this.rightGui=o:"fullWidth"===s?this.fullWidthGui=o:this.centerGui=o,this.initialiseRowComp(o),"FullWidthLoading"!==this.rowType&&!this.rowNode.rowPinned&&this.beans.rowRenderer.dispatchFirstDataRenderedEvent();}unsetComp(t){switch(this.allRowGuis=this.allRowGuis.filter(i=>i.containerType!==t),t){case"left":this.leftGui=void 0;break;case"right":this.rightGui=void 0;break;case"fullWidth":this.fullWidthGui=void 0;break;case"center":this.centerGui=void 0;}}isCacheable(){return"FullWidthDetail"===this.rowType&&this.gos.get("keepDetailRows");}setCached(t){const i=t?"none":"";this.allRowGuis.forEach(s=>s.element.style.display=i);}initialiseRowComp(t){const i=this.gos;this.listenOnDomOrder(t),this.beans.columnModel.wasAutoRowHeightEverActive()&&this.rowNode.checkAutoHeights(),this.onRowHeightChanged(t),this.updateRowIndexes(t),this.setFocusedClasses(t),this.setStylesFromGridOptions(!1,t),i.isRowSelection()&&this.rowNode.selectable&&this.onRowSelected(t),this.updateColumnLists(!this.useAnimationFrameForCreate);const s=t.rowComp;this.getInitialRowClasses(t.containerType).forEach(r=>s.addOrRemoveCssClass(r,!0)),this.executeSlideAndFadeAnimations(t),this.rowNode.group&&Ft(t.element,1==this.rowNode.expanded),this.setRowCompRowId(s),this.setRowCompRowBusinessKey(s),i.setDomData(t.element,zl.DOM_DATA_KEY_ROW_CTRL,this),this.addDestroyFunc(()=>i.setDomData(t.element,zl.DOM_DATA_KEY_ROW_CTRL,null)),this.useAnimationFrameForCreate?this.beans.animationFrameService.createTask(this.addHoverFunctionality.bind(this,t.element),this.rowNode.rowIndex,"createTasksP2"):this.addHoverFunctionality(t.element),this.isFullWidth()&&this.setupFullWidth(t),i.get("rowDragEntireRow")&&this.addRowDraggerToRow(t),this.useAnimationFrameForCreate&&this.beans.animationFrameService.addDestroyTask(()=>{this.isAlive()&&t.rowComp.addOrRemoveCssClass("ag-after-created",!0);}),this.executeProcessRowPostCreateFunc();}setRowCompRowBusinessKey(t){null!=this.businessKeySanitised&&t.setRowBusinessKey(this.businessKeySanitised);}getBusinessKey(){return this.businessKeySanitised;}setRowCompRowId(t){this.rowId=he(this.rowNode.id),null!=this.rowId&&t.setRowId(this.rowId);}executeSlideAndFadeAnimations(t){const{containerType:i}=t;this.slideInAnimation[i]&&(Zr(()=>{this.onTopChanged();}),this.slideInAnimation[i]=!1),this.fadeInAnimation[i]&&(Zr(()=>{t.rowComp.addOrRemoveCssClass("ag-opacity-zero",!1);}),this.fadeInAnimation[i]=!1);}addRowDraggerToRow(t){if(this.gos.get("enableRangeSelection"))return void O("Setting `rowDragEntireRow: true` in the gridOptions doesn't work with `enableRangeSelection: true`");const i=this.beans.localeService.getLocaleTextFunc(),s=new mi(()=>`1 ${i("rowDragRow","row")}`,this.rowNode,void 0,t.element,void 0,!0),o=this.createBean(s,this.beans.context);this.rowDragComps.push(o);}setupFullWidth(t){const i=this.getPinnedForContainer(t.containerType);if("FullWidthDetail"==this.rowType&&!q.__assertRegistered("@ag-grid-enterprise/master-detail","cell renderer 'agDetailCellRenderer' (for master detail)",this.beans.context.getGridId()))return;const s=this.createFullWidthCompDetails(t.element,i);t.rowComp.showFullWidth(s);}isPrintLayout(){return this.printLayout;}getFullWidthCellRenderers(){var t,i;return this.gos.get("embedFullWidthRows")?this.allRowGuis.map(s=>{var o;return null==(o=s?.rowComp)?void 0:o.getFullWidthCellRenderer();}):[null==(i=null==(t=this.fullWidthGui)?void 0:t.rowComp)?void 0:i.getFullWidthCellRenderer()];}getCellElement(t){const i=this.getCellCtrl(t);return i?i.getGui():null;}executeProcessRowPostCreateFunc(){const t=this.gos.getCallback("processRowPostCreate");t&&this.areAllContainersReady()&&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)});}areAllContainersReady(){const t=!!this.leftGui||!this.beans.columnModel.isPinningLeft(),i=!!this.centerGui,s=!!this.rightGui||!this.beans.columnModel.isPinningRight();return t&&i&&s;}setRowType(){const t=this.rowNode.stub&&!this.gos.get("suppressServerSideFullWidthLoadingRow"),i=this.rowNode.isFullWidthCell(),s=this.gos.get("masterDetail")&&this.rowNode.detail,o=this.beans.columnModel.isPivotMode(),n=!!this.rowNode.group&&!this.rowNode.footer&&this.gos.isGroupUseEntireRow(o);this.rowType=t?"FullWidthLoading":s?"FullWidthDetail":i?"FullWidth":n?"FullWidthGroup":"Normal";}updateColumnLists(t=!1,i=!1){this.isFullWidth()||(t||this.gos.get("suppressAnimationFrame")||this.printLayout?this.updateColumnListsImpl(i):this.updateColumnListsPending||(this.beans.animationFrameService.createTask(()=>{this.active&&this.updateColumnListsImpl(!0);},this.rowNode.rowIndex,"createTasksP1"),this.updateColumnListsPending=!0));}createCellCtrls(t,i,s=null){const o={list:[],map:{}},r=(n,l)=>{o.list.push(l),o.map[n]=l;};
1return i.forEach(n=>{const l=n.getInstanceId();let a=t.map[l];a||(a=new $t(n,this.rowNode,this.beans,this)),r(l,a);}),t.list.forEach(n=>{null==o.map[n.getColumn().getInstanceId()]&&(this.isCellEligibleToBeRemoved(n,s)?n.destroy():r(n.getColumn().getInstanceId(),n));}),o;}updateColumnListsImpl(t){this.updateColumnListsPending=!1,this.createAllCellCtrls(),this.setCellCtrls(t);}setCellCtrls(t){this.allRowGuis.forEach(i=>{const s=this.getCellCtrlsForContainer(i.containerType);i.rowComp.setCellCtrls(s,t);});}getCellCtrlsForContainer(t){switch(t){case"left":return this.leftCellCtrls.list;case"right":return this.rightCellCtrls.list;case"fullWidth":return[];case"center":return this.centerCellCtrls.list;default:throw new Error(`Unhandled case: ${t}`);}}createAllCellCtrls(){const t=this.beans.columnModel;if(this.printLayout)this.centerCellCtrls=this.createCellCtrls(this.centerCellCtrls,t.getAllDisplayedColumns()),this.leftCellCtrls={list:[],map:{}},this.rightCellCtrls={list:[],map:{}};else{const i=t.getViewportCenterColumnsForRow(this.rowNode);this.centerCellCtrls=this.createCellCtrls(this.centerCellCtrls,i);const s=t.getDisplayedLeftColumnsForRow(this.rowNode);this.leftCellCtrls=this.createCellCtrls(this.leftCellCtrls,s,"left");const o=t.getDisplayedRightColumnsForRow(this.rowNode);this.rightCellCtrls=this.createCellCtrls(this.rightCellCtrls,o,"right");}}isCellEligibleToBeRemoved(t,i){if(t.getColumn().getPinned()!=i)return!0;const n=t.isEditing(),l=this.beans.focusService.isCellFocused(t.getCellPosition());if(n||l){const u=t.getColumn();return!(this.beans.columnModel.getAllDisplayedColumns().indexOf(u)>=0);}return!0;}getDomOrder(){return this.gos.get("ensureDomOrder")||this.gos.isDomLayout("print");}listenOnDomOrder(t){const i=()=>{t.rowComp.setDomOrder(this.getDomOrder());};this.addManagedPropertyListener("domLayout",i),this.addManagedPropertyListener("ensureDomOrder",i);}setAnimateFlags(t){if(this.isSticky()||!t)return;const i=y(this.rowNode.oldRowTop),s=this.beans.columnModel.isPinningLeft(),o=this.beans.columnModel.isPinningRight();if(i){if(this.isFullWidth()&&!this.gos.get("embedFullWidthRows"))return void(this.slideInAnimation.fullWidth=!0);this.slideInAnimation.center=!0,this.slideInAnimation.left=s,this.slideInAnimation.right=o;}else{if(this.isFullWidth()&&!this.gos.get("embedFullWidthRows"))return void(this.fadeInAnimation.fullWidth=!0);this.fadeInAnimation.center=!0,this.fadeInAnimation.left=s,this.fadeInAnimation.right=o;}}isEditing(){return this.editingRow;}isFullWidth(){return"Normal"!==this.rowType;}refreshFullWidth(){const t=(l,a)=>!l||l.rowComp.refreshFullWidth(()=>this.createFullWidthCompDetails(l.element,a).params),i=t(this.fullWidthGui,null),s=t(this.centerGui,null),o=t(this.leftGui,"left"),r=t(this.rightGui,"right");return i&&s&&o&&r;}addListeners(){this.addManagedListener(this.rowNode,W.EVENT_HEIGHT_CHANGED,()=>this.onRowHeightChanged()),this.addManagedListener(this.rowNode,W.EVENT_ROW_SELECTED,()=>this.onRowSelected()),this.addManagedListener(this.rowNode,W.EVENT_ROW_INDEX_CHANGED,this.onRowIndexChanged.bind(this)),this.addManagedListener(this.rowNode,W.EVENT_TOP_CHANGED,this.onTopChanged.bind(this)),this.addManagedListener(this.rowNode,W.EVENT_EXPANDED_CHANGED,this.updateExpandedCss.bind(this)),this.addManagedListener(this.rowNode,W.EVENT_HAS_CHILDREN_CHANGED,this.updateExpandedCss.bind(this)),this.rowNode.detail&&this.addManagedListener(this.rowNode.parent,W.EVENT_DATA_CHANGED,this.onRowNodeDataChanged.bind(this)),this.addManagedListener(this.rowNode,W.EVENT_DATA_CHANGED,this.onRowNodeDataChanged.bind(this)),this.addManagedListener(this.rowNode,W.EVENT_CELL_CHANGED,this.postProcessCss.bind(this)),this.addManagedListener(this.rowNode,W.EVENT_HIGHLIGHT_CHANGED,this.onRowNodeHighlightChanged.bind(this)),this.addManagedListener(this.rowNode,W.EVENT_DRAGGING_CHANGED,this.postProcessRowDragging.bind(this)),this.addManagedListener(this.rowNode,W.EVENT_UI_LEVEL_CHANGED,this.onUiLevelChanged.bind(this));const t=this.beans.eventService;this.addManagedListener(t,c.EVENT_PAGINATION_PIXEL_OFFSET_CHANGED,this.onPaginationPixelOff
1setChanged.bind(this)),this.addManagedListener(t,c.EVENT_HEIGHT_SCALE_CHANGED,this.onTopChanged.bind(this)),this.addManagedListener(t,c.EVENT_DISPLAYED_COLUMNS_CHANGED,this.onDisplayedColumnsChanged.bind(this)),this.addManagedListener(t,c.EVENT_VIRTUAL_COLUMNS_CHANGED,this.onVirtualColumnsChanged.bind(this)),this.addManagedListener(t,c.EVENT_CELL_FOCUSED,this.onCellFocusChanged.bind(this)),this.addManagedListener(t,c.EVENT_CELL_FOCUS_CLEARED,this.onCellFocusChanged.bind(this)),this.addManagedListener(t,c.EVENT_PAGINATION_CHANGED,this.onPaginationChanged.bind(this)),this.addManagedListener(t,c.EVENT_MODEL_UPDATED,this.refreshFirstAndLastRowStyles.bind(this)),this.addManagedListener(t,c.EVENT_COLUMN_MOVED,this.updateColumnLists.bind(this)),this.addDestroyFunc(()=>{this.destroyBeans(this.rowDragComps,this.beans.context),this.tooltipFeature&&(this.tooltipFeature=this.destroyBean(this.tooltipFeature,this.beans.context));}),this.addManagedPropertyListeners(["rowDragEntireRow"],()=>{this.gos.get("rowDragEntireRow")?this.allRowGuis.forEach(s=>{this.addRowDraggerToRow(s);}):(this.destroyBeans(this.rowDragComps,this.beans.context),this.rowDragComps=[]);}),this.addListenersForCellComps();}addListenersForCellComps(){this.addManagedListener(this.rowNode,W.EVENT_ROW_INDEX_CHANGED,()=>{this.getAllCellCtrls().forEach(t=>t.onRowIndexChanged());}),this.addManagedListener(this.rowNode,W.EVENT_CELL_CHANGED,t=>{this.getAllCellCtrls().forEach(i=>i.onCellChanged(t));});}onRowNodeDataChanged(t){this.isFullWidth()===!!this.rowNode.isFullWidthCell()?this.isFullWidth()?this.refreshFullWidth()||this.beans.rowRenderer.redrawRow(this.rowNode):(this.getAllCellCtrls().forEach(s=>s.refreshCell({suppressFlash:!t.update,newData:!t.update})),this.allRowGuis.forEach(s=>{this.setRowCompRowId(s.rowComp),this.updateRowBusinessKey(),this.setRowCompRowBusinessKey(s.rowComp);}),this.onRowSelected(),this.postProcessCss()):this.beans.rowRenderer.redrawRow(this.rowNode);}postProcessCss(){this.setStylesFromGridOptions(!0),this.postProcessClassesFromGridOptions(),this.postProcessRowClassRules(),this.postProcessRowDragging();}onRowNodeHighlightChanged(){const t=this.rowNode.highlighted;this.allRowGuis.forEach(i=>{const o=1===t;i.rowComp.addOrRemoveCssClass("ag-row-highlight-above",0===t),i.rowComp.addOrRemoveCssClass("ag-row-highlight-below",o);});}postProcessRowDragging(){const t=this.rowNode.dragging;this.allRowGuis.forEach(i=>i.rowComp.addOrRemoveCssClass("ag-row-dragging",t));}updateExpandedCss(){const t=this.rowNode.isExpandable(),i=1==this.rowNode.expanded;this.allRowGuis.forEach(s=>{s.rowComp.addOrRemoveCssClass("ag-row-group",t),s.rowComp.addOrRemoveCssClass("ag-row-group-expanded",t&&i),s.rowComp.addOrRemoveCssClass("ag-row-group-contracted",t&&!i),Ft(s.element,t&&i);});}onDisplayedColumnsChanged(){this.updateColumnLists(!0),this.beans.columnModel.wasAutoRowHeightEverActive()&&this.rowNode.checkAutoHeights();}onVirtualColumnsChanged(){this.updateColumnLists(!1,!0);}getRowPosition(){return{rowPinned:ot(this.rowNode.rowPinned),rowIndex:this.rowNode.rowIndex};}onKeyboardNavigate(t){const i=this.allRowGuis.find(a=>a.element.contains(t.target));if((i?i.element:null)!==t.target)return;const r=this.rowNode,n=this.beans.focusService.getFocusedCell();this.beans.navigationService.navigateToNextCell(t,t.key,{rowIndex:r.rowIndex,rowPinned:r.rowPinned,column:n&&n.column},!0),t.preventDefault();}onTabKeyDown(t){if(t.defaultPrevented||lt(t))return;const i=this.allRowGuis.find(n=>n.element.contains(t.target)),s=i?i.element:null,o=s===t.target;let r=null;o||(r=this.beans.focusService.findNextFocusableElement(s,!1,t.shiftKey)),(this.isFullWidth()&&o||!r)&&this.beans.navigationService.onTabKeyDown(this,t);}getFullWidthElement(){return this.fullWidthGui?this.fullWidthGui.element:null;}getRowYPosition(){var t;const i=null==(t=this.allRowGuis.find(s=>xe(s.element)))?void 0:t.element;return i?i.getBoundingClientRect().top:0;}onFullWidthRowFocused(t){var i;const s=this.rowNode,o=!!t&&this.isFullWidth()&&t.rowIndex===s.rowIndex&&t.rowPinned==s.rowPinned,r=this.fullWidthGui?this.fullWidthGui.element:null==(i=this.centerGui)?void 0:i.element;r&&(r.classList.toggle("ag-full-width-focus",o),o&&r.focus({preventScroll:!0}));}recreateCell(t){this.centerCellCtrls=this.removeCellCtrl(this.centerCellCtrls,t),this.leftCellCtrls=this.removeCellCtrl(this.leftCellCtrls,t),this.rightCellCtrls=this.removeCellCtrl(this.rightCellCtrls,t),t.destroy(),this.updateColumnLists();}removeCellCtrl(t,i){const s={list:[],map:{}};return t.list.forEach(o=>{o!==i&&(s.list.push(o),s.map[o.getColumn().getInstanceId()]=o);}),s;}onMouseEvent(t,i){switch(t){case"dblclick":this.onRowDblClick(i);break;case"click":this.onRowClick(i);break;case"touchstart":case"mousedown":this.onRowMouseDown(i);}}createRowEvent(t,i){return this.gos.addGridCommonParams({type:t,node:this.rowNode,data:this.rowNode.data,rowIndex:this.rowNode.rowIndex,rowPinned:this.rowNode.rowPinned,event:i});}createRowEventWithSource(t,i){const s=this.createRowEvent(t,i);return s.source=this,s;}onRowDblClick(t){if(lt(t))return;const i=this.createRowEventWithSource(c.EVENT_ROW_DOUBLE_CLICKED,t);this.beans.eventService.dispatchEvent(i);}onRowMouseDown(t){if(this.lastMouseDownOnDragger=hi(t.target,"ag-row-drag",3),!this.isFullWidth())return;const i=this.rowNode,s=this.beans.columnModel;this.beans.rangeService&&this.beans.rangeService.removeAllCellRanges(),this.beans.focusService.setFocusedCell({rowIndex:i.rowIndex,column:s.getAllDisplayedColumns()[0],rowPinned:i.rowPinned,forceBrowserFocus:!0});}onRowClick(t){if(lt(t)||this.lastMouseDownOnDragger)return;const s=this.createRowEventWithSource(c.EVENT_ROW_CLICKED,t);this.beans.eventService.dispatchEvent(s);const o=t.ctrlKey||t.metaKey,r=t.shiftKey;if(this.gos.get("groupSelectsChildren")&&this.rowNode.group||this.isRowSelectionBlocked()||this.gos.get("suppressRowClickSelection"))return;const l=this.gos.get("rowMultiSelectWithClick"),a=!this.gos.get("suppressRowDeselection"),u="rowClicked";this.rowNode.isSelected()?l?this.rowNode.setSelectedParams({newValue:!1,event:t,source:u}):o?a&&this.rowNode.setSelectedParams({newValue:!1,event:t,source:u}):this.rowNode.setSelectedParams({newValue:!0,clearSelection:!r,rangeSelect:r,event:t,source:u}):this.rowNode.setSelectedParams({newValue:!0,clearSelection:!l&&!o,rangeSelect:r,event:t,source:u});}isRowSelectionBlocked(){return!this.rowNode.selectable||!!this.rowNode.rowPinned||!this.gos.isRowSelection();}setupDetailRowAutoHeight(t){if("FullWidthDetail"!==this.rowType||!this.gos.get("detailRowAutoHeight"))return;const i=()=>{const o=t.clientHeight;null!=o&&o>0&&window.setTimeout(()=>{this.rowNode.setRowHeight(o),this.beans.clientSideRowModel?this.beans.clientSideRowModel.onRowHeightChanged():this.beans.serverSideRowModel&&this.beans.serverSideRowModel.onRowHeightChanged();},0);},s=this.beans.resizeObserverService.observeResize(t,i);this.addDestroyFunc(s),i();}
1createFullWidthCompDetails(t,i){const s=this.gos.addGridCommonParams({fullWidth:!0,data:this.rowNode.data,node:this.rowNode,value:this.rowNode.key,valueFormatted:this.rowNode.key,rowIndex:this.rowNode.rowIndex,eGridCell:t,eParentOfValue:t,pinned:i,addRenderedRowListener:this.addEventListener.bind(this),registerRowDragger:(o,r,n,l)=>this.addFullWidthRowDragging(o,r,n,l),setTooltip:(o,r)=>this.refreshRowTooltip(o,r)});switch(this.rowType){case"FullWidthDetail":return this.beans.userComponentFactory.getFullWidthDetailCellRendererDetails(s);case"FullWidthGroup":return this.beans.userComponentFactory.getFullWidthGroupCellRendererDetails(s);case"FullWidthLoading":return this.beans.userComponentFactory.getFullWidthLoadingCellRendererDetails(s);default:return this.beans.userComponentFactory.getFullWidthCellRendererDetails(s);}}refreshRowTooltip(t,i){if(!this.fullWidthGui)return;const s={getGui:()=>this.fullWidthGui.element,getTooltipValue:()=>t,getLocation:()=>"fullWidthRow",shouldDisplayTooltip:i};this.tooltipFeature&&this.destroyBean(this.tooltipFeature,this.beans.context),this.tooltipFeature=this.createBean(new mt(s,this.beans));}addFullWidthRowDragging(t,i,s="",o){if(!this.isFullWidth())return;const r=new mi(()=>s,this.rowNode,void 0,t,i,o);this.createBean(r,this.beans.context),this.addDestroyFunc(()=>{this.destroyBean(r,this.beans.context);});}onUiLevelChanged(){const t=this.beans.rowCssClassCalculator.calculateRowLevel(this.rowNode);if(this.rowLevel!=t){const i="ag-row-level-"+t,s="ag-row-level-"+this.rowLevel;this.allRowGuis.forEach(o=>{o.rowComp.addOrRemoveCssClass(i,!0),o.rowComp.addOrRemoveCssClass(s,!1);});}this.rowLevel=t;}isFirstRowOnPage(){return this.rowNode.rowIndex===this.beans.paginationProxy.getPageFirstRow();}isLastRowOnPage(){return this.rowNode.rowIndex===this.beans.paginationProxy.getPageLastRow();}refreshFirstAndLastRowStyles(){const t=this.isFirstRowOnPage(),i=this.isLastRowOnPage();this.firstRowOnPage!==t&&(this.firstRowOnPage=t,this.allRowGuis.forEach(s=>s.rowComp.addOrRemoveCssClass("ag-row-first",t))),this.lastRowOnPage!==i&&(this.lastRowOnPage=i,this.allRowGuis.forEach(s=>s.rowComp.addOrRemoveCssClass("ag-row-last",i)));}stopEditing(t=!1){if(this.stoppingRowEdit)return;const i=this.getAllCellCtrls(),s=this.editingRow;this.stoppingRowEdit=!0;let o=!1;for(const r of i){const n=r.stopEditing(t);s&&!t&&!o&&n&&(o=!0);}if(o){const r=this.createRowEvent(c.EVENT_ROW_VALUE_CHANGED);this.beans.eventService.dispatchEvent(r);}s&&this.setEditingRow(!1),this.stoppingRowEdit=!1;}setInlineEditingCss(t){this.allRowGuis.forEach(i=>{i.rowComp.addOrRemoveCssClass("ag-row-inline-editing",t),i.rowComp.addOrRemoveCssClass("ag-row-not-inline-editing",!t);});}setEditingRow(t){this.editingRow=t,this.allRowGuis.forEach(s=>s.rowComp.addOrRemoveCssClass("ag-row-editing",t));const i=this.createRowEvent(t?c.EVENT_ROW_EDITING_STARTED:c.EVENT_ROW_EDITING_STOPPED);this.beans.eventService.dispatchEvent(i);}startRowEditing(t=null,i=null,s=null){this.editingRow||this.getAllCellCtrls().reduce((r,n)=>{const l=n===i;return n.startEditing(l?t:null,l,s),!!r||n.isEditing();},!1)&&this.setEditingRow(!0);}getAllCellCtrls(){return 0===this.leftCellCtrls.list.length&&0===this.rightCellCtrls.list.length?this.centerCellCtrls.list:[...this.centerCellCtrls.list,...this.leftCellCtrls.list,...this.rightCellCtrls.list];}postProcessClassesFromGridOptions(){const t=this.beans.rowCssClassCalculator.processClassesFromGridOptions(this.rowNode);!t||!t.length||t.forEach(i=>{this.allRowGuis.forEach(s=>s.rowComp.addOrRemoveCssClass(i,!0));});}postProcessRowClassRules(){this.beans.rowCssClassCalculator.processRowClassRules(this.rowNode,t=>{this.allRowGuis.forEach(i=>i.rowComp.addOrRemoveCssClass(t,!0));},t=>{this.allRowGuis.forEach(i=>i.rowComp.addOrRemoveCssClass(t,!1));});}setStylesFromGridOptions(t,i){t&&(this.rowStyles=this.processStylesFromGridOptions()),this.forEachGui(i,s=>s.rowComp.setUserStyles(this.rowStyles));}getPinnedForContainer(t){return"left"===t?"left":"right"===t?"right":null;}getInitialRowClasses(t){const i=this.getPinnedForContainer(t),s={rowNode:this.rowNode,rowFocused:this.rowFocused,fadeRowIn:this.fadeInAnimation[t],rowIsEven:this.rowNode.rowIndex%2==0,rowLevel:this.rowLevel,fullWidthRow:this.isFullWidth(),firstRowOnPage:this.isFirstRowOnPage(),lastRowOnPage:this.isLastRowOnPage(),printLayout:this.printLayout,expandable:this.rowNode.isExpandable(),pinned:i};return this.beans.rowCssClassCalculator.getInitialRowClasses(s);}processStylesFromGridOptions(){const t=this.gos.get("rowStyle");if(t&&"function"==typeof t)return void console.warn("AG Grid: rowStyle should be an object of
1key/value styles, not be a function, use getRowStyle() instead");const i=this.gos.getCallback("getRowStyle");let s;return i&&(s=i({data:this.rowNode.data,node:this.rowNode,rowIndex:this.rowNode.rowIndex})),s||t?Object.assign({},t,s):this.emptyStyle;}onRowSelected(t){const i=!!this.rowNode.isSelected();this.forEachGui(t,s=>{s.rowComp.addOrRemoveCssClass("ag-row-selected",i),qi(s.element,i),s.element.contains(this.beans.gos.getActiveDomElement())&&(s===this.centerGui||s===this.fullWidthGui)&&this.announceDescription();});}announceDescription(){if(this.isRowSelectionBlocked())return;const t=this.rowNode.isSelected();if(t&&this.beans.gos.get("suppressRowDeselection"))return;const s=this.beans.localeService.getLocaleTextFunc()(t?"ariaRowDeselect":"ariaRowSelect",`Press SPACE to ${t?"deselect":"select"} this row.`);this.beans.ariaAnnouncementService.announceValue(s);}addHoverFunctionality(t){this.active&&(this.addManagedListener(t,"mouseenter",()=>this.rowNode.onMouseEnter()),this.addManagedListener(t,"mouseleave",()=>this.rowNode.onMouseLeave()),this.addManagedListener(this.rowNode,W.EVENT_MOUSE_ENTER,()=>{!this.beans.dragService.isDragging()&&!this.gos.get("suppressRowHoverHighlight")&&(t.classList.add("ag-row-hover"),this.rowNode.setHovered(!0));}),this.addManagedListener(this.rowNode,W.EVENT_MOUSE_LEAVE,()=>{t.classList.remove("ag-row-hover"),this.rowNode.setHovered(!1);}));}roundRowTopToBounds(t){const i=this.beans.ctrlsService.getGridBodyCtrl().getScrollFeature().getApproximateVScollPosition(),s=this.applyPaginationOffset(i.top,!0)-100,o=this.applyPaginationOffset(i.bottom,!0)+100;return Math.min(Math.max(s,t),o);}getFrameworkOverrides(){return this.beans.frameworkOverrides;}forEachGui(t,i){t?i(t):this.allRowGuis.forEach(i);}onRowHeightChanged(t){if(null==this.rowNode.rowHeight)return;const i=this.rowNode.rowHeight,s=this.beans.environment.getDefaultRowHeight(),r=this.gos.isGetRowHeightFunction()?this.gos.getRowHeightForNode(this.rowNode).height:void 0,n=r?Math.min(s,r)-2+"px":void 0;this.forEachGui(t,l=>{l.element.style.height=`${i}px`,n&&l.element.style.setProperty("--ag-line-height",n);});}addEventListener(t,i){super.addEventListener(t,i);}removeEventListener(t,i){super.removeEventListener(t,i);}destroyFirstPass(t=!1){if(this.active=!1,!t&&this.gos.isAnimateRows()&&!this.isSticky())if(null!=this.rowNode.rowTop){const o=this.roundRowTopToBounds(this.rowNode.rowTop);this.setRowTop(o);}else this.allRowGuis.forEach(o=>o.rowComp.addOrRemoveCssClass("ag-opacity-zero",!0));this.rowNode.setHovered(!1);const i=this.createRowEvent(c.EVENT_VIRTUAL_ROW_REMOVED);this.dispatchEvent(i),this.beans.eventService.dispatchEvent(i),super.destroy();}destroySecondPass(){this.allRowGuis.length=0,this.stopEditing();const t=i=>(i.list.forEach(s=>s.destroy()),{list:[],map:{}});this.centerCellCtrls=t(this.centerCellCtrls),this.leftCellCtrls=t(this.leftCellCtrls),this.rightCellCtrls=t(this.rightCellCtrls);}setFocusedClasses(t){this.forEachGui(t,i=>{i.rowComp.addOrRemoveCssClass("ag-row-focus",this.rowFocused),i.rowComp.addOrRemoveCssClass("ag-row-no-focus",!this.rowFocused);});}onCellFocusChanged(){const t=this.beans.focusService.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned);t!==this.rowFocused&&(this.rowFocused=t,this.setFocusedClasses()),!t&&this.editingRow&&this.stopEditing(!1);}onPaginationChanged(){const t=this.beans.paginationProxy.getCurrentPage();this.paginationPage!==t&&(this.paginationPage=t,this.onTopChanged()),this.refreshFirstAndLastRowStyles();}onTopChanged(){this.setRowTop(this.rowNode.rowTop);}onPaginationPixelOffsetChanged(){this.onTopChanged();}applyPaginationOffset(t,i=!1){return this.rowNode.isRowPinned()||this.rowNode.sticky?t:t+this.beans.paginationProxy.getPixelOffset()*(i?1:-1);}setRowTop(t){if(!this.printLayout&&y(t)){const i=this.applyPaginationOffset(t),r=`${this.rowNode.isRowPinned()||this.rowNode.sticky?i:this.beans.rowContainerHeightService.getRealPixelPosition(i)}px`;this.setRowTopStyle(r);}}getInitialRowTop(t){return this.suppressRowTransform?this.getInitialRowTopShared(t):void 0;}getInitialTransform(t){return this.suppressRowTransform?void 0:`translateY(${this.getInitialRowTopShared(t)})`;}getInitialRowTopShared(t){if(this.printLayout)return"";let i;if(this.isSticky())i=this.rowNode.stickyRowTop;else{const s=this.slideInAnimation[t]?this.roundRowTopToBounds(this.rowNode.oldRowTop):this.rowNode.rowTop,o=this.applyPaginationOffset(s);i=this.rowNode.isRowPinned()?o:this.beans.rowContainerHeightService.getRealPixelPosition(o);}return i+"px";}setRowTopStyle(t){this.allRowGuis.forEach(i=>
1this.suppressRowTransform?i.rowComp.setTop(t):i.rowComp.setTransform(`translateY(${t})`));}getRowNode(){return this.rowNode;}getCellCtrl(t){let i=null;return this.getAllCellCtrls().forEach(s=>{s.getColumn()==t&&(i=s);}),null!=i||this.getAllCellCtrls().forEach(s=>{s.getColSpanningList().indexOf(t)>=0&&(i=s);}),i;}onRowIndexChanged(){null!=this.rowNode.rowIndex&&(this.onCellFocusChanged(),this.updateRowIndexes(),this.postProcessCss());}getRowIndex(){return this.rowNode.getRowIndexString();}updateRowIndexes(t){const i=this.rowNode.getRowIndexString(),s=this.beans.headerNavigationService.getHeaderRowCount()+this.beans.filterManager.getHeaderRowCount(),o=this.rowNode.rowIndex%2==0,r=s+this.rowNode.rowIndex+1;this.forEachGui(t,n=>{n.rowComp.setRowIndex(i),n.rowComp.addOrRemoveCssClass("ag-row-even",o),n.rowComp.addOrRemoveCssClass("ag-row-odd",!o),Cn(n.element,r);});}};Xd.DOM_DATA_KEY_ROW_CTRL="renderedRow";var Yt=Xd,Ve=class extends R{constructor(e){super(),this.element=e;}postConstruct(){this.addKeyboardListeners(),this.addMouseListeners(),this.mockContextMenuForIPad();}addKeyboardListeners(){const e="keydown",t=this.processKeyboardEvent.bind(this,e);this.addManagedListener(this.element,e,t);}addMouseListeners(){["dblclick","contextmenu","mouseover","mouseout","click",un("touchstart")?"touchstart":"mousedown"].forEach(i=>{const s=this.processMouseEvent.bind(this,i);this.addManagedListener(this.element,i,s);});}processMouseEvent(e,t){if(!this.mouseEventService.isEventFromThisGrid(t)||lt(t))return;const i=this.getRowForEvent(t),s=this.mouseEventService.getRenderedCellForEvent(t);"contextmenu"===e?this.handleContextMenuMouseEvent(t,void 0,i,s):(s&&s.onMouseEvent(e,t),i&&i.onMouseEvent(e,t));}mockContextMenuForIPad(){if(!Pt())return;const e=new me(this.element);this.addManagedListener(e,me.EVENT_LONG_TAP,i=>{const s=this.getRowForEvent(i.touchEvent),o=this.mouseEventService.getRenderedCellForEvent(i.touchEvent);this.handleContextMenuMouseEvent(void 0,i.touchEvent,s,o);}),this.addDestroyFunc(()=>e.destroy());}getRowForEvent(e){let t=e.target;for(;t;){const i=this.gos.getDomData(t,Yt.DOM_DATA_KEY_ROW_CTRL);if(i)return i;t=t.parentElement;}return null;}handleContextMenuMouseEvent(e,t,i,s){const o=i?i.getRowNode():null,r=s?s.getColumn():null;let n=null;r&&(s.dispatchCellContextMenuEvent((e||t)??null),n=this.valueService.getValue(r,o));const l=this.ctrlsService.getGridBodyCtrl(),a=s?s.getGui():l.getGridBodyElement();this.menuService.showContextMenu({mouseEvent:e,touchEvent:t,rowNode:o,column:r,value:n,anchorToElement:a});}getControlsForEventTarget(e){return{cellCtrl:Yo(this.gos,e,$t.DOM_DATA_KEY_CELL_CTRL),rowCtrl:Yo(this.gos,e,Yt.DOM_DATA_KEY_ROW_CTRL)};}processKeyboardEvent(e,t){const{cellCtrl:i,rowCtrl:s}=this.getControlsForEventTarget(t.target);t.defaultPrevented||(i?this.processCellKeyboardEvent(i,e,t):s&&s.isFullWidth()&&this.processFullWidthRowKeyboardEvent(s,e,t));}processCellKeyboardEvent(e,t,i){const s=e.getRowNode(),o=e.getColumn(),r=e.isEditing();if(!lr(this.gos,i,s,o,r)&&"keydown"===t&&(!r&&this.navigationService.handlePageScrollingKey(i)||e.onKeyDown(i),this.doGridOperations(i,e.isEditing()),nr(i)&&e.processCharacter(i)),"keydown"===t){const l=e.createEvent(i,c.EVENT_CELL_KEY_DOWN);this.eventService.dispatchEvent(l);}}processFullWidthRowKeyboardEvent(e,t,i){const s=e.getRowNode(),o=this.focusService.getFocusedCell();if(!lr(this.gos,i,s,o&&o.column,!1)&&"keydown"===t)switch(i.key){case C.PAGE_HOME:case C.PAGE_END:case C.PAGE_UP:case C.PAGE_DOWN:this.navigationService.handlePageScrollingKey(i,!0);break;case C.UP:case C.DOWN:e.onKeyboardNavigate(i);break;case C.TAB:e.onTabKeyDown(i);}if("keydown"===t){const l=e.createRowEvent(c.EVENT_CELL_KEY_DOWN,i);this.eventService.dispatchEvent(l);}}doGridOperations(e,t){if(!e.ctrlKey&&!e.metaKey||t||!this.mouseEventService.isEventFromThisGrid(e))return;const i=id(e);return i===C.A?this.onCtrlAndA(e):i===C.C?this.onCtrlAndC(e):i===C.D?this.onCtrlAndD(e):i===C.V?this.onCtrlAndV(e):i===C.X?this.onCtrlAndX(e):i===C.Y?this.onCtrlAndY():i===C.Z?this.onCtrlAndZ(e):void 0;}onCtrlAndA(e){const{pinnedRowModel:t,paginationProxy:i,rangeService:s}=this;if(s&&i.isRowsToRender()){const[o,r]=[t.isEmpty("top"),t.isEmpty("bottom")],n=o?null:"top";let l,a;r?(l=null,a=this.paginationProxy.getRowCount()-1):(l="bottom",a=t.getPinnedBottomRowData().length-1);const u=this.columnModel.getAllDisplayedColumns();if(Me(u))return;s.setCellRange({rowStartIndex:0,rowStartPinned:n,rowEndIndex:a,rowEndPinned:l,columnStart:u[0],columnEnd:Y(u)});}e.preventDefault();}onCtrlAndC(e){if(!this.clipboardService||this.gos.get("enableCellTextSelection"))return;const{cellCtrl:t,rowCtrl:i}=this.getControlsForEventTarget(e.target);t?.isEditing()||i?.isEditing()||(e.preventDefault(),this.clipboardService.copyToClipboard());}onCtrlAndX(e){if(!this.clipboardService||this.gos.get("enableCellTextSelection")||this.gos.get("suppressCutToClipboard"))return;const{cellCtrl:t,rowCtrl:i}=this.getControlsForEventTarget(e.target);t?.isEditing()||i?.isEditing()||(e.preventDefault(),this.clipboardService.cutToClipboard(void 0,"ui"));}onCtrlAndV(e){const{cellCtrl:t,rowCtrl:i}=this.getControlsForEventTarget(e.target);t?.isEditing()||i?.isEditing()||this.clipboardService&&!this.gos.get("suppressClipboardPaste")&&this.clipboardService.pasteFromClipboard();}onCtrlAndD(e){this.clipboardService&&!this.gos.get("suppressClipboardPaste")&&this.clipboardService.copyRangeDown(),e.preventDefault();}onCtrlAndZ(e){this.gos.get("undoRedoCellEditing")&&(e.preventDefault(),e.shiftKey?this.undoRedoService.redo("ui"):this.undoRedoService.undo("ui"));}onCtrlAndY(){this.undoRedoService.redo("ui");}};d([g("mouseEventService")],Ve.prototype,"mouseEventService",2),d([g("valueService")],Ve.prototype,"valueService",2),d([g("menuService")],Ve.prototype,"menuService",2),d([g("ctrlsService")],Ve.prototype,"ctrlsService",2),d([g("navigationService")],Ve.prototype,"navigationService",2),d([g("focusService")],Ve.prototype,"focusService",2),d([g("undoRedoService")],Ve.prototype,"undoRedoService",2),d([g("columnModel")],Ve.prototype,"columnModel",2),d([g("paginationProxy")],Ve.prototype,"paginationProxy",2),d([g("pinnedRowModel")],Ve.prototype,"pinnedRowModel",2),d([Q("rangeService")],Ve.prototype,"rangeService",2),d([Q("clipboardService")],Ve.prototype,"clipboardService",2),d([T],Ve.prototype,"postConstruct",1);var es=class extends R{constructor(e){super(),this.centerContainerCtrl=e;}postConstruct(){this.ctrlsService.whenReady(e=>{this.gridBodyCtrl=e.gridBodyCtrl,this.listenForResize();}),this.addManagedListener(this.eventService,c.EVENT_SCROLLBAR_WIDTH_CHANGED,this.onScrollbarWidthChanged.bind(this)),this.addManagedPropertyListeners(["alwaysShowHorizontalScroll","alwaysShowVerticalScroll"],()=>{this.checkViewportAndScrolls();});}listenForResize(){const e=()=>this.onCenterViewportResized();this.centerContainerCtrl.registerViewportResizeListener(e),this.gridBodyCtrl.registerBodyViewportResizeListener(e);}onScrollbarWidthChanged(){this.checkViewportAndScrolls();}onCenterViewportResized(){if(this.centerContainerCtrl.isViewportInTheDOMTree()){this.keepPinnedColumnsNarrowerThanViewport(),this.checkViewportAndScrolls();const e=this.centerContainerCtrl.getCenterWidth();e!==this.centerWidth&&(this.centerWidth=e,this.columnModel.refreshFlexedColumns({viewportWidth:this.centerWidth,updateBodyWidths:!0,fireResizedEvent:!0}));}else this.bodyHeight=0;}keepPinnedColumnsNarrowerThanViewport(){const t=ci(this.gridBodyCtrl.getBodyViewportElement());if(t<=50)return;let i=this.getPinnedColumnsOverflowingViewport(t-50);const s=this.gos.getCallback("processUnpinnedColumns");i.length&&(s&&(i=s({columns:i,viewportWidth:t})),this.columnModel.setColumnsPinned(i,null,"viewportSizeFeature"));}getPinnedColumnsOverflowingViewport(e){const s=this.pinnedWidthService.getPinnedRightWidth()+this.pinnedWidthService.getPinnedLeftWidth();if(s<e)return[];const o=[...this.columnModel.getDisplayedLeftColumns()],r=[...this.columnModel.getDisplayedRightColumns()];let n=0,l=0;const u=[];let h=s-0-e;for(;(l<o.length||n<r.length)&&h>0;){if(n<r.length){const p=r[n++];h-=p.getActualWidth(),u.push(p);}if(l<o.length&&h>0){const p=o[l++];h-=p.getActualWidth(),u.push(p);}}return u;}checkViewportAndScrolls(){this.updateScrollVisibleService(),this.checkBodyHeight(),this.onHorizontalViewportChanged(),this.gridBodyCtrl.getScrollFeature
1().checkScrollLeft();}getBodyHeight(){return this.bodyHeight;}checkBodyHeight(){const t=_s(this.gridBodyCtrl.getBodyViewportElement());this.bodyHeight!==t&&(this.bodyHeight=t,this.eventService.dispatchEvent({type:c.EVENT_BODY_HEIGHT_CHANGED}));}updateScrollVisibleService(){this.updateScrollVisibleServiceImpl(),setTimeout(this.updateScrollVisibleServiceImpl.bind(this),500);}updateScrollVisibleServiceImpl(){const e={horizontalScrollShowing:this.isHorizontalScrollShowing(),verticalScrollShowing:this.gridBodyCtrl.isVerticalScrollShowing()};this.scrollVisibleService.setScrollsVisible(e);}isHorizontalScrollShowing(){return this.centerContainerCtrl.isHorizontalScrollShowing();}onHorizontalViewportChanged(){const e=this.centerContainerCtrl.getCenterWidth(),t=this.centerContainerCtrl.getViewportScrollLeft();this.columnModel.setViewportPosition(e,t);}};d([g("ctrlsService")],es.prototype,"ctrlsService",2),d([g("pinnedWidthService")],es.prototype,"pinnedWidthService",2),d([g("columnModel")],es.prototype,"columnModel",2),d([g("scrollVisibleService")],es.prototype,"scrollVisibleService",2),d([T],es.prototype,"postConstruct",1);var vl=class extends R{constructor(e){super(),this.element=e;}postConstruct(){this.addManagedListener(this.eventService,c.EVENT_LEFT_PINNED_WIDTH_CHANGED,this.onPinnedLeftWidthChanged.bind(this));}onPinnedLeftWidthChanged(){const e=this.pinnedWidthService.getPinnedLeftWidth();K(this.element,e>0),et(this.element,e);}getWidth(){return this.pinnedWidthService.getPinnedLeftWidth();}};d([g("pinnedWidthService")],vl.prototype,"pinnedWidthService",2),d([T],vl.prototype,"postConstruct",1);var wl=class extends R{constructor(e){super(),this.element=e;}postConstruct(){this.addManagedListener(this.eventService,c.EVENT_RIGHT_PINNED_WIDTH_CHANGED,this.onPinnedRightWidthChanged.bind(this));}onPinnedRightWidthChanged(){const e=this.pinnedWidthService.getPinnedRightWidth();K(this.element,e>0),et(this.element,e);}getWidth(){return this.pinnedWidthService.getPinnedRightWidth();}};d([g("pinnedWidthService")],wl.prototype,"pinnedWidthService",2),d([T],wl.prototype,"postConstruct",1);var Sr=class extends R{constructor(e,t){super(),this.eContainer=e,this.eViewport=t;}postConstruct(){this.addManagedListener(this.eventService,c.EVENT_ROW_CONTAINER_HEIGHT_CHANGED,this.onHeightChanged.bind(this));}onHeightChanged(){const e=this.maxDivHeightScaler.getUiContainerHeight(),t=null!=e?`${e}px`:"";this.eContainer.style.height=t,this.eViewport&&(this.eViewport.style.height=t);}};d([g("rowContainerHeightService")],Sr.prototype,"maxDivHeightScaler",2),d([T],Sr.prototype,"postConstruct",1);var Er=class extends R{constructor(e){super(),this.eContainer=e;}postConstruct(){this.rangeService&&(this.params={eElement:this.eContainer,onDragStart:this.rangeService.onDragStart.bind(this.rangeService),onDragStop:this.rangeService.onDragStop.bind(this.rangeService),onDragging:this.rangeService.onDragging.bind(this.rangeService)},this.addManagedPropertyListener("enableRangeSelection",t=>{t.currentValue?this.enableFeature():this.disableFeature();}),this.addDestroyFunc(()=>this.disableFeature()),this.gos.get("enableRangeSelection")&&this.enableFeature());}enableFeature(){this.dragService.addDragSource(this.params);}disableFeature(){this.dragService.removeDragSource(this.params);}};d([g("dragService")],Er.prototype,"dragService",2),d([Q("rangeService")],Er.prototype,"rangeService",2),d([T],Er.prototype,"postConstruct",1);var ts=class extends R{constructor(e,t=!1){super(),this.callback=e,this.addSpacer=t;}postConstruct(){const e=this.setWidth.bind(this);this.addManagedPropertyListener("domLayout",e),this.addManagedListener(this.eventService,c.EVENT_COLUMN_CONTAINER_WIDTH_CHANGED,e),this.addManagedListener(this.eventService,c.EVENT_DISPLAYED_COLUMNS_CHANGED,e),this.addManagedListener(this.eventService,c.EVENT_LEFT_PINNED_WIDTH_CHANGED,e),this.addSpacer&&(this.addManagedListener(this.eventService,c.EVENT_RIGHT_PINNED_WIDTH_CHANGED,e),this.addManagedListener(this.eventService,c.EVENT_SCROLL_VISIBILITY_CHANGED,e),this.addManagedListener(this.eventService,c.EVENT_SCROLLBAR_WIDTH_CHANGED,e)),this.setWidth();}setWidth(){const{columnModel:e}=this,t=this.gos.isDomLayout("print"),i=e.getBodyContainerWidth(),s=e.getDisplayedColumnsLeftWidth(),o=e.getDisplayedColumnsRightWidth();let r;t?r=i+s+o:(r=i,this.addSpacer&&0===(this.gos.get("enableRtl")?s:o)&&this.scrollVisibleService.isVerticalScrollShowing()&&(r+=this.gos.get
1ScrollbarWidth())),this.callback(r);}};d([g("columnModel")],ts.prototype,"columnModel",2),d([g("scrollVisibleService")],ts.prototype,"scrollVisibleService",2),d([T],ts.prototype,"postConstruct",1);var Zd=(e=>(e.LEFT="left",e.RIGHT="right",e.CENTER="center",e.FULL_WIDTH="fullWidth",e.TOP_LEFT="topLeft",e.TOP_RIGHT="topRight",e.TOP_CENTER="topCenter",e.TOP_FULL_WIDTH="topFullWidth",e.STICKY_TOP_LEFT="stickyTopLeft",e.STICKY_TOP_RIGHT="stickyTopRight",e.STICKY_TOP_CENTER="stickyTopCenter",e.STICKY_TOP_FULL_WIDTH="stickyTopFullWidth",e.STICKY_BOTTOM_LEFT="stickyBottomLeft",e.STICKY_BOTTOM_RIGHT="stickyBottomRight",e.STICKY_BOTTOM_CENTER="stickyBottomCenter",e.STICKY_BOTTOM_FULL_WIDTH="stickyBottomFullWidth",e.BOTTOM_LEFT="bottomLeft",e.BOTTOM_RIGHT="bottomRight",e.BOTTOM_CENTER="bottomCenter",e.BOTTOM_FULL_WIDTH="bottomFullWidth",e))(Zd||{}),Jd=(e=>(e.LEFT="left",e.RIGHT="right",e.CENTER="center",e.FULL_WIDTH="fullWidth",e))(Jd||{});function eu(e){switch(e){case"center":case"topCenter":case"stickyTopCenter":case"bottomCenter":case"stickyBottomCenter":return"center";case"left":case"topLeft":case"stickyTopLeft":case"bottomLeft":case"stickyBottomLeft":return"left";case"right":case"topRight":case"stickyTopRight":case"bottomRight":case"stickyBottomRight":return"right";case"fullWidth":case"topFullWidth":case"stickyTopFullWidth":case"bottomFullWidth":case"stickyBottomFullWidth":return"fullWidth";default:throw Error("Invalid Row Container Type");}}var yp=Bt([["center","ag-center-cols-container"],["left","ag-pinned-left-cols-container"],["right","ag-pinned-right-cols-container"],["fullWidth","ag-full-width-container"],["topCenter","ag-floating-top-container"],["topLeft","ag-pinned-left-floating-top"],["topRight","ag-pinned-right-floating-top"],["topFullWidth","ag-floating-top-full-width-container"],["stickyTopCenter","ag-sticky-top-container"],["stickyTopLeft","ag-pinned-left-sticky-top"],["stickyTopRight","ag-pinned-right-sticky-top"],["stickyTopFullWidth","ag-sticky-top-full-width-container"],["stickyBottomCenter","ag-sticky-bottom-container"],["stickyBottomLeft","ag-pinned-left-sticky-bottom"],["stickyBottomRight","ag-pinned-right-sticky-bottom"],["stickyBottomFullWidth","ag-sticky-bottom-full-width-container"],["bottomCenter","ag-floating-bottom-container"],["bottomLeft","ag-pinned-left-floating-bottom"],["bottomRight","ag-pinned-right-floating-bottom"],["bottomFullWidth","ag-floating-bottom-full-width-container"]]),Rp=Bt([["center","ag-center-cols-viewport"],["topCenter","ag-floating-top-viewport"],["stickyTopCenter","ag-sticky-top-viewport"],["bottomCenter","ag-floating-bottom-viewport"],["stickyBottomCenter","ag-sticky-bottom-viewport"]]),Ei=class ph extends R{constructor(t){super(),this.visible=!0,this.EMPTY_CTRLS=[],this.name=t,this.isFullWithContainer="topFullWidth"===this.name||"stickyTopFullWidth"===this.name||"stickyBottomFullWidth"===this.name||"bottomFullWidth"===this.name||"fullWidth"===this.name;}static getRowContainerCssClasses(t){return{container:yp.get(t),viewport:Rp.get(t)};}static getPinned(t){switch(t){case"bottomLeft":case"topLeft":case"stickyTopLeft":case"stickyBottomLeft":case"left":return"left";case"bottomRight":case"topRight":case"stickyTopRight":case"stickyBottomRight":case"right":return"right";default:return null;}}postConstruct(){this.enableRtl=this.gos.get("enableRtl"),this.forContainers(["center"],()=>this.viewportSizeFeature=this.createManagedBean(new es(this)));}registerWithCtrlsService(){switch(this.name){case"fullWidth":case"topFullWidth":case"stickyTopFullWidth":case"bottomFullWidth":case"stickyBottomFullWidth":return;default:this.ctrlsService.register(this.name,this);}}forContainers(t,i){t.indexOf(this.name)>=0&&i();}getContainerElement(){return this.eContainer;}getViewportSizeFeature(){return this.viewportSizeFeature;}setComp(t,i,s){this.comp=t,this.eContainer=i,this.eViewport=s,this.createManagedBean(new Ve(this.eContainer)),this.addPreventScrollWhileDragging(),this.listenOnDomOrder(),this.stopHScrollOnPinnedRows();this.forContainers(["left","bottomLeft","topLeft","stickyTopLeft","stickyBottomLeft"],()=>{this.pinnedWidthFeature=this.createManagedBean(new vl(this.eContainer)),this.addManagedListener(this.eventService,c.EVENT_LEFT_PINNED_WIDTH_CHANGED,(
1)=>this.onPinnedWidthChanged());}),this.forContainers(["right","bottomRight","topRight","stickyTopRight","stickyBottomRight"],()=>{this.pinnedWidthFeature=this.createManagedBean(new wl(this.eContainer)),this.addManagedListener(this.eventService,c.EVENT_RIGHT_PINNED_WIDTH_CHANGED,()=>this.onPinnedWidthChanged());}),this.forContainers(["center","left","right","fullWidth"],()=>this.createManagedBean(new Sr(this.eContainer,"center"===this.name?s:void 0))),this.forContainers(["topCenter","topLeft","topRight","bottomCenter","bottomLeft","bottomRight","center","left","right","stickyTopCenter","stickyTopLeft","stickyTopRight","stickyBottomCenter","stickyBottomLeft","stickyBottomRight"],()=>this.createManagedBean(new Er(this.eContainer))),this.forContainers(["center","topCenter","stickyTopCenter","bottomCenter","stickyBottomCenter"],()=>this.createManagedBean(new ts(v=>this.comp.setContainerWidth(`${v}px`)))),this.addListeners(),this.registerWithCtrlsService();}addListeners(){this.addManagedListener(this.eventService,c.EVENT_DISPLAYED_COLUMNS_CHANGED,()=>this.onDisplayedColumnsChanged()),this.addManagedListener(this.eventService,c.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,()=>this.onDisplayedColumnsWidthChanged()),this.addManagedListener(this.eventService,c.EVENT_DISPLAYED_ROWS_CHANGED,t=>this.onDisplayedRowsChanged(t.afterScroll)),this.onDisplayedColumnsChanged(),this.onDisplayedColumnsWidthChanged(),this.onDisplayedRowsChanged();}listenOnDomOrder(){if(["stickyTopCenter","stickyTopLeft","stickyTopRight","stickyTopFullWidth","stickyBottomCenter","stickyBottomLeft","stickyBottomRight","stickyBottomFullWidth"].indexOf(this.name)>=0)return void this.comp.setDomOrder(!0);const s=()=>{const o=this.gos.get("ensureDomOrder"),r=this.gos.isDomLayout("print");this.comp.setDomOrder(o||r);};this.addManagedPropertyListener("domLayout",s),s();}stopHScrollOnPinnedRows(){this.forContainers(["topCenter","stickyTopCenter","bottomCenter","stickyBottomCenter"],()=>{this.addManagedListener(this.eViewport,"scroll",()=>this.eViewport.scrollLeft=0);});}onDisplayedColumnsChanged(){this.forContainers(["center"],()=>this.onHorizontalViewportChanged());}onDisplayedColumnsWidthChanged(){this.forContainers(["center"],()=>this.onHorizontalViewportChanged());}addPreventScrollWhileDragging(){const t=i=>{this.dragService.isDragging()&&i.cancelable&&i.preventDefault();};this.eContainer.addEventListener("touchmove",t,{passive:!1}),this.addDestroyFunc(()=>this.eContainer.removeEventListener("touchmove",t));}onHorizontalViewportChanged(t=!1){const i=this.getCenterWidth(),s=this.getCenterViewportScrollLeft();this.columnModel.setViewportPosition(i,s,t);}getCenterWidth(){return ci(this.eViewport);}getCenterViewportScrollLeft(){return ks(this.eViewport,this.enableRtl);}registerViewportResizeListener(t){const i=this.resizeObserverService.observeResize(this.eViewport,t);this.addDestroyFunc(()=>i());}isViewportInTheDOMTree(){return Hn(this.eViewport);}getViewportScrollLeft(){return ks(this.eViewport,this.enableRtl);}isHorizontalScrollShowing(){return this.gos.get("alwaysShowHorizontalScroll")||$a(this.eViewport);}getViewportElement(){return this.eViewport;}setContainerTranslateX(t){this.eContainer.style.transform=`translateX(${t}px)`;}getHScrollPosition(){return{left:this.eViewport.scrollLeft,right:this.eViewport.scrollLeft+this.eViewport.offsetWidth};}setCenterViewportScrollLeft(t){Bs(this.eViewport,t,this.enableRtl);}isContainerVisible(){return!ph.getPinned(this.name)||!!this.pinnedWidthFeature&&this.pinnedWidthFeature.getWidth()>0;}onPinnedWidthChanged(){const t=this.isContainerVisible();this.visible!=t&&(this.visible=t,this.onDisplayedRowsChanged());}onDisplayedRowsChanged(t=!1){const i=this.getRowCtrls();if(!this.visible||0===i.length)return void this.comp.setRowCtrls({rowCtrls:this.EMPTY_CTRLS});const s=this.gos.isDomLayout("print"),r=this.gos.get("embedFullWidthRows")||s,n=i.filter(l=>{const a=l.isFullWidth();return this.isFullWithContainer?!r&&a:r||!a;});this.comp.setRowCtrls({rowCtrls:n,useFlushSync:t});}getRowCtrls(){switch(this.name){case"topCenter":case"topLeft":case"topRight":case"topFullWidth":return this.rowRenderer.getTopRowCtrls();case"stickyTopCenter":case"stickyTopLeft":case"stickyTopRight":case"stickyTopFullWidth":return this.rowRenderer.getStickyTopRowCtrls();case"stickyBottomCenter":case"stickyBottomLeft":case"stickyBottomRight":case"stickyBottomFullWidth":return this.rowRenderer.getStickyBottomRowCtrls();case"bottomCenter":case"bottomLeft":case"bottomRight":case"bottomFullWidth":return this.rowRenderer.getBottomRowCtrls();default:return this.rowRenderer.getCentreRowCtrls();}}};d([g("dragService")],Ei.prototype,"dragService",2),d([g("ctrlsService")],Ei.prototype,"ctrlsService",2),d([g("columnModel")],Ei.prototype,"columnModel",2),d([g("resizeObserverService")],Ei.prototype,"resizeObserverService",2),d([g("rowRenderer")],Ei.prototype,"rowRenderer",2),d([T],Ei.prototype,"postConstruct",1);var Sl=Ei,it=class extends V{constructor(){super('<div class="ag-root ag-unselectable" role="treegrid">\n <ag-header-root ref="gridHeader"></ag-header-root>\n <div class="ag-floating-top" ref="eTop" role="presentation">\n <ag-row-container ref="topLeftContainer" name="topLeft"></ag-row-container>\n <ag-row-container ref="topCenterContainer" name="topCenter"></ag-row-container>\n <ag-row-container ref="topRightContainer" name="top
1Right"></ag-row-container>\n <ag-row-container ref="topFullWidthContainer" name="topFullWidth"></ag-row-container>\n </div>\n <div class="ag-body" ref="eBody" role="presentation">\n <div class="ag-body-viewport" ref="eBodyViewport" role="presentation">\n <ag-row-container ref="leftContainer" name="left"></ag-row-container>\n <ag-row-container ref="centerContainer" name="center"></ag-row-container>\n <ag-row-container ref="rightContainer" name="right"></ag-row-container>\n <ag-row-container ref="fullWidthContainer" name="fullWidth"></ag-row-container>\n </div>\n <ag-fake-vertical-scroll></ag-fake-vertical-scroll>\n </div>\n <div class="ag-sticky-top" ref="eStickyTop" role="presentation">\n <ag-row-container ref="stickyTopLeftContainer" name="stickyTopLeft"></ag-row-container>\n <ag-row-container ref="stickyTopCenterContainer" name="stickyTopCenter"></ag-row-container>\n <ag-row-container ref="stickyTopRightContainer" name="stickyTopRight"></ag-row-container>\n <ag-row-container ref="stickyTopFullWidthContainer" name="stickyTopFullWidth"></ag-row-container>\n </div>\n <div class="ag-sticky-bottom" ref="eStickyBottom" role="presentation">\n <ag-row-container ref="stickyBottomLeftContainer" name="stickyBottomLeft"></ag-row-container>\n <ag-row-container ref="stickyBottomCenterContainer" name="stickyBottomCenter"></ag-row-container>\n <ag-row-container ref="stickyBottomRightContainer" name="stickyBottomRight"></ag-row-container>\n <ag-row-container ref="stickyBottomFullWidthContainer" name="stickyBottomFullWidth"></ag-row-container>\n </div>\n <div class="ag-floating-bottom" ref="eBottom" role="presentation">\n <ag-row-container ref="bottomLeftContainer" name="bottomLeft"></ag-row-container>\n <ag-row-container ref="bottomCenterContainer" name="bottomCenter"></ag-row-container>\n <ag-row-container ref="bottomRightContainer" name="bottomRight"></ag-row-container>\n <ag-row-container ref="bottomFullWidthContainer" name="bottomFullWidth"></ag-row-container>\n </div>\n <ag-fake-horizontal-scroll></ag-fake-horizontal-scroll>\n <ag-overlay-wrapper></ag-overlay-wrapper>\n </div>');}init(){const e=(i,s)=>{const o=`${i}px`;s.style.minHeight=o,s.style.height=o;},t={setRowAnimationCssOnBodyViewport:(i,s)=>this.setRowAnimationCssOnBodyViewport(i,s),setColumnCount:i=>Pa(this.getGui(),i),setRowCount:i=>Fa(this.getGui(),i),setTopHeight:i=>e(i,this.eTop),setBottomHeight:i=>e(i,this.eBottom),setTopDisplay:i=>this.eTop.style.display=i,setBottomDisplay:i=>this.eBottom.style.display=i,setStickyTopHeight:i=>this.eStickyTop.style.height=i,setStickyTopTop:i=>this.eStickyTop.style.top=i,setStickyTopWidth:i=>this.eStickyTop.style.width=i,setStickyBottomHeight:i=>this.eStickyBottom.style.height=i,setStickyBottomBottom:i=>this.eStickyBottom.style.bottom=i,setStickyBottomWidth:i=>this.eStickyBottom.style.width=i,setColumnMovingCss:(i,s)=>this.addOrRemoveCssClass(i,s),updateLayoutClasses:(i,s)=>{[this.eBodyViewport.classList,this.eBody.classList].forEach(r=>{r.toggle("ag-layout-auto-height",s.autoHeight),r.toggle("ag-layout-normal",s.normal),r.toggle("ag-layout-print",s.print);}),this.addOrRemoveCssClass("ag-layout-auto-height",s.autoHeight),this.addOrRemoveCssClass("ag-layout-normal",s.normal),this.addOrRemoveCssClass("ag-layout-print",s.print);},setAlwaysVerticalScrollClass:(i,s)=>this.eBodyViewport.classList.toggle($d,s),registerBodyViewportResizeListener:i=>{const s=this.resizeObserverService.observeResize(this.eBodyViewport,i);this.addDestroyFunc(()=>s());},setPinnedTopBottomOverflowY:i=>this.eTop.style.overflowY=this.eBottom.style.overflowY=i,setCellSelectableCss:(i,s)=>{[this.eTop,this.eBodyViewport,this.eBottom].forEach(o=>o.classList.toggle(i,s));},setBodyViewportWidth:i=>this.eBodyViewport.style.width=i};
1this.ctrl=this.createManagedBean(new Re()),this.ctrl.setComp(t,this.getGui(),this.eBodyViewport,this.eTop,this.eBottom,this.eStickyTop,this.eStickyBottom),(this.rangeService&&this.gos.get("enableRangeSelection")||"multiple"===this.gos.get("rowSelection"))&&Aa(this.getGui(),!0);}setRowAnimationCssOnBodyViewport(e,t){const i=this.eBodyViewport.classList;i.toggle("ag-row-animation",t),i.toggle("ag-row-no-animation",!t);}getFloatingTopBottom(){return[this.eTop,this.eBottom];}};d([g("resizeObserverService")],it.prototype,"resizeObserverService",2),d([Q("rangeService")],it.prototype,"rangeService",2),d([A("eBodyViewport")],it.prototype,"eBodyViewport",2),d([A("eStickyTop")],it.prototype,"eStickyTop",2),d([A("eStickyBottom")],it.prototype,"eStickyBottom",2),d([A("eTop")],it.prototype,"eTop",2),d([A("eBottom")],it.prototype,"eBottom",2),d([A("gridHeader")],it.prototype,"headerRootComp",2),d([A("eBody")],it.prototype,"eBody",2),d([T],it.prototype,"init",1);var yi=class extends R{postConstruct(){this.addManagedListener(this.eventService,c.EVENT_DISPLAYED_COLUMNS_CHANGED,this.onDisplayedColumnsChanged.bind(this)),this.addManagedListener(this.eventService,c.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,this.onDisplayedColumnsWidthChanged.bind(this));}onDisplayedColumnsChanged(){this.update();}onDisplayedColumnsWidthChanged(){this.update();}update(){this.columnAnimationService.isActive()?this.columnAnimationService.executeLaterVMTurn(()=>{this.columnAnimationService.executeLaterVMTurn(()=>this.updateImpl());}):this.updateImpl();}updateImpl(){const e=this.ctrlsService.get("center");if(!e||this.columnAnimationService.isActive())return;const t={horizontalScrollShowing:e.isHorizontalScrollShowing(),verticalScrollShowing:this.isVerticalScrollShowing()};this.setScrollsVisible(t);}setScrollsVisible(e){this.horizontalScrollShowing===e.horizontalScrollShowing&&this.verticalScrollShowing===e.verticalScrollShowing||(this.horizontalScrollShowing=e.horizontalScrollShowing,this.verticalScrollShowing=e.verticalScrollShowing,this.eventService.dispatchEvent({type:c.EVENT_SCROLL_VISIBILITY_CHANGED}));}isHorizontalScrollShowing(){return this.horizontalScrollShowing;}isVerticalScrollShowing(){return this.verticalScrollShowing;}};d([g("ctrlsService")],yi.prototype,"ctrlsService",2),d([g("columnAnimationService")],yi.prototype,"columnAnimationService",2),d([T],yi.prototype,"postConstruct",1),yi=d([L("scrollVisibleService")],yi);var Ct=class extends R{constructor(){super(...arguments),this.gridInstanceId=Ct.gridInstanceSequence.next();}stampTopLevelGridCompWithGridInstance(e){e[Ct.GRID_DOM_KEY]=this.gridInstanceId;}getRenderedCellForEvent(e){return Yo(this.gos,e.target,$t.DOM_DATA_KEY_CELL_CTRL);}isEventFromThisGrid(e){return this.isElementInThisGrid(e.target);}isElementInThisGrid(e){let t=e;for(;t;){const i=t[Ct.GRID_DOM_KEY];if(y(i))return i===this.gridInstanceId;t=t.parentElement;}return!1;}getCellPositionForEvent(e){const t=this.getRenderedCellForEvent(e);return t?t.getCellPosition():null;}getNormalisedPosition(e){const t=this.gos.isDomLayout("normal");let s,o;if(null!=e.clientX||null!=e.clientY?(s=e.clientX,o=e.clientY):(s=e.x,o=e.y),t){const r=this.ctrlsService.getGridBodyCtrl(),n=r.getScrollFeature().getVScrollPosition();s+=r.getScrollFeature().getHScrollPosition().left,o+=n.top;}return{x:s,y:o};}};Ct.gridInstanceSequence=new gi(),Ct.GRID_DOM_KEY="__ag_grid_instance",d([g("ctrlsService")],Ct.prototype,"ctrlsService",2),Ct=d([L("mouseEventService")],Ct);var we=class extends R{constructor(){super(),this.onPageDown=Jr(this.onPageDown,100),this.onPageUp=Jr(this.onPageUp,100);}postConstruct(){this.ctrlsService.whenReady(e=>{this.gridBodyCon=e.gridBodyCtrl;});}handlePageScrollingKey(e,t=!1){const i=e.key,s=e.altKey,o=e.ctrlKey||e.metaKey,r=!!this.rangeService&&e.shiftKey,n=this.mouseEventService.getCellPositionForEvent(e);let l=!1;switch(i){case C.PAGE_HOME:case C.PAGE_END:!o&&!s&&(this.onHomeOrEndKey(i),l=!0);break;case C.LEFT:case C.RIGHT:case C.UP:case C.DOWN:if(!n)return!1;o&&!s&&!r&&(this.onCtrlUpDownLeftRight(i,n),l=!0);break;case C.PAGE_DOWN:case C.PAGE_UP:!o&&!s&&(l=this.handlePageUpDown(i,n,t));}return l&&e.preventDefault(),l;}handlePageUpDown(e,t,i){return i&&(t=this.focusService.getFocusedCell()),!!t&&(e===C.PAGE_UP?this.onPageUp(t):this.onPageDown(t),!0);}navigateTo(e){var t;const{scrollIndex:i,scrollType:s,scrollColumn:o,focusIndex:r,focusColumn:n}=e;
1y(o)&&!o.isPinned()&&this.gridBodyCon.getScrollFeature().ensureColumnVisible(o),y(i)&&this.gridBodyCon.getScrollFeature().ensureIndexVisible(i,s),e.isAsync||this.gridBodyCon.getScrollFeature().ensureIndexVisible(r),this.focusService.setFocusedCell({rowIndex:r,column:n,rowPinned:null,forceBrowserFocus:!0}),null==(t=this.rangeService)||t.setRangeToCell({rowIndex:r,rowPinned:null,column:n});}onPageDown(e){const i=this.ctrlsService.getGridBodyCtrl().getScrollFeature().getVScrollPosition(),s=this.getViewportHeight(),o=this.paginationProxy.getPixelOffset(),n=this.paginationProxy.getRowIndexAtPixel(i.top+s+o);this.columnModel.isAutoRowHeightActive()?this.navigateToNextPageWithAutoHeight(e,n):this.navigateToNextPage(e,n);}onPageUp(e){const i=this.ctrlsService.getGridBodyCtrl().getScrollFeature().getVScrollPosition(),s=this.paginationProxy.getPixelOffset(),r=this.paginationProxy.getRowIndexAtPixel(i.top+s);this.columnModel.isAutoRowHeightActive()?this.navigateToNextPageWithAutoHeight(e,r,!0):this.navigateToNextPage(e,r,!0);}navigateToNextPage(e,t,i=!1){const s=this.getViewportHeight(),o=this.paginationProxy.getPageFirstRow(),r=this.paginationProxy.getPageLastRow(),n=this.paginationProxy.getPixelOffset(),l=this.paginationProxy.getRow(e.rowIndex),a=i?l?.rowHeight-s-n:s-n;let p,h=this.paginationProxy.getRowIndexAtPixel(l?.rowTop+a+n);h===e.rowIndex&&(t=h=e.rowIndex+(i?-1:1)),i?(p="bottom",h<o&&(h=o),t<o&&(t=o)):(p="top",h>r&&(h=r),t>r&&(t=r)),this.isRowTallerThanView(h)&&(t=h,p="top"),this.navigateTo({scrollIndex:t,scrollType:p,scrollColumn:null,focusIndex:h,focusColumn:e.column});}navigateToNextPageWithAutoHeight(e,t,i=!1){this.navigateTo({scrollIndex:t,scrollType:i?"bottom":"top",scrollColumn:null,focusIndex:t,focusColumn:e.column}),setTimeout(()=>{const s=this.getNextFocusIndexForAutoHeight(e,i);this.navigateTo({scrollIndex:t,scrollType:i?"bottom":"top",scrollColumn:null,focusIndex:s,focusColumn:e.column,isAsync:!0});},50);}getNextFocusIndexForAutoHeight(e,t=!1){var i;const s=t?-1:1,o=this.getViewportHeight(),r=this.paginationProxy.getPageLastRow();let n=0,l=e.rowIndex;for(;l>=0&&l<=r;){const a=this.paginationProxy.getRow(l);if(a){const u=null!=(i=a.rowHeight)?i:0;if(n+u>o)break;n+=u;}l+=s;}return Math.max(0,Math.min(l,r));}getViewportHeight(){const{gridBodyCtrl:e,center:t}=this.ctrlsService.getParams(),i=e.getScrollFeature().getVScrollPosition(),s=this.gos.getScrollbarWidth();let o=i.bottom-i.top;return t.isHorizontalScrollShowing()&&(o-=s),o;}isRowTallerThanView(e){const t=this.paginationProxy.getRow(e);if(!t)return!1;const i=t.rowHeight;return"number"==typeof i&&i>this.getViewportHeight();}onCtrlUpDownLeftRight(e,t){const i=this.cellNavigationService.getNextCellToFocus(e,t,!0),{rowIndex:s,column:o}=i;this.navigateTo({scrollIndex:s,scrollType:null,scrollColumn:o,focusIndex:s,focusColumn:o});}onHomeOrEndKey(e){const t=e===C.PAGE_HOME,i=this.columnModel.getAllDisplayedColumns(),s=t?i[0]:Y(i),o=t?this.paginationProxy.getPageFirstRow():this.paginationProxy.getPageLastRow();this.navigateTo({scrollIndex:o,scrollType:null,scrollColumn:s,focusIndex:o,focusColumn:s});}onTabKeyDown(e,t){const i=t.shiftKey,s=this.tabToNextCellCommon(e,i,t);if(!1===s){if(i){const{rowIndex:o,rowPinned:r}=e.getRowPosition();(r?0===o:o===this.paginationProxy.getPageFirstRow())&&(0===this.gos.get("headerHeight")||this.gos.get("suppressHeaderFocus")?this.focusService.focusNextGridCoreContainer(!0,!0):(t.preventDefault(),this.focusService.focusPreviousFromFirstCell(t)));}else e instanceof $t&&e.focusCell(!0),this.focusService.focusNextGridCoreContainer(i)&&t.preventDefault();}else s&&t.preventDefault();}tabToNextCell(e,t){const i=this.focusService.getFocusedCell();if(!i)return!1;let s=this.getCellByPosition(i);return!!(s||(s=this.rowRenderer.getRowByPosition(i),s&&s.isFullWidth()))&&!!this.tabToNextCellCommon(s,e,t);}tabToNextCellCommon(e,t,i){let o,s=e.isEditing();if(!s&&e instanceof $t){const n=e.getRowCtrl();n&&(s=n.isEditing());}return o=s?"fullRow"===this.gos.get("editType")?this.moveToNextEditingRow(e,t,i):this.moveToNextEditingCell(e,t,i):this.moveToNextCellNotEditing(e,t),null===o?o:o||!!this.focusService.getFocusedHeader();}moveToNextEditingCell(e,t,i=null){const s=e.getCellPosition();e.getGui().focus(),e.stopEditing();const o=this.findNextCellToFocusOn(s,t,!0);return!1===o?null:null!=o&&(o.startEditing(null,!0,i),o.focusCell(!1),!0);}moveToNextEditingRow(e,t,i=null){const s=e.getCellPosition(),o=this.findNextCellToFocusOn(s,t,!0);if(!1===o)return null;if(null==o)return!1;const r=o.getCellPosition(),n=this.isCellEditable(s),l=this.isCellEditable(r),a=r&&s.rowIndex===r.rowIndex&&s.rowPinned===r.rowPinned;return n&&e.setFocusOutOnEditor(),a||(e.getRowCtrl().stopEditing(),o.getRowCtrl().startRowEditing(void 0,void 0,i)),l?(o.setFocusInOnEditor(),o.focusCell()):o.focusCell(!0),!0;}
1moveToNextCellNotEditing(e,t){const i=this.columnModel.getAllDisplayedColumns();let s;s=e instanceof Yt?x(M({},e.getRowPosition()),{column:t?i[0]:Y(i)}):e.getCellPosition();const o=this.findNextCellToFocusOn(s,t,!1);if(!1===o)return null;if(o instanceof $t)o.focusCell(!0);else if(o)return this.tryToFocusFullWidthRow(o.getRowPosition(),t);return y(o);}findNextCellToFocusOn(e,t,i){var s;let o=e;for(;;){e!==o&&(e=o),t||(o=this.getLastCellOfColSpan(o)),o=this.cellNavigationService.getNextTabbedCell(o,t);const r=this.gos.getCallback("tabToNextCell");if(y(r)){const u=r({backwards:t,editing:i,previousCellPosition:e,nextCellPosition:o||null});if(!0===u||null===u)null===u&&O("Returning `null` from tabToNextCell is deprecated. Return `true` to stay on the current cell, or `false` to let the browser handle the tab behaviour."),o=e;else{if(!1===u)return!1;u.floating&&(O("tabToNextCellFunc return type should have attributes: rowIndex, rowPinned, column. However you had 'floating', maybe you meant 'rowPinned'?"),u.rowPinned=u.floating),o={rowIndex:u.rowIndex,column:u.column,rowPinned:u.rowPinned};}}if(!o)return null;if(o.rowIndex<0){const a=this.headerNavigationService.getHeaderRowCount();return this.focusService.focusHeaderPosition({headerPosition:{headerRowIndex:a+o.rowIndex,column:o.column},fromCell:!0}),null;}const n="fullRow"===this.gos.get("editType");if(i&&!n&&!this.isCellEditable(o))continue;this.ensureCellVisible(o);const l=this.getCellByPosition(o);if(!l){const a=this.rowRenderer.getRowByPosition(o);if(!a||!a.isFullWidth()||i)continue;return a;}if(!l.isSuppressNavigable())return null==(s=this.rangeService)||s.setRangeToCell(o),l;}}isCellEditable(e){const t=this.lookupRowNodeForCell(e);return!!t&&e.column.isCellEditable(t);}getCellByPosition(e){const t=this.rowRenderer.getRowByPosition(e);return t?t.getCellCtrl(e.column):null;}lookupRowNodeForCell(e){return"top"===e.rowPinned?this.pinnedRowModel.getPinnedTopRow(e.rowIndex):"bottom"===e.rowPinned?this.pinnedRowModel.getPinnedBottomRow(e.rowIndex):this.paginationProxy.getRow(e.rowIndex);}navigateToNextCell(e,t,i,s){let o=i,r=!1;for(;o&&(o===i||!this.isValidNavigateCell(o));)this.gos.get("enableRtl")?t===C.LEFT&&(o=this.getLastCellOfColSpan(o)):t===C.RIGHT&&(o=this.getLastCellOfColSpan(o)),o=this.cellNavigationService.getNextCellToFocus(t,o),r=_(o);if(r&&e&&e.key===C.UP&&(o={rowIndex:-1,rowPinned:null,column:i.column}),s){const l=this.gos.getCallback("navigateToNextCell");if(y(l)){const u=l({key:t,previousCellPosition:i,nextCellPosition:o||null,event:e});y(u)?(u.floating&&(O("tabToNextCellFunc return type should have attributes: rowIndex, rowPinned, column. However you had 'floating', maybe you meant 'rowPinned'?"),u.rowPinned=u.floating),o={rowPinned:u.rowPinned,rowIndex:u.rowIndex,column:u.column}):o=null;}}if(!o)return;if(o.rowIndex<0){const l=this.headerNavigationService.getHeaderRowCount();return void this.focusService.focusHeaderPosition({headerPosition:{headerRowIndex:l+o.rowIndex,column:i.column},event:e||void 0,fromCell:!0});}const n=this.getNormalisedPosition(o);n?this.focusPosition(n):this.tryToFocusFullWidthRow(o);}getNormalisedPosition(e){this.ensureCellVisible(e);const t=this.getCellByPosition(e);return t?(e=t.getCellPosition(),this.ensureCellVisible(e),e):null;}tryToFocusFullWidthRow(e,t=!1){const i=this.columnModel.getAllDisplayedColumns(),s=this.rowRenderer.getRowByPosition(e);if(!s||!s.isFullWidth())return!1;const o=this.focusService.getFocusedCell(),r={rowIndex:e.rowIndex,rowPinned:e.rowPinned,column:e.column||(t?Y(i):i[0])};this.focusPosition(r);const n=null!=o&&this.rowPositionUtils.before(r,o);return this.eventService.dispatchEvent({type:c.EVENT_FULL_WIDTH_ROW_FOCUSED,rowIndex:r.rowIndex,rowPinned:r.rowPinned,column:r.column,isFullWidthCell:!0,floating:r.rowPinned,fromBelow:n}),!0;}focusPosition(e){var t;this.focusService.setFocusedCell({rowIndex:e.rowIndex,column:e.column,rowPinned:e.rowPinned,forceBrowserFocus:!0}),null==(t=this.rangeService)||t.setRangeToCell(e);}isValidNavigateCell(e){return!!this.rowPositionUtils.getRowNode(e);}getLastCellOfColSpan(e){const t=this.getCellByPosition(e);if(!t)return e;
1const i=t.getColSpanningList();return 1===i.length?e:{rowIndex:e.rowIndex,column:Y(i),rowPinned:e.rowPinned};}ensureCellVisible(e){const t=this.gos.isGroupRowsSticky(),i=this.rowModel.getRow(e.rowIndex);!(t&&i?.sticky)&&_(e.rowPinned)&&this.gridBodyCon.getScrollFeature().ensureIndexVisible(e.rowIndex),e.column.isPinned()||this.gridBodyCon.getScrollFeature().ensureColumnVisible(e.column);}};d([g("mouseEventService")],we.prototype,"mouseEventService",2),d([g("paginationProxy")],we.prototype,"paginationProxy",2),d([g("focusService")],we.prototype,"focusService",2),d([g("columnModel")],we.prototype,"columnModel",2),d([g("rowModel")],we.prototype,"rowModel",2),d([g("ctrlsService")],we.prototype,"ctrlsService",2),d([g("rowRenderer")],we.prototype,"rowRenderer",2),d([g("headerNavigationService")],we.prototype,"headerNavigationService",2),d([g("rowPositionUtils")],we.prototype,"rowPositionUtils",2),d([g("cellNavigationService")],we.prototype,"cellNavigationService",2),d([g("pinnedRowModel")],we.prototype,"pinnedRowModel",2),d([Q("rangeService")],we.prototype,"rangeService",2),d([T],we.prototype,"postConstruct",1),we=d([L("navigationService")],we);var El=class gh extends Kt{constructor(t){super('<div class="ag-popup-editor" tabindex="-1"/>'),this.params=t;}postConstruct(){this.gos.setDomData(this.getGui(),gh.DOM_KEY_POPUP_EDITOR_WRAPPER,!0),this.addKeyDownListener();}addKeyDownListener(){const t=this.getGui(),i=this.params;this.addManagedListener(t,"keydown",o=>{lr(this.gos,o,i.node,i.column,!0)||i.onKeyDown(o);});}};El.DOM_KEY_POPUP_EDITOR_WRAPPER="popupEditorWrapper",d([T],El.prototype,"postConstruct",1);var tu=El,iu=class extends V{constructor(e,t,i,s,o){super(),this.rendererVersion=0,this.editorVersion=0,this.beans=e,this.column=t.getColumn(),this.rowNode=t.getRowNode(),this.rowCtrl=t.getRowCtrl(),this.eRow=s,this.cellCtrl=t;const r=document.createElement("div");r.setAttribute("comp-id",`${this.getCompId()}`),this.setTemplateFromElement(r);const n=this.getGui();this.forceWrapper=t.isForceWrapper(),this.refreshWrapper(!1);const l=(h,p)=>{null!=p&&""!=p?n.setAttribute(h,p):n.removeAttribute(h);};le(n,t.getCellAriaRole()),l("col-id",t.getColumnIdSanitised());const a=t.getTabIndex();void 0!==a&&l("tabindex",a.toString()),t.setComp({addOrRemoveCssClass:(h,p)=>this.addOrRemoveCssClass(h,p),setUserStyles:h=>Wn(n,h),getFocusableElement:()=>this.getFocusableElement(),setIncludeSelection:h=>this.includeSelection=h,setIncludeRowDrag:h=>this.includeRowDrag=h,setIncludeDndSource:h=>this.includeDndSource=h,setRenderDetails:(h,p,f)=>this.setRenderDetails(h,p,f),setEditDetails:(h,p,f)=>this.setEditDetails(h,p,f),getCellEditor:()=>this.cellEditor||null,getCellRenderer:()=>this.cellRenderer||null,getParentOfValue:()=>this.getParentOfValue()},this.getGui(),this.eCellWrapper,i,o);}getParentOfValue(){return this.eCellValue?this.eCellValue:this.eCellWrapper?this.eCellWrapper:this.getGui();}setRenderDetails(e,t,i){if(this.cellEditor&&!this.cellEditorPopupWrapper)return;this.firstRender=null==this.firstRender;const o=this.refreshWrapper(!1);this.refreshEditStyles(!1),e?!i&&!o&&this.refreshCellRenderer(e)||(this.destroyRenderer(),this.createCellRendererInstance(e)):(this.destroyRenderer(),this.insertValueWithoutCellRenderer(t));}setEditDetails(e,t,i){e?this.createCellEditorInstance(e,t,i):this.destroyEditor();}removeControls(){this.checkboxSelectionComp=this.beans.context.destroyBean(this.checkboxSelectionComp),this.dndSourceComp=this.beans.context.destroyBean(this.dndSourceComp),this.rowDraggingComp=this.beans.context.destroyBean(this.rowDraggingComp);}refreshWrapper(e){const t=this.includeRowDrag||this.includeDndSource||this.includeSelection,i=t||this.forceWrapper,s=i&&null==this.eCellWrapper;if(s){const u=document.createElement("div");u.setAttribute("role","presentation"),u.setAttribute("class","ag-cell-wrapper"),this.eCellWrapper=u,this.getGui().appendChild(this.eCellWrapper);}const o=!i&&null!=this.eCellWrapper;o&&(at(this.eCellWrapper),this.eCellWrapper=void 0),this.addOrRemoveCssClass("ag-cell-value",!i);const r=!e&&i,n=r&&null==this.eCellValue;if(n){const u=document.createElement("span");u.setAttribute("role","presentation"),u.setAttribute("class","ag-cell-value"),this.eCellValue=u,this.eCellWrapper.appendChild(this.eCellValue);}const l=!r&&null!=this.eCellValue;l&&(at(this.eCellValue),this.eCellValue=void 0);const a=s||o||n||l;
1return a&&this.removeControls(),e||t&&this.addControls(),a;}addControls(){this.includeRowDrag&&null==this.rowDraggingComp&&(this.rowDraggingComp=this.cellCtrl.createRowDragComp(),this.rowDraggingComp&&this.eCellWrapper.insertBefore(this.rowDraggingComp.getGui(),this.eCellValue)),this.includeDndSource&&null==this.dndSourceComp&&(this.dndSourceComp=this.cellCtrl.createDndSource(),this.eCellWrapper.insertBefore(this.dndSourceComp.getGui(),this.eCellValue)),this.includeSelection&&null==this.checkboxSelectionComp&&(this.checkboxSelectionComp=this.cellCtrl.createSelectionCheckbox(),this.eCellWrapper.insertBefore(this.checkboxSelectionComp.getGui(),this.eCellValue));}createCellEditorInstance(e,t,i){const s=this.editorVersion,o=e.newAgStackInstance();if(!o)return;const{params:r}=e;o.then(l=>this.afterCellEditorCreated(s,l,r,t,i)),_(this.cellEditor)&&r.cellStartedEdit&&this.cellCtrl.focusCell(!0);}insertValueWithoutCellRenderer(e){const t=this.getParentOfValue();de(t);const i=null!=e?he(e,!0):null;null!=i&&(t.textContent=i);}destroyEditorAndRenderer(){this.destroyRenderer(),this.destroyEditor();}destroyRenderer(){const{context:e}=this.beans;this.cellRenderer=e.destroyBean(this.cellRenderer),at(this.cellRendererGui),this.cellRendererGui=null,this.rendererVersion++;}destroyEditor(){const{context:e}=this.beans;this.hideEditorPopup&&this.hideEditorPopup(),this.hideEditorPopup=void 0,this.cellEditor=e.destroyBean(this.cellEditor),this.cellEditorPopupWrapper=e.destroyBean(this.cellEditorPopupWrapper),at(this.cellEditorGui),this.cellEditorGui=null,this.editorVersion++;}refreshCellRenderer(e){if(null==this.cellRenderer||null==this.cellRenderer.refresh||this.cellRendererClass!==e.componentClass)return!1;const t=this.cellRenderer.refresh(e.params);return!0===t||void 0===t;}createCellRendererInstance(e){const i=!this.beans.gos.get("suppressAnimationFrame"),s=this.rendererVersion,{componentClass:o}=e,r=()=>{if(this.rendererVersion!==s||!this.isAlive())return;const l=e.newAgStackInstance(),a=this.afterCellRendererCreated.bind(this,s,o);l&&l.then(a);};i&&this.firstRender?this.beans.animationFrameService.createTask(r,this.rowNode.rowIndex,"createTasksP2"):r();}getCtrl(){return this.cellCtrl;}getRowCtrl(){return this.rowCtrl;}getCellRenderer(){return this.cellRenderer;}getCellEditor(){return this.cellEditor;}afterCellRendererCreated(e,t,i){if(this.isAlive()&&e===this.rendererVersion){if(this.cellRenderer=i,this.cellRendererClass=t,this.cellRendererGui=this.cellRenderer.getGui(),null!=this.cellRendererGui){const o=this.getParentOfValue();de(o),o.appendChild(this.cellRendererGui);}}else this.beans.context.destroyBean(i);}afterCellEditorCreated(e,t,i,s,o){if(e!==this.editorVersion)return void this.beans.context.destroyBean(t);if(t.isCancelBeforeStart&&t.isCancelBeforeStart())return this.beans.context.destroyBean(t),void this.cellCtrl.stopEditing(!0);if(!t.getGui)return console.warn(`AG Grid: cellEditor for column ${this.column.getId()} is missing getGui() method`),void this.beans.context.destroyBean(t);this.cellEditor=t,this.cellEditorGui=t.getGui();const l=s||void 0!==t.isPopup&&t.isPopup();l?this.addPopupCellEditor(i,o):this.addInCellEditor(),this.refreshEditStyles(!0,l),t.afterGuiAttached&&t.afterGuiAttached();}refreshEditStyles(e,t){var i;this.addOrRemoveCssClass("ag-cell-inline-editing",e&&!t),this.addOrRemoveCssClass("ag-cell-popup-editing",e&&!!t),this.addOrRemoveCssClass("ag-cell-not-inline-editing",!e||!!t),null==(i=this.rowCtrl)||i.setInlineEditingCss(e);}addInCellEditor(){const e=this.getGui();e.contains(this.beans.gos.getActiveDomElement())&&e.focus(),this.destroyRenderer(),this.refreshWrapper(!0),this.clearParentOfValue(),this.cellEditorGui&&this.getParentOfValue().appendChild(this.cellEditorGui);}addPopupCellEditor(e,t){"fullRow"===this.beans.gos.get("editType")&&console.warn("AG Grid: popup cellEditor does not work with fullRowEdit - you cannot use them both - either turn off fullRowEdit, or stop using popup editors.");const i=this.cellEditor;this.cellEditorPopupWrapper=this.beans.context.createBean(new tu(e));const s=this.cellEditorPopupWrapper.getGui();this.cellEditorGui&&s.appendChild(this.cellEditorGui);const o=this.beans.popupService,r=this.beans.gos.get("stopEditingWhenCellsLoseFocus"),n=t??(i.getPopupPosition?i.getPopupPosition():"over"),l=this.beans.gos.get("enableRtl"),a={ePopup:s,column:this.column,rowNode:this.rowNode,type:"popupCellEditor",eventSource:this.getGui(),position:n,alignSide:l?"right":"left",keepWithinBounds:!0},u=o.positionPopupByComponent.bind(o,a),h=this.beans.localeService.getLocaleTextFunc(),p=o.addPopup({modal:r,eChild:s,closeOnEsc:!0,closedCallback:()=>{this.cellCtrl.onPopupEditorClosed();},anchorToElement:this.getGui(),positionCallback:u,ariaLabel:h("ariaLabelCellEditor","Cell Editor")});p&&(this.hideEditorPopup=p.hideFunc);}detach(){this.eRow.removeChild(this.getGui());}
1destroy(){this.cellCtrl.stopEditing(),this.destroyEditorAndRenderer(),this.removeControls(),super.destroy();}clearParentOfValue(){const e=this.getGui();e.contains(this.beans.gos.getActiveDomElement())&&Ln()&&e.focus({preventScroll:!0}),de(this.getParentOfValue());}},bp=class extends V{constructor(e,t,i){super(),this.cellComps={},this.beans=t,this.rowCtrl=e;const s=document.createElement("div");s.setAttribute("comp-id",`${this.getCompId()}`),s.setAttribute("style",this.getInitialStyle(i)),this.setTemplateFromElement(s);const o=this.getGui(),r=o.style;this.domOrder=this.rowCtrl.getDomOrder(),le(o,"row");const n=this.rowCtrl.getTabIndex();null!=n&&o.setAttribute("tabindex",n.toString()),e.setComp({setDomOrder:a=>this.domOrder=a,setCellCtrls:a=>this.setCellCtrls(a),showFullWidth:a=>this.showFullWidth(a),getFullWidthCellRenderer:()=>this.getFullWidthCellRenderer(),addOrRemoveCssClass:(a,u)=>this.addOrRemoveCssClass(a,u),setUserStyles:a=>Wn(o,a),setTop:a=>r.top=a,setTransform:a=>r.transform=a,setRowIndex:a=>o.setAttribute("row-index",a),setRowId:a=>o.setAttribute("row-id",a),setRowBusinessKey:a=>o.setAttribute("row-business-key",a),refreshFullWidth:a=>this.refreshFullWidth(a)},this.getGui(),i),this.addDestroyFunc(()=>{e.unsetComp(i);});}getInitialStyle(e){const t=this.rowCtrl.getInitialTransform(e);return t?`transform: ${t}`:`top: ${this.rowCtrl.getInitialRowTop(e)}`;}showFullWidth(e){const i=e.newAgStackInstance();i&&i.then(s=>{if(this.isAlive()){const o=s.getGui();this.getGui().appendChild(o),this.rowCtrl.setupDetailRowAutoHeight(o),this.setFullWidthRowComp(s);}else this.beans.context.destroyBean(s);});}setCellCtrls(e){const t=Object.assign({},this.cellComps);e.forEach(s=>{const o=s.getInstanceId();null==this.cellComps[o]?this.newCellComp(s):t[o]=null;});const i=kt(t).filter(s=>null!=s);this.destroyCells(i),this.ensureDomOrder(e);}ensureDomOrder(e){if(!this.domOrder)return;const t=[];e.forEach(i=>{const s=this.cellComps[i.getInstanceId()];s&&t.push(s.getGui());}),Bn(this.getGui(),t);}newCellComp(e){const t=new iu(this.beans,e,this.rowCtrl.isPrintLayout(),this.getGui(),this.rowCtrl.isEditing());this.cellComps[e.getInstanceId()]=t,this.getGui().appendChild(t.getGui());}destroy(){super.destroy(),this.destroyAllCells();}destroyAllCells(){const e=kt(this.cellComps).filter(t=>null!=t);this.destroyCells(e);}setFullWidthRowComp(e){this.fullWidthCellRenderer&&console.error("AG Grid - should not be setting fullWidthRowComponent twice"),this.fullWidthCellRenderer=e,this.addDestroyFunc(()=>{this.fullWidthCellRenderer=this.beans.context.destroyBean(this.fullWidthCellRenderer);});}getFullWidthCellRenderer(){return this.fullWidthCellRenderer;}destroyCells(e){e.forEach(t=>{if(!t)return;const i=t.getCtrl().getInstanceId();this.cellComps[i]===t&&(t.detach(),t.destroy(),this.cellComps[i]=null);});}refreshFullWidth(e){const{fullWidthCellRenderer:t}=this;if(!t||!t.refresh)return!1;const i=e();return t.refresh(i);}},Ri=class extends V{constructor(){super(function Tp(){const e=V.elementGettingCreated.getAttribute("name"),t=Sl.getRowContainerCssClasses(e);let i;return i="center"===e||"topCenter"===e||"stickyTopCenter"===e||"bottomCenter"===e||"stickyBottomCenter"===e?`<div class="${t.viewport}" ref="eViewport" role="presentation">\n <div class="${t.container}" ref="eContainer"></div>\n </div>`:`<div class="${t.container}" ref="eContainer"></div>`,i;}()),this.rowComps={},this.name=V.elementGettingCreated.getAttribute("name"),this.type=eu(this.name);}postConstruct(){const e={setViewportHeight:i=>this.eViewport.style.height=i,setRowCtrls:({rowCtrls:i})=>this.setRowCtrls(i),setDomOrder:i=>{this.domOrder=i;},setContainerWidth:i=>this.eContainer.style.width=i};this.createManagedBean(new Sl(this.name)).setComp(e,this.eContainer,this.eViewport);}preDestroy(){this.setRowCtrls([]);}setRowCtrls(e){const t=M({},this.rowComps);this.rowComps={},this.lastPlacedElement=null,e.forEach(s=>{const o=s.getInstanceId(),r=t[o];if(r)this.rowComps[o]=r,delete t[o],this.ensureDomOrder(r.getGui());else{if(!s.getRowNode().displayed)return;const n=new bp(s,this.beans,this.type);this.rowComps[o]=n,this.appendRow(n.getGui());}}),kt(t).forEach(s=>{this.eContainer.removeChild(s.getGui()),s.destroy();}),le(this.eContainer,"rowgroup");}appendRow(e){this.domOrder?Ka(this.eContainer,e,this.lastPlacedElement):this.eContainer.appendChild(e),this.lastPlacedElement=e;}ensureDomOrder(e){this.domOrder&&(kn(this.eContainer,e,this.lastPlacedElement),this.lastPlacedElement=e);}};d([g("beans")],Ri.prototype,"beans",2),d([A("eViewport")],Ri.prototype,"eViewport",2),d([A("eContainer")],Ri.prototype,"eContainer",2),d([T],Ri.prototype,"postConstruct",1),d([Ee],Ri.prototype,"preDestroy",1);var yr=class{constructor(e){this.columnsToAggregate=[],this.columnsToGroup=[],this.columnsToPivot=[],this.pinned=e;}onDragEnter(e){if(this.clearColumnsList(),this.gos.get("functionsReadOnly"))return;const t=e.dragItem.columns;t&&t.forEach(i=>
1{i.isPrimary()&&(i.isAnyFunctionActive()||(i.isAllowValue()?this.columnsToAggregate.push(i):i.isAllowRowGroup()?this.columnsToGroup.push(i):i.isAllowPivot()&&this.columnsToPivot.push(i)));});}getIconName(){return this.columnsToAggregate.length+this.columnsToGroup.length+this.columnsToPivot.length>0?this.pinned?H.ICON_PINNED:H.ICON_MOVE:null;}onDragLeave(e){this.clearColumnsList();}clearColumnsList(){this.columnsToAggregate.length=0,this.columnsToGroup.length=0,this.columnsToPivot.length=0;}onDragging(e){}onDragStop(e){this.columnsToAggregate.length>0&&this.columnModel.addValueColumns(this.columnsToAggregate,"toolPanelDragAndDrop"),this.columnsToGroup.length>0&&this.columnModel.addRowGroupColumns(this.columnsToGroup,"toolPanelDragAndDrop"),this.columnsToPivot.length>0&&this.columnModel.addPivotColumns(this.columnsToPivot,"toolPanelDragAndDrop");}};d([g("columnModel")],yr.prototype,"columnModel",2),d([g("gridOptionsService")],yr.prototype,"gos",2);var Di=class{static attemptMoveColumns(e){const{isFromHeader:t,hDirection:i,xPosition:s,fromEnter:o,fakeEvent:r,pinned:n,gos:l,columnModel:a}=e,u=0===i,h=1===i;let{allMovingColumns:p}=e;if(t){let P=[];p.forEach(I=>{var G;let N=null,oe=I.getParent();for(;null!=oe&&1===oe.getDisplayedLeafColumns().length;)N=oe,oe=oe.getParent();null!=N?(null!=(G=N.getColGroupDef())&&G.marryChildren?N.getProvidedColumnGroup().getLeafColumns():N.getLeafColumns()).forEach(We=>{P.includes(We)||P.push(We);}):P.includes(I)||P.push(I);}),p=P;}const f=p.slice();a.sortColumnsLikeGridColumns(f);const m=this.calculateValidMoves({movingCols:f,draggingRight:h,xPosition:s,pinned:n,gos:l,columnModel:a}),v=this.calculateOldIndex(f,a);if(0===m.length)return;const w=m[0];let S=null!==v&&!o;if(t&&(S=null!==v),S&&!r&&(u&&w>=v||h&&w<=v))return;const b=a.getAllDisplayedColumns();let E=[],F=null;for(let P=0;P<m.length;P++){const I=m[P],G=a.getProposedColumnOrder(f,I);if(!a.doesOrderPassRules(G))continue;const N=G.filter(te=>b.includes(te));if(null===F)F=N;else if(!pt(N,F))break;const oe=this.groupFragCount(G);E.push({move:I,fragCount:oe});}return 0!==E.length?(E.sort((P,I)=>P.fragCount-I.fragCount),this.moveColumns(p,E[0].move,"uiColumnMoved",!1,a)):void 0;}static moveColumns(e,t,i,s,o){return o.moveColumns(e,t,i,s),s?null:{columns:e,toIndex:t};}static calculateOldIndex(e,t){const i=t.getAllGridColumns(),s=na(e.map(a=>i.indexOf(a))),o=s[0];return Y(s)-o!=s.length-1?null:o;}static groupFragCount(e){function t(s){let o=[],r=s.getOriginalParent();for(;null!=r;)o.push(r),r=r.getOriginalParent();return o;}let i=0;for(let s=0;s<e.length-1;
1s++){let o=t(e[s]),r=t(e[s+1]);[o,r]=o.length>r.length?[o,r]:[r,o],o.forEach(n=>{-1===r.indexOf(n)&&i++;});}return i;}static getDisplayedColumns(e,t){switch(t){case"left":return e.getDisplayedLeftColumns();case"right":return e.getDisplayedRightColumns();default:return e.getDisplayedCenterColumns();}}static calculateValidMoves(e){const{movingCols:t,draggingRight:i,xPosition:s,pinned:o,gos:r,columnModel:n}=e;if(r.get("suppressMovableColumns")||t.some(E=>E.getColDef().suppressMovable))return[];const a=this.getDisplayedColumns(n,o),u=n.getAllGridColumns(),h=a.filter(E=>ze(t,E)),p=a.filter(E=>!ze(t,E)),f=u.filter(E=>!ze(t,E));let w,m=0,v=s;if(i){let E=0;h.forEach(F=>E+=F.getActualWidth()),v-=E;}if(v>0){for(let E=0;E<p.length&&(v-=p[E].getActualWidth(),!(v<0));E++)m++;i&&m++;}m>0?w=f.indexOf(p[m-1])+1:(w=f.indexOf(p[0]),-1===w&&(w=0));const S=[w],b=(E,F)=>E-F;if(i){let E=w+1;const F=u.length-1;for(;E<=F;)S.push(E),E++;S.sort(b);}else{let E=w;const F=u.length-1;let P=u[E];for(;E<=F&&a.indexOf(P)<0;)E++,S.push(E),P=u[E];E=w-1;const I=0;for(;E>=I;)S.push(E),E--;S.sort(b).reverse();}return S;}static normaliseX(e,t,i,s,o){const r=o.getHeaderRowContainerCtrl(t).getViewport();return i&&(e-=r.getBoundingClientRect().left),s.get("enableRtl")&&(e=r.clientWidth-e),null==t&&(e+=o.get("center").getCenterViewportScrollLeft()),e;}},bi=class{constructor(e){this.needToMoveLeft=!1,this.needToMoveRight=!1,this.lastMovedInfo=null,this.pinned=e,this.isCenterContainer=!y(e);}init(){this.ctrlsService.whenReady(e=>{this.gridBodyCon=e.gridBodyCtrl;});}getIconName(){return this.pinned?H.ICON_PINNED:H.ICON_MOVE;}onDragEnter(e){const t=e.dragItem.columns;if(0===e.dragSource.type)this.setColumnsVisible(t,!0,"uiColumnDragged");else{const s=e.dragItem.visibleState,o=(t||[]).filter(r=>s[r.getId()]);this.setColumnsVisible(o,!0,"uiColumnDragged");}this.setColumnsPinned(t,this.pinned,"uiColumnDragged"),this.onDragging(e,!0,!0);}onDragLeave(){this.ensureIntervalCleared(),this.lastMovedInfo=null;}setColumnsVisible(e,t,i){if(e){const s=e.filter(o=>!o.getColDef().lockVisible);this.columnModel.setColumnsVisible(s,t,i);}}setColumnsPinned(e,t,i){if(e){const s=e.filter(o=>!o.getColDef().lockPinned);this.columnModel.setColumnsPinned(s,t,i);}}onDragStop(){this.onDragging(this.lastDraggingEvent,!1,!0,!0),this.ensureIntervalCleared(),this.lastMovedInfo=null;}checkCenterForScrolling(e){if(this.isCenterContainer){const t=this.ctrlsService.get("center"),i=t.getCenterViewportScrollLeft(),s=i+t.getCenterWidth();this.gos.get("enableRtl")?(this.needToMoveRight=e<i+50,this.needToMoveLeft=e>s-50):(this.needToMoveLeft=e<i+50,this.needToMoveRight=e>s-50),this.needToMoveLeft||this.needToMoveRight?this.ensureIntervalStarted():this.ensureIntervalCleared();}}onDragging(e=this.lastDraggingEvent,t=!1,i=!1,s=!1){var o;if(s){if(this.lastMovedInfo){const{columns:h,toIndex:p}=this.lastMovedInfo;Di.moveColumns(h,p,"uiColumnMoved",!0,this.columnModel);}return;}if(this.lastDraggingEvent=e,_(e.hDirection))return;const r=Di.normaliseX(e.x,this.pinned,!1,this.gos,this.ctrlsService);t||this.checkCenterForScrolling(r);const n=this.normaliseDirection(e.hDirection),l=e.dragSource.type,a=(null==(o=e.dragSource.getDragItem().columns)?void 0:o.filter(h=>!h.getColDef().lockPinned||h.getPinned()==this.pinned))||[],u=Di.attemptMoveColumns({allMovingColumns:a,isFromHeader:1===l,hDirection:n,xPosition:r,pinned:this.pinned,fromEnter:t,fakeEvent:i,gos:this.gos,columnModel:this.columnModel});u&&(this.lastMovedInfo=u);}normaliseDirection(e){if(!this.gos.get("enableRtl"))return e;switch(e){case 0:return 1;case 1:return 0;default:console.error(`AG Grid: Unknown direction ${e}`);}}ensureIntervalStarted(){this.movingIntervalId||(this.intervalCount=0,this.failedMoveAttempts=0,this.movingIntervalId=window.setInterval(this.moveInterval.bind(this),100),this.dragAndDropService.setGhostIcon(this.needToMoveLeft?H.ICON_LEFT:H.ICON_RIGHT,!0));}ensureIntervalCleared(){this.movingIntervalId&&(window.clearInterval(this.movingIntervalId),this.movingIntervalId=null,this.dragAndDropService.setGhostIcon(H.ICON_MOVE));}moveInterval(){let e;this.intervalCount++,e=10+5*this.intervalCount,e>100&&(e=100);let t=null;
1const i=this.gridBodyCon.getScrollFeature();if(this.needToMoveLeft?t=i.scrollHorizontally(-e):this.needToMoveRight&&(t=i.scrollHorizontally(e)),0!==t)this.onDragging(this.lastDraggingEvent),this.failedMoveAttempts=0;else{this.failedMoveAttempts++;const o=this.lastDraggingEvent.dragItem.columns.filter(r=>!r.getColDef().lockPinned);o.length>0&&(this.dragAndDropService.setGhostIcon(H.ICON_PINNED),this.failedMoveAttempts>7)&&(this.setColumnsPinned(o,this.needToMoveLeft?"left":"right","uiColumnDragged"),this.dragAndDropService.nudge());}}};d([g("columnModel")],bi.prototype,"columnModel",2),d([g("dragAndDropService")],bi.prototype,"dragAndDropService",2),d([g("gridOptionsService")],bi.prototype,"gos",2),d([g("ctrlsService")],bi.prototype,"ctrlsService",2),d([T],bi.prototype,"init",1);var Ti=class extends R{constructor(e,t){super(),this.pinned=e,this.eContainer=t;}postConstruct(){this.ctrlsService.whenReady(e=>{switch(this.pinned){case"left":this.eSecondaryContainers=[[e.gridBodyCtrl.getBodyViewportElement(),e.left.getContainerElement()],[e.bottomLeft.getContainerElement()],[e.topLeft.getContainerElement()]];break;case"right":this.eSecondaryContainers=[[e.gridBodyCtrl.getBodyViewportElement(),e.right.getContainerElement()],[e.bottomRight.getContainerElement()],[e.topRight.getContainerElement()]];break;default:this.eSecondaryContainers=[[e.gridBodyCtrl.getBodyViewportElement(),e.center.getViewportElement()],[e.bottomCenter.getViewportElement()],[e.topCenter.getViewportElement()]];}});}isInterestedIn(e){return 1===e||0===e&&this.gos.get("allowDragFromColumnsToolPanel");}getSecondaryContainers(){return this.eSecondaryContainers;}getContainer(){return this.eContainer;}init(){this.moveColumnFeature=this.createManagedBean(new bi(this.pinned)),this.bodyDropPivotTarget=this.createManagedBean(new yr(this.pinned)),this.dragAndDropService.addDropTarget(this);}getIconName(){return this.currentDropListener.getIconName();}isDropColumnInPivotMode(e){return this.columnModel.isPivotMode()&&0===e.dragSource.type;}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);}};d([g("dragAndDropService")],Ti.prototype,"dragAndDropService",2),d([g("columnModel")],Ti.prototype,"columnModel",2),d([g("ctrlsService")],Ti.prototype,"ctrlsService",2),d([T],Ti.prototype,"postConstruct",1),d([T],Ti.prototype,"init",1);var is=class fh extends Cl{constructor(t){super(fh.TEMPLATE,t),this.headerCompVersion=0,this.column=t.getColumnGroupChild(),this.pinned=t.getPinned();}postConstruct(){const t=this.getGui();var r,n;r="col-id",null!=(n=this.column.getColId())&&""!=n?t.setAttribute(r,n):t.removeAttribute(r);const s={setWidth:r=>t.style.width=r,addOrRemoveCssClass:(r,n)=>this.addOrRemoveCssClass(r,n),setAriaSort:r=>r?Ma(t,r):Ia(t),setUserCompDetails:r=>this.setUserCompDetails(r),getUserCompInstance:()=>this.headerComp};this.ctrl.setComp(s,this.getGui(),this.eResize,this.eHeaderCompWrapper);const o=this.ctrl.getSelectAllGui();this.eResize.insertAdjacentElement("afterend",o);}destroyHeaderComp(){this.headerComp&&(this.eHeaderCompWrapper.removeChild(this.headerCompGui),this.headerComp=this.destroyBean(this.headerComp),this.headerCompGui=void 0);}setUserCompDetails(t){this.headerCompVersion++;const i=this.headerCompVersion;t.newAgStackInstance().then(s=>this.afterCompCreated(i,s));}afterCompCreated(t,i){t==this.headerCompVersion&&this.isAlive()?(this.destroyHeaderComp(),this.headerComp=i,this.headerCompGui=i.getGui(),this.eHeaderCompWrapper.appendChild(this.headerCompGui),this.ctrl.setDragSource(this.getGui())):this.destroyBean(i);}};is.TEMPLATE='<div class="ag-header-cell" role="columnheader">\n <div ref="eResize" class="ag-header-cell-resize" role="presentation"></div>\n <div ref="eHeaderCompWrapper" class="ag-header-cell-comp-wrapper" role="presentation"></div>\n </div>',d([A("eResize")],is.prototype,"eResize",2),d([A("eHeaderCompWrapper")],is.prototype,"eHeaderCompWrapper",2),d([T],is.prototype,"postConstruct",1),d([Ee],is.prototype,"destroyHeaderComp",1);var Ap=is,Rr=class mh extends Cl{constructor(t){super(mh.TEMPLATE,t);}postConstruct(){const t=this.getGui();
1t.setAttribute("col-id",this.ctrl.getColId()),this.ctrl.setComp({addOrRemoveCssClass:(o,r)=>this.addOrRemoveCssClass(o,r),setResizableDisplayed:o=>K(this.eResize,o),setWidth:o=>t.style.width=o,setAriaExpanded:o=>((o,r)=>null!=r?t.setAttribute(o,r):t.removeAttribute(o))("aria-expanded",o),setUserCompDetails:o=>this.setUserCompDetails(o),getUserCompInstance:()=>this.headerGroupComp},t,this.eResize);}setUserCompDetails(t){t.newAgStackInstance().then(i=>this.afterHeaderCompCreated(i));}afterHeaderCompCreated(t){const i=()=>this.destroyBean(t);if(!this.isAlive())return void i();const s=this.getGui(),o=t.getGui();s.appendChild(o),this.addDestroyFunc(i),this.headerGroupComp=t,this.ctrl.setDragSource(s);}};Rr.TEMPLATE='<div class="ag-header-group-cell" role="columnheader">\n <div ref="eResize" class="ag-header-cell-resize" role="presentation"></div>\n </div>',d([A("eResize")],Rr.prototype,"eResize",2),d([T],Rr.prototype,"postConstruct",1);var Fp=Rr,su=(e=>(e.COLUMN_GROUP="group",e.COLUMN="column",e.FLOATING_FILTER="filter",e))(su||{}),Dr=class extends V{constructor(e){super(),this.headerComps={},this.ctrl=e,this.setTemplate(`<div class="${this.ctrl.getHeaderRowClass()}" role="row"></div>`);}init(){Cn(this.getGui(),this.ctrl.getAriaRowIndex()),this.ctrl.setComp({setHeight:t=>this.getGui().style.height=t,setTop:t=>this.getGui().style.top=t,setHeaderCtrls:(t,i)=>this.setHeaderCtrls(t,i),setWidth:t=>this.getGui().style.width=t});}destroyHeaderCtrls(){this.setHeaderCtrls([],!1);}setHeaderCtrls(e,t){if(!this.isAlive())return;const i=this.headerComps;if(this.headerComps={},e.forEach(s=>{const o=s.getInstanceId();let r=i[o];delete i[o],null==r&&(r=this.createHeaderComp(s),this.getGui().appendChild(r.getGui())),this.headerComps[o]=r;}),Se(i,(s,o)=>{this.getGui().removeChild(o.getGui()),this.destroyBean(o);}),t){const s=kt(this.headerComps);s.sort((r,n)=>r.getCtrl().getColumnGroupChild().getLeft()-n.getCtrl().getColumnGroupChild().getLeft());const o=s.map(r=>r.getGui());Bn(this.getGui(),o);}}createHeaderComp(e){let t;switch(this.ctrl.getType()){case"group":t=new Fp(e);break;case"filter":t=new Ud(e);break;default:t=new Ap(e);}return this.createBean(t),t.setParentComponent(this),t;}};d([T],Dr.prototype,"init",1),d([Ee],Dr.prototype,"destroyHeaderCtrls",1);var Pp=0,Nt=class Ch extends R{constructor(t,i,s){super(),this.resizeToggleTimeout=0,this.resizeMultiplier=1,this.resizeFeature=null,this.lastFocusEvent=null,this.dragSource=null,this.columnGroupChild=t,this.parentRowCtrl=s,this.beans=i,this.instanceId=t.getUniqueId()+"-"+Pp++;}postConstruct(){this.addManagedPropertyListeners(["suppressHeaderFocus"],()=>this.refreshTabIndex());}shouldStopEventPropagation(t){const{headerRowIndex:i,column:s}=this.focusService.getFocusedHeader();return td(this.gos,t,i,s);}getWrapperHasFocus(){return this.gos.getActiveDomElement()===this.eGui;}setGui(t){this.eGui=t,this.addDomData(),this.addManagedListener(this.beans.eventService,c.EVENT_DISPLAYED_COLUMNS_CHANGED,this.onDisplayedColumnsChanged.bind(this)),this.onDisplayedColumnsChanged(),this.refreshTabIndex();}onDisplayedColumnsChanged(){!this.comp||!this.column||(this.refreshFirstAndLastStyles(),this.refreshAriaColIndex());}refreshFirstAndLastStyles(){const{comp:t,column:i,beans:s}=this;so.refreshFirstAndLastStyles(t,i,s.columnModel);}refreshAriaColIndex(){const{beans:t,column:i}=this,s=t.columnModel.getAriaColumnIndex(i);vn(this.eGui,s);}addResizeAndMoveKeyboardListeners(){this.resizeFeature&&(this.addManagedListener(this.eGui,"keydown",this.onGuiKeyDown.bind(this)),this.addManagedListener(this.eGui,"keyup",this.onGuiKeyUp.bind(this)));}refreshTabIndex(){this.gos.get("suppressHeaderFocus")?this.eGui.removeAttribute("tabindex"):this.eGui.setAttribute("tabindex","-1");}onGuiKeyDown(t){var i;const s=this.gos.getActiveDomElement(),o=t.key===C.LEFT||t.key===C.RIGHT;if(this.isResizing&&(t.preventDefault(),t.stopImmediatePropagation()),s!==this.eGui||!t.shiftKey&&!t.altKey||((this.isResizing||o)&&(t.preventDefault(),t.stopImmediatePropagation()),!o))return;const r=t.key===C.LEFT!==this.gos.get("enableRtl"),n=ll[r?"Left":"Right"];if(t.altKey){this.isResizing=!0,this.resizeMultiplier+=1;const l=this.getViewportAdjustedResizeDiff(t);this.resizeHeader(l,t.shiftKey),null==(i=this.resizeFeature)||i.toggleColumnResizing(!0);}else this.moveHeader(n);}getViewportAdjustedResizeDiff(t){let i=this.getResizeDiff(t);if(this.column.getPinned()){const o=this.pinnedWidthService.getPinnedLeftWidth(),r=this.pinnedWidthService.getPinnedRightWidth(),n=ci(this.ctrlsService.getGridBodyCtrl().getBodyViewportElement())-50;if(o+r+i>n){if(!(n>o+r))return 0;i=n-o-r;}}return i;}getResizeDiff(t){let i=t.key===C.LEFT!==this.gos.get("enableRtl");const s=this.column.getPinned(),o=this.gos.get("enableRtl");return s&&o!==("right"===s)&&(i=!i),(i?-1:1)*this.resizeMultiplier;}onGuiKeyUp(){this.isResizing&&(this.resizeToggleTimeout&&(window.clearTimeout(this.resizeToggleTimeout),this.resizeToggleTimeout=0),this.isResizing=!1,this.resizeMultiplier=1,this.resizeToggleTimeout=setTimeout(()=>{var t;null==(t=this.resizeFeature)||t.toggleColumnResizing(!1);},150));}handleKeyDown(t){const i=this.getWrapperHasFocus();switch(t.key){case C.PAGE_DOWN:case C.PAGE_UP:case C.PAGE_HOME:case C.PAGE_END:i&&t.preventDefault();}}addDomData(){const t=Ch.DOM_DATA_KEY_HEADER_CTRL;this.gos.setDomData(this.eGui,t,this),this.addDestroyFunc(()=>this.gos.setDomData(this.eGui,t,null));}getGui(){return this.eGui;}focus(t){return!!this.eGui&&(this.lastFocusEvent=t||null,this.eGui.focus(),!0);}getRowIndex(){return this.parentRowCtrl.getRowIndex();}getParentRowCtrl(){return this.parentRowCtrl;}getPinned(){return this.parentRowCtrl.getPinned();}getInstanceId(){return this.instanceId;}getColumnGroupChild(){return this.columnGroupChild;}removeDragSource(){this.dragSource&&(this.dragAndDropService.removeDragSource(this.dragSource),this.dragSource=null);}handleContextMenuMouseEvent(t,i,s){const o=t??i;this.gos.get("preventDefaultOnContextMenu")&&o.preventDefault();const r=s instanceof Z?s:void 0;this.menuService.isHeaderContextMenuEnabled(r)&&this.menuService.showHeaderContextMenu(r,t,i),this.dispatchColumnMouseEvent(c.EVENT_COLUMN_HEADER_CONTEXT_MENU,s);}dispatchColumnMouseEvent(t,i){this.eventService.dispatchEvent({type:t,column:i});}destroy(){super.destroy(),this.removeDragSource(),this.comp=null,this.column=null,this.resizeFeature=null,this.lastFocusEvent=null,this.columnGroupChild=null,this.parentRowCtrl=null,this.eGui=null;}};Nt.DOM_DATA_KEY_HEADER_CTRL="headerCtrl",d([g("pinnedWidthService")],Nt.prototype,"pinnedWidthService",2),d([g("focusService")],Nt.prototype,"focusService",2),d([g("userComponentFactory")],Nt.prototype,"userComponentFactory",2),d([g("ctrlsService")],Nt.prototype,"ctrlsService",2),d([g("dragAndDropService")],Nt.prototype,"dragAndDropService",2),d([g("menuService")],Nt.prototype,"menuService",2),d([T],Nt.prototype,"postConstruct",1);var oo=Nt,ro=class extends R{constructor(e,t,i,s){super(),this.columnOrGroup=e,this.eCell=t,this.ariaEl=this.eCell.querySelector("[role=columnheader]")||this.eCell,this.colsSpanning=s,this.beans=i;}setColsSpanning(e){this.colsSpanning=e,this.onLeftChanged();}getColumnOrGroup(){return this.beans.gos.get("enableRtl")&&this.colsSpanning?Y(this.colsSpanning):this.columnOrGroup;}postConstruct(){this.addManagedListener(this.columnOrGroup,Z.EVENT_LEFT_CHANGED,this.onLeftChanged.bind(this)),this.setLeftFirstTime(),this.addManagedListener(this.eventService,c.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,this.onLeftChanged.bind(this)),this.addManagedPropertyListener("domLayout",this.onLeftChanged.bind(this));}setLeftFirstTime(){const e=this.beans.gos.get("suppressColumnMoveAnimation"),t=y(this.columnOrGroup.getOldLeft());this.beans.columnAnimationService.isActive()&&t&&!e?this.animateInLeft():this.onLeftChanged();}animateInLeft(){const e=this.getColumnOrGroup(),t=e.getLeft(),i=e.getOldLeft(),s=this.modifyLeftForPrintLayout(e,i),o=this.modifyLeftForPrintLayout(e,t);this.setLeft(s),this.actualLeft=o,this.beans.columnAnimationService.executeNextVMTurn(()=>
1{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){if(!this.beans.gos.isDomLayout("print")||"left"===e.getPinned())return t;const s=this.beans.columnModel.getDisplayedColumnsLeftWidth();return"right"===e.getPinned()?s+this.beans.columnModel.getBodyContainerWidth()+t:s+t;}setLeft(e){let t;if(y(e)&&(this.eCell.style.left=`${e}px`),this.columnOrGroup instanceof Z)t=this.columnOrGroup;else{const s=this.columnOrGroup.getLeafColumns();if(!s.length)return;s.length>1&&La(this.ariaEl,s.length),t=s[0];}}};d([T],ro.prototype,"postConstruct",1);var no=class extends R{constructor(e,t){super(),this.columns=e,this.element=t;}postConstruct(){this.gos.get("columnHoverHighlight")&&this.addMouseHoverListeners();}addMouseHoverListeners(){this.addManagedListener(this.element,"mouseout",this.onMouseOut.bind(this)),this.addManagedListener(this.element,"mouseover",this.onMouseOver.bind(this));}onMouseOut(){this.columnHoverService.clearMouseOver();}onMouseOver(){this.columnHoverService.setMouseOver(this.columns);}};d([g("columnHoverService")],no.prototype,"columnHoverService",2),d([T],no.prototype,"postConstruct",1);var ou=class extends oo{constructor(e,t,i){super(e,t,i),this.iconCreated=!1,this.column=e;}setComp(e,t,i,s){this.comp=e,this.eButtonShowMainFilter=i,this.eFloatingFilterBody=s,this.setGui(t),this.setupActive(),this.setupWidth(),this.setupLeft(),this.setupHover(),this.setupFocus(),this.setupAria(),this.setupFilterButton(),this.setupUserComp(),this.setupSyncWithFilter(),this.setupUi(),this.addManagedListener(this.eButtonShowMainFilter,"click",this.showParentFilter.bind(this)),this.setupFilterChangedListener(),this.addManagedListener(this.column,Z.EVENT_COL_DEF_CHANGED,this.onColDefChanged.bind(this));}resizeHeader(){}moveHeader(){}setupActive(){const e=this.column.getColDef();this.active=!!e.filter&&!!e.floatingFilter;}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=re("filter",this.gos,this.column);e&&(this.iconCreated=!0,this.eButtonShowMainFilter.appendChild(e));}setupFocus(){this.createManagedBean(new Lt(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.localeService.getLocaleTextFunc();Ke(this.eButtonShowMainFilter,e("ariaFilterMenuOpen","Open Filter Menu"));}onTabKeyDown(e){if(this.gos.getActiveDomElement()===this.eGui)return;const s=this.focusService.findNextFocusableElement(this.eGui,null,e.shiftKey);if(s)return this.beans.headerNavigationService.scrollToColumn(this.column),e.preventDefault(),void s.focus();const o=this.findNextColumnWithFloatingFilter(e.shiftKey);o&&this.focusService.focusHeaderPosition({headerPosition:{headerRowIndex:this.getParentRowCtrl().getRowIndex(),column:o},event:e})&&e.preventDefault();}findNextColumnWithFloatingFilter(e){const t=this.beans.columnModel;let i=this.column;do{if(i=e?t.getDisplayedColBefore(i):t.getDisplayedColAfter(i),!i)break;}while(!i.getColDef().filter||!i.getColDef().floatingFilter);return i;}handleKeyDown(e){super.handleKeyDown(e);const t=this.getWrapperHasFocus();switch(e.key){case C.UP:case C.DOWN:t||e.preventDefault();case C.LEFT:case C.RIGHT:if(t)return;e.stopPropagation();case C.ENTER:t&&this.focusService.focusInto(this.eGui)&&e.preventDefault();break;case C.ESCAPE:t||this.eGui.focus();}}onFocusIn(e){if(this.eGui.contains(e.relatedTarget))return;const i=!!e.relatedTarget&&!e.relatedTarget.classList.contains("ag-floating-filter"),s=!!e.relatedTarget&&hi(e.relatedTarget,"ag-floating-filter");if(i&&s&&e.target===this.eGui){const r=this.lastFocusEvent;r&&r&&r.key===C.TAB&&this.focusService.focusInto(this.eGui,r.shiftKey);}const o=this.getRowIndex();this.beans.focusService.setFocusedHeader(o,this.column);}setupHover(){this.createManagedBean(new no([this.column],this.eGui));const e=()=>{if(!this.gos.get("columnHoverHighlight"))return;const t=this.beans.columnHoverService.isHovered(this.column);this.comp.addOrRemoveCssClass("ag-column-hover",t);};this.addManagedListener(this.eventService,c.EVENT_COLUMN_HOVER_CHANGED,e),e();}setupLeft(){const e=new ro(this.column,this.eGui,this.beans);this.createManagedBean(e);}setupFilterButton(){this.suppressFilterButton=!this.menuService.isFloatingFilterButtonEnabled(this.column),this.highlightFilterButtonWhenActive=!this.menuService.isLegacyMenuEnabled();}setupUserComp(){if(!this.active)return;
1const e=this.beans.filterManager.getFloatingFilterCompDetails(this.column,()=>this.showParentFilter());e&&this.setCompDetails(e);}setCompDetails(e){this.userCompDetails=e,this.comp.setCompDetails(e);}showParentFilter(){this.menuService.showFilterMenu({column:this.column,buttonElement:this.suppressFilterButton?this.eFloatingFilterBody:this.eButtonShowMainFilter,containerType:"floatingFilter",positionBy:"button"});}setupSyncWithFilter(){if(!this.active)return;const{filterManager:e}=this.beans,t=i=>{if("filterDestroyed"===i?.source&&this.context.isDestroyed())return;const s=this.comp.getFloatingFilterComp();s&&s.then(o=>{var r;if(o){const n=e.getCurrentFloatingFilterParentModel(this.column);o.onParentModelChanged(n,i?this.gos.addGridCommonParams({columns:null!=(r=i.columns)?r:[],type:c.EVENT_FILTER_CHANGED,source:"api"===i.source?"api":"columnFilter"}):null);}});};this.destroySyncListener=this.addManagedListener(this.column,Z.EVENT_FILTER_CHANGED,t),e.isFilterActive(this.column)&&t(null);}setupWidth(){const e=()=>{const t=`${this.column.getActualWidth()}px`;this.comp.setWidth(t);};this.addManagedListener(this.column,Z.EVENT_WIDTH_CHANGED,e),e();}setupFilterChangedListener(){this.active&&(this.destroyFilterChangedListener=this.addManagedListener(this.column,Z.EVENT_FILTER_CHANGED,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(){var e,t;const i=this.active;this.setupActive();const s=!i&&this.active;i&&!this.active&&(null==(e=this.destroySyncListener)||e.call(this),null==(t=this.destroyFilterChangedListener)||t.call(this));const o=this.active?this.beans.filterManager.getFloatingFilterCompDetails(this.column,()=>this.showParentFilter()):null,r=this.comp.getFloatingFilterComp();r&&o?r.then(n=>{var l;!n||this.beans.filterManager.areFilterCompsDifferent(null!=(l=this.userCompDetails)?l:null,o)?this.updateCompDetails(o,s):this.updateFloatingFilterParams(o);}):this.updateCompDetails(o,s);}updateCompDetails(e,t){this.isAlive()&&(this.setCompDetails(e),this.setupFilterButton(),this.setupUi(),t&&(this.setupSyncWithFilter(),this.setupFilterChangedListener()));}updateFloatingFilterParams(e){var t;if(!e)return;const i=e.params;null==(t=this.comp.getFloatingFilterComp())||t.then(s=>{let o=!1;s?.refresh&&"function"==typeof s.refresh&&null!==s.refresh(i)&&(o=!0),!o&&s?.onParamsUpdated&&"function"==typeof s.onParamsUpdated&&null!==s.onParamsUpdated(i)&&O("Custom floating filter method 'onParamsUpdated' is deprecated. Use 'refresh' instead.");});}destroy(){super.destroy(),this.eButtonShowMainFilter=null,this.eFloatingFilterBody=null,this.userCompDetails=null,this.destroySyncListener=null,this.destroyFilterChangedListener=null;}},ss=class extends R{constructor(e,t,i,s,o){super(),this.pinned=e,this.column=t,this.eResize=i,this.comp=s,this.ctrl=o;}postConstruct(){const e=[];let t,i;const s=()=>
1{if(K(this.eResize,t),!t)return;const n=this.horizontalResizeService.addResizeBar({eResizeBar:this.eResize,onResizeStart:this.onResizeStart.bind(this),onResizing:this.onResizing.bind(this,!1),onResizeEnd:this.onResizing.bind(this,!0)});if(e.push(n),i){const l=this.gos.get("skipHeaderOnAutoSize"),a=()=>{this.columnModel.autoSizeColumn(this.column,"uiColumnResized",l);};this.eResize.addEventListener("dblclick",a);const u=new me(this.eResize);u.addEventListener(me.EVENT_DOUBLE_TAP,a),e.push(()=>{this.eResize.removeEventListener("dblclick",a),u.removeEventListener(me.EVENT_DOUBLE_TAP,a),u.destroy();});}},o=()=>{e.forEach(n=>n()),e.length=0;},r=()=>{const n=this.column.isResizable(),l=!this.gos.get("suppressAutoSize")&&!this.column.getColDef().suppressAutoSize;(n!==t||l!==i)&&(t=n,i=l,o(),s());};r(),this.addDestroyFunc(o),this.ctrl.addRefreshFunction(r);}onResizing(e,t){const{column:i,lastResizeAmount:s,resizeStartWidth:o}=this,r=this.normaliseResizeAmount(t),l=[{key:i,newWidth:o+r}];this.column.getPinned()&&this.pinnedWidthService.getPinnedLeftWidth()+this.pinnedWidthService.getPinnedRightWidth()+(r-s)>ci(this.ctrlsService.getGridBodyCtrl().getBodyViewportElement())-50||(this.lastResizeAmount=r,this.columnModel.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.comp.addOrRemoveCssClass("ag-column-resizing",e);}normaliseResizeAmount(e){let t=e;const i="left"!==this.pinned,s="right"===this.pinned;return this.gos.get("enableRtl")?i&&(t*=-1):s&&(t*=-1),t;}};d([g("horizontalResizeService")],ss.prototype,"horizontalResizeService",2),d([g("pinnedWidthService")],ss.prototype,"pinnedWidthService",2),d([g("ctrlsService")],ss.prototype,"ctrlsService",2),d([g("columnModel")],ss.prototype,"columnModel",2),d([T],ss.prototype,"postConstruct",1);var yl=class extends R{constructor(e){super(),this.cbSelectAllVisible=!1,this.processingEventFromCheckbox=!1,this.column=e;}onSpaceKeyDown(e){const t=this.cbSelectAll;t.isDisplayed()&&!t.getGui().contains(this.gos.getActiveDomElement())&&(e.preventDefault(),t.setValue(!t.getValue()));}getCheckboxGui(){return this.cbSelectAll.getGui();}setComp(e){this.headerCellCtrl=e,this.cbSelectAll=this.createManagedBean(new qs()),this.cbSelectAll.addCssClass("ag-header-select-all"),le(this.cbSelectAll.getGui(),"presentation"),this.showOrHideSelectAll(),this.addManagedListener(this.eventService,c.EVENT_NEW_COLUMNS_LOADED,this.onNewColumnsLoaded.bind(this)),this.addManagedListener(this.eventService,c.EVENT_DISPLAYED_COLUMNS_CHANGED,this.onDisplayedColumnsChanged.bind(this)),this.addManagedListener(this.eventService,c.EVENT_SELECTION_CHANGED,this.onSelectionChanged.bind(this)),this.addManagedListener(this.eventService,c.EVENT_PAGINATION_CHANGED,this.onSelectionChanged.bind(this)),this.addManagedListener(this.eventService,c.EVENT_MODEL_UPDATED,this.onModelChanged.bind(this)),this.addManagedListener(this.cbSelectAll,c.EVENT_FIELD_VALUE_CHANGED,this.onCbSelectAll.bind(this)),Os(this.cbSelectAll.getGui(),!0),this.cbSelectAll.getInputElement().setAttribute("tabindex","-1"),this.refreshSelectAllLabel();}onNewColumnsLoaded(){this.showOrHideSelectAll();}onDisplayedColumnsChanged(){this.isAlive()&&this.showOrHideSelectAll();}showOrHideSelectAll(){this.cbSelectAllVisible=this.isCheckboxSelection(),this.cbSelectAll.setDisplayed(this.cbSelectAllVisible,{skipAriaHidden:!0}),this.cbSelectAllVisible&&(this.checkRightRowModelType("selectAllCheckbox"),this.checkSelectionType("selectAllCheckbox"),this.updateStateOfCheckbox()),this.refreshSelectAllLabel();}onModelChanged(){this.cbSelectAllVisible&&this.updateStateOfCheckbox();}onSelectionChanged(){this.cbSelectAllVisible&&this.updateStateOfCheckbox();}updateStateOfCheckbox(){if(this.processingEventFromCheckbox)return;this.processingEventFromCheckbox=!0;const e=this.selectionService.getSelectAllState(this.isFilteredOnly(),this.isCurrentPageOnly());this.cbSelectAll.setValue(e);const t=this.selectionService.hasNodesToSelect(this.isFilteredOnly(),this.isCurrentPageOnly());this.cbSelectAll.setDisabled(!t),this.refreshSelectAllLabel(),this.processingEventFromCheckbox=!1;}refreshSelectAllLabel(){const e=this.localeService.getLocaleTextFunc(),i=this.cbSelectAll.getValue()?e("ariaChecked","checked"):e("ariaUnchecked","unchecked"),s=e("ariaRowSelectAll","Press Space to toggle all rows selection");
1this.headerCellCtrl.setAriaDescriptionProperty("selectAll",this.cbSelectAllVisible?`${s} (${i})`:null),this.cbSelectAll.setInputAriaLabel(`${s} (${i})`),this.headerCellCtrl.announceAriaDescription();}checkSelectionType(e){return"multiple"===this.gos.get("rowSelection")||(console.warn(`AG Grid: ${e} is only available if using 'multiple' rowSelection.`),!1);}checkRightRowModelType(e){const t=this.rowModel.getType();return"clientSide"===t||"serverSide"===t||(console.warn(`AG Grid: ${e} is only available if using 'clientSide' or 'serverSide' rowModelType, you are using ${t}.`),!1);}onCbSelectAll(){if(this.processingEventFromCheckbox||!this.cbSelectAllVisible)return;const e=this.cbSelectAll.getValue(),t=this.isFilteredOnly(),i=this.isCurrentPageOnly();let s="uiSelectAll";i?s="uiSelectAllCurrentPage":t&&(s="uiSelectAllFiltered");const o={source:s,justFiltered:t,justCurrentPage:i};e?this.selectionService.selectAllRowNodes(o):this.selectionService.deselectAllRowNodes(o);}isCheckboxSelection(){let e=this.column.getColDef().headerCheckboxSelection;return"function"==typeof e&&(e=e(this.gos.addGridCommonParams({column:this.column,colDef:this.column.getColDef()}))),!!e&&this.checkRightRowModelType("headerCheckboxSelection")&&this.checkSelectionType("headerCheckboxSelection");}isFilteredOnly(){return!!this.column.getColDef().headerCheckboxSelectionFilteredOnly;}isCurrentPageOnly(){return!!this.column.getColDef().headerCheckboxSelectionCurrentPageOnly;}};d([g("rowModel")],yl.prototype,"rowModel",2),d([g("selectionService")],yl.prototype,"selectionService",2);var ru=class extends oo{constructor(e,t,i){super(e,t,i),this.refreshFunctions=[],this.userHeaderClasses=new Set(),this.ariaDescriptionProperties=new Map(),this.column=e;}setComp(e,t,i,s){this.comp=e,this.setGui(t),this.updateState(),this.setupWidth(),this.setupMovingCss(),this.setupMenuClass(),this.setupSortableClass(),this.setupWrapTextClass(),this.refreshSpanHeaderHeight(),this.setupAutoHeight(s),this.addColumnHoverListener(),this.setupFilterClass(),this.setupClassesFromColDef(),this.setupTooltip(),this.addActiveHeaderMouseListeners(),this.setupSelectAll(),this.setupUserComp(),this.refreshAria(),this.resizeFeature=this.createManagedBean(new ss(this.getPinned(),this.column,i,e,this)),this.createManagedBean(new no([this.column],t)),this.createManagedBean(new ro(this.column,t,this.beans)),this.createManagedBean(new Lt(t,{shouldStopEventPropagation:o=>this.shouldStopEventPropagation(o),onTabKeyDown:()=>null,handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this),onFocusOut:this.onFocusOut.bind(this)})),this.addResizeAndMoveKeyboardListeners(),this.addManagedPropertyListeners(["suppressMovableColumns","suppressMenuHide","suppressAggFuncInHeader"],this.refresh.bind(this)),this.addManagedListener(this.column,Z.EVENT_COL_DEF_CHANGED,this.refresh.bind(this)),this.addManagedListener(this.eventService,c.EVENT_COLUMN_VALUE_CHANGED,this.onColumnValueChanged.bind(this)),this.addManagedListener(this.eventService,c.EVENT_COLUMN_ROW_GROUP_CHANGED,this.onColumnRowGroupChanged.bind(this)),this.addManagedListener(this.eventService,c.EVENT_COLUMN_PIVOT_CHANGED,this.onColumnPivotChanged.bind(this)),this.addManagedListener(this.eventService,c.EVENT_HEADER_HEIGHT_CHANGED,this.onHeaderHeightChanged.bind(this));}resizeHeader(e,t){var i,s;if(!this.column.isResizable())return;const o=this.column.getActualWidth(),r=null!=(i=this.column.getMinWidth())?i:0,n=null!=(s=this.column.getMaxWidth())?s:Number.MAX_SAFE_INTEGER,l=Math.min(Math.max(o+e,r),n);this.beans.columnModel.setColumnWidths([{key:this.column,newWidth:l}],t,!0,"uiColumnResized");}moveHeader(e){const{eGui:t,column:i,gos:s,ctrlsService:o}=this,r=this.getPinned(),n=t.getBoundingClientRect().left,l=i.getActualWidth(),a=s.get("enableRtl"),h=Di.normaliseX(0===e!==a?n-20:n+l+20,r,!0,s,o);Di.attemptMoveColumns({allMovingColumns:[i],isFromHeader:!0,hDirection:e,xPosition:h,pinned:r,fromEnter:!1,fakeEvent:!1,gos:s,columnModel:this.beans.columnModel}),o.getGridBodyCtrl().getScrollFeature().ensureColumnVisible(i,"auto");}
1setupUserComp(){const e=this.lookupUserCompDetails();this.setCompDetails(e);}setCompDetails(e){this.userCompDetails=e,this.comp.setUserCompDetails(e);}lookupUserCompDetails(){const e=this.createParams(),t=this.column.getColDef();return this.userComponentFactory.getHeaderCompDetails(t,e);}createParams(){return this.gos.addGridCommonParams({column:this.column,displayName:this.displayName,enableSorting:this.column.isSortable(),enableMenu:this.menuEnabled,enableFilterButton:this.openFilterEnabled&&this.menuService.isHeaderFilterButtonEnabled(this.column),enableFilterIcon:!this.openFilterEnabled||this.menuService.isLegacyMenuEnabled(),showColumnMenu:t=>{this.menuService.showColumnMenu({column:this.column,buttonElement:t,positionBy:"button"});},showColumnMenuAfterMouseClick:t=>{this.menuService.showColumnMenu({column:this.column,mouseEvent:t,positionBy:"mouse"});},showFilter:t=>{this.menuService.showFilterMenu({column:this.column,buttonElement:t,containerType:"columnFilter",positionBy:"button"});},progressSort:t=>{this.beans.sortController.progressSort(this.column,!!t,"uiColumnSorted");},setSort:(t,i)=>{this.beans.sortController.setSortForColumn(this.column,t,!!i,"uiColumnSorted");},eGridHeader:this.getGui(),setTooltip:(t,i)=>{this.setupTooltip(t,i);}});}setupSelectAll(){this.selectAllFeature=this.createManagedBean(new yl(this.column)),this.selectAllFeature.setComp(this);}getSelectAllGui(){return this.selectAllFeature.getCheckboxGui();}handleKeyDown(e){super.handleKeyDown(e),e.key===C.SPACE&&this.selectAllFeature.onSpaceKeyDown(e),e.key===C.ENTER&&this.onEnterKeyDown(e),e.key===C.DOWN&&e.altKey&&this.showMenuOnKeyPress(e,!1);}onEnterKeyDown(e){e.ctrlKey||e.metaKey?this.showMenuOnKeyPress(e,!0):this.sortable&&this.beans.sortController.progressSort(this.column,e.shiftKey,"uiColumnSorted");}showMenuOnKeyPress(e,t){const i=this.comp.getUserCompInstance();!i||!(i instanceof il)||i.onMenuKeyboardShortcut(t)&&e.preventDefault();}onFocusIn(e){if(!this.getGui().contains(e.relatedTarget)){const t=this.getRowIndex();this.focusService.setFocusedHeader(t,this.column),this.announceAriaDescription();}this.focusService.isKeyboardMode()&&this.setActiveHeader(!0);}onFocusOut(e){this.getGui().contains(e.relatedTarget)||this.setActiveHeader(!1);}setupTooltip(e,t){this.tooltipFeature&&(this.tooltipFeature=this.destroyBean(this.tooltipFeature));const i="whenTruncated"===this.gos.get("tooltipShowMode"),s=this.eGui,o=this.column.getColDef();!t&&i&&!o.headerComponent&&(t=()=>{const l=s.querySelector(".ag-header-cell-text");return!l||l.scrollWidth>l.clientWidth;});const n=this.createManagedBean(new mt({getColumn:()=>this.column,getColDef:()=>this.column.getColDef(),getGui:()=>s,getLocation:()=>"header",getTooltipValue:()=>e??this.column.getColDef().headerTooltip,shouldDisplayTooltip:t}));this.refreshFunctions.push(()=>n.refreshToolTip());}setupClassesFromColDef(){const e=()=>{const t=this.column.getColDef(),i=so.getHeaderClassesFromColDef(t,this.gos,this.column,null),s=this.userHeaderClasses;this.userHeaderClasses=new Set(i),i.forEach(o=>{s.has(o)?s.delete(o):this.comp.addOrRemoveCssClass(o,!0);}),s.forEach(o=>this.comp.addOrRemoveCssClass(o,!1));};this.refreshFunctions.push(e),e();}setDragSource(e){if(this.dragSourceElement=e,this.removeDragSource(),!e||!this.draggable)return;const{column:t,beans:i,displayName:s,dragAndDropService:o,gos:r}=this,{columnModel:n}=i;let l=!this.gos.get("suppressDragLeaveHidesColumns");const a=this.dragSource={type:1,eElement:e,getDefaultIconName:()=>l?H.ICON_HIDE:H.ICON_NOT_ALLOWED,getDragItem:()=>this.createDragItem(t),dragItemName:s,onDragStarted:()=>{l=!r.get("suppressDragLeaveHidesColumns"),t.setMoving(!0,"uiColumnMoved");},onDragStopped:()=>t.setMoving(!1,"uiColumnMoved"),onGridEnter:u=>{var h;if(l){const p=(null==(h=u?.columns)?void 0:h.filter(f=>!f.getColDef().lockVisible))||[];n.setColumnsVisible(p,!0,"uiColumnMoved");}},onGridExit:u=>{var h;if(l){const p=(null==(h=u?.columns)?void 0:h.filter(f=>!f.getColDef().lockVisible))||[];n.setColumnsVisible(p,!1,"uiColumnMoved");}}};o.addDragSource(a,!0);}createDragItem(e){const t={};return t[e.getId()]=e.isVisible(),{columns:[e],visibleState:t};}updateState(){this.menuEnabled=this.menuService.isColumnMenuInHeaderEnabled(this.column),this.openFilterEnabled=this.menuService.isFilterMenuInHeaderEnabled(this.column),this.sortable=this.column.isSortable(),this.displayName=this.calculateDisplayName(),this.draggable=this.workOutDraggable();}addRefreshFunction(e){this.refreshFunctions.push(e);}refresh(){this.updateState(),this.refreshHeaderComp(),this.refreshAria(),this.refreshFunctions.forEach(e
1=>e());}refreshHeaderComp(){const e=this.lookupUserCompDetails();null!=this.comp.getUserCompInstance()&&this.userCompDetails.componentClass==e.componentClass&&this.attemptHeaderCompRefresh(e.params)?this.setDragSource(this.dragSourceElement):this.setCompDetails(e);}attemptHeaderCompRefresh(e){const t=this.comp.getUserCompInstance();return!(!t||!t.refresh)&&t.refresh(e);}calculateDisplayName(){return this.beans.columnModel.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;}onColumnRowGroupChanged(){this.checkDisplayName();}onColumnPivotChanged(){this.checkDisplayName();}onColumnValueChanged(){this.checkDisplayName();}setupWidth(){const e=()=>{const t=this.column.getActualWidth();this.comp.setWidth(`${t}px`);};this.addManagedListener(this.column,Z.EVENT_WIDTH_CHANGED,e),e();}setupMovingCss(){const e=()=>{this.comp.addOrRemoveCssClass("ag-header-cell-moving",this.column.isMoving());};this.addManagedListener(this.column,Z.EVENT_MOVING_CHANGED,e),e();}setupMenuClass(){const e=()=>{this.comp.addOrRemoveCssClass("ag-column-menu-visible",this.column.isMenuVisible());};this.addManagedListener(this.column,Z.EVENT_MENU_VISIBLE_CHANGED,e),e();}setupSortableClass(){const e=()=>{this.comp.addOrRemoveCssClass("ag-header-cell-sortable",!!this.sortable);};e(),this.addRefreshFunction(e),this.addManagedListener(this.eventService,Z.EVENT_SORT_CHANGED,this.refreshAriaSort.bind(this));}setupFilterClass(){const e=()=>{const t=this.column.isFilterActive();this.comp.addOrRemoveCssClass("ag-header-cell-filtered",t),this.refreshAria();};this.addManagedListener(this.column,Z.EVENT_FILTER_ACTIVE_CHANGED,e),e();}setupWrapTextClass(){const e=()=>{const t=!!this.column.getColDef().wrapHeaderText;this.comp.addOrRemoveCssClass("ag-header-cell-wrap-text",t);};e(),this.addRefreshFunction(e);}onDisplayedColumnsChanged(){super.onDisplayedColumnsChanged(),this.isAlive()&&this.onHeaderHeightChanged();}onHeaderHeightChanged(){this.refreshSpanHeaderHeight();}refreshSpanHeaderHeight(){const{eGui:e,column:t,comp:i,beans:s}=this;if(!t.isSpanHeaderHeight())return e.style.removeProperty("top"),e.style.removeProperty("height"),i.addOrRemoveCssClass("ag-header-span-height",!1),void i.addOrRemoveCssClass("ag-header-span-total",!1);const{numberOfParents:o,isSpanningTotal:r}=this.column.getColumnGroupPaddingInfo();i.addOrRemoveCssClass("ag-header-span-height",o>0);const{columnModel:n}=s,l=n.getColumnHeaderRowHeight();if(0===o)return i.addOrRemoveCssClass("ag-header-span-total",!1),e.style.setProperty("top","0px"),void e.style.setProperty("height",`${l}px`);i.addOrRemoveCssClass("ag-header-span-total",r);const h=o*(n.isPivotMode()?n.getPivotGroupHeaderHeight():n.getGroupHeaderHeight());e.style.setProperty("top",-h+"px"),e.style.setProperty("height",`${l+h}px`);}setupAutoHeight(e){const{columnModel:t,resizeObserverService:i}=this.beans,s=u=>{if(!this.isAlive())return;const{paddingTop:h,paddingBottom:p,borderBottomWidth:f,borderTopWidth:m}=Wt(this.getGui()),S=e.offsetHeight+(h+p+f+m);if(u<5){const b=this.beans.gos.getDocument();if(!b||!b.contains(e)||0==S)return void window.setTimeout(()=>s(u+1),0);}t.setColumnHeaderHeight(this.column,S);};let r,o=!1;const n=()=>{const u=this.column.isAutoHeaderHeight();u&&!o&&l(),!u&&o&&a();},l=()=>{o=!0,s(0),this.comp.addOrRemoveCssClass("ag-header-cell-auto-height",!0),r=i.observeResize(e,()=>s(0));},a=()=>{o=!1,r&&r(),this.comp.addOrRemoveCssClass("ag-header-cell-auto-height",!1),r=void 0;};n(),this.addDestroyFunc(()=>a()),this.addManagedListener(this.column,Z.EVENT_WIDTH_CHANGED,()=>o&&s(0)),this.addManagedListener(this.eventService,Z.EVENT_SORT_CHANGED,()=>{o&&window.setTimeout(()=>s(0));}),this.addRefreshFunction(n);}refreshAriaSort(){if(this.sortable){const e=this.localeService.getLocaleTextFunc(),t=this.beans.sortController.getDisplaySortForColumn(this.column)||null;this.comp.setAriaSort(Sa(t)),this.setAriaDescriptionProperty("sort",e("ariaSortableColumn","Press ENTER to sort"));}else this.comp.setAriaSort(),this.setAriaDescriptionProperty("sort",null);}
1refreshAriaMenu(){if(this.menuEnabled){const e=this.localeService.getLocaleTextFunc();this.setAriaDescriptionProperty("menu",e("ariaMenuColumn","Press ALT DOWN to open column menu"));}else this.setAriaDescriptionProperty("menu",null);}refreshAriaFilterButton(){if(this.openFilterEnabled&&!this.menuService.isLegacyMenuEnabled()){const e=this.localeService.getLocaleTextFunc();this.setAriaDescriptionProperty("filterButton",e("ariaFilterColumn","Press CTRL ENTER to open filter"));}else this.setAriaDescriptionProperty("filterButton",null);}refreshAriaFiltered(){const e=this.localeService.getLocaleTextFunc();this.column.isFilterActive()?this.setAriaDescriptionProperty("filter",e("ariaColumnFiltered","Column Filtered")):this.setAriaDescriptionProperty("filter",null);}setAriaDescriptionProperty(e,t){null!=t?this.ariaDescriptionProperties.set(e,t):this.ariaDescriptionProperties.delete(e);}announceAriaDescription(){if(!this.eGui.contains(this.beans.gos.getActiveDomElement()))return;const e=Array.from(this.ariaDescriptionProperties.keys()).sort((t,i)=>"filter"===t?-1:i.charCodeAt(0)-t.charCodeAt(0)).map(t=>this.ariaDescriptionProperties.get(t)).join(". ");this.beans.ariaAnnouncementService.announceValue(e);}refreshAria(){this.refreshAriaSort(),this.refreshAriaMenu(),this.refreshAriaFilterButton(),this.refreshAriaFiltered();}addColumnHoverListener(){const e=()=>{if(!this.gos.get("columnHoverHighlight"))return;const t=this.beans.columnHoverService.isHovered(this.column);this.comp.addOrRemoveCssClass("ag-column-hover",t);};this.addManagedListener(this.eventService,c.EVENT_COLUMN_HOVER_CHANGED,e),e();}getColId(){return this.column.getColId();}addActiveHeaderMouseListeners(){const e=s=>this.handleMouseOverChange("mouseenter"===s.type);this.addManagedListener(this.getGui(),"mouseenter",e),this.addManagedListener(this.getGui(),"mouseleave",e),this.addManagedListener(this.getGui(),"click",()=>this.dispatchColumnMouseEvent(c.EVENT_COLUMN_HEADER_CLICKED,this.column)),this.addManagedListener(this.getGui(),"contextmenu",s=>this.handleContextMenuMouseEvent(s,void 0,this.column));}handleMouseOverChange(e){this.setActiveHeader(e),this.eventService.dispatchEvent({type:e?c.EVENT_COLUMN_HEADER_MOUSE_OVER:c.EVENT_COLUMN_HEADER_MOUSE_LEAVE,column:this.column});}setActiveHeader(e){this.comp.addOrRemoveCssClass("ag-header-active",e);}getAnchorElementForMenu(e){const t=this.comp.getUserCompInstance();return t instanceof il?t.getAnchorElementForMenu(e):this.getGui();}destroy(){super.destroy(),this.refreshFunctions=null,this.selectAllFeature=null,this.dragSourceElement=null,this.userCompDetails=null,this.userHeaderClasses=null,this.ariaDescriptionProperties=null;}},lo=class extends R{constructor(e,t,i,s){super(),this.eResize=t,this.comp=e,this.pinned=i,this.columnGroup=s;}postConstruct(){if(!this.columnGroup.isResizable())return void this.comp.setResizableDisplayed(!1);const e=this.horizontalResizeService.addResizeBar({eResizeBar:this.eResize,onResizeStart:this.onResizeStart.bind(this),onResizing:this.onResizing.bind(this,!1),onResizeEnd:this.onResizing.bind(this,!0)});if(this.addDestroyFunc(e),!this.gos.get("suppressAutoSize")){const t=this.gos.get("skipHeaderOnAutoSize");this.eResize.addEventListener("dblclick",()=>{const i=[];this.columnGroup.getDisplayedLeafColumns().forEach(o=>{o.getColDef().suppressAutoSize||i.push(o.getColId());}),i.length>0&&this.columnModel.autoSizeColumns({columns:i,skipHeader:t,stopAtGroup:this.columnGroup,source:"uiColumnResized"}),this.resizeLeafColumnsToFit("uiColumnResized");});}}onResizeStart(e){const t=this.getInitialValues(e);this.storeLocalValues(t),this.toggleColumnResizing(!0);}onResizing(e,t,i="uiColumnResized"){const s=this.normaliseDragChange(t);this.resizeColumnsFromLocalValues(this.resizeStartWidth+s,i,e);}getInitialValues(e){const t=this.getColumnsToResize(),i=this.getInitialSizeOfColumns(t),o={columnsToResize:t,resizeStartWidth:i,resizeRatios:this.getSizeRatiosOfColumns(t,i)};let r=null;if(e&&(r=this.columnModel.getDisplayedGroupAtDirection(this.columnGroup,"After")),r){const n=r.getDisplayedLeafColumns(),l=o.groupAfterColumns=n.filter(u=>u.isResizable()),a=o.groupAfterStartWidth=this.getInitialSizeOfColumns(l);o.groupAfterRatios=this.getSizeRatiosOfColumns(l,a);}else o.groupAfterColumns=void 0,o.groupAfterStartWidth=void 0,o.groupAfterRatios=void 0;return o;}storeLocalValues(e){const{columnsToResize:t,resizeStartWidth:i,resizeRatios:s,groupAfterColumns:o,groupAfterStartWidth:r,groupAfterRatios:n}=e;this.resizeCols=t,this.resizeStartWidth=i,this.resizeRatios=s,this.resizeTakeFromCols=o,this.resizeTakeFromStartWidth=r,this.resizeTakeFromRatios=n;}clearLocalValues(){this.resizeCols=void 0,this.resizeRatios=void 0,this.resizeTakeFromCols=void 0,this.resizeTakeFromRatios=void 0;}resizeLeafColumnsToFit(e){const t=this.autoWidthCalculator.getPreferredWidthForColumnGroup(this.columnGroup),i=this.getInitialValues();t>i.resizeStartWidth&&this.resizeColumns(i,t,e,!0);}resizeColumnsFromLocalValues(e,t,i=!0){var s,o,r;if(!this.resizeCols||!this.resizeRatios)return;const n={columnsToResize:this.resizeCols,resizeStartWidth:this.resizeStartWidth,resizeRatios:this.resizeRatios,groupAfterColumns:null!=(s=this.resizeTakeFromCols)?s:void 0,groupAfterStartWidth:null!=(o=this.resizeTakeFromStartWidth)?o:void 0,groupAfterRatios:null!=(r=this.resizeTakeFromRatios)?r:void 0};this.resizeColumns(n,e,t,i);}resizeColumns(e,t,i,s=!0){const{columnsToResize:o,resizeStartWidth:r,resizeRatios:n,groupAfterColumns:l,groupAfterStartWidth:a,groupAfterRatios:u}=e,h=[];h.push({columns:o,ratios:n,width:t}),l&&h.push({columns:l,ratios:u,width:a-(t-r)}),this.columnModel.resizeColumnSets({resizeSets:h,finished:s,source:i}),s&&this.toggleColumnResizing(!1);}toggleColumnResizing(e){this.comp.addOrRemoveCssClass("ag-column-resizing",e);}getColumnsToResize(){return this.columnGroup.getDisplayedLeafColumns().filter(t=>t.isResizable());}getInitialSizeOfColumns(e){return e.reduce((t,i)=>t+i.getActualWidth(),0);}getSizeRatiosOfColumns(e,t){return e.map(i=>i.getActualWidth()/t);}normaliseDragChange(e){let t=e;return this.gos.get("enableRtl")?"left"!==this.pinned&&(t*=-1):"right"===this.pinned&&(t*=-1),t;}destroy(){super.destroy(),this.clearLocalValues();}};d([g("horizontalResizeService")],lo.prototype,"horizontalResizeService",2),d([g("autoWidthCalculator")],lo.prototype,"autoWidthCalculator",2),d([g("columnModel")],lo.prototype,"columnModel",2),d([T],lo.prototype,"postConstruct",1);var nu=class extends R{constructor(e,t){super(),this.removeChildListenersFuncs=[],this.columnGroup=t,this.comp=e;}
1postConstruct(){this.addListenersToChildrenColumns(),this.addManagedListener(this.columnGroup,pe.EVENT_DISPLAYED_CHILDREN_CHANGED,this.onDisplayedChildrenChanged.bind(this)),this.onWidthChanged(),this.addDestroyFunc(this.removeListenersOnChildrenColumns.bind(this));}addListenersToChildrenColumns(){this.removeListenersOnChildrenColumns();const e=this.onWidthChanged.bind(this);this.columnGroup.getLeafColumns().forEach(t=>{t.addEventListener("widthChanged",e),t.addEventListener("visibleChanged",e),this.removeChildListenersFuncs.push(()=>{t.removeEventListener("widthChanged",e),t.removeEventListener("visibleChanged",e);});});}removeListenersOnChildrenColumns(){this.removeChildListenersFuncs.forEach(e=>e()),this.removeChildListenersFuncs=[];}onDisplayedChildrenChanged(){this.addListenersToChildrenColumns(),this.onWidthChanged();}onWidthChanged(){const e=this.columnGroup.getActualWidth();this.comp.setWidth(`${e}px`),this.comp.addOrRemoveCssClass("ag-hidden",0===e);}};d([T],nu.prototype,"postConstruct",1);var lu=class extends oo{constructor(e,t,i){super(e,t,i),this.onSuppressColMoveChange=()=>{if(!this.isAlive()||this.isSuppressMoving())this.removeDragSource();else if(!this.dragSource){const s=this.getGui();this.setDragSource(s);}},this.column=e;}setComp(e,t,i){this.comp=e,this.setGui(t),this.displayName=this.beans.columnModel.getDisplayNameForColumnGroup(this.column,"header"),this.addClasses(),this.setupMovingCss(),this.setupExpandable(),this.setupTooltip(),this.addDestroyFunc(()=>{this.tooltipFeature&&(this.tooltipFeature=this.destroyBean(this.tooltipFeature));}),this.setupUserComp(),this.addHeaderMouseListeners();const s=this.getParentRowCtrl().getPinned(),o=this.column.getProvidedColumnGroup().getLeafColumns();this.createManagedBean(new no(o,t)),this.createManagedBean(new ro(this.column,t,this.beans)),this.createManagedBean(new nu(e,this.column)),this.resizeFeature=this.createManagedBean(new lo(e,i,s,this.column)),this.createManagedBean(new Lt(t,{shouldStopEventPropagation:this.shouldStopEventPropagation.bind(this),onTabKeyDown:()=>{},handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this)})),this.addManagedPropertyListener(c.EVENT_SUPPRESS_COLUMN_MOVE_CHANGED,this.onSuppressColMoveChange),this.addResizeAndMoveKeyboardListeners();}resizeHeader(e,t){if(!this.resizeFeature)return;const i=this.resizeFeature.getInitialValues(t);this.resizeFeature.resizeColumns(i,i.resizeStartWidth+e,"uiColumnResized",!0);}moveHeader(e){const{beans:t,eGui:i,column:s,gos:o,ctrlsService:r}=this,n=o.get("enableRtl"),l=0===e,a=this.getPinned(),u=i.getBoundingClientRect(),h=u.left,f=Di.normaliseX(l!==n?h-20:h+u.width+20,a,!0,o,r),m=s.getGroupId(),v=this.focusService.getFocusedHeader();Di.attemptMoveColumns({allMovingColumns:this.column.getLeafColumns(),isFromHeader:!0,hDirection:e,xPosition:f,pinned:a,fromEnter:!1,fakeEvent:!1,gos:o,columnModel:t.columnModel});const w=s.getDisplayedLeafColumns(),S=l?w[0]:Y(w);this.ctrlsService.getGridBodyCtrl().getScrollFeature().ensureColumnVisible(S,"auto"),!this.isAlive()&&v&&this.restoreFocus(m,s,v);}restoreFocus(e,t,i){const s=t.getLeafColumns();if(!s.length)return;const o=s[0].getParent();if(!o)return;const r=this.findGroupWidthId(o,e);r&&this.focusService.focusHeaderPosition({headerPosition:x(M({},i),{column:r})});}findGroupWidthId(e,t){for(;e;){if(e.getGroupId()===t)return e;e=e.getParent();}return null;}resizeLeafColumnsToFit(e){this.resizeFeature&&this.resizeFeature.resizeLeafColumnsToFit(e);}setupUserComp(){const e=this.gos.addGridCommonParams({displayName:this.displayName,columnGroup:this.column,setExpanded:i=>{this.beans.columnModel.setColumnGroupOpened(this.column.getProvidedColumnGroup(),i,"gridInitializing");},setTooltip:(i,s)=>{this.setupTooltip(i,s);}}),t=this.userComponentFactory.getHeaderGroupCompDetails(e);this.comp.setUserCompDetails(t);}addHeaderMouseListeners(){const e=s=>this.handleMouseOverChange("mouseenter"===s.type);this.addManagedListener(this.getGui(),"mouseenter",e),this.addManagedListener(this.getGui(),"mouseleave",e),this.addManagedListener(this.getGui(),"click",()=>this.dispatchColumnMouseEvent(c.EVENT_COLUMN_HEADER_CLICKED,this.column.getProvidedColumnGroup())),this.addManagedListener(this.getGui(),"contextmenu",s=>this.handleContextMenuMouseEvent(s,void 0,this.column.getProvidedColumnGroup()));}handleMouseOverChange(e){const i={type:e?c.EVENT_COLUMN_HEADER_MOUSE_OVER:c.EVENT_COLUMN_HEADER_MOUSE_LEAVE,column:this.column.getProvidedColumnGroup()};this.eventService.dispatchEvent(i);}setupTooltip(e,t){this.tooltipFeature&&(this.tooltipFeature=this.destroyBean(this.tooltipFeature));const i=this.column.getColGroupDef(),s="whenTruncated"===this.gos.get("tooltipShowMode"),o=this.eGui;!t&&s&&!i?.headerGroupComponent&&(t=()=>{const n=o.querySelector(".ag-header-group-text");return!n||n.scrollWidth>n.clientWidth;});const r={getColumn:()=>this.column,getGui:()=>o,getLocation:()=>"headerGroup",getTooltipValue:()=>e??(i&&i.headerTooltip),shouldDisplayTooltip:t};
1i&&(r.getColDef=()=>i),this.createBean(new mt(r));}setupExpandable(){const e=this.column.getProvidedColumnGroup();this.refreshExpanded(),this.addManagedListener(e,ae.EVENT_EXPANDABLE_CHANGED,this.refreshExpanded.bind(this)),this.addManagedListener(e,ae.EVENT_EXPANDED_CHANGED,this.refreshExpanded.bind(this));}refreshExpanded(){const e=this.column;this.expandable=e.isExpandable();const t=e.isExpanded();this.comp.setAriaExpanded(this.expandable?t?"true":"false":void 0);}getColId(){return this.column.getUniqueId();}addClasses(){const e=this.column.getColGroupDef(),t=so.getHeaderClassesFromColDef(e,this.gos,null,this.column);this.column.isPadding()?(t.push("ag-header-group-cell-no-group"),this.column.getLeafColumns().every(s=>s.isSpanHeaderHeight())&&t.push("ag-header-span-height")):t.push("ag-header-group-cell-with-group"),t.forEach(i=>this.comp.addOrRemoveCssClass(i,!0));}setupMovingCss(){const t=this.column.getProvidedColumnGroup().getLeafColumns(),i=()=>this.comp.addOrRemoveCssClass("ag-header-cell-moving",this.column.isMoving());t.forEach(s=>{this.addManagedListener(s,Z.EVENT_MOVING_CHANGED,i);}),i();}onFocusIn(e){if(!this.eGui.contains(e.relatedTarget)){const t=this.getRowIndex();this.beans.focusService.setFocusedHeader(t,this.column);}}handleKeyDown(e){super.handleKeyDown(e);const t=this.getWrapperHasFocus();if(this.expandable&&t&&e.key===C.ENTER){const i=this.column,s=!i.isExpanded();this.beans.columnModel.setColumnGroupOpened(i.getProvidedColumnGroup(),s,"uiColumnExpanded");}}setDragSource(e){if(!this.isAlive()||this.isSuppressMoving()||(this.removeDragSource(),!e))return;const{beans:t,column:i,displayName:s,gos:o,dragAndDropService:r}=this,{columnModel:n}=t,l=i.getProvidedColumnGroup().getLeafColumns();let a=!o.get("suppressDragLeaveHidesColumns");const u=this.dragSource={type:1,eElement:e,getDefaultIconName:()=>a?H.ICON_HIDE:H.ICON_NOT_ALLOWED,dragItemName:s,getDragItem:()=>this.getDragItemForGroup(i),onDragStarted:()=>{a=!o.get("suppressDragLeaveHidesColumns"),l.forEach(h=>h.setMoving(!0,"uiColumnDragged"));},onDragStopped:()=>l.forEach(h=>h.setMoving(!1,"uiColumnDragged")),onGridEnter:h=>{var p;if(a){const f=(null==(p=h?.columns)?void 0:p.filter(m=>!m.getColDef().lockVisible))||[];n.setColumnsVisible(f,!0,"uiColumnMoved");}},onGridExit:h=>{var p;if(a){const f=(null==(p=h?.columns)?void 0:p.filter(m=>!m.getColDef().lockVisible))||[];n.setColumnsVisible(f,!1,"uiColumnMoved");}}};r.addDragSource(u,!0);}getDragItemForGroup(e){const t=e.getProvidedColumnGroup().getLeafColumns(),i={};t.forEach(o=>i[o.getId()]=o.isVisible());const s=[];return this.beans.columnModel.getAllDisplayedColumns().forEach(o=>{t.indexOf(o)>=0&&(s.push(o),Ge(t,o));}),t.forEach(o=>s.push(o)),{columns:s,visibleState:i};}isSuppressMoving(){let e=!1;return this.column.getLeafColumns().forEach(i=>{(i.getColDef().suppressMovable||i.getColDef().lockPosition)&&(e=!0);}),e||this.gos.get("suppressMovableColumns");}},Lp=0,os=class extends R{constructor(e,t,i){super(),this.instanceId=Lp++,this.rowIndex=e,this.pinned=t,this.type=i,this.headerRowClass="ag-header-row "+("group"==i?"ag-header-row-column-group":"filter"==i?"ag-header-row-column-filter":"ag-header-row-column");}postConstruct(){this.isPrintLayout=this.gos.isDomLayout("print"),this.isEnsureDomOrder=this.gos.get("ensureDomOrder");}getInstanceId(){return this.instanceId;}setComp(e,t=!0){this.comp=e,t&&(this.onRowHeightChanged(),this.onVirtualColumnsChanged()),this.setWidth(),this.addEventListeners();}getHeaderRowClass(){return this.headerRowClass;}getAriaRowIndex(){return this.rowIndex+1;}addEventListeners(){this.addManagedListener(this.eventService,c.EVENT_COLUMN_RESIZED,this.onColumnResized.bind(this)),this.addManagedListener(this.eventService,c.EVENT_DISPLAYED_COLUMNS_CHANGED,this.onDisplayedColumnsChanged.bind(this)),this.addManagedListener(this.eventService,c.EVENT_VIRTUAL_COLUMNS_CHANGED,e=>this.onVirtualColumnsChanged(e.afterScroll)),this.addManagedListener(this.eventService,c.EVENT_COLUMN_HEADER_HEIGHT_CHANGED,this.onRowHeightChanged.bind(this)),this.addManagedListener(this.eventService,c.EVENT_GRID_STYLES_CHANGED,this.onRowHeightChanged.bind(this)),this.addManagedListener(this.eventService,c.EVENT_ADVANCED_FILTER_ENABLED_CHANGED,this.onRowHeightChanged.bind(this)),this.addManagedPropertyListener("domLayout",this.onDisplayedColumnsChanged.bind(this)),this.addManagedPropertyListener("ensureDomOrder",e=>this.isEnsureDomOrder=e.currentValue),this.addManagedPropertyListener("headerHeight",this.onRowHeightChanged.bind(this)),this.addManagedPropertyListener("pivotHeaderHeight",this.onRowHeightChanged.bind(this)),this.addManagedPropertyListener("groupHeaderHeight",this.onRowHeightChanged.bind(this)),this.addManagedPropertyListener("pivotGroupHeaderHeight",this.onRowHeightChanged.bind(this)),this.addManagedPropertyListener("floatingFiltersHeight",this.onRowHeightChanged.bind(this));}getHeaderCellCtrl(e){if(this.headerCellCtrls)return li(this.headerCellCtrls).find(t=>t.getColumnGroupChild()===e);}onDisplayedColumnsChanged(){this.isPrintLayout=this.gos.isDomLayout("print"),this.onVirtualColumnsChanged(),this.setWidth(),this.onRowHeightChanged();}getType(){return this.type;}onColumnResized(){this.setWidth();}setWidth(){const e=this.getWidthForRow();this.comp.setWidth(`${e}px`);}getWidthForRow(){const{columnModel:e}=this.beans;return this.isPrintLayout?null!=this.pinned?0:e.getContainerWidth("right")+e.getContainerWidth("left")+e.getContainerWidth(null):e.getContainerWidth(this.pinned);}onRowHeightChanged(){var{topOffset:e,rowHeight:t}=this.getTopAndHeight();this.comp.setTop(e+"px"),this.comp.setHeight(t+"px");}getTopAndHeight(){const{columnModel:e,filterManager:t}=this.beans;let i=e.getHeaderRowCount();const s=[];let o=0;t.hasFloatingFilters()&&(i++,o=1);const r=e.getColumnGroupHeaderRowHeight(),n=e.getColumnHeaderRowHeight(),a=i-(1+o);for(let p=0;p<a;p++)s.push(r);s.push(n);for(let p=0;p<o;p++)s.push(e.getFloatingFiltersHeight());let u=0;for(let p=0;p<this.rowIndex;p++)u+=s[p];return{topOffset:u,rowHeight:s[this.rowIndex]};}getPinned(){return this.pinned;}getRowIndex(){return this.rowIndex;}onVirtualColumnsChanged(e=!1){const t=this.getHeaderCtrls();this.comp.setHeaderCtrls(t,this.isEnsureDomOrder||this.isPrintLayout,e);}getHeaderCtrls(){const e=this.headerCellCtrls;this.headerCellCtrls=new Map();const t=this.getColumnsInViewport();for(const o of t)this.recycleAndCreateHeaderCtrls(o,e);const i=o=>{const{focusService:r,columnModel:n}=this.beans;return!!r.isHeaderWrapperFocused(o)&&n.isDisplayed(o.getColumnGroupChild());};if(e)for(const[o,r]of e)i(r)?this.headerCellCtrls.set(o,r):this.destroyBean(r);return Array.from(this.headerCellCtrls.values());}recycleAndCreateHeaderCtrls(e,t){if(!this.headerCellCtrls||e.isEmptyGroup())return;const i=e.getUniqueId();let s;if(t&&(s=t.get(i),t.delete(i)),s&&s.getColumnGroupChild()!=e&&(this.destroyBean(s),s=void 0),null==s)switch(this.type){case"filter":s=this.createBean(new ou(e,this.beans,this));break;case"group":s=this.createBean(new lu(e,this.beans,this));break;default:s=this.createBean(new ru(e,this.beans,this));}this.headerCellCtrls.set(i,s);}getColumnsInViewport(){return this.isPrintLayout?this.getColumnsInViewportPrintLayout():this.getColumnsInViewportNormalLayout();}getColumnsInViewportPrintLayout(){if(null!=this.pinned)return[];let e=[];const t=this.getActualDepth(),{columnModel:i}=this.beans;return["left",null,"right"].forEach(s=>{const o=i.getVirtualHeaderGroupRow(s,t);e=e.concat(o);}),e;}getActualDepth(){return"filter"==this.type?this.rowIndex-1:this.rowIndex;}getColumnsInViewportNormalLayout(){return this.beans.columnModel.getVirtualHeaderGroupRow(this.pinned,this.getActualDepth());}focusHeader(e,t){if(!this.headerCellCtrls)return!1;const s=Array.from(this.headerCellCtrls.values()).find(o=>o.getColumnGroupChild()==e);return!!s&&s.focus(t);}
1destroy(){this.headerCellCtrls&&this.headerCellCtrls.forEach(e=>{this.destroyBean(e);}),this.headerCellCtrls=void 0,super.destroy();}};d([g("beans")],os.prototype,"beans",2),d([T],os.prototype,"postConstruct",1);var jt=class extends R{constructor(e){super(),this.hidden=!1,this.includeFloatingFilter=!1,this.groupsRowCtrls=[],this.pinned=e;}setComp(e,t){this.comp=e,this.eViewport=t,this.setupCenterWidth(),this.setupPinnedWidth(),this.setupDragAndDrop(this.eViewport),this.addManagedListener(this.eventService,c.EVENT_GRID_COLUMNS_CHANGED,this.onGridColumnsChanged.bind(this)),this.addManagedListener(this.eventService,c.EVENT_DISPLAYED_COLUMNS_CHANGED,this.onDisplayedColumnsChanged.bind(this)),this.addManagedListener(this.eventService,c.EVENT_ADVANCED_FILTER_ENABLED_CHANGED,this.onDisplayedColumnsChanged.bind(this)),this.ctrlsService.registerHeaderContainer(this,this.pinned),this.columnModel.isReady()&&this.refresh();}setupDragAndDrop(e){const t=new Ti(this.pinned,e);this.createManagedBean(t);}refresh(e=!1){const t=new gi(),i=this.focusService.getFocusHeaderToUseAfterRefresh();(()=>{const l=this.columnModel.getHeaderRowCount()-1;this.groupsRowCtrls=this.destroyBeans(this.groupsRowCtrls);for(let a=0;a<l;a++){const u=this.createBean(new os(t.next(),this.pinned,"group"));this.groupsRowCtrls.push(u);}})(),(()=>{const l=t.next(),a=!(this.hidden||null!=this.columnsRowCtrl&&e&&this.columnsRowCtrl.getRowIndex()===l);(a||this.hidden)&&(this.columnsRowCtrl=this.destroyBean(this.columnsRowCtrl)),a&&(this.columnsRowCtrl=this.createBean(new os(l,this.pinned,"column")));})(),(()=>{this.includeFloatingFilter=this.filterManager.hasFloatingFilters()&&!this.hidden;const l=()=>{this.filtersRowCtrl=this.destroyBean(this.filtersRowCtrl);};
1if(!this.includeFloatingFilter)return void l();const a=t.next();if(this.filtersRowCtrl){const u=this.filtersRowCtrl.getRowIndex()!==a;(!e||u)&&l();}this.filtersRowCtrl||(this.filtersRowCtrl=this.createBean(new os(a,this.pinned,"filter")));})();const n=this.getAllCtrls();this.comp.setCtrls(n),this.restoreFocusOnHeader(i);}restoreFocusOnHeader(e){null==e||e.column.getPinned()!=this.pinned||this.focusService.focusHeaderPosition({headerPosition:e});}getAllCtrls(){const e=[...this.groupsRowCtrls];return this.columnsRowCtrl&&e.push(this.columnsRowCtrl),this.filtersRowCtrl&&e.push(this.filtersRowCtrl),e;}onGridColumnsChanged(){this.refresh(!0);}onDisplayedColumnsChanged(){const e=this.filterManager.hasFloatingFilters()&&!this.hidden;this.includeFloatingFilter!==e&&this.refresh(!0);}setupCenterWidth(){null==this.pinned&&this.createManagedBean(new ts(e=>this.comp.setCenterWidth(`${e}px`),!0));}setHorizontalScroll(e){this.comp.setViewportScrollLeft(e);}setupPinnedWidth(){if(null==this.pinned)return;const e="left"===this.pinned,t="right"===this.pinned;this.hidden=!0;const i=()=>{const s=e?this.pinnedWidthService.getPinnedLeftWidth():this.pinnedWidthService.getPinnedRightWidth();if(null==s)return;const o=0==s,r=this.hidden!==o,n=this.gos.get("enableRtl"),l=this.gos.getScrollbarWidth(),u=this.scrollVisibleService.isVerticalScrollShowing()&&(n&&e||!n&&t)?s+l:s;this.comp.setPinnedContainerWidth(`${u}px`),this.comp.setDisplayed(!o),r&&(this.hidden=o,this.refresh());};this.addManagedListener(this.eventService,c.EVENT_LEFT_PINNED_WIDTH_CHANGED,i),this.addManagedListener(this.eventService,c.EVENT_RIGHT_PINNED_WIDTH_CHANGED,i),this.addManagedListener(this.eventService,c.EVENT_SCROLL_VISIBILITY_CHANGED,i),this.addManagedListener(this.eventService,c.EVENT_SCROLLBAR_WIDTH_CHANGED,i);}getHeaderCtrlForColumn(e){if(e instanceof Z)return this.columnsRowCtrl?this.columnsRowCtrl.getHeaderCellCtrl(e):void 0;if(0!==this.groupsRowCtrls.length)for(let t=0;t<this.groupsRowCtrls.length;t++){const i=this.groupsRowCtrls[t].getHeaderCellCtrl(e);if(i)return i;}}getHtmlElementForColumnHeader(e){const t=this.getHeaderCtrlForColumn(e);return t?t.getGui():null;}getRowType(e){const i=this.getAllCtrls()[e];return i?i.getType():void 0;}focusHeader(e,t,i){const o=this.getAllCtrls()[e];return!!o&&o.focusHeader(t,i);}getViewport(){return this.eViewport;}getRowCount(){return this.groupsRowCtrls.length+(this.columnsRowCtrl?1:0)+(this.filtersRowCtrl?1:0);}destroy(){this.filtersRowCtrl&&(this.filtersRowCtrl=this.destroyBean(this.filtersRowCtrl)),this.columnsRowCtrl&&(this.columnsRowCtrl=this.destroyBean(this.columnsRowCtrl)),this.groupsRowCtrls&&this.groupsRowCtrls.length&&(this.groupsRowCtrls=this.destroyBeans(this.groupsRowCtrls)),super.destroy();}};d([g("ctrlsService")],jt.prototype,"ctrlsService",2),d([g("scrollVisibleService")],jt.prototype,"scrollVisibleService",2),d([g("pinnedWidthService")],jt.prototype,"pinnedWidthService",2),d([g("columnModel")],jt.prototype,"columnModel",2),d([g("focusService")],jt.prototype,"focusService",2),d([g("filterManager")],jt.prototype,"filterManager",2);var Ai=class Kr extends V{constructor(t){super(),this.headerRowComps={},this.rowCompsList=[],this.pinned=t;}init(){this.selectAndSetTemplate();const t={setDisplayed:s=>this.setDisplayed(s),setCtrls:s=>this.setCtrls(s),setCenterWidth:s=>this.eCenterContainer.style.width=s,setViewportScrollLeft:s=>this.getGui().scrollLeft=s,setPinnedContainerWidth:s=>{const o=this.getGui();o.style.width=s,o.style.maxWidth=s,o.style.minWidth=s;}};this.createManagedBean(new jt(this.pinned)).setComp(t,this.getGui());}selectAndSetTemplate(){this.setTemplate("left"==this.pinned?Kr.PINNED_LEFT_TEMPLATE:"right"==this.pinned?Kr.PINNED_RIGHT_TEMPLATE:Kr.CENTER_TEMPLATE),this.eRowContainer=this.eCenterContainer?this.eCenterContainer:this.getGui();}destroyRowComps(){this.setCtrls([]);}destroyRowComp(t){this.destroyBean(t),this.eRowContainer.removeChild(t.getGui());}setCtrls(t){const i=this.headerRowComps;let s;this.headerRowComps={},this.rowCompsList=[];const o=r=>{const n=r.getGui();n.parentElement!=this.eRowContainer&&this.eRowContainer.appendChild(n),s&&kn(this.eRowContainer,n,s),s=n;};t.forEach(r=>{const n=r.getInstanceId(),l=i[n];delete i[n];const a=l||this.createBean(new Dr(r));this.headerRowComps[n]=a,this.rowCompsList.push(a),o(a);}
1),kt(i).forEach(r=>this.destroyRowComp(r));}};Ai.PINNED_LEFT_TEMPLATE='<div class="ag-pinned-left-header" role="rowgroup"></div>',Ai.PINNED_RIGHT_TEMPLATE='<div class="ag-pinned-right-header" role="rowgroup"></div>',Ai.CENTER_TEMPLATE='<div class="ag-header-viewport" role="presentation">\n <div class="ag-header-container" ref="eCenterContainer" role="rowgroup"></div>\n </div>',d([A("eCenterContainer")],Ai.prototype,"eCenterContainer",2),d([T],Ai.prototype,"init",1),d([Ee],Ai.prototype,"destroyRowComps",1);var br=Ai,au=(e=>(e[e.UP=0]="UP",e[e.DOWN=1]="DOWN",e[e.LEFT=2]="LEFT",e[e.RIGHT=3]="RIGHT",e))(au||{}),qt=class extends R{constructor(){super(...arguments),this.currentHeaderRowWithoutSpan=-1;}postConstruct(){this.ctrlsService.whenReady(t=>{this.gridBodyCon=t.gridBodyCtrl;});const e=this.gos.getDocument();this.addManagedListener(e,"mousedown",()=>this.setCurrentHeaderRowWithoutSpan(-1));}getHeaderRowCount(){const e=this.ctrlsService.getHeaderRowContainerCtrl();return e?e.getRowCount():0;}navigateVertically(e,t,i){if(t||(t=this.focusService.getFocusedHeader()),!t)return!1;const{headerRowIndex:s,column:o}=t,r=this.getHeaderRowCount(),n=0===e;let{headerRowIndex:l,column:a,headerRowIndexWithoutSpan:u}=n?this.headerPositionUtils.getColumnVisibleParent(o,s):this.headerPositionUtils.getColumnVisibleChild(o,s),h=!1;return l<0&&(l=0,a=o,h=!0),l>=r?(l=-1,this.setCurrentHeaderRowWithoutSpan(-1)):void 0!==u&&(this.currentHeaderRowWithoutSpan=u),!(!h&&!a)&&this.focusService.focusHeaderPosition({headerPosition:{headerRowIndex:l,column:a},allowUserOverride:!0,event:i});}setCurrentHeaderRowWithoutSpan(e){this.currentHeaderRowWithoutSpan=e;}navigateHorizontally(e,t=!1,i){const s=this.focusService.getFocusedHeader(),o=2===e,r=this.gos.get("enableRtl");let n,l;if(-1!==this.currentHeaderRowWithoutSpan?s.headerRowIndex=this.currentHeaderRowWithoutSpan:this.currentHeaderRowWithoutSpan=s.headerRowIndex,o!==r?(l="Before",n=this.headerPositionUtils.findHeader(s,l)):(l="After",n=this.headerPositionUtils.findHeader(s,l)),n||!t)return this.focusService.focusHeaderPosition({headerPosition:n,direction:l,fromTab:t,allowUserOverride:!0,event:i});if(t){const a=this.gos.getCallback("tabToNextHeader");if(a)return this.focusService.focusHeaderPositionFromUserFunc({userFunc:a,headerPosition:n,direction:l});}return this.focusNextHeaderRow(s,l,i);}focusNextHeaderRow(e,t,i){const s=e.headerRowIndex;let r,o=null;if("Before"===t?s>0&&(r=s-1,this.currentHeaderRowWithoutSpan-=1,o=this.headerPositionUtils.findColAtEdgeForHeaderRow(r,"end")):(r=s+1,this.currentHeaderRowWithoutSpan<this.getHeaderRowCount()?this.currentHeaderRowWithoutSpan+=1:this.setCurrentHeaderRowWithoutSpan(-1),o=this.headerPositionUtils.findColAtEdgeForHeaderRow(r,"start")),!o)return!1;const{column:n,headerRowIndex:l}=this.headerPositionUtils.getHeaderIndexToFocus(o.column,o?.headerRowIndex);return this.focusService.focusHeaderPosition({headerPosition:{column:n,headerRowIndex:l},direction:t,fromTab:!0,allowUserOverride:!0,event:i});}scrollToColumn(e,t="After"){if(e.getPinned())return;let i;if(e instanceof pe){const s=e.getDisplayedLeafColumns();i="Before"===t?Y(s):s[0];}else i=e;this.gridBodyCon.getScrollFeature().ensureColumnVisible(i);}};d([g("focusService")],qt.prototype,"focusService",2),d([g("headerPositionUtils")],qt.prototype,"headerPositionUtils",2),d([g("ctrlsService")],qt.prototype,"ctrlsService",2),d([T],qt.prototype,"postConstruct",1),qt=d([L("headerNavigationService")],qt);var Qt=class extends R{setComp(e,t,i){this.comp=e,this.eGui=t,this.createManagedBean(new Lt(i,{onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.handleKeyDown.bind(this),onFocusOut:this.onFocusOut.bind(this)})),this.addManagedListener(this.eventService,c.EVENT_COLUMN_PIVOT_MODE_CHANGED,this.onPivotModeChanged.bind(this)),this.addManagedListener(this.eventService,c.EVENT_DISPLAYED_COLUMNS_CHANGED,this.onDisplayedColumnsChanged.bind(this)),this.onPivotModeChanged(),this.setupHeaderHeight();const s=this.onHeaderContextMenu.bind(this);this.addManagedListener(this.eGui,"contextmenu",s),this.mockContextMenuForIPad(s),this.ctrlsService.register("gridHeaderCtrl",this);}setupHeaderHeight(){const e=this.setHeaderHeight.bind(this);e(),this.addManagedPropertyListener("headerHeight",e),this.addManagedPropertyListener("pivotHeaderHeight",e),this.addManagedPropertyListener("groupHeaderHeight",e),this.addManagedPropertyListener("pivotGroupHeaderHeight",e),this.addManagedPropertyListener("floatingFiltersHeight",e),this.addManagedListener(this.eventService,c.EVENT_DISPLAYED_COLUMNS_CHANGED,e),this.addManagedListener(this.eventService,c.EVENT_COLUMN_HEADER_HEIGHT_CHANGED,e),this.addManagedListener(this.eventService,c.EVENT_GRID_STYLES_CHANGED,e),this.addManagedListener(this.eventService,c.EVENT_ADVANCED_FILTER_ENABLED_CHANGED,e);}getHeaderHeight(){return this.headerHeight;}setHeaderHeight(){const{columnModel:e}=this;let s,t=0,i=e.getHeaderRowCount();this.filterManager.hasFloatingFilters()&&(i++,t=1);const r=this.columnModel.getColumnGroupHeaderRowHeight(),n=this.columnModel.getColumnHeaderRowHeight(),a=i-(1+t);s=t*e.getFloatingFiltersHeight(),s+=a*r,s+=n,this.headerHeight!==s&&(this.headerHeight=s,this.comp.setHeightAndMinHeight(`${s+1}px`),this.eventService.dispatchEvent({type:c.EVENT_HEADER_HEIGHT_CHANGED}));}onPivotModeChanged(){const e=this.columnModel.isPivotMode();this.comp.addOrRemoveCssClass("ag-pivot-on",e),this.comp.addOrRemoveCssClass("ag-pivot-off",!e);}onDisplayedColumnsChanged(){const t=this.columnModel.getAllDisplayedColumns().some(i=>i.isSpanHeaderHeight());this.comp.addOrRemoveCssClass("ag-header-allow-overflow",t);}onTabKeyDown(e){const t=this.gos.get("enableRtl");(this.headerNavigationService.navigateHorizontally(e.shiftKey!==t?2:3,!0,e)||this.focusService.focusNextGridCoreContainer(e.shiftKey))&&e.preventDefault();}handleKeyDown(e){let t=null;switch(e.key){case C.LEFT:t=2;case C.RIGHT:y(t)||(t=3),this.headerNavigationService.navigateHorizontally(t,!1,e);break;case C.UP:t=0;case C.DOWN:y(t)||(t=1),this.headerNavigationService.navigateVertically(t,null,e)&&e.preventDefault();break;default:return;}}onFocusOut(e){const{relatedTarget:t}=e;!t&&this.eGui.contains(this.gos.getActiveDomElement())||this.eGui.contains(t)||this.focusService.clearFocusedHeader();}onHeaderContextMenu(e,t,i){if(!e&&!i||!this.menuService.isHeaderContextMenuEnabled())return;const{target:s}=e??t;(s===this.eGui||s===this.ctrlsService.getHeaderRowContainerCtrl().getViewport())&&this.menuService.showHeaderContextMenu(void 0,e,i);}mockContextMenuForIPad(e){if(!Pt())return;const t=new me(this.eGui);this.addManagedListener(t,me.EVENT_LONG_TAP,s=>{e(void 0,s.touchStart,s.touchEvent);}),this.addDestroyFunc(()=>t.destroy());}};d([g("headerNavigationService")],Qt.prototype,"headerNavigationService",2),d([g("focusService")],Qt.prototype,"focusService",2),d([g("columnModel")],Qt.prototype,"columnModel",2),d([g("ctrlsService")],Qt.prototype,"ctrlsService",2),d([g("filterManager")],Qt.prototype,"filterManager",2),d([g("menuService")],Qt.prototype,"menuService",2);var Rl=class vh extends V{constructor(){super(vh.TEMPLATE);}postConstruct(){const t={addOrRemoveCssClass:(o,r)=>
1this.addOrRemoveCssClass(o,r),setHeightAndMinHeight:o=>{this.getGui().style.height=o,this.getGui().style.minHeight=o;}};this.createManagedBean(new Qt()).setComp(t,this.getGui(),this.getFocusableElement());const s=o=>{this.createManagedBean(o),this.appendChild(o);};s(new br("left")),s(new br(null)),s(new br("right"));}};Rl.TEMPLATE='<div class="ag-header" role="presentation"/>',d([T],Rl.prototype,"postConstruct",1);var du=Rl,rs=class extends R{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),includeTouch:!0,stopPropagationForTouch:!0};return this.dragService.addDragSource(t),()=>this.dragService.removeDragSource(t);}onDragStart(e,t){this.dragStartX=t.clientX,this.setResizeIcons();const i=t instanceof MouseEvent&&!0===t.shiftKey;e.onResizeStart(i);}setResizeIcons(){const e=this.ctrlsService.get("gridCtrl");e.setResizeCursor(!0),e.disableUserSelect(!0);}onDragStop(e,t){e.onResizeEnd(this.resizeAmount),this.resetIcons();}resetIcons(){const e=this.ctrlsService.get("gridCtrl");e.setResizeCursor(!1),e.disableUserSelect(!1);}onDragging(e,t){this.resizeAmount=t.clientX-this.dragStartX,e.onResizing(this.resizeAmount);}};d([g("dragService")],rs.prototype,"dragService",2),d([g("ctrlsService")],rs.prototype,"ctrlsService",2),rs=d([L("horizontalResizeService")],rs);var xt=class extends R{hideActiveMenu(){this.hidePopup&&this.hidePopup();}showMenuAfterMouseEvent(e,t,i){this.showPopup(e,s=>{this.popupService.positionPopupUnderMouseEvent({column:e,type:i,mouseEvent:t,ePopup:s});},i,t.target,this.menuService.isLegacyMenuEnabled());}showMenuAfterButtonClick(e,t,i){let s=-1,o="left";const r=this.menuService.isLegacyMenuEnabled();!r&&this.gos.get("enableRtl")&&(s=1,o="right");let n=r?void 0:4*s,l=r?void 0:4;this.showPopup(e,a=>{this.popupService.positionPopupByComponent({type:i,eventSource:t,ePopup:a,nudgeX:n,nudgeY:l,alignSide:o,keepWithinBounds:!0,position:"under",column:e});},i,t,r);}showPopup(e,t,i,s,o){const r=e?this.createBean(new to(e,"COLUMN_MENU")):void 0;if(this.activeMenu=r,!r?.hasFilter()||!e)throw new Error("AG Grid - unable to show popup filter, filter instantiation failed");const n=document.createElement("div");let l;le(n,"presentation"),n.classList.add("ag-menu"),o||n.classList.add("ag-filter-menu"),this.tabListener=this.addManagedListener(n,"keydown",v=>this.trapFocusWithin(v,n)),n.appendChild(r?.getGui());const u=this.menuService.isColumnMenuAnchoringEnabled()?s??this.ctrlsService.getGridBodyCtrl().getGui():void 0,p=this.localeService.getLocaleTextFunc(),f=o&&"columnFilter"!==i?p("ariaLabelColumnMenu","Column Menu"):p("ariaLabelColumnFilter","Column Filter"),m=this.popupService.addPopup({modal:!0,eChild:n,closeOnEsc:!0,closedCallback:v=>{e.setMenuVisible(!1,"contextMenu");const w=v instanceof KeyboardEvent;if(this.tabListener&&(this.tabListener=this.tabListener()),w&&s&&xe(s)){const S=this.focusService.findTabbableParent(s);S&&S.focus();}r?.afterGuiDetached(),this.destroyBean(this.activeMenu),this.dispatchVisibleChangedEvent(!1,i,e);},positionCallback:()=>t(n),anchorToElement:u,ariaLabel:f});m&&(this.hidePopup=l=m.hideFunc),r.afterInit().then(()=>{t(n),r.afterGuiAttached({container:i,hidePopup:l});}),e.setMenuVisible(!0,"contextMenu"),this.dispatchVisibleChangedEvent(!0,i,e);}trapFocusWithin(e,t){e.key!==C.TAB||e.defaultPrevented||this.focusService.findNextFocusableElement(t,!1,e.shiftKey)||(e.preventDefault(),this.focusService.focusInto(t,e.shiftKey));}dispatchVisibleChangedEvent(e,t,i){this.eventService.dispatchEvent({type:c.EVENT_COLUMN_MENU_VISIBLE_CHANGED,visible:e,switchingTab:!1,key:t,column:i??null});}isMenuEnabled(e){var t;return e.isFilterAllowed()&&(null!=(t=e.getColDef().menuTabs)?t:["filterMenuTab"]).includes("filterMenuTab");}showMenuAfterContextMenuEvent(){}destroy(){this.destroyBean(this.activeMenu),super.destroy();}};d([g("filterManager")],xt.prototype,"filterManager",2),d([g("popupService")],xt.prototype,"popupService",2),d([g("focusService")],xt.prototype,"focusService",2),d([g("ctrlsService")],xt.prototype,"ctrlsService",2),d([g("menuService")],xt.prototype,"menuService",2),xt=d([L("filterMenuFactory")],xt);var uu=(e=>(e.TAB_GUARD="ag-tab-guard",e.TAB_GUARD_TOP="ag-tab-guard-top",e.TAB_GUARD_BOTTOM="ag-tab-guard-bottom",e))(uu||{}),Tr=class extends R{constructor(e){super(),this.skipTabGuardFocus=!1,this.forcingFocusOut=!1;const{comp:t,eTopGuard:i,eBottomGuard:s,focusTrapActive:o,forceFocusOutWhenTabGuardsAreEmpty:r,focusInnerElement:n,onFocusIn:l,onFocusOut:a,shouldStopEventPropagation:u,onTabKeyDown:h,handleKeyDown:p,eFocusableElement:f}=e;this.comp=t,this.eTopGuard=i,this.eBottomGuard=s,this.providedFocusInnerElement=n,this.eFocusableElement=f,this.focusTrapActive=!!o,this.forceFocusOutWhenTabGuardsAreEmpty=!!r,this.providedFocusIn=l,this.providedFocusOut=a,this.providedShouldStopEventPropagation=u,this.providedOnTabKeyDown=h,this.providedHandleKeyDown=p;}postConstruct(){this.createManagedBean(new Lt(this.eFocusableElement,{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(),[this.eTopGuard,this.eBottomGuard].forEac
1h(e=>this.addManagedListener(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();}activateTabGuards(){if(this.forcingFocusOut)return;const e=this.gos.get("tabIndex");this.comp.setTabIndex(e.toString());}deactivateTabGuards(){this.comp.setTabIndex();}onFocus(e){if(this.skipTabGuardFocus)return void(this.skipTabGuardFocus=!1);if(this.forceFocusOutWhenTabGuardsAreEmpty&&0===this.focusService.findFocusableElements(this.eFocusableElement,".ag-tab-guard").length)return void this.findNextElementOutsideAndFocus(e.target===this.eBottomGuard);const t=e.target===this.eBottomGuard;this.providedFocusInnerElement?this.providedFocusInnerElement(t):this.focusInnerElement(t);}findNextElementOutsideAndFocus(e){const t=this.gos.getDocument(),i=this.focusService.findFocusableElements(t.body,null,!0),s=i.indexOf(e?this.eTopGuard:this.eBottomGuard);if(-1===s)return;let o,r;e?(o=0,r=s):(o=s+1,r=i.length);const n=i.slice(o,r),l=this.gos.get("tabIndex");n.sort((a,u)=>{const h=parseInt(a.getAttribute("tabindex")||"0"),p=parseInt(u.getAttribute("tabindex")||"0");return p===l?1:h===l?-1:0===h?1:0===p?-1:h-p;}),n[e?n.length-1:0].focus();}onFocusIn(e){this.focusTrapActive||(this.providedFocusIn&&this.providedFocusIn(e),this.deactivateTabGuards());}onFocusOut(e){this.focusTrapActive||(this.providedFocusOut&&this.providedFocusOut(e),this.eFocusableElement.contains(e.relatedTarget)||this.activateTabGuards());}onTabKeyDown(e){if(this.providedOnTabKeyDown)return void this.providedOnTabKeyDown(e);if(this.focusTrapActive||e.defaultPrevented)return;const t=this.tabGuardsAreActive();t&&this.deactivateTabGuards();const i=this.getNextFocusableElement(e.shiftKey);t&&setTimeout(()=>this.activateTabGuards(),0),i&&(i.focus(),e.preventDefault());}focusInnerElement(e=!1){const t=this.focusService.findFocusableElements(this.eFocusableElement);this.tabGuardsAreActive()&&(t.splice(0,1),t.splice(t.length-1,1)),t.length&&t[e?t.length-1:0].focus({preventScroll:!0});}getNextFocusableElement(e){return this.focusService.findNextFocusableElement(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){return e===this.eTopGuard||e===this.eBottomGuard;}};d([g("focusService")],Tr.prototype,"focusService",2),d([T],Tr.prototype,"postConstruct",1);var ns=class extends V{initialiseTabGuard(e){this.eTopGuard=this.createTabGuard("top"),this.eBottomGuard=this.createTabGuard("bottom"),this.eFocusableElement=this.getFocusableElement();const t=[this.eTopGuard,this.eBottomGuard],i={setTabIndex:s=>{t.forEach(o=>null!=s?o.setAttribute("tabindex",s):o.removeAttribute("tabindex"));}};this.addTabGuards(this.eTopGuard,this.eBottomGuard),this.tabGuardCtrl=this.createManagedBean(new Tr({comp:i,focusTrapActive:!!e.focusTrapActive,eTopGuard:this.eTopGuard,eBottomGuard:this.eBottomGuard,eFocusableElement:this.eFocusableElement,onFocusIn:e.onFocusIn,onFocusOut:e.onFocusOut,focusInnerElement:e.focusInnerElement,handleKeyDown:e.handleKeyDown,onTabKeyDown:e.onTabKeyDown,shouldStopEventPropagation:e.shouldStopEventPropagation,forceFocusOutWhenTabGuardsAreEmpty:e.forceFocusOutWhenTabGuardsAreEmpty}));}createTabGuard(e){const t=document.createElement("div");return t.classList.add("ag-tab-guard","top"===e?"ag-tab-guard-top":"ag-tab-guard-bottom"),le(t,"presentation"),t;}addTabGuards(e,t){this.eFocusableElement.insertAdjacentElement("afterbegin",e),this.eFocusableElement.insertAdjacentElement("beforeend",t);}removeAllChildrenExceptTabGuards(){const e=[this.eTopGuard,this.eBottomGuard];de(this.getFocusableElement()),this.addTabGuards(...e);}forceFocusOutOfContainer(e=!1){this.tabGuardCtrl.forceFocusOutOfContainer(e);}appendChild(e,t){Us(e)||(e=e.getGui());const{eBottomGuard:i}=this;i?i.insertAdjacentElement("beforebegin",e):super.appendChild(e,t);}},ao=class wh extends ns{constructor(t){super(wh.getTemplate(t.cssClass)),this.items=[],this.tabbedItemScrollMap=new Map(),this.params=t;}postConstruct(){this.setupHeader(),this.params.items&&this.params.items.forEac
1h(t=>this.addItem(t)),this.initialiseTabGuard({onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.handleKeyDown.bind(this),focusInnerElement:this.focusInnerElement.bind(this),focusTrapActive:!0}),this.addDestroyFunc(()=>{var t,i,s;return null==(s=null==(i=null==(t=this.activeItem)?void 0:t.tabbedItem)?void 0:i.afterDetachedCallback)?void 0:s.call(i);});}static getTemplate(t){return`<div class="ag-tabs ${t}">\n <div ref="eHeader"></div>\n <div ref="eBody" role="presentation" class="ag-tabs-body ${t?`${t}-body`:""}"></div>\n </div>`;}setupHeader(){const{enableCloseButton:t,cssClass:i}=this.params,s=(o,r)=>{o.classList.add(`ag-tabs-${r}`),i&&o.classList.add(`${i}-${r}`);};t?(this.setupCloseButton(s),this.eTabHeader=this.gos.getDocument().createElement("div"),s(this.eHeader,"header-wrapper"),le(this.eHeader,"presentation"),this.eHeader.appendChild(this.eTabHeader)):this.eTabHeader=this.eHeader,le(this.eTabHeader,"tablist"),s(this.eTabHeader,"header");}setupCloseButton(t){const i=this.gos.getDocument(),s=i.createElement("button");t(s,"close-button");const o=re("close",this.gos,void 0,!0);Ke(s,this.params.closeButtonAriaLabel),s.appendChild(o),this.addManagedListener(s,"click",()=>{var n,l;return null==(l=(n=this.params).onCloseClicked)?void 0:l.call(n);});const r=i.createElement("div");t(r,"close-button-wrapper"),le(r,"presentation"),r.appendChild(s),this.eHeader.appendChild(r),this.eCloseButton=s;}handleKeyDown(t){switch(t.key){case C.RIGHT:case C.LEFT:if(!this.eTabHeader.contains(this.gos.getActiveDomElement()))return;const i=t.key===C.RIGHT,s=this.gos.get("enableRtl"),o=this.items.indexOf(this.activeItem),r=i!==s?Math.min(o+1,this.items.length-1):Math.max(o-1,0);if(o===r)return;t.preventDefault();const n=this.items[r];this.showItemWrapper(n),n.eHeaderButton.focus();break;case C.UP:case C.DOWN:t.stopPropagation();}}onTabKeyDown(t){var i,s,o,r;if(t.defaultPrevented)return;const{focusService:n,eHeader:l,eBody:a,activeItem:u,params:h}=this,{suppressTrapFocus:p,enableCloseButton:f}=h,m=this.gos.getActiveDomElement(),v=t.target,w=t.shiftKey;if(l.contains(m))return t.preventDefault(),void(!f||!w||null!=(i=this.eCloseButton)&&i.contains(m)?p&&w?null==(o=this.focusService.findFocusableElementBeforeTabGuard(this.gos.getDocument().body,v))||o.focus():this.focusBody(t.shiftKey):null==(s=this.eCloseButton)||s.focus());let S=null;if(n.isTargetUnderManagedComponent(a,v)&&(w&&(S=this.focusService.findFocusableElementBeforeTabGuard(a,v)),!S&&!p&&(S=u.eHeaderButton)),!S&&a.contains(m)&&(S=n.findNextFocusableElement(a,!1,w),!S))return t.preventDefault(),void(p&&!w?this.forceFocusOutOfContainer(w):f&&!w?null==(r=this.eCloseButton)||r.focus():this.focusHeader());S&&(t.preventDefault(),S.focus());}focusInnerElement(t){t?this.focusHeader():this.focusBody(!0);}focusHeader(t){this.activeItem.eHeaderButton.focus({preventScroll:t});}focusBody(t){this.focusService.focusInto(this.eBody,t);}setAfterAttachedParams(t){this.afterAttachedParams=t;}showFirstItem(){this.items.length>0&&this.showItemWrapper(this.items[0]);}addItem(t){const i=document.createElement("span");le(i,"tab"),i.setAttribute("tabindex","-1"),i.appendChild(t.title),i.classList.add("ag-tab"),this.eTabHeader.appendChild(i),Ke(i,t.titleLabel);const s={tabbedItem:t,eHeaderButton:i};this.items.push(s),i.addEventListener("click",this.showItemWrapper.bind(this,s));}showItem(t){const i=this.items.find(s=>s.tabbedItem===t);i&&this.showItemWrapper(i);}showItemWrapper(t){var i,s,o,r,n,l;const{tabbedItem:a,eHeaderButton:u}=t;null==(s=(i=this.params).onItemClicked)||s.call(i,{item:a}),this.activeItem!==t?(this.lastScrollListener&&(this.lastScrollListener=this.lastScrollListener()),de(this.eBody),a.bodyPromise.then(h=>{this.eBody.appendChild(h);const p=!this.focusService.isKeyboardMode();if(this.params.suppressFocusBodyOnOpen||this.focusService.focusInto(this.eBody,!1,p),a.afterAttachedCallback&&a.afterAttachedCallback(this.afterAttachedParams),this.params.keepScrollPosition){const f=a.getScrollableContainer&&a.getScrollableContainer()||h;this.lastScrollListener=this.addManagedListener(f,"scroll",()=>{this.tabbedItemScrollMap.set(a.name,f.scrollTop);});const m=this.tabbedItemScrollMap.get(a.name);void 0!==m&&setTimeout(()=>{f.scrollTop=m;},0);}}),this.activeItem&&(this.activeItem.eHeaderButton.classList.remove("ag-tab-selected"),null==(l=(n=this.activeItem.tabbedItem).afterDetachedCallback)||l.call(n)),u.classList.add("ag-tab-selected"),this.activeItem=t):null==(r=(o=this.params).onActiveItem
1Clicked)||r.call(o);}};d([g("focusService")],ao.prototype,"focusService",2),d([A("eHeader")],ao.prototype,"eHeader",2),d([A("eBody")],ao.prototype,"eBody",2),d([T],ao.prototype,"postConstruct",1);var Mp=ao,Ar=class extends R{constructor(){super(...arguments),this.polyfillFunctions=[];}observeResize(e,t){const i=this.gos.getWindow(),o=()=>{var l,a;let u=null!=(l=e?.clientWidth)?l:0,h=null!=(a=e?.clientHeight)?a:0,p=!0;const f=()=>{var m,v;if(p){const w=null!=(m=e?.clientWidth)?m:0,S=null!=(v=e?.clientHeight)?v:0;(w!==u||S!==h)&&(u=w,h=S,t()),this.doNextPolyfillTurn(f);}};return f(),()=>p=!1;},r=this.gos.get("suppressBrowserResizeObserver");return i.ResizeObserver&&!r?(()=>{const l=new i.ResizeObserver(t);return l.observe(e),()=>l.disconnect();})():this.getFrameworkOverrides().wrapIncoming(()=>o(),"resize-observer");}doNextPolyfillTurn(e){this.polyfillFunctions.push(e),this.schedulePolyfill();}schedulePolyfill(){this.polyfillScheduled||(this.polyfillScheduled=!0,window.setTimeout(()=>{const t=this.polyfillFunctions;this.polyfillScheduled=!1,this.polyfillFunctions=[],t.forEach(i=>i());},50));}};Ar=d([L("resizeObserverService")],Ar);var Fi=class extends R{constructor(){super(...arguments),this.createTasksP1={list:[],sorted:!1},this.createTasksP2={list:[],sorted:!1},this.destroyTasks=[],this.ticking=!1,this.scrollGoingDown=!0,this.lastPage=0,this.lastScrollTop=0,this.taskCount=0,this.cancelledTasks=new Set();}setScrollTop(e){const t=this.gos.get("pagination");if(this.scrollGoingDown=e>=this.lastScrollTop,t&&0===e){const i=this.paginationProxy.getCurrentPage();i!==this.lastPage&&(this.lastPage=i,this.scrollGoingDown=!0);}this.lastScrollTop=e;}init(){this.useAnimationFrame=!this.gos.get("suppressAnimationFrame");}isOn(){return this.useAnimationFrame;}verifyAnimationFrameOn(e){!1===this.useAnimationFrame&&console.warn(`AG Grid: AnimationFrameService.${e} called but animation frames are off`);}createTask(e,t,i){this.verifyAnimationFrameOn(i);const s={task:e,index:t,createOrder:++this.taskCount};this.addTaskToList(this[i],s),this.schedule();}cancelTask(e){this.cancelledTasks.add(e);}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((i,s)=>i.index!==s.index?t*(s.index-i.index):s.createOrder-i.createOrder),e.sorted=!0;}addDestroyTask(e){this.verifyAnimationFrameOn("createTasksP3"),this.destroyTasks.push(e),this.schedule();}executeFrame(e){this.verifyAnimationFrameOn("executeFrame");const t=this.createTasksP1,i=t.list,s=this.createTasksP2,o=s.list,r=this.destroyTasks,n=new Date().getTime();let l=new Date().getTime()-n;const a=e<=0,u=this.ctrlsService.getGridBodyCtrl();for(;a||l<e;){if(!u.getScrollFeature().scrollGridIfNeeded()){let p;if(i.length)this.sortTaskList(t),p=i.pop().task;else if(o.length)this.sortTaskList(s),p=o.pop().task;else{if(!r.length){this.cancelledTasks.clear();break;}p=r.pop();}this.cancelledTasks.has(p)||p();}l=new Date().getTime()-n;}i.length||o.length||r.length?this.requestFrame():this.stopTicking();}stopTicking(){this.ticking=!1;}flushAllFrames(){this.useAnimationFrame&&this.executeFrame(-1);}schedule(){this.useAnimationFrame&&(this.ticking||(this.ticking=!0,this.requestFrame()));}requestFrame(){const e=this.executeFrame.bind(this,60);this.requestAnimationFrame(e);}requestAnimationFrame(e){const t=this.gos.getWindow();t.requestAnimationFrame?t.requestAnimationFrame(e):t.webkitRequestAnimationFrame?t.webkitRequestAnimationFrame(e):t.setTimeout(e,0);}isQueueEmpty(){return!this.ticking;}debounce(e){let t=!1;return()=>{this.isOn()?t||(t=!0,this.addDestroyTask(()=>{t=!1,e();})):window.setTimeout(e,0);};}};d([g("ctrlsService")],Fi.prototype,"ctrlsService",2),d([g("paginationProxy")],Fi.prototype,"paginationProxy",2),d([T],Fi.prototype,"init",1),Fi=d([L("animationFrameService")],Fi);var hu=(e=>(e.EVERYTHING="group",e.FILTER="filter",e.SORT="sort",e.MAP="map",e.AGGREGATE="aggregate",e.FILTER_AGGREGATES="filter_aggregates",e.PIVOT="pivot",e.NOTHING="nothing",e))(hu||{}),ls=class extends R{postConstruct(){this.isClientSideRowModel="clientSide"===this.rowModel.getType();}expandRows(e){if(!this.isClientSideRowModel)return;const t=new Set(e);this.rowModel.forEachNode(i=>{i.id&&t.has(i.id)&&(i.expanded=!0);}),this.onGroupExpandedOrCollapsed();}getExpandedRows(){const e=[];return this.rowModel.forEachNode(({expanded:t,id:i}
1)=>{t&&i&&e.push(i);}),e;}expandAll(e){this.isClientSideRowModel&&this.rowModel.expandOrCollapseAll(e);}setRowNodeExpanded(e,t,i,s){e&&(i&&e.parent&&-1!==e.parent.level&&this.setRowNodeExpanded(e.parent,t,i,s),e.setExpanded(t,void 0,s));}onGroupExpandedOrCollapsed(){this.isClientSideRowModel&&this.rowModel.refreshModel({step:"map"});}};d([g("rowModel")],ls.prototype,"rowModel",2),d([T],ls.prototype,"postConstruct",1),ls=d([L("expansionService")],ls);var qe=class extends R{postConstruct(){var e;this.activeMenuFactory=null!=(e=this.enterpriseMenuFactory)?e:this.filterMenuFactory;}showColumnMenu(e){this.showColumnMenuCommon(this.activeMenuFactory,e,"columnMenu");}showFilterMenu(e){const t=this.enterpriseMenuFactory&&this.isLegacyMenuEnabled()?this.enterpriseMenuFactory:this.filterMenuFactory;this.showColumnMenuCommon(t,e,e.containerType,!0);}showHeaderContextMenu(e,t,i){this.activeMenuFactory.showMenuAfterContextMenuEvent(e,t,i);}getContextMenuPosition(e,t){const i=this.getRowCtrl(e),s=this.getCellGui(i,t);if(!s)return i?{x:0,y:i.getRowYPosition()}:{x:0,y:0};const o=s.getBoundingClientRect();return{x:o.x+o.width/2,y:o.y+o.height/2};}showContextMenu(e){var t,i,s;const{column:o,rowNode:r}=e;let{anchorToElement:n,value:l}=e;r&&o&&null==l&&(l=r.getValueFromValueService(o)),null==n&&(n=this.getContextMenuAnchorElement(r,o)),null==(s=this.contextMenuFactory)||s.onContextMenu(null!=(t=e.mouseEvent)?t:null,null!=(i=e.touchEvent)?i:null,r??null,o??null,l,n);}showColumnChooser(e){var t;null==(t=this.columnChooserFactory)||t.showColumnChooser(e);}hidePopupMenu(){var e;null==(e=this.contextMenuFactory)||e.hideActiveMenu(),this.activeMenuFactory.hideActiveMenu();}hideColumnChooser(){var e;null==(e=this.columnChooserFactory)||e.hideActiveColumnChooser();}isColumnMenuInHeaderEnabled(e){const{suppressMenu:t,suppressHeaderMenuButton:i}=e.getColDef();return!(i??t)&&this.activeMenuFactory.isMenuEnabled(e)&&(this.isLegacyMenuEnabled()||!!this.enterpriseMenuFactory);}isFilterMenuInHeaderEnabled(e){return!e.getColDef().suppressHeaderFilterButton&&this.filterManager.isFilterAllowed(e);}isHeaderContextMenuEnabled(e){return!e?.getColDef().suppressHeaderContextMenu&&"new"===this.getColumnMenuType();}isHeaderMenuButtonAlwaysShowEnabled(){return this.isSuppressMenuHide();}isHeaderMenuButtonEnabled(){const e=!this.isSuppressMenuHide();return!(Pt()&&e);}isHeaderFilterButtonEnabled(e){return this.isFilterMenuInHeaderEnabled(e)&&!this.isLegacyMenuEnabled()&&!this.isFloatingFilterButtonDisplayed(e);}isFilterMenuItemEnabled(e){return this.filterManager.isFilterAllowed(e)&&!this.isLegacyMenuEnabled()&&!this.isFilterMenuInHeaderEnabled(e)&&!this.isFloatingFilterButtonDisplayed(e);}isColumnMenuAnchoringEnabled(){return!this.isLegacyMenuEnabled();}areAdditionalColumnMenuItemsEnabled(){return"new"===this.getColumnMenuType();}isLegacyMenuEnabled(){return"legacy"===this.getColumnMenuType();}isFloatingFilterButtonEnabled(e){var t;const i=e.getColDef(),s=null==(t=i.floatingFilterComponentParams)?void 0:t.suppressFilterButton;return null!=s&&O("As of v31.1, 'colDef.floatingFilterComponentParams.suppressFilterButton' is deprecated. Use 'colDef.suppressFloatingFilterButton' instead."),null==i.suppressFloatingFilterButton?!s:!i.suppressFloatingFilterButton;}getColumnMenuType(){var e;return null!=(e=this.gos.get("columnMenu"))?e:"legacy";}isFloatingFilterButtonDisplayed(e){return!!e.getColDef().floatingFilter&&this.isFloatingFilterButtonEnabled(e);}isSuppressMenuHide(){const e=this.gos.get("suppressMenuHide");return!this.isLegacyMenuEnabled()&&!this.gos.exists("suppressMenuHide")||e;}showColumnMenuCommon(e,t,i,s){const{column:o,positionBy:r}=t;if("button"===r){const{buttonElement:n}=t;e.showMenuAfterButtonClick(o,n,i,s);}else if("mouse"===r){const{mouseEvent:n}=t;e.showMenuAfterMouseEvent(o,n,i,s);}else o&&(this.ctrlsService.getGridBodyCtrl().getScrollFeature().ensureColumnVisible(o,"auto"),this.animationFrameService.requestAnimationFrame(()=>{const n=this.ctrlsService.getHeaderRowContainerCtrl(o.getPinned()).getHeaderCtrlForColumn(o);e.showMenuAfterButtonClick(o,n.getAnchorElementForMenu(s),i,!0);}));}getRowCtrl(e){const{rowIndex:t,rowPinned:i}=e||{};if(null!=t)return this.rowRenderer.getRowByPosition({rowIndex:t,rowPinned:i})||void 0;}getCellGui(e,t){if(!e||!t)return;const i=e.getCellCtrl(t);return i?.getGui()||void 0;}getContextMenuAnchorElement(e,t){const i=this.ctrlsService.getGridBodyCtrl().getGridBodyElement(),s=this.getRowCtrl(e);return s?this.getCellGui(s,t)||(s.isFullWidth()?s.getFullWidthElement():i):i;}};d([g("filterMenuFactory")],qe.prototype,"filterMenuFactory",2),d([g("ctrlsService")],qe.prototype,"ctrlsService",2),d([g("animationFrameService")],qe.prototype,"animationFrameService",2),d([g("filterManager")],qe.prototype,"filterManager",2),d([g("rowRenderer")],qe.prototype,"rowRenderer",2),d([Q("columnChooserFactory")],qe.prototype,"columnChooserFactory",2),d([Q("contextMenuFactory")],qe.prototype,"contextMenuFactory",2),d([Q("enterpriseMenuFactory")],qe.prototype,"enterpriseMenuFactory",2),d([T],qe.prototype,"postConstruct",1),qe=d([L("menuService")],qe);var Xt=class extends R{postConstruct(){this.ctrlsService.whenReady(e=>{this.centerRowContainerCtrl=e.center;});}getPreferredWidthForColumn(e,t){const i=this.getHeaderCellForColumn(e);if(!i)return-1;const s=this.rowRenderer.getAllCellsForColumn(e);return t||s.push(i),this.addElementsToContainerAndGetWidth(s);}getPreferredWidthForColumnGroup(e){const t=this.getHeaderCellForColumn(e);return t?this.addElementsToContainerAndGetWidth([t]):-1;}addElementsToContainerAndGetWidth(e){const t=document.createElement("form");t.style.position="fixed";const i=this.centerRowContainerCtrl.getContainerElement();e.forEach(r=>this.cloneItemIntoDummy(r,t)),i.appendChild(t);const s=t.offsetWidth;return i.removeChild(t),s+this.getAutoSizePadding();}getAutoSizePadding(){return this.gos.get("autoSizePadding");}getHeaderCellForColumn(e){let t=null;
1return this.ctrlsService.getHeaderRowContainerCtrls().forEach(i=>{const s=i.getHtmlElementForColumnHeader(e);null!=s&&(t=s);}),t;}cloneItemIntoDummy(e,t){const i=e.cloneNode(!0);i.style.width="",i.style.position="static",i.style.left="";const s=document.createElement("div"),o=s.classList;["ag-header-cell","ag-header-group-cell"].some(l=>i.classList.contains(l))?(o.add("ag-header","ag-header-row"),s.style.position="static"):o.add("ag-row");let n=e.parentElement;for(;n;){if(["ag-header-row","ag-row"].some(a=>n.classList.contains(a))){for(let a=0;a<n.classList.length;a++){const u=n.classList[a];"ag-row-position-absolute"!=u&&o.add(u);}break;}n=n.parentElement;}s.appendChild(i),t.appendChild(s);}};d([g("rowRenderer")],Xt.prototype,"rowRenderer",2),d([g("ctrlsService")],Xt.prototype,"ctrlsService",2),d([g("rowCssClassCalculator")],Xt.prototype,"rowCssClassCalculator",2),d([T],Xt.prototype,"postConstruct",1),Xt=d([L("autoWidthCalculator")],Xt);var uo=class extends R{constructor(e,t){super(),this.createRowCon=e,this.destroyRowCtrls=t,this.stickyTopRowCtrls=[],this.stickyBottomRowCtrls=[],this.topContainerHeight=0,this.bottomContainerHeight=0;}postConstruct(){this.isClientSide="clientSide"===this.rowModel.getType(),this.ctrlsService.whenReady(e=>{this.gridBodyCtrl=e.gridBodyCtrl;});}getStickyTopRowCtrls(){return this.stickyTopRowCtrls;}getStickyBottomRowCtrls(){return this.stickyBottomRowCtrls;}getLastPixelOfGroup(e){return this.isClientSide?this.getClientSideLastPixelOfGroup(e):this.getServerSideLastPixelOfGroup(e);}getFirstPixelOfGroup(e){return e.footer?e.sibling.rowTop+e.sibling.rowHeight-1:e.hasChildren()?e.rowTop-1:0;}getServerSideLastPixelOfGroup(e){var t,i,s,o;if(this.isClientSide)throw new Error("This func should only be called in server side row model.");if(e.isExpandable()||e.footer){if(e.master)return e.detailNode.rowTop+e.detailNode.rowHeight;if(!e.sibling||1===Math.abs(e.sibling.rowIndex-e.rowIndex)){let n=null==(t=e.childStore)?void 0:t.getStoreBounds();return e.footer&&(n=null==(i=e.sibling.childStore)?void 0:i.getStoreBounds()),(null!=(s=n?.heightPx)?s:0)+(null!=(o=n?.topPx)?o:0);}return e.footer?e.rowTop+e.rowHeight:e.sibling.rowTop+e.sibling.rowHeight;}return Number.MAX_SAFE_INTEGER;}getClientSideLastPixelOfGroup(e){if(!this.isClientSide)throw new Error("This func should only be called in client side row model.");if(e.isExpandable()||e.footer){const t=e.footer&&0===e.rowIndex,i=!e.sibling||1===Math.abs(e.sibling.rowIndex-e.rowIndex);if(t||i){let s=e.footer?e.sibling:e;for(;s.isExpandable()&&s.expanded;)if(s.master)s=s.detailNode;else if(s.childrenAfterSort){if(0===s.childrenAfterSort.length)break;s=Y(s.childrenAfterSort);}return s.rowTop+s.rowHeight;}return e.footer?e.rowTop+e.rowHeight:e.sibling.rowTop+e.sibling.rowHeight;}return Number.MAX_SAFE_INTEGER;}updateStickyRows(e){const t="top"===e;let i=0;if(!this.canRowsBeSticky())return this.refreshNodesAndContainerHeight(e,new Set(),i);const s=t?this.rowRenderer.getFirstVisibleVerticalPixel():this.rowRenderer.getLastVisibleVerticalPixel(),o=new Set(),r=u=>{if(o.add(u),t){const h=this.getLastPixelOfGroup(u),p=s+i+u.rowHeight;
1u.stickyRowTop=h<p?i+(h-p):i;}else{const h=this.getFirstPixelOfGroup(u),p=s-(i+u.rowHeight);u.stickyRowTop=h>p?i-(h-p):i;}i=0,o.forEach(h=>{const p=h.stickyRowTop+h.rowHeight;i<p&&(i=p);});},n=this.areFooterRowsStickySuppressed(),l=this.gos.get("suppressGroupRowsSticky"),a=u=>!!u.displayed&&(u.footer?!(!0===n||"grand"===n&&-1===u.level||"group"===n&&u.level>-1||o.has(u)):!!u.isExpandable()&&!0!==l&&!o.has(u)&&u.expanded);for(let u=0;u<100;u++){let h=s+i;t||(h=s-i);const p=this.rowModel.getRowIndexAtPixel(h),f=this.rowModel.getRow(p);if(null==f)break;const v=this.getStickyAncestors(f).find(S=>(t?S.rowIndex<p:S.rowIndex>p)&&a(S));if(v)r(v);else{if(!(t?f.rowTop<h:f.rowTop+f.rowHeight>h)||!a(f))break;r(f);}}return t||o.forEach(u=>{u.stickyRowTop=i-(u.stickyRowTop+u.rowHeight);}),this.refreshNodesAndContainerHeight(e,o,i);}areFooterRowsStickySuppressed(){const e=this.gos.get("suppressStickyTotalRow");if(!0===e)return!0;const t=!!this.gos.get("groupIncludeFooter")||"group"===e,i=!!this.gos.get("groupIncludeTotalFooter")||"grand"===e;return!(!t||!i)||(i?"grand":!!t&&"group");}canRowsBeSticky(){const e=this.gos.isGroupRowsSticky(),t=this.areFooterRowsStickySuppressed(),i=this.gos.get("suppressGroupRowsSticky");return e&&(!t||!i);}getStickyAncestors(e){const t=[];let i=e.footer?e.sibling:e.parent;for(;i;)i.sibling&&t.push(i.sibling),t.push(i),i=i.parent;return t.reverse();}checkStickyRows(){const e=this.updateStickyRows("top"),t=this.updateStickyRows("bottom");return e||t;}destroyStickyCtrls(){this.refreshNodesAndContainerHeight("top",new Set(),0),this.refreshNodesAndContainerHeight("bottom",new Set(),0);}refreshStickyNode(e){const t=new Set();if(this.stickyTopRowCtrls.some(i=>i.getRowNode()===e)){for(let i=0;i<this.stickyTopRowCtrls.length;i++){const s=this.stickyTopRowCtrls[i].getRowNode();s!==e&&t.add(s);}this.refreshNodesAndContainerHeight("top",t,this.topContainerHeight)&&this.checkStickyRows();}else{for(let i=0;i<this.stickyBottomRowCtrls.length;i++){const s=this.stickyBottomRowCtrls[i].getRowNode();s!==e&&t.add(s);}this.refreshNodesAndContainerHeight("bottom",t,this.bottomContainerHeight)&&this.checkStickyRows();}}refreshNodesAndContainerHeight(e,t,i){const s="top"===e,o=s?this.stickyTopRowCtrls:this.stickyBottomRowCtrls,r={},n=[];for(let p=0;p<o.length;p++){const f=o[p].getRowNode();t.has(f)?n.push(o[p]):(r[f.id]=o[p],f.sticky=!1);}const l=new Set();for(let p=0;p<n.length;p++)l.add(n[p].getRowNode());const a=[];t.forEach(p=>{l.has(p)||(p.sticky=!0,a.push(this.createRowCon(p,!1,!1)));});let u=!!a.length||n.length!==o.length;s?this.topContainerHeight!==i&&(this.topContainerHeight=i,this.gridBodyCtrl.setStickyTopHeight(i),u=!0):this.bottomContainerHeight!==i&&(this.bottomContainerHeight=i,this.gridBodyCtrl.setStickyBottomHeight(i),u=!0),this.destroyRowCtrls(r,!1);const h=[...n,...a];return h.sort((p,f)=>f.getRowNode().rowIndex-p.getRowNode().rowIndex),s||h.reverse(),h.forEach(p=>p.setRowTop(p.getRowNode().stickyRowTop)),!!u&&(s?this.stickyTopRowCtrls=h:this.stickyBottomRowCtrls=h,!0);}};d([g("rowModel")],uo.prototype,"rowModel",2),d([g("rowRenderer")],uo.prototype,"rowRenderer",2),d([g("ctrlsService")],uo.prototype,"ctrlsService",2),d([T],uo.prototype,"postConstruct",1);var He=class extends R{constructor(){super(...arguments),this.destroyFuncsForColumnListeners=[],this.rowCtrlsByRowIndex={},this.zombieRowCtrls={},this.allRowCtrls=[],this.topRowCtrls=[],this.bottomRowCtrls=[],this.refreshInProgress=!1,this.dataFirstRenderedFired=!1,this.setupRangeSelectionListeners=()=>{const e=()=>{this.getAllCellCtrls().forEach(r=>r.onRangeSelectionChanged());},t=()=>{this.getAllCellCtrls().forEach(r=>r.updateRangeBordersIfRangeCount());},i=()=>{this.eventService.addEventListener(c.EVENT_RANGE_SELECTION_CHANGED,e),this.eventService.addEventListener(c.EVENT_COLUMN_MOVED,t),this.eventService.addEventListener(c.EVENT_COLUMN_PINNED,t),this.eventService.addEventListener(c.EVENT_COLUMN_VISIBLE,t);},s=()=>{this.eventService.removeEventListener(c.EVENT_RANGE_SELECTION_CHANGED,e),this.eventService.removeEventListener(c.EVENT_COLUMN_MOVED,t),this.eventService.removeEventListener(c.EVENT_COLUMN_PINNED,t),this.eventService.removeEventListener(c.EVENT_COLUMN_VISIBLE,t);};this.addDestroyFunc(()=>s()),this.addManagedPropertyListener("enableRangeSelection",r=>{r.currentValue?i():s();}),this.gos.get("enableRangeSelection")&&i();};}postConstruct(){this.ctrlsService.whenReady(e=>{this.gridBodyCtrl=e.gridBodyCtrl,this.initialise();});}initialise(){if(this.addManagedListener(this.eventService,c.EVENT_PAGINATION_CHANGED,this.onPageLoaded.bind(this)),this.addManagedListener(this.eventService,c.EVENT_PINNED_ROW_DATA_CHANGED,this.onPinnedRowDataChanged.bind(this)),this.addManagedListener(this.eventService,c.EVENT_DISPLAYED_COLUMNS_CHANGED,this.onDisplayedColumnsChanged.bind(this)),this.addManagedListener(this.eventService,c.EVENT_BODY_SCROLL,this.onBodyScroll.bind(this)),this.addManagedListener(this.eventService,c.EVENT_BODY_HEIGHT_CHANGED,this.redraw.bind(this)),this.addManagedPropertyListeners(["domL
1ayout","embedFullWidthRows"],()=>this.onDomLayoutChanged()),this.addManagedPropertyListeners(["suppressMaxRenderedRowRestriction","rowBuffer"],()=>this.redraw()),this.addManagedPropertyListeners(["suppressCellFocus","getBusinessKeyForNode","fullWidthCellRenderer","fullWidthCellRendererParams","rowStyle","getRowStyle","rowClass","getRowClass","rowClassRules","suppressStickyTotalRow","groupRowRenderer","groupRowRendererParams","loadingCellRenderer","loadingCellRendererParams","detailCellRenderer","detailCellRendererParams","enableRangeSelection","enableCellTextSelection"],()=>this.redrawRows()),this.gos.isGroupRowsSticky()){const e=this.rowModel.getType();("clientSide"===e||"serverSide"===e)&&(this.stickyRowFeature=this.createManagedBean(new uo(this.createRowCon.bind(this),this.destroyRowCtrls.bind(this))));}this.registerCellEventListeners(),this.initialiseCache(),this.printLayout=this.gos.isDomLayout("print"),this.embedFullWidthRows=this.printLayout||this.gos.get("embedFullWidthRows"),this.redrawAfterModelUpdate();}initialiseCache(){if(this.gos.get("keepDetailRows")){const e=this.getKeepDetailRowsCount();this.cachedRowCtrls=new Gp(e??3);}}getKeepDetailRowsCount(){return this.gos.get("keepDetailRowsCount");}getStickyTopRowCtrls(){return this.stickyRowFeature?this.stickyRowFeature.getStickyTopRowCtrls():[];}getStickyBottomRowCtrls(){return this.stickyRowFeature?this.stickyRowFeature.getStickyBottomRowCtrls():[];}updateAllRowCtrls(){const e=kt(this.rowCtrlsByRowIndex),t=kt(this.zombieRowCtrls),i=this.cachedRowCtrls?this.cachedRowCtrls.getEntries():[];this.allRowCtrls=t.length>0||i.length>0?[...e,...t,...i]:e;}onCellFocusChanged(e){this.getAllCellCtrls().forEach(t=>t.onCellFocused(e)),this.getFullWidthRowCtrls().forEach(t=>t.onFullWidthRowFocused(e));}registerCellEventListeners(){this.addManagedListener(this.eventService,c.EVENT_CELL_FOCUSED,e=>{this.onCellFocusChanged(e);}),this.addManagedListener(this.eventService,c.EVENT_CELL_FOCUS_CLEARED,()=>{this.onCellFocusChanged();}),this.addManagedListener(this.eventService,c.EVENT_FLASH_CELLS,e=>{this.getAllCellCtrls().forEach(t=>t.onFlashCells(e));}),this.addManagedListener(this.eventService,c.EVENT_COLUMN_HOVER_CHANGED,()=>{this.getAllCellCtrls().forEach(e=>e.onColumnHover());}),this.addManagedListener(this.eventService,c.EVENT_DISPLAYED_COLUMNS_CHANGED,()=>{this.getAllCellCtrls().forEach(e=>e.onDisplayedColumnsChanged());}),this.addManagedListener(this.eventService,c.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,()=>{this.printLayout&&this.getAllCellCtrls().forEach(e=>e.onLeftChanged());}),this.setupRangeSelectionListeners(),this.refreshListenersToColumnsForCellComps(),this.addManagedListener(this.eventService,c.EVENT_GRID_COLUMNS_CHANGED,this.refreshListenersToColumnsForCellComps.bind(this)),this.addDestroyFunc(this.removeGridColumnListeners.bind(this));}removeGridColumnListeners(){this.destroyFuncsForColumnListeners.forEach(e=>e()),this.destroyFuncsForColumnListeners.length=0;}refreshListenersToColumnsForCellComps(){this.removeGridColumnListeners(),this.columnModel.getAllGridColumns().forEach(t=>{const i=a=>{this.getAllCellCtrls().forEach(u=>{u.getColumn()===t&&a(u);});},s=()=>{i(a=>a.onLeftChanged());},o=()=>{i(a=>a.onWidthChanged());},r=()=>{i(a=>a.onFirstRightPinnedChanged());},n=()=>{i(a=>a.onLastLeftPinnedChanged());},l=()=>{i(a=>a.onColDefChanged());};t.addEventListener("leftChanged",s),t.addEventListener("widthChanged",o),t.addEventListener("firstRightPinnedChanged",r),t.addEventListener("lastLeftPinnedChanged",n),t.addEventListener("colDefChanged",l),this.destroyFuncsForColumnListeners.push(()=>{t.removeEventListener("leftChanged",s),t.removeEventListener("widthChanged",o),t.removeEventListener("firstRightPinnedChanged",r),t.removeEventListener("lastLeftPinnedChanged",n),t.removeEventListener("colDefChanged",l);});});}onDomLayoutChanged(){const e=this.gos.isDomLayout("print"),t=e||this.gos.get("embedFullWidthRows"),i=t!==this.embedFullWidthRows||this.printLayout!==e;this.printLayout=e,this.embedFullWidthRows=t,i&&this.redrawAfterModelUpdate({domLayoutChanged:!0});}
1datasourceChanged(){this.firstRenderedRow=0,this.lastRenderedRow=-1;const e=Object.keys(this.rowCtrlsByRowIndex);this.removeRowCtrls(e);}onPageLoaded(e){this.redrawAfterModelUpdate({recycleRows:e.keepRenderedRows,animate:e.animate,newData:e.newData,newPage:e.newPage,onlyBody:!0});}getAllCellsForColumn(e){const t=[];return this.getAllRowCtrls().forEach(i=>{const s=i.getCellElement(e);s&&t.push(s);}),t;}refreshFloatingRowComps(){this.refreshFloatingRows(this.topRowCtrls,this.pinnedRowModel.getPinnedTopRowData()),this.refreshFloatingRows(this.bottomRowCtrls,this.pinnedRowModel.getPinnedBottomRowData());}getTopRowCtrls(){return this.topRowCtrls;}getCentreRowCtrls(){return this.allRowCtrls;}getBottomRowCtrls(){return this.bottomRowCtrls;}refreshFloatingRows(e,t){e.forEach(i=>{i.destroyFirstPass(),i.destroySecondPass();}),e.length=0,t&&t.forEach(i=>{const s=new Yt(i,this.beans,!1,!1,this.printLayout);e.push(s);});}onPinnedRowDataChanged(){this.redrawAfterModelUpdate({recycleRows:!0});}redrawRow(e,t=!1){var i;if(e.sticky)this.stickyRowFeature.refreshStickyNode(e);else{if(null!=(i=this.cachedRowCtrls)&&i.has(e))return void this.cachedRowCtrls.removeRow(e);{const s=o=>{const r=o[e.rowIndex];r&&r.getRowNode()===e&&(r.destroyFirstPass(),r.destroySecondPass(),o[e.rowIndex]=this.createRowCon(e,!1,!1));};switch(e.rowPinned){case"top":s(this.topRowCtrls);break;case"bottom":s(this.bottomRowCtrls);break;default:s(this.rowCtrlsByRowIndex),this.updateAllRowCtrls();}}}t||this.dispatchDisplayedRowsChanged(!1);}redrawRows(e){if(null!=e)return e?.forEach(i=>this.redrawRow(i,!0)),void this.dispatchDisplayedRowsChanged(!1);this.redrawAfterModelUpdate();}getCellToRestoreFocusToAfterRefresh(e){const t=e?.suppressKeepFocus?null:this.focusService.getFocusCellToUseAfterRefresh();if(null==t)return null;const i=this.gos.getActiveDomElement(),s=this.gos.getDomData(i,$t.DOM_DATA_KEY_CELL_CTRL),o=this.gos.getDomData(i,Yt.DOM_DATA_KEY_ROW_CTRL);return s||o?t:null;}redrawAfterModelUpdate(e={}){this.getLockOnRefresh();const t=this.getCellToRestoreFocusToAfterRefresh(e);this.updateContainerHeights(),this.scrollToTopIfNewData(e);
1const i=!e.domLayoutChanged&&!!e.recycleRows,s=e.animate&&this.gos.isAnimateRows(),o=i?this.getRowsToRecycle():null;i||this.removeAllRowComps(),this.workOutFirstAndLastRowsToRender(),this.stickyRowFeature&&this.stickyRowFeature.checkStickyRows(),this.recycleRows(o,s),this.gridBodyCtrl.updateRowCount(),e.onlyBody||this.refreshFloatingRowComps(),this.dispatchDisplayedRowsChanged(),null!=t&&this.restoreFocusedCell(t),this.releaseLockOnRefresh();}scrollToTopIfNewData(e){const t=e.newData||e.newPage,i=this.gos.get("suppressScrollOnNewData");t&&!i&&this.gridBodyCtrl.getScrollFeature().scrollToTop();}updateContainerHeights(){if(this.printLayout)return void this.rowContainerHeightService.setModelHeight(null);let e=this.paginationProxy.getCurrentPageHeight();0===e&&(e=1),this.rowContainerHeightService.setModelHeight(e);}getLockOnRefresh(){if(this.refreshInProgress)throw new Error("AG Grid: cannot get grid to draw rows when it is in the middle of drawing rows. Your code probably called a grid API method while the grid was in the render stage. To overcome this, put the API call into a timeout, e.g. instead of api.redrawRows(), call setTimeout(function() { api.redrawRows(); }
1, 0). To see what part of your code that caused the refresh check this stacktrace.");this.refreshInProgress=!0;}releaseLockOnRefresh(){this.refreshInProgress=!1;}isRefreshInProgress(){return this.refreshInProgress;}restoreFocusedCell(e){e&&(this.focusService.setRestoreFocusedCell(e),this.onCellFocusChanged(this.beans.gos.addGridCommonParams({rowIndex:e.rowIndex,column:e.column,rowPinned:e.rowPinned,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0,type:"mock"})));}stopEditing(e=!1){this.getAllRowCtrls().forEach(t=>{t.stopEditing(e);});}getAllCellCtrls(){const e=[],t=this.getAllRowCtrls(),i=t.length;for(let s=0;s<i;s++){const o=t[s].getAllCellCtrls(),r=o.length;for(let n=0;n<r;n++)e.push(o[n]);}return e;}getAllRowCtrls(){const e=this.stickyRowFeature&&this.stickyRowFeature.getStickyTopRowCtrls()||[],t=this.stickyRowFeature&&this.stickyRowFeature.getStickyBottomRowCtrls()||[],i=[...this.topRowCtrls,...this.bottomRowCtrls,...e,...t];for(const s in this.rowCtrlsByRowIndex)i.push(this.rowCtrlsByRowIndex[s]);return i;}addRenderedRowListener(e,t,i){const s=this.rowCtrlsByRowIndex[t];s&&s.addEventListener(e,i);}flashCells(e={}){this.getCellCtrls(e.rowNodes,e.columns).forEach(t=>t.flashCell(e));}refreshCells(e={}){const t={forceRefresh:e.force,newData:!1,suppressFlash:e.suppressFlash};this.getCellCtrls(e.rowNodes,e.columns).forEach(i=>i.refreshOrDestroyCell(t)),e.rowNodes&&(this.getRowCtrls(e.rowNodes).forEach(i=>{i.isFullWidth()&&(i.refreshFullWidth()||this.redrawRow(i.getRowNode(),!0));}),this.dispatchDisplayedRowsChanged(!1));}getCellRendererInstances(e){var t;const i=this.getCellCtrls(e.rowNodes,e.columns).map(r=>r.getCellRenderer()).filter(r=>null!=r);if(null!=(t=e.columns)&&t.length)return i;const s=[],o=this.mapRowNodes(e.rowNodes);return this.getAllRowCtrls().forEach(r=>{if(o&&!this.isRowInMap(r.getRowNode(),o)||!r.isFullWidth())return;const n=r.getFullWidthCellRenderers();for(let l=0;l<n.length;l++){const a=n[l];null!=a&&s.push(a);}}),[...s,...i];}getCellEditorInstances(e){const t=[];return this.getCellCtrls(e.rowNodes,e.columns).forEach(i=>{const s=i.getCellEditor();s&&t.push(s);}),t;}getEditingCells(){const e=[];return this.getAllCellCtrls().forEach(t=>{if(t.isEditing()){const i=t.getCellPosition();e.push(i);}}),e;}mapRowNodes(e){if(!e)return;const t={top:{},bottom:{},normal:{}};return e.forEach(i=>{const s=i.id;switch(i.rowPinned){case"top":t.top[s]=i;break;case"bottom":t.bottom[s]=i;break;default:t.normal[s]=i;}}),t;}isRowInMap(e,t){const i=e.id;switch(e.rowPinned){case"top":return null!=t.top[i];case"bottom":return null!=t.bottom[i];default:return null!=t.normal[i];}}getRowCtrls(e){const t=this.mapRowNodes(e),i=this.getAllRowCtrls();return e&&t?i.filter(s=>{const o=s.getRowNode();return this.isRowInMap(o,t);}):i;}getCellCtrls(e,t){let i;y(t)&&(i={},t.forEach(o=>{const r=this.columnModel.getGridColumn(o);y(r)&&(i[r.getId()]=!0);}));const s=[];return this.getRowCtrls(e).forEach(o=>{o.getAllCellCtrls().forEach(r=>{const n=r.getColumn().getId();i&&!i[n]||s.push(r);});}),s;}destroy(){this.removeAllRowComps(),super.destroy();}removeAllRowComps(){const e=Object.keys(this.rowCtrlsByRowIndex);this.removeRowCtrls(e),this.stickyRowFeature&&this.stickyRowFeature.destroyStickyCtrls();}getRowsToRecycle(){const e=[];Se(this.rowCtrlsByRowIndex,(i,s)=>{null==s.getRowNode().id&&e.push(i);}),this.removeRowCtrls(e);const t={};return Se(this.rowCtrlsByRowIndex,(i,s)=>{const o=s.getRowNode();t[o.id]=s;}),this.rowCtrlsByRowIndex={},t;}removeRowCtrls(e,t=!1){e.forEach(i=>{const s=this.rowCtrlsByRowIndex[i];s&&(s.destroyFirstPass(t),s.destroySecondPass()),delete this.rowCtrlsByRowIndex[i];});}onBodyScroll(e){"vertical"===e.direction&&this.redraw({afterScroll:!0});}redraw(e={}){const{afterScroll:t}=e;let i;this.stickyRowFeature&&Ln()&&(i=this.getCellToRestoreFocusToAfterRefresh()||void 0);const s=this.firstRenderedRow,o=this.lastRenderedRow;this.workOutFirstAndLastRowsToRender();let r=!1;if(this.stickyRowFeature&&(r=this.stickyRowFeature.checkStickyRows()),(!t||r||this.firstRenderedRow!==s||this.lastRenderedRow!==o)&&(this.getLockOnRefresh(),this.recycleRows(null,!1,t),this.releaseLockOnRefresh(),this.dispatchDisplayedRowsChanged(t&&!r),null!=i)){const l=this.getCellToRestoreFocusToAfterRefresh();null!=i&&null==l&&(this.animationFrameService.flushAllFrames(),this.restoreFocusedCell(i));}}removeRowCompsNotToDraw(e,t){const i={};e.forEach(r=>i[r]=!0);const o=Object.keys(this.rowCtrlsByRowIndex).filter(r=>!i[r]);this.removeRowCtrls(o,t);}
1calculateIndexesToDraw(e){let t=Ba(this.firstRenderedRow,this.lastRenderedRow);const i=(o,r)=>{const n=r.getRowNode().rowIndex;null!=n&&(n<this.firstRenderedRow||n>this.lastRenderedRow)&&this.doNotUnVirtualiseRow(r)&&t.push(n);};Se(this.rowCtrlsByRowIndex,i),Se(e,i),t.sort((o,r)=>o-r);const s=[];for(let o=0;o<t.length;o++){const r=t[o],n=this.paginationProxy.getRow(r);n&&!n.sticky&&s.push(r);}return s;}recycleRows(e,t=!1,i=!1){const s=this.calculateIndexesToDraw(e);(this.printLayout||i)&&(t=!1),this.removeRowCompsNotToDraw(s,!t);const o=[];s.forEach(r=>{const n=this.createOrUpdateRowCtrl(r,e,t,i);y(n)&&o.push(n);}),e&&(!i||this.gos.get("suppressAnimationFrame")||this.printLayout?this.destroyRowCtrls(e,t):this.beans.animationFrameService.addDestroyTask(()=>{this.destroyRowCtrls(e,t),this.updateAllRowCtrls(),this.dispatchDisplayedRowsChanged();})),this.updateAllRowCtrls();}dispatchDisplayedRowsChanged(e=!1){this.eventService.dispatchEvent({type:c.EVENT_DISPLAYED_ROWS_CHANGED,afterScroll:e});}onDisplayedColumnsChanged(){const e=this.columnModel.isPinningLeft(),t=this.columnModel.isPinningRight();(this.pinningLeft!==e||t!==this.pinningRight)&&(this.pinningLeft=e,this.pinningRight=t,this.embedFullWidthRows&&this.redrawFullWidthEmbeddedRows());}redrawFullWidthEmbeddedRows(){const e=[];this.getFullWidthRowCtrls().forEach(t=>{const i=t.getRowNode().rowIndex;e.push(i.toString());}),this.refreshFloatingRowComps(),this.removeRowCtrls(e),this.redraw({afterScroll:!0});}getFullWidthRowCtrls(e){const t=this.mapRowNodes(e);return this.getAllRowCtrls().filter(i=>{if(!i.isFullWidth())return!1;const s=i.getRowNode();return!(null!=t&&!this.isRowInMap(s,t));});}createOrUpdateRowCtrl(e,t,i,s){let o,r=this.rowCtrlsByRowIndex[e];if(r||(o=this.paginationProxy.getRow(e),y(o)&&y(t)&&t[o.id]&&o.alreadyRendered&&(r=t[o.id],t[o.id]=null)),!r){if(o||(o=this.paginationProxy.getRow(e)),!y(o))return;r=this.createRowCon(o,i,s);}return o&&(o.alreadyRendered=!0),this.rowCtrlsByRowIndex[e]=r,r;}destroyRowCtrls(e,t){const i=[];Se(e,(s,o)=>{if(o){if(this.cachedRowCtrls&&o.isCacheable())return void this.cachedRowCtrls.addRow(o);o.destroyFirstPass(!t),t?(this.zombieRowCtrls[o.getInstanceId()]=o,i.push(()=>{o.destroySecondPass(),delete this.zombieRowCtrls[o.getInstanceId()];})):o.destroySecondPass();}}),t&&(i.push(()=>{this.updateAllRowCtrls(),this.dispatchDisplayedRowsChanged();}),Zl(i));}getRowBuffer(){return this.gos.get("rowBuffer");}getRowBufferInPixels(){return this.getRowBuffer()*this.gos.getRowHeightAsNumber();}workOutFirstAndLastRowsToRender(){let e,t;if(this.rowContainerHeightService.updateOffset(),this.paginationProxy.isRowsToRender()){if(this.printLayout)this.environment.refreshRowHeightVariable(),e=this.paginationProxy.getPageFirstRow(),t=this.paginationProxy.getPageLastRow();else{const l=this.getRowBufferInPixels(),a=this.ctrlsService.getGridBodyCtrl(),u=this.gos.get("suppressRowVirtualisation");let p,f,h=!1;do{const b=this.paginationProxy.getPixelOffset(),{pageFirstPixel:E,pageLastPixel:F}=this.paginationProxy.getCurrentPagePixelRange(),P=this.rowContainerHeightService.getDivStretchOffset(),I=a.getScrollFeature().getVScrollPosition(),G=I.top,N=I.bottom;u?(p=E+P,f=F+P):(p=Math.max(G+b-l,E)+P,f=Math.min(N+b+l,F)+P),this.firstVisibleVPixel=Math.max(G+b,E)+P,this.lastVisibleVPixel=Math.min(N+b,F)+P,h=this.ensureAllRowsInRangeHaveHeightsCalculated(p,f);}while(h);let m=this.paginationProxy.getRowIndexAtPixel(p),v=this.paginationProxy.getRowIndexAtPixel(f);const w=this.paginationProxy.getPageFirstRow(),S=this.paginationProxy.getPageLastRow();m<w&&(m=w),v>S&&(v=S),e=m,t=v;}}else e=0,t=-1;const i=this.gos.isDomLayout("normal"),s=this.gos.get("suppressMaxRenderedRowRestriction"),o=Math.max(this.getRowBuffer(),500);i&&!s&&t-e>o&&(t=e+o),e===this.firstRenderedRow&&t===this.lastRenderedRow||(this.firstRenderedRow=e,this.lastRenderedRow=t,this.eventService.dispatchEvent({type:c.EVENT_VIEWPORT_CHANGED,firstRow:e,lastRow:t}));}dispatchFirstDataRenderedEvent(){if(this.dataFirstRenderedFired)return;this.dataFirstRenderedFired=!0;const e={type:c.EVENT_FIRST_DATA_RENDERED,firstRow:this.firstRen
1deredRow,lastRow:this.lastRenderedRow};window.requestAnimationFrame(()=>{this.beans.eventService.dispatchEvent(e);});}ensureAllRowsInRangeHaveHeightsCalculated(e,t){const i=this.paginationProxy.ensureRowHeightsValid(e,t,-1,-1);return i&&this.updateContainerHeights(),i;}getFirstVisibleVerticalPixel(){return this.firstVisibleVPixel;}getLastVisibleVerticalPixel(){return this.lastVisibleVPixel;}getFirstVirtualRenderedRow(){return this.firstRenderedRow;}getLastVirtualRenderedRow(){return this.lastRenderedRow;}doNotUnVirtualiseRow(e){const s=e.getRowNode(),o=this.focusService.isRowNodeFocused(s),r=e.isEditing();return!!(o||r||s.detail)&&!!this.paginationProxy.isRowPresent(s);}createRowCon(e,t,i){const s=this.cachedRowCtrls?this.cachedRowCtrls.getRow(e):null;if(s)return s;const o=this.gos.get("suppressAnimationFrame");return new Yt(e,this.beans,t,i&&!o&&!this.printLayout,this.printLayout);}getRenderedNodes(){return Object.values(this.rowCtrlsByRowIndex).map(t=>t.getRowNode());}getRowByPosition(e){let t;const{rowIndex:i}=e;switch(e.rowPinned){case"top":t=this.topRowCtrls[i];break;case"bottom":t=this.bottomRowCtrls[i];break;default:t=this.rowCtrlsByRowIndex[i],t||(t=this.getStickyTopRowCtrls().find(s=>s.getRowNode().rowIndex===i)||null,t||(t=this.getStickyBottomRowCtrls().find(s=>s.getRowNode().rowIndex===i)||null));}return t;}isRangeInRenderedViewport(e,t){return null!=e&&null!=t&&!(t<this.firstRenderedRow||e>this.lastRenderedRow);}};d([g("animationFrameService")],He.prototype,"animationFrameService",2),d([g("paginationProxy")],He.prototype,"paginationProxy",2),d([g("columnModel")],He.prototype,"columnModel",2),d([g("pinnedRowModel")],He.prototype,"pinnedRowModel",2),d([g("rowModel")],He.prototype,"rowModel",2),d([g("focusService")],He.prototype,"focusService",2),d([g("beans")],He.prototype,"beans",2),d([g("rowContainerHeightService")],He.prototype,"rowContainerHeightService",2),d([g("ctrlsService")],He.prototype,"ctrlsService",2),d([T],He.prototype,"postConstruct",1),He=d([L("rowRenderer")],He);var Gp=class{constructor(e){this.entriesMap={},this.entriesList=[],this.maxCount=e;}addRow(e){if(this.entriesMap[e.getRowNode().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(null==e||null==e.id)return null;const t=this.entriesMap[e.id];return t?(this.removeFromCache(t),t.setCached(!1),t.getRowNode()!=e?null:t):null;}has(e){return null!=this.entriesMap[e.id];}removeRow(e){const t=e.id,i=this.entriesMap[t];delete this.entriesMap[t],Ge(this.entriesList,i);}removeFromCache(e){const t=e.getRowNode().id;delete this.entriesMap[t],Ge(this.entriesList,e);}getEntries(){return this.entriesList;}},as=class extends R{init(){this.setPinnedTopRowData(),this.setPinnedBottomRowData(),this.addManagedPropertyListener("pinnedTopRowData",()=>this.setPinnedTopRowData()),this.addManagedPropertyListener("pinnedBottomRowData",()=>this.setPinnedBottomRowData());}isEmpty(e){return Me("top"===e?this.pinnedTopRows:this.pinnedBottomRows);}isRowsToRender(e){return!this.isEmpty(e);}getRowAtPixel(e,t){const i="top"===t?this.pinnedTopRows:this.pinnedBottomRows;if(Me(i))return 0;for(let s=0;s<i.length;s++){const o=i[s];if(o.rowTop+o.rowHeight-1>=e)return s;}return i.length-1;}setPinnedTopRowData(){const e=this.gos.get("pinnedTopRowData");this.pinnedTopRows=this.createNodesFromData(e,!0),this.eventService.dispatchEvent({type:c.EVENT_PINNED_ROW_DATA_CHANGED});}setPinnedBottomRowData(){const e=this.gos.get("pinnedBottomRowData");this.pinnedBottomRows=this.createNodesFromData(e,!1),this.eventService.dispatchEvent({type:c.EVENT_PINNED_ROW_DATA_CHANGED});}createNodesFromData(e,t){const i=[];if(e){let s=0;e.forEach((o,r)=>{const n=new W(this.beans);n.data=o,n.id=(t?W.ID_PREFIX_TOP_PINNED:W.ID_PREFIX_BOTTOM_PINNED)+r,n.rowPinned=t?"top":"bottom",n.setRowTop(s),n.setRowHeight(this.gos.getRowHeightForNode(n).height),n.setRowIndex(r),s+=n.rowHeight,i.push(n);});}return i;}getPinnedTopRowData(){return this.pinnedTopRows;}getPinnedBottomRowData(){return this.pinnedBottomRows;}getPinnedTopTotalHeight(){return this.getTotalHeight(this.pinnedTopRows);}getPinnedTopRowCount(){return this.pinnedTopRows?this.pinnedTopRows.length:0;}getPinnedBottomRowCount(){return this.pinnedBottomRows?this.pinnedBottomRows.length:0;}getPinnedTopRow(e){return this.pinnedTopRows[e];}getPinnedBottomRow(e){return this.pinnedBottomRows[e];}forEachPinnedTopRow(e){Me(this.pinnedTopRows)||this.pinnedTopRows.forEach(e);}forEachPinnedBottomRow(e){Me(this.pinnedBottomRows)||this.pinnedBottomRows.forEach(e);}getPinnedBottomTotalHeight(){return this.getTotalHeight(this.pinnedBottomRows);}getTotalHeight(e){if(!e||0===e.length)return 0;const t=Y(e);return t.rowTop+t.rowHeight;}};d([g("beans")],as.prototype,"beans",2),d([T],as.prototype,"init",1),as=d([L("pinnedRowModel")],as);var cu=(e=>(e.Applied="Applied",e.StoreNotFound="StoreNotFound",e.StoreLoading="StoreLoading",e.StoreWaitingToLoad="StoreWaitingToLoad",e.StoreLoadingFailed="StoreLoadingFailed",e.StoreWrongType="StoreWrongType",e.Cancelled="Cancelled",e.StoreNotStarted="StoreNotStarted",e))(cu||{}),ho=class{constructor(e,t){this.active=!0,this.nodeIdsToColumns={},this.mapToItems={},this.keepingColumns=e,this.pathRoot={rowNode:t,children:null},this.mapToItems[t.id]=this.pathRoot;}setInactive(){this.active=!1;}isActive(){return this.active;}depthFirstSearchChangedPath(e,t){if(e.children)for(let i=0;i<e.children.length;i++)this.depthFirstSearchChangedPath(e.children[i],t);t(e.rowNode);}depthFirstSearchEverything(e,t,i){if(e.childrenAfterGroup)for(let s=0;s<e.childrenAfterGroup.length;s++){const o=e.childrenAfterGroup[s];
1o.childrenAfterGroup?this.depthFirstSearchEverything(e.childrenAfterGroup[s],t,i):i&&t(o);}t(e);}forEachChangedNodeDepthFirst(e,t=!1,i=!1){this.active&&!i?this.depthFirstSearchChangedPath(this.pathRoot,e):this.depthFirstSearchEverything(this.pathRoot.rowNode,e,t);}executeFromRootNode(e){e(this.pathRoot.rowNode);}createPathItems(e){let t=e,i=0;for(;!this.mapToItems[t.id];)this.mapToItems[t.id]={rowNode:t,children:null},i++,t=t.parent;return i;}populateColumnsMap(e,t){if(!this.keepingColumns||!t)return;let i=e;for(;i;)this.nodeIdsToColumns[i.id]||(this.nodeIdsToColumns[i.id]={}),t.forEach(s=>this.nodeIdsToColumns[i.id][s.getId()]=!0),i=i.parent;}linkPathItems(e,t){let i=e;for(let s=0;s<t;s++){const o=this.mapToItems[i.id],r=this.mapToItems[i.parent.id];r.children||(r.children=[]),r.children.push(o),i=i.parent;}}addParentNode(e,t){if(!e||e.isRowPinned())return;const i=this.createPathItems(e);this.linkPathItems(e,i),this.populateColumnsMap(e,t);}canSkip(e){return this.active&&!this.mapToItems[e.id];}getValueColumnsForNode(e,t){if(!this.keepingColumns)return t;const i=this.nodeIdsToColumns[e.id];return t.filter(o=>i[o.getId()]);}getNotValueColumnsForNode(e,t){if(!this.keepingColumns)return null;const i=this.nodeIdsToColumns[e.id];return t.filter(o=>!i[o.getId()]);}},ds=class Bi extends R{constructor(t){super(),this.state=Bi.STATE_WAITING_TO_LOAD,this.version=0,this.id=t;}getId(){return this.id;}load(){this.state=Bi.STATE_LOADING,this.loadFromDatasource();}getVersion(){return this.version;}setStateWaitingToLoad(){this.version++,this.state=Bi.STATE_WAITING_TO_LOAD;}getState(){return this.state;}pageLoadFailed(t){this.isRequestMostRecentAndLive(t)&&(this.state=Bi.STATE_FAILED,this.processServerFail()),this.dispatchLoadCompleted(!1);}success(t,i){this.successCommon(t,i);}pageLoaded(t,i,s){this.successCommon(t,{rowData:i,rowCount:s});}isRequestMostRecentAndLive(t){const i=t===this.version,s=this.isAlive();return i&&s;}successCommon(t,i){this.dispatchLoadCompleted(),this.isRequestMostRecentAndLive(t)&&(this.state=Bi.STATE_LOADED,this.processServerResult(i));}dispatchLoadCompleted(t=!0){this.dispatchEvent({type:Bi.EVENT_LOAD_COMPLETE,success:t,block:this});}};ds.EVENT_LOAD_COMPLETE="loadComplete",ds.STATE_WAITING_TO_LOAD="needsLoading",ds.STATE_LOADING="loading",ds.STATE_LOADED="loaded",ds.STATE_FAILED="failed";var Fr=ds,ht=class extends R{constructor(){super(...arguments),this.activeBlockLoadsCount=0,this.blocks=[],this.active=!0;}postConstruct(){this.maxConcurrentRequests=this.getMaxConcurrentDatasourceRequests();const e=this.gos.get("blockLoadDebounceMillis");e&&e>0&&(this.checkBlockToLoadDebounce=B.debounce(this.performCheckBlocksToLoad.bind(this),e));}setBeans(e){this.logger=e.create("RowNodeBlockLoader");}getMaxConcurrentDatasourceRequests(){const e=this.gos.get("maxConcurrentDatasourceRequests");return null==e?2:e<=0?void 0:e;}addBlock(e){this.blocks.push(e),e.addEventListener(Fr.EVENT_LOAD_COMPLETE,this.loadComplete.bind(this)),this.checkBlockToLoad();}removeBlock(e){B.removeFromArray(this.blocks,e);}destroy(){super.destroy(),this.active=!1;}loadComplete(){this.activeBlockLoadsCount--,this.checkBlockToLoad(),this.dispatchEvent({type:ht.BLOCK_LOADED_EVENT}),0==this.activeBlockLoadsCount&&this.dispatchEvent({type:ht.BLOCK_LOADER_FINISHED_EVENT});}checkBlockToLoad(){this.checkBlockToLoadDebounce?this.checkBlockToLoadDebounce():this.performCheckBlocksToLoad();}performCheckBlocksToLoad(){if(!this.active)return;if(this.printCacheStatus(),null!=this.maxConcurrentRequests&&this.activeBlockLoadsCount>=this.maxConcurrentRequests)return void this.logger.log("checkBlockToLoad: max loads exceeded");const e=this.getAvailableLoadingCount(),t=this.blocks.filter(i=>i.getState()===Fr.STATE_WAITING_TO_LOAD).slice(0,e);this.registerLoads(t.length),t.forEach(i=>i.load()),this.printCacheStatus();}getBlockState(){if(this.gos.isRowModelType("serverSide"))return this.rowModel.getBlockStates();const e={};return this.blocks.forEach(t=>{const{id:i,state:s}=t.getBlockStateJson();e[i]=s;}),e;}printCacheStatus(){this.logger.isLogging()&&this.logger.log(`printCacheStatus: activePageLoadsCount = ${this.activeBlockLoadsCount}, blocks = ${JSON.stringify(this.getBlockState())}`);}isLoading(){return this.activeBlockLoadsCount>0;}registerLoads(e){this.activeBlockLoadsCount+=e;}getAvailableLoadingCount(){return void 0!==this.maxConcurrentRequests?this.maxConcurrentRequests-this.activeBlockLoadsCount:void 0;}};ht.BLOCK_LOADED_EVENT="blockLoaded",ht.BLOCK_LOADER_FINISHED_EVENT="blockLoaderFinis
1hed",d([g("rowModel")],ht.prototype,"rowModel",2),d([T],ht.prototype,"postConstruct",1),d([be(0,Ue("loggerFactory"))],ht.prototype,"setBeans",1),ht=d([L("rowNodeBlockLoader")],ht);var us=class extends R{constructor(){super(...arguments),this.currentPage=0,this.topDisplayedRowIndex=0,this.bottomDisplayedRowIndex=0,this.pixelOffset=0,this.masterRowCount=0;}postConstruct(){this.active=this.gos.get("pagination"),this.pageSizeFromGridOptions=this.gos.get("paginationPageSize"),this.paginateChildRows=this.isPaginateChildRows(),this.addManagedListener(this.eventService,c.EVENT_MODEL_UPDATED,this.onModelUpdated.bind(this)),this.addManagedPropertyListener("pagination",this.onPaginationGridOptionChanged.bind(this)),this.addManagedPropertyListener("paginationPageSize",this.onPageSizeGridOptionChanged.bind(this)),this.onModelUpdated();}ensureRowHeightsValid(e,t,i,s){const o=this.rowModel.ensureRowHeightsValid(e,t,this.getPageFirstRow(),this.getPageLastRow());return o&&this.calculatePages(),o;}isPaginateChildRows(){return!(!this.gos.get("groupRemoveSingleChildren")&&!this.gos.get("groupRemoveLowestSingleChildren"))||this.gos.get("paginateChildRows");}onModelUpdated(e){this.calculatePages(),this.eventService.dispatchEvent({type:c.EVENT_PAGINATION_CHANGED,animate:!!e&&e.animate,newData:!!e&&e.newData,newPage:!!e&&e.newPage,newPageSize:!!e&&e.newPageSize,keepRenderedRows:!!e&&e.keepRenderedRows});}onPaginationGridOptionChanged(){this.active=this.gos.get("pagination"),this.calculatePages(),this.eventService.dispatchEvent({type:c.EVENT_PAGINATION_CHANGED,animate:!1,newData:!1,newPage:!1,newPageSize:!1,keepRenderedRows:!0});}onPageSizeGridOptionChanged(){this.setPageSize(this.gos.get("paginationPageSize"),"gridOptions");}goToPage(e){this.active&&this.currentPage!==e&&"number"==typeof this.currentPage&&(this.currentPage=e,this.calculatePages(),this.eventService.dispatchEvent({type:c.EVENT_PAGINATION_CHANGED,animate:!1,newData:!1,newPage:!0,newPageSize:!1,keepRenderedRows:!1}));}getPixelOffset(){return this.pixelOffset;}getRow(e){return this.rowModel.getRow(e);}getRowNode(e){return this.rowModel.getRowNode(e);}getRowIndexAtPixel(e){return this.rowModel.getRowIndexAtPixel(e);}getCurrentPageHeight(){return _(this.topRowBounds)||_(this.bottomRowBounds)?0:Math.max(this.bottomRowBounds.rowTop+this.bottomRowBounds.rowHeight-this.topRowBounds.rowTop,0);}getCurrentPagePixelRange(){return{pageFirstPixel:this.topRowBounds?this.topRowBounds.rowTop:0,pageLastPixel:this.bottomRowBounds?this.bottomRowBounds.rowTop+this.bottomRowBounds.rowHeight:0};}isRowPresent(e){return!!this.rowModel.isRowPresent(e)&&e.rowIndex>=this.topDisplayedRowIndex&&e.rowIndex<=this.bottomDisplayedRowIndex;}isEmpty(){return this.rowModel.isEmpty();}isRowsToRender(){return this.rowModel.isRowsToRender();}forEachNode(e){return this.rowModel.forEachNode(e);}forEachNodeOnPage(e){const t=this.getPageFirstRow(),i=this.getPageLastRow();for(let s=t;s<=i;s++){const o=this.getRow(s);o&&e(o);}}getType(){return this.rowModel.getType();}getRowBounds(e){const t=this.rowModel.getRowBounds(e);return t.rowIndex=e,t;}getPageFirstRow(){return this.topRowBounds?this.topRowBounds.rowIndex:-1;}getPageLastRow(){return this.bottomRowBounds?this.bottomRowBounds.rowIndex:-1;}getRowCount(){return this.rowModel.getRowCount();}getPageForIndex(e){return Math.floor(e/this.pageSize);}goToPageWithIndex(e){if(!this.active)return;const t=this.getPageForIndex(e);this.goToPage(t);}isRowInPage(e){return!this.active||this.getPageForIndex(e.rowIndex)===this.currentPage;}isLastPageFound(){return this.rowModel.isLastRowIndexKnown();}getCurrentPage(){return this.currentPage;}goToNextPage(){this.goToPage(this.currentPage+1);}goToPreviousPage(){this.goToPage(this.currentPage-1);}goToFirstPage(){this.goToPage(0);}goToLastPage(){const e=this.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 y(this.pageSizeAutoCalculated)?this.pageSizeAutoCalculated:y(this.pageSizeFromPageSizeSelector)?this.pageSizeFromPageSizeSelector:y(this.pageSizeFromInitialState)?this.pageSizeFromInitialState:y(this.pageSizeFromGridOptions)?this.pageSizeFromGridOptions:this.defaultPageSize;}unsetAutoCalculatedPageSize(){if(void 0===this.pageSizeAutoCalculated)return;const e=this.pageSizeAutoCalculated;this.pageSizeAutoCalculated=void 0,this.pageSize!==e&&(this.calculatePages(),this.eventService.dispatchEvent({type:c.EVENT_PAGINATION_CHANGED,animate:!1,newData:!1,newPage:!1,newPageSize:!0,keepRenderedRows:!1}));}setPageSize(e,t){const i=this.pageSize;switch(t){case"autoCalculated":this.pageSizeAutoCalculated=e;break;case"pageSizeSelector":this.pageSizeFromPageSizeSelector=e,0!==this.currentPage&&this.goToFirstPage();break;case"initialState":this.pageSizeFromInitialState=e;break;case"gridOptions":this.pageSizeFromGridOptions=e,this.pageSizeFromInitialState=void 0,this.pageSizeFromPageSizeSelector=void 0,0!==this.currentPage&&this.goToFirstPage();}i!==this.pageSize&&(this.calculatePages(),this.eventService.dispatchEvent({type:c.EVENT_PAGINATION_CHANGED,animate:!1,newData:!1,newPage:!1,newPageSize:!0,keepRenderedRows:!0}));}calculatePages(){this.active?this.paginateChildRows?this.calculatePagesAllRows():this.calculatePagesMasterRowsOnly():this.calculatedPagesNotActive(),this.topRowBounds=this.rowModel.getRowBounds(this.topDisplayedRowIndex),this.topRowBounds&&(this.topRowBounds.rowIndex=this.topDisplayedRowIndex),this.bottomRowBounds=this.rowModel.getRowBounds(this.bottomDis
1playedRowIndex),this.bottomRowBounds&&(this.bottomRowBounds.rowIndex=this.bottomDisplayedRowIndex),this.setPixelOffset(y(this.topRowBounds)?this.topRowBounds.rowTop:0);}setPixelOffset(e){this.pixelOffset!==e&&(this.pixelOffset=e,this.eventService.dispatchEvent({type:c.EVENT_PAGINATION_PIXEL_OFFSET_CHANGED}));}setZeroRows(){this.masterRowCount=0,this.topDisplayedRowIndex=0,this.bottomDisplayedRowIndex=-1,this.currentPage=0,this.totalPages=0;}adjustCurrentPageIfInvalid(){this.currentPage>=this.totalPages&&(this.currentPage=this.totalPages-1),(!isFinite(this.currentPage)||isNaN(this.currentPage)||this.currentPage<0)&&(this.currentPage=0);}calculatePagesMasterRowsOnly(){if(this.masterRowCount=this.rowModel.getTopLevelRowCount(),this.masterRowCount<=0)return void this.setZeroRows();const e=this.masterRowCount-1;this.totalPages=Math.floor(e/this.pageSize)+1,this.adjustCurrentPageIfInvalid();let i=this.pageSize*(this.currentPage+1)-1;if(i>e&&(i=e),this.topDisplayedRowIndex=this.rowModel.getTopLevelRowDisplayedIndex(this.pageSize*this.currentPage),i===e)this.bottomDisplayedRowIndex=this.rowModel.getRowCount()-1;else{const s=this.rowModel.getTopLevelRowDisplayedIndex(i+1);this.bottomDisplayedRowIndex=s-1;}}getMasterRowCount(){return this.masterRowCount;}calculatePagesAllRows(){if(this.masterRowCount=this.rowModel.getRowCount(),0===this.masterRowCount)return void this.setZeroRows();const e=this.masterRowCount-1;this.totalPages=Math.floor(e/this.pageSize)+1,this.adjustCurrentPageIfInvalid(),this.topDisplayedRowIndex=this.pageSize*this.currentPage,this.bottomDisplayedRowIndex=this.pageSize*(this.currentPage+1)-1,this.bottomDisplayedRowIndex>e&&(this.bottomDisplayedRowIndex=e);}calculatedPagesNotActive(){this.setPageSize(void 0,"autoCalculated"),this.totalPages=1,this.currentPage=0,this.topDisplayedRowIndex=0,this.bottomDisplayedRowIndex=this.rowModel.getRowCount()-1;}};d([g("rowModel")],us.prototype,"rowModel",2),d([T],us.prototype,"postConstruct",1),us=d([L("paginationProxy")],us);var co=class extends R{processAllCellClasses(e,t,i,s){this.processClassRules(void 0,e.cellClassRules,t,i,s),this.processStaticCellClasses(e,t,i);}processClassRules(e,t,i,s,o){if(null==t&&null==e)return;const r={},n={},l=(a,u)=>{a.split(" ").forEach(h=>{""!=h.trim()&&u(h);});};if(t){const a=Object.keys(t);for(let u=0;u<a.length;u++){const h=a[u],p=t[h];let f;"string"==typeof p?f=this.expressionService.evaluate(p,i):"function"==typeof p&&(f=p(i)),l(h,m=>{f?r[m]=!0:n[m]=!0;});}}e&&o&&Object.keys(e).forEach(a=>l(a,u=>{r[u]||(n[u]=!0);})),o&&Object.keys(n).forEach(o),Object.keys(r).forEach(s);}getStaticCellClasses(e,t){const{cellClass:i}=e;if(!i)return[];let s;return s="function"==typeof i?i(t):i,"string"==typeof s&&(s=[s]),s||[];}processStaticCellClasses(e,t,i){this.getStaticCellClasses(e,t).forEach(o=>{i(o);});}};d([g("expressionService")],co.prototype,"expressionService",2),co=d([L("stylingService")],co);var Dl=class extends qs{constructor(e){super(e,"ag-toggle-button");}setValue(e,t){return super.setValue(e,t),this.addOrRemoveCssClass("ag-selected",this.getValue()),this;}},pu=class extends dt{constructor(e){super(e,"ag-text-area",null,"textarea");}setValue(e,t){const i=super.setValue(e,t);return this.eInput.value=e,i;}setCols(e){return this.eInput.cols=e,this;}setRows(e){return this.eInput.rows=e,this;}},gu=class extends zt{constructor(e){super(e,"ag-date-field","date");}postConstruct(){super.postConstruct(),this.addManagedListener(this.eInput,"wheel",this.onWheel.bind(this));const e=gt();this.addManagedListener(this.eInput,"mousedown",()=>{this.isDisabled()||e||this.eInput.focus();}),this.eInput.step="any";}onWheel(e){this.gos.getActiveDomElement()===this.eInput&&e.preventDefault();}setMin(e){var t;const i=e instanceof Date?null!=(t=Je(e??null,!1))?t:void 0:e;return this.min===i||(this.min=i,ft(this.eInput,"min",i)),this;}setMax(e){var t;const i=e instanceof Date?null!=(t=Je(e??null,!1))?t:void 0:e;return this.max===i||(this.max=i,ft(this.eInput,"max",i)),this;}setStep(e){return this.step===e||(this.step=e,ft(this.eInput,"step",e)),this;}getDate(){var e;if(this.eInput.validity.valid)return null!=(e=Ne(this.getValue()))?e:void 0;}setDate(e,t){this.setValue(Je(e??null,!1),t);}},fu=class extends dt{constructor(e){super(e,"ag-range-field","range");}
1postConstruct(){super.postConstruct();const{min:e,max:t,step:i}=this.config;null!=e&&this.setMinValue(e),null!=t&&this.setMaxValue(t),this.setStep(i||1);}addInputListeners(){this.addManagedListener(this.eInput,"input",e=>{this.setValue(e.target.value);});}setMinValue(e){return this.min=e,this.eInput.setAttribute("min",e.toString()),this;}setMaxValue(e){return this.max=e,this.eInput.setAttribute("max",e.toString()),this;}setStep(e){return this.eInput.setAttribute("step",e.toString()),this;}setValue(e,t){null!=this.min&&(e=Math.max(parseFloat(e),this.min).toString()),null!=this.max&&(e=Math.min(parseFloat(e),this.max).toString());const i=super.setValue(e,t);return this.eInput.value=e,i;}},bl=class extends V{constructor(e,t){super('<div class="ag-rich-select-row" role="presentation"></div>'),this.params=e,this.wrapperEl=t;}postConstruct(){this.addManagedListener(this.getGui(),"click",this.onClick.bind(this));}setState(e){let t="";this.params.valueFormatter&&(t=this.params.valueFormatter(e)),this.populateWithRenderer(e,t)||this.populateWithoutRenderer(e,t),this.value=e;}highlightString(e){const{parsedValue:t}=this;if(this.params.cellRenderer||!y(t))return;let i=y(e);if(i){const s=t?.toLocaleLowerCase().indexOf(e.toLocaleLowerCase());if(s>=0){const o=s+e.length,r=he(t.slice(0,s),!0),n=he(t.slice(s,o),!0),l=he(t.slice(o));this.renderValueWithoutRenderer(`${r}<span class="ag-rich-select-row-text-highlight">${n}</span>${l}`);}else i=!1;}i||this.renderValueWithoutRenderer(t);}updateHighlighted(e){var t;const i=this.getGui(),s=`ag-rich-select-row-${this.getCompId()}`;null==(t=i.parentElement)||t.setAttribute("id",s),e&&(mn(this.getParentComponent().getAriaElement(),s),this.wrapperEl.setAttribute("data-active-option",s)),qi(i.parentElement,e),this.addOrRemoveCssClass("ag-rich-select-row-selected",e);}populateWithoutRenderer(e,t){const i=this.gos.getDocument(),s=this.getGui(),o=i.createElement("span");o.style.overflow="hidden",o.style.textOverflow="ellipsis";const r=he(y(t)?t:e,!0);this.parsedValue=y(r)?r:null,s.appendChild(o),this.renderValueWithoutRenderer(r),this.setTooltip({newTooltipText:this.parsedValue,shouldDisplayTooltip:()=>o.scrollWidth>o.clientWidth});}renderValueWithoutRenderer(e){const t=this.getGui().querySelector("span");t&&(t.innerHTML=y(e)?e:" ");}populateWithRenderer(e,t){let i,s;return this.params.cellRenderer&&(s=this.userComponentFactory.getCellRendererDetails(this.params,{value:e,valueFormatted:t,setTooltip:(o,r)=>{this.setTooltip({newTooltipText:o,shouldDisplayTooltip:r});}})),s&&(i=s.newAgStackInstance()),i&&zn(i,this.getGui()),!!i&&(i.then(o=>{this.addDestroyFunc(()=>{this.getContext().destroyBean(o);});}),!0);}onClick(){const e=this.getParentComponent(),t={type:c.EVENT_FIELD_PICKER_VALUE_SELECTED,fromEnterKey:!1,value:this.value};e?.dispatchEvent(t);}};d([g("userComponentFactory")],bl.prototype,"userComponentFactory",2),d([T],bl.prototype,"postConstruct",1);var po=class Sh extends ns{constructor(t){super(Sh.getTemplate(t?.cssIdentifier||"default")),this.renderedRows=new Map(),this.rowHeight=20,this.pageSize=-1,this.isScrolling=!1,this.isHeightFromTheme=!0;const{cssIdentifier:i="default",ariaRole:s="listbox",listName:o}=t||{};this.cssIdentifier=i,this.ariaRole=s,this.listName=o;}postConstruct(){this.addScrollListener(),this.rowHeight=this.getItemHeight(),this.addResizeObserver(),this.initialiseTabGuard({onFocusIn:t=>this.onFocusIn(t),onFocusOut:t=>this.onFocusOut(t),focusInnerElement:t=>this.focusInnerElement(t),onTabKeyDown:t=>this.onTabKeyDown(t),handleKeyDown:t=>this.handleKeyDown(t)}),this.setAriaProperties(),this.addManagedListener(this.eventService,c.EVENT_GRID_STYLES_CHANGED,this.onGridStylesChanged.bind(this));}onGridStylesChanged(){this.rowHeight=this.getItemHeight(),this.refresh();}setAriaProperties(){const i=this.localeService.getLocaleTextFunc()("ariaDefaultListName",this.listName||"List"),s=this.eContainer;le(s,this.ariaRole),Ke(s,i);}addResizeObserver(){const i=this.resizeObserverService.observeResize(this.getGui(),()=>this.animationFrameService.requestAnimationFrame(()=>this.drawVirtualRows()));this.addDestroyFunc(i);}focusInnerElement(t){this.focusRow(t?this.model.getRowCount()-1:0);}onFocusIn(t){const i=t.target;i.classList.contains("ag-virtual-list-item")&&(this.lastFocusedRowIndex=Ea(i)-1);}onFocusOut(t){this.getFocusableElement().contains(t.relatedTarget)||(this.lastFocusedRowIndex=null);}handleKeyDown(t){switch(t.key){case C.UP:case C.DOWN:this.navigate(t.key===C.UP)&&t.preventDefault();break;case C.PAGE_HOME:case C.PAGE_END:case C.PAGE_UP:case C.PAGE_DOWN:null!==this.navigateToPage(t.key)&&t.preventDefault();}}onTabKeyDown(t){this.navigate(t.shiftKey)?t.preventDefault():(nt(t),this.forceFocusOutOfContainer(t.shiftKey));}navigate(t){if(null==this.lastFocusedRowIndex)return!1;const i=this.lastFocusedRowIndex+(t?-1:1);return!(i<0||i>=this.model.getRowCount()||(this.focusRow(i),0));}navigateToPage(t,i="focused"){let s=!1;"focused"===i&&(i=this.getLastFocusedRow(),s=!0);const o=this.model.getRowCount()-1;let r=-1;return t===C.PAGE_HOME?r=0:t===C.PAGE_END?r=o:t===C.PAGE_DOWN?r=Math.min(i+this.pageSize,o):t===C.PAGE_UP&&(r=Math.max(i-this.pageSize,0)),-1===r?null:(s?this.focusRow(r):this.ensureIndexVisible(r),r);}getLastFocusedRow(){return this.lastFocusedRowIndex;}focusRow(t){this.isScrolling||(this.isScrolling=!0,this.ensureIndexVisible(t),this.animationFrameService.requestAnimationFrame(()=>{if(this.isScrolling=!1,!this.isAlive())return;const i=this.renderedRows.get(t);i&&i.eDiv.focus();}));}getComponentAt(t){const i=this.renderedRows.get(t);return i&&i.rowComponent;}forEachRenderedRow(t){this.renderedRows.forEach((i,s)=>t(i.rowComponent,s));}static getTemplate(t){return`<div class="ag-virtual-list-viewport ag-${t}-virtual-list-viewport" role="presentation">\n <div class="ag-virtual-list-container ag-${t}-virtual-list-container" ref="eContainer"></div>\n </div>`;}getItemHeight(){return this.isHeightFromTheme?this.environment.getListItemHeight():this.rowHeight;}ensureIndexVisible(t,i=!0){const s=this.model.getRowCount();if("number"!=typeof t||t<0||t>
1=s)return console.warn("AG Grid: invalid row index for ensureIndexVisible: "+t),!1;const o=t*this.rowHeight,r=o+this.rowHeight,n=this.getGui(),l=n.scrollTop,a=n.offsetHeight,h=i?0:this.rowHeight,f=l+a<r-h;return l>o+h?(n.scrollTop=o,!0):!!f&&(n.scrollTop=r-a,!0);}setComponentCreator(t){this.componentCreator=t;}setComponentUpdater(t){this.componentUpdater=t;}getRowHeight(){return this.rowHeight;}getScrollTop(){return this.getGui().scrollTop;}setRowHeight(t){this.isHeightFromTheme=!1,this.rowHeight=t,this.refresh();}refresh(t){if(null==this.model||!this.isAlive())return;const i=this.model.getRowCount();this.eContainer.style.height=i*this.rowHeight+"px",en(()=>this.eContainer.clientHeight>=i*this.rowHeight,()=>{this.isAlive()&&(this.canSoftRefresh(t)?this.drawVirtualRows(!0):(this.clearVirtualRows(),this.drawVirtualRows()));});}canSoftRefresh(t){return!!(t&&this.renderedRows.size&&"function"==typeof this.model.areRowsEqual&&this.componentUpdater);}clearVirtualRows(){this.renderedRows.forEach((t,i)=>this.removeRow(i));}drawVirtualRows(t){if(!this.isAlive()||!this.model)return;const i=this.getGui(),s=i.scrollTop,o=s+i.offsetHeight,r=Math.floor(s/this.rowHeight),n=Math.floor(o/this.rowHeight);this.pageSize=Math.floor((o-s)/this.rowHeight),this.ensureRowsRendered(r,n,t);}ensureRowsRendered(t,i,s){this.renderedRows.forEach((o,r)=>{(r<t||r>i)&&r!==this.lastFocusedRowIndex&&this.removeRow(r);}),s&&this.refreshRows();for(let o=t;o<=i;o++)this.renderedRows.has(o)||o<this.model.getRowCount()&&this.insertRow(o);}insertRow(t){const i=this.model.getRow(t),s=document.createElement("div");s.classList.add("ag-virtual-list-item",`ag-${this.cssIdentifier}-virtual-list-item`),le(s,"tree"===this.ariaRole?"treeitem":"option"),Zo(s,this.model.getRowCount()),Jo(s,t+1),s.setAttribute("tabindex","-1"),s.style.height=`${this.rowHeight}px`,s.style.top=this.rowHeight*t+"px";const o=this.componentCreator(i,s);o.addGuiEventListener("focusin",()=>this.lastFocusedRowIndex=t),s.appendChild(o.getGui()),this.renderedRows.has(t-1)?this.renderedRows.get(t-1).eDiv.insertAdjacentElement("afterend",s):this.renderedRows.has(t+1)?this.renderedRows.get(t+1).eDiv.insertAdjacentElement("beforebegin",s):this.eContainer.appendChild(s),this.renderedRows.set(t,{rowComponent:o,eDiv:s,value:i});}removeRow(t){const i=this.renderedRows.get(t);this.eContainer.removeChild(i.eDiv),this.destroyBean(i.rowComponent),this.renderedRows.delete(t);}refreshRows(){const t=this.model.getRowCount();this.renderedRows.forEach((i,s)=>{var o,r;if(s>=t)this.removeRow(s);else{const n=this.model.getRow(s);null!=(r=(o=this.model).areRowsEqual)&&r.call(o,i.value,n)?this.componentUpdater(n,i.rowComponent):this.removeRow(s);}});}addScrollListener(){this.addGuiEventListener("scroll",()=>this.drawVirtualRows(),{passive:!0});}setModel(t){this.model=t;}getAriaElement(){return this.eContainer;}destroy(){this.isAlive()&&(this.clearVirtualRows(),super.destroy());}};d([g("resizeObserverService")],po.prototype,"resizeObserverService",2),d([g("animationFrameService")],po.prototype,"animationFrameService",2),d([A("eContainer")],po.prototype,"eContainer",2),d([T],po.prototype,"postConstruct",1);var Tl=po,go=class extends Ut{constructor(e){var t,i;super(x(M({pickerAriaLabelKey:"ariaLabelRichSelectField",pickerAriaLabelValue:"Rich Select Field",pickerType:"ag-list",className:"ag-rich-select",pickerIcon:"smallDown",ariaRole:"combobox",template:null!=(t=e?.template)?t:'\n <div class="ag-picker-field" role="presentation">\n <div ref="eLabel"></div>\n <div ref="eWrapper" class="ag-wrapper ag-picker-field-wrapper ag-rich-select-value ag-picker-collapsed">\n <div ref="eDisplayField" class="ag-picker-field-display"></div>\n <ag-input-text-field ref="eInput" class="ag-rich-select-field-input"></ag-input-text-field>\n <div ref="eIcon" class="ag-picker-field-icon" aria-hidden="true"></div>\n </div>\n </div>',modalPicker:!1},e),{maxPickerHeight:null!=(i=e?.maxPickerHeight)?i:"calc(var(--ag-row-height) * 6.5)"})),this.searchString="",this.highlightedItem=-1,this.lastRowHovered=-1,this.searchStringCreator=null;const{cellRowHeight:s,value:o,valueList:r,searchStringCreator:n}=e||{};null!=s&&(this.cellRowHeight=s),void 0!==o&&(this.value=o),null!=r&&(this.values=r),n&&(this.searchStringCreator=n);}
1postConstruct(){super.postConstruct(),this.createLoadingElement(),this.createListComponent();const{allowTyping:e,placeholder:t}=this.config;e?(this.eInput.setAutoComplete(!1).setInputPlaceholder(t),this.eDisplayField.classList.add("ag-hidden")):this.eInput.setDisplayed(!1),this.eWrapper.tabIndex=this.gos.get("tabIndex");const{searchDebounceDelay:i=300}=this.config;this.clearSearchString=Te(this.clearSearchString,i),this.renderSelectedValue(),e&&(this.eInput.onValueChange(s=>this.searchTextFromString(s)),this.addManagedListener(this.eWrapper,"focus",this.onWrapperFocus.bind(this))),this.addManagedListener(this.eWrapper,"focusout",this.onWrapperFocusOut.bind(this));}createLoadingElement(){const e=this.gos.getDocument(),t=this.localeService.getLocaleTextFunc(),i=e.createElement("div");i.classList.add("ag-loading-text"),i.innerText=t("loadingOoo","Loading..."),this.eLoading=i;}createListComponent(){this.listComponent=this.createBean(new Tl({cssIdentifier:"rich-select"})),this.listComponent.setComponentCreator(this.createRowComponent.bind(this)),this.listComponent.setComponentUpdater((l,a)=>{}),this.listComponent.setParentComponent(this),this.addManagedListener(this.listComponent,c.EVENT_FIELD_PICKER_VALUE_SELECTED,l=>{this.onListValueSelected(l.value,l.fromEnterKey);});const{cellRowHeight:t}=this;t&&this.listComponent.setRowHeight(t);const i=this.listComponent.getGui(),s=this.listComponent.getAriaElement();this.addManagedListener(i,"mousemove",this.onPickerMouseMove.bind(this)),this.addManagedListener(i,"mousedown",l=>l.preventDefault()),i.classList.add("ag-rich-select-list");const o=`ag-rich-select-list-${this.listComponent.getCompId()}`;s.setAttribute("id",o),Ke(s,this.localeService.getLocaleTextFunc()(this.config.pickerAriaLabelKey,this.config.pickerAriaLabelValue)),wn(this.eWrapper,s);}renderSelectedValue(){const{value:e,eDisplayField:t,config:i}=this,{allowTyping:s,initialInputValue:o}=this.config,r=this.config.valueFormatter?this.config.valueFormatter(e):e;if(s)return void this.eInput.setValue(o??r);let n,l;if(i.cellRenderer&&(n=this.userComponentFactory.getCellRendererDetails(this.config,{value:e,valueFormatted:r})),n&&(l=n.newAgStackInstance()),l)de(t),zn(l,t),l.then(a=>{this.addDestroyFunc(()=>this.getContext().destroyBean(a));});else{if(y(this.value))t.innerText=r,t.classList.remove("ag-display-as-placeholder");else{const{placeholder:a}=i;y(a)?(t.innerHTML=`${he(a)}`,t.classList.add("ag-display-as-placeholder")):de(t);}this.setTooltip({newTooltipText:r??null,shouldDisplayTooltip:()=>this.eDisplayField.scrollWidth>this.eDisplayField.clientWidth});}}getCurrentValueIndex(){const{currentList:e,value:t}=this;if(null==t||!e)return-1;for(let i=0;i<e.length;i++)if(e[i]===t)return i;return-1;}highlightFilterMatch(){var e;null==(e=this.listComponent)||e.forEachRenderedRow((t,i)=>{t.highlightString(this.searchString);});}highlightSelectedValue(e){var t;null==e&&(e=this.getCurrentValueIndex()),this.highlightedItem=e,null==(t=this.listComponent)||t.forEachRenderedRow((i,s)=>{i.updateHighlighted(-1!==e&&this.highlightedItem===s);});}setRowHeight(e){e!==this.cellRowHeight&&(this.cellRowHeight=e),this.listComponent&&this.listComponent.setRowHeight(e);}createPickerComponent(){const{values:e}=this;return e&&this.setValueList({valueList:e}),this.listComponent;}setSearchStringCreator(e){this.searchStringCreator=e;}setValueList(e){const{valueList:t,refresh:i}=e;this.listComponent&&this.currentList!==t&&(this.currentList=t,this.listComponent.setModel({getRowCount:()=>t.length,getRow:s=>t[s],areRowsEqual:(s,o)=>s===o}),i&&(this.values?this.listComponent.refresh(!0):(this.values=t,this.isPickerDisplayed&&this.showCurrentValueInPicker())));}showPicker(){super.showPicker(),this.showCurrentValueInPicker(),this.displayOrHidePicker();}showCurrentValueInPicker(){var e,t;if(!this.listComponent)return;if(!this.currentList)return void(this.isPickerDisplayed&&this.eLoading&&this.listComponent.appendChild(this.eLoading));null!=(e=this.eLoading)&&e.offsetParent&&(null==(t=this.eLoading.parentElement)||t.removeChild(this.eLoading));const i=this.getCurrentValueIndex();-1!==i?(this.listComponent.refresh(),this.listComponent.ensureIndexVisible(i),this.listComponent.refresh(!0),this.highlightSelectedValue(i)):this.listComponent.refresh();}beforeHidePicker(){this.highlightedItem=-1,super.beforeHidePicker();}onWrapperFocus(){if(!this.eInput)return;const e=this.eInput.getFocusableElement();e.focus(),e.select();}onWrapperFocusOut(e){this.eWrapper.contains(e.relatedTarget)||this.hidePicker();}buildSearchStringFromKeyboardEvent(e){let{key:t}=e;if(t===C.BACKSPACE)this.searchString=this.searchString.slice(0,-1),t="";else if(!nr(e))return;e.preventDefault(),this.searchTextFromCharacter(t);}searchTextFromCharacter(e){this.searchString+=e,this.runSearch(),this.clearSearchString();}searchTextFromString(e){null==e&&(e=""),this.searchString=e,this.runSearch();}buildSearchStrings(e){const{valueFormatter:t=s=>s}=this.config;let i;return"number"==typeof e[0]||"string"==typeof e[0]?i=e.map(s=>t(s)):"object"==typeof e[0]&&this.searchStringCreator&&(i=this.searchStringCreator(e)),i;}getSuggestionsAndFilteredValues(e,t){let i=[],s=[];if(!e.length)return{suggestions:i,filteredValues:s};const{searchType:o="fuzzy",filterList:r}=this.config;if("fuzzy"===o){const n=zs(this.searchString,t,!0);i=n.values;const l=n.indices;if(r&&l.length)for(let a=0;a<l.length;a++)s.push(this.values[l[a]]);}else i=t.filter((n,l)=>{const a=n.toLocaleLowerCase(),u=this.searchString.toLocaleLowerCase(),h="match"===o?a.startsWith(u):-1!==a.indexOf(u);return r&&h&&s.push(this.values[l]),h;});return{suggestions:i,filteredValues:s};}filterListModel(e){const{filterList:t}=this.config;t&&(this.setValueList({valueList:e,refresh:!0}),this.alignPickerToComponent());}runSearch(){var e,t;const{values:i}=this,s=this.buildSearchStrings(i);if(!s)return void this.highlightSelectedValue(-1);const{suggestions:o,filteredValues:r}=this.getSuggestionsAndFilteredValues(this.searchString,s),{filterList:n,highlightMatch:l,searchType:a="fuzzy"}=this.config,u=r.length,h=!(!n||""===this.searchString);if(this.filterListModel(h?r:i),o.length){const p=h?0:s.indexOf(o[0]);this.selectListItem(p);}else if(this.highlightSelectedValue(-1),!h||u)null==(e=this.listComponent)||e.ensureIndexVisible(0);else if(h){this.getAriaElement().removeAttribute("data-active-option");const p=null==(t=this.listComponent)?void 0:t.getAriaElement();p&&mn(p,null);}l&&"fuzzy"!==a&&this.highlightFilterMatch(),this.displayOrHidePicker();}displayOrHidePicker(){var e;const t=null==(e=this.listComponent)?void 0:e.getGui(),i=!!this.currentList&&0===this.currentList.length;t?.classList.toggle("ag-hidden",i);}clearSearchString(){this.searchString="";}selectListItem(e,t){!this.isPickerDisplayed||!this.currentList||!this.listComponent||e<0||e>=this.currentList.length||(this.listComponent.ensureIndexVisible(e,!t)&&!t&&this.listComponent.refresh(!0),this.highlightSelectedValue(e));}setValue(e,t,i){const s=this.currentList?this.currentList.indexOf(e):-1;return-1===s?this:(this.value=e,i||this.selectListItem(s),this.renderSelectedValue(),super.setValue(e,t));}createRowComponent(e){const t=new bl(this.config,this.eWrapper);t.setParentComponent(this.listComponent),this.getContext().createBean(t),t.setState(e);const{highlightMatch:i,searchType:s="fuzzy"}=this.config;return i&&"fuzzy"!==s&&t.highlightString(this.searchString),t;}getRowForMouseEvent(e){const{listComponent:t}=this;if(!t)return-1;const s=(t?.getGui()).getBoundingClientRect(),o=t.getScrollTop();return Math.floor((e.clientY-s.top+o)/t.getRowHeight());}onPickerMouseMove(e){if(!this.listComponent)return;const t=this.getRowForMouseEvent(e);-1!==t&&t!=this.lastRowHovered&&(this.lastRowHovered=t,this.selectListItem(t,!0));}onNavigationKeyDown(e,t){e.preventDefault();const i=t===C.DOWN;if(!this.isPickerDisplayed&&i)return void this.showPicker();const s=this.highlightedItem;this.selectListItem(-1===s?0:s+(i?1:-1));}onPageNavigation(e){var t;if(!this.isPickerDisplayed)return;const i=null==(t=this.listComponent)?void 0:t.navigateToPage(e,this.highlightedItem);null!=i&&this.animationFrameService.requestAnimationFrame(()=>{if(!this.isAlive())return null;this.highlightSelectedValue(i);});}
1onEnterKeyDown(e){this.isPickerDisplayed&&(e.preventDefault(),this.currentList&&this.onListValueSelected(this.currentList[this.highlightedItem],!0));}onTabKeyDown(){!this.isPickerDisplayed||!this.currentList||this.setValue(this.currentList[this.highlightedItem],!1,!0);}onListValueSelected(e,t){this.setValue(e,!1,!0),this.dispatchPickerEvent(e,t),this.hidePicker();}dispatchPickerEvent(e,t){this.dispatchEvent({type:c.EVENT_FIELD_PICKER_VALUE_SELECTED,fromEnterKey:t,value:e});}getFocusableElement(){const{allowTyping:e}=this.config;return e?this.eInput.getFocusableElement():super.getFocusableElement();}onKeyDown(e){const t=e.key,{allowTyping:i}=this.config;switch(t){case C.LEFT:case C.RIGHT:i||e.preventDefault();break;case C.PAGE_HOME:case C.PAGE_END:if(i){e.preventDefault();const s=this.eInput.getInputElement(),o=t===C.PAGE_HOME?0:s.value.length;s.setSelectionRange(o,o);break;}case C.PAGE_UP:case C.PAGE_DOWN:e.preventDefault(),this.onPageNavigation(t);break;case C.DOWN:case C.UP:this.onNavigationKeyDown(e,t);break;case C.ESCAPE:this.isPickerDisplayed&&(xe(this.listComponent.getGui())&&(e.preventDefault(),nt(e)),this.hidePicker());break;case C.ENTER:this.onEnterKeyDown(e);break;case C.TAB:this.onTabKeyDown();break;default:i||this.buildSearchStringFromKeyboardEvent(e);}}destroy(){this.listComponent&&(this.destroyBean(this.listComponent),this.listComponent=void 0),this.eLoading=void 0,super.destroy();}};d([g("userComponentFactory")],go.prototype,"userComponentFactory",2),d([g("animationFrameService")],go.prototype,"animationFrameService",2),d([A("eInput")],go.prototype,"eInput",2);var hs=class Eh extends ur{constructor(t){super(t,Eh.TEMPLATE),this.labelAlignment="top";}init(){this.eSlider.addCssClass("ag-slider-field");const{minValue:t,maxValue:i,textFieldWidth:s,step:o,value:r,onValueChange:n}=this.config;null!=t&&this.setMinValue(t),null!=i&&this.setMaxValue(i),null!=s&&this.setTextFieldWidth(s),null!=o&&this.setStep(o),null!=r&&this.setValue(r),null!=n&&this.onValueChange(n);}onValueChange(t){const i=c.EVENT_FIELD_VALUE_CHANGED;return this.addManagedListener(this.eText,i,()=>{const s=parseFloat(this.eText.getValue());this.eSlider.setValue(s.toString(),!0),t(s||0);}),this.addManagedListener(this.eSlider,i,()=>{const s=this.eSlider.getValue();this.eText.setValue(s,!0),t(parseFloat(s));}),this;}setSliderWidth(t){return this.eSlider.setWidth(t),this;}setTextFieldWidth(t){return this.eText.setWidth(t),this;}setMinValue(t){return this.eSlider.setMinValue(t),this.eText.setMin(t),this;}setMaxValue(t){return this.eSlider.setMaxValue(t),this.eText.setMax(t),this;}getValue(){return this.eText.getValue();}setValue(t,i){return this.getValue()===t||(this.eText.setValue(t,!0),this.eSlider.setValue(t,!0),i||this.dispatchEvent({type:c.EVENT_FIELD_VALUE_CHANGED})),this;}setStep(t){return this.eSlider.setStep(t),this.eText.setStep(t),this;}};hs.TEMPLATE='<div class="ag-slider">\n <label ref="eLabel"></label>\n <div class="ag-wrapper ag-slider-wrapper">\n <ag-input-range ref="eSlider"></ag-input-range>\n <ag-input-number-field ref="eText"></ag-input-number-field>\n </div>\n </div>',d([A("eLabel")],hs.prototype,"eLabel",2),d([A("eSlider")],hs.prototype,"eSlider",2),d([A("eText")],hs.prototype,"eText",2),d([T],hs.prototype,"init",1);var mu=hs,Zt=class Fs extends V{constructor(t={}){super(Fs.getTemplate(t)),this.params=t,this.suppressEnabledCheckbox=!0,this.suppressToggleExpandOnEnableChange=!1;const{enabled:i,items:s,suppressEnabledCheckbox:o,expanded:r,suppressToggleExpandOnEnableChange:n,useToggle:l}=t;this.cssIdentifier=t.cssIdentifier||"default",this.enabled=i??!0,this.items=s||[],this.useToggle=l??!1,this.alignItems=t.alignItems||"center",this.expanded=r??!0,null!=o&&(this.suppressEnabledCheckbox=o),null!=n&&(this.suppressToggleExpandOnEnableChange=n);}static getTemplate(t){const i=t.cssIdentifier||"default";return`\n <div class="ag-group ag-${i}-group" role="presentation">\n <div ref="eToolbar" class="ag-group-toolbar ag-${i}-group-toolbar">\n <ag-checkbox ref="cbGroupEnabled"></ag-checkbox>\n </div>\n <div ref="eContainer" class="ag-group-container ag-group-container-${t.direction||"vertical"} ag-${i}-group-container"></div>\n </div>\n `;}postConstruct(){if(this.setupTitleBar(),this.items.length){const o=this.items;this.items=[],this.addItems(o);}const t=this.localeService.getLocaleTextFunc();this.cbGroupEnabled.setLabel(t("enabled","Enabled")),this.enabled&&this.setEnabled(this.enabled,void 0,!0),this.setAlignItems(this.alignItems);const{onEnableChange:i,suppressOpenCloseIcons:s}=this.params;this.hideEnabledCheckbox(this.suppressEnabledCheckbox),this.hideOpenCloseIcons(s??!1),this.refreshChildDisplay(),K(this.eContainer,this.expanded),this.cbGroupEnabled.onValueChange(o=>{this.setEnabled(o,!0,this.suppressToggleExpandOnEnableChange),this.dispatchEnableChangeEvent(o);}),null!=i&&this.onEnableChange(i);}refreshChildDisplay(){var t;K(this.eToolbar,this.expanded&&!this.suppressEnabledCheckbox),null==(t=this.eTitleBar)||t.refreshOnExpand(this.expanded);}isExpanded(){return this.expanded;}setAlignItems(t){return this.alignItems!==t&&this.removeCssClass(`ag-group-item-alignment-${this.alignItems}`),this.alignItems=t,this.addCssClass(`ag-group-item-alignment-${this.alignItems}`),this;}toggleGroupExpand(t){var i;let s=!1;if(null!=(i=this.eTitleBar)&&i.isSuppressCollapse()&&!this.useToggle)t=!0,s=!0;else if(this.expanded===(t=t??!this.expanded))return this;return this.expanded=t,this.refreshChildDisplay(),K(this.eContainer,t),s||this.dispatchEvent({type:t?Fs.EVENT_EXPANDED:Fs.EVENT_COLLAPSED}),this;}addItems(t){t.forEach(i=>
1this.addItem(i));}prependItem(t){this.insertItem(t,!0);}addItem(t){this.insertItem(t,!1);}insertItem(t,i){const s=this.eContainer,o=t instanceof V?t.getGui():t;o.classList.add("ag-group-item",`ag-${this.cssIdentifier}-group-item`),i?(s.insertAdjacentElement("afterbegin",o),this.items.unshift(o)):(s.appendChild(o),this.items.push(o));}hideItem(t,i){K(this.items[i],!t);}getItemIndex(t){const i=t instanceof V?t.getGui():t;return this.items.indexOf(i);}setTitle(t){var i;return null==(i=this.eTitleBar)||i.setTitle(t),this;}addTitleBarWidget(t){var i;return null==(i=this.eTitleBar)||i.addWidget(t),this;}addCssClassToTitleBar(t){var i;null==(i=this.eTitleBar)||i.addCssClass(t);}dispatchEnableChangeEvent(t){this.dispatchEvent({type:Fs.EVENT_ENABLE_CHANGE,enabled:t});}setEnabled(t,i,s){var o;return this.enabled=t,this.refreshDisabledStyles(),s||this.toggleGroupExpand(t),i||(this.cbGroupEnabled.setValue(t),null==(o=this.eToggle)||o.setValue(t)),this;}isEnabled(){return this.enabled;}onEnableChange(t){return this.addManagedListener(this,Fs.EVENT_ENABLE_CHANGE,i=>t(i.enabled)),this;}hideEnabledCheckbox(t){return this.suppressEnabledCheckbox=t,this.refreshChildDisplay(),this.refreshDisabledStyles(),this;}hideOpenCloseIcons(t){var i;return null==(i=this.eTitleBar)||i.hideOpenCloseIcons(t),this;}refreshDisabledStyles(){var t;const i=!this.enabled;this.eContainer.classList.toggle("ag-disabled",i),null==(t=this.eTitleBar)||t.refreshDisabledStyles(this.suppressEnabledCheckbox&&i),this.eContainer.classList.toggle("ag-disabled-group-container",i);}setupTitleBar(){const t=this.useToggle?this.createToggleTitleBar():this.createDefaultTitleBar();this.eToolbar.insertAdjacentElement("beforebegin",t.getGui());}createDefaultTitleBar(){const t=this.createManagedBean(new vu(this.params));return this.eTitleBar=t,t.refreshOnExpand(this.expanded),this.addManagedListener(t,vu.EVENT_EXPAND_CHANGED,i=>this.toggleGroupExpand(i.expanded)),t;}createToggleTitleBar(){var t;const i=this.createManagedBean(new Dl({value:this.enabled,label:this.params.title,labelAlignment:"left",labelWidth:"flex",onValueChange:s=>{this.setEnabled(s,!0),this.dispatchEnableChangeEvent(s);}}));return i.addCssClass("ag-group-title-bar"),i.addCssClass(`ag-${null!=(t=this.params.cssIdentifier)?t:"default"}-group-title-bar ag-unselectable`),this.eToggle=i,this.toggleGroupExpand(this.enabled),i;}};Zt.EVENT_EXPANDED="expanded",Zt.EVENT_COLLAPSED="collapsed",Zt.EVENT_ENABLE_CHANGE="enableChange",d([A("eToolbar")],Zt.prototype,"eToolbar",2),d([A("cbGroupEnabled")],Zt.prototype,"cbGroupEnabled",2),d([A("eContainer")],Zt.prototype,"eContainer",2),d([T],Zt.prototype,"postConstruct",1);var Cu=Zt,Al="ag-disabled-group-title-bar",cs=class Kl extends V{constructor(t={}){super(Kl.getTemplate(t)),this.suppressOpenCloseIcons=!1;const{title:i,suppressOpenCloseIcons:s}=t;i&&i.length>0&&(this.title=i),null!=s&&(this.suppressOpenCloseIcons=s);}static getTemplate(t){var i;const s=null!=(i=t.cssIdentifier)?i:"default";return`\n <div class="ag-group-title-bar ag-${s}-group-title-bar ag-unselectable" role="button">\n <span class="ag-group-title-bar-icon ag-${s}-group-title-bar-icon" ref="eGroupOpenedIcon" role="presentation"></span>\n <span class="ag-group-title-bar-icon ag-${s}-group-title-bar-icon" ref="eGroupClosedIcon" role="presentation"></span>\n <span ref="eTitle" class="ag-group-title ag-${s}-group-title"></span>\n </div>\n `;}postConstruct(){this.setTitle(this.title),this.hideOpenCloseIcons(this.suppressOpenCloseIcons),this.setupExpandContract();}setupExpandContract(){this.eGroupClosedIcon.appendChild(tt("columnSelectClosed",this.gos,null)),this.eGroupOpenedIcon.appendChild(tt("columnSelectOpen",this.gos,null)),this.addManagedListener(this.getGui(),"click",()=>this.dispatchExpandChanged()),this.addManagedListener(this.getGui(),"keydown",t=>{switch(t.key){case C.ENTER:case C.SPACE:t.preventDefault(),this.dispatchExpandChanged();break;case C.RIGHT:case C.LEFT:t.preventDefault(),this.dispatchExpandChanged(t.key===C.RIGHT);}});}refreshOnExpand(t){this.refreshAriaStatus(t),this.refreshOpenCloseIcons(t);}refreshAriaStatus(t){this.suppressOpenCloseIcons||Ft(this.getGui(),t);}refreshOpenCloseIcons(t){const i=!this.suppressOpenCloseIcons;K(this.eGroupOpenedIcon,i&&t),K(this.eGroupClosedIcon,i&&!t);}isSuppressCollapse(){return this.suppressOpenCloseIcons;}
1dispatchExpandChanged(t){this.dispatchEvent({type:Kl.EVENT_EXPAND_CHANGED,expanded:t});}setTitle(t){const i=this.getGui(),s=!!t&&t.length>0;this.eTitle.textContent=(t=s?t:void 0)??"",K(i,s),t!==this.title&&(this.title=t);const o=i.classList.contains(Al);return this.refreshDisabledStyles(o),this;}addWidget(t){return this.getGui().appendChild(t),this;}hideOpenCloseIcons(t){return this.suppressOpenCloseIcons=t,t&&this.dispatchExpandChanged(!0),this;}refreshDisabledStyles(t){const i=this.getGui();t?(i.classList.add(Al),i.removeAttribute("tabindex")):(i.classList.remove(Al),"string"==typeof this.title?i.setAttribute("tabindex","0"):i.removeAttribute("tabindex"));}};cs.EVENT_EXPAND_CHANGED="expandedChanged",d([A("eGroupOpenedIcon")],cs.prototype,"eGroupOpenedIcon",2),d([A("eGroupClosedIcon")],cs.prototype,"eGroupClosedIcon",2),d([A("eTitle")],cs.prototype,"eTitle",2),d([T],cs.prototype,"postConstruct",1);var vu=cs,Pr=class extends ns{constructor(e=0,t){super('<div class="ag-menu-list" role="tree"></div>'),this.level=e,this.menuItems=[],this.params=t??{column:null,node:null,value:null};}postConstruct(){this.initialiseTabGuard({onTabKeyDown:e=>this.onTabKeyDown(e),handleKeyDown:e=>this.handleKeyDown(e),onFocusIn:e=>this.handleFocusIn(e),onFocusOut:e=>this.handleFocusOut(e)});}onTabKeyDown(e){const t=this.getParentComponent(),i=t&&t.getGui();i&&i.classList.contains("ag-focus-managed")||e.preventDefault(),e.shiftKey&&this.closeIfIsChild(e);}handleKeyDown(e){switch(e.key){case C.UP:case C.RIGHT:case C.DOWN:case C.LEFT:e.preventDefault(),this.handleNavKey(e.key);break;case C.ESCAPE:this.closeIfIsChild()&&nt(e);}}handleFocusIn(e){var t,i;const s=e.relatedTarget;!this.tabGuardCtrl.isTabGuard(s)&&(this.getGui().contains(s)||null!=(i=null==(t=this.activeMenuItem)?void 0:t.getSubMenuGui())&&i.contains(s))||(this.activeMenuItem?this.activeMenuItem.activate():this.activateFirstItem());}handleFocusOut(e){var t;const i=e.relatedTarget;!this.activeMenuItem||this.getGui().contains(i)||null!=(t=this.activeMenuItem.getSubMenuGui())&&t.contains(i)||this.activeMenuItem.isSubMenuOpening()||this.activeMenuItem.deactivate();}clearActiveItem(){this.activeMenuItem&&(this.activeMenuItem.deactivate(),this.activeMenuItem=null);}addMenuItems(e){null!=e&&$e.all(e.map(t=>"separator"===t?$e.resolve({eGui:this.createSeparator()}):"string"==typeof t?(console.warn(`AG Grid: unrecognised menu item ${t}`),$e.resolve({eGui:null})):this.addItem(t))).then(t=>{t.forEach(i=>{i?.eGui&&(this.appendChild(i.eGui),i.comp&&this.menuItems.push(i.comp));});});}addItem(e){const t=this.createManagedBean(new fo());return t.init({menuItemDef:e,isAnotherSubMenuOpen:()=>this.menuItems.some(i=>i.isSubMenuOpen()),level:this.level,contextParams:this.params}).then(()=>(t.setParentComponent(this),this.addManagedListener(t,fo.EVENT_CLOSE_MENU,i=>{this.dispatchEvent(i);}),this.addManagedListener(t,fo.EVENT_MENU_ITEM_ACTIVATED,i=>{this.activeMenuItem&&this.activeMenuItem!==i.menuItem&&this.activeMenuItem.deactivate(),this.activeMenuItem=i.menuItem;}),{comp:t,eGui:t.getGui()}));}activateFirstItem(){const e=this.menuItems.filter(t=>!t.isDisabled())[0];e&&e.activate();}createSeparator(){return Oe('\n <div class="ag-menu-separator" aria-hidden="true">\n <div class="ag-menu-separator-part"></div>\n <div class="ag-menu-separator-part"></div>\n <div class="ag-menu-separator-part"></div>\n <div class="ag-menu-separator-part"></div>\n </div>');}handleNavKey(e){switch(e){case C.UP:case C.DOWN:const i=this.findNextItem(e===C.UP);return void(i&&i!==this.activeMenuItem&&i.activate());}e===(this.gos.get("enableRtl")?C.RIGHT:C.LEFT)?this.closeIfIsChild():this.openChild();}closeIfIsChild(e){const t=this.getParentComponent();return!!(t&&t instanceof fo)&&(e&&e.preventDefault(),t.closeSubMenu(),t.getGui().focus(),!0);}openChild(){this.activeMenuItem&&this.activeMenuItem.openSubMenu(!0);}findNextItem(e){const t=this.menuItems.filter(o=>!o.isDisabled());if(!t.length)return;if(!this.activeMenuItem)return e?Y(t):t[0];e&&t.reverse();let i,s=!1;for(let o=0;o<t.length;o++){const r=t[o];if(s){i=r;break;}r===this.activeMenuItem&&(s=!0);}return s&&!i?t[0]:i||this.activeMenuItem;}destroy(){this.clearActiveItem(),super.destroy();}};d([g("focusService")],Pr.prototype,"focusService",2),d([T],Pr.prototype,"postConstruct",1);var Fl=class extends ns{constructor(e){super(),this.wrappedComponent=e,this.setTemplateFromElement(e.getGui());}postConstruct(){this.initialiseTabGuard({onTabKeyDown:e=>this.onTabKeyDown(e),handleKeyDown:e=>this.handleKeyDown(e)});}handleKeyDown(e){e.key===C.ESCAPE&&this.closePanel();}onTabKeyDown(e){e.defaultPrevented||(this.closePanel(),e.preventDefault());}closePanel(){const e=this.parentComponent;e.closeSubMenu(),setTimeout(()=>
1e.getGui().focus(),0);}};d([T],Fl.prototype,"postConstruct",1);var ps=class Ps extends R{constructor(){super(...arguments),this.isActive=!1,this.subMenuIsOpen=!1,this.subMenuIsOpening=!1,this.suppressRootStyles=!0,this.suppressAria=!0,this.suppressFocus=!0;}init(t){var i,s;const{menuItemDef:o,isAnotherSubMenuOpen:r,level:n,childComponent:l,contextParams:a}=t;return this.params=t.menuItemDef,this.level=n,this.isAnotherSubMenuOpen=r,this.childComponent=l,this.contextParams=a,this.cssClassPrefix=null!=(s=null==(i=this.params.menuItemParams)?void 0:i.cssClassPrefix)?s:"ag-menu-option",this.userComponentFactory.getMenuItemCompDetails(this.params,x(M({},o),{level:n,isAnotherSubMenuOpen:r,openSubMenu:h=>this.openSubMenu(h),closeSubMenu:()=>this.closeSubMenu(),closeMenu:h=>this.closeMenu(h),updateTooltip:(h,p)=>this.refreshTooltip(h,p),onItemActivated:()=>this.onItemActivated()})).newAgStackInstance().then(h=>{var p;this.menuItemComp=h;const f=null==(p=h.configureDefaults)?void 0:p.call(h);f&&this.configureDefaults(!0===f?void 0:f);});}addListeners(t,i){i?.suppressClick||this.addManagedListener(t,"click",s=>this.onItemSelected(s)),i?.suppressKeyboardSelect||this.addManagedListener(t,"keydown",s=>{(s.key===C.ENTER||s.key===C.SPACE)&&(s.preventDefault(),this.onItemSelected(s));}),i?.suppressMouseDown||this.addManagedListener(t,"mousedown",s=>{s.stopPropagation(),s.preventDefault();}),i?.suppressMouseOver||(this.addManagedListener(t,"mouseenter",()=>this.onMouseEnter()),this.addManagedListener(t,"mouseleave",()=>this.onMouseLeave()));}isDisabled(){return!!this.params.disabled;}openSubMenu(t=!1){var i,s;if(this.closeSubMenu(),!this.params.subMenu)return;this.subMenuIsOpening=!0;const o=Oe('<div class="ag-menu" role="presentation"></div>');this.eSubMenuGui=o;let r,n=()=>{this.subMenuIsOpening=!1;};if(this.childComponent){const h=this.createBean(new Fl(this.childComponent));h.setParentComponent(this);const p=h.getGui(),f="mouseenter",m=()=>this.cancelDeactivate();p.addEventListener(f,m),r=()=>p.removeEventListener(f,m),o.appendChild(p),this.childComponent.afterGuiAttached&&(n=()=>{this.childComponent.afterGuiAttached(),this.subMenuIsOpening=!1;});}else if(this.params.subMenu){const h=this.createBean(new Pr(this.level+1,this.contextParams));h.setParentComponent(this),h.addMenuItems(this.params.subMenu),o.appendChild(h.getGui()),this.addManagedListener(h,Ps.EVENT_CLOSE_MENU,p=>this.dispatchEvent(p)),h.addGuiEventListener("mouseenter",()=>this.cancelDeactivate()),r=()=>this.destroyBean(h),t&&(n=()=>{h.activateFirstItem(),this.subMenuIsOpening=!1;});}const l=this.popupService.positionPopupForMenu.bind(this.popupService,{eventSource:this.eGui,ePopup:o}),a=this.localeService.getLocaleTextFunc(),u=this.popupService.addPopup({modal:!0,eChild:o,positionCallback:l,anchorToElement:this.eGui,ariaLabel:a("ariaLabelSubMenu","SubMenu"),afterGuiAttached:n});this.subMenuIsOpen=!0,this.setAriaExpanded(!0),this.hideSubMenu=()=>{var h,p;u&&u.hideFunc(),this.subMenuIsOpen=!1,this.setAriaExpanded(!1),r(),null==(p=(h=this.menuItemComp).setExpanded)||p.call(h,!1),this.eSubMenuGui=void 0;},null==(s=(i=this.menuItemComp).setExpanded)||s.call(i,!0);}setAriaExpanded(t){this.suppressAria||Ft(this.eGui,t);}closeSubMenu(){this.hideSubMenu&&(this.hideSubMenu(),this.hideSubMenu=null,this.setAriaExpanded(!1));}isSubMenuOpen(){return this.subMenuIsOpen;}isSubMenuOpening(){return this.subMenuIsOpening;}activate(t){var i,s;this.cancelActivate(),!this.params.disabled&&(this.isActive=!0,this.suppressRootStyles||this.eGui.classList.add(`${this.cssClassPrefix}-active`),null==(s=(i=this.menuItemComp).setActive)||s.call(i,!0),this.suppressFocus||this.eGui.focus({preventScroll:!0}),t&&this.params.subMenu&&window.setTimeout(()=>{this.isAlive()&&this.isActive&&this.openSubMenu();},300),this.onItemActivated());}deactivate(){var t,i;this.cancelDeactivate(),this.suppressRootStyles||this.eGui.classList.remove(`${this.cssClassPrefix}-active`),null==(i=(t=this.menuItemComp).setActive)||i.call(t,!1),this.isActive=!1,this.subMenuIsOpen&&this.hideSubMenu();}getGui(){return this.menuItemComp.getGui();}getParentComponent(){return this.parentComponent;}setParentComponent(t){this.parentComponent=t;}getSubMenuGui(){return this.eSubMenuGui;}onItemSelected(t){var i,s;null==(s=(i=this.menuItemComp).select)||s.call(i),this.params.action?this.getFrameworkOverrides().wrapOutgoing(()=>this.params.action(this.gos.addGridCommonParams(M({},this.contextParams)))):this.openSubMenu(t&&"keydown"===t.type),!(this.params.subMenu&&!this.params.action||this.params.suppressCloseOnSelect)&&this.closeMenu(t);}closeMenu(t){const i={type:Ps.EVENT_CLOSE_MENU};t&&(t instanceof MouseEvent?i.mouseEvent=t:i.keyboardEvent=t),this.dispatchEvent(i);}onItemActivated(){this.dispatchEvent({type:Ps.EVENT_MENU_ITEM_ACTIVATED,menuItem:this});}cancelActivate(){this.activateTimeoutId&&(window.clearTimeout(this.activateTimeoutId),this.activateTimeoutId=0);}cancelDeactivate(){this.deactivateTimeoutId&&(window.clearTimeout(this.deactivateTimeoutId),this.deactivateTimeoutId=0);}onMouseEnter(){this.cancelDeactivate(),this.isAnotherSubMenuOpen()?this.activateTimeoutId=window.setTimeout(()=>this.activate(!0),Ps.ACTIVATION_DELAY):this.activate(!0);}onMouseLeave(){this.cancelActivate(),this.isSubMenuOpen()?this.deactivateTimeoutId=window.setTimeout(()=>this.deactivate(),Ps.ACTIVATION_DELAY):this.deactivate();}configureDefaults(t){var i,s,o;if(!this.menuItemComp)return void setTimeout(()=>this.configureDefaults(t));let r=this.menuItemComp.getGui();const n=null==(s=(i=this.menuItemComp).getRootElement)?void 0:s.call(i);n&&(t?.suppressRootStyles||r.classList.add("ag-menu-option-custom"),r=n),this.eGui=r,this.suppressRootStyles=!!t?.suppressRootStyles,this.suppressRootStyles||(r.classList.add(this.cssClassPrefix),null==(o=this.params.cssClasse
1s)||o.forEach(l=>r.classList.add(l)),this.params.disabled&&r.classList.add(`${this.cssClassPrefix}-disabled`)),t?.suppressTooltip||this.refreshTooltip(this.params.tooltip),this.suppressAria=!!t?.suppressAria,this.suppressAria||(le(r,"treeitem"),ba(r,this.level+1),this.params.disabled&&fn(r,!0)),t?.suppressTabIndex||r.setAttribute("tabindex","-1"),this.params.disabled||this.addListeners(r,t),this.suppressFocus=!!t?.suppressFocus;}refreshTooltip(t,i){this.tooltip=t,this.tooltipFeature&&(this.tooltipFeature=this.destroyBean(this.tooltipFeature)),t&&this.menuItemComp&&(this.tooltipFeature=this.createBean(new mt({getGui:()=>this.getGui(),getTooltipValue:()=>this.tooltip,getLocation:()=>"menu",shouldDisplayTooltip:i})));}destroy(){this.tooltipFeature&&(this.tooltipFeature=this.destroyBean(this.tooltipFeature)),super.destroy();}};ps.EVENT_CLOSE_MENU="closeMenu",ps.EVENT_MENU_ITEM_ACTIVATED="menuItemActivated",ps.ACTIVATION_DELAY=80,d([g("popupService")],ps.prototype,"popupService",2),d([g("userComponentFactory")],ps.prototype,"userComponentFactory",2);var fo=ps,Pi=class $l extends V{constructor(t){super($l.getTemplate(t)),this.config=t,this.closable=!0;}static getTemplate(t){const i=t.cssIdentifier||"default";return`<div class="ag-panel ag-${i}-panel" tabindex="-1">\n <div ref="eTitleBar" class="ag-panel-title-bar ag-${i}-panel-title-bar ag-unselectable">\n <span ref="eTitle" class="ag-panel-title-bar-title ag-${i}-panel-title-bar-title"></span>\n <div ref="eTitleBarButtons" class="ag-panel-title-bar-buttons ag-${i}-panel-title-bar-buttons"></div>\n </div>\n <div ref="eContentWrapper" class="ag-panel-content-wrapper ag-${i}-panel-content-wrapper"></div>\n </div>`;}postConstruct(){const{component:t,closable:i,hideTitleBar:s,title:o,minWidth:r=250,width:n,minHeight:l=250,height:a,centered:u,popup:h,x:p,y:f}=this.config;this.positionableFeature=new fi(this.getGui(),{minWidth:r,width:n,minHeight:l,height:a,centered:u,x:p,y:f,popup:h,calculateTopBuffer:()=>this.positionableFeature.getHeight()-this.getBodyHeight()}),this.createManagedBean(this.positionableFeature);const m=this.getGui();t&&this.setBodyComponent(t),s?K(this.eTitleBar,!1):(o&&this.setTitle(o),this.setClosable(i??this.closable)),this.addManagedListener(this.eTitleBar,"mousedown",v=>{if(m.contains(v.relatedTarget)||m.contains(this.gos.getActiveDomElement())||this.eTitleBarButtons.contains(v.target))return void v.preventDefault();const w=this.eContentWrapper.querySelector("button, [href], input, select, textarea, [tabindex]");w&&w.focus();}),(!h||!this.positionableFeature.isPositioned())&&(this.renderComponent&&this.renderComponent(),this.positionableFeature.initialisePosition(),this.eContentWrapper.style.height="0");}renderComponent(){const t=this.getGui();t.focus(),this.close=()=>{t.parentElement.removeChild(t),this.destroy();};}getHeight(){return this.positionableFeature.getHeight();}setHeight(t){this.positionableFeature.setHeight(t);}getWidth(){return this.positionableFeature.getWidth();}setWidth(t){this.positionableFeature.setWidth(t);}setClosable(t){if(t!==this.closable&&(this.closable=t),t){const i=this.closeButtonComp=new V($l.CLOSE_BTN_TEMPLATE);this.getContext().createBean(i);const s=i.getGui(),o=re("close",this.gos);o.classList.add("ag-panel-title-bar-button-icon"),s.appendChild(o),this.addTitleBarButton(i),i.addManagedListener(s,"click",this.onBtClose.bind(this));}else if(this.closeButtonComp){const i=this.closeButtonComp.getGui();i.parentElement.removeChild(i),this.closeButtonComp=this.destroyBean(this.closeButtonComp);}}setBodyComponent(t){t.setParentComponent(this),this.eContentWrapper.appendChild(t.getGui());}addTitleBarButton(t,i){const s=this.eTitleBarButtons,o=s.children,r=o.length;null==i&&(i=r),i=Math.max(0,Math.min(i,r)),t.addCssClass("ag-panel-title-bar-button");const n=t.getGui();0===i?s.insertAdjacentElement("afterbegin",n):i===r?s.insertAdjacentElement("beforeend",n):o[i-1].insertAdjacentElement("afterend",n),t.setParentComponent(this);}getBodyHeight(){return _s(this.eContentWrapper);}getBodyWidth(){return ci(this.eContentWrapper);}setTitle(t){this.eTitle.innerText=t;}onBtClose(){this.close();}destroy(){this.closeButtonComp&&(this.closeButtonComp=this.destroyBean(this.closeButtonComp));const t=this.getGui();t&&xe(t)&&this.close(),super.destroy();}};Pi.CLOSE_BTN_TEMPLATE='<div class="ag-button"></div>',d([A("eContentWrapper")],Pi.prototype,"eContentWrapper",2),d([A("eTitleBar")],Pi.prototype,"eTitleBar",2),d([A("eTitleBarButtons")],Pi.prototype,"eTitleBarButtons",2),d([A("eTitle")],Pi.prototype,"eTitle",2),d([T],Pi.prototype,"postConstruct",1);var wu=Pi,Su=class extends wu{constructor(e){super(x(M({},e),{popup:!0})),this.isMaximizable=!1,this.isMaximized=!1,this.maximizeListeners=[],this.resizeListenerDestroy=null,this.lastPosition={x:0,y:0,width:0,height:0};}postConstruct(){const e=this.getGui(),{movable:t,resizable:i,maximizable:s}=this.config;this.addCssClass("ag-dialog"),super.postConstruct(),this.addManagedListener(e,"focusin",o=>{this.popupService.bringPopupToFront(e);}),t&&this.setMovable(t),s&&this.setMaximizable(s),i&&this.setResizable(i);}renderComponent(){const e=this.getGui(),{alwaysOnTop:t,modal:i,title:s,afterGuiAttached:o}=this.config,r=this.localeService.getLocaleTextFunc(),n=this.popupService.addPopup({modal:i,eChild:e,closeOnEsc:!0,closedCallback:this.onClosed.bind(this),alwaysOnTop:t,ariaLabel:s||r("ariaLabelDialog","Dialog"),afterGuiAttached:o});n&&(this.close=n.hideFunc);}onClosed(e){var t,i;this.destroy(),null==(i=(t=this.config).closedCallback)||i.call(t,e);}toggleMaximize(){const e=this.positionableFeature.getPosition();if(this.isMaximized){const{x:t,y:i,width:s,height:o}=this.lastPosition;this.setWidth(s),this.setHeight(o),this.positionableFeature.offsetElement(t,i);}else this.lastPosition.width=this.getWidth(),this.lastPosition.height=this.getHeight(),this.lastPosition.x=e.x,this.lastPosition.y=e.y,this.positionableFeature.offsetElement(0,0),this.setHeight("100%"),this.setWidth("100%");this.isMaximized=!this.isMaximized,this.refreshMaximizeIcon();}refreshMaximizeIcon(){K(this.maximizeIcon,!this.isMaximized),K(this.minimizeIcon,this.isMaximized);}clearMaximizebleListeners(){this.maximizeListeners.length&&(this.maximizeListeners.forEac
1h(e=>e()),this.maximizeListeners.length=0),this.resizeListenerDestroy&&(this.resizeListenerDestroy(),this.resizeListenerDestroy=null);}destroy(){this.maximizeButtonComp=this.destroyBean(this.maximizeButtonComp),this.clearMaximizebleListeners(),super.destroy();}setResizable(e){this.positionableFeature.setResizable(e);}setMovable(e){this.positionableFeature.setMovable(e,this.eTitleBar);}setMaximizable(e){if(!e)return this.clearMaximizebleListeners(),void(this.maximizeButtonComp&&(this.destroyBean(this.maximizeButtonComp),this.maximizeButtonComp=this.maximizeIcon=this.minimizeIcon=void 0));const t=this.eTitleBar;if(!t||e===this.isMaximizable)return;const i=this.buildMaximizeAndMinimizeElements();this.refreshMaximizeIcon(),i.addManagedListener(i.getGui(),"click",this.toggleMaximize.bind(this)),this.addTitleBarButton(i,0),this.maximizeListeners.push(this.addManagedListener(t,"dblclick",this.toggleMaximize.bind(this))),this.resizeListenerDestroy=this.addManagedListener(this,"resize",()=>{this.isMaximized=!1,this.refreshMaximizeIcon();});}buildMaximizeAndMinimizeElements(){const e=this.maximizeButtonComp=this.createBean(new V('<div class="ag-dialog-button"></span>')),t=e.getGui();return this.maximizeIcon=re("maximize",this.gos),t.appendChild(this.maximizeIcon),this.maximizeIcon.classList.add("ag-panel-title-bar-button-icon"),this.minimizeIcon=re("minimize",this.gos),t.appendChild(this.minimizeIcon),this.minimizeIcon.classList.add("ag-panel-title-bar-button-icon"),e;}};d([g("popupService")],Su.prototype,"popupService",2);var xp=0,vt=class extends R{constructor(){super(...arguments),this.popupList=[];}postConstruct(){this.ctrlsService.whenReady(e=>{this.gridCtrl=e.gridCtrl;}),this.addManagedListener(this.eventService,c.EVENT_GRID_STYLES_CHANGED,this.handleThemeChange.bind(this));}getPopupParent(){return this.gos.get("popupParent")||this.gridCtrl.getGui();}positionPopupForMenu(e){const{eventSource:t,ePopup:i}=e,s=this.getPopupIndex(i);-1!==s&&(this.popupList[s].alignedToElement=t);const o=t.getBoundingClientRect(),r=this.getParentRect(),n=this.keepXYWithinBounds(i,o.top-r.top,0),l=i.clientWidth>0?i.clientWidth:200;i.style.minWidth=`${l}px`;const u=r.right-r.left-l;let h;function p(){return o.right-r.left-2;}function f(){return o.left-r.left-l;}this.gos.get("enableRtl")?(h=f(),h<0&&(h=p(),this.setAlignedStyles(i,"left")),h>u&&(h=0,this.setAlignedStyles(i,"right"))):(h=p(),h>u&&(h=f(),this.setAlignedStyles(i,"right")),h<0&&(h=0,this.setAlignedStyles(i,"left"))),i.style.left=`${h}px`,i.style.top=`${n}px`;}positionPopupUnderMouseEvent(e){const{ePopup:t,nudgeX:i,nudgeY:s,skipObserver:o}=e;this.positionPopup({ePopup:t,nudgeX:i,nudgeY:s,keepWithinBounds:!0,skipObserver:o,updatePosition:()=>this.calculatePointerAlign(e.mouseEvent),postProcessCallback:()=>this.callPostProcessPopup(e.type,e.ePopup,null,e.mouseEvent,e.column,e.rowNode)});}calculatePointerAlign(e){const t=this.getParentRect();return{x:e.clientX-t.left,y:e.clientY-t.top};}positionPopupByComponent(e){const{ePopup:t,nudgeX:i,nudgeY:s,keepWithinBounds:o,eventSource:r,alignSide:n="left",position:l="over",column:a,rowNode:u,type:h}=e,p=r.getBoundingClientRect(),f=this.getParentRect(),m=this.getPopupIndex(t);-1!==m&&(this.popupList[m].alignedToElement=r),this.positionPopup({ePopup:t,nudgeX:i,nudgeY:s,keepWithinBounds:o,updatePosition:()=>{let S,w=p.left-f.left;return"right"===n&&(w-=t.offsetWidth-p.width),"over"===l?(S=p.top-f.top,this.setAlignedStyles(t,"over")):(this.setAlignedStyles(t,"under"),S="under"===this.shouldRenderUnderOrAbove(t,p,f,e.nudgeY||0)?p.top-f.top+p.height:p.top-t.offsetHeight-2*(s||0)-f.top),{x:w,y:S};},postProcessCallback:()=>this.callPostProcessPopup(h,t,r,null,a,u)});}shouldRenderUnderOrAbove(e,t,i,s){const o=i.bottom-t.bottom,r=t.top-i.top,n=e.offsetHeight+s;return o>n?"under":r>n||r>o?"above":"under";}setAlignedStyles(e,t){const i=this.getPopupIndex(e);if(-1===i)return;const s=this.popupList[i],{alignedToElement:o}=s;!o||(["right","left","over","above","under"].forEach(n=>{o.classList.remove(`ag-has-popup-positioned-${n}`),e.classList.remove(`ag-popup-positioned-${n}`);}),!t)||(o.classList.add(`ag-has-popup-positioned-${t}`),e.classList.add(`ag-popup-positioned-${t}`));}callPostProcessPopup(e,t,i,s,o,r){const n=this.gos.getCallback("postProcessPopup");n&&n({column:o,rowNode:r,ePopup:t,type:e,eventSource:i,mouseEvent:s});}positionPopup(e){const{ePopup:t,keepWithinBounds:i,nudgeX:s,nudgeY:o,skipObserver:r,updatePosition:n}=e,l={width:0,height:0}
1,a=(u=!1)=>{let{x:h,y:p}=n();u&&t.clientWidth===l.width&&t.clientHeight===l.height||(l.width=t.clientWidth,l.height=t.clientHeight,s&&(h+=s),o&&(p+=o),i&&(h=this.keepXYWithinBounds(t,h,1),p=this.keepXYWithinBounds(t,p,0)),t.style.left=`${h}px`,t.style.top=`${p}px`,e.postProcessCallback&&e.postProcessCallback());};if(a(),!r){const u=this.resizeObserverService.observeResize(t,()=>a(!0));setTimeout(()=>u(),vt.WAIT_FOR_POPUP_CONTENT_RESIZE);}}getActivePopups(){return this.popupList.map(e=>e.element);}getPopupList(){return this.popupList;}getParentRect(){const e=this.gos.getDocument();let t=this.getPopupParent();return t===e.body?t=e.documentElement:"static"===getComputedStyle(t).position&&(t=t.offsetParent),Vn(t);}keepXYWithinBounds(e,t,i){const s=0===i,o=s?"clientHeight":"clientWidth",r=s?"top":"left",n=s?"offsetHeight":"offsetWidth",l=s?"scrollTop":"scrollLeft",a=this.gos.getDocument(),u=a.documentElement,h=this.getPopupParent(),p=h.getBoundingClientRect(),f=a.documentElement.getBoundingClientRect(),m=h===a.body,v=e[n];let S=m?(s?_n:Vs)(u)+u[l]:h[o];m&&(S-=Math.abs(f[r]-p[r]));const b=S-v;return Math.min(Math.max(t,0),Math.abs(b));}addPopup(e){const t=this.gos.getDocument(),{eChild:i,ariaLabel:s,alwaysOnTop:o,positionCallback:r,anchorToElement:n}=e;if(!t)return console.warn("AG Grid: could not find the document, document is empty"),{hideFunc:()=>{}};const l=this.getPopupIndex(i);if(-1!==l)return{hideFunc:this.popupList[l].hideFunc};this.initialisePopupPosition(i);const a=this.createPopupWrapper(i,s,!!o),u=this.addEventListenersToPopup(x(M({},e),{wrapperEl:a}));return r&&r(),this.addPopupToPopupList(i,a,u,n),{hideFunc:u};}initialisePopupPosition(e){const i=this.getPopupParent().getBoundingClientRect();y(e.style.top)||(e.style.top=-1*i.top+"px"),y(e.style.left)||(e.style.left=-1*i.left+"px");}createPopupWrapper(e,t,i){const s=this.getPopupParent(),o=document.createElement("div"),{allThemes:r}=this.environment.getTheme();return r.length&&o.classList.add(...r),o.classList.add("ag-popup"),e.classList.add(this.gos.get("enableRtl")?"ag-rtl":"ag-ltr","ag-popup-child"),e.hasAttribute("role")||le(e,"dialog"),Ke(e,t),o.appendChild(e),s.appendChild(o),i?this.setAlwaysOnTop(e,!0):this.bringPopupToFront(e),o;}handleThemeChange(){const{allThemes:e}=this.environment.getTheme();for(const t of this.popupList){for(const i of Array.from(t.wrapper.classList))i.startsWith("ag-theme-")&&t.wrapper.classList.remove(i);e.length&&t.wrapper.classList.add(...e);}}addEventListenersToPopup(e){const t=this.gos.getDocument(),i=this.getPopupParent(),{wrapperEl:s,eChild:o,closedCallback:r,afterGuiAttached:n,closeOnEsc:l,modal:a}=e;let u=!1;const h=v=>{s.contains(this.gos.getActiveDomElement())&&v.key===C.ESCAPE&&!lt(v)&&m({keyboardEvent:v});},p=v=>m({mouseEvent:v}),f=v=>m({touchEvent:v}),m=(v={})=>{const{mouseEvent:w,touchEvent:S,keyboardEvent:b,forceHide:E}=v;!E&&(this.isEventFromCurrentPopup({mouseEvent:w,touchEvent:S},o)||u)||(u=!0,i.removeChild(s),t.removeEventListener("keydown",h),t.removeEventListener("mousedown",p),t.removeEventListener("touchstart",f),t.removeEventListener("contextmenu",p),this.eventService.removeEventListener(c.EVENT_DRAG_STARTED,p),r&&r(w||S||b),this.removePopupFromPopupList(o));};return n&&n({hidePopup:m}),window.setTimeout(()=>{l&&t.addEventListener("keydown",h),a&&(t.addEventListener("mousedown",p),this.eventService.addEventListener(c.EVENT_DRAG_STARTED,p),t.addEventListener("touchstart",f),t.addEventListener("contextmenu",p));},0),m;}addPopupToPopupList(e,t,i,s){this.popupList.push({element:e,wrapper:t,hideFunc:i,instanceId:xp++,isAnchored:!!s}),s&&this.setPopupPositionRelatedToElement(e,s);}getPopupIndex(e){return this.popupList.findIndex(t=>t.element===e);}setPopupPositionRelatedToElement(e,t){const i=this.getPopupIndex(e);if(-1===i)return;const s=this.popupList[i];if(s.stopAnchoringPromise&&s.stopAnchoringPromise.then(r=>r&&r()),s.stopAnchoringPromise=void 0,s.isAnchored=!1,!t)return;const o=this.keepPopupPositionedRelativeTo({element:t,ePopup:e,hidePopup:s.hideFunc});return s.stopAnchoringPromise=o,s.isAnchored=!0,o;}removePopupFromPopupList(e){this.setAlignedStyles(e,null),this.setPopupPositionRelatedToElement(e,null),this.popupList=this.popupList.filter(t=>t.element!==e);}keepPopupPositionedRelativeTo(e){const t=this.getPopupParent(),i=t.getBoundingClientRect(),{element:s,ePopup:o}=e,r=s.getBoundingClientRect(),n=i.top-r.top,l=i.left-r.left;let a=n,u=l;const h=o.style.top,p=parseInt(h.substring(0,h.length-1),10),f=o.style.left,m=parseInt(f.substring(0,f.length-1),10);return new $e(v=>{this.getFrameworkOverrides().setInterval(()=>{const w=t.getBoundingClientRect(),S=s.getBoundingClientRect();if(0==S.top&&0==S.left&&0==S.height&&0==S.width)return void e.hidePopup();const E=w.top-S.top;if(E!=a){const P=this.keepXYWithinBounds(o,p+n-E,0);o.style.top=`${P}px`;}a=E;const F=w.left-S.left;if(F!=u){const P=this.keepXYWithinBounds(o,m+l-F,1);o.style.left=`${P}px`;}u=F;},200).then(w=>
1{v(()=>{null!=w&&window.clearInterval(w);});});});}hasAnchoredPopup(){return this.popupList.some(e=>e.isAnchored);}isEventFromCurrentPopup(e,t){const{mouseEvent:i,touchEvent:s}=e,o=i||s;if(!o)return!1;const r=this.getPopupIndex(t);if(-1===r)return!1;for(let n=r;n<this.popupList.length;n++)if(jo(this.popupList[n].element,o))return!0;return this.isElementWithinCustomPopup(o.target);}isElementWithinCustomPopup(e){const t=this.gos.getDocument();for(;e&&e!==t.body;){if(e.classList.contains("ag-custom-component-popup")||null===e.parentElement)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 i=this.getWrapper(e);i&&(i.classList.toggle("ag-always-on-top",!!t),t&&this.bringPopupToFront(i));}bringPopupToFront(e){const t=this.getPopupParent(),i=Array.prototype.slice.call(t.querySelectorAll(".ag-popup")),s=i.length,o=Array.prototype.slice.call(t.querySelectorAll(".ag-popup.ag-always-on-top")),r=o.length,n=this.getWrapper(e);if(!n||s<=1||!t.contains(e))return;const l=i.indexOf(n),a=n.querySelectorAll("div"),u=[];for(a.forEach(h=>{0!==h.scrollTop&&u.push([h,h.scrollTop]);}),r?n.classList.contains("ag-always-on-top")?l!==s-1&&Y(o).insertAdjacentElement("afterend",n):l!==s-r-1&&o[0].insertAdjacentElement("beforebegin",n):l!==s-1&&Y(i).insertAdjacentElement("afterend",n);u.length;){const h=u.pop();h[0].scrollTop=h[1];}}};vt.WAIT_FOR_POPUP_CONTENT_RESIZE=200,d([g("focusService")],vt.prototype,"focusService",2),d([g("ctrlsService")],vt.prototype,"ctrlsService",2),d([g("resizeObserverService")],vt.prototype,"resizeObserverService",2),d([T],vt.prototype,"postConstruct",1),vt=d([L("popupService")],vt);var Op=class extends V{constructor(){super('\n <div class="ag-autocomplete-row" role="presentation">\n <div class="ag-autocomplete-row-label"></div>\n </div>'),this.hasHighlighting=!1;}setState(e,t){this.value=e,this.render(),this.updateSelected(t);}updateSelected(e){this.addOrRemoveCssClass("ag-autocomplete-row-selected",e);}setSearchString(e){var t;let i=!1;if(y(e)){const s=null==(t=this.value)?void 0:t.toLocaleLowerCase().indexOf(e.toLocaleLowerCase());if(s>=0){i=!0,this.hasHighlighting=!0;const o=s+e.length,r=he(this.value.slice(0,s)),n=he(this.value.slice(s,o)),l=he(this.value.slice(o));this.getGui().lastElementChild.innerHTML=`${r}<b>${n}</b>${l}`;}}!i&&this.hasHighlighting&&(this.hasHighlighting=!1,this.render());}render(){var e;this.getGui().lastElementChild.innerHTML=null!=(e=he(this.value))?e:" ";}},Lr=class yh extends Kt{constructor(t){super(yh.TEMPLATE),this.params=t,this.searchString="";}destroy(){super.destroy();}init(){this.autocompleteEntries=this.params.autocompleteEntries,this.virtualList=this.createManagedBean(new Tl({cssIdentifier:"autocomplete"})),this.virtualList.setComponentCreator(this.createRowComponent.bind(this)),this.eList.appendChild(this.virtualList.getGui()),this.virtualList.setModel({getRowCount:()=>this.autocompleteEntries.length,getRow:i=>this.autocompleteEntries[i]});const t=this.virtualList.getGui();this.addManagedListener(t,"click",()=>this.params.onConfirmed()),this.addManagedListener(t,"mousemove",this.onMouseMove.bind(this)),this.addManagedListener(t,"mousedown",i=>i.preventDefault()),this.setSelectedValue(0);}onNavigationKeyDown(t,i){t.preventDefault();const s=this.autocompleteEntries.indexOf(this.selectedValue);this.checkSetSelectedValue(i===C.UP?s-1:s+1);}setSearch(t){this.searchString=t,y(t)?this.runSearch():(this.autocompleteEntries=this.params.autocompleteEntries,this.virtualList.refresh(),this.checkSetSelectedValue(0)),this.updateSearchInList();}runContainsSearch(t,i){let s,o=!1;const r=t.toLocaleLowerCase(),n=i.filter(l=>{const u=l.toLocaleLowerCase().indexOf(r),h=0===u,p=u>=0;return p&&(!s||!o&&h||o===h&&l.length<s.length)&&(s=l,o=h),p;});return!s&&n.length&&(s=n[0]),{topMatch:s,allMatches:n};}runSearch(){var t,i;const{autocompleteEntries:s}=this.params,o=s.map(u=>{var h;return null!=(h=u.displayValue)?h:u.key;});let r,n;if(this.params.useFuzzySearch)r=zs(this.searchString,o,!0).values,n=r.length?r[0]:void 0;else{const u=this.runContainsSearch(this.searchString,o);r=u.allMatches,n=u.topMatch;}let l=s.filter(({key:u,displayValue:h})=>r.includes(h??u));if(!l.length&&this.selectedValue&&null!=(i=null==(t=this.params)?void 0:t.forceLastSelection)&&i.call(t,this.selectedValue,this.searchString)&&(l=[this.selectedValue]),this.autocompleteEntries=l,this.virtualList.refresh(),!n)return;const a=r.indexOf(n);this.checkSetSelectedValue(a);}updateSearchInList(){this.virtualList.forEachRenderedRow(t=>t.setSearchString(this.searchString));}checkSetSelectedValue(t){t>=0&&t<this.autocompleteEntries.length&&this.setSelectedValue(t);}setSelectedValue(t){const i=this.autocompleteEntries[t];this.selectedValue!==i&&(this.selectedValue=i,this.virtualList.ensureIndexVisible(t),this.virtualList.forEachRenderedRow((s,o)=>{s.updateSelected(t===o);}));}createRowComponent(t){var i;const s=new Op();return this.getContext().createBean(s),s.setState(null!=(i=t.displayValue)?i:t.key,t===this.selectedValue),s;}onMouseMove(t){const i=this.virtualList.getGui().getBoundingClientRect(),s=this.virtualList.getScrollTop(),r=Math.floor((t.clientY-i.top+s)/this.virtualList.getRowHeight());this.checkSetSelectedValue(r);}afterGuiAttached(){this.virtualList.refresh();}getSelectedValue(){var t;return this.autocompleteEntries.length&&null!=(t=this.selectedValue)?t:null;}};Lr.TEMPLATE='<div class="ag-autocomplete-list-popup">\n <div ref="eList" class="ag-autocomplete-list"></div>\n <div>',d([A("eList")],Lr.prototype,"eList",2),d([T],Lr.prototype,"init",1);var _p=Lr,Jt=class No extends V{constructor(){super('\n <div class="ag-autocomplete" role="presentation">\n <ag-input-text-field ref="eAutocompleteInput"></ag-input-text-field>\n </div>'),this.isListOpen=!1,this.lastPosition=0,this.valid=!0;}postConstruct(){this.eAutocompleteInput.onValueChange(t=>this.onValueChanged(t)),this.eAutocompleteInput.getInputElement().setAttribute("autocomplete","off"),this.addGuiEventListener("keydown",this.onKeyDown.bind(this)),this.addGuiEventListener("click",this.updatePositionAndList.bind(this)),this.addDestroyFunc(()=>{this.destroyBean(this.autocompleteList);}),this.addGuiEventListener("focusout",()=>this.onFocusOut());}onValueChanged(t){const i=ot(t);
1this.updateValue(i),this.updateAutocompleteList(i);}updateValue(t){this.updateLastPosition(),this.dispatchEvent({type:No.EVENT_VALUE_CHANGED,value:t}),this.validate(t);}updateAutocompleteList(t){var i,s,o,r;const n=null!=(s=null==(i=this.listGenerator)?void 0:i.call(this,t,this.lastPosition))?s:{enabled:!1};if((!n.type||n.type!==(null==(o=this.autocompleteListParams)?void 0:o.type))&&this.isListOpen&&this.closeList(),this.autocompleteListParams=n,null!=(r=this.autocompleteListParams)&&r.enabled){this.isListOpen||this.openList();const{searchString:l}=this.autocompleteListParams;this.autocompleteList.setSearch(l??"");}else this.isListOpen&&this.closeList();}onKeyDown(t){const i=t.key;switch(this.updateLastPosition(),i){case C.ENTER:this.onEnterKeyDown(t);break;case C.TAB:this.onTabKeyDown(t);break;case C.DOWN:case C.UP:this.onUpDownKeyDown(t,i);break;case C.LEFT:case C.RIGHT:case C.PAGE_HOME:case C.PAGE_END:setTimeout(()=>{this.updatePositionAndList();});break;case C.ESCAPE:this.onEscapeKeyDown(t);break;case C.SPACE:t.ctrlKey&&!this.isListOpen&&(t.preventDefault(),this.forceOpenList());}}confirmSelection(){var t;const i=null==(t=this.autocompleteList)?void 0:t.getSelectedValue();i&&(this.closeList(),this.dispatchEvent({type:No.EVENT_OPTION_SELECTED,value:this.getValue(),position:this.lastPosition,updateEntry:i,autocompleteType:this.autocompleteListParams.type}));}onTabKeyDown(t){this.isListOpen&&(t.preventDefault(),t.stopPropagation(),this.confirmSelection());}onEnterKeyDown(t){t.preventDefault(),this.isListOpen?this.confirmSelection():this.onCompleted();}onUpDownKeyDown(t,i){var s;t.preventDefault(),this.isListOpen?null==(s=this.autocompleteList)||s.onNavigationKeyDown(t,i):this.forceOpenList();}onEscapeKeyDown(t){this.isListOpen&&(t.preventDefault(),t.stopPropagation(),this.closeList(),this.setCaret(this.lastPosition,!0));}onFocusOut(){this.isListOpen&&this.closeList();}updatePositionAndList(){var t;this.updateLastPosition(),this.updateAutocompleteList(null!=(t=this.eAutocompleteInput.getValue())?t:null);}setCaret(t,i){const s=this.gos.getDocument(),o=this.gos.getActiveDomElement();i&&(!o||o===s.body)&&this.eAutocompleteInput.getFocusableElement().focus();const r=this.eAutocompleteInput.getInputElement();r.setSelectionRange(t,t),t===r.value.length&&(r.scrollLeft=r.scrollWidth);}forceOpenList(){this.onValueChanged(this.eAutocompleteInput.getValue());}updateLastPosition(){var t;this.lastPosition=null!=(t=this.eAutocompleteInput.getInputElement().selectionStart)?t:0;}validate(t){var i;this.validator&&(this.validationMessage=this.validator(t),this.eAutocompleteInput.getInputElement().setCustomValidity(null!=(i=this.validationMessage)?i:""),this.valid=!this.validationMessage,this.dispatchEvent({type:No.EVENT_VALID_CHANGED,isValid:this.valid,validationMessage:this.validationMessage}));}openList(){this.isListOpen=!0,this.autocompleteList=this.createBean(new _p({autocompleteEntries:this.autocompleteListParams.entries,onConfirmed:()=>this.confirmSelection(),forceLastSelection:this.forceLastSelection}));const t=this.autocompleteList.getGui(),i={ePopup:t,type:"autocomplete",eventSource:this.getGui(),position:"under",alignSide:this.gos.get("enableRtl")?"right":"left",keepWithinBounds:!0},s=this.popupService.addPopup({eChild:t,anchorToElement:this.getGui(),positionCallback:()=>this.popupService.positionPopupByComponent(i),ariaLabel:this.listAriaLabel});this.hidePopup=s.hideFunc,this.autocompleteList.afterGuiAttached();}closeList(){this.isListOpen=!1,this.hidePopup(),this.destroyBean(this.autocompleteList),this.autocompleteList=null;}onCompleted(){this.isListOpen&&this.closeList(),this.dispatchEvent({type:No.EVENT_VALUE_CONFIRMED,value:this.getValue(),isValid:this.isValid()});}getValue(){return ot(this.eAutocompleteInput.getValue());}setInputPlaceholder(t){return this.eAutocompleteInput.setInputPlaceholder(t),this;}setInputAriaLabel(t){return this.eAutocompleteInput.setInputAriaLabel(t),this;}setListAriaLabel(t){return this.listAriaLabel=t,this;}setListGenerator(t){return this.listGenerator=t,this;}setValidator(t){return this.validator=t,this;}isValid(){return this.valid;}setValue(t){const{value:i,position:s,silent:o,updateListOnlyIfOpen:r,restoreFocus:n}=t;this.eAutocompleteInput.setValue(i,!0),this.setCaret(s??this.lastPosition,n),o||this.updateV
1alue(i),(!r||this.isListOpen)&&this.updateAutocompleteList(i);}setForceLastSelection(t){return this.forceLastSelection=t,this;}setInputDisabled(t){return this.eAutocompleteInput.setDisabled(t),this;}};Jt.EVENT_VALUE_CHANGED="eventValueChanged",Jt.EVENT_VALUE_CONFIRMED="eventValueConfirmed",Jt.EVENT_OPTION_SELECTED="eventOptionSelected",Jt.EVENT_VALID_CHANGED="eventValidChanged",d([g("popupService")],Jt.prototype,"popupService",2),d([A("eAutocompleteInput")],Jt.prototype,"eAutocompleteInput",2),d([T],Jt.prototype,"postConstruct",1);var Eu=Jt,ei=class $r extends V{constructor(t,i,s,o){super(),this.dragSourceDropTarget=t,this.ghost=i,this.horizontal=s,this.template=o;}init(){var t;this.setTemplate(null!=(t=this.template)?t:$r.TEMPLATE);const i=this.getGui();this.addElementClasses(i),this.addElementClasses(this.eDragHandle,"drag-handle"),this.addElementClasses(this.eText,"text"),this.addElementClasses(this.eButton,"button"),this.eDragHandle.appendChild(re("columnDrag",this.gos)),this.eButton.appendChild(re("cancel",this.gos)),this.setupComponents(),!this.ghost&&this.isDraggable()&&this.addDragSource(),this.setupAria(),this.setupTooltip(),this.activateTabIndex(),this.refreshDraggable();}isDraggable(){return!0;}refreshDraggable(){this.eDragHandle.classList.toggle("ag-column-select-column-readonly",!this.isDraggable());}setupAria(){const t=this.localeService.getLocaleTextFunc(),i=[this.getAriaDisplayName()];this.addAdditionalAriaInstructions(i,t),Ke(this.getGui(),i.join(". "));}addAdditionalAriaInstructions(t,i){if(this.isRemovable()){const s=i("ariaDropZoneColumnComponentDescription","Press DELETE to remove");t.push(s);}}setupTooltip(){const t=()=>{const i=this.getTooltip();this.setTooltip({newTooltipText:i});};t(),this.addManagedListener(this.eventService,c.EVENT_NEW_COLUMNS_LOADED,t);}getDragSourceId(){}getDefaultIconName(){return H.ICON_NOT_ALLOWED;}addDragSource(){const{dragAndDropService:t,eDragHandle:i}=this,s=this.createGetDragItem(),o=this.getDefaultIconName(),r={type:this.getDragSourceType(),sourceId:this.getDragSourceId(),eElement:i,getDefaultIconName:()=>o,getDragItem:s,dragItemName:this.getDisplayName()};t.addDragSource(r,!0),this.addDestroyFunc(()=>t.removeDragSource(r));}setupComponents(){this.setTextValue(),this.setupRemove(),this.ghost&&this.addCssClass("ag-column-drop-cell-ghost");}isRemovable(){return!0;}refreshRemove(){K(this.eButton,this.isRemovable());}setupRemove(){this.refreshRemove();const t={type:$r.EVENT_COLUMN_REMOVE};this.addGuiEventListener("keydown",s=>this.onKeyDown(s)),this.addManagedListener(this.eButton,"click",s=>{this.dispatchEvent(t),s.stopPropagation();});const i=new me(this.eButton);this.addManagedListener(i,me.EVENT_TAP,()=>{this.dispatchEvent(t);}),this.addDestroyFunc(i.destroy.bind(i));}onKeyDown(t){t.key===C.DELETE&&this.isRemovable()&&(t.preventDefault(),this.dispatchEvent({type:$r.EVENT_COLUMN_REMOVE}));}getDisplayValue(){return this.getDisplayName();}setTextValue(){const i=he(this.getDisplayValue());this.eText.innerHTML=i;}addElementClasses(t,i){t.classList.add("ag-column-drop-cell"+(i=i?`-${i}`:""),`ag-column-drop-${this.horizontal?"horizontal":"vertical"}-cell${i}`);}destroy(){super.destroy(),this.dragSourceDropTarget=null;}};ei.EVENT_COLUMN_REMOVE="columnRemove",ei.TEMPLATE='<span role="option">\n <span ref="eDragHandle" class="ag-drag-handle ag-column-drop-cell-drag-handle" role="presentation"></span>\n <span ref="eText" class="ag-column-drop-cell-text" aria-hidden="true"></span>\n <span ref="eButton" class="ag-column-drop-cell-button" role="presentation"></span>\n </span>',d([g("dragAndDropService")],ei.prototype,"dragAndDropService",2),d([A("eText")],ei.prototype,"eText",2),d([A("eDragHandle")],ei.prototype,"eDragHandle",2),d([A("eButton")],ei.prototype,"eButton",2),d([T],ei.prototype,"init",1);var yu=ei,gs=class Rt extends V{constructor(t){super('<div class="ag-unselectable" role="presentation"></div>'),this.horizontal=t,this.state=Rt.STATE_NOT_DRAGGING,this.guiDestroyFunctions=[],this.childPillComponents=[],this.resizeEnabled=!1,this.addElementClasses(this.getGui()),this.ePillDropList=document.createElement("div"),this.addElementClasses(this.ePillDropList,"list"),le(this.ePillDropList,"listbox");}isHorizontal(){return this.horizontal;}
1toggleResizable(t){this.positionableFeature.setResizable(!!t&&{bottom:!0}),this.resizeEnabled=t;}isSourceEventFromTarget(t){const{dropZoneTarget:i,dragSource:s}=t;return i.contains(s.eElement);}destroy(){this.destroyGui(),super.destroy();}destroyGui(){this.guiDestroyFunctions.forEach(t=>t()),this.guiDestroyFunctions.length=0,this.childPillComponents.length=0,de(this.getGui()),de(this.ePillDropList);}init(t){this.params=t??{},this.createManagedBean(new Lt(this.getFocusableElement(),{handleKeyDown:this.handleKeyDown.bind(this)})),this.setupDropTarget(),this.positionableFeature=new fi(this.getGui(),{minHeight:100}),this.createManagedBean(this.positionableFeature),this.refreshGui(),Ke(this.ePillDropList,this.getAriaLabel());}handleKeyDown(t){let s=t.key===C.DOWN,o=t.key===C.UP;if(this.horizontal){const n=this.gos.get("enableRtl");s=!n&&t.key===C.RIGHT||n&&t.key===C.LEFT,o=!n&&t.key===C.LEFT||n&&t.key===C.RIGHT;}if(!s&&!o)return;const r=this.focusService.findNextFocusableElement(this.getFocusableElement(),!1,o);r&&(t.preventDefault(),r.focus());}addElementClasses(t,i){t.classList.add("ag-column-drop"+(i=i?`-${i}`:""),`ag-column-drop-${this.horizontal?"horizontal":"vertical"}${i}`);}setupDropTarget(){this.dropTarget={getContainer:this.getGui.bind(this),getIconName:this.getIconName.bind(this),onDragging:this.onDragging.bind(this),onDragEnter:this.onDragEnter.bind(this),onDragLeave:this.onDragLeave.bind(this),onDragStop:this.onDragStop.bind(this),isInterestedIn:this.isInterestedIn.bind(this)},this.dragAndDropService.addDropTarget(this.dropTarget);}minimumAllowedNewInsertIndex(){return 0;}checkInsertIndex(t){const i=this.getNewInsertIndex(t);if(i<0)return!1;const s=this.minimumAllowedNewInsertIndex(),o=Math.max(s,i),r=o!==this.insertIndex;return r&&(this.insertIndex=o),r;}getNewInsertIndex(t){const i=t.event,s=this.horizontal?i.clientX:i.clientY,o=this.childPillComponents.map(n=>n.getGui().getBoundingClientRect()),r=o.findIndex(n=>this.horizontal?n.right>s&&n.left<s:n.top<s&&n.bottom>s);if(-1===r){const n=this.gos.get("enableRtl");return o.every(u=>s>(this.horizontal?u.right:u.bottom))?n&&this.horizontal?0:this.childPillComponents.length:o.every(u=>s<(this.horizontal?u.left:u.top))?n&&this.horizontal?this.childPillComponents.length:0:this.insertIndex;}return this.insertIndex<=r?r+1:r;}checkDragStartedBySelf(t){this.state===Rt.STATE_NOT_DRAGGING&&(this.state=Rt.STATE_REARRANGE_ITEMS,this.potentialDndItems=this.getItems(t.dragSource.getDragItem()),this.refreshGui(),this.checkInsertIndex(t),this.refreshGui());}onDragging(t){this.checkDragStartedBySelf(t),this.checkInsertIndex(t)&&this.refreshGui();}handleDragEnterEnd(t){}onDragEnter(t){const i=this.getItems(t.dragSource.getDragItem());this.state=Rt.STATE_NEW_ITEMS_IN;const s=i.filter(r=>this.isItemDroppable(r,t)),o=s.every(r=>-1!==this.childPillComponents.map(n=>n.getItem()).indexOf(r));if(0!==s.length){if(this.potentialDndItems=s,o)return void(this.state=Rt.STATE_NOT_DRAGGING);this.handleDragEnterEnd(t),this.checkInsertIndex(t),this.refreshGui();}}isPotentialDndItems(){return ra(this.potentialDndItems);}handleDragLeaveEnd(t){}onDragLeave(t){if(this.state===Rt.STATE_REARRANGE_ITEMS){const i=this.getItems(t.dragSource.getDragItem());this.removeItems(i);}this.isPotentialDndItems()&&(this.handleDragLeaveEnd(t),this.potentialDndItems=[],this.refreshGui()),this.state=Rt.STATE_NOT_DRAGGING;}refreshOnDragStop(){return!0;}onDragStop(){if(this.isPotentialDndItems()){let t=!1;this.state===Rt.STATE_NEW_ITEMS_IN?(this.addItems(this.potentialDndItems),t=!0):t=this.rearrangeItems(this.potentialDndItems),this.potentialDndItems=[],(this.refreshOnDragStop()||!t)&&this.refreshGui();}this.state=Rt.STATE_NOT_DRAGGING;}removeItems(t){const i=this.getExistingItems().filter(s=>!ze(t,s));this.updateItems(i);}addItems(t){if(!t)return;const i=this.getExistingItems().slice(),s=t.filter(o=>i.indexOf(o)<0);nn(i,s,this.insertIndex),this.updateItems(i);}addItem(t){this.insertIndex=this.getExistingItems().length,this.addItems([t]),this.refreshGui();}rearrangeItems(t){const i=this.getNonGhostItems().slice();return nn(i,t,this.insertIndex),!pt(i,this.getExistingItems())&&(this.updateItems(i),!0);}refreshGui(){const t=this.ePillDropList.scrollTop,i=this.resizeEnabled,s=this.getFocusedItem();let o=this.focusService.findNextFocusableElement();o||(o=this.focusService.findNextFocusableElement(void 0,!1,!0)),this.toggleResizable(!1),this.destroyGui(),this.addIconAndTitleToGui(),this.addEmptyMessageToGui(),this.addItemsToGui(),this.isHorizontal()||(this.ePillDropList.scrollTop=t),i&&this.toggleResizable(i),this.focusService.isKeyboardMode()&&this.restoreFocus(s,o);}getFocusedItem(){const t=this.getGui(),i=this.gos.getActiveDomElement();return t.contains(i)?Array.from(t.querySelectorAll(".ag-column-drop-cell")).indexOf(i):-1;}restoreFocus(t,i){const s=this.getGui(),o=Array.from(s.querySelectorAll(".ag-column-drop-cell"));if(-1===t)return;0===o.length&&i.focus();const n=o[Math.min(o.length-1,t)];n&&n.focus();}focusList(t){this.restoreFocus(t?this.childPillComponents.length-1:0,this.getFocusableElement());}getNonGhostItems(){const t=this.getExistingItems();return this.isPotentialDndItems()?t.filter(i=>!ze(this.potentialDndItems,i)):t;}addItemsToGui(){const i=this.getNonGhostItems().map(s=>this.createItemComponent(s,!1));if(this.isPotentialDndItems()){const s=this.potentialDndItems.map(o=>this.createItemComponent(o,!0));this.insertIndex>
1=i.length?i.push(...s):i.splice(this.insertIndex,0,...s);}this.appendChild(this.ePillDropList),i.forEach((s,o)=>{o>0&&this.addArrow(this.ePillDropList),this.ePillDropList.appendChild(s.getGui());}),this.addAriaLabelsToComponents();}addAriaLabelsToComponents(){this.childPillComponents.forEach((t,i)=>{const s=t.getGui();Jo(s,i+1),Zo(s,this.childPillComponents.length);});}createItemComponent(t,i){const s=this.createPillComponent(t,this.dropTarget,i,this.horizontal);return s.addEventListener(yu.EVENT_COLUMN_REMOVE,this.removeItems.bind(this,[t])),this.context.createBean(s),this.guiDestroyFunctions.push(()=>this.destroyBean(s)),i||this.childPillComponents.push(s),s;}addIconAndTitleToGui(){const{title:t,icon:i}=this.params;if(!t||!i)return;const s=document.createElement("div");if(Os(s,!0),this.addElementClasses(s,"title-bar"),this.addElementClasses(i,"icon"),this.addOrRemoveCssClass("ag-column-drop-empty",this.isExistingItemsEmpty()),s.appendChild(i),!this.horizontal){const o=document.createElement("span");this.addElementClasses(o,"title"),o.innerHTML=t,s.appendChild(o);}this.appendChild(s);}isExistingItemsEmpty(){return 0===this.getExistingItems().length;}addEmptyMessageToGui(){const{emptyMessage:t}=this.params;if(!t||!this.isExistingItemsEmpty()||this.isPotentialDndItems())return;const i=document.createElement("span");i.innerHTML=t,this.addElementClasses(i,"empty-message"),this.ePillDropList.appendChild(i);}addArrow(t){if(this.horizontal){const s=re(this.gos.get("enableRtl")?"smallLeft":"smallRight",this.gos);this.addElementClasses(s,"cell-separator"),t.appendChild(s);}}};gs.STATE_NOT_DRAGGING="notDragging",gs.STATE_NEW_ITEMS_IN="newItemsIn",gs.STATE_REARRANGE_ITEMS="rearrangeItems",d([g("focusService")],gs.prototype,"focusService",2),d([g("dragAndDropService")],gs.prototype,"dragAndDropService",2);var Vp=gs,Hp=["touchstart","touchend","touchmove","touchcancel"],Ru=class{constructor(e="javascript"){this.frameworkName=e,this.renderingEngine="vanilla",this.wrapIncoming=t=>t(),this.wrapOutgoing=t=>t();}setInterval(e,t){return new $e(i=>{i(window.setInterval(e,t));});}addEventListener(e,t,i,s){const o=ze(Hp,t);e.addEventListener(t,i,{capture:!!s,passive:o});}get shouldWrapOutgoing(){return!1;}frameworkComponent(e){return null;}isFrameworkComponent(e){return!1;}getDocLink(e){return`https://www.ag-grid.com/${"solid"===this.frameworkName?"react":this.frameworkName}-data-grid${e?`/${e}`:""}`;}},Ot=class extends R{getNextCellToFocus(e,t,i=!1){return i?this.getNextCellToFocusWithCtrlPressed(e,t):this.getNextCellToFocusWithoutCtrlPressed(e,t);}getNextCellToFocusWithCtrlPressed(e,t){const i=e===C.UP,o=e===C.LEFT;let r,n;if(i||e===C.DOWN)n=i?this.paginationProxy.getPageFirstRow():this.paginationProxy.getPageLastRow(),r=t.column;else{const l=this.columnModel.getAllDisplayedColumns(),a=this.gos.get("enableRtl");n=t.rowIndex,r=o!==a?l[0]:Y(l);}return{rowIndex:n,rowPinned:null,column:r};}getNextCellToFocusWithoutCtrlPressed(e,t){let i=t,s=!1;for(;!s;){switch(e){case C.UP:i=this.getCellAbove(i);break;case C.DOWN:i=this.getCellBelow(i);break;case C.RIGHT:i=this.gos.get("enableRtl")?this.getCellToLeft(i):this.getCellToRight(i);break;case C.LEFT:i=this.gos.get("enableRtl")?this.getCellToRight(i):this.getCellToLeft(i);break;default:i=null,console.warn("AG Grid: unknown key for navigation "+e);}s=!i||this.isCellGoodToFocusOn(i);}return i;}isCellGoodToFocusOn(e){const t=e.column;let i;switch(e.rowPinned){case"top":i=this.pinnedRowModel.getPinnedTopRow(e.rowIndex);break;case"bottom":i=this.pinnedRowModel.getPinnedBottomRow(e.rowIndex);break;default:i=this.rowModel.getRow(e.rowIndex);}return!!i&&!t.isSuppressNavigable(i);}getCellToLeft(e){if(!e)return null;const t=this.columnModel.getDisplayedColBefore(e.column);return t?{rowIndex:e.rowIndex,column:t,rowPinned:e.rowPinned}:null;}getCellToRight(e){if(!e)return null;const t=this.columnModel.getDisplayedColAfter(e.column);return t?{rowIndex:e.rowIndex,column:t,rowPinned:e.rowPinned}:null;}getRowBelow(e){const t=e.rowIndex,i=e.rowPinned;if(this.isLastRowInContainer(e))switch(i){case"bottom":return null;case"top":return this.rowModel.isRowsToRender()?{rowIndex:this.paginationProxy.getPageFirstRow(),rowPinned:null}:this.pinnedRowModel.isRowsToRender("bottom")?{rowIndex:0,rowPinned:"bottom"}:null;default:return this.pinnedRowModel.isRowsToRender("bottom")?{rowIndex:0,rowPinned:"bottom"}:null;}const s=this.rowModel.getRow(e.rowIndex);return this.getNextStickyPosition(s)||{rowIndex:t+1,rowPinned:i};}getNextStickyPosition(e,t){if(!this.gos.isGroupRowsSticky()||!e||!e.sticky)return;let s=[];s=this.rowRenderer.getStickyTopRowCtrls().some(l=>l.getRowNode().rowIndex===e.rowIndex)?[...this.rowRenderer.getStickyTopRowCtrls()].sort((l,a)=>l.getRowNode().rowIndex-a.getRowNode().rowIndex):[...this.rowRenderer.getStickyBottomRowCtrls()].sort((l,a)=>a.getRowNode().rowIndex-l.getRowNode().rowIndex);const o=t?-1:1,r=s.findIndex(l=>l.getRowNode().rowIndex===e.rowIndex),n=s[r+o];return n?{rowIndex:n.getRowNode().rowIndex,rowPinned:null}:void 0;}getCellBelow(e){if(!e)return null;const t=this.getRowBelow(e);return t?{rowIndex:t.rowIndex,column:e.column,rowPinned:t.rowPinned}:null;}isLastRowInContainer(e){const t=e.rowPinned,i=e.rowIndex;return"top"===t?this.pinnedRowModel.getPinnedTopRowData().length-1<=i:"bottom"===t?this.pinnedRowModel.getPinnedBottomRowData().length-1<=i:this.paginationProxy.getPageLastRow()<=i;}getRowAbove(e){const t=e.rowIndex,i=e.rowPinned;if(i?0===t:t===this.paginationProxy.getPageFirstRow())return"top"===i?null:i&&this.rowModel.isRowsToRender()?this.getLastBodyCell():this.pinnedRowModel.isRowsToRender("top")?this.getLastFloatingTopRow():null;const o=this.rowModel.getRow(e.rowIndex);return this.getNextStickyPosition(o,!0)||{rowIndex:t-1,rowPinned:i};}getCellAbove(e){if(!e)return null;const t=this.getRowAbove({rowIndex:e.rowIndex,rowPinned:e.rowPinned});return t?{rowIndex:t.rowIndex,column:e.column,rowPinned:t.rowPinned}:null;}getLastBodyCell(){return{rowIndex:this.paginationProxy.getPageLastRow(),rowPinned:null};}getLastFloatingTopRow(){return{rowIndex:this.pinnedRowModel.getPinnedTopRowData().length-1,rowPinned:"top"};}getNextTabbedCell(e,t){return t?this.getNextTabbedCellBackwards(e):this.getNextTabbedCellForwards(e);}getNextTabbedCellForwards(e){const t=this.columnModel.getAllDisplayedColumns();let i=e.rowIndex,s=e.rowPinned,o=this.columnModel.getDisplayedColAfter(e.column);if(!o){o=t[0];const r=this.getRowBelow(e);if(_(r)||!r.rowPinned&&!this.paginationProxy.isRowInPage(r))return null;i=r?r.rowIndex:null,s=r?r.rowPinned:null;}return{rowIndex:i,column:o,rowPinned:s};}getNextTabbedCellBackwards(e){const t=this.columnModel.getAllDisplayedColumns();let i=e.rowIndex,s=e.rowPinned,o=this.columnModel.getDisplayedColBefore(e.column);if(!o){o=Y(t);const r=this.getRowAbove({rowIndex:e.rowIndex,rowPinned:e.rowPinned});if(_(r)||!r.rowPinned&&!this.paginationProxy.isRowInPage(r))return null;i=r?r.rowIndex:null,s=r?r.rowPinned:null;}return{rowIndex:i,column:o,rowPinned:s};}};d([g("columnModel")],Ot.prototype,"columnModel",2),d([g("rowModel")],Ot.prototype,"rowModel",2),d([g("rowRenderer")],Ot.prototype,"rowRenderer",2),d([g("pinnedRowModel")],Ot.prototype,"pinnedRowModel",2),d([g("paginationProxy")],Ot.prototype,"paginationProxy",2),Ot=d([L("cellNavigationService")],Ot);var ti=class extends R{constructor(){super(...arguments),this.consuming=!1;}setBeans(e){this.logger=e.create("AlignedGridsService");}getAlignedGridApis(){var e;let t=null!=(e=this.gos.get("alignedGrids"))?e:[];const i="function"==typeof t;"function"==typeof t&&(t=t());const s=()=>`See ${this.getFrameworkOverrides().getDocLink("aligned-grids")}`;return t.map(r=>{var n;if(!r)return rt("alignedGrids contains an undefined option."),i||rt('You may want to configure via a callback to avoid setup race conditions:\n "alignedGrids: () => [linkedGrid]"'),void rt(s());if(r instanceof U)return r;const l=r;return"current"in l?null==(n=l.current)?void 0:n.api:(l.api||rt(`alignedGrids - No api found on the linked grid. If you are passing gridOptions to alignedGrids since v31 this is no longer valid. ${s()}`),l.api);}).filter(r=>!!r&&!r.isDestroyed());}init(){this.addManagedListener(this.eventService,c.EVENT_COLUMN_MOVED,this.fireColumnEvent.bind(this)),this.addManagedListener(this.eventService,c.EVENT_COLUMN_VISIBLE,this.fireColumnEvent.bind(this)),this.addManagedListener(this.eventService,c.EVENT_COLUMN_PINNED,this.fireColumnEvent.bind(this)),this.addManagedListener(this.eventService,c.EVENT_COLUMN_GROUP_OPENED,this.fireColumnEvent.bind(this)),this.addManagedListener(this.eventService,c.EVENT_COLUMN_RESIZED,this.fireColumnEvent.bind(this)),this.addManagedListener(this.eventService,c.EVENT_BODY_SCROLL,this.fireScrollEvent.bind(this));}
1fireEvent(e){this.consuming||this.getAlignedGridApis().forEach(t=>{if(t.isDestroyed())return;const i=t.__getAlignedGridService();e(i);});}onEvent(e){this.consuming=!0,e(),this.consuming=!1;}fireColumnEvent(e){this.fireEvent(t=>{t.onColumnEvent(e);});}fireScrollEvent(e){"horizontal"===e.direction&&this.fireEvent(t=>{t.onScrollEvent(e);});}onScrollEvent(e){this.onEvent(()=>{this.ctrlsService.getGridBodyCtrl().getScrollFeature().setHorizontalScrollPosition(e.left,!0);});}getMasterColumns(e){const t=[];return e.columns?e.columns.forEach(i=>{t.push(i);}):e.column&&t.push(e.column),t;}getColumnIds(e){const t=[];return e.columns?e.columns.forEach(i=>{t.push(i.getColId());}):e.column&&t.push(e.column.getColId()),t;}onColumnEvent(e){this.onEvent(()=>{switch(e.type){case c.EVENT_COLUMN_MOVED:case c.EVENT_COLUMN_VISIBLE:case c.EVENT_COLUMN_PINNED:case c.EVENT_COLUMN_RESIZED:this.processColumnEvent(e);break;case c.EVENT_COLUMN_GROUP_OPENED:this.processGroupOpenedEvent(e);break;case c.EVENT_COLUMN_PIVOT_CHANGED:console.warn("AG Grid: pivoting is not supported with aligned grids. You can only use one of these features at a time in a grid.");}});}processGroupOpenedEvent(e){e.columnGroups.forEach(t=>{let i=null;if(t){const s=t.getGroupId();i=this.columnModel.getProvidedColumnGroup(s);}t&&!i||(this.logger.log("onColumnEvent-> processing "+e+" expanded = "+t.isExpanded()),this.columnModel.setColumnGroupOpened(i,t.isExpanded(),"alignedGridChanged"));});}processColumnEvent(e){var t;const i=e.column;let s=null;if(i&&(s=this.columnModel.getPrimaryColumn(i.getColId())),i&&!s)return;const o=this.getMasterColumns(e);switch(e.type){case c.EVENT_COLUMN_MOVED:{const u=e,p=e.api.getColumnState().map(f=>({colId:f.colId}));this.columnModel.applyColumnState({state:p,applyOrder:!0},"alignedGridChanged"),this.logger.log(`onColumnEvent-> processing ${e.type} toIndex = ${u.toIndex}`);}break;case c.EVENT_COLUMN_VISIBLE:{const u=e,p=e.api.getColumnState().map(f=>({colId:f.colId,hide:f.hide}));this.columnModel.applyColumnState({state:p},"alignedGridChanged"),this.logger.log(`onColumnEvent-> processing ${e.type} visible = ${u.visible}`);}break;case c.EVENT_COLUMN_PINNED:{const u=e,p=e.api.getColumnState().map(f=>({colId:f.colId,pinned:f.pinned}));this.columnModel.applyColumnState({state:p},"alignedGridChanged"),this.logger.log(`onColumnEvent-> processing ${e.type} pinned = ${u.pinned}`);}break;case c.EVENT_COLUMN_RESIZED:const l=e,a={};o.forEach(u=>{this.logger.log(`onColumnEvent-> processing ${e.type} actualWidth = ${u.getActualWidth()}`),a[u.getId()]={key:u.getColId(),newWidth:u.getActualWidth()};}),null==(t=l.flexColumns)||t.forEach(u=>{a[u.getId()]&&delete a[u.getId()];}),this.columnModel.setColumnWidths(Object.values(a),!1,l.finished,"alignedGridChanged");}const n=this.ctrlsService.getGridBodyCtrl().isVerticalScrollShowing();this.getAlignedGridApis().forEach(l=>{l.setGridOption("alwaysShowVerticalScroll",n);});}};d([g("columnModel")],ti.prototype,"columnModel",2),d([g("ctrlsService")],ti.prototype,"ctrlsService",2),d([be(0,Ue("loggerFactory"))],ti.prototype,"setBeans",1),d([T],ti.prototype,"init",1),ti=d([L("alignedGridsService")],ti);var Li=class extends R{constructor(){super(...arguments),this.selectedNodes=new Map(),this.lastRowNode=null;}init(){this.rowSelection=this.gos.get("rowSelection"),this.groupSelectsChildren=this.gos.get("groupSelectsChildren"),this.addManagedPropertyListeners(["groupSelectsChildren","rowSelection"],()=>{this.groupSelectsChildren=this.gos.get("groupSelectsChildren"),this.rowSelection=this.gos.get("rowSelection"),this.deselectAllRowNodes({source:"api"});}),this.addManagedListener(this.eventService,c.EVENT_ROW_SELECTED,this.onRowSelected.bind(this));}destroy(){super.destroy(),this.resetNodes(),this.lastRowNode=null;}isMultiselect(){return"multiple"===this.rowSelection;}setNodesSelected(e){var t;const{newValue:i,clearSelection:s,suppressFinishActions:o,rangeSelect:r,nodes:n,event:l,source:a="api"}=e;if(0===n.length)return 0;if(n.length>1&&!this.isMultiselect())return console.warn("AG Grid: cannot multi select while rowSelection='single'"),0;const u=this.groupSelectsChildren&&!0===e.groupSelectsFiltered,h=n.map(f=>f.footer?f.sibling:f);if(r){if(n.length>1)return console.warn("AG Grid: cannot range select while selecting multiple rows"),0;let f=null;if("checkboxSelected"===a&&!1===i&&this.lastRowNode&&(this.lastRowNode.id?f=this.lastRowNode:this.lastRowNode=null),null==f&&(f=this.getLastSelectedNode()),f){const m=h[0];if(m!==f&&this.isMultiselect())return this.selectRange(m,f,i,a);}}this.lastRowNode=i?null:h[0];let p=0;for(let f=0;f<h.length;f++){const m=h[f];u&&m.group||m.selectThisNode(i,l,a)&&p++,this.groupSelectsChildren&&null!=(t=m.childrenAfterGroup)&&t.length&&(p+=this.selectChildren(m,i,u,a));}return!o&&(i&&(s||!this.isMultiselect())&&(p+=this.clearOtherNodes(h[0],a)),p>0)&&(this.updateGroupsFromChildrenSelections(a),this.eventService.dispatchEvent({type:c.EVENT_SELECTION_CHANGED,source:a})),p;}selectRange(e,t,i=!0,s){const o=this.rowModel.getNodesInRangeForSelection(e,t);let r=0;return o.forEach(l=>{l.group&&this.groupSelectsChildren||l.selectThisNode(i,void 0,s)&&r++;}),this.updateGroupsFromChildrenSelections(s),this.eventService.dispatchEvent({type:c.EVENT_SELECTION_CHANGED,source:s}),r;}selectChildren(e,t,i,s){const o=i?e.childrenAfterAggFilter:e.childrenAfterGroup;return _(o)?0:this.setNodesSelected({newValue:t,clearSelection:!1,suppressFinishActions:!0,groupSelectsFiltered:i,source:s,nodes:o});}getLastSelectedNode(){const e=Array.from(this.selectedNodes.keys());return 0==e.length?null:this.selectedNodes.get(Y(e))||null;}getSelectedNodes(){const e=[];
1return this.selectedNodes.forEach(t=>{t&&e.push(t);}),e;}getSelectedRows(){const e=[];return this.selectedNodes.forEach(t=>{t&&t.data&&e.push(t.data);}),e;}getSelectionCount(){return this.selectedNodes.size;}filterFromSelection(e){const t=new Map();this.selectedNodes.forEach((i,s)=>{i&&e(i)&&t.set(s,i);}),this.selectedNodes=t;}updateGroupsFromChildrenSelections(e,t){if(!this.groupSelectsChildren||"clientSide"!==this.rowModel.getType())return!1;const s=this.rowModel.getRootNode();t||(t=new ho(!0,s)).setInactive();let o=!1;return t.forEachChangedNodeDepthFirst(r=>{if(r!==s){const n=r.calculateSelectedFromChildren();o=r.selectThisNode(null!==n&&n,void 0,e)||o;}}),o;}clearOtherNodes(e,t){const i=new Map();let s=0;return this.selectedNodes.forEach(o=>{if(o&&o.id!==e.id){const r=this.selectedNodes.get(o.id);s+=r.setSelectedParams({newValue:!1,clearSelection:!1,suppressFinishActions:!0,source:t}),this.groupSelectsChildren&&o.parent&&i.set(o.parent.id,o.parent);}}),i.forEach(o=>{const r=o.calculateSelectedFromChildren();o.selectThisNode(null!==r&&r,void 0,t);}),s;}onRowSelected(e){const t=e.node;this.groupSelectsChildren&&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);}syncInOldRowNode(e,t){y(t)&&e.id!==t.id&&t&&this.selectedNodes.get(t.id)==e&&this.selectedNodes.set(t.id,t);}syncInNewRowNode(e){this.selectedNodes.has(e.id)?(e.setSelectedInitialValue(!0),this.selectedNodes.set(e.id,e)):e.setSelectedInitialValue(!1);}reset(e){const t=this.getSelectionCount();this.resetNodes(),t&&this.eventService.dispatchEvent({type:c.EVENT_SELECTION_CHANGED,source:e});}resetNodes(){var e;null==(e=this.selectedNodes)||e.clear();}getBestCostNodeSelection(){if("clientSide"!==this.rowModel.getType())return;const t=this.rowModel.getTopLevelNodes();if(null===t)return;const i=[];return function s(o){for(let r=0,n=o.length;r<n;r++){const l=o[r];l.isSelected()?i.push(l):l.group&&l.children&&s(l.children);}}(t),i;}isEmpty(){let e=0;return this.selectedNodes.forEach(t=>{t&&e++;}),0===e;}deselectAllRowNodes(e){const t=l=>l.selectThisNode(!1,void 0,s),i="clientSide"===this.rowModel.getType(),{source:s,justFiltered:o,justCurrentPage:r}=e;if(r||o){if(!i)return void console.error("AG Grid: selecting just filtered only works when gridOptions.rowModelType='clientSide'");this.getNodesToSelect(o,r).forEach(t);}else this.selectedNodes.forEach(l=>{l&&t(l);}),this.reset(s);i&&this.groupSelectsChildren&&this.updateGroupsFromChildrenSelections(s),this.eventService.dispatchEvent({type:c.EVENT_SELECTION_CHANGED,source:s});}getSelectedCounts(e,t){let i=0,s=0;return this.getNodesToSelect(e,t).forEach(r=>{this.groupSelectsChildren&&r.group||(r.isSelected()?i++:r.selectable&&s++);}),{selectedCount:i,notSelectedCount:s};}getSelectAllState(e,t){const{selectedCount:i,notSelectedCount:s}=this.getSelectedCounts(e,t);return(0!==i||0!==s)&&(i>0&&s>0?null:i>0);}hasNodesToSelect(e=!1,t=!1){return this.getNodesToSelect(e,t).filter(i=>i.selectable).length>0;}getNodesToSelect(e=!1,t=!1){if("clientSide"!==this.rowModel.getType())throw new Error(`selectAll only available when rowModelType='clientSide', ie not ${this.rowModel.getType()}`);const i=[];if(t)return this.paginationProxy.forEachNodeOnPage(o=>{if(o.group){if(o.expanded)this.groupSelectsChildren||i.push(o);else{const r=n=>{var l;i.push(n),null!=(l=n.childrenAfterFilter)&&l.length&&n.childrenAfterFilter.forEach(r);};r(o);}}else i.push(o);}),i;const s=this.rowModel;return e?(s.forEachNodeAfterFilter(o=>{i.push(o);}),i):(s.forEachNode(o=>{i.push(o);}),i);}selectAllRowNodes(e){if("clientSide"!==this.rowModel.getType())throw new Error(`selectAll only available when rowModelType='clientSide', ie not ${this.rowModel.getType()}`);const{source:t,justFiltered:i,justCurrentPage:s}=e;this.getNodesToSelect(i,s).forEach(n=>n.selectThisNode(!0,void 0,t)),"clientSide"===this.rowModel.getType()&&this.groupSelectsChildren&&this.updateGroupsFromChildrenSelections(t),this.eventService.dispatchEvent({type:c.EVENT_SELECTION_CHANGED,source:t});}getSelectionState(){const e=[];
1return this.selectedNodes.forEach(t=>{t?.id&&e.push(t.id);}),e.length?e:null;}setSelectionState(e,t){if(!Array.isArray(e))return;const i=new Set(e),s=[];this.rowModel.forEachNode(o=>{i.has(o.id)&&s.push(o);}),this.setNodesSelected({newValue:!0,nodes:s,source:t});}};d([g("rowModel")],Li.prototype,"rowModel",2),d([g("paginationProxy")],Li.prototype,"paginationProxy",2),d([T],Li.prototype,"init",1),Li=d([L("selectionService")],Li);var Mi=class{constructor(e){this.viaApi=(t,...i)=>(O(`Since v31, 'columnApi.${t}' is deprecated and moved to 'api.${t}'.`),this.api[t](...i)),this.api=e;}sizeColumnsToFit(e){this.viaApi("sizeColumnsToFit",e);}setColumnGroupOpened(e,t){this.viaApi("setColumnGroupOpened",e,t);}getColumnGroup(e,t){return this.viaApi("getColumnGroup",e,t);}getProvidedColumnGroup(e){return this.viaApi("getProvidedColumnGroup",e);}getDisplayNameForColumn(e,t){return this.viaApi("getDisplayNameForColumn",e,t);}getDisplayNameForColumnGroup(e,t){return this.viaApi("getDisplayNameForColumnGroup",e,t);}getColumn(e){return this.viaApi("getColumn",e);}getColumns(){return this.viaApi("getColumns");}applyColumnState(e){return this.viaApi("applyColumnState",e);}getColumnState(){return this.viaApi("getColumnState");}resetColumnState(){this.viaApi("resetColumnState");}getColumnGroupState(){return this.viaApi("getColumnGroupState");}setColumnGroupState(e){this.viaApi("setColumnGroupState",e);}resetColumnGroupState(){this.viaApi("resetColumnGroupState");}isPinning(){return this.viaApi("isPinning");}isPinningLeft(){return this.viaApi("isPinningLeft");}isPinningRight(){return this.viaApi("isPinningRight");}getDisplayedColAfter(e){return this.viaApi("getDisplayedColAfter",e);}getDisplayedColBefore(e){return this.viaApi("getDisplayedColBefore",e);}setColumnVisible(e,t){this.viaApi("setColumnVisible",e,t);}setColumnsVisible(e,t){this.viaApi("setColumnsVisible",e,t);}setColumnPinned(e,t){this.viaApi("setColumnPinned",e,t);}setColumnsPinned(e,t){this.viaApi("setColumnsPinned",e,t);}getAllGridColumns(){return this.viaApi("getAllGridColumns");}getDisplayedLeftColumns(){return this.viaApi("getDisplayedLeftColumns");}getDisplayedCenterColumns(){return this.viaApi("getDisplayedCenterColumns");}getDisplayedRightColumns(){return this.viaApi("getDisplayedRightColumns");}getAllDisplayedColumns(){return this.viaApi("getAllDisplayedColumns");}getAllDisplayedVirtualColumns(){return this.viaApi("getAllDisplayedVirtualColumns");}moveColumn(e,t){this.viaApi("moveColumn",e,t);}moveColumnByIndex(e,t){this.viaApi("moveColumnByIndex",e,t);}moveColumns(e,t){this.viaApi("moveColumns",e,t);}moveRowGroupColumn(e,t){this.viaApi("moveRowGroupColumn",e,t);}setColumnAggFunc(e,t){this.viaApi("setColumnAggFunc",e,t);}setColumnWidth(e,t,i=!0,s){this.viaApi("setColumnWidth",e,t,i,s);}setColumnWidths(e,t=!0,i){this.viaApi("setColumnWidths",e,t,i);}setPivotMode(e){this.viaApi("setPivotMode",e);}isPivotMode(){return this.viaApi("isPivotMode");}getPivotResultColumn(e,t){return this.viaApi("getPivotResultColumn",e,t);}setValueColumns(e){this.viaApi("setValueColumns",e);}getValueColumns(){return this.viaApi("getValueColumns");}removeValueColumn(e){this.viaApi("removeValueColumn",e);}removeValueColumns(e){this.viaApi("removeValueColumns",e);}addValueColumn(e){this.viaApi("addValueColumn",e);}addValueColumns(e){this.viaApi("addValueColumns",e);}setRowGroupColumns(e){this.viaApi("setRowGroupColumns",e);}removeRowGroupColumn(e){this.viaApi("removeRowGroupColumn",e);}removeRowGroupColumns(e){this.viaApi("removeRowGroupColumns",e);}addRowGroupColumn(e){this.viaApi("addRowGroupColumn",e);}addRowGroupColumns(e){this.viaApi("addRowGroupColumns",e);}getRowGroupColumns(){return this.viaApi("getRowGroupColumns");}setPivotColumns(e){this.viaApi("setPivotColumns",e);}removePivotColumn(e){this.viaApi("removePivotColumn",e);}removePivotColumns(e){this.viaApi("removePivotColumns",e);}addPivotColumn(e){this.viaApi("addPivotColumn",e);}addPivotColumns(e){this.viaApi("addPivotColumns",e);}getPivotColumns(){return this.viaApi("getPivotColumns");}getLeftDisplayedColumnGroups(){return this.viaApi("getLeftDisplayedColumnGroups");}getCenterDisplayedColumnGroups(){return this.viaApi("getCenterDisplayedColumnGroups");}getRightDisplayedColumnGroups(){return this.viaApi("getRightDisplayedColumnGroups");}getAllDisplayedColumnGroups(){return this.viaApi("getAllDisplayedColumnGroups");}autoSizeColumn(e,t){return this.viaApi("autoSizeColumn",e,t);}autoSizeColumns(e,t){this.viaApi("autoSizeColumns",e,t);}autoSizeAllColumns(e){this.viaApi("autoSizeAllColumns",e);}setPivotResultColumns(e){this.viaApi("setPivotResultColumns",e);}getPivotResultColumns(){return this.viaApi("getPivotResultColumns");}};d([g("gridApi")],Mi.prototype,"api",2),Mi=d([L("columnApi")],Mi);var _t=class extends R{constructor(){super(...arguments),this.initialised=!1,this.isSsrm=!1;}init(){this.isSsrm=this.gos.isRowModelType("serverSide"),this.cellExpressions=this.gos.get("enableCellExpressions"),this.isTreeData=this.gos.get("treeData"),this.initialised=!0;const e=i=>this.callColumnCellValueChangedHandler(i),t=this.gos.useAsyncEvents();this.eventService.addEventListener(c.EVENT_CELL_VALUE_CHANGED,e,t),this.addDestroyFunc(()=>this.eventService.removeEventListener(c.EVENT_CELL_VALUE_CHANGED,e,t)),this.addManagedPropertyListener("treeData",i=>this.isTreeData=i.currentValue);}getValue(e,t,i=!1,s=!1){if(this.initialised||this.init(),!t)return;const o=e.getColDef(),r=o.field,n=e.getColId(),l=t.data;let a;const u=t.groupData&&void 0!==t.groupData[n],h=!s&&t.aggData&&void 0!==t.aggData[n],p=this.isSsrm&&s&&!!e.getColDef().aggFunc,f=this.isSsrm&&t.footer&&t.field&&(!0===e.getColDef().showRowGroup||e.getColDef().showRowGroup===t.field);if(i&&o.filterValueGetter?a=this.executeFilterValueGetter(o.filterValueGetter,l,e,t):this.isTreeData&&h?a=t.aggData[n]:this.isTreeData&&o.valueGetter?a=this.execute
1ValueGetter(o.valueGetter,l,e,t):this.isTreeData&&r&&l?a=Ui(l,r,e.isFieldContainsDots()):u?a=t.groupData[n]:h?a=t.aggData[n]:o.valueGetter?a=this.executeValueGetter(o.valueGetter,l,e,t):f?a=Ui(l,t.field,e.isFieldContainsDots()):r&&l&&!p&&(a=Ui(l,r,e.isFieldContainsDots())),this.cellExpressions&&"string"==typeof a&&0===a.indexOf("=")){const m=a.substring(1);a=this.executeValueGetter(m,l,e,t);}if(null==a){const m=this.getOpenedGroup(t,e);if(null!=m)return m;}return a;}parseValue(e,t,i,s){const o=e.getColDef(),r=this.gos.addGridCommonParams({node:t,data:t?.data,oldValue:s,newValue:i,colDef:o,column:e}),n=o.valueParser;return y(n)?"function"==typeof n?n(r):this.expressionService.evaluate(n,r):i;}formatValue(e,t,i,s,o=!0){let n,r=null;const l=e.getColDef();if(s?n=s:o&&(n=l.valueFormatter),n){const a=this.gos.addGridCommonParams({value:i,node:t,data:t?t.data:null,colDef:l,column:e});r="function"==typeof n?n(a):this.expressionService.evaluate(n,a);}else if(l.refData)return l.refData[i]||"";return null==r&&Array.isArray(i)&&(r=i.join(", ")),r;}getOpenedGroup(e,t){if(!this.gos.get("showOpenedGroup")||!t.getColDef().showRowGroup)return;const s=t.getColDef().showRowGroup;let o=e.parent;for(;null!=o;){if(o.rowGroupColumn&&(!0===s||s===o.rowGroupColumn.getColId()))return o.key;o=o.parent;}}setValue(e,t,i,s){const o=this.columnModel.getPrimaryColumn(t);if(!e||!o)return!1;_(e.data)&&(e.data={});const{field:r,valueSetter:n}=o.getColDef();if(_(r)&&_(n))return console.warn("AG Grid: you need either field or valueSetter set on colDef for editing to work"),!1;if(!this.dataTypeService.checkType(o,i))return console.warn("AG Grid: Data type of the new value does not match the cell data type of the column"),!1;const l=this.gos.addGridCommonParams({node:e,data:e.data,oldValue:this.getValue(o,e),newValue:i,colDef:o.getColDef(),column:o});let a;return l.newValue=i,a=y(n)?"function"==typeof n?n(l):this.expressionService.evaluate(n,l):this.setValueUsingField(e.data,r,i,o.isFieldContainsDots()),void 0===a&&(a=!0),!!a&&(e.resetQuickFilterAggregateText(),this.valueCache.onDataChanged(),l.newValue=this.getValue(o,e),this.eventService.dispatchEvent({type:c.EVENT_CELL_VALUE_CHANGED,event:null,rowIndex:e.rowIndex,rowPinned:e.rowPinned,column:l.column,api:l.api,columnApi:l.columnApi,colDef:l.colDef,context:l.context,data:e.data,node:e,oldValue:l.oldValue,newValue:l.newValue,value:l.newValue,source:s}),!0);}callColumnCellValueChangedHandler(e){const t=e.colDef.onCellValueChanged;"function"==typeof t&&this.getFrameworkOverrides().wrapOutgoing(()=>{t({node:e.node,data:e.data,oldValue:e.oldValue,newValue:e.newValue,colDef:e.colDef,column:e.column,api:e.api,columnApi:e.columnApi,context:e.context});});}setValueUsingField(e,t,i,s){if(!t)return!1;let o=!1;if(s){const r=t.split(".");let n=e;for(;r.length>0&&n;){const l=r.shift();0===r.length?(o=n[l]===i,o||(n[l]=i)):n=n[l];}}else o=e[t]===i,o||(e[t]=i);return!o;}executeFilterValueGetter(e,t,i,s){const o=this.gos.addGridCommonParams({data:t,node:s,column:i,colDef:i.getColDef(),getValue:this.getValueCallback.bind(this,s)});return"function"==typeof e?e(o):this.expressionService.evaluate(e,o);}executeValueGetter(e,t,i,s){const o=i.getColId(),r=this.valueCache.getValue(s,o);if(void 0!==r)return r;const n=this.gos.addGridCommonParams({data:t,node:s,column:i,colDef:i.getColDef(),getValue:this.getValueCallback.bind(this,s)});let l;return l="function"==typeof e?e(n):this.expressionService.evaluate(e,n),this.valueCache.setValue(s,o,l),l;}getValueCallback(e,t){const i=this.columnModel.getPrimaryColumn(t);return i?this.getValue(i,e):null;}getKeyForNode(e,t){const i=this.getValue(e,t),s=e.getColDef().keyCreator;let o=i;return s&&(o=s(this.gos.addGridCommonParams({value:i,colDef:e.getColDef(),column:e,node:t,data:t.data}))),"string"==typeof o||null==o||(o=String(o),"[object Object]"===o&&O("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 (se AG Grid docs) or b) to toString() on the object to return a key")),o;}};d([g("expressionService")],_t.prototype,"expressionService",2),d([g("columnModel")],_t.prototype,"columnModel",2),d([g("valueCache")],_t.prototype,"valueCache",2),d([g("dataTypeService")],_t.prototype,"dataTypeService",2),d([T],_t.prototype,"init",1),_t=d([L("valueService")],_t);var mo=class extends R{constructor(){super(...arguments),this.expressionToFunctionCache={};}setBeans(e){this.logger=e.create("ExpressionService");}evaluate(e,t){if("string"==typeof e)return this.evaluateExpression(e,t);console.error("AG Grid: value should be either a string or a function",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.columnApi,t.getValue,t.column,t.columnGroup);}catch(i){return console.log("Processing of the expression failed"),console.log("Expression = "+e),console.log("Param
1s =",t),console.log("Exception = "+i),null;}}createExpressionFunction(e){if(this.expressionToFunctionCache[e])return this.expressionToFunctionCache[e];const t=this.createFunctionBody(e),i=new Function("x, ctx, oldValue, newValue, value, node, data, colDef, rowIndex, api, columnApi, getValue, column, columnGroup",t);return this.expressionToFunctionCache[e]=i,i;}createFunctionBody(e){return e.indexOf("return")>=0?e:"return "+e+";";}};d([be(0,Ue("loggerFactory"))],mo.prototype,"setBeans",1),mo=d([L("expressionService")],mo);var Co=class extends R{setBeans(e){this.logging=e.get("debug");}create(e){return new Mr(e,this.isLogging.bind(this));}isLogging(){return this.logging;}};d([be(0,Ue("gridOptionsService"))],Co.prototype,"setBeans",1),Co=d([L("loggerFactory")],Co);var Mr=class{constructor(e,t){this.name=e,this.isLoggingFunc=t;}isLogging(){return this.isLoggingFunc();}log(e){this.isLoggingFunc()&&console.log("AG Grid."+this.name+": "+e);}},ii=class extends R{setComp(e,t,i){this.view=e,this.eGridHostDiv=t,this.eGui=i,this.eGui.setAttribute("grid-id",this.context.getGridId()),this.dragAndDropService.addDropTarget({getContainer:()=>this.eGui,isInterestedIn:o=>1===o||0===o,getIconName:()=>H.ICON_NOT_ALLOWED}),this.mouseEventService.stampTopLevelGridCompWithGridInstance(t),this.createManagedBean(new wr(this.view)),this.addRtlSupport();const s=this.resizeObserverService.observeResize(this.eGridHostDiv,this.onGridSizeChanged.bind(this));this.addDestroyFunc(()=>s()),this.ctrlsService.register("gridCtrl",this);}isDetailGrid(){var e;const t=this.focusService.findTabbableParent(this.getGui());return(null==(e=t?.getAttribute("row-id"))?void 0:e.startsWith("detail"))||!1;}showDropZones(){return q.__isRegistered("@ag-grid-enterprise/row-grouping",this.context.getGridId());}showSideBar(){return q.__isRegistered("@ag-grid-enterprise/side-bar",this.context.getGridId());}showStatusBar(){return q.__isRegistered("@ag-grid-enterprise/status-bar",this.context.getGridId());}showWatermark(){return q.__isRegistered("@ag-grid-enterprise/core",this.context.getGridId());}onGridSizeChanged(){this.eventService.dispatchEvent({type:c.EVENT_GRID_SIZE_CHANGED,clientWidth:this.eGridHostDiv.clientWidth,clientHeight:this.eGridHostDiv.clientHeight});}addRtlSupport(){const e=this.gos.get("enableRtl")?"ag-rtl":"ag-ltr";this.view.setRtlClass(e);}destroyGridUi(){this.view.destroyGridUi();}getGui(){return this.eGui;}setResizeCursor(e){this.view.setCursor(e?"ew-resize":null);}disableUserSelect(e){this.view.setUserSelect(e?"none":null);}focusNextInnerContainer(e){const t=this.view.getFocusableContainers(),i=this.gos.getActiveDomElement(),o=t.findIndex(r=>r.contains(i))+(e?-1:1);return!(o<=0||o>=t.length)&&this.focusService.focusInto(t[o]);}focusInnerElement(e){const t=this.view.getFocusableContainers(),i=this.columnModel.getAllDisplayedColumns();if(e){if(t.length>1)return this.focusService.focusInto(Y(t),!0);const s=Y(i);if(this.focusService.focusGridView(s,!0))return!0;}if(0===this.gos.get("headerHeight")||this.gos.get("suppressHeaderFocus")){if(this.focusService.focusGridView(i[0]))return!0;for(let s=1;s<t.length;s++)if(this.focusService.focusInto(t[s]))return!0;return!1;}return this.focusService.focusFirstHeader();}forceFocusOutOfContainer(e=!1){this.view.forceFocusOutOfContainer(e);}};d([g("focusService")],ii.prototype,"focusService",2),d([g("resizeObserverService")],ii.prototype,"resizeObserverService",2),d([g("columnModel")],ii.prototype,"columnModel",2),d([g("ctrlsService")],ii.prototype,"ctrlsService",2),d([g("mouseEventService")],ii.prototype,"mouseEventService",2),d([g("dragAndDropService")],ii.prototype,"dragAndDropService",2);var si=class extends ns{constructor(e){super(),this.eGridDiv=e;}postConstruct(){this.logger=this.loggerFactory.create("GridComp");const e={destroyGridUi:()=>this.destroyBean(this),setRtlClass:i=>this.addCssClass(i),forceFocusOutOfContainer:this.forceFocusOutOfContainer.bind(this),updateLayoutClasses:this.updateLayoutClasses.bind(this),getFocusableContainers:this.getFocusableContainers.bind(this),setUserSelect:i=>{this.getGui().style.userSelect=i??"",this.getGui().style.webkitUserSelect=i??"";},setCursor:i=>{this.getGui().style.cursor=i??"";}};this.ctrl=this.createManagedBean(new ii());const t=this.createTemplate();
1this.setTemplate(t),this.ctrl.setComp(e,this.eGridDiv,this.getGui()),this.insertGridIntoDom(),this.initialiseTabGuard({onTabKeyDown:()=>{},focusInnerElement:i=>this.ctrl.focusInnerElement(i),forceFocusOutWhenTabGuardsAreEmpty:!0});}insertGridIntoDom(){const e=this.getGui();this.eGridDiv.appendChild(e),this.addDestroyFunc(()=>{this.eGridDiv.removeChild(e),this.logger.log("Grid removed from DOM");});}updateLayoutClasses(e,t){const i=this.eRootWrapperBody.classList;i.toggle("ag-layout-auto-height",t.autoHeight),i.toggle("ag-layout-normal",t.normal),i.toggle("ag-layout-print",t.print),this.addOrRemoveCssClass("ag-layout-auto-height",t.autoHeight),this.addOrRemoveCssClass("ag-layout-normal",t.normal),this.addOrRemoveCssClass("ag-layout-print",t.print);}createTemplate(){return`<div class="ag-root-wrapper" role="presentation">\n ${this.ctrl.showDropZones()?"<ag-grid-header-drop-zones></ag-grid-header-drop-zones>":""}\n <div class="ag-root-wrapper-body" ref="rootWrapperBody" role="presentation">\n <ag-grid-body ref="gridBody"></ag-grid-body>\n ${this.ctrl.showSideBar()?'<ag-side-bar ref="sideBar"></ag-side-bar>':""}\n </div>\n ${this.ctrl.showStatusBar()?'<ag-status-bar ref="statusBar"></ag-status-bar>':""}\n <ag-pagination></ag-pagination>\n ${this.ctrl.showWatermark()?"<ag-watermark></ag-watermark>":""}\n </div>`;}getFocusableElement(){return this.eRootWrapperBody;}getFocusableContainers(){const e=[this.gridBodyComp.getGui()];return this.sideBarComp&&e.push(this.sideBarComp.getGui()),e.filter(t=>xe(t));}};d([g("loggerFactory")],si.prototype,"loggerFactory",2),d([A("gridBody")],si.prototype,"gridBodyComp",2),d([A("sideBar")],si.prototype,"sideBarComp",2),d([A("rootWrapperBody")],si.prototype,"eRootWrapperBody",2),d([T],si.prototype,"postConstruct",1);var oi=class extends R{progressSort(e,t,i){const s=this.getNextSortDirection(e);this.setSortForColumn(e,s,t,i);}setSortForColumn(e,t,i,s){"asc"!==t&&"desc"!==t&&(t=null);let r=[e];if(this.gos.isColumnsSortingCoupledToGroup()&&e.getColDef().showRowGroup){const a=this.columnModel.getSourceColumnsForGroupColumn(e),u=a?.filter(h=>h.isSortable());u&&(r=[e,...u]);}r.forEach(a=>a.setSort(t,s));const l=[];if(!i&&!this.gos.get("alwaysMultiSort")||this.gos.get("suppressMultiSort")){const a=this.clearSortBarTheseColumns(r,s);l.push(...a);}this.updateSortIndex(e),l.push(...r),this.dispatchSortChangedEvents(s,l);}updateSortIndex(e){const t=this.gos.isColumnsSortingCoupledToGroup(),i=this.columnModel.getGroupDisplayColumnForGroup(e.getId()),s=t&&i||e,o=this.getColumnsWithSortingOrdered();this.columnModel.getPrimaryAndSecondaryAndAutoColumns().forEach(l=>l.setSortIndex(null));const r=o.filter(l=>!(t&&l.getColDef().showRowGroup||l===s));(s.getSort()?[...r,s]:r).forEach((l,a)=>{l.setSortIndex(a);});}onSortChanged(e,t){this.dispatchSortChangedEvents(e,t);}isSortActive(){const t=this.columnModel.getPrimaryAndSecondaryAndAutoColumns().filter(i=>!!i.getSort());return t&&t.length>0;}dispatchSortChangedEvents(e,t){const i={type:c.EVENT_SORT_CHANGED,source:e};t&&(i.columns=t),this.eventService.dispatchEvent(i);}clearSortBarTheseColumns(e,t){const i=[];return this.columnModel.getPrimaryAndSecondaryAndAutoColumns().forEach(s=>{e.includes(s)||(s.getSort()&&i.push(s),s.setSort(void 0,t));}),i;}getNextSortDirection(e){let t;if(t=e.getColDef().sortingOrder?e.getColDef().sortingOrder:this.gos.get("sortingOrder")?this.gos.get("sortingOrder"):oi.DEFAULT_SORTING_ORDER,!Array.isArray(t)||t.length<=0)return console.warn(`AG Grid: sortingOrder must be an array with at least one element, currently it's ${t}`),null;const i=t.indexOf(e.getSort());let r;return r=i<0||i==t.length-1?t[0]:t[i+1],oi.DEFAULT_SORTING_ORDER.indexOf(r)<0?(console.warn("AG Grid: invalid sort type "+r),null):r;}getIndexedSortMap(){let e=this.columnModel.getPrimaryAndSecondaryAndAutoColumns().filter(r=>!!r.getSort());if(this.columnModel.isPivotMode()){const r=this.gos.isColumnsSortingCoupledToGroup();e=e.filter(n=>{const l=!!n.getAggFunc(),a=!n.isPrimary(),u=r?this.columnModel.getGroupDisplayColumnForGroup(n.getId()):n.getColDef().showRowGroup;return l||a||u;});}const t=this.columnModel.getRowGroupColumns().filter(r=>!!r.getSort()),i={};e.forEach((r,n)=>i[r.getId()]=n),e.sort((r,n)=>
1{const l=r.getSortIndex(),a=n.getSortIndex();return null!=l&&null!=a?l-a:null==l&&null==a?i[r.getId()]>i[n.getId()]?1:-1:null==a?-1:1;});const s=this.gos.isColumnsSortingCoupledToGroup()&&!!t.length;s&&(e=[...new Set(e.map(r=>{var n;return null!=(n=this.columnModel.getGroupDisplayColumnForGroup(r.getId()))?n:r;}))]);const o=new Map();return e.forEach((r,n)=>o.set(r,n)),s&&t.forEach(r=>{const n=this.columnModel.getGroupDisplayColumnForGroup(r.getId());o.set(r,o.get(n));}),o;}getColumnsWithSortingOrdered(){return[...this.getIndexedSortMap().entries()].sort(([e,t],[i,s])=>t-s).map(([e])=>e);}getSortModel(){return this.getColumnsWithSortingOrdered().filter(e=>e.getSort()).map(e=>({sort:e.getSort(),colId:e.getId()}));}getSortOptions(){return this.getColumnsWithSortingOrdered().filter(e=>e.getSort()).map(e=>({sort:e.getSort(),column:e}));}canColumnDisplayMixedSort(e){const t=this.gos.isColumnsSortingCoupledToGroup(),i=!!e.getColDef().showRowGroup;return t&&i;}getDisplaySortForColumn(e){const t=this.columnModel.getSourceColumnsForGroupColumn(e);if(!this.canColumnDisplayMixedSort(e)||!t?.length)return e.getSort();const s=null!=e.getColDef().field||e.getColDef().valueGetter?[e,...t]:t,o=s[0].getSort();return s.every(n=>n.getSort()==o)?o:"mixed";}getDisplaySortIndexForColumn(e){return this.getIndexedSortMap().get(e);}};oi.DEFAULT_SORTING_ORDER=["asc","desc",null],d([g("columnModel")],oi.prototype,"columnModel",2),oi=d([L("sortController")],oi);var J=class extends R{static addKeyboardModeEvents(e){this.instanceCount>0||(e.addEventListener("keydown",J.toggleKeyboardMode),e.addEventListener("mousedown",J.toggleKeyboardMode));}static removeKeyboardModeEvents(e){this.instanceCount>0||(e.addEventListener("keydown",J.toggleKeyboardMode),e.addEventListener("mousedown",J.toggleKeyboardMode));}static toggleKeyboardMode(e){const i="keydown"===e.type;i&&(e.ctrlKey||e.metaKey||e.altKey)||J.keyboardModeActive!==i&&(J.keyboardModeActive=i);}static unregisterGridCompController(e){J.removeKeyboardModeEvents(e);}init(){const e=this.clearFocusedCell.bind(this);this.addManagedListener(this.eventService,c.EVENT_COLUMN_PIVOT_MODE_CHANGED,e),this.addManagedListener(this.eventService,c.EVENT_NEW_COLUMNS_LOADED,this.onColumnEverythingChanged.bind(this)),this.addManagedListener(this.eventService,c.EVENT_COLUMN_GROUP_OPENED,e),this.addManagedListener(this.eventService,c.EVENT_COLUMN_ROW_GROUP_CHANGED,e),this.registerKeyboardFocusEvents(),this.ctrlsService.whenReady(t=>{this.gridCtrl=t.gridCtrl;});}registerKeyboardFocusEvents(){const e=this.gos.getDocument();J.addKeyboardModeEvents(e),J.instanceCount++,this.addDestroyFunc(()=>{J.instanceCount--,J.unregisterGridCompController(e);});}onColumnEverythingChanged(){if(!this.focusedCellPosition)return;const e=this.focusedCellPosition.column,t=this.columnModel.getGridColumn(e.getId());e!==t&&this.clearFocusedCell();}isKeyboardMode(){return J.keyboardModeActive;}getFocusCellToUseAfterRefresh(){return this.gos.get("suppressFocusAfterRefresh")||!this.focusedCellPosition||this.isDomDataMissingInHierarchy(this.gos.getActiveDomElement(),Yt.DOM_DATA_KEY_ROW_CTRL)?null:this.focusedCellPosition;}getFocusHeaderToUseAfterRefresh(){return this.gos.get("suppressFocusAfterRefresh")||!this.focusedHeaderPosition||this.isDomDataMissingInHierarchy(this.gos.getActiveDomElement(),oo.DOM_DATA_KEY_HEADER_CTRL)?null:this.focusedHeaderPosition;}isDomDataMissingInHierarchy(e,t){let i=e;for(;i;){if(this.gos.getDomData(i,t))return!1;i=i.parentNode;}return!0;}getFocusedCell(){return this.focusedCellPosition;}shouldRestoreFocus(e){return!!this.isCellRestoreFocused(e)&&(setTimeout(()=>{this.restoredFocusedCellPosition=null;},0),!0);}isCellRestoreFocused(e){return null!=this.restoredFocusedCellPosition&&this.cellPositionUtils.equals(e,this.restoredFocusedCellPosition);}setRestoreFocusedCell(e){"react"===this.getFrameworkOverrides().renderingEngine&&(this.restoredFocusedCellPosition=e);}getFocusEventParams(){const{rowIndex:e,rowPinned:t,column:i}=this.focusedCellPosition,s={rowIndex:e,rowPinned:t,column:i,isFullWidthCell:!1},o=this.rowRenderer.getRowByPosition({rowIndex:e,rowPinned:t});return o&&(s.isFullWidthCell=o.isFullWidth()),s;}clearFocusedCell(){if(this.restoredFocusedCellPosition=null,null==this.focusedCellPosition)return;const e=M({type:c.EVENT_CELL_FOCUS_CLEARED}
1,this.getFocusEventParams());this.focusedCellPosition=null,this.eventService.dispatchEvent(e);}setFocusedCell(e){const{column:t,rowIndex:i,rowPinned:s,forceBrowserFocus:o=!1,preventScrollOnBrowserFocus:r=!1}=e,n=this.columnModel.getGridColumn(t);if(!n)return void(this.focusedCellPosition=null);this.focusedCellPosition=n?{rowIndex:i,rowPinned:ot(s),column:n}:null;const l=x(M({type:c.EVENT_CELL_FOCUSED},this.getFocusEventParams()),{forceBrowserFocus:o,preventScrollOnBrowserFocus:r,floating:null});this.eventService.dispatchEvent(l);}isCellFocused(e){return null!=this.focusedCellPosition&&this.cellPositionUtils.equals(e,this.focusedCellPosition);}isRowNodeFocused(e){return this.isRowFocused(e.rowIndex,e.rowPinned);}isHeaderWrapperFocused(e){if(null==this.focusedHeaderPosition)return!1;const t=e.getColumnGroupChild(),i=e.getRowIndex(),s=e.getPinned(),{column:o,headerRowIndex:r}=this.focusedHeaderPosition;return t===o&&i===r&&s==o.getPinned();}clearFocusedHeader(){this.focusedHeaderPosition=null;}getFocusedHeader(){return this.focusedHeaderPosition;}setFocusedHeader(e,t){this.focusedHeaderPosition={headerRowIndex:e,column:t};}focusHeaderPosition(e){if(this.gos.get("suppressHeaderFocus"))return!1;const{direction:t,fromTab:i,allowUserOverride:s,event:o,fromCell:r,rowWithoutSpanValue:n}=e;let{headerPosition:l}=e;if(r&&this.filterManager.isAdvancedFilterHeaderActive())return this.focusAdvancedFilter(l);if(s){const a=this.getFocusedHeader(),u=this.headerNavigationService.getHeaderRowCount();if(i){const h=this.gos.getCallback("tabToNextHeader");h&&(l=this.getHeaderPositionFromUserFunc({userFunc:h,direction:t,currentPosition:a,headerPosition:l,headerRowCount:u}));}else{const h=this.gos.getCallback("navigateToNextHeader");h&&o&&(l=h({key:o.key,previousHeaderPosition:a,nextHeaderPosition:l,headerRowCount:u,event:o}));}}return!!l&&this.focusProvidedHeaderPosition({headerPosition:l,direction:t,event:o,fromCell:r,rowWithoutSpanValue:n});}focusHeaderPositionFromUserFunc(e){if(this.gos.get("suppressHeaderFocus"))return!1;const{userFunc:t,headerPosition:i,direction:s,event:o}=e,r=this.getFocusedHeader(),n=this.headerNavigationService.getHeaderRowCount(),l=this.getHeaderPositionFromUserFunc({userFunc:t,direction:s,currentPosition:r,headerPosition:i,headerRowCount:n});return!!l&&this.focusProvidedHeaderPosition({headerPosition:l,direction:s,event:o});}getHeaderPositionFromUserFunc(e){const{userFunc:t,direction:i,currentPosition:s,headerPosition:o,headerRowCount:r}=e,l=t({backwards:"Before"===i,previousHeaderPosition:s,nextHeaderPosition:o,headerRowCount:r});return!0===l||null===l?(null===l&&O("Returning `null` from tabToNextHeader is deprecated. Return `true` to stay on the current header, or `false` to let the browser handle the tab behaviour."),s):!1===l?null:l;}focusProvidedHeaderPosition(e){const{headerPosition:t,direction:i,fromCell:s,rowWithoutSpanValue:o,event:r}=e;if(-1===t.headerRowIndex)return this.filterManager.isAdvancedFilterHeaderActive()?this.focusAdvancedFilter(t):this.focusGridView(t.column);this.headerNavigationService.scrollToColumn(t.column,i);const l=this.ctrlsService.getHeaderRowContainerCtrl(t.column.getPinned()).focusHeader(t.headerRowIndex,t.column,r);return l&&(null!=o||s)&&this.headerNavigationService.setCurrentHeaderRowWithoutSpan(o??-1),l;}focusFirstHeader(){let e=this.columnModel.getAllDisplayedColumns()[0];if(!e)return!1;e.getParent()&&(e=this.columnModel.getColumnGroupAtLevel(e,0));const t=this.headerPositionUtils.getHeaderIndexToFocus(e,0);return this.focusHeaderPosition({headerPosition:t,rowWithoutSpanValue:0});}focusLastHeader(e){const t=this.headerNavigationService.getHeaderRowCount()-1,i=Y(this.columnModel.getAllDisplayedColumns());return this.focusHeaderPosition({headerPosition:{headerRowIndex:t,column:i},rowWithoutSpanValue:-1,event:e});}focusPreviousFromFirstCell(e){return this.filterManager.isAdvancedFilterHeaderActive()?this.focusAdvancedFilter(null):this.focusLastHeader(e);}isAnyCellFocused(){return!!this.focusedCellPosition;}isRowFocused(e,t){return null!=this.focusedCellPosition&&this.focusedCellPosition.rowIndex===e&&this.focusedCellPosition.rowPinned===ot(t);}findFocusableElements(e,t,i=!1){let o=xn;t&&(o+=", "+t),i&&(o+=', [tabindex="-1"]');const r=Array.prototype.slice.apply(e.querySelectorAll(Ua)).filter(a=>
1xe(a)),n=Array.prototype.slice.apply(e.querySelectorAll(o));return n.length?(u=n,r.filter(h=>-1===u.indexOf(h))):r;var u;}focusInto(e,t=!1,i=!1){const s=this.findFocusableElements(e,null,i),o=t?Y(s):s[0];return!!o&&(o.focus({preventScroll:!0}),!0);}findFocusableElementBeforeTabGuard(e,t){if(!t)return null;const i=this.findFocusableElements(e),s=i.indexOf(t);if(-1===s)return null;let o=-1;for(let r=s-1;r>=0;r--)if(i[r].classList.contains("ag-tab-guard-top")){o=r;break;}return o<=0?null:i[o-1];}findNextFocusableElement(e=this.eGridDiv,t,i){const s=this.findFocusableElements(e,t?':not([tabindex="-1"])':null),o=this.gos.getActiveDomElement();let r;r=t?s.findIndex(l=>l.contains(o)):s.indexOf(o);const n=r+(i?-1:1);return n<0||n>=s.length?null:s[n];}isTargetUnderManagedComponent(e,t){if(!t)return!1;const i=e.querySelectorAll(`.${Lt.FOCUS_MANAGED_CLASS}`);if(!i.length)return!1;for(let s=0;s<i.length;s++)if(i[s].contains(t))return!0;return!1;}findTabbableParent(e,t=5){let i=0;for(;e&&null===sr(e)&&++i<=t;)e=e.parentElement;return null===sr(e)?null:e;}focusGridView(e,t){var i;if(this.gos.get("suppressCellFocus"))return t?this.gos.get("suppressHeaderFocus")?this.focusNextGridCoreContainer(!0,!0):this.focusLastHeader():this.focusNextGridCoreContainer(!1);const s=t?this.rowPositionUtils.getLastRow():this.rowPositionUtils.getFirstRow();if(!s)return!1;const{rowIndex:o,rowPinned:r}=s,n=this.getFocusedHeader();return!e&&n&&(e=n.column),!(null==o||!e||(this.navigationService.ensureCellVisible({rowIndex:o,column:e,rowPinned:r}),this.setFocusedCell({rowIndex:o,column:e,rowPinned:ot(r),forceBrowserFocus:!0}),null==(i=this.rangeService)||i.setRangeToCell({rowIndex:o,rowPinned:r,column:e}),0));}focusNextGridCoreContainer(e,t=!1){return!(t||!this.gridCtrl.focusNextInnerContainer(e))||((t||!e&&!this.gridCtrl.isDetailGrid())&&this.gridCtrl.forceFocusOutOfContainer(e),!1);}focusAdvancedFilter(e){var t,i;return this.advancedFilterFocusColumn=e?.column,null!=(i=null==(t=this.advancedFilterService)?void 0:t.getCtrl().focusHeaderComp())&&i;}focusNextFromAdvancedFilter(e,t){var i,s;const o=null!=(s=t?void 0:this.advancedFilterFocusColumn)?s:null==(i=this.columnModel.getAllDisplayedColumns())?void 0:i[0];return e?this.focusHeaderPosition({headerPosition:{column:o,headerRowIndex:this.headerNavigationService.getHeaderRowCount()-1}}):this.focusGridView(o);}clearAdvancedFilterColumn(){this.advancedFilterFocusColumn=void 0;}};J.keyboardModeActive=!1,J.instanceCount=0,d([g("eGridDiv")],J.prototype,"eGridDiv",2),d([g("columnModel")],J.prototype,"columnModel",2),d([g("headerNavigationService")],J.prototype,"headerNavigationService",2),d([g("headerPositionUtils")],J.prototype,"headerPositionUtils",2),d([g("rowRenderer")],J.prototype,"rowRenderer",2),d([g("rowPositionUtils")],J.prototype,"rowPositionUtils",2),d([g("cellPositionUtils")],J.prototype,"cellPositionUtils",2),d([g("navigationService")],J.prototype,"navigationService",2),d([g("ctrlsService")],J.prototype,"ctrlsService",2),d([g("filterManager")],J.prototype,"filterManager",2),d([Q("rangeService")],J.prototype,"rangeService",2),d([Q("advancedFilterService")],J.prototype,"advancedFilterService",2),d([T],J.prototype,"init",1),J=d([L("focusService")],J);var Pl=class extends R{setMouseOver(e){this.selectedColumns=e,this.eventService.dispatchEvent({type:c.EVENT_COLUMN_HOVER_CHANGED});}clearMouseOver(){this.selectedColumns=null,this.eventService.dispatchEvent({type:c.EVENT_COLUMN_HOVER_CHANGED});}isHovered(e){return!!this.selectedColumns&&this.selectedColumns.indexOf(e)>=0;}};Pl=d([L("columnHoverService")],Pl);var vo=class extends R{constructor(){super(...arguments),this.executeNextFuncs=[],this.executeLaterFuncs=[],this.active=!1,this.suppressAnimation=!1,this.animationThreadCount=0;}postConstruct(){this.ctrlsService.whenReady(e=>this.gridBodyCtrl=e.gridBodyCtrl);}isActive(){return this.active&&!this.suppressAnimation;}setSuppressAnimation(e){this.suppressAnimation=e;}start(){this.active||this.gos.get("suppressColumnMoveAnimation")||this.gos.get("enableRtl")||(this.ensureAnimationCssClassPresent(),this.active=!0);}finish(){this.active&&this.flush(()=>{this.active=!1;});}executeNextVMTurn(e){this.active?this.executeNextFuncs.push(e):e();}executeLaterVMTurn(e){this.active?this.executeLaterFuncs.push(e):e();}ensureAnimationCssClassPresent(){this.animationThreadCount++;const e=this.animationThreadCount;this.gridBodyCtrl.setColumnMovingCss(!0),this.executeLaterFuncs.push(()=>{this.animationThreadCount===e&&this.gridBodyCtrl.setColumnMovingCss(!1);});}flush(e){if(0===this.executeNextFuncs.length&&0===this.executeLaterFuncs.length)return void e();const t=i=>{for(;i.length;){const s=i.pop();s&&s();}};this.getFrameworkOverrides().wrapIncoming(()=>{window.setTimeout(()=>t(this.executeNextFuncs),0),window.setTimeout(()=>{e(),t(this.executeLaterFuncs);},200);});}};d([g("ctrlsService")],vo.prototype,"ctrlsService",2),d([T],vo.prototype,"postConstruct",1),vo=d([L("columnAnimationService")],vo);var fs=class extends R{postConstruct(){this.ctrlsService.whenReady(e=>{this.centerRowsCtrl=e.center,this.addManagedListener(this.eventService,c.EVENT_BODY_HEIGHT_CHANGED,this.checkPageSize.bind(this)),this.addManagedListener(this.eventService,c.EVENT_SCROLL_VISIBILITY_CHANGED,this.checkPageSize.bind(this)),this.addManagedPropertyListener("paginationAutoPageSize",this.onPaginationAutoSizeChanged.bind(this)),this.checkPageSize();});}notActive(){return!this.gos.get("paginationAutoPageSize")||null==this.centerRowsCtrl;}onPaginationAutoSizeChanged(){this.notActive()?this.paginationProxy.unsetAutoCalculatedPageSize():this.checkPageSize();}checkPageSize(){if(this.notActive())return;
1const e=this.centerRowsCtrl.getViewportSizeFeature().getBodyHeight();if(e>0){const t=()=>{const i=this.gos.getRowHeightAsNumber(),s=Math.floor(e/i);this.paginationProxy.setPageSize(s,"autoCalculated");};this.isBodyRendered?Te(()=>t(),50)():(t(),this.isBodyRendered=!0);}else this.isBodyRendered=!1;}};d([g("ctrlsService")],fs.prototype,"ctrlsService",2),d([g("paginationProxy")],fs.prototype,"paginationProxy",2),d([T],fs.prototype,"postConstruct",1),fs=d([L("paginationAutoPageSizeService")],fs);var wo=class extends R{constructor(){super(...arguments),this.cacheVersion=0;}init(){this.active=this.gos.get("valueCache"),this.neverExpires=this.gos.get("valueCacheNeverExpires");}onDataChanged(){this.neverExpires||this.expire();}expire(){this.cacheVersion++;}setValue(e,t,i){this.active&&(e.__cacheVersion!==this.cacheVersion&&(e.__cacheVersion=this.cacheVersion,e.__cacheData={}),e.__cacheData[t]=i);}getValue(e,t){if(this.active&&e.__cacheVersion===this.cacheVersion)return e.__cacheData[t];}};d([T],wo.prototype,"init",1),wo=d([L("valueCache")],wo);var ms=class extends R{init(){"clientSide"===this.rowModel.getType()&&(this.clientSideRowModel=this.rowModel),this.addManagedListener(this.eventService,c.EVENT_CELL_VALUE_CHANGED,this.onCellValueChanged.bind(this));}onCellValueChanged(e){"paste"!==e.source&&this.doChangeDetection(e.node,e.column);}doChangeDetection(e,t){if(this.gos.get("suppressChangeDetection"))return;const i=[e];if(this.clientSideRowModel&&!e.isRowPinned()){const s=this.gos.get("aggregateOnlyChangedColumns"),o=new ho(s,this.clientSideRowModel.getRootNode());o.addParentNode(e.parent,[t]),this.clientSideRowModel.doAggregate(o),o.forEachChangedNodeDepthFirst(r=>{i.push(r);});}this.rowRenderer.refreshCells({rowNodes:i});}};d([g("rowModel")],ms.prototype,"rowModel",2),d([g("rowRenderer")],ms.prototype,"rowRenderer",2),d([T],ms.prototype,"init",1),ms=d([L("changeDetectionService")],ms);var Ir=class extends R{adaptFunction(e,t){const i=this.componentMetadataProvider.retrieve(e);return i&&i.functionAdapter?i.functionAdapter(t):null;}adaptCellRendererFunction(e){return class t{refresh(s){return!1;}getGui(){return this.eGui;}init(s){const o=e(s),r=typeof o;this.eGui="string"!==r&&"number"!==r&&"boolean"!==r?null!=o?o:Oe("<span></span>"):Oe("<span>"+o+"</span>");}};}doesImplementIComponent(e){return!!e&&e.prototype&&"getGui"in e.prototype;}};d([g("componentMetadataProvider")],Ir.prototype,"componentMetadataProvider",2),Ir=d([L("agComponentUtils")],Ir);var So=class extends R{postConstruct(){this.componentMetaData={dateComponent:{mandatoryMethodList:["getDate","setDate"],optionalMethodList:["afterGuiAttached","setInputPlaceholder","setInputAriaLabel","setDisabled","onParamsUpdated","refresh"]},detailCellRenderer:{mandatoryMethodList:[],optionalMethodList:["refresh"],functionAdapter:this.agComponentUtils.adaptCellRendererFunction.bind(this.agComponentUtils)},headerComponent:{mandatoryMethodList:[],optionalMethodList:["refresh"]},headerGroupComponent:{mandatoryMethodList:[],optionalMethodList:[]},loadingCellRenderer:{mandatoryMethodList:[],optionalMethodList:[],functionAdapter:this.agComponentUtils.adaptCellRendererFunction.bind(this.agComponentUtils)},loadingOverlayComponent:{mandatoryMethodList:[],optionalMethodList:["refresh"]},noRowsOverlayComponent:{mandatoryMethodList:[],optionalMethodList:["refresh"]},floatingFilterComponent:{mandatoryMethodList:["onParentModelChanged"],optionalMethodList:["afterGuiAttached","onParamsUpdated","refresh"]},cellRenderer:{mandatoryMethodList:[],optionalMethodList:["refresh","afterGuiAttached"],functionAdapter:this.agComponentUtils.adaptCellRendererFunction.bind(this.agComponentUtils)},cellEditor:{mandatoryMethodList:["getValue"],optionalMethodList:["isPopup","isCancelBeforeStart","isCancelAfterEnd","getPopupPosition","focusIn","focusOut","afterGuiAttached","refresh"]},innerRenderer:{mandatoryMethodList:[],optionalMethodList:["afterGuiAttached"],functionAdapter:this.agComponentUtils.adaptCellRendererFunction.bind(this.agComponentUtils)},fullWidthCellRenderer:{mandatoryMethodList:[],optionalMethodList:["refresh","afterGuiAttached"],functionAdapter:this.agComponentUtils.adaptCellRendererFunction.bind(this.agComponentUtils)},groupRowRenderer:{mandatoryMethodList:[],optionalMethodList:["afterGuiAttached"],functionAdapter:this.agComponentUtils.adaptCellRendererFunction.bind(this.agComponentUtils)},filter:{mandatoryMethodList:["isFilterActive","doesFilterPass","getModel","setModel"],optionalMethodList:["afterGuiAttached","afterGuiDetached","onNewRowsLoaded","getModelAsString","onFloatingFilterChanged","onAnyFilterChanged","refresh"]},statusPanel:{mandatoryMethodList:[],optionalMethodList:["refresh"]},toolPanel:{mandatoryMethodList:[],optionalMethodList:["refresh","getState"]},tooltipComponent:{mandatoryMethodList:[],optionalMethodList:[]},menuItem:{mandatoryMethodList:[],optionalMethodList:["setActive","select","setExpanded","configureDefaults"]}};}retrieve(e){return this.componentMetaData[e];}};d([g("agComponentUtils")],So.prototype,"agComponentUtils",2),d([T],So.prototype,"postConstruct",1),So=d([L("componentMetadataProvider")],So);var zp={"ag-theme-custom":{headerHeight:25,headerCellMinWidth:24,listItemHeight:20,rowHeight:25,chartMenuPanelWidth:220},"ag-theme-material":{headerHeight:56,headerCellMinWidth:48,listItemHeight:32,rowHeight:48,chartMenuPanelWidth:240},"ag-theme-balham":{headerHeight:32,headerCellMinWidth:24,listItemHeight:24,rowHeight:28,chartMenuPanelWidth:220}
1,"ag-theme-alpine":{headerHeight:48,headerCellMinWidth:36,listItemHeight:24,rowHeight:42,chartMenuPanelWidth:240},"ag-theme-quartz":{headerHeight:48,headerCellMinWidth:36,listItemHeight:24,rowHeight:42,chartMenuPanelWidth:260}},Tu={headerHeight:["ag-header-row"],headerCellMinWidth:["ag-header-cell"],listItemHeight:["ag-virtual-list-item"],rowHeight:["ag-row"],chartMenuPanelWidth:["ag-chart-docked-container"]},Cs=class extends R{constructor(){super(...arguments),this.calculatedSizes={},this.calculatedTheme=null;}postConstruct(){var e;const t=null!=(e=this.getTheme().el)?e:this.eGridDiv;this.addManagedPropertyListener("rowHeight",()=>this.refreshRowHeightVariable()),this.mutationObserver=new MutationObserver(()=>{this.calculatedSizes={},this.calculatedTheme=null,this.calculatedTheme=this.getTheme(),this.fireGridStylesChangedEvent();}),this.mutationObserver.observe(t||this.eGridDiv,{attributes:!0,attributeFilter:["class"]});}fireGridStylesChangedEvent(){this.eventService.dispatchEvent({type:c.EVENT_GRID_STYLES_CHANGED});}getSassVariable(e){const{themeFamily:t,el:i}=this.getTheme();if(t&&0===t.indexOf("ag-theme"))return this.calculatedSizes||(this.calculatedSizes={}),this.calculatedSizes[t]||(this.calculatedSizes[t]={}),this.calculatedSizes[t][e]??(this.calculatedSizes[t][e]=this.calculateValueForSassProperty(e,t,i),this.calculatedSizes[t][e]);}calculateValueForSassProperty(e,t,i){const s="ag-theme-"+(t.match("material")?"material":t.match("balham")?"balham":t.match("alpine")?"alpine":"custom"),o=zp[s][e],r=this.gos.getDocument();if(i||(i=this.eGridDiv),!Tu[e])return o;const n=Tu[e],l=r.createElement("div"),a=Array.from(i.classList);l.classList.add(t,...a),l.style.position="absolute";const u=n.reduce((p,f)=>{const m=r.createElement("div");return m.style.position="static",m.classList.add(f),p.appendChild(m),m;},l);let h=0;if(r.body){r.body.appendChild(l);const p=-1!==e.toLowerCase().indexOf("height")?"height":"width";h=parseInt(window.getComputedStyle(u)[p],10),r.body.removeChild(l);}return h||o;}isThemeDark(){const{theme:e}=this.getTheme();return!!e&&e.indexOf("dark")>=0;}chartMenuPanelWidth(){return this.getSassVariable("chartMenuPanelWidth");}getTheme(){if(this.calculatedTheme)return this.calculatedTheme;const e=/\bag-(material|(?:theme-([\w\-]*)))\b/g;let t=this.eGridDiv,i=null,s=[];for(;t;){if(i=e.exec(t.className),i){const r=t.className.match(e);r&&(s=r);break;}t=t.parentElement||void 0;}if(!i)return{allThemes:s};const o=i[0];return this.calculatedTheme={theme:o,el:t,themeFamily:o.replace(/-dark$/,""),allThemes:s},this.calculatedTheme;}getFromTheme(e,t){var i;return null!=(i=this.getSassVariable(t))?i:e;}getDefaultRowHeight(){return this.getFromTheme(25,"rowHeight");}getListItemHeight(){return this.getFromTheme(20,"listItemHeight");}refreshRowHeightVariable(){const e=this.eGridDiv.style.getPropertyValue("--ag-line-height").trim(),t=this.gos.get("rowHeight");if(null==t||isNaN(t)||!isFinite(t))return null!==e&&this.eGridDiv.style.setProperty("--ag-line-height",null),-1;const i=`${t}px`;return e!=i?(this.eGridDiv.style.setProperty("--ag-line-height",i),t):""!=e?parseFloat(e):-1;}getMinColWidth(){const e=this.getFromTheme(null,"headerCellMinWidth");return y(e)?Math.max(e,10):10;}destroy(){this.calculatedSizes=null,this.mutationObserver&&this.mutationObserver.disconnect(),super.destroy();}};d([g("eGridDiv")],Cs.prototype,"eGridDiv",2),d([T],Cs.prototype,"postConstruct",1),Cs=d([L("environment")],Cs);var vs=class extends R{constructor(){super(...arguments),this.scrollY=0,this.uiBodyHeight=0;}agWire(e){this.logger=e.create("RowContainerHeightService");}postConstruct(){this.addManagedListener(this.eventService,c.EVENT_BODY_HEIGHT_CHANGED,this.updateOffset.bind(this)),this.maxDivHeight=Na(),this.logger.log("maxDivHeight = "+this.maxDivHeight);}isStretching(){return this.stretching;}getDivStretchOffset(){return this.divStretchOffset;}updateOffset(){if(!this.stretching)return;const t=this.ctrlsService.getGridBodyCtrl().getScrollFeature().getVScrollPosition().top,i=this.getUiBodyHeight();(t!==this.scrollY||i!==this.uiBodyHeight)&&(this.scrollY=t,this.uiBodyHeight=i,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;this.logger.log(`Div Stretch Offset = ${t} (${this.pixelsToShave} * ${e})`),this.setDivStretchOffset(t);}setUiContainerHeight(e){e!==this.uiContainerHeight&&(this.uiContainerHeight=e,this.eventService.dispatchEvent({type:c.EVENT_ROW_CONTAINER_HEIGHT_CHANGED}));}clearOffset(){this.setUiContainerHeight(this.modelHeight),this.pixelsToShave=0,this.setDivStretchOffset(0);}setDivStretchOffset(e){const t="number"==typeof e?Math.floor(e):null;this.divStretchOffset!==t&&(this.divStretchOffset=t,this.eventService.dispatchEvent({type:c.EVENT_HEIGHT_SCALE_CHANGED}));}setModelHeight(e){this.modelHeight=e,this.stretching=null!=e&&this.maxDivHeight>0&&e>this.maxDivHeight,this.stretching?this.calculateOffset():this.clearOffset();}getUiContainerHeight(){return this.uiContainerHeight;}getRealPixelPosition(e){return e-this.divStretchOffset;}getUiBodyHeight(){const t=this.ctrlsService.getGridBodyCtrl().getScrollFeature
1().getVScrollPosition();return t.bottom-t.top;}getScrollPositionForPixel(e){if(this.pixelsToShave<=0)return e;const t=this.modelHeight-this.getUiBodyHeight();return this.maxScrollY*(e/t);}};d([g("ctrlsService")],vs.prototype,"ctrlsService",2),d([be(0,Ue("loggerFactory"))],vs.prototype,"agWire",1),d([T],vs.prototype,"postConstruct",1),vs=d([L("rowContainerHeightService")],vs);var Ii=class extends R{init(){this.addManagedPropertyListener("isRowSelectable",()=>this.updateSelectable());}updateSelectableAfterGrouping(){this.updateSelectable(!0);}updateSelectable(e=!1){const t=!!this.gos.get("rowSelection"),i=this.gos.get("isRowSelectable");if(!t||!i)return;const s=this.gos.get("groupSelectsChildren"),o="clientSide"===this.rowModel.getType()&&s,r=[],n=l=>{if(e&&!l.group)return;if(o&&l.group){const u=l.childrenAfterGroup.some(h=>!0===h.selectable);return void l.setRowSelectable(u,!0);}const a=!i||i(l);l.setRowSelectable(a,!0),!a&&l.isSelected()&&r.push(l);};o?new ho(!1,this.rowModel.getRootNode()).forEachChangedNodeDepthFirst(n,!0,!0):this.rowModel.forEachNode(n),r.length&&this.selectionService.setNodesSelected({nodes:r,newValue:!1,source:"selectableChanged"}),o&&this.selectionService instanceof Li&&this.selectionService.updateGroupsFromChildrenSelections("selectableChanged");}};d([g("rowModel")],Ii.prototype,"rowModel",2),d([g("selectionService")],Ii.prototype,"selectionService",2),d([T],Ii.prototype,"init",1),Ii=d([L("selectableService")],Ii);var ke=class extends V{constructor(){super(),this.previousAndFirstButtonsDisabled=!1,this.nextButtonDisabled=!1,this.lastButtonDisabled=!1,this.areListenersSetup=!1;}postConstruct(){const e=this.gos.get("enableRtl");this.setTemplate(this.getTemplate());const{btFirst:t,btPrevious:i,btNext:s,btLast:o}=this;this.activateTabIndex([t,i,s,o]),t.insertAdjacentElement("afterbegin",re(e?"last":"first",this.gos)),i.insertAdjacentElement("afterbegin",re(e?"next":"previous",this.gos)),s.insertAdjacentElement("afterbegin",re(e?"previous":"next",this.gos)),o.insertAdjacentElement("afterbegin",re(e?"first":"last",this.gos)),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.onPaginationChanged();}onPaginationChanged(){const t=this.gos.get("pagination")&&!this.gos.get("suppressPaginationPanel");this.setDisplayed(t),t&&(this.setupListeners(),this.enableOrDisableButtons(),this.updateRowLabels(),this.setCurrentPageLabel(),this.setTotalLabels(),this.onPageSizeRelatedOptionsChange());}onPageSizeRelatedOptionsChange(){this.pageSizeComp.toggleSelectDisplay(this.pageSizeComp.shouldShowPageSizeSelector());}setupListeners(){this.areListenersSetup||(this.addManagedListener(this.eventService,c.EVENT_PAGINATION_CHANGED,this.onPaginationChanged.bind(this)),[{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)}].forEach(e=>{const{el:t,fn:i}=e;this.addManagedListener(t,"click",i),this.addManagedListener(t,"keydown",s=>{(s.key===C.ENTER||s.key===C.SPACE)&&(s.preventDefault(),i());});}),this.areListenersSetup=!0);}onBtFirst(){this.previousAndFirstButtonsDisabled||this.paginationProxy.goToFirstPage();}setCurrentPageLabel(){const e=this.paginationProxy.getTotalPages()>0,t=this.paginationProxy.getCurrentPage();this.lbCurrent.textContent=this.formatNumber(e?t+1:0);}formatNumber(e){const t=this.gos.getCallback("paginationNumberFormatter");if(t)return t({value:e});const i=this.localeService.getLocaleTextFunc();return In(e,i("thousandSeparator",","),i("decimalSeparator","."));}getTemplate(){const e=this.localeService.getLocaleTextFunc(),t=e("page","Page"),i=e("to","to"),s=e("of","of"),o=e("firstPage","First Page"),r=e("previousPage","Previous Page"),n=e("nextPage","Next Page"),l=e("lastPage","Last Page"),a=this.getCompId();return`<div class="ag-paging-panel ag-unselectable" id="ag-${a}">\n <ag-page-size-selector ref="pageSizeComp"></ag-page-size-selector>
1\n <span class="ag-paging-row-summary-panel" role="status">\n <span id="ag-${a}-first-row" ref="lbFirstRowOnPage" class="ag-paging-row-summary-panel-number"></span>\n <span id="ag-${a}-to">${i}</span>\n <span id="ag-${a}-last-row" ref="lbLastRowOnPage" class="ag-paging-row-summary-panel-number"></span>\n <span id="ag-${a}-of">${s}</span>\n <span id="ag-${a}-row-count" ref="lbRecordCount" class="ag-paging-row-summary-panel-number"></span>\n </span>\n <span class="ag-paging-page-summary-panel" role="presentation">\n <div ref="btFirst" class="ag-button ag-paging-button" role="button" aria-label="${o}"></div>\n <div ref="btPrevious" class="ag-button ag-paging-button" role="button" aria-label="${r}"></div>\n <span class="ag-paging-description" role="status">\n <span id="ag-${a}-start-page">${t}</span>\n <span id="ag-${a}-start-page-number" ref="lbCurrent" class="ag-paging-number"></span>\n <span id="ag-${a}-of-page">${s}</span>\n <span id="ag-${a}-of-page-number" ref="lbTotal" class="ag-paging-number"></span>\n </span>\n <div ref="btNext" class="ag-button ag-paging-button" role="button" aria-label="${n}"></div>\n <div ref="btLast" class="ag-button ag-paging-button" role="button" aria-label="${l}"></div>\n </span>\n </div>`;}onBtNext(){this.nextButtonDisabled||this.paginationProxy.goToNextPage();}onBtPrevious(){this.previousAndFirstButtonsDisabled||this.paginationProxy.goToPreviousPage();}onBtLast(){this.lastButtonDisabled||this.paginationProxy.goToLastPage();}enableOrDisableButtons(){const e=this.paginationProxy.getCurrentPage(),t=this.paginationProxy.isLastPageFound(),i=this.paginationProxy.getTotalPages();this.previousAndFirstButtonsDisabled=0===e,this.toggleButtonDisabled(this.btFirst,this.previousAndFirstButtonsDisabled),this.toggleButtonDisabled(this.btPrevious,this.previousAndFirstButtonsDisabled);const s=this.isZeroPagesToDisplay();this.nextButtonDisabled=e===i-1||s,this.lastButtonDisabled=!t||s||e===i-1,this.toggleButtonDisabled(this.btNext,this.nextButtonDisabled),this.toggleButtonDisabled(this.btLast,this.lastButtonDisabled);}toggleButtonDisabled(e,t){fn(e,t),e.classList.toggle("ag-disabled",t);}updateRowLabels(){const e=this.paginationProxy.getCurrentPage(),t=this.paginationProxy.getPageSize(),i=this.paginationProxy.isLastPageFound(),s=this.paginationProxy.isLastPageFound()?this.paginationProxy.getMasterRowCount():null;let o,r;if(this.isZeroPagesToDisplay()?o=r=0:(o=t*e+1,r=o+t-1,i&&r>s&&(r=s)),this.lbFirstRowOnPage.textContent=this.formatNumber(o),this.rowNodeBlockLoader.isLoading()){const n=this.localeService.getLocaleTextFunc();this.lbLastRowOnPage.innerHTML=n("pageLastRowUnknown","?");}else this.lbLastRowOnPage.textContent=this.formatNumber(r);}isZeroPagesToDisplay(){const e=this.paginationProxy.isLastPageFound(),t=this.paginationProxy.getTotalPages();return e&&0===t;}setTotalLabels(){const e=this.paginationProxy.isLastPageFound(),t=this.paginationProxy.getTotalPages(),i=e?this.paginationProxy.getMasterRowCount():null;if(1===i){const s=this.paginationProxy.getRow(0);if(s&&s.group&&!s.groupData&&!s.aggData)return void this.setTotalLabelsToZero();}if(e)this.lbTotal.textContent=this.formatNumber(t),this.lbRecordCount.textContent=this.formatNumber(i);else{const s=this.localeService.getLocaleTextFunc()("more","more");this.lbTotal.innerHTML=s,this.lbRecordCount.innerHTML=s;}}setTotalLabelsToZero(){this.lbFirstRowOnPage.textContent=this.formatNumber(0),this.lbCurrent.textContent=this.formatNumber(0),this.lbLastRowOnPage.textContent=this.formatNumber(0),this.lbTotal.textContent=this.formatNumber(0),this.lbRecordCount.textContent=this.formatNumber(0);}};d([g("paginationProxy")],ke.prototype,"paginationProxy",2),d([g("rowNodeBlockLoader")],ke.prototype,"rowNodeBlockLoader",2),d([A("btFirst")],ke.prototype,"btFirst",2),d([A("btPrevious")],ke.prototype,"btPrevious",2),d([A("btNext")],ke.prototype,"btNext",2),d([A("btLast")],ke.prototype,"btLast",2),d([A("lbRecordCount")],ke.prototype,"lbRecordCount",2),d([A("lbFirstRowOnPage")],ke.prototype,"lbFirstRowOnPage",2),d([A("lbLastRowOnPage")],ke.prototype,"lbLastRowOnPage",2),d([A("lbCurrent")],ke.prototype,"lbCurrent",2),d([A("lbTotal")],ke.prototype,"lbTotal",2),d([A("pageSizeComp")],ke.prototype,"pageSizeComp",2),d([T],ke.prototype,"postConstruct",1);var Eo=class Rh extends V{constructor(){super(Rh.TEMPLATE),this.inProgress=!1,this.destroyRequested=!1;}updateLayoutClasses(t,i){const s=this.eOverlayWrapper.classList;s.toggle("ag-layout-auto-height",i.autoHeight),s.toggle("ag-layout-normal",i.normal),s.toggle("ag-layout-print",i.print);}postConstruct(){this.createManagedBean(new wr(this)),this.setDisplayed(!1,{skipAriaHidden:!0}),this.overlayService.registerOverlayWrapperComp(this);}setWrapperTypeClass(t){const i=this.eOverlayWrapper.classList;this.activeOverlayWrapperCssClass&&i.toggle(this.activeOverlayWrapperCssClass,!1),this.activeOverlayWrapperCssClass=t,i.toggle(t,!0);}showOverlay(t,i,s){this.inProgress||(this.setWrapperTypeClass(i),this.destroyActiveOverlay(),this.inProgress=!0,t&&t.then(o=>{this.inProgress=!1,this.eOverlayWrapper.appendChild(o.getGui()),this.activeOverlay=o,this.updateListenerDestroyFunc=s,this.destroyRequested&&(this.destroyRequested=!1,this.destroyActiveOverlay());}),this.setDisplayed(!0,{skipAriaHidden:!0}));}destroyActiveOverlay(){var t;this.inProgress?this.destroyRequested=!0:this.activeOverlay&&(this.activeOverlay=this.getContext().destroyBean(this.activeOverlay),null==(t=this.updateListenerDestroyFunc)||t.call(this),de(this.eOverlayWrapper));}hideOverlay(){this.destroyActiveOverlay(),this.setDisplayed(!1,{skipAriaHidden:!0});}destroy(){this.destroyActiveOverlay(),super.destroy();}};Eo.TEMPLATE='\n <div class="ag-overlay" role="presentation">\n <div class="ag-overlay-panel" role="presentation">\n <div class="ag-overlay-wrapper" ref="eOverlayWrapper" role="presentation"></div>\n </div>\n </div>',d([g("overlayService")],Eo.prototype,"overlayService",2),d([A("eOverlayWrapper")],Eo.prototype,"eOverlayWrapper",2),d([T],Eo.prototype,"postConstruct",1);var Kp=Eo,Gi=class extends R{getFirstRow(){let t,e=0;return this.pinnedRowModel.getPinnedTopRowCount()?t="top":this.rowModel.getRowCount()?(t=null,e=this.paginationProxy.getPageFirstRow()):this.pinnedRowModel.getPinnedBottomRowCount()&&(t="bottom"),void 0===t?null:{rowIndex:e,rowPinned:t};}getLastRow(){let e,t=null;const i=this.pinnedRowModel.getPinnedBottomRowCount(),s=this.pinnedRowModel.getPinnedTopRowCount();return i?(t="bottom",e=i-1):this.rowModel.getRowCount()?(t=null,e=this.paginationProxy.getPageLastRow()):s&&(t="top",e=s-1),void 0===e?null:{rowIndex:e,rowPinned:t};}getRowNode(e){switch(e.rowPinned){case"top":return this.pinnedRowModel.getPinnedTopRowData()[e.rowIndex];case"bottom":return this.pinnedRowModel.getPinnedBottomRowData()[e.rowIndex];default:return this.rowModel.getRow(e.rowIndex);}}sameRow(e,t){return!e&&!t||!(e&&!t||!e&&t)&&e.rowIndex===t.rowIndex&&e.rowPinned==t.rowPinned;}before(e,t){switch(e.rowPinned){case"top":if("top"!==t.rowPinned)return!0;break;case"bottom":if("bottom"!==t.rowPinned)return!1;break;default:if(y(t.rowPinned))return"top"!==t.rowPinned;}return e.rowIndex<t.rowIndex;}};d([g("rowModel")],Gi.prototype,"rowModel",2),d([g("pinnedRowModel")],Gi.prototype,"pinnedRowModel",2),d([g("paginationProxy")],Gi.prototype,"paginationProxy",2),Gi=d([L("rowPositionUtils")],Gi);var Gr=class extends R{createId(e){const{rowIndex:t,rowPinned:i,column:s}=e;return this.createIdFromValues({rowIndex:t,column:s,rowPinned:i});}createIdFromValues(e){const{rowIndex:t,rowPinned:i,column:s}=e;return`${t}.${i??"null"}.${s.getId()}`;}equals(e,t){return e.column===t.column&&e.rowPinned===t.rowPinned&&e.rowIndex===t.rowIndex;}};Gr=d([L("cellPositionUtils")],Gr);var yo=class{constructor(e){this.cellValueChanges=e;}},Nl=class extends yo{constructor(e,t,i,s){super(e),this.initialRange=t,this.finalRange=i,this.ranges=s;}},Au=class Dh{constructor(t){this.actionStack=[],this.maxStackSize=t||Dh.DEFAULT_STACK_SIZE,this.actionStack=new Array(this.maxStackSize);}pop(){return this.actionStack.pop();}push(t){t.cellValueChanges&&t.cellValueChanges.length>0&&(this.actionStack.length===this.maxStackSize&&this.actionStack.shift(),this.actionStack.push(t));}clear(){this.actionStack=[];}getCurrentStackSize(){return this.actionStack.length;}};Au.DEFAULT_STACK_SIZE=10;var Fu=Au,wt=class extends R{constructor(){super(...arguments),this.cellValueChanges=[],this.activeCellEdit=null,this.activeRowEdit=null,this.isPasting=!1,this.isRangeInAction=!1,this.onCellValueChanged=e=>{const t={column:e.column,rowIndex:e.rowIndex,rowPinned:e.rowPinned},i=null!==this.activeCellEdit&&this.cellPositionUtils.equals(this.activeCellEdit,t),s=null!==this.activeRowEdit&&this.rowPositionUtils.sameRow(this.activeRowEdit,t);if(!(i||s||this.isPasting||this.isRangeInAction))return;const{rowPinned:r,rowIndex:n,column:l,oldValue:a,value:u}=e,h={rowPinned:r,rowIndex:n,columnId:l.getColId(),newValue:u,oldValue:a};this.cellValueChanges.push(h);},this.clearStacks=()=>{this.undoStack.clear(),this.redoStack.clear();};}init(){if(!this.gos.get("undoRedoCellEditing"))return;const e=this.gos.get("undoRedoCellEditingLimit");e<=0||(this.undoStack=new Fu(e),this.redoStack=new Fu(e),this.addRowEditingListeners(),this.addCellEditingListeners(),this.addPasteListeners(),this.addFillListeners(),this.addCellKeyListeners(),this.addManagedListener(this.eventService,c.EVENT_CELL_VALUE_CHANGED,this.onCellValueChanged),this.addManagedListener(this.eventService,c.EVENT_MODEL_UPDATED,t=>{t.keepUndoRedoStack||this.clearStacks();}),this.addManagedListener(this.eventService,c.EVENT_COLUMN_PIVOT_MODE_CHANGED,this.clearStacks),this.addManagedListener(this.eventService,c.EVENT_NEW_COLUMNS_LOADED,this.clearStacks),this.addManagedListener(this.eventService,c.EVENT_COLUMN_GROUP_OPENED,this.clearStacks),this.addManagedListener(this.eventService,c.EVENT_COLUMN_ROW_GROUP_CHANGED,this.clearStacks),this.addManagedListener(this.eventService,c.EVENT_COLUMN_MOVED,this.clearStacks),this.addManagedListener(this.eventService,c.EVENT_COLUMN_PINNED,this.clearStacks),this.addManagedListener(this.eventService,c.EVENT_COLUMN_VISIBLE,this.clearStacks),this.addManagedListener(this.eventService,c.EVENT_ROW_DRAG_END,this.clearStacks),this.ctrlsService.whenReady(t=>{this.gridBodyCtrl=t.gridBodyCtrl;}));}getCurrentUndoStackSize(){return this.undoStack?this.undoStack.getCurrentStackSize():0;}getCurrentRedoStackSize(){return this.redoStack?this.redoStack.getCurrentStackSize():0;}undo(e){this.eventService.dispatchEvent({type:c.EVENT_UNDO_STARTED,source:e});const i=this.undoRedo(this.undoStack,this.redoStack,"initialRange","oldValue","undo");this.eventService.dispatchEvent({type:c.EVENT_UNDO_ENDED,source:e,operationPerformed:i});}redo(e){this.eventService.dispatchEvent({type:c.EVENT_REDO_STARTED,source:e});const i=this.undoRedo(this.redoStack,this.undoStack,"finalRange","newValue","redo");this.eventService.dispatchEvent({type:c.EVENT_REDO_ENDED,source:e,operationPerformed:i});}undoRedo(e,t,i,s,o){if(!e)return!1;const r=e.pop();return!(!r||!r.cellValueChanges||(this.processAction(r,n=>n[s],o),r instanceof Nl?this.processRange(this.rangeService,r.ranges||[r[i]]):this.processCell(r.cellValueChanges),t.push(r),
10));}processAction(e,t,i){e.cellValueChanges.forEach(s=>{const{rowIndex:o,rowPinned:r,columnId:n}=s,a=this.rowPositionUtils.getRowNode({rowIndex:o,rowPinned:r});a.displayed&&a.setDataValue(n,t(s),i);});}processRange(e,t){let i;e.removeAllCellRanges(!0),t.forEach((s,o)=>{if(!s)return;const r=s.startRow,n=s.endRow;o===t.length-1&&(i={rowPinned:r.rowPinned,rowIndex:r.rowIndex,columnId:s.startColumn.getColId()},this.setLastFocusedCell(i)),e.addCellRange({rowStartIndex:r.rowIndex,rowStartPinned:r.rowPinned,rowEndIndex:n.rowIndex,rowEndPinned:n.rowPinned,columnStart:s.startColumn,columns:s.columns});});}processCell(e){const t=e[0],{rowIndex:i,rowPinned:s}=t,r=this.rowPositionUtils.getRowNode({rowIndex:i,rowPinned:s});this.setLastFocusedCell({rowPinned:t.rowPinned,rowIndex:r.rowIndex,columnId:t.columnId},this.rangeService);}setLastFocusedCell(e,t){const{rowIndex:i,columnId:s,rowPinned:o}=e,r=this.gridBodyCtrl.getScrollFeature(),n=this.columnModel.getGridColumn(s);if(!n)return;r.ensureIndexVisible(i),r.ensureColumnVisible(n);const l={rowIndex:i,column:n,rowPinned:o};this.focusService.setFocusedCell(x(M({},l),{forceBrowserFocus:!0})),t?.setRangeToCell(l);}addRowEditingListeners(){this.addManagedListener(this.eventService,c.EVENT_ROW_EDITING_STARTED,e=>{this.activeRowEdit={rowIndex:e.rowIndex,rowPinned:e.rowPinned};}),this.addManagedListener(this.eventService,c.EVENT_ROW_EDITING_STOPPED,()=>{const e=new yo(this.cellValueChanges);this.pushActionsToUndoStack(e),this.activeRowEdit=null;});}addCellEditingListeners(){this.addManagedListener(this.eventService,c.EVENT_CELL_EDITING_STARTED,e=>{this.activeCellEdit={column:e.column,rowIndex:e.rowIndex,rowPinned:e.rowPinned};}),this.addManagedListener(this.eventService,c.EVENT_CELL_EDITING_STOPPED,e=>{if(this.activeCellEdit=null,e.valueChanged&&!this.activeRowEdit&&!this.isPasting&&!this.isRangeInAction){const i=new yo(this.cellValueChanges);this.pushActionsToUndoStack(i);}});}addPasteListeners(){this.addManagedListener(this.eventService,c.EVENT_PASTE_START,()=>{this.isPasting=!0;}),this.addManagedListener(this.eventService,c.EVENT_PASTE_END,()=>{const e=new yo(this.cellValueChanges);this.pushActionsToUndoStack(e),this.isPasting=!1;});}addFillListeners(){this.addManagedListener(this.eventService,c.EVENT_FILL_START,()=>{this.isRangeInAction=!0;}),this.addManagedListener(this.eventService,c.EVENT_FILL_END,e=>{const t=new Nl(this.cellValueChanges,e.initialRange,e.finalRange);this.pushActionsToUndoStack(t),this.isRangeInAction=!1;});}addCellKeyListeners(){this.addManagedListener(this.eventService,c.EVENT_KEY_SHORTCUT_CHANGED_CELL_START,()=>{this.isRangeInAction=!0;}),this.addManagedListener(this.eventService,c.EVENT_KEY_SHORTCUT_CHANGED_CELL_END,()=>{let e;e=this.rangeService&&this.gos.get("enableRangeSelection")?new Nl(this.cellValueChanges,void 0,void 0,[...this.rangeService.getCellRanges()]):new yo(this.cellValueChanges),this.pushActionsToUndoStack(e),this.isRangeInAction=!1;});}pushActionsToUndoStack(e){this.undoStack.push(e),this.cellValueChanges=[],this.redoStack.clear();}};d([g("focusService")],wt.prototype,"focusService",2),d([g("ctrlsService")],wt.prototype,"ctrlsService",2),d([g("cellPositionUtils")],wt.prototype,"cellPositionUtils",2),d([g("rowPositionUtils")],wt.prototype,"rowPositionUtils",2),d([g("columnModel")],wt.prototype,"columnModel",2),d([Q("rangeService")],wt.prototype,"rangeService",2),d([T],wt.prototype,"init",1),wt=d([L("undoRedoService")],wt);var ws=class extends R{findHeader(e,t){let i,s;if(e.column instanceof pe?i=this.columnModel.getDisplayedGroupAtDirection(e.column,t):(s=`getDisplayedCol${t}`,i=this.columnModel[s](e.column)),!i)return;let{headerRowIndex:o}=e;if("filter"!==this.getHeaderRowType(o)){const l=[i];for(;i.getParent();)i=i.getParent(),l.push(i);i=l[l.length-1-o];}const{column:r,headerRowIndex:n}=this.getHeaderIndexToFocus(i,o);return{column:r,headerRowIndex:n};}getHeaderIndexToFocus(e,t){let i;if(e instanceof pe&&this.isAnyChildSpanningHeaderHeight(e)&&e.isPadding()){const s=e;i=s.getLeafColumns()[0];let o=i;for(;o!==s;)t++,o=o.getParent();}return{column:i||e,headerRowIndex:t};}isAnyChildSpanningHeaderHeight(e){return!!e&&e.getLeafColumns().some(t=>t.isSpanHeaderHeight());}getColumnVisibleParent(e,t){const i=this.getHeaderRowType(t),o="column"===i;let r="filter"===i?e:e.getParent(),n=t-1,l=n;if(o&&this.isAnyChildSpanningHeaderHeight(e.getParent())){for(;r&&r.isPadding();)r=r.getParent(),n--;l=n,n<0&&(r=e,n=t,l=void 0);}return{column:r,headerRowIndex:n,headerRowIndexWithoutSpan:l};}getColumnVisibleChild(e,t,i="After"){let o=e,r=t+1,n=r;if("group"===this.getHeaderRowType(t)){const l=e.getDisplayedLeafColumns(),a="After"===i?l[0]:Y(l),u=[];let h=a;for(;h.getParent()!==e;)h=h.getParent(),u.push(h);if(o=a,a.isSpanHeaderHeight())for(let p=u.length-1;p>=0;p--){const f=u[p];if(!f.isPadding()){o=f;break;}r++;}else o=Y(u),o||(o=a);}return{column:o,headerRowIndex:r,headerRowIndexWithoutSpan:n};}getHeaderRowType(e){const t=this.ctrlsService.getHeaderRowContainerCtrl();if(t)return t.getRowType(e);}findColAtEdgeForHeaderRow(e,t){const i=this.columnModel.getAllDisplayedColumns(),s=i["start"===t?0:i.length-1];if(!s)return;const r=this.ctrlsService.getHeaderRowContainerCtrl(s.getPinned()).getRowType(e);return"group"==r?{headerRowIndex:e,column:this.columnModel.getColumnGroupAtLevel(s,e)}:{headerRowIndex:null==r?-1:e,column:s};}};d([g("columnModel")],ws.prototype,"columnModel",2),d([g("ctrlsService")],ws.prototype,"ctrlsService",2),ws=d([L("headerPositionUtils")],ws);var xl=class{buildColumnDefs(e,t,i){const s=[],o={};return e.forEach(r=>{let l=!0,a=this.createDefFromColumn(r,t,i),u=r.getOriginalParent(),h=null;for(;u;){let p=null;if(u.isPadding()){u=u.getOriginalParent();continue;}const f=o[u.getGroupId()];if(f){f.children.push(a),l=!1;break;}if(p=this.createDefFromGroup(u),p&&(p.children=[a],o[p.groupId]=p,a=p,u=u.getOriginalParent()),null!=u&&h===u){l=!1;break;}h=u;}l&&s.push(a);}),s;}createDefFromGroup(e){const t=Bo(e.getColGroupDef(),["children"]);return t&&(t.groupId=e.getGroupId()),t;}createDefFromColumn(e,t,i){const s=Bo(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()?i.indexOf(e):null,s.aggFunc=e.isValueActive()?e.getAggFunc():null,s.hide=!e.isVisible()||void 0,s.pinned=e.isPinned()?e.getPinned():null,s.sort=e.getSort()?e.getSort():null,
1s.sortIndex=null!=e.getSortIndex()?e.getSortIndex():null,s;}};xl=d([L("columnDefFactory")],xl);var Ro=class{getInitialRowClasses(e){const t=[];return y(e.extraCssClass)&&t.push(e.extraCssClass),t.push("ag-row"),t.push(e.rowFocused?"ag-row-focus":"ag-row-no-focus"),e.fadeRowIn&&t.push("ag-opacity-zero"),t.push(e.rowIsEven?"ag-row-even":"ag-row-odd"),e.rowNode.isRowPinned()&&t.push("ag-row-pinned"),e.rowNode.isSelected()&&t.push("ag-row-selected"),e.rowNode.footer&&t.push("ag-row-footer"),t.push("ag-row-level-"+e.rowLevel),e.rowNode.stub&&t.push("ag-row-loading"),e.fullWidthRow&&t.push("ag-full-width-row"),e.expandable&&(t.push("ag-row-group"),t.push(e.rowNode.expanded?"ag-row-group-expanded":"ag-row-group-contracted")),e.rowNode.dragging&&t.push("ag-row-dragging"),an(t,this.processClassesFromGridOptions(e.rowNode)),an(t,this.preProcessRowClassRules(e.rowNode)),t.push(e.printLayout?"ag-row-position-relative":"ag-row-position-absolute"),e.firstRowOnPage&&t.push("ag-row-first"),e.lastRowOnPage&&t.push("ag-row-last"),e.fullWidthRow&&("left"===e.pinned&&t.push("ag-cell-last-left-pinned"),"right"===e.pinned&&t.push("ag-cell-first-right-pinned")),t;}processClassesFromGridOptions(e){const t=[],i=r=>{"string"==typeof r?t.push(r):Array.isArray(r)&&r.forEach(n=>t.push(n));},s=this.gos.get("rowClass");if(s){if("function"==typeof s)return console.warn("AG Grid: rowClass should not be a function, please use getRowClass instead"),[];i(s);}const o=this.gos.getCallback("getRowClass");return o&&i(o({data:e.data,node:e,rowIndex:e.rowIndex})),t;}preProcessRowClassRules(e){const t=[];return this.processRowClassRules(e,i=>{t.push(i);},i=>{}),t;}processRowClassRules(e,t,i){const s=this.gos.addGridCommonParams({data:e.data,node:e,rowIndex:e.rowIndex});this.stylingService.processClassRules(void 0,this.gos.get("rowClassRules"),s,t,i);}calculateRowLevel(e){return e.group?e.level:e.parent?e.parent.level+1:0;}};d([g("stylingService")],Ro.prototype,"stylingService",2),d([g("gridOptionsService")],Ro.prototype,"gos",2),Ro=d([L("rowCssClassCalculator")],Ro);var Ni=class extends R{init(){this.isAccentedSort=this.gos.get("accentedSort"),this.primaryColumnsSortGroups=this.gos.isColumnsSortingCoupledToGroup(),this.addManagedPropertyListener("accentedSort",e=>this.isAccentedSort=e.currentValue),this.addManagedPropertyListener("autoGroupColumnDef",()=>this.primaryColumnsSortGroups=this.gos.isColumnsSortingCoupledToGroup());}doFullSort(e,t){const s=e.map((o,r)=>({currentPos:r,rowNode:o}));return s.sort(this.compareRowNodes.bind(this,t)),s.map(o=>o.rowNode);}compareRowNodes(e,t,i){const s=t.rowNode,o=i.rowNode;for(let r=0,n=e.length;r<n;r++){const l=e[r],a="desc"===l.sort,u=this.getValue(s,l.column),h=this.getValue(o,l.column);let p;const f=this.getComparator(l,s);if(p=f?f(u,h,s,o,a):B.defaultComparator(u,h,this.isAccentedSort),!isNaN(p)&&0!==p)return"asc"===l.sort?p:-1*p;}return t.currentPos-i.currentPos;}getComparator(e,t){const i=e.column,s=i.getColDef().comparator;if(null!=s)return s;if(!i.getColDef().showRowGroup)return;const o=!t.group&&i.getColDef().field;if(!o)return;const r=this.columnModel.getPrimaryColumn(o);return r?r.getColDef().comparator:void 0;}getValue(e,t){var i,s;if(!this.primaryColumnsSortGroups)return this.valueService.getValue(t,e,!1,!1);if(e.rowGroupColumn===t){if(this.gos.isGroupUseEntireRow(this.columnModel.isPivotActive())){const l=null==(i=e.allLeafChildren)?void 0:i[0];return l?this.valueService.getValue(t,l,!1,!1):void 0;}const n=this.columnModel.getGroupDisplayColumnForGroup(t.getId());return n?null==(s=e.groupData)?void 0:s[n.getId()]:void 0;}return e.group&&t.getColDef().showRowGroup?void 0:this.valueService.getValue(t,e,!1,!1);}};d([g("valueService")],Ni.prototype,"valueService",2),d([g("columnModel")],Ni.prototype,"columnModel",2),d([T],Ni.prototype,"init",1),Ni=d([L("rowNodeSorter")],Ni);var Ss=class extends R{constructor(){super(...arguments),this.params={},this.ready=!1,this.readyCallbacks=[];}checkReady(){const e=this.params;this.ready=null!=e.gridCtrl&&null!=e.gridBodyCtrl&&null!=e.center&&null!=e.left&&null!=e.right&&null!=e.bottomCenter&&null!=e.bottomLeft&&null!=e.bottomRight&&null!=e.topCenter&&null!=e.topLeft&&null!=e.topRight&&null!=e.stickyTopCenter&&null!=e.stickyTopLeft&&null!=e.stickyTopRight&&null!=e.stickyBottomCenter&&null!=e.stickyBottomLeft&&null!=e.stickyBottomRight&&null!=e.centerHeader&&null!=e.leftHeader&&null!=e.rightHeader&&null!=e.fakeHScrollComp&&null!=e.fakeVScrollComp&&null!=e.gridHeaderCtrl,this.ready&&(this.readyCallbacks.forEach(t=>t(e)),this.readyCallbacks.length=0);}whenReady(e){this.ready?e(this.params):this.readyCallbacks.push(e);}register(e,t){this.params[e]=t,this.checkReady();}registerHeaderContainer(e,t){switch(t){case"left":this.params.leftHeader=e;break;case"right":this.params.rightHeader=e;break;default:this.params.centerHeader=e;}this.checkReady();}get(e){return this.params[e];}getParams(){return this.params;}getGridBodyCtrl(){return this.params.gridBodyCtrl;}getHeaderRowContainerCtrls(){return[this.params.leftHeader,this.params.rightHeader,this.params.centerHeader];}getHeaderRowContainerCtrl(e){switch(e){case"left":return this.params.leftHeader;case"right":return this.params.rightHeader;default:return this.params.centerHeader;}}};Ss.NAME="ctrlsService",Ss=d([L(Ss.NAME)],Ss);var Ol=class extends R{constructor(){super(...arguments),this.registry={};}register(e){this.registry[e.controllerName]=e.controllerClass;}getInstance(e){const t=this.registry[e];if(null!=t)return new t();}}
1;Ol=d([L("ctrlsFactory")],Ol);var xi=class extends V{constructor(e,t){super(e),this.direction=t,this.hideTimeout=null;}postConstruct(){this.addManagedListener(this.eventService,c.EVENT_SCROLL_VISIBILITY_CHANGED,this.onScrollVisibilityChanged.bind(this)),this.onScrollVisibilityChanged(),this.addOrRemoveCssClass("ag-apple-scrollbar",Pn()||Pt());}initialiseInvisibleScrollbar(){void 0===this.invisibleScrollbar&&(this.invisibleScrollbar=Mn(),this.invisibleScrollbar&&(this.hideAndShowInvisibleScrollAsNeeded(),this.addActiveListenerToggles()));}addActiveListenerToggles(){const i=this.getGui();["mouseenter","mousedown","touchstart"].forEach(s=>this.addManagedListener(i,s,()=>this.addOrRemoveCssClass("ag-scrollbar-active",!0))),["mouseleave","touchend"].forEach(s=>this.addManagedListener(i,s,()=>this.addOrRemoveCssClass("ag-scrollbar-active",!1)));}onScrollVisibilityChanged(){void 0===this.invisibleScrollbar&&this.initialiseInvisibleScrollbar(),this.animationFrameService.requestAnimationFrame(()=>this.setScrollVisible());}hideAndShowInvisibleScrollAsNeeded(){this.addManagedListener(this.eventService,c.EVENT_BODY_SCROLL,e=>{e.direction===this.direction&&(null!==this.hideTimeout&&(window.clearTimeout(this.hideTimeout),this.hideTimeout=null),this.addOrRemoveCssClass("ag-scrollbar-scrolling",!0));}),this.addManagedListener(this.eventService,c.EVENT_BODY_SCROLL_END,()=>{this.hideTimeout=window.setTimeout(()=>{this.addOrRemoveCssClass("ag-scrollbar-scrolling",!1),this.hideTimeout=null;},400);});}attemptSettingScrollPosition(e){const t=this.getViewport();en(()=>xe(t),()=>this.setScrollPosition(e),100);}getViewport(){return this.eViewport;}getContainer(){return this.eContainer;}onScrollCallback(e){this.addManagedListener(this.getViewport(),"scroll",e);}};d([A("eViewport")],xi.prototype,"eViewport",2),d([A("eContainer")],xi.prototype,"eContainer",2),d([g("scrollVisibleService")],xi.prototype,"scrollVisibleService",2),d([g("ctrlsService")],xi.prototype,"ctrlsService",2),d([g("animationFrameService")],xi.prototype,"animationFrameService",2);var Oi=class bh extends xi{constructor(){super(bh.TEMPLATE,"horizontal");}postConstruct(){super.postConstruct();const t=this.setFakeHScrollSpacerWidths.bind(this);this.addManagedListener(this.eventService,c.EVENT_DISPLAYED_COLUMNS_CHANGED,t),this.addManagedListener(this.eventService,c.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,t),this.addManagedListener(this.eventService,c.EVENT_PINNED_ROW_DATA_CHANGED,this.onPinnedRowDataChanged.bind(this)),this.addManagedPropertyListener("domLayout",t),this.ctrlsService.register("fakeHScrollComp",this),this.createManagedBean(new ts(i=>this.eContainer.style.width=`${i}px`)),this.addManagedPropertyListeners(["suppressHorizontalScroll"],this.onScrollVisibilityChanged.bind(this));}initialiseInvisibleScrollbar(){void 0===this.invisibleScrollbar&&(this.enableRtl=this.gos.get("enableRtl"),super.initialiseInvisibleScrollbar(),this.invisibleScrollbar&&this.refreshCompBottom());}onPinnedRowDataChanged(){this.refreshCompBottom();}refreshCompBottom(){if(!this.invisibleScrollbar)return;const t=this.pinnedRowModel.getPinnedBottomTotalHeight();this.getGui().style.bottom=`${t}px`;}onScrollVisibilityChanged(){super.onScrollVisibilityChanged(),this.setFakeHScrollSpacerWidths();}setFakeHScrollSpacerWidths(){const t=this.scrollVisibleService.isVerticalScrollShowing();let i=this.columnModel.getDisplayedColumnsRightWidth();const s=!this.enableRtl&&t,o=this.gos.getScrollbarWidth();s&&(i+=o),et(this.eRightSpacer,i),this.eRightSpacer.classList.toggle("ag-scroller-corner",i<=o);let r=this.columnModel.getDisplayedColumnsLeftWidth();this.enableRtl&&t&&(r+=o),et(this.eLeftSpacer,r),this.eLeftSpacer.classList.toggle("ag-scroller-corner",r<=o);}setScrollVisible(){const t=this.scrollVisibleService.isHorizontalScrollShowing(),i=this.invisibleScrollbar,s=this.gos.get("suppressHorizontalScroll"),o=t&&this.gos.getScrollbarWidth()||0,n=s?0:0===o&&i?16:o;this.addOrRemoveCssClass("ag-scrollbar-invisible",i),pi(this.getGui(),n),pi(this.eViewport,n),pi(this.eContainer,n),this.setDisplayed(t,{skipAriaHidden:!0});}getScrollPosition(){return ks(this.getViewport(),this.enableRtl);}setScrollPosition(t){xe(this.getViewport())||this.attemptSettingScrollPosition(t),Bs(this.getViewport(),t,this.enableRtl);}};Oi.TEMPLATE='<div class="ag-body-horizontal-scroll" aria-hidden="true">\n <div class="ag-horizontal-left-spacer" ref="eLeftSpacer"></div>\n <div class="ag-body-horizontal-scroll-viewport" ref="eViewport">\n <div class="ag-body-horizontal-scroll-container" ref="eContainer"></div>\n </div>\n <div class="ag-horizontal-right-spacer" ref="eRightSpacer"></div>\n </div>',d([A("eLeftSpacer")],Oi.prototype,"eLeftSpacer",2),d([A("eRightSpacer")],Oi.prototype,"eRightSpacer",2),d([g("columnModel")],Oi.prototype,"columnModel",2),d([g("pinnedRowModel")],Oi.prototype,"pinnedRowModel",2),d([T],Oi.prototype,"postConstruct",1);var $p=Oi,Do=class extends R{postConstruct(){const e=this.checkContainerWidths.bind(this);this.addManagedListener(this.eventService,c.EVENT_DISPLAYED_COLUMNS_CHANGED,e),this.addManagedListener(this.eventService,c.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,e),this.addManagedPropertyListener("domLayout",e);}checkContainerWidths(){const e=this.gos.isDomLayout("print"),t=e?0:this.columnModel.getDisplayedColumnsLeftWidth(),i=e?0:this.columnModel.getDisplayedColumnsRightWidth();t!=this.leftWidth&&(this.leftWidth=t,this.eventService.dispatchEvent({type:c.EVENT_LEFT_PINNED_WIDTH_CHANGED})),i!=this.rightWidth&&(this.rightWidth=i,this.eventService.dispatchEvent({type:c.EVENT_RIGHT_PINNED_WIDTH_CHANGED}));}getPinnedRightWidth(){return this.rightWidth;}getPinnedLeftWidth(){return this.leftWidth;}};d([g("columnModel")],Do.prototype,"columnModel",2),d([T],Do.prototype,"postConstruct",1),Do=d([L("pinnedWidthService")],Do);var Es=class extends R{constructor(){super(...arguments),this.events=[];}postConstruct(){"clientSide"==this.rowModel.getType()&&(this.clientSideRowModel=this.rowModel);}dispatchExpanded(e,t){if(null==this.clientSideRowModel)return void this.eventService.dispatchEvent(e);this.events.push(e);const i=()=>{this.clientSideRowModel&&this.clientSideRowModel.onRowGroupOpened(),this.events.forEac
1h(s=>this.eventService.dispatchEvent(s)),this.events=[];};t?i():(null==this.dispatchExpandedDebounced&&(this.dispatchExpandedDebounced=this.animationFrameService.debounce(i)),this.dispatchExpandedDebounced());}};d([g("animationFrameService")],Es.prototype,"animationFrameService",2),d([g("rowModel")],Es.prototype,"rowModel",2),d([T],Es.prototype,"postConstruct",1),Es=d([L("rowNodeEventThrottle")],Es);var ri=(e,t)=>{var i;return"clientSide"===(null!=(i=t.rowModelType)?i:"clientSide")?{module:"@ag-grid-enterprise/row-grouping"}:null;},jp={enableRowGroup:ri,rowGroup:ri,rowGroupIndex:ri,enablePivot:ri,enableValue:ri,pivot:ri,pivotIndex:ri,aggFunc:ri,cellEditor:e=>"agRichSelect"===e.cellEditor||"agRichSelectCellEditor"===e.cellEditor?{module:"@ag-grid-enterprise/rich-select"}:null,menuTabs:e=>{var t;const i=["columnsMenuTab","generalMenuTab"];return null!=(t=e.menuTabs)&&t.some(s=>i.includes(s))?{module:"@ag-grid-enterprise/menu"}:null;},columnsMenuParams:{module:["@ag-grid-enterprise/menu","@ag-grid-enterprise/column-tool-panel"]},columnChooserParams:{module:["@ag-grid-enterprise/menu","@ag-grid-enterprise/column-tool-panel"]},headerCheckboxSelection:{supportedRowModels:["clientSide","serverSide"],dependencies:(e,{rowSelection:t})=>"multiple"===t?null:"headerCheckboxSelection is only supported with rowSelection=multiple"},headerCheckboxSelectionFilteredOnly:{supportedRowModels:["clientSide"],dependencies:(e,{rowSelection:t})=>"multiple"===t?null:"headerCheckboxSelectionFilteredOnly is only supported with rowSelection=multiple"},headerCheckboxSelectionCurrentPageOnly:{supportedRowModels:["clientSide"],dependencies:(e,{rowSelection:t})=>"multiple"===t?null:"headerCheckboxSelectionCurrentPageOnly is only supported with rowSelection=multiple"},children:()=>ys},ys={objectName:"colDef",allProperties:Object.keys({headerName:void 0,columnGroupShow: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,cellClass:void 0,showRowGroup:void 0,filter:void 0,initialAggFunc:void 0,defaultAggFunc:void 0,aggFunc: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,columnsMenuParams: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,suppressCellFlash: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,suppressMenu: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,getQuickFilterText:void 0,onCellValueChanged:void 0,onCellClicked:void 0,onCellDoubleClicked:void 0,onCellContextMenu:void 0,rowDragText:void 0,tooltipValueGetter:void 0,cellRendererSelector:void 0,cellEditorSelector:void 0,suppressS
1panHeaderHeight: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}),docsUrl:"column-properties/",deprecations:{columnsMenuParams:{version:"31.1",message:"Use `columnChooserParams` instead."},suppressMenu:{version:"31.1",message:"Use `suppressHeaderMenuButton` instead."},suppressCellFlash:{version:"31.2",message:"Use `enableCellChangeFlash={false}` in the ColDef"},dndSource:{version:"31.2",message:"This feature has been replaced by `Row Dragging to an External DropZone`."},dndSourceOnRowDrag:{version:"31.2",message:"This feature has been replaced by `Row Dragging to an External DropZone`."}},validations:jp},Zp={suppressContextMenu:!1,preventDefaultOnContextMenu:!1,allowContextMenuWithControlKey:!1,suppressMenuHide:!1,enableBrowserTooltips:!1,tooltipTrigger:"hover",tooltipShowDelay:2e3,tooltipHideDelay:1e4,tooltipMouseTrack:!1,tooltipShowMode:"standard",tooltipInteraction:!1,copyHeadersToClipboard:!1,copyGroupHeadersToClipboard:!1,clipboardDelimiter:"\t",suppressCopyRowsToClipboard:!1,suppressCopySingleCellRanges:!1,suppressLastEmptyLineOnPaste:!1,suppressClipboardPaste:!1,suppressClipboardApi:!1,suppressCutToClipboard:!1,maintainColumnOrder:!1,suppressFieldDotNotation:!1,allowDragFromColumnsToolPanel:!1,suppressMovableColumns:!1,suppressColumnMoveAnimation:!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,suppressChartToolPanelsButton:!1,masterDetail:!1,keepDetailRows:!1,keepDetailRowsCount:10,detailRowAutoHeight:!1,tabIndex:0,rowBuffer:10,valueCache:!1,valueCacheNeverExpires:!1,enableCellExpressions:!1,suppressTouch:!1,suppressFocusAfterRefresh:!1,suppressAsyncEvents:!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,enableCellChangeFlash:!1,cellFlashDelay:500,cellFlashDuration:500,cellFadeDelay:1e3,cellFadeDuration:1e3,allowShowChangeAfterFilter:!1,domLayout:"normal",ensureDomOrder:!1,enableRtl:!1,suppressColumnVirtualisation:!1,suppressMaxRenderedRowRestriction:!1,suppressRowVirtualisation:!1,rowDragManaged:!1,suppressRowDrag:!1,suppressMoveWhenRowDragging:!1,rowDragEntireRow:!1,rowDragMultiRow:!1,embedFullWidthRows:!1,groupDisplayType:"singleColumn",groupDefaultExpanded:0,groupMaintainOrder:!1,groupSelectsChildren:!1,groupIncludeTotalFooter:!1,groupSuppressBlankHeader:!1,groupSelectsFiltered:!1,showOpenedGroup:!1,groupRemoveSingleChildren:!1,groupRemoveLowestSingleChildren:!1,groupHideOpenParents:!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,suppressServerSideInfiniteScroll:!1,cacheBlockSize:100,maxBlocksInCache:-1,maxConcurrentDatasourceRequests:2,blockLoadDebounceMillis:0,purgeClosedRowNodes:!1,serverSideSortAllLevels:!1,serverSideOnlyRefreshFilteredGroups:!1,serverSideSortOnServer:!1,serverSideFilterOnServer:!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,suppressGroupMaintainValueType:!1,functionsPassive:!1,groupLockGroupColumns:0,serverSideEnableClientSideSort:!1,suppressServerSideFullWidthLoadingRow:!1,pivotMaxGeneratedColumns:-1},Jp={sideBar:{module:"@ag-grid-enterprise/side-bar"},statusBar:{module:"@ag-grid-enterprise/status-bar"},enableCharts:{module:"@ag-grid-enterprise/charts"},getMainMenuItems:{module:"@ag-grid-enterprise/menu"},getContextMenuItems:{module:"@ag-grid-enterprise/menu"},allowContextMenuWithControlKey:{module:"@ag-grid-enterprise/menu"},enableAdvancedFilter:{module:"@ag-grid-enterprise/advanced-filter"},treeData:{supportedRowModels:["clientSide","serverSide"],module:"@ag-grid-enterprise/row-grouping",dependencies:e=>{var t;const i=null!=(t=e.rowModelType)?t:"clientSide";switch(i){case"clientSide":return e.getDataPath?null:`treeData requires 'getDataPath' in the ${i} row model.`;case"serverSide":return e.isServerSideGroup&&e.getServerSideGroupKey?null:`treeData requires 'isServerSideGroup' and 'getServerSideGroupKey' in the ${i} row model.`;}return null;}},masterDetail:{module:"@ag-grid-enterprise/master-detail"},enableRangeSelection:{module:"@ag-grid-enterprise/range-selection"},enableRangeHandle:{dependencies:{enableRangeSelection:[!0]}},enableFillHandle:{dependencies:{enableRangeSelection:[!0]}},groupDefaultExpanded:{supportedRowModels:["clientSide"]},groupIncludeFooter:{supportedRowModels:["clientSide","serverSide"],dependencies:e=>{var t;switch(null!=(t=e.rowModelType)?t:"clientSide"){case"clientSide":return null;case"serverSide":return e.suppressServerSideInfiniteScroll?"groupIncludeFooter is not supported alongside suppressServerSideInfiniteScroll":null;}return null;}},groupIncludeTotalFooter:{supportedRowModels:["clientSide"]}
1,groupRemoveSingleChildren:{dependencies:{groupHideOpenParents:[void 0,!1],groupRemoveLowestSingleChildren:[void 0,!1]}},groupRemoveLowestSingleChildren:{dependencies:{groupHideOpenParents:[void 0,!1],groupRemoveSingleChildren:[void 0,!1]}},groupSelectsChildren:{dependencies:{rowSelection:["multiple"]}},suppressParentsInRowNodes:{dependencies:{groupSelectsChildren:[void 0,!1]}},viewportDatasource:{supportedRowModels:["viewport"],module:"@ag-grid-enterprise/viewport-row-model"},serverSideDatasource:{supportedRowModels:["serverSide"],module:"@ag-grid-enterprise/server-side-row-model"},cacheBlockSize:{supportedRowModels:["serverSide","infinite"]},datasource:{supportedRowModels:["infinite"],module:"@ag-grid-community/infinite-row-model"},rowData:{supportedRowModels:["clientSide"],module:"@ag-grid-community/client-side-row-model"},columnDefs:()=>ys,defaultColDef:()=>ys,defaultColGroupDef:()=>ys,autoGroupColumnDef:()=>ys},eg={objectName:"gridOptions",allProperties:[...Yi.ALL_PROPERTIES,...cn.EVENT_CALLBACKS],propertyExceptions:["api","columnApi"],docsUrl:"grid-options/",deprecations:{enableChartToolPanelsButton:{version:"29"},functionsPassive:{version:"29.2"},onColumnRowGroupChangeRequest:{version:"29.2"},onColumnPivotChangeRequest:{version:"29.2"},onColumnValueChangeRequest:{version:"29.2"},onColumnAggFuncChangeRequest:{version:"29.2"},serverSideFilterAllLevels:{version:"30",message:"All server-side group levels are now filtered by default. This can be toggled using `serverSideOnlyRefreshFilteredGroups`."},suppressAggAtRootLevel:{version:"30",message:"The root level aggregation is now suppressed by default. This can be toggled using `alwaysAggregateAtRootLevel`."},excludeHiddenColumnsFromQuickFilter:{version:"30",message:"Hidden columns are now excluded from the Quick Filter by default. This can be toggled using `includeHiddenColumnsInQuickFilter`."},enterMovesDown:{version:"30",renamed:"enterNavigatesVertically"},enterMovesDownAfterEdit:{version:"30",renamed:"enterNavigatesVerticallyAfterEdit"},suppressParentsInRowNodes:{version:"30.2",message:"Using suppressParentsInRowNodes is no longer recommended. To serialize nodes it is now recommended to instead remove the parent node reference before serialization."},advancedFilterModel:{version:"31",message:"Use `initialState.filter.advancedFilterModel` instead."},suppressAsyncEvents:{version:"31",message:"Events should be handled asynchronously."},cellFadeDelay:{version:"31.1",renamed:"cellFadeDuration"},cellFlashDelay:{version:"31.1",renamed:"cellFlashDuration"},suppressServerSideInfiniteScroll:{version:"31.1"},serverSideSortOnServer:{version:"31.1"},serverSideFilterOnServer:{version:"31.1"},enableCellChangeFlash:{version:"31.2",message:"Use `enableCellChangeFlash` in the `ColDef` or `defaultColDef` for all columns."},groupIncludeFooter:{version:"31.3",message:"Use `groupTotalRow` instead."},groupIncludeTotalFooter:{version:"31.3",message:"Use `grandTotalRow` instead."}},validations:Jp},j=class{constructor(){this.destroyed=!1,this.domDataKey="__AG_"+Math.random().toString(),this.propertyEventService=new Qe(),this.globalEventHandlerFactory=e=>(t,i)=>{if(this.destroyed)return;const s=Ns.has(t);if(s&&!e||!s&&e)return;const o=cn.getCallbackForEvent(t),r=this.gridOptions[o];"function"==typeof r&&this.frameworkOverrides.wrapOutgoing(()=>{r(i);});};}get context(){return this.gridOptions.context;}init(){this.columnApi=new Mi(this.api);const e=!this.get("suppressAsyncEvents");this.eventService.addGlobalListener(this.globalEventHandlerFactory().bind(this),e),this.eventService.addGlobalListener(this.globalEventHandlerFactory(!0).bind(this),!1),this.propertyEventService.setFrameworkOverrides(this.frameworkOverrides),this.getScrollbarWidth();}destroy(){this.destroyed=!0,this.columnApi=void 0;}get(e){var t;return null!=(t=this.gridOptions[e])?t:Zp[e];}getCallback(e){return this.mergeGridCommonParams(this.gridOptions[e]);}exists(e){return y(this.gridOptions[e]);}mergeGridCommonParams(e){return e&&(i=>{const s=i;return s.api=this.api,s.columnApi=this.columnApi,s.context=this.context,e(s);});}static toBoolean(e){return"boolean"==typeof e?e:"string"==typeof e&&("TRUE"===e.toUpperCase()||""==e);}static toNumber(e){if("number"==typeof e)return e;if("string"==typeof e){const t=parseInt(e);return isNaN(t)?void 0:t;}}static toConstrainedNum(e,t){return i=>{const s=j.toNumber(i);if(!(null==s||s<e||s>t))return s;};}static getCoercedValue(e,t){const i=j.PROPERTY_COERCIONS.get(e);return i?i(t):t;}static getCoercedGridOptions(e){const t={};return Object.entries(e).forEach(([i,s])=>{const o=j.getCoercedValue(i,s);t[i]=o;}),t;}updateGridOptions({options:e,force:t,source:i="api"}){const s={id:j.changeSetId++,properties:[]},o=[];Object.entries(e).forEach(([r,n])=>{"api"===i&&Yh[r]&&O(`${r} is an initial property and cannot be updated.`);const l=j.getCoercedValue(r,n),u=this.gridOptions[r];(t||"object"==typeof l&&"api"===i||u!==l)&&(this.gridOptions[r]=l,o.push({type:r,currentValue:l,previousValue:u,changeSet:s,source:i}));}),this.validationService.processGridOptions(this.gridOptions),s.properties=o.map(r=>r.type),o.forEach(r=>{this.gridOptions.debug&&console.log(`AG Grid: Updated property ${r.type} from `,r.previousValue," to ",r.currentValue),this.propertyEventService.dispatchEvent(r);});}addEventListener(e,t){this.propertyEventService.addEventListener(e,t);}removeEventListener(e,t){this.propertyEventService.removeEventListener(e,t);}getScrollbarWidth(){if(null==this.scrollbarWidth){const t="number"==typeof this.gridOptions.scrollbarWidth&&this.gridOptions.scrollbarWidth>=0?this.gridOptions.scrollbarWidth:_a();null!=t&&(this.scrollbarWidth=t,this.eventService.dispatchEvent({type:c.EVENT_SCROLLBAR_WIDTH_CHANGED}));}return this.scrollbarWidth;}isRowModelType(e){return this.gridOptions.rowModelType===e||"clientSide"===e&&_(this.gridOptions.rowModelType);}isDomLayout(e){var t;return(null!=(t=this.gridOptions.domLayout)?t:"normal")===e;}isRowSelection(){return"single"===this.gridOptions.rowSelection||"multiple"===this.gridOptions.rowSelection;}useAsyncEvents(){return!this.get("suppressAsyncEvents");}isGetRowHeightFunction(){return"function"==typeof this.gridOptions.getRowHeight;}getRowHeightForNode(e,t=!1,i){if(null==i&&(i=this.environment.getDefaultRowHeight()),this.isGetRowHeightFunction()){if
1(t)return{height:i,estimated:!0};const o={node:e,data:e.data},r=this.getCallback("getRowHeight")(o);if(this.isNumeric(r))return 0===r&&O("The return of `getRowHeight` cannot be zero. If the intention is to hide rows, use a filter instead."),{height:Math.max(1,r),estimated:!1};}return e.detail&&this.get("masterDetail")?this.getMasterDetailRowHeight():{height:this.gridOptions.rowHeight&&this.isNumeric(this.gridOptions.rowHeight)?this.gridOptions.rowHeight:i,estimated:!1};}getMasterDetailRowHeight(){return this.get("detailRowAutoHeight")?{height:1,estimated:!1}:this.isNumeric(this.gridOptions.detailRowHeight)?{height:this.gridOptions.detailRowHeight,estimated:!1}:{height:300,estimated:!1};}getRowHeightAsNumber(){if(!this.gridOptions.rowHeight||_(this.gridOptions.rowHeight))return this.environment.getDefaultRowHeight();const e=this.environment.refreshRowHeightVariable();return-1!==e?e:(console.warn("AG Grid row height must be a number if not using standard row model"),this.environment.getDefaultRowHeight());}isNumeric(e){return!isNaN(e)&&"number"==typeof e&&isFinite(e);}getDomDataKey(){return this.domDataKey;}getDomData(e,t){const i=e[this.getDomDataKey()];return i?i[t]:void 0;}setDomData(e,t,i){const s=this.getDomDataKey();let o=e[s];_(o)&&(o={},e[s]=o),o[t]=i;}getDocument(){let e=null;return this.gridOptions.getDocument&&y(this.gridOptions.getDocument)?e=this.gridOptions.getDocument():this.eGridDiv&&(e=this.eGridDiv.ownerDocument),e&&y(e)?e:document;}getWindow(){return this.getDocument().defaultView||window;}getRootNode(){return this.eGridDiv.getRootNode();}getActiveDomElement(){return this.getRootNode().activeElement;}getAsyncTransactionWaitMillis(){return y(this.gridOptions.asyncTransactionWaitMillis)?this.gridOptions.asyncTransactionWaitMillis:50;}isAnimateRows(){return!this.get("ensureDomOrder")&&this.get("animateRows");}isGroupRowsSticky(){return!(this.get("paginateChildRows")||this.get("groupHideOpenParents")||this.isDomLayout("print"));}isColumnsSortingCoupledToGroup(){const e=this.gridOptions.autoGroupColumnDef;return!e?.comparator&&!this.get("treeData");}getGroupAggFiltering(){const e=this.gridOptions.groupAggFiltering;return"function"==typeof e?this.getCallback("groupAggFiltering"):!0===e?()=>!0:void 0;}getGrandTotalRow(){return this.gridOptions.grandTotalRow||(this.gridOptions.groupIncludeTotalFooter?"bottom":void 0);}getGroupTotalRowCallback(){const e=this.get("groupTotalRow");if("function"==typeof e)return this.getCallback("groupTotalRow");if(e)return()=>e;const t=this.get("groupIncludeFooter");if("function"==typeof t){const i=this.getCallback("groupIncludeFooter");return s=>i(s)?"bottom":void 0;}return()=>t?"bottom":void 0;}isGroupMultiAutoColumn(){return this.gridOptions.groupDisplayType?"multipleColumns"===this.gridOptions.groupDisplayType:this.get("groupHideOpenParents");}isGroupUseEntireRow(e){return!e&&"groupRows"===this.gridOptions.groupDisplayType;}getGridCommonParams(){return{api:this.api,columnApi:this.columnApi,context:this.context};}addGridCommonParams(e){const t=e;return t.api=this.api,t.columnApi=this.columnApi,t.context=this.context,t;}};j.PROPERTY_COERCIONS=new Map([...Yi.BOOLEAN_PROPERTIES.map(e=>[e,j.toBoolean]),...Yi.NUMBER_PROPERTIES.map(e=>[e,j.toNumber]),["groupAggFiltering",e=>"function"==typeof e?e:j.toBoolean(e)],["pageSize",j.toConstrainedNum(1,Number.MAX_VALUE)],["autoSizePadding",j.toConstrainedNum(0,Number.MAX_VALUE)],["keepDetailRowsCount",j.toConstrainedNum(1,Number.MAX_VALUE)],["rowBuffer",j.toConstrainedNum(0,Number.MAX_VALUE)],["infiniteInitialRowCount",j.toConstrainedNum(1,Number.MAX_VALUE)],["cacheOverflowSize",j.toConstrainedNum(1,Number.MAX_VALUE)],["cacheBlockSize",j.toConstrainedNum(1,Number.MAX_VALUE)],["serverSideInitialRowCount",j.toConstrainedNum(1,Number.MAX_VALUE)],["viewportRowModelPageSize",j.toConstrainedNum(1,Number.MAX_VALUE)],["viewportRowModelBufferSize",j.toConstrainedNum(0,Number.MAX_VALUE)]]),j.changeSetId=0,d([g("gridOptions")],j.prototype,"gridOptions",2),d([g("eventService")],j.prototype,"eventService",2),d([g("environment")],j.prototype,"environment",2),d([g("frameworkOverrides")],j.prototype,"frameworkOverrides",2),d([g("eGridDiv")],j.prototype,"eGridDiv",2),d([g("validationService")],j.prototype,"validationService",2),d([g("gridApi")],j.prototype,"api",2),d([T],j.prototype,"init",1),d([Ee],j.prototype,"destroy",1),j=d([L("gridOptionsService")],j);var Nr=class extends R{getLocaleTextFunc(){const e=this.gos.getCallback("getLocaleText");if(e)return(i,s,o)=>e({key:i,defaultValue:s,variableValues:o});const t=this.gos.get("localeText");return(i,s,o)=>{let r=t&&t[i];if(r&&o&&o.length){let n=0;for(;!(n>=o.length||-1===r.indexOf("${variable}"));)r=r.replace("${variable}",o[n++]);}return r??s;};}};Nr=d([L("localeService")],Nr);var _l=class Th extends xi{constructor(){super(Th.TEMPLATE,"vertical");}
1postConstruct(){super.postConstruct(),this.createManagedBean(new Sr(this.eContainer)),this.ctrlsService.register("fakeVScrollComp",this),this.addManagedListener(this.eventService,c.EVENT_ROW_CONTAINER_HEIGHT_CHANGED,this.onRowContainerHeightChanged.bind(this));}setScrollVisible(){const t=this.scrollVisibleService.isVerticalScrollShowing(),i=this.invisibleScrollbar,s=t&&this.gos.getScrollbarWidth()||0,o=0===s&&i?16:s;this.addOrRemoveCssClass("ag-scrollbar-invisible",i),et(this.getGui(),o),et(this.eViewport,o),et(this.eContainer,o),this.setDisplayed(t,{skipAriaHidden:!0});}onRowContainerHeightChanged(){const{ctrlsService:t}=this,s=t.getGridBodyCtrl().getBodyViewportElement(),o=this.getScrollPosition(),r=s.scrollTop;o!=r&&this.setScrollPosition(r,!0);}getScrollPosition(){return this.getViewport().scrollTop;}setScrollPosition(t,i){!i&&!xe(this.getViewport())&&this.attemptSettingScrollPosition(t),this.getViewport().scrollTop=t;}};_l.TEMPLATE='<div class="ag-body-vertical-scroll" aria-hidden="true">\n <div class="ag-body-vertical-scroll-viewport" ref="eViewport">\n <div class="ag-body-vertical-scroll-container" ref="eContainer"></div>\n </div>\n </div>',d([T],_l.prototype,"postConstruct",1);var tg=_l,Pu={january:"January",february:"February",march:"March",april:"April",may:"May",june:"June",july:"July",august:"August",september:"September",october:"October",november:"November",december:"December"},Lu=["january","february","march","april","may","june","july","august","september","october","november","december"],ni=class extends R{constructor(){super(...arguments),this.dataTypeDefinitions={},this.isWaitingForRowData=!1,this.isColumnTypeOverrideInDataTypeDefinitions=!1,this.columnStateUpdatesPendingInference={},this.columnStateUpdateListenerDestroyFuncs=[];}init(){this.groupHideOpenParents=this.gos.get("groupHideOpenParents"),this.addManagedPropertyListener("groupHideOpenParents",()=>{this.groupHideOpenParents=this.gos.get("groupHideOpenParents");}),this.processDataTypeDefinitions(),this.addManagedPropertyListener("dataTypeDefinitions",e=>{this.processDataTypeDefinitions(),this.columnModel.recreateColumnDefs($i(e.source));});}processDataTypeDefinitions(){var e;const t=this.getDefaultDataTypes();this.dataTypeDefinitions={},Object.entries(t).forEach(([s,o])=>{this.dataTypeDefinitions[s]=x(M({},o),{groupSafeValueFormatter:this.createGroupSafeValueFormatter(o)});});const i=null!=(e=this.gos.get("dataTypeDefinitions"))?e:{};this.dataTypeMatchers={},Object.entries(i).forEach(([s,o])=>{const r=this.processDataTypeDefinition(o,i,[s],t);r&&(this.dataTypeDefinitions[s]=r,o.dataTypeMatcher&&(this.dataTypeMatchers[s]=o.dataTypeMatcher));}),this.checkObjectValueHandlers(t),["dateString","text","number","boolean","date"].forEach(s=>{const o=this.dataTypeMatchers[s];o&&delete this.dataTypeMatchers[s],this.dataTypeMatchers[s]=o??t[s].dataTypeMatcher;});}mergeDataTypeDefinitions(e,t){const i=M(M({},e),t);return e.columnTypes&&t.columnTypes&&t.appendColumnTypes&&(i.columnTypes=[...this.convertColumnTypes(e.columnTypes),...this.convertColumnTypes(t.columnTypes)]),i;}processDataTypeDefinition(e,t,i,s){let o;const r=e.extendsDataType;if(e.columnTypes&&(this.isColumnTypeOverrideInDataTypeDefinitions=!0),e.extendsDataType===e.baseDataType){let n=s[r];const l=t[r];if(n&&l&&(n=l),!this.validateDataTypeDefinition(e,n,r))return;o=this.mergeDataTypeDefinitions(n,e);}else{if(i.includes(r))return void O('Data type definition hierarchies (via the "extendsDataType" property) cannot contain circular references.');const n=t[r];if(!this.validateDataTypeDefinition(e,n,r))return;const l=this.processDataTypeDefinition(n,t,[...i,r],s);if(!l)return;o=this.mergeDataTypeDefinitions(l,e);}return x(M({},o),{groupSafeValueFormatter:this.createGroupSafeValueFormatter(o)});}validateDataTypeDefinition(e,t,i){return t?t.baseDataType===e.baseDataType||(O('The "baseDataType" property of a data type definition must match that of its parent.'),!1):(O(`The data type definition ${i} does not exist.`),!1);}createGroupSafeValueFormatter(e){if(e.valueFormatter)return t=>{var i,s;if(null!=(i=t.node)&&i.group){const o=t.column.getAggFunc();if(o){if("first"===o||"last"===o)return e.valueFormatter(t);if("number"===e.baseDataType&&"count"!==o){if("number"==typeof t.value)return e.valueFormatter(t);if("object"==typeof t.value){if(!t.value)return;if("toNumber"in t.value)return e.valueFormatter(x(M({},t),{value:t.value.toNumber()}));if("value"in t.value)return e.valueFormatter(x(M({},t),{value:t.value.value}));}}}if(!this.gos.get("suppressGroupMaintainValueType"))return;}else if(this.groupHideOpenParents&&t.column.isRowGroupActive()){if("string"!=typeof t.value||null!=(s=e.dataTypeMatcher)&&s.call(e,t.value))return e.valueFormatter(t);if(!this.gos.get("suppressGroupMaintainValueType"))return;}return e.valueFormatter(t);};}updateColDefAndGetDataTypeDefinitionColumnType(e,t,i){let{cellDataType:s}=t;const{field:o}=t;if(void 0===s&&(s=e.cellDataType),(null==s||!0===s)&&(s=!!this.canInferCellDataType(e,t)&&this.inferCellDataType(o,i)),!s)return void(e.cellDataType=!1);const r=this.dataTypeDefinitions[s];if(r)return e.cellDataType=s,r.groupSafeValueFormatter&&(e.valueFormatter=r.groupSafeValueFormatter),r.valueParser&&(e.valueParser=r.valueParser),r.suppressDefaultProperties||this.setColDefPropertiesForBaseDataType(e,r,i),r.columnTypes;O(`Missing data type definition - "${s}"`);}updateColDefAndGetColumnType(e,t,i){var s,o;const r=this.updateColDefAndGetDataTypeDefinitionColumnType(e,t,i),n=null!=(o=null!=(s=t.type)?s:r)?o:e.type;return e.type=n,n?this.convertColumnTypes(n):void 0;}addColumnListeners(e){if(!this.isWaitingForRowData)return;const t=this.columnStateUpdatesPendingInference[e.getColId()];if(!t)return;const i=s=>{t.add(s.key);};e.addEventListener(Z.EVENT_STATE_UPDATED,i),this.columnStateUpdateListenerDestroyFuncs.push(()=>e.removeEventListener(Z.EVENT_STATE_UPDATED,i));}canInferCellDataType(e,t){var i;if("clientSide"!==this.rowModel.getType())return!1;const s={cellRenderer:!0,valueGetter:!0,valueParser:!0,refData:!0}
1;if(this.doColDefPropsPreventInference(t,s))return!1;const o=null===t.type?e.type:t.type;if(o){const r=null!=(i=this.gos.get("columnTypes"))?i:{};if(this.convertColumnTypes(o).some(l=>{const a=r[l.trim()];return a&&this.doColDefPropsPreventInference(a,s);}))return!1;}return!this.doColDefPropsPreventInference(e,s);}doColDefPropsPreventInference(e,t){return[["cellRenderer","agSparklineCellRenderer"],["valueGetter",void 0],["valueParser",void 0],["refData",void 0]].some(([i,s])=>this.doesColDefPropPreventInference(e,t,i,s));}doesColDefPropPreventInference(e,t,i,s){if(!t[i])return!1;const o=e[i];return null===o?(t[i]=!1,!1):void 0===s?!!o:o===s;}inferCellDataType(e,t){var i;if(!e)return;let s;const o=this.getInitialData();if(o){const n=e.indexOf(".")>=0&&!this.gos.get("suppressFieldDotNotation");s=Ui(o,e,n);}else this.initWaitForRowData(t);if(null==s)return;const[r]=null!=(i=Object.entries(this.dataTypeMatchers).find(([n,l])=>l(s)))?i:["object"];return r;}getInitialData(){const e=this.gos.get("rowData");if(e?.length)return e[0];if(this.initialData)return this.initialData;{const t=this.rowModel.getRootNode().allLeafChildren;if(t?.length)return t[0].data;}return null;}initWaitForRowData(e){if(this.columnStateUpdatesPendingInference[e]=new Set(),this.isWaitingForRowData)return;this.isWaitingForRowData=!0;const t=this.isColumnTypeOverrideInDataTypeDefinitions;t&&this.columnModel.queueResizeOperations();const i=this.addManagedListener(this.eventService,c.EVENT_ROW_DATA_UPDATE_STARTED,s=>{const{firstRowData:o}=s;o&&(i?.(),this.isWaitingForRowData=!1,this.processColumnsPendingInference(o,t),this.columnStateUpdatesPendingInference={},t&&this.columnModel.processResizeOperations(),this.eventService.dispatchEvent({type:c.EVENT_DATA_TYPES_INFERRED}));});}isPendingInference(){return this.isWaitingForRowData;}processColumnsPendingInference(e,t){this.initialData=e;const i=[];this.columnStateUpdateListenerDestroyFuncs.forEach(r=>r()),this.columnStateUpdateListenerDestroyFuncs=[];const s={},o={};Object.entries(this.columnStateUpdatesPendingInference).forEach(([r,n])=>{const l=this.columnModel.getGridColumn(r);if(!l)return;const a=l.getColDef();if(!this.columnModel.resetColumnDefIntoColumn(l,"cellDataTypeInferred"))return;const u=l.getColDef();if(t&&u.type&&u.type!==a.type){const h=this.getUpdatedColumnState(l,n);h.rowGroup&&null==h.rowGroupIndex&&(s[r]=h),h.pivot&&null==h.pivotIndex&&(o[r]=h),i.push(h);}}),t&&i.push(...this.columnModel.generateColumnStateForRowGroupAndPivotIndexes(s,o)),i.length&&this.columnModel.applyColumnState({state:i},"cellDataTypeInferred"),this.initialData=null;}getUpdatedColumnState(e,t){const i=this.columnModel.getColumnStateFromColDef(e);return t.forEach(s=>{delete i[s],"rowGroup"===s?delete i.rowGroupIndex:"pivot"===s&&delete i.pivotIndex;}),i;}checkObjectValueHandlers(e){const t=this.dataTypeDefinitions.object,i=e.object;this.hasObjectValueParser=t.valueParser!==i.valueParser,this.hasObjectValueFormatter=t.valueFormatter!==i.valueFormatter;}convertColumnTypes(e){let t=[];return e instanceof Array?e.some(s=>"string"!=typeof s)?console.warn("if colDef.type is supplied an array it should be of type 'string[]'"):t=e:"string"==typeof e?t=e.split(","):console.warn("colDef.type should be of type 'string' | 'string[]'"),t;}getDateStringTypeDefinition(e){var t;return e&&null!=(t=this.getDataTypeDefinition(e))?t:this.dataTypeDefinitions.dateString;}getDateParserFunction(e){return this.getDateStringTypeDefinition(e).dateParser;}getDateFormatterFunction(e){return this.getDateStringTypeDefinition(e).dateFormatter;}getDataTypeDefinition(e){const t=e.getColDef();if(t.cellDataType)return this.dataTypeDefinitions[t.cellDataType];}getBaseDataType(e){var t;return null==(t=this.getDataTypeDefinition(e))?void 0:t.baseDataType;}checkType(e,t){var i;if(null==t)return!0;const s=null==(i=this.getDataTypeDefinition(e))?void 0:i.dataTypeMatcher;return!s||s(t);}validateColDef(e){"object"===e.cellDataType&&(e.valueFormatter===this.dataTypeDefinitions.object.groupSafeValueFormatter&&!this.hasObjectValueFormatter&&O('Cell data type is "object" but no value formatter has been provided. Please either provide an object data type definition with a value formatter, or set "colDef.valueFormatter"'),e.editable&&e.valueParser===this.dataTypeDefinitions.object.valueParser&&!this.hasObjectValueParser&&O('Cell data type is "object" but no value parser has been provided. Please either provide an object data type definition with a value parser, or set "colDef.valueParser"'));}setColDefPropertiesForBaseDataType(e,t,i){const s=(l,a,u)=>{let h=l.getColDef().valueFormatter;return h===t.groupSafeValueFormatter&&(h=t.valueFormatter),this.valueService.formatValue(l,a,u,h);},o=q.__isRegistered("@ag-grid-enterprise/set-filter",this.context.getGridId()),r=this.localeService.getLocaleTextFunc(),n=l=>{const{filterParams:a}=e;e.filterParams="object"==typeof a?M(M({},a),l):l;};switch(t.baseDataType){case"number":e.cellEditor="agNumberCellEditor",o&&n({comparator:(l,a)=>{const u=null==l?0:parseInt(l),h=null==a?0:parseInt(a);return u===h?0:u>h?1:-1;}});break;case"boolean":e.cellEditor="agCheckboxCellEditor",e.cellRenderer="agCheckboxCellRenderer",e.suppressKeyboardEvent=l=>!!l.colDef.editable&&l.event.key===C.SPACE,n(o?{valueFormatter:l=>y(l.value)?r(String(l.value),l.value?"True":"False"):r("blanks","(Blanks)")}:{maxNumConditions:1,debounceMs:0,filterOptions:["empty",{displayKey:"true",displayName:"True",predicate:(l,a)=>a,numberOfInputs:0}
1,{displayKey:"false",displayName:"False",predicate:(l,a)=>!1===a,numberOfInputs:0}]});break;case"date":e.cellEditor="agDateCellEditor",e.keyCreator=l=>s(l.column,l.node,l.value),o&&n({valueFormatter:l=>{const a=s(l.column,l.node,l.value);return y(a)?a:r("blanks","(Blanks)");},treeList:!0,treeListFormatter:(l,a)=>{if(1===a&&null!=l){const u=Lu[Number(l)-1];return r(u,Pu[u]);}return l??r("blanks","(Blanks)");}});break;case"dateString":{e.cellEditor="agDateStringCellEditor",e.keyCreator=a=>s(a.column,a.node,a.value);const l=t.dateParser;n(o?{valueFormatter:a=>{const u=s(a.column,a.node,a.value);return y(u)?u:r("blanks","(Blanks)");},treeList:!0,treeListPathGetter:a=>{const u=l(a??void 0);return u?[String(u.getFullYear()),String(u.getMonth()+1),String(u.getDate())]:null;},treeListFormatter:(a,u)=>{if(1===u&&null!=a){const h=Lu[Number(a)-1];return r(h,Pu[h]);}return a??r("blanks","(Blanks)");}}:{comparator:(a,u)=>{const h=l(u);return null==u||h<a?-1:h>a?1:0;}});break;}case"object":e.cellEditorParams={useFormatter:!0},e.comparator=(l,a)=>{const u=this.columnModel.getPrimaryColumn(i),h=u?.getColDef();if(!u||!h)return 0;const p=null==l?"":s(u,null,l),f=null==a?"":s(u,null,a);return p===f?0:p>f?1:-1;},e.keyCreator=l=>s(l.column,l.node,l.value),o?n({valueFormatter:l=>{const a=s(l.column,l.node,l.value);return y(a)?a:r("blanks","(Blanks)");}}):e.filterValueGetter=l=>s(l.column,l.node,this.valueService.getValue(l.column,l.node));}}getDefaultDataTypes(){const e=i=>!!i.match("^\\d{4}-\\d{2}-\\d{2}$"),t=this.localeService.getLocaleTextFunc();return{number:{baseDataType:"number",valueParser:i=>{var s,o;return""===(null==(o=null==(s=i.newValue)?void 0:s.trim)?void 0:o.call(s))?null:Number(i.newValue);},valueFormatter:i=>null==i.value?"":"number"!=typeof i.value||isNaN(i.value)?t("invalidNumber","Invalid Number"):String(i.value),dataTypeMatcher:i=>"number"==typeof i},text:{baseDataType:"text",valueParser:i=>""===i.newValue?null:Is(i.newValue),dataTypeMatcher:i=>"string"==typeof i},boolean:{baseDataType:"boolean",valueParser:i=>{var s,o;return null==i.newValue?i.newValue:""===(null==(o=null==(s=i.newValue)?void 0:s.trim)?void 0:o.call(s))?null:"true"===String(i.newValue).toLowerCase();},valueFormatter:i=>null==i.value?"":String(i.value),dataTypeMatcher:i=>"boolean"==typeof i},date:{baseDataType:"date",valueParser:i=>Ne(null==i.newValue?null:String(i.newValue)),valueFormatter:i=>{var s;return null==i.value?"":i.value instanceof Date&&!isNaN(i.value.getTime())?null!=(s=Je(i.value,!1))?s:"":t("invalidDate","Invalid Date");},dataTypeMatcher:i=>i instanceof Date},dateString:{baseDataType:"dateString",dateParser:i=>{var s;return null!=(s=Ne(i))?s:void 0;},dateFormatter:i=>{var s;return null!=(s=Je(i??null,!1))?s:void 0;},valueParser:i=>e(String(i.newValue))?i.newValue:null,valueFormatter:i=>e(String(i.value))?i.value:"",dataTypeMatcher:i=>"string"==typeof i&&e(i)},object:{baseDataType:"object",valueParser:()=>null,valueFormatter:i=>{var s;return null!=(s=Is(i.value))?s:"";}}};}};d([g("rowModel")],ni.prototype,"rowModel",2),d([g("columnModel")],ni.prototype,"columnModel",2),d([g("valueService")],ni.prototype,"valueService",2),d([T],ni.prototype,"init",1),ni=d([L("dataTypeService")],ni);var _i=class extends R{constructor(){super(...arguments),this.waitingForColumns=!1;}postConstruct(){this.addManagedPropertyListener("columnDefs",e=>this.setColumnDefs(e));}start(){this.ctrlsService.whenReady(()=>{const e=this.gos.get("columnDefs");e?this.setColumnsAndData(e):this.waitingForColumns=!0,this.gridReady();});}setColumnsAndData(e){this.columnModel.setColumnDefs(e??[],"gridInitializing"),this.rowModel.start();}gridReady(){this.dispatchGridReadyEvent();const e=q.__isRegistered("@ag-grid-enterprise/core",this.context.getGridId());new Mr("AG Grid",()=>this.gos.get("debug")).log(`initialised successfully, enterprise = ${e}`);}dispatchGridReadyEvent(){this.eventService.dispatchEvent({type:c.EVENT_GRID_READY});}setColumnDefs(e){const t=this.gos.get("columnDefs");if(t){if(this.waitingForColumns)return this.waitingForColumns=!1,void this.setColumnsAndData(t);
1this.columnModel.setColumnDefs(t,$i(e.source));}}};d([g("ctrlsService")],_i.prototype,"ctrlsService",2),d([g("columnModel")],_i.prototype,"columnModel",2),d([g("rowModel")],_i.prototype,"rowModel",2),d([T],_i.prototype,"postConstruct",1),_i=d([L("syncService")],_i);var Vi=class extends R{constructor(){super(...arguments),this.manuallyDisplayed=!1;}postConstruct(){this.addManagedListener(this.eventService,c.EVENT_ROW_DATA_UPDATED,()=>this.onRowDataUpdated()),this.addManagedListener(this.eventService,c.EVENT_NEW_COLUMNS_LOADED,()=>this.onNewColumnsLoaded());}registerOverlayWrapperComp(e){this.overlayWrapperComp=e,(!this.gos.get("columnDefs")||this.gos.isRowModelType("clientSide")&&!this.gos.get("rowData"))&&this.showLoadingOverlay();}showLoadingOverlay(){if(this.gos.get("suppressLoadingOverlay"))return;const t=this.userComponentFactory.getLoadingOverlayCompDetails({});this.showOverlay(t,"ag-overlay-loading-wrapper","loadingOverlayComponentParams");}showNoRowsOverlay(){if(this.gos.get("suppressNoRowsOverlay"))return;const t=this.userComponentFactory.getNoRowsOverlayCompDetails({});this.showOverlay(t,"ag-overlay-no-rows-wrapper","noRowsOverlayComponentParams");}showOverlay(e,t,i){const s=e.newAgStackInstance(),o=this.addManagedPropertyListener(i,({currentValue:r})=>{s.then(n=>{n.refresh&&n.refresh(this.gos.addGridCommonParams(M({},r??{})));});});this.manuallyDisplayed=this.columnModel.isReady()&&!this.paginationProxy.isEmpty(),this.overlayWrapperComp.showOverlay(s,t,o);}hideOverlay(){this.manuallyDisplayed=!1,this.overlayWrapperComp.hideOverlay();}showOrHideOverlay(){const e=this.paginationProxy.isEmpty(),t=this.gos.get("suppressNoRowsOverlay");e&&!t?this.showNoRowsOverlay():this.hideOverlay();}onRowDataUpdated(){this.showOrHideOverlay();}onNewColumnsLoaded(){this.columnModel.isReady()&&!this.paginationProxy.isEmpty()&&!this.manuallyDisplayed&&this.hideOverlay();}};d([g("userComponentFactory")],Vi.prototype,"userComponentFactory",2),d([g("paginationProxy")],Vi.prototype,"paginationProxy",2),d([g("columnModel")],Vi.prototype,"columnModel",2),d([T],Vi.prototype,"postConstruct",1),Vi=d([L("overlayService")],Vi);var Fe=class extends R{constructor(){super(...arguments),this.suppressEvents=!0,this.queuedUpdateSources=new Set(),this.dispatchStateUpdateEventDebounced=Te(()=>this.dispatchQueuedStateUpdateEvents(),0),this.onRowGroupOpenedDebounced=Te(()=>this.updateCachedState("rowGroupExpansion",this.getRowGroupExpansionState()),0),this.onRowSelectedDebounced=Te(()=>{this.staleStateKeys.delete("rowSelection"),this.updateCachedState("rowSelection",this.getRowSelectionState());},0),this.staleStateKeys=new Set();}postConstruct(){var e;this.isClientSideRowModel="clientSide"===this.rowModel.getType(),this.cachedState=null!=(e=this.gos.get("initialState"))?e:{},this.ctrlsService.whenReady(()=>this.suppressEventsAndDispatchInitEvent(()=>this.setupStateOnGridReady()));const t=this.addManagedListener(this.eventService,c.EVENT_NEW_COLUMNS_LOADED,({source:o})=>{"gridInitializing"===o&&(t?.(),this.suppressEventsAndDispatchInitEvent(()=>this.setupStateOnColumnsInitialised()));}),i=this.addManagedListener(this.eventService,c.EVENT_ROW_COUNT_READY,()=>{i?.(),this.suppressEventsAndDispatchInitEvent(()=>this.setupStateOnRowCountReady());}),s=this.addManagedListener(this.eventService,c.EVENT_FIRST_DATA_RENDERED,()=>{s?.(),this.suppressEventsAndDispatchInitEvent(()=>this.setupStateOnFirstDataRendered());});}getState(){return this.staleStateKeys.size&&this.refreshStaleState(),this.cachedState;}setupStateOnGridReady(){this.updateCachedState("sideBar",this.getSideBarState()),this.addManagedListener(this.eventService,c.EVENT_TOOL_PANEL_VISIBLE_CHANGED,()=>this.updateCachedState("sideBar",this.getSideBarState())),this.addManagedListener(this.eventService,c.EVENT_SIDE_BAR_UPDATED,()=>this.updateCachedState("sideBar",this.getSideBarState()));}setupStateOnColumnsInitialised(){var e;const t=null!=(e=this.gos.get("initialState"))?e:{};this.setColumnState(t),this.setColumnGroupState(t),this.updateColumnState(["aggregation","columnOrder","columnPinning","columnSizing","columnVisibility","pivot","pivot","rowGroup","sort"]),this.updateCachedState("columnGroup",this.getColumnGroupState()),this.addManagedListener(this.eventService,c.EVENT_COLUMN_VALUE_CHANGED,(
1)=>this.updateColumnState(["aggregation"])),this.addManagedListener(this.eventService,c.EVENT_COLUMN_MOVED,()=>this.updateColumnState(["columnOrder"])),this.addManagedListener(this.eventService,c.EVENT_COLUMN_PINNED,()=>this.updateColumnState(["columnPinning"])),this.addManagedListener(this.eventService,c.EVENT_COLUMN_RESIZED,()=>this.updateColumnState(["columnSizing"])),this.addManagedListener(this.eventService,c.EVENT_COLUMN_VISIBLE,()=>this.updateColumnState(["columnVisibility"])),this.addManagedListener(this.eventService,c.EVENT_COLUMN_PIVOT_CHANGED,()=>this.updateColumnState(["pivot"])),this.addManagedListener(this.eventService,c.EVENT_COLUMN_PIVOT_MODE_CHANGED,()=>this.updateColumnState(["pivot"])),this.addManagedListener(this.eventService,c.EVENT_COLUMN_ROW_GROUP_CHANGED,()=>this.updateColumnState(["rowGroup"])),this.addManagedListener(this.eventService,c.EVENT_SORT_CHANGED,()=>this.updateColumnState(["sort"])),this.addManagedListener(this.eventService,c.EVENT_NEW_COLUMNS_LOADED,()=>this.updateColumnState(["aggregation","columnOrder","columnPinning","columnSizing","columnVisibility","pivot","pivot","rowGroup","sort"])),this.addManagedListener(this.eventService,c.EVENT_COLUMN_GROUP_OPENED,()=>this.updateCachedState("columnGroup",this.getColumnGroupState()));}setupStateOnRowCountReady(){var e;const{filter:t,rowGroupExpansion:i,rowSelection:s,pagination:o}=null!=(e=this.gos.get("initialState"))?e:{},r=this.gos.get("advancedFilterModel");(t||r)&&this.setFilterState(t,r),i&&this.setRowGroupExpansionState(i),s&&this.setRowSelectionState(s),o&&this.setPaginationState(o),this.updateCachedState("filter",this.getFilterState()),this.updateCachedState("rowGroupExpansion",this.getRowGroupExpansionState()),this.updateCachedState("rowSelection",this.getRowSelectionState()),this.updateCachedState("pagination",this.getPaginationState()),this.addManagedListener(this.eventService,c.EVENT_FILTER_CHANGED,(
1)=>this.updateCachedState("filter",this.getFilterState())),this.addManagedListener(this.eventService,c.EVENT_ROW_GROUP_OPENED,()=>this.onRowGroupOpenedDebounced()),this.addManagedListener(this.eventService,c.EVENT_EXPAND_COLLAPSE_ALL,()=>this.updateCachedState("rowGroupExpansion",this.getRowGroupExpansionState())),this.addManagedListener(this.eventService,c.EVENT_SELECTION_CHANGED,()=>{this.staleStateKeys.add("rowSelection"),this.onRowSelectedDebounced();}),this.addManagedListener(this.eventService,c.EVENT_PAGINATION_CHANGED,n=>{(n.newPage||n.newPageSize)&&this.updateCachedState("pagination",this.getPaginationState());});}setupStateOnFirstDataRendered(){var e;const{scroll:t,rangeSelection:i,focusedCell:s,columnOrder:o}=null!=(e=this.gos.get("initialState"))?e:{};s&&this.setFocusedCellState(s),i&&this.setRangeSelectionState(i),t&&this.setScrollState(t),this.setColumnPivotState(!!o?.orderedColIds),this.updateCachedState("sideBar",this.getSideBarState()),this.updateCachedState("focusedCell",this.getFocusedCellState()),this.updateCachedState("rangeSelection",this.getRangeSelectionState()),this.updateCachedState("scroll",this.getScrollState()),this.addManagedListener(this.eventService,c.EVENT_CELL_FOCUSED,()=>this.updateCachedState("focusedCell",this.getFocusedCellState())),this.addManagedListener(this.eventService,c.EVENT_RANGE_SELECTION_CHANGED,r=>{r.finished&&this.updateCachedState("rangeSelection",this.getRangeSelectionState());}),this.addManagedListener(this.eventService,c.EVENT_BODY_SCROLL_END,()=>this.updateCachedState("scroll",this.getScrollState()));}getColumnState(){const e=this.columnModel.isPivotMode(),t=[],i=[],s=[],o=[],r=[],n=[],l=[],a=[],u=[],h=this.columnModel.getColumnState();for(let p=0;p<h.length;p++){const{colId:f,sort:m,sortIndex:v,rowGroup:w,rowGroupIndex:S,aggFunc:b,pivot:E,pivotIndex:F,pinned:P,hide:I,width:G,flex:N}=h[p];u.push(f),m&&(t[v??0]={colId:f,sort:m}),w&&(i[S??0]=f),"string"==typeof b&&s.push({colId:f,aggFunc:b}),E&&(o[F??0]=f),P&&("right"===P?n:r).push(f),I&&l.push(f),(N||G)&&a.push({colId:f,flex:N??void 0,width:G});}return{sort:t.length?{sortModel:t}:void 0,rowGroup:i.length?{groupColIds:i}:void 0,aggregation:s.length?{aggregationModel:s}:void 0,pivot:o.length||e?{pivotMode:e,pivotColIds:o}:void 0,columnPinning:r.length||n.length?{leftColIds:r,rightColIds:n}:void 0,columnVisibility:l.length?{hiddenColIds:l}:void 0,columnSizing:a.length?{columnSizingModel:a}:void 0,columnOrder:u.length?{orderedColIds:u}:void 0};}setColumnState(e){const{sort:t,rowGroup:i,aggregation:s,pivot:o,columnPinning:r,columnVisibility:n,columnSizing:l,columnOrder:a}=e,u={},h=v=>{let w=u[v];return w||(w={colId:v},u[v]=w,w);};t&&t.sortModel.forEach(({colId:v,sort:w},S)=>{const b=h(v);b.sort=w,b.sortIndex=S;}),i&&i.groupColIds.forEach((v,w)=>{const S=h(v);S.rowGroup=!0,S.rowGroupIndex=w;}),s&&s.aggregationModel.forEach(({colId:v,aggFunc:w})=>{h(v).aggFunc=w;}),o&&(o.pivotColIds.forEach((v,w)=>{const S=h(v);S.pivot=!0,S.pivotIndex=w;}),this.gos.updateGridOptions({options:{pivotMode:o.pivotMode},source:"gridInitializing"})),r&&(r.leftColIds.forEach(v=>{h(v).pinned="left";}),r.rightColIds.forEach(v=>{h(v).pinned="right";})),n&&n.hiddenColIds.forEach(v=>{h(v).hide=!0;}),l&&l.columnSizingModel.forEach(({colId:v,flex:w,width:S})=>{const b=h(v);b.flex=w??null,b.width=S;});const p=a?.orderedColIds,f=!!p?.length,m=f?p.map(v=>h(v)):Object.values(u);m.length&&(this.columnStates=m,this.columnModel.applyColumnState({state:m,applyOrder:f,defaultState:{sort:null,sortIndex:null,rowGroup:null,rowGroupIndex:null,aggFunc:null,pivot:null,pivotIndex:null,pinned:null,hide:null,flex:null}},"gridInitializing"));}setColumnPivotState(e){const t=this.columnStates;this.columnStates=void 0;const i=this.columnGroupStates;if(this.columnGroupStates=void 0,this.columnModel.isSecondaryColumnsPresent()){if(t){let s=[];for(const o of t)this.columnModel.getSecondaryColumn(o.colId)&&s.push(o);this.columnModel.applyColumnState({state:s,applyOrder:e},"gridInitializing");}i&&this.columnModel.setColumnGroupState(i,"gridInitializing");}}getColumnGroupState(){const e=this.columnModel.getColumnGroupState(),t=[];return e.forEach(({groupId:i,open:s})=>
1{s&&t.push(i);}),t.length?{openColumnGroupIds:t}:void 0;}setColumnGroupState(e){var t;if(!e.hasOwnProperty("columnGroup"))return;const i=new Set(null==(t=e.columnGroup)?void 0:t.openColumnGroupIds),o=this.columnModel.getColumnGroupState().map(({groupId:r})=>{const n=i.has(r);return n&&i.delete(r),{groupId:r,open:n};});i.forEach(r=>{o.push({groupId:r,open:!0});}),o.length&&(this.columnGroupStates=o),this.columnModel.setColumnGroupState(o,"gridInitializing");}getFilterState(){var e;let t=this.filterManager.getFilterModel();t&&0===Object.keys(t).length&&(t=void 0);const i=null!=(e=this.filterManager.getAdvancedFilterModel())?e:void 0;return t||i?{filterModel:t,advancedFilterModel:i}:void 0;}setFilterState(e,t){const{filterModel:i,advancedFilterModel:s}=e??{advancedFilterModel:t};i&&this.filterManager.setFilterModel(i,"columnFilter"),s&&this.filterManager.setAdvancedFilterModel(s);}getRangeSelectionState(){var e;const t=null==(e=this.rangeService)?void 0:e.getCellRanges().map(i=>{const{id:s,type:o,startRow:r,endRow:n,columns:l,startColumn:a}=i;return{id:s,type:o,startRow:r,endRow:n,colIds:l.map(u=>u.getColId()),startColId:a.getColId()};});return t?.length?{cellRanges:t}:void 0;}setRangeSelectionState(e){if(!this.gos.get("enableRangeSelection")||!this.rangeService)return;const t=[];
1e.cellRanges.forEach(i=>{const s=[];if(i.colIds.forEach(r=>{const n=this.columnModel.getGridColumn(r);n&&s.push(n);}),!s.length)return;let o=this.columnModel.getGridColumn(i.startColId);if(!o){const r=this.columnModel.getAllDisplayedColumns(),n=new Set(s);o=r.find(l=>n.has(l));}t.push(x(M({},i),{columns:s,startColumn:o}));}),this.rangeService.setCellRanges(t);}getScrollState(){var e,t,i;if(!this.isClientSideRowModel)return;const s=null==(e=this.ctrlsService.getGridBodyCtrl())?void 0:e.getScrollFeature(),{left:o}=null!=(t=s?.getHScrollPosition())?t:{left:0},{top:r}=null!=(i=s?.getVScrollPosition())?i:{top:0};return r||o?{top:r,left:o}:void 0;}setScrollState(e){var t;if(!this.isClientSideRowModel)return;const{top:i,left:s}=e;null==(t=this.ctrlsService.getGridBodyCtrl())||t.getScrollFeature().setScrollPosition(i,s);}getSideBarState(){var e,t;return null==(t=null==(e=this.sideBarService)?void 0:e.getSideBarComp())?void 0:t.getState();}getFocusedCellState(){if(!this.isClientSideRowModel)return;const e=this.focusService.getFocusedCell();if(e){const{column:t,rowIndex:i,rowPinned:s}=e;return{colId:t.getColId(),rowIndex:i,rowPinned:s};}}setFocusedCellState(e){if(!this.isClientSideRowModel)return;const{colId:t,rowIndex:i,rowPinned:s}=e;this.focusService.setFocusedCell({column:this.columnModel.getGridColumn(t),rowIndex:i,rowPinned:s,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0});}getPaginationState(){const e=this.paginationProxy.getCurrentPage(),t=this.gos.get("paginationAutoPageSize")?void 0:this.paginationProxy.getPageSize();if(e||t)return{page:e,pageSize:t};}setPaginationState(e){e.pageSize&&!this.gos.get("paginationAutoPageSize")&&this.paginationProxy.setPageSize(e.pageSize,"initialState"),"number"==typeof e.page&&this.paginationProxy.setPage(e.page);}getRowSelectionState(){var e;const t=this.selectionService.getSelectionState();return t&&(Array.isArray(t)||!1!==t.selectAll&&!1!==t.selectAllChildren||null!=(e=t?.toggledNodes)&&e.length)?t:void 0;}setRowSelectionState(e){this.selectionService.setSelectionState(e,"gridInitializing");}getRowGroupExpansionState(){const e=this.expansionService.getExpandedRows();return e.length?{expandedRowGroupIds:e}:void 0;}setRowGroupExpansionState(e){this.expansionService.expandRows(e.expandedRowGroupIds);}updateColumnState(e){const t=this.getColumnState();let i=!1;Object.entries(t).forEach(([s,o])=>{jr(o,this.cachedState[s])||(i=!0);}),this.cachedState=M(M({},this.cachedState),t),i&&this.dispatchStateUpdateEvent(e);}updateCachedState(e,t){const i=this.cachedState[e];this.setCachedStateValue(e,t),jr(t,i)||this.dispatchStateUpdateEvent([e]);}setCachedStateValue(e,t){this.cachedState=x(M({},this.cachedState),{[e]:t});}refreshStaleState(){this.staleStateKeys.forEach(e=>{"rowSelection"===e&&this.setCachedStateValue(e,this.getRowSelectionState());}),this.staleStateKeys.clear();}dispatchStateUpdateEvent(e){this.suppressEvents||(e.forEach(t=>this.queuedUpdateSources.add(t)),this.dispatchStateUpdateEventDebounced());}dispatchQueuedStateUpdateEvents(){const e=Array.from(this.queuedUpdateSources);this.queuedUpdateSources.clear(),this.eventService.dispatchEvent({type:c.EVENT_STATE_UPDATED,sources:e,state:this.cachedState});}suppressEventsAndDispatchInitEvent(e){this.suppressEvents=!0,this.columnAnimationService.setSuppressAnimation(!0),e(),setTimeout(()=>{this.suppressEvents=!1,this.queuedUpdateSources.clear(),this.isAlive()&&(this.columnAnimationService.setSuppressAnimation(!1),this.dispatchStateUpdateEvent(["gridInitializing"]));});}};d([g("filterManager")],Fe.prototype,"filterManager",2),d([g("ctrlsService")],Fe.prototype,"ctrlsService",2),d([g("focusService")],Fe.prototype,"focusService",2),d([g("columnModel")],Fe.prototype,"columnModel",2),d([g("paginationProxy")],Fe.prototype,"paginationProxy",2),d([g("rowModel")],Fe.prototype,"rowModel",2),d([g("selectionService")],Fe.prototype,"selectionService",2),d([g("expansionService")],Fe.prototype,"expansionService",2),d([g("columnAnimationService")],Fe.prototype,"columnAnimationService",2),d([Q("sideBarService")],Fe.prototype,"sideBarService",2),d([Q("rangeService")],Fe.prototype,"rangeService",2),d([T],Fe.prototype,"postConstruct",1),Fe=d([L("stateService")],Fe);var bo=class extends R{init(){this.processGridOptions(this.gridOptions);}processGridOptions(e){this.processOptions(e,eg);}processColumnDefs(e){this.processOptions(e,ys);}processOptions(e,t){const{validations:i,deprecations:s,allProperties:o,propertyExceptions:r,objectName:n,docsUrl:l}=t;o&&!0!==this.gridOptions.suppressPropertyNamesCheck&&this.checkProperties(e,[...(r??[]),...Object.keys(s)],o,n,l);const a=new Set();Object.keys(e).forEach(h=>{var p;const f=s[h];if(f)if("renamed"in f){const{renamed:F,version:P}=f;a.add(`As of v${P}, ${String(h)} is deprecated. Please use ${String(F)} instead.`),e[F]=e[h];}else{const{message:F,version:P}=f;a.add(`As of v${P}, ${String(h)} is deprecated. ${F??""}`);}const m=e[h];if(null==m||!1===m)return;const v=i[h];let w;if(!v)return;if("function"==typeof v){const F=v(e,this.gridOptions);if(!F)return;if("objectName"in F){const P=e[h];return Array.isArray(P)?void P.forEach(I=>{this.processOptions(I,F);}):void this.processOptions(e[h],F);}w=F;}else w=v;const{module:S,dependencies:b,supportedRowModels:E}=w;
1if(E){const F=null!=(p=this.gridOptions.rowModelType)?p:"clientSide";if(!E.includes(F))return void a.add(`${String(h)} is not supported with the '${F}' row model.`);}if(S){const F=Array.isArray(S)?S:[S];let P=!0;if(F.forEach(I=>{q.__assertRegistered(I,String(h),this.context.getGridId())||(P=!1,a.add(`${String(h)} is only available when ${I} is loaded.`));}),!P)return;}if(b){const F=this.checkForWarning(h,b,e);if(F)return void a.add(F);}}),a.size>0&&a.forEach(h=>{O(h);});}checkForWarning(e,t,i){if("function"==typeof t)return t(i,this.gridOptions);const o=Object.entries(t).find(([l,a])=>!a.includes(i[l]));if(!o)return null;const[r,n]=o;return n.length>1?`'${String(e)}' requires '${r}' to be one of [${n.join(", ")}].`:`'${String(e)}' requires '${r}' to be ${n[0]}.`;}checkProperties(e,t,i,s,o){const n=Xa(Object.getOwnPropertyNames(e),["__ob__","__v_skip","__metadata__",...t,...i],i);if(Se(n,(l,a)=>{O(`invalid ${s} property '${l}' did you mean any of these: ${a.slice(0,8).join(", ")}`);}),Object.keys(n).length>0&&o){const l=this.getFrameworkOverrides().getDocLink(o);O(`to see all the valid ${s} properties please check: ${l}`);}}};d([g("gridOptions")],bo.prototype,"gridOptions",2),d([T],bo.prototype,"init",1),bo=d([L("validationService")],bo);var xr=class extends R{constructor(){super(...arguments),this.syncEventListeners=new Map(),this.asyncEventListeners=new Map(),this.syncGlobalEventListeners=new Set(),this.globalEventListenerPairs=new Map();}postConstruct(){this.frameworkEventWrappingService=new on(this.getFrameworkOverrides());}addEventListener(e,t){const i=this.frameworkEventWrappingService.wrap(t),s=this.gos.useAsyncEvents()&&!Ns.has(e),o=s?this.asyncEventListeners:this.syncEventListeners;o.has(e)||o.set(e,new Set()),o.get(e).add(i),this.eventService.addEventListener(e,i,s);}removeEventListener(e,t){var i;const s=this.frameworkEventWrappingService.unwrap(t),o=this.asyncEventListeners.get(e),r=!!o?.delete(s);r||null==(i=this.syncEventListeners.get(e))||i.delete(s),this.eventService.removeEventListener(e,s,r);}addGlobalListener(e){const t=this.frameworkEventWrappingService.wrapGlobal(e);if(this.gos.useAsyncEvents()){const s=(r,n)=>{Ns.has(r)&&t(r,n);},o=(r,n)=>{Ns.has(r)||t(r,n);};this.globalEventListenerPairs.set(e,{syncListener:s,asyncListener:o}),this.eventService.addGlobalListener(s,!1),this.eventService.addGlobalListener(o,!0);}else this.syncGlobalEventListeners.add(t),this.eventService.addGlobalListener(t,!1);}removeGlobalListener(e){const t=this.frameworkEventWrappingService.unwrapGlobal(e);if(this.globalEventListenerPairs.has(t)){const{syncListener:s,asyncListener:o}=this.globalEventListenerPairs.get(t);this.eventService.removeGlobalListener(s,!1),this.eventService.removeGlobalListener(o,!0),this.globalEventListenerPairs.delete(e);}else this.syncGlobalEventListeners.delete(t),this.eventService.removeGlobalListener(t,!1);}destroyEventListeners(e,t){e.forEach((i,s)=>{i.forEach(o=>this.eventService.removeEventListener(s,o,t)),i.clear();}),e.clear();}destroyGlobalListeners(e,t){e.forEach(i=>this.eventService.removeGlobalListener(i,t)),e.clear();}destroy(){super.destroy(),this.destroyEventListeners(this.syncEventListeners,!1),this.destroyEventListeners(this.asyncEventListeners,!0),this.destroyGlobalListeners(this.syncGlobalEventListeners,!1),this.globalEventListenerPairs.forEach(({syncListener:e,asyncListener:t})=>{this.eventService.removeGlobalListener(e,!1),this.eventService.removeGlobalListener(t,!0);}),this.globalEventListenerPairs.clear();}};d([T],xr.prototype,"postConstruct",1),xr=d([L("apiEventService")],xr);var Vl=class extends V{constructor(){super('<span class="ag-paging-page-size"></span>'),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.paginationProxy.getPageSize()||(this.paginationProxy.setPageSize(t,"pageSizeSelector"),this.hasEmptyOption&&this.toggleSelectDisplay(!0),this.selectPageSizeComp.getFocusableElement().focus());};}init(){this.addManagedPropertyListener("paginationPageSizeSelector",()=>{this.onPageSizeSelectorValuesChange();}),this.addManagedListener(this.eventService,c.EVENT_PAGINATION_CHANGED,e=>this.handlePaginationChanged(e));}handlePaginationChanged(e){if(!this.selectPageSizeComp||!e?.newPageSize)return;const t=this.paginationProxy.getPageSize();this.getPageSizeSelectorValues().includes(t)?this.selectPageSizeComp.setValue(t.toString()):this.hasEmptyOption?this.selectPageSizeComp.setValue(""):this.toggleSelectDisplay(!0);}toggleSelectDisplay(e){this.selectPageSizeComp&&this.reset(),e&&(this.reloadPageSizesSelector(),this.selectPageSizeComp&&this.appendChild(this.selectPageSizeComp));}reset(){de(this.getGui()),this.selectPageSizeComp&&(this.destroyBean(this.selectPageSizeComp),this.selectPageSizeComp=void 0);}onPageSizeSelectorValuesChange(){this.selectPageSizeComp&&this.shouldShowPageSizeSelector()&&this.reloadPageSizesSelector();}shouldShowPageSizeSelector(){return this.gos.get("pagination")&&!this.gos.get("suppressPaginationPanel")&&!this.gos.get("paginationAutoPageSize")&&!1!==this.gos.get("paginationPageSizeSelector");}reloadPageSizesSelector(){const e=this.getPageSizeSelectorValues(),t=this.paginationProxy.getPageSize(),i=!t||!e.includes(t);i&&(e.unshift(""),O("The paginationPageSize grid option is set to a value that is not in the list of page size options.\n Please make sure that the paginationPageSize grid option is set to one of the values in the \n paginationPageSizeSelector array, or set the paginationPageSizeSelector to false to hide the page size selector.")),this.selectPageSizeComp&&(this.destroyBean(this.selectPageSizeComp),this.selectPageSizeComp=void 0);const s=this.localeService.getLocaleTextFunc(),o=s("pageSizeSelectorLabel","Page Size:"),r=e.map(l=>({value:String(l),text:String(l)}
1)),n=s("ariaPageSizeSelectorLabel","Page Size");this.selectPageSizeComp=this.createManagedBean(new js()).addOptions(r).setValue(String(i?"":t)).setAriaLabel(n).setLabel(o).onValueChange(()=>this.handlePageSizeItemSelected()),this.hasEmptyOption=i;}getPageSizeSelectorValues(){const t=this.gos.get("paginationPageSizeSelector");return Array.isArray(t)&&this.validateValues(t)?[...t].sort((i,s)=>i-s):[20,50,100];}validateValues(e){if(!e.length)return O("The paginationPageSizeSelector grid option is an empty array. This is most likely a mistake.\n If you want to hide the page size selector, please set the paginationPageSizeSelector to false."),!1;for(let t=0;t<e.length;t++){const i=e[t],o=i>0;if("number"!=typeof i)return O("The paginationPageSizeSelector grid option contains a non-numeric value.\n Please make sure that all values in the paginationPageSizeSelector array are numbers."),!1;if(!o)return O("The paginationPageSizeSelector grid option contains a negative number or zero.\n Please make sure that all values in the paginationPageSizeSelector array are positive."),!1;}return!0;}destroy(){this.toggleSelectDisplay(!1),super.destroy();}};d([g("paginationProxy")],Vl.prototype,"paginationProxy",2),d([T],Vl.prototype,"init",1);var To=class extends R{constructor(){super(),this.descriptionContainer=null,this.announceValue=Te(this.announceValue.bind(this),200);}postConstruct(){const e=this.gos.getDocument(),t=this.descriptionContainer=e.createElement("div");t.classList.add("ag-aria-description-container"),gn(t,"polite"),Da(t,"additions text"),Ra(t,!0),this.eGridDiv.appendChild(t);}announceValue(e){this.descriptionContainer&&(this.descriptionContainer.textContent="",setTimeout(()=>{this.isAlive()&&this.descriptionContainer&&(this.descriptionContainer.textContent=e);},50));}destroy(){super.destroy();const{descriptionContainer:e}=this;e&&(de(e),e.parentElement&&e.parentElement.removeChild(e)),this.descriptionContainer=null,this.eGridDiv=null;}};d([g("eGridDiv")],To.prototype,"eGridDiv",2),d([T],To.prototype,"postConstruct",1),To=d([L("ariaAnnouncementService")],To);var Or=class{};function ig(e){Or.gridOptions=e;}function sg(e,t,i){if(!t)return rt("No gridOptions provided to createGrid"),{};const s=new Hl().create(e,t,o=>{const r=new si(e);o.createBean(r);},void 0,i);if(!Object.isFrozen(t)&&!i?.frameworkOverrides){const o="https://ag-grid.com/javascript-data-grid/grid-interface/#grid-api";Object.defineProperty(t,"api",{get:()=>{rt(`gridOptions.api is no longer supported. See ${o}.`);},configurable:!0}),Object.defineProperty(t,"columnApi",{get:()=>{rt(`gridOptions.columnApi is no longer supported and all methods moved to the grid api. See ${o}.`);},configurable:!0});}return s;}Or.gridOptions=void 0;var og=class{constructor(e,t,i){if(O("Since v31 new Grid(...) is deprecated. Use createGrid instead: `const gridApi = createGrid(...)`. The grid api is returned from createGrid and will not be available on gridOptions."),!t)return void rt("No gridOptions provided to the grid");this.gridOptions=t;const s=new Hl().create(e,t,o=>{const r=new si(e);o.createBean(r).addDestroyFunc(()=>{this.destroy();});},void 0,i);this.gridOptions.api=s,this.gridOptions.columnApi=new Mi(s);}destroy(){var e;this.gridOptions&&(null==(e=this.gridOptions.api)||e.destroy(),delete this.gridOptions.api,delete this.gridOptions.columnApi);}},rg=1,Hl=class{create(e,t,i,s,o){var r;let n={};Or.gridOptions?(Ie(n,Or.gridOptions,!0,!0),n=M(M({},n),t)):n=t;const l=j.getCoercedGridOptions(n),a=!!l.debug,u=null!=(r=l.gridId)?r:String(rg++),h=this.getRegisteredModules(o,u),p=this.createBeansList(l.rowModelType,h,u),f=this.createProvidedBeans(e,l,o);if(!p)return void rt("Failed to create grid.");const m={providedBeanInstances:f,beanClasses:p,debug:a,gridId:u},v=new Mr("Context",()=>m.debug),w=new ea(m,v),S=w.getBean("beans");return this.registerModuleUserComponents(S,h),this.registerStackComponents(S,h),this.registerControllers(S,h),i(w),S.syncService.start(),s&&s(w),w.getBean("gridApi");}registerControllers(e,t){t.forEach(i=>
1{i.controllers&&i.controllers.forEach(s=>e.ctrlsFactory.register(s));});}registerStackComponents(e,t){const i=this.createAgStackComponentsList(t);e.agStackComponentsRegistry.setupComponents(i);}getRegisteredModules(e,t){const i=e?e.modules:null,s=q.__getRegisteredModules(t),o=[],r={},n=(l,a,u)=>{var p;r[(p=a).moduleName]||(r[p.moduleName]=!0,o.push(p),q.__register(p,l,u)),a.dependantModules&&a.dependantModules.forEach(p=>n(l,p,u));};return i&&i.forEach(l=>n(!0,l,t)),s&&s.forEach(l=>n(!q.__isPackageBased(),l,void 0)),o;}registerModuleUserComponents(e,t){this.extractModuleEntity(t,s=>s.userComponents?s.userComponents:[]).forEach(s=>{e.userComponentRegistry.registerDefaultComponent(s.componentName,s.componentClass);});}createProvidedBeans(e,t,i){let s=i?i.frameworkOverrides:null;_(s)&&(s=new Ru());const o={gridOptions:t,eGridDiv:e,globalEventListener:i?i.globalEventListener:null,globalSyncEventListener:i?i.globalSyncEventListener:null,frameworkOverrides:s};return i&&i.providedBeanInstances&&Object.assign(o,i.providedBeanInstances),o;}createAgStackComponentsList(e){let t=[{componentName:"AgCheckbox",componentClass:qs},{componentName:"AgRadioButton",componentClass:qn},{componentName:"AgToggleButton",componentClass:Dl},{componentName:"AgInputTextField",componentClass:zt},{componentName:"AgInputTextArea",componentClass:pu},{componentName:"AgInputNumberField",componentClass:pr},{componentName:"AgInputDateField",componentClass:gu},{componentName:"AgInputRange",componentClass:fu},{componentName:"AgRichSelect",componentClass:go},{componentName:"AgSelect",componentClass:js},{componentName:"AgSlider",componentClass:mu},{componentName:"AgGridBody",componentClass:it},{componentName:"AgHeaderRoot",componentClass:du},{componentName:"AgSortIndicator",componentClass:mr},{componentName:"AgPagination",componentClass:ke},{componentName:"AgPageSizeSelector",componentClass:Vl},{componentName:"AgOverlayWrapper",componentClass:Kp},{componentName:"AgGroupComponent",componentClass:Cu},{componentName:"AgRowContainer",componentClass:Ri},{componentName:"AgFakeHorizontalScroll",componentClass:$p},{componentName:"AgFakeVerticalScroll",componentClass:tg},{componentName:"AgAutocomplete",componentClass:Eu}];const i=this.extractModuleEntity(e,s=>s.agStackComponents?s.agStackComponents:[]);return t=t.concat(i),t;}createBeansList(e="clientSide",t,i){const s=t.filter(a=>!a.rowModel||a.rowModel===e),o={clientSide:"@ag-grid-community/client-side-row-model",infinite:"@ag-grid-community/infinite-row-model",serverSide:"@ag-grid-enterprise/server-side-row-model",viewport:"@ag-grid-enterprise/viewport-row-model"};if(!o[e])return void rt("Could not find row model for rowModelType = "+e);if(!q.__assertRegistered(o[e],`rowModelType = '${e}'`,i))return;const r=[k,Gi,Gr,ws,fs,U,eo,Ir,So,Ar,It,vs,rs,Nr,bo,as,Ji,Qo,Qe,j,vt,Li,je,fe,qt,us,He,mo,Ki,ti,we,wo,_t,Co,Xt,xt,H,Mi,J,Ct,Cs,Ot,co,yi,oi,Pl,vo,Ii,xs,ms,Fi,wt,Xo,xl,Ro,ht,Ni,Ss,Do,Es,Ol,ni,_e,_i,Vi,Fe,ls,xr,To,qe],n=this.extractModuleEntity(s,a=>a.beans?a.beans:[]);r.push(...n);const l=[];return r.forEach(a=>{l.indexOf(a)<0&&l.push(a);}),l;}extractModuleEntity(e,t){return[].concat(...e.map(t));}},ng=class{wrap(e,t,i=[],s){const o=this.createWrapper(e,s);return t.forEach(r=>{this.createMethod(o,r,!0);}),i.forEach(r=>{this.createMethod(o,r,!1);}),o;}unwrap(e){return e;}createMethod(e,t,i){e.addMethod(t,this.createMethodProxy(e,t,i));}createMethodProxy(e,t,i){return function(){return e.hasMethod(t)?e.callMethod(t,arguments):(i&&console.warn("AG Grid: Framework component is missing the method "+t+"()"),null);};}},_r=class{};_r.CHART_TYPE_TO_SERIES_TYPE={column:"bar",groupedColumn:"bar",stackedColumn:"bar",normalizedColumn:"bar",bar:"bar",groupedBar:"bar",stackedBar:"bar",normalizedBar:"bar",line:"line",scatter:"scatter",bubble:"bubble",pie:"pie",donut:"donut",doughnut:"donut",area:"area",stackedArea:"area",normalizedArea:"area",histogram:"histogram",radarLine:"radar-line",radarArea:"radar-area",nightingale:"nightingale",radialColumn:"radial-column",radialBar:"radial-bar",sunburst:"sunburst",rangeBar:"range-bar",rangeArea:"range-area",boxPlot:"box-plot",treemap:"treemap",heatmap:"heatmap",waterfall:"waterfall"},_r.COMBO_CHART_TYPES=["columnLineCombo","areaColumnCombo","customCombo"],_r.SERIES_GROUP_TYPES=["grouped","stacked","normalized"];var Mu=(e=>(e.InsideBase="insideBase",e.InsideEnd="insideEnd",e.Center="center",e.OutsideEnd="outsideEnd",e))(Mu||{}),Rs=typeof global>"u"?{}:global;Rs.HTMLElement=typeof HTMLElement>"u"?{}:HTMLElement,Rs.HTMLButtonElement=typeof HTMLButtonElement>"u"?{}:HTMLButtonElement,Rs.HTMLSelectElement=typeof HTMLSelectElement>"u"?{}:HTMLSelectElement,Rs.HTMLInputElement=typeof HTMLInputElement>"u"?{}:HTMLInputElement,Rs.Node=typeof Node>"u"?{}:Node,Rs.MouseEvent=typeof MouseEvent>"u"?{}:MouseEvent;var kl=class xo{constructor(t,i,s,o,r,n){this.nextId=0,this.rowCountReady=!1,this.allNodesMap={},this.rootNode=t,this.gos=i,this.eventService=s,this.columnModel=o,this.beans=n,this.selectionService=r,this.rootNode.group=!0,this.rootNode.level=-1,this.rootNode.id=xo.ROOT_NODE_ID,this.rootNode.allLeafChildren=[],this.rootNode.childrenAfterGroup=[],this.rootNode.childrenAfterSort=[],this.rootNode.childrenAfterAggFilter=[],this.rootNode.childrenAfterFilter=[];}getCopyOfNodesMap(){return B.cloneObject(this.allNodesMap);}getRowNode(t){return this.allNodesMap[t];}setRowData(t){if("string"==typeof t)return void console.warn("AG Grid: rowData must be an array.");this.rowCountReady=!0,this.dispatchRowDataUpdateStartedEvent(t);const i=this.rootNode,s=this.rootNode.sibling;i.childrenAfterFilter=null,i.childrenAfterGroup=null,i.childrenAfterAggFilter=null,i.childrenAfterSort=null,i.childrenMapped=null,i.updateHasChildren(),this.nextId=0,this.allNodesMap={},t?i.allLeafChildren=t.map(o=>this.createNode(o,this.rootNode,xo.TOP_LEVEL)):(i.allLeafChildren=[],i.childrenAfterGroup=[]),s&&(s.childrenAfterFilter=i.childrenAfterFilter,s.childrenAfterGroup=i.childrenAfterGroup,s.childrenAfterAggFilter=i.childrenAfterAggFilter,s.childrenAfterSort=i.childrenAfterSort,s.childrenMapped=i.childrenMapped,s.allLeafChildren=i.allLeafChildren);}updateRowData(t,i){this.rowCountReady=!0,this.dispatchRowDataUpdateStartedEvent(t.add);const s={remove:[],update:[],add:[]},o=[];return this.executeRemove(t,s,o),this.executeUpdate(t,s,o),this.executeAdd(t,s),this.updateSelection(o,"rowDataChanged"),i&&B.sortRowNodesByOrder(this.rootNode.allLeafChildren,i),s;}isRowCountReady(){return this.rowCountReady;}dispatchRowDataUpdateStartedEvent(t){this.eventService.dispatchEvent({type:c.EVENT_ROW_DATA_UPDATE_STARTED,firstRowData:t?.length?t[0]:null});}updateSelection(t,i){const s=t.length>0;s&&this.selectionService.setNodesSelected({newValue:!1,nodes:t,suppressFinishActions:!0,source:i}),this.selectionService.updateGroupsFromChildrenSelections(i),s&&this.eventService.dispatchEvent({type:c.EVENT_SELECTION_CHANGED,source:i});}executeAdd(t,i){var s;const{add:o,addIndex:r}=t;if(B.missingOrEmpty(o))return;
1const n=o.map(l=>this.createNode(l,this.rootNode,xo.TOP_LEVEL));if("number"==typeof r&&r>=0){const{allLeafChildren:l}=this.rootNode,a=l.length;let u=r;if(this.gos.get("treeData")&&r>0&&a>0)for(let m=0;m<a;m++)if((null==(s=l[m])?void 0:s.rowIndex)==r-1){u=m+1;break;}const p=l.slice(0,u),f=l.slice(u,l.length);this.rootNode.allLeafChildren=[...p,...n,...f];}else this.rootNode.allLeafChildren=[...this.rootNode.allLeafChildren,...n];this.rootNode.sibling&&(this.rootNode.sibling.allLeafChildren=this.rootNode.allLeafChildren),i.add=n;}executeRemove(t,i,s){const{remove:o}=t;if(B.missingOrEmpty(o))return;const r={};o.forEach(n=>{const l=this.lookupRowNode(n);l&&(l.isSelected()&&s.push(l),l.clearRowTopAndRowIndex(),r[l.id]=!0,delete this.allNodesMap[l.id],i.remove.push(l));}),this.rootNode.allLeafChildren=this.rootNode.allLeafChildren.filter(n=>!r[n.id]),this.rootNode.sibling&&(this.rootNode.sibling.allLeafChildren=this.rootNode.allLeafChildren);}executeUpdate(t,i,s){const{update:o}=t;B.missingOrEmpty(o)||o.forEach(r=>{const n=this.lookupRowNode(r);n&&(n.updateData(r),!n.selectable&&n.isSelected()&&s.push(n),this.setMasterForRow(n,r,xo.TOP_LEVEL,!1),i.update.push(n));});}lookupRowNode(t){const i=this.gos.getCallback("getRowId");let s;if(i){const o=i({data:t,level:0});if(s=this.allNodesMap[o],!s)return console.error(`AG Grid: could not find row id=${o}, data item was not found for this id`),null;}else if(s=this.rootNode.allLeafChildren.find(o=>o.data===t),!s)return console.error("AG Grid: could not find data item as object was not found",t),console.error("Consider using getRowId to help the Grid find matching row data"),null;return s||null;}createNode(t,i,s){const o=new W(this.beans);o.group=!1,this.setMasterForRow(o,t,s,!0);const r=this.gos.get("suppressParentsInRowNodes");return i&&!r&&(o.parent=i),o.level=s,o.setDataAndId(t,this.nextId.toString()),this.allNodesMap[o.id]&&console.warn(`AG Grid: duplicate node id '${o.id}' detected from getRowId callback, this could cause issues in your grid.`),this.allNodesMap[o.id]=o,this.nextId++,o;}setMasterForRow(t,i,s,o){if(this.gos.get("treeData"))t.setMaster(!1),o&&(t.expanded=!1);else{if(this.gos.get("masterDetail")){const l=this.gos.get("isRowMaster");t.setMaster(!l||l(i));}else t.setMaster(!1);if(o){const l=this.columnModel.getRowGroupColumns();t.expanded=!!t.master&&this.isExpanded(s+(l?l.length:0));}}}isExpanded(t){const i=this.gos.get("groupDefaultExpanded");return-1===i||t<i;}};kl.TOP_LEVEL=0,kl.ROOT_NODE_ID="ROOT_NODE_ID";var lg=kl,Pe=class extends R{constructor(){super(...arguments),this.onRowHeightChanged_debounced=B.debounce(this.onRowHeightChanged.bind(this),100),this.rowsToDisplay=[],this.hasStarted=!1,this.shouldSkipSettingDataOnStart=!1,this.isRefreshingModel=!1,this.rowCountReady=!1;}init(){const e=this.refreshModel.bind(this,{step:"group"}),t=!this.gos.get("suppressAnimationFrame"),i=this.refreshModel.bind(this,{step:"group",afterColumnsChanged:!0,keepRenderedRows:!0,animate:t});this.addManagedListener(this.eventService,c.EVENT_NEW_COLUMNS_LOADED,i),this.addManagedListener(this.eventService,c.EVENT_COLUMN_ROW_GROUP_CHANGED,e),this.addManagedListener(this.eventService,c.EVENT_COLUMN_VALUE_CHANGED,this.onValueChanged.bind(this)),this.addManagedListener(this.eventService,c.EVENT_COLUMN_PIVOT_CHANGED,this.refreshModel.bind(this,{step:"pivot"})),this.addManagedListener(this.eventService,c.EVENT_FILTER_CHANGED,this.onFilterChanged.bind(this)),this.addManagedListener(this.eventService,c.EVENT_SORT_CHANGED,this.onSortChanged.bind(this)),this.addManagedListener(this.eventService,c.EVENT_COLUMN_PIVOT_MODE_CHANGED,e),this.addManagedListener(this.eventService,c.EVENT_GRID_STYLES_CHANGED,this.onGridStylesChanges.bind(this)),this.addManagedListener(this.eventService,c.EVENT_GRID_READY,()=>this.onGridReady()),this.addPropertyListeners(),this.rootNode=new W(this.beans),this.nodeManager=new lg(this.rootNode,this.gos,this.eventService,this.columnModel,this.selectionService,this.beans);}addPropertyListeners(){const e=new Set(["treeData","masterDetail"]),t=new Set(["suppressParentsInRowNodes","groupDefaultExpanded","groupAllowUnbalanced","initialGroupOrderComparator","groupHideOpenParents","groupDisplayType"]),i=new Set(["excludeChildrenWhenTreeDataFiltering"]),s=new Set(["removePivotHeaderRowWhenSingleValueColumn","pivotRowTotals","pivotColumnGroupTotals","suppressExpandablePivotGroups"]),o=new Set(["getGroupRowAgg","alwaysAggregateAtRootLevel","groupIncludeTotalFooter","suppressAggFilteredOnly","grandTotalRow"]),r=new Set(["postSortRows","groupDisplayType","accentedSort"]),n=new Set([]),l=new Set(["groupRemoveSingleChildren","groupRemoveLowestSingleChildren","groupIncludeFooter","groupTotalRow"]),a=[...e,...t,...i,...s,...s,...o,...r,...n,...l];this.addManagedPropertyListeners(a,u=>{var h;const p=null==(h=u.changeSet)?void 0:h.properties;if(!p)return;const f=m=>p.some(v=>m.has(v));f(e)?this.setRowData(this.rootNode.allLeafChildren.map(m=>m.data)):f(t)?this.refreshModel({step:"group"}):f(i)?this.refreshModel({step:"filter"}):f(s)?this.refreshModel({step:"pivot"}):f(o)?this.refreshModel({step:"aggregate"}):f(r)?this.refreshModel({step:"sort"}):f(n)?this.refreshModel({step:"filter_aggregates"}):f(l)&&this.refreshModel({step:"map"});}),this.addManagedPropertyListener("rowHeight",()=>this.resetRowHeights());}start(){this.hasStarted=!0,this.shouldSkipSettingDataOnStart?this.dispatchUpdateEventsAndRefresh():this.setInitialData();}setInitialData(){const e=this.gos.get("rowData");e&&(this.shouldSkipSettingDataOnStart=!0,this.setRowData(e));}ensureRowHeightsValid(e,t,i,s){let o,r=!1;do{o=!1;const n=this.getRowIndexAtPixel(e),l=this.getRowIndexAtPixel(t),a=Math.max(n,i),u=Math.min(l,s);for(let h=a;h<=u;h++){const p=this.getRow(h);if(p.rowHeightEstimated){const f=this.gos.getRowHeightForNode(p);p.setRowHeight(f.height),o=!0,r=!0;}}o&&this.setRowTopAndRowIndex();}while(o);return r;}setRowTopAndRowIndex(){const e=this.environment.getDefaultRowHeight();let t=0;const i=new Set(),s=this.gos.isDomLayout("normal");for(let o=0;o<this.rowsToDisplay.length;o++){const r=this.rowsToDisplay[o];if(null!=r.id&&i.add(r.id),null==r.rowHeight){const n=this.gos.getRowHeightForNode(r,s,e);r.setRowHeight(n.height,n.estimated);}r.setRowTop(t),r.setRowIndex(o),t+=r.rowHeight;}return i;}clearRowTopAndRowIndex(e,t){const i=e.isActive(),s=r=>{r&&null!=r.id&&!t.has(r.id)&&r.clearRowTopAndRowIndex();},o=r=>{s(r),s(r.detailNode),s(r.sibling),r.hasChildren()&&r.childrenAfterGroup&&(i&&-1!=r.level&&!r.expanded||r.childrenAfterGroup.forEach(o));};o(this.rootNode);}ensureRowsAtPixel(e,t,i=0){const s=this.getRowIndexAtPixel(t),o=this.getRow(s),r=!this.gos.get("suppressAnimationFrame");return o!==e[0]&&(e.forEach(n=>{B.removeFromArray(this.rootNode.allLeafChildren,n);}),e.forEach((n,l)=>{B.insertIntoArray(this.rootNode.allLeafChildren,n,Math.max(s+i,0)+l);}),this.refreshModel({step:"group",keepRenderedRows:!0,keepEditingRows:!0,animate:r}),!0);}highlightRowAtPixel(e,t){const i=null!=t?this.getRowIndexAtPixel(t):null,s=null!=i?this.getRow(i):null;if(!s||!e||s===e||null==t)return void(this.lastHighlightedRow&&(this.lastHighlightedRow.setHighlighted(null),this.lastHighlightedRow=null));const o=this.getHighlightPosition(t,s);this.lastHighlightedRow&&this.lastHighlightedRow!==s&&(this.lastHighlightedRow.setHighlighted(null),this.lastHighlightedRow=null),s.setHighlighted(o),this.lastHighlightedRow=s;}getHighlightPosition(e,t){if(!t){const o=this.getRowIndexAtPixel(e);
1if(!(t=this.getRow(o||0)))return 1;}const{rowTop:i,rowHeight:s}=t;return e-i<s/2?0:1;}getLastHighlightedRowNode(){return this.lastHighlightedRow;}isLastRowIndexKnown(){return!0;}getRowCount(){return this.rowsToDisplay?this.rowsToDisplay.length:0;}getTopLevelRowCount(){if(this.rowsToDisplay&&this.rowsToDisplay[0]===this.rootNode)return 1;const t=this.rootNode.childrenAfterAggFilter;return t?t.length:0;}getTopLevelRowDisplayedIndex(e){if(this.rowsToDisplay&&this.rowsToDisplay[0]===this.rootNode)return e;let i=this.rootNode.childrenAfterSort[e];if(this.gos.get("groupHideOpenParents"))for(;i.expanded&&i.childrenAfterSort&&i.childrenAfterSort.length>0;)i=i.childrenAfterSort[0];return i.rowIndex;}getRowBounds(e){if(B.missing(this.rowsToDisplay))return null;const t=this.rowsToDisplay[e];return t?{rowTop:t.rowTop,rowHeight:t.rowHeight}:null;}onRowGroupOpened(){const e=this.gos.isAnimateRows();this.refreshModel({step:"map",keepRenderedRows:!0,animate:e});}onFilterChanged(e){if(e.afterDataChange)return;const t=this.gos.isAnimateRows(),s=0===e.columns.length||e.columns.some(o=>o.isPrimary())?"filter":"filter_aggregates";this.refreshModel({step:s,keepRenderedRows:!0,animate:t});}onSortChanged(){const e=this.gos.isAnimateRows();this.refreshModel({step:"sort",keepRenderedRows:!0,animate:e,keepEditingRows:!0});}getType(){return"clientSide";}onValueChanged(){this.columnModel.isPivotActive()?this.refreshModel({step:"pivot"}):this.refreshModel({step:"aggregate"});}createChangePath(e){const t=B.missingOrEmpty(e),i=new ho(!1,this.rootNode);return(t||this.gos.get("treeData"))&&i.setInactive(),i;}isSuppressModelUpdateAfterUpdateTransaction(e){if(!this.gos.get("suppressModelUpdateAfterUpdateTransaction")||null==e.rowNodeTransactions)return!1;const t=e.rowNodeTransactions.filter(s=>null!=s.add&&s.add.length>0||null!=s.remove&&s.remove.length>0);return null==t||0==t.length;}buildRefreshModelParams(e){let t="group";const i={everything:"group",group:"group",filter:"filter",map:"map",aggregate:"aggregate",sort:"sort",pivot:"pivot"};if(B.exists(e)&&(t=i[e]),!B.missing(t))return{step:t,keepRenderedRows:!0,keepEditingRows:!0,animate:!this.gos.get("suppressAnimationFrame")};console.error(`AG Grid: invalid step ${e}, available steps are ${Object.keys(i).join(", ")}`);}refreshModel(e){if(!this.hasStarted||this.isRefreshingModel||this.columnModel.shouldRowModelIgnoreRefresh())return;let t="object"==typeof e&&"step"in e?e:this.buildRefreshModelParams(e);if(!t||this.isSuppressModelUpdateAfterUpdateTransaction(t))return;const i=this.createChangePath(t.rowNodeTransactions);switch(this.isRefreshingModel=!0,t.step){case"group":this.doRowGrouping(t.rowNodeTransactions,t.rowNodeOrder,i,!!t.afterColumnsChanged);case"filter":this.doFilter(i);case"pivot":this.doPivot(i);case"aggregate":this.doAggregate(i);case"filter_aggregates":this.doFilterAggregates(i);case"sort":this.doSort(t.rowNodeTransactions,i);case"map":this.doRowsToDisplay();}const s=this.setRowTopAndRowIndex();this.clearRowTopAndRowIndex(i,s),this.isRefreshingModel=!1,this.eventService.dispatchEvent({type:c.EVENT_MODEL_UPDATED,animate:t.animate,keepRenderedRows:t.keepRenderedRows,newData:t.newData,newPage:!1,keepUndoRedoStack:t.keepUndoRedoStack});}isEmpty(){const e=B.missing(this.rootNode.allLeafChildren)||0===this.rootNode.allLeafChildren.length;return B.missing(this.rootNode)||e||!this.columnModel.isReady();}isRowsToRender(){return B.exists(this.rowsToDisplay)&&this.rowsToDisplay.length>0;}getNodesInRangeForSelection(e,t){let i=!t,s=!1;const o=[],r=this.gos.get("groupSelectsChildren");return this.forEachNodeAfterFilterAndSort(n=>{if(!s)if(i&&(n===t||n===e)&&(s=!0,n.group&&r))o.push(...n.allLeafChildren);else{if(!i){if(n!==t&&n!==e)return;i=!0;}n.group&&r||o.push(n);}}),o;}setDatasource(e){console.error("AG Grid: should never call setDatasource on clientSideRowController");}getTopLevelNodes(){return this.rootNode?this.rootNode.childrenAfterGroup:null;}getRootNode(){return this.rootNode;}getRow(e){return this.rowsToDisplay[e];}isRowPresent(e){return this.rowsToDisplay.indexOf(e)>=0;}getRowIndexAtPixel(e){if(this.isEmpty()||0===this.rowsToDisplay.length)return-1;let t=0,i=this.rowsToDisplay.length-1;if(e<=0)return 0;if(B.last(this.rowsToDisplay).rowTop<=e)return this.rowsToDisplay.length-1;let o=-1,r=-1;for(;;){const n=Math.floor((t+i)/2),l=this.rowsToDisplay[n];if(this.isRowInPixel(l,e)||(l.rowTop<e?t=n+1:l.rowTop>e&&(i=n-1),o===t&&r===i))return n;o=t,r=i;}}isRowInPixel(e,t){return e.rowTop<=t&&e.rowTop+e.rowHeight>t;}forEachLeafNode(e){this.rootNode.allLeafChildren&&this.rootNode.allLeafChildren.forEac
1h((t,i)=>e(t,i));}forEachNode(e,t=!1){this.recursivelyWalkNodesAndCallback({nodes:[...(this.rootNode.childrenAfterGroup||[])],callback:e,recursionType:0,index:0,includeFooterNodes:t});}forEachNodeAfterFilter(e,t=!1){this.recursivelyWalkNodesAndCallback({nodes:[...(this.rootNode.childrenAfterAggFilter||[])],callback:e,recursionType:1,index:0,includeFooterNodes:t});}forEachNodeAfterFilterAndSort(e,t=!1){this.recursivelyWalkNodesAndCallback({nodes:[...(this.rootNode.childrenAfterSort||[])],callback:e,recursionType:2,index:0,includeFooterNodes:t});}forEachPivotNode(e,t=!1){this.recursivelyWalkNodesAndCallback({nodes:[this.rootNode],callback:e,recursionType:3,index:0,includeFooterNodes:t});}recursivelyWalkNodesAndCallback(e){const{nodes:t,callback:i,recursionType:s,includeFooterNodes:o}=e;let{index:r}=e;const n=l=>{var a;const u=null==(a=t[0])?void 0:a.parent;if(!u)return;const h=o&&this.gos.getGrandTotalRow(),p=this.gos.getGroupTotalRowCallback(),f=o&&p({node:u});u!==this.rootNode?f===l&&(u.createFooter(),i(u.sibling,r++)):h===l&&(u.createFooter(),i(u.sibling,r++));};n("top");for(let l=0;l<t.length;l++){const a=t[l];if(i(a,r++),a.hasChildren()&&!a.footer){let u=null;switch(s){case 0:u=a.childrenAfterGroup;break;case 1:u=a.childrenAfterAggFilter;break;case 2:u=a.childrenAfterSort;break;case 3:u=a.leafGroup?null:a.childrenAfterSort;}u&&(r=this.recursivelyWalkNodesAndCallback({nodes:[...u],callback:i,recursionType:s,index:r,includeFooterNodes:o}));}}return n("bottom"),r;}doAggregate(e){var t;null==(t=this.aggregationStage)||t.execute({rowNode:this.rootNode,changedPath:e});}doFilterAggregates(e){this.filterAggregatesStage?this.filterAggregatesStage.execute({rowNode:this.rootNode,changedPath:e}):this.rootNode.childrenAfterAggFilter=this.rootNode.childrenAfterFilter;}expandOrCollapseAll(e){const t=this.gos.get("treeData"),i=this.columnModel.isPivotActive(),s=n=>{n&&n.forEach(l=>{const a=()=>{l.expanded=e,s(l.childrenAfterGroup);};t?B.exists(l.childrenAfterGroup)&&a():i?!l.leafGroup&&a():l.group&&a();});};this.rootNode&&s(this.rootNode.childrenAfterGroup),this.refreshModel({step:"map"}),this.eventService.dispatchEvent({type:c.EVENT_EXPAND_COLLAPSE_ALL,source:e?"expandAll":"collapseAll"});}doSort(e,t){this.sortStage.execute({rowNode:this.rootNode,rowNodeTransactions:e,changedPath:t});}doRowGrouping(e,t,i,s){this.groupStage?(this.groupStage.execute(e?{rowNode:this.rootNode,rowNodeTransactions:e,rowNodeOrder:t,changedPath:i}:{rowNode:this.rootNode,changedPath:i,afterColumnsChanged:s}),this.gos.get("groupSelectsChildren")&&this.selectionService.updateGroupsFromChildrenSelections("rowGroupChanged",i)&&this.eventService.dispatchEvent({type:c.EVENT_SELECTION_CHANGED,source:"rowGroupChanged"})):(this.rootNode.childrenAfterGroup=this.rootNode.allLeafChildren,this.rootNode.sibling&&(this.rootNode.sibling.childrenAfterGroup=this.rootNode.childrenAfterGroup),this.rootNode.updateHasChildren()),this.nodeManager.isRowCountReady()&&(this.rowCountReady=!0,this.eventService.dispatchEventOnce({type:c.EVENT_ROW_COUNT_READY}));}doFilter(e){this.filterStage.execute({rowNode:this.rootNode,changedPath:e});}doPivot(e){var t;null==(t=this.pivotStage)||t.execute({rowNode:this.rootNode,changedPath:e});}getCopyOfNodesMap(){return this.nodeManager.getCopyOfNodesMap();}getRowNode(e){if("string"==typeof e&&0==e.indexOf(W.ID_PREFIX_ROW_GROUP)){let i;return this.forEachNode(s=>{s.id===e&&(i=s);}),i;}return this.nodeManager.getRowNode(e);}setRowData(e){this.selectionService.reset("rowDataChanged"),this.nodeManager.setRowData(e),this.hasStarted&&this.dispatchUpdateEventsAndRefresh();}dispatchUpdateEventsAndRefresh(){this.eventService.dispatchEvent({type:c.EVENT_ROW_DATA_UPDATED}),this.refreshModel({step:"group",newData:!0});}batchUpdateRowData(e,t){if(null==this.applyAsyncTransactionsTimeout){this.rowDataTransactionBatch=[];const i=this.gos.getAsyncTransactionWaitMillis();this.applyAsyncTransactionsTimeout=window.setTimeout(()=>{this.executeBatchUpdateRowData();},i);}this.rowDataTransactionBatch.push({rowDataTransaction:e,callback:t});}flushAsyncTransactions(){null!=this.applyAsyncTransactionsTimeout&&(clearTimeout(this.applyAsyncTransactionsTimeout),this.executeBatchUpdateRowData());}executeBatchUpdateRowData(){this.valueCache.onDataChanged();const e=[],t=[];let i=!1;this.rowDataTransactionBatch&&this.rowDataTransactionBatch.forEac
1h(s=>{const o=this.nodeManager.updateRowData(s.rowDataTransaction,void 0);t.push(o),s.callback&&e.push(s.callback.bind(null,o)),"number"==typeof s.rowDataTransaction.addIndex&&(i=!0);}),this.commonUpdateRowData(t,void 0,i),e.length>0&&window.setTimeout(()=>{e.forEach(s=>s());},0),t.length>0&&this.eventService.dispatchEvent({type:c.EVENT_ASYNC_TRANSACTIONS_FLUSHED,results:t}),this.rowDataTransactionBatch=null,this.applyAsyncTransactionsTimeout=void 0;}updateRowData(e,t){this.valueCache.onDataChanged();const i=this.nodeManager.updateRowData(e,t);return this.commonUpdateRowData([i],t,"number"==typeof e.addIndex),i;}createRowNodeOrder(){if(this.gos.get("suppressMaintainUnsortedOrder"))return;const t={};if(this.rootNode&&this.rootNode.allLeafChildren)for(let i=0;i<this.rootNode.allLeafChildren.length;i++)t[this.rootNode.allLeafChildren[i].id]=i;return t;}commonUpdateRowData(e,t,i){if(!this.hasStarted)return;const s=!this.gos.get("suppressAnimationFrame");i&&(t=this.createRowNodeOrder()),this.eventService.dispatchEvent({type:c.EVENT_ROW_DATA_UPDATED}),this.refreshModel({step:"group",rowNodeTransactions:e,rowNodeOrder:t,keepRenderedRows:!0,keepEditingRows:!0,animate:s});}doRowsToDisplay(){this.rowsToDisplay=this.flattenStage.execute({rowNode:this.rootNode});}onRowHeightChanged(){this.refreshModel({step:"map",keepRenderedRows:!0,keepEditingRows:!0,keepUndoRedoStack:!0});}onRowHeightChangedDebounced(){this.onRowHeightChanged_debounced();}resetRowHeights(){const e=this.resetRowHeightsForAllRowNodes();this.rootNode.setRowHeight(this.rootNode.rowHeight,!0),this.rootNode.sibling&&this.rootNode.sibling.setRowHeight(this.rootNode.sibling.rowHeight,!0),e&&this.onRowHeightChanged();}resetRowHeightsForAllRowNodes(){let e=!1;return this.forEachNode(t=>{t.setRowHeight(t.rowHeight,!0);const i=t.detailNode;i&&i.setRowHeight(i.rowHeight,!0),t.sibling&&t.sibling.setRowHeight(t.sibling.rowHeight,!0),e=!0;}),e;}onGridStylesChanges(){this.columnModel.isAutoRowHeightActive()||this.resetRowHeights();}onGridReady(){this.hasStarted||this.setInitialData();}isRowDataLoaded(){return this.rowCountReady;}};d([g("columnModel")],Pe.prototype,"columnModel",2),d([g("selectionService")],Pe.prototype,"selectionService",2),d([g("valueCache")],Pe.prototype,"valueCache",2),d([g("beans")],Pe.prototype,"beans",2),d([g("filterStage")],Pe.prototype,"filterStage",2),d([g("sortStage")],Pe.prototype,"sortStage",2),d([g("flattenStage")],Pe.prototype,"flattenStage",2),d([Q("groupStage")],Pe.prototype,"groupStage",2),d([Q("aggregationStage")],Pe.prototype,"aggregationStage",2),d([Q("pivotStage")],Pe.prototype,"pivotStage",2),d([Q("filterAggregatesStage")],Pe.prototype,"filterAggregatesStage",2),d([T],Pe.prototype,"init",1),Pe=d([L("rowModel")],Pe);var Vr=class extends R{execute(e){const{changedPath:t}=e;this.filterService.filter(t);}};d([g("filterService")],Vr.prototype,"filterService",2),Vr=d([L("filterStage")],Vr);var Ao=class extends R{execute(e){const t=this.sortController.getSortOptions(),i=B.exists(t)&&t.length>0,s=i&&B.exists(e.rowNodeTransactions)&&this.gos.get("deltaSort"),o=t.some(r=>this.gos.isColumnsSortingCoupledToGroup()?r.column.isPrimary()&&r.column.isRowGroupActive():!!r.column.getColDef().showRowGroup);this.sortService.sort(t,i,s,e.rowNodeTransactions,e.changedPath,o);}};d([g("sortService")],Ao.prototype,"sortService",2),d([g("sortController")],Ao.prototype,"sortController",2),Ao=d([L("sortStage")],Ao);var Hr=class extends R{execute(e){const t=e.rowNode,i=[],s=this.beans.columnModel.isPivotMode(),o=s&&t.leafGroup,r=o?[t]:t.childrenAfterSort,n=this.getFlattenDetails();return this.recursivelyAddToRowsToDisplay(n,r,i,s,0),!o&&i.length>0&&n.grandTotalRow&&(t.createFooter(),this.addRowNodeToRowsToDisplay(n,t.sibling,i,0,"top"===n.grandTotalRow)),i;}getFlattenDetails(){const e=this.gos.get("groupRemoveSingleChildren");return{groupRemoveLowestSingleChildren:!e&&this.gos.get("groupRemoveLowestSingleChildren"),groupRemoveSingleChildren:e,isGroupMultiAutoColumn:this.gos.isGroupMultiAutoColumn(),hideOpenParents:this.gos.get("groupHideOpenParents"),grandTotalRow:this.gos.getGrandTotalRow(),groupTotalRow:this.gos.getGroupTotalRowCallback()};}recursivelyAddToRowsToDisplay(e,t,i,s,o){if(!B.missingOrEmpty(t))for(let r=0;r<t.length;r++){const n=t[r],l=n.hasChildren(),u=e.groupRemoveSingleChildren&&l&&1===n.childrenAfterGroup.length,h=e.groupRemoveLowestSingleChildren&&l&&n.leafGroup&&1===n.childrenAfterGroup.length;if(!(s&&!l)&&!(e.hideOpenParents&&n.expanded&&!n.master&&(!s||!n.leafGroup))&&!u&&!h&&this.addRowNodeToRowsToDisplay(e,n,i,o),!s||!n.leafGroup)if(l){const v=u||h;if(n.expanded||v){const w=e.groupTotalRow({node:n});w||n.destroyFooter();const S=v?o:o+1;"top"===w&&(n.createFooter(),this.addRowNodeToRowsToDisplay(e,n.sibling,i,S)),this.recursivelyAddToRowsToDisplay(e,n.childrenAfterSort,i,s,S),"bottom"===w&&(n.createFooter(),this.addRowNodeToRowsToDisplay(e,n.sibling,i,S));}}else if(n.master&&n.expanded){const v=this.createDetailNode(n);this.addRowNodeToRowsToDisplay(e,v,i,o);}}}addRowNodeToRowsToDisplay(e,t,i,s,o){o?i.unshift(t):i.push(t),t.setUiLevel(e.isGroupMultiAutoColumn?0:s);}createDetailNode(e){if(B.exists(e.detailNode))return e.detailNode;const t=new W(this.beans);return t.detail=!0,t.selectable=!1,t.parent=e,B.exists(e.id)&&(t.id="detail_"+e.id),t.data=e.data,t.level=e.level+1,e.detailNode=t,t;}};d([g("beans")],Hr.prototype,"beans",2),Hr=d([L("flattenStage")],Hr);var Fo=class extends R{sort(e,t,i,s,o,r){const n=this.gos.get("groupMaintainOrder"),l=this.columnModel.getAllGridColumns().some(f=>f.isRowGroupActive());let a={};i&&s&&(a=this.calculateDirtyNodes(s));const u=this.columnModel.isPivotMode(),h=this.gos.getCallback("postSortRows");o&&o.forEachChangedNodeDepthFirst(f=>{var m;this.pullDownGroupDataForHideOpenParents(f.childrenAfterAggFilter,!0);const v=u&&f.leafGroup;if(n&&l&&!f.leafGroup&&!r){const S=null==(m=this.columnModel.getRowGroupColumns())?void 0:m[f.level+1],b=null===S?.getSort(),E=f.childrenAfterAggFilter.slice(0);if(f.childrenAfterSort&&!b){const F={};f.childrenAfterSort.forEach((P,I)=>{F[P.id]=I;}),E.sort((P,I)=>{var G,N;return(null!=(G=F[P.id])?G:0)-(null!=(N=F[I.id])?N:0);});}f.childrenAfterSort=E;}else f.childrenAfterSort=!t||v?f.childrenAfterAggFilter.slice(0):i?this.doDeltaSort(f,a,o,e):this.rowNodeSorter.doFullSort(f.childrenAfterAggFilter,e);f.sibling&&(f.sibling.childrenAfterSort=f.childrenAfterSort),this.updateChildIndexes(f),h&&h({nodes:f.childrenAfterSort});}),this.updateGroupDataForHideOpenParents(o);}calculateDirtyNodes(e){const t={},i=s=>
1{s&&s.forEach(o=>t[o.id]=!0);};return e&&e.forEach(s=>{i(s.add),i(s.update),i(s.remove);}),t;}doDeltaSort(e,t,i,s){const o=e.childrenAfterAggFilter,r=e.childrenAfterSort;if(!r)return this.rowNodeSorter.doFullSort(o,s);const n={},l=[];o.forEach(p=>{t[p.id]||!i.canSkip(p)?l.push(p):n[p.id]=!0;});const a=r.filter(p=>n[p.id]),u=(p,f)=>({currentPos:f,rowNode:p}),h=l.map(u).sort((p,f)=>this.rowNodeSorter.compareRowNodes(s,p,f));return this.mergeSortedArrays(s,h,a.map(u)).map(({rowNode:p})=>p);}mergeSortedArrays(e,t,i){const s=[];let o=0,r=0;for(;o<t.length&&r<i.length;)this.rowNodeSorter.compareRowNodes(e,t[o],i[r])<0?s.push(t[o++]):s.push(i[r++]);for(;o<t.length;)s.push(t[o++]);for(;r<i.length;)s.push(i[r++]);return s;}updateChildIndexes(e){if(B.missing(e.childrenAfterSort))return;const t=e.childrenAfterSort;for(let i=0;i<t.length;i++){const s=t[i],r=i===e.childrenAfterSort.length-1;s.setFirstChild(0===i),s.setLastChild(r),s.setChildIndex(i);}}updateGroupDataForHideOpenParents(e){if(!this.gos.get("groupHideOpenParents"))return;if(this.gos.get("treeData"))return B.warnOnce("The property hideOpenParents dose not work with Tree Data. This is because Tree Data has values at the group level, it doesn't make sense to hide them."),!1;const t=i=>{this.pullDownGroupDataForHideOpenParents(i.childrenAfterSort,!1),i.childrenAfterSort.forEach(s=>{s.hasChildren()&&t(s);});};e&&e.executeFromRootNode(i=>t(i));}pullDownGroupDataForHideOpenParents(e,t){!this.gos.get("groupHideOpenParents")||B.missing(e)||e.forEach(i=>{this.columnModel.getGroupDisplayColumns().forEach(o=>{const r=o.getColDef().showRowGroup;if("string"!=typeof r)return void console.error("AG Grid: groupHideOpenParents only works when specifying specific columns for colDef.showRowGroup");const l=this.columnModel.getPrimaryColumn(r);if(l!==i.rowGroupColumn)if(t)i.setGroupValue(o.getId(),void 0);else{const u=i.getFirstChildOfFirstChild(l);u&&i.setGroupValue(o.getId(),u.key);}});});}};d([g("columnModel")],Fo.prototype,"columnModel",2),d([g("rowNodeSorter")],Fo.prototype,"rowNodeSorter",2),Fo=d([L("sortService")],Fo);var kr=class extends R{filter(e){const t=this.filterManager.isChildFilterPresent();this.filterNodes(t,e);}filterNodes(e,t){const i=(s,o)=>{s.childrenAfterFilter=s.hasChildren()&&e&&!o?s.childrenAfterGroup.filter(r=>{const n=r.childrenAfterFilter&&r.childrenAfterFilter.length>0,l=r.data&&this.filterManager.doesRowPassFilter({rowNode:r});return n||l;}):s.childrenAfterGroup,s.sibling&&(s.sibling.childrenAfterFilter=s.childrenAfterFilter);};if(this.doingTreeDataFiltering()){const s=(r,n)=>{if(r.childrenAfterGroup)for(let l=0;l<r.childrenAfterGroup.length;l++){const a=r.childrenAfterGroup[l],u=n||this.filterManager.doesRowPassFilter({rowNode:a});a.childrenAfterGroup?s(r.childrenAfterGroup[l],u):i(a,u);}i(r,n);};t.executeFromRootNode(r=>s(r,!1));}else t.forEachChangedNodeDepthFirst(o=>i(o,!1),!0);}doingTreeDataFiltering(){return this.gos.get("treeData")&&!this.gos.get("excludeChildrenWhenTreeDataFiltering");}};d([g("filterManager")],kr.prototype,"filterManager",2),kr=d([L("filterService")],kr);var Hi=class extends R{postConstruct(){"clientSide"===this.rowModel.getType()&&(this.clientSideRowModel=this.rowModel,this.addManagedPropertyListener("rowData",()=>this.onRowDataUpdated()));}isActive(){const e=this.gos.exists("getRowId");return!this.gos.get("resetRowDataOnUpdate")&&e;}setRowData(e){const t=this.createTransactionForRowData(e);if(!t)return;const[i,s]=t;this.clientSideRowModel.updateRowData(i,s);}createTransactionForRowData(e){if(B.missing(this.clientSideRowModel))return void console.error("AG Grid: ImmutableService only works with ClientSideRowModel");const t=this.gos.getCallback("getRowId");if(null==t)return void console.error("AG Grid: ImmutableService requires getRowId() callback to be implemented, your row data needs IDs!");const i={remove:[],update:[],add:[]},s=this.clientSideRowModel.getCopyOfNodesMap(),r=this.gos.get("suppressMaintainUnsortedOrder")?void 0:{};return B.exists(e)&&e.forEach((n,l)=>{const a=t({data:n,level:0}),u=s[a];r&&(r[a]=l),u?(u.data!==n&&i.update.push(n),s[a]=void 0):i.add.push(n);}
1),B.iterateObject(s,(n,l)=>{l&&i.remove.push(l.data);}),[i,r];}onRowDataUpdated(){const e=this.gos.get("rowData");e&&(this.isActive()?this.setRowData(e):(this.selectionService.reset("rowDataChanged"),this.clientSideRowModel.setRowData(e)));}};d([g("rowModel")],Hi.prototype,"rowModel",2),d([g("rowRenderer")],Hi.prototype,"rowRenderer",2),d([g("selectionService")],Hi.prototype,"selectionService",2),d([T],Hi.prototype,"postConstruct",1);var Iu={version:"31.3.4",moduleName:"@ag-grid-community/client-side-row-model",rowModel:"clientSide",beans:[Pe,Vr,Ao,Hr,Fo,kr,Hi=d([L("immutableService")],Hi)]},dg=Object.defineProperty,ug=Object.getOwnPropertyDescriptor,Le=(e,t,i,s)=>{for(var n,o=s>1?void 0:s?ug(t,i):t,r=e.length-1;r>=0;r--)(n=e[r])&&(o=(s?n(t,i,o):n(o))||o);return s&&o&&dg(t,i,o),o;},Po=class extends Fr{constructor(e,t,i){super(e),this.parentCache=t,this.params=i,this.startRow=e*i.blockSize,this.endRow=this.startRow+i.blockSize;}postConstruct(){this.createRowNodes();}getBlockStateJson(){return{id:""+this.getId(),state:{blockNumber:this.getId(),startRow:this.getStartRow(),endRow:this.getEndRow(),pageStatus:this.getState()}};}setDataAndId(e,t,i){B.exists(t)?e.setDataAndId(t,i.toString()):e.setDataAndId(void 0,void 0);}loadFromDatasource(){const e=this.createLoadParams();B.missing(this.params.datasource.getRows)?console.warn("AG Grid: datasource is missing getRows method"):window.setTimeout(()=>{this.params.datasource.getRows(e);},0);}processServerFail(){}createLoadParams(){return{startRow:this.getStartRow(),endRow:this.getEndRow(),successCallback:this.pageLoaded.bind(this,this.getVersion()),failCallback:this.pageLoadFailed.bind(this,this.getVersion()),sortModel:this.params.sortModel,filterModel:this.params.filterModel,context:this.gos.getGridCommonParams().context};}forEachNode(e,t,i){this.rowNodes.forEach((s,o)=>{this.startRow+o<i&&e(s,t.next());});}getLastAccessed(){return this.lastAccessed;}getRow(e,t=!1){return t||(this.lastAccessed=this.params.lastAccessedSequence.next()),this.rowNodes[e-this.startRow];}getStartRow(){return this.startRow;}getEndRow(){return this.endRow;}createRowNodes(){this.rowNodes=[];for(let e=0;e<this.params.blockSize;e++){const t=this.startRow+e,i=new W(this.beans);i.setRowHeight(this.params.rowHeight),i.uiLevel=0,i.setRowIndex(t),i.setRowTop(this.params.rowHeight*t),this.rowNodes.push(i);}}processServerResult(e){this.rowNodes.forEach((i,s)=>{const o=e.rowData?e.rowData[s]:void 0;!i.id&&i.alreadyRendered&&o&&(this.rowNodes[s]=new W(this.beans),this.rowNodes[s].setRowIndex(i.rowIndex),this.rowNodes[s].setRowTop(i.rowTop),this.rowNodes[s].setRowHeight(i.rowHeight),i.clearRowTopAndRowIndex()),this.setDataAndId(this.rowNodes[s],o,this.startRow+s);}),this.parentCache.pageLoaded(this,null!=e.rowCount&&e.rowCount>=0?e.rowCount:void 0);}destroyRowNodes(){this.rowNodes.forEach(e=>{e.clearRowTopAndRowIndex();});}};Le([g("beans")],Po.prototype,"beans",2),Le([T],Po.prototype,"postConstruct",1),Le([Ee],Po.prototype,"destroyRowNodes",1);var t,Ds=class Ah extends R{constructor(t){super(),this.lastRowIndexKnown=!1,this.blocks={},this.blockCount=0,this.rowCount=t.initialRowCount,this.params=t;}setBeans(t){this.logger=t.create("InfiniteCache");}getRow(t,i=!1){const s=Math.floor(t/this.params.blockSize);let o=this.blocks[s];if(!o){if(i)return;o=this.createBlock(s);}return o.getRow(t);}createBlock(t){const i=this.createBean(new Po(t,this,this.params));return this.blocks[i.getId()]=i,this.blockCount++,this.purgeBlocksIfNeeded(i),this.params.rowNodeBlockLoader.addBlock(i),i;}refreshCache(){0!=this.blockCount?(this.getBlocksInOrder().forEach(i=>i.setStateWaitingToLoad()),this.params.rowNodeBlockLoader.checkBlockToLoad()):this.purgeCache();}destroyAllBlocks(){this.getBlocksInOrder().forEach(t=>this.destroyBlock(t));}getRowCount(){return this.rowCount;}isLastRowIndexKnown(){return this.lastRowIndexKnown;}pageLoaded(t,i){this.isAlive()&&(this.logger.log(`onPageLoaded: page = ${t.getId()}, lastRow = ${i}`),this.checkRowCount(t,i),this.onCacheUpdated());}purgeBlocksIfNeeded(t){const i=this.getBlocksInOrder().filter(l=>l!=t);i.sort((l,a)=>a.getLastAccessed()-l.getLastAccessed());const o=this.params.maxBlocksInCache>0,r=o?this.params.maxBlocksInCache-1:null,n=Ah.MAX_EMPTY_BLOCKS_TO_KEEP-1;
1i.forEach((l,a)=>{if(l.getState()===Po.STATE_WAITING_TO_LOAD&&a>=n||o&&a>=r){if(this.isBlockCurrentlyDisplayed(l)||this.isBlockFocused(l))return;this.removeBlockFromCache(l);}});}isBlockFocused(t){const i=this.focusService.getFocusCellToUseAfterRefresh();if(!i||null!=i.rowPinned)return!1;const s=t.getStartRow(),o=t.getEndRow();return i.rowIndex>=s&&i.rowIndex<o;}isBlockCurrentlyDisplayed(t){const i=t.getStartRow(),s=t.getEndRow()-1;return this.rowRenderer.isRangeInRenderedViewport(i,s);}removeBlockFromCache(t){t&&this.destroyBlock(t);}checkRowCount(t,i){if("number"==typeof i&&i>=0)this.rowCount=i,this.lastRowIndexKnown=!0;else if(!this.lastRowIndexKnown){const o=(t.getId()+1)*this.params.blockSize+this.params.overflowSize;this.rowCount<o&&(this.rowCount=o);}}setRowCount(t,i){this.rowCount=t,B.exists(i)&&(this.lastRowIndexKnown=i),this.lastRowIndexKnown||this.rowCount%this.params.blockSize==0&&this.rowCount++,this.onCacheUpdated();}forEachNodeDeep(t){const i=new gi();this.getBlocksInOrder().forEach(s=>s.forEachNode(t,i,this.rowCount));}getBlocksInOrder(){return B.getAllValuesInObject(this.blocks).sort((s,o)=>s.getId()-o.getId());}destroyBlock(t){delete this.blocks[t.getId()],this.destroyBean(t),this.blockCount--,this.params.rowNodeBlockLoader.removeBlock(t);}onCacheUpdated(){this.isAlive()&&(this.destroyAllBlocksPastVirtualRowCount(),this.eventService.dispatchEvent({type:c.EVENT_STORE_UPDATED}));}destroyAllBlocksPastVirtualRowCount(){const t=[];this.getBlocksInOrder().forEach(i=>{i.getId()*this.params.blockSize>=this.rowCount&&t.push(i);}),t.length>0&&t.forEach(i=>this.destroyBlock(i));}purgeCache(){this.getBlocksInOrder().forEach(t=>this.removeBlockFromCache(t)),this.lastRowIndexKnown=!1,0===this.rowCount&&(this.rowCount=this.params.initialRowCount),this.onCacheUpdated();}getRowNodesInRange(t,i){const s=[];let o=-1,r=!1;const n=new gi();B.missing(t)&&(r=!0);let l=!1;return this.getBlocksInOrder().forEach(u=>{if(!l){if(r&&o+1!==u.getId())return void(l=!0);o=u.getId(),u.forEachNode(h=>{const p=h===t||h===i;(r||p)&&s.push(h),p&&(r=!r);},n,this.rowCount);}}),l||r?[]:s;}};Ds.MAX_EMPTY_BLOCKS_TO_KEEP=2,Le([g("rowRenderer")],Ds.prototype,"rowRenderer",2),Le([g("focusService")],Ds.prototype,"focusService",2),Le([(0,t=Ue("loggerFactory"),(i,s)=>t(i,s,0))],Ds.prototype,"setBeans",1),Le([Ee],Ds.prototype,"destroyAllBlocks",1);var cg=Ds,St=class extends R{getRowBounds(e){return{rowHeight:this.rowHeight,rowTop:this.rowHeight*e};}ensureRowHeightsValid(e,t,i,s){return!1;}init(){this.gos.isRowModelType("infinite")&&(this.rowHeight=this.gos.getRowHeightAsNumber(),this.addEventListeners(),this.addDestroyFunc(()=>this.destroyCache()),this.verifyProps());}verifyProps(){this.gos.exists("initialGroupOrderComparator")&&B.warnOnce("initialGroupOrderComparator cannot be used with Infinite Row Model as sorting is done on the server side");}start(){this.setDatasource(this.gos.get("datasource"));}destroyDatasource(){this.datasource&&(this.getContext().destroyBean(this.datasource),this.rowRenderer.datasourceChanged(),this.datasource=null);}addEventListeners(){this.addManagedListener(this.eventService,c.EVENT_FILTER_CHANGED,this.onFilterChanged.bind(this)),this.addManagedListener(this.eventService,c.EVENT_SORT_CHANGED,this.onSortChanged.bind(this)),this.addManagedListener(this.eventService,c.EVENT_NEW_COLUMNS_LOADED,this.onColumnEverything.bind(this)),this.addManagedListener(this.eventService,c.EVENT_STORE_UPDATED,this.onCacheUpdated.bind(this)),this.addManagedPropertyListener("datasource",()=>this.setDatasource(this.gos.get("datasource"))),this.addManagedPropertyListener("cacheBlockSize",()=>this.resetCache()),this.addManagedPropertyListener("rowHeight",()=>{this.rowHeight=this.gos.getRowHeightAsNumber(),this.cacheParams.rowHeight=this.rowHeight,this.updateRowHeights();});}onFilterChanged(){this.reset();}onSortChanged(){this.reset();}onColumnEverything(){let e;e=!this.cacheParams||this.isSortModelDifferent(),e&&this.reset();}isSortModelDifferent(){return!B.jsonEquals(this.cacheParams.sortModel,this.sortController.getSortModel());}getType(){return"infinite";}setDatasource(e){this.destroyDatasource(),this.datasource=e,e&&this.reset();}isEmpty(){return!this.infiniteCache;}isRowsToRender(){return!!this.infiniteCache;}getNodesInRangeForSelection(e,t){return this.infiniteCache?this.infiniteCache.getRowNodesInRange(e,t):[];}reset(){this.datasource&&(null!=this.gos.getCallback("getRowId")||this.selectionService.reset("rowDataChanged"),this.resetCache());}createModelUpdatedEvent(){return{type:c.EVENT_MODEL_UPDATED,newPage:!1,newPageSize:!1,newData:!1,keepRenderedRows:!0,animate:!1};}resetCache(){this.destroyCache(),this.cacheParams={datasource:this.datasource,filterModel:this.filterManager.getFilterModel(),sortModel:this.sortController.getSortModel(),rowNodeBlockLoader:this.rowNodeBlockLoader,initialRowCount:this.gos.get("infiniteInitialRowCount"),maxBlocksInCache:this.gos.get("maxBlocksInCache"),rowHeight:this.gos.getRowHeightAsNumber(),overflowSize:this.gos.get("cacheOverflowSize"),blockSize:this.gos.get("cacheBlockSize"),lastAccessedSequence:new gi()},this.infiniteCache=this.createBean(new cg(this.cacheParams)),this.eventService.dispatchEventOnce({type:c.EVENT_ROW_COUNT_READY});const e=this.createModelUpdatedEvent();this.eventService.dispatchEvent(e);}updateRowHeights(){this.forEachNode(t=>{t.setRowHeight(this.rowHeight),t.setRowTop(this.rowHeight*t.rowIndex);});const e=this.createModelUpdatedEvent();this.eventService.dispatchEvent(e);}destroyCache(){this.infiniteCache&&(this.infiniteCache=this.destroyBean(this.infiniteCache));}onCacheUpdated(){const e=this.createModelUpdatedEvent();this.eventService.dispatchEvent(e);}getRow(e){if(this.infiniteCache&&!(e>=this.infiniteCache.getRowCount()))return this.infiniteCache.getRow(e);}getRowNode(e){let t;return this.forEachNode(i=>{i.id===e&&(t=i);}),t;}forEachNode(e){this.infiniteCache&&this.infiniteCache.forEachNodeDeep(e);}getTopLevelRowCount(){return this.getRowCount();}getTopLevelRowDisplayedIndex(e){return e;}getRowIndexAtPixel(e){if(0!==this.rowHeight){const t=Math.floor(e/this.rowHeight),i=this.getRowCount()-1;return t>i?i:t;}return 0;}getRowCount(){return this.infiniteCache?this.infiniteCache.getRowCount():0;}isRowPresent(e){return!!this.getRowNode(e.id);}refreshCache(){this.infiniteCache&&this.infiniteCache.refreshCache();}purgeCache(){this.infiniteCache&&this.infiniteCache.purgeCache();}isLastRowIndexKnown(){return!!this.infiniteCache&&this.infiniteCache.isLastRowIndexKnown();}setRowCount(e,t){this.infiniteCache&&this.infiniteCache.setRowCount(e,t);}};Le([g("filterManager")],St.prototype,"filterManager",2),Le([g("sortController")],St.prototype,"sortController",2),Le([g("selectionService")],St.prototype,"selectionService",2),Le([g("rowRenderer")],St.prototype,"rowRenderer",2),Le([g("rowNodeBlockLoader")],St.prototype,"rowNodeBlockLoader",2),Le([T],St.prototype,"init",1),Le([Ee],St.prototype,"destroyDatasource",1);var Gu={version:"31.3.4",moduleName:"@ag-grid-community/infinite-row-model",rowModel:"infinite",beans:[St=Le([L("rowModel")],St)]},Nu=Object.defineProperty,gg=Object.defineProperties,fg=Object.getOwnPropertyDescriptor,mg=Object.getOwnPropertyDescriptors,xu=Object.getOwnPropertySymbols,Cg=Object.prototype.hasOwnProperty,vg=Object.prototype.propertyIsEnumerable,Ou=(e,t,i)=>t in e?Nu(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,_u=(e,t)=>
1{for(var i in t||(t={}))Cg.call(t,i)&&Ou(e,i,t[i]);if(xu)for(var i of xu(t))vg.call(t,i)&&Ou(e,i,t[i]);return e;},Vu=(e,t)=>gg(e,mg(t)),Be=(e,t,i,s)=>{for(var n,o=s>1?void 0:s?fg(t,i):t,r=e.length-1;r>=0;r--)(n=e[r])&&(o=(s?n(t,i,o):n(o))||o);return s&&o&&Nu(t,i,o),o;},Lo=(e,t,i)=>new Promise((s,o)=>{var r=a=>{try{l(i.next(a));}catch(u){o(u);}},n=a=>{try{l(i.throw(a));}catch(u){o(u);}},l=a=>a.done?s(a.value):Promise.resolve(a.value).then(r,n);l((i=i.apply(e,t)).next());}),Hu=class{setBeans(e){this.beans=e;}getFileName(e){const t=this.getDefaultFileExtension();return(null==e||!e.length)&&(e=this.getDefaultFileName()),-1===e.indexOf(".")?`${e}.${t}`:e;}getData(e){const t=this.createSerializingSession(e);return this.beans.gridSerializer.serialize(t,e);}getDefaultFileName(){return`export.${this.getDefaultFileExtension()}`;}},ku=class{constructor(e){this.groupColumns=[];const{columnModel:t,valueService:i,gos:s,processCellCallback:o,processHeaderCallback:r,processGroupHeaderCallback:n,processRowGroupCallback:l}=e;this.columnModel=t,this.valueService=i,this.gos=s,this.processCellCallback=o,this.processHeaderCallback=r,this.processGroupHeaderCallback=n,this.processRowGroupCallback=l;}prepare(e){this.groupColumns=e.filter(t=>!!t.getColDef().showRowGroup);}extractHeaderValue(e){return this.getHeaderName(this.processHeaderCallback,e)??"";}extractRowCellValue(e,t,i,s,o){const n=this.gos.get("groupHideOpenParents")&&!o.footer||!this.shouldRenderGroupSummaryCell(o,e,t)?this.valueService.getValue(e,o):this.createValueForGroupNode(e,o);return this.processCell({accumulatedRowIndex:i,rowNode:o,column:e,value:n,processCellCallback:this.processCellCallback,type:s});}shouldRenderGroupSummaryCell(e,t,i){var s;if(!e||!e.group)return!1;if(-1!==this.groupColumns.indexOf(t)){if(null!=(null==(s=e.groupData)?void 0:s[t.getId()])||this.gos.isRowModelType("serverSide")&&e.group)return!0;if(e.footer&&-1===e.level){const l=t.getColDef();return null==l||!0===l.showRowGroup||l.showRowGroup===this.columnModel.getRowGroupColumns()[0].getId();}}const n=this.gos.isGroupUseEntireRow(this.columnModel.isPivotMode());return 0===i&&n;}getHeaderName(e,t){return e?e(this.gos.addGridCommonParams({column:t})):this.columnModel.getDisplayNameForColumn(t,"csv",!0);}createValueForGroupNode(e,t){if(this.processRowGroupCallback)return this.processRowGroupCallback(this.gos.addGridCommonParams({column:e,node:t}));const i=this.gos.get("treeData"),s=this.gos.get("suppressGroupMaintainValueType"),o=a=>{var u,h;if(i||s)return a.key;const p=null==(u=a.groupData)?void 0:u[e.getId()];return p&&a.rowGroupColumn&&!1!==a.rowGroupColumn.getColDef().useValueFormatterForExport&&null!=(h=this.valueService.formatValue(a.rowGroupColumn,a,p))?h:p;},r=t.footer,n=[o(t)];if(!this.gos.isGroupMultiAutoColumn())for(;t.parent;)n.push(o(t=t.parent));const l=n.reverse().join(" -> ");return r?`Total ${l}`:l;}processCell(e){var t;const{accumulatedRowIndex:i,rowNode:s,column:o,value:r,processCellCallback:n,type:l}=e;return n?{value:null!=(t=n(this.gos.addGridCommonParams({accumulatedRowIndex:i,column:o,node:s,value:r,type:l,parseValue:a=>this.valueService.parseValue(o,s,a,this.valueService.getValue(o,s)),formatValue:a=>{var u;return null!=(u=this.valueService.formatValue(o,s,a))?u:a;}})))?t:""}:!1!==o.getColDef().useValueFormatterForExport?{value:r??"",valueFormatted:this.valueService.formatValue(o,s,r)}:{value:r??""};}},Bu=class{static download(e,t){const i=document.defaultView||window;if(!i)return void console.warn("AG Grid: There is no `window` associated with the current `document`");const s=document.createElement("a"),o=i.URL.createObjectURL(t);s.setAttribute("href",o),s.setAttribute("download",e),s.style.display="none",document.body.appendChild(s),s.dispatchEvent(new MouseEvent("click",{bubbles:!1,cancelable:!0,view:i})),document.body.removeChild(s),i.setTimeout(()=>{i.URL.revokeObjectURL(o);},0);}},wg=class extends ku{constructor(e){super(e),this.isFirstLine=!0,this.result="";const{suppressQuotes:t,columnSeparator:i}=e;this.suppressQuotes=t,this.columnSeparator=i;}addCustomContent(e){e&&("string"==typeof e?(/^\s*\n/.test(e)||this.beginNewLine(),e=e.replace(/\r?\n/g,"\r\n"),this.result+=e):e.forEach(t=>{this.beginNewLine(),t.forEach((i,s)=>{0!==s&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(i.data.value||""),i.mergeAcross&&this.appendEmptyCells(i.mergeAcross);});}));}onNewHeaderGroupingRow(){return this.beginNewLine(),{onColumn:this.onNewHeaderGroupingRowColumn.bind(this)};}onNewHeaderGroupingRowColumn(e,t,i,s){0!=i&&(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){0!=t&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(this.extractHeaderValue(e));}onNewBodyRow(){return this.beginNewLine(),{onColumn:this.onNewBodyRowColumn.bind(this)};}onNewBodyRowColumn(e,t,i){var s;0!=t&&(this.result+=this.columnSeparator);const o=this.extractRowCellValue(e,t,t,"csv",i);this.result+=this.putInQuotes(null!=(s=o.valueFormatted)?s:o.value);}putInQuotes(e){if(this.suppressQuotes)return e;if(null==e)return'""';let t;return"string"==typeof e?t=e:"function"==typeof e.toString?t=e.toString():(console.warn("AG Grid: unknown value type during csv conversion"),t=""),'"'+t.replace(/"/g,'""')+'"';}parse(){return this.result;}beginNewLine(){this.isFirstLine||(this.result+="\r\n"),this.isFirstLine=!1;}},Vt=class extends Hu{postConstruct(){this.setBeans({gridSerializer:this.gridSerializer,gos:this.gos});}getMergedParams(e){const t=this.gos.get("defaultCsvExportParams");return Object.assign({},t,e);}export(e){if(this.isExportSuppressed())return void console.warn("AG Grid: Export cancelled. Export is not allowed as per your configuration.");const t=this.getMergedParams(e),i=this.getData(t),s=new Blob(["\ufeff",i],{type:"text/plain"}),o="function"==typeof t.fileName?t.fileName(this.gos.getGridCommonParams()):t.fileName;Bu.download(this.getFileName(o),s);}exportDataAsCsv(e){this.export(e);}getDataAsCsv(e,t=!1){const i=t?Object.assign({},e):this.getMergedParams(e);return this.getData(i);}getDefaultFileExtension(){return"csv";}
1createSerializingSession(e){const{columnModel:t,valueService:i,gos:s}=this,{processCellCallback:o,processHeaderCallback:r,processGroupHeaderCallback:n,processRowGroupCallback:l,suppressQuotes:a,columnSeparator:u}=e;return new wg({columnModel:t,valueService:i,gos:s,processCellCallback:o||void 0,processHeaderCallback:r||void 0,processGroupHeaderCallback:n||void 0,processRowGroupCallback:l||void 0,suppressQuotes:a||!1,columnSeparator:u||","});}isExportSuppressed(){return this.gos.get("suppressCsvExport");}};Be([g("columnModel")],Vt.prototype,"columnModel",2),Be([g("valueService")],Vt.prototype,"valueService",2),Be([g("gridSerializer")],Vt.prototype,"gridSerializer",2),Be([g("gridOptionsService")],Vt.prototype,"gos",2),Be([T],Vt.prototype,"postConstruct",1),Vt=Be([L("csvCreator")],Vt);var Uu=(e=>(e[e.HEADER_GROUPING=0]="HEADER_GROUPING",e[e.HEADER=1]="HEADER",e[e.BODY=2]="BODY",e))(Uu||{}),ct=class extends R{serialize(e,t={}){const{allColumns:i,columnKeys:s,skipRowGroups:o}=t,r=this.getColumnsToExport(i,o,s);return B.compose(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))(e).parse();}processRow(e,t,i,s){const o=t.shouldRowBeSkipped||(()=>!1),r=this.gos.get("groupRemoveSingleChildren"),n=this.gos.get("groupRemoveLowestSingleChildren"),a=null!=t.rowPositions||!!t.onlySelected,u=this.gos.get("groupHideOpenParents")&&!a,h=this.columnModel.isPivotMode()?s.leafGroup:!s.group,p=!!s.footer;if(!h&&!p&&(t.skipRowGroups||1===s.allChildrenCount&&(r||n&&s.leafGroup)||u)||t.onlySelected&&!s.isSelected()||t.skipPinnedTop&&"top"===s.rowPinned||t.skipPinnedBottom&&"bottom"===s.rowPinned||-1===s.level&&!h&&!p||o(this.gos.addGridCommonParams({node:s})))return;const b=e.onNewBodyRow(s);if(i.forEach((E,F)=>{b.onColumn(E,F,s);}),t.getCustomContentBelowRow){const E=t.getCustomContentBelowRow(this.gos.addGridCommonParams({node:s}));E&&e.addCustomContent(E);}}appendContent(e){return t=>{const i=e.appendContent;return i&&t.addCustomContent(i),t;};}prependContent(e){return t=>{const i=e.prependContent;return i&&t.addCustomContent(i),t;};}prepareSession(e){return t=>(t.prepare(e),t);}exportColumnGroups(e,t){return i=>{if(!e.skipColumnGroupHeaders){const s=new hn(),o=this.displayedGroupCreator.createDisplayedGroups(t,s,null);this.recursivelyAddHeaderGroups(o,i,e.processGroupHeaderCallback);}return i;};}exportHeaders(e,t){return i=>{if(!e.skipColumnHeaders){const s=i.onNewHeaderRow();t.forEach((o,r)=>{s.onColumn(o,r,void 0);});}return i;};}processPinnedTopRows(e,t){return i=>{const s=this.processRow.bind(this,i,e,t);return e.rowPositions?e.rowPositions.filter(o=>"top"===o.rowPinned).sort((o,r)=>o.rowIndex-r.rowIndex).map(o=>this.pinnedRowModel.getPinnedTopRow(o.rowIndex)).forEach(s):this.pinnedRowModel.forEachPinnedTopRow(s),i;};}processRows(e,t){return i=>{const s=this.rowModel,o=s.getType(),r="clientSide"===o,n="serverSide"===o,l=!r&&e.onlySelected,a=this.processRow.bind(this,i,e,t),{exportedRows:u="filteredAndSorted"}=e;if(e.rowPositions)e.rowPositions.filter(h=>null==h.rowPinned).sort((h,p)=>h.rowIndex-p.rowIndex).map(h=>s.getRow(h.rowIndex)).forEach(a);
1else if(this.columnModel.isPivotMode())r?s.forEachPivotNode(a,!0):n?s.forEachNodeAfterFilterAndSort(a,!0):s.forEachNode(a);else if(e.onlySelectedAllPages||l){const h=this.selectionService.getSelectedNodes();this.replicateSortedOrder(h),h.forEach(a);}else"all"===u?s.forEachNode(a):r||n?s.forEachNodeAfterFilterAndSort(a,!0):s.forEachNode(a);return i;};}replicateSortedOrder(e){const t=this.sortController.getSortOptions(),i=(s,o)=>{var r,n,l,a;return null!=s.rowIndex&&null!=o.rowIndex?s.rowIndex-o.rowIndex:s.level===o.level?(null==(r=s.parent)?void 0:r.id)===(null==(n=o.parent)?void 0:n.id)?this.rowNodeSorter.compareRowNodes(t,{rowNode:s,currentPos:null!=(l=s.rowIndex)?l:-1},{rowNode:o,currentPos:null!=(a=o.rowIndex)?a:-1}):i(s.parent,o.parent):s.level>o.level?i(s.parent,o):i(s,o.parent);};e.sort(i);}processPinnedBottomRows(e,t){return i=>{const s=this.processRow.bind(this,i,e,t);return e.rowPositions?e.rowPositions.filter(o=>"bottom"===o.rowPinned).sort((o,r)=>o.rowIndex-r.rowIndex).map(o=>this.pinnedRowModel.getPinnedBottomRow(o.rowIndex)).forEach(s):this.pinnedRowModel.forEachPinnedBottomRow(s),i;};}getColumnsToExport(e=!1,t=!1,i){const s=this.columnModel.isPivotMode();if(i&&i.length)return this.columnModel.getGridColumns(i);const o=this.gos.get("treeData");let r=[];return r=e&&!s?this.columnModel.getAllGridColumns():this.columnModel.getAllDisplayedColumns(),t&&!o&&(r=r.filter(n=>n.getColId()!==di)),r;}recursivelyAddHeaderGroups(e,t,i){const s=[];e.forEach(o=>
1{o.getChildren&&o.getChildren().forEach(n=>s.push(n));}),e.length>0&&e[0]instanceof pe&&this.doAddHeaderHeader(t,e,i),s&&s.length>0&&this.recursivelyAddHeaderGroups(s,t,i);}doAddHeaderHeader(e,t,i){const s=e.onNewHeaderGroupingRow();let o=0;t.forEach(r=>{const n=r;let l;l=i?i(this.gos.addGridCommonParams({columnGroup:n})):this.columnModel.getDisplayNameForColumnGroup(n,"header");const a=n.getLeafColumns().reduce((u,h,p,f)=>{let m=B.last(u);return"open"===h.getColumnGroupShow()?(!m||null!=m[1])&&(m=[p],u.push(m)):m&&null==m[1]&&(m[1]=p-1),p===f.length-1&&m&&null==m[1]&&(m[1]=p),u;},[]);s.onColumn(n,l||"",o++,n.getLeafColumns().length-1,a);});}};Be([g("displayedGroupCreator")],ct.prototype,"displayedGroupCreator",2),Be([g("columnModel")],ct.prototype,"columnModel",2),Be([g("rowModel")],ct.prototype,"rowModel",2),Be([g("pinnedRowModel")],ct.prototype,"pinnedRowModel",2),Be([g("selectionService")],ct.prototype,"selectionService",2),Be([g("rowNodeSorter")],ct.prototype,"rowNodeSorter",2),Be([g("sortController")],ct.prototype,"sortController",2),ct=Be([L("gridSerializer")],ct);var zu={version:"31.3.4",moduleName:"@ag-grid-community/csv-export",beans:[Vt,ct]},Eg=class{static createHeader(e={}){const s=["version"];return e.version||(e.version="1.0"),e.encoding&&s.push("encoding"),e.standalone&&s.push("standalone"),`<?xml ${s.map(r=>`${r}="${e[r]}"`).join(" ")} ?>`;}static createXml(e,t){let i="";e.properties&&(e.properties.prefixedAttributes&&e.properties.prefixedAttributes.forEach(o=>{Object.keys(o.map).forEach(r=>{i+=this.returnAttributeIfPopulated(o.prefix+r,o.map[r],t);});}),e.properties.rawMap&&Object.keys(e.properties.rawMap).forEach(o=>{i+=this.returnAttributeIfPopulated(o,e.properties.rawMap[o],t);}));let s="<"+e.name+i;return e.children||null!=e.textNode?null!=e.textNode?s+">"+e.textNode+"</"+e.name+">\r\n":(s+=">\r\n",e.children&&e.children.forEach(o=>{s+=this.createXml(o,t);}),s+"</"+e.name+">\r\n"):s+"/>\r\n";}static returnAttributeIfPopulated(e,t,i){if(!t&&""!==t&&0!==t)return"";let s=t;return"boolean"==typeof t&&i&&(s=i(t)),` ${e}="${s}"`;}};function De(e,t){let i="";for(let s=0;s<t;s++)i+=String.fromCharCode(255&e),e>>>=8;return i;}var $u=e=>e.length?(e=>{if(!e.length)return 0;let t=-1,i=0,s=0,o=0;for(let r=0;r<e.length;r++)i=e[r],s=255&(t^i),o=Dg[s],t=t>>>8^o;return-1^t;})("string"==typeof e?new TextEncoder().encode(e):e):0,Dg=new Uint32Array([0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117]),{utf8_encode:Ag}=B,Fg=(e,t)=>
1Lo(void 0,null,function*(){const{content:i}=e,{size:s,content:o}=i?ju(i):{size:0,content:Uint8Array.from([])};let r,n,l=!1;if("file"===e.type&&o&&s>0){const h=yield(e=>Lo(void 0,null,function*(){const t=new Blob([e]),{size:i,content:s}=yield(e=>Lo(void 0,null,function*(){let t=0;const i=[],s=new WritableStream({write:n=>{i.push(n),t+=n.length;}}),o=new ReadableStream({start:n=>{const l=new FileReader();l.onload=a=>{var u;null!=(u=a.target)&&u.result&&n.enqueue(a.target.result),n.close();},l.readAsArrayBuffer(e);}}),r=new window.CompressionStream("deflate-raw");return yield o.pipeThrough(r).pipeTo(s),{size:t,content:new Blob(i)};}))(t);return{size:i,content:new Uint8Array(yield s.arrayBuffer())};}))(o);r=h.content,n=h.size,l=!0;}const u=Yu(e,l,t,s,o,n);return Vu(_u({},u),{content:r||o,isCompressed:l});}),Pg=(e,t)=>{const{content:i}=e,{content:s}=i?ju(i):{content:Uint8Array.from([])},o=Yu(e,!1,t,s.length,s,void 0);return Vu(_u({},o),{content:s,isCompressed:!1});},Yu=(e,t,i,s,o,r)=>{const{content:n,path:l,created:a}=e,u=(e=>{let t=e.getHours();return t<<=6,t|=e.getMinutes(),t<<=5,t|=e.getSeconds()/2,t;})(a),h=(e=>{let t=e.getFullYear()-1980;return t<<=4,t|=e.getMonth()+1,t<<=5,t|=e.getDate(),t;})(a),p=$u(o),f=void 0!==r?r:s,m=Ag(l),v=m!==l;let w="";if(v){const F=De(1,1)+De($u(m),4)+m;w="up"+De(F.length,2)+F;}const S="\x14\0"+(v?"\0\b":"\0\0")+De(t?8:0,2)+De(u,2)+De(h,2)+De(f?p:0,4)+De(r??s,4)+De(s,4)+De(m.length,2)+De(w.length,2),b="PK\x03\x04"+S+m+w,E="PK\x01\x02\x14\0"+S+"\0\0\0\0\0\0"+(n?"\0\0\0\0":"\x10\0\0\0")+De(i,4)+m+w;return{localFileHeader:Uint8Array.from(b,F=>F.charCodeAt(0)),centralDirectoryHeader:Uint8Array.from(E,F=>F.charCodeAt(0))};},ju=e=>{let t;return t="string"==typeof e?(e=>{const t=new Uint8Array(e.length);for(let i=0;i<e.length;i++)t[i]=e.charCodeAt(i);return t;})(atob(e.split(";base64,")[1])):e,{size:t.length,content:t};},Bl=class{static addFolders(e){e.forEach(this.addFolder.bind(this));}static addFolder(e){this.folders.push({path:e,created:new Date(),isBase64:!1,type:"folder"});}static addFile(e,t,i=!1){this.files.push({path:e,created:new Date(),content:i?t:new TextEncoder().encode(t),isBase64:i,type:"file"});}static getZipFile(e="application/zip"){return Lo(this,null,function*(){const t=yield this.buildCompressedFileStream();return this.clearStream(),new Blob([t],{type:e});});}static getUncompressedZipFile(e="application/zip"){const t=this.buildFileStream();return this.clearStream(),new Blob([t],{type:e});}static clearStream(){this.folders=[],this.files=[];}static packageFiles(e){let t=new Uint8Array(0),i=new Uint8Array(0),s=0,o=0;for(const l of e){const{localFileHeader:a,centralDirectoryHeader:u,content:h}=l,p=new Uint8Array(t.length+a.length);p.set(t),p.set(a,t.length),t=p;const f=new Uint8Array(t.length+h.length);f.set(t),f.set(h,t.length),t=f;const m=new Uint8Array(i.length+u.length);m.set(i),m.set(u,i.length),i=m,s+=a.length+h.length,o+=u.length;}const r=((e,t,i)=>{const s="PK\x05\x06\0\0\0\0"+De(e,2)+De(e,2)+De(t,4)+De(i,4)+"\0\0";return Uint8Array.from(s,o=>o.charCodeAt(0));})(e.length,o,s),n=new Uint8Array(t.length+i.length+r.length);return n.set(t),n.set(i,t.length),n.set(r,t.length+i.length),n;}static buildCompressedFileStream(){return Lo(this,null,function*(){const e=[...this.folders,...this.files],t=[];let i=0;for(const s of e){const o=yield Fg(s,i),{localFileHeader:r,content:n}=o;t.push(o),i+=r.length+n.length;}return this.packageFiles(t);});}static buildFileStream(){const e=[...this.folders,...this.files],t=[];let i=0;for(const s of e){const o=Pg(s,i),{localFileHeader:r,content:n}=o;t.push(o),i+=r.length+n.length;}return this.packageFiles(t);}};Bl.folders=[],Bl.files=[],q.__registerModules([Iu,Gu,zu],!1,void 0);}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.