@scvzerng/element-ui-ag-grid-vue2 0.0.9 → 0.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ElementPlusAgGrid.es.js +129 -114
- package/dist/ElementPlusAgGrid.umd.js +1 -1
- package/dist/style.css +1 -1
- package/dist/types/model/row/ActualRow.d.ts +1 -0
- package/dist/types/model/row/EditableRow.d.ts +1 -0
- package/dist/types/model/row/GridRow.d.ts +2 -0
- package/dist/types/model/row/ProjectionRow.d.ts +6 -0
- package/package.json +1 -1
|
@@ -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:()=>Xa("IntegratedChartsModule"),258:()=>Xa("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})=>Za({reasonOrId:`AG Grid '${e}' component: ${t}`,moduleName:Qt[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 ${Lt}/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:()=>qa(),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:Ya,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 hb(e,t){const o=ub[e];if(!o)return[`Missing error text for error id ${e}!`];const i=o(t),n=`
|
|
56
56
|
See ${Ir(e,t)}`;return Array.isArray(i)?i.concat(n):[i,n]}var gb={1:"Charting Aggregation",2:"pivotResultFields",3:"setTooltip"},Qa=new WeakMap,Ja=new WeakMap;function pb(e,t,o){if(!t)return j(11),{};const i=o;let s;if(!(i!=null&&i.setThemeOnGridDiv)){const r=ne({tag:"div"});r.style.height="100%",e.appendChild(r),e=r,s=()=>e.remove()}return new Cb().create(e,t,r=>{const l=new Ef(e);r.createBean(l)},void 0,o,s)}var fb=1,Cb=class{create(e,t,o,i,s,n){const r=ns.applyGlobalGridOptions(t),l=r.gridId??String(fb++),a=this.getRegisteredModules(s,l,r.rowModelType),d=this.createBeansList(r.rowModelType,a,l),c=this.createProvidedBeans(e,r,s);if(!d)return;const h={providedBeanInstances:c,beanClasses:d,gridId:l,beanInitComparator:af,beanDestroyComparator:df,derivedBeans:[rf],destroyCallback:()=>{Ja.delete(p),Qa.delete(e),n==null||n()}},g=new Th(h);this.registerModuleFeatures(g,a),o(g),g.getBean("syncSvc").start(),i==null||i(g);const p=g.getBean("gridApi");return Qa.set(e,p),Ja.set(p,e),p}getRegisteredModules(e,t,o){var i;return Wt(ib,void 0,!0),(i=e==null?void 0:e.modules)==null||i.forEach(s=>Wt(s,t)),yh(t,ed(o))}registerModuleFeatures(e,t){const o=e.getBean("registry"),i=e.getBean("apiFunctionSvc");t.forEach(s=>{o.registerModule(s);const n=s.apiFunctions;n&&Object.keys(n).forEach(l=>{i==null||i.addFunction(l,n[l])})})}createProvidedBeans(e,t,o){let i=o?o.frameworkOverrides:null;q(i)&&(i=new ra);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=ed(e),n=i[s];if(!n){ho(201,{rowModelType:s},`Unknown rowModelType ${s}.`);return}if(!xh()){ho(272,void 0,qa());return}if(!e){const l=Object.entries(i).filter(([a,d])=>Gs(d,o,a));if(l.length==1){const[a,d]=l[0];if(a!==s){const c={moduleName:d,rowModelType:a};ho(275,c,Ya(c));return}}}if(!Gs(n,o,s)){ho(200,{reasonOrId:`rowModelType = '${s}'`,moduleName:n,gridScoped:Hs(),gridId:o,rowModelType:s},`Missing module ${n}Module for rowModelType ${s}.`);return}const r=new Set;return t.forEach(l=>{var a;return(a=l.beans)==null?void 0:a.forEach(d=>r.add(d))}),Array.from(r)}};function ed(e){return e??"clientSide"}function Oe(e){const t=e.rowModel;return t.getType()==="clientSide"?t:void 0}function mb(e){const t=e.rowModel;return t.getType()==="serverSide"?t:void 0}var vb=class extends F{constructor(){super(...arguments),this.beanName="localeSvc"}getLocaleTextFunc(){const e=this.gos,t=e.getCallback("getLocaleText");if(t)return(i,s,n)=>t({key:i,defaultValue:s,variableValues:n});const o=e.get("localeText");return(i,s,n)=>{let r=o&&o[i];if(r&&n&&n.length){let l=0;for(;!(l>=n.length||r.indexOf("${variable}")===-1);)r=r.replace("${variable}",n[l++])}return r??s}}};function wb(e,t=!1){const o=[],i=[],s=[],n=[],r=[],l=[],a=[],d=[],c=[];let u=0;for(let h=0;h<e.length;h++){const{colId:g,sort:p,sortIndex:f,rowGroup:C,rowGroupIndex:m,aggFunc:b,pivot:S,pivotIndex:w,pinned:y,hide:R,width:P,flex:M}=e[h];c.push(g),p&&(o[f??u++]={colId:g,sort:p}),C&&(i[m??0]=g),typeof b=="string"&&s.push({colId:g,aggFunc:b}),S&&(n[w??0]=g),y&&(y==="right"?l:r).push(g),R&&a.push(g),(M!=null||P)&&d.push({colId:g,flex:M??void 0,width:P})}return{sort:o.length?{sortModel:o}:void 0,rowGroup:i.length?{groupColIds:i}:void 0,aggregation:s.length?{aggregationModel:s}:void 0,pivot:n.length||t?{pivotMode:t,pivotColIds:n}:void 0,columnPinning:r.length||l.length?{leftColIds:r,rightColIds:l}:void 0,columnVisibility:a.length?{hiddenColIds:a}:void 0,columnSizing:d.length?{columnSizingModel:d}:void 0,columnOrder:c.length?{orderedColIds:c}:void 0}}function bb(e){const t=[];return e.forEach(({groupId:o,open:i})=>{i&&t.push(o)}),t.length?{openColumnGroupIds:t}:void 0}var Sb=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&&G(49,{methodName:t}),null)}}},yb={tag:"div",cls:"ag-tooltip"},Rb=class extends nn{constructor(){super(yb)}init(e){const{value:t}=e,o=this.getGui();o.textContent=Bt(t);const i=e.location.replace(/([a-z])([A-Z0-9])/g,"$1-$2").toLowerCase();o.classList.add(`ag-${i}-tooltip`)}},xb=1e3,Eb=1e3,td=100,od,Vi=!1,Db=class extends F{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()),!Mt()&&(Vi?this.showTooltipTimeoutId=window.setTimeout(()=>{this.prepareToShowTooltip(e)},td):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||Vi)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()-od<xb}setToDoNothing(e){!e&&this.state===2&&this.hideTooltip(),this.onBodyScrollEventCallback&&(this.onBodyScrollEventCallback(),this.onBodyScrollEventCallback=void 0),this.onColumnMovedEventCallback&&(this.onColumnMovedEventCallback(),this.onColumnMovedEventCallback=void 0),this.onDocumentKeyDownCallback&&(this.onDocumentKeyDownCallback(),this.onDocumentKeyDownCallback=void 0),this.clearTimeouts(),this.state=0,this.lastMouseEvent=null}showTooltip(){var r,l,a,d,c,u,h;const e=this.getTooltipValue(),t=this.tooltipCtrl;if(!L(e)||t.shouldDisplayTooltip&&!t.shouldDisplayTooltip()){this.setToDoNothing();return}const o=(r=t.getRowNode)==null?void 0:r.call(t),i=V(this.gos,{location:((l=t.getLocation)==null?void 0:l.call(t))??"UNKNOWN",colDef:(a=t.getColDef)==null?void 0:a.call(t),column:(d=t.getColumn)==null?void 0:d.call(t),rowIndex:(c=t.getRowIndex)==null?void 0:c.call(t),node:o,data:o==null?void 0:o.data,value:e,valueFormatted:(u=t.getValueFormatted)==null?void 0:u.call(t),hideTooltipCallback:()=>this.hideTooltip(!0),...((h=t.getAdditionalParams)==null?void 0:h.call(t))??{}});this.state=2,this.tooltipInstanceCount++;const s=this.newTooltipComponentCallback.bind(this,this.tooltipInstanceCount),n=mh(this.userCompFactory,i);n==null||n.newAgStackInstance().then(s)}hideTooltip(e){!e&&this.isInteractingWithTooltip||(this.tooltipComp&&(this.destroyTooltipComp(),od=Date.now()),this.eventSvc.dispatchEvent({type:"tooltipHide",parentGui:this.tooltipCtrl.getGui()}),e&&(this.isInteractingWithTooltip=!1),this.setToDoNothing(!0))}newTooltipComponentCallback(e,t){var r;if(this.state!==2||this.tooltipInstanceCount!==e){this.destroyBean(t);return}const i=t.getGui();this.tooltipComp=t,i.classList.contains("ag-tooltip")||i.classList.add("ag-tooltip-custom"),this.tooltipTrigger===0&&i.classList.add("ag-tooltip-animate"),this.interactionEnabled&&i.classList.add("ag-tooltip-interactive");const s=this.getLocaleTextFunc(),n=(r=this.popupSvc)==null?void 0:r.addPopup({eChild:i,ariaLabel:s("ariaLabelTooltip","Tooltip")});if(n&&(this.tooltipPopupDestroyFunc=n.hideFunc),this.positionTooltip(),this.tooltipTrigger===1){const l=()=>this.setToDoNothing();[this.onBodyScrollEventCallback,this.onColumnMovedEventCallback]=this.addManagedEventListeners({bodyScroll:l,columnMoved:l})}this.interactionEnabled&&([this.tooltipMouseEnterListener,this.tooltipMouseLeaveListener]=this.addManagedElementListeners(i,{mouseenter:this.onTooltipMouseEnter.bind(this),mouseleave:this.onTooltipMouseLeave.bind(this)}),[this.onDocumentKeyDownCallback]=this.addManagedElementListeners(re(this.beans),{keydown:l=>{i.contains(l==null?void 0:l.target)||this.onKeyDown()}}),this.tooltipTrigger===1&&([this.tooltipFocusInListener,this.tooltipFocusOutListener]=this.addManagedElementListeners(i,{focusin:this.onTooltipFocusIn.bind(this),focusout:this.onTooltipFocusOut.bind(this)}))),this.eventSvc.dispatchEvent({type:"tooltipShow",tooltipGui:i,parentGui:this.tooltipCtrl.getGui()}),this.startHideTimeout()}onTooltipMouseEnter(){this.isInteractingWithTooltip=!0,this.unlockService()}onTooltipMouseLeave(){this.isTooltipFocused()||(this.isInteractingWithTooltip=!1,this.lockService())}onTooltipFocusIn(){this.isInteractingWithTooltip=!0}isTooltipFocused(){var o;const e=(o=this.tooltipComp)==null?void 0:o.getGui(),t=ee(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?Eb: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(){Vi=!0,this.interactiveTooltipTimeoutId=window.setTimeout(()=>{this.unlockService(),this.setToDoNothing()},td)}unlockService(){Vi=!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 Ln(e){return e.get("tooltipShowMode")==="whenTruncated"}var Fb=class extends F{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 Db(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()}},Pb={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},pe="clientSide",ce="serverSide",Jt="infinite",Tb={onGroupExpandedOrCollapsed:[pe],refreshClientSideRowModel:[pe],isRowDataEmpty:[pe],forEachLeafNode:[pe],forEachNodeAfterFilter:[pe],forEachNodeAfterFilterAndSort:[pe],resetRowHeights:[pe],applyTransaction:[pe],applyTransactionAsync:[pe],flushAsyncTransactions:[pe],getBestCostNodeSelection:[pe],getServerSideSelectionState:[ce],setServerSideSelectionState:[ce],applyServerSideTransaction:[ce],applyServerSideTransactionAsync:[ce],applyServerSideRowData:[ce],retryServerSideLoads:[ce],flushServerSideAsyncTransactions:[ce],refreshServerSide:[ce],getServerSideGroupLevelState:[ce],refreshInfiniteCache:[Jt],purgeInfiniteCache:[Jt],getInfiniteRowCount:[Jt],isLastRowIndexKnown:[Jt,ce],expandAll:[pe,ce],collapseAll:[pe,ce],onRowHeightChanged:[pe,ce],setRowCount:[Jt,ce],getCacheBlockState:[Jt,ce]},Ib={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 Mb(e,t,o){const i=Ib[e];if(i){const{version:n,new:r,old:l,message:a}=i,d=l??e;return(...c)=>{const u=r?`Please use ${r} instead. `:"";return uo(`Since ${n} api.${d} is deprecated. ${u}${a??""}`),t.apply(t,c)}}const s=Tb[e];return s?(...n)=>{const r=o.rowModel.getType();if(!s.includes(r)){kt(`api.${e} can only be called when gridOptions.rowModelType is ${s.join(" or ")}`);return}return t.apply(t,n)}:t}var Ab={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"},kb={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},Lb={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"},Gb=new Set(["colorPicker","smallUp","checkboxChecked","checkboxIndeterminate","checkboxUnchecked","radioButtonOn","radioButtonOff","smallDown","smallLeft","smallRight"]),Hb=class extends F{constructor(){super(...arguments),this.beanName="validation"}wireBeans(e){this.gridOptions=e.gridOptions,zc(this)}warnOnInitialPropertyUpdate(e,t){e==="api"&&Pb[t]&&G(22,{key:t})}processGridOptions(e){this.processOptions(e,Qv())}validateApiFunction(e,t){return Mb(e,t,this.beans)}missingUserComponent(e,t,o,i){const s=Qt[t];s?this.gos.assertModuleRegistered(s,`AG Grid '${e}' component: ${t}`):G(101,{propertyName:e,componentName:t,agGridDefaults:o,jsComps:i})}missingDynamicBean(e){const t=Ab[e];return t?Ie(200,{...this.gos.getModuleErrorParams(),moduleName:t,reasonOrId:e}):void 0}checkRowEvents(e){Bb.has(e)&&G(10,{eventType:e})}validateIcon(e){if(Gb.has(e)&&G(43,{iconName:e}),kb[e])return;const t=Lb[e];if(t){j(200,{reasonOrId:`icon '${e}'`,moduleName:t,gridScoped:Hs(),gridId:this.beans.context.getGridId(),rowModelType:this.gos.get("rowModelType"),additionalText:"Alternatively, use the CSS icon name directly."});return}G(134,{iconName:e})}isProvidedUserComp(e){return!!Qt[e]}validateColDef(e){this.processOptions(e,Wv())}processOptions(e,t){const{validations:o,deprecations:i,allProperties:s,propertyExceptions:n,objectName:r,docsUrl:l}=t;s&&this.gridOptions.suppressPropertyNamesCheck!==!0&&this.checkProperties(e,[...n??[],...Object.keys(i)],s,r,l);const a=new Set;Object.keys(e).forEach(c=>{const u=i[c];if(u){const{message:b,version:S}=u;a.add(`As of v${S}, ${String(c)} is deprecated. ${b??""}`)}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 b=typeof h;if(b!==m){a.add(`${String(c)} should be of type '${m}' but received '${b}' (${h}).`);return}}if(C){const b=this.gridOptions.rowModelType??"clientSide";if(!C.includes(b)){a.add(`${String(c)} is not supported with the '${b}' row model. It is only valid with: ${C.join(", ")}.`);return}}if(p){const b=this.checkForRequiredDependencies(c,p,e);if(b){a.add(b);return}}if(f){const b=f(e,this.gridOptions,this.beans);if(b){a.add(b);return}}}),a.size>0&&a.forEach(c=>{uo(c)})}checkForRequiredDependencies(e,t,o){const s=Object.entries(t).filter(([n,r])=>{const l=o[n];return!r.required.includes(l)});return s.length===0?null:s.map(([n,r])=>`'${String(e)}' requires '${n}' to be one of [${r.required.map(l=>l===null?"null":l===void 0?"undefined":l).join(", ")}]. ${r.reason??""}`).join(`
|
|
57
57
|
`)}checkProperties(e,t,o,i,s){const n=["__ob__","__v_skip","__metadata__"],r=Ob(Object.getOwnPropertyNames(e),[...n,...t,...o],o),l=Object.keys(r);for(const a of l){const d=r[a];let c=`invalid ${i} property '${a}' did you mean any of these: ${d.slice(0,8).join(", ")}.`;o.includes("context")&&(c+=`
|
|
58
|
-
If you are trying to annotate ${i} with application data, use the '${i}.context' property instead.`),uo(c)}if(l.length>0&&s){const a=this.beans.frameworkOverrides.getDocLink(s);uo(`to see all the valid ${i} properties please check: ${a}`)}}getConsoleMessage(e,t){return hb(e,t)}};function Ob(e,t,o){const i={},s=e.filter(n=>!t.some(r=>r===n));return s.length>0&&s.forEach(n=>i[n]=An({inputValue:n,allSuggestions:o}).values),i}var Bb=new Set(["firstChildChanged","lastChildChanged","childIndexChanged"]),_b={moduleName:"Validation",version:H,beans:[Hb]},Wi=0,Nb=200,Vb=class extends F{constructor(){super(...arguments),this.beanName="popupSvc",this.popupList=[]}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.gridCtrl=e.gridCtrl}),this.addManagedEventListeners({gridStylesChanged:this.handleThemeChange.bind(this)})}getPopupParent(){const e=this.gos.get("popupParent");return e||this.gridCtrl.getGui()}positionPopupForMenu(e){const{eventSource:t,ePopup:o,column:i,node:s,event:n}=e,r=t.getBoundingClientRect(),l=this.getParentRect();this.setAlignedTo(t,o);let a=!1;const d=()=>{const c=this.keepXYWithinBounds(o,r.top-l.top,0),u=o.clientWidth>0?o.clientWidth:200;a||(o.style.minWidth=`${u}px`,a=!0);const g=l.right-l.left-u;let p;return this.gos.get("enableRtl")?(p=C(),p<0&&(p=f(),this.setAlignedStyles(o,"left")),p>g&&(p=0,this.setAlignedStyles(o,"right"))):(p=f(),p>g&&(p=C(),this.setAlignedStyles(o,"right")),p<0&&(p=0,this.setAlignedStyles(o,"left"))),{x:p,y:c};function f(){return r.right-l.left-2}function C(){return r.left-l.left-u}};this.positionPopup({ePopup:o,keepWithinBounds:!0,updatePosition:d,postProcessCallback:()=>this.callPostProcessPopup("subMenu",o,t,n instanceof MouseEvent?n:void 0,i,s)})}positionPopupUnderMouseEvent(e){const{ePopup:t,nudgeX:o,nudgeY:i,skipObserver:s}=e;this.positionPopup({ePopup:t,nudgeX:o,nudgeY:i,keepWithinBounds:!0,skipObserver:s,updatePosition:()=>this.calculatePointerAlign(e.mouseEvent),postProcessCallback:()=>this.callPostProcessPopup(e.type,e.ePopup,null,e.mouseEvent,e.column,e.rowNode)})}calculatePointerAlign(e){const t=this.getParentRect();return{x:e.clientX-t.left,y:e.clientY-t.top}}positionPopupByComponent(e){const{ePopup:t,nudgeX:o,nudgeY:i,keepWithinBounds:s,eventSource:n,alignSide:r="left",position:l="over",column:a,rowNode:d,type:c}=e,u=n.getBoundingClientRect(),h=this.getParentRect();this.setAlignedTo(n,t);const g=()=>{let p=u.left-h.left;r==="right"&&(p-=t.offsetWidth-u.width);let f;return l==="over"?(f=u.top-h.top,this.setAlignedStyles(t,"over")):(this.setAlignedStyles(t,"under"),this.shouldRenderUnderOrAbove(t,u,h,e.nudgeY||0)==="under"?f=u.top-h.top+u.height:f=u.top-t.offsetHeight-(i||0)*2-h.top),{x:p,y:f}};this.positionPopup({ePopup:t,nudgeX:o,nudgeY:i,keepWithinBounds:s,updatePosition:g,postProcessCallback:()=>this.callPostProcessPopup(c,t,n,null,a,d)})}shouldRenderUnderOrAbove(e,t,o,i){const s=o.bottom-t.bottom,n=t.top-o.top,r=e.offsetHeight+i;return s>r?"under":n>r||n>s?"above":"under"}setAlignedStyles(e,t){const o=this.getPopupIndex(e);if(o===-1)return;const i=this.popupList[o],{alignedToElement:s}=i;!s||(["right","left","over","above","under"].forEach(r=>{s.classList.remove(`ag-has-popup-positioned-${r}`),e.classList.remove(`ag-popup-positioned-${r}`)}),!t)||(s.classList.add(`ag-has-popup-positioned-${t}`),e.classList.add(`ag-popup-positioned-${t}`))}setAlignedTo(e,t){const o=this.getPopupIndex(t);if(o!==-1){const i=this.popupList[o];i.alignedToElement=e}}callPostProcessPopup(e,t,o,i,s,n){const r=this.gos.getCallback("postProcessPopup");r&&r({column:s,rowNode:n,ePopup:t,type:e,eventSource:o,mouseEvent:i})}positionPopup(e){const{ePopup:t,keepWithinBounds:o,nudgeX:i,nudgeY:s,skipObserver:n,updatePosition:r}=e,l={width:0,height:0},a=(d=!1)=>{let{x:c,y:u}=r();d&&t.clientWidth===l.width&&t.clientHeight===l.height||(l.width=t.clientWidth,l.height=t.clientHeight,i&&(c+=i),s&&(u+=s),o&&(c=this.keepXYWithinBounds(t,c,1),u=this.keepXYWithinBounds(t,u,0)),t.style.left=`${c}px`,t.style.top=`${u}px`,e.postProcessCallback&&e.postProcessCallback())};if(a(),!n){const d=ut(this.beans,t,()=>a(!0));setTimeout(()=>d(),Nb)}}getActivePopups(){return this.popupList.map(e=>e.element)}getParentRect(){const e=re(this.beans);let t=this.getPopupParent();return t===e.body?t=e.documentElement:getComputedStyle(t).position==="static"&&(t=t.offsetParent),fr(t)}keepXYWithinBounds(e,t,o){const i=o===0,s=i?"clientHeight":"clientWidth",n=i?"top":"left",r=i?"height":"width",l=i?"scrollTop":"scrollLeft",a=re(this.beans),d=a.documentElement,c=this.getPopupParent(),u=e.getBoundingClientRect(),h=c.getBoundingClientRect(),g=a.documentElement.getBoundingClientRect(),p=c===a.body,f=Math.ceil(u[r]);let m=p?(i?Bc:vs)(d)+d[l]:c[s];p&&(m-=Math.abs(g[n]-h[n]));const b=m-f;return Math.min(Math.max(t,0),Math.abs(b))}addPopup(e){const t=re(this.beans),{eChild:o,ariaLabel:i,ariaOwns:s,alwaysOnTop:n,positionCallback:r,anchorToElement:l}=e;if(!t)return G(122),{hideFunc:()=>{}};const a=this.getPopupIndex(o);if(a!==-1)return{hideFunc:this.popupList[a].hideFunc};this.initialisePopupPosition(o);const d=this.createPopupWrapper(o,!!n,i,s),c=this.addEventListenersToPopup({...e,wrapperEl:d});return r&&r(),this.addPopupToPopupList(o,d,c,l),{hideFunc:c}}initialisePopupPosition(e){const o=this.getPopupParent().getBoundingClientRect();L(e.style.top)||(e.style.top=`${o.top*-1}px`),L(e.style.left)||(e.style.left=`${o.left*-1}px`)}createPopupWrapper(e,t,o,i){const s=this.getPopupParent(),{environment:n,gos:r}=this.beans,l=ne({tag:"div"});return n.applyThemeClasses(l),l.classList.add("ag-popup"),e.classList.add(r.get("enableRtl")?"ag-rtl":"ag-ltr","ag-popup-child"),e.hasAttribute("role")||Ye(e,"dialog"),o?no(e,o):i&&(e.id||(e.id=`popup-component-${Wi}`),lr(i,e.id)),l.appendChild(e),s.appendChild(l),t?this.setAlwaysOnTop(e,!0):this.bringPopupToFront(e),l}handleThemeChange(e){if(e.themeChanged){const t=this.beans.environment;for(const o of this.popupList)t.applyThemeClasses(o.wrapper)}}addEventListenersToPopup(e){const t=this.beans,o=re(t),i=this.getPopupParent(),{wrapperEl:s,eChild:n,closedCallback:r,afterGuiAttached:l,closeOnEsc:a,modal:d,ariaOwns:c}=e;let u=!1;const h=C=>{if(!s.contains(ee(t)))return;C.key===x.ESCAPE&&!$e(C)&&f({keyboardEvent:C})},g=C=>f({mouseEvent:C}),p=C=>f({touchEvent:C}),f=(C={})=>{const{mouseEvent:m,touchEvent:b,keyboardEvent:S,forceHide:w}=C;!w&&(this.isEventFromCurrentPopup({mouseEvent:m,touchEvent:b},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||b||S),this.removePopupFromPopupList(n,c))};return l&&l({hidePopup:f}),window.setTimeout(()=>{a&&o.addEventListener("keydown",h),d&&(o.addEventListener("mousedown",g),this.eventSvc.addEventListener("dragStarted",g),o.addEventListener("touchstart",p),o.addEventListener("contextmenu",g))},0),f}addPopupToPopupList(e,t,o,i){this.popupList.push({element:e,wrapper:t,hideFunc:o,instanceId:Wi,isAnchored:!!i}),i&&this.setPopupPositionRelatedToElement(e,i),Wi=Wi+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&&lr(t,null),this.popupList=this.popupList.filter(o=>o.element!==e)}keepPopupPositionedRelativeTo(e){const t=this.getPopupParent(),o=t.getBoundingClientRect(),{element:i,ePopup:s}=e,n=i.getBoundingClientRect(),r=u=>parseInt(u.substring(0,u.length-1),10),l=(u,h)=>{const g=o[u]-n[u],p=r(s.style[u]);return{initialDiff:g,lastDiff:g,initial:p,last:p,direction:h}},a=l("top",0),d=l("left",1),c=this.beans.frameworkOverrides;return new mo(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 b=r(s.style[m]);C.last!==b&&(C.initial=b,C.last=b);const S=h[m]-g[m];if(S!=C.lastDiff){const w=this.keepXYWithinBounds(s,C.initial+C.initialDiff-S,C.direction);s.style[m]=`${w}px`,C.last=w}C.lastDiff=S};f(a,"top"),f(d,"left")},200).then(h=>{u(()=>{h!=null&&window.clearInterval(h)})})},"popupPositioning")})}hasAnchoredPopup(){return this.popupList.some(e=>e.isAnchored)}isEventFromCurrentPopup(e,t){const{mouseEvent:o,touchEvent:i}=e,s=o||i;if(!s)return!1;const n=this.getPopupIndex(t);if(n===-1)return!1;for(let r=n;r<this.popupList.length;r++){const l=this.popupList[r];if(cu(l.element,s))return!0}return this.isElementWithinCustomPopup(s.target)}isElementWithinCustomPopup(e){const t=re(this.beans);for(;e&&e!==t.body;){if(e.classList.contains("ag-custom-component-popup")||e.parentElement===null)return!0;e=e.parentElement}return!1}getWrapper(e){for(;!e.classList.contains("ag-popup")&&e.parentElement;)e=e.parentElement;return e.classList.contains("ag-popup")?e:null}setAlwaysOnTop(e,t){const o=this.getWrapper(e);o&&(o.classList.toggle("ag-always-on-top",!!t),t&&this.bringPopupToFront(o))}bringPopupToFront(e){const t=this.getPopupParent(),o=Array.prototype.slice.call(t.querySelectorAll(".ag-popup")),i=o.length,s=this.getWrapper(e);if(!s||i<=1||!t.contains(e))return;const n=[],r=[];for(const h of o)h!==s&&(h.classList.contains("ag-always-on-top")?r.push(h):n.push(h));const l=[],a=r.length,u=s.classList.contains("ag-always-on-top")||!a?[...n,...r,s]:[...n,s,...r];for(let h=0;h<=i;h++){const g=u[h];if(o[h]===u[h]||g===s)continue;g.querySelectorAll("div").forEach(f=>{f.scrollTop!==0&&l.push([f,f.scrollTop])}),h===0?t.insertAdjacentElement("afterbegin",g):u[h-1].insertAdjacentElement("afterend",g)}for(;l.length;){const h=l.pop();h[0].scrollTop=h[1]}}},id={moduleName:"Popup",version:H,beans:[Vb]},Wb=".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}}",Gn=(e,t,o)=>{var l,a,d;const{editModelSvc:i}=e,s=(a=(l=i==null?void 0:i.getCellValidationModel())==null?void 0:l.getCellValidation(t))==null?void 0:a.errorMessages,n=(d=i==null?void 0:i.getRowValidationModel().getRowValidation(t))==null?void 0:d.errorMessages,r=s||n;return r&&r.length?r.join(o("tooltipValidationErrorSeparator",". ")):void 0},zb=class extends F{constructor(){super(...arguments),this.beanName="tooltipSvc"}setupHeaderTooltip(e,t,o,i){e&&t.destroyBean(e);const s=Ln(this.gos),{column:n,eGui:r}=t,l=n.getColDef();!i&&s&&!l.headerComponent&&(i=jo(()=>r.querySelector(".ag-header-cell-text")));const a={getColumn:()=>n,getColDef:()=>n.getColDef(),getGui:()=>r,getLocation:()=>"header",getTooltipValue:()=>o??n.getColDef().headerTooltip,shouldDisplayTooltip:i};let d=this.createTooltipFeature(a);return d&&(d=t.createBean(d),t.setRefreshFunction("tooltip",()=>d.refreshTooltip())),d}setupHeaderGroupTooltip(e,t,o,i){e&&t.destroyBean(e);const s=Ln(this.gos),{column:n,eGui:r}=t,l=n.getColGroupDef();!i&&s&&!(l!=null&&l.headerGroupComponent)&&(i=jo(()=>r.querySelector(".ag-header-group-text")));const a={getColumn:()=>n,getGui:()=>r,getLocation:()=>"headerGroup",getTooltipValue:()=>o??(l&&l.headerTooltip),shouldDisplayTooltip:i};l&&(a.getColDef=()=>l);const d=this.createTooltipFeature(a);return d&&t.createBean(d)}enableCellTooltipFeature(e,t,o){const{beans:i}=this,{gos:s,editSvc:n}=i,{column:r,rowNode:l}=e;let a="cell";const d=()=>{const g=!!!(n!=null&&n.isEditing(e))&&Gn(i,e,this.getLocaleTextFunc());if(g)return a="cellEditor",g;a="cell";const p=r.getColDef(),f=l.data;if(p.tooltipField&&L(f))return so(f,p.tooltipField,r.isTooltipFieldContainsDots());const C=p.tooltipValueGetter;return C?C(V(s,{location:"cell",colDef:r.getColDef(),column:r,rowIndex:e.cellPosition.rowIndex,node:l,data:l.data,value:e.value,valueFormatted:e.valueFormatted})):null},c=Ln(s);o||(c&&!e.isCellRenderer()?o=()=>{const h=!!(n!=null&&n.isEditing(e));if(!h&&Gn(i,e,this.getLocaleTextFunc()))return!0;if(!r.isTooltipEnabled())return!1;const f=jo(()=>{const C=e.eGui;return C.children.length===0?C:C.querySelector(".ag-cell-value")});return!h&&f()}:o=()=>!(n!=null&&n.isEditing(e)));const u={getColumn:()=>r,getColDef:()=>r.getColDef(),getRowIndex:()=>e.cellPosition.rowIndex,getRowNode:()=>l,getGui:()=>e.eGui,getLocation:()=>a,getTooltipValue:t!=null?()=>t:d,getValueFormatted:()=>e.valueFormatted,shouldDisplayTooltip:o};return this.createTooltipFeature(u,i)}setupFullWidthRowTooltip(e,t,o,i){const s={getGui:()=>t.getFullWidthElement(),getTooltipValue:()=>o,getLocation:()=>"fullWidthRow",shouldDisplayTooltip:i},n=this.beans,r=n.context;e&&t.destroyBean(e,r);const l=this.createTooltipFeature(s,n);if(l)return t.createBean(l,r)}setupCellEditorTooltip(e,t){var l,a;const{beans:o}=this,{context:i}=o,s=((l=t.getValidationElement)==null?void 0:l.call(t,!0))||!((a=t.isPopup)!=null&&a.call(t))&&e.eGui;if(!s)return;const n={getGui:()=>s,getTooltipValue:()=>Gn(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=L(t.tooltipField)||L(t.tooltipValueGetter)||L(t.tooltipComponent)}createTooltipFeature(e,t){return this.beans.registry.createDynamicBean("tooltipFeature",!1,e,t)}},sd={moduleName:"Tooltip",version:H,beans:[zb],dynamicBeans:{tooltipFeature:Fb},userComponents:{agTooltipComponent:Rb},dependsOn:[id],css:[Wb]},$b=".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}",Ub={tag:"div",cls:"ag-cell-wrapper ag-cell-edit-wrapper ag-checkbox-edit",children:[{tag:"ag-checkbox",ref:"eEditor",role:"presentation"}]},Kb=class extends Li{constructor(){super(Ub,[ln]),this.eEditor=A}initialiseEditor(e){const t=e.value??void 0,o=this.eEditor;o.setValue(t),o.getInputElement().setAttribute("tabindex","-1"),this.setAriaLabel(t),this.addManagedListeners(o,{fieldValueChanged:s=>this.setAriaLabel(s.selected)})}getValue(){return this.eEditor.getValue()}focusIn(){this.eEditor.getFocusableElement().focus()}afterGuiAttached(){this.params.cellStartedEdit&&this.focusIn()}isPopup(){return!1}setAriaLabel(e){const t=this.getLocaleTextFunc(),o=ar(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}},zi=class extends Li{constructor(e){super(),this.cellEditorInput=e,this.eEditor=A}initialiseEditor(e){const{cellEditorInput:t}=this;this.setTemplate({tag:"div",cls:"ag-cell-edit-wrapper",children:[t.getTemplate()]},t.getAgComponents());const{eEditor:o}=this,{cellStartedEdit:i,eventKey:s,suppressPreventDefault:n}=e;o.getInputElement().setAttribute("title",""),t.init(o,e);let r,l=!0;i?(this.focusAfterAttached=!0,s===x.BACKSPACE||s===x.DELETE?r="":s&&s.length===1?n?l=!1:r=s:(r=t.getStartValue(),s!==x.F2&&(this.highlightAllOnFocus=!0))):(this.focusAfterAttached=!1,r=t.getStartValue()),l&&r!=null&&o.setStartValue(r),this.addGuiEventListener("keydown",a=>{const{key:d}=a;(d===x.PAGE_UP||d===x.PAGE_DOWN)&&a.preventDefault()})}afterGuiAttached(){var i,s;const e=this.getLocaleTextFunc(),t=this.eEditor;if(t.setInputAriaLabel(e("ariaInputEditor","Input Editor")),!this.focusAfterAttached)return;It()||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()}},jb={tag:"ag-input-date-field",ref:"eEditor",cls:"ag-cell-editor"},qb=class{constructor(e,t){this.getDataTypeService=e,this.getLocaleTextFunc=t}getTemplate(){return jb}getAgComponents(){return[na]}init(e,t){var r,l;this.eEditor=e,this.params=t;const{min:o,max:i,step:s,colDef:n}=t;o!=null&&e.setMin(o),i!=null&&e.setMax(i),s!=null&&e.setStep(s),this.includeTime=t.includeTime??((l=(r=this.getDataTypeService())==null?void 0:r.getDateIncludesTimeFlag)==null?void 0:l.call(r,n.cellDataType)),this.includeTime!=null&&e.setIncludeTime(this.includeTime)}getValidationErrors(){const t=this.eEditor.getInputElement().valueAsDate,{params:o}=this,{min:i,max:s,getValidationErrors:n}=o;let r=[];const l=this.getLocaleTextFunc();if(t instanceof Date&&!isNaN(t.getTime())){if(i){const a=i instanceof Date?i:new Date(i);if(t<a){const d=a.toLocaleDateString();r.push(l("minDateValidation",`Date must be after ${d}`,[d]))}}if(s){const a=s instanceof Date?s:new Date(s);if(t>a){const d=a.toLocaleDateString();r.push(l("maxDateValidation",`Date must be before ${d}`,[d]))}}}return r.length||(r=null),n?n({value:t,cellEditorParams:o,internalErrors:r}):r}getValue(){const{eEditor:e,params:t}=this,o=e.getDate();return!L(o)&&!L(t.value)?t.value:o??null}getStartValue(){const{value:e}=this.params;if(e instanceof Date)return tt(e,this.includeTime??!1)}},Yb=class extends zi{constructor(){super(new qb(()=>this.beans.dataTypeSvc,()=>this.getLocaleTextFunc()))}},Zb={tag:"ag-input-date-field",ref:"eEditor",cls:"ag-cell-editor"},Xb=class{constructor(e,t){this.getDataTypeService=e,this.getLocaleTextFunc=t}getTemplate(){return Zb}getAgComponents(){return[na]}init(e,t){var r,l;this.eEditor=e,this.params=t;const{min:o,max:i,step:s,colDef:n}=t;o!=null&&e.setMin(o),i!=null&&e.setMax(i),s!=null&&e.setStep(s),this.includeTime=t.includeTime??((l=(r=this.getDataTypeService())==null?void 0:r.getDateIncludesTimeFlag)==null?void 0:l.call(r,n.cellDataType)),this.includeTime!=null&&e.setIncludeTime(this.includeTime)}getValidationErrors(){const{eEditor:e,params:t}=this,o=e.getInputElement().value,i=this.formatDate(this.parseDate(o??void 0)),{min:s,max:n,getValidationErrors:r}=t;let l=[];if(i){const a=new Date(i),d=this.getLocaleTextFunc();if(s){const c=new Date(s);if(a<c){const u=c.toLocaleDateString();l.push(d("minDateValidation",`Date must be after ${u}`,[u]))}}if(n){const c=new Date(n);if(a>c){const u=c.toLocaleDateString();l.push(d("maxDateValidation",`Date must be before ${u}`,[u]))}}}return l.length||(l=null),r?r({value:this.getValue(),cellEditorParams:t,internalErrors:l}):l}getValue(){const{params:e,eEditor:t}=this,o=this.formatDate(t.getDate());return!L(o)&&!L(e.value)?e.value:e.parseValue(o??"")}getStartValue(){return tt(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):yo(e)??void 0}formatDate(e){const t=this.getDataTypeService();return t?t.getDateFormatterFunction(this.params.column)(e):tt(e??null,this.includeTime??!1)??void 0}},Qb=class extends zi{constructor(){super(new Xb(()=>this.beans.dataTypeSvc,()=>this.getLocaleTextFunc()))}},Jb={tag:"div",cls:"ag-large-text",children:[{tag:"ag-input-text-area",ref:"eEditor",cls:"ag-large-text-input"}]},eS=class extends Li{constructor(){super(Jb,[Up]),this.eEditor=A}initialiseEditor(e){const{eEditor:t}=this,{cellStartedEdit:o,eventKey:i,value:s,maxLength:n,cols:r,rows:l}=e;this.focusAfterAttached=o,t.getInputElement().setAttribute("title",""),t.setMaxLength(n||200).setCols(r||60).setRows(l||10);let a;o?(this.focusAfterAttached=!0,i===x.BACKSPACE||i===x.DELETE?a="":i&&i.length===1?a=i:(a=s.toString(),i!==x.F2&&(this.highlightAllOnFocus=!0))):(this.focusAfterAttached=!1,a=s.toString()),a!=null&&t.setValue(a,!0),this.addGuiEventListener("keydown",this.onKeyDown.bind(this)),this.activateTabIndex()}onKeyDown(e){const t=e.key;(t===x.LEFT||t===x.UP||t===x.RIGHT||t===x.DOWN||e.shiftKey&&t===x.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!L(i)&&!L(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}},tS={tag:"ag-input-number-field",ref:"eEditor",cls:"ag-cell-editor"},oS=class{constructor(e){this.getLocaleTextFunc=e}getTemplate(){return tS}getAgComponents(){return[jp]}init(e,t){this.eEditor=e,this.params=t;const{max:o,min:i,precision:s,step:n}=t;o!=null&&e.setMax(o),i!=null&&e.setMin(i),s!=null&&e.setPrecision(s),n!=null&&e.setStep(n);const r=e.getInputElement();t.preventStepping?e.addManagedElementListeners(r,{keydown:this.preventStepping}):t.showStepperButtons&&r.classList.add("ag-number-field-input-stepper")}getValidationErrors(){const{params:e}=this,{min:t,max:o,getValidationErrors:i}=e,n=this.eEditor.getInputElement().valueAsNumber,r=this.getLocaleTextFunc();let l=[];return typeof n=="number"&&(t!=null&&n<t&&l.push(r("minValueValidation",`Must be greater than or equal to ${t}.`,[String(t)])),o!=null&&n>o&&l.push(r("maxValueValidation",`Must be less than or equal to ${o}.`,[String(o)]))),l.length||(l=null),i?i({value:n,cellEditorParams:e,internalErrors:l}):l}preventStepping(e){(e.key===x.UP||e.key===x.DOWN)&&e.preventDefault()}getValue(){const{eEditor:e,params:t}=this,o=e.getValue();if(!L(o)&&!L(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(){It()&&this.eEditor.getInputElement().focus({preventScroll:!0})}},iS=class extends zi{constructor(){super(new oS(()=>this.getLocaleTextFunc()))}},sS={tag:"div",cls:"ag-cell-edit-wrapper",children:[{tag:"ag-select",ref:"eEditor",cls:"ag-cell-editor"}]},nS=class extends Li{constructor(){super(sS,[tf]),this.eEditor=A,this.startedByEnter=!1}wireBeans(e){this.valueSvc=e.valueSvc}initialiseEditor(e){this.focusAfterAttached=e.cellStartedEdit;const{eEditor:t,valueSvc:o,gos:i}=this,{values:s,value:n,eventKey:r}=e;if(q(s)){G(58);return}this.startedByEnter=r!=null?r===x.ENTER:!1;let l=!1;s.forEach(u=>{const h={value:u},g=o.formatValue(e.column,null,u),p=g!=null;h.text=p?g:u,t.addOption(h),l=l||n===u}),l?t.setValue(e.value,!0):e.values.length&&t.setValue(e.values[0],!0);const{valueListGap:a,valueListMaxWidth:d,valueListMaxHeight:c}=e;a!=null&&t.setPickerGap(a),c!=null&&t.setPickerMaxHeight(c),d!=null&&t.setPickerMaxWidth(d),i.get("editType")!=="fullRow"&&this.addManagedListeners(this.eEditor,{selectedItem:()=>e.stopEditing()})}afterGuiAttached(){this.focusAfterAttached&&this.eEditor.getFocusableElement().focus(),this.startedByEnter&&setTimeout(()=>{this.isAlive()&&this.eEditor.showPicker()})}focusIn(){this.eEditor.getFocusableElement().focus()}getValue(){return this.eEditor.getValue()}isPopup(){return!1}getValidationElement(){return this.eEditor.getAriaElement()}getValidationErrors(){const{params:e}=this,{values:t,getValidationErrors:o}=e,i=this.getValue();let s=[];if(t&&!t.includes(i)){const n=this.getLocaleTextFunc();s.push(n("invalidSelectionValidation","Invalid selection."))}else s=null;return o?o({value:i,internalErrors:s,cellEditorParams:e}):s}},rS={tag:"ag-input-text-field",ref:"eEditor",cls:"ag-cell-editor"},lS=class{constructor(e){this.getLocaleTextFunc=e}getTemplate(){return rS}getAgComponents(){return[zp]}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!L(o)&&!L(t.value)?t.value:t.parseValue(o)}getStartValue(){const e=this.params;return e.useFormatter||e.column.getColDef().refData?e.formatValue(e.value):e.value}setCaret(){const e=this.eEditor,t=e.getValue(),o=L(t)&&t.length||0;o&&e.getInputElement().setSelectionRange(o,o)}},nd=class extends zi{constructor(){super(new lS(()=>this.getLocaleTextFunc()))}};function aS(e){return e.ctrlsSvc.getScrollFeature().getVScrollPosition()}function dS(e){return e.ctrlsSvc.getScrollFeature().getHScrollPosition()}function rd(e,t,o="auto"){e.frameworkOverrides.wrapIncoming(()=>e.ctrlsSvc.getScrollFeature().ensureColumnVisible(t,o),"ensureVisible")}function ld(e,t,o){e.frameworkOverrides.wrapIncoming(()=>e.ctrlsSvc.getScrollFeature().ensureIndexVisible(t,o),"ensureVisible")}function cS(e,t,o=null){e.frameworkOverrides.wrapIncoming(()=>e.ctrlsSvc.getScrollFeature().ensureNodeVisible(t,o),"ensureVisible")}function uS(e){var i;const t=(i=e.editModelSvc)==null?void 0:i.getEditMap(),o=[];return t==null||t.forEach((s,n)=>{const{rowIndex:r,rowPinned:l}=n;s.forEach((a,d)=>{const{editorValue:c,pendingValue:u,sourceValue:h,state:g}=a,p=et(a);let f=c??u;f===we&&(f=void 0);const C={newValue:f,oldValue:h,state:g,column:d,colId:d.getColId(),colKey:d.getColId(),rowIndex:r,rowPinned:l};(g==="editing"||g==="changed"&&p)&&o.push(C)})}),o}function hS(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)}):wt(e,!0),$t(e)):o==null||o.stopEditing(void 0,{cancel:t,source:"api"})}function gS(e,t){var i;const o=Z(e,t);return((i=e.editSvc)==null?void 0:i.isEditing(o))??!1}function pS(e,t){const{key:o,colKey:i,rowIndex:s,rowPinned:n}=t,{editSvc:r,colModel:l}=e,a=l.getCol(i);if(!a){G(12,{colKey:i});return}const c=vt(e,{rowIndex:s,rowPinned:n||null});if(!c){G(290,{rowIndex:s,rowPinned:n});return}if(!a.isCellEditable(c))return;n==null&&ld(e,s),rd(e,i),r==null||r.startEditing({rowNode:c,column:a},{event:o?new KeyboardEvent("keydown",{key:o}):void 0,source:"api"})}function fS(e){var t;return((t=e.editSvc)==null?void 0:t.validateEdit())||null}var CS={tag:"div",cls:"ag-popup-editor",attrs:{tabindex:"-1"}},mS=class extends nn{constructor(e){super(CS),this.params=e}postConstruct(){gt(this.gos,this.getGui(),"popupEditorWrapper",!0),this.addKeyDownListener()}addKeyDownListener(){const e=this.getGui(),t=this.params,o=i=>{Zs(this.gos,i,t.node,t.column,!0)||t.onKeyDown(i)};this.addManagedElementListeners(e,{keydown:o})}},$i=(e,t=!1)=>{if(e!==void 0)return et(e)||t&&e.state==="editing"};function ad(e,t,o=!1){var i;return $i((i=e.editModelSvc)==null?void 0:i.getEdit(t),o)}function dd(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($i(o==null?void 0:o.getEdit({rowNode:n,column:i}))||$i(o==null?void 0:o.getEdit({rowNode:n.pinnedSibling,column:i})))return!0}function cd(e,{rowNode:t,column:o}){var i;if(t=t.pinnedSibling,!!t)return $i((i=e.editModelSvc)==null?void 0:i.getEdit({rowNode:t,column:o}))}var vS=class extends F{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=ad(o,e)||dd(o,e)||cd(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)}},wS=class extends F{constructor(e,t){super(),this.rowCtrl=e,this.beans=t,this.gos=t.gos,this.editSvc=t.editSvc,this.editModelSvc=t.editModelSvc}applyRowStyles(){var r;const{rowCtrl:e,editModelSvc:t,beans:o}=this;let i=e.rowNode,s=t==null?void 0:t.getEditRow(i);const n=(r=this.editModelSvc)==null?void 0:r.getRowValidationModel().hasRowValidation({rowNode:i});if(!s&&i.pinnedSibling&&(i=i.pinnedSibling,s=t==null?void 0:t.getEditRow(i)),s){const l=Array.from(s.keys()).some(a=>{const d={rowNode:i,column:a};return ad(o,d,!0)||dd(o,d)||cd(o,d)});this.applyStyle(n,l);return}this.applyStyle(n)}applyStyle(e=!1,t=!1){var s,n;const o=((s=this.editSvc)==null?void 0:s.isBatchEditing())??!1,i=this.gos.get("editType")==="fullRow";(n=this.rowCtrl)==null||n.forEachGui(void 0,({rowComp:r})=>{r.toggleCss("ag-row-editing",i&&t),r.toggleCss("ag-row-batch-edit",i&&t&&o),r.toggleCss("ag-row-inline-editing",t),r.toggleCss("ag-row-not-inline-editing",!t),r.toggleCss("ag-row-editing-invalid",i&&t&&e)})}},bS=({rowModel:e,pinnedRowModel:t,editModelSvc:o},i)=>{const s=new Set;return e.forEachNode(n=>i.has(n)&&s.add(n)),t==null||t.forEachPinnedRow("top",n=>i.has(n)&&s.add(n)),t==null||t.forEachPinnedRow("bottom",n=>i.has(n)&&s.add(n)),i.forEach(n=>{s.has(n)||o.removeEdits({rowNode:n})}),s},SS=({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}))})},yS=e=>()=>{const t=new Set(e.colModel.getCols()),o=e.editModelSvc.getEditMap(!0),i=new Set(o.keys());SS(e,bS(e,i),t)},RS=new Set(["undo","redo"]),ud={paste:"ui",rangeSvc:"ui",fillHandle:"api",cellClear:"api"},xS=new Set(Object.keys(ud)),ES=new Set(["paste","rangeSvc","renderer","cellClear","redo","undo"]),Ui={cancel:!0,source:"api"},DS={cancel:!1,source:"api"},eo={checkSiblings:!0},Ao={force:!0,suppressFlash:!0},FS=class extends F{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,Ui),this.createStrategy(i)});const t=yS(e),o=()=>{const i=this.model.getCellValidationModel().getCellValidationMap().size>0,s=this.model.getRowValidationModel().getRowValidationMap().size>0;return i||s?this.stopEditing(void 0,Ui):this.isEditing()&&(this.isBatchEditing()?$t(e,this.model.getEditPositions()):this.stopEditing(void 0,DS)),!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,Ui)):(this.stopEditing(void 0,Ui),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 $h(this.beans)}isEditing(e,t){return this.model.hasEdits(e,t??eo)}isRowEditing(e,t){return(e&&this.model.hasRowEdits(e,t))??!1}startEditing(e,t){var a;const{startedEdit:o=!0,event:i=null,source:s="ui",ignoreEventKey:n=!1}=t;if(this.strategy??(this.strategy=this.createStrategy()),!this.isCellEditable(e,"api"))return;const r=Z(this.beans,e);if(r&&!r.comp){r.onCompAttachedFuncs.push(()=>this.startEditing(e,t));return}const l=(a=this.shouldStartEditing)==null?void 0:a.call(this,e,i,o,s);if(l===!1&&s!=="api"){this.isEditing(e)&&this.stopEditing();return}!this.batch&&this.shouldStopEditing(e,void 0,s)&&this.stopEditing(void 0,{source:s}),l&&this.isBatchEditing()&&this.dispatchBatchEvent("batchEditingStarted",new Map),this.strategy.start(e,i,s,n)}stopEditing(e,t){var p,f,C;const{event:o,cancel:i,source:s="ui",suppressNavigateAfterEdit:n}=t||{},{beans:r,model:l}=this;if(xS.has(s))return this.isBatchEditing()?(this.bulkRefresh(e),!1):this.stopEditing(e,{...t,source:ud[s]});if(!(this.isEditing(e)||this.isBatchEditing()&&l.hasEdits(e,eo))||!this.strategy)return!1;const d=Z(r,e);d&&(d.onEditorAttachedFuncs=[]);let c=l.getEditMap(!0),u=!1;const h=!i&&!!this.shouldStopEditing(e,o,s),g=i&&!!this.shouldCancelEditing(e,o,s);if(h||g){wt(r,!0);const m=l.getEditMap();this.processEdits(m,i),(p=this.strategy)==null||p.stop(i,o),this.bulkRefresh(void 0,c),c=m,u||(u=h)}else if(o instanceof KeyboardEvent&&this.batch&&((f=this.strategy)!=null&&f.midBatchInputsAllowed(e))&&this.isEditing(e,{withOpenEditor:!0})){const m=o.key,b=m===x.ENTER,S=m===x.ESCAPE,w=m===x.TAB;(b||w||S)&&(b||w?wt(r,!0):S&&this.revertSingleCellEdit(d),this.isBatchEditing()?(C=this.strategy)==null||C.cleanupEditors():$t(r,l.getEditPositions(),{event:o}),o.preventDefault(),this.bulkRefresh(e,c,{suppressFlash:!0}),c=l.getEditMap())}else wt(r,!0),c=l.getEditMap();return u&&e&&this.model.removeEdits(e),!n&&d&&this.navigateAfterEdit(o instanceof KeyboardEvent&&o.shiftKey,d.cellPosition),_s(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?x.UP:x.DOWN;(i=this.beans.navigation)==null||i.navigateToNextCell(null,s,t,!1)}}processEdits(e,t=!1){var r,l,a;const o=Array.from(e.keys()),{beans:i}=this,s=this.model.getCellValidationModel().getCellValidationMap().size>0||this.model.getRowValidationModel().getRowValidationMap().size>0,n=[];for(const d of o){const c=e.get(d);for(const u of c.keys()){const h=c.get(u),g={rowNode:d,column:u},p=Z(i,g),f=et(h),C=(a=(l=(r=p==null?void 0:p.comp)==null?void 0:r.getCellEditor())==null?void 0:l.isCancelAfterEnd)==null?void 0:a.call(l);!t&&!C&&f&&!s&&(this.setNodeDataValue(d,u,h.pendingValue)||n.push(g)),p==null||p.refreshCell(Ao)}}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(Ao)),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(Ao)}dispatchEditValuesChanged({rowNode:e,column:t},o={}){if(!e||!t||!o)return;const{pendingValue:i,sourceValue:s}=o,{rowIndex:n,rowPinned:r,data:l}=e;this.beans.eventSvc.dispatchEvent({type:"cellEditValuesChanged",node:e,rowIndex:n,rowPinned:r,column:t,source:"api",data:l,newValue:i,oldValue:s,value:i,colDef:t.getColDef()})}bulkRefresh(e={},t,o={}){var l;const{beans:i,gos:s}=this,{editModelSvc:n,rowModel:r}=i;de(s)&&(e.rowNode&&e.column?this.refCell(e,this.model.getEdit(e),o):t&&((l=n==null?void 0:n.getEditMap(!1))==null||l.forEach((a,d)=>{for(const c of a.keys())this.refCell({rowNode:d,column:c},a.get(c),o)})))}refCell({rowNode:e,column:t},o,i={}){var u;const{beans:s,gos:n}=this,r=new Set([e]),l=new Set,a=e.pinnedSibling;a&&r.add(a);const d=e.sibling;d&&l.add(d);let c=e.parent;for(;c;)(u=c.sibling)!=null&&u.footer&&n.get("groupTotalRow")||!c.parent&&c.sibling&&n.get("grandTotalRow")?l.add(c.sibling):l.add(c),c=c.parent;r.forEach(h=>this.dispatchEditValuesChanged({rowNode:h,column:t},o)),r.forEach(h=>{var g;return(g=Z(s,{rowNode:h,column:t}))==null?void 0:g.refreshCell(i)}),l.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 l=Z(this.beans,e);return this.cellEditingInvalidCommitBlocks()?((i=t==null?void 0:t.preventDefault)==null||i.call(t),o&&(!(l!=null&&l.hasBrowserFocus())&&(l==null||l.focusCell()),(r=(n=(s=l==null?void 0:l.comp)==null?void 0:s.getCellEditor())==null?void 0:n.focusIn)==null||r.call(n)),"block-stop"):(l&&this.revertSingleCellEdit(l),"revert-continue")}return"continue"}revertSingleCellEdit(e,t=!1){var i,s,n,r,l;const o=Z(this.beans,e);(i=o==null?void 0:o.comp)!=null&&i.getCellEditor()&&($t(this.beans,[e],{silent:!0}),this.model.clearEditValue(e),zt(this.beans,e,{silent:!0}),bt(this.beans),o==null||o.refreshCell(Ao),(s=o.rowCtrl.rowEditStyleFeature)==null||s.applyRowStyles(),t&&(o==null||o.focusCell(),(l=(r=(n=o==null?void 0:o.comp)==null?void 0:n.getCellEditor())==null?void 0:r.focusIn)==null||l.call(r)))}hasValidationErrors(e){var i;bt(this.beans);const t=Z(this.beans,e);t&&(t.refreshCell(Ao),(i=t.rowCtrl.rowEditStyleFeature)==null||i.applyRowStyles());let o=!1;return e!=null&&e.rowNode?(o||(o=this.model.getRowValidationModel().hasRowValidation({rowNode:e.rowNode})),e.column&&(o||(o=this.model.getCellValidationModel().hasCellValidation({rowNode:e.rowNode,column:e.column})))):(o||(o=this.model.getCellValidationModel().getCellValidationMap().size>0),o||(o=this.model.getRowValidationModel().getRowValidationMap().size>0)),o}moveToNextCell(e,t,o,i="ui"){var l;let s;const n=this.isEditing(),r=n&&this.checkNavWithValidation(void 0,o)==="block-stop";return e instanceof Kt&&n&&(s=(l=this.strategy)==null?void 0:l.moveToNextEditingCell(e,t,o,i,r)),s===null||(s=s||!!this.beans.focusSvc.focusedHeader,s===!1&&!r&&this.stopEditing()),s}getCellDataValue({rowNode:e,column:t},o=!0){if(!e||!t)return;let i=this.model.getEdit({rowNode:e,column:t});const s=e.pinnedSibling;if(s){const r=this.model.getEdit({rowNode:s,column:t});r&&(i=r)}const n=o?(i==null?void 0:i.editorValue)??(i==null?void 0:i.pendingValue):i==null?void 0:i.pendingValue;return n===we||!i?this.valueSvc.getValue(t,e,!0,"api"):n}getRowDataValue(e,t){return this.model.getEditRowDataValue(e,t)}addStopEditingWhenGridLosesFocus(e){Bh(this,this.beans,e)}createPopupEditorWrapper(e){return new mS(e)}setDataValue(e,t,o){var r;if((!this.isEditing()||o==="commit")&&!ES.has(o))return;const{beans:i}=this;this.strategy??(this.strategy=this.createStrategy());const s=this.isBatchEditing()?"ui":"api";if(!o||RS.has(o))return Ci(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 Ci(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 Ci(i,e,!0,t),this.stopEditing(e,{source:s,suppressNavigateAfterEdit:!0}),!0}handleColDefChanged(e){Vh(this.beans,e)}destroy(){this.model.clear(),this.destroyStrategy(),super.destroy()}prepDetailsDuringBatch(e,t){if(!this.batch||!this.model.hasRowEdits(e.rowNode,eo))return;const{rowNode:i,column:s}=e,{compDetails:n,valueToDisplay:r}=t;if(n){const{params:a}=n;return a.data=this.model.getEditRowDataValue(i,eo),{compDetails:n}}const l=this.model.getEditRow(e.rowNode,eo);if(r!==void 0&&(l!=null&&l.has(s)))return{valueToDisplay:this.valueSvc.getValue(s,i)}}cleanupEditors(){var e;(e=this.strategy)==null||e.cleanupEditors()}dispatchCellEvent(e,t,o,i){var s;(s=this.strategy)==null||s.dispatchCellEvent(e,t,o,i)}dispatchRowEvent(e,t){var o;(o=this.strategy)==null||o.dispatchRowEvent(e,t)}dispatchBatchEvent(e,t){this.eventSvc.dispatchEvent(this.createBatchEditEvent(e,t))}createBatchEditEvent(e,t){return V(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;wt(i,!0);const r=this.model.getEditMap(!0),l=(c=(d=r.get(e))==null?void 0:d.get(t))==null?void 0:c.pendingValue;this.batch||this.eventSvc.dispatchEvent({type:"bulkEditingStarted"}),o.forEach(u=>{if(s==null||s.forEachRowInRange(u,h=>{const g=vt(i,h);if(g===void 0)return;const p=r.get(g)??new Map;for(const f of u.columns)if(f&&this.isCellEditable({rowNode:g,column:f},"api")){const C=n.getValue(f,g,!0,"api");let m=n.parseValue(f,g??null,l,C);Number.isNaN(m)&&(m=null),p.set(f,{editorValue:void 0,pendingValue:m,sourceValue:C,state:"changed"})}p.size>0&&r.set(g,p)}),this.setEditMap(r),this.batch){this.cleanupEditors(),_s(i),this.bulkRefresh();return}this.stopEditing(void 0,{source:"api"}),this.eventSvc.dispatchEvent({type:"bulkEditingStopped",changes:this.toEventChangeList(r)})}),this.bulkRefresh();const a=Z(i,{rowNode:e,column:t});a&&a.focusCell(!0)}createCellStyleFeature(e,t){return new vS(e,t)}createRowStyleFeature(e,t){return new wS(e,t)}setEditingCells(e,t){const{beans:o}=this,{colModel:i,valueSvc:s}=o,n=new Map;e.forEach(({colId:r,column:l,colKey:a,rowIndex:d,rowPinned:c,newValue:u,state:h})=>{const g=r?i.getCol(r):a?i.getCol(a):l;if(!g)return;const p=vt(o,{rowIndex:d,rowPinned:c});if(!p)return;const f=s.getValue(g,p,!0,"api");if(!et({pendingValue:u,sourceValue:f})&&h!=="editing")return;let C=n.get(p);C||(C=new Map,n.set(p,C)),u===void 0&&(u=we),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,eo))return;const o=this.model.getEdit(t);if(!o||!et(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)}},hd=class extends F{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:l}=s,a=e.type==="cellFocusCleared";if(i.isEditing(void 0,{withOpenEditor:!0})){const{column:d,rowIndex:c,rowPinned:u}=e,h={column:d,rowNode:vt(s,{rowIndex:c,rowPinned:u})},g=r.get("invalidEditValueMode")==="block";if(g)return;const p=!g,f=!!(l!=null&&l.getCellValidationModel().hasCellValidation(h)),C=p&&f;(o||a?i.stopEditing(void 0,{cancel:C,source:a&&p?"api":void 0,event:n}):!0)||(i.isBatchEditing()?i.cleanupEditors():i.stopEditing(void 0,{source:"api"}))}t==null||t.refreshCell({suppressFlash:!0,force:!0})}isCellEditable({rowNode:e,column:t},o="ui"){return t.isColumnFunc(e,t.getColDef().editable)}stop(e,t){const o=this.model.getEditPositions(),i={all:[],pass:[],fail:[]};if(o.forEach(n=>{var l;i.all.push(n);const r=this.model.getCellValidationModel().getCellValidation(n);if((((l=r==null?void 0:r.errorMessages)==null?void 0:l.length)??0)>0){i.fail.push(n);return}i.pass.push(n)}),e)return o.forEach(n=>{mi(this.beans,n),this.model.stop(n)}),!0;const s=this.processValidationResults(i);return s.destroy.length>0&&s.destroy.forEach(n=>{mi(this.beans,n,{event:t}),this.model.stop(n)}),s.keep.length>0&&s.keep.forEach(n=>{var l;const r=Z(this.beans,n);(l=this.editSvc)!=null&&l.cellEditingInvalidCommitBlocks()||r&&this.editSvc.revertSingleCellEdit(r)}),!0}cleanupEditors({rowNode:e}={},t){wt(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)}),$t(this.beans,i),_s(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;Nh(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=Os(this.beans,e);o&&this.eventSvc.dispatchEvent(o.createRowEvent(t))}shouldStart({column:e},t,o,i="ui"){var a;if(t instanceof KeyboardEvent&&(t.key===x.TAB||t.key===x.ENTER||t.key===x.F2||t.key===x.BACKSPACE&&o))return!0;if((t==null?void 0:t.shiftKey)&&((a=this.beans.rangeSvc)==null?void 0:a.getCellRanges().length)!=0)return!1;const n=e==null?void 0:e.getColDef(),r=this.deriveClickCount(n),l=t==null?void 0:t.type;return l==="click"&&(t==null?void 0:t.detail)===1&&r===1||l==="dblclick"&&(t==null?void 0:t.detail)===2&&r===2?!0:i==="api"?o??!1:!1}shouldStop(e,t,o="ui"){const i=this.editSvc.isBatchEditing();return i&&o==="api"?!0:i&&o==="ui"?!1:o==="api"?!0:t instanceof KeyboardEvent&&!i?t.key===x.ENTER:null}shouldCancel(e,t,o="ui"){const i=this.editSvc.isBatchEditing();return!!(t instanceof KeyboardEvent&&!i&&t.key===x.ESCAPE||i&&o==="api"||o==="api")}setEditMap(e,t){var i;t!=null&&t.update||this.editSvc.stopEditing(void 0,{cancel:!0,source:"api"});const o=[];if(e.forEach((s,n)=>{s.forEach((r,l)=>{r.state==="editing"&&o.push({...r,rowNode:n,column:l})})}),t!=null&&t.update&&(e=new Map([...this.model.getEditMap(),...e])),(i=this.model)==null||i.setEditMap(e),o.length>0){const s=o.at(-1),n=s.pendingValue===we?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()}},PS=class extends hd{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(!Os(this.beans,{rowNode:this.rowNode}))return!0;const n=super.shouldStop({rowNode:this.rowNode},t,o);return n!==null?n:this.rowNode?i!==this.rowNode:!1}midBatchInputsAllowed({rowNode:e}){return e?this.model.hasEdits({rowNode:e}):!1}clearEdits(e){this.model.clearEditValue(e)}start(e,t,o="ui",i){const{rowNode:s}=e;this.rowNode!==s&&super.cleanupEditors(e),this.dispatchRowEvent({rowNode:s},"rowEditingStarted"),this.startedRows.push(s);const n=this.beans.visibleCols.allCols,r=[];n.forEach(l=>{if(!l.isCellEditable(s))return;const a={rowNode:s,column:l};r.push(a),this.model.hasEdits(a)||this.model.start(a)}),this.rowNode=s,this.setupEditors(r,e,!0,t,i)}processValidationResults(e){return e.fail.length>0&&this.editSvc.cellEditingInvalidCommitBlocks()?{destroy:[],keep:e.all}:{destroy:e.all,keep:[]}}stop(e,t){var s;const{rowNode:o}=this;if(o&&!this.model.hasRowEdits(o))return!1;const i=[];return e||this.model.getEditMap().forEach((n,r)=>{if(!(!n||n.size===0)){for(const l of n.values())if(et(l)){i.push(r);break}}}),bt(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 l=r.cellPosition,a=e.isCellEditable(),d=r.isCellEditable(),c=l&&n.rowIndex===l.rowIndex&&n.rowPinned===l.rowPinned;a&&this.setFocusOutOnEditor(e),this.restoreEditors();const u=this.gos.get("suppressStartEditOnTab");return d&&!s?u?r.focusCell(!0,o):((g=r.comp)!=null&&g.getCellEditor()||zt(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())&&zt(this.beans,s,{silent:!0})}))}destroy(){super.destroy(),this.rowNode=void 0,this.startedRows.length=0}},TS=class extends hd{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=vt(this.beans,{rowIndex:i,rowPinned:n}),l=Bs(s),a=t.getCol(l),d=e.previousParams;if(d){const c=Bs(d.column);if((d==null?void 0:d.rowIndex)===i&&c===l&&(d==null?void 0:d.rowPinned)===n)return}o!=null&&o.isEditing({rowNode:r,column:a},{withOpenEditor:!0})&&e.type==="cellFocused"||super.onCellFocusChanged(e)}moveToNextEditingCell(e,t,o,i="ui",s=!1){var g,p,f,C,m;const n=e.cellPosition;let r;const l=this.beans.gos.get("editType")==="fullRow";l&&this.model.suspend(!0),s||(e.eGui.focus(),(p=this.editSvc)==null||p.stopEditing(e,{source:(g=this.editSvc)!=null&&g.isBatchEditing()?"ui":"api",event:o}));try{r=(f=this.beans.navigation)==null?void 0:f.findNextCellToFocusOn(n,{backwards:t,startEditing:!0})}finally{l&&this.model.suspend(!1)}if(r===!1)return null;if(r==null)return!1;const a=r.cellPosition,d=e.isCellEditable(),c=r.isCellEditable(),u=a&&n.rowIndex===a.rowIndex&&n.rowPinned===a.rowPinned;d&&!s&&this.setFocusOutOnEditor(e);const h=this.gos.get("suppressStartEditOnTab");return!u&&!s&&(super.cleanupEditors(r,!0),h?r.focusCell(!0,o):this.editSvc.startEditing(r,{startedEdit:!0,event:o,source:i,ignoreEventKey:!0})),c&&!s?(r.focusCell(!1,o),h?r.focusCell(!0,o):(C=r.comp)!=null&&C.getCellEditor()||(zt(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}},xt={moduleName:"EditCore",version:H,beans:[Ih,FS],apiFunctions:{getEditingCells:uS,getCellEditorInstances:_h,startEditingCell:pS,stopEditing:hS,isEditing:gS,validateEdit:fS},dynamicBeans:{singleCell:TS,fullRow:PS},dependsOn:[id,sd],css:[$b]},IS={moduleName:"TextEditor",version:H,userComponents:{agCellEditor:nd,agTextCellEditor:nd},dependsOn:[xt]},MS={moduleName:"NumberEditor",version:H,userComponents:{agNumberCellEditor:{classImp:iS}},dependsOn:[xt]},AS={moduleName:"DateEditor",version:H,userComponents:{agDateCellEditor:Yb,agDateStringCellEditor:Qb},dependsOn:[xt]},kS={moduleName:"CheckboxEditor",version:H,userComponents:{agCheckboxCellEditor:Kb},dependsOn:[xt]},LS={moduleName:"SelectEditor",version:H,userComponents:{agSelectCellEditor:nS},dependsOn:[xt]},GS={moduleName:"LargeTextEditor",version:H,userComponents:{agLargeTextCellEditor:eS},dependsOn:[xt]},HS={moduleName:"CustomEditor",version:H,dependsOn:[xt]};function OS(e){var t;(t=e.expansionSvc)==null||t.expandAll(!0)}function BS(e){var t;(t=e.expansionSvc)==null||t.expandAll(!1)}function _S(e){const t=Oe(e),o=mb(e);t?t.onRowHeightChanged():o&&o.onRowHeightChanged()}var NS={moduleName:"CsrmSsrmSharedApi",version:H,apiFunctions:{expandAll:OS,collapseAll:BS,onRowHeightChanged:_S}},VS=class extends F{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":G(21);break}})}processGroupOpenedEvent(e){const{colGroupSvc:t}=this.beans;t&&e.columnGroups.forEach(o=>{let i=null;o&&(i=t.getProvidedColGroup(o.getGroupId())),!(o&&!i)&&t.setColumnGroupOpened(i,o.isExpanded(),"alignedGridChanged")})}processColumnEvent(e){var c;const t=e.column;let o=null;const i=this.beans,{colResize:s,ctrlsSvc:n,colModel:r}=i;if(t&&(o=r.getColDefCol(t.getColId())),t&&!o)return;const l=this.getMasterColumns(e);switch(e.type){case"columnMoved":{const h=e.api.getColumnState().map(g=>({colId:g.colId}));De(i,{state:h,applyOrder:!0},"alignedGridChanged")}break;case"columnVisible":{const h=e.api.getColumnState().map(g=>({colId:g.colId,hide:g.hide}));De(i,{state:h},"alignedGridChanged")}break;case"columnPinned":{const h=e.api.getColumnState().map(g=>({colId:g.colId,pinned:g.pinned}));De(i,{state:h},"alignedGridChanged")}break;case"columnResized":{const u=e,h={};l.forEach(g=>{h[g.getId()]={key:g.getColId(),newWidth:g.getActualWidth()}}),(c=u.flexColumns)==null||c.forEach(g=>{h[g.getId()]&&delete h[g.getId()]}),s==null||s.setColumnWidths(Object.values(h),!1,u.finished,"alignedGridChanged");break}}const d=n.getGridBodyCtrl().isVerticalScrollShowing();this.getAlignedGridApis().forEach(u=>{u.setGridOption("alwaysShowVerticalScroll",d)})}},WS={moduleName:"AlignedGrids",version:H,beans:[VS],dependsOn:[ba]},zS="↑",$S="↓",US={tag:"span",children:[{tag:"span",ref:"eDelta",cls:"ag-value-change-delta"},{tag:"span",ref:"eValue",cls:"ag-value-change-value"}]},KS=class extends Y{constructor(){super(US),this.eValue=A,this.eDelta=A,this.refreshCount=0}init(e){this.refresh(e,!0)}showDelta(e,t){const o=Math.abs(t),i=e.formatValue(o),s=L(i)?i:o,n=t>=0,r=this.eDelta;n?r.textContent=zS+s:r.textContent=$S+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"),me(this.eDelta)}refresh(e,t=!1){var d;const{value:o,valueFormatted:i}=e,{eValue:s,lastValue:n,beans:r}=this;if(o===n||(L(i)?s.textContent=i:L(o)?s.textContent=o:me(s),(d=r.filterManager)!=null&&d.isSuppressFlashingCellsBecauseFiltering()))return!1;const l=o&&typeof o=="object"&&"toNumber"in o?o.toNumber():o,a=n&&typeof n=="object"&&"toNumber"in n?n.toNumber():n;if(l===a)return!1;if(typeof l=="number"&&typeof a=="number"){const c=l-a;this.showDelta(e,c)}return n&&s.classList.add("ag-value-change-value-highlight"),t||this.setTimerToRemoveDelta(),this.lastValue=o,!0}},jS=".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}",qS={tag:"span",children:[{tag:"span",ref:"eCurrent",cls:"ag-value-slide-current"}]},YS=class extends Y{constructor(){super(qS),this.eCurrent=A,this.refreshCount=0,this.registerCSS(jS)}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=ne({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 L(e.valueFormatted)?i.textContent=e.valueFormatted:L(e.value)?i.textContent=o:me(i),!0}},ZS=class extends F{constructor(){super(...arguments),this.beanName="cellFlashSvc",this.nextAnimationTime=null,this.nextAnimationCycle=null,this.animations={highlight:new Map,"data-changed":new Map}}animateCell(e,t,o=this.beans.gos.get("cellFlashDuration"),i=this.beans.gos.get("cellFadeDuration")){const s=this.animations[t];s.delete(e);const n=Date.now(),r=n+o,l=n+o+i,a={phase:"flash",flashEndTime:r,fadeEndTime:l};s.set(e,a);const d=`ag-cell-${t}`,c=`${d}-animation`,{comp:u,eGui:{style:h}}=e;u.toggleCss(d,!0),u.toggleCss(c,!1),h.removeProperty("transition"),h.removeProperty("transition-delay"),this.nextAnimationTime&&r+15<this.nextAnimationTime&&(clearTimeout(this.nextAnimationCycle),this.nextAnimationCycle=null,this.nextAnimationTime=null),this.nextAnimationCycle||(this.beans.frameworkOverrides.wrapIncoming(()=>{this.nextAnimationCycle=setTimeout(this.advanceAnimations.bind(this),o)}),this.nextAnimationTime=r)}advanceAnimations(){const e=Date.now();let t=null;for(const o of Object.keys(this.animations)){const i=this.animations[o],s=`ag-cell-${o}`,n=`${s}-animation`;for(const[r,l]of i){if(!r.isAlive()||!r.comp){i.delete(r);continue}const{phase:a,flashEndTime:d,fadeEndTime:c}=l,u=a==="flash"?d:c;if(!(e+15>=u)){t=Math.min(u,t??1/0);continue}const{comp:g,eGui:{style:p}}=r;switch(a){case"flash":g.toggleCss(s,!1),g.toggleCss(n,!0),p.transition=`background-color ${c-d}ms`,p.transitionDelay=`${d-e}ms`,t=Math.min(c,t??1/0),l.phase="fade";break;case"fade":g.toggleCss(s,!1),g.toggleCss(n,!1),p.removeProperty("transition"),p.removeProperty("transition-delay"),i.delete(r);break}}}t==null?(this.nextAnimationTime=null,this.nextAnimationCycle=null):t&&(this.nextAnimationCycle=setTimeout(this.advanceAnimations.bind(this),t-e),this.nextAnimationTime=t)}onFlashCells(e,t){if(!e.comp)return;const o=Mh(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 XS(e,t={}){const{cellFlashSvc:o}=e;o&&e.frameworkOverrides.wrapIncoming(()=>{e.rowRenderer.getCellCtrls(t.rowNodes,t.columns).forEach(i=>o.flashCell(i,t))})}var QS={moduleName:"HighlightChanges",version:H,beans:[ZS],userComponents:{agAnimateShowChangeCellRenderer:KS,agAnimateSlideCellRenderer:YS},apiFunctions:{flashCells:XS}};function JS(e){var t;return((t=e.stateSvc)==null?void 0:t.getState())??{}}function ey(e,t,o){var i;return(i=e.stateSvc)==null?void 0:i.setState(t,o)}function gd(e){switch(e={...e},e.version||(e.version="32.1.0"),e.version){case"32.1.0":e=ty(e)}return e.version=H,e}function ty(e){return e.cellSelection=oy(e,"rangeSelection"),e}function oy(e,t){if(e&&typeof e=="object")return e[t]}var iy=class extends F{constructor(){super(...arguments),this.beanName="stateSvc",this.updateRowGroupExpansionStateTimer=0,this.suppressEvents=!0,this.queuedUpdateSources=new Set,this.dispatchStateUpdateEventDebounced=ve(this,()=>this.dispatchQueuedStateUpdateEvents(),0),this.onRowGroupOpenedDebounced=ve(this,()=>{this.updateCachedState("rowGroupExpansion",this.getRowGroupExpansionState())},0),this.onRowSelectedDebounced=ve(this,()=>{this.staleStateKeys.delete("rowSelection"),this.updateCachedState("rowSelection",this.getRowSelectionState())},0),this.staleStateKeys=new Set}postConstruct(){this.isClientSideRowModel=de(this.gos);const e=gd(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=gd(e);delete o.partialColumnState,this.cachedState=o,this.startSuppressEvents();const i="api",s=t?new Set(t):void 0;this.setGridReadyState(o,i,s),this.setColumnsInitialisedState(o,i,!1,s),this.setRowCountState(o,i,s),setTimeout(()=>{this.isAlive()&&this.setFirstDataRenderedState(o,i,s),this.stopSuppressEvents(i)})}setGridReadyState(e,t,o){var i,s;t==="api"&&!(o!=null&&o.has("sideBar"))&&((s=(i=this.beans.sideBar)==null?void 0:i.comp)==null||s.setState(e.sideBar)),this.updateCachedState("sideBar",this.getSideBarState())}setupStateOnGridReady(e){this.setGridReadyState(e,"gridInitializing");const t=()=>this.updateCachedState("sideBar",this.getSideBarState());this.addManagedEventListeners({toolPanelVisibleChanged:t,sideBarUpdated:t})}updateColumnAndGroupState(){this.updateColumnState(["aggregation","columnOrder","columnPinning","columnSizing","columnVisibility","pivot","rowGroup","sort"]),this.updateCachedState("columnGroup",this.getColumnGroupState())}setColumnsInitialisedState(e,t,o,i){this.setColumnState(e,t,o,i),this.setColumnGroupState(e,t,i),this.updateColumnAndGroupState()}setupStateOnColumnsInitialised(e,t){this.setColumnsInitialisedState(e,"gridInitializing",t);const o=i=>()=>this.updateColumnState([i]);this.addManagedEventListeners({columnValueChanged:o("aggregation"),columnMoved:o("columnOrder"),columnPinned:o("columnPinning"),columnResized:o("columnSizing"),columnVisible:o("columnVisibility"),columnPivotChanged:o("pivot"),columnPivotModeChanged:o("pivot"),columnRowGroupChanged:o("rowGroup"),sortChanged:o("sort"),newColumnsLoaded:this.updateColumnAndGroupState.bind(this),columnGroupOpened:()=>this.updateCachedState("columnGroup",this.getColumnGroupState())})}setRowCountState(e,t,o){const{filter:i,rowGroupExpansion:s,rowSelection:n,pagination:r}=e,l=(d,c)=>!(o!=null&&o.has(d))&&(c||t==="api");l("filter",i)&&this.setFilterState(i),l("rowGroupExpansion",s)&&this.setRowGroupExpansionState(s,t),l("rowSelection",n)&&this.setRowSelectionState(n,t),l("pagination",r)&&this.setPaginationState(r,t);const a=this.updateCachedState.bind(this);a("filter",this.getFilterState()),a("rowGroupExpansion",this.getRowGroupExpansionState()),a("rowSelection",this.getRowSelectionState()),a("pagination",this.getPaginationState())}setupStateOnRowCountReady(e){this.setRowCountState(e,"gridInitializing");const t=this.updateCachedState.bind(this),o=()=>{this.updateRowGroupExpansionStateTimer=0,t("rowGroupExpansion",this.getRowGroupExpansionState())},i=()=>t("filter",this.getFilterState()),{gos:s,colFilter:n}=this.beans;this.addManagedEventListeners({filterChanged:i,rowGroupOpened:()=>this.onRowGroupOpenedDebounced(),expandOrCollapseAll:o,columnRowGroupChanged:o,rowDataUpdated:()=>{(s.get("groupDefaultExpanded")!==0||s.get("isGroupOpenByDefault"))&&(this.updateRowGroupExpansionStateTimer||(this.updateRowGroupExpansionStateTimer=setTimeout(o)))},selectionChanged:()=>{this.staleStateKeys.add("rowSelection"),this.onRowSelectedDebounced()},paginationChanged:r=>{(r.newPage||r.newPageSize)&&t("pagination",this.getPaginationState())}}),n&&this.addManagedListeners(n,{filterStateChanged:i})}setFirstDataRenderedState(e,t,o){const{scroll:i,cellSelection:s,focusedCell:n,columnOrder:r,rowPinning:l}=e,a=(u,h)=>!(o!=null&&o.has(u))&&(h||t==="api");a("focusedCell",n)&&this.setFocusedCellState(n),a("cellSelection",s)&&this.setCellSelectionState(s),a("scroll",i)&&this.setScrollState(i),a("rowPinning",l)&&this.setRowPinningState(l),this.setColumnPivotState(!!(r!=null&&r.orderedColIds),t);const d=this.updateCachedState.bind(this);d("sideBar",this.getSideBarState()),d("focusedCell",this.getFocusedCellState());const c=this.getRangeSelectionState();d("rangeSelection",c),d("cellSelection",c),d("scroll",this.getScrollState())}setupStateOnFirstDataRendered(e){this.setFirstDataRenderedState(e,"gridInitializing");const t=this.updateCachedState.bind(this);this.addManagedEventListeners({cellFocused:()=>t("focusedCell",this.getFocusedCellState()),cellSelectionChanged:o=>{if(o.finished){const i=this.getRangeSelectionState();t("rangeSelection",i),t("cellSelection",i)}},bodyScrollEnd:()=>t("scroll",this.getScrollState()),pinnedRowsChanged:()=>t("rowPinning",this.getRowPinningState())})}getColumnState(){const e=this.beans;return wb(ci(e),e.colModel.isPivotMode())}setColumnState(e,t,o,i){const{sort:s,rowGroup:n,aggregation:r,pivot:l,columnPinning:a,columnVisibility:d,columnSizing:c,columnOrder:u}=e,h=(D,T)=>!(i!=null&&i.has(D))&&(T||t==="api"),g={},p=D=>{let T=g[D];return T||(T={colId:D},g[D]=T,T)},f={},C=h("sort",s);C&&(s==null||s.sortModel.forEach(({colId:D,sort:T},k)=>{const O=p(D);O.sort=T,O.sortIndex=k})),(C||!o)&&(f.sort=null,f.sortIndex=null);const m=h("rowGroup",n);m&&(n==null||n.groupColIds.forEach((D,T)=>{const k=p(D);k.rowGroup=!0,k.rowGroupIndex=T})),(m||!o)&&(f.rowGroup=null,f.rowGroupIndex=null);const b=h("aggregation",r);b&&(r==null||r.aggregationModel.forEach(({colId:D,aggFunc:T})=>{p(D).aggFunc=T})),(b||!o)&&(f.aggFunc=null);const S=h("pivot",l);S&&(l==null||l.pivotColIds.forEach((D,T)=>{const k=p(D);k.pivot=!0,k.pivotIndex=T}),this.gos.updateGridOptions({options:{pivotMode:!!(l!=null&&l.pivotMode)},source:t})),(S||!o)&&(f.pivot=null,f.pivotIndex=null);const w=h("columnPinning",a);w&&(a==null||a.leftColIds.forEach(D=>{p(D).pinned="left"}),a==null||a.rightColIds.forEach(D=>{p(D).pinned="right"})),(w||!o)&&(f.pinned=null);const y=h("columnVisibility",d);y&&(d==null||d.hiddenColIds.forEach(D=>{p(D).hide=!0})),(y||!o)&&(f.hide=null);const R=h("columnSizing",c);R&&(c==null||c.columnSizingModel.forEach(({colId:D,flex:T,width:k})=>{const O=p(D);O.flex=T??null,O.width=k})),(R||!o)&&(f.flex=null);const P=u==null?void 0:u.orderedColIds,M=!!(P!=null&&P.length)&&!(i!=null&&i.has("columnOrder")),I=M?P.map(D=>p(D)):Object.values(g);I.length&&(this.columnStates=I,De(this.beans,{state:I,applyOrder:M,defaultState:f},t))}setColumnPivotState(e,t){const o=this.columnStates;this.columnStates=void 0;const i=this.columnGroupStates;this.columnGroupStates=void 0;const s=this.beans,{pivotResultCols:n,colGroupSvc:r}=s;if(n!=null&&n.isPivotResultColsPresent()){if(o){const l=[];for(const a of o)n.getPivotResultCol(a.colId)&&l.push(a);De(s,{state:l,applyOrder:e},t)}i&&(r==null||r.setColumnGroupState(i,t))}}getColumnGroupState(){const e=this.beans.colGroupSvc;if(!e)return;const t=e.getColumnGroupState();return bb(t)}setColumnGroupState(e,t,o){var l;const i=this.beans.colGroupSvc;if(!i||o!=null&&o.has("columnGroup")||t!=="api"&&!Object.prototype.hasOwnProperty.call(e,"columnGroup"))return;const s=new Set((l=e.columnGroup)==null?void 0:l.openColumnGroupIds),r=i.getColumnGroupState().map(({groupId:a})=>{const d=s.has(a);return d&&s.delete(a),{groupId:a,open:d}});s.forEach(a=>{r.push({groupId:a,open:!0})}),r.length&&(this.columnGroupStates=r),i.setColumnGroupState(r,t)}getFilterState(){const e=this.beans.filterManager;let t=e==null?void 0:e.getFilterModel();t&&Object.keys(t).length===0&&(t=void 0);const o=e==null?void 0:e.getFilterState(),i=(e==null?void 0:e.getAdvFilterModel())??void 0;return t||i||o?{filterModel:t,columnFilterState:o,advancedFilterModel:i}:void 0}setFilterState(e){const t=this.beans.filterManager,{filterModel:o,columnFilterState:i,advancedFilterModel:s}=e??{filterModel:null,columnFilterState:null,advancedFilterModel:null};(o!==void 0||i!==void 0)&&(t==null||t.setFilterState(o??null,i??null,"columnFilter")),s!==void 0&&(t==null||t.setAdvFilterModel(s??null,"advancedFilter"))}getRangeSelectionState(){var t;const e=(t=this.beans.rangeSvc)==null?void 0:t.getCellRanges().map(o=>{const{id:i,type:s,startRow:n,endRow:r,columns:l,startColumn:a}=o;return{id:i,type:s,startRow:n,endRow:r,colIds:l.map(d=>d.getColId()),startColId:a.getColId()}});return e!=null&&e.length?{cellRanges:e}:void 0}setCellSelectionState(e){const{gos:t,rangeSvc:o,colModel:i,visibleCols:s}=this.beans;if(!pt(t)||!o)return;const n=[];e==null||e.cellRanges.forEach(r=>{const l=[];if(r.colIds.forEach(d=>{const c=i.getCol(d);c&&l.push(c)}),!l.length)return;let a=i.getCol(r.startColId);if(!a){const d=s.allCols,c=new Set(l);a=d.find(u=>c.has(u))}n.push({...r,columns:l,startColumn:a})}),o.setCellRanges(n)}getScrollState(){if(!this.isClientSideRowModel)return;const e=this.beans.ctrlsSvc.getScrollFeature(),{left:t}=(e==null?void 0:e.getHScrollPosition())??{left:0},{top:o}=(e==null?void 0:e.getVScrollPosition())??{top:0};return o||t?{top:o,left:t}:void 0}setScrollState(e){if(!this.isClientSideRowModel)return;const{top:t,left:o}=e??{top:0,left:0},{frameworkOverrides:i,rowRenderer:s,animationFrameSvc:n,ctrlsSvc:r}=this.beans;i.wrapIncoming(()=>{var l;r.get("center").setCenterViewportScrollLeft(o),(l=r.getScrollFeature())==null||l.setVerticalScrollPosition(t),s.redraw({afterScroll:!0}),n==null||n.flushAllFrames()})}getSideBarState(){var e,t;return(t=(e=this.beans.sideBar)==null?void 0:e.comp)==null?void 0:t.getState()}getFocusedCellState(){if(!this.isClientSideRowModel)return;const e=this.beans.focusSvc.getFocusedCell();if(e){const{column:t,rowIndex:o,rowPinned:i}=e;return{colId:t.getColId(),rowIndex:o,rowPinned:i}}}setFocusedCellState(e){if(!this.isClientSideRowModel)return;const{focusSvc:t,colModel:o}=this.beans;if(!e){t.clearFocusedCell();return}const{colId:i,rowIndex:s,rowPinned:n}=e;t.setFocusedCell({column:o.getCol(i),rowIndex:s,rowPinned:n,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0})}getPaginationState(){const{pagination:e,gos:t}=this.beans;if(!e)return;const o=e.getCurrentPage(),i=t.get("paginationAutoPageSize")?void 0:e.getPageSize();if(!(!o&&!i))return{page:o,pageSize:i}}setPaginationState(e,t){const{pagination:o,gos:i}=this.beans;if(!o)return;const{pageSize:s,page:n}=e??{page:0,pageSize:i.get("paginationPageSize")},r=t==="gridInitializing";s&&!i.get("paginationAutoPageSize")&&o.setPageSize(s,r?"initialState":"pageSizeSelector"),typeof n=="number"&&(r?o.setPage(n):o.goToPage(n))}getRowSelectionState(){var i;const e=this.beans.selectionSvc;if(!e)return;const t=e.getSelectionState();return!t||!Array.isArray(t)&&(t.selectAll===!1||t.selectAllChildren===!1)&&!((i=t==null?void 0:t.toggledNodes)!=null&&i.length)?void 0:t}setRowSelectionState(e,t){var o;(o=this.beans.selectionSvc)==null||o.setSelectionState(e,t,t==="api")}getRowGroupExpansionState(){const{expansionSvc:e,rowModel:t}=this.beans;if(!e)return;const o=[];return t.forEachNode(({expanded:i,id:s})=>{i&&s&&o.push(s)}),o.length?{expandedRowGroupIds:o}:void 0}getRowPinningState(){var e;return(e=this.beans.pinnedRowModel)==null?void 0:e.getPinnedState()}setRowPinningState(e){const t=this.beans.pinnedRowModel;e?t==null||t.setPinnedState(e):t==null||t.reset()}setRowGroupExpansionState(e,t){var n;const o=this.beans.expansionSvc;if(!o)return;const i=(e==null?void 0:e.expandedRowGroupIds)??[];let s;if(t==="api"){const r=(n=this.getRowGroupExpansionState())==null?void 0:n.expandedRowGroupIds;if(r!=null&&r.length){const l=new Set(r);for(const a of i)l.delete(a);s=Array.from(l)}}o.expandRows(i,s)}updateColumnState(e){const t=this.getColumnState();let o=!1;const i=this.cachedState;for(const s of Object.keys(t)){const n=t[s];Jn(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),Jn(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")}},sy={moduleName:"GridState",version:H,beans:[iy],apiFunctions:{getState:JS,setState:ey}};function ny(e,t={}){const o=t?t.rowNodes:void 0;e.frameworkOverrides.wrapIncoming(()=>e.rowRenderer.redrawRows(o))}function pd(e,t,o,i,s){t&&(i&&t.parent&&t.parent.level!==-1&&pd(e,t.parent,o,i,s),t.setExpanded(o,void 0,s))}function ry(e,t){return e.rowModel.getRowNode(t)}function ly(e,t,o,i){e.rowRenderer.addRenderedRowListener(t,o,i)}function ay(e){return e.rowRenderer.getRenderedNodes()}function dy(e,t,o){e.rowModel.forEachNode(t,o)}function cy(e){return e.rowRenderer.firstRenderedRow}function uy(e){return e.rowRenderer.lastRenderedRow}function hy(e,t){return e.rowModel.getRow(t)}function gy(e){return e.rowModel.getRowCount()}var fd={moduleName:"RowApi",version:H,apiFunctions:{redrawRows:ny,setRowNodeExpanded:pd,getRowNode:ry,addRenderedRowListener:ly,getRenderedNodes:ay,forEachNode:dy,getFirstDisplayedRowIndex:cy,getLastDisplayedRowIndex:uy,getDisplayedRowAtIndex:hy,getDisplayedRowCount:gy}},py={moduleName:"ScrollApi",version:H,apiFunctions:{getVerticalPixelRange:aS,getHorizontalPixelRange:dS,ensureColumnVisible:rd,ensureIndexVisible:ld,ensureNodeVisible:cS}};function fy(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 Cy(e,t={}){e.frameworkOverrides.wrapIncoming(()=>e.rowRenderer.refreshCells(t))}function my(e){e.frameworkOverrides.wrapIncoming(()=>e.ctrlsSvc.getHeaderRowContainerCtrls().forEach(t=>t.refresh()))}function vy(e){var t;return((t=e.animationFrameSvc)==null?void 0:t.isQueueEmpty())??!0}function wy(e){var t;(t=e.animationFrameSvc)==null||t.flushAllFrames()}function by(e){return{rowHeight:Ps(e),headerHeight:xo(e)}}function Sy(e,t={}){var n;const o=[];if(e.rowRenderer.getCellCtrls(t.rowNodes,t.columns).forEach(r=>{const l=r.getCellRenderer();l!=null&&o.push(Ls(l))}),(n=t.columns)!=null&&n.length)return o;const i=[],s=In(t.rowNodes);return e.rowRenderer.getAllRowCtrls().forEach(r=>{if(s&&!Mn(r.rowNode,s)||!r.isFullWidth())return;const l=r.getFullWidthCellRenderers();for(let a=0;a<l.length;a++){const d=l[a];d!=null&&i.push(Ls(d))}}),[...i,...o]}var yy={moduleName:"RenderApi",version:H,apiFunctions:{setGridAriaProperty:fy,refreshCells:Cy,refreshHeader:my,isAnimationFrameQueueEmpty:vy,flushAllAnimationFrames:wy,getSizesForCurrentTheme:by,getCellRendererInstances:Sy}};function Ry(e,t){var o,i;typeof t=="number"?(o=e.colAutosize)==null||o.sizeColumnsToFit(t,"api"):(i=e.colAutosize)==null||i.sizeColumnsToFitGridBody(t)}function Cd({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 xy(e,t){var o;t&&typeof t=="object"?Cd(e,t):(o=e.colAutosize)==null||o.autoSizeAllColumns({source:"api",skipHeader:t})}var Ey=class extends F{constructor(){super(...arguments),this.beanName="colAutosize",this.timesDelayed=0,this.shouldQueueResizeOperations=!1,this.resizeOperationQueue=[]}postConstruct(){this.addManagedEventListeners({firstDataRendered:()=>this.onFirstDataRendered()})}autoSizeCols(e){if(this.shouldQueueResizeOperations){this.pushResizeOperation(()=>this.autoSizeCols(e));return}const{colKeys:t,skipHeader:o,skipHeaderGroups:i,stopAtGroup:s,defaultMaxWidth:n,defaultMinWidth:r,columnLimits:l=[],source:a="api"}=e,{animationFrameSvc:d,renderStatus:c,colModel:u,autoWidthCalc:h,visibleCols:g}=this.beans;if(d==null||d.flushAllFrames(),this.timesDelayed<5&&c&&!c.areHeaderCellsRendered()){this.timesDelayed++,setTimeout(()=>{this.isAlive()&&this.autoSizeCols(e)});return}this.timesDelayed=0;const p=[];let f=-1;const C=Object.fromEntries(l.map(({colId:S,maxWidth:w,minWidth:y})=>[S,{maxWidth:w,minWidth:y}])),m=o??this.gos.get("skipHeaderOnAutoSize"),b=i??m;for(;f!==0;){f=0;const S=[];t.forEach(w=>{if(!w||Su(w))return;const y=u.getCol(w);if(!y||p.indexOf(y)>=0)return;const R=h.getPreferredWidthForColumn(y,m);if(R>0){const P=C[y.colId]??{};P.minWidth??(P.minWidth=r),P.maxWidth??(P.maxWidth=n);const M=Dy(y,R,P);y.setActualWidth(M,a),p.push(y),f++}S.push(y)}),S.length&&g.refresh(a)}b||this.autoSizeColumnGroupsByColumns(t,a,s),Nt(this.eventSvc,p,!0,"autosizeColumns")}autoSizeColumn(e,t,o){e&&this.autoSizeCols({colKeys:[e],skipHeader:o,skipHeaderGroups:!0,source:t})}autoSizeColumnGroupsByColumns(e,t,o){const{colModel:i,ctrlsSvc:s}=this.beans,n=new Set;i.getColsForKeys(e).forEach(d=>{let c=d.getParent();for(;c&&c!=o;)c.isPadding()||n.add(c),c=c.getParent()});let l;const a=[];for(const d of n){for(const c of s.getHeaderRowContainerCtrls())if(l=c.getHeaderCtrlForColumn(d),l)break;l&&l.resizeLeafColumnsToFit(t)}return a}autoSizeAllColumns(e){if(this.shouldQueueResizeOperations){this.pushResizeOperation(()=>this.autoSizeAllColumns(e));return}const t=this.beans.visibleCols.allCols;this.autoSizeCols({colKeys:t,...e})}addColumnAutosize(e,t){const o=this.gos.get("skipHeaderOnAutoSize"),i=()=>{this.autoSizeColumn(t,"uiColumnResized",o)};e.addEventListener("dblclick",i);const s=new yt(e);return s.addEventListener("doubleTap",i),()=>{e.removeEventListener("dblclick",i),s.removeEventListener("doubleTap",i),s.destroy()}}addColumnGroupResize(e,t,o){const i=this.gos.get("skipHeaderOnAutoSize"),s=()=>{const n=[];t.getDisplayedLeafColumns().forEach(l=>{l.getColDef().suppressAutoSize||n.push(l.getColId())}),n.length>0&&this.autoSizeCols({colKeys:n,skipHeader:i,stopAtGroup:t,source:"uiColumnResized"}),o()};return e.addEventListener("dblclick",s),()=>e.removeEventListener("dblclick",s)}sizeColumnsToFitGridBody(e,t){if(!this.isAlive())return;const{ctrlsSvc:o,scrollVisibleSvc:i}=this.beans,s=o.getGridBodyCtrl(),r=s.isVerticalScrollShowing()?i.getScrollbarWidth():0,a=lo(s.eGridBody)-r;if(a>0){this.sizeColumnsToFit(a,"sizeColumnsToFit",!1,e);return}t===void 0?window.setTimeout(()=>{this.sizeColumnsToFitGridBody(e,100)},0):t===100?window.setTimeout(()=>{this.sizeColumnsToFitGridBody(e,500)},100):t===500?window.setTimeout(()=>{this.sizeColumnsToFitGridBody(e,-1)},500):G(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===Ue(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),b=(C==null?void 0:C.maxWidth)??(i==null?void 0:i.defaultMaxWidth),S=f.getActualWidth();return(m==null||S>=m)&&(b==null||S<=b)}))return;const l=[],a=[];n.forEach(p=>{p.getColDef().suppressSizeToFit===!0?a.push(p):l.push(p)});const d=l.slice(0);let c=!1;const u=p=>{Ee(l,p),a.push(p)};for(l.forEach(p=>{p.resetActualWidth(t);const f=s==null?void 0:s[p.getId()],C=(f==null?void 0:f.minWidth)??(i==null?void 0:i.defaultMinWidth),m=(f==null?void 0:f.maxWidth)??(i==null?void 0:i.defaultMaxWidth),b=p.getActualWidth();typeof C=="number"&&b<C?p.setActualWidth(C,t,!0):typeof m=="number"&&b>m&&p.setActualWidth(m,t,!0)});!c;){c=!0;const p=e-Ue(a);if(p<=0)l.forEach(f=>{var m;const C=((m=s==null?void 0:s[f.getId()])==null?void 0:m.minWidth)??(i==null?void 0:i.defaultMinWidth);if(typeof C=="number"){f.setActualWidth(C,t,!0);return}f.setActualWidth(f.minWidth,t)});else{const f=p/Ue(l);let C=p;for(let m=l.length-1;m>=0;m--){const b=l[m],S=s==null?void 0:s[b.getId()],w=(S==null?void 0:S.minWidth)??(i==null?void 0:i.defaultMinWidth),y=(S==null?void 0:S.maxWidth)??(i==null?void 0:i.defaultMaxWidth),R=b.getMinWidth(),P=b.getMaxWidth(),M=typeof w=="number"&&w>R?w:R,I=typeof y=="number"&&y<P?y:P;let D=Math.round(b.getActualWidth()*f);D<M?(D=M,u(b),c=!1):D>I?(D=I,u(b),c=!1):m===0&&(D=C),b.setActualWidth(D,t,!0),C-=D}}}d.forEach(p=>{p.fireColumnWidthChangedEvent(t)});const h=this.beans.visibleCols;h.setLeftValues(t),h.updateBodyWidths(),!o&&Nt(this.eventSvc,d,!0,t)}applyAutosizeStrategy(){const e=this.gos.get("autoSizeStrategy");if(!e)return;const{type:t}=e;setTimeout(()=>{if(t==="fitGridWidth"){const{columnLimits:o,defaultMinWidth:i,defaultMaxWidth:s}=e,n=o==null?void 0:o.map(({colId:r,minWidth:l,maxWidth:a})=>({key:r,minWidth:l,maxWidth:a}));this.sizeColumnsToFitGridBody({defaultMinWidth:i,defaultMaxWidth:s,columnLimits:n})}else t==="fitProvidedWidth"&&this.sizeColumnsToFit(e.width,"sizeColumnsToFit")})}onFirstDataRendered(){const e=this.gos.get("autoSizeStrategy");if((e==null?void 0:e.type)!=="fitCellContents")return;const{colIds:t,skipHeader:o,defaultMaxWidth:i,defaultMinWidth:s,columnLimits:n}=e;setTimeout(()=>{const r={skipHeader:o,source:"autosizeColumns",defaultMaxWidth:i,defaultMinWidth:s,columnLimits:n};t?this.autoSizeCols({colKeys:t,...r}):this.autoSizeAllColumns(r)})}processResizeOperations(){this.shouldQueueResizeOperations=!1,this.resizeOperationQueue.forEach(e=>e()),this.resizeOperationQueue=[]}pushResizeOperation(e){this.resizeOperationQueue.push(e)}destroy(){this.resizeOperationQueue.length=0,super.destroy()}};function Dy(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 Fy={moduleName:"ColumnAutoSize",version:H,beans:[Ey],apiFunctions:{sizeColumnsToFit:Ry,autoSizeColumns:Cd,autoSizeAllColumns:xy},dependsOn:[Ca]},Py=".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 Ty(e){var t;return((t=e.pinnedRowModel)==null?void 0:t.getPinnedTopRowCount())??0}function Iy(e){var t;return((t=e.pinnedRowModel)==null?void 0:t.getPinnedBottomRowCount())??0}function My(e,t){var o;return(o=e.pinnedRowModel)==null?void 0:o.getPinnedTopRow(t)}function Ay(e,t){var o;return(o=e.pinnedRowModel)==null?void 0:o.getPinnedBottomRow(t)}function ky(e,t,o){var i;return(i=e.pinnedRowModel)==null?void 0:i.forEachPinnedRow(t,o)}var Ly={moduleName:"PinnedRow",version:H,beans:[Wp],css:[Py],apiFunctions:{getPinnedTopRowCount:Ty,getPinnedBottomRowCount:Iy,getPinnedTopRow:My,getPinnedBottomRow:Ay,forEachPinnedRow:ky},icons:{rowPin:"pin",rowPinTop:"pinned-top",rowPinBottom:"pinned-bottom",rowUnpin:"un-pin"}},Gy=class extends Kt{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&&$o(this.eGui,this.rowNode.rowIndex)}setAriaRowSpan(){Fc(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(yi(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}},Hy=class extends Fi{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 Gy(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(){}},Oy=class extends F{constructor(){super(...arguments),this.beanName="spannedRowRenderer",this.topCtrls=new Map,this.bottomCtrls=new Map,this.centerCtrls=new Map}postConstruct(){this.addManagedEventListeners({displayedRowsChanged:this.createAllCtrls.bind(this)})}createAllCtrls(){this.createCtrls("top"),this.createCtrls("bottom"),this.createCtrls("center")}createCtrls(e){const{rowSpanSvc:t}=this.beans,o=`${e}Ctrls`,i=this[o],s=i.size,n=this.getAllRelevantRowControls(e),r=new Map;let l=!1;for(const d of n)d.isAlive()&&(t==null||t.forEachSpannedColumn(d.rowNode,(c,u)=>{if(r.has(u.firstNode))return;const h=i.get(u.firstNode);if(h){r.set(u.firstNode,h),i.delete(u.firstNode);return}l=!0;const g=new Hy(u.firstNode,this.beans,!1,!1,!1);r.set(u.firstNode,g)}));this[o]=r;const a=r.size===s;if(!(!l&&a)){for(const d of i.values())d.destroyFirstPass(!0),d.destroySecondPass();this.dispatchLocalEvent({type:"spannedRowsUpdated",ctrlsKey:e})}}getAllRelevantRowControls(e){const{rowRenderer:t}=this.beans;switch(e){case"top":return t.topRowCtrls;case"bottom":return t.bottomRowCtrls;case"center":return t.allRowCtrls}}getCellByPosition(e){const{rowSpanSvc:t}=this.beans,o=t==null?void 0:t.getCellSpanByPosition(e);if(!o)return;const i=`${md(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")}},md=e=>e??"center",By=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}},_y=class extends F{constructor(e){super(),this.column=e}buildCache(e){var S;const{column:t,beans:{gos:o,pinnedRowModel:i,rowModel:s,valueSvc:n,pagination:r}}=this,{colDef:l}=t,a=this[`${e}ValueNodeMap`],d=new Map,c=o.getCallback("isFullWidthRow"),u=l.equals,h=l.spanRows,g=typeof h=="function";let p=null,f=null,C;const m=(w,y)=>{p=w,f=null,C=y},b=w=>{const y=!w.isExpandable()&&!w.group&&!w.detail&&(c?!c({rowNode:w}):!0);if(w.rowIndex==null||!y){m(null,null);return}if(p==null||w.level!==p.level||w.footer||f&&w.rowIndex-1!==(f==null?void 0:f.getLastNode().rowIndex)){m(w,n.getValue(t,w));return}const R=n.getValue(t,w);if(g){const P=V(o,{valueA:C,nodeA:p,valueB:R,nodeB:w,column:t,colDef:l});if(!h(P)){m(w,R);return}}else if(u?!u(C,R):C!==R){m(w,R);return}if(!f){const P=a==null?void 0:a.get(p);(P==null?void 0:P.firstNode)===p?(P.reset(),f=P):f=new By(t,p),d.set(p,f)}f.addSpannedNode(w),d.set(w,f)};switch(e){case"center":(S=s.forEachDisplayedNode)==null||S.call(s,w=>{(!r||r.isRowInPage(w.rowIndex))&&b(w)});break;case"top":i==null||i.forEachPinnedRow("top",b);break;case"bottom":i==null||i.forEachPinnedRow("bottom",b);break}this[`${e}ValueNodeMap`]=d}isCellSpanning(e){return!!this.getCellSpan(e)}getCellSpan(e){return this[`${md(e.rowPinned)}ValueNodeMap`].get(e)}},Ny=class extends F{constructor(){super(...arguments),this.beanName="rowSpanSvc",this.spanningColumns=new Map,this.debouncePinnedEvent=ve(this,this.dispatchCellsUpdatedEvent.bind(this,!0),0),this.debounceModelEvent=ve(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 _y(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()}},Vy={moduleName:"CellSpan",version:H,beans:[Ny,Oy]},Wy=class extends F{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);Ys(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 V(this.beans.gos,{value:o,data:i.data,node:i,colDef:t,column:e,rowIndex:i.rowIndex})}},zy=class extends F{constructor(){super(...arguments),this.beanName="cellStyles"}processAllCellClasses(e,t,o,i){Ys(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 Wy(e,t)}processStaticCellClasses(e,t,o){this.getStaticCellClasses(e,t).forEach(s=>{o(s)})}},$y={moduleName:"CellStyle",version:H,beans:[zy]},Uy={moduleName:"RowStyle",version:H,beans:[Pg]};function Ky(e,t){var o;return!!((o=e.colHover)!=null&&o.isHovered(t))}var jy=class extends F{constructor(e,t){super(),this.columns=e,this.element=t,this.destroyManagedListeners=[],this.enableFeature=o=>{const{beans:i,gos:s,element:n,columns:r}=this,l=i.colHover;o??!!s.get("columnHoverHighlight")?this.destroyManagedListeners=this.addManagedElementListeners(n,{mouseover:l.setMouseOver.bind(l,r),mouseout:l.clearMouseOver.bind(l)}):(this.destroyManagedListeners.forEach(d=>d()),this.destroyManagedListeners=[])}}postConstruct(){this.addManagedPropertyListener("columnHoverHighlight",({currentValue:e})=>{this.enableFeature(e)}),this.enableFeature()}destroy(){super.destroy(),this.destroyManagedListeners=null}},qy="ag-column-hover",Yy=class extends F{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(qy,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 jy(t,o))}updateState(e){this.selectedColumns=e,this.eventSvc.dispatchEvent({type:"columnHoverChanged"})}},Zy={moduleName:"ColumnHover",version:H,beans:[Yy],apiFunctions:{isColumnHovered:Ky}},Xy=class extends F{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,l)=>{Po.has(r)&&t(r,l)},i=(r,l)=>{Po.has(r)||t(r,l)};this.globalListenerPairs.set(e,{syncListener:o,asyncListener:i});const s=this.eventSvc;s.addGlobalListener(o,!1),s.addGlobalListener(i,!0)}removeGlobalListener(e){const{eventSvc:t,wrapSvc:o,globalListenerPairs:i}=this,s=(o==null?void 0:o.unwrapGlobal(e))??e;if(i.has(s)){const{syncListener:r,asyncListener:l}=i.get(s);t.removeGlobalListener(r,!1),t.removeGlobalListener(l,!0),i.delete(e)}else this.syncGlobalListeners.delete(s),t.removeGlobalListener(s,!1)}destroyEventListeners(e,t){e.forEach((o,i)=>{o.forEach(s=>this.eventSvc.removeEventListener(i,s,t)),o.clear()}),e.clear()}destroyGlobalListeners(e,t){e.forEach(o=>this.eventSvc.removeGlobalListener(o,t)),e.clear()}destroy(){super.destroy(),this.destroyEventListeners(this.syncListeners,!1),this.destroyEventListeners(this.asyncListeners,!0),this.destroyGlobalListeners(this.syncGlobalListeners,!1);const{globalListenerPairs:e,eventSvc:t}=this;e.forEach(({syncListener:o,asyncListener:i})=>{t.removeGlobalListener(o,!1),t.removeGlobalListener(i,!0)}),e.clear()}};function Qy(e,t,o){var i;(i=e.apiEventSvc)==null||i.addEventListener(t,o)}function Jy(e,t,o){var i;(i=e.apiEventSvc)==null||i.removeEventListener(t,o)}function eR(e,t){var o;(o=e.apiEventSvc)==null||o.addGlobalListener(t)}function tR(e,t){var o;(o=e.apiEventSvc)==null||o.removeGlobalListener(t)}var oR={moduleName:"EventApi",version:H,apiFunctions:{addEventListener:Qy,addGlobalListener:eR,removeEventListener:Jy,removeGlobalListener:tR},beans:[Xy]},iR={moduleName:"Locale",version:H,beans:[vb]},sR=class extends F{constructor(){super(...arguments),this.beanName="rowAutoHeight",this.wasEverActive=!1,this._debouncedCalculateRowHeights=ve(this,this.calculateRowHeights.bind(this),1)}requestCheckAutoHeight(){this.wasEverActive&&this._debouncedCalculateRowHeights()}calculateRowHeights(){var l,a,d,c;const{visibleCols:e,rowModel:t,rowSpanSvc:o,pinnedRowModel:i}=this.beans,s=e.autoHeightCols;let n=!1;const r=u=>{var p;const h=u.__autoHeights;let g=Qe(this.beans,u).height;for(const f of s){let C=h==null?void 0:h[f.getColId()];const m=o==null?void 0:o.getCellSpan(f,u);if(m){if(m.getLastNode()!==u)continue;if(C=(p=o==null?void 0:o.getCellSpan(f,u))==null?void 0:p.getLastNodeAutoHeight(),!C)return}if(C==null){if(this.colSpanSkipCell(f,u))continue;return}g=Math.max(C,g)}g!==u.rowHeight&&(u.setRowHeight(g),n=!0)};(l=i==null?void 0:i.forEachPinnedRow)==null||l.call(i,"top",r),(a=i==null?void 0:i.forEachPinnedRow)==null||a.call(i,"bottom",r),(d=t.forEachDisplayedNode)==null||d.call(t,r),n&&((c=t.onRowHeightChanged)==null||c.call(t))}setRowAutoHeight(e,t,o){if(e.__autoHeights??(e.__autoHeights={}),t==null){delete e.__autoHeights[o.getId()];return}const i=e.__autoHeights[o.getId()];e.__autoHeights[o.getId()]=t,i!==t&&this.requestCheckAutoHeight()}colSpanSkipCell(e,t){const{colModel:o,colViewport:i,visibleCols:s}=this.beans;if(!o.colSpanActive)return!1;let n=[];switch(e.getPinned()){case"left":n=s.getLeftColsForRow(t);break;case"right":n=s.getRightColsForRow(t);break;case null:n=i.getColsWithinViewport(t);break}return!n.includes(e)}setupCellAutoHeight(e,t,o){if(!e.column.isAutoHeight()||!t)return!1;this.wasEverActive=!0;const i=t.parentElement,{rowNode:s,column:n}=e,r=this.beans,l=c=>{var b;if((b=this.beans.editSvc)!=null&&b.isEditing(e)||!e.isAlive()||!o.isAlive())return;const{paddingTop:u,paddingBottom:h,borderBottomWidth:g,borderTopWidth:p}=ct(i),f=u+h+g+p,m=t.offsetHeight+f;if(c<5){const S=re(r),w=!S||!S.contains(t),y=m==0;if(w||y){window.setTimeout(()=>l(c+1),0);return}}this.setRowAutoHeight(s,m,n)},a=()=>l(0);a();const d=ut(r,t,a);return o.addDestroyFunc(()=>{d(),this.setRowAutoHeight(s,void 0,n)}),!0}setAutoHeightActive(e){this.active=e.list.some(t=>t.isVisible()&&t.isAutoHeight())}areRowsMeasured(){if(!this.active)return!0;const e=this.beans.rowRenderer.getAllRowCtrls();let t=null;for(const{rowNode:o}of e)if((!t||this.beans.colModel.colSpanActive)&&(t=this.beans.colViewport.getColsWithinViewport(o).filter(s=>s.isAutoHeight())),t.length!==0){if(!o.__autoHeights)return!1;for(const i of t){const s=o.__autoHeights[i.getColId()];if(!s||o.rowHeight<s)return!1}}return!0}},nR={moduleName:"RowAutoHeight",version:H,beans:[sR]},rR=Object.defineProperty,lR=(e,t,o)=>t in e?rR(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,vd=(e,t,o)=>lR(e,typeof t!="symbol"?t+"":t,o);class aR extends F{constructor(){super(...arguments),vd(this,"beanName","selectionColSvc"),vd(this,"columns")}postConstruct(){this.addManagedPropertyListener("rowSelection",t=>{this.onSelectionOptionsChanged(t.currentValue,t.previousValue,_t(t.source))}),this.addManagedPropertyListener("selectionColumnDef",this.updateColumns.bind(this))}addColumns(t){const o=this.columns;o!=null&&(t.list=o.list.concat(t.list),t.tree=o.tree.concat(t.tree),Ru(t))}createColumns(t,o){var i,s,n,r,l,a;const d=()=>{var S;ai(this.beans,(S=this.columns)==null?void 0:S.tree),this.columns=null},c=t.treeDepth,h=((s=(i=this.columns)==null?void 0:i.treeDepth)!=null?s:-1)==c,g=this.generateSelectionCols();if(yu(g,(r=(n=this.columns)==null?void 0:n.list)!=null?r:[])&&h)return;d();const{colGroupSvc:f}=this.beans,C=(l=f==null?void 0:f.findDepth(t.tree))!=null?l:0,m=(a=f==null?void 0:f.balanceTreeForAutoCols(g,C))!=null?a:[];this.columns={list:g,tree:m,treeDepth:C,map:{}},o(S=>{if(!S)return null;const w=S.filter(y=>!Ct(y));return[...g,...w]})}updateColumns(t){var o;const i=_t(t.source);(o=this.columns)==null||o.list.forEach(s=>{const n=this.createSelectionColDef(t.currentValue);s.setColDef(n,null,i),De(this.beans,{state:[{...n,colId:s.getColId()}]},i)})}getColumn(t){var o,i;return(i=(o=this.columns)==null?void 0:o.list.find(s=>Xr(s,t)))!=null?i:null}getColumns(){var t,o;return(o=(t=this.columns)==null?void 0:t.list)!=null?o:null}isSelectionColumnEnabled(){var t,o,i;const{gos:s,beans:n}=this,r=s.get("rowSelection");if(typeof r!="object"||!ht(s))return!1;const l=((i=(o=(t=n.autoColSvc)==null?void 0:t.getColumns())==null?void 0:o.length)!=null?i:0)>0;if(r.checkboxLocation==="autoGroupColumn"&&l)return!1;const a=!!Ht(r),d=Jo(r);return a||d}createSelectionColDef(t){const{gos:o}=this,i=t??o.get("selectionColumnDef"),s=o.get("enableRtl"),{rowSpan:n,spanRows:r,...l}=i??{};return{width:50,resizable:!1,suppressHeaderMenuButton:!0,sortable:!1,suppressMovable:!0,lockPosition:s?"right":"left",comparator(a,d,c,u){const h=c.isSelected(),g=u.isSelected();return h===g?0:h?1:-1},editable:!1,suppressFillHandle:!0,pinned:null,rowSpan:n,...l,colId:jr,chartDataType:"excluded"}}generateSelectionCols(){if(!this.isSelectionColumnEnabled())return[];const t=this.createSelectionColDef(),o=t.colId;this.gos.validateColDef(t,o,!0);const i=new Je(t,null,o,!1);return this.createBean(i),[i]}onSelectionOptionsChanged(t,o,i){const s=o&&typeof o!="string"?Ht(o):void 0,n=t&&typeof t!="string"?Ht(t):void 0,r=s!==n,l=o&&typeof o!="string"?Jo(o):void 0,a=t&&typeof t!="string"?Jo(t):void 0,d=l!==a,c=ei(t),u=ei(o);(r||d||c!==u)&&this.beans.colModel.refreshAll(i)}destroy(){var t;ai(this.beans,(t=this.columns)==null?void 0:t.tree),super.destroy()}refreshVisibility(t,o,i){var s,n;if(!((s=this.columns)!=null&&s.list.length))return;const r=t.length+o.length+i.length;if(r===0)return;const l=this.columns.list[0];if(!l.isVisible())return;const a=()=>{let u;switch(l.pinned){case"left":case!0:u=t;break;case"right":u=i;break;default:u=o}u&&Ee(u,l)};(((n=this.beans.rowNumbersSvc)==null?void 0:n.getColumn(qr))?2:1)===r&&a()}}const Ki="34.1.1";function wd(e){const t=e.get("rowSelection");return typeof t=="object"&&t.masterSelects||"self"}function ji(e){return!!(e.rowPinned&&e.pinnedSibling)}function dR(e,t=!0){const o=e.get("rowSelection");return typeof o!="object"?t?"all":void 0:o.mode==="multiRow"?o.selectAll:"all"}function bd(e,t){return t===void 0?e("ariaIndeterminate","indeterminate"):t===!0?e("ariaChecked","checked"):e("ariaUnchecked","unchecked")}function ye(e,t,o,i){const s=t==="top";if(!o)return ye(e,t,s?e.getPinnedTopRow(0):e.getPinnedBottomRow(0),i);if(!i){const a=s?e.getPinnedTopRowCount():e.getPinnedBottomRowCount();return ye(e,t,o,s?e.getPinnedTopRow(a-1):e.getPinnedBottomRow(a-1))}let n=!1,r=!1;const l=[];return e.forEachPinnedRow(t,a=>{if(a===o&&!n){n=!0,l.push(a);return}if(n&&a===i){r=!0,l.push(a);return}n&&!r&&l.push(a)}),l}function Hn(e){var t;return(t=e==null?void 0:e.hideDisabledCheckboxes)!=null?t:!1}function Sd(e){var t,o;const i=(t=e.get("rowSelection"))!=null?t:"single";if(typeof i=="string"){const s=e.get("suppressRowClickSelection"),n=e.get("suppressRowDeselection");return s&&n?!1:s?"enableDeselection":n?"enableSelection":!0}return(i.mode==="singleRow"||i.mode==="multiRow")&&(o=i.enableClickSelection)!=null?o:!1}function cR(e){const t=Sd(e);return t===!0||t==="enableDeselection"}function uR(e){const t=Sd(e);return t===!0||t==="enableSelection"}function hR(e){var t;const o=e.get("rowSelection");return typeof o=="string"?e.get("rowMultiSelectWithClick"):(t=o==null?void 0:o.enableSelectionWithoutKeys)!=null?t:!1}function gR(e,t){var o;if(!t.nodes.every(l=>l.rowPinned&&!ji(l)?(G(59),!1):l.id===void 0?(G(60),!1):!0))return;const{nodes:s,source:n,newValue:r}=t;(o=e.selectionSvc)==null||o.setNodesSelected({nodes:s,source:n??"api",newValue:r})}function pR(e,t,o="apiSelectAll"){var i;(i=e.selectionSvc)==null||i.selectAllRowNodes({source:o,selectAll:t})}function fR(e,t,o="apiSelectAll"){var i;(i=e.selectionSvc)==null||i.deselectAllRowNodes({source:o,selectAll:t})}function CR(e){var t,o;return(o=(t=e.selectionSvc)==null?void 0:t.getSelectedNodes())!=null?o:[]}function mR(e){var t,o;return(o=(t=e.selectionSvc)==null?void 0:t.getSelectedRows())!=null?o:[]}var vR=Object.defineProperty,wR=(e,t,o)=>t in e?vR(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,qi=(e,t,o)=>wR(e,typeof t!="symbol"?t+"":t,o);const bR={tag:"div",cls:"ag-selection-checkbox",role:"presentation",children:[{tag:"ag-checkbox",ref:"eCheckbox",role:"presentation"}]};class SR extends Y{constructor(){super(bR,[ln]),qi(this,"eCheckbox",A),qi(this,"rowNode"),qi(this,"column"),qi(this,"overrides")}postConstruct(){this.eCheckbox.setPassive(!0)}onDataChanged(){this.onSelectionChanged()}onSelectableChanged(){this.showOrHideSelect()}onSelectionChanged(){const t=this.getLocaleTextFunc(),{rowNode:o,eCheckbox:i}=this,s=o.isSelected(),n=bd(t,s),[r,l]=o.selectable?["ariaRowToggleSelection","Press Space to toggle row selection"]:["ariaRowSelectionDisabled","Row Selection is disabled for this row"],a=t(r,l);i.setValue(s,!0),i.setInputAriaLabel(`${a} (${n})`)}init(t){if(this.rowNode=t.rowNode,this.column=t.column,this.overrides=t.overrides,this.onSelectionChanged(),this.addManagedListeners(this.eCheckbox.getInputElement(),{dblclick:Ot,click:s=>{var n;Ot(s),(n=this.beans.selectionSvc)==null||n.handleSelectionEvent(s,this.rowNode,"checkboxSelected")}}),this.addManagedListeners(this.rowNode,{rowSelected:this.onSelectionChanged.bind(this),dataChanged:this.onDataChanged.bind(this),selectableChanged:this.onSelectableChanged.bind(this)}),this.addManagedPropertyListener("rowSelection",({currentValue:s,previousValue:n})=>{const r=typeof s=="object"?Hn(s):void 0,l=typeof n=="object"?Hn(n):void 0;r!==l&&this.onSelectableChanged()}),Ms(this.gos)||typeof this.getIsVisible()=="function"){const s=this.showOrHideSelect.bind(this);this.addManagedEventListeners({displayedColumnsChanged:s}),this.addManagedListeners(this.rowNode,{dataChanged:s,cellChanged:s}),this.showOrHideSelect()}this.eCheckbox.getInputElement().setAttribute("tabindex","-1")}showOrHideSelect(){const{column:t,rowNode:o,overrides:i,gos:s}=this,n=o.selectable,r=this.getIsVisible();let l;if(typeof r=="function"){const h=i==null?void 0:i.callbackParams;if(!t)l=r({...h,node:o,data:o.data});else{const g=t.createColumnFunctionCallbackParams(o);l=r({...h,...g})}}else l=r??!1;const a=n&&!l||!n&&l,d=n||l,c=s.get("rowSelection"),u=c&&typeof c!="string"?!Hn(c):!!(t!=null&&t.getColDef().showDisabledCheckboxes);if(this.setVisible(d&&(a?u:!0)),this.setDisplayed(d&&(a?u:!0)),d&&this.eCheckbox.setDisabled(a),i!=null&&i.removeHidden){this.setDisplayed(d);return}}getIsVisible(){var t,o;const i=this.overrides;if(i)return i.isVisible;const s=this.gos.get("rowSelection");return s&&typeof s!="string"?Ht(s):(o=(t=this.column)==null?void 0:t.getColDef())==null?void 0:o.checkboxSelection}}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,Yi=(e,t,o)=>RR(e,typeof t!="symbol"?t+"":t,o);class xR{constructor(t,o){this.rowModel=t,this.pinnedRowModel=o,Yi(this,"selectAll",!1),Yi(this,"rootId",null),Yi(this,"endId",null),Yi(this,"cachedRange",[])}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(){var t;if(this.cachedRange.length===0){const o=this.getRoot(),i=this.getEnd();if(o==null||i==null)return this.cachedRange;this.cachedRange=(t=this.getNodesInRange(o,i))!=null?t:[]}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){var i,s,n,r,l,a;const{pinnedRowModel:d,rowModel:c}=this;if(!(d!=null&&d.isManual()))return c.getNodesInRangeForSelection(t,o);if(t.rowPinned==="top"&&!o.rowPinned)return ye(d,"top",t,void 0).concat((i=c.getNodesInRangeForSelection(c.getRow(0),o))!=null?i:[]);if(t.rowPinned==="bottom"&&!o.rowPinned){const u=ye(d,"bottom",void 0,t),h=c.getRowCount(),g=c.getRow(h-1);return((s=c.getNodesInRangeForSelection(o,g))!=null?s:[]).concat(u)}if(!t.rowPinned&&!o.rowPinned)return c.getNodesInRangeForSelection(t,o);if(t.rowPinned==="top"&&o.rowPinned==="top")return ye(d,"top",t,o);if(t.rowPinned==="bottom"&&o.rowPinned==="top"){const u=ye(d,"top",o,void 0),h=ye(d,"bottom",void 0,t),g=c.getRow(0),p=c.getRow(c.getRowCount()-1);return u.concat((n=c.getNodesInRangeForSelection(g,p))!=null?n:[]).concat(h)}if(!t.rowPinned&&o.rowPinned==="top")return ye(d,"top",o,void 0).concat((r=c.getNodesInRangeForSelection(c.getRow(0),t))!=null?r:[]);if(t.rowPinned==="top"&&o.rowPinned==="bottom"){const u=ye(d,"top",t,void 0),h=ye(d,"bottom",void 0,o),g=c.getRow(0),p=c.getRow(c.getRowCount()-1);return u.concat((l=c.getNodesInRangeForSelection(g,p))!=null?l:[]).concat(h)}if(t.rowPinned==="bottom"&&o.rowPinned==="bottom")return ye(d,"bottom",t,o);if(!t.rowPinned&&o.rowPinned==="bottom"){const u=ye(d,"bottom",void 0,o),h=c.getRow(c.getRowCount());return((a=c.getNodesInRangeForSelection(t,h))!=null?a:[]).concat(u)}return null}}var ER=Object.defineProperty,DR=(e,t,o)=>t in e?ER(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,Zi=(e,t,o)=>DR(e,typeof t!="symbol"?t+"":t,o);class FR extends F{constructor(t){super(),this.column=t,Zi(this,"cbSelectAllVisible",!1),Zi(this,"processingEventFromCheckbox",!1),Zi(this,"headerCellCtrl"),Zi(this,"cbSelectAll")}onSpaceKeyDown(t){const o=this.cbSelectAll;o.isDisplayed()&&!o.getGui().contains(ee(this.beans))&&(t.preventDefault(),o.setValue(!o.getValue()))}getCheckboxGui(){return this.cbSelectAll.getGui()}setComp(t){this.headerCellCtrl=t;const o=this.createManagedBean(new Xl);this.cbSelectAll=o,o.addCss("ag-header-select-all"),Ye(o.getGui(),"presentation"),this.showOrHideSelectAll();const i=this.updateStateOfCheckbox.bind(this);this.addManagedEventListeners({newColumnsLoaded:()=>this.showOrHideSelectAll(),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this),selectionChanged:i,paginationChanged:i,modelUpdated:i}),this.addManagedPropertyListener("rowSelection",({currentValue:s,previousValue:n})=>{const r=l=>typeof l=="string"||!l||l.mode==="singleRow"?void 0:l.selectAll;r(s)!==r(n)&&this.showOrHideSelectAll(),this.updateStateOfCheckbox()}),this.addManagedListeners(o,{fieldValueChanged:this.onCbSelectAll.bind(this)}),o.getInputElement().setAttribute("tabindex","-1"),this.refreshSelectAllLabel()}onDisplayedColumnsChanged(t){this.isAlive()&&this.showOrHideSelectAll(t.source==="uiColumnMoved")}showOrHideSelectAll(t=!1){const o=this.isCheckboxSelection();this.cbSelectAllVisible=o,this.cbSelectAll.setDisplayed(o),o&&(this.checkRightRowModelType("selectAllCheckbox"),this.checkSelectionType("selectAllCheckbox"),this.updateStateOfCheckbox()),this.refreshSelectAllLabel(t)}updateStateOfCheckbox(){if(!this.cbSelectAllVisible||this.processingEventFromCheckbox)return;this.processingEventFromCheckbox=!0;const t=this.getSelectAllMode(),o=this.beans.selectionSvc,i=this.cbSelectAll,s=o.getSelectAllState(t);i.setValue(s);const n=o.hasNodesToSelect(t);i.setDisabled(!n),this.refreshSelectAllLabel(),this.processingEventFromCheckbox=!1}refreshSelectAllLabel(t=!1){const o=this.getLocaleTextFunc(),{headerCellCtrl:i,cbSelectAll:s,cbSelectAllVisible:n}=this,r=s.getValue(),l=bd(o,r),a=o("ariaRowSelectAll","Press Space to toggle all rows selection");i.setAriaDescriptionProperty("selectAll",n?`${a} (${l})`:null),s.setInputAriaLabel(o("ariaHeaderSelection","Column with Header Selection")),t||i.announceAriaDescription()}checkSelectionType(t){return po(this.gos)?!0:(G(128,{feature:t}),!1)}checkRightRowModelType(t){const{gos:o,rowModel:i}=this.beans;return de(o)||Xo(o)?!0:(G(129,{feature:t,rowModel:i.getType()}),!1)}onCbSelectAll(){if(this.processingEventFromCheckbox||!this.cbSelectAllVisible)return;const t=this.cbSelectAll.getValue(),o=this.getSelectAllMode();let i="uiSelectAll";o==="currentPage"?i="uiSelectAllCurrentPage":o==="filtered"&&(i="uiSelectAllFiltered");const s={source:i,selectAll:o},n=this.beans.selectionSvc;t?n.selectAllRowNodes(s):n.deselectAllRowNodes(s)}isCheckboxSelection(){const{column:t,gos:o,beans:i}=this,r=typeof o.get("rowSelection")=="object"?"headerCheckbox":"headerCheckboxSelection";return yd(i,t)&&this.checkRightRowModelType(r)&&this.checkSelectionType(r)}getSelectAllMode(){const t=dR(this.gos,!1);if(t)return t;const{headerCheckboxSelectionCurrentPageOnly:o,headerCheckboxSelectionFilteredOnly:i}=this.column.getColDef();return o?"currentPage":i?"filtered":"all"}destroy(){super.destroy(),this.cbSelectAll=void 0,this.headerCellCtrl=void 0}}function yd({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=Ct(o),d=Zr(o);(ei(i)==="autoGroupColumn"&&d||a&&(t!=null&&t.isSelectionColumnEnabled()))&&(r=Jo(i))}else typeof n=="function"?r=n(V(e,{column:o,colDef:s})):r=!!n;return r}var PR=Object.defineProperty,TR=(e,t,o)=>t in e?PR(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,Rd=(e,t,o)=>TR(e,typeof t!="symbol"?t+"":t,o);class IR extends F{constructor(){super(...arguments),Rd(this,"isRowSelectable"),Rd(this,"selectionCtx")}postConstruct(){const{gos:t,beans:o}=this;this.selectionCtx=new xR(o.rowModel,o.pinnedRowModel),this.addManagedPropertyListeners(["isRowSelectable","rowSelection"],()=>{const i=Ms(t);i!==this.isRowSelectable&&(this.isRowSelectable=i,this.updateSelectable())}),this.isRowSelectable=Ms(t),this.addManagedEventListeners({cellValueChanged:i=>this.updateRowSelectable(i.node),rowNodeDataChanged:i=>this.updateRowSelectable(i.node)})}destroy(){super.destroy(),this.selectionCtx.reset()}createCheckboxSelectionComponent(){return new SR}createSelectAllFeature(t){if(yd(this.beans,t))return new FR(t)}isMultiSelect(){return po(this.gos)}onRowCtrlSelected(t,o,i){const s=!!t.rowNode.isSelected();t.forEachGui(i,n=>{n.rowComp.toggleCss("ag-row-selected",s);const r=n.element;ls(r,s),r.contains(ee(this.beans))&&o(n)})}announceAriaRowSelection(t){var o;if(this.isRowSelectionBlocked(t))return;const i=t.isSelected();if(!t.selectable)return;const n=this.getLocaleTextFunc()(i?"ariaRowDeselect":"ariaRowSelect",`Press SPACE to ${i?"deselect":"select"} this row`);(o=this.beans.ariaAnnounce)==null||o.announceValue(n,"rowSelection")}isRowSelectionBlocked(t){return!t.selectable||t.rowPinned&&!ji(t)||!ht(this.gos)}updateRowSelectable(t,o){var i,s;const n=t.rowPinned&&t.pinnedSibling?t.pinnedSibling.selectable:(s=(i=this.isRowSelectable)==null?void 0:i.call(this,t))!=null?s:!0;return this.setRowSelectable(t,n,o),n}setRowSelectable(t,o,i){if(t.selectable!==o){if(t.selectable=o,t.dispatchRowEvent("selectableChanged"),i)return;if(fo(this.gos)){const n=this.calculateSelectedFromChildren(t);this.setNodesSelected({nodes:[t],newValue:n??!1,source:"selectableChanged"});return}t.isSelected()&&!t.selectable&&this.setNodesSelected({nodes:[t],newValue:!1,source:"selectableChanged"})}}calculateSelectedFromChildren(t){var o;let i=!1,s=!1;if(!((o=t.childrenAfterGroup)!=null&&o.length))return t.selectable?t.__selected:null;for(let n=0;n<t.childrenAfterGroup.length;n++){const r=t.childrenAfterGroup[n];let l=r.isSelected();if(!r.selectable){const a=this.calculateSelectedFromChildren(r);if(a===null)continue;l=a}switch(l){case!0:i=!0;break;case!1:s=!0;break;default:return}}if(!(i&&s))return i?!0:s?!1:t.selectable?t.__selected:null}selectRowNode(t,o,i,s="api"){const n=!t.selectable&&o,r=t.__selected===o;if(n||r)return!1;t.__selected=o,t.dispatchRowEvent("rowSelected");const l=t.sibling;l&&l.footer&&l.__localEventService&&l.dispatchRowEvent("rowSelected");const a=t.pinnedSibling;return a&&a.rowPinned&&a.__localEventService&&a.dispatchRowEvent("rowSelected"),this.eventSvc.dispatchEvent({...wg(t,this.gos,"rowSelected"),event:i||null,source:s}),!0}isCellCheckboxSelection(t,o){const i=this.gos.get("rowSelection");if(i&&typeof i!="string"){const s=Ct(t)&&Ht(i);return t.isColumnFunc(o,s)}else return t.isColumnFunc(o,t.colDef.checkboxSelection)}inferNodeSelections(t,o,i,s){const{gos:n,selectionCtx:r}=this,l=t.isSelected(),a=fo(n),d=uR(n),c=cR(n),u=this.isMultiSelect(),h=s==="rowClicked";if(h&&!(d||c))return null;if(o&&i&&u){const g=r.getRoot();if(g)if(g.isSelected()){const p=r.isInRange(t)?r.truncate(t):r.extend(t,a);return{deselect:p.discard,select:p.keep,reset:!1}}else{const p=r.extend(t,a);return{select:[],deselect:p.keep,reset:!1}}else return null}else if(o&&u){const g=r.selectAll?this.beans.rowModel.getRow(0):void 0,p=r.getRoot(g),f=r.isInRange(t)?r.truncate(t):r.extend(t,a);return{select:f.keep,deselect:f.discard,reset:r.selectAll||!!(p&&!p.isSelected())}}else if(i){if(h){const g=!l;return g&&!d||!g&&!c?null:(r.setRoot(t),{node:t,newValue:g,clearSelection:!1})}return r.setRoot(t),{node:t,newValue:!l,clearSelection:!u}}else{r.setRoot(t);const g=hR(n),p=oi(n)==="filteredDescendants",f=h&&(!g||!d);if(p&&l===void 0&&de(n))return{node:t,newValue:!1,clearSelection:!u||f};if(h){const C=l?!g:d;return C===l&&!f||C&&!d||!C&&!c?null:{node:t,newValue:C,clearSelection:!u||f,keepDescendants:t.group&&a}}return{node:t,newValue:!l,clearSelection:!u||f}}}}var MR=Object.defineProperty,AR=(e,t,o)=>t in e?MR(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,Et=(e,t,o)=>AR(e,typeof t!="symbol"?t+"":t,o);class kR extends IR{constructor(){super(...arguments),Et(this,"beanName","selectionSvc"),Et(this,"selectedNodes",new Map),Et(this,"detailSelection",new Map),Et(this,"groupSelectsDescendants"),Et(this,"groupSelectsFiltered"),Et(this,"mode"),Et(this,"masterSelectsDetail",!1)}postConstruct(){super.postConstruct();const{gos:t}=this;this.mode=ti(t),this.groupSelectsDescendants=fo(t),this.groupSelectsFiltered=oi(t)==="filteredDescendants",this.masterSelectsDetail=wd(t)==="detail",this.addManagedPropertyListeners(["groupSelectsChildren","groupSelectsFiltered","rowSelection"],()=>{const o=fo(t),i=ti(t),s=oi(t)==="filteredDescendants";this.masterSelectsDetail=wd(t)==="detail",(o!==this.groupSelectsDescendants||s!==this.groupSelectsFiltered||i!==this.mode)&&(this.deselectAllRowNodes({source:"api"}),this.groupSelectsDescendants=o,this.groupSelectsFiltered=s,this.mode=i)}),this.addManagedEventListeners({rowSelected:this.onRowSelected.bind(this)})}destroy(){super.destroy(),this.resetNodes()}handleSelectionEvent(t,o,i){if(this.isRowSelectionBlocked(o))return 0;const s=this.inferNodeSelections(o,t.shiftKey,t.metaKey||t.ctrlKey,i);return s==null?0:(this.selectionCtx.selectAll=!1,"select"in s?(s.reset?this.resetNodes():this.selectRange(s.deselect,!1,i),this.selectRange(s.select,!0,i)):this.setNodesSelected({nodes:[s.node],newValue:s.newValue,clearSelection:s.clearSelection,keepDescendants:s.keepDescendants,event:t,source:i}))}setNodesSelected({newValue:t,clearSelection:o,suppressFinishActions:i,nodes:s,event:n,source:r,keepDescendants:l=!1}){var a;if(!ht(this.gos)&&t)return G(132),0;if(s.length===0)return 0;if(s.length>1&&!this.isMultiSelect())return G(130),0;let d=0;for(let c=0;c<s.length;c++){const u=s[c],h=to(u),g=this.groupSelectsFiltered&&h.group;if(h.rowPinned&&!ji(h)){G(59);continue}if(h.id===void 0){G(60);continue}g||this.selectRowNode(h,t,n,r)&&(this.detailSelection.delete(h.id),d++),this.groupSelectsDescendants&&((a=h.childrenAfterGroup)!=null&&a.length)&&(d+=this.selectChildren(h,t,r))}return i||(s.length===1&&r==="api"&&this.selectionCtx.setRoot(to(s[0])),t&&(o||!this.isMultiSelect())&&(d+=this.clearOtherNodes(to(s[0]),l,r)),d>0&&(this.updateGroupsFromChildrenSelections(r),this.dispatchSelectionChanged(r))),d}selectRange(t,o,i){let s=0;return t.forEach(n=>{const r=to(n);if(r.group&&this.groupSelectsDescendants)return;this.selectRowNode(r,o,void 0,i)&&s++}),s>0&&(this.updateGroupsFromChildrenSelections(i),this.dispatchSelectionChanged(i)),s}selectChildren(t,o,i){const s=this.groupSelectsFiltered?t.childrenAfterAggFilter:t.childrenAfterGroup;return s?this.setNodesSelected({newValue:o,clearSelection:!1,suppressFinishActions:!0,source:i,nodes:s}):0}getSelectedNodes(){return Array.from(this.selectedNodes.values())}getSelectedRows(){const t=[];return this.selectedNodes.forEach(o=>o.data&&t.push(o.data)),t}getSelectionCount(){return this.selectedNodes.size}filterFromSelection(t){const o=new Map;this.selectedNodes.forEach((i,s)=>{t(i)&&o.set(s,i)}),this.selectedNodes=o}updateGroupsFromChildrenSelections(t,o){if(!this.groupSelectsDescendants)return!1;const{gos:i,rowModel:s}=this.beans;if(!de(i))return!1;const n=s.rootNode;if(!n)return!1;o||(o=new Gi(!0,n),o.active=!1);let r=!1;return o.forEachChangedNodeDepthFirst(l=>{if(l!==n){const a=this.calculateSelectedFromChildren(l);r=this.selectRowNode(l,a===null?!1:a,void 0,t)||r}}),r}clearOtherNodes(t,o,i){const s=new Map;let n=0;return this.selectedNodes.forEach(r=>{const l=r.id==t.id;if((o?!GR(t,r):!0)&&!l){const d=this.selectedNodes.get(r.id);n+=this.setNodesSelected({nodes:[d],newValue:!1,clearSelection:!1,suppressFinishActions:!0,source:i}),this.groupSelectsDescendants&&r.parent&&s.set(r.parent.id,r.parent)}}),s.forEach(r=>{const l=this.calculateSelectedFromChildren(r);this.selectRowNode(r,l===null?!1:l,void 0,i)}),n}onRowSelected(t){const o=t.node;this.groupSelectsDescendants&&o.group||(o.isSelected()?this.selectedNodes.set(o.id,o):this.selectedNodes.delete(o.id))}syncInRowNode(t,o){this.syncInOldRowNode(t,o),this.syncInNewRowNode(t)}createDaemonNode(t){if(!t.id)return;const o=new So(this.beans);return o.id=t.id,o.data=t.data,o.__daemon=!0,o.__selected=t.__selected,o.level=t.level,o}syncInOldRowNode(t,o){o&&t.id!==o.id&&this.selectedNodes.get(o.id)==t&&this.selectedNodes.set(o.id,o)}syncInNewRowNode(t){this.selectedNodes.has(t.id)?(t.__selected=!0,this.selectedNodes.set(t.id,t)):t.__selected=!1}reset(t){const o=this.getSelectionCount();this.resetNodes(),o&&this.dispatchSelectionChanged(t)}resetNodes(){this.selectedNodes.forEach(t=>{this.selectRowNode(t,!1)}),this.selectedNodes.clear()}getBestCostNodeSelection(){const{gos:t,rowModel:o}=this.beans;if(!de(t))return;const i=o.getTopLevelNodes();if(i===null)return;const s=[];function n(r){for(let l=0,a=r.length;l<a;l++){const d=r[l];d.isSelected()?s.push(d):d.group&&d.childrenAfterGroup&&n(d.childrenAfterGroup)}}return n(i),s}isEmpty(){return this.getSelectionCount()===0}deselectAllRowNodes({source:t,selectAll:o}){const i=de(this.gos);let s=!1;const n=r=>{const l=this.selectRowNode(to(r),!1,void 0,t);s||(s=l)};if(o==="currentPage"||o==="filtered"){if(!i){j(102);return}this.getNodesToSelect(o).forEach(n)}else this.selectedNodes.forEach(n),this.reset(t);if(this.selectionCtx.selectAll=!1,i&&this.groupSelectsDescendants){const r=this.updateGroupsFromChildrenSelections(t);s||(s=r)}s&&this.dispatchSelectionChanged(t)}getSelectedCounts(t){let o=0,i=0;return this.getNodesToSelect(t).forEach(s=>{this.groupSelectsDescendants&&s.group||(s.isSelected()?o++:s.selectable&&i++)}),{selectedCount:o,notSelectedCount:i}}getSelectAllState(t){var o;const{selectedCount:i,notSelectedCount:s}=this.getSelectedCounts(t);return(o=xd(i,s))!=null?o:null}hasNodesToSelect(t){return this.getNodesToSelect(t).filter(o=>o.selectable).length>0}getNodesToSelect(t){if(!this.canSelectAll())return[];const o=[],i=n=>o.push(n);if(t==="currentPage")return this.forEachNodeOnPage(n=>{if(!n.group){i(n);return}if(!n.expanded&&!n.footer){const r=l=>{var a;i(l),(a=l.childrenAfterFilter)==null||a.forEach(r)};r(n);return}this.groupSelectsDescendants||i(n)}),o;const s=this.beans.rowModel;return t==="filtered"?(s.forEachNodeAfterFilter(i),o):(s.forEachNode(i),o)}forEachNodeOnPage(t){const{pageBounds:o,rowModel:i}=this.beans,s=o.getFirstRow(),n=o.getLastRow();for(let r=s;r<=n;r++){const l=i.getRow(r);l&&t(l)}}selectAllRowNodes(t){const{gos:o,selectionCtx:i}=this;if(!ht(o)){G(132);return}if(ou(o)&&!po(o)){G(130);return}if(!this.canSelectAll())return;const{source:s,selectAll:n}=t;let r=!1;if(this.getNodesToSelect(n).forEach(l=>{const a=this.selectRowNode(to(l),!0,void 0,s);r||(r=a)}),i.selectAll=!0,de(o)&&this.groupSelectsDescendants){const l=this.updateGroupsFromChildrenSelections(s);r||(r=l)}r&&this.dispatchSelectionChanged(s)}getSelectionState(){return this.isEmpty()?null:Array.from(this.selectedNodes.keys())}setSelectionState(t,o,i){if(t||(t=[]),!Array.isArray(t)){j(103);return}const s=new Set(t),n=[];this.beans.rowModel.forEachNode(r=>{s.has(r.id)&&n.push(r)}),i&&this.resetNodes(),this.setNodesSelected({newValue:!0,nodes:n,source:o})}canSelectAll(){const{gos:t}=this.beans;return!!de(t)}updateSelectable(t){var o;const{gos:i,rowModel:s}=this.beans;if(!ht(i))return;const n="selectableChanged",r=t!==void 0,l=de(i)&&this.groupSelectsDescendants,a=[],d=c=>{var u,h;if(r&&!c.group)return;if(l&&c.group){const p=(h=(u=c.childrenAfterGroup)==null?void 0:u.some(f=>f.selectable))!=null?h:!1;this.setRowSelectable(c,p,!0);return}!this.updateRowSelectable(c,!0)&&c.isSelected()&&a.push(c)};if(l){if(t===void 0){const c=s.rootNode;t=c?new Gi(!1,c):void 0}t==null||t.forEachChangedNodeDepthFirst(d,!r,!r)}else s.forEachNode(d);a.length&&this.setNodesSelected({nodes:a,newValue:!1,source:n}),!r&&l&&((o=this.updateGroupsFromChildrenSelections)==null||o.call(this,n))}updateSelectableAfterGrouping(t){var o;this.updateSelectable(t),this.groupSelectsDescendants&&((o=this.updateGroupsFromChildrenSelections)!=null&&o.call(this,"rowGroupChanged",t))&&this.dispatchSelectionChanged("rowGroupChanged")}refreshMasterNodeState(t,o){var i,s,n;if(!this.masterSelectsDetail)return;const r=(s=(i=t.detailNode)==null?void 0:i.detailGridInfo)==null?void 0:s.api;if(!r)return;const l=LR(r);if(t.isSelected()!==l&&this.selectRowNode(t,l,o,"masterDetail")&&this.dispatchSelectionChanged("masterDetail"),!l){const d=(n=this.detailSelection.get(t.id))!=null?n:new Set;for(const c of r.getSelectedNodes())d.add(c.id);this.detailSelection.set(t.id,d)}}setDetailSelectionState(t,o,i){if(this.masterSelectsDetail){if(!po(o)){G(269);return}switch(t.isSelected()){case!0:{i.selectAll();break}case!1:{i.deselectAll();break}case void 0:{const s=this.detailSelection.get(t.id);if(s){const n=[];for(const r of s){const l=i.getRowNode(r);l&&n.push(l)}i.setNodesSelected({nodes:n,newValue:!0,source:"masterDetail"})}break}}}}dispatchSelectionChanged(t){this.eventSvc.dispatchEvent({type:"selectionChanged",source:t,selectedNodes:this.getSelectedNodes(),serverSideState:null})}}function to(e){return ji(e)?e.pinnedSibling:e.footer?e.sibling:e}function LR(e){let t=0,o=0;return e.forEachNode(i=>{i.isSelected()?t++:i.selectable&&o++}),xd(t,o)}function xd(e,t){if(e===0&&t===0)return!1;if(!(e>0&&t>0))return e>0}function GR(e,t){let o=t.parent;for(;o;){if(o===e)return!0;o=o.parent}return!1}const HR={moduleName:"RowSelection",version:Ki,rowModels:["clientSide","infinite","viewport"],beans:[kR],dependsOn:[{moduleName:"SharedRowSelection",version:Ki,beans:[aR],apiFunctions:{setNodesSelected:gR,selectAll:pR,deselectAll:fR,getSelectedNodes:CR,getSelectedRows:mR}}]};var OR=Object.defineProperty,BR=(e,t,o)=>t in e?OR(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,On=(e,t,o)=>BR(e,typeof t!="symbol"?t+"":t,o);const _R="ROOT_NODE_ID";class NR extends F{constructor(){super(...arguments),On(this,"nextId",0),On(this,"allNodesMap",{}),On(this,"rootNode",null)}getRowNode(t){return this.allNodesMap[t]}extractRowData(){var t,o;return(o=(t=this.rootNode)==null?void 0:t.allLeafChildren)==null?void 0:o.map(i=>i.data)}activate(t){this.rootNode=t,t.group=!0,t.level=-1,t.id=_R,t.allLeafChildren=[],t.childrenAfterGroup=[],t.childrenAfterSort=[],t.childrenAfterAggFilter=[],t.childrenAfterFilter=[],this.updateRootSiblingArrays(t)}deactivate(){this.rootNode&&(this.allNodesMap={},this.rootNode=null)}destroy(){super.destroy(),this.allNodesMap={},this.rootNode=null}setNewRowData(t){const o=this.rootNode;o&&(this.dispatchRowDataUpdateStartedEvent(t),o.childrenAfterFilter=null,o.childrenAfterGroup=null,o.childrenAfterAggFilter=null,o.childrenAfterSort=null,o.childrenMapped=null,o.updateHasChildren(),this.allNodesMap={},this.nextId=0,this.loadNewRowData(t),this.updateRootSiblingArrays(o))}updateRootSiblingArrays(t){const o=t.sibling;o&&(o.childrenAfterFilter=t.childrenAfterFilter,o.childrenAfterGroup=t.childrenAfterGroup,o.childrenAfterAggFilter=t.childrenAfterAggFilter,o.childrenAfterSort=t.childrenAfterSort,o.childrenMapped=t.childrenMapped,o.allLeafChildren=t.allLeafChildren)}loadNewRowData(t){var o;this.rootNode.allLeafChildren=(o=t==null?void 0:t.map((i,s)=>this.createRowNode(i,s)))!=null?o:[]}setImmutableRowData(t,o){var i;const s=Qo(this.gos),n=!this.gos.get("suppressMaintainUnsortedOrder"),r=t.changedRowNodes,l=new Set,a=this.rootNode,d=a.allLeafChildren,c=d.length;let u=!1,h=!1,g=!1,p=!1;for(let C=0,m=-1,b=o.length;C<b;C++){const S=o[C];let w=this.getRowNode(s({data:S,level:0}));if(!w)u=!0,w=this.createRowNode(S,-1),r.add(w);else{if(n){const y=w.sourceRowIndex;p||(p=y<=m||u),m=y}w.data!==S&&(g=!0,w.updateData(S),r.update(w))}l.add(w)}const f=[];for(let C=0;C<c;C++){const m=d[C];l.has(m)||(h=!0,m.isSelected()&&f.push(m),m.pinnedSibling&&((i=this.beans.pinnedRowModel)==null||i.pinRow(m.pinnedSibling,null)),this.rowNodeDeleted(m),r.remove(m))}if(u||h||p){const C=new Array(l.size);let m=0;if(!n)for(let S=0;S<c;++S){const w=d[S];l.delete(w)&&(w.sourceRowIndex=m,C[m++]=w)}for(const S of l)S.sourceRowIndex=m,C[m++]=S;a.allLeafChildren=C;const b=a.sibling;b&&(b.allLeafChildren=C),t.rowNodesOrderChanged||(t.rowNodesOrderChanged=p)}(u||h||p||g)&&(this.deselectNodes(f),t.rowDataUpdated=!0)}rowNodeDeleted(t){t.clearRowTopAndRowIndex();const o=t.id,i=this.allNodesMap;i[o]===t&&delete i[o]}updateRowData(t,o){this.dispatchRowDataUpdateStartedEvent(t.add);const i={changedRowNodes:o,rowNodeTransaction:{remove:[],update:[],add:[]},rowsInserted:!1},s=[],n=Qo(this.gos);return this.executeRemove(n,t,i,s),this.executeUpdate(n,t,i,s),this.executeAdd(t,i),this.deselectNodes(s),i}executeAdd(t,o){const i=t.add;if(!(i!=null&&i.length))return;let s=this.rootNode.allLeafChildren,n=s.length;if(typeof t.addIndex=="number"&&(n=this.sanitizeAddIndex(t.addIndex),n>0&&this.gos.get("treeData")&&this.gos.get("getDataPath")))for(let h=0;h<s.length;h++){const g=s[h];if((g==null?void 0:g.rowIndex)==n-1){n=h+1;break}}const r=i.length,l=o.changedRowNodes,a=new Array(r);for(let u=0;u<r;u++){const h=this.createRowNode(i[u],n+u);l.add(h),a[u]=h}const d=this.rootNode;if(n<s.length){const u=s.slice(0,n),h=s.slice(n,s.length),g=u.length+a.length;for(let p=0,f=h.length;p<f;++p)h[p].sourceRowIndex=g+p;s=[...u,...a,...h],o.rowsInserted=!0}else s=s.concat(a);d.allLeafChildren=s;const c=d.sibling;c&&(c.allLeafChildren=s),o.rowNodeTransaction.add=a}executeRemove(t,o,{changedRowNodes:i,rowNodeTransaction:s},n){var r,l,a;const{remove:d}=o;if(!(d!=null&&d.length))return;const c={};d.forEach(g=>{var p;const f=this.lookupRowNode(t,g);f&&(f.isSelected()&&n.push(f),f.pinnedSibling&&((p=this.beans.pinnedRowModel)==null||p.pinRow(f.pinnedSibling,null)),f.clearRowTopAndRowIndex(),c[f.id]=!0,delete this.allNodesMap[f.id],s.remove.push(f),i.remove(f))});const u=this.rootNode;u.allLeafChildren=(l=(r=u.allLeafChildren)==null?void 0:r.filter(g=>!c[g.id]))!=null?l:null,(a=u.allLeafChildren)==null||a.forEach((g,p)=>{g.sourceRowIndex=p});const h=u.sibling;h&&(h.allLeafChildren=u.allLeafChildren)}executeUpdate(t,o,{changedRowNodes:i,rowNodeTransaction:s},n){const{update:r}=o;r!=null&&r.length&&r.forEach(l=>{const a=this.lookupRowNode(t,l);a&&(a.updateData(l),!a.selectable&&a.isSelected()&&n.push(a),s.update.push(a),i.update(a))})}dispatchRowDataUpdateStartedEvent(t){this.eventSvc.dispatchEvent({type:"rowDataUpdateStarted",firstRowData:t!=null&&t.length?t[0]:null})}deselectNodes(t){var o,i;const s="rowDataChanged",n=this.beans.selectionSvc,r=t.length>0;r&&(n==null||n.setNodesSelected({newValue:!1,nodes:t,suppressFinishActions:!0,source:s})),(o=n==null?void 0:n.updateGroupsFromChildrenSelections)==null||o.call(n,s),r&&this.eventSvc.dispatchEvent({type:"selectionChanged",source:s,selectedNodes:(i=n==null?void 0:n.getSelectedNodes())!=null?i:null,serverSideState:null})}sanitizeAddIndex(t){var o,i;const s=(i=(o=this.rootNode.allLeafChildren)==null?void 0:o.length)!=null?i:0;return t<0||t>=s||Number.isNaN(t)?s:Math.ceil(t)}createRowNode(t,o){const i=new So(this.beans);return i.parent=this.rootNode,i.level=0,i.group=!1,i.expanded=!1,i.sourceRowIndex=o,i.setDataAndId(t,String(this.nextId)),this.allNodesMap[i.id]&&G(2,{nodeId:i.id}),this.allNodesMap[i.id]=i,this.nextId++,i}lookupRowNode(t,o){var i,s;let n;if(t){const r=t({data:o,level:0});if(n=this.allNodesMap[r],!n)return j(4,{id:r}),null}else if(n=(s=(i=this.rootNode)==null?void 0:i.allLeafChildren)==null?void 0:s.find(r=>r.data===o),!n)return j(5,{data:o}),null;return n||null}}var VR=Object.defineProperty,WR=(e,t,o)=>t in e?VR(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,zR=(e,t,o)=>WR(e,t+"",o);class $R extends NR{constructor(){super(...arguments),zR(this,"beanName","csrmNodeSvc")}}var UR=Object.defineProperty,KR=(e,t,o)=>t in e?UR(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,Bn=(e,t,o)=>KR(e,typeof t!="symbol"?t+"":t,o);class _n{constructor(){Bn(this,"removals",new Set),Bn(this,"updates",new Set),Bn(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 jR(e){e.sibling&&(e.sibling.childrenAfterFilter=e.childrenAfterFilter)}var qR=Object.defineProperty,YR=(e,t,o)=>t in e?qR(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,Nn=(e,t,o)=>YR(e,typeof t!="symbol"?t+"":t,o);function ZR(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 Ed(e){e.sibling&&(e.sibling.childrenAfterSort=e.childrenAfterSort),ZR(e)}class XR extends F{constructor(){super(...arguments),Nn(this,"beanName","sortStage"),Nn(this,"refreshProps",new Set(["postSortRows","groupDisplayType","accentedSort"])),Nn(this,"step","sort")}execute(t){const o=this.beans,i=o.sortSvc.getSortOptions(),s=L(i)&&i.length>0,n=s&&!!t.changedRowNodes&&this.gos.get("deltaSort"),r=i.some(({column:l})=>Me(o.gos)?l.isPrimary()&&l.isRowGroupActive():!!l.getColDef().showRowGroup);this.sort(o,i,s,n,t.changedRowNodes,t.changedPath,r)}sort(t,o,i,s,n,r,l){const{gos:a,colModel:d,rowGroupColsSvc:c,rowNodeSorter:u,rowRenderer:h,showRowGroupCols:g}=t,p=a.get("groupMaintainOrder"),f=d.getCols().some(w=>w.isRowGroupActive()),C=d.isPivotMode(),m=a.getCallback("postSortRows");let b=!1;const S=w=>{var y,R;const P=C&&w.leafGroup,M=p&&f&&!w.leafGroup&&!l;let I;if(M){const D=(y=c==null?void 0:c.columns)==null?void 0:y[w.level+1],T=(D==null?void 0:D.getSort())===null,k=w.childrenAfterAggFilter.slice(0);if(w.childrenAfterSort&&!T){const O={};w.childrenAfterSort.forEach((W,$)=>{O[W.id]=$}),k.sort((W,$)=>{var Q,X;return((Q=O[W.id])!=null?Q:0)-((X=O[$.id])!=null?X:0)})}I=k}else!i||P?I=w.childrenAfterAggFilter.slice(0):s&&n?I=QR(u,w,n,r,o):I=w.childrenAfterAggFilter.slice(0);if(b||(b=((R=w.childrenAfterSort)==null?void 0:R[0])!==I[0]),w.childrenAfterSort=I,Ed(w),m){const D={nodes:w.childrenAfterSort};m(D)}};if(r==null||r.forEachChangedNodeDepthFirst(S),b&&this.gos.get("groupHideOpenParents")){const w=g==null?void 0:g.getShowRowGroupCols();w!=null&&w.length&&h.refreshCells({columns:w,force:!0})}}}function QR(e,t,o,i,s){const n=t.childrenAfterAggFilter,r=t.childrenAfterSort;if(!r)return e.doFullSort(n,s);const l=new Set,a=[],{updates:d,adds:c}=o;for(let h=0,g=n.length;h<g;++h){const p=n[h];d.has(p)||c.has(p)||i&&!i.canSkip(p)?a.push({currentPos:a.length,rowNode:p}):l.add(p.id)}const u=r.filter(h=>l.has(h.id)).map((h,g)=>({currentPos:g,rowNode:h}));return a.sort((h,g)=>e.compareRowNodes(s,h,g)),JR(e,s,a,u)}function JR(e,t,o,i){const s=[];let n=0,r=0;const l=o.length,a=i.length;for(;n<l&&r<a;){const d=o[n],c=i[r],u=e.compareRowNodes(t,d,c);let h;u<0?(h=d,++n):(h=c,++r),s.push(h.rowNode)}for(;n<l;)s.push(o[n++].rowNode);for(;r<a;)s.push(i[r++].rowNode);return s}var e0=Object.defineProperty,t0=(e,t,o)=>t in e?e0(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,te=(e,t,o)=>t0(e,typeof t!="symbol"?t+"":t,o);class o0 extends F{constructor(){super(...arguments),te(this,"beanName","rowModel"),te(this,"colModel"),te(this,"valueCache"),te(this,"filterStage"),te(this,"sortStage"),te(this,"flattenStage"),te(this,"groupStage"),te(this,"aggStage"),te(this,"pivotStage"),te(this,"filterAggStage"),te(this,"rootNode",null),te(this,"rowsToDisplay",[]),te(this,"nodeManager"),te(this,"rowDataTransactionBatch"),te(this,"rowDataUpdatedPending",!1),te(this,"applyAsyncTransactionsTimeout"),te(this,"started",!1),te(this,"isRefreshingModel",!1),te(this,"rowNodesCountReady",!1),te(this,"rowCountReady",!1),te(this,"orderedStages"),te(this,"onRowHeightChanged_debounced",ve(this,this.onRowHeightChanged.bind(this),100))}wireBeans(t){this.colModel=t.colModel,this.valueCache=t.valueCache,this.filterStage=t.filterStage,this.sortStage=t.sortStage,this.flattenStage=t.flattenStage,this.groupStage=t.groupStage,this.aggStage=t.aggStage,this.pivotStage=t.pivotStage,this.filterAggStage=t.filterAggStage}postConstruct(){this.orderedStages=[this.groupStage,this.filterStage,this.pivotStage,this.aggStage,this.sortStage,this.filterAggStage,this.flattenStage].filter(s=>!!s);const t=this.refreshModel.bind(this,{step:"group"}),o=this.refreshModel.bind(this,{step:"group",afterColumnsChanged:!0,keepRenderedRows:!0,animate:!this.gos.get("suppressAnimationFrame")});this.addManagedEventListeners({newColumnsLoaded:o,columnRowGroupChanged:t,columnValueChanged:this.onValueChanged.bind(this),columnPivotChanged:this.refreshModel.bind(this,{step:"pivot"}),filterChanged:this.onFilterChanged.bind(this),sortChanged:this.onSortChanged.bind(this),columnPivotModeChanged:t,gridStylesChanged:this.onGridStylesChanges.bind(this),gridReady:this.onGridReady.bind(this)}),this.addPropertyListeners(),this.rootNode=new So(this.beans);const i=this.getNewNodeManager();this.nodeManager=i,i.activate(this.rootNode)}getNewNodeManager(){const{gos:t,beans:o}=this;return lu(t)==="treeNested"&&o.csrmChildrenTreeNodeSvc||o.csrmNodeSvc}addPropertyListeners(){const t=["treeData","treeDataChildrenField",...this.orderedStages.flatMap(({refreshProps:o})=>[...o])];this.addManagedPropertyListeners(t,o=>{var i;const s=(i=o.changeSet)==null?void 0:i.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(t,o,i,s){let n,r=!1;do{n=!1;const l=this.getRowIndexAtPixel(t),a=this.getRowIndexAtPixel(o),d=Math.max(l,i),c=Math.min(a,s);for(let u=d;u<=c;u++){const h=this.getRow(u);if(h.rowHeightEstimated){const g=Qe(this.beans,h);h.setRowHeight(g.height),n=!0,r=!0}}n&&this.setRowTopAndRowIndex()}while(n);return r}onPropChange(t){var o;if(!this.rootNode)return;const i=this.gos,s=new Set(t),n={step:"nothing",changedProps:s},r=s.has("rowData"),l=this.nodeManager,a=this.getNewNodeManager(),d=l!==a||r&&s.has("treeData")&&i.get("treeData")||s.has("treeDataChildrenField")&&i.get("treeData");let c;if((d||r)&&(c=i.get("rowData"),c!=null&&!Array.isArray(c)&&(c=null,G(1))),d&&(r||(c=(o=l==null?void 0:l.extractRowData())!=null?o:c),l!==a&&(l==null||l.deactivate(),this.nodeManager=a),a.activate(this.rootNode)),c)if(!d&&!this.isEmpty()&&c.length>0&&i.exists("getRowId")&&!i.get("resetRowDataOnUpdate"))n.keepRenderedRows=!0,n.animate=!this.gos.get("suppressAnimationFrame"),n.changedRowNodes=new _n,a.setImmutableRowData(n,c);else{n.rowDataUpdated=!0,n.newData=!0;const{selectionSvc:h,pinnedRowModel:g}=this.beans;h==null||h.reset("rowDataChanged"),g!=null&&g.isManual()&&g.reset(),this.rowNodesCountReady=!0,a.setNewRowData(c)}if(n.rowDataUpdated)n.step="group";else if(n.step==="nothing"){for(const{refreshProps:u,step:h}of this.orderedStages)if(t.some(g=>u.has(g))){n.step=h;break}}n.step!=="nothing"&&this.refreshModel(n)}setRowTopAndRowIndex(){const{beans:t,rowsToDisplay:o}=this,i=t.environment.getDefaultRowHeight();let s=0;const n=new Set,r=le(this.gos,"normal");for(let l=0,a=o.length;l<a;++l){const d=o[l];if(d.id!=null&&n.add(d.id),d.rowHeight==null){const c=Qe(t,d,r,i);d.setRowHeight(c.height,c.estimated)}d.setRowTop(s),d.setRowIndex(l),s+=d.rowHeight}return n}clearRowTopAndRowIndex(t,o){const i=t.active,s=r=>{r&&r.id!=null&&!o.has(r.id)&&r.clearRowTopAndRowIndex()},n=r=>{if(r!==null&&(s(r),s(r.detailNode),s(r.sibling),r.hasChildren()&&r.childrenAfterGroup)){const l=r.level==-1;i&&!l&&!r.expanded||r.childrenAfterGroup.forEach(n)}};n(this.rootNode)}isLastRowIndexKnown(){return!0}getRowCount(){return this.rowsToDisplay?this.rowsToDisplay.length:0}getTopLevelRowCount(){const t=this.rootNode;if(!t||this.rowsToDisplay.length===0)return 0;if(this.rowsToDisplay&&this.rowsToDisplay[0]===t)return 1;const i=t.childrenAfterSort,s=t.sibling&&t.sibling.displayed?1:0;return(i?i.length:0)+s}getTopLevelRowDisplayedIndex(t){const{rootNode:o,rowsToDisplay:i}=this;if(!o||!i.length||i[0]===o)return t;const{childrenAfterSort:n}=o,r=a=>{let d=n[a];if(this.gos.get("groupHideOpenParents"))for(;d.expanded&&d.childrenAfterSort&&d.childrenAfterSort.length>0;)d=d.childrenAfterSort[0];return d.rowIndex},{footerSvc:l}=this.beans;return l?l.getTopDisplayIndex(i,t,n,r):r(t)}getTopLevelIndexFromDisplayedIndex(t){var o;const{rootNode:i,rowsToDisplay:s}=this;if(!i||!s.length||s[0]===i)return t;let r=this.getRow(t);for(r.footer&&(r=r.sibling);r.parent&&r.parent!==i;)r=r.parent;const l=(o=i.childrenAfterSort)==null?void 0:o.findIndex(a=>a===r);return l===-1?t:l??t}getRowBounds(t){const o=this.rowsToDisplay[t];return o?{rowTop:o.rowTop,rowHeight:o.rowHeight}:null}onRowGroupOpened(){const t=Gt(this.gos);this.refreshModel({step:"map",keepRenderedRows:!0,animate:t})}onFilterChanged(t){if(t.afterDataChange)return;const o=Gt(this.gos),s=t.columns.length===0||t.columns.some(n=>n.isPrimary())?"filter":"filter_aggregates";this.refreshModel({step:s,keepRenderedRows:!0,animate:o})}onSortChanged(){const t=Gt(this.gos);this.refreshModel({step:"sort",keepRenderedRows:!1,animate:t})}getType(){return"clientSide"}onValueChanged(){this.refreshModel({step:this.colModel.isPivotActive()?"pivot":"aggregate"})}createChangePath(t){const o=new Gi(!1,this.rootNode);return t||(o.active=!1),o}isSuppressModelUpdateAfterUpdateTransaction(t){if(!this.gos.get("suppressModelUpdateAfterUpdateTransaction"))return!1;const{changedRowNodes:o,newData:i,rowDataUpdated:s}=t;return!(!o||i||!s||o.removals.size||o.adds.size)}refreshModel(t){var o,i,s,n;if(!this.rootNode)return;const r=this.beans;let l=!!t.rowDataUpdated;const a=(o=t.changedPath)!=null?o:t.changedPath=this.createChangePath(!t.newData&&l);if(this.started&&l&&this.eventSvc.dispatchEvent({type:"rowDataUpdated"}),this.rowDataUpdatedPending||(this.rowDataUpdatedPending=l),!this.started||this.isRefreshingModel||this.colModel.changeEventsDispatching||this.isSuppressModelUpdateAfterUpdateTransaction(t))return;switch(this.rowDataUpdatedPending&&(this.rowDataUpdatedPending=!1,t.rowDataUpdated=l=!0),this.isRefreshingModel=!0,(i=r.masterDetailSvc)==null||i.refreshModel(t),l&&t.step!=="group"&&((s=r.colFilter)==null||s.refreshModel()),t.step){case"group":(this.doRowGrouping(t)||l)&&((n=r.colFilter)==null||n.refreshModel()),!this.rowCountReady&&this.rowNodesCountReady&&(this.rowCountReady=!0,this.eventSvc.dispatchEventOnce({type:"rowCountReady"}));case"filter":this.doFilter(a);case"pivot":this.doPivot(a);case"aggregate":this.doAggregate(a);case"filter_aggregates":this.doFilterAggregates(a);case"sort":this.doSort(t.changedRowNodes,a);case"map":this.doRowsToDisplay()}const d=this.setRowTopAndRowIndex();this.clearRowTopAndRowIndex(a,d),this.isRefreshingModel=!1,this.eventSvc.dispatchEvent({type:"modelUpdated",animate:t.animate,keepRenderedRows:t.keepRenderedRows,newData:t.newData,newPage:!1,keepUndoRedoStack:t.keepUndoRedoStack})}isEmpty(){var t,o,i;return!((o=(t=this.rootNode)==null?void 0:t.allLeafChildren)!=null&&o.length)||!((i=this.colModel)!=null&&i.ready)}isRowsToRender(){return this.rowsToDisplay.length>0}getNodesInRangeForSelection(t,o){let i=!1,s=!1;const n=[],r=fo(this.gos);return this.forEachNodeAfterFilterAndSort(l=>{if(s)return;if(i&&(l===o||l===t)&&(s=!0,l.group&&r)){n.push(...l.allLeafChildren);return}if(!i){if(l!==o&&l!==t)return;i=!0}if(!l.group||!r){n.push(l);return}}),n}getTopLevelNodes(){var t,o;return(o=(t=this.rootNode)==null?void 0:t.childrenAfterGroup)!=null?o:null}getRow(t){return this.rowsToDisplay[t]}isRowPresent(t){return this.rowsToDisplay.indexOf(t)>=0}getRowIndexAtPixel(t){const o=this.rowsToDisplay;if(this.isEmpty()||o.length===0)return-1;let i=0,s=o.length-1;if(t<=0)return 0;if(U(o).rowTop<=t)return o.length-1;let r=-1,l=-1;for(;;){const a=Math.floor((i+s)/2),d=o[a];if(this.isRowInPixel(d,t)||(d.rowTop<t?i=a+1:d.rowTop>t&&(s=a-1),r===i&&l===s))return a;r=i,l=s}}isRowInPixel(t,o){const i=t.rowTop,s=t.rowTop+t.rowHeight;return i<=o&&s>o}forEachLeafNode(t){var o,i;(i=(o=this.rootNode)==null?void 0:o.allLeafChildren)==null||i.forEach((s,n)=>t(s,n))}forEachNode(t,o=!1){this.depthFirstSearchRowNodes(t,o)}forEachDisplayedNode(t){this.rowsToDisplay.forEach(t)}forEachNodeAfterFilter(t,o=!1){this.depthFirstSearchRowNodes(t,o,i=>i.childrenAfterAggFilter)}forEachNodeAfterFilterAndSort(t,o=!1){this.depthFirstSearchRowNodes(t,o,i=>i.childrenAfterSort)}forEachPivotNode(t,o=!1,i=!1){const{colModel:s,rowGroupColsSvc:n}=this.beans;if(!s.isPivotMode())return;if(!(n!=null&&n.columns.length)){t(this.rootNode,0);return}const r=i?"childrenAfterSort":"childrenAfterGroup";this.depthFirstSearchRowNodes(t,o,l=>l.leafGroup?null:l[r])}depthFirstSearchRowNodes(t,o=!1,i=r=>r.childrenAfterGroup,s=this.rootNode,n=0){var r,l;let a=n;if(!s)return a;const d=s===this.rootNode;d||t(s,a++);const{footerSvc:c}=this.beans;if(s.hasChildren()&&!s.footer){const u=i(s);if(u){a=(r=c==null?void 0:c.addTotalRows(a,s,t,o,d,"top"))!=null?r:a;for(const h of u)a=this.depthFirstSearchRowNodes(t,o,i,h,a);return(l=c==null?void 0:c.addTotalRows(a,s,t,o,d,"bottom"))!=null?l:a}}return a}doAggregate(t){var o;const i=this.rootNode;i&&((o=this.aggStage)==null||o.execute({rowNode:i,changedPath:t}))}doFilterAggregates(t){const o=this.rootNode;this.filterAggStage?this.filterAggStage.execute({rowNode:o,changedPath:t}):o.childrenAfterAggFilter=o.childrenAfterFilter}doSort(t,o){this.sortStage?this.sortStage.execute({rowNode:this.rootNode,changedRowNodes:t,changedPath:o}):o.forEachChangedNodeDepthFirst(i=>{i.childrenAfterSort=i.childrenAfterAggFilter.slice(0),Ed(i)})}doRowGrouping(t){var o;const i=this.rootNode,s=(o=this.groupStage)==null?void 0:o.execute({rowNode:i,changedRowNodes:t.changedRowNodes,changedPath:t.changedPath,rowNodesOrderChanged:!!t.rowNodesOrderChanged,afterColumnsChanged:!!t.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(t){this.filterStage?this.filterStage.execute({rowNode:this.rootNode,changedPath:t}):t.forEachChangedNodeDepthFirst(o=>{o.childrenAfterFilter=o.childrenAfterGroup,jR(o)},!0)}doPivot(t){var o;(o=this.pivotStage)==null||o.execute({rowNode:this.rootNode,changedPath:t})}getRowNode(t){var o;const i=this.nodeManager.getRowNode(t);return typeof i=="object"?i:typeof t=="string"&&t.indexOf(Vs)===0?(o=this.groupStage)==null?void 0:o.getNode(t):void 0}batchUpdateRowData(t,o){if(this.applyAsyncTransactionsTimeout==null){this.rowDataTransactionBatch=[];const i=this.gos.get("asyncTransactionWaitMillis");this.applyAsyncTransactionsTimeout=window.setTimeout(()=>{this.isAlive()&&this.executeBatchUpdateRowData()},i)}this.rowDataTransactionBatch.push({rowDataTransaction:t,callback:o})}flushAsyncTransactions(){this.applyAsyncTransactionsTimeout!=null&&(clearTimeout(this.applyAsyncTransactionsTimeout),this.executeBatchUpdateRowData())}executeBatchUpdateRowData(){var t,o;(t=this.valueCache)==null||t.onDataChanged();const i=[],s=[],n=new _n;let r=!1;(o=this.rowDataTransactionBatch)==null||o.forEach(l=>{this.rowNodesCountReady=!0;const{rowNodeTransaction:a,rowsInserted:d}=this.nodeManager.updateRowData(l.rowDataTransaction,n);d&&(r=!0),s.push(a),l.callback&&i.push(l.callback.bind(null,a))}),this.commitTransactions(r,n),i.length>0&&window.setTimeout(()=>{i.forEach(l=>l())},0),s.length>0&&this.eventSvc.dispatchEvent({type:"asyncTransactionsFlushed",results:s}),this.rowDataTransactionBatch=null,this.applyAsyncTransactionsTimeout=void 0}updateRowData(t){var o;(o=this.valueCache)==null||o.onDataChanged(),this.rowNodesCountReady=!0;const i=new _n,{rowNodeTransaction:s,rowsInserted:n}=this.nodeManager.updateRowData(t,i);return this.commitTransactions(n,i),s}commitTransactions(t,o){this.refreshModel({step:"group",rowDataUpdated:!0,rowNodesOrderChanged:t,keepRenderedRows:!0,animate:!this.gos.get("suppressAnimationFrame"),changedRowNodes:o,changedPath:this.createChangePath(!0)})}doRowsToDisplay(){var t;const{flattenStage:o,rootNode:i}=this;let s;if(o)s=o.execute({rowNode:i});else{s=(t=i==null?void 0:i.childrenAfterSort)!=null?t:[];for(const n of s)n.setUiLevel(0)}this.rowsToDisplay=s}onRowHeightChanged(){this.refreshModel({step:"map",keepRenderedRows:!0,keepUndoRedoStack:!0})}resetRowHeights(){const t=this.rootNode;if(!t)return;const o=this.resetRowHeightsForAllRowNodes();t.setRowHeight(t.rowHeight,!0),t.sibling&&t.sibling.setRowHeight(t.sibling.rowHeight,!0),o&&this.onRowHeightChanged()}resetRowHeightsForAllRowNodes(){let t=!1;return this.forEachNode(o=>{o.setRowHeight(o.rowHeight,!0);const i=o.detailNode;i&&i.setRowHeight(i.rowHeight,!0),o.sibling&&o.sibling.setRowHeight(o.sibling.rowHeight,!0),t=!0}),t}onGridStylesChanges(t){var o;if(t.rowHeightChanged){if((o=this.beans.rowAutoHeight)!=null&&o.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=Ur,this.rowsToDisplay=Ur}onRowHeightChangedDebounced(){this.onRowHeightChanged_debounced()}}function i0(e){var t;(t=e.expansionSvc)==null||t.onGroupExpandedOrCollapsed()}function s0(e,t){const o=Oe(e);o&&((!t||t==="everything")&&(t="group"),o.refreshModel({step:t,keepRenderedRows:!0,animate:!e.gos.get("suppressAnimationFrame")}))}function n0(e){var t,o;return(o=(t=Oe(e))==null?void 0:t.isEmpty())!=null?o:!0}function r0(e,t){var o;(o=Oe(e))==null||o.forEachLeafNode(t)}function l0(e,t){var o;(o=Oe(e))==null||o.forEachNodeAfterFilter(t)}function a0(e,t){var o;(o=Oe(e))==null||o.forEachNodeAfterFilterAndSort(t)}function d0(e){var t,o;if((t=e.rowAutoHeight)!=null&&t.active){G(3);return}(o=Oe(e))==null||o.resetRowHeights()}function c0(e,t){return e.frameworkOverrides.wrapIncoming(()=>{var o;return(o=Oe(e))==null?void 0:o.updateRowData(t)})}function u0(e,t,o){e.frameworkOverrides.wrapIncoming(()=>{var i;return(i=Oe(e))==null?void 0:i.batchUpdateRowData(t,o)})}function h0(e){e.frameworkOverrides.wrapIncoming(()=>{var t;return(t=Oe(e))==null?void 0:t.flushAsyncTransactions()})}function g0(e){var t;return(t=e.selectionSvc)==null?void 0:t.getBestCostNodeSelection()}const p0={moduleName:"ClientSideRowModel",version:Ki,rowModels:["clientSide"],beans:[$R,o0,XR],dependsOn:[Ka]},f0={moduleName:"ClientSideRowModelApi",version:Ki,apiFunctions:{onGroupExpandedOrCollapsed:i0,refreshClientSideRowModel:s0,isRowDataEmpty:n0,forEachLeafNode:r0,forEachNodeAfterFilter:l0,forEachNodeAfterFilterAndSort:a0,resetRowHeights:d0,applyTransaction:c0,applyTransactionAsync:u0,flushAsyncTransactions:h0,getBestCostNodeSelection:g0},dependsOn:[NS]},Dd=e=>{const t=e.getColumnState().filter(i=>i.sort!=null),o={};return t.forEach((i,s)=>o[i.colId]=s),t.sort((i,s)=>{const n=i.sortIndex,r=s.sortIndex;if(n!=null&&r!=null)return n-r;if(n==null&&r==null){const l=o[i.colId],a=o[s.colId];return l>a?1:-1}else return r==null?-1:1}),t},C0=e=>{const t=Dd(e),o=new Map;return t.forEach((i,s)=>{o.set(i.colId,s)}),o},m0=(e,t)=>{var o;return(o=C0(e).get(t))!=null?o:-1};var v0=Object.defineProperty,w0=(e,t,o)=>t in e?v0(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,oo=(e,t,o)=>w0(e,typeof t!="symbol"?t+"":t,o);const b0=e=>!!e&&(typeof e=="object"||typeof e=="function")&&typeof e.then=="function";class Fd{constructor(t,o){oo(this,"loading",!1),oo(this,"dataGetter"),oo(this,"cache"),oo(this,"_api"),oo(this,"loadingDelay"),oo(this,"getSorts",()=>Dd(this.api).map(i=>({colId:i.colId,sort:i.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.loading=!1}getRows(t){var o,i,s,n,r,l,a,d;if(this.loading||!this._api){(i=(o=t.context)==null?void 0:o.resolve)==null||i.call(o);return}if(this.cache.isFinished&&t.pageNum!==1){(n=(s=t.context)==null?void 0:s.resolve)==null||n.call(s);return}if(this.loading=!0,N.isFunction(this.dataGetter)){const c=this.dataGetter({startRow:t.startRow,endRow:t.endRow,pageNum:t.pageNum,pageSize:t.pageSize,params:t.filterModel,sorts:this.getSorts()});b0(c)&&(this.loadingDelay=setTimeout(()=>{this.api.setGridOption("loading",!0)},500),c.then(u=>{var h,g;t.successCallback(u,u.length),(g=(h=t.context)==null?void 0:h.resolve)==null||g.call(h)}).catch(u=>{var h,g;t.failCallback(),(g=(h=t.context)==null?void 0:h.reject)==null||g.call(h,u)}).finally(()=>{clearTimeout(this.loadingDelay),this.api.setGridOption("loading",!1),this.loadData()})),N.isArray(c)&&(t.successCallback(c,c.length),this.loadData(),(l=(r=t.context)==null?void 0:r.resolve)==null||l.call(r))}else t.successCallback(this.dataGetter,this.dataGetter.length),this.loadData(),(d=(a=t.context)==null?void 0:a.resolve)==null||d.call(a)}}const Dt=Symbol("grid-context");class Pd{static isGroupColDef(t){return!!t.children}}class ko{static getComponentDefinition(t,o){let i;return typeof t=="string"?i=this.searchForComponentInstance(o,t):i={extends:v.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=ko.getComponentDefinition(t,i);if(!n)return;const{vm:r,destroy:l,el:a}=this.mount(n,{params:Object.freeze(o)},i,s||{});return{componentInstance:r,element:a,destroy:l}}static mount(t,o,i,s){let n=new v({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||{}},render(l){return l(t,{props:o})}});return n.$mount(),{vm:n,destroy:()=>{n&&(n.$destroy(),n=null)},el:n.$el}}static searchForComponentInstance(t,o,i=10,s=!1){let n=null,r=0,l=t.proxy.$parent;for(;!n&&l&&l.components&&++r<i;)l.components&&l.components[o]&&(n=l.components[o]),l=l.$parent;for(r=0,l=t.proxy.$parent;!n&&l&&l.$options&&++r<i;){const a=l;a.$options&&a.$options.components&&a.$options.components[o]?n=a.$options.components[o]:a[o]&&(n=a[o]),l=l.$parent}for(r=0,l=t.proxy.$parent;!n&&l&&++r<i;){if(l.exposed){const a=l;a.exposed&&a.exposed[o]?n=a.exposed[o]:a[o]&&(n=a[o])}l=l.$parent}return n||v.options&&v.options.components&&v.options.components[o]&&(n=v.options.components[o]),!n&&!s?(j(114,{component:o}),null):n}}var S0=Object.defineProperty,y0=(e,t,o)=>t in e?S0(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,Lo=(e,t,o)=>y0(e,typeof t!="symbol"?t+"":t,o);class R0 extends Sb{constructor(t,o){super(),Lo(this,"parent"),Lo(this,"provides"),this.parent=t,this.provides=o}createWrapper(t){const o=this;class i extends x0{init(r){super.init(r)}hasMethod(r){return s.getFrameworkComponentInstance()[r]}callMethod(r,l){var a,d;const c=this.getFrameworkComponentInstance(),u=s.getFrameworkComponentInstance();if(u[r])return u[r].apply(c,l);{const h=((a=c.$.exposed)==null?void 0:a[r])||((d=c.exposed)==null?void 0:d[r])||c.$.setupState[r];return h==null?void 0:h.apply(c,l)}}addMethod(r,l){s[r]=l}processMethod(r,l){return r==="refresh"&&(this.getFrameworkComponentInstance().params=l[0]),this.hasMethod(r)?this.callMethod(r,l):r==="refresh"}createComponent(r){return o.createComponent(t,r)}}const s=new i;return s}createComponent(t,o){return ko.createAndMountComponent(t,o,this.parent,this.provides)}createMethodProxy(t,o,i){return function(){return t.hasMethod(o)?t.callMethod(o,arguments):(i&&G(233,{methodName:o}),null)}}destroy(){this.parent=null}}class x0{constructor(){Lo(this,"componentInstance"),Lo(this,"element"),Lo(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 E0=Object.defineProperty,D0=(e,t,o)=>t in e?E0(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,F0=(e,t,o)=>D0(e,t+"",o);class P0 extends ra{constructor(t){super("vue"),F0(this,"parent"),this.parent=t}frameworkComponent(t,o){let i=ko.searchForComponentInstance(this.parent,t,10,!0)?t:null;if(!i&&o&&o[t]){const s=o[t];i=ko.searchForComponentInstance(this.parent,s,10,!0)?s:null}return i}isFrameworkComponent(t){return typeof t=="object"}}function T0(){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 I0=(e,t)=>{let o;return()=>{const i=function(){e()};window.clearTimeout(o),o=window.setTimeout(i,t)}};function M0(e){return e&&e.constructor&&e.constructor.toString().substring(0,5)==="class"}function Go(e){const t=o=>M0(o)?v.toRaw(o):Array.isArray(o)?o.map(i=>t(i)):v.isRef(o)||v.isReactive(o)||v.isProxy(o)?t(v.toRaw(o)):o;return t(e)}const A0=v.defineComponent({__name:"AgGridVue",props:v.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},T0()),emits:["update:modelValue"],setup(e,{expose:t,emit:o}){const i=e,s=v.ref(),n=v.ref(void 0),r=v.ref(!1),l=v.ref(!1),a=v.ref(!1),d=v.ref({}),c=v.ref(null),u=v.toRefs(i);Pn().filter(I=>I!="gridOptions").forEach(I=>{v.watch(()=>u[I],(D,T)=>{(I==="rowData"&&!f.value||I!=="rowData")&&P(I,D),f.value=!1},{deep:!0})});const h=new Set(["rowDataUpdated","cellValueChanged","rowValueChanged"]),g=v.ref(i.modelValue),p=v.ref(!1),f=v.ref(!1);v.watch(()=>i.modelValue,I=>{g.value=I}),v.watch(g,(I,D)=>{r.value&&(f.value||(p.value=!0,P("rowData",Go(I),Go(D))),f.value=!1)},{deep:!0});const C=I0(()=>{f.value=!0,o("update:modelValue",y())},10),m=v.getCurrentInstance(),b=I=>{var D;a.value&&h.has(I)&&(D=m==null?void 0:m.proxy)!=null&&D.$props["onUpdate:modelValue"]&&C()},S=()=>{var I;(i.rowData||(I=i.gridOptions)!=null&&I.rowData)&&g.value&&G(232)},w=()=>{var I;return g.value||i.rowData||((I=i.gridOptions)==null?void 0:I.rowData)},y=()=>{const I=[];return n==null||n.value.forEachLeafNode(D=>{I.push(D.data)}),I},R=I=>D=>{if(l.value)return;D==="gridReady"&&(a.value=!0);const T=Po.has(D);T&&!I||!T&&I||h.has(D)&&(p.value||b(D),p.value=!1)},P=(I,D,T)=>{if(r.value){let k=D.value||D;I==="rowData"&&k!=null&&(k=Go(k)),d.value[I]=k,c.value==null&&(c.value=window.setTimeout(()=>{c.value=null,ru(d.value,n.value),d.value={}},0))}},M=()=>Object.create(v.getCurrentInstance().proxy._provided);return v.onMounted(()=>{Wt(fd,void 0,!0);const I=new R0(v.getCurrentInstance(),M()),D={globalListener:R(),globalSyncListener:R(!0),frameworkOverrides:new P0(v.getCurrentInstance()),providedBeanInstances:{frameworkCompWrapper:I},modules:i.modules},T=v.markRaw(nu(Go(i.gridOptions),i,[...Pn(),...Object.values(_i)])),k=w();k!==void 0&&(T.rowData=Go(k)),n.value=pb(s.value,T,D),r.value=!0}),v.onUnmounted(()=>{var I;r.value&&((I=n==null?void 0:n.value)==null||I.destroy(),l.value=!0)}),t({api:n}),{__sfc:!0,props:i,rootRef:s,api:n,gridCreated:r,isDestroyed:l,gridReadyFired:a,batchChanges:d,batchTimeout:c,propsAsRefs:u,ROW_DATA_EVENTS:h,rowDataModel:g,rowDataUpdating:p,emittingRowData:f,emits:o,emitRowModel:C,thisInstance:m,updateModelIfUsed:b,checkForBindingConflicts:S,getRowDataBasedOnBindings:w,getRowData:y,globalEventListenerFactory:R,processChanges:P,getProvides:M}}});function ue(e,t,o,i,s,n,r,l){var a=typeof e=="function"?e.options:e;return t&&(a.render=t,a.staticRenderFns=o,a._compiled=!0),n&&(a._scopeId="data-v-"+n),{exports:e,options:a}}var k0=function(){var t=this,o=t._self._c;return t._self._setupProxy,o("div",{ref:"rootRef"})},L0=[],G0=ue(A0,k0,L0,!1,null,"60566900");const Td=G0.exports;var H0=Object.defineProperty,O0=(e,t,o)=>t in e?H0(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,st=(e,t,o)=>O0(e,typeof t!="symbol"?t+"":t,o);class Xi{constructor(t,o,i,s,n){st(this,"id"),st(this,"field"),st(this,"value"),st(this,"index"),st(this,"properties",new Map),st(this,"parent"),st(this,"spanRow",1),st(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=N.get(this.value,t);let r;if(N.isArray(n)&&i.getColDef().cellDataType!=="native"){r=new Array(n.length);for(let l=0;l<n.length;l++)r[l]=new Xi(`${this.id}_${l}`,t,n[l],l,o)}else r=new Xi(this.id,t,n,void 0,o);return this.properties.set(t,r),r}isNeedSpan(){return Array.from(this.properties.values()).some(t=>N.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(N.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())N.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())N.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}${N.isNumber(o.index)?`[${o.index}]`:""}`),o=o.parent;return t.reverse().slice(1).join(".")}isArrayElement(){return this.path.endsWith("]")}}var B0=Object.defineProperty,_0=(e,t,o)=>t in e?B0(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,Id=(e,t,o)=>_0(e,typeof t!="symbol"?t+"":t,o);const Md=class uc{constructor(t,o){Id(this,"cellSpanCache",new Map),this.cellSpanCache=new Map;for(const i of t)this.calcSpanInfo(i.id,i,o)}get(t,o){var i;return(i=this.cellSpanCache.get(this.getKey(t,o)))!=null?i:0}set(t,o,i){this.cellSpanCache.set(this.getKey(t,o),i)}getKey(t,o){return`${t}${uc.SPLITTER}${o.getColId()}`}calcSpanInfo(t,o,i){if(!o)return;const s=`${t}|${o.getPath()}`;if(!(this.cellSpanCache.has(t)||this.cellSpanCache.has(o.id))){t!==o.id&&this.cellSpanCache.set(`${o.id}`,o.spanRow),this.cellSpanCache.set(`${s}`,o.spanRow);for(const[n,r]of o.properties.entries())if(!N.isArray(r))this.cellSpanCache.set(`${t}|${r.getPath()}`,r.spanRow),this.processDeep(t,r);else if(r.length===0){const l=o.getPath()+"."+n,a=i.filter(d=>d.getColId().startsWith(l));for(const d of a)this.cellSpanCache.set(`${t}|${d.getColId()}`,o.spanRow)}o.parent&&this.calcSpanInfo(t,o.parent,i)}}processDeep(t,o){o.properties.forEach(i=>{N.isArray(i)||(this.cellSpanCache.set(`${t}|${i.getPath()}`,i.spanRow),this.processDeep(t,i))})}};Id(Md,"SPLITTER","|");let N0=Md;var V0=Object.defineProperty,W0=(e,t,o)=>t in e?V0(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,Ad=(e,t,o)=>W0(e,typeof t!="symbol"?t+"":t,o);class Vn{constructor(t,o){Ad(this,"actualRow"),Ad(this,"id"),this.actualRow=o,this.id=t}delete(){this.actualRow.delete()}redraw(){this.actualRow.redraw()}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.id.split("_").slice(1).map(t=>parseInt(t))}getSignature(){return this.actualRow.getSignature()}getId(){return this.actualRow.getId()}getCell(t){return this.actualRow.getCell(t,this.getNestingIndexes())}isTransient(){return this.actualRow.isTransient()}setData(t){this.actualRow.setData(t)}buildSpan(){this.actualRow.buildSpan()}match(t){return t.data.getId()===this.actualRow.getId()}}var z0=Object.defineProperty,$0=(e,t,o)=>t in e?z0(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,Qi=(e,t,o)=>$0(e,typeof t!="symbol"?t+"":t,o);class kd{constructor(t,o,i=!1){Qi(this,"actualRow"),Qi(this,"draft"),Qi(this,"transient"),Qi(this,"idMapper"),this.actualRow=t,this.transient=i,this.idMapper=o,this.draft=v.reactive(N.cloneDeep(this.actualRow.data))}delete(){this.actualRow.delete()}redraw(){this.actualRow.redraw()}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}getData(){return this.draft}isTransient(){return this.transient}getCell(t,o){return this.actualRow.getCell(t,o)}__setIndex(t){this.actualRow.__setIndex(t)}stopEditing(t=!1){const o=new Ld(v.toRaw(this.draft),this.actualRow.gridApi,this.idMapper,this.actualRow.dataCache,this.actualRow.index);return o.dataCache.replace(o),t&&o.redraw(),o}isEditing(){return!!this.draft}getDraft(){return this.draft}getId(){return this.actualRow.id}flat(){return this.actualRow.leafCells.map(t=>new Vn(t.id,this))}async persistent(t){const o=await t(N.cloneDeep(this.draft));return this.actualRow.update(this.idMapper(o),o),this.draft=v.reactive(o),this.transient=!1,this}getRowSpans(){return this.actualRow.getRowSpans()}setData(t){this.draft=v.reactive(t)}buildSpan(){this.actualRow.buildSpan()}match(t){return this.actualRow.match(t)}}var U0=Object.defineProperty,K0=(e,t,o)=>t in e?U0(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,Be=(e,t,o)=>K0(e,typeof t!="symbol"?t+"":t,o);class Ld{constructor(t,o,i,s,n){Be(this,"id"),Be(this,"data"),Be(this,"pathCells"),Be(this,"signature"),Be(this,"leafCells"),Be(this,"spanCache"),Be(this,"gridApi"),Be(this,"idMapper"),Be(this,"dataCache"),Be(this,"index"),this.index=n,this.dataCache=s,this.idMapper=i,this.id=i(t),this.data=t,this.signature=os(JSON.stringify(t)),this.gridApi=o,this.buildSpan()}delete(){this.dataCache.remove([this])}redraw(){const t=this.gridApi.getRenderedNodes().filter(o=>o.data.getId()==this.id);this.gridApi.getGridOption("context").reload(),this.gridApi.redrawRows({rowNodes:t})}getDataIndex(){if(this.index===void 0)throw new Error(`row[${this.id}] not ready`);return this.index}getRowSpans(){return this.spanCache}getSignature(){return this.signature}startEditing(t=!1){const o=new kd(this,this.idMapper,!1);return this.dataCache.replace(o),t&&this.redraw(),o}__setIndex(t){this.index=t}update(t,o){this.id=t,this.data=o,this.signature=os(JSON.stringify(o)),this.buildSpan()}isTransient(){return!1}getId(){return this.id}isEditing(){return!1}getData(){return this.data}buildSpan(){const t=new Xi(this.id,"$",this.data),o=new Map,i=this.gridApi.getAllGridColumns();for(const s of i){const n=s.getColId().split(".");let r=t;for(let l=0;l<n.length;l++){const a=n[l];if(!N.isArray(r))r=r.pretreatmentValue(a,r,s);else{const d=[];for(const c of r){const u=c.pretreatmentValue(a,c,s);N.isArray(u)?d.push(...u):d.push(u)}r=d}l===n.length-1&&o.set(s.getColId(),r)}}t.calcSpan(),this.leafCells=this.getLeafCells(t),this.spanCache=new N0(this.leafCells,i),this.pathCells=t.properties}flat(){return this.leafCells.map(t=>new Vn(t.id,this))}getLeafCells(t){return Array.from(t.properties.values()).every(o=>!N.isArray(o)||o.length===0)?[t]:Array.from(t.properties.values()).flatMap(o=>N.isArray(o)?o.flatMap(i=>this.getLeafCells(i)):[])}getCell(t,o){const i=t.getColId().split(".");let s=this.pathCells.get(i.shift());if(!s)return;let n=0;N.isArray(s)&&(s=s[o[n]],n++);let r=s;for(const l of i){if(!r)break;if(!N.isArray(r)){const a=r.get(l);N.isArray(a)?(r=a[o[n]],n=n+1):r=a}}if(r)return r}getValue(t,o){const i=this.getCell(t,o);if(i)return N.get(this.data,i.path)}setData(t){this.update(this.idMapper(t),t)}match(t){return this.getId()===t.data.getId()}}var j0=Object.defineProperty,q0=(e,t,o)=>t in e?j0(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,io=(e,t,o)=>q0(e,typeof t!="symbol"?t+"":t,o);class Y0{constructor(t){io(this,"rows"),io(this,"pageNum",1),io(this,"pageSize",100),io(this,"isFinished",!1),io(this,"idMapper"),io(this,"gridApi"),this.rows=[],this.idMapper=t}createRow(t){return new Ld(t,this.gridApi,this.idMapper,this)}setRows(t){return this.rows=t,this}replace(t){this.rows[t.getDataIndex()]=t}remove(t){const o=new Set(t.map(i=>i.getId()));this.rows=this.rows.filter(i=>!o.has(i.getId())),this.gridApi.getGridOption("context").reload()}getRows(){var t;return(t=this.rows)!=null?t:[]}appendRows(t){if(!this.rows){this.setRows(t);return}this.rows.push(...t)}insertRows(t,o=0){if(!this.rows){this.setRows(t);return}this.rows.splice(o,0,...t)}deleteRows(t){const o=new Set(t.map(i=>N.isString(i)?i:i.getId()));this.rows=this.rows.filter(i=>!o.has(i.getId()))}}var Z0=Object.defineProperty,X0=(e,t,o)=>t in e?Z0(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,nt=(e,t,o)=>X0(e,typeof t!="symbol"?t+"":t,o);class Ho{constructor(t,o,i,s=[]){nt(this,"context"),nt(this,"endRow"),nt(this,"filterModel"),nt(this,"sortModel"),nt(this,"startRow"),nt(this,"dataCache"),nt(this,"pageNum"),nt(this,"pageSize"),this.pageNum=t,this.pageSize=o,this.sortModel=s,this.startRow=(t-1)*o,this.endRow=this.startRow+this.pageSize,this.dataCache=i}static from(t,o,i){const s=o??i.pageSize;return new Ho(t,s,i)}static nextPage(t){return new Ho(t.pageNum+1,t.pageSize,t)}failCallback(){hc.Message.error("表格数据加载失败,请重试")}successCallback(t){(N.isEmpty(t)||t.length<this.pageSize)&&(this.dataCache.isFinished=!0),this.pageNum===1?this.dataCache.setRows((t??[]).map(o=>this.dataCache.createRow(o))):this.dataCache.appendRows((t??[]).map(o=>this.dataCache.createRow(o))),this.dataCache.pageNum=this.pageNum}}const Q0=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}},J0=(e,t,o)=>{var i;const s=(i=v.getCurrentInstance())==null?void 0:i.proxy,n=v.ref(e),r=v.ref(),l=v.ref(!1),a=(f,C)=>{if(n.value)return n.value;const m=C??[];return f?(f&&f.$options.name&&m.push(f.$options.name),a(f==null?void 0:f.$parent,m)):(n.value=os(m==null?void 0:m.join(",")),n.value)},d=f=>{const C=localStorage.getItem(f);if(!(!C||C==="undefined"))return JSON.parse(C)},c=N.debounce(()=>{const f=a(s);localStorage.setItem(f,JSON.stringify(t.value.getColumnState()))},200),u=async()=>{const f=a(s),C=d(f);C&&C.length>0&&(t.value.applyColumnState({state:C,applyOrder:!0}),l.value=!0)},h=()=>N.sumBy(t.value.getAllDisplayedVirtualColumns().map(f=>f.getActualWidth()));return{storeGridState:c,restoreGridState:u,resetGridState:()=>{t.value.applyColumnState({state:r.value,applyOrder:!0})},initGridState:()=>{const f=a(s);if(r.value=t.value.getColumnState(),!localStorage.getItem(`${f}-initial`)){const C=h();o.value>C&&t.value.sizeColumnsToFit()}},isStateInitialized:l}},Ji=e=>{if(e.id)return`${e.id}`.split("_")[0]},ex=(e,t)=>({...e,onCellMouseOver(o){var i;const s=Ji(o.node);t.value.querySelectorAll(`.row_${s}`).forEach(r=>{r.classList.contains("ag-row-hover")||r.classList.add("ag-row-hover")}),(i=e.onCellMouseOver)==null||i.call(e,o)},onRowSelected(o){var i;const s=Ji(o.node),n=o.api.getRenderedNodes().filter(l=>l.id.startsWith(s)),r=o.node.isSelected();n==null||n.forEach(l=>{l.setSelected(!!r)}),(i=e==null?void 0:e.onRowSelected)==null||i.call(e,o)},onCellMouseOut(o){var i;const s=Ji(o.node);t.value.querySelectorAll(`.row_${s}`).forEach(r=>{r.classList.contains("ag-row-hover")&&r.classList.remove("ag-row-hover")}),(i=e.onCellMouseOut)==null||i.call(e,o)},getRowClass(o){var i;const s=(i=e==null?void 0:e.getRowClass)==null?void 0:i.call(e,o),n=[];return s&&(N.isArray(s)?n.push(...s):n.push(s)),n.push(`row_${Ji(o.node)}`),n}});let rt=null;function tx(){return rt!==null}function ox(e){rt&&Hd(),rt=e}function Gd(e){e===rt&&(rt=null)}function Hd(){rt&&(rt.closeMenu(),rt=null)}const Ft={defaultDirection:"br",defaultMinWidth:100,defaultMaxWidth:600,defaultZindex:100,defaultZoom:1,defaultAdjustPadding:{x:0,y:10}};function Oo(e,t){let o=e.offsetTop;return e.offsetParent!=null&&e.offsetParent!=t&&(o-=e.offsetParent.scrollTop,o+=Oo(e.offsetParent,t)),o}function Bo(e,t){let o=e.offsetLeft;return e.offsetParent!=null&&e.offsetParent!=t&&(o-=e.offsetParent.scrollLeft,o+=Bo(e.offsetParent,t)),o}function ix(e,t,o,i){return{x:Bo(e,i)+t,y:Oo(e,i)+o}}const Wn="mx-menu-default-container",sx="mx-menu-container-";let nx=0;function Od(e){const{getContainer:t,zIndex:o}=e;if(t){const s=typeof t=="function"?t():t;if(s){let n=s.getAttribute("id");return n||(n=sx+nx++,s.setAttribute("id",n)),{eleId:n,container:s,isNew:!1}}}let i=document.getElementById(Wn);return i||(i=document.createElement("div"),i.setAttribute("id",Wn),i.setAttribute("class","mx-menu-ghost-host fullscreen"),document.body.appendChild(i)),i.style.zIndex=(o==null?void 0:o.toString())||Ft.defaultZindex.toString(),{eleId:Wn,container:i,isNew:!0}}function rx(e){let t=0;for(let o=0;o<e.length;o++){const i=e.charCodeAt(o);t=(t<<5)-t+i,t|=0}return t}function lx(e){return typeof e=="number"?`${e}px`:e}const Bd=v.defineComponent({props:{vnode:{type:null},data:{type:null,default:null}},setup(e){const{vnode:t,data:o}=v.toRefs(e);return()=>typeof t.value=="function"?t.value(o.value):t.value}});function ax(e,t){const o={...e};return delete o[t],o}var dx=v.defineComponent({name:"Teleport",abstract:!0,props:{to:{type:[String,HTMLElement],required:!0},disabled:Boolean},data:function(){var e={teleported:!1,lastTo:"",rootEl:void 0,originalEl:void 0,dumb:document.createComment(" teleport ")};return Object.preventExtensions(e),e},methods:{onEnter:function(){var e,t;this.rootEl=this._vnode.elm,this.originalEl=this.teleported?(e=this.dumb)===null||e===void 0?void 0:e.parentNode:(t=this.rootEl)===null||t===void 0?void 0:t.parentNode,this.disabled?this.restore():this.telport()},restore:function(){var e;this.teleported&&(this.$vnode.elm=this.rootEl,this.teleported=!1,this.lastTo="",this.originalEl&&(this.rootEl&&this.originalEl.insertBefore(this.rootEl,this.dumb),(e=this.dumb.parentNode)===null||e===void 0||e.removeChild(this.dumb)))},telport:function(){if(!(!this.rootEl||!this.originalEl)){this.teleported||this.originalEl.insertBefore(this.dumb,this.rootEl),this.$vnode.elm=this.dumb,this.teleported=!0;var e;this.to!==this.lastTo&&(e=typeof this.to=="string"?document.querySelector(this.to):this.to),e&&(e.appendChild(this.rootEl),this.lastTo=this.to)}}},mounted:function(){this.onEnter()},updated:function(){this.onEnter()},beforeDestroy:function(){var e,t;(e=this.dumb.parentNode)===null||e===void 0||e.removeChild(this.dumb),(t=this.rootEl)===null||t===void 0||(t=t.parentNode)===null||t===void 0||t.removeChild(this.rootEl)},render:function(e){var t,o=(t=this.$slots.default)===null||t===void 0?void 0:t[0];return o}});function cx(e,t,o,i,s,n,r,l){var a=typeof e=="function"?e.options:e;return{exports:e,options:a}}var ux=cx(dx),_d=ux.exports,hx=Object.defineProperty,gx=(e,t,o)=>t in e?hx(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,Nd=(e,t,o)=>(gx(e,typeof t!="symbol"?t+"":t,o),o);class Vd{constructor(t,o){Nd(this,"x",0),Nd(this,"y",0),this.x=t||0,this.y=o||0}set(t,o){this.x=t,this.y=o}substract(t){this.x-=t.x,this.y-=t.y}}function Wd(e){const{onDown:t,onMove:o,onUp:i}=e,s=new Vd,n=new Vd;let r;function l(d){d.stopPropagation(),n.set(d.x,d.y),n.substract(s),o(s,n,d,r)}function a(d){i(d,r),s.set(0,0),document.removeEventListener("mousemove",l),document.removeEventListener("mouseup",a)}return(d,c)=>t(d,c)?(r=c,s.set(d.x,d.y),document.addEventListener("mousemove",l),document.addEventListener("mouseup",a),d.stopPropagation(),!0):!1}function px(e,t){let o=0;return{start(){o>0&&clearInterval(o),o=setInterval(()=>{o=0,t()},e)},stop(){o>0&&(clearInterval(o),o=0)}}}const _o=[],zd=px(100,()=>{for(const e of _o)e()});function fx(e,t,o,i){let s=0,n=0;function r(){e.value&&(t&&s!==e.value.offsetWidth&&t(e.value.offsetWidth),o&&n!==e.value.offsetHeight&&o(e.value.offsetHeight),s=e.value.offsetWidth,n=e.value.offsetHeight)}return{startResizeChecker(){zd.start(),_o.push(r)},stopResizeChecker(){const l=_o.indexOf(r);l>=0&&_o.splice(l,1),_o.length===0&&zd.stop()}}}const Cx=v.defineComponent({__name:"ScrollRect",props:{scroll:{type:String,default:"both"},scrollBarAlwaysShow:{type:Boolean,default:!1},scrollBarBackgroundClickable:{type:Boolean,default:!1},height:{type:Number,default:void 0},width:{type:Number,default:void 0},maxHeight:{type:Number,default:void 0},maxWidth:{type:Number,default:void 0},containerClass:{type:String,default:""},containerStyle:{type:null},scrollToStartThreshold:{type:Number,default:50},scrollToEndThreshold:{type:Number,default:50}},emits:["scroll","resized","scrollToStart","scrollToEnd"],setup(e,{expose:t,emit:o}){const i=e,s=v.ref(),n=v.ref(),r=v.ref(),l=v.ref(),a=v.ref(),d=v.ref(),c=v.ref(!1),u=v.computed(()=>i.scroll==="horizontal"||i.scroll==="both"),h=v.computed(()=>i.scroll==="vertical"||i.scroll==="both"),g=v.reactive({show:!1,size:0,sizeRaw:0,pos:0}),p=v.reactive({show:!1,size:0,sizeRaw:0,pos:0});let f=0,C=0,m=0,b=0,S=null;const w={attributes:!0,childList:!0};function y(){if(s.value){if(g.show){const E=s.value.offsetWidth/s.value.scrollWidth;g.sizeRaw=E*s.value.offsetWidth,g.size=E*100,g.pos=s.value.scrollLeft/(s.value.scrollWidth-s.value.offsetWidth)*(100-g.size),E>=1&&(g.show=!1)}if(p.show){const E=s.value.offsetHeight/s.value.scrollHeight;p.sizeRaw=E*s.value.offsetHeight,p.size=E*100,p.pos=s.value.scrollTop/(s.value.scrollHeight-s.value.offsetHeight)*(100-p.size),E>=1&&(p.show=!1)}i.scroll==="vertical"?(i.scrollToStartThreshold&&s.value.scrollTop<=i.scrollToStartThreshold&&o("scrollToStart"),i.scrollToEndThreshold&&s.value.scrollTop>=s.value.scrollHeight-i.scrollToEndThreshold-s.value.offsetHeight&&o("scrollToEnd")):i.scroll==="horizontal"&&(i.scrollToStartThreshold&&s.value.scrollLeft<=i.scrollToStartThreshold&&o("scrollToStart"),i.scrollToEndThreshold&&s.value.scrollLeft>=s.value.scrollWidth-i.scrollToEndThreshold-s.value.offsetWidth&&o("scrollToEnd")),o("scroll",s.value.scrollLeft,s.value.scrollTop)}}function R(E=!1){if(!s.value)return;let B=u.value,z=h.value;const qe=B&&(f!==s.value.scrollWidth||m!==s.value.offsetWidth),qn=h&&(C!==s.value.scrollHeight||b!==s.value.offsetHeight);if(!E&&!qe&&!qn)return;const Pt=window.getComputedStyle(s.value);(Pt.overflow==="hidden"||Pt.overflowX==="hidden")&&(B=!1),(Pt.overflow==="hidden"||Pt.overflowY==="hidden")&&(z=!1),g.show=B,p.show=z,y(),m=s.value.offsetWidth,b=s.value.offsetHeight,f=s.value.scrollWidth,C=s.value.scrollHeight,o("resized",f,C)}const P=140,M=70;function I(E){var B;i.scroll=="horizontal"&&(E.deltaMode==0&&((B=s.value)==null||B.scrollTo({left:s.value.scrollLeft+(E.deltaY>0?P:-P),behavior:"smooth"})),E.preventDefault(),E.stopPropagation())}function D(E){var B;E.deltaMode==0&&((B=s.value)==null||B.scrollTo({left:s.value.scrollLeft+(E.deltaY>0?P:-P),behavior:"smooth"}),E.preventDefault(),E.stopPropagation())}function T(E){var B;E.deltaMode==0&&((B=s.value)==null||B.scrollTo({top:s.value.scrollTop+(E.deltaY>0?M:-M),behavior:"smooth"}),E.preventDefault(),E.stopPropagation())}let k=0,O=0,W=0,$=0;const Q=Wd({onDown(E){return!r.value||!a.value?!1:(k=E.offsetX,O=E.x-E.offsetX-a.value.offsetLeft,E.preventDefault(),c.value=!0,!0)},onMove(E,B,z){s.value&&r.value&&(Pe(z.x-k-O),z.preventDefault(),z.stopPropagation())},onUp(){c.value=!1}}),X=Wd({onDown(E){return!l.value||!d.value?!1:(W=E.offsetY,$=E.y-E.offsetY-d.value.offsetTop,E.preventDefault(),c.value=!0,!0)},onMove(E,B,z){s.value&&l.value&&(_e(z.y-W-$),z.preventDefault(),z.stopPropagation())},onUp(){c.value=!1}});function Re(E){s.value&&(s.value.scrollLeft=E/100*(s.value.scrollWidth-s.value.offsetWidth))}function xe(E){s.value&&(s.value.scrollLeft=E/100*(s.value.scrollHeight-s.value.offsetHeight))}function Pe(E){s.value&&(s.value.scrollLeft=E/(s.value.offsetWidth-g.sizeRaw)*(s.value.scrollWidth-s.value.offsetWidth))}function _e(E){s.value&&(s.value.scrollTop=E/(s.value.offsetHeight-p.sizeRaw)*(s.value.scrollHeight-s.value.offsetHeight))}function K(E){i.scrollBarBackgroundClickable&&Pe(E.offsetX-g.sizeRaw/2)}function oe(E){i.scrollBarBackgroundClickable&&_e(E.offsetY-p.sizeRaw/2)}const{startResizeChecker:Ne,stopResizeChecker:Ve}=fx(s,()=>R(),()=>R());return v.onMounted(()=>{v.nextTick(()=>{setTimeout(()=>R(!0),200),R(!0),Ne(),S=new MutationObserver(()=>R()),S.observe(s.value,w)})}),v.onBeforeUnmount(()=>{Ve(),S&&(S.disconnect(),S=null)}),t({refreshScrollState(){R(!0)},getScrollContainer(){return s.value},scrollTo(E,B){var z;(z=s.value)==null||z.scrollTo(E,B)},scrollToTop(){var E;(E=s.value)==null||E.scrollTo(0,0)},scrollToBottom(){var E;(E=s.value)==null||E.scrollTo(s.value.scrollWidth,s.value.scrollHeight)}}),{__sfc:!0,props:i,emit:o,container:s,scrollrect:n,scrollBarRefX:r,scrollBarRefY:l,scrollBarThumbRefX:a,scrollBarThumbRefY:d,isDragging:c,canScrollX:u,canScrollY:h,scrollBarX:g,scrollBarY:p,lastCalcScrollScrollWidth:f,lastCalcScrollScrollHeight:C,lastCalcScrollWidth:m,lastCalcScrollHeight:b,observer:S,config:w,calcScrollBarPosition:y,calcScroll:R,manualWheelScrollSizeX:P,manualWheelScrollSizeY:M,mouseWheel:I,mouseWheelBarX:D,mouseWheelBarY:T,mouseDragDownInBarX:k,mouseDragDownOutBarAbsX:O,mouseDragDownInBarY:W,mouseDragDownOutBarAbsY:$,thumbDrageHandlerX:Q,thumbDrageHandlerY:X,customScrollX:Re,customScrollY:xe,setScrollLeft:Pe,setScrollTop:_e,scrollbarClickScrollX:K,scrollbarClickScrollY:oe,startResizeChecker:Ne,stopResizeChecker:Ve}}});function mx(e,t,o,i,s,n,r,l){var a=typeof e=="function"?e.options:e;return t&&(a.render=t,a.staticRenderFns=o,a._compiled=!0),{exports:e,options:a}}var vx=function(){var e=this,t=e._self._c,o=e._self._setupProxy;return t("div",{ref:"scrollrect",class:["vue-scroll-rect",e.scrollBarAlwaysShow?"always-show-scrollbar":"",e.scrollBarBackgroundClickable?"background-clickable":"",o.isDragging?"dragging":""],style:{width:e.width?`${e.width}px`:void 0,height:e.height?`${e.height}px`:void 0},on:{wheel:o.mouseWheel}},[t("div",{ref:"container",class:["scroll-content",e.scroll,e.containerClass],style:{maxWidth:e.maxWidth?`${e.maxWidth}px`:void 0,maxHeight:e.maxHeight?`${e.maxHeight}px`:void 0,...e.containerStyle},on:{scroll:o.calcScrollBarPosition}},[e._t("default")],2),o.scrollBarX.show?e._t("scrollBarX",function(){return[t("div",{ref:"scrollBarRefX",staticClass:"scrollbar horizontal",on:{click:o.scrollbarClickScrollX,wheel:o.mouseWheelBarX}},[t("div",{ref:"scrollBarThumbRefX",staticClass:"thumb",style:{left:`${o.scrollBarX.pos}%`,width:`${o.scrollBarX.size}%`},on:{mousedown:o.thumbDrageHandlerX,wheel:o.mouseWheelBarX}})])]},{scrollBarValue:o.scrollBarX,onScroll:o.customScrollX}):e._e(),o.scrollBarY.show?e._t("scrollBarY",function(){return[o.scrollBarY.show?t("div",{ref:"scrollBarRefY",staticClass:"scrollbar vertical",on:{click:o.scrollbarClickScrollY,wheel:o.mouseWheelBarY}},[t("div",{ref:"scrollBarThumbRefY",staticClass:"thumb",style:{top:`${o.scrollBarY.pos}%`,height:`${o.scrollBarY.size}%`},on:{mousedown:o.thumbDrageHandlerY,wheel:o.mouseWheelBarY}})]):e._e()]},{scrollBarValue:o.scrollBarY,onScroll:o.customScrollY}):e._e()],2)},wx=[],bx=mx(Cx,vx,wx);const Sx=bx.exports;function lt(e,t,o,i,s,n,r,l){var a=typeof e=="function"?e.options:e;return t&&(a.render=t,a.staticRenderFns=o,a._compiled=!0),{exports:e,options:a}}const yx={};var Rx=function(){var e=this,t=e._self._c;return t("svg",{staticClass:"mx-checked-mark",attrs:{"aria-hidden":"true",viewBox:"0 0 1024 1024"}},[t("path",{attrs:{d:"M129.3,428.6L52,512l345,372.5l575-620.8l-69.5-75L400.4,718.2L129.3,428.6z"}})])},xx=[],Ex=lt(yx,Rx,xx);const Dx=Ex.exports,Fx={};var Px=function(){var e=this,t=e._self._c;return t("svg",{staticClass:"mx-right-arrow",attrs:{"aria-hidden":"true",viewBox:"0 0 1024 1024"}},[t("path",{attrs:{d:"M307.018 49.445c11.517 0 23.032 4.394 31.819 13.18L756.404 480.18c8.439 8.438 13.181 19.885 13.181 31.82s-4.741 23.38-13.181 31.82L338.838 961.376c-17.574 17.573-46.065 17.573-63.64-0.001-17.573-17.573-17.573-46.065 0.001-63.64L660.944 512 275.198 126.265c-17.574-17.573-17.574-46.066-0.001-63.64C283.985 53.839 295.501 49.445 307.018 49.445z"}})])},Tx=[],Ix=lt(Fx,Px,Tx);const Mx=Ix.exports,Ax=v.defineComponent({__name:"ContextMenuItem",props:{disabled:{type:Boolean,default:!1},hidden:{type:Boolean,default:!1},customRender:{type:Function,default:null},customClass:{type:String,default:""},clickHandler:{type:Function,default:null},label:{type:[String,Object,Function],default:""},icon:{type:[String,Object,Function],default:""},iconFontClass:{type:String,default:"iconfont"},checked:{type:Boolean,default:!1},shortcut:{type:String,default:""},svgIcon:{type:String,default:""},svgProps:{type:Object,default:null},preserveIconWidth:{type:Boolean,default:!0},showRightArrow:{type:Boolean,default:!1},hasChildren:{type:Boolean,default:!1},clickClose:{type:Boolean,default:!0},clickableWhenHasChildren:{type:Boolean,default:!1},rawMenuItem:{type:Object,default:void 0}},emits:["click","subMenuOpen","subMenuClose"],setup(e,{expose:t,emit:o}){const i=e,{clickHandler:s,clickClose:n,clickableWhenHasChildren:r,disabled:l,hidden:a,label:d,icon:c,iconFontClass:u,showRightArrow:h,shortcut:g,hasChildren:p}=v.toRefs(i),f=v.ref(!1),C=v.ref(!1),m=v.ref(),b=v.inject("globalOptions"),S=v.inject("globalHasSlot"),w=v.inject("globalRenderSlot"),y=v.inject("globalCloseMenu"),R=v.inject("menuContext"),P=v.computed(()=>typeof d.value=="string"?d.value:typeof d.value=="function"?rx(d.value.toString()):"MenuItem[unknow]");v.provide("MenuItemName",P);const M={getSubMenuInstance:()=>{},showSubMenu:()=>f.value?(R.markActiveMenuItem(M,!0),!0):p.value?(D(),!0):!1,hideSubMenu:()=>{R.closeOtherSubMenu()},isDisabledOrHidden:()=>l.value||a.value,getElement:()=>m.value,focus:()=>C.value=!0,blur:()=>C.value=!1,click:I};v.provide("menuItemInstance",M),v.onMounted(()=>{R.isMenuItemDataCollectedFlag()?v.nextTick(()=>{let O=0;const W=R.getElement();if(W){let $=0;for(let Q=0;Q<W.children.length;Q++){const X=W.children[Q];if(X.getAttribute("data-type")==="ContextMenuItem"){if(X===m.value){O=$;break}$++}}}R.addChildMenuItem(M,O)}):R.addChildMenuItem(M)}),v.onBeforeUnmount(()=>{R.removeChildMenuItem(M)});function I(O){if(!l.value){if(O){const W=O.target;if(W.classList.contains("mx-context-no-clickable")||b.value.ignoreClickClassName&&W.classList.contains(b.value.ignoreClickClassName))return;if(b.value.clickCloseClassName&&W.classList.contains(b.value.clickCloseClassName)){O.stopPropagation(),y(i.rawMenuItem);return}}p.value?r.value?(typeof s.value=="function"&&s.value(O),o("click",O)):f.value||D():(typeof s.value=="function"&&s.value(O),o("click",O),n.value&&y(i.rawMenuItem))}}function D(O){C.value=!1,R.checkCloseOtherSubMenuTimeOut()||R.closeOtherSubMenu(),l.value||(R.markActiveMenuItem(M),p.value&&(O||R.markThisOpenedByKeyBoard(),R.addOpenedSubMenu(T),f.value=!0,v.nextTick(()=>o("subMenuOpen",M))))}function T(){C.value=!1,f.value=!1,o("subMenuClose",M)}function k(){return{disabled:l.value,label:d.value,icon:c.value,iconFontClass:u.value,showRightArrow:h.value,clickClose:n.value,clickableWhenHasChildren:r.value,shortcut:g.value,theme:b.value.theme,isOpen:f,hasChildren:p,onClick:I,onMouseEnter:D,closeMenu:y}}return t(M),{__sfc:!0,props:i,emit:o,clickHandler:s,clickClose:n,clickableWhenHasChildren:r,disabled:l,hidden:a,label:d,icon:c,iconFontClass:u,showRightArrow:h,shortcut:g,hasChildren:p,showSubMenu:f,keyBoardFocusMenu:C,menuItemRef:m,options:b,globalHasSlot:S,globalRenderSlot:w,globalCloseMenu:y,menuContext:R,nameForDebug:P,menuItemInstance:M,onClick:I,onMouseEnter:D,closeSubMenu:T,getItemDataForChildren:k,VNodeRender:Bd,ContextMenuIconCheck:Dx,ContextMenuIconRight:Mx}}});var kx=function(){var e=this,t=e._self._c,o=e._self._setupProxy;return o.hidden?e._e():t("div",{ref:"menuItemRef",staticClass:"mx-context-menu-item-wrapper",attrs:{"data-type":"ContextMenuItem"}},[o.globalHasSlot("itemRender")?t(o.VNodeRender,{attrs:{vnode:()=>o.globalRenderSlot("itemRender",o.getItemDataForChildren())}}):e.customRender?t(o.VNodeRender,{attrs:{vnode:e.customRender,data:o.getItemDataForChildren()}}):t("div",{class:["mx-context-menu-item",o.disabled?"disabled":"",o.keyBoardFocusMenu?"keyboard-focus":"",e.customClass?" "+e.customClass:"",o.showSubMenu?"open":""],on:{click:o.onClick,mouseenter:o.onMouseEnter}},[e._t("default",function(){return[t("div",{staticClass:"mx-item-row"},[t("div",{class:["mx-icon-placeholder",e.preserveIconWidth?"preserve-width":""]},[e._t("icon",function(){return[o.globalHasSlot("itemIconRender")?t(o.VNodeRender,{attrs:{vnode:()=>o.globalRenderSlot("itemIconRender",o.getItemDataForChildren())}}):typeof e.svgIcon=="string"&&e.svgIcon?t("svg",e._b({staticClass:"icon svg"},"svg",e.svgProps,!1),[t("use",{attrs:{"xlink:href":e.svgIcon}})]):typeof o.icon!="string"?t(o.VNodeRender,{attrs:{vnode:o.icon,data:o.icon}}):typeof o.icon=="string"&&o.icon!==""?t("i",{class:o.icon+" icon "+o.iconFontClass+" "+o.options.iconFontClass}):e._e()]}),e.checked?e._t("check",function(){return[o.globalHasSlot("itemCheckRender")?t(o.VNodeRender,{attrs:{vnode:()=>o.globalRenderSlot("itemCheckRender",o.getItemDataForChildren())}}):e._e(),t(o.ContextMenuIconCheck)]}):e._e()],2),e._t("label",function(){return[o.globalHasSlot("itemLabelRender")?t(o.VNodeRender,{attrs:{vnode:()=>o.globalRenderSlot("itemLabelRender",o.getItemDataForChildren())}}):typeof o.label=="string"?t("span",{staticClass:"label"},[e._v(e._s(o.label))]):t(o.VNodeRender,{attrs:{vnode:o.label,data:o.label}})]})],2),t("div",{staticClass:"mx-item-row"},[o.shortcut||e.$slots.shortcut?e._t("shortcut",function(){return[o.globalHasSlot("itemShortcutRender")?t(o.VNodeRender,{attrs:{vnode:()=>o.globalRenderSlot("itemShortcutRender",o.getItemDataForChildren())}}):e._e(),t("span",{staticClass:"mx-shortcut"},[e._v(e._s(o.shortcut))])]}):e._e(),o.showRightArrow?e._t("rightArrow",function(){return[o.globalHasSlot("itemRightArrowRender")?t(o.VNodeRender,{attrs:{vnode:()=>o.globalRenderSlot("itemRightArrowRender",o.getItemDataForChildren())}}):e._e(),t(o.ContextMenuIconRight)]}):e._e()],2)]})],2),e._t("submenu",null,{context:o.menuItemInstance,show:o.showSubMenu})],2)},Lx=[],Gx=lt(Ax,kx,Lx);const zn=Gx.exports,Hx=v.defineComponent({name:"ContextMenuSperator",components:{VNodeRender:Bd},setup(){const e=v.inject("globalHasSlot"),t=v.inject("globalRenderSlot");return{globalHasSlot:e,globalRenderSlot:t}}});var Ox=function(){var e=this,t=e._self._c;return e._self._setupProxy,e.globalHasSlot("separatorRender")?t("VNodeRender",{attrs:{vnode:()=>e.globalRenderSlot("separatorRender",{})}}):t("div",{staticClass:"mx-context-menu-item-sperator mx-context-no-clickable"})},Bx=[],_x=lt(Hx,Ox,Bx);const $n=_x.exports,Nx=v.defineComponent({__name:"ContextSubMenu",props:{items:{type:Array,default:null},show:{type:Boolean,default:!1},maxHeight:{type:Number,default:0},maxWidth:{type:[String,Number],default:0},minWidth:{type:[String,Number],default:0},adjustPosition:{type:Boolean,default:!0},direction:{type:String,default:"br"},parentMenuItemContext:{type:Object,default:null}},emits:["closeAnimFinished"],setup(e,{expose:t,emit:o}){const i=e,s=v.ref(!1),n=v.inject("globalGetMenuHostId",""),r=v.inject("menuContext"),l=v.inject("globalOptions"),a=v.inject("globalHasSlot"),d=v.inject("globalRenderSlot"),c=v.ref("UnknowOrRoot"),u=v.inject("MenuItemName",c),{zIndex:h,getParentWidth:g,getParentHeight:p,getZoom:f}=r,{adjustPosition:C}=v.toRefs(i),m=v.ref(),b=v.ref(),S=v.ref(),w=[],y=v.inject("globalSetCurrentSubMenu"),R=[];let P=null,M=0;function I(){P&&P.blur()}function D(E,B){if(E){for(let z=B!==void 0?B:0;z<R.length;z++)if(!R[z].isDisabledOrHidden()){T(z);break}}else for(let z=B!==void 0?B:R.length-1;z>=0;z--)if(!R[z].isDisabledOrHidden()){T(z);break}}function T(E){if(P&&I(),E!==void 0&&(P=R[Math.max(0,Math.min(E,R.length-1))]),!P)return;P.focus();const B=P.getElement();B&&B.scrollIntoView({behavior:"auto",block:"nearest",inline:"nearest"})}function k(){y(O)}const O={el:S,name:u,isTopLevel:()=>r.getParentContext()===null,closeSelfAndActiveParent:()=>{const E=Q.getParentContext();if(E){E.closeOtherSubMenu();const B=E.getSubMenuInstanceContext();if(B)return B.focusCurrentItem(),!0}return!1},closeCurrentSubMenu:()=>{var E;return(E=Q.getParentContext())==null?void 0:E.closeOtherSubMenu()},moveCurrentItemFirst:()=>D(!0),moveCurrentItemLast:()=>D(!1),moveCurrentItemDown:()=>D(!0,P?R.indexOf(P)+1:0),moveCurrentItemUp:()=>D(!1,P?R.indexOf(P)-1:0),focusCurrentItem:()=>T(),openCurrentItemSubMenu:()=>P?P==null?void 0:P.showSubMenu():!1,triggerCurrentItemClick:E=>P==null?void 0:P.click(E)};let W=!1,$=!1;const Q={zIndex:h+1,container:r.container,adjustPadding:l.value.adjustPadding||Ft.defaultAdjustPadding,getParentWidth:()=>{var E;return((E=S.value)==null?void 0:E.offsetWidth)||0},getParentHeight:()=>{var E;return((E=S.value)==null?void 0:E.offsetHeight)||0},getPositon:()=>[K.value.x,K.value.y],getZoom:()=>l.value.zoom||Ft.defaultZoom,addOpenedSubMenu(E){w.push(E)},closeOtherSubMenu(){w.forEach(E=>E()),w.splice(0,w.length),y(O)},checkCloseOtherSubMenuTimeOut(){return M?(clearTimeout(M),M=0,!0):!1},closeOtherSubMenuWithTimeOut(){M=setTimeout(()=>{M=0,this.closeOtherSubMenu()},200)},addChildMenuItem:(E,B)=>{B===void 0?R.push(E):R.splice(B,0,E)},removeChildMenuItem:E=>{R.splice(R.indexOf(E),1),E.getSubMenuInstance=()=>{}},markActiveMenuItem:(E,B=!1)=>{I(),P=E,B&&T()},markThisOpenedByKeyBoard:()=>{W=!0},isOpenedByKeyBoardFlag:()=>W?(W=!1,!0):!1,isMenuItemDataCollectedFlag:()=>$,getElement:()=>S.value||null,getParentContext:()=>r,getSubMenuInstanceContext:()=>O};v.provide("menuContext",Q);const X={getChildItem:E=>R[E],getMenuDimensions:()=>b.value?{width:b.value.offsetWidth,height:b.value.offsetHeight}:{width:0,height:0},getSubmenuRoot:()=>b.value,getMenu:()=>S.value,getScrollValue:()=>{var E,B;return((B=(E=m.value)==null?void 0:E.getScrollContainer())==null?void 0:B.scrollTop)||0},setScrollValue:E=>{var B;return(B=m.value)==null?void 0:B.scrollTo(0,E)},getScrollHeight:()=>xe.value,adjustPosition:()=>{oe()},getMaxHeight:()=>Pe.value,getPosition:()=>K.value,setPosition:(E,B)=>{K.value.x=E,K.value.y=B}},Re=v.inject("menuItemInstance",void 0);Re&&(Re.getSubMenuInstance=()=>X);const xe=v.ref(0),Pe=v.ref(0),_e=v.ref(!1),K=v.ref({x:0,y:0});function oe(){v.nextTick(()=>{const E=S.value,B=b.value;if(E&&B&&m.value){const{container:z}=r,qe=(g==null?void 0:g())??0,qn=(p==null?void 0:p())??0,Pt=getComputedStyle(B),ts=parseFloat(Pt.paddingLeft),No=parseFloat(Pt.paddingTop),Yn=qn>0?No:0,zD=document.documentElement.scrollHeight/f(),$D=document.documentElement.scrollWidth/f(),UD=Math.min($D,z.offsetWidth),nc=Math.min(zD,z.offsetHeight);let Zn=Bo(E,z),Xn=Oo(E,z);i.direction.includes("l")?K.value.x-=E.offsetWidth+ts:i.direction.includes("r")?K.value.x+=qe+ts:(K.value.x+=qe/2,K.value.x-=(E.offsetWidth+ts)/2),i.direction.includes("t")?K.value.y-=(E.offsetHeight+No*2)/f():i.direction.includes("b")?K.value.y-=No/f():K.value.y-=(E.offsetHeight+No)/2/f(),v.nextTick(()=>{var rc,lc;Zn=Bo(E,z),Xn=Oo(E,z);const ac=((lc=(rc=m.value)==null?void 0:rc.getScrollContainer())==null?void 0:lc.scrollHeight)||0,KD=i.maxHeight;xe.value=i.maxHeight?Math.min(ac,i.maxHeight):ac;const jD=Zn+E.offsetWidth-UD,dc=Xn+xe.value+Yn*2-nc;if(_e.value=dc>0,C.value&&jD>0){const Vo=qe+E.offsetWidth-ts,Wo=Zn;Vo>Wo?K.value.x-=Wo:K.value.x-=Vo}if(_e.value){if(C.value){const Vo=dc,Wo=Xn;Vo>Wo?K.value.y-=Wo-Yn:K.value.y-=Vo-Yn}Pe.value=nc-(K.value.y+No)}else Pe.value=KD||0})}})}function Ne(){}function Ve(){var E;const B=(E=i.parentMenuItemContext)==null?void 0:E.getElement();if(B){const z=Bo(B,r.container),qe=Oo(B,r.container);K.value.x=z,K.value.y=qe}else{const[z,qe]=r.getPositon();K.value.x=z,K.value.y=qe}v.nextTick(()=>{var z;y(O),(z=S.value)==null||z.focus({preventScroll:!0}),r.isOpenedByKeyBoardFlag()&&v.nextTick(()=>D(!0)),$=!0}),oe()}return v.watch(()=>i.show,E=>{E&&Ve()}),v.onMounted(()=>{s.value=!0,i.show?Ve():oe()}),v.onBeforeUnmount(()=>{s.value=!1,Re&&(Re.getSubMenuInstance=()=>{})}),t(X),{__sfc:!0,props:i,emit:o,mounted:s,globalGetMenuHostId:n,parentContext:r,options:l,globalHasSlot:a,globalRenderSlot:d,debugMenuItemNameDefault:c,debugMenuItemName:u,zIndex:h,getParentWidth:g,getParentHeight:p,getZoom:f,adjustPosition:C,scrollRectRef:m,submenuRoot:b,menu:S,openedSubMenuClose:w,globalSetCurrentSubMenu:y,menuItems:R,currentItem:P,leaveTimeout:M,blurCurrentMenu:I,setAndFocusNotDisableItem:D,setAndFocusCurrentMenu:T,onSubMenuBodyClick:k,thisMenuInsContext:O,isOpenedByKeyBoardFlag:W,isMenuItemDataCollectedFlag:$,thisMenuContext:Q,exposeContext:X,menuItemInstance:Re,scrollHeight:xe,scrollTargetMaxHeight:Pe,overflow:_e,position:K,doAdjustPosition:oe,hideSolve:Ne,showSolve:Ve,MenuConstOptions:Ft,solveNumberOrStringSize:lx,ScrollRect:Sx,ContextMenuItem:zn,ContextMenuSeparator:$n,Teleport:_d}}});var Vx=function(){var e=this,t=e._self._c,o=e._self._setupProxy;return o.mounted?t(o.Teleport,{attrs:{to:`#${o.globalGetMenuHostId}`}},[t("Transition",e._b({attrs:{appear:""},on:{"after-leave":function(i){return o.emit("closeAnimFinished")}}},"Transition",o.options.menuTransitionProps||{duration:10},!1),[e.show?t("div",e._b({ref:"submenuRoot",class:["mx-context-menu",o.options.customClass?o.options.customClass:"",o.options.theme||""],style:{maxWidth:e.maxWidth?o.solveNumberOrStringSize(e.maxWidth):`${o.MenuConstOptions.defaultMaxWidth}px`,minWidth:e.minWidth?o.solveNumberOrStringSize(e.minWidth):`${o.MenuConstOptions.defaultMinWidth}px`,zIndex:o.zIndex,left:`${o.position.x}px`,top:`${o.position.y}px`},attrs:{"data-type":"ContextSubMenu"},on:{click:o.onSubMenuBodyClick}},"div",e.$attrs,!1),[t(o.ScrollRect,{ref:"scrollRectRef",attrs:{scroll:"vertical",maxHeight:o.scrollTargetMaxHeight,containerClass:"mx-context-menu-scroll"}},[t("div",{ref:"menu",class:["mx-context-menu-items"]},[e._t("default",function(){return[e._l(e.items,function(i,s){return[i.hidden!==!0&&i.divided==="up"?t(o.ContextMenuSeparator):e._e(),i.hidden!==!0&&i.divided==="self"?t(o.ContextMenuSeparator):t(o.ContextMenuItem,{attrs:{clickHandler:i.onClick?n=>i.onClick(n):void 0,disabled:typeof i.disabled=="object"?i.disabled.value:i.disabled,hidden:typeof i.hidden=="object"?i.hidden.value:i.hidden,icon:i.icon,iconFontClass:i.iconFontClass,svgIcon:i.svgIcon,svgProps:i.svgProps,label:i.label,customRender:i.customRender,customClass:i.customClass,checked:typeof i.checked=="object"?i.checked.value:i.checked,shortcut:i.shortcut,clickClose:i.clickClose,clickableWhenHasChildren:i.clickableWhenHasChildren,preserveIconWidth:i.preserveIconWidth!==void 0?i.preserveIconWidth:o.options.preserveIconWidth,showRightArrow:i.children&&i.children.length>0,hasChildren:i.children&&i.children.length>0,rawMenuItem:i},on:{"sub-menu-open":n=>{var r;return(r=i.onSubMenuOpen)==null?void 0:r.call(i,n)},"sub-menu-close":n=>{var r;return(r=i.onSubMenuClose)==null?void 0:r.call(i,n)}},scopedSlots:e._u([i.children&&i.children.length>0?{key:"submenu",fn:function({context:n,show:r}){return[t("ContextSubMenu",{attrs:{show:r,parentMenuItemContext:n,items:i.children,maxWidth:i.maxWidth,minWidth:i.minWidth,maxHeight:i.maxHeight,adjustPosition:i.adjustSubMenuPosition!==void 0?i.adjustSubMenuPosition:o.options.adjustPosition,direction:i.direction!==void 0?i.direction:o.options.direction}})]}}:null],null,!0)}),i.hidden!==!0&&(i.divided==="down"||i.divided===!0)?t(o.ContextMenuSeparator):e._e()]})]})],2)])],1):e._e()])],1):e._e()},Wx=[],zx=lt(Nx,Vx,Wx);const Un=zx.exports,$x=v.defineComponent({__name:"ContextSubMenuWrapper",props:{options:{type:Object,default:null},show:{type:null,default:null},container:{type:HTMLElement,default:null},isFullScreenContainer:{type:Boolean,default:!0}},emits:["close","closeAnimFinished"],setup(e,{expose:t,emit:o}){const i=e,s=v.useSlots(),n=v.ref(),{options:r,show:l,container:a}=v.toRefs(i);v.onMounted(()=>{l.value&&u()}),v.onBeforeUnmount(()=>{f()}),v.watch(l,y=>{y?u():(Gd(d),f())});const d={closeMenu:h,isClosed:g,getMenuRef:()=>n.value,getMenuDimensions:()=>{var y;return((y=n.value)==null?void 0:y.getMenuDimensions())??{width:0,height:0}}};let c=!1;function u(){p(),ox(d)}function h(y){c=!0,o("close",y),r.value.menuTransitionProps||o("closeAnimFinished"),Gd(d)}function g(){return c}function p(){setTimeout(()=>{document.addEventListener("click",S,!0),document.addEventListener("contextmenu",S,!0),document.addEventListener("scroll",b,!0),!i.isFullScreenContainer&&a.value&&a.value.addEventListener("scroll",b,!0),r.value.keyboardControl!==!1&&document.addEventListener("keydown",m,!0)},50)}function f(){document.removeEventListener("contextmenu",S,!0),document.removeEventListener("click",S,!0),document.removeEventListener("scroll",b,!0),!i.isFullScreenContainer&&a.value&&a.value.removeEventListener("scroll",b,!0),r.value.keyboardControl!==!1&&document.removeEventListener("keydown",m,!0)}const C=v.ref();v.provide("globalSetCurrentSubMenu",y=>C.value=y),v.provide("globalGetMenuHostId",a.value.id);function m(y){var R,P,M,I,D,T,k,O,W,$,Q,X,Re;let xe=!0;switch(y.key){case"Escape":{((R=C.value)==null?void 0:R.isTopLevel())===!1?(P=C.value)==null||P.closeCurrentSubMenu():h();break}case"ArrowDown":(M=C.value)==null||M.moveCurrentItemDown();break;case"ArrowUp":(I=C.value)==null||I.moveCurrentItemUp();break;case"Home":(D=C.value)==null||D.moveCurrentItemFirst();break;case"End":(T=C.value)==null||T.moveCurrentItemLast();break;case"ArrowLeft":{(k=C.value)!=null&&k.closeSelfAndActiveParent()||(W=(O=r.value).onKeyFocusMoveLeft)==null||W.call(O);break}case"ArrowRight":($=C.value)!=null&&$.openCurrentItemSubMenu()||(X=(Q=r.value).onKeyFocusMoveRight)==null||X.call(Q);break;case"Enter":(Re=C.value)==null||Re.triggerCurrentItemClick(y);break;default:xe=!1;break}xe&&C.value&&(y.stopPropagation(),y.preventDefault())}function b(y){r.value.closeWhenScroll!==!1&&w(y.target,null)}function S(y){w(y.target,y)}function w(y,R){for(var P,M;y;){if(y.classList&&y.classList.contains("mx-context-menu"))return;y=y.parentNode}R?r.value.clickCloseOnOutside!==!1?(f(),h()):(M=(P=r.value).onClickOnOutside)==null||M.call(P,R):(f(),h())}return v.provide("globalOptions",r),v.provide("globalCloseMenu",h),v.provide("globalIsFullScreenContainer",i.isFullScreenContainer),v.provide("globalHasSlot",y=>s[y]!==void 0),v.provide("globalRenderSlot",(y,R)=>s[y]?s[y](R):v.h("span","Render slot failed")),v.provide("menuContext",{zIndex:r.value.zIndex||Ft.defaultZindex,container:a.value,adjustPadding:{x:0,y:0},getZoom:()=>r.value.zoom||Ft.defaultZoom,getParentWidth:()=>0,getParentHeight:()=>0,getPositon:()=>[r.value.x,r.value.y],closeOtherSubMenuWithTimeOut:()=>{},checkCloseOtherSubMenuTimeOut:()=>!1,addOpenedSubMenu:()=>{},closeOtherSubMenu:()=>{},getParentContext:()=>null,getSubMenuInstanceContext:()=>null,getElement:()=>null,addChildMenuItem:()=>{},removeChildMenuItem:()=>{},markActiveMenuItem:()=>{},markThisOpenedByKeyBoard:()=>{},isOpenedByKeyBoardFlag:()=>!1,isMenuItemDataCollectedFlag:()=>!1}),t(d),{__sfc:!0,props:i,emit:o,slots:s,submenuInstance:n,options:r,show:l,container:a,instance:d,closed:c,openMenu:u,closeMenu:h,isClosed:g,installBodyEvents:p,removeBodyEvents:f,currentOpenedMenu:C,onMenuKeyDown:m,onBodyScroll:b,onBodyClick:S,checkTargetAndClose:w,MenuConstOptions:Ft,ContextSubMenuConstructor:Un}}});var Ux=function(){var e=this,t=e._self._c,o=e._self._setupProxy;return t(o.ContextSubMenuConstructor,{ref:"submenuInstance",attrs:{show:o.show,items:o.options.items,adjustPosition:o.options.adjustPosition,maxWidth:o.options.maxWidth||o.MenuConstOptions.defaultMaxWidth,minWidth:o.options.minWidth||o.MenuConstOptions.defaultMinWidth,maxHeight:o.options.maxHeight,direction:o.options.direction||o.MenuConstOptions.defaultDirection},on:{closeAnimFinished:function(i){return o.emit("closeAnimFinished")}}},[e._t("default")],2)},Kx=[],jx=lt($x,Ux,Kx);const $d=jx.exports,qx=v.defineComponent({__name:"ContextMenu",props:{options:{type:Object,default:null},show:{type:Boolean,default:!1}},emits:["update:show","close"],setup(e,{expose:t,emit:o}){const i=e,{options:s,show:n}=v.toRefs(i),{isNew:r,container:l,eleId:a}=Od(s.value),d=v.ref(null),c=v.useSlots();function u(h){var g,p;o("update:show",!1),o("close"),(p=(g=s.value).onClose)==null||p.call(g,h)}return t({closeMenu:()=>o("update:show",!1),isClosed:()=>!n.value,getMenuRef:()=>{var h;return(h=d.value)==null?void 0:h.getMenuRef()},getMenuDimensions:()=>{var h;return((h=d.value)==null?void 0:h.getMenuDimensions())??{width:0,height:0}}}),{__sfc:!0,emit:o,props:i,options:s,show:n,isNew:r,container:l,eleId:a,menuRef:d,slots:c,onClose:u,Teleport:_d,ContextSubMenuWrapperConstructor:$d}}});var Yx=function(){var e=this,t=e._self._c,o=e._self._setupProxy;return t(o.Teleport,{attrs:{to:`#${o.eleId}`}},[t(o.ContextSubMenuWrapperConstructor,{ref:"menuRef",attrs:{options:o.options,show:o.show,container:o.container,isFullScreenContainer:!o.isNew},on:{close:o.onClose},scopedSlots:e._u([e._l(o.slots,function(i,s){return{key:s,fn:function(n){return[e._t(s,null,null,n)]}}})],null,!0)})],1)},Zx=[],Xx=lt(qx,Yx,Zx);const Qx=Xx.exports,Jx=v.defineComponent({name:"ContextMenuGroup",props:{disabled:{type:Boolean,default:!1},hidden:{type:Boolean,default:!1},clickHandler:{type:Function,default:null},label:{type:String,default:""},icon:{type:String,default:""},iconFontClass:{type:String,default:"iconfont"},checked:{type:Boolean,default:!1},shortcut:{type:String,default:""},svgIcon:{type:String,default:""},svgProps:{type:Object,default:null},preserveIconWidth:{type:Boolean,default:!0},showRightArrow:{type:Boolean,default:!1},clickClose:{type:Boolean,default:!0},adjustSubMenuPosition:{type:Boolean,default:void 0},maxHeight:{type:[String,Number],default:0},maxWidth:{type:[String,Number],default:0},minWidth:{type:[String,Number],default:0}},setup(e,t){const o=v.inject("globalOptions"),{adjustSubMenuPosition:i,maxWidth:s,minWidth:n,maxHeight:r}=v.toRefs(e),l=typeof i.value<"u"?i.value:o.value.adjustPosition,a=v.ref(),d=v.ref();return t.expose({getSubMenuRef:()=>a.value,getMenuItemRef:()=>d.value}),()=>v.h(zn,{...e,ref:d,showRightArrow:!0,maxWidth:void 0,minWidth:void 0,maxHeight:void 0,adjustSubMenuPosition:void 0,hasChildren:typeof t.slots.default!==void 0},t.slots.default?{submenu:c=>v.h(Un,{ref:a,show:c.show,maxWidth:s.value,minWidth:n.value,maxHeight:r.value,adjustPosition:l,parentMenuItemContext:c.context},{default:t.slots.default}),...ax(t.slots,"default")}:t.slots)}});var eE=lt(Jx,null,null);const tE=eE.exports;function oE(e,t,o,i){const s=new v({data:{show:!0},render(n){return n($d,{props:{options:e,show:this.show,container:t,isFullScreenContainer:!o},on:{closeAnimFinished:()=>{s.$destroy()},close:r=>{var l;(l=e.onClose)==null||l.call(e,r),s.show=!1}}},i)}});return s.$mount(),t&&t.appendChild(s.$el),s}function Ud(e,t){const o=Od(e);return oE(e,o.container,o.isNew,t).exposed}const iE={install(e){e.prototype.$contextmenu=Ud,e.component("ContextMenu",Qx),e.component("ContextMenuItem",zn),e.component("ContextMenuGroup",tE),e.component("ContextMenuSperator",$n),e.component("ContextMenuSeparator",$n),e.component("ContextSubMenu",Un)},showContextMenu(e,t){return Ud(e,t)},isAnyContextMenuOpen(){return tx()},closeContextMenu:Hd,transformMenuPosition:ix},Kd=(e,t)=>e.map(o=>({label:o.name,icon:o.icon,disabled:o.disabled,shortcut:o.shortcut,checked:o.checked,children:o.subMenu?Kd(o.subMenu,t):void 0,onClick:s=>{o.action&&o.action(t)}})),sE=()=>document.documentElement.classList.contains("dark"),nE=(e,t,o)=>{iE.showContextMenu({theme:`default ${sE()?"dark":""}`,x:e.clientX,y:e.clientY+12,items:Kd(t,o)})},rE=e=>({suppressContextMenu:!1,allowContextMenuWithControlKey:!1,onCellContextMenu(t){e.getContextMenuItems&&t.event&&t.event instanceof MouseEvent&&nE(t.event,e.getContextMenuItems({api:t.api,column:t.column,context:t.context,defaultItems:[],event:t.event,node:t.node,value:t.value}),{api:t.api,column:t.column,context:t.context,node:t.node,value:t.value})}}),lE={getContextMenuItems:void 0},aE=e=>{var t;const o=v.ref(),i=v.ref(),s=v.ref({height:`calc(100% - ${(t=e.footerHeight)!=null?t:0}px)`,width:"100%"}),n=new Set(["columnSizing","columnVisibility","columnPinning","columnOrder"]),r=v.ref(0),l=v.ref(),{onBodyScrollEnd:a}=Q0({onVScrollEnd(){u.value.getRows(Ho.nextPage(c.value))}}),d=({data:D})=>D.id,c=v.ref(new Y0(e.rowIdMapper)),u=v.ref(new Fd(e.rowData,c.value)),{initGridState:h,resetGridState:g,storeGridState:p,restoreGridState:f}=J0(e.id,o,l),C=async D=>{R(),c.value.pageSize=e.pageSize,c.value.gridApi=D.api,u.value.api=D.api,D.api.getAllGridColumns(),o.value=D.api,h(),await f(),await P(),D.api.setGridOption("popupParent",document.querySelector("body"))},m=()=>{u.value.loadData()},b=async(D,T=0)=>{c.value.insertRows(D,T),m()},S=D=>c.value.getRows().some(T=>T.getId()===D.getId()),w=()=>c.value.getRows(),y=()=>{var D,T,k;const O=i.value.querySelector(".ag-body-viewport"),W=Number.parseFloat(O.querySelector(".ag-center-cols-container").style.height),$=i.value.querySelector(".ag-header").offsetHeight,Q=(T=(D=i.value.querySelector(".ag-overlay-no-rows-wrapper"))==null?void 0:D.querySelector(".el-empty"))==null?void 0:T.offsetHeight;W<r.value?s.value.height=`${$+(Q||W)+(e.footerHeight?2:11)}px`:s.value.height.includes("100%")||(s.value.height=`calc(100% - ${(k=e.footerHeight)!=null?k:0}px)`)},R=()=>{const D=i.value.querySelector(".ag-body-viewport");l.value=D.offsetWidth,r.value=D.offsetHeight},P=()=>new Promise((D,T)=>{c.value.isFinished=!1;const k=Ho.from(1,c.value.pageSize,c.value);k.context={resolve:D,reject:T},u.value.getRows(k),u.value.api.getDisplayedRowCount()>0&&u.value.api.ensureIndexVisible(0)}),M=v.computed(()=>{var D;return{onGridReady:C,onBodyScrollEnd:a,scrollbarWidth:8,getRowId:d,columnDefs:e.columns,preventDefaultOnContextMenu:!0,suppressRowTransform:!0,selectionColumnDef:{pinned:"left",rowSpan:({data:T,column:k})=>T.getRowSpan(k),cellClassRules:{"cell-span":({data:T,column:k})=>T.getRowSpan(k)>0,"cell-span-hide":({data:T,column:k})=>T.getRowSpan(k)===0}},defaultColGroupDef:{marryChildren:!0},onStateUpdated(T){T.sources.some(k=>n.has(k))&&p()},onSortChanged(T){T.source==="uiColumnSorted"&&p()},context:{refresh:P,reload:m},onRowDataUpdated(){v.nextTick(()=>{y()})},defaultColDef:{rowSpan({column:T,data:k}){return k.getRowSpan(T)},cellClassRules:{"cell-span":({data:T,column:k})=>T.getRowSpan(k)>0,"cell-span-hide":({data:T,column:k})=>T.getRowSpan(k)===0},suppressFloatingFilterButton:!0,enableCellChangeFlash:!0,tooltipValueGetter(T){return T.valueFormatted},resizable:!0,sortable:!1,headerComponent:"HeaderRenderer",cellRenderer:"CellRenderer",valueGetter({column:T,data:k}){return k.getValue(T)},valueFormatter({value:T}){return T}},...ex((D=e.gridOptions)!=null?D:{},i),onBodyScroll(T){I.left=T.left,I.top=T.top},...rE(e.gridOptions),...lE}}),I={left:0,top:0};return v.onActivated(()=>{}),{gridOptions:M,datasource:u,gridStyles:s,dataCache:c,gridApi:o,gridElRef:i,resetGridState:g,reload:m,insertRows:b,existRow:S,getRows:w,refresh:P}},jd={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)}},dE={functional:!0,props:{params:{type:Object,required:!0}},render(e,t){const o=e("",{});return o.text=`${t.props.params.column.getColId()} holder`,o}},cE=v.defineComponent({name:"CellRenderer"}),uE=v.defineComponent({...cE,props:{params:null},setup(e){const t=e,o=v.computed(()=>{var r;const l=t.params.data,a=t.params.data.isEditing()&&t.params.editeRender?t.params.editeRender:t.params.render,d={...t.params,render:a};if(l instanceof Vn){const c=l.getCell(d.column);if(!c)return d.render=t.params.render,d;let u,h;if(c.parent&&(c==null?void 0:c.parent.field)!=="$"){let g=c.isArrayElement()?c.path:c.parent.path;((r=d.colDef)==null?void 0:r.cellDataType)==="array"&&(g=c.path),u=N.get(l.getData(),g),g.endsWith("]")&&(h=N.get(l.getData(),g.substring(0,g.lastIndexOf("["))))}else u=l.getData();d.hostObject=u,d.hostArrayHook=g=>{var p;let f=h;((p=d.colDef)==null?void 0:p.cellDataType)==="array"&&!h&&(f=[],N.set(l.getData(),c.path,f)),f&&(g(f),l.buildSpan(),d.context.reload(),d.api.redrawRows({rowNodes:d.api.getRenderedNodes().filter(C=>l.match(C))}))}}return d}),i=v.computed(()=>{var r;const l=t.params.data;if((r=t.params.data)!=null&&r.isEditing()&&t.params.editeRender){const a=l.getData(),d=l.getCell(t.params.column);return d?!N.isEqual(N.get(a,d.getReadPath()),t.params.value):!1}return!1}),s=v.computed(()=>t.params.data.isTransient()),n=v.computed(()=>t.params.data.getRowSpan(t.params.column));return{__sfc:!0,props:t,eventParams:o,isChange:i,isDraft:s,rowSpan:n,VNodeRenderer:jd,CellHolder:dE}}});var hE=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}})},gE=[],pE=ue(uE,hE,gE,!1,null,null);const fE=pE.exports,CE=v.defineComponent({name:"GridToolbar"}),mE=v.defineComponent({...CE,setup(e){return{__sfc:!0}}});var vE=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)])},wE=[],bE=ue(mE,vE,wE,!1,null,"f12c2536");const qd=bE.exports,SE=v.defineComponent({__name:"FooterCellRender",props:{params:null},setup(e){return{__sfc:!0,props:e,VNodeRenderer:jd}}});var yE=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)},RE=[],xE=ue(SE,yE,RE,!1,null,"4998e205");const EE=xE.exports,DE=v.defineComponent({name:"SearchItem",props:{search:{type:Object,required:!0},teleported:{type:Boolean}},setup(e){return()=>e.search.render(e.search)}});var FE=ue(DE,null,null,!1,null,"e1931525");const Kn=FE.exports,PE=v.defineComponent({name:"ClSearch"}),TE=v.defineComponent({...PE,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=v.ref(),i=v.ref(),s=()=>{t.search.forEach(c=>{c.value=N.cloneDeep(c.initValue)})},n=v.computed(()=>`${t.id}_SEARCH`),r=()=>{localStorage.setItem(n.value,JSON.stringify(t.search.filter(c=>!c.transient).map(c=>({field:c.field,value:c.value}))))},l=()=>{var c;const u=JSON.parse((c=localStorage.getItem(n.value))!=null?c:"[]");t.search.forEach(h=>{const g=u.find(p=>h.field===p.field);h.transient||!g?h.value=N.cloneDeep(h.initValue):h.value=g.value})},a=async()=>{i.value=!0;try{await t.searchRemote(),t.id&&r()}catch(c){console.error(c)}finally{i.value=!1}},d=()=>{if(s(),t.autoResetSearch)return a()};return v.onBeforeMount(()=>{l()}),{__sfc:!0,searchForm:o,props:t,loading:i,reset:s,persistenceKey:n,doPersistence:r,restore:l,doSearch:a,handleReset:d,SearchItem:Kn}}});var IE=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)])},ME=[],AE=ue(TE,IE,ME,!1,null,"962588ec");const kE=AE.exports,Yd=(e,t,o)=>{const i=v.ref(),s=v.ref(!1),n=v.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=>N.isEmpty(h)&&!N.isNumber(h),l=v.computed(()=>Array.isArray(o)?o.some(h=>!r(h.value)):!r(o==null?void 0:o.value)),a=v.computed(()=>[s.value?"is-loading":""]),d=v.computed(()=>l.value?"var(--el-color-primary)":void 0);return{visible:i,loading:s,width:n,loadingClass:a,hasCondition:l,hasConditionColor:d,doSearch:async()=>{s.value=!0;try{await e()}catch(h){console.error(h)}finally{s.value=!1,i.value=!1}},reset:()=>{Array.isArray(o)?o.forEach(h=>{h.value=N.cloneDeep(h.initValue)}):o.value=N.cloneDeep(o==null?void 0:o.initValue)}}},LE=v.defineComponent({name:"ClPopoverSearch"}),GE=v.defineComponent({...LE,props:{search:null,teleported:{type:Boolean},searchRemote:{type:Function},field:null},setup(e){const t=e,o=v.computed(()=>{var u;return(u=t.search)==null?void 0:u.find(h=>h.field===t.field)}),{visible:i,loading:s,width:n,loadingClass:r,hasConditionColor:l,doSearch:a,reset:d}=Yd(t.searchRemote,t,o.value),c=v.computed(()=>{var u;return(u=n.value)!=null?u:300});return{__sfc:!0,props:t,search:o,visible:i,loading:s,width:n,loadingClass:r,hasConditionColor:l,doSearch:a,reset:d,popoverWidth:c,SearchItem:Kn}}});var HE=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()},OE=[],BE=ue(GE,HE,OE,!1,null,null);const _E=BE.exports,NE=v.defineComponent({name:"ClDrawerSearch"}),VE=v.defineComponent({...NE,props:{search:null,teleported:{type:Boolean},searchRemote:{type:Function},attached:{type:Boolean}},setup(e){const t=e,{visible:o,loading:i,loadingClass:s,hasConditionColor:n,doSearch:r,reset:l}=Yd(t.searchRemote,t,t.search);return v.onMounted(()=>{t.attached||l()}),{__sfc:!0,props:t,visible:o,loading:i,loadingClass:s,hasConditionColor:n,doSearch:r,reset:l,SearchItem:Kn}}});var WE=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)},zE=[],$E=ue(VE,WE,zE,!1,null,null);const Zd=$E.exports;var UE=Object.defineProperty,KE=(e,t,o)=>t in e?UE(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,jE=(e,t,o)=>KE(e,t+"",o);class jn{constructor(t){jE(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,...N.isPlainObject(s.value)?s.value:{[s.field]:s.value}}),{});return new jn(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 qE=v.defineComponent({name:"SearchButton"}),YE=v.defineComponent({...qE,props:{searches:null},setup(e){const t=e,o=v.inject(Dt);return{__sfc:!0,props:t,context:o,ClDrawerSearch:Zd}}});var ZE=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}})},XE=[],QE=ue(YE,ZE,XE,!1,null,"173e227d");const Xd=QE.exports,JE=v.defineComponent({name:"RefreshButton"}),eD=v.defineComponent({...JE,setup(e){const t=v.ref(!1),{refresh:o}=v.inject(Dt);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 tD=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":""]})])},oD=[],iD=ue(eD,tD,oD,!1,null,"0e8c21af");const Qd=iD.exports;function Jd(e,t){const o=t(e);return sD(e)&&(o.children=e.children.map(i=>Jd(i,t))),o}const sD=e=>!!e.children,nD=()=>{const e=v.inject(Dt),t=v.ref(),o=v.ref(),i=v.ref([]),s=v.ref(),n=C=>{const m=e.api.value.getAllDisplayedColumns(),b=m.find(S=>S.getColId()===C);return b?m.indexOf(b):-1},r=C=>{if(C.field)return C.field;if(C.groupId)return C.groupId;throw new Error(`${C.headerName} field or groupId not found`)},l=()=>{var C,m;o.value=(m=(C=e.api.value.getColumnDefs())==null?void 0:C.map(b=>Jd(b,S=>{var w,y;return{id:r(S),label:S.headerName,pined:(y=(w=e.api.value.getColumnGroup(r(S)))==null?void 0:w.getPinned())!=null?y:S.pinned}})))!=null?m:[],i.value=e.api.value.getAllDisplayedColumns().map(b=>b.getColId())},a=(C,m,b)=>b!=="inner"&&C.parent===m.parent,d=()=>{s.value=t.value.getCheckedKeys()},c=C=>{if(C instanceof Je)return[C];const m=C.getChildren();return m?[...m.flatMap(b=>c(b))]:[]},u=(C,m,b)=>{const S=n(m[0].colId),w=n(b.colId);return C==="after"?w-m.length+1:w>S?w-m.length:w};return{treeData:o,defaultCheckedKeys:i,treeRef:t,refreshTreeData:l,checkColumnAllowDrop:a,onColumnDragStart:d,onColumnDragFinish:(C,m,b)=>{if(m&&C&&C.key!==m.key){const S=e.api.value.getColumnGroup(C.key),w=e.api.value.getColumn(C.key),y=e.api.value.getColumn(m.key),R=c(S??w);if(y){const P=u(b,R,y);e.api.value.moveColumns(R,P)}}t.value.setCheckedKeys(s.value),s.value=void 0},onColumnVisibleChange:(C,m)=>{e.api.value.setColumnsVisible([C.id],m)},onColumnPinedChange:(C,m)=>{var b;const S=e.api.value.getColumnGroup(C),w=S?S.getDisplayedLeafColumns().map(R=>R.getColId()):[C],y=S?S.getPinned():(b=e.api.value.getColumn(C))==null?void 0:b.getPinned();e.api.value.setColumnsPinned(w,y===m?null:m),l()},columnAutoResize:()=>{e.api.value.sizeColumnsToFit()}}},rD=v.defineComponent({name:"SettingButton"}),lD=v.defineComponent({...rD,setup(e){const{treeRef:t,treeData:o,defaultCheckedKeys:i,refreshTreeData:s,checkColumnAllowDrop:n,onColumnDragStart:r,onColumnDragFinish:l,onColumnVisibleChange:a,onColumnPinedChange:d,columnAutoResize:c}=nD(),u=v.ref(!1),h=v.inject(Dt);return{__sfc:!0,treeRef:t,treeData:o,defaultCheckedKeys:i,refreshTreeData:s,checkColumnAllowDrop:n,onColumnDragStart:r,onColumnDragFinish:l,onColumnVisibleChange:a,onColumnPinedChange:d,columnAutoResize:c,visible:u,gridContext:h,handleResetGridState:()=>{h.resetGridState(),s()}}}});var aD=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("自适应")]),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",{staticStyle:{display:"flex","justify-content":"space-between",width:"100%"}},[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)}}})])])]}}])})],1)],1)},dD=[],cD=ue(lD,aD,dD,!1,null,"43c6442c");const ec=cD.exports,uD=v.defineComponent({name:"HeaderRenderer"}),hD=v.defineComponent({...uD,props:{params:null},setup(e){const t=e,o=v.ref(),i=v.ref(-1),s=v.getCurrentInstance();console.log(s);const n=v.inject(Dt),r=()=>{o.value=t.params.column.getSort(),i.value=m0(t.params.api,t.params.column.getColId())},l=async(a,d)=>{try{o.value=a,t.params.setSort(a,d.shiftKey),await n.refresh()}catch{}};return v.onMounted(()=>{t.params.api.addEventListener("sortChanged",r),r()}),v.onUnmounted(()=>{t.params.api.removeEventListener("sortChanged",r)}),{__sfc:!0,props:t,sorted:o,sortIndex:i,instance:s,context:n,handleSortChange:r,handleSortClick:l}}});var gD=function(){var t=this,o=t._self._c,i=t._self._setupProxy;return o("div",[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)"},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)},pD=[],fD=ue(hD,gD,pD,!1,null,"1f665c5b");const CD=fD.exports,mD=v.defineComponent({name:"GridEmptyDataOverlay"}),vD=v.defineComponent({...mD,setup(e){return{__sfc:!0}}});var wD=function(){var t=this,o=t._self._c;return t._self._setupProxy,o("el-empty",{attrs:{description:"没有数据了","image-size":75}})},bD=[],SD=ue(vD,wD,bD,!1,null,"05fc87c0");const yD=SD.exports,RD=v.defineComponent({name:"GridLoadingOverlay"}),xD=v.defineComponent({...RD,setup(e){return{__sfc:!0}}});var ED=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)"}})},DD=[],FD=ue(xD,ED,DD,!1,null,"c60c1386");const PD=FD.exports,TD=(e,t,o)=>{const i=v.ref(),s=v.ref([{}]),n=v.computed(()=>e.footerHeight?{height:`${e.footerHeight+10}px`}:{});v.watch(()=>[s.value,i.value],()=>{var c;s.value&&i.value&&((c=i.value)==null||c.setGridOption("rowData",s.value.map((u,h)=>({id:`footer-${h}`,...u}))))});const r=c=>!!c.children,l=c=>{var u;return r(c)?{headerName:c.headerName,groupId:c.groupId,children:[...c.children.map(h=>l(h))]}:{width:c.width,headerName:c.headerName,field:c.field,cellRendererParams:{render:(u=c.cellRendererParams)==null?void 0:u.footerRender}}},a=v.computed(()=>({scrollbarWidth:8,suppressRowTransform:!0,columnDefs:e.columns.map(c=>l(c)),defaultColGroupDef:{marryChildren:!0},rowSelection:e.gridOptions.rowSelection?{mode:"singleRow",isRowSelectable:()=>!1,hideDisabledCheckboxes:!0}:void 0,rowHeight:e.footerHeight,headerHeight:0,alwaysShowVerticalScroll:o.value.height.includes("100%"),defaultColDef:{suppressFloatingFilterButton:!0,cellRenderer:"FooterCellRender",enableCellChangeFlash:!0,tooltipValueGetter(c){return c.value}},onGridReady(c){i.value=c.api,c.api.setGridOption("popupParent",document.querySelector("body"))},alignedGrids:()=>[t.value]}));return{setFooterData:c=>{s.value=c},footerGridApi:i,footerData:s,footerStyles:n,footerGridOptions:a}},ID=()=>({theme:v.ref("ag-theme-alpine")}),MD=v.defineComponent({name:"Grid",components:{SearchButton:Xd,RefreshButton:Qd,SettingButton:ec,CellRenderer:fE,GridEmptyDataOverlay:yD,HeaderRenderer:CD,GridLoadingOverlay:PD,AgGridVue:Td,GridToolbar:qd,FooterCellRender:EE}}),AD=v.defineComponent({...MD,props:{id:null,rowIdMapper:{type:Function},columns:null,rowData:{type:Function},pageSize:{default:50},footerHeight:null,tools:{default:()=>["search","refresh","setting"]},searches:null,gridOptions:null},setup(e,{expose:t}){const o=e,i=v.ref(),s=v.ref(),{theme:n}=ID(),{gridOptions:r,dataCache:l,gridStyles:a,gridApi:d,gridElRef:c,reload:u,insertRows:h,existRow:g,getRows:p,refresh:f,resetGridState:C}=aE(o),{footerGridOptions:m,setFooterData:b,footerStyles:S}=TD(o,s,a);return v.provide(Dt,{refresh:f,resetGridState:C,api:d}),v.watch(()=>r.value,()=>{d.value&&d.value.updateGridOptions(N.omit(r.value,["scrollbarWidth","getRowId","suppressRowTransform","defaultColGroupDef"]))},{deep:!0}),t({setFooterData:b,updateGridOptions:w=>{d.value.updateGridOptions(w)},reload:u,refresh:f,getRows:p,createRow(w,y=!1){const R=l.value.createRow(w);return y?new kd(R,o.rowIdMapper,!0):R},existRow:g,insertRows:h,startEditing:()=>{const w=l.value.getRows().filter(y=>!y.isEditing());N.isEmpty(w)||(w.forEach(y=>y.startEditing()),u(),d.value.redrawRows())},stopEditing:()=>{const w=l.value.getRows().filter(y=>y.isEditing());N.isEmpty(w)||(w.forEach(y=>y.stopEditing()),u(),d.value.redrawRows())}}),{__sfc:!0,props:o,bottomRef:i,gridRef:s,theme:n,options:r,dataCache:l,gridStyles:a,gridApi:d,gridElRef:c,reload:u,insertRows:h,existRow:g,getRows:p,refresh:f,resetGridState:C,footerGridOptions:m,setFooterData:b,footerStyles:S,AgGridVue:Td,GridToolbar:qd,SearchButton:Xd,RefreshButton:Qd,SettingButton:ec}}});var kD=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)},LD=[],GD=ue(AD,kD,LD,!1,null,null);const HD=GD.exports;var OD=Object.defineProperty,BD=(e,t,o)=>t in e?OD(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,es=(e,t,o)=>BD(e,typeof t!="symbol"?t+"":t,o);const _D=e=>new tc(e);class tc{constructor(t){es(this,"colDef"),es(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}build(){return this.colDef.cellRendererParams=this.agGridCellRenderParams,this.colDef}}const ND=e=>new oc(e);class oc{constructor(t){es(this,"colDefs"),es(this,"rendersMap",new Map),this.colDefs=t,this.eachColDef(t,o=>{this.rendersMap.set(o.field,{})})}eachColDef(t,o){for(const i of t)Pd.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)}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}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=>{t.cellRendererParams=this.rendersMap.get(t.field)}),this.colDefs}}const VD=(e,t)=>({model:{value:N.get(e,t),callback:o=>{N.set(e,t,o)}}});Cc({theme:"legacy"});const WD={install:()=>{Dh.registerModules([IS,MS,AS,kS,GS,LS,sy,WS,_b,ba,fd,py,yy,Fy,Ly,HR,Qw,$y,Zy,Uy,oR,tb,QS,sd,iR,nR,Of,Vy,f0,p0,HS])}};J.CellRenderAdapter=tc,J.ClDrawerSearch=Zd,J.ClPopoverSearch=_E,J.ClSearch=kE,J.ColumnRendersBuilder=oc,J.GRID_CONTEXT=Dt,J.Grid=HD,J.GridDataSource=Fd,J.GridUtils=Pd,J.Searches=jn,J.VueGridPlugin=WD,J.vModel=VD,J.withColumnRenderBuilder=ND,J.withRender=_D,Object.defineProperty(J,Symbol.toStringTag,{value:"Module"})});
|
|
58
|
+
If you are trying to annotate ${i} with application data, use the '${i}.context' property instead.`),uo(c)}if(l.length>0&&s){const a=this.beans.frameworkOverrides.getDocLink(s);uo(`to see all the valid ${i} properties please check: ${a}`)}}getConsoleMessage(e,t){return hb(e,t)}};function Ob(e,t,o){const i={},s=e.filter(n=>!t.some(r=>r===n));return s.length>0&&s.forEach(n=>i[n]=An({inputValue:n,allSuggestions:o}).values),i}var Bb=new Set(["firstChildChanged","lastChildChanged","childIndexChanged"]),_b={moduleName:"Validation",version:H,beans:[Hb]},Wi=0,Nb=200,Vb=class extends F{constructor(){super(...arguments),this.beanName="popupSvc",this.popupList=[]}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.gridCtrl=e.gridCtrl}),this.addManagedEventListeners({gridStylesChanged:this.handleThemeChange.bind(this)})}getPopupParent(){const e=this.gos.get("popupParent");return e||this.gridCtrl.getGui()}positionPopupForMenu(e){const{eventSource:t,ePopup:o,column:i,node:s,event:n}=e,r=t.getBoundingClientRect(),l=this.getParentRect();this.setAlignedTo(t,o);let a=!1;const d=()=>{const c=this.keepXYWithinBounds(o,r.top-l.top,0),u=o.clientWidth>0?o.clientWidth:200;a||(o.style.minWidth=`${u}px`,a=!0);const g=l.right-l.left-u;let p;return this.gos.get("enableRtl")?(p=C(),p<0&&(p=f(),this.setAlignedStyles(o,"left")),p>g&&(p=0,this.setAlignedStyles(o,"right"))):(p=f(),p>g&&(p=C(),this.setAlignedStyles(o,"right")),p<0&&(p=0,this.setAlignedStyles(o,"left"))),{x:p,y:c};function f(){return r.right-l.left-2}function C(){return r.left-l.left-u}};this.positionPopup({ePopup:o,keepWithinBounds:!0,updatePosition:d,postProcessCallback:()=>this.callPostProcessPopup("subMenu",o,t,n instanceof MouseEvent?n:void 0,i,s)})}positionPopupUnderMouseEvent(e){const{ePopup:t,nudgeX:o,nudgeY:i,skipObserver:s}=e;this.positionPopup({ePopup:t,nudgeX:o,nudgeY:i,keepWithinBounds:!0,skipObserver:s,updatePosition:()=>this.calculatePointerAlign(e.mouseEvent),postProcessCallback:()=>this.callPostProcessPopup(e.type,e.ePopup,null,e.mouseEvent,e.column,e.rowNode)})}calculatePointerAlign(e){const t=this.getParentRect();return{x:e.clientX-t.left,y:e.clientY-t.top}}positionPopupByComponent(e){const{ePopup:t,nudgeX:o,nudgeY:i,keepWithinBounds:s,eventSource:n,alignSide:r="left",position:l="over",column:a,rowNode:d,type:c}=e,u=n.getBoundingClientRect(),h=this.getParentRect();this.setAlignedTo(n,t);const g=()=>{let p=u.left-h.left;r==="right"&&(p-=t.offsetWidth-u.width);let f;return l==="over"?(f=u.top-h.top,this.setAlignedStyles(t,"over")):(this.setAlignedStyles(t,"under"),this.shouldRenderUnderOrAbove(t,u,h,e.nudgeY||0)==="under"?f=u.top-h.top+u.height:f=u.top-t.offsetHeight-(i||0)*2-h.top),{x:p,y:f}};this.positionPopup({ePopup:t,nudgeX:o,nudgeY:i,keepWithinBounds:s,updatePosition:g,postProcessCallback:()=>this.callPostProcessPopup(c,t,n,null,a,d)})}shouldRenderUnderOrAbove(e,t,o,i){const s=o.bottom-t.bottom,n=t.top-o.top,r=e.offsetHeight+i;return s>r?"under":n>r||n>s?"above":"under"}setAlignedStyles(e,t){const o=this.getPopupIndex(e);if(o===-1)return;const i=this.popupList[o],{alignedToElement:s}=i;!s||(["right","left","over","above","under"].forEach(r=>{s.classList.remove(`ag-has-popup-positioned-${r}`),e.classList.remove(`ag-popup-positioned-${r}`)}),!t)||(s.classList.add(`ag-has-popup-positioned-${t}`),e.classList.add(`ag-popup-positioned-${t}`))}setAlignedTo(e,t){const o=this.getPopupIndex(t);if(o!==-1){const i=this.popupList[o];i.alignedToElement=e}}callPostProcessPopup(e,t,o,i,s,n){const r=this.gos.getCallback("postProcessPopup");r&&r({column:s,rowNode:n,ePopup:t,type:e,eventSource:o,mouseEvent:i})}positionPopup(e){const{ePopup:t,keepWithinBounds:o,nudgeX:i,nudgeY:s,skipObserver:n,updatePosition:r}=e,l={width:0,height:0},a=(d=!1)=>{let{x:c,y:u}=r();d&&t.clientWidth===l.width&&t.clientHeight===l.height||(l.width=t.clientWidth,l.height=t.clientHeight,i&&(c+=i),s&&(u+=s),o&&(c=this.keepXYWithinBounds(t,c,1),u=this.keepXYWithinBounds(t,u,0)),t.style.left=`${c}px`,t.style.top=`${u}px`,e.postProcessCallback&&e.postProcessCallback())};if(a(),!n){const d=ut(this.beans,t,()=>a(!0));setTimeout(()=>d(),Nb)}}getActivePopups(){return this.popupList.map(e=>e.element)}getParentRect(){const e=re(this.beans);let t=this.getPopupParent();return t===e.body?t=e.documentElement:getComputedStyle(t).position==="static"&&(t=t.offsetParent),fr(t)}keepXYWithinBounds(e,t,o){const i=o===0,s=i?"clientHeight":"clientWidth",n=i?"top":"left",r=i?"height":"width",l=i?"scrollTop":"scrollLeft",a=re(this.beans),d=a.documentElement,c=this.getPopupParent(),u=e.getBoundingClientRect(),h=c.getBoundingClientRect(),g=a.documentElement.getBoundingClientRect(),p=c===a.body,f=Math.ceil(u[r]);let m=p?(i?Bc:vs)(d)+d[l]:c[s];p&&(m-=Math.abs(g[n]-h[n]));const b=m-f;return Math.min(Math.max(t,0),Math.abs(b))}addPopup(e){const t=re(this.beans),{eChild:o,ariaLabel:i,ariaOwns:s,alwaysOnTop:n,positionCallback:r,anchorToElement:l}=e;if(!t)return G(122),{hideFunc:()=>{}};const a=this.getPopupIndex(o);if(a!==-1)return{hideFunc:this.popupList[a].hideFunc};this.initialisePopupPosition(o);const d=this.createPopupWrapper(o,!!n,i,s),c=this.addEventListenersToPopup({...e,wrapperEl:d});return r&&r(),this.addPopupToPopupList(o,d,c,l),{hideFunc:c}}initialisePopupPosition(e){const o=this.getPopupParent().getBoundingClientRect();L(e.style.top)||(e.style.top=`${o.top*-1}px`),L(e.style.left)||(e.style.left=`${o.left*-1}px`)}createPopupWrapper(e,t,o,i){const s=this.getPopupParent(),{environment:n,gos:r}=this.beans,l=ne({tag:"div"});return n.applyThemeClasses(l),l.classList.add("ag-popup"),e.classList.add(r.get("enableRtl")?"ag-rtl":"ag-ltr","ag-popup-child"),e.hasAttribute("role")||Ye(e,"dialog"),o?no(e,o):i&&(e.id||(e.id=`popup-component-${Wi}`),lr(i,e.id)),l.appendChild(e),s.appendChild(l),t?this.setAlwaysOnTop(e,!0):this.bringPopupToFront(e),l}handleThemeChange(e){if(e.themeChanged){const t=this.beans.environment;for(const o of this.popupList)t.applyThemeClasses(o.wrapper)}}addEventListenersToPopup(e){const t=this.beans,o=re(t),i=this.getPopupParent(),{wrapperEl:s,eChild:n,closedCallback:r,afterGuiAttached:l,closeOnEsc:a,modal:d,ariaOwns:c}=e;let u=!1;const h=C=>{if(!s.contains(ee(t)))return;C.key===x.ESCAPE&&!$e(C)&&f({keyboardEvent:C})},g=C=>f({mouseEvent:C}),p=C=>f({touchEvent:C}),f=(C={})=>{const{mouseEvent:m,touchEvent:b,keyboardEvent:S,forceHide:w}=C;!w&&(this.isEventFromCurrentPopup({mouseEvent:m,touchEvent:b},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||b||S),this.removePopupFromPopupList(n,c))};return l&&l({hidePopup:f}),window.setTimeout(()=>{a&&o.addEventListener("keydown",h),d&&(o.addEventListener("mousedown",g),this.eventSvc.addEventListener("dragStarted",g),o.addEventListener("touchstart",p),o.addEventListener("contextmenu",g))},0),f}addPopupToPopupList(e,t,o,i){this.popupList.push({element:e,wrapper:t,hideFunc:o,instanceId:Wi,isAnchored:!!i}),i&&this.setPopupPositionRelatedToElement(e,i),Wi=Wi+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&&lr(t,null),this.popupList=this.popupList.filter(o=>o.element!==e)}keepPopupPositionedRelativeTo(e){const t=this.getPopupParent(),o=t.getBoundingClientRect(),{element:i,ePopup:s}=e,n=i.getBoundingClientRect(),r=u=>parseInt(u.substring(0,u.length-1),10),l=(u,h)=>{const g=o[u]-n[u],p=r(s.style[u]);return{initialDiff:g,lastDiff:g,initial:p,last:p,direction:h}},a=l("top",0),d=l("left",1),c=this.beans.frameworkOverrides;return new mo(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 b=r(s.style[m]);C.last!==b&&(C.initial=b,C.last=b);const S=h[m]-g[m];if(S!=C.lastDiff){const w=this.keepXYWithinBounds(s,C.initial+C.initialDiff-S,C.direction);s.style[m]=`${w}px`,C.last=w}C.lastDiff=S};f(a,"top"),f(d,"left")},200).then(h=>{u(()=>{h!=null&&window.clearInterval(h)})})},"popupPositioning")})}hasAnchoredPopup(){return this.popupList.some(e=>e.isAnchored)}isEventFromCurrentPopup(e,t){const{mouseEvent:o,touchEvent:i}=e,s=o||i;if(!s)return!1;const n=this.getPopupIndex(t);if(n===-1)return!1;for(let r=n;r<this.popupList.length;r++){const l=this.popupList[r];if(cu(l.element,s))return!0}return this.isElementWithinCustomPopup(s.target)}isElementWithinCustomPopup(e){const t=re(this.beans);for(;e&&e!==t.body;){if(e.classList.contains("ag-custom-component-popup")||e.parentElement===null)return!0;e=e.parentElement}return!1}getWrapper(e){for(;!e.classList.contains("ag-popup")&&e.parentElement;)e=e.parentElement;return e.classList.contains("ag-popup")?e:null}setAlwaysOnTop(e,t){const o=this.getWrapper(e);o&&(o.classList.toggle("ag-always-on-top",!!t),t&&this.bringPopupToFront(o))}bringPopupToFront(e){const t=this.getPopupParent(),o=Array.prototype.slice.call(t.querySelectorAll(".ag-popup")),i=o.length,s=this.getWrapper(e);if(!s||i<=1||!t.contains(e))return;const n=[],r=[];for(const h of o)h!==s&&(h.classList.contains("ag-always-on-top")?r.push(h):n.push(h));const l=[],a=r.length,u=s.classList.contains("ag-always-on-top")||!a?[...n,...r,s]:[...n,s,...r];for(let h=0;h<=i;h++){const g=u[h];if(o[h]===u[h]||g===s)continue;g.querySelectorAll("div").forEach(f=>{f.scrollTop!==0&&l.push([f,f.scrollTop])}),h===0?t.insertAdjacentElement("afterbegin",g):u[h-1].insertAdjacentElement("afterend",g)}for(;l.length;){const h=l.pop();h[0].scrollTop=h[1]}}},id={moduleName:"Popup",version:H,beans:[Vb]},Wb=".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}}",Gn=(e,t,o)=>{var l,a,d;const{editModelSvc:i}=e,s=(a=(l=i==null?void 0:i.getCellValidationModel())==null?void 0:l.getCellValidation(t))==null?void 0:a.errorMessages,n=(d=i==null?void 0:i.getRowValidationModel().getRowValidation(t))==null?void 0:d.errorMessages,r=s||n;return r&&r.length?r.join(o("tooltipValidationErrorSeparator",". ")):void 0},zb=class extends F{constructor(){super(...arguments),this.beanName="tooltipSvc"}setupHeaderTooltip(e,t,o,i){e&&t.destroyBean(e);const s=Ln(this.gos),{column:n,eGui:r}=t,l=n.getColDef();!i&&s&&!l.headerComponent&&(i=jo(()=>r.querySelector(".ag-header-cell-text")));const a={getColumn:()=>n,getColDef:()=>n.getColDef(),getGui:()=>r,getLocation:()=>"header",getTooltipValue:()=>o??n.getColDef().headerTooltip,shouldDisplayTooltip:i};let d=this.createTooltipFeature(a);return d&&(d=t.createBean(d),t.setRefreshFunction("tooltip",()=>d.refreshTooltip())),d}setupHeaderGroupTooltip(e,t,o,i){e&&t.destroyBean(e);const s=Ln(this.gos),{column:n,eGui:r}=t,l=n.getColGroupDef();!i&&s&&!(l!=null&&l.headerGroupComponent)&&(i=jo(()=>r.querySelector(".ag-header-group-text")));const a={getColumn:()=>n,getGui:()=>r,getLocation:()=>"headerGroup",getTooltipValue:()=>o??(l&&l.headerTooltip),shouldDisplayTooltip:i};l&&(a.getColDef=()=>l);const d=this.createTooltipFeature(a);return d&&t.createBean(d)}enableCellTooltipFeature(e,t,o){const{beans:i}=this,{gos:s,editSvc:n}=i,{column:r,rowNode:l}=e;let a="cell";const d=()=>{const g=!!!(n!=null&&n.isEditing(e))&&Gn(i,e,this.getLocaleTextFunc());if(g)return a="cellEditor",g;a="cell";const p=r.getColDef(),f=l.data;if(p.tooltipField&&L(f))return so(f,p.tooltipField,r.isTooltipFieldContainsDots());const C=p.tooltipValueGetter;return C?C(V(s,{location:"cell",colDef:r.getColDef(),column:r,rowIndex:e.cellPosition.rowIndex,node:l,data:l.data,value:e.value,valueFormatted:e.valueFormatted})):null},c=Ln(s);o||(c&&!e.isCellRenderer()?o=()=>{const h=!!(n!=null&&n.isEditing(e));if(!h&&Gn(i,e,this.getLocaleTextFunc()))return!0;if(!r.isTooltipEnabled())return!1;const f=jo(()=>{const C=e.eGui;return C.children.length===0?C:C.querySelector(".ag-cell-value")});return!h&&f()}:o=()=>!(n!=null&&n.isEditing(e)));const u={getColumn:()=>r,getColDef:()=>r.getColDef(),getRowIndex:()=>e.cellPosition.rowIndex,getRowNode:()=>l,getGui:()=>e.eGui,getLocation:()=>a,getTooltipValue:t!=null?()=>t:d,getValueFormatted:()=>e.valueFormatted,shouldDisplayTooltip:o};return this.createTooltipFeature(u,i)}setupFullWidthRowTooltip(e,t,o,i){const s={getGui:()=>t.getFullWidthElement(),getTooltipValue:()=>o,getLocation:()=>"fullWidthRow",shouldDisplayTooltip:i},n=this.beans,r=n.context;e&&t.destroyBean(e,r);const l=this.createTooltipFeature(s,n);if(l)return t.createBean(l,r)}setupCellEditorTooltip(e,t){var l,a;const{beans:o}=this,{context:i}=o,s=((l=t.getValidationElement)==null?void 0:l.call(t,!0))||!((a=t.isPopup)!=null&&a.call(t))&&e.eGui;if(!s)return;const n={getGui:()=>s,getTooltipValue:()=>Gn(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=L(t.tooltipField)||L(t.tooltipValueGetter)||L(t.tooltipComponent)}createTooltipFeature(e,t){return this.beans.registry.createDynamicBean("tooltipFeature",!1,e,t)}},sd={moduleName:"Tooltip",version:H,beans:[zb],dynamicBeans:{tooltipFeature:Fb},userComponents:{agTooltipComponent:Rb},dependsOn:[id],css:[Wb]},$b=".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}",Ub={tag:"div",cls:"ag-cell-wrapper ag-cell-edit-wrapper ag-checkbox-edit",children:[{tag:"ag-checkbox",ref:"eEditor",role:"presentation"}]},Kb=class extends Li{constructor(){super(Ub,[ln]),this.eEditor=A}initialiseEditor(e){const t=e.value??void 0,o=this.eEditor;o.setValue(t),o.getInputElement().setAttribute("tabindex","-1"),this.setAriaLabel(t),this.addManagedListeners(o,{fieldValueChanged:s=>this.setAriaLabel(s.selected)})}getValue(){return this.eEditor.getValue()}focusIn(){this.eEditor.getFocusableElement().focus()}afterGuiAttached(){this.params.cellStartedEdit&&this.focusIn()}isPopup(){return!1}setAriaLabel(e){const t=this.getLocaleTextFunc(),o=ar(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}},zi=class extends Li{constructor(e){super(),this.cellEditorInput=e,this.eEditor=A}initialiseEditor(e){const{cellEditorInput:t}=this;this.setTemplate({tag:"div",cls:"ag-cell-edit-wrapper",children:[t.getTemplate()]},t.getAgComponents());const{eEditor:o}=this,{cellStartedEdit:i,eventKey:s,suppressPreventDefault:n}=e;o.getInputElement().setAttribute("title",""),t.init(o,e);let r,l=!0;i?(this.focusAfterAttached=!0,s===x.BACKSPACE||s===x.DELETE?r="":s&&s.length===1?n?l=!1:r=s:(r=t.getStartValue(),s!==x.F2&&(this.highlightAllOnFocus=!0))):(this.focusAfterAttached=!1,r=t.getStartValue()),l&&r!=null&&o.setStartValue(r),this.addGuiEventListener("keydown",a=>{const{key:d}=a;(d===x.PAGE_UP||d===x.PAGE_DOWN)&&a.preventDefault()})}afterGuiAttached(){var i,s;const e=this.getLocaleTextFunc(),t=this.eEditor;if(t.setInputAriaLabel(e("ariaInputEditor","Input Editor")),!this.focusAfterAttached)return;It()||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()}},jb={tag:"ag-input-date-field",ref:"eEditor",cls:"ag-cell-editor"},qb=class{constructor(e,t){this.getDataTypeService=e,this.getLocaleTextFunc=t}getTemplate(){return jb}getAgComponents(){return[na]}init(e,t){var r,l;this.eEditor=e,this.params=t;const{min:o,max:i,step:s,colDef:n}=t;o!=null&&e.setMin(o),i!=null&&e.setMax(i),s!=null&&e.setStep(s),this.includeTime=t.includeTime??((l=(r=this.getDataTypeService())==null?void 0:r.getDateIncludesTimeFlag)==null?void 0:l.call(r,n.cellDataType)),this.includeTime!=null&&e.setIncludeTime(this.includeTime)}getValidationErrors(){const t=this.eEditor.getInputElement().valueAsDate,{params:o}=this,{min:i,max:s,getValidationErrors:n}=o;let r=[];const l=this.getLocaleTextFunc();if(t instanceof Date&&!isNaN(t.getTime())){if(i){const a=i instanceof Date?i:new Date(i);if(t<a){const d=a.toLocaleDateString();r.push(l("minDateValidation",`Date must be after ${d}`,[d]))}}if(s){const a=s instanceof Date?s:new Date(s);if(t>a){const d=a.toLocaleDateString();r.push(l("maxDateValidation",`Date must be before ${d}`,[d]))}}}return r.length||(r=null),n?n({value:t,cellEditorParams:o,internalErrors:r}):r}getValue(){const{eEditor:e,params:t}=this,o=e.getDate();return!L(o)&&!L(t.value)?t.value:o??null}getStartValue(){const{value:e}=this.params;if(e instanceof Date)return tt(e,this.includeTime??!1)}},Yb=class extends zi{constructor(){super(new qb(()=>this.beans.dataTypeSvc,()=>this.getLocaleTextFunc()))}},Zb={tag:"ag-input-date-field",ref:"eEditor",cls:"ag-cell-editor"},Xb=class{constructor(e,t){this.getDataTypeService=e,this.getLocaleTextFunc=t}getTemplate(){return Zb}getAgComponents(){return[na]}init(e,t){var r,l;this.eEditor=e,this.params=t;const{min:o,max:i,step:s,colDef:n}=t;o!=null&&e.setMin(o),i!=null&&e.setMax(i),s!=null&&e.setStep(s),this.includeTime=t.includeTime??((l=(r=this.getDataTypeService())==null?void 0:r.getDateIncludesTimeFlag)==null?void 0:l.call(r,n.cellDataType)),this.includeTime!=null&&e.setIncludeTime(this.includeTime)}getValidationErrors(){const{eEditor:e,params:t}=this,o=e.getInputElement().value,i=this.formatDate(this.parseDate(o??void 0)),{min:s,max:n,getValidationErrors:r}=t;let l=[];if(i){const a=new Date(i),d=this.getLocaleTextFunc();if(s){const c=new Date(s);if(a<c){const u=c.toLocaleDateString();l.push(d("minDateValidation",`Date must be after ${u}`,[u]))}}if(n){const c=new Date(n);if(a>c){const u=c.toLocaleDateString();l.push(d("maxDateValidation",`Date must be before ${u}`,[u]))}}}return l.length||(l=null),r?r({value:this.getValue(),cellEditorParams:t,internalErrors:l}):l}getValue(){const{params:e,eEditor:t}=this,o=this.formatDate(t.getDate());return!L(o)&&!L(e.value)?e.value:e.parseValue(o??"")}getStartValue(){return tt(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):yo(e)??void 0}formatDate(e){const t=this.getDataTypeService();return t?t.getDateFormatterFunction(this.params.column)(e):tt(e??null,this.includeTime??!1)??void 0}},Qb=class extends zi{constructor(){super(new Xb(()=>this.beans.dataTypeSvc,()=>this.getLocaleTextFunc()))}},Jb={tag:"div",cls:"ag-large-text",children:[{tag:"ag-input-text-area",ref:"eEditor",cls:"ag-large-text-input"}]},eS=class extends Li{constructor(){super(Jb,[Up]),this.eEditor=A}initialiseEditor(e){const{eEditor:t}=this,{cellStartedEdit:o,eventKey:i,value:s,maxLength:n,cols:r,rows:l}=e;this.focusAfterAttached=o,t.getInputElement().setAttribute("title",""),t.setMaxLength(n||200).setCols(r||60).setRows(l||10);let a;o?(this.focusAfterAttached=!0,i===x.BACKSPACE||i===x.DELETE?a="":i&&i.length===1?a=i:(a=s.toString(),i!==x.F2&&(this.highlightAllOnFocus=!0))):(this.focusAfterAttached=!1,a=s.toString()),a!=null&&t.setValue(a,!0),this.addGuiEventListener("keydown",this.onKeyDown.bind(this)),this.activateTabIndex()}onKeyDown(e){const t=e.key;(t===x.LEFT||t===x.UP||t===x.RIGHT||t===x.DOWN||e.shiftKey&&t===x.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!L(i)&&!L(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}},tS={tag:"ag-input-number-field",ref:"eEditor",cls:"ag-cell-editor"},oS=class{constructor(e){this.getLocaleTextFunc=e}getTemplate(){return tS}getAgComponents(){return[jp]}init(e,t){this.eEditor=e,this.params=t;const{max:o,min:i,precision:s,step:n}=t;o!=null&&e.setMax(o),i!=null&&e.setMin(i),s!=null&&e.setPrecision(s),n!=null&&e.setStep(n);const r=e.getInputElement();t.preventStepping?e.addManagedElementListeners(r,{keydown:this.preventStepping}):t.showStepperButtons&&r.classList.add("ag-number-field-input-stepper")}getValidationErrors(){const{params:e}=this,{min:t,max:o,getValidationErrors:i}=e,n=this.eEditor.getInputElement().valueAsNumber,r=this.getLocaleTextFunc();let l=[];return typeof n=="number"&&(t!=null&&n<t&&l.push(r("minValueValidation",`Must be greater than or equal to ${t}.`,[String(t)])),o!=null&&n>o&&l.push(r("maxValueValidation",`Must be less than or equal to ${o}.`,[String(o)]))),l.length||(l=null),i?i({value:n,cellEditorParams:e,internalErrors:l}):l}preventStepping(e){(e.key===x.UP||e.key===x.DOWN)&&e.preventDefault()}getValue(){const{eEditor:e,params:t}=this,o=e.getValue();if(!L(o)&&!L(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(){It()&&this.eEditor.getInputElement().focus({preventScroll:!0})}},iS=class extends zi{constructor(){super(new oS(()=>this.getLocaleTextFunc()))}},sS={tag:"div",cls:"ag-cell-edit-wrapper",children:[{tag:"ag-select",ref:"eEditor",cls:"ag-cell-editor"}]},nS=class extends Li{constructor(){super(sS,[tf]),this.eEditor=A,this.startedByEnter=!1}wireBeans(e){this.valueSvc=e.valueSvc}initialiseEditor(e){this.focusAfterAttached=e.cellStartedEdit;const{eEditor:t,valueSvc:o,gos:i}=this,{values:s,value:n,eventKey:r}=e;if(q(s)){G(58);return}this.startedByEnter=r!=null?r===x.ENTER:!1;let l=!1;s.forEach(u=>{const h={value:u},g=o.formatValue(e.column,null,u),p=g!=null;h.text=p?g:u,t.addOption(h),l=l||n===u}),l?t.setValue(e.value,!0):e.values.length&&t.setValue(e.values[0],!0);const{valueListGap:a,valueListMaxWidth:d,valueListMaxHeight:c}=e;a!=null&&t.setPickerGap(a),c!=null&&t.setPickerMaxHeight(c),d!=null&&t.setPickerMaxWidth(d),i.get("editType")!=="fullRow"&&this.addManagedListeners(this.eEditor,{selectedItem:()=>e.stopEditing()})}afterGuiAttached(){this.focusAfterAttached&&this.eEditor.getFocusableElement().focus(),this.startedByEnter&&setTimeout(()=>{this.isAlive()&&this.eEditor.showPicker()})}focusIn(){this.eEditor.getFocusableElement().focus()}getValue(){return this.eEditor.getValue()}isPopup(){return!1}getValidationElement(){return this.eEditor.getAriaElement()}getValidationErrors(){const{params:e}=this,{values:t,getValidationErrors:o}=e,i=this.getValue();let s=[];if(t&&!t.includes(i)){const n=this.getLocaleTextFunc();s.push(n("invalidSelectionValidation","Invalid selection."))}else s=null;return o?o({value:i,internalErrors:s,cellEditorParams:e}):s}},rS={tag:"ag-input-text-field",ref:"eEditor",cls:"ag-cell-editor"},lS=class{constructor(e){this.getLocaleTextFunc=e}getTemplate(){return rS}getAgComponents(){return[zp]}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!L(o)&&!L(t.value)?t.value:t.parseValue(o)}getStartValue(){const e=this.params;return e.useFormatter||e.column.getColDef().refData?e.formatValue(e.value):e.value}setCaret(){const e=this.eEditor,t=e.getValue(),o=L(t)&&t.length||0;o&&e.getInputElement().setSelectionRange(o,o)}},nd=class extends zi{constructor(){super(new lS(()=>this.getLocaleTextFunc()))}};function aS(e){return e.ctrlsSvc.getScrollFeature().getVScrollPosition()}function dS(e){return e.ctrlsSvc.getScrollFeature().getHScrollPosition()}function rd(e,t,o="auto"){e.frameworkOverrides.wrapIncoming(()=>e.ctrlsSvc.getScrollFeature().ensureColumnVisible(t,o),"ensureVisible")}function ld(e,t,o){e.frameworkOverrides.wrapIncoming(()=>e.ctrlsSvc.getScrollFeature().ensureIndexVisible(t,o),"ensureVisible")}function cS(e,t,o=null){e.frameworkOverrides.wrapIncoming(()=>e.ctrlsSvc.getScrollFeature().ensureNodeVisible(t,o),"ensureVisible")}function uS(e){var i;const t=(i=e.editModelSvc)==null?void 0:i.getEditMap(),o=[];return t==null||t.forEach((s,n)=>{const{rowIndex:r,rowPinned:l}=n;s.forEach((a,d)=>{const{editorValue:c,pendingValue:u,sourceValue:h,state:g}=a,p=et(a);let f=c??u;f===we&&(f=void 0);const C={newValue:f,oldValue:h,state:g,column:d,colId:d.getColId(),colKey:d.getColId(),rowIndex:r,rowPinned:l};(g==="editing"||g==="changed"&&p)&&o.push(C)})}),o}function hS(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)}):wt(e,!0),$t(e)):o==null||o.stopEditing(void 0,{cancel:t,source:"api"})}function gS(e,t){var i;const o=Z(e,t);return((i=e.editSvc)==null?void 0:i.isEditing(o))??!1}function pS(e,t){const{key:o,colKey:i,rowIndex:s,rowPinned:n}=t,{editSvc:r,colModel:l}=e,a=l.getCol(i);if(!a){G(12,{colKey:i});return}const c=vt(e,{rowIndex:s,rowPinned:n||null});if(!c){G(290,{rowIndex:s,rowPinned:n});return}if(!a.isCellEditable(c))return;n==null&&ld(e,s),rd(e,i),r==null||r.startEditing({rowNode:c,column:a},{event:o?new KeyboardEvent("keydown",{key:o}):void 0,source:"api"})}function fS(e){var t;return((t=e.editSvc)==null?void 0:t.validateEdit())||null}var CS={tag:"div",cls:"ag-popup-editor",attrs:{tabindex:"-1"}},mS=class extends nn{constructor(e){super(CS),this.params=e}postConstruct(){gt(this.gos,this.getGui(),"popupEditorWrapper",!0),this.addKeyDownListener()}addKeyDownListener(){const e=this.getGui(),t=this.params,o=i=>{Zs(this.gos,i,t.node,t.column,!0)||t.onKeyDown(i)};this.addManagedElementListeners(e,{keydown:o})}},$i=(e,t=!1)=>{if(e!==void 0)return et(e)||t&&e.state==="editing"};function ad(e,t,o=!1){var i;return $i((i=e.editModelSvc)==null?void 0:i.getEdit(t),o)}function dd(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($i(o==null?void 0:o.getEdit({rowNode:n,column:i}))||$i(o==null?void 0:o.getEdit({rowNode:n.pinnedSibling,column:i})))return!0}function cd(e,{rowNode:t,column:o}){var i;if(t=t.pinnedSibling,!!t)return $i((i=e.editModelSvc)==null?void 0:i.getEdit({rowNode:t,column:o}))}var vS=class extends F{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=ad(o,e)||dd(o,e)||cd(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)}},wS=class extends F{constructor(e,t){super(),this.rowCtrl=e,this.beans=t,this.gos=t.gos,this.editSvc=t.editSvc,this.editModelSvc=t.editModelSvc}applyRowStyles(){var r;const{rowCtrl:e,editModelSvc:t,beans:o}=this;let i=e.rowNode,s=t==null?void 0:t.getEditRow(i);const n=(r=this.editModelSvc)==null?void 0:r.getRowValidationModel().hasRowValidation({rowNode:i});if(!s&&i.pinnedSibling&&(i=i.pinnedSibling,s=t==null?void 0:t.getEditRow(i)),s){const l=Array.from(s.keys()).some(a=>{const d={rowNode:i,column:a};return ad(o,d,!0)||dd(o,d)||cd(o,d)});this.applyStyle(n,l);return}this.applyStyle(n)}applyStyle(e=!1,t=!1){var s,n;const o=((s=this.editSvc)==null?void 0:s.isBatchEditing())??!1,i=this.gos.get("editType")==="fullRow";(n=this.rowCtrl)==null||n.forEachGui(void 0,({rowComp:r})=>{r.toggleCss("ag-row-editing",i&&t),r.toggleCss("ag-row-batch-edit",i&&t&&o),r.toggleCss("ag-row-inline-editing",t),r.toggleCss("ag-row-not-inline-editing",!t),r.toggleCss("ag-row-editing-invalid",i&&t&&e)})}},bS=({rowModel:e,pinnedRowModel:t,editModelSvc:o},i)=>{const s=new Set;return e.forEachNode(n=>i.has(n)&&s.add(n)),t==null||t.forEachPinnedRow("top",n=>i.has(n)&&s.add(n)),t==null||t.forEachPinnedRow("bottom",n=>i.has(n)&&s.add(n)),i.forEach(n=>{s.has(n)||o.removeEdits({rowNode:n})}),s},SS=({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}))})},yS=e=>()=>{const t=new Set(e.colModel.getCols()),o=e.editModelSvc.getEditMap(!0),i=new Set(o.keys());SS(e,bS(e,i),t)},RS=new Set(["undo","redo"]),ud={paste:"ui",rangeSvc:"ui",fillHandle:"api",cellClear:"api"},xS=new Set(Object.keys(ud)),ES=new Set(["paste","rangeSvc","renderer","cellClear","redo","undo"]),Ui={cancel:!0,source:"api"},DS={cancel:!1,source:"api"},eo={checkSiblings:!0},Ao={force:!0,suppressFlash:!0},FS=class extends F{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,Ui),this.createStrategy(i)});const t=yS(e),o=()=>{const i=this.model.getCellValidationModel().getCellValidationMap().size>0,s=this.model.getRowValidationModel().getRowValidationMap().size>0;return i||s?this.stopEditing(void 0,Ui):this.isEditing()&&(this.isBatchEditing()?$t(e,this.model.getEditPositions()):this.stopEditing(void 0,DS)),!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,Ui)):(this.stopEditing(void 0,Ui),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 $h(this.beans)}isEditing(e,t){return this.model.hasEdits(e,t??eo)}isRowEditing(e,t){return(e&&this.model.hasRowEdits(e,t))??!1}startEditing(e,t){var a;const{startedEdit:o=!0,event:i=null,source:s="ui",ignoreEventKey:n=!1}=t;if(this.strategy??(this.strategy=this.createStrategy()),!this.isCellEditable(e,"api"))return;const r=Z(this.beans,e);if(r&&!r.comp){r.onCompAttachedFuncs.push(()=>this.startEditing(e,t));return}const l=(a=this.shouldStartEditing)==null?void 0:a.call(this,e,i,o,s);if(l===!1&&s!=="api"){this.isEditing(e)&&this.stopEditing();return}!this.batch&&this.shouldStopEditing(e,void 0,s)&&this.stopEditing(void 0,{source:s}),l&&this.isBatchEditing()&&this.dispatchBatchEvent("batchEditingStarted",new Map),this.strategy.start(e,i,s,n)}stopEditing(e,t){var p,f,C;const{event:o,cancel:i,source:s="ui",suppressNavigateAfterEdit:n}=t||{},{beans:r,model:l}=this;if(xS.has(s))return this.isBatchEditing()?(this.bulkRefresh(e),!1):this.stopEditing(e,{...t,source:ud[s]});if(!(this.isEditing(e)||this.isBatchEditing()&&l.hasEdits(e,eo))||!this.strategy)return!1;const d=Z(r,e);d&&(d.onEditorAttachedFuncs=[]);let c=l.getEditMap(!0),u=!1;const h=!i&&!!this.shouldStopEditing(e,o,s),g=i&&!!this.shouldCancelEditing(e,o,s);if(h||g){wt(r,!0);const m=l.getEditMap();this.processEdits(m,i),(p=this.strategy)==null||p.stop(i,o),this.bulkRefresh(void 0,c),c=m,u||(u=h)}else if(o instanceof KeyboardEvent&&this.batch&&((f=this.strategy)!=null&&f.midBatchInputsAllowed(e))&&this.isEditing(e,{withOpenEditor:!0})){const m=o.key,b=m===x.ENTER,S=m===x.ESCAPE,w=m===x.TAB;(b||w||S)&&(b||w?wt(r,!0):S&&this.revertSingleCellEdit(d),this.isBatchEditing()?(C=this.strategy)==null||C.cleanupEditors():$t(r,l.getEditPositions(),{event:o}),o.preventDefault(),this.bulkRefresh(e,c,{suppressFlash:!0}),c=l.getEditMap())}else wt(r,!0),c=l.getEditMap();return u&&e&&this.model.removeEdits(e),!n&&d&&this.navigateAfterEdit(o instanceof KeyboardEvent&&o.shiftKey,d.cellPosition),_s(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?x.UP:x.DOWN;(i=this.beans.navigation)==null||i.navigateToNextCell(null,s,t,!1)}}processEdits(e,t=!1){var r,l,a;const o=Array.from(e.keys()),{beans:i}=this,s=this.model.getCellValidationModel().getCellValidationMap().size>0||this.model.getRowValidationModel().getRowValidationMap().size>0,n=[];for(const d of o){const c=e.get(d);for(const u of c.keys()){const h=c.get(u),g={rowNode:d,column:u},p=Z(i,g),f=et(h),C=(a=(l=(r=p==null?void 0:p.comp)==null?void 0:r.getCellEditor())==null?void 0:l.isCancelAfterEnd)==null?void 0:a.call(l);!t&&!C&&f&&!s&&(this.setNodeDataValue(d,u,h.pendingValue)||n.push(g)),p==null||p.refreshCell(Ao)}}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(Ao)),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(Ao)}dispatchEditValuesChanged({rowNode:e,column:t},o={}){if(!e||!t||!o)return;const{pendingValue:i,sourceValue:s}=o,{rowIndex:n,rowPinned:r,data:l}=e;this.beans.eventSvc.dispatchEvent({type:"cellEditValuesChanged",node:e,rowIndex:n,rowPinned:r,column:t,source:"api",data:l,newValue:i,oldValue:s,value:i,colDef:t.getColDef()})}bulkRefresh(e={},t,o={}){var l;const{beans:i,gos:s}=this,{editModelSvc:n,rowModel:r}=i;de(s)&&(e.rowNode&&e.column?this.refCell(e,this.model.getEdit(e),o):t&&((l=n==null?void 0:n.getEditMap(!1))==null||l.forEach((a,d)=>{for(const c of a.keys())this.refCell({rowNode:d,column:c},a.get(c),o)})))}refCell({rowNode:e,column:t},o,i={}){var u;const{beans:s,gos:n}=this,r=new Set([e]),l=new Set,a=e.pinnedSibling;a&&r.add(a);const d=e.sibling;d&&l.add(d);let c=e.parent;for(;c;)(u=c.sibling)!=null&&u.footer&&n.get("groupTotalRow")||!c.parent&&c.sibling&&n.get("grandTotalRow")?l.add(c.sibling):l.add(c),c=c.parent;r.forEach(h=>this.dispatchEditValuesChanged({rowNode:h,column:t},o)),r.forEach(h=>{var g;return(g=Z(s,{rowNode:h,column:t}))==null?void 0:g.refreshCell(i)}),l.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 l=Z(this.beans,e);return this.cellEditingInvalidCommitBlocks()?((i=t==null?void 0:t.preventDefault)==null||i.call(t),o&&(!(l!=null&&l.hasBrowserFocus())&&(l==null||l.focusCell()),(r=(n=(s=l==null?void 0:l.comp)==null?void 0:s.getCellEditor())==null?void 0:n.focusIn)==null||r.call(n)),"block-stop"):(l&&this.revertSingleCellEdit(l),"revert-continue")}return"continue"}revertSingleCellEdit(e,t=!1){var i,s,n,r,l;const o=Z(this.beans,e);(i=o==null?void 0:o.comp)!=null&&i.getCellEditor()&&($t(this.beans,[e],{silent:!0}),this.model.clearEditValue(e),zt(this.beans,e,{silent:!0}),bt(this.beans),o==null||o.refreshCell(Ao),(s=o.rowCtrl.rowEditStyleFeature)==null||s.applyRowStyles(),t&&(o==null||o.focusCell(),(l=(r=(n=o==null?void 0:o.comp)==null?void 0:n.getCellEditor())==null?void 0:r.focusIn)==null||l.call(r)))}hasValidationErrors(e){var i;bt(this.beans);const t=Z(this.beans,e);t&&(t.refreshCell(Ao),(i=t.rowCtrl.rowEditStyleFeature)==null||i.applyRowStyles());let o=!1;return e!=null&&e.rowNode?(o||(o=this.model.getRowValidationModel().hasRowValidation({rowNode:e.rowNode})),e.column&&(o||(o=this.model.getCellValidationModel().hasCellValidation({rowNode:e.rowNode,column:e.column})))):(o||(o=this.model.getCellValidationModel().getCellValidationMap().size>0),o||(o=this.model.getRowValidationModel().getRowValidationMap().size>0)),o}moveToNextCell(e,t,o,i="ui"){var l;let s;const n=this.isEditing(),r=n&&this.checkNavWithValidation(void 0,o)==="block-stop";return e instanceof Kt&&n&&(s=(l=this.strategy)==null?void 0:l.moveToNextEditingCell(e,t,o,i,r)),s===null||(s=s||!!this.beans.focusSvc.focusedHeader,s===!1&&!r&&this.stopEditing()),s}getCellDataValue({rowNode:e,column:t},o=!0){if(!e||!t)return;let i=this.model.getEdit({rowNode:e,column:t});const s=e.pinnedSibling;if(s){const r=this.model.getEdit({rowNode:s,column:t});r&&(i=r)}const n=o?(i==null?void 0:i.editorValue)??(i==null?void 0:i.pendingValue):i==null?void 0:i.pendingValue;return n===we||!i?this.valueSvc.getValue(t,e,!0,"api"):n}getRowDataValue(e,t){return this.model.getEditRowDataValue(e,t)}addStopEditingWhenGridLosesFocus(e){Bh(this,this.beans,e)}createPopupEditorWrapper(e){return new mS(e)}setDataValue(e,t,o){var r;if((!this.isEditing()||o==="commit")&&!ES.has(o))return;const{beans:i}=this;this.strategy??(this.strategy=this.createStrategy());const s=this.isBatchEditing()?"ui":"api";if(!o||RS.has(o))return Ci(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 Ci(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 Ci(i,e,!0,t),this.stopEditing(e,{source:s,suppressNavigateAfterEdit:!0}),!0}handleColDefChanged(e){Vh(this.beans,e)}destroy(){this.model.clear(),this.destroyStrategy(),super.destroy()}prepDetailsDuringBatch(e,t){if(!this.batch||!this.model.hasRowEdits(e.rowNode,eo))return;const{rowNode:i,column:s}=e,{compDetails:n,valueToDisplay:r}=t;if(n){const{params:a}=n;return a.data=this.model.getEditRowDataValue(i,eo),{compDetails:n}}const l=this.model.getEditRow(e.rowNode,eo);if(r!==void 0&&(l!=null&&l.has(s)))return{valueToDisplay:this.valueSvc.getValue(s,i)}}cleanupEditors(){var e;(e=this.strategy)==null||e.cleanupEditors()}dispatchCellEvent(e,t,o,i){var s;(s=this.strategy)==null||s.dispatchCellEvent(e,t,o,i)}dispatchRowEvent(e,t){var o;(o=this.strategy)==null||o.dispatchRowEvent(e,t)}dispatchBatchEvent(e,t){this.eventSvc.dispatchEvent(this.createBatchEditEvent(e,t))}createBatchEditEvent(e,t){return V(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;wt(i,!0);const r=this.model.getEditMap(!0),l=(c=(d=r.get(e))==null?void 0:d.get(t))==null?void 0:c.pendingValue;this.batch||this.eventSvc.dispatchEvent({type:"bulkEditingStarted"}),o.forEach(u=>{if(s==null||s.forEachRowInRange(u,h=>{const g=vt(i,h);if(g===void 0)return;const p=r.get(g)??new Map;for(const f of u.columns)if(f&&this.isCellEditable({rowNode:g,column:f},"api")){const C=n.getValue(f,g,!0,"api");let m=n.parseValue(f,g??null,l,C);Number.isNaN(m)&&(m=null),p.set(f,{editorValue:void 0,pendingValue:m,sourceValue:C,state:"changed"})}p.size>0&&r.set(g,p)}),this.setEditMap(r),this.batch){this.cleanupEditors(),_s(i),this.bulkRefresh();return}this.stopEditing(void 0,{source:"api"}),this.eventSvc.dispatchEvent({type:"bulkEditingStopped",changes:this.toEventChangeList(r)})}),this.bulkRefresh();const a=Z(i,{rowNode:e,column:t});a&&a.focusCell(!0)}createCellStyleFeature(e,t){return new vS(e,t)}createRowStyleFeature(e,t){return new wS(e,t)}setEditingCells(e,t){const{beans:o}=this,{colModel:i,valueSvc:s}=o,n=new Map;e.forEach(({colId:r,column:l,colKey:a,rowIndex:d,rowPinned:c,newValue:u,state:h})=>{const g=r?i.getCol(r):a?i.getCol(a):l;if(!g)return;const p=vt(o,{rowIndex:d,rowPinned:c});if(!p)return;const f=s.getValue(g,p,!0,"api");if(!et({pendingValue:u,sourceValue:f})&&h!=="editing")return;let C=n.get(p);C||(C=new Map,n.set(p,C)),u===void 0&&(u=we),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,eo))return;const o=this.model.getEdit(t);if(!o||!et(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)}},hd=class extends F{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:l}=s,a=e.type==="cellFocusCleared";if(i.isEditing(void 0,{withOpenEditor:!0})){const{column:d,rowIndex:c,rowPinned:u}=e,h={column:d,rowNode:vt(s,{rowIndex:c,rowPinned:u})},g=r.get("invalidEditValueMode")==="block";if(g)return;const p=!g,f=!!(l!=null&&l.getCellValidationModel().hasCellValidation(h)),C=p&&f;(o||a?i.stopEditing(void 0,{cancel:C,source:a&&p?"api":void 0,event:n}):!0)||(i.isBatchEditing()?i.cleanupEditors():i.stopEditing(void 0,{source:"api"}))}t==null||t.refreshCell({suppressFlash:!0,force:!0})}isCellEditable({rowNode:e,column:t},o="ui"){return t.isColumnFunc(e,t.getColDef().editable)}stop(e,t){const o=this.model.getEditPositions(),i={all:[],pass:[],fail:[]};if(o.forEach(n=>{var l;i.all.push(n);const r=this.model.getCellValidationModel().getCellValidation(n);if((((l=r==null?void 0:r.errorMessages)==null?void 0:l.length)??0)>0){i.fail.push(n);return}i.pass.push(n)}),e)return o.forEach(n=>{mi(this.beans,n),this.model.stop(n)}),!0;const s=this.processValidationResults(i);return s.destroy.length>0&&s.destroy.forEach(n=>{mi(this.beans,n,{event:t}),this.model.stop(n)}),s.keep.length>0&&s.keep.forEach(n=>{var l;const r=Z(this.beans,n);(l=this.editSvc)!=null&&l.cellEditingInvalidCommitBlocks()||r&&this.editSvc.revertSingleCellEdit(r)}),!0}cleanupEditors({rowNode:e}={},t){wt(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)}),$t(this.beans,i),_s(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;Nh(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=Os(this.beans,e);o&&this.eventSvc.dispatchEvent(o.createRowEvent(t))}shouldStart({column:e},t,o,i="ui"){var a;if(t instanceof KeyboardEvent&&(t.key===x.TAB||t.key===x.ENTER||t.key===x.F2||t.key===x.BACKSPACE&&o))return!0;if((t==null?void 0:t.shiftKey)&&((a=this.beans.rangeSvc)==null?void 0:a.getCellRanges().length)!=0)return!1;const n=e==null?void 0:e.getColDef(),r=this.deriveClickCount(n),l=t==null?void 0:t.type;return l==="click"&&(t==null?void 0:t.detail)===1&&r===1||l==="dblclick"&&(t==null?void 0:t.detail)===2&&r===2?!0:i==="api"?o??!1:!1}shouldStop(e,t,o="ui"){const i=this.editSvc.isBatchEditing();return i&&o==="api"?!0:i&&o==="ui"?!1:o==="api"?!0:t instanceof KeyboardEvent&&!i?t.key===x.ENTER:null}shouldCancel(e,t,o="ui"){const i=this.editSvc.isBatchEditing();return!!(t instanceof KeyboardEvent&&!i&&t.key===x.ESCAPE||i&&o==="api"||o==="api")}setEditMap(e,t){var i;t!=null&&t.update||this.editSvc.stopEditing(void 0,{cancel:!0,source:"api"});const o=[];if(e.forEach((s,n)=>{s.forEach((r,l)=>{r.state==="editing"&&o.push({...r,rowNode:n,column:l})})}),t!=null&&t.update&&(e=new Map([...this.model.getEditMap(),...e])),(i=this.model)==null||i.setEditMap(e),o.length>0){const s=o.at(-1),n=s.pendingValue===we?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()}},PS=class extends hd{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(!Os(this.beans,{rowNode:this.rowNode}))return!0;const n=super.shouldStop({rowNode:this.rowNode},t,o);return n!==null?n:this.rowNode?i!==this.rowNode:!1}midBatchInputsAllowed({rowNode:e}){return e?this.model.hasEdits({rowNode:e}):!1}clearEdits(e){this.model.clearEditValue(e)}start(e,t,o="ui",i){const{rowNode:s}=e;this.rowNode!==s&&super.cleanupEditors(e),this.dispatchRowEvent({rowNode:s},"rowEditingStarted"),this.startedRows.push(s);const n=this.beans.visibleCols.allCols,r=[];n.forEach(l=>{if(!l.isCellEditable(s))return;const a={rowNode:s,column:l};r.push(a),this.model.hasEdits(a)||this.model.start(a)}),this.rowNode=s,this.setupEditors(r,e,!0,t,i)}processValidationResults(e){return e.fail.length>0&&this.editSvc.cellEditingInvalidCommitBlocks()?{destroy:[],keep:e.all}:{destroy:e.all,keep:[]}}stop(e,t){var s;const{rowNode:o}=this;if(o&&!this.model.hasRowEdits(o))return!1;const i=[];return e||this.model.getEditMap().forEach((n,r)=>{if(!(!n||n.size===0)){for(const l of n.values())if(et(l)){i.push(r);break}}}),bt(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 l=r.cellPosition,a=e.isCellEditable(),d=r.isCellEditable(),c=l&&n.rowIndex===l.rowIndex&&n.rowPinned===l.rowPinned;a&&this.setFocusOutOnEditor(e),this.restoreEditors();const u=this.gos.get("suppressStartEditOnTab");return d&&!s?u?r.focusCell(!0,o):((g=r.comp)!=null&&g.getCellEditor()||zt(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())&&zt(this.beans,s,{silent:!0})}))}destroy(){super.destroy(),this.rowNode=void 0,this.startedRows.length=0}},TS=class extends hd{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=vt(this.beans,{rowIndex:i,rowPinned:n}),l=Bs(s),a=t.getCol(l),d=e.previousParams;if(d){const c=Bs(d.column);if((d==null?void 0:d.rowIndex)===i&&c===l&&(d==null?void 0:d.rowPinned)===n)return}o!=null&&o.isEditing({rowNode:r,column:a},{withOpenEditor:!0})&&e.type==="cellFocused"||super.onCellFocusChanged(e)}moveToNextEditingCell(e,t,o,i="ui",s=!1){var g,p,f,C,m;const n=e.cellPosition;let r;const l=this.beans.gos.get("editType")==="fullRow";l&&this.model.suspend(!0),s||(e.eGui.focus(),(p=this.editSvc)==null||p.stopEditing(e,{source:(g=this.editSvc)!=null&&g.isBatchEditing()?"ui":"api",event:o}));try{r=(f=this.beans.navigation)==null?void 0:f.findNextCellToFocusOn(n,{backwards:t,startEditing:!0})}finally{l&&this.model.suspend(!1)}if(r===!1)return null;if(r==null)return!1;const a=r.cellPosition,d=e.isCellEditable(),c=r.isCellEditable(),u=a&&n.rowIndex===a.rowIndex&&n.rowPinned===a.rowPinned;d&&!s&&this.setFocusOutOnEditor(e);const h=this.gos.get("suppressStartEditOnTab");return!u&&!s&&(super.cleanupEditors(r,!0),h?r.focusCell(!0,o):this.editSvc.startEditing(r,{startedEdit:!0,event:o,source:i,ignoreEventKey:!0})),c&&!s?(r.focusCell(!1,o),h?r.focusCell(!0,o):(C=r.comp)!=null&&C.getCellEditor()||(zt(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}},xt={moduleName:"EditCore",version:H,beans:[Ih,FS],apiFunctions:{getEditingCells:uS,getCellEditorInstances:_h,startEditingCell:pS,stopEditing:hS,isEditing:gS,validateEdit:fS},dynamicBeans:{singleCell:TS,fullRow:PS},dependsOn:[id,sd],css:[$b]},IS={moduleName:"TextEditor",version:H,userComponents:{agCellEditor:nd,agTextCellEditor:nd},dependsOn:[xt]},MS={moduleName:"NumberEditor",version:H,userComponents:{agNumberCellEditor:{classImp:iS}},dependsOn:[xt]},AS={moduleName:"DateEditor",version:H,userComponents:{agDateCellEditor:Yb,agDateStringCellEditor:Qb},dependsOn:[xt]},kS={moduleName:"CheckboxEditor",version:H,userComponents:{agCheckboxCellEditor:Kb},dependsOn:[xt]},LS={moduleName:"SelectEditor",version:H,userComponents:{agSelectCellEditor:nS},dependsOn:[xt]},GS={moduleName:"LargeTextEditor",version:H,userComponents:{agLargeTextCellEditor:eS},dependsOn:[xt]},HS={moduleName:"CustomEditor",version:H,dependsOn:[xt]};function OS(e){var t;(t=e.expansionSvc)==null||t.expandAll(!0)}function BS(e){var t;(t=e.expansionSvc)==null||t.expandAll(!1)}function _S(e){const t=Oe(e),o=mb(e);t?t.onRowHeightChanged():o&&o.onRowHeightChanged()}var NS={moduleName:"CsrmSsrmSharedApi",version:H,apiFunctions:{expandAll:OS,collapseAll:BS,onRowHeightChanged:_S}},VS=class extends F{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":G(21);break}})}processGroupOpenedEvent(e){const{colGroupSvc:t}=this.beans;t&&e.columnGroups.forEach(o=>{let i=null;o&&(i=t.getProvidedColGroup(o.getGroupId())),!(o&&!i)&&t.setColumnGroupOpened(i,o.isExpanded(),"alignedGridChanged")})}processColumnEvent(e){var c;const t=e.column;let o=null;const i=this.beans,{colResize:s,ctrlsSvc:n,colModel:r}=i;if(t&&(o=r.getColDefCol(t.getColId())),t&&!o)return;const l=this.getMasterColumns(e);switch(e.type){case"columnMoved":{const h=e.api.getColumnState().map(g=>({colId:g.colId}));De(i,{state:h,applyOrder:!0},"alignedGridChanged")}break;case"columnVisible":{const h=e.api.getColumnState().map(g=>({colId:g.colId,hide:g.hide}));De(i,{state:h},"alignedGridChanged")}break;case"columnPinned":{const h=e.api.getColumnState().map(g=>({colId:g.colId,pinned:g.pinned}));De(i,{state:h},"alignedGridChanged")}break;case"columnResized":{const u=e,h={};l.forEach(g=>{h[g.getId()]={key:g.getColId(),newWidth:g.getActualWidth()}}),(c=u.flexColumns)==null||c.forEach(g=>{h[g.getId()]&&delete h[g.getId()]}),s==null||s.setColumnWidths(Object.values(h),!1,u.finished,"alignedGridChanged");break}}const d=n.getGridBodyCtrl().isVerticalScrollShowing();this.getAlignedGridApis().forEach(u=>{u.setGridOption("alwaysShowVerticalScroll",d)})}},WS={moduleName:"AlignedGrids",version:H,beans:[VS],dependsOn:[ba]},zS="↑",$S="↓",US={tag:"span",children:[{tag:"span",ref:"eDelta",cls:"ag-value-change-delta"},{tag:"span",ref:"eValue",cls:"ag-value-change-value"}]},KS=class extends Y{constructor(){super(US),this.eValue=A,this.eDelta=A,this.refreshCount=0}init(e){this.refresh(e,!0)}showDelta(e,t){const o=Math.abs(t),i=e.formatValue(o),s=L(i)?i:o,n=t>=0,r=this.eDelta;n?r.textContent=zS+s:r.textContent=$S+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"),me(this.eDelta)}refresh(e,t=!1){var d;const{value:o,valueFormatted:i}=e,{eValue:s,lastValue:n,beans:r}=this;if(o===n||(L(i)?s.textContent=i:L(o)?s.textContent=o:me(s),(d=r.filterManager)!=null&&d.isSuppressFlashingCellsBecauseFiltering()))return!1;const l=o&&typeof o=="object"&&"toNumber"in o?o.toNumber():o,a=n&&typeof n=="object"&&"toNumber"in n?n.toNumber():n;if(l===a)return!1;if(typeof l=="number"&&typeof a=="number"){const c=l-a;this.showDelta(e,c)}return n&&s.classList.add("ag-value-change-value-highlight"),t||this.setTimerToRemoveDelta(),this.lastValue=o,!0}},jS=".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}",qS={tag:"span",children:[{tag:"span",ref:"eCurrent",cls:"ag-value-slide-current"}]},YS=class extends Y{constructor(){super(qS),this.eCurrent=A,this.refreshCount=0,this.registerCSS(jS)}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=ne({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 L(e.valueFormatted)?i.textContent=e.valueFormatted:L(e.value)?i.textContent=o:me(i),!0}},ZS=class extends F{constructor(){super(...arguments),this.beanName="cellFlashSvc",this.nextAnimationTime=null,this.nextAnimationCycle=null,this.animations={highlight:new Map,"data-changed":new Map}}animateCell(e,t,o=this.beans.gos.get("cellFlashDuration"),i=this.beans.gos.get("cellFadeDuration")){const s=this.animations[t];s.delete(e);const n=Date.now(),r=n+o,l=n+o+i,a={phase:"flash",flashEndTime:r,fadeEndTime:l};s.set(e,a);const d=`ag-cell-${t}`,c=`${d}-animation`,{comp:u,eGui:{style:h}}=e;u.toggleCss(d,!0),u.toggleCss(c,!1),h.removeProperty("transition"),h.removeProperty("transition-delay"),this.nextAnimationTime&&r+15<this.nextAnimationTime&&(clearTimeout(this.nextAnimationCycle),this.nextAnimationCycle=null,this.nextAnimationTime=null),this.nextAnimationCycle||(this.beans.frameworkOverrides.wrapIncoming(()=>{this.nextAnimationCycle=setTimeout(this.advanceAnimations.bind(this),o)}),this.nextAnimationTime=r)}advanceAnimations(){const e=Date.now();let t=null;for(const o of Object.keys(this.animations)){const i=this.animations[o],s=`ag-cell-${o}`,n=`${s}-animation`;for(const[r,l]of i){if(!r.isAlive()||!r.comp){i.delete(r);continue}const{phase:a,flashEndTime:d,fadeEndTime:c}=l,u=a==="flash"?d:c;if(!(e+15>=u)){t=Math.min(u,t??1/0);continue}const{comp:g,eGui:{style:p}}=r;switch(a){case"flash":g.toggleCss(s,!1),g.toggleCss(n,!0),p.transition=`background-color ${c-d}ms`,p.transitionDelay=`${d-e}ms`,t=Math.min(c,t??1/0),l.phase="fade";break;case"fade":g.toggleCss(s,!1),g.toggleCss(n,!1),p.removeProperty("transition"),p.removeProperty("transition-delay"),i.delete(r);break}}}t==null?(this.nextAnimationTime=null,this.nextAnimationCycle=null):t&&(this.nextAnimationCycle=setTimeout(this.advanceAnimations.bind(this),t-e),this.nextAnimationTime=t)}onFlashCells(e,t){if(!e.comp)return;const o=Mh(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 XS(e,t={}){const{cellFlashSvc:o}=e;o&&e.frameworkOverrides.wrapIncoming(()=>{e.rowRenderer.getCellCtrls(t.rowNodes,t.columns).forEach(i=>o.flashCell(i,t))})}var QS={moduleName:"HighlightChanges",version:H,beans:[ZS],userComponents:{agAnimateShowChangeCellRenderer:KS,agAnimateSlideCellRenderer:YS},apiFunctions:{flashCells:XS}};function JS(e){var t;return((t=e.stateSvc)==null?void 0:t.getState())??{}}function ey(e,t,o){var i;return(i=e.stateSvc)==null?void 0:i.setState(t,o)}function gd(e){switch(e={...e},e.version||(e.version="32.1.0"),e.version){case"32.1.0":e=ty(e)}return e.version=H,e}function ty(e){return e.cellSelection=oy(e,"rangeSelection"),e}function oy(e,t){if(e&&typeof e=="object")return e[t]}var iy=class extends F{constructor(){super(...arguments),this.beanName="stateSvc",this.updateRowGroupExpansionStateTimer=0,this.suppressEvents=!0,this.queuedUpdateSources=new Set,this.dispatchStateUpdateEventDebounced=ve(this,()=>this.dispatchQueuedStateUpdateEvents(),0),this.onRowGroupOpenedDebounced=ve(this,()=>{this.updateCachedState("rowGroupExpansion",this.getRowGroupExpansionState())},0),this.onRowSelectedDebounced=ve(this,()=>{this.staleStateKeys.delete("rowSelection"),this.updateCachedState("rowSelection",this.getRowSelectionState())},0),this.staleStateKeys=new Set}postConstruct(){this.isClientSideRowModel=de(this.gos);const e=gd(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=gd(e);delete o.partialColumnState,this.cachedState=o,this.startSuppressEvents();const i="api",s=t?new Set(t):void 0;this.setGridReadyState(o,i,s),this.setColumnsInitialisedState(o,i,!1,s),this.setRowCountState(o,i,s),setTimeout(()=>{this.isAlive()&&this.setFirstDataRenderedState(o,i,s),this.stopSuppressEvents(i)})}setGridReadyState(e,t,o){var i,s;t==="api"&&!(o!=null&&o.has("sideBar"))&&((s=(i=this.beans.sideBar)==null?void 0:i.comp)==null||s.setState(e.sideBar)),this.updateCachedState("sideBar",this.getSideBarState())}setupStateOnGridReady(e){this.setGridReadyState(e,"gridInitializing");const t=()=>this.updateCachedState("sideBar",this.getSideBarState());this.addManagedEventListeners({toolPanelVisibleChanged:t,sideBarUpdated:t})}updateColumnAndGroupState(){this.updateColumnState(["aggregation","columnOrder","columnPinning","columnSizing","columnVisibility","pivot","rowGroup","sort"]),this.updateCachedState("columnGroup",this.getColumnGroupState())}setColumnsInitialisedState(e,t,o,i){this.setColumnState(e,t,o,i),this.setColumnGroupState(e,t,i),this.updateColumnAndGroupState()}setupStateOnColumnsInitialised(e,t){this.setColumnsInitialisedState(e,"gridInitializing",t);const o=i=>()=>this.updateColumnState([i]);this.addManagedEventListeners({columnValueChanged:o("aggregation"),columnMoved:o("columnOrder"),columnPinned:o("columnPinning"),columnResized:o("columnSizing"),columnVisible:o("columnVisibility"),columnPivotChanged:o("pivot"),columnPivotModeChanged:o("pivot"),columnRowGroupChanged:o("rowGroup"),sortChanged:o("sort"),newColumnsLoaded:this.updateColumnAndGroupState.bind(this),columnGroupOpened:()=>this.updateCachedState("columnGroup",this.getColumnGroupState())})}setRowCountState(e,t,o){const{filter:i,rowGroupExpansion:s,rowSelection:n,pagination:r}=e,l=(d,c)=>!(o!=null&&o.has(d))&&(c||t==="api");l("filter",i)&&this.setFilterState(i),l("rowGroupExpansion",s)&&this.setRowGroupExpansionState(s,t),l("rowSelection",n)&&this.setRowSelectionState(n,t),l("pagination",r)&&this.setPaginationState(r,t);const a=this.updateCachedState.bind(this);a("filter",this.getFilterState()),a("rowGroupExpansion",this.getRowGroupExpansionState()),a("rowSelection",this.getRowSelectionState()),a("pagination",this.getPaginationState())}setupStateOnRowCountReady(e){this.setRowCountState(e,"gridInitializing");const t=this.updateCachedState.bind(this),o=()=>{this.updateRowGroupExpansionStateTimer=0,t("rowGroupExpansion",this.getRowGroupExpansionState())},i=()=>t("filter",this.getFilterState()),{gos:s,colFilter:n}=this.beans;this.addManagedEventListeners({filterChanged:i,rowGroupOpened:()=>this.onRowGroupOpenedDebounced(),expandOrCollapseAll:o,columnRowGroupChanged:o,rowDataUpdated:()=>{(s.get("groupDefaultExpanded")!==0||s.get("isGroupOpenByDefault"))&&(this.updateRowGroupExpansionStateTimer||(this.updateRowGroupExpansionStateTimer=setTimeout(o)))},selectionChanged:()=>{this.staleStateKeys.add("rowSelection"),this.onRowSelectedDebounced()},paginationChanged:r=>{(r.newPage||r.newPageSize)&&t("pagination",this.getPaginationState())}}),n&&this.addManagedListeners(n,{filterStateChanged:i})}setFirstDataRenderedState(e,t,o){const{scroll:i,cellSelection:s,focusedCell:n,columnOrder:r,rowPinning:l}=e,a=(u,h)=>!(o!=null&&o.has(u))&&(h||t==="api");a("focusedCell",n)&&this.setFocusedCellState(n),a("cellSelection",s)&&this.setCellSelectionState(s),a("scroll",i)&&this.setScrollState(i),a("rowPinning",l)&&this.setRowPinningState(l),this.setColumnPivotState(!!(r!=null&&r.orderedColIds),t);const d=this.updateCachedState.bind(this);d("sideBar",this.getSideBarState()),d("focusedCell",this.getFocusedCellState());const c=this.getRangeSelectionState();d("rangeSelection",c),d("cellSelection",c),d("scroll",this.getScrollState())}setupStateOnFirstDataRendered(e){this.setFirstDataRenderedState(e,"gridInitializing");const t=this.updateCachedState.bind(this);this.addManagedEventListeners({cellFocused:()=>t("focusedCell",this.getFocusedCellState()),cellSelectionChanged:o=>{if(o.finished){const i=this.getRangeSelectionState();t("rangeSelection",i),t("cellSelection",i)}},bodyScrollEnd:()=>t("scroll",this.getScrollState()),pinnedRowsChanged:()=>t("rowPinning",this.getRowPinningState())})}getColumnState(){const e=this.beans;return wb(ci(e),e.colModel.isPivotMode())}setColumnState(e,t,o,i){const{sort:s,rowGroup:n,aggregation:r,pivot:l,columnPinning:a,columnVisibility:d,columnSizing:c,columnOrder:u}=e,h=(D,T)=>!(i!=null&&i.has(D))&&(T||t==="api"),g={},p=D=>{let T=g[D];return T||(T={colId:D},g[D]=T,T)},f={},C=h("sort",s);C&&(s==null||s.sortModel.forEach(({colId:D,sort:T},k)=>{const O=p(D);O.sort=T,O.sortIndex=k})),(C||!o)&&(f.sort=null,f.sortIndex=null);const m=h("rowGroup",n);m&&(n==null||n.groupColIds.forEach((D,T)=>{const k=p(D);k.rowGroup=!0,k.rowGroupIndex=T})),(m||!o)&&(f.rowGroup=null,f.rowGroupIndex=null);const b=h("aggregation",r);b&&(r==null||r.aggregationModel.forEach(({colId:D,aggFunc:T})=>{p(D).aggFunc=T})),(b||!o)&&(f.aggFunc=null);const S=h("pivot",l);S&&(l==null||l.pivotColIds.forEach((D,T)=>{const k=p(D);k.pivot=!0,k.pivotIndex=T}),this.gos.updateGridOptions({options:{pivotMode:!!(l!=null&&l.pivotMode)},source:t})),(S||!o)&&(f.pivot=null,f.pivotIndex=null);const w=h("columnPinning",a);w&&(a==null||a.leftColIds.forEach(D=>{p(D).pinned="left"}),a==null||a.rightColIds.forEach(D=>{p(D).pinned="right"})),(w||!o)&&(f.pinned=null);const y=h("columnVisibility",d);y&&(d==null||d.hiddenColIds.forEach(D=>{p(D).hide=!0})),(y||!o)&&(f.hide=null);const R=h("columnSizing",c);R&&(c==null||c.columnSizingModel.forEach(({colId:D,flex:T,width:k})=>{const O=p(D);O.flex=T??null,O.width=k})),(R||!o)&&(f.flex=null);const P=u==null?void 0:u.orderedColIds,M=!!(P!=null&&P.length)&&!(i!=null&&i.has("columnOrder")),I=M?P.map(D=>p(D)):Object.values(g);I.length&&(this.columnStates=I,De(this.beans,{state:I,applyOrder:M,defaultState:f},t))}setColumnPivotState(e,t){const o=this.columnStates;this.columnStates=void 0;const i=this.columnGroupStates;this.columnGroupStates=void 0;const s=this.beans,{pivotResultCols:n,colGroupSvc:r}=s;if(n!=null&&n.isPivotResultColsPresent()){if(o){const l=[];for(const a of o)n.getPivotResultCol(a.colId)&&l.push(a);De(s,{state:l,applyOrder:e},t)}i&&(r==null||r.setColumnGroupState(i,t))}}getColumnGroupState(){const e=this.beans.colGroupSvc;if(!e)return;const t=e.getColumnGroupState();return bb(t)}setColumnGroupState(e,t,o){var l;const i=this.beans.colGroupSvc;if(!i||o!=null&&o.has("columnGroup")||t!=="api"&&!Object.prototype.hasOwnProperty.call(e,"columnGroup"))return;const s=new Set((l=e.columnGroup)==null?void 0:l.openColumnGroupIds),r=i.getColumnGroupState().map(({groupId:a})=>{const d=s.has(a);return d&&s.delete(a),{groupId:a,open:d}});s.forEach(a=>{r.push({groupId:a,open:!0})}),r.length&&(this.columnGroupStates=r),i.setColumnGroupState(r,t)}getFilterState(){const e=this.beans.filterManager;let t=e==null?void 0:e.getFilterModel();t&&Object.keys(t).length===0&&(t=void 0);const o=e==null?void 0:e.getFilterState(),i=(e==null?void 0:e.getAdvFilterModel())??void 0;return t||i||o?{filterModel:t,columnFilterState:o,advancedFilterModel:i}:void 0}setFilterState(e){const t=this.beans.filterManager,{filterModel:o,columnFilterState:i,advancedFilterModel:s}=e??{filterModel:null,columnFilterState:null,advancedFilterModel:null};(o!==void 0||i!==void 0)&&(t==null||t.setFilterState(o??null,i??null,"columnFilter")),s!==void 0&&(t==null||t.setAdvFilterModel(s??null,"advancedFilter"))}getRangeSelectionState(){var t;const e=(t=this.beans.rangeSvc)==null?void 0:t.getCellRanges().map(o=>{const{id:i,type:s,startRow:n,endRow:r,columns:l,startColumn:a}=o;return{id:i,type:s,startRow:n,endRow:r,colIds:l.map(d=>d.getColId()),startColId:a.getColId()}});return e!=null&&e.length?{cellRanges:e}:void 0}setCellSelectionState(e){const{gos:t,rangeSvc:o,colModel:i,visibleCols:s}=this.beans;if(!pt(t)||!o)return;const n=[];e==null||e.cellRanges.forEach(r=>{const l=[];if(r.colIds.forEach(d=>{const c=i.getCol(d);c&&l.push(c)}),!l.length)return;let a=i.getCol(r.startColId);if(!a){const d=s.allCols,c=new Set(l);a=d.find(u=>c.has(u))}n.push({...r,columns:l,startColumn:a})}),o.setCellRanges(n)}getScrollState(){if(!this.isClientSideRowModel)return;const e=this.beans.ctrlsSvc.getScrollFeature(),{left:t}=(e==null?void 0:e.getHScrollPosition())??{left:0},{top:o}=(e==null?void 0:e.getVScrollPosition())??{top:0};return o||t?{top:o,left:t}:void 0}setScrollState(e){if(!this.isClientSideRowModel)return;const{top:t,left:o}=e??{top:0,left:0},{frameworkOverrides:i,rowRenderer:s,animationFrameSvc:n,ctrlsSvc:r}=this.beans;i.wrapIncoming(()=>{var l;r.get("center").setCenterViewportScrollLeft(o),(l=r.getScrollFeature())==null||l.setVerticalScrollPosition(t),s.redraw({afterScroll:!0}),n==null||n.flushAllFrames()})}getSideBarState(){var e,t;return(t=(e=this.beans.sideBar)==null?void 0:e.comp)==null?void 0:t.getState()}getFocusedCellState(){if(!this.isClientSideRowModel)return;const e=this.beans.focusSvc.getFocusedCell();if(e){const{column:t,rowIndex:o,rowPinned:i}=e;return{colId:t.getColId(),rowIndex:o,rowPinned:i}}}setFocusedCellState(e){if(!this.isClientSideRowModel)return;const{focusSvc:t,colModel:o}=this.beans;if(!e){t.clearFocusedCell();return}const{colId:i,rowIndex:s,rowPinned:n}=e;t.setFocusedCell({column:o.getCol(i),rowIndex:s,rowPinned:n,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0})}getPaginationState(){const{pagination:e,gos:t}=this.beans;if(!e)return;const o=e.getCurrentPage(),i=t.get("paginationAutoPageSize")?void 0:e.getPageSize();if(!(!o&&!i))return{page:o,pageSize:i}}setPaginationState(e,t){const{pagination:o,gos:i}=this.beans;if(!o)return;const{pageSize:s,page:n}=e??{page:0,pageSize:i.get("paginationPageSize")},r=t==="gridInitializing";s&&!i.get("paginationAutoPageSize")&&o.setPageSize(s,r?"initialState":"pageSizeSelector"),typeof n=="number"&&(r?o.setPage(n):o.goToPage(n))}getRowSelectionState(){var i;const e=this.beans.selectionSvc;if(!e)return;const t=e.getSelectionState();return!t||!Array.isArray(t)&&(t.selectAll===!1||t.selectAllChildren===!1)&&!((i=t==null?void 0:t.toggledNodes)!=null&&i.length)?void 0:t}setRowSelectionState(e,t){var o;(o=this.beans.selectionSvc)==null||o.setSelectionState(e,t,t==="api")}getRowGroupExpansionState(){const{expansionSvc:e,rowModel:t}=this.beans;if(!e)return;const o=[];return t.forEachNode(({expanded:i,id:s})=>{i&&s&&o.push(s)}),o.length?{expandedRowGroupIds:o}:void 0}getRowPinningState(){var e;return(e=this.beans.pinnedRowModel)==null?void 0:e.getPinnedState()}setRowPinningState(e){const t=this.beans.pinnedRowModel;e?t==null||t.setPinnedState(e):t==null||t.reset()}setRowGroupExpansionState(e,t){var n;const o=this.beans.expansionSvc;if(!o)return;const i=(e==null?void 0:e.expandedRowGroupIds)??[];let s;if(t==="api"){const r=(n=this.getRowGroupExpansionState())==null?void 0:n.expandedRowGroupIds;if(r!=null&&r.length){const l=new Set(r);for(const a of i)l.delete(a);s=Array.from(l)}}o.expandRows(i,s)}updateColumnState(e){const t=this.getColumnState();let o=!1;const i=this.cachedState;for(const s of Object.keys(t)){const n=t[s];Jn(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),Jn(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")}},sy={moduleName:"GridState",version:H,beans:[iy],apiFunctions:{getState:JS,setState:ey}};function ny(e,t={}){const o=t?t.rowNodes:void 0;e.frameworkOverrides.wrapIncoming(()=>e.rowRenderer.redrawRows(o))}function pd(e,t,o,i,s){t&&(i&&t.parent&&t.parent.level!==-1&&pd(e,t.parent,o,i,s),t.setExpanded(o,void 0,s))}function ry(e,t){return e.rowModel.getRowNode(t)}function ly(e,t,o,i){e.rowRenderer.addRenderedRowListener(t,o,i)}function ay(e){return e.rowRenderer.getRenderedNodes()}function dy(e,t,o){e.rowModel.forEachNode(t,o)}function cy(e){return e.rowRenderer.firstRenderedRow}function uy(e){return e.rowRenderer.lastRenderedRow}function hy(e,t){return e.rowModel.getRow(t)}function gy(e){return e.rowModel.getRowCount()}var fd={moduleName:"RowApi",version:H,apiFunctions:{redrawRows:ny,setRowNodeExpanded:pd,getRowNode:ry,addRenderedRowListener:ly,getRenderedNodes:ay,forEachNode:dy,getFirstDisplayedRowIndex:cy,getLastDisplayedRowIndex:uy,getDisplayedRowAtIndex:hy,getDisplayedRowCount:gy}},py={moduleName:"ScrollApi",version:H,apiFunctions:{getVerticalPixelRange:aS,getHorizontalPixelRange:dS,ensureColumnVisible:rd,ensureIndexVisible:ld,ensureNodeVisible:cS}};function fy(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 Cy(e,t={}){e.frameworkOverrides.wrapIncoming(()=>e.rowRenderer.refreshCells(t))}function my(e){e.frameworkOverrides.wrapIncoming(()=>e.ctrlsSvc.getHeaderRowContainerCtrls().forEach(t=>t.refresh()))}function vy(e){var t;return((t=e.animationFrameSvc)==null?void 0:t.isQueueEmpty())??!0}function wy(e){var t;(t=e.animationFrameSvc)==null||t.flushAllFrames()}function by(e){return{rowHeight:Ps(e),headerHeight:xo(e)}}function Sy(e,t={}){var n;const o=[];if(e.rowRenderer.getCellCtrls(t.rowNodes,t.columns).forEach(r=>{const l=r.getCellRenderer();l!=null&&o.push(Ls(l))}),(n=t.columns)!=null&&n.length)return o;const i=[],s=In(t.rowNodes);return e.rowRenderer.getAllRowCtrls().forEach(r=>{if(s&&!Mn(r.rowNode,s)||!r.isFullWidth())return;const l=r.getFullWidthCellRenderers();for(let a=0;a<l.length;a++){const d=l[a];d!=null&&i.push(Ls(d))}}),[...i,...o]}var yy={moduleName:"RenderApi",version:H,apiFunctions:{setGridAriaProperty:fy,refreshCells:Cy,refreshHeader:my,isAnimationFrameQueueEmpty:vy,flushAllAnimationFrames:wy,getSizesForCurrentTheme:by,getCellRendererInstances:Sy}};function Ry(e,t){var o,i;typeof t=="number"?(o=e.colAutosize)==null||o.sizeColumnsToFit(t,"api"):(i=e.colAutosize)==null||i.sizeColumnsToFitGridBody(t)}function Cd({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 xy(e,t){var o;t&&typeof t=="object"?Cd(e,t):(o=e.colAutosize)==null||o.autoSizeAllColumns({source:"api",skipHeader:t})}var Ey=class extends F{constructor(){super(...arguments),this.beanName="colAutosize",this.timesDelayed=0,this.shouldQueueResizeOperations=!1,this.resizeOperationQueue=[]}postConstruct(){this.addManagedEventListeners({firstDataRendered:()=>this.onFirstDataRendered()})}autoSizeCols(e){if(this.shouldQueueResizeOperations){this.pushResizeOperation(()=>this.autoSizeCols(e));return}const{colKeys:t,skipHeader:o,skipHeaderGroups:i,stopAtGroup:s,defaultMaxWidth:n,defaultMinWidth:r,columnLimits:l=[],source:a="api"}=e,{animationFrameSvc:d,renderStatus:c,colModel:u,autoWidthCalc:h,visibleCols:g}=this.beans;if(d==null||d.flushAllFrames(),this.timesDelayed<5&&c&&!c.areHeaderCellsRendered()){this.timesDelayed++,setTimeout(()=>{this.isAlive()&&this.autoSizeCols(e)});return}this.timesDelayed=0;const p=[];let f=-1;const C=Object.fromEntries(l.map(({colId:S,maxWidth:w,minWidth:y})=>[S,{maxWidth:w,minWidth:y}])),m=o??this.gos.get("skipHeaderOnAutoSize"),b=i??m;for(;f!==0;){f=0;const S=[];t.forEach(w=>{if(!w||Su(w))return;const y=u.getCol(w);if(!y||p.indexOf(y)>=0)return;const R=h.getPreferredWidthForColumn(y,m);if(R>0){const P=C[y.colId]??{};P.minWidth??(P.minWidth=r),P.maxWidth??(P.maxWidth=n);const M=Dy(y,R,P);y.setActualWidth(M,a),p.push(y),f++}S.push(y)}),S.length&&g.refresh(a)}b||this.autoSizeColumnGroupsByColumns(t,a,s),Nt(this.eventSvc,p,!0,"autosizeColumns")}autoSizeColumn(e,t,o){e&&this.autoSizeCols({colKeys:[e],skipHeader:o,skipHeaderGroups:!0,source:t})}autoSizeColumnGroupsByColumns(e,t,o){const{colModel:i,ctrlsSvc:s}=this.beans,n=new Set;i.getColsForKeys(e).forEach(d=>{let c=d.getParent();for(;c&&c!=o;)c.isPadding()||n.add(c),c=c.getParent()});let l;const a=[];for(const d of n){for(const c of s.getHeaderRowContainerCtrls())if(l=c.getHeaderCtrlForColumn(d),l)break;l&&l.resizeLeafColumnsToFit(t)}return a}autoSizeAllColumns(e){if(this.shouldQueueResizeOperations){this.pushResizeOperation(()=>this.autoSizeAllColumns(e));return}const t=this.beans.visibleCols.allCols;this.autoSizeCols({colKeys:t,...e})}addColumnAutosize(e,t){const o=this.gos.get("skipHeaderOnAutoSize"),i=()=>{this.autoSizeColumn(t,"uiColumnResized",o)};e.addEventListener("dblclick",i);const s=new yt(e);return s.addEventListener("doubleTap",i),()=>{e.removeEventListener("dblclick",i),s.removeEventListener("doubleTap",i),s.destroy()}}addColumnGroupResize(e,t,o){const i=this.gos.get("skipHeaderOnAutoSize"),s=()=>{const n=[];t.getDisplayedLeafColumns().forEach(l=>{l.getColDef().suppressAutoSize||n.push(l.getColId())}),n.length>0&&this.autoSizeCols({colKeys:n,skipHeader:i,stopAtGroup:t,source:"uiColumnResized"}),o()};return e.addEventListener("dblclick",s),()=>e.removeEventListener("dblclick",s)}sizeColumnsToFitGridBody(e,t){if(!this.isAlive())return;const{ctrlsSvc:o,scrollVisibleSvc:i}=this.beans,s=o.getGridBodyCtrl(),r=s.isVerticalScrollShowing()?i.getScrollbarWidth():0,a=lo(s.eGridBody)-r;if(a>0){this.sizeColumnsToFit(a,"sizeColumnsToFit",!1,e);return}t===void 0?window.setTimeout(()=>{this.sizeColumnsToFitGridBody(e,100)},0):t===100?window.setTimeout(()=>{this.sizeColumnsToFitGridBody(e,500)},100):t===500?window.setTimeout(()=>{this.sizeColumnsToFitGridBody(e,-1)},500):G(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===Ue(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),b=(C==null?void 0:C.maxWidth)??(i==null?void 0:i.defaultMaxWidth),S=f.getActualWidth();return(m==null||S>=m)&&(b==null||S<=b)}))return;const l=[],a=[];n.forEach(p=>{p.getColDef().suppressSizeToFit===!0?a.push(p):l.push(p)});const d=l.slice(0);let c=!1;const u=p=>{Ee(l,p),a.push(p)};for(l.forEach(p=>{p.resetActualWidth(t);const f=s==null?void 0:s[p.getId()],C=(f==null?void 0:f.minWidth)??(i==null?void 0:i.defaultMinWidth),m=(f==null?void 0:f.maxWidth)??(i==null?void 0:i.defaultMaxWidth),b=p.getActualWidth();typeof C=="number"&&b<C?p.setActualWidth(C,t,!0):typeof m=="number"&&b>m&&p.setActualWidth(m,t,!0)});!c;){c=!0;const p=e-Ue(a);if(p<=0)l.forEach(f=>{var m;const C=((m=s==null?void 0:s[f.getId()])==null?void 0:m.minWidth)??(i==null?void 0:i.defaultMinWidth);if(typeof C=="number"){f.setActualWidth(C,t,!0);return}f.setActualWidth(f.minWidth,t)});else{const f=p/Ue(l);let C=p;for(let m=l.length-1;m>=0;m--){const b=l[m],S=s==null?void 0:s[b.getId()],w=(S==null?void 0:S.minWidth)??(i==null?void 0:i.defaultMinWidth),y=(S==null?void 0:S.maxWidth)??(i==null?void 0:i.defaultMaxWidth),R=b.getMinWidth(),P=b.getMaxWidth(),M=typeof w=="number"&&w>R?w:R,I=typeof y=="number"&&y<P?y:P;let D=Math.round(b.getActualWidth()*f);D<M?(D=M,u(b),c=!1):D>I?(D=I,u(b),c=!1):m===0&&(D=C),b.setActualWidth(D,t,!0),C-=D}}}d.forEach(p=>{p.fireColumnWidthChangedEvent(t)});const h=this.beans.visibleCols;h.setLeftValues(t),h.updateBodyWidths(),!o&&Nt(this.eventSvc,d,!0,t)}applyAutosizeStrategy(){const e=this.gos.get("autoSizeStrategy");if(!e)return;const{type:t}=e;setTimeout(()=>{if(t==="fitGridWidth"){const{columnLimits:o,defaultMinWidth:i,defaultMaxWidth:s}=e,n=o==null?void 0:o.map(({colId:r,minWidth:l,maxWidth:a})=>({key:r,minWidth:l,maxWidth:a}));this.sizeColumnsToFitGridBody({defaultMinWidth:i,defaultMaxWidth:s,columnLimits:n})}else t==="fitProvidedWidth"&&this.sizeColumnsToFit(e.width,"sizeColumnsToFit")})}onFirstDataRendered(){const e=this.gos.get("autoSizeStrategy");if((e==null?void 0:e.type)!=="fitCellContents")return;const{colIds:t,skipHeader:o,defaultMaxWidth:i,defaultMinWidth:s,columnLimits:n}=e;setTimeout(()=>{const r={skipHeader:o,source:"autosizeColumns",defaultMaxWidth:i,defaultMinWidth:s,columnLimits:n};t?this.autoSizeCols({colKeys:t,...r}):this.autoSizeAllColumns(r)})}processResizeOperations(){this.shouldQueueResizeOperations=!1,this.resizeOperationQueue.forEach(e=>e()),this.resizeOperationQueue=[]}pushResizeOperation(e){this.resizeOperationQueue.push(e)}destroy(){this.resizeOperationQueue.length=0,super.destroy()}};function Dy(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 Fy={moduleName:"ColumnAutoSize",version:H,beans:[Ey],apiFunctions:{sizeColumnsToFit:Ry,autoSizeColumns:Cd,autoSizeAllColumns:xy},dependsOn:[Ca]},Py=".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 Ty(e){var t;return((t=e.pinnedRowModel)==null?void 0:t.getPinnedTopRowCount())??0}function Iy(e){var t;return((t=e.pinnedRowModel)==null?void 0:t.getPinnedBottomRowCount())??0}function My(e,t){var o;return(o=e.pinnedRowModel)==null?void 0:o.getPinnedTopRow(t)}function Ay(e,t){var o;return(o=e.pinnedRowModel)==null?void 0:o.getPinnedBottomRow(t)}function ky(e,t,o){var i;return(i=e.pinnedRowModel)==null?void 0:i.forEachPinnedRow(t,o)}var Ly={moduleName:"PinnedRow",version:H,beans:[Wp],css:[Py],apiFunctions:{getPinnedTopRowCount:Ty,getPinnedBottomRowCount:Iy,getPinnedTopRow:My,getPinnedBottomRow:Ay,forEachPinnedRow:ky},icons:{rowPin:"pin",rowPinTop:"pinned-top",rowPinBottom:"pinned-bottom",rowUnpin:"un-pin"}},Gy=class extends Kt{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&&$o(this.eGui,this.rowNode.rowIndex)}setAriaRowSpan(){Fc(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(yi(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}},Hy=class extends Fi{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 Gy(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(){}},Oy=class extends F{constructor(){super(...arguments),this.beanName="spannedRowRenderer",this.topCtrls=new Map,this.bottomCtrls=new Map,this.centerCtrls=new Map}postConstruct(){this.addManagedEventListeners({displayedRowsChanged:this.createAllCtrls.bind(this)})}createAllCtrls(){this.createCtrls("top"),this.createCtrls("bottom"),this.createCtrls("center")}createCtrls(e){const{rowSpanSvc:t}=this.beans,o=`${e}Ctrls`,i=this[o],s=i.size,n=this.getAllRelevantRowControls(e),r=new Map;let l=!1;for(const d of n)d.isAlive()&&(t==null||t.forEachSpannedColumn(d.rowNode,(c,u)=>{if(r.has(u.firstNode))return;const h=i.get(u.firstNode);if(h){r.set(u.firstNode,h),i.delete(u.firstNode);return}l=!0;const g=new Hy(u.firstNode,this.beans,!1,!1,!1);r.set(u.firstNode,g)}));this[o]=r;const a=r.size===s;if(!(!l&&a)){for(const d of i.values())d.destroyFirstPass(!0),d.destroySecondPass();this.dispatchLocalEvent({type:"spannedRowsUpdated",ctrlsKey:e})}}getAllRelevantRowControls(e){const{rowRenderer:t}=this.beans;switch(e){case"top":return t.topRowCtrls;case"bottom":return t.bottomRowCtrls;case"center":return t.allRowCtrls}}getCellByPosition(e){const{rowSpanSvc:t}=this.beans,o=t==null?void 0:t.getCellSpanByPosition(e);if(!o)return;const i=`${md(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")}},md=e=>e??"center",By=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}},_y=class extends F{constructor(e){super(),this.column=e}buildCache(e){var S;const{column:t,beans:{gos:o,pinnedRowModel:i,rowModel:s,valueSvc:n,pagination:r}}=this,{colDef:l}=t,a=this[`${e}ValueNodeMap`],d=new Map,c=o.getCallback("isFullWidthRow"),u=l.equals,h=l.spanRows,g=typeof h=="function";let p=null,f=null,C;const m=(w,y)=>{p=w,f=null,C=y},b=w=>{const y=!w.isExpandable()&&!w.group&&!w.detail&&(c?!c({rowNode:w}):!0);if(w.rowIndex==null||!y){m(null,null);return}if(p==null||w.level!==p.level||w.footer||f&&w.rowIndex-1!==(f==null?void 0:f.getLastNode().rowIndex)){m(w,n.getValue(t,w));return}const R=n.getValue(t,w);if(g){const P=V(o,{valueA:C,nodeA:p,valueB:R,nodeB:w,column:t,colDef:l});if(!h(P)){m(w,R);return}}else if(u?!u(C,R):C!==R){m(w,R);return}if(!f){const P=a==null?void 0:a.get(p);(P==null?void 0:P.firstNode)===p?(P.reset(),f=P):f=new By(t,p),d.set(p,f)}f.addSpannedNode(w),d.set(w,f)};switch(e){case"center":(S=s.forEachDisplayedNode)==null||S.call(s,w=>{(!r||r.isRowInPage(w.rowIndex))&&b(w)});break;case"top":i==null||i.forEachPinnedRow("top",b);break;case"bottom":i==null||i.forEachPinnedRow("bottom",b);break}this[`${e}ValueNodeMap`]=d}isCellSpanning(e){return!!this.getCellSpan(e)}getCellSpan(e){return this[`${md(e.rowPinned)}ValueNodeMap`].get(e)}},Ny=class extends F{constructor(){super(...arguments),this.beanName="rowSpanSvc",this.spanningColumns=new Map,this.debouncePinnedEvent=ve(this,this.dispatchCellsUpdatedEvent.bind(this,!0),0),this.debounceModelEvent=ve(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 _y(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()}},Vy={moduleName:"CellSpan",version:H,beans:[Ny,Oy]},Wy=class extends F{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);Ys(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 V(this.beans.gos,{value:o,data:i.data,node:i,colDef:t,column:e,rowIndex:i.rowIndex})}},zy=class extends F{constructor(){super(...arguments),this.beanName="cellStyles"}processAllCellClasses(e,t,o,i){Ys(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 Wy(e,t)}processStaticCellClasses(e,t,o){this.getStaticCellClasses(e,t).forEach(s=>{o(s)})}},$y={moduleName:"CellStyle",version:H,beans:[zy]},Uy={moduleName:"RowStyle",version:H,beans:[Pg]};function Ky(e,t){var o;return!!((o=e.colHover)!=null&&o.isHovered(t))}var jy=class extends F{constructor(e,t){super(),this.columns=e,this.element=t,this.destroyManagedListeners=[],this.enableFeature=o=>{const{beans:i,gos:s,element:n,columns:r}=this,l=i.colHover;o??!!s.get("columnHoverHighlight")?this.destroyManagedListeners=this.addManagedElementListeners(n,{mouseover:l.setMouseOver.bind(l,r),mouseout:l.clearMouseOver.bind(l)}):(this.destroyManagedListeners.forEach(d=>d()),this.destroyManagedListeners=[])}}postConstruct(){this.addManagedPropertyListener("columnHoverHighlight",({currentValue:e})=>{this.enableFeature(e)}),this.enableFeature()}destroy(){super.destroy(),this.destroyManagedListeners=null}},qy="ag-column-hover",Yy=class extends F{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(qy,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 jy(t,o))}updateState(e){this.selectedColumns=e,this.eventSvc.dispatchEvent({type:"columnHoverChanged"})}},Zy={moduleName:"ColumnHover",version:H,beans:[Yy],apiFunctions:{isColumnHovered:Ky}},Xy=class extends F{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,l)=>{Po.has(r)&&t(r,l)},i=(r,l)=>{Po.has(r)||t(r,l)};this.globalListenerPairs.set(e,{syncListener:o,asyncListener:i});const s=this.eventSvc;s.addGlobalListener(o,!1),s.addGlobalListener(i,!0)}removeGlobalListener(e){const{eventSvc:t,wrapSvc:o,globalListenerPairs:i}=this,s=(o==null?void 0:o.unwrapGlobal(e))??e;if(i.has(s)){const{syncListener:r,asyncListener:l}=i.get(s);t.removeGlobalListener(r,!1),t.removeGlobalListener(l,!0),i.delete(e)}else this.syncGlobalListeners.delete(s),t.removeGlobalListener(s,!1)}destroyEventListeners(e,t){e.forEach((o,i)=>{o.forEach(s=>this.eventSvc.removeEventListener(i,s,t)),o.clear()}),e.clear()}destroyGlobalListeners(e,t){e.forEach(o=>this.eventSvc.removeGlobalListener(o,t)),e.clear()}destroy(){super.destroy(),this.destroyEventListeners(this.syncListeners,!1),this.destroyEventListeners(this.asyncListeners,!0),this.destroyGlobalListeners(this.syncGlobalListeners,!1);const{globalListenerPairs:e,eventSvc:t}=this;e.forEach(({syncListener:o,asyncListener:i})=>{t.removeGlobalListener(o,!1),t.removeGlobalListener(i,!0)}),e.clear()}};function Qy(e,t,o){var i;(i=e.apiEventSvc)==null||i.addEventListener(t,o)}function Jy(e,t,o){var i;(i=e.apiEventSvc)==null||i.removeEventListener(t,o)}function eR(e,t){var o;(o=e.apiEventSvc)==null||o.addGlobalListener(t)}function tR(e,t){var o;(o=e.apiEventSvc)==null||o.removeGlobalListener(t)}var oR={moduleName:"EventApi",version:H,apiFunctions:{addEventListener:Qy,addGlobalListener:eR,removeEventListener:Jy,removeGlobalListener:tR},beans:[Xy]},iR={moduleName:"Locale",version:H,beans:[vb]},sR=class extends F{constructor(){super(...arguments),this.beanName="rowAutoHeight",this.wasEverActive=!1,this._debouncedCalculateRowHeights=ve(this,this.calculateRowHeights.bind(this),1)}requestCheckAutoHeight(){this.wasEverActive&&this._debouncedCalculateRowHeights()}calculateRowHeights(){var l,a,d,c;const{visibleCols:e,rowModel:t,rowSpanSvc:o,pinnedRowModel:i}=this.beans,s=e.autoHeightCols;let n=!1;const r=u=>{var p;const h=u.__autoHeights;let g=Qe(this.beans,u).height;for(const f of s){let C=h==null?void 0:h[f.getColId()];const m=o==null?void 0:o.getCellSpan(f,u);if(m){if(m.getLastNode()!==u)continue;if(C=(p=o==null?void 0:o.getCellSpan(f,u))==null?void 0:p.getLastNodeAutoHeight(),!C)return}if(C==null){if(this.colSpanSkipCell(f,u))continue;return}g=Math.max(C,g)}g!==u.rowHeight&&(u.setRowHeight(g),n=!0)};(l=i==null?void 0:i.forEachPinnedRow)==null||l.call(i,"top",r),(a=i==null?void 0:i.forEachPinnedRow)==null||a.call(i,"bottom",r),(d=t.forEachDisplayedNode)==null||d.call(t,r),n&&((c=t.onRowHeightChanged)==null||c.call(t))}setRowAutoHeight(e,t,o){if(e.__autoHeights??(e.__autoHeights={}),t==null){delete e.__autoHeights[o.getId()];return}const i=e.__autoHeights[o.getId()];e.__autoHeights[o.getId()]=t,i!==t&&this.requestCheckAutoHeight()}colSpanSkipCell(e,t){const{colModel:o,colViewport:i,visibleCols:s}=this.beans;if(!o.colSpanActive)return!1;let n=[];switch(e.getPinned()){case"left":n=s.getLeftColsForRow(t);break;case"right":n=s.getRightColsForRow(t);break;case null:n=i.getColsWithinViewport(t);break}return!n.includes(e)}setupCellAutoHeight(e,t,o){if(!e.column.isAutoHeight()||!t)return!1;this.wasEverActive=!0;const i=t.parentElement,{rowNode:s,column:n}=e,r=this.beans,l=c=>{var b;if((b=this.beans.editSvc)!=null&&b.isEditing(e)||!e.isAlive()||!o.isAlive())return;const{paddingTop:u,paddingBottom:h,borderBottomWidth:g,borderTopWidth:p}=ct(i),f=u+h+g+p,m=t.offsetHeight+f;if(c<5){const S=re(r),w=!S||!S.contains(t),y=m==0;if(w||y){window.setTimeout(()=>l(c+1),0);return}}this.setRowAutoHeight(s,m,n)},a=()=>l(0);a();const d=ut(r,t,a);return o.addDestroyFunc(()=>{d(),this.setRowAutoHeight(s,void 0,n)}),!0}setAutoHeightActive(e){this.active=e.list.some(t=>t.isVisible()&&t.isAutoHeight())}areRowsMeasured(){if(!this.active)return!0;const e=this.beans.rowRenderer.getAllRowCtrls();let t=null;for(const{rowNode:o}of e)if((!t||this.beans.colModel.colSpanActive)&&(t=this.beans.colViewport.getColsWithinViewport(o).filter(s=>s.isAutoHeight())),t.length!==0){if(!o.__autoHeights)return!1;for(const i of t){const s=o.__autoHeights[i.getColId()];if(!s||o.rowHeight<s)return!1}}return!0}},nR={moduleName:"RowAutoHeight",version:H,beans:[sR]},rR=Object.defineProperty,lR=(e,t,o)=>t in e?rR(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,vd=(e,t,o)=>lR(e,typeof t!="symbol"?t+"":t,o);class aR extends F{constructor(){super(...arguments),vd(this,"beanName","selectionColSvc"),vd(this,"columns")}postConstruct(){this.addManagedPropertyListener("rowSelection",t=>{this.onSelectionOptionsChanged(t.currentValue,t.previousValue,_t(t.source))}),this.addManagedPropertyListener("selectionColumnDef",this.updateColumns.bind(this))}addColumns(t){const o=this.columns;o!=null&&(t.list=o.list.concat(t.list),t.tree=o.tree.concat(t.tree),Ru(t))}createColumns(t,o){var i,s,n,r,l,a;const d=()=>{var S;ai(this.beans,(S=this.columns)==null?void 0:S.tree),this.columns=null},c=t.treeDepth,h=((s=(i=this.columns)==null?void 0:i.treeDepth)!=null?s:-1)==c,g=this.generateSelectionCols();if(yu(g,(r=(n=this.columns)==null?void 0:n.list)!=null?r:[])&&h)return;d();const{colGroupSvc:f}=this.beans,C=(l=f==null?void 0:f.findDepth(t.tree))!=null?l:0,m=(a=f==null?void 0:f.balanceTreeForAutoCols(g,C))!=null?a:[];this.columns={list:g,tree:m,treeDepth:C,map:{}},o(S=>{if(!S)return null;const w=S.filter(y=>!Ct(y));return[...g,...w]})}updateColumns(t){var o;const i=_t(t.source);(o=this.columns)==null||o.list.forEach(s=>{const n=this.createSelectionColDef(t.currentValue);s.setColDef(n,null,i),De(this.beans,{state:[{...n,colId:s.getColId()}]},i)})}getColumn(t){var o,i;return(i=(o=this.columns)==null?void 0:o.list.find(s=>Xr(s,t)))!=null?i:null}getColumns(){var t,o;return(o=(t=this.columns)==null?void 0:t.list)!=null?o:null}isSelectionColumnEnabled(){var t,o,i;const{gos:s,beans:n}=this,r=s.get("rowSelection");if(typeof r!="object"||!ht(s))return!1;const l=((i=(o=(t=n.autoColSvc)==null?void 0:t.getColumns())==null?void 0:o.length)!=null?i:0)>0;if(r.checkboxLocation==="autoGroupColumn"&&l)return!1;const a=!!Ht(r),d=Jo(r);return a||d}createSelectionColDef(t){const{gos:o}=this,i=t??o.get("selectionColumnDef"),s=o.get("enableRtl"),{rowSpan:n,spanRows:r,...l}=i??{};return{width:50,resizable:!1,suppressHeaderMenuButton:!0,sortable:!1,suppressMovable:!0,lockPosition:s?"right":"left",comparator(a,d,c,u){const h=c.isSelected(),g=u.isSelected();return h===g?0:h?1:-1},editable:!1,suppressFillHandle:!0,pinned:null,rowSpan:n,...l,colId:jr,chartDataType:"excluded"}}generateSelectionCols(){if(!this.isSelectionColumnEnabled())return[];const t=this.createSelectionColDef(),o=t.colId;this.gos.validateColDef(t,o,!0);const i=new Je(t,null,o,!1);return this.createBean(i),[i]}onSelectionOptionsChanged(t,o,i){const s=o&&typeof o!="string"?Ht(o):void 0,n=t&&typeof t!="string"?Ht(t):void 0,r=s!==n,l=o&&typeof o!="string"?Jo(o):void 0,a=t&&typeof t!="string"?Jo(t):void 0,d=l!==a,c=ei(t),u=ei(o);(r||d||c!==u)&&this.beans.colModel.refreshAll(i)}destroy(){var t;ai(this.beans,(t=this.columns)==null?void 0:t.tree),super.destroy()}refreshVisibility(t,o,i){var s,n;if(!((s=this.columns)!=null&&s.list.length))return;const r=t.length+o.length+i.length;if(r===0)return;const l=this.columns.list[0];if(!l.isVisible())return;const a=()=>{let u;switch(l.pinned){case"left":case!0:u=t;break;case"right":u=i;break;default:u=o}u&&Ee(u,l)};(((n=this.beans.rowNumbersSvc)==null?void 0:n.getColumn(qr))?2:1)===r&&a()}}const Ki="34.1.1";function wd(e){const t=e.get("rowSelection");return typeof t=="object"&&t.masterSelects||"self"}function ji(e){return!!(e.rowPinned&&e.pinnedSibling)}function dR(e,t=!0){const o=e.get("rowSelection");return typeof o!="object"?t?"all":void 0:o.mode==="multiRow"?o.selectAll:"all"}function bd(e,t){return t===void 0?e("ariaIndeterminate","indeterminate"):t===!0?e("ariaChecked","checked"):e("ariaUnchecked","unchecked")}function ye(e,t,o,i){const s=t==="top";if(!o)return ye(e,t,s?e.getPinnedTopRow(0):e.getPinnedBottomRow(0),i);if(!i){const a=s?e.getPinnedTopRowCount():e.getPinnedBottomRowCount();return ye(e,t,o,s?e.getPinnedTopRow(a-1):e.getPinnedBottomRow(a-1))}let n=!1,r=!1;const l=[];return e.forEachPinnedRow(t,a=>{if(a===o&&!n){n=!0,l.push(a);return}if(n&&a===i){r=!0,l.push(a);return}n&&!r&&l.push(a)}),l}function Hn(e){var t;return(t=e==null?void 0:e.hideDisabledCheckboxes)!=null?t:!1}function Sd(e){var t,o;const i=(t=e.get("rowSelection"))!=null?t:"single";if(typeof i=="string"){const s=e.get("suppressRowClickSelection"),n=e.get("suppressRowDeselection");return s&&n?!1:s?"enableDeselection":n?"enableSelection":!0}return(i.mode==="singleRow"||i.mode==="multiRow")&&(o=i.enableClickSelection)!=null?o:!1}function cR(e){const t=Sd(e);return t===!0||t==="enableDeselection"}function uR(e){const t=Sd(e);return t===!0||t==="enableSelection"}function hR(e){var t;const o=e.get("rowSelection");return typeof o=="string"?e.get("rowMultiSelectWithClick"):(t=o==null?void 0:o.enableSelectionWithoutKeys)!=null?t:!1}function gR(e,t){var o;if(!t.nodes.every(l=>l.rowPinned&&!ji(l)?(G(59),!1):l.id===void 0?(G(60),!1):!0))return;const{nodes:s,source:n,newValue:r}=t;(o=e.selectionSvc)==null||o.setNodesSelected({nodes:s,source:n??"api",newValue:r})}function pR(e,t,o="apiSelectAll"){var i;(i=e.selectionSvc)==null||i.selectAllRowNodes({source:o,selectAll:t})}function fR(e,t,o="apiSelectAll"){var i;(i=e.selectionSvc)==null||i.deselectAllRowNodes({source:o,selectAll:t})}function CR(e){var t,o;return(o=(t=e.selectionSvc)==null?void 0:t.getSelectedNodes())!=null?o:[]}function mR(e){var t,o;return(o=(t=e.selectionSvc)==null?void 0:t.getSelectedRows())!=null?o:[]}var vR=Object.defineProperty,wR=(e,t,o)=>t in e?vR(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,qi=(e,t,o)=>wR(e,typeof t!="symbol"?t+"":t,o);const bR={tag:"div",cls:"ag-selection-checkbox",role:"presentation",children:[{tag:"ag-checkbox",ref:"eCheckbox",role:"presentation"}]};class SR extends Y{constructor(){super(bR,[ln]),qi(this,"eCheckbox",A),qi(this,"rowNode"),qi(this,"column"),qi(this,"overrides")}postConstruct(){this.eCheckbox.setPassive(!0)}onDataChanged(){this.onSelectionChanged()}onSelectableChanged(){this.showOrHideSelect()}onSelectionChanged(){const t=this.getLocaleTextFunc(),{rowNode:o,eCheckbox:i}=this,s=o.isSelected(),n=bd(t,s),[r,l]=o.selectable?["ariaRowToggleSelection","Press Space to toggle row selection"]:["ariaRowSelectionDisabled","Row Selection is disabled for this row"],a=t(r,l);i.setValue(s,!0),i.setInputAriaLabel(`${a} (${n})`)}init(t){if(this.rowNode=t.rowNode,this.column=t.column,this.overrides=t.overrides,this.onSelectionChanged(),this.addManagedListeners(this.eCheckbox.getInputElement(),{dblclick:Ot,click:s=>{var n;Ot(s),(n=this.beans.selectionSvc)==null||n.handleSelectionEvent(s,this.rowNode,"checkboxSelected")}}),this.addManagedListeners(this.rowNode,{rowSelected:this.onSelectionChanged.bind(this),dataChanged:this.onDataChanged.bind(this),selectableChanged:this.onSelectableChanged.bind(this)}),this.addManagedPropertyListener("rowSelection",({currentValue:s,previousValue:n})=>{const r=typeof s=="object"?Hn(s):void 0,l=typeof n=="object"?Hn(n):void 0;r!==l&&this.onSelectableChanged()}),Ms(this.gos)||typeof this.getIsVisible()=="function"){const s=this.showOrHideSelect.bind(this);this.addManagedEventListeners({displayedColumnsChanged:s}),this.addManagedListeners(this.rowNode,{dataChanged:s,cellChanged:s}),this.showOrHideSelect()}this.eCheckbox.getInputElement().setAttribute("tabindex","-1")}showOrHideSelect(){const{column:t,rowNode:o,overrides:i,gos:s}=this,n=o.selectable,r=this.getIsVisible();let l;if(typeof r=="function"){const h=i==null?void 0:i.callbackParams;if(!t)l=r({...h,node:o,data:o.data});else{const g=t.createColumnFunctionCallbackParams(o);l=r({...h,...g})}}else l=r??!1;const a=n&&!l||!n&&l,d=n||l,c=s.get("rowSelection"),u=c&&typeof c!="string"?!Hn(c):!!(t!=null&&t.getColDef().showDisabledCheckboxes);if(this.setVisible(d&&(a?u:!0)),this.setDisplayed(d&&(a?u:!0)),d&&this.eCheckbox.setDisabled(a),i!=null&&i.removeHidden){this.setDisplayed(d);return}}getIsVisible(){var t,o;const i=this.overrides;if(i)return i.isVisible;const s=this.gos.get("rowSelection");return s&&typeof s!="string"?Ht(s):(o=(t=this.column)==null?void 0:t.getColDef())==null?void 0:o.checkboxSelection}}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,Yi=(e,t,o)=>RR(e,typeof t!="symbol"?t+"":t,o);class xR{constructor(t,o){this.rowModel=t,this.pinnedRowModel=o,Yi(this,"selectAll",!1),Yi(this,"rootId",null),Yi(this,"endId",null),Yi(this,"cachedRange",[])}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(){var t;if(this.cachedRange.length===0){const o=this.getRoot(),i=this.getEnd();if(o==null||i==null)return this.cachedRange;this.cachedRange=(t=this.getNodesInRange(o,i))!=null?t:[]}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){var i,s,n,r,l,a;const{pinnedRowModel:d,rowModel:c}=this;if(!(d!=null&&d.isManual()))return c.getNodesInRangeForSelection(t,o);if(t.rowPinned==="top"&&!o.rowPinned)return ye(d,"top",t,void 0).concat((i=c.getNodesInRangeForSelection(c.getRow(0),o))!=null?i:[]);if(t.rowPinned==="bottom"&&!o.rowPinned){const u=ye(d,"bottom",void 0,t),h=c.getRowCount(),g=c.getRow(h-1);return((s=c.getNodesInRangeForSelection(o,g))!=null?s:[]).concat(u)}if(!t.rowPinned&&!o.rowPinned)return c.getNodesInRangeForSelection(t,o);if(t.rowPinned==="top"&&o.rowPinned==="top")return ye(d,"top",t,o);if(t.rowPinned==="bottom"&&o.rowPinned==="top"){const u=ye(d,"top",o,void 0),h=ye(d,"bottom",void 0,t),g=c.getRow(0),p=c.getRow(c.getRowCount()-1);return u.concat((n=c.getNodesInRangeForSelection(g,p))!=null?n:[]).concat(h)}if(!t.rowPinned&&o.rowPinned==="top")return ye(d,"top",o,void 0).concat((r=c.getNodesInRangeForSelection(c.getRow(0),t))!=null?r:[]);if(t.rowPinned==="top"&&o.rowPinned==="bottom"){const u=ye(d,"top",t,void 0),h=ye(d,"bottom",void 0,o),g=c.getRow(0),p=c.getRow(c.getRowCount()-1);return u.concat((l=c.getNodesInRangeForSelection(g,p))!=null?l:[]).concat(h)}if(t.rowPinned==="bottom"&&o.rowPinned==="bottom")return ye(d,"bottom",t,o);if(!t.rowPinned&&o.rowPinned==="bottom"){const u=ye(d,"bottom",void 0,o),h=c.getRow(c.getRowCount());return((a=c.getNodesInRangeForSelection(t,h))!=null?a:[]).concat(u)}return null}}var ER=Object.defineProperty,DR=(e,t,o)=>t in e?ER(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,Zi=(e,t,o)=>DR(e,typeof t!="symbol"?t+"":t,o);class FR extends F{constructor(t){super(),this.column=t,Zi(this,"cbSelectAllVisible",!1),Zi(this,"processingEventFromCheckbox",!1),Zi(this,"headerCellCtrl"),Zi(this,"cbSelectAll")}onSpaceKeyDown(t){const o=this.cbSelectAll;o.isDisplayed()&&!o.getGui().contains(ee(this.beans))&&(t.preventDefault(),o.setValue(!o.getValue()))}getCheckboxGui(){return this.cbSelectAll.getGui()}setComp(t){this.headerCellCtrl=t;const o=this.createManagedBean(new Xl);this.cbSelectAll=o,o.addCss("ag-header-select-all"),Ye(o.getGui(),"presentation"),this.showOrHideSelectAll();const i=this.updateStateOfCheckbox.bind(this);this.addManagedEventListeners({newColumnsLoaded:()=>this.showOrHideSelectAll(),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this),selectionChanged:i,paginationChanged:i,modelUpdated:i}),this.addManagedPropertyListener("rowSelection",({currentValue:s,previousValue:n})=>{const r=l=>typeof l=="string"||!l||l.mode==="singleRow"?void 0:l.selectAll;r(s)!==r(n)&&this.showOrHideSelectAll(),this.updateStateOfCheckbox()}),this.addManagedListeners(o,{fieldValueChanged:this.onCbSelectAll.bind(this)}),o.getInputElement().setAttribute("tabindex","-1"),this.refreshSelectAllLabel()}onDisplayedColumnsChanged(t){this.isAlive()&&this.showOrHideSelectAll(t.source==="uiColumnMoved")}showOrHideSelectAll(t=!1){const o=this.isCheckboxSelection();this.cbSelectAllVisible=o,this.cbSelectAll.setDisplayed(o),o&&(this.checkRightRowModelType("selectAllCheckbox"),this.checkSelectionType("selectAllCheckbox"),this.updateStateOfCheckbox()),this.refreshSelectAllLabel(t)}updateStateOfCheckbox(){if(!this.cbSelectAllVisible||this.processingEventFromCheckbox)return;this.processingEventFromCheckbox=!0;const t=this.getSelectAllMode(),o=this.beans.selectionSvc,i=this.cbSelectAll,s=o.getSelectAllState(t);i.setValue(s);const n=o.hasNodesToSelect(t);i.setDisabled(!n),this.refreshSelectAllLabel(),this.processingEventFromCheckbox=!1}refreshSelectAllLabel(t=!1){const o=this.getLocaleTextFunc(),{headerCellCtrl:i,cbSelectAll:s,cbSelectAllVisible:n}=this,r=s.getValue(),l=bd(o,r),a=o("ariaRowSelectAll","Press Space to toggle all rows selection");i.setAriaDescriptionProperty("selectAll",n?`${a} (${l})`:null),s.setInputAriaLabel(o("ariaHeaderSelection","Column with Header Selection")),t||i.announceAriaDescription()}checkSelectionType(t){return po(this.gos)?!0:(G(128,{feature:t}),!1)}checkRightRowModelType(t){const{gos:o,rowModel:i}=this.beans;return de(o)||Xo(o)?!0:(G(129,{feature:t,rowModel:i.getType()}),!1)}onCbSelectAll(){if(this.processingEventFromCheckbox||!this.cbSelectAllVisible)return;const t=this.cbSelectAll.getValue(),o=this.getSelectAllMode();let i="uiSelectAll";o==="currentPage"?i="uiSelectAllCurrentPage":o==="filtered"&&(i="uiSelectAllFiltered");const s={source:i,selectAll:o},n=this.beans.selectionSvc;t?n.selectAllRowNodes(s):n.deselectAllRowNodes(s)}isCheckboxSelection(){const{column:t,gos:o,beans:i}=this,r=typeof o.get("rowSelection")=="object"?"headerCheckbox":"headerCheckboxSelection";return yd(i,t)&&this.checkRightRowModelType(r)&&this.checkSelectionType(r)}getSelectAllMode(){const t=dR(this.gos,!1);if(t)return t;const{headerCheckboxSelectionCurrentPageOnly:o,headerCheckboxSelectionFilteredOnly:i}=this.column.getColDef();return o?"currentPage":i?"filtered":"all"}destroy(){super.destroy(),this.cbSelectAll=void 0,this.headerCellCtrl=void 0}}function yd({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=Ct(o),d=Zr(o);(ei(i)==="autoGroupColumn"&&d||a&&(t!=null&&t.isSelectionColumnEnabled()))&&(r=Jo(i))}else typeof n=="function"?r=n(V(e,{column:o,colDef:s})):r=!!n;return r}var PR=Object.defineProperty,TR=(e,t,o)=>t in e?PR(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,Rd=(e,t,o)=>TR(e,typeof t!="symbol"?t+"":t,o);class IR extends F{constructor(){super(...arguments),Rd(this,"isRowSelectable"),Rd(this,"selectionCtx")}postConstruct(){const{gos:t,beans:o}=this;this.selectionCtx=new xR(o.rowModel,o.pinnedRowModel),this.addManagedPropertyListeners(["isRowSelectable","rowSelection"],()=>{const i=Ms(t);i!==this.isRowSelectable&&(this.isRowSelectable=i,this.updateSelectable())}),this.isRowSelectable=Ms(t),this.addManagedEventListeners({cellValueChanged:i=>this.updateRowSelectable(i.node),rowNodeDataChanged:i=>this.updateRowSelectable(i.node)})}destroy(){super.destroy(),this.selectionCtx.reset()}createCheckboxSelectionComponent(){return new SR}createSelectAllFeature(t){if(yd(this.beans,t))return new FR(t)}isMultiSelect(){return po(this.gos)}onRowCtrlSelected(t,o,i){const s=!!t.rowNode.isSelected();t.forEachGui(i,n=>{n.rowComp.toggleCss("ag-row-selected",s);const r=n.element;ls(r,s),r.contains(ee(this.beans))&&o(n)})}announceAriaRowSelection(t){var o;if(this.isRowSelectionBlocked(t))return;const i=t.isSelected();if(!t.selectable)return;const n=this.getLocaleTextFunc()(i?"ariaRowDeselect":"ariaRowSelect",`Press SPACE to ${i?"deselect":"select"} this row`);(o=this.beans.ariaAnnounce)==null||o.announceValue(n,"rowSelection")}isRowSelectionBlocked(t){return!t.selectable||t.rowPinned&&!ji(t)||!ht(this.gos)}updateRowSelectable(t,o){var i,s;const n=t.rowPinned&&t.pinnedSibling?t.pinnedSibling.selectable:(s=(i=this.isRowSelectable)==null?void 0:i.call(this,t))!=null?s:!0;return this.setRowSelectable(t,n,o),n}setRowSelectable(t,o,i){if(t.selectable!==o){if(t.selectable=o,t.dispatchRowEvent("selectableChanged"),i)return;if(fo(this.gos)){const n=this.calculateSelectedFromChildren(t);this.setNodesSelected({nodes:[t],newValue:n??!1,source:"selectableChanged"});return}t.isSelected()&&!t.selectable&&this.setNodesSelected({nodes:[t],newValue:!1,source:"selectableChanged"})}}calculateSelectedFromChildren(t){var o;let i=!1,s=!1;if(!((o=t.childrenAfterGroup)!=null&&o.length))return t.selectable?t.__selected:null;for(let n=0;n<t.childrenAfterGroup.length;n++){const r=t.childrenAfterGroup[n];let l=r.isSelected();if(!r.selectable){const a=this.calculateSelectedFromChildren(r);if(a===null)continue;l=a}switch(l){case!0:i=!0;break;case!1:s=!0;break;default:return}}if(!(i&&s))return i?!0:s?!1:t.selectable?t.__selected:null}selectRowNode(t,o,i,s="api"){const n=!t.selectable&&o,r=t.__selected===o;if(n||r)return!1;t.__selected=o,t.dispatchRowEvent("rowSelected");const l=t.sibling;l&&l.footer&&l.__localEventService&&l.dispatchRowEvent("rowSelected");const a=t.pinnedSibling;return a&&a.rowPinned&&a.__localEventService&&a.dispatchRowEvent("rowSelected"),this.eventSvc.dispatchEvent({...wg(t,this.gos,"rowSelected"),event:i||null,source:s}),!0}isCellCheckboxSelection(t,o){const i=this.gos.get("rowSelection");if(i&&typeof i!="string"){const s=Ct(t)&&Ht(i);return t.isColumnFunc(o,s)}else return t.isColumnFunc(o,t.colDef.checkboxSelection)}inferNodeSelections(t,o,i,s){const{gos:n,selectionCtx:r}=this,l=t.isSelected(),a=fo(n),d=uR(n),c=cR(n),u=this.isMultiSelect(),h=s==="rowClicked";if(h&&!(d||c))return null;if(o&&i&&u){const g=r.getRoot();if(g)if(g.isSelected()){const p=r.isInRange(t)?r.truncate(t):r.extend(t,a);return{deselect:p.discard,select:p.keep,reset:!1}}else{const p=r.extend(t,a);return{select:[],deselect:p.keep,reset:!1}}else return null}else if(o&&u){const g=r.selectAll?this.beans.rowModel.getRow(0):void 0,p=r.getRoot(g),f=r.isInRange(t)?r.truncate(t):r.extend(t,a);return{select:f.keep,deselect:f.discard,reset:r.selectAll||!!(p&&!p.isSelected())}}else if(i){if(h){const g=!l;return g&&!d||!g&&!c?null:(r.setRoot(t),{node:t,newValue:g,clearSelection:!1})}return r.setRoot(t),{node:t,newValue:!l,clearSelection:!u}}else{r.setRoot(t);const g=hR(n),p=oi(n)==="filteredDescendants",f=h&&(!g||!d);if(p&&l===void 0&&de(n))return{node:t,newValue:!1,clearSelection:!u||f};if(h){const C=l?!g:d;return C===l&&!f||C&&!d||!C&&!c?null:{node:t,newValue:C,clearSelection:!u||f,keepDescendants:t.group&&a}}return{node:t,newValue:!l,clearSelection:!u||f}}}}var MR=Object.defineProperty,AR=(e,t,o)=>t in e?MR(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,Et=(e,t,o)=>AR(e,typeof t!="symbol"?t+"":t,o);class kR extends IR{constructor(){super(...arguments),Et(this,"beanName","selectionSvc"),Et(this,"selectedNodes",new Map),Et(this,"detailSelection",new Map),Et(this,"groupSelectsDescendants"),Et(this,"groupSelectsFiltered"),Et(this,"mode"),Et(this,"masterSelectsDetail",!1)}postConstruct(){super.postConstruct();const{gos:t}=this;this.mode=ti(t),this.groupSelectsDescendants=fo(t),this.groupSelectsFiltered=oi(t)==="filteredDescendants",this.masterSelectsDetail=wd(t)==="detail",this.addManagedPropertyListeners(["groupSelectsChildren","groupSelectsFiltered","rowSelection"],()=>{const o=fo(t),i=ti(t),s=oi(t)==="filteredDescendants";this.masterSelectsDetail=wd(t)==="detail",(o!==this.groupSelectsDescendants||s!==this.groupSelectsFiltered||i!==this.mode)&&(this.deselectAllRowNodes({source:"api"}),this.groupSelectsDescendants=o,this.groupSelectsFiltered=s,this.mode=i)}),this.addManagedEventListeners({rowSelected:this.onRowSelected.bind(this)})}destroy(){super.destroy(),this.resetNodes()}handleSelectionEvent(t,o,i){if(this.isRowSelectionBlocked(o))return 0;const s=this.inferNodeSelections(o,t.shiftKey,t.metaKey||t.ctrlKey,i);return s==null?0:(this.selectionCtx.selectAll=!1,"select"in s?(s.reset?this.resetNodes():this.selectRange(s.deselect,!1,i),this.selectRange(s.select,!0,i)):this.setNodesSelected({nodes:[s.node],newValue:s.newValue,clearSelection:s.clearSelection,keepDescendants:s.keepDescendants,event:t,source:i}))}setNodesSelected({newValue:t,clearSelection:o,suppressFinishActions:i,nodes:s,event:n,source:r,keepDescendants:l=!1}){var a;if(!ht(this.gos)&&t)return G(132),0;if(s.length===0)return 0;if(s.length>1&&!this.isMultiSelect())return G(130),0;let d=0;for(let c=0;c<s.length;c++){const u=s[c],h=to(u),g=this.groupSelectsFiltered&&h.group;if(h.rowPinned&&!ji(h)){G(59);continue}if(h.id===void 0){G(60);continue}g||this.selectRowNode(h,t,n,r)&&(this.detailSelection.delete(h.id),d++),this.groupSelectsDescendants&&((a=h.childrenAfterGroup)!=null&&a.length)&&(d+=this.selectChildren(h,t,r))}return i||(s.length===1&&r==="api"&&this.selectionCtx.setRoot(to(s[0])),t&&(o||!this.isMultiSelect())&&(d+=this.clearOtherNodes(to(s[0]),l,r)),d>0&&(this.updateGroupsFromChildrenSelections(r),this.dispatchSelectionChanged(r))),d}selectRange(t,o,i){let s=0;return t.forEach(n=>{const r=to(n);if(r.group&&this.groupSelectsDescendants)return;this.selectRowNode(r,o,void 0,i)&&s++}),s>0&&(this.updateGroupsFromChildrenSelections(i),this.dispatchSelectionChanged(i)),s}selectChildren(t,o,i){const s=this.groupSelectsFiltered?t.childrenAfterAggFilter:t.childrenAfterGroup;return s?this.setNodesSelected({newValue:o,clearSelection:!1,suppressFinishActions:!0,source:i,nodes:s}):0}getSelectedNodes(){return Array.from(this.selectedNodes.values())}getSelectedRows(){const t=[];return this.selectedNodes.forEach(o=>o.data&&t.push(o.data)),t}getSelectionCount(){return this.selectedNodes.size}filterFromSelection(t){const o=new Map;this.selectedNodes.forEach((i,s)=>{t(i)&&o.set(s,i)}),this.selectedNodes=o}updateGroupsFromChildrenSelections(t,o){if(!this.groupSelectsDescendants)return!1;const{gos:i,rowModel:s}=this.beans;if(!de(i))return!1;const n=s.rootNode;if(!n)return!1;o||(o=new Gi(!0,n),o.active=!1);let r=!1;return o.forEachChangedNodeDepthFirst(l=>{if(l!==n){const a=this.calculateSelectedFromChildren(l);r=this.selectRowNode(l,a===null?!1:a,void 0,t)||r}}),r}clearOtherNodes(t,o,i){const s=new Map;let n=0;return this.selectedNodes.forEach(r=>{const l=r.id==t.id;if((o?!GR(t,r):!0)&&!l){const d=this.selectedNodes.get(r.id);n+=this.setNodesSelected({nodes:[d],newValue:!1,clearSelection:!1,suppressFinishActions:!0,source:i}),this.groupSelectsDescendants&&r.parent&&s.set(r.parent.id,r.parent)}}),s.forEach(r=>{const l=this.calculateSelectedFromChildren(r);this.selectRowNode(r,l===null?!1:l,void 0,i)}),n}onRowSelected(t){const o=t.node;this.groupSelectsDescendants&&o.group||(o.isSelected()?this.selectedNodes.set(o.id,o):this.selectedNodes.delete(o.id))}syncInRowNode(t,o){this.syncInOldRowNode(t,o),this.syncInNewRowNode(t)}createDaemonNode(t){if(!t.id)return;const o=new So(this.beans);return o.id=t.id,o.data=t.data,o.__daemon=!0,o.__selected=t.__selected,o.level=t.level,o}syncInOldRowNode(t,o){o&&t.id!==o.id&&this.selectedNodes.get(o.id)==t&&this.selectedNodes.set(o.id,o)}syncInNewRowNode(t){this.selectedNodes.has(t.id)?(t.__selected=!0,this.selectedNodes.set(t.id,t)):t.__selected=!1}reset(t){const o=this.getSelectionCount();this.resetNodes(),o&&this.dispatchSelectionChanged(t)}resetNodes(){this.selectedNodes.forEach(t=>{this.selectRowNode(t,!1)}),this.selectedNodes.clear()}getBestCostNodeSelection(){const{gos:t,rowModel:o}=this.beans;if(!de(t))return;const i=o.getTopLevelNodes();if(i===null)return;const s=[];function n(r){for(let l=0,a=r.length;l<a;l++){const d=r[l];d.isSelected()?s.push(d):d.group&&d.childrenAfterGroup&&n(d.childrenAfterGroup)}}return n(i),s}isEmpty(){return this.getSelectionCount()===0}deselectAllRowNodes({source:t,selectAll:o}){const i=de(this.gos);let s=!1;const n=r=>{const l=this.selectRowNode(to(r),!1,void 0,t);s||(s=l)};if(o==="currentPage"||o==="filtered"){if(!i){j(102);return}this.getNodesToSelect(o).forEach(n)}else this.selectedNodes.forEach(n),this.reset(t);if(this.selectionCtx.selectAll=!1,i&&this.groupSelectsDescendants){const r=this.updateGroupsFromChildrenSelections(t);s||(s=r)}s&&this.dispatchSelectionChanged(t)}getSelectedCounts(t){let o=0,i=0;return this.getNodesToSelect(t).forEach(s=>{this.groupSelectsDescendants&&s.group||(s.isSelected()?o++:s.selectable&&i++)}),{selectedCount:o,notSelectedCount:i}}getSelectAllState(t){var o;const{selectedCount:i,notSelectedCount:s}=this.getSelectedCounts(t);return(o=xd(i,s))!=null?o:null}hasNodesToSelect(t){return this.getNodesToSelect(t).filter(o=>o.selectable).length>0}getNodesToSelect(t){if(!this.canSelectAll())return[];const o=[],i=n=>o.push(n);if(t==="currentPage")return this.forEachNodeOnPage(n=>{if(!n.group){i(n);return}if(!n.expanded&&!n.footer){const r=l=>{var a;i(l),(a=l.childrenAfterFilter)==null||a.forEach(r)};r(n);return}this.groupSelectsDescendants||i(n)}),o;const s=this.beans.rowModel;return t==="filtered"?(s.forEachNodeAfterFilter(i),o):(s.forEachNode(i),o)}forEachNodeOnPage(t){const{pageBounds:o,rowModel:i}=this.beans,s=o.getFirstRow(),n=o.getLastRow();for(let r=s;r<=n;r++){const l=i.getRow(r);l&&t(l)}}selectAllRowNodes(t){const{gos:o,selectionCtx:i}=this;if(!ht(o)){G(132);return}if(ou(o)&&!po(o)){G(130);return}if(!this.canSelectAll())return;const{source:s,selectAll:n}=t;let r=!1;if(this.getNodesToSelect(n).forEach(l=>{const a=this.selectRowNode(to(l),!0,void 0,s);r||(r=a)}),i.selectAll=!0,de(o)&&this.groupSelectsDescendants){const l=this.updateGroupsFromChildrenSelections(s);r||(r=l)}r&&this.dispatchSelectionChanged(s)}getSelectionState(){return this.isEmpty()?null:Array.from(this.selectedNodes.keys())}setSelectionState(t,o,i){if(t||(t=[]),!Array.isArray(t)){j(103);return}const s=new Set(t),n=[];this.beans.rowModel.forEachNode(r=>{s.has(r.id)&&n.push(r)}),i&&this.resetNodes(),this.setNodesSelected({newValue:!0,nodes:n,source:o})}canSelectAll(){const{gos:t}=this.beans;return!!de(t)}updateSelectable(t){var o;const{gos:i,rowModel:s}=this.beans;if(!ht(i))return;const n="selectableChanged",r=t!==void 0,l=de(i)&&this.groupSelectsDescendants,a=[],d=c=>{var u,h;if(r&&!c.group)return;if(l&&c.group){const p=(h=(u=c.childrenAfterGroup)==null?void 0:u.some(f=>f.selectable))!=null?h:!1;this.setRowSelectable(c,p,!0);return}!this.updateRowSelectable(c,!0)&&c.isSelected()&&a.push(c)};if(l){if(t===void 0){const c=s.rootNode;t=c?new Gi(!1,c):void 0}t==null||t.forEachChangedNodeDepthFirst(d,!r,!r)}else s.forEachNode(d);a.length&&this.setNodesSelected({nodes:a,newValue:!1,source:n}),!r&&l&&((o=this.updateGroupsFromChildrenSelections)==null||o.call(this,n))}updateSelectableAfterGrouping(t){var o;this.updateSelectable(t),this.groupSelectsDescendants&&((o=this.updateGroupsFromChildrenSelections)!=null&&o.call(this,"rowGroupChanged",t))&&this.dispatchSelectionChanged("rowGroupChanged")}refreshMasterNodeState(t,o){var i,s,n;if(!this.masterSelectsDetail)return;const r=(s=(i=t.detailNode)==null?void 0:i.detailGridInfo)==null?void 0:s.api;if(!r)return;const l=LR(r);if(t.isSelected()!==l&&this.selectRowNode(t,l,o,"masterDetail")&&this.dispatchSelectionChanged("masterDetail"),!l){const d=(n=this.detailSelection.get(t.id))!=null?n:new Set;for(const c of r.getSelectedNodes())d.add(c.id);this.detailSelection.set(t.id,d)}}setDetailSelectionState(t,o,i){if(this.masterSelectsDetail){if(!po(o)){G(269);return}switch(t.isSelected()){case!0:{i.selectAll();break}case!1:{i.deselectAll();break}case void 0:{const s=this.detailSelection.get(t.id);if(s){const n=[];for(const r of s){const l=i.getRowNode(r);l&&n.push(l)}i.setNodesSelected({nodes:n,newValue:!0,source:"masterDetail"})}break}}}}dispatchSelectionChanged(t){this.eventSvc.dispatchEvent({type:"selectionChanged",source:t,selectedNodes:this.getSelectedNodes(),serverSideState:null})}}function to(e){return ji(e)?e.pinnedSibling:e.footer?e.sibling:e}function LR(e){let t=0,o=0;return e.forEachNode(i=>{i.isSelected()?t++:i.selectable&&o++}),xd(t,o)}function xd(e,t){if(e===0&&t===0)return!1;if(!(e>0&&t>0))return e>0}function GR(e,t){let o=t.parent;for(;o;){if(o===e)return!0;o=o.parent}return!1}const HR={moduleName:"RowSelection",version:Ki,rowModels:["clientSide","infinite","viewport"],beans:[kR],dependsOn:[{moduleName:"SharedRowSelection",version:Ki,beans:[aR],apiFunctions:{setNodesSelected:gR,selectAll:pR,deselectAll:fR,getSelectedNodes:CR,getSelectedRows:mR}}]};var OR=Object.defineProperty,BR=(e,t,o)=>t in e?OR(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,On=(e,t,o)=>BR(e,typeof t!="symbol"?t+"":t,o);const _R="ROOT_NODE_ID";class NR extends F{constructor(){super(...arguments),On(this,"nextId",0),On(this,"allNodesMap",{}),On(this,"rootNode",null)}getRowNode(t){return this.allNodesMap[t]}extractRowData(){var t,o;return(o=(t=this.rootNode)==null?void 0:t.allLeafChildren)==null?void 0:o.map(i=>i.data)}activate(t){this.rootNode=t,t.group=!0,t.level=-1,t.id=_R,t.allLeafChildren=[],t.childrenAfterGroup=[],t.childrenAfterSort=[],t.childrenAfterAggFilter=[],t.childrenAfterFilter=[],this.updateRootSiblingArrays(t)}deactivate(){this.rootNode&&(this.allNodesMap={},this.rootNode=null)}destroy(){super.destroy(),this.allNodesMap={},this.rootNode=null}setNewRowData(t){const o=this.rootNode;o&&(this.dispatchRowDataUpdateStartedEvent(t),o.childrenAfterFilter=null,o.childrenAfterGroup=null,o.childrenAfterAggFilter=null,o.childrenAfterSort=null,o.childrenMapped=null,o.updateHasChildren(),this.allNodesMap={},this.nextId=0,this.loadNewRowData(t),this.updateRootSiblingArrays(o))}updateRootSiblingArrays(t){const o=t.sibling;o&&(o.childrenAfterFilter=t.childrenAfterFilter,o.childrenAfterGroup=t.childrenAfterGroup,o.childrenAfterAggFilter=t.childrenAfterAggFilter,o.childrenAfterSort=t.childrenAfterSort,o.childrenMapped=t.childrenMapped,o.allLeafChildren=t.allLeafChildren)}loadNewRowData(t){var o;this.rootNode.allLeafChildren=(o=t==null?void 0:t.map((i,s)=>this.createRowNode(i,s)))!=null?o:[]}setImmutableRowData(t,o){var i;const s=Qo(this.gos),n=!this.gos.get("suppressMaintainUnsortedOrder"),r=t.changedRowNodes,l=new Set,a=this.rootNode,d=a.allLeafChildren,c=d.length;let u=!1,h=!1,g=!1,p=!1;for(let C=0,m=-1,b=o.length;C<b;C++){const S=o[C];let w=this.getRowNode(s({data:S,level:0}));if(!w)u=!0,w=this.createRowNode(S,-1),r.add(w);else{if(n){const y=w.sourceRowIndex;p||(p=y<=m||u),m=y}w.data!==S&&(g=!0,w.updateData(S),r.update(w))}l.add(w)}const f=[];for(let C=0;C<c;C++){const m=d[C];l.has(m)||(h=!0,m.isSelected()&&f.push(m),m.pinnedSibling&&((i=this.beans.pinnedRowModel)==null||i.pinRow(m.pinnedSibling,null)),this.rowNodeDeleted(m),r.remove(m))}if(u||h||p){const C=new Array(l.size);let m=0;if(!n)for(let S=0;S<c;++S){const w=d[S];l.delete(w)&&(w.sourceRowIndex=m,C[m++]=w)}for(const S of l)S.sourceRowIndex=m,C[m++]=S;a.allLeafChildren=C;const b=a.sibling;b&&(b.allLeafChildren=C),t.rowNodesOrderChanged||(t.rowNodesOrderChanged=p)}(u||h||p||g)&&(this.deselectNodes(f),t.rowDataUpdated=!0)}rowNodeDeleted(t){t.clearRowTopAndRowIndex();const o=t.id,i=this.allNodesMap;i[o]===t&&delete i[o]}updateRowData(t,o){this.dispatchRowDataUpdateStartedEvent(t.add);const i={changedRowNodes:o,rowNodeTransaction:{remove:[],update:[],add:[]},rowsInserted:!1},s=[],n=Qo(this.gos);return this.executeRemove(n,t,i,s),this.executeUpdate(n,t,i,s),this.executeAdd(t,i),this.deselectNodes(s),i}executeAdd(t,o){const i=t.add;if(!(i!=null&&i.length))return;let s=this.rootNode.allLeafChildren,n=s.length;if(typeof t.addIndex=="number"&&(n=this.sanitizeAddIndex(t.addIndex),n>0&&this.gos.get("treeData")&&this.gos.get("getDataPath")))for(let h=0;h<s.length;h++){const g=s[h];if((g==null?void 0:g.rowIndex)==n-1){n=h+1;break}}const r=i.length,l=o.changedRowNodes,a=new Array(r);for(let u=0;u<r;u++){const h=this.createRowNode(i[u],n+u);l.add(h),a[u]=h}const d=this.rootNode;if(n<s.length){const u=s.slice(0,n),h=s.slice(n,s.length),g=u.length+a.length;for(let p=0,f=h.length;p<f;++p)h[p].sourceRowIndex=g+p;s=[...u,...a,...h],o.rowsInserted=!0}else s=s.concat(a);d.allLeafChildren=s;const c=d.sibling;c&&(c.allLeafChildren=s),o.rowNodeTransaction.add=a}executeRemove(t,o,{changedRowNodes:i,rowNodeTransaction:s},n){var r,l,a;const{remove:d}=o;if(!(d!=null&&d.length))return;const c={};d.forEach(g=>{var p;const f=this.lookupRowNode(t,g);f&&(f.isSelected()&&n.push(f),f.pinnedSibling&&((p=this.beans.pinnedRowModel)==null||p.pinRow(f.pinnedSibling,null)),f.clearRowTopAndRowIndex(),c[f.id]=!0,delete this.allNodesMap[f.id],s.remove.push(f),i.remove(f))});const u=this.rootNode;u.allLeafChildren=(l=(r=u.allLeafChildren)==null?void 0:r.filter(g=>!c[g.id]))!=null?l:null,(a=u.allLeafChildren)==null||a.forEach((g,p)=>{g.sourceRowIndex=p});const h=u.sibling;h&&(h.allLeafChildren=u.allLeafChildren)}executeUpdate(t,o,{changedRowNodes:i,rowNodeTransaction:s},n){const{update:r}=o;r!=null&&r.length&&r.forEach(l=>{const a=this.lookupRowNode(t,l);a&&(a.updateData(l),!a.selectable&&a.isSelected()&&n.push(a),s.update.push(a),i.update(a))})}dispatchRowDataUpdateStartedEvent(t){this.eventSvc.dispatchEvent({type:"rowDataUpdateStarted",firstRowData:t!=null&&t.length?t[0]:null})}deselectNodes(t){var o,i;const s="rowDataChanged",n=this.beans.selectionSvc,r=t.length>0;r&&(n==null||n.setNodesSelected({newValue:!1,nodes:t,suppressFinishActions:!0,source:s})),(o=n==null?void 0:n.updateGroupsFromChildrenSelections)==null||o.call(n,s),r&&this.eventSvc.dispatchEvent({type:"selectionChanged",source:s,selectedNodes:(i=n==null?void 0:n.getSelectedNodes())!=null?i:null,serverSideState:null})}sanitizeAddIndex(t){var o,i;const s=(i=(o=this.rootNode.allLeafChildren)==null?void 0:o.length)!=null?i:0;return t<0||t>=s||Number.isNaN(t)?s:Math.ceil(t)}createRowNode(t,o){const i=new So(this.beans);return i.parent=this.rootNode,i.level=0,i.group=!1,i.expanded=!1,i.sourceRowIndex=o,i.setDataAndId(t,String(this.nextId)),this.allNodesMap[i.id]&&G(2,{nodeId:i.id}),this.allNodesMap[i.id]=i,this.nextId++,i}lookupRowNode(t,o){var i,s;let n;if(t){const r=t({data:o,level:0});if(n=this.allNodesMap[r],!n)return j(4,{id:r}),null}else if(n=(s=(i=this.rootNode)==null?void 0:i.allLeafChildren)==null?void 0:s.find(r=>r.data===o),!n)return j(5,{data:o}),null;return n||null}}var VR=Object.defineProperty,WR=(e,t,o)=>t in e?VR(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,zR=(e,t,o)=>WR(e,t+"",o);class $R extends NR{constructor(){super(...arguments),zR(this,"beanName","csrmNodeSvc")}}var UR=Object.defineProperty,KR=(e,t,o)=>t in e?UR(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,Bn=(e,t,o)=>KR(e,typeof t!="symbol"?t+"":t,o);class _n{constructor(){Bn(this,"removals",new Set),Bn(this,"updates",new Set),Bn(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 jR(e){e.sibling&&(e.sibling.childrenAfterFilter=e.childrenAfterFilter)}var qR=Object.defineProperty,YR=(e,t,o)=>t in e?qR(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,Nn=(e,t,o)=>YR(e,typeof t!="symbol"?t+"":t,o);function ZR(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 Ed(e){e.sibling&&(e.sibling.childrenAfterSort=e.childrenAfterSort),ZR(e)}class XR extends F{constructor(){super(...arguments),Nn(this,"beanName","sortStage"),Nn(this,"refreshProps",new Set(["postSortRows","groupDisplayType","accentedSort"])),Nn(this,"step","sort")}execute(t){const o=this.beans,i=o.sortSvc.getSortOptions(),s=L(i)&&i.length>0,n=s&&!!t.changedRowNodes&&this.gos.get("deltaSort"),r=i.some(({column:l})=>Me(o.gos)?l.isPrimary()&&l.isRowGroupActive():!!l.getColDef().showRowGroup);this.sort(o,i,s,n,t.changedRowNodes,t.changedPath,r)}sort(t,o,i,s,n,r,l){const{gos:a,colModel:d,rowGroupColsSvc:c,rowNodeSorter:u,rowRenderer:h,showRowGroupCols:g}=t,p=a.get("groupMaintainOrder"),f=d.getCols().some(w=>w.isRowGroupActive()),C=d.isPivotMode(),m=a.getCallback("postSortRows");let b=!1;const S=w=>{var y,R;const P=C&&w.leafGroup,M=p&&f&&!w.leafGroup&&!l;let I;if(M){const D=(y=c==null?void 0:c.columns)==null?void 0:y[w.level+1],T=(D==null?void 0:D.getSort())===null,k=w.childrenAfterAggFilter.slice(0);if(w.childrenAfterSort&&!T){const O={};w.childrenAfterSort.forEach((W,$)=>{O[W.id]=$}),k.sort((W,$)=>{var Q,X;return((Q=O[W.id])!=null?Q:0)-((X=O[$.id])!=null?X:0)})}I=k}else!i||P?I=w.childrenAfterAggFilter.slice(0):s&&n?I=QR(u,w,n,r,o):I=w.childrenAfterAggFilter.slice(0);if(b||(b=((R=w.childrenAfterSort)==null?void 0:R[0])!==I[0]),w.childrenAfterSort=I,Ed(w),m){const D={nodes:w.childrenAfterSort};m(D)}};if(r==null||r.forEachChangedNodeDepthFirst(S),b&&this.gos.get("groupHideOpenParents")){const w=g==null?void 0:g.getShowRowGroupCols();w!=null&&w.length&&h.refreshCells({columns:w,force:!0})}}}function QR(e,t,o,i,s){const n=t.childrenAfterAggFilter,r=t.childrenAfterSort;if(!r)return e.doFullSort(n,s);const l=new Set,a=[],{updates:d,adds:c}=o;for(let h=0,g=n.length;h<g;++h){const p=n[h];d.has(p)||c.has(p)||i&&!i.canSkip(p)?a.push({currentPos:a.length,rowNode:p}):l.add(p.id)}const u=r.filter(h=>l.has(h.id)).map((h,g)=>({currentPos:g,rowNode:h}));return a.sort((h,g)=>e.compareRowNodes(s,h,g)),JR(e,s,a,u)}function JR(e,t,o,i){const s=[];let n=0,r=0;const l=o.length,a=i.length;for(;n<l&&r<a;){const d=o[n],c=i[r],u=e.compareRowNodes(t,d,c);let h;u<0?(h=d,++n):(h=c,++r),s.push(h.rowNode)}for(;n<l;)s.push(o[n++].rowNode);for(;r<a;)s.push(i[r++].rowNode);return s}var e0=Object.defineProperty,t0=(e,t,o)=>t in e?e0(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,te=(e,t,o)=>t0(e,typeof t!="symbol"?t+"":t,o);class o0 extends F{constructor(){super(...arguments),te(this,"beanName","rowModel"),te(this,"colModel"),te(this,"valueCache"),te(this,"filterStage"),te(this,"sortStage"),te(this,"flattenStage"),te(this,"groupStage"),te(this,"aggStage"),te(this,"pivotStage"),te(this,"filterAggStage"),te(this,"rootNode",null),te(this,"rowsToDisplay",[]),te(this,"nodeManager"),te(this,"rowDataTransactionBatch"),te(this,"rowDataUpdatedPending",!1),te(this,"applyAsyncTransactionsTimeout"),te(this,"started",!1),te(this,"isRefreshingModel",!1),te(this,"rowNodesCountReady",!1),te(this,"rowCountReady",!1),te(this,"orderedStages"),te(this,"onRowHeightChanged_debounced",ve(this,this.onRowHeightChanged.bind(this),100))}wireBeans(t){this.colModel=t.colModel,this.valueCache=t.valueCache,this.filterStage=t.filterStage,this.sortStage=t.sortStage,this.flattenStage=t.flattenStage,this.groupStage=t.groupStage,this.aggStage=t.aggStage,this.pivotStage=t.pivotStage,this.filterAggStage=t.filterAggStage}postConstruct(){this.orderedStages=[this.groupStage,this.filterStage,this.pivotStage,this.aggStage,this.sortStage,this.filterAggStage,this.flattenStage].filter(s=>!!s);const t=this.refreshModel.bind(this,{step:"group"}),o=this.refreshModel.bind(this,{step:"group",afterColumnsChanged:!0,keepRenderedRows:!0,animate:!this.gos.get("suppressAnimationFrame")});this.addManagedEventListeners({newColumnsLoaded:o,columnRowGroupChanged:t,columnValueChanged:this.onValueChanged.bind(this),columnPivotChanged:this.refreshModel.bind(this,{step:"pivot"}),filterChanged:this.onFilterChanged.bind(this),sortChanged:this.onSortChanged.bind(this),columnPivotModeChanged:t,gridStylesChanged:this.onGridStylesChanges.bind(this),gridReady:this.onGridReady.bind(this)}),this.addPropertyListeners(),this.rootNode=new So(this.beans);const i=this.getNewNodeManager();this.nodeManager=i,i.activate(this.rootNode)}getNewNodeManager(){const{gos:t,beans:o}=this;return lu(t)==="treeNested"&&o.csrmChildrenTreeNodeSvc||o.csrmNodeSvc}addPropertyListeners(){const t=["treeData","treeDataChildrenField",...this.orderedStages.flatMap(({refreshProps:o})=>[...o])];this.addManagedPropertyListeners(t,o=>{var i;const s=(i=o.changeSet)==null?void 0:i.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(t,o,i,s){let n,r=!1;do{n=!1;const l=this.getRowIndexAtPixel(t),a=this.getRowIndexAtPixel(o),d=Math.max(l,i),c=Math.min(a,s);for(let u=d;u<=c;u++){const h=this.getRow(u);if(h.rowHeightEstimated){const g=Qe(this.beans,h);h.setRowHeight(g.height),n=!0,r=!0}}n&&this.setRowTopAndRowIndex()}while(n);return r}onPropChange(t){var o;if(!this.rootNode)return;const i=this.gos,s=new Set(t),n={step:"nothing",changedProps:s},r=s.has("rowData"),l=this.nodeManager,a=this.getNewNodeManager(),d=l!==a||r&&s.has("treeData")&&i.get("treeData")||s.has("treeDataChildrenField")&&i.get("treeData");let c;if((d||r)&&(c=i.get("rowData"),c!=null&&!Array.isArray(c)&&(c=null,G(1))),d&&(r||(c=(o=l==null?void 0:l.extractRowData())!=null?o:c),l!==a&&(l==null||l.deactivate(),this.nodeManager=a),a.activate(this.rootNode)),c)if(!d&&!this.isEmpty()&&c.length>0&&i.exists("getRowId")&&!i.get("resetRowDataOnUpdate"))n.keepRenderedRows=!0,n.animate=!this.gos.get("suppressAnimationFrame"),n.changedRowNodes=new _n,a.setImmutableRowData(n,c);else{n.rowDataUpdated=!0,n.newData=!0;const{selectionSvc:h,pinnedRowModel:g}=this.beans;h==null||h.reset("rowDataChanged"),g!=null&&g.isManual()&&g.reset(),this.rowNodesCountReady=!0,a.setNewRowData(c)}if(n.rowDataUpdated)n.step="group";else if(n.step==="nothing"){for(const{refreshProps:u,step:h}of this.orderedStages)if(t.some(g=>u.has(g))){n.step=h;break}}n.step!=="nothing"&&this.refreshModel(n)}setRowTopAndRowIndex(){const{beans:t,rowsToDisplay:o}=this,i=t.environment.getDefaultRowHeight();let s=0;const n=new Set,r=le(this.gos,"normal");for(let l=0,a=o.length;l<a;++l){const d=o[l];if(d.id!=null&&n.add(d.id),d.rowHeight==null){const c=Qe(t,d,r,i);d.setRowHeight(c.height,c.estimated)}d.setRowTop(s),d.setRowIndex(l),s+=d.rowHeight}return n}clearRowTopAndRowIndex(t,o){const i=t.active,s=r=>{r&&r.id!=null&&!o.has(r.id)&&r.clearRowTopAndRowIndex()},n=r=>{if(r!==null&&(s(r),s(r.detailNode),s(r.sibling),r.hasChildren()&&r.childrenAfterGroup)){const l=r.level==-1;i&&!l&&!r.expanded||r.childrenAfterGroup.forEach(n)}};n(this.rootNode)}isLastRowIndexKnown(){return!0}getRowCount(){return this.rowsToDisplay?this.rowsToDisplay.length:0}getTopLevelRowCount(){const t=this.rootNode;if(!t||this.rowsToDisplay.length===0)return 0;if(this.rowsToDisplay&&this.rowsToDisplay[0]===t)return 1;const i=t.childrenAfterSort,s=t.sibling&&t.sibling.displayed?1:0;return(i?i.length:0)+s}getTopLevelRowDisplayedIndex(t){const{rootNode:o,rowsToDisplay:i}=this;if(!o||!i.length||i[0]===o)return t;const{childrenAfterSort:n}=o,r=a=>{let d=n[a];if(this.gos.get("groupHideOpenParents"))for(;d.expanded&&d.childrenAfterSort&&d.childrenAfterSort.length>0;)d=d.childrenAfterSort[0];return d.rowIndex},{footerSvc:l}=this.beans;return l?l.getTopDisplayIndex(i,t,n,r):r(t)}getTopLevelIndexFromDisplayedIndex(t){var o;const{rootNode:i,rowsToDisplay:s}=this;if(!i||!s.length||s[0]===i)return t;let r=this.getRow(t);for(r.footer&&(r=r.sibling);r.parent&&r.parent!==i;)r=r.parent;const l=(o=i.childrenAfterSort)==null?void 0:o.findIndex(a=>a===r);return l===-1?t:l??t}getRowBounds(t){const o=this.rowsToDisplay[t];return o?{rowTop:o.rowTop,rowHeight:o.rowHeight}:null}onRowGroupOpened(){const t=Gt(this.gos);this.refreshModel({step:"map",keepRenderedRows:!0,animate:t})}onFilterChanged(t){if(t.afterDataChange)return;const o=Gt(this.gos),s=t.columns.length===0||t.columns.some(n=>n.isPrimary())?"filter":"filter_aggregates";this.refreshModel({step:s,keepRenderedRows:!0,animate:o})}onSortChanged(){const t=Gt(this.gos);this.refreshModel({step:"sort",keepRenderedRows:!1,animate:t})}getType(){return"clientSide"}onValueChanged(){this.refreshModel({step:this.colModel.isPivotActive()?"pivot":"aggregate"})}createChangePath(t){const o=new Gi(!1,this.rootNode);return t||(o.active=!1),o}isSuppressModelUpdateAfterUpdateTransaction(t){if(!this.gos.get("suppressModelUpdateAfterUpdateTransaction"))return!1;const{changedRowNodes:o,newData:i,rowDataUpdated:s}=t;return!(!o||i||!s||o.removals.size||o.adds.size)}refreshModel(t){var o,i,s,n;if(!this.rootNode)return;const r=this.beans;let l=!!t.rowDataUpdated;const a=(o=t.changedPath)!=null?o:t.changedPath=this.createChangePath(!t.newData&&l);if(this.started&&l&&this.eventSvc.dispatchEvent({type:"rowDataUpdated"}),this.rowDataUpdatedPending||(this.rowDataUpdatedPending=l),!this.started||this.isRefreshingModel||this.colModel.changeEventsDispatching||this.isSuppressModelUpdateAfterUpdateTransaction(t))return;switch(this.rowDataUpdatedPending&&(this.rowDataUpdatedPending=!1,t.rowDataUpdated=l=!0),this.isRefreshingModel=!0,(i=r.masterDetailSvc)==null||i.refreshModel(t),l&&t.step!=="group"&&((s=r.colFilter)==null||s.refreshModel()),t.step){case"group":(this.doRowGrouping(t)||l)&&((n=r.colFilter)==null||n.refreshModel()),!this.rowCountReady&&this.rowNodesCountReady&&(this.rowCountReady=!0,this.eventSvc.dispatchEventOnce({type:"rowCountReady"}));case"filter":this.doFilter(a);case"pivot":this.doPivot(a);case"aggregate":this.doAggregate(a);case"filter_aggregates":this.doFilterAggregates(a);case"sort":this.doSort(t.changedRowNodes,a);case"map":this.doRowsToDisplay()}const d=this.setRowTopAndRowIndex();this.clearRowTopAndRowIndex(a,d),this.isRefreshingModel=!1,this.eventSvc.dispatchEvent({type:"modelUpdated",animate:t.animate,keepRenderedRows:t.keepRenderedRows,newData:t.newData,newPage:!1,keepUndoRedoStack:t.keepUndoRedoStack})}isEmpty(){var t,o,i;return!((o=(t=this.rootNode)==null?void 0:t.allLeafChildren)!=null&&o.length)||!((i=this.colModel)!=null&&i.ready)}isRowsToRender(){return this.rowsToDisplay.length>0}getNodesInRangeForSelection(t,o){let i=!1,s=!1;const n=[],r=fo(this.gos);return this.forEachNodeAfterFilterAndSort(l=>{if(s)return;if(i&&(l===o||l===t)&&(s=!0,l.group&&r)){n.push(...l.allLeafChildren);return}if(!i){if(l!==o&&l!==t)return;i=!0}if(!l.group||!r){n.push(l);return}}),n}getTopLevelNodes(){var t,o;return(o=(t=this.rootNode)==null?void 0:t.childrenAfterGroup)!=null?o:null}getRow(t){return this.rowsToDisplay[t]}isRowPresent(t){return this.rowsToDisplay.indexOf(t)>=0}getRowIndexAtPixel(t){const o=this.rowsToDisplay;if(this.isEmpty()||o.length===0)return-1;let i=0,s=o.length-1;if(t<=0)return 0;if(U(o).rowTop<=t)return o.length-1;let r=-1,l=-1;for(;;){const a=Math.floor((i+s)/2),d=o[a];if(this.isRowInPixel(d,t)||(d.rowTop<t?i=a+1:d.rowTop>t&&(s=a-1),r===i&&l===s))return a;r=i,l=s}}isRowInPixel(t,o){const i=t.rowTop,s=t.rowTop+t.rowHeight;return i<=o&&s>o}forEachLeafNode(t){var o,i;(i=(o=this.rootNode)==null?void 0:o.allLeafChildren)==null||i.forEach((s,n)=>t(s,n))}forEachNode(t,o=!1){this.depthFirstSearchRowNodes(t,o)}forEachDisplayedNode(t){this.rowsToDisplay.forEach(t)}forEachNodeAfterFilter(t,o=!1){this.depthFirstSearchRowNodes(t,o,i=>i.childrenAfterAggFilter)}forEachNodeAfterFilterAndSort(t,o=!1){this.depthFirstSearchRowNodes(t,o,i=>i.childrenAfterSort)}forEachPivotNode(t,o=!1,i=!1){const{colModel:s,rowGroupColsSvc:n}=this.beans;if(!s.isPivotMode())return;if(!(n!=null&&n.columns.length)){t(this.rootNode,0);return}const r=i?"childrenAfterSort":"childrenAfterGroup";this.depthFirstSearchRowNodes(t,o,l=>l.leafGroup?null:l[r])}depthFirstSearchRowNodes(t,o=!1,i=r=>r.childrenAfterGroup,s=this.rootNode,n=0){var r,l;let a=n;if(!s)return a;const d=s===this.rootNode;d||t(s,a++);const{footerSvc:c}=this.beans;if(s.hasChildren()&&!s.footer){const u=i(s);if(u){a=(r=c==null?void 0:c.addTotalRows(a,s,t,o,d,"top"))!=null?r:a;for(const h of u)a=this.depthFirstSearchRowNodes(t,o,i,h,a);return(l=c==null?void 0:c.addTotalRows(a,s,t,o,d,"bottom"))!=null?l:a}}return a}doAggregate(t){var o;const i=this.rootNode;i&&((o=this.aggStage)==null||o.execute({rowNode:i,changedPath:t}))}doFilterAggregates(t){const o=this.rootNode;this.filterAggStage?this.filterAggStage.execute({rowNode:o,changedPath:t}):o.childrenAfterAggFilter=o.childrenAfterFilter}doSort(t,o){this.sortStage?this.sortStage.execute({rowNode:this.rootNode,changedRowNodes:t,changedPath:o}):o.forEachChangedNodeDepthFirst(i=>{i.childrenAfterSort=i.childrenAfterAggFilter.slice(0),Ed(i)})}doRowGrouping(t){var o;const i=this.rootNode,s=(o=this.groupStage)==null?void 0:o.execute({rowNode:i,changedRowNodes:t.changedRowNodes,changedPath:t.changedPath,rowNodesOrderChanged:!!t.rowNodesOrderChanged,afterColumnsChanged:!!t.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(t){this.filterStage?this.filterStage.execute({rowNode:this.rootNode,changedPath:t}):t.forEachChangedNodeDepthFirst(o=>{o.childrenAfterFilter=o.childrenAfterGroup,jR(o)},!0)}doPivot(t){var o;(o=this.pivotStage)==null||o.execute({rowNode:this.rootNode,changedPath:t})}getRowNode(t){var o;const i=this.nodeManager.getRowNode(t);return typeof i=="object"?i:typeof t=="string"&&t.indexOf(Vs)===0?(o=this.groupStage)==null?void 0:o.getNode(t):void 0}batchUpdateRowData(t,o){if(this.applyAsyncTransactionsTimeout==null){this.rowDataTransactionBatch=[];const i=this.gos.get("asyncTransactionWaitMillis");this.applyAsyncTransactionsTimeout=window.setTimeout(()=>{this.isAlive()&&this.executeBatchUpdateRowData()},i)}this.rowDataTransactionBatch.push({rowDataTransaction:t,callback:o})}flushAsyncTransactions(){this.applyAsyncTransactionsTimeout!=null&&(clearTimeout(this.applyAsyncTransactionsTimeout),this.executeBatchUpdateRowData())}executeBatchUpdateRowData(){var t,o;(t=this.valueCache)==null||t.onDataChanged();const i=[],s=[],n=new _n;let r=!1;(o=this.rowDataTransactionBatch)==null||o.forEach(l=>{this.rowNodesCountReady=!0;const{rowNodeTransaction:a,rowsInserted:d}=this.nodeManager.updateRowData(l.rowDataTransaction,n);d&&(r=!0),s.push(a),l.callback&&i.push(l.callback.bind(null,a))}),this.commitTransactions(r,n),i.length>0&&window.setTimeout(()=>{i.forEach(l=>l())},0),s.length>0&&this.eventSvc.dispatchEvent({type:"asyncTransactionsFlushed",results:s}),this.rowDataTransactionBatch=null,this.applyAsyncTransactionsTimeout=void 0}updateRowData(t){var o;(o=this.valueCache)==null||o.onDataChanged(),this.rowNodesCountReady=!0;const i=new _n,{rowNodeTransaction:s,rowsInserted:n}=this.nodeManager.updateRowData(t,i);return this.commitTransactions(n,i),s}commitTransactions(t,o){this.refreshModel({step:"group",rowDataUpdated:!0,rowNodesOrderChanged:t,keepRenderedRows:!0,animate:!this.gos.get("suppressAnimationFrame"),changedRowNodes:o,changedPath:this.createChangePath(!0)})}doRowsToDisplay(){var t;const{flattenStage:o,rootNode:i}=this;let s;if(o)s=o.execute({rowNode:i});else{s=(t=i==null?void 0:i.childrenAfterSort)!=null?t:[];for(const n of s)n.setUiLevel(0)}this.rowsToDisplay=s}onRowHeightChanged(){this.refreshModel({step:"map",keepRenderedRows:!0,keepUndoRedoStack:!0})}resetRowHeights(){const t=this.rootNode;if(!t)return;const o=this.resetRowHeightsForAllRowNodes();t.setRowHeight(t.rowHeight,!0),t.sibling&&t.sibling.setRowHeight(t.sibling.rowHeight,!0),o&&this.onRowHeightChanged()}resetRowHeightsForAllRowNodes(){let t=!1;return this.forEachNode(o=>{o.setRowHeight(o.rowHeight,!0);const i=o.detailNode;i&&i.setRowHeight(i.rowHeight,!0),o.sibling&&o.sibling.setRowHeight(o.sibling.rowHeight,!0),t=!0}),t}onGridStylesChanges(t){var o;if(t.rowHeightChanged){if((o=this.beans.rowAutoHeight)!=null&&o.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=Ur,this.rowsToDisplay=Ur}onRowHeightChangedDebounced(){this.onRowHeightChanged_debounced()}}function i0(e){var t;(t=e.expansionSvc)==null||t.onGroupExpandedOrCollapsed()}function s0(e,t){const o=Oe(e);o&&((!t||t==="everything")&&(t="group"),o.refreshModel({step:t,keepRenderedRows:!0,animate:!e.gos.get("suppressAnimationFrame")}))}function n0(e){var t,o;return(o=(t=Oe(e))==null?void 0:t.isEmpty())!=null?o:!0}function r0(e,t){var o;(o=Oe(e))==null||o.forEachLeafNode(t)}function l0(e,t){var o;(o=Oe(e))==null||o.forEachNodeAfterFilter(t)}function a0(e,t){var o;(o=Oe(e))==null||o.forEachNodeAfterFilterAndSort(t)}function d0(e){var t,o;if((t=e.rowAutoHeight)!=null&&t.active){G(3);return}(o=Oe(e))==null||o.resetRowHeights()}function c0(e,t){return e.frameworkOverrides.wrapIncoming(()=>{var o;return(o=Oe(e))==null?void 0:o.updateRowData(t)})}function u0(e,t,o){e.frameworkOverrides.wrapIncoming(()=>{var i;return(i=Oe(e))==null?void 0:i.batchUpdateRowData(t,o)})}function h0(e){e.frameworkOverrides.wrapIncoming(()=>{var t;return(t=Oe(e))==null?void 0:t.flushAsyncTransactions()})}function g0(e){var t;return(t=e.selectionSvc)==null?void 0:t.getBestCostNodeSelection()}const p0={moduleName:"ClientSideRowModel",version:Ki,rowModels:["clientSide"],beans:[$R,o0,XR],dependsOn:[Ka]},f0={moduleName:"ClientSideRowModelApi",version:Ki,apiFunctions:{onGroupExpandedOrCollapsed:i0,refreshClientSideRowModel:s0,isRowDataEmpty:n0,forEachLeafNode:r0,forEachNodeAfterFilter:l0,forEachNodeAfterFilterAndSort:a0,resetRowHeights:d0,applyTransaction:c0,applyTransactionAsync:u0,flushAsyncTransactions:h0,getBestCostNodeSelection:g0},dependsOn:[NS]},Dd=e=>{const t=e.getColumnState().filter(i=>i.sort!=null),o={};return t.forEach((i,s)=>o[i.colId]=s),t.sort((i,s)=>{const n=i.sortIndex,r=s.sortIndex;if(n!=null&&r!=null)return n-r;if(n==null&&r==null){const l=o[i.colId],a=o[s.colId];return l>a?1:-1}else return r==null?-1:1}),t},C0=e=>{const t=Dd(e),o=new Map;return t.forEach((i,s)=>{o.set(i.colId,s)}),o},m0=(e,t)=>{var o;return(o=C0(e).get(t))!=null?o:-1};var v0=Object.defineProperty,w0=(e,t,o)=>t in e?v0(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,oo=(e,t,o)=>w0(e,typeof t!="symbol"?t+"":t,o);const b0=e=>!!e&&(typeof e=="object"||typeof e=="function")&&typeof e.then=="function";class Fd{constructor(t,o){oo(this,"loading",!1),oo(this,"dataGetter"),oo(this,"cache"),oo(this,"_api"),oo(this,"loadingDelay"),oo(this,"getSorts",()=>Dd(this.api).map(i=>({colId:i.colId,sort:i.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.loading=!1}getRows(t){var o,i,s,n,r,l,a,d;if(this.loading||!this._api){(i=(o=t.context)==null?void 0:o.resolve)==null||i.call(o);return}if(this.cache.isFinished&&t.pageNum!==1){(n=(s=t.context)==null?void 0:s.resolve)==null||n.call(s);return}if(this.loading=!0,N.isFunction(this.dataGetter)){const c=this.dataGetter({startRow:t.startRow,endRow:t.endRow,pageNum:t.pageNum,pageSize:t.pageSize,params:t.filterModel,sorts:this.getSorts()});b0(c)&&(this.loadingDelay=setTimeout(()=>{this.api.setGridOption("loading",!0)},500),c.then(u=>{var h,g;t.successCallback(u,u.length),(g=(h=t.context)==null?void 0:h.resolve)==null||g.call(h)}).catch(u=>{var h,g;t.failCallback(),(g=(h=t.context)==null?void 0:h.reject)==null||g.call(h,u)}).finally(()=>{clearTimeout(this.loadingDelay),this.api.setGridOption("loading",!1),this.loadData()})),N.isArray(c)&&(t.successCallback(c,c.length),this.loadData(),(l=(r=t.context)==null?void 0:r.resolve)==null||l.call(r))}else t.successCallback(this.dataGetter,this.dataGetter.length),this.loadData(),(d=(a=t.context)==null?void 0:a.resolve)==null||d.call(a)}}const Dt=Symbol("grid-context");class Pd{static isGroupColDef(t){return!!t.children}}class ko{static getComponentDefinition(t,o){let i;return typeof t=="string"?i=this.searchForComponentInstance(o,t):i={extends:v.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=ko.getComponentDefinition(t,i);if(!n)return;const{vm:r,destroy:l,el:a}=this.mount(n,{params:Object.freeze(o)},i,s||{});return{componentInstance:r,element:a,destroy:l}}static mount(t,o,i,s){let n=new v({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||{}},render(l){return l(t,{props:o})}});return n.$mount(),{vm:n,destroy:()=>{n&&(n.$destroy(),n=null)},el:n.$el}}static searchForComponentInstance(t,o,i=10,s=!1){let n=null,r=0,l=t.proxy.$parent;for(;!n&&l&&l.components&&++r<i;)l.components&&l.components[o]&&(n=l.components[o]),l=l.$parent;for(r=0,l=t.proxy.$parent;!n&&l&&l.$options&&++r<i;){const a=l;a.$options&&a.$options.components&&a.$options.components[o]?n=a.$options.components[o]:a[o]&&(n=a[o]),l=l.$parent}for(r=0,l=t.proxy.$parent;!n&&l&&++r<i;){if(l.exposed){const a=l;a.exposed&&a.exposed[o]?n=a.exposed[o]:a[o]&&(n=a[o])}l=l.$parent}return n||v.options&&v.options.components&&v.options.components[o]&&(n=v.options.components[o]),!n&&!s?(j(114,{component:o}),null):n}}var S0=Object.defineProperty,y0=(e,t,o)=>t in e?S0(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,Lo=(e,t,o)=>y0(e,typeof t!="symbol"?t+"":t,o);class R0 extends Sb{constructor(t,o){super(),Lo(this,"parent"),Lo(this,"provides"),this.parent=t,this.provides=o}createWrapper(t){const o=this;class i extends x0{init(r){super.init(r)}hasMethod(r){return s.getFrameworkComponentInstance()[r]}callMethod(r,l){var a,d;const c=this.getFrameworkComponentInstance(),u=s.getFrameworkComponentInstance();if(u[r])return u[r].apply(c,l);{const h=((a=c.$.exposed)==null?void 0:a[r])||((d=c.exposed)==null?void 0:d[r])||c.$.setupState[r];return h==null?void 0:h.apply(c,l)}}addMethod(r,l){s[r]=l}processMethod(r,l){return r==="refresh"&&(this.getFrameworkComponentInstance().params=l[0]),this.hasMethod(r)?this.callMethod(r,l):r==="refresh"}createComponent(r){return o.createComponent(t,r)}}const s=new i;return s}createComponent(t,o){return ko.createAndMountComponent(t,o,this.parent,this.provides)}createMethodProxy(t,o,i){return function(){return t.hasMethod(o)?t.callMethod(o,arguments):(i&&G(233,{methodName:o}),null)}}destroy(){this.parent=null}}class x0{constructor(){Lo(this,"componentInstance"),Lo(this,"element"),Lo(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 E0=Object.defineProperty,D0=(e,t,o)=>t in e?E0(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,F0=(e,t,o)=>D0(e,t+"",o);class P0 extends ra{constructor(t){super("vue"),F0(this,"parent"),this.parent=t}frameworkComponent(t,o){let i=ko.searchForComponentInstance(this.parent,t,10,!0)?t:null;if(!i&&o&&o[t]){const s=o[t];i=ko.searchForComponentInstance(this.parent,s,10,!0)?s:null}return i}isFrameworkComponent(t){return typeof t=="object"}}function T0(){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 I0=(e,t)=>{let o;return()=>{const i=function(){e()};window.clearTimeout(o),o=window.setTimeout(i,t)}};function M0(e){return e&&e.constructor&&e.constructor.toString().substring(0,5)==="class"}function Go(e){const t=o=>M0(o)?v.toRaw(o):Array.isArray(o)?o.map(i=>t(i)):v.isRef(o)||v.isReactive(o)||v.isProxy(o)?t(v.toRaw(o)):o;return t(e)}const A0=v.defineComponent({__name:"AgGridVue",props:v.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},T0()),emits:["update:modelValue"],setup(e,{expose:t,emit:o}){const i=e,s=v.ref(),n=v.ref(void 0),r=v.ref(!1),l=v.ref(!1),a=v.ref(!1),d=v.ref({}),c=v.ref(null),u=v.toRefs(i);Pn().filter(I=>I!="gridOptions").forEach(I=>{v.watch(()=>u[I],(D,T)=>{(I==="rowData"&&!f.value||I!=="rowData")&&P(I,D),f.value=!1},{deep:!0})});const h=new Set(["rowDataUpdated","cellValueChanged","rowValueChanged"]),g=v.ref(i.modelValue),p=v.ref(!1),f=v.ref(!1);v.watch(()=>i.modelValue,I=>{g.value=I}),v.watch(g,(I,D)=>{r.value&&(f.value||(p.value=!0,P("rowData",Go(I),Go(D))),f.value=!1)},{deep:!0});const C=I0(()=>{f.value=!0,o("update:modelValue",y())},10),m=v.getCurrentInstance(),b=I=>{var D;a.value&&h.has(I)&&(D=m==null?void 0:m.proxy)!=null&&D.$props["onUpdate:modelValue"]&&C()},S=()=>{var I;(i.rowData||(I=i.gridOptions)!=null&&I.rowData)&&g.value&&G(232)},w=()=>{var I;return g.value||i.rowData||((I=i.gridOptions)==null?void 0:I.rowData)},y=()=>{const I=[];return n==null||n.value.forEachLeafNode(D=>{I.push(D.data)}),I},R=I=>D=>{if(l.value)return;D==="gridReady"&&(a.value=!0);const T=Po.has(D);T&&!I||!T&&I||h.has(D)&&(p.value||b(D),p.value=!1)},P=(I,D,T)=>{if(r.value){let k=D.value||D;I==="rowData"&&k!=null&&(k=Go(k)),d.value[I]=k,c.value==null&&(c.value=window.setTimeout(()=>{c.value=null,ru(d.value,n.value),d.value={}},0))}},M=()=>Object.create(v.getCurrentInstance().proxy._provided);return v.onMounted(()=>{Wt(fd,void 0,!0);const I=new R0(v.getCurrentInstance(),M()),D={globalListener:R(),globalSyncListener:R(!0),frameworkOverrides:new P0(v.getCurrentInstance()),providedBeanInstances:{frameworkCompWrapper:I},modules:i.modules},T=v.markRaw(nu(Go(i.gridOptions),i,[...Pn(),...Object.values(_i)])),k=w();k!==void 0&&(T.rowData=Go(k)),n.value=pb(s.value,T,D),r.value=!0}),v.onUnmounted(()=>{var I;r.value&&((I=n==null?void 0:n.value)==null||I.destroy(),l.value=!0)}),t({api:n}),{__sfc:!0,props:i,rootRef:s,api:n,gridCreated:r,isDestroyed:l,gridReadyFired:a,batchChanges:d,batchTimeout:c,propsAsRefs:u,ROW_DATA_EVENTS:h,rowDataModel:g,rowDataUpdating:p,emittingRowData:f,emits:o,emitRowModel:C,thisInstance:m,updateModelIfUsed:b,checkForBindingConflicts:S,getRowDataBasedOnBindings:w,getRowData:y,globalEventListenerFactory:R,processChanges:P,getProvides:M}}});function ue(e,t,o,i,s,n,r,l){var a=typeof e=="function"?e.options:e;return t&&(a.render=t,a.staticRenderFns=o,a._compiled=!0),n&&(a._scopeId="data-v-"+n),{exports:e,options:a}}var k0=function(){var t=this,o=t._self._c;return t._self._setupProxy,o("div",{ref:"rootRef"})},L0=[],G0=ue(A0,k0,L0,!1,null,"60566900");const Td=G0.exports;var H0=Object.defineProperty,O0=(e,t,o)=>t in e?H0(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,st=(e,t,o)=>O0(e,typeof t!="symbol"?t+"":t,o);class Xi{constructor(t,o,i,s,n){st(this,"id"),st(this,"field"),st(this,"value"),st(this,"index"),st(this,"properties",new Map),st(this,"parent"),st(this,"spanRow",1),st(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=N.get(this.value,t);let r;if(N.isArray(n)&&i.getColDef().cellDataType!=="native"){r=new Array(n.length);for(let l=0;l<n.length;l++)r[l]=new Xi(`${this.id}_${l}`,t,n[l],l,o)}else r=new Xi(this.id,t,n,void 0,o);return this.properties.set(t,r),r}isNeedSpan(){return Array.from(this.properties.values()).some(t=>N.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(N.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())N.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())N.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}${N.isNumber(o.index)?`[${o.index}]`:""}`),o=o.parent;return t.reverse().slice(1).join(".")}isArrayElement(){return this.path.endsWith("]")}}var B0=Object.defineProperty,_0=(e,t,o)=>t in e?B0(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,Id=(e,t,o)=>_0(e,typeof t!="symbol"?t+"":t,o);const Md=class uc{constructor(t,o){Id(this,"cellSpanCache",new Map),this.cellSpanCache=new Map;for(const i of t)this.calcSpanInfo(i.id,i,o)}get(t,o){var i;return(i=this.cellSpanCache.get(this.getKey(t,o)))!=null?i:0}set(t,o,i){this.cellSpanCache.set(this.getKey(t,o),i)}getKey(t,o){return`${t}${uc.SPLITTER}${o.getColId()}`}calcSpanInfo(t,o,i){if(!o)return;const s=`${t}|${o.getPath()}`;if(!(this.cellSpanCache.has(t)||this.cellSpanCache.has(o.id))){t!==o.id&&this.cellSpanCache.set(`${o.id}`,o.spanRow),this.cellSpanCache.set(`${s}`,o.spanRow);for(const[n,r]of o.properties.entries())if(!N.isArray(r))this.cellSpanCache.set(`${t}|${r.getPath()}`,r.spanRow),this.processDeep(t,r);else if(r.length===0){const l=o.getPath()+"."+n,a=i.filter(d=>d.getColId().startsWith(l));for(const d of a)this.cellSpanCache.set(`${t}|${d.getColId()}`,o.spanRow)}o.parent&&this.calcSpanInfo(t,o.parent,i)}}processDeep(t,o){o.properties.forEach(i=>{N.isArray(i)||(this.cellSpanCache.set(`${t}|${i.getPath()}`,i.spanRow),this.processDeep(t,i))})}};Id(Md,"SPLITTER","|");let N0=Md;var V0=Object.defineProperty,W0=(e,t,o)=>t in e?V0(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,Ad=(e,t,o)=>W0(e,typeof t!="symbol"?t+"":t,o);class Vn{constructor(t,o){Ad(this,"actualRow"),Ad(this,"id"),this.actualRow=o,this.id=t}delete(){this.actualRow.delete()}redraw(){this.actualRow.redraw()}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)}isProjection(){return!0}getData(){return this.actualRow.getData()}isColumnValueChanged(t,o){return this.actualRow.isEditing()&&this.actualRow.getValue(o,this.getNestingIndexes())!==t}getNestingIndexes(){return this.id.split("_").slice(1).map(t=>parseInt(t))}getSignature(){return this.actualRow.getSignature()}getId(){return this.actualRow.getId()}getCell(t){return this.actualRow.getCell(t,this.getNestingIndexes())}isTransient(){return this.actualRow.isTransient()}setData(t){this.actualRow.setData(t)}buildSpan(){this.actualRow.buildSpan()}match(t){return t.data.getId()===this.actualRow.getId()}getHostObject(t){var o;let i,s;const n=this.getCell(t.column);if(n.parent&&(n==null?void 0:n.parent.field)!=="$"){let r=n.isArrayElement()?n.path:n.parent.path;((o=t.colDef)==null?void 0:o.cellDataType)==="array"&&(r=n.path),i=N.get(this.getData(),r),r.endsWith("]")&&(s=N.get(this.getData(),r.substring(0,r.lastIndexOf("["))))}else i=this.getData();return{hostObject:i,hostArray:s}}}var z0=Object.defineProperty,$0=(e,t,o)=>t in e?z0(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,Qi=(e,t,o)=>$0(e,typeof t!="symbol"?t+"":t,o);class kd{constructor(t,o,i=!1){Qi(this,"actualRow"),Qi(this,"draft"),Qi(this,"transient"),Qi(this,"idMapper"),this.actualRow=t,this.transient=i,this.idMapper=o,this.draft=v.reactive(N.cloneDeep(this.actualRow.data))}delete(){this.actualRow.delete()}redraw(){this.actualRow.redraw()}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}getData(){return this.draft}isProjection(){return!1}isTransient(){return this.transient}getCell(t,o){return this.actualRow.getCell(t,o)}__setIndex(t){this.actualRow.__setIndex(t)}stopEditing(t=!1){const o=new Ld(v.toRaw(this.draft),this.actualRow.gridApi,this.idMapper,this.actualRow.dataCache,this.actualRow.index);return o.dataCache.replace(o),t&&o.redraw(),o}isEditing(){return!!this.draft}getDraft(){return this.draft}getId(){return this.actualRow.id}flat(){return this.actualRow.leafCells.map(t=>new Vn(t.id,this))}async persistent(t){const o=await t(N.cloneDeep(this.draft));return this.actualRow.update(this.idMapper(o),o),this.draft=v.reactive(o),this.transient=!1,this}getRowSpans(){return this.actualRow.getRowSpans()}setData(t){this.draft=v.reactive(t)}buildSpan(){this.actualRow.buildSpan()}match(t){return this.actualRow.match(t)}}var U0=Object.defineProperty,K0=(e,t,o)=>t in e?U0(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,Be=(e,t,o)=>K0(e,typeof t!="symbol"?t+"":t,o);class Ld{constructor(t,o,i,s,n){Be(this,"id"),Be(this,"data"),Be(this,"pathCells"),Be(this,"signature"),Be(this,"leafCells"),Be(this,"spanCache"),Be(this,"gridApi"),Be(this,"idMapper"),Be(this,"dataCache"),Be(this,"index"),this.index=n,this.dataCache=s,this.idMapper=i,this.id=i(t),this.data=t,this.signature=os(JSON.stringify(t)),this.gridApi=o,this.buildSpan()}delete(){this.dataCache.remove([this])}redraw(){const t=this.gridApi.getRenderedNodes().filter(o=>o.data.getId()==this.id);this.gridApi.getGridOption("context").reload(),this.gridApi.redrawRows({rowNodes:t})}getDataIndex(){if(this.index===void 0)throw new Error(`row[${this.id}] not ready`);return this.index}getRowSpans(){return this.spanCache}getSignature(){return this.signature}startEditing(t=!1){const o=new kd(this,this.idMapper,!1);return this.dataCache.replace(o),t&&this.redraw(),o}__setIndex(t){this.index=t}update(t,o){this.id=t,this.data=o,this.signature=os(JSON.stringify(o)),this.buildSpan()}isProjection(){return!1}isTransient(){return!1}getId(){return this.id}isEditing(){return!1}getData(){return this.data}buildSpan(){const t=new Xi(this.id,"$",this.data),o=new Map,i=this.gridApi.getAllGridColumns();for(const s of i){const n=s.getColId().split(".");let r=t;for(let l=0;l<n.length;l++){const a=n[l];if(!N.isArray(r))r=r.pretreatmentValue(a,r,s);else{const d=[];for(const c of r){const u=c.pretreatmentValue(a,c,s);N.isArray(u)?d.push(...u):d.push(u)}r=d}l===n.length-1&&o.set(s.getColId(),r)}}t.calcSpan(),this.leafCells=this.getLeafCells(t),this.spanCache=new N0(this.leafCells,i),this.pathCells=t.properties}flat(){return this.leafCells.map(t=>new Vn(t.id,this))}getLeafCells(t){return Array.from(t.properties.values()).every(o=>!N.isArray(o)||o.length===0)?[t]:Array.from(t.properties.values()).flatMap(o=>N.isArray(o)?o.flatMap(i=>this.getLeafCells(i)):[])}getCell(t,o){const i=t.getColId().split(".");let s=this.pathCells.get(i.shift());if(!s)return;let n=0;N.isArray(s)&&(s=s[o[n]],n++);let r=s;for(const l of i){if(!r)break;if(!N.isArray(r)){const a=r.get(l);N.isArray(a)?(r=a[o[n]],n=n+1):r=a}}if(r)return r}getValue(t,o){const i=this.getCell(t,o);if(i)return N.get(this.data,i.path)}setData(t){this.update(this.idMapper(t),t)}match(t){return this.getId()===t.data.getId()}}var j0=Object.defineProperty,q0=(e,t,o)=>t in e?j0(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,io=(e,t,o)=>q0(e,typeof t!="symbol"?t+"":t,o);class Y0{constructor(t){io(this,"rows"),io(this,"pageNum",1),io(this,"pageSize",100),io(this,"isFinished",!1),io(this,"idMapper"),io(this,"gridApi"),this.rows=[],this.idMapper=t}createRow(t){return new Ld(t,this.gridApi,this.idMapper,this)}setRows(t){return this.rows=t,this}replace(t){this.rows[t.getDataIndex()]=t}remove(t){const o=new Set(t.map(i=>i.getId()));this.rows=this.rows.filter(i=>!o.has(i.getId())),this.gridApi.getGridOption("context").reload()}getRows(){var t;return(t=this.rows)!=null?t:[]}appendRows(t){if(!this.rows){this.setRows(t);return}this.rows.push(...t)}insertRows(t,o=0){if(!this.rows){this.setRows(t);return}this.rows.splice(o,0,...t)}deleteRows(t){const o=new Set(t.map(i=>N.isString(i)?i:i.getId()));this.rows=this.rows.filter(i=>!o.has(i.getId()))}}var Z0=Object.defineProperty,X0=(e,t,o)=>t in e?Z0(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,nt=(e,t,o)=>X0(e,typeof t!="symbol"?t+"":t,o);class Ho{constructor(t,o,i,s=[]){nt(this,"context"),nt(this,"endRow"),nt(this,"filterModel"),nt(this,"sortModel"),nt(this,"startRow"),nt(this,"dataCache"),nt(this,"pageNum"),nt(this,"pageSize"),this.pageNum=t,this.pageSize=o,this.sortModel=s,this.startRow=(t-1)*o,this.endRow=this.startRow+this.pageSize,this.dataCache=i}static from(t,o,i){const s=o??i.pageSize;return new Ho(t,s,i)}static nextPage(t){return new Ho(t.pageNum+1,t.pageSize,t)}failCallback(){hc.Message.error("表格数据加载失败,请重试")}successCallback(t){(N.isEmpty(t)||t.length<this.pageSize)&&(this.dataCache.isFinished=!0),this.pageNum===1?this.dataCache.setRows((t??[]).map(o=>this.dataCache.createRow(o))):this.dataCache.appendRows((t??[]).map(o=>this.dataCache.createRow(o))),this.dataCache.pageNum=this.pageNum}}const Q0=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}},J0=(e,t,o)=>{var i;const s=(i=v.getCurrentInstance())==null?void 0:i.proxy,n=v.ref(e),r=v.ref(),l=v.ref(!1),a=(f,C)=>{if(n.value)return n.value;const m=C??[];return f?(f&&f.$options.name&&m.push(f.$options.name),a(f==null?void 0:f.$parent,m)):(n.value=os(m==null?void 0:m.join(",")),n.value)},d=f=>{const C=localStorage.getItem(f);if(!(!C||C==="undefined"))return JSON.parse(C)},c=N.debounce(()=>{const f=a(s);localStorage.setItem(f,JSON.stringify(t.value.getColumnState()))},200),u=async()=>{const f=a(s),C=d(f);C&&C.length>0&&(t.value.applyColumnState({state:C,applyOrder:!0}),l.value=!0)},h=()=>N.sumBy(t.value.getAllDisplayedVirtualColumns().map(f=>f.getActualWidth()));return{storeGridState:c,restoreGridState:u,resetGridState:()=>{t.value.applyColumnState({state:r.value,applyOrder:!0})},initGridState:()=>{const f=a(s);if(r.value=t.value.getColumnState(),!localStorage.getItem(`${f}-initial`)){const C=h();o.value>C&&t.value.sizeColumnsToFit()}},isStateInitialized:l}},Ji=e=>{if(e.id)return`${e.id}`.split("_")[0]},ex=(e,t)=>({...e,onCellMouseOver(o){var i;const s=Ji(o.node);t.value.querySelectorAll(`.row_${s}`).forEach(r=>{r.classList.contains("ag-row-hover")||r.classList.add("ag-row-hover")}),(i=e.onCellMouseOver)==null||i.call(e,o)},onRowSelected(o){var i;const s=Ji(o.node),n=o.api.getRenderedNodes().filter(l=>l.id.startsWith(s)),r=o.node.isSelected();n==null||n.forEach(l=>{l.setSelected(!!r)}),(i=e==null?void 0:e.onRowSelected)==null||i.call(e,o)},onCellMouseOut(o){var i;const s=Ji(o.node);t.value.querySelectorAll(`.row_${s}`).forEach(r=>{r.classList.contains("ag-row-hover")&&r.classList.remove("ag-row-hover")}),(i=e.onCellMouseOut)==null||i.call(e,o)},getRowClass(o){var i;const s=(i=e==null?void 0:e.getRowClass)==null?void 0:i.call(e,o),n=[];return s&&(N.isArray(s)?n.push(...s):n.push(s)),n.push(`row_${Ji(o.node)}`),n}});let rt=null;function tx(){return rt!==null}function ox(e){rt&&Hd(),rt=e}function Gd(e){e===rt&&(rt=null)}function Hd(){rt&&(rt.closeMenu(),rt=null)}const Ft={defaultDirection:"br",defaultMinWidth:100,defaultMaxWidth:600,defaultZindex:100,defaultZoom:1,defaultAdjustPadding:{x:0,y:10}};function Oo(e,t){let o=e.offsetTop;return e.offsetParent!=null&&e.offsetParent!=t&&(o-=e.offsetParent.scrollTop,o+=Oo(e.offsetParent,t)),o}function Bo(e,t){let o=e.offsetLeft;return e.offsetParent!=null&&e.offsetParent!=t&&(o-=e.offsetParent.scrollLeft,o+=Bo(e.offsetParent,t)),o}function ix(e,t,o,i){return{x:Bo(e,i)+t,y:Oo(e,i)+o}}const Wn="mx-menu-default-container",sx="mx-menu-container-";let nx=0;function Od(e){const{getContainer:t,zIndex:o}=e;if(t){const s=typeof t=="function"?t():t;if(s){let n=s.getAttribute("id");return n||(n=sx+nx++,s.setAttribute("id",n)),{eleId:n,container:s,isNew:!1}}}let i=document.getElementById(Wn);return i||(i=document.createElement("div"),i.setAttribute("id",Wn),i.setAttribute("class","mx-menu-ghost-host fullscreen"),document.body.appendChild(i)),i.style.zIndex=(o==null?void 0:o.toString())||Ft.defaultZindex.toString(),{eleId:Wn,container:i,isNew:!0}}function rx(e){let t=0;for(let o=0;o<e.length;o++){const i=e.charCodeAt(o);t=(t<<5)-t+i,t|=0}return t}function lx(e){return typeof e=="number"?`${e}px`:e}const Bd=v.defineComponent({props:{vnode:{type:null},data:{type:null,default:null}},setup(e){const{vnode:t,data:o}=v.toRefs(e);return()=>typeof t.value=="function"?t.value(o.value):t.value}});function ax(e,t){const o={...e};return delete o[t],o}var dx=v.defineComponent({name:"Teleport",abstract:!0,props:{to:{type:[String,HTMLElement],required:!0},disabled:Boolean},data:function(){var e={teleported:!1,lastTo:"",rootEl:void 0,originalEl:void 0,dumb:document.createComment(" teleport ")};return Object.preventExtensions(e),e},methods:{onEnter:function(){var e,t;this.rootEl=this._vnode.elm,this.originalEl=this.teleported?(e=this.dumb)===null||e===void 0?void 0:e.parentNode:(t=this.rootEl)===null||t===void 0?void 0:t.parentNode,this.disabled?this.restore():this.telport()},restore:function(){var e;this.teleported&&(this.$vnode.elm=this.rootEl,this.teleported=!1,this.lastTo="",this.originalEl&&(this.rootEl&&this.originalEl.insertBefore(this.rootEl,this.dumb),(e=this.dumb.parentNode)===null||e===void 0||e.removeChild(this.dumb)))},telport:function(){if(!(!this.rootEl||!this.originalEl)){this.teleported||this.originalEl.insertBefore(this.dumb,this.rootEl),this.$vnode.elm=this.dumb,this.teleported=!0;var e;this.to!==this.lastTo&&(e=typeof this.to=="string"?document.querySelector(this.to):this.to),e&&(e.appendChild(this.rootEl),this.lastTo=this.to)}}},mounted:function(){this.onEnter()},updated:function(){this.onEnter()},beforeDestroy:function(){var e,t;(e=this.dumb.parentNode)===null||e===void 0||e.removeChild(this.dumb),(t=this.rootEl)===null||t===void 0||(t=t.parentNode)===null||t===void 0||t.removeChild(this.rootEl)},render:function(e){var t,o=(t=this.$slots.default)===null||t===void 0?void 0:t[0];return o}});function cx(e,t,o,i,s,n,r,l){var a=typeof e=="function"?e.options:e;return{exports:e,options:a}}var ux=cx(dx),_d=ux.exports,hx=Object.defineProperty,gx=(e,t,o)=>t in e?hx(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,Nd=(e,t,o)=>(gx(e,typeof t!="symbol"?t+"":t,o),o);class Vd{constructor(t,o){Nd(this,"x",0),Nd(this,"y",0),this.x=t||0,this.y=o||0}set(t,o){this.x=t,this.y=o}substract(t){this.x-=t.x,this.y-=t.y}}function Wd(e){const{onDown:t,onMove:o,onUp:i}=e,s=new Vd,n=new Vd;let r;function l(d){d.stopPropagation(),n.set(d.x,d.y),n.substract(s),o(s,n,d,r)}function a(d){i(d,r),s.set(0,0),document.removeEventListener("mousemove",l),document.removeEventListener("mouseup",a)}return(d,c)=>t(d,c)?(r=c,s.set(d.x,d.y),document.addEventListener("mousemove",l),document.addEventListener("mouseup",a),d.stopPropagation(),!0):!1}function px(e,t){let o=0;return{start(){o>0&&clearInterval(o),o=setInterval(()=>{o=0,t()},e)},stop(){o>0&&(clearInterval(o),o=0)}}}const _o=[],zd=px(100,()=>{for(const e of _o)e()});function fx(e,t,o,i){let s=0,n=0;function r(){e.value&&(t&&s!==e.value.offsetWidth&&t(e.value.offsetWidth),o&&n!==e.value.offsetHeight&&o(e.value.offsetHeight),s=e.value.offsetWidth,n=e.value.offsetHeight)}return{startResizeChecker(){zd.start(),_o.push(r)},stopResizeChecker(){const l=_o.indexOf(r);l>=0&&_o.splice(l,1),_o.length===0&&zd.stop()}}}const Cx=v.defineComponent({__name:"ScrollRect",props:{scroll:{type:String,default:"both"},scrollBarAlwaysShow:{type:Boolean,default:!1},scrollBarBackgroundClickable:{type:Boolean,default:!1},height:{type:Number,default:void 0},width:{type:Number,default:void 0},maxHeight:{type:Number,default:void 0},maxWidth:{type:Number,default:void 0},containerClass:{type:String,default:""},containerStyle:{type:null},scrollToStartThreshold:{type:Number,default:50},scrollToEndThreshold:{type:Number,default:50}},emits:["scroll","resized","scrollToStart","scrollToEnd"],setup(e,{expose:t,emit:o}){const i=e,s=v.ref(),n=v.ref(),r=v.ref(),l=v.ref(),a=v.ref(),d=v.ref(),c=v.ref(!1),u=v.computed(()=>i.scroll==="horizontal"||i.scroll==="both"),h=v.computed(()=>i.scroll==="vertical"||i.scroll==="both"),g=v.reactive({show:!1,size:0,sizeRaw:0,pos:0}),p=v.reactive({show:!1,size:0,sizeRaw:0,pos:0});let f=0,C=0,m=0,b=0,S=null;const w={attributes:!0,childList:!0};function y(){if(s.value){if(g.show){const E=s.value.offsetWidth/s.value.scrollWidth;g.sizeRaw=E*s.value.offsetWidth,g.size=E*100,g.pos=s.value.scrollLeft/(s.value.scrollWidth-s.value.offsetWidth)*(100-g.size),E>=1&&(g.show=!1)}if(p.show){const E=s.value.offsetHeight/s.value.scrollHeight;p.sizeRaw=E*s.value.offsetHeight,p.size=E*100,p.pos=s.value.scrollTop/(s.value.scrollHeight-s.value.offsetHeight)*(100-p.size),E>=1&&(p.show=!1)}i.scroll==="vertical"?(i.scrollToStartThreshold&&s.value.scrollTop<=i.scrollToStartThreshold&&o("scrollToStart"),i.scrollToEndThreshold&&s.value.scrollTop>=s.value.scrollHeight-i.scrollToEndThreshold-s.value.offsetHeight&&o("scrollToEnd")):i.scroll==="horizontal"&&(i.scrollToStartThreshold&&s.value.scrollLeft<=i.scrollToStartThreshold&&o("scrollToStart"),i.scrollToEndThreshold&&s.value.scrollLeft>=s.value.scrollWidth-i.scrollToEndThreshold-s.value.offsetWidth&&o("scrollToEnd")),o("scroll",s.value.scrollLeft,s.value.scrollTop)}}function R(E=!1){if(!s.value)return;let B=u.value,z=h.value;const qe=B&&(f!==s.value.scrollWidth||m!==s.value.offsetWidth),qn=h&&(C!==s.value.scrollHeight||b!==s.value.offsetHeight);if(!E&&!qe&&!qn)return;const Pt=window.getComputedStyle(s.value);(Pt.overflow==="hidden"||Pt.overflowX==="hidden")&&(B=!1),(Pt.overflow==="hidden"||Pt.overflowY==="hidden")&&(z=!1),g.show=B,p.show=z,y(),m=s.value.offsetWidth,b=s.value.offsetHeight,f=s.value.scrollWidth,C=s.value.scrollHeight,o("resized",f,C)}const P=140,M=70;function I(E){var B;i.scroll=="horizontal"&&(E.deltaMode==0&&((B=s.value)==null||B.scrollTo({left:s.value.scrollLeft+(E.deltaY>0?P:-P),behavior:"smooth"})),E.preventDefault(),E.stopPropagation())}function D(E){var B;E.deltaMode==0&&((B=s.value)==null||B.scrollTo({left:s.value.scrollLeft+(E.deltaY>0?P:-P),behavior:"smooth"}),E.preventDefault(),E.stopPropagation())}function T(E){var B;E.deltaMode==0&&((B=s.value)==null||B.scrollTo({top:s.value.scrollTop+(E.deltaY>0?M:-M),behavior:"smooth"}),E.preventDefault(),E.stopPropagation())}let k=0,O=0,W=0,$=0;const Q=Wd({onDown(E){return!r.value||!a.value?!1:(k=E.offsetX,O=E.x-E.offsetX-a.value.offsetLeft,E.preventDefault(),c.value=!0,!0)},onMove(E,B,z){s.value&&r.value&&(Pe(z.x-k-O),z.preventDefault(),z.stopPropagation())},onUp(){c.value=!1}}),X=Wd({onDown(E){return!l.value||!d.value?!1:(W=E.offsetY,$=E.y-E.offsetY-d.value.offsetTop,E.preventDefault(),c.value=!0,!0)},onMove(E,B,z){s.value&&l.value&&(_e(z.y-W-$),z.preventDefault(),z.stopPropagation())},onUp(){c.value=!1}});function Re(E){s.value&&(s.value.scrollLeft=E/100*(s.value.scrollWidth-s.value.offsetWidth))}function xe(E){s.value&&(s.value.scrollLeft=E/100*(s.value.scrollHeight-s.value.offsetHeight))}function Pe(E){s.value&&(s.value.scrollLeft=E/(s.value.offsetWidth-g.sizeRaw)*(s.value.scrollWidth-s.value.offsetWidth))}function _e(E){s.value&&(s.value.scrollTop=E/(s.value.offsetHeight-p.sizeRaw)*(s.value.scrollHeight-s.value.offsetHeight))}function K(E){i.scrollBarBackgroundClickable&&Pe(E.offsetX-g.sizeRaw/2)}function oe(E){i.scrollBarBackgroundClickable&&_e(E.offsetY-p.sizeRaw/2)}const{startResizeChecker:Ne,stopResizeChecker:Ve}=fx(s,()=>R(),()=>R());return v.onMounted(()=>{v.nextTick(()=>{setTimeout(()=>R(!0),200),R(!0),Ne(),S=new MutationObserver(()=>R()),S.observe(s.value,w)})}),v.onBeforeUnmount(()=>{Ve(),S&&(S.disconnect(),S=null)}),t({refreshScrollState(){R(!0)},getScrollContainer(){return s.value},scrollTo(E,B){var z;(z=s.value)==null||z.scrollTo(E,B)},scrollToTop(){var E;(E=s.value)==null||E.scrollTo(0,0)},scrollToBottom(){var E;(E=s.value)==null||E.scrollTo(s.value.scrollWidth,s.value.scrollHeight)}}),{__sfc:!0,props:i,emit:o,container:s,scrollrect:n,scrollBarRefX:r,scrollBarRefY:l,scrollBarThumbRefX:a,scrollBarThumbRefY:d,isDragging:c,canScrollX:u,canScrollY:h,scrollBarX:g,scrollBarY:p,lastCalcScrollScrollWidth:f,lastCalcScrollScrollHeight:C,lastCalcScrollWidth:m,lastCalcScrollHeight:b,observer:S,config:w,calcScrollBarPosition:y,calcScroll:R,manualWheelScrollSizeX:P,manualWheelScrollSizeY:M,mouseWheel:I,mouseWheelBarX:D,mouseWheelBarY:T,mouseDragDownInBarX:k,mouseDragDownOutBarAbsX:O,mouseDragDownInBarY:W,mouseDragDownOutBarAbsY:$,thumbDrageHandlerX:Q,thumbDrageHandlerY:X,customScrollX:Re,customScrollY:xe,setScrollLeft:Pe,setScrollTop:_e,scrollbarClickScrollX:K,scrollbarClickScrollY:oe,startResizeChecker:Ne,stopResizeChecker:Ve}}});function mx(e,t,o,i,s,n,r,l){var a=typeof e=="function"?e.options:e;return t&&(a.render=t,a.staticRenderFns=o,a._compiled=!0),{exports:e,options:a}}var vx=function(){var e=this,t=e._self._c,o=e._self._setupProxy;return t("div",{ref:"scrollrect",class:["vue-scroll-rect",e.scrollBarAlwaysShow?"always-show-scrollbar":"",e.scrollBarBackgroundClickable?"background-clickable":"",o.isDragging?"dragging":""],style:{width:e.width?`${e.width}px`:void 0,height:e.height?`${e.height}px`:void 0},on:{wheel:o.mouseWheel}},[t("div",{ref:"container",class:["scroll-content",e.scroll,e.containerClass],style:{maxWidth:e.maxWidth?`${e.maxWidth}px`:void 0,maxHeight:e.maxHeight?`${e.maxHeight}px`:void 0,...e.containerStyle},on:{scroll:o.calcScrollBarPosition}},[e._t("default")],2),o.scrollBarX.show?e._t("scrollBarX",function(){return[t("div",{ref:"scrollBarRefX",staticClass:"scrollbar horizontal",on:{click:o.scrollbarClickScrollX,wheel:o.mouseWheelBarX}},[t("div",{ref:"scrollBarThumbRefX",staticClass:"thumb",style:{left:`${o.scrollBarX.pos}%`,width:`${o.scrollBarX.size}%`},on:{mousedown:o.thumbDrageHandlerX,wheel:o.mouseWheelBarX}})])]},{scrollBarValue:o.scrollBarX,onScroll:o.customScrollX}):e._e(),o.scrollBarY.show?e._t("scrollBarY",function(){return[o.scrollBarY.show?t("div",{ref:"scrollBarRefY",staticClass:"scrollbar vertical",on:{click:o.scrollbarClickScrollY,wheel:o.mouseWheelBarY}},[t("div",{ref:"scrollBarThumbRefY",staticClass:"thumb",style:{top:`${o.scrollBarY.pos}%`,height:`${o.scrollBarY.size}%`},on:{mousedown:o.thumbDrageHandlerY,wheel:o.mouseWheelBarY}})]):e._e()]},{scrollBarValue:o.scrollBarY,onScroll:o.customScrollY}):e._e()],2)},wx=[],bx=mx(Cx,vx,wx);const Sx=bx.exports;function lt(e,t,o,i,s,n,r,l){var a=typeof e=="function"?e.options:e;return t&&(a.render=t,a.staticRenderFns=o,a._compiled=!0),{exports:e,options:a}}const yx={};var Rx=function(){var e=this,t=e._self._c;return t("svg",{staticClass:"mx-checked-mark",attrs:{"aria-hidden":"true",viewBox:"0 0 1024 1024"}},[t("path",{attrs:{d:"M129.3,428.6L52,512l345,372.5l575-620.8l-69.5-75L400.4,718.2L129.3,428.6z"}})])},xx=[],Ex=lt(yx,Rx,xx);const Dx=Ex.exports,Fx={};var Px=function(){var e=this,t=e._self._c;return t("svg",{staticClass:"mx-right-arrow",attrs:{"aria-hidden":"true",viewBox:"0 0 1024 1024"}},[t("path",{attrs:{d:"M307.018 49.445c11.517 0 23.032 4.394 31.819 13.18L756.404 480.18c8.439 8.438 13.181 19.885 13.181 31.82s-4.741 23.38-13.181 31.82L338.838 961.376c-17.574 17.573-46.065 17.573-63.64-0.001-17.573-17.573-17.573-46.065 0.001-63.64L660.944 512 275.198 126.265c-17.574-17.573-17.574-46.066-0.001-63.64C283.985 53.839 295.501 49.445 307.018 49.445z"}})])},Tx=[],Ix=lt(Fx,Px,Tx);const Mx=Ix.exports,Ax=v.defineComponent({__name:"ContextMenuItem",props:{disabled:{type:Boolean,default:!1},hidden:{type:Boolean,default:!1},customRender:{type:Function,default:null},customClass:{type:String,default:""},clickHandler:{type:Function,default:null},label:{type:[String,Object,Function],default:""},icon:{type:[String,Object,Function],default:""},iconFontClass:{type:String,default:"iconfont"},checked:{type:Boolean,default:!1},shortcut:{type:String,default:""},svgIcon:{type:String,default:""},svgProps:{type:Object,default:null},preserveIconWidth:{type:Boolean,default:!0},showRightArrow:{type:Boolean,default:!1},hasChildren:{type:Boolean,default:!1},clickClose:{type:Boolean,default:!0},clickableWhenHasChildren:{type:Boolean,default:!1},rawMenuItem:{type:Object,default:void 0}},emits:["click","subMenuOpen","subMenuClose"],setup(e,{expose:t,emit:o}){const i=e,{clickHandler:s,clickClose:n,clickableWhenHasChildren:r,disabled:l,hidden:a,label:d,icon:c,iconFontClass:u,showRightArrow:h,shortcut:g,hasChildren:p}=v.toRefs(i),f=v.ref(!1),C=v.ref(!1),m=v.ref(),b=v.inject("globalOptions"),S=v.inject("globalHasSlot"),w=v.inject("globalRenderSlot"),y=v.inject("globalCloseMenu"),R=v.inject("menuContext"),P=v.computed(()=>typeof d.value=="string"?d.value:typeof d.value=="function"?rx(d.value.toString()):"MenuItem[unknow]");v.provide("MenuItemName",P);const M={getSubMenuInstance:()=>{},showSubMenu:()=>f.value?(R.markActiveMenuItem(M,!0),!0):p.value?(D(),!0):!1,hideSubMenu:()=>{R.closeOtherSubMenu()},isDisabledOrHidden:()=>l.value||a.value,getElement:()=>m.value,focus:()=>C.value=!0,blur:()=>C.value=!1,click:I};v.provide("menuItemInstance",M),v.onMounted(()=>{R.isMenuItemDataCollectedFlag()?v.nextTick(()=>{let O=0;const W=R.getElement();if(W){let $=0;for(let Q=0;Q<W.children.length;Q++){const X=W.children[Q];if(X.getAttribute("data-type")==="ContextMenuItem"){if(X===m.value){O=$;break}$++}}}R.addChildMenuItem(M,O)}):R.addChildMenuItem(M)}),v.onBeforeUnmount(()=>{R.removeChildMenuItem(M)});function I(O){if(!l.value){if(O){const W=O.target;if(W.classList.contains("mx-context-no-clickable")||b.value.ignoreClickClassName&&W.classList.contains(b.value.ignoreClickClassName))return;if(b.value.clickCloseClassName&&W.classList.contains(b.value.clickCloseClassName)){O.stopPropagation(),y(i.rawMenuItem);return}}p.value?r.value?(typeof s.value=="function"&&s.value(O),o("click",O)):f.value||D():(typeof s.value=="function"&&s.value(O),o("click",O),n.value&&y(i.rawMenuItem))}}function D(O){C.value=!1,R.checkCloseOtherSubMenuTimeOut()||R.closeOtherSubMenu(),l.value||(R.markActiveMenuItem(M),p.value&&(O||R.markThisOpenedByKeyBoard(),R.addOpenedSubMenu(T),f.value=!0,v.nextTick(()=>o("subMenuOpen",M))))}function T(){C.value=!1,f.value=!1,o("subMenuClose",M)}function k(){return{disabled:l.value,label:d.value,icon:c.value,iconFontClass:u.value,showRightArrow:h.value,clickClose:n.value,clickableWhenHasChildren:r.value,shortcut:g.value,theme:b.value.theme,isOpen:f,hasChildren:p,onClick:I,onMouseEnter:D,closeMenu:y}}return t(M),{__sfc:!0,props:i,emit:o,clickHandler:s,clickClose:n,clickableWhenHasChildren:r,disabled:l,hidden:a,label:d,icon:c,iconFontClass:u,showRightArrow:h,shortcut:g,hasChildren:p,showSubMenu:f,keyBoardFocusMenu:C,menuItemRef:m,options:b,globalHasSlot:S,globalRenderSlot:w,globalCloseMenu:y,menuContext:R,nameForDebug:P,menuItemInstance:M,onClick:I,onMouseEnter:D,closeSubMenu:T,getItemDataForChildren:k,VNodeRender:Bd,ContextMenuIconCheck:Dx,ContextMenuIconRight:Mx}}});var kx=function(){var e=this,t=e._self._c,o=e._self._setupProxy;return o.hidden?e._e():t("div",{ref:"menuItemRef",staticClass:"mx-context-menu-item-wrapper",attrs:{"data-type":"ContextMenuItem"}},[o.globalHasSlot("itemRender")?t(o.VNodeRender,{attrs:{vnode:()=>o.globalRenderSlot("itemRender",o.getItemDataForChildren())}}):e.customRender?t(o.VNodeRender,{attrs:{vnode:e.customRender,data:o.getItemDataForChildren()}}):t("div",{class:["mx-context-menu-item",o.disabled?"disabled":"",o.keyBoardFocusMenu?"keyboard-focus":"",e.customClass?" "+e.customClass:"",o.showSubMenu?"open":""],on:{click:o.onClick,mouseenter:o.onMouseEnter}},[e._t("default",function(){return[t("div",{staticClass:"mx-item-row"},[t("div",{class:["mx-icon-placeholder",e.preserveIconWidth?"preserve-width":""]},[e._t("icon",function(){return[o.globalHasSlot("itemIconRender")?t(o.VNodeRender,{attrs:{vnode:()=>o.globalRenderSlot("itemIconRender",o.getItemDataForChildren())}}):typeof e.svgIcon=="string"&&e.svgIcon?t("svg",e._b({staticClass:"icon svg"},"svg",e.svgProps,!1),[t("use",{attrs:{"xlink:href":e.svgIcon}})]):typeof o.icon!="string"?t(o.VNodeRender,{attrs:{vnode:o.icon,data:o.icon}}):typeof o.icon=="string"&&o.icon!==""?t("i",{class:o.icon+" icon "+o.iconFontClass+" "+o.options.iconFontClass}):e._e()]}),e.checked?e._t("check",function(){return[o.globalHasSlot("itemCheckRender")?t(o.VNodeRender,{attrs:{vnode:()=>o.globalRenderSlot("itemCheckRender",o.getItemDataForChildren())}}):e._e(),t(o.ContextMenuIconCheck)]}):e._e()],2),e._t("label",function(){return[o.globalHasSlot("itemLabelRender")?t(o.VNodeRender,{attrs:{vnode:()=>o.globalRenderSlot("itemLabelRender",o.getItemDataForChildren())}}):typeof o.label=="string"?t("span",{staticClass:"label"},[e._v(e._s(o.label))]):t(o.VNodeRender,{attrs:{vnode:o.label,data:o.label}})]})],2),t("div",{staticClass:"mx-item-row"},[o.shortcut||e.$slots.shortcut?e._t("shortcut",function(){return[o.globalHasSlot("itemShortcutRender")?t(o.VNodeRender,{attrs:{vnode:()=>o.globalRenderSlot("itemShortcutRender",o.getItemDataForChildren())}}):e._e(),t("span",{staticClass:"mx-shortcut"},[e._v(e._s(o.shortcut))])]}):e._e(),o.showRightArrow?e._t("rightArrow",function(){return[o.globalHasSlot("itemRightArrowRender")?t(o.VNodeRender,{attrs:{vnode:()=>o.globalRenderSlot("itemRightArrowRender",o.getItemDataForChildren())}}):e._e(),t(o.ContextMenuIconRight)]}):e._e()],2)]})],2),e._t("submenu",null,{context:o.menuItemInstance,show:o.showSubMenu})],2)},Lx=[],Gx=lt(Ax,kx,Lx);const zn=Gx.exports,Hx=v.defineComponent({name:"ContextMenuSperator",components:{VNodeRender:Bd},setup(){const e=v.inject("globalHasSlot"),t=v.inject("globalRenderSlot");return{globalHasSlot:e,globalRenderSlot:t}}});var Ox=function(){var e=this,t=e._self._c;return e._self._setupProxy,e.globalHasSlot("separatorRender")?t("VNodeRender",{attrs:{vnode:()=>e.globalRenderSlot("separatorRender",{})}}):t("div",{staticClass:"mx-context-menu-item-sperator mx-context-no-clickable"})},Bx=[],_x=lt(Hx,Ox,Bx);const $n=_x.exports,Nx=v.defineComponent({__name:"ContextSubMenu",props:{items:{type:Array,default:null},show:{type:Boolean,default:!1},maxHeight:{type:Number,default:0},maxWidth:{type:[String,Number],default:0},minWidth:{type:[String,Number],default:0},adjustPosition:{type:Boolean,default:!0},direction:{type:String,default:"br"},parentMenuItemContext:{type:Object,default:null}},emits:["closeAnimFinished"],setup(e,{expose:t,emit:o}){const i=e,s=v.ref(!1),n=v.inject("globalGetMenuHostId",""),r=v.inject("menuContext"),l=v.inject("globalOptions"),a=v.inject("globalHasSlot"),d=v.inject("globalRenderSlot"),c=v.ref("UnknowOrRoot"),u=v.inject("MenuItemName",c),{zIndex:h,getParentWidth:g,getParentHeight:p,getZoom:f}=r,{adjustPosition:C}=v.toRefs(i),m=v.ref(),b=v.ref(),S=v.ref(),w=[],y=v.inject("globalSetCurrentSubMenu"),R=[];let P=null,M=0;function I(){P&&P.blur()}function D(E,B){if(E){for(let z=B!==void 0?B:0;z<R.length;z++)if(!R[z].isDisabledOrHidden()){T(z);break}}else for(let z=B!==void 0?B:R.length-1;z>=0;z--)if(!R[z].isDisabledOrHidden()){T(z);break}}function T(E){if(P&&I(),E!==void 0&&(P=R[Math.max(0,Math.min(E,R.length-1))]),!P)return;P.focus();const B=P.getElement();B&&B.scrollIntoView({behavior:"auto",block:"nearest",inline:"nearest"})}function k(){y(O)}const O={el:S,name:u,isTopLevel:()=>r.getParentContext()===null,closeSelfAndActiveParent:()=>{const E=Q.getParentContext();if(E){E.closeOtherSubMenu();const B=E.getSubMenuInstanceContext();if(B)return B.focusCurrentItem(),!0}return!1},closeCurrentSubMenu:()=>{var E;return(E=Q.getParentContext())==null?void 0:E.closeOtherSubMenu()},moveCurrentItemFirst:()=>D(!0),moveCurrentItemLast:()=>D(!1),moveCurrentItemDown:()=>D(!0,P?R.indexOf(P)+1:0),moveCurrentItemUp:()=>D(!1,P?R.indexOf(P)-1:0),focusCurrentItem:()=>T(),openCurrentItemSubMenu:()=>P?P==null?void 0:P.showSubMenu():!1,triggerCurrentItemClick:E=>P==null?void 0:P.click(E)};let W=!1,$=!1;const Q={zIndex:h+1,container:r.container,adjustPadding:l.value.adjustPadding||Ft.defaultAdjustPadding,getParentWidth:()=>{var E;return((E=S.value)==null?void 0:E.offsetWidth)||0},getParentHeight:()=>{var E;return((E=S.value)==null?void 0:E.offsetHeight)||0},getPositon:()=>[K.value.x,K.value.y],getZoom:()=>l.value.zoom||Ft.defaultZoom,addOpenedSubMenu(E){w.push(E)},closeOtherSubMenu(){w.forEach(E=>E()),w.splice(0,w.length),y(O)},checkCloseOtherSubMenuTimeOut(){return M?(clearTimeout(M),M=0,!0):!1},closeOtherSubMenuWithTimeOut(){M=setTimeout(()=>{M=0,this.closeOtherSubMenu()},200)},addChildMenuItem:(E,B)=>{B===void 0?R.push(E):R.splice(B,0,E)},removeChildMenuItem:E=>{R.splice(R.indexOf(E),1),E.getSubMenuInstance=()=>{}},markActiveMenuItem:(E,B=!1)=>{I(),P=E,B&&T()},markThisOpenedByKeyBoard:()=>{W=!0},isOpenedByKeyBoardFlag:()=>W?(W=!1,!0):!1,isMenuItemDataCollectedFlag:()=>$,getElement:()=>S.value||null,getParentContext:()=>r,getSubMenuInstanceContext:()=>O};v.provide("menuContext",Q);const X={getChildItem:E=>R[E],getMenuDimensions:()=>b.value?{width:b.value.offsetWidth,height:b.value.offsetHeight}:{width:0,height:0},getSubmenuRoot:()=>b.value,getMenu:()=>S.value,getScrollValue:()=>{var E,B;return((B=(E=m.value)==null?void 0:E.getScrollContainer())==null?void 0:B.scrollTop)||0},setScrollValue:E=>{var B;return(B=m.value)==null?void 0:B.scrollTo(0,E)},getScrollHeight:()=>xe.value,adjustPosition:()=>{oe()},getMaxHeight:()=>Pe.value,getPosition:()=>K.value,setPosition:(E,B)=>{K.value.x=E,K.value.y=B}},Re=v.inject("menuItemInstance",void 0);Re&&(Re.getSubMenuInstance=()=>X);const xe=v.ref(0),Pe=v.ref(0),_e=v.ref(!1),K=v.ref({x:0,y:0});function oe(){v.nextTick(()=>{const E=S.value,B=b.value;if(E&&B&&m.value){const{container:z}=r,qe=(g==null?void 0:g())??0,qn=(p==null?void 0:p())??0,Pt=getComputedStyle(B),ts=parseFloat(Pt.paddingLeft),No=parseFloat(Pt.paddingTop),Yn=qn>0?No:0,zD=document.documentElement.scrollHeight/f(),$D=document.documentElement.scrollWidth/f(),UD=Math.min($D,z.offsetWidth),nc=Math.min(zD,z.offsetHeight);let Zn=Bo(E,z),Xn=Oo(E,z);i.direction.includes("l")?K.value.x-=E.offsetWidth+ts:i.direction.includes("r")?K.value.x+=qe+ts:(K.value.x+=qe/2,K.value.x-=(E.offsetWidth+ts)/2),i.direction.includes("t")?K.value.y-=(E.offsetHeight+No*2)/f():i.direction.includes("b")?K.value.y-=No/f():K.value.y-=(E.offsetHeight+No)/2/f(),v.nextTick(()=>{var rc,lc;Zn=Bo(E,z),Xn=Oo(E,z);const ac=((lc=(rc=m.value)==null?void 0:rc.getScrollContainer())==null?void 0:lc.scrollHeight)||0,KD=i.maxHeight;xe.value=i.maxHeight?Math.min(ac,i.maxHeight):ac;const jD=Zn+E.offsetWidth-UD,dc=Xn+xe.value+Yn*2-nc;if(_e.value=dc>0,C.value&&jD>0){const Vo=qe+E.offsetWidth-ts,Wo=Zn;Vo>Wo?K.value.x-=Wo:K.value.x-=Vo}if(_e.value){if(C.value){const Vo=dc,Wo=Xn;Vo>Wo?K.value.y-=Wo-Yn:K.value.y-=Vo-Yn}Pe.value=nc-(K.value.y+No)}else Pe.value=KD||0})}})}function Ne(){}function Ve(){var E;const B=(E=i.parentMenuItemContext)==null?void 0:E.getElement();if(B){const z=Bo(B,r.container),qe=Oo(B,r.container);K.value.x=z,K.value.y=qe}else{const[z,qe]=r.getPositon();K.value.x=z,K.value.y=qe}v.nextTick(()=>{var z;y(O),(z=S.value)==null||z.focus({preventScroll:!0}),r.isOpenedByKeyBoardFlag()&&v.nextTick(()=>D(!0)),$=!0}),oe()}return v.watch(()=>i.show,E=>{E&&Ve()}),v.onMounted(()=>{s.value=!0,i.show?Ve():oe()}),v.onBeforeUnmount(()=>{s.value=!1,Re&&(Re.getSubMenuInstance=()=>{})}),t(X),{__sfc:!0,props:i,emit:o,mounted:s,globalGetMenuHostId:n,parentContext:r,options:l,globalHasSlot:a,globalRenderSlot:d,debugMenuItemNameDefault:c,debugMenuItemName:u,zIndex:h,getParentWidth:g,getParentHeight:p,getZoom:f,adjustPosition:C,scrollRectRef:m,submenuRoot:b,menu:S,openedSubMenuClose:w,globalSetCurrentSubMenu:y,menuItems:R,currentItem:P,leaveTimeout:M,blurCurrentMenu:I,setAndFocusNotDisableItem:D,setAndFocusCurrentMenu:T,onSubMenuBodyClick:k,thisMenuInsContext:O,isOpenedByKeyBoardFlag:W,isMenuItemDataCollectedFlag:$,thisMenuContext:Q,exposeContext:X,menuItemInstance:Re,scrollHeight:xe,scrollTargetMaxHeight:Pe,overflow:_e,position:K,doAdjustPosition:oe,hideSolve:Ne,showSolve:Ve,MenuConstOptions:Ft,solveNumberOrStringSize:lx,ScrollRect:Sx,ContextMenuItem:zn,ContextMenuSeparator:$n,Teleport:_d}}});var Vx=function(){var e=this,t=e._self._c,o=e._self._setupProxy;return o.mounted?t(o.Teleport,{attrs:{to:`#${o.globalGetMenuHostId}`}},[t("Transition",e._b({attrs:{appear:""},on:{"after-leave":function(i){return o.emit("closeAnimFinished")}}},"Transition",o.options.menuTransitionProps||{duration:10},!1),[e.show?t("div",e._b({ref:"submenuRoot",class:["mx-context-menu",o.options.customClass?o.options.customClass:"",o.options.theme||""],style:{maxWidth:e.maxWidth?o.solveNumberOrStringSize(e.maxWidth):`${o.MenuConstOptions.defaultMaxWidth}px`,minWidth:e.minWidth?o.solveNumberOrStringSize(e.minWidth):`${o.MenuConstOptions.defaultMinWidth}px`,zIndex:o.zIndex,left:`${o.position.x}px`,top:`${o.position.y}px`},attrs:{"data-type":"ContextSubMenu"},on:{click:o.onSubMenuBodyClick}},"div",e.$attrs,!1),[t(o.ScrollRect,{ref:"scrollRectRef",attrs:{scroll:"vertical",maxHeight:o.scrollTargetMaxHeight,containerClass:"mx-context-menu-scroll"}},[t("div",{ref:"menu",class:["mx-context-menu-items"]},[e._t("default",function(){return[e._l(e.items,function(i,s){return[i.hidden!==!0&&i.divided==="up"?t(o.ContextMenuSeparator):e._e(),i.hidden!==!0&&i.divided==="self"?t(o.ContextMenuSeparator):t(o.ContextMenuItem,{attrs:{clickHandler:i.onClick?n=>i.onClick(n):void 0,disabled:typeof i.disabled=="object"?i.disabled.value:i.disabled,hidden:typeof i.hidden=="object"?i.hidden.value:i.hidden,icon:i.icon,iconFontClass:i.iconFontClass,svgIcon:i.svgIcon,svgProps:i.svgProps,label:i.label,customRender:i.customRender,customClass:i.customClass,checked:typeof i.checked=="object"?i.checked.value:i.checked,shortcut:i.shortcut,clickClose:i.clickClose,clickableWhenHasChildren:i.clickableWhenHasChildren,preserveIconWidth:i.preserveIconWidth!==void 0?i.preserveIconWidth:o.options.preserveIconWidth,showRightArrow:i.children&&i.children.length>0,hasChildren:i.children&&i.children.length>0,rawMenuItem:i},on:{"sub-menu-open":n=>{var r;return(r=i.onSubMenuOpen)==null?void 0:r.call(i,n)},"sub-menu-close":n=>{var r;return(r=i.onSubMenuClose)==null?void 0:r.call(i,n)}},scopedSlots:e._u([i.children&&i.children.length>0?{key:"submenu",fn:function({context:n,show:r}){return[t("ContextSubMenu",{attrs:{show:r,parentMenuItemContext:n,items:i.children,maxWidth:i.maxWidth,minWidth:i.minWidth,maxHeight:i.maxHeight,adjustPosition:i.adjustSubMenuPosition!==void 0?i.adjustSubMenuPosition:o.options.adjustPosition,direction:i.direction!==void 0?i.direction:o.options.direction}})]}}:null],null,!0)}),i.hidden!==!0&&(i.divided==="down"||i.divided===!0)?t(o.ContextMenuSeparator):e._e()]})]})],2)])],1):e._e()])],1):e._e()},Wx=[],zx=lt(Nx,Vx,Wx);const Un=zx.exports,$x=v.defineComponent({__name:"ContextSubMenuWrapper",props:{options:{type:Object,default:null},show:{type:null,default:null},container:{type:HTMLElement,default:null},isFullScreenContainer:{type:Boolean,default:!0}},emits:["close","closeAnimFinished"],setup(e,{expose:t,emit:o}){const i=e,s=v.useSlots(),n=v.ref(),{options:r,show:l,container:a}=v.toRefs(i);v.onMounted(()=>{l.value&&u()}),v.onBeforeUnmount(()=>{f()}),v.watch(l,y=>{y?u():(Gd(d),f())});const d={closeMenu:h,isClosed:g,getMenuRef:()=>n.value,getMenuDimensions:()=>{var y;return((y=n.value)==null?void 0:y.getMenuDimensions())??{width:0,height:0}}};let c=!1;function u(){p(),ox(d)}function h(y){c=!0,o("close",y),r.value.menuTransitionProps||o("closeAnimFinished"),Gd(d)}function g(){return c}function p(){setTimeout(()=>{document.addEventListener("click",S,!0),document.addEventListener("contextmenu",S,!0),document.addEventListener("scroll",b,!0),!i.isFullScreenContainer&&a.value&&a.value.addEventListener("scroll",b,!0),r.value.keyboardControl!==!1&&document.addEventListener("keydown",m,!0)},50)}function f(){document.removeEventListener("contextmenu",S,!0),document.removeEventListener("click",S,!0),document.removeEventListener("scroll",b,!0),!i.isFullScreenContainer&&a.value&&a.value.removeEventListener("scroll",b,!0),r.value.keyboardControl!==!1&&document.removeEventListener("keydown",m,!0)}const C=v.ref();v.provide("globalSetCurrentSubMenu",y=>C.value=y),v.provide("globalGetMenuHostId",a.value.id);function m(y){var R,P,M,I,D,T,k,O,W,$,Q,X,Re;let xe=!0;switch(y.key){case"Escape":{((R=C.value)==null?void 0:R.isTopLevel())===!1?(P=C.value)==null||P.closeCurrentSubMenu():h();break}case"ArrowDown":(M=C.value)==null||M.moveCurrentItemDown();break;case"ArrowUp":(I=C.value)==null||I.moveCurrentItemUp();break;case"Home":(D=C.value)==null||D.moveCurrentItemFirst();break;case"End":(T=C.value)==null||T.moveCurrentItemLast();break;case"ArrowLeft":{(k=C.value)!=null&&k.closeSelfAndActiveParent()||(W=(O=r.value).onKeyFocusMoveLeft)==null||W.call(O);break}case"ArrowRight":($=C.value)!=null&&$.openCurrentItemSubMenu()||(X=(Q=r.value).onKeyFocusMoveRight)==null||X.call(Q);break;case"Enter":(Re=C.value)==null||Re.triggerCurrentItemClick(y);break;default:xe=!1;break}xe&&C.value&&(y.stopPropagation(),y.preventDefault())}function b(y){r.value.closeWhenScroll!==!1&&w(y.target,null)}function S(y){w(y.target,y)}function w(y,R){for(var P,M;y;){if(y.classList&&y.classList.contains("mx-context-menu"))return;y=y.parentNode}R?r.value.clickCloseOnOutside!==!1?(f(),h()):(M=(P=r.value).onClickOnOutside)==null||M.call(P,R):(f(),h())}return v.provide("globalOptions",r),v.provide("globalCloseMenu",h),v.provide("globalIsFullScreenContainer",i.isFullScreenContainer),v.provide("globalHasSlot",y=>s[y]!==void 0),v.provide("globalRenderSlot",(y,R)=>s[y]?s[y](R):v.h("span","Render slot failed")),v.provide("menuContext",{zIndex:r.value.zIndex||Ft.defaultZindex,container:a.value,adjustPadding:{x:0,y:0},getZoom:()=>r.value.zoom||Ft.defaultZoom,getParentWidth:()=>0,getParentHeight:()=>0,getPositon:()=>[r.value.x,r.value.y],closeOtherSubMenuWithTimeOut:()=>{},checkCloseOtherSubMenuTimeOut:()=>!1,addOpenedSubMenu:()=>{},closeOtherSubMenu:()=>{},getParentContext:()=>null,getSubMenuInstanceContext:()=>null,getElement:()=>null,addChildMenuItem:()=>{},removeChildMenuItem:()=>{},markActiveMenuItem:()=>{},markThisOpenedByKeyBoard:()=>{},isOpenedByKeyBoardFlag:()=>!1,isMenuItemDataCollectedFlag:()=>!1}),t(d),{__sfc:!0,props:i,emit:o,slots:s,submenuInstance:n,options:r,show:l,container:a,instance:d,closed:c,openMenu:u,closeMenu:h,isClosed:g,installBodyEvents:p,removeBodyEvents:f,currentOpenedMenu:C,onMenuKeyDown:m,onBodyScroll:b,onBodyClick:S,checkTargetAndClose:w,MenuConstOptions:Ft,ContextSubMenuConstructor:Un}}});var Ux=function(){var e=this,t=e._self._c,o=e._self._setupProxy;return t(o.ContextSubMenuConstructor,{ref:"submenuInstance",attrs:{show:o.show,items:o.options.items,adjustPosition:o.options.adjustPosition,maxWidth:o.options.maxWidth||o.MenuConstOptions.defaultMaxWidth,minWidth:o.options.minWidth||o.MenuConstOptions.defaultMinWidth,maxHeight:o.options.maxHeight,direction:o.options.direction||o.MenuConstOptions.defaultDirection},on:{closeAnimFinished:function(i){return o.emit("closeAnimFinished")}}},[e._t("default")],2)},Kx=[],jx=lt($x,Ux,Kx);const $d=jx.exports,qx=v.defineComponent({__name:"ContextMenu",props:{options:{type:Object,default:null},show:{type:Boolean,default:!1}},emits:["update:show","close"],setup(e,{expose:t,emit:o}){const i=e,{options:s,show:n}=v.toRefs(i),{isNew:r,container:l,eleId:a}=Od(s.value),d=v.ref(null),c=v.useSlots();function u(h){var g,p;o("update:show",!1),o("close"),(p=(g=s.value).onClose)==null||p.call(g,h)}return t({closeMenu:()=>o("update:show",!1),isClosed:()=>!n.value,getMenuRef:()=>{var h;return(h=d.value)==null?void 0:h.getMenuRef()},getMenuDimensions:()=>{var h;return((h=d.value)==null?void 0:h.getMenuDimensions())??{width:0,height:0}}}),{__sfc:!0,emit:o,props:i,options:s,show:n,isNew:r,container:l,eleId:a,menuRef:d,slots:c,onClose:u,Teleport:_d,ContextSubMenuWrapperConstructor:$d}}});var Yx=function(){var e=this,t=e._self._c,o=e._self._setupProxy;return t(o.Teleport,{attrs:{to:`#${o.eleId}`}},[t(o.ContextSubMenuWrapperConstructor,{ref:"menuRef",attrs:{options:o.options,show:o.show,container:o.container,isFullScreenContainer:!o.isNew},on:{close:o.onClose},scopedSlots:e._u([e._l(o.slots,function(i,s){return{key:s,fn:function(n){return[e._t(s,null,null,n)]}}})],null,!0)})],1)},Zx=[],Xx=lt(qx,Yx,Zx);const Qx=Xx.exports,Jx=v.defineComponent({name:"ContextMenuGroup",props:{disabled:{type:Boolean,default:!1},hidden:{type:Boolean,default:!1},clickHandler:{type:Function,default:null},label:{type:String,default:""},icon:{type:String,default:""},iconFontClass:{type:String,default:"iconfont"},checked:{type:Boolean,default:!1},shortcut:{type:String,default:""},svgIcon:{type:String,default:""},svgProps:{type:Object,default:null},preserveIconWidth:{type:Boolean,default:!0},showRightArrow:{type:Boolean,default:!1},clickClose:{type:Boolean,default:!0},adjustSubMenuPosition:{type:Boolean,default:void 0},maxHeight:{type:[String,Number],default:0},maxWidth:{type:[String,Number],default:0},minWidth:{type:[String,Number],default:0}},setup(e,t){const o=v.inject("globalOptions"),{adjustSubMenuPosition:i,maxWidth:s,minWidth:n,maxHeight:r}=v.toRefs(e),l=typeof i.value<"u"?i.value:o.value.adjustPosition,a=v.ref(),d=v.ref();return t.expose({getSubMenuRef:()=>a.value,getMenuItemRef:()=>d.value}),()=>v.h(zn,{...e,ref:d,showRightArrow:!0,maxWidth:void 0,minWidth:void 0,maxHeight:void 0,adjustSubMenuPosition:void 0,hasChildren:typeof t.slots.default!==void 0},t.slots.default?{submenu:c=>v.h(Un,{ref:a,show:c.show,maxWidth:s.value,minWidth:n.value,maxHeight:r.value,adjustPosition:l,parentMenuItemContext:c.context},{default:t.slots.default}),...ax(t.slots,"default")}:t.slots)}});var eE=lt(Jx,null,null);const tE=eE.exports;function oE(e,t,o,i){const s=new v({data:{show:!0},render(n){return n($d,{props:{options:e,show:this.show,container:t,isFullScreenContainer:!o},on:{closeAnimFinished:()=>{s.$destroy()},close:r=>{var l;(l=e.onClose)==null||l.call(e,r),s.show=!1}}},i)}});return s.$mount(),t&&t.appendChild(s.$el),s}function Ud(e,t){const o=Od(e);return oE(e,o.container,o.isNew,t).exposed}const iE={install(e){e.prototype.$contextmenu=Ud,e.component("ContextMenu",Qx),e.component("ContextMenuItem",zn),e.component("ContextMenuGroup",tE),e.component("ContextMenuSperator",$n),e.component("ContextMenuSeparator",$n),e.component("ContextSubMenu",Un)},showContextMenu(e,t){return Ud(e,t)},isAnyContextMenuOpen(){return tx()},closeContextMenu:Hd,transformMenuPosition:ix},Kd=(e,t)=>e.map(o=>({label:o.name,icon:o.icon,disabled:o.disabled,shortcut:o.shortcut,checked:o.checked,children:o.subMenu?Kd(o.subMenu,t):void 0,onClick:s=>{o.action&&o.action(t)}})),sE=()=>document.documentElement.classList.contains("dark"),nE=(e,t,o)=>{iE.showContextMenu({theme:`default ${sE()?"dark":""}`,x:e.clientX,y:e.clientY+12,items:Kd(t,o)})},rE=e=>({suppressContextMenu:!1,allowContextMenuWithControlKey:!1,onCellContextMenu(t){e.getContextMenuItems&&t.event&&t.event instanceof MouseEvent&&nE(t.event,e.getContextMenuItems({api:t.api,column:t.column,context:t.context,defaultItems:[],event:t.event,node:t.node,value:t.value}),{api:t.api,column:t.column,context:t.context,node:t.node,value:t.value})}}),lE={getContextMenuItems:void 0},aE=e=>{var t;const o=v.ref(),i=v.ref(),s=v.ref({height:`calc(100% - ${(t=e.footerHeight)!=null?t:0}px)`,width:"100%"}),n=new Set(["columnSizing","columnVisibility","columnPinning","columnOrder"]),r=v.ref(0),l=v.ref(),{onBodyScrollEnd:a}=Q0({onVScrollEnd(){u.value.getRows(Ho.nextPage(c.value))}}),d=({data:D})=>D.id,c=v.ref(new Y0(e.rowIdMapper)),u=v.ref(new Fd(e.rowData,c.value)),{initGridState:h,resetGridState:g,storeGridState:p,restoreGridState:f}=J0(e.id,o,l),C=async D=>{R(),c.value.pageSize=e.pageSize,c.value.gridApi=D.api,u.value.api=D.api,D.api.getAllGridColumns(),o.value=D.api,h(),await f(),await P(),D.api.setGridOption("popupParent",document.querySelector("body"))},m=()=>{u.value.loadData()},b=async(D,T=0)=>{c.value.insertRows(D,T),m()},S=D=>c.value.getRows().some(T=>T.getId()===D.getId()),w=()=>c.value.getRows(),y=()=>{var D,T,k;const O=i.value.querySelector(".ag-body-viewport"),W=Number.parseFloat(O.querySelector(".ag-center-cols-container").style.height),$=i.value.querySelector(".ag-header").offsetHeight,Q=(T=(D=i.value.querySelector(".ag-overlay-no-rows-wrapper"))==null?void 0:D.querySelector(".el-empty"))==null?void 0:T.offsetHeight;W<r.value?s.value.height=`${$+(Q||W)+(e.footerHeight?2:11)}px`:s.value.height.includes("100%")||(s.value.height=`calc(100% - ${(k=e.footerHeight)!=null?k:0}px)`)},R=()=>{const D=i.value.querySelector(".ag-body-viewport");l.value=D.offsetWidth,r.value=D.offsetHeight},P=()=>new Promise((D,T)=>{c.value.isFinished=!1;const k=Ho.from(1,c.value.pageSize,c.value);k.context={resolve:D,reject:T},u.value.getRows(k),u.value.api.getDisplayedRowCount()>0&&u.value.api.ensureIndexVisible(0)}),M=v.computed(()=>{var D;return{onGridReady:C,onBodyScrollEnd:a,scrollbarWidth:8,getRowId:d,columnDefs:e.columns,preventDefaultOnContextMenu:!0,suppressRowTransform:!0,selectionColumnDef:{pinned:"left",rowSpan:({data:T,column:k})=>T.getRowSpan(k),cellClassRules:{"cell-span":({data:T,column:k})=>T.getRowSpan(k)>0,"cell-span-hide":({data:T,column:k})=>T.getRowSpan(k)===0}},defaultColGroupDef:{marryChildren:!0},onStateUpdated(T){T.sources.some(k=>n.has(k))&&p()},onSortChanged(T){T.source==="uiColumnSorted"&&p()},context:{refresh:P,reload:m},onRowDataUpdated(){v.nextTick(()=>{y()})},defaultColDef:{rowSpan({column:T,data:k}){return k.getRowSpan(T)},cellClassRules:{"cell-span":({data:T,column:k})=>T.getRowSpan(k)>0,"cell-span-hide":({data:T,column:k})=>T.getRowSpan(k)===0},suppressFloatingFilterButton:!0,enableCellChangeFlash:!0,tooltipValueGetter(T){return T.valueFormatted},resizable:!0,sortable:!1,headerComponent:"HeaderRenderer",cellRenderer:"CellRenderer",valueGetter({column:T,data:k}){return k.getValue(T)},valueFormatter({value:T}){return T}},...ex((D=e.gridOptions)!=null?D:{},i),onBodyScroll(T){I.left=T.left,I.top=T.top},...rE(e.gridOptions),...lE}}),I={left:0,top:0};return v.onActivated(()=>{}),{gridOptions:M,datasource:u,gridStyles:s,dataCache:c,gridApi:o,gridElRef:i,resetGridState:g,reload:m,insertRows:b,existRow:S,getRows:w,refresh:P}},jd={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)}},dE={functional:!0,props:{params:{type:Object,required:!0}},render(e,t){const o=e("",{});return o.text=`${t.props.params.column.getColId()} holder`,o}},cE=v.defineComponent({name:"CellRenderer"}),uE=v.defineComponent({...cE,props:{params:null},setup(e){const t=e,o=v.computed(()=>{const r=t.params.data,l=t.params.data.isEditing()&&t.params.editeRender?t.params.editeRender:t.params.render,a={...t.params,render:l};if(r instanceof Vn){const d=r.getCell(a.column);if(!d)return a.render=t.params.render,a;const{hostArray:c,hostObject:u}=r.getHostObject(a);a.hostObject=u,a.hostArrayHook=h=>{var g;let p=c;((g=a.colDef)==null?void 0:g.cellDataType)==="array"&&!c&&(p=[],N.set(r.getData(),d.path,p)),p&&(h(p),r.buildSpan(),a.context.reload(),a.api.redrawRows({rowNodes:a.api.getRenderedNodes().filter(f=>r.match(f))}))}}return a}),i=v.computed(()=>{var r;const l=t.params.data;if((r=t.params.data)!=null&&r.isEditing()&&t.params.editeRender){const a=l.getData(),d=l.getCell(t.params.column);return d?!N.isEqual(N.get(a,d.getReadPath()),t.params.value):!1}return!1}),s=v.computed(()=>t.params.data.isTransient()),n=v.computed(()=>t.params.data.getRowSpan(t.params.column));return{__sfc:!0,props:t,eventParams:o,isChange:i,isDraft:s,rowSpan:n,VNodeRenderer:jd,CellHolder:dE}}});var hE=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}})},gE=[],pE=ue(uE,hE,gE,!1,null,null);const fE=pE.exports,CE=v.defineComponent({name:"GridToolbar"}),mE=v.defineComponent({...CE,setup(e){return{__sfc:!0}}});var vE=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)])},wE=[],bE=ue(mE,vE,wE,!1,null,"f12c2536");const qd=bE.exports,SE=v.defineComponent({__name:"FooterCellRender",props:{params:null},setup(e){return{__sfc:!0,props:e,VNodeRenderer:jd}}});var yE=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)},RE=[],xE=ue(SE,yE,RE,!1,null,"4998e205");const EE=xE.exports,DE=v.defineComponent({name:"SearchItem",props:{search:{type:Object,required:!0},teleported:{type:Boolean}},setup(e){return()=>e.search.render(e.search)}});var FE=ue(DE,null,null,!1,null,"e1931525");const Kn=FE.exports,PE=v.defineComponent({name:"ClSearch"}),TE=v.defineComponent({...PE,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=v.ref(),i=v.ref(),s=()=>{t.search.forEach(c=>{c.value=N.cloneDeep(c.initValue)})},n=v.computed(()=>`${t.id}_SEARCH`),r=()=>{localStorage.setItem(n.value,JSON.stringify(t.search.filter(c=>!c.transient).map(c=>({field:c.field,value:c.value}))))},l=()=>{var c;const u=JSON.parse((c=localStorage.getItem(n.value))!=null?c:"[]");t.search.forEach(h=>{const g=u.find(p=>h.field===p.field);h.transient||!g?h.value=N.cloneDeep(h.initValue):h.value=g.value})},a=async()=>{i.value=!0;try{await t.searchRemote(),t.id&&r()}catch(c){console.error(c)}finally{i.value=!1}},d=()=>{if(s(),t.autoResetSearch)return a()};return v.onBeforeMount(()=>{l()}),{__sfc:!0,searchForm:o,props:t,loading:i,reset:s,persistenceKey:n,doPersistence:r,restore:l,doSearch:a,handleReset:d,SearchItem:Kn}}});var IE=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)])},ME=[],AE=ue(TE,IE,ME,!1,null,"962588ec");const kE=AE.exports,Yd=(e,t,o)=>{const i=v.ref(),s=v.ref(!1),n=v.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=>N.isEmpty(h)&&!N.isNumber(h),l=v.computed(()=>Array.isArray(o)?o.some(h=>!r(h.value)):!r(o==null?void 0:o.value)),a=v.computed(()=>[s.value?"is-loading":""]),d=v.computed(()=>l.value?"var(--el-color-primary)":void 0);return{visible:i,loading:s,width:n,loadingClass:a,hasCondition:l,hasConditionColor:d,doSearch:async()=>{s.value=!0;try{await e()}catch(h){console.error(h)}finally{s.value=!1,i.value=!1}},reset:()=>{Array.isArray(o)?o.forEach(h=>{h.value=N.cloneDeep(h.initValue)}):o.value=N.cloneDeep(o==null?void 0:o.initValue)}}},LE=v.defineComponent({name:"ClPopoverSearch"}),GE=v.defineComponent({...LE,props:{search:null,teleported:{type:Boolean},searchRemote:{type:Function},field:null},setup(e){const t=e,o=v.computed(()=>{var u;return(u=t.search)==null?void 0:u.find(h=>h.field===t.field)}),{visible:i,loading:s,width:n,loadingClass:r,hasConditionColor:l,doSearch:a,reset:d}=Yd(t.searchRemote,t,o.value),c=v.computed(()=>{var u;return(u=n.value)!=null?u:300});return{__sfc:!0,props:t,search:o,visible:i,loading:s,width:n,loadingClass:r,hasConditionColor:l,doSearch:a,reset:d,popoverWidth:c,SearchItem:Kn}}});var HE=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()},OE=[],BE=ue(GE,HE,OE,!1,null,null);const _E=BE.exports,NE=v.defineComponent({name:"ClDrawerSearch"}),VE=v.defineComponent({...NE,props:{search:null,teleported:{type:Boolean},searchRemote:{type:Function},attached:{type:Boolean}},setup(e){const t=e,{visible:o,loading:i,loadingClass:s,hasConditionColor:n,doSearch:r,reset:l}=Yd(t.searchRemote,t,t.search);return v.onMounted(()=>{t.attached||l()}),{__sfc:!0,props:t,visible:o,loading:i,loadingClass:s,hasConditionColor:n,doSearch:r,reset:l,SearchItem:Kn}}});var WE=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)},zE=[],$E=ue(VE,WE,zE,!1,null,null);const Zd=$E.exports;var UE=Object.defineProperty,KE=(e,t,o)=>t in e?UE(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,jE=(e,t,o)=>KE(e,t+"",o);class jn{constructor(t){jE(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,...N.isPlainObject(s.value)?s.value:{[s.field]:s.value}}),{});return new jn(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 qE=v.defineComponent({name:"SearchButton"}),YE=v.defineComponent({...qE,props:{searches:null},setup(e){const t=e,o=v.inject(Dt);return{__sfc:!0,props:t,context:o,ClDrawerSearch:Zd}}});var ZE=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}})},XE=[],QE=ue(YE,ZE,XE,!1,null,"173e227d");const Xd=QE.exports,JE=v.defineComponent({name:"RefreshButton"}),eD=v.defineComponent({...JE,setup(e){const t=v.ref(!1),{refresh:o}=v.inject(Dt);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 tD=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":""]})])},oD=[],iD=ue(eD,tD,oD,!1,null,"0e8c21af");const Qd=iD.exports;function Jd(e,t){const o=t(e);return sD(e)&&(o.children=e.children.map(i=>Jd(i,t))),o}const sD=e=>!!e.children,nD=()=>{const e=v.inject(Dt),t=v.ref(),o=v.ref(),i=v.ref([]),s=v.ref(),n=C=>{const m=e.api.value.getAllDisplayedColumns(),b=m.find(S=>S.getColId()===C);return b?m.indexOf(b):-1},r=C=>{if(C.field)return C.field;if(C.groupId)return C.groupId;throw new Error(`${C.headerName} field or groupId not found`)},l=()=>{var C,m;o.value=(m=(C=e.api.value.getColumnDefs())==null?void 0:C.map(b=>Jd(b,S=>{var w,y;return{id:r(S),label:S.headerName,pined:(y=(w=e.api.value.getColumnGroup(r(S)))==null?void 0:w.getPinned())!=null?y:S.pinned}})))!=null?m:[],i.value=e.api.value.getAllDisplayedColumns().map(b=>b.getColId())},a=(C,m,b)=>b!=="inner"&&C.parent===m.parent,d=()=>{s.value=t.value.getCheckedKeys()},c=C=>{if(C instanceof Je)return[C];const m=C.getChildren();return m?[...m.flatMap(b=>c(b))]:[]},u=(C,m,b)=>{const S=n(m[0].colId),w=n(b.colId);return C==="after"?w-m.length+1:w>S?w-m.length:w};return{treeData:o,defaultCheckedKeys:i,treeRef:t,refreshTreeData:l,checkColumnAllowDrop:a,onColumnDragStart:d,onColumnDragFinish:(C,m,b)=>{if(m&&C&&C.key!==m.key){const S=e.api.value.getColumnGroup(C.key),w=e.api.value.getColumn(C.key),y=e.api.value.getColumn(m.key),R=c(S??w);if(y){const P=u(b,R,y);e.api.value.moveColumns(R,P)}}t.value.setCheckedKeys(s.value),s.value=void 0},onColumnVisibleChange:(C,m)=>{e.api.value.setColumnsVisible([C.id],m)},onColumnPinedChange:(C,m)=>{var b;const S=e.api.value.getColumnGroup(C),w=S?S.getDisplayedLeafColumns().map(R=>R.getColId()):[C],y=S?S.getPinned():(b=e.api.value.getColumn(C))==null?void 0:b.getPinned();e.api.value.setColumnsPinned(w,y===m?null:m),l()},columnAutoResize:()=>{e.api.value.sizeColumnsToFit()}}},rD=v.defineComponent({name:"SettingButton"}),lD=v.defineComponent({...rD,setup(e){const{treeRef:t,treeData:o,defaultCheckedKeys:i,refreshTreeData:s,checkColumnAllowDrop:n,onColumnDragStart:r,onColumnDragFinish:l,onColumnVisibleChange:a,onColumnPinedChange:d,columnAutoResize:c}=nD(),u=v.ref(!1),h=v.inject(Dt);return{__sfc:!0,treeRef:t,treeData:o,defaultCheckedKeys:i,refreshTreeData:s,checkColumnAllowDrop:n,onColumnDragStart:r,onColumnDragFinish:l,onColumnVisibleChange:a,onColumnPinedChange:d,columnAutoResize:c,visible:u,gridContext:h,handleResetGridState:()=>{h.resetGridState(),s()}}}});var aD=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("自适应")]),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",{staticStyle:{display:"flex","justify-content":"space-between",width:"100%"}},[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)}}})])])]}}])})],1)],1)},dD=[],cD=ue(lD,aD,dD,!1,null,"43c6442c");const ec=cD.exports,uD=v.defineComponent({name:"HeaderRenderer"}),hD=v.defineComponent({...uD,props:{params:null},setup(e){const t=e,o=v.ref(),i=v.ref(-1),s=v.getCurrentInstance(),n=v.inject(Dt),r=()=>{o.value=t.params.column.getSort(),i.value=m0(t.params.api,t.params.column.getColId())},l=async(a,d)=>{try{o.value=a,t.params.setSort(a,d.shiftKey),await n.refresh()}catch{}};return v.onMounted(()=>{t.params.api.addEventListener("sortChanged",r),r()}),v.onUnmounted(()=>{t.params.api.removeEventListener("sortChanged",r)}),{__sfc:!0,props:t,sorted:o,sortIndex:i,instance:s,context:n,handleSortChange:r,handleSortClick:l}}});var gD=function(){var t=this,o=t._self._c,i=t._self._setupProxy;return o("div",[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)"},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)},pD=[],fD=ue(hD,gD,pD,!1,null,"4883f6ef");const CD=fD.exports,mD=v.defineComponent({name:"GridEmptyDataOverlay"}),vD=v.defineComponent({...mD,setup(e){return{__sfc:!0}}});var wD=function(){var t=this,o=t._self._c;return t._self._setupProxy,o("el-empty",{attrs:{description:"没有数据了","image-size":75}})},bD=[],SD=ue(vD,wD,bD,!1,null,"05fc87c0");const yD=SD.exports,RD=v.defineComponent({name:"GridLoadingOverlay"}),xD=v.defineComponent({...RD,setup(e){return{__sfc:!0}}});var ED=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)"}})},DD=[],FD=ue(xD,ED,DD,!1,null,"c60c1386");const PD=FD.exports,TD=(e,t,o)=>{const i=v.ref(),s=v.ref([{}]),n=v.computed(()=>e.footerHeight?{height:`${e.footerHeight+10}px`}:{});v.watch(()=>[s.value,i.value],()=>{var c;s.value&&i.value&&((c=i.value)==null||c.setGridOption("rowData",s.value.map((u,h)=>({id:`footer-${h}`,...u}))))});const r=c=>!!c.children,l=c=>{var u;return r(c)?{headerName:c.headerName,groupId:c.groupId,children:[...c.children.map(h=>l(h))]}:{width:c.width,headerName:c.headerName,field:c.field,cellRendererParams:{render:(u=c.cellRendererParams)==null?void 0:u.footerRender}}},a=v.computed(()=>({scrollbarWidth:8,suppressRowTransform:!0,columnDefs:e.columns.map(c=>l(c)),defaultColGroupDef:{marryChildren:!0},rowSelection:e.gridOptions.rowSelection?{mode:"singleRow",isRowSelectable:()=>!1,hideDisabledCheckboxes:!0}:void 0,rowHeight:e.footerHeight,headerHeight:0,alwaysShowVerticalScroll:o.value.height.includes("100%"),defaultColDef:{suppressFloatingFilterButton:!0,cellRenderer:"FooterCellRender",enableCellChangeFlash:!0,tooltipValueGetter(c){return c.value}},onGridReady(c){i.value=c.api,c.api.setGridOption("popupParent",document.querySelector("body"))},alignedGrids:()=>[t.value]}));return{setFooterData:c=>{s.value=c},footerGridApi:i,footerData:s,footerStyles:n,footerGridOptions:a}},ID=()=>({theme:v.ref("ag-theme-alpine")}),MD=v.defineComponent({name:"Grid",components:{SearchButton:Xd,RefreshButton:Qd,SettingButton:ec,CellRenderer:fE,GridEmptyDataOverlay:yD,HeaderRenderer:CD,GridLoadingOverlay:PD,AgGridVue:Td,GridToolbar:qd,FooterCellRender:EE}}),AD=v.defineComponent({...MD,props:{id:null,rowIdMapper:{type:Function},columns:null,rowData:{type:Function},pageSize:{default:50},footerHeight:null,tools:{default:()=>["search","refresh","setting"]},searches:null,gridOptions:null},setup(e,{expose:t}){const o=e,i=v.ref(),s=v.ref(),{theme:n}=ID(),{gridOptions:r,dataCache:l,gridStyles:a,gridApi:d,gridElRef:c,reload:u,insertRows:h,existRow:g,getRows:p,refresh:f,resetGridState:C}=aE(o),{footerGridOptions:m,setFooterData:b,footerStyles:S}=TD(o,s,a);return v.provide(Dt,{refresh:f,resetGridState:C,api:d}),v.watch(()=>r.value,()=>{d.value&&d.value.updateGridOptions(N.omit(r.value,["scrollbarWidth","getRowId","suppressRowTransform","defaultColGroupDef"]))},{deep:!0}),t({setFooterData:b,updateGridOptions:w=>{d.value.updateGridOptions(w)},reload:u,refresh:f,getRows:p,createRow(w,y=!1){const R=l.value.createRow(w);return y?new kd(R,o.rowIdMapper,!0):R},existRow:g,insertRows:h,startEditing:()=>{const w=l.value.getRows().filter(y=>!y.isEditing());N.isEmpty(w)||(w.forEach(y=>y.startEditing()),u(),d.value.redrawRows())},stopEditing:()=>{const w=l.value.getRows().filter(y=>y.isEditing());N.isEmpty(w)||(w.forEach(y=>y.stopEditing()),u(),d.value.redrawRows())}}),{__sfc:!0,props:o,bottomRef:i,gridRef:s,theme:n,options:r,dataCache:l,gridStyles:a,gridApi:d,gridElRef:c,reload:u,insertRows:h,existRow:g,getRows:p,refresh:f,resetGridState:C,footerGridOptions:m,setFooterData:b,footerStyles:S,AgGridVue:Td,GridToolbar:qd,SearchButton:Xd,RefreshButton:Qd,SettingButton:ec}}});var kD=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)},LD=[],GD=ue(AD,kD,LD,!1,null,null);const HD=GD.exports;var OD=Object.defineProperty,BD=(e,t,o)=>t in e?OD(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,es=(e,t,o)=>BD(e,typeof t!="symbol"?t+"":t,o);const _D=e=>new tc(e);class tc{constructor(t){es(this,"colDef"),es(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}build(){return this.colDef.cellRendererParams=this.agGridCellRenderParams,this.colDef}}const ND=e=>new oc(e);class oc{constructor(t){es(this,"colDefs"),es(this,"rendersMap",new Map),this.colDefs=t,this.eachColDef(t,o=>{this.rendersMap.set(o.field,{})})}eachColDef(t,o){for(const i of t)Pd.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)}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}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=>{t.cellRendererParams=this.rendersMap.get(t.field)}),this.colDefs}}const VD=(e,t)=>({model:{value:N.get(e,t),callback:o=>{N.set(e,t,o)}}});Cc({theme:"legacy"});const WD={install:()=>{Dh.registerModules([IS,MS,AS,kS,GS,LS,sy,WS,_b,ba,fd,py,yy,Fy,Ly,HR,Qw,$y,Zy,Uy,oR,tb,QS,sd,iR,nR,Of,Vy,f0,p0,HS])}};J.CellRenderAdapter=tc,J.ClDrawerSearch=Zd,J.ClPopoverSearch=_E,J.ClSearch=kE,J.ColumnRendersBuilder=oc,J.GRID_CONTEXT=Dt,J.Grid=HD,J.GridDataSource=Fd,J.GridUtils=Pd,J.Searches=jn,J.VueGridPlugin=WD,J.vModel=VD,J.withColumnRenderBuilder=ND,J.withRender=_D,Object.defineProperty(J,Symbol.toStringTag,{value:"Module"})});
|