@scvzerng/element-ui-ag-grid-vue2 0.0.23 → 0.0.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -55,4 +55,4 @@ To overcome this, put the API call into a timeout, e.g. instead of api.redrawRow
|
|
|
55
55
|
To see what part of your code that caused the refresh check this stacktrace.`,253:({version:e})=>["Illegal version string: ",e],254:()=>"Cannot create chart: no chart themes available.",255:({point:e})=>`Lone surrogate U+${e==null?void 0:e.toString(16).toUpperCase()} is not a scalar value`,256:()=>"Unable to initialise. See validation error, or load ValidationModule if missing.",257:()=>wa("IntegratedChartsModule"),258:()=>wa("SparklinesModule"),259:({part:e})=>`the argument to theme.withPart must be a Theming API part object, received: ${e}`,260:({propName:e,compName:t,gridScoped:o,gridId:i,rowModelType:s})=>ma({reasonOrId:`AG Grid '${e}' component: ${t}`,moduleName:Lt[t],gridId:i,gridScoped:o,rowModelType:s}),261:()=>"As of v33, `column.isHovered()` is deprecated. Use `api.isColumnHovered(column)` instead.",262:()=>'As of v33, icon key "smallDown" is deprecated. Use "advancedFilterBuilderSelect" for Advanced Filter Builder dropdown, "selectOpen" for Select cell editor and dropdowns (e.g. Integrated Charts menu), "richSelectOpen" for Rich Select cell editor.',263:()=>'As of v33, icon key "smallLeft" is deprecated. Use "panelDelimiterRtl" for Row Group Panel / Pivot Panel, "subMenuOpenRtl" for sub-menus.',264:()=>'As of v33, icon key "smallRight" is deprecated. Use "panelDelimiter" for Row Group Panel / Pivot Panel, "subMenuOpen" for sub-menus.',265:({colId:e})=>`Unable to infer chart data type for column '${e}' if first data entry is null. Please specify "chartDataType", or a "cellDataType" in the column definition. For more information, see ${Ct}/integrated-charts-range-chart#coldefchartdatatype .`,266:()=>'As of v33.1, using "keyCreator" with the Rich Select Editor has been deprecated. It now requires the "formatValue" callback to convert complex data to strings.',267:()=>"Detail grids can not use a different theme to the master grid, the `theme` detail grid option will be ignored.",268:()=>"Transactions aren't supported with tree data when using treeDataChildrenField",269:()=>"When `masterSelects: 'detail'`, detail grids must be configured with multi-row selection",270:({id:e,parentId:t})=>`Cycle detected for row with id='${e}' and parent id='${t}'. Resetting the parent for row with id='${e}' and showing it as a root-level node.`,271:({id:e,parentId:t})=>`Parent row not found for row with id='${e}' and parent id='${t}'. Showing row with id='${e}' as a root-level node.`,272:()=>fa(),273:({providedId:e,usedId:t})=>`Provided column id '${e}' was already in use, ensure all column and group ids are unique. Using '${t}' instead.`,274:({prop:e})=>{let t=`Since v33, ${e} has been deprecated.`;switch(e){case"maxComponentCreationTimeMs":t+=" This property is no longer required and so will be removed in a future version.";break;case"setGridApi":t+=" This method is not called by AG Grid. To access the GridApi see: https://ag-grid.com/react-data-grid/grid-interface/#grid-api ";break;case"children":t+=" For multiple versions AgGridReact does not support children.";break}return t},275:Ca,276:()=>"Row Numbers Row Resizer cannot be used when Grid Columns have `autoHeight` enabled.",277:({colId:e})=>`'enableFilterHandlers' is set to true, but column '${e}' does not have 'filter.doesFilterPass' or 'filter.handler' set.`,278:({colId:e})=>`Unable to create filter handler for column '${e}'`,279:e=>{},280:({colId:e})=>`'name' must be provided for custom filter components for column '${e}`,281:({colId:e})=>`Filter for column '${e}' does not have 'filterParams.buttons', but the new Filters Tool Panel has buttons configured. Either configure buttons for the filter, or disable buttons on the Filters Tool Panel.`,282:()=>"New filter tool panel requires `enableFilterHandlers: true`.",283:()=>"As of v34, use the same method on the filter handler (`api.getColumnFilterHandler(colKey)`) instead.",284:()=>"As of v34, filters are active when they have a model. Use `api.getColumnFilterModel()` instead.",285:()=>"As of v34, use (`api.getColumnFilterModel()`) instead.",286:()=>"As of v34, use (`api.setColumnFilterModel()`) instead.",287:()=>"`api.doFilterAction()` requires `enableFilterHandlers = true",288:()=>"`api.getColumnFilterModel(key, true)` requires `enableFilterHandlers = true",289:({rowModelType:e})=>`Row Model '${e}' is not supported with Batch Editing`,290:({rowIndex:e,rowPinned:t})=>`Row with index '${e}' and pinned state '${t}' not found`};function Iv(e,t){const o=Tv[e];if(!o)return[`Missing error text for error id ${e}!`];const i=o(t),n=`
|
|
56
56
|
See ${Qn(e,t)}`;return Array.isArray(i)?i.concat(n):[i,n]}var Av={1:"Charting Aggregation",2:"pivotResultFields",3:"setTooltip"},va=new WeakMap,Sa=new WeakMap;function Mv(e,t,o){if(!t)return z(11),{};const i=o;let s;if(!(i!=null&&i.setThemeOnGridDiv)){const r=Q({tag:"div"});r.style.height="100%",e.appendChild(r),e=r,s=()=>e.remove()}return new Lv().create(e,t,r=>{const l=new Wp(e);r.createBean(l)},void 0,o,s)}var kv=1,Lv=class{create(e,t,o,i,s,n){const r=Li.applyGlobalGridOptions(t),l=r.gridId??String(kv++),a=this.getRegisteredModules(s,l,r.rowModelType),d=this.createBeansList(r.rowModelType,a,l),c=this.createProvidedBeans(e,r,s);if(!d)return;const h={providedBeanInstances:c,beanClasses:d,gridId:l,beanInitComparator:xp,beanDestroyComparator:Dp,derivedBeans:[Rp],destroyCallback:()=>{Sa.delete(p),va.delete(e),n==null||n()}},g=new ju(h);this.registerModuleFeatures(g,a),o(g),g.getBean("syncSvc").start(),i==null||i(g);const p=g.getBean("gridApi");return va.set(e,p),Sa.set(p,e),p}getRegisteredModules(e,t,o){var i;return Et(bv,void 0,!0),(i=e==null?void 0:e.modules)==null||i.forEach(s=>Et(s,t)),Nu(t,ba(o))}registerModuleFeatures(e,t){const o=e.getBean("registry"),i=e.getBean("apiFunctionSvc");t.forEach(s=>{o.registerModule(s);const n=s.apiFunctions;n&&Object.keys(n).forEach(l=>{i==null||i.addFunction(l,n[l])})})}createProvidedBeans(e,t,o){let i=o?o.frameworkOverrides:null;$(i)&&(i=new Fl);const s={gridOptions:t,eGridDiv:e,globalListener:o?o.globalListener:null,globalSyncListener:o?o.globalSyncListener:null,frameworkOverrides:i};return o&&o.providedBeanInstances&&Object.assign(s,o.providedBeanInstances),s}createBeansList(e,t,o){const i={clientSide:"ClientSideRowModel",infinite:"InfiniteRowModel",serverSide:"ServerSideRowModel",viewport:"ViewportRowModel"},s=ba(e),n=i[s];if(!n){Yt(201,{rowModelType:s},`Unknown rowModelType ${s}.`);return}if(!Wu()){Yt(272,void 0,fa());return}if(!e){const l=Object.entries(i).filter(([a,d])=>cs(d,o,a));if(l.length==1){const[a,d]=l[0];if(a!==s){const c={moduleName:d,rowModelType:a};Yt(275,c,Ca(c));return}}}if(!cs(n,o,s)){Yt(200,{reasonOrId:`rowModelType = '${s}'`,moduleName:n,gridScoped:us(),gridId:o,rowModelType:s},`Missing module ${n}Module for rowModelType ${s}.`);return}const r=new Set;return t.forEach(l=>{var a;return(a=l.beans)==null?void 0:a.forEach(d=>r.add(d))}),Array.from(r)}};function ba(e){return e??"clientSide"}function Te(e){const t=e.rowModel;return t.getType()==="clientSide"?t:void 0}function Gv(e){const t=e.rowModel;return t.getType()==="serverSide"?t:void 0}var Hv=class extends x{constructor(){super(...arguments),this.beanName="localeSvc"}getLocaleTextFunc(){const e=this.gos,t=e.getCallback("getLocaleText");if(t)return(i,s,n)=>t({key:i,defaultValue:s,variableValues:n});const o=e.get("localeText");return(i,s,n)=>{let r=o&&o[i];if(r&&n&&n.length){let l=0;for(;!(l>=n.length||r.indexOf("${variable}")===-1);)r=r.replace("${variable}",n[l++])}return r??s}}};function Ov(e,t=!1){const o=[],i=[],s=[],n=[],r=[],l=[],a=[],d=[],c=[];let u=0;for(let h=0;h<e.length;h++){const{colId:g,sort:p,sortIndex:f,rowGroup:C,rowGroupIndex:m,aggFunc:w,pivot:S,pivotIndex:v,pinned:b,hide:D,width:I,flex:B}=e[h];c.push(g),p&&(o[f??u++]={colId:g,sort:p}),C&&(i[m??0]=g),typeof w=="string"&&s.push({colId:g,aggFunc:w}),S&&(n[v??0]=g),b&&(b==="right"?l:r).push(g),D&&a.push(g),(B!=null||I)&&d.push({colId:g,flex:B??void 0,width:I})}return{sort:o.length?{sortModel:o}:void 0,rowGroup:i.length?{groupColIds:i}:void 0,aggregation:s.length?{aggregationModel:s}:void 0,pivot:n.length||t?{pivotMode:t,pivotColIds:n}:void 0,columnPinning:r.length||l.length?{leftColIds:r,rightColIds:l}:void 0,columnVisibility:a.length?{hiddenColIds:a}:void 0,columnSizing:d.length?{columnSizingModel:d}:void 0,columnOrder:c.length?{orderedColIds:c}:void 0}}function Bv(e){const t=[];return e.forEach(({groupId:o,open:i})=>{i&&t.push(o)}),t.length?{openColumnGroupIds:t}:void 0}var Vv=class{wrap(e,t,o,i){const s=this.createWrapper(e,i);return t==null||t.forEach(n=>{this.createMethod(s,n,!0)}),o==null||o.forEach(n=>{this.createMethod(s,n,!1)}),s}createMethod(e,t,o){e.addMethod(t,this.createMethodProxy(e,t,o))}createMethodProxy(e,t,o){return function(){return e.hasMethod(t)?e.callMethod(t,arguments):(o&&k(49,{methodName:t}),null)}}},Nv={tag:"div",cls:"ag-tooltip"},_v=class extends ks{constructor(){super(Nv)}init(e){const{value:t}=e,o=this.getGui();o.textContent=St(t);const i=e.location.replace(/([a-z])([A-Z0-9])/g,"$1-$2").toLowerCase();o.classList.add(`ag-${i}-tooltip`)}},Wv=1e3,zv=1e3,ya=100,Ra,yi=!1,$v=class extends x{constructor(e,t){super(),this.tooltipCtrl=e,this.getTooltipValue=t,this.interactionEnabled=!1,this.isInteractingWithTooltip=!1,this.state=0,this.tooltipInstanceCount=0,this.tooltipMouseTrack=!1}wireBeans(e){this.popupSvc=e.popupSvc,this.userCompFactory=e.userCompFactory}postConstruct(){this.gos.get("tooltipInteraction")&&(this.interactionEnabled=!0),this.tooltipTrigger=this.getTooltipTrigger(),this.tooltipMouseTrack=this.gos.get("tooltipMouseTrack");const e=this.tooltipCtrl.getGui();this.tooltipTrigger===0&&this.addManagedListeners(e,{mouseenter:this.onMouseEnter.bind(this),mouseleave:this.onMouseLeave.bind(this)}),this.tooltipTrigger===1&&this.addManagedListeners(e,{focusin:this.onFocusIn.bind(this),focusout:this.onFocusOut.bind(this)}),this.addManagedListeners(e,{mousemove:this.onMouseMove.bind(this)}),this.interactionEnabled||this.addManagedListeners(e,{mousedown:this.onMouseDown.bind(this),keydown:this.onKeyDown.bind(this)})}getGridOptionsTooltipDelay(e){const t=this.gos.get(e);return Math.max(200,t)}getTooltipDelay(e){var t,o,i,s;return e==="show"?((o=(t=this.tooltipCtrl).getTooltipShowDelayOverride)==null?void 0:o.call(t))??this.getGridOptionsTooltipDelay("tooltipShowDelay"):((s=(i=this.tooltipCtrl).getTooltipHideDelayOverride)==null?void 0:s.call(i))??this.getGridOptionsTooltipDelay("tooltipHideDelay")}destroy(){this.setToDoNothing(),super.destroy()}getTooltipTrigger(){const e=this.gos.get("tooltipTrigger");return!e||e==="hover"?0:1}onMouseEnter(e){this.interactionEnabled&&this.interactiveTooltipTimeoutId&&(this.unlockService(),this.startHideTimeout()),!gt()&&(yi?this.showTooltipTimeoutId=window.setTimeout(()=>{this.prepareToShowTooltip(e)},ya):this.prepareToShowTooltip(e))}onMouseMove(e){this.lastMouseEvent&&(this.lastMouseEvent=e),this.tooltipMouseTrack&&this.state===2&&this.tooltipComp&&this.positionTooltip()}onMouseDown(){this.setToDoNothing()}onMouseLeave(){this.interactionEnabled?this.lockService():this.setToDoNothing()}onFocusIn(){this.prepareToShowTooltip()}onFocusOut(e){var s;const t=e.relatedTarget,o=this.tooltipCtrl.getGui(),i=(s=this.tooltipComp)==null?void 0:s.getGui();this.isInteractingWithTooltip||o.contains(t)||this.interactionEnabled&&(i!=null&&i.contains(t))||this.setToDoNothing()}onKeyDown(){this.isInteractingWithTooltip&&(this.isInteractingWithTooltip=!1),this.setToDoNothing()}prepareToShowTooltip(e){if(this.state!=0||yi)return;let t=0;e&&(t=this.isLastTooltipHiddenRecently()?200:this.getTooltipDelay("show")),this.lastMouseEvent=e||null,this.showTooltipTimeoutId=window.setTimeout(this.showTooltip.bind(this),t),this.state=1}isLastTooltipHiddenRecently(){return Date.now()-Ra<Wv}setToDoNothing(e){!e&&this.state===2&&this.hideTooltip(),this.onBodyScrollEventCallback&&(this.onBodyScrollEventCallback(),this.onBodyScrollEventCallback=void 0),this.onColumnMovedEventCallback&&(this.onColumnMovedEventCallback(),this.onColumnMovedEventCallback=void 0),this.onDocumentKeyDownCallback&&(this.onDocumentKeyDownCallback(),this.onDocumentKeyDownCallback=void 0),this.clearTimeouts(),this.state=0,this.lastMouseEvent=null}showTooltip(){var r,l,a,d,c,u,h;const e=this.getTooltipValue(),t=this.tooltipCtrl;if(!M(e)||t.shouldDisplayTooltip&&!t.shouldDisplayTooltip()){this.setToDoNothing();return}const o=(r=t.getRowNode)==null?void 0:r.call(t),i=N(this.gos,{location:((l=t.getLocation)==null?void 0:l.call(t))??"UNKNOWN",colDef:(a=t.getColDef)==null?void 0:a.call(t),column:(d=t.getColumn)==null?void 0:d.call(t),rowIndex:(c=t.getRowIndex)==null?void 0:c.call(t),node:o,data:o==null?void 0:o.data,value:e,valueFormatted:(u=t.getValueFormatted)==null?void 0:u.call(t),hideTooltipCallback:()=>this.hideTooltip(!0),...((h=t.getAdditionalParams)==null?void 0:h.call(t))??{}});this.state=2,this.tooltipInstanceCount++;const s=this.newTooltipComponentCallback.bind(this,this.tooltipInstanceCount),n=Gu(this.userCompFactory,i);n==null||n.newAgStackInstance().then(s)}hideTooltip(e){!e&&this.isInteractingWithTooltip||(this.tooltipComp&&(this.destroyTooltipComp(),Ra=Date.now()),this.eventSvc.dispatchEvent({type:"tooltipHide",parentGui:this.tooltipCtrl.getGui()}),e&&(this.isInteractingWithTooltip=!1),this.setToDoNothing(!0))}newTooltipComponentCallback(e,t){var r;if(this.state!==2||this.tooltipInstanceCount!==e){this.destroyBean(t);return}const i=t.getGui();this.tooltipComp=t,i.classList.contains("ag-tooltip")||i.classList.add("ag-tooltip-custom"),this.tooltipTrigger===0&&i.classList.add("ag-tooltip-animate"),this.interactionEnabled&&i.classList.add("ag-tooltip-interactive");const s=this.getLocaleTextFunc(),n=(r=this.popupSvc)==null?void 0:r.addPopup({eChild:i,ariaLabel:s("ariaLabelTooltip","Tooltip")});if(n&&(this.tooltipPopupDestroyFunc=n.hideFunc),this.positionTooltip(),this.tooltipTrigger===1){const l=()=>this.setToDoNothing();[this.onBodyScrollEventCallback,this.onColumnMovedEventCallback]=this.addManagedEventListeners({bodyScroll:l,columnMoved:l})}this.interactionEnabled&&([this.tooltipMouseEnterListener,this.tooltipMouseLeaveListener]=this.addManagedElementListeners(i,{mouseenter:this.onTooltipMouseEnter.bind(this),mouseleave:this.onTooltipMouseLeave.bind(this)}),[this.onDocumentKeyDownCallback]=this.addManagedElementListeners(X(this.beans),{keydown:l=>{i.contains(l==null?void 0:l.target)||this.onKeyDown()}}),this.tooltipTrigger===1&&([this.tooltipFocusInListener,this.tooltipFocusOutListener]=this.addManagedElementListeners(i,{focusin:this.onTooltipFocusIn.bind(this),focusout:this.onTooltipFocusOut.bind(this)}))),this.eventSvc.dispatchEvent({type:"tooltipShow",tooltipGui:i,parentGui:this.tooltipCtrl.getGui()}),this.startHideTimeout()}onTooltipMouseEnter(){this.isInteractingWithTooltip=!0,this.unlockService()}onTooltipMouseLeave(){this.isTooltipFocused()||(this.isInteractingWithTooltip=!1,this.lockService())}onTooltipFocusIn(){this.isInteractingWithTooltip=!0}isTooltipFocused(){var o;const e=(o=this.tooltipComp)==null?void 0:o.getGui(),t=j(this.beans);return!!e&&e.contains(t)}onTooltipFocusOut(e){const t=this.tooltipCtrl.getGui();this.isTooltipFocused()||(this.isInteractingWithTooltip=!1,t.contains(e.relatedTarget)?this.startHideTimeout():this.hideTooltip())}positionTooltip(){var t,o;const e={type:"tooltip",ePopup:this.tooltipComp.getGui(),nudgeY:18,skipObserver:this.tooltipMouseTrack};this.lastMouseEvent?(t=this.popupSvc)==null||t.positionPopupUnderMouseEvent({...e,mouseEvent:this.lastMouseEvent}):(o=this.popupSvc)==null||o.positionPopupByComponent({...e,eventSource:this.tooltipCtrl.getGui(),position:"under",keepWithinBounds:!0,nudgeY:5})}destroyTooltipComp(){this.tooltipComp.getGui().classList.add("ag-tooltip-hiding");const e=this.tooltipPopupDestroyFunc,t=this.tooltipComp,o=this.tooltipTrigger===0?zv:0;window.setTimeout(()=>{e(),this.destroyBean(t)},o),this.clearTooltipListeners(),this.tooltipPopupDestroyFunc=void 0,this.tooltipComp=void 0}clearTooltipListeners(){[this.tooltipMouseEnterListener,this.tooltipMouseLeaveListener,this.tooltipFocusInListener,this.tooltipFocusOutListener].forEach(e=>{e&&e()}),this.tooltipMouseEnterListener=this.tooltipMouseLeaveListener=this.tooltipFocusInListener=this.tooltipFocusOutListener=null}lockService(){yi=!0,this.interactiveTooltipTimeoutId=window.setTimeout(()=>{this.unlockService(),this.setToDoNothing()},ya)}unlockService(){yi=!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()}};function dn(e){return e.get("tooltipShowMode")==="whenTruncated"}var Uv=class extends x{constructor(e,t){super(),this.ctrl=e,t&&(this.beans=t)}postConstruct(){this.refreshTooltip()}setBrowserTooltip(e,t){const o="title",i=this.ctrl.getGui();i&&(e!=null&&(e!=""||t)?i.setAttribute(o,e):i.removeAttribute(o))}updateTooltipText(){const{getTooltipValue:e}=this.ctrl;e&&(this.tooltip=e())}createTooltipFeatureIfNeeded(){this.tooltipManager==null&&(this.tooltipManager=this.createBean(new $v(this.ctrl,()=>this.tooltip),this.beans.context))}setTooltipAndRefresh(e){this.tooltip=e,this.refreshTooltip()}refreshTooltip(e){this.browserTooltips=this.beans.gos.get("enableBrowserTooltips"),this.updateTooltipText(),this.browserTooltips?(this.setBrowserTooltip(this.tooltip),this.tooltipManager=this.destroyBean(this.tooltipManager,this.beans.context)):(this.setBrowserTooltip(e?"":null,e),this.createTooltipFeatureIfNeeded())}destroy(){this.tooltipManager=this.destroyBean(this.tooltipManager,this.beans.context),super.destroy()}},Kv={enableBrowserTooltips:!0,tooltipTrigger:!0,tooltipMouseTrack:!0,tooltipShowMode:!0,tooltipInteraction:!0,defaultColGroupDef:!0,suppressAutoSize:!0,skipHeaderOnAutoSize:!0,autoSizeStrategy:!0,components:!0,stopEditingWhenCellsLoseFocus:!0,undoRedoCellEditing:!0,undoRedoCellEditingLimit:!0,excelStyles:!0,cacheQuickFilter:!0,customChartThemes:!0,chartThemeOverrides:!0,chartToolPanelsDef:!0,loadingCellRendererSelector:!0,localeText:!0,keepDetailRows:!0,keepDetailRowsCount:!0,detailRowHeight:!0,detailRowAutoHeight:!0,tabIndex:!0,valueCache:!0,valueCacheNeverExpires:!0,enableCellExpressions:!0,suppressTouch:!0,suppressBrowserResizeObserver:!0,suppressPropertyNamesCheck:!0,debug:!0,dragAndDropImageComponent:!0,loadingOverlayComponent:!0,suppressLoadingOverlay:!0,noRowsOverlayComponent:!0,paginationPageSizeSelector:!0,paginateChildRows:!0,pivotPanelShow:!0,pivotSuppressAutoColumn:!0,suppressExpandablePivotGroups:!0,aggFuncs:!0,allowShowChangeAfterFilter:!0,ensureDomOrder:!0,enableRtl:!0,suppressColumnVirtualisation:!0,suppressMaxRenderedRowRestriction:!0,suppressRowVirtualisation:!0,rowDragText:!0,groupLockGroupColumns:!0,suppressGroupRowsSticky:!0,rowModelType:!0,cacheOverflowSize:!0,infiniteInitialRowCount:!0,serverSideInitialRowCount:!0,maxBlocksInCache:!0,maxConcurrentDatasourceRequests:!0,blockLoadDebounceMillis:!0,serverSideOnlyRefreshFilteredGroups:!0,serverSidePivotResultFieldSeparator:!0,viewportRowModelPageSize:!0,viewportRowModelBufferSize:!0,debounceVerticalScrollbar:!0,suppressAnimationFrame:!0,suppressPreventDefaultOnMouseWheel:!0,scrollbarWidth:!0,icons:!0,suppressRowTransform:!0,gridId:!0,enableGroupEdit:!0,initialState:!0,processUnpinnedColumns:!0,createChartContainer:!0,getLocaleText:!0,getRowId:!0,reactiveCustomComponents:!0,renderingMode:!0,columnMenu:!0,suppressSetFilterByDefault:!0,getDataPath:!0,enableCellSpan:!0,enableFilterHandlers:!0,filterHandlers:!0},ae="clientSide",ie="serverSide",Gt="infinite",jv={onGroupExpandedOrCollapsed:[ae],refreshClientSideRowModel:[ae],isRowDataEmpty:[ae],forEachLeafNode:[ae],forEachNodeAfterFilter:[ae],forEachNodeAfterFilterAndSort:[ae],resetRowHeights:[ae],applyTransaction:[ae],applyTransactionAsync:[ae],flushAsyncTransactions:[ae],getBestCostNodeSelection:[ae],getServerSideSelectionState:[ie],setServerSideSelectionState:[ie],applyServerSideTransaction:[ie],applyServerSideTransactionAsync:[ie],applyServerSideRowData:[ie],retryServerSideLoads:[ie],flushServerSideAsyncTransactions:[ie],refreshServerSide:[ie],getServerSideGroupLevelState:[ie],refreshInfiniteCache:[Gt],purgeInfiniteCache:[Gt],getInfiniteRowCount:[Gt],isLastRowIndexKnown:[Gt,ie],expandAll:[ae,ie],collapseAll:[ae,ie],onRowHeightChanged:[ae,ie],setRowCount:[Gt,ie],getCacheBlockState:[Gt,ie]},qv={showLoadingOverlay:{version:"v32",message:'`showLoadingOverlay` is deprecated. Use the grid option "loading"=true instead or setGridOption("loading", true).'},clearRangeSelection:{version:"v32.2",message:"Use `clearCellSelection` instead."},getInfiniteRowCount:{version:"v32.2",old:"getInfiniteRowCount()",new:"getDisplayedRowCount()"},selectAllFiltered:{version:"v33",old:"selectAllFiltered()",new:'selectAll("filtered")'},deselectAllFiltered:{version:"v33",old:"deselectAllFiltered()",new:'deselectAll("filtered")'},selectAllOnCurrentPage:{version:"v33",old:"selectAllOnCurrentPage()",new:'selectAll("currentPage")'},deselectAllOnCurrentPage:{version:"v33",old:"deselectAllOnCurrentPage()",new:'deselectAll("currentPage")'}};function Yv(e,t,o){const i=qv[e];if(i){const{version:n,new:r,old:l,message:a}=i,d=l??e;return(...c)=>{const u=r?`Please use ${r} instead. `:"";return qt(`Since ${n} api.${d} is deprecated. ${u}${a??""}`),t.apply(t,c)}}const s=jv[e];return s?(...n)=>{const r=o.rowModel.getType();if(!s.includes(r)){ft(`api.${e} can only be called when gridOptions.rowModelType is ${s.join(" or ")}`);return}return t.apply(t,n)}:t}var Zv={detailCellRendererCtrl:"SharedMasterDetail",dndSourceComp:"DragAndDrop",fillHandle:"CellSelection",groupCellRendererCtrl:"GroupCellRenderer",headerFilterCellCtrl:"ColumnFilter",headerGroupCellCtrl:"ColumnGroup",rangeHandle:"CellSelection",tooltipFeature:"Tooltip",groupStrategy:"RowGrouping",treeGroupStrategy:"TreeData",rowNumberRowResizer:"RowNumbers",singleCell:"EditCore",fullRow:"EditCore",agSetColumnFilterHandler:"SetFilter",agMultiColumnFilterHandler:"MultiFilter",agGroupColumnFilterHandler:"GroupFilter",agNumberColumnFilterHandler:"NumberFilter",agDateColumnFilterHandler:"DateFilter",agTextColumnFilterHandler:"TextFilter"},Qv={expanded:1,contracted:1,"tree-closed":1,"tree-open":1,"tree-indeterminate":1,pin:1,"eye-slash":1,arrows:1,left:1,right:1,group:1,aggregation:1,pivot:1,"not-allowed":1,chart:1,cross:1,cancel:1,tick:1,first:1,previous:1,next:1,last:1,linked:1,unlinked:1,"color-picker":1,loading:1,menu:1,"menu-alt":1,filter:1,"filter-add":1,columns:1,maximize:1,minimize:1,copy:1,cut:1,paste:1,grip:1,save:1,csv:1,excel:1,"small-down":1,"small-left":1,"small-right":1,"small-up":1,asc:1,desc:1,none:1,up:1,down:1,plus:1,minus:1,settings:1,"checkbox-checked":1,"checkbox-indeterminate":1,"checkbox-unchecked":1,"radio-button-on":1,"radio-button-off":1,eye:1,"column-arrow":1,"un-pin":1,"pinned-top":1,"pinned-bottom":1,"chevron-up":1,"chevron-down":1,"chevron-left":1,"chevron-right":1,edit:1},Xv={chart:"MenuCore",cancel:"EnterpriseCore",first:"Pagination",previous:"Pagination",next:"Pagination",last:"Pagination",linked:"IntegratedCharts",loadingMenuItems:"MenuCore",unlinked:"IntegratedCharts",menu:"ColumnHeaderComp",legacyMenu:"ColumnMenu",filter:"ColumnFilter",filterActive:"ColumnFilter",filterAdd:"NewFiltersToolPanel",filterCardCollapse:"NewFiltersToolPanel",filterCardExpand:"NewFiltersToolPanel",filterCardEditing:"NewFiltersToolPanel",filterTab:"ColumnMenu",filtersToolPanel:"FiltersToolPanel",columns:["MenuCore"],columnsToolPanel:["ColumnsToolPanel"],maximize:"EnterpriseCore",minimize:"EnterpriseCore",save:"MenuCore",columnGroupOpened:"ColumnGroupHeaderComp",columnGroupClosed:"ColumnGroupHeaderComp",accordionOpen:"EnterpriseCore",accordionClosed:"EnterpriseCore",accordionIndeterminate:"EnterpriseCore",columnSelectClosed:["ColumnsToolPanel","ColumnMenu"],columnSelectOpen:["ColumnsToolPanel","ColumnMenu"],columnSelectIndeterminate:["ColumnsToolPanel","ColumnMenu"],columnMovePin:"SharedDragAndDrop",columnMoveHide:"SharedDragAndDrop",columnMoveMove:"SharedDragAndDrop",columnMoveLeft:"SharedDragAndDrop",columnMoveRight:"SharedDragAndDrop",columnMoveGroup:"SharedDragAndDrop",columnMoveValue:"SharedDragAndDrop",columnMovePivot:"SharedDragAndDrop",dropNotAllowed:"SharedDragAndDrop",ensureColumnVisible:["ColumnsToolPanel","ColumnMenu"],groupContracted:"GroupCellRenderer",groupExpanded:"GroupCellRenderer",setFilterGroupClosed:"SetFilter",setFilterGroupOpen:"SetFilter",setFilterGroupIndeterminate:"SetFilter",setFilterLoading:"SetFilter",close:"EnterpriseCore",check:"MenuItem",colorPicker:"CommunityCore",groupLoading:"LoadingCellRenderer",menuAlt:"ColumnHeaderComp",menuPin:"MenuCore",menuValue:"MenuCore",menuAddRowGroup:["MenuCore","ColumnsToolPanel"],menuRemoveRowGroup:["MenuCore","ColumnsToolPanel"],clipboardCopy:"MenuCore",clipboardCut:"MenuCore",clipboardPaste:"MenuCore",pivotPanel:["ColumnsToolPanel","RowGroupingPanel"],rowGroupPanel:["ColumnsToolPanel","RowGroupingPanel"],valuePanel:"ColumnsToolPanel",columnDrag:"EnterpriseCore",rowDrag:["RowDrag","DragAndDrop"],csvExport:"MenuCore",excelExport:"MenuCore",smallDown:"CommunityCore",selectOpen:"CommunityCore",richSelectOpen:"RichSelect",richSelectRemove:"RichSelect",smallLeft:"CommunityCore",smallRight:"CommunityCore",subMenuOpen:"MenuItem",subMenuOpenRtl:"MenuItem",panelDelimiter:"RowGroupingPanel",panelDelimiterRtl:"RowGroupingPanel",smallUp:"CommunityCore",sortAscending:["MenuCore","Sort"],sortDescending:["MenuCore","Sort"],sortUnSort:["MenuCore","Sort"],advancedFilterBuilder:"AdvancedFilter",advancedFilterBuilderDrag:"AdvancedFilter",advancedFilterBuilderInvalid:"AdvancedFilter",advancedFilterBuilderMoveUp:"AdvancedFilter",advancedFilterBuilderMoveDown:"AdvancedFilter",advancedFilterBuilderAdd:"AdvancedFilter",advancedFilterBuilderRemove:"AdvancedFilter",advancedFilterBuilderSelectOpen:"AdvancedFilter",chartsMenu:"IntegratedCharts",chartsMenuEdit:"IntegratedCharts",chartsMenuAdvancedSettings:"IntegratedCharts",chartsMenuAdd:"IntegratedCharts",chartsColorPicker:"IntegratedCharts",chartsThemePrevious:"IntegratedCharts",chartsThemeNext:"IntegratedCharts",chartsDownload:"IntegratedCharts",checkboxChecked:"CommunityCore",checkboxIndeterminate:"CommunityCore",checkboxUnchecked:"CommunityCore",radioButtonOn:"CommunityCore",radioButtonOff:"CommunityCore",rowPin:"PinnedRow",rowUnpin:"PinnedRow",rowPinBottom:"PinnedRow",rowPinTop:"PinnedRow"},Jv=new Set(["colorPicker","smallUp","checkboxChecked","checkboxIndeterminate","checkboxUnchecked","radioButtonOn","radioButtonOff","smallDown","smallLeft","smallRight"]),eS=class extends x{constructor(){super(...arguments),this.beanName="validation"}wireBeans(e){this.gridOptions=e.gridOptions,lc(this)}warnOnInitialPropertyUpdate(e,t){e==="api"&&Kv[t]&&k(22,{key:t})}processGridOptions(e){this.processOptions(e,Cw())}validateApiFunction(e,t){return Yv(e,t,this.beans)}missingUserComponent(e,t,o,i){const s=Lt[t];s?this.gos.assertModuleRegistered(s,`AG Grid '${e}' component: ${t}`):k(101,{propertyName:e,componentName:t,agGridDefaults:o,jsComps:i})}missingDynamicBean(e){const t=Zv[e];return t?ye(200,{...this.gos.getModuleErrorParams(),moduleName:t,reasonOrId:e}):void 0}checkRowEvents(e){oS.has(e)&&k(10,{eventType:e})}validateIcon(e){if(Jv.has(e)&&k(43,{iconName:e}),Qv[e])return;const t=Xv[e];if(t){z(200,{reasonOrId:`icon '${e}'`,moduleName:t,gridScoped:us(),gridId:this.beans.context.getGridId(),rowModelType:this.gos.get("rowModelType"),additionalText:"Alternatively, use the CSS icon name directly."});return}k(134,{iconName:e})}isProvidedUserComp(e){return!!Lt[e]}validateColDef(e){this.processOptions(e,rw())}processOptions(e,t){const{validations:o,deprecations:i,allProperties:s,propertyExceptions:n,objectName:r,docsUrl:l}=t;s&&this.gridOptions.suppressPropertyNamesCheck!==!0&&this.checkProperties(e,[...n??[],...Object.keys(i)],s,r,l);const a=new Set;Object.keys(e).forEach(c=>{const u=i[c];if(u){const{message:w,version:S}=u;a.add(`As of v${S}, ${String(c)} is deprecated. ${w??""}`)}const h=e[c];if(h==null||h===!1)return;const g=o[c];if(!g)return;const{dependencies:p,validate:f,supportedRowModels:C,expectedType:m}=g;if(m){const w=typeof h;if(w!==m){a.add(`${String(c)} should be of type '${m}' but received '${w}' (${h}).`);return}}if(C){const w=this.gridOptions.rowModelType??"clientSide";if(!C.includes(w)){a.add(`${String(c)} is not supported with the '${w}' row model. It is only valid with: ${C.join(", ")}.`);return}}if(p){const w=this.checkForRequiredDependencies(c,p,e);if(w){a.add(w);return}}if(f){const w=f(e,this.gridOptions,this.beans);if(w){a.add(w);return}}}),a.size>0&&a.forEach(c=>{qt(c)})}checkForRequiredDependencies(e,t,o){const s=Object.entries(t).filter(([n,r])=>{const l=o[n];return!r.required.includes(l)});return s.length===0?null:s.map(([n,r])=>`'${String(e)}' requires '${n}' to be one of [${r.required.map(l=>l===null?"null":l===void 0?"undefined":l).join(", ")}]. ${r.reason??""}`).join(`
|
|
57
57
|
`)}checkProperties(e,t,o,i,s){const n=["__ob__","__v_skip","__metadata__"],r=tS(Object.getOwnPropertyNames(e),[...n,...t,...o],o),l=Object.keys(r);for(const a of l){const d=r[a];let c=`invalid ${i} property '${a}' did you mean any of these: ${d.slice(0,8).join(", ")}.`;o.includes("context")&&(c+=`
|
|
58
|
-
If you are trying to annotate ${i} with application data, use the '${i}.context' property instead.`),qt(c)}if(l.length>0&&s){const a=this.beans.frameworkOverrides.getDocLink(s);qt(`to see all the valid ${i} properties please check: ${a}`)}}getConsoleMessage(e,t){return Iv(e,t)}};function tS(e,t,o){const i={},s=e.filter(n=>!t.some(r=>r===n));return s.length>0&&s.forEach(n=>i[n]=ln({inputValue:n,allSuggestions:o}).values),i}var oS=new Set(["firstChildChanged","lastChildChanged","childIndexChanged"]),iS={moduleName:"Validation",version:H,beans:[eS]},Ri=0,sS=200,nS=class extends x{constructor(){super(...arguments),this.beanName="popupSvc",this.popupList=[]}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.gridCtrl=e.gridCtrl}),this.addManagedEventListeners({gridStylesChanged:this.handleThemeChange.bind(this)})}getPopupParent(){const e=this.gos.get("popupParent");return e||this.gridCtrl.getGui()}positionPopupForMenu(e){const{eventSource:t,ePopup:o,column:i,node:s,event:n}=e,r=t.getBoundingClientRect(),l=this.getParentRect();this.setAlignedTo(t,o);let a=!1;const d=()=>{const c=this.keepXYWithinBounds(o,r.top-l.top,0),u=o.clientWidth>0?o.clientWidth:200;a||(o.style.minWidth=`${u}px`,a=!0);const g=l.right-l.left-u;let p;return this.gos.get("enableRtl")?(p=C(),p<0&&(p=f(),this.setAlignedStyles(o,"left")),p>g&&(p=0,this.setAlignedStyles(o,"right"))):(p=f(),p>g&&(p=C(),this.setAlignedStyles(o,"right")),p<0&&(p=0,this.setAlignedStyles(o,"left"))),{x:p,y:c};function f(){return r.right-l.left-2}function C(){return r.left-l.left-u}};this.positionPopup({ePopup:o,keepWithinBounds:!0,updatePosition:d,postProcessCallback:()=>this.callPostProcessPopup("subMenu",o,t,n instanceof MouseEvent?n:void 0,i,s)})}positionPopupUnderMouseEvent(e){const{ePopup:t,nudgeX:o,nudgeY:i,skipObserver:s}=e;this.positionPopup({ePopup:t,nudgeX:o,nudgeY:i,keepWithinBounds:!0,skipObserver:s,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:o,nudgeY:i,keepWithinBounds:s,eventSource:n,alignSide:r="left",position:l="over",column:a,rowNode:d,type:c}=e,u=n.getBoundingClientRect(),h=this.getParentRect();this.setAlignedTo(n,t);const g=()=>{let p=u.left-h.left;r==="right"&&(p-=t.offsetWidth-u.width);let f;return l==="over"?(f=u.top-h.top,this.setAlignedStyles(t,"over")):(this.setAlignedStyles(t,"under"),this.shouldRenderUnderOrAbove(t,u,h,e.nudgeY||0)==="under"?f=u.top-h.top+u.height:f=u.top-t.offsetHeight-(i||0)*2-h.top),{x:p,y:f}};this.positionPopup({ePopup:t,nudgeX:o,nudgeY:i,keepWithinBounds:s,updatePosition:g,postProcessCallback:()=>this.callPostProcessPopup(c,t,n,null,a,d)})}shouldRenderUnderOrAbove(e,t,o,i){const s=o.bottom-t.bottom,n=t.top-o.top,r=e.offsetHeight+i;return s>r?"under":n>r||n>s?"above":"under"}setAlignedStyles(e,t){const o=this.getPopupIndex(e);if(o===-1)return;const i=this.popupList[o],{alignedToElement:s}=i;!s||(["right","left","over","above","under"].forEach(r=>{s.classList.remove(`ag-has-popup-positioned-${r}`),e.classList.remove(`ag-popup-positioned-${r}`)}),!t)||(s.classList.add(`ag-has-popup-positioned-${t}`),e.classList.add(`ag-popup-positioned-${t}`))}setAlignedTo(e,t){const o=this.getPopupIndex(t);if(o!==-1){const i=this.popupList[o];i.alignedToElement=e}}callPostProcessPopup(e,t,o,i,s,n){const r=this.gos.getCallback("postProcessPopup");r&&r({column:s,rowNode:n,ePopup:t,type:e,eventSource:o,mouseEvent:i})}positionPopup(e){const{ePopup:t,keepWithinBounds:o,nudgeX:i,nudgeY:s,skipObserver:n,updatePosition:r}=e,l={width:0,height:0},a=(d=!1)=>{let{x:c,y:u}=r();d&&t.clientWidth===l.width&&t.clientHeight===l.height||(l.width=t.clientWidth,l.height=t.clientHeight,i&&(c+=i),s&&(u+=s),o&&(c=this.keepXYWithinBounds(t,c,1),u=this.keepXYWithinBounds(t,u,0)),t.style.left=`${c}px`,t.style.top=`${u}px`,e.postProcessCallback&&e.postProcessCallback())};if(a(),!n){const d=Ze(this.beans,t,()=>a(!0));setTimeout(()=>d(),sS)}}getActivePopups(){return this.popupList.map(e=>e.element)}getParentRect(){const e=X(this.beans);let t=this.getPopupParent();return t===e.body?t=e.documentElement:getComputedStyle(t).position==="static"&&(t=t.offsetParent),Hn(t)}keepXYWithinBounds(e,t,o){const i=o===0,s=i?"clientHeight":"clientWidth",n=i?"top":"left",r=i?"height":"width",l=i?"scrollTop":"scrollLeft",a=X(this.beans),d=a.documentElement,c=this.getPopupParent(),u=e.getBoundingClientRect(),h=c.getBoundingClientRect(),g=a.documentElement.getBoundingClientRect(),p=c===a.body,f=Math.ceil(u[r]);let m=p?(i?oc:ji)(d)+d[l]:c[s];p&&(m-=Math.abs(g[n]-h[n]));const w=m-f;return Math.min(Math.max(t,0),Math.abs(w))}addPopup(e){const t=X(this.beans),{eChild:o,ariaLabel:i,ariaOwns:s,alwaysOnTop:n,positionCallback:r,anchorToElement:l}=e;if(!t)return k(122),{hideFunc:()=>{}};const a=this.getPopupIndex(o);if(a!==-1)return{hideFunc:this.popupList[a].hideFunc};this.initialisePopupPosition(o);const d=this.createPopupWrapper(o,!!n,i,s),c=this.addEventListenersToPopup({...e,wrapperEl:d});return r&&r(),this.addPopupToPopupList(o,d,c,l),{hideFunc:c}}initialisePopupPosition(e){const o=this.getPopupParent().getBoundingClientRect();M(e.style.top)||(e.style.top=`${o.top*-1}px`),M(e.style.left)||(e.style.left=`${o.left*-1}px`)}createPopupWrapper(e,t,o,i){const s=this.getPopupParent(),{environment:n,gos:r}=this.beans,l=Q({tag:"div"});return n.applyThemeClasses(l),l.classList.add("ag-popup"),e.classList.add(r.get("enableRtl")?"ag-rtl":"ag-ltr","ag-popup-child"),e.hasAttribute("role")||Be(e,"dialog"),o?zt(e,o):i&&(e.id||(e.id=`popup-component-${Ri}`),Pn(i,e.id)),l.appendChild(e),s.appendChild(l),t?this.setAlwaysOnTop(e,!0):this.bringPopupToFront(e),l}handleThemeChange(e){if(e.themeChanged){const t=this.beans.environment;for(const o of this.popupList)t.applyThemeClasses(o.wrapper)}}addEventListenersToPopup(e){const t=this.beans,o=X(t),i=this.getPopupParent(),{wrapperEl:s,eChild:n,closedCallback:r,afterGuiAttached:l,closeOnEsc:a,modal:d,ariaOwns:c}=e;let u=!1;const h=C=>{if(!s.contains(j(t)))return;C.key===y.ESCAPE&&!ke(C)&&f({keyboardEvent:C})},g=C=>f({mouseEvent:C}),p=C=>f({touchEvent:C}),f=(C={})=>{const{mouseEvent:m,touchEvent:w,keyboardEvent:S,forceHide:v}=C;!v&&(this.isEventFromCurrentPopup({mouseEvent:m,touchEvent:w},n)||u)||(u=!0,i.removeChild(s),o.removeEventListener("keydown",h),o.removeEventListener("mousedown",g),o.removeEventListener("touchstart",p),o.removeEventListener("contextmenu",g),this.eventSvc.removeEventListener("dragStarted",g),r&&r(m||w||S),this.removePopupFromPopupList(n,c))};return l&&l({hidePopup:f}),window.setTimeout(()=>{a&&o.addEventListener("keydown",h),d&&(o.addEventListener("mousedown",g),this.eventSvc.addEventListener("dragStarted",g),o.addEventListener("touchstart",p),o.addEventListener("contextmenu",g))},0),f}addPopupToPopupList(e,t,o,i){this.popupList.push({element:e,wrapper:t,hideFunc:o,instanceId:Ri,isAnchored:!!i}),i&&this.setPopupPositionRelatedToElement(e,i),Ri=Ri+1}getPopupIndex(e){return this.popupList.findIndex(t=>t.element===e)}setPopupPositionRelatedToElement(e,t){const o=this.getPopupIndex(e);if(o===-1)return;const i=this.popupList[o];if(i.stopAnchoringPromise&&i.stopAnchoringPromise.then(n=>n&&n()),i.stopAnchoringPromise=void 0,i.isAnchored=!1,!t)return;const s=this.keepPopupPositionedRelativeTo({element:t,ePopup:e,hidePopup:i.hideFunc});return i.stopAnchoringPromise=s,i.isAnchored=!0,s}removePopupFromPopupList(e,t){this.setAlignedStyles(e,null),this.setPopupPositionRelatedToElement(e,null),t&&Pn(t,null),this.popupList=this.popupList.filter(o=>o.element!==e)}keepPopupPositionedRelativeTo(e){const t=this.getPopupParent(),o=t.getBoundingClientRect(),{element:i,ePopup:s}=e,n=i.getBoundingClientRect(),r=u=>parseInt(u.substring(0,u.length-1),10),l=(u,h)=>{const g=o[u]-n[u],p=r(s.style[u]);return{initialDiff:g,lastDiff:g,initial:p,last:p,direction:h}},a=l("top",0),d=l("left",1),c=this.beans.frameworkOverrides;return new eo(u=>{c.wrapIncoming(()=>{c.setInterval(()=>{const h=t.getBoundingClientRect(),g=i.getBoundingClientRect();if(g.top==0&&g.left==0&&g.height==0&&g.width==0){e.hidePopup();return}const f=(C,m)=>{const w=r(s.style[m]);C.last!==w&&(C.initial=w,C.last=w);const S=h[m]-g[m];if(S!=C.lastDiff){const v=this.keepXYWithinBounds(s,C.initial+C.initialDiff-S,C.direction);s.style[m]=`${v}px`,C.last=v}C.lastDiff=S};f(a,"top"),f(d,"left")},200).then(h=>{u(()=>{h!=null&&window.clearInterval(h)})})},"popupPositioning")})}hasAnchoredPopup(){return this.popupList.some(e=>e.isAnchored)}isEventFromCurrentPopup(e,t){const{mouseEvent:o,touchEvent:i}=e,s=o||i;if(!s)return!1;const n=this.getPopupIndex(t);if(n===-1)return!1;for(let r=n;r<this.popupList.length;r++){const l=this.popupList[r];if(Pc(l.element,s))return!0}return this.isElementWithinCustomPopup(s.target)}isElementWithinCustomPopup(e){const t=X(this.beans);for(;e&&e!==t.body;){if(e.classList.contains("ag-custom-component-popup")||e.parentElement===null)return!0;e=e.parentElement}return!1}getWrapper(e){for(;!e.classList.contains("ag-popup")&&e.parentElement;)e=e.parentElement;return e.classList.contains("ag-popup")?e:null}setAlwaysOnTop(e,t){const o=this.getWrapper(e);o&&(o.classList.toggle("ag-always-on-top",!!t),t&&this.bringPopupToFront(o))}bringPopupToFront(e){const t=this.getPopupParent(),o=Array.prototype.slice.call(t.querySelectorAll(".ag-popup")),i=o.length,s=this.getWrapper(e);if(!s||i<=1||!t.contains(e))return;const n=[],r=[];for(const h of o)h!==s&&(h.classList.contains("ag-always-on-top")?r.push(h):n.push(h));const l=[],a=r.length,u=s.classList.contains("ag-always-on-top")||!a?[...n,...r,s]:[...n,s,...r];for(let h=0;h<=i;h++){const g=u[h];if(o[h]===u[h]||g===s)continue;g.querySelectorAll("div").forEach(f=>{f.scrollTop!==0&&l.push([f,f.scrollTop])}),h===0?t.insertAdjacentElement("afterbegin",g):u[h-1].insertAdjacentElement("afterend",g)}for(;l.length;){const h=l.pop();h[0].scrollTop=h[1]}}},Ea={moduleName:"Popup",version:H,beans:[nS]},rS=".ag-tooltip{background-color:var(--ag-tooltip-background-color);border:var(--ag-tooltip-border);border-radius:var(--ag-border-radius);color:var(--ag-tooltip-text-color);padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding);position:absolute;white-space:normal;z-index:99999;&:where(.ag-cell-editor-tooltip){background-color:var(--ag-tooltip-error-background-color);border:var(--ag-tooltip-error-border);color:var(--ag-tooltip-error-text-color);font-weight:500}}.ag-tooltip-custom{position:absolute;z-index:99999}.ag-tooltip-custom:where(:not(.ag-tooltip-interactive)),.ag-tooltip:where(:not(.ag-tooltip-interactive)){pointer-events:none}.ag-tooltip-animate{transition:opacity 1s;&:where(.ag-tooltip-hiding){opacity:0}}",cn=(e,t,o)=>{var l,a,d;const{editModelSvc:i}=e,s=(a=(l=i==null?void 0:i.getCellValidationModel())==null?void 0:l.getCellValidation(t))==null?void 0:a.errorMessages,n=(d=i==null?void 0:i.getRowValidationModel().getRowValidation(t))==null?void 0:d.errorMessages,r=s||n;return r&&r.length?r.join(o("tooltipValidationErrorSeparator",". ")):void 0},lS=class extends x{constructor(){super(...arguments),this.beanName="tooltipSvc"}setupHeaderTooltip(e,t,o,i){e&&t.destroyBean(e);const s=dn(this.gos),{column:n,eGui:r}=t,l=n.getColDef();!i&&s&&!l.headerComponent&&(i=Po(()=>r.querySelector(".ag-header-cell-text")));const a={getColumn:()=>n,getColDef:()=>n.getColDef(),getGui:()=>r,getLocation:()=>"header",getTooltipValue:()=>o??n.getColDef().headerTooltip,shouldDisplayTooltip:i};let d=this.createTooltipFeature(a);return d&&(d=t.createBean(d),t.setRefreshFunction("tooltip",()=>d.refreshTooltip())),d}setupHeaderGroupTooltip(e,t,o,i){e&&t.destroyBean(e);const s=dn(this.gos),{column:n,eGui:r}=t,l=n.getColGroupDef();!i&&s&&!(l!=null&&l.headerGroupComponent)&&(i=Po(()=>r.querySelector(".ag-header-group-text")));const a={getColumn:()=>n,getGui:()=>r,getLocation:()=>"headerGroup",getTooltipValue:()=>o??(l&&l.headerTooltip),shouldDisplayTooltip:i};l&&(a.getColDef=()=>l);const d=this.createTooltipFeature(a);return d&&t.createBean(d)}enableCellTooltipFeature(e,t,o){const{beans:i}=this,{gos:s,editSvc:n}=i,{column:r,rowNode:l}=e;let a="cell";const d=()=>{const g=!!!(n!=null&&n.isEditing(e))&&cn(i,e,this.getLocaleTextFunc());if(g)return a="cellEditor",g;a="cell";const p=r.getColDef(),f=l.data;if(p.tooltipField&&M(f))return Wt(f,p.tooltipField,r.isTooltipFieldContainsDots());const C=p.tooltipValueGetter;return C?C(N(s,{location:"cell",colDef:r.getColDef(),column:r,rowIndex:e.cellPosition.rowIndex,node:l,data:l.data,value:e.value,valueFormatted:e.valueFormatted})):null},c=dn(s);o||(c&&!e.isCellRenderer()?o=()=>{const h=!!(n!=null&&n.isEditing(e));if(!h&&cn(i,e,this.getLocaleTextFunc()))return!0;if(!r.isTooltipEnabled())return!1;const f=Po(()=>{const C=e.eGui;return C.children.length===0?C:C.querySelector(".ag-cell-value")});return!h&&f()}:o=()=>!(n!=null&&n.isEditing(e)));const u={getColumn:()=>r,getColDef:()=>r.getColDef(),getRowIndex:()=>e.cellPosition.rowIndex,getRowNode:()=>l,getGui:()=>e.eGui,getLocation:()=>a,getTooltipValue:t!=null?()=>t:d,getValueFormatted:()=>e.valueFormatted,shouldDisplayTooltip:o};return this.createTooltipFeature(u,i)}setupFullWidthRowTooltip(e,t,o,i){const s={getGui:()=>t.getFullWidthElement(),getTooltipValue:()=>o,getLocation:()=>"fullWidthRow",shouldDisplayTooltip:i},n=this.beans,r=n.context;e&&t.destroyBean(e,r);const l=this.createTooltipFeature(s,n);if(l)return t.createBean(l,r)}setupCellEditorTooltip(e,t){var l,a;const{beans:o}=this,{context:i}=o,s=((l=t.getValidationElement)==null?void 0:l.call(t,!0))||!((a=t.isPopup)!=null&&a.call(t))&&e.eGui;if(!s)return;const n={getGui:()=>s,getTooltipValue:()=>cn(o,e,this.getLocaleTextFunc()),getLocation:()=>"cellEditor",shouldDisplayTooltip:()=>{var p,f;const{editModelSvc:d}=o,c=(p=d==null?void 0:d.getRowValidationModel())==null?void 0:p.getRowValidationMap(),u=(f=d==null?void 0:d.getCellValidationModel())==null?void 0:f.getCellValidationMap(),h=!!c&&c.size>0,g=!!u&&u.size>0;return h||g}},r=this.createTooltipFeature(n,o);if(r)return e.createBean(r,i)}initCol(e){const{colDef:t}=e;e.tooltipEnabled=M(t.tooltipField)||M(t.tooltipValueGetter)||M(t.tooltipComponent)}createTooltipFeature(e,t){return this.beans.registry.createDynamicBean("tooltipFeature",!1,e,t)}},xa={moduleName:"Tooltip",version:H,beans:[lS],dynamicBeans:{tooltipFeature:Uv},userComponents:{agTooltipComponent:_v},dependsOn:[Ea],css:[rS]},aS=".ag-cell-inline-editing{border:var(--ag-cell-editing-border)!important;border-radius:var(--ag-border-radius);box-shadow:var(--ag-cell-editing-shadow);padding:0;z-index:1;.ag-cell-edit-wrapper,.ag-cell-editor,.ag-cell-wrapper,:where(.ag-cell-editor) .ag-input-field-input,:where(.ag-cell-editor) .ag-wrapper{height:100%;line-height:normal;min-height:100%;width:100%}&.ag-cell-editing-error{border-color:var(--ag-invalid-color)!important}}:where(.ag-popup-editor) .ag-large-text{background-color:var(--ag-background-color);border-radius:var(--ag-border-radius);box-shadow:var(--ag-dropdown-shadow);padding:0}.ag-large-text-input{height:auto;padding:var(--ag-cell-horizontal-padding)}:where(.ag-rtl .ag-large-text-input) textarea{resize:none}:where(.ag-ltr) .ag-checkbox-edit{padding-left:var(--ag-cell-horizontal-padding)}:where(.ag-rtl) .ag-checkbox-edit{padding-right:var(--ag-cell-horizontal-padding)}:where(.ag-row.ag-row-editing-invalid .ag-cell-inline-editing){opacity:.8}",dS={tag:"div",cls:"ag-cell-wrapper ag-cell-edit-wrapper ag-checkbox-edit",children:[{tag:"ag-checkbox",ref:"eEditor",role:"presentation"}]},cS=class extends fi{constructor(){super(dS,[Gs]),this.eEditor=A}initialiseEditor(e){const t=e.value??void 0,o=this.eEditor;o.setValue(t),o.getInputElement().setAttribute("tabindex","-1"),this.setAriaLabel(t),this.addManagedListeners(o,{fieldValueChanged:s=>this.setAriaLabel(s.selected)})}getValue(){return this.eEditor.getValue()}focusIn(){this.eEditor.getFocusableElement().focus()}afterGuiAttached(){this.params.cellStartedEdit&&this.focusIn()}isPopup(){return!1}setAriaLabel(e){const t=this.getLocaleTextFunc(),o=Tn(t,e),i=t("ariaToggleCellValue","Press SPACE to toggle cell value");this.eEditor.setInputAriaLabel(`${i} (${o})`)}getValidationElement(e){return e?this.params.eGridCell:this.eEditor.getInputElement()}getValidationErrors(){const{params:e}=this,{getValidationErrors:t}=e,o=this.getValue();return t?t({value:o,internalErrors:null,cellEditorParams:e}):null}},Ei=class extends fi{constructor(e){super(),this.cellEditorInput=e,this.eEditor=A}initialiseEditor(e){const{cellEditorInput:t}=this;this.setTemplate({tag:"div",cls:"ag-cell-edit-wrapper",children:[t.getTemplate()]},t.getAgComponents());const{eEditor:o}=this,{cellStartedEdit:i,eventKey:s,suppressPreventDefault:n}=e;o.getInputElement().setAttribute("title",""),t.init(o,e);let r,l=!0;i?(this.focusAfterAttached=!0,s===y.BACKSPACE||s===y.DELETE?r="":s&&s.length===1?n?l=!1:r=s:(r=t.getStartValue(),s!==y.F2&&(this.highlightAllOnFocus=!0))):(this.focusAfterAttached=!1,r=t.getStartValue()),l&&r!=null&&o.setStartValue(r),this.addGuiEventListener("keydown",a=>{const{key:d}=a;(d===y.PAGE_UP||d===y.PAGE_DOWN)&&a.preventDefault()})}afterGuiAttached(){var i,s;const e=this.getLocaleTextFunc(),t=this.eEditor;if(t.setInputAriaLabel(e("ariaInputEditor","Input Editor")),!this.focusAfterAttached)return;ht()||t.getFocusableElement().focus();const o=t.getInputElement();this.highlightAllOnFocus?o.select():(s=(i=this.cellEditorInput).setCaret)==null||s.call(i)}focusIn(){const{eEditor:e}=this,t=e.getFocusableElement(),o=e.getInputElement();t.focus(),o.select()}getValue(){return this.cellEditorInput.getValue()}isPopup(){return!1}getValidationElement(){return this.eEditor.getInputElement()}getValidationErrors(){return this.cellEditorInput.getValidationErrors()}},uS={tag:"ag-input-date-field",ref:"eEditor",cls:"ag-cell-editor"},hS=class{constructor(e,t){this.getDataTypeService=e,this.getLocaleTextFunc=t}getTemplate(){return uS}getAgComponents(){return[Dl]}init(e,t){var r,l;this.eEditor=e,this.params=t;const{min:o,max:i,step:s,colDef:n}=t;o!=null&&e.setMin(o),i!=null&&e.setMax(i),s!=null&&e.setStep(s),this.includeTime=t.includeTime??((l=(r=this.getDataTypeService())==null?void 0:r.getDateIncludesTimeFlag)==null?void 0:l.call(r,n.cellDataType)),this.includeTime!=null&&e.setIncludeTime(this.includeTime)}getValidationErrors(){const t=this.eEditor.getInputElement().valueAsDate,{params:o}=this,{min:i,max:s,getValidationErrors:n}=o;let r=[];const l=this.getLocaleTextFunc();if(t instanceof Date&&!isNaN(t.getTime())){if(i){const a=i instanceof Date?i:new Date(i);if(t<a){const d=a.toLocaleDateString();r.push(l("minDateValidation",`Date must be after ${d}`,[d]))}}if(s){const a=s instanceof Date?s:new Date(s);if(t>a){const d=a.toLocaleDateString();r.push(l("maxDateValidation",`Date must be before ${d}`,[d]))}}}return r.length||(r=null),n?n({value:t,cellEditorParams:o,internalErrors:r}):r}getValue(){const{eEditor:e,params:t}=this,o=e.getDate();return!M(o)&&!M(t.value)?t.value:o??null}getStartValue(){const{value:e}=this.params;if(e instanceof Date)return $e(e,this.includeTime??!1)}},gS=class extends Ei{constructor(){super(new hS(()=>this.beans.dataTypeSvc,()=>this.getLocaleTextFunc()))}},pS={tag:"ag-input-date-field",ref:"eEditor",cls:"ag-cell-editor"},fS=class{constructor(e,t){this.getDataTypeService=e,this.getLocaleTextFunc=t}getTemplate(){return pS}getAgComponents(){return[Dl]}init(e,t){var r,l;this.eEditor=e,this.params=t;const{min:o,max:i,step:s,colDef:n}=t;o!=null&&e.setMin(o),i!=null&&e.setMax(i),s!=null&&e.setStep(s),this.includeTime=t.includeTime??((l=(r=this.getDataTypeService())==null?void 0:r.getDateIncludesTimeFlag)==null?void 0:l.call(r,n.cellDataType)),this.includeTime!=null&&e.setIncludeTime(this.includeTime)}getValidationErrors(){const{eEditor:e,params:t}=this,o=e.getInputElement().value,i=this.formatDate(this.parseDate(o??void 0)),{min:s,max:n,getValidationErrors:r}=t;let l=[];if(i){const a=new Date(i),d=this.getLocaleTextFunc();if(s){const c=new Date(s);if(a<c){const u=c.toLocaleDateString();l.push(d("minDateValidation",`Date must be after ${u}`,[u]))}}if(n){const c=new Date(n);if(a>c){const u=c.toLocaleDateString();l.push(d("maxDateValidation",`Date must be before ${u}`,[u]))}}}return l.length||(l=null),r?r({value:this.getValue(),cellEditorParams:t,internalErrors:l}):l}getValue(){const{params:e,eEditor:t}=this,o=this.formatDate(t.getDate());return!M(o)&&!M(e.value)?e.value:e.parseValue(o??"")}getStartValue(){return $e(this.parseDate(this.params.value??void 0)??null,this.includeTime??!1)}parseDate(e){const t=this.getDataTypeService();return t?t.getDateParserFunction(this.params.column)(e):no(e)??void 0}formatDate(e){const t=this.getDataTypeService();return t?t.getDateFormatterFunction(this.params.column)(e):$e(e??null,this.includeTime??!1)??void 0}},CS=class extends Ei{constructor(){super(new fS(()=>this.beans.dataTypeSvc,()=>this.getLocaleTextFunc()))}},mS={tag:"div",cls:"ag-large-text",children:[{tag:"ag-input-text-area",ref:"eEditor",cls:"ag-large-text-input"}]},wS=class extends fi{constructor(){super(mS,[dp]),this.eEditor=A}initialiseEditor(e){const{eEditor:t}=this,{cellStartedEdit:o,eventKey:i,value:s,maxLength:n,cols:r,rows:l}=e;this.focusAfterAttached=o,t.getInputElement().setAttribute("title",""),t.setMaxLength(n||200).setCols(r||60).setRows(l||10);let a;o?(this.focusAfterAttached=!0,i===y.BACKSPACE||i===y.DELETE?a="":i&&i.length===1?a=i:(a=s.toString(),i!==y.F2&&(this.highlightAllOnFocus=!0))):(this.focusAfterAttached=!1,a=s.toString()),a!=null&&t.setValue(a,!0),this.addGuiEventListener("keydown",this.onKeyDown.bind(this)),this.activateTabIndex()}onKeyDown(e){const t=e.key;(t===y.LEFT||t===y.UP||t===y.RIGHT||t===y.DOWN||e.shiftKey&&t===y.ENTER)&&e.stopPropagation()}afterGuiAttached(){const{eEditor:e,focusAfterAttached:t,highlightAllOnFocus:o}=this,i=this.getLocaleTextFunc();e.setInputAriaLabel(i("ariaInputEditor","Input Editor")),t&&(e.getFocusableElement().focus(),o&&e.getInputElement().select())}getValue(){const{eEditor:e,params:t}=this,{value:o}=t,i=e.getValue();return!M(i)&&!M(o)?o:t.parseValue(i)}getValidationElement(){return this.eEditor.getInputElement()}getValidationErrors(){const{params:e}=this,{maxLength:t,getValidationErrors:o}=e,i=this.getLocaleTextFunc(),s=this.getValue();let n=[];return typeof s=="string"&&t!=null&&s.length>t&&n.push(i("maxLengthValidation",`Must be ${t} characters or fewer.`,[String(t)])),n.length||(n=null),o?o({value:s,internalErrors:n,cellEditorParams:e}):n}},vS={tag:"ag-input-number-field",ref:"eEditor",cls:"ag-cell-editor"},SS=class{constructor(e){this.getLocaleTextFunc=e}getTemplate(){return vS}getAgComponents(){return[up]}init(e,t){this.eEditor=e,this.params=t;const{max:o,min:i,precision:s,step:n}=t;o!=null&&e.setMax(o),i!=null&&e.setMin(i),s!=null&&e.setPrecision(s),n!=null&&e.setStep(n);const r=e.getInputElement();t.preventStepping?e.addManagedElementListeners(r,{keydown:this.preventStepping}):t.showStepperButtons&&r.classList.add("ag-number-field-input-stepper")}getValidationErrors(){const{params:e}=this,{min:t,max:o,getValidationErrors:i}=e,n=this.eEditor.getInputElement().valueAsNumber,r=this.getLocaleTextFunc();let l=[];return typeof n=="number"&&(t!=null&&n<t&&l.push(r("minValueValidation",`Must be greater than or equal to ${t}.`,[String(t)])),o!=null&&n>o&&l.push(r("maxValueValidation",`Must be less than or equal to ${o}.`,[String(o)]))),l.length||(l=null),i?i({value:n,cellEditorParams:e,internalErrors:l}):l}preventStepping(e){(e.key===y.UP||e.key===y.DOWN)&&e.preventDefault()}getValue(){const{eEditor:e,params:t}=this,o=e.getValue();if(!M(o)&&!M(t.value))return t.value;let i=t.parseValue(o);if(i==null)return i;if(typeof i=="string"){if(i==="")return null;i=Number(i)}return isNaN(i)?null:i}getStartValue(){return this.params.value}setCaret(){ht()&&this.eEditor.getInputElement().focus({preventScroll:!0})}},bS=class extends Ei{constructor(){super(new SS(()=>this.getLocaleTextFunc()))}},yS={tag:"div",cls:"ag-cell-edit-wrapper",children:[{tag:"ag-select",ref:"eEditor",cls:"ag-cell-editor"}]},RS=class extends fi{constructor(){super(yS,[vp]),this.eEditor=A,this.startedByEnter=!1}wireBeans(e){this.valueSvc=e.valueSvc}initialiseEditor(e){this.focusAfterAttached=e.cellStartedEdit;const{eEditor:t,valueSvc:o,gos:i}=this,{values:s,value:n,eventKey:r}=e;if($(s)){k(58);return}this.startedByEnter=r!=null?r===y.ENTER:!1;let l=!1;s.forEach(u=>{const h={value:u},g=o.formatValue(e.column,null,u),p=g!=null;h.text=p?g:u,t.addOption(h),l=l||n===u}),l?t.setValue(e.value,!0):e.values.length&&t.setValue(e.values[0],!0);const{valueListGap:a,valueListMaxWidth:d,valueListMaxHeight:c}=e;a!=null&&t.setPickerGap(a),c!=null&&t.setPickerMaxHeight(c),d!=null&&t.setPickerMaxWidth(d),i.get("editType")!=="fullRow"&&this.addManagedListeners(this.eEditor,{selectedItem:()=>e.stopEditing()})}afterGuiAttached(){this.focusAfterAttached&&this.eEditor.getFocusableElement().focus(),this.startedByEnter&&setTimeout(()=>{this.isAlive()&&this.eEditor.showPicker()})}focusIn(){this.eEditor.getFocusableElement().focus()}getValue(){return this.eEditor.getValue()}isPopup(){return!1}getValidationElement(){return this.eEditor.getAriaElement()}getValidationErrors(){const{params:e}=this,{values:t,getValidationErrors:o}=e,i=this.getValue();let s=[];if(t&&!t.includes(i)){const n=this.getLocaleTextFunc();s.push(n("invalidSelectionValidation","Invalid selection."))}else s=null;return o?o({value:i,internalErrors:s,cellEditorParams:e}):s}},ES={tag:"ag-input-text-field",ref:"eEditor",cls:"ag-cell-editor"},xS=class{constructor(e){this.getLocaleTextFunc=e}getTemplate(){return ES}getAgComponents(){return[lp]}init(e,t){this.eEditor=e,this.params=t;const o=t.maxLength;o!=null&&e.setMaxLength(o)}getValidationErrors(){const{params:e}=this,{maxLength:t,getValidationErrors:o}=e,i=this.getValue(),s=this.getLocaleTextFunc();let n=[];return t!=null&&typeof i=="string"&&i.length>t&&n.push(s("maxLengthValidation",`Must be ${t} characters or fewer.`,[String(t)])),n.length||(n=null),o?o({value:i,cellEditorParams:e,internalErrors:n}):n}getValue(){const{eEditor:e,params:t}=this,o=e.getValue();return!M(o)&&!M(t.value)?t.value:t.parseValue(o)}getStartValue(){const e=this.params;return e.useFormatter||e.column.getColDef().refData?e.formatValue(e.value):e.value}setCaret(){const e=this.eEditor,t=e.getValue(),o=M(t)&&t.length||0;o&&e.getInputElement().setSelectionRange(o,o)}},Da=class extends Ei{constructor(){super(new xS(()=>this.getLocaleTextFunc()))}};function DS(e){return e.ctrlsSvc.getScrollFeature().getVScrollPosition()}function FS(e){return e.ctrlsSvc.getScrollFeature().getHScrollPosition()}function Fa(e,t,o="auto"){e.frameworkOverrides.wrapIncoming(()=>e.ctrlsSvc.getScrollFeature().ensureColumnVisible(t,o),"ensureVisible")}function Pa(e,t,o){e.frameworkOverrides.wrapIncoming(()=>e.ctrlsSvc.getScrollFeature().ensureIndexVisible(t,o),"ensureVisible")}function PS(e,t,o=null){e.frameworkOverrides.wrapIncoming(()=>e.ctrlsSvc.getScrollFeature().ensureNodeVisible(t,o),"ensureVisible")}function TS(e){var i;const t=(i=e.editModelSvc)==null?void 0:i.getEditMap(),o=[];return t==null||t.forEach((s,n)=>{const{rowIndex:r,rowPinned:l}=n;s.forEach((a,d)=>{const{editorValue:c,pendingValue:u,sourceValue:h,state:g}=a,p=ze(a);let f=c??u;f===ge&&(f=void 0);const C={newValue:f,oldValue:h,state:g,column:d,colId:d.getColId(),colKey:d.getColId(),rowIndex:r,rowPinned:l};(g==="editing"||g==="changed"&&p)&&o.push(C)})}),o}function IS(e,t=!1){var i;const{editSvc:o}=e;o!=null&&o.isBatchEditing()?(t?(i=e.editModelSvc)==null||i.getEditPositions().forEach(s=>{s.state==="editing"&&o.revertSingleCellEdit(s)}):st(e,!0),Dt(e)):o==null||o.stopEditing(void 0,{cancel:t,source:"api"})}function AS(e,t){var i;const o=K(e,t);return((i=e.editSvc)==null?void 0:i.isEditing(o))??!1}function MS(e,t){const{key:o,colKey:i,rowIndex:s,rowPinned:n}=t,{editSvc:r,colModel:l}=e,a=l.getCol(i);if(!a){k(12,{colKey:i});return}const c=it(e,{rowIndex:s,rowPinned:n||null});if(!c){k(290,{rowIndex:s,rowPinned:n});return}if(!a.isCellEditable(c))return;n==null&&Pa(e,s),Fa(e,i),r==null||r.startEditing({rowNode:c,column:a},{event:o?new KeyboardEvent("keydown",{key:o}):void 0,source:"api"})}function kS(e){var t;return((t=e.editSvc)==null?void 0:t.validateEdit())||null}var LS={tag:"div",cls:"ag-popup-editor",attrs:{tabindex:"-1"}},GS=class extends ks{constructor(e){super(LS),this.params=e}postConstruct(){Xe(this.gos,this.getGui(),"popupEditorWrapper",!0),this.addKeyDownListener()}addKeyDownListener(){const e=this.getGui(),t=this.params,o=i=>{xs(this.gos,i,t.node,t.column,!0)||t.onKeyDown(i)};this.addManagedElementListeners(e,{keydown:o})}},xi=(e,t=!1)=>{if(e!==void 0)return ze(e)||t&&e.state==="editing"};function Ta(e,t,o=!1){var i;return xi((i=e.editModelSvc)==null?void 0:i.getEdit(t),o)}function Ia(e,t){const{editModelSvc:o}=e,{column:i,rowNode:s}=t;if(e.gos.get("groupTotalRow")&&!(s!=null&&s.footer))return!1;for(const n of(s==null?void 0:s.allLeafChildren)??[])if(xi(o==null?void 0:o.getEdit({rowNode:n,column:i}))||xi(o==null?void 0:o.getEdit({rowNode:n.pinnedSibling,column:i})))return!0}function Aa(e,{rowNode:t,column:o}){var i;if(t=t.pinnedSibling,!!t)return xi((i=e.editModelSvc)==null?void 0:i.getEdit({rowNode:t,column:o}))}var HS=class extends x{constructor(e,t){super(),this.cellCtrl=e,this.beans=t,this.editSvc=t.editSvc,this.editModelSvc=t.editModelSvc}setComp(e){this.cellComp=e,this.applyCellStyles()}applyCellStyles(){var s;const{cellCtrl:e,editSvc:t,beans:o}=this;if(t!=null&&t.isBatchEditing()&&t.isEditing()){const n=Ta(o,e)||Ia(o,e)||Aa(o,e);this.applyBatchingStyle(n)}else this.applyBatchingStyle(!1);const i=!!((s=this.editModelSvc)!=null&&s.getCellValidationModel().hasCellValidation(this.cellCtrl));this.cellComp.toggleCss("ag-cell-editing-error",i)}applyBatchingStyle(e){var t;this.cellComp.toggleCss("ag-cell-editing",e??!1),this.cellComp.toggleCss("ag-cell-batch-edit",(e&&((t=this.editSvc)==null?void 0:t.isBatchEditing()))??!1)}},OS=class extends x{constructor(e,t){super(),this.rowCtrl=e,this.beans=t,this.gos=t.gos,this.editSvc=t.editSvc,this.editModelSvc=t.editModelSvc}applyRowStyles(){var r;const{rowCtrl:e,editModelSvc:t,beans:o}=this;let i=e.rowNode,s=t==null?void 0:t.getEditRow(i);const n=(r=this.editModelSvc)==null?void 0:r.getRowValidationModel().hasRowValidation({rowNode:i});if(!s&&i.pinnedSibling&&(i=i.pinnedSibling,s=t==null?void 0:t.getEditRow(i)),s){const l=Array.from(s.keys()).some(a=>{const d={rowNode:i,column:a};return Ta(o,d,!0)||Ia(o,d)||Aa(o,d)});this.applyStyle(n,l);return}this.applyStyle(n)}applyStyle(e=!1,t=!1){var s,n;const o=((s=this.editSvc)==null?void 0:s.isBatchEditing())??!1,i=this.gos.get("editType")==="fullRow";(n=this.rowCtrl)==null||n.forEachGui(void 0,({rowComp:r})=>{r.toggleCss("ag-row-editing",i&&t),r.toggleCss("ag-row-batch-edit",i&&t&&o),r.toggleCss("ag-row-inline-editing",t),r.toggleCss("ag-row-not-inline-editing",!t),r.toggleCss("ag-row-editing-invalid",i&&t&&e)})}},BS=({rowModel:e,pinnedRowModel:t,editModelSvc:o},i)=>{const s=new Set;return e.forEachNode(n=>i.has(n)&&s.add(n)),t==null||t.forEachPinnedRow("top",n=>i.has(n)&&s.add(n)),t==null||t.forEachPinnedRow("bottom",n=>i.has(n)&&s.add(n)),i.forEach(n=>{s.has(n)||o.removeEdits({rowNode:n})}),s},VS=({editModelSvc:e},t,o)=>{t.forEach(i=>{var s;return(s=e==null?void 0:e.getEditRow(i))==null?void 0:s.forEach((n,r)=>!o.has(r)&&e.removeEdits({rowNode:i,column:r}))})},NS=e=>()=>{const t=new Set(e.colModel.getCols()),o=e.editModelSvc.getEditMap(!0),i=new Set(o.keys());VS(e,BS(e,i),t)},_S=new Set(["undo","redo"]),Ma={paste:"ui",rangeSvc:"ui",fillHandle:"api",cellClear:"api"},WS=new Set(Object.keys(Ma)),zS=new Set(["paste","rangeSvc","renderer","cellClear","redo","undo"]),Di={cancel:!0,source:"api"},$S={cancel:!1,source:"api"},Ht={checkSiblings:!0},Co={force:!0,suppressFlash:!0},US=class extends x{constructor(){super(...arguments),this.beanName="editSvc",this.batch=!1}postConstruct(){const{beans:e}=this;this.model=e.editModelSvc,this.valueSvc=e.valueSvc,this.rangeSvc=e.rangeSvc,this.addManagedPropertyListener("editType",({currentValue:i})=>{this.stopEditing(void 0,Di),this.createStrategy(i)});const t=NS(e),o=()=>{const i=this.model.getCellValidationModel().getCellValidationMap().size>0,s=this.model.getRowValidationModel().getRowValidationMap().size>0;return i||s?this.stopEditing(void 0,Di):this.isEditing()&&(this.isBatchEditing()?Dt(e,this.model.getEditPositions()):this.stopEditing(void 0,$S)),!1};this.addManagedEventListeners({columnPinned:t,columnVisible:t,columnRowGroupChanged:t,rowGroupOpened:t,pinnedRowsChanged:t,displayedRowsChanged:t,sortChanged:o,filterChanged:o,cellFocused:this.onCellFocused.bind(this)})}isBatchEditing(){return this.batch}setBatchEditing(e){e?(this.batch=!0,this.stopEditing(void 0,Di)):(this.stopEditing(void 0,Di),this.batch=!1)}createStrategy(e){const{beans:t,gos:o,strategy:i}=this,s=e??o.get("editType")??"singleCell";if(i){if(i.beanName===s)return i;this.destroyStrategy()}return this.strategy=this.createOptionalManagedBean(t.registry.createDynamicBean(s,!0))}destroyStrategy(){this.strategy&&(this.strategy.destroy(),this.strategy=this.destroyBean(this.strategy))}shouldStartEditing(e,t,o,i="ui"){var s;return this.strategy??(this.strategy=this.createStrategy()),((s=this.strategy)==null?void 0:s.shouldStart(e,t,o,i))??null}shouldStopEditing(e,t,o="ui"){var i;return((i=this.strategy)==null?void 0:i.shouldStop(e,t,o))??null}shouldCancelEditing(e,t,o="ui"){var i;return((i=this.strategy)==null?void 0:i.shouldCancel(e,t,o))??null}validateEdit(){return ah(this.beans)}isEditing(e,t){return this.model.hasEdits(e,t??Ht)}isRowEditing(e,t){return(e&&this.model.hasRowEdits(e,t))??!1}startEditing(e,t){var a;const{startedEdit:o=!0,event:i=null,source:s="ui",ignoreEventKey:n=!1}=t;if(this.strategy??(this.strategy=this.createStrategy()),!this.isCellEditable(e,"api"))return;const r=K(this.beans,e);if(r&&!r.comp){r.onCompAttachedFuncs.push(()=>this.startEditing(e,t));return}const l=(a=this.shouldStartEditing)==null?void 0:a.call(this,e,i,o,s);if(l===!1&&s!=="api"){this.isEditing(e)&&this.stopEditing();return}!this.batch&&this.shouldStopEditing(e,void 0,s)&&this.stopEditing(void 0,{source:s}),l&&this.isBatchEditing()&&this.dispatchBatchEvent("batchEditingStarted",new Map),this.strategy.start(e,i,s,n)}stopEditing(e,t){var p,f,C;const{event:o,cancel:i,source:s="ui",suppressNavigateAfterEdit:n}=t||{},{beans:r,model:l}=this;if(WS.has(s))return this.isBatchEditing()?(this.bulkRefresh(e),!1):this.stopEditing(e,{...t,source:Ma[s]});if(!(this.isEditing(e)||this.isBatchEditing()&&l.hasEdits(e,Ht))||!this.strategy)return!1;const d=K(r,e);d&&(d.onEditorAttachedFuncs=[]);let c=l.getEditMap(!0),u=!1;const h=!i&&!!this.shouldStopEditing(e,o,s),g=i&&!!this.shouldCancelEditing(e,o,s);if(h||g){st(r,!0);const m=l.getEditMap();this.processEdits(m,i),(p=this.strategy)==null||p.stop(i,o),this.bulkRefresh(void 0,c),c=m,u||(u=h)}else if(o instanceof KeyboardEvent&&this.batch&&((f=this.strategy)!=null&&f.midBatchInputsAllowed(e))&&this.isEditing(e,{withOpenEditor:!0})){const m=o.key,w=m===y.ENTER,S=m===y.ESCAPE,v=m===y.TAB;(w||v||S)&&(w||v?st(r,!0):S&&this.revertSingleCellEdit(d),this.isBatchEditing()?(C=this.strategy)==null||C.cleanupEditors():Dt(r,l.getEditPositions(),{event:o}),o.preventDefault(),this.bulkRefresh(e,c,{suppressFlash:!0}),c=l.getEditMap())}else st(r,!0),c=l.getEditMap();return u&&e&&this.model.removeEdits(e),!n&&d&&this.navigateAfterEdit(o instanceof KeyboardEvent&&o.shiftKey,d.cellPosition),ps(r),this.model.hasEdits()||(this.model.getCellValidationModel().clearCellValidationMap(),this.model.getRowValidationModel().clearRowValidationMap()),this.bulkRefresh(),g&&this.beans.rowRenderer.refreshRows({rowNodes:Array.from(c.keys())}),this.isBatchEditing()&&(this.beans.rowRenderer.refreshRows({suppressFlash:!0,force:!0}),u&&h&&this.dispatchBatchEvent("batchEditingStopped",c)),u}navigateAfterEdit(e,t){var i;if(this.gos.get("enterNavigatesVerticallyAfterEdit")){const s=e?y.UP:y.DOWN;(i=this.beans.navigation)==null||i.navigateToNextCell(null,s,t,!1)}}processEdits(e,t=!1){var r,l,a;const o=Array.from(e.keys()),{beans:i}=this,s=this.model.getCellValidationModel().getCellValidationMap().size>0||this.model.getRowValidationModel().getRowValidationMap().size>0,n=[];for(const d of o){const c=e.get(d);for(const u of c.keys()){const h=c.get(u),g={rowNode:d,column:u},p=K(i,g),f=ze(h),C=(a=(l=(r=p==null?void 0:p.comp)==null?void 0:r.getCellEditor())==null?void 0:l.isCancelAfterEnd)==null?void 0:a.call(l);!t&&!C&&f&&!s&&(this.setNodeDataValue(d,u,h.pendingValue)||n.push(g)),p==null||p.refreshCell(Co)}}n.forEach(d=>{this.model.clearEditValue(d)})}setNodeDataValue(e,t,o,i){const{beans:s}=this,n=K(s,{rowNode:e,column:t});n&&(n.suppressRefreshCell=!0);const r=e.setDataValue(t,o,"commit");return n&&(n.suppressRefreshCell=!1),i&&(n==null||n.refreshCell(Co)),r}setEditMap(e,t){var o;this.strategy??(this.strategy=this.createStrategy()),(o=this.strategy)==null||o.setEditMap(e,t),this.bulkRefresh(),this.beans.rowRenderer.refreshCells(Co)}dispatchEditValuesChanged({rowNode:e,column:t},o={}){if(!e||!t||!o)return;const{pendingValue:i,sourceValue:s}=o,{rowIndex:n,rowPinned:r,data:l}=e;this.beans.eventSvc.dispatchEvent({type:"cellEditValuesChanged",node:e,rowIndex:n,rowPinned:r,column:t,source:"api",data:l,newValue:i,oldValue:s,value:i,colDef:t.getColDef()})}bulkRefresh(e={},t,o={}){var l;const{beans:i,gos:s}=this,{editModelSvc:n,rowModel:r}=i;oe(s)&&(e.rowNode&&e.column?this.refCell(e,this.model.getEdit(e),o):t&&((l=n==null?void 0:n.getEditMap(!1))==null||l.forEach((a,d)=>{for(const c of a.keys())this.refCell({rowNode:d,column:c},a.get(c),o)})))}refCell({rowNode:e,column:t},o,i={}){var u;const{beans:s,gos:n}=this,r=new Set([e]),l=new Set,a=e.pinnedSibling;a&&r.add(a);const d=e.sibling;d&&l.add(d);let c=e.parent;for(;c;)(u=c.sibling)!=null&&u.footer&&n.get("groupTotalRow")||!c.parent&&c.sibling&&n.get("grandTotalRow")?l.add(c.sibling):l.add(c),c=c.parent;r.forEach(h=>this.dispatchEditValuesChanged({rowNode:h,column:t},o)),r.forEach(h=>{var g;return(g=K(s,{rowNode:h,column:t}))==null?void 0:g.refreshCell(i)}),l.forEach(h=>{var g;return(g=K(s,{rowNode:h,column:t}))==null?void 0:g.refreshCell(i)})}stopAllEditing(e=!1,t="ui"){this.isEditing()&&this.stopEditing(void 0,{cancel:e,source:t})}isCellEditable(e,t="ui"){var i;const{rowNode:o}=e;if(o.group){if(this.gos.get("treeData")){if(!o.data&&!this.gos.get("enableGroupEdit"))return!1}else if(!this.gos.get("enableGroupEdit"))return!1}return this.strategy??(this.strategy=this.createStrategy()),((i=this.strategy)==null?void 0:i.isCellEditable(e,t))??!1}cellEditingInvalidCommitBlocks(){return this.gos.get("invalidEditValueMode")==="block"}checkNavWithValidation(e,t,o=!0){var i,s,n,r;if(this.hasValidationErrors(e)){const l=K(this.beans,e);return this.cellEditingInvalidCommitBlocks()?((i=t==null?void 0:t.preventDefault)==null||i.call(t),o&&(!(l!=null&&l.hasBrowserFocus())&&(l==null||l.focusCell()),(r=(n=(s=l==null?void 0:l.comp)==null?void 0:s.getCellEditor())==null?void 0:n.focusIn)==null||r.call(n)),"block-stop"):(l&&this.revertSingleCellEdit(l),"revert-continue")}return"continue"}revertSingleCellEdit(e,t=!1){var i,s,n,r,l;const o=K(this.beans,e);(i=o==null?void 0:o.comp)!=null&&i.getCellEditor()&&(Dt(this.beans,[e],{silent:!0}),this.model.clearEditValue(e),xt(this.beans,e,{silent:!0}),nt(this.beans),o==null||o.refreshCell(Co),(s=o.rowCtrl.rowEditStyleFeature)==null||s.applyRowStyles(),t&&(o==null||o.focusCell(),(l=(r=(n=o==null?void 0:o.comp)==null?void 0:n.getCellEditor())==null?void 0:r.focusIn)==null||l.call(r)))}hasValidationErrors(e){var i;nt(this.beans);const t=K(this.beans,e);t&&(t.refreshCell(Co),(i=t.rowCtrl.rowEditStyleFeature)==null||i.applyRowStyles());let o=!1;return e!=null&&e.rowNode?(o||(o=this.model.getRowValidationModel().hasRowValidation({rowNode:e.rowNode})),e.column&&(o||(o=this.model.getCellValidationModel().hasCellValidation({rowNode:e.rowNode,column:e.column})))):(o||(o=this.model.getCellValidationModel().getCellValidationMap().size>0),o||(o=this.model.getRowValidationModel().getRowValidationMap().size>0)),o}moveToNextCell(e,t,o,i="ui"){var l;let s;const n=this.isEditing(),r=n&&this.checkNavWithValidation(void 0,o)==="block-stop";return e instanceof Pt&&n&&(s=(l=this.strategy)==null?void 0:l.moveToNextEditingCell(e,t,o,i,r)),s===null||(s=s||!!this.beans.focusSvc.focusedHeader,s===!1&&!r&&this.stopEditing()),s}getCellDataValue({rowNode:e,column:t},o=!0){if(!e||!t)return;let i=this.model.getEdit({rowNode:e,column:t});const s=e.pinnedSibling;if(s){const r=this.model.getEdit({rowNode:s,column:t});r&&(i=r)}const n=o?(i==null?void 0:i.editorValue)??(i==null?void 0:i.pendingValue):i==null?void 0:i.pendingValue;return n===ge||!i?this.valueSvc.getValue(t,e,!0,"api"):n}getRowDataValue(e,t){return this.model.getEditRowDataValue(e,t)}addStopEditingWhenGridLosesFocus(e){oh(this,this.beans,e)}createPopupEditorWrapper(e){return new GS(e)}setDataValue(e,t,o){var r;if((!this.isEditing()||o==="commit")&&!zS.has(o))return;const{beans:i}=this;this.strategy??(this.strategy=this.createStrategy());const s=this.isBatchEditing()?"ui":"api";if(!o||_S.has(o))return Qo(i,e,!0,t),this.setNodeDataValue(e.rowNode,e.column,t,!0);const n=this.model.getEdit(e);if(n){if(n.pendingValue===t)return!1;if(n.sourceValue!==t)return Qo(i,e,!0,t),this.stopEditing(e,{source:s,suppressNavigateAfterEdit:!0}),!0;if(n.sourceValue===t)return(r=i.editModelSvc)==null||r.removeEdits(e),this.dispatchEditValuesChanged(e,{...n,pendingValue:t}),!0}return Qo(i,e,!0,t),this.stopEditing(e,{source:s,suppressNavigateAfterEdit:!0}),!0}handleColDefChanged(e){nh(this.beans,e)}destroy(){this.model.clear(),this.destroyStrategy(),super.destroy()}prepDetailsDuringBatch(e,t){if(!this.batch||!this.model.hasRowEdits(e.rowNode,Ht))return;const{rowNode:i,column:s}=e,{compDetails:n,valueToDisplay:r}=t;if(n){const{params:a}=n;return a.data=this.model.getEditRowDataValue(i,Ht),{compDetails:n}}const l=this.model.getEditRow(e.rowNode,Ht);if(r!==void 0&&(l!=null&&l.has(s)))return{valueToDisplay:this.valueSvc.getValue(s,i)}}cleanupEditors(){var e;(e=this.strategy)==null||e.cleanupEditors()}dispatchCellEvent(e,t,o,i){var s;(s=this.strategy)==null||s.dispatchCellEvent(e,t,o,i)}dispatchRowEvent(e,t){var o;(o=this.strategy)==null||o.dispatchRowEvent(e,t)}dispatchBatchEvent(e,t){this.eventSvc.dispatchEvent(this.createBatchEditEvent(e,t))}createBatchEditEvent(e,t){return N(this.gos,{type:e,...e==="batchEditingStopped"?{changes:this.toEventChangeList(t)}:{}})}toEventChangeList(e){return this.model.getEditPositions(e).map(t=>({rowIndex:t.rowNode.rowIndex,rowPinned:t.rowNode.rowPinned,columnId:t.column.getColId(),newValue:t.pendingValue,oldValue:t.sourceValue}))}applyBulkEdit({rowNode:e,column:t},o){var d,c;if(!o||o.length===0)return;const{beans:i,rangeSvc:s,valueSvc:n}=this;st(i,!0);const r=this.model.getEditMap(!0),l=(c=(d=r.get(e))==null?void 0:d.get(t))==null?void 0:c.pendingValue;this.batch||this.eventSvc.dispatchEvent({type:"bulkEditingStarted"}),o.forEach(u=>{if(s==null||s.forEachRowInRange(u,h=>{const g=it(i,h);if(g===void 0)return;const p=r.get(g)??new Map;for(const f of u.columns)if(f&&this.isCellEditable({rowNode:g,column:f},"api")){const C=n.getValue(f,g,!0,"api");let m=n.parseValue(f,g??null,l,C);Number.isNaN(m)&&(m=null),p.set(f,{editorValue:void 0,pendingValue:m,sourceValue:C,state:"changed"})}p.size>0&&r.set(g,p)}),this.setEditMap(r),this.batch){this.cleanupEditors(),ps(i),this.bulkRefresh();return}this.stopEditing(void 0,{source:"api"}),this.eventSvc.dispatchEvent({type:"bulkEditingStopped",changes:this.toEventChangeList(r)})}),this.bulkRefresh();const a=K(i,{rowNode:e,column:t});a&&a.focusCell(!0)}createCellStyleFeature(e,t){return new HS(e,t)}createRowStyleFeature(e,t){return new OS(e,t)}setEditingCells(e,t){const{beans:o}=this,{colModel:i,valueSvc:s}=o,n=new Map;e.forEach(({colId:r,column:l,colKey:a,rowIndex:d,rowPinned:c,newValue:u,state:h})=>{const g=r?i.getCol(r):a?i.getCol(a):l;if(!g)return;const p=it(o,{rowIndex:d,rowPinned:c});if(!p)return;const f=s.getValue(g,p,!0,"api");if(!ze({pendingValue:u,sourceValue:f})&&h!=="editing")return;let C=n.get(p);C||(C=new Map,n.set(p,C)),u===void 0&&(u=ge),C.set(g,{editorValue:void 0,pendingValue:u,sourceValue:f,state:h??"changed"})}),this.setEditMap(n,t)}onCellFocused(e){var n;const t=K(this.beans,e);if(!t||!this.isEditing(t,Ht))return;const o=this.model.getEdit(t);if(!o||!ze(o))return;const s=this.getLocaleTextFunc()("ariaPendingChange","Pending Change");(n=this.beans.ariaAnnounce)==null||n.announceValue(s,"pendingChange")}allowedFocusTargetOnValidation(e){return K(this.beans,e)}},ka=class extends x{postConstruct(){var e,t;this.model=this.beans.editModelSvc,this.editSvc=this.beans.editSvc,this.addManagedEventListeners({cellFocused:(e=this.onCellFocusChanged)==null?void 0:e.bind(this),cellFocusCleared:(t=this.onCellFocusChanged)==null?void 0:t.bind(this)})}clearEdits(e){this.model.clearEditValue(e)}onCellFocusChanged(e){let t;const o=e.previousParams,{editSvc:i,beans:s}=this,n=e.type==="cellFocused"?e.sourceEvent:null;o&&(t=K(s,o));const{gos:r,editModelSvc:l}=s,a=e.type==="cellFocusCleared";if(i.isEditing(void 0,{withOpenEditor:!0})){const{column:d,rowIndex:c,rowPinned:u}=e,h={column:d,rowNode:it(s,{rowIndex:c,rowPinned:u})},g=r.get("invalidEditValueMode")==="block";if(g)return;const p=!g,f=!!(l!=null&&l.getCellValidationModel().hasCellValidation(h)),C=p&&f;(o||a?i.stopEditing(void 0,{cancel:C,source:a&&p?"api":void 0,event:n}):!0)||(i.isBatchEditing()?i.cleanupEditors():i.stopEditing(void 0,{source:"api"}))}t==null||t.refreshCell({suppressFlash:!0,force:!0})}isCellEditable({rowNode:e,column:t},o="ui"){return t.isColumnFunc(e,t.getColDef().editable)}stop(e,t){const o=this.model.getEditPositions(),i={all:[],pass:[],fail:[]};if(o.forEach(n=>{var l;i.all.push(n);const r=this.model.getCellValidationModel().getCellValidation(n);if((((l=r==null?void 0:r.errorMessages)==null?void 0:l.length)??0)>0){i.fail.push(n);return}i.pass.push(n)}),e)return o.forEach(n=>{Xo(this.beans,n),this.model.stop(n)}),!0;const s=this.processValidationResults(i);return s.destroy.length>0&&s.destroy.forEach(n=>{Xo(this.beans,n,{event:t}),this.model.stop(n)}),s.keep.length>0&&s.keep.forEach(n=>{var l;const r=K(this.beans,n);(l=this.editSvc)!=null&&l.cellEditingInvalidCommitBlocks()||r&&this.editSvc.revertSingleCellEdit(r)}),!0}cleanupEditors({rowNode:e}={},t){st(this.beans,!1);const o=this.model.getEditPositions(),i=[];e?o.forEach(s=>{!e||s.rowNode===e||i.push(s)}):o.forEach(s=>{i.push(s)}),Dt(this.beans,i),ps(this.beans,t)}setFocusOutOnEditor(e){var t,o,i;(i=(o=(t=e.comp)==null?void 0:t.getCellEditor())==null?void 0:o.focusOut)==null||i.call(o)}setFocusInOnEditor(e){const t=e.comp,o=t==null?void 0:t.getCellEditor();if(o!=null&&o.focusIn)o.focusIn();else{const i=this.beans.gos.get("editType")==="fullRow";e.focusCell(i),e.onEditorAttachedFuncs.push(()=>{var s,n;return(n=(s=t==null?void 0:t.getCellEditor())==null?void 0:s.focusIn)==null?void 0:n.call(s)})}}setupEditors(e=this.model.getEditPositions(),t,o,i,s=!1){const n=i instanceof KeyboardEvent&&!s&&i.key||void 0;sh(this.beans,e,t,n,i,o)}dispatchCellEvent(e,t,o,i){const s=K(this.beans,e);s&&this.eventSvc.dispatchEvent({...s.createEvent(t??null,o),...i})}dispatchRowEvent(e,t){const o=hs(this.beans,e);o&&this.eventSvc.dispatchEvent(o.createRowEvent(t))}shouldStart({column:e},t,o,i="ui"){var a;if(t instanceof KeyboardEvent&&(t.key===y.TAB||t.key===y.ENTER||t.key===y.F2||t.key===y.BACKSPACE&&o))return!0;if((t==null?void 0:t.shiftKey)&&((a=this.beans.rangeSvc)==null?void 0:a.getCellRanges().length)!=0)return!1;const n=e==null?void 0:e.getColDef(),r=this.deriveClickCount(n),l=t==null?void 0:t.type;return l==="click"&&(t==null?void 0:t.detail)===1&&r===1||l==="dblclick"&&(t==null?void 0:t.detail)===2&&r===2?!0:i==="api"?o??!1:!1}shouldStop(e,t,o="ui"){const i=this.editSvc.isBatchEditing();return i&&o==="api"?!0:i&&o==="ui"?!1:o==="api"?!0:t instanceof KeyboardEvent&&!i?t.key===y.ENTER:null}shouldCancel(e,t,o="ui"){const i=this.editSvc.isBatchEditing();return!!(t instanceof KeyboardEvent&&!i&&t.key===y.ESCAPE||i&&o==="api"||o==="api")}setEditMap(e,t){var i;t!=null&&t.update||this.editSvc.stopEditing(void 0,{cancel:!0,source:"api"});const o=[];if(e.forEach((s,n)=>{s.forEach((r,l)=>{r.state==="editing"&&o.push({...r,rowNode:n,column:l})})}),t!=null&&t.update&&(e=new Map([...this.model.getEditMap(),...e])),(i=this.model)==null||i.setEditMap(e),o.length>0){const s=o.at(-1),n=s.pendingValue===ge?void 0:s.pendingValue;this.start(s,new KeyboardEvent("keydown",{key:n}),"api");const r=K(this.beans,s);r&&this.setFocusInOnEditor(r)}}deriveClickCount(e){const{gos:t}=this.beans;return t.get("suppressClickEdit")===!0?0:t.get("singleClickEdit")===!0||e!=null&&e.singleClickEdit?1:2}destroy(){this.cleanupEditors(),super.destroy()}},KS=class extends ka{constructor(){super(...arguments),this.beanName="fullRow",this.startedRows=[]}isCellEditable(e,t="ui"){const o=super.isCellEditable(e,t);return o===!0||t==="ui"?o:this.beans.colModel.getCols().some(s=>super.isCellEditable({rowNode:e.rowNode,column:s},t))}shouldStop(e,t,o="ui"){const{rowNode:i}=e||{};if(!hs(this.beans,{rowNode:this.rowNode}))return!0;const n=super.shouldStop({rowNode:this.rowNode},t,o);return n!==null?n:this.rowNode?i!==this.rowNode:!1}midBatchInputsAllowed({rowNode:e}){return e?this.model.hasEdits({rowNode:e}):!1}clearEdits(e){this.model.clearEditValue(e)}start(e,t,o="ui",i){const{rowNode:s}=e;this.rowNode!==s&&super.cleanupEditors(e),this.dispatchRowEvent({rowNode:s},"rowEditingStarted"),this.startedRows.push(s);const n=this.beans.visibleCols.allCols,r=[];n.forEach(l=>{if(!l.isCellEditable(s))return;const a={rowNode:s,column:l};r.push(a),this.model.hasEdits(a)||this.model.start(a)}),this.rowNode=s,this.setupEditors(r,e,!0,t,i)}processValidationResults(e){return e.fail.length>0&&this.editSvc.cellEditingInvalidCommitBlocks()?{destroy:[],keep:e.all}:{destroy:e.all,keep:[]}}stop(e,t){var s;const{rowNode:o}=this;if(o&&!this.model.hasRowEdits(o))return!1;const i=[];return e||this.model.getEditMap().forEach((n,r)=>{if(!(!n||n.size===0)){for(const l of n.values())if(ze(l)){i.push(r);break}}}),nt(this.beans),!e&&((s=this.editSvc)==null?void 0:s.checkNavWithValidation({rowNode:o}))==="block-stop"?!1:(super.stop(e,t),i.forEach(n=>this.dispatchRowEvent({rowNode:n},"rowValueChanged")),this.cleanupEditors({rowNode:o},!0),this.rowNode=void 0,!0)}onCellFocusChanged(e){const{rowIndex:t}=e,o=e.previousParams;if((o==null?void 0:o.rowIndex)===t||e.sourceEvent instanceof KeyboardEvent)return;const i=K(this.beans,o);this.gos.get("invalidEditValueMode")==="block"&&i&&(this.model.getCellValidationModel().getCellValidation(i)||this.model.getRowValidationModel().getRowValidation(i))||super.onCellFocusChanged(e)}cleanupEditors(e={},t){super.cleanupEditors(e,t),this.startedRows.forEach(o=>this.dispatchRowEvent({rowNode:o},"rowEditingStopped")),this.startedRows.length=0}moveToNextEditingCell(e,t,o,i="ui",s=!1){var h,g,p;const n=e.cellPosition;let r;this.model.suspend(!0);try{r=(h=this.beans.navigation)==null?void 0:h.findNextCellToFocusOn(n,{backwards:t,startEditing:!0,skipToNextEditableCell:!1})}finally{this.model.suspend(!1)}if(r===!1)return null;if(r==null)return!1;const l=r.cellPosition,a=e.isCellEditable(),d=r.isCellEditable(),c=l&&n.rowIndex===l.rowIndex&&n.rowPinned===l.rowPinned;a&&this.setFocusOutOnEditor(e),this.restoreEditors();const u=this.gos.get("suppressStartEditOnTab");return d&&!s?u?r.focusCell(!0,o):((g=r.comp)!=null&&g.getCellEditor()||xt(this.beans,r,{event:o,cellStartedEdit:!0}),this.setFocusInOnEditor(r),r.focusCell(!1,o)):(d&&s&&this.setFocusInOnEditor(r),r.focusCell(!0,o)),!c&&!s&&(this.cleanupEditors(r,!0),u?r.focusCell(!0,o):this.editSvc.startEditing(r,{startedEdit:!0,event:o,source:i,ignoreEventKey:!0})),(p=e.rowCtrl)==null||p.refreshRow({suppressFlash:!0,force:!0}),!0}restoreEditors(){this.model.getEditMap().forEach((e,t)=>e.forEach(({state:o},i)=>{var n;if(o!=="editing")return;const s=K(this.beans,{rowNode:t,column:i});s&&!((n=s.comp)!=null&&n.getCellEditor())&&xt(this.beans,s,{silent:!0})}))}destroy(){super.destroy(),this.rowNode=void 0,this.startedRows.length=0}},jS=class extends ka{constructor(){super(...arguments),this.beanName="singleCell"}shouldStop(e,t,o="ui"){const i=super.shouldStop(e,t,o);if(i!==null)return i;const{rowNode:s,column:n}=e||{};return(!this.rowNode||!this.column)&&s&&n?null:this.rowNode!==s||this.column!==n}midBatchInputsAllowed(e){return this.model.hasEdits(e)}start(e,t,o="ui",i){(this.rowNode!==e.rowNode||this.column!==e.column)&&super.cleanupEditors(),this.rowNode=e.rowNode,this.column=e.column,this.model.start(e),this.setupEditors([e],e,!0,t,i)}dispatchRowEvent(e,t){}processValidationResults(e){return e.fail.length>0&&this.editSvc.cellEditingInvalidCommitBlocks()?{destroy:[],keep:e.all}:{destroy:e.all,keep:[]}}stop(e,t){return super.stop(e,t),this.rowNode=void 0,this.column=void 0,!0}onCellFocusChanged(e){const{colModel:t,editSvc:o}=this.beans,{rowIndex:i,column:s,rowPinned:n}=e,r=it(this.beans,{rowIndex:i,rowPinned:n}),l=gs(s),a=t.getCol(l),d=e.previousParams;if(d){const c=gs(d.column);if((d==null?void 0:d.rowIndex)===i&&c===l&&(d==null?void 0:d.rowPinned)===n)return}o!=null&&o.isEditing({rowNode:r,column:a},{withOpenEditor:!0})&&e.type==="cellFocused"||super.onCellFocusChanged(e)}moveToNextEditingCell(e,t,o,i="ui",s=!1){var g,p,f,C,m;const n=e.cellPosition;let r;const l=this.beans.gos.get("editType")==="fullRow";l&&this.model.suspend(!0),s||(e.eGui.focus(),(p=this.editSvc)==null||p.stopEditing(e,{source:(g=this.editSvc)!=null&&g.isBatchEditing()?"ui":"api",event:o}));try{r=(f=this.beans.navigation)==null?void 0:f.findNextCellToFocusOn(n,{backwards:t,startEditing:!0})}finally{l&&this.model.suspend(!1)}if(r===!1)return null;if(r==null)return!1;const a=r.cellPosition,d=e.isCellEditable(),c=r.isCellEditable(),u=a&&n.rowIndex===a.rowIndex&&n.rowPinned===a.rowPinned;d&&!s&&this.setFocusOutOnEditor(e);const h=this.gos.get("suppressStartEditOnTab");return!u&&!s&&(super.cleanupEditors(r,!0),h?r.focusCell(!0,o):this.editSvc.startEditing(r,{startedEdit:!0,event:o,source:i,ignoreEventKey:!0})),c&&!s?(r.focusCell(!1,o),h?r.focusCell(!0,o):(C=r.comp)!=null&&C.getCellEditor()||(xt(this.beans,r,{event:o,cellStartedEdit:!0}),this.setFocusInOnEditor(r))):(c&&s&&this.setFocusInOnEditor(r),r.focusCell(!0,o)),(m=e.rowCtrl)==null||m.refreshRow({suppressFlash:!0,force:!0}),!0}destroy(){super.destroy(),this.rowNode=void 0,this.column=void 0}},dt={moduleName:"EditCore",version:H,beans:[qu,US],apiFunctions:{getEditingCells:TS,getCellEditorInstances:ih,startEditingCell:MS,stopEditing:IS,isEditing:AS,validateEdit:kS},dynamicBeans:{singleCell:jS,fullRow:KS},dependsOn:[Ea,xa],css:[aS]},qS={moduleName:"TextEditor",version:H,userComponents:{agCellEditor:Da,agTextCellEditor:Da},dependsOn:[dt]},YS={moduleName:"NumberEditor",version:H,userComponents:{agNumberCellEditor:{classImp:bS}},dependsOn:[dt]},ZS={moduleName:"DateEditor",version:H,userComponents:{agDateCellEditor:gS,agDateStringCellEditor:CS},dependsOn:[dt]},QS={moduleName:"CheckboxEditor",version:H,userComponents:{agCheckboxCellEditor:cS},dependsOn:[dt]},XS={moduleName:"SelectEditor",version:H,userComponents:{agSelectCellEditor:RS},dependsOn:[dt]},JS={moduleName:"LargeTextEditor",version:H,userComponents:{agLargeTextCellEditor:wS},dependsOn:[dt]},eb={moduleName:"CustomEditor",version:H,dependsOn:[dt]};function tb(e){var t;(t=e.expansionSvc)==null||t.expandAll(!0)}function ob(e){var t;(t=e.expansionSvc)==null||t.expandAll(!1)}function ib(e){const t=Te(e),o=Gv(e);t?t.onRowHeightChanged():o&&o.onRowHeightChanged()}var sb={moduleName:"CsrmSsrmSharedApi",version:H,apiFunctions:{expandAll:tb,collapseAll:ob,onRowHeightChanged:ib}},nb=class extends x{constructor(){super(...arguments),this.beanName="alignedGridsSvc",this.consuming=!1}getAlignedGridApis(){let e=this.gos.get("alignedGrids")??[];const t=typeof e=="function";return typeof e=="function"&&(e=e()),e.map(i=>{var n;if(!i){z(18),t||z(20);return}if(this.isGridApi(i))return i;const s=i;return"current"in s?(n=s.current)==null?void 0:n.api:(s.api||z(19),s.api)}).filter(i=>!!i&&!i.isDestroyed())}isGridApi(e){return!!e&&!!e.dispatchEvent}postConstruct(){const e=this.fireColumnEvent.bind(this);this.addManagedEventListeners({columnMoved:e,columnVisible:e,columnPinned:e,columnGroupOpened:e,columnResized:e,bodyScroll:this.fireScrollEvent.bind(this),alignedGridColumn:({event:t})=>this.onColumnEvent(t),alignedGridScroll:({event:t})=>this.onScrollEvent(t)})}fireEvent(e){this.consuming||this.getAlignedGridApis().forEach(t=>{t.isDestroyed()||t.dispatchEvent(e)})}onEvent(e){this.consuming=!0,e(),this.consuming=!1}fireColumnEvent(e){this.fireEvent({type:"alignedGridColumn",event:e})}fireScrollEvent(e){e.direction==="horizontal"&&this.fireEvent({type:"alignedGridScroll",event:e})}onScrollEvent(e){this.onEvent(()=>{this.beans.ctrlsSvc.getScrollFeature().setHorizontalScrollPosition(e.left,!0)})}extractDataFromEvent(e,t){const o=[];return e.columns?e.columns.forEach(i=>{o.push(t(i))}):e.column&&o.push(t(e.column)),o}getMasterColumns(e){return this.extractDataFromEvent(e,t=>t)}getColumnIds(e){return this.extractDataFromEvent(e,t=>t.getColId())}onColumnEvent(e){this.onEvent(()=>{switch(e.type){case"columnMoved":case"columnVisible":case"columnPinned":case"columnResized":{this.processColumnEvent(e);break}case"columnGroupOpened":{this.processGroupOpenedEvent(e);break}case"columnPivotChanged":k(21);break}})}processGroupOpenedEvent(e){const{colGroupSvc:t}=this.beans;t&&e.columnGroups.forEach(o=>{let i=null;o&&(i=t.getProvidedColGroup(o.getGroupId())),!(o&&!i)&&t.setColumnGroupOpened(i,o.isExpanded(),"alignedGridChanged")})}processColumnEvent(e){var c;const t=e.column;let o=null;const i=this.beans,{colResize:s,ctrlsSvc:n,colModel:r}=i;if(t&&(o=r.getColDefCol(t.getColId())),t&&!o)return;const l=this.getMasterColumns(e);switch(e.type){case"columnMoved":{const h=e.api.getColumnState().map(g=>({colId:g.colId}));we(i,{state:h,applyOrder:!0},"alignedGridChanged")}break;case"columnVisible":{const h=e.api.getColumnState().map(g=>({colId:g.colId,hide:g.hide}));we(i,{state:h},"alignedGridChanged")}break;case"columnPinned":{const h=e.api.getColumnState().map(g=>({colId:g.colId,pinned:g.pinned}));we(i,{state:h},"alignedGridChanged")}break;case"columnResized":{const u=e,h={};l.forEach(g=>{h[g.getId()]={key:g.getColId(),newWidth:g.getActualWidth()}}),(c=u.flexColumns)==null||c.forEach(g=>{h[g.getId()]&&delete h[g.getId()]}),s==null||s.setColumnWidths(Object.values(h),!1,u.finished,"alignedGridChanged");break}}const d=n.getGridBodyCtrl().isVerticalScrollShowing();this.getAlignedGridApis().forEach(u=>{u.setGridOption("alwaysShowVerticalScroll",d)})}},rb={moduleName:"AlignedGrids",version:H,beans:[nb],dependsOn:[_l]},lb="↑",ab="↓",db={tag:"span",children:[{tag:"span",ref:"eDelta",cls:"ag-value-change-delta"},{tag:"span",ref:"eValue",cls:"ag-value-change-value"}]},cb=class extends U{constructor(){super(db),this.eValue=A,this.eDelta=A,this.refreshCount=0}init(e){this.refresh(e,!0)}showDelta(e,t){const o=Math.abs(t),i=e.formatValue(o),s=M(i)?i:o,n=t>=0,r=this.eDelta;n?r.textContent=lb+s:r.textContent=ab+s,r.classList.toggle("ag-value-change-delta-up",n),r.classList.toggle("ag-value-change-delta-down",!n)}setTimerToRemoveDelta(){this.refreshCount++;const e=this.refreshCount;this.beans.frameworkOverrides.wrapIncoming(()=>{window.setTimeout(()=>{e===this.refreshCount&&this.hideDeltaValue()},2e3)})}hideDeltaValue(){this.eValue.classList.remove("ag-value-change-value-highlight"),ue(this.eDelta)}refresh(e,t=!1){var d;const{value:o,valueFormatted:i}=e,{eValue:s,lastValue:n,beans:r}=this;if(o===n||(M(i)?s.textContent=i:M(o)?s.textContent=o:ue(s),(d=r.filterManager)!=null&&d.isSuppressFlashingCellsBecauseFiltering()))return!1;const l=o&&typeof o=="object"&&"toNumber"in o?o.toNumber():o,a=n&&typeof n=="object"&&"toNumber"in n?n.toNumber():n;if(l===a)return!1;if(typeof l=="number"&&typeof a=="number"){const c=l-a;this.showDelta(e,c)}return n&&s.classList.add("ag-value-change-value-highlight"),t||this.setTimerToRemoveDelta(),this.lastValue=o,!0}},ub=".ag-value-slide-out{opacity:1}:where(.ag-ltr) .ag-value-slide-out{margin-right:5px;transition:opacity 3s,margin-right 3s}:where(.ag-rtl) .ag-value-slide-out{margin-left:5px;transition:opacity 3s,margin-left 3s}:where(.ag-ltr,.ag-rtl) .ag-value-slide-out{transition-timing-function:linear}.ag-value-slide-out-end{opacity:0}:where(.ag-ltr) .ag-value-slide-out-end{margin-right:10px}:where(.ag-rtl) .ag-value-slide-out-end{margin-left:10px}",hb={tag:"span",children:[{tag:"span",ref:"eCurrent",cls:"ag-value-slide-current"}]},gb=class extends U{constructor(){super(hb),this.eCurrent=A,this.refreshCount=0,this.registerCSS(ub)}init(e){this.refresh(e,!0)}addSlideAnimation(){this.refreshCount++;const e=this.refreshCount;this.ePrevious&&this.getGui().removeChild(this.ePrevious);const{beans:t,eCurrent:o}=this,i=Q({tag:"span",cls:"ag-value-slide-previous ag-value-slide-out"});this.ePrevious=i,i.textContent=o.textContent,this.getGui().insertBefore(i,o),t.frameworkOverrides.wrapIncoming(()=>{window.setTimeout(()=>{e===this.refreshCount&&this.ePrevious.classList.add("ag-value-slide-out-end")},50),window.setTimeout(()=>{e===this.refreshCount&&(this.getGui().removeChild(this.ePrevious),this.ePrevious=null)},3e3)})}refresh(e,t=!1){var s;let o=e.value;if($(o)&&(o=""),o===this.lastValue||(s=this.beans.filterManager)!=null&&s.isSuppressFlashingCellsBecauseFiltering())return!1;t||this.addSlideAnimation(),this.lastValue=o;const i=this.eCurrent;return M(e.valueFormatted)?i.textContent=e.valueFormatted:M(e.value)?i.textContent=o:ue(i),!0}},pb=class extends x{constructor(){super(...arguments),this.beanName="cellFlashSvc",this.nextAnimationTime=null,this.nextAnimationCycle=null,this.animations={highlight:new Map,"data-changed":new Map}}animateCell(e,t,o=this.beans.gos.get("cellFlashDuration"),i=this.beans.gos.get("cellFadeDuration")){const s=this.animations[t];s.delete(e);const n=Date.now(),r=n+o,l=n+o+i,a={phase:"flash",flashEndTime:r,fadeEndTime:l};s.set(e,a);const d=`ag-cell-${t}`,c=`${d}-animation`,{comp:u,eGui:{style:h}}=e;u.toggleCss(d,!0),u.toggleCss(c,!1),h.removeProperty("transition"),h.removeProperty("transition-delay"),this.nextAnimationTime&&r+15<this.nextAnimationTime&&(clearTimeout(this.nextAnimationCycle),this.nextAnimationCycle=null,this.nextAnimationTime=null),this.nextAnimationCycle||(this.beans.frameworkOverrides.wrapIncoming(()=>{this.nextAnimationCycle=setTimeout(this.advanceAnimations.bind(this),o)}),this.nextAnimationTime=r)}advanceAnimations(){const e=Date.now();let t=null;for(const o of Object.keys(this.animations)){const i=this.animations[o],s=`ag-cell-${o}`,n=`${s}-animation`;for(const[r,l]of i){if(!r.isAlive()||!r.comp){i.delete(r);continue}const{phase:a,flashEndTime:d,fadeEndTime:c}=l,u=a==="flash"?d:c;if(!(e+15>=u)){t=Math.min(u,t??1/0);continue}const{comp:g,eGui:{style:p}}=r;switch(a){case"flash":g.toggleCss(s,!1),g.toggleCss(n,!0),p.transition=`background-color ${c-d}ms`,p.transitionDelay=`${d-e}ms`,t=Math.min(c,t??1/0),l.phase="fade";break;case"fade":g.toggleCss(s,!1),g.toggleCss(n,!1),p.removeProperty("transition"),p.removeProperty("transition-delay"),i.delete(r);break}}}t==null?(this.nextAnimationTime=null,this.nextAnimationCycle=null):t&&(this.nextAnimationCycle=setTimeout(this.advanceAnimations.bind(this),t-e),this.nextAnimationTime=t)}onFlashCells(e,t){if(!e.comp)return;const o=Yu(e.cellPosition);t.cells[o]&&this.animateCell(e,"highlight")}flashCell(e,t){this.animateCell(e,"data-changed",t==null?void 0:t.flashDuration,t==null?void 0:t.fadeDuration)}destroy(){for(const e of Object.keys(this.animations))this.animations[e].clear()}};function fb(e,t={}){const{cellFlashSvc:o}=e;o&&e.frameworkOverrides.wrapIncoming(()=>{e.rowRenderer.getCellCtrls(t.rowNodes,t.columns).forEach(i=>o.flashCell(i,t))})}var Cb={moduleName:"HighlightChanges",version:H,beans:[pb],userComponents:{agAnimateShowChangeCellRenderer:cb,agAnimateSlideCellRenderer:gb},apiFunctions:{flashCells:fb}};function mb(e){var t;return((t=e.stateSvc)==null?void 0:t.getState())??{}}function wb(e,t,o){var i;return(i=e.stateSvc)==null?void 0:i.setState(t,o)}function La(e){switch(e={...e},e.version||(e.version="32.1.0"),e.version){case"32.1.0":e=vb(e)}return e.version=H,e}function vb(e){return e.cellSelection=Sb(e,"rangeSelection"),e}function Sb(e,t){if(e&&typeof e=="object")return e[t]}var bb=class extends x{constructor(){super(...arguments),this.beanName="stateSvc",this.updateRowGroupExpansionStateTimer=0,this.suppressEvents=!0,this.queuedUpdateSources=new Set,this.dispatchStateUpdateEventDebounced=he(this,()=>this.dispatchQueuedStateUpdateEvents(),0),this.onRowGroupOpenedDebounced=he(this,()=>{this.updateCachedState("rowGroupExpansion",this.getRowGroupExpansionState())},0),this.onRowSelectedDebounced=he(this,()=>{this.staleStateKeys.delete("rowSelection"),this.updateCachedState("rowSelection",this.getRowSelectionState())},0),this.staleStateKeys=new Set}postConstruct(){this.isClientSideRowModel=oe(this.gos);const e=La(this.gos.get("initialState")??{}),t=e.partialColumnState;delete e.partialColumnState,this.cachedState=e;const o=this.suppressEventsAndDispatchInitEvent.bind(this);this.beans.ctrlsSvc.whenReady(this,()=>o(()=>this.setupStateOnGridReady(e)));const[i,s,n]=this.addManagedEventListeners({newColumnsLoaded:({source:r})=>{r==="gridInitializing"&&(i(),o(()=>this.setupStateOnColumnsInitialised(e,!!t)))},rowCountReady:()=>{s==null||s(),o(()=>this.setupStateOnRowCountReady(e))},firstDataRendered:()=>{n==null||n(),o(()=>this.setupStateOnFirstDataRendered(e))}})}destroy(){super.destroy(),clearTimeout(this.updateRowGroupExpansionStateTimer),this.queuedUpdateSources.clear()}getState(){return this.staleStateKeys.size&&this.refreshStaleState(),this.cachedState}setState(e,t){const o=La(e);delete o.partialColumnState,this.cachedState=o,this.startSuppressEvents();const i="api",s=t?new Set(t):void 0;this.setGridReadyState(o,i,s),this.setColumnsInitialisedState(o,i,!1,s),this.setRowCountState(o,i,s),setTimeout(()=>{this.isAlive()&&this.setFirstDataRenderedState(o,i,s),this.stopSuppressEvents(i)})}setGridReadyState(e,t,o){var i,s;t==="api"&&!(o!=null&&o.has("sideBar"))&&((s=(i=this.beans.sideBar)==null?void 0:i.comp)==null||s.setState(e.sideBar)),this.updateCachedState("sideBar",this.getSideBarState())}setupStateOnGridReady(e){this.setGridReadyState(e,"gridInitializing");const t=()=>this.updateCachedState("sideBar",this.getSideBarState());this.addManagedEventListeners({toolPanelVisibleChanged:t,sideBarUpdated:t})}updateColumnAndGroupState(){this.updateColumnState(["aggregation","columnOrder","columnPinning","columnSizing","columnVisibility","pivot","rowGroup","sort"]),this.updateCachedState("columnGroup",this.getColumnGroupState())}setColumnsInitialisedState(e,t,o,i){this.setColumnState(e,t,o,i),this.setColumnGroupState(e,t,i),this.updateColumnAndGroupState()}setupStateOnColumnsInitialised(e,t){this.setColumnsInitialisedState(e,"gridInitializing",t);const o=i=>()=>this.updateColumnState([i]);this.addManagedEventListeners({columnValueChanged:o("aggregation"),columnMoved:o("columnOrder"),columnPinned:o("columnPinning"),columnResized:o("columnSizing"),columnVisible:o("columnVisibility"),columnPivotChanged:o("pivot"),columnPivotModeChanged:o("pivot"),columnRowGroupChanged:o("rowGroup"),sortChanged:o("sort"),newColumnsLoaded:this.updateColumnAndGroupState.bind(this),columnGroupOpened:()=>this.updateCachedState("columnGroup",this.getColumnGroupState())})}setRowCountState(e,t,o){const{filter:i,rowGroupExpansion:s,rowSelection:n,pagination:r}=e,l=(d,c)=>!(o!=null&&o.has(d))&&(c||t==="api");l("filter",i)&&this.setFilterState(i),l("rowGroupExpansion",s)&&this.setRowGroupExpansionState(s,t),l("rowSelection",n)&&this.setRowSelectionState(n,t),l("pagination",r)&&this.setPaginationState(r,t);const a=this.updateCachedState.bind(this);a("filter",this.getFilterState()),a("rowGroupExpansion",this.getRowGroupExpansionState()),a("rowSelection",this.getRowSelectionState()),a("pagination",this.getPaginationState())}setupStateOnRowCountReady(e){this.setRowCountState(e,"gridInitializing");const t=this.updateCachedState.bind(this),o=()=>{this.updateRowGroupExpansionStateTimer=0,t("rowGroupExpansion",this.getRowGroupExpansionState())},i=()=>t("filter",this.getFilterState()),{gos:s,colFilter:n}=this.beans;this.addManagedEventListeners({filterChanged:i,rowGroupOpened:()=>this.onRowGroupOpenedDebounced(),expandOrCollapseAll:o,columnRowGroupChanged:o,rowDataUpdated:()=>{(s.get("groupDefaultExpanded")!==0||s.get("isGroupOpenByDefault"))&&(this.updateRowGroupExpansionStateTimer||(this.updateRowGroupExpansionStateTimer=setTimeout(o)))},selectionChanged:()=>{this.staleStateKeys.add("rowSelection"),this.onRowSelectedDebounced()},paginationChanged:r=>{(r.newPage||r.newPageSize)&&t("pagination",this.getPaginationState())}}),n&&this.addManagedListeners(n,{filterStateChanged:i})}setFirstDataRenderedState(e,t,o){const{scroll:i,cellSelection:s,focusedCell:n,columnOrder:r,rowPinning:l}=e,a=(u,h)=>!(o!=null&&o.has(u))&&(h||t==="api");a("focusedCell",n)&&this.setFocusedCellState(n),a("cellSelection",s)&&this.setCellSelectionState(s),a("scroll",i)&&this.setScrollState(i),a("rowPinning",l)&&this.setRowPinningState(l),this.setColumnPivotState(!!(r!=null&&r.orderedColIds),t);const d=this.updateCachedState.bind(this);d("sideBar",this.getSideBarState()),d("focusedCell",this.getFocusedCellState());const c=this.getRangeSelectionState();d("rangeSelection",c),d("cellSelection",c),d("scroll",this.getScrollState())}setupStateOnFirstDataRendered(e){this.setFirstDataRenderedState(e,"gridInitializing");const t=this.updateCachedState.bind(this);this.addManagedEventListeners({cellFocused:()=>t("focusedCell",this.getFocusedCellState()),cellSelectionChanged:o=>{if(o.finished){const i=this.getRangeSelectionState();t("rangeSelection",i),t("cellSelection",i)}},bodyScrollEnd:()=>t("scroll",this.getScrollState()),pinnedRowsChanged:()=>t("rowPinning",this.getRowPinningState())})}getColumnState(){const e=this.beans;return Ov(Uo(e),e.colModel.isPivotMode())}setColumnState(e,t,o,i){const{sort:s,rowGroup:n,aggregation:r,pivot:l,columnPinning:a,columnVisibility:d,columnSizing:c,columnOrder:u}=e,h=(T,F)=>!(i!=null&&i.has(T))&&(F||t==="api"),g={},p=T=>{let F=g[T];return F||(F={colId:T},g[T]=F,F)},f={},C=h("sort",s);C&&(s==null||s.sortModel.forEach(({colId:T,sort:F},G)=>{const _=p(T);_.sort=F,_.sortIndex=G})),(C||!o)&&(f.sort=null,f.sortIndex=null);const m=h("rowGroup",n);m&&(n==null||n.groupColIds.forEach((T,F)=>{const G=p(T);G.rowGroup=!0,G.rowGroupIndex=F})),(m||!o)&&(f.rowGroup=null,f.rowGroupIndex=null);const w=h("aggregation",r);w&&(r==null||r.aggregationModel.forEach(({colId:T,aggFunc:F})=>{p(T).aggFunc=F})),(w||!o)&&(f.aggFunc=null);const S=h("pivot",l);S&&(l==null||l.pivotColIds.forEach((T,F)=>{const G=p(T);G.pivot=!0,G.pivotIndex=F}),this.gos.updateGridOptions({options:{pivotMode:!!(l!=null&&l.pivotMode)},source:t})),(S||!o)&&(f.pivot=null,f.pivotIndex=null);const v=h("columnPinning",a);v&&(a==null||a.leftColIds.forEach(T=>{p(T).pinned="left"}),a==null||a.rightColIds.forEach(T=>{p(T).pinned="right"})),(v||!o)&&(f.pinned=null);const b=h("columnVisibility",d);b&&(d==null||d.hiddenColIds.forEach(T=>{p(T).hide=!0})),(b||!o)&&(f.hide=null);const D=h("columnSizing",c);D&&(c==null||c.columnSizingModel.forEach(({colId:T,flex:F,width:G})=>{const _=p(T);_.flex=F??null,_.width=G})),(D||!o)&&(f.flex=null);const I=u==null?void 0:u.orderedColIds,B=!!(I!=null&&I.length)&&!(i!=null&&i.has("columnOrder")),P=B?I.map(T=>p(T)):Object.values(g);P.length&&(this.columnStates=P,we(this.beans,{state:P,applyOrder:B,defaultState:f},t))}setColumnPivotState(e,t){const o=this.columnStates;this.columnStates=void 0;const i=this.columnGroupStates;this.columnGroupStates=void 0;const s=this.beans,{pivotResultCols:n,colGroupSvc:r}=s;if(n!=null&&n.isPivotResultColsPresent()){if(o){const l=[];for(const a of o)n.getPivotResultCol(a.colId)&&l.push(a);we(s,{state:l,applyOrder:e},t)}i&&(r==null||r.setColumnGroupState(i,t))}}getColumnGroupState(){const e=this.beans.colGroupSvc;if(!e)return;const t=e.getColumnGroupState();return Bv(t)}setColumnGroupState(e,t,o){var l;const i=this.beans.colGroupSvc;if(!i||o!=null&&o.has("columnGroup")||t!=="api"&&!Object.prototype.hasOwnProperty.call(e,"columnGroup"))return;const s=new Set((l=e.columnGroup)==null?void 0:l.openColumnGroupIds),r=i.getColumnGroupState().map(({groupId:a})=>{const d=s.has(a);return d&&s.delete(a),{groupId:a,open:d}});s.forEach(a=>{r.push({groupId:a,open:!0})}),r.length&&(this.columnGroupStates=r),i.setColumnGroupState(r,t)}getFilterState(){const e=this.beans.filterManager;let t=e==null?void 0:e.getFilterModel();t&&Object.keys(t).length===0&&(t=void 0);const o=e==null?void 0:e.getFilterState(),i=(e==null?void 0:e.getAdvFilterModel())??void 0;return t||i||o?{filterModel:t,columnFilterState:o,advancedFilterModel:i}:void 0}setFilterState(e){const t=this.beans.filterManager,{filterModel:o,columnFilterState:i,advancedFilterModel:s}=e??{filterModel:null,columnFilterState:null,advancedFilterModel:null};(o!==void 0||i!==void 0)&&(t==null||t.setFilterState(o??null,i??null,"columnFilter")),s!==void 0&&(t==null||t.setAdvFilterModel(s??null,"advancedFilter"))}getRangeSelectionState(){var t;const e=(t=this.beans.rangeSvc)==null?void 0:t.getCellRanges().map(o=>{const{id:i,type:s,startRow:n,endRow:r,columns:l,startColumn:a}=o;return{id:i,type:s,startRow:n,endRow:r,colIds:l.map(d=>d.getColId()),startColId:a.getColId()}});return e!=null&&e.length?{cellRanges:e}:void 0}setCellSelectionState(e){const{gos:t,rangeSvc:o,colModel:i,visibleCols:s}=this.beans;if(!Je(t)||!o)return;const n=[];e==null||e.cellRanges.forEach(r=>{const l=[];if(r.colIds.forEach(d=>{const c=i.getCol(d);c&&l.push(c)}),!l.length)return;let a=i.getCol(r.startColId);if(!a){const d=s.allCols,c=new Set(l);a=d.find(u=>c.has(u))}n.push({...r,columns:l,startColumn:a})}),o.setCellRanges(n)}getScrollState(){if(!this.isClientSideRowModel)return;const e=this.beans.ctrlsSvc.getScrollFeature(),{left:t}=(e==null?void 0:e.getHScrollPosition())??{left:0},{top:o}=(e==null?void 0:e.getVScrollPosition())??{top:0};return o||t?{top:o,left:t}:void 0}setScrollState(e){if(!this.isClientSideRowModel)return;const{top:t,left:o}=e??{top:0,left:0},{frameworkOverrides:i,rowRenderer:s,animationFrameSvc:n,ctrlsSvc:r}=this.beans;i.wrapIncoming(()=>{var l;r.get("center").setCenterViewportScrollLeft(o),(l=r.getScrollFeature())==null||l.setVerticalScrollPosition(t),s.redraw({afterScroll:!0}),n==null||n.flushAllFrames()})}getSideBarState(){var e,t;return(t=(e=this.beans.sideBar)==null?void 0:e.comp)==null?void 0:t.getState()}getFocusedCellState(){if(!this.isClientSideRowModel)return;const e=this.beans.focusSvc.getFocusedCell();if(e){const{column:t,rowIndex:o,rowPinned:i}=e;return{colId:t.getColId(),rowIndex:o,rowPinned:i}}}setFocusedCellState(e){if(!this.isClientSideRowModel)return;const{focusSvc:t,colModel:o}=this.beans;if(!e){t.clearFocusedCell();return}const{colId:i,rowIndex:s,rowPinned:n}=e;t.setFocusedCell({column:o.getCol(i),rowIndex:s,rowPinned:n,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0})}getPaginationState(){const{pagination:e,gos:t}=this.beans;if(!e)return;const o=e.getCurrentPage(),i=t.get("paginationAutoPageSize")?void 0:e.getPageSize();if(!(!o&&!i))return{page:o,pageSize:i}}setPaginationState(e,t){const{pagination:o,gos:i}=this.beans;if(!o)return;const{pageSize:s,page:n}=e??{page:0,pageSize:i.get("paginationPageSize")},r=t==="gridInitializing";s&&!i.get("paginationAutoPageSize")&&o.setPageSize(s,r?"initialState":"pageSizeSelector"),typeof n=="number"&&(r?o.setPage(n):o.goToPage(n))}getRowSelectionState(){var i;const e=this.beans.selectionSvc;if(!e)return;const t=e.getSelectionState();return!t||!Array.isArray(t)&&(t.selectAll===!1||t.selectAllChildren===!1)&&!((i=t==null?void 0:t.toggledNodes)!=null&&i.length)?void 0:t}setRowSelectionState(e,t){var o;(o=this.beans.selectionSvc)==null||o.setSelectionState(e,t,t==="api")}getRowGroupExpansionState(){const{expansionSvc:e,rowModel:t}=this.beans;if(!e)return;const o=[];return t.forEachNode(({expanded:i,id:s})=>{i&&s&&o.push(s)}),o.length?{expandedRowGroupIds:o}:void 0}getRowPinningState(){var e;return(e=this.beans.pinnedRowModel)==null?void 0:e.getPinnedState()}setRowPinningState(e){const t=this.beans.pinnedRowModel;e?t==null||t.setPinnedState(e):t==null||t.reset()}setRowGroupExpansionState(e,t){var n;const o=this.beans.expansionSvc;if(!o)return;const i=(e==null?void 0:e.expandedRowGroupIds)??[];let s;if(t==="api"){const r=(n=this.getRowGroupExpansionState())==null?void 0:n.expandedRowGroupIds;if(r!=null&&r.length){const l=new Set(r);for(const a of i)l.delete(a);s=Array.from(l)}}o.expandRows(i,s)}updateColumnState(e){const t=this.getColumnState();let o=!1;const i=this.cachedState;for(const s of Object.keys(t)){const n=t[s];Sn(n,i[s])||(o=!0)}this.cachedState={...i,...t},o&&this.dispatchStateUpdateEvent(e)}updateCachedState(e,t){const o=this.cachedState[e];this.setCachedStateValue(e,t),Sn(t,o)||this.dispatchStateUpdateEvent([e])}setCachedStateValue(e,t){this.cachedState={...this.cachedState,[e]:t}}refreshStaleState(){const e=this.staleStateKeys;e.forEach(t=>{switch(t){case"rowSelection":this.setCachedStateValue(t,this.getRowSelectionState());break}}),e.clear()}dispatchStateUpdateEvent(e){this.suppressEvents||(e.forEach(t=>this.queuedUpdateSources.add(t)),this.dispatchStateUpdateEventDebounced())}dispatchQueuedStateUpdateEvents(){const e=this.queuedUpdateSources,t=Array.from(e);e.clear(),this.eventSvc.dispatchEvent({type:"stateUpdated",sources:t,state:this.cachedState})}startSuppressEvents(){var e;this.suppressEvents=!0,(e=this.beans.colAnimation)==null||e.setSuppressAnimation(!0)}stopSuppressEvents(e){setTimeout(()=>{var t;this.suppressEvents=!1,this.queuedUpdateSources.clear(),this.isAlive()&&((t=this.beans.colAnimation)==null||t.setSuppressAnimation(!1),this.dispatchStateUpdateEvent([e]))})}suppressEventsAndDispatchInitEvent(e){this.startSuppressEvents(),e(),this.stopSuppressEvents("gridInitializing")}},yb={moduleName:"GridState",version:H,beans:[bb],apiFunctions:{getState:mb,setState:wb}};function Rb(e,t={}){const o=t?t.rowNodes:void 0;e.frameworkOverrides.wrapIncoming(()=>e.rowRenderer.redrawRows(o))}function Ga(e,t,o,i,s){t&&(i&&t.parent&&t.parent.level!==-1&&Ga(e,t.parent,o,i,s),t.setExpanded(o,void 0,s))}function Eb(e,t){return e.rowModel.getRowNode(t)}function xb(e,t,o,i){e.rowRenderer.addRenderedRowListener(t,o,i)}function Db(e){return e.rowRenderer.getRenderedNodes()}function Fb(e,t,o){e.rowModel.forEachNode(t,o)}function Pb(e){return e.rowRenderer.firstRenderedRow}function Tb(e){return e.rowRenderer.lastRenderedRow}function Ib(e,t){return e.rowModel.getRow(t)}function Ab(e){return e.rowModel.getRowCount()}var Ha={moduleName:"RowApi",version:H,apiFunctions:{redrawRows:Rb,setRowNodeExpanded:Ga,getRowNode:Eb,addRenderedRowListener:xb,getRenderedNodes:Db,forEachNode:Fb,getFirstDisplayedRowIndex:Pb,getLastDisplayedRowIndex:Tb,getDisplayedRowAtIndex:Ib,getDisplayedRowCount:Ab}},Mb={moduleName:"ScrollApi",version:H,apiFunctions:{getVerticalPixelRange:DS,getHorizontalPixelRange:FS,ensureColumnVisible:Fa,ensureIndexVisible:Pa,ensureNodeVisible:PS}};function kb(e,t,o){if(!t)return;const i=e.ctrlsSvc.getGridBodyCtrl().eGridBody,s=`aria-${t}`;o===null?i.removeAttribute(s):i.setAttribute(s,o)}function Lb(e,t={}){e.frameworkOverrides.wrapIncoming(()=>e.rowRenderer.refreshCells(t))}function Gb(e){e.frameworkOverrides.wrapIncoming(()=>e.ctrlsSvc.getHeaderRowContainerCtrls().forEach(t=>t.refresh()))}function Hb(e){var t;return((t=e.animationFrameSvc)==null?void 0:t.isQueueEmpty())??!0}function Ob(e){var t;(t=e.animationFrameSvc)==null||t.flushAllFrames()}function Bb(e){return{rowHeight:is(e),headerHeight:lo(e)}}function Vb(e,t={}){var n;const o=[];if(e.rowRenderer.getCellCtrls(t.rowNodes,t.columns).forEach(r=>{const l=r.getCellRenderer();l!=null&&o.push(ds(l))}),(n=t.columns)!=null&&n.length)return o;const i=[],s=nn(t.rowNodes);return e.rowRenderer.getAllRowCtrls().forEach(r=>{if(s&&!rn(r.rowNode,s)||!r.isFullWidth())return;const l=r.getFullWidthCellRenderers();for(let a=0;a<l.length;a++){const d=l[a];d!=null&&i.push(ds(d))}}),[...i,...o]}var Nb={moduleName:"RenderApi",version:H,apiFunctions:{setGridAriaProperty:kb,refreshCells:Lb,refreshHeader:Gb,isAnimationFrameQueueEmpty:Hb,flushAllAnimationFrames:Ob,getSizesForCurrentTheme:Bb,getCellRendererInstances:Vb}};function _b(e,t){var o,i;typeof t=="number"?(o=e.colAutosize)==null||o.sizeColumnsToFit(t,"api"):(i=e.colAutosize)==null||i.sizeColumnsToFitGridBody(t)}function Oa({colAutosize:e,visibleCols:t},o,i){Array.isArray(o)?e==null||e.autoSizeCols({colKeys:o,skipHeader:i,source:"api"}):e==null||e.autoSizeCols({colKeys:o.colIds??t.allCols,skipHeader:o.skipHeader,defaultMaxWidth:o.defaultMaxWidth,defaultMinWidth:o.defaultMinWidth,columnLimits:o.columnLimits,source:"api"})}function Wb(e,t){var o;t&&typeof t=="object"?Oa(e,t):(o=e.colAutosize)==null||o.autoSizeAllColumns({source:"api",skipHeader:t})}var zb=class extends x{constructor(){super(...arguments),this.beanName="colAutosize",this.timesDelayed=0,this.shouldQueueResizeOperations=!1,this.resizeOperationQueue=[]}postConstruct(){this.addManagedEventListeners({firstDataRendered:()=>this.onFirstDataRendered()})}autoSizeCols(e){if(this.shouldQueueResizeOperations){this.pushResizeOperation(()=>this.autoSizeCols(e));return}const{colKeys:t,skipHeader:o,skipHeaderGroups:i,stopAtGroup:s,defaultMaxWidth:n,defaultMinWidth:r,columnLimits:l=[],source:a="api"}=e,{animationFrameSvc:d,renderStatus:c,colModel:u,autoWidthCalc:h,visibleCols:g}=this.beans;if(d==null||d.flushAllFrames(),this.timesDelayed<5&&c&&!c.areHeaderCellsRendered()){this.timesDelayed++,setTimeout(()=>{this.isAlive()&&this.autoSizeCols(e)});return}this.timesDelayed=0;const p=[];let f=-1;const C=Object.fromEntries(l.map(({colId:S,maxWidth:v,minWidth:b})=>[S,{maxWidth:v,minWidth:b}])),m=o??this.gos.get("skipHeaderOnAutoSize"),w=i??m;for(;f!==0;){f=0;const S=[];t.forEach(v=>{if(!v||Vc(v))return;const b=u.getCol(v);if(!b||p.indexOf(b)>=0)return;const D=h.getPreferredWidthForColumn(b,m);if(D>0){const I=C[b.colId]??{};I.minWidth??(I.minWidth=r),I.maxWidth??(I.maxWidth=n);const B=$b(b,D,I);b.setActualWidth(B,a),p.push(b),f++}S.push(b)}),S.length&&g.refresh(a)}w||this.autoSizeColumnGroupsByColumns(t,a,s),yt(this.eventSvc,p,!0,"autosizeColumns")}autoSizeColumn(e,t,o){e&&this.autoSizeCols({colKeys:[e],skipHeader:o,skipHeaderGroups:!0,source:t})}autoSizeColumnGroupsByColumns(e,t,o){const{colModel:i,ctrlsSvc:s}=this.beans,n=new Set;i.getColsForKeys(e).forEach(d=>{let c=d.getParent();for(;c&&c!=o;)c.isPadding()||n.add(c),c=c.getParent()});let l;const a=[];for(const d of n){for(const c of s.getHeaderRowContainerCtrls())if(l=c.getHeaderCtrlForColumn(d),l)break;l&&l.resizeLeafColumnsToFit(t)}return a}autoSizeAllColumns(e){if(this.shouldQueueResizeOperations){this.pushResizeOperation(()=>this.autoSizeAllColumns(e));return}const t=this.beans.visibleCols.allCols;this.autoSizeCols({colKeys:t,...e})}addColumnAutosize(e,t){const o=this.gos.get("skipHeaderOnAutoSize"),i=()=>{this.autoSizeColumn(t,"uiColumnResized",o)};e.addEventListener("dblclick",i);const s=new lt(e);return s.addEventListener("doubleTap",i),()=>{e.removeEventListener("dblclick",i),s.removeEventListener("doubleTap",i),s.destroy()}}addColumnGroupResize(e,t,o){const i=this.gos.get("skipHeaderOnAutoSize"),s=()=>{const n=[];t.getDisplayedLeafColumns().forEach(l=>{l.getColDef().suppressAutoSize||n.push(l.getColId())}),n.length>0&&this.autoSizeCols({colKeys:n,skipHeader:i,stopAtGroup:t,source:"uiColumnResized"}),o()};return e.addEventListener("dblclick",s),()=>e.removeEventListener("dblclick",s)}sizeColumnsToFitGridBody(e,t){if(!this.isAlive())return;const{ctrlsSvc:o,scrollVisibleSvc:i}=this.beans,s=o.getGridBodyCtrl(),r=s.isVerticalScrollShowing()?i.getScrollbarWidth():0,a=Ut(s.eGridBody)-r;if(a>0){this.sizeColumnsToFit(a,"sizeColumnsToFit",!1,e);return}t===void 0?window.setTimeout(()=>{this.sizeColumnsToFitGridBody(e,100)},0):t===100?window.setTimeout(()=>{this.sizeColumnsToFitGridBody(e,500)},100):t===500?window.setTimeout(()=>{this.sizeColumnsToFitGridBody(e,-1)},500):k(29)}sizeColumnsToFit(e,t="sizeColumnsToFit",o,i){var g;if(this.shouldQueueResizeOperations){this.pushResizeOperation(()=>this.sizeColumnsToFit(e,t,o,i));return}const s={};i&&((g=i==null?void 0:i.columnLimits)==null||g.forEach(({key:p,...f})=>{s[typeof p=="string"?p:p.getColId()]=f}));const n=this.beans.visibleCols.allCols;if(e<=0||!n.length||e===Le(n)&&n.every(f=>{if(f.colDef.suppressSizeToFit)return!0;const C=s==null?void 0:s[f.getId()],m=(C==null?void 0:C.minWidth)??(i==null?void 0:i.defaultMinWidth),w=(C==null?void 0:C.maxWidth)??(i==null?void 0:i.defaultMaxWidth),S=f.getActualWidth();return(m==null||S>=m)&&(w==null||S<=w)}))return;const l=[],a=[];n.forEach(p=>{p.getColDef().suppressSizeToFit===!0?a.push(p):l.push(p)});const d=l.slice(0);let c=!1;const u=p=>{me(l,p),a.push(p)};for(l.forEach(p=>{p.resetActualWidth(t);const f=s==null?void 0:s[p.getId()],C=(f==null?void 0:f.minWidth)??(i==null?void 0:i.defaultMinWidth),m=(f==null?void 0:f.maxWidth)??(i==null?void 0:i.defaultMaxWidth),w=p.getActualWidth();typeof C=="number"&&w<C?p.setActualWidth(C,t,!0):typeof m=="number"&&w>m&&p.setActualWidth(m,t,!0)});!c;){c=!0;const p=e-Le(a);if(p<=0)l.forEach(f=>{var m;const C=((m=s==null?void 0:s[f.getId()])==null?void 0:m.minWidth)??(i==null?void 0:i.defaultMinWidth);if(typeof C=="number"){f.setActualWidth(C,t,!0);return}f.setActualWidth(f.minWidth,t)});else{const f=p/Le(l);let C=p;for(let m=l.length-1;m>=0;m--){const w=l[m],S=s==null?void 0:s[w.getId()],v=(S==null?void 0:S.minWidth)??(i==null?void 0:i.defaultMinWidth),b=(S==null?void 0:S.maxWidth)??(i==null?void 0:i.defaultMaxWidth),D=w.getMinWidth(),I=w.getMaxWidth(),B=typeof v=="number"&&v>D?v:D,P=typeof b=="number"&&b<I?b:I;let T=Math.round(w.getActualWidth()*f);T<B?(T=B,u(w),c=!1):T>P?(T=P,u(w),c=!1):m===0&&(T=C),w.setActualWidth(T,t,!0),C-=T}}}d.forEach(p=>{p.fireColumnWidthChangedEvent(t)});const h=this.beans.visibleCols;h.setLeftValues(t),h.updateBodyWidths(),!o&&yt(this.eventSvc,d,!0,t)}applyAutosizeStrategy(){const e=this.gos.get("autoSizeStrategy");if(!e)return;const{type:t}=e;setTimeout(()=>{if(t==="fitGridWidth"){const{columnLimits:o,defaultMinWidth:i,defaultMaxWidth:s}=e,n=o==null?void 0:o.map(({colId:r,minWidth:l,maxWidth:a})=>({key:r,minWidth:l,maxWidth:a}));this.sizeColumnsToFitGridBody({defaultMinWidth:i,defaultMaxWidth:s,columnLimits:n})}else t==="fitProvidedWidth"&&this.sizeColumnsToFit(e.width,"sizeColumnsToFit")})}onFirstDataRendered(){const e=this.gos.get("autoSizeStrategy");if((e==null?void 0:e.type)!=="fitCellContents")return;const{colIds:t,skipHeader:o,defaultMaxWidth:i,defaultMinWidth:s,columnLimits:n}=e;setTimeout(()=>{const r={skipHeader:o,source:"autosizeColumns",defaultMaxWidth:i,defaultMinWidth:s,columnLimits:n};t?this.autoSizeCols({colKeys:t,...r}):this.autoSizeAllColumns(r)})}processResizeOperations(){this.shouldQueueResizeOperations=!1,this.resizeOperationQueue.forEach(e=>e()),this.resizeOperationQueue=[]}pushResizeOperation(e){this.resizeOperationQueue.push(e)}destroy(){this.resizeOperationQueue.length=0,super.destroy()}};function $b(e,t,o={}){const i=o.minWidth??e.getMinWidth();t<i&&(t=i);const s=o.maxWidth??e.getMaxWidth();return t>s&&(t=s),t}var Ub={moduleName:"ColumnAutoSize",version:H,beans:[zb],apiFunctions:{sizeColumnsToFit:_b,autoSizeColumns:Oa,autoSizeAllColumns:Wb},dependsOn:[Ol]},Kb=".ag-row-pinned-source{background-color:var(--ag-pinned-source-row-background-color);color:var(--ag-pinned-source-row-text-color);font-weight:var(--ag-pinned-source-row-font-weight)}.ag-row-pinned-manual{background-color:var(--ag-pinned-row-background-color);color:var(--ag-pinned-row-text-color);font-weight:var(--ag-pinned-row-font-weight)}";function jb(e){var t;return((t=e.pinnedRowModel)==null?void 0:t.getPinnedTopRowCount())??0}function qb(e){var t;return((t=e.pinnedRowModel)==null?void 0:t.getPinnedBottomRowCount())??0}function Yb(e,t){var o;return(o=e.pinnedRowModel)==null?void 0:o.getPinnedTopRow(t)}function Zb(e,t){var o;return(o=e.pinnedRowModel)==null?void 0:o.getPinnedBottomRow(t)}function Qb(e,t,o){var i;return(i=e.pinnedRowModel)==null?void 0:i.forEachPinnedRow(t,o)}var Xb={moduleName:"PinnedRow",version:H,beans:[rp],css:[Kb],apiFunctions:{getPinnedTopRowCount:jb,getPinnedBottomRowCount:qb,getPinnedTopRow:Yb,getPinnedBottomRow:Zb,forEachPinnedRow:Qb},icons:{rowPin:"pin",rowPinTop:"pinned-top",rowPinBottom:"pinned-bottom",rowUnpin:"un-pin"}},Jb=class extends Pt{constructor(e,t,o){super(e.col,e.firstNode,o,t),this.cellSpan=e,this.SPANNED_CELL_CSS_CLASS="ag-spanned-cell"}setComp(e,t,o,i,s,n,r){this.eWrapper=o,super.setComp(e,t,o,i,s,n,r),this.setAriaRowSpan(),this.refreshAriaRowIndex()}isCellSpanning(){return!0}getCellSpan(){return this.cellSpan}refreshAriaRowIndex(){this.rowNode.rowIndex!=null&&xo(this.eGui,this.rowNode.rowIndex)}setAriaRowSpan(){Ud(this.eGui,this.cellSpan.spannedNodes.size)}setFocusedCellPosition(e){this.focusedCellPosition=e}getFocusedCellPosition(){return this.focusedCellPosition??this.cellPosition}checkCellFocused(){const e=this.beans.focusSvc.getFocusedCell();return!!e&&this.cellSpan.doesSpanContain(e)}applyStaticCssClasses(){super.applyStaticCssClasses(),this.comp.toggleCss(this.SPANNED_CELL_CSS_CLASS,!0)}onCellFocused(e){const{beans:t}=this;if(ii(t)){this.focusedCellPosition=void 0;return}const o=this.isCellFocused();o||(this.focusedCellPosition=void 0),e&&o&&(this.focusedCellPosition={rowIndex:e.rowIndex,rowPinned:e.rowPinned,column:e.column}),super.onCellFocused(e)}getRootElement(){return this.eWrapper}},ey=class extends ai{onRowIndexChanged(){super.onRowIndexChanged(),this.getAllCellCtrls().forEach(e=>e.refreshAriaRowIndex())}getInitialRowClasses(e){return["ag-spanned-row"]}getNewCellCtrl(e){var i;const t=(i=this.beans.rowSpanSvc)==null?void 0:i.getCellSpan(e,this.rowNode);if(!(!t||t.firstNode!==this.rowNode))return new Jb(t,this,this.beans)}isCorrectCtrlForSpan(e){var i;const t=(i=this.beans.rowSpanSvc)==null?void 0:i.getCellSpan(e.column,this.rowNode);return!t||t.firstNode!==this.rowNode?!1:e.getCellSpan()===t}onRowHeightChanged(){}refreshFirstAndLastRowStyles(){}addHoverFunctionality(){}resetHoveredStatus(){}},ty=class extends x{constructor(){super(...arguments),this.beanName="spannedRowRenderer",this.topCtrls=new Map,this.bottomCtrls=new Map,this.centerCtrls=new Map}postConstruct(){this.addManagedEventListeners({displayedRowsChanged:this.createAllCtrls.bind(this)})}createAllCtrls(){this.createCtrls("top"),this.createCtrls("bottom"),this.createCtrls("center")}createCtrls(e){const{rowSpanSvc:t}=this.beans,o=`${e}Ctrls`,i=this[o],s=i.size,n=this.getAllRelevantRowControls(e),r=new Map;let l=!1;for(const d of n)d.isAlive()&&(t==null||t.forEachSpannedColumn(d.rowNode,(c,u)=>{if(r.has(u.firstNode))return;const h=i.get(u.firstNode);if(h){r.set(u.firstNode,h),i.delete(u.firstNode);return}l=!0;const g=new ey(u.firstNode,this.beans,!1,!1,!1);r.set(u.firstNode,g)}));this[o]=r;const a=r.size===s;if(!(!l&&a)){for(const d of i.values())d.destroyFirstPass(!0),d.destroySecondPass();this.dispatchLocalEvent({type:"spannedRowsUpdated",ctrlsKey:e})}}getAllRelevantRowControls(e){const{rowRenderer:t}=this.beans;switch(e){case"top":return t.topRowCtrls;case"bottom":return t.bottomRowCtrls;case"center":return t.allRowCtrls}}getCellByPosition(e){const{rowSpanSvc:t}=this.beans,o=t==null?void 0:t.getCellSpanByPosition(e);if(!o)return;const i=`${Ba(e.rowPinned)}Ctrls`,s=this[i].get(o.firstNode);if(s)return s.getAllCellCtrls().find(n=>n.column===e.column)}getCtrls(e){const t=`${e}Ctrls`;return[...this[t].values()]}destroyRowCtrls(e){const t=`${e}Ctrls`;for(const o of this[t].values())o.destroyFirstPass(!0),o.destroySecondPass();this[t]=new Map}destroy(){super.destroy(),this.destroyRowCtrls("top"),this.destroyRowCtrls("bottom"),this.destroyRowCtrls("center")}},Ba=e=>e??"center",oy=class{constructor(e,t){this.col=e,this.firstNode=t,this.cellSpan=!0,this.spannedNodes=new Set,this.addSpannedNode(t)}reset(){this.spannedNodes.clear(),this.addSpannedNode(this.firstNode)}addSpannedNode(e){this.spannedNodes.add(e),this.lastNode=e}getLastNode(){return this.lastNode}getCellHeight(){return this.lastNode.rowTop+this.lastNode.rowHeight-this.firstNode.rowTop-1}doesSpanContain(e){return e.column!==this.col||e.rowPinned!=this.firstNode.rowPinned?!1:this.firstNode.rowIndex<=e.rowIndex&&e.rowIndex<=this.lastNode.rowIndex}getLastNodeAutoHeight(){var o;const e=(o=this.firstNode.__autoHeights)==null?void 0:o[this.col.getColId()];if(e==null)return;let t=0;return this.spannedNodes.forEach(i=>{i!==this.lastNode&&(t+=i.rowHeight)}),e-t}},iy=class extends x{constructor(e){super(),this.column=e}buildCache(e){var S;const{column:t,beans:{gos:o,pinnedRowModel:i,rowModel:s,valueSvc:n,pagination:r}}=this,{colDef:l}=t,a=this[`${e}ValueNodeMap`],d=new Map,c=o.getCallback("isFullWidthRow"),u=l.equals,h=l.spanRows,g=typeof h=="function";let p=null,f=null,C;const m=(v,b)=>{p=v,f=null,C=b},w=v=>{const b=!v.isExpandable()&&!v.group&&!v.detail&&(c?!c({rowNode:v}):!0);if(v.rowIndex==null||!b){m(null,null);return}if(p==null||v.level!==p.level||v.footer||f&&v.rowIndex-1!==(f==null?void 0:f.getLastNode().rowIndex)){m(v,n.getValue(t,v));return}const D=n.getValue(t,v);if(g){const I=N(o,{valueA:C,nodeA:p,valueB:D,nodeB:v,column:t,colDef:l});if(!h(I)){m(v,D);return}}else if(u?!u(C,D):C!==D){m(v,D);return}if(!f){const I=a==null?void 0:a.get(p);(I==null?void 0:I.firstNode)===p?(I.reset(),f=I):f=new oy(t,p),d.set(p,f)}f.addSpannedNode(v),d.set(v,f)};switch(e){case"center":(S=s.forEachDisplayedNode)==null||S.call(s,v=>{(!r||r.isRowInPage(v.rowIndex))&&w(v)});break;case"top":i==null||i.forEachPinnedRow("top",w);break;case"bottom":i==null||i.forEachPinnedRow("bottom",w);break}this[`${e}ValueNodeMap`]=d}isCellSpanning(e){return!!this.getCellSpan(e)}getCellSpan(e){return this[`${Ba(e.rowPinned)}ValueNodeMap`].get(e)}},sy=class extends x{constructor(){super(...arguments),this.beanName="rowSpanSvc",this.spanningColumns=new Map,this.debouncePinnedEvent=he(this,this.dispatchCellsUpdatedEvent.bind(this,!0),0),this.debounceModelEvent=he(this,this.dispatchCellsUpdatedEvent.bind(this,!1),0),this.pinnedTimeout=null,this.modelTimeout=null}postConstruct(){const e=this.onRowDataUpdated.bind(this),t=this.buildPinnedCaches.bind(this);this.addManagedEventListeners({paginationChanged:this.buildModelCaches.bind(this),pinnedRowDataChanged:t,pinnedRowsChanged:t,rowNodeDataChanged:e,cellValueChanged:e})}register(e){const{gos:t}=this.beans;if(!t.get("enableCellSpan")||this.spanningColumns.has(e))return;const o=this.createManagedBean(new iy(e));this.spanningColumns.set(e,o),o.buildCache("top"),o.buildCache("bottom"),o.buildCache("center"),this.debouncePinnedEvent(),this.debounceModelEvent()}dispatchCellsUpdatedEvent(e){this.dispatchLocalEvent({type:"spannedCellsUpdated",pinned:e})}deregister(e){this.spanningColumns.delete(e)}onRowDataUpdated({node:e}){const{spannedRowRenderer:t}=this.beans;if(e.rowPinned){if(this.pinnedTimeout!=null)return;this.pinnedTimeout=window.setTimeout(()=>{this.pinnedTimeout=null,this.buildPinnedCaches(),t==null||t.createCtrls("top"),t==null||t.createCtrls("bottom")},0);return}this.modelTimeout==null&&(this.modelTimeout=window.setTimeout(()=>{this.modelTimeout=null,this.buildModelCaches(),t==null||t.createCtrls("center")},0))}buildModelCaches(){this.modelTimeout!=null&&clearTimeout(this.modelTimeout),this.spanningColumns.forEach(e=>e.buildCache("center")),this.debounceModelEvent()}buildPinnedCaches(){this.pinnedTimeout!=null&&clearTimeout(this.pinnedTimeout),this.spanningColumns.forEach(e=>{e.buildCache("top"),e.buildCache("bottom")}),this.debouncePinnedEvent()}isCellSpanning(e,t){const o=this.spanningColumns.get(e);return o?o.isCellSpanning(t):!1}getCellSpanByPosition(e){const{pinnedRowModel:t,rowModel:o}=this.beans,i=e.column,s=e.rowIndex,n=this.spanningColumns.get(i);if(!n)return;let r;switch(e.rowPinned){case"top":r=t==null?void 0:t.getPinnedTopRow(s);break;case"bottom":r=t==null?void 0:t.getPinnedBottomRow(s);break;default:r=o.getRow(s)}if(r)return n.getCellSpan(r)}getCellStart(e){const t=this.getCellSpanByPosition(e);return t?{...e,rowIndex:t.firstNode.rowIndex}:e}getCellEnd(e){const t=this.getCellSpanByPosition(e);return t?{...e,rowIndex:t.getLastNode().rowIndex}:e}getCellSpan(e,t){const o=this.spanningColumns.get(e);if(o)return o.getCellSpan(t)}forEachSpannedColumn(e,t){for(const[o,i]of this.spanningColumns)if(i.isCellSpanning(e)){const s=i.getCellSpan(e);t(o,s)}}destroy(){super.destroy(),this.spanningColumns.clear()}},ny={moduleName:"CellSpan",version:H,beans:[sy,ty]},ry=class extends x{constructor(e,t){super(),this.cellCtrl=e,this.staticClasses=[],this.beans=t,this.column=e.column}setComp(e){this.cellComp=e,this.applyUserStyles(),this.applyCellClassRules(),this.applyClassesFromColDef()}applyCellClassRules(){const{column:e,cellComp:t}=this,o=e.colDef,i=o.cellClassRules,s=this.getCellClassParams(e,o);Es(this.beans.expressionSvc,i===this.cellClassRules?void 0:this.cellClassRules,i,s,n=>t.toggleCss(n,!0),n=>t.toggleCss(n,!1)),this.cellClassRules=i}applyUserStyles(){const e=this.column,t=e.colDef,o=t.cellStyle;if(!o)return;let i;if(typeof o=="function"){const s=this.getCellClassParams(e,t);i=o(s)}else i=o;i&&this.cellComp.setUserStyles(i)}applyClassesFromColDef(){const{column:e,cellComp:t}=this,o=e.colDef,i=this.getCellClassParams(e,o);this.staticClasses.forEach(n=>t.toggleCss(n,!1));const s=this.beans.cellStyles.getStaticCellClasses(o,i);this.staticClasses=s,s.forEach(n=>t.toggleCss(n,!0))}getCellClassParams(e,t){const{value:o,rowNode:i}=this.cellCtrl;return N(this.beans.gos,{value:o,data:i.data,node:i,colDef:t,column:e,rowIndex:i.rowIndex})}},ly=class extends x{constructor(){super(...arguments),this.beanName="cellStyles"}processAllCellClasses(e,t,o,i){Es(this.beans.expressionSvc,void 0,e.cellClassRules,t,o,i),this.processStaticCellClasses(e,t,o)}getStaticCellClasses(e,t){const{cellClass:o}=e;if(!o)return[];let i;return typeof o=="function"?i=o(t):i=o,typeof i=="string"&&(i=[i]),i||[]}createCellCustomStyleFeature(e,t){return new ry(e,t)}processStaticCellClasses(e,t,o){this.getStaticCellClasses(e,t).forEach(s=>{o(s)})}},ay={moduleName:"CellStyle",version:H,beans:[ly]},dy={moduleName:"RowStyle",version:H,beans:[Kh]};function cy(e,t){var o;return!!((o=e.colHover)!=null&&o.isHovered(t))}var uy=class extends x{constructor(e,t){super(),this.columns=e,this.element=t,this.destroyManagedListeners=[],this.enableFeature=o=>{const{beans:i,gos:s,element:n,columns:r}=this,l=i.colHover;o??!!s.get("columnHoverHighlight")?this.destroyManagedListeners=this.addManagedElementListeners(n,{mouseover:l.setMouseOver.bind(l,r),mouseout:l.clearMouseOver.bind(l)}):(this.destroyManagedListeners.forEach(d=>d()),this.destroyManagedListeners=[])}}postConstruct(){this.addManagedPropertyListener("columnHoverHighlight",({currentValue:e})=>{this.enableFeature(e)}),this.enableFeature()}destroy(){super.destroy(),this.destroyManagedListeners=null}},hy="ag-column-hover",gy=class extends x{constructor(){super(...arguments),this.beanName="colHover"}postConstruct(){this.addManagedPropertyListener("columnHoverHighlight",({currentValue:e})=>{e||this.clearMouseOver()})}setMouseOver(e){this.updateState(e)}clearMouseOver(){this.updateState(null)}isHovered(e){if(!this.gos.get("columnHoverHighlight"))return!1;const t=this.selectedColumns;return!!t&&t.indexOf(e)>=0}addHeaderColumnHoverListener(e,t,o){const i=()=>{const s=this.isHovered(o);t.toggleCss("ag-column-hover",s)};e.addManagedEventListeners({columnHoverChanged:i}),i()}onCellColumnHover(e,t){if(!t)return;const o=this.isHovered(e);t.toggleCss(hy,o)}addHeaderFilterColumnHoverListener(e,t,o,i){this.createHoverFeature(e,[o],i);const s=()=>{const n=this.isHovered(o);t.toggleCss("ag-column-hover",n)};e.addManagedEventListeners({columnHoverChanged:s}),s()}createHoverFeature(e,t,o){e.createManagedBean(new uy(t,o))}updateState(e){this.selectedColumns=e,this.eventSvc.dispatchEvent({type:"columnHoverChanged"})}},py={moduleName:"ColumnHover",version:H,beans:[gy],apiFunctions:{isColumnHovered:cy}},fy=class extends x{constructor(){super(...arguments),this.beanName="apiEventSvc",this.syncListeners=new Map,this.asyncListeners=new Map,this.syncGlobalListeners=new Set,this.globalListenerPairs=new Map}postConstruct(){var e,t;this.wrapSvc=(t=(e=this.beans.frameworkOverrides).createGlobalEventListenerWrapper)==null?void 0:t.call(e)}addEventListener(e,t){var n;const o=((n=this.wrapSvc)==null?void 0:n.wrap(e,t))??t,i=!ho.has(e),s=i?this.asyncListeners:this.syncListeners;s.has(e)||s.set(e,new Set),s.get(e).add(o),this.eventSvc.addEventListener(e,o,i)}removeEventListener(e,t){var n,r;const o=((n=this.wrapSvc)==null?void 0:n.unwrap(e,t))??t,i=this.asyncListeners.get(e),s=!!(i!=null&&i.delete(o));s||(r=this.syncListeners.get(e))==null||r.delete(o),this.eventSvc.removeEventListener(e,o,s)}addGlobalListener(e){var n;const t=((n=this.wrapSvc)==null?void 0:n.wrapGlobal(e))??e,o=(r,l)=>{ho.has(r)&&t(r,l)},i=(r,l)=>{ho.has(r)||t(r,l)};this.globalListenerPairs.set(e,{syncListener:o,asyncListener:i});const s=this.eventSvc;s.addGlobalListener(o,!1),s.addGlobalListener(i,!0)}removeGlobalListener(e){const{eventSvc:t,wrapSvc:o,globalListenerPairs:i}=this,s=(o==null?void 0:o.unwrapGlobal(e))??e;if(i.has(s)){const{syncListener:r,asyncListener:l}=i.get(s);t.removeGlobalListener(r,!1),t.removeGlobalListener(l,!0),i.delete(e)}else this.syncGlobalListeners.delete(s),t.removeGlobalListener(s,!1)}destroyEventListeners(e,t){e.forEach((o,i)=>{o.forEach(s=>this.eventSvc.removeEventListener(i,s,t)),o.clear()}),e.clear()}destroyGlobalListeners(e,t){e.forEach(o=>this.eventSvc.removeGlobalListener(o,t)),e.clear()}destroy(){super.destroy(),this.destroyEventListeners(this.syncListeners,!1),this.destroyEventListeners(this.asyncListeners,!0),this.destroyGlobalListeners(this.syncGlobalListeners,!1);const{globalListenerPairs:e,eventSvc:t}=this;e.forEach(({syncListener:o,asyncListener:i})=>{t.removeGlobalListener(o,!1),t.removeGlobalListener(i,!0)}),e.clear()}};function Cy(e,t,o){var i;(i=e.apiEventSvc)==null||i.addEventListener(t,o)}function my(e,t,o){var i;(i=e.apiEventSvc)==null||i.removeEventListener(t,o)}function wy(e,t){var o;(o=e.apiEventSvc)==null||o.addGlobalListener(t)}function vy(e,t){var o;(o=e.apiEventSvc)==null||o.removeGlobalListener(t)}var Sy={moduleName:"EventApi",version:H,apiFunctions:{addEventListener:Cy,addGlobalListener:wy,removeEventListener:my,removeGlobalListener:vy},beans:[fy]},by={moduleName:"Locale",version:H,beans:[Hv]},yy=class extends x{constructor(){super(...arguments),this.beanName="rowAutoHeight",this.wasEverActive=!1,this._debouncedCalculateRowHeights=he(this,this.calculateRowHeights.bind(this),1)}requestCheckAutoHeight(){this.wasEverActive&&this._debouncedCalculateRowHeights()}calculateRowHeights(){var l,a,d,c;const{visibleCols:e,rowModel:t,rowSpanSvc:o,pinnedRowModel:i}=this.beans,s=e.autoHeightCols;let n=!1;const r=u=>{var p;const h=u.__autoHeights;let g=_e(this.beans,u).height;for(const f of s){let C=h==null?void 0:h[f.getColId()];const m=o==null?void 0:o.getCellSpan(f,u);if(m){if(m.getLastNode()!==u)continue;if(C=(p=o==null?void 0:o.getCellSpan(f,u))==null?void 0:p.getLastNodeAutoHeight(),!C)return}if(C==null){if(this.colSpanSkipCell(f,u))continue;return}g=Math.max(C,g)}g!==u.rowHeight&&(u.setRowHeight(g),n=!0)};(l=i==null?void 0:i.forEachPinnedRow)==null||l.call(i,"top",r),(a=i==null?void 0:i.forEachPinnedRow)==null||a.call(i,"bottom",r),(d=t.forEachDisplayedNode)==null||d.call(t,r),n&&((c=t.onRowHeightChanged)==null||c.call(t))}setRowAutoHeight(e,t,o){if(e.__autoHeights??(e.__autoHeights={}),t==null){delete e.__autoHeights[o.getId()];return}const i=e.__autoHeights[o.getId()];e.__autoHeights[o.getId()]=t,i!==t&&this.requestCheckAutoHeight()}colSpanSkipCell(e,t){const{colModel:o,colViewport:i,visibleCols:s}=this.beans;if(!o.colSpanActive)return!1;let n=[];switch(e.getPinned()){case"left":n=s.getLeftColsForRow(t);break;case"right":n=s.getRightColsForRow(t);break;case null:n=i.getColsWithinViewport(t);break}return!n.includes(e)}setupCellAutoHeight(e,t,o){if(!e.column.isAutoHeight()||!t)return!1;this.wasEverActive=!0;const i=t.parentElement,{rowNode:s,column:n}=e,r=this.beans,l=c=>{var w;if((w=this.beans.editSvc)!=null&&w.isEditing(e)||!e.isAlive()||!o.isAlive())return;const{paddingTop:u,paddingBottom:h,borderBottomWidth:g,borderTopWidth:p}=Ye(i),f=u+h+g+p,m=t.offsetHeight+f;if(c<5){const S=X(r),v=!S||!S.contains(t),b=m==0;if(v||b){window.setTimeout(()=>l(c+1),0);return}}this.setRowAutoHeight(s,m,n)},a=()=>l(0);a();const d=Ze(r,t,a);return o.addDestroyFunc(()=>{d(),this.setRowAutoHeight(s,void 0,n)}),!0}setAutoHeightActive(e){this.active=e.list.some(t=>t.isVisible()&&t.isAutoHeight())}areRowsMeasured(){if(!this.active)return!0;const e=this.beans.rowRenderer.getAllRowCtrls();let t=null;for(const{rowNode:o}of e)if((!t||this.beans.colModel.colSpanActive)&&(t=this.beans.colViewport.getColsWithinViewport(o).filter(s=>s.isAutoHeight())),t.length!==0){if(!o.__autoHeights)return!1;for(const i of t){const s=o.__autoHeights[i.getColId()];if(!s||o.rowHeight<s)return!1}}return!0}},Ry={moduleName:"RowAutoHeight",version:H,beans:[yy]};const ct=Symbol("grid-context"),un=e=>{const t=e.getColumnState().filter(i=>i.sort!=null),o={};return t.forEach((i,s)=>o[i.colId]=s),t.sort((i,s)=>{const n=i.sortIndex,r=s.sortIndex;if(n!=null&&r!=null)return n-r;if(n==null&&r==null){const l=o[i.colId],a=o[s.colId];return l>a?1:-1}else return r==null?-1:1}),t},Va=e=>{const t=un(e),o=new Map;return t.forEach((i,s)=>{o.set(i.colId,s)}),o},Na=(e,t)=>Va(e).get(t)??-1,Ey=e=>!!e&&(typeof e=="object"||typeof e=="function")&&typeof e.then=="function";class _a{constructor(t,o){R(this,"loading",!1);R(this,"dataGetter");R(this,"cache");R(this,"_api");R(this,"loadingDelay");R(this,"getSorts",()=>un(this.api).map(t=>({colId:t.colId,sort:t.sort})));this.dataGetter=t,this.cache=o}set api(t){this._api=t}get api(){return this._api}destroy(){this.loading=!1}loadData(){const t=this.cache.getRows().map((o,i)=>(o.__setIndex(i),o)).flatMap(o=>o.flat());this.api.setGridOption("rowData",t),this.api.redrawRows(),this.loading=!1}getRows(t){var o,i,s,n,r,l,a,d;if(this.loading||!this._api){(i=(o=t.context)==null?void 0:o.resolve)==null||i.call(o);return}if(this.cache.isFinished&&t.pageNum!==1){(n=(s=t.context)==null?void 0:s.resolve)==null||n.call(s);return}if(this.loading=!0,O.isFunction(this.dataGetter)){const c=this.dataGetter({startRow:t.startRow,endRow:t.endRow,pageNum:t.pageNum,pageSize:t.pageSize,params:t.filterModel,sorts:this.getSorts()});Ey(c)&&(this.loadingDelay=setTimeout(()=>{this.api.setGridOption("loading",!0)},500),c.then(u=>{var h,g;t.successCallback(u,u.length),(g=(h=t.context)==null?void 0:h.resolve)==null||g.call(h)}).catch(u=>{var h,g;t.failCallback(),(g=(h=t.context)==null?void 0:h.reject)==null||g.call(h,u)}).finally(()=>{clearTimeout(this.loadingDelay),this.api.setGridOption("loading",!1),this.loadData()})),O.isArray(c)&&(t.successCallback(c,c.length),this.loadData(),(l=(r=t.context)==null?void 0:r.resolve)==null||l.call(r))}else t.successCallback(this.dataGetter,this.dataGetter.length),this.loadData(),(d=(a=t.context)==null?void 0:a.resolve)==null||d.call(a)}}class hn{constructor(t,o,i){R(this,"spanMatrix");R(this,"rootId");R(this,"rowIdToNestingIdx");this.spanMatrix=o,this.rootId=i,this.rowIdToNestingIdx=new Map;for(let s=0;s<t.length;s++)this.rowIdToNestingIdx.set(t[s].id,s)}get(t,o){const i=o.getColId(),s=this.rowIdToNestingIdx.get(t);return s===void 0?0:this.spanMatrix.getCellSpan(this.rootId,s,i)}set(t,o,i){}}class Ot{constructor(t,o,i=[]){R(this,"actualRow");R(this,"id");R(this,"nestingIndexes");this.actualRow=o,this.id=t,this.nestingIndexes=i}delete(){this.actualRow.delete()}redraw(){this.actualRow.redraw()}getActualRow(){return this.actualRow}isCellEditing(t){return this.actualRow.isCellEditing(this.id,t)}startEditing(t){t!==null&&this.actualRow.isEditing()&&(this.actualRow=this.actualRow.stopEditing(!0)),this.actualRow.isEditing(t)||(t==null?this.actualRow.startEditing(!0):this.actualRow.startEditingCell(this.id,t,!0))}getDataIndex(){return this.actualRow.getDataIndex()}getRowSpans(){return this.actualRow.getRowSpans()}isEditing(){return this.actualRow.isEditing()}getValue(t){var o;return(o=this.actualRow.getCell(t,this.getNestingIndexes()))==null?void 0:o.value}getRowSpan(t){return this.actualRow.getRowSpans().get(this.id,t)}getData(){return this.actualRow.getData()}isColumnValueChanged(t,o){return this.actualRow.isEditing()&&this.actualRow.getValue(o,this.getNestingIndexes())!==t}getNestingIndexes(){return this.nestingIndexes}getSignature(){return this.actualRow.getSignature()}getId(){return this.actualRow.getId()}getCell(t){return this.actualRow.getCell(t,this.getNestingIndexes())}isTransient(){return this.actualRow.isTransient()}setData(t){this.actualRow.setData(t)}buildSpan(){this.actualRow.buildSpan()}match(t){return t.data.getId()===this.actualRow.getId()}getHostObject(t){var r;const o=this.getCell(t.column);if(!o)return{hostObject:this.getData()};if(!o.parent||o.parent.field==="$")return{hostObject:this.getData()};let i=o.isArrayElement()?o.path:o.parent.path;((r=t.colDef)==null?void 0:r.cellDataType)==="array"&&(i=o.path);const s=O.get(this.getData(),i),n=i.endsWith("]")?O.get(this.getData(),i.substring(0,i.lastIndexOf("["))):void 0;return{hostObject:s,hostArray:n}}}class Wa{constructor(t,o,i){R(this,"actualRow");R(this,"idMapper");R(this,"draft");this.actualRow=t,this.idMapper=i,this.draft=E.reactive(O.cloneDeep(o))}getSourceRow(){return this.actualRow}getDataIndex(){return this.actualRow.getDataIndex()}getSignature(){return this.actualRow.signature}getValue(t,o){var i;return(i=this.getCell(t,o))==null?void 0:i.value}getCell(t,o){return this.actualRow.getCell(t,o)}getId(){return this.actualRow.id}getRowSpans(){return this.actualRow.getRowSpans()}match(t){return this.actualRow.match(t)}__setIndex(t){this.actualRow.__setIndex(t)}getData(){return this.draft}getDraft(){return this.draft}setData(t){this.draft=E.reactive(t)}buildSpan(){this.actualRow.update(this.actualRow.id,E.toRaw(this.draft))}flat(){return this.actualRow.leafCells.map(t=>new Ot(t.id,this,t.nestingIndexes))}_stopEditingImpl(t=!1){const o=E.toRaw(this.draft),i=this.idMapper(o);return this.actualRow.update(i,o),t&&this.redraw(),this.actualRow.dataCache.replace(this.actualRow),this.actualRow}isEditing(t){return!!this.draft}isCellEditing(t,o){return!!this.draft}stopEditing(t=!1){return this._stopEditingImpl(t)}}class Fi extends Wa{constructor(o,i,s=!1){super(o,O.cloneDeep(o.data),i);R(this,"transient");this.transient=s}redraw(){this.actualRow.redraw()}delete(){this.actualRow.delete()}isTransient(){return this.transient}async persistent(o){const i=await o(O.cloneDeep(this.draft));return this.actualRow.update(this.idMapper(i),i),this.draft=E.reactive(i),this.transient=!1,this}}class Pi extends Wa{constructor(o,i,s,n){super(o,o.data,n);R(this,"editingColumn");R(this,"rowId");this.rowId=i,this.editingColumn=s}getEditingColumn(){return this.editingColumn}getRowId(){return this.rowId}delete(){throw new Error("CellEditableRow 不允许删除")}redraw(){this.actualRow.redrawCell(this.rowId,this.editingColumn)}isCellEditing(o,i){return!!this.draft&&this.editingColumn.getColId()===i.getColId()&&this.rowId===o}isTransient(){return!1}}class Bt{constructor(t,o,i,s,n){R(this,"id");R(this,"field");R(this,"value");R(this,"index");R(this,"properties",new Map);R(this,"parent");R(this,"spanRow",1);R(this,"path");this.id=t,this.field=o,this.value=i,this.index=s,this.parent=n,this.path=this.getReadPath()}getRoot(){let t=this.parent;for(;;){if(t.field==="$")return t;t=t==null?void 0:t.parent}}pretreatmentValue(t,o,i){const s=this.properties.get(t);if(s)return s;const n=O.get(this.value,t);let r;if(O.isArray(n)&&i.cellDataType!=="native"){r=new Array(n.length);for(let l=0;l<n.length;l++)r[l]=new Bt(`${this.id}_${l}`,t,n[l],l,o)}else r=new Bt(this.id,t,n,void 0,o);return this.properties.set(t,r),r}isNeedSpan(){return Array.from(this.properties.values()).some(t=>O.isArray(t))}get(t){return this.properties.get(t)}calcSpan(){if(this.isNeedSpan()){let t=1,o=!1;for(const i of this.properties.values())if(O.isArray(i)){o=!0;let s=0;for(const n of i)s+=n.calcSpan();t=Math.max(t,s)}if(o&&t>1)for(const i of this.properties.values())O.isArray(i)||i.setRowSpan(t);return this.spanRow=t,this.spanRow}return this.spanRow}setRowSpan(t){this.spanRow=t;for(const o of this.properties.values())O.isArray(o)||o.setRowSpan(this.spanRow)}getPath(){const t=[];let o=this;for(;o;)t.push(o.field),o=o.parent;return t.reverse().slice(1).join(".")}getReadPath(){const t=[];let o=this;for(;o;)t.push(`${o.field}${O.isNumber(o.index)?`[${o.index}]`:""}`),o=o.parent;return t.reverse().slice(1).join(".")}isArrayElement(){return this.path.endsWith("]")}}class za{constructor(){R(this,"trees",new Map);R(this,"arrayParents",new Map);R(this,"cellSpanCaches",new Map);R(this,"columns",new Map);R(this,"dirtyRoots",new Set)}setRow(t,o,i){this.columns.clear();for(const c of i.columns)this.columns.set(c.colId,c);const s=this._computeExpandPaths(o,i.columns),n=new Map;this.arrayParents.set(t,n);const r=this.buildTree(t,o,n,s);this.computeSpans(r),this.trees.set(t,r);const l=new Map,a=new Set,d=this.collectLeaves(r);for(const c of d)this._walkUpAndRecord(c,l,a,t);if(d.length>0){const c=new Set;for(const g of d)for(const p of l.keys())if(p.startsWith(`${g.id}|`)){const f=p.substring(g.id.length+1);c.add(f)}const u=d[0],h=r.spanRow;for(const g of this.columns.keys())c.has(g)||l.set(`${u.id}|${g}`,h)}this.cellSpanCaches.set(t,l),this.dirtyRoots.add(t)}_computeExpandPaths(t,o){const i=new Set;for(const s of o){const n=s.colId.split(".");let r=t,l="";const a=s.cellDataType==="native"&&r!=null&&Array.isArray(r[n[0]]);for(let d=0;d<n.length&&r!=null;d++){const c=n[d];l=l?`${l}.${c}`:c;const u=r[c];if(Array.isArray(u)){if(d===0&&a)break;i.add(l),r=u[0]}else r=u}}return i}setArrayLength(t,o,i){var g,p;const s=this.trees.get(t);if(!s)return;const n=(g=this.arrayParents.get(t))==null?void 0:g.get(o);if(!n){this.dirtyRoots.add(t);return}const r=n.children.filter(f=>f.isArrayElement&&f.path===o),l=r.length,a=((p=r[0])==null?void 0:p.field)??o.split(".").pop();if(l===i){this.dirtyRoots.add(t);return}if(i<l)n.children=n.children.filter(f=>!(f.isArrayElement&&f.path===o)||f.index<i);else{n.children=n.children.filter(f=>!(f.path===o&&Array.isArray(f.value)&&f.value.length===0));for(let f=l;f<i;f++){const C=n.children.filter(w=>w.isArrayElement&&w.path===o),m=C.length>0?C[0].nestingIndexes.slice(0,-1):n.nestingIndexes;n.children.push({id:`${n.id}_${a}_${f}`,field:a,value:void 0,index:f,isArrayElement:!0,parent:n,children:[],spanRow:1,path:o,readPath:`${o}[${f}]`,nestingIndexes:[...m,f]})}}let d=n;for(;d;)this.computeSpans(d),d=d.parent;const c=new Map,u=new Set,h=this.collectLeaves(s);for(const f of h)this._walkUpAndRecord(f,c,u,t);if(h.length>0){const f=new Set;for(const w of h)for(const S of c.keys())if(S.startsWith(`${w.id}|`)){const v=S.substring(w.id.length+1);f.add(v)}const C=h[0],m=s.spanRow;for(const w of this.columns.keys())f.has(w)||c.set(`${C.id}|${w}`,m)}this.cellSpanCaches.set(t,c),this.dirtyRoots.add(t)}getCellSpan(t,o,i){if(!this.columns.has(i))return 0;const s=this.cellSpanCaches.get(t);if(!s)return 0;const n=this.trees.get(t);if(!n)return 0;const r=this.collectLeaves(n);if(o<0||o>=r.length)return 0;const l=r[o];return s.get(`${l.id}|${i}`)??0}getCellPath(t,o){if(!this.columns.has(t))return null;const i=this.firstArrayPaths();if(!i)return null;const s=t.split("."),n=[];let r=0;for(let l=0;l<s.length;l++){let a=s[l];if(l<s.length-1){const d=s.slice(0,l+1).join(".");i.has(d)&&r<o.length&&(a+=`[${o[r]}]`,r++)}n.push(a)}return n.join(".")}getMaxArrayLength(t){const o=this.trees.get(t);return o?o.spanRow:1}getLeaves(t){const o=this.trees.get(t);return o?this.collectLeaves(o):[]}getDirtyRoots(){return this.dirtyRoots}clearDirty(){this.dirtyRoots.clear()}buildTree(t,o,i,s){const n={id:t,field:"$",value:o,isArrayElement:!1,children:[],spanRow:1,path:"",readPath:"",nestingIndexes:[]};return this.expandChildren(n,o,i,s),n}expandChildren(t,o,i,s){if(Array.isArray(o)){if(s.has(t.path)){i.set(t.path,t);for(let n=0;n<o.length;n++){const r=this.createNode(`${t.id}_${t.field}_${n}`,t.field,o[n],n,t,t.path,[...t.nestingIndexes,n]);t.children.push(r),this.expandChildren(r,o[n],i,s)}}else{const n=this.createNode(t.id,t.field,o,void 0,t,t.path,t.nestingIndexes);t.children.push(n)}return}if(this.isPlainObject(o))for(const[n,r]of Object.entries(o)){const l=t.path?`${t.path}.${n}`:n;if(Array.isArray(r))if(s.has(l)){i.set(l,t);for(let a=0;a<r.length;a++){const d=this.createNode(`${t.id}_${n}_${a}`,n,r[a],a,t,l,[...t.nestingIndexes,a]);t.children.push(d),this.expandChildren(d,r[a],i,s)}if(r.length===0){const a=this.createNode(`${t.id}_${n}_empty`,n,r,void 0,t,l,t.nestingIndexes);t.children.push(a)}}else{const a=this.createNode(t.id,n,r,void 0,t,l,t.nestingIndexes);t.children.push(a)}else{const a=this.createNode(t.id,n,r,void 0,t,l,t.nestingIndexes);t.children.push(a),this.expandChildren(a,r,i,s)}}}createNode(t,o,i,s,n,r,l){return{id:t,field:o,value:i,index:s,isArrayElement:s!==void 0,parent:n,children:[],spanRow:1,path:r,readPath:s!==void 0?`${r}[${s}]`:r,nestingIndexes:l}}isPlainObject(t){return t!=null&&typeof t=="object"&&!Array.isArray(t)}computeSpans(t){if(t.children.length===0)return t.spanRow=1,1;const o=[],i=[];for(const s of t.children)this.computeSpans(s),s.isArrayElement?o.push(s):i.push(s);if(o.length>0){const s=new Map;for(const r of o){const l=r.path;s.set(l,(s.get(l)??0)+r.spanRow)}let n=1;for(const r of s.values())r>n&&(n=r);if(t.spanRow=n,n>1)for(const r of i)this.propagateSpan(r,n)}else{let s=1;for(const n of i)n.spanRow>s&&(s=n.spanRow);t.spanRow=s}return t.spanRow}propagateSpan(t,o){t.spanRow=o;for(const i of t.children)i.isArrayElement||this.propagateSpan(i,o)}collectLeaves(t){const o=[];return this._collectLeaves(t,o),o.length===0&&o.push(t),o}_collectLeaves(t,o){for(const i of t.children)i.isArrayElement?this._hasArrayDescendant(i)?this._collectLeaves(i,o):o.push(i):this._collectLeaves(i,o)}_hasArrayDescendant(t){for(const o of t.children)if(o.isArrayElement||this._hasArrayDescendant(o))return!0;return!1}findSpanByPath(t,o){let i=t;for(;i;){if(i.path===o)return i.spanRow;const s=this.searchInNonArrayChildren(i,o);if(s!==null)return s;i=i.parent}return 0}searchInNonArrayChildren(t,o){for(const i of t.children){if(i.isArrayElement)continue;if(i.path===o)return i.spanRow;const s=this.searchInNonArrayChildren(i,o);if(s!==null)return s}return null}_walkUpAndRecord(t,o,i,s){let n=t;for(;n;){if(i.has(n))return;i.add(n),Array.from(this.columns.keys()),o.set(`${t.id}|${n.path}`,n.spanRow);for(const r of n.children)r.isArrayElement?Array.isArray(r.value)&&r.value.length===0&&this._recordEmptyArrayColumns(t,n,r.field,o):(o.set(`${t.id}|${r.path}`,r.spanRow),this._processDeep(t,r,o,i),Array.isArray(r.value)&&r.value.length===0&&this._recordEmptyArrayColumns(t,n,r.field,o));n=n.parent}}_processDeep(t,o,i,s){if(!s.has(o)){s.add(o);for(const n of o.children)n.isArrayElement||(i.set(`${t.id}|${n.path}`,n.spanRow),this._processDeep(t,n,i,s))}}_recordEmptyArrayColumns(t,o,i,s){const n=o.path?`${o.path}.${i}`:i;for(const r of this.columns.keys())r.startsWith(n)&&s.set(`${t.id}|${r}`,o.spanRow)}_collectArrayPaths(t,o){for(const i of t.children)i.isArrayElement&&o.add(i.path),this._collectArrayPaths(i,o)}collectArrayPaths(t){const o=new Set;return this._collectArrayPaths(t,o),o}firstArrayPaths(){const t=this.trees.values().next().value;return t?this.collectArrayPaths(t):null}}class xy{constructor(t,o,i){R(this,"id");R(this,"rootValue");R(this,"spanMatrix");R(this,"leafCells");R(this,"columns");R(this,"data");this.id=t,this.data=o,this.columns=i,this.rootValue=new Bt(this.id,"$",this.data),this._buildPathCells(i),this.rootValue.calcSpan(),this.spanMatrix=new za,this.spanMatrix.setRow(this.id,this.data,{columns:i}),this.leafCells=this.spanMatrix.getLeaves(this.id)}_buildPathCells(t){for(const o of t){const i=o.colId.split(".");let s=this.rootValue;for(let n=0;n<i.length;n++){const r=i[n];if(!O.isArray(s))s=s.pretreatmentValue(r,s,o);else{const l=[];for(const a of s){const d=a.pretreatmentValue(r,a,o);O.isArray(d)?l.push(...d):l.push(d)}s=l}}}}getMaxArrayLength(){return this.spanMatrix.getMaxArrayLength(this.id)}getCell(t,o){const i=t.getColId().split(".");let s=this.rootValue.properties.get(i.shift());if(!s)return;let n=0;O.isArray(s)&&(s=s[o[n]],n++);let r=s;for(const l of i){if(!r)break;if(!O.isArray(r)){const a=r.get(l);O.isArray(a)?(r=a[o[n]],n=n+1):r=a}}return r}getValue(t,o){const i=this.getCell(t,o);if(i)return O.get(this.data,i.path)}setArrayLength(t,o){this.spanMatrix.setArrayLength(this.id,t,o),this.leafCells=this.spanMatrix.getLeaves(this.id)}rebuild(t,o){const i=o??this.columns;this.data=t,this.spanMatrix.setRow(this.id,t,{columns:i}),this.leafCells=this.spanMatrix.getLeaves(this.id);const s=new Bt(this.id,"$",t);for(const n of i){const r=n.colId.split(".");let l=s;for(let a=0;a<r.length;a++){const d=r[a];if(!O.isArray(l))l=l.pretreatmentValue(d,l,n);else{const c=[];for(const u of l){const h=u.pretreatmentValue(d,u,n);O.isArray(h)?c.push(...h):c.push(h)}l=c}}}s.calcSpan(),this.rootValue=s,o&&(this.columns=i)}getSpanMatrix(){return this.spanMatrix}}class mo{constructor(t,o,i,s,n,r){R(this,"id");R(this,"data");R(this,"signature");R(this,"dataModel");R(this,"spanCache");R(this,"columns");R(this,"bridge");R(this,"idMapper");R(this,"dataCache");R(this,"index");this.index=r,this.dataCache=s,this.idMapper=i,this.columns=o,this.bridge=n,this.id=i(t),this.data=t,this.signature=Oe(JSON.stringify(t)),this.buildSpan()}get pathCells(){return this.dataModel.rootValue.properties}get leafCells(){return this.dataModel.leafCells}get spanMatrix(){return this.dataModel.spanMatrix}buildSpan(){this.dataModel=new xy(this.id,this.data,this.columns),this.spanCache=new hn(this.dataModel.leafCells,this.dataModel.spanMatrix,this.id)}getMaxArrayLength(){return this.dataModel.getMaxArrayLength()}getCell(t,o){return this.dataModel.getCell(t,o)}getValue(t,o){return this.dataModel.getValue(t,o)}getSpanMatrix(){return this.dataModel.getSpanMatrix()}setArrayLength(t,o){this.dataModel.setArrayLength(t,o)}delete(){this.dataCache.remove([this])}redraw(){var t;(t=this.bridge)==null||t.redraw(this)}redrawCell(t,o){var i;(i=this.bridge)==null||i.redrawCell(this,t,o)}getDataIndex(){if(this.index===void 0)throw new Error(`row[${this.id}] not ready`);return this.index}getRowSpans(){return this.spanCache}isCellEditing(t,o){return!1}getSignature(){return this.signature}startEditing(t=!1){const o=new Fi(this,this.idMapper,!1);return this.dataCache.replace(o),t&&this.redraw(),o}startEditingCell(t,o,i=!1){const s=new Pi(this,t,o,this.idMapper);return this.dataCache.replace(s),i&&this.redrawCell(t,o),s}__setIndex(t){this.index=t}update(t,o){this.id=t,this.data=o,this.signature=Oe(JSON.stringify(o)),this.dataModel.rebuild(o),this.spanCache=new hn(this.dataModel.leafCells,this.dataModel.spanMatrix,this.id)}isTransient(){return!1}getId(){return this.id}isEditing(){return!1}getData(){return this.data}flat(){return this.dataModel.leafCells.map(t=>new Ot(t.id,this,t.nestingIndexes))}setData(t){this.update(this.idMapper(t),t)}match(t){return this.getId()===t.data.getId()}}class $a{constructor(t){R(this,"rows");R(this,"pageNum",1);R(this,"pageSize",100);R(this,"isFinished",!1);R(this,"idMapper");R(this,"bridge");this.rows=[],this.idMapper=t}createRow(t){var o;return new mo(t,((o=this.bridge)==null?void 0:o.getColumns())??[],this.idMapper,this,this.bridge)}setRows(t){return this.rows=t,this}replace(t){this.rows[t.getDataIndex()]=t}remove(t){var i;const o=new Set(t.map(s=>s.getId()));this.rows=this.rows.filter(s=>!o.has(s.getId())),(i=this.bridge)==null||i.reload()}getRows(){return this.rows??[]}appendRows(t){if(!this.rows){this.setRows(t);return}this.rows.push(...t)}insertRows(t,o=0){if(!this.rows){this.setRows(t);return}this.rows.splice(o,0,...t)}deleteRows(t){const o=new Set(t.map(i=>O.isString(i)?i:i.getId()));this.rows=this.rows.filter(i=>!o.has(i.getId()))}}const Ua={getContextMenuItems:void 0},Dy=e=>e instanceof mo||e instanceof Ot?!0:e instanceof Fi,Fy=e=>e instanceof mo,Ti="_",Ka=1;class ja{static createRowNode(t,o,i={}){return{...t,__id:o(t),...i}}static generateId(t){if(t.length===0)throw new Error("传入标识数组为空无法生成ID");return t.join(Ti)}static getId(t){return t.__id?t.__id.split(Ti)[0]:t.id}static getSignature(t){return t.__signature}static getFlatIndex(t,o=Ka){if(!t.__id)throw new Error("不包含有效的ID信息");const i=t.__id.split(Ti);if(i.length===1)throw new Error(`${i} 不包含索引信息`);const s=i[o];if(!s)throw new Error(`${i} deep[${o}] 不包含索引信息`);const n=Number.parseInt(s);if(!Number.isFinite(n))throw new TypeError(`${s} 不是一个正确的数组索引`);return n}static ValueGetter(t){return console.warn("deprecated GridUtils.ValueGetter 现在只需要正常使用valueGetter了"),o=>{if(!(o.data.id&&typeof o.data.id=="string"&&o.data.id.includes("footer-")))return t(o)}}static spanRow(t,o,i){const s=t[o];return!s||s.length===0?t:s.map((n,r)=>({...t,__id:`${i??t.id}_${r}`,rowSpan:r===0?s.length:0}))}static isGroupColDef(t){return!!t.children}}const qa=(e,t,o,i,s)=>{const n=E.ref(t),r=E.ref(),l=E.ref(!1),a=(g,p)=>{if(n.value)return n.value;const f=p??[];if(!g){const w=Oe(f.join(","));return n.value=w,w}const C=e.getInstanceName(g);C&&f.push(C);const m=e.getParentInstance(g);return a(m,f)},d=g=>{const p=localStorage.getItem(g);if(!(!p||p==="undefined"))return JSON.parse(p)},c=O.debounce(()=>{const g=a(s);localStorage.setItem(g,JSON.stringify(o.value.getColumnState()))},200),u=async()=>{const g=a(s),p=d(g);if(p&&p.length>0){const f=p.filter(C=>{var m;return!((m=C.colId)!=null&&m.includes("ag-Grid-SelectionColumn"))});o.value.applyColumnState({state:f,applyOrder:!0}),l.value=!0}},h=()=>O.sumBy(o.value.getAllDisplayedVirtualColumns().map(g=>g.getActualWidth()));return{storeGridState:c,restoreGridState:u,resetGridState:()=>{o.value.applyColumnState({state:r.value,applyOrder:!0})},initGridState:()=>{const g=a(s);if(r.value=o.value.getColumnState(),!localStorage.getItem(`${g}-initial`)){const p=h();i.value>p&&o.value.sizeColumnsToFit()}},isStateInitialized:l}},wo=e=>{if(e.id)return`${e.id}`.split("_")[0]},Ya=e=>{const{options:t,elRef:o,editable:i,onRowChange:s,onMessageError:n,findOtherEditingCell:r,isCellEditable:l}=e;let a;const d=h=>{o.value&&o.value.querySelectorAll(`.row_${h}`).forEach(g=>{g.classList.add("row-hover")})},c=h=>{o.value&&o.value.querySelectorAll(`.row_${h}`).forEach(g=>{g.classList.remove("row-hover")})},u=(h,g)=>{var C;if(!h||!o.value)return!1;const p=h;if(!p||typeof p.contains!="function")return!1;const f=o.value.querySelectorAll(`.row_${g}`);for(let m=0;m<f.length;m++){const w=f[m];if(w===p||(C=w.contains)!=null&&C.call(w,p))return!0}return!1};return{...t,onCellMouseOver(h){var p,f,C;const g=wo(h.node);if(!g){(p=t.onCellMouseOver)==null||p.call(t,h);return}u((f=h.event)==null?void 0:f.relatedTarget,g)||(a&&a!==g&&c(a),a=g,d(g),(C=t.onCellMouseOver)==null||C.call(t,h))},onCellMouseOut(h){var p;const g=wo(h.node);g&&(u((p=h.event)==null?void 0:p.relatedTarget,g)||a===g&&(c(g),a=void 0))},onCellClicked(h){if(i==="cell"&&h.data instanceof Ot){if(l&&!l(h.column,h.node))return;const g=h.data.getActualRow(),p=r==null?void 0:r(h.node.id);if(g instanceof Pi){const f=g.getEditingColumn(),C=g.getRowId();if(s==null)throw new Error("可编辑单元格必须配置保存能力");if(f.getId()==h.column.getId()&&C===h.node.id)return;s(g).then(()=>{g.stopEditing(!0);const m=g.getSourceRow();m.setData(g.getData()),m.startEditingCell(h.node.id,h.column,!0)}).catch(m=>{n==null||n(`单元格[${h.column.getColDef().headerName}]保存失败: `+m.message)})}else if(g instanceof mo)if(p){if(s==null)throw new Error("可编辑单元格必须配置保存能力");s(p).then(()=>{p.stopEditing(!0),p.getSourceRow().setData(p.getData()),g.startEditingCell(h.node.id,h.column,!0)}).catch(f=>{n==null||n(`单元格[${h.column.getColDef().headerName}]保存失败: `+f.message)})}else g.startEditingCell(h.node.id,h.column,!0)}},onRowSelected(h){var C;const g=wo(h.node),p=h.api.getRenderedNodes().filter(m=>wo(m)===g),f=h.node.isSelected();p.forEach(m=>{m.setSelected(!!f,!1,"api")}),(C=t==null?void 0:t.onRowSelected)==null||C.call(t,h)},getRowClass(h){var f;const g=(f=t==null?void 0:t.getRowClass)==null?void 0:f.call(t,h),p=[];return g&&(O.isArray(g)?p.push(...g):p.push(g)),p.push(`row_${wo(h.node)}`),p},onRowDoubleClicked(h){i==="row"&&(h.data.isEditing()||h.data.startEditing())}}},Za={"cell-span":({data:e,column:t})=>e.getRowSpan(t)>0,"cell-span-hide":({data:e,column:t})=>e.getRowSpan(t)===0},Qa={"cell-span":({data:e,column:t})=>e.getRowSpan(t)>0,"cell-span-hide":({data:e,column:t})=>e.getRowSpan(t)===0},gn=(e,t)=>({...e,...t??{}});class Vt{constructor(t,o,i,s=[],n){R(this,"context");R(this,"endRow");R(this,"filterModel");R(this,"sortModel");R(this,"startRow");R(this,"dataCache");R(this,"pageNum");R(this,"pageSize");R(this,"onError");this.pageNum=t,this.pageSize=o,this.sortModel=s,this.startRow=(t-1)*o,this.endRow=this.startRow+this.pageSize,this.dataCache=i,this.onError=n}static from(t,o,i,s){const n=o??i.pageSize;return new Vt(t,n,i,[],s)}static nextPage(t,o){return new Vt(t.pageNum+1,t.pageSize,t,[],o)}failCallback(){var t;(t=this.onError)==null||t.call(this,"表格数据加载失败,请重试")}successCallback(t){(O.isEmpty(t)||t.length<this.pageSize)&&(this.dataCache.isFinished=!0),this.pageNum===1?this.dataCache.setRows((t??[]).map(o=>this.dataCache.createRow(o))):this.dataCache.appendRows((t??[]).map(o=>this.dataCache.createRow(o))),this.dataCache.pageNum=this.pageNum}}const Xa=e=>{const t=s=>{const n=s.getLastDisplayedRowIndex();return s.getDisplayedRowCount()-1===n},o=({direction:s,api:n})=>{s==="vertical"&&t(n)&&i()},i=()=>{var s;(s=e==null?void 0:e.onVScrollEnd)==null||s.call(e)};return{onBodyScrollEnd:o}};class Py{constructor(t){R(this,"gridApi");this.gridApi=t}reload(){this.gridApi.getGridOption("context").reload()}redraw(t){const o=this.gridApi.getRenderedNodes().filter(i=>{var s;return((s=i.data)==null?void 0:s.getId())===t.getId()});this.gridApi.getGridOption("context").reload(),this.gridApi.redrawRows({rowNodes:o})}redrawCell(t,o,i){const s=this.gridApi.getRenderedNodes().filter(n=>{var r;return((r=n.data)==null?void 0:r.getId())===o});this.gridApi.getGridOption("context").reload(),this.gridApi.refreshCells({rowNodes:s,columns:[i],force:!0,suppressFlash:!0})}getColumns(){return this.gridApi.getAllGridColumns().map(t=>{var i,s;const o=(s=(i=t.getColDef)==null?void 0:i.call(t))==null?void 0:s.cellDataType;return{colId:t.getColId(),cellDataType:typeof o=="string"?o:void 0}})}}const Ja=(e,t)=>{var T;const o=E.ref(),i=E.ref(),s=E.ref({height:`calc(100% - ${e.footerHeight??0}px)`,width:"100%"}),n=new Set(["columnSizing","columnVisibility","columnPinning","columnOrder"]),r=E.ref(0),l=E.ref(),{onBodyScrollEnd:a}=Xa({onVScrollEnd(){u.value.getRows(Vt.nextPage(c.value,e.onError))}}),d=({data:F})=>F.id,c=E.ref(new $a(e.rowIdMapper)),u=E.ref(new _a(e.rowData,c.value)),{initGridState:h,resetGridState:g,storeGridState:p,restoreGridState:f}=qa(e.instanceCtx,e.id,o,l,e.currentInstance),C=async F=>{D(),c.value.pageSize=e.pageSize,c.value.bridge=new Py(F.api),u.value.api=F.api,F.api.getAllGridColumns(),o.value=F.api,h(),await f(),await I(),F.api.setGridOption("popupParent",document.querySelector("body"))},m=()=>{u.value.loadData()},w=async(F,G=0)=>{c.value.insertRows(F,G),m()},S=F=>c.value.getRows().some(G=>G.getId()===F.getId()),v=()=>c.value.getRows(),b=()=>{var te,Se;const F=i.value.querySelector(".ag-body-viewport"),G=Number.parseFloat(F.querySelector(".ag-center-cols-container").style.height),_=i.value.querySelector(".ag-header").offsetHeight,Z=(Se=(te=i.value.querySelector(".ag-overlay-no-rows-wrapper"))==null?void 0:te.querySelector(".el-empty"))==null?void 0:Se.offsetHeight;G<r.value?s.value.height=`${_+(Z||G)+(e.footerHeight?2:11)}px`:s.value.height.includes("100%")||(s.value.height=`calc(100% - ${e.footerHeight??0}px)`)},D=()=>{const F=i.value.querySelector(".ag-body-viewport");l.value=F.offsetWidth,r.value=F.offsetHeight},I=()=>new Promise((F,G)=>{c.value.isFinished=!1;const _=Vt.from(1,c.value.pageSize,c.value,e.onError);_.context={resolve:F,reject:G},u.value.getRows(_),u.value.api.getDisplayedRowCount()>0&&u.value.api.ensureIndexVisible(0)}),B=E.computed(()=>({onGridReady:C,onBodyScrollEnd:a,scrollbarWidth:8,getRowId:d,columnDefs:e.columns,preventDefaultOnContextMenu:!0,suppressRowTransform:!0,suppressRowHoverHighlight:!0,selectionColumnDef:{pinned:"left",rowSpan:({data:F,column:G})=>F.getRowSpan(G),cellClassRules:gn(Za,e.gridOptions.rowClassRules)},defaultColGroupDef:{marryChildren:!0},onStateUpdated(F){F.sources.some(G=>n.has(G))&&p()},onSortChanged(F){F.source==="uiColumnSorted"&&p()},context:{refresh:I,reload:m},onRowDataUpdated(){E.nextTick(()=>{b()})},defaultColDef:{rowSpan({column:F,data:G}){return G.getRowSpan(F)},cellClassRules:gn(Qa,e.gridOptions.rowClassRules),suppressFloatingFilterButton:!0,enableCellChangeFlash:!0,tooltipValueGetter(F){return F.valueFormatted},resizable:!0,sortable:!1,headerComponent:"HeaderRenderer",cellRenderer:"CellRenderer",valueGetter({column:F,data:G}){return G.getValue(F)},valueFormatter({value:F}){return F}},...Ya({options:e.gridOptions??{},elRef:i,editable:e.editable,onRowChange:e.onRowChange,onMessageError:e.onError,findOtherEditingCell:F=>c.value.getRows().find(G=>G instanceof Pi&&G.getRowId()!==F),isCellEditable:(F,G)=>{var Z;const _=(Z=F.getColDef)==null?void 0:Z.call(F);return typeof(_==null?void 0:_.editable)=="function"?_.editable({column:F,colDef:_,node:G,data:G.data}):(_==null?void 0:_.editable)!==!1}}),onBodyScroll(F){P.left=F.left,P.top=F.top},...Ua})),P={left:0,top:0};return(T=t==null?void 0:t.onActivated)==null||T.call(t,()=>{}),{gridOptions:B,datasource:u,gridStyles:s,dataCache:c,gridApi:o,gridElRef:i,resetGridState:g,reload:m,insertRows:w,existRow:S,getRows:v,refresh:I}},ed=(e,t,o)=>{const i=E.ref(),s=E.ref([{}]),n=E.computed(()=>e.footerHeight?{height:`${e.footerHeight+10}px`}:{});E.watch(()=>[s.value,i.value],()=>{var d;s.value&&i.value&&((d=i.value)==null||d.setGridOption("rowData",s.value.map((c,u)=>({id:`footer-${u}`,...c}))))});const r=d=>!!d.children,l=d=>{var c;return r(d)?{headerName:d.headerName,groupId:d.groupId,children:[...d.children.map(u=>l(u))]}:{width:d.width,headerName:d.headerName,field:d.field,cellRendererParams:{render:(c=d.cellRendererParams)==null?void 0:c.footerRender}}},a=E.computed(()=>({scrollbarWidth:8,suppressRowTransform:!0,suppressRowHoverHighlight:!0,columnDefs:e.columns.map(d=>l(d)),defaultColGroupDef:{marryChildren:!0},rowSelection:e.gridOptions.rowSelection?{mode:"singleRow",isRowSelectable:()=>!1,hideDisabledCheckboxes:!0}:void 0,rowHeight:e.footerHeight,headerHeight:0,alwaysShowVerticalScroll:o.value.height.includes("100%"),defaultColDef:{suppressFloatingFilterButton:!0,cellRenderer:"FooterCellRender",enableCellChangeFlash:!0,tooltipValueGetter(d){return d.value}},onGridReady(d){i.value=d.api,d.api.setGridOption("popupParent",document.querySelector("body"))},alignedGrids:()=>{const d=t.value;if(!d)return[];const c=d.api??(typeof d.addEventListener=="function"?d:void 0);return c?[c]:[]}}));return{setFooterData:d=>{s.value=d},footerGridApi:i,footerData:s,footerStyles:n,footerGridOptions:a}};class Ty extends x{constructor(){super(...arguments);R(this,"beanName","selectionColSvc");R(this,"columns")}postConstruct(){this.addManagedPropertyListener("rowSelection",o=>{this.onSelectionOptionsChanged(o.currentValue,o.previousValue,bt(o.source))}),this.addManagedPropertyListener("selectionColumnDef",this.updateColumns.bind(this))}addColumns(o){const i=this.columns;i!=null&&(o.list=i.list.concat(o.list),o.tree=i.tree.concat(o.tree),_c(o))}createColumns(o,i){var u,h;const s=()=>{var g;zo(this.beans,(g=this.columns)==null?void 0:g.tree),this.columns=null},n=o.treeDepth,r=(((u=this.columns)==null?void 0:u.treeDepth)??-1)==n,l=this.generateSelectionCols();if(Nc(l,((h=this.columns)==null?void 0:h.list)??[])&&r)return;s();const{colGroupSvc:a}=this.beans,d=(a==null?void 0:a.findDepth(o.tree))??0,c=(a==null?void 0:a.balanceTreeForAutoCols(l,d))??[];this.columns={list:l,tree:c,treeDepth:d,map:{}},i(g=>{if(!g)return null;const p=g.filter(f=>!tt(f));return[...l,...p]})}updateColumns(o){var s;const i=bt(o.source);(s=this.columns)==null||s.list.forEach(n=>{const r=this.createSelectionColDef(o.currentValue);n.setColDef(r,null,i),we(this.beans,{state:[{...r,colId:n.getColId()}]},i)})}getColumn(o){var i;return((i=this.columns)==null?void 0:i.list.find(s=>wr(s,o)))??null}getColumns(){var o;return((o=this.columns)==null?void 0:o.list)??null}isSelectionColumnEnabled(){var a,d;const{gos:o,beans:i}=this,s=o.get("rowSelection");if(typeof s!="object"||!Qe(o))return!1;const n=(((d=(a=i.autoColSvc)==null?void 0:a.getColumns())==null?void 0:d.length)??0)>0;if(s.checkboxLocation==="autoGroupColumn"&&n)return!1;const r=!!wt(s),l=Lo(s);return r||l}createSelectionColDef(o){const{gos:i}=this,s=o??i.get("selectionColumnDef"),n=i.get("enableRtl"),{rowSpan:r,spanRows:l,...a}=s??{};return{width:50,resizable:!1,suppressHeaderMenuButton:!0,sortable:!1,suppressMovable:!0,lockPosition:n?"right":"left",comparator(d,c,u,h){const g=u.isSelected(),p=h.isSelected();return g===p?0:g?1:-1},editable:!1,suppressFillHandle:!0,pinned:"left",rowSpan:r,...a,colId:pr,chartDataType:"excluded"}}generateSelectionCols(){if(!this.isSelectionColumnEnabled())return[];const o=this.createSelectionColDef(),i=o.colId;this.gos.validateColDef(o,i,!0);const s=new We(o,null,i,!1);return this.createBean(s),[s]}onSelectionOptionsChanged(o,i,s){const n=i&&typeof i!="string"?wt(i):void 0,r=o&&typeof o!="string"?wt(o):void 0,l=n!==r,a=i&&typeof i!="string"?Lo(i):void 0,d=o&&typeof o!="string"?Lo(o):void 0,c=a!==d,u=Go(o),h=Go(i);(l||c||u!==h)&&this.beans.colModel.refreshAll(s)}destroy(){var o;zo(this.beans,(o=this.columns)==null?void 0:o.tree),super.destroy()}refreshVisibility(o,i,s){var a,d;if(!((a=this.columns)!=null&&a.list.length))return;const n=o.length+i.length+s.length;if(n===0)return;const r=this.columns.list[0];if(!r.isVisible())return;const l=()=>{let c;switch(r.pinned){case"left":case!0:c=o;break;case"right":c=s;break;default:c=i}c&&me(c,r)};((d=this.beans.rowNumbersSvc)!=null&&d.getColumn(fr)?2:1)===n&&l()}}const Ii="34.1.1";function td(e){const t=e.get("rowSelection");return typeof t=="object"&&t.masterSelects||"self"}function Ai(e){return!!(e.rowPinned&&e.pinnedSibling)}function Iy(e,t=!0){const o=e.get("rowSelection");return typeof o!="object"?t?"all":void 0:o.mode==="multiRow"?o.selectAll:"all"}function od(e,t){return t===void 0?e("ariaIndeterminate","indeterminate"):t===!0?e("ariaChecked","checked"):e("ariaUnchecked","unchecked")}function Ce(e,t,o,i){const s=t==="top";if(!o)return Ce(e,t,s?e.getPinnedTopRow(0):e.getPinnedBottomRow(0),i);if(!i){const a=s?e.getPinnedTopRowCount():e.getPinnedBottomRowCount();return Ce(e,t,o,s?e.getPinnedTopRow(a-1):e.getPinnedBottomRow(a-1))}let n=!1,r=!1;const l=[];return e.forEachPinnedRow(t,a=>{if(a===o&&!n){n=!0,l.push(a);return}if(n&&a===i){r=!0,l.push(a);return}n&&!r&&l.push(a)}),l}function pn(e){return(e==null?void 0:e.hideDisabledCheckboxes)??!1}function id(e){const t=e.get("rowSelection")??"single";if(typeof t=="string"){const o=e.get("suppressRowClickSelection"),i=e.get("suppressRowDeselection");return o&&i?!1:o?"enableDeselection":i?"enableSelection":!0}return t.mode==="singleRow"||t.mode==="multiRow"?t.enableClickSelection??!1:!1}function Ay(e){const t=id(e);return t===!0||t==="enableDeselection"}function My(e){const t=id(e);return t===!0||t==="enableSelection"}function ky(e){const t=e.get("rowSelection");return typeof t=="string"?e.get("rowMultiSelectWithClick"):(t==null?void 0:t.enableSelectionWithoutKeys)??!1}function Ly(e,t){var n;if(!t.nodes.every(r=>r.rowPinned&&!Ai(r)?(k(59),!1):r.id===void 0?(k(60),!1):!0))return;const{nodes:o,source:i,newValue:s}=t;(n=e.selectionSvc)==null||n.setNodesSelected({nodes:o,source:i??"api",newValue:s})}function Gy(e,t,o="apiSelectAll"){var i;(i=e.selectionSvc)==null||i.selectAllRowNodes({source:o,selectAll:t})}function Hy(e,t,o="apiSelectAll"){var i;(i=e.selectionSvc)==null||i.deselectAllRowNodes({source:o,selectAll:t})}function Oy(e){var t;return((t=e.selectionSvc)==null?void 0:t.getSelectedNodes())??[]}function By(e){var t;return((t=e.selectionSvc)==null?void 0:t.getSelectedRows())??[]}const Vy={tag:"div",cls:"ag-selection-checkbox",role:"presentation",children:[{tag:"ag-checkbox",ref:"eCheckbox",role:"presentation"}]};class Ny extends U{constructor(){super(Vy,[Gs]);R(this,"eCheckbox",A);R(this,"rowNode");R(this,"column");R(this,"overrides")}postConstruct(){this.eCheckbox.setPassive(!0)}onDataChanged(){this.onSelectionChanged()}onSelectableChanged(){this.showOrHideSelect()}onSelectionChanged(){const o=this.getLocaleTextFunc(),{rowNode:i,eCheckbox:s}=this,n=i.isSelected(),r=od(o,n),[l,a]=i.selectable?["ariaRowToggleSelection","Press Space to toggle row selection"]:["ariaRowSelectionDisabled","Row Selection is disabled for this row"],d=o(l,a);s.setValue(n,!0),s.setInputAriaLabel(`${d} (${r})`)}init(o){if(this.rowNode=o.rowNode,this.column=o.column,this.overrides=o.overrides,this.onSelectionChanged(),this.addManagedListeners(this.eCheckbox.getInputElement(),{dblclick:vt,click:i=>{var s;vt(i),(s=this.beans.selectionSvc)==null||s.handleSelectionEvent(i,this.rowNode,"checkboxSelected")}}),this.addManagedListeners(this.rowNode,{rowSelected:this.onSelectionChanged.bind(this),dataChanged:this.onDataChanged.bind(this),selectableChanged:this.onSelectableChanged.bind(this)}),this.addManagedPropertyListener("rowSelection",({currentValue:i,previousValue:s})=>{const n=typeof i=="object"?pn(i):void 0,r=typeof s=="object"?pn(s):void 0;n!==r&&this.onSelectableChanged()}),rs(this.gos)||typeof this.getIsVisible()=="function"){const i=this.showOrHideSelect.bind(this);this.addManagedEventListeners({displayedColumnsChanged:i}),this.addManagedListeners(this.rowNode,{dataChanged:i,cellChanged:i}),this.showOrHideSelect()}this.eCheckbox.getInputElement().setAttribute("tabindex","-1")}showOrHideSelect(){const{column:o,rowNode:i,overrides:s,gos:n}=this,r=i.selectable,l=this.getIsVisible();let a;if(typeof l=="function"){const g=s==null?void 0:s.callbackParams;if(!o)a=l({...g,node:i,data:i.data});else{const p=o.createColumnFunctionCallbackParams(i);a=l({...g,...p})}}else a=l??!1;const d=r&&!a||!r&&a,c=r||a,u=n.get("rowSelection"),h=u&&typeof u!="string"?!pn(u):!!(o!=null&&o.getColDef().showDisabledCheckboxes);if(this.setVisible(c&&(d?h:!0)),this.setDisplayed(c&&(d?h:!0)),c&&this.eCheckbox.setDisabled(d),s==null?void 0:s.removeHidden){this.setDisplayed(c);return}}getIsVisible(){var s,n;const o=this.overrides;if(o)return o.isVisible;const i=this.gos.get("rowSelection");return i&&typeof i!="string"?wt(i):(n=(s=this.column)==null?void 0:s.getColDef())==null?void 0:n.checkboxSelection}}class _y{constructor(t,o){R(this,"rowModel");R(this,"pinnedRowModel");R(this,"selectAll",!1);R(this,"rootId",null);R(this,"endId",null);R(this,"cachedRange",[]);this.rowModel=t,this.pinnedRowModel=o}reset(){this.rootId=null,this.endId=null,this.cachedRange.length=0}setRoot(t){this.rootId=t.id,this.endId=null,this.cachedRange.length=0}setEndRange(t){this.endId=t.id,this.cachedRange.length=0}getRange(){if(this.cachedRange.length===0){const t=this.getRoot(),o=this.getEnd();if(t==null||o==null)return this.cachedRange;this.cachedRange=this.getNodesInRange(t,o)??[]}return this.cachedRange}isInRange(t){return this.rootId===null?!1:this.getRange().some(o=>o.id===t.id)}getRoot(t){if(this.rootId)return this.getRowNode(this.rootId);if(t)return this.setRoot(t),t}getEnd(){if(this.endId)return this.getRowNode(this.endId)}getRowNode(t){let o;const{rowModel:i,pinnedRowModel:s}=this;return o??(o=i.getRowNode(t)),s!=null&&s.isManual()&&(o??(o=s.getPinnedRowById(t,"top")),o??(o=s.getPinnedRowById(t,"bottom"))),o}truncate(t){const o=this.getRange();if(o.length===0)return{keep:[],discard:[]};const i=o[0].id===this.rootId,s=o.findIndex(n=>n.id===t.id);if(s>-1){const n=o.slice(0,s),r=o.slice(s+1);return this.setEndRange(t),i?{keep:n,discard:r}:{keep:r,discard:n}}else return{keep:o,discard:[]}}extend(t,o=!1){const i=this.getRoot();if(i==null){const n=this.getRange().slice();return o&&t.depthFirstSearch(r=>!r.group&&n.push(r)),n.push(t),this.setRoot(t),{keep:n,discard:[]}}const s=this.getNodesInRange(i,t);if(!s)return this.setRoot(t),{keep:[t],discard:[]};if(s.find(n=>n.id===this.endId))return this.setEndRange(t),{keep:this.getRange(),discard:[]};{const n=this.getRange().slice();return this.setEndRange(t),{keep:this.getRange(),discard:n}}}getNodesInRange(t,o){const{pinnedRowModel:i,rowModel:s}=this;if(!(i!=null&&i.isManual()))return s.getNodesInRangeForSelection(t,o);if(t.rowPinned==="top"&&!o.rowPinned)return Ce(i,"top",t,void 0).concat(s.getNodesInRangeForSelection(s.getRow(0),o)??[]);if(t.rowPinned==="bottom"&&!o.rowPinned){const n=Ce(i,"bottom",void 0,t),r=s.getRowCount(),l=s.getRow(r-1);return(s.getNodesInRangeForSelection(o,l)??[]).concat(n)}if(!t.rowPinned&&!o.rowPinned)return s.getNodesInRangeForSelection(t,o);if(t.rowPinned==="top"&&o.rowPinned==="top")return Ce(i,"top",t,o);if(t.rowPinned==="bottom"&&o.rowPinned==="top"){const n=Ce(i,"top",o,void 0),r=Ce(i,"bottom",void 0,t),l=s.getRow(0),a=s.getRow(s.getRowCount()-1);return n.concat(s.getNodesInRangeForSelection(l,a)??[]).concat(r)}if(!t.rowPinned&&o.rowPinned==="top")return Ce(i,"top",o,void 0).concat(s.getNodesInRangeForSelection(s.getRow(0),t)??[]);if(t.rowPinned==="top"&&o.rowPinned==="bottom"){const n=Ce(i,"top",t,void 0),r=Ce(i,"bottom",void 0,o),l=s.getRow(0),a=s.getRow(s.getRowCount()-1);return n.concat(s.getNodesInRangeForSelection(l,a)??[]).concat(r)}if(t.rowPinned==="bottom"&&o.rowPinned==="bottom")return Ce(i,"bottom",t,o);if(!t.rowPinned&&o.rowPinned==="bottom"){const n=Ce(i,"bottom",void 0,o),r=s.getRow(s.getRowCount());return(s.getNodesInRangeForSelection(t,r)??[]).concat(n)}return null}}class Wy extends x{constructor(o){super();R(this,"column");R(this,"cbSelectAllVisible",!1);R(this,"processingEventFromCheckbox",!1);R(this,"headerCellCtrl");R(this,"cbSelectAll");this.column=o}onSpaceKeyDown(o){const i=this.cbSelectAll;i.isDisplayed()&&!i.getGui().contains(j(this.beans))&&(o.preventDefault(),i.setValue(!i.getValue()))}getCheckboxGui(){return this.cbSelectAll.getGui()}setComp(o){this.headerCellCtrl=o;const i=this.createManagedBean(new wl);this.cbSelectAll=i,i.addCss("ag-header-select-all"),Be(i.getGui(),"presentation"),this.showOrHideSelectAll();const s=this.updateStateOfCheckbox.bind(this);this.addManagedEventListeners({newColumnsLoaded:()=>this.showOrHideSelectAll(),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this),selectionChanged:s,paginationChanged:s,modelUpdated:s}),this.addManagedPropertyListener("rowSelection",({currentValue:n,previousValue:r})=>{const l=a=>typeof a=="string"||!a||a.mode==="singleRow"?void 0:a.selectAll;l(n)!==l(r)&&this.showOrHideSelectAll(),this.updateStateOfCheckbox()}),this.addManagedListeners(i,{fieldValueChanged:this.onCbSelectAll.bind(this)}),i.getInputElement().setAttribute("tabindex","-1"),this.refreshSelectAllLabel()}onDisplayedColumnsChanged(o){this.isAlive()&&this.showOrHideSelectAll(o.source==="uiColumnMoved")}showOrHideSelectAll(o=!1){const i=this.isCheckboxSelection();this.cbSelectAllVisible=i,this.cbSelectAll.setDisplayed(i),i&&(this.checkRightRowModelType("selectAllCheckbox"),this.checkSelectionType("selectAllCheckbox"),this.updateStateOfCheckbox()),this.refreshSelectAllLabel(o)}updateStateOfCheckbox(){if(!this.cbSelectAllVisible||this.processingEventFromCheckbox)return;this.processingEventFromCheckbox=!0;const o=this.getSelectAllMode(),i=this.beans.selectionSvc,s=this.cbSelectAll,n=i.getSelectAllState(o);s.setValue(n);const r=i.hasNodesToSelect(o);s.setDisabled(!r),this.refreshSelectAllLabel(),this.processingEventFromCheckbox=!1}refreshSelectAllLabel(o=!1){const i=this.getLocaleTextFunc(),{headerCellCtrl:s,cbSelectAll:n,cbSelectAllVisible:r}=this,l=n.getValue(),a=od(i,l),d=i("ariaRowSelectAll","Press Space to toggle all rows selection");s.setAriaDescriptionProperty("selectAll",r?`${d} (${a})`:null),n.setInputAriaLabel(i("ariaHeaderSelection","Column with Header Selection")),o||s.announceAriaDescription()}checkSelectionType(o){return Qt(this.gos)?!0:(k(128,{feature:o}),!1)}checkRightRowModelType(o){const{gos:i,rowModel:s}=this.beans;return oe(i)||Mo(i)?!0:(k(129,{feature:o,rowModel:s.getType()}),!1)}onCbSelectAll(){if(this.processingEventFromCheckbox||!this.cbSelectAllVisible)return;const o=this.cbSelectAll.getValue(),i=this.getSelectAllMode();let s="uiSelectAll";i==="currentPage"?s="uiSelectAllCurrentPage":i==="filtered"&&(s="uiSelectAllFiltered");const n={source:s,selectAll:i},r=this.beans.selectionSvc;o?r.selectAllRowNodes(n):r.deselectAllRowNodes(n)}isCheckboxSelection(){const{column:o,gos:i,beans:s}=this,n=typeof i.get("rowSelection")=="object"?"headerCheckbox":"headerCheckboxSelection";return sd(s,o)&&this.checkRightRowModelType(n)&&this.checkSelectionType(n)}getSelectAllMode(){const o=Iy(this.gos,!1);if(o)return o;const{headerCheckboxSelectionCurrentPageOnly:i,headerCheckboxSelectionFilteredOnly:s}=this.column.getColDef();return i?"currentPage":s?"filtered":"all"}destroy(){super.destroy(),this.cbSelectAll=void 0,this.headerCellCtrl=void 0}}function sd({gos:e,selectionColSvc:t},o){const i=e.get("rowSelection"),s=o.getColDef(),{headerCheckboxSelection:n}=s;let r=!1;if(typeof i=="object"){const l=tt(o),a=mr(o);(Go(i)==="autoGroupColumn"&&a||l&&(t!=null&&t.isSelectionColumnEnabled()))&&(r=Lo(i))}else typeof n=="function"?r=n(N(e,{column:o,colDef:s})):r=!!n;return r}class zy extends x{constructor(){super(...arguments);R(this,"isRowSelectable");R(this,"selectionCtx")}postConstruct(){const{gos:o,beans:i}=this;this.selectionCtx=new _y(i.rowModel,i.pinnedRowModel),this.addManagedPropertyListeners(["isRowSelectable","rowSelection"],()=>{const s=rs(o);s!==this.isRowSelectable&&(this.isRowSelectable=s,this.updateSelectable())}),this.isRowSelectable=rs(o),this.addManagedEventListeners({cellValueChanged:s=>this.updateRowSelectable(s.node),rowNodeDataChanged:s=>this.updateRowSelectable(s.node)})}destroy(){super.destroy(),this.selectionCtx.reset()}createCheckboxSelectionComponent(){return new Ny}createSelectAllFeature(o){if(sd(this.beans,o))return new Wy(o)}isMultiSelect(){return Qt(this.gos)}onRowCtrlSelected(o,i,s){const n=!!o.rowNode.isSelected();o.forEachGui(s,r=>{r.rowComp.toggleCss("ag-row-selected",n);const l=r.element;Hi(l,n),l.contains(j(this.beans))&&i(r)})}announceAriaRowSelection(o){var n;if(this.isRowSelectionBlocked(o))return;const i=o.isSelected();if(!o.selectable)return;const s=this.getLocaleTextFunc()(i?"ariaRowDeselect":"ariaRowSelect",`Press SPACE to ${i?"deselect":"select"} this row`);(n=this.beans.ariaAnnounce)==null||n.announceValue(s,"rowSelection")}isRowSelectionBlocked(o){return!o.selectable||o.rowPinned&&!Ai(o)||!Qe(this.gos)}updateRowSelectable(o,i){var n;const s=o.rowPinned&&o.pinnedSibling?o.pinnedSibling.selectable:((n=this.isRowSelectable)==null?void 0:n.call(this,o))??!0;return this.setRowSelectable(o,s,i),s}setRowSelectable(o,i,s){if(o.selectable!==i){if(o.selectable=i,o.dispatchRowEvent("selectableChanged"),s)return;if(Xt(this.gos)){const n=this.calculateSelectedFromChildren(o);this.setNodesSelected({nodes:[o],newValue:n??!1,source:"selectableChanged"});return}o.isSelected()&&!o.selectable&&this.setNodesSelected({nodes:[o],newValue:!1,source:"selectableChanged"})}}calculateSelectedFromChildren(o){var n;let i=!1,s=!1;if(!((n=o.childrenAfterGroup)!=null&&n.length))return o.selectable?o.__selected:null;for(let r=0;r<o.childrenAfterGroup.length;r++){const l=o.childrenAfterGroup[r];let a=l.isSelected();if(!l.selectable){const d=this.calculateSelectedFromChildren(l);if(d===null)continue;a=d}switch(a){case!0:i=!0;break;case!1:s=!0;break;default:return}}if(!(i&&s))return i?!0:s?!1:o.selectable?o.__selected:null}selectRowNode(o,i,s,n="api"){const r=!o.selectable&&i,l=o.__selected===i;if(r||l)return!1;o.__selected=i,o.dispatchRowEvent("rowSelected");const a=o.sibling;a&&a.footer&&a.__localEventService&&a.dispatchRowEvent("rowSelected");const d=o.pinnedSibling;return d&&d.rowPinned&&d.__localEventService&&d.dispatchRowEvent("rowSelected"),this.eventSvc.dispatchEvent({...Oh(o,this.gos,"rowSelected"),event:s||null,source:n}),!0}isCellCheckboxSelection(o,i){const s=this.gos.get("rowSelection");if(s&&typeof s!="string"){const n=tt(o)&&wt(s);return o.isColumnFunc(i,n)}else return o.isColumnFunc(i,o.colDef.checkboxSelection)}inferNodeSelections(o,i,s,n){const{gos:r,selectionCtx:l}=this,a=o.isSelected(),d=Xt(r),c=My(r),u=Ay(r),h=this.isMultiSelect(),g=n==="rowClicked";if(g&&!(c||u))return null;if(i&&s&&h){const p=l.getRoot();if(p)if(p.isSelected()){const f=l.isInRange(o)?l.truncate(o):l.extend(o,d);return{deselect:f.discard,select:f.keep,reset:!1}}else{const f=l.extend(o,d);return{select:[],deselect:f.keep,reset:!1}}else return null}else if(i&&h){const p=l.selectAll?this.beans.rowModel.getRow(0):void 0,f=l.getRoot(p),C=l.isInRange(o)?l.truncate(o):l.extend(o,d);return{select:C.keep,deselect:C.discard,reset:l.selectAll||!!(f&&!f.isSelected())}}else if(s){if(g){const p=!a;return p&&!c||!p&&!u?null:(l.setRoot(o),{node:o,newValue:p,clearSelection:!1})}return l.setRoot(o),{node:o,newValue:!a,clearSelection:!h}}else{l.setRoot(o);const p=ky(r),f=Oo(r)==="filteredDescendants",C=g&&(!p||!c);if(f&&a===void 0&&oe(r))return{node:o,newValue:!1,clearSelection:!h||C};if(g){const m=a?!p:c;return m===a&&!C||m&&!c||!m&&!u?null:{node:o,newValue:m,clearSelection:!h||C,keepDescendants:o.group&&d}}return{node:o,newValue:!a,clearSelection:!h||C}}}}class $y extends zy{constructor(){super(...arguments);R(this,"beanName","selectionSvc");R(this,"selectedNodes",new Map);R(this,"detailSelection",new Map);R(this,"groupSelectsDescendants");R(this,"groupSelectsFiltered");R(this,"mode");R(this,"masterSelectsDetail",!1)}postConstruct(){super.postConstruct();const{gos:o}=this;this.mode=Ho(o),this.groupSelectsDescendants=Xt(o),this.groupSelectsFiltered=Oo(o)==="filteredDescendants",this.masterSelectsDetail=td(o)==="detail",this.addManagedPropertyListeners(["groupSelectsChildren","groupSelectsFiltered","rowSelection"],()=>{const i=Xt(o),s=Ho(o),n=Oo(o)==="filteredDescendants";this.masterSelectsDetail=td(o)==="detail",(i!==this.groupSelectsDescendants||n!==this.groupSelectsFiltered||s!==this.mode)&&(this.deselectAllRowNodes({source:"api"}),this.groupSelectsDescendants=i,this.groupSelectsFiltered=n,this.mode=s)}),this.addManagedEventListeners({rowSelected:this.onRowSelected.bind(this)})}destroy(){super.destroy(),this.resetNodes()}handleSelectionEvent(o,i,s){if(this.isRowSelectionBlocked(i))return 0;const n=this.inferNodeSelections(i,o.shiftKey,o.metaKey||o.ctrlKey,s);return n==null?0:(this.selectionCtx.selectAll=!1,"select"in n?(n.reset?this.resetNodes():this.selectRange(n.deselect,!1,s),this.selectRange(n.select,!0,s)):this.setNodesSelected({nodes:[n.node],newValue:n.newValue,clearSelection:n.clearSelection,keepDescendants:n.keepDescendants,event:o,source:s}))}setNodesSelected({newValue:o,clearSelection:i,suppressFinishActions:s,nodes:n,event:r,source:l,keepDescendants:a=!1}){var c;if(!Qe(this.gos)&&o)return k(132),0;if(n.length===0)return 0;if(n.length>1&&!this.isMultiSelect())return k(130),0;let d=0;for(let u=0;u<n.length;u++){const h=n[u],g=Nt(h),p=this.groupSelectsFiltered&&g.group;if(g.rowPinned&&!Ai(g)){k(59);continue}if(g.id===void 0){k(60);continue}p||this.selectRowNode(g,o,r,l)&&(this.detailSelection.delete(g.id),d++),this.groupSelectsDescendants&&((c=g.childrenAfterGroup)!=null&&c.length)&&(d+=this.selectChildren(g,o,l))}return s||(n.length===1&&l==="api"&&this.selectionCtx.setRoot(Nt(n[0])),o&&(i||!this.isMultiSelect())&&(d+=this.clearOtherNodes(Nt(n[0]),a,l)),d>0&&(this.updateGroupsFromChildrenSelections(l),this.dispatchSelectionChanged(l))),d}selectRange(o,i,s){let n=0;return o.forEach(r=>{const l=Nt(r);l.group&&this.groupSelectsDescendants||this.selectRowNode(l,i,void 0,s)&&n++}),n>0&&(this.updateGroupsFromChildrenSelections(s),this.dispatchSelectionChanged(s)),n}selectChildren(o,i,s){const n=this.groupSelectsFiltered?o.childrenAfterAggFilter:o.childrenAfterGroup;return n?this.setNodesSelected({newValue:i,clearSelection:!1,suppressFinishActions:!0,source:s,nodes:n}):0}getSelectedNodes(){return Array.from(this.selectedNodes.values())}getSelectedRows(){const o=[];return this.selectedNodes.forEach(i=>i.data&&o.push(i.data)),o}getSelectionCount(){return this.selectedNodes.size}filterFromSelection(o){const i=new Map;this.selectedNodes.forEach((s,n)=>{o(s)&&i.set(n,s)}),this.selectedNodes=i}updateGroupsFromChildrenSelections(o,i){if(!this.groupSelectsDescendants)return!1;const{gos:s,rowModel:n}=this.beans;if(!oe(s))return!1;const r=n.rootNode;if(!r)return!1;i||(i=new Ci(!0,r),i.active=!1);let l=!1;return i.forEachChangedNodeDepthFirst(a=>{if(a!==r){const d=this.calculateSelectedFromChildren(a);l=this.selectRowNode(a,d===null?!1:d,void 0,o)||l}}),l}clearOtherNodes(o,i,s){const n=new Map;let r=0;return this.selectedNodes.forEach(l=>{const a=l.id==o.id;if((!i||!Ky(o,l))&&!a){const d=this.selectedNodes.get(l.id);r+=this.setNodesSelected({nodes:[d],newValue:!1,clearSelection:!1,suppressFinishActions:!0,source:s}),this.groupSelectsDescendants&&l.parent&&n.set(l.parent.id,l.parent)}}),n.forEach(l=>{const a=this.calculateSelectedFromChildren(l);this.selectRowNode(l,a===null?!1:a,void 0,s)}),r}onRowSelected(o){const i=o.node;this.groupSelectsDescendants&&i.group||(i.isSelected()?this.selectedNodes.set(i.id,i):this.selectedNodes.delete(i.id))}syncInRowNode(o,i){this.syncInOldRowNode(o,i),this.syncInNewRowNode(o)}createDaemonNode(o){if(!o.id)return;const i=new so(this.beans);return i.id=o.id,i.data=o.data,i.__daemon=!0,i.__selected=o.__selected,i.level=o.level,i}syncInOldRowNode(o,i){i&&o.id!==i.id&&this.selectedNodes.get(i.id)==o&&this.selectedNodes.set(i.id,i)}syncInNewRowNode(o){this.selectedNodes.has(o.id)?(o.__selected=!0,this.selectedNodes.set(o.id,o)):o.__selected=!1}reset(o){const i=this.getSelectionCount();this.resetNodes(),i&&this.dispatchSelectionChanged(o)}resetNodes(){this.selectedNodes.forEach(o=>{this.selectRowNode(o,!1)}),this.selectedNodes.clear()}getBestCostNodeSelection(){const{gos:o,rowModel:i}=this.beans;if(!oe(o))return;const s=i.getTopLevelNodes();if(s===null)return;const n=[];function r(l){for(let a=0,d=l.length;a<d;a++){const c=l[a];c.isSelected()?n.push(c):c.group&&c.childrenAfterGroup&&r(c.childrenAfterGroup)}}return r(s),n}isEmpty(){return this.getSelectionCount()===0}deselectAllRowNodes({source:o,selectAll:i}){const s=oe(this.gos);let n=!1;const r=l=>{const a=this.selectRowNode(Nt(l),!1,void 0,o);n||(n=a)};if(i==="currentPage"||i==="filtered"){if(!s){z(102);return}this.getNodesToSelect(i).forEach(r)}else this.selectedNodes.forEach(r),this.reset(o);if(this.selectionCtx.selectAll=!1,s&&this.groupSelectsDescendants){const l=this.updateGroupsFromChildrenSelections(o);n||(n=l)}n&&this.dispatchSelectionChanged(o)}getSelectedCounts(o){let i=0,s=0;return this.getNodesToSelect(o).forEach(n=>{this.groupSelectsDescendants&&n.group||(n.isSelected()?i++:n.selectable&&s++)}),{selectedCount:i,notSelectedCount:s}}getSelectAllState(o){const{selectedCount:i,notSelectedCount:s}=this.getSelectedCounts(o);return nd(i,s)??null}hasNodesToSelect(o){return this.getNodesToSelect(o).filter(i=>i.selectable).length>0}getNodesToSelect(o){if(!this.canSelectAll())return[];const i=[],s=r=>i.push(r);if(o==="currentPage")return this.forEachNodeOnPage(r=>{if(!r.group){s(r);return}if(!r.expanded&&!r.footer){const l=a=>{var d;s(a),(d=a.childrenAfterFilter)==null||d.forEach(l)};l(r);return}this.groupSelectsDescendants||s(r)}),i;const n=this.beans.rowModel;return o==="filtered"?(n.forEachNodeAfterFilter(s),i):(n.forEachNode(s),i)}forEachNodeOnPage(o){const{pageBounds:i,rowModel:s}=this.beans,n=i.getFirstRow(),r=i.getLastRow();for(let l=n;l<=r;l++){const a=s.getRow(l);a&&o(a)}}selectAllRowNodes(o){const{gos:i,selectionCtx:s}=this;if(!Qe(i)){k(132);return}if(Sc(i)&&!Qt(i)){k(130);return}if(!this.canSelectAll())return;const{source:n,selectAll:r}=o;let l=!1;if(this.getNodesToSelect(r).forEach(a=>{const d=this.selectRowNode(Nt(a),!0,void 0,n);l||(l=d)}),s.selectAll=!0,oe(i)&&this.groupSelectsDescendants){const a=this.updateGroupsFromChildrenSelections(n);l||(l=a)}l&&this.dispatchSelectionChanged(n)}getSelectionState(){return this.isEmpty()?null:Array.from(this.selectedNodes.keys())}setSelectionState(o,i,s){if(o||(o=[]),!Array.isArray(o)){z(103);return}const n=new Set(o),r=[];this.beans.rowModel.forEachNode(l=>{n.has(l.id)&&r.push(l)}),s&&this.resetNodes(),this.setNodesSelected({newValue:!0,nodes:r,source:i})}canSelectAll(){const{gos:o}=this.beans;return!!oe(o)}updateSelectable(o){var c;const{gos:i,rowModel:s}=this.beans;if(!Qe(i))return;const n="selectableChanged",r=o!==void 0,l=oe(i)&&this.groupSelectsDescendants,a=[],d=u=>{var h;if(!(r&&!u.group)){if(l&&u.group){const g=((h=u.childrenAfterGroup)==null?void 0:h.some(p=>p.selectable))??!1;this.setRowSelectable(u,g,!0);return}!this.updateRowSelectable(u,!0)&&u.isSelected()&&a.push(u)}};if(l){if(o===void 0){const u=s.rootNode;o=u?new Ci(!1,u):void 0}o==null||o.forEachChangedNodeDepthFirst(d,!r,!r)}else s.forEachNode(d);a.length&&this.setNodesSelected({nodes:a,newValue:!1,source:n}),!r&&l&&((c=this.updateGroupsFromChildrenSelections)==null||c.call(this,n))}updateSelectableAfterGrouping(o){var i;this.updateSelectable(o),this.groupSelectsDescendants&&((i=this.updateGroupsFromChildrenSelections)!=null&&i.call(this,"rowGroupChanged",o))&&this.dispatchSelectionChanged("rowGroupChanged")}refreshMasterNodeState(o,i){var r,l;if(!this.masterSelectsDetail)return;const s=(l=(r=o.detailNode)==null?void 0:r.detailGridInfo)==null?void 0:l.api;if(!s)return;const n=Uy(s);if(o.isSelected()!==n&&this.selectRowNode(o,n,i,"masterDetail")&&this.dispatchSelectionChanged("masterDetail"),!n){const a=this.detailSelection.get(o.id)??new Set;for(const d of s.getSelectedNodes())a.add(d.id);this.detailSelection.set(o.id,a)}}setDetailSelectionState(o,i,s){if(this.masterSelectsDetail){if(!Qt(i)){k(269);return}switch(o.isSelected()){case!0:{s.selectAll();break}case!1:{s.deselectAll();break}case void 0:{const n=this.detailSelection.get(o.id);if(n){const r=[];for(const l of n){const a=s.getRowNode(l);a&&r.push(a)}s.setNodesSelected({nodes:r,newValue:!0,source:"masterDetail"})}break}}}}dispatchSelectionChanged(o){this.eventSvc.dispatchEvent({type:"selectionChanged",source:o,selectedNodes:this.getSelectedNodes(),serverSideState:null})}}function Nt(e){return Ai(e)?e.pinnedSibling:e.footer?e.sibling:e}function Uy(e){let t=0,o=0;return e.forEachNode(i=>{i.isSelected()?t++:i.selectable&&o++}),nd(t,o)}function nd(e,t){if(e===0&&t===0)return!1;if(!(e>0&&t>0))return e>0}function Ky(e,t){let o=t.parent;for(;o;){if(o===e)return!0;o=o.parent}return!1}const rd={moduleName:"SharedRowSelection",version:Ii,beans:[Ty],apiFunctions:{setNodesSelected:Ly,selectAll:Gy,deselectAll:Hy,getSelectedNodes:Oy,getSelectedRows:By}},ld={moduleName:"RowSelection",version:Ii,rowModels:["clientSide","infinite","viewport"],beans:[$y],dependsOn:[rd]},jy="ROOT_NODE_ID";class qy extends x{constructor(){super(...arguments);R(this,"nextId",0);R(this,"allNodesMap",{});R(this,"rootNode",null)}getRowNode(o){return this.allNodesMap[o]}extractRowData(){var o,i;return(i=(o=this.rootNode)==null?void 0:o.allLeafChildren)==null?void 0:i.map(s=>s.data)}activate(o){this.rootNode=o,o.group=!0,o.level=-1,o.id=jy,o.allLeafChildren=[],o.childrenAfterGroup=[],o.childrenAfterSort=[],o.childrenAfterAggFilter=[],o.childrenAfterFilter=[],this.updateRootSiblingArrays(o)}deactivate(){this.rootNode&&(this.allNodesMap={},this.rootNode=null)}destroy(){super.destroy(),this.allNodesMap={},this.rootNode=null}setNewRowData(o){const i=this.rootNode;i&&(this.dispatchRowDataUpdateStartedEvent(o),i.childrenAfterFilter=null,i.childrenAfterGroup=null,i.childrenAfterAggFilter=null,i.childrenAfterSort=null,i.childrenMapped=null,i.updateHasChildren(),this.allNodesMap={},this.nextId=0,this.loadNewRowData(o),this.updateRootSiblingArrays(i))}updateRootSiblingArrays(o){const i=o.sibling;i&&(i.childrenAfterFilter=o.childrenAfterFilter,i.childrenAfterGroup=o.childrenAfterGroup,i.childrenAfterAggFilter=o.childrenAfterAggFilter,i.childrenAfterSort=o.childrenAfterSort,i.childrenMapped=o.childrenMapped,i.allLeafChildren=o.allLeafChildren)}loadNewRowData(o){this.rootNode.allLeafChildren=(o==null?void 0:o.map((i,s)=>this.createRowNode(i,s)))??[]}setImmutableRowData(o,i){var C;const s=ko(this.gos),n=!this.gos.get("suppressMaintainUnsortedOrder"),r=o.changedRowNodes,l=new Set,a=this.rootNode,d=a.allLeafChildren,c=d.length;let u=!1,h=!1,g=!1,p=!1;for(let m=0,w=-1,S=i.length;m<S;m++){const v=i[m];let b=this.getRowNode(s({data:v,level:0}));if(!b)u=!0,b=this.createRowNode(v,-1),r.add(b);else{if(n){const D=b.sourceRowIndex;p||(p=D<=w||u),w=D}b.data!==v&&(g=!0,b.updateData(v),r.update(b))}l.add(b)}const f=[];for(let m=0;m<c;m++){const w=d[m];l.has(w)||(h=!0,w.isSelected()&&f.push(w),w.pinnedSibling&&((C=this.beans.pinnedRowModel)==null||C.pinRow(w.pinnedSibling,null)),this.rowNodeDeleted(w),r.remove(w))}if(u||h||p){const m=new Array(l.size);let w=0;if(!n)for(let v=0;v<c;++v){const b=d[v];l.delete(b)&&(b.sourceRowIndex=w,m[w++]=b)}for(const v of l)v.sourceRowIndex=w,m[w++]=v;a.allLeafChildren=m;const S=a.sibling;S&&(S.allLeafChildren=m),o.rowNodesOrderChanged||(o.rowNodesOrderChanged=p)}(u||h||p||g)&&(this.deselectNodes(f),o.rowDataUpdated=!0)}rowNodeDeleted(o){o.clearRowTopAndRowIndex();const i=o.id,s=this.allNodesMap;s[i]===o&&delete s[i]}updateRowData(o,i){this.dispatchRowDataUpdateStartedEvent(o.add);const s={changedRowNodes:i,rowNodeTransaction:{remove:[],update:[],add:[]},rowsInserted:!1},n=[],r=ko(this.gos);return this.executeRemove(r,o,s,n),this.executeUpdate(r,o,s,n),this.executeAdd(o,s),this.deselectNodes(n),s}executeAdd(o,i){var h;const s=o.add;if(!(s!=null&&s.length))return;let n=this.rootNode.allLeafChildren,r=n.length;if(typeof o.addIndex=="number"&&(r=this.sanitizeAddIndex(o.addIndex),r>0&&this.gos.get("treeData")&&this.gos.get("getDataPath"))){for(let g=0;g<n.length;g++)if(((h=n[g])==null?void 0:h.rowIndex)==r-1){r=g+1;break}}const l=s.length,a=i.changedRowNodes,d=new Array(l);for(let g=0;g<l;g++){const p=this.createRowNode(s[g],r+g);a.add(p),d[g]=p}const c=this.rootNode;if(r<n.length){const g=n.slice(0,r),p=n.slice(r,n.length),f=g.length+d.length;for(let C=0,m=p.length;C<m;++C)p[C].sourceRowIndex=f+C;n=[...g,...d,...p],i.rowsInserted=!0}else n=n.concat(d);c.allLeafChildren=n;const u=c.sibling;u&&(u.allLeafChildren=n),i.rowNodeTransaction.add=d}executeRemove(o,i,{changedRowNodes:s,rowNodeTransaction:n},r){var u,h;const{remove:l}=i;if(!(l!=null&&l.length))return;const a={};l.forEach(g=>{var f;const p=this.lookupRowNode(o,g);p&&(p.isSelected()&&r.push(p),p.pinnedSibling&&((f=this.beans.pinnedRowModel)==null||f.pinRow(p.pinnedSibling,null)),p.clearRowTopAndRowIndex(),a[p.id]=!0,delete this.allNodesMap[p.id],n.remove.push(p),s.remove(p))});const d=this.rootNode;d.allLeafChildren=((u=d.allLeafChildren)==null?void 0:u.filter(g=>!a[g.id]))??null,(h=d.allLeafChildren)==null||h.forEach((g,p)=>{g.sourceRowIndex=p});const c=d.sibling;c&&(c.allLeafChildren=d.allLeafChildren)}executeUpdate(o,i,{changedRowNodes:s,rowNodeTransaction:n},r){const{update:l}=i;l!=null&&l.length&&l.forEach(a=>{const d=this.lookupRowNode(o,a);d&&(d.updateData(a),!d.selectable&&d.isSelected()&&r.push(d),n.update.push(d),s.update(d))})}dispatchRowDataUpdateStartedEvent(o){this.eventSvc.dispatchEvent({type:"rowDataUpdateStarted",firstRowData:o!=null&&o.length?o[0]:null})}deselectNodes(o){var r;const i="rowDataChanged",s=this.beans.selectionSvc,n=o.length>0;n&&(s==null||s.setNodesSelected({newValue:!1,nodes:o,suppressFinishActions:!0,source:i})),(r=s==null?void 0:s.updateGroupsFromChildrenSelections)==null||r.call(s,i),n&&this.eventSvc.dispatchEvent({type:"selectionChanged",source:i,selectedNodes:(s==null?void 0:s.getSelectedNodes())??null,serverSideState:null})}sanitizeAddIndex(o){var s;const i=((s=this.rootNode.allLeafChildren)==null?void 0:s.length)??0;return o<0||o>=i||Number.isNaN(o)?i:Math.ceil(o)}createRowNode(o,i){const s=new so(this.beans);return s.parent=this.rootNode,s.level=0,s.group=!1,s.expanded=!1,s.sourceRowIndex=i,s.setDataAndId(o,String(this.nextId)),this.allNodesMap[s.id]&&k(2,{nodeId:s.id}),this.allNodesMap[s.id]=s,this.nextId++,s}lookupRowNode(o,i){var n,r;let s;if(o){const l=o({data:i,level:0});if(s=this.allNodesMap[l],!s)return z(4,{id:l}),null}else if(s=(r=(n=this.rootNode)==null?void 0:n.allLeafChildren)==null?void 0:r.find(l=>l.data===i),!s)return z(5,{data:i}),null;return s||null}}class Yy extends qy{constructor(){super(...arguments);R(this,"beanName","csrmNodeSvc")}}class fn{constructor(){R(this,"removals",new Set);R(this,"updates",new Set);R(this,"adds",new Set)}remove(t){this.adds.delete(t)||(this.updates.delete(t),this.removals.add(t))}update(t){this.adds.has(t)||this.updates.add(t)}add(t){this.adds.add(t)}}function Zy(e){e.sibling&&(e.sibling.childrenAfterFilter=e.childrenAfterFilter)}function Qy(e){if($(e.childrenAfterSort))return;const t=e.childrenAfterSort;for(let o=0;o<t.length;o++){const i=t[o],s=o===0,n=o===e.childrenAfterSort.length-1;i.setFirstChild(s),i.lastChild!==n&&(i.lastChild=n,i.dispatchRowEvent("lastChildChanged")),i.childIndex!==o&&(i.childIndex=o,i.dispatchRowEvent("childIndexChanged"))}}function ad(e){e.sibling&&(e.sibling.childrenAfterSort=e.childrenAfterSort),Qy(e)}class Xy extends x{constructor(){super(...arguments);R(this,"beanName","sortStage");R(this,"refreshProps",new Set(["postSortRows","groupDisplayType","accentedSort"]));R(this,"step","sort")}execute(o){const i=this.beans,s=i.sortSvc.getSortOptions(),n=M(s)&&s.length>0,r=n&&!!o.changedRowNodes&&this.gos.get("deltaSort"),l=s.some(({column:a})=>Re(i.gos)?a.isPrimary()&&a.isRowGroupActive():!!a.getColDef().showRowGroup);this.sort(i,s,n,r,o.changedRowNodes,o.changedPath,l)}sort(o,i,s,n,r,l,a){const{gos:d,colModel:c,rowGroupColsSvc:u,rowNodeSorter:h,rowRenderer:g,showRowGroupCols:p}=o,f=d.get("groupMaintainOrder"),C=c.getCols().some(b=>b.isRowGroupActive()),m=c.isPivotMode(),w=d.getCallback("postSortRows");let S=!1;const v=b=>{var P,T,F;const D=m&&b.leafGroup,I=f&&C&&!b.leafGroup&&!a;let B;if(I){const G=((T=(P=u==null?void 0:u.columns)==null?void 0:P[b.level+1])==null?void 0:T.getSort())===null,_=b.childrenAfterAggFilter.slice(0);if(b.childrenAfterSort&&!G){const Z={};b.childrenAfterSort.forEach((te,Se)=>{Z[te.id]=Se}),_.sort((te,Se)=>(Z[te.id]??0)-(Z[Se.id]??0))}B=_}else!s||D?B=b.childrenAfterAggFilter.slice(0):n&&r?B=Jy(h,b,r,l,i):B=b.childrenAfterAggFilter.slice(0);if(S||(S=((F=b.childrenAfterSort)==null?void 0:F[0])!==B[0]),b.childrenAfterSort=B,ad(b),w){const G={nodes:b.childrenAfterSort};w(G)}};if(l==null||l.forEachChangedNodeDepthFirst(v),S&&this.gos.get("groupHideOpenParents")){const b=p==null?void 0:p.getShowRowGroupCols();b!=null&&b.length&&g.refreshCells({columns:b,force:!0})}}}function Jy(e,t,o,i,s){const n=t.childrenAfterAggFilter,r=t.childrenAfterSort;if(!r)return e.doFullSort(n,s);const l=new Set,a=[],{updates:d,adds:c}=o;for(let h=0,g=n.length;h<g;++h){const p=n[h];d.has(p)||c.has(p)||i&&!i.canSkip(p)?a.push({currentPos:a.length,rowNode:p}):l.add(p.id)}const u=r.filter(h=>l.has(h.id)).map((h,g)=>({currentPos:g,rowNode:h}));return a.sort((h,g)=>e.compareRowNodes(s,h,g)),eR(e,s,a,u)}function eR(e,t,o,i){const s=[];let n=0,r=0;const l=o.length,a=i.length;for(;n<l&&r<a;){const d=o[n],c=i[r],u=e.compareRowNodes(t,d,c);let h;u<0?(h=d,++n):(h=c,++r),s.push(h.rowNode)}for(;n<l;)s.push(o[n++].rowNode);for(;r<a;)s.push(i[r++].rowNode);return s}class tR extends x{constructor(){super(...arguments);R(this,"beanName","rowModel");R(this,"colModel");R(this,"valueCache");R(this,"filterStage");R(this,"sortStage");R(this,"flattenStage");R(this,"groupStage");R(this,"aggStage");R(this,"pivotStage");R(this,"filterAggStage");R(this,"rootNode",null);R(this,"rowsToDisplay",[]);R(this,"nodeManager");R(this,"rowDataTransactionBatch");R(this,"rowDataUpdatedPending",!1);R(this,"applyAsyncTransactionsTimeout");R(this,"started",!1);R(this,"isRefreshingModel",!1);R(this,"rowNodesCountReady",!1);R(this,"rowCountReady",!1);R(this,"orderedStages");R(this,"onRowHeightChanged_debounced",he(this,this.onRowHeightChanged.bind(this),100))}wireBeans(o){this.colModel=o.colModel,this.valueCache=o.valueCache,this.filterStage=o.filterStage,this.sortStage=o.sortStage,this.flattenStage=o.flattenStage,this.groupStage=o.groupStage,this.aggStage=o.aggStage,this.pivotStage=o.pivotStage,this.filterAggStage=o.filterAggStage}postConstruct(){this.orderedStages=[this.groupStage,this.filterStage,this.pivotStage,this.aggStage,this.sortStage,this.filterAggStage,this.flattenStage].filter(n=>!!n);const o=this.refreshModel.bind(this,{step:"group"}),i=this.refreshModel.bind(this,{step:"group",afterColumnsChanged:!0,keepRenderedRows:!0,animate:!this.gos.get("suppressAnimationFrame")});this.addManagedEventListeners({newColumnsLoaded:i,columnRowGroupChanged:o,columnValueChanged:this.onValueChanged.bind(this),columnPivotChanged:this.refreshModel.bind(this,{step:"pivot"}),filterChanged:this.onFilterChanged.bind(this),sortChanged:this.onSortChanged.bind(this),columnPivotModeChanged:o,gridStylesChanged:this.onGridStylesChanges.bind(this),gridReady:this.onGridReady.bind(this)}),this.addPropertyListeners(),this.rootNode=new so(this.beans);const s=this.getNewNodeManager();this.nodeManager=s,s.activate(this.rootNode)}getNewNodeManager(){const{gos:o,beans:i}=this;return xc(o)==="treeNested"&&i.csrmChildrenTreeNodeSvc||i.csrmNodeSvc}addPropertyListeners(){const o=["treeData","treeDataChildrenField",...this.orderedStages.flatMap(({refreshProps:i})=>[...i])];this.addManagedPropertyListeners(o,i=>{var n;const s=(n=i.changeSet)==null?void 0:n.properties;s&&this.onPropChange(s)}),this.addManagedPropertyListener("rowData",()=>this.onPropChange(["rowData"])),this.addManagedPropertyListener("rowHeight",()=>this.resetRowHeights())}start(){this.started=!0,this.rowNodesCountReady?this.refreshModel({step:"group",rowDataUpdated:!0,newData:!0}):this.setInitialData()}setInitialData(){this.gos.get("rowData")&&this.onPropChange(["rowData"])}ensureRowHeightsValid(o,i,s,n){let r,l=!1;do{r=!1;const a=this.getRowIndexAtPixel(o),d=this.getRowIndexAtPixel(i),c=Math.max(a,s),u=Math.min(d,n);for(let h=c;h<=u;h++){const g=this.getRow(h);if(g.rowHeightEstimated){const p=_e(this.beans,g);g.setRowHeight(p.height),r=!0,l=!0}}r&&this.setRowTopAndRowIndex()}while(r);return l}onPropChange(o){if(!this.rootNode)return;const i=this.gos,s=new Set(o),n={step:"nothing",changedProps:s},r=s.has("rowData"),l=this.nodeManager,a=this.getNewNodeManager(),d=l!==a||r&&s.has("treeData")&&i.get("treeData")||s.has("treeDataChildrenField")&&i.get("treeData");let c;if((d||r)&&(c=i.get("rowData"),c!=null&&!Array.isArray(c)&&(c=null,k(1))),d&&(r||(c=(l==null?void 0:l.extractRowData())??c),l!==a&&(l==null||l.deactivate(),this.nodeManager=a),a.activate(this.rootNode)),c)if(!d&&!this.isEmpty()&&c.length>0&&i.exists("getRowId")&&!i.get("resetRowDataOnUpdate"))n.keepRenderedRows=!0,n.animate=!this.gos.get("suppressAnimationFrame"),n.changedRowNodes=new fn,a.setImmutableRowData(n,c);else{n.rowDataUpdated=!0,n.newData=!0;const{selectionSvc:u,pinnedRowModel:h}=this.beans;u==null||u.reset("rowDataChanged"),h!=null&&h.isManual()&&h.reset(),this.rowNodesCountReady=!0,a.setNewRowData(c)}if(n.rowDataUpdated)n.step="group";else if(n.step==="nothing"){for(const{refreshProps:u,step:h}of this.orderedStages)if(o.some(g=>u.has(g))){n.step=h;break}}n.step!=="nothing"&&this.refreshModel(n)}setRowTopAndRowIndex(){const{beans:o,rowsToDisplay:i}=this,s=o.environment.getDefaultRowHeight();let n=0;const r=new Set,l=J(this.gos,"normal");for(let a=0,d=i.length;a<d;++a){const c=i[a];if(c.id!=null&&r.add(c.id),c.rowHeight==null){const u=_e(o,c,l,s);c.setRowHeight(u.height,u.estimated)}c.setRowTop(n),c.setRowIndex(a),n+=c.rowHeight}return r}clearRowTopAndRowIndex(o,i){const s=o.active,n=l=>{l&&l.id!=null&&!i.has(l.id)&&l.clearRowTopAndRowIndex()},r=l=>{if(l!==null&&(n(l),n(l.detailNode),n(l.sibling),l.hasChildren()&&l.childrenAfterGroup)){const a=l.level==-1;s&&!a&&!l.expanded||l.childrenAfterGroup.forEach(r)}};r(this.rootNode)}isLastRowIndexKnown(){return!0}getRowCount(){return this.rowsToDisplay?this.rowsToDisplay.length:0}getTopLevelRowCount(){const o=this.rootNode;if(!o||this.rowsToDisplay.length===0)return 0;if(this.rowsToDisplay&&this.rowsToDisplay[0]===o)return 1;const i=o.childrenAfterSort,s=o.sibling&&o.sibling.displayed?1:0;return(i?i.length:0)+s}getTopLevelRowDisplayedIndex(o){const{rootNode:i,rowsToDisplay:s}=this;if(!i||!s.length||s[0]===i)return o;const{childrenAfterSort:n}=i,r=a=>{let d=n[a];if(this.gos.get("groupHideOpenParents"))for(;d.expanded&&d.childrenAfterSort&&d.childrenAfterSort.length>0;)d=d.childrenAfterSort[0];return d.rowIndex},{footerSvc:l}=this.beans;return l?l.getTopDisplayIndex(s,o,n,r):r(o)}getTopLevelIndexFromDisplayedIndex(o){var l;const{rootNode:i,rowsToDisplay:s}=this;if(!i||!s.length||s[0]===i)return o;let n=this.getRow(o);for(n.footer&&(n=n.sibling);n.parent&&n.parent!==i;)n=n.parent;const r=(l=i.childrenAfterSort)==null?void 0:l.findIndex(a=>a===n);return r===-1?o:r??o}getRowBounds(o){const i=this.rowsToDisplay[o];return i?{rowTop:i.rowTop,rowHeight:i.rowHeight}:null}onRowGroupOpened(){const o=mt(this.gos);this.refreshModel({step:"map",keepRenderedRows:!0,animate:o})}onFilterChanged(o){if(o.afterDataChange)return;const i=mt(this.gos),s=o.columns.length===0||o.columns.some(n=>n.isPrimary())?"filter":"filter_aggregates";this.refreshModel({step:s,keepRenderedRows:!0,animate:i})}onSortChanged(){const o=mt(this.gos);this.refreshModel({step:"sort",keepRenderedRows:!1,animate:o})}getType(){return"clientSide"}onValueChanged(){this.refreshModel({step:this.colModel.isPivotActive()?"pivot":"aggregate"})}createChangePath(o){const i=new Ci(!1,this.rootNode);return o||(i.active=!1),i}isSuppressModelUpdateAfterUpdateTransaction(o){if(!this.gos.get("suppressModelUpdateAfterUpdateTransaction"))return!1;const{changedRowNodes:i,newData:s,rowDataUpdated:n}=o;return!(!i||s||!n||i.removals.size||i.adds.size)}refreshModel(o){var l,a,d;if(!this.rootNode)return;const i=this.beans;let s=!!o.rowDataUpdated;const n=o.changedPath??(o.changedPath=this.createChangePath(!o.newData&&s));if(this.started&&s&&this.eventSvc.dispatchEvent({type:"rowDataUpdated"}),this.rowDataUpdatedPending||(this.rowDataUpdatedPending=s),!this.started||this.isRefreshingModel||this.colModel.changeEventsDispatching||this.isSuppressModelUpdateAfterUpdateTransaction(o))return;switch(this.rowDataUpdatedPending&&(this.rowDataUpdatedPending=!1,o.rowDataUpdated=s=!0),this.isRefreshingModel=!0,(l=i.masterDetailSvc)==null||l.refreshModel(o),s&&o.step!=="group"&&((a=i.colFilter)==null||a.refreshModel()),o.step){case"group":(this.doRowGrouping(o)||s)&&((d=i.colFilter)==null||d.refreshModel()),!this.rowCountReady&&this.rowNodesCountReady&&(this.rowCountReady=!0,this.eventSvc.dispatchEventOnce({type:"rowCountReady"}));case"filter":this.doFilter(n);case"pivot":this.doPivot(n);case"aggregate":this.doAggregate(n);case"filter_aggregates":this.doFilterAggregates(n);case"sort":this.doSort(o.changedRowNodes,n);case"map":this.doRowsToDisplay()}const r=this.setRowTopAndRowIndex();this.clearRowTopAndRowIndex(n,r),this.isRefreshingModel=!1,this.eventSvc.dispatchEvent({type:"modelUpdated",animate:o.animate,keepRenderedRows:o.keepRenderedRows,newData:o.newData,newPage:!1,keepUndoRedoStack:o.keepUndoRedoStack})}isEmpty(){var o,i,s;return!((i=(o=this.rootNode)==null?void 0:o.allLeafChildren)!=null&&i.length)||!((s=this.colModel)!=null&&s.ready)}isRowsToRender(){return this.rowsToDisplay.length>0}getNodesInRangeForSelection(o,i){let s=!1,n=!1;const r=[],l=Xt(this.gos);return this.forEachNodeAfterFilterAndSort(a=>{if(!n){if(s&&(a===i||a===o)&&(n=!0,a.group&&l)){r.push(...a.allLeafChildren);return}if(!s){if(a!==i&&a!==o)return;s=!0}if(!a.group||!l){r.push(a);return}}}),r}getTopLevelNodes(){var o;return((o=this.rootNode)==null?void 0:o.childrenAfterGroup)??null}getRow(o){return this.rowsToDisplay[o]}isRowPresent(o){return this.rowsToDisplay.indexOf(o)>=0}getRowIndexAtPixel(o){const i=this.rowsToDisplay;if(this.isEmpty()||i.length===0)return-1;let s=0,n=i.length-1;if(o<=0)return 0;if(W(i).rowTop<=o)return i.length-1;let r=-1,l=-1;for(;;){const a=Math.floor((s+n)/2),d=i[a];if(this.isRowInPixel(d,o)||(d.rowTop<o?s=a+1:d.rowTop>o&&(n=a-1),r===s&&l===n))return a;r=s,l=n}}isRowInPixel(o,i){const s=o.rowTop,n=o.rowTop+o.rowHeight;return s<=i&&n>i}forEachLeafNode(o){var i,s;(s=(i=this.rootNode)==null?void 0:i.allLeafChildren)==null||s.forEach((n,r)=>o(n,r))}forEachNode(o,i=!1){this.depthFirstSearchRowNodes(o,i)}forEachDisplayedNode(o){this.rowsToDisplay.forEach(o)}forEachNodeAfterFilter(o,i=!1){this.depthFirstSearchRowNodes(o,i,s=>s.childrenAfterAggFilter)}forEachNodeAfterFilterAndSort(o,i=!1){this.depthFirstSearchRowNodes(o,i,s=>s.childrenAfterSort)}forEachPivotNode(o,i=!1,s=!1){const{colModel:n,rowGroupColsSvc:r}=this.beans;if(!n.isPivotMode())return;if(!(r!=null&&r.columns.length)){o(this.rootNode,0);return}const l=s?"childrenAfterSort":"childrenAfterGroup";this.depthFirstSearchRowNodes(o,i,a=>a.leafGroup?null:a[l])}depthFirstSearchRowNodes(o,i=!1,s=l=>l.childrenAfterGroup,n=this.rootNode,r=0){let l=r;if(!n)return l;const a=n===this.rootNode;a||o(n,l++);const{footerSvc:d}=this.beans;if(n.hasChildren()&&!n.footer){const c=s(n);if(c){l=(d==null?void 0:d.addTotalRows(l,n,o,i,a,"top"))??l;for(const u of c)l=this.depthFirstSearchRowNodes(o,i,s,u,l);return(d==null?void 0:d.addTotalRows(l,n,o,i,a,"bottom"))??l}}return l}doAggregate(o){var s;const i=this.rootNode;i&&((s=this.aggStage)==null||s.execute({rowNode:i,changedPath:o}))}doFilterAggregates(o){const i=this.rootNode;this.filterAggStage?this.filterAggStage.execute({rowNode:i,changedPath:o}):i.childrenAfterAggFilter=i.childrenAfterFilter}doSort(o,i){this.sortStage?this.sortStage.execute({rowNode:this.rootNode,changedRowNodes:o,changedPath:i}):i.forEachChangedNodeDepthFirst(s=>{s.childrenAfterSort=s.childrenAfterAggFilter.slice(0),ad(s)})}doRowGrouping(o){var r;const i=this.rootNode,s=(r=this.groupStage)==null?void 0:r.execute({rowNode:i,changedRowNodes:o.changedRowNodes,changedPath:o.changedPath,rowNodesOrderChanged:!!o.rowNodesOrderChanged,afterColumnsChanged:!!o.afterColumnsChanged});if(s!==void 0)return s;const n=i.sibling;return i.childrenAfterGroup=i.allLeafChildren,n&&(n.childrenAfterGroup=i.childrenAfterGroup),i.updateHasChildren(),!1}doFilter(o){this.filterStage?this.filterStage.execute({rowNode:this.rootNode,changedPath:o}):o.forEachChangedNodeDepthFirst(i=>{i.childrenAfterFilter=i.childrenAfterGroup,Zy(i)},!0)}doPivot(o){var i;(i=this.pivotStage)==null||i.execute({rowNode:this.rootNode,changedPath:o})}getRowNode(o){var s;const i=this.nodeManager.getRowNode(o);return typeof i=="object"?i:typeof o=="string"&&o.indexOf(Cs)===0?(s=this.groupStage)==null?void 0:s.getNode(o):void 0}batchUpdateRowData(o,i){if(this.applyAsyncTransactionsTimeout==null){this.rowDataTransactionBatch=[];const s=this.gos.get("asyncTransactionWaitMillis");this.applyAsyncTransactionsTimeout=window.setTimeout(()=>{this.isAlive()&&this.executeBatchUpdateRowData()},s)}this.rowDataTransactionBatch.push({rowDataTransaction:o,callback:i})}flushAsyncTransactions(){this.applyAsyncTransactionsTimeout!=null&&(clearTimeout(this.applyAsyncTransactionsTimeout),this.executeBatchUpdateRowData())}executeBatchUpdateRowData(){var r,l;(r=this.valueCache)==null||r.onDataChanged();const o=[],i=[],s=new fn;let n=!1;(l=this.rowDataTransactionBatch)==null||l.forEach(a=>{this.rowNodesCountReady=!0;const{rowNodeTransaction:d,rowsInserted:c}=this.nodeManager.updateRowData(a.rowDataTransaction,s);c&&(n=!0),i.push(d),a.callback&&o.push(a.callback.bind(null,d))}),this.commitTransactions(n,s),o.length>0&&window.setTimeout(()=>{o.forEach(a=>a())},0),i.length>0&&this.eventSvc.dispatchEvent({type:"asyncTransactionsFlushed",results:i}),this.rowDataTransactionBatch=null,this.applyAsyncTransactionsTimeout=void 0}updateRowData(o){var r;(r=this.valueCache)==null||r.onDataChanged(),this.rowNodesCountReady=!0;const i=new fn,{rowNodeTransaction:s,rowsInserted:n}=this.nodeManager.updateRowData(o,i);return this.commitTransactions(n,i),s}commitTransactions(o,i){this.refreshModel({step:"group",rowDataUpdated:!0,rowNodesOrderChanged:o,keepRenderedRows:!0,animate:!this.gos.get("suppressAnimationFrame"),changedRowNodes:i,changedPath:this.createChangePath(!0)})}doRowsToDisplay(){const{flattenStage:o,rootNode:i}=this;let s;if(o)s=o.execute({rowNode:i});else{s=(i==null?void 0:i.childrenAfterSort)??[];for(const n of s)n.setUiLevel(0)}this.rowsToDisplay=s}onRowHeightChanged(){this.refreshModel({step:"map",keepRenderedRows:!0,keepUndoRedoStack:!0})}resetRowHeights(){const o=this.rootNode;if(!o)return;const i=this.resetRowHeightsForAllRowNodes();o.setRowHeight(o.rowHeight,!0),o.sibling&&o.sibling.setRowHeight(o.sibling.rowHeight,!0),i&&this.onRowHeightChanged()}resetRowHeightsForAllRowNodes(){let o=!1;return this.forEachNode(i=>{i.setRowHeight(i.rowHeight,!0);const s=i.detailNode;s&&s.setRowHeight(s.rowHeight,!0),i.sibling&&i.sibling.setRowHeight(i.sibling.rowHeight,!0),o=!0}),o}onGridStylesChanges(o){var i;if(o.rowHeightChanged){if((i=this.beans.rowAutoHeight)!=null&&i.active)return;this.resetRowHeights()}}onGridReady(){this.started||this.setInitialData()}isRowDataLoaded(){return this.rowCountReady}destroy(){super.destroy(),this.started=!1,this.rootNode=null,this.nodeManager=null,this.rowDataTransactionBatch=null,this.orderedStages=hr,this.rowsToDisplay=hr}onRowHeightChangedDebounced(){this.onRowHeightChanged_debounced()}}function oR(e){var t;(t=e.expansionSvc)==null||t.onGroupExpandedOrCollapsed()}function iR(e,t){const o=Te(e);o&&((!t||t==="everything")&&(t="group"),o.refreshModel({step:t,keepRenderedRows:!0,animate:!e.gos.get("suppressAnimationFrame")}))}function sR(e){var t;return((t=Te(e))==null?void 0:t.isEmpty())??!0}function nR(e,t){var o;(o=Te(e))==null||o.forEachLeafNode(t)}function rR(e,t){var o;(o=Te(e))==null||o.forEachNodeAfterFilter(t)}function lR(e,t){var o;(o=Te(e))==null||o.forEachNodeAfterFilterAndSort(t)}function aR(e){var t,o;if((t=e.rowAutoHeight)!=null&&t.active){k(3);return}(o=Te(e))==null||o.resetRowHeights()}function dR(e,t){return e.frameworkOverrides.wrapIncoming(()=>{var o;return(o=Te(e))==null?void 0:o.updateRowData(t)})}function cR(e,t,o){e.frameworkOverrides.wrapIncoming(()=>{var i;return(i=Te(e))==null?void 0:i.batchUpdateRowData(t,o)})}function uR(e){e.frameworkOverrides.wrapIncoming(()=>{var t;return(t=Te(e))==null?void 0:t.flushAsyncTransactions()})}function hR(e){var t;return(t=e.selectionSvc)==null?void 0:t.getBestCostNodeSelection()}const dd={moduleName:"ClientSideRowModel",version:Ii,rowModels:["clientSide"],beans:[Yy,tR,Xy],dependsOn:[ga]},cd={moduleName:"ClientSideRowModelApi",version:Ii,apiFunctions:{onGroupExpandedOrCollapsed:oR,refreshClientSideRowModel:iR,isRowDataEmpty:sR,forEachLeafNode:nR,forEachNodeAfterFilter:rR,forEachNodeAfterFilterAndSort:lR,resetRowHeights:aR,applyTransaction:dR,applyTransactionAsync:cR,flushAsyncTransactions:uR,getBestCostNodeSelection:hR},dependsOn:[sb]};class vo{static getComponentDefinition(t,o){let i;return typeof t=="string"?i=this.searchForComponentInstance(o,t):i={extends:E.defineComponent({...t})},i||z(114,{component:t}),i.extends?(i.extends.setup&&(i.setup=i.extends.setup),i.extends.props=this.addParamsToProps(i.extends.props)):i.props=this.addParamsToProps(i.props),i}static addParamsToProps(t){return!t||Array.isArray(t)&&t.indexOf("params")===-1?t=["params",...t||[]]:typeof t=="object"&&!t.params&&(t.params={type:Object}),t}static createAndMountComponent(t,o,i,s){const n=vo.getComponentDefinition(t,i);if(!n)return;const{vm:r,destroy:l,el:a}=this.mount(n,{params:Object.freeze(o)},i,s||{});return{componentInstance:r,element:a,destroy:l}}static mount(t,o,i,s){let n=new E({beforeCreate(){s?(this._provided=Object.create(i.proxy._provided||null),Object.keys(s).forEach(a=>{this._provided[a]=s[a]})):this._provided=i.proxy._provided||{};const l=i.proxy.$root;l&&l.$router&&(Object.defineProperty(this,"$route",{value:i.proxy.$root.$route,writable:!1,configurable:!0}),Object.defineProperty(this,"$router",{value:i.proxy.$root.$router,writable:!1,configurable:!0}))},render(l){return l(t,{props:o})}});return n.$mount(),{vm:n,destroy:()=>{n&&(n.$destroy(),n=null)},el:n.$el}}static searchForComponentInstance(t,o,i=10,s=!1){let n=null,r=0,l=t.proxy.$parent;for(;!n&&l&&l.components&&++r<i;)l.components&&l.components[o]&&(n=l.components[o]),l=l.$parent;for(r=0,l=t.proxy.$parent;!n&&l&&l.$options&&++r<i;){const a=l;a.$options&&a.$options.components&&a.$options.components[o]?n=a.$options.components[o]:a[o]&&(n=a[o]),l=l.$parent}for(r=0,l=t.proxy.$parent;!n&&l&&++r<i;){if(l.exposed){const a=l;a.exposed&&a.exposed[o]?n=a.exposed[o]:a[o]&&(n=a[o])}l=l.$parent}return n||E.options&&E.options.components&&E.options.components[o]&&(n=E.options.components[o]),!n&&!s?(z(114,{component:o}),null):n}}var gR=Object.defineProperty,pR=(e,t,o)=>t in e?gR(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,So=(e,t,o)=>pR(e,typeof t!="symbol"?t+"":t,o);class fR extends Vv{constructor(t,o){super(),So(this,"parent"),So(this,"provides"),this.parent=t,this.provides=o}createWrapper(t){const o=this;class i extends CR{init(r){super.init(r)}hasMethod(r){return s.getFrameworkComponentInstance()[r]}callMethod(r,l){var a,d;const c=this.getFrameworkComponentInstance(),u=s.getFrameworkComponentInstance();if(u[r])return u[r].apply(c,l);{const h=((a=c.$.exposed)==null?void 0:a[r])||((d=c.exposed)==null?void 0:d[r])||c.$.setupState[r];return h==null?void 0:h.apply(c,l)}}addMethod(r,l){s[r]=l}processMethod(r,l){return r==="refresh"&&(this.getFrameworkComponentInstance().params=l[0]),this.hasMethod(r)?this.callMethod(r,l):r==="refresh"}createComponent(r){return o.createComponent(t,r)}}const s=new i;return s}createComponent(t,o){return vo.createAndMountComponent(t,o,this.parent,this.provides)}createMethodProxy(t,o,i){return function(){return t.hasMethod(o)?t.callMethod(o,arguments):(i&&k(233,{methodName:o}),null)}}destroy(){this.parent=null}}class CR{constructor(){So(this,"componentInstance"),So(this,"element"),So(this,"unmount")}getGui(){return this.element}destroy(){this.getFrameworkComponentInstance()&&typeof this.getFrameworkComponentInstance().destroy=="function"&&this.getFrameworkComponentInstance().destroy(),this.unmount()}getFrameworkComponentInstance(){return this.componentInstance}init(t){const{componentInstance:o,element:i,destroy:s}=this.createComponent(t);this.componentInstance=o,this.unmount=s,this.element=i}}var mR=Object.defineProperty,wR=(e,t,o)=>t in e?mR(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,vR=(e,t,o)=>wR(e,t+"",o);class SR extends Fl{constructor(t){super("vue"),vR(this,"parent"),this.parent=t}frameworkComponent(t,o){let i=vo.searchForComponentInstance(this.parent,t,10,!0)?t:null;if(!i&&o&&o[t]){const s=o[t];i=vo.searchForComponentInstance(this.parent,s,10,!0)?s:null}return i}isFrameworkComponent(t){return typeof t=="object"}}function bR(){return{gridOptions:()=>({}),modules:()=>[],statusBar:void 0,sideBar:void 0,suppressContextMenu:void 0,preventDefaultOnContextMenu:void 0,allowContextMenuWithControlKey:void 0,columnMenu:void 0,suppressMenuHide:void 0,enableBrowserTooltips:void 0,tooltipTrigger:void 0,tooltipShowDelay:void 0,tooltipHideDelay:void 0,tooltipMouseTrack:void 0,tooltipShowMode:void 0,tooltipInteraction:void 0,popupParent:void 0,copyHeadersToClipboard:void 0,copyGroupHeadersToClipboard:void 0,clipboardDelimiter:void 0,suppressCopyRowsToClipboard:void 0,suppressCopySingleCellRanges:void 0,suppressLastEmptyLineOnPaste:void 0,suppressClipboardPaste:void 0,suppressClipboardApi:void 0,suppressCutToClipboard:void 0,columnDefs:void 0,defaultColDef:void 0,defaultColGroupDef:void 0,columnTypes:void 0,dataTypeDefinitions:void 0,maintainColumnOrder:void 0,enableStrictPivotColumnOrder:void 0,suppressFieldDotNotation:void 0,headerHeight:void 0,groupHeaderHeight:void 0,floatingFiltersHeight:void 0,pivotHeaderHeight:void 0,pivotGroupHeaderHeight:void 0,hidePaddedHeaderRows:void 0,allowDragFromColumnsToolPanel:void 0,suppressMovableColumns:void 0,suppressColumnMoveAnimation:void 0,suppressMoveWhenColumnDragging:void 0,suppressDragLeaveHidesColumns:void 0,suppressGroupChangesColumnVisibility:void 0,suppressMakeColumnVisibleAfterUnGroup:void 0,suppressRowGroupHidesColumns:void 0,colResizeDefault:void 0,suppressAutoSize:void 0,autoSizePadding:void 0,skipHeaderOnAutoSize:void 0,autoSizeStrategy:void 0,components:void 0,editType:void 0,suppressStartEditOnTab:void 0,getFullRowEditValidationErrors:void 0,invalidEditValueMode:void 0,singleClickEdit:void 0,suppressClickEdit:void 0,readOnlyEdit:void 0,stopEditingWhenCellsLoseFocus:void 0,enterNavigatesVertically:void 0,enterNavigatesVerticallyAfterEdit:void 0,enableCellEditingOnBackspace:void 0,undoRedoCellEditing:void 0,undoRedoCellEditingLimit:void 0,defaultCsvExportParams:void 0,suppressCsvExport:void 0,defaultExcelExportParams:void 0,suppressExcelExport:void 0,excelStyles:void 0,findSearchValue:void 0,findOptions:void 0,quickFilterText:void 0,cacheQuickFilter:void 0,includeHiddenColumnsInQuickFilter:void 0,quickFilterParser:void 0,quickFilterMatcher:void 0,applyQuickFilterBeforePivotOrAgg:void 0,excludeChildrenWhenTreeDataFiltering:void 0,enableAdvancedFilter:void 0,alwaysPassFilter:void 0,includeHiddenColumnsInAdvancedFilter:void 0,advancedFilterParent:void 0,advancedFilterBuilderParams:void 0,advancedFilterParams:void 0,suppressAdvancedFilterEval:void 0,suppressSetFilterByDefault:void 0,enableFilterHandlers:void 0,filterHandlers:void 0,loadingCellRenderer:void 0,loadingCellRendererParams:void 0,loadingCellRendererSelector:void 0,localeText:void 0,masterDetail:void 0,keepDetailRows:void 0,keepDetailRowsCount:void 0,detailCellRenderer:void 0,detailCellRendererParams:void 0,detailRowHeight:void 0,detailRowAutoHeight:void 0,context:void 0,alignedGrids:void 0,tabIndex:void 0,rowBuffer:void 0,valueCache:void 0,valueCacheNeverExpires:void 0,enableCellExpressions:void 0,suppressTouch:void 0,suppressFocusAfterRefresh:void 0,suppressBrowserResizeObserver:void 0,suppressPropertyNamesCheck:void 0,suppressChangeDetection:void 0,debug:void 0,loading:void 0,overlayLoadingTemplate:void 0,loadingOverlayComponent:void 0,loadingOverlayComponentParams:void 0,suppressLoadingOverlay:void 0,overlayNoRowsTemplate:void 0,noRowsOverlayComponent:void 0,noRowsOverlayComponentParams:void 0,suppressNoRowsOverlay:void 0,pagination:void 0,paginationPageSize:void 0,paginationPageSizeSelector:void 0,paginationAutoPageSize:void 0,paginateChildRows:void 0,suppressPaginationPanel:void 0,pivotMode:void 0,pivotPanelShow:void 0,pivotMaxGeneratedColumns:void 0,pivotDefaultExpanded:void 0,pivotColumnGroupTotals:void 0,pivotRowTotals:void 0,pivotSuppressAutoColumn:void 0,suppressExpandablePivotGroups:void 0,functionsReadOnly:void 0,aggFuncs:void 0,suppressAggFuncInHeader:void 0,alwaysAggregateAtRootLevel:void 0,aggregateOnlyChangedColumns:void 0,suppressAggFilteredOnly:void 0,removePivotHeaderRowWhenSingleValueColumn:void 0,animateRows:void 0,cellFlashDuration:void 0,cellFadeDuration:void 0,allowShowChangeAfterFilter:void 0,domLayout:void 0,ensureDomOrder:void 0,enableCellSpan:void 0,enableRtl:void 0,suppressColumnVirtualisation:void 0,suppressMaxRenderedRowRestriction:void 0,suppressRowVirtualisation:void 0,rowDragManaged:void 0,rowDragInsertDelay:void 0,suppressRowDrag:void 0,suppressMoveWhenRowDragging:void 0,rowDragEntireRow:void 0,rowDragMultiRow:void 0,rowDragText:void 0,dragAndDropImageComponent:void 0,dragAndDropImageComponentParams:void 0,fullWidthCellRenderer:void 0,fullWidthCellRendererParams:void 0,embedFullWidthRows:void 0,groupDisplayType:void 0,groupDefaultExpanded:void 0,autoGroupColumnDef:void 0,groupMaintainOrder:void 0,groupSelectsChildren:void 0,groupLockGroupColumns:void 0,groupAggFiltering:void 0,groupTotalRow:void 0,grandTotalRow:void 0,suppressStickyTotalRow:void 0,groupSuppressBlankHeader:void 0,groupSelectsFiltered:void 0,showOpenedGroup:void 0,groupHideParentOfSingleChild:void 0,groupRemoveSingleChildren:void 0,groupRemoveLowestSingleChildren:void 0,groupHideOpenParents:void 0,groupAllowUnbalanced:void 0,rowGroupPanelShow:void 0,groupRowRenderer:void 0,groupRowRendererParams:void 0,treeData:void 0,treeDataChildrenField:void 0,treeDataParentIdField:void 0,rowGroupPanelSuppressSort:void 0,suppressGroupRowsSticky:void 0,groupHierarchyConfig:void 0,pinnedTopRowData:void 0,pinnedBottomRowData:void 0,enableRowPinning:void 0,isRowPinnable:void 0,isRowPinned:void 0,rowModelType:void 0,rowData:void 0,asyncTransactionWaitMillis:void 0,suppressModelUpdateAfterUpdateTransaction:void 0,datasource:void 0,cacheOverflowSize:void 0,infiniteInitialRowCount:void 0,serverSideInitialRowCount:void 0,suppressServerSideFullWidthLoadingRow:void 0,cacheBlockSize:void 0,maxBlocksInCache:void 0,maxConcurrentDatasourceRequests:void 0,blockLoadDebounceMillis:void 0,purgeClosedRowNodes:void 0,serverSideDatasource:void 0,serverSideSortAllLevels:void 0,serverSideEnableClientSideSort:void 0,serverSideOnlyRefreshFilteredGroups:void 0,serverSidePivotResultFieldSeparator:void 0,viewportDatasource:void 0,viewportRowModelPageSize:void 0,viewportRowModelBufferSize:void 0,alwaysShowHorizontalScroll:void 0,alwaysShowVerticalScroll:void 0,debounceVerticalScrollbar:void 0,suppressHorizontalScroll:void 0,suppressScrollOnNewData:void 0,suppressScrollWhenPopupsAreOpen:void 0,suppressAnimationFrame:void 0,suppressMiddleClickScrolls:void 0,suppressPreventDefaultOnMouseWheel:void 0,scrollbarWidth:void 0,rowSelection:void 0,cellSelection:void 0,rowMultiSelectWithClick:void 0,suppressRowDeselection:void 0,suppressRowClickSelection:void 0,suppressCellFocus:void 0,suppressHeaderFocus:void 0,selectionColumnDef:void 0,rowNumbers:void 0,suppressMultiRangeSelection:void 0,enableCellTextSelection:void 0,enableRangeSelection:void 0,enableRangeHandle:void 0,enableFillHandle:void 0,fillHandleDirection:void 0,suppressClearOnFillReduction:void 0,sortingOrder:void 0,accentedSort:void 0,unSortIcon:void 0,suppressMultiSort:void 0,alwaysMultiSort:void 0,multiSortKey:void 0,suppressMaintainUnsortedOrder:void 0,icons:void 0,rowHeight:void 0,rowStyle:void 0,rowClass:void 0,rowClassRules:void 0,suppressRowHoverHighlight:void 0,suppressRowTransform:void 0,columnHoverHighlight:void 0,gridId:void 0,deltaSort:void 0,treeDataDisplayType:void 0,enableGroupEdit:void 0,initialState:void 0,theme:void 0,loadThemeGoogleFonts:void 0,themeCssLayer:void 0,styleNonce:void 0,themeStyleContainer:void 0,getContextMenuItems:void 0,getMainMenuItems:void 0,postProcessPopup:void 0,processUnpinnedColumns:void 0,processCellForClipboard:void 0,processHeaderForClipboard:void 0,processGroupHeaderForClipboard:void 0,processCellFromClipboard:void 0,sendToClipboard:void 0,processDataFromClipboard:void 0,isExternalFilterPresent:void 0,doesExternalFilterPass:void 0,getChartToolbarItems:void 0,createChartContainer:void 0,focusGridInnerElement:void 0,navigateToNextHeader:void 0,tabToNextHeader:void 0,navigateToNextCell:void 0,tabToNextCell:void 0,getLocaleText:void 0,getDocument:void 0,paginationNumberFormatter:void 0,getGroupRowAgg:void 0,isGroupOpenByDefault:void 0,ssrmExpandAllAffectsAllRows:void 0,initialGroupOrderComparator:void 0,processPivotResultColDef:void 0,processPivotResultColGroupDef:void 0,getDataPath:void 0,getChildCount:void 0,getServerSideGroupLevelParams:void 0,isServerSideGroupOpenByDefault:void 0,isApplyServerSideTransaction:void 0,isServerSideGroup:void 0,getServerSideGroupKey:void 0,getBusinessKeyForNode:void 0,getRowId:void 0,resetRowDataOnUpdate:void 0,processRowPostCreate:void 0,isRowSelectable:void 0,isRowMaster:void 0,fillOperation:void 0,postSortRows:void 0,getRowStyle:void 0,getRowClass:void 0,getRowHeight:void 0,isFullWidthRow:void 0,isRowValidDropPosition:void 0,"onColumn-everything-changed":void 0,"onNew-columns-loaded":void 0,"onColumn-pivot-mode-changed":void 0,"onPivot-max-columns-exceeded":void 0,"onColumn-row-group-changed":void 0,"onExpand-or-collapse-all":void 0,"onColumn-pivot-changed":void 0,"onGrid-columns-changed":void 0,"onColumn-value-changed":void 0,"onColumn-moved":void 0,"onColumn-visible":void 0,"onColumn-pinned":void 0,"onColumn-group-opened":void 0,"onColumn-resized":void 0,"onDisplayed-columns-changed":void 0,"onVirtual-columns-changed":void 0,"onColumn-header-mouse-over":void 0,"onColumn-header-mouse-leave":void 0,"onColumn-header-clicked":void 0,"onColumn-header-context-menu":void 0,"onAsync-transactions-flushed":void 0,"onRow-group-opened":void 0,"onRow-data-updated":void 0,"onPinned-row-data-changed":void 0,"onPinned-rows-changed":void 0,"onRange-selection-changed":void 0,"onCell-selection-changed":void 0,"onChart-created":void 0,"onChart-range-selection-changed":void 0,"onChart-options-changed":void 0,"onChart-destroyed":void 0,"onTool-panel-visible-changed":void 0,"onTool-panel-size-changed":void 0,"onModel-updated":void 0,"onCut-start":void 0,"onCut-end":void 0,"onPaste-start":void 0,"onPaste-end":void 0,"onFill-start":void 0,"onFill-end":void 0,"onCell-selection-delete-start":void 0,"onCell-selection-delete-end":void 0,"onRange-delete-start":void 0,"onRange-delete-end":void 0,"onUndo-started":void 0,"onUndo-ended":void 0,"onRedo-started":void 0,"onRedo-ended":void 0,"onCell-clicked":void 0,"onCell-double-clicked":void 0,"onCell-mouse-down":void 0,"onCell-context-menu":void 0,"onCell-value-changed":void 0,"onCell-edit-request":void 0,"onRow-value-changed":void 0,"onHeader-focused":void 0,"onCell-focused":void 0,"onRow-selected":void 0,"onSelection-changed":void 0,"onTooltip-show":void 0,"onTooltip-hide":void 0,"onCell-key-down":void 0,"onCell-mouse-over":void 0,"onCell-mouse-out":void 0,"onFilter-changed":void 0,"onFilter-modified":void 0,"onFilter-ui-changed":void 0,"onFilter-opened":void 0,"onFloating-filter-ui-changed":void 0,"onAdvanced-filter-builder-visible-changed":void 0,"onSort-changed":void 0,"onVirtual-row-removed":void 0,"onRow-clicked":void 0,"onRow-double-clicked":void 0,"onGrid-ready":void 0,"onGrid-pre-destroyed":void 0,"onGrid-size-changed":void 0,"onViewport-changed":void 0,"onFirst-data-rendered":void 0,"onDrag-started":void 0,"onDrag-stopped":void 0,"onDrag-cancelled":void 0,"onRow-editing-started":void 0,"onRow-editing-stopped":void 0,"onCell-editing-started":void 0,"onCell-editing-stopped":void 0,"onBody-scroll":void 0,"onBody-scroll-end":void 0,"onPagination-changed":void 0,"onComponent-state-changed":void 0,"onStore-refreshed":void 0,"onState-updated":void 0,"onColumn-menu-visible-changed":void 0,"onContext-menu-visible-changed":void 0,"onRow-drag-enter":void 0,"onRow-drag-move":void 0,"onRow-drag-leave":void 0,"onRow-drag-end":void 0,"onRow-drag-cancel":void 0,"onFind-changed":void 0,"onRow-resize-started":void 0,"onRow-resize-ended":void 0,"onColumns-reset":void 0,"onBulk-editing-started":void 0,"onBulk-editing-stopped":void 0,"onBatch-editing-started":void 0,"onBatch-editing-stopped":void 0}}const yR=(e,t)=>{let o;return()=>{const i=function(){e()};window.clearTimeout(o),o=window.setTimeout(i,t)}};function RR(e){return e&&e.constructor&&e.constructor.toString().substring(0,5)==="class"}function bo(e){const t=new WeakSet,o=i=>{if(RR(i))return E.toRaw(i);if(E.isRef(i)||E.isReactive(i)||E.isProxy(i)){const s=E.toRaw(i);return s===i?i:o(s)}if(i!==null&&typeof i=="object"){if(t.has(i))return i;t.add(i)}return Array.isArray(i)?i.map(s=>o(s)):i};return o(e)}const ER=E.defineComponent({__name:"AgGridVue",props:E.mergeDefaults({gridOptions:null,modules:null,modelValue:null,statusBar:null,sideBar:{type:[String,Boolean]},suppressContextMenu:{type:Boolean},preventDefaultOnContextMenu:{type:Boolean},allowContextMenuWithControlKey:{type:Boolean},columnMenu:null,suppressMenuHide:{type:Boolean},enableBrowserTooltips:{type:Boolean},tooltipTrigger:null,tooltipShowDelay:null,tooltipHideDelay:null,tooltipMouseTrack:{type:Boolean},tooltipShowMode:null,tooltipInteraction:{type:Boolean},popupParent:null,copyHeadersToClipboard:{type:Boolean},copyGroupHeadersToClipboard:{type:Boolean},clipboardDelimiter:null,suppressCopyRowsToClipboard:{type:Boolean},suppressCopySingleCellRanges:{type:Boolean},suppressLastEmptyLineOnPaste:{type:Boolean},suppressClipboardPaste:{type:Boolean},suppressClipboardApi:{type:Boolean},suppressCutToClipboard:{type:Boolean},columnDefs:null,defaultColDef:null,defaultColGroupDef:null,columnTypes:null,dataTypeDefinitions:null,maintainColumnOrder:{type:Boolean},enableStrictPivotColumnOrder:{type:Boolean},suppressFieldDotNotation:{type:Boolean},headerHeight:null,groupHeaderHeight:null,floatingFiltersHeight:null,pivotHeaderHeight:null,pivotGroupHeaderHeight:null,hidePaddedHeaderRows:{type:Boolean},allowDragFromColumnsToolPanel:{type:Boolean},suppressMovableColumns:{type:Boolean},suppressColumnMoveAnimation:{type:Boolean},suppressMoveWhenColumnDragging:{type:Boolean},suppressDragLeaveHidesColumns:{type:Boolean},suppressGroupChangesColumnVisibility:{type:[Boolean,String]},suppressMakeColumnVisibleAfterUnGroup:{type:Boolean},suppressRowGroupHidesColumns:{type:Boolean},colResizeDefault:null,suppressAutoSize:{type:Boolean},autoSizePadding:null,skipHeaderOnAutoSize:{type:Boolean},autoSizeStrategy:null,components:null,editType:null,suppressStartEditOnTab:{type:Boolean},getFullRowEditValidationErrors:null,invalidEditValueMode:null,singleClickEdit:{type:Boolean},suppressClickEdit:{type:Boolean},readOnlyEdit:{type:Boolean},stopEditingWhenCellsLoseFocus:{type:Boolean},enterNavigatesVertically:{type:Boolean},enterNavigatesVerticallyAfterEdit:{type:Boolean},enableCellEditingOnBackspace:{type:Boolean},undoRedoCellEditing:{type:Boolean},undoRedoCellEditingLimit:null,defaultCsvExportParams:null,suppressCsvExport:{type:Boolean},defaultExcelExportParams:null,suppressExcelExport:{type:Boolean},excelStyles:null,findSearchValue:null,findOptions:null,quickFilterText:null,cacheQuickFilter:{type:Boolean},includeHiddenColumnsInQuickFilter:{type:Boolean},quickFilterParser:{type:Function},quickFilterMatcher:{type:Function},applyQuickFilterBeforePivotOrAgg:{type:Boolean},excludeChildrenWhenTreeDataFiltering:{type:Boolean},enableAdvancedFilter:{type:Boolean},alwaysPassFilter:{type:Function},includeHiddenColumnsInAdvancedFilter:{type:Boolean},advancedFilterParent:null,advancedFilterBuilderParams:null,advancedFilterParams:null,suppressAdvancedFilterEval:{type:Boolean},suppressSetFilterByDefault:{type:Boolean},enableFilterHandlers:{type:Boolean},filterHandlers:null,loadingCellRenderer:null,loadingCellRendererParams:null,loadingCellRendererSelector:null,localeText:null,masterDetail:{type:Boolean},keepDetailRows:{type:Boolean},keepDetailRowsCount:null,detailCellRenderer:null,detailCellRendererParams:null,detailRowHeight:null,detailRowAutoHeight:{type:Boolean},context:null,alignedGrids:{type:Function},tabIndex:null,rowBuffer:null,valueCache:{type:Boolean},valueCacheNeverExpires:{type:Boolean},enableCellExpressions:{type:Boolean},suppressTouch:{type:Boolean},suppressFocusAfterRefresh:{type:Boolean},suppressBrowserResizeObserver:{type:Boolean},suppressPropertyNamesCheck:{type:Boolean},suppressChangeDetection:{type:Boolean},debug:{type:Boolean},loading:{type:Boolean},overlayLoadingTemplate:null,loadingOverlayComponent:null,loadingOverlayComponentParams:null,suppressLoadingOverlay:{type:Boolean},overlayNoRowsTemplate:null,noRowsOverlayComponent:null,noRowsOverlayComponentParams:null,suppressNoRowsOverlay:{type:Boolean},pagination:{type:Boolean},paginationPageSize:null,paginationPageSizeSelector:{type:Boolean},paginationAutoPageSize:{type:Boolean},paginateChildRows:{type:Boolean},suppressPaginationPanel:{type:Boolean},pivotMode:{type:Boolean},pivotPanelShow:null,pivotMaxGeneratedColumns:null,pivotDefaultExpanded:null,pivotColumnGroupTotals:null,pivotRowTotals:null,pivotSuppressAutoColumn:{type:Boolean},suppressExpandablePivotGroups:{type:Boolean},functionsReadOnly:{type:Boolean},aggFuncs:null,suppressAggFuncInHeader:{type:Boolean},alwaysAggregateAtRootLevel:{type:Boolean},aggregateOnlyChangedColumns:{type:Boolean},suppressAggFilteredOnly:{type:Boolean},removePivotHeaderRowWhenSingleValueColumn:{type:Boolean},animateRows:{type:Boolean},cellFlashDuration:null,cellFadeDuration:null,allowShowChangeAfterFilter:{type:Boolean},domLayout:null,ensureDomOrder:{type:Boolean},enableCellSpan:{type:Boolean},enableRtl:{type:Boolean},suppressColumnVirtualisation:{type:Boolean},suppressMaxRenderedRowRestriction:{type:Boolean},suppressRowVirtualisation:{type:Boolean},rowDragManaged:{type:Boolean},rowDragInsertDelay:null,suppressRowDrag:{type:Boolean},suppressMoveWhenRowDragging:{type:Boolean},rowDragEntireRow:{type:Boolean},rowDragMultiRow:{type:Boolean},rowDragText:{type:Function},dragAndDropImageComponent:null,dragAndDropImageComponentParams:null,fullWidthCellRenderer:null,fullWidthCellRendererParams:null,embedFullWidthRows:{type:Boolean},groupDisplayType:null,groupDefaultExpanded:null,autoGroupColumnDef:null,groupMaintainOrder:{type:Boolean},groupSelectsChildren:{type:Boolean},groupLockGroupColumns:null,groupAggFiltering:{type:Boolean},groupTotalRow:null,grandTotalRow:null,suppressStickyTotalRow:{type:[Boolean,String]},groupSuppressBlankHeader:{type:Boolean},groupSelectsFiltered:{type:Boolean},showOpenedGroup:{type:Boolean},groupHideParentOfSingleChild:{type:[Boolean,String]},groupRemoveSingleChildren:{type:Boolean},groupRemoveLowestSingleChildren:{type:Boolean},groupHideOpenParents:{type:Boolean},groupAllowUnbalanced:{type:Boolean},rowGroupPanelShow:null,groupRowRenderer:null,groupRowRendererParams:null,treeData:{type:Boolean},treeDataChildrenField:null,treeDataParentIdField:null,rowGroupPanelSuppressSort:{type:Boolean},suppressGroupRowsSticky:{type:Boolean},groupHierarchyConfig:null,pinnedTopRowData:null,pinnedBottomRowData:null,enableRowPinning:{type:[Boolean,String]},isRowPinnable:null,isRowPinned:null,rowModelType:null,rowData:null,asyncTransactionWaitMillis:null,suppressModelUpdateAfterUpdateTransaction:{type:Boolean},datasource:null,cacheOverflowSize:null,infiniteInitialRowCount:null,serverSideInitialRowCount:null,suppressServerSideFullWidthLoadingRow:{type:Boolean},cacheBlockSize:null,maxBlocksInCache:null,maxConcurrentDatasourceRequests:null,blockLoadDebounceMillis:null,purgeClosedRowNodes:{type:Boolean},serverSideDatasource:null,serverSideSortAllLevels:{type:Boolean},serverSideEnableClientSideSort:{type:Boolean},serverSideOnlyRefreshFilteredGroups:{type:Boolean},serverSidePivotResultFieldSeparator:null,viewportDatasource:null,viewportRowModelPageSize:null,viewportRowModelBufferSize:null,alwaysShowHorizontalScroll:{type:Boolean},alwaysShowVerticalScroll:{type:Boolean},debounceVerticalScrollbar:{type:Boolean},suppressHorizontalScroll:{type:Boolean},suppressScrollOnNewData:{type:Boolean},suppressScrollWhenPopupsAreOpen:{type:Boolean},suppressAnimationFrame:{type:Boolean},suppressMiddleClickScrolls:{type:Boolean},suppressPreventDefaultOnMouseWheel:{type:Boolean},scrollbarWidth:null,rowSelection:null,cellSelection:{type:Boolean},rowMultiSelectWithClick:{type:Boolean},suppressRowDeselection:{type:Boolean},suppressRowClickSelection:{type:Boolean},suppressCellFocus:{type:Boolean},suppressHeaderFocus:{type:Boolean},selectionColumnDef:null,rowNumbers:{type:Boolean},suppressMultiRangeSelection:{type:Boolean},enableCellTextSelection:{type:Boolean},enableRangeSelection:{type:Boolean},enableRangeHandle:{type:Boolean},enableFillHandle:{type:Boolean},fillHandleDirection:null,suppressClearOnFillReduction:{type:Boolean},sortingOrder:null,accentedSort:{type:Boolean},unSortIcon:{type:Boolean},suppressMultiSort:{type:Boolean},alwaysMultiSort:{type:Boolean},multiSortKey:null,suppressMaintainUnsortedOrder:{type:Boolean},icons:null,rowHeight:null,rowStyle:null,rowClass:null,rowClassRules:null,suppressRowHoverHighlight:{type:Boolean},suppressRowTransform:{type:Boolean},columnHoverHighlight:{type:Boolean},gridId:null,deltaSort:{type:Boolean},treeDataDisplayType:null,enableGroupEdit:{type:Boolean},initialState:null,theme:null,loadThemeGoogleFonts:{type:Boolean},themeCssLayer:null,styleNonce:null,themeStyleContainer:null,getContextMenuItems:null,getMainMenuItems:null,postProcessPopup:{type:Function},processUnpinnedColumns:{type:Function},processCellForClipboard:{type:Function},processHeaderForClipboard:{type:Function},processGroupHeaderForClipboard:{type:Function},processCellFromClipboard:{type:Function},sendToClipboard:{type:Function},processDataFromClipboard:{type:Function},isExternalFilterPresent:{type:Function},doesExternalFilterPass:{type:Function},getChartToolbarItems:null,createChartContainer:{type:Function},focusGridInnerElement:{type:Function},navigateToNextHeader:{type:Function},tabToNextHeader:{type:Function},navigateToNextCell:{type:Function},tabToNextCell:{type:Function},getLocaleText:{type:Function},getDocument:{type:Function},paginationNumberFormatter:{type:Function},getGroupRowAgg:{type:Function},isGroupOpenByDefault:{type:Function},ssrmExpandAllAffectsAllRows:{type:Boolean},initialGroupOrderComparator:{type:Function},processPivotResultColDef:{type:Function},processPivotResultColGroupDef:{type:Function},getDataPath:null,getChildCount:{type:Function},getServerSideGroupLevelParams:{type:Function},isServerSideGroupOpenByDefault:{type:Function},isApplyServerSideTransaction:null,isServerSideGroup:null,getServerSideGroupKey:null,getBusinessKeyForNode:{type:Function},getRowId:null,resetRowDataOnUpdate:{type:Boolean},processRowPostCreate:{type:Function},isRowSelectable:null,isRowMaster:null,fillOperation:{type:Function},postSortRows:{type:Function},getRowStyle:{type:Function},getRowClass:{type:Function},getRowHeight:{type:Function},isFullWidthRow:{type:Function},isRowValidDropPosition:null,"onTool-panel-visible-changed":null,"onTool-panel-size-changed":null,"onColumn-menu-visible-changed":null,"onContext-menu-visible-changed":null,"onCut-start":null,"onCut-end":null,"onPaste-start":null,"onPaste-end":null,"onColumn-visible":null,"onColumn-pinned":null,"onColumn-resized":null,"onColumn-moved":null,"onColumn-value-changed":null,"onColumn-pivot-mode-changed":null,"onColumn-pivot-changed":null,"onColumn-group-opened":null,"onNew-columns-loaded":null,"onGrid-columns-changed":null,"onDisplayed-columns-changed":null,"onVirtual-columns-changed":null,"onColumn-everything-changed":null,"onColumns-reset":null,"onColumn-header-mouse-over":null,"onColumn-header-mouse-leave":null,"onColumn-header-clicked":null,"onColumn-header-context-menu":null,"onComponent-state-changed":null,"onCell-value-changed":null,"onCell-edit-request":null,"onRow-value-changed":null,"onCell-editing-started":null,"onCell-editing-stopped":null,"onRow-editing-started":null,"onRow-editing-stopped":null,"onBulk-editing-started":null,"onBulk-editing-stopped":null,"onBatch-editing-started":null,"onBatch-editing-stopped":null,"onUndo-started":null,"onUndo-ended":null,"onRedo-started":null,"onRedo-ended":null,"onCell-selection-delete-start":null,"onCell-selection-delete-end":null,"onRange-delete-start":null,"onRange-delete-end":null,"onFill-start":null,"onFill-end":null,"onFilter-opened":null,"onFilter-changed":null,"onFilter-modified":null,"onFilter-ui-changed":null,"onFloating-filter-ui-changed":null,"onAdvanced-filter-builder-visible-changed":null,"onFind-changed":null,"onChart-created":null,"onChart-range-selection-changed":null,"onChart-options-changed":null,"onChart-destroyed":null,"onCell-key-down":null,"onGrid-ready":null,"onGrid-pre-destroyed":null,"onFirst-data-rendered":null,"onGrid-size-changed":null,"onModel-updated":null,"onVirtual-row-removed":null,"onViewport-changed":null,"onBody-scroll":null,"onBody-scroll-end":null,"onDrag-started":null,"onDrag-stopped":null,"onDrag-cancelled":null,"onState-updated":null,"onPagination-changed":null,"onRow-drag-enter":null,"onRow-drag-move":null,"onRow-drag-leave":null,"onRow-drag-end":null,"onRow-drag-cancel":null,"onRow-resize-started":null,"onRow-resize-ended":null,"onColumn-row-group-changed":null,"onRow-group-opened":null,"onExpand-or-collapse-all":null,"onPivot-max-columns-exceeded":null,"onPinned-row-data-changed":null,"onPinned-rows-changed":null,"onRow-data-updated":null,"onAsync-transactions-flushed":null,"onStore-refreshed":null,"onHeader-focused":null,"onCell-clicked":null,"onCell-double-clicked":null,"onCell-focused":null,"onCell-mouse-over":null,"onCell-mouse-out":null,"onCell-mouse-down":null,"onRow-clicked":null,"onRow-double-clicked":null,"onRow-selected":null,"onSelection-changed":null,"onCell-context-menu":null,"onRange-selection-changed":null,"onCell-selection-changed":null,"onTooltip-show":null,"onTooltip-hide":null,"onSort-changed":null},bR()),emits:["update:modelValue"],setup(e,{expose:t,emit:o}){const i=e,s=E.ref(),n=E.ref(void 0),r=E.ref(!1),l=E.ref(!1),a=E.ref(!1),d=E.ref({}),c=E.ref(null),u=E.toRefs(i);on().filter(P=>P!="gridOptions").forEach(P=>{E.watch(()=>u[P],(T,F)=>{(P==="rowData"&&!f.value||P!=="rowData")&&I(P,T),f.value=!1},{deep:!0})});const h=new Set(["rowDataUpdated","cellValueChanged","rowValueChanged"]),g=E.ref(i.modelValue),p=E.ref(!1),f=E.ref(!1);E.watch(()=>i.modelValue,P=>{g.value=P}),E.watch(g,(P,T)=>{r.value&&(f.value||(p.value=!0,I("rowData",bo(P),bo(T))),f.value=!1)},{deep:!0});const C=yR(()=>{f.value=!0,o("update:modelValue",b())},10),m=E.getCurrentInstance(),w=P=>{var T;a.value&&h.has(P)&&(T=m==null?void 0:m.proxy)!=null&&T.$props["onUpdate:modelValue"]&&C()},S=()=>{var P;(i.rowData||(P=i.gridOptions)!=null&&P.rowData)&&g.value&&k(232)},v=()=>{var P;return g.value||i.rowData||((P=i.gridOptions)==null?void 0:P.rowData)},b=()=>{const P=[];return n==null||n.value.forEachLeafNode(T=>{P.push(T.data)}),P},D=P=>T=>{if(l.value)return;T==="gridReady"&&(a.value=!0);const F=ho.has(T);F&&!P||!F&&P||h.has(T)&&(p.value||w(T),p.value=!1)},I=(P,T,F)=>{if(r.value){let G=T.value||T;P==="rowData"&&G!=null&&(G=bo(G)),d.value[P]=G,c.value==null&&(c.value=window.setTimeout(()=>{c.value=null,Ec(d.value,n.value),d.value={}},0))}},B=()=>Object.create(E.getCurrentInstance().proxy._provided);return E.onMounted(()=>{Et(Ha,void 0,!0);const P=new fR(E.getCurrentInstance(),B()),T={globalListener:D(),globalSyncListener:D(!0),frameworkOverrides:new SR(E.getCurrentInstance()),providedBeanInstances:{frameworkCompWrapper:P},modules:i.modules},F=E.markRaw(Rc(bo(i.gridOptions),i,[...on(),...Object.values(Si)])),G=v();G!==void 0&&(F.rowData=bo(G)),n.value=Mv(s.value,F,T),r.value=!0}),E.onUnmounted(()=>{var P;r.value&&((P=n==null?void 0:n.value)==null||P.destroy(),l.value=!0)}),t({api:n}),{__sfc:!0,props:i,rootRef:s,api:n,gridCreated:r,isDestroyed:l,gridReadyFired:a,batchChanges:d,batchTimeout:c,propsAsRefs:u,ROW_DATA_EVENTS:h,rowDataModel:g,rowDataUpdating:p,emittingRowData:f,emits:o,emitRowModel:C,thisInstance:m,updateModelIfUsed:w,checkForBindingConflicts:S,getRowDataBasedOnBindings:v,getRowData:b,globalEventListenerFactory:D,processChanges:I,getProvides:B}}});function se(e,t,o,i,s,n,r,l){var a=typeof e=="function"?e.options:e;return t&&(a.render=t,a.staticRenderFns=o,a._compiled=!0),n&&(a._scopeId="data-v-"+n),{exports:e,options:a}}var xR=function(){var t=this,o=t._self._c;return t._self._setupProxy,o("div",{ref:"rootRef"})},DR=[],FR=se(ER,xR,DR,!1,null,"60566900");const ud=FR.exports,PR=e=>{const t=E.getCurrentInstance(),o={id:e.id,rowIdMapper:e.rowIdMapper,columns:e.columns,rowData:e.rowData,pageSize:e.pageSize,gridOptions:e.gridOptions,footerHeight:e.footerHeight,editable:e.editable,onRowChange:e.onRowChange,onError:i=>Id.Message.error(i),instanceCtx:{getInstanceName:i=>{var s,n;return(n=(s=i==null?void 0:i.$options)==null?void 0:s.name)!=null?n:null},getParentInstance:i=>{var s;return(s=i==null?void 0:i.$parent)!=null?s:null}},currentInstance:t==null?void 0:t.proxy};return Ja(o)},hd={functional:!0,name:"VNodeRender",props:["params"],render(e,t){var o;const i=t.props.params;return i.render?i.render(i):e("span",(o=i.valueFormatted)!=null?o:i.value)}},TR={functional:!0,props:{params:{type:Object,required:!0}},render(e,t){const o=e("",{});return o.text=`${t.props.params.column.getColId()} holder`,o}},IR=E.defineComponent({name:"CellRenderer"}),AR=E.defineComponent({...IR,props:{params:null},setup(e){const t=e,o=E.computed(()=>{const r=t.params.data,l=r.isEditing()&&t.params.editeRender?t.params.editeRender:t.params.render,a={...t.params,render:l};if(r instanceof Ot){const d=r.getCell(a.column);if(!d)return a.render=t.params.render,a;const{hostArray:c,hostObject:u}=r.getHostObject(a);r.getActualRow().isCellEditing(t.params.node.id,t.params.column)||(a.render=t.params.render),a.hostObject=u,a.hostArrayHook=g=>{var p;let f=c;((p=a.colDef)==null?void 0:p.cellDataType)==="array"&&!c&&(f=[],O.set(r.getData(),d.path,f)),f&&(g(f),r.buildSpan(),a.context.reload(),a.api.redrawRows({rowNodes:a.api.getRenderedNodes().filter(C=>r.match(C))}))}}return a}),i=E.computed(()=>{const r=t.params.data,l=r.getActualRow();if(l.isEditing()&&t.params.editeRender){const d=l.getSourceRow().getData(),c=r.getCell(t.params.column);return c?!O.isEqual(O.get(d,c.getReadPath()),t.params.value):!1}return!1}),s=E.computed(()=>t.params.data.isTransient()),n=E.computed(()=>t.params.data.getRowSpan(t.params.column));return{__sfc:!0,props:t,eventParams:o,isChange:i,isDraft:s,rowSpan:n,VNodeRenderer:hd,CellHolder:TR}}});var MR=function(){var t=this,o=t._self._c,i=t._self._setupProxy;return i.rowSpan>0?o("div",{staticClass:"custom-cell"},[i.isChange?o("span",{staticClass:"value-change"}):t._e(),i.isDraft?o("span",{staticClass:"value-change transient"}):t._e(),o(i.VNodeRenderer,{attrs:{params:i.eventParams}})],1):o(i.CellHolder,{attrs:{params:i.eventParams}})},kR=[],LR=se(AR,MR,kR,!1,null,null);const GR=LR.exports,HR=E.defineComponent({name:"GridToolbar"}),OR=E.defineComponent({...HR,setup(e){return{__sfc:!0}}});var BR=function(){var t=this,o=t._self._c;return t._self._setupProxy,o("div",{staticClass:"grid-toolbar"},[o("div",{staticClass:"grid-toolbar-left"},[t._t("default")],2),o("div",{staticClass:"grid-toolbar-right"},[t._t("system")],2)])},VR=[],NR=se(OR,BR,VR,!1,null,"f12c2536");const gd=NR.exports,_R=E.defineComponent({__name:"FooterCellRender",props:{params:null},setup(e){return{__sfc:!0,props:e,VNodeRenderer:hd}}});var WR=function(){var t=this,o=t._self._c,i=t._self._setupProxy;return o("div",{staticClass:"custom-cell"},[o(i.VNodeRenderer,{attrs:{params:t.params}})],1)},zR=[],$R=se(_R,WR,zR,!1,null,"4998e205");const UR=$R.exports,KR=E.defineComponent({name:"SearchItem",props:{search:{type:Object,required:!0},teleported:{type:Boolean}},setup(e){return()=>e.search.render(e.search)}});var jR=se(KR,null,null,!1,null,"e1931525");const Cn=jR.exports,qR=E.defineComponent({name:"ClSearch"}),YR=E.defineComponent({...qR,props:{search:null,teleported:{type:Boolean},searchRemote:{type:Function},id:null,confirmButtonText:{default:"搜索"},resetButtonText:{default:"重置"},autoResetSearch:{type:Boolean,default:!0},enable:{type:Boolean,default:!0}},setup(e){const t=e,o=E.ref(),i=E.ref(),s=()=>{t.search.forEach(c=>{c.value=O.cloneDeep(c.initValue)})},n=E.computed(()=>`${t.id}_SEARCH`),r=()=>{localStorage.setItem(n.value,JSON.stringify(t.search.filter(c=>!c.transient).map(c=>({field:c.field,value:c.value}))))},l=()=>{var c;const u=JSON.parse((c=localStorage.getItem(n.value))!=null?c:"[]");t.search.forEach(h=>{const g=u.find(p=>h.field===p.field);h.transient||!g?h.value=O.cloneDeep(h.initValue):h.value=g.value})},a=async()=>{i.value=!0;try{await t.searchRemote(),t.id&&r()}catch(c){console.error(c)}finally{i.value=!1}},d=()=>{if(s(),t.autoResetSearch)return a()};return E.onBeforeMount(()=>{l()}),{__sfc:!0,searchForm:o,props:t,loading:i,reset:s,persistenceKey:n,doPersistence:r,restore:l,doSearch:a,handleReset:d,SearchItem:Cn}}});var ZR=function(){var t=this,o=t._self._c,i=t._self._setupProxy;return o("el-form",{ref:"searchForm"},[o("div",{staticClass:"search-container"},[t._l(t.search,function(s){return o("el-form-item",{key:s.field},[o(i.SearchItem,{attrs:{search:s}})],1)}),o("el-form-item",[o("el-button",{staticStyle:{width:"80px"},attrs:{disabled:!t.enable||i.loading,type:"primary"},on:{click:i.doSearch}},[t._v(" "+t._s(t.confirmButtonText)+" ")]),o("el-button",{staticStyle:{width:"80px"},attrs:{disabled:i.loading},on:{click:i.handleReset}},[t._v(t._s(t.resetButtonText))])],1),t._t("default")],2)])},QR=[],XR=se(YR,ZR,QR,!1,null,"962588ec");const JR=XR.exports,pd=(e,t,o)=>{const i=E.ref(),s=E.ref(!1),n=E.computed(()=>{if(Array.isArray(o)){const h=o.map(g=>{var p;return(p=g.width)!=null?p:-1}).filter(g=>g);if(h.length>0)return Math.max(...h)}else return o==null?void 0:o.width}),r=h=>O.isEmpty(h)&&!O.isNumber(h),l=E.computed(()=>Array.isArray(o)?o.some(h=>!r(h.value)):!r(o==null?void 0:o.value)),a=E.computed(()=>[s.value?"is-loading":""]),d=E.computed(()=>l.value?"var(--el-color-primary)":void 0);return{visible:i,loading:s,width:n,loadingClass:a,hasCondition:l,hasConditionColor:d,doSearch:async()=>{s.value=!0;try{await e()}catch(h){console.error(h)}finally{s.value=!1,i.value=!1}},reset:()=>{Array.isArray(o)?o.forEach(h=>{h.value=O.cloneDeep(h.initValue)}):o.value=O.cloneDeep(o==null?void 0:o.initValue)}}},eE=E.defineComponent({name:"ClPopoverSearch"}),tE=E.defineComponent({...eE,props:{search:null,teleported:{type:Boolean},searchRemote:{type:Function},field:null},setup(e){const t=e,o=E.computed(()=>{var u;return(u=t.search)==null?void 0:u.find(h=>h.field===t.field)}),{visible:i,loading:s,width:n,loadingClass:r,hasConditionColor:l,doSearch:a,reset:d}=pd(t.searchRemote,t,o.value),c=E.computed(()=>{var u;return(u=n.value)!=null?u:300});return{__sfc:!0,props:t,search:o,visible:i,loading:s,width:n,loadingClass:r,hasConditionColor:l,doSearch:a,reset:d,popoverWidth:c,SearchItem:Cn}}});var oE=function(){var t=this,o=t._self._c,i=t._self._setupProxy;return i.search?o("el-popover",{attrs:{width:i.popoverWidth,trigger:"click"},scopedSlots:t._u([{key:"reference",fn:function(){return[o("div",[t._t("default",function(){return[o("i",{class:["el-icon-search",i.loadingClass],attrs:{color:i.hasConditionColor}})]},null,{loading:i.loading})],2)]},proxy:!0}],null,!0),model:{value:i.visible,callback:function(s){i.visible=s},expression:"visible"}},[o("div",{on:{keyup:function(s){return!s.type.indexOf("key")&&t._k(s.keyCode,"enter",13,s.key,"Enter")?null:i.doSearch.apply(null,arguments)}}},[o("el-form",{on:{submit:function(s){s.preventDefault(),s.stopPropagation()}}},[o("el-form-item",[o(i.SearchItem,t._b({attrs:{search:i.search,teleported:!1}},"SearchItem",{style:"width: 100%"},!1))],1)],1),o("el-space",{staticStyle:{width:"100%","justify-content":"end"},attrs:{size:"small"}},[o("el-button",{attrs:{size:"small"},on:{click:i.reset}},[t._v(" 重置 ")]),o("el-button",{attrs:{loading:i.loading,size:"small",type:"primary"},on:{click:i.doSearch}},[t._v("搜索")])],1)],1)]):t._e()},iE=[],sE=se(tE,oE,iE,!1,null,null);const nE=sE.exports,rE=E.defineComponent({name:"ClDrawerSearch"}),lE=E.defineComponent({...rE,props:{search:null,teleported:{type:Boolean},searchRemote:{type:Function},attached:{type:Boolean}},setup(e){const t=e,{visible:o,loading:i,loadingClass:s,hasConditionColor:n,doSearch:r,reset:l}=pd(t.searchRemote,t,t.search);return E.onMounted(()=>{t.attached||l()}),{__sfc:!0,props:t,visible:o,loading:i,loadingClass:s,hasConditionColor:n,doSearch:r,reset:l,SearchItem:Cn}}});var aE=function(){var t=this,o=t._self._c,i=t._self._setupProxy;return o("div",[o("div",{on:{click:function(s){i.visible=!0}}},[t._t("default",function(){return[o("el-button",{attrs:{disabled:i.loading,circle:""}},[o("i",{class:["el-icon-search",i.loadingClass],attrs:{color:i.hasConditionColor}},[o("Search")],1)])]},null,{loading:i.loading})],2),o("el-drawer",{attrs:{"append-to-body":"","with-header":!1},on:{keyup:function(s){return!s.type.indexOf("key")&&t._k(s.keyCode,"enter",13,s.key,"Enter")?null:i.doSearch.apply(null,arguments)}},model:{value:i.visible,callback:function(s){i.visible=s},expression:"visible"}},[o("el-form",{staticStyle:{height:"calc(100% - 100px)"},attrs:{"label-position":"right","label-suffix":":","label-width":"auto"}},[o("el-scrollbar",t._l(t.search,function(s){return o("el-form-item",{key:s.field,attrs:{label:s.label}},[o(i.SearchItem,t._b({attrs:{search:s,teleported:""}},"SearchItem",{style:"width: 100%"},!1))],1)}),1)],1),o("el-divider"),o("el-space",{staticStyle:{width:"100%","justify-content":"end"},attrs:{size:"small"}},[o("el-button",{on:{click:i.reset}},[t._v(" 重置 ")]),o("el-button",{attrs:{loading:i.loading,type:"primary"},on:{click:i.doSearch}},[t._v("搜索")])],1)],1)],1)},dE=[],cE=se(lE,aE,dE,!1,null,null);const fd=cE.exports;var uE=Object.defineProperty,hE=(e,t,o)=>t in e?uE(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,gE=(e,t,o)=>hE(e,t+"",o);class mn{constructor(t){gE(this,"record"),this.record=t}static from(t){const o=t.filter(i=>{var s;return(s=i.value)!=null?s:!1}).reduce((i,s)=>({...i,...O.isPlainObject(s.value)?s.value:{[s.field]:s.value}}),{});return new mn(o)}transform(t,o){const i=this.record[t],s=o(i);return delete this.record[t],this.record={...this.record,...s},this}toCondition(t){return{...this.record,...t??{}}}}const pE=E.defineComponent({name:"SearchButton"}),fE=E.defineComponent({...pE,props:{searches:null},setup(e){const t=e,o=E.inject(ct);return{__sfc:!0,props:t,context:o,ClDrawerSearch:fd}}});var CE=function(){var t=this,o=t._self._c,i=t._self._setupProxy;return o(i.ClDrawerSearch,{attrs:{search:t.searches,"search-remote":i.context.refresh}})},mE=[],wE=se(fE,CE,mE,!1,null,"45be5dfc");const Cd=wE.exports,vE=E.defineComponent({name:"RefreshButton"}),SE=E.defineComponent({...vE,setup(e){const t=E.ref(!1),{refresh:o}=E.inject(ct);return{__sfc:!0,loading:t,refresh:o,handlerRefreshClick:async()=>{if(!t.value){t.value=!0;try{await o()}catch(s){console.error(s)}finally{t.value=!1}}}}}});var bE=function(){var t=this,o=t._self._c,i=t._self._setupProxy;return o("el-button",{attrs:{disabled:i.loading,circle:""},on:{click:i.handlerRefreshClick}},[o("i",{class:["el-icon-refresh",i.loading?"is-loading":""]})])},yE=[],RE=se(SE,bE,yE,!1,null,"0eaeb325");const md=RE.exports;function wd(e,t){const o=t(e);return EE(e)&&(o.children=e.children.map(i=>wd(i,t))),o}const EE=e=>!!e.children,xE=()=>{const e=E.inject(ct),t=E.ref(),o=E.ref([]),i=E.ref([]),s=E.ref(),n=C=>{const m=e.api.value.getAllDisplayedColumns(),w=m.find(S=>S.getColId()===C);return w?m.indexOf(w):-1},r=C=>{if(C.field)return C.field;if(C.groupId)return C.groupId;throw new Error(`${C.headerName} field or groupId not found`)},l=()=>{var C,m;o.value=(m=(C=e.api.value.getColumnDefs())==null?void 0:C.map(w=>wd(w,S=>{var v,b;return{id:r(S),label:S.headerName,pined:(b=(v=e.api.value.getColumnGroup(r(S)))==null?void 0:v.getPinned())!=null?b:S.pinned}})))!=null?m:[],i.value=e.api.value.getAllDisplayedColumns().map(w=>w.getColId())},a=(C,m,w)=>w!=="inner"&&C.parent===m.parent,d=()=>{s.value=t.value.getCheckedKeys()},c=C=>{if(C instanceof We)return[C];const m=C.getChildren();return m?[...m.flatMap(w=>c(w))]:[]},u=(C,m,w)=>{const S=n(m[0].colId),v=n(w.colId);return C==="after"?v-m.length+1:v>S?v-m.length:v};return{treeData:o,defaultCheckedKeys:i,treeRef:t,refreshTreeData:l,checkColumnAllowDrop:a,onColumnDragStart:d,onColumnDragFinish:(C,m,w)=>{if(m&&C&&C.key!==m.key){const S=e.api.value.getColumnGroup(C.key),v=e.api.value.getColumn(C.key),b=e.api.value.getColumn(m.key),D=c(S??v);if(b){const I=u(w,D,b);e.api.value.moveColumns(D,I)}}t.value.setCheckedKeys(s.value),s.value=void 0},onColumnVisibleChange:(C,m)=>{e.api.value.setColumnsVisible([C.id],m)},onColumnPinedChange:(C,m)=>{var w;const S=e.api.value.getColumnGroup(C),v=S?S.getDisplayedLeafColumns().map(D=>D.getColId()):[C],b=S?S.getPinned():(w=e.api.value.getColumn(C))==null?void 0:w.getPinned();e.api.value.setColumnsPinned(v,b===m?null:m),l()},columnAutoResize:()=>{e.api.value.sizeColumnsToFit()}}},DE=E.defineComponent({name:"SettingButton"}),FE=E.defineComponent({...DE,setup(e){const{treeRef:t,treeData:o,defaultCheckedKeys:i,refreshTreeData:s,checkColumnAllowDrop:n,onColumnDragStart:r,onColumnDragFinish:l,onColumnVisibleChange:a,onColumnPinedChange:d,columnAutoResize:c}=xE(),u=E.ref(!1),h=E.inject(ct);return{__sfc:!0,treeRef:t,treeData:o,defaultCheckedKeys:i,refreshTreeData:s,checkColumnAllowDrop:n,onColumnDragStart:r,onColumnDragFinish:l,onColumnVisibleChange:a,onColumnPinedChange:d,columnAutoResize:c,visible:u,gridContext:h,handleResetGridState:()=>{h.resetGridState(),s()}}}});var PE=function(){var t=this,o=t._self._c,i=t._self._setupProxy;return o("div",[o("el-button",{attrs:{circle:""},on:{click:function(s){i.visible=!0}}},[o("i",{staticClass:"el-icon-setting"})]),o("el-drawer",{staticClass:"setting-drawer",attrs:{visible:i.visible,size:280,"modal-append-to-body":!0,"append-to-body":!0},on:{"update:visible":function(s){i.visible=s},open:i.refreshTreeData},scopedSlots:t._u([{key:"title",fn:function(){return[o("div",{staticStyle:{display:"flex","align-items":"center"}},[o("span",[t._v("表格显示设置")])])]},proxy:!0}])},[o("el-button",{staticStyle:{"margin-left":"10px"},attrs:{type:"primary",plain:"",size:"mini"},on:{click:i.handleResetGridState}},[t._v("重置")]),o("el-button",{attrs:{type:"primary",plain:"",size:"mini"},on:{click:i.columnAutoResize}},[t._v("自适应")]),i.treeData.length>0?o("el-tree",{ref:"treeRef",staticClass:"cl-grid-column-settings cl-scrollbar",attrs:{"allow-drop":i.checkColumnAllowDrop,"node-key":"id","default-checked-keys":i.defaultCheckedKeys,"show-checkbox":"",data:i.treeData,"default-expand-all":"",draggable:"","highlight-current":""},on:{"node-drag-start":i.onColumnDragStart,"node-drag-end":i.onColumnDragFinish,"check-change":i.onColumnVisibleChange},scopedSlots:t._u([{key:"default",fn:function({node:s}){return[o("div",{class:{"pined-row":s.data.pined==="left"||s.data.pined==="right"},staticStyle:{display:"flex","justify-content":"space-between",width:"100%"}},[o("span",{class:[s.data.pined==="left"||s.data.pined==="right"?"pined-active":""]},[t._v(" "+t._s(s.label)+" ")]),o("span",[o("i",{class:["el-icon-arrow-left",s.data.pined==="left"?"pined-active":""],on:{click:function(n){return n.stopPropagation(),(()=>i.onColumnPinedChange(s.key,"left")).apply(null,arguments)}}}),o("i",{class:["el-icon-arrow-right",s.data.pined==="right"?"pined-active":""],on:{click:function(n){return n.stopPropagation(),(()=>i.onColumnPinedChange(s.key,"right")).apply(null,arguments)}}})])])]}}],null,!1,2278526884)}):t._e()],1)],1)},TE=[],IE=se(FE,PE,TE,!1,null,"522bf761");const vd=IE.exports,AE={functional:!0,name:"HeaderVNodeRender",props:["params"],render(e,t){const o=t.props.params;return o.headerRender?o.headerRender(o):e("span",o.displayName)}},ME=E.defineComponent({name:"HeaderRenderer"}),kE=E.defineComponent({...ME,props:{params:null},setup(e){const t=e,o=E.ref(),i=E.ref(-1),s=E.inject(ct),n=()=>{o.value=t.params.column.getSort(),i.value=Na(t.params.api,t.params.column.getColId())},r=async(l,a)=>{try{o.value=l,t.params.setSort(l,a.shiftKey),await s.refresh()}catch{}};return E.onMounted(()=>{t.params.api.addEventListener("sortChanged",n),n()}),E.onUnmounted(()=>{t.params.api.removeEventListener("sortChanged",n)}),{__sfc:!0,props:t,sorted:o,sortIndex:i,context:s,handleSortChange:n,handleSortClick:r,HeaderVNodeRender:AE}}});var LE=function(){var t=this,o=t._self._c,i=t._self._setupProxy;return o("div",[t.params.headerRender?o(i.HeaderVNodeRender,{attrs:{params:t.params}}):o("span",[t._v(t._s(t.params.displayName))]),t.params.enableSorting?[i.sortIndex>=0?o("span",{staticStyle:{"line-height":"12px"}},[t._v(" "+t._s(i.sortIndex+1))]):t._e(),i.sorted==="asc"?o("i",{staticClass:"el-icon-sort-up",staticStyle:{cursor:"pointer"},attrs:{color:"var(--el-color-primary)"},on:{click:s=>i.handleSortClick(null,s)}}):i.sorted==="desc"?o("i",{staticClass:"el-icon-sort-down",staticStyle:{cursor:"pointer"},attrs:{color:"var(--el-color-danger, #F56C6C)"},on:{click:s=>i.handleSortClick("asc",s)}}):o("i",{staticClass:"el-icon-sort",staticStyle:{cursor:"pointer"},on:{click:s=>i.handleSortClick("desc",s)}})]:t._e()],2)},GE=[],HE=se(kE,LE,GE,!1,null,"126699e0");const OE=HE.exports,BE=E.defineComponent({name:"GridEmptyDataOverlay"}),VE=E.defineComponent({...BE,setup(e){return{__sfc:!0}}});var NE=function(){var t=this,o=t._self._c;return t._self._setupProxy,o("el-empty",{attrs:{description:"没有数据了","image-size":75}})},_E=[],WE=se(VE,NE,_E,!1,null,"05fc87c0");const zE=WE.exports,$E=E.defineComponent({name:"GridLoadingOverlay"}),UE=E.defineComponent({...$E,setup(e){return{__sfc:!0}}});var KE=function(){var t=this,o=t._self._c;return t._self._setupProxy,o("div",{directives:[{name:"loading",rawName:"v-loading",value:!0,expression:"true"}],staticClass:"table-loading",staticStyle:{height:"100%",width:"100%"},attrs:{"element-loading-text":"加载中","element-loading-background":"rgba(0, 0, 0, 0.1)"}})},jE=[],qE=se(UE,KE,jE,!1,null,"c60c1386");const YE=qE.exports,ZE=(e,t,o)=>ed({columns:e.columns,gridOptions:e.gridOptions,footerHeight:e.footerHeight},t,o),QE=()=>({theme:E.ref("ag-theme-alpine")}),XE=E.defineComponent({name:"Grid",components:{SearchButton:Cd,RefreshButton:md,SettingButton:vd,CellRenderer:GR,GridEmptyDataOverlay:zE,HeaderRenderer:OE,GridLoadingOverlay:YE,AgGridVue:ud,GridToolbar:gd,FooterCellRender:UR}}),JE=E.defineComponent({...XE,props:{id:null,rowIdMapper:{type:Function},columns:null,rowData:{type:Function},pageSize:{default:50},footerHeight:null,tools:{default:()=>["search","refresh","setting"]},searches:null,gridOptions:null,editable:null,onRowChange:{type:Function}},setup(e,{expose:t}){const o=e,i=E.ref(),s=E.ref(),{theme:n}=QE(),{gridOptions:r,dataCache:l,gridStyles:a,gridApi:d,gridElRef:c,reload:u,insertRows:h,existRow:g,getRows:p,refresh:f,resetGridState:C}=PR(o),{footerGridOptions:m,setFooterData:w,footerStyles:S}=ZE(o,s,a);return E.provide(ct,{refresh:f,resetGridState:C,api:d}),E.watch(()=>r.value,()=>{d.value&&d.value.updateGridOptions(O.omit(r.value,["scrollbarWidth","getRowId","suppressRowTransform","defaultColGroupDef"]))},{deep:!0}),t({setFooterData:w,updateGridOptions:v=>{d.value.updateGridOptions(v)},reload:u,refresh:f,getRows:p,createRow(v,b=!1){const D=l.value.createRow(v);return b?new Fi(D,o.rowIdMapper,!0):D},existRow:g,insertRows:h,startEditing:()=>{const v=l.value.getRows().filter(b=>!b.isEditing());O.isEmpty(v)||(v.forEach(b=>b.startEditing()),u(),d.value.redrawRows())},stopEditing:()=>{const v=l.value.getRows().filter(b=>b.isEditing());O.isEmpty(v)||(v.forEach(b=>b.stopEditing()),u(),d.value.redrawRows())}}),{__sfc:!0,props:o,bottomRef:i,gridRef:s,theme:n,options:r,dataCache:l,gridStyles:a,gridApi:d,gridElRef:c,reload:u,insertRows:h,existRow:g,getRows:p,refresh:f,resetGridState:C,footerGridOptions:m,setFooterData:w,footerStyles:S,AgGridVue:ud,GridToolbar:gd,SearchButton:Cd,RefreshButton:md,SettingButton:vd}}});var e0=function(){var t=this,o=t._self._c,i=t._self._setupProxy;return o("div",{ref:"gridElRef",staticClass:"cl-grid"},[o(i.GridToolbar,{scopedSlots:t._u([{key:"system",fn:function(){return[t.searches&&t.tools.includes("search")?o(i.SearchButton,{attrs:{searches:t.searches}}):t._e(),t.tools.includes("refresh")?o(i.RefreshButton):t._e(),t.tools.includes("setting")?o(i.SettingButton):t._e()]},proxy:!0}])},[t._t("toolbar")],2),o("div",{staticClass:"cl-grid-container"},[o(i.AgGridVue,{ref:"gridRef",staticClass:"cl-scrollbar flex-1",class:[i.theme],style:i.gridStyles,attrs:{tooltipShowDelay:500,"loading-overlay-component":"GridLoadingOverlay","no-rows-overlay-component":"GridEmptyDataOverlay","grid-options":{...i.options,suppressHorizontalScroll:!!t.footerHeight,alignedGrids:()=>[i.bottomRef.value].filter(s=>s)}}}),t.footerHeight?o(i.AgGridVue,{ref:"bottomRef",staticClass:"cl-scrollbar footer-grid",class:[i.theme],style:i.footerStyles,attrs:{"grid-options":i.footerGridOptions.value}}):t._e()],1)],1)},t0=[],o0=se(JE,e0,t0,!1,null,null);const i0=o0.exports;var s0=Object.defineProperty,n0=(e,t,o)=>t in e?s0(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,yo=(e,t,o)=>n0(e,typeof t!="symbol"?t+"":t,o);const r0=e=>new Sd(e);class Sd{constructor(t){yo(this,"colDef"),yo(this,"agGridCellRenderParams"),this.colDef=t,this.agGridCellRenderParams={}}cellRender(t){return this.agGridCellRenderParams.render=t,this}footerRender(t){return this.agGridCellRenderParams.footerRender=t,this}editeRender(t){return this.agGridCellRenderParams.editeRender=t,this}headerRender(t){return this.agGridCellRenderParams.headerRender=t,this}build(){return this.agGridCellRenderParams.headerRender&&(this.colDef.headerComponentParams=this.agGridCellRenderParams.headerRender),this.colDef.cellRendererParams=this.agGridCellRenderParams,this.colDef}}const l0=e=>new bd(e);class bd{constructor(t){yo(this,"colDefs"),yo(this,"rendersMap",new Map),yo(this,"headerRendersMap",new Map),this.colDefs=t,this.eachColDef(t,o=>{this.rendersMap.set(o.field,{}),this.headerRendersMap.set(o.field,{})})}eachColDef(t,o){for(const i of t)ja.isGroupColDef(i)?this.eachColDef(i.children,o):o(i)}getRenderParams(t){if(!this.rendersMap.has(t))throw new Error(`${t} 不存在配置项`);return this.rendersMap.get(t)}getHeaderRenderParams(t){if(!this.headerRendersMap.has(t))throw new Error(`${t} 不存在配置项`);return this.headerRendersMap.get(t)}render(t,o){return this.getRenderParams(t).render=o,this}footerRender(t,o){return this.getRenderParams(t).footerRender=o,this}editRender(t,o){return this.getRenderParams(t).editeRender=o,this}headerRender(t,o){return this.getHeaderRenderParams(t).headerRender=o,this}alwaysRender(t){this.eachColDef(this.colDefs,o=>{o.field===t&&(o.enableCellChangeFlash=!1,o.tooltipValueGetter=()=>"",o.valueGetter=i=>i.data.getSignature())})}build(){return this.eachColDef(this.colDefs,t=>{const o=this.headerRendersMap.get(t.field);o!=null&&o.headerRender&&(t.headerComponentParams=o),t.cellRendererParams=this.rendersMap.get(t.field)}),this.colDefs}}const a0=(e,t)=>({model:{value:O.get(e,t),callback:o=>{O.set(e,t,o)}}});Ld({theme:"legacy"});const d0={install:()=>{$u.registerModules([qS,YS,ZS,QS,JS,XS,yb,rb,iS,_l,Ha,Mb,Nb,Ub,Xb,ld,Cv,ay,py,dy,Sy,vv,Cb,xa,by,Ry,ef,ny,cd,dd,eb])}};L.ActualRow=mo,L.CLEAN_AG_GRID_OPTIONS=Ua,L.CellEditableRow=Pi,L.CellRenderAdapter=Sd,L.CellValue=Bt,L.ClDrawerSearch=fd,L.ClPopoverSearch=nE,L.ClSearch=JR,L.ClientSideRowModelApiModule=cd,L.ClientSideRowModelModule=dd,L.ColumnRendersBuilder=bd,L.EditableRow=Fi,L.GRID_CONTEXT=ct,L.Grid=i0,L.GridDataCache=$a,L.GridDataSource=_a,L.GridUtils=ja,L.ID_FIRST_DEEP=Ka,L.ID_SPLITTER=Ti,L.ProjectionRow=Ot,L.RowSelectionModule=ld,L.RowSpans=hn,L.Searches=mn,L.ServerGetRowsParamsRequest=Vt,L.SharedRowSelectionModule=rd,L.SpanMatrix=za,L.VueGridPlugin=d0,L._getColumnSortIndexe=Na,L._getSortedColumns=un,L._getSortedColumnsIndexes=Va,L.buildProxyOptions=Ya,L.defaultColDefCellClassRules=Qa,L.isActualRow=Fy,L.isGridRow=Dy,L.mergeRowClass=gn,L.selectionColumnCellClassRules=Za,L.useFooter=ed,L.useGrid=Ja,L.useGridScroll=Xa,L.useGridState=qa,L.vModel=a0,L.withColumnRenderBuilder=l0,L.withRender=r0,Object.defineProperty(L,Symbol.toStringTag,{value:"Module"})});
|
|
58
|
+
If you are trying to annotate ${i} with application data, use the '${i}.context' property instead.`),qt(c)}if(l.length>0&&s){const a=this.beans.frameworkOverrides.getDocLink(s);qt(`to see all the valid ${i} properties please check: ${a}`)}}getConsoleMessage(e,t){return Iv(e,t)}};function tS(e,t,o){const i={},s=e.filter(n=>!t.some(r=>r===n));return s.length>0&&s.forEach(n=>i[n]=ln({inputValue:n,allSuggestions:o}).values),i}var oS=new Set(["firstChildChanged","lastChildChanged","childIndexChanged"]),iS={moduleName:"Validation",version:H,beans:[eS]},Ri=0,sS=200,nS=class extends x{constructor(){super(...arguments),this.beanName="popupSvc",this.popupList=[]}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.gridCtrl=e.gridCtrl}),this.addManagedEventListeners({gridStylesChanged:this.handleThemeChange.bind(this)})}getPopupParent(){const e=this.gos.get("popupParent");return e||this.gridCtrl.getGui()}positionPopupForMenu(e){const{eventSource:t,ePopup:o,column:i,node:s,event:n}=e,r=t.getBoundingClientRect(),l=this.getParentRect();this.setAlignedTo(t,o);let a=!1;const d=()=>{const c=this.keepXYWithinBounds(o,r.top-l.top,0),u=o.clientWidth>0?o.clientWidth:200;a||(o.style.minWidth=`${u}px`,a=!0);const g=l.right-l.left-u;let p;return this.gos.get("enableRtl")?(p=C(),p<0&&(p=f(),this.setAlignedStyles(o,"left")),p>g&&(p=0,this.setAlignedStyles(o,"right"))):(p=f(),p>g&&(p=C(),this.setAlignedStyles(o,"right")),p<0&&(p=0,this.setAlignedStyles(o,"left"))),{x:p,y:c};function f(){return r.right-l.left-2}function C(){return r.left-l.left-u}};this.positionPopup({ePopup:o,keepWithinBounds:!0,updatePosition:d,postProcessCallback:()=>this.callPostProcessPopup("subMenu",o,t,n instanceof MouseEvent?n:void 0,i,s)})}positionPopupUnderMouseEvent(e){const{ePopup:t,nudgeX:o,nudgeY:i,skipObserver:s}=e;this.positionPopup({ePopup:t,nudgeX:o,nudgeY:i,keepWithinBounds:!0,skipObserver:s,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:o,nudgeY:i,keepWithinBounds:s,eventSource:n,alignSide:r="left",position:l="over",column:a,rowNode:d,type:c}=e,u=n.getBoundingClientRect(),h=this.getParentRect();this.setAlignedTo(n,t);const g=()=>{let p=u.left-h.left;r==="right"&&(p-=t.offsetWidth-u.width);let f;return l==="over"?(f=u.top-h.top,this.setAlignedStyles(t,"over")):(this.setAlignedStyles(t,"under"),this.shouldRenderUnderOrAbove(t,u,h,e.nudgeY||0)==="under"?f=u.top-h.top+u.height:f=u.top-t.offsetHeight-(i||0)*2-h.top),{x:p,y:f}};this.positionPopup({ePopup:t,nudgeX:o,nudgeY:i,keepWithinBounds:s,updatePosition:g,postProcessCallback:()=>this.callPostProcessPopup(c,t,n,null,a,d)})}shouldRenderUnderOrAbove(e,t,o,i){const s=o.bottom-t.bottom,n=t.top-o.top,r=e.offsetHeight+i;return s>r?"under":n>r||n>s?"above":"under"}setAlignedStyles(e,t){const o=this.getPopupIndex(e);if(o===-1)return;const i=this.popupList[o],{alignedToElement:s}=i;!s||(["right","left","over","above","under"].forEach(r=>{s.classList.remove(`ag-has-popup-positioned-${r}`),e.classList.remove(`ag-popup-positioned-${r}`)}),!t)||(s.classList.add(`ag-has-popup-positioned-${t}`),e.classList.add(`ag-popup-positioned-${t}`))}setAlignedTo(e,t){const o=this.getPopupIndex(t);if(o!==-1){const i=this.popupList[o];i.alignedToElement=e}}callPostProcessPopup(e,t,o,i,s,n){const r=this.gos.getCallback("postProcessPopup");r&&r({column:s,rowNode:n,ePopup:t,type:e,eventSource:o,mouseEvent:i})}positionPopup(e){const{ePopup:t,keepWithinBounds:o,nudgeX:i,nudgeY:s,skipObserver:n,updatePosition:r}=e,l={width:0,height:0},a=(d=!1)=>{let{x:c,y:u}=r();d&&t.clientWidth===l.width&&t.clientHeight===l.height||(l.width=t.clientWidth,l.height=t.clientHeight,i&&(c+=i),s&&(u+=s),o&&(c=this.keepXYWithinBounds(t,c,1),u=this.keepXYWithinBounds(t,u,0)),t.style.left=`${c}px`,t.style.top=`${u}px`,e.postProcessCallback&&e.postProcessCallback())};if(a(),!n){const d=Ze(this.beans,t,()=>a(!0));setTimeout(()=>d(),sS)}}getActivePopups(){return this.popupList.map(e=>e.element)}getParentRect(){const e=X(this.beans);let t=this.getPopupParent();return t===e.body?t=e.documentElement:getComputedStyle(t).position==="static"&&(t=t.offsetParent),Hn(t)}keepXYWithinBounds(e,t,o){const i=o===0,s=i?"clientHeight":"clientWidth",n=i?"top":"left",r=i?"height":"width",l=i?"scrollTop":"scrollLeft",a=X(this.beans),d=a.documentElement,c=this.getPopupParent(),u=e.getBoundingClientRect(),h=c.getBoundingClientRect(),g=a.documentElement.getBoundingClientRect(),p=c===a.body,f=Math.ceil(u[r]);let m=p?(i?oc:ji)(d)+d[l]:c[s];p&&(m-=Math.abs(g[n]-h[n]));const w=m-f;return Math.min(Math.max(t,0),Math.abs(w))}addPopup(e){const t=X(this.beans),{eChild:o,ariaLabel:i,ariaOwns:s,alwaysOnTop:n,positionCallback:r,anchorToElement:l}=e;if(!t)return k(122),{hideFunc:()=>{}};const a=this.getPopupIndex(o);if(a!==-1)return{hideFunc:this.popupList[a].hideFunc};this.initialisePopupPosition(o);const d=this.createPopupWrapper(o,!!n,i,s),c=this.addEventListenersToPopup({...e,wrapperEl:d});return r&&r(),this.addPopupToPopupList(o,d,c,l),{hideFunc:c}}initialisePopupPosition(e){const o=this.getPopupParent().getBoundingClientRect();M(e.style.top)||(e.style.top=`${o.top*-1}px`),M(e.style.left)||(e.style.left=`${o.left*-1}px`)}createPopupWrapper(e,t,o,i){const s=this.getPopupParent(),{environment:n,gos:r}=this.beans,l=Q({tag:"div"});return n.applyThemeClasses(l),l.classList.add("ag-popup"),e.classList.add(r.get("enableRtl")?"ag-rtl":"ag-ltr","ag-popup-child"),e.hasAttribute("role")||Be(e,"dialog"),o?zt(e,o):i&&(e.id||(e.id=`popup-component-${Ri}`),Pn(i,e.id)),l.appendChild(e),s.appendChild(l),t?this.setAlwaysOnTop(e,!0):this.bringPopupToFront(e),l}handleThemeChange(e){if(e.themeChanged){const t=this.beans.environment;for(const o of this.popupList)t.applyThemeClasses(o.wrapper)}}addEventListenersToPopup(e){const t=this.beans,o=X(t),i=this.getPopupParent(),{wrapperEl:s,eChild:n,closedCallback:r,afterGuiAttached:l,closeOnEsc:a,modal:d,ariaOwns:c}=e;let u=!1;const h=C=>{if(!s.contains(j(t)))return;C.key===y.ESCAPE&&!ke(C)&&f({keyboardEvent:C})},g=C=>f({mouseEvent:C}),p=C=>f({touchEvent:C}),f=(C={})=>{const{mouseEvent:m,touchEvent:w,keyboardEvent:S,forceHide:v}=C;!v&&(this.isEventFromCurrentPopup({mouseEvent:m,touchEvent:w},n)||u)||(u=!0,i.removeChild(s),o.removeEventListener("keydown",h),o.removeEventListener("mousedown",g),o.removeEventListener("touchstart",p),o.removeEventListener("contextmenu",g),this.eventSvc.removeEventListener("dragStarted",g),r&&r(m||w||S),this.removePopupFromPopupList(n,c))};return l&&l({hidePopup:f}),window.setTimeout(()=>{a&&o.addEventListener("keydown",h),d&&(o.addEventListener("mousedown",g),this.eventSvc.addEventListener("dragStarted",g),o.addEventListener("touchstart",p),o.addEventListener("contextmenu",g))},0),f}addPopupToPopupList(e,t,o,i){this.popupList.push({element:e,wrapper:t,hideFunc:o,instanceId:Ri,isAnchored:!!i}),i&&this.setPopupPositionRelatedToElement(e,i),Ri=Ri+1}getPopupIndex(e){return this.popupList.findIndex(t=>t.element===e)}setPopupPositionRelatedToElement(e,t){const o=this.getPopupIndex(e);if(o===-1)return;const i=this.popupList[o];if(i.stopAnchoringPromise&&i.stopAnchoringPromise.then(n=>n&&n()),i.stopAnchoringPromise=void 0,i.isAnchored=!1,!t)return;const s=this.keepPopupPositionedRelativeTo({element:t,ePopup:e,hidePopup:i.hideFunc});return i.stopAnchoringPromise=s,i.isAnchored=!0,s}removePopupFromPopupList(e,t){this.setAlignedStyles(e,null),this.setPopupPositionRelatedToElement(e,null),t&&Pn(t,null),this.popupList=this.popupList.filter(o=>o.element!==e)}keepPopupPositionedRelativeTo(e){const t=this.getPopupParent(),o=t.getBoundingClientRect(),{element:i,ePopup:s}=e,n=i.getBoundingClientRect(),r=u=>parseInt(u.substring(0,u.length-1),10),l=(u,h)=>{const g=o[u]-n[u],p=r(s.style[u]);return{initialDiff:g,lastDiff:g,initial:p,last:p,direction:h}},a=l("top",0),d=l("left",1),c=this.beans.frameworkOverrides;return new eo(u=>{c.wrapIncoming(()=>{c.setInterval(()=>{const h=t.getBoundingClientRect(),g=i.getBoundingClientRect();if(g.top==0&&g.left==0&&g.height==0&&g.width==0){e.hidePopup();return}const f=(C,m)=>{const w=r(s.style[m]);C.last!==w&&(C.initial=w,C.last=w);const S=h[m]-g[m];if(S!=C.lastDiff){const v=this.keepXYWithinBounds(s,C.initial+C.initialDiff-S,C.direction);s.style[m]=`${v}px`,C.last=v}C.lastDiff=S};f(a,"top"),f(d,"left")},200).then(h=>{u(()=>{h!=null&&window.clearInterval(h)})})},"popupPositioning")})}hasAnchoredPopup(){return this.popupList.some(e=>e.isAnchored)}isEventFromCurrentPopup(e,t){const{mouseEvent:o,touchEvent:i}=e,s=o||i;if(!s)return!1;const n=this.getPopupIndex(t);if(n===-1)return!1;for(let r=n;r<this.popupList.length;r++){const l=this.popupList[r];if(Pc(l.element,s))return!0}return this.isElementWithinCustomPopup(s.target)}isElementWithinCustomPopup(e){const t=X(this.beans);for(;e&&e!==t.body;){if(e.classList.contains("ag-custom-component-popup")||e.parentElement===null)return!0;e=e.parentElement}return!1}getWrapper(e){for(;!e.classList.contains("ag-popup")&&e.parentElement;)e=e.parentElement;return e.classList.contains("ag-popup")?e:null}setAlwaysOnTop(e,t){const o=this.getWrapper(e);o&&(o.classList.toggle("ag-always-on-top",!!t),t&&this.bringPopupToFront(o))}bringPopupToFront(e){const t=this.getPopupParent(),o=Array.prototype.slice.call(t.querySelectorAll(".ag-popup")),i=o.length,s=this.getWrapper(e);if(!s||i<=1||!t.contains(e))return;const n=[],r=[];for(const h of o)h!==s&&(h.classList.contains("ag-always-on-top")?r.push(h):n.push(h));const l=[],a=r.length,u=s.classList.contains("ag-always-on-top")||!a?[...n,...r,s]:[...n,s,...r];for(let h=0;h<=i;h++){const g=u[h];if(o[h]===u[h]||g===s)continue;g.querySelectorAll("div").forEach(f=>{f.scrollTop!==0&&l.push([f,f.scrollTop])}),h===0?t.insertAdjacentElement("afterbegin",g):u[h-1].insertAdjacentElement("afterend",g)}for(;l.length;){const h=l.pop();h[0].scrollTop=h[1]}}},Ea={moduleName:"Popup",version:H,beans:[nS]},rS=".ag-tooltip{background-color:var(--ag-tooltip-background-color);border:var(--ag-tooltip-border);border-radius:var(--ag-border-radius);color:var(--ag-tooltip-text-color);padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding);position:absolute;white-space:normal;z-index:99999;&:where(.ag-cell-editor-tooltip){background-color:var(--ag-tooltip-error-background-color);border:var(--ag-tooltip-error-border);color:var(--ag-tooltip-error-text-color);font-weight:500}}.ag-tooltip-custom{position:absolute;z-index:99999}.ag-tooltip-custom:where(:not(.ag-tooltip-interactive)),.ag-tooltip:where(:not(.ag-tooltip-interactive)){pointer-events:none}.ag-tooltip-animate{transition:opacity 1s;&:where(.ag-tooltip-hiding){opacity:0}}",cn=(e,t,o)=>{var l,a,d;const{editModelSvc:i}=e,s=(a=(l=i==null?void 0:i.getCellValidationModel())==null?void 0:l.getCellValidation(t))==null?void 0:a.errorMessages,n=(d=i==null?void 0:i.getRowValidationModel().getRowValidation(t))==null?void 0:d.errorMessages,r=s||n;return r&&r.length?r.join(o("tooltipValidationErrorSeparator",". ")):void 0},lS=class extends x{constructor(){super(...arguments),this.beanName="tooltipSvc"}setupHeaderTooltip(e,t,o,i){e&&t.destroyBean(e);const s=dn(this.gos),{column:n,eGui:r}=t,l=n.getColDef();!i&&s&&!l.headerComponent&&(i=Po(()=>r.querySelector(".ag-header-cell-text")));const a={getColumn:()=>n,getColDef:()=>n.getColDef(),getGui:()=>r,getLocation:()=>"header",getTooltipValue:()=>o??n.getColDef().headerTooltip,shouldDisplayTooltip:i};let d=this.createTooltipFeature(a);return d&&(d=t.createBean(d),t.setRefreshFunction("tooltip",()=>d.refreshTooltip())),d}setupHeaderGroupTooltip(e,t,o,i){e&&t.destroyBean(e);const s=dn(this.gos),{column:n,eGui:r}=t,l=n.getColGroupDef();!i&&s&&!(l!=null&&l.headerGroupComponent)&&(i=Po(()=>r.querySelector(".ag-header-group-text")));const a={getColumn:()=>n,getGui:()=>r,getLocation:()=>"headerGroup",getTooltipValue:()=>o??(l&&l.headerTooltip),shouldDisplayTooltip:i};l&&(a.getColDef=()=>l);const d=this.createTooltipFeature(a);return d&&t.createBean(d)}enableCellTooltipFeature(e,t,o){const{beans:i}=this,{gos:s,editSvc:n}=i,{column:r,rowNode:l}=e;let a="cell";const d=()=>{const g=!!!(n!=null&&n.isEditing(e))&&cn(i,e,this.getLocaleTextFunc());if(g)return a="cellEditor",g;a="cell";const p=r.getColDef(),f=l.data;if(p.tooltipField&&M(f))return Wt(f,p.tooltipField,r.isTooltipFieldContainsDots());const C=p.tooltipValueGetter;return C?C(N(s,{location:"cell",colDef:r.getColDef(),column:r,rowIndex:e.cellPosition.rowIndex,node:l,data:l.data,value:e.value,valueFormatted:e.valueFormatted})):null},c=dn(s);o||(c&&!e.isCellRenderer()?o=()=>{const h=!!(n!=null&&n.isEditing(e));if(!h&&cn(i,e,this.getLocaleTextFunc()))return!0;if(!r.isTooltipEnabled())return!1;const f=Po(()=>{const C=e.eGui;return C.children.length===0?C:C.querySelector(".ag-cell-value")});return!h&&f()}:o=()=>!(n!=null&&n.isEditing(e)));const u={getColumn:()=>r,getColDef:()=>r.getColDef(),getRowIndex:()=>e.cellPosition.rowIndex,getRowNode:()=>l,getGui:()=>e.eGui,getLocation:()=>a,getTooltipValue:t!=null?()=>t:d,getValueFormatted:()=>e.valueFormatted,shouldDisplayTooltip:o};return this.createTooltipFeature(u,i)}setupFullWidthRowTooltip(e,t,o,i){const s={getGui:()=>t.getFullWidthElement(),getTooltipValue:()=>o,getLocation:()=>"fullWidthRow",shouldDisplayTooltip:i},n=this.beans,r=n.context;e&&t.destroyBean(e,r);const l=this.createTooltipFeature(s,n);if(l)return t.createBean(l,r)}setupCellEditorTooltip(e,t){var l,a;const{beans:o}=this,{context:i}=o,s=((l=t.getValidationElement)==null?void 0:l.call(t,!0))||!((a=t.isPopup)!=null&&a.call(t))&&e.eGui;if(!s)return;const n={getGui:()=>s,getTooltipValue:()=>cn(o,e,this.getLocaleTextFunc()),getLocation:()=>"cellEditor",shouldDisplayTooltip:()=>{var p,f;const{editModelSvc:d}=o,c=(p=d==null?void 0:d.getRowValidationModel())==null?void 0:p.getRowValidationMap(),u=(f=d==null?void 0:d.getCellValidationModel())==null?void 0:f.getCellValidationMap(),h=!!c&&c.size>0,g=!!u&&u.size>0;return h||g}},r=this.createTooltipFeature(n,o);if(r)return e.createBean(r,i)}initCol(e){const{colDef:t}=e;e.tooltipEnabled=M(t.tooltipField)||M(t.tooltipValueGetter)||M(t.tooltipComponent)}createTooltipFeature(e,t){return this.beans.registry.createDynamicBean("tooltipFeature",!1,e,t)}},xa={moduleName:"Tooltip",version:H,beans:[lS],dynamicBeans:{tooltipFeature:Uv},userComponents:{agTooltipComponent:_v},dependsOn:[Ea],css:[rS]},aS=".ag-cell-inline-editing{border:var(--ag-cell-editing-border)!important;border-radius:var(--ag-border-radius);box-shadow:var(--ag-cell-editing-shadow);padding:0;z-index:1;.ag-cell-edit-wrapper,.ag-cell-editor,.ag-cell-wrapper,:where(.ag-cell-editor) .ag-input-field-input,:where(.ag-cell-editor) .ag-wrapper{height:100%;line-height:normal;min-height:100%;width:100%}&.ag-cell-editing-error{border-color:var(--ag-invalid-color)!important}}:where(.ag-popup-editor) .ag-large-text{background-color:var(--ag-background-color);border-radius:var(--ag-border-radius);box-shadow:var(--ag-dropdown-shadow);padding:0}.ag-large-text-input{height:auto;padding:var(--ag-cell-horizontal-padding)}:where(.ag-rtl .ag-large-text-input) textarea{resize:none}:where(.ag-ltr) .ag-checkbox-edit{padding-left:var(--ag-cell-horizontal-padding)}:where(.ag-rtl) .ag-checkbox-edit{padding-right:var(--ag-cell-horizontal-padding)}:where(.ag-row.ag-row-editing-invalid .ag-cell-inline-editing){opacity:.8}",dS={tag:"div",cls:"ag-cell-wrapper ag-cell-edit-wrapper ag-checkbox-edit",children:[{tag:"ag-checkbox",ref:"eEditor",role:"presentation"}]},cS=class extends fi{constructor(){super(dS,[Gs]),this.eEditor=A}initialiseEditor(e){const t=e.value??void 0,o=this.eEditor;o.setValue(t),o.getInputElement().setAttribute("tabindex","-1"),this.setAriaLabel(t),this.addManagedListeners(o,{fieldValueChanged:s=>this.setAriaLabel(s.selected)})}getValue(){return this.eEditor.getValue()}focusIn(){this.eEditor.getFocusableElement().focus()}afterGuiAttached(){this.params.cellStartedEdit&&this.focusIn()}isPopup(){return!1}setAriaLabel(e){const t=this.getLocaleTextFunc(),o=Tn(t,e),i=t("ariaToggleCellValue","Press SPACE to toggle cell value");this.eEditor.setInputAriaLabel(`${i} (${o})`)}getValidationElement(e){return e?this.params.eGridCell:this.eEditor.getInputElement()}getValidationErrors(){const{params:e}=this,{getValidationErrors:t}=e,o=this.getValue();return t?t({value:o,internalErrors:null,cellEditorParams:e}):null}},Ei=class extends fi{constructor(e){super(),this.cellEditorInput=e,this.eEditor=A}initialiseEditor(e){const{cellEditorInput:t}=this;this.setTemplate({tag:"div",cls:"ag-cell-edit-wrapper",children:[t.getTemplate()]},t.getAgComponents());const{eEditor:o}=this,{cellStartedEdit:i,eventKey:s,suppressPreventDefault:n}=e;o.getInputElement().setAttribute("title",""),t.init(o,e);let r,l=!0;i?(this.focusAfterAttached=!0,s===y.BACKSPACE||s===y.DELETE?r="":s&&s.length===1?n?l=!1:r=s:(r=t.getStartValue(),s!==y.F2&&(this.highlightAllOnFocus=!0))):(this.focusAfterAttached=!1,r=t.getStartValue()),l&&r!=null&&o.setStartValue(r),this.addGuiEventListener("keydown",a=>{const{key:d}=a;(d===y.PAGE_UP||d===y.PAGE_DOWN)&&a.preventDefault()})}afterGuiAttached(){var i,s;const e=this.getLocaleTextFunc(),t=this.eEditor;if(t.setInputAriaLabel(e("ariaInputEditor","Input Editor")),!this.focusAfterAttached)return;ht()||t.getFocusableElement().focus();const o=t.getInputElement();this.highlightAllOnFocus?o.select():(s=(i=this.cellEditorInput).setCaret)==null||s.call(i)}focusIn(){const{eEditor:e}=this,t=e.getFocusableElement(),o=e.getInputElement();t.focus(),o.select()}getValue(){return this.cellEditorInput.getValue()}isPopup(){return!1}getValidationElement(){return this.eEditor.getInputElement()}getValidationErrors(){return this.cellEditorInput.getValidationErrors()}},uS={tag:"ag-input-date-field",ref:"eEditor",cls:"ag-cell-editor"},hS=class{constructor(e,t){this.getDataTypeService=e,this.getLocaleTextFunc=t}getTemplate(){return uS}getAgComponents(){return[Dl]}init(e,t){var r,l;this.eEditor=e,this.params=t;const{min:o,max:i,step:s,colDef:n}=t;o!=null&&e.setMin(o),i!=null&&e.setMax(i),s!=null&&e.setStep(s),this.includeTime=t.includeTime??((l=(r=this.getDataTypeService())==null?void 0:r.getDateIncludesTimeFlag)==null?void 0:l.call(r,n.cellDataType)),this.includeTime!=null&&e.setIncludeTime(this.includeTime)}getValidationErrors(){const t=this.eEditor.getInputElement().valueAsDate,{params:o}=this,{min:i,max:s,getValidationErrors:n}=o;let r=[];const l=this.getLocaleTextFunc();if(t instanceof Date&&!isNaN(t.getTime())){if(i){const a=i instanceof Date?i:new Date(i);if(t<a){const d=a.toLocaleDateString();r.push(l("minDateValidation",`Date must be after ${d}`,[d]))}}if(s){const a=s instanceof Date?s:new Date(s);if(t>a){const d=a.toLocaleDateString();r.push(l("maxDateValidation",`Date must be before ${d}`,[d]))}}}return r.length||(r=null),n?n({value:t,cellEditorParams:o,internalErrors:r}):r}getValue(){const{eEditor:e,params:t}=this,o=e.getDate();return!M(o)&&!M(t.value)?t.value:o??null}getStartValue(){const{value:e}=this.params;if(e instanceof Date)return $e(e,this.includeTime??!1)}},gS=class extends Ei{constructor(){super(new hS(()=>this.beans.dataTypeSvc,()=>this.getLocaleTextFunc()))}},pS={tag:"ag-input-date-field",ref:"eEditor",cls:"ag-cell-editor"},fS=class{constructor(e,t){this.getDataTypeService=e,this.getLocaleTextFunc=t}getTemplate(){return pS}getAgComponents(){return[Dl]}init(e,t){var r,l;this.eEditor=e,this.params=t;const{min:o,max:i,step:s,colDef:n}=t;o!=null&&e.setMin(o),i!=null&&e.setMax(i),s!=null&&e.setStep(s),this.includeTime=t.includeTime??((l=(r=this.getDataTypeService())==null?void 0:r.getDateIncludesTimeFlag)==null?void 0:l.call(r,n.cellDataType)),this.includeTime!=null&&e.setIncludeTime(this.includeTime)}getValidationErrors(){const{eEditor:e,params:t}=this,o=e.getInputElement().value,i=this.formatDate(this.parseDate(o??void 0)),{min:s,max:n,getValidationErrors:r}=t;let l=[];if(i){const a=new Date(i),d=this.getLocaleTextFunc();if(s){const c=new Date(s);if(a<c){const u=c.toLocaleDateString();l.push(d("minDateValidation",`Date must be after ${u}`,[u]))}}if(n){const c=new Date(n);if(a>c){const u=c.toLocaleDateString();l.push(d("maxDateValidation",`Date must be before ${u}`,[u]))}}}return l.length||(l=null),r?r({value:this.getValue(),cellEditorParams:t,internalErrors:l}):l}getValue(){const{params:e,eEditor:t}=this,o=this.formatDate(t.getDate());return!M(o)&&!M(e.value)?e.value:e.parseValue(o??"")}getStartValue(){return $e(this.parseDate(this.params.value??void 0)??null,this.includeTime??!1)}parseDate(e){const t=this.getDataTypeService();return t?t.getDateParserFunction(this.params.column)(e):no(e)??void 0}formatDate(e){const t=this.getDataTypeService();return t?t.getDateFormatterFunction(this.params.column)(e):$e(e??null,this.includeTime??!1)??void 0}},CS=class extends Ei{constructor(){super(new fS(()=>this.beans.dataTypeSvc,()=>this.getLocaleTextFunc()))}},mS={tag:"div",cls:"ag-large-text",children:[{tag:"ag-input-text-area",ref:"eEditor",cls:"ag-large-text-input"}]},wS=class extends fi{constructor(){super(mS,[dp]),this.eEditor=A}initialiseEditor(e){const{eEditor:t}=this,{cellStartedEdit:o,eventKey:i,value:s,maxLength:n,cols:r,rows:l}=e;this.focusAfterAttached=o,t.getInputElement().setAttribute("title",""),t.setMaxLength(n||200).setCols(r||60).setRows(l||10);let a;o?(this.focusAfterAttached=!0,i===y.BACKSPACE||i===y.DELETE?a="":i&&i.length===1?a=i:(a=s.toString(),i!==y.F2&&(this.highlightAllOnFocus=!0))):(this.focusAfterAttached=!1,a=s.toString()),a!=null&&t.setValue(a,!0),this.addGuiEventListener("keydown",this.onKeyDown.bind(this)),this.activateTabIndex()}onKeyDown(e){const t=e.key;(t===y.LEFT||t===y.UP||t===y.RIGHT||t===y.DOWN||e.shiftKey&&t===y.ENTER)&&e.stopPropagation()}afterGuiAttached(){const{eEditor:e,focusAfterAttached:t,highlightAllOnFocus:o}=this,i=this.getLocaleTextFunc();e.setInputAriaLabel(i("ariaInputEditor","Input Editor")),t&&(e.getFocusableElement().focus(),o&&e.getInputElement().select())}getValue(){const{eEditor:e,params:t}=this,{value:o}=t,i=e.getValue();return!M(i)&&!M(o)?o:t.parseValue(i)}getValidationElement(){return this.eEditor.getInputElement()}getValidationErrors(){const{params:e}=this,{maxLength:t,getValidationErrors:o}=e,i=this.getLocaleTextFunc(),s=this.getValue();let n=[];return typeof s=="string"&&t!=null&&s.length>t&&n.push(i("maxLengthValidation",`Must be ${t} characters or fewer.`,[String(t)])),n.length||(n=null),o?o({value:s,internalErrors:n,cellEditorParams:e}):n}},vS={tag:"ag-input-number-field",ref:"eEditor",cls:"ag-cell-editor"},SS=class{constructor(e){this.getLocaleTextFunc=e}getTemplate(){return vS}getAgComponents(){return[up]}init(e,t){this.eEditor=e,this.params=t;const{max:o,min:i,precision:s,step:n}=t;o!=null&&e.setMax(o),i!=null&&e.setMin(i),s!=null&&e.setPrecision(s),n!=null&&e.setStep(n);const r=e.getInputElement();t.preventStepping?e.addManagedElementListeners(r,{keydown:this.preventStepping}):t.showStepperButtons&&r.classList.add("ag-number-field-input-stepper")}getValidationErrors(){const{params:e}=this,{min:t,max:o,getValidationErrors:i}=e,n=this.eEditor.getInputElement().valueAsNumber,r=this.getLocaleTextFunc();let l=[];return typeof n=="number"&&(t!=null&&n<t&&l.push(r("minValueValidation",`Must be greater than or equal to ${t}.`,[String(t)])),o!=null&&n>o&&l.push(r("maxValueValidation",`Must be less than or equal to ${o}.`,[String(o)]))),l.length||(l=null),i?i({value:n,cellEditorParams:e,internalErrors:l}):l}preventStepping(e){(e.key===y.UP||e.key===y.DOWN)&&e.preventDefault()}getValue(){const{eEditor:e,params:t}=this,o=e.getValue();if(!M(o)&&!M(t.value))return t.value;let i=t.parseValue(o);if(i==null)return i;if(typeof i=="string"){if(i==="")return null;i=Number(i)}return isNaN(i)?null:i}getStartValue(){return this.params.value}setCaret(){ht()&&this.eEditor.getInputElement().focus({preventScroll:!0})}},bS=class extends Ei{constructor(){super(new SS(()=>this.getLocaleTextFunc()))}},yS={tag:"div",cls:"ag-cell-edit-wrapper",children:[{tag:"ag-select",ref:"eEditor",cls:"ag-cell-editor"}]},RS=class extends fi{constructor(){super(yS,[vp]),this.eEditor=A,this.startedByEnter=!1}wireBeans(e){this.valueSvc=e.valueSvc}initialiseEditor(e){this.focusAfterAttached=e.cellStartedEdit;const{eEditor:t,valueSvc:o,gos:i}=this,{values:s,value:n,eventKey:r}=e;if($(s)){k(58);return}this.startedByEnter=r!=null?r===y.ENTER:!1;let l=!1;s.forEach(u=>{const h={value:u},g=o.formatValue(e.column,null,u),p=g!=null;h.text=p?g:u,t.addOption(h),l=l||n===u}),l?t.setValue(e.value,!0):e.values.length&&t.setValue(e.values[0],!0);const{valueListGap:a,valueListMaxWidth:d,valueListMaxHeight:c}=e;a!=null&&t.setPickerGap(a),c!=null&&t.setPickerMaxHeight(c),d!=null&&t.setPickerMaxWidth(d),i.get("editType")!=="fullRow"&&this.addManagedListeners(this.eEditor,{selectedItem:()=>e.stopEditing()})}afterGuiAttached(){this.focusAfterAttached&&this.eEditor.getFocusableElement().focus(),this.startedByEnter&&setTimeout(()=>{this.isAlive()&&this.eEditor.showPicker()})}focusIn(){this.eEditor.getFocusableElement().focus()}getValue(){return this.eEditor.getValue()}isPopup(){return!1}getValidationElement(){return this.eEditor.getAriaElement()}getValidationErrors(){const{params:e}=this,{values:t,getValidationErrors:o}=e,i=this.getValue();let s=[];if(t&&!t.includes(i)){const n=this.getLocaleTextFunc();s.push(n("invalidSelectionValidation","Invalid selection."))}else s=null;return o?o({value:i,internalErrors:s,cellEditorParams:e}):s}},ES={tag:"ag-input-text-field",ref:"eEditor",cls:"ag-cell-editor"},xS=class{constructor(e){this.getLocaleTextFunc=e}getTemplate(){return ES}getAgComponents(){return[lp]}init(e,t){this.eEditor=e,this.params=t;const o=t.maxLength;o!=null&&e.setMaxLength(o)}getValidationErrors(){const{params:e}=this,{maxLength:t,getValidationErrors:o}=e,i=this.getValue(),s=this.getLocaleTextFunc();let n=[];return t!=null&&typeof i=="string"&&i.length>t&&n.push(s("maxLengthValidation",`Must be ${t} characters or fewer.`,[String(t)])),n.length||(n=null),o?o({value:i,cellEditorParams:e,internalErrors:n}):n}getValue(){const{eEditor:e,params:t}=this,o=e.getValue();return!M(o)&&!M(t.value)?t.value:t.parseValue(o)}getStartValue(){const e=this.params;return e.useFormatter||e.column.getColDef().refData?e.formatValue(e.value):e.value}setCaret(){const e=this.eEditor,t=e.getValue(),o=M(t)&&t.length||0;o&&e.getInputElement().setSelectionRange(o,o)}},Da=class extends Ei{constructor(){super(new xS(()=>this.getLocaleTextFunc()))}};function DS(e){return e.ctrlsSvc.getScrollFeature().getVScrollPosition()}function FS(e){return e.ctrlsSvc.getScrollFeature().getHScrollPosition()}function Fa(e,t,o="auto"){e.frameworkOverrides.wrapIncoming(()=>e.ctrlsSvc.getScrollFeature().ensureColumnVisible(t,o),"ensureVisible")}function Pa(e,t,o){e.frameworkOverrides.wrapIncoming(()=>e.ctrlsSvc.getScrollFeature().ensureIndexVisible(t,o),"ensureVisible")}function PS(e,t,o=null){e.frameworkOverrides.wrapIncoming(()=>e.ctrlsSvc.getScrollFeature().ensureNodeVisible(t,o),"ensureVisible")}function TS(e){var i;const t=(i=e.editModelSvc)==null?void 0:i.getEditMap(),o=[];return t==null||t.forEach((s,n)=>{const{rowIndex:r,rowPinned:l}=n;s.forEach((a,d)=>{const{editorValue:c,pendingValue:u,sourceValue:h,state:g}=a,p=ze(a);let f=c??u;f===ge&&(f=void 0);const C={newValue:f,oldValue:h,state:g,column:d,colId:d.getColId(),colKey:d.getColId(),rowIndex:r,rowPinned:l};(g==="editing"||g==="changed"&&p)&&o.push(C)})}),o}function IS(e,t=!1){var i;const{editSvc:o}=e;o!=null&&o.isBatchEditing()?(t?(i=e.editModelSvc)==null||i.getEditPositions().forEach(s=>{s.state==="editing"&&o.revertSingleCellEdit(s)}):st(e,!0),Dt(e)):o==null||o.stopEditing(void 0,{cancel:t,source:"api"})}function AS(e,t){var i;const o=K(e,t);return((i=e.editSvc)==null?void 0:i.isEditing(o))??!1}function MS(e,t){const{key:o,colKey:i,rowIndex:s,rowPinned:n}=t,{editSvc:r,colModel:l}=e,a=l.getCol(i);if(!a){k(12,{colKey:i});return}const c=it(e,{rowIndex:s,rowPinned:n||null});if(!c){k(290,{rowIndex:s,rowPinned:n});return}if(!a.isCellEditable(c))return;n==null&&Pa(e,s),Fa(e,i),r==null||r.startEditing({rowNode:c,column:a},{event:o?new KeyboardEvent("keydown",{key:o}):void 0,source:"api"})}function kS(e){var t;return((t=e.editSvc)==null?void 0:t.validateEdit())||null}var LS={tag:"div",cls:"ag-popup-editor",attrs:{tabindex:"-1"}},GS=class extends ks{constructor(e){super(LS),this.params=e}postConstruct(){Xe(this.gos,this.getGui(),"popupEditorWrapper",!0),this.addKeyDownListener()}addKeyDownListener(){const e=this.getGui(),t=this.params,o=i=>{xs(this.gos,i,t.node,t.column,!0)||t.onKeyDown(i)};this.addManagedElementListeners(e,{keydown:o})}},xi=(e,t=!1)=>{if(e!==void 0)return ze(e)||t&&e.state==="editing"};function Ta(e,t,o=!1){var i;return xi((i=e.editModelSvc)==null?void 0:i.getEdit(t),o)}function Ia(e,t){const{editModelSvc:o}=e,{column:i,rowNode:s}=t;if(e.gos.get("groupTotalRow")&&!(s!=null&&s.footer))return!1;for(const n of(s==null?void 0:s.allLeafChildren)??[])if(xi(o==null?void 0:o.getEdit({rowNode:n,column:i}))||xi(o==null?void 0:o.getEdit({rowNode:n.pinnedSibling,column:i})))return!0}function Aa(e,{rowNode:t,column:o}){var i;if(t=t.pinnedSibling,!!t)return xi((i=e.editModelSvc)==null?void 0:i.getEdit({rowNode:t,column:o}))}var HS=class extends x{constructor(e,t){super(),this.cellCtrl=e,this.beans=t,this.editSvc=t.editSvc,this.editModelSvc=t.editModelSvc}setComp(e){this.cellComp=e,this.applyCellStyles()}applyCellStyles(){var s;const{cellCtrl:e,editSvc:t,beans:o}=this;if(t!=null&&t.isBatchEditing()&&t.isEditing()){const n=Ta(o,e)||Ia(o,e)||Aa(o,e);this.applyBatchingStyle(n)}else this.applyBatchingStyle(!1);const i=!!((s=this.editModelSvc)!=null&&s.getCellValidationModel().hasCellValidation(this.cellCtrl));this.cellComp.toggleCss("ag-cell-editing-error",i)}applyBatchingStyle(e){var t;this.cellComp.toggleCss("ag-cell-editing",e??!1),this.cellComp.toggleCss("ag-cell-batch-edit",(e&&((t=this.editSvc)==null?void 0:t.isBatchEditing()))??!1)}},OS=class extends x{constructor(e,t){super(),this.rowCtrl=e,this.beans=t,this.gos=t.gos,this.editSvc=t.editSvc,this.editModelSvc=t.editModelSvc}applyRowStyles(){var r;const{rowCtrl:e,editModelSvc:t,beans:o}=this;let i=e.rowNode,s=t==null?void 0:t.getEditRow(i);const n=(r=this.editModelSvc)==null?void 0:r.getRowValidationModel().hasRowValidation({rowNode:i});if(!s&&i.pinnedSibling&&(i=i.pinnedSibling,s=t==null?void 0:t.getEditRow(i)),s){const l=Array.from(s.keys()).some(a=>{const d={rowNode:i,column:a};return Ta(o,d,!0)||Ia(o,d)||Aa(o,d)});this.applyStyle(n,l);return}this.applyStyle(n)}applyStyle(e=!1,t=!1){var s,n;const o=((s=this.editSvc)==null?void 0:s.isBatchEditing())??!1,i=this.gos.get("editType")==="fullRow";(n=this.rowCtrl)==null||n.forEachGui(void 0,({rowComp:r})=>{r.toggleCss("ag-row-editing",i&&t),r.toggleCss("ag-row-batch-edit",i&&t&&o),r.toggleCss("ag-row-inline-editing",t),r.toggleCss("ag-row-not-inline-editing",!t),r.toggleCss("ag-row-editing-invalid",i&&t&&e)})}},BS=({rowModel:e,pinnedRowModel:t,editModelSvc:o},i)=>{const s=new Set;return e.forEachNode(n=>i.has(n)&&s.add(n)),t==null||t.forEachPinnedRow("top",n=>i.has(n)&&s.add(n)),t==null||t.forEachPinnedRow("bottom",n=>i.has(n)&&s.add(n)),i.forEach(n=>{s.has(n)||o.removeEdits({rowNode:n})}),s},VS=({editModelSvc:e},t,o)=>{t.forEach(i=>{var s;return(s=e==null?void 0:e.getEditRow(i))==null?void 0:s.forEach((n,r)=>!o.has(r)&&e.removeEdits({rowNode:i,column:r}))})},NS=e=>()=>{const t=new Set(e.colModel.getCols()),o=e.editModelSvc.getEditMap(!0),i=new Set(o.keys());VS(e,BS(e,i),t)},_S=new Set(["undo","redo"]),Ma={paste:"ui",rangeSvc:"ui",fillHandle:"api",cellClear:"api"},WS=new Set(Object.keys(Ma)),zS=new Set(["paste","rangeSvc","renderer","cellClear","redo","undo"]),Di={cancel:!0,source:"api"},$S={cancel:!1,source:"api"},Ht={checkSiblings:!0},Co={force:!0,suppressFlash:!0},US=class extends x{constructor(){super(...arguments),this.beanName="editSvc",this.batch=!1}postConstruct(){const{beans:e}=this;this.model=e.editModelSvc,this.valueSvc=e.valueSvc,this.rangeSvc=e.rangeSvc,this.addManagedPropertyListener("editType",({currentValue:i})=>{this.stopEditing(void 0,Di),this.createStrategy(i)});const t=NS(e),o=()=>{const i=this.model.getCellValidationModel().getCellValidationMap().size>0,s=this.model.getRowValidationModel().getRowValidationMap().size>0;return i||s?this.stopEditing(void 0,Di):this.isEditing()&&(this.isBatchEditing()?Dt(e,this.model.getEditPositions()):this.stopEditing(void 0,$S)),!1};this.addManagedEventListeners({columnPinned:t,columnVisible:t,columnRowGroupChanged:t,rowGroupOpened:t,pinnedRowsChanged:t,displayedRowsChanged:t,sortChanged:o,filterChanged:o,cellFocused:this.onCellFocused.bind(this)})}isBatchEditing(){return this.batch}setBatchEditing(e){e?(this.batch=!0,this.stopEditing(void 0,Di)):(this.stopEditing(void 0,Di),this.batch=!1)}createStrategy(e){const{beans:t,gos:o,strategy:i}=this,s=e??o.get("editType")??"singleCell";if(i){if(i.beanName===s)return i;this.destroyStrategy()}return this.strategy=this.createOptionalManagedBean(t.registry.createDynamicBean(s,!0))}destroyStrategy(){this.strategy&&(this.strategy.destroy(),this.strategy=this.destroyBean(this.strategy))}shouldStartEditing(e,t,o,i="ui"){var s;return this.strategy??(this.strategy=this.createStrategy()),((s=this.strategy)==null?void 0:s.shouldStart(e,t,o,i))??null}shouldStopEditing(e,t,o="ui"){var i;return((i=this.strategy)==null?void 0:i.shouldStop(e,t,o))??null}shouldCancelEditing(e,t,o="ui"){var i;return((i=this.strategy)==null?void 0:i.shouldCancel(e,t,o))??null}validateEdit(){return ah(this.beans)}isEditing(e,t){return this.model.hasEdits(e,t??Ht)}isRowEditing(e,t){return(e&&this.model.hasRowEdits(e,t))??!1}startEditing(e,t){var a;const{startedEdit:o=!0,event:i=null,source:s="ui",ignoreEventKey:n=!1}=t;if(this.strategy??(this.strategy=this.createStrategy()),!this.isCellEditable(e,"api"))return;const r=K(this.beans,e);if(r&&!r.comp){r.onCompAttachedFuncs.push(()=>this.startEditing(e,t));return}const l=(a=this.shouldStartEditing)==null?void 0:a.call(this,e,i,o,s);if(l===!1&&s!=="api"){this.isEditing(e)&&this.stopEditing();return}!this.batch&&this.shouldStopEditing(e,void 0,s)&&this.stopEditing(void 0,{source:s}),l&&this.isBatchEditing()&&this.dispatchBatchEvent("batchEditingStarted",new Map),this.strategy.start(e,i,s,n)}stopEditing(e,t){var p,f,C;const{event:o,cancel:i,source:s="ui",suppressNavigateAfterEdit:n}=t||{},{beans:r,model:l}=this;if(WS.has(s))return this.isBatchEditing()?(this.bulkRefresh(e),!1):this.stopEditing(e,{...t,source:Ma[s]});if(!(this.isEditing(e)||this.isBatchEditing()&&l.hasEdits(e,Ht))||!this.strategy)return!1;const d=K(r,e);d&&(d.onEditorAttachedFuncs=[]);let c=l.getEditMap(!0),u=!1;const h=!i&&!!this.shouldStopEditing(e,o,s),g=i&&!!this.shouldCancelEditing(e,o,s);if(h||g){st(r,!0);const m=l.getEditMap();this.processEdits(m,i),(p=this.strategy)==null||p.stop(i,o),this.bulkRefresh(void 0,c),c=m,u||(u=h)}else if(o instanceof KeyboardEvent&&this.batch&&((f=this.strategy)!=null&&f.midBatchInputsAllowed(e))&&this.isEditing(e,{withOpenEditor:!0})){const m=o.key,w=m===y.ENTER,S=m===y.ESCAPE,v=m===y.TAB;(w||v||S)&&(w||v?st(r,!0):S&&this.revertSingleCellEdit(d),this.isBatchEditing()?(C=this.strategy)==null||C.cleanupEditors():Dt(r,l.getEditPositions(),{event:o}),o.preventDefault(),this.bulkRefresh(e,c,{suppressFlash:!0}),c=l.getEditMap())}else st(r,!0),c=l.getEditMap();return u&&e&&this.model.removeEdits(e),!n&&d&&this.navigateAfterEdit(o instanceof KeyboardEvent&&o.shiftKey,d.cellPosition),ps(r),this.model.hasEdits()||(this.model.getCellValidationModel().clearCellValidationMap(),this.model.getRowValidationModel().clearRowValidationMap()),this.bulkRefresh(),g&&this.beans.rowRenderer.refreshRows({rowNodes:Array.from(c.keys())}),this.isBatchEditing()&&(this.beans.rowRenderer.refreshRows({suppressFlash:!0,force:!0}),u&&h&&this.dispatchBatchEvent("batchEditingStopped",c)),u}navigateAfterEdit(e,t){var i;if(this.gos.get("enterNavigatesVerticallyAfterEdit")){const s=e?y.UP:y.DOWN;(i=this.beans.navigation)==null||i.navigateToNextCell(null,s,t,!1)}}processEdits(e,t=!1){var r,l,a;const o=Array.from(e.keys()),{beans:i}=this,s=this.model.getCellValidationModel().getCellValidationMap().size>0||this.model.getRowValidationModel().getRowValidationMap().size>0,n=[];for(const d of o){const c=e.get(d);for(const u of c.keys()){const h=c.get(u),g={rowNode:d,column:u},p=K(i,g),f=ze(h),C=(a=(l=(r=p==null?void 0:p.comp)==null?void 0:r.getCellEditor())==null?void 0:l.isCancelAfterEnd)==null?void 0:a.call(l);!t&&!C&&f&&!s&&(this.setNodeDataValue(d,u,h.pendingValue)||n.push(g)),p==null||p.refreshCell(Co)}}n.forEach(d=>{this.model.clearEditValue(d)})}setNodeDataValue(e,t,o,i){const{beans:s}=this,n=K(s,{rowNode:e,column:t});n&&(n.suppressRefreshCell=!0);const r=e.setDataValue(t,o,"commit");return n&&(n.suppressRefreshCell=!1),i&&(n==null||n.refreshCell(Co)),r}setEditMap(e,t){var o;this.strategy??(this.strategy=this.createStrategy()),(o=this.strategy)==null||o.setEditMap(e,t),this.bulkRefresh(),this.beans.rowRenderer.refreshCells(Co)}dispatchEditValuesChanged({rowNode:e,column:t},o={}){if(!e||!t||!o)return;const{pendingValue:i,sourceValue:s}=o,{rowIndex:n,rowPinned:r,data:l}=e;this.beans.eventSvc.dispatchEvent({type:"cellEditValuesChanged",node:e,rowIndex:n,rowPinned:r,column:t,source:"api",data:l,newValue:i,oldValue:s,value:i,colDef:t.getColDef()})}bulkRefresh(e={},t,o={}){var l;const{beans:i,gos:s}=this,{editModelSvc:n,rowModel:r}=i;oe(s)&&(e.rowNode&&e.column?this.refCell(e,this.model.getEdit(e),o):t&&((l=n==null?void 0:n.getEditMap(!1))==null||l.forEach((a,d)=>{for(const c of a.keys())this.refCell({rowNode:d,column:c},a.get(c),o)})))}refCell({rowNode:e,column:t},o,i={}){var u;const{beans:s,gos:n}=this,r=new Set([e]),l=new Set,a=e.pinnedSibling;a&&r.add(a);const d=e.sibling;d&&l.add(d);let c=e.parent;for(;c;)(u=c.sibling)!=null&&u.footer&&n.get("groupTotalRow")||!c.parent&&c.sibling&&n.get("grandTotalRow")?l.add(c.sibling):l.add(c),c=c.parent;r.forEach(h=>this.dispatchEditValuesChanged({rowNode:h,column:t},o)),r.forEach(h=>{var g;return(g=K(s,{rowNode:h,column:t}))==null?void 0:g.refreshCell(i)}),l.forEach(h=>{var g;return(g=K(s,{rowNode:h,column:t}))==null?void 0:g.refreshCell(i)})}stopAllEditing(e=!1,t="ui"){this.isEditing()&&this.stopEditing(void 0,{cancel:e,source:t})}isCellEditable(e,t="ui"){var i;const{rowNode:o}=e;if(o.group){if(this.gos.get("treeData")){if(!o.data&&!this.gos.get("enableGroupEdit"))return!1}else if(!this.gos.get("enableGroupEdit"))return!1}return this.strategy??(this.strategy=this.createStrategy()),((i=this.strategy)==null?void 0:i.isCellEditable(e,t))??!1}cellEditingInvalidCommitBlocks(){return this.gos.get("invalidEditValueMode")==="block"}checkNavWithValidation(e,t,o=!0){var i,s,n,r;if(this.hasValidationErrors(e)){const l=K(this.beans,e);return this.cellEditingInvalidCommitBlocks()?((i=t==null?void 0:t.preventDefault)==null||i.call(t),o&&(!(l!=null&&l.hasBrowserFocus())&&(l==null||l.focusCell()),(r=(n=(s=l==null?void 0:l.comp)==null?void 0:s.getCellEditor())==null?void 0:n.focusIn)==null||r.call(n)),"block-stop"):(l&&this.revertSingleCellEdit(l),"revert-continue")}return"continue"}revertSingleCellEdit(e,t=!1){var i,s,n,r,l;const o=K(this.beans,e);(i=o==null?void 0:o.comp)!=null&&i.getCellEditor()&&(Dt(this.beans,[e],{silent:!0}),this.model.clearEditValue(e),xt(this.beans,e,{silent:!0}),nt(this.beans),o==null||o.refreshCell(Co),(s=o.rowCtrl.rowEditStyleFeature)==null||s.applyRowStyles(),t&&(o==null||o.focusCell(),(l=(r=(n=o==null?void 0:o.comp)==null?void 0:n.getCellEditor())==null?void 0:r.focusIn)==null||l.call(r)))}hasValidationErrors(e){var i;nt(this.beans);const t=K(this.beans,e);t&&(t.refreshCell(Co),(i=t.rowCtrl.rowEditStyleFeature)==null||i.applyRowStyles());let o=!1;return e!=null&&e.rowNode?(o||(o=this.model.getRowValidationModel().hasRowValidation({rowNode:e.rowNode})),e.column&&(o||(o=this.model.getCellValidationModel().hasCellValidation({rowNode:e.rowNode,column:e.column})))):(o||(o=this.model.getCellValidationModel().getCellValidationMap().size>0),o||(o=this.model.getRowValidationModel().getRowValidationMap().size>0)),o}moveToNextCell(e,t,o,i="ui"){var l;let s;const n=this.isEditing(),r=n&&this.checkNavWithValidation(void 0,o)==="block-stop";return e instanceof Pt&&n&&(s=(l=this.strategy)==null?void 0:l.moveToNextEditingCell(e,t,o,i,r)),s===null||(s=s||!!this.beans.focusSvc.focusedHeader,s===!1&&!r&&this.stopEditing()),s}getCellDataValue({rowNode:e,column:t},o=!0){if(!e||!t)return;let i=this.model.getEdit({rowNode:e,column:t});const s=e.pinnedSibling;if(s){const r=this.model.getEdit({rowNode:s,column:t});r&&(i=r)}const n=o?(i==null?void 0:i.editorValue)??(i==null?void 0:i.pendingValue):i==null?void 0:i.pendingValue;return n===ge||!i?this.valueSvc.getValue(t,e,!0,"api"):n}getRowDataValue(e,t){return this.model.getEditRowDataValue(e,t)}addStopEditingWhenGridLosesFocus(e){oh(this,this.beans,e)}createPopupEditorWrapper(e){return new GS(e)}setDataValue(e,t,o){var r;if((!this.isEditing()||o==="commit")&&!zS.has(o))return;const{beans:i}=this;this.strategy??(this.strategy=this.createStrategy());const s=this.isBatchEditing()?"ui":"api";if(!o||_S.has(o))return Qo(i,e,!0,t),this.setNodeDataValue(e.rowNode,e.column,t,!0);const n=this.model.getEdit(e);if(n){if(n.pendingValue===t)return!1;if(n.sourceValue!==t)return Qo(i,e,!0,t),this.stopEditing(e,{source:s,suppressNavigateAfterEdit:!0}),!0;if(n.sourceValue===t)return(r=i.editModelSvc)==null||r.removeEdits(e),this.dispatchEditValuesChanged(e,{...n,pendingValue:t}),!0}return Qo(i,e,!0,t),this.stopEditing(e,{source:s,suppressNavigateAfterEdit:!0}),!0}handleColDefChanged(e){nh(this.beans,e)}destroy(){this.model.clear(),this.destroyStrategy(),super.destroy()}prepDetailsDuringBatch(e,t){if(!this.batch||!this.model.hasRowEdits(e.rowNode,Ht))return;const{rowNode:i,column:s}=e,{compDetails:n,valueToDisplay:r}=t;if(n){const{params:a}=n;return a.data=this.model.getEditRowDataValue(i,Ht),{compDetails:n}}const l=this.model.getEditRow(e.rowNode,Ht);if(r!==void 0&&(l!=null&&l.has(s)))return{valueToDisplay:this.valueSvc.getValue(s,i)}}cleanupEditors(){var e;(e=this.strategy)==null||e.cleanupEditors()}dispatchCellEvent(e,t,o,i){var s;(s=this.strategy)==null||s.dispatchCellEvent(e,t,o,i)}dispatchRowEvent(e,t){var o;(o=this.strategy)==null||o.dispatchRowEvent(e,t)}dispatchBatchEvent(e,t){this.eventSvc.dispatchEvent(this.createBatchEditEvent(e,t))}createBatchEditEvent(e,t){return N(this.gos,{type:e,...e==="batchEditingStopped"?{changes:this.toEventChangeList(t)}:{}})}toEventChangeList(e){return this.model.getEditPositions(e).map(t=>({rowIndex:t.rowNode.rowIndex,rowPinned:t.rowNode.rowPinned,columnId:t.column.getColId(),newValue:t.pendingValue,oldValue:t.sourceValue}))}applyBulkEdit({rowNode:e,column:t},o){var d,c;if(!o||o.length===0)return;const{beans:i,rangeSvc:s,valueSvc:n}=this;st(i,!0);const r=this.model.getEditMap(!0),l=(c=(d=r.get(e))==null?void 0:d.get(t))==null?void 0:c.pendingValue;this.batch||this.eventSvc.dispatchEvent({type:"bulkEditingStarted"}),o.forEach(u=>{if(s==null||s.forEachRowInRange(u,h=>{const g=it(i,h);if(g===void 0)return;const p=r.get(g)??new Map;for(const f of u.columns)if(f&&this.isCellEditable({rowNode:g,column:f},"api")){const C=n.getValue(f,g,!0,"api");let m=n.parseValue(f,g??null,l,C);Number.isNaN(m)&&(m=null),p.set(f,{editorValue:void 0,pendingValue:m,sourceValue:C,state:"changed"})}p.size>0&&r.set(g,p)}),this.setEditMap(r),this.batch){this.cleanupEditors(),ps(i),this.bulkRefresh();return}this.stopEditing(void 0,{source:"api"}),this.eventSvc.dispatchEvent({type:"bulkEditingStopped",changes:this.toEventChangeList(r)})}),this.bulkRefresh();const a=K(i,{rowNode:e,column:t});a&&a.focusCell(!0)}createCellStyleFeature(e,t){return new HS(e,t)}createRowStyleFeature(e,t){return new OS(e,t)}setEditingCells(e,t){const{beans:o}=this,{colModel:i,valueSvc:s}=o,n=new Map;e.forEach(({colId:r,column:l,colKey:a,rowIndex:d,rowPinned:c,newValue:u,state:h})=>{const g=r?i.getCol(r):a?i.getCol(a):l;if(!g)return;const p=it(o,{rowIndex:d,rowPinned:c});if(!p)return;const f=s.getValue(g,p,!0,"api");if(!ze({pendingValue:u,sourceValue:f})&&h!=="editing")return;let C=n.get(p);C||(C=new Map,n.set(p,C)),u===void 0&&(u=ge),C.set(g,{editorValue:void 0,pendingValue:u,sourceValue:f,state:h??"changed"})}),this.setEditMap(n,t)}onCellFocused(e){var n;const t=K(this.beans,e);if(!t||!this.isEditing(t,Ht))return;const o=this.model.getEdit(t);if(!o||!ze(o))return;const s=this.getLocaleTextFunc()("ariaPendingChange","Pending Change");(n=this.beans.ariaAnnounce)==null||n.announceValue(s,"pendingChange")}allowedFocusTargetOnValidation(e){return K(this.beans,e)}},ka=class extends x{postConstruct(){var e,t;this.model=this.beans.editModelSvc,this.editSvc=this.beans.editSvc,this.addManagedEventListeners({cellFocused:(e=this.onCellFocusChanged)==null?void 0:e.bind(this),cellFocusCleared:(t=this.onCellFocusChanged)==null?void 0:t.bind(this)})}clearEdits(e){this.model.clearEditValue(e)}onCellFocusChanged(e){let t;const o=e.previousParams,{editSvc:i,beans:s}=this,n=e.type==="cellFocused"?e.sourceEvent:null;o&&(t=K(s,o));const{gos:r,editModelSvc:l}=s,a=e.type==="cellFocusCleared";if(i.isEditing(void 0,{withOpenEditor:!0})){const{column:d,rowIndex:c,rowPinned:u}=e,h={column:d,rowNode:it(s,{rowIndex:c,rowPinned:u})},g=r.get("invalidEditValueMode")==="block";if(g)return;const p=!g,f=!!(l!=null&&l.getCellValidationModel().hasCellValidation(h)),C=p&&f;(o||a?i.stopEditing(void 0,{cancel:C,source:a&&p?"api":void 0,event:n}):!0)||(i.isBatchEditing()?i.cleanupEditors():i.stopEditing(void 0,{source:"api"}))}t==null||t.refreshCell({suppressFlash:!0,force:!0})}isCellEditable({rowNode:e,column:t},o="ui"){return t.isColumnFunc(e,t.getColDef().editable)}stop(e,t){const o=this.model.getEditPositions(),i={all:[],pass:[],fail:[]};if(o.forEach(n=>{var l;i.all.push(n);const r=this.model.getCellValidationModel().getCellValidation(n);if((((l=r==null?void 0:r.errorMessages)==null?void 0:l.length)??0)>0){i.fail.push(n);return}i.pass.push(n)}),e)return o.forEach(n=>{Xo(this.beans,n),this.model.stop(n)}),!0;const s=this.processValidationResults(i);return s.destroy.length>0&&s.destroy.forEach(n=>{Xo(this.beans,n,{event:t}),this.model.stop(n)}),s.keep.length>0&&s.keep.forEach(n=>{var l;const r=K(this.beans,n);(l=this.editSvc)!=null&&l.cellEditingInvalidCommitBlocks()||r&&this.editSvc.revertSingleCellEdit(r)}),!0}cleanupEditors({rowNode:e}={},t){st(this.beans,!1);const o=this.model.getEditPositions(),i=[];e?o.forEach(s=>{!e||s.rowNode===e||i.push(s)}):o.forEach(s=>{i.push(s)}),Dt(this.beans,i),ps(this.beans,t)}setFocusOutOnEditor(e){var t,o,i;(i=(o=(t=e.comp)==null?void 0:t.getCellEditor())==null?void 0:o.focusOut)==null||i.call(o)}setFocusInOnEditor(e){const t=e.comp,o=t==null?void 0:t.getCellEditor();if(o!=null&&o.focusIn)o.focusIn();else{const i=this.beans.gos.get("editType")==="fullRow";e.focusCell(i),e.onEditorAttachedFuncs.push(()=>{var s,n;return(n=(s=t==null?void 0:t.getCellEditor())==null?void 0:s.focusIn)==null?void 0:n.call(s)})}}setupEditors(e=this.model.getEditPositions(),t,o,i,s=!1){const n=i instanceof KeyboardEvent&&!s&&i.key||void 0;sh(this.beans,e,t,n,i,o)}dispatchCellEvent(e,t,o,i){const s=K(this.beans,e);s&&this.eventSvc.dispatchEvent({...s.createEvent(t??null,o),...i})}dispatchRowEvent(e,t){const o=hs(this.beans,e);o&&this.eventSvc.dispatchEvent(o.createRowEvent(t))}shouldStart({column:e},t,o,i="ui"){var a;if(t instanceof KeyboardEvent&&(t.key===y.TAB||t.key===y.ENTER||t.key===y.F2||t.key===y.BACKSPACE&&o))return!0;if((t==null?void 0:t.shiftKey)&&((a=this.beans.rangeSvc)==null?void 0:a.getCellRanges().length)!=0)return!1;const n=e==null?void 0:e.getColDef(),r=this.deriveClickCount(n),l=t==null?void 0:t.type;return l==="click"&&(t==null?void 0:t.detail)===1&&r===1||l==="dblclick"&&(t==null?void 0:t.detail)===2&&r===2?!0:i==="api"?o??!1:!1}shouldStop(e,t,o="ui"){const i=this.editSvc.isBatchEditing();return i&&o==="api"?!0:i&&o==="ui"?!1:o==="api"?!0:t instanceof KeyboardEvent&&!i?t.key===y.ENTER:null}shouldCancel(e,t,o="ui"){const i=this.editSvc.isBatchEditing();return!!(t instanceof KeyboardEvent&&!i&&t.key===y.ESCAPE||i&&o==="api"||o==="api")}setEditMap(e,t){var i;t!=null&&t.update||this.editSvc.stopEditing(void 0,{cancel:!0,source:"api"});const o=[];if(e.forEach((s,n)=>{s.forEach((r,l)=>{r.state==="editing"&&o.push({...r,rowNode:n,column:l})})}),t!=null&&t.update&&(e=new Map([...this.model.getEditMap(),...e])),(i=this.model)==null||i.setEditMap(e),o.length>0){const s=o.at(-1),n=s.pendingValue===ge?void 0:s.pendingValue;this.start(s,new KeyboardEvent("keydown",{key:n}),"api");const r=K(this.beans,s);r&&this.setFocusInOnEditor(r)}}deriveClickCount(e){const{gos:t}=this.beans;return t.get("suppressClickEdit")===!0?0:t.get("singleClickEdit")===!0||e!=null&&e.singleClickEdit?1:2}destroy(){this.cleanupEditors(),super.destroy()}},KS=class extends ka{constructor(){super(...arguments),this.beanName="fullRow",this.startedRows=[]}isCellEditable(e,t="ui"){const o=super.isCellEditable(e,t);return o===!0||t==="ui"?o:this.beans.colModel.getCols().some(s=>super.isCellEditable({rowNode:e.rowNode,column:s},t))}shouldStop(e,t,o="ui"){const{rowNode:i}=e||{};if(!hs(this.beans,{rowNode:this.rowNode}))return!0;const n=super.shouldStop({rowNode:this.rowNode},t,o);return n!==null?n:this.rowNode?i!==this.rowNode:!1}midBatchInputsAllowed({rowNode:e}){return e?this.model.hasEdits({rowNode:e}):!1}clearEdits(e){this.model.clearEditValue(e)}start(e,t,o="ui",i){const{rowNode:s}=e;this.rowNode!==s&&super.cleanupEditors(e),this.dispatchRowEvent({rowNode:s},"rowEditingStarted"),this.startedRows.push(s);const n=this.beans.visibleCols.allCols,r=[];n.forEach(l=>{if(!l.isCellEditable(s))return;const a={rowNode:s,column:l};r.push(a),this.model.hasEdits(a)||this.model.start(a)}),this.rowNode=s,this.setupEditors(r,e,!0,t,i)}processValidationResults(e){return e.fail.length>0&&this.editSvc.cellEditingInvalidCommitBlocks()?{destroy:[],keep:e.all}:{destroy:e.all,keep:[]}}stop(e,t){var s;const{rowNode:o}=this;if(o&&!this.model.hasRowEdits(o))return!1;const i=[];return e||this.model.getEditMap().forEach((n,r)=>{if(!(!n||n.size===0)){for(const l of n.values())if(ze(l)){i.push(r);break}}}),nt(this.beans),!e&&((s=this.editSvc)==null?void 0:s.checkNavWithValidation({rowNode:o}))==="block-stop"?!1:(super.stop(e,t),i.forEach(n=>this.dispatchRowEvent({rowNode:n},"rowValueChanged")),this.cleanupEditors({rowNode:o},!0),this.rowNode=void 0,!0)}onCellFocusChanged(e){const{rowIndex:t}=e,o=e.previousParams;if((o==null?void 0:o.rowIndex)===t||e.sourceEvent instanceof KeyboardEvent)return;const i=K(this.beans,o);this.gos.get("invalidEditValueMode")==="block"&&i&&(this.model.getCellValidationModel().getCellValidation(i)||this.model.getRowValidationModel().getRowValidation(i))||super.onCellFocusChanged(e)}cleanupEditors(e={},t){super.cleanupEditors(e,t),this.startedRows.forEach(o=>this.dispatchRowEvent({rowNode:o},"rowEditingStopped")),this.startedRows.length=0}moveToNextEditingCell(e,t,o,i="ui",s=!1){var h,g,p;const n=e.cellPosition;let r;this.model.suspend(!0);try{r=(h=this.beans.navigation)==null?void 0:h.findNextCellToFocusOn(n,{backwards:t,startEditing:!0,skipToNextEditableCell:!1})}finally{this.model.suspend(!1)}if(r===!1)return null;if(r==null)return!1;const l=r.cellPosition,a=e.isCellEditable(),d=r.isCellEditable(),c=l&&n.rowIndex===l.rowIndex&&n.rowPinned===l.rowPinned;a&&this.setFocusOutOnEditor(e),this.restoreEditors();const u=this.gos.get("suppressStartEditOnTab");return d&&!s?u?r.focusCell(!0,o):((g=r.comp)!=null&&g.getCellEditor()||xt(this.beans,r,{event:o,cellStartedEdit:!0}),this.setFocusInOnEditor(r),r.focusCell(!1,o)):(d&&s&&this.setFocusInOnEditor(r),r.focusCell(!0,o)),!c&&!s&&(this.cleanupEditors(r,!0),u?r.focusCell(!0,o):this.editSvc.startEditing(r,{startedEdit:!0,event:o,source:i,ignoreEventKey:!0})),(p=e.rowCtrl)==null||p.refreshRow({suppressFlash:!0,force:!0}),!0}restoreEditors(){this.model.getEditMap().forEach((e,t)=>e.forEach(({state:o},i)=>{var n;if(o!=="editing")return;const s=K(this.beans,{rowNode:t,column:i});s&&!((n=s.comp)!=null&&n.getCellEditor())&&xt(this.beans,s,{silent:!0})}))}destroy(){super.destroy(),this.rowNode=void 0,this.startedRows.length=0}},jS=class extends ka{constructor(){super(...arguments),this.beanName="singleCell"}shouldStop(e,t,o="ui"){const i=super.shouldStop(e,t,o);if(i!==null)return i;const{rowNode:s,column:n}=e||{};return(!this.rowNode||!this.column)&&s&&n?null:this.rowNode!==s||this.column!==n}midBatchInputsAllowed(e){return this.model.hasEdits(e)}start(e,t,o="ui",i){(this.rowNode!==e.rowNode||this.column!==e.column)&&super.cleanupEditors(),this.rowNode=e.rowNode,this.column=e.column,this.model.start(e),this.setupEditors([e],e,!0,t,i)}dispatchRowEvent(e,t){}processValidationResults(e){return e.fail.length>0&&this.editSvc.cellEditingInvalidCommitBlocks()?{destroy:[],keep:e.all}:{destroy:e.all,keep:[]}}stop(e,t){return super.stop(e,t),this.rowNode=void 0,this.column=void 0,!0}onCellFocusChanged(e){const{colModel:t,editSvc:o}=this.beans,{rowIndex:i,column:s,rowPinned:n}=e,r=it(this.beans,{rowIndex:i,rowPinned:n}),l=gs(s),a=t.getCol(l),d=e.previousParams;if(d){const c=gs(d.column);if((d==null?void 0:d.rowIndex)===i&&c===l&&(d==null?void 0:d.rowPinned)===n)return}o!=null&&o.isEditing({rowNode:r,column:a},{withOpenEditor:!0})&&e.type==="cellFocused"||super.onCellFocusChanged(e)}moveToNextEditingCell(e,t,o,i="ui",s=!1){var g,p,f,C,m;const n=e.cellPosition;let r;const l=this.beans.gos.get("editType")==="fullRow";l&&this.model.suspend(!0),s||(e.eGui.focus(),(p=this.editSvc)==null||p.stopEditing(e,{source:(g=this.editSvc)!=null&&g.isBatchEditing()?"ui":"api",event:o}));try{r=(f=this.beans.navigation)==null?void 0:f.findNextCellToFocusOn(n,{backwards:t,startEditing:!0})}finally{l&&this.model.suspend(!1)}if(r===!1)return null;if(r==null)return!1;const a=r.cellPosition,d=e.isCellEditable(),c=r.isCellEditable(),u=a&&n.rowIndex===a.rowIndex&&n.rowPinned===a.rowPinned;d&&!s&&this.setFocusOutOnEditor(e);const h=this.gos.get("suppressStartEditOnTab");return!u&&!s&&(super.cleanupEditors(r,!0),h?r.focusCell(!0,o):this.editSvc.startEditing(r,{startedEdit:!0,event:o,source:i,ignoreEventKey:!0})),c&&!s?(r.focusCell(!1,o),h?r.focusCell(!0,o):(C=r.comp)!=null&&C.getCellEditor()||(xt(this.beans,r,{event:o,cellStartedEdit:!0}),this.setFocusInOnEditor(r))):(c&&s&&this.setFocusInOnEditor(r),r.focusCell(!0,o)),(m=e.rowCtrl)==null||m.refreshRow({suppressFlash:!0,force:!0}),!0}destroy(){super.destroy(),this.rowNode=void 0,this.column=void 0}},dt={moduleName:"EditCore",version:H,beans:[qu,US],apiFunctions:{getEditingCells:TS,getCellEditorInstances:ih,startEditingCell:MS,stopEditing:IS,isEditing:AS,validateEdit:kS},dynamicBeans:{singleCell:jS,fullRow:KS},dependsOn:[Ea,xa],css:[aS]},qS={moduleName:"TextEditor",version:H,userComponents:{agCellEditor:Da,agTextCellEditor:Da},dependsOn:[dt]},YS={moduleName:"NumberEditor",version:H,userComponents:{agNumberCellEditor:{classImp:bS}},dependsOn:[dt]},ZS={moduleName:"DateEditor",version:H,userComponents:{agDateCellEditor:gS,agDateStringCellEditor:CS},dependsOn:[dt]},QS={moduleName:"CheckboxEditor",version:H,userComponents:{agCheckboxCellEditor:cS},dependsOn:[dt]},XS={moduleName:"SelectEditor",version:H,userComponents:{agSelectCellEditor:RS},dependsOn:[dt]},JS={moduleName:"LargeTextEditor",version:H,userComponents:{agLargeTextCellEditor:wS},dependsOn:[dt]},eb={moduleName:"CustomEditor",version:H,dependsOn:[dt]};function tb(e){var t;(t=e.expansionSvc)==null||t.expandAll(!0)}function ob(e){var t;(t=e.expansionSvc)==null||t.expandAll(!1)}function ib(e){const t=Te(e),o=Gv(e);t?t.onRowHeightChanged():o&&o.onRowHeightChanged()}var sb={moduleName:"CsrmSsrmSharedApi",version:H,apiFunctions:{expandAll:tb,collapseAll:ob,onRowHeightChanged:ib}},nb=class extends x{constructor(){super(...arguments),this.beanName="alignedGridsSvc",this.consuming=!1}getAlignedGridApis(){let e=this.gos.get("alignedGrids")??[];const t=typeof e=="function";return typeof e=="function"&&(e=e()),e.map(i=>{var n;if(!i){z(18),t||z(20);return}if(this.isGridApi(i))return i;const s=i;return"current"in s?(n=s.current)==null?void 0:n.api:(s.api||z(19),s.api)}).filter(i=>!!i&&!i.isDestroyed())}isGridApi(e){return!!e&&!!e.dispatchEvent}postConstruct(){const e=this.fireColumnEvent.bind(this);this.addManagedEventListeners({columnMoved:e,columnVisible:e,columnPinned:e,columnGroupOpened:e,columnResized:e,bodyScroll:this.fireScrollEvent.bind(this),alignedGridColumn:({event:t})=>this.onColumnEvent(t),alignedGridScroll:({event:t})=>this.onScrollEvent(t)})}fireEvent(e){this.consuming||this.getAlignedGridApis().forEach(t=>{t.isDestroyed()||t.dispatchEvent(e)})}onEvent(e){this.consuming=!0,e(),this.consuming=!1}fireColumnEvent(e){this.fireEvent({type:"alignedGridColumn",event:e})}fireScrollEvent(e){e.direction==="horizontal"&&this.fireEvent({type:"alignedGridScroll",event:e})}onScrollEvent(e){this.onEvent(()=>{this.beans.ctrlsSvc.getScrollFeature().setHorizontalScrollPosition(e.left,!0)})}extractDataFromEvent(e,t){const o=[];return e.columns?e.columns.forEach(i=>{o.push(t(i))}):e.column&&o.push(t(e.column)),o}getMasterColumns(e){return this.extractDataFromEvent(e,t=>t)}getColumnIds(e){return this.extractDataFromEvent(e,t=>t.getColId())}onColumnEvent(e){this.onEvent(()=>{switch(e.type){case"columnMoved":case"columnVisible":case"columnPinned":case"columnResized":{this.processColumnEvent(e);break}case"columnGroupOpened":{this.processGroupOpenedEvent(e);break}case"columnPivotChanged":k(21);break}})}processGroupOpenedEvent(e){const{colGroupSvc:t}=this.beans;t&&e.columnGroups.forEach(o=>{let i=null;o&&(i=t.getProvidedColGroup(o.getGroupId())),!(o&&!i)&&t.setColumnGroupOpened(i,o.isExpanded(),"alignedGridChanged")})}processColumnEvent(e){var c;const t=e.column;let o=null;const i=this.beans,{colResize:s,ctrlsSvc:n,colModel:r}=i;if(t&&(o=r.getColDefCol(t.getColId())),t&&!o)return;const l=this.getMasterColumns(e);switch(e.type){case"columnMoved":{const h=e.api.getColumnState().map(g=>({colId:g.colId}));we(i,{state:h,applyOrder:!0},"alignedGridChanged")}break;case"columnVisible":{const h=e.api.getColumnState().map(g=>({colId:g.colId,hide:g.hide}));we(i,{state:h},"alignedGridChanged")}break;case"columnPinned":{const h=e.api.getColumnState().map(g=>({colId:g.colId,pinned:g.pinned}));we(i,{state:h},"alignedGridChanged")}break;case"columnResized":{const u=e,h={};l.forEach(g=>{h[g.getId()]={key:g.getColId(),newWidth:g.getActualWidth()}}),(c=u.flexColumns)==null||c.forEach(g=>{h[g.getId()]&&delete h[g.getId()]}),s==null||s.setColumnWidths(Object.values(h),!1,u.finished,"alignedGridChanged");break}}const d=n.getGridBodyCtrl().isVerticalScrollShowing();this.getAlignedGridApis().forEach(u=>{u.setGridOption("alwaysShowVerticalScroll",d)})}},rb={moduleName:"AlignedGrids",version:H,beans:[nb],dependsOn:[_l]},lb="↑",ab="↓",db={tag:"span",children:[{tag:"span",ref:"eDelta",cls:"ag-value-change-delta"},{tag:"span",ref:"eValue",cls:"ag-value-change-value"}]},cb=class extends U{constructor(){super(db),this.eValue=A,this.eDelta=A,this.refreshCount=0}init(e){this.refresh(e,!0)}showDelta(e,t){const o=Math.abs(t),i=e.formatValue(o),s=M(i)?i:o,n=t>=0,r=this.eDelta;n?r.textContent=lb+s:r.textContent=ab+s,r.classList.toggle("ag-value-change-delta-up",n),r.classList.toggle("ag-value-change-delta-down",!n)}setTimerToRemoveDelta(){this.refreshCount++;const e=this.refreshCount;this.beans.frameworkOverrides.wrapIncoming(()=>{window.setTimeout(()=>{e===this.refreshCount&&this.hideDeltaValue()},2e3)})}hideDeltaValue(){this.eValue.classList.remove("ag-value-change-value-highlight"),ue(this.eDelta)}refresh(e,t=!1){var d;const{value:o,valueFormatted:i}=e,{eValue:s,lastValue:n,beans:r}=this;if(o===n||(M(i)?s.textContent=i:M(o)?s.textContent=o:ue(s),(d=r.filterManager)!=null&&d.isSuppressFlashingCellsBecauseFiltering()))return!1;const l=o&&typeof o=="object"&&"toNumber"in o?o.toNumber():o,a=n&&typeof n=="object"&&"toNumber"in n?n.toNumber():n;if(l===a)return!1;if(typeof l=="number"&&typeof a=="number"){const c=l-a;this.showDelta(e,c)}return n&&s.classList.add("ag-value-change-value-highlight"),t||this.setTimerToRemoveDelta(),this.lastValue=o,!0}},ub=".ag-value-slide-out{opacity:1}:where(.ag-ltr) .ag-value-slide-out{margin-right:5px;transition:opacity 3s,margin-right 3s}:where(.ag-rtl) .ag-value-slide-out{margin-left:5px;transition:opacity 3s,margin-left 3s}:where(.ag-ltr,.ag-rtl) .ag-value-slide-out{transition-timing-function:linear}.ag-value-slide-out-end{opacity:0}:where(.ag-ltr) .ag-value-slide-out-end{margin-right:10px}:where(.ag-rtl) .ag-value-slide-out-end{margin-left:10px}",hb={tag:"span",children:[{tag:"span",ref:"eCurrent",cls:"ag-value-slide-current"}]},gb=class extends U{constructor(){super(hb),this.eCurrent=A,this.refreshCount=0,this.registerCSS(ub)}init(e){this.refresh(e,!0)}addSlideAnimation(){this.refreshCount++;const e=this.refreshCount;this.ePrevious&&this.getGui().removeChild(this.ePrevious);const{beans:t,eCurrent:o}=this,i=Q({tag:"span",cls:"ag-value-slide-previous ag-value-slide-out"});this.ePrevious=i,i.textContent=o.textContent,this.getGui().insertBefore(i,o),t.frameworkOverrides.wrapIncoming(()=>{window.setTimeout(()=>{e===this.refreshCount&&this.ePrevious.classList.add("ag-value-slide-out-end")},50),window.setTimeout(()=>{e===this.refreshCount&&(this.getGui().removeChild(this.ePrevious),this.ePrevious=null)},3e3)})}refresh(e,t=!1){var s;let o=e.value;if($(o)&&(o=""),o===this.lastValue||(s=this.beans.filterManager)!=null&&s.isSuppressFlashingCellsBecauseFiltering())return!1;t||this.addSlideAnimation(),this.lastValue=o;const i=this.eCurrent;return M(e.valueFormatted)?i.textContent=e.valueFormatted:M(e.value)?i.textContent=o:ue(i),!0}},pb=class extends x{constructor(){super(...arguments),this.beanName="cellFlashSvc",this.nextAnimationTime=null,this.nextAnimationCycle=null,this.animations={highlight:new Map,"data-changed":new Map}}animateCell(e,t,o=this.beans.gos.get("cellFlashDuration"),i=this.beans.gos.get("cellFadeDuration")){const s=this.animations[t];s.delete(e);const n=Date.now(),r=n+o,l=n+o+i,a={phase:"flash",flashEndTime:r,fadeEndTime:l};s.set(e,a);const d=`ag-cell-${t}`,c=`${d}-animation`,{comp:u,eGui:{style:h}}=e;u.toggleCss(d,!0),u.toggleCss(c,!1),h.removeProperty("transition"),h.removeProperty("transition-delay"),this.nextAnimationTime&&r+15<this.nextAnimationTime&&(clearTimeout(this.nextAnimationCycle),this.nextAnimationCycle=null,this.nextAnimationTime=null),this.nextAnimationCycle||(this.beans.frameworkOverrides.wrapIncoming(()=>{this.nextAnimationCycle=setTimeout(this.advanceAnimations.bind(this),o)}),this.nextAnimationTime=r)}advanceAnimations(){const e=Date.now();let t=null;for(const o of Object.keys(this.animations)){const i=this.animations[o],s=`ag-cell-${o}`,n=`${s}-animation`;for(const[r,l]of i){if(!r.isAlive()||!r.comp){i.delete(r);continue}const{phase:a,flashEndTime:d,fadeEndTime:c}=l,u=a==="flash"?d:c;if(!(e+15>=u)){t=Math.min(u,t??1/0);continue}const{comp:g,eGui:{style:p}}=r;switch(a){case"flash":g.toggleCss(s,!1),g.toggleCss(n,!0),p.transition=`background-color ${c-d}ms`,p.transitionDelay=`${d-e}ms`,t=Math.min(c,t??1/0),l.phase="fade";break;case"fade":g.toggleCss(s,!1),g.toggleCss(n,!1),p.removeProperty("transition"),p.removeProperty("transition-delay"),i.delete(r);break}}}t==null?(this.nextAnimationTime=null,this.nextAnimationCycle=null):t&&(this.nextAnimationCycle=setTimeout(this.advanceAnimations.bind(this),t-e),this.nextAnimationTime=t)}onFlashCells(e,t){if(!e.comp)return;const o=Yu(e.cellPosition);t.cells[o]&&this.animateCell(e,"highlight")}flashCell(e,t){this.animateCell(e,"data-changed",t==null?void 0:t.flashDuration,t==null?void 0:t.fadeDuration)}destroy(){for(const e of Object.keys(this.animations))this.animations[e].clear()}};function fb(e,t={}){const{cellFlashSvc:o}=e;o&&e.frameworkOverrides.wrapIncoming(()=>{e.rowRenderer.getCellCtrls(t.rowNodes,t.columns).forEach(i=>o.flashCell(i,t))})}var Cb={moduleName:"HighlightChanges",version:H,beans:[pb],userComponents:{agAnimateShowChangeCellRenderer:cb,agAnimateSlideCellRenderer:gb},apiFunctions:{flashCells:fb}};function mb(e){var t;return((t=e.stateSvc)==null?void 0:t.getState())??{}}function wb(e,t,o){var i;return(i=e.stateSvc)==null?void 0:i.setState(t,o)}function La(e){switch(e={...e},e.version||(e.version="32.1.0"),e.version){case"32.1.0":e=vb(e)}return e.version=H,e}function vb(e){return e.cellSelection=Sb(e,"rangeSelection"),e}function Sb(e,t){if(e&&typeof e=="object")return e[t]}var bb=class extends x{constructor(){super(...arguments),this.beanName="stateSvc",this.updateRowGroupExpansionStateTimer=0,this.suppressEvents=!0,this.queuedUpdateSources=new Set,this.dispatchStateUpdateEventDebounced=he(this,()=>this.dispatchQueuedStateUpdateEvents(),0),this.onRowGroupOpenedDebounced=he(this,()=>{this.updateCachedState("rowGroupExpansion",this.getRowGroupExpansionState())},0),this.onRowSelectedDebounced=he(this,()=>{this.staleStateKeys.delete("rowSelection"),this.updateCachedState("rowSelection",this.getRowSelectionState())},0),this.staleStateKeys=new Set}postConstruct(){this.isClientSideRowModel=oe(this.gos);const e=La(this.gos.get("initialState")??{}),t=e.partialColumnState;delete e.partialColumnState,this.cachedState=e;const o=this.suppressEventsAndDispatchInitEvent.bind(this);this.beans.ctrlsSvc.whenReady(this,()=>o(()=>this.setupStateOnGridReady(e)));const[i,s,n]=this.addManagedEventListeners({newColumnsLoaded:({source:r})=>{r==="gridInitializing"&&(i(),o(()=>this.setupStateOnColumnsInitialised(e,!!t)))},rowCountReady:()=>{s==null||s(),o(()=>this.setupStateOnRowCountReady(e))},firstDataRendered:()=>{n==null||n(),o(()=>this.setupStateOnFirstDataRendered(e))}})}destroy(){super.destroy(),clearTimeout(this.updateRowGroupExpansionStateTimer),this.queuedUpdateSources.clear()}getState(){return this.staleStateKeys.size&&this.refreshStaleState(),this.cachedState}setState(e,t){const o=La(e);delete o.partialColumnState,this.cachedState=o,this.startSuppressEvents();const i="api",s=t?new Set(t):void 0;this.setGridReadyState(o,i,s),this.setColumnsInitialisedState(o,i,!1,s),this.setRowCountState(o,i,s),setTimeout(()=>{this.isAlive()&&this.setFirstDataRenderedState(o,i,s),this.stopSuppressEvents(i)})}setGridReadyState(e,t,o){var i,s;t==="api"&&!(o!=null&&o.has("sideBar"))&&((s=(i=this.beans.sideBar)==null?void 0:i.comp)==null||s.setState(e.sideBar)),this.updateCachedState("sideBar",this.getSideBarState())}setupStateOnGridReady(e){this.setGridReadyState(e,"gridInitializing");const t=()=>this.updateCachedState("sideBar",this.getSideBarState());this.addManagedEventListeners({toolPanelVisibleChanged:t,sideBarUpdated:t})}updateColumnAndGroupState(){this.updateColumnState(["aggregation","columnOrder","columnPinning","columnSizing","columnVisibility","pivot","rowGroup","sort"]),this.updateCachedState("columnGroup",this.getColumnGroupState())}setColumnsInitialisedState(e,t,o,i){this.setColumnState(e,t,o,i),this.setColumnGroupState(e,t,i),this.updateColumnAndGroupState()}setupStateOnColumnsInitialised(e,t){this.setColumnsInitialisedState(e,"gridInitializing",t);const o=i=>()=>this.updateColumnState([i]);this.addManagedEventListeners({columnValueChanged:o("aggregation"),columnMoved:o("columnOrder"),columnPinned:o("columnPinning"),columnResized:o("columnSizing"),columnVisible:o("columnVisibility"),columnPivotChanged:o("pivot"),columnPivotModeChanged:o("pivot"),columnRowGroupChanged:o("rowGroup"),sortChanged:o("sort"),newColumnsLoaded:this.updateColumnAndGroupState.bind(this),columnGroupOpened:()=>this.updateCachedState("columnGroup",this.getColumnGroupState())})}setRowCountState(e,t,o){const{filter:i,rowGroupExpansion:s,rowSelection:n,pagination:r}=e,l=(d,c)=>!(o!=null&&o.has(d))&&(c||t==="api");l("filter",i)&&this.setFilterState(i),l("rowGroupExpansion",s)&&this.setRowGroupExpansionState(s,t),l("rowSelection",n)&&this.setRowSelectionState(n,t),l("pagination",r)&&this.setPaginationState(r,t);const a=this.updateCachedState.bind(this);a("filter",this.getFilterState()),a("rowGroupExpansion",this.getRowGroupExpansionState()),a("rowSelection",this.getRowSelectionState()),a("pagination",this.getPaginationState())}setupStateOnRowCountReady(e){this.setRowCountState(e,"gridInitializing");const t=this.updateCachedState.bind(this),o=()=>{this.updateRowGroupExpansionStateTimer=0,t("rowGroupExpansion",this.getRowGroupExpansionState())},i=()=>t("filter",this.getFilterState()),{gos:s,colFilter:n}=this.beans;this.addManagedEventListeners({filterChanged:i,rowGroupOpened:()=>this.onRowGroupOpenedDebounced(),expandOrCollapseAll:o,columnRowGroupChanged:o,rowDataUpdated:()=>{(s.get("groupDefaultExpanded")!==0||s.get("isGroupOpenByDefault"))&&(this.updateRowGroupExpansionStateTimer||(this.updateRowGroupExpansionStateTimer=setTimeout(o)))},selectionChanged:()=>{this.staleStateKeys.add("rowSelection"),this.onRowSelectedDebounced()},paginationChanged:r=>{(r.newPage||r.newPageSize)&&t("pagination",this.getPaginationState())}}),n&&this.addManagedListeners(n,{filterStateChanged:i})}setFirstDataRenderedState(e,t,o){const{scroll:i,cellSelection:s,focusedCell:n,columnOrder:r,rowPinning:l}=e,a=(u,h)=>!(o!=null&&o.has(u))&&(h||t==="api");a("focusedCell",n)&&this.setFocusedCellState(n),a("cellSelection",s)&&this.setCellSelectionState(s),a("scroll",i)&&this.setScrollState(i),a("rowPinning",l)&&this.setRowPinningState(l),this.setColumnPivotState(!!(r!=null&&r.orderedColIds),t);const d=this.updateCachedState.bind(this);d("sideBar",this.getSideBarState()),d("focusedCell",this.getFocusedCellState());const c=this.getRangeSelectionState();d("rangeSelection",c),d("cellSelection",c),d("scroll",this.getScrollState())}setupStateOnFirstDataRendered(e){this.setFirstDataRenderedState(e,"gridInitializing");const t=this.updateCachedState.bind(this);this.addManagedEventListeners({cellFocused:()=>t("focusedCell",this.getFocusedCellState()),cellSelectionChanged:o=>{if(o.finished){const i=this.getRangeSelectionState();t("rangeSelection",i),t("cellSelection",i)}},bodyScrollEnd:()=>t("scroll",this.getScrollState()),pinnedRowsChanged:()=>t("rowPinning",this.getRowPinningState())})}getColumnState(){const e=this.beans;return Ov(Uo(e),e.colModel.isPivotMode())}setColumnState(e,t,o,i){const{sort:s,rowGroup:n,aggregation:r,pivot:l,columnPinning:a,columnVisibility:d,columnSizing:c,columnOrder:u}=e,h=(T,F)=>!(i!=null&&i.has(T))&&(F||t==="api"),g={},p=T=>{let F=g[T];return F||(F={colId:T},g[T]=F,F)},f={},C=h("sort",s);C&&(s==null||s.sortModel.forEach(({colId:T,sort:F},G)=>{const _=p(T);_.sort=F,_.sortIndex=G})),(C||!o)&&(f.sort=null,f.sortIndex=null);const m=h("rowGroup",n);m&&(n==null||n.groupColIds.forEach((T,F)=>{const G=p(T);G.rowGroup=!0,G.rowGroupIndex=F})),(m||!o)&&(f.rowGroup=null,f.rowGroupIndex=null);const w=h("aggregation",r);w&&(r==null||r.aggregationModel.forEach(({colId:T,aggFunc:F})=>{p(T).aggFunc=F})),(w||!o)&&(f.aggFunc=null);const S=h("pivot",l);S&&(l==null||l.pivotColIds.forEach((T,F)=>{const G=p(T);G.pivot=!0,G.pivotIndex=F}),this.gos.updateGridOptions({options:{pivotMode:!!(l!=null&&l.pivotMode)},source:t})),(S||!o)&&(f.pivot=null,f.pivotIndex=null);const v=h("columnPinning",a);v&&(a==null||a.leftColIds.forEach(T=>{p(T).pinned="left"}),a==null||a.rightColIds.forEach(T=>{p(T).pinned="right"})),(v||!o)&&(f.pinned=null);const b=h("columnVisibility",d);b&&(d==null||d.hiddenColIds.forEach(T=>{p(T).hide=!0})),(b||!o)&&(f.hide=null);const D=h("columnSizing",c);D&&(c==null||c.columnSizingModel.forEach(({colId:T,flex:F,width:G})=>{const _=p(T);_.flex=F??null,_.width=G})),(D||!o)&&(f.flex=null);const I=u==null?void 0:u.orderedColIds,B=!!(I!=null&&I.length)&&!(i!=null&&i.has("columnOrder")),P=B?I.map(T=>p(T)):Object.values(g);P.length&&(this.columnStates=P,we(this.beans,{state:P,applyOrder:B,defaultState:f},t))}setColumnPivotState(e,t){const o=this.columnStates;this.columnStates=void 0;const i=this.columnGroupStates;this.columnGroupStates=void 0;const s=this.beans,{pivotResultCols:n,colGroupSvc:r}=s;if(n!=null&&n.isPivotResultColsPresent()){if(o){const l=[];for(const a of o)n.getPivotResultCol(a.colId)&&l.push(a);we(s,{state:l,applyOrder:e},t)}i&&(r==null||r.setColumnGroupState(i,t))}}getColumnGroupState(){const e=this.beans.colGroupSvc;if(!e)return;const t=e.getColumnGroupState();return Bv(t)}setColumnGroupState(e,t,o){var l;const i=this.beans.colGroupSvc;if(!i||o!=null&&o.has("columnGroup")||t!=="api"&&!Object.prototype.hasOwnProperty.call(e,"columnGroup"))return;const s=new Set((l=e.columnGroup)==null?void 0:l.openColumnGroupIds),r=i.getColumnGroupState().map(({groupId:a})=>{const d=s.has(a);return d&&s.delete(a),{groupId:a,open:d}});s.forEach(a=>{r.push({groupId:a,open:!0})}),r.length&&(this.columnGroupStates=r),i.setColumnGroupState(r,t)}getFilterState(){const e=this.beans.filterManager;let t=e==null?void 0:e.getFilterModel();t&&Object.keys(t).length===0&&(t=void 0);const o=e==null?void 0:e.getFilterState(),i=(e==null?void 0:e.getAdvFilterModel())??void 0;return t||i||o?{filterModel:t,columnFilterState:o,advancedFilterModel:i}:void 0}setFilterState(e){const t=this.beans.filterManager,{filterModel:o,columnFilterState:i,advancedFilterModel:s}=e??{filterModel:null,columnFilterState:null,advancedFilterModel:null};(o!==void 0||i!==void 0)&&(t==null||t.setFilterState(o??null,i??null,"columnFilter")),s!==void 0&&(t==null||t.setAdvFilterModel(s??null,"advancedFilter"))}getRangeSelectionState(){var t;const e=(t=this.beans.rangeSvc)==null?void 0:t.getCellRanges().map(o=>{const{id:i,type:s,startRow:n,endRow:r,columns:l,startColumn:a}=o;return{id:i,type:s,startRow:n,endRow:r,colIds:l.map(d=>d.getColId()),startColId:a.getColId()}});return e!=null&&e.length?{cellRanges:e}:void 0}setCellSelectionState(e){const{gos:t,rangeSvc:o,colModel:i,visibleCols:s}=this.beans;if(!Je(t)||!o)return;const n=[];e==null||e.cellRanges.forEach(r=>{const l=[];if(r.colIds.forEach(d=>{const c=i.getCol(d);c&&l.push(c)}),!l.length)return;let a=i.getCol(r.startColId);if(!a){const d=s.allCols,c=new Set(l);a=d.find(u=>c.has(u))}n.push({...r,columns:l,startColumn:a})}),o.setCellRanges(n)}getScrollState(){if(!this.isClientSideRowModel)return;const e=this.beans.ctrlsSvc.getScrollFeature(),{left:t}=(e==null?void 0:e.getHScrollPosition())??{left:0},{top:o}=(e==null?void 0:e.getVScrollPosition())??{top:0};return o||t?{top:o,left:t}:void 0}setScrollState(e){if(!this.isClientSideRowModel)return;const{top:t,left:o}=e??{top:0,left:0},{frameworkOverrides:i,rowRenderer:s,animationFrameSvc:n,ctrlsSvc:r}=this.beans;i.wrapIncoming(()=>{var l;r.get("center").setCenterViewportScrollLeft(o),(l=r.getScrollFeature())==null||l.setVerticalScrollPosition(t),s.redraw({afterScroll:!0}),n==null||n.flushAllFrames()})}getSideBarState(){var e,t;return(t=(e=this.beans.sideBar)==null?void 0:e.comp)==null?void 0:t.getState()}getFocusedCellState(){if(!this.isClientSideRowModel)return;const e=this.beans.focusSvc.getFocusedCell();if(e){const{column:t,rowIndex:o,rowPinned:i}=e;return{colId:t.getColId(),rowIndex:o,rowPinned:i}}}setFocusedCellState(e){if(!this.isClientSideRowModel)return;const{focusSvc:t,colModel:o}=this.beans;if(!e){t.clearFocusedCell();return}const{colId:i,rowIndex:s,rowPinned:n}=e;t.setFocusedCell({column:o.getCol(i),rowIndex:s,rowPinned:n,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0})}getPaginationState(){const{pagination:e,gos:t}=this.beans;if(!e)return;const o=e.getCurrentPage(),i=t.get("paginationAutoPageSize")?void 0:e.getPageSize();if(!(!o&&!i))return{page:o,pageSize:i}}setPaginationState(e,t){const{pagination:o,gos:i}=this.beans;if(!o)return;const{pageSize:s,page:n}=e??{page:0,pageSize:i.get("paginationPageSize")},r=t==="gridInitializing";s&&!i.get("paginationAutoPageSize")&&o.setPageSize(s,r?"initialState":"pageSizeSelector"),typeof n=="number"&&(r?o.setPage(n):o.goToPage(n))}getRowSelectionState(){var i;const e=this.beans.selectionSvc;if(!e)return;const t=e.getSelectionState();return!t||!Array.isArray(t)&&(t.selectAll===!1||t.selectAllChildren===!1)&&!((i=t==null?void 0:t.toggledNodes)!=null&&i.length)?void 0:t}setRowSelectionState(e,t){var o;(o=this.beans.selectionSvc)==null||o.setSelectionState(e,t,t==="api")}getRowGroupExpansionState(){const{expansionSvc:e,rowModel:t}=this.beans;if(!e)return;const o=[];return t.forEachNode(({expanded:i,id:s})=>{i&&s&&o.push(s)}),o.length?{expandedRowGroupIds:o}:void 0}getRowPinningState(){var e;return(e=this.beans.pinnedRowModel)==null?void 0:e.getPinnedState()}setRowPinningState(e){const t=this.beans.pinnedRowModel;e?t==null||t.setPinnedState(e):t==null||t.reset()}setRowGroupExpansionState(e,t){var n;const o=this.beans.expansionSvc;if(!o)return;const i=(e==null?void 0:e.expandedRowGroupIds)??[];let s;if(t==="api"){const r=(n=this.getRowGroupExpansionState())==null?void 0:n.expandedRowGroupIds;if(r!=null&&r.length){const l=new Set(r);for(const a of i)l.delete(a);s=Array.from(l)}}o.expandRows(i,s)}updateColumnState(e){const t=this.getColumnState();let o=!1;const i=this.cachedState;for(const s of Object.keys(t)){const n=t[s];Sn(n,i[s])||(o=!0)}this.cachedState={...i,...t},o&&this.dispatchStateUpdateEvent(e)}updateCachedState(e,t){const o=this.cachedState[e];this.setCachedStateValue(e,t),Sn(t,o)||this.dispatchStateUpdateEvent([e])}setCachedStateValue(e,t){this.cachedState={...this.cachedState,[e]:t}}refreshStaleState(){const e=this.staleStateKeys;e.forEach(t=>{switch(t){case"rowSelection":this.setCachedStateValue(t,this.getRowSelectionState());break}}),e.clear()}dispatchStateUpdateEvent(e){this.suppressEvents||(e.forEach(t=>this.queuedUpdateSources.add(t)),this.dispatchStateUpdateEventDebounced())}dispatchQueuedStateUpdateEvents(){const e=this.queuedUpdateSources,t=Array.from(e);e.clear(),this.eventSvc.dispatchEvent({type:"stateUpdated",sources:t,state:this.cachedState})}startSuppressEvents(){var e;this.suppressEvents=!0,(e=this.beans.colAnimation)==null||e.setSuppressAnimation(!0)}stopSuppressEvents(e){setTimeout(()=>{var t;this.suppressEvents=!1,this.queuedUpdateSources.clear(),this.isAlive()&&((t=this.beans.colAnimation)==null||t.setSuppressAnimation(!1),this.dispatchStateUpdateEvent([e]))})}suppressEventsAndDispatchInitEvent(e){this.startSuppressEvents(),e(),this.stopSuppressEvents("gridInitializing")}},yb={moduleName:"GridState",version:H,beans:[bb],apiFunctions:{getState:mb,setState:wb}};function Rb(e,t={}){const o=t?t.rowNodes:void 0;e.frameworkOverrides.wrapIncoming(()=>e.rowRenderer.redrawRows(o))}function Ga(e,t,o,i,s){t&&(i&&t.parent&&t.parent.level!==-1&&Ga(e,t.parent,o,i,s),t.setExpanded(o,void 0,s))}function Eb(e,t){return e.rowModel.getRowNode(t)}function xb(e,t,o,i){e.rowRenderer.addRenderedRowListener(t,o,i)}function Db(e){return e.rowRenderer.getRenderedNodes()}function Fb(e,t,o){e.rowModel.forEachNode(t,o)}function Pb(e){return e.rowRenderer.firstRenderedRow}function Tb(e){return e.rowRenderer.lastRenderedRow}function Ib(e,t){return e.rowModel.getRow(t)}function Ab(e){return e.rowModel.getRowCount()}var Ha={moduleName:"RowApi",version:H,apiFunctions:{redrawRows:Rb,setRowNodeExpanded:Ga,getRowNode:Eb,addRenderedRowListener:xb,getRenderedNodes:Db,forEachNode:Fb,getFirstDisplayedRowIndex:Pb,getLastDisplayedRowIndex:Tb,getDisplayedRowAtIndex:Ib,getDisplayedRowCount:Ab}},Mb={moduleName:"ScrollApi",version:H,apiFunctions:{getVerticalPixelRange:DS,getHorizontalPixelRange:FS,ensureColumnVisible:Fa,ensureIndexVisible:Pa,ensureNodeVisible:PS}};function kb(e,t,o){if(!t)return;const i=e.ctrlsSvc.getGridBodyCtrl().eGridBody,s=`aria-${t}`;o===null?i.removeAttribute(s):i.setAttribute(s,o)}function Lb(e,t={}){e.frameworkOverrides.wrapIncoming(()=>e.rowRenderer.refreshCells(t))}function Gb(e){e.frameworkOverrides.wrapIncoming(()=>e.ctrlsSvc.getHeaderRowContainerCtrls().forEach(t=>t.refresh()))}function Hb(e){var t;return((t=e.animationFrameSvc)==null?void 0:t.isQueueEmpty())??!0}function Ob(e){var t;(t=e.animationFrameSvc)==null||t.flushAllFrames()}function Bb(e){return{rowHeight:is(e),headerHeight:lo(e)}}function Vb(e,t={}){var n;const o=[];if(e.rowRenderer.getCellCtrls(t.rowNodes,t.columns).forEach(r=>{const l=r.getCellRenderer();l!=null&&o.push(ds(l))}),(n=t.columns)!=null&&n.length)return o;const i=[],s=nn(t.rowNodes);return e.rowRenderer.getAllRowCtrls().forEach(r=>{if(s&&!rn(r.rowNode,s)||!r.isFullWidth())return;const l=r.getFullWidthCellRenderers();for(let a=0;a<l.length;a++){const d=l[a];d!=null&&i.push(ds(d))}}),[...i,...o]}var Nb={moduleName:"RenderApi",version:H,apiFunctions:{setGridAriaProperty:kb,refreshCells:Lb,refreshHeader:Gb,isAnimationFrameQueueEmpty:Hb,flushAllAnimationFrames:Ob,getSizesForCurrentTheme:Bb,getCellRendererInstances:Vb}};function _b(e,t){var o,i;typeof t=="number"?(o=e.colAutosize)==null||o.sizeColumnsToFit(t,"api"):(i=e.colAutosize)==null||i.sizeColumnsToFitGridBody(t)}function Oa({colAutosize:e,visibleCols:t},o,i){Array.isArray(o)?e==null||e.autoSizeCols({colKeys:o,skipHeader:i,source:"api"}):e==null||e.autoSizeCols({colKeys:o.colIds??t.allCols,skipHeader:o.skipHeader,defaultMaxWidth:o.defaultMaxWidth,defaultMinWidth:o.defaultMinWidth,columnLimits:o.columnLimits,source:"api"})}function Wb(e,t){var o;t&&typeof t=="object"?Oa(e,t):(o=e.colAutosize)==null||o.autoSizeAllColumns({source:"api",skipHeader:t})}var zb=class extends x{constructor(){super(...arguments),this.beanName="colAutosize",this.timesDelayed=0,this.shouldQueueResizeOperations=!1,this.resizeOperationQueue=[]}postConstruct(){this.addManagedEventListeners({firstDataRendered:()=>this.onFirstDataRendered()})}autoSizeCols(e){if(this.shouldQueueResizeOperations){this.pushResizeOperation(()=>this.autoSizeCols(e));return}const{colKeys:t,skipHeader:o,skipHeaderGroups:i,stopAtGroup:s,defaultMaxWidth:n,defaultMinWidth:r,columnLimits:l=[],source:a="api"}=e,{animationFrameSvc:d,renderStatus:c,colModel:u,autoWidthCalc:h,visibleCols:g}=this.beans;if(d==null||d.flushAllFrames(),this.timesDelayed<5&&c&&!c.areHeaderCellsRendered()){this.timesDelayed++,setTimeout(()=>{this.isAlive()&&this.autoSizeCols(e)});return}this.timesDelayed=0;const p=[];let f=-1;const C=Object.fromEntries(l.map(({colId:S,maxWidth:v,minWidth:b})=>[S,{maxWidth:v,minWidth:b}])),m=o??this.gos.get("skipHeaderOnAutoSize"),w=i??m;for(;f!==0;){f=0;const S=[];t.forEach(v=>{if(!v||Vc(v))return;const b=u.getCol(v);if(!b||p.indexOf(b)>=0)return;const D=h.getPreferredWidthForColumn(b,m);if(D>0){const I=C[b.colId]??{};I.minWidth??(I.minWidth=r),I.maxWidth??(I.maxWidth=n);const B=$b(b,D,I);b.setActualWidth(B,a),p.push(b),f++}S.push(b)}),S.length&&g.refresh(a)}w||this.autoSizeColumnGroupsByColumns(t,a,s),yt(this.eventSvc,p,!0,"autosizeColumns")}autoSizeColumn(e,t,o){e&&this.autoSizeCols({colKeys:[e],skipHeader:o,skipHeaderGroups:!0,source:t})}autoSizeColumnGroupsByColumns(e,t,o){const{colModel:i,ctrlsSvc:s}=this.beans,n=new Set;i.getColsForKeys(e).forEach(d=>{let c=d.getParent();for(;c&&c!=o;)c.isPadding()||n.add(c),c=c.getParent()});let l;const a=[];for(const d of n){for(const c of s.getHeaderRowContainerCtrls())if(l=c.getHeaderCtrlForColumn(d),l)break;l&&l.resizeLeafColumnsToFit(t)}return a}autoSizeAllColumns(e){if(this.shouldQueueResizeOperations){this.pushResizeOperation(()=>this.autoSizeAllColumns(e));return}const t=this.beans.visibleCols.allCols;this.autoSizeCols({colKeys:t,...e})}addColumnAutosize(e,t){const o=this.gos.get("skipHeaderOnAutoSize"),i=()=>{this.autoSizeColumn(t,"uiColumnResized",o)};e.addEventListener("dblclick",i);const s=new lt(e);return s.addEventListener("doubleTap",i),()=>{e.removeEventListener("dblclick",i),s.removeEventListener("doubleTap",i),s.destroy()}}addColumnGroupResize(e,t,o){const i=this.gos.get("skipHeaderOnAutoSize"),s=()=>{const n=[];t.getDisplayedLeafColumns().forEach(l=>{l.getColDef().suppressAutoSize||n.push(l.getColId())}),n.length>0&&this.autoSizeCols({colKeys:n,skipHeader:i,stopAtGroup:t,source:"uiColumnResized"}),o()};return e.addEventListener("dblclick",s),()=>e.removeEventListener("dblclick",s)}sizeColumnsToFitGridBody(e,t){if(!this.isAlive())return;const{ctrlsSvc:o,scrollVisibleSvc:i}=this.beans,s=o.getGridBodyCtrl(),r=s.isVerticalScrollShowing()?i.getScrollbarWidth():0,a=Ut(s.eGridBody)-r;if(a>0){this.sizeColumnsToFit(a,"sizeColumnsToFit",!1,e);return}t===void 0?window.setTimeout(()=>{this.sizeColumnsToFitGridBody(e,100)},0):t===100?window.setTimeout(()=>{this.sizeColumnsToFitGridBody(e,500)},100):t===500?window.setTimeout(()=>{this.sizeColumnsToFitGridBody(e,-1)},500):k(29)}sizeColumnsToFit(e,t="sizeColumnsToFit",o,i){var g;if(this.shouldQueueResizeOperations){this.pushResizeOperation(()=>this.sizeColumnsToFit(e,t,o,i));return}const s={};i&&((g=i==null?void 0:i.columnLimits)==null||g.forEach(({key:p,...f})=>{s[typeof p=="string"?p:p.getColId()]=f}));const n=this.beans.visibleCols.allCols;if(e<=0||!n.length||e===Le(n)&&n.every(f=>{if(f.colDef.suppressSizeToFit)return!0;const C=s==null?void 0:s[f.getId()],m=(C==null?void 0:C.minWidth)??(i==null?void 0:i.defaultMinWidth),w=(C==null?void 0:C.maxWidth)??(i==null?void 0:i.defaultMaxWidth),S=f.getActualWidth();return(m==null||S>=m)&&(w==null||S<=w)}))return;const l=[],a=[];n.forEach(p=>{p.getColDef().suppressSizeToFit===!0?a.push(p):l.push(p)});const d=l.slice(0);let c=!1;const u=p=>{me(l,p),a.push(p)};for(l.forEach(p=>{p.resetActualWidth(t);const f=s==null?void 0:s[p.getId()],C=(f==null?void 0:f.minWidth)??(i==null?void 0:i.defaultMinWidth),m=(f==null?void 0:f.maxWidth)??(i==null?void 0:i.defaultMaxWidth),w=p.getActualWidth();typeof C=="number"&&w<C?p.setActualWidth(C,t,!0):typeof m=="number"&&w>m&&p.setActualWidth(m,t,!0)});!c;){c=!0;const p=e-Le(a);if(p<=0)l.forEach(f=>{var m;const C=((m=s==null?void 0:s[f.getId()])==null?void 0:m.minWidth)??(i==null?void 0:i.defaultMinWidth);if(typeof C=="number"){f.setActualWidth(C,t,!0);return}f.setActualWidth(f.minWidth,t)});else{const f=p/Le(l);let C=p;for(let m=l.length-1;m>=0;m--){const w=l[m],S=s==null?void 0:s[w.getId()],v=(S==null?void 0:S.minWidth)??(i==null?void 0:i.defaultMinWidth),b=(S==null?void 0:S.maxWidth)??(i==null?void 0:i.defaultMaxWidth),D=w.getMinWidth(),I=w.getMaxWidth(),B=typeof v=="number"&&v>D?v:D,P=typeof b=="number"&&b<I?b:I;let T=Math.round(w.getActualWidth()*f);T<B?(T=B,u(w),c=!1):T>P?(T=P,u(w),c=!1):m===0&&(T=C),w.setActualWidth(T,t,!0),C-=T}}}d.forEach(p=>{p.fireColumnWidthChangedEvent(t)});const h=this.beans.visibleCols;h.setLeftValues(t),h.updateBodyWidths(),!o&&yt(this.eventSvc,d,!0,t)}applyAutosizeStrategy(){const e=this.gos.get("autoSizeStrategy");if(!e)return;const{type:t}=e;setTimeout(()=>{if(t==="fitGridWidth"){const{columnLimits:o,defaultMinWidth:i,defaultMaxWidth:s}=e,n=o==null?void 0:o.map(({colId:r,minWidth:l,maxWidth:a})=>({key:r,minWidth:l,maxWidth:a}));this.sizeColumnsToFitGridBody({defaultMinWidth:i,defaultMaxWidth:s,columnLimits:n})}else t==="fitProvidedWidth"&&this.sizeColumnsToFit(e.width,"sizeColumnsToFit")})}onFirstDataRendered(){const e=this.gos.get("autoSizeStrategy");if((e==null?void 0:e.type)!=="fitCellContents")return;const{colIds:t,skipHeader:o,defaultMaxWidth:i,defaultMinWidth:s,columnLimits:n}=e;setTimeout(()=>{const r={skipHeader:o,source:"autosizeColumns",defaultMaxWidth:i,defaultMinWidth:s,columnLimits:n};t?this.autoSizeCols({colKeys:t,...r}):this.autoSizeAllColumns(r)})}processResizeOperations(){this.shouldQueueResizeOperations=!1,this.resizeOperationQueue.forEach(e=>e()),this.resizeOperationQueue=[]}pushResizeOperation(e){this.resizeOperationQueue.push(e)}destroy(){this.resizeOperationQueue.length=0,super.destroy()}};function $b(e,t,o={}){const i=o.minWidth??e.getMinWidth();t<i&&(t=i);const s=o.maxWidth??e.getMaxWidth();return t>s&&(t=s),t}var Ub={moduleName:"ColumnAutoSize",version:H,beans:[zb],apiFunctions:{sizeColumnsToFit:_b,autoSizeColumns:Oa,autoSizeAllColumns:Wb},dependsOn:[Ol]},Kb=".ag-row-pinned-source{background-color:var(--ag-pinned-source-row-background-color);color:var(--ag-pinned-source-row-text-color);font-weight:var(--ag-pinned-source-row-font-weight)}.ag-row-pinned-manual{background-color:var(--ag-pinned-row-background-color);color:var(--ag-pinned-row-text-color);font-weight:var(--ag-pinned-row-font-weight)}";function jb(e){var t;return((t=e.pinnedRowModel)==null?void 0:t.getPinnedTopRowCount())??0}function qb(e){var t;return((t=e.pinnedRowModel)==null?void 0:t.getPinnedBottomRowCount())??0}function Yb(e,t){var o;return(o=e.pinnedRowModel)==null?void 0:o.getPinnedTopRow(t)}function Zb(e,t){var o;return(o=e.pinnedRowModel)==null?void 0:o.getPinnedBottomRow(t)}function Qb(e,t,o){var i;return(i=e.pinnedRowModel)==null?void 0:i.forEachPinnedRow(t,o)}var Xb={moduleName:"PinnedRow",version:H,beans:[rp],css:[Kb],apiFunctions:{getPinnedTopRowCount:jb,getPinnedBottomRowCount:qb,getPinnedTopRow:Yb,getPinnedBottomRow:Zb,forEachPinnedRow:Qb},icons:{rowPin:"pin",rowPinTop:"pinned-top",rowPinBottom:"pinned-bottom",rowUnpin:"un-pin"}},Jb=class extends Pt{constructor(e,t,o){super(e.col,e.firstNode,o,t),this.cellSpan=e,this.SPANNED_CELL_CSS_CLASS="ag-spanned-cell"}setComp(e,t,o,i,s,n,r){this.eWrapper=o,super.setComp(e,t,o,i,s,n,r),this.setAriaRowSpan(),this.refreshAriaRowIndex()}isCellSpanning(){return!0}getCellSpan(){return this.cellSpan}refreshAriaRowIndex(){this.rowNode.rowIndex!=null&&xo(this.eGui,this.rowNode.rowIndex)}setAriaRowSpan(){Ud(this.eGui,this.cellSpan.spannedNodes.size)}setFocusedCellPosition(e){this.focusedCellPosition=e}getFocusedCellPosition(){return this.focusedCellPosition??this.cellPosition}checkCellFocused(){const e=this.beans.focusSvc.getFocusedCell();return!!e&&this.cellSpan.doesSpanContain(e)}applyStaticCssClasses(){super.applyStaticCssClasses(),this.comp.toggleCss(this.SPANNED_CELL_CSS_CLASS,!0)}onCellFocused(e){const{beans:t}=this;if(ii(t)){this.focusedCellPosition=void 0;return}const o=this.isCellFocused();o||(this.focusedCellPosition=void 0),e&&o&&(this.focusedCellPosition={rowIndex:e.rowIndex,rowPinned:e.rowPinned,column:e.column}),super.onCellFocused(e)}getRootElement(){return this.eWrapper}},ey=class extends ai{onRowIndexChanged(){super.onRowIndexChanged(),this.getAllCellCtrls().forEach(e=>e.refreshAriaRowIndex())}getInitialRowClasses(e){return["ag-spanned-row"]}getNewCellCtrl(e){var i;const t=(i=this.beans.rowSpanSvc)==null?void 0:i.getCellSpan(e,this.rowNode);if(!(!t||t.firstNode!==this.rowNode))return new Jb(t,this,this.beans)}isCorrectCtrlForSpan(e){var i;const t=(i=this.beans.rowSpanSvc)==null?void 0:i.getCellSpan(e.column,this.rowNode);return!t||t.firstNode!==this.rowNode?!1:e.getCellSpan()===t}onRowHeightChanged(){}refreshFirstAndLastRowStyles(){}addHoverFunctionality(){}resetHoveredStatus(){}},ty=class extends x{constructor(){super(...arguments),this.beanName="spannedRowRenderer",this.topCtrls=new Map,this.bottomCtrls=new Map,this.centerCtrls=new Map}postConstruct(){this.addManagedEventListeners({displayedRowsChanged:this.createAllCtrls.bind(this)})}createAllCtrls(){this.createCtrls("top"),this.createCtrls("bottom"),this.createCtrls("center")}createCtrls(e){const{rowSpanSvc:t}=this.beans,o=`${e}Ctrls`,i=this[o],s=i.size,n=this.getAllRelevantRowControls(e),r=new Map;let l=!1;for(const d of n)d.isAlive()&&(t==null||t.forEachSpannedColumn(d.rowNode,(c,u)=>{if(r.has(u.firstNode))return;const h=i.get(u.firstNode);if(h){r.set(u.firstNode,h),i.delete(u.firstNode);return}l=!0;const g=new ey(u.firstNode,this.beans,!1,!1,!1);r.set(u.firstNode,g)}));this[o]=r;const a=r.size===s;if(!(!l&&a)){for(const d of i.values())d.destroyFirstPass(!0),d.destroySecondPass();this.dispatchLocalEvent({type:"spannedRowsUpdated",ctrlsKey:e})}}getAllRelevantRowControls(e){const{rowRenderer:t}=this.beans;switch(e){case"top":return t.topRowCtrls;case"bottom":return t.bottomRowCtrls;case"center":return t.allRowCtrls}}getCellByPosition(e){const{rowSpanSvc:t}=this.beans,o=t==null?void 0:t.getCellSpanByPosition(e);if(!o)return;const i=`${Ba(e.rowPinned)}Ctrls`,s=this[i].get(o.firstNode);if(s)return s.getAllCellCtrls().find(n=>n.column===e.column)}getCtrls(e){const t=`${e}Ctrls`;return[...this[t].values()]}destroyRowCtrls(e){const t=`${e}Ctrls`;for(const o of this[t].values())o.destroyFirstPass(!0),o.destroySecondPass();this[t]=new Map}destroy(){super.destroy(),this.destroyRowCtrls("top"),this.destroyRowCtrls("bottom"),this.destroyRowCtrls("center")}},Ba=e=>e??"center",oy=class{constructor(e,t){this.col=e,this.firstNode=t,this.cellSpan=!0,this.spannedNodes=new Set,this.addSpannedNode(t)}reset(){this.spannedNodes.clear(),this.addSpannedNode(this.firstNode)}addSpannedNode(e){this.spannedNodes.add(e),this.lastNode=e}getLastNode(){return this.lastNode}getCellHeight(){return this.lastNode.rowTop+this.lastNode.rowHeight-this.firstNode.rowTop-1}doesSpanContain(e){return e.column!==this.col||e.rowPinned!=this.firstNode.rowPinned?!1:this.firstNode.rowIndex<=e.rowIndex&&e.rowIndex<=this.lastNode.rowIndex}getLastNodeAutoHeight(){var o;const e=(o=this.firstNode.__autoHeights)==null?void 0:o[this.col.getColId()];if(e==null)return;let t=0;return this.spannedNodes.forEach(i=>{i!==this.lastNode&&(t+=i.rowHeight)}),e-t}},iy=class extends x{constructor(e){super(),this.column=e}buildCache(e){var S;const{column:t,beans:{gos:o,pinnedRowModel:i,rowModel:s,valueSvc:n,pagination:r}}=this,{colDef:l}=t,a=this[`${e}ValueNodeMap`],d=new Map,c=o.getCallback("isFullWidthRow"),u=l.equals,h=l.spanRows,g=typeof h=="function";let p=null,f=null,C;const m=(v,b)=>{p=v,f=null,C=b},w=v=>{const b=!v.isExpandable()&&!v.group&&!v.detail&&(c?!c({rowNode:v}):!0);if(v.rowIndex==null||!b){m(null,null);return}if(p==null||v.level!==p.level||v.footer||f&&v.rowIndex-1!==(f==null?void 0:f.getLastNode().rowIndex)){m(v,n.getValue(t,v));return}const D=n.getValue(t,v);if(g){const I=N(o,{valueA:C,nodeA:p,valueB:D,nodeB:v,column:t,colDef:l});if(!h(I)){m(v,D);return}}else if(u?!u(C,D):C!==D){m(v,D);return}if(!f){const I=a==null?void 0:a.get(p);(I==null?void 0:I.firstNode)===p?(I.reset(),f=I):f=new oy(t,p),d.set(p,f)}f.addSpannedNode(v),d.set(v,f)};switch(e){case"center":(S=s.forEachDisplayedNode)==null||S.call(s,v=>{(!r||r.isRowInPage(v.rowIndex))&&w(v)});break;case"top":i==null||i.forEachPinnedRow("top",w);break;case"bottom":i==null||i.forEachPinnedRow("bottom",w);break}this[`${e}ValueNodeMap`]=d}isCellSpanning(e){return!!this.getCellSpan(e)}getCellSpan(e){return this[`${Ba(e.rowPinned)}ValueNodeMap`].get(e)}},sy=class extends x{constructor(){super(...arguments),this.beanName="rowSpanSvc",this.spanningColumns=new Map,this.debouncePinnedEvent=he(this,this.dispatchCellsUpdatedEvent.bind(this,!0),0),this.debounceModelEvent=he(this,this.dispatchCellsUpdatedEvent.bind(this,!1),0),this.pinnedTimeout=null,this.modelTimeout=null}postConstruct(){const e=this.onRowDataUpdated.bind(this),t=this.buildPinnedCaches.bind(this);this.addManagedEventListeners({paginationChanged:this.buildModelCaches.bind(this),pinnedRowDataChanged:t,pinnedRowsChanged:t,rowNodeDataChanged:e,cellValueChanged:e})}register(e){const{gos:t}=this.beans;if(!t.get("enableCellSpan")||this.spanningColumns.has(e))return;const o=this.createManagedBean(new iy(e));this.spanningColumns.set(e,o),o.buildCache("top"),o.buildCache("bottom"),o.buildCache("center"),this.debouncePinnedEvent(),this.debounceModelEvent()}dispatchCellsUpdatedEvent(e){this.dispatchLocalEvent({type:"spannedCellsUpdated",pinned:e})}deregister(e){this.spanningColumns.delete(e)}onRowDataUpdated({node:e}){const{spannedRowRenderer:t}=this.beans;if(e.rowPinned){if(this.pinnedTimeout!=null)return;this.pinnedTimeout=window.setTimeout(()=>{this.pinnedTimeout=null,this.buildPinnedCaches(),t==null||t.createCtrls("top"),t==null||t.createCtrls("bottom")},0);return}this.modelTimeout==null&&(this.modelTimeout=window.setTimeout(()=>{this.modelTimeout=null,this.buildModelCaches(),t==null||t.createCtrls("center")},0))}buildModelCaches(){this.modelTimeout!=null&&clearTimeout(this.modelTimeout),this.spanningColumns.forEach(e=>e.buildCache("center")),this.debounceModelEvent()}buildPinnedCaches(){this.pinnedTimeout!=null&&clearTimeout(this.pinnedTimeout),this.spanningColumns.forEach(e=>{e.buildCache("top"),e.buildCache("bottom")}),this.debouncePinnedEvent()}isCellSpanning(e,t){const o=this.spanningColumns.get(e);return o?o.isCellSpanning(t):!1}getCellSpanByPosition(e){const{pinnedRowModel:t,rowModel:o}=this.beans,i=e.column,s=e.rowIndex,n=this.spanningColumns.get(i);if(!n)return;let r;switch(e.rowPinned){case"top":r=t==null?void 0:t.getPinnedTopRow(s);break;case"bottom":r=t==null?void 0:t.getPinnedBottomRow(s);break;default:r=o.getRow(s)}if(r)return n.getCellSpan(r)}getCellStart(e){const t=this.getCellSpanByPosition(e);return t?{...e,rowIndex:t.firstNode.rowIndex}:e}getCellEnd(e){const t=this.getCellSpanByPosition(e);return t?{...e,rowIndex:t.getLastNode().rowIndex}:e}getCellSpan(e,t){const o=this.spanningColumns.get(e);if(o)return o.getCellSpan(t)}forEachSpannedColumn(e,t){for(const[o,i]of this.spanningColumns)if(i.isCellSpanning(e)){const s=i.getCellSpan(e);t(o,s)}}destroy(){super.destroy(),this.spanningColumns.clear()}},ny={moduleName:"CellSpan",version:H,beans:[sy,ty]},ry=class extends x{constructor(e,t){super(),this.cellCtrl=e,this.staticClasses=[],this.beans=t,this.column=e.column}setComp(e){this.cellComp=e,this.applyUserStyles(),this.applyCellClassRules(),this.applyClassesFromColDef()}applyCellClassRules(){const{column:e,cellComp:t}=this,o=e.colDef,i=o.cellClassRules,s=this.getCellClassParams(e,o);Es(this.beans.expressionSvc,i===this.cellClassRules?void 0:this.cellClassRules,i,s,n=>t.toggleCss(n,!0),n=>t.toggleCss(n,!1)),this.cellClassRules=i}applyUserStyles(){const e=this.column,t=e.colDef,o=t.cellStyle;if(!o)return;let i;if(typeof o=="function"){const s=this.getCellClassParams(e,t);i=o(s)}else i=o;i&&this.cellComp.setUserStyles(i)}applyClassesFromColDef(){const{column:e,cellComp:t}=this,o=e.colDef,i=this.getCellClassParams(e,o);this.staticClasses.forEach(n=>t.toggleCss(n,!1));const s=this.beans.cellStyles.getStaticCellClasses(o,i);this.staticClasses=s,s.forEach(n=>t.toggleCss(n,!0))}getCellClassParams(e,t){const{value:o,rowNode:i}=this.cellCtrl;return N(this.beans.gos,{value:o,data:i.data,node:i,colDef:t,column:e,rowIndex:i.rowIndex})}},ly=class extends x{constructor(){super(...arguments),this.beanName="cellStyles"}processAllCellClasses(e,t,o,i){Es(this.beans.expressionSvc,void 0,e.cellClassRules,t,o,i),this.processStaticCellClasses(e,t,o)}getStaticCellClasses(e,t){const{cellClass:o}=e;if(!o)return[];let i;return typeof o=="function"?i=o(t):i=o,typeof i=="string"&&(i=[i]),i||[]}createCellCustomStyleFeature(e,t){return new ry(e,t)}processStaticCellClasses(e,t,o){this.getStaticCellClasses(e,t).forEach(s=>{o(s)})}},ay={moduleName:"CellStyle",version:H,beans:[ly]},dy={moduleName:"RowStyle",version:H,beans:[Kh]};function cy(e,t){var o;return!!((o=e.colHover)!=null&&o.isHovered(t))}var uy=class extends x{constructor(e,t){super(),this.columns=e,this.element=t,this.destroyManagedListeners=[],this.enableFeature=o=>{const{beans:i,gos:s,element:n,columns:r}=this,l=i.colHover;o??!!s.get("columnHoverHighlight")?this.destroyManagedListeners=this.addManagedElementListeners(n,{mouseover:l.setMouseOver.bind(l,r),mouseout:l.clearMouseOver.bind(l)}):(this.destroyManagedListeners.forEach(d=>d()),this.destroyManagedListeners=[])}}postConstruct(){this.addManagedPropertyListener("columnHoverHighlight",({currentValue:e})=>{this.enableFeature(e)}),this.enableFeature()}destroy(){super.destroy(),this.destroyManagedListeners=null}},hy="ag-column-hover",gy=class extends x{constructor(){super(...arguments),this.beanName="colHover"}postConstruct(){this.addManagedPropertyListener("columnHoverHighlight",({currentValue:e})=>{e||this.clearMouseOver()})}setMouseOver(e){this.updateState(e)}clearMouseOver(){this.updateState(null)}isHovered(e){if(!this.gos.get("columnHoverHighlight"))return!1;const t=this.selectedColumns;return!!t&&t.indexOf(e)>=0}addHeaderColumnHoverListener(e,t,o){const i=()=>{const s=this.isHovered(o);t.toggleCss("ag-column-hover",s)};e.addManagedEventListeners({columnHoverChanged:i}),i()}onCellColumnHover(e,t){if(!t)return;const o=this.isHovered(e);t.toggleCss(hy,o)}addHeaderFilterColumnHoverListener(e,t,o,i){this.createHoverFeature(e,[o],i);const s=()=>{const n=this.isHovered(o);t.toggleCss("ag-column-hover",n)};e.addManagedEventListeners({columnHoverChanged:s}),s()}createHoverFeature(e,t,o){e.createManagedBean(new uy(t,o))}updateState(e){this.selectedColumns=e,this.eventSvc.dispatchEvent({type:"columnHoverChanged"})}},py={moduleName:"ColumnHover",version:H,beans:[gy],apiFunctions:{isColumnHovered:cy}},fy=class extends x{constructor(){super(...arguments),this.beanName="apiEventSvc",this.syncListeners=new Map,this.asyncListeners=new Map,this.syncGlobalListeners=new Set,this.globalListenerPairs=new Map}postConstruct(){var e,t;this.wrapSvc=(t=(e=this.beans.frameworkOverrides).createGlobalEventListenerWrapper)==null?void 0:t.call(e)}addEventListener(e,t){var n;const o=((n=this.wrapSvc)==null?void 0:n.wrap(e,t))??t,i=!ho.has(e),s=i?this.asyncListeners:this.syncListeners;s.has(e)||s.set(e,new Set),s.get(e).add(o),this.eventSvc.addEventListener(e,o,i)}removeEventListener(e,t){var n,r;const o=((n=this.wrapSvc)==null?void 0:n.unwrap(e,t))??t,i=this.asyncListeners.get(e),s=!!(i!=null&&i.delete(o));s||(r=this.syncListeners.get(e))==null||r.delete(o),this.eventSvc.removeEventListener(e,o,s)}addGlobalListener(e){var n;const t=((n=this.wrapSvc)==null?void 0:n.wrapGlobal(e))??e,o=(r,l)=>{ho.has(r)&&t(r,l)},i=(r,l)=>{ho.has(r)||t(r,l)};this.globalListenerPairs.set(e,{syncListener:o,asyncListener:i});const s=this.eventSvc;s.addGlobalListener(o,!1),s.addGlobalListener(i,!0)}removeGlobalListener(e){const{eventSvc:t,wrapSvc:o,globalListenerPairs:i}=this,s=(o==null?void 0:o.unwrapGlobal(e))??e;if(i.has(s)){const{syncListener:r,asyncListener:l}=i.get(s);t.removeGlobalListener(r,!1),t.removeGlobalListener(l,!0),i.delete(e)}else this.syncGlobalListeners.delete(s),t.removeGlobalListener(s,!1)}destroyEventListeners(e,t){e.forEach((o,i)=>{o.forEach(s=>this.eventSvc.removeEventListener(i,s,t)),o.clear()}),e.clear()}destroyGlobalListeners(e,t){e.forEach(o=>this.eventSvc.removeGlobalListener(o,t)),e.clear()}destroy(){super.destroy(),this.destroyEventListeners(this.syncListeners,!1),this.destroyEventListeners(this.asyncListeners,!0),this.destroyGlobalListeners(this.syncGlobalListeners,!1);const{globalListenerPairs:e,eventSvc:t}=this;e.forEach(({syncListener:o,asyncListener:i})=>{t.removeGlobalListener(o,!1),t.removeGlobalListener(i,!0)}),e.clear()}};function Cy(e,t,o){var i;(i=e.apiEventSvc)==null||i.addEventListener(t,o)}function my(e,t,o){var i;(i=e.apiEventSvc)==null||i.removeEventListener(t,o)}function wy(e,t){var o;(o=e.apiEventSvc)==null||o.addGlobalListener(t)}function vy(e,t){var o;(o=e.apiEventSvc)==null||o.removeGlobalListener(t)}var Sy={moduleName:"EventApi",version:H,apiFunctions:{addEventListener:Cy,addGlobalListener:wy,removeEventListener:my,removeGlobalListener:vy},beans:[fy]},by={moduleName:"Locale",version:H,beans:[Hv]},yy=class extends x{constructor(){super(...arguments),this.beanName="rowAutoHeight",this.wasEverActive=!1,this._debouncedCalculateRowHeights=he(this,this.calculateRowHeights.bind(this),1)}requestCheckAutoHeight(){this.wasEverActive&&this._debouncedCalculateRowHeights()}calculateRowHeights(){var l,a,d,c;const{visibleCols:e,rowModel:t,rowSpanSvc:o,pinnedRowModel:i}=this.beans,s=e.autoHeightCols;let n=!1;const r=u=>{var p;const h=u.__autoHeights;let g=_e(this.beans,u).height;for(const f of s){let C=h==null?void 0:h[f.getColId()];const m=o==null?void 0:o.getCellSpan(f,u);if(m){if(m.getLastNode()!==u)continue;if(C=(p=o==null?void 0:o.getCellSpan(f,u))==null?void 0:p.getLastNodeAutoHeight(),!C)return}if(C==null){if(this.colSpanSkipCell(f,u))continue;return}g=Math.max(C,g)}g!==u.rowHeight&&(u.setRowHeight(g),n=!0)};(l=i==null?void 0:i.forEachPinnedRow)==null||l.call(i,"top",r),(a=i==null?void 0:i.forEachPinnedRow)==null||a.call(i,"bottom",r),(d=t.forEachDisplayedNode)==null||d.call(t,r),n&&((c=t.onRowHeightChanged)==null||c.call(t))}setRowAutoHeight(e,t,o){if(e.__autoHeights??(e.__autoHeights={}),t==null){delete e.__autoHeights[o.getId()];return}const i=e.__autoHeights[o.getId()];e.__autoHeights[o.getId()]=t,i!==t&&this.requestCheckAutoHeight()}colSpanSkipCell(e,t){const{colModel:o,colViewport:i,visibleCols:s}=this.beans;if(!o.colSpanActive)return!1;let n=[];switch(e.getPinned()){case"left":n=s.getLeftColsForRow(t);break;case"right":n=s.getRightColsForRow(t);break;case null:n=i.getColsWithinViewport(t);break}return!n.includes(e)}setupCellAutoHeight(e,t,o){if(!e.column.isAutoHeight()||!t)return!1;this.wasEverActive=!0;const i=t.parentElement,{rowNode:s,column:n}=e,r=this.beans,l=c=>{var w;if((w=this.beans.editSvc)!=null&&w.isEditing(e)||!e.isAlive()||!o.isAlive())return;const{paddingTop:u,paddingBottom:h,borderBottomWidth:g,borderTopWidth:p}=Ye(i),f=u+h+g+p,m=t.offsetHeight+f;if(c<5){const S=X(r),v=!S||!S.contains(t),b=m==0;if(v||b){window.setTimeout(()=>l(c+1),0);return}}this.setRowAutoHeight(s,m,n)},a=()=>l(0);a();const d=Ze(r,t,a);return o.addDestroyFunc(()=>{d(),this.setRowAutoHeight(s,void 0,n)}),!0}setAutoHeightActive(e){this.active=e.list.some(t=>t.isVisible()&&t.isAutoHeight())}areRowsMeasured(){if(!this.active)return!0;const e=this.beans.rowRenderer.getAllRowCtrls();let t=null;for(const{rowNode:o}of e)if((!t||this.beans.colModel.colSpanActive)&&(t=this.beans.colViewport.getColsWithinViewport(o).filter(s=>s.isAutoHeight())),t.length!==0){if(!o.__autoHeights)return!1;for(const i of t){const s=o.__autoHeights[i.getColId()];if(!s||o.rowHeight<s)return!1}}return!0}},Ry={moduleName:"RowAutoHeight",version:H,beans:[yy]};const ct=Symbol("grid-context"),un=e=>{const t=e.getColumnState().filter(i=>i.sort!=null),o={};return t.forEach((i,s)=>o[i.colId]=s),t.sort((i,s)=>{const n=i.sortIndex,r=s.sortIndex;if(n!=null&&r!=null)return n-r;if(n==null&&r==null){const l=o[i.colId],a=o[s.colId];return l>a?1:-1}else return r==null?-1:1}),t},Va=e=>{const t=un(e),o=new Map;return t.forEach((i,s)=>{o.set(i.colId,s)}),o},Na=(e,t)=>Va(e).get(t)??-1,Ey=e=>!!e&&(typeof e=="object"||typeof e=="function")&&typeof e.then=="function";class _a{constructor(t,o){R(this,"loading",!1);R(this,"dataGetter");R(this,"cache");R(this,"_api");R(this,"loadingDelay");R(this,"getSorts",()=>un(this.api).map(t=>({colId:t.colId,sort:t.sort})));this.dataGetter=t,this.cache=o}set api(t){this._api=t}get api(){return this._api}destroy(){this.loading=!1}loadData(){const t=this.cache.getRows().map((o,i)=>(o.__setIndex(i),o)).flatMap(o=>o.flat());this.api.setGridOption("rowData",t),this.api.redrawRows(),this.loading=!1}getRows(t){var o,i,s,n,r,l,a,d;if(this.loading||!this._api){(i=(o=t.context)==null?void 0:o.resolve)==null||i.call(o);return}if(this.cache.isFinished&&t.pageNum!==1){(n=(s=t.context)==null?void 0:s.resolve)==null||n.call(s);return}if(this.loading=!0,O.isFunction(this.dataGetter)){const c=this.dataGetter({startRow:t.startRow,endRow:t.endRow,pageNum:t.pageNum,pageSize:t.pageSize,params:t.filterModel,sorts:this.getSorts()});Ey(c)&&(this.loadingDelay=setTimeout(()=>{this.api.setGridOption("loading",!0)},500),c.then(u=>{var h,g;t.successCallback(u,u.length),(g=(h=t.context)==null?void 0:h.resolve)==null||g.call(h)}).catch(u=>{var h,g;t.failCallback(),(g=(h=t.context)==null?void 0:h.reject)==null||g.call(h,u)}).finally(()=>{clearTimeout(this.loadingDelay),this.api.setGridOption("loading",!1),this.loadData()})),O.isArray(c)&&(t.successCallback(c,c.length),this.loadData(),(l=(r=t.context)==null?void 0:r.resolve)==null||l.call(r))}else t.successCallback(this.dataGetter,this.dataGetter.length),this.loadData(),(d=(a=t.context)==null?void 0:a.resolve)==null||d.call(a)}}class hn{constructor(t,o,i){R(this,"spanMatrix");R(this,"rootId");R(this,"rowIdToNestingIdx");this.spanMatrix=o,this.rootId=i,this.rowIdToNestingIdx=new Map;for(let s=0;s<t.length;s++)this.rowIdToNestingIdx.set(t[s].id,s)}get(t,o){const i=o.getColId(),s=this.rowIdToNestingIdx.get(t);return s===void 0?0:this.spanMatrix.getCellSpan(this.rootId,s,i)}set(t,o,i){}}class Ot{constructor(t,o,i=[]){R(this,"actualRow");R(this,"id");R(this,"nestingIndexes");this.actualRow=o,this.id=t,this.nestingIndexes=i}delete(){this.actualRow.delete()}redraw(){this.actualRow.redraw()}getActualRow(){return this.actualRow}isCellEditing(t){return this.actualRow.isCellEditing(this.id,t)}startEditing(t){t!==null&&this.actualRow.isEditing()&&(this.actualRow=this.actualRow.stopEditing(!0)),this.actualRow.isEditing(t)||(t==null?this.actualRow.startEditing(!0):this.actualRow.startEditingCell(this.id,t,!0))}getDataIndex(){return this.actualRow.getDataIndex()}getRowSpans(){return this.actualRow.getRowSpans()}isEditing(){return this.actualRow.isEditing()}getValue(t){var o;return(o=this.actualRow.getCell(t,this.getNestingIndexes()))==null?void 0:o.value}getRowSpan(t){return this.actualRow.getRowSpans().get(this.id,t)}getData(){return this.actualRow.getData()}isColumnValueChanged(t,o){return this.actualRow.isEditing()&&this.actualRow.getValue(o,this.getNestingIndexes())!==t}getNestingIndexes(){return this.nestingIndexes}getSignature(){return this.actualRow.getSignature()}getId(){return this.actualRow.getId()}getCell(t){return this.actualRow.getCell(t,this.getNestingIndexes())}isTransient(){return this.actualRow.isTransient()}setData(t){this.actualRow.setData(t)}buildSpan(){this.actualRow.buildSpan()}match(t){return t.data.getId()===this.actualRow.getId()}getHostObject(t){var r;const o=this.getCell(t.column);if(!o)return{hostObject:this.getData()};if(!o.parent||o.parent.field==="$")return{hostObject:this.getData()};let i=o.isArrayElement()?o.path:o.parent.path;((r=t.colDef)==null?void 0:r.cellDataType)==="array"&&(i=o.path);const s=O.get(this.getData(),i),n=i.endsWith("]")?O.get(this.getData(),i.substring(0,i.lastIndexOf("["))):void 0;return{hostObject:s,hostArray:n}}}class Wa{constructor(t,o,i){R(this,"actualRow");R(this,"idMapper");R(this,"draft");this.actualRow=t,this.idMapper=i,this.draft=E.reactive(O.cloneDeep(o))}getSourceRow(){return this.actualRow}getDataIndex(){return this.actualRow.getDataIndex()}getSignature(){return this.actualRow.signature}getValue(t,o){var i;return(i=this.getCell(t,o))==null?void 0:i.value}getCell(t,o){return this.actualRow.getCell(t,o)}getId(){return this.actualRow.id}getRowSpans(){return this.actualRow.getRowSpans()}match(t){return this.actualRow.match(t)}__setIndex(t){this.actualRow.__setIndex(t)}getData(){return this.draft}getDraft(){return this.draft}setData(t){this.draft=E.reactive(t)}buildSpan(){this.actualRow.update(this.actualRow.id,E.toRaw(this.draft))}flat(){return this.actualRow.leafCells.map(t=>new Ot(t.id,this,t.nestingIndexes))}_stopEditingImpl(t=!1){const o=E.toRaw(this.draft),i=this.idMapper(o);return this.actualRow.update(i,o),t&&this.redraw(),this.actualRow.dataCache.replace(this.actualRow),this.actualRow}isEditing(t){return!!this.draft}isCellEditing(t,o){return!!this.draft}stopEditing(t=!1){return this._stopEditingImpl(t)}}class Fi extends Wa{constructor(o,i,s=!1){super(o,O.cloneDeep(o.data),i);R(this,"transient");this.transient=s}redraw(){this.actualRow.redraw()}delete(){this.actualRow.delete()}isTransient(){return this.transient}async persistent(o){const i=await o(O.cloneDeep(this.draft));return this.actualRow.update(this.idMapper(i),i),this.draft=E.reactive(i),this.transient=!1,this}}class Pi extends Wa{constructor(o,i,s,n){super(o,o.data,n);R(this,"editingColumn");R(this,"rowId");this.rowId=i,this.editingColumn=s}getEditingColumn(){return this.editingColumn}getRowId(){return this.rowId}delete(){throw new Error("CellEditableRow 不允许删除")}redraw(){this.actualRow.redrawCell(this.rowId,this.editingColumn)}isCellEditing(o,i){return!!this.draft&&this.editingColumn.getColId()===i.getColId()&&this.rowId===o}isTransient(){return!1}}class Bt{constructor(t,o,i,s,n){R(this,"id");R(this,"field");R(this,"value");R(this,"index");R(this,"properties",new Map);R(this,"parent");R(this,"spanRow",1);R(this,"path");this.id=t,this.field=o,this.value=i,this.index=s,this.parent=n,this.path=this.getReadPath()}getRoot(){let t=this.parent;for(;;){if(t.field==="$")return t;t=t==null?void 0:t.parent}}pretreatmentValue(t,o,i){const s=this.properties.get(t);if(s)return s;const n=O.get(this.value,t);let r;if(O.isArray(n)&&i.cellDataType!=="native"){r=new Array(n.length);for(let l=0;l<n.length;l++)r[l]=new Bt(`${this.id}_${l}`,t,n[l],l,o)}else r=new Bt(this.id,t,n,void 0,o);return this.properties.set(t,r),r}isNeedSpan(){return Array.from(this.properties.values()).some(t=>O.isArray(t))}get(t){return this.properties.get(t)}calcSpan(){if(this.isNeedSpan()){let t=1,o=!1;for(const i of this.properties.values())if(O.isArray(i)){o=!0;let s=0;for(const n of i)s+=n.calcSpan();t=Math.max(t,s)}if(o&&t>1)for(const i of this.properties.values())O.isArray(i)||i.setRowSpan(t);return this.spanRow=t,this.spanRow}return this.spanRow}setRowSpan(t){this.spanRow=t;for(const o of this.properties.values())O.isArray(o)||o.setRowSpan(this.spanRow)}getPath(){const t=[];let o=this;for(;o;)t.push(o.field),o=o.parent;return t.reverse().slice(1).join(".")}getReadPath(){const t=[];let o=this;for(;o;)t.push(`${o.field}${O.isNumber(o.index)?`[${o.index}]`:""}`),o=o.parent;return t.reverse().slice(1).join(".")}isArrayElement(){return this.path.endsWith("]")}}class za{constructor(){R(this,"trees",new Map);R(this,"arrayParents",new Map);R(this,"cellSpanCaches",new Map);R(this,"columns",new Map);R(this,"dirtyRoots",new Set)}setRow(t,o,i){this.columns.clear();for(const c of i.columns)this.columns.set(c.colId,c);const s=this._computeExpandPaths(o,i.columns),n=new Map;this.arrayParents.set(t,n);const r=this.buildTree(t,o,n,s);this.computeSpans(r),this.trees.set(t,r);const l=new Map,a=new Set,d=this.collectLeaves(r);for(const c of d)this._walkUpAndRecord(c,l,a,t);if(d.length>0){const c=new Set;for(const g of d)for(const p of l.keys())if(p.startsWith(`${g.id}|`)){const f=p.substring(g.id.length+1);c.add(f)}const u=d[0],h=r.spanRow;for(const g of this.columns.keys())c.has(g)||l.set(`${u.id}|${g}`,h)}this.cellSpanCaches.set(t,l),this.dirtyRoots.add(t)}_computeExpandPaths(t,o){const i=new Set;for(const s of o){const n=s.colId.split(".");let r=t,l="";const a=s.cellDataType==="native"&&r!=null&&Array.isArray(r[n[0]]);for(let d=0;d<n.length&&r!=null;d++){const c=n[d];l=l?`${l}.${c}`:c;const u=r[c];if(Array.isArray(u)){if(d===0&&a)break;i.add(l),r=u[0]}else r=u}}return i}setArrayLength(t,o,i){var g,p;const s=this.trees.get(t);if(!s)return;const n=(g=this.arrayParents.get(t))==null?void 0:g.get(o);if(!n){this.dirtyRoots.add(t);return}const r=n.children.filter(f=>f.isArrayElement&&f.path===o),l=r.length,a=((p=r[0])==null?void 0:p.field)??o.split(".").pop();if(l===i){this.dirtyRoots.add(t);return}if(i<l)n.children=n.children.filter(f=>!(f.isArrayElement&&f.path===o)||f.index<i);else{n.children=n.children.filter(f=>!(f.path===o&&Array.isArray(f.value)&&f.value.length===0));for(let f=l;f<i;f++){const C=n.children.filter(w=>w.isArrayElement&&w.path===o),m=C.length>0?C[0].nestingIndexes.slice(0,-1):n.nestingIndexes;n.children.push({id:`${n.id}_${a}_${f}`,field:a,value:void 0,index:f,isArrayElement:!0,parent:n,children:[],spanRow:1,path:o,readPath:`${o}[${f}]`,nestingIndexes:[...m,f]})}}let d=n;for(;d;)this.computeSpans(d),d=d.parent;const c=new Map,u=new Set,h=this.collectLeaves(s);for(const f of h)this._walkUpAndRecord(f,c,u,t);if(h.length>0){const f=new Set;for(const w of h)for(const S of c.keys())if(S.startsWith(`${w.id}|`)){const v=S.substring(w.id.length+1);f.add(v)}const C=h[0],m=s.spanRow;for(const w of this.columns.keys())f.has(w)||c.set(`${C.id}|${w}`,m)}this.cellSpanCaches.set(t,c),this.dirtyRoots.add(t)}getCellSpan(t,o,i){if(!this.columns.has(i))return 0;const s=this.cellSpanCaches.get(t);if(!s)return 0;const n=this.trees.get(t);if(!n)return 0;const r=this.collectLeaves(n);if(o<0||o>=r.length)return 0;const l=r[o];return s.get(`${l.id}|${i}`)??0}getCellPath(t,o){if(!this.columns.has(t))return null;const i=this.firstArrayPaths();if(!i)return null;const s=t.split("."),n=[];let r=0;for(let l=0;l<s.length;l++){let a=s[l];if(l<s.length-1){const d=s.slice(0,l+1).join(".");i.has(d)&&r<o.length&&(a+=`[${o[r]}]`,r++)}n.push(a)}return n.join(".")}getMaxArrayLength(t){const o=this.trees.get(t);return o?o.spanRow:1}getLeaves(t){const o=this.trees.get(t);return o?this.collectLeaves(o):[]}getDirtyRoots(){return this.dirtyRoots}clearDirty(){this.dirtyRoots.clear()}buildTree(t,o,i,s){const n={id:t,field:"$",value:o,isArrayElement:!1,children:[],spanRow:1,path:"",readPath:"",nestingIndexes:[]};return this.expandChildren(n,o,i,s),n}expandChildren(t,o,i,s){if(Array.isArray(o)){if(s.has(t.path)){i.set(t.path,t);for(let n=0;n<o.length;n++){const r=this.createNode(`${t.id}_${t.field}_${n}`,t.field,o[n],n,t,t.path,[...t.nestingIndexes,n]);t.children.push(r),this.expandChildren(r,o[n],i,s)}}else{const n=this.createNode(t.id,t.field,o,void 0,t,t.path,t.nestingIndexes);t.children.push(n)}return}if(this.isPlainObject(o))for(const[n,r]of Object.entries(o)){const l=t.path?`${t.path}.${n}`:n;if(Array.isArray(r))if(s.has(l)){i.set(l,t);for(let a=0;a<r.length;a++){const d=this.createNode(`${t.id}_${n}_${a}`,n,r[a],a,t,l,[...t.nestingIndexes,a]);t.children.push(d),this.expandChildren(d,r[a],i,s)}if(r.length===0){const a=this.createNode(`${t.id}_${n}_empty`,n,r,void 0,t,l,t.nestingIndexes);t.children.push(a)}}else{const a=this.createNode(t.id,n,r,void 0,t,l,t.nestingIndexes);t.children.push(a)}else{const a=this.createNode(t.id,n,r,void 0,t,l,t.nestingIndexes);t.children.push(a),this.expandChildren(a,r,i,s)}}}createNode(t,o,i,s,n,r,l){return{id:t,field:o,value:i,index:s,isArrayElement:s!==void 0,parent:n,children:[],spanRow:1,path:r,readPath:s!==void 0?`${r}[${s}]`:r,nestingIndexes:l}}isPlainObject(t){return t!=null&&typeof t=="object"&&!Array.isArray(t)}computeSpans(t){if(t.children.length===0)return t.spanRow=1,1;const o=[],i=[];for(const s of t.children)this.computeSpans(s),s.isArrayElement?o.push(s):i.push(s);if(o.length>0){const s=new Map;for(const r of o){const l=r.path;s.set(l,(s.get(l)??0)+r.spanRow)}let n=1;for(const r of s.values())r>n&&(n=r);if(t.spanRow=n,n>1)for(const r of i)this.propagateSpan(r,n)}else{let s=1;for(const n of i)n.spanRow>s&&(s=n.spanRow);t.spanRow=s}return t.spanRow}propagateSpan(t,o){t.spanRow=o;for(const i of t.children)i.isArrayElement||this.propagateSpan(i,o)}collectLeaves(t){const o=[];return this._collectLeaves(t,o),o.length===0&&o.push(t),o}_collectLeaves(t,o){for(const i of t.children)i.isArrayElement?this._hasArrayDescendant(i)?this._collectLeaves(i,o):o.push(i):this._collectLeaves(i,o)}_hasArrayDescendant(t){for(const o of t.children)if(o.isArrayElement||this._hasArrayDescendant(o))return!0;return!1}findSpanByPath(t,o){let i=t;for(;i;){if(i.path===o)return i.spanRow;const s=this.searchInNonArrayChildren(i,o);if(s!==null)return s;i=i.parent}return 0}searchInNonArrayChildren(t,o){for(const i of t.children){if(i.isArrayElement)continue;if(i.path===o)return i.spanRow;const s=this.searchInNonArrayChildren(i,o);if(s!==null)return s}return null}_walkUpAndRecord(t,o,i,s){let n=t;for(;n;){if(i.has(n))return;i.add(n),Array.from(this.columns.keys()),o.set(`${t.id}|${n.path}`,n.spanRow);for(const r of n.children)r.isArrayElement?Array.isArray(r.value)&&r.value.length===0&&this._recordEmptyArrayColumns(t,n,r.field,o):(o.set(`${t.id}|${r.path}`,r.spanRow),this._processDeep(t,r,o,i),Array.isArray(r.value)&&r.value.length===0&&this._recordEmptyArrayColumns(t,n,r.field,o));n=n.parent}}_processDeep(t,o,i,s){if(!s.has(o)){s.add(o);for(const n of o.children)n.isArrayElement||(i.set(`${t.id}|${n.path}`,n.spanRow),this._processDeep(t,n,i,s))}}_recordEmptyArrayColumns(t,o,i,s){const n=o.path?`${o.path}.${i}`:i;for(const r of this.columns.keys())r.startsWith(n)&&s.set(`${t.id}|${r}`,o.spanRow)}_collectArrayPaths(t,o){for(const i of t.children)i.isArrayElement&&o.add(i.path),this._collectArrayPaths(i,o)}collectArrayPaths(t){const o=new Set;return this._collectArrayPaths(t,o),o}firstArrayPaths(){const t=this.trees.values().next().value;return t?this.collectArrayPaths(t):null}}class xy{constructor(t,o,i){R(this,"id");R(this,"rootValue");R(this,"spanMatrix");R(this,"leafCells");R(this,"columns");R(this,"data");this.id=t,this.data=o,this.columns=i,this.rootValue=new Bt(this.id,"$",this.data),this._buildPathCells(i),this.rootValue.calcSpan(),this.spanMatrix=new za,this.spanMatrix.setRow(this.id,this.data,{columns:i}),this.leafCells=this.spanMatrix.getLeaves(this.id)}_buildPathCells(t){for(const o of t){const i=o.colId.split(".");let s=this.rootValue;for(let n=0;n<i.length;n++){const r=i[n];if(!O.isArray(s))s=s.pretreatmentValue(r,s,o);else{const l=[];for(const a of s){const d=a.pretreatmentValue(r,a,o);O.isArray(d)?l.push(...d):l.push(d)}s=l}}}}getMaxArrayLength(){return this.spanMatrix.getMaxArrayLength(this.id)}getCell(t,o){const i=t.getColId().split(".");let s=this.rootValue.properties.get(i.shift());if(!s)return;let n=0;O.isArray(s)&&(s=s[o[n]],n++);let r=s;for(const l of i){if(!r)break;if(!O.isArray(r)){const a=r.get(l);O.isArray(a)?(r=a[o[n]],n=n+1):r=a}}return r}getValue(t,o){const i=this.getCell(t,o);if(i)return O.get(this.data,i.path)}setArrayLength(t,o){this.spanMatrix.setArrayLength(this.id,t,o),this.leafCells=this.spanMatrix.getLeaves(this.id)}rebuild(t,o){const i=o??this.columns;this.data=t,this.spanMatrix.setRow(this.id,t,{columns:i}),this.leafCells=this.spanMatrix.getLeaves(this.id);const s=new Bt(this.id,"$",t);for(const n of i){const r=n.colId.split(".");let l=s;for(let a=0;a<r.length;a++){const d=r[a];if(!O.isArray(l))l=l.pretreatmentValue(d,l,n);else{const c=[];for(const u of l){const h=u.pretreatmentValue(d,u,n);O.isArray(h)?c.push(...h):c.push(h)}l=c}}}s.calcSpan(),this.rootValue=s,o&&(this.columns=i)}getSpanMatrix(){return this.spanMatrix}}class mo{constructor(t,o,i,s,n,r){R(this,"id");R(this,"data");R(this,"signature");R(this,"dataModel");R(this,"spanCache");R(this,"columns");R(this,"bridge");R(this,"idMapper");R(this,"dataCache");R(this,"index");this.index=r,this.dataCache=s,this.idMapper=i,this.columns=o,this.bridge=n,this.id=i(t),this.data=t,this.signature=Oe(JSON.stringify(t)),this.buildSpan()}get pathCells(){return this.dataModel.rootValue.properties}get leafCells(){return this.dataModel.leafCells}get spanMatrix(){return this.dataModel.spanMatrix}buildSpan(){this.dataModel=new xy(this.id,this.data,this.columns),this.spanCache=new hn(this.dataModel.leafCells,this.dataModel.spanMatrix,this.id)}getMaxArrayLength(){return this.dataModel.getMaxArrayLength()}getCell(t,o){return this.dataModel.getCell(t,o)}getValue(t,o){return this.dataModel.getValue(t,o)}getSpanMatrix(){return this.dataModel.getSpanMatrix()}setArrayLength(t,o){this.dataModel.setArrayLength(t,o)}delete(){this.dataCache.remove([this])}redraw(){var t;(t=this.bridge)==null||t.redraw(this)}redrawCell(t,o){var i;(i=this.bridge)==null||i.redrawCell(this,t,o)}getDataIndex(){if(this.index===void 0)throw new Error(`row[${this.id}] not ready`);return this.index}getRowSpans(){return this.spanCache}isCellEditing(t,o){return!1}getSignature(){return this.signature}startEditing(t=!1){const o=new Fi(this,this.idMapper,!1);return this.dataCache.replace(o),t&&this.redraw(),o}startEditingCell(t,o,i=!1){const s=new Pi(this,t,o,this.idMapper);return this.dataCache.replace(s),i&&this.redrawCell(t,o),s}__setIndex(t){this.index=t}update(t,o){this.id=t,this.data=o,this.signature=Oe(JSON.stringify(o)),this.dataModel.rebuild(o),this.spanCache=new hn(this.dataModel.leafCells,this.dataModel.spanMatrix,this.id)}isTransient(){return!1}getId(){return this.id}isEditing(){return!1}getData(){return this.data}flat(){return this.dataModel.leafCells.map(t=>new Ot(t.id,this,t.nestingIndexes))}setData(t){this.update(this.idMapper(t),t)}match(t){return this.getId()===t.data.getId()}}class $a{constructor(t){R(this,"rows");R(this,"pageNum",1);R(this,"pageSize",100);R(this,"isFinished",!1);R(this,"idMapper");R(this,"bridge");this.rows=[],this.idMapper=t}createRow(t){var o;return new mo(t,((o=this.bridge)==null?void 0:o.getColumns())??[],this.idMapper,this,this.bridge)}setRows(t){return this.rows=t,this}replace(t){this.rows[t.getDataIndex()]=t}remove(t){var i;const o=new Set(t.map(s=>s.getId()));this.rows=this.rows.filter(s=>!o.has(s.getId())),(i=this.bridge)==null||i.reload()}getRows(){return this.rows??[]}appendRows(t){if(!this.rows){this.setRows(t);return}this.rows.push(...t)}insertRows(t,o=0){if(!this.rows){this.setRows(t);return}this.rows.splice(o,0,...t)}deleteRows(t){const o=new Set(t.map(i=>O.isString(i)?i:i.getId()));this.rows=this.rows.filter(i=>!o.has(i.getId()))}}const Ua={getContextMenuItems:void 0},Dy=e=>e instanceof mo||e instanceof Ot?!0:e instanceof Fi,Fy=e=>e instanceof mo,Ti="_",Ka=1;class ja{static createRowNode(t,o,i={}){return{...t,__id:o(t),...i}}static generateId(t){if(t.length===0)throw new Error("传入标识数组为空无法生成ID");return t.join(Ti)}static getId(t){return t.__id?t.__id.split(Ti)[0]:t.id}static getSignature(t){return t.__signature}static getFlatIndex(t,o=Ka){if(!t.__id)throw new Error("不包含有效的ID信息");const i=t.__id.split(Ti);if(i.length===1)throw new Error(`${i} 不包含索引信息`);const s=i[o];if(!s)throw new Error(`${i} deep[${o}] 不包含索引信息`);const n=Number.parseInt(s);if(!Number.isFinite(n))throw new TypeError(`${s} 不是一个正确的数组索引`);return n}static ValueGetter(t){return console.warn("deprecated GridUtils.ValueGetter 现在只需要正常使用valueGetter了"),o=>{if(!(o.data.id&&typeof o.data.id=="string"&&o.data.id.includes("footer-")))return t(o)}}static spanRow(t,o,i){const s=t[o];return!s||s.length===0?t:s.map((n,r)=>({...t,__id:`${i??t.id}_${r}`,rowSpan:r===0?s.length:0}))}static isGroupColDef(t){return!!t.children}}const qa=(e,t,o,i,s)=>{const n=E.ref(t),r=E.ref(),l=E.ref(!1),a=(g,p)=>{if(n.value)return n.value;const f=p??[];if(!g){const w=Oe(f.join(","));return n.value=w,w}const C=e.getInstanceName(g);C&&f.push(C);const m=e.getParentInstance(g);return a(m,f)},d=g=>{const p=localStorage.getItem(g);if(!(!p||p==="undefined"))return JSON.parse(p)},c=O.debounce(()=>{const g=a(s);localStorage.setItem(g,JSON.stringify(o.value.getColumnState()))},200),u=async()=>{const g=a(s),p=d(g);if(p&&p.length>0){const f=p.filter(C=>{var m;return!((m=C.colId)!=null&&m.includes("ag-Grid-SelectionColumn"))});o.value.applyColumnState({state:f,applyOrder:!0}),l.value=!0}},h=()=>O.sumBy(o.value.getAllDisplayedVirtualColumns().map(g=>g.getActualWidth()));return{storeGridState:c,restoreGridState:u,resetGridState:()=>{o.value.applyColumnState({state:r.value,applyOrder:!0})},initGridState:()=>{const g=a(s);if(r.value=o.value.getColumnState(),!localStorage.getItem(`${g}-initial`)){const p=h();i.value>p&&o.value.sizeColumnsToFit()}},isStateInitialized:l}},wo=e=>{if(e.id)return`${e.id}`.split("_")[0]},Ya=e=>{const{options:t,elRef:o,editable:i,onRowChange:s,onMessageError:n,findOtherEditingCell:r,isCellEditable:l}=e;let a;const d=h=>{o.value&&o.value.querySelectorAll(`.row_${h}`).forEach(g=>{g.classList.add("row-hover")})},c=h=>{o.value&&o.value.querySelectorAll(`.row_${h}`).forEach(g=>{g.classList.remove("row-hover")})},u=(h,g)=>{var C;if(!h||!o.value)return!1;const p=h;if(!p||typeof p.contains!="function")return!1;const f=o.value.querySelectorAll(`.row_${g}`);for(let m=0;m<f.length;m++){const w=f[m];if(w===p||(C=w.contains)!=null&&C.call(w,p))return!0}return!1};return{...t,onCellMouseOver(h){var p,f,C;const g=wo(h.node);if(!g){(p=t.onCellMouseOver)==null||p.call(t,h);return}u((f=h.event)==null?void 0:f.relatedTarget,g)||(a&&a!==g&&c(a),a=g,d(g),(C=t.onCellMouseOver)==null||C.call(t,h))},onCellMouseOut(h){var p;const g=wo(h.node);g&&(u((p=h.event)==null?void 0:p.relatedTarget,g)||a===g&&(c(g),a=void 0))},onCellClicked(h){if(i==="cell"&&h.data instanceof Ot){if(l&&!l(h.column,h.node))return;const g=h.data.getActualRow(),p=r==null?void 0:r(h.node.id);if(g instanceof Pi){const f=g.getEditingColumn(),C=g.getRowId();if(s==null)throw new Error("可编辑单元格必须配置保存能力");if(f.getId()==h.column.getId()&&C===h.node.id)return;s(g).then(()=>{g.stopEditing(!0);const m=g.getSourceRow();m.setData(g.getData()),m.startEditingCell(h.node.id,h.column,!0)}).catch(m=>{n==null||n(`单元格[${h.column.getColDef().headerName}]保存失败: `+m.message)})}else if(g instanceof mo)if(p){if(s==null)throw new Error("可编辑单元格必须配置保存能力");s(p).then(()=>{p.stopEditing(!0),p.getSourceRow().setData(p.getData()),g.startEditingCell(h.node.id,h.column,!0)}).catch(f=>{n==null||n(`单元格[${h.column.getColDef().headerName}]保存失败: `+f.message)})}else g.startEditingCell(h.node.id,h.column,!0)}},onRowSelected(h){var C;const g=wo(h.node),p=h.api.getRenderedNodes().filter(m=>wo(m)===g),f=h.node.isSelected();p.forEach(m=>{m.setSelected(!!f,!1,"api")}),(C=t==null?void 0:t.onRowSelected)==null||C.call(t,h)},getRowClass(h){var f;const g=(f=t==null?void 0:t.getRowClass)==null?void 0:f.call(t,h),p=[];return g&&(O.isArray(g)?p.push(...g):p.push(g)),p.push(`row_${wo(h.node)}`),p},onRowDoubleClicked(h){i==="row"&&(h.data.isEditing()||h.data.startEditing())}}},Za={"cell-span":({data:e,column:t})=>e.getRowSpan(t)>0,"cell-span-hide":({data:e,column:t})=>e.getRowSpan(t)===0},Qa={"cell-span":({data:e,column:t})=>e.getRowSpan(t)>0,"cell-span-hide":({data:e,column:t})=>e.getRowSpan(t)===0},gn=(e,t)=>({...e,...t??{}});class Vt{constructor(t,o,i,s=[],n){R(this,"context");R(this,"endRow");R(this,"filterModel");R(this,"sortModel");R(this,"startRow");R(this,"dataCache");R(this,"pageNum");R(this,"pageSize");R(this,"onError");this.pageNum=t,this.pageSize=o,this.sortModel=s,this.startRow=(t-1)*o,this.endRow=this.startRow+this.pageSize,this.dataCache=i,this.onError=n}static from(t,o,i,s){const n=o??i.pageSize;return new Vt(t,n,i,[],s)}static nextPage(t,o){return new Vt(t.pageNum+1,t.pageSize,t,[],o)}failCallback(){var t;(t=this.onError)==null||t.call(this,"表格数据加载失败,请重试")}successCallback(t){(O.isEmpty(t)||t.length<this.pageSize)&&(this.dataCache.isFinished=!0),this.pageNum===1?this.dataCache.setRows((t??[]).map(o=>this.dataCache.createRow(o))):this.dataCache.appendRows((t??[]).map(o=>this.dataCache.createRow(o))),this.dataCache.pageNum=this.pageNum}}const Xa=e=>{const t=s=>{const n=s.getLastDisplayedRowIndex();return s.getDisplayedRowCount()-1===n},o=({direction:s,api:n})=>{s==="vertical"&&t(n)&&i()},i=()=>{var s;(s=e==null?void 0:e.onVScrollEnd)==null||s.call(e)};return{onBodyScrollEnd:o}};class Py{constructor(t){R(this,"gridApi");this.gridApi=t}reload(){this.gridApi.getGridOption("context").reload()}redraw(t){const o=this.gridApi.getRenderedNodes().filter(i=>{var s;return((s=i.data)==null?void 0:s.getId())===t.getId()});this.gridApi.getGridOption("context").reload(),this.gridApi.redrawRows({rowNodes:o})}redrawCell(t,o,i){const s=this.gridApi.getRenderedNodes().filter(n=>{var r;return((r=n.data)==null?void 0:r.getId())===o});this.gridApi.getGridOption("context").reload(),this.gridApi.refreshCells({rowNodes:s,columns:[i],force:!0,suppressFlash:!0})}getColumns(){return this.gridApi.getAllGridColumns().map(t=>{var i,s;const o=(s=(i=t.getColDef)==null?void 0:i.call(t))==null?void 0:s.cellDataType;return{colId:t.getColId(),cellDataType:typeof o=="string"?o:void 0}})}}const Ja=(e,t)=>{var T;const o=E.ref(),i=E.ref(),s=E.ref({height:`calc(100% - ${e.footerHeight??0}px)`,width:"100%"}),n=new Set(["columnSizing","columnVisibility","columnPinning","columnOrder"]),r=E.ref(0),l=E.ref(),{onBodyScrollEnd:a}=Xa({onVScrollEnd(){u.value.getRows(Vt.nextPage(c.value,e.onError))}}),d=({data:F})=>F.id,c=E.ref(new $a(e.rowIdMapper)),u=E.ref(new _a(e.rowData,c.value)),{initGridState:h,resetGridState:g,storeGridState:p,restoreGridState:f}=qa(e.instanceCtx,e.id,o,l,e.currentInstance),C=async F=>{D(),c.value.pageSize=e.pageSize,c.value.bridge=new Py(F.api),u.value.api=F.api,F.api.getAllGridColumns(),o.value=F.api,h(),await f(),await I(),F.api.setGridOption("popupParent",document.querySelector("body"))},m=()=>{u.value.loadData()},w=async(F,G=0)=>{c.value.insertRows(F,G),m()},S=F=>c.value.getRows().some(G=>G.getId()===F.getId()),v=()=>c.value.getRows(),b=()=>{var te,Se;const F=i.value.querySelector(".ag-body-viewport"),G=Number.parseFloat(F.querySelector(".ag-center-cols-container").style.height),_=i.value.querySelector(".ag-header").offsetHeight,Z=(Se=(te=i.value.querySelector(".ag-overlay-no-rows-wrapper"))==null?void 0:te.querySelector(".el-empty"))==null?void 0:Se.offsetHeight;G<r.value?s.value.height=`${_+(Z||G)+(e.footerHeight?2:11)}px`:s.value.height.includes("100%")||(s.value.height=`calc(100% - ${e.footerHeight??0}px)`)},D=()=>{const F=i.value.querySelector(".ag-body-viewport");l.value=F.offsetWidth,r.value=F.offsetHeight},I=()=>new Promise((F,G)=>{c.value.isFinished=!1;const _=Vt.from(1,c.value.pageSize,c.value,e.onError);_.context={resolve:F,reject:G},u.value.getRows(_),u.value.api.getDisplayedRowCount()>0&&u.value.api.ensureIndexVisible(0)}),B=E.computed(()=>({onGridReady:C,onBodyScrollEnd:a,scrollbarWidth:8,getRowId:d,columnDefs:e.columns,preventDefaultOnContextMenu:!0,suppressRowTransform:!0,suppressRowHoverHighlight:!0,selectionColumnDef:{pinned:"left",rowSpan:({data:F,column:G})=>F.getRowSpan(G),cellClassRules:gn(Za,e.gridOptions.rowClassRules)},defaultColGroupDef:{marryChildren:!0},onStateUpdated(F){F.sources.some(G=>n.has(G))&&p()},onSortChanged(F){F.source==="uiColumnSorted"&&p()},context:{refresh:I,reload:m},onRowDataUpdated(){E.nextTick(()=>{b()})},defaultColDef:{rowSpan({column:F,data:G}){return G.getRowSpan(F)},cellClassRules:gn(Qa,e.gridOptions.rowClassRules),suppressFloatingFilterButton:!0,enableCellChangeFlash:!0,tooltipValueGetter(F){return F.valueFormatted},resizable:!0,sortable:!1,headerComponent:"HeaderRenderer",cellRenderer:"CellRenderer",valueGetter({column:F,data:G}){return G.getValue(F)},valueFormatter({value:F}){return F}},...Ya({options:e.gridOptions??{},elRef:i,editable:e.editable,onRowChange:e.onRowChange,onMessageError:e.onError,findOtherEditingCell:F=>c.value.getRows().find(G=>G instanceof Pi&&G.getRowId()!==F),isCellEditable:(F,G)=>{var Z;const _=(Z=F.getColDef)==null?void 0:Z.call(F);return typeof(_==null?void 0:_.editable)=="function"?_.editable({column:F,colDef:_,node:G,data:G.data}):(_==null?void 0:_.editable)!==!1}}),onBodyScroll(F){P.left=F.left,P.top=F.top},...Ua})),P={left:0,top:0};return(T=t==null?void 0:t.onActivated)==null||T.call(t,()=>{}),{gridOptions:B,datasource:u,gridStyles:s,dataCache:c,gridApi:o,gridElRef:i,resetGridState:g,reload:m,insertRows:w,existRow:S,getRows:v,refresh:I}},ed=(e,t,o)=>{const i=E.ref(),s=E.ref([{}]),n=E.computed(()=>e.footerHeight?{height:`${e.footerHeight+10}px`}:{});E.watch(()=>[s.value,i.value],()=>{var d;s.value&&i.value&&((d=i.value)==null||d.setGridOption("rowData",s.value.map((c,u)=>({id:`footer-${u}`,...c}))))});const r=d=>!!d.children,l=d=>{var c;return r(d)?{headerName:d.headerName,groupId:d.groupId,children:[...d.children.map(u=>l(u))]}:{width:d.width,headerName:d.headerName,field:d.field,cellRendererParams:{render:(c=d.cellRendererParams)==null?void 0:c.footerRender}}},a=E.computed(()=>({scrollbarWidth:8,suppressRowTransform:!0,suppressRowHoverHighlight:!0,columnDefs:e.columns.map(d=>l(d)),defaultColGroupDef:{marryChildren:!0},rowSelection:e.gridOptions.rowSelection?{mode:"singleRow",isRowSelectable:()=>!1,hideDisabledCheckboxes:!0}:void 0,rowHeight:e.footerHeight,headerHeight:0,alwaysShowVerticalScroll:o.value.height.includes("100%"),defaultColDef:{suppressFloatingFilterButton:!0,cellRenderer:"FooterCellRender",enableCellChangeFlash:!0,tooltipValueGetter(d){return d.value}},onGridReady(d){i.value=d.api,d.api.setGridOption("popupParent",document.querySelector("body"))},alignedGrids:()=>{const d=t.value;if(!d)return[];const c=d.api??(typeof d.addEventListener=="function"?d:void 0);return c?[c]:[]}}));return{setFooterData:d=>{s.value=d},footerGridApi:i,footerData:s,footerStyles:n,footerGridOptions:a}};class Ty extends x{constructor(){super(...arguments);R(this,"beanName","selectionColSvc");R(this,"columns")}postConstruct(){this.addManagedPropertyListener("rowSelection",o=>{this.onSelectionOptionsChanged(o.currentValue,o.previousValue,bt(o.source))}),this.addManagedPropertyListener("selectionColumnDef",this.updateColumns.bind(this))}addColumns(o){const i=this.columns;i!=null&&(o.list=i.list.concat(o.list),o.tree=i.tree.concat(o.tree),_c(o))}createColumns(o,i){var u,h;const s=()=>{var g;zo(this.beans,(g=this.columns)==null?void 0:g.tree),this.columns=null},n=o.treeDepth,r=(((u=this.columns)==null?void 0:u.treeDepth)??-1)==n,l=this.generateSelectionCols();if(Nc(l,((h=this.columns)==null?void 0:h.list)??[])&&r)return;s();const{colGroupSvc:a}=this.beans,d=(a==null?void 0:a.findDepth(o.tree))??0,c=(a==null?void 0:a.balanceTreeForAutoCols(l,d))??[];this.columns={list:l,tree:c,treeDepth:d,map:{}},i(g=>{if(!g)return null;const p=g.filter(f=>!tt(f));return[...l,...p]})}updateColumns(o){var s;const i=bt(o.source);(s=this.columns)==null||s.list.forEach(n=>{const r=this.createSelectionColDef(o.currentValue);n.setColDef(r,null,i),we(this.beans,{state:[{...r,colId:n.getColId()}]},i)})}getColumn(o){var i;return((i=this.columns)==null?void 0:i.list.find(s=>wr(s,o)))??null}getColumns(){var o;return((o=this.columns)==null?void 0:o.list)??null}isSelectionColumnEnabled(){var a,d;const{gos:o,beans:i}=this,s=o.get("rowSelection");if(typeof s!="object"||!Qe(o))return!1;const n=(((d=(a=i.autoColSvc)==null?void 0:a.getColumns())==null?void 0:d.length)??0)>0;if(s.checkboxLocation==="autoGroupColumn"&&n)return!1;const r=!!wt(s),l=Lo(s);return r||l}createSelectionColDef(o){const{gos:i}=this,s=o??i.get("selectionColumnDef"),n=i.get("enableRtl"),{rowSpan:r,spanRows:l,...a}=s??{};return{width:50,resizable:!1,suppressHeaderMenuButton:!0,sortable:!1,suppressMovable:!0,lockPosition:n?"right":"left",comparator(d,c,u,h){const g=u.isSelected(),p=h.isSelected();return g===p?0:g?1:-1},editable:!1,suppressFillHandle:!0,pinned:"left",rowSpan:r,...a,colId:pr,chartDataType:"excluded"}}generateSelectionCols(){if(!this.isSelectionColumnEnabled())return[];const o=this.createSelectionColDef(),i=o.colId;this.gos.validateColDef(o,i,!0);const s=new We(o,null,i,!1);return this.createBean(s),[s]}onSelectionOptionsChanged(o,i,s){const n=i&&typeof i!="string"?wt(i):void 0,r=o&&typeof o!="string"?wt(o):void 0,l=n!==r,a=i&&typeof i!="string"?Lo(i):void 0,d=o&&typeof o!="string"?Lo(o):void 0,c=a!==d,u=Go(o),h=Go(i);(l||c||u!==h)&&this.beans.colModel.refreshAll(s)}destroy(){var o;zo(this.beans,(o=this.columns)==null?void 0:o.tree),super.destroy()}refreshVisibility(o,i,s){var a,d;if(!((a=this.columns)!=null&&a.list.length))return;const n=o.length+i.length+s.length;if(n===0)return;const r=this.columns.list[0];if(!r.isVisible())return;const l=()=>{let c;switch(r.pinned){case"left":case!0:c=o;break;case"right":c=s;break;default:c=i}c&&me(c,r)};((d=this.beans.rowNumbersSvc)!=null&&d.getColumn(fr)?2:1)===n&&l()}}const Ii="34.1.1";function td(e){const t=e.get("rowSelection");return typeof t=="object"&&t.masterSelects||"self"}function Ai(e){return!!(e.rowPinned&&e.pinnedSibling)}function Iy(e,t=!0){const o=e.get("rowSelection");return typeof o!="object"?t?"all":void 0:o.mode==="multiRow"?o.selectAll:"all"}function od(e,t){return t===void 0?e("ariaIndeterminate","indeterminate"):t===!0?e("ariaChecked","checked"):e("ariaUnchecked","unchecked")}function Ce(e,t,o,i){const s=t==="top";if(!o)return Ce(e,t,s?e.getPinnedTopRow(0):e.getPinnedBottomRow(0),i);if(!i){const a=s?e.getPinnedTopRowCount():e.getPinnedBottomRowCount();return Ce(e,t,o,s?e.getPinnedTopRow(a-1):e.getPinnedBottomRow(a-1))}let n=!1,r=!1;const l=[];return e.forEachPinnedRow(t,a=>{if(a===o&&!n){n=!0,l.push(a);return}if(n&&a===i){r=!0,l.push(a);return}n&&!r&&l.push(a)}),l}function pn(e){return(e==null?void 0:e.hideDisabledCheckboxes)??!1}function id(e){const t=e.get("rowSelection")??"single";if(typeof t=="string"){const o=e.get("suppressRowClickSelection"),i=e.get("suppressRowDeselection");return o&&i?!1:o?"enableDeselection":i?"enableSelection":!0}return t.mode==="singleRow"||t.mode==="multiRow"?t.enableClickSelection??!1:!1}function Ay(e){const t=id(e);return t===!0||t==="enableDeselection"}function My(e){const t=id(e);return t===!0||t==="enableSelection"}function ky(e){const t=e.get("rowSelection");return typeof t=="string"?e.get("rowMultiSelectWithClick"):(t==null?void 0:t.enableSelectionWithoutKeys)??!1}function Ly(e,t){var n;if(!t.nodes.every(r=>r.rowPinned&&!Ai(r)?(k(59),!1):r.id===void 0?(k(60),!1):!0))return;const{nodes:o,source:i,newValue:s}=t;(n=e.selectionSvc)==null||n.setNodesSelected({nodes:o,source:i??"api",newValue:s})}function Gy(e,t,o="apiSelectAll"){var i;(i=e.selectionSvc)==null||i.selectAllRowNodes({source:o,selectAll:t})}function Hy(e,t,o="apiSelectAll"){var i;(i=e.selectionSvc)==null||i.deselectAllRowNodes({source:o,selectAll:t})}function Oy(e){var t;return((t=e.selectionSvc)==null?void 0:t.getSelectedNodes())??[]}function By(e){var t;return((t=e.selectionSvc)==null?void 0:t.getSelectedRows())??[]}const Vy={tag:"div",cls:"ag-selection-checkbox",role:"presentation",children:[{tag:"ag-checkbox",ref:"eCheckbox",role:"presentation"}]};class Ny extends U{constructor(){super(Vy,[Gs]);R(this,"eCheckbox",A);R(this,"rowNode");R(this,"column");R(this,"overrides")}postConstruct(){this.eCheckbox.setPassive(!0)}onDataChanged(){this.onSelectionChanged()}onSelectableChanged(){this.showOrHideSelect()}onSelectionChanged(){const o=this.getLocaleTextFunc(),{rowNode:i,eCheckbox:s}=this,n=i.isSelected(),r=od(o,n),[l,a]=i.selectable?["ariaRowToggleSelection","Press Space to toggle row selection"]:["ariaRowSelectionDisabled","Row Selection is disabled for this row"],d=o(l,a);s.setValue(n,!0),s.setInputAriaLabel(`${d} (${r})`)}init(o){if(this.rowNode=o.rowNode,this.column=o.column,this.overrides=o.overrides,this.onSelectionChanged(),this.addManagedListeners(this.eCheckbox.getInputElement(),{dblclick:vt,click:i=>{var s;vt(i),(s=this.beans.selectionSvc)==null||s.handleSelectionEvent(i,this.rowNode,"checkboxSelected")}}),this.addManagedListeners(this.rowNode,{rowSelected:this.onSelectionChanged.bind(this),dataChanged:this.onDataChanged.bind(this),selectableChanged:this.onSelectableChanged.bind(this)}),this.addManagedPropertyListener("rowSelection",({currentValue:i,previousValue:s})=>{const n=typeof i=="object"?pn(i):void 0,r=typeof s=="object"?pn(s):void 0;n!==r&&this.onSelectableChanged()}),rs(this.gos)||typeof this.getIsVisible()=="function"){const i=this.showOrHideSelect.bind(this);this.addManagedEventListeners({displayedColumnsChanged:i}),this.addManagedListeners(this.rowNode,{dataChanged:i,cellChanged:i}),this.showOrHideSelect()}this.eCheckbox.getInputElement().setAttribute("tabindex","-1")}showOrHideSelect(){const{column:o,rowNode:i,overrides:s,gos:n}=this,r=i.selectable,l=this.getIsVisible();let a;if(typeof l=="function"){const g=s==null?void 0:s.callbackParams;if(!o)a=l({...g,node:i,data:i.data});else{const p=o.createColumnFunctionCallbackParams(i);a=l({...g,...p})}}else a=l??!1;const d=r&&!a||!r&&a,c=r||a,u=n.get("rowSelection"),h=u&&typeof u!="string"?!pn(u):!!(o!=null&&o.getColDef().showDisabledCheckboxes);if(this.setVisible(c&&(d?h:!0)),this.setDisplayed(c&&(d?h:!0)),c&&this.eCheckbox.setDisabled(d),s==null?void 0:s.removeHidden){this.setDisplayed(c);return}}getIsVisible(){var s,n;const o=this.overrides;if(o)return o.isVisible;const i=this.gos.get("rowSelection");return i&&typeof i!="string"?wt(i):(n=(s=this.column)==null?void 0:s.getColDef())==null?void 0:n.checkboxSelection}}class _y{constructor(t,o){R(this,"rowModel");R(this,"pinnedRowModel");R(this,"selectAll",!1);R(this,"rootId",null);R(this,"endId",null);R(this,"cachedRange",[]);this.rowModel=t,this.pinnedRowModel=o}reset(){this.rootId=null,this.endId=null,this.cachedRange.length=0}setRoot(t){this.rootId=t.id,this.endId=null,this.cachedRange.length=0}setEndRange(t){this.endId=t.id,this.cachedRange.length=0}getRange(){if(this.cachedRange.length===0){const t=this.getRoot(),o=this.getEnd();if(t==null||o==null)return this.cachedRange;this.cachedRange=this.getNodesInRange(t,o)??[]}return this.cachedRange}isInRange(t){return this.rootId===null?!1:this.getRange().some(o=>o.id===t.id)}getRoot(t){if(this.rootId)return this.getRowNode(this.rootId);if(t)return this.setRoot(t),t}getEnd(){if(this.endId)return this.getRowNode(this.endId)}getRowNode(t){let o;const{rowModel:i,pinnedRowModel:s}=this;return o??(o=i.getRowNode(t)),s!=null&&s.isManual()&&(o??(o=s.getPinnedRowById(t,"top")),o??(o=s.getPinnedRowById(t,"bottom"))),o}truncate(t){const o=this.getRange();if(o.length===0)return{keep:[],discard:[]};const i=o[0].id===this.rootId,s=o.findIndex(n=>n.id===t.id);if(s>-1){const n=o.slice(0,s),r=o.slice(s+1);return this.setEndRange(t),i?{keep:n,discard:r}:{keep:r,discard:n}}else return{keep:o,discard:[]}}extend(t,o=!1){const i=this.getRoot();if(i==null){const n=this.getRange().slice();return o&&t.depthFirstSearch(r=>!r.group&&n.push(r)),n.push(t),this.setRoot(t),{keep:n,discard:[]}}const s=this.getNodesInRange(i,t);if(!s)return this.setRoot(t),{keep:[t],discard:[]};if(s.find(n=>n.id===this.endId))return this.setEndRange(t),{keep:this.getRange(),discard:[]};{const n=this.getRange().slice();return this.setEndRange(t),{keep:this.getRange(),discard:n}}}getNodesInRange(t,o){const{pinnedRowModel:i,rowModel:s}=this;if(!(i!=null&&i.isManual()))return s.getNodesInRangeForSelection(t,o);if(t.rowPinned==="top"&&!o.rowPinned)return Ce(i,"top",t,void 0).concat(s.getNodesInRangeForSelection(s.getRow(0),o)??[]);if(t.rowPinned==="bottom"&&!o.rowPinned){const n=Ce(i,"bottom",void 0,t),r=s.getRowCount(),l=s.getRow(r-1);return(s.getNodesInRangeForSelection(o,l)??[]).concat(n)}if(!t.rowPinned&&!o.rowPinned)return s.getNodesInRangeForSelection(t,o);if(t.rowPinned==="top"&&o.rowPinned==="top")return Ce(i,"top",t,o);if(t.rowPinned==="bottom"&&o.rowPinned==="top"){const n=Ce(i,"top",o,void 0),r=Ce(i,"bottom",void 0,t),l=s.getRow(0),a=s.getRow(s.getRowCount()-1);return n.concat(s.getNodesInRangeForSelection(l,a)??[]).concat(r)}if(!t.rowPinned&&o.rowPinned==="top")return Ce(i,"top",o,void 0).concat(s.getNodesInRangeForSelection(s.getRow(0),t)??[]);if(t.rowPinned==="top"&&o.rowPinned==="bottom"){const n=Ce(i,"top",t,void 0),r=Ce(i,"bottom",void 0,o),l=s.getRow(0),a=s.getRow(s.getRowCount()-1);return n.concat(s.getNodesInRangeForSelection(l,a)??[]).concat(r)}if(t.rowPinned==="bottom"&&o.rowPinned==="bottom")return Ce(i,"bottom",t,o);if(!t.rowPinned&&o.rowPinned==="bottom"){const n=Ce(i,"bottom",void 0,o),r=s.getRow(s.getRowCount());return(s.getNodesInRangeForSelection(t,r)??[]).concat(n)}return null}}class Wy extends x{constructor(o){super();R(this,"column");R(this,"cbSelectAllVisible",!1);R(this,"processingEventFromCheckbox",!1);R(this,"headerCellCtrl");R(this,"cbSelectAll");this.column=o}onSpaceKeyDown(o){const i=this.cbSelectAll;i.isDisplayed()&&!i.getGui().contains(j(this.beans))&&(o.preventDefault(),i.setValue(!i.getValue()))}getCheckboxGui(){return this.cbSelectAll.getGui()}setComp(o){this.headerCellCtrl=o;const i=this.createManagedBean(new wl);this.cbSelectAll=i,i.addCss("ag-header-select-all"),Be(i.getGui(),"presentation"),this.showOrHideSelectAll();const s=this.updateStateOfCheckbox.bind(this);this.addManagedEventListeners({newColumnsLoaded:()=>this.showOrHideSelectAll(),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this),selectionChanged:s,paginationChanged:s,modelUpdated:s}),this.addManagedPropertyListener("rowSelection",({currentValue:n,previousValue:r})=>{const l=a=>typeof a=="string"||!a||a.mode==="singleRow"?void 0:a.selectAll;l(n)!==l(r)&&this.showOrHideSelectAll(),this.updateStateOfCheckbox()}),this.addManagedListeners(i,{fieldValueChanged:this.onCbSelectAll.bind(this)}),i.getInputElement().setAttribute("tabindex","-1"),this.refreshSelectAllLabel()}onDisplayedColumnsChanged(o){this.isAlive()&&this.showOrHideSelectAll(o.source==="uiColumnMoved")}showOrHideSelectAll(o=!1){const i=this.isCheckboxSelection();this.cbSelectAllVisible=i,this.cbSelectAll.setDisplayed(i),i&&(this.checkRightRowModelType("selectAllCheckbox"),this.checkSelectionType("selectAllCheckbox"),this.updateStateOfCheckbox()),this.refreshSelectAllLabel(o)}updateStateOfCheckbox(){if(!this.cbSelectAllVisible||this.processingEventFromCheckbox)return;this.processingEventFromCheckbox=!0;const o=this.getSelectAllMode(),i=this.beans.selectionSvc,s=this.cbSelectAll,n=i.getSelectAllState(o);s.setValue(n);const r=i.hasNodesToSelect(o);s.setDisabled(!r),this.refreshSelectAllLabel(),this.processingEventFromCheckbox=!1}refreshSelectAllLabel(o=!1){const i=this.getLocaleTextFunc(),{headerCellCtrl:s,cbSelectAll:n,cbSelectAllVisible:r}=this,l=n.getValue(),a=od(i,l),d=i("ariaRowSelectAll","Press Space to toggle all rows selection");s.setAriaDescriptionProperty("selectAll",r?`${d} (${a})`:null),n.setInputAriaLabel(i("ariaHeaderSelection","Column with Header Selection")),o||s.announceAriaDescription()}checkSelectionType(o){return Qt(this.gos)?!0:(k(128,{feature:o}),!1)}checkRightRowModelType(o){const{gos:i,rowModel:s}=this.beans;return oe(i)||Mo(i)?!0:(k(129,{feature:o,rowModel:s.getType()}),!1)}onCbSelectAll(){if(this.processingEventFromCheckbox||!this.cbSelectAllVisible)return;const o=this.cbSelectAll.getValue(),i=this.getSelectAllMode();let s="uiSelectAll";i==="currentPage"?s="uiSelectAllCurrentPage":i==="filtered"&&(s="uiSelectAllFiltered");const n={source:s,selectAll:i},r=this.beans.selectionSvc;o?r.selectAllRowNodes(n):r.deselectAllRowNodes(n)}isCheckboxSelection(){const{column:o,gos:i,beans:s}=this,n=typeof i.get("rowSelection")=="object"?"headerCheckbox":"headerCheckboxSelection";return sd(s,o)&&this.checkRightRowModelType(n)&&this.checkSelectionType(n)}getSelectAllMode(){const o=Iy(this.gos,!1);if(o)return o;const{headerCheckboxSelectionCurrentPageOnly:i,headerCheckboxSelectionFilteredOnly:s}=this.column.getColDef();return i?"currentPage":s?"filtered":"all"}destroy(){super.destroy(),this.cbSelectAll=void 0,this.headerCellCtrl=void 0}}function sd({gos:e,selectionColSvc:t},o){const i=e.get("rowSelection"),s=o.getColDef(),{headerCheckboxSelection:n}=s;let r=!1;if(typeof i=="object"){const l=tt(o),a=mr(o);(Go(i)==="autoGroupColumn"&&a||l&&(t!=null&&t.isSelectionColumnEnabled()))&&(r=Lo(i))}else typeof n=="function"?r=n(N(e,{column:o,colDef:s})):r=!!n;return r}class zy extends x{constructor(){super(...arguments);R(this,"isRowSelectable");R(this,"selectionCtx")}postConstruct(){const{gos:o,beans:i}=this;this.selectionCtx=new _y(i.rowModel,i.pinnedRowModel),this.addManagedPropertyListeners(["isRowSelectable","rowSelection"],()=>{const s=rs(o);s!==this.isRowSelectable&&(this.isRowSelectable=s,this.updateSelectable())}),this.isRowSelectable=rs(o),this.addManagedEventListeners({cellValueChanged:s=>this.updateRowSelectable(s.node),rowNodeDataChanged:s=>this.updateRowSelectable(s.node)})}destroy(){super.destroy(),this.selectionCtx.reset()}createCheckboxSelectionComponent(){return new Ny}createSelectAllFeature(o){if(sd(this.beans,o))return new Wy(o)}isMultiSelect(){return Qt(this.gos)}onRowCtrlSelected(o,i,s){const n=!!o.rowNode.isSelected();o.forEachGui(s,r=>{r.rowComp.toggleCss("ag-row-selected",n);const l=r.element;Hi(l,n),l.contains(j(this.beans))&&i(r)})}announceAriaRowSelection(o){var n;if(this.isRowSelectionBlocked(o))return;const i=o.isSelected();if(!o.selectable)return;const s=this.getLocaleTextFunc()(i?"ariaRowDeselect":"ariaRowSelect",`Press SPACE to ${i?"deselect":"select"} this row`);(n=this.beans.ariaAnnounce)==null||n.announceValue(s,"rowSelection")}isRowSelectionBlocked(o){return!o.selectable||o.rowPinned&&!Ai(o)||!Qe(this.gos)}updateRowSelectable(o,i){var n;const s=o.rowPinned&&o.pinnedSibling?o.pinnedSibling.selectable:((n=this.isRowSelectable)==null?void 0:n.call(this,o))??!0;return this.setRowSelectable(o,s,i),s}setRowSelectable(o,i,s){if(o.selectable!==i){if(o.selectable=i,o.dispatchRowEvent("selectableChanged"),s)return;if(Xt(this.gos)){const n=this.calculateSelectedFromChildren(o);this.setNodesSelected({nodes:[o],newValue:n??!1,source:"selectableChanged"});return}o.isSelected()&&!o.selectable&&this.setNodesSelected({nodes:[o],newValue:!1,source:"selectableChanged"})}}calculateSelectedFromChildren(o){var n;let i=!1,s=!1;if(!((n=o.childrenAfterGroup)!=null&&n.length))return o.selectable?o.__selected:null;for(let r=0;r<o.childrenAfterGroup.length;r++){const l=o.childrenAfterGroup[r];let a=l.isSelected();if(!l.selectable){const d=this.calculateSelectedFromChildren(l);if(d===null)continue;a=d}switch(a){case!0:i=!0;break;case!1:s=!0;break;default:return}}if(!(i&&s))return i?!0:s?!1:o.selectable?o.__selected:null}selectRowNode(o,i,s,n="api"){const r=!o.selectable&&i,l=o.__selected===i;if(r||l)return!1;o.__selected=i,o.dispatchRowEvent("rowSelected");const a=o.sibling;a&&a.footer&&a.__localEventService&&a.dispatchRowEvent("rowSelected");const d=o.pinnedSibling;return d&&d.rowPinned&&d.__localEventService&&d.dispatchRowEvent("rowSelected"),this.eventSvc.dispatchEvent({...Oh(o,this.gos,"rowSelected"),event:s||null,source:n}),!0}isCellCheckboxSelection(o,i){const s=this.gos.get("rowSelection");if(s&&typeof s!="string"){const n=tt(o)&&wt(s);return o.isColumnFunc(i,n)}else return o.isColumnFunc(i,o.colDef.checkboxSelection)}inferNodeSelections(o,i,s,n){const{gos:r,selectionCtx:l}=this,a=o.isSelected(),d=Xt(r),c=My(r),u=Ay(r),h=this.isMultiSelect(),g=n==="rowClicked";if(g&&!(c||u))return null;if(i&&s&&h){const p=l.getRoot();if(p)if(p.isSelected()){const f=l.isInRange(o)?l.truncate(o):l.extend(o,d);return{deselect:f.discard,select:f.keep,reset:!1}}else{const f=l.extend(o,d);return{select:[],deselect:f.keep,reset:!1}}else return null}else if(i&&h){const p=l.selectAll?this.beans.rowModel.getRow(0):void 0,f=l.getRoot(p),C=l.isInRange(o)?l.truncate(o):l.extend(o,d);return{select:C.keep,deselect:C.discard,reset:l.selectAll||!!(f&&!f.isSelected())}}else if(s){if(g){const p=!a;return p&&!c||!p&&!u?null:(l.setRoot(o),{node:o,newValue:p,clearSelection:!1})}return l.setRoot(o),{node:o,newValue:!a,clearSelection:!h}}else{l.setRoot(o);const p=ky(r),f=Oo(r)==="filteredDescendants",C=g&&(!p||!c);if(f&&a===void 0&&oe(r))return{node:o,newValue:!1,clearSelection:!h||C};if(g){const m=a?!p:c;return m===a&&!C||m&&!c||!m&&!u?null:{node:o,newValue:m,clearSelection:!h||C,keepDescendants:o.group&&d}}return{node:o,newValue:!a,clearSelection:!h||C}}}}class $y extends zy{constructor(){super(...arguments);R(this,"beanName","selectionSvc");R(this,"selectedNodes",new Map);R(this,"detailSelection",new Map);R(this,"groupSelectsDescendants");R(this,"groupSelectsFiltered");R(this,"mode");R(this,"masterSelectsDetail",!1)}postConstruct(){super.postConstruct();const{gos:o}=this;this.mode=Ho(o),this.groupSelectsDescendants=Xt(o),this.groupSelectsFiltered=Oo(o)==="filteredDescendants",this.masterSelectsDetail=td(o)==="detail",this.addManagedPropertyListeners(["groupSelectsChildren","groupSelectsFiltered","rowSelection"],()=>{const i=Xt(o),s=Ho(o),n=Oo(o)==="filteredDescendants";this.masterSelectsDetail=td(o)==="detail",(i!==this.groupSelectsDescendants||n!==this.groupSelectsFiltered||s!==this.mode)&&(this.deselectAllRowNodes({source:"api"}),this.groupSelectsDescendants=i,this.groupSelectsFiltered=n,this.mode=s)}),this.addManagedEventListeners({rowSelected:this.onRowSelected.bind(this)})}destroy(){super.destroy(),this.resetNodes()}handleSelectionEvent(o,i,s){if(this.isRowSelectionBlocked(i))return 0;const n=this.inferNodeSelections(i,o.shiftKey,o.metaKey||o.ctrlKey,s);return n==null?0:(this.selectionCtx.selectAll=!1,"select"in n?(n.reset?this.resetNodes():this.selectRange(n.deselect,!1,s),this.selectRange(n.select,!0,s)):this.setNodesSelected({nodes:[n.node],newValue:n.newValue,clearSelection:n.clearSelection,keepDescendants:n.keepDescendants,event:o,source:s}))}setNodesSelected({newValue:o,clearSelection:i,suppressFinishActions:s,nodes:n,event:r,source:l,keepDescendants:a=!1}){var c;if(!Qe(this.gos)&&o)return k(132),0;if(n.length===0)return 0;if(n.length>1&&!this.isMultiSelect())return k(130),0;let d=0;for(let u=0;u<n.length;u++){const h=n[u],g=Nt(h),p=this.groupSelectsFiltered&&g.group;if(g.rowPinned&&!Ai(g)){k(59);continue}if(g.id===void 0){k(60);continue}p||this.selectRowNode(g,o,r,l)&&(this.detailSelection.delete(g.id),d++),this.groupSelectsDescendants&&((c=g.childrenAfterGroup)!=null&&c.length)&&(d+=this.selectChildren(g,o,l))}return s||(n.length===1&&l==="api"&&this.selectionCtx.setRoot(Nt(n[0])),o&&(i||!this.isMultiSelect())&&(d+=this.clearOtherNodes(Nt(n[0]),a,l)),d>0&&(this.updateGroupsFromChildrenSelections(l),this.dispatchSelectionChanged(l))),d}selectRange(o,i,s){let n=0;return o.forEach(r=>{const l=Nt(r);l.group&&this.groupSelectsDescendants||this.selectRowNode(l,i,void 0,s)&&n++}),n>0&&(this.updateGroupsFromChildrenSelections(s),this.dispatchSelectionChanged(s)),n}selectChildren(o,i,s){const n=this.groupSelectsFiltered?o.childrenAfterAggFilter:o.childrenAfterGroup;return n?this.setNodesSelected({newValue:i,clearSelection:!1,suppressFinishActions:!0,source:s,nodes:n}):0}getSelectedNodes(){return Array.from(this.selectedNodes.values())}getSelectedRows(){const o=[];return this.selectedNodes.forEach(i=>i.data&&o.push(i.data)),o}getSelectionCount(){return this.selectedNodes.size}filterFromSelection(o){const i=new Map;this.selectedNodes.forEach((s,n)=>{o(s)&&i.set(n,s)}),this.selectedNodes=i}updateGroupsFromChildrenSelections(o,i){if(!this.groupSelectsDescendants)return!1;const{gos:s,rowModel:n}=this.beans;if(!oe(s))return!1;const r=n.rootNode;if(!r)return!1;i||(i=new Ci(!0,r),i.active=!1);let l=!1;return i.forEachChangedNodeDepthFirst(a=>{if(a!==r){const d=this.calculateSelectedFromChildren(a);l=this.selectRowNode(a,d===null?!1:d,void 0,o)||l}}),l}clearOtherNodes(o,i,s){const n=new Map;let r=0;return this.selectedNodes.forEach(l=>{const a=l.id==o.id;if((!i||!Ky(o,l))&&!a){const d=this.selectedNodes.get(l.id);r+=this.setNodesSelected({nodes:[d],newValue:!1,clearSelection:!1,suppressFinishActions:!0,source:s}),this.groupSelectsDescendants&&l.parent&&n.set(l.parent.id,l.parent)}}),n.forEach(l=>{const a=this.calculateSelectedFromChildren(l);this.selectRowNode(l,a===null?!1:a,void 0,s)}),r}onRowSelected(o){const i=o.node;this.groupSelectsDescendants&&i.group||(i.isSelected()?this.selectedNodes.set(i.id,i):this.selectedNodes.delete(i.id))}syncInRowNode(o,i){this.syncInOldRowNode(o,i),this.syncInNewRowNode(o)}createDaemonNode(o){if(!o.id)return;const i=new so(this.beans);return i.id=o.id,i.data=o.data,i.__daemon=!0,i.__selected=o.__selected,i.level=o.level,i}syncInOldRowNode(o,i){i&&o.id!==i.id&&this.selectedNodes.get(i.id)==o&&this.selectedNodes.set(i.id,i)}syncInNewRowNode(o){this.selectedNodes.has(o.id)?(o.__selected=!0,this.selectedNodes.set(o.id,o)):o.__selected=!1}reset(o){const i=this.getSelectionCount();this.resetNodes(),i&&this.dispatchSelectionChanged(o)}resetNodes(){this.selectedNodes.forEach(o=>{this.selectRowNode(o,!1)}),this.selectedNodes.clear()}getBestCostNodeSelection(){const{gos:o,rowModel:i}=this.beans;if(!oe(o))return;const s=i.getTopLevelNodes();if(s===null)return;const n=[];function r(l){for(let a=0,d=l.length;a<d;a++){const c=l[a];c.isSelected()?n.push(c):c.group&&c.childrenAfterGroup&&r(c.childrenAfterGroup)}}return r(s),n}isEmpty(){return this.getSelectionCount()===0}deselectAllRowNodes({source:o,selectAll:i}){const s=oe(this.gos);let n=!1;const r=l=>{const a=this.selectRowNode(Nt(l),!1,void 0,o);n||(n=a)};if(i==="currentPage"||i==="filtered"){if(!s){z(102);return}this.getNodesToSelect(i).forEach(r)}else this.selectedNodes.forEach(r),this.reset(o);if(this.selectionCtx.selectAll=!1,s&&this.groupSelectsDescendants){const l=this.updateGroupsFromChildrenSelections(o);n||(n=l)}n&&this.dispatchSelectionChanged(o)}getSelectedCounts(o){let i=0,s=0;return this.getNodesToSelect(o).forEach(n=>{this.groupSelectsDescendants&&n.group||(n.isSelected()?i++:n.selectable&&s++)}),{selectedCount:i,notSelectedCount:s}}getSelectAllState(o){const{selectedCount:i,notSelectedCount:s}=this.getSelectedCounts(o);return nd(i,s)??null}hasNodesToSelect(o){return this.getNodesToSelect(o).filter(i=>i.selectable).length>0}getNodesToSelect(o){if(!this.canSelectAll())return[];const i=[],s=r=>i.push(r);if(o==="currentPage")return this.forEachNodeOnPage(r=>{if(!r.group){s(r);return}if(!r.expanded&&!r.footer){const l=a=>{var d;s(a),(d=a.childrenAfterFilter)==null||d.forEach(l)};l(r);return}this.groupSelectsDescendants||s(r)}),i;const n=this.beans.rowModel;return o==="filtered"?(n.forEachNodeAfterFilter(s),i):(n.forEachNode(s),i)}forEachNodeOnPage(o){const{pageBounds:i,rowModel:s}=this.beans,n=i.getFirstRow(),r=i.getLastRow();for(let l=n;l<=r;l++){const a=s.getRow(l);a&&o(a)}}selectAllRowNodes(o){const{gos:i,selectionCtx:s}=this;if(!Qe(i)){k(132);return}if(Sc(i)&&!Qt(i)){k(130);return}if(!this.canSelectAll())return;const{source:n,selectAll:r}=o;let l=!1;if(this.getNodesToSelect(r).forEach(a=>{const d=this.selectRowNode(Nt(a),!0,void 0,n);l||(l=d)}),s.selectAll=!0,oe(i)&&this.groupSelectsDescendants){const a=this.updateGroupsFromChildrenSelections(n);l||(l=a)}l&&this.dispatchSelectionChanged(n)}getSelectionState(){return this.isEmpty()?null:Array.from(this.selectedNodes.keys())}setSelectionState(o,i,s){if(o||(o=[]),!Array.isArray(o)){z(103);return}const n=new Set(o),r=[];this.beans.rowModel.forEachNode(l=>{n.has(l.id)&&r.push(l)}),s&&this.resetNodes(),this.setNodesSelected({newValue:!0,nodes:r,source:i})}canSelectAll(){const{gos:o}=this.beans;return!!oe(o)}updateSelectable(o){var c;const{gos:i,rowModel:s}=this.beans;if(!Qe(i))return;const n="selectableChanged",r=o!==void 0,l=oe(i)&&this.groupSelectsDescendants,a=[],d=u=>{var h;if(!(r&&!u.group)){if(l&&u.group){const g=((h=u.childrenAfterGroup)==null?void 0:h.some(p=>p.selectable))??!1;this.setRowSelectable(u,g,!0);return}!this.updateRowSelectable(u,!0)&&u.isSelected()&&a.push(u)}};if(l){if(o===void 0){const u=s.rootNode;o=u?new Ci(!1,u):void 0}o==null||o.forEachChangedNodeDepthFirst(d,!r,!r)}else s.forEachNode(d);a.length&&this.setNodesSelected({nodes:a,newValue:!1,source:n}),!r&&l&&((c=this.updateGroupsFromChildrenSelections)==null||c.call(this,n))}updateSelectableAfterGrouping(o){var i;this.updateSelectable(o),this.groupSelectsDescendants&&((i=this.updateGroupsFromChildrenSelections)!=null&&i.call(this,"rowGroupChanged",o))&&this.dispatchSelectionChanged("rowGroupChanged")}refreshMasterNodeState(o,i){var r,l;if(!this.masterSelectsDetail)return;const s=(l=(r=o.detailNode)==null?void 0:r.detailGridInfo)==null?void 0:l.api;if(!s)return;const n=Uy(s);if(o.isSelected()!==n&&this.selectRowNode(o,n,i,"masterDetail")&&this.dispatchSelectionChanged("masterDetail"),!n){const a=this.detailSelection.get(o.id)??new Set;for(const d of s.getSelectedNodes())a.add(d.id);this.detailSelection.set(o.id,a)}}setDetailSelectionState(o,i,s){if(this.masterSelectsDetail){if(!Qt(i)){k(269);return}switch(o.isSelected()){case!0:{s.selectAll();break}case!1:{s.deselectAll();break}case void 0:{const n=this.detailSelection.get(o.id);if(n){const r=[];for(const l of n){const a=s.getRowNode(l);a&&r.push(a)}s.setNodesSelected({nodes:r,newValue:!0,source:"masterDetail"})}break}}}}dispatchSelectionChanged(o){this.eventSvc.dispatchEvent({type:"selectionChanged",source:o,selectedNodes:this.getSelectedNodes(),serverSideState:null})}}function Nt(e){return Ai(e)?e.pinnedSibling:e.footer?e.sibling:e}function Uy(e){let t=0,o=0;return e.forEachNode(i=>{i.isSelected()?t++:i.selectable&&o++}),nd(t,o)}function nd(e,t){if(e===0&&t===0)return!1;if(!(e>0&&t>0))return e>0}function Ky(e,t){let o=t.parent;for(;o;){if(o===e)return!0;o=o.parent}return!1}const rd={moduleName:"SharedRowSelection",version:Ii,beans:[Ty],apiFunctions:{setNodesSelected:Ly,selectAll:Gy,deselectAll:Hy,getSelectedNodes:Oy,getSelectedRows:By}},ld={moduleName:"RowSelection",version:Ii,rowModels:["clientSide","infinite","viewport"],beans:[$y],dependsOn:[rd]},jy="ROOT_NODE_ID";class qy extends x{constructor(){super(...arguments);R(this,"nextId",0);R(this,"allNodesMap",{});R(this,"rootNode",null)}getRowNode(o){return this.allNodesMap[o]}extractRowData(){var o,i;return(i=(o=this.rootNode)==null?void 0:o.allLeafChildren)==null?void 0:i.map(s=>s.data)}activate(o){this.rootNode=o,o.group=!0,o.level=-1,o.id=jy,o.allLeafChildren=[],o.childrenAfterGroup=[],o.childrenAfterSort=[],o.childrenAfterAggFilter=[],o.childrenAfterFilter=[],this.updateRootSiblingArrays(o)}deactivate(){this.rootNode&&(this.allNodesMap={},this.rootNode=null)}destroy(){super.destroy(),this.allNodesMap={},this.rootNode=null}setNewRowData(o){const i=this.rootNode;i&&(this.dispatchRowDataUpdateStartedEvent(o),i.childrenAfterFilter=null,i.childrenAfterGroup=null,i.childrenAfterAggFilter=null,i.childrenAfterSort=null,i.childrenMapped=null,i.updateHasChildren(),this.allNodesMap={},this.nextId=0,this.loadNewRowData(o),this.updateRootSiblingArrays(i))}updateRootSiblingArrays(o){const i=o.sibling;i&&(i.childrenAfterFilter=o.childrenAfterFilter,i.childrenAfterGroup=o.childrenAfterGroup,i.childrenAfterAggFilter=o.childrenAfterAggFilter,i.childrenAfterSort=o.childrenAfterSort,i.childrenMapped=o.childrenMapped,i.allLeafChildren=o.allLeafChildren)}loadNewRowData(o){this.rootNode.allLeafChildren=(o==null?void 0:o.map((i,s)=>this.createRowNode(i,s)))??[]}setImmutableRowData(o,i){var C;const s=ko(this.gos),n=!this.gos.get("suppressMaintainUnsortedOrder"),r=o.changedRowNodes,l=new Set,a=this.rootNode,d=a.allLeafChildren,c=d.length;let u=!1,h=!1,g=!1,p=!1;for(let m=0,w=-1,S=i.length;m<S;m++){const v=i[m];let b=this.getRowNode(s({data:v,level:0}));if(!b)u=!0,b=this.createRowNode(v,-1),r.add(b);else{if(n){const D=b.sourceRowIndex;p||(p=D<=w||u),w=D}b.data!==v&&(g=!0,b.updateData(v),r.update(b))}l.add(b)}const f=[];for(let m=0;m<c;m++){const w=d[m];l.has(w)||(h=!0,w.isSelected()&&f.push(w),w.pinnedSibling&&((C=this.beans.pinnedRowModel)==null||C.pinRow(w.pinnedSibling,null)),this.rowNodeDeleted(w),r.remove(w))}if(u||h||p){const m=new Array(l.size);let w=0;if(!n)for(let v=0;v<c;++v){const b=d[v];l.delete(b)&&(b.sourceRowIndex=w,m[w++]=b)}for(const v of l)v.sourceRowIndex=w,m[w++]=v;a.allLeafChildren=m;const S=a.sibling;S&&(S.allLeafChildren=m),o.rowNodesOrderChanged||(o.rowNodesOrderChanged=p)}(u||h||p||g)&&(this.deselectNodes(f),o.rowDataUpdated=!0)}rowNodeDeleted(o){o.clearRowTopAndRowIndex();const i=o.id,s=this.allNodesMap;s[i]===o&&delete s[i]}updateRowData(o,i){this.dispatchRowDataUpdateStartedEvent(o.add);const s={changedRowNodes:i,rowNodeTransaction:{remove:[],update:[],add:[]},rowsInserted:!1},n=[],r=ko(this.gos);return this.executeRemove(r,o,s,n),this.executeUpdate(r,o,s,n),this.executeAdd(o,s),this.deselectNodes(n),s}executeAdd(o,i){var h;const s=o.add;if(!(s!=null&&s.length))return;let n=this.rootNode.allLeafChildren,r=n.length;if(typeof o.addIndex=="number"&&(r=this.sanitizeAddIndex(o.addIndex),r>0&&this.gos.get("treeData")&&this.gos.get("getDataPath"))){for(let g=0;g<n.length;g++)if(((h=n[g])==null?void 0:h.rowIndex)==r-1){r=g+1;break}}const l=s.length,a=i.changedRowNodes,d=new Array(l);for(let g=0;g<l;g++){const p=this.createRowNode(s[g],r+g);a.add(p),d[g]=p}const c=this.rootNode;if(r<n.length){const g=n.slice(0,r),p=n.slice(r,n.length),f=g.length+d.length;for(let C=0,m=p.length;C<m;++C)p[C].sourceRowIndex=f+C;n=[...g,...d,...p],i.rowsInserted=!0}else n=n.concat(d);c.allLeafChildren=n;const u=c.sibling;u&&(u.allLeafChildren=n),i.rowNodeTransaction.add=d}executeRemove(o,i,{changedRowNodes:s,rowNodeTransaction:n},r){var u,h;const{remove:l}=i;if(!(l!=null&&l.length))return;const a={};l.forEach(g=>{var f;const p=this.lookupRowNode(o,g);p&&(p.isSelected()&&r.push(p),p.pinnedSibling&&((f=this.beans.pinnedRowModel)==null||f.pinRow(p.pinnedSibling,null)),p.clearRowTopAndRowIndex(),a[p.id]=!0,delete this.allNodesMap[p.id],n.remove.push(p),s.remove(p))});const d=this.rootNode;d.allLeafChildren=((u=d.allLeafChildren)==null?void 0:u.filter(g=>!a[g.id]))??null,(h=d.allLeafChildren)==null||h.forEach((g,p)=>{g.sourceRowIndex=p});const c=d.sibling;c&&(c.allLeafChildren=d.allLeafChildren)}executeUpdate(o,i,{changedRowNodes:s,rowNodeTransaction:n},r){const{update:l}=i;l!=null&&l.length&&l.forEach(a=>{const d=this.lookupRowNode(o,a);d&&(d.updateData(a),!d.selectable&&d.isSelected()&&r.push(d),n.update.push(d),s.update(d))})}dispatchRowDataUpdateStartedEvent(o){this.eventSvc.dispatchEvent({type:"rowDataUpdateStarted",firstRowData:o!=null&&o.length?o[0]:null})}deselectNodes(o){var r;const i="rowDataChanged",s=this.beans.selectionSvc,n=o.length>0;n&&(s==null||s.setNodesSelected({newValue:!1,nodes:o,suppressFinishActions:!0,source:i})),(r=s==null?void 0:s.updateGroupsFromChildrenSelections)==null||r.call(s,i),n&&this.eventSvc.dispatchEvent({type:"selectionChanged",source:i,selectedNodes:(s==null?void 0:s.getSelectedNodes())??null,serverSideState:null})}sanitizeAddIndex(o){var s;const i=((s=this.rootNode.allLeafChildren)==null?void 0:s.length)??0;return o<0||o>=i||Number.isNaN(o)?i:Math.ceil(o)}createRowNode(o,i){const s=new so(this.beans);return s.parent=this.rootNode,s.level=0,s.group=!1,s.expanded=!1,s.sourceRowIndex=i,s.setDataAndId(o,String(this.nextId)),this.allNodesMap[s.id]&&k(2,{nodeId:s.id}),this.allNodesMap[s.id]=s,this.nextId++,s}lookupRowNode(o,i){var n,r;let s;if(o){const l=o({data:i,level:0});if(s=this.allNodesMap[l],!s)return z(4,{id:l}),null}else if(s=(r=(n=this.rootNode)==null?void 0:n.allLeafChildren)==null?void 0:r.find(l=>l.data===i),!s)return z(5,{data:i}),null;return s||null}}class Yy extends qy{constructor(){super(...arguments);R(this,"beanName","csrmNodeSvc")}}class fn{constructor(){R(this,"removals",new Set);R(this,"updates",new Set);R(this,"adds",new Set)}remove(t){this.adds.delete(t)||(this.updates.delete(t),this.removals.add(t))}update(t){this.adds.has(t)||this.updates.add(t)}add(t){this.adds.add(t)}}function Zy(e){e.sibling&&(e.sibling.childrenAfterFilter=e.childrenAfterFilter)}function Qy(e){if($(e.childrenAfterSort))return;const t=e.childrenAfterSort;for(let o=0;o<t.length;o++){const i=t[o],s=o===0,n=o===e.childrenAfterSort.length-1;i.setFirstChild(s),i.lastChild!==n&&(i.lastChild=n,i.dispatchRowEvent("lastChildChanged")),i.childIndex!==o&&(i.childIndex=o,i.dispatchRowEvent("childIndexChanged"))}}function ad(e){e.sibling&&(e.sibling.childrenAfterSort=e.childrenAfterSort),Qy(e)}class Xy extends x{constructor(){super(...arguments);R(this,"beanName","sortStage");R(this,"refreshProps",new Set(["postSortRows","groupDisplayType","accentedSort"]));R(this,"step","sort")}execute(o){const i=this.beans,s=i.sortSvc.getSortOptions(),n=M(s)&&s.length>0,r=n&&!!o.changedRowNodes&&this.gos.get("deltaSort"),l=s.some(({column:a})=>Re(i.gos)?a.isPrimary()&&a.isRowGroupActive():!!a.getColDef().showRowGroup);this.sort(i,s,n,r,o.changedRowNodes,o.changedPath,l)}sort(o,i,s,n,r,l,a){const{gos:d,colModel:c,rowGroupColsSvc:u,rowNodeSorter:h,rowRenderer:g,showRowGroupCols:p}=o,f=d.get("groupMaintainOrder"),C=c.getCols().some(b=>b.isRowGroupActive()),m=c.isPivotMode(),w=d.getCallback("postSortRows");let S=!1;const v=b=>{var P,T,F;const D=m&&b.leafGroup,I=f&&C&&!b.leafGroup&&!a;let B;if(I){const G=((T=(P=u==null?void 0:u.columns)==null?void 0:P[b.level+1])==null?void 0:T.getSort())===null,_=b.childrenAfterAggFilter.slice(0);if(b.childrenAfterSort&&!G){const Z={};b.childrenAfterSort.forEach((te,Se)=>{Z[te.id]=Se}),_.sort((te,Se)=>(Z[te.id]??0)-(Z[Se.id]??0))}B=_}else!s||D?B=b.childrenAfterAggFilter.slice(0):n&&r?B=Jy(h,b,r,l,i):B=b.childrenAfterAggFilter.slice(0);if(S||(S=((F=b.childrenAfterSort)==null?void 0:F[0])!==B[0]),b.childrenAfterSort=B,ad(b),w){const G={nodes:b.childrenAfterSort};w(G)}};if(l==null||l.forEachChangedNodeDepthFirst(v),S&&this.gos.get("groupHideOpenParents")){const b=p==null?void 0:p.getShowRowGroupCols();b!=null&&b.length&&g.refreshCells({columns:b,force:!0})}}}function Jy(e,t,o,i,s){const n=t.childrenAfterAggFilter,r=t.childrenAfterSort;if(!r)return e.doFullSort(n,s);const l=new Set,a=[],{updates:d,adds:c}=o;for(let h=0,g=n.length;h<g;++h){const p=n[h];d.has(p)||c.has(p)||i&&!i.canSkip(p)?a.push({currentPos:a.length,rowNode:p}):l.add(p.id)}const u=r.filter(h=>l.has(h.id)).map((h,g)=>({currentPos:g,rowNode:h}));return a.sort((h,g)=>e.compareRowNodes(s,h,g)),eR(e,s,a,u)}function eR(e,t,o,i){const s=[];let n=0,r=0;const l=o.length,a=i.length;for(;n<l&&r<a;){const d=o[n],c=i[r],u=e.compareRowNodes(t,d,c);let h;u<0?(h=d,++n):(h=c,++r),s.push(h.rowNode)}for(;n<l;)s.push(o[n++].rowNode);for(;r<a;)s.push(i[r++].rowNode);return s}class tR extends x{constructor(){super(...arguments);R(this,"beanName","rowModel");R(this,"colModel");R(this,"valueCache");R(this,"filterStage");R(this,"sortStage");R(this,"flattenStage");R(this,"groupStage");R(this,"aggStage");R(this,"pivotStage");R(this,"filterAggStage");R(this,"rootNode",null);R(this,"rowsToDisplay",[]);R(this,"nodeManager");R(this,"rowDataTransactionBatch");R(this,"rowDataUpdatedPending",!1);R(this,"applyAsyncTransactionsTimeout");R(this,"started",!1);R(this,"isRefreshingModel",!1);R(this,"rowNodesCountReady",!1);R(this,"rowCountReady",!1);R(this,"orderedStages");R(this,"onRowHeightChanged_debounced",he(this,this.onRowHeightChanged.bind(this),100))}wireBeans(o){this.colModel=o.colModel,this.valueCache=o.valueCache,this.filterStage=o.filterStage,this.sortStage=o.sortStage,this.flattenStage=o.flattenStage,this.groupStage=o.groupStage,this.aggStage=o.aggStage,this.pivotStage=o.pivotStage,this.filterAggStage=o.filterAggStage}postConstruct(){this.orderedStages=[this.groupStage,this.filterStage,this.pivotStage,this.aggStage,this.sortStage,this.filterAggStage,this.flattenStage].filter(n=>!!n);const o=this.refreshModel.bind(this,{step:"group"}),i=this.refreshModel.bind(this,{step:"group",afterColumnsChanged:!0,keepRenderedRows:!0,animate:!this.gos.get("suppressAnimationFrame")});this.addManagedEventListeners({newColumnsLoaded:i,columnRowGroupChanged:o,columnValueChanged:this.onValueChanged.bind(this),columnPivotChanged:this.refreshModel.bind(this,{step:"pivot"}),filterChanged:this.onFilterChanged.bind(this),sortChanged:this.onSortChanged.bind(this),columnPivotModeChanged:o,gridStylesChanged:this.onGridStylesChanges.bind(this),gridReady:this.onGridReady.bind(this)}),this.addPropertyListeners(),this.rootNode=new so(this.beans);const s=this.getNewNodeManager();this.nodeManager=s,s.activate(this.rootNode)}getNewNodeManager(){const{gos:o,beans:i}=this;return xc(o)==="treeNested"&&i.csrmChildrenTreeNodeSvc||i.csrmNodeSvc}addPropertyListeners(){const o=["treeData","treeDataChildrenField",...this.orderedStages.flatMap(({refreshProps:i})=>[...i])];this.addManagedPropertyListeners(o,i=>{var n;const s=(n=i.changeSet)==null?void 0:n.properties;s&&this.onPropChange(s)}),this.addManagedPropertyListener("rowData",()=>this.onPropChange(["rowData"])),this.addManagedPropertyListener("rowHeight",()=>this.resetRowHeights())}start(){this.started=!0,this.rowNodesCountReady?this.refreshModel({step:"group",rowDataUpdated:!0,newData:!0}):this.setInitialData()}setInitialData(){this.gos.get("rowData")&&this.onPropChange(["rowData"])}ensureRowHeightsValid(o,i,s,n){let r,l=!1;do{r=!1;const a=this.getRowIndexAtPixel(o),d=this.getRowIndexAtPixel(i),c=Math.max(a,s),u=Math.min(d,n);for(let h=c;h<=u;h++){const g=this.getRow(h);if(g.rowHeightEstimated){const p=_e(this.beans,g);g.setRowHeight(p.height),r=!0,l=!0}}r&&this.setRowTopAndRowIndex()}while(r);return l}onPropChange(o){if(!this.rootNode)return;const i=this.gos,s=new Set(o),n={step:"nothing",changedProps:s},r=s.has("rowData"),l=this.nodeManager,a=this.getNewNodeManager(),d=l!==a||r&&s.has("treeData")&&i.get("treeData")||s.has("treeDataChildrenField")&&i.get("treeData");let c;if((d||r)&&(c=i.get("rowData"),c!=null&&!Array.isArray(c)&&(c=null,k(1))),d&&(r||(c=(l==null?void 0:l.extractRowData())??c),l!==a&&(l==null||l.deactivate(),this.nodeManager=a),a.activate(this.rootNode)),c)if(!d&&!this.isEmpty()&&c.length>0&&i.exists("getRowId")&&!i.get("resetRowDataOnUpdate"))n.keepRenderedRows=!0,n.animate=!this.gos.get("suppressAnimationFrame"),n.changedRowNodes=new fn,a.setImmutableRowData(n,c);else{n.rowDataUpdated=!0,n.newData=!0;const{selectionSvc:u,pinnedRowModel:h}=this.beans;u==null||u.reset("rowDataChanged"),h!=null&&h.isManual()&&h.reset(),this.rowNodesCountReady=!0,a.setNewRowData(c)}if(n.rowDataUpdated)n.step="group";else if(n.step==="nothing"){for(const{refreshProps:u,step:h}of this.orderedStages)if(o.some(g=>u.has(g))){n.step=h;break}}n.step!=="nothing"&&this.refreshModel(n)}setRowTopAndRowIndex(){const{beans:o,rowsToDisplay:i}=this,s=o.environment.getDefaultRowHeight();let n=0;const r=new Set,l=J(this.gos,"normal");for(let a=0,d=i.length;a<d;++a){const c=i[a];if(c.id!=null&&r.add(c.id),c.rowHeight==null){const u=_e(o,c,l,s);c.setRowHeight(u.height,u.estimated)}c.setRowTop(n),c.setRowIndex(a),n+=c.rowHeight}return r}clearRowTopAndRowIndex(o,i){const s=o.active,n=l=>{l&&l.id!=null&&!i.has(l.id)&&l.clearRowTopAndRowIndex()},r=l=>{if(l!==null&&(n(l),n(l.detailNode),n(l.sibling),l.hasChildren()&&l.childrenAfterGroup)){const a=l.level==-1;s&&!a&&!l.expanded||l.childrenAfterGroup.forEach(r)}};r(this.rootNode)}isLastRowIndexKnown(){return!0}getRowCount(){return this.rowsToDisplay?this.rowsToDisplay.length:0}getTopLevelRowCount(){const o=this.rootNode;if(!o||this.rowsToDisplay.length===0)return 0;if(this.rowsToDisplay&&this.rowsToDisplay[0]===o)return 1;const i=o.childrenAfterSort,s=o.sibling&&o.sibling.displayed?1:0;return(i?i.length:0)+s}getTopLevelRowDisplayedIndex(o){const{rootNode:i,rowsToDisplay:s}=this;if(!i||!s.length||s[0]===i)return o;const{childrenAfterSort:n}=i,r=a=>{let d=n[a];if(this.gos.get("groupHideOpenParents"))for(;d.expanded&&d.childrenAfterSort&&d.childrenAfterSort.length>0;)d=d.childrenAfterSort[0];return d.rowIndex},{footerSvc:l}=this.beans;return l?l.getTopDisplayIndex(s,o,n,r):r(o)}getTopLevelIndexFromDisplayedIndex(o){var l;const{rootNode:i,rowsToDisplay:s}=this;if(!i||!s.length||s[0]===i)return o;let n=this.getRow(o);for(n.footer&&(n=n.sibling);n.parent&&n.parent!==i;)n=n.parent;const r=(l=i.childrenAfterSort)==null?void 0:l.findIndex(a=>a===n);return r===-1?o:r??o}getRowBounds(o){const i=this.rowsToDisplay[o];return i?{rowTop:i.rowTop,rowHeight:i.rowHeight}:null}onRowGroupOpened(){const o=mt(this.gos);this.refreshModel({step:"map",keepRenderedRows:!0,animate:o})}onFilterChanged(o){if(o.afterDataChange)return;const i=mt(this.gos),s=o.columns.length===0||o.columns.some(n=>n.isPrimary())?"filter":"filter_aggregates";this.refreshModel({step:s,keepRenderedRows:!0,animate:i})}onSortChanged(){const o=mt(this.gos);this.refreshModel({step:"sort",keepRenderedRows:!1,animate:o})}getType(){return"clientSide"}onValueChanged(){this.refreshModel({step:this.colModel.isPivotActive()?"pivot":"aggregate"})}createChangePath(o){const i=new Ci(!1,this.rootNode);return o||(i.active=!1),i}isSuppressModelUpdateAfterUpdateTransaction(o){if(!this.gos.get("suppressModelUpdateAfterUpdateTransaction"))return!1;const{changedRowNodes:i,newData:s,rowDataUpdated:n}=o;return!(!i||s||!n||i.removals.size||i.adds.size)}refreshModel(o){var l,a,d;if(!this.rootNode)return;const i=this.beans;let s=!!o.rowDataUpdated;const n=o.changedPath??(o.changedPath=this.createChangePath(!o.newData&&s));if(this.started&&s&&this.eventSvc.dispatchEvent({type:"rowDataUpdated"}),this.rowDataUpdatedPending||(this.rowDataUpdatedPending=s),!this.started||this.isRefreshingModel||this.colModel.changeEventsDispatching||this.isSuppressModelUpdateAfterUpdateTransaction(o))return;switch(this.rowDataUpdatedPending&&(this.rowDataUpdatedPending=!1,o.rowDataUpdated=s=!0),this.isRefreshingModel=!0,(l=i.masterDetailSvc)==null||l.refreshModel(o),s&&o.step!=="group"&&((a=i.colFilter)==null||a.refreshModel()),o.step){case"group":(this.doRowGrouping(o)||s)&&((d=i.colFilter)==null||d.refreshModel()),!this.rowCountReady&&this.rowNodesCountReady&&(this.rowCountReady=!0,this.eventSvc.dispatchEventOnce({type:"rowCountReady"}));case"filter":this.doFilter(n);case"pivot":this.doPivot(n);case"aggregate":this.doAggregate(n);case"filter_aggregates":this.doFilterAggregates(n);case"sort":this.doSort(o.changedRowNodes,n);case"map":this.doRowsToDisplay()}const r=this.setRowTopAndRowIndex();this.clearRowTopAndRowIndex(n,r),this.isRefreshingModel=!1,this.eventSvc.dispatchEvent({type:"modelUpdated",animate:o.animate,keepRenderedRows:o.keepRenderedRows,newData:o.newData,newPage:!1,keepUndoRedoStack:o.keepUndoRedoStack})}isEmpty(){var o,i,s;return!((i=(o=this.rootNode)==null?void 0:o.allLeafChildren)!=null&&i.length)||!((s=this.colModel)!=null&&s.ready)}isRowsToRender(){return this.rowsToDisplay.length>0}getNodesInRangeForSelection(o,i){let s=!1,n=!1;const r=[],l=Xt(this.gos);return this.forEachNodeAfterFilterAndSort(a=>{if(!n){if(s&&(a===i||a===o)&&(n=!0,a.group&&l)){r.push(...a.allLeafChildren);return}if(!s){if(a!==i&&a!==o)return;s=!0}if(!a.group||!l){r.push(a);return}}}),r}getTopLevelNodes(){var o;return((o=this.rootNode)==null?void 0:o.childrenAfterGroup)??null}getRow(o){return this.rowsToDisplay[o]}isRowPresent(o){return this.rowsToDisplay.indexOf(o)>=0}getRowIndexAtPixel(o){const i=this.rowsToDisplay;if(this.isEmpty()||i.length===0)return-1;let s=0,n=i.length-1;if(o<=0)return 0;if(W(i).rowTop<=o)return i.length-1;let r=-1,l=-1;for(;;){const a=Math.floor((s+n)/2),d=i[a];if(this.isRowInPixel(d,o)||(d.rowTop<o?s=a+1:d.rowTop>o&&(n=a-1),r===s&&l===n))return a;r=s,l=n}}isRowInPixel(o,i){const s=o.rowTop,n=o.rowTop+o.rowHeight;return s<=i&&n>i}forEachLeafNode(o){var i,s;(s=(i=this.rootNode)==null?void 0:i.allLeafChildren)==null||s.forEach((n,r)=>o(n,r))}forEachNode(o,i=!1){this.depthFirstSearchRowNodes(o,i)}forEachDisplayedNode(o){this.rowsToDisplay.forEach(o)}forEachNodeAfterFilter(o,i=!1){this.depthFirstSearchRowNodes(o,i,s=>s.childrenAfterAggFilter)}forEachNodeAfterFilterAndSort(o,i=!1){this.depthFirstSearchRowNodes(o,i,s=>s.childrenAfterSort)}forEachPivotNode(o,i=!1,s=!1){const{colModel:n,rowGroupColsSvc:r}=this.beans;if(!n.isPivotMode())return;if(!(r!=null&&r.columns.length)){o(this.rootNode,0);return}const l=s?"childrenAfterSort":"childrenAfterGroup";this.depthFirstSearchRowNodes(o,i,a=>a.leafGroup?null:a[l])}depthFirstSearchRowNodes(o,i=!1,s=l=>l.childrenAfterGroup,n=this.rootNode,r=0){let l=r;if(!n)return l;const a=n===this.rootNode;a||o(n,l++);const{footerSvc:d}=this.beans;if(n.hasChildren()&&!n.footer){const c=s(n);if(c){l=(d==null?void 0:d.addTotalRows(l,n,o,i,a,"top"))??l;for(const u of c)l=this.depthFirstSearchRowNodes(o,i,s,u,l);return(d==null?void 0:d.addTotalRows(l,n,o,i,a,"bottom"))??l}}return l}doAggregate(o){var s;const i=this.rootNode;i&&((s=this.aggStage)==null||s.execute({rowNode:i,changedPath:o}))}doFilterAggregates(o){const i=this.rootNode;this.filterAggStage?this.filterAggStage.execute({rowNode:i,changedPath:o}):i.childrenAfterAggFilter=i.childrenAfterFilter}doSort(o,i){this.sortStage?this.sortStage.execute({rowNode:this.rootNode,changedRowNodes:o,changedPath:i}):i.forEachChangedNodeDepthFirst(s=>{s.childrenAfterSort=s.childrenAfterAggFilter.slice(0),ad(s)})}doRowGrouping(o){var r;const i=this.rootNode,s=(r=this.groupStage)==null?void 0:r.execute({rowNode:i,changedRowNodes:o.changedRowNodes,changedPath:o.changedPath,rowNodesOrderChanged:!!o.rowNodesOrderChanged,afterColumnsChanged:!!o.afterColumnsChanged});if(s!==void 0)return s;const n=i.sibling;return i.childrenAfterGroup=i.allLeafChildren,n&&(n.childrenAfterGroup=i.childrenAfterGroup),i.updateHasChildren(),!1}doFilter(o){this.filterStage?this.filterStage.execute({rowNode:this.rootNode,changedPath:o}):o.forEachChangedNodeDepthFirst(i=>{i.childrenAfterFilter=i.childrenAfterGroup,Zy(i)},!0)}doPivot(o){var i;(i=this.pivotStage)==null||i.execute({rowNode:this.rootNode,changedPath:o})}getRowNode(o){var s;const i=this.nodeManager.getRowNode(o);return typeof i=="object"?i:typeof o=="string"&&o.indexOf(Cs)===0?(s=this.groupStage)==null?void 0:s.getNode(o):void 0}batchUpdateRowData(o,i){if(this.applyAsyncTransactionsTimeout==null){this.rowDataTransactionBatch=[];const s=this.gos.get("asyncTransactionWaitMillis");this.applyAsyncTransactionsTimeout=window.setTimeout(()=>{this.isAlive()&&this.executeBatchUpdateRowData()},s)}this.rowDataTransactionBatch.push({rowDataTransaction:o,callback:i})}flushAsyncTransactions(){this.applyAsyncTransactionsTimeout!=null&&(clearTimeout(this.applyAsyncTransactionsTimeout),this.executeBatchUpdateRowData())}executeBatchUpdateRowData(){var r,l;(r=this.valueCache)==null||r.onDataChanged();const o=[],i=[],s=new fn;let n=!1;(l=this.rowDataTransactionBatch)==null||l.forEach(a=>{this.rowNodesCountReady=!0;const{rowNodeTransaction:d,rowsInserted:c}=this.nodeManager.updateRowData(a.rowDataTransaction,s);c&&(n=!0),i.push(d),a.callback&&o.push(a.callback.bind(null,d))}),this.commitTransactions(n,s),o.length>0&&window.setTimeout(()=>{o.forEach(a=>a())},0),i.length>0&&this.eventSvc.dispatchEvent({type:"asyncTransactionsFlushed",results:i}),this.rowDataTransactionBatch=null,this.applyAsyncTransactionsTimeout=void 0}updateRowData(o){var r;(r=this.valueCache)==null||r.onDataChanged(),this.rowNodesCountReady=!0;const i=new fn,{rowNodeTransaction:s,rowsInserted:n}=this.nodeManager.updateRowData(o,i);return this.commitTransactions(n,i),s}commitTransactions(o,i){this.refreshModel({step:"group",rowDataUpdated:!0,rowNodesOrderChanged:o,keepRenderedRows:!0,animate:!this.gos.get("suppressAnimationFrame"),changedRowNodes:i,changedPath:this.createChangePath(!0)})}doRowsToDisplay(){const{flattenStage:o,rootNode:i}=this;let s;if(o)s=o.execute({rowNode:i});else{s=(i==null?void 0:i.childrenAfterSort)??[];for(const n of s)n.setUiLevel(0)}this.rowsToDisplay=s}onRowHeightChanged(){this.refreshModel({step:"map",keepRenderedRows:!0,keepUndoRedoStack:!0})}resetRowHeights(){const o=this.rootNode;if(!o)return;const i=this.resetRowHeightsForAllRowNodes();o.setRowHeight(o.rowHeight,!0),o.sibling&&o.sibling.setRowHeight(o.sibling.rowHeight,!0),i&&this.onRowHeightChanged()}resetRowHeightsForAllRowNodes(){let o=!1;return this.forEachNode(i=>{i.setRowHeight(i.rowHeight,!0);const s=i.detailNode;s&&s.setRowHeight(s.rowHeight,!0),i.sibling&&i.sibling.setRowHeight(i.sibling.rowHeight,!0),o=!0}),o}onGridStylesChanges(o){var i;if(o.rowHeightChanged){if((i=this.beans.rowAutoHeight)!=null&&i.active)return;this.resetRowHeights()}}onGridReady(){this.started||this.setInitialData()}isRowDataLoaded(){return this.rowCountReady}destroy(){super.destroy(),this.started=!1,this.rootNode=null,this.nodeManager=null,this.rowDataTransactionBatch=null,this.orderedStages=hr,this.rowsToDisplay=hr}onRowHeightChangedDebounced(){this.onRowHeightChanged_debounced()}}function oR(e){var t;(t=e.expansionSvc)==null||t.onGroupExpandedOrCollapsed()}function iR(e,t){const o=Te(e);o&&((!t||t==="everything")&&(t="group"),o.refreshModel({step:t,keepRenderedRows:!0,animate:!e.gos.get("suppressAnimationFrame")}))}function sR(e){var t;return((t=Te(e))==null?void 0:t.isEmpty())??!0}function nR(e,t){var o;(o=Te(e))==null||o.forEachLeafNode(t)}function rR(e,t){var o;(o=Te(e))==null||o.forEachNodeAfterFilter(t)}function lR(e,t){var o;(o=Te(e))==null||o.forEachNodeAfterFilterAndSort(t)}function aR(e){var t,o;if((t=e.rowAutoHeight)!=null&&t.active){k(3);return}(o=Te(e))==null||o.resetRowHeights()}function dR(e,t){return e.frameworkOverrides.wrapIncoming(()=>{var o;return(o=Te(e))==null?void 0:o.updateRowData(t)})}function cR(e,t,o){e.frameworkOverrides.wrapIncoming(()=>{var i;return(i=Te(e))==null?void 0:i.batchUpdateRowData(t,o)})}function uR(e){e.frameworkOverrides.wrapIncoming(()=>{var t;return(t=Te(e))==null?void 0:t.flushAsyncTransactions()})}function hR(e){var t;return(t=e.selectionSvc)==null?void 0:t.getBestCostNodeSelection()}const dd={moduleName:"ClientSideRowModel",version:Ii,rowModels:["clientSide"],beans:[Yy,tR,Xy],dependsOn:[ga]},cd={moduleName:"ClientSideRowModelApi",version:Ii,apiFunctions:{onGroupExpandedOrCollapsed:oR,refreshClientSideRowModel:iR,isRowDataEmpty:sR,forEachLeafNode:nR,forEachNodeAfterFilter:rR,forEachNodeAfterFilterAndSort:lR,resetRowHeights:aR,applyTransaction:dR,applyTransactionAsync:cR,flushAsyncTransactions:uR,getBestCostNodeSelection:hR},dependsOn:[sb]};class vo{static getComponentDefinition(t,o){let i;return typeof t=="string"?i=this.searchForComponentInstance(o,t):i={extends:E.defineComponent({...t})},i||z(114,{component:t}),i.extends?(i.extends.setup&&(i.setup=i.extends.setup),i.extends.props=this.addParamsToProps(i.extends.props)):i.props=this.addParamsToProps(i.props),i}static addParamsToProps(t){return!t||Array.isArray(t)&&t.indexOf("params")===-1?t=["params",...t||[]]:typeof t=="object"&&!t.params&&(t.params={type:Object}),t}static createAndMountComponent(t,o,i,s){const n=vo.getComponentDefinition(t,i);if(!n)return;const{vm:r,destroy:l,el:a}=this.mount(n,{params:Object.freeze(o)},i,s||{});return{componentInstance:r,element:a,destroy:l}}static mount(t,o,i,s){let n=new E({beforeCreate(){s?(this._provided=Object.create(i.proxy._provided||null),Object.keys(s).forEach(a=>{this._provided[a]=s[a]})):this._provided=i.proxy._provided||{};const l=i.proxy.$root;l&&l.$router&&(Object.defineProperty(this,"$route",{value:i.proxy.$root.$route,writable:!1,configurable:!0}),Object.defineProperty(this,"$router",{value:i.proxy.$root.$router,writable:!1,configurable:!0}))},render(l){return l(t,{props:o})}});return n.$mount(),{vm:n,destroy:()=>{n&&(n.$destroy(),n=null)},el:n.$el}}static searchForComponentInstance(t,o,i=10,s=!1){let n=null,r=0,l=t.proxy.$parent;for(;!n&&l&&l.components&&++r<i;)l.components&&l.components[o]&&(n=l.components[o]),l=l.$parent;for(r=0,l=t.proxy.$parent;!n&&l&&l.$options&&++r<i;){const a=l;a.$options&&a.$options.components&&a.$options.components[o]?n=a.$options.components[o]:a[o]&&(n=a[o]),l=l.$parent}for(r=0,l=t.proxy.$parent;!n&&l&&++r<i;){if(l.exposed){const a=l;a.exposed&&a.exposed[o]?n=a.exposed[o]:a[o]&&(n=a[o])}l=l.$parent}return n||E.options&&E.options.components&&E.options.components[o]&&(n=E.options.components[o]),!n&&!s?(z(114,{component:o}),null):n}}var gR=Object.defineProperty,pR=(e,t,o)=>t in e?gR(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,So=(e,t,o)=>pR(e,typeof t!="symbol"?t+"":t,o);class fR extends Vv{constructor(t,o){super(),So(this,"parent"),So(this,"provides"),this.parent=t,this.provides=o}createWrapper(t){const o=this;class i extends CR{init(r){super.init(r)}hasMethod(r){return s.getFrameworkComponentInstance()[r]}callMethod(r,l){var a,d;const c=this.getFrameworkComponentInstance(),u=s.getFrameworkComponentInstance();if(u[r])return u[r].apply(c,l);{const h=((a=c.$.exposed)==null?void 0:a[r])||((d=c.exposed)==null?void 0:d[r])||c.$.setupState[r];return h==null?void 0:h.apply(c,l)}}addMethod(r,l){s[r]=l}processMethod(r,l){return r==="refresh"&&(this.getFrameworkComponentInstance().params=l[0]),this.hasMethod(r)?this.callMethod(r,l):r==="refresh"}createComponent(r){return o.createComponent(t,r)}}const s=new i;return s}createComponent(t,o){return vo.createAndMountComponent(t,o,this.parent,this.provides)}createMethodProxy(t,o,i){return function(){return t.hasMethod(o)?t.callMethod(o,arguments):(i&&k(233,{methodName:o}),null)}}destroy(){this.parent=null}}class CR{constructor(){So(this,"componentInstance"),So(this,"element"),So(this,"unmount")}getGui(){return this.element}destroy(){this.getFrameworkComponentInstance()&&typeof this.getFrameworkComponentInstance().destroy=="function"&&this.getFrameworkComponentInstance().destroy(),this.unmount()}getFrameworkComponentInstance(){return this.componentInstance}init(t){const{componentInstance:o,element:i,destroy:s}=this.createComponent(t);this.componentInstance=o,this.unmount=s,this.element=i}}var mR=Object.defineProperty,wR=(e,t,o)=>t in e?mR(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,vR=(e,t,o)=>wR(e,t+"",o);class SR extends Fl{constructor(t){super("vue"),vR(this,"parent"),this.parent=t}frameworkComponent(t,o){let i=vo.searchForComponentInstance(this.parent,t,10,!0)?t:null;if(!i&&o&&o[t]){const s=o[t];i=vo.searchForComponentInstance(this.parent,s,10,!0)?s:null}return i}isFrameworkComponent(t){return typeof t=="object"}}function bR(){return{gridOptions:()=>({}),modules:()=>[],statusBar:void 0,sideBar:void 0,suppressContextMenu:void 0,preventDefaultOnContextMenu:void 0,allowContextMenuWithControlKey:void 0,columnMenu:void 0,suppressMenuHide:void 0,enableBrowserTooltips:void 0,tooltipTrigger:void 0,tooltipShowDelay:void 0,tooltipHideDelay:void 0,tooltipMouseTrack:void 0,tooltipShowMode:void 0,tooltipInteraction:void 0,popupParent:void 0,copyHeadersToClipboard:void 0,copyGroupHeadersToClipboard:void 0,clipboardDelimiter:void 0,suppressCopyRowsToClipboard:void 0,suppressCopySingleCellRanges:void 0,suppressLastEmptyLineOnPaste:void 0,suppressClipboardPaste:void 0,suppressClipboardApi:void 0,suppressCutToClipboard:void 0,columnDefs:void 0,defaultColDef:void 0,defaultColGroupDef:void 0,columnTypes:void 0,dataTypeDefinitions:void 0,maintainColumnOrder:void 0,enableStrictPivotColumnOrder:void 0,suppressFieldDotNotation:void 0,headerHeight:void 0,groupHeaderHeight:void 0,floatingFiltersHeight:void 0,pivotHeaderHeight:void 0,pivotGroupHeaderHeight:void 0,hidePaddedHeaderRows:void 0,allowDragFromColumnsToolPanel:void 0,suppressMovableColumns:void 0,suppressColumnMoveAnimation:void 0,suppressMoveWhenColumnDragging:void 0,suppressDragLeaveHidesColumns:void 0,suppressGroupChangesColumnVisibility:void 0,suppressMakeColumnVisibleAfterUnGroup:void 0,suppressRowGroupHidesColumns:void 0,colResizeDefault:void 0,suppressAutoSize:void 0,autoSizePadding:void 0,skipHeaderOnAutoSize:void 0,autoSizeStrategy:void 0,components:void 0,editType:void 0,suppressStartEditOnTab:void 0,getFullRowEditValidationErrors:void 0,invalidEditValueMode:void 0,singleClickEdit:void 0,suppressClickEdit:void 0,readOnlyEdit:void 0,stopEditingWhenCellsLoseFocus:void 0,enterNavigatesVertically:void 0,enterNavigatesVerticallyAfterEdit:void 0,enableCellEditingOnBackspace:void 0,undoRedoCellEditing:void 0,undoRedoCellEditingLimit:void 0,defaultCsvExportParams:void 0,suppressCsvExport:void 0,defaultExcelExportParams:void 0,suppressExcelExport:void 0,excelStyles:void 0,findSearchValue:void 0,findOptions:void 0,quickFilterText:void 0,cacheQuickFilter:void 0,includeHiddenColumnsInQuickFilter:void 0,quickFilterParser:void 0,quickFilterMatcher:void 0,applyQuickFilterBeforePivotOrAgg:void 0,excludeChildrenWhenTreeDataFiltering:void 0,enableAdvancedFilter:void 0,alwaysPassFilter:void 0,includeHiddenColumnsInAdvancedFilter:void 0,advancedFilterParent:void 0,advancedFilterBuilderParams:void 0,advancedFilterParams:void 0,suppressAdvancedFilterEval:void 0,suppressSetFilterByDefault:void 0,enableFilterHandlers:void 0,filterHandlers:void 0,loadingCellRenderer:void 0,loadingCellRendererParams:void 0,loadingCellRendererSelector:void 0,localeText:void 0,masterDetail:void 0,keepDetailRows:void 0,keepDetailRowsCount:void 0,detailCellRenderer:void 0,detailCellRendererParams:void 0,detailRowHeight:void 0,detailRowAutoHeight:void 0,context:void 0,alignedGrids:void 0,tabIndex:void 0,rowBuffer:void 0,valueCache:void 0,valueCacheNeverExpires:void 0,enableCellExpressions:void 0,suppressTouch:void 0,suppressFocusAfterRefresh:void 0,suppressBrowserResizeObserver:void 0,suppressPropertyNamesCheck:void 0,suppressChangeDetection:void 0,debug:void 0,loading:void 0,overlayLoadingTemplate:void 0,loadingOverlayComponent:void 0,loadingOverlayComponentParams:void 0,suppressLoadingOverlay:void 0,overlayNoRowsTemplate:void 0,noRowsOverlayComponent:void 0,noRowsOverlayComponentParams:void 0,suppressNoRowsOverlay:void 0,pagination:void 0,paginationPageSize:void 0,paginationPageSizeSelector:void 0,paginationAutoPageSize:void 0,paginateChildRows:void 0,suppressPaginationPanel:void 0,pivotMode:void 0,pivotPanelShow:void 0,pivotMaxGeneratedColumns:void 0,pivotDefaultExpanded:void 0,pivotColumnGroupTotals:void 0,pivotRowTotals:void 0,pivotSuppressAutoColumn:void 0,suppressExpandablePivotGroups:void 0,functionsReadOnly:void 0,aggFuncs:void 0,suppressAggFuncInHeader:void 0,alwaysAggregateAtRootLevel:void 0,aggregateOnlyChangedColumns:void 0,suppressAggFilteredOnly:void 0,removePivotHeaderRowWhenSingleValueColumn:void 0,animateRows:void 0,cellFlashDuration:void 0,cellFadeDuration:void 0,allowShowChangeAfterFilter:void 0,domLayout:void 0,ensureDomOrder:void 0,enableCellSpan:void 0,enableRtl:void 0,suppressColumnVirtualisation:void 0,suppressMaxRenderedRowRestriction:void 0,suppressRowVirtualisation:void 0,rowDragManaged:void 0,rowDragInsertDelay:void 0,suppressRowDrag:void 0,suppressMoveWhenRowDragging:void 0,rowDragEntireRow:void 0,rowDragMultiRow:void 0,rowDragText:void 0,dragAndDropImageComponent:void 0,dragAndDropImageComponentParams:void 0,fullWidthCellRenderer:void 0,fullWidthCellRendererParams:void 0,embedFullWidthRows:void 0,groupDisplayType:void 0,groupDefaultExpanded:void 0,autoGroupColumnDef:void 0,groupMaintainOrder:void 0,groupSelectsChildren:void 0,groupLockGroupColumns:void 0,groupAggFiltering:void 0,groupTotalRow:void 0,grandTotalRow:void 0,suppressStickyTotalRow:void 0,groupSuppressBlankHeader:void 0,groupSelectsFiltered:void 0,showOpenedGroup:void 0,groupHideParentOfSingleChild:void 0,groupRemoveSingleChildren:void 0,groupRemoveLowestSingleChildren:void 0,groupHideOpenParents:void 0,groupAllowUnbalanced:void 0,rowGroupPanelShow:void 0,groupRowRenderer:void 0,groupRowRendererParams:void 0,treeData:void 0,treeDataChildrenField:void 0,treeDataParentIdField:void 0,rowGroupPanelSuppressSort:void 0,suppressGroupRowsSticky:void 0,groupHierarchyConfig:void 0,pinnedTopRowData:void 0,pinnedBottomRowData:void 0,enableRowPinning:void 0,isRowPinnable:void 0,isRowPinned:void 0,rowModelType:void 0,rowData:void 0,asyncTransactionWaitMillis:void 0,suppressModelUpdateAfterUpdateTransaction:void 0,datasource:void 0,cacheOverflowSize:void 0,infiniteInitialRowCount:void 0,serverSideInitialRowCount:void 0,suppressServerSideFullWidthLoadingRow:void 0,cacheBlockSize:void 0,maxBlocksInCache:void 0,maxConcurrentDatasourceRequests:void 0,blockLoadDebounceMillis:void 0,purgeClosedRowNodes:void 0,serverSideDatasource:void 0,serverSideSortAllLevels:void 0,serverSideEnableClientSideSort:void 0,serverSideOnlyRefreshFilteredGroups:void 0,serverSidePivotResultFieldSeparator:void 0,viewportDatasource:void 0,viewportRowModelPageSize:void 0,viewportRowModelBufferSize:void 0,alwaysShowHorizontalScroll:void 0,alwaysShowVerticalScroll:void 0,debounceVerticalScrollbar:void 0,suppressHorizontalScroll:void 0,suppressScrollOnNewData:void 0,suppressScrollWhenPopupsAreOpen:void 0,suppressAnimationFrame:void 0,suppressMiddleClickScrolls:void 0,suppressPreventDefaultOnMouseWheel:void 0,scrollbarWidth:void 0,rowSelection:void 0,cellSelection:void 0,rowMultiSelectWithClick:void 0,suppressRowDeselection:void 0,suppressRowClickSelection:void 0,suppressCellFocus:void 0,suppressHeaderFocus:void 0,selectionColumnDef:void 0,rowNumbers:void 0,suppressMultiRangeSelection:void 0,enableCellTextSelection:void 0,enableRangeSelection:void 0,enableRangeHandle:void 0,enableFillHandle:void 0,fillHandleDirection:void 0,suppressClearOnFillReduction:void 0,sortingOrder:void 0,accentedSort:void 0,unSortIcon:void 0,suppressMultiSort:void 0,alwaysMultiSort:void 0,multiSortKey:void 0,suppressMaintainUnsortedOrder:void 0,icons:void 0,rowHeight:void 0,rowStyle:void 0,rowClass:void 0,rowClassRules:void 0,suppressRowHoverHighlight:void 0,suppressRowTransform:void 0,columnHoverHighlight:void 0,gridId:void 0,deltaSort:void 0,treeDataDisplayType:void 0,enableGroupEdit:void 0,initialState:void 0,theme:void 0,loadThemeGoogleFonts:void 0,themeCssLayer:void 0,styleNonce:void 0,themeStyleContainer:void 0,getContextMenuItems:void 0,getMainMenuItems:void 0,postProcessPopup:void 0,processUnpinnedColumns:void 0,processCellForClipboard:void 0,processHeaderForClipboard:void 0,processGroupHeaderForClipboard:void 0,processCellFromClipboard:void 0,sendToClipboard:void 0,processDataFromClipboard:void 0,isExternalFilterPresent:void 0,doesExternalFilterPass:void 0,getChartToolbarItems:void 0,createChartContainer:void 0,focusGridInnerElement:void 0,navigateToNextHeader:void 0,tabToNextHeader:void 0,navigateToNextCell:void 0,tabToNextCell:void 0,getLocaleText:void 0,getDocument:void 0,paginationNumberFormatter:void 0,getGroupRowAgg:void 0,isGroupOpenByDefault:void 0,ssrmExpandAllAffectsAllRows:void 0,initialGroupOrderComparator:void 0,processPivotResultColDef:void 0,processPivotResultColGroupDef:void 0,getDataPath:void 0,getChildCount:void 0,getServerSideGroupLevelParams:void 0,isServerSideGroupOpenByDefault:void 0,isApplyServerSideTransaction:void 0,isServerSideGroup:void 0,getServerSideGroupKey:void 0,getBusinessKeyForNode:void 0,getRowId:void 0,resetRowDataOnUpdate:void 0,processRowPostCreate:void 0,isRowSelectable:void 0,isRowMaster:void 0,fillOperation:void 0,postSortRows:void 0,getRowStyle:void 0,getRowClass:void 0,getRowHeight:void 0,isFullWidthRow:void 0,isRowValidDropPosition:void 0,"onColumn-everything-changed":void 0,"onNew-columns-loaded":void 0,"onColumn-pivot-mode-changed":void 0,"onPivot-max-columns-exceeded":void 0,"onColumn-row-group-changed":void 0,"onExpand-or-collapse-all":void 0,"onColumn-pivot-changed":void 0,"onGrid-columns-changed":void 0,"onColumn-value-changed":void 0,"onColumn-moved":void 0,"onColumn-visible":void 0,"onColumn-pinned":void 0,"onColumn-group-opened":void 0,"onColumn-resized":void 0,"onDisplayed-columns-changed":void 0,"onVirtual-columns-changed":void 0,"onColumn-header-mouse-over":void 0,"onColumn-header-mouse-leave":void 0,"onColumn-header-clicked":void 0,"onColumn-header-context-menu":void 0,"onAsync-transactions-flushed":void 0,"onRow-group-opened":void 0,"onRow-data-updated":void 0,"onPinned-row-data-changed":void 0,"onPinned-rows-changed":void 0,"onRange-selection-changed":void 0,"onCell-selection-changed":void 0,"onChart-created":void 0,"onChart-range-selection-changed":void 0,"onChart-options-changed":void 0,"onChart-destroyed":void 0,"onTool-panel-visible-changed":void 0,"onTool-panel-size-changed":void 0,"onModel-updated":void 0,"onCut-start":void 0,"onCut-end":void 0,"onPaste-start":void 0,"onPaste-end":void 0,"onFill-start":void 0,"onFill-end":void 0,"onCell-selection-delete-start":void 0,"onCell-selection-delete-end":void 0,"onRange-delete-start":void 0,"onRange-delete-end":void 0,"onUndo-started":void 0,"onUndo-ended":void 0,"onRedo-started":void 0,"onRedo-ended":void 0,"onCell-clicked":void 0,"onCell-double-clicked":void 0,"onCell-mouse-down":void 0,"onCell-context-menu":void 0,"onCell-value-changed":void 0,"onCell-edit-request":void 0,"onRow-value-changed":void 0,"onHeader-focused":void 0,"onCell-focused":void 0,"onRow-selected":void 0,"onSelection-changed":void 0,"onTooltip-show":void 0,"onTooltip-hide":void 0,"onCell-key-down":void 0,"onCell-mouse-over":void 0,"onCell-mouse-out":void 0,"onFilter-changed":void 0,"onFilter-modified":void 0,"onFilter-ui-changed":void 0,"onFilter-opened":void 0,"onFloating-filter-ui-changed":void 0,"onAdvanced-filter-builder-visible-changed":void 0,"onSort-changed":void 0,"onVirtual-row-removed":void 0,"onRow-clicked":void 0,"onRow-double-clicked":void 0,"onGrid-ready":void 0,"onGrid-pre-destroyed":void 0,"onGrid-size-changed":void 0,"onViewport-changed":void 0,"onFirst-data-rendered":void 0,"onDrag-started":void 0,"onDrag-stopped":void 0,"onDrag-cancelled":void 0,"onRow-editing-started":void 0,"onRow-editing-stopped":void 0,"onCell-editing-started":void 0,"onCell-editing-stopped":void 0,"onBody-scroll":void 0,"onBody-scroll-end":void 0,"onPagination-changed":void 0,"onComponent-state-changed":void 0,"onStore-refreshed":void 0,"onState-updated":void 0,"onColumn-menu-visible-changed":void 0,"onContext-menu-visible-changed":void 0,"onRow-drag-enter":void 0,"onRow-drag-move":void 0,"onRow-drag-leave":void 0,"onRow-drag-end":void 0,"onRow-drag-cancel":void 0,"onFind-changed":void 0,"onRow-resize-started":void 0,"onRow-resize-ended":void 0,"onColumns-reset":void 0,"onBulk-editing-started":void 0,"onBulk-editing-stopped":void 0,"onBatch-editing-started":void 0,"onBatch-editing-stopped":void 0}}const yR=(e,t)=>{let o;return()=>{const i=function(){e()};window.clearTimeout(o),o=window.setTimeout(i,t)}};function RR(e){return e&&e.constructor&&e.constructor.toString().substring(0,5)==="class"}function bo(e){const t=new WeakSet,o=i=>{if(RR(i))return E.toRaw(i);if(E.isRef(i)||E.isReactive(i)||E.isProxy(i)){const s=E.toRaw(i);return s===i?i:o(s)}if(i!==null&&typeof i=="object"){if(t.has(i))return i;t.add(i)}return Array.isArray(i)?i.map(s=>o(s)):i};return o(e)}const ER=E.defineComponent({__name:"AgGridVue",props:E.mergeDefaults({gridOptions:null,modules:null,modelValue:null,statusBar:null,sideBar:{type:[String,Boolean]},suppressContextMenu:{type:Boolean},preventDefaultOnContextMenu:{type:Boolean},allowContextMenuWithControlKey:{type:Boolean},columnMenu:null,suppressMenuHide:{type:Boolean},enableBrowserTooltips:{type:Boolean},tooltipTrigger:null,tooltipShowDelay:null,tooltipHideDelay:null,tooltipMouseTrack:{type:Boolean},tooltipShowMode:null,tooltipInteraction:{type:Boolean},popupParent:null,copyHeadersToClipboard:{type:Boolean},copyGroupHeadersToClipboard:{type:Boolean},clipboardDelimiter:null,suppressCopyRowsToClipboard:{type:Boolean},suppressCopySingleCellRanges:{type:Boolean},suppressLastEmptyLineOnPaste:{type:Boolean},suppressClipboardPaste:{type:Boolean},suppressClipboardApi:{type:Boolean},suppressCutToClipboard:{type:Boolean},columnDefs:null,defaultColDef:null,defaultColGroupDef:null,columnTypes:null,dataTypeDefinitions:null,maintainColumnOrder:{type:Boolean},enableStrictPivotColumnOrder:{type:Boolean},suppressFieldDotNotation:{type:Boolean},headerHeight:null,groupHeaderHeight:null,floatingFiltersHeight:null,pivotHeaderHeight:null,pivotGroupHeaderHeight:null,hidePaddedHeaderRows:{type:Boolean},allowDragFromColumnsToolPanel:{type:Boolean},suppressMovableColumns:{type:Boolean},suppressColumnMoveAnimation:{type:Boolean},suppressMoveWhenColumnDragging:{type:Boolean},suppressDragLeaveHidesColumns:{type:Boolean},suppressGroupChangesColumnVisibility:{type:[Boolean,String]},suppressMakeColumnVisibleAfterUnGroup:{type:Boolean},suppressRowGroupHidesColumns:{type:Boolean},colResizeDefault:null,suppressAutoSize:{type:Boolean},autoSizePadding:null,skipHeaderOnAutoSize:{type:Boolean},autoSizeStrategy:null,components:null,editType:null,suppressStartEditOnTab:{type:Boolean},getFullRowEditValidationErrors:null,invalidEditValueMode:null,singleClickEdit:{type:Boolean},suppressClickEdit:{type:Boolean},readOnlyEdit:{type:Boolean},stopEditingWhenCellsLoseFocus:{type:Boolean},enterNavigatesVertically:{type:Boolean},enterNavigatesVerticallyAfterEdit:{type:Boolean},enableCellEditingOnBackspace:{type:Boolean},undoRedoCellEditing:{type:Boolean},undoRedoCellEditingLimit:null,defaultCsvExportParams:null,suppressCsvExport:{type:Boolean},defaultExcelExportParams:null,suppressExcelExport:{type:Boolean},excelStyles:null,findSearchValue:null,findOptions:null,quickFilterText:null,cacheQuickFilter:{type:Boolean},includeHiddenColumnsInQuickFilter:{type:Boolean},quickFilterParser:{type:Function},quickFilterMatcher:{type:Function},applyQuickFilterBeforePivotOrAgg:{type:Boolean},excludeChildrenWhenTreeDataFiltering:{type:Boolean},enableAdvancedFilter:{type:Boolean},alwaysPassFilter:{type:Function},includeHiddenColumnsInAdvancedFilter:{type:Boolean},advancedFilterParent:null,advancedFilterBuilderParams:null,advancedFilterParams:null,suppressAdvancedFilterEval:{type:Boolean},suppressSetFilterByDefault:{type:Boolean},enableFilterHandlers:{type:Boolean},filterHandlers:null,loadingCellRenderer:null,loadingCellRendererParams:null,loadingCellRendererSelector:null,localeText:null,masterDetail:{type:Boolean},keepDetailRows:{type:Boolean},keepDetailRowsCount:null,detailCellRenderer:null,detailCellRendererParams:null,detailRowHeight:null,detailRowAutoHeight:{type:Boolean},context:null,alignedGrids:{type:Function},tabIndex:null,rowBuffer:null,valueCache:{type:Boolean},valueCacheNeverExpires:{type:Boolean},enableCellExpressions:{type:Boolean},suppressTouch:{type:Boolean},suppressFocusAfterRefresh:{type:Boolean},suppressBrowserResizeObserver:{type:Boolean},suppressPropertyNamesCheck:{type:Boolean},suppressChangeDetection:{type:Boolean},debug:{type:Boolean},loading:{type:Boolean},overlayLoadingTemplate:null,loadingOverlayComponent:null,loadingOverlayComponentParams:null,suppressLoadingOverlay:{type:Boolean},overlayNoRowsTemplate:null,noRowsOverlayComponent:null,noRowsOverlayComponentParams:null,suppressNoRowsOverlay:{type:Boolean},pagination:{type:Boolean},paginationPageSize:null,paginationPageSizeSelector:{type:Boolean},paginationAutoPageSize:{type:Boolean},paginateChildRows:{type:Boolean},suppressPaginationPanel:{type:Boolean},pivotMode:{type:Boolean},pivotPanelShow:null,pivotMaxGeneratedColumns:null,pivotDefaultExpanded:null,pivotColumnGroupTotals:null,pivotRowTotals:null,pivotSuppressAutoColumn:{type:Boolean},suppressExpandablePivotGroups:{type:Boolean},functionsReadOnly:{type:Boolean},aggFuncs:null,suppressAggFuncInHeader:{type:Boolean},alwaysAggregateAtRootLevel:{type:Boolean},aggregateOnlyChangedColumns:{type:Boolean},suppressAggFilteredOnly:{type:Boolean},removePivotHeaderRowWhenSingleValueColumn:{type:Boolean},animateRows:{type:Boolean},cellFlashDuration:null,cellFadeDuration:null,allowShowChangeAfterFilter:{type:Boolean},domLayout:null,ensureDomOrder:{type:Boolean},enableCellSpan:{type:Boolean},enableRtl:{type:Boolean},suppressColumnVirtualisation:{type:Boolean},suppressMaxRenderedRowRestriction:{type:Boolean},suppressRowVirtualisation:{type:Boolean},rowDragManaged:{type:Boolean},rowDragInsertDelay:null,suppressRowDrag:{type:Boolean},suppressMoveWhenRowDragging:{type:Boolean},rowDragEntireRow:{type:Boolean},rowDragMultiRow:{type:Boolean},rowDragText:{type:Function},dragAndDropImageComponent:null,dragAndDropImageComponentParams:null,fullWidthCellRenderer:null,fullWidthCellRendererParams:null,embedFullWidthRows:{type:Boolean},groupDisplayType:null,groupDefaultExpanded:null,autoGroupColumnDef:null,groupMaintainOrder:{type:Boolean},groupSelectsChildren:{type:Boolean},groupLockGroupColumns:null,groupAggFiltering:{type:Boolean},groupTotalRow:null,grandTotalRow:null,suppressStickyTotalRow:{type:[Boolean,String]},groupSuppressBlankHeader:{type:Boolean},groupSelectsFiltered:{type:Boolean},showOpenedGroup:{type:Boolean},groupHideParentOfSingleChild:{type:[Boolean,String]},groupRemoveSingleChildren:{type:Boolean},groupRemoveLowestSingleChildren:{type:Boolean},groupHideOpenParents:{type:Boolean},groupAllowUnbalanced:{type:Boolean},rowGroupPanelShow:null,groupRowRenderer:null,groupRowRendererParams:null,treeData:{type:Boolean},treeDataChildrenField:null,treeDataParentIdField:null,rowGroupPanelSuppressSort:{type:Boolean},suppressGroupRowsSticky:{type:Boolean},groupHierarchyConfig:null,pinnedTopRowData:null,pinnedBottomRowData:null,enableRowPinning:{type:[Boolean,String]},isRowPinnable:null,isRowPinned:null,rowModelType:null,rowData:null,asyncTransactionWaitMillis:null,suppressModelUpdateAfterUpdateTransaction:{type:Boolean},datasource:null,cacheOverflowSize:null,infiniteInitialRowCount:null,serverSideInitialRowCount:null,suppressServerSideFullWidthLoadingRow:{type:Boolean},cacheBlockSize:null,maxBlocksInCache:null,maxConcurrentDatasourceRequests:null,blockLoadDebounceMillis:null,purgeClosedRowNodes:{type:Boolean},serverSideDatasource:null,serverSideSortAllLevels:{type:Boolean},serverSideEnableClientSideSort:{type:Boolean},serverSideOnlyRefreshFilteredGroups:{type:Boolean},serverSidePivotResultFieldSeparator:null,viewportDatasource:null,viewportRowModelPageSize:null,viewportRowModelBufferSize:null,alwaysShowHorizontalScroll:{type:Boolean},alwaysShowVerticalScroll:{type:Boolean},debounceVerticalScrollbar:{type:Boolean},suppressHorizontalScroll:{type:Boolean},suppressScrollOnNewData:{type:Boolean},suppressScrollWhenPopupsAreOpen:{type:Boolean},suppressAnimationFrame:{type:Boolean},suppressMiddleClickScrolls:{type:Boolean},suppressPreventDefaultOnMouseWheel:{type:Boolean},scrollbarWidth:null,rowSelection:null,cellSelection:{type:Boolean},rowMultiSelectWithClick:{type:Boolean},suppressRowDeselection:{type:Boolean},suppressRowClickSelection:{type:Boolean},suppressCellFocus:{type:Boolean},suppressHeaderFocus:{type:Boolean},selectionColumnDef:null,rowNumbers:{type:Boolean},suppressMultiRangeSelection:{type:Boolean},enableCellTextSelection:{type:Boolean},enableRangeSelection:{type:Boolean},enableRangeHandle:{type:Boolean},enableFillHandle:{type:Boolean},fillHandleDirection:null,suppressClearOnFillReduction:{type:Boolean},sortingOrder:null,accentedSort:{type:Boolean},unSortIcon:{type:Boolean},suppressMultiSort:{type:Boolean},alwaysMultiSort:{type:Boolean},multiSortKey:null,suppressMaintainUnsortedOrder:{type:Boolean},icons:null,rowHeight:null,rowStyle:null,rowClass:null,rowClassRules:null,suppressRowHoverHighlight:{type:Boolean},suppressRowTransform:{type:Boolean},columnHoverHighlight:{type:Boolean},gridId:null,deltaSort:{type:Boolean},treeDataDisplayType:null,enableGroupEdit:{type:Boolean},initialState:null,theme:null,loadThemeGoogleFonts:{type:Boolean},themeCssLayer:null,styleNonce:null,themeStyleContainer:null,getContextMenuItems:null,getMainMenuItems:null,postProcessPopup:{type:Function},processUnpinnedColumns:{type:Function},processCellForClipboard:{type:Function},processHeaderForClipboard:{type:Function},processGroupHeaderForClipboard:{type:Function},processCellFromClipboard:{type:Function},sendToClipboard:{type:Function},processDataFromClipboard:{type:Function},isExternalFilterPresent:{type:Function},doesExternalFilterPass:{type:Function},getChartToolbarItems:null,createChartContainer:{type:Function},focusGridInnerElement:{type:Function},navigateToNextHeader:{type:Function},tabToNextHeader:{type:Function},navigateToNextCell:{type:Function},tabToNextCell:{type:Function},getLocaleText:{type:Function},getDocument:{type:Function},paginationNumberFormatter:{type:Function},getGroupRowAgg:{type:Function},isGroupOpenByDefault:{type:Function},ssrmExpandAllAffectsAllRows:{type:Boolean},initialGroupOrderComparator:{type:Function},processPivotResultColDef:{type:Function},processPivotResultColGroupDef:{type:Function},getDataPath:null,getChildCount:{type:Function},getServerSideGroupLevelParams:{type:Function},isServerSideGroupOpenByDefault:{type:Function},isApplyServerSideTransaction:null,isServerSideGroup:null,getServerSideGroupKey:null,getBusinessKeyForNode:{type:Function},getRowId:null,resetRowDataOnUpdate:{type:Boolean},processRowPostCreate:{type:Function},isRowSelectable:null,isRowMaster:null,fillOperation:{type:Function},postSortRows:{type:Function},getRowStyle:{type:Function},getRowClass:{type:Function},getRowHeight:{type:Function},isFullWidthRow:{type:Function},isRowValidDropPosition:null,"onTool-panel-visible-changed":null,"onTool-panel-size-changed":null,"onColumn-menu-visible-changed":null,"onContext-menu-visible-changed":null,"onCut-start":null,"onCut-end":null,"onPaste-start":null,"onPaste-end":null,"onColumn-visible":null,"onColumn-pinned":null,"onColumn-resized":null,"onColumn-moved":null,"onColumn-value-changed":null,"onColumn-pivot-mode-changed":null,"onColumn-pivot-changed":null,"onColumn-group-opened":null,"onNew-columns-loaded":null,"onGrid-columns-changed":null,"onDisplayed-columns-changed":null,"onVirtual-columns-changed":null,"onColumn-everything-changed":null,"onColumns-reset":null,"onColumn-header-mouse-over":null,"onColumn-header-mouse-leave":null,"onColumn-header-clicked":null,"onColumn-header-context-menu":null,"onComponent-state-changed":null,"onCell-value-changed":null,"onCell-edit-request":null,"onRow-value-changed":null,"onCell-editing-started":null,"onCell-editing-stopped":null,"onRow-editing-started":null,"onRow-editing-stopped":null,"onBulk-editing-started":null,"onBulk-editing-stopped":null,"onBatch-editing-started":null,"onBatch-editing-stopped":null,"onUndo-started":null,"onUndo-ended":null,"onRedo-started":null,"onRedo-ended":null,"onCell-selection-delete-start":null,"onCell-selection-delete-end":null,"onRange-delete-start":null,"onRange-delete-end":null,"onFill-start":null,"onFill-end":null,"onFilter-opened":null,"onFilter-changed":null,"onFilter-modified":null,"onFilter-ui-changed":null,"onFloating-filter-ui-changed":null,"onAdvanced-filter-builder-visible-changed":null,"onFind-changed":null,"onChart-created":null,"onChart-range-selection-changed":null,"onChart-options-changed":null,"onChart-destroyed":null,"onCell-key-down":null,"onGrid-ready":null,"onGrid-pre-destroyed":null,"onFirst-data-rendered":null,"onGrid-size-changed":null,"onModel-updated":null,"onVirtual-row-removed":null,"onViewport-changed":null,"onBody-scroll":null,"onBody-scroll-end":null,"onDrag-started":null,"onDrag-stopped":null,"onDrag-cancelled":null,"onState-updated":null,"onPagination-changed":null,"onRow-drag-enter":null,"onRow-drag-move":null,"onRow-drag-leave":null,"onRow-drag-end":null,"onRow-drag-cancel":null,"onRow-resize-started":null,"onRow-resize-ended":null,"onColumn-row-group-changed":null,"onRow-group-opened":null,"onExpand-or-collapse-all":null,"onPivot-max-columns-exceeded":null,"onPinned-row-data-changed":null,"onPinned-rows-changed":null,"onRow-data-updated":null,"onAsync-transactions-flushed":null,"onStore-refreshed":null,"onHeader-focused":null,"onCell-clicked":null,"onCell-double-clicked":null,"onCell-focused":null,"onCell-mouse-over":null,"onCell-mouse-out":null,"onCell-mouse-down":null,"onRow-clicked":null,"onRow-double-clicked":null,"onRow-selected":null,"onSelection-changed":null,"onCell-context-menu":null,"onRange-selection-changed":null,"onCell-selection-changed":null,"onTooltip-show":null,"onTooltip-hide":null,"onSort-changed":null},bR()),emits:["update:modelValue"],setup(e,{expose:t,emit:o}){const i=e,s=E.ref(),n=E.ref(void 0),r=E.ref(!1),l=E.ref(!1),a=E.ref(!1),d=E.ref({}),c=E.ref(null),u=E.toRefs(i);on().filter(P=>P!="gridOptions").forEach(P=>{E.watch(()=>u[P],(T,F)=>{(P==="rowData"&&!f.value||P!=="rowData")&&I(P,T),f.value=!1},{deep:!0})});const h=new Set(["rowDataUpdated","cellValueChanged","rowValueChanged"]),g=E.ref(i.modelValue),p=E.ref(!1),f=E.ref(!1);E.watch(()=>i.modelValue,P=>{g.value=P}),E.watch(g,(P,T)=>{r.value&&(f.value||(p.value=!0,I("rowData",bo(P),bo(T))),f.value=!1)},{deep:!0});const C=yR(()=>{f.value=!0,o("update:modelValue",b())},10),m=E.getCurrentInstance(),w=P=>{var T;a.value&&h.has(P)&&(T=m==null?void 0:m.proxy)!=null&&T.$props["onUpdate:modelValue"]&&C()},S=()=>{var P;(i.rowData||(P=i.gridOptions)!=null&&P.rowData)&&g.value&&k(232)},v=()=>{var P;return g.value||i.rowData||((P=i.gridOptions)==null?void 0:P.rowData)},b=()=>{const P=[];return n==null||n.value.forEachLeafNode(T=>{P.push(T.data)}),P},D=P=>T=>{if(l.value)return;T==="gridReady"&&(a.value=!0);const F=ho.has(T);F&&!P||!F&&P||h.has(T)&&(p.value||w(T),p.value=!1)},I=(P,T,F)=>{if(r.value){let G=T.value||T;P==="rowData"&&G!=null&&(G=bo(G)),d.value[P]=G,c.value==null&&(c.value=window.setTimeout(()=>{c.value=null,Ec(d.value,n.value),d.value={}},0))}},B=()=>Object.create(E.getCurrentInstance().proxy._provided);return E.onMounted(()=>{Et(Ha,void 0,!0);const P=new fR(E.getCurrentInstance(),B()),T={globalListener:D(),globalSyncListener:D(!0),frameworkOverrides:new SR(E.getCurrentInstance()),providedBeanInstances:{frameworkCompWrapper:P},modules:i.modules},F=E.markRaw(Rc(bo(i.gridOptions),i,[...on(),...Object.values(Si)])),G=v();G!==void 0&&(F.rowData=bo(G)),n.value=Mv(s.value,F,T),r.value=!0}),E.onUnmounted(()=>{var P;r.value&&((P=n==null?void 0:n.value)==null||P.destroy(),l.value=!0)}),t({api:n}),{__sfc:!0,props:i,rootRef:s,api:n,gridCreated:r,isDestroyed:l,gridReadyFired:a,batchChanges:d,batchTimeout:c,propsAsRefs:u,ROW_DATA_EVENTS:h,rowDataModel:g,rowDataUpdating:p,emittingRowData:f,emits:o,emitRowModel:C,thisInstance:m,updateModelIfUsed:w,checkForBindingConflicts:S,getRowDataBasedOnBindings:v,getRowData:b,globalEventListenerFactory:D,processChanges:I,getProvides:B}}});function se(e,t,o,i,s,n,r,l){var a=typeof e=="function"?e.options:e;return t&&(a.render=t,a.staticRenderFns=o,a._compiled=!0),n&&(a._scopeId="data-v-"+n),{exports:e,options:a}}var xR=function(){var t=this,o=t._self._c;return t._self._setupProxy,o("div",{ref:"rootRef"})},DR=[],FR=se(ER,xR,DR,!1,null,"60566900");const ud=FR.exports,PR=e=>{const t=E.getCurrentInstance(),o={id:e.id,rowIdMapper:e.rowIdMapper,columns:e.columns,rowData:e.rowData,pageSize:e.pageSize,gridOptions:e.gridOptions,footerHeight:e.footerHeight,editable:e.editable,onRowChange:e.onRowChange,onError:i=>Id.Message.error(i),instanceCtx:{getInstanceName:i=>{var s,n;return(n=(s=i==null?void 0:i.$options)==null?void 0:s.name)!=null?n:null},getParentInstance:i=>{var s;return(s=i==null?void 0:i.$parent)!=null?s:null}},currentInstance:t==null?void 0:t.proxy};return Ja(o)},hd={functional:!0,name:"VNodeRender",props:["params"],render(e,t){var o;const i=t.props.params;return i.render?i.render(i):e("span",(o=i.valueFormatted)!=null?o:i.value)}},TR={functional:!0,props:{params:{type:Object,required:!0}},render(e,t){const o=e("",{});return o.text=`${t.props.params.column.getColId()} holder`,o}},IR=E.defineComponent({name:"CellRenderer"}),AR=E.defineComponent({...IR,props:{params:null},setup(e){const t=e,o=E.computed(()=>{const r=t.params.data,l=r.isEditing()&&t.params.editeRender?t.params.editeRender:t.params.render,a={...t.params,render:l};if(r instanceof Ot){const d=r.getCell(a.column);if(!d)return a.render=t.params.render,a;const{hostArray:c,hostObject:u}=r.getHostObject(a);r.getActualRow().isCellEditing(t.params.node.id,t.params.column)||(a.render=t.params.render),a.hostObject=u,a.hostArrayHook=g=>{var p;let f=c;((p=a.colDef)==null?void 0:p.cellDataType)==="array"&&!c&&(f=[],O.set(r.getData(),d.path,f)),f&&(g(f),r.buildSpan(),a.context.reload(),a.api.redrawRows({rowNodes:a.api.getRenderedNodes().filter(C=>r.match(C))}))}}return a}),i=E.computed(()=>{const r=t.params.data,l=r.getActualRow();if(l.isEditing()&&t.params.editeRender){const d=l.getSourceRow().getData(),c=r.getCell(t.params.column);return c?!O.isEqual(O.get(d,c.getReadPath()),t.params.value):!1}return!1}),s=E.computed(()=>t.params.data.isTransient()),n=E.computed(()=>t.params.data.getRowSpan(t.params.column));return{__sfc:!0,props:t,eventParams:o,isChange:i,isDraft:s,rowSpan:n,VNodeRenderer:hd,CellHolder:TR}}});var MR=function(){var t=this,o=t._self._c,i=t._self._setupProxy;return i.rowSpan>0?o("div",{staticClass:"custom-cell"},[i.isChange?o("span",{staticClass:"value-change"}):t._e(),i.isDraft?o("span",{staticClass:"value-change transient"}):t._e(),o(i.VNodeRenderer,{attrs:{params:i.eventParams}})],1):o(i.CellHolder,{attrs:{params:i.eventParams}})},kR=[],LR=se(AR,MR,kR,!1,null,null);const GR=LR.exports,HR=E.defineComponent({name:"GridToolbar"}),OR=E.defineComponent({...HR,setup(e){return{__sfc:!0}}});var BR=function(){var t=this,o=t._self._c;return t._self._setupProxy,o("div",{staticClass:"grid-toolbar"},[o("div",{staticClass:"grid-toolbar-left"},[t._t("default")],2),o("div",{staticClass:"grid-toolbar-right"},[t._t("system")],2)])},VR=[],NR=se(OR,BR,VR,!1,null,"f12c2536");const gd=NR.exports,_R=E.defineComponent({__name:"FooterCellRender",props:{params:null},setup(e){return{__sfc:!0,props:e,VNodeRenderer:hd}}});var WR=function(){var t=this,o=t._self._c,i=t._self._setupProxy;return o("div",{staticClass:"custom-cell"},[o(i.VNodeRenderer,{attrs:{params:t.params}})],1)},zR=[],$R=se(_R,WR,zR,!1,null,"4998e205");const UR=$R.exports,KR=E.defineComponent({name:"SearchItem",props:{search:{type:Object,required:!0},teleported:{type:Boolean}},setup(e){return()=>e.search.render(e.search)}});var jR=se(KR,null,null,!1,null,"e1931525");const Cn=jR.exports,qR=E.defineComponent({name:"ClSearch"}),YR=E.defineComponent({...qR,props:{search:null,teleported:{type:Boolean},searchRemote:{type:Function},id:null,confirmButtonText:{default:"搜索"},resetButtonText:{default:"重置"},autoResetSearch:{type:Boolean,default:!0},enable:{type:Boolean,default:!0}},setup(e){const t=e,o=E.ref(),i=E.ref(),s=()=>{t.search.forEach(c=>{c.value=O.cloneDeep(c.initValue)})},n=E.computed(()=>`${t.id}_SEARCH`),r=()=>{localStorage.setItem(n.value,JSON.stringify(t.search.filter(c=>!c.transient).map(c=>({field:c.field,value:c.value}))))},l=()=>{var c;const u=JSON.parse((c=localStorage.getItem(n.value))!=null?c:"[]");t.search.forEach(h=>{const g=u.find(p=>h.field===p.field);h.transient||!g?h.value=O.cloneDeep(h.initValue):h.value=g.value})},a=async()=>{i.value=!0;try{await t.searchRemote(),t.id&&r()}catch(c){console.error(c)}finally{i.value=!1}},d=()=>{if(s(),t.autoResetSearch)return a()};return E.onBeforeMount(()=>{l()}),{__sfc:!0,searchForm:o,props:t,loading:i,reset:s,persistenceKey:n,doPersistence:r,restore:l,doSearch:a,handleReset:d,SearchItem:Cn}}});var ZR=function(){var t=this,o=t._self._c,i=t._self._setupProxy;return o("el-form",{ref:"searchForm"},[o("div",{staticClass:"search-container"},[t._l(t.search,function(s){return o("el-form-item",{key:s.field},[o(i.SearchItem,{attrs:{search:s}})],1)}),o("el-form-item",[o("el-button",{staticStyle:{width:"80px"},attrs:{disabled:!t.enable||i.loading,type:"primary"},on:{click:i.doSearch}},[t._v(" "+t._s(t.confirmButtonText)+" ")]),o("el-button",{staticStyle:{width:"80px"},attrs:{disabled:i.loading},on:{click:i.handleReset}},[t._v(t._s(t.resetButtonText))])],1),t._t("default")],2)])},QR=[],XR=se(YR,ZR,QR,!1,null,"962588ec");const JR=XR.exports,pd=(e,t,o)=>{const i=E.ref(),s=E.ref(!1),n=E.computed(()=>{if(Array.isArray(o)){const h=o.map(g=>{var p;return(p=g.width)!=null?p:-1}).filter(g=>g);if(h.length>0)return Math.max(...h)}else return o==null?void 0:o.width}),r=h=>O.isEmpty(h)&&!O.isNumber(h),l=E.computed(()=>Array.isArray(o)?o.some(h=>!r(h.value)):!r(o==null?void 0:o.value)),a=E.computed(()=>[s.value?"is-loading":""]),d=E.computed(()=>l.value?"var(--el-color-primary)":void 0);return{visible:i,loading:s,width:n,loadingClass:a,hasCondition:l,hasConditionColor:d,doSearch:async()=>{s.value=!0;try{await e()}catch(h){console.error(h)}finally{s.value=!1,i.value=!1}},reset:()=>{Array.isArray(o)?o.forEach(h=>{h.value=O.cloneDeep(h.initValue)}):o.value=O.cloneDeep(o==null?void 0:o.initValue)}}},eE=E.defineComponent({name:"ClPopoverSearch"}),tE=E.defineComponent({...eE,props:{search:null,teleported:{type:Boolean},searchRemote:{type:Function},field:null},setup(e){const t=e,o=E.computed(()=>{var u;return(u=t.search)==null?void 0:u.find(h=>h.field===t.field)}),{visible:i,loading:s,width:n,loadingClass:r,hasConditionColor:l,doSearch:a,reset:d}=pd(t.searchRemote,t,o.value),c=E.computed(()=>{var u;return(u=n.value)!=null?u:300});return{__sfc:!0,props:t,search:o,visible:i,loading:s,width:n,loadingClass:r,hasConditionColor:l,doSearch:a,reset:d,popoverWidth:c,SearchItem:Cn}}});var oE=function(){var t=this,o=t._self._c,i=t._self._setupProxy;return i.search?o("el-popover",{attrs:{width:i.popoverWidth,trigger:"click"},scopedSlots:t._u([{key:"reference",fn:function(){return[o("div",[t._t("default",function(){return[o("i",{class:["el-icon-search",i.loadingClass],attrs:{color:i.hasConditionColor}})]},null,{loading:i.loading})],2)]},proxy:!0}],null,!0),model:{value:i.visible,callback:function(s){i.visible=s},expression:"visible"}},[o("div",{on:{keyup:function(s){return!s.type.indexOf("key")&&t._k(s.keyCode,"enter",13,s.key,"Enter")?null:i.doSearch.apply(null,arguments)}}},[o("el-form",{on:{submit:function(s){s.preventDefault(),s.stopPropagation()}}},[o("el-form-item",[o(i.SearchItem,t._b({attrs:{search:i.search,teleported:!1}},"SearchItem",{style:"width: 100%"},!1))],1)],1),o("el-space",{staticStyle:{width:"100%","justify-content":"end"},attrs:{size:"small"}},[o("el-button",{attrs:{size:"small"},on:{click:i.reset}},[t._v(" 重置 ")]),o("el-button",{attrs:{loading:i.loading,size:"small",type:"primary"},on:{click:i.doSearch}},[t._v("搜索")])],1)],1)]):t._e()},iE=[],sE=se(tE,oE,iE,!1,null,null);const nE=sE.exports,rE=E.defineComponent({name:"ClDrawerSearch"}),lE=E.defineComponent({...rE,props:{search:null,teleported:{type:Boolean},searchRemote:{type:Function},attached:{type:Boolean}},setup(e){const t=e,{visible:o,loading:i,loadingClass:s,hasConditionColor:n,doSearch:r,reset:l}=pd(t.searchRemote,t,t.search);return E.onMounted(()=>{t.attached||l()}),{__sfc:!0,props:t,visible:o,loading:i,loadingClass:s,hasConditionColor:n,doSearch:r,reset:l,SearchItem:Cn}}});var aE=function(){var t=this,o=t._self._c,i=t._self._setupProxy;return o("div",[o("div",{on:{click:function(s){i.visible=!0}}},[t._t("default",function(){return[o("el-button",{attrs:{disabled:i.loading,circle:""}},[o("i",{class:["el-icon-search",i.loadingClass],attrs:{color:i.hasConditionColor}},[o("Search")],1)])]},null,{loading:i.loading})],2),o("el-drawer",{attrs:{"append-to-body":"","with-header":!1},on:{keyup:function(s){return!s.type.indexOf("key")&&t._k(s.keyCode,"enter",13,s.key,"Enter")?null:i.doSearch.apply(null,arguments)}},model:{value:i.visible,callback:function(s){i.visible=s},expression:"visible"}},[o("el-form",{staticStyle:{height:"calc(100% - 100px)"},attrs:{"label-position":"right","label-suffix":":","label-width":"auto"}},[o("el-scrollbar",t._l(t.search,function(s){return o("el-form-item",{key:s.field,attrs:{label:s.label}},[o(i.SearchItem,t._b({attrs:{search:s,teleported:""}},"SearchItem",{style:"width: 100%"},!1))],1)}),1)],1),o("el-divider"),o("el-space",{staticStyle:{width:"100%","justify-content":"end"},attrs:{size:"small"}},[o("el-button",{on:{click:i.reset}},[t._v(" 重置 ")]),o("el-button",{attrs:{loading:i.loading,type:"primary"},on:{click:i.doSearch}},[t._v("搜索")])],1)],1)],1)},dE=[],cE=se(lE,aE,dE,!1,null,null);const fd=cE.exports;var uE=Object.defineProperty,hE=(e,t,o)=>t in e?uE(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,gE=(e,t,o)=>hE(e,t+"",o);class mn{constructor(t){gE(this,"record"),this.record=t}static from(t){const o=t.filter(i=>{var s;return(s=i.value)!=null?s:!1}).reduce((i,s)=>({...i,...O.isPlainObject(s.value)?s.value:{[s.field]:s.value}}),{});return new mn(o)}transform(t,o){const i=this.record[t],s=o(i);return delete this.record[t],this.record={...this.record,...s},this}toCondition(t){return{...this.record,...t??{}}}}const pE=E.defineComponent({name:"SearchButton"}),fE=E.defineComponent({...pE,props:{searches:null},setup(e){const t=e,o=E.inject(ct);return{__sfc:!0,props:t,context:o,ClDrawerSearch:fd}}});var CE=function(){var t=this,o=t._self._c,i=t._self._setupProxy;return o(i.ClDrawerSearch,{attrs:{search:t.searches,"search-remote":i.context.refresh}})},mE=[],wE=se(fE,CE,mE,!1,null,"45be5dfc");const Cd=wE.exports,vE=E.defineComponent({name:"RefreshButton"}),SE=E.defineComponent({...vE,setup(e){const t=E.ref(!1),{refresh:o}=E.inject(ct);return{__sfc:!0,loading:t,refresh:o,handlerRefreshClick:async()=>{if(!t.value){t.value=!0;try{await o()}catch(s){console.error(s)}finally{t.value=!1}}}}}});var bE=function(){var t=this,o=t._self._c,i=t._self._setupProxy;return o("el-button",{attrs:{disabled:i.loading,circle:""},on:{click:i.handlerRefreshClick}},[o("i",{class:["el-icon-refresh",i.loading?"is-loading":""]})])},yE=[],RE=se(SE,bE,yE,!1,null,"0eaeb325");const md=RE.exports;function wd(e,t){const o=t(e);return EE(e)&&(o.children=e.children.map(i=>wd(i,t))),o}const EE=e=>!!e.children,xE=()=>{const e=E.inject(ct),t=E.ref(),o=E.ref([]),i=E.ref([]),s=E.ref(),n=C=>{const m=e.api.value.getAllDisplayedColumns(),w=m.find(S=>S.getColId()===C);return w?m.indexOf(w):-1},r=C=>{if(C.field)return C.field;if(C.groupId)return C.groupId;throw new Error(`${C.headerName} field or groupId not found`)},l=()=>{var C,m;o.value=(m=(C=e.api.value.getColumnDefs())==null?void 0:C.map(w=>wd(w,S=>{var v,b;return{id:r(S),label:S.headerName,pined:(b=(v=e.api.value.getColumnGroup(r(S)))==null?void 0:v.getPinned())!=null?b:S.pinned}})))!=null?m:[],i.value=e.api.value.getAllDisplayedColumns().map(w=>w.getColId())},a=(C,m,w)=>w!=="inner"&&C.parent===m.parent,d=()=>{s.value=t.value.getCheckedKeys()},c=C=>{if(C instanceof We)return[C];const m=C.getChildren();return m?[...m.flatMap(w=>c(w))]:[]},u=(C,m,w)=>{const S=n(m[0].colId),v=n(w.colId);return C==="after"?v-m.length+1:v>S?v-m.length:v};return{treeData:o,defaultCheckedKeys:i,treeRef:t,refreshTreeData:l,checkColumnAllowDrop:a,onColumnDragStart:d,onColumnDragFinish:(C,m,w)=>{if(m&&C&&C.key!==m.key){const S=e.api.value.getColumnGroup(C.key),v=e.api.value.getColumn(C.key),b=e.api.value.getColumn(m.key),D=c(S??v);if(b){const I=u(w,D,b);e.api.value.moveColumns(D,I)}}t.value.setCheckedKeys(s.value),s.value=void 0},onColumnVisibleChange:(C,m)=>{e.api.value.setColumnsVisible([C.id],m)},onColumnPinedChange:(C,m)=>{var w;const S=e.api.value.getColumnGroup(C),v=S?S.getDisplayedLeafColumns().map(D=>D.getColId()):[C],b=S?S.getPinned():(w=e.api.value.getColumn(C))==null?void 0:w.getPinned();e.api.value.setColumnsPinned(v,b===m?null:m),l()},columnAutoResize:()=>{e.api.value.sizeColumnsToFit()}}},DE=E.defineComponent({name:"SettingButton"}),FE=E.defineComponent({...DE,setup(e){const{treeRef:t,treeData:o,defaultCheckedKeys:i,refreshTreeData:s,checkColumnAllowDrop:n,onColumnDragStart:r,onColumnDragFinish:l,onColumnVisibleChange:a,onColumnPinedChange:d,columnAutoResize:c}=xE(),u=E.ref(!1),h=E.inject(ct);return{__sfc:!0,treeRef:t,treeData:o,defaultCheckedKeys:i,refreshTreeData:s,checkColumnAllowDrop:n,onColumnDragStart:r,onColumnDragFinish:l,onColumnVisibleChange:a,onColumnPinedChange:d,columnAutoResize:c,visible:u,gridContext:h,handleResetGridState:()=>{h.resetGridState(),s()}}}});var PE=function(){var t=this,o=t._self._c,i=t._self._setupProxy;return o("div",[o("el-button",{attrs:{circle:""},on:{click:function(s){i.visible=!0}}},[o("i",{staticClass:"el-icon-setting"})]),o("el-drawer",{staticClass:"setting-drawer",attrs:{visible:i.visible,size:280,"modal-append-to-body":!0,"append-to-body":!0},on:{"update:visible":function(s){i.visible=s},open:i.refreshTreeData},scopedSlots:t._u([{key:"title",fn:function(){return[o("div",{staticStyle:{display:"flex","align-items":"center"}},[o("span",[t._v("表格显示设置")])])]},proxy:!0}])},[o("el-button",{staticStyle:{"margin-left":"10px"},attrs:{type:"primary",plain:"",size:"mini"},on:{click:i.handleResetGridState}},[t._v("重置")]),o("el-button",{attrs:{type:"primary",plain:"",size:"mini"},on:{click:i.columnAutoResize}},[t._v("自适应")]),i.treeData.length>0?o("el-tree",{ref:"treeRef",staticClass:"cl-grid-column-settings cl-scrollbar",attrs:{"allow-drop":i.checkColumnAllowDrop,"node-key":"id","default-checked-keys":i.defaultCheckedKeys,"show-checkbox":"",data:i.treeData,"default-expand-all":"",draggable:"","highlight-current":""},on:{"node-drag-start":i.onColumnDragStart,"node-drag-end":i.onColumnDragFinish,"check-change":i.onColumnVisibleChange},scopedSlots:t._u([{key:"default",fn:function({node:s}){return[o("div",{class:{"pined-row":s.data.pined==="left"||s.data.pined==="right"},staticStyle:{display:"flex","justify-content":"space-between",width:"100%"}},[o("span",{class:[s.data.pined==="left"||s.data.pined==="right"?"pined-active":""]},[t._v(" "+t._s(s.label)+" ")]),o("span",[o("i",{class:["el-icon-arrow-left",s.data.pined==="left"?"pined-active":""],on:{click:function(n){return n.stopPropagation(),(()=>i.onColumnPinedChange(s.key,"left")).apply(null,arguments)}}}),o("i",{class:["el-icon-arrow-right",s.data.pined==="right"?"pined-active":""],on:{click:function(n){return n.stopPropagation(),(()=>i.onColumnPinedChange(s.key,"right")).apply(null,arguments)}}})])])]}}],null,!1,2278526884)}):t._e()],1)],1)},TE=[],IE=se(FE,PE,TE,!1,null,"522bf761");const vd=IE.exports,AE={functional:!0,name:"HeaderVNodeRender",props:["params"],render(e,t){const o=t.props.params;return o.headerRender?o.headerRender(o):e("span",o.displayName)}},ME=E.defineComponent({name:"HeaderRenderer"}),kE=E.defineComponent({...ME,props:{params:null},setup(e){const t=e,o=E.ref(),i=E.ref(-1),s=E.inject(ct),n=()=>{o.value=t.params.column.getSort(),i.value=Na(t.params.api,t.params.column.getColId())},r=async(l,a)=>{try{o.value=l,t.params.setSort(l,a.shiftKey),await s.refresh()}catch{}};return E.onMounted(()=>{t.params.api.addEventListener("sortChanged",n),n()}),E.onUnmounted(()=>{t.params.api.removeEventListener("sortChanged",n)}),{__sfc:!0,props:t,sorted:o,sortIndex:i,context:s,handleSortChange:n,handleSortClick:r,HeaderVNodeRender:AE}}});var LE=function(){var t=this,o=t._self._c,i=t._self._setupProxy;return o("div",[t.params.headerRender?o(i.HeaderVNodeRender,{attrs:{params:t.params}}):o("span",[t._v(t._s(t.params.displayName))]),t.params.enableSorting?[i.sortIndex>=0?o("span",{staticStyle:{"line-height":"12px"}},[t._v(" "+t._s(i.sortIndex+1))]):t._e(),i.sorted==="asc"?o("i",{staticClass:"el-icon-sort-up",staticStyle:{cursor:"pointer"},attrs:{color:"var(--el-color-primary)"},on:{click:s=>i.handleSortClick(null,s)}}):i.sorted==="desc"?o("i",{staticClass:"el-icon-sort-down",staticStyle:{cursor:"pointer"},attrs:{color:"var(--el-color-danger, #F56C6C)"},on:{click:s=>i.handleSortClick("asc",s)}}):o("i",{staticClass:"el-icon-sort",staticStyle:{cursor:"pointer"},on:{click:s=>i.handleSortClick("desc",s)}})]:t._e()],2)},GE=[],HE=se(kE,LE,GE,!1,null,"126699e0");const OE=HE.exports,BE=E.defineComponent({name:"GridEmptyDataOverlay"}),VE=E.defineComponent({...BE,setup(e){return{__sfc:!0}}});var NE=function(){var t=this,o=t._self._c;return t._self._setupProxy,o("el-empty",{attrs:{description:"没有数据了","image-size":75}})},_E=[],WE=se(VE,NE,_E,!1,null,"05fc87c0");const zE=WE.exports,$E=E.defineComponent({name:"GridLoadingOverlay"}),UE=E.defineComponent({...$E,setup(e){return{__sfc:!0}}});var KE=function(){var t=this,o=t._self._c;return t._self._setupProxy,o("div",{directives:[{name:"loading",rawName:"v-loading",value:!0,expression:"true"}],staticClass:"table-loading",staticStyle:{height:"100%",width:"100%"},attrs:{"element-loading-text":"加载中","element-loading-background":"rgba(0, 0, 0, 0.1)"}})},jE=[],qE=se(UE,KE,jE,!1,null,"c60c1386");const YE=qE.exports,ZE=(e,t,o)=>ed({columns:e.columns,gridOptions:e.gridOptions,footerHeight:e.footerHeight},t,o),QE=()=>({theme:E.ref("ag-theme-alpine")}),XE=E.defineComponent({name:"Grid",components:{SearchButton:Cd,RefreshButton:md,SettingButton:vd,CellRenderer:GR,GridEmptyDataOverlay:zE,HeaderRenderer:OE,GridLoadingOverlay:YE,AgGridVue:ud,GridToolbar:gd,FooterCellRender:UR}}),JE=E.defineComponent({...XE,props:{id:null,rowIdMapper:{type:Function},columns:null,rowData:{type:Function},pageSize:{default:50},footerHeight:null,tools:{default:()=>["search","refresh","setting"]},searches:null,gridOptions:null,editable:null,onRowChange:{type:Function}},setup(e,{expose:t}){const o=e,i=E.ref(),s=E.ref(),{theme:n}=QE(),{gridOptions:r,dataCache:l,gridStyles:a,gridApi:d,gridElRef:c,reload:u,insertRows:h,existRow:g,getRows:p,refresh:f,resetGridState:C}=PR(o),{footerGridOptions:m,setFooterData:w,footerStyles:S}=ZE(o,s,a);return E.provide(ct,{refresh:f,resetGridState:C,api:d}),E.watch(()=>r.value,()=>{d.value&&d.value.updateGridOptions(O.omit(r.value,["scrollbarWidth","getRowId","suppressRowTransform","defaultColGroupDef"]))},{deep:!0}),t({setFooterData:w,updateGridOptions:v=>{d.value.updateGridOptions(v)},reload:u,refresh:f,getRows:p,createRow(v,b=!1){const D=l.value.createRow(v);return b?new Fi(D,o.rowIdMapper,!0):D},existRow:g,insertRows:h,startEditing:()=>{const v=l.value.getRows().filter(b=>!b.isEditing());O.isEmpty(v)||(v.forEach(b=>b.startEditing()),u(),d.value.redrawRows())},stopEditing:()=>{const v=l.value.getRows().filter(b=>b.isEditing());O.isEmpty(v)||(v.forEach(b=>b.stopEditing()),u(),d.value.redrawRows())}}),{__sfc:!0,props:o,bottomRef:i,gridRef:s,theme:n,options:r,dataCache:l,gridStyles:a,gridApi:d,gridElRef:c,reload:u,insertRows:h,existRow:g,getRows:p,refresh:f,resetGridState:C,footerGridOptions:m,setFooterData:w,footerStyles:S,AgGridVue:ud,GridToolbar:gd,SearchButton:Cd,RefreshButton:md,SettingButton:vd}}});var e0=function(){var t=this,o=t._self._c,i=t._self._setupProxy;return o("div",{ref:"gridElRef",staticClass:"cl-grid"},[o(i.GridToolbar,{scopedSlots:t._u([{key:"system",fn:function(){return[t.searches&&t.tools.includes("search")?o(i.SearchButton,{attrs:{searches:t.searches}}):t._e(),t.tools.includes("refresh")?o(i.RefreshButton):t._e(),t.tools.includes("setting")?o(i.SettingButton):t._e()]},proxy:!0}])},[t._t("toolbar")],2),o("div",{staticClass:"cl-grid-container"},[o(i.AgGridVue,{ref:"gridRef",staticClass:"cl-scrollbar flex-1",class:[i.theme],style:i.gridStyles,attrs:{tooltipShowDelay:500,"loading-overlay-component":"GridLoadingOverlay","no-rows-overlay-component":"GridEmptyDataOverlay","grid-options":{...i.options,suppressHorizontalScroll:!!t.footerHeight,alignedGrids:()=>[i.bottomRef].filter(s=>s)}}}),t.footerHeight?o(i.AgGridVue,{ref:"bottomRef",staticClass:"cl-scrollbar footer-grid",class:[i.theme],style:i.footerStyles,attrs:{"grid-options":i.footerGridOptions}}):t._e()],1)],1)},t0=[],o0=se(JE,e0,t0,!1,null,null);const i0=o0.exports;var s0=Object.defineProperty,n0=(e,t,o)=>t in e?s0(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,yo=(e,t,o)=>n0(e,typeof t!="symbol"?t+"":t,o);const r0=e=>new Sd(e);class Sd{constructor(t){yo(this,"colDef"),yo(this,"agGridCellRenderParams"),this.colDef=t,this.agGridCellRenderParams={}}cellRender(t){return this.agGridCellRenderParams.render=t,this}footerRender(t){return this.agGridCellRenderParams.footerRender=t,this}editeRender(t){return this.agGridCellRenderParams.editeRender=t,this}headerRender(t){return this.agGridCellRenderParams.headerRender=t,this}build(){return this.agGridCellRenderParams.headerRender&&(this.colDef.headerComponentParams=this.agGridCellRenderParams.headerRender),this.colDef.cellRendererParams=this.agGridCellRenderParams,this.colDef}}const l0=e=>new bd(e);class bd{constructor(t){yo(this,"colDefs"),yo(this,"rendersMap",new Map),yo(this,"headerRendersMap",new Map),this.colDefs=t,this.eachColDef(t,o=>{this.rendersMap.set(o.field,{}),this.headerRendersMap.set(o.field,{})})}eachColDef(t,o){for(const i of t)ja.isGroupColDef(i)?this.eachColDef(i.children,o):o(i)}getRenderParams(t){if(!this.rendersMap.has(t))throw new Error(`${t} 不存在配置项`);return this.rendersMap.get(t)}getHeaderRenderParams(t){if(!this.headerRendersMap.has(t))throw new Error(`${t} 不存在配置项`);return this.headerRendersMap.get(t)}render(t,o){return this.getRenderParams(t).render=o,this}footerRender(t,o){return this.getRenderParams(t).footerRender=o,this}editRender(t,o){return this.getRenderParams(t).editeRender=o,this}headerRender(t,o){return this.getHeaderRenderParams(t).headerRender=o,this}alwaysRender(t){this.eachColDef(this.colDefs,o=>{o.field===t&&(o.enableCellChangeFlash=!1,o.tooltipValueGetter=()=>"",o.valueGetter=i=>i.data.getSignature())})}build(){return this.eachColDef(this.colDefs,t=>{const o=this.headerRendersMap.get(t.field);o!=null&&o.headerRender&&(t.headerComponentParams=o),t.cellRendererParams=this.rendersMap.get(t.field)}),this.colDefs}}const a0=(e,t)=>({model:{value:O.get(e,t),callback:o=>{O.set(e,t,o)}}});Ld({theme:"legacy"});const d0={install:()=>{$u.registerModules([qS,YS,ZS,QS,JS,XS,yb,rb,iS,_l,Ha,Mb,Nb,Ub,Xb,ld,Cv,ay,py,dy,Sy,vv,Cb,xa,by,Ry,ef,ny,cd,dd,eb])}};L.ActualRow=mo,L.CLEAN_AG_GRID_OPTIONS=Ua,L.CellEditableRow=Pi,L.CellRenderAdapter=Sd,L.CellValue=Bt,L.ClDrawerSearch=fd,L.ClPopoverSearch=nE,L.ClSearch=JR,L.ClientSideRowModelApiModule=cd,L.ClientSideRowModelModule=dd,L.ColumnRendersBuilder=bd,L.EditableRow=Fi,L.GRID_CONTEXT=ct,L.Grid=i0,L.GridDataCache=$a,L.GridDataSource=_a,L.GridUtils=ja,L.ID_FIRST_DEEP=Ka,L.ID_SPLITTER=Ti,L.ProjectionRow=Ot,L.RowSelectionModule=ld,L.RowSpans=hn,L.Searches=mn,L.ServerGetRowsParamsRequest=Vt,L.SharedRowSelectionModule=rd,L.SpanMatrix=za,L.VueGridPlugin=d0,L._getColumnSortIndexe=Na,L._getSortedColumns=un,L._getSortedColumnsIndexes=Va,L.buildProxyOptions=Ya,L.defaultColDefCellClassRules=Qa,L.isActualRow=Fy,L.isGridRow=Dy,L.mergeRowClass=gn,L.selectionColumnCellClassRules=Za,L.useFooter=ed,L.useGrid=Ja,L.useGridScroll=Xa,L.useGridState=qa,L.vModel=a0,L.withColumnRenderBuilder=l0,L.withRender=r0,Object.defineProperty(L,Symbol.toStringTag,{value:"Module"})});
|