ag-grid-enterprise
Version:
Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
1 lines • 2.94 MB
JavaScript
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.agGrid=t():e.agGrid=t()}(self,(function(){return function(){var e={7886:function(e,t,i){var a,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,s=Object.prototype.hasOwnProperty,l={};((e,t)=>{for(var i in t)n(e,i,{get:t[i],enumerable:!0})})(l,{ClientSideRowModelModule:()=>A}),e.exports=(a=l,((e,t,i,a)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let l of o(t))s.call(e,l)||l===i||n(e,l,{get:()=>t[l],enumerable:!(a=r(t,l))||a.enumerable});return e})(n({},"__esModule",{value:!0}),a));var c=i(3423),d=i(3423),h=i(3423),u=class{constructor(e,t,i,a,n,r){this.nextId=0,this.rowCountReady=!1,this.allNodesMap={},this.rootNode=e,this.gos=t,this.eventService=i,this.funcColsService=a,this.beans=r,this.selectionService=n,this.rootNode.group=!0,this.rootNode.level=-1,this.rootNode.id="ROOT_NODE_ID",this.rootNode.allLeafChildren=[],this.rootNode.childrenAfterGroup=[],this.rootNode.childrenAfterSort=[],this.rootNode.childrenAfterAggFilter=[],this.rootNode.childrenAfterFilter=[]}getCopyOfNodesMap(){return(0,h._cloneObject)(this.allNodesMap)}getRowNode(e){return this.allNodesMap[e]}setRowData(e){if("string"==typeof e)return void(0,h._warnOnce)("rowData must be an array.");this.rowCountReady=!0,this.dispatchRowDataUpdateStartedEvent(e);const t=this.rootNode,i=this.rootNode.sibling;t.childrenAfterFilter=null,t.childrenAfterGroup=null,t.childrenAfterAggFilter=null,t.childrenAfterSort=null,t.childrenMapped=null,t.updateHasChildren(),this.nextId=0,this.allNodesMap={},e?t.allLeafChildren=e.map((e=>this.createNode(e,this.rootNode,0))):(t.allLeafChildren=[],t.childrenAfterGroup=[]),i&&(i.childrenAfterFilter=t.childrenAfterFilter,i.childrenAfterGroup=t.childrenAfterGroup,i.childrenAfterAggFilter=t.childrenAfterAggFilter,i.childrenAfterSort=t.childrenAfterSort,i.childrenMapped=t.childrenMapped,i.allLeafChildren=t.allLeafChildren)}updateRowData(e,t){this.rowCountReady=!0,this.dispatchRowDataUpdateStartedEvent(e.add);const i={remove:[],update:[],add:[]},a=[];return this.executeRemove(e,i,a),this.executeUpdate(e,i,a),this.executeAdd(e,i),this.updateSelection(a,"rowDataChanged"),t&&(0,h._sortRowNodesByOrder)(this.rootNode.allLeafChildren,t),i}isRowCountReady(){return this.rowCountReady}dispatchRowDataUpdateStartedEvent(e){const t={type:"rowDataUpdateStarted",firstRowData:e?.length?e[0]:null};this.eventService.dispatchEvent(t)}updateSelection(e,t){const i=e.length>0;if(i&&this.selectionService.setNodesSelected({newValue:!1,nodes:e,suppressFinishActions:!0,source:t}),this.selectionService.updateGroupsFromChildrenSelections(t),i){const e={type:"selectionChanged",source:t};this.eventService.dispatchEvent(e)}}executeAdd(e,t){const{add:i,addIndex:a}=e;if((0,h._missingOrEmpty)(i))return;const n=i.map((e=>this.createNode(e,this.rootNode,0))),r=this.rootNode.allLeafChildren;if("number"==typeof a&&a>=0){const e=r.length;let t=a;if(this.gos.get("treeData")&&a>0&&e>0)for(let i=0;i<e;i++)if(r[i]?.rowIndex==a-1){t=i+1;break}const i=r.slice(0,t),o=r.slice(t,r.length);this.rootNode.allLeafChildren=[...i,...n,...o]}else this.rootNode.allLeafChildren=[...r,...n];this.rootNode.sibling&&(this.rootNode.sibling.allLeafChildren=r),t.add=n}executeRemove(e,t,i){const{remove:a}=e;if((0,h._missingOrEmpty)(a))return;const n={};a.forEach((e=>{const a=this.lookupRowNode(e);a&&(a.isSelected()&&i.push(a),a.clearRowTopAndRowIndex(),n[a.id]=!0,delete this.allNodesMap[a.id],t.remove.push(a))})),this.rootNode.allLeafChildren=this.rootNode.allLeafChildren?.filter((e=>!n[e.id]))??null,this.rootNode.sibling&&(this.rootNode.sibling.allLeafChildren=this.rootNode.allLeafChildren)}executeUpdate(e,t,i){const{update:a}=e;(0,h._missingOrEmpty)(a)||a.forEach((e=>{const a=this.lookupRowNode(e);a&&(a.updateData(e),!a.selectable&&a.isSelected()&&i.push(a),this.setMasterForRow(a,e,0,!1),t.update.push(a))}))}lookupRowNode(e){const t=this.gos.getRowIdCallback();let i;if(t){const a=t({data:e,level:0});if(i=this.allNodesMap[a],!i)return(0,h._errorOnce)(`could not find row id=${a}, data item was not found for this id`),null}else if(i=this.rootNode.allLeafChildren?.find((t=>t.data===e)),!i)return(0,h._errorOnce)("could not find data item as object was not found",e),(0,h._errorOnce)("Consider using getRowId to help the Grid find matching row data"),null;return i||null}createNode(e,t,i){const a=new h.RowNode(this.beans);return a.group=!1,this.setMasterForRow(a,e,i,!0),t&&(a.parent=t),a.level=i,a.setDataAndId(e,this.nextId.toString()),this.allNodesMap[a.id]&&(0,h._warnOnce)(`duplicate node id '${a.id}' detected from getRowId callback, this could cause issues in your grid.`),this.allNodesMap[a.id]=a,this.nextId++,a}setMasterForRow(e,t,i,a){if(this.gos.get("treeData"))e.setMaster(!1),a&&(e.expanded=!1);else{if(this.gos.get("masterDetail")){const i=this.gos.get("isRowMaster");i?e.setMaster(i(t)):e.setMaster(!0)}else e.setMaster(!1);if(a){const t=this.funcColsService.getRowGroupColumns(),a=i+(t?t.length:0);e.expanded=!!e.master&&this.isExpanded(a)}}}isExpanded(e){const t=this.gos.get("groupDefaultExpanded");return-1===t||e<t}},g=class extends d.BeanStub{constructor(){super(...arguments),this.beanName="rowModel",this.onRowHeightChanged_debounced=(0,d._debounce)(this.onRowHeightChanged.bind(this),100),this.rowsToDisplay=[],this.hasStarted=!1,this.shouldSkipSettingDataOnStart=!1,this.isRefreshingModel=!1,this.rowCountReady=!1}wireBeans(e){this.beans=e,this.columnModel=e.columnModel,this.funcColsService=e.funcColsService,this.selectionService=e.selectionService,this.valueCache=e.valueCache,this.environment=e.environment,this.filterStage=e.filterStage,this.sortStage=e.sortStage,this.flattenStage=e.flattenStage,this.groupStage=e.groupStage,this.aggregationStage=e.aggregationStage,this.pivotStage=e.pivotStage,this.filterAggregatesStage=e.filterAggregatesStage}postConstruct(){const e=this.refreshModel.bind(this,{step:d.ClientSideRowModelSteps.EVERYTHING}),t=!this.gos.get("suppressAnimationFrame"),i=this.refreshModel.bind(this,{step:d.ClientSideRowModelSteps.EVERYTHING,afterColumnsChanged:!0,keepRenderedRows:!0,animate:t});this.addManagedEventListeners({newColumnsLoaded:i,columnRowGroupChanged:e,columnValueChanged:this.onValueChanged.bind(this),columnPivotChanged:this.refreshModel.bind(this,{step:d.ClientSideRowModelSteps.PIVOT}),filterChanged:this.onFilterChanged.bind(this),sortChanged:this.onSortChanged.bind(this),columnPivotModeChanged:e,gridStylesChanged:this.onGridStylesChanges.bind(this),gridReady:this.onGridReady.bind(this)}),this.addPropertyListeners(),this.rootNode=new d.RowNode(this.beans),this.nodeManager=new u(this.rootNode,this.gos,this.eventService,this.funcColsService,this.selectionService,this.beans)}addPropertyListeners(){const e=new Set(["treeData","masterDetail"]),t=new Set(["groupDefaultExpanded","groupAllowUnbalanced","initialGroupOrderComparator","groupHideOpenParents","groupDisplayType"]),i=new Set(["excludeChildrenWhenTreeDataFiltering"]),a=new Set(["removePivotHeaderRowWhenSingleValueColumn","pivotRowTotals","pivotColumnGroupTotals","suppressExpandablePivotGroups"]),n=new Set(["getGroupRowAgg","alwaysAggregateAtRootLevel","groupIncludeTotalFooter","suppressAggFilteredOnly","grandTotalRow"]),r=new Set(["postSortRows","groupDisplayType","accentedSort"]),o=new Set([]),s=new Set(["groupRemoveSingleChildren","groupRemoveLowestSingleChildren","groupIncludeFooter","groupTotalRow"]),l=[...e,...t,...i,...a,...a,...n,...r,...o,...s];this.addManagedPropertyListeners(l,(l=>{const c=l.changeSet?.properties;if(!c)return;const h=e=>c.some((t=>e.has(t)));h(e)?this.setRowData(this.rootNode.allLeafChildren.map((e=>e.data))):h(t)?this.refreshModel({step:d.ClientSideRowModelSteps.EVERYTHING}):h(i)?this.refreshModel({step:d.ClientSideRowModelSteps.FILTER}):h(a)?this.refreshModel({step:d.ClientSideRowModelSteps.PIVOT}):h(n)?this.refreshModel({step:d.ClientSideRowModelSteps.AGGREGATE}):h(r)?this.refreshModel({step:d.ClientSideRowModelSteps.SORT}):h(o)?this.refreshModel({step:d.ClientSideRowModelSteps.FILTER_AGGREGATES}):h(s)&&this.refreshModel({step:d.ClientSideRowModelSteps.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,a){let n,r=!1;do{n=!1;const o=this.getRowIndexAtPixel(e),s=this.getRowIndexAtPixel(t),l=Math.max(o,i),c=Math.min(s,a);for(let e=l;e<=c;e++){const t=this.getRow(e);if(t.rowHeightEstimated){const e=this.gos.getRowHeightForNode(t);t.setRowHeight(e.height),n=!0,r=!0}}n&&this.setRowTopAndRowIndex()}while(n);return r}setRowTopAndRowIndex(){const e=this.environment.getDefaultRowHeight();let t=0;const i=new Set,a=this.gos.isDomLayout("normal");for(let n=0;n<this.rowsToDisplay.length;n++){const r=this.rowsToDisplay[n];if(null!=r.id&&i.add(r.id),null==r.rowHeight){const t=this.gos.getRowHeightForNode(r,a,e);r.setRowHeight(t.height,t.estimated)}r.setRowTop(t),r.setRowIndex(n),t+=r.rowHeight}return i}clearRowTopAndRowIndex(e,t){const i=e.isActive(),a=e=>{e&&null!=e.id&&!t.has(e.id)&&e.clearRowTopAndRowIndex()},n=e=>{if(a(e),a(e.detailNode),a(e.sibling),e.hasChildren()&&e.childrenAfterGroup){const t=-1==e.level;i&&!t&&!e.expanded||e.childrenAfterGroup.forEach(n)}};n(this.rootNode)}ensureRowsAtPixel(e,t,i=0){const a=this.getRowIndexAtPixel(t),n=this.getRow(a),r=!this.gos.get("suppressAnimationFrame");return n!==e[0]&&(e.forEach((e=>{(0,d._removeFromArray)(this.rootNode.allLeafChildren,e)})),e.forEach(((e,t)=>{(0,d._insertIntoArray)(this.rootNode.allLeafChildren,e,Math.max(a+i,0)+t)})),this.refreshModel({step:d.ClientSideRowModelSteps.EVERYTHING,keepRenderedRows:!0,keepEditingRows:!0,animate:r}),!0)}highlightRowAtPixel(e,t){const i=null!=t?this.getRowIndexAtPixel(t):null,a=null!=i?this.getRow(i):null;if(!a||!e||a===e||null==t)return void(this.lastHighlightedRow&&(this.lastHighlightedRow.setHighlighted(null),this.lastHighlightedRow=null));const n=this.getHighlightPosition(t,a);this.lastHighlightedRow&&this.lastHighlightedRow!==a&&(this.lastHighlightedRow.setHighlighted(null),this.lastHighlightedRow=null),a.setHighlighted(n),this.lastHighlightedRow=a}getHighlightPosition(e,t){if(!t){const i=this.getRowIndexAtPixel(e);if(!(t=this.getRow(i||0)))return d.RowHighlightPosition.Below}const{rowTop:i,rowHeight:a}=t;return e-i<a/2?d.RowHighlightPosition.Above:d.RowHighlightPosition.Below}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 e=this.rootNode.sibling?1:0,t=this.rootNode.childrenAfterAggFilter;return(t?t.length:0)+e}getTopLevelRowDisplayedIndex(e){if(this.rowsToDisplay&&this.rowsToDisplay[0]===this.rootNode)return e;let t=e;if(this.rowsToDisplay[0].footer){if(0===e)return 0;t-=1}let i=this.rootNode.childrenAfterSort[t];if(this.gos.get("groupHideOpenParents"))for(;i.expanded&&i.childrenAfterSort&&i.childrenAfterSort.length>0;)i=i.childrenAfterSort[0];return i.rowIndex}getRowBounds(e){if((0,d._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:d.ClientSideRowModelSteps.MAP,keepRenderedRows:!0,animate:e})}onFilterChanged(e){if(e.afterDataChange)return;const t=this.gos.isAnimateRows(),i=0===e.columns.length||e.columns.some((e=>e.isPrimary()))?d.ClientSideRowModelSteps.FILTER:d.ClientSideRowModelSteps.FILTER_AGGREGATES;this.refreshModel({step:i,keepRenderedRows:!0,animate:t})}onSortChanged(){const e=this.gos.isAnimateRows();this.refreshModel({step:d.ClientSideRowModelSteps.SORT,keepRenderedRows:!0,animate:e,keepEditingRows:!0})}getType(){return"clientSide"}onValueChanged(){this.columnModel.isPivotActive()?this.refreshModel({step:d.ClientSideRowModelSteps.PIVOT}):this.refreshModel({step:d.ClientSideRowModelSteps.AGGREGATE})}createChangePath(e){const t=(0,d._missingOrEmpty)(e),i=new d.ChangedPath(!1,this.rootNode);return(t||this.gos.get("treeData"))&&i.setInactive(),i}isSuppressModelUpdateAfterUpdateTransaction(e){if(!this.gos.get("suppressModelUpdateAfterUpdateTransaction"))return!1;if(null==e.rowNodeTransactions)return!1;const t=e.rowNodeTransactions.filter((e=>null!=e.add&&e.add.length>0||null!=e.remove&&e.remove.length>0));return null==t||0==t.length}buildRefreshModelParams(e){let t=d.ClientSideRowModelSteps.EVERYTHING;const i={everything:d.ClientSideRowModelSteps.EVERYTHING,group:d.ClientSideRowModelSteps.EVERYTHING,filter:d.ClientSideRowModelSteps.FILTER,map:d.ClientSideRowModelSteps.MAP,aggregate:d.ClientSideRowModelSteps.AGGREGATE,sort:d.ClientSideRowModelSteps.SORT,pivot:d.ClientSideRowModelSteps.PIVOT};if((0,d._exists)(e)&&(t=i[e]),(0,d._missing)(t))return void(0,d._errorOnce)(`invalid step ${e}, available steps are ${Object.keys(i).join(", ")}`);return{step:t,keepRenderedRows:!0,keepEditingRows:!0,animate:!this.gos.get("suppressAnimationFrame")}}refreshModel(e){if(!this.hasStarted||this.isRefreshingModel||this.columnModel.isChangeEventsDispatching())return;const t="object"==typeof e&&"step"in e?e:this.buildRefreshModelParams(e);if(!t)return;if(this.isSuppressModelUpdateAfterUpdateTransaction(t))return;const i=this.createChangePath(t.rowNodeTransactions);switch(this.isRefreshingModel=!0,t.step){case d.ClientSideRowModelSteps.EVERYTHING:this.doRowGrouping(t.rowNodeTransactions,t.rowNodeOrder,i,!!t.afterColumnsChanged);case d.ClientSideRowModelSteps.FILTER:this.doFilter(i);case d.ClientSideRowModelSteps.PIVOT:this.doPivot(i);case d.ClientSideRowModelSteps.AGGREGATE:this.doAggregate(i);case d.ClientSideRowModelSteps.FILTER_AGGREGATES:this.doFilterAggregates(i);case d.ClientSideRowModelSteps.SORT:this.doSort(t.rowNodeTransactions,i);case d.ClientSideRowModelSteps.MAP:this.doRowsToDisplay()}const a=this.setRowTopAndRowIndex();this.clearRowTopAndRowIndex(i,a),this.isRefreshingModel=!1;const n={type:"modelUpdated",animate:t.animate,keepRenderedRows:t.keepRenderedRows,newData:t.newData,newPage:!1,keepUndoRedoStack:t.keepUndoRedoStack};this.eventService.dispatchEvent(n)}isEmpty(){const e=(0,d._missing)(this.rootNode.allLeafChildren)||0===this.rootNode.allLeafChildren.length;return(0,d._missing)(this.rootNode)||e||!this.columnModel.isReady()}isRowsToRender(){return(0,d._exists)(this.rowsToDisplay)&&this.rowsToDisplay.length>0}getNodesInRangeForSelection(e,t){let i=!1,a=!1;const n=[],r=this.gos.get("groupSelectsChildren");return this.forEachNodeAfterFilterAndSort((o=>{if(a)return;if(i&&(o===t||o===e)&&(a=!0,o.group&&r))return void n.push(...o.allLeafChildren);if(!i){if(o!==t&&o!==e)return;i=!0}(!o.group||!r)&&n.push(o)})),n}setDatasource(e){(0,d._errorOnce)("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((0,d._last)(this.rowsToDisplay).rowTop<=e)return this.rowsToDisplay.length-1;let a=-1,n=-1;for(;;){const r=Math.floor((t+i)/2),o=this.rowsToDisplay[r];if(this.isRowInPixel(o,e))return r;o.rowTop<e?t=r+1:o.rowTop>e&&(i=r-1);if(a===t&&n===i)return r;a=t,n=i}}isRowInPixel(e,t){const i=e.rowTop,a=e.rowTop+e.rowHeight;return i<=t&&a>t}forEachLeafNode(e){this.rootNode.allLeafChildren&&this.rootNode.allLeafChildren.forEach(((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:a,includeFooterNodes:n}=e;let{index:r}=e;const o=e=>{const a=t[0]?.parent;if(!a)return;const o=n&&this.gos.getGrandTotalRow(),s=this.gos.getGroupTotalRowCallback(),l=n&&s({node:a});a===this.rootNode?o===e&&(a.createFooter(),i(a.sibling,r++)):l===e&&(a.createFooter(),i(a.sibling,r++))};o("top");for(let e=0;e<t.length;e++){const o=t[e];if(i(o,r++),o.hasChildren()&&!o.footer){let e=null;switch(a){case 0:e=o.childrenAfterGroup;break;case 1:e=o.childrenAfterAggFilter;break;case 2:e=o.childrenAfterSort;break;case 3:e=o.leafGroup?null:o.childrenAfterSort}e&&(r=this.recursivelyWalkNodesAndCallback({nodes:[...e],callback:i,recursionType:a,index:r,includeFooterNodes:n}))}}return o("bottom"),r}doAggregate(e){this.aggregationStage?.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(),a=n=>{n&&n.forEach((n=>{const r=()=>{n.expanded=e,a(n.childrenAfterGroup)};if(t){return void((0,d._exists)(n.childrenAfterGroup)&&r())}if(i){return void(!n.leafGroup&&r())}n.group&&r()}))};this.rootNode&&a(this.rootNode.childrenAfterGroup),this.refreshModel({step:d.ClientSideRowModelSteps.MAP});const n={type:"expandOrCollapseAll",source:e?"expandAll":"collapseAll"};this.eventService.dispatchEvent(n)}doSort(e,t){this.sortStage.execute({rowNode:this.rootNode,rowNodeTransactions:e,changedPath:t})}doRowGrouping(e,t,i,a){if(this.groupStage){if(e?this.groupStage.execute({rowNode:this.rootNode,rowNodeTransactions:e,rowNodeOrder:t,changedPath:i}):this.groupStage.execute({rowNode:this.rootNode,changedPath:i,afterColumnsChanged:a}),this.gos.get("groupSelectsChildren")){if(this.selectionService.updateGroupsFromChildrenSelections("rowGroupChanged",i)){const e={type:"selectionChanged",source:"rowGroupChanged"};this.eventService.dispatchEvent(e)}}}else 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:"rowCountReady"}))}doFilter(e){this.filterStage.execute({rowNode:this.rootNode,changedPath:e})}doPivot(e){this.pivotStage?.execute({rowNode:this.rootNode,changedPath:e})}getCopyOfNodesMap(){return this.nodeManager.getCopyOfNodesMap()}getRowNode(e){if("string"==typeof e&&0==e.indexOf(d.RowNode.ID_PREFIX_ROW_GROUP)){let t;return this.forEachNode((i=>{i.id===e&&(t=i)})),t}return this.nodeManager.getRowNode(e)}setRowData(e){this.selectionService.reset("rowDataChanged"),this.nodeManager.setRowData(e),this.hasStarted&&this.dispatchUpdateEventsAndRefresh()}dispatchUpdateEventsAndRefresh(){this.eventService.dispatchEvent({type:"rowDataUpdated"}),this.refreshModel({step:d.ClientSideRowModelSteps.EVERYTHING,newData:!0})}batchUpdateRowData(e,t){if(null==this.applyAsyncTransactionsTimeout){this.rowDataTransactionBatch=[];const e=this.gos.getAsyncTransactionWaitMillis();this.applyAsyncTransactionsTimeout=window.setTimeout((()=>{this.executeBatchUpdateRowData()}),e)}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;if(this.rowDataTransactionBatch&&this.rowDataTransactionBatch.forEach((a=>{const n=this.nodeManager.updateRowData(a.rowDataTransaction,void 0);t.push(n),a.callback&&e.push(a.callback.bind(null,n)),"number"==typeof a.rowDataTransaction.addIndex&&(i=!0)})),this.commonUpdateRowData(t,void 0,i),e.length>0&&window.setTimeout((()=>{e.forEach((e=>e()))}),0),t.length>0){const e={type:"asyncTransactionsFlushed",results:t};this.eventService.dispatchEvent(e)}this.rowDataTransactionBatch=null,this.applyAsyncTransactionsTimeout=void 0}updateRowData(e,t){this.valueCache.onDataChanged();const i=this.nodeManager.updateRowData(e,t),a="number"==typeof e.addIndex;return this.commonUpdateRowData([i],t,a),i}createRowNodeOrder(){if(this.gos.get("suppressMaintainUnsortedOrder"))return;const e={};if(this.rootNode&&this.rootNode.allLeafChildren)for(let t=0;t<this.rootNode.allLeafChildren.length;t++){e[this.rootNode.allLeafChildren[t].id]=t}return e}commonUpdateRowData(e,t,i){if(!this.hasStarted)return;const a=!this.gos.get("suppressAnimationFrame");i&&(t=this.createRowNodeOrder());this.eventService.dispatchEvent({type:"rowDataUpdated"}),this.refreshModel({step:d.ClientSideRowModelSteps.EVERYTHING,rowNodeTransactions:e,rowNodeOrder:t,keepRenderedRows:!0,keepEditingRows:!0,animate:a})}doRowsToDisplay(){this.rowsToDisplay=this.flattenStage.execute({rowNode:this.rootNode})}onRowHeightChanged(){this.refreshModel({step:d.ClientSideRowModelSteps.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(e){if(e.rowHeightChanged){if(this.columnModel.isAutoRowHeightActive())return;this.resetRowHeights()}}onGridReady(){this.hasStarted||this.setInitialData()}isRowDataLoaded(){return this.rowCountReady}},p=i(3423);var m=i(3423),f=class extends m.BeanStub{constructor(){super(...arguments),this.beanName="filterStage"}wireBeans(e){this.filterManager=e.filterManager}execute(e){const{changedPath:t}=e;this.filter(t)}filter(e){const t=!!this.filterManager?.isChildFilterPresent();this.filterNodes(t,e)}filterNodes(e,t){const i=(t,i)=>{t.hasChildren()?t.childrenAfterFilter=e&&!i?t.childrenAfterGroup.filter((e=>{const t=e.childrenAfterFilter&&e.childrenAfterFilter.length>0,i=e.data&&this.filterManager.doesRowPassFilter({rowNode:e});return t||i})):t.childrenAfterGroup:t.childrenAfterFilter=t.childrenAfterGroup,t.sibling&&(t.sibling.childrenAfterFilter=t.childrenAfterFilter)};if(this.doingTreeDataFiltering()){const e=(t,a)=>{if(t.childrenAfterGroup)for(let n=0;n<t.childrenAfterGroup.length;n++){const r=t.childrenAfterGroup[n],o=a||this.filterManager.doesRowPassFilter({rowNode:r});r.childrenAfterGroup?e(t.childrenAfterGroup[n],o):i(r,o)}i(t,a)},a=t=>e(t,!1);t.executeFromRootNode(a)}else{const e=e=>i(e,!1);t.forEachChangedNodeDepthFirst(e,!0)}}doingTreeDataFiltering(){return this.gos.get("treeData")&&!this.gos.get("excludeChildrenWhenTreeDataFiltering")}},v=i(3423),y=class extends v.BeanStub{constructor(){super(...arguments),this.beanName="flattenStage"}wireBeans(e){this.beans=e,this.columnModel=e.columnModel}execute(e){const t=e.rowNode,i=[],a=this.columnModel.isPivotMode(),n=a&&t.leafGroup,r=n?[t]:t.childrenAfterSort,o=this.getFlattenDetails();this.recursivelyAddToRowsToDisplay(o,r,i,a,0);if(!n&&i.length>0&&o.grandTotalRow){t.createFooter();const e="top"===o.grandTotalRow;this.addRowNodeToRowsToDisplay(o,t.sibling,i,0,e)}return 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,a,n){if(!(0,v._missingOrEmpty)(t))for(let r=0;r<t.length;r++){const o=t[r],s=o.hasChildren(),l=a&&!s,c=e.groupRemoveSingleChildren&&s&&1===o.childrenAfterGroup.length,d=e.groupRemoveLowestSingleChildren&&s&&o.leafGroup&&1===o.childrenAfterGroup.length,h=a&&o.leafGroup,u=e.hideOpenParents&&o.expanded&&!o.master&&!h;if(!(l||u||c||d)&&this.addRowNodeToRowsToDisplay(e,o,i,n),!a||!o.leafGroup)if(s){const t=c||d;if(o.expanded||t){const r=e.groupTotalRow({node:o});r||o.destroyFooter();const s=t?n:n+1;"top"===r&&(o.createFooter(),this.addRowNodeToRowsToDisplay(e,o.sibling,i,s)),this.recursivelyAddToRowsToDisplay(e,o.childrenAfterSort,i,a,s),"bottom"===r&&(o.createFooter(),this.addRowNodeToRowsToDisplay(e,o.sibling,i,s))}}else if(o.master&&o.expanded){const t=this.createDetailNode(o);this.addRowNodeToRowsToDisplay(e,t,i,n)}}}addRowNodeToRowsToDisplay(e,t,i,a,n){n?i.unshift(t):i.push(t),t.setUiLevel(e.isGroupMultiAutoColumn?0:a)}createDetailNode(e){if((0,v._exists)(e.detailNode))return e.detailNode;const t=new v.RowNode(this.beans);return t.detail=!0,t.selectable=!1,t.parent=e,(0,v._exists)(e.id)&&(t.id="detail_"+e.id),t.data=e.data,t.level=e.level+1,e.detailNode=t,t}},b=i(3423),C=class extends b.BeanStub{constructor(){super(...arguments),this.beanName="immutableService"}wireBeans(e){this.rowModel=e.rowModel,this.selectionService=e.selectionService}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,a]=t;this.clientSideRowModel.updateRowData(i,a)}createTransactionForRowData(e){if((0,b._missing)(this.clientSideRowModel))return void(0,b._errorOnce)("ImmutableService only works with ClientSideRowModel");const t=this.gos.getRowIdCallback();if(null==t)return void(0,b._errorOnce)("ImmutableService requires getRowId() callback to be implemented, your row data needs IDs!");const i={remove:[],update:[],add:[]},a=this.clientSideRowModel.getCopyOfNodesMap(),n=this.gos.get("suppressMaintainUnsortedOrder")?void 0:{};return(0,b._exists)(e)&&e.forEach(((e,r)=>{const o=t({data:e,level:0}),s=a[o];if(n&&(n[o]=r),s){s.data!==e&&i.update.push(e),a[o]=void 0}else i.add.push(e)})),(0,b._iterateObject)(a,((e,t)=>{t&&i.remove.push(t.data)})),[i,n]}onRowDataUpdated(){const e=this.gos.get("rowData");e&&(this.isActive()?this.setRowData(e):(this.selectionService.reset("rowDataChanged"),this.clientSideRowModel.setRowData(e)))}},w=i(3423),S=class extends w.BeanStub{constructor(){super(...arguments),this.beanName="sortService"}wireBeans(e){this.columnModel=e.columnModel,this.funcColsService=e.funcColsService,this.rowNodeSorter=e.rowNodeSorter,this.showRowGroupColsService=e.showRowGroupColsService}sort(e,t,i,a,n,r){const o=this.gos.get("groupMaintainOrder"),s=this.columnModel.getCols().some((e=>e.isRowGroupActive()));let l={};i&&a&&(l=this.calculateDirtyNodes(a));const c=this.columnModel.isPivotMode(),d=this.gos.getCallback("postSortRows"),h=a=>{this.pullDownGroupDataForHideOpenParents(a.childrenAfterAggFilter,!0);const h=c&&a.leafGroup;if(o&&s&&!a.leafGroup&&!r){const e=this.funcColsService.getRowGroupColumns()?.[a.level+1],t=null===e?.getSort(),i=a.childrenAfterAggFilter.slice(0);if(a.childrenAfterSort&&!t){const e={};a.childrenAfterSort.forEach(((t,i)=>{e[t.id]=i})),i.sort(((t,i)=>(e[t.id]??0)-(e[i.id]??0)))}a.childrenAfterSort=i}else a.childrenAfterSort=!t||h?a.childrenAfterAggFilter.slice(0):i?this.doDeltaSort(a,l,n,e):this.rowNodeSorter.doFullSort(a.childrenAfterAggFilter,e);if(a.sibling&&(a.sibling.childrenAfterSort=a.childrenAfterSort),this.updateChildIndexes(a),d){const e={nodes:a.childrenAfterSort};d(e)}};n&&n.forEachChangedNodeDepthFirst(h),this.updateGroupDataForHideOpenParents(n)}calculateDirtyNodes(e){const t={},i=e=>{e&&e.forEach((e=>t[e.id]=!0))};return e&&e.forEach((e=>{i(e.add),i(e.update),i(e.remove)})),t}doDeltaSort(e,t,i,a){const n=e.childrenAfterAggFilter,r=e.childrenAfterSort;if(!r)return this.rowNodeSorter.doFullSort(n,a);const o={},s=[];n.forEach((e=>{t[e.id]||!i.canSkip(e)?s.push(e):o[e.id]=!0}));const l=r.filter((e=>o[e.id])),c=(e,t)=>({currentPos:t,rowNode:e}),d=s.map(c).sort(((e,t)=>this.rowNodeSorter.compareRowNodes(a,e,t)));return this.mergeSortedArrays(a,d,l.map(c)).map((({rowNode:e})=>e))}mergeSortedArrays(e,t,i){const a=[];let n=0,r=0;for(;n<t.length&&r<i.length;){this.rowNodeSorter.compareRowNodes(e,t[n],i[r])<0?a.push(t[n++]):a.push(i[r++])}for(;n<t.length;)a.push(t[n++]);for(;r<i.length;)a.push(i[r++]);return a}updateChildIndexes(e){if((0,w._missing)(e.childrenAfterSort))return;const t=e.childrenAfterSort;for(let i=0;i<t.length;i++){const a=t[i],n=0===i,r=i===e.childrenAfterSort.length-1;a.setFirstChild(n),a.setLastChild(r),a.setChildIndex(i)}}updateGroupDataForHideOpenParents(e){if(!this.gos.get("groupHideOpenParents"))return;if(this.gos.get("treeData"))return(0,w._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=e=>{this.pullDownGroupDataForHideOpenParents(e.childrenAfterSort,!1),e.childrenAfterSort.forEach((e=>{e.hasChildren()&&t(e)}))};e&&e.executeFromRootNode((e=>t(e)))}pullDownGroupDataForHideOpenParents(e,t){this.gos.get("groupHideOpenParents")&&!(0,w._missing)(e)&&e.forEach((e=>{(this.showRowGroupColsService?.getShowRowGroupCols()??[]).forEach((i=>{const a=i.getColDef().showRowGroup;if("string"!=typeof a)return void(0,w._errorOnce)("groupHideOpenParents only works when specifying specific columns for colDef.showRowGroup");const n=a,r=this.columnModel.getColDefCol(n);if(!(r===e.rowGroupColumn))if(t)e.setGroupValue(i.getId(),void 0);else{const t=e.getFirstChildOfFirstChild(r);t&&e.setGroupValue(i.getId(),t.key)}}))}))}},x=i(3423),k=class extends x.BeanStub{constructor(){super(...arguments),this.beanName="sortStage"}wireBeans(e){this.sortService=e.sortService,this.sortController=e.sortController}execute(e){const t=this.sortController.getSortOptions(),i=(0,x._exists)(t)&&t.length>0,a=i&&(0,x._exists)(e.rowNodeTransactions)&&this.gos.get("deltaSort"),n=t.some((e=>this.gos.isColumnsSortingCoupledToGroup()?e.column.isPrimary()&&e.column.isRowGroupActive():!!e.column.getColDef().showRowGroup));this.sortService.sort(t,i,a,e.rowNodeTransactions,e.changedPath,n)}},M="32.0.2",R={version:M,moduleName:`${c.ModuleNames.ClientSideRowModelModule}-core`,rowModel:"clientSide",beans:[g,f,k,y,S,C]},D={version:M,moduleName:`${c.ModuleNames.ClientSideRowModelModule}-api`,beans:[c.RowModelHelperService],apiFunctions:{onGroupExpandedOrCollapsed:function(e){e.expansionService.onGroupExpandedOrCollapsed()},refreshClientSideRowModel:function(e,t){e.rowModelHelperService?.getClientSideRowModel()?.refreshModel(t)},forEachLeafNode:function(e,t){e.rowModelHelperService?.getClientSideRowModel()?.forEachLeafNode(t)},forEachNodeAfterFilter:function(e,t){e.rowModelHelperService?.getClientSideRowModel()?.forEachNodeAfterFilter(t)},forEachNodeAfterFilterAndSort:function(e,t){e.rowModelHelperService?.getClientSideRowModel()?.forEachNodeAfterFilterAndSort(t)},resetRowHeights:function(e){e.columnModel.isAutoRowHeightActive()?(0,p._warnOnce)("calling gridApi.resetRowHeights() makes no sense when using Auto Row Height."):e.rowModelHelperService?.getClientSideRowModel()?.resetRowHeights()},applyTransaction:function(e,t){return e.frameworkOverrides.wrapIncoming((()=>e.rowModelHelperService?.getClientSideRowModel()?.updateRowData(t)))},applyTransactionAsync:function(e,t,i){e.frameworkOverrides.wrapIncoming((()=>e.rowModelHelperService?.getClientSideRowModel()?.batchUpdateRowData(t,i)))},flushAsyncTransactions:function(e){e.frameworkOverrides.wrapIncoming((()=>e.rowModelHelperService?.getClientSideRowModel()?.flushAsyncTransactions()))},getBestCostNodeSelection:function(e){return e.selectionService.getBestCostNodeSelection()}},dependantModules:[R,c._CsrmSsrmSharedApiModule]},A={version:M,moduleName:c.ModuleNames.ClientSideRowModelModule,dependantModules:[R,D]}},3423:function(e,t,i){var a,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,s=Object.prototype.hasOwnProperty,l={};((e,t)=>{for(var i in t)n(e,i,{get:t[i],enumerable:!0})})(l,{ALWAYS_SYNC_GLOBAL_EVENTS:()=>Gc,AbstractHeaderCellCtrl:()=>sr,AgAbstractField:()=>na,AgAbstractInputField:()=>ra,AgAbstractLabel:()=>aa,AgCheckbox:()=>oa,AgCheckboxSelector:()=>sa,AgColumn:()=>ae,AgColumnGroup:()=>Ye,AgInputDateField:()=>Es,AgInputNumberField:()=>En,AgInputNumberFieldSelector:()=>Tn,AgInputTextArea:()=>bs,AgInputTextField:()=>Dn,AgInputTextFieldSelector:()=>An,AgPickerField:()=>bn,AgPromise:()=>ba,AgProvidedColumnGroup:()=>re,AgRadioButton:()=>vn,AgSelect:()=>Cn,AgSelectSelector:()=>wn,AgToggleButton:()=>nl,AgToggleButtonSelector:()=>rl,AnimateShowChangeCellRenderer:()=>ea,AnimateSlideCellRenderer:()=>ta,AnimationFrameService:()=>ms,AriaAnnouncementService:()=>$c,AutoScrollService:()=>$a,AutoWidthCalculator:()=>js,BarColumnLabelPlacement:()=>kd,BaseComponentWrapper:()=>wd,BeanStub:()=>F,BodyDropPivotTarget:()=>zr,BodyDropTarget:()=>_r,CellComp:()=>fo,CellCtrl:()=>Fo,CellNavigationService:()=>pl,CellPositionUtils:()=>Pl,CellRangeType:()=>Do,ChangedPath:()=>id,ChartMappings:()=>xd,CheckboxCellEditor:()=>Ns,CheckboxCellRenderer:()=>la,CheckboxSelectionComponent:()=>Co,ClientSideRowModelSteps:()=>fs,ColumnApplyStateService:()=>Ne,ColumnAutosizeService:()=>Ie,ColumnFactory:()=>Ae,ColumnKeyCreator:()=>we,ColumnModel:()=>Te,ColumnMoveService:()=>ze,ColumnNameService:()=>_e,ColumnSizeService:()=>Ue,CommunityFeaturesModule:()=>Oc,Component:()=>Hi,ComponentUtil:()=>rt,Context:()=>_a,CssClassManager:()=>vt,CtrlsService:()=>Tl,DataTypeService:()=>$l,DateCellEditor:()=>Fs,DateFilter:()=>Jn,DateStringCellEditor:()=>Ls,DragAndDropService:()=>Ya,DragService:()=>Qa,DragSourceType:()=>ja,Environment:()=>zl,EventService:()=>Vl,ExcelFactoryMode:()=>qa,ExpansionService:()=>vs,ExpressionService:()=>cd,FakeHScrollComp:()=>so,FakeVScrollComp:()=>ho,FilterManager:()=>on,FilterWrapperComp:()=>sn,FocusService:()=>Wl,FuncColsService:()=>Le,GROUP_AUTO_COLUMN_ID:()=>Se,Grid:()=>md,GridBodyComp:()=>rs,GridBodyCtrl:()=>mo,GridComp:()=>Ul,GridCoreCreator:()=>vd,GridCoreModule:()=>Lc,GridCtrl:()=>ql,GridHeaderComp:()=>eo,GridHeaderCtrl:()=>Nr,GridOptionsService:()=>_c,GroupInstanceIdCreator:()=>$e,HeaderCellCtrl:()=>Kr,HeaderFilterCellComp:()=>Ar,HeaderFilterCellCtrl:()=>cr,HeaderGroupCellCtrl:()=>$r,HeaderNavigationDirection:()=>Ir,HeaderNavigationService:()=>Lr,HeaderPositionUtils:()=>qc,HeaderRowComp:()=>Fr,HeaderRowContainerComp:()=>Jr,HeaderRowContainerCtrl:()=>Qr,HeaderRowCtrl:()=>Xr,HeaderRowType:()=>Pr,HorizontalDirection:()=>Ka,HorizontalResizeService:()=>us,KeyCode:()=>ia,LargeTextCellEditor:()=>ws,LayoutCssClasses:()=>io,LocalEventService:()=>c,LocaleService:()=>Uc,ManagedFocusFeature:()=>un,MenuService:()=>ys,ModuleNames:()=>Xi,ModuleRegistry:()=>Ji,MouseEventService:()=>ds,MoveColumnFeature:()=>Wr,NavigationService:()=>hs,NumberCellEditor:()=>As,NumberFilter:()=>Nn,NumberSequence:()=>Ni,OverlayWrapperComponent:()=>no,PinnedRowModel:()=>Xs,PivotResultColsService:()=>qe,PopupComponent:()=>pa,PopupEditorWrapper:()=>Ss,PopupService:()=>hl,PositionableFeature:()=>dn,PropertyKeys:()=>at,ProvidedFilter:()=>fn,RefPlaceholder:()=>Vi,ResizeObserverService:()=>ps,RowContainerComp:()=>ts,RowContainerCtrl:()=>es,RowCtrl:()=>No,RowDragComp:()=>Ja,RowHighlightPosition:()=>Za,RowModelHelperService:()=>yd,RowNode:()=>rn,RowNodeBlock:()=>Js,RowNodeBlockLoader:()=>el,RowNodeSorter:()=>td,RowPositionUtils:()=>Il,RowRenderer:()=>$s,ScalarFilter:()=>kn,ScrollVisibleService:()=>ss,SelectCellEditor:()=>xs,SelectableService:()=>nd,SelectionHandleType:()=>Ro,ServerSideTransactionResultStatus:()=>Qs,SetLeftFeature:()=>er,SimpleFilter:()=>xn,SortController:()=>od,SortIndicatorComp:()=>ji,SortIndicatorSelector:()=>Yi,StandardMenuFactory:()=>gs,StylingService:()=>al,TabGuardClassNames:()=>ol,TabGuardComp:()=>cl,TabGuardCtrl:()=>sl,TabGuardFeature:()=>ll,TextCellEditor:()=>Rs,TextFilter:()=>Bn,TextFloatingFilter:()=>fr,TooltipFeature:()=>Gi,TooltipStateManager:()=>zi,TouchListener:()=>Ki,UserComponentFactory:()=>Va,UserComponentRegistry:()=>ya,ValueCache:()=>dd,ValueService:()=>hd,VanillaFrameworkOverrides:()=>gl,VerticalDirection:()=>Ua,VisibleColsService:()=>Ze,_ColumnFilterModule:()=>br,_CommunityMenuApiModule:()=>tc,_CsrmSsrmSharedApiModule:()=>bd,_EditCoreModule:()=>Hs,_FilterCoreModule:()=>vr,_FloatingFilterModule:()=>Sr,_ReadOnlyFloatingFilterModule:()=>xr,_RowNodeBlockModule:()=>tl,_SsrmInfiniteSharedApiModule:()=>Cd,_addFocusableContainerListener:()=>rc,_areEqual:()=>u,_bindCellRendererToHtmlElement:()=>Li,_capitalise:()=>He,_clearElement:()=>bi,_cloneObject:()=>j,_combineAttributesAndGridOptions:()=>ot,_compose:()=>Ce,_createIcon:()=>_i,_createIconNoSpan:()=>qi,_debounce:()=>ve,_defaultComparator:()=>_,_doOnce:()=>le,_errorOnce:()=>he,_escapeString:()=>We,_exists:()=>N,_existsAndNotEmpty:()=>d,_flatten:()=>w,_forEachReverse:()=>x,_formatNumberCommas:()=>qn,_formatNumberTwoDecimalPlacesAndCommas:()=>_n,_fuzzySuggestions:()=>fa,_getAbsoluteHeight:()=>gi,_getAbsoluteWidth:()=>pi,_getAllValuesInObject:()=>$,_getAriaPosInSet:()=>xt,_getCtrlForEventTarget:()=>T,_getHeaderClassesFromColDef:()=>tr,_getInnerHeight:()=>hi,_getInnerWidth:()=>ui,_getRowContainerOptions:()=>Uo,_getToolPanelClassesFromColDef:()=>ir,_includes:()=>C,_insertArrayIntoArray:()=>y,_insertIntoArray:()=>v,_isElementInEventPath:()=>P,_isEventFromPrintableCharacter:()=>Mn,_isIOSUserAgent:()=>Qt,_isNodeOrElement:()=>Pi,_isStopPropagationForAgGrid:()=>A,_isVisible:()=>Si,_iterateObject:()=>K,_jsonEquals:()=>W,_last:()=>h,_loadTemplate:()=>xi,_log:()=>ce,_makeNull:()=>L,_mergeDeep:()=>Z,_missing:()=>O,_missingOrEmpty:()=>z,_parseDateTimeFromString:()=>Yn,_processOnChange:()=>st,_radioCssClass:()=>ai,_removeAriaExpanded:()=>It,_removeAriaSort:()=>Wt,_removeFromArray:()=>f,_removeFromParent:()=>Ci,_removeRepeatsFromArray:()=>p,_serialiseDate:()=>Un,_setAriaActiveDescendant:()=>Pt,_setAriaChecked:()=>qt,_setAriaColCount:()=>Gt,_setAriaColIndex:()=>Bt,_setAriaColSpan:()=>Vt,_setAriaControls:()=>Ut,_setAriaDescribedBy:()=>Rt,_setAriaDisabled:()=>Et,_setAriaExpanded:()=>Ft,_setAriaHidden:()=>Tt,_setAriaLabel:()=>kt,_setAriaLabelledBy:()=>Mt,_setAriaLevel:()=>At,_setAriaPosInSet:()=>Nt,_setAriaRole:()=>St,_setAriaRowCount:()=>Ot,_setAriaRowIndex:()=>zt,_setAriaSelected:()=>_t,_setAriaSetSize:()=>Lt,_setAriaSort:()=>Ht,_setDisabled:()=>li,_setDisplayed:()=>oi,_setFixedWidth:()=>Ai,_setVisible:()=>si,_shallowCompare:()=>g,_sortRowNodesByOrder:()=>Sd,_stopPropagationForAgGrid:()=>D,_toStringOrNull:()=>G,_unwrapUserComp:()=>Ha,_utf8_encode:()=>Ve,_values:()=>q,_waitUntil:()=>be,_warnOnce:()=>de,createGrid:()=>pd,getDefaultFloatingFilterType:()=>hr,isColumn:()=>ie,isColumnGroup:()=>je,isProvidedColumnGroup:()=>ne,isSelectionUIEvent:()=>Bc,provideGlobalGridOptions:()=>gd}),e.exports=(a=l,((e,t,i,a)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let l of o(t))s.call(e,l)||l===i||n(e,l,{get:()=>t[l],enumerable:!(a=r(t,l))||a.enumerable});return e})(n({},"__esModule",{value:!0}),a));var c=class{constructor(){this.allSyncListeners=new Map,this.allAsyncListeners=new Map,this.globalSyncListeners=new Set,this.globalAsyncListeners=new Set,this.asyncFunctionsQueue=[],this.scheduled=!1,this.firedEvents={}}setFrameworkOverrides(e){this.frameworkOverrides=e}getListeners(e,t,i){const a=t?this.allAsyncListeners:this.allSyncListeners;let n=a.get(e);return!n&&i&&(n=new Set,a.set(e,n)),n}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 a=this.getListeners(e,i,!1);if(a&&(a.delete(t),0===a.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){const t=e;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){const i=e.type;if(t&&"event"in e){const t=e.event;t instanceof Event&&(e.eventPath=t.composedPath())}const a=(i,a)=>i.forEach((i=>{if(!a.has(i))return;const n=this.frameworkOverrides?()=>this.frameworkOverrides.wrapIncoming((()=>i(e))):()=>i(e);t?this.dispatchAsync(n):n()})),n=this.getListeners(i,t,!1)??new Set,r=new Set(n);r.size>0&&a(r,n);new Set(t?this.globalAsyncListeners:this.globalSyncListeners).forEach((a=>{const n=this.frameworkOverrides?()=>this.frameworkOverrides.wrapIncoming((()=>a(i,e))):()=>a(i,e);t?this.dispatchAsync(n):n()}))}dispatchAsync(e){if(this.asyncFunctionsQueue.push(e),!this.scheduled){const e=()=>{window.setTimeout(this.flushAsyncQueue.bind(this),0)};this.frameworkOverrides?this.frameworkOverrides.wrapIncoming(e):e(),this.scheduled=!0}}flushAsyncQueue(){this.scheduled=!1;const e=this.asyncFunctionsQueue.slice();this.asyncFunctionsQueue=[],e.forEach((e=>e()))}};function d(e){return null!=e&&e.length>0}function h(e){if(e&&e.length)return e[e.length-1]}function u(e,t,i){return null==e&&null==t||null!=e&&null!=t&&e.length===t.length&&e.every(((e,a)=>i?i(e,t[a]):t[a]===e))}function g(e,t){return u(e,t)}function p(e,t){if(e)for(let i=e.length-2;i>=0;i--){const a=e[i]===t,n=e[i+1]===t;a&&n&&e.splice(i+1,1)}}function m(e,t){const i=e.indexOf(t);i>=0&&(e[i]=e[e.length-1],e.pop())}function f(e,t){const i=e.indexOf(t);i>=0&&e.splice(i,1)}function v(e,t,i){e.splice(i,0,t)}function y(e,t,i){if(null!=e&&null!=t)for(let a=t.length-1;a>=0;a--){v(e,t[a],i)}}function b(e,t,i){!function(e,t){for(let i=0;i<t.length;i++)f(e,t[i])}(e,t),t.slice().reverse().forEach((t=>v(e,t,i)))}function C(e,t){return e.indexOf(t)>-1}function w(e){return[].concat.apply([],e)}function S(e,t){null!=t&&null!=e&&t.forEach((t=>e.push(t)))}function x(e,t){if(null!=e)for(let i=e.length-1;i>=0;i--)t(e[i],i)}var k="__ag_Grid_Stop_Propagation",M=["touchstart","touchend","touchmove","touchcancel","scroll"],R={};function D(e){e[k]=!0}function A(e){return!0===e[k]}var E=(()=>{const e={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return t=>{if("boolean"==typeof R[t])return R[t];const i=document.createElement(e[t]||"div");return R[t="on"+t]=t in i}})();function T(e,t,i){let a=t;for(;a;){const t=e.getDomData(a,i);if(t)return t;a=a.parentElement}return null}function P(e,t){return!(!t||!e)&&function(e){const t=e;if(t.path)return t.path;if(t.composedPath)return t.composedPath();return function(e){const t=[];let i=e.target;for(;i;)t.push(i),i=i.parentElement;return t}(t)}(t).indexOf(e)>=0}var F=class{constructor(){this.destroyFunctions=[],this.destroyed=!1,this.__v_skip=!0,this.propertyListenerId=0,this.lastChangeSetIdLookup={},this.isAlive=()=>!this.destroyed}preWireBeans(e){this.gridId=e.context.getGridId(),this.frameworkOverrides=e.frameworkOverrides,this.stubContext=e.context,this.eventService=e.eventService,this.gos=e.gos,this.localeService=e.localeService}getFrameworkOverrides(){return this.frameworkOverrides}destroy(){for(let e=0;e<this.destroyFunctions.length;e++)this.destroyFunctions[e]();this.destroyFunctions.length=0,this.destroyed=!0,this.dispatchLocalEvent({type:"destroyed"})}addEventListener(e,t){this.localEventService||(this.localEventService=new c),this.localEventService.addEventListener(e,t)}removeEventListener(e,t){this.localEventService&&this.localEventService.removeEventListener(e,t)}dispatchLocalEvent(e){this.localEventService&&this.localEventService.dispatchEvent(e)}addManagedElementListeners(e,t){return this._setupListeners(e,t)}addManagedEventListeners(e){return this._setupListeners(this.eventService,e)}addManagedListeners(e,t){return this._setupListeners(e,t)}_setupListeners(e,t){const i=[];for(const a in t){const n=t[a];n&&i.push(this._setupListener(e,a,n))}return i}_setupListener(e,t,i){if(this.destroyed)return()=>null;e instanceof HTMLElement?function(e,t,i,a){const n=C(M,i)?{passive:!0}:void 0;e&&e.addEventListener&&e.addEventListener(t,i,a,n)}(this.getFrameworkOverrides(),e,t,i):e.addEventListener(t,i);const a=()=>(e.removeEventListener(t,i),null);return this.destroyFunctions.push(a),()=>(a(),this.destroyFunctions=this.destroyFunctions.filter((e=>e!==a)),null)}setupGridOptionListener(e,t){this.gos.addPropertyEventListener(e,t);const i=()=>(this.gos.removePropertyEventListener(e,t),null);return this.destroyFunctions.push(i),()=>(i(),this.destroyFunctions=this.destroyFunctions.filter((e=>e!==i)),null)}addManagedPropertyListener(e,t){return this.destroyed?()=>null:this.setupGridOptionListener(e,t)}addManagedPropertyListeners(e,t){if(this.destroyed)return;const i=e.join("-")+this.propertyListenerId++,a=e=>{if(e.changeSet){if(e.changeSet&&e.changeSet.id===this.lastChangeSetIdLookup[i])return;this.lastChangeSetIdLookup[i]=e.changeSet.id}const a={type:"gridPropertyChanged",changeSet:e.changeSet,source:e.source};t(a)};e.forEach((e=>this.setupGridOptionListener(e,a)))}addDestroyFunc(e){this.isAlive()?this.destroyFunctions.push(e):e()}createManagedBean(e,t){const i=this.createBean(e,t);return this.addDestroyFunc(this.destroyBean.bind(this,e,t)),i}createBean(e,t,i){return(t||this.stubContext).createBean(e,i)}destroyBean(e,t){return(t||this.stubContext).destroyBean(e)}destroyBeans(e,t){return(t||this.stubContext).destroyBeans(e)}},I=class{constructor(e){this.frameworkOverrides=e,this.wrappedListeners=new Map,this.wrappedGlobalListeners=new Map}wrap(e){let t=e;return this.frameworkOverrides.shouldWrapOutgoing&&(t=t=>{this.frameworkOverrides.wrapOutgoing((()=>e(t)))},this.wrappedListeners.set(e,t)),t}wrapGlobal(e){let t=e;return this.frameworkOverrides.shouldWrapOutgoing&&(t=(t,i)=>{this.frameworkOverrides.wrapOutgoing((()=>e(t,i)))},this.wrappedGlobalListeners.set(e,t)),t}unwrap(e){return this.wrappedListeners.get(e)??e}unwrapGlobal(e){return this.wrappedGlobalListeners.get(e)??e}};function L(e){return null==e||""===e?null:e}function N(e,t=!1){return null!=e&&(""!==e||t)}function O(e){return!N(e)}function z(e){return null==e||0===e.length}function G(e){return null!=e&&"function"==typeof e.toString?e.toString():null}function B(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 V(e){if(void 0!==e)return null!==e&&""!==e&&H(e)}function H(e){return"boolean"==typeof e?e:"string"==typeof e&&("TRUE"===e.toUpperCase()||""==e)}function W(e,t){return(e?JSON.stringify(e):null)===(t?JSON.stringify(t):null)}function _(e,t,i=!1){const a=null==e,n=null==t;if(e&&e.toNumber&&(e=e.toNumber()),t&&t.toNumber&&(t=t.toNumber()),a&&n)return 0;if(a)return-1;if(n)return 1;function r(e,t){return e>t?1:e<t?-1:0}if("string"!=typeof e)return r(e,t);if(!i)return r(e,t);try{return e.localeCompare(t)}catch(i){return r(e,t)}}function q(e){if(e instanceof Set||e instanceof Map){const t=[];return e.forEach((e=>t.push(e))),t}return Object.values(e)}var U=new Set(["__proto__","constructor","prototype"]);function K(e,t){if(null!=e)if(Array.isArray(e))for(let i=0;i<e.length;i++)t(i.toString(),e[i]);else for(const[i,a]of Object.entries(e))t(i,a)}function j(e){const t={},i=Object.keys(e);for(let a=0;a<i.length;a++){if(U.has(i[a]))continue;const n=i[a],r=e[n];t[n]=r}return t}function Y(e,t){if(!e)return;const i=e,a={};return Object.keys(i).forEach((e=>{if(t&&t.indexOf(e)>=0||U.has(e))return;const n=i[e],r=Q(n)&&n.constructor===Object;a[e]=r?Y(n):n})),a}function $(e){if(!e)return[];const t=Object;if("function"==typeof t.values)return t.values(e);const i=[];for(const t in e)e.hasOwnProperty(t)&&e.propertyIsEnumerable(t)&&i.push(e[t]);return i}function Z(e,t,i=!0,a=!1){N(t)&&K(t,((t,n)=>{if(U.has(t))return;let r=e[t];if(r!==n){if(a){if(null==r&&null!=n){"object"==typeof n&&n.constructor===Object&&(r={},e[t]=r)}}Q(n)&&Q(r)&&!Array.isArray(r)?Z(r,n,i,a):(i||void 0!==n)&&(e[t]=n)}}))}function X(e,t,i){if(!t||!e)return;if(!i)return e[t];const a=t.split(".");let n=e;for(let e=0;e<a.length;e++){if(null==n)return;n=n[a[e]]}return n}function Q(e){return"object"==typeof e&&null!==e}var J={resizable:!0,sortable:!0},ee=0;function te(){return ee++}function ie(e){return e instanceof ae}var ae=class extends F{constructor(e,t,i,a){super(),this.isColumn=!0,this.instanceId=te(),this.autoHeaderHeight=null,this.moving=!1,this.menuVisible=!1,this.lastLeftPinned=!1,this.firstRightPinned=!1,this.filterActive=!1,this.columnEventService=new c,this.tooltipEnabled=!1,this.rowGroupActive=!1,this.pivotActive=!1,this.aggregationActive=!1,this.colDef=e,this.userProvidedColDef=t,this.colId=i,this.primary=a,this.setState(e)}wireBeans(e){this.columnHoverService=e.columnHoverService}getInstanceId(){return this.instanceId}setState(e){void 0!==e.sort?"asc"!==e.sort&&"desc"!==e.sort||(this.sort=e.sort):"asc"!==e.initialSort&&"desc"!==e.initialSort||(this.sort=e.initialSort);const t=e.sortIndex,i=e.initialSortIndex;void 0!==t?null!==t&&(this.sortIndex=t):null!==i&&(this.sortInd