@scvzerng/element-ui-ag-grid-vue2 0.0.37 → 0.0.38

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:()=>Sl("IntegratedChartsModule"),258:()=>Sl("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})=>vl({reasonOrId:`AG Grid '${e}' component: ${t}`,moduleName:Ot[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 ${vt}/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:()=>ml(),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:wl,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 Mv(e,t){const o=Av[e];if(!o)return[`Missing error text for error id ${e}!`];const i=o(t),n=`
56
56
  See ${Jn(e,t)}`;return Array.isArray(i)?i.concat(n):[i,n]}var kv={1:"Charting Aggregation",2:"pivotResultFields",3:"setTooltip"},bl=new WeakMap,yl=new WeakMap;function Lv(e,t,o){if(!t)return j(11),{};const i=o;let s;if(!(i!=null&&i.setThemeOnGridDiv)){const r=ee({tag:"div"});r.style.height="100%",e.appendChild(r),e=r,s=()=>e.remove()}return new Hv().create(e,t,r=>{const a=new $p(e);r.createBean(a)},void 0,o,s)}var Gv=1,Hv=class{create(e,t,o,i,s,n){const r=Hi.applyGlobalGridOptions(t),a=r.gridId??String(Gv++),l=this.getRegisteredModules(s,a,r.rowModelType),d=this.createBeansList(r.rowModelType,l,a),c=this.createProvidedBeans(e,r,s);if(!d)return;const h={providedBeanInstances:c,beanClasses:d,gridId:a,beanInitComparator:Fp,beanDestroyComparator:Pp,derivedBeans:[xp],destroyCallback:()=>{yl.delete(p),bl.delete(e),n==null||n()}},g=new Yu(h);this.registerModuleFeatures(g,l),o(g),g.getBean("syncSvc").start(),i==null||i(g);const p=g.getBean("gridApi");return bl.set(e,p),yl.set(p,e),p}getRegisteredModules(e,t,o){var i;return Ft(Rv,void 0,!0),(i=e==null?void 0:e.modules)==null||i.forEach(s=>Ft(s,t)),Wu(t,Rl(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(a=>{i==null||i.addFunction(a,n[a])})})}createProvidedBeans(e,t,o){let i=o?o.frameworkOverrides:null;q(i)&&(i=new Ta);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=Rl(e),n=i[s];if(!n){Qt(201,{rowModelType:s},`Unknown rowModelType ${s}.`);return}if(!$u()){Qt(272,void 0,ml());return}if(!e){const a=Object.entries(i).filter(([l,d])=>hs(d,o,l));if(a.length==1){const[l,d]=a[0];if(l!==s){const c={moduleName:d,rowModelType:l};Qt(275,c,wl(c));return}}}if(!hs(n,o,s)){Qt(200,{reasonOrId:`rowModelType = '${s}'`,moduleName:n,gridScoped:gs(),gridId:o,rowModelType:s},`Missing module ${n}Module for rowModelType ${s}.`);return}const r=new Set;return t.forEach(a=>{var l;return(l=a.beans)==null?void 0:l.forEach(d=>r.add(d))}),Array.from(r)}};function Rl(e){return e??"clientSide"}function Ae(e){const t=e.rowModel;return t.getType()==="clientSide"?t:void 0}function Ov(e){const t=e.rowModel;return t.getType()==="serverSide"?t:void 0}var Bv=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 a=0;for(;!(a>=n.length||r.indexOf("${variable}")===-1);)r=r.replace("${variable}",n[a++])}return r??s}}};function Vv(e,t=!1){const o=[],i=[],s=[],n=[],r=[],a=[],l=[],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:T,flex:G}=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"?a:r).push(g),D&&l.push(g),(G!=null||T)&&d.push({colId:g,flex:G??void 0,width:T})}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||a.length?{leftColIds:r,rightColIds:a}:void 0,columnVisibility:l.length?{hiddenColIds:l}:void 0,columnSizing:d.length?{columnSizingModel:d}:void 0,columnOrder:c.length?{orderedColIds:c}:void 0}}function Nv(e){const t=[];return e.forEach(({groupId:o,open:i})=>{i&&t.push(o)}),t.length?{openColumnGroupIds:t}:void 0}var _v=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&&M(49,{methodName:t}),null)}}},Wv={tag:"div",cls:"ag-tooltip"},zv=class extends Gs{constructor(){super(Wv)}init(e){const{value:t}=e,o=this.getGui();o.textContent=Rt(t);const i=e.location.replace(/([a-z])([A-Z0-9])/g,"$1-$2").toLowerCase();o.classList.add(`ag-${i}-tooltip`)}},$v=1e3,Uv=1e3,El=100,xl,Ei=!1,Kv=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()),!Ct()&&(Ei?this.showTooltipTimeoutId=window.setTimeout(()=>{this.prepareToShowTooltip(e)},El):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||Ei)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()-xl<$v}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,a,l,d,c,u,h;const e=this.getTooltipValue(),t=this.tooltipCtrl;if(!A(e)||t.shouldDisplayTooltip&&!t.shouldDisplayTooltip()){this.setToDoNothing();return}const o=(r=t.getRowNode)==null?void 0:r.call(t),i=_(this.gos,{location:((a=t.getLocation)==null?void 0:a.call(t))??"UNKNOWN",colDef:(l=t.getColDef)==null?void 0:l.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=Ou(this.userCompFactory,i);n==null||n.newAgStackInstance().then(s)}hideTooltip(e){!e&&this.isInteractingWithTooltip||(this.tooltipComp&&(this.destroyTooltipComp(),xl=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 a=()=>this.setToDoNothing();[this.onBodyScrollEventCallback,this.onColumnMovedEventCallback]=this.addManagedEventListeners({bodyScroll:a,columnMoved:a})}this.interactionEnabled&&([this.tooltipMouseEnterListener,this.tooltipMouseLeaveListener]=this.addManagedElementListeners(i,{mouseenter:this.onTooltipMouseEnter.bind(this),mouseleave:this.onTooltipMouseLeave.bind(this)}),[this.onDocumentKeyDownCallback]=this.addManagedElementListeners(te(this.beans),{keydown:a=>{i.contains(a==null?void 0:a.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=Q(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?Uv: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(){Ei=!0,this.interactiveTooltipTimeoutId=window.setTimeout(()=>{this.unlockService(),this.setToDoNothing()},El)}unlockService(){Ei=!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 un(e){return e.get("tooltipShowMode")==="whenTruncated"}var jv=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 Kv(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()}},qv={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},ue="clientSide",re="serverSide",Bt="infinite",Yv={onGroupExpandedOrCollapsed:[ue],refreshClientSideRowModel:[ue],isRowDataEmpty:[ue],forEachLeafNode:[ue],forEachNodeAfterFilter:[ue],forEachNodeAfterFilterAndSort:[ue],resetRowHeights:[ue],applyTransaction:[ue],applyTransactionAsync:[ue],flushAsyncTransactions:[ue],getBestCostNodeSelection:[ue],getServerSideSelectionState:[re],setServerSideSelectionState:[re],applyServerSideTransaction:[re],applyServerSideTransactionAsync:[re],applyServerSideRowData:[re],retryServerSideLoads:[re],flushServerSideAsyncTransactions:[re],refreshServerSide:[re],getServerSideGroupLevelState:[re],refreshInfiniteCache:[Bt],purgeInfiniteCache:[Bt],getInfiniteRowCount:[Bt],isLastRowIndexKnown:[Bt,re],expandAll:[ue,re],collapseAll:[ue,re],onRowHeightChanged:[ue,re],setRowCount:[Bt,re],getCacheBlockState:[Bt,re]},Zv={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 Qv(e,t,o){const i=Zv[e];if(i){const{version:n,new:r,old:a,message:l}=i,d=a??e;return(...c)=>{const u=r?`Please use ${r} instead. `:"";return Zt(`Since ${n} api.${d} is deprecated. ${u}${l??""}`),t.apply(t,c)}}const s=Yv[e];return s?(...n)=>{const r=o.rowModel.getType();if(!s.includes(r)){wt(`api.${e} can only be called when gridOptions.rowModelType is ${s.join(" or ")}`);return}return t.apply(t,n)}:t}var Xv={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"},Jv={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},eS={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"},tS=new Set(["colorPicker","smallUp","checkboxChecked","checkboxIndeterminate","checkboxUnchecked","radioButtonOn","radioButtonOff","smallDown","smallLeft","smallRight"]),oS=class extends x{constructor(){super(...arguments),this.beanName="validation"}wireBeans(e){this.gridOptions=e.gridOptions,dc(this)}warnOnInitialPropertyUpdate(e,t){e==="api"&&qv[t]&&M(22,{key:t})}processGridOptions(e){this.processOptions(e,ww())}validateApiFunction(e,t){return Qv(e,t,this.beans)}missingUserComponent(e,t,o,i){const s=Ot[t];s?this.gos.assertModuleRegistered(s,`AG Grid '${e}' component: ${t}`):M(101,{propertyName:e,componentName:t,agGridDefaults:o,jsComps:i})}missingDynamicBean(e){const t=Xv[e];return t?Ee(200,{...this.gos.getModuleErrorParams(),moduleName:t,reasonOrId:e}):void 0}checkRowEvents(e){sS.has(e)&&M(10,{eventType:e})}validateIcon(e){if(tS.has(e)&&M(43,{iconName:e}),Jv[e])return;const t=eS[e];if(t){j(200,{reasonOrId:`icon '${e}'`,moduleName:t,gridScoped:gs(),gridId:this.beans.context.getGridId(),rowModelType:this.gos.get("rowModelType"),additionalText:"Alternatively, use the CSS icon name directly."});return}M(134,{iconName:e})}isProvidedUserComp(e){return!!Ot[e]}validateColDef(e){this.processOptions(e,lw())}processOptions(e,t){const{validations:o,deprecations:i,allProperties:s,propertyExceptions:n,objectName:r,docsUrl:a}=t;s&&this.gridOptions.suppressPropertyNamesCheck!==!0&&this.checkProperties(e,[...n??[],...Object.keys(i)],s,r,a);const l=new Set;Object.keys(e).forEach(c=>{const u=i[c];if(u){const{message:w,version:S}=u;l.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){l.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)){l.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){l.add(w);return}}if(f){const w=f(e,this.gridOptions,this.beans);if(w){l.add(w);return}}}),l.size>0&&l.forEach(c=>{Zt(c)})}checkForRequiredDependencies(e,t,o){const s=Object.entries(t).filter(([n,r])=>{const a=o[n];return!r.required.includes(a)});return s.length===0?null:s.map(([n,r])=>`'${String(e)}' requires '${n}' to be one of [${r.required.map(a=>a===null?"null":a===void 0?"undefined":a).join(", ")}]. ${r.reason??""}`).join(`
57
57
  `)}checkProperties(e,t,o,i,s){const n=["__ob__","__v_skip","__metadata__"],r=iS(Object.getOwnPropertyNames(e),[...n,...t,...o],o),a=Object.keys(r);for(const l of a){const d=r[l];let c=`invalid ${i} property '${l}' 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.`),Zt(c)}if(a.length>0&&s){const l=this.beans.frameworkOverrides.getDocLink(s);Zt(`to see all the valid ${i} properties please check: ${l}`)}}getConsoleMessage(e,t){return Mv(e,t)}};function iS(e,t,o){const i={},s=e.filter(n=>!t.some(r=>r===n));return s.length>0&&s.forEach(n=>i[n]=dn({inputValue:n,allSuggestions:o}).values),i}var sS=new Set(["firstChildChanged","lastChildChanged","childIndexChanged"]),nS={moduleName:"Validation",version:L,beans:[oS]},xi=0,rS=200,aS=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(),a=this.getParentRect();this.setAlignedTo(t,o);let l=!1;const d=()=>{const c=this.keepXYWithinBounds(o,r.top-a.top,0),u=o.clientWidth>0?o.clientWidth:200;l||(o.style.minWidth=`${u}px`,l=!0);const g=a.right-a.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-a.left-2}function C(){return r.left-a.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:a="over",column:l,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 a==="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,l,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,a={width:0,height:0},l=(d=!1)=>{let{x:c,y:u}=r();d&&t.clientWidth===a.width&&t.clientHeight===a.height||(a.width=t.clientWidth,a.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(l(),!n){const d=Je(this.beans,t,()=>l(!0));setTimeout(()=>d(),rS)}}getActivePopups(){return this.popupList.map(e=>e.element)}getParentRect(){const e=te(this.beans);let t=this.getPopupParent();return t===e.body?t=e.documentElement:getComputedStyle(t).position==="static"&&(t=t.offsetParent),Bn(t)}keepXYWithinBounds(e,t,o){const i=o===0,s=i?"clientHeight":"clientWidth",n=i?"top":"left",r=i?"height":"width",a=i?"scrollTop":"scrollLeft",l=te(this.beans),d=l.documentElement,c=this.getPopupParent(),u=e.getBoundingClientRect(),h=c.getBoundingClientRect(),g=l.documentElement.getBoundingClientRect(),p=c===l.body,f=Math.ceil(u[r]);let m=p?(i?sc:Yi)(d)+d[a]: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=te(this.beans),{eChild:o,ariaLabel:i,ariaOwns:s,alwaysOnTop:n,positionCallback:r,anchorToElement:a}=e;if(!t)return M(122),{hideFunc:()=>{}};const l=this.getPopupIndex(o);if(l!==-1)return{hideFunc:this.popupList[l].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,a),{hideFunc:c}}initialisePopupPosition(e){const o=this.getPopupParent().getBoundingClientRect();A(e.style.top)||(e.style.top=`${o.top*-1}px`),A(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,a=ee({tag:"div"});return n.applyThemeClasses(a),a.classList.add("ag-popup"),e.classList.add(r.get("enableRtl")?"ag-rtl":"ag-ltr","ag-popup-child"),e.hasAttribute("role")||Ne(e,"dialog"),o?Ut(e,o):i&&(e.id||(e.id=`popup-component-${xi}`),In(i,e.id)),a.appendChild(e),s.appendChild(a),t?this.setAlwaysOnTop(e,!0):this.bringPopupToFront(e),a}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=te(t),i=this.getPopupParent(),{wrapperEl:s,eChild:n,closedCallback:r,afterGuiAttached:a,closeOnEsc:l,modal:d,ariaOwns:c}=e;let u=!1;const h=C=>{if(!s.contains(Q(t)))return;C.key===y.ESCAPE&&!Ge(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 a&&a({hidePopup:f}),window.setTimeout(()=>{l&&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:xi,isAnchored:!!i}),i&&this.setPopupPositionRelatedToElement(e,i),xi=xi+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&&In(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),a=(u,h)=>{const g=o[u]-n[u],p=r(s.style[u]);return{initialDiff:g,lastDiff:g,initial:p,last:p,direction:h}},l=a("top",0),d=a("left",1),c=this.beans.frameworkOverrides;return new oo(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(l,"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 a=this.popupList[r];if(Ic(a.element,s))return!0}return this.isElementWithinCustomPopup(s.target)}isElementWithinCustomPopup(e){const t=te(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 a=[],l=r.length,u=s.classList.contains("ag-always-on-top")||!l?[...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&&a.push([f,f.scrollTop])}),h===0?t.insertAdjacentElement("afterbegin",g):u[h-1].insertAdjacentElement("afterend",g)}for(;a.length;){const h=a.pop();h[0].scrollTop=h[1]}}},Dl={moduleName:"Popup",version:L,beans:[aS]},lS=".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}}",hn=(e,t,o)=>{var a,l,d;const{editModelSvc:i}=e,s=(l=(a=i==null?void 0:i.getCellValidationModel())==null?void 0:a.getCellValidation(t))==null?void 0:l.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},dS=class extends x{constructor(){super(...arguments),this.beanName="tooltipSvc"}setupHeaderTooltip(e,t,o,i){e&&t.destroyBean(e);const s=un(this.gos),{column:n,eGui:r}=t,a=n.getColDef();!i&&s&&!a.headerComponent&&(i=Io(()=>r.querySelector(".ag-header-cell-text")));const l={getColumn:()=>n,getColDef:()=>n.getColDef(),getGui:()=>r,getLocation:()=>"header",getTooltipValue:()=>o??n.getColDef().headerTooltip,shouldDisplayTooltip:i};let d=this.createTooltipFeature(l);return d&&(d=t.createBean(d),t.setRefreshFunction("tooltip",()=>d.refreshTooltip())),d}setupHeaderGroupTooltip(e,t,o,i){e&&t.destroyBean(e);const s=un(this.gos),{column:n,eGui:r}=t,a=n.getColGroupDef();!i&&s&&!(a!=null&&a.headerGroupComponent)&&(i=Io(()=>r.querySelector(".ag-header-group-text")));const l={getColumn:()=>n,getGui:()=>r,getLocation:()=>"headerGroup",getTooltipValue:()=>o??(a&&a.headerTooltip),shouldDisplayTooltip:i};a&&(l.getColDef=()=>a);const d=this.createTooltipFeature(l);return d&&t.createBean(d)}enableCellTooltipFeature(e,t,o){const{beans:i}=this,{gos:s,editSvc:n}=i,{column:r,rowNode:a}=e;let l="cell";const d=()=>{const g=!!!(n!=null&&n.isEditing(e))&&hn(i,e,this.getLocaleTextFunc());if(g)return l="cellEditor",g;l="cell";const p=r.getColDef(),f=a.data;if(p.tooltipField&&A(f))return $t(f,p.tooltipField,r.isTooltipFieldContainsDots());const C=p.tooltipValueGetter;return C?C(_(s,{location:"cell",colDef:r.getColDef(),column:r,rowIndex:e.cellPosition.rowIndex,node:a,data:a.data,value:e.value,valueFormatted:e.valueFormatted})):null},c=un(s);o||(c&&!e.isCellRenderer()?o=()=>{const h=!!(n!=null&&n.isEditing(e));if(!h&&hn(i,e,this.getLocaleTextFunc()))return!0;if(!r.isTooltipEnabled())return!1;const f=Io(()=>{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:()=>a,getGui:()=>e.eGui,getLocation:()=>l,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 a=this.createTooltipFeature(s,n);if(a)return t.createBean(a,r)}setupCellEditorTooltip(e,t){var a,l;const{beans:o}=this,{context:i}=o,s=((a=t.getValidationElement)==null?void 0:a.call(t,!0))||!((l=t.isPopup)!=null&&l.call(t))&&e.eGui;if(!s)return;const n={getGui:()=>s,getTooltipValue:()=>hn(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=A(t.tooltipField)||A(t.tooltipValueGetter)||A(t.tooltipComponent)}createTooltipFeature(e,t){return this.beans.registry.createDynamicBean("tooltipFeature",!1,e,t)}},Fl={moduleName:"Tooltip",version:L,beans:[dS],dynamicBeans:{tooltipFeature:jv},userComponents:{agTooltipComponent:zv},dependsOn:[Dl],css:[lS]},cS=".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}",uS={tag:"div",cls:"ag-cell-wrapper ag-cell-edit-wrapper ag-checkbox-edit",children:[{tag:"ag-checkbox",ref:"eEditor",role:"presentation"}]},hS=class extends mi{constructor(){super(uS,[Os]),this.eEditor=I}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=An(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}},Di=class extends mi{constructor(e){super(),this.cellEditorInput=e,this.eEditor=I}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,a=!0;i?(this.focusAfterAttached=!0,s===y.BACKSPACE||s===y.DELETE?r="":s&&s.length===1?n?a=!1:r=s:(r=t.getStartValue(),s!==y.F2&&(this.highlightAllOnFocus=!0))):(this.focusAfterAttached=!1,r=t.getStartValue()),a&&r!=null&&o.setStartValue(r),this.addGuiEventListener("keydown",l=>{const{key:d}=l;(d===y.PAGE_UP||d===y.PAGE_DOWN)&&l.preventDefault()})}afterGuiAttached(){var i,s;const e=this.getLocaleTextFunc(),t=this.eEditor;if(t.setInputAriaLabel(e("ariaInputEditor","Input Editor")),!this.focusAfterAttached)return;ft()||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()}},gS={tag:"ag-input-date-field",ref:"eEditor",cls:"ag-cell-editor"},pS=class{constructor(e,t){this.getDataTypeService=e,this.getLocaleTextFunc=t}getTemplate(){return gS}getAgComponents(){return[Pa]}init(e,t){var r,a;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??((a=(r=this.getDataTypeService())==null?void 0:r.getDateIncludesTimeFlag)==null?void 0:a.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 a=this.getLocaleTextFunc();if(t instanceof Date&&!isNaN(t.getTime())){if(i){const l=i instanceof Date?i:new Date(i);if(t<l){const d=l.toLocaleDateString();r.push(a("minDateValidation",`Date must be after ${d}`,[d]))}}if(s){const l=s instanceof Date?s:new Date(s);if(t>l){const d=l.toLocaleDateString();r.push(a("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!A(o)&&!A(t.value)?t.value:o??null}getStartValue(){const{value:e}=this.params;if(e instanceof Date)return Ke(e,this.includeTime??!1)}},fS=class extends Di{constructor(){super(new pS(()=>this.beans.dataTypeSvc,()=>this.getLocaleTextFunc()))}},CS={tag:"ag-input-date-field",ref:"eEditor",cls:"ag-cell-editor"},mS=class{constructor(e,t){this.getDataTypeService=e,this.getLocaleTextFunc=t}getTemplate(){return CS}getAgComponents(){return[Pa]}init(e,t){var r,a;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??((a=(r=this.getDataTypeService())==null?void 0:r.getDateIncludesTimeFlag)==null?void 0:a.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 a=[];if(i){const l=new Date(i),d=this.getLocaleTextFunc();if(s){const c=new Date(s);if(l<c){const u=c.toLocaleDateString();a.push(d("minDateValidation",`Date must be after ${u}`,[u]))}}if(n){const c=new Date(n);if(l>c){const u=c.toLocaleDateString();a.push(d("maxDateValidation",`Date must be before ${u}`,[u]))}}}return a.length||(a=null),r?r({value:this.getValue(),cellEditorParams:t,internalErrors:a}):a}getValue(){const{params:e,eEditor:t}=this,o=this.formatDate(t.getDate());return!A(o)&&!A(e.value)?e.value:e.parseValue(o??"")}getStartValue(){return Ke(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):ao(e)??void 0}formatDate(e){const t=this.getDataTypeService();return t?t.getDateFormatterFunction(this.params.column)(e):Ke(e??null,this.includeTime??!1)??void 0}},wS=class extends Di{constructor(){super(new mS(()=>this.beans.dataTypeSvc,()=>this.getLocaleTextFunc()))}},vS={tag:"div",cls:"ag-large-text",children:[{tag:"ag-input-text-area",ref:"eEditor",cls:"ag-large-text-input"}]},SS=class extends mi{constructor(){super(vS,[up]),this.eEditor=I}initialiseEditor(e){const{eEditor:t}=this,{cellStartedEdit:o,eventKey:i,value:s,maxLength:n,cols:r,rows:a}=e;this.focusAfterAttached=o,t.getInputElement().setAttribute("title",""),t.setMaxLength(n||200).setCols(r||60).setRows(a||10);let l;o?(this.focusAfterAttached=!0,i===y.BACKSPACE||i===y.DELETE?l="":i&&i.length===1?l=i:(l=s.toString(),i!==y.F2&&(this.highlightAllOnFocus=!0))):(this.focusAfterAttached=!1,l=s.toString()),l!=null&&t.setValue(l,!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!A(i)&&!A(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}},bS={tag:"ag-input-number-field",ref:"eEditor",cls:"ag-cell-editor"},yS=class{constructor(e){this.getLocaleTextFunc=e}getTemplate(){return bS}getAgComponents(){return[gp]}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 a=[];return typeof n=="number"&&(t!=null&&n<t&&a.push(r("minValueValidation",`Must be greater than or equal to ${t}.`,[String(t)])),o!=null&&n>o&&a.push(r("maxValueValidation",`Must be less than or equal to ${o}.`,[String(o)]))),a.length||(a=null),i?i({value:n,cellEditorParams:e,internalErrors:a}):a}preventStepping(e){(e.key===y.UP||e.key===y.DOWN)&&e.preventDefault()}getValue(){const{eEditor:e,params:t}=this,o=e.getValue();if(!A(o)&&!A(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(){ft()&&this.eEditor.getInputElement().focus({preventScroll:!0})}},RS=class extends Di{constructor(){super(new yS(()=>this.getLocaleTextFunc()))}},ES={tag:"div",cls:"ag-cell-edit-wrapper",children:[{tag:"ag-select",ref:"eEditor",cls:"ag-cell-editor"}]},xS=class extends mi{constructor(){super(ES,[bp]),this.eEditor=I,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(q(s)){M(58);return}this.startedByEnter=r!=null?r===y.ENTER:!1;let a=!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),a=a||n===u}),a?t.setValue(e.value,!0):e.values.length&&t.setValue(e.values[0],!0);const{valueListGap:l,valueListMaxWidth:d,valueListMaxHeight:c}=e;l!=null&&t.setPickerGap(l),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}},DS={tag:"ag-input-text-field",ref:"eEditor",cls:"ag-cell-editor"},FS=class{constructor(e){this.getLocaleTextFunc=e}getTemplate(){return DS}getAgComponents(){return[dp]}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!A(o)&&!A(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=A(t)&&t.length||0;o&&e.getInputElement().setSelectionRange(o,o)}},Pl=class extends Di{constructor(){super(new FS(()=>this.getLocaleTextFunc()))}};function PS(e){return e.ctrlsSvc.getScrollFeature().getVScrollPosition()}function TS(e){return e.ctrlsSvc.getScrollFeature().getHScrollPosition()}function Tl(e,t,o="auto"){e.frameworkOverrides.wrapIncoming(()=>e.ctrlsSvc.getScrollFeature().ensureColumnVisible(t,o),"ensureVisible")}function Il(e,t,o){e.frameworkOverrides.wrapIncoming(()=>e.ctrlsSvc.getScrollFeature().ensureIndexVisible(t,o),"ensureVisible")}function IS(e,t,o=null){e.frameworkOverrides.wrapIncoming(()=>e.ctrlsSvc.getScrollFeature().ensureNodeVisible(t,o),"ensureVisible")}function AS(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:a}=n;s.forEach((l,d)=>{const{editorValue:c,pendingValue:u,sourceValue:h,state:g}=l,p=Ue(l);let f=c??u;f===Ce&&(f=void 0);const C={newValue:f,oldValue:h,state:g,column:d,colId:d.getColId(),colKey:d.getColId(),rowIndex:r,rowPinned:a};(g==="editing"||g==="changed"&&p)&&o.push(C)})}),o}function MS(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)}):at(e,!0),Tt(e)):o==null||o.stopEditing(void 0,{cancel:t,source:"api"})}function kS(e,t){var i;const o=Z(e,t);return((i=e.editSvc)==null?void 0:i.isEditing(o))??!1}function LS(e,t){const{key:o,colKey:i,rowIndex:s,rowPinned:n}=t,{editSvc:r,colModel:a}=e,l=a.getCol(i);if(!l){M(12,{colKey:i});return}const c=rt(e,{rowIndex:s,rowPinned:n||null});if(!c){M(290,{rowIndex:s,rowPinned:n});return}if(!l.isCellEditable(c))return;n==null&&Il(e,s),Tl(e,i),r==null||r.startEditing({rowNode:c,column:l},{event:o?new KeyboardEvent("keydown",{key:o}):void 0,source:"api"})}function GS(e){var t;return((t=e.editSvc)==null?void 0:t.validateEdit())||null}var HS={tag:"div",cls:"ag-popup-editor",attrs:{tabindex:"-1"}},OS=class extends Gs{constructor(e){super(HS),this.params=e}postConstruct(){tt(this.gos,this.getGui(),"popupEditorWrapper",!0),this.addKeyDownListener()}addKeyDownListener(){const e=this.getGui(),t=this.params,o=i=>{Fs(this.gos,i,t.node,t.column,!0)||t.onKeyDown(i)};this.addManagedElementListeners(e,{keydown:o})}},Fi=(e,t=!1)=>{if(e!==void 0)return Ue(e)||t&&e.state==="editing"};function Al(e,t,o=!1){var i;return Fi((i=e.editModelSvc)==null?void 0:i.getEdit(t),o)}function Ml(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(Fi(o==null?void 0:o.getEdit({rowNode:n,column:i}))||Fi(o==null?void 0:o.getEdit({rowNode:n.pinnedSibling,column:i})))return!0}function kl(e,{rowNode:t,column:o}){var i;if(t=t.pinnedSibling,!!t)return Fi((i=e.editModelSvc)==null?void 0:i.getEdit({rowNode:t,column:o}))}var BS=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=Al(o,e)||Ml(o,e)||kl(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)}},VS=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 a=Array.from(s.keys()).some(l=>{const d={rowNode:i,column:l};return Al(o,d,!0)||Ml(o,d)||kl(o,d)});this.applyStyle(n,a);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)})}},NS=({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},_S=({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}))})},WS=e=>()=>{const t=new Set(e.colModel.getCols()),o=e.editModelSvc.getEditMap(!0),i=new Set(o.keys());_S(e,NS(e,i),t)},zS=new Set(["undo","redo"]),Ll={paste:"ui",rangeSvc:"ui",fillHandle:"api",cellClear:"api"},$S=new Set(Object.keys(Ll)),US=new Set(["paste","rangeSvc","renderer","cellClear","redo","undo"]),Pi={cancel:!0,source:"api"},KS={cancel:!1,source:"api"},Vt={checkSiblings:!0},wo={force:!0,suppressFlash:!0},jS=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,Pi),this.createStrategy(i)});const t=WS(e),o=()=>{const i=this.model.getCellValidationModel().getCellValidationMap().size>0,s=this.model.getRowValidationModel().getRowValidationMap().size>0;return i||s?this.stopEditing(void 0,Pi):this.isEditing()&&(this.isBatchEditing()?Tt(e,this.model.getEditPositions()):this.stopEditing(void 0,KS)),!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,Pi)):(this.stopEditing(void 0,Pi),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 ch(this.beans)}isEditing(e,t){return this.model.hasEdits(e,t??Vt)}isRowEditing(e,t){return(e&&this.model.hasRowEdits(e,t))??!1}startEditing(e,t){var l;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=Z(this.beans,e);if(r&&!r.comp){r.onCompAttachedFuncs.push(()=>this.startEditing(e,t));return}const a=(l=this.shouldStartEditing)==null?void 0:l.call(this,e,i,o,s);if(a===!1&&s!=="api"){this.isEditing(e)&&this.stopEditing();return}!this.batch&&this.shouldStopEditing(e,void 0,s)&&this.stopEditing(void 0,{source:s}),a&&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:a}=this;if($S.has(s))return this.isBatchEditing()?(this.bulkRefresh(e),!1):this.stopEditing(e,{...t,source:Ll[s]});if(!(this.isEditing(e)||this.isBatchEditing()&&a.hasEdits(e,Vt))||!this.strategy)return!1;const d=Z(r,e);d&&(d.onEditorAttachedFuncs=[]);let c=a.getEditMap(!0),u=!1;const h=!i&&!!this.shouldStopEditing(e,o,s),g=i&&!!this.shouldCancelEditing(e,o,s);if(h||g){at(r,!0);const m=a.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?at(r,!0):S&&this.revertSingleCellEdit(d),this.isBatchEditing()?(C=this.strategy)==null||C.cleanupEditors():Tt(r,a.getEditPositions(),{event:o}),o.preventDefault(),this.bulkRefresh(e,c,{suppressFlash:!0}),c=a.getEditMap())}else at(r,!0),c=a.getEditMap();return u&&e&&this.model.removeEdits(e),!n&&d&&this.navigateAfterEdit(o instanceof KeyboardEvent&&o.shiftKey,d.cellPosition),Cs(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,a,l;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=Z(i,g),f=Ue(h),C=(l=(a=(r=p==null?void 0:p.comp)==null?void 0:r.getCellEditor())==null?void 0:a.isCancelAfterEnd)==null?void 0:l.call(a);!t&&!C&&f&&!s&&(this.setNodeDataValue(d,u,h.pendingValue)||n.push(g)),p==null||p.refreshCell(wo)}}n.forEach(d=>{this.model.clearEditValue(d)})}setNodeDataValue(e,t,o,i){const{beans:s}=this,n=Z(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(wo)),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(wo)}dispatchEditValuesChanged({rowNode:e,column:t},o={}){if(!e||!t||!o)return;const{pendingValue:i,sourceValue:s}=o,{rowIndex:n,rowPinned:r,data:a}=e;this.beans.eventSvc.dispatchEvent({type:"cellEditValuesChanged",node:e,rowIndex:n,rowPinned:r,column:t,source:"api",data:a,newValue:i,oldValue:s,value:i,colDef:t.getColDef()})}bulkRefresh(e={},t,o={}){var a;const{beans:i,gos:s}=this,{editModelSvc:n,rowModel:r}=i;ne(s)&&(e.rowNode&&e.column?this.refCell(e,this.model.getEdit(e),o):t&&((a=n==null?void 0:n.getEditMap(!1))==null||a.forEach((l,d)=>{for(const c of l.keys())this.refCell({rowNode:d,column:c},l.get(c),o)})))}refCell({rowNode:e,column:t},o,i={}){var u;const{beans:s,gos:n}=this,r=new Set([e]),a=new Set,l=e.pinnedSibling;l&&r.add(l);const d=e.sibling;d&&a.add(d);let c=e.parent;for(;c;)(u=c.sibling)!=null&&u.footer&&n.get("groupTotalRow")||!c.parent&&c.sibling&&n.get("grandTotalRow")?a.add(c.sibling):a.add(c),c=c.parent;r.forEach(h=>this.dispatchEditValuesChanged({rowNode:h,column:t},o)),r.forEach(h=>{var g;return(g=Z(s,{rowNode:h,column:t}))==null?void 0:g.refreshCell(i)}),a.forEach(h=>{var g;return(g=Z(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 a=Z(this.beans,e);return this.cellEditingInvalidCommitBlocks()?((i=t==null?void 0:t.preventDefault)==null||i.call(t),o&&(!(a!=null&&a.hasBrowserFocus())&&(a==null||a.focusCell()),(r=(n=(s=a==null?void 0:a.comp)==null?void 0:s.getCellEditor())==null?void 0:n.focusIn)==null||r.call(n)),"block-stop"):(a&&this.revertSingleCellEdit(a),"revert-continue")}return"continue"}revertSingleCellEdit(e,t=!1){var i,s,n,r,a;const o=Z(this.beans,e);(i=o==null?void 0:o.comp)!=null&&i.getCellEditor()&&(Tt(this.beans,[e],{silent:!0}),this.model.clearEditValue(e),Pt(this.beans,e,{silent:!0}),lt(this.beans),o==null||o.refreshCell(wo),(s=o.rowCtrl.rowEditStyleFeature)==null||s.applyRowStyles(),t&&(o==null||o.focusCell(),(a=(r=(n=o==null?void 0:o.comp)==null?void 0:n.getCellEditor())==null?void 0:r.focusIn)==null||a.call(r)))}hasValidationErrors(e){var i;lt(this.beans);const t=Z(this.beans,e);t&&(t.refreshCell(wo),(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 a;let s;const n=this.isEditing(),r=n&&this.checkNavWithValidation(void 0,o)==="block-stop";return e instanceof At&&n&&(s=(a=this.strategy)==null?void 0:a.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===Ce||!i?this.valueSvc.getValue(t,e,!0,"api"):n}getRowDataValue(e,t){return this.model.getEditRowDataValue(e,t)}addStopEditingWhenGridLosesFocus(e){sh(this,this.beans,e)}createPopupEditorWrapper(e){return new OS(e)}setDataValue(e,t,o){var r;if((!this.isEditing()||o==="commit")&&!US.has(o))return;const{beans:i}=this;this.strategy??(this.strategy=this.createStrategy());const s=this.isBatchEditing()?"ui":"api";if(!o||zS.has(o))return Jo(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 Jo(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 Jo(i,e,!0,t),this.stopEditing(e,{source:s,suppressNavigateAfterEdit:!0}),!0}handleColDefChanged(e){ah(this.beans,e)}destroy(){this.model.clear(),this.destroyStrategy(),super.destroy()}prepDetailsDuringBatch(e,t){if(!this.batch||!this.model.hasRowEdits(e.rowNode,Vt))return;const{rowNode:i,column:s}=e,{compDetails:n,valueToDisplay:r}=t;if(n){const{params:l}=n;return l.data=this.model.getEditRowDataValue(i,Vt),{compDetails:n}}const a=this.model.getEditRow(e.rowNode,Vt);if(r!==void 0&&(a!=null&&a.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 _(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;at(i,!0);const r=this.model.getEditMap(!0),a=(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=rt(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,a,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(),Cs(i),this.bulkRefresh();return}this.stopEditing(void 0,{source:"api"}),this.eventSvc.dispatchEvent({type:"bulkEditingStopped",changes:this.toEventChangeList(r)})}),this.bulkRefresh();const l=Z(i,{rowNode:e,column:t});l&&l.focusCell(!0)}createCellStyleFeature(e,t){return new BS(e,t)}createRowStyleFeature(e,t){return new VS(e,t)}setEditingCells(e,t){const{beans:o}=this,{colModel:i,valueSvc:s}=o,n=new Map;e.forEach(({colId:r,column:a,colKey:l,rowIndex:d,rowPinned:c,newValue:u,state:h})=>{const g=r?i.getCol(r):l?i.getCol(l):a;if(!g)return;const p=rt(o,{rowIndex:d,rowPinned:c});if(!p)return;const f=s.getValue(g,p,!0,"api");if(!Ue({pendingValue:u,sourceValue:f})&&h!=="editing")return;let C=n.get(p);C||(C=new Map,n.set(p,C)),u===void 0&&(u=Ce),C.set(g,{editorValue:void 0,pendingValue:u,sourceValue:f,state:h??"changed"})}),this.setEditMap(n,t)}onCellFocused(e){var n;const t=Z(this.beans,e);if(!t||!this.isEditing(t,Vt))return;const o=this.model.getEdit(t);if(!o||!Ue(o))return;const s=this.getLocaleTextFunc()("ariaPendingChange","Pending Change");(n=this.beans.ariaAnnounce)==null||n.announceValue(s,"pendingChange")}allowedFocusTargetOnValidation(e){return Z(this.beans,e)}},Gl=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=Z(s,o));const{gos:r,editModelSvc:a}=s,l=e.type==="cellFocusCleared";if(i.isEditing(void 0,{withOpenEditor:!0})){const{column:d,rowIndex:c,rowPinned:u}=e,h={column:d,rowNode:rt(s,{rowIndex:c,rowPinned:u})},g=r.get("invalidEditValueMode")==="block";if(g)return;const p=!g,f=!!(a!=null&&a.getCellValidationModel().hasCellValidation(h)),C=p&&f;(o||l?i.stopEditing(void 0,{cancel:C,source:l&&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 a;i.all.push(n);const r=this.model.getCellValidationModel().getCellValidation(n);if((((a=r==null?void 0:r.errorMessages)==null?void 0:a.length)??0)>0){i.fail.push(n);return}i.pass.push(n)}),e)return o.forEach(n=>{ei(this.beans,n),this.model.stop(n)}),!0;const s=this.processValidationResults(i);return s.destroy.length>0&&s.destroy.forEach(n=>{ei(this.beans,n,{event:t}),this.model.stop(n)}),s.keep.length>0&&s.keep.forEach(n=>{var a;const r=Z(this.beans,n);(a=this.editSvc)!=null&&a.cellEditingInvalidCommitBlocks()||r&&this.editSvc.revertSingleCellEdit(r)}),!0}cleanupEditors({rowNode:e}={},t){at(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)}),Tt(this.beans,i),Cs(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;rh(this.beans,e,t,n,i,o)}dispatchCellEvent(e,t,o,i){const s=Z(this.beans,e);s&&this.eventSvc.dispatchEvent({...s.createEvent(t??null,o),...i})}dispatchRowEvent(e,t){const o=ps(this.beans,e);o&&this.eventSvc.dispatchEvent(o.createRowEvent(t))}shouldStart({column:e},t,o,i="ui"){var l;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)&&((l=this.beans.rangeSvc)==null?void 0:l.getCellRanges().length)!=0)return!1;const n=e==null?void 0:e.getColDef(),r=this.deriveClickCount(n),a=t==null?void 0:t.type;return a==="click"&&(t==null?void 0:t.detail)===1&&r===1||a==="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,a)=>{r.state==="editing"&&o.push({...r,rowNode:n,column:a})})}),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===Ce?void 0:s.pendingValue;this.start(s,new KeyboardEvent("keydown",{key:n}),"api");const r=Z(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()}},qS=class extends Gl{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(!ps(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(a=>{if(!a.isCellEditable(s))return;const l={rowNode:s,column:a};r.push(l),this.model.hasEdits(l)||this.model.start(l)}),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 a of n.values())if(Ue(a)){i.push(r);break}}}),lt(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=Z(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 a=r.cellPosition,l=e.isCellEditable(),d=r.isCellEditable(),c=a&&n.rowIndex===a.rowIndex&&n.rowPinned===a.rowPinned;l&&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()||Pt(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=Z(this.beans,{rowNode:t,column:i});s&&!((n=s.comp)!=null&&n.getCellEditor())&&Pt(this.beans,s,{silent:!0})}))}destroy(){super.destroy(),this.rowNode=void 0,this.startedRows.length=0}},YS=class extends Gl{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=rt(this.beans,{rowIndex:i,rowPinned:n}),a=fs(s),l=t.getCol(a),d=e.previousParams;if(d){const c=fs(d.column);if((d==null?void 0:d.rowIndex)===i&&c===a&&(d==null?void 0:d.rowPinned)===n)return}o!=null&&o.isEditing({rowNode:r,column:l},{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 a=this.beans.gos.get("editType")==="fullRow";a&&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{a&&this.model.suspend(!1)}if(r===!1)return null;if(r==null)return!1;const l=r.cellPosition,d=e.isCellEditable(),c=r.isCellEditable(),u=l&&n.rowIndex===l.rowIndex&&n.rowPinned===l.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()||(Pt(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}},ht={moduleName:"EditCore",version:L,beans:[Zu,jS],apiFunctions:{getEditingCells:AS,getCellEditorInstances:nh,startEditingCell:LS,stopEditing:MS,isEditing:kS,validateEdit:GS},dynamicBeans:{singleCell:YS,fullRow:qS},dependsOn:[Dl,Fl],css:[cS]},ZS={moduleName:"TextEditor",version:L,userComponents:{agCellEditor:Pl,agTextCellEditor:Pl},dependsOn:[ht]},QS={moduleName:"NumberEditor",version:L,userComponents:{agNumberCellEditor:{classImp:RS}},dependsOn:[ht]},XS={moduleName:"DateEditor",version:L,userComponents:{agDateCellEditor:fS,agDateStringCellEditor:wS},dependsOn:[ht]},JS={moduleName:"CheckboxEditor",version:L,userComponents:{agCheckboxCellEditor:hS},dependsOn:[ht]},eb={moduleName:"SelectEditor",version:L,userComponents:{agSelectCellEditor:xS},dependsOn:[ht]},tb={moduleName:"LargeTextEditor",version:L,userComponents:{agLargeTextCellEditor:SS},dependsOn:[ht]},ob={moduleName:"CustomEditor",version:L,dependsOn:[ht]};function ib(e){var t;(t=e.expansionSvc)==null||t.expandAll(!0)}function sb(e){var t;(t=e.expansionSvc)==null||t.expandAll(!1)}function nb(e){const t=Ae(e),o=Ov(e);t?t.onRowHeightChanged():o&&o.onRowHeightChanged()}var rb={moduleName:"CsrmSsrmSharedApi",version:L,apiFunctions:{expandAll:ib,collapseAll:sb,onRowHeightChanged:nb}},ab=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){j(18),t||j(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||j(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":M(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 a=this.getMasterColumns(e);switch(e.type){case"columnMoved":{const h=e.api.getColumnState().map(g=>({colId:g.colId}));be(i,{state:h,applyOrder:!0},"alignedGridChanged")}break;case"columnVisible":{const h=e.api.getColumnState().map(g=>({colId:g.colId,hide:g.hide}));be(i,{state:h},"alignedGridChanged")}break;case"columnPinned":{const h=e.api.getColumnState().map(g=>({colId:g.colId,pinned:g.pinned}));be(i,{state:h},"alignedGridChanged")}break;case"columnResized":{const u=e,h={};a.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)})}},lb={moduleName:"AlignedGrids",version:L,beans:[ab],dependsOn:[za]},db="↑",cb="↓",ub={tag:"span",children:[{tag:"span",ref:"eDelta",cls:"ag-value-change-delta"},{tag:"span",ref:"eValue",cls:"ag-value-change-value"}]},hb=class extends Y{constructor(){super(ub),this.eValue=I,this.eDelta=I,this.refreshCount=0}init(e){this.refresh(e,!0)}showDelta(e,t){const o=Math.abs(t),i=e.formatValue(o),s=A(i)?i:o,n=t>=0,r=this.eDelta;n?r.textContent=db+s:r.textContent=cb+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"),pe(this.eDelta)}refresh(e,t=!1){var d;const{value:o,valueFormatted:i}=e,{eValue:s,lastValue:n,beans:r}=this;if(o===n||(A(i)?s.textContent=i:A(o)?s.textContent=o:pe(s),(d=r.filterManager)!=null&&d.isSuppressFlashingCellsBecauseFiltering()))return!1;const a=o&&typeof o=="object"&&"toNumber"in o?o.toNumber():o,l=n&&typeof n=="object"&&"toNumber"in n?n.toNumber():n;if(a===l)return!1;if(typeof a=="number"&&typeof l=="number"){const c=a-l;this.showDelta(e,c)}return n&&s.classList.add("ag-value-change-value-highlight"),t||this.setTimerToRemoveDelta(),this.lastValue=o,!0}},gb=".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}",pb={tag:"span",children:[{tag:"span",ref:"eCurrent",cls:"ag-value-slide-current"}]},fb=class extends Y{constructor(){super(pb),this.eCurrent=I,this.refreshCount=0,this.registerCSS(gb)}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=ee({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(q(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 A(e.valueFormatted)?i.textContent=e.valueFormatted:A(e.value)?i.textContent=o:pe(i),!0}},Cb=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,a=n+o+i,l={phase:"flash",flashEndTime:r,fadeEndTime:a};s.set(e,l);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,a]of i){if(!r.isAlive()||!r.comp){i.delete(r);continue}const{phase:l,flashEndTime:d,fadeEndTime:c}=a,u=l==="flash"?d:c;if(!(e+15>=u)){t=Math.min(u,t??1/0);continue}const{comp:g,eGui:{style:p}}=r;switch(l){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),a.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=Qu(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 mb(e,t={}){const{cellFlashSvc:o}=e;o&&e.frameworkOverrides.wrapIncoming(()=>{e.rowRenderer.getCellCtrls(t.rowNodes,t.columns).forEach(i=>o.flashCell(i,t))})}var wb={moduleName:"HighlightChanges",version:L,beans:[Cb],userComponents:{agAnimateShowChangeCellRenderer:hb,agAnimateSlideCellRenderer:fb},apiFunctions:{flashCells:mb}};function vb(e){var t;return((t=e.stateSvc)==null?void 0:t.getState())??{}}function Sb(e,t,o){var i;return(i=e.stateSvc)==null?void 0:i.setState(t,o)}function Hl(e){switch(e={...e},e.version||(e.version="32.1.0"),e.version){case"32.1.0":e=bb(e)}return e.version=L,e}function bb(e){return e.cellSelection=yb(e,"rangeSelection"),e}function yb(e,t){if(e&&typeof e=="object")return e[t]}var Rb=class extends x{constructor(){super(...arguments),this.beanName="stateSvc",this.updateRowGroupExpansionStateTimer=0,this.suppressEvents=!0,this.queuedUpdateSources=new Set,this.dispatchStateUpdateEventDebounced=fe(this,()=>this.dispatchQueuedStateUpdateEvents(),0),this.onRowGroupOpenedDebounced=fe(this,()=>{this.updateCachedState("rowGroupExpansion",this.getRowGroupExpansionState())},0),this.onRowSelectedDebounced=fe(this,()=>{this.staleStateKeys.delete("rowSelection"),this.updateCachedState("rowSelection",this.getRowSelectionState())},0),this.staleStateKeys=new Set}postConstruct(){this.isClientSideRowModel=ne(this.gos);const e=Hl(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=Hl(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,a=(d,c)=>!(o!=null&&o.has(d))&&(c||t==="api");a("filter",i)&&this.setFilterState(i),a("rowGroupExpansion",s)&&this.setRowGroupExpansionState(s,t),a("rowSelection",n)&&this.setRowSelectionState(n,t),a("pagination",r)&&this.setPaginationState(r,t);const l=this.updateCachedState.bind(this);l("filter",this.getFilterState()),l("rowGroupExpansion",this.getRowGroupExpansionState()),l("rowSelection",this.getRowSelectionState()),l("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:a}=e,l=(u,h)=>!(o!=null&&o.has(u))&&(h||t==="api");l("focusedCell",n)&&this.setFocusedCellState(n),l("cellSelection",s)&&this.setCellSelectionState(s),l("scroll",i)&&this.setScrollState(i),l("rowPinning",a)&&this.setRowPinningState(a),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 Vv(jo(e),e.colModel.isPivotMode())}setColumnState(e,t,o,i){const{sort:s,rowGroup:n,aggregation:r,pivot:a,columnPinning:l,columnVisibility:d,columnSizing:c,columnOrder:u}=e,h=(P,H)=>!(i!=null&&i.has(P))&&(H||t==="api"),g={},p=P=>{let H=g[P];return H||(H={colId:P},g[P]=H,H)},f={},C=h("sort",s);C&&(s==null||s.sortModel.forEach(({colId:P,sort:H},W)=>{const K=p(P);K.sort=H,K.sortIndex=W})),(C||!o)&&(f.sort=null,f.sortIndex=null);const m=h("rowGroup",n);m&&(n==null||n.groupColIds.forEach((P,H)=>{const W=p(P);W.rowGroup=!0,W.rowGroupIndex=H})),(m||!o)&&(f.rowGroup=null,f.rowGroupIndex=null);const w=h("aggregation",r);w&&(r==null||r.aggregationModel.forEach(({colId:P,aggFunc:H})=>{p(P).aggFunc=H})),(w||!o)&&(f.aggFunc=null);const S=h("pivot",a);S&&(a==null||a.pivotColIds.forEach((P,H)=>{const W=p(P);W.pivot=!0,W.pivotIndex=H}),this.gos.updateGridOptions({options:{pivotMode:!!(a!=null&&a.pivotMode)},source:t})),(S||!o)&&(f.pivot=null,f.pivotIndex=null);const v=h("columnPinning",l);v&&(l==null||l.leftColIds.forEach(P=>{p(P).pinned="left"}),l==null||l.rightColIds.forEach(P=>{p(P).pinned="right"})),(v||!o)&&(f.pinned=null);const b=h("columnVisibility",d);b&&(d==null||d.hiddenColIds.forEach(P=>{p(P).hide=!0})),(b||!o)&&(f.hide=null);const D=h("columnSizing",c);D&&(c==null||c.columnSizingModel.forEach(({colId:P,flex:H,width:W})=>{const K=p(P);K.flex=H??null,K.width=W})),(D||!o)&&(f.flex=null);const T=u==null?void 0:u.orderedColIds,G=!!(T!=null&&T.length)&&!(i!=null&&i.has("columnOrder")),F=G?T.map(P=>p(P)):Object.values(g);F.length&&(this.columnStates=F,be(this.beans,{state:F,applyOrder:G,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 a=[];for(const l of o)n.getPivotResultCol(l.colId)&&a.push(l);be(s,{state:a,applyOrder:e},t)}i&&(r==null||r.setColumnGroupState(i,t))}}getColumnGroupState(){const e=this.beans.colGroupSvc;if(!e)return;const t=e.getColumnGroupState();return Nv(t)}setColumnGroupState(e,t,o){var a;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((a=e.columnGroup)==null?void 0:a.openColumnGroupIds),r=i.getColumnGroupState().map(({groupId:l})=>{const d=s.has(l);return d&&s.delete(l),{groupId:l,open:d}});s.forEach(l=>{r.push({groupId:l,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:a,startColumn:l}=o;return{id:i,type:s,startRow:n,endRow:r,colIds:a.map(d=>d.getColId()),startColId:l.getColId()}});return e!=null&&e.length?{cellRanges:e}:void 0}setCellSelectionState(e){const{gos:t,rangeSvc:o,colModel:i,visibleCols:s}=this.beans;if(!ot(t)||!o)return;const n=[];e==null||e.cellRanges.forEach(r=>{const a=[];if(r.colIds.forEach(d=>{const c=i.getCol(d);c&&a.push(c)}),!a.length)return;let l=i.getCol(r.startColId);if(!l){const d=s.allCols,c=new Set(a);l=d.find(u=>c.has(u))}n.push({...r,columns:a,startColumn:l})}),o.setCellRanges(n)}getScrollState(){if(!this.isClientSideRowModel)return;const e=this.beans.ctrlsSvc.getScrollFeature(),{left:t}=(e==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 a;r.get("center").setCenterViewportScrollLeft(o),(a=r.getScrollFeature())==null||a.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 a=new Set(r);for(const l of i)a.delete(l);s=Array.from(a)}}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];yn(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),yn(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")}},Eb={moduleName:"GridState",version:L,beans:[Rb],apiFunctions:{getState:vb,setState:Sb}};function xb(e,t={}){const o=t?t.rowNodes:void 0;e.frameworkOverrides.wrapIncoming(()=>e.rowRenderer.redrawRows(o))}function Ol(e,t,o,i,s){t&&(i&&t.parent&&t.parent.level!==-1&&Ol(e,t.parent,o,i,s),t.setExpanded(o,void 0,s))}function Db(e,t){return e.rowModel.getRowNode(t)}function Fb(e,t,o,i){e.rowRenderer.addRenderedRowListener(t,o,i)}function Pb(e){return e.rowRenderer.getRenderedNodes()}function Tb(e,t,o){e.rowModel.forEachNode(t,o)}function Ib(e){return e.rowRenderer.firstRenderedRow}function Ab(e){return e.rowRenderer.lastRenderedRow}function Mb(e,t){return e.rowModel.getRow(t)}function kb(e){return e.rowModel.getRowCount()}var Bl={moduleName:"RowApi",version:L,apiFunctions:{redrawRows:xb,setRowNodeExpanded:Ol,getRowNode:Db,addRenderedRowListener:Fb,getRenderedNodes:Pb,forEachNode:Tb,getFirstDisplayedRowIndex:Ib,getLastDisplayedRowIndex:Ab,getDisplayedRowAtIndex:Mb,getDisplayedRowCount:kb}},Lb={moduleName:"ScrollApi",version:L,apiFunctions:{getVerticalPixelRange:PS,getHorizontalPixelRange:TS,ensureColumnVisible:Tl,ensureIndexVisible:Il,ensureNodeVisible:IS}};function Gb(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 Hb(e,t={}){e.frameworkOverrides.wrapIncoming(()=>e.rowRenderer.refreshCells(t))}function Ob(e){e.frameworkOverrides.wrapIncoming(()=>e.ctrlsSvc.getHeaderRowContainerCtrls().forEach(t=>t.refresh()))}function Bb(e){var t;return((t=e.animationFrameSvc)==null?void 0:t.isQueueEmpty())??!0}function Vb(e){var t;(t=e.animationFrameSvc)==null||t.flushAllFrames()}function Nb(e){return{rowHeight:ns(e),headerHeight:co(e)}}function _b(e,t={}){var n;const o=[];if(e.rowRenderer.getCellCtrls(t.rowNodes,t.columns).forEach(r=>{const a=r.getCellRenderer();a!=null&&o.push(us(a))}),(n=t.columns)!=null&&n.length)return o;const i=[],s=an(t.rowNodes);return e.rowRenderer.getAllRowCtrls().forEach(r=>{if(s&&!ln(r.rowNode,s)||!r.isFullWidth())return;const a=r.getFullWidthCellRenderers();for(let l=0;l<a.length;l++){const d=a[l];d!=null&&i.push(us(d))}}),[...i,...o]}var Wb={moduleName:"RenderApi",version:L,apiFunctions:{setGridAriaProperty:Gb,refreshCells:Hb,refreshHeader:Ob,isAnimationFrameQueueEmpty:Bb,flushAllAnimationFrames:Vb,getSizesForCurrentTheme:Nb,getCellRendererInstances:_b}};function zb(e,t){var o,i;typeof t=="number"?(o=e.colAutosize)==null||o.sizeColumnsToFit(t,"api"):(i=e.colAutosize)==null||i.sizeColumnsToFitGridBody(t)}function Vl({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 $b(e,t){var o;t&&typeof t=="object"?Vl(e,t):(o=e.colAutosize)==null||o.autoSizeAllColumns({source:"api",skipHeader:t})}var Ub=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:a=[],source:l="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(a.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||_c(v))return;const b=u.getCol(v);if(!b||p.indexOf(b)>=0)return;const D=h.getPreferredWidthForColumn(b,m);if(D>0){const T=C[b.colId]??{};T.minWidth??(T.minWidth=r),T.maxWidth??(T.maxWidth=n);const G=Kb(b,D,T);b.setActualWidth(G,l),p.push(b),f++}S.push(b)}),S.length&&g.refresh(l)}w||this.autoSizeColumnGroupsByColumns(t,l,s),xt(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 a;const l=[];for(const d of n){for(const c of s.getHeaderRowContainerCtrls())if(a=c.getHeaderCtrlForColumn(d),a)break;a&&a.resizeLeafColumnsToFit(t)}return l}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 ct(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(a=>{a.getColDef().suppressAutoSize||n.push(a.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,l=jt(s.eGridBody)-r;if(l>0){this.sizeColumnsToFit(l,"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):M(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===He(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 a=[],l=[];n.forEach(p=>{p.getColDef().suppressSizeToFit===!0?l.push(p):a.push(p)});const d=a.slice(0);let c=!1;const u=p=>{Se(a,p),l.push(p)};for(a.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-He(l);if(p<=0)a.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/He(a);let C=p;for(let m=a.length-1;m>=0;m--){const w=a[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(),T=w.getMaxWidth(),G=typeof v=="number"&&v>D?v:D,F=typeof b=="number"&&b<T?b:T;let P=Math.round(w.getActualWidth()*f);P<G?(P=G,u(w),c=!1):P>F?(P=F,u(w),c=!1):m===0&&(P=C),w.setActualWidth(P,t,!0),C-=P}}}d.forEach(p=>{p.fireColumnWidthChangedEvent(t)});const h=this.beans.visibleCols;h.setLeftValues(t),h.updateBodyWidths(),!o&&xt(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:a,maxWidth:l})=>({key:r,minWidth:a,maxWidth:l}));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 Kb(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 jb={moduleName:"ColumnAutoSize",version:L,beans:[Ub],apiFunctions:{sizeColumnsToFit:zb,autoSizeColumns:Vl,autoSizeAllColumns:$b},dependsOn:[Va]},qb=".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 Yb(e){var t;return((t=e.pinnedRowModel)==null?void 0:t.getPinnedTopRowCount())??0}function Zb(e){var t;return((t=e.pinnedRowModel)==null?void 0:t.getPinnedBottomRowCount())??0}function Qb(e,t){var o;return(o=e.pinnedRowModel)==null?void 0:o.getPinnedTopRow(t)}function Xb(e,t){var o;return(o=e.pinnedRowModel)==null?void 0:o.getPinnedBottomRow(t)}function Jb(e,t,o){var i;return(i=e.pinnedRowModel)==null?void 0:i.forEachPinnedRow(t,o)}var ey={moduleName:"PinnedRow",version:L,beans:[lp],css:[qb],apiFunctions:{getPinnedTopRowCount:Yb,getPinnedBottomRowCount:Zb,getPinnedTopRow:Qb,getPinnedBottomRow:Xb,forEachPinnedRow:Jb},icons:{rowPin:"pin",rowPinTop:"pinned-top",rowPinBottom:"pinned-bottom",rowUnpin:"un-pin"}},ty=class extends At{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&&Fo(this.eGui,this.rowNode.rowIndex)}setAriaRowSpan(){jd(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(ni(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}},oy=class extends ci{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 ty(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(){}},iy=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 a=!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}a=!0;const g=new oy(u.firstNode,this.beans,!1,!1,!1);r.set(u.firstNode,g)}));this[o]=r;const l=r.size===s;if(!(!a&&l)){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=`${Nl(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")}},Nl=e=>e??"center",sy=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}},ny=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:a}=t,l=this[`${e}ValueNodeMap`],d=new Map,c=o.getCallback("isFullWidthRow"),u=a.equals,h=a.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 T=_(o,{valueA:C,nodeA:p,valueB:D,nodeB:v,column:t,colDef:a});if(!h(T)){m(v,D);return}}else if(u?!u(C,D):C!==D){m(v,D);return}if(!f){const T=l==null?void 0:l.get(p);(T==null?void 0:T.firstNode)===p?(T.reset(),f=T):f=new sy(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[`${Nl(e.rowPinned)}ValueNodeMap`].get(e)}},ry=class extends x{constructor(){super(...arguments),this.beanName="rowSpanSvc",this.spanningColumns=new Map,this.debouncePinnedEvent=fe(this,this.dispatchCellsUpdatedEvent.bind(this,!0),0),this.debounceModelEvent=fe(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 ny(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()}},ay={moduleName:"CellSpan",version:L,beans:[ry,iy]},ly=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);Ds(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 _(this.beans.gos,{value:o,data:i.data,node:i,colDef:t,column:e,rowIndex:i.rowIndex})}},dy=class extends x{constructor(){super(...arguments),this.beanName="cellStyles"}processAllCellClasses(e,t,o,i){Ds(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 ly(e,t)}processStaticCellClasses(e,t,o){this.getStaticCellClasses(e,t).forEach(s=>{o(s)})}},cy={moduleName:"CellStyle",version:L,beans:[dy]},uy={moduleName:"RowStyle",version:L,beans:[qh]};function hy(e,t){var o;return!!((o=e.colHover)!=null&&o.isHovered(t))}var gy=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,a=i.colHover;o??!!s.get("columnHoverHighlight")?this.destroyManagedListeners=this.addManagedElementListeners(n,{mouseover:a.setMouseOver.bind(a,r),mouseout:a.clearMouseOver.bind(a)}):(this.destroyManagedListeners.forEach(d=>d()),this.destroyManagedListeners=[])}}postConstruct(){this.addManagedPropertyListener("columnHoverHighlight",({currentValue:e})=>{this.enableFeature(e)}),this.enableFeature()}destroy(){super.destroy(),this.destroyManagedListeners=null}},py="ag-column-hover",fy=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(py,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 gy(t,o))}updateState(e){this.selectedColumns=e,this.eventSvc.dispatchEvent({type:"columnHoverChanged"})}},Cy={moduleName:"ColumnHover",version:L,beans:[fy],apiFunctions:{isColumnHovered:hy}},my=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=!po.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,a)=>{po.has(r)&&t(r,a)},i=(r,a)=>{po.has(r)||t(r,a)};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:a}=i.get(s);t.removeGlobalListener(r,!1),t.removeGlobalListener(a,!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 wy(e,t,o){var i;(i=e.apiEventSvc)==null||i.addEventListener(t,o)}function vy(e,t,o){var i;(i=e.apiEventSvc)==null||i.removeEventListener(t,o)}function Sy(e,t){var o;(o=e.apiEventSvc)==null||o.addGlobalListener(t)}function by(e,t){var o;(o=e.apiEventSvc)==null||o.removeGlobalListener(t)}var yy={moduleName:"EventApi",version:L,apiFunctions:{addEventListener:wy,addGlobalListener:Sy,removeEventListener:vy,removeGlobalListener:by},beans:[my]},Ry={moduleName:"Locale",version:L,beans:[Bv]},Ey=class extends x{constructor(){super(...arguments),this.beanName="rowAutoHeight",this.wasEverActive=!1,this._debouncedCalculateRowHeights=fe(this,this.calculateRowHeights.bind(this),1)}requestCheckAutoHeight(){this.wasEverActive&&this._debouncedCalculateRowHeights()}calculateRowHeights(){var a,l,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=ze(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)};(a=i==null?void 0:i.forEachPinnedRow)==null||a.call(i,"top",r),(l=i==null?void 0:i.forEachPinnedRow)==null||l.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,a=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}=Xe(i),f=u+h+g+p,m=t.offsetHeight+f;if(c<5){const S=te(r),v=!S||!S.contains(t),b=m==0;if(v||b){window.setTimeout(()=>a(c+1),0);return}}this.setRowAutoHeight(s,m,n)},l=()=>a(0);l();const d=Je(r,t,l);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}},xy={moduleName:"RowAutoHeight",version:L,beans:[Ey]};const gt=Symbol("grid-context"),gn=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 a=o[i.colId],l=o[s.colId];return a>l?1:-1}else return r==null?-1:1}),t},_l=e=>{const t=gn(e),o=new Map;return t.forEach((i,s)=>{o.set(i.colId,s)}),o},Wl=(e,t)=>_l(e).get(t)??-1,Dy=e=>!!e&&(typeof e=="object"||typeof e=="function")&&typeof e.then=="function";class zl{constructor(t,o){R(this,"loading",!1);R(this,"dataGetter");R(this,"cache");R(this,"_api");R(this,"loadingDelay");R(this,"getSorts",()=>gn(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 i,s,n,r,a,l,d,c;if(this.loading||!this._api){(s=(i=t.context)==null?void 0:i.resolve)==null||s.call(i);return}const o=this.cache.enableCursorPage;if(this.cache.isFinished&&(o||t.pageNum!==1)){(r=(n=t.context)==null?void 0:n.resolve)==null||r.call(n);return}if(this.loading=!0,O.isFunction(this.dataGetter)){const u=this.dataGetter({startRow:t.startRow,endRow:t.endRow,pageNum:t.pageNum,pageSize:t.pageSize,cursorId:t.cursorId,params:t.filterModel,sorts:o?[]:this.getSorts()});Dy(u)&&(this.loadingDelay=setTimeout(()=>{this.api.setGridOption("loading",!0)},500),u.then(h=>{var g,p;t.successCallback(h,h.length),(p=(g=t.context)==null?void 0:g.resolve)==null||p.call(g)}).catch(h=>{var g,p;t.failCallback(),(p=(g=t.context)==null?void 0:g.reject)==null||p.call(g,h)}).finally(()=>{clearTimeout(this.loadingDelay),this.api.setGridOption("loading",!1),this.loadData()})),O.isArray(u)&&(t.successCallback(u,u.length),this.loadData(),(l=(a=t.context)==null?void 0:a.resolve)==null||l.call(a))}else t.successCallback(this.dataGetter,this.dataGetter.length),this.loadData(),(c=(d=t.context)==null?void 0:d.resolve)==null||c.call(d)}}class pn{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 Nt{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()}scrollIntoView(){this.actualRow.scrollIntoView()}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 $l{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 Nt(t.id,this,t.nestingIndexes))}scrollIntoView(){this.actualRow.scrollIntoView()}_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}get expand(){return this.actualRow.expand===!0}set expand(t){var o,i;this.actualRow.expand=t===!0,(i=(o=this.actualRow.bridge)==null?void 0:o.refreshModel)==null||i.call(o,{step:"map"})}get detailCardData(){return this.actualRow.detailCardData}set detailCardData(t){this.actualRow.detailCardData=t}isExpanded(){return this.actualRow.isExpanded()}setExpanded(t,o){this.actualRow.setExpanded(t,o)}toggleExpanded(){this.actualRow.toggleExpanded()}isEditing(t){return!!this.draft}isCellEditing(t,o){return!!this.draft}stopEditing(t=!1){return this._stopEditingImpl(t)}}class Ti extends $l{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 Ii extends $l{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 _t{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 a=0;a<n.length;a++)r[a]=new _t(`${this.id}_${a}`,t,n[a],a,o)}else r=new _t(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 Ul{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 a=new Map,l=new Set,d=this.collectLeaves(r);for(const c of d)this._walkUpAndRecord(c,a,l,t);if(d.length>0){const c=new Set;for(const g of d)for(const p of a.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)||a.set(`${u.id}|${g}`,h)}this.cellSpanCaches.set(t,a),this.dirtyRoots.add(t)}_computeExpandPaths(t,o){const i=new Set;for(const s of o){const n=s.colId.split(".");let r=t,a="";const l=s.cellDataType==="native"&&r!=null&&Array.isArray(r[n[0]]);for(let d=0;d<n.length&&r!=null;d++){const c=n[d];a=a?`${a}.${c}`:c;const u=r[c];if(Array.isArray(u)){if(d===0&&l)break;i.add(a),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),a=r.length,l=((p=r[0])==null?void 0:p.field)??o.split(".").pop();if(a===i){this.dirtyRoots.add(t);return}if(i<a)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=a;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}_${l}_${f}`,field:l,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 a=r[o];return s.get(`${a.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 a=0;a<s.length;a++){let l=s[a];if(a<s.length-1){const d=s.slice(0,a+1).join(".");i.has(d)&&r<o.length&&(l+=`[${o[r]}]`,r++)}n.push(l)}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 a=t.path?`${t.path}.${n}`:n;if(Array.isArray(r))if(s.has(a)){i.set(a,t);for(let l=0;l<r.length;l++){const d=this.createNode(`${t.id}_${n}_${l}`,n,r[l],l,t,a,[...t.nestingIndexes,l]);t.children.push(d),this.expandChildren(d,r[l],i,s)}if(r.length===0){const l=this.createNode(`${t.id}_${n}_empty`,n,r,void 0,t,a,t.nestingIndexes);t.children.push(l)}}else{const l=this.createNode(t.id,n,r,void 0,t,a,t.nestingIndexes);t.children.push(l)}else{const l=this.createNode(t.id,n,r,void 0,t,a,t.nestingIndexes);t.children.push(l),this.expandChildren(l,r,i,s)}}}createNode(t,o,i,s,n,r,a){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:a}}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 a=r.path;s.set(a,(s.get(a)??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 Fy{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 _t(this.id,"$",this.data),this._buildPathCells(i),this.rootValue.calcSpan(),this.spanMatrix=new Ul,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 a=[];for(const l of s){const d=l.pretreatmentValue(r,l,o);O.isArray(d)?a.push(...d):a.push(d)}s=a}}}}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 a of i){if(!r)break;if(!O.isArray(r)){const l=r.get(a);O.isArray(l)?(r=l[o[n]],n=n+1):r=l}}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 _t(this.id,"$",t);for(const n of i){const r=n.colId.split(".");let a=s;for(let l=0;l<r.length;l++){const d=r[l];if(!O.isArray(a))a=a.pretreatmentValue(d,a,n);else{const c=[];for(const u of a){const h=u.pretreatmentValue(d,u,n);O.isArray(h)?c.push(...h):c.push(h)}a=c}}}s.calcSpan(),this.rootValue=s,o&&(this.columns=i)}getSpanMatrix(){return this.spanMatrix}}class vo{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");R(this,"expand",!1);R(this,"detailCardData",null);this.index=r,this.dataCache=s,this.idMapper=i,this.columns=o,this.bridge=n,this.id=i(t),this.data=t,this.signature=Ve(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 Fy(this.id,this.data,this.columns),this.spanCache=new pn(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)}getSourceRow(){return this}isExpanded(){return this.expand===!0}setExpanded(t,o){var s,n;const i=t===!0;this.expand!==i&&(this.expand=i,(n=(s=this.bridge)==null?void 0:s.refreshModel)==null||n.call(s,{step:"map"}))}toggleExpanded(){this.setExpanded(!this.expand)}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 Ti(this,this.idMapper,!1);return this.dataCache.replace(o),t&&this.redraw(),o}startEditingCell(t,o,i=!1){const s=new Ii(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=Ve(JSON.stringify(o)),this.dataModel.rebuild(o),this.spanCache=new pn(this.dataModel.leafCells,this.dataModel.spanMatrix,this.id)}isTransient(){return!1}getId(){return this.id}isEditing(){return!1}getData(){return this.data}scrollIntoView(){var o;const t=this.leafCells[this.leafCells.length-1];t&&((o=this.bridge)==null||o.ensureNodeVisible(t.id))}flat(){return this.dataModel.leafCells.map(t=>new Nt(t.id,this,t.nestingIndexes))}setData(t){this.update(this.idMapper(t),t)}match(t){return this.getId()===t.data.getId()}}class Kl{constructor(t){R(this,"rows");R(this,"pageNum",1);R(this,"pageSize",100);R(this,"isFinished",!1);R(this,"enableCursorPage",!1);R(this,"idMapper");R(this,"idMap",new Map);R(this,"bridge");this.rows=[],this.idMapper=t}createRow(t){var o;return new vo(t,((o=this.bridge)==null?void 0:o.getColumns())??[],this.idMapper,this,this.bridge)}rebuildIdMap(){this.idMap.clear(),this.rows.forEach((t,o)=>this.idMap.set(t.getId(),o))}setRows(t){return this.rows=t,this.rebuildIdMap(),this}replace(t){this.rows[t.getDataIndex()]=t,this.rebuildIdMap()}remove(t){var i;const o=new Set(t.map(s=>s.getId()));this.rows=this.rows.filter(s=>!o.has(s.getId())),this.rebuildIdMap(),(i=this.bridge)==null||i.reload()}getRows(){return this.rows??[]}appendRows(t){if(!this.rows){this.setRows(t);return}for(const o of t){const i=o.getId(),s=this.idMap.get(i);s!==void 0?(this.rows[s]=o,this.idMap.set(i,s)):(this.rows.push(o),this.idMap.set(i,this.rows.length-1))}}insertRows(t,o=0){if(!this.rows){this.setRows(t);return}const i=new Set(t.map(s=>s.getId()));this.rows=this.rows.filter(s=>!i.has(s.getId())),this.rows.splice(o,0,...t),this.rebuildIdMap()}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())),this.rebuildIdMap()}}const jl={getContextMenuItems:void 0},Py=e=>e instanceof vo||e instanceof Nt?!0:e instanceof Ti,Ty=e=>e instanceof vo,Ai="_",ql=1;class Yl{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(Ai)}static getId(t){return t.__id?t.__id.split(Ai)[0]:t.id}static getSignature(t){return t.__signature}static getFlatIndex(t,o=ql){if(!t.__id)throw new Error("不包含有效的ID信息");const i=t.__id.split(Ai);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 Zl=(e,t,o,i,s)=>{const n=E.ref(t),r=E.ref(),a=E.ref(!1),l=(g,p)=>{if(n.value)return n.value;const f=p??[];if(!g){const w=Ve(f.join(","));return n.value=w,w}const C=e.getInstanceName(g);C&&f.push(C);const m=e.getParentInstance(g);return l(m,f)},d=g=>{const p=localStorage.getItem(g);if(!(!p||p==="undefined"))return JSON.parse(p)},c=O.debounce(()=>{const g=l(s);localStorage.setItem(g,JSON.stringify(o.value.getColumnState()))},200),u=async()=>{const g=l(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}),a.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=l(s);if(r.value=o.value.getColumnState(),!localStorage.getItem(`${g}-initial`)){const p=h();i.value>p&&o.value.sizeColumnsToFit()}},isStateInitialized:a}},So=e=>{if(e.id)return`${e.id}`.split("_")[0]},Ql=e=>{const{options:t,elRef:o,editable:i,onRowChange:s,onMessageError:n,findOtherEditingCell:r,isCellEditable:a}=e;let l;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=So(h.node);if(!g){(p=t.onCellMouseOver)==null||p.call(t,h);return}u((f=h.event)==null?void 0:f.relatedTarget,g)||(l&&l!==g&&c(l),l=g,d(g),(C=t.onCellMouseOver)==null||C.call(t,h))},onCellMouseOut(h){var p;const g=So(h.node);g&&(u((p=h.event)==null?void 0:p.relatedTarget,g)||l===g&&(c(g),l=void 0))},onCellClicked(h){if(i==="cell"&&h.data instanceof Nt){if(a&&!a(h.column,h.node))return;const g=h.data.getActualRow(),p=r==null?void 0:r(h.node.id);if(g instanceof Ii){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 vo)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=So(h.node),p=h.api.getRenderedNodes().filter(m=>So(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 m,w;const g=(m=t==null?void 0:t.getRowClass)==null?void 0:m.call(t,h),p=[];g&&(O.isArray(g)?p.push(...g):p.push(g)),p.push(`row_${So(h.node)}`);const f=h.node.data,C=((w=(f==null?void 0:f.actualRow)??f)==null?void 0:w.index)??h.node.rowIndex??0;return p.push(`row-zebra-${C%2}`),p},onRowDoubleClicked(h){i==="row"&&(h.data.isEditing()||h.data.startEditing())}}},Xl={"cell-span":({data:e,column:t})=>e.getRowSpan(t)>0,"cell-span-hide":({data:e,column:t})=>e.getRowSpan(t)===0},Jl={"cell-span":({data:e,column:t})=>e.getRowSpan(t)>0,"cell-span-hide":({data:e,column:t})=>e.getRowSpan(t)===0},fn=(e,t)=>({...e,...t??{}});class Ye{constructor(t,o,i,s=[],n,r){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,"cursorId");R(this,"onError");R(this,"onFirstPageLoaded");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,this.cursorId=r}static from(t,o,i,s){const n=o??i.pageSize;return i.enableCursorPage?new Ye(1,n,i,[],s,void 0):new Ye(t,n,i,[],s)}static nextPage(t,o){if(t.enableCursorPage){const i=t.getRows(),s=i.length?i[i.length-1].getId():void 0;return new Ye(1,t.pageSize,t,[],o,s)}return new Ye(t.pageNum+1,t.pageSize,t,[],o)}failCallback(){var t;(t=this.onError)==null||t.call(this,"表格数据加载失败,请重试")}successCallback(t){var o;if(this.dataCache.enableCursorPage){this.successCallbackByCursor(t);return}(O.isEmpty(t)||t.length<this.pageSize)&&(this.dataCache.isFinished=!0),this.pageNum===1?this.dataCache.setRows((t??[]).map(i=>this.dataCache.createRow(i))):this.dataCache.appendRows((t??[]).map(i=>this.dataCache.createRow(i))),this.dataCache.pageNum=this.pageNum,this.pageNum===1&&((o=this.onFirstPageLoaded)==null||o.call(this,t??[]))}successCallbackByCursor(t){var s;const o=(t??[]).map(n=>this.dataCache.createRow(n));if(this.cursorId===void 0){this.dataCache.setRows(o),this.dataCache.pageNum=1,o.length===0&&(this.dataCache.isFinished=!0),(s=this.onFirstPageLoaded)==null||s.call(this,t??[]);return}const i=new Set(this.dataCache.getRows().map(n=>n.getId()));if(!o.some(n=>!i.has(n.getId()))){this.dataCache.isFinished=!0;return}this.dataCache.appendRows(o),this.dataCache.pageNum=1}}const ed=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 Iy{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})}ensureNodeVisible(t){const o=this.gridApi.getRowNode(t);o&&this.gridApi.ensureNodeVisible(o)}refreshModel(t){var i,s,n,r;const o=this.gridApi.getGridOption("rowModelType")==="clientSide"?this.gridApi.rowModel:null;o!=null&&o.refreshModel?o.refreshModel(t):t.step==="everything"?(s=(i=this.gridApi).refreshClientSideRowModel)==null||s.call(i):(r=(n=this.gridApi).refreshClientSideRowModel)==null||r.call(n,{step:"map"})}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 td=(e,t)=>{if(t.length===0)return[];const o=new Set(t),i=[];return e.forEachNode(s=>{const n=s.data;n&&typeof n.getId=="function"&&o.has(n.getId())&&i.push(s)}),i},Ay=(e,t,o)=>{!e||t.length===0||e.setNodesSelected({nodes:td(e,t),newValue:!0,source:o})},My=(e,t,o)=>{!e||t.length===0||e.setNodesSelected({nodes:td(e,t),newValue:!1,source:o})},ky=e=>{if(!e)return[];const t=new Set,o=[];return e.forEachNode(i=>{if(!i.isSelected()||!i.data)return;const s=i.data,n=s!=null&&s.getActualRow?s.getActualRow():i.data;t.has(n)||(t.add(n),o.push(n))}),o},od=(e,t)=>{var K;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),a=E.ref(),{onBodyScrollEnd:l}=ed({onVScrollEnd(){u.value.getRows(Ye.nextPage(c.value,e.onError))}}),d=({data:B})=>B.id,c=E.ref(new Kl(e.rowIdMapper)),u=E.ref(new zl(e.rowData,c.value));E.watch(()=>e.enableCursorPage,B=>{c.value.enableCursorPage=B===!0});const{initGridState:h,resetGridState:g,storeGridState:p,restoreGridState:f}=Zl(e.instanceCtx,e.id,o,a,e.currentInstance),C=async B=>{T(),c.value.pageSize=e.pageSize,c.value.enableCursorPage=e.enableCursorPage===!0,c.value.bridge=new Iy(B.api),u.value.api=B.api,B.api.getAllGridColumns(),o.value=B.api,h(),await f(),await G(),B.api.setGridOption("popupParent",document.querySelector("body"))},m=()=>{u.value.loadData()},w=async(B,z=0)=>{c.value.insertRows(B,z),m()},S=B=>c.value.getRows().some(z=>z.getId()===B.getId()),v=()=>c.value.getRows(),b=()=>{var oe,Me;const B=i.value.querySelector(".ag-body-viewport"),z=Number.parseFloat(B.querySelector(".ag-center-cols-container").style.height),N=i.value.querySelector(".ag-header").offsetHeight,$=(Me=(oe=i.value.querySelector(".ag-overlay-no-rows-wrapper"))==null?void 0:oe.querySelector(".el-empty"))==null?void 0:Me.offsetHeight;z<r.value?s.value.height=`${N+($||z)+(e.footerHeight?2:11)}px`:s.value.height.includes("100%")||(s.value.height=`calc(100% - ${e.footerHeight??0}px)`)},D=()=>{const B=i.value;if(!B||s.value.height.includes("%"))return;const z=B.querySelector(".cl-grid-container"),N=B.querySelector(".grid-toolbar");if(!z)return;const $=z.firstElementChild;if(!$)return;const oe=$.offsetHeight,Me=(N==null?void 0:N.offsetHeight)||0;B.style.height=`${oe+Me}px`},T=()=>{const B=i.value.querySelector(".ag-body-viewport");a.value=B.offsetWidth,r.value=B.offsetHeight},G=()=>new Promise((B,z)=>{c.value.isFinished=!1;const N=Ye.from(1,c.value.pageSize,c.value,e.onError);N.onFirstPageLoaded=$=>{E.nextTick(()=>{var oe;return(oe=e.onFirstPageLoaded)==null?void 0:oe.call(e,$)})},N.context={resolve:B,reject:z},u.value.getRows(N),u.value.api.getDisplayedRowCount()>0&&u.value.api.ensureIndexVisible(0)}),F=B=>{const z={...B,sortable:!1};return Array.isArray(B.children)&&(z.children=B.children.map(F)),z},P=E.computed(()=>e.enableCursorPage?e.columns.map(F):e.columns),H=E.computed(()=>{var B,z;return{onGridReady:C,onBodyScrollEnd:l,scrollbarWidth:8,getRowId:d,columnDefs:P.value,preventDefaultOnContextMenu:!0,suppressRowTransform:!0,suppressRowHoverHighlight:!0,selectionColumnDef:{pinned:"left",rowSpan:({data:N,column:$})=>N.getRowSpan($),cellClassRules:fn(Xl,(B=e.gridOptions)==null?void 0:B.rowClassRules)},defaultColGroupDef:{marryChildren:!0},onStateUpdated(N){N.sources.some($=>n.has($))&&p()},onSortChanged(N){N.source==="uiColumnSorted"&&p()},context:{refresh:G,reload:m},onRowDataUpdated(){E.nextTick(()=>{b(),E.nextTick(()=>{D()})})},defaultColDef:{rowSpan({column:N,data:$}){return $.getRowSpan(N)},cellClassRules:fn(Jl,(z=e.gridOptions)==null?void 0:z.rowClassRules),suppressFloatingFilterButton:!0,enableCellChangeFlash:!0,tooltipValueGetter(N){return N.valueFormatted},resizable:!0,sortable:!1,headerComponent:"HeaderRenderer",cellRenderer:"CellRenderer",valueGetter({column:N,data:$}){return $.getValue(N)},valueFormatter({value:N}){return N}},...Ql({options:e.gridOptions??{},elRef:i,editable:e.editable,onRowChange:e.onRowChange,onMessageError:e.onError,findOtherEditingCell:N=>c.value.getRows().find($=>$ instanceof Ii&&$.getRowId()!==N),isCellEditable:(N,$)=>{var Me;const oe=(Me=N.getColDef)==null?void 0:Me.call(N);return typeof(oe==null?void 0:oe.editable)=="function"?oe.editable({column:N,colDef:oe,node:$,data:$.data}):(oe==null?void 0:oe.editable)!==!1}}),onBodyScroll(N){W.left=N.left,W.top=N.top},...jl}}),W={left:0,top:0};return(K=t==null?void 0:t.onActivated)==null||K.call(t,()=>{}),{gridOptions:H,datasource:u,gridStyles:s,dataCache:c,gridApi:o,gridElRef:i,resetGridState:g,reload:m,insertRows:w,existRow:S,getRows:v,refresh:G,selectByIds:(B,z)=>Ay(o.value,B,z),deselectByIds:(B,z)=>My(o.value,B,z),getSelectedRows:()=>ky(o.value)}},id=(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,a=d=>{var c;return r(d)?{headerName:d.headerName,groupId:d.groupId,children:[...d.children.map(u=>a(u))]}:{width:d.width,headerName:d.headerName,field:d.field,cellRendererParams:{render:(c=d.cellRendererParams)==null?void 0:c.footerRender}}},l=E.computed(()=>{var d;return{scrollbarWidth:8,suppressRowTransform:!0,suppressRowHoverHighlight:!0,columnDefs:e.columns.map(c=>a(c)),defaultColGroupDef:{marryChildren:!0},rowSelection:(d=e.gridOptions)!=null&&d.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(c){return c.value}},onGridReady(c){i.value=c.api,c.api.setGridOption("popupParent",document.querySelector("body"))},alignedGrids:()=>{const c=t.value;if(!c)return[];const u=c.api??(typeof c.addEventListener=="function"?c:void 0);return u?[u]:[]}}});return{setFooterData:d=>{s.value=d},footerGridApi:i,footerData:s,footerStyles:n,footerGridOptions:l}};class Ly extends x{constructor(){super(...arguments);R(this,"beanName","selectionColSvc");R(this,"columns")}postConstruct(){this.addManagedPropertyListener("rowSelection",o=>{this.onSelectionOptionsChanged(o.currentValue,o.previousValue,Et(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),zc(o))}createColumns(o,i){var u,h;const s=()=>{var g;Uo(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,a=this.generateSelectionCols();if(Wc(a,((h=this.columns)==null?void 0:h.list)??[])&&r)return;s();const{colGroupSvc:l}=this.beans,d=(l==null?void 0:l.findDepth(o.tree))??0,c=(l==null?void 0:l.balanceTreeForAutoCols(a,d))??[];this.columns={list:a,tree:c,treeDepth:d,map:{}},i(g=>{if(!g)return null;const p=g.filter(f=>!st(f));return[...a,...p]})}updateColumns(o){var s;const i=Et(o.source);(s=this.columns)==null||s.list.forEach(n=>{const r=this.createSelectionColDef(o.currentValue);n.setColDef(r,null,i),be(this.beans,{state:[{...r,colId:n.getColId()}]},i)})}getColumn(o){var i;return((i=this.columns)==null?void 0:i.list.find(s=>Sr(s,o)))??null}getColumns(){var o;return((o=this.columns)==null?void 0:o.list)??null}isSelectionColumnEnabled(){var l,d;const{gos:o,beans:i}=this,s=o.get("rowSelection");if(typeof s!="object"||!et(o))return!1;const n=(((d=(l=i.autoColSvc)==null?void 0:l.getColumns())==null?void 0:d.length)??0)>0;if(s.checkboxLocation==="autoGroupColumn"&&n)return!1;const r=!!bt(s),a=Ho(s);return r||a}createSelectionColDef(o){const{gos:i}=this,s=o??i.get("selectionColumnDef"),n=i.get("enableRtl"),{rowSpan:r,spanRows:a,...l}=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,...l,colId:Cr,chartDataType:"excluded"}}generateSelectionCols(){if(!this.isSelectionColumnEnabled())return[];const o=this.createSelectionColDef(),i=o.colId;this.gos.validateColDef(o,i,!0);const s=new $e(o,null,i,!1);return this.createBean(s),[s]}onSelectionOptionsChanged(o,i,s){const n=i&&typeof i!="string"?bt(i):void 0,r=o&&typeof o!="string"?bt(o):void 0,a=n!==r,l=i&&typeof i!="string"?Ho(i):void 0,d=o&&typeof o!="string"?Ho(o):void 0,c=l!==d,u=Oo(o),h=Oo(i);(a||c||u!==h)&&this.beans.colModel.refreshAll(s)}destroy(){var o;Uo(this.beans,(o=this.columns)==null?void 0:o.tree),super.destroy()}refreshVisibility(o,i,s){var l,d;if(!((l=this.columns)!=null&&l.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 a=()=>{let c;switch(r.pinned){case"left":case!0:c=o;break;case"right":c=s;break;default:c=i}c&&Se(c,r)};((d=this.beans.rowNumbersSvc)!=null&&d.getColumn(mr)?2:1)===n&&a()}}const Mi="34.1.1";function sd(e){const t=e.get("rowSelection");return typeof t=="object"&&t.masterSelects||"self"}function ki(e){return!!(e.rowPinned&&e.pinnedSibling)}function Gy(e,t=!0){const o=e.get("rowSelection");return typeof o!="object"?t?"all":void 0:o.mode==="multiRow"?o.selectAll:"all"}function nd(e,t){return t===void 0?e("ariaIndeterminate","indeterminate"):t===!0?e("ariaChecked","checked"):e("ariaUnchecked","unchecked")}function ve(e,t,o,i){const s=t==="top";if(!o)return ve(e,t,s?e.getPinnedTopRow(0):e.getPinnedBottomRow(0),i);if(!i){const l=s?e.getPinnedTopRowCount():e.getPinnedBottomRowCount();return ve(e,t,o,s?e.getPinnedTopRow(l-1):e.getPinnedBottomRow(l-1))}let n=!1,r=!1;const a=[];return e.forEachPinnedRow(t,l=>{if(l===o&&!n){n=!0,a.push(l);return}if(n&&l===i){r=!0,a.push(l);return}n&&!r&&a.push(l)}),a}function Cn(e){return(e==null?void 0:e.hideDisabledCheckboxes)??!1}function rd(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 Hy(e){const t=rd(e);return t===!0||t==="enableDeselection"}function Oy(e){const t=rd(e);return t===!0||t==="enableSelection"}function By(e){const t=e.get("rowSelection");return typeof t=="string"?e.get("rowMultiSelectWithClick"):(t==null?void 0:t.enableSelectionWithoutKeys)??!1}function Vy(e,t){var n;if(!t.nodes.every(r=>r.rowPinned&&!ki(r)?(M(59),!1):r.id===void 0?(M(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 Ny(e,t,o="apiSelectAll"){var i;(i=e.selectionSvc)==null||i.selectAllRowNodes({source:o,selectAll:t})}function _y(e,t,o="apiSelectAll"){var i;(i=e.selectionSvc)==null||i.deselectAllRowNodes({source:o,selectAll:t})}function Wy(e){var t;return((t=e.selectionSvc)==null?void 0:t.getSelectedNodes())??[]}function zy(e){var t;return((t=e.selectionSvc)==null?void 0:t.getSelectedRows())??[]}const $y={tag:"div",cls:"ag-selection-checkbox",role:"presentation",children:[{tag:"ag-checkbox",ref:"eCheckbox",role:"presentation"}]};class Uy extends Y{constructor(){super($y,[Os]);R(this,"eCheckbox",I);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=nd(o,n),[a,l]=i.selectable?["ariaRowToggleSelection","Press Space to toggle row selection"]:["ariaRowSelectionDisabled","Row Selection is disabled for this row"],d=o(a,l);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:yt,click:i=>{var s;yt(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"?Cn(i):void 0,r=typeof s=="object"?Cn(s):void 0;n!==r&&this.onSelectableChanged()}),ls(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,a=this.getIsVisible();let l;if(typeof a=="function"){const g=s==null?void 0:s.callbackParams;if(!o)l=a({...g,node:i,data:i.data});else{const p=o.createColumnFunctionCallbackParams(i);l=a({...g,...p})}}else l=a??!1;const d=r&&!l||!r&&l,c=r||l,u=n.get("rowSelection"),h=u&&typeof u!="string"?!Cn(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"?bt(i):(n=(s=this.column)==null?void 0:s.getColDef())==null?void 0:n.checkboxSelection}}class Ky{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 ve(i,"top",t,void 0).concat(s.getNodesInRangeForSelection(s.getRow(0),o)??[]);if(t.rowPinned==="bottom"&&!o.rowPinned){const n=ve(i,"bottom",void 0,t),r=s.getRowCount(),a=s.getRow(r-1);return(s.getNodesInRangeForSelection(o,a)??[]).concat(n)}if(!t.rowPinned&&!o.rowPinned)return s.getNodesInRangeForSelection(t,o);if(t.rowPinned==="top"&&o.rowPinned==="top")return ve(i,"top",t,o);if(t.rowPinned==="bottom"&&o.rowPinned==="top"){const n=ve(i,"top",o,void 0),r=ve(i,"bottom",void 0,t),a=s.getRow(0),l=s.getRow(s.getRowCount()-1);return n.concat(s.getNodesInRangeForSelection(a,l)??[]).concat(r)}if(!t.rowPinned&&o.rowPinned==="top")return ve(i,"top",o,void 0).concat(s.getNodesInRangeForSelection(s.getRow(0),t)??[]);if(t.rowPinned==="top"&&o.rowPinned==="bottom"){const n=ve(i,"top",t,void 0),r=ve(i,"bottom",void 0,o),a=s.getRow(0),l=s.getRow(s.getRowCount()-1);return n.concat(s.getNodesInRangeForSelection(a,l)??[]).concat(r)}if(t.rowPinned==="bottom"&&o.rowPinned==="bottom")return ve(i,"bottom",t,o);if(!t.rowPinned&&o.rowPinned==="bottom"){const n=ve(i,"bottom",void 0,o),r=s.getRow(s.getRowCount());return(s.getNodesInRangeForSelection(t,r)??[]).concat(n)}return null}}class jy 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(Q(this.beans))&&(o.preventDefault(),i.setValue(!i.getValue()))}getCheckboxGui(){return this.cbSelectAll.getGui()}setComp(o){this.headerCellCtrl=o;const i=this.createManagedBean(new Sa);this.cbSelectAll=i,i.addCss("ag-header-select-all"),Ne(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 a=l=>typeof l=="string"||!l||l.mode==="singleRow"?void 0:l.selectAll;a(n)!==a(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,a=n.getValue(),l=nd(i,a),d=i("ariaRowSelectAll","Press Space to toggle all rows selection");s.setAriaDescriptionProperty("selectAll",r?`${d} (${l})`:null),n.setInputAriaLabel(i("ariaHeaderSelection","Column with Header Selection")),o||s.announceAriaDescription()}checkSelectionType(o){return Jt(this.gos)?!0:(M(128,{feature:o}),!1)}checkRightRowModelType(o){const{gos:i,rowModel:s}=this.beans;return ne(i)||Lo(i)?!0:(M(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 ad(s,o)&&this.checkRightRowModelType(n)&&this.checkSelectionType(n)}getSelectAllMode(){const o=Gy(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 ad({gos:e,selectionColSvc:t},o){const i=e.get("rowSelection"),s=o.getColDef(),{headerCheckboxSelection:n}=s;let r=!1;if(typeof i=="object"){const a=st(o),l=vr(o);(Oo(i)==="autoGroupColumn"&&l||a&&(t!=null&&t.isSelectionColumnEnabled()))&&(r=Ho(i))}else typeof n=="function"?r=n(_(e,{column:o,colDef:s})):r=!!n;return r}class qy extends x{constructor(){super(...arguments);R(this,"isRowSelectable");R(this,"selectionCtx")}postConstruct(){const{gos:o,beans:i}=this;this.selectionCtx=new Ky(i.rowModel,i.pinnedRowModel),this.addManagedPropertyListeners(["isRowSelectable","rowSelection"],()=>{const s=ls(o);s!==this.isRowSelectable&&(this.isRowSelectable=s,this.updateSelectable())}),this.isRowSelectable=ls(o),this.addManagedEventListeners({cellValueChanged:s=>this.updateRowSelectable(s.node),rowNodeDataChanged:s=>this.updateRowSelectable(s.node)})}destroy(){super.destroy(),this.selectionCtx.reset()}createCheckboxSelectionComponent(){return new Uy}createSelectAllFeature(o){if(ad(this.beans,o))return new jy(o)}isMultiSelect(){return Jt(this.gos)}onRowCtrlSelected(o,i,s){const n=!!o.rowNode.isSelected();o.forEachGui(s,r=>{r.rowComp.toggleCss("ag-row-selected",n);const a=r.element;Bi(a,n),a.contains(Q(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&&!ki(o)||!et(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(eo(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 a=o.childrenAfterGroup[r];let l=a.isSelected();if(!a.selectable){const d=this.calculateSelectedFromChildren(a);if(d===null)continue;l=d}switch(l){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,a=o.__selected===i;if(r||a)return!1;o.__selected=i,o.dispatchRowEvent("rowSelected");const l=o.sibling;l&&l.footer&&l.__localEventService&&l.dispatchRowEvent("rowSelected");const d=o.pinnedSibling;return d&&d.rowPinned&&d.__localEventService&&d.dispatchRowEvent("rowSelected"),this.eventSvc.dispatchEvent({...Vh(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=st(o)&&bt(s);return o.isColumnFunc(i,n)}else return o.isColumnFunc(i,o.colDef.checkboxSelection)}inferNodeSelections(o,i,s,n){const{gos:r,selectionCtx:a}=this,l=o.isSelected(),d=eo(r),c=Oy(r),u=Hy(r),h=this.isMultiSelect(),g=n==="rowClicked";if(g&&!(c||u))return null;if(i&&s&&h){const p=a.getRoot();if(p)if(p.isSelected()){const f=a.isInRange(o)?a.truncate(o):a.extend(o,d);return{deselect:f.discard,select:f.keep,reset:!1}}else{const f=a.extend(o,d);return{select:[],deselect:f.keep,reset:!1}}else return null}else if(i&&h){const p=a.selectAll?this.beans.rowModel.getRow(0):void 0,f=a.getRoot(p),C=a.isInRange(o)?a.truncate(o):a.extend(o,d);return{select:C.keep,deselect:C.discard,reset:a.selectAll||!!(f&&!f.isSelected())}}else if(s){if(g){const p=!l;return p&&!c||!p&&!u?null:(a.setRoot(o),{node:o,newValue:p,clearSelection:!1})}return a.setRoot(o),{node:o,newValue:!l,clearSelection:!h}}else{a.setRoot(o);const p=By(r),f=Vo(r)==="filteredDescendants",C=g&&(!p||!c);if(f&&l===void 0&&ne(r))return{node:o,newValue:!1,clearSelection:!h||C};if(g){const m=l?!p:c;return m===l&&!C||m&&!c||!m&&!u?null:{node:o,newValue:m,clearSelection:!h||C,keepDescendants:o.group&&d}}return{node:o,newValue:!l,clearSelection:!h||C}}}}class Yy extends qy{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=Bo(o),this.groupSelectsDescendants=eo(o),this.groupSelectsFiltered=Vo(o)==="filteredDescendants",this.masterSelectsDetail=sd(o)==="detail",this.addManagedPropertyListeners(["groupSelectsChildren","groupSelectsFiltered","rowSelection"],()=>{const i=eo(o),s=Bo(o),n=Vo(o)==="filteredDescendants";this.masterSelectsDetail=sd(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:a,keepDescendants:l=!1}){var c;if(!et(this.gos)&&o)return M(132),0;if(n.length===0)return 0;if(n.length>1&&!this.isMultiSelect())return M(130),0;let d=0;for(let u=0;u<n.length;u++){const h=n[u],g=Wt(h),p=this.groupSelectsFiltered&&g.group;if(g.rowPinned&&!ki(g)){M(59);continue}if(g.id===void 0){M(60);continue}p||this.selectRowNode(g,o,r,a)&&(this.detailSelection.delete(g.id),d++),this.groupSelectsDescendants&&((c=g.childrenAfterGroup)!=null&&c.length)&&(d+=this.selectChildren(g,o,a))}return s||(n.length===1&&a==="api"&&this.selectionCtx.setRoot(Wt(n[0])),o&&(i||!this.isMultiSelect())&&(d+=this.clearOtherNodes(Wt(n[0]),l,a)),d>0&&(this.updateGroupsFromChildrenSelections(a),this.dispatchSelectionChanged(a))),d}selectRange(o,i,s){let n=0;return o.forEach(r=>{const a=Wt(r);a.group&&this.groupSelectsDescendants||this.selectRowNode(a,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(!ne(s))return!1;const r=n.rootNode;if(!r)return!1;i||(i=new wi(!0,r),i.active=!1);let a=!1;return i.forEachChangedNodeDepthFirst(l=>{if(l!==r){const d=this.calculateSelectedFromChildren(l);a=this.selectRowNode(l,d===null?!1:d,void 0,o)||a}}),a}clearOtherNodes(o,i,s){const n=new Map;let r=0;return this.selectedNodes.forEach(a=>{const l=a.id==o.id;if((!i||!Qy(o,a))&&!l){const d=this.selectedNodes.get(a.id);r+=this.setNodesSelected({nodes:[d],newValue:!1,clearSelection:!1,suppressFinishActions:!0,source:s}),this.groupSelectsDescendants&&a.parent&&n.set(a.parent.id,a.parent)}}),n.forEach(a=>{const l=this.calculateSelectedFromChildren(a);this.selectRowNode(a,l===null?!1:l,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 ro(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(!ne(o))return;const s=i.getTopLevelNodes();if(s===null)return;const n=[];function r(a){for(let l=0,d=a.length;l<d;l++){const c=a[l];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=ne(this.gos);let n=!1;const r=a=>{const l=this.selectRowNode(Wt(a),!1,void 0,o);n||(n=l)};if(i==="currentPage"||i==="filtered"){if(!s){j(102);return}this.getNodesToSelect(i).forEach(r)}else this.selectedNodes.forEach(r),this.reset(o);if(this.selectionCtx.selectAll=!1,s&&this.groupSelectsDescendants){const a=this.updateGroupsFromChildrenSelections(o);n||(n=a)}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 ld(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 a=l=>{var d;s(l),(d=l.childrenAfterFilter)==null||d.forEach(a)};a(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 a=n;a<=r;a++){const l=s.getRow(a);l&&o(l)}}selectAllRowNodes(o){const{gos:i,selectionCtx:s}=this;if(!et(i)){M(132);return}if(yc(i)&&!Jt(i)){M(130);return}if(!this.canSelectAll())return;const{source:n,selectAll:r}=o;let a=!1;if(this.getNodesToSelect(r).forEach(l=>{const d=this.selectRowNode(Wt(l),!0,void 0,n);a||(a=d)}),s.selectAll=!0,ne(i)&&this.groupSelectsDescendants){const l=this.updateGroupsFromChildrenSelections(n);a||(a=l)}a&&this.dispatchSelectionChanged(n)}getSelectionState(){return this.isEmpty()?null:Array.from(this.selectedNodes.keys())}setSelectionState(o,i,s){if(o||(o=[]),!Array.isArray(o)){j(103);return}const n=new Set(o),r=[];this.beans.rowModel.forEachNode(a=>{n.has(a.id)&&r.push(a)}),s&&this.resetNodes(),this.setNodesSelected({newValue:!0,nodes:r,source:i})}canSelectAll(){const{gos:o}=this.beans;return!!ne(o)}updateSelectable(o){var c;const{gos:i,rowModel:s}=this.beans;if(!et(i))return;const n="selectableChanged",r=o!==void 0,a=ne(i)&&this.groupSelectsDescendants,l=[],d=u=>{var h;if(!(r&&!u.group)){if(a&&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()&&l.push(u)}};if(a){if(o===void 0){const u=s.rootNode;o=u?new wi(!1,u):void 0}o==null||o.forEachChangedNodeDepthFirst(d,!r,!r)}else s.forEachNode(d);l.length&&this.setNodesSelected({nodes:l,newValue:!1,source:n}),!r&&a&&((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,a;if(!this.masterSelectsDetail)return;const s=(a=(r=o.detailNode)==null?void 0:r.detailGridInfo)==null?void 0:a.api;if(!s)return;const n=Zy(s);if(o.isSelected()!==n&&this.selectRowNode(o,n,i,"masterDetail")&&this.dispatchSelectionChanged("masterDetail"),!n){const l=this.detailSelection.get(o.id)??new Set;for(const d of s.getSelectedNodes())l.add(d.id);this.detailSelection.set(o.id,l)}}setDetailSelectionState(o,i,s){if(this.masterSelectsDetail){if(!Jt(i)){M(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 a of n){const l=s.getRowNode(a);l&&r.push(l)}s.setNodesSelected({nodes:r,newValue:!0,source:"masterDetail"})}break}}}}dispatchSelectionChanged(o){this.eventSvc.dispatchEvent({type:"selectionChanged",source:o,selectedNodes:this.getSelectedNodes(),serverSideState:null})}}function Wt(e){return ki(e)?e.pinnedSibling:e.footer?e.sibling:e}function Zy(e){let t=0,o=0;return e.forEachNode(i=>{i.isSelected()?t++:i.selectable&&o++}),ld(t,o)}function ld(e,t){if(e===0&&t===0)return!1;if(!(e>0&&t>0))return e>0}function Qy(e,t){let o=t.parent;for(;o;){if(o===e)return!0;o=o.parent}return!1}const dd={moduleName:"SharedRowSelection",version:Mi,beans:[Ly],apiFunctions:{setNodesSelected:Vy,selectAll:Ny,deselectAll:_y,getSelectedNodes:Wy,getSelectedRows:zy}},cd={moduleName:"RowSelection",version:Mi,rowModels:["clientSide","infinite","viewport"],beans:[Yy],dependsOn:[dd]},Xy="ROOT_NODE_ID";class Jy 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=Xy,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=Go(this.gos),n=!this.gos.get("suppressMaintainUnsortedOrder"),r=o.changedRowNodes,a=new Set,l=this.rootNode,d=l.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))}a.add(b)}const f=[];for(let m=0;m<c;m++){const w=d[m];a.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(a.size);let w=0;if(!n)for(let v=0;v<c;++v){const b=d[v];a.delete(b)&&(b.sourceRowIndex=w,m[w++]=b)}for(const v of a)v.sourceRowIndex=w,m[w++]=v;l.allLeafChildren=m;const S=l.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=Go(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 a=s.length,l=i.changedRowNodes,d=new Array(a);for(let g=0;g<a;g++){const p=this.createRowNode(s[g],r+g);l.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:a}=i;if(!(a!=null&&a.length))return;const l={};a.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(),l[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=>!l[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:a}=i;a!=null&&a.length&&a.forEach(l=>{const d=this.lookupRowNode(o,l);d&&(d.updateData(l),!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 ro(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]&&M(2,{nodeId:s.id}),this.allNodesMap[s.id]=s,this.nextId++,s}lookupRowNode(o,i){var n,r;let s;if(o){const a=o({data:i,level:0});if(s=this.allNodesMap[a],!s)return j(4,{id:a}),null}else if(s=(r=(n=this.rootNode)==null?void 0:n.allLeafChildren)==null?void 0:r.find(a=>a.data===i),!s)return j(5,{data:i}),null;return s||null}}class eR extends Jy{constructor(){super(...arguments);R(this,"beanName","csrmNodeSvc")}}class mn{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 tR(e){e.sibling&&(e.sibling.childrenAfterFilter=e.childrenAfterFilter)}function oR(e){if(q(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 ud(e){e.sibling&&(e.sibling.childrenAfterSort=e.childrenAfterSort),oR(e)}class iR 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=A(s)&&s.length>0,r=n&&!!o.changedRowNodes&&this.gos.get("deltaSort"),a=s.some(({column:l})=>xe(i.gos)?l.isPrimary()&&l.isRowGroupActive():!!l.getColDef().showRowGroup);this.sort(i,s,n,r,o.changedRowNodes,o.changedPath,a)}sort(o,i,s,n,r,a,l){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 F,P,H;const D=m&&b.leafGroup,T=f&&C&&!b.leafGroup&&!l;let G;if(T){const W=((P=(F=u==null?void 0:u.columns)==null?void 0:F[b.level+1])==null?void 0:P.getSort())===null,K=b.childrenAfterAggFilter.slice(0);if(b.childrenAfterSort&&!W){const B={};b.childrenAfterSort.forEach((z,N)=>{B[z.id]=N}),K.sort((z,N)=>(B[z.id]??0)-(B[N.id]??0))}G=K}else!s||D?G=b.childrenAfterAggFilter.slice(0):n&&r?G=sR(h,b,r,a,i):G=b.childrenAfterAggFilter.slice(0);if(S||(S=((H=b.childrenAfterSort)==null?void 0:H[0])!==G[0]),b.childrenAfterSort=G,ud(b),w){const W={nodes:b.childrenAfterSort};w(W)}};if(a==null||a.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 sR(e,t,o,i,s){const n=t.childrenAfterAggFilter,r=t.childrenAfterSort;if(!r)return e.doFullSort(n,s);const a=new Set,l=[],{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)?l.push({currentPos:l.length,rowNode:p}):a.add(p.id)}const u=r.filter(h=>a.has(h.id)).map((h,g)=>({currentPos:g,rowNode:h}));return l.sort((h,g)=>e.compareRowNodes(s,h,g)),nR(e,s,l,u)}function nR(e,t,o,i){const s=[];let n=0,r=0;const a=o.length,l=i.length;for(;n<a&&r<l;){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<a;)s.push(o[n++].rowNode);for(;r<l;)s.push(i[r++].rowNode);return s}class rR 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",fe(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 ro(this.beans);const s=this.getNewNodeManager();this.nodeManager=s,s.activate(this.rootNode)}getNewNodeManager(){const{gos:o,beans:i}=this;return Fc(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,a=!1;do{r=!1;const l=this.getRowIndexAtPixel(o),d=this.getRowIndexAtPixel(i),c=Math.max(l,s),u=Math.min(d,n);for(let h=c;h<=u;h++){const g=this.getRow(h);if(g.rowHeightEstimated){const p=ze(this.beans,g);g.setRowHeight(p.height),r=!0,a=!0}}r&&this.setRowTopAndRowIndex()}while(r);return a}onPropChange(o){if(!this.rootNode)return;const i=this.gos,s=new Set(o),n={step:"nothing",changedProps:s},r=s.has("rowData"),a=this.nodeManager,l=this.getNewNodeManager(),d=a!==l||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,M(1))),d&&(r||(c=(a==null?void 0:a.extractRowData())??c),a!==l&&(a==null||a.deactivate(),this.nodeManager=l),l.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 mn,l.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,l.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,a=ie(this.gos,"normal");for(let l=0,d=i.length;l<d;++l){const c=i[l];if(c.id!=null&&r.add(c.id),c.rowHeight==null){const u=ze(o,c,a,s);c.setRowHeight(u.height,u.estimated)}c.setRowTop(n),c.setRowIndex(l),n+=c.rowHeight}return r}clearRowTopAndRowIndex(o,i){const s=o.active,n=a=>{a&&a.id!=null&&!i.has(a.id)&&a.clearRowTopAndRowIndex()},r=a=>{if(a!==null&&(n(a),n(a.detailNode),n(a.sibling),a.hasChildren()&&a.childrenAfterGroup)){const l=a.level==-1;s&&!l&&!a.expanded||a.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=l=>{let d=n[l];if(this.gos.get("groupHideOpenParents"))for(;d.expanded&&d.childrenAfterSort&&d.childrenAfterSort.length>0;)d=d.childrenAfterSort[0];return d.rowIndex},{footerSvc:a}=this.beans;return a?a.getTopDisplayIndex(s,o,n,r):r(o)}getTopLevelIndexFromDisplayedIndex(o){var a;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=(a=i.childrenAfterSort)==null?void 0:a.findIndex(l=>l===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=St(this.gos);this.refreshModel({step:"map",keepRenderedRows:!0,animate:o})}onFilterChanged(o){if(o.afterDataChange)return;const i=St(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=St(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 wi(!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 a,l,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,(a=i.masterDetailSvc)==null||a.refreshModel(o),s&&o.step!=="group"&&((l=i.colFilter)==null||l.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=[],a=eo(this.gos);return this.forEachNodeAfterFilterAndSort(l=>{if(!n){if(s&&(l===i||l===o)&&(n=!0,l.group&&a)){r.push(...l.allLeafChildren);return}if(!s){if(l!==i&&l!==o)return;s=!0}if(!l.group||!a){r.push(l);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(U(i).rowTop<=o)return i.length-1;let r=-1,a=-1;for(;;){const l=Math.floor((s+n)/2),d=i[l];if(this.isRowInPixel(d,o)||(d.rowTop<o?s=l+1:d.rowTop>o&&(n=l-1),r===s&&a===n))return l;r=s,a=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 a=s?"childrenAfterSort":"childrenAfterGroup";this.depthFirstSearchRowNodes(o,i,l=>l.leafGroup?null:l[a])}depthFirstSearchRowNodes(o,i=!1,s=a=>a.childrenAfterGroup,n=this.rootNode,r=0){let a=r;if(!n)return a;const l=n===this.rootNode;l||o(n,a++);const{footerSvc:d}=this.beans;if(n.hasChildren()&&!n.footer){const c=s(n);if(c){a=(d==null?void 0:d.addTotalRows(a,n,o,i,l,"top"))??a;for(const u of c)a=this.depthFirstSearchRowNodes(o,i,s,u,a);return(d==null?void 0:d.addTotalRows(a,n,o,i,l,"bottom"))??a}}return a}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),ud(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,tR(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(ws)===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,a;(r=this.valueCache)==null||r.onDataChanged();const o=[],i=[],s=new mn;let n=!1;(a=this.rowDataTransactionBatch)==null||a.forEach(l=>{this.rowNodesCountReady=!0;const{rowNodeTransaction:d,rowsInserted:c}=this.nodeManager.updateRowData(l.rowDataTransaction,s);c&&(n=!0),i.push(d),l.callback&&o.push(l.callback.bind(null,d))}),this.commitTransactions(n,s),o.length>0&&window.setTimeout(()=>{o.forEach(l=>l())},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 mn,{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=pr,this.rowsToDisplay=pr}onRowHeightChangedDebounced(){this.onRowHeightChanged_debounced()}}function aR(e){var t;(t=e.expansionSvc)==null||t.onGroupExpandedOrCollapsed()}function lR(e,t){const o=Ae(e);o&&((!t||t==="everything")&&(t="group"),o.refreshModel({step:t,keepRenderedRows:!0,animate:!e.gos.get("suppressAnimationFrame")}))}function dR(e){var t;return((t=Ae(e))==null?void 0:t.isEmpty())??!0}function cR(e,t){var o;(o=Ae(e))==null||o.forEachLeafNode(t)}function uR(e,t){var o;(o=Ae(e))==null||o.forEachNodeAfterFilter(t)}function hR(e,t){var o;(o=Ae(e))==null||o.forEachNodeAfterFilterAndSort(t)}function gR(e){var t,o;if((t=e.rowAutoHeight)!=null&&t.active){M(3);return}(o=Ae(e))==null||o.resetRowHeights()}function pR(e,t){return e.frameworkOverrides.wrapIncoming(()=>{var o;return(o=Ae(e))==null?void 0:o.updateRowData(t)})}function fR(e,t,o){e.frameworkOverrides.wrapIncoming(()=>{var i;return(i=Ae(e))==null?void 0:i.batchUpdateRowData(t,o)})}function CR(e){e.frameworkOverrides.wrapIncoming(()=>{var t;return(t=Ae(e))==null?void 0:t.flushAsyncTransactions()})}function mR(e){var t;return(t=e.selectionSvc)==null?void 0:t.getBestCostNodeSelection()}const hd={moduleName:"ClientSideRowModel",version:Mi,rowModels:["clientSide"],beans:[eR,rR,iR],dependsOn:[fl]},gd={moduleName:"ClientSideRowModelApi",version:Mi,apiFunctions:{onGroupExpandedOrCollapsed:aR,refreshClientSideRowModel:lR,isRowDataEmpty:dR,forEachLeafNode:cR,forEachNodeAfterFilter:uR,forEachNodeAfterFilterAndSort:hR,resetRowHeights:gR,applyTransaction:pR,applyTransactionAsync:fR,flushAsyncTransactions:CR,getBestCostNodeSelection:mR},dependsOn:[rb]};class bo{static getComponentDefinition(t,o){let i;return typeof t=="string"?i=this.searchForComponentInstance(o,t):i={extends:E.defineComponent({...t})},i||j(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=bo.getComponentDefinition(t,i);if(!n)return;const{vm:r,destroy:a,el:l}=this.mount(n,{params:Object.freeze(o)},i,s||{});return{componentInstance:r,element:l,destroy:a}}static mount(t,o,i,s){let n=new E({beforeCreate(){s?(this._provided=Object.create(i.proxy._provided||null),Object.keys(s).forEach(l=>{this._provided[l]=s[l]})):this._provided=i.proxy._provided||{};const a=i.proxy.$root;a&&a.$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(a){return a(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,a=t.proxy.$parent;for(;!n&&a&&a.components&&++r<i;)a.components&&a.components[o]&&(n=a.components[o]),a=a.$parent;for(r=0,a=t.proxy.$parent;!n&&a&&a.$options&&++r<i;){const l=a;l.$options&&l.$options.components&&l.$options.components[o]?n=l.$options.components[o]:l[o]&&(n=l[o]),a=a.$parent}for(r=0,a=t.proxy.$parent;!n&&a&&++r<i;){if(a.exposed){const l=a;l.exposed&&l.exposed[o]?n=l.exposed[o]:l[o]&&(n=l[o])}a=a.$parent}return n||E.options&&E.options.components&&E.options.components[o]&&(n=E.options.components[o]),!n&&!s?(j(114,{component:o}),null):n}}var wR=Object.defineProperty,vR=(e,t,o)=>t in e?wR(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,yo=(e,t,o)=>vR(e,typeof t!="symbol"?t+"":t,o);class SR extends _v{constructor(t,o){super(),yo(this,"parent"),yo(this,"provides"),this.parent=t,this.provides=o}createWrapper(t){const o=this;class i extends bR{init(r){super.init(r)}hasMethod(r){return s.getFrameworkComponentInstance()[r]}callMethod(r,a){var l,d;const c=this.getFrameworkComponentInstance(),u=s.getFrameworkComponentInstance();if(u[r])return u[r].apply(c,a);{const h=((l=c.$.exposed)==null?void 0:l[r])||((d=c.exposed)==null?void 0:d[r])||c.$.setupState[r];return h==null?void 0:h.apply(c,a)}}addMethod(r,a){s[r]=a}processMethod(r,a){return r==="refresh"&&(this.getFrameworkComponentInstance().params=a[0]),this.hasMethod(r)?this.callMethod(r,a):r==="refresh"}createComponent(r){return o.createComponent(t,r)}}const s=new i;return s}createComponent(t,o){return bo.createAndMountComponent(t,o,this.parent,this.provides)}createMethodProxy(t,o,i){return function(){return t.hasMethod(o)?t.callMethod(o,arguments):(i&&M(233,{methodName:o}),null)}}destroy(){this.parent=null}}class bR{constructor(){yo(this,"componentInstance"),yo(this,"element"),yo(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 yR=Object.defineProperty,RR=(e,t,o)=>t in e?yR(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,ER=(e,t,o)=>RR(e,t+"",o);class xR extends Ta{constructor(t){super("vue"),ER(this,"parent"),this.parent=t}frameworkComponent(t,o){let i=bo.searchForComponentInstance(this.parent,t,10,!0)?t:null;if(!i&&o&&o[t]){const s=o[t];i=bo.searchForComponentInstance(this.parent,s,10,!0)?s:null}return i}isFrameworkComponent(t){return typeof t=="object"}}function DR(){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 FR=(e,t)=>{let o;return()=>{const i=function(){e()};window.clearTimeout(o),o=window.setTimeout(i,t)}};function PR(e){return e&&e.constructor&&e.constructor.toString().substring(0,5)==="class"}function Ro(e){const t=new WeakSet,o=i=>{if(PR(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 TR=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},DR()),emits:["update:modelValue"],setup(e,{expose:t,emit:o}){const i=e,s=E.ref(),n=E.ref(void 0),r=E.ref(!1),a=E.ref(!1),l=E.ref(!1),d=E.ref({}),c=E.ref(null),u=E.toRefs(i);nn().filter(F=>F!="gridOptions").forEach(F=>{E.watch(()=>u[F],(P,H)=>{(F==="rowData"&&!f.value||F!=="rowData")&&T(F,P),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,F=>{g.value=F}),E.watch(g,(F,P)=>{r.value&&(f.value||(p.value=!0,T("rowData",Ro(F),Ro(P))),f.value=!1)},{deep:!0});const C=FR(()=>{f.value=!0,o("update:modelValue",b())},10),m=E.getCurrentInstance(),w=F=>{var P;l.value&&h.has(F)&&(P=m==null?void 0:m.proxy)!=null&&P.$props["onUpdate:modelValue"]&&C()},S=()=>{var F;(i.rowData||(F=i.gridOptions)!=null&&F.rowData)&&g.value&&M(232)},v=()=>{var F;return g.value||i.rowData||((F=i.gridOptions)==null?void 0:F.rowData)},b=()=>{const F=[];return n==null||n.value.forEachLeafNode(P=>{F.push(P.data)}),F},D=F=>P=>{if(a.value)return;P==="gridReady"&&(l.value=!0);const H=po.has(P);H&&!F||!H&&F||h.has(P)&&(p.value||w(P),p.value=!1)},T=(F,P,H)=>{if(r.value){let W=P.value||P;F==="rowData"&&W!=null&&(W=Ro(W)),d.value[F]=W,c.value==null&&(c.value=window.setTimeout(()=>{c.value=null,Dc(d.value,n.value),d.value={}},0))}},G=()=>Object.create(E.getCurrentInstance().proxy._provided);return E.onMounted(()=>{Ft(Bl,void 0,!0);const F=new SR(E.getCurrentInstance(),G()),P={globalListener:D(),globalSyncListener:D(!0),frameworkOverrides:new xR(E.getCurrentInstance()),providedBeanInstances:{frameworkCompWrapper:F},modules:i.modules},H=E.markRaw(xc(Ro(i.gridOptions),i,[...nn(),...Object.values(yi)])),W=v();W!==void 0&&(H.rowData=Ro(W)),n.value=Lv(s.value,H,P),r.value=!0}),E.onUnmounted(()=>{var F;r.value&&((F=n==null?void 0:n.value)==null||F.destroy(),a.value=!0)}),t({api:n}),{__sfc:!0,props:i,rootRef:s,api:n,gridCreated:r,isDestroyed:a,gridReadyFired:l,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:T,getProvides:G}}});function ae(e,t,o,i,s,n,r,a){var l=typeof e=="function"?e.options:e;return t&&(l.render=t,l.staticRenderFns=o,l._compiled=!0),n&&(l._scopeId="data-v-"+n),{exports:e,options:l}}var IR=function(){var t=this,o=t._self._c;return t._self._setupProxy,o("div",{ref:"rootRef"})},AR=[],MR=ae(TR,IR,AR,!1,null,"60566900");const pd=MR.exports,kR=e=>{const t=E.getCurrentInstance(),o={id:e.id,rowIdMapper:e.rowIdMapper,columns:e.columns,rowData:e.rowData,pageSize:e.pageSize,enableCursorPage:e.enableCursorPage,gridOptions:e.gridOptions,footerHeight:e.footerHeight,editable:e.editable,onRowChange:e.onRowChange,onError:i=>Md.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 od(o)},fd={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)}},LR={functional:!0,props:{params:{type:Object,required:!0}},render(e,t){const o=e("",{});return o.text=`${t.props.params.column.getColId()} holder`,o}},GR=E.defineComponent({name:"CellRenderer"}),HR=E.defineComponent({...GR,props:{params:null},setup(e){const t=e,o=E.computed(()=>{const r=t.params.data,a=r.isEditing()&&t.params.editeRender?t.params.editeRender:t.params.render,l={...t.params,render:a};if(r instanceof Nt){const d=r.getCell(l.column);if(!d)return l.render=t.params.render,l;const{hostArray:c,hostObject:u}=r.getHostObject(l);r.getActualRow().isCellEditing(t.params.node.id,t.params.column)||(l.render=t.params.render),l.hostObject=u,l.hostArrayHook=g=>{var p;let f=c;((p=l.colDef)==null?void 0:p.cellDataType)==="array"&&!c&&(f=[],O.set(r.getData(),d.path,f)),f&&(g(f),r.buildSpan(),l.context.reload(),l.api.redrawRows({rowNodes:l.api.getRenderedNodes().filter(C=>r.match(C))}))}}return l}),i=E.computed(()=>{const r=t.params.data,a=r.getActualRow();if(a.isEditing()&&t.params.editeRender){const d=a.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:fd,CellHolder:LR}}});var OR=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}})},BR=[],VR=ae(HR,OR,BR,!1,null,null);const NR=VR.exports,_R=E.defineComponent({name:"GridToolbar"}),WR=E.defineComponent({..._R,setup(e){return{__sfc:!0}}});var zR=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)])},$R=[],UR=ae(WR,zR,$R,!1,null,"f12c2536");const Cd=UR.exports,KR=E.defineComponent({__name:"FooterCellRender",props:{params:null},setup(e){return{__sfc:!0,props:e,VNodeRenderer:fd}}});var jR=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)},qR=[],YR=ae(KR,jR,qR,!1,null,"4998e205");const ZR=YR.exports,QR=E.defineComponent({name:"SearchItem",props:{search:{type:Object,required:!0},teleported:{type:Boolean}},setup(e){return()=>e.search.render(e.search)}});var XR=ae(QR,null,null,!1,null,"e1931525");const wn=XR.exports,JR=E.defineComponent({name:"ClSearch"}),eE=E.defineComponent({...JR,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}))))},a=()=>{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})},l=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 l()};return E.onBeforeMount(()=>{a()}),{__sfc:!0,searchForm:o,props:t,loading:i,reset:s,persistenceKey:n,doPersistence:r,restore:a,doSearch:l,handleReset:d,SearchItem:wn}}});var tE=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)])},oE=[],iE=ae(eE,tE,oE,!1,null,"962588ec");const sE=iE.exports,md=(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),a=E.computed(()=>Array.isArray(o)?o.some(h=>!r(h.value)):!r(o==null?void 0:o.value)),l=E.computed(()=>[s.value?"is-loading":""]),d=E.computed(()=>a.value?"var(--el-color-primary)":void 0);return{visible:i,loading:s,width:n,loadingClass:l,hasCondition:a,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)}}},nE=E.defineComponent({name:"ClPopoverSearch"}),rE=E.defineComponent({...nE,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:a,doSearch:l,reset:d}=md(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:a,doSearch:l,reset:d,popoverWidth:c,SearchItem:wn}}});var aE=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()},lE=[],dE=ae(rE,aE,lE,!1,null,null);const cE=dE.exports,uE=E.defineComponent({name:"ClDrawerSearch"}),hE=E.defineComponent({...uE,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:a}=md(t.searchRemote,t,t.search);return E.onMounted(()=>{t.attached||a()}),{__sfc:!0,props:t,visible:o,loading:i,loadingClass:s,hasConditionColor:n,doSearch:r,reset:a,SearchItem:wn}}});var gE=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)},pE=[],fE=ae(hE,gE,pE,!1,null,null);const wd=fE.exports;var CE=Object.defineProperty,mE=(e,t,o)=>t in e?CE(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,wE=(e,t,o)=>mE(e,t+"",o);class vn{constructor(t){wE(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 vn(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 vE=E.defineComponent({name:"SearchButton"}),SE=E.defineComponent({...vE,props:{searches:null},setup(e){const t=e,o=E.inject(gt);return{__sfc:!0,props:t,context:o,ClDrawerSearch:wd}}});var bE=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}})},yE=[],RE=ae(SE,bE,yE,!1,null,"45be5dfc");const vd=RE.exports,EE=E.defineComponent({name:"RefreshButton"}),xE=E.defineComponent({...EE,setup(e){const t=E.ref(!1),{refresh:o}=E.inject(gt);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 DE=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":""]})])},FE=[],PE=ae(xE,DE,FE,!1,null,"0eaeb325");const Sd=PE.exports;function bd(e,t){const o=t(e);return TE(e)&&(o.children=e.children.map(i=>bd(i,t))),o}const TE=e=>!!e.children,IE=()=>{const e=E.inject(gt),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`)},a=()=>{var C,m;o.value=(m=(C=e.api.value.getColumnDefs())==null?void 0:C.map(w=>bd(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())},l=(C,m,w)=>w!=="inner"&&C.parent===m.parent,d=()=>{s.value=t.value.getCheckedKeys()},c=C=>{if(C instanceof $e)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:a,checkColumnAllowDrop:l,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 T=u(w,D,b);e.api.value.moveColumns(D,T)}}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),a()},columnAutoResize:()=>{e.api.value.sizeColumnsToFit()}}},AE=E.defineComponent({name:"SettingButton"}),ME=E.defineComponent({...AE,setup(e){const{treeRef:t,treeData:o,defaultCheckedKeys:i,refreshTreeData:s,checkColumnAllowDrop:n,onColumnDragStart:r,onColumnDragFinish:a,onColumnVisibleChange:l,onColumnPinedChange:d,columnAutoResize:c}=IE(),u=E.ref(!1),h=E.inject(gt);return{__sfc:!0,treeRef:t,treeData:o,defaultCheckedKeys:i,refreshTreeData:s,checkColumnAllowDrop:n,onColumnDragStart:r,onColumnDragFinish:a,onColumnVisibleChange:l,onColumnPinedChange:d,columnAutoResize:c,visible:u,gridContext:h,handleResetGridState:()=>{h.resetGridState(),s()}}}});var kE=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)},LE=[],GE=ae(ME,kE,LE,!1,null,"522bf761");const yd=GE.exports,HE={functional:!0,name:"HeaderVNodeRender",props:["params"],render(e,t){const o=t.props.params;return o.headerRender?o.headerRender(o):e("span",o.displayName)}},OE=E.defineComponent({name:"HeaderRenderer"}),BE=E.defineComponent({...OE,props:{params:null},setup(e){const t=e,o=E.ref(),i=E.ref(-1),s=E.inject(gt),n=()=>{o.value=t.params.column.getSort(),i.value=Wl(t.params.api,t.params.column.getColId())},r=async(a,l)=>{try{o.value=a,t.params.setSort(a,l.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:HE}}});var VE=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)},NE=[],_E=ae(BE,VE,NE,!1,null,"126699e0");const WE=_E.exports,zE=E.defineComponent({name:"GridEmptyDataOverlay"}),$E=E.defineComponent({...zE,setup(e){return{__sfc:!0}}});var UE=function(){var t=this,o=t._self._c;return t._self._setupProxy,o("el-empty",{attrs:{description:"没有数据了","image-size":75}})},KE=[],jE=ae($E,UE,KE,!1,null,"05fc87c0");const qE=jE.exports,YE=E.defineComponent({name:"GridLoadingOverlay"}),ZE=E.defineComponent({...YE,setup(e){return{__sfc:!0}}});var QE=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)"}})},XE=[],JE=ae(ZE,QE,XE,!1,null,"c60c1386");const e0=JE.exports,t0=(e,t,o)=>{const i=id({columns:e.columns,gridOptions:e.gridOptions,footerHeight:e.footerHeight},t,o);return{...i,footerGridOptions:i.footerGridOptions}},o0=()=>({theme:E.ref("ag-theme-alpine")}),i0=E.defineComponent({name:"Grid",components:{SearchButton:vd,RefreshButton:Sd,SettingButton:yd,CellRenderer:NR,GridEmptyDataOverlay:qE,HeaderRenderer:WE,GridLoadingOverlay:e0,AgGridVue:pd,GridToolbar:Cd,FooterCellRender:ZR}}),s0=E.defineComponent({...i0,props:{id:null,rowIdMapper:{type:Function},columns:null,rowData:{type:Function},pageSize:{default:50},enableCursorPage:{type:Boolean,default:!1},footerHeight:null,tools:{default:()=>["search","refresh","setting"]},searches:null,gridOptions:{default:()=>({})},editable:null,onRowChange:{type:Function}},setup(e,{expose:t}){const o=e,i=E.ref(),s=E.ref(),{theme:n}=o0(),{gridOptions:r,dataCache:a,gridStyles:l,gridApi:d,gridElRef:c,reload:u,insertRows:h,existRow:g,getRows:p,refresh:f,resetGridState:C}=kR(o),{footerGridOptions:m,setFooterData:w,footerStyles:S}=t0(o,s,l);return E.provide(gt,{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=a.value.createRow(v);return b?new Ti(D,o.rowIdMapper,!0):D},existRow:g,insertRows:h,startEditing:()=>{const v=a.value.getRows().filter(b=>!b.isEditing());O.isEmpty(v)||(v.forEach(b=>b.startEditing()),u(),d.value.redrawRows())},stopEditing:()=>{const v=a.value.getRows().filter(b=>b.isEditing());O.isEmpty(v)||(v.forEach(b=>b.stopEditing()),u(),d.value.redrawRows())},deselectAll:(v,b)=>{d.value.deselectAll(v,b)}}),{__sfc:!0,props:o,bottomRef:i,gridRef:s,theme:n,options:r,dataCache:a,gridStyles:l,gridApi:d,gridElRef:c,reload:u,insertRows:h,existRow:g,getRows:p,refresh:f,resetGridState:C,footerGridOptions:m,setFooterData:w,footerStyles:S,AgGridVue:pd,GridToolbar:Cd,SearchButton:vd,RefreshButton:Sd,SettingButton:yd}}});var n0=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)},r0=[],a0=ae(s0,n0,r0,!1,null,null);const l0=a0.exports;var d0=Object.defineProperty,c0=(e,t,o)=>t in e?d0(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,Eo=(e,t,o)=>c0(e,typeof t!="symbol"?t+"":t,o);const u0=e=>new Rd(e);class Rd{constructor(t){Eo(this,"colDef"),Eo(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 h0=e=>new Ed(e);class Ed{constructor(t){Eo(this,"colDefs"),Eo(this,"rendersMap",new Map),Eo(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)Yl.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 g0=(e,t)=>({model:{value:O.get(e,t),callback:o=>{O.set(e,t,o)}}});Hd({theme:"legacy"});const p0={install:()=>{Ku.registerModules([ZS,QS,XS,JS,tb,eb,Eb,lb,nS,za,Bl,Lb,Wb,jb,ey,cd,wv,cy,Cy,uy,yy,bv,wb,Fl,Ry,xy,of,ay,gd,hd,ob])}};k.ActualRow=vo,k.CLEAN_AG_GRID_OPTIONS=jl,k.CellEditableRow=Ii,k.CellRenderAdapter=Rd,k.CellValue=_t,k.ClDrawerSearch=wd,k.ClPopoverSearch=cE,k.ClSearch=sE,k.ClientSideRowModelApiModule=gd,k.ClientSideRowModelModule=hd,k.ColumnRendersBuilder=Ed,k.EditableRow=Ti,k.GRID_CONTEXT=gt,k.Grid=l0,k.GridDataCache=Kl,k.GridDataSource=zl,k.GridUtils=Yl,k.ID_FIRST_DEEP=ql,k.ID_SPLITTER=Ai,k.ProjectionRow=Nt,k.RowSelectionModule=cd,k.RowSpans=pn,k.Searches=vn,k.ServerGetRowsParamsRequest=Ye,k.SharedRowSelectionModule=dd,k.SpanMatrix=Ul,k.VueGridPlugin=p0,k._getColumnSortIndexe=Wl,k._getSortedColumns=gn,k._getSortedColumnsIndexes=_l,k.buildProxyOptions=Ql,k.defaultColDefCellClassRules=Jl,k.isActualRow=Ty,k.isGridRow=Py,k.mergeRowClass=fn,k.selectionColumnCellClassRules=Xl,k.useFooter=id,k.useGrid=od,k.useGridScroll=ed,k.useGridState=Zl,k.vModel=g0,k.withColumnRenderBuilder=h0,k.withRender=u0,Object.defineProperty(k,Symbol.toStringTag,{value:"Module"})});
58
+ If you are trying to annotate ${i} with application data, use the '${i}.context' property instead.`),Zt(c)}if(a.length>0&&s){const l=this.beans.frameworkOverrides.getDocLink(s);Zt(`to see all the valid ${i} properties please check: ${l}`)}}getConsoleMessage(e,t){return Mv(e,t)}};function iS(e,t,o){const i={},s=e.filter(n=>!t.some(r=>r===n));return s.length>0&&s.forEach(n=>i[n]=dn({inputValue:n,allSuggestions:o}).values),i}var sS=new Set(["firstChildChanged","lastChildChanged","childIndexChanged"]),nS={moduleName:"Validation",version:L,beans:[oS]},xi=0,rS=200,aS=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(),a=this.getParentRect();this.setAlignedTo(t,o);let l=!1;const d=()=>{const c=this.keepXYWithinBounds(o,r.top-a.top,0),u=o.clientWidth>0?o.clientWidth:200;l||(o.style.minWidth=`${u}px`,l=!0);const g=a.right-a.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-a.left-2}function C(){return r.left-a.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:a="over",column:l,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 a==="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,l,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,a={width:0,height:0},l=(d=!1)=>{let{x:c,y:u}=r();d&&t.clientWidth===a.width&&t.clientHeight===a.height||(a.width=t.clientWidth,a.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(l(),!n){const d=Je(this.beans,t,()=>l(!0));setTimeout(()=>d(),rS)}}getActivePopups(){return this.popupList.map(e=>e.element)}getParentRect(){const e=te(this.beans);let t=this.getPopupParent();return t===e.body?t=e.documentElement:getComputedStyle(t).position==="static"&&(t=t.offsetParent),Bn(t)}keepXYWithinBounds(e,t,o){const i=o===0,s=i?"clientHeight":"clientWidth",n=i?"top":"left",r=i?"height":"width",a=i?"scrollTop":"scrollLeft",l=te(this.beans),d=l.documentElement,c=this.getPopupParent(),u=e.getBoundingClientRect(),h=c.getBoundingClientRect(),g=l.documentElement.getBoundingClientRect(),p=c===l.body,f=Math.ceil(u[r]);let m=p?(i?sc:Yi)(d)+d[a]: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=te(this.beans),{eChild:o,ariaLabel:i,ariaOwns:s,alwaysOnTop:n,positionCallback:r,anchorToElement:a}=e;if(!t)return M(122),{hideFunc:()=>{}};const l=this.getPopupIndex(o);if(l!==-1)return{hideFunc:this.popupList[l].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,a),{hideFunc:c}}initialisePopupPosition(e){const o=this.getPopupParent().getBoundingClientRect();A(e.style.top)||(e.style.top=`${o.top*-1}px`),A(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,a=ee({tag:"div"});return n.applyThemeClasses(a),a.classList.add("ag-popup"),e.classList.add(r.get("enableRtl")?"ag-rtl":"ag-ltr","ag-popup-child"),e.hasAttribute("role")||Ne(e,"dialog"),o?Ut(e,o):i&&(e.id||(e.id=`popup-component-${xi}`),In(i,e.id)),a.appendChild(e),s.appendChild(a),t?this.setAlwaysOnTop(e,!0):this.bringPopupToFront(e),a}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=te(t),i=this.getPopupParent(),{wrapperEl:s,eChild:n,closedCallback:r,afterGuiAttached:a,closeOnEsc:l,modal:d,ariaOwns:c}=e;let u=!1;const h=C=>{if(!s.contains(Q(t)))return;C.key===y.ESCAPE&&!Ge(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 a&&a({hidePopup:f}),window.setTimeout(()=>{l&&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:xi,isAnchored:!!i}),i&&this.setPopupPositionRelatedToElement(e,i),xi=xi+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&&In(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),a=(u,h)=>{const g=o[u]-n[u],p=r(s.style[u]);return{initialDiff:g,lastDiff:g,initial:p,last:p,direction:h}},l=a("top",0),d=a("left",1),c=this.beans.frameworkOverrides;return new oo(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(l,"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 a=this.popupList[r];if(Ic(a.element,s))return!0}return this.isElementWithinCustomPopup(s.target)}isElementWithinCustomPopup(e){const t=te(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 a=[],l=r.length,u=s.classList.contains("ag-always-on-top")||!l?[...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&&a.push([f,f.scrollTop])}),h===0?t.insertAdjacentElement("afterbegin",g):u[h-1].insertAdjacentElement("afterend",g)}for(;a.length;){const h=a.pop();h[0].scrollTop=h[1]}}},Dl={moduleName:"Popup",version:L,beans:[aS]},lS=".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}}",hn=(e,t,o)=>{var a,l,d;const{editModelSvc:i}=e,s=(l=(a=i==null?void 0:i.getCellValidationModel())==null?void 0:a.getCellValidation(t))==null?void 0:l.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},dS=class extends x{constructor(){super(...arguments),this.beanName="tooltipSvc"}setupHeaderTooltip(e,t,o,i){e&&t.destroyBean(e);const s=un(this.gos),{column:n,eGui:r}=t,a=n.getColDef();!i&&s&&!a.headerComponent&&(i=Io(()=>r.querySelector(".ag-header-cell-text")));const l={getColumn:()=>n,getColDef:()=>n.getColDef(),getGui:()=>r,getLocation:()=>"header",getTooltipValue:()=>o??n.getColDef().headerTooltip,shouldDisplayTooltip:i};let d=this.createTooltipFeature(l);return d&&(d=t.createBean(d),t.setRefreshFunction("tooltip",()=>d.refreshTooltip())),d}setupHeaderGroupTooltip(e,t,o,i){e&&t.destroyBean(e);const s=un(this.gos),{column:n,eGui:r}=t,a=n.getColGroupDef();!i&&s&&!(a!=null&&a.headerGroupComponent)&&(i=Io(()=>r.querySelector(".ag-header-group-text")));const l={getColumn:()=>n,getGui:()=>r,getLocation:()=>"headerGroup",getTooltipValue:()=>o??(a&&a.headerTooltip),shouldDisplayTooltip:i};a&&(l.getColDef=()=>a);const d=this.createTooltipFeature(l);return d&&t.createBean(d)}enableCellTooltipFeature(e,t,o){const{beans:i}=this,{gos:s,editSvc:n}=i,{column:r,rowNode:a}=e;let l="cell";const d=()=>{const g=!!!(n!=null&&n.isEditing(e))&&hn(i,e,this.getLocaleTextFunc());if(g)return l="cellEditor",g;l="cell";const p=r.getColDef(),f=a.data;if(p.tooltipField&&A(f))return $t(f,p.tooltipField,r.isTooltipFieldContainsDots());const C=p.tooltipValueGetter;return C?C(_(s,{location:"cell",colDef:r.getColDef(),column:r,rowIndex:e.cellPosition.rowIndex,node:a,data:a.data,value:e.value,valueFormatted:e.valueFormatted})):null},c=un(s);o||(c&&!e.isCellRenderer()?o=()=>{const h=!!(n!=null&&n.isEditing(e));if(!h&&hn(i,e,this.getLocaleTextFunc()))return!0;if(!r.isTooltipEnabled())return!1;const f=Io(()=>{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:()=>a,getGui:()=>e.eGui,getLocation:()=>l,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 a=this.createTooltipFeature(s,n);if(a)return t.createBean(a,r)}setupCellEditorTooltip(e,t){var a,l;const{beans:o}=this,{context:i}=o,s=((a=t.getValidationElement)==null?void 0:a.call(t,!0))||!((l=t.isPopup)!=null&&l.call(t))&&e.eGui;if(!s)return;const n={getGui:()=>s,getTooltipValue:()=>hn(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=A(t.tooltipField)||A(t.tooltipValueGetter)||A(t.tooltipComponent)}createTooltipFeature(e,t){return this.beans.registry.createDynamicBean("tooltipFeature",!1,e,t)}},Fl={moduleName:"Tooltip",version:L,beans:[dS],dynamicBeans:{tooltipFeature:jv},userComponents:{agTooltipComponent:zv},dependsOn:[Dl],css:[lS]},cS=".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}",uS={tag:"div",cls:"ag-cell-wrapper ag-cell-edit-wrapper ag-checkbox-edit",children:[{tag:"ag-checkbox",ref:"eEditor",role:"presentation"}]},hS=class extends mi{constructor(){super(uS,[Os]),this.eEditor=I}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=An(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}},Di=class extends mi{constructor(e){super(),this.cellEditorInput=e,this.eEditor=I}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,a=!0;i?(this.focusAfterAttached=!0,s===y.BACKSPACE||s===y.DELETE?r="":s&&s.length===1?n?a=!1:r=s:(r=t.getStartValue(),s!==y.F2&&(this.highlightAllOnFocus=!0))):(this.focusAfterAttached=!1,r=t.getStartValue()),a&&r!=null&&o.setStartValue(r),this.addGuiEventListener("keydown",l=>{const{key:d}=l;(d===y.PAGE_UP||d===y.PAGE_DOWN)&&l.preventDefault()})}afterGuiAttached(){var i,s;const e=this.getLocaleTextFunc(),t=this.eEditor;if(t.setInputAriaLabel(e("ariaInputEditor","Input Editor")),!this.focusAfterAttached)return;ft()||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()}},gS={tag:"ag-input-date-field",ref:"eEditor",cls:"ag-cell-editor"},pS=class{constructor(e,t){this.getDataTypeService=e,this.getLocaleTextFunc=t}getTemplate(){return gS}getAgComponents(){return[Pa]}init(e,t){var r,a;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??((a=(r=this.getDataTypeService())==null?void 0:r.getDateIncludesTimeFlag)==null?void 0:a.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 a=this.getLocaleTextFunc();if(t instanceof Date&&!isNaN(t.getTime())){if(i){const l=i instanceof Date?i:new Date(i);if(t<l){const d=l.toLocaleDateString();r.push(a("minDateValidation",`Date must be after ${d}`,[d]))}}if(s){const l=s instanceof Date?s:new Date(s);if(t>l){const d=l.toLocaleDateString();r.push(a("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!A(o)&&!A(t.value)?t.value:o??null}getStartValue(){const{value:e}=this.params;if(e instanceof Date)return Ke(e,this.includeTime??!1)}},fS=class extends Di{constructor(){super(new pS(()=>this.beans.dataTypeSvc,()=>this.getLocaleTextFunc()))}},CS={tag:"ag-input-date-field",ref:"eEditor",cls:"ag-cell-editor"},mS=class{constructor(e,t){this.getDataTypeService=e,this.getLocaleTextFunc=t}getTemplate(){return CS}getAgComponents(){return[Pa]}init(e,t){var r,a;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??((a=(r=this.getDataTypeService())==null?void 0:r.getDateIncludesTimeFlag)==null?void 0:a.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 a=[];if(i){const l=new Date(i),d=this.getLocaleTextFunc();if(s){const c=new Date(s);if(l<c){const u=c.toLocaleDateString();a.push(d("minDateValidation",`Date must be after ${u}`,[u]))}}if(n){const c=new Date(n);if(l>c){const u=c.toLocaleDateString();a.push(d("maxDateValidation",`Date must be before ${u}`,[u]))}}}return a.length||(a=null),r?r({value:this.getValue(),cellEditorParams:t,internalErrors:a}):a}getValue(){const{params:e,eEditor:t}=this,o=this.formatDate(t.getDate());return!A(o)&&!A(e.value)?e.value:e.parseValue(o??"")}getStartValue(){return Ke(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):ao(e)??void 0}formatDate(e){const t=this.getDataTypeService();return t?t.getDateFormatterFunction(this.params.column)(e):Ke(e??null,this.includeTime??!1)??void 0}},wS=class extends Di{constructor(){super(new mS(()=>this.beans.dataTypeSvc,()=>this.getLocaleTextFunc()))}},vS={tag:"div",cls:"ag-large-text",children:[{tag:"ag-input-text-area",ref:"eEditor",cls:"ag-large-text-input"}]},SS=class extends mi{constructor(){super(vS,[up]),this.eEditor=I}initialiseEditor(e){const{eEditor:t}=this,{cellStartedEdit:o,eventKey:i,value:s,maxLength:n,cols:r,rows:a}=e;this.focusAfterAttached=o,t.getInputElement().setAttribute("title",""),t.setMaxLength(n||200).setCols(r||60).setRows(a||10);let l;o?(this.focusAfterAttached=!0,i===y.BACKSPACE||i===y.DELETE?l="":i&&i.length===1?l=i:(l=s.toString(),i!==y.F2&&(this.highlightAllOnFocus=!0))):(this.focusAfterAttached=!1,l=s.toString()),l!=null&&t.setValue(l,!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!A(i)&&!A(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}},bS={tag:"ag-input-number-field",ref:"eEditor",cls:"ag-cell-editor"},yS=class{constructor(e){this.getLocaleTextFunc=e}getTemplate(){return bS}getAgComponents(){return[gp]}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 a=[];return typeof n=="number"&&(t!=null&&n<t&&a.push(r("minValueValidation",`Must be greater than or equal to ${t}.`,[String(t)])),o!=null&&n>o&&a.push(r("maxValueValidation",`Must be less than or equal to ${o}.`,[String(o)]))),a.length||(a=null),i?i({value:n,cellEditorParams:e,internalErrors:a}):a}preventStepping(e){(e.key===y.UP||e.key===y.DOWN)&&e.preventDefault()}getValue(){const{eEditor:e,params:t}=this,o=e.getValue();if(!A(o)&&!A(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(){ft()&&this.eEditor.getInputElement().focus({preventScroll:!0})}},RS=class extends Di{constructor(){super(new yS(()=>this.getLocaleTextFunc()))}},ES={tag:"div",cls:"ag-cell-edit-wrapper",children:[{tag:"ag-select",ref:"eEditor",cls:"ag-cell-editor"}]},xS=class extends mi{constructor(){super(ES,[bp]),this.eEditor=I,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(q(s)){M(58);return}this.startedByEnter=r!=null?r===y.ENTER:!1;let a=!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),a=a||n===u}),a?t.setValue(e.value,!0):e.values.length&&t.setValue(e.values[0],!0);const{valueListGap:l,valueListMaxWidth:d,valueListMaxHeight:c}=e;l!=null&&t.setPickerGap(l),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}},DS={tag:"ag-input-text-field",ref:"eEditor",cls:"ag-cell-editor"},FS=class{constructor(e){this.getLocaleTextFunc=e}getTemplate(){return DS}getAgComponents(){return[dp]}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!A(o)&&!A(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=A(t)&&t.length||0;o&&e.getInputElement().setSelectionRange(o,o)}},Pl=class extends Di{constructor(){super(new FS(()=>this.getLocaleTextFunc()))}};function PS(e){return e.ctrlsSvc.getScrollFeature().getVScrollPosition()}function TS(e){return e.ctrlsSvc.getScrollFeature().getHScrollPosition()}function Tl(e,t,o="auto"){e.frameworkOverrides.wrapIncoming(()=>e.ctrlsSvc.getScrollFeature().ensureColumnVisible(t,o),"ensureVisible")}function Il(e,t,o){e.frameworkOverrides.wrapIncoming(()=>e.ctrlsSvc.getScrollFeature().ensureIndexVisible(t,o),"ensureVisible")}function IS(e,t,o=null){e.frameworkOverrides.wrapIncoming(()=>e.ctrlsSvc.getScrollFeature().ensureNodeVisible(t,o),"ensureVisible")}function AS(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:a}=n;s.forEach((l,d)=>{const{editorValue:c,pendingValue:u,sourceValue:h,state:g}=l,p=Ue(l);let f=c??u;f===Ce&&(f=void 0);const C={newValue:f,oldValue:h,state:g,column:d,colId:d.getColId(),colKey:d.getColId(),rowIndex:r,rowPinned:a};(g==="editing"||g==="changed"&&p)&&o.push(C)})}),o}function MS(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)}):at(e,!0),Tt(e)):o==null||o.stopEditing(void 0,{cancel:t,source:"api"})}function kS(e,t){var i;const o=Z(e,t);return((i=e.editSvc)==null?void 0:i.isEditing(o))??!1}function LS(e,t){const{key:o,colKey:i,rowIndex:s,rowPinned:n}=t,{editSvc:r,colModel:a}=e,l=a.getCol(i);if(!l){M(12,{colKey:i});return}const c=rt(e,{rowIndex:s,rowPinned:n||null});if(!c){M(290,{rowIndex:s,rowPinned:n});return}if(!l.isCellEditable(c))return;n==null&&Il(e,s),Tl(e,i),r==null||r.startEditing({rowNode:c,column:l},{event:o?new KeyboardEvent("keydown",{key:o}):void 0,source:"api"})}function GS(e){var t;return((t=e.editSvc)==null?void 0:t.validateEdit())||null}var HS={tag:"div",cls:"ag-popup-editor",attrs:{tabindex:"-1"}},OS=class extends Gs{constructor(e){super(HS),this.params=e}postConstruct(){tt(this.gos,this.getGui(),"popupEditorWrapper",!0),this.addKeyDownListener()}addKeyDownListener(){const e=this.getGui(),t=this.params,o=i=>{Fs(this.gos,i,t.node,t.column,!0)||t.onKeyDown(i)};this.addManagedElementListeners(e,{keydown:o})}},Fi=(e,t=!1)=>{if(e!==void 0)return Ue(e)||t&&e.state==="editing"};function Al(e,t,o=!1){var i;return Fi((i=e.editModelSvc)==null?void 0:i.getEdit(t),o)}function Ml(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(Fi(o==null?void 0:o.getEdit({rowNode:n,column:i}))||Fi(o==null?void 0:o.getEdit({rowNode:n.pinnedSibling,column:i})))return!0}function kl(e,{rowNode:t,column:o}){var i;if(t=t.pinnedSibling,!!t)return Fi((i=e.editModelSvc)==null?void 0:i.getEdit({rowNode:t,column:o}))}var BS=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=Al(o,e)||Ml(o,e)||kl(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)}},VS=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 a=Array.from(s.keys()).some(l=>{const d={rowNode:i,column:l};return Al(o,d,!0)||Ml(o,d)||kl(o,d)});this.applyStyle(n,a);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)})}},NS=({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},_S=({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}))})},WS=e=>()=>{const t=new Set(e.colModel.getCols()),o=e.editModelSvc.getEditMap(!0),i=new Set(o.keys());_S(e,NS(e,i),t)},zS=new Set(["undo","redo"]),Ll={paste:"ui",rangeSvc:"ui",fillHandle:"api",cellClear:"api"},$S=new Set(Object.keys(Ll)),US=new Set(["paste","rangeSvc","renderer","cellClear","redo","undo"]),Pi={cancel:!0,source:"api"},KS={cancel:!1,source:"api"},Vt={checkSiblings:!0},wo={force:!0,suppressFlash:!0},jS=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,Pi),this.createStrategy(i)});const t=WS(e),o=()=>{const i=this.model.getCellValidationModel().getCellValidationMap().size>0,s=this.model.getRowValidationModel().getRowValidationMap().size>0;return i||s?this.stopEditing(void 0,Pi):this.isEditing()&&(this.isBatchEditing()?Tt(e,this.model.getEditPositions()):this.stopEditing(void 0,KS)),!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,Pi)):(this.stopEditing(void 0,Pi),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 ch(this.beans)}isEditing(e,t){return this.model.hasEdits(e,t??Vt)}isRowEditing(e,t){return(e&&this.model.hasRowEdits(e,t))??!1}startEditing(e,t){var l;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=Z(this.beans,e);if(r&&!r.comp){r.onCompAttachedFuncs.push(()=>this.startEditing(e,t));return}const a=(l=this.shouldStartEditing)==null?void 0:l.call(this,e,i,o,s);if(a===!1&&s!=="api"){this.isEditing(e)&&this.stopEditing();return}!this.batch&&this.shouldStopEditing(e,void 0,s)&&this.stopEditing(void 0,{source:s}),a&&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:a}=this;if($S.has(s))return this.isBatchEditing()?(this.bulkRefresh(e),!1):this.stopEditing(e,{...t,source:Ll[s]});if(!(this.isEditing(e)||this.isBatchEditing()&&a.hasEdits(e,Vt))||!this.strategy)return!1;const d=Z(r,e);d&&(d.onEditorAttachedFuncs=[]);let c=a.getEditMap(!0),u=!1;const h=!i&&!!this.shouldStopEditing(e,o,s),g=i&&!!this.shouldCancelEditing(e,o,s);if(h||g){at(r,!0);const m=a.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?at(r,!0):S&&this.revertSingleCellEdit(d),this.isBatchEditing()?(C=this.strategy)==null||C.cleanupEditors():Tt(r,a.getEditPositions(),{event:o}),o.preventDefault(),this.bulkRefresh(e,c,{suppressFlash:!0}),c=a.getEditMap())}else at(r,!0),c=a.getEditMap();return u&&e&&this.model.removeEdits(e),!n&&d&&this.navigateAfterEdit(o instanceof KeyboardEvent&&o.shiftKey,d.cellPosition),Cs(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,a,l;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=Z(i,g),f=Ue(h),C=(l=(a=(r=p==null?void 0:p.comp)==null?void 0:r.getCellEditor())==null?void 0:a.isCancelAfterEnd)==null?void 0:l.call(a);!t&&!C&&f&&!s&&(this.setNodeDataValue(d,u,h.pendingValue)||n.push(g)),p==null||p.refreshCell(wo)}}n.forEach(d=>{this.model.clearEditValue(d)})}setNodeDataValue(e,t,o,i){const{beans:s}=this,n=Z(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(wo)),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(wo)}dispatchEditValuesChanged({rowNode:e,column:t},o={}){if(!e||!t||!o)return;const{pendingValue:i,sourceValue:s}=o,{rowIndex:n,rowPinned:r,data:a}=e;this.beans.eventSvc.dispatchEvent({type:"cellEditValuesChanged",node:e,rowIndex:n,rowPinned:r,column:t,source:"api",data:a,newValue:i,oldValue:s,value:i,colDef:t.getColDef()})}bulkRefresh(e={},t,o={}){var a;const{beans:i,gos:s}=this,{editModelSvc:n,rowModel:r}=i;ne(s)&&(e.rowNode&&e.column?this.refCell(e,this.model.getEdit(e),o):t&&((a=n==null?void 0:n.getEditMap(!1))==null||a.forEach((l,d)=>{for(const c of l.keys())this.refCell({rowNode:d,column:c},l.get(c),o)})))}refCell({rowNode:e,column:t},o,i={}){var u;const{beans:s,gos:n}=this,r=new Set([e]),a=new Set,l=e.pinnedSibling;l&&r.add(l);const d=e.sibling;d&&a.add(d);let c=e.parent;for(;c;)(u=c.sibling)!=null&&u.footer&&n.get("groupTotalRow")||!c.parent&&c.sibling&&n.get("grandTotalRow")?a.add(c.sibling):a.add(c),c=c.parent;r.forEach(h=>this.dispatchEditValuesChanged({rowNode:h,column:t},o)),r.forEach(h=>{var g;return(g=Z(s,{rowNode:h,column:t}))==null?void 0:g.refreshCell(i)}),a.forEach(h=>{var g;return(g=Z(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 a=Z(this.beans,e);return this.cellEditingInvalidCommitBlocks()?((i=t==null?void 0:t.preventDefault)==null||i.call(t),o&&(!(a!=null&&a.hasBrowserFocus())&&(a==null||a.focusCell()),(r=(n=(s=a==null?void 0:a.comp)==null?void 0:s.getCellEditor())==null?void 0:n.focusIn)==null||r.call(n)),"block-stop"):(a&&this.revertSingleCellEdit(a),"revert-continue")}return"continue"}revertSingleCellEdit(e,t=!1){var i,s,n,r,a;const o=Z(this.beans,e);(i=o==null?void 0:o.comp)!=null&&i.getCellEditor()&&(Tt(this.beans,[e],{silent:!0}),this.model.clearEditValue(e),Pt(this.beans,e,{silent:!0}),lt(this.beans),o==null||o.refreshCell(wo),(s=o.rowCtrl.rowEditStyleFeature)==null||s.applyRowStyles(),t&&(o==null||o.focusCell(),(a=(r=(n=o==null?void 0:o.comp)==null?void 0:n.getCellEditor())==null?void 0:r.focusIn)==null||a.call(r)))}hasValidationErrors(e){var i;lt(this.beans);const t=Z(this.beans,e);t&&(t.refreshCell(wo),(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 a;let s;const n=this.isEditing(),r=n&&this.checkNavWithValidation(void 0,o)==="block-stop";return e instanceof At&&n&&(s=(a=this.strategy)==null?void 0:a.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===Ce||!i?this.valueSvc.getValue(t,e,!0,"api"):n}getRowDataValue(e,t){return this.model.getEditRowDataValue(e,t)}addStopEditingWhenGridLosesFocus(e){sh(this,this.beans,e)}createPopupEditorWrapper(e){return new OS(e)}setDataValue(e,t,o){var r;if((!this.isEditing()||o==="commit")&&!US.has(o))return;const{beans:i}=this;this.strategy??(this.strategy=this.createStrategy());const s=this.isBatchEditing()?"ui":"api";if(!o||zS.has(o))return Jo(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 Jo(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 Jo(i,e,!0,t),this.stopEditing(e,{source:s,suppressNavigateAfterEdit:!0}),!0}handleColDefChanged(e){ah(this.beans,e)}destroy(){this.model.clear(),this.destroyStrategy(),super.destroy()}prepDetailsDuringBatch(e,t){if(!this.batch||!this.model.hasRowEdits(e.rowNode,Vt))return;const{rowNode:i,column:s}=e,{compDetails:n,valueToDisplay:r}=t;if(n){const{params:l}=n;return l.data=this.model.getEditRowDataValue(i,Vt),{compDetails:n}}const a=this.model.getEditRow(e.rowNode,Vt);if(r!==void 0&&(a!=null&&a.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 _(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;at(i,!0);const r=this.model.getEditMap(!0),a=(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=rt(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,a,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(),Cs(i),this.bulkRefresh();return}this.stopEditing(void 0,{source:"api"}),this.eventSvc.dispatchEvent({type:"bulkEditingStopped",changes:this.toEventChangeList(r)})}),this.bulkRefresh();const l=Z(i,{rowNode:e,column:t});l&&l.focusCell(!0)}createCellStyleFeature(e,t){return new BS(e,t)}createRowStyleFeature(e,t){return new VS(e,t)}setEditingCells(e,t){const{beans:o}=this,{colModel:i,valueSvc:s}=o,n=new Map;e.forEach(({colId:r,column:a,colKey:l,rowIndex:d,rowPinned:c,newValue:u,state:h})=>{const g=r?i.getCol(r):l?i.getCol(l):a;if(!g)return;const p=rt(o,{rowIndex:d,rowPinned:c});if(!p)return;const f=s.getValue(g,p,!0,"api");if(!Ue({pendingValue:u,sourceValue:f})&&h!=="editing")return;let C=n.get(p);C||(C=new Map,n.set(p,C)),u===void 0&&(u=Ce),C.set(g,{editorValue:void 0,pendingValue:u,sourceValue:f,state:h??"changed"})}),this.setEditMap(n,t)}onCellFocused(e){var n;const t=Z(this.beans,e);if(!t||!this.isEditing(t,Vt))return;const o=this.model.getEdit(t);if(!o||!Ue(o))return;const s=this.getLocaleTextFunc()("ariaPendingChange","Pending Change");(n=this.beans.ariaAnnounce)==null||n.announceValue(s,"pendingChange")}allowedFocusTargetOnValidation(e){return Z(this.beans,e)}},Gl=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=Z(s,o));const{gos:r,editModelSvc:a}=s,l=e.type==="cellFocusCleared";if(i.isEditing(void 0,{withOpenEditor:!0})){const{column:d,rowIndex:c,rowPinned:u}=e,h={column:d,rowNode:rt(s,{rowIndex:c,rowPinned:u})},g=r.get("invalidEditValueMode")==="block";if(g)return;const p=!g,f=!!(a!=null&&a.getCellValidationModel().hasCellValidation(h)),C=p&&f;(o||l?i.stopEditing(void 0,{cancel:C,source:l&&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 a;i.all.push(n);const r=this.model.getCellValidationModel().getCellValidation(n);if((((a=r==null?void 0:r.errorMessages)==null?void 0:a.length)??0)>0){i.fail.push(n);return}i.pass.push(n)}),e)return o.forEach(n=>{ei(this.beans,n),this.model.stop(n)}),!0;const s=this.processValidationResults(i);return s.destroy.length>0&&s.destroy.forEach(n=>{ei(this.beans,n,{event:t}),this.model.stop(n)}),s.keep.length>0&&s.keep.forEach(n=>{var a;const r=Z(this.beans,n);(a=this.editSvc)!=null&&a.cellEditingInvalidCommitBlocks()||r&&this.editSvc.revertSingleCellEdit(r)}),!0}cleanupEditors({rowNode:e}={},t){at(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)}),Tt(this.beans,i),Cs(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;rh(this.beans,e,t,n,i,o)}dispatchCellEvent(e,t,o,i){const s=Z(this.beans,e);s&&this.eventSvc.dispatchEvent({...s.createEvent(t??null,o),...i})}dispatchRowEvent(e,t){const o=ps(this.beans,e);o&&this.eventSvc.dispatchEvent(o.createRowEvent(t))}shouldStart({column:e},t,o,i="ui"){var l;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)&&((l=this.beans.rangeSvc)==null?void 0:l.getCellRanges().length)!=0)return!1;const n=e==null?void 0:e.getColDef(),r=this.deriveClickCount(n),a=t==null?void 0:t.type;return a==="click"&&(t==null?void 0:t.detail)===1&&r===1||a==="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,a)=>{r.state==="editing"&&o.push({...r,rowNode:n,column:a})})}),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===Ce?void 0:s.pendingValue;this.start(s,new KeyboardEvent("keydown",{key:n}),"api");const r=Z(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()}},qS=class extends Gl{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(!ps(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(a=>{if(!a.isCellEditable(s))return;const l={rowNode:s,column:a};r.push(l),this.model.hasEdits(l)||this.model.start(l)}),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 a of n.values())if(Ue(a)){i.push(r);break}}}),lt(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=Z(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 a=r.cellPosition,l=e.isCellEditable(),d=r.isCellEditable(),c=a&&n.rowIndex===a.rowIndex&&n.rowPinned===a.rowPinned;l&&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()||Pt(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=Z(this.beans,{rowNode:t,column:i});s&&!((n=s.comp)!=null&&n.getCellEditor())&&Pt(this.beans,s,{silent:!0})}))}destroy(){super.destroy(),this.rowNode=void 0,this.startedRows.length=0}},YS=class extends Gl{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=rt(this.beans,{rowIndex:i,rowPinned:n}),a=fs(s),l=t.getCol(a),d=e.previousParams;if(d){const c=fs(d.column);if((d==null?void 0:d.rowIndex)===i&&c===a&&(d==null?void 0:d.rowPinned)===n)return}o!=null&&o.isEditing({rowNode:r,column:l},{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 a=this.beans.gos.get("editType")==="fullRow";a&&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{a&&this.model.suspend(!1)}if(r===!1)return null;if(r==null)return!1;const l=r.cellPosition,d=e.isCellEditable(),c=r.isCellEditable(),u=l&&n.rowIndex===l.rowIndex&&n.rowPinned===l.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()||(Pt(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}},ht={moduleName:"EditCore",version:L,beans:[Zu,jS],apiFunctions:{getEditingCells:AS,getCellEditorInstances:nh,startEditingCell:LS,stopEditing:MS,isEditing:kS,validateEdit:GS},dynamicBeans:{singleCell:YS,fullRow:qS},dependsOn:[Dl,Fl],css:[cS]},ZS={moduleName:"TextEditor",version:L,userComponents:{agCellEditor:Pl,agTextCellEditor:Pl},dependsOn:[ht]},QS={moduleName:"NumberEditor",version:L,userComponents:{agNumberCellEditor:{classImp:RS}},dependsOn:[ht]},XS={moduleName:"DateEditor",version:L,userComponents:{agDateCellEditor:fS,agDateStringCellEditor:wS},dependsOn:[ht]},JS={moduleName:"CheckboxEditor",version:L,userComponents:{agCheckboxCellEditor:hS},dependsOn:[ht]},eb={moduleName:"SelectEditor",version:L,userComponents:{agSelectCellEditor:xS},dependsOn:[ht]},tb={moduleName:"LargeTextEditor",version:L,userComponents:{agLargeTextCellEditor:SS},dependsOn:[ht]},ob={moduleName:"CustomEditor",version:L,dependsOn:[ht]};function ib(e){var t;(t=e.expansionSvc)==null||t.expandAll(!0)}function sb(e){var t;(t=e.expansionSvc)==null||t.expandAll(!1)}function nb(e){const t=Ae(e),o=Ov(e);t?t.onRowHeightChanged():o&&o.onRowHeightChanged()}var rb={moduleName:"CsrmSsrmSharedApi",version:L,apiFunctions:{expandAll:ib,collapseAll:sb,onRowHeightChanged:nb}},ab=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){j(18),t||j(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||j(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":M(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 a=this.getMasterColumns(e);switch(e.type){case"columnMoved":{const h=e.api.getColumnState().map(g=>({colId:g.colId}));be(i,{state:h,applyOrder:!0},"alignedGridChanged")}break;case"columnVisible":{const h=e.api.getColumnState().map(g=>({colId:g.colId,hide:g.hide}));be(i,{state:h},"alignedGridChanged")}break;case"columnPinned":{const h=e.api.getColumnState().map(g=>({colId:g.colId,pinned:g.pinned}));be(i,{state:h},"alignedGridChanged")}break;case"columnResized":{const u=e,h={};a.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)})}},lb={moduleName:"AlignedGrids",version:L,beans:[ab],dependsOn:[za]},db="↑",cb="↓",ub={tag:"span",children:[{tag:"span",ref:"eDelta",cls:"ag-value-change-delta"},{tag:"span",ref:"eValue",cls:"ag-value-change-value"}]},hb=class extends Y{constructor(){super(ub),this.eValue=I,this.eDelta=I,this.refreshCount=0}init(e){this.refresh(e,!0)}showDelta(e,t){const o=Math.abs(t),i=e.formatValue(o),s=A(i)?i:o,n=t>=0,r=this.eDelta;n?r.textContent=db+s:r.textContent=cb+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"),pe(this.eDelta)}refresh(e,t=!1){var d;const{value:o,valueFormatted:i}=e,{eValue:s,lastValue:n,beans:r}=this;if(o===n||(A(i)?s.textContent=i:A(o)?s.textContent=o:pe(s),(d=r.filterManager)!=null&&d.isSuppressFlashingCellsBecauseFiltering()))return!1;const a=o&&typeof o=="object"&&"toNumber"in o?o.toNumber():o,l=n&&typeof n=="object"&&"toNumber"in n?n.toNumber():n;if(a===l)return!1;if(typeof a=="number"&&typeof l=="number"){const c=a-l;this.showDelta(e,c)}return n&&s.classList.add("ag-value-change-value-highlight"),t||this.setTimerToRemoveDelta(),this.lastValue=o,!0}},gb=".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}",pb={tag:"span",children:[{tag:"span",ref:"eCurrent",cls:"ag-value-slide-current"}]},fb=class extends Y{constructor(){super(pb),this.eCurrent=I,this.refreshCount=0,this.registerCSS(gb)}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=ee({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(q(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 A(e.valueFormatted)?i.textContent=e.valueFormatted:A(e.value)?i.textContent=o:pe(i),!0}},Cb=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,a=n+o+i,l={phase:"flash",flashEndTime:r,fadeEndTime:a};s.set(e,l);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,a]of i){if(!r.isAlive()||!r.comp){i.delete(r);continue}const{phase:l,flashEndTime:d,fadeEndTime:c}=a,u=l==="flash"?d:c;if(!(e+15>=u)){t=Math.min(u,t??1/0);continue}const{comp:g,eGui:{style:p}}=r;switch(l){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),a.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=Qu(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 mb(e,t={}){const{cellFlashSvc:o}=e;o&&e.frameworkOverrides.wrapIncoming(()=>{e.rowRenderer.getCellCtrls(t.rowNodes,t.columns).forEach(i=>o.flashCell(i,t))})}var wb={moduleName:"HighlightChanges",version:L,beans:[Cb],userComponents:{agAnimateShowChangeCellRenderer:hb,agAnimateSlideCellRenderer:fb},apiFunctions:{flashCells:mb}};function vb(e){var t;return((t=e.stateSvc)==null?void 0:t.getState())??{}}function Sb(e,t,o){var i;return(i=e.stateSvc)==null?void 0:i.setState(t,o)}function Hl(e){switch(e={...e},e.version||(e.version="32.1.0"),e.version){case"32.1.0":e=bb(e)}return e.version=L,e}function bb(e){return e.cellSelection=yb(e,"rangeSelection"),e}function yb(e,t){if(e&&typeof e=="object")return e[t]}var Rb=class extends x{constructor(){super(...arguments),this.beanName="stateSvc",this.updateRowGroupExpansionStateTimer=0,this.suppressEvents=!0,this.queuedUpdateSources=new Set,this.dispatchStateUpdateEventDebounced=fe(this,()=>this.dispatchQueuedStateUpdateEvents(),0),this.onRowGroupOpenedDebounced=fe(this,()=>{this.updateCachedState("rowGroupExpansion",this.getRowGroupExpansionState())},0),this.onRowSelectedDebounced=fe(this,()=>{this.staleStateKeys.delete("rowSelection"),this.updateCachedState("rowSelection",this.getRowSelectionState())},0),this.staleStateKeys=new Set}postConstruct(){this.isClientSideRowModel=ne(this.gos);const e=Hl(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=Hl(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,a=(d,c)=>!(o!=null&&o.has(d))&&(c||t==="api");a("filter",i)&&this.setFilterState(i),a("rowGroupExpansion",s)&&this.setRowGroupExpansionState(s,t),a("rowSelection",n)&&this.setRowSelectionState(n,t),a("pagination",r)&&this.setPaginationState(r,t);const l=this.updateCachedState.bind(this);l("filter",this.getFilterState()),l("rowGroupExpansion",this.getRowGroupExpansionState()),l("rowSelection",this.getRowSelectionState()),l("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:a}=e,l=(u,h)=>!(o!=null&&o.has(u))&&(h||t==="api");l("focusedCell",n)&&this.setFocusedCellState(n),l("cellSelection",s)&&this.setCellSelectionState(s),l("scroll",i)&&this.setScrollState(i),l("rowPinning",a)&&this.setRowPinningState(a),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 Vv(jo(e),e.colModel.isPivotMode())}setColumnState(e,t,o,i){const{sort:s,rowGroup:n,aggregation:r,pivot:a,columnPinning:l,columnVisibility:d,columnSizing:c,columnOrder:u}=e,h=(P,H)=>!(i!=null&&i.has(P))&&(H||t==="api"),g={},p=P=>{let H=g[P];return H||(H={colId:P},g[P]=H,H)},f={},C=h("sort",s);C&&(s==null||s.sortModel.forEach(({colId:P,sort:H},W)=>{const K=p(P);K.sort=H,K.sortIndex=W})),(C||!o)&&(f.sort=null,f.sortIndex=null);const m=h("rowGroup",n);m&&(n==null||n.groupColIds.forEach((P,H)=>{const W=p(P);W.rowGroup=!0,W.rowGroupIndex=H})),(m||!o)&&(f.rowGroup=null,f.rowGroupIndex=null);const w=h("aggregation",r);w&&(r==null||r.aggregationModel.forEach(({colId:P,aggFunc:H})=>{p(P).aggFunc=H})),(w||!o)&&(f.aggFunc=null);const S=h("pivot",a);S&&(a==null||a.pivotColIds.forEach((P,H)=>{const W=p(P);W.pivot=!0,W.pivotIndex=H}),this.gos.updateGridOptions({options:{pivotMode:!!(a!=null&&a.pivotMode)},source:t})),(S||!o)&&(f.pivot=null,f.pivotIndex=null);const v=h("columnPinning",l);v&&(l==null||l.leftColIds.forEach(P=>{p(P).pinned="left"}),l==null||l.rightColIds.forEach(P=>{p(P).pinned="right"})),(v||!o)&&(f.pinned=null);const b=h("columnVisibility",d);b&&(d==null||d.hiddenColIds.forEach(P=>{p(P).hide=!0})),(b||!o)&&(f.hide=null);const D=h("columnSizing",c);D&&(c==null||c.columnSizingModel.forEach(({colId:P,flex:H,width:W})=>{const K=p(P);K.flex=H??null,K.width=W})),(D||!o)&&(f.flex=null);const T=u==null?void 0:u.orderedColIds,G=!!(T!=null&&T.length)&&!(i!=null&&i.has("columnOrder")),F=G?T.map(P=>p(P)):Object.values(g);F.length&&(this.columnStates=F,be(this.beans,{state:F,applyOrder:G,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 a=[];for(const l of o)n.getPivotResultCol(l.colId)&&a.push(l);be(s,{state:a,applyOrder:e},t)}i&&(r==null||r.setColumnGroupState(i,t))}}getColumnGroupState(){const e=this.beans.colGroupSvc;if(!e)return;const t=e.getColumnGroupState();return Nv(t)}setColumnGroupState(e,t,o){var a;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((a=e.columnGroup)==null?void 0:a.openColumnGroupIds),r=i.getColumnGroupState().map(({groupId:l})=>{const d=s.has(l);return d&&s.delete(l),{groupId:l,open:d}});s.forEach(l=>{r.push({groupId:l,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:a,startColumn:l}=o;return{id:i,type:s,startRow:n,endRow:r,colIds:a.map(d=>d.getColId()),startColId:l.getColId()}});return e!=null&&e.length?{cellRanges:e}:void 0}setCellSelectionState(e){const{gos:t,rangeSvc:o,colModel:i,visibleCols:s}=this.beans;if(!ot(t)||!o)return;const n=[];e==null||e.cellRanges.forEach(r=>{const a=[];if(r.colIds.forEach(d=>{const c=i.getCol(d);c&&a.push(c)}),!a.length)return;let l=i.getCol(r.startColId);if(!l){const d=s.allCols,c=new Set(a);l=d.find(u=>c.has(u))}n.push({...r,columns:a,startColumn:l})}),o.setCellRanges(n)}getScrollState(){if(!this.isClientSideRowModel)return;const e=this.beans.ctrlsSvc.getScrollFeature(),{left:t}=(e==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 a;r.get("center").setCenterViewportScrollLeft(o),(a=r.getScrollFeature())==null||a.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 a=new Set(r);for(const l of i)a.delete(l);s=Array.from(a)}}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];yn(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),yn(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")}},Eb={moduleName:"GridState",version:L,beans:[Rb],apiFunctions:{getState:vb,setState:Sb}};function xb(e,t={}){const o=t?t.rowNodes:void 0;e.frameworkOverrides.wrapIncoming(()=>e.rowRenderer.redrawRows(o))}function Ol(e,t,o,i,s){t&&(i&&t.parent&&t.parent.level!==-1&&Ol(e,t.parent,o,i,s),t.setExpanded(o,void 0,s))}function Db(e,t){return e.rowModel.getRowNode(t)}function Fb(e,t,o,i){e.rowRenderer.addRenderedRowListener(t,o,i)}function Pb(e){return e.rowRenderer.getRenderedNodes()}function Tb(e,t,o){e.rowModel.forEachNode(t,o)}function Ib(e){return e.rowRenderer.firstRenderedRow}function Ab(e){return e.rowRenderer.lastRenderedRow}function Mb(e,t){return e.rowModel.getRow(t)}function kb(e){return e.rowModel.getRowCount()}var Bl={moduleName:"RowApi",version:L,apiFunctions:{redrawRows:xb,setRowNodeExpanded:Ol,getRowNode:Db,addRenderedRowListener:Fb,getRenderedNodes:Pb,forEachNode:Tb,getFirstDisplayedRowIndex:Ib,getLastDisplayedRowIndex:Ab,getDisplayedRowAtIndex:Mb,getDisplayedRowCount:kb}},Lb={moduleName:"ScrollApi",version:L,apiFunctions:{getVerticalPixelRange:PS,getHorizontalPixelRange:TS,ensureColumnVisible:Tl,ensureIndexVisible:Il,ensureNodeVisible:IS}};function Gb(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 Hb(e,t={}){e.frameworkOverrides.wrapIncoming(()=>e.rowRenderer.refreshCells(t))}function Ob(e){e.frameworkOverrides.wrapIncoming(()=>e.ctrlsSvc.getHeaderRowContainerCtrls().forEach(t=>t.refresh()))}function Bb(e){var t;return((t=e.animationFrameSvc)==null?void 0:t.isQueueEmpty())??!0}function Vb(e){var t;(t=e.animationFrameSvc)==null||t.flushAllFrames()}function Nb(e){return{rowHeight:ns(e),headerHeight:co(e)}}function _b(e,t={}){var n;const o=[];if(e.rowRenderer.getCellCtrls(t.rowNodes,t.columns).forEach(r=>{const a=r.getCellRenderer();a!=null&&o.push(us(a))}),(n=t.columns)!=null&&n.length)return o;const i=[],s=an(t.rowNodes);return e.rowRenderer.getAllRowCtrls().forEach(r=>{if(s&&!ln(r.rowNode,s)||!r.isFullWidth())return;const a=r.getFullWidthCellRenderers();for(let l=0;l<a.length;l++){const d=a[l];d!=null&&i.push(us(d))}}),[...i,...o]}var Wb={moduleName:"RenderApi",version:L,apiFunctions:{setGridAriaProperty:Gb,refreshCells:Hb,refreshHeader:Ob,isAnimationFrameQueueEmpty:Bb,flushAllAnimationFrames:Vb,getSizesForCurrentTheme:Nb,getCellRendererInstances:_b}};function zb(e,t){var o,i;typeof t=="number"?(o=e.colAutosize)==null||o.sizeColumnsToFit(t,"api"):(i=e.colAutosize)==null||i.sizeColumnsToFitGridBody(t)}function Vl({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 $b(e,t){var o;t&&typeof t=="object"?Vl(e,t):(o=e.colAutosize)==null||o.autoSizeAllColumns({source:"api",skipHeader:t})}var Ub=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:a=[],source:l="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(a.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||_c(v))return;const b=u.getCol(v);if(!b||p.indexOf(b)>=0)return;const D=h.getPreferredWidthForColumn(b,m);if(D>0){const T=C[b.colId]??{};T.minWidth??(T.minWidth=r),T.maxWidth??(T.maxWidth=n);const G=Kb(b,D,T);b.setActualWidth(G,l),p.push(b),f++}S.push(b)}),S.length&&g.refresh(l)}w||this.autoSizeColumnGroupsByColumns(t,l,s),xt(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 a;const l=[];for(const d of n){for(const c of s.getHeaderRowContainerCtrls())if(a=c.getHeaderCtrlForColumn(d),a)break;a&&a.resizeLeafColumnsToFit(t)}return l}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 ct(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(a=>{a.getColDef().suppressAutoSize||n.push(a.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,l=jt(s.eGridBody)-r;if(l>0){this.sizeColumnsToFit(l,"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):M(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===He(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 a=[],l=[];n.forEach(p=>{p.getColDef().suppressSizeToFit===!0?l.push(p):a.push(p)});const d=a.slice(0);let c=!1;const u=p=>{Se(a,p),l.push(p)};for(a.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-He(l);if(p<=0)a.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/He(a);let C=p;for(let m=a.length-1;m>=0;m--){const w=a[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(),T=w.getMaxWidth(),G=typeof v=="number"&&v>D?v:D,F=typeof b=="number"&&b<T?b:T;let P=Math.round(w.getActualWidth()*f);P<G?(P=G,u(w),c=!1):P>F?(P=F,u(w),c=!1):m===0&&(P=C),w.setActualWidth(P,t,!0),C-=P}}}d.forEach(p=>{p.fireColumnWidthChangedEvent(t)});const h=this.beans.visibleCols;h.setLeftValues(t),h.updateBodyWidths(),!o&&xt(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:a,maxWidth:l})=>({key:r,minWidth:a,maxWidth:l}));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 Kb(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 jb={moduleName:"ColumnAutoSize",version:L,beans:[Ub],apiFunctions:{sizeColumnsToFit:zb,autoSizeColumns:Vl,autoSizeAllColumns:$b},dependsOn:[Va]},qb=".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 Yb(e){var t;return((t=e.pinnedRowModel)==null?void 0:t.getPinnedTopRowCount())??0}function Zb(e){var t;return((t=e.pinnedRowModel)==null?void 0:t.getPinnedBottomRowCount())??0}function Qb(e,t){var o;return(o=e.pinnedRowModel)==null?void 0:o.getPinnedTopRow(t)}function Xb(e,t){var o;return(o=e.pinnedRowModel)==null?void 0:o.getPinnedBottomRow(t)}function Jb(e,t,o){var i;return(i=e.pinnedRowModel)==null?void 0:i.forEachPinnedRow(t,o)}var ey={moduleName:"PinnedRow",version:L,beans:[lp],css:[qb],apiFunctions:{getPinnedTopRowCount:Yb,getPinnedBottomRowCount:Zb,getPinnedTopRow:Qb,getPinnedBottomRow:Xb,forEachPinnedRow:Jb},icons:{rowPin:"pin",rowPinTop:"pinned-top",rowPinBottom:"pinned-bottom",rowUnpin:"un-pin"}},ty=class extends At{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&&Fo(this.eGui,this.rowNode.rowIndex)}setAriaRowSpan(){jd(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(ni(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}},oy=class extends ci{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 ty(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(){}},iy=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 a=!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}a=!0;const g=new oy(u.firstNode,this.beans,!1,!1,!1);r.set(u.firstNode,g)}));this[o]=r;const l=r.size===s;if(!(!a&&l)){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=`${Nl(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")}},Nl=e=>e??"center",sy=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}},ny=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:a}=t,l=this[`${e}ValueNodeMap`],d=new Map,c=o.getCallback("isFullWidthRow"),u=a.equals,h=a.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 T=_(o,{valueA:C,nodeA:p,valueB:D,nodeB:v,column:t,colDef:a});if(!h(T)){m(v,D);return}}else if(u?!u(C,D):C!==D){m(v,D);return}if(!f){const T=l==null?void 0:l.get(p);(T==null?void 0:T.firstNode)===p?(T.reset(),f=T):f=new sy(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[`${Nl(e.rowPinned)}ValueNodeMap`].get(e)}},ry=class extends x{constructor(){super(...arguments),this.beanName="rowSpanSvc",this.spanningColumns=new Map,this.debouncePinnedEvent=fe(this,this.dispatchCellsUpdatedEvent.bind(this,!0),0),this.debounceModelEvent=fe(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 ny(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()}},ay={moduleName:"CellSpan",version:L,beans:[ry,iy]},ly=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);Ds(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 _(this.beans.gos,{value:o,data:i.data,node:i,colDef:t,column:e,rowIndex:i.rowIndex})}},dy=class extends x{constructor(){super(...arguments),this.beanName="cellStyles"}processAllCellClasses(e,t,o,i){Ds(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 ly(e,t)}processStaticCellClasses(e,t,o){this.getStaticCellClasses(e,t).forEach(s=>{o(s)})}},cy={moduleName:"CellStyle",version:L,beans:[dy]},uy={moduleName:"RowStyle",version:L,beans:[qh]};function hy(e,t){var o;return!!((o=e.colHover)!=null&&o.isHovered(t))}var gy=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,a=i.colHover;o??!!s.get("columnHoverHighlight")?this.destroyManagedListeners=this.addManagedElementListeners(n,{mouseover:a.setMouseOver.bind(a,r),mouseout:a.clearMouseOver.bind(a)}):(this.destroyManagedListeners.forEach(d=>d()),this.destroyManagedListeners=[])}}postConstruct(){this.addManagedPropertyListener("columnHoverHighlight",({currentValue:e})=>{this.enableFeature(e)}),this.enableFeature()}destroy(){super.destroy(),this.destroyManagedListeners=null}},py="ag-column-hover",fy=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(py,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 gy(t,o))}updateState(e){this.selectedColumns=e,this.eventSvc.dispatchEvent({type:"columnHoverChanged"})}},Cy={moduleName:"ColumnHover",version:L,beans:[fy],apiFunctions:{isColumnHovered:hy}},my=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=!po.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,a)=>{po.has(r)&&t(r,a)},i=(r,a)=>{po.has(r)||t(r,a)};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:a}=i.get(s);t.removeGlobalListener(r,!1),t.removeGlobalListener(a,!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 wy(e,t,o){var i;(i=e.apiEventSvc)==null||i.addEventListener(t,o)}function vy(e,t,o){var i;(i=e.apiEventSvc)==null||i.removeEventListener(t,o)}function Sy(e,t){var o;(o=e.apiEventSvc)==null||o.addGlobalListener(t)}function by(e,t){var o;(o=e.apiEventSvc)==null||o.removeGlobalListener(t)}var yy={moduleName:"EventApi",version:L,apiFunctions:{addEventListener:wy,addGlobalListener:Sy,removeEventListener:vy,removeGlobalListener:by},beans:[my]},Ry={moduleName:"Locale",version:L,beans:[Bv]},Ey=class extends x{constructor(){super(...arguments),this.beanName="rowAutoHeight",this.wasEverActive=!1,this._debouncedCalculateRowHeights=fe(this,this.calculateRowHeights.bind(this),1)}requestCheckAutoHeight(){this.wasEverActive&&this._debouncedCalculateRowHeights()}calculateRowHeights(){var a,l,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=ze(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)};(a=i==null?void 0:i.forEachPinnedRow)==null||a.call(i,"top",r),(l=i==null?void 0:i.forEachPinnedRow)==null||l.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,a=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}=Xe(i),f=u+h+g+p,m=t.offsetHeight+f;if(c<5){const S=te(r),v=!S||!S.contains(t),b=m==0;if(v||b){window.setTimeout(()=>a(c+1),0);return}}this.setRowAutoHeight(s,m,n)},l=()=>a(0);l();const d=Je(r,t,l);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}},xy={moduleName:"RowAutoHeight",version:L,beans:[Ey]};const gt=Symbol("grid-context"),gn=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 a=o[i.colId],l=o[s.colId];return a>l?1:-1}else return r==null?-1:1}),t},_l=e=>{const t=gn(e),o=new Map;return t.forEach((i,s)=>{o.set(i.colId,s)}),o},Wl=(e,t)=>_l(e).get(t)??-1,Dy=e=>!!e&&(typeof e=="object"||typeof e=="function")&&typeof e.then=="function";class zl{constructor(t,o){R(this,"loading",!1);R(this,"dataGetter");R(this,"cache");R(this,"_api");R(this,"loadingDelay");R(this,"getSorts",()=>gn(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 i,s,n,r,a,l,d,c;if(this.loading||!this._api){(s=(i=t.context)==null?void 0:i.resolve)==null||s.call(i);return}const o=this.cache.enableCursorPage;if(this.cache.isFinished&&(o||t.pageNum!==1)){(r=(n=t.context)==null?void 0:n.resolve)==null||r.call(n);return}if(this.loading=!0,O.isFunction(this.dataGetter)){const u=this.dataGetter({startRow:t.startRow,endRow:t.endRow,pageNum:t.pageNum,pageSize:t.pageSize,cursorId:t.cursorId,params:t.filterModel,sorts:o?[]:this.getSorts()});Dy(u)&&(this.loadingDelay=setTimeout(()=>{this.api.setGridOption("loading",!0)},500),u.then(h=>{var g,p;t.successCallback(h,h.length),(p=(g=t.context)==null?void 0:g.resolve)==null||p.call(g)}).catch(h=>{var g,p;t.failCallback(),(p=(g=t.context)==null?void 0:g.reject)==null||p.call(g,h)}).finally(()=>{clearTimeout(this.loadingDelay),this.api.setGridOption("loading",!1),this.loadData()})),O.isArray(u)&&(t.successCallback(u,u.length),this.loadData(),(l=(a=t.context)==null?void 0:a.resolve)==null||l.call(a))}else t.successCallback(this.dataGetter,this.dataGetter.length),this.loadData(),(c=(d=t.context)==null?void 0:d.resolve)==null||c.call(d)}}class pn{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 Nt{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()}select(t){this.actualRow.select(t)}unselect(t){this.actualRow.unselect(t)}isSelected(){return this.actualRow.isSelected()}getCell(t){return this.actualRow.getCell(t,this.getNestingIndexes())}isTransient(){return this.actualRow.isTransient()}setData(t){this.actualRow.setData(t)}buildSpan(){this.actualRow.buildSpan()}scrollIntoView(){this.actualRow.scrollIntoView()}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 $l{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}select(t){this.actualRow.select(t)}unselect(t){this.actualRow.unselect(t)}isSelected(){return this.actualRow.isSelected()}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 Nt(t.id,this,t.nestingIndexes))}scrollIntoView(){this.actualRow.scrollIntoView()}_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}get expand(){return this.actualRow.expand===!0}set expand(t){var o,i;this.actualRow.expand=t===!0,(i=(o=this.actualRow.bridge)==null?void 0:o.refreshModel)==null||i.call(o,{step:"map"})}get detailCardData(){return this.actualRow.detailCardData}set detailCardData(t){this.actualRow.detailCardData=t}isExpanded(){return this.actualRow.isExpanded()}setExpanded(t,o){this.actualRow.setExpanded(t,o)}toggleExpanded(){this.actualRow.toggleExpanded()}isEditing(t){return!!this.draft}isCellEditing(t,o){return!!this.draft}stopEditing(t=!1){return this._stopEditingImpl(t)}}class Ti extends $l{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 Ii extends $l{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 _t{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 a=0;a<n.length;a++)r[a]=new _t(`${this.id}_${a}`,t,n[a],a,o)}else r=new _t(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 Ul{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 a=new Map,l=new Set,d=this.collectLeaves(r);for(const c of d)this._walkUpAndRecord(c,a,l,t);if(d.length>0){const c=new Set;for(const g of d)for(const p of a.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)||a.set(`${u.id}|${g}`,h)}this.cellSpanCaches.set(t,a),this.dirtyRoots.add(t)}_computeExpandPaths(t,o){const i=new Set;for(const s of o){const n=s.colId.split(".");let r=t,a="";const l=s.cellDataType==="native"&&r!=null&&Array.isArray(r[n[0]]);for(let d=0;d<n.length&&r!=null;d++){const c=n[d];a=a?`${a}.${c}`:c;const u=r[c];if(Array.isArray(u)){if(d===0&&l)break;i.add(a),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),a=r.length,l=((p=r[0])==null?void 0:p.field)??o.split(".").pop();if(a===i){this.dirtyRoots.add(t);return}if(i<a)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=a;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}_${l}_${f}`,field:l,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 a=r[o];return s.get(`${a.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 a=0;a<s.length;a++){let l=s[a];if(a<s.length-1){const d=s.slice(0,a+1).join(".");i.has(d)&&r<o.length&&(l+=`[${o[r]}]`,r++)}n.push(l)}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 a=t.path?`${t.path}.${n}`:n;if(Array.isArray(r))if(s.has(a)){i.set(a,t);for(let l=0;l<r.length;l++){const d=this.createNode(`${t.id}_${n}_${l}`,n,r[l],l,t,a,[...t.nestingIndexes,l]);t.children.push(d),this.expandChildren(d,r[l],i,s)}if(r.length===0){const l=this.createNode(`${t.id}_${n}_empty`,n,r,void 0,t,a,t.nestingIndexes);t.children.push(l)}}else{const l=this.createNode(t.id,n,r,void 0,t,a,t.nestingIndexes);t.children.push(l)}else{const l=this.createNode(t.id,n,r,void 0,t,a,t.nestingIndexes);t.children.push(l),this.expandChildren(l,r,i,s)}}}createNode(t,o,i,s,n,r,a){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:a}}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 a=r.path;s.set(a,(s.get(a)??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 Fy{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 _t(this.id,"$",this.data),this._buildPathCells(i),this.rootValue.calcSpan(),this.spanMatrix=new Ul,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 a=[];for(const l of s){const d=l.pretreatmentValue(r,l,o);O.isArray(d)?a.push(...d):a.push(d)}s=a}}}}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 a of i){if(!r)break;if(!O.isArray(r)){const l=r.get(a);O.isArray(l)?(r=l[o[n]],n=n+1):r=l}}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 _t(this.id,"$",t);for(const n of i){const r=n.colId.split(".");let a=s;for(let l=0;l<r.length;l++){const d=r[l];if(!O.isArray(a))a=a.pretreatmentValue(d,a,n);else{const c=[];for(const u of a){const h=u.pretreatmentValue(d,u,n);O.isArray(h)?c.push(...h):c.push(h)}a=c}}}s.calcSpan(),this.rootValue=s,o&&(this.columns=i)}getSpanMatrix(){return this.spanMatrix}}class vo{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");R(this,"expand",!1);R(this,"detailCardData",null);this.index=r,this.dataCache=s,this.idMapper=i,this.columns=o,this.bridge=n,this.id=i(t),this.data=t,this.signature=Ve(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 Fy(this.id,this.data,this.columns),this.spanCache=new pn(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)}getSourceRow(){return this}isExpanded(){return this.expand===!0}setExpanded(t,o){var s,n;const i=t===!0;this.expand!==i&&(this.expand=i,(n=(s=this.bridge)==null?void 0:s.refreshModel)==null||n.call(s,{step:"map"}))}toggleExpanded(){this.setExpanded(!this.expand)}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 Ti(this,this.idMapper,!1);return this.dataCache.replace(o),t&&this.redraw(),o}startEditingCell(t,o,i=!1){const s=new Ii(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=Ve(JSON.stringify(o)),this.dataModel.rebuild(o),this.spanCache=new pn(this.dataModel.leafCells,this.dataModel.spanMatrix,this.id)}isTransient(){return!1}getId(){return this.id}select(t){var o,i;(i=(o=this.bridge)==null?void 0:o.setSelected)==null||i.call(o,this,!0,t)}unselect(t){var o,i;(i=(o=this.bridge)==null?void 0:o.setSelected)==null||i.call(o,this,!1,t)}isSelected(){var t,o;return((o=(t=this.bridge)==null?void 0:t.isRowSelected)==null?void 0:o.call(t,this))??!1}isEditing(){return!1}getData(){return this.data}scrollIntoView(){var o;const t=this.leafCells[this.leafCells.length-1];t&&((o=this.bridge)==null||o.ensureNodeVisible(t.id))}flat(){return this.dataModel.leafCells.map(t=>new Nt(t.id,this,t.nestingIndexes))}setData(t){this.update(this.idMapper(t),t)}match(t){return this.getId()===t.data.getId()}}class Kl{constructor(t){R(this,"rows");R(this,"pageNum",1);R(this,"pageSize",100);R(this,"isFinished",!1);R(this,"enableCursorPage",!1);R(this,"idMapper");R(this,"idMap",new Map);R(this,"bridge");this.rows=[],this.idMapper=t}createRow(t){var o;return new vo(t,((o=this.bridge)==null?void 0:o.getColumns())??[],this.idMapper,this,this.bridge)}rebuildIdMap(){this.idMap.clear(),this.rows.forEach((t,o)=>this.idMap.set(t.getId(),o))}setRows(t){return this.rows=t,this.rebuildIdMap(),this}replace(t){this.rows[t.getDataIndex()]=t,this.rebuildIdMap()}remove(t){var i;const o=new Set(t.map(s=>s.getId()));this.rows=this.rows.filter(s=>!o.has(s.getId())),this.rebuildIdMap(),(i=this.bridge)==null||i.reload()}getRows(){return this.rows??[]}appendRows(t){if(!this.rows){this.setRows(t);return}for(const o of t){const i=o.getId(),s=this.idMap.get(i);s!==void 0?(this.rows[s]=o,this.idMap.set(i,s)):(this.rows.push(o),this.idMap.set(i,this.rows.length-1))}}insertRows(t,o=0){if(!this.rows){this.setRows(t);return}const i=new Set(t.map(s=>s.getId()));this.rows=this.rows.filter(s=>!i.has(s.getId())),this.rows.splice(o,0,...t),this.rebuildIdMap()}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())),this.rebuildIdMap()}}const jl={getContextMenuItems:void 0},Py=e=>e instanceof vo||e instanceof Nt?!0:e instanceof Ti,Ty=e=>e instanceof vo,Ai="_",ql=1;class Yl{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(Ai)}static getId(t){return t.__id?t.__id.split(Ai)[0]:t.id}static getSignature(t){return t.__signature}static getFlatIndex(t,o=ql){if(!t.__id)throw new Error("不包含有效的ID信息");const i=t.__id.split(Ai);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 Zl=(e,t,o,i,s)=>{const n=E.ref(t),r=E.ref(),a=E.ref(!1),l=(g,p)=>{if(n.value)return n.value;const f=p??[];if(!g){const w=Ve(f.join(","));return n.value=w,w}const C=e.getInstanceName(g);C&&f.push(C);const m=e.getParentInstance(g);return l(m,f)},d=g=>{const p=localStorage.getItem(g);if(!(!p||p==="undefined"))return JSON.parse(p)},c=O.debounce(()=>{const g=l(s);localStorage.setItem(g,JSON.stringify(o.value.getColumnState()))},200),u=async()=>{const g=l(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}),a.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=l(s);if(r.value=o.value.getColumnState(),!localStorage.getItem(`${g}-initial`)){const p=h();i.value>p&&o.value.sizeColumnsToFit()}},isStateInitialized:a}},So=e=>{if(e.id)return`${e.id}`.split("_")[0]},Ql=e=>{const{options:t,elRef:o,editable:i,onRowChange:s,onMessageError:n,findOtherEditingCell:r,isCellEditable:a}=e;let l;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=So(h.node);if(!g){(p=t.onCellMouseOver)==null||p.call(t,h);return}u((f=h.event)==null?void 0:f.relatedTarget,g)||(l&&l!==g&&c(l),l=g,d(g),(C=t.onCellMouseOver)==null||C.call(t,h))},onCellMouseOut(h){var p;const g=So(h.node);g&&(u((p=h.event)==null?void 0:p.relatedTarget,g)||l===g&&(c(g),l=void 0))},onCellClicked(h){if(i==="cell"&&h.data instanceof Nt){if(a&&!a(h.column,h.node))return;const g=h.data.getActualRow(),p=r==null?void 0:r(h.node.id);if(g instanceof Ii){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 vo)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=So(h.node),p=h.api.getRenderedNodes().filter(m=>So(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 m,w;const g=(m=t==null?void 0:t.getRowClass)==null?void 0:m.call(t,h),p=[];g&&(O.isArray(g)?p.push(...g):p.push(g)),p.push(`row_${So(h.node)}`);const f=h.node.data,C=((w=(f==null?void 0:f.actualRow)??f)==null?void 0:w.index)??h.node.rowIndex??0;return p.push(`row-zebra-${C%2}`),p},onRowDoubleClicked(h){i==="row"&&(h.data.isEditing()||h.data.startEditing())}}},Xl={"cell-span":({data:e,column:t})=>e.getRowSpan(t)>0,"cell-span-hide":({data:e,column:t})=>e.getRowSpan(t)===0},Jl={"cell-span":({data:e,column:t})=>e.getRowSpan(t)>0,"cell-span-hide":({data:e,column:t})=>e.getRowSpan(t)===0},fn=(e,t)=>({...e,...t??{}});class Ye{constructor(t,o,i,s=[],n,r){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,"cursorId");R(this,"onError");R(this,"onFirstPageLoaded");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,this.cursorId=r}static from(t,o,i,s){const n=o??i.pageSize;return i.enableCursorPage?new Ye(1,n,i,[],s,void 0):new Ye(t,n,i,[],s)}static nextPage(t,o){if(t.enableCursorPage){const i=t.getRows(),s=i.length?i[i.length-1].getId():void 0;return new Ye(1,t.pageSize,t,[],o,s)}return new Ye(t.pageNum+1,t.pageSize,t,[],o)}failCallback(){var t;(t=this.onError)==null||t.call(this,"表格数据加载失败,请重试")}successCallback(t){var o;if(this.dataCache.enableCursorPage){this.successCallbackByCursor(t);return}(O.isEmpty(t)||t.length<this.pageSize)&&(this.dataCache.isFinished=!0),this.pageNum===1?this.dataCache.setRows((t??[]).map(i=>this.dataCache.createRow(i))):this.dataCache.appendRows((t??[]).map(i=>this.dataCache.createRow(i))),this.dataCache.pageNum=this.pageNum,this.pageNum===1&&((o=this.onFirstPageLoaded)==null||o.call(this,t??[]))}successCallbackByCursor(t){var s;const o=(t??[]).map(n=>this.dataCache.createRow(n));if(this.cursorId===void 0){this.dataCache.setRows(o),this.dataCache.pageNum=1,o.length===0&&(this.dataCache.isFinished=!0),(s=this.onFirstPageLoaded)==null||s.call(this,t??[]);return}const i=new Set(this.dataCache.getRows().map(n=>n.getId()));if(!o.some(n=>!i.has(n.getId()))){this.dataCache.isFinished=!0;return}this.dataCache.appendRows(o),this.dataCache.pageNum=1}}const ed=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 Iy{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})}ensureNodeVisible(t){const o=this.gridApi.getRowNode(t);o&&this.gridApi.ensureNodeVisible(o)}refreshModel(t){var i,s,n,r;const o=this.gridApi.getGridOption("rowModelType")==="clientSide"?this.gridApi.rowModel:null;o!=null&&o.refreshModel?o.refreshModel(t):t.step==="everything"?(s=(i=this.gridApi).refreshClientSideRowModel)==null||s.call(i):(r=(n=this.gridApi).refreshClientSideRowModel)==null||r.call(n,{step:"map"})}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}})}setSelected(t,o,i="api"){const s=this.findRowNodes(t);s.length!==0&&this.gridApi.setNodesSelected({nodes:s,newValue:o,source:i})}isRowSelected(t){const o=this.findRowNodes(t);return o.length===0?!1:o.every(i=>i.isSelected())}findRowNodes(t){const o=t.getId(),i=[];return this.gridApi.forEachNode(s=>{const n=s.data;n&&typeof n.getId=="function"&&n.getId()===o&&i.push(s)}),i}}const td=(e,t)=>{if(t.length===0)return[];const o=new Set(t),i=[];return e.forEachNode(s=>{const n=s.data;n&&typeof n.getId=="function"&&o.has(n.getId())&&i.push(s)}),i},Ay=(e,t,o)=>{!e||t.length===0||e.setNodesSelected({nodes:td(e,t),newValue:!0,source:o})},My=(e,t,o)=>{!e||t.length===0||e.setNodesSelected({nodes:td(e,t),newValue:!1,source:o})},ky=e=>{if(!e)return[];const t=new Set,o=[];return e.forEachNode(i=>{if(!i.isSelected()||!i.data)return;const s=i.data,n=s!=null&&s.getActualRow?s.getActualRow():i.data;t.has(n)||(t.add(n),o.push(n))}),o},od=(e,t)=>{var K;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),a=E.ref(),{onBodyScrollEnd:l}=ed({onVScrollEnd(){u.value.getRows(Ye.nextPage(c.value,e.onError))}}),d=({data:B})=>B.id,c=E.ref(new Kl(e.rowIdMapper)),u=E.ref(new zl(e.rowData,c.value));E.watch(()=>e.enableCursorPage,B=>{c.value.enableCursorPage=B===!0});const{initGridState:h,resetGridState:g,storeGridState:p,restoreGridState:f}=Zl(e.instanceCtx,e.id,o,a,e.currentInstance),C=async B=>{T(),c.value.pageSize=e.pageSize,c.value.enableCursorPage=e.enableCursorPage===!0,c.value.bridge=new Iy(B.api),u.value.api=B.api,B.api.getAllGridColumns(),o.value=B.api,h(),await f(),await G(),B.api.setGridOption("popupParent",document.querySelector("body"))},m=()=>{u.value.loadData()},w=async(B,z=0)=>{c.value.insertRows(B,z),m()},S=B=>c.value.getRows().some(z=>z.getId()===B.getId()),v=()=>c.value.getRows(),b=()=>{var oe,Me;const B=i.value.querySelector(".ag-body-viewport"),z=Number.parseFloat(B.querySelector(".ag-center-cols-container").style.height),N=i.value.querySelector(".ag-header").offsetHeight,$=(Me=(oe=i.value.querySelector(".ag-overlay-no-rows-wrapper"))==null?void 0:oe.querySelector(".el-empty"))==null?void 0:Me.offsetHeight;z<r.value?s.value.height=`${N+($||z)+(e.footerHeight?2:11)}px`:s.value.height.includes("100%")||(s.value.height=`calc(100% - ${e.footerHeight??0}px)`)},D=()=>{const B=i.value;if(!B||s.value.height.includes("%"))return;const z=B.querySelector(".cl-grid-container"),N=B.querySelector(".grid-toolbar");if(!z)return;const $=z.firstElementChild;if(!$)return;const oe=$.offsetHeight,Me=(N==null?void 0:N.offsetHeight)||0;B.style.height=`${oe+Me}px`},T=()=>{const B=i.value.querySelector(".ag-body-viewport");a.value=B.offsetWidth,r.value=B.offsetHeight},G=()=>new Promise((B,z)=>{c.value.isFinished=!1;const N=Ye.from(1,c.value.pageSize,c.value,e.onError);N.onFirstPageLoaded=$=>{E.nextTick(()=>{var oe;return(oe=e.onFirstPageLoaded)==null?void 0:oe.call(e,$)})},N.context={resolve:B,reject:z},u.value.getRows(N),u.value.api.getDisplayedRowCount()>0&&u.value.api.ensureIndexVisible(0)}),F=B=>{const z={...B,sortable:!1};return Array.isArray(B.children)&&(z.children=B.children.map(F)),z},P=E.computed(()=>e.enableCursorPage?e.columns.map(F):e.columns),H=E.computed(()=>{var B,z;return{onGridReady:C,onBodyScrollEnd:l,scrollbarWidth:8,getRowId:d,columnDefs:P.value,preventDefaultOnContextMenu:!0,suppressRowTransform:!0,suppressRowHoverHighlight:!0,selectionColumnDef:{pinned:"left",rowSpan:({data:N,column:$})=>N.getRowSpan($),cellClassRules:fn(Xl,(B=e.gridOptions)==null?void 0:B.rowClassRules)},defaultColGroupDef:{marryChildren:!0},onStateUpdated(N){N.sources.some($=>n.has($))&&p()},onSortChanged(N){N.source==="uiColumnSorted"&&p()},context:{refresh:G,reload:m},onRowDataUpdated(){E.nextTick(()=>{b(),E.nextTick(()=>{D()})})},defaultColDef:{rowSpan({column:N,data:$}){return $.getRowSpan(N)},cellClassRules:fn(Jl,(z=e.gridOptions)==null?void 0:z.rowClassRules),suppressFloatingFilterButton:!0,enableCellChangeFlash:!0,tooltipValueGetter(N){return N.valueFormatted},resizable:!0,sortable:!1,headerComponent:"HeaderRenderer",cellRenderer:"CellRenderer",valueGetter({column:N,data:$}){return $.getValue(N)},valueFormatter({value:N}){return N}},...Ql({options:e.gridOptions??{},elRef:i,editable:e.editable,onRowChange:e.onRowChange,onMessageError:e.onError,findOtherEditingCell:N=>c.value.getRows().find($=>$ instanceof Ii&&$.getRowId()!==N),isCellEditable:(N,$)=>{var Me;const oe=(Me=N.getColDef)==null?void 0:Me.call(N);return typeof(oe==null?void 0:oe.editable)=="function"?oe.editable({column:N,colDef:oe,node:$,data:$.data}):(oe==null?void 0:oe.editable)!==!1}}),onBodyScroll(N){W.left=N.left,W.top=N.top},...jl}}),W={left:0,top:0};return(K=t==null?void 0:t.onActivated)==null||K.call(t,()=>{}),{gridOptions:H,datasource:u,gridStyles:s,dataCache:c,gridApi:o,gridElRef:i,resetGridState:g,reload:m,insertRows:w,existRow:S,getRows:v,refresh:G,selectByIds:(B,z)=>Ay(o.value,B,z),deselectByIds:(B,z)=>My(o.value,B,z),getSelectedRows:()=>ky(o.value)}},id=(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,a=d=>{var c;return r(d)?{headerName:d.headerName,groupId:d.groupId,children:[...d.children.map(u=>a(u))]}:{width:d.width,headerName:d.headerName,field:d.field,cellRendererParams:{render:(c=d.cellRendererParams)==null?void 0:c.footerRender}}},l=E.computed(()=>{var d;return{scrollbarWidth:8,suppressRowTransform:!0,suppressRowHoverHighlight:!0,columnDefs:e.columns.map(c=>a(c)),defaultColGroupDef:{marryChildren:!0},rowSelection:(d=e.gridOptions)!=null&&d.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(c){return c.value}},onGridReady(c){i.value=c.api,c.api.setGridOption("popupParent",document.querySelector("body"))},alignedGrids:()=>{const c=t.value;if(!c)return[];const u=c.api??(typeof c.addEventListener=="function"?c:void 0);return u?[u]:[]}}});return{setFooterData:d=>{s.value=d},footerGridApi:i,footerData:s,footerStyles:n,footerGridOptions:l}};class Ly extends x{constructor(){super(...arguments);R(this,"beanName","selectionColSvc");R(this,"columns")}postConstruct(){this.addManagedPropertyListener("rowSelection",o=>{this.onSelectionOptionsChanged(o.currentValue,o.previousValue,Et(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),zc(o))}createColumns(o,i){var u,h;const s=()=>{var g;Uo(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,a=this.generateSelectionCols();if(Wc(a,((h=this.columns)==null?void 0:h.list)??[])&&r)return;s();const{colGroupSvc:l}=this.beans,d=(l==null?void 0:l.findDepth(o.tree))??0,c=(l==null?void 0:l.balanceTreeForAutoCols(a,d))??[];this.columns={list:a,tree:c,treeDepth:d,map:{}},i(g=>{if(!g)return null;const p=g.filter(f=>!st(f));return[...a,...p]})}updateColumns(o){var s;const i=Et(o.source);(s=this.columns)==null||s.list.forEach(n=>{const r=this.createSelectionColDef(o.currentValue);n.setColDef(r,null,i),be(this.beans,{state:[{...r,colId:n.getColId()}]},i)})}getColumn(o){var i;return((i=this.columns)==null?void 0:i.list.find(s=>Sr(s,o)))??null}getColumns(){var o;return((o=this.columns)==null?void 0:o.list)??null}isSelectionColumnEnabled(){var l,d;const{gos:o,beans:i}=this,s=o.get("rowSelection");if(typeof s!="object"||!et(o))return!1;const n=(((d=(l=i.autoColSvc)==null?void 0:l.getColumns())==null?void 0:d.length)??0)>0;if(s.checkboxLocation==="autoGroupColumn"&&n)return!1;const r=!!bt(s),a=Ho(s);return r||a}createSelectionColDef(o){const{gos:i}=this,s=o??i.get("selectionColumnDef"),n=i.get("enableRtl"),{rowSpan:r,spanRows:a,...l}=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,...l,colId:Cr,chartDataType:"excluded"}}generateSelectionCols(){if(!this.isSelectionColumnEnabled())return[];const o=this.createSelectionColDef(),i=o.colId;this.gos.validateColDef(o,i,!0);const s=new $e(o,null,i,!1);return this.createBean(s),[s]}onSelectionOptionsChanged(o,i,s){const n=i&&typeof i!="string"?bt(i):void 0,r=o&&typeof o!="string"?bt(o):void 0,a=n!==r,l=i&&typeof i!="string"?Ho(i):void 0,d=o&&typeof o!="string"?Ho(o):void 0,c=l!==d,u=Oo(o),h=Oo(i);(a||c||u!==h)&&this.beans.colModel.refreshAll(s)}destroy(){var o;Uo(this.beans,(o=this.columns)==null?void 0:o.tree),super.destroy()}refreshVisibility(o,i,s){var l,d;if(!((l=this.columns)!=null&&l.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 a=()=>{let c;switch(r.pinned){case"left":case!0:c=o;break;case"right":c=s;break;default:c=i}c&&Se(c,r)};((d=this.beans.rowNumbersSvc)!=null&&d.getColumn(mr)?2:1)===n&&a()}}const Mi="34.1.1";function sd(e){const t=e.get("rowSelection");return typeof t=="object"&&t.masterSelects||"self"}function ki(e){return!!(e.rowPinned&&e.pinnedSibling)}function Gy(e,t=!0){const o=e.get("rowSelection");return typeof o!="object"?t?"all":void 0:o.mode==="multiRow"?o.selectAll:"all"}function nd(e,t){return t===void 0?e("ariaIndeterminate","indeterminate"):t===!0?e("ariaChecked","checked"):e("ariaUnchecked","unchecked")}function ve(e,t,o,i){const s=t==="top";if(!o)return ve(e,t,s?e.getPinnedTopRow(0):e.getPinnedBottomRow(0),i);if(!i){const l=s?e.getPinnedTopRowCount():e.getPinnedBottomRowCount();return ve(e,t,o,s?e.getPinnedTopRow(l-1):e.getPinnedBottomRow(l-1))}let n=!1,r=!1;const a=[];return e.forEachPinnedRow(t,l=>{if(l===o&&!n){n=!0,a.push(l);return}if(n&&l===i){r=!0,a.push(l);return}n&&!r&&a.push(l)}),a}function Cn(e){return(e==null?void 0:e.hideDisabledCheckboxes)??!1}function rd(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 Hy(e){const t=rd(e);return t===!0||t==="enableDeselection"}function Oy(e){const t=rd(e);return t===!0||t==="enableSelection"}function By(e){const t=e.get("rowSelection");return typeof t=="string"?e.get("rowMultiSelectWithClick"):(t==null?void 0:t.enableSelectionWithoutKeys)??!1}function Vy(e,t){var n;if(!t.nodes.every(r=>r.rowPinned&&!ki(r)?(M(59),!1):r.id===void 0?(M(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 Ny(e,t,o="apiSelectAll"){var i;(i=e.selectionSvc)==null||i.selectAllRowNodes({source:o,selectAll:t})}function _y(e,t,o="apiSelectAll"){var i;(i=e.selectionSvc)==null||i.deselectAllRowNodes({source:o,selectAll:t})}function Wy(e){var t;return((t=e.selectionSvc)==null?void 0:t.getSelectedNodes())??[]}function zy(e){var t;return((t=e.selectionSvc)==null?void 0:t.getSelectedRows())??[]}const $y={tag:"div",cls:"ag-selection-checkbox",role:"presentation",children:[{tag:"ag-checkbox",ref:"eCheckbox",role:"presentation"}]};class Uy extends Y{constructor(){super($y,[Os]);R(this,"eCheckbox",I);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=nd(o,n),[a,l]=i.selectable?["ariaRowToggleSelection","Press Space to toggle row selection"]:["ariaRowSelectionDisabled","Row Selection is disabled for this row"],d=o(a,l);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:yt,click:i=>{var s;yt(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"?Cn(i):void 0,r=typeof s=="object"?Cn(s):void 0;n!==r&&this.onSelectableChanged()}),ls(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,a=this.getIsVisible();let l;if(typeof a=="function"){const g=s==null?void 0:s.callbackParams;if(!o)l=a({...g,node:i,data:i.data});else{const p=o.createColumnFunctionCallbackParams(i);l=a({...g,...p})}}else l=a??!1;const d=r&&!l||!r&&l,c=r||l,u=n.get("rowSelection"),h=u&&typeof u!="string"?!Cn(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"?bt(i):(n=(s=this.column)==null?void 0:s.getColDef())==null?void 0:n.checkboxSelection}}class Ky{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 ve(i,"top",t,void 0).concat(s.getNodesInRangeForSelection(s.getRow(0),o)??[]);if(t.rowPinned==="bottom"&&!o.rowPinned){const n=ve(i,"bottom",void 0,t),r=s.getRowCount(),a=s.getRow(r-1);return(s.getNodesInRangeForSelection(o,a)??[]).concat(n)}if(!t.rowPinned&&!o.rowPinned)return s.getNodesInRangeForSelection(t,o);if(t.rowPinned==="top"&&o.rowPinned==="top")return ve(i,"top",t,o);if(t.rowPinned==="bottom"&&o.rowPinned==="top"){const n=ve(i,"top",o,void 0),r=ve(i,"bottom",void 0,t),a=s.getRow(0),l=s.getRow(s.getRowCount()-1);return n.concat(s.getNodesInRangeForSelection(a,l)??[]).concat(r)}if(!t.rowPinned&&o.rowPinned==="top")return ve(i,"top",o,void 0).concat(s.getNodesInRangeForSelection(s.getRow(0),t)??[]);if(t.rowPinned==="top"&&o.rowPinned==="bottom"){const n=ve(i,"top",t,void 0),r=ve(i,"bottom",void 0,o),a=s.getRow(0),l=s.getRow(s.getRowCount()-1);return n.concat(s.getNodesInRangeForSelection(a,l)??[]).concat(r)}if(t.rowPinned==="bottom"&&o.rowPinned==="bottom")return ve(i,"bottom",t,o);if(!t.rowPinned&&o.rowPinned==="bottom"){const n=ve(i,"bottom",void 0,o),r=s.getRow(s.getRowCount());return(s.getNodesInRangeForSelection(t,r)??[]).concat(n)}return null}}class jy 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(Q(this.beans))&&(o.preventDefault(),i.setValue(!i.getValue()))}getCheckboxGui(){return this.cbSelectAll.getGui()}setComp(o){this.headerCellCtrl=o;const i=this.createManagedBean(new Sa);this.cbSelectAll=i,i.addCss("ag-header-select-all"),Ne(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 a=l=>typeof l=="string"||!l||l.mode==="singleRow"?void 0:l.selectAll;a(n)!==a(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,a=n.getValue(),l=nd(i,a),d=i("ariaRowSelectAll","Press Space to toggle all rows selection");s.setAriaDescriptionProperty("selectAll",r?`${d} (${l})`:null),n.setInputAriaLabel(i("ariaHeaderSelection","Column with Header Selection")),o||s.announceAriaDescription()}checkSelectionType(o){return Jt(this.gos)?!0:(M(128,{feature:o}),!1)}checkRightRowModelType(o){const{gos:i,rowModel:s}=this.beans;return ne(i)||Lo(i)?!0:(M(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 ad(s,o)&&this.checkRightRowModelType(n)&&this.checkSelectionType(n)}getSelectAllMode(){const o=Gy(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 ad({gos:e,selectionColSvc:t},o){const i=e.get("rowSelection"),s=o.getColDef(),{headerCheckboxSelection:n}=s;let r=!1;if(typeof i=="object"){const a=st(o),l=vr(o);(Oo(i)==="autoGroupColumn"&&l||a&&(t!=null&&t.isSelectionColumnEnabled()))&&(r=Ho(i))}else typeof n=="function"?r=n(_(e,{column:o,colDef:s})):r=!!n;return r}class qy extends x{constructor(){super(...arguments);R(this,"isRowSelectable");R(this,"selectionCtx")}postConstruct(){const{gos:o,beans:i}=this;this.selectionCtx=new Ky(i.rowModel,i.pinnedRowModel),this.addManagedPropertyListeners(["isRowSelectable","rowSelection"],()=>{const s=ls(o);s!==this.isRowSelectable&&(this.isRowSelectable=s,this.updateSelectable())}),this.isRowSelectable=ls(o),this.addManagedEventListeners({cellValueChanged:s=>this.updateRowSelectable(s.node),rowNodeDataChanged:s=>this.updateRowSelectable(s.node)})}destroy(){super.destroy(),this.selectionCtx.reset()}createCheckboxSelectionComponent(){return new Uy}createSelectAllFeature(o){if(ad(this.beans,o))return new jy(o)}isMultiSelect(){return Jt(this.gos)}onRowCtrlSelected(o,i,s){const n=!!o.rowNode.isSelected();o.forEachGui(s,r=>{r.rowComp.toggleCss("ag-row-selected",n);const a=r.element;Bi(a,n),a.contains(Q(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&&!ki(o)||!et(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(eo(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 a=o.childrenAfterGroup[r];let l=a.isSelected();if(!a.selectable){const d=this.calculateSelectedFromChildren(a);if(d===null)continue;l=d}switch(l){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,a=o.__selected===i;if(r||a)return!1;o.__selected=i,o.dispatchRowEvent("rowSelected");const l=o.sibling;l&&l.footer&&l.__localEventService&&l.dispatchRowEvent("rowSelected");const d=o.pinnedSibling;return d&&d.rowPinned&&d.__localEventService&&d.dispatchRowEvent("rowSelected"),this.eventSvc.dispatchEvent({...Vh(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=st(o)&&bt(s);return o.isColumnFunc(i,n)}else return o.isColumnFunc(i,o.colDef.checkboxSelection)}inferNodeSelections(o,i,s,n){const{gos:r,selectionCtx:a}=this,l=o.isSelected(),d=eo(r),c=Oy(r),u=Hy(r),h=this.isMultiSelect(),g=n==="rowClicked";if(g&&!(c||u))return null;if(i&&s&&h){const p=a.getRoot();if(p)if(p.isSelected()){const f=a.isInRange(o)?a.truncate(o):a.extend(o,d);return{deselect:f.discard,select:f.keep,reset:!1}}else{const f=a.extend(o,d);return{select:[],deselect:f.keep,reset:!1}}else return null}else if(i&&h){const p=a.selectAll?this.beans.rowModel.getRow(0):void 0,f=a.getRoot(p),C=a.isInRange(o)?a.truncate(o):a.extend(o,d);return{select:C.keep,deselect:C.discard,reset:a.selectAll||!!(f&&!f.isSelected())}}else if(s){if(g){const p=!l;return p&&!c||!p&&!u?null:(a.setRoot(o),{node:o,newValue:p,clearSelection:!1})}return a.setRoot(o),{node:o,newValue:!l,clearSelection:!h}}else{a.setRoot(o);const p=By(r),f=Vo(r)==="filteredDescendants",C=g&&(!p||!c);if(f&&l===void 0&&ne(r))return{node:o,newValue:!1,clearSelection:!h||C};if(g){const m=l?!p:c;return m===l&&!C||m&&!c||!m&&!u?null:{node:o,newValue:m,clearSelection:!h||C,keepDescendants:o.group&&d}}return{node:o,newValue:!l,clearSelection:!h||C}}}}class Yy extends qy{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=Bo(o),this.groupSelectsDescendants=eo(o),this.groupSelectsFiltered=Vo(o)==="filteredDescendants",this.masterSelectsDetail=sd(o)==="detail",this.addManagedPropertyListeners(["groupSelectsChildren","groupSelectsFiltered","rowSelection"],()=>{const i=eo(o),s=Bo(o),n=Vo(o)==="filteredDescendants";this.masterSelectsDetail=sd(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:a,keepDescendants:l=!1}){var c;if(!et(this.gos)&&o)return M(132),0;if(n.length===0)return 0;if(n.length>1&&!this.isMultiSelect())return M(130),0;let d=0;for(let u=0;u<n.length;u++){const h=n[u],g=Wt(h),p=this.groupSelectsFiltered&&g.group;if(g.rowPinned&&!ki(g)){M(59);continue}if(g.id===void 0){M(60);continue}p||this.selectRowNode(g,o,r,a)&&(this.detailSelection.delete(g.id),d++),this.groupSelectsDescendants&&((c=g.childrenAfterGroup)!=null&&c.length)&&(d+=this.selectChildren(g,o,a))}return s||(n.length===1&&a==="api"&&this.selectionCtx.setRoot(Wt(n[0])),o&&(i||!this.isMultiSelect())&&(d+=this.clearOtherNodes(Wt(n[0]),l,a)),d>0&&(this.updateGroupsFromChildrenSelections(a),this.dispatchSelectionChanged(a))),d}selectRange(o,i,s){let n=0;return o.forEach(r=>{const a=Wt(r);a.group&&this.groupSelectsDescendants||this.selectRowNode(a,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(!ne(s))return!1;const r=n.rootNode;if(!r)return!1;i||(i=new wi(!0,r),i.active=!1);let a=!1;return i.forEachChangedNodeDepthFirst(l=>{if(l!==r){const d=this.calculateSelectedFromChildren(l);a=this.selectRowNode(l,d===null?!1:d,void 0,o)||a}}),a}clearOtherNodes(o,i,s){const n=new Map;let r=0;return this.selectedNodes.forEach(a=>{const l=a.id==o.id;if((!i||!Qy(o,a))&&!l){const d=this.selectedNodes.get(a.id);r+=this.setNodesSelected({nodes:[d],newValue:!1,clearSelection:!1,suppressFinishActions:!0,source:s}),this.groupSelectsDescendants&&a.parent&&n.set(a.parent.id,a.parent)}}),n.forEach(a=>{const l=this.calculateSelectedFromChildren(a);this.selectRowNode(a,l===null?!1:l,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 ro(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(!ne(o))return;const s=i.getTopLevelNodes();if(s===null)return;const n=[];function r(a){for(let l=0,d=a.length;l<d;l++){const c=a[l];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=ne(this.gos);let n=!1;const r=a=>{const l=this.selectRowNode(Wt(a),!1,void 0,o);n||(n=l)};if(i==="currentPage"||i==="filtered"){if(!s){j(102);return}this.getNodesToSelect(i).forEach(r)}else this.selectedNodes.forEach(r),this.reset(o);if(this.selectionCtx.selectAll=!1,s&&this.groupSelectsDescendants){const a=this.updateGroupsFromChildrenSelections(o);n||(n=a)}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 ld(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 a=l=>{var d;s(l),(d=l.childrenAfterFilter)==null||d.forEach(a)};a(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 a=n;a<=r;a++){const l=s.getRow(a);l&&o(l)}}selectAllRowNodes(o){const{gos:i,selectionCtx:s}=this;if(!et(i)){M(132);return}if(yc(i)&&!Jt(i)){M(130);return}if(!this.canSelectAll())return;const{source:n,selectAll:r}=o;let a=!1;if(this.getNodesToSelect(r).forEach(l=>{const d=this.selectRowNode(Wt(l),!0,void 0,n);a||(a=d)}),s.selectAll=!0,ne(i)&&this.groupSelectsDescendants){const l=this.updateGroupsFromChildrenSelections(n);a||(a=l)}a&&this.dispatchSelectionChanged(n)}getSelectionState(){return this.isEmpty()?null:Array.from(this.selectedNodes.keys())}setSelectionState(o,i,s){if(o||(o=[]),!Array.isArray(o)){j(103);return}const n=new Set(o),r=[];this.beans.rowModel.forEachNode(a=>{n.has(a.id)&&r.push(a)}),s&&this.resetNodes(),this.setNodesSelected({newValue:!0,nodes:r,source:i})}canSelectAll(){const{gos:o}=this.beans;return!!ne(o)}updateSelectable(o){var c;const{gos:i,rowModel:s}=this.beans;if(!et(i))return;const n="selectableChanged",r=o!==void 0,a=ne(i)&&this.groupSelectsDescendants,l=[],d=u=>{var h;if(!(r&&!u.group)){if(a&&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()&&l.push(u)}};if(a){if(o===void 0){const u=s.rootNode;o=u?new wi(!1,u):void 0}o==null||o.forEachChangedNodeDepthFirst(d,!r,!r)}else s.forEachNode(d);l.length&&this.setNodesSelected({nodes:l,newValue:!1,source:n}),!r&&a&&((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,a;if(!this.masterSelectsDetail)return;const s=(a=(r=o.detailNode)==null?void 0:r.detailGridInfo)==null?void 0:a.api;if(!s)return;const n=Zy(s);if(o.isSelected()!==n&&this.selectRowNode(o,n,i,"masterDetail")&&this.dispatchSelectionChanged("masterDetail"),!n){const l=this.detailSelection.get(o.id)??new Set;for(const d of s.getSelectedNodes())l.add(d.id);this.detailSelection.set(o.id,l)}}setDetailSelectionState(o,i,s){if(this.masterSelectsDetail){if(!Jt(i)){M(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 a of n){const l=s.getRowNode(a);l&&r.push(l)}s.setNodesSelected({nodes:r,newValue:!0,source:"masterDetail"})}break}}}}dispatchSelectionChanged(o){this.eventSvc.dispatchEvent({type:"selectionChanged",source:o,selectedNodes:this.getSelectedNodes(),serverSideState:null})}}function Wt(e){return ki(e)?e.pinnedSibling:e.footer?e.sibling:e}function Zy(e){let t=0,o=0;return e.forEachNode(i=>{i.isSelected()?t++:i.selectable&&o++}),ld(t,o)}function ld(e,t){if(e===0&&t===0)return!1;if(!(e>0&&t>0))return e>0}function Qy(e,t){let o=t.parent;for(;o;){if(o===e)return!0;o=o.parent}return!1}const dd={moduleName:"SharedRowSelection",version:Mi,beans:[Ly],apiFunctions:{setNodesSelected:Vy,selectAll:Ny,deselectAll:_y,getSelectedNodes:Wy,getSelectedRows:zy}},cd={moduleName:"RowSelection",version:Mi,rowModels:["clientSide","infinite","viewport"],beans:[Yy],dependsOn:[dd]},Xy="ROOT_NODE_ID";class Jy 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=Xy,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=Go(this.gos),n=!this.gos.get("suppressMaintainUnsortedOrder"),r=o.changedRowNodes,a=new Set,l=this.rootNode,d=l.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))}a.add(b)}const f=[];for(let m=0;m<c;m++){const w=d[m];a.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(a.size);let w=0;if(!n)for(let v=0;v<c;++v){const b=d[v];a.delete(b)&&(b.sourceRowIndex=w,m[w++]=b)}for(const v of a)v.sourceRowIndex=w,m[w++]=v;l.allLeafChildren=m;const S=l.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=Go(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 a=s.length,l=i.changedRowNodes,d=new Array(a);for(let g=0;g<a;g++){const p=this.createRowNode(s[g],r+g);l.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:a}=i;if(!(a!=null&&a.length))return;const l={};a.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(),l[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=>!l[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:a}=i;a!=null&&a.length&&a.forEach(l=>{const d=this.lookupRowNode(o,l);d&&(d.updateData(l),!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 ro(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]&&M(2,{nodeId:s.id}),this.allNodesMap[s.id]=s,this.nextId++,s}lookupRowNode(o,i){var n,r;let s;if(o){const a=o({data:i,level:0});if(s=this.allNodesMap[a],!s)return j(4,{id:a}),null}else if(s=(r=(n=this.rootNode)==null?void 0:n.allLeafChildren)==null?void 0:r.find(a=>a.data===i),!s)return j(5,{data:i}),null;return s||null}}class eR extends Jy{constructor(){super(...arguments);R(this,"beanName","csrmNodeSvc")}}class mn{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 tR(e){e.sibling&&(e.sibling.childrenAfterFilter=e.childrenAfterFilter)}function oR(e){if(q(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 ud(e){e.sibling&&(e.sibling.childrenAfterSort=e.childrenAfterSort),oR(e)}class iR 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=A(s)&&s.length>0,r=n&&!!o.changedRowNodes&&this.gos.get("deltaSort"),a=s.some(({column:l})=>xe(i.gos)?l.isPrimary()&&l.isRowGroupActive():!!l.getColDef().showRowGroup);this.sort(i,s,n,r,o.changedRowNodes,o.changedPath,a)}sort(o,i,s,n,r,a,l){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 F,P,H;const D=m&&b.leafGroup,T=f&&C&&!b.leafGroup&&!l;let G;if(T){const W=((P=(F=u==null?void 0:u.columns)==null?void 0:F[b.level+1])==null?void 0:P.getSort())===null,K=b.childrenAfterAggFilter.slice(0);if(b.childrenAfterSort&&!W){const B={};b.childrenAfterSort.forEach((z,N)=>{B[z.id]=N}),K.sort((z,N)=>(B[z.id]??0)-(B[N.id]??0))}G=K}else!s||D?G=b.childrenAfterAggFilter.slice(0):n&&r?G=sR(h,b,r,a,i):G=b.childrenAfterAggFilter.slice(0);if(S||(S=((H=b.childrenAfterSort)==null?void 0:H[0])!==G[0]),b.childrenAfterSort=G,ud(b),w){const W={nodes:b.childrenAfterSort};w(W)}};if(a==null||a.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 sR(e,t,o,i,s){const n=t.childrenAfterAggFilter,r=t.childrenAfterSort;if(!r)return e.doFullSort(n,s);const a=new Set,l=[],{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)?l.push({currentPos:l.length,rowNode:p}):a.add(p.id)}const u=r.filter(h=>a.has(h.id)).map((h,g)=>({currentPos:g,rowNode:h}));return l.sort((h,g)=>e.compareRowNodes(s,h,g)),nR(e,s,l,u)}function nR(e,t,o,i){const s=[];let n=0,r=0;const a=o.length,l=i.length;for(;n<a&&r<l;){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<a;)s.push(o[n++].rowNode);for(;r<l;)s.push(i[r++].rowNode);return s}class rR 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",fe(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 ro(this.beans);const s=this.getNewNodeManager();this.nodeManager=s,s.activate(this.rootNode)}getNewNodeManager(){const{gos:o,beans:i}=this;return Fc(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,a=!1;do{r=!1;const l=this.getRowIndexAtPixel(o),d=this.getRowIndexAtPixel(i),c=Math.max(l,s),u=Math.min(d,n);for(let h=c;h<=u;h++){const g=this.getRow(h);if(g.rowHeightEstimated){const p=ze(this.beans,g);g.setRowHeight(p.height),r=!0,a=!0}}r&&this.setRowTopAndRowIndex()}while(r);return a}onPropChange(o){if(!this.rootNode)return;const i=this.gos,s=new Set(o),n={step:"nothing",changedProps:s},r=s.has("rowData"),a=this.nodeManager,l=this.getNewNodeManager(),d=a!==l||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,M(1))),d&&(r||(c=(a==null?void 0:a.extractRowData())??c),a!==l&&(a==null||a.deactivate(),this.nodeManager=l),l.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 mn,l.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,l.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,a=ie(this.gos,"normal");for(let l=0,d=i.length;l<d;++l){const c=i[l];if(c.id!=null&&r.add(c.id),c.rowHeight==null){const u=ze(o,c,a,s);c.setRowHeight(u.height,u.estimated)}c.setRowTop(n),c.setRowIndex(l),n+=c.rowHeight}return r}clearRowTopAndRowIndex(o,i){const s=o.active,n=a=>{a&&a.id!=null&&!i.has(a.id)&&a.clearRowTopAndRowIndex()},r=a=>{if(a!==null&&(n(a),n(a.detailNode),n(a.sibling),a.hasChildren()&&a.childrenAfterGroup)){const l=a.level==-1;s&&!l&&!a.expanded||a.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=l=>{let d=n[l];if(this.gos.get("groupHideOpenParents"))for(;d.expanded&&d.childrenAfterSort&&d.childrenAfterSort.length>0;)d=d.childrenAfterSort[0];return d.rowIndex},{footerSvc:a}=this.beans;return a?a.getTopDisplayIndex(s,o,n,r):r(o)}getTopLevelIndexFromDisplayedIndex(o){var a;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=(a=i.childrenAfterSort)==null?void 0:a.findIndex(l=>l===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=St(this.gos);this.refreshModel({step:"map",keepRenderedRows:!0,animate:o})}onFilterChanged(o){if(o.afterDataChange)return;const i=St(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=St(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 wi(!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 a,l,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,(a=i.masterDetailSvc)==null||a.refreshModel(o),s&&o.step!=="group"&&((l=i.colFilter)==null||l.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=[],a=eo(this.gos);return this.forEachNodeAfterFilterAndSort(l=>{if(!n){if(s&&(l===i||l===o)&&(n=!0,l.group&&a)){r.push(...l.allLeafChildren);return}if(!s){if(l!==i&&l!==o)return;s=!0}if(!l.group||!a){r.push(l);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(U(i).rowTop<=o)return i.length-1;let r=-1,a=-1;for(;;){const l=Math.floor((s+n)/2),d=i[l];if(this.isRowInPixel(d,o)||(d.rowTop<o?s=l+1:d.rowTop>o&&(n=l-1),r===s&&a===n))return l;r=s,a=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 a=s?"childrenAfterSort":"childrenAfterGroup";this.depthFirstSearchRowNodes(o,i,l=>l.leafGroup?null:l[a])}depthFirstSearchRowNodes(o,i=!1,s=a=>a.childrenAfterGroup,n=this.rootNode,r=0){let a=r;if(!n)return a;const l=n===this.rootNode;l||o(n,a++);const{footerSvc:d}=this.beans;if(n.hasChildren()&&!n.footer){const c=s(n);if(c){a=(d==null?void 0:d.addTotalRows(a,n,o,i,l,"top"))??a;for(const u of c)a=this.depthFirstSearchRowNodes(o,i,s,u,a);return(d==null?void 0:d.addTotalRows(a,n,o,i,l,"bottom"))??a}}return a}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),ud(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,tR(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(ws)===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,a;(r=this.valueCache)==null||r.onDataChanged();const o=[],i=[],s=new mn;let n=!1;(a=this.rowDataTransactionBatch)==null||a.forEach(l=>{this.rowNodesCountReady=!0;const{rowNodeTransaction:d,rowsInserted:c}=this.nodeManager.updateRowData(l.rowDataTransaction,s);c&&(n=!0),i.push(d),l.callback&&o.push(l.callback.bind(null,d))}),this.commitTransactions(n,s),o.length>0&&window.setTimeout(()=>{o.forEach(l=>l())},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 mn,{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=pr,this.rowsToDisplay=pr}onRowHeightChangedDebounced(){this.onRowHeightChanged_debounced()}}function aR(e){var t;(t=e.expansionSvc)==null||t.onGroupExpandedOrCollapsed()}function lR(e,t){const o=Ae(e);o&&((!t||t==="everything")&&(t="group"),o.refreshModel({step:t,keepRenderedRows:!0,animate:!e.gos.get("suppressAnimationFrame")}))}function dR(e){var t;return((t=Ae(e))==null?void 0:t.isEmpty())??!0}function cR(e,t){var o;(o=Ae(e))==null||o.forEachLeafNode(t)}function uR(e,t){var o;(o=Ae(e))==null||o.forEachNodeAfterFilter(t)}function hR(e,t){var o;(o=Ae(e))==null||o.forEachNodeAfterFilterAndSort(t)}function gR(e){var t,o;if((t=e.rowAutoHeight)!=null&&t.active){M(3);return}(o=Ae(e))==null||o.resetRowHeights()}function pR(e,t){return e.frameworkOverrides.wrapIncoming(()=>{var o;return(o=Ae(e))==null?void 0:o.updateRowData(t)})}function fR(e,t,o){e.frameworkOverrides.wrapIncoming(()=>{var i;return(i=Ae(e))==null?void 0:i.batchUpdateRowData(t,o)})}function CR(e){e.frameworkOverrides.wrapIncoming(()=>{var t;return(t=Ae(e))==null?void 0:t.flushAsyncTransactions()})}function mR(e){var t;return(t=e.selectionSvc)==null?void 0:t.getBestCostNodeSelection()}const hd={moduleName:"ClientSideRowModel",version:Mi,rowModels:["clientSide"],beans:[eR,rR,iR],dependsOn:[fl]},gd={moduleName:"ClientSideRowModelApi",version:Mi,apiFunctions:{onGroupExpandedOrCollapsed:aR,refreshClientSideRowModel:lR,isRowDataEmpty:dR,forEachLeafNode:cR,forEachNodeAfterFilter:uR,forEachNodeAfterFilterAndSort:hR,resetRowHeights:gR,applyTransaction:pR,applyTransactionAsync:fR,flushAsyncTransactions:CR,getBestCostNodeSelection:mR},dependsOn:[rb]};class bo{static getComponentDefinition(t,o){let i;return typeof t=="string"?i=this.searchForComponentInstance(o,t):i={extends:E.defineComponent({...t})},i||j(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=bo.getComponentDefinition(t,i);if(!n)return;const{vm:r,destroy:a,el:l}=this.mount(n,{params:Object.freeze(o)},i,s||{});return{componentInstance:r,element:l,destroy:a}}static mount(t,o,i,s){let n=new E({beforeCreate(){s?(this._provided=Object.create(i.proxy._provided||null),Object.keys(s).forEach(l=>{this._provided[l]=s[l]})):this._provided=i.proxy._provided||{};const a=i.proxy.$root;a&&a.$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(a){return a(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,a=t.proxy.$parent;for(;!n&&a&&a.components&&++r<i;)a.components&&a.components[o]&&(n=a.components[o]),a=a.$parent;for(r=0,a=t.proxy.$parent;!n&&a&&a.$options&&++r<i;){const l=a;l.$options&&l.$options.components&&l.$options.components[o]?n=l.$options.components[o]:l[o]&&(n=l[o]),a=a.$parent}for(r=0,a=t.proxy.$parent;!n&&a&&++r<i;){if(a.exposed){const l=a;l.exposed&&l.exposed[o]?n=l.exposed[o]:l[o]&&(n=l[o])}a=a.$parent}return n||E.options&&E.options.components&&E.options.components[o]&&(n=E.options.components[o]),!n&&!s?(j(114,{component:o}),null):n}}var wR=Object.defineProperty,vR=(e,t,o)=>t in e?wR(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,yo=(e,t,o)=>vR(e,typeof t!="symbol"?t+"":t,o);class SR extends _v{constructor(t,o){super(),yo(this,"parent"),yo(this,"provides"),this.parent=t,this.provides=o}createWrapper(t){const o=this;class i extends bR{init(r){super.init(r)}hasMethod(r){return s.getFrameworkComponentInstance()[r]}callMethod(r,a){var l,d;const c=this.getFrameworkComponentInstance(),u=s.getFrameworkComponentInstance();if(u[r])return u[r].apply(c,a);{const h=((l=c.$.exposed)==null?void 0:l[r])||((d=c.exposed)==null?void 0:d[r])||c.$.setupState[r];return h==null?void 0:h.apply(c,a)}}addMethod(r,a){s[r]=a}processMethod(r,a){return r==="refresh"&&(this.getFrameworkComponentInstance().params=a[0]),this.hasMethod(r)?this.callMethod(r,a):r==="refresh"}createComponent(r){return o.createComponent(t,r)}}const s=new i;return s}createComponent(t,o){return bo.createAndMountComponent(t,o,this.parent,this.provides)}createMethodProxy(t,o,i){return function(){return t.hasMethod(o)?t.callMethod(o,arguments):(i&&M(233,{methodName:o}),null)}}destroy(){this.parent=null}}class bR{constructor(){yo(this,"componentInstance"),yo(this,"element"),yo(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 yR=Object.defineProperty,RR=(e,t,o)=>t in e?yR(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,ER=(e,t,o)=>RR(e,t+"",o);class xR extends Ta{constructor(t){super("vue"),ER(this,"parent"),this.parent=t}frameworkComponent(t,o){let i=bo.searchForComponentInstance(this.parent,t,10,!0)?t:null;if(!i&&o&&o[t]){const s=o[t];i=bo.searchForComponentInstance(this.parent,s,10,!0)?s:null}return i}isFrameworkComponent(t){return typeof t=="object"}}function DR(){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 FR=(e,t)=>{let o;return()=>{const i=function(){e()};window.clearTimeout(o),o=window.setTimeout(i,t)}};function PR(e){return e&&e.constructor&&e.constructor.toString().substring(0,5)==="class"}function Ro(e){const t=new WeakSet,o=i=>{if(PR(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 TR=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},DR()),emits:["update:modelValue"],setup(e,{expose:t,emit:o}){const i=e,s=E.ref(),n=E.ref(void 0),r=E.ref(!1),a=E.ref(!1),l=E.ref(!1),d=E.ref({}),c=E.ref(null),u=E.toRefs(i);nn().filter(F=>F!="gridOptions").forEach(F=>{E.watch(()=>u[F],(P,H)=>{(F==="rowData"&&!f.value||F!=="rowData")&&T(F,P),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,F=>{g.value=F}),E.watch(g,(F,P)=>{r.value&&(f.value||(p.value=!0,T("rowData",Ro(F),Ro(P))),f.value=!1)},{deep:!0});const C=FR(()=>{f.value=!0,o("update:modelValue",b())},10),m=E.getCurrentInstance(),w=F=>{var P;l.value&&h.has(F)&&(P=m==null?void 0:m.proxy)!=null&&P.$props["onUpdate:modelValue"]&&C()},S=()=>{var F;(i.rowData||(F=i.gridOptions)!=null&&F.rowData)&&g.value&&M(232)},v=()=>{var F;return g.value||i.rowData||((F=i.gridOptions)==null?void 0:F.rowData)},b=()=>{const F=[];return n==null||n.value.forEachLeafNode(P=>{F.push(P.data)}),F},D=F=>P=>{if(a.value)return;P==="gridReady"&&(l.value=!0);const H=po.has(P);H&&!F||!H&&F||h.has(P)&&(p.value||w(P),p.value=!1)},T=(F,P,H)=>{if(r.value){let W=P.value||P;F==="rowData"&&W!=null&&(W=Ro(W)),d.value[F]=W,c.value==null&&(c.value=window.setTimeout(()=>{c.value=null,Dc(d.value,n.value),d.value={}},0))}},G=()=>Object.create(E.getCurrentInstance().proxy._provided);return E.onMounted(()=>{Ft(Bl,void 0,!0);const F=new SR(E.getCurrentInstance(),G()),P={globalListener:D(),globalSyncListener:D(!0),frameworkOverrides:new xR(E.getCurrentInstance()),providedBeanInstances:{frameworkCompWrapper:F},modules:i.modules},H=E.markRaw(xc(Ro(i.gridOptions),i,[...nn(),...Object.values(yi)])),W=v();W!==void 0&&(H.rowData=Ro(W)),n.value=Lv(s.value,H,P),r.value=!0}),E.onUnmounted(()=>{var F;r.value&&((F=n==null?void 0:n.value)==null||F.destroy(),a.value=!0)}),t({api:n}),{__sfc:!0,props:i,rootRef:s,api:n,gridCreated:r,isDestroyed:a,gridReadyFired:l,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:T,getProvides:G}}});function ae(e,t,o,i,s,n,r,a){var l=typeof e=="function"?e.options:e;return t&&(l.render=t,l.staticRenderFns=o,l._compiled=!0),n&&(l._scopeId="data-v-"+n),{exports:e,options:l}}var IR=function(){var t=this,o=t._self._c;return t._self._setupProxy,o("div",{ref:"rootRef"})},AR=[],MR=ae(TR,IR,AR,!1,null,"60566900");const pd=MR.exports,kR=e=>{const t=E.getCurrentInstance(),o={id:e.id,rowIdMapper:e.rowIdMapper,columns:e.columns,rowData:e.rowData,pageSize:e.pageSize,enableCursorPage:e.enableCursorPage,gridOptions:e.gridOptions,footerHeight:e.footerHeight,editable:e.editable,onRowChange:e.onRowChange,onError:i=>Md.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 od(o)},fd={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)}},LR={functional:!0,props:{params:{type:Object,required:!0}},render(e,t){const o=e("",{});return o.text=`${t.props.params.column.getColId()} holder`,o}},GR=E.defineComponent({name:"CellRenderer"}),HR=E.defineComponent({...GR,props:{params:null},setup(e){const t=e,o=E.computed(()=>{const r=t.params.data,a=r.isEditing()&&t.params.editeRender?t.params.editeRender:t.params.render,l={...t.params,render:a};if(r instanceof Nt){const d=r.getCell(l.column);if(!d)return l.render=t.params.render,l;const{hostArray:c,hostObject:u}=r.getHostObject(l);r.getActualRow().isCellEditing(t.params.node.id,t.params.column)||(l.render=t.params.render),l.hostObject=u,l.hostArrayHook=g=>{var p;let f=c;((p=l.colDef)==null?void 0:p.cellDataType)==="array"&&!c&&(f=[],O.set(r.getData(),d.path,f)),f&&(g(f),r.buildSpan(),l.context.reload(),l.api.redrawRows({rowNodes:l.api.getRenderedNodes().filter(C=>r.match(C))}))}}return l}),i=E.computed(()=>{const r=t.params.data,a=r.getActualRow();if(a.isEditing()&&t.params.editeRender){const d=a.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:fd,CellHolder:LR}}});var OR=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}})},BR=[],VR=ae(HR,OR,BR,!1,null,null);const NR=VR.exports,_R=E.defineComponent({name:"GridToolbar"}),WR=E.defineComponent({..._R,setup(e){return{__sfc:!0}}});var zR=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)])},$R=[],UR=ae(WR,zR,$R,!1,null,"f12c2536");const Cd=UR.exports,KR=E.defineComponent({__name:"FooterCellRender",props:{params:null},setup(e){return{__sfc:!0,props:e,VNodeRenderer:fd}}});var jR=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)},qR=[],YR=ae(KR,jR,qR,!1,null,"4998e205");const ZR=YR.exports,QR=E.defineComponent({name:"SearchItem",props:{search:{type:Object,required:!0},teleported:{type:Boolean}},setup(e){return()=>e.search.render(e.search)}});var XR=ae(QR,null,null,!1,null,"e1931525");const wn=XR.exports,JR=E.defineComponent({name:"ClSearch"}),eE=E.defineComponent({...JR,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}))))},a=()=>{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})},l=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 l()};return E.onBeforeMount(()=>{a()}),{__sfc:!0,searchForm:o,props:t,loading:i,reset:s,persistenceKey:n,doPersistence:r,restore:a,doSearch:l,handleReset:d,SearchItem:wn}}});var tE=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)])},oE=[],iE=ae(eE,tE,oE,!1,null,"962588ec");const sE=iE.exports,md=(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),a=E.computed(()=>Array.isArray(o)?o.some(h=>!r(h.value)):!r(o==null?void 0:o.value)),l=E.computed(()=>[s.value?"is-loading":""]),d=E.computed(()=>a.value?"var(--el-color-primary)":void 0);return{visible:i,loading:s,width:n,loadingClass:l,hasCondition:a,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)}}},nE=E.defineComponent({name:"ClPopoverSearch"}),rE=E.defineComponent({...nE,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:a,doSearch:l,reset:d}=md(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:a,doSearch:l,reset:d,popoverWidth:c,SearchItem:wn}}});var aE=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()},lE=[],dE=ae(rE,aE,lE,!1,null,null);const cE=dE.exports,uE=E.defineComponent({name:"ClDrawerSearch"}),hE=E.defineComponent({...uE,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:a}=md(t.searchRemote,t,t.search);return E.onMounted(()=>{t.attached||a()}),{__sfc:!0,props:t,visible:o,loading:i,loadingClass:s,hasConditionColor:n,doSearch:r,reset:a,SearchItem:wn}}});var gE=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)},pE=[],fE=ae(hE,gE,pE,!1,null,null);const wd=fE.exports;var CE=Object.defineProperty,mE=(e,t,o)=>t in e?CE(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,wE=(e,t,o)=>mE(e,t+"",o);class vn{constructor(t){wE(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 vn(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 vE=E.defineComponent({name:"SearchButton"}),SE=E.defineComponent({...vE,props:{searches:null},setup(e){const t=e,o=E.inject(gt);return{__sfc:!0,props:t,context:o,ClDrawerSearch:wd}}});var bE=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}})},yE=[],RE=ae(SE,bE,yE,!1,null,"45be5dfc");const vd=RE.exports,EE=E.defineComponent({name:"RefreshButton"}),xE=E.defineComponent({...EE,setup(e){const t=E.ref(!1),{refresh:o}=E.inject(gt);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 DE=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":""]})])},FE=[],PE=ae(xE,DE,FE,!1,null,"0eaeb325");const Sd=PE.exports;function bd(e,t){const o=t(e);return TE(e)&&(o.children=e.children.map(i=>bd(i,t))),o}const TE=e=>!!e.children,IE=()=>{const e=E.inject(gt),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`)},a=()=>{var C,m;o.value=(m=(C=e.api.value.getColumnDefs())==null?void 0:C.map(w=>bd(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())},l=(C,m,w)=>w!=="inner"&&C.parent===m.parent,d=()=>{s.value=t.value.getCheckedKeys()},c=C=>{if(C instanceof $e)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:a,checkColumnAllowDrop:l,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 T=u(w,D,b);e.api.value.moveColumns(D,T)}}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),a()},columnAutoResize:()=>{e.api.value.sizeColumnsToFit()}}},AE=E.defineComponent({name:"SettingButton"}),ME=E.defineComponent({...AE,setup(e){const{treeRef:t,treeData:o,defaultCheckedKeys:i,refreshTreeData:s,checkColumnAllowDrop:n,onColumnDragStart:r,onColumnDragFinish:a,onColumnVisibleChange:l,onColumnPinedChange:d,columnAutoResize:c}=IE(),u=E.ref(!1),h=E.inject(gt);return{__sfc:!0,treeRef:t,treeData:o,defaultCheckedKeys:i,refreshTreeData:s,checkColumnAllowDrop:n,onColumnDragStart:r,onColumnDragFinish:a,onColumnVisibleChange:l,onColumnPinedChange:d,columnAutoResize:c,visible:u,gridContext:h,handleResetGridState:()=>{h.resetGridState(),s()}}}});var kE=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)},LE=[],GE=ae(ME,kE,LE,!1,null,"522bf761");const yd=GE.exports,HE={functional:!0,name:"HeaderVNodeRender",props:["params"],render(e,t){const o=t.props.params;return o.headerRender?o.headerRender(o):e("span",o.displayName)}},OE=E.defineComponent({name:"HeaderRenderer"}),BE=E.defineComponent({...OE,props:{params:null},setup(e){const t=e,o=E.ref(),i=E.ref(-1),s=E.inject(gt),n=()=>{o.value=t.params.column.getSort(),i.value=Wl(t.params.api,t.params.column.getColId())},r=async(a,l)=>{try{o.value=a,t.params.setSort(a,l.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:HE}}});var VE=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)},NE=[],_E=ae(BE,VE,NE,!1,null,"126699e0");const WE=_E.exports,zE=E.defineComponent({name:"GridEmptyDataOverlay"}),$E=E.defineComponent({...zE,setup(e){return{__sfc:!0}}});var UE=function(){var t=this,o=t._self._c;return t._self._setupProxy,o("el-empty",{attrs:{description:"没有数据了","image-size":75}})},KE=[],jE=ae($E,UE,KE,!1,null,"05fc87c0");const qE=jE.exports,YE=E.defineComponent({name:"GridLoadingOverlay"}),ZE=E.defineComponent({...YE,setup(e){return{__sfc:!0}}});var QE=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)"}})},XE=[],JE=ae(ZE,QE,XE,!1,null,"c60c1386");const e0=JE.exports,t0=(e,t,o)=>{const i=id({columns:e.columns,gridOptions:e.gridOptions,footerHeight:e.footerHeight},t,o);return{...i,footerGridOptions:i.footerGridOptions}},o0=()=>({theme:E.ref("ag-theme-alpine")}),i0=E.defineComponent({name:"Grid",components:{SearchButton:vd,RefreshButton:Sd,SettingButton:yd,CellRenderer:NR,GridEmptyDataOverlay:qE,HeaderRenderer:WE,GridLoadingOverlay:e0,AgGridVue:pd,GridToolbar:Cd,FooterCellRender:ZR}}),s0=E.defineComponent({...i0,props:{id:null,rowIdMapper:{type:Function},columns:null,rowData:{type:Function},pageSize:{default:50},enableCursorPage:{type:Boolean,default:!1},footerHeight:null,tools:{default:()=>["search","refresh","setting"]},searches:null,gridOptions:{default:()=>({})},editable:null,onRowChange:{type:Function}},setup(e,{expose:t}){const o=e,i=E.ref(),s=E.ref(),{theme:n}=o0(),{gridOptions:r,dataCache:a,gridStyles:l,gridApi:d,gridElRef:c,reload:u,insertRows:h,existRow:g,getRows:p,refresh:f,resetGridState:C}=kR(o),{footerGridOptions:m,setFooterData:w,footerStyles:S}=t0(o,s,l);return E.provide(gt,{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=a.value.createRow(v);return b?new Ti(D,o.rowIdMapper,!0):D},existRow:g,insertRows:h,startEditing:()=>{const v=a.value.getRows().filter(b=>!b.isEditing());O.isEmpty(v)||(v.forEach(b=>b.startEditing()),u(),d.value.redrawRows())},stopEditing:()=>{const v=a.value.getRows().filter(b=>b.isEditing());O.isEmpty(v)||(v.forEach(b=>b.stopEditing()),u(),d.value.redrawRows())},deselectAll:(v,b)=>{d.value.deselectAll(v,b)}}),{__sfc:!0,props:o,bottomRef:i,gridRef:s,theme:n,options:r,dataCache:a,gridStyles:l,gridApi:d,gridElRef:c,reload:u,insertRows:h,existRow:g,getRows:p,refresh:f,resetGridState:C,footerGridOptions:m,setFooterData:w,footerStyles:S,AgGridVue:pd,GridToolbar:Cd,SearchButton:vd,RefreshButton:Sd,SettingButton:yd}}});var n0=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)},r0=[],a0=ae(s0,n0,r0,!1,null,null);const l0=a0.exports;var d0=Object.defineProperty,c0=(e,t,o)=>t in e?d0(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,Eo=(e,t,o)=>c0(e,typeof t!="symbol"?t+"":t,o);const u0=e=>new Rd(e);class Rd{constructor(t){Eo(this,"colDef"),Eo(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 h0=e=>new Ed(e);class Ed{constructor(t){Eo(this,"colDefs"),Eo(this,"rendersMap",new Map),Eo(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)Yl.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 g0=(e,t)=>({model:{value:O.get(e,t),callback:o=>{O.set(e,t,o)}}});Hd({theme:"legacy"});const p0={install:()=>{Ku.registerModules([ZS,QS,XS,JS,tb,eb,Eb,lb,nS,za,Bl,Lb,Wb,jb,ey,cd,wv,cy,Cy,uy,yy,bv,wb,Fl,Ry,xy,of,ay,gd,hd,ob])}};k.ActualRow=vo,k.CLEAN_AG_GRID_OPTIONS=jl,k.CellEditableRow=Ii,k.CellRenderAdapter=Rd,k.CellValue=_t,k.ClDrawerSearch=wd,k.ClPopoverSearch=cE,k.ClSearch=sE,k.ClientSideRowModelApiModule=gd,k.ClientSideRowModelModule=hd,k.ColumnRendersBuilder=Ed,k.EditableRow=Ti,k.GRID_CONTEXT=gt,k.Grid=l0,k.GridDataCache=Kl,k.GridDataSource=zl,k.GridUtils=Yl,k.ID_FIRST_DEEP=ql,k.ID_SPLITTER=Ai,k.ProjectionRow=Nt,k.RowSelectionModule=cd,k.RowSpans=pn,k.Searches=vn,k.ServerGetRowsParamsRequest=Ye,k.SharedRowSelectionModule=dd,k.SpanMatrix=Ul,k.VueGridPlugin=p0,k._getColumnSortIndexe=Wl,k._getSortedColumns=gn,k._getSortedColumnsIndexes=_l,k.buildProxyOptions=Ql,k.defaultColDefCellClassRules=Jl,k.isActualRow=Ty,k.isGridRow=Py,k.mergeRowClass=fn,k.selectionColumnCellClassRules=Xl,k.useFooter=id,k.useGrid=od,k.useGridScroll=ed,k.useGridState=Zl,k.vModel=g0,k.withColumnRenderBuilder=h0,k.withRender=u0,Object.defineProperty(k,Symbol.toStringTag,{value:"Module"})});