@turquoisehealth/pit-viper 2.32.2 → 2.32.4

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.
@@ -1,21 +1,79 @@
1
1
  (function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode(".pv-popover-list[data-v-80ba65ea]{font-size:14px}.pv-icon-button[data-v-5008b808]{background-color:transparent;border:none}.pv-icon-button[data-v-5008b808]:hover{cursor:pointer;color:#176f6f}.pv-select[data-v-5008b808]{padding-top:4px;padding-bottom:4px}.pv-button-loading[data-v-f00f6419]{width:16px;height:16px;border:2px solid #ccc;border-top-color:#fff;border-radius:50%;animation:spin-f00f6419 1s linear infinite}@keyframes spin-f00f6419{to{transform:rotate(360deg)}}.pv-badge-md[data-v-5afd0e59]{--inset-size: 2px 2px;min-height:24px;max-height:24px;min-width:24px;font-weight:500}.pv-badge-sm[data-v-5afd0e59]{--inset-size: 2px 2px;min-height:20px;max-height:20px;min-width:20px;font-weight:500}.pv-surface-lighten-5[data-v-5afd0e59]{background-color:#e0e5e4}.pv-text-secondary[data-v-5afd0e59]{color:#4b595c}.pv-table-row-count{position:absolute;right:12px;top:6px;opacity:1;background-color:#f7f8f8;transition:opacity .3s ease}.pv-table-group-cell:hover .pv-table-row-count{opacity:0}.pv-table-row-number{padding:8px 12px 8px 0;text-align:center;color:#89989b}.suggested-label[data-v-ad11d710]:hover{color:#16696d}.ag-custom-header-cell[data-v-a5b61e33]{height:100%;align-items:center}.ag-header-actions .ag-header-cell-menu-button[data-v-a5b61e33]{opacity:0;transition:opacity .2s ease-in-out}.ag-header-cell-menu-button:hover .ag-header-actions .ag-header-cell-menu-button[data-v-a5b61e33]{opacity:1}.ag-header-cell-menu-button:focus .ag-header-actions .ag-header-cell-menu-button[data-v-a5b61e33]{opacity:1}.pv-table-row-number[data-v-ae67b797]{padding:8px 12px 8px 0;text-align:center;color:#89989b}.pv-table-overlay{position:absolute;margin-top:20px;z-index:2;background:#fff;width:100%;top:50%;left:50%;height:95%;transform:translate(-50%,-50%);pointer-events:none}.ag-header-cell-resize{border:none!important}.ag-row-group-leaf-indent{padding-left:7px;margin-left:0}.ag-custom-loading-cell{width:100%;height:40%;margin:15px;background-color:#ccc;border-radius:4px}.ag-group-value{width:100%}.ag-menu-option:hover{background-color:#f7f8f8}.ag-menu-option:active{background-color:#e8f2f4}.ag-menu-option-text{font-family:Inter}")),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
2
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),fe=require("ag-grid-community"),Le=require("ag-grid-enterprise");var $n=Object.defineProperty,Gn=(o,e,n)=>e in o?$n(o,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):o[e]=n,st=(o,e,n)=>Gn(o,typeof e!="symbol"?e+"":e,n);class Dt{static getComponentDefinition(e,n){let r;return typeof e=="string"?r=this.searchForComponentInstance(n,e):r={extends:t.defineComponent({...e})},r||fe._error(114,{component:e}),r.extends?(r.extends.setup&&(r.setup=r.extends.setup),r.extends.props=this.addParamsToProps(r.extends.props)):r.props=this.addParamsToProps(r.props),r}static addParamsToProps(e){return!e||Array.isArray(e)&&e.indexOf("params")===-1?e=["params",...e||[]]:typeof e=="object"&&!e.params&&(e.params={type:Object}),e}static createAndMountComponent(e,n,r,a){const i=Dt.getComponentDefinition(e,r);if(!i)return;const{vNode:d,destroy:l,el:u}=this.mount(i,{params:Object.freeze(n)},r,a||{});return{componentInstance:d.component.proxy,element:u,destroy:l}}static mount(e,n,r,a){let i=t.createVNode(e,n);i.appContext={...r.appContext,provides:a};let d=document.createElement("div");return t.render(i,d),{vNode:i,destroy:()=>{d&&t.render(null,d),d=null,i=null},el:d}}static searchForComponentInstance(e,n,r=10,a=!1){let i=null,d=0,l=e.parent;for(;!i&&l&&l.components&&++d<r;)l.components&&l.components[n]&&(i=l.components[n]),l=l.parent;for(d=0,l=e.parent;!i&&l&&l.$options&&++d<r;){const u=l;u.$options&&u.$options.components&&u.$options.components[n]?i=u.$options.components[n]:u[n]&&(i=u[n]),l=l.parent}for(d=0,l=e.parent;!i&&l&&++d<r;){if(l.exposed){const u=l;u.exposed&&u.exposed[n]?i=u.exposed[n]:u[n]&&(i=u[n])}l=l.parent}if(!i){const u=e.appContext.components;u&&u[n]&&(i=u[n])}return!i&&!a?(fe._error(114,{component:n}),null):i}}class Hn extends fe.BaseComponentWrapper{constructor(e,n){super(),st(this,"parent"),st(this,"provides"),this.parent=e,this.provides=n}createWrapper(e){const n=this;class r extends Ln{init(d){super.init(d)}hasMethod(d){var l,u;const s=a.getFrameworkComponentInstance();return s[d]?!0:((l=s.$.exposed)==null?void 0:l[d])!=null||((u=s.exposed)==null?void 0:u[d])!=null||s.$.setupState[d]!=null}callMethod(d,l){var u,s;const f=this.getFrameworkComponentInstance(),v=a.getFrameworkComponentInstance();if(v[d])return v[d].apply(f,l);{const _=((u=f.$.exposed)==null?void 0:u[d])||((s=f.exposed)==null?void 0:s[d])||f.$.setupState[d];return _?.apply(f,l)}}addMethod(d,l){a[d]=l}processMethod(d,l){return d==="refresh"&&(this.getFrameworkComponentInstance().params=l[0]),this.hasMethod(d)?this.callMethod(d,l):d==="refresh"}createComponent(d){return n.createComponent(e,d)}}const a=new r;return a}createComponent(e,n){return Dt.createAndMountComponent(e,n,this.parent,this.provides)}createMethodProxy(e,n,r){return function(){return e.hasMethod(n)?e.callMethod(n,arguments):(r&&fe._warn(233,{methodName:n}),null)}}destroy(){this.parent=null}}class Ln{constructor(){st(this,"componentInstance"),st(this,"element"),st(this,"unmount")}getGui(){return this.element}destroy(){this.getFrameworkComponentInstance()&&typeof this.getFrameworkComponentInstance().destroy=="function"&&this.getFrameworkComponentInstance().destroy(),this.unmount()}getFrameworkComponentInstance(){return this.componentInstance}init(e){const{componentInstance:n,element:r,destroy:a}=this.createComponent(e);this.componentInstance=n,this.unmount=a,this.element=r.firstElementChild??r}}class zn extends fe.VanillaFrameworkOverrides{constructor(e){super("vue"),st(this,"parent"),this.parent=e}frameworkComponent(e,n){let r=Dt.searchForComponentInstance(this.parent,e,10,!0)?e:null;if(!r&&n&&n[e]){const a=n[e];r=Dt.searchForComponentInstance(this.parent,a,10,!0)?a:null}return r}isFrameworkComponent(e){return typeof e=="object"}}function jn(){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,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,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,suppressAdvancedFilterEval:void 0,suppressSetFilterByDefault:void 0,enableCharts:void 0,chartThemes:void 0,customChartThemes:void 0,chartThemeOverrides:void 0,chartToolPanelsDef:void 0,chartMenuItems: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,dragAndDropImageComponent:void 0,dragAndDropImageComponentParams: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,suppressRowDrag:void 0,suppressMoveWhenRowDragging:void 0,rowDragEntireRow:void 0,rowDragMultiRow:void 0,rowDragText: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,pinnedTopRowData:void 0,pinnedBottomRowData: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,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,"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,"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-opened":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}}const Wn=(o,e)=>{let n;return()=>{const r=function(){o()};window.clearTimeout(n),n=window.setTimeout(r,e)}};function Un(o){return o&&o.constructor&&o.constructor.toString().substring(0,5)==="class"}function pt(o){const e=n=>Un(n)?t.toRaw(n):Array.isArray(n)?n.map(r=>e(r)):t.isRef(n)||t.isReactive(n)||t.isProxy(n)?e(t.toRaw(n)):n;return e(o)}const Yn={ref:"root"},qn=t.defineComponent({__name:"AgGridVue",props:t.mergeModels(t.mergeDefaults({gridOptions:{},modules:{},statusBar:{},sideBar:{type:[Object,String,Array,Boolean,null]},suppressContextMenu:{type:Boolean},preventDefaultOnContextMenu:{type:Boolean},allowContextMenuWithControlKey:{type:Boolean},columnMenu:{},suppressMenuHide:{type:Boolean},enableBrowserTooltips:{type:Boolean},tooltipTrigger:{},tooltipShowDelay:{},tooltipHideDelay:{},tooltipMouseTrack:{type:Boolean},tooltipShowMode:{},tooltipInteraction:{type:Boolean},popupParent:{},copyHeadersToClipboard:{type:Boolean},copyGroupHeadersToClipboard:{type:Boolean},clipboardDelimiter:{},suppressCopyRowsToClipboard:{type:Boolean},suppressCopySingleCellRanges:{type:Boolean},suppressLastEmptyLineOnPaste:{type:Boolean},suppressClipboardPaste:{type:Boolean},suppressClipboardApi:{type:Boolean},suppressCutToClipboard:{type:Boolean},columnDefs:{},defaultColDef:{},defaultColGroupDef:{},columnTypes:{},dataTypeDefinitions:{},maintainColumnOrder:{type:Boolean},enableStrictPivotColumnOrder:{type:Boolean},suppressFieldDotNotation:{type:Boolean},headerHeight:{},groupHeaderHeight:{},floatingFiltersHeight:{},pivotHeaderHeight:{},pivotGroupHeaderHeight:{},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:{},suppressAutoSize:{type:Boolean},autoSizePadding:{},skipHeaderOnAutoSize:{type:Boolean},autoSizeStrategy:{},components:{},editType:{},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:{},defaultCsvExportParams:{},suppressCsvExport:{type:Boolean},defaultExcelExportParams:{},suppressExcelExport:{type:Boolean},excelStyles:{},findSearchValue:{},findOptions:{},quickFilterText:{},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:{},advancedFilterBuilderParams:{},suppressAdvancedFilterEval:{type:Boolean},suppressSetFilterByDefault:{type:Boolean},enableCharts:{type:Boolean},chartThemes:{},customChartThemes:{},chartThemeOverrides:{},chartToolPanelsDef:{},chartMenuItems:{type:[Array,Function]},loadingCellRenderer:{},loadingCellRendererParams:{},loadingCellRendererSelector:{type:Function},localeText:{},masterDetail:{type:Boolean},keepDetailRows:{type:Boolean},keepDetailRowsCount:{},detailCellRenderer:{},detailCellRendererParams:{},detailRowHeight:{},detailRowAutoHeight:{type:Boolean},context:{},dragAndDropImageComponent:{},dragAndDropImageComponentParams:{},alignedGrids:{type:[Array,Function]},tabIndex:{},rowBuffer:{},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:{},loadingOverlayComponent:{},loadingOverlayComponentParams:{},suppressLoadingOverlay:{type:Boolean},overlayNoRowsTemplate:{},noRowsOverlayComponent:{},noRowsOverlayComponentParams:{},suppressNoRowsOverlay:{type:Boolean},pagination:{type:Boolean},paginationPageSize:{},paginationPageSizeSelector:{type:[Array,Boolean]},paginationAutoPageSize:{type:Boolean},paginateChildRows:{type:Boolean},suppressPaginationPanel:{type:Boolean},pivotMode:{type:Boolean},pivotPanelShow:{},pivotMaxGeneratedColumns:{},pivotDefaultExpanded:{},pivotColumnGroupTotals:{},pivotRowTotals:{},pivotSuppressAutoColumn:{type:Boolean},suppressExpandablePivotGroups:{type:Boolean},functionsReadOnly:{type:Boolean},aggFuncs:{},suppressAggFuncInHeader:{type:Boolean},alwaysAggregateAtRootLevel:{type:Boolean},aggregateOnlyChangedColumns:{type:Boolean},suppressAggFilteredOnly:{type:Boolean},removePivotHeaderRowWhenSingleValueColumn:{type:Boolean},animateRows:{type:Boolean},cellFlashDuration:{},cellFadeDuration:{},allowShowChangeAfterFilter:{type:Boolean},domLayout:{},ensureDomOrder:{type:Boolean},enableCellSpan:{type:Boolean},enableRtl:{type:Boolean},suppressColumnVirtualisation:{type:Boolean},suppressMaxRenderedRowRestriction:{type:Boolean},suppressRowVirtualisation:{type:Boolean},rowDragManaged:{type:Boolean},suppressRowDrag:{type:Boolean},suppressMoveWhenRowDragging:{type:Boolean},rowDragEntireRow:{type:Boolean},rowDragMultiRow:{type:Boolean},rowDragText:{type:Function},fullWidthCellRenderer:{},fullWidthCellRendererParams:{},embedFullWidthRows:{type:Boolean},groupDisplayType:{},groupDefaultExpanded:{},autoGroupColumnDef:{},groupMaintainOrder:{type:Boolean},groupSelectsChildren:{type:Boolean},groupLockGroupColumns:{},groupAggFiltering:{type:[Boolean,Function]},groupTotalRow:{type:[String,Function]},grandTotalRow:{},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:{},groupRowRenderer:{},groupRowRendererParams:{},treeData:{type:Boolean},treeDataChildrenField:{},treeDataParentIdField:{},rowGroupPanelSuppressSort:{type:Boolean},suppressGroupRowsSticky:{type:Boolean},pinnedTopRowData:{},pinnedBottomRowData:{},rowModelType:{},rowData:{},asyncTransactionWaitMillis:{},suppressModelUpdateAfterUpdateTransaction:{type:Boolean},datasource:{},cacheOverflowSize:{},infiniteInitialRowCount:{},serverSideInitialRowCount:{},suppressServerSideFullWidthLoadingRow:{type:Boolean},cacheBlockSize:{},maxBlocksInCache:{},maxConcurrentDatasourceRequests:{},blockLoadDebounceMillis:{},purgeClosedRowNodes:{type:Boolean},serverSideDatasource:{},serverSideSortAllLevels:{type:Boolean},serverSideEnableClientSideSort:{type:Boolean},serverSideOnlyRefreshFilteredGroups:{type:Boolean},serverSidePivotResultFieldSeparator:{},viewportDatasource:{},viewportRowModelPageSize:{},viewportRowModelBufferSize:{},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:{},rowSelection:{},cellSelection:{type:[Boolean,Object]},rowMultiSelectWithClick:{type:Boolean},suppressRowDeselection:{type:Boolean},suppressRowClickSelection:{type:Boolean},suppressCellFocus:{type:Boolean},suppressHeaderFocus:{type:Boolean},selectionColumnDef:{},rowNumbers:{type:[Boolean,Object]},suppressMultiRangeSelection:{type:Boolean},enableCellTextSelection:{type:Boolean},enableRangeSelection:{type:Boolean},enableRangeHandle:{type:Boolean},enableFillHandle:{type:Boolean},fillHandleDirection:{},suppressClearOnFillReduction:{type:Boolean},sortingOrder:{},accentedSort:{type:Boolean},unSortIcon:{type:Boolean},suppressMultiSort:{type:Boolean},alwaysMultiSort:{type:Boolean},multiSortKey:{},suppressMaintainUnsortedOrder:{type:Boolean},icons:{},rowHeight:{},rowStyle:{},rowClass:{},rowClassRules:{},suppressRowHoverHighlight:{type:Boolean},suppressRowTransform:{type:Boolean},columnHoverHighlight:{type:Boolean},gridId:{},deltaSort:{type:Boolean},treeDataDisplayType:{},enableGroupEdit:{type:Boolean},initialState:{},theme:{},loadThemeGoogleFonts:{type:Boolean},themeCssLayer:{},styleNonce:{},themeStyleContainer:{},getContextMenuItems:{type:Function},getMainMenuItems:{type:Function},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:{type:Function},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},initialGroupOrderComparator:{type:Function},processPivotResultColDef:{type:Function},processPivotResultColGroupDef:{type:Function},getDataPath:{type:Function},getChildCount:{type:Function},getServerSideGroupLevelParams:{type:Function},isServerSideGroupOpenByDefault:{type:Function},isApplyServerSideTransaction:{type:Function},isServerSideGroup:{type:Function},getServerSideGroupKey:{type:Function},getBusinessKeyForNode:{type:Function},getRowId:{type:Function},resetRowDataOnUpdate:{type:Boolean},processRowPostCreate:{type:Function},isRowSelectable:{type:Function},isRowMaster:{type:Function},fillOperation:{type:Function},postSortRows:{type:Function},getRowStyle:{type:Function},getRowClass:{type:Function},getRowHeight:{type:Function},isFullWidthRow:{type:Function},"onTool-panel-visible-changed":{},"onTool-panel-size-changed":{},"onColumn-menu-visible-changed":{},"onContext-menu-visible-changed":{},"onCut-start":{},"onCut-end":{},"onPaste-start":{},"onPaste-end":{},"onColumn-visible":{},"onColumn-pinned":{},"onColumn-resized":{},"onColumn-moved":{},"onColumn-value-changed":{},"onColumn-pivot-mode-changed":{},"onColumn-pivot-changed":{},"onColumn-group-opened":{},"onNew-columns-loaded":{},"onGrid-columns-changed":{},"onDisplayed-columns-changed":{},"onVirtual-columns-changed":{},"onColumn-everything-changed":{},"onColumn-header-mouse-over":{},"onColumn-header-mouse-leave":{},"onColumn-header-clicked":{},"onColumn-header-context-menu":{},"onComponent-state-changed":{},"onCell-value-changed":{},"onCell-edit-request":{},"onRow-value-changed":{},"onCell-editing-started":{},"onCell-editing-stopped":{},"onRow-editing-started":{},"onRow-editing-stopped":{},"onUndo-started":{},"onUndo-ended":{},"onRedo-started":{},"onRedo-ended":{},"onCell-selection-delete-start":{},"onCell-selection-delete-end":{},"onRange-delete-start":{},"onRange-delete-end":{},"onFill-start":{},"onFill-end":{},"onFilter-opened":{},"onFilter-changed":{},"onFilter-modified":{},"onAdvanced-filter-builder-visible-changed":{},"onFind-changed":{},"onChart-created":{},"onChart-range-selection-changed":{},"onChart-options-changed":{},"onChart-destroyed":{},"onCell-key-down":{},"onGrid-ready":{},"onGrid-pre-destroyed":{},"onFirst-data-rendered":{},"onGrid-size-changed":{},"onModel-updated":{},"onVirtual-row-removed":{},"onViewport-changed":{},"onBody-scroll":{},"onBody-scroll-end":{},"onDrag-started":{},"onDrag-stopped":{},"onDrag-cancelled":{},"onState-updated":{},"onPagination-changed":{},"onRow-drag-enter":{},"onRow-drag-move":{},"onRow-drag-leave":{},"onRow-drag-end":{},"onRow-drag-cancel":{},"onColumn-row-group-changed":{},"onRow-group-opened":{},"onExpand-or-collapse-all":{},"onPivot-max-columns-exceeded":{},"onPinned-row-data-changed":{},"onRow-data-updated":{},"onAsync-transactions-flushed":{},"onStore-refreshed":{},"onHeader-focused":{},"onCell-clicked":{},"onCell-double-clicked":{},"onCell-focused":{},"onCell-mouse-over":{},"onCell-mouse-out":{},"onCell-mouse-down":{},"onRow-clicked":{},"onRow-double-clicked":{},"onRow-selected":{},"onSelection-changed":{},"onCell-context-menu":{},"onRange-selection-changed":{},"onCell-selection-changed":{},"onTooltip-show":{},"onTooltip-hide":{},"onSort-changed":{}},jn()),{modelValue:{},modelModifiers:{}}),emits:t.mergeModels(["update:modelValue"],["update:modelValue"]),setup(o,{expose:e,emit:n}){const r=o,a=t.useTemplateRef("root"),i=t.ref(void 0),d=t.ref(!1),l=t.ref(!1),u=t.ref(!1),s=t.ref({}),f=t.ref(null),v=t.toRefs(r);fe._ALL_GRID_OPTIONS.filter(c=>c!="gridOptions").forEach(c=>{t.watch(()=>v[c],(h,S)=>{(c==="rowData"&&!C.value||c!=="rowData")&&P(c,h),C.value=!1},{deep:!0})});const _=new Set(["rowDataUpdated","cellValueChanged","rowValueChanged"]),k=t.useModel(o,"modelValue"),y=t.ref(!1),C=t.ref(!1),m=n;t.watch(k,(c,h)=>{d.value&&(C.value||(y.value=!0,P("rowData",pt(c),pt(h))),C.value=!1)},{deep:!0});const b=Wn(()=>{C.value=!0,m("update:modelValue",W())},10),F=t.getCurrentInstance(),T=c=>{var h,S;u.value&&_.has(c)&&(S=(h=F?.vnode)==null?void 0:h.props)!=null&&S["onUpdate:modelValue"]&&b()},j=()=>k.value||r.rowData||r.gridOptions.rowData,W=()=>{const c=[];return i?.value.forEachLeafNode(h=>{c.push(h.data)}),c},Z=c=>h=>{if(l.value)return;h==="gridReady"&&(u.value=!0);const S=fe.ALWAYS_SYNC_GLOBAL_EVENTS.has(h);S&&!c||!S&&c||_.has(h)&&(y.value||T(h),y.value=!1)},P=(c,h,S)=>{if(d.value){let O=h.value||h;c==="rowData"&&O!=null&&(O=pt(O)),s.value[c]=O,f.value==null&&(f.value=window.setTimeout(()=>{f.value=null,fe._processOnChange(s.value,i.value),s.value={}},0))}},p=()=>Object.create(t.getCurrentInstance().provides);return t.onMounted(()=>{fe.ModuleRegistry.registerModules([fe.RowApiModule]);const c=new Hn(t.getCurrentInstance(),p()),h={globalListener:Z(),globalSyncListener:Z(!0),frameworkOverrides:new zn(t.getCurrentInstance()),providedBeanInstances:{frameworkCompWrapper:c},modules:r.modules},S=t.markRaw(fe._combineAttributesAndGridOptions(pt(r.gridOptions),r,[...fe._ALL_GRID_OPTIONS,...fe._ALL_EVENTS.map(L=>fe._getCallbackForEvent(L))])),O=j();O!==void 0&&(S.rowData=pt(O)),i.value=fe.createGrid(a.value,S,h),d.value=!0}),t.onUnmounted(()=>{var c;d.value&&((c=i?.value)==null||c.destroy(),l.value=!0)}),e({api:i}),(c,h)=>(t.openBlock(),t.createElementBlock("div",Yn,null,512))}});function Et(o){return o&&o.__esModule&&Object.prototype.hasOwnProperty.call(o,"default")?o.default:o}var Nt={exports:{}};/* @license
2
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("vue");var eo=class{constructor(){this.allSyncListeners=new Map,this.allAsyncListeners=new Map,this.globalSyncListeners=new Set,this.globalAsyncListeners=new Set,this.asyncFunctionsQueue=[],this.scheduled=!1,this.firedEvents={}}setFrameworkOverrides(e){this.frameworkOverrides=e}getListeners(e,t,o){const i=t?this.allAsyncListeners:this.allSyncListeners;let s=i.get(e);return!s&&o&&(s=new Set,i.set(e,s)),s}noRegisteredListenersExist(){return this.allSyncListeners.size===0&&this.allAsyncListeners.size===0&&this.globalSyncListeners.size===0&&this.globalAsyncListeners.size===0}addEventListener(e,t,o=!1){this.getListeners(e,o,!0).add(t)}removeEventListener(e,t,o=!1){const i=this.getListeners(e,o,!1);i&&(i.delete(t),i.size===0&&(o?this.allAsyncListeners:this.allSyncListeners).delete(e))}addGlobalListener(e,t=!1){(t?this.globalAsyncListeners:this.globalSyncListeners).add(e)}removeGlobalListener(e,t=!1){(t?this.globalAsyncListeners:this.globalSyncListeners).delete(e)}dispatchEvent(e){const t=e;this.dispatchToListeners(t,!0),this.dispatchToListeners(t,!1),this.firedEvents[t.type]=!0}dispatchEventOnce(e){this.firedEvents[e.type]||this.dispatchEvent(e)}dispatchToListeners(e,t){const o=e.type;if(t&&"event"in e){const a=e.event;a instanceof Event&&(e.eventPath=a.composedPath())}const i=(a,l)=>a.forEach(d=>{if(!l.has(d))return;const c=this.frameworkOverrides?()=>this.frameworkOverrides.wrapIncoming(()=>d(e)):()=>d(e);t?this.dispatchAsync(c):c()}),s=this.getListeners(o,t,!1)??new Set,n=new Set(s);n.size>0&&i(n,s),new Set(t?this.globalAsyncListeners:this.globalSyncListeners).forEach(a=>{const l=this.frameworkOverrides?()=>this.frameworkOverrides.wrapIncoming(()=>a(o,e)):()=>a(o,e);t?this.dispatchAsync(l):l()})}dispatchAsync(e){if(this.asyncFunctionsQueue.push(e),!this.scheduled){const t=()=>{window.setTimeout(this.flushAsyncQueue.bind(this),0)};this.frameworkOverrides?this.frameworkOverrides.wrapIncoming(t):t(),this.scheduled=!0}}flushAsyncQueue(){this.scheduled=!1;const e=this.asyncFunctionsQueue.slice();this.asyncFunctionsQueue=[],e.forEach(t=>t())}};function lp(e,t){return t}function na(e){return e?.getLocaleTextFunc()??lp}function yt(e,t,o){o==null||typeof o=="string"&&o==""?ra(e,t):bt(e,t,o)}function bt(e,t,o){e.setAttribute(Od(t),o.toString())}function ra(e,t){e.removeAttribute(Od(t))}function Od(e){return`aria-${e}`}function qe(e,t){t?e.setAttribute("role",t):e.removeAttribute("role")}function dp(e){let t;return e==="asc"?t="ascending":e==="desc"?t="descending":e==="mixed"?t="other":t="none",t}function cp(e){return parseInt(e.getAttribute("aria-posinset"),10)}function up(e){return e.getAttribute("aria-label")}function ut(e,t){yt(e,"label",t)}function hi(e,t){yt(e,"labelledby",t)}function aa(e,t){yt(e,"describedby",t)}function Bd(e,t){yt(e,"live",t)}function hp(e,t){yt(e,"atomic",t)}function pp(e,t){yt(e,"relevant",t)}function Nd(e,t){yt(e,"level",t)}function Hd(e,t){yt(e,"disabled",t)}function Vd(e,t){yt(e,"hidden",t)}function to(e,t){bt(e,"expanded",t)}function gp(e){ra(e,"expanded")}function _d(e,t){bt(e,"setsize",t)}function zd(e,t){bt(e,"posinset",t)}function fp(e,t){bt(e,"multiselectable",t)}function mp(e,t){bt(e,"rowcount",t)}function Wd(e,t){bt(e,"rowindex",t)}function Cp(e,t){bt(e,"colcount",t)}function Ud(e,t){bt(e,"colindex",t)}function vp(e,t){bt(e,"colspan",t)}function wp(e,t){bt(e,"sort",t)}function Sp(e){ra(e,"sort")}function Tr(e,t){yt(e,"selected",t)}function $d(e,t){bt(e,"checked",t===void 0?"mixed":t)}function yp(e,t){yt(e,"controls",t.id),hi(t,e.id)}function bp(e,t){yt(e,"haspopup",t===!1?null:t)}function jd(e,t){return t===void 0?e("ariaIndeterminate","indeterminate"):t===!0?e("ariaChecked","checked"):e("ariaUnchecked","unchecked")}var Wn,Un,$n,jn,Ir,Lr,Kn;function Dn(){return Wn===void 0&&(Wn=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)),Wn}function la(){return Un===void 0&&(Un=/(firefox)/i.test(navigator.userAgent)),Un}function Kd(){return $n===void 0&&($n=/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)),$n}function ko(){return jn===void 0&&(jn=/iPad|iPhone|iPod/.test(navigator.platform)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1),jn}function nl(e){if(!e)return null;const t=e.tabIndex,o=e.getAttribute("tabIndex");return t===-1&&(o===null||o===""&&!la())?null:t.toString()}function Rp(){if(Kn!==void 0)return Kn;if(!document.body)return-1;let e=1e6;const t=la()?6e6:1e9,o=document.createElement("div");for(document.body.appendChild(o);;){const i=e*2;if(o.style.height=i+"px",i>t||o.clientHeight!==i)break;e=i}return document.body.removeChild(o),Kn=e,e}function Fp(){return Lr==null&&Yd(),Lr}function Yd(){const e=document.body,t=document.createElement("div");t.style.width=t.style.height="100px",t.style.opacity="0",t.style.overflow="scroll",t.style.msOverflowStyle="scrollbar",t.style.position="absolute",e.appendChild(t);let o=t.offsetWidth-t.clientWidth;o===0&&t.clientWidth===0&&(o=null),t.parentNode&&t.parentNode.removeChild(t),o!=null&&(Lr=o,Ir=o===0)}function qd(){return Ir==null&&Yd(),Ir}function rl(e,t,o){const i=e.parentElement;let s=i&&i.firstChild;for(;s;)t&&s.classList.toggle(t,s===e),s=s.nextSibling}var xp="[tabindex], input, select, button, textarea, [href]",Qd="[disabled], .ag-disabled:not(.ag-button), .ag-disabled *";function da(e){const t=Element.prototype.matches||Element.prototype.msMatchesSelector,i=t.call(e,"input, select, button, textarea"),s=t.call(e,Qd),n=ht(e);return i&&!s&&n}function he(e,t,o={}){const{skipAriaHidden:i}=o;e.classList.toggle("ag-hidden",!t),i||Vd(e,!t)}function Dp(e,t,o={}){const{skipAriaHidden:i}=o;e.classList.toggle("ag-invisible",!t),i||Vd(e,!t)}function ca(e,t){const o="disabled",i=t?n=>n.setAttribute(o,""):n=>n.removeAttribute(o);i(e);const s=e.querySelectorAll("input")??[];for(const n of s)i(n)}function Go(e,t,o){let i=0;for(;e;){if(e.classList.contains(t))return!0;if(e=e.parentElement,typeof o=="number"){if(++i>o)break}else if(e===o)break}return!1}function wi(e){const{height:t,width:o,borderTopWidth:i,borderRightWidth:s,borderBottomWidth:n,borderLeftWidth:r,paddingTop:a,paddingRight:l,paddingBottom:d,paddingLeft:c,marginTop:u,marginRight:p,marginBottom:g,marginLeft:f,boxSizing:m}=window.getComputedStyle(e);return{height:parseFloat(t||"0"),width:parseFloat(o||"0"),borderTopWidth:parseFloat(i||"0"),borderRightWidth:parseFloat(s||"0"),borderBottomWidth:parseFloat(n||"0"),borderLeftWidth:parseFloat(r||"0"),paddingTop:parseFloat(a||"0"),paddingRight:parseFloat(l||"0"),paddingBottom:parseFloat(d||"0"),paddingLeft:parseFloat(c||"0"),marginTop:parseFloat(u||"0"),marginRight:parseFloat(p||"0"),marginBottom:parseFloat(g||"0"),marginLeft:parseFloat(f||"0"),boxSizing:m}}function Mn(e){const t=wi(e);return t.boxSizing==="border-box"?t.height-t.paddingTop-t.paddingBottom:t.height}function Qi(e){const t=wi(e);return t.boxSizing==="border-box"?t.width-t.paddingLeft-t.paddingRight:t.width}function Xd(e){const{height:t,marginBottom:o,marginTop:i}=wi(e);return Math.floor(t+o+i)}function en(e){const{width:t,marginLeft:o,marginRight:i}=wi(e);return Math.floor(t+o+i)}function Zd(e){const t=e.getBoundingClientRect(),{borderTopWidth:o,borderLeftWidth:i,borderRightWidth:s,borderBottomWidth:n}=wi(e);return{top:t.top+(o||0),left:t.left+(i||0),right:t.right+(s||0),bottom:t.bottom+(n||0)}}function tn(e,t){let o=e.scrollLeft;return t&&(o=Math.abs(o)),o}function on(e,t,o){o&&(t*=-1),e.scrollLeft=t}function ct(e){for(;e&&e.firstChild;)e.removeChild(e.firstChild)}function Nt(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function Jd(e){return!!e.offsetParent}function ht(e){const t=e;return t.checkVisibility?t.checkVisibility({checkVisibilityCSS:!0}):!(!Jd(e)||window.getComputedStyle(e).visibility!=="visible")}function Pn(e){const t=document.createElement("div");return t.innerHTML=(e||"").trim(),t.firstChild}function ec(e,t,o){o&&o.nextSibling===t||(e.firstChild?o?o.nextSibling?e.insertBefore(t,o.nextSibling):e.appendChild(t):e.firstChild&&e.firstChild!==t&&e.insertAdjacentElement("afterbegin",t):e.appendChild(t))}function tc(e,t){for(let o=0;o<t.length;o++){const i=t[o],s=e.children[o];s!==i&&e.insertBefore(i,s)}}function Mp(e){return e.replace(/[A-Z]/g,t=>`-${t.toLocaleLowerCase()}`)}function ds(e,t){if(t)for(const o of Object.keys(t)){const i=t[o];if(!o||!o.length||i==null)continue;const s=Mp(o),n=i.toString(),r=n.replace(/\s*!important/g,""),a=r.length!=n.length?"important":void 0;e.style.setProperty(s,r,a)}}function Pp(e){return e.clientWidth<e.scrollWidth}function Ep(e){return e.clientHeight<e.scrollHeight}function sn(e,t){t==="flex"?(e.style.removeProperty("width"),e.style.removeProperty("minWidth"),e.style.removeProperty("maxWidth"),e.style.flex="1 1 auto"):_t(e,t)}function _t(e,t){t=ua(t),e.style.width=t,e.style.maxWidth=t,e.style.minWidth=t}function Oi(e,t){t=ua(t),e.style.height=t,e.style.maxHeight=t,e.style.minHeight=t}function ua(e){return typeof e=="number"?`${e}px`:e}function En(e){return e instanceof Node||e instanceof HTMLElement}function oi(e,t,o){o==null||o===""?e.removeAttribute(t):e.setAttribute(t,o.toString())}function bo(e,t,o){const s=hc(e).ResizeObserver,n=s?new s(o):null;return n?.observe(t),()=>n?.disconnect()}function Ap(e){const t=gi(e),o="getSelection"in t?t.getSelection():null,i=[];for(let s=0;s<(o?.rangeCount??0);s++){const n=o?.getRangeAt(s);n&&i.push(n)}return{selection:o,ranges:i}}function oc(e,t){if(!e.gos.get("enableCellTextSelection")||!la()&&!Dn())return t();const{selection:i,ranges:s}=Ap(e);t(),i?.removeAllRanges();for(const n of s)i?.addRange(n)}function Tt(e,t){const o=hc(e);o.requestAnimationFrame?o.requestAnimationFrame(t):o.webkitRequestAnimationFrame?o.webkitRequestAnimationFrame(t):o.setTimeout(t,0)}var ic="data-ref",Yn;function al(){return Yn??(Yn=document.createTextNode(" ")),Yn.cloneNode()}function Pe(e){const{attrs:t,children:o,cls:i,ref:s,role:n,tag:r}=e,a=document.createElement(r);if(i&&(a.className=i),s&&a.setAttribute(ic,s),n&&a.setAttribute("role",n),t)for(const l of Object.keys(t))a.setAttribute(l,t[l]);if(o)if(typeof o=="string")a.textContent=o;else{let l=!0;for(const d of o)d&&(typeof d=="string"?(a.appendChild(document.createTextNode(d)),l=!1):(l&&(a.appendChild(al()),l=!1),a.append(Pe(d)),a.appendChild(al())))}return a}function ot(e){return e==null||e===""?null:e}function j(e){return e!=null&&e!==""}function Me(e){return!j(e)}function Qt(e){return e!=null&&typeof e.toString=="function"?e.toString():null}function Xi(e,t){const o=e?JSON.stringify(e):null,i=t?JSON.stringify(t):null;return o===i}function Gs(e,t,o=!1){const i=e==null,s=t==null;if(e&&e.toNumber&&(e=e.toNumber()),t&&t.toNumber&&(t=t.toNumber()),i&&s)return 0;if(i)return-1;if(s)return 1;function n(r,a){return r>a?1:r<a?-1:0}if(typeof e!="string"||!o)return n(e,t);try{return e.localeCompare(t)}catch{return n(e,t)}}var sc="https://www.ag-grid.com",ll={};function ha(e,t){ll[t]||(e(),ll[t]=!0)}function Zi(e,t,...o){e.get("debug")&&console.log("AG Grid: "+t,...o)}function Bi(e,...t){ha(()=>console.warn("AG Grid: "+e,...t),e+t?.join(""))}function ii(e,...t){ha(()=>console.error("AG Grid: "+e,...t),e+t?.join(""))}var Tp={pending:!1,funcs:[]},Ip={pending:!1,funcs:[]};function kr(e,t="setTimeout",o){const i=t==="raf"?Ip:Tp;if(i.funcs.push(e),i.pending)return;i.pending=!0;const s=()=>{const n=i.funcs.slice();i.funcs.length=0,i.pending=!1,n.forEach(r=>r())};t==="raf"?Tt(o,s):window.setTimeout(s,0)}function tt(e,t,o){let i;return function(...s){const n=this;window.clearTimeout(i),i=window.setTimeout(function(){e.isAlive()&&t.apply(n,s)},o)}}function dl(e,t){let o=0;return function(...i){const s=this,n=Date.now();n-o<t||(o=n,e.apply(s,i))}}function nc(e,t,o=100,i){const s=Date.now();let n=null,r=!1;const a=()=>{const l=Date.now()-s>o;(e()||l)&&(t(),r=!0,n!=null&&(window.clearInterval(n),n=null))};a(),r||(n=window.setInterval(a,10))}var ne="33.2.4",cl=2e3,ul=100,rc="_version_",ac=null,Oo=`${sc}/javascript-data-grid`;function Lp(e){ac=e}function kp(e){Oo=e}function lc(e,t,o){return ac?.getConsoleMessage(e,t)??[Np(e,t,o)]}function pa(e,t,o,i){e(`error #${t}`,...lc(t,o,i))}function Gp(e){if(!e)return String(e);const t={};for(const o of Object.keys(e))typeof e[o]!="object"&&typeof e[o]!="function"&&(t[o]=e[o]);return JSON.stringify(t)}function Op(e){let t=e;return e instanceof Error?t=e.toString():typeof e=="object"&&(t=Gp(e)),t}function nn(e){return e===void 0?"undefined":e===null?"null":e}function Gr(e,t){return`${e}?${t.toString()}`}function Bp(e,t,o){const i=Array.from(t.entries()).sort((n,r)=>r[1].length-n[1].length);let s=Gr(e,t);for(const[n,r]of i){if(n===rc)continue;const a=s.length-o;if(a<=0)break;const l="...",d=a+l.length,c=r.length-d>ul?r.slice(0,r.length-d)+l:r.slice(0,ul)+l;t.set(n,c),s=Gr(e,t)}return s}function dc(e,t){const o=new URLSearchParams;if(o.append(rc,ne),t)for(const n of Object.keys(t))o.append(n,Op(t[n]));const i=`${Oo}/errors/${e}`,s=Gr(i,o);return s.length<=cl?s:Bp(i,o,cl)}var Np=(e,t,o)=>{const i=dc(e,t);return`${o?o+`
3
+ `:""}Visit ${i}${o?"":`
4
+ Alternatively register the ValidationModule to see the full message in the console.`}`};function _(...e){pa(Bi,e[0],e[1])}function ae(...e){pa(ii,e[0],e[1])}function Or(e,t,o){pa(ii,e,t,o)}function Hp(e,t){const o=t[0];return`error #${o} `+lc(o,t[1],e).join(" ")}function wo(...e){return Hp(void 0,e)}function cc(e,t){return e.get("rowModelType")===t}function Lt(e,t){return cc(e,"clientSide")}function pt(e,t){return cc(e,"serverSide")}function We(e,t){return e.get("domLayout")===t}function Ht(e){return an(e)!==void 0}function ga(e){return typeof e.get("getRowHeight")=="function"}function Vp(e,t){return t?!e.get("enableStrictPivotColumnOrder"):e.get("maintainColumnOrder")}function vt(e,t,o=!1,i){const{gos:s,environment:n}=e;if(i==null&&(i=n.getDefaultRowHeight()),ga(s)){if(o)return{height:i,estimated:!0};const l={node:t,data:t.data},d=s.getCallback("getRowHeight")(l);if(Br(d))return d===0&&_(23),{height:Math.max(1,d),estimated:!1}}if(t.detail&&s.get("masterDetail"))return _p(s);const r=s.get("rowHeight");return{height:r&&Br(r)?r:i,estimated:!1}}function _p(e){if(e.get("detailRowAutoHeight"))return{height:1,estimated:!1};const t=e.get("detailRowHeight");return Br(t)?{height:t,estimated:!1}:{height:300,estimated:!1}}function So(e){const{environment:t,gos:o}=e,i=o.get("rowHeight");if(!i||Me(i))return t.getDefaultRowHeight();const s=t.refreshRowHeightVariable();return s!==-1?s:(_(24),t.getDefaultRowHeight())}function Br(e){return!isNaN(e)&&typeof e=="number"&&isFinite(e)}function uc(e,t,o){const i=t[e.getDomDataKey()];return i?i[o]:void 0}function pi(e,t,o,i){const s=e.getDomDataKey();let n=t[s];Me(n)&&(n={},t[s]=n),n[o]=i}function Le(e){const{gos:t,eGridDiv:o}=e;let i=null;const s=t.get("getDocument");return s&&j(s)?i=s():o&&(i=o.ownerDocument),i&&j(i)?i:document}function hc(e){return Le(e).defaultView||window}function gi(e){return e.eGridDiv.getRootNode()}function Ee(e){return gi(e).activeElement}function fa(e){let t=null,o=null;try{t=Le(e).fullscreenElement}catch{}finally{t||(t=gi(e));const i=t.querySelector("body");i?o=i:t instanceof ShadowRoot?o=t:t instanceof Document?o=t?.documentElement:o=t}return o}function zp(e){return fa(e)?.clientWidth??(window.innerHeight||-1)}function Wp(e){return fa(e)?.clientHeight??(window.innerHeight||-1)}function Up(e,t,o){const s=e.getBoundingClientRect().height,n=zp(o)-2,r=Wp(o)-2;if(!e.offsetParent)return;const l=Zd(e.offsetParent),{clientY:d,clientX:c}=t;let u=d-l.top-s/2,p=c-l.left-10;const g=Le(o),f=g.defaultView||window,m=f.pageYOffset||g.documentElement.scrollTop,C=f.pageXOffset||g.documentElement.scrollLeft;n>0&&p+e.clientWidth>n+C&&(p=n+C-e.clientWidth),p<0&&(p=0),r>0&&u+e.clientHeight>r+m&&(u=r+m-e.clientHeight),u<0&&(u=0),e.style.left=`${p}px`,e.style.top=`${u}px`}function rn(e){const t=Le(e),o=Ee(e);return o===null||o===t.body}function si(e){return e.get("ensureDomOrder")?!1:e.get("animateRows")}function An(e){return!(e.get("paginateChildRows")||e.get("groupHideOpenParents")||We(e,"print"))}function Mt(e){return!e.get("autoGroupColumnDef")?.comparator&&!e.get("treeData")}function Ji(e){const t=e.get("groupAggFiltering");if(typeof t=="function")return e.getCallback("groupAggFiltering");if(t===!0)return()=>!0}function ma(e){return e.get("grandTotalRow")}function fi(e){const t=e.get("groupTotalRow");return typeof t=="function"?e.getCallback("groupTotalRow"):()=>t??void 0}function Ca(e){return e.get("groupHideOpenParents")?!0:e.get("groupDisplayType")==="multipleColumns"}function Tn(e,t){return t?!1:e.get("groupDisplayType")==="groupRows"}function es(e){const t=e.getCallback("getRowId");return t===void 0?t:o=>{let i=t(o);return typeof i!="string"&&(_(25,{id:i}),i=String(i)),i}}function $p(e,t){const o=e.get("groupHideParentOfSingleChild");return!!(o===!0||o==="leafGroupsOnly"&&t.leafGroup||e.get("groupRemoveSingleChildren")||e.get("groupRemoveLowestSingleChildren")&&t.leafGroup)}function jp(e){const t=e.get("maxConcurrentDatasourceRequests");return t>0?t:void 0}function Kp(e,t){const o=e.get("suppressGroupChangesColumnVisibility");if(o===!0||t&&o==="suppressHideOnGroup"||!t&&o==="suppressShowOnUngroup")return!1;const i=e.get("suppressRowGroupHidesColumns");if(t&&i===!0)return!1;const s=e.get("suppressMakeColumnVisibleAfterUnGroup");return!(!t&&s===!0)}function Bo(e){return e?.checkboxes??!0}function Os(e){return e?.mode==="multiRow"&&(e.headerCheckbox??!0)}function ts(e){if(typeof e=="object")return e.checkboxLocation??"selectionColumn"}function qn(e){return e?.hideDisabledCheckboxes??!1}function pc(e){return typeof e.get("rowSelection")!="string"}function zo(e){const t=e.get("cellSelection");return t!==void 0?!!t:e.get("enableRangeSelection")}function gc(e){const t=e.get("rowSelection")??"single";if(typeof t=="string"){const o=e.get("suppressRowClickSelection"),i=e.get("suppressRowDeselection");return o&&i?!1:o?"enableDeselection":i?"enableSelection":!0}return t.mode==="singleRow"||t.mode==="multiRow"?t.enableClickSelection??!1:!1}function Yp(e){const t=gc(e);return t===!0||t==="enableSelection"}function qp(e){const t=gc(e);return t===!0||t==="enableDeselection"}function Nr(e){const t=e.get("rowSelection");return typeof t=="string"?e.get("isRowSelectable"):t?.isRowSelectable}function an(e){const t="beanName"in e&&e.beanName==="gos"?e.get("rowSelection"):e.rowSelection;if(typeof t=="string")switch(t){case"multiple":return"multiRow";case"single":return"singleRow";default:return}switch(t?.mode){case"multiRow":case"singleRow":return t.mode;default:return}}function Wo(e){return an(e)==="multiRow"}function Qp(e){const t=e.get("rowSelection");return typeof t=="string"?e.get("rowMultiSelectWithClick"):t?.enableSelectionWithoutKeys??!1}function fc(e){const t=e.get("rowSelection");if(typeof t=="string"){const o=e.get("groupSelectsChildren"),i=e.get("groupSelectsFiltered");return o&&i?"filteredDescendants":o?"descendants":"self"}return t?.mode==="multiRow"?t.groupSelects:void 0}function mc(e,t=!0){const o=e.get("rowSelection");return typeof o!="object"?t?"all":void 0:o.mode==="multiRow"?o.selectAll:"all"}function os(e){const t=fc(e);return t==="descendants"||t==="filteredDescendants"}function Qn(e){return e.isModuleRegistered("SetFilter")&&!e.get("suppressSetFilterByDefault")}function Ve(e){return e.get("columnMenu")==="legacy"}function Cc(e){return!Ve(e)}function va(e){return!e||e.length<2?e:"on"+e[0].toUpperCase()+e.substring(1)}function Xp(e,t,o){typeof e!="object"&&(e={});const i={...e};return o.forEach(s=>{const n=t[s];typeof n<"u"&&(i[s]=n)}),i}function Zp(e,t){if(!e)return;const o={};let i=!1;if(Object.keys(e).forEach(r=>{o[r]=e[r],i=!0}),!i)return;const s={type:"gridOptionsChanged",options:o};t.dispatchEvent(s);const n={type:"componentStateChanged",...o};t.dispatchEvent(n)}function Z(e,t){return e.addGridCommonParams(t)}function vc(e){return e.get("treeData")?e.get("treeDataParentIdField")?"treeSelfRef":e.get("treeDataChildrenField")?"treeNested":"treePath":"group"}var wc="__ag_Grid_Stop_Propagation",Jp=["touchstart","touchend","touchmove","touchcancel","scroll"],eg=["wheel"],Xn={};function oo(e){e[wc]=!0}function Et(e){return e[wc]===!0}var Sc=(()=>{const e={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return o=>{if(typeof Xn[o]=="boolean")return Xn[o];const i=document.createElement(e[o]||"div");return o="on"+o,Xn[o]=o in i}})();function yc(e,t,o){let i=t;for(;i;){const s=uc(e,i,o);if(s)return s;i=i.parentElement}return null}function Hr(e,t){return!t||!e?!1:og(t).indexOf(e)>=0}function tg(e){const t=[];let o=e.target;for(;o;)t.push(o),o=o.parentElement;return t}function og(e){const t=e;return t.path?t.path:t.composedPath?t.composedPath():tg(t)}function ig(e,t,o,i){const s=bc(o);let n;s!=null&&(n={passive:s}),e&&e.addEventListener&&e.addEventListener(t,o,i,n)}var bc=e=>{const t=Jp.includes(e),o=eg.includes(e);if(t)return!0;if(o)return!1},M=class{constructor(){this.destroyFunctions=[],this.destroyed=!1,this.__v_skip=!0,this.propertyListenerId=0,this.lastChangeSetIdLookup={},this.isAlive=()=>!this.destroyed}preWireBeans(e){this.beans=e,this.stubContext=e.context,this.eventSvc=e.eventSvc,this.gos=e.gos}destroy(){const{destroyFunctions:e}=this;for(let t=0;t<e.length;t++)e[t]();e.length=0,this.destroyed=!0,this.dispatchLocalEvent({type:"destroyed"})}addEventListener(e,t,o){this.localEventService||(this.localEventService=new eo),this.localEventService.addEventListener(e,t,o)}removeEventListener(e,t,o){this.localEventService?.removeEventListener(e,t,o)}dispatchLocalEvent(e){this.localEventService?.dispatchEvent(e)}addManagedElementListeners(e,t){return this._setupListeners(e,t)}addManagedEventListeners(e){return this._setupListeners(this.eventSvc,e)}addManagedListeners(e,t){return this._setupListeners(e,t)}_setupListeners(e,t){const o=[];for(const i of Object.keys(t)){const s=t[i];s&&o.push(this._setupListener(e,i,s))}return o}_setupListener(e,t,o){if(this.destroyed)return()=>null;let i;return sg(e)?(e.__addEventListener(t,o),i=()=>(e.__removeEventListener(t,o),null)):(e instanceof HTMLElement?ig(this.beans.frameworkOverrides,e,t,o):e.addEventListener(t,o),i=()=>(e.removeEventListener(t,o),null)),this.destroyFunctions.push(i),()=>(i(),this.destroyFunctions=this.destroyFunctions.filter(s=>s!==i),null)}setupGridOptionListener(e,t){const{gos:o}=this;o.addPropertyEventListener(e,t);const i=()=>(o.removePropertyEventListener(e,t),null);return this.destroyFunctions.push(i),()=>(i(),this.destroyFunctions=this.destroyFunctions.filter(s=>s!==i),null)}addManagedPropertyListener(e,t){return this.destroyed?()=>null:this.setupGridOptionListener(e,t)}addManagedPropertyListeners(e,t){if(this.destroyed)return;const o=e.join("-")+this.propertyListenerId++,i=s=>{if(s.changeSet){if(s.changeSet&&s.changeSet.id===this.lastChangeSetIdLookup[o])return;this.lastChangeSetIdLookup[o]=s.changeSet.id}const n={type:"gridPropertyChanged",changeSet:s.changeSet,source:s.source};t(n)};e.forEach(s=>this.setupGridOptionListener(s,i))}getLocaleTextFunc(){return na(this.beans.localeSvc)}addDestroyFunc(e){this.isAlive()?this.destroyFunctions.push(e):e()}createOptionalManagedBean(e,t){return e?this.createManagedBean(e,t):void 0}createManagedBean(e,t){const o=this.createBean(e,t);return this.addDestroyFunc(this.destroyBean.bind(this,e,t)),o}createBean(e,t,o){return(t||this.stubContext).createBean(e,o)}destroyBean(e,t){return(t||this.stubContext).destroyBean(e)}destroyBeans(e,t){return(t||this.stubContext).destroyBeans(e)}};function sg(e){return e.__addEventListener!==void 0}var Rc=new Set(["__proto__","constructor","prototype"]);function ng(e,t){if(e!=null){if(Array.isArray(e)){for(let o=0;o<e.length;o++)t(o.toString(),e[o]);return}for(const o of Object.keys(e))t(o,e[o])}}function Ue(e,t,o=!0,i=!1){j(t)&&ng(t,(s,n)=>{if(Rc.has(s))return;let r=e[s];r!==n&&(i&&r==null&&n!=null&&typeof n=="object"&&n.constructor===Object&&(r={},e[s]=r),hl(n)&&hl(r)&&!Array.isArray(r)?Ue(r,n,o,i):(o||n!==void 0)&&(e[s]=n))})}function Ni(e,t,o){if(!t||!e)return;if(!o)return e[t];const i=t.split(".");let s=e;for(let n=0;n<i.length;n++){if(s==null)return;s=s[i[n]]}return s}function hl(e){return typeof e=="object"&&e!==null}var rg=/[&<>"']/g,ag={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function St(e,t){if(e==null)return null;const o=e.toString().toString();return t?o:o.replace(rg,i=>ag[i])}var lg={resizable:!0,sortable:!0},dg=0;function Fc(){return dg++}function Ut(e){return e instanceof In}var In=class extends M{constructor(e,t,o,i){super(),this.colDef=e,this.userProvidedColDef=t,this.colId=o,this.primary=i,this.isColumn=!0,this.instanceId=Fc(),this.autoHeaderHeight=null,this.moving=!1,this.menuVisible=!1,this.lastLeftPinned=!1,this.firstRightPinned=!1,this.filterActive=!1,this.colEventSvc=new eo,this.tooltipEnabled=!1,this.rowGroupActive=!1,this.pivotActive=!1,this.aggregationActive=!1,this.flex=null,this.colIdSanitised=St(o)}destroy(){super.destroy(),this.beans.rowSpanSvc?.deregister(this)}getInstanceId(){return this.instanceId}setState(){const{colDef:e,beans:{sortSvc:t,pinnedCols:o,colFlex:i}}=this;t?.initCol(this);const s=e.hide;s!==void 0?this.visible=!s:this.visible=!e.initialHide,o?.initCol(this),i?.initCol(this)}setColDef(e,t,o){const i=e.spanRows!==this.colDef.spanRows;this.colDef=e,this.userProvidedColDef=t,this.initMinAndMaxWidths(),this.initDotNotation(),this.initTooltip(),i&&(this.beans.rowSpanSvc?.deregister(this),this.initRowSpan()),this.dispatchColEvent("colDefChanged",o)}getUserProvidedColDef(){return this.userProvidedColDef}getParent(){return this.parent}getOriginalParent(){return this.originalParent}postConstruct(){this.setState(),this.initMinAndMaxWidths(),this.resetActualWidth("gridInitializing"),this.initDotNotation(),this.initTooltip(),this.initRowSpan()}initDotNotation(){const{gos:e,colDef:{field:t,tooltipField:o}}=this,i=e.get("suppressFieldDotNotation");this.fieldContainsDots=j(t)&&t.indexOf(".")>=0&&!i,this.tooltipFieldContainsDots=j(o)&&o.indexOf(".")>=0&&!i}initMinAndMaxWidths(){const e=this.colDef;this.minWidth=e.minWidth??this.beans.environment.getDefaultColumnMinWidth(),this.maxWidth=e.maxWidth??Number.MAX_SAFE_INTEGER}initTooltip(){this.beans.tooltipSvc?.initCol(this)}initRowSpan(){this.colDef.spanRows&&this.beans.rowSpanSvc?.register(this)}resetActualWidth(e){const t=this.calculateColInitialWidth(this.colDef);this.setActualWidth(t,e,!0)}calculateColInitialWidth(e){let t;const o=e.width,i=e.initialWidth;return o!=null?t=o:i!=null?t=i:t=200,Math.max(Math.min(t,this.maxWidth),this.minWidth)}isEmptyGroup(){return!1}isRowGroupDisplayed(e){return this.beans.showRowGroupCols?.isRowGroupDisplayed(this,e)??!1}isPrimary(){return this.primary}isFilterAllowed(){return!!this.colDef.filter}isFieldContainsDots(){return this.fieldContainsDots}isTooltipEnabled(){return this.tooltipEnabled}isTooltipFieldContainsDots(){return this.tooltipFieldContainsDots}getHighlighted(){return this.highlighted}__addEventListener(e,t){this.colEventSvc.addEventListener(e,t)}__removeEventListener(e,t){this.colEventSvc.removeEventListener(e,t)}addEventListener(e,t){this.frameworkEventListenerService=this.beans.frameworkOverrides.createLocalEventListenerWrapper?.(this.frameworkEventListenerService,this.colEventSvc);const o=this.frameworkEventListenerService?.wrap(t)??t;this.colEventSvc.addEventListener(e,o)}removeEventListener(e,t){const o=this.frameworkEventListenerService?.unwrap(t)??t;this.colEventSvc.removeEventListener(e,o)}createColumnFunctionCallbackParams(e){return Z(this.gos,{node:e,data:e.data,column:this,colDef:this.colDef})}isSuppressNavigable(e){return this.beans.cellNavigation?.isSuppressNavigable(this,e)??!1}isCellEditable(e){return this.beans.editSvc?.isCellEditable(this,e)??!1}isSuppressFillHandle(){return!!this.colDef.suppressFillHandle}isAutoHeight(){return!!this.colDef.autoHeight}isAutoHeaderHeight(){return!!this.colDef.autoHeaderHeight}isRowDrag(e){return this.isColumnFunc(e,this.colDef.rowDrag)}isDndSource(e){return this.isColumnFunc(e,this.colDef.dndSource)}isCellCheckboxSelection(e){return this.beans.selectionSvc?.isCellCheckboxSelection(this,e)??!1}isSuppressPaste(e){return this.isColumnFunc(e,this.colDef?.suppressPaste??null)}isResizable(){return!!this.getColDefValue("resizable")}getColDefValue(e){return this.colDef[e]??lg[e]}isColumnFunc(e,t){if(typeof t=="boolean")return t;if(typeof t=="function"){const o=this.createColumnFunctionCallbackParams(e);return t(o)}return!1}createColumnEvent(e,t){return Z(this.gos,{type:e,column:this,columns:[this],source:t})}isMoving(){return this.moving}getSort(){return this.sort}isSortable(){return!!this.getColDefValue("sortable")}isSortAscending(){return this.sort==="asc"}isSortDescending(){return this.sort==="desc"}isSortNone(){return Me(this.sort)}isSorting(){return j(this.sort)}getSortIndex(){return this.sortIndex}isMenuVisible(){return this.menuVisible}getAggFunc(){return this.aggFunc}getLeft(){return this.left}getOldLeft(){return this.oldLeft}getRight(){return this.left+this.actualWidth}setLeft(e,t){this.oldLeft=this.left,this.left!==e&&(this.left=e,this.dispatchColEvent("leftChanged",t))}isFilterActive(){return this.filterActive}isHovered(){return _(261),!!this.beans.colHover?.isHovered(this)}setFirstRightPinned(e,t){this.firstRightPinned!==e&&(this.firstRightPinned=e,this.dispatchColEvent("firstRightPinnedChanged",t))}setLastLeftPinned(e,t){this.lastLeftPinned!==e&&(this.lastLeftPinned=e,this.dispatchColEvent("lastLeftPinnedChanged",t))}isFirstRightPinned(){return this.firstRightPinned}isLastLeftPinned(){return this.lastLeftPinned}isPinned(){return this.pinned==="left"||this.pinned==="right"}isPinnedLeft(){return this.pinned==="left"}isPinnedRight(){return this.pinned==="right"}getPinned(){return this.pinned}setVisible(e,t){const o=e===!0;this.visible!==o&&(this.visible=o,this.dispatchColEvent("visibleChanged",t)),this.dispatchStateUpdatedEvent("hide")}isVisible(){return this.visible}isSpanHeaderHeight(){return!this.getColDef().suppressSpanHeaderHeight}getColumnGroupPaddingInfo(){let e=this.getParent();if(!e||!e.isPadding())return{numberOfParents:0,isSpanningTotal:!1};const t=e.getPaddingLevel()+1;let o=!0;for(;e;){if(!e.isPadding()){o=!1;break}e=e.getParent()}return{numberOfParents:t,isSpanningTotal:o}}getColDef(){return this.colDef}getDefinition(){return this.colDef}getColumnGroupShow(){return this.colDef.columnGroupShow}getColId(){return this.colId}getId(){return this.colId}getUniqueId(){return this.colId}getActualWidth(){return this.actualWidth}getAutoHeaderHeight(){return this.autoHeaderHeight}setAutoHeaderHeight(e){const t=e!==this.autoHeaderHeight;return this.autoHeaderHeight=e,t}createBaseColDefParams(e){return Z(this.gos,{node:e,data:e.data,colDef:this.colDef,column:this})}getColSpan(e){if(Me(this.colDef.colSpan))return 1;const t=this.createBaseColDefParams(e),o=this.colDef.colSpan(t);return Math.max(o,1)}getRowSpan(e){if(Me(this.colDef.rowSpan))return 1;const t=this.createBaseColDefParams(e),o=this.colDef.rowSpan(t);return Math.max(o,1)}setActualWidth(e,t,o=!1){e=Math.max(e,this.minWidth),e=Math.min(e,this.maxWidth),this.actualWidth!==e&&(this.actualWidth=e,this.flex!=null&&t!=="flex"&&t!=="gridInitializing"&&(this.flex=null),o||this.fireColumnWidthChangedEvent(t)),this.dispatchStateUpdatedEvent("width")}fireColumnWidthChangedEvent(e){this.dispatchColEvent("widthChanged",e)}isGreaterThanMax(e){return e>this.maxWidth}getMinWidth(){return this.minWidth}getMaxWidth(){return this.maxWidth}getFlex(){return this.flex}isRowGroupActive(){return this.rowGroupActive}isPivotActive(){return this.pivotActive}isAnyFunctionActive(){return this.isPivotActive()||this.isRowGroupActive()||this.isValueActive()}isAnyFunctionAllowed(){return this.isAllowPivot()||this.isAllowRowGroup()||this.isAllowValue()}isValueActive(){return this.aggregationActive}isAllowPivot(){return this.colDef.enablePivot===!0}isAllowValue(){return this.colDef.enableValue===!0}isAllowRowGroup(){return this.colDef.enableRowGroup===!0}dispatchColEvent(e,t,o){const i=this.createColumnEvent(e,t);o&&Ue(i,o),this.colEventSvc.dispatchEvent(i)}dispatchStateUpdatedEvent(e){this.colEventSvc.dispatchEvent({type:"columnStateUpdated",key:e})}};function Be(e){return e instanceof Hi}var Hi=class extends M{constructor(e,t,o,i){super(),this.colGroupDef=e,this.groupId=t,this.padding=o,this.level=i,this.isColumn=!1,this.expandable=!1,this.instanceId=Fc(),this.expandableListenerRemoveCallback=null,this.expanded=!!e?.openByDefault}destroy(){this.expandableListenerRemoveCallback&&this.reset(null,void 0),super.destroy()}reset(e,t){this.colGroupDef=e,this.level=t,this.originalParent=null,this.expandableListenerRemoveCallback&&this.expandableListenerRemoveCallback(),this.children=void 0,this.expandable=void 0}getInstanceId(){return this.instanceId}getOriginalParent(){return this.originalParent}getLevel(){return this.level}isVisible(){return this.children?this.children.some(e=>e.isVisible()):!1}isPadding(){return this.padding}setExpanded(e){this.expanded=e===void 0?!1:e,this.dispatchLocalEvent({type:"expandedChanged"})}isExpandable(){return this.expandable}isExpanded(){return this.expanded}getGroupId(){return this.groupId}getId(){return this.getGroupId()}setChildren(e){this.children=e}getChildren(){return this.children}getColGroupDef(){return this.colGroupDef}getLeafColumns(){const e=[];return this.addLeafColumns(e),e}addLeafColumns(e){this.children&&this.children.forEach(t=>{Ut(t)?e.push(t):Be(t)&&t.addLeafColumns(e)})}getColumnGroupShow(){const e=this.colGroupDef;if(e)return e.columnGroupShow}setupExpandable(){this.setExpandable(),this.expandableListenerRemoveCallback&&this.expandableListenerRemoveCallback();const e=this.onColumnVisibilityChanged.bind(this);this.getLeafColumns().forEach(t=>t.__addEventListener("visibleChanged",e)),this.expandableListenerRemoveCallback=()=>{this.getLeafColumns().forEach(t=>t.__removeEventListener("visibleChanged",e)),this.expandableListenerRemoveCallback=null}}setExpandable(){if(this.isPadding())return;let e=!1,t=!1,o=!1;const i=this.findChildrenRemovingPadding();for(let n=0,r=i.length;n<r;n++){const a=i[n];if(!a.isVisible())continue;const l=a.getColumnGroupShow();l==="open"?(e=!0,o=!0):l==="closed"?(t=!0,o=!0):(e=!0,t=!0)}const s=e&&t&&o;this.expandable!==s&&(this.expandable=s,this.dispatchLocalEvent({type:"expandableChanged"}))}findChildrenRemovingPadding(){const e=[],t=o=>{o.forEach(i=>{Be(i)&&i.isPadding()?t(i.children):e.push(i)})};return t(this.children),e}onColumnVisibilityChanged(){this.setExpandable()}},cg={numericColumn:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"},rightAligned:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"}},ug=class{constructor(){this.existingKeys={}}addExistingKeys(e){for(let t=0;t<e.length;t++)this.existingKeys[e[t]]=!0}getUniqueKey(e,t){e=Qt(e);let o=0;for(;;){let i=e??t;if(i?o!==0&&(i+="_"+o):i=o,!this.existingKeys[i])return this.existingKeys[i]=!0,String(i);o++}}},Vr=Object.freeze([]);function ve(e){if(e?.length)return e[e.length-1]}function At(e,t,o){return e==null&&t==null?!0:e!=null&&t!=null&&e.length===t.length&&e.every((i,s)=>o?o(i,t[s]):t[s]===i)}function ms(e,t){if(e)for(const o of e)t(o)}function st(e,t){const o=e.indexOf(t);o>=0&&e.splice(o,1)}function pl(e,t,o){for(let i=0;i<t.length;i++)st(e,t[i]);for(let i=t.length-1;i>=0;i--)e.splice(o,0,t[i])}var Uo="ag-Grid-AutoColumn",xc="ag-Grid-SelectionColumn",hg="ag-Grid-RowNumbersColumn";function wa(e){const t=[],o=i=>{for(let s=0;s<i.length;s++){const n=i[s];Ut(n)?t.push(n):Be(n)&&o(n.getChildren())}};return o(e),t}function Ko(e){return e.reduce((t,o)=>t+o.getActualWidth(),0)}function yo(e,t,o){const i={};if(!t)return;Xt(null,t,n=>{i[n.getInstanceId()]=n}),o&&Xt(null,o,n=>{i[n.getInstanceId()]=null});const s=Object.values(i).filter(n=>n!=null);e.context.destroyBeans(s)}function Ln(e){return e.getId().startsWith(Uo)}function io(e){return(typeof e=="string"?e:"getColId"in e?e.getColId():e.colId)?.startsWith(xc)??!1}function is(e){return(typeof e=="string"?e:"getColId"in e?e.getColId():e.colId)?.startsWith(hg)??!1}function ln(e){let t=[];return e instanceof Array?t=e:typeof e=="string"&&(t=e.split(",")),t}function Dc(e,t){return At(e,t,(o,i)=>o.getColId()===i.getColId())}function Mc(e){e.map={},e.list.forEach(t=>e.map[t.getId()]=t)}function No(e){return e==="gridOptionsUpdated"?"gridOptionsChanged":e}function Sa(e,t){const o=e===t,i=e.getColDef()===t,s=e.getColId()==t;return o||i||s}var pg=(e,t)=>(o,i)=>{const s={value1:void 0,value2:void 0};let n=!1;return e&&(e[o]!==void 0&&(s.value1=e[o],n=!0),j(i)&&e[i]!==void 0&&(s.value2=e[i],n=!0)),!n&&t&&(t[o]!==void 0&&(s.value1=t[o]),j(i)&&t[i]!==void 0&&(s.value2=t[i])),s};function Pc(e,t=null,o,i,s){const n=new ug,{existingCols:r,existingGroups:a,existingColKeys:l}=gg(i);n.addExistingKeys(l);const d=Ec(e,t,0,o,r,n,a,s),{colGroupSvc:c}=e,u=c?.findMaxDepth(d,0)??0,p=c?c.balanceColumnTree(d,0,u,n):d;return Xt(null,p,(f,m)=>{Be(f)&&f.setupExpandable(),f.originalParent=m}),{columnTree:p,treeDept:u}}function gg(e){const t=[],o=[],i=[];return e&&Xt(null,e,s=>{if(Be(s)){const n=s;o.push(n)}else{const n=s;i.push(n.getId()),t.push(n)}}),{existingCols:t,existingGroups:o,existingColKeys:i}}function Ec(e,t,o,i,s,n,r,a){if(!t)return[];const{colGroupSvc:l}=e,d=new Array(t.length);for(let c=0;c<d.length;c++){const u=t[c];l&&Sg(u)?d[c]=l.createProvidedColumnGroup(i,u,o,s,n,r,a):d[c]=fg(e,i,u,s,n,a)}return d}function fg(e,t,o,i,s,n){const r=Cg(o,i);r&&i?.splice(r.idx,1);let a=r?.column;if(a){const l=dn(e,o,a.getColId());a.setColDef(l,o,n),mg(e,a,l,n)}else{const l=s.getUniqueKey(o.colId,o.field),d=dn(e,o,l);a=new In(d,o,l,t),e.context.createBean(a)}return e.dataTypeSvc?.addColumnListeners(a),a}function Ac(e,t,o,i,s,n,r,a){const{sortSvc:l,pinnedCols:d,colFlex:c}=e;o!==void 0&&t.setVisible(!o,a),l&&(l.updateColSort(t,i,a),s!==void 0&&l.setColSortIndex(t,s)),n!==void 0&&d?.setColPinned(t,n),r!==void 0&&c?.setColFlex(t,r)}function mg(e,t,o,i){Ac(e,t,o.hide,o.sort,o.sortIndex,o.pinned,o.flex,i);const s=t.getFlex();if(!(s!=null&&s>0))if(o.width!=null)t.setActualWidth(o.width,i);else{const n=t.getActualWidth();t.setActualWidth(n,i)}}function Cg(e,t){if(t)for(let o=0;o<t.length;o++){const i=t[o].getUserProvidedColDef();if(!i)continue;if(e.colId!=null){if(t[o].getId()===e.colId)return{idx:o,column:t[o]};continue}if(e.field!=null){if(i.field===e.field)return{idx:o,column:t[o]};continue}if(i===e)return{idx:o,column:t[o]}}}function dn(e,t,o,i){const{gos:s,dataTypeSvc:n,validation:r}=e,a={},l=s.get("defaultColDef");Ue(a,l,!1,!0);const d=vg(e,a,t,o);d&&wg(e,d,a),Ue(a,t,!1,!0);const c=s.get("autoGroupColumnDef"),u=Mt(s);return t.rowGroup&&c&&u&&Ue(a,{sort:c.sort,initialSort:c.initialSort},!1,!0),n?.validateColDef(a),r?.validateColDef(a,o,i),a}function vg(e,t,o,i){const s=e.dataTypeSvc?.updateColDefAndGetColumnType(t,o,i),n=o.type??s??t.type;return t.type=n,n?ln(n):void 0}function wg(e,t,o){if(!t.length)return;const i=Object.assign({},cg),s=e.gos.get("columnTypes")||{};for(const n of Object.keys(s)){const r=s[n];n in i?_(34,{key:n}):(r.type&&_(35),i[n]=r)}t.forEach(n=>{const r=i[n.trim()];r?Ue(o,r,!1,!0):_(36,{t:n})})}function Sg(e){return e.children!==void 0}function Xt(e,t,o){if(t)for(let i=0;i<t.length;i++){const s=t[i];Be(s)&&Xt(s,s.getChildren(),o),o(s,e)}}function Tc(e,t){const o=[],i=[],s=[];return e.forEach(r=>{const a=r.getColDef().lockPosition;a==="right"?s.push(r):a==="left"||a===!0?o.push(r):i.push(r)}),t.get("enableRtl")?[...s,...i,...o]:[...o,...i,...s]}function Ic(e,t){let o=!0;return Xt(null,t,i=>{if(!Be(i))return;const s=i,n=s.getColGroupDef();if(!(n&&n.marryChildren))return;const a=[];s.getLeafColumns().forEach(p=>{const g=e.indexOf(p);a.push(g)});const l=Math.max.apply(Math,a),d=Math.min.apply(Math,a),c=l-d,u=s.getLeafColumns().length-1;c>u&&(o=!1)}),o}function Lc(e,t){if(!e||e.length==0)return;const o=t(e[0]);for(let i=1;i<e.length;i++)if(o!==t(e[i]))return;return o}function kc(e,t,o){if(!t.length)return;const i=t.length===1?t[0]:null,s=Lc(t,n=>n.getPinned());e.dispatchEvent({type:"columnPinned",pinned:s??null,columns:t,column:i,source:o})}function yg(e,t,o){if(!t.length)return;const i=t.length===1?t[0]:null,s=Lc(t,n=>n.isVisible());e.dispatchEvent({type:"columnVisible",visible:s,columns:t,column:i,source:o})}function Gc(e,t,o,i){e.dispatchEvent({type:t,columns:o,column:o&&o.length==1?o[0]:null,source:i})}function cn(e,t,o,i,s=null){t?.length&&e.dispatchEvent({type:"columnResized",columns:t,column:t.length===1?t[0]:null,flexColumns:s,finished:o,source:i})}function it(e,t,o){const{colModel:i,rowGroupColsSvc:s,pivotColsSvc:n,autoColSvc:r,selectionColSvc:a,colAnimation:l,visibleCols:d,pivotResultCols:c,environment:u,valueColsSvc:p,eventSvc:g,gos:f}=e,m=i.getColDefCols()||[];if(!m?.length)return!1;if(t?.state&&!t.state.forEach)return _(32),!1;const C=(x,T,A,P,y)=>{if(!x)return;const w=pg(T,t.defaultState),R=w("flex").value1;if(Ac(e,x,w("hide").value1,w("sort").value1,w("sortIndex").value1,w("pinned").value1,R,o),R==null){const F=w("width").value1;if(F!=null){const H=x.getColDef().minWidth??u.getDefaultColumnMinWidth();H!=null&&F>=H&&x.setActualWidth(F,o)}}y||!x.isPrimary()||(p?.syncColumnWithState(x,o,w),s?.syncColumnWithState(x,o,w,A),n?.syncColumnWithState(x,o,w,P))},v=(x,T,A)=>{const P=Bc(e,o),y=T.slice(),w={},R={},F=[],H=[],z=[];let k=0;const V=s?.columns.slice()??[],G=n?.columns.slice()??[];x.forEach(L=>{const Y=L.colId;if(Y.startsWith(Uo)){F.push(L),z.push(L);return}if(io(Y)){H.push(L),z.push(L);return}const q=A(Y);q?(C(q,L,w,R,!1),st(y,q)):(z.push(L),k+=1)});const B=L=>C(L,null,w,R,!1);y.forEach(B),s?.sortColumns(gl.bind(s,w,V)),n?.sortColumns(gl.bind(n,R,G)),i.refreshCols(!1);const N=(L,Y,W=[])=>{Y.forEach(q=>{const $=L(q.colId);st(W,$),C($,q,null,null,!0)}),W.forEach(B)};return N(L=>r?.getColumn(L)??null,F,r?.getColumns()?.slice()),N(L=>a?.getColumn(L)??null,H,a?.getColumns()?.slice()),bg(t,i,f),d.refresh(o),g.dispatchEvent({type:"columnEverythingChanged",source:o}),P(),{unmatchedAndAutoStates:z,unmatchedCount:k}};l?.start();let{unmatchedAndAutoStates:S,unmatchedCount:b}=v(t.state||[],m,x=>i.getColDefCol(x));if(S.length>0||j(t.defaultState)){const x=c?.getPivotResultCols()?.list??[];b=v(S,x,T=>c?.getPivotResultCol(T)??null).unmatchedCount}return l?.finish(),b===0}function Oc(e,t){const{colModel:o,autoColSvc:i,selectionColSvc:s}=e,n=o.getColDefCols();if(!n?.length)return;const r=o.getColDefColTree(),a=wa(r),l=[];let d=1e3,c=1e3;const u=C=>{const v=Nc(C);Me(v.rowGroupIndex)&&v.rowGroup&&(v.rowGroupIndex=d++),Me(v.pivotIndex)&&v.pivot&&(v.pivotIndex=c++),l.push(v)};i?.getColumns()?.forEach(u),s?.getColumns()?.forEach(u),a?.forEach(u),it(e,{state:l},t);const p=i?.getColumns()??[],m=[...s?.getColumns()??[],...p,...n].map(C=>({colId:C.colId}));it(e,{state:m,applyOrder:!0},t)}function Bc(e,t){const{rowGroupColsSvc:o,pivotColsSvc:i,valueColsSvc:s,colModel:n,sortSvc:r,eventSvc:a}=e,l={rowGroupColumns:o?.columns.slice()??[],pivotColumns:i?.columns.slice()??[],valueColumns:s?.columns.slice()??[]},d=ss(e),c={};return d.forEach(u=>{c[u.colId]=u}),()=>{const u=(A,P,y,w)=>{const R=P.map(w),F=y.map(w);if(At(R,F))return;const z=new Set(P);y.forEach(V=>{z.delete(V)||z.add(V)});const k=[...z];a.dispatchEvent({type:A,columns:k,column:k.length===1?k[0]:null,source:t})},p=A=>{const P=[];return n.forAllCols(y=>{const w=c[y.getColId()];w&&A(w,y)&&P.push(y)}),P},g=A=>A.getColId();u("columnRowGroupChanged",l.rowGroupColumns,o?.columns??[],g),u("columnPivotChanged",l.pivotColumns,i?.columns??[],g);const m=p((A,P)=>{const y=A.aggFunc!=null,w=y!=P.isValueActive(),R=y&&A.aggFunc!=P.getAggFunc();return w||R});m.length>0&&Gc(a,"columnValueChanged",m,t),cn(a,p((A,P)=>A.width!=P.getActualWidth()),!0,t),kc(a,p((A,P)=>A.pinned!=P.getPinned()),t),yg(a,p((A,P)=>A.hide==P.isVisible()),t);const x=p((A,P)=>A.sort!=P.getSort()||A.sortIndex!=P.getSortIndex());x.length>0&&r?.dispatchSortChangedEvents(t,x);const T=ss(e);Fg(d,T,t,n,a)}}function ss(e){const{colModel:t,rowGroupColsSvc:o,pivotColsSvc:i}=e,s=t.getColDefCols();if(Me(s)||!t.isAlive())return[];const n=o?.columns,r=i?.columns,a=[],l=c=>{const u=c.isRowGroupActive()&&n?n.indexOf(c):null,p=c.isPivotActive()&&r?r.indexOf(c):null,g=c.isValueActive()?c.getAggFunc():null,f=c.getSort()!=null?c.getSort():null,m=c.getSortIndex()!=null?c.getSortIndex():null;a.push({colId:c.getColId(),width:c.getActualWidth(),hide:!c.isVisible(),pinned:c.getPinned(),sort:f,sortIndex:m,aggFunc:g,rowGroup:c.isRowGroupActive(),rowGroupIndex:u,pivot:c.isPivotActive(),pivotIndex:p,flex:c.getFlex()??null})};t.forAllCols(c=>l(c));const d=new Map(t.getCols().map((c,u)=>[c.getColId(),u]));return a.sort((c,u)=>{const p=d.has(c.colId)?d.get(c.colId):-1,g=d.has(u.colId)?d.get(u.colId):-1;return p-g}),a}function Nc(e){const t=(f,m)=>f??m??null,o=e.getColDef(),i=t(o.sort,o.initialSort),s=t(o.sortIndex,o.initialSortIndex),n=t(o.hide,o.initialHide),r=t(o.pinned,o.initialPinned),a=t(o.width,o.initialWidth),l=t(o.flex,o.initialFlex);let d=t(o.rowGroupIndex,o.initialRowGroupIndex),c=t(o.rowGroup,o.initialRowGroup);d==null&&(c==null||c==!1)&&(d=null,c=null);let u=t(o.pivotIndex,o.initialPivotIndex),p=t(o.pivot,o.initialPivot);u==null&&(p==null||p==!1)&&(u=null,p=null);const g=t(o.aggFunc,o.initialAggFunc);return{colId:e.getColId(),sort:i,sortIndex:s,hide:n,pinned:r,width:a,flex:l,rowGroup:c,rowGroupIndex:d,pivot:p,pivotIndex:u,aggFunc:g}}function bg(e,t,o){if(!e.applyOrder||!e.state)return;const i=[];e.state.forEach(s=>{s.colId!=null&&i.push(s.colId)}),Rg(t.cols,i,t,o)}function Rg(e,t,o,i){if(e==null)return;let s=[];const n={};t.forEach(a=>{if(n[a])return;const l=e.map[a];l&&(s.push(l),n[a]=!0)});let r=0;if(e.list.forEach(a=>{const l=a.getColId();if(n[l]!=null)return;l.startsWith(Uo)?s.splice(r++,0,a):s.push(a)}),s=Tc(s,i),!Ic(s,o.getColTree())){_(39);return}e.list=s}function Fg(e,t,o,i,s){const n={};t.forEach(c=>n[c.colId]=c);const r={};e.forEach(c=>{n[c.colId]&&(r[c.colId]=!0)});const a=e.filter(c=>r[c.colId]),l=t.filter(c=>r[c.colId]),d=[];l.forEach((c,u)=>{const p=a&&a[u];if(p&&p.colId!==c.colId){const g=i.getCol(p.colId);g&&d.push(g)}}),d.length&&s.dispatchEvent({type:"columnMoved",columns:d,column:d.length===1?d[0]:null,finished:!0,source:o})}var gl=(e,t,o,i)=>{const s=e[o.getId()],n=e[i.getId()],r=s!=null,a=n!=null;if(r&&a)return s-n;if(r)return-1;if(a)return 1;const l=t.indexOf(o),d=t.indexOf(i),c=l>=0,u=d>=0;return c&&u?l-d:c?-1:1},xg=class extends M{constructor(){super(...arguments),this.beanName="colModel",this.pivotMode=!1,this.ready=!1,this.changeEventsDispatching=!1}postConstruct(){this.pivotMode=this.gos.get("pivotMode"),this.addManagedPropertyListeners(["groupDisplayType","treeData","treeDataDisplayType","groupHideOpenParents"],e=>this.refreshAll(No(e.source))),this.addManagedPropertyListeners(["defaultColDef","defaultColGroupDef","columnTypes","suppressFieldDotNotation"],this.recreateColumnDefs.bind(this)),this.addManagedPropertyListener("pivotMode",e=>this.setPivotMode(this.gos.get("pivotMode"),No(e.source)))}createColsFromColDefs(e){const{beans:t}=this,{valueCache:o,colAutosize:i,rowGroupColsSvc:s,pivotColsSvc:n,valueColsSvc:r,visibleCols:a,colViewport:l,eventSvc:d}=t,c=this.colDefs?Bc(t,e):void 0;o?.expire();const u=this.colDefCols?.list,p=this.colDefCols?.tree,g=Pc(t,this.colDefs,!0,p,e);yo(t,this.colDefCols?.tree,g.columnTree);const f=g.columnTree,m=g.treeDept,C=wa(f),v={};C.forEach(S=>v[S.getId()]=S),this.colDefCols={tree:f,treeDepth:m,list:C,map:v},s?.extractCols(e,u),n?.extractCols(e,u),r?.extractCols(e,u),this.ready=!0,this.refreshCols(!0),a.refresh(e),l.checkViewportColumns(),d.dispatchEvent({type:"columnEverythingChanged",source:e}),c&&(this.changeEventsDispatching=!0,c(),this.changeEventsDispatching=!1),d.dispatchEvent({type:"newColumnsLoaded",source:e}),e==="gridInitializing"&&i?.applyAutosizeStrategy()}refreshCols(e){if(!this.colDefCols)return;const t=this.cols?.tree;this.saveColOrder();const{autoColSvc:o,selectionColSvc:i,rowNumbersSvc:s,quickFilter:n,pivotResultCols:r,showRowGroupCols:a,rowAutoHeight:l,visibleCols:d,colViewport:c,eventSvc:u}=this.beans,p=this.selectCols(r,this.colDefCols);this.createColumnsForService([o,i,s],p);const g=Vp(this.gos,this.showingPivotResult);(!e||g)&&this.restoreColOrder(p),this.positionLockedCols(p),a?.refresh(),n?.refreshCols(),this.setColSpanActive(),l?.setAutoHeightActive(p),d.clear(),c.clear(),!At(t,this.cols.tree)&&u.dispatchEvent({type:"gridColumnsChanged"})}createColumnsForService(e,t){for(const o of e)o&&(o.createColumns(t,i=>{this.lastOrder=i(this.lastOrder),this.lastPivotOrder=i(this.lastPivotOrder)}),o.addColumns(t))}selectCols(e,t){const o=e?.getPivotResultCols()??null;this.showingPivotResult=o!=null;const{map:i,list:s,tree:n,treeDepth:r}=o??t;return this.cols={list:s.slice(),map:{...i},tree:n.slice(),treeDepth:r},o&&(o.list.some(l=>this.cols?.map[l.getColId()]!==void 0)||(this.lastPivotOrder=null)),this.cols}getColsToShow(){if(!this.cols)return[];const e=this.isPivotMode()&&!this.showingPivotResult,t=this.beans.valueColsSvc?.columns;return this.cols.list.filter(i=>{const s=Ln(i);if(e){const n=t?.includes(i);return s||n}else return s||i.isVisible()})}refreshAll(e){this.ready&&(this.refreshCols(!1),this.beans.visibleCols.refresh(e))}setColsVisible(e,t=!1,o){it(this.beans,{state:e.map(i=>({colId:typeof i=="string"?i:i.getColId(),hide:!t}))},o)}restoreColOrder(e){const t=this.showingPivotResult?this.lastPivotOrder:this.lastOrder;if(!t)return;const o=new Map(t.map((d,c)=>[d,c]));if(!e.list.some(d=>o.has(d)))return;const s=new Map(e.list.map(d=>[d,!0])),n=t.filter(d=>s.has(d)),r=new Map(n.map(d=>[d,!0])),a=e.list.filter(d=>!r.has(d)),l=n.slice();a.forEach(d=>{let c=d.getOriginalParent();if(!c){l.push(d);return}const u=[];for(;!u.length&&c;)c.getLeafColumns().forEach(m=>{const C=l.indexOf(m)>=0,v=u.indexOf(m)<0;C&&v&&u.push(m)}),c=c.getOriginalParent();if(!u.length){l.push(d);return}const p=u.map(f=>l.indexOf(f)),g=Math.max(...p);l.splice(g+1,0,d)}),e.list=l}positionLockedCols(e){e.list=Tc(e.list,this.gos)}saveColOrder(){this.showingPivotResult?this.lastPivotOrder=this.cols?.list??null:this.lastOrder=this.cols?.list??null}getColumnDefs(){return this.colDefCols?this.beans.colDefFactory?.getColumnDefs(this.colDefCols.list,this.showingPivotResult,this.lastOrder,this.cols?.list??[]):void 0}setColSpanActive(){this.colSpanActive=!!this.cols?.list.some(e=>e.getColDef().colSpan!=null)}isPivotMode(){return this.pivotMode}setPivotMode(e,t){if(e===this.pivotMode||(this.pivotMode=e,!this.ready))return;this.refreshCols(!1);const{visibleCols:o,eventSvc:i}=this.beans;o.refresh(t),i.dispatchEvent({type:"columnPivotModeChanged"})}isPivotActive(){const e=this.beans.pivotColsSvc?.columns;return this.pivotMode&&!!e?.length}recreateColumnDefs(e){if(!this.cols)return;this.beans.autoColSvc?.updateColumns(e);const t=No(e.source);this.createColsFromColDefs(t)}setColumnDefs(e,t){this.colDefs=e,this.createColsFromColDefs(t)}destroy(){yo(this.beans,this.colDefCols?.tree),super.destroy()}getColTree(){return this.cols?.tree??[]}getColDefColTree(){return this.colDefCols?.tree??[]}getColDefCols(){return this.colDefCols?.list??null}getCols(){return this.cols?.list??[]}forAllCols(e){const{pivotResultCols:t,autoColSvc:o,selectionColSvc:i}=this.beans;ms(this.colDefCols?.list,e),ms(o?.columns?.list,e),ms(i?.columns?.list,e),ms(t?.getPivotResultCols()?.list,e)}getColsForKeys(e){return e?e.map(t=>this.getCol(t)).filter(t=>t!=null):[]}getColDefCol(e){return this.colDefCols?.list?this.getColFromCollection(e,this.colDefCols):null}getCol(e){return e==null?null:this.getColFromCollection(e,this.cols)}getColFromCollection(e,t){if(t==null)return null;const{map:o,list:i}=t;if(typeof e=="string"&&o[e])return o[e];for(let s=0;s<i.length;s++)if(Sa(i[s],e))return i[s];return this.beans.autoColSvc?.getColumn(e)??this.beans.selectionColSvc?.getColumn(e)??null}},ya=class extends M{constructor(){super(...arguments),this.dispatchColumnChangedEvent=Gc,this.columns=[],this.columnIndexMap={},this.updateIndexMap=()=>{this.columnIndexMap={},this.columns.forEach((e,t)=>this.columnIndexMap[e.getId()]=t)}}wireBeans(e){this.colModel=e.colModel,this.aggFuncSvc=e.aggFuncSvc,this.visibleCols=e.visibleCols}sortColumns(e){this.columns.sort(e),this.updateIndexMap()}setColumns(e,t){this.setColList(e,this.columns,this.eventName,!0,!0,this.columnProcessors.set,t)}addColumns(e,t){this.updateColList(e,this.columns,!0,!0,this.columnProcessors.add,this.eventName,t)}removeColumns(e,t){this.updateColList(e,this.columns,!1,!0,this.columnProcessors.remove,this.eventName,t)}getColumnIndex(e){return this.columnIndexMap[e]}setColList(e=[],t,o,i,s,n,r){const a=this.colModel.getCols();if(!a||a.length===0)return;const l=new Map;t.forEach((c,u)=>l.set(c,u)),t.length=0,j(e)&&e.forEach(c=>{const u=this.colModel.getColDefCol(c);u&&t.push(u)}),t.forEach((c,u)=>{const p=l.get(c);if(p===void 0){l.set(c,0);return}i&&p!==u||l.delete(c)}),this.updateIndexMap(),(this.colModel.getColDefCols()||[]).forEach(c=>{const u=t.indexOf(c)>=0;n(c,u,r)}),s&&this.colModel.refreshCols(!1),this.visibleCols.refresh(r),this.dispatchColumnChangedEvent(this.eventSvc,o,[...l.keys()],r)}updateColList(e=[],t,o,i,s,n,r){if(!e||e.length===0)return;let a=!1;const l=new Set;if(e.forEach(c=>{if(!c)return;const u=this.colModel.getColDefCol(c);if(u){if(l.add(u),o){if(t.indexOf(u)>=0)return;t.push(u)}else{const p=t.indexOf(u);if(p<0)return;for(let g=p+1;g<t.length;g++)l.add(t[g]);st(t,u)}s(u,o,r),a=!0}}),!a)return;this.updateIndexMap(),i&&this.colModel.refreshCols(!1),this.visibleCols.refresh(r);const d=Array.from(l);this.eventSvc.dispatchEvent({type:n,columns:d,column:d.length===1?d[0]:null,source:r})}extractCols(e,t=[]){const o=this.columns,i=[],s=[],{setFlagFunc:n,getIndexFunc:r,getInitialIndexFunc:a,getValueFunc:l,getInitialValueFunc:d}=this.columnExtractors;(this.colModel.getColDefCols()||[]).forEach(g=>{const f=t.indexOf(g)<0,m=g.getColDef(),C=l(m),v=d(m),S=r(m),b=a(m);let x;C!==void 0?x=C:S!==void 0?S===null?x=!1:x=S>=0:f?v!==void 0?x=v:b!==void 0?x=b!=null&&b>=0:x=!1:x=o.indexOf(g)>=0,x&&((f?S!=null||b!=null:S!=null)?i.push(g):s.push(g))});const u=g=>{const f=r(g.getColDef()),m=a(g.getColDef());return f??m};i.sort((g,f)=>{const m=u(g),C=u(f);return m===C?0:m<C?-1:1});const p=[].concat(i);return o.forEach(g=>{s.indexOf(g)>=0&&p.push(g)}),s.forEach(g=>{p.indexOf(g)<0&&p.push(g)}),o.forEach(g=>{p.indexOf(g)<0&&n(g,!1,e)}),p.forEach(g=>{o.indexOf(g)<0&&n(g,!0,e)}),this.columns=p,this.updateIndexMap(),this.columns}restoreColumnOrder(e,t){const o=this.columns,i=this.colModel.getColDefCols();if(!o.length||!i)return e;const s=Object.keys(t),n=new Set(s),r=new Set(s),a=new Set(o.map(b=>{const x=b.getColId();return r.delete(x),x}).concat(s)),l=[],d={};let c=0;for(let b=0;b<i.length;b++){const x=i[b].getColId();a.has(x)&&(l.push(x),d[x]=c++)}let u=1e3,p=!1,g=0;const f=this.columnOrdering.enableProp,m=this.columnOrdering.initialEnableProp,C=this.columnOrdering.indexProp,v=this.columnOrdering.initialIndexProp,S=b=>{const x=d[b];for(let T=g;T<x;T++){const A=l[T];r.has(A)&&(t[A][C]=u++,r.delete(A))}g=x};return o.forEach(b=>{const x=b.getColId();if(n.has(x))S(x),t[x][C]=u++;else{const T=b.getColDef();(T[C]===null||T[C]===void 0&&T[v]==null)&&(p||(T[f]||T[f]===void 0&&T[m]?S(x):(r.forEach(y=>{t[y][C]=u+d[y]}),u+=l.length,p=!0)),e[x]||(e[x]={colId:x}),e[x][C]=u++)}}),e}},Hc=class{constructor(){this.existingIds={}}getInstanceIdForKey(e){const t=this.existingIds[e];let o;return typeof t!="number"?o=0:o=t+1,this.existingIds[e]=o,o}};function cs(e,t,o){return o&&e.addDestroyFunc(()=>t.destroyBean(o)),o??e}var Vc=class{constructor(e){this.cssClassStates={},this.getGui=e}addCssClass(e){this.addOrRemoveCssClass(e,!0)}removeCssClass(e){this.addOrRemoveCssClass(e,!1)}containsCssClass(e){const t=this.getGui();return t?t.classList.contains(e):!1}addOrRemoveCssClass(e,t){if(!e)return;if(e.indexOf(" ")>=0){const i=(e||"").split(" ");if(i.length>1){i.forEach(s=>this.addOrRemoveCssClass(s,t));return}}if(this.cssClassStates[e]!==t&&e.length){const i=this.getGui();i&&i.classList.toggle(e,t),this.cssClassStates[e]=t}}},Dg=0,O=null,pe=class extends M{constructor(e,t){super(),this.suppressDataRefValidation=!1,this.displayed=!0,this.visible=!0,this.compId=Dg++,this.cssClassManager=new Vc(()=>this.eGui),this.componentSelectors=new Map((t??[]).map(o=>[o.selector,o])),e&&this.setTemplate(e)}preConstruct(){this.wireTemplate(this.getGui());const e="component-"+Object.getPrototypeOf(this)?.constructor?.name;this.css?.forEach(t=>this.beans.environment.addGlobalCSS(t,e))}wireTemplate(e,t){e&&this.gos&&(this.applyElementsToComponent(e),this.createChildComponentsFromTags(e,t))}getCompId(){return this.compId}getDataRefAttribute(e){return e.getAttribute?e.getAttribute(ic):null}applyElementsToComponent(e,t,o,i=null){if(t===void 0&&(t=this.getDataRefAttribute(e)),t){const s=this[t];if(s===O)this[t]=i??e;else{const n=o&&o[t];if(!this.suppressDataRefValidation&&!n)throw new Error(`data-ref: ${t} on ${this.constructor.name} with ${s}`)}}}createChildComponentsFromTags(e,t){const o=[];for(const i of e.childNodes??[])o.push(i);o.forEach(i=>{if(!(i instanceof HTMLElement))return;const s=this.createComponentFromElement(i,n=>{const r=n.getGui();if(r)for(const a of i.attributes??[])r.setAttribute(a.name,a.value)},t);if(s){if(s.addItems&&i.children.length){this.createChildComponentsFromTags(i,t);const n=Array.prototype.slice.call(i.children);s.addItems(n)}this.swapComponentForNode(s,e,i)}else i.childNodes&&this.createChildComponentsFromTags(i,t)})}createComponentFromElement(e,t,o){const i=e.nodeName,s=this.getDataRefAttribute(e),n=i.indexOf("AG-")===0,r=n?this.componentSelectors.get(i):null;let a=null;if(r){const l=o&&s?o[s]:void 0;a=new r.component(l),a.setParentComponent(this),this.createBean(a,null,t)}else if(n)throw new Error(`selector: ${i}`);return this.applyElementsToComponent(e,s,o,a),a}swapComponentForNode(e,t,o){const i=e.getGui();t.replaceChild(i,o),t.insertBefore(document.createComment(o.nodeName),i),this.addDestroyFunc(this.destroyBean.bind(this,e))}activateTabIndex(e){const t=this.gos.get("tabIndex");e||(e=[]),e.length||e.push(this.getGui()),e.forEach(o=>o.setAttribute("tabindex",t.toString()))}setTemplate(e,t,o){let i;typeof e=="string"||e==null?i=Pn(e):i=Pe(e),this.setTemplateFromElement(i,t,o)}setTemplateFromElement(e,t,o,i=!1){if(this.eGui=e,this.suppressDataRefValidation=i,t)for(let s=0;s<t.length;s++){const n=t[s];this.componentSelectors.set(n.selector,n)}this.wireTemplate(e,o)}getGui(){return this.eGui}getFocusableElement(){return this.eGui}getAriaElement(){return this.getFocusableElement()}setParentComponent(e){this.parentComponent=e}getParentComponent(){return this.parentComponent}setGui(e){this.eGui=e}queryForHtmlElement(e){return this.eGui.querySelector(e)}getContainerAndElement(e,t){let o=t;return e==null?null:(o||(o=this.eGui),En(e)?{element:e,parent:o}:{element:e.getGui(),parent:o})}prependChild(e,t){const{element:o,parent:i}=this.getContainerAndElement(e,t)||{};!o||!i||i.insertAdjacentElement("afterbegin",o)}appendChild(e,t){const{element:o,parent:i}=this.getContainerAndElement(e,t)||{};!o||!i||i.appendChild(o)}isDisplayed(){return this.displayed}setVisible(e,t={}){if(e!==this.visible){this.visible=e;const{skipAriaHidden:o}=t;Dp(this.eGui,e,{skipAriaHidden:o})}}setDisplayed(e,t={}){if(e!==this.displayed){this.displayed=e;const{skipAriaHidden:o}=t;he(this.eGui,e,{skipAriaHidden:o});const i={type:"displayChanged",visible:this.displayed};this.dispatchLocalEvent(i)}}destroy(){this.parentComponent&&(this.parentComponent=void 0),super.destroy()}addGuiEventListener(e,t,o){this.eGui.addEventListener(e,t,o),this.addDestroyFunc(()=>this.eGui.removeEventListener(e,t))}addCssClass(e){this.cssClassManager.addCssClass(e)}removeCssClass(e){this.cssClassManager.removeCssClass(e)}containsCssClass(e){return this.cssClassManager.containsCssClass(e)}addOrRemoveCssClass(e,t){this.cssClassManager.addOrRemoveCssClass(e,t)}registerCSS(e){this.css||(this.css=[]),this.css.push(e)}},De=class Ei{constructor(t){this.status=0,this.resolution=null,this.waiters=[],t(o=>this.onDone(o),o=>this.onReject(o))}static all(t){return t.length?new Ei(o=>{let i=t.length;const s=new Array(i);t.forEach((n,r)=>{n.then(a=>{s[r]=a,i--,i===0&&o(s)})})}):Ei.resolve()}static resolve(t=null){return new Ei(o=>o(t))}then(t){return new Ei(o=>{this.status===1?o(t(this.resolution)):this.waiters.push(i=>o(t(i)))})}onDone(t){this.status=1,this.resolution=t,this.waiters.forEach(o=>o(t))}onReject(t){}};function Mg(e){return e?e.prototype&&"getGui"in e.prototype:!1}function _c(e,t,o,i){const{name:s}=o;let n,r,a,l,d,c;if(t){const u=t,p=u[s+"Selector"],g=p?p(i):null,f=m=>{typeof m=="string"?n=m:m!=null&&m!==!0&&(e.isFrameworkComponent(m)?a=m:r=m)};g?(f(g.component),l=g.params,d=g.popup,c=g.popupPosition):f(u[s])}return{compName:n,jsComp:r,fwComp:a,paramsFromSelector:l,popupFromSelector:d,popupPositionFromSelector:c}}var Pg=class extends M{constructor(){super(...arguments),this.beanName="userCompFactory"}wireBeans(e){this.agCompUtils=e.agCompUtils,this.registry=e.registry,this.frameworkCompWrapper=e.frameworkCompWrapper,this.gridOptions=e.gridOptions}getCompDetailsFromGridOptions(e,t,o,i=!1){return this.getCompDetails(this.gridOptions,e,t,o,i)}getCompDetails(e,t,o,i,s=!1){const{name:n,cellRenderer:r}=t;let{compName:a,jsComp:l,fwComp:d,paramsFromSelector:c,popupFromSelector:u,popupPositionFromSelector:p}=_c(this.beans.frameworkOverrides,e,t,i),g;const f=S=>{const b=this.registry.getUserComponent(n,S);b&&(l=b.componentFromFramework?void 0:b.component,d=b.componentFromFramework?b.component:void 0,g=b.params)};if(a!=null&&f(a),l==null&&d==null&&o!=null&&f(o),l&&r&&!Mg(l)&&(l=this.agCompUtils?.adaptFunction(t,l)),!l&&!d){const{validation:S}=this.beans;s&&(a!==o||!o)?a?S?.isProvidedUserComp(a)||ae(50,{compName:a}):o?S||ae(260,{...this.gos.getModuleErrorParams(),propName:n,compName:o}):ae(216,{name:n}):o&&!S&&ae(146,{comp:o});return}const m=this.mergeParams(e,t,i,c,g),C=l==null,v=l??d;return{componentFromFramework:C,componentClass:v,params:m,type:t,popupFromSelector:u,popupPositionFromSelector:p,newAgStackInstance:()=>this.newAgStackInstance(v,C,m,t)}}newAgStackInstance(e,t,o,i){const s=!t;let n;s?n=new e:n=this.frameworkCompWrapper.wrap(e,i.mandatoryMethods,i.optionalMethods,i),this.createBean(n);const r=n.init?.(o);return r==null?De.resolve(n):r.then(()=>n)}mergeParams(e,t,o,i=null,s){const n={...o,...s},r=e,a=r&&r[t.name+"Params"];if(typeof a=="function"){const l=a(o);Ue(n,l)}else typeof a=="object"&&Ue(n,a);return Ue(n,i),n}},Eg={name:"dragAndDropImageComponent",mandatoryMethods:["setIcon","setLabel"]},Ag={name:"headerComponent",optionalMethods:["refresh"]},Tg={name:"innerHeaderComponent"},Ig={name:"innerHeaderGroupComponent"},Lg={name:"headerGroupComponent"},kg={name:"innerRenderer",cellRenderer:!0,optionalMethods:["afterGuiAttached"]},Gg={name:"cellRenderer",optionalMethods:["refresh","afterGuiAttached"],cellRenderer:!0},Og={name:"loadingCellRenderer",cellRenderer:!0},Bg={name:"loadingOverlayComponent",optionalMethods:["refresh"]},Ng={name:"noRowsOverlayComponent",optionalMethods:["refresh"]},Hg={name:"tooltipComponent"},ba={name:"filter",mandatoryMethods:["isFilterActive","doesFilterPass","getModel","setModel"],optionalMethods:["afterGuiAttached","afterGuiDetached","onNewRowsLoaded","getModelAsString","onFloatingFilterChanged","onAnyFilterChanged","refresh"]},Vg={name:"floatingFilterComponent",mandatoryMethods:["onParentModelChanged"],optionalMethods:["afterGuiAttached","refresh"]},_g={name:"fullWidthCellRenderer",optionalMethods:["refresh","afterGuiAttached"],cellRenderer:!0},zg={name:"loadingCellRenderer",cellRenderer:!0},Wg={name:"groupRowRenderer",optionalMethods:["afterGuiAttached"],cellRenderer:!0},Ug={name:"detailCellRenderer",optionalMethods:["refresh"],cellRenderer:!0};function $g(e,t){return e.getCompDetailsFromGridOptions(Eg,"agDragAndDropImage",t,!0)}function Cs(e,t,o){return e.getCompDetails(t,kg,void 0,o)}function jg(e,t,o){return e.getCompDetails(t,Ag,"agColumnHeader",o)}function Kg(e,t,o){return e.getCompDetails(t,Tg,void 0,o)}function Yg(e,t){const o=t.columnGroup.getColGroupDef();return e.getCompDetails(o,Lg,"agColumnGroupHeader",t)}function qg(e,t,o){return e.getCompDetails(t,Ig,void 0,o)}function Qg(e,t){return e.getCompDetailsFromGridOptions(_g,void 0,t,!0)}function Xg(e,t){return e.getCompDetailsFromGridOptions(zg,"agLoadingCellRenderer",t,!0)}function Zg(e,t){return e.getCompDetailsFromGridOptions(Wg,"agGroupRowRenderer",t,!0)}function Jg(e,t){return e.getCompDetailsFromGridOptions(Ug,"agDetailCellRenderer",t,!0)}function mi(e,t,o){return e.getCompDetails(t,Gg,void 0,o)}function ef(e,t,o){return e.getCompDetails(t,Og,"agSkeletonCellRenderer",o,!0)}function tf(e,t,o,i){return e.getCompDetails(t,ba,i,o,!0)}function of(e,t){return e.getCompDetailsFromGridOptions(Bg,"agLoadingOverlay",t,!0)}function sf(e,t){return e.getCompDetailsFromGridOptions(Ng,"agNoRowsOverlay",t,!0)}function nf(e,t){return e.getCompDetails(t.colDef,Hg,"agTooltipComponent",t,!0)}function rf(e,t,o,i){return e.getCompDetails(t,Vg,i,o)}function af(e,t){return _c(e,t,ba)}function lf(e,t,o){return e.mergeParams(t,ba,o)}function fl(e){const t=e;return t!=null&&t.getFrameworkComponentInstance!=null?t.getFrameworkComponentInstance():e}var zc=new Set,un={},ni={},Bs,Wc=!1,df=!1;function cf(e){const[t,o]=e.version.split(".")||[],[i,s]=Bs.split(".")||[];return t===i&&o===s}function uf(e){Bs||(Bs=e.version);const t=o=>`You are using incompatible versions of AG Grid modules. Major and minor versions should always match across modules. ${o} Please update all modules to the same version.`;if(e.version?cf(e)||ii(t(`'${e.moduleName}' is version ${e.version} but the other modules are version ${Bs}.`)):ii(t(`'${e.moduleName}' is incompatible.`)),e.validate){const o=e.validate();o.isValid||ii(`${o.message}`)}}function ns(e,t){uf(e);const o=e.rowModels??["all"];zc.add(e);let i;t!==void 0?(Wc=!0,ni[t]===void 0&&(ni[t]={}),i=ni[t]):i=un,o.forEach(s=>{i[s]===void 0&&(i[s]={}),i[s][e.moduleName]=e}),e.dependsOn&&e.dependsOn.forEach(s=>ns(s,t))}function hf(e){delete ni[e]}function Uc(e,t,o){const i=s=>!!un[s]?.[e]||!!ni[t]?.[s]?.[e];return i(o)||i("all")}function Ra(){return Wc}function pf(e,t){const o=ni[e]??{};return[...Object.values(un.all??{}),...Object.values(o.all??{}),...Object.values(un[t]??{}),...Object.values(o[t]??{})]}function gf(){return new Set(zc)}function ff(){return df}var $c=class{static register(e){ns(e,void 0)}static registerModules(e){e.forEach(t=>ns(t,void 0))}},mf=class{constructor(e){this.beans={},this.createdBeans=[],this.destroyed=!1,!(!e||!e.beanClasses)&&(this.beanDestroyComparator=e.beanDestroyComparator,this.init(e))}init(e){for(const t of Object.keys(e.providedBeanInstances))this.beans[t]=e.providedBeanInstances[t];e.beanClasses.forEach(t=>{const o=new t;o.beanName?this.beans[o.beanName]=o:console.error(`Bean ${t.name} is missing beanName`),this.createdBeans.push(o)}),e.derivedBeans?.forEach(t=>{const{beanName:o,bean:i}=t(this);this.beans[o]=i,this.createdBeans.push(i)}),e.beanInitComparator&&this.createdBeans.sort(e.beanInitComparator),this.initBeans(this.createdBeans)}getBeanInstances(){return Object.values(this.beans)}createBean(e,t){if(!e)throw Error("null bean");return this.initBeans([e],t),e}initBeans(e,t){e.forEach(o=>{o.preWireBeans?.(this.beans),o.wireBeans?.(this.beans)}),e.forEach(o=>o.preConstruct?.()),t&&e.forEach(t),e.forEach(o=>o.postConstruct?.())}getBeans(){return this.beans}getBean(e){return this.beans[e]}destroy(){if(this.destroyed)return;this.destroyed=!0;const e=this.getBeanInstances();this.beanDestroyComparator&&e.sort(this.beanDestroyComparator),this.destroyBeans(e),this.beans={},this.createdBeans=[]}destroyBean(e){e?.destroy?.()}destroyBeans(e){if(e)for(let t=0;t<e.length;t++)this.destroyBean(e[t]);return[]}isDestroyed(){return this.destroyed}},Cf=class extends mf{init(e){this.gridId=e.gridId,this.beans.context=this,this.destroyCallback=e.destroyCallback,super.init(e)}destroy(){super.destroy(),hf(this.gridId),this.destroyCallback?.()}getGridId(){return this.gridId}},vf="ag-column-first",wf="ag-column-last";function jc(e,t,o,i){return Me(e)?[]:qc(e.headerClass,e,t,o,i)}function Kc(e,t,o,i){return Me(e)?[]:qc(e.toolPanelClass,e,t,o,i)}function Yc(e,t,o){e.addOrRemoveCssClass(vf,o.isColAtEdge(t,"first")),e.addOrRemoveCssClass(wf,o.isColAtEdge(t,"last"))}function Sf(e,t,o,i){return Z(t,{colDef:e,column:o,columnGroup:i})}function qc(e,t,o,i,s){if(Me(e))return[];let n;if(typeof e=="function"){const r=Sf(t,o,i,s);n=e(r)}else n=e;return typeof n=="string"?[n]:Array.isArray(n)?[...n]:[]}var D={BACKSPACE:"Backspace",TAB:"Tab",ENTER:"Enter",ESCAPE:"Escape",SPACE:" ",LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",DOWN:"ArrowDown",DELETE:"Delete",F2:"F2",PAGE_UP:"PageUp",PAGE_DOWN:"PageDown",PAGE_HOME:"Home",PAGE_END:"End",A:"KeyA",C:"KeyC",D:"KeyD",V:"KeyV",X:"KeyX",Y:"KeyY",Z:"KeyZ"},_r=!1,hn=0;function yf(e){hn>0||(e.addEventListener("keydown",pn),e.addEventListener("mousedown",pn))}function bf(e){hn>0||(e.removeEventListener("keydown",pn),e.removeEventListener("mousedown",pn))}function pn(e){const t=_r,o=e.type==="keydown";o&&(e.ctrlKey||e.metaKey||e.altKey)||t!==o&&(_r=o)}function Rf(e){const t=Le(e);return yf(t),hn++,()=>{hn--,bf(t)}}function Qc(){return _r}function Ff(e,t,o){t.addManagedElementListeners(o,{keydown:i=>{if(!i.defaultPrevented&&i.key===D.TAB){const s=i.shiftKey;Kt(e,o,!1,s)||$o(e,s)&&i.preventDefault()}}})}function Ho(e,t,o=!1){const i=xp;let s=Qd;t&&(s+=", "+t),o&&(s+=', [tabindex="-1"]');const n=Array.prototype.slice.apply(e.querySelectorAll(i)).filter(l=>ht(l)),r=Array.prototype.slice.apply(e.querySelectorAll(s));return r.length?((l,d)=>l.filter(c=>d.indexOf(c)===-1))(n,r):n}function It(e,t=!1,o=!1,i=!1){const s=Ho(e,i?".ag-tab-guard":null,o),n=t?ve(s):s[0];return n?(n.focus({preventScroll:!0}),!0):!1}function Kt(e,t,o,i){const s=Ho(t,o?':not([tabindex="-1"])':null),n=Ee(e);let r;o?r=s.findIndex(l=>l.contains(n)):r=s.indexOf(n);const a=r+(i?-1:1);return a<0||a>=s.length?null:s[a]}function Fa(e,t=5){let o=0;for(;e&&nl(e)===null&&++o<=t;)e=e.parentElement;return nl(e)===null?null:e}function xf(e,t){return e.ctrlsSvc.get("gridCtrl").focusInnerElement(t)}function Vo(e){return e.gos.get("suppressHeaderFocus")||!!e.overlays?.isExclusive()}function xa(e){return e.gos.get("suppressCellFocus")||!!e.overlays?.isExclusive()}function $o(e,t,o=!1){const i=e.ctrlsSvc.get("gridCtrl");return!o&&i.focusNextInnerContainer(t)?!0:((o||!t&&!i.isDetailGrid())&&i.forceFocusOutOfContainer(t),!1)}function Df(e,t=!1){return e===D.DELETE?!0:!t&&e===D.BACKSPACE?Kd():!1}var Mf=class extends M{constructor(e,t,o,i){super(),this.cellCtrl=e,this.rowNode=o,this.rowCtrl=i,this.beans=t}init(){this.eGui=this.cellCtrl.eGui}onKeyDown(e){const t=e.key;switch(t){case D.ENTER:this.onEnterKeyDown(e);break;case D.F2:this.onF2KeyDown(e);break;case D.ESCAPE:this.onEscapeKeyDown(e);break;case D.TAB:this.onTabKeyDown(e);break;case D.BACKSPACE:case D.DELETE:this.onBackspaceOrDeleteKeyDown(t,e);break;case D.DOWN:case D.UP:case D.RIGHT:case D.LEFT:this.onNavigationKeyDown(e,t);break}}onNavigationKeyDown(e,t){if(!this.cellCtrl.editing){if(e.shiftKey&&this.cellCtrl.isRangeSelectionEnabled())this.onShiftRangeSelect(e);else{const o=this.cellCtrl.getFocusedCellPosition();this.beans.navigation?.navigateToNextCell(e,t,o,!0)}e.preventDefault()}}onShiftRangeSelect(e){const{rangeSvc:t,navigation:o}=this.beans;if(!t)return;const i=t.extendLatestRangeInDirection(e);i&&o?.ensureCellVisible(i)}onTabKeyDown(e){this.beans.navigation?.onTabKeyDown(this.cellCtrl,e)}onBackspaceOrDeleteKeyDown(e,t){const{cellCtrl:o,beans:i,rowNode:s}=this,{gos:n,rangeSvc:r,eventSvc:a}=i;if(!o.editing){if(a.dispatchEvent({type:"keyShortcutChangedCellStart"}),Df(e,n.get("enableCellEditingOnBackspace"))){if(r&&zo(n))r.clearCellRangeCellValues({dispatchWrapperEvents:!0,wrapperEventSource:"deleteKey"});else if(o.isCellEditable()){const{column:l}=o,d=this.beans.valueSvc.getDeleteValue(l,s);s.setDataValue(l,d,"cellClear")}}else i.editSvc?.startRowOrCellEdit(o,e,t);a.dispatchEvent({type:"keyShortcutChangedCellEnd"})}}onEnterKeyDown(e){const{cellCtrl:t,beans:o}=this;if(t.editing||this.rowCtrl.editing)this.beans.editSvc?.stopRowOrCellEdit(t,!1,!1,e.shiftKey);else if(o.gos.get("enterNavigatesVertically")){const i=e.shiftKey?D.UP:D.DOWN;o.navigation?.navigateToNextCell(null,i,t.cellPosition,!1)}else o.editSvc?.startRowOrCellEdit(t,D.ENTER,e),t.editing&&e.preventDefault()}onF2KeyDown(e){const{cellCtrl:t,beans:o}=this;t.editing||o.editSvc?.startRowOrCellEdit(t,D.F2,e)}onEscapeKeyDown(e){const{cellCtrl:t,beans:o}=this;t.editing&&o.editSvc?.stopRowOrCellEdit(t,!0)}processCharacter(e){if(e.target!==this.eGui||this.cellCtrl.editing)return;const i=e.key;i===D.SPACE?this.onSpaceKeyDown(e):this.beans.editSvc?.startRowOrCellEdit(this.cellCtrl,i,e)&&e.preventDefault()}onSpaceKeyDown(e){const{gos:t}=this.beans;!this.cellCtrl.editing&&Ht(t)&&this.beans.selectionSvc?.handleSelectionEvent(e,this.rowNode,"spaceKey"),e.preventDefault()}destroy(){super.destroy()}},Pf=class extends M{constructor(e,t,o){super(),this.cellCtrl=e,this.column=o,this.beans=t}onMouseEvent(e,t){if(!Et(t))switch(e){case"click":this.onCellClicked(t);break;case"mousedown":case"touchstart":this.onMouseDown(t);break;case"dblclick":this.onCellDoubleClicked(t);break;case"mouseout":this.onMouseOut(t);break;case"mouseover":this.onMouseOver(t);break}}onCellClicked(e){if(this.beans.touchSvc?.handleCellDoubleClick(this,e))return;const{eventSvc:t,rangeSvc:o,gos:i,editSvc:s}=this.beans,n=e.ctrlKey||e.metaKey;o&&n&&o.getCellRangeCount(this.cellCtrl.cellPosition)>1&&o.intersectLastRange(!0);const r=this.cellCtrl.createEvent(e,"cellClicked");t.dispatchEvent(r);const a=this.column.getColDef();a.onCellClicked&&window.setTimeout(()=>{this.beans.frameworkOverrides.wrapOutgoing(()=>{a.onCellClicked(r)})},0),(i.get("singleClickEdit")||a.singleClickEdit)&&!i.get("suppressClickEdit")&&!(e.shiftKey&&o?.getCellRanges().length!=0)&&s?.startRowOrCellEdit(this.cellCtrl,void 0,e)}onCellDoubleClicked(e){const{column:t,beans:o,cellCtrl:i}=this,{eventSvc:s,frameworkOverrides:n,gos:r,editSvc:a}=o,l=t.getColDef(),d=i.createEvent(e,"cellDoubleClicked");s.dispatchEvent(d),typeof l.onCellDoubleClicked=="function"&&window.setTimeout(()=>{n.wrapOutgoing(()=>{l.onCellDoubleClicked(d)})},0),!r.get("singleClickEdit")&&!r.get("suppressClickEdit")&&a?.startRowOrCellEdit(i,null,e)}onMouseDown(e){const{ctrlKey:t,metaKey:o,shiftKey:i}=e,s=e.target,{cellCtrl:n,beans:r}=this,{eventSvc:a,rangeSvc:l,rowNumbersSvc:d,focusSvc:c,gos:u}=r;if(this.isRightClickInExistingRange(e))return;const p=l&&!l.isEmpty(),g=this.containsWidget(s),{cellPosition:f}=n,m=is(f.column);if(d&&m&&!d.handleMouseDownOnCell(f,e)){l&&e.preventDefault(),e.stopImmediatePropagation();return}if(!i||!p){const v=u.get("enableCellTextSelection")&&e.defaultPrevented,S=(Dn()||v)&&!n.editing&&!da(s)&&!g;n.focusCell(S)}if(i&&p&&!c.isCellFocused(f)){e.preventDefault();const C=c.getFocusedCell();if(C){const{column:v,rowIndex:S,rowPinned:b}=C,T=r.rowRenderer.getRowByPosition({rowIndex:S,rowPinned:b})?.getCellCtrl(v);T?.editing&&T.stopEditing(),c.setFocusedCell({column:v,rowIndex:S,rowPinned:b,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0})}}if(!g){if(l)if(m&&e.preventDefault(),i)l.extendLatestRangeToCell(f);else{const C=t||o;l.setRangeToCell(f,C)}a.dispatchEvent(this.cellCtrl.createEvent(e,"cellMouseDown"))}}isRightClickInExistingRange(e){const{rangeSvc:t}=this.beans;if(t){const o=t.isCellInAnyRange(this.cellCtrl.cellPosition),i=e.button===2||e.ctrlKey&&this.beans.gos.get("allowContextMenuWithControlKey");if(o&&i)return!0}return!1}containsWidget(e){return Go(e,"ag-selection-checkbox",3)||Go(e,"ag-drag-handle",3)}onMouseOut(e){if(this.mouseStayingInsideCell(e))return;const{eventSvc:t,colHover:o}=this.beans;t.dispatchEvent(this.cellCtrl.createEvent(e,"cellMouseOut")),o?.clearMouseOver()}onMouseOver(e){if(this.mouseStayingInsideCell(e))return;const{eventSvc:t,colHover:o}=this.beans;t.dispatchEvent(this.cellCtrl.createEvent(e,"cellMouseOver")),o?.setMouseOver([this.column])}mouseStayingInsideCell(e){if(!e.target||!e.relatedTarget)return!1;const t=this.cellCtrl.eGui,o=t.contains(e.target),i=t.contains(e.relatedTarget);return o&&i}destroy(){super.destroy()}},Ef=class extends M{constructor(e,t){super(),this.cellCtrl=e,this.beans=t,this.column=e.column,this.rowNode=e.rowNode}setupRowSpan(){this.rowSpan=this.column.getRowSpan(this.rowNode),this.addManagedListeners(this.beans.eventSvc,{newColumnsLoaded:()=>this.onNewColumnsLoaded()})}init(){this.eSetLeft=this.cellCtrl.getRootElement(),this.eContent=this.cellCtrl.eGui;const e=this.cellCtrl.getCellSpan();e||(this.setupColSpan(),this.setupRowSpan()),this.onLeftChanged(),this.onWidthChanged(),e||this._legacyApplyRowSpan(),e&&(this.refreshSpanHeight(e),this.addManagedListeners(this.beans.eventSvc,{paginationChanged:this.refreshSpanHeight.bind(this,e),recalculateRowBounds:this.refreshSpanHeight.bind(this,e)}))}refreshSpanHeight(e){const t=e.getCellHeight();t!=null&&(this.eContent.style.height=`${t}px`)}onNewColumnsLoaded(){const e=this.column.getRowSpan(this.rowNode);this.rowSpan!==e&&(this.rowSpan=e,this._legacyApplyRowSpan(!0))}onDisplayColumnsChanged(){const e=this.getColSpanningList();At(this.colsSpanning,e)||(this.colsSpanning=e,this.onWidthChanged(),this.onLeftChanged())}setupColSpan(){this.column.getColDef().colSpan!=null&&(this.colsSpanning=this.getColSpanningList(),this.addManagedListeners(this.beans.eventSvc,{displayedColumnsChanged:this.onDisplayColumnsChanged.bind(this),displayedColumnsWidthChanged:this.onWidthChanged.bind(this)}))}onWidthChanged(){if(!this.eContent)return;const e=this.getCellWidth();this.eContent.style.width=`${e}px`}getCellWidth(){return this.colsSpanning?this.colsSpanning.reduce((e,t)=>e+t.getActualWidth(),0):this.column.getActualWidth()}getColSpanningList(){const{column:e,rowNode:t}=this,o=e.getColSpan(t),i=[];if(o===1)i.push(e);else{let s=e;const n=e.getPinned();for(let r=0;s&&r<o&&(i.push(s),s=this.beans.visibleCols.getColAfter(s),!(!s||Me(s)||n!==s.getPinned()));r++);}return i}onLeftChanged(){if(!this.eSetLeft)return;const e=this.modifyLeftForPrintLayout(this.getCellLeft());this.eSetLeft.style.left=e+"px"}getCellLeft(){let e;return this.beans.gos.get("enableRtl")&&this.colsSpanning?e=ve(this.colsSpanning):e=this.column,e.getLeft()}modifyLeftForPrintLayout(e){if(!this.cellCtrl.printLayout||this.column.getPinned()==="left")return e;const{visibleCols:t}=this.beans,o=t.getColsLeftWidth();if(this.column.getPinned()==="right"){const i=t.bodyWidth;return o+i+(e||0)}return o+(e||0)}_legacyApplyRowSpan(e){if(this.rowSpan===1&&!e)return;const o=So(this.beans)*this.rowSpan;this.eContent.style.height=`${o}px`,this.eContent.style.zIndex="1"}destroy(){super.destroy()}},Af="ag-cell",Tf="ag-cell-auto-height",If="ag-cell-normal-height",Lf="ag-cell-focus",kf="ag-cell-first-right-pinned",Gf="ag-cell-last-left-pinned",Of="ag-cell-not-inline-editing",Bf="ag-cell-wrap-text",gn="cellCtrl";function Xc(e,t){return yc(e,t,gn)}var Nf=0,Ns=class extends M{constructor(e,t,o,i){super(),this.column=e,this.rowNode=t,this.rowCtrl=i,this.rangeFeature=void 0,this.positionFeature=void 0,this.customStyleFeature=void 0,this.tooltipFeature=void 0,this.mouseListener=void 0,this.keyboardListener=void 0,this.suppressRefreshCell=!1,this.onCompAttachedFuncs=[],this.onEditorAttachedFuncs=[],this.focusEventWhileNotReady=null,this.hasBeenFocused=!1,this.beans=o;const{colId:s,colIdSanitised:n}=e;this.instanceId=s+"-"+Nf++,this.colIdSanitised=n,this.createCellPosition(),this.updateAndFormatValue(!1)}addFeatures(){const{beans:e}=this;this.positionFeature=new Ef(this,e),this.customStyleFeature=e.cellStyles?.createCellCustomStyleFeature(this,e),this.mouseListener=new Pf(this,e,this.column),this.keyboardListener=new Mf(this,e,this.rowNode,this.rowCtrl),this.column.isTooltipEnabled()&&this.enableTooltipFeature();const{rangeSvc:t}=e;t&&zo(e.gos)&&(this.rangeFeature=t.createCellRangeFeature(e,this))}isCellSpanning(){return!1}getCellSpan(){}removeFeatures(){const e=this.beans.context;this.positionFeature=e.destroyBean(this.positionFeature),this.customStyleFeature=e.destroyBean(this.customStyleFeature),this.mouseListener=e.destroyBean(this.mouseListener),this.keyboardListener=e.destroyBean(this.keyboardListener),this.rangeFeature=e.destroyBean(this.rangeFeature),this.disableTooltipFeature()}enableTooltipFeature(e,t){this.tooltipFeature=this.beans.tooltipSvc?.enableCellTooltipFeature(this,e,t)}disableTooltipFeature(){this.tooltipFeature=this.beans.context.destroyBean(this.tooltipFeature)}setComp(e,t,o,i,s,n,r){this.comp=e,this.eGui=t,this.printLayout=s,r??(r=this),this.addDomData(r),this.addFeatures(),r.addDestroyFunc(()=>this.removeFeatures()),this.onSuppressCellFocusChanged(this.beans.gos.get("suppressCellFocus")),this.setupFocus(),this.applyStaticCssClasses(),this.setWrapText(),this.onFirstRightPinnedChanged(),this.onLastLeftPinnedChanged(),this.onColumnHover(),this.setupControlComps(),this.setupAutoHeight(i,r),this.refreshFirstAndLastStyles(),this.refreshAriaColIndex(),this.positionFeature?.init(),this.customStyleFeature?.setComp(e),this.tooltipFeature?.refreshTooltip(),this.keyboardListener?.init(),this.rangeFeature?.setComp(e),n&&this.isCellEditable()?this.beans.editSvc?.startEditing(this):this.showValue(!1,!0),this.onCompAttachedFuncs.length&&(this.onCompAttachedFuncs.forEach(a=>a()),this.onCompAttachedFuncs=[])}setupAutoHeight(e,t){this.isAutoHeight=this.beans.rowAutoHeight?.setupCellAutoHeight(this,e,t)??!1}getCellAriaRole(){return this.column.getColDef().cellAriaRole??"gridcell"}isCellRenderer(){const e=this.column.getColDef();return e.cellRenderer!=null||e.cellRendererSelector!=null}getValueToDisplay(){return this.valueFormatted??this.value}showValue(e,t){const{beans:o,column:i,rowNode:s,rangeFeature:n}=this,{userCompFactory:r}=o,a=this.getValueToDisplay();let l;const d=s.stub&&s.groupData?.[i.getId()]==null,c=i.getColDef();if(d||this.isCellRenderer()){const u=this.createCellRendererParams();!d||is(i)?l=mi(r,c,u):l=ef(r,c,u)}if(!l&&!d&&o.findSvc?.isMatch(s,i)){const u=this.createCellRendererParams();l=mi(r,{...i.getColDef(),cellRenderer:"agFindCellRenderer"},u)}this.comp.setRenderDetails(l,a,e),!t&&n&&Tt(o,()=>n?.refreshHandle())}setupControlComps(){const e=this.column.getColDef();this.includeSelection=this.isIncludeControl(this.isCheckboxSelection(e)),this.includeRowDrag=this.isIncludeControl(e.rowDrag),this.includeDndSource=this.isIncludeControl(e.dndSource),this.comp.setIncludeSelection(this.includeSelection),this.comp.setIncludeDndSource(this.includeDndSource),this.comp.setIncludeRowDrag(this.includeRowDrag)}isForceWrapper(){return this.beans.gos.get("enableCellTextSelection")||this.column.isAutoHeight()}isIncludeControl(e){return this.rowNode.rowPinned!=null?!1:typeof e=="function"||e===!0}isCheckboxSelection(e){const{rowSelection:t,groupDisplayType:o}=this.beans.gridOptions,i=ts(t),s=io(this.column);return o==="custom"&&i!=="selectionColumn"&&s?!1:e.checkboxSelection||s&&typeof t=="object"&&Bo(t)}refreshShouldDestroy(){const e=this.column.getColDef(),t=this.includeSelection!=this.isIncludeControl(this.isCheckboxSelection(e)),o=this.includeRowDrag!=this.isIncludeControl(e.rowDrag),i=this.includeDndSource!=this.isIncludeControl(e.dndSource),s=this.isAutoHeight!=this.column.isAutoHeight();return t||o||i||s}onPopupEditorClosed(){this.editing&&this.beans.editSvc?.stopRowOrCellEdit(this)}stopEditing(e=!1){return this.beans.editSvc?.stopEditing(this,e)??!1}createCellRendererParams(){const{value:e,valueFormatted:t,column:o,rowNode:i,comp:s,eGui:n,beans:{valueSvc:r,gos:a}}=this;return Z(a,{value:e,valueFormatted:t,getValue:()=>r.getValueForDisplay(o,i),setValue:d=>r.setValue(i,o,d),formatValue:this.formatValue.bind(this),data:i.data,node:i,pinned:o.getPinned(),colDef:o.getColDef(),column:o,refreshCell:this.refreshCell.bind(this),eGridCell:n,eParentOfValue:s.getParentOfValue(),registerRowDragger:(d,c,u,p)=>this.registerRowDragger(d,c,p),setTooltip:(d,c)=>{a.assertModuleRegistered("Tooltip",3),this.tooltipFeature&&this.disableTooltipFeature(),this.enableTooltipFeature(d,c),this.tooltipFeature?.refreshTooltip()}})}onCellChanged(e){e.column===this.column&&this.refreshCell({})}refreshOrDestroyCell(e){this.refreshShouldDestroy()?this.rowCtrl?.recreateCell(this):this.refreshCell(e)}refreshCell(e){if(this.suppressRefreshCell||this.editing)return;const t=this.column.getColDef(),o=e!=null&&!!e.newData,i=e!=null&&!!e.suppressFlash,s=t.field==null&&t.valueGetter==null&&t.showRowGroup==null,n=e&&e.forceRefresh||s||o,r=!!this.comp,a=this.updateAndFormatValue(r),l=n||a;if(r){if(l){this.showValue(o,!1);const d=this.beans.filterManager?.isSuppressFlashingCellsBecauseFiltering();!i&&!d&&t.enableCellChangeFlash&&this.beans.cellFlashSvc?.flashCell(this),this.customStyleFeature?.applyUserStyles(),this.customStyleFeature?.applyClassesFromColDef()}this.tooltipFeature?.refreshTooltip(),this.customStyleFeature?.applyCellClassRules()}}isCellEditable(){return this.column.isCellEditable(this.rowNode)}formatValue(e){return this.callValueFormatter(e)??e}callValueFormatter(e){return this.beans.valueSvc.formatValue(this.column,this.rowNode,e)}updateAndFormatValue(e){const t=this.value,o=this.valueFormatted;return this.value=this.beans.valueSvc.getValueForDisplay(this.column,this.rowNode),this.valueFormatted=this.callValueFormatter(this.value),e?!this.valuesAreEqual(t,this.value)||this.valueFormatted!=o:!0}valuesAreEqual(e,t){const o=this.column.getColDef();return o.equals?o.equals(e,t):e===t}addDomData(e){const t=this.eGui;pi(this.beans.gos,t,gn,this),e.addDestroyFunc(()=>pi(this.beans.gos,t,gn,null))}createEvent(e,t){const{rowNode:o,column:i,value:s,beans:n}=this;return Z(n.gos,{type:t,node:o,data:o.data,value:s,column:i,colDef:i.getColDef(),rowPinned:o.rowPinned,event:e,rowIndex:o.rowIndex})}processCharacter(e){this.keyboardListener?.processCharacter(e)}onKeyDown(e){this.keyboardListener?.onKeyDown(e)}onMouseEvent(e,t){this.mouseListener?.onMouseEvent(e,t)}getColSpanningList(){return this.positionFeature.getColSpanningList()}onLeftChanged(){this.comp&&this.positionFeature?.onLeftChanged()}onDisplayedColumnsChanged(){this.eGui&&(this.refreshAriaColIndex(),this.refreshFirstAndLastStyles())}refreshFirstAndLastStyles(){const{comp:e,column:t,beans:o}=this;Yc(e,t,o.visibleCols)}refreshAriaColIndex(){const e=this.beans.visibleCols.getAriaColIndex(this.column);Ud(this.eGui,e)}onWidthChanged(){return this.positionFeature?.onWidthChanged()}getRowPosition(){const{rowIndex:e,rowPinned:t}=this.cellPosition;return{rowIndex:e,rowPinned:t}}updateRangeBordersIfRangeCount(){this.comp&&this.rangeFeature?.updateRangeBordersIfRangeCount()}onCellSelectionChanged(){this.comp&&this.rangeFeature?.onCellSelectionChanged()}isRangeSelectionEnabled(){return this.rangeFeature!=null}focusCell(e=!1){this.beans.focusSvc.setFocusedCell({...this.getFocusedCellPosition(),forceBrowserFocus:e})}restoreFocus(e=!1){if(!this.comp||this.editing||!this.isCellFocused()||!this.beans.focusSvc.shouldTakeFocus())return;const t=()=>{if(!this.isAlive())return;const o=this.comp.getFocusableElement();this.isCellFocused()&&o.focus({preventScroll:!0})};if(e){setTimeout(t,0);return}t()}onRowIndexChanged(){this.createCellPosition(),this.onCellFocused(),this.restoreFocus(),this.rangeFeature?.onCellSelectionChanged()}onSuppressCellFocusChanged(e){const t=this.eGui;t&&(is(this.column)&&(e=!0),oi(t,"tabindex",e?void 0:-1))}onFirstRightPinnedChanged(){if(!this.comp)return;const e=this.column.isFirstRightPinned();this.comp.addOrRemoveCssClass(kf,e)}onLastLeftPinnedChanged(){if(!this.comp)return;const e=this.column.isLastLeftPinned();this.comp.addOrRemoveCssClass(Gf,e)}checkCellFocused(){return this.beans.focusSvc.isCellFocused(this.cellPosition)}isCellFocused(){const e=this.checkCellFocused();return this.hasBeenFocused||(this.hasBeenFocused=e),e}setupFocus(){this.restoreFocus(!0),this.onCellFocused(this.focusEventWhileNotReady??void 0)}onCellFocused(e){const{beans:t}=this;if(xa(t))return;if(!this.comp){e&&(this.focusEventWhileNotReady=e);return}const o=this.isCellFocused();if(this.comp.addOrRemoveCssClass(Lf,o),o&&e&&e.forceBrowserFocus){let s=this.comp.getFocusableElement();if(this.editing){const n=Ho(s,null,!0);n.length&&(s=n[0])}s.focus({preventScroll:!!e.preventScrollOnBrowserFocus})}const i=t.gos.get("editType")==="fullRow";!o&&!i&&this.editing&&t.editSvc?.stopRowOrCellEdit(this),o&&this.rowCtrl.announceDescription()}createCellPosition(){const{rowIndex:e,rowPinned:t}=this.rowNode;this.cellPosition={rowIndex:e,rowPinned:ot(t),column:this.column}}setInlineEditingCss(){this.beans.editSvc?.setInlineEditingCss(this.rowCtrl)}applyStaticCssClasses(){const{comp:e}=this;e.addOrRemoveCssClass(Af,!0),e.addOrRemoveCssClass(Of,!0);const t=this.column.isAutoHeight()==!0;e.addOrRemoveCssClass(Tf,t),e.addOrRemoveCssClass(If,!t)}onColumnHover(){this.beans.colHover?.onCellColumnHover(this.column,this.comp)}onColDefChanged(){this.comp&&(this.column.isTooltipEnabled()?(this.disableTooltipFeature(),this.enableTooltipFeature()):this.disableTooltipFeature(),this.setWrapText(),this.editing?this.beans.editSvc?.handleColDefChanged(this):this.refreshOrDestroyCell({forceRefresh:!0,suppressFlash:!0}))}setWrapText(){const e=this.column.getColDef().wrapText==!0;this.comp.addOrRemoveCssClass(Bf,e)}dispatchCellContextMenuEvent(e){const t=this.column.getColDef(),o=this.createEvent(e,"cellContextMenu"),{beans:i}=this;i.eventSvc.dispatchEvent(o),t.onCellContextMenu&&window.setTimeout(()=>{i.frameworkOverrides.wrapOutgoing(()=>{t.onCellContextMenu(o)})},0)}getCellRenderer(){return this.comp?.getCellRenderer()??null}destroy(){this.onCompAttachedFuncs=[],this.onEditorAttachedFuncs=[],this.isCellFocused()&&this.hasBrowserFocus()&&this.beans.focusSvc.attemptToRecoverFocus(),super.destroy()}hasBrowserFocus(){return this.eGui?.contains(Ee(this.beans))??!1}createSelectionCheckbox(){const e=this.beans.selectionSvc?.createCheckboxSelectionComponent();if(e)return this.beans.context.createBean(e),e.init({rowNode:this.rowNode,column:this.column}),e}createDndSource(){const e=this.beans.registry.createDynamicBean("dndSourceComp",!1,this.rowNode,this.column,this.eGui);return e&&this.beans.context.createBean(e),e}registerRowDragger(e,t,o){if(this.customRowDragComp){this.customRowDragComp.setDragElement(e,t);return}const i=this.createRowDragComp(e,t,o);i&&(this.customRowDragComp=i,this.addDestroyFunc(()=>{this.beans.context.destroyBean(i),this.customRowDragComp=null}))}createRowDragComp(e,t,o){const i=this.beans.rowDragSvc?.createRowDragCompForCell(this.rowNode,this.column,()=>this.value,e,t,o);if(i)return this.beans.context.createBean(i),i}cellEditorAttached(){this.onEditorAttachedFuncs.forEach(e=>e()),this.onEditorAttachedFuncs=[]}setFocusedCellPosition(e){}getFocusedCellPosition(){return this.cellPosition}refreshAriaRowIndex(){}getRootElement(){return this.eGui}},Zc="__ag_grid_instance";function Jc(e,t){t[Zc]=e.gridInstanceId}function rs(e,t){return Hf(e,t.target)}function Hf(e,t){let o=t;for(;o;){const i=o[Zc];if(j(i))return i===e.gridInstanceId;o=o.parentElement}return!1}function Vf(e,t){return Xc(e,t.target)?.getFocusedCellPosition()??null}var kn=(e=>(e[e.ToolPanel=0]="ToolPanel",e[e.HeaderCell=1]="HeaderCell",e[e.RowDrag=2]="RowDrag",e[e.ChartPanel=3]="ChartPanel",e[e.AdvancedFilterBuilder=4]="AdvancedFilterBuilder",e))(kn||{}),_f=class extends M{constructor(){super(...arguments),this.beanName="dragAndDrop",this.dragSourceAndParamsList=[],this.dropTargets=[]}wireBeans(e){this.ctrlsSvc=e.ctrlsSvc,this.dragSvc=e.dragSvc,this.environment=e.environment,this.userCompFactory=e.userCompFactory}addDragSource(e,t=!1){const o={eElement:e.eElement,dragStartPixels:e.dragStartPixels,onDragStart:this.onDragStart.bind(this,e),onDragStop:this.onDragStop.bind(this),onDragging:this.onDragging.bind(this),onDragCancel:this.onDragCancel.bind(this),includeTouch:t};this.dragSourceAndParamsList.push({params:o,dragSource:e}),this.dragSvc.addDragSource(o)}getDragAndDropImageComponent(){const{dragAndDropImageComp:e}=this;return!e||!e.comp?null:e.comp}removeDragSource(e){const{dragSourceAndParamsList:t,dragSvc:o}=this,i=t.find(s=>s.dragSource===e);i&&(o.removeDragSource(i.params),st(t,i))}destroy(){const{dragSourceAndParamsList:e,dragSvc:t,dropTargets:o}=this;e.forEach(i=>t.removeDragSource(i.params)),e.length=0,o.length=0,this.clearDragAndDropProperties(),super.destroy()}nudge(){this.dragging&&this.onDragging(this.eventLastTime,!0)}onDragStart(e,t){this.dragging=!0,this.dragSource=e,this.eventLastTime=t,this.dragItem=e.getDragItem(),e.onDragStarted?.(),this.createDragAndDropImageComponent()}onDragStop(e){this.dragSource?.onDragStopped?.();const{lastDropTarget:t}=this;if(t?.onDragStop){const o=this.createDropTargetEvent(t,e,null,null,!1);t.onDragStop(o)}this.clearDragAndDropProperties()}onDragCancel(){const{dragSource:e,lastDropTarget:t}=this;e?.onDragCancelled?.(),t?.onDragCancel&&t.onDragCancel(this.createDropTargetEvent(t,this.eventLastTime,null,null,!1)),this.clearDragAndDropProperties()}clearDragAndDropProperties(){this.eventLastTime=null,this.dragging=!1,this.lastDropTarget=void 0,this.dragItem=null,this.dragSource=null,this.removeDragAndDropImageComponent()}onDragging(e,t=!1){const o=this.getHorizontalDirection(e),i=this.getVerticalDirection(e);this.eventLastTime=e,this.positionDragAndDropImageComp(e);const s=this.dropTargets.filter(c=>this.isMouseOnDropTarget(e,c)),n=this.findCurrentDropTarget(e,s),{lastDropTarget:r,dragSource:a,dragAndDropImageComp:l,dragItem:d}=this;if(n!==r){if(this.leaveLastTargetIfExists(e,o,i,t),r!==null&&n===null&&a?.onGridExit?.(d),r===null&&n!==null&&a?.onGridEnter?.(d),this.enterDragTargetIfExists(n,e,o,i,t),n&&l){const{comp:c,promise:u}=l;c?c.setIcon(n.getIconName?n.getIconName():null,!1):u.then(p=>{p&&p.setIcon(n.getIconName?n.getIconName():null,!1)})}this.lastDropTarget=n}else if(n&&n.onDragging){const c=this.createDropTargetEvent(n,e,o,i,t);n.onDragging(c)}}getAllContainersFromDropTarget(e){const t=e.getSecondaryContainers?e.getSecondaryContainers():null,o=[[e.getContainer()]];return t?o.concat(t):o}isMouseOnDropTarget(e,t){const o=this.getAllContainersFromDropTarget(t);let i=!1;const s=(a,l)=>{for(const d of l){const{width:c,height:u,left:p,right:g,top:f,bottom:m}=d.getBoundingClientRect();if(c===0||u===0)return!1;const C=a.clientX>=p&&a.clientX<g,v=a.clientY>=f&&a.clientY<m;if(!C||!v)return!1}return!0};for(const a of o)if(s(e,a)){i=!0;break}const{eElement:n,type:r}=this.dragSource;return t.targetContainsSource&&!t.getContainer().contains(n)?!1:i&&t.isInterestedIn(r,n)}findCurrentDropTarget(e,t){const o=t.length;if(o===0)return null;if(o===1)return t[0];const s=gi(this.beans).elementsFromPoint(e.clientX,e.clientY);for(const n of s)for(const r of t)if(this.getAllContainersFromDropTarget(r).flatMap(l=>l).indexOf(n)!==-1)return r;return null}enterDragTargetIfExists(e,t,o,i,s){if(e&&e.onDragEnter){const n=this.createDropTargetEvent(e,t,o,i,s);e.onDragEnter(n)}}leaveLastTargetIfExists(e,t,o,i){const{lastDropTarget:s}=this;if(!s)return;if(s.onDragLeave){const r=this.createDropTargetEvent(s,e,t,o,i);s.onDragLeave(r)}const n=this.getDragAndDropImageComponent();n&&n.setIcon(null,!1)}addDropTarget(e){this.dropTargets.push(e)}removeDropTarget(e){this.dropTargets=this.dropTargets.filter(t=>t.getContainer()!==e.getContainer())}hasExternalDropZones(){return this.dropTargets.some(e=>e.external)}findExternalZone(e){return this.dropTargets.filter(o=>o.external).find(o=>o.getContainer()===e.getContainer())||null}isDropZoneWithinThisGrid(e){const o=this.ctrlsSvc.getGridBodyCtrl().eGridBody,{dropZoneTarget:i}=e;return o.contains(i)}getHorizontalDirection(e){const t=this.eventLastTime?.clientX,o=e.clientX;return t===o?null:t>o?"left":"right"}getVerticalDirection(e){const t=this.eventLastTime?.clientY,o=e.clientY;return t===o?null:t>o?"up":"down"}createDropTargetEvent(e,t,o,i,s){const n=e.getContainer(),r=n.getBoundingClientRect(),{dragItem:a,dragSource:l,gos:d}=this,c=t.clientX-r.left,u=t.clientY-r.top;return Z(d,{event:t,x:c,y:u,vDirection:i,hDirection:o,dragSource:l,fromNudge:s,dragItem:a,dropZoneTarget:n})}positionDragAndDropImageComp(e){const t=this.getDragAndDropImageComponent();t&&Up(t.getGui(),e,this.beans)}removeDragAndDropImageComponent(){const{dragAndDropImageComp:e}=this;if(e){const{comp:t}=e;if(t){const o=t.getGui();this.dragAndDropImageParent?.removeChild(o),this.destroyBean(t)}}this.dragAndDropImageComp=null}createDragAndDropImageComponent(){const{dragSource:e,gos:t,userCompFactory:o}=this;if(!e)return;const i=$g(o,Z(t,{dragSource:e}));if(!i)return;const s=i.newAgStackInstance();this.dragAndDropImageComp={promise:s},s.then(n=>{!n||!this.isAlive()||(this.processDragAndDropImageComponent(n),this.dragAndDropImageComp.comp=n)})}processDragAndDropImageComponent(e){const{dragSource:t,environment:o}=this;if(!t)return;const i=e.getGui();i.style.setProperty("position","absolute"),i.style.setProperty("z-index","9999"),Jc(this.gos,i),o.applyThemeClasses(i),e.setIcon(null,!1);let{dragItemName:s}=t;typeof s=="function"&&(s=s()),e.setLabel(s||""),i.style.top="20px",i.style.left="20px";const n=fa(this.beans);this.dragAndDropImageParent=n,n?n.appendChild(i):_(54)}registerGridDropTarget(e,t){const o={getContainer:e,isInterestedIn:i=>i===1||i===0,getIconName:()=>"notAllowed"};this.addDropTarget(o),t.addDestroyFunc(()=>this.removeDropTarget(o))}},zf=class{constructor(e){this.tickingInterval=null,this.onScrollCallback=null,this.scrollContainer=e.scrollContainer,this.scrollHorizontally=e.scrollAxis.indexOf("x")!==-1,this.scrollVertically=e.scrollAxis.indexOf("y")!==-1,this.scrollByTick=e.scrollByTick!=null?e.scrollByTick:20,e.onScrollCallback&&(this.onScrollCallback=e.onScrollCallback),this.scrollVertically&&(this.getVerticalPosition=e.getVerticalPosition,this.setVerticalPosition=e.setVerticalPosition),this.scrollHorizontally&&(this.getHorizontalPosition=e.getHorizontalPosition,this.setHorizontalPosition=e.setHorizontalPosition),this.shouldSkipVerticalScroll=e.shouldSkipVerticalScroll||(()=>!1),this.shouldSkipHorizontalScroll=e.shouldSkipHorizontalScroll||(()=>!1)}check(e,t=!1){const o=t||this.shouldSkipVerticalScroll();if(o&&this.shouldSkipHorizontalScroll())return;const i=this.scrollContainer.getBoundingClientRect(),s=this.scrollByTick;this.tickLeft=e.clientX<i.left+s,this.tickRight=e.clientX>i.right-s,this.tickUp=e.clientY<i.top+s&&!o,this.tickDown=e.clientY>i.bottom-s&&!o,this.tickLeft||this.tickRight||this.tickUp||this.tickDown?this.ensureTickingStarted():this.ensureCleared()}ensureTickingStarted(){this.tickingInterval===null&&(this.tickingInterval=window.setInterval(this.doTick.bind(this),100),this.tickCount=0)}doTick(){this.tickCount++;const e=this.tickCount>20?200:this.tickCount>10?80:40;if(this.scrollVertically){const t=this.getVerticalPosition();this.tickUp&&this.setVerticalPosition(t-e),this.tickDown&&this.setVerticalPosition(t+e)}if(this.scrollHorizontally){const t=this.getHorizontalPosition();this.tickLeft&&this.setHorizontalPosition(t-e),this.tickRight&&this.setHorizontalPosition(t+e)}this.onScrollCallback&&this.onScrollCallback()}ensureCleared(){this.tickingInterval&&(window.clearInterval(this.tickingInterval),this.tickingInterval=null)}};function Wf(e,t){const o=e.column===t.column,i=e.rowPinned===t.rowPinned,s=e.rowIndex===t.rowIndex;return o&&i&&s}function Uf(e,t){switch(e.rowPinned){case"top":if(t.rowPinned!=="top")return!0;break;case"bottom":if(t.rowPinned!=="bottom")return!1;break;default:if(j(t.rowPinned))return t.rowPinned!=="top";break}return e.rowIndex<t.rowIndex}function $f(e){let t=0,o;const{pinnedRowModel:i,rowModel:s,pageBounds:n}=e;return i?.getPinnedTopRowCount()?o="top":s.getRowCount()?(o=null,t=n.getFirstRow()):i?.getPinnedBottomRowCount()&&(o="bottom"),o===void 0?null:{rowIndex:t,rowPinned:o}}function jf(e){let t,o=null;const{pinnedRowModel:i,pageBounds:s}=e,n=i?.getPinnedBottomRowCount(),r=i?.getPinnedTopRowCount();return n?(o="bottom",t=n-1):e.rowModel.getRowCount()?(o=null,t=s.getLastRow()):r&&(o="top",t=r-1),t===void 0?null:{rowIndex:t,rowPinned:o}}function Da(e,t){switch(t.rowPinned){case"top":return e.pinnedRowModel?.getPinnedTopRow(t.rowIndex);case"bottom":return e.pinnedRowModel?.getPinnedBottomRow(t.rowIndex);default:return e.rowModel.getRow(t.rowIndex)}}function vs(e,t){const o=e.spannedRowRenderer?.getCellByPosition(t);if(o)return o;const i=e.rowRenderer.getRowByPosition(t);return i?i.getCellCtrl(t.column):null}function fn(e,t){const{rowIndex:o,rowPinned:i}=t,{pageBounds:s,pinnedRowModel:n,rowModel:r}=e;if(o===0)return i==="top"?null:i==="bottom"&&r.isRowsToRender()?{rowIndex:s.getLastRow(),rowPinned:null}:n?.isRowsToRender("top")?{rowIndex:n.getPinnedTopRowCount()-1,rowPinned:"top"}:null;const a=i?void 0:r.getRow(o);return eu(e,a,!0)??{rowIndex:o-1,rowPinned:i}}function ml(e,t){const{rowIndex:o,rowPinned:i}=t,{pageBounds:s,pinnedRowModel:n,rowModel:r}=e;if(Kf(e,t))return i==="bottom"?null:i==="top"&&r.isRowsToRender()?{rowIndex:s.getFirstRow(),rowPinned:null}:n?.isRowsToRender("bottom")?{rowIndex:0,rowPinned:"bottom"}:null;const a=i?void 0:r.getRow(o);return eu(e,a)??{rowIndex:o+1,rowPinned:i}}function eu(e,t,o){const{gos:i,rowRenderer:s}=e;if(!t?.sticky||!An(i))return;const n=o?s.getStickyTopRowCtrls():s.getStickyBottomRowCtrls();let r;for(let a=0;a<n.length;a++)if(n[a].rowNode.rowIndex===t.rowIndex){r=n[a+(o?-1:1)];break}return r?{rowIndex:r.rowNode.rowIndex,rowPinned:null}:void 0}function Kf(e,t){const{rowPinned:o,rowIndex:i}=t,{pinnedRowModel:s,pageBounds:n}=e;return o==="top"?(s?.getPinnedTopRowCount()??0)-1<=i:o==="bottom"?(s?.getPinnedBottomRowCount()??0)-1<=i:n.getLastRow()<=i}function tu(e,t,o){if(o===0)return!1;const i=Math.abs(e.clientX-t.clientX),s=Math.abs(e.clientY-t.clientY);return Math.max(i,s)<=o}var Yf=class extends M{constructor(){super(...arguments),this.beanName="dragSvc",this.dragEndFunctions=[],this.dragSources=[]}destroy(){const{dragSources:e}=this;e.forEach(this.removeListener.bind(this)),e.length=0,super.destroy()}removeListener(e){const t=e.dragSource.eElement,o=e.mouseDownListener;if(t.removeEventListener("mousedown",o),e.touchEnabled){const i=e.touchStartListener;t.removeEventListener("touchstart",i,{passive:!0})}}removeDragSource(e){const{dragSources:t}=this,o=t.find(i=>i.dragSource===e);o&&(this.removeListener(o),st(t,o))}addDragSource(e){const t=this.onMouseDown.bind(this,e),{eElement:o,includeTouch:i,stopPropagationForTouch:s}=e;o.addEventListener("mousedown",t);let n=null;const r=this.gos.get("suppressTouch");i&&!r&&(n=a=>{da(a.target)||(s&&a.stopPropagation(),this.onTouchStart(e,a))},o.addEventListener("touchstart",n,{passive:!1})),this.dragSources.push({dragSource:e,mouseDownListener:t,touchStartListener:n,touchEnabled:!!i})}onTouchStart(e,t){this.currentDragParams=e,this.dragging=!1;const o=t.touches[0];this.touchLastTime=o,this.touchStart=o;const i=l=>this.onTouchMove(l,e.eElement),s=l=>this.onTouchUp(l,e.eElement),n=l=>{l.cancelable&&l.preventDefault()},r=t.target,a=[{target:gi(this.beans),type:"touchmove",listener:n,options:{passive:!1}},{target:r,type:"touchmove",listener:i,options:{passive:!0}},{target:r,type:"touchend",listener:s,options:{passive:!0}},{target:r,type:"touchcancel",listener:s,options:{passive:!0}}];this.addTemporaryEvents(a),e.dragStartPixels===0&&this.onCommonMove(o,this.touchStart,e.eElement)}onMouseDown(e,t){const o=t;if(e.skipMouseEvent&&e.skipMouseEvent(t)||o._alreadyProcessedByDragService||(o._alreadyProcessedByDragService=!0,t.button!==0))return;this.shouldPreventMouseEvent(t)&&t.preventDefault(),this.currentDragParams=e,this.dragging=!1,this.mouseStartEvent=t,this.startTarget=t.target;const i=d=>this.onMouseMove(d,e.eElement),s=d=>this.onMouseUp(d,e.eElement),n=d=>d.preventDefault(),r=d=>{d.key===D.ESCAPE&&this.cancelDrag(e.eElement)},a=gi(this.beans),l=[{target:a,type:"mousemove",listener:i},{target:a,type:"mouseup",listener:s},{target:a,type:"contextmenu",listener:n},{target:a,type:"keydown",listener:r}];this.addTemporaryEvents(l),e.dragStartPixels===0&&this.onMouseMove(t,e.eElement)}addTemporaryEvents(e){e.forEach(t=>{const{target:o,type:i,listener:s,options:n}=t;o.addEventListener(i,s,n)}),this.dragEndFunctions.push(()=>{e.forEach(t=>{const{target:o,type:i,listener:s,options:n}=t;o.removeEventListener(i,s,n)})})}isEventNearStartEvent(e,t){const{dragStartPixels:o}=this.currentDragParams,i=j(o)?o:4;return tu(e,t,i)}getFirstActiveTouch(e){for(let t=0;t<e.length;t++)if(e[t].identifier===this.touchStart.identifier)return e[t];return null}onCommonMove(e,t,o){if(!this.dragging){if(this.isEventNearStartEvent(e,t))return;if(this.dragging=!0,this.eventSvc.dispatchEvent({type:"dragStarted",target:o}),this.currentDragParams.onDragStart(t),!this.currentDragParams){this.dragging=!1;return}this.currentDragParams.onDragging(t)}this.currentDragParams?.onDragging(e)}onTouchMove(e,t){const o=this.getFirstActiveTouch(e.touches);o&&this.onCommonMove(o,this.touchStart,t)}onMouseMove(e,t){Dn()&&Le(this.beans).getSelection()?.removeAllRanges(),this.shouldPreventMouseEvent(e)&&e.preventDefault(),this.onCommonMove(e,this.mouseStartEvent,t)}shouldPreventMouseEvent(e){const{gos:t}=this,o=t.get("enableCellTextSelection"),i=e.type==="mousemove",s=n=>!!n.target?.tagName.toLocaleLowerCase()?.match("^a$|textarea|input|select|button");return o&&i&&e.cancelable&&rs(t,e)&&!s(e)}onTouchUp(e,t){let o=this.getFirstActiveTouch(e.changedTouches);o||(o=this.touchLastTime),this.onUpCommon(o,t)}onMouseUp(e,t){this.onUpCommon(e,t)}onUpCommon(e,t){this.dragging&&(this.dragging=!1,this.currentDragParams.onDragStop(e),this.eventSvc.dispatchEvent({type:"dragStopped",target:t})),this.resetDragProperties()}cancelDrag(e){this.eventSvc.dispatchEvent({type:"dragCancelled",target:e}),this.currentDragParams?.onDragCancel?.(),this.resetDragProperties()}resetDragProperties(){this.mouseStartEvent=null,this.startTarget=null,this.touchStart=null,this.touchLastTime=null,this.currentDragParams=null;const{dragEndFunctions:e}=this;e.forEach(t=>t()),e.length=0}};function ou(e,t){return e+"_"+t}function Ie(e){return e instanceof iu}var iu=class extends M{constructor(e,t,o,i){super(),this.providedColumnGroup=e,this.groupId=t,this.partId=o,this.pinned=i,this.isColumn=!1,this.displayedChildren=[],this.autoHeaderHeight=null,this.parent=null}reset(){this.parent=null,this.children=null,this.displayedChildren=null}getParent(){return this.parent}getUniqueId(){return ou(this.groupId,this.partId)}isEmptyGroup(){return this.displayedChildren.length===0}isMoving(){const e=this.getProvidedColumnGroup().getLeafColumns();return!e||e.length===0?!1:e.every(t=>t.isMoving())}checkLeft(){if(this.displayedChildren.forEach(e=>{Ie(e)&&e.checkLeft()}),this.displayedChildren.length>0)if(this.gos.get("enableRtl")){const t=ve(this.displayedChildren).getLeft();this.setLeft(t)}else{const e=this.displayedChildren[0].getLeft();this.setLeft(e)}else this.setLeft(null)}getLeft(){return this.left}getOldLeft(){return this.oldLeft}setLeft(e){this.oldLeft=this.left,this.left!==e&&(this.left=e,this.dispatchLocalEvent({type:"leftChanged"}))}getPinned(){return this.pinned}getGroupId(){return this.groupId}getPartId(){return this.partId}getActualWidth(){let e=0;return this.displayedChildren?.forEach(t=>{e+=t.getActualWidth()}),e}isResizable(){if(!this.displayedChildren)return!1;let e=!1;return this.displayedChildren.forEach(t=>{t.isResizable()&&(e=!0)}),e}getMinWidth(){let e=0;return this.displayedChildren.forEach(t=>{e+=t.getMinWidth()}),e}addChild(e){this.children||(this.children=[]),this.children.push(e)}getDisplayedChildren(){return this.displayedChildren}getLeafColumns(){const e=[];return this.addLeafColumns(e),e}getDisplayedLeafColumns(){const e=[];return this.addDisplayedLeafColumns(e),e}getDefinition(){return this.providedColumnGroup.getColGroupDef()}getColGroupDef(){return this.providedColumnGroup.getColGroupDef()}isPadding(){return this.providedColumnGroup.isPadding()}isExpandable(){return this.providedColumnGroup.isExpandable()}isExpanded(){return this.providedColumnGroup.isExpanded()}setExpanded(e){this.providedColumnGroup.setExpanded(e)}isAutoHeaderHeight(){return!!this.getColGroupDef()?.autoHeaderHeight}getAutoHeaderHeight(){return this.autoHeaderHeight}setAutoHeaderHeight(e){const t=e!==this.autoHeaderHeight;return this.autoHeaderHeight=e,t}addDisplayedLeafColumns(e){this.displayedChildren.forEach(t=>{Ut(t)?e.push(t):Ie(t)&&t.addDisplayedLeafColumns(e)})}addLeafColumns(e){this.children.forEach(t=>{Ut(t)?e.push(t):Ie(t)&&t.addLeafColumns(e)})}getChildren(){return this.children}getColumnGroupShow(){return this.providedColumnGroup.getColumnGroupShow()}getProvidedColumnGroup(){return this.providedColumnGroup}getPaddingLevel(){const e=this.getParent();return!this.isPadding()||!e||!e.isPadding()?0:1+e.getPaddingLevel()}calculateDisplayedColumns(){this.displayedChildren=[];let e=this;for(;e!=null&&e.isPadding();)e=e.getParent();if(!(e?e.getProvidedColumnGroup().isExpandable():!1)){this.displayedChildren=this.children,this.dispatchLocalEvent({type:"displayedChildrenChanged"});return}this.children.forEach(o=>{if(Ie(o)&&(!o.displayedChildren||!o.displayedChildren.length))return;switch(o.getColumnGroupShow()){case"open":e.getProvidedColumnGroup().isExpanded()&&this.displayedChildren.push(o);break;case"closed":e.getProvidedColumnGroup().isExpanded()||this.displayedChildren.push(o);break;default:this.displayedChildren.push(o);break}}),this.dispatchLocalEvent({type:"displayedChildrenChanged"})}},mn="row-group-",qf="t-",Qf="b-",Xf=0,jo=class{constructor(e){this.master=!1,this.detail=void 0,this.rowIndex=null,this.key=null,this.sourceRowIndex=-1,this.childrenMapped={},this.treeNode=null,this.treeNodeFlags=0,this.displayed=!1,this.rowTop=null,this.oldRowTop=null,this.selectable=!0,this.__objectId=Xf++,this.alreadyRendered=!1,this.highlighted=null,this.hovered=!1,this.__selected=!1,this.beans=e}setData(e){this.setDataCommon(e,!1)}updateData(e){this.setDataCommon(e,!0)}setDataCommon(e,t){const{valueCache:o,selectionSvc:i,eventSvc:s}=this.beans,n=this.data;this.data=e,o?.onDataChanged(),this.updateDataOnDetailNode(),i?.updateRowSelectable(this),this.resetQuickFilterAggregateText();const r=this.createDataChangedEvent(e,n,t);this.__localEventService?.dispatchEvent(r),s.dispatchEvent({type:"rowNodeDataChanged",node:this})}updateDataOnDetailNode(){this.detailNode&&(this.detailNode.data=this.data)}createDataChangedEvent(e,t,o){return{type:"dataChanged",node:this,oldData:t,newData:e,update:o}}getRowIndexString(){return this.rowIndex==null?(ae(13),null):this.rowPinned==="top"?qf+this.rowIndex:this.rowPinned==="bottom"?Qf+this.rowIndex:this.rowIndex.toString()}setDataAndId(e,t){const{selectionSvc:o}=this.beans,i=o?.createDaemonNode?.(this),s=this.data;this.data=e,this.updateDataOnDetailNode(),this.setId(t),o&&(o.updateRowSelectable(this),o.syncInRowNode(this,i));const n=this.createDataChangedEvent(e,s,!1);this.__localEventService?.dispatchEvent(n)}setId(e){const t=es(this.beans.gos);if(t)if(this.data){const o=this.parent?.getRoute()??[];this.id=t({data:this.data,parentKeys:o.length>0?o:void 0,level:this.level,rowPinned:this.rowPinned}),this.id.startsWith(mn)&&ae(14,{groupPrefix:mn})}else this.id=void 0;else this.id=e}setRowTop(e){this.oldRowTop=this.rowTop,this.rowTop!==e&&(this.rowTop=e,this.dispatchRowEvent("topChanged"),this.setDisplayed(e!==null))}clearRowTopAndRowIndex(){this.oldRowTop=null,this.setRowTop(null),this.setRowIndex(null)}setHovered(e){this.hovered=e}isHovered(){return this.hovered}setRowHeight(e,t=!1){this.rowHeight=e,this.rowHeightEstimated=t,this.dispatchRowEvent("heightChanged")}setExpanded(e,t,o){this.beans.expansionSvc?.setExpanded(this,e,t,o)}setDataValue(e,t,o){const{colModel:i,valueSvc:s,gos:n,selectionSvc:r}=this.beans,a=typeof e!="string"?e:i.getCol(e)??i.getColDefCol(e);if(!a)return!1;const l=s.getValueForDisplay(a,this);if(n.get("readOnlyEdit")){const{beans:{eventSvc:c},data:u,rowIndex:p,rowPinned:g}=this;return c.dispatchEvent({type:"cellEditRequest",event:null,rowIndex:p,rowPinned:g,column:a,colDef:a.colDef,data:u,node:this,oldValue:l,newValue:t,value:t,source:o}),!1}const d=s.setValue(this,a,t,o);return this.dispatchCellChangedEvent(a,t,l),r?.updateRowSelectable(this),d}updateHasChildren(){let e=this.group&&!this.footer||this.childrenAfterGroup&&this.childrenAfterGroup.length>0;const{rowChildrenSvc:t}=this.beans;t&&(e=t.getHasChildrenValue(this)),e!==this.__hasChildren&&(this.__hasChildren=!!e,this.dispatchRowEvent("hasChildrenChanged"))}hasChildren(){return this.__hasChildren==null&&this.updateHasChildren(),this.__hasChildren}dispatchCellChangedEvent(e,t,o){const i={type:"cellChanged",node:this,column:e,newValue:t,oldValue:o};this.__localEventService?.dispatchEvent(i)}resetQuickFilterAggregateText(){this.quickFilterAggregateText=null}isExpandable(){return this.beans.expansionSvc?.isExpandable(this)??!1}isSelected(){return this.footer?this.sibling.isSelected():this.__selected}depthFirstSearch(e){this.childrenAfterGroup?.forEach(t=>t.depthFirstSearch(e)),e(this)}dispatchRowEvent(e){this.__localEventService?.dispatchEvent({type:e,node:this})}setSelected(e,t=!1,o="api"){this.beans.selectionSvc?.setNodesSelected({nodes:[this],newValue:e,clearSelection:t,source:o})}isRowPinned(){return!!this.rowPinned}__addEventListener(e,t){this.__localEventService||(this.__localEventService=new eo),this.__localEventService.addEventListener(e,t)}__removeEventListener(e,t){this.removeLocalListener(e,t)}addEventListener(e,t){this.beans.validation?.checkRowEvents(e),this.__localEventService||(this.__localEventService=new eo),this.frameworkEventListenerService=this.beans.frameworkOverrides.createLocalEventListenerWrapper?.(this.frameworkEventListenerService,this.__localEventService);const o=this.frameworkEventListenerService?.wrap(t)??t;this.__localEventService.addEventListener(e,o)}removeEventListener(e,t){const o=this.frameworkEventListenerService?.unwrap(t)??t;this.removeLocalListener(e,o)}removeLocalListener(e,t){this.__localEventService?.removeEventListener(e,t),this.__localEventService?.noRegisteredListenersExist()&&(this.__localEventService=null)}isFullWidthCell(){if(_(61),this.detail)return!0;const e=this.beans.gos.getCallback("isFullWidthRow");return e?e({rowNode:this}):!1}getRoute(){if(this.level===-1)return[];if(this.key==null)return;const e=[];let t=this;for(;t&&t.key!=null;)e.push(t.key),t=t.parent;return e.reverse()}setFirstChild(e){this.firstChild!==e&&(this.firstChild=e,this.dispatchRowEvent("firstChildChanged"))}setDisplayed(e){this.displayed!==e&&(this.displayed=e,this.dispatchRowEvent("displayedChanged"))}setRowIndex(e){this.rowIndex!==e&&(this.rowIndex=e,this.dispatchRowEvent("rowIndexChanged"))}setAllChildrenCount(e){this.allChildrenCount!==e&&(this.allChildrenCount=e,this.dispatchRowEvent("allChildrenCountChanged"))}setUiLevel(e){this.uiLevel!==e&&(this.uiLevel=e,this.dispatchRowEvent("uiLevelChanged"))}};function su(e,t,o){return Z(t,{type:o,node:e,data:e.data,rowIndex:e.rowIndex,rowPinned:e.rowPinned})}var Zf={tag:"div",cls:"ag-filter"},nu=class extends pe{constructor(e,t){super(Zf),this.column=e,this.source=t,this.filterWrapper=null}postConstruct(){this.createFilter(!0),this.addManagedEventListeners({filterDestroyed:this.onFilterDestroyed.bind(this)})}hasFilter(){return!!this.filterWrapper}getFilter(){return this.filterWrapper?.filterPromise??null}afterInit(){return this.filterWrapper?.filterPromise?.then(()=>{})??De.resolve()}afterGuiAttached(e){this.filterWrapper?.filterPromise?.then(t=>{t?.afterGuiAttached?.(e)})}afterGuiDetached(){this.filterWrapper?.filterPromise?.then(e=>{e?.afterGuiDetached?.()})}createFilter(e){const{column:t,source:o}=this;this.filterWrapper=this.beans.filterManager?.getOrCreateFilterWrapper(t)??null,this.filterWrapper?.filterPromise&&this.filterWrapper.filterPromise.then(i=>{const s=i.getGui();j(s)||_(69,{guiFromFilter:s}),this.appendChild(s),e&&this.eventSvc.dispatchEvent({type:"filterOpened",column:t,source:o,eGui:this.getGui()})})}onFilterDestroyed(e){(e.source==="api"||e.source==="paramsUpdated")&&e.column.getId()===this.column.getId()&&this.beans.colModel.getColDefCol(this.column)&&(ct(this.getGui()),this.createFilter())}destroy(){this.filterWrapper=null,super.destroy()}},ru="ag-resizer-wrapper",lo=(e,t)=>({tag:"div",ref:`${e}Resizer`,cls:`ag-resizer ag-resizer-${t}`}),Jf={tag:"div",cls:ru,children:[lo("eTopLeft","topLeft"),lo("eTop","top"),lo("eTopRight","topRight"),lo("eRight","right"),lo("eBottomRight","bottomRight"),lo("eBottom","bottom"),lo("eBottomLeft","bottomLeft"),lo("eLeft","left")]},Ma=class extends M{constructor(e,t){super(),this.element=e,this.dragStartPosition={x:0,y:0},this.position={x:0,y:0},this.lastSize={width:-1,height:-1},this.positioned=!1,this.resizersAdded=!1,this.resizeListeners=[],this.boundaryEl=null,this.isResizing=!1,this.isMoving=!1,this.resizable={},this.movable=!1,this.currentResizer=null,this.config=Object.assign({},{popup:!1},t)}wireBeans(e){this.popupSvc=e.popupSvc,this.dragSvc=e.dragSvc}center(){const{clientHeight:e,clientWidth:t}=this.offsetParent,o=t/2-this.getWidth()/2,i=e/2-this.getHeight()/2;this.offsetElement(o,i)}initialisePosition(){if(this.positioned)return;const{centered:e,forcePopupParentAsOffsetParent:t,minWidth:o,width:i,minHeight:s,height:n,x:r,y:a}=this.config;this.offsetParent||this.setOffsetParent();let l=0,d=0;const c=ht(this.element);if(c){const u=this.findBoundaryElement(),p=window.getComputedStyle(u);if(p.minWidth!=null){const g=u.offsetWidth-this.element.offsetWidth;d=parseInt(p.minWidth,10)-g}if(p.minHeight!=null){const g=u.offsetHeight-this.element.offsetHeight;l=parseInt(p.minHeight,10)-g}}if(this.minHeight=s||l,this.minWidth=o||d,i&&this.setWidth(i),n&&this.setHeight(n),(!i||!n)&&this.refreshSize(),e)this.center();else if(r||a)this.offsetElement(r,a);else if(c&&t){let u=this.boundaryEl,p=!0;if(u||(u=this.findBoundaryElement(),p=!1),u){const g=parseFloat(u.style.top),f=parseFloat(u.style.left);p?this.offsetElement(isNaN(f)?0:f,isNaN(g)?0:g):this.setPosition(f,g)}}this.positioned=!!this.offsetParent}isPositioned(){return this.positioned}getPosition(){return this.position}setMovable(e,t){if(!this.config.popup||e===this.movable)return;this.movable=e;const o=this.moveElementDragListener||{eElement:t,onDragStart:this.onMoveStart.bind(this),onDragging:this.onMove.bind(this),onDragStop:this.onMoveEnd.bind(this)};e?(this.dragSvc?.addDragSource(o),this.moveElementDragListener=o):(this.dragSvc?.removeDragSource(o),this.moveElementDragListener=void 0)}setResizable(e){if(this.clearResizeListeners(),e?this.addResizers():this.removeResizers(),typeof e=="boolean"){if(e===!1)return;e={topLeft:e,top:e,topRight:e,right:e,bottomRight:e,bottom:e,bottomLeft:e,left:e}}Object.keys(e).forEach(t=>{const i=!!e[t],s=this.getResizerElement(t),n={dragStartPixels:0,eElement:s,onDragStart:r=>this.onResizeStart(r,t),onDragging:this.onResize.bind(this),onDragStop:r=>this.onResizeEnd(r,t)};(i||!this.isAlive()&&!i)&&(i?(this.dragSvc?.addDragSource(n),this.resizeListeners.push(n),s.style.pointerEvents="all"):s.style.pointerEvents="none",this.resizable[t]=i)})}removeSizeFromEl(){this.element.style.removeProperty("height"),this.element.style.removeProperty("width"),this.element.style.removeProperty("flex")}restoreLastSize(){this.element.style.flex="0 0 auto";const{height:e,width:t}=this.lastSize;t!==-1&&(this.element.style.width=`${t}px`),e!==-1&&(this.element.style.height=`${e}px`)}getHeight(){return this.element.offsetHeight}setHeight(e){const{popup:t}=this.config,o=this.element;let i=!1;if(typeof e=="string"&&e.indexOf("%")!==-1)Oi(o,e),e=Xd(o),i=!0;else if(e=Math.max(this.minHeight,e),this.positioned){const s=this.getAvailableHeight();s&&e>s&&(e=s)}this.getHeight()!==e&&(i?(o.style.maxHeight="unset",o.style.minHeight="unset"):t?Oi(o,e):(o.style.height=`${e}px`,o.style.flex="0 0 auto",this.lastSize.height=typeof e=="number"?e:parseFloat(e)))}getAvailableHeight(){const{popup:e,forcePopupParentAsOffsetParent:t}=this.config;this.positioned||this.initialisePosition();const{clientHeight:o}=this.offsetParent;if(!o)return null;const i=this.element.getBoundingClientRect(),s=this.offsetParent.getBoundingClientRect(),n=e?this.position.y:i.top,r=e?0:s.top;let a=0;if(t){const d=this.element.parentElement;if(d){const{bottom:c}=d.getBoundingClientRect();a=c-i.bottom}}return o+r-n-a}getWidth(){return this.element.offsetWidth}setWidth(e){const t=this.element,{popup:o}=this.config;let i=!1;if(typeof e=="string"&&e.indexOf("%")!==-1)_t(t,e),e=en(t),i=!0;else if(this.positioned){e=Math.max(this.minWidth,e);const{clientWidth:s}=this.offsetParent,n=o?this.position.x:this.element.getBoundingClientRect().left;s&&e+n>s&&(e=s-n)}this.getWidth()!==e&&(i?(t.style.maxWidth="unset",t.style.minWidth="unset"):this.config.popup?_t(t,e):(t.style.width=`${e}px`,t.style.flex=" unset",this.lastSize.width=typeof e=="number"?e:parseFloat(e)))}offsetElement(e=0,t=0){const{forcePopupParentAsOffsetParent:o}=this.config,i=o?this.boundaryEl:this.element;i&&(this.popupSvc?.positionPopup({ePopup:i,keepWithinBounds:!0,skipObserver:this.movable||this.isResizable(),updatePosition:()=>({x:e,y:t})}),this.setPosition(parseFloat(i.style.left),parseFloat(i.style.top)))}constrainSizeToAvailableHeight(e){if(!this.config.forcePopupParentAsOffsetParent)return;const t=()=>{const o=this.getAvailableHeight();this.element.style.setProperty("max-height",`${o}px`)};e&&this.popupSvc?this.resizeObserverSubscriber=bo(this.beans,this.popupSvc?.getPopupParent(),t):(this.element.style.removeProperty("max-height"),this.resizeObserverSubscriber&&(this.resizeObserverSubscriber(),this.resizeObserverSubscriber=void 0))}setPosition(e,t){this.position.x=e,this.position.y=t}updateDragStartPosition(e,t){this.dragStartPosition={x:e,y:t}}calculateMouseMovement(e){const{e:t,isLeft:o,isTop:i,anywhereWithin:s,topBuffer:n}=e,r=t.clientX-this.dragStartPosition.x,a=t.clientY-this.dragStartPosition.y,l=this.shouldSkipX(t,!!o,!!s,r)?0:r,d=this.shouldSkipY(t,!!i,n,a)?0:a;return{movementX:l,movementY:d}}shouldSkipX(e,t,o,i){const s=this.element.getBoundingClientRect(),n=this.offsetParent.getBoundingClientRect(),r=this.boundaryEl.getBoundingClientRect(),a=this.config.popup?this.position.x:s.left;let l=a<=0&&n.left>=e.clientX||n.right<=e.clientX&&n.right<=r.right;return l?!0:(t?l=i<0&&e.clientX>a+n.left||i>0&&e.clientX<a+n.left:o?l=i<0&&e.clientX>r.right||i>0&&e.clientX<a+n.left:l=i<0&&e.clientX>r.right||i>0&&e.clientX<r.right,l)}shouldSkipY(e,t,o=0,i){const s=this.element.getBoundingClientRect(),n=this.offsetParent.getBoundingClientRect(),r=this.boundaryEl.getBoundingClientRect(),a=this.config.popup?this.position.y:s.top;let l=a<=0&&n.top>=e.clientY||n.bottom<=e.clientY&&n.bottom<=r.bottom;return l?!0:(t?l=i<0&&e.clientY>a+n.top+o||i>0&&e.clientY<a+n.top:l=i<0&&e.clientY>r.bottom||i>0&&e.clientY<r.bottom,l)}createResizeMap(){const e=t=>({element:this.element.querySelector(`[data-ref=${t}Resizer]`)});this.resizerMap={topLeft:e("eTopLeft"),top:e("eTop"),topRight:e("eTopRight"),right:e("eRight"),bottomRight:e("eBottomRight"),bottom:e("eBottom"),bottomLeft:e("eBottomLeft"),left:e("eLeft")}}addResizers(){if(this.resizersAdded)return;const e=this.element;e&&(e.appendChild(Pe(Jf)),this.createResizeMap(),this.resizersAdded=!0)}removeResizers(){this.resizerMap=void 0;const e=this.element.querySelector(`.${ru}`);e&&this.element.removeChild(e),this.resizersAdded=!1}getResizerElement(e){return this.resizerMap[e].element}onResizeStart(e,t){this.boundaryEl=this.findBoundaryElement(),this.positioned||this.initialisePosition(),this.currentResizer={isTop:!!t.match(/top/i),isRight:!!t.match(/right/i),isBottom:!!t.match(/bottom/i),isLeft:!!t.match(/left/i)},this.element.classList.add("ag-resizing"),this.resizerMap[t].element.classList.add("ag-active");const{popup:o,forcePopupParentAsOffsetParent:i}=this.config;!o&&!i&&this.applySizeToSiblings(this.currentResizer.isBottom||this.currentResizer.isTop),this.isResizing=!0,this.updateDragStartPosition(e.clientX,e.clientY)}getSiblings(){const t=this.element.parentElement;return t?Array.prototype.slice.call(t.children).filter(o=>!o.classList.contains("ag-hidden")):null}getMinSizeOfSiblings(){const e=this.getSiblings()||[];let t=0,o=0;for(let i=0;i<e.length;i++){const s=e[i],n=!!s.style.flex&&s.style.flex!=="0 0 auto";if(s===this.element)continue;let r=this.minHeight||0,a=this.minWidth||0;if(n){const l=window.getComputedStyle(s);l.minHeight&&(r=parseInt(l.minHeight,10)),l.minWidth&&(a=parseInt(l.minWidth,10))}else r=s.offsetHeight,a=s.offsetWidth;t+=r,o+=a}return{height:t,width:o}}applySizeToSiblings(e){let t=null;const o=this.getSiblings();if(o){for(let i=0;i<o.length;i++){const s=o[i];s!==t&&(e?s.style.height=`${s.offsetHeight}px`:s.style.width=`${s.offsetWidth}px`,s.style.flex="0 0 auto",s===this.element&&(t=o[i+1]))}t&&(t.style.removeProperty("height"),t.style.removeProperty("min-height"),t.style.removeProperty("max-height"),t.style.flex="1 1 auto")}}isResizable(){return Object.values(this.resizable).some(e=>e)}onResize(e){if(!this.isResizing||!this.currentResizer)return;const{popup:t,forcePopupParentAsOffsetParent:o}=this.config,{isTop:i,isRight:s,isBottom:n,isLeft:r}=this.currentResizer,a=s||r,l=n||i,{movementX:d,movementY:c}=this.calculateMouseMovement({e,isLeft:r,isTop:i}),u=this.position.x,p=this.position.y;let g=0,f=0;if(a&&d){const m=r?-1:1,C=this.getWidth(),v=C+d*m;let S=!1;r&&(g=C-v,(u+g<=0||v<=this.minWidth)&&(S=!0,g=0)),S||this.setWidth(v)}if(l&&c){const m=i?-1:1,C=this.getHeight(),v=C+c*m;let S=!1;i?(f=C-v,(p+f<=0||v<=this.minHeight)&&(S=!0,f=0)):!this.config.popup&&!this.config.forcePopupParentAsOffsetParent&&C<v&&this.getMinSizeOfSiblings().height+v>this.element.parentElement.offsetHeight&&(S=!0),S||this.setHeight(v)}this.updateDragStartPosition(e.clientX,e.clientY),((t||o)&&g||f)&&this.offsetElement(u+g,p+f)}onResizeEnd(e,t){this.isResizing=!1,this.currentResizer=null,this.boundaryEl=null,this.element.classList.remove("ag-resizing"),this.resizerMap[t].element.classList.remove("ag-active"),this.dispatchLocalEvent({type:"resize"})}refreshSize(){const e=this.element;this.config.popup&&(this.config.width||this.setWidth(e.offsetWidth),this.config.height||this.setHeight(e.offsetHeight))}onMoveStart(e){this.boundaryEl=this.findBoundaryElement(),this.positioned||this.initialisePosition(),this.isMoving=!0,this.element.classList.add("ag-moving"),this.updateDragStartPosition(e.clientX,e.clientY)}onMove(e){if(!this.isMoving)return;const{x:t,y:o}=this.position;let i;this.config.calculateTopBuffer&&(i=this.config.calculateTopBuffer());const{movementX:s,movementY:n}=this.calculateMouseMovement({e,isTop:!0,anywhereWithin:!0,topBuffer:i});this.offsetElement(t+s,o+n),this.updateDragStartPosition(e.clientX,e.clientY)}onMoveEnd(){this.isMoving=!1,this.boundaryEl=null,this.element.classList.remove("ag-moving")}setOffsetParent(){this.config.forcePopupParentAsOffsetParent&&this.popupSvc?this.offsetParent=this.popupSvc.getPopupParent():this.offsetParent=this.element.offsetParent}findBoundaryElement(){let e=this.element;for(;e;){if(window.getComputedStyle(e).position!=="static")return e;e=e.parentElement}return this.element}clearResizeListeners(){for(;this.resizeListeners.length;){const e=this.resizeListeners.pop();this.dragSvc?.removeDragSource(e)}}destroy(){super.destroy(),this.moveElementDragListener&&this.dragSvc?.removeDragSource(this.moveElementDragListener),this.constrainSizeToAvailableHeight(!1),this.clearResizeListeners(),this.removeResizers()}},au="ag-focus-managed",Si=class extends M{constructor(e,t={}){super(),this.eFocusable=e,this.callbacks=t,this.callbacks={shouldStopEventPropagation:()=>!1,onTabKeyDown:o=>{if(o.defaultPrevented)return;const i=Kt(this.beans,this.eFocusable,!1,o.shiftKey);i&&(i.focus(),o.preventDefault())},...t}}postConstruct(){const{eFocusable:e,callbacks:{onFocusIn:t,onFocusOut:o}}=this;e.classList.add(au),this.addKeyDownListeners(e),t&&this.addManagedElementListeners(e,{focusin:t}),o&&this.addManagedElementListeners(e,{focusout:o})}addKeyDownListeners(e){this.addManagedElementListeners(e,{keydown:t=>{if(t.defaultPrevented||Et(t))return;const{callbacks:o}=this;if(o.shouldStopEventPropagation(t)){oo(t);return}t.key===D.TAB?o.onTabKeyDown(t):o.handleKeyDown&&o.handleKeyDown(t)}})}},em={applyFilter:"Apply",clearFilter:"Clear",resetFilter:"Reset",cancelFilter:"Cancel",textFilter:"Text Filter",numberFilter:"Number Filter",dateFilter:"Date Filter",setFilter:"Set Filter",filterOoo:"Filter...",empty:"Choose one",equals:"Equals",notEqual:"Does not equal",lessThan:"Less than",greaterThan:"Greater than",inRange:"Between",inRangeStart:"From",inRangeEnd:"To",lessThanOrEqual:"Less than or equal to",greaterThanOrEqual:"Greater than or equal to",contains:"Contains",notContains:"Does not contain",startsWith:"Begins with",endsWith:"Ends with",blank:"Blank",notBlank:"Not blank",before:"Before",after:"After",andCondition:"AND",orCondition:"OR",dateFormatOoo:"yyyy-mm-dd"};function tm(e,t){const{debounceMs:o}=e;return zr(e)?(o!=null&&_(71),0):o??t}function zr(e){return(e.buttons?.indexOf("apply")??-1)>=0}var om=class extends pe{constructor(e){super(),this.filterNameKey=e,this.applyActive=!1,this.hidePopup=null,this.debouncePending=!1,this.appliedModel=null,this.eFilterBody=O,this.buttonListeners=[],this.defaultDebounceMs=0}postConstruct(){this.resetTemplate(),this.createManagedBean(new Si(this.getFocusableElement(),{handleKeyDown:this.handleKeyDown.bind(this)})),this.positionableFeature=new Ma(this.getPositionableElement(),{forcePopupParentAsOffsetParent:!0}),this.createBean(this.positionableFeature)}handleKeyDown(e){}getFilterTitle(){return this.translate(this.filterNameKey)}isFilterActive(){return!!this.appliedModel}resetTemplate(e){let t=this.getGui();t?.removeEventListener("submit",this.onFormSubmit);const o={tag:"form",cls:"ag-filter-wrapper",children:[{tag:"div",ref:"eFilterBody",cls:`ag-filter-body-wrapper ag-${this.getCssIdentifier()}-body-wrapper`,children:[this.createBodyTemplate()]}]};this.setTemplate(o,this.getAgComponents(),e),t=this.getGui(),t?.addEventListener("submit",this.onFormSubmit)}isReadOnly(){return!!this.params.readOnly}init(e){this.setParams(e),this.resetUiToDefaults(!0).then(()=>{this.updateUiVisibility(),this.setupOnBtApplyDebounce()})}setParams(e){this.params=e,this.applyActive=zr(e),this.resetButtonsPanel(e)}updateParams(e){this.params=e,this.applyActive=zr(e),this.resetUiToActiveModel(this.getModel(),()=>{this.updateUiVisibility(),this.setupOnBtApplyDebounce()})}resetButtonsPanel(e,t){const{buttons:o,readOnly:i}=t??{},{buttons:s,readOnly:n}=e;if(i===n&&Xi(o,s))return;const r=s&&s.length>0&&!this.isReadOnly();if(this.eButtonsPanel?(ct(this.eButtonsPanel),this.buttonListeners.forEach(d=>d()),this.buttonListeners=[]):r&&(this.eButtonsPanel=Pe({tag:"div",cls:"ag-filter-apply-panel"})),!r){this.eButtonsPanel&&Nt(this.eButtonsPanel);return}const a=document.createDocumentFragment(),l=d=>{let c;const u=d?this.translate(`${d}Filter`):void 0;switch(d){case"apply":c=f=>this.onBtApply(!1,!1,f);break;case"clear":c=()=>this.onBtClear();break;case"reset":c=()=>this.onBtReset();break;case"cancel":c=f=>{this.onBtCancel(f)};break;default:_(75);return}const g=Pn(`<button
5
+ type="${d==="apply"?"submit":"button"}"
6
+ data-ref="${d}FilterButton"
7
+ class="ag-button ag-standard-button ag-filter-apply-panel-button"
8
+ >${u}
9
+ </button>`);this.buttonListeners.push(...this.addManagedElementListeners(g,{click:c})),a.append(g)};s.forEach(d=>l(d)),this.eButtonsPanel.append(a),this.getGui().appendChild(this.eButtonsPanel)}setupOnBtApplyDebounce(){const e=tm(this.params,this.defaultDebounceMs),t=tt(this,this.checkApplyDebounce.bind(this),e);this.onBtApplyDebounce=()=>{this.debouncePending=!0,t()}}checkApplyDebounce(){this.debouncePending&&(this.debouncePending=!1,this.onBtApply())}getModel(){return this.appliedModel??null}setModel(e){return(e!=null?this.setModelIntoUi(e):this.resetUiToDefaults()).then(()=>{this.updateUiVisibility(),this.applyModel("api")})}onBtCancel(e){this.resetUiToActiveModel(this.getModel(),()=>{this.handleCancelEnd(e)})}handleCancelEnd(e){this.params.closeOnApply&&this.close(e)}resetUiToActiveModel(e,t){const o=()=>{this.onUiChanged(!1,"prevent"),t?.()};e!=null?this.setModelIntoUi(e).then(o):this.resetUiToDefaults().then(o)}onBtClear(){this.resetUiToDefaults().then(()=>this.onUiChanged())}onBtReset(){this.onBtClear(),this.onBtApply()}applyModel(e="api"){const t=this.getModelFromUi();if(!this.isModelValid(t))return!1;const o=this.appliedModel;return this.appliedModel=t,!this.areModelsEqual(o,t)}isModelValid(e){return!0}onFormSubmit(e){e.preventDefault()}onBtApply(e=!1,t=!1,o){o&&o.preventDefault(),this.applyModel(t?"rowDataUpdated":"ui")&&this.params.filterChangedCallback({afterFloatingFilter:e,afterDataChange:t,source:"columnFilter"});const{closeOnApply:i}=this.params;i&&this.applyActive&&!e&&!t&&this.close(o)}onNewRowsLoaded(){}close(e){if(!this.hidePopup)return;const t=e,o=t&&t.key;let i;(o==="Enter"||o==="Space")&&(i={keyboardEvent:t}),this.hidePopup(i),this.hidePopup=null}onUiChanged(e=!1,t){if(this.updateUiVisibility(),this.params.filterModifiedCallback(),this.applyActive&&!this.isReadOnly()){const o=this.isModelValid(this.getModelFromUi()),i=this.queryForHtmlElement('[data-ref="applyFilterButton"]');i&&ca(i,!o)}e&&!t||t==="immediately"?this.onBtApply(e):(!this.applyActive&&!t||t==="debounce")&&this.onBtApplyDebounce()}afterGuiAttached(e){e&&(this.hidePopup=e.hidePopup),this.refreshFilterResizer(e?.container)}refreshFilterResizer(e){const{positionableFeature:t,gos:o}=this;if(!t||e==="toolPanel")return;e==="floatingFilter"||e==="columnFilter"?(t.restoreLastSize(),t.setResizable(o.get("enableRtl")?{bottom:!0,bottomLeft:!0,left:!0}:{bottom:!0,bottomRight:!0,right:!0})):(t.removeSizeFromEl(),t.setResizable(!1)),t.constrainSizeToAvailableHeight(!0)}afterGuiDetached(){this.checkApplyDebounce(),this.positionableFeature?.constrainSizeToAvailableHeight(!1)}refresh(e){const t=this.params;return this.params=e,this.resetButtonsPanel(e,t),!0}destroy(){const e=this.getGui();e&&e.removeEventListener("submit",this.onFormSubmit),this.hidePopup=null,this.positionableFeature&&(this.positionableFeature=this.destroyBean(this.positionableFeature)),this.appliedModel=null,super.destroy()}translate(e){return this.getLocaleTextFunc()(e,em[e])}getCellValue(e){return this.params.getValue(e)}getPositionableElement(){return this.eFilterBody}};function im(e,t,o){if(t==null)return null;let i=null;const{compName:s,jsComp:n,fwComp:r}=af(e,t);return s?i={agSetColumnFilter:"agSetColumnFloatingFilter",agMultiColumnFilter:"agMultiColumnFloatingFilter",agGroupColumnFilter:"agGroupColumnFloatingFilter",agNumberColumnFilter:"agNumberColumnFloatingFilter",agDateColumnFilter:"agDateColumnFloatingFilter",agTextColumnFilter:"agTextColumnFloatingFilter"}[s]:n==null&&r==null&&t.filter===!0&&(i=o()),i}var Dt={AUTO_HEIGHT:"ag-layout-auto-height",NORMAL:"ag-layout-normal",PRINT:"ag-layout-print"},Pa=class extends M{constructor(e){super(),this.view=e}postConstruct(){this.addManagedPropertyListener("domLayout",this.updateLayoutClasses.bind(this)),this.updateLayoutClasses()}updateLayoutClasses(){const e=this.gos.get("domLayout"),t={autoHeight:e==="autoHeight",normal:e==="normal",print:e==="print"},o=t.autoHeight?Dt.AUTO_HEIGHT:t.print?Dt.PRINT:Dt.NORMAL;this.view.updateLayoutClasses(o,t)}},co="Viewport",Cl="fakeVScrollComp",vl=["fakeHScrollComp","centerHeader","topCenter","bottomCenter","stickyTopCenter","stickyBottomCenter"],wl=100,Zn=150,sm=class extends M{constructor(e){super(),this.lastScrollSource=[null,null],this.scrollLeft=-1,this.nextScrollTop=-1,this.scrollTop=-1,this.lastOffsetHeight=-1,this.lastScrollTop=-1,this.lastIsHorizontalScrollShowing=!1,this.scrollTimer=0,this.isVerticalPositionInvalidated=!0,this.isHorizontalPositionInvalidated=!0,this.eBodyViewport=e,this.resetLastHScrollDebounced=tt(this,()=>this.lastScrollSource[1]=null,Zn),this.resetLastVScrollDebounced=tt(this,()=>this.lastScrollSource[0]=null,Zn)}wireBeans(e){this.ctrlsSvc=e.ctrlsSvc,this.animationFrameSvc=e.animationFrameSvc,this.visibleCols=e.visibleCols}destroy(){super.destroy(),window.clearTimeout(this.scrollTimer)}postConstruct(){this.enableRtl=this.gos.get("enableRtl");const e=this.invalidateVerticalScroll.bind(this),t=this.invalidateHorizontalScroll.bind(this);this.addManagedEventListeners({displayedColumnsWidthChanged:this.onDisplayedColumnsWidthChanged.bind(this),gridSizeChanged:e,scrollGapChanged:t}),this.addManagedElementListeners(this.eBodyViewport,{scroll:e}),this.ctrlsSvc.whenReady(this,o=>{this.centerRowsCtrl=o.center,this.onDisplayedColumnsWidthChanged(),this.addScrollListener()})}invalidateHorizontalScroll(){this.isHorizontalPositionInvalidated=!0}invalidateVerticalScroll(){this.isVerticalPositionInvalidated=!0}addScrollListener(){this.addHorizontalScrollListeners(),this.addVerticalScrollListeners()}addHorizontalScrollListeners(){this.addManagedElementListeners(this.centerRowsCtrl.eViewport,{scroll:this.onHScroll.bind(this,co)});for(const e of vl){const t=this.ctrlsSvc.get(e);this.registerScrollPartner(t,this.onHScroll.bind(this,e))}}addVerticalScrollListeners(){const e=this.ctrlsSvc.get("fakeVScrollComp"),t=this.gos.get("debounceVerticalScrollbar"),o=t?tt(this,this.onVScroll.bind(this,co),wl):this.onVScroll.bind(this,co),i=t?tt(this,this.onVScroll.bind(this,Cl),wl):this.onVScroll.bind(this,Cl);this.addManagedElementListeners(this.eBodyViewport,{scroll:o}),this.registerScrollPartner(e,i)}registerScrollPartner(e,t){e.onScrollCallback(t)}onDisplayedColumnsWidthChanged(){this.enableRtl&&this.horizontallyScrollHeaderCenterAndFloatingCenter()}horizontallyScrollHeaderCenterAndFloatingCenter(e){this.centerRowsCtrl!=null&&(e===void 0&&(e=this.centerRowsCtrl.getCenterViewportScrollLeft()),this.setScrollLeftForAllContainersExceptCurrent(Math.abs(e)))}setScrollLeftForAllContainersExceptCurrent(e){for(const t of[...vl,co]){if(this.lastScrollSource[1]===t)continue;const o=this.getViewportForSource(t);on(o,e,this.enableRtl)}}getViewportForSource(e){return e===co?this.centerRowsCtrl.eViewport:this.ctrlsSvc.get(e).eViewport}isControllingScroll(e,t){return this.lastScrollSource[t]==null?(t===0?this.lastScrollSource[0]=e:this.lastScrollSource[1]=e,!0):this.lastScrollSource[t]===e}onHScroll(e){if(!this.isControllingScroll(e,1))return;const t=this.centerRowsCtrl.eViewport,{scrollLeft:o}=t;if(this.shouldBlockScrollUpdate(1,o,!0))return;const i=tn(this.getViewportForSource(e),this.enableRtl);this.doHorizontalScroll(i),this.resetLastHScrollDebounced()}onVScroll(e){if(!this.isControllingScroll(e,0))return;let t;if(e===co?t=this.eBodyViewport.scrollTop:t=this.ctrlsSvc.get("fakeVScrollComp").getScrollPosition(),this.shouldBlockScrollUpdate(0,t,!0))return;const{animationFrameSvc:o}=this;o?.setScrollTop(t),this.nextScrollTop=t,e===co?this.ctrlsSvc.get("fakeVScrollComp").setScrollPosition(t):this.eBodyViewport.scrollTop=t,o?.active?o.schedule():this.scrollGridIfNeeded(!0),this.resetLastVScrollDebounced()}doHorizontalScroll(e){const t=this.ctrlsSvc.get("fakeHScrollComp").getScrollPosition();this.scrollLeft===e&&e===t||(this.scrollLeft=e,this.fireScrollEvent(1),this.horizontallyScrollHeaderCenterAndFloatingCenter(e),this.centerRowsCtrl.onHorizontalViewportChanged(!0))}fireScrollEvent(e){const t={type:"bodyScroll",direction:e===1?"horizontal":"vertical",left:this.scrollLeft,top:this.scrollTop};this.eventSvc.dispatchEvent(t),window.clearTimeout(this.scrollTimer),this.scrollTimer=window.setTimeout(()=>{this.scrollTimer=0,this.eventSvc.dispatchEvent({...t,type:"bodyScrollEnd"})},Zn)}shouldBlockScrollUpdate(e,t,o=!1){return o&&!ko()?!1:e===0?this.shouldBlockVerticalScroll(t):this.shouldBlockHorizontalScroll(t)}shouldBlockVerticalScroll(e){const t=Mn(this.eBodyViewport),{scrollHeight:o}=this.eBodyViewport;return e<0||e+t>o}shouldBlockHorizontalScroll(e){const t=this.centerRowsCtrl.getCenterWidth(),{scrollWidth:o}=this.centerRowsCtrl.eViewport;if(this.enableRtl){if(e>0)return!0}else if(e<0)return!0;return Math.abs(e)+t>o}redrawRowsAfterScroll(){this.fireScrollEvent(0)}checkScrollLeft(){this.scrollLeft!==this.centerRowsCtrl.getCenterViewportScrollLeft()&&this.onHScroll(co)}scrollGridIfNeeded(e=!1){const t=this.scrollTop!=this.nextScrollTop;return t&&(this.scrollTop=this.nextScrollTop,e&&this.invalidateVerticalScroll(),this.redrawRowsAfterScroll()),t}setHorizontalScrollPosition(e,t=!1){const i=this.centerRowsCtrl.eViewport.scrollWidth-this.centerRowsCtrl.getCenterWidth();!t&&this.shouldBlockScrollUpdate(1,e)&&(this.enableRtl?e=e>0?0:i:e=Math.min(Math.max(e,0),i)),on(this.centerRowsCtrl.eViewport,Math.abs(e),this.enableRtl),this.doHorizontalScroll(e)}setVerticalScrollPosition(e){this.invalidateVerticalScroll(),this.eBodyViewport.scrollTop=e}getVScrollPosition(){if(!this.isVerticalPositionInvalidated){const{lastOffsetHeight:o,lastScrollTop:i}=this;return{top:i,bottom:i+o}}this.isVerticalPositionInvalidated=!1;const{scrollTop:e,offsetHeight:t}=this.eBodyViewport;return this.lastScrollTop=e,this.lastOffsetHeight=t,{top:e,bottom:e+t}}getApproximateVScollPosition(){return this.lastScrollTop>=0&&this.lastOffsetHeight>=0?{top:this.scrollTop,bottom:this.scrollTop+this.lastOffsetHeight}:this.getVScrollPosition()}getHScrollPosition(){return this.centerRowsCtrl.getHScrollPosition()}isHorizontalScrollShowing(){return this.isHorizontalPositionInvalidated&&(this.lastIsHorizontalScrollShowing=this.centerRowsCtrl.isHorizontalScrollShowing(),this.isHorizontalPositionInvalidated=!1),this.lastIsHorizontalScrollShowing}scrollHorizontally(e){const t=this.centerRowsCtrl.eViewport.scrollLeft;return this.setHorizontalScrollPosition(t+e),this.centerRowsCtrl.eViewport.scrollLeft-t}scrollToTop(){this.eBodyViewport.scrollTop=0}ensureNodeVisible(e,t=null){const{rowModel:o}=this.beans,i=o.getRowCount();let s=-1;for(let n=0;n<i;n++){const r=o.getRow(n);if(typeof e=="function"){if(r&&e(r)){s=n;break}}else if(e===r||e===r.data){s=n;break}}s>=0&&this.ensureIndexVisible(s,t)}ensureIndexVisible(e,t){if(We(this.gos,"print"))return;const{rowModel:o}=this.beans,i=o.getRowCount();if(typeof e!="number"||e<0||e>=i){_(88,{index:e});return}const{frameworkOverrides:s,pageBounds:n,rowContainerHeight:r,rowRenderer:a}=this.beans;s.wrapIncoming(()=>{const l=this.ctrlsSvc.getGridBodyCtrl(),d=o.getRow(e);let c,u,p=0;this.invalidateVerticalScroll();do{const{stickyTopHeight:g,stickyBottomHeight:f}=l,m=d.rowTop,C=d.rowHeight,v=n.getPixelOffset(),S=d.rowTop-v,b=S+d.rowHeight,x=this.getVScrollPosition(),T=r.divStretchOffset,A=x.top+T,P=x.bottom+T,y=P-A,w=r.getScrollPositionForPixel(S),R=r.getScrollPositionForPixel(b-y),F=Math.min((w+R)/2,S),H=A+g>S,z=P-f<b;let k=null;t==="top"?k=w-g:t==="bottom"?k=R+f:t==="middle"?k=F:H?k=w-g:z&&(k=R+f),k!==null&&(this.setVerticalScrollPosition(k),a.redraw({afterScroll:!0})),c=m!==d.rowTop||C!==d.rowHeight,u=g!==l.stickyTopHeight||f!==l.stickyBottomHeight,p++}while((c||u)&&p<10);this.animationFrameSvc?.flushAllFrames()})}ensureColumnVisible(e,t="auto"){const{colModel:o,frameworkOverrides:i}=this.beans,s=o.getCol(e);if(!s||s.isPinned()||!this.visibleCols.isColDisplayed(s))return;const n=this.getPositionedHorizontalScroll(s,t);i.wrapIncoming(()=>{n!==null&&this.centerRowsCtrl.setCenterViewportScrollLeft(n),this.centerRowsCtrl.onHorizontalViewportChanged(),this.animationFrameSvc?.flushAllFrames()})}getPositionedHorizontalScroll(e,t){const{columnBeforeStart:o,columnAfterEnd:i}=this.isColumnOutsideViewport(e),s=this.centerRowsCtrl.getCenterWidth()<e.getActualWidth(),n=this.centerRowsCtrl.getCenterWidth(),r=this.enableRtl;let a=(r?o:i)||s,l=r?i:o;t!=="auto"&&(a=t==="start",l=t==="end");const d=t==="middle";if(a||l||d){const{colLeft:c,colMiddle:u,colRight:p}=this.getColumnBounds(e);return d?u-n/2:a?r?p:c:r?c-n:p-n}return null}isColumnOutsideViewport(e){const{start:t,end:o}=this.getViewportBounds(),{colLeft:i,colRight:s}=this.getColumnBounds(e),n=this.enableRtl,r=n?t>s:o<s,a=n?o<i:t>i;return{columnBeforeStart:r,columnAfterEnd:a}}getColumnBounds(e){const t=this.enableRtl,o=this.visibleCols.bodyWidth,i=e.getActualWidth(),s=e.getLeft(),n=t?-1:1,r=t?o-s:s,a=r+i*n,l=r+i/2*n;return{colLeft:r,colMiddle:l,colRight:a}}getViewportBounds(){const e=this.centerRowsCtrl.getCenterWidth(),t=this.centerRowsCtrl.getCenterViewportScrollLeft(),o=t,i=e+t;return{start:o,end:i,width:e}}},Ea=class extends M{constructor(e,t=!1){super(),this.callback=e,this.addSpacer=t}postConstruct(){const e=this.setWidth.bind(this);this.addManagedPropertyListener("domLayout",e),this.addManagedEventListeners({columnContainerWidthChanged:e,displayedColumnsChanged:e,leftPinnedWidthChanged:e}),this.addSpacer&&this.addManagedEventListeners({rightPinnedWidthChanged:e,scrollVisibilityChanged:e,scrollbarWidthChanged:e}),this.setWidth()}setWidth(){const e=We(this.gos,"print"),{visibleCols:t,scrollVisibleSvc:o}=this.beans,i=t.bodyWidth,s=t.getColsLeftWidth(),n=t.getDisplayedColumnsRightWidth();let r;e?r=i+s+n:(r=i,this.addSpacer&&(this.gos.get("enableRtl")?s:n)===0&&o.verticalScrollShowing&&(r+=o.getScrollbarWidth())),this.callback(r)}},nm=class extends M{constructor(e){super(),this.centerContainerCtrl=e}wireBeans(e){this.scrollVisibleSvc=e.scrollVisibleSvc}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.gridBodyCtrl=e.gridBodyCtrl,this.listenForResize()}),this.addManagedEventListeners({scrollbarWidthChanged:this.onScrollbarWidthChanged.bind(this)}),this.addManagedPropertyListeners(["alwaysShowHorizontalScroll","alwaysShowVerticalScroll"],()=>{this.checkViewportAndScrolls()})}listenForResize(){const{beans:e,centerContainerCtrl:t,gridBodyCtrl:o}=this,i=()=>{Tt(e,()=>{this.onCenterViewportResized()})};t.registerViewportResizeListener(i),o.registerBodyViewportResizeListener(i)}onScrollbarWidthChanged(){this.checkViewportAndScrolls()}onCenterViewportResized(){if(this.scrollVisibleSvc.updateScrollGap(),this.centerContainerCtrl.isViewportInTheDOMTree()){const{pinnedCols:e,colFlex:t}=this.beans;e?.keepPinnedColumnsNarrowerThanViewport(),this.checkViewportAndScrolls();const o=this.centerContainerCtrl.getCenterWidth();o!==this.centerWidth&&(this.centerWidth=o,t?.refreshFlexedColumns({viewportWidth:this.centerWidth,updateBodyWidths:!0,fireResizedEvent:!0}))}else this.bodyHeight=0}checkViewportAndScrolls(){this.updateScrollVisibleService(),this.checkBodyHeight(),this.onHorizontalViewportChanged(),this.gridBodyCtrl.scrollFeature.checkScrollLeft()}getBodyHeight(){return this.bodyHeight}checkBodyHeight(){const e=this.gridBodyCtrl.eBodyViewport,t=Mn(e);this.bodyHeight!==t&&(this.bodyHeight=t,this.eventSvc.dispatchEvent({type:"bodyHeightChanged"}))}updateScrollVisibleService(){this.updateScrollVisibleServiceImpl(),setTimeout(this.updateScrollVisibleServiceImpl.bind(this),500)}updateScrollVisibleServiceImpl(){const e={horizontalScrollShowing:this.centerContainerCtrl.isHorizontalScrollShowing(),verticalScrollShowing:this.gridBodyCtrl.isVerticalScrollShowing()};this.scrollVisibleSvc.setScrollsVisible(e)}onHorizontalViewportChanged(){const e=this.centerContainerCtrl.getCenterWidth(),t=this.centerContainerCtrl.getViewportScrollLeft();this.beans.colViewport.setScrollPosition(e,t)}};function rm(e,t,o,i,s,n){if(o==null&&t==null)return;const r={},a={},l=(d,c)=>{d.split(" ").forEach(u=>{u.trim()!=""&&c(u)})};if(o){const d=Object.keys(o);for(let c=0;c<d.length;c++){const u=d[c],p=o[u];let g;typeof p=="string"?g=e?e.evaluate(p,i):!0:typeof p=="function"&&(g=p(i)),l(u,f=>{g?r[f]=!0:a[f]=!0})}}n&&Object.keys(a).forEach(n),Object.keys(r).forEach(s)}function Sl(e){if(e.group)return e.level;const t=e.parent;return t?t.level+1:0}var am=class extends M{constructor(){super(...arguments),this.beanName="rowStyleSvc"}processClassesFromGridOptions(e,t){const o=this.gos,i=r=>{typeof r=="string"?e.push(r):Array.isArray(r)&&r.forEach(a=>e.push(a))},s=o.get("rowClass");s&&i(s);const n=o.getCallback("getRowClass");if(n){const r={data:t.data,node:t,rowIndex:t.rowIndex},a=n(r);i(a)}}preProcessRowClassRules(e,t){this.processRowClassRules(t,o=>{e.push(o)},()=>{})}processRowClassRules(e,t,o){const{gos:i,expressionSvc:s}=this.beans,n=Z(i,{data:e.data,node:e,rowIndex:e.rowIndex});rm(s,void 0,i.get("rowClassRules"),n,t,o)}processStylesFromGridOptions(e){const t=this.gos,o=t.get("rowStyle"),i=t.getCallback("getRowStyle");let s;if(i){const n={data:e.data,node:e,rowIndex:e.rowIndex};s=i(n)}if(s||o)return Object.assign({},o,s)}},lm=0,Cn="renderedRow",Wr=class extends M{constructor(e,t,o,i,s){super(),this.rowNode=e,this.useAnimationFrameForCreate=i,this.printLayout=s,this.allRowGuis=[],this.active=!0,this.centerCellCtrls={list:[],map:{}},this.leftCellCtrls={list:[],map:{}},this.rightCellCtrls={list:[],map:{}},this.slideInAnimation={left:!1,center:!1,right:!1,fullWidth:!1},this.fadeInAnimation={left:!1,center:!1,right:!1,fullWidth:!1},this.rowDragComps=[],this.lastMouseDownOnDragger=!1,this.emptyStyle={},this.updateColumnListsPending=!1,this.rowId=null,this.businessKey=null,this.beans=t,this.gos=t.gos,this.paginationPage=t.pagination?.getCurrentPage()??0,this.suppressRowTransform=this.gos.get("suppressRowTransform"),this.instanceId=e.id+"-"+lm++,this.rowId=St(e.id),this.initRowBusinessKey(),this.rowFocused=t.focusSvc.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned),this.rowLevel=Sl(this.rowNode),this.setRowType(),this.setAnimateFlags(o),this.rowStyles=this.processStylesFromGridOptions(),this.addListeners()}initRowBusinessKey(){this.businessKeyForNodeFunc=this.gos.get("getBusinessKeyForNode"),this.updateRowBusinessKey()}updateRowBusinessKey(){if(typeof this.businessKeyForNodeFunc!="function")return;const e=this.businessKeyForNodeFunc(this.rowNode);this.businessKey=St(e)}updateGui(e,t){e==="left"?this.leftGui=t:e==="right"?this.rightGui=t:e==="fullWidth"?this.fullWidthGui=t:this.centerGui=t}setComp(e,t,o,i){const{context:s,focusSvc:n}=this.beans;i=cs(this,s,i);const r={rowComp:e,element:t,containerType:o,compBean:i};this.allRowGuis.push(r),this.updateGui(o,r),this.initialiseRowComp(r);const a=this.rowNode,l=this.rowType==="FullWidthLoading"||a.stub,d=!a.data&&this.beans.rowModel.getType()==="infinite";!l&&!d&&!a.rowPinned&&this.beans.rowRenderer.dispatchFirstDataRenderedEvent();const c=this.fullWidthGui?.element;c&&!this.editing&&n.isRowFocused(a.rowIndex,a.rowPinned)&&n.shouldTakeFocus()&&setTimeout(()=>c.focus({preventScroll:!0}),0)}unsetComp(e){this.allRowGuis=this.allRowGuis.filter(t=>t.containerType!==e),this.updateGui(e,void 0)}isCacheable(){return this.rowType==="FullWidthDetail"&&this.gos.get("keepDetailRows")}setCached(e){const t=e?"none":"";this.allRowGuis.forEach(o=>o.element.style.display=t)}initialiseRowComp(e){const t=this.gos;this.onSuppressCellFocusChanged(this.beans.gos.get("suppressCellFocus")),this.listenOnDomOrder(e),this.onRowHeightChanged(e),this.updateRowIndexes(e),this.setFocusedClasses(e),this.setStylesFromGridOptions(!1,e),Ht(t)&&this.rowNode.selectable&&this.onRowSelected(e),this.updateColumnLists(!this.useAnimationFrameForCreate);const o=e.rowComp;this.getInitialRowClasses(e.containerType).forEach(s=>o.addOrRemoveCssClass(s,!0)),this.executeSlideAndFadeAnimations(e),this.rowNode.group&&to(e.element,this.rowNode.expanded==!0),this.setRowCompRowId(o),this.setRowCompRowBusinessKey(o),pi(t,e.element,Cn,this),e.compBean.addDestroyFunc(()=>pi(t,e.element,Cn,null)),this.useAnimationFrameForCreate?this.beans.animationFrameSvc.createTask(this.addHoverFunctionality.bind(this,e),this.rowNode.rowIndex,"p2",!1):this.addHoverFunctionality(e),this.isFullWidth()&&this.setupFullWidth(e),t.get("rowDragEntireRow")&&this.addRowDraggerToRow(e),this.useAnimationFrameForCreate&&this.beans.animationFrameSvc.addDestroyTask(()=>{this.isAlive()&&e.rowComp.addOrRemoveCssClass("ag-after-created",!0)}),this.executeProcessRowPostCreateFunc()}setRowCompRowBusinessKey(e){this.businessKey!=null&&e.setRowBusinessKey(this.businessKey)}setRowCompRowId(e){const t=St(this.rowNode.id);this.rowId=t,t!=null&&e.setRowId(t)}executeSlideAndFadeAnimations(e){const{containerType:t}=e;this.slideInAnimation[t]&&(kr(()=>{this.onTopChanged()}),this.slideInAnimation[t]=!1),this.fadeInAnimation[t]&&(kr(()=>{e.rowComp.addOrRemoveCssClass("ag-opacity-zero",!1)}),this.fadeInAnimation[t]=!1)}addRowDraggerToRow(e){const t=this.beans.rowDragSvc?.createRowDragCompForRow(this.rowNode,e.element);if(!t)return;const o=this.createBean(t,this.beans.context);this.rowDragComps.push(o),e.compBean.addDestroyFunc(()=>{this.rowDragComps=this.rowDragComps.filter(i=>i!==o),this.destroyBean(o,this.beans.context)})}setupFullWidth(e){const t=this.getPinnedForContainer(e.containerType),o=this.createFullWidthCompDetails(e.element,t);e.rowComp.showFullWidth(o)}getFullWidthCellRenderers(){return this.gos.get("embedFullWidthRows")?this.allRowGuis.map(e=>e?.rowComp?.getFullWidthCellRenderer()):[this.fullWidthGui?.rowComp?.getFullWidthCellRenderer()]}executeProcessRowPostCreateFunc(){const e=this.gos.getCallback("processRowPostCreate");if(!e||!this.areAllContainersReady())return;const t={eRow:this.centerGui.element,ePinnedLeftRow:this.leftGui?this.leftGui.element:void 0,ePinnedRightRow:this.rightGui?this.rightGui.element:void 0,node:this.rowNode,rowIndex:this.rowNode.rowIndex,addRenderedRowListener:this.addEventListener.bind(this)};e(t)}areAllContainersReady(){const{leftGui:e,centerGui:t,rightGui:o,beans:{visibleCols:i}}=this,s=!!e||!i.isPinningLeft(),n=!!t,r=!!o||!i.isPinningRight();return s&&n&&r}isNodeFullWidthCell(){if(this.rowNode.detail)return!0;const e=this.beans.gos.getCallback("isFullWidthRow");return e?e({rowNode:this.rowNode}):!1}setRowType(){const e=this.rowNode.stub&&!this.gos.get("suppressServerSideFullWidthLoadingRow")&&!this.gos.get("groupHideOpenParents"),t=this.isNodeFullWidthCell(),o=this.gos.get("masterDetail")&&this.rowNode.detail,i=this.beans.colModel.isPivotMode(),n=!!this.rowNode.group&&!this.rowNode.footer&&Tn(this.gos,i);e?this.rowType="FullWidthLoading":o?this.rowType="FullWidthDetail":t?this.rowType="FullWidth":n?this.rowType="FullWidthGroup":this.rowType="Normal"}updateColumnLists(e=!1,t=!1){if(this.isFullWidth())return;const{animationFrameSvc:o}=this.beans;if(!o?.active||e||this.printLayout){this.updateColumnListsImpl(t);return}this.updateColumnListsPending||(o.createTask(()=>{this.active&&this.updateColumnListsImpl(!0)},this.rowNode.rowIndex,"p1",!1),this.updateColumnListsPending=!0)}getNewCellCtrl(e){if(!this.beans.rowSpanSvc?.isCellSpanning(e,this.rowNode))return new Ns(e,this.rowNode,this.beans,this)}isCorrectCtrlForSpan(e){return!this.beans.rowSpanSvc?.isCellSpanning(e.column,this.rowNode)}createCellCtrls(e,t,o=null){const i={list:[],map:{}},s=(d,c,u)=>{u!=null?i.list.splice(u,0,c):i.list.push(c),i.map[d]=c},n=[];for(const d of t){const c=d.getInstanceId();let u=e.map[c];u&&!this.isCorrectCtrlForSpan(u)&&(u.destroy(),u=void 0),u||(u=this.getNewCellCtrl(d)),u&&s(c,u)}for(const d of e.list){const c=d.column.getInstanceId();if(i.map[c]!=null)continue;!this.isCellEligibleToBeRemoved(d,o)?n.push([c,d]):d.destroy()}if(n.length)for(const[d,c]of n){const u=i.list.findIndex(g=>g.column.getLeft()>c.column.getLeft()),p=u===-1?void 0:Math.max(u-1,0);s(d,c,p)}const{focusSvc:r,visibleCols:a}=this.beans,l=r.getFocusedCell();if(l&&l.column.getPinned()==o){const d=l.column.getInstanceId();if(!i.map[d]&&a.allCols.includes(l.column)){const u=this.createFocusedCellCtrl();if(u){const p=i.list.findIndex(f=>f.column.getLeft()>u.column.getLeft()),g=p===-1?void 0:Math.max(p-1,0);s(d,u,g)}}}return i}createFocusedCellCtrl(){const{focusSvc:e,rowSpanSvc:t}=this.beans,o=e.getFocusedCell();if(!o)return;const i=t?.getCellSpan(o.column,this.rowNode);if(i){if(i.firstNode!==this.rowNode||!i.doesSpanContain(o))return}else if(!e.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned))return;return this.getNewCellCtrl(o.column)}updateColumnListsImpl(e){this.updateColumnListsPending=!1,this.createAllCellCtrls(),this.setCellCtrls(e)}setCellCtrls(e){this.allRowGuis.forEach(t=>{const o=this.getCellCtrlsForContainer(t.containerType);t.rowComp.setCellCtrls(o,e)})}getCellCtrlsForContainer(e){switch(e){case"left":return this.leftCellCtrls.list;case"right":return this.rightCellCtrls.list;case"fullWidth":return[];case"center":return this.centerCellCtrls.list}}createAllCellCtrls(){const e=this.beans.colViewport,t=this.beans.visibleCols;if(this.printLayout)this.centerCellCtrls=this.createCellCtrls(this.centerCellCtrls,t.allCols),this.leftCellCtrls={list:[],map:{}},this.rightCellCtrls={list:[],map:{}};else{const o=e.getColsWithinViewport(this.rowNode);this.centerCellCtrls=this.createCellCtrls(this.centerCellCtrls,o);const i=t.getLeftColsForRow(this.rowNode);this.leftCellCtrls=this.createCellCtrls(this.leftCellCtrls,i,"left");const s=t.getRightColsForRow(this.rowNode);this.rightCellCtrls=this.createCellCtrls(this.rightCellCtrls,s,"right")}}isCellEligibleToBeRemoved(e,t){const{column:s}=e;if(s.getPinned()!=t||!this.isCorrectCtrlForSpan(e))return!0;const{editing:n}=e,{visibleCols:r}=this.beans,a=e.isCellFocused();return n||a?!(r.allCols.indexOf(s)>=0):!0}getDomOrder(){return this.gos.get("ensureDomOrder")||We(this.gos,"print")}listenOnDomOrder(e){const t=()=>{e.rowComp.setDomOrder(this.getDomOrder())};e.compBean.addManagedPropertyListeners(["domLayout","ensureDomOrder"],t)}setAnimateFlags(e){if(this.rowNode.sticky||!e)return;const t=j(this.rowNode.oldRowTop),{visibleCols:o}=this.beans,i=o.isPinningLeft(),s=o.isPinningRight();if(t){const{slideInAnimation:n}=this;if(this.isFullWidth()&&!this.gos.get("embedFullWidthRows")){n.fullWidth=!0;return}n.center=!0,n.left=i,n.right=s}else{const{fadeInAnimation:n}=this;if(this.isFullWidth()&&!this.gos.get("embedFullWidthRows")){n.fullWidth=!0;return}n.center=!0,n.left=i,n.right=s}}isFullWidth(){return this.rowType!=="Normal"}refreshFullWidth(){const e=(r,a)=>r?r.rowComp.refreshFullWidth(()=>this.createFullWidthCompDetails(r.element,a).params):!0,t=e(this.fullWidthGui,null),o=e(this.centerGui,null),i=e(this.leftGui,"left"),s=e(this.rightGui,"right");return t&&o&&i&&s}addListeners(){this.addManagedListeners(this.rowNode,{heightChanged:()=>this.onRowHeightChanged(),rowSelected:()=>this.onRowSelected(),rowIndexChanged:this.onRowIndexChanged.bind(this),topChanged:this.onTopChanged.bind(this),...this.beans.expansionSvc?.getRowExpandedListeners(this)??{}}),this.rowNode.detail&&this.addManagedListeners(this.rowNode.parent,{dataChanged:this.onRowNodeDataChanged.bind(this)}),this.addManagedListeners(this.rowNode,{dataChanged:this.onRowNodeDataChanged.bind(this),cellChanged:this.postProcessCss.bind(this),rowHighlightChanged:this.onRowNodeHighlightChanged.bind(this),draggingChanged:this.postProcessRowDragging.bind(this),uiLevelChanged:this.onUiLevelChanged.bind(this)}),this.addManagedListeners(this.beans.eventSvc,{paginationPixelOffsetChanged:this.onPaginationPixelOffsetChanged.bind(this),heightScaleChanged:this.onTopChanged.bind(this),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this),virtualColumnsChanged:this.onVirtualColumnsChanged.bind(this),cellFocused:this.onCellFocusChanged.bind(this),cellFocusCleared:this.onCellFocusChanged.bind(this),paginationChanged:this.onPaginationChanged.bind(this),modelUpdated:this.refreshFirstAndLastRowStyles.bind(this),columnMoved:()=>this.updateColumnLists()}),this.beans.rowSpanSvc&&this.addManagedListeners(this.beans.rowSpanSvc,{spannedCellsUpdated:({pinned:e})=>{e&&!this.rowNode.rowPinned||this.updateColumnLists()}}),this.addDestroyFunc(()=>{this.rowDragComps=this.destroyBeans(this.rowDragComps,this.beans.context),this.tooltipFeature=this.destroyBean(this.tooltipFeature,this.beans.context)}),this.addManagedPropertyListeners(["rowStyle","getRowStyle","rowClass","getRowClass","rowClassRules"],this.postProcessCss.bind(this)),this.addManagedPropertyListener("rowDragEntireRow",()=>{if(this.gos.get("rowDragEntireRow")){this.allRowGuis.forEach(t=>{this.addRowDraggerToRow(t)});return}this.rowDragComps=this.destroyBeans(this.rowDragComps,this.beans.context)}),this.addListenersForCellComps()}addListenersForCellComps(){this.addManagedListeners(this.rowNode,{rowIndexChanged:()=>{this.getAllCellCtrls().forEach(e=>e.onRowIndexChanged())},cellChanged:e=>{this.getAllCellCtrls().forEach(t=>t.onCellChanged(e))}})}onRowNodeDataChanged(e){if(this.isFullWidth()!==!!this.isNodeFullWidthCell()){this.beans.rowRenderer.redrawRow(this.rowNode);return}if(this.isFullWidth()){this.refreshFullWidth()||this.beans.rowRenderer.redrawRow(this.rowNode);return}this.getAllCellCtrls().forEach(o=>o.refreshCell({suppressFlash:!e.update,newData:!e.update})),this.allRowGuis.forEach(o=>{this.setRowCompRowId(o.rowComp),this.updateRowBusinessKey(),this.setRowCompRowBusinessKey(o.rowComp)}),this.onRowSelected(),this.postProcessCss()}postProcessCss(){this.setStylesFromGridOptions(!0),this.postProcessClassesFromGridOptions(),this.postProcessRowClassRules(),this.postProcessRowDragging()}onRowNodeHighlightChanged(){const e=this.rowNode.highlighted;this.allRowGuis.forEach(t=>{const o=e==="Above",i=e==="Below";t.rowComp.addOrRemoveCssClass("ag-row-highlight-above",o),t.rowComp.addOrRemoveCssClass("ag-row-highlight-below",i)})}postProcessRowDragging(){const e=this.rowNode.dragging;this.allRowGuis.forEach(t=>t.rowComp.addOrRemoveCssClass("ag-row-dragging",e))}onDisplayedColumnsChanged(){this.updateColumnLists(!0),this.beans.rowAutoHeight?.requestCheckAutoHeight()}onVirtualColumnsChanged(){this.updateColumnLists(!1,!0)}getRowPosition(){return{rowPinned:ot(this.rowNode.rowPinned),rowIndex:this.rowNode.rowIndex}}onKeyboardNavigate(e){const t=this.findFullWidthInfoForEvent(e);if(!t)return;const{rowGui:o,column:i}=t;if(!(o.element===e.target))return;const r=this.rowNode,{focusSvc:a,navigation:l}=this.beans,d=a.getFocusedCell(),c={rowIndex:r.rowIndex,rowPinned:r.rowPinned,column:d?.column??i};l?.navigateToNextCell(e,e.key,c,!0),e.preventDefault()}onTabKeyDown(e){if(e.defaultPrevented||Et(e))return;const t=this.allRowGuis.find(a=>a.element.contains(e.target)),o=t?t.element:null,i=o===e.target,s=Ee(this.beans);let n=!1;o&&s&&(n=o.contains(s)&&s.classList.contains("ag-cell"));let r=null;!i&&!n&&(r=Kt(this.beans,o,!1,e.shiftKey)),(this.isFullWidth()&&i||!r)&&this.beans.navigation?.onTabKeyDown(this,e)}getFullWidthElement(){return this.fullWidthGui?this.fullWidthGui.element:null}getRowYPosition(){const e=this.allRowGuis.find(t=>ht(t.element))?.element;return e?e.getBoundingClientRect().top:0}onSuppressCellFocusChanged(e){const t=this.isFullWidth()&&e?void 0:-1;this.allRowGuis.forEach(o=>{oi(o.element,"tabindex",t)})}onFullWidthRowFocused(e){const t=this.rowNode,o=e?this.isFullWidth()&&e.rowIndex===t.rowIndex&&e.rowPinned==t.rowPinned:!1;let i;if(this.fullWidthGui)i=this.fullWidthGui.element;else{const n=this.beans.colModel.getCol(e?.column)?.pinned;n?i=n==="right"?this.rightGui?.element:this.leftGui?.element:i=this.centerGui?.element}i&&(i.classList.toggle("ag-full-width-focus",o),o&&e?.forceBrowserFocus&&i.focus({preventScroll:!0}))}recreateCell(e){this.centerCellCtrls=this.removeCellCtrl(this.centerCellCtrls,e),this.leftCellCtrls=this.removeCellCtrl(this.leftCellCtrls,e),this.rightCellCtrls=this.removeCellCtrl(this.rightCellCtrls,e),e.destroy(),this.updateColumnLists()}removeCellCtrl(e,t){const o={list:[],map:{}};return e.list.forEach(i=>{i!==t&&(o.list.push(i),o.map[i.column.getInstanceId()]=i)}),o}onMouseEvent(e,t){switch(e){case"dblclick":this.onRowDblClick(t);break;case"click":this.onRowClick(t);break;case"touchstart":case"mousedown":this.onRowMouseDown(t);break}}createRowEvent(e,t){const{rowNode:o}=this;return Z(this.gos,{type:e,node:o,data:o.data,rowIndex:o.rowIndex,rowPinned:o.rowPinned,event:t})}createRowEventWithSource(e,t){const o=this.createRowEvent(e,t);return o.source=this,o}onRowDblClick(e){Et(e)||this.beans.eventSvc.dispatchEvent(this.createRowEventWithSource("rowDoubleClicked",e))}findFullWidthInfoForEvent(e){if(!e)return;const t=this.findFullWidthRowGui(e.target),o=this.getColumnForFullWidth(t);if(!(!t||!o))return{rowGui:t,column:o}}findFullWidthRowGui(e){return this.allRowGuis.find(t=>t.element.contains(e))}getColumnForFullWidth(e){const{visibleCols:t}=this.beans;switch(e?.containerType){case"center":return t.centerCols[0];case"left":return t.leftCols[0];case"right":return t.rightCols[0];default:return t.allCols[0]}}onRowMouseDown(e){if(this.lastMouseDownOnDragger=Go(e.target,"ag-row-drag",3),!this.isFullWidth())return;const t=this.rowNode,{rangeSvc:o,focusSvc:i}=this.beans;o?.removeAllCellRanges();const s=this.findFullWidthInfoForEvent(e);if(!s)return;const{rowGui:n,column:r}=s,a=n.element,l=e.target;let d=e.defaultPrevented||Dn();a&&a.contains(l)&&da(l)&&(d=!1),i.setFocusedCell({rowIndex:t.rowIndex,column:r,rowPinned:t.rowPinned,forceBrowserFocus:d})}onRowClick(e){if(Et(e)||this.lastMouseDownOnDragger)return;const{eventSvc:o,selectionSvc:i}=this.beans;o.dispatchEvent(this.createRowEventWithSource("rowClicked",e)),i?.handleSelectionEvent(e,this.rowNode,"rowClicked")}setupDetailRowAutoHeight(e){this.rowType==="FullWidthDetail"&&this.beans.masterDetailSvc?.setupDetailRowAutoHeight(this,e)}createFullWidthCompDetails(e,t){const{gos:o,rowNode:i}=this,s=Z(o,{fullWidth:!0,data:i.data,node:i,value:i.key,valueFormatted:i.key,eGridCell:e,eParentOfValue:e,pinned:t,addRenderedRowListener:this.addEventListener.bind(this),registerRowDragger:(r,a,l,d)=>this.addFullWidthRowDragging(r,a,l,d),setTooltip:(r,a)=>{o.assertModuleRegistered("Tooltip",3),this.refreshRowTooltip(r,a)}}),n=this.beans.userCompFactory;switch(this.rowType){case"FullWidthDetail":return Jg(n,s);case"FullWidthGroup":return s.value=i.groupValue,s.valueFormatted=i.rowGroupColumn?this.beans.valueSvc.formatValue(i.rowGroupColumn,i,s.value):s.value,Zg(n,s);case"FullWidthLoading":return Xg(n,s);default:return Qg(n,s)}}refreshRowTooltip(e,t){this.fullWidthGui&&(this.tooltipFeature=this.beans.tooltipSvc?.refreshRowTooltip(this.tooltipFeature,this,e,t))}addFullWidthRowDragging(e,t,o="",i){const{rowDragSvc:s,context:n}=this.beans;if(!s||!this.isFullWidth())return;const r=s.createRowDragComp(()=>o,this.rowNode,void 0,e,t,i);this.createBean(r,n),this.addDestroyFunc(()=>{this.destroyBean(r,n)})}onUiLevelChanged(){const e=Sl(this.rowNode);if(this.rowLevel!=e){const t="ag-row-level-"+e,o="ag-row-level-"+this.rowLevel;this.allRowGuis.forEach(i=>{i.rowComp.addOrRemoveCssClass(t,!0),i.rowComp.addOrRemoveCssClass(o,!1)})}this.rowLevel=e}isFirstRowOnPage(){return this.rowNode.rowIndex===this.beans.pageBounds.getFirstRow()}isLastRowOnPage(){return this.rowNode.rowIndex===this.beans.pageBounds.getLastRow()}refreshFirstAndLastRowStyles(){const e=this.isFirstRowOnPage(),t=this.isLastRowOnPage();this.firstRowOnPage!==e&&(this.firstRowOnPage=e,this.allRowGuis.forEach(o=>o.rowComp.addOrRemoveCssClass("ag-row-first",e))),this.lastRowOnPage!==t&&(this.lastRowOnPage=t,this.allRowGuis.forEach(o=>o.rowComp.addOrRemoveCssClass("ag-row-last",t)))}getAllCellCtrls(){return this.leftCellCtrls.list.length===0&&this.rightCellCtrls.list.length===0?this.centerCellCtrls.list:[...this.centerCellCtrls.list,...this.leftCellCtrls.list,...this.rightCellCtrls.list]}postProcessClassesFromGridOptions(){const e=[];this.beans.rowStyleSvc?.processClassesFromGridOptions(e,this.rowNode),e.length&&e.forEach(t=>{this.allRowGuis.forEach(o=>o.rowComp.addOrRemoveCssClass(t,!0))})}postProcessRowClassRules(){this.beans.rowStyleSvc?.processRowClassRules(this.rowNode,e=>{this.allRowGuis.forEach(t=>t.rowComp.addOrRemoveCssClass(e,!0))},e=>{this.allRowGuis.forEach(t=>t.rowComp.addOrRemoveCssClass(e,!1))})}setStylesFromGridOptions(e,t){e&&(this.rowStyles=this.processStylesFromGridOptions()),this.forEachGui(t,o=>o.rowComp.setUserStyles(this.rowStyles))}getPinnedForContainer(e){return e==="left"||e==="right"?e:null}getInitialRowClasses(e){const t=this.getPinnedForContainer(e),o=this.isFullWidth(),{rowNode:i,beans:s}=this,n=[];n.push("ag-row"),n.push(this.rowFocused?"ag-row-focus":"ag-row-no-focus"),this.fadeInAnimation[e]&&n.push("ag-opacity-zero"),n.push(i.rowIndex%2===0?"ag-row-even":"ag-row-odd"),i.isRowPinned()&&n.push("ag-row-pinned"),i.isSelected()&&n.push("ag-row-selected"),i.footer&&n.push("ag-row-footer"),n.push("ag-row-level-"+this.rowLevel),i.stub&&n.push("ag-row-loading"),o&&n.push("ag-full-width-row"),s.expansionSvc?.addExpandedCss(n,i),i.dragging&&n.push("ag-row-dragging");const{rowStyleSvc:r}=s;return r&&(r.processClassesFromGridOptions(n,i),r.preProcessRowClassRules(n,i)),n.push(this.printLayout?"ag-row-position-relative":"ag-row-position-absolute"),this.isFirstRowOnPage()&&n.push("ag-row-first"),this.isLastRowOnPage()&&n.push("ag-row-last"),o&&(t==="left"&&n.push("ag-cell-last-left-pinned"),t==="right"&&n.push("ag-cell-first-right-pinned")),n}processStylesFromGridOptions(){return this.beans.rowStyleSvc?.processStylesFromGridOptions(this.rowNode)??this.emptyStyle}onRowSelected(e){this.beans.selectionSvc?.onRowCtrlSelected(this,t=>{(t===this.centerGui||t===this.fullWidthGui)&&this.announceDescription()},e)}announceDescription(){this.beans.selectionSvc?.announceAriaRowSelection(this.rowNode)}addHoverFunctionality(e){if(!this.active)return;const{element:t,compBean:o}=e,{rowNode:i,beans:s,gos:n}=this;o.addManagedListeners(t,{mouseenter:()=>i.dispatchRowEvent("mouseEnter"),mouseleave:()=>i.dispatchRowEvent("mouseLeave")}),o.addManagedListeners(i,{mouseEnter:()=>{!s.dragSvc?.dragging&&!n.get("suppressRowHoverHighlight")&&(t.classList.add("ag-row-hover"),i.setHovered(!0))},mouseLeave:()=>{this.resetHoveredStatus(t)}})}resetHoveredStatus(e){const t=e?[e]:this.allRowGuis.map(o=>o.element);for(const o of t)o.classList.remove("ag-row-hover");this.rowNode.setHovered(!1)}roundRowTopToBounds(e){const t=this.beans.ctrlsSvc.getScrollFeature().getApproximateVScollPosition(),o=this.applyPaginationOffset(t.top,!0)-100,i=this.applyPaginationOffset(t.bottom,!0)+100;return Math.min(Math.max(o,e),i)}forEachGui(e,t){e?t(e):this.allRowGuis.forEach(t)}isRowRendered(){return this.allRowGuis.length>0}onRowHeightChanged(e){if(this.rowNode.rowHeight==null)return;const t=this.rowNode.rowHeight,o=this.beans.environment.getDefaultRowHeight(),s=ga(this.gos)?vt(this.beans,this.rowNode).height:void 0,n=s?`${Math.min(o,s)-2}px`:void 0;this.forEachGui(e,r=>{r.element.style.height=`${t}px`,n&&r.element.style.setProperty("--ag-line-height",n)})}destroyFirstPass(e=!1){this.active=!1;const{rowNode:t}=this;if(!e&&si(this.gos)&&!t.sticky)if(t.rowTop!=null){const s=this.roundRowTopToBounds(t.rowTop);this.setRowTop(s)}else this.allRowGuis.forEach(s=>s.rowComp.addOrRemoveCssClass("ag-opacity-zero",!0));this.fullWidthGui?.element.contains(Ee(this.beans))&&this.beans.focusSvc.attemptToRecoverFocus(),t.setHovered(!1);const o=this.createRowEvent("virtualRowRemoved");this.dispatchLocalEvent(o),this.beans.eventSvc.dispatchEvent(o),super.destroy()}destroySecondPass(){this.allRowGuis.length=0,this.beans.editSvc?.stopRowEditing(this);const e=t=>(t.list.forEach(o=>o.destroy()),{list:[],map:{}});this.centerCellCtrls=e(this.centerCellCtrls),this.leftCellCtrls=e(this.leftCellCtrls),this.rightCellCtrls=e(this.rightCellCtrls)}setFocusedClasses(e){this.forEachGui(e,t=>{t.rowComp.addOrRemoveCssClass("ag-row-focus",this.rowFocused),t.rowComp.addOrRemoveCssClass("ag-row-no-focus",!this.rowFocused)})}onCellFocusChanged(){const{focusSvc:e,editSvc:t}=this.beans,o=e.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned);o!==this.rowFocused&&(this.rowFocused=o,this.setFocusedClasses()),!o&&this.editing&&t?.stopRowEditing(this,!1)}onPaginationChanged(){const e=this.beans.pagination?.getCurrentPage()??0;this.paginationPage!==e&&(this.paginationPage=e,this.onTopChanged()),this.refreshFirstAndLastRowStyles()}onTopChanged(){this.setRowTop(this.rowNode.rowTop)}onPaginationPixelOffsetChanged(){this.onTopChanged()}applyPaginationOffset(e,t=!1){if(this.rowNode.isRowPinned()||this.rowNode.sticky)return e;const o=this.beans.pageBounds.getPixelOffset();return e+o*(t?1:-1)}setRowTop(e){if(!this.printLayout&&j(e)){const t=this.applyPaginationOffset(e),s=`${this.rowNode.isRowPinned()||this.rowNode.sticky?t:this.beans.rowContainerHeight.getRealPixelPosition(t)}px`;this.setRowTopStyle(s)}}getInitialRowTop(e){return this.suppressRowTransform?this.getInitialRowTopShared(e):void 0}getInitialTransform(e){return this.suppressRowTransform?void 0:`translateY(${this.getInitialRowTopShared(e)})`}getInitialRowTopShared(e){if(this.printLayout)return"";const t=this.rowNode;let o;if(t.sticky)o=t.stickyRowTop;else{const i=this.slideInAnimation[e]?this.roundRowTopToBounds(t.oldRowTop):t.rowTop,s=this.applyPaginationOffset(i);o=t.isRowPinned()?s:this.beans.rowContainerHeight.getRealPixelPosition(s)}return o+"px"}setRowTopStyle(e){this.allRowGuis.forEach(t=>this.suppressRowTransform?t.rowComp.setTop(e):t.rowComp.setTransform(`translateY(${e})`))}getCellCtrl(e,t=!1){let o=null;return this.getAllCellCtrls().forEach(i=>{i.column==e&&(o=i)}),o!=null||t||this.getAllCellCtrls().forEach(i=>{i.getColSpanningList().indexOf(e)>=0&&(o=i)}),o}onRowIndexChanged(){this.rowNode.rowIndex!=null&&(this.onCellFocusChanged(),this.updateRowIndexes(),this.postProcessCss())}updateRowIndexes(e){const t=this.rowNode.getRowIndexString();if(t===null)return;const o=(this.beans.ctrlsSvc.getHeaderRowContainerCtrl()?.getRowCount()??0)+(this.beans.filterManager?.getHeaderRowCount()??0),i=this.rowNode.rowIndex%2===0,s=o+this.rowNode.rowIndex+1;this.forEachGui(e,n=>{n.rowComp.setRowIndex(t),n.rowComp.addOrRemoveCssClass("ag-row-even",i),n.rowComp.addOrRemoveCssClass("ag-row-odd",!i),Wd(n.element,s)})}};function lu(e){return e.altKey||e.ctrlKey||e.metaKey?!1:e.key?.length===1}function yl(e,t,o,i,s){const n=i?i.getColDef().suppressKeyboardEvent:void 0;if(!n)return!1;const r=Z(e,{event:t,editing:s,column:i,node:o,data:o.data,colDef:i.getColDef()});return!!(n&&n(r))}function dm(e){const{pinnedRowModel:t,rowModel:o}=e,[i,s]=[t?.isEmpty("top")??!0,t?.isEmpty("bottom")??!0],n=i?null:"top";let r,a;s?(r=null,a=o.getRowCount()-1):(r="bottom",a=t?.getPinnedBottomRowCount()??-1);const{visibleCols:l,rangeSvc:d}=e,c=l.allCols;!d||!c?.length||d.setCellRange({rowStartIndex:0,rowStartPinned:n,rowEndIndex:a,rowEndPinned:r})}var cm=65,um=67,hm=86,pm=68,gm=90,fm=89;function mm(e){const{keyCode:t}=e;let o;switch(t){case cm:o=D.A;break;case um:o=D.C;break;case hm:o=D.V;break;case pm:o=D.D;break;case gm:o=D.Z;break;case fm:o=D.Y;break;default:o=e.code}return o}var Cm=class extends M{constructor(e){super(),this.element=e}postConstruct(){this.addKeyboardListeners(),this.addMouseListeners(),this.beans.touchSvc?.mockRowContextMenu(this)}addKeyboardListeners(){const e="keydown",t=this.processKeyboardEvent.bind(this,e);this.addManagedElementListeners(this.element,{[e]:t})}addMouseListeners(){["dblclick","contextmenu","mouseover","mouseout","click",Sc("touchstart")?"touchstart":"mousedown"].forEach(o=>{const i=this.processMouseEvent.bind(this,o);this.addManagedElementListeners(this.element,{[o]:i})})}processMouseEvent(e,t){if(!rs(this.gos,t)||Et(t))return;const{cellCtrl:o,rowCtrl:i}=this.getControlsForEventTarget(t.target);e==="contextmenu"?(o?.column&&o.dispatchCellContextMenuEvent(t),this.beans.contextMenuSvc?.handleContextMenuMouseEvent(t,void 0,i,o)):(o&&o.onMouseEvent(e,t),i&&i.onMouseEvent(e,t))}getControlsForEventTarget(e){const{gos:t}=this;return{cellCtrl:Xc(t,e),rowCtrl:yc(t,e,Cn)}}processKeyboardEvent(e,t){const{cellCtrl:o,rowCtrl:i}=this.getControlsForEventTarget(t.target);t.defaultPrevented||(o?this.processCellKeyboardEvent(o,e,t):i&&i.isFullWidth()&&this.processFullWidthRowKeyboardEvent(i,e,t))}processCellKeyboardEvent(e,t,o){const{rowNode:i,column:s,editing:n}=e;!yl(this.gos,o,i,s,n)&&t==="keydown"&&(!n&&this.beans.navigation?.handlePageScrollingKey(o)||e.onKeyDown(o),this.doGridOperations(o,e.editing),lu(o)&&e.processCharacter(o)),t==="keydown"&&this.eventSvc.dispatchEvent(e.createEvent(o,"cellKeyDown"))}processFullWidthRowKeyboardEvent(e,t,o){const{rowNode:i}=e,{focusSvc:s,navigation:n}=this.beans,r=s.getFocusedCell(),a=r&&r.column;if(!yl(this.gos,o,i,a,!1)){const d=o.key;if(t==="keydown")switch(d){case D.PAGE_HOME:case D.PAGE_END:case D.PAGE_UP:case D.PAGE_DOWN:n?.handlePageScrollingKey(o,!0);break;case D.LEFT:case D.RIGHT:if(!this.gos.get("embedFullWidthRows"))break;case D.UP:case D.DOWN:e.onKeyboardNavigate(o);break;case D.TAB:e.onTabKeyDown(o);break}}t==="keydown"&&this.eventSvc.dispatchEvent(e.createRowEvent("cellKeyDown",o))}doGridOperations(e,t){if(!e.ctrlKey&&!e.metaKey||t||!rs(this.gos,e))return;const o=mm(e),{clipboardSvc:i,undoRedo:s}=this.beans;if(o===D.A)return this.onCtrlAndA(e);if(o===D.C)return this.onCtrlAndC(i,e);if(o===D.D)return this.onCtrlAndD(i,e);if(o===D.V)return this.onCtrlAndV(i,e);if(o===D.X)return this.onCtrlAndX(i,e);if(o===D.Y)return this.onCtrlAndY(s);if(o===D.Z)return this.onCtrlAndZ(s,e)}onCtrlAndA(e){const{beans:{rowModel:t,rangeSvc:o,selectionSvc:i},gos:s}=this;o&&zo(s)&&t.isRowsToRender()?dm(this.beans):i&&i?.selectAllRowNodes({source:"keyboardSelectAll",selectAll:mc(s)}),e.preventDefault()}onCtrlAndC(e,t){if(!e||this.gos.get("enableCellTextSelection"))return;const{cellCtrl:o,rowCtrl:i}=this.getControlsForEventTarget(t.target);o?.editing||i?.editing||(t.preventDefault(),e.copyToClipboard())}onCtrlAndX(e,t){if(!e||this.gos.get("enableCellTextSelection")||this.gos.get("suppressCutToClipboard"))return;const{cellCtrl:o,rowCtrl:i}=this.getControlsForEventTarget(t.target);o?.editing||i?.editing||(t.preventDefault(),e.cutToClipboard(void 0,"ui"))}onCtrlAndV(e,t){const{cellCtrl:o,rowCtrl:i}=this.getControlsForEventTarget(t.target);o?.editing||i?.editing||e&&!this.gos.get("suppressClipboardPaste")&&e.pasteFromClipboard()}onCtrlAndD(e,t){e&&!this.gos.get("suppressClipboardPaste")&&e.copyRangeDown(),t.preventDefault()}onCtrlAndZ(e,t){!this.gos.get("undoRedoCellEditing")||!e||(t.preventDefault(),t.shiftKey?e.redo("ui"):e.undo("ui"))}onCtrlAndY(e){e?.redo("ui")}},du=class extends M{constructor(e,t){super(),this.eContainer=e,this.eViewport=t}postConstruct(){this.addManagedEventListeners({rowContainerHeightChanged:this.onHeightChanged.bind(this,this.beans.rowContainerHeight)})}onHeightChanged(e){const t=e.uiContainerHeight,o=t!=null?`${t}px`:"";this.eContainer.style.height=o,this.eViewport&&(this.eViewport.style.height=o)}},ws=e=>e.topRowCtrls,Ss=e=>e.getStickyTopRowCtrls(),ys=e=>e.getStickyBottomRowCtrls(),bs=e=>e.bottomRowCtrls,Rs=e=>e.allRowCtrls,Jn=e=>e.getCtrls("top"),er=e=>e.getCtrls("center"),tr=e=>e.getCtrls("bottom"),vm={center:{type:"center",name:"center-cols",getRowCtrls:Rs,getSpannedRowCtrls:er},left:{type:"left",name:"pinned-left-cols",pinnedType:"left",getRowCtrls:Rs,getSpannedRowCtrls:er},right:{type:"right",name:"pinned-right-cols",pinnedType:"right",getRowCtrls:Rs,getSpannedRowCtrls:er},fullWidth:{type:"fullWidth",name:"full-width",fullWidth:!0,getRowCtrls:Rs},topCenter:{type:"center",name:"floating-top",getRowCtrls:ws,getSpannedRowCtrls:Jn},topLeft:{type:"left",name:"pinned-left-floating",container:"ag-pinned-left-floating-top",pinnedType:"left",getRowCtrls:ws,getSpannedRowCtrls:Jn},topRight:{type:"right",name:"pinned-right-floating",container:"ag-pinned-right-floating-top",pinnedType:"right",getRowCtrls:ws,getSpannedRowCtrls:Jn},topFullWidth:{type:"fullWidth",name:"floating-top-full-width",fullWidth:!0,getRowCtrls:ws},stickyTopCenter:{type:"center",name:"sticky-top",getRowCtrls:Ss},stickyTopLeft:{type:"left",name:"pinned-left-sticky-top",container:"ag-pinned-left-sticky-top",pinnedType:"left",getRowCtrls:Ss},stickyTopRight:{type:"right",name:"pinned-right-sticky-top",container:"ag-pinned-right-sticky-top",pinnedType:"right",getRowCtrls:Ss},stickyTopFullWidth:{type:"fullWidth",name:"sticky-top-full-width",fullWidth:!0,getRowCtrls:Ss},stickyBottomCenter:{type:"center",name:"sticky-bottom",getRowCtrls:ys},stickyBottomLeft:{type:"left",name:"pinned-left-sticky-bottom",container:"ag-pinned-left-sticky-bottom",pinnedType:"left",getRowCtrls:ys},stickyBottomRight:{type:"right",name:"pinned-right-sticky-bottom",container:"ag-pinned-right-sticky-bottom",pinnedType:"right",getRowCtrls:ys},stickyBottomFullWidth:{type:"fullWidth",name:"sticky-bottom-full-width",fullWidth:!0,getRowCtrls:ys},bottomCenter:{type:"center",name:"floating-bottom",getRowCtrls:bs,getSpannedRowCtrls:tr},bottomLeft:{type:"left",name:"pinned-left-floating-bottom",container:"ag-pinned-left-floating-bottom",pinnedType:"left",getRowCtrls:bs,getSpannedRowCtrls:tr},bottomRight:{type:"right",name:"pinned-right-floating-bottom",container:"ag-pinned-right-floating-bottom",pinnedType:"right",getRowCtrls:bs,getSpannedRowCtrls:tr},bottomFullWidth:{type:"fullWidth",name:"floating-bottom-full-width",fullWidth:!0,getRowCtrls:bs}};function cu(e){return`ag-${us(e).name}-viewport`}function Hs(e){const t=us(e);return t.container??`ag-${t.name}-container`}function wm(e){return`ag-${us(e).name}-spanned-cells-container`}function us(e){return vm[e]}var Sm=["topCenter","topLeft","topRight"],ym=["bottomCenter","bottomLeft","bottomRight"],bm=["center","left","right"],Rm=["center","left","right","fullWidth"],Fm=["stickyTopCenter","stickyBottomCenter","center","topCenter","bottomCenter"],xm=["left","bottomLeft","topLeft","stickyTopLeft","stickyBottomLeft"],Dm=["right","bottomRight","topRight","stickyTopRight","stickyBottomRight"],uu=["stickyTopCenter","stickyTopLeft","stickyTopRight"],hu=["stickyBottomCenter","stickyBottomLeft","stickyBottomRight"],Mm=[...uu,"stickyTopFullWidth",...hu,"stickyBottomFullWidth"],Pm=[...Sm,...ym,...bm,...uu,...hu],Em=class extends M{constructor(e){super(),this.name=e,this.visible=!0,this.EMPTY_CTRLS=[],this.options=us(e)}postConstruct(){this.enableRtl=this.gos.get("enableRtl"),this.forContainers(["center"],()=>{this.viewportSizeFeature=this.createManagedBean(new nm(this)),this.addManagedEventListeners({stickyTopOffsetChanged:this.onStickyTopOffsetChanged.bind(this)})})}onStickyTopOffsetChanged(e){this.comp.setOffsetTop(`${e.offset}px`)}registerWithCtrlsService(){this.options.fullWidth||this.beans.ctrlsSvc.register(this.name,this)}forContainers(e,t){e.indexOf(this.name)>=0&&t()}setComp(e,t,o,i){this.comp=e,this.eContainer=t,this.eSpannedContainer=o,this.eViewport=i,this.createManagedBean(new Cm(this.eViewport??this.eContainer)),this.addPreventScrollWhileDragging(),this.listenOnDomOrder();const{pinnedCols:s,rangeSvc:n}=this.beans,r=()=>this.onPinnedWidthChanged();this.forContainers(xm,()=>{this.pinnedWidthFeature=this.createOptionalManagedBean(s?.createPinnedWidthFeature(!0,this.eContainer,this.eSpannedContainer)),this.addManagedEventListeners({leftPinnedWidthChanged:r})}),this.forContainers(Dm,()=>{this.pinnedWidthFeature=this.createOptionalManagedBean(s?.createPinnedWidthFeature(!1,this.eContainer,this.eSpannedContainer)),this.addManagedEventListeners({rightPinnedWidthChanged:r})}),this.forContainers(Rm,()=>this.createManagedBean(new du(this.eContainer,this.name==="center"?i:void 0))),n&&this.forContainers(Pm,()=>this.createManagedBean(n.createDragListenerFeature(this.eContainer))),this.forContainers(Fm,()=>this.createManagedBean(new Ea(a=>this.comp.setContainerWidth(`${a}px`)))),this.visible=this.isContainerVisible(),this.addListeners(),this.registerWithCtrlsService()}onScrollCallback(e){this.addManagedElementListeners(this.eViewport,{scroll:e})}addListeners(){const{spannedRowRenderer:e,gos:t}=this.beans;this.addManagedEventListeners({displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this),displayedColumnsWidthChanged:this.onDisplayedColumnsChanged.bind(this),displayedRowsChanged:o=>this.onDisplayedRowsChanged(o.afterScroll)}),this.onDisplayedColumnsChanged(),this.onDisplayedRowsChanged(),e&&this.options.getSpannedRowCtrls&&t.get("enableCellSpan")&&this.addManagedListeners(e,{spannedRowsUpdated:()=>{const o=this.options.getSpannedRowCtrls(e);o&&this.comp.setSpannedRowCtrls(o,!1)}})}listenOnDomOrder(){if(Mm.indexOf(this.name)>=0){this.comp.setDomOrder(!0);return}const t=()=>{const o=this.gos.get("ensureDomOrder"),i=We(this.gos,"print");this.comp.setDomOrder(o||i)};this.addManagedPropertyListener("domLayout",t),t()}onDisplayedColumnsChanged(){this.forContainers(["center"],()=>this.onHorizontalViewportChanged())}addPreventScrollWhileDragging(){const{dragSvc:e}=this.beans;if(!e)return;const t=o=>{e.dragging&&o.cancelable&&o.preventDefault()};this.eContainer.addEventListener("touchmove",t,{passive:!1}),this.addDestroyFunc(()=>this.eContainer.removeEventListener("touchmove",t))}onHorizontalViewportChanged(e=!1){const t=this.getCenterWidth(),o=this.getCenterViewportScrollLeft();this.beans.colViewport.setScrollPosition(t,o,e)}hasHorizontalScrollGap(){return this.eContainer.clientWidth-this.eViewport.clientWidth<0}hasVerticalScrollGap(){return this.eContainer.clientHeight-this.eViewport.clientHeight<0}getCenterWidth(){return Qi(this.eViewport)}getCenterViewportScrollLeft(){return tn(this.eViewport,this.enableRtl)}registerViewportResizeListener(e){const t=bo(this.beans,this.eViewport,e);this.addDestroyFunc(()=>t())}isViewportInTheDOMTree(){return Jd(this.eViewport)}getViewportScrollLeft(){return tn(this.eViewport,this.enableRtl)}isHorizontalScrollShowing(){return this.gos.get("alwaysShowHorizontalScroll")||Pp(this.eViewport)}setHorizontalScroll(e){this.comp.setHorizontalScroll(e)}getHScrollPosition(){return{left:this.eViewport.scrollLeft,right:this.eViewport.scrollLeft+this.eViewport.offsetWidth}}setCenterViewportScrollLeft(e){on(this.eViewport,e,this.enableRtl)}isContainerVisible(){return!(this.options.pinnedType!=null)||!!this.pinnedWidthFeature&&this.pinnedWidthFeature.getWidth()>0}onPinnedWidthChanged(){const e=this.isContainerVisible();this.visible!=e&&(this.visible=e,this.onDisplayedRowsChanged())}onDisplayedRowsChanged(e=!1){const t=this.options.getRowCtrls(this.beans.rowRenderer);if(!this.visible||t.length===0){this.comp.setRowCtrls({rowCtrls:this.EMPTY_CTRLS});return}const o=We(this.gos,"print"),s=this.gos.get("embedFullWidthRows")||o,n=t.filter(r=>{const a=r.isFullWidth();return this.options.fullWidth?!s&&a:s||!a});this.comp.setRowCtrls({rowCtrls:n,useFlushSync:e})}},pu="ag-force-vertical-scroll",Am="ag-selectable",Tm="ag-column-moving",Im=class extends M{constructor(){super(...arguments),this.stickyTopHeight=0,this.stickyBottomHeight=0}wireBeans(e){this.ctrlsSvc=e.ctrlsSvc,this.colModel=e.colModel,this.scrollVisibleSvc=e.scrollVisibleSvc,this.pinnedRowModel=e.pinnedRowModel,this.filterManager=e.filterManager,this.rowGroupColsSvc=e.rowGroupColsSvc}setComp(e,t,o,i,s,n,r){this.comp=e,this.eGridBody=t,this.eBodyViewport=o,this.eTop=i,this.eBottom=s,this.eStickyTop=n,this.eStickyBottom=r,this.eCenterColsViewport=o.querySelector(`.${cu("center")}`),this.eFullWidthContainer=o.querySelector(`.${Hs("fullWidth")}`),this.eStickyTopFullWidthContainer=n.querySelector(`.${Hs("stickyTopFullWidth")}`),this.eStickyBottomFullWidthContainer=r.querySelector(`.${Hs("stickyBottomFullWidth")}`),this.setCellTextSelection(this.gos.get("enableCellTextSelection")),this.addManagedPropertyListener("enableCellTextSelection",a=>this.setCellTextSelection(a.currentValue)),this.createManagedBean(new Pa(this.comp)),this.scrollFeature=this.createManagedBean(new sm(this.eBodyViewport)),this.beans.rowDragSvc?.setupRowDrag(this.eBodyViewport,this),this.setupRowAnimationCssClass(),this.addEventListeners(),this.addFocusListeners([i,o,s,n,r]),this.setGridRootRole(),this.onGridColumnsChanged(),this.addBodyViewportListener(),this.setFloatingHeights(),this.disableBrowserDragging(),this.addStopEditingWhenGridLosesFocus(),this.updateScrollingClasses(),this.filterManager?.setupAdvFilterHeaderComp(i),this.ctrlsSvc.register("gridBodyCtrl",this)}addEventListeners(){const e=this.setFloatingHeights.bind(this),t=this.setGridRootRole.bind(this);this.addManagedEventListeners({gridColumnsChanged:this.onGridColumnsChanged.bind(this),scrollVisibilityChanged:this.onScrollVisibilityChanged.bind(this),scrollGapChanged:this.updateScrollingClasses.bind(this),pinnedRowDataChanged:e,pinnedHeightChanged:e,headerHeightChanged:this.setStickyTopOffsetTop.bind(this),columnRowGroupChanged:t,columnPivotChanged:t}),this.addManagedPropertyListener("treeData",t)}onGridColumnsChanged(){const e=this.beans.colModel.getCols();this.comp.setColumnCount(e.length)}onScrollVisibilityChanged(){const{scrollVisibleSvc:e}=this,t=e.verticalScrollShowing;this.setVerticalScrollPaddingVisible(t),this.setStickyWidth(t),this.setStickyBottomOffsetBottom();const o=t&&e.getScrollbarWidth()||0,i=qd()?16:0,s=`calc(100% + ${o+i}px)`;Tt(this.beans,()=>this.comp.setBodyViewportWidth(s)),this.updateScrollingClasses()}setGridRootRole(){const{rowGroupColsSvc:e,colModel:t}=this;let o=this.gos.get("treeData");if(!o){const i=t.isPivotMode();o=(e?e.columns.length:0)>=(i?2:1)}this.comp.setGridRootRole(o?"treegrid":"grid")}addFocusListeners(e){e.forEach(t=>{this.addManagedElementListeners(t,{focusin:o=>{const{target:i}=o,s=Go(i,"ag-root",t);t.classList.toggle("ag-has-focus",!s)},focusout:o=>{const{target:i,relatedTarget:s}=o,n=t.contains(s),r=Go(s,"ag-root",t);Go(i,"ag-root",t)||(!n||r)&&t.classList.remove("ag-has-focus")}})})}setColumnMovingCss(e){this.comp.setColumnMovingCss(Tm,e)}setCellTextSelection(e=!1){this.comp.setCellSelectableCss(Am,e)}updateScrollingClasses(){const{eGridBody:{classList:e},scrollVisibleSvc:t}=this;e.toggle("ag-body-vertical-content-no-gap",!t.verticalScrollGap),e.toggle("ag-body-horizontal-content-no-gap",!t.horizontalScrollGap)}disableBrowserDragging(){this.addManagedElementListeners(this.eGridBody,{dragstart:e=>{if(e.target instanceof HTMLImageElement)return e.preventDefault(),!1}})}addStopEditingWhenGridLosesFocus(){this.beans.editSvc?.addStopEditingWhenGridLosesFocus([this.eBodyViewport,this.eBottom,this.eTop,this.eStickyTop,this.eStickyBottom])}updateRowCount(){const e=(this.ctrlsSvc.getHeaderRowContainerCtrl()?.getRowCount()??0)+(this.filterManager?.getHeaderRowCount()??0),{rowModel:t}=this.beans,o=t.isLastRowIndexKnown()?t.getRowCount():-1,i=o===-1?-1:e+o;this.comp.setRowCount(i)}registerBodyViewportResizeListener(e){this.comp.registerBodyViewportResizeListener(e)}setVerticalScrollPaddingVisible(e){const t=e?"scroll":"hidden";this.comp.setPinnedTopBottomOverflowY(t)}isVerticalScrollShowing(){const e=this.gos.get("alwaysShowVerticalScroll"),t=e?pu:null,o=We(this.gos,"normal");return this.comp.setAlwaysVerticalScrollClass(t,e),e||o&&Ep(this.eBodyViewport)}setupRowAnimationCssClass(){const{rowContainerHeight:e,environment:t}=this.beans;let o=t.sizesMeasured;const i=()=>{const s=o&&si(this.gos)&&!e.stretching,n=s?"ag-row-animation":"ag-row-no-animation";this.comp.setRowAnimationCssOnBodyViewport(n,s)};i(),this.addManagedEventListeners({heightScaleChanged:i}),this.addManagedPropertyListener("animateRows",i),this.addManagedEventListeners({gridStylesChanged:()=>{!o&&t.sizesMeasured&&(o=!0,i())}})}addBodyViewportListener(){const{popupSvc:e,touchSvc:t}=this.beans,o=this.onBodyViewportContextMenu.bind(this);this.addManagedElementListeners(this.eBodyViewport,{contextmenu:o}),t?.mockBodyContextMenu(this,o),this.addManagedElementListeners(this.eBodyViewport,{wheel:this.onBodyViewportWheel.bind(this,e)}),this.addManagedElementListeners(this.eStickyTop,{wheel:this.onStickyWheel.bind(this)}),this.addManagedElementListeners(this.eStickyBottom,{wheel:this.onStickyWheel.bind(this)}),this.addFullWidthContainerWheelListener()}addFullWidthContainerWheelListener(){this.addManagedElementListeners(this.eFullWidthContainer,{wheel:e=>this.onFullWidthContainerWheel(e)})}onFullWidthContainerWheel(e){const{deltaX:t,deltaY:o,shiftKey:i}=e;(i||Math.abs(t)>Math.abs(o))&&rs(this.gos,e)&&this.scrollGridBodyToMatchEvent(e)}onStickyWheel(e){const{deltaX:t,deltaY:o,shiftKey:i}=e,s=i||Math.abs(t)>Math.abs(o),n=e.target;s?(this.eStickyTopFullWidthContainer.contains(n)||this.eStickyBottomFullWidthContainer.contains(n))&&this.scrollGridBodyToMatchEvent(e):(e.preventDefault(),this.scrollVertically(o))}scrollGridBodyToMatchEvent(e){const{deltaX:t,deltaY:o}=e;e.preventDefault(),this.eCenterColsViewport.scrollBy({left:t||o})}onBodyViewportContextMenu(e,t,o){if(!e&&!o)return;this.gos.get("preventDefaultOnContextMenu")&&(e||o).preventDefault();const{target:i}=e||t;(i===this.eBodyViewport||i===this.ctrlsSvc.get("center").eViewport)&&this.beans.contextMenuSvc?.showContextMenu({mouseEvent:e,touchEvent:o,value:null,anchorToElement:this.eGridBody,source:"ui"})}onBodyViewportWheel(e,t){this.gos.get("suppressScrollWhenPopupsAreOpen")&&e?.hasAnchoredPopup()&&t.preventDefault()}scrollVertically(e){const t=this.eBodyViewport.scrollTop;return this.scrollFeature.setVerticalScrollPosition(t+e),this.eBodyViewport.scrollTop-t}setFloatingHeights(){const{pinnedRowModel:e}=this,t=e?.getPinnedTopTotalHeight()??0,o=e?.getPinnedBottomTotalHeight()??0;this.comp.setTopHeight(t),this.comp.setBottomHeight(o),this.comp.setTopInvisible(t<=0),this.comp.setBottomInvisible(o<=0),this.setStickyTopOffsetTop(),this.setStickyBottomOffsetBottom()}setStickyTopHeight(e=0){this.comp.setStickyTopHeight(`${e}px`),this.stickyTopHeight=e}setStickyBottomHeight(e=0){this.comp.setStickyBottomHeight(`${e}px`),this.stickyBottomHeight=e}setStickyWidth(e){if(!e)this.comp.setStickyTopWidth("100%"),this.comp.setStickyBottomWidth("100%");else{const t=this.scrollVisibleSvc.getScrollbarWidth();this.comp.setStickyTopWidth(`calc(100% - ${t}px)`),this.comp.setStickyBottomWidth(`calc(100% - ${t}px)`)}}setStickyTopOffsetTop(){const t=this.ctrlsSvc.get("gridHeaderCtrl").headerHeight+(this.filterManager?.getHeaderHeight()??0),o=this.pinnedRowModel?.getPinnedTopTotalHeight()??0;let i=0;t>0&&(i+=t),o>0&&(i+=o),i>0&&(i+=1),this.comp.setStickyTopTop(`${i}px`)}setStickyBottomOffsetBottom(){const{pinnedRowModel:e,scrollVisibleSvc:t,comp:o}=this,i=e?.getPinnedBottomTotalHeight()??0,n=t.horizontalScrollShowing&&t.getScrollbarWidth()||0,r=i+n;o.setStickyBottomBottom(`${r}px`)}},gu=class extends pe{constructor(e,t){super(),this.direction=t,this.eViewport=O,this.eContainer=O,this.hideTimeout=0,this.setTemplate(e)}postConstruct(){this.addManagedEventListeners({scrollVisibilityChanged:this.onScrollVisibilityChanged.bind(this)}),this.onScrollVisibilityChanged(),this.addOrRemoveCssClass("ag-apple-scrollbar",Kd()||ko())}destroy(){super.destroy(),window.clearTimeout(this.hideTimeout)}initialiseInvisibleScrollbar(){this.invisibleScrollbar===void 0&&(this.invisibleScrollbar=qd(),this.invisibleScrollbar&&(this.hideAndShowInvisibleScrollAsNeeded(),this.addActiveListenerToggles()))}addActiveListenerToggles(){const e=this.getGui(),t=()=>this.addOrRemoveCssClass("ag-scrollbar-active",!0),o=()=>this.addOrRemoveCssClass("ag-scrollbar-active",!1);this.addManagedListeners(e,{mouseenter:t,mousedown:t,touchstart:t,mouseleave:o,touchend:o})}onScrollVisibilityChanged(){this.invisibleScrollbar===void 0&&this.initialiseInvisibleScrollbar(),Tt(this.beans,()=>this.setScrollVisible())}hideAndShowInvisibleScrollAsNeeded(){this.addManagedEventListeners({bodyScroll:e=>{e.direction===this.direction&&(this.hideTimeout&&(window.clearTimeout(this.hideTimeout),this.hideTimeout=0),this.addOrRemoveCssClass("ag-scrollbar-scrolling",!0))},bodyScrollEnd:()=>{this.hideTimeout=window.setTimeout(()=>{this.addOrRemoveCssClass("ag-scrollbar-scrolling",!1),this.hideTimeout=0},400)}})}attemptSettingScrollPosition(e){const t=this.eViewport;nc(()=>ht(t),()=>this.setScrollPosition(e),100)}onScrollCallback(e){this.addManagedElementListeners(this.eViewport,{scroll:e})}},Lm={tag:"div",cls:"ag-body-horizontal-scroll",attrs:{"aria-hidden":"true"},children:[{tag:"div",ref:"eLeftSpacer",cls:"ag-horizontal-left-spacer"},{tag:"div",ref:"eViewport",cls:"ag-body-horizontal-scroll-viewport",children:[{tag:"div",ref:"eContainer",cls:"ag-body-horizontal-scroll-container"}]},{tag:"div",ref:"eRightSpacer",cls:"ag-horizontal-right-spacer"}]},km=class extends gu{constructor(){super(Lm,"horizontal"),this.eLeftSpacer=O,this.eRightSpacer=O,this.setScrollVisibleDebounce=0}wireBeans(e){this.visibleCols=e.visibleCols,this.scrollVisibleSvc=e.scrollVisibleSvc}postConstruct(){super.postConstruct();const e=this.setFakeHScrollSpacerWidths.bind(this);this.addManagedEventListeners({displayedColumnsChanged:e,displayedColumnsWidthChanged:e,pinnedRowDataChanged:this.refreshCompBottom.bind(this)}),this.addManagedPropertyListener("domLayout",e),this.beans.ctrlsSvc.register("fakeHScrollComp",this),this.createManagedBean(new Ea(t=>this.eContainer.style.width=`${t}px`)),this.addManagedPropertyListeners(["suppressHorizontalScroll"],this.onScrollVisibilityChanged.bind(this))}destroy(){window.clearTimeout(this.setScrollVisibleDebounce),super.destroy()}initialiseInvisibleScrollbar(){this.invisibleScrollbar===void 0&&(this.enableRtl=this.gos.get("enableRtl"),super.initialiseInvisibleScrollbar(),this.invisibleScrollbar&&this.refreshCompBottom())}refreshCompBottom(){if(!this.invisibleScrollbar)return;const e=this.beans.pinnedRowModel?.getPinnedBottomTotalHeight()??0;this.getGui().style.bottom=`${e}px`}onScrollVisibilityChanged(){super.onScrollVisibilityChanged(),this.setFakeHScrollSpacerWidths()}setFakeHScrollSpacerWidths(){const e=this.scrollVisibleSvc.verticalScrollShowing;let t=this.visibleCols.getDisplayedColumnsRightWidth();const o=!this.enableRtl&&e,i=this.scrollVisibleSvc.getScrollbarWidth();o&&(t+=i),_t(this.eRightSpacer,t),this.eRightSpacer.classList.toggle("ag-scroller-corner",t<=i);let s=this.visibleCols.getColsLeftWidth();this.enableRtl&&e&&(s+=i),_t(this.eLeftSpacer,s),this.eLeftSpacer.classList.toggle("ag-scroller-corner",s<=i)}setScrollVisible(){const e=this.scrollVisibleSvc.horizontalScrollShowing,t=this.invisibleScrollbar,o=this.gos.get("suppressHorizontalScroll"),i=e&&this.scrollVisibleSvc.getScrollbarWidth()||0,n=o?0:i===0&&t?16:i,r=()=>{this.setScrollVisibleDebounce=0,this.addOrRemoveCssClass("ag-scrollbar-invisible",t),Oi(this.getGui(),n),Oi(this.eViewport,n),Oi(this.eContainer,n),n||this.eContainer.style.setProperty("min-height","1px"),this.setVisible(e,{skipAriaHidden:!0})};window.clearTimeout(this.setScrollVisibleDebounce),e?this.setScrollVisibleDebounce=window.setTimeout(r,100):r()}getScrollPosition(){return tn(this.eViewport,this.enableRtl)}setScrollPosition(e){ht(this.eViewport)||this.attemptSettingScrollPosition(e),on(this.eViewport,e,this.enableRtl)}},Gm={selector:"AG-FAKE-HORIZONTAL-SCROLL",component:km},Om={tag:"div",cls:"ag-body-vertical-scroll",attrs:{"aria-hidden":"true"},children:[{tag:"div",ref:"eViewport",cls:"ag-body-vertical-scroll-viewport",children:[{tag:"div",ref:"eContainer",cls:"ag-body-vertical-scroll-container"}]}]},Bm=class extends gu{constructor(){super(Om,"vertical")}postConstruct(){super.postConstruct(),this.createManagedBean(new du(this.eContainer));const{ctrlsSvc:e}=this.beans;e.register("fakeVScrollComp",this),this.addManagedEventListeners({rowContainerHeightChanged:this.onRowContainerHeightChanged.bind(this,e)})}setScrollVisible(){const{scrollVisibleSvc:e}=this.beans,t=e.verticalScrollShowing,o=this.invisibleScrollbar,i=t&&e.getScrollbarWidth()||0,s=i===0&&o?16:i;this.addOrRemoveCssClass("ag-scrollbar-invisible",o),_t(this.getGui(),s),_t(this.eViewport,s),_t(this.eContainer,s),this.setDisplayed(t,{skipAriaHidden:!0})}onRowContainerHeightChanged(e){const o=e.getGridBodyCtrl().eBodyViewport,i=this.getScrollPosition(),s=o.scrollTop;i!=s&&this.setScrollPosition(s,!0)}getScrollPosition(){return this.eViewport.scrollTop}setScrollPosition(e,t){!t&&!ht(this.eViewport)&&this.attemptSettingScrollPosition(e),this.eViewport.scrollTop=e}},Nm={selector:"AG-FAKE-VERTICAL-SCROLL",component:Bm};function Hm(e){return e.cols?e.cols.treeDepth+1:-1}function Vt(e){return e.ctrlsSvc.getHeaderRowContainerCtrl()?.getRowCount()??0}function Aa(e){const t=[],o=e.ctrlsSvc.getHeaderRowContainerCtrls();for(const i of o){if(!i)continue;const s=i.getGroupRowCount()||0;for(let n=0;n<s;n++){const r=i.getGroupRowCtrlAtIndex(n),a=t[n];if(r){const l=Vm(e,r);(a==null||l>a)&&(t[n]=l)}}}return t}function Vm(e,t){let i=e.colModel.isPivotMode()?zm(e):mu(e);const s=t.getHeaderCellCtrls();for(const n of s){const{column:r}=n,a=r.getAutoHeaderHeight();a!=null&&a>i&&r.isAutoHeaderHeight()&&(i=a)}return i}function Ta(e){let o=e.colModel.isPivotMode()?_m(e):Gn(e);return e.colModel.forAllCols(i=>{const s=i.getAutoHeaderHeight();s!=null&&s>o&&i.isAutoHeaderHeight()&&(o=s)}),o}function Gn(e){return e.gos.get("headerHeight")??e.environment.getDefaultHeaderHeight()}function fu(e){return e.gos.get("floatingFiltersHeight")??Gn(e)}function mu(e){return e.gos.get("groupHeaderHeight")??Gn(e)}function _m(e){return e.gos.get("pivotHeaderHeight")??Gn(e)}function zm(e){return e.gos.get("pivotGroupHeaderHeight")??mu(e)}var Wm=class extends M{setComp(e,t,o){this.comp=e,this.eGui=t;const{beans:i}=this,{headerNavigation:s,touchSvc:n,ctrlsSvc:r}=i;s&&this.createManagedBean(new Si(o,{onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.handleKeyDown.bind(this),onFocusOut:this.onFocusOut.bind(this)})),this.addManagedEventListeners({columnPivotModeChanged:this.onPivotModeChanged.bind(this,i),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this,i)}),this.onPivotModeChanged(i),this.setupHeaderHeight();const a=this.onHeaderContextMenu.bind(this);this.addManagedElementListeners(this.eGui,{contextmenu:a}),n?.mockHeaderContextMenu(this,a),r.register("gridHeaderCtrl",this)}setupHeaderHeight(){const e=this.setHeaderHeight.bind(this);e(),this.addManagedPropertyListeners(["headerHeight","pivotHeaderHeight","groupHeaderHeight","pivotGroupHeaderHeight","floatingFiltersHeight"],e),this.addManagedEventListeners({displayedColumnsChanged:e,columnHeaderHeightChanged:e,columnGroupHeaderHeightChanged:()=>Tt(this.beans,()=>e()),gridStylesChanged:e,advancedFilterEnabledChanged:e})}setHeaderHeight(){const{beans:e}=this;let t=0;const o=Aa(e).reduce((n,r)=>n+r,0),i=Ta(e);if(e.filterManager?.hasFloatingFilters()&&(t+=fu(e)),t+=o,t+=i,this.headerHeight===t)return;this.headerHeight=t;const s=`${t+1}px`;this.comp.setHeightAndMinHeight(s),this.eventSvc.dispatchEvent({type:"headerHeightChanged"})}onPivotModeChanged(e){const t=e.colModel.isPivotMode();this.comp.addOrRemoveCssClass("ag-pivot-on",t),this.comp.addOrRemoveCssClass("ag-pivot-off",!t)}onDisplayedColumnsChanged(e){const o=e.visibleCols.allCols.some(i=>i.isSpanHeaderHeight());this.comp.addOrRemoveCssClass("ag-header-allow-overflow",o)}onTabKeyDown(e){const t=this.gos.get("enableRtl"),o=e.shiftKey,i=o!==t?"LEFT":"RIGHT",{beans:s}=this,{headerNavigation:n,focusSvc:r}=s;(n.navigateHorizontally(i,!0,e)||!o&&r.focusOverlay(!1)||$o(s,o,!0))&&e.preventDefault()}handleKeyDown(e){let t=null;const{headerNavigation:o}=this.beans;switch(e.key){case D.LEFT:t="LEFT";case D.RIGHT:{j(t)||(t="RIGHT"),o.navigateHorizontally(t,!1,e)&&e.preventDefault();break}case D.UP:t="UP";case D.DOWN:{j(t)||(t="DOWN"),o.navigateVertically(t,null,e)&&e.preventDefault();break}default:return}}onFocusOut(e){const{relatedTarget:t}=e,{eGui:o,beans:i}=this;!t&&o.contains(Ee(i))||o.contains(t)||(i.focusSvc.focusedHeader=null)}onHeaderContextMenu(e,t,o){const{menuSvc:i,ctrlsSvc:s}=this.beans;if(!e&&!o||!i?.isHeaderContextMenuEnabled())return;const{target:n}=e??t;(n===this.eGui||n===s.getHeaderRowContainerCtrl()?.eViewport)&&i.showHeaderContextMenu(void 0,e,o)}},Ia=class extends pe{constructor(e,t){super(e),this.ctrl=t}getCtrl(){return this.ctrl}},Um={tag:"div",cls:"ag-header-cell",role:"columnheader",children:[{tag:"div",ref:"eResize",cls:"ag-header-cell-resize",role:"presentation"},{tag:"div",ref:"eHeaderCompWrapper",cls:"ag-header-cell-comp-wrapper",role:"presentation"}]},$m=class extends Ia{constructor(e){super(Um,e),this.eResize=O,this.eHeaderCompWrapper=O,this.headerCompVersion=0}postConstruct(){const e=this.getGui();((s,n)=>{n!=null&&n!=""?e.setAttribute(s,n):e.removeAttribute(s)})("col-id",this.ctrl.column.getColId());const o={setWidth:s=>e.style.width=s,addOrRemoveCssClass:(s,n)=>this.addOrRemoveCssClass(s,n),setUserStyles:s=>ds(e,s),setAriaSort:s=>s?wp(e,s):Sp(e),setUserCompDetails:s=>this.setUserCompDetails(s),getUserCompInstance:()=>this.headerComp};this.ctrl.setComp(o,this.getGui(),this.eResize,this.eHeaderCompWrapper,void 0);const i=this.ctrl.getSelectAllGui();i&&this.eResize.insertAdjacentElement("afterend",i)}destroy(){this.destroyHeaderComp(),super.destroy()}destroyHeaderComp(){this.headerComp&&(this.eHeaderCompWrapper.removeChild(this.headerCompGui),this.headerComp=this.destroyBean(this.headerComp),this.headerCompGui=void 0)}setUserCompDetails(e){this.headerCompVersion++;const t=this.headerCompVersion;e.newAgStackInstance().then(o=>this.afterCompCreated(t,o))}afterCompCreated(e,t){if(e!=this.headerCompVersion||!this.isAlive()){this.destroyBean(t);return}this.destroyHeaderComp(),this.headerComp=t,this.headerCompGui=t.getGui(),this.eHeaderCompWrapper.appendChild(this.headerCompGui),this.ctrl.setDragSource(this.getGui())}},jm={tag:"div",cls:"ag-header-group-cell",role:"columnheader",children:[{tag:"div",ref:"eHeaderCompWrapper",cls:"ag-header-cell-comp-wrapper",role:"presentation"},{tag:"div",ref:"eResize",cls:"ag-header-cell-resize",role:"presentation"}]},Km=class extends Ia{constructor(e){super(jm,e),this.eResize=O,this.eHeaderCompWrapper=O}postConstruct(){const e=this.getGui(),t=(i,s)=>s!=null?e.setAttribute(i,s):e.removeAttribute(i);e.setAttribute("col-id",this.ctrl.column.getUniqueId());const o={addOrRemoveCssClass:(i,s)=>this.addOrRemoveCssClass(i,s),setUserStyles:i=>ds(e,i),setHeaderWrapperHidden:i=>{i?this.eHeaderCompWrapper.style.setProperty("display","none"):this.eHeaderCompWrapper.style.removeProperty("display")},setHeaderWrapperMaxHeight:i=>{i!=null?this.eHeaderCompWrapper.style.setProperty("max-height",`${i}px`):this.eHeaderCompWrapper.style.removeProperty("max-height"),this.eHeaderCompWrapper.classList.toggle("ag-header-cell-comp-wrapper-limited-height",i!=null)},setResizableDisplayed:i=>he(this.eResize,i),setWidth:i=>e.style.width=i,setAriaExpanded:i=>t("aria-expanded",i),setUserCompDetails:i=>this.setUserCompDetails(i),getUserCompInstance:()=>this.headerGroupComp};this.ctrl.setComp(o,e,this.eResize,this.eHeaderCompWrapper,void 0)}setUserCompDetails(e){e.newAgStackInstance().then(t=>this.afterHeaderCompCreated(t))}afterHeaderCompCreated(e){const t=()=>this.destroyBean(e);if(!this.isAlive()){t();return}const o=this.getGui(),i=e.getGui();this.eHeaderCompWrapper.appendChild(i),this.addDestroyFunc(t),this.headerGroupComp=e,this.ctrl.setDragSource(o)}addOrRemoveHeaderWrapperStyle(e,t){const{eHeaderCompWrapper:o}=this;t?o.style.setProperty(e,t):o.style.removeProperty(e)}},Ym={tag:"div",cls:"ag-header-cell ag-floating-filter",role:"gridcell",children:[{tag:"div",ref:"eFloatingFilterBody",role:"presentation"},{tag:"div",ref:"eButtonWrapper",cls:"ag-floating-filter-button ag-hidden",role:"presentation",children:[{tag:"button",ref:"eButtonShowMainFilter",cls:"ag-button ag-floating-filter-button-button",attrs:{type:"button",tabindex:"-1"}}]}]},qm=class extends Ia{constructor(e){super(Ym,e),this.eFloatingFilterBody=O,this.eButtonWrapper=O,this.eButtonShowMainFilter=O}postConstruct(){const e=this.getGui(),t={addOrRemoveCssClass:(o,i)=>this.addOrRemoveCssClass(o,i),setUserStyles:o=>ds(e,o),addOrRemoveBodyCssClass:(o,i)=>this.eFloatingFilterBody.classList.toggle(o,i),setButtonWrapperDisplayed:o=>he(this.eButtonWrapper,o),setCompDetails:o=>this.setCompDetails(o),getFloatingFilterComp:()=>this.compPromise,setWidth:o=>e.style.width=o,setMenuIcon:o=>this.eButtonShowMainFilter.appendChild(o)};this.ctrl.setComp(t,e,this.eButtonShowMainFilter,this.eFloatingFilterBody,void 0)}setCompDetails(e){if(!e){this.destroyFloatingFilterComp(),this.compPromise=null;return}this.compPromise=e.newAgStackInstance(),this.compPromise.then(t=>this.afterCompCreated(t))}destroy(){this.destroyFloatingFilterComp(),super.destroy()}destroyFloatingFilterComp(){this.floatingFilterComp&&(this.eFloatingFilterBody.removeChild(this.floatingFilterComp.getGui()),this.floatingFilterComp=this.destroyBean(this.floatingFilterComp))}afterCompCreated(e){if(e){if(!this.isAlive()){this.destroyBean(e);return}this.destroyFloatingFilterComp(),this.floatingFilterComp=e,this.eFloatingFilterBody.appendChild(e.getGui()),e.afterGuiAttached&&e.afterGuiAttached()}}},Qm=class extends pe{constructor(e){super({tag:"div",cls:e.headerRowClass,role:"row"}),this.ctrl=e,this.headerComps={}}postConstruct(){Wd(this.getGui(),this.ctrl.getAriaRowIndex());const e={setHeight:t=>this.getGui().style.height=t,setTop:t=>this.getGui().style.top=t,setHeaderCtrls:(t,o)=>this.setHeaderCtrls(t,o),setWidth:t=>this.getGui().style.width=t};this.ctrl.setComp(e,void 0)}destroy(){this.setHeaderCtrls([],!1),super.destroy()}setHeaderCtrls(e,t){if(!this.isAlive())return;const o=this.headerComps;if(this.headerComps={},e.forEach(i=>{const s=i.instanceId;let n=o[s];delete o[s],n==null&&(n=this.createHeaderComp(i),this.getGui().appendChild(n.getGui())),this.headerComps[s]=n}),Object.values(o).forEach(i=>{this.getGui().removeChild(i.getGui()),this.destroyBean(i)}),t){const i=Object.values(this.headerComps);i.sort((n,r)=>{const a=n.getCtrl().column.getLeft(),l=r.getCtrl().column.getLeft();return a-l});const s=i.map(n=>n.getGui());tc(this.getGui(),s)}}createHeaderComp(e){let t;switch(this.ctrl.type){case"group":t=new Km(e);break;case"filter":t=new qm(e);break;default:t=new $m(e);break}return this.createBean(t),t.setParentComponent(this),t}},La=class extends M{constructor(e,t,o,i){super(),this.columnOrGroup=e,this.eCell=t,this.colsSpanning=i,this.columnOrGroup=e,this.ariaEl=t.querySelector("[role=columnheader]")||t,this.beans=o}setColsSpanning(e){this.colsSpanning=e,this.onLeftChanged()}getColumnOrGroup(){const{beans:e,colsSpanning:t}=this;return e.gos.get("enableRtl")&&t?ve(t):this.columnOrGroup}postConstruct(){const e=this.onLeftChanged.bind(this);this.addManagedListeners(this.columnOrGroup,{leftChanged:e}),this.setLeftFirstTime(),this.addManagedEventListeners({displayedColumnsWidthChanged:e}),this.addManagedPropertyListener("domLayout",e)}setLeftFirstTime(){const{gos:e,colAnimation:t}=this.beans,o=e.get("suppressColumnMoveAnimation"),i=j(this.columnOrGroup.getOldLeft());t?.isActive()&&i&&!o?this.animateInLeft():this.onLeftChanged()}animateInLeft(){const e=this.getColumnOrGroup(),t=this.modifyLeftForPrintLayout(e,e.getOldLeft()),o=this.modifyLeftForPrintLayout(e,e.getLeft());this.setLeft(t),this.actualLeft=o,this.beans.colAnimation.executeNextVMTurn(()=>{this.actualLeft===o&&this.setLeft(o)})}onLeftChanged(){const e=this.getColumnOrGroup(),t=e.getLeft();this.actualLeft=this.modifyLeftForPrintLayout(e,t),this.setLeft(this.actualLeft)}modifyLeftForPrintLayout(e,t){const{gos:o,visibleCols:i}=this.beans;if(!We(o,"print")||e.getPinned()==="left")return t;const n=i.getColsLeftWidth();if(e.getPinned()==="right"){const r=i.bodyWidth;return n+r+t}return n+t}setLeft(e){if(j(e)&&(this.eCell.style.left=`${e}px`),Ie(this.columnOrGroup)){const t=this.columnOrGroup.getLeafColumns();if(!t.length)return;t.length>1&&vp(this.ariaEl,t.length)}}},Xm=0,Cu="headerCtrl",ka=class extends M{constructor(e,t){super(),this.column=e,this.rowCtrl=t,this.resizeToggleTimeout=0,this.resizeMultiplier=1,this.resizeFeature=null,this.lastFocusEvent=null,this.dragSource=null,this.instanceId=e.getUniqueId()+"-"+Xm++}postConstruct(){const e=this.refreshTabIndex.bind(this);this.addManagedPropertyListeners(["suppressHeaderFocus"],e),this.addManagedEventListeners({overlayExclusiveChanged:e})}shouldStopEventPropagation(e){const{headerRowIndex:t,column:o}=this.beans.focusSvc.focusedHeader,i=o.getDefinition(),s=i&&i.suppressHeaderKeyboardEvent;if(!j(s))return!1;const n=Z(this.gos,{colDef:i,column:o,headerRowIndex:t,event:e});return!!s(n)}getWrapperHasFocus(){return Ee(this.beans)===this.eGui}setGui(e,t){this.eGui=e,this.addDomData(t),t.addManagedListeners(this.beans.eventSvc,{displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this)}),t.addManagedElementListeners(this.eGui,{focus:this.onGuiFocus.bind(this)}),this.onDisplayedColumnsChanged(),this.refreshTabIndex()}refreshHeaderStyles(){const e=this.column.getDefinition();if(!e)return;const{headerStyle:t}=e;let o;if(typeof t=="function"){const i=this.getHeaderClassParams();o=t(i)}else o=t;o&&this.comp.setUserStyles(o)}onGuiFocus(){this.eventSvc.dispatchEvent({type:"headerFocused",column:this.column})}setupAutoHeight(e){const{wrapperElement:t,checkMeasuringCallback:o,compBean:i}=e,{beans:s}=this,n=u=>{if(!this.isAlive()||!i.isAlive())return;const{paddingTop:p,paddingBottom:g,borderBottomWidth:f,borderTopWidth:m}=wi(this.eGui),C=p+g+f+m,S=t.offsetHeight+C;if(u<5){const b=Le(s),x=!b||!b.contains(t),T=S==0;if(x||T){kr(()=>n(u+1),"raf",s);return}}this.setColHeaderHeight(this.column,S)};let r=!1,a;const l=()=>{const u=this.column.isAutoHeaderHeight();u&&!r&&d(),!u&&r&&c()},d=()=>{r=!0,n(0),this.comp.addOrRemoveCssClass("ag-header-cell-auto-height",!0),a=bo(this.beans,t,()=>n(0))},c=()=>{r=!1,a&&a(),this.comp.addOrRemoveCssClass("ag-header-cell-auto-height",!1),a=void 0};l(),i.addDestroyFunc(()=>c()),i.addManagedListeners(this.column,{widthChanged:()=>r&&n(0)}),i.addManagedEventListeners({sortChanged:()=>{r&&window.setTimeout(()=>n(0))}}),o&&o(l)}onDisplayedColumnsChanged(){const{comp:e,column:t,beans:o,eGui:i}=this;!e||!t||!i||(Yc(e,t,o.visibleCols),Ud(i,o.visibleCols.getAriaColIndex(t)))}addResizeAndMoveKeyboardListeners(e){e.addManagedListeners(this.eGui,{keydown:this.onGuiKeyDown.bind(this),keyup:this.onGuiKeyUp.bind(this)})}refreshTabIndex(){const e=Vo(this.beans);this.eGui&&oi(this.eGui,"tabindex",e?null:"-1")}onGuiKeyDown(e){const t=Ee(this.beans),o=e.key===D.LEFT||e.key===D.RIGHT;if(this.isResizing&&(e.preventDefault(),e.stopImmediatePropagation()),t!==this.eGui||!e.shiftKey&&!e.altKey||((this.isResizing||o)&&(e.preventDefault(),e.stopImmediatePropagation()),!o))return;const s=e.key===D.LEFT!==this.gos.get("enableRtl")?"left":"right";if(e.altKey){this.isResizing=!0,this.resizeMultiplier+=1;const n=this.getViewportAdjustedResizeDiff(e);this.resizeHeader(n,e.shiftKey),this.resizeFeature?.toggleColumnResizing(!0)}else this.moveHeader(s)}moveHeader(e){this.beans.colMoves?.moveHeader(e,this.eGui,this.column,this.rowCtrl.pinned,this)}getViewportAdjustedResizeDiff(e){const t=this.getResizeDiff(e),{pinnedCols:o}=this.beans;return o?o.getHeaderResizeDiff(t,this.column):t}getResizeDiff(e){const{gos:t,column:o}=this;let i=e.key===D.LEFT!==t.get("enableRtl");const s=o.getPinned(),n=t.get("enableRtl");return s&&n!==(s==="right")&&(i=!i),(i?-1:1)*this.resizeMultiplier}onGuiKeyUp(){this.isResizing&&(this.resizeToggleTimeout&&(window.clearTimeout(this.resizeToggleTimeout),this.resizeToggleTimeout=0),this.isResizing=!1,this.resizeMultiplier=1,this.resizeToggleTimeout=window.setTimeout(()=>{this.resizeFeature?.toggleColumnResizing(!1)},150))}handleKeyDown(e){const t=this.getWrapperHasFocus();switch(e.key){case D.PAGE_DOWN:case D.PAGE_UP:case D.PAGE_HOME:case D.PAGE_END:t&&e.preventDefault()}}addDomData(e){const t=Cu,{eGui:o,gos:i}=this;pi(i,o,t,this),e.addDestroyFunc(()=>pi(i,o,t,null))}focus(e){const{eGui:t}=this;return t?(this.lastFocusEvent=e||null,t.focus(),!0):!1}focusThis(){this.beans.focusSvc.focusedHeader={headerRowIndex:this.rowCtrl.rowIndex,column:this.column}}removeDragSource(){this.dragSource&&(this.beans.dragAndDrop?.removeDragSource(this.dragSource),this.dragSource=null)}handleContextMenuMouseEvent(e,t,o){const i=e??t,{menuSvc:s,gos:n}=this.beans;n.get("preventDefaultOnContextMenu")&&i.preventDefault(),s?.isHeaderContextMenuEnabled(o)&&s.showHeaderContextMenu(o,e,t),this.dispatchColumnMouseEvent("columnHeaderContextMenu",o)}dispatchColumnMouseEvent(e,t){this.eventSvc.dispatchEvent({type:e,column:t})}setColHeaderHeight(e,t){if(!e.setAutoHeaderHeight(t))return;const{eventSvc:o}=this;e.isColumn?o.dispatchEvent({type:"columnHeaderHeightChanged",column:e,columns:[e],source:"autosizeColumnHeaderHeight"}):o.dispatchEvent({type:"columnGroupHeaderHeightChanged",columnGroup:e,source:"autosizeColumnGroupHeaderHeight"})}clearComponent(){this.removeDragSource(),this.resizeFeature=null,this.comp=null,this.eGui=null}destroy(){super.destroy(),this.column=null,this.lastFocusEvent=null,this.rowCtrl=null}},Zm=class extends ka{constructor(){super(...arguments),this.refreshFunctions={},this.userHeaderClasses=new Set,this.ariaDescriptionProperties=new Map}setComp(e,t,o,i,s){this.comp=e;const{rowCtrl:n,column:r,beans:a}=this,{colResize:l,context:d,colHover:c,rangeSvc:u}=a,p=cs(this,d,s);this.setGui(t,p),this.updateState(),this.setupWidth(p),this.setupMovingCss(p),this.setupMenuClass(p),this.setupSortableClass(p),this.setupWrapTextClass(),this.refreshSpanHeaderHeight(),this.setupAutoHeight({wrapperElement:i,checkMeasuringCallback:f=>this.setRefreshFunction("measuring",f),compBean:p}),this.addColumnHoverListener(p),this.setupFilterClass(p),this.setupStylesFromColDef(),this.setupClassesFromColDef(),this.setupTooltip(),this.addActiveHeaderMouseListeners(p),this.setupSelectAll(p),this.setupUserComp(),this.refreshAria(),l?this.resizeFeature=p.createManagedBean(l.createResizeFeature(n.pinned,r,o,e,this)):he(o,!1),c?.createHoverFeature(p,[r],t),u?.createRangeHighlightFeature(p,r,e),p.createManagedBean(new La(r,t,a)),p.createManagedBean(new Si(t,{shouldStopEventPropagation:f=>this.shouldStopEventPropagation(f),onTabKeyDown:()=>null,handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this),onFocusOut:this.onFocusOut.bind(this)})),this.addResizeAndMoveKeyboardListeners(p),p.addManagedPropertyListeners(["suppressMovableColumns","suppressMenuHide","suppressAggFuncInHeader","enableAdvancedFilter"],()=>this.refresh()),p.addManagedListeners(r,{colDefChanged:()=>this.refresh()}),p.addManagedListeners(r,{headerHighlightChanged:this.onHeaderHighlightChanged.bind(this)});const g=()=>this.checkDisplayName();p.addManagedEventListeners({columnValueChanged:g,columnRowGroupChanged:g,columnPivotChanged:g,headerHeightChanged:this.onHeaderHeightChanged.bind(this)}),p.addDestroyFunc(()=>{this.refreshFunctions={},this.selectAllFeature=null,this.dragSourceElement=void 0,this.userCompDetails=null,this.userHeaderClasses.clear(),this.ariaDescriptionProperties.clear(),this.clearComponent()})}resizeHeader(e,t){this.beans.colResize?.resizeHeader(this.column,e,t)}getHeaderClassParams(){const{column:e,beans:t}=this,o=e.colDef;return Z(t.gos,{colDef:o,column:e,floatingFilter:!1})}setupUserComp(){const e=this.lookupUserCompDetails();e&&this.setCompDetails(e)}setCompDetails(e){this.userCompDetails=e,this.comp.setUserCompDetails(e)}lookupUserCompDetails(){const e=this.createParams(),t=this.column.getColDef();return jg(this.beans.userCompFactory,t,e)}createParams(){const{menuSvc:e,sortSvc:t,colFilter:o,gos:i}=this.beans;return Z(i,{column:this.column,displayName:this.displayName,enableSorting:this.column.isSortable(),enableMenu:this.menuEnabled,enableFilterButton:this.openFilterEnabled&&!!e?.isHeaderFilterButtonEnabled(this.column),enableFilterIcon:!!o&&(!this.openFilterEnabled||Ve(this.gos)),showColumnMenu:(n,r)=>{e?.showColumnMenu({column:this.column,buttonElement:n,positionBy:"button",onClosedCallback:r})},showColumnMenuAfterMouseClick:(n,r)=>{e?.showColumnMenu({column:this.column,mouseEvent:n,positionBy:"mouse",onClosedCallback:r})},showFilter:n=>{e?.showFilterMenu({column:this.column,buttonElement:n,containerType:"columnFilter",positionBy:"button"})},progressSort:n=>{t?.progressSort(this.column,!!n,"uiColumnSorted")},setSort:(n,r)=>{t?.setSortForColumn(this.column,n,!!r,"uiColumnSorted")},eGridHeader:this.eGui,setTooltip:(n,r)=>{i.assertModuleRegistered("Tooltip",3),this.setupTooltip(n,r)}})}setupSelectAll(e){const{selectionSvc:t}=this.beans;t&&(this.selectAllFeature=e.createManagedBean(t.createSelectAllFeature(this.column)),this.selectAllFeature.setComp(this))}getSelectAllGui(){return this.selectAllFeature?.getCheckboxGui()}handleKeyDown(e){super.handleKeyDown(e),e.key===D.SPACE&&this.selectAllFeature?.onSpaceKeyDown(e),e.key===D.ENTER&&this.onEnterKeyDown(e),e.key===D.DOWN&&e.altKey&&this.showMenuOnKeyPress(e,!1)}onEnterKeyDown(e){e.ctrlKey||e.metaKey?this.showMenuOnKeyPress(e,!0):this.sortable&&this.beans.sortSvc?.progressSort(this.column,e.shiftKey,"uiColumnSorted")}showMenuOnKeyPress(e,t){const o=this.comp.getUserCompInstance();bl(o)&&o.onMenuKeyboardShortcut(t)&&e.preventDefault()}onFocusIn(e){this.eGui.contains(e.relatedTarget)||(this.focusThis(),this.announceAriaDescription()),Qc()&&this.setActiveHeader(!0)}onFocusOut(e){this.eGui.contains(e.relatedTarget)||this.setActiveHeader(!1)}setupTooltip(e,t){this.tooltipFeature=this.beans.tooltipSvc?.setupHeaderTooltip(this.tooltipFeature,this,e,t)}setupStylesFromColDef(){this.setRefreshFunction("headerStyles",this.refreshHeaderStyles.bind(this)),this.refreshHeaderStyles()}setupClassesFromColDef(){const e=()=>{const t=this.column.getColDef(),o=jc(t,this.gos,this.column,null),i=this.userHeaderClasses;this.userHeaderClasses=new Set(o),o.forEach(s=>{i.has(s)?i.delete(s):this.comp.addOrRemoveCssClass(s,!0)}),i.forEach(s=>this.comp.addOrRemoveCssClass(s,!1))};this.setRefreshFunction("headerClasses",e),e()}setDragSource(e){this.dragSourceElement=e,this.removeDragSource(),!(!e||!this.draggable)&&(this.dragSource=this.beans.colMoves?.setDragSourceForHeader(e,this.column,this.displayName)??null)}updateState(){const{menuSvc:e}=this.beans;this.menuEnabled=!!e?.isColumnMenuInHeaderEnabled(this.column),this.openFilterEnabled=!!e?.isFilterMenuInHeaderEnabled(this.column),this.sortable=this.column.isSortable(),this.displayName=this.calculateDisplayName(),this.draggable=this.workOutDraggable()}setRefreshFunction(e,t){this.refreshFunctions[e]=t}refresh(){this.updateState(),this.refreshHeaderComp(),this.refreshAria(),Object.values(this.refreshFunctions).forEach(e=>e())}refreshHeaderComp(){const e=this.lookupUserCompDetails();if(!e)return;(this.comp.getUserCompInstance()!=null&&this.userCompDetails.componentClass==e.componentClass?this.attemptHeaderCompRefresh(e.params):!1)?this.setDragSource(this.dragSourceElement):this.setCompDetails(e)}attemptHeaderCompRefresh(e){const t=this.comp.getUserCompInstance();return!t||!t.refresh?!1:t.refresh(e)}calculateDisplayName(){return this.beans.colNames.getDisplayNameForColumn(this.column,"header",!0)}checkDisplayName(){this.displayName!==this.calculateDisplayName()&&this.refresh()}workOutDraggable(){const e=this.column.getColDef();return!!(!this.gos.get("suppressMovableColumns")&&!e.suppressMovable&&!e.lockPosition)||!!e.enableRowGroup||!!e.enablePivot}setupWidth(e){const t=()=>{const o=this.column.getActualWidth();this.comp.setWidth(`${o}px`)};e.addManagedListeners(this.column,{widthChanged:t}),t()}setupMovingCss(e){const t=()=>{this.comp.addOrRemoveCssClass("ag-header-cell-moving",this.column.isMoving())};e.addManagedListeners(this.column,{movingChanged:t}),t()}setupMenuClass(e){const t=()=>{this.comp?.addOrRemoveCssClass("ag-column-menu-visible",this.column.isMenuVisible())};e.addManagedListeners(this.column,{menuVisibleChanged:t}),t()}setupSortableClass(e){const t=()=>{this.comp.addOrRemoveCssClass("ag-header-cell-sortable",!!this.sortable)};t(),this.setRefreshFunction("updateSortable",t),e.addManagedEventListeners({sortChanged:this.refreshAriaSort.bind(this)})}setupFilterClass(e){const t=()=>{const o=this.column.isFilterActive();this.comp.addOrRemoveCssClass("ag-header-cell-filtered",o),this.refreshAria()};e.addManagedListeners(this.column,{filterActiveChanged:t}),t()}setupWrapTextClass(){const e=()=>{const t=!!this.column.getColDef().wrapHeaderText;this.comp.addOrRemoveCssClass("ag-header-cell-wrap-text",t)};e(),this.setRefreshFunction("wrapText",e)}onHeaderHighlightChanged(){const e=this.column.getHighlighted(),t=e===0,o=e===1;this.comp.addOrRemoveCssClass("ag-header-highlight-before",t),this.comp.addOrRemoveCssClass("ag-header-highlight-after",o)}onDisplayedColumnsChanged(){super.onDisplayedColumnsChanged(),this.isAlive()&&this.onHeaderHeightChanged()}onHeaderHeightChanged(){this.refreshSpanHeaderHeight()}refreshSpanHeaderHeight(){const{eGui:e,column:t,comp:o,beans:i}=this,s=Aa(this.beans),n=s.reduce((c,u)=>c+=u,0)===0;if(o.addOrRemoveCssClass("ag-header-parent-hidden",n),!t.isSpanHeaderHeight()){e.style.removeProperty("top"),e.style.removeProperty("height"),o.addOrRemoveCssClass("ag-header-span-height",!1),o.addOrRemoveCssClass("ag-header-span-total",!1);return}const{numberOfParents:r,isSpanningTotal:a}=this.column.getColumnGroupPaddingInfo();o.addOrRemoveCssClass("ag-header-span-height",r>0);const l=Ta(i);if(r===0){o.addOrRemoveCssClass("ag-header-span-total",!1),e.style.setProperty("top","0px"),e.style.setProperty("height",`${l}px`);return}o.addOrRemoveCssClass("ag-header-span-total",a);let d=0;for(let c=0;c<r;c++)d+=s[s.length-1-c];e.style.setProperty("top",`${-d}px`),e.style.setProperty("height",`${l+d}px`)}refreshAriaSort(){if(this.sortable){const e=this.getLocaleTextFunc(),t=this.beans.sortSvc?.getDisplaySortForColumn(this.column)||null;this.comp.setAriaSort(dp(t)),this.setAriaDescriptionProperty("sort",e("ariaSortableColumn","Press ENTER to sort"))}else this.comp.setAriaSort(),this.setAriaDescriptionProperty("sort",null)}refreshAriaMenu(){if(this.menuEnabled){const e=this.getLocaleTextFunc();this.setAriaDescriptionProperty("menu",e("ariaMenuColumn","Press ALT DOWN to open column menu"))}else this.setAriaDescriptionProperty("menu",null)}refreshAriaFilterButton(){if(this.openFilterEnabled&&!Ve(this.gos)){const e=this.getLocaleTextFunc();this.setAriaDescriptionProperty("filterButton",e("ariaFilterColumn","Press CTRL ENTER to open filter"))}else this.setAriaDescriptionProperty("filterButton",null)}refreshAriaFiltered(){const e=this.getLocaleTextFunc();this.column.isFilterActive()?this.setAriaDescriptionProperty("filter",e("ariaColumnFiltered","Column Filtered")):this.setAriaDescriptionProperty("filter",null)}setAriaDescriptionProperty(e,t){t!=null?this.ariaDescriptionProperties.set(e,t):this.ariaDescriptionProperties.delete(e)}announceAriaDescription(){if(!this.eGui.contains(Ee(this.beans)))return;const e=Array.from(this.ariaDescriptionProperties.keys()).sort((t,o)=>t==="filter"?-1:o.charCodeAt(0)-t.charCodeAt(0)).map(t=>this.ariaDescriptionProperties.get(t)).join(". ");this.beans.ariaAnnounce?.announceValue(e,"columnHeader")}refreshAria(){this.refreshAriaSort(),this.refreshAriaMenu(),this.refreshAriaFilterButton(),this.refreshAriaFiltered()}addColumnHoverListener(e){this.beans.colHover?.addHeaderColumnHoverListener(e,this.comp,this.column)}addActiveHeaderMouseListeners(e){const t=s=>this.handleMouseOverChange(s.type==="mouseenter"),o=()=>{this.setActiveHeader(!0),this.dispatchColumnMouseEvent("columnHeaderClicked",this.column)},i=s=>this.handleContextMenuMouseEvent(s,void 0,this.column);e.addManagedListeners(this.eGui,{mouseenter:t,mouseleave:t,click:o,contextmenu:i})}handleMouseOverChange(e){this.setActiveHeader(e),this.eventSvc.dispatchEvent({type:e?"columnHeaderMouseOver":"columnHeaderMouseLeave",column:this.column})}setActiveHeader(e){this.comp.addOrRemoveCssClass("ag-header-active",e)}getAnchorElementForMenu(e){const t=this.comp.getUserCompInstance();return bl(t)?t.getAnchorElementForMenu(e):this.eGui}destroy(){this.tooltipFeature=this.destroyBean(this.tooltipFeature),super.destroy()}};function bl(e){return typeof e.getAnchorElementForMenu=="function"&&typeof e.onMenuKeyboardShortcut=="function"}var Jm=0,or=class extends M{constructor(e,t,o){super(),this.rowIndex=e,this.pinned=t,this.type=o,this.instanceId=Jm++,this.allCtrls=[];const i=o=="group"?"ag-header-row-column-group":o=="filter"?"ag-header-row-column-filter":"ag-header-row-column";this.headerRowClass=`ag-header-row ${i}`}postConstruct(){this.isPrintLayout=We(this.gos,"print"),this.isEnsureDomOrder=this.gos.get("ensureDomOrder")}areCellsRendered(){return this.comp?this.allCtrls.every(e=>e.eGui!=null):!1}setComp(e,t,o=!0){this.comp=e,t=cs(this,this.beans.context,t),o&&(this.onRowHeightChanged(),this.onVirtualColumnsChanged()),this.setWidth(),this.addEventListeners(t)}getAriaRowIndex(){return this.rowIndex+1}addEventListeners(e){const t=this.onRowHeightChanged.bind(this),o=this.onDisplayedColumnsChanged.bind(this);e.addManagedEventListeners({columnResized:this.setWidth.bind(this),displayedColumnsChanged:o,virtualColumnsChanged:i=>this.onVirtualColumnsChanged(i.afterScroll),columnGroupHeaderHeightChanged:t,columnHeaderHeightChanged:t,gridStylesChanged:t,advancedFilterEnabledChanged:t}),e.addManagedPropertyListener("domLayout",o),e.addManagedPropertyListener("ensureDomOrder",i=>this.isEnsureDomOrder=i.currentValue),e.addManagedPropertyListeners(["headerHeight","pivotHeaderHeight","groupHeaderHeight","pivotGroupHeaderHeight","floatingFiltersHeight"],t)}onDisplayedColumnsChanged(){this.isPrintLayout=We(this.gos,"print"),this.onVirtualColumnsChanged(),this.setWidth(),this.onRowHeightChanged()}setWidth(){const e=this.getWidthForRow();this.comp.setWidth(`${e}px`)}getWidthForRow(){const{visibleCols:e}=this.beans;return this.isPrintLayout?this.pinned!=null?0:e.getContainerWidth("right")+e.getContainerWidth("left")+e.getContainerWidth(null):e.getContainerWidth(this.pinned)}onRowHeightChanged(){const{topOffset:e,rowHeight:t}=this.getTopAndHeight();this.comp.setTop(e+"px"),this.comp.setHeight(t+"px")}getTopAndHeight(){const{filterManager:e}=this.beans,t=[],o=Aa(this.beans),i=Ta(this.beans);t.push(...o),t.push(i),e?.hasFloatingFilters()&&t.push(fu(this.beans));let s=0;for(let r=0;r<this.rowIndex;r++)s+=t[r];const n=t[this.rowIndex];return{topOffset:s,rowHeight:n}}onVirtualColumnsChanged(e=!1){const t=this.getUpdatedHeaderCtrls(),o=this.isEnsureDomOrder||this.isPrintLayout;this.comp.setHeaderCtrls(t,o,e)}getUpdatedHeaderCtrls(){const e=this.ctrlsById;this.ctrlsById=new Map;const t=this.getColumnsInViewport();for(const i of t)this.recycleAndCreateHeaderCtrls(i,this.ctrlsById,e);const o=i=>{const{focusSvc:s,visibleCols:n}=this.beans;return s.isHeaderWrapperFocused(i)?n.isVisible(i.column):!1};if(e)for(const[i,s]of e)o(s)?this.ctrlsById.set(i,s):this.destroyBean(s);return this.allCtrls=Array.from(this.ctrlsById.values()),this.allCtrls}getHeaderCellCtrls(){return this.allCtrls}recycleAndCreateHeaderCtrls(e,t,o){if(e.isEmptyGroup())return;const i=e.getUniqueId();let s;if(o&&(s=o.get(i),o.delete(i)),s&&s.column!=e&&(this.destroyBean(s),s=void 0),s==null)switch(this.type){case"filter":{s=this.createBean(this.beans.registry.createDynamicBean("headerFilterCellCtrl",!0,e,this));break}case"group":s=this.createBean(this.beans.registry.createDynamicBean("headerGroupCellCtrl",!0,e,this));break;default:s=this.createBean(new Zm(e,this));break}t.set(i,s)}getColumnsInViewport(){return this.isPrintLayout?this.getColumnsInViewportPrintLayout():this.getColumnsInViewportNormalLayout()}getColumnsInViewportPrintLayout(){if(this.pinned!=null)return[];let e=[];const t=this.getActualDepth(),{colViewport:o}=this.beans;return["left",null,"right"].forEach(i=>{const s=o.getHeadersToRender(i,t);e=e.concat(s)}),e}getActualDepth(){return this.type=="filter"?this.rowIndex-1:this.rowIndex}getColumnsInViewportNormalLayout(){return this.beans.colViewport.getHeadersToRender(this.pinned,this.getActualDepth())}focusHeader(e,t){const o=this.allCtrls.find(s=>s.column==e);return o?o.focus(t):!1}destroy(){this.allCtrls=this.destroyBeans(this.allCtrls),this.ctrlsById=void 0,super.destroy()}},eC=class extends M{constructor(e){super(),this.pinned=e,this.hidden=!1,this.includeFloatingFilter=!1,this.groupsRowCtrls=[]}setComp(e,t){this.comp=e,this.eViewport=t;const{pinnedCols:o,ctrlsSvc:i,colModel:s,colMoves:n,filterManager:r}=this.beans;this.setupCenterWidth(),o?.setupHeaderPinnedWidth(this),this.setupDragAndDrop(n,this.eViewport);const a=this.onDisplayedColumnsChanged.bind(this,r);this.addManagedEventListeners({gridColumnsChanged:this.onGridColumnsChanged.bind(this),displayedColumnsChanged:a,advancedFilterEnabledChanged:a});const l=`${typeof this.pinned=="string"?this.pinned:"center"}Header`;i.register(l,this),s.ready&&this.refresh()}getAllCtrls(){const e=[...this.groupsRowCtrls];return this.columnsRowCtrl&&e.push(this.columnsRowCtrl),this.filtersRowCtrl&&e.push(this.filtersRowCtrl),e}refresh(e=!1){const{focusSvc:t,colModel:o,filterManager:i}=this.beans;let s=0;const n=t.getFocusHeaderToUseAfterRefresh(),r=()=>{const c=Hm(o)-1;this.groupsRowCtrls=this.destroyBeans(this.groupsRowCtrls);for(let u=0;u<c;u++){const p=this.createBean(new or(s++,this.pinned,"group"));this.groupsRowCtrls.push(p)}},a=()=>{const c=s++,u=!this.hidden&&(this.columnsRowCtrl==null||!e||this.columnsRowCtrl.rowIndex!==c);(u||this.hidden)&&(this.columnsRowCtrl=this.destroyBean(this.columnsRowCtrl)),u&&(this.columnsRowCtrl=this.createBean(new or(c,this.pinned,"column")))},l=()=>{this.includeFloatingFilter=!!i?.hasFloatingFilters()&&!this.hidden;const c=()=>{this.filtersRowCtrl=this.destroyBean(this.filtersRowCtrl)};if(!this.includeFloatingFilter){c();return}const u=s++;if(this.filtersRowCtrl){const p=this.filtersRowCtrl.rowIndex!==u;(!e||p)&&c()}this.filtersRowCtrl||(this.filtersRowCtrl=this.createBean(new or(u,this.pinned,"filter")))};r(),a(),l();const d=this.getAllCtrls();this.comp.setCtrls(d),this.restoreFocusOnHeader(t,n)}getHeaderCtrlForColumn(e){const t=o=>o?.getHeaderCellCtrls().find(i=>i.column===e);if(Ut(e))return t(this.columnsRowCtrl);if(this.groupsRowCtrls.length!==0)for(let o=0;o<this.groupsRowCtrls.length;o++){const i=t(this.groupsRowCtrls[o]);if(i)return i}}getHtmlElementForColumnHeader(e){return this.getHeaderCtrlForColumn(e)?.eGui??null}getRowType(e){return this.getAllCtrls()[e]?.type}focusHeader(e,t,o){const s=this.getAllCtrls()[e];return s?s.focusHeader(t,o):!1}getGroupRowCount(){return this.groupsRowCtrls.length}getGroupRowCtrlAtIndex(e){return this.groupsRowCtrls[e]}getRowCount(){return this.groupsRowCtrls.length+(this.columnsRowCtrl?1:0)+(this.filtersRowCtrl?1:0)}setHorizontalScroll(e){this.comp.setViewportScrollLeft(e)}onScrollCallback(e){this.addManagedElementListeners(this.eViewport,{scroll:e})}destroy(){this.filtersRowCtrl=this.destroyBean(this.filtersRowCtrl),this.columnsRowCtrl=this.destroyBean(this.columnsRowCtrl),this.groupsRowCtrls=this.destroyBeans(this.groupsRowCtrls),super.destroy()}setupDragAndDrop(e,t){const o=e?.createBodyDropTarget(this.pinned,t);o&&this.createManagedBean(o)}restoreFocusOnHeader(e,t){if(!t)return;const{column:o}=t;o.getPinned()==this.pinned&&e.focusHeaderPosition({headerPosition:t})}onGridColumnsChanged(){this.refresh(!0)}onDisplayedColumnsChanged(e){const t=!!e?.hasFloatingFilters()&&!this.hidden;this.includeFloatingFilter!==t&&this.refresh(!0)}setupCenterWidth(){this.pinned==null&&this.createManagedBean(new Ea(e=>this.comp.setCenterWidth(`${e}px`),!0))}},tC=class extends M{constructor(){super(...arguments),this.beanName="menuSvc"}postConstruct(){const{enterpriseMenuFactory:e,filterMenuFactory:t}=this.beans;this.activeMenuFactory=e??t}showColumnMenu(e){this.showColumnMenuCommon(this.activeMenuFactory,e,"columnMenu")}showFilterMenu(e){const{enterpriseMenuFactory:t,filterMenuFactory:o}=this.beans,i=t&&Ve(this.gos)?t:o;this.showColumnMenuCommon(i,e,e.containerType,!0)}showHeaderContextMenu(e,t,o){this.activeMenuFactory?.showMenuAfterContextMenuEvent(e,t,o)}hidePopupMenu(){this.beans.contextMenuSvc?.hideActiveMenu(),this.activeMenuFactory?.hideActiveMenu()}isColumnMenuInHeaderEnabled(e){const{suppressHeaderMenuButton:t}=e.getColDef();return!t&&!!this.activeMenuFactory?.isMenuEnabled(e)&&(Ve(this.gos)||!!this.beans.enterpriseMenuFactory)}isFilterMenuInHeaderEnabled(e){return!e.getColDef().suppressHeaderFilterButton&&!!this.beans.filterManager?.isFilterAllowed(e)}isHeaderContextMenuEnabled(e){return!(e&&Ut(e)?e.getColDef():e?.getColGroupDef())?.suppressHeaderContextMenu&&this.gos.get("columnMenu")==="new"}isHeaderMenuButtonAlwaysShowEnabled(){return this.isSuppressMenuHide()}isHeaderMenuButtonEnabled(){const e=!this.isSuppressMenuHide();return!(ko()&&e)}isHeaderFilterButtonEnabled(e){return this.isFilterMenuInHeaderEnabled(e)&&!Ve(this.gos)&&!this.isFloatingFilterButtonDisplayed(e)}isFilterMenuItemEnabled(e){return!!this.beans.filterManager?.isFilterAllowed(e)&&!Ve(this.gos)&&!this.isFilterMenuInHeaderEnabled(e)&&!this.isFloatingFilterButtonDisplayed(e)}isFloatingFilterButtonEnabled(e){return!e.getColDef().suppressFloatingFilterButton}isFloatingFilterButtonDisplayed(e){return!!e.getColDef().floatingFilter&&this.isFloatingFilterButtonEnabled(e)}isSuppressMenuHide(){const e=this.gos,t=e.get("suppressMenuHide");return Ve(e)?e.exists("suppressMenuHide")?t:!1:t}showColumnMenuCommon(e,t,o,i){const{positionBy:s,onClosedCallback:n}=t,r=t.column;if(s==="button"){const{buttonElement:a}=t;e?.showMenuAfterButtonClick(r,a,o,n,i)}else if(s==="mouse"){const{mouseEvent:a}=t;e?.showMenuAfterMouseEvent(r,a,o,n,i)}else if(r){const a=this.beans,l=a.ctrlsSvc;l.getScrollFeature().ensureColumnVisible(r,"auto"),Tt(a,()=>{const d=l.getHeaderRowContainerCtrl(r.getPinned())?.getHeaderCtrlForColumn(r);d&&e?.showMenuAfterButtonClick(r,d.getAnchorElementForMenu(i),o,n,!0)})}}};function vn(e,t,o){e.menuVisible!==t&&(e.menuVisible=t,e.dispatchColEvent("menuVisibleChanged",o))}var vu=class extends pe{constructor(){super()}},oC={tag:"span",cls:"ag-overlay-loading-center",attrs:{"aria-live":"polite","aria-atomic":"true"}},iC=class extends vu{init(){const e=ot(this.gos.get("overlayLoadingTemplate")?.trim());if(this.setTemplate(e??oC),!e){const t=this.getLocaleTextFunc();setTimeout(()=>{this.getGui().textContent=t("loadingOoo","Loading...")})}}},sC={tag:"span",cls:"ag-overlay-no-rows-center"},nC=class extends vu{init(){const e=ot(this.gos.get("overlayNoRowsTemplate")?.trim());if(this.setTemplate(e??sC),!e){const t=this.getLocaleTextFunc();setTimeout(()=>{this.getGui().textContent=t("noRowsToShow","No Rows To Show")})}}};function ri(e,t,o){const i=oe(e,t,o);if(i){const{className:n}=i;if(typeof n=="string"&&n.indexOf("ag-icon")>-1||typeof n=="object"&&n["ag-icon"])return i}const s=Pe({tag:"span"});return s.appendChild(i),s}function oe(e,t,o){let i=null;e==="smallDown"?_(262):e==="smallLeft"?_(263):e==="smallRight"&&_(264);const s=o&&o.getColDef().icons;if(s&&(i=s[e]),t.gos&&!i){const n=t.gos.get("icons");n&&(i=n[e])}if(i){let n;if(typeof i=="function")n=i();else if(typeof i=="string")n=i;else{_(38,{iconName:e});return}if(typeof n=="string")return Pn(n);if(En(n))return n;_(133,{iconName:e});return}else{const n=t.registry.getIcon(e);return n||t.validation?.validateIcon(e),Pe({tag:"span",cls:`ag-icon ag-icon-${n??e}`,role:"presentation",attrs:{unselectable:"on"}})}}var rC=".ag-dnd-ghost{align-items:center;background-color:var(--ag-drag-and-drop-image-background-color);border:var(--ag-drag-and-drop-image-border);border-radius:var(--ag-border-radius);box-shadow:var(--ag-drag-and-drop-image-shadow);color:var(--ag-text-color);cursor:move;display:flex;font-weight:500;gap:var(--ag-cell-widget-spacing);height:var(--ag-header-height);overflow:hidden;padding-left:var(--ag-cell-horizontal-padding);padding-right:var(--ag-cell-horizontal-padding);text-overflow:ellipsis;transform:translateY(calc(var(--ag-spacing)*2));white-space:nowrap}",aC={tag:"div",children:[{tag:"div",ref:"eGhost",cls:"ag-dnd-ghost ag-unselectable",children:[{tag:"span",ref:"eIcon",cls:"ag-dnd-ghost-icon ag-shake-left-to-right"},{tag:"div",ref:"eLabel",cls:"ag-dnd-ghost-label"}]}]},lC=class extends pe{constructor(){super(),this.dragSource=null,this.eIcon=O,this.eLabel=O,this.eGhost=O,this.registerCSS(rC)}postConstruct(){const e=t=>ri(t,this.beans,null);this.dropIconMap={pinned:e("columnMovePin"),hide:e("columnMoveHide"),move:e("columnMoveMove"),left:e("columnMoveLeft"),right:e("columnMoveRight"),group:e("columnMoveGroup"),aggregate:e("columnMoveValue"),pivot:e("columnMovePivot"),notAllowed:e("dropNotAllowed")}}init(e){this.dragSource=e.dragSource,this.setTemplate(aC),this.beans.environment.applyThemeClasses(this.eGhost)}destroy(){this.dragSource=null,super.destroy()}setIcon(e,t){const{eIcon:o,dragSource:i,dropIconMap:s,gos:n}=this;ct(o);let r=null;e||(e=i?.getDefaultIconName?i.getDefaultIconName():"notAllowed"),r=s[e],o.classList.toggle("ag-shake-left-to-right",t),!(r===s.hide&&n.get("suppressDragLeaveHidesColumns"))&&r&&o.appendChild(r)}setLabel(e){this.eLabel.textContent=e}},dC=".ag-label{white-space:nowrap}:where(.ag-ltr) .ag-label{margin-right:var(--ag-spacing)}:where(.ag-rtl) .ag-label{margin-left:var(--ag-spacing)}:where(.ag-label-align-right) .ag-label{order:1}:where(.ag-ltr) :where(.ag-label-align-right) .ag-label{margin-left:var(--ag-spacing)}:where(.ag-rtl) :where(.ag-label-align-right) .ag-label{margin-right:var(--ag-spacing)}.ag-label-align-right>*{flex:none}.ag-label-align-top{align-items:flex-start;flex-direction:column;>*{align-self:stretch}}.ag-label-ellipsis{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:where(.ag-label-align-top) .ag-label{margin-bottom:calc(var(--ag-spacing)*.5)}",cC=class extends pe{constructor(e,t,o){super(t,o),this.labelSeparator="",this.labelAlignment="left",this.disabled=!1,this.label="",this.config=e||{},this.registerCSS(dC)}postConstruct(){this.addCssClass("ag-labeled"),this.eLabel.classList.add("ag-label");const{labelSeparator:e,label:t,labelWidth:o,labelAlignment:i,disabled:s}=this.config;s!=null&&this.setDisabled(s),e!=null&&this.setLabelSeparator(e),t!=null&&this.setLabel(t),o!=null&&this.setLabelWidth(o),this.setLabelAlignment(i||this.labelAlignment),this.refreshLabel()}refreshLabel(){const{label:e,eLabel:t}=this;ct(t),typeof e=="string"?t.innerText=e+this.labelSeparator:e&&t.appendChild(e),e===""?(he(t,!1),qe(t,"presentation")):(he(t,!0),qe(t,null))}setLabelSeparator(e){return this.labelSeparator===e?this:(this.labelSeparator=e,this.label!=null&&this.refreshLabel(),this)}getLabelId(){const e=this.eLabel;return e.id=e.id||`ag-${this.getCompId()}-label`,e.id}getLabel(){return this.label}setLabel(e){return this.label===e?this:(this.label=e,this.refreshLabel(),this)}setLabelAlignment(e){const o=this.getGui().classList;return o.toggle("ag-label-align-left",e==="left"),o.toggle("ag-label-align-right",e==="right"),o.toggle("ag-label-align-top",e==="top"),this}setLabelEllipsis(e){return this.eLabel.classList.toggle("ag-label-ellipsis",e),this}setLabelWidth(e){return this.label==null?this:(sn(this.eLabel,e),this)}setDisabled(e){e=!!e;const t=this.getGui();return ca(t,e),t.classList.toggle("ag-disabled",e),this.disabled=e,this}isDisabled(){return!!this.disabled}},wu=class extends cC{constructor(e,t,o,i){super(e,t,o),this.className=i}postConstruct(){super.postConstruct();const{width:e,value:t,onValueChange:o}=this.config;e!=null&&this.setWidth(e),t!=null&&this.setValue(t),o!=null&&this.onValueChange(o),this.className&&this.addCssClass(this.className),this.refreshAriaLabelledBy()}setLabel(e){return super.setLabel(e),this.refreshAriaLabelledBy(),this}refreshAriaLabelledBy(){const e=this.getAriaElement(),t=this.getLabelId(),o=this.getLabel();o==null||o==""||up(e)!==null?hi(e,""):hi(e,t??"")}setAriaLabel(e){return ut(this.getAriaElement(),e),this.refreshAriaLabelledBy(),this}onValueChange(e){return this.addManagedListeners(this,{fieldValueChanged:()=>e(this.getValue())}),this}getWidth(){return this.getGui().clientWidth}setWidth(e){return _t(this.getGui(),e),this}getPreviousValue(){return this.previousValue}getValue(){return this.value}setValue(e,t){return this.value===e?this:(this.previousValue=this.value,this.value=e,t||this.dispatchLocalEvent({type:"fieldValueChanged"}),this)}};function uC(e){return{tag:"div",role:"presentation",children:[{tag:"div",ref:"eLabel",cls:"ag-input-field-label"},{tag:"div",ref:"eWrapper",cls:"ag-wrapper ag-input-wrapper",role:"presentation",children:[{tag:e,ref:"eInput",cls:"ag-input-field-input"}]}]}}var Su=class extends wu{constructor(e,t,o="text",i="input"){super(e,e?.template??uC(i),[],t),this.inputType=o,this.displayFieldTag=i,this.eLabel=O,this.eWrapper=O,this.eInput=O}postConstruct(){super.postConstruct(),this.setInputType();const{eLabel:e,eWrapper:t,eInput:o,className:i}=this;e.classList.add(`${i}-label`),t.classList.add(`${i}-input-wrapper`),o.classList.add(`${i}-input`),this.addCssClass("ag-input-field"),o.id=o.id||`ag-${this.getCompId()}-input`;const{inputName:s,inputWidth:n}=this.config;s!=null&&this.setInputName(s),n!=null&&this.setInputWidth(n),this.addInputListeners(),this.activateTabIndex([o])}addInputListeners(){this.addManagedElementListeners(this.eInput,{input:e=>this.setValue(e.target.value)})}setInputType(){this.displayFieldTag==="input"&&this.eInput.setAttribute("type",this.inputType)}getInputElement(){return this.eInput}setInputWidth(e){return sn(this.eWrapper,e),this}setInputName(e){return this.getInputElement().setAttribute("name",e),this}getFocusableElement(){return this.eInput}setMaxLength(e){const t=this.eInput;return t.maxLength=e,this}setInputPlaceholder(e){return oi(this.eInput,"placeholder",e),this}setInputAriaLabel(e){return ut(this.eInput,e),this.refreshAriaLabelledBy(),this}setDisabled(e){return ca(this.eInput,e),super.setDisabled(e)}setAutoComplete(e){if(e===!0)oi(this.eInput,"autocomplete",null);else{const t=typeof e=="string"?e:"off";oi(this.eInput,"autocomplete",t)}return this}},yu=class extends Su{constructor(e,t="ag-checkbox",o="checkbox"){super(e,t,o),this.labelAlignment="right",this.selected=!1,this.readOnly=!1,this.passive=!1}postConstruct(){super.postConstruct();const{readOnly:e,passive:t}=this.config;typeof e=="boolean"&&this.setReadOnly(e),typeof t=="boolean"&&this.setPassive(t)}addInputListeners(){this.addManagedElementListeners(this.eInput,{click:this.onCheckboxClick.bind(this)}),this.addManagedElementListeners(this.eLabel,{click:this.toggle.bind(this)})}getNextValue(){return this.selected===void 0?!0:!this.selected}setPassive(e){this.passive=e}isReadOnly(){return this.readOnly}setReadOnly(e){this.eWrapper.classList.toggle("ag-disabled",e),this.eInput.disabled=e,this.readOnly=e}setDisabled(e){return this.eWrapper.classList.toggle("ag-disabled",e),super.setDisabled(e)}toggle(){if(this.eInput.disabled)return;const e=this.isSelected(),t=this.getNextValue();this.passive?this.dispatchChange(t,e):this.setValue(t)}getValue(){return this.isSelected()}setValue(e,t){return this.refreshSelectedClass(e),this.setSelected(e,t),this}setName(e){const t=this.getInputElement();return t.name=e,this}isSelected(){return this.selected}setSelected(e,t){if(this.isSelected()===e)return;this.previousValue=this.isSelected(),e=this.selected=typeof e=="boolean"?e:void 0;const o=this.eInput;o.checked=e,o.indeterminate=e===void 0,t||this.dispatchChange(this.selected,this.previousValue)}dispatchChange(e,t,o){this.dispatchLocalEvent({type:"fieldValueChanged",selected:e,previousValue:t,event:o});const i=this.getInputElement();this.eventSvc.dispatchEvent({type:"checkboxChanged",id:i.id,name:i.name,selected:e,previousValue:t})}onCheckboxClick(e){if(this.passive||this.eInput.disabled)return;const t=this.isSelected(),o=this.selected=e.target.checked;this.refreshSelectedClass(o),this.dispatchChange(o,t,e)}refreshSelectedClass(e){const t=this.eWrapper.classList;t.toggle("ag-checked",e===!0),t.toggle("ag-indeterminate",e==null)}},yi={selector:"AG-CHECKBOX",component:yu},hC=".ag-checkbox-cell{height:100%}",pC={tag:"div",cls:"ag-cell-wrapper ag-checkbox-cell",role:"presentation",children:[{tag:"ag-checkbox",ref:"eCheckbox",role:"presentation"}]},gC=class extends pe{constructor(){super(pC,[yi]),this.eCheckbox=O,this.registerCSS(hC)}init(e){this.refresh(e);const{eCheckbox:t,beans:o}=this,i=t.getInputElement();i.setAttribute("tabindex","-1"),Bd(i,"polite"),this.addManagedListeners(i,{click:s=>{if(oo(s),t.isDisabled())return;const n=t.getValue();this.onCheckboxChanged(n)},dblclick:s=>{oo(s)}}),this.addManagedElementListeners(e.eGridCell,{keydown:s=>{if(s.key===D.SPACE&&!t.isDisabled()){e.eGridCell===Ee(o)&&t.toggle();const n=t.getValue();this.onCheckboxChanged(n),s.preventDefault()}}})}refresh(e){return this.params=e,this.updateCheckbox(e),!0}updateCheckbox(e){let t,o=!0;const{value:i,column:s,node:n}=e;if(n.group&&s)if(typeof i=="boolean")t=i;else{const u=s.getColId();u.startsWith(Uo)?t=i==null||i===""?void 0:i==="true":n.aggData&&n.aggData[u]!==void 0?t=i??void 0:o=!1}else t=i??void 0;const{eCheckbox:r}=this;if(!o){r.setDisplayed(!1);return}r.setValue(t);const a=e.disabled??!s?.isCellEditable(n);r.setDisabled(a);const l=this.getLocaleTextFunc(),d=jd(l,t),c=a?d:`${l("ariaToggleCellValue","Press SPACE to toggle cell value")} (${d})`;r.setInputAriaLabel(c)}onCheckboxChanged(e){const{eventSvc:t,params:o}=this,{column:i,node:s,value:n}=o,r={column:i,colDef:i.getColDef(),data:s.data,node:s,rowIndex:s.rowIndex,rowPinned:s.rowPinned,value:n};t.dispatchEvent({type:"cellEditingStarted",...r});const a=s.setDataValue(i,e,"edit");t.dispatchEvent({type:"cellEditingStopped",...r,oldValue:n,newValue:e,valueChanged:a}),a||this.updateCheckbox(o)}},fC="ROOT_NODE_ID",mC=class extends M{constructor(){super(...arguments),this.nextId=0,this.allNodesMap={},this.rootNode=null}get treeData(){return!1}getRowNode(e){return this.allNodesMap[e]}extractRowData(){return this.rootNode?.allLeafChildren?.map(e=>e.data)}activate(e){this.rootNode=e,e.group=!0,e.level=-1,e.id=fC,e.allLeafChildren=[],e.childrenAfterGroup=[],e.childrenAfterSort=[],e.childrenAfterAggFilter=[],e.childrenAfterFilter=[],this.updateRootSiblingArrays(e)}deactivate(){this.rootNode&&(this.allNodesMap={},this.rootNode=null)}destroy(){super.destroy(),this.allNodesMap={},this.rootNode=null}setNewRowData(e){const t=this.rootNode;t&&(this.dispatchRowDataUpdateStartedEvent(e),t.childrenAfterFilter=null,t.childrenAfterGroup=null,t.childrenAfterAggFilter=null,t.childrenAfterSort=null,t.childrenMapped=null,t.updateHasChildren(),this.allNodesMap={},this.nextId=0,this.loadNewRowData(e),this.updateRootSiblingArrays(t))}updateRootSiblingArrays(e){const t=e.sibling;t&&(t.childrenAfterFilter=e.childrenAfterFilter,t.childrenAfterGroup=e.childrenAfterGroup,t.childrenAfterAggFilter=e.childrenAfterAggFilter,t.childrenAfterSort=e.childrenAfterSort,t.childrenMapped=e.childrenMapped,t.allLeafChildren=e.allLeafChildren)}loadNewRowData(e){this.rootNode.allLeafChildren=e?.map((t,o)=>this.createRowNode(t,o))??[]}setImmutableRowData(e,t){const o=es(this.gos),i=!this.gos.get("suppressMaintainUnsortedOrder"),s=e.changedRowNodes,n=new Set,r=this.rootNode,a=r.allLeafChildren,l=a.length;let d=!1,c=!1,u=!1,p=!1;for(let f=0,m=-1,C=t.length;f<C;f++){const v=t[f];let S=this.getRowNode(o({data:v,level:0}));if(!S)d=!0,S=this.createRowNode(v,-1),s.add(S);else{if(i){const b=S.sourceRowIndex;p||(p=b<=m||d),m=b}S.data!==v&&(u=!0,S.updateData(v),s.update(S))}n.add(S)}const g=[];for(let f=0;f<l;f++){const m=a[f];n.has(m)||(c=!0,m.isSelected()&&g.push(m),this.rowNodeDeleted(m),s.remove(m))}if(d||c||p){const f=new Array(n.size);let m=0;if(!i)for(let v=0;v<l;++v){const S=a[v];n.delete(S)&&(S.sourceRowIndex=m,f[m++]=S)}for(const v of n)v.sourceRowIndex=m,f[m++]=v;r.allLeafChildren=f;const C=r.sibling;C&&(C.allLeafChildren=f),e.rowNodesOrderChanged||(e.rowNodesOrderChanged=p)}(d||c||p||u)&&(this.deselectNodes(g),e.rowDataUpdated=!0)}rowNodeDeleted(e){e.clearRowTopAndRowIndex();const t=e.id,o=this.allNodesMap;o[t]===e&&delete o[t]}updateRowData(e,t){this.dispatchRowDataUpdateStartedEvent(e.add);const o={changedRowNodes:t,rowNodeTransaction:{remove:[],update:[],add:[]},rowsInserted:!1},i=[],s=es(this.gos);return this.executeRemove(s,e,o,i),this.executeUpdate(s,e,o,i),this.executeAdd(e,o),this.deselectNodes(i),o}executeAdd(e,t){const o=e.add;if(!o?.length)return;let i=this.rootNode.allLeafChildren,s=i.length;if(typeof e.addIndex=="number"&&(s=this.sanitizeAddIndex(e.addIndex),s>0&&this.gos.get("treeData")&&this.gos.get("getDataPath"))){for(let u=0;u<i.length;u++)if(i[u]?.rowIndex==s-1){s=u+1;break}}const n=o.length,r=t.changedRowNodes,a=new Array(n);for(let c=0;c<n;c++){const u=this.createRowNode(o[c],s+c);r.add(u),a[c]=u}const l=this.rootNode;if(s<i.length){const c=i.slice(0,s),u=i.slice(s,i.length),p=c.length+a.length;for(let g=0,f=u.length;g<f;++g)u[g].sourceRowIndex=p+g;i=[...c,...a,...u],t.rowsInserted=!0}else i=i.concat(a);l.allLeafChildren=i;const d=l.sibling;d&&(d.allLeafChildren=i),t.rowNodeTransaction.add=a}executeRemove(e,t,{changedRowNodes:o,rowNodeTransaction:i},s){const{remove:n}=t;if(!n?.length)return;const r={};n.forEach(d=>{const c=this.lookupRowNode(e,d);c&&(c.isSelected()&&s.push(c),c.clearRowTopAndRowIndex(),r[c.id]=!0,delete this.allNodesMap[c.id],i.remove.push(c),o.remove(c))});const a=this.rootNode;a.allLeafChildren=a.allLeafChildren?.filter(d=>!r[d.id])??null,a.allLeafChildren?.forEach((d,c)=>{d.sourceRowIndex=c});const l=a.sibling;l&&(l.allLeafChildren=a.allLeafChildren)}executeUpdate(e,t,{changedRowNodes:o,rowNodeTransaction:i},s){const{update:n}=t;n?.length&&n.forEach(r=>{const a=this.lookupRowNode(e,r);a&&(a.updateData(r),!a.selectable&&a.isSelected()&&s.push(a),i.update.push(a),o.update(a))})}dispatchRowDataUpdateStartedEvent(e){this.eventSvc.dispatchEvent({type:"rowDataUpdateStarted",firstRowData:e?.length?e[0]:null})}deselectNodes(e){const t="rowDataChanged",o=this.beans.selectionSvc,i=e.length>0;i&&o?.setNodesSelected({newValue:!1,nodes:e,suppressFinishActions:!0,source:t}),o?.updateGroupsFromChildrenSelections?.(t),i&&this.eventSvc.dispatchEvent({type:"selectionChanged",source:t,selectedNodes:o?.getSelectedNodes()??null,serverSideState:null})}sanitizeAddIndex(e){const t=this.rootNode.allLeafChildren?.length??0;return e<0||e>=t||Number.isNaN(e)?t:Math.ceil(e)}createRowNode(e,t){const o=new jo(this.beans);return o.parent=this.rootNode,o.level=0,o.group=!1,o.expanded=!1,o.sourceRowIndex=t,o.setDataAndId(e,String(this.nextId)),this.allNodesMap[o.id]&&_(2,{nodeId:o.id}),this.allNodesMap[o.id]=o,this.nextId++,o}lookupRowNode(e,t){let o;if(e){const i=e({data:t,level:0});if(o=this.allNodesMap[i],!o)return ae(4,{id:i}),null}else if(o=this.rootNode?.allLeafChildren?.find(i=>i.data===t),!o)return ae(5,{data:t}),null;return o||null}},Bt=(e=>(e.Applied="Applied",e.StoreNotFound="StoreNotFound",e.StoreLoading="StoreLoading",e.StoreWaitingToLoad="StoreWaitingToLoad",e.StoreLoadingFailed="StoreLoadingFailed",e.StoreWrongType="StoreWrongType",e.Cancelled="Cancelled",e.StoreNotStarted="StoreNotStarted",e))(Bt||{}),CC={tag:"div",cls:"ag-selection-checkbox",role:"presentation",children:[{tag:"ag-checkbox",ref:"eCheckbox",role:"presentation"}]},vC=class extends pe{constructor(){super(CC,[yi]),this.eCheckbox=O}postConstruct(){this.eCheckbox.setPassive(!0)}getCheckboxId(){return this.eCheckbox.getInputElement().id}onDataChanged(){this.onSelectionChanged()}onSelectableChanged(){this.showOrHideSelect()}onSelectionChanged(){const e=this.getLocaleTextFunc(),{rowNode:t,eCheckbox:o}=this,i=t.isSelected(),s=jd(e,i),[n,r]=t.selectable?["ariaRowToggleSelection","Press Space to toggle row selection"]:["ariaRowSelectionDisabled","Row Selection is disabled for this row"],a=e(n,r);o.setValue(i,!0),o.setInputAriaLabel(`${a} (${s})`)}init(e){if(this.rowNode=e.rowNode,this.column=e.column,this.overrides=e.overrides,this.onSelectionChanged(),this.addManagedListeners(this.eCheckbox.getInputElement(),{dblclick:oo,click:i=>{oo(i),this.beans.selectionSvc?.handleSelectionEvent(i,this.rowNode,"checkboxSelected")}}),this.addManagedListeners(this.rowNode,{rowSelected:this.onSelectionChanged.bind(this),dataChanged:this.onDataChanged.bind(this),selectableChanged:this.onSelectableChanged.bind(this)}),this.addManagedPropertyListener("rowSelection",({currentValue:i,previousValue:s})=>{const n=typeof i=="object"?qn(i):void 0,r=typeof s=="object"?qn(s):void 0;n!==r&&this.onSelectableChanged()}),Nr(this.gos)||typeof this.getIsVisible()=="function"){const i=this.showOrHideSelect.bind(this);this.addManagedEventListeners({displayedColumnsChanged:i}),this.addManagedListeners(this.rowNode,{dataChanged:i,cellChanged:i}),this.showOrHideSelect()}this.eCheckbox.getInputElement().setAttribute("tabindex","-1")}showOrHideSelect(){const{column:e,rowNode:t,overrides:o,gos:i}=this;let s=t.selectable;const n=this.getIsVisible();if(s)if(typeof n=="function"){const l=o?.callbackParams;if(!e)s=n({...l,node:t,data:t.data});else{const d=e.createColumnFunctionCallbackParams(t);s=n({...l,...d})}}else s=n??!1;const r=i.get("rowSelection");if(r&&typeof r!="string"?!qn(r):e?.getColDef().showDisabledCheckboxes){this.eCheckbox.setDisabled(!s),this.setVisible(!0),this.setDisplayed(!0);return}if(o?.removeHidden){this.setDisplayed(s);return}this.setVisible(s)}getIsVisible(){const e=this.overrides;if(e)return e.isVisible;const t=this.gos.get("rowSelection");return t&&typeof t!="string"?Bo(t):this.column?.getColDef()?.checkboxSelection}},wC=class{constructor(e){this.rowModel=e,this.selectAll=!1,this.rootId=null,this.endId=null,this.cachedRange=[]}reset(){this.rootId=null,this.endId=null,this.cachedRange.length=0}setRoot(e){this.rootId=e.id,this.endId=null,this.cachedRange.length=0}setEndRange(e){this.endId=e.id,this.cachedRange.length=0}getRange(){if(this.cachedRange.length===0){const e=this.getRoot(),t=this.getEnd();if(e==null||t==null)return this.cachedRange;this.cachedRange=this.rowModel.getNodesInRangeForSelection(e,t)??[]}return this.cachedRange}isInRange(e){return this.rootId===null?!1:this.getRange().some(t=>t.id===e.id)}getRoot(e){return this.rootId?this.rowModel.getRowNode(this.rootId)??null:e?(this.setRoot(e),e):null}getEnd(){return this.endId?this.rowModel.getRowNode(this.endId)??null:null}truncate(e){const t=this.getRange();if(t.length===0)return{keep:[],discard:[]};const o=t[0].id===this.rootId,i=t.findIndex(s=>s.id===e.id);if(i>-1){const s=t.slice(0,i),n=t.slice(i+1);return this.setEndRange(e),o?{keep:s,discard:n}:{keep:n,discard:s}}else return{keep:t,discard:[]}}extend(e,t=!1){const o=this.getRoot();if(o==null){const s=this.getRange().slice();return t&&e.depthFirstSearch(n=>!n.group&&s.push(n)),s.push(e),this.setRoot(e),{keep:s,discard:[]}}const i=this.rowModel.getNodesInRangeForSelection(o,e);if(!i)return this.setRoot(e),{keep:[e],discard:[]};if(i.find(s=>s.id===this.endId))return this.setEndRange(e),{keep:this.getRange(),discard:[]};{const s=this.getRange().slice();return this.setEndRange(e),{keep:this.getRange(),discard:s}}}},SC=class extends M{constructor(e){super(),this.column=e,this.cbSelectAllVisible=!1,this.processingEventFromCheckbox=!1}onSpaceKeyDown(e){const t=this.cbSelectAll;t.isDisplayed()&&!t.getGui().contains(Ee(this.beans))&&(e.preventDefault(),t.setValue(!t.getValue()))}getCheckboxGui(){return this.cbSelectAll.getGui()}setComp(e){this.headerCellCtrl=e;const t=this.createManagedBean(new yu);this.cbSelectAll=t,t.addCssClass("ag-header-select-all"),qe(t.getGui(),"presentation"),this.showOrHideSelectAll(),this.addManagedEventListeners({newColumnsLoaded:()=>this.showOrHideSelectAll(),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this),selectionChanged:this.onSelectionChanged.bind(this),paginationChanged:this.onSelectionChanged.bind(this),modelUpdated:this.onModelChanged.bind(this)}),this.addManagedPropertyListener("rowSelection",({currentValue:o,previousValue:i})=>{const s=n=>typeof n=="string"||!n||n.mode==="singleRow"?void 0:n.selectAll;s(o)!==s(i)&&this.showOrHideSelectAll()}),this.addManagedListeners(t,{fieldValueChanged:this.onCbSelectAll.bind(this)}),t.getInputElement().setAttribute("tabindex","-1"),this.refreshSelectAllLabel()}onDisplayedColumnsChanged(e){this.isAlive()&&this.showOrHideSelectAll(e.source==="uiColumnMoved")}showOrHideSelectAll(e=!1){const t=this.isCheckboxSelection();this.cbSelectAllVisible=t,this.cbSelectAll.setDisplayed(t),t&&(this.checkRightRowModelType("selectAllCheckbox"),this.checkSelectionType("selectAllCheckbox"),this.updateStateOfCheckbox()),this.refreshSelectAllLabel(e)}onModelChanged(){this.cbSelectAllVisible&&this.updateStateOfCheckbox()}onSelectionChanged(){this.cbSelectAllVisible&&this.updateStateOfCheckbox()}updateStateOfCheckbox(){if(this.processingEventFromCheckbox)return;this.processingEventFromCheckbox=!0;const e=this.getSelectAllMode(),t=this.beans.selectionSvc,o=this.cbSelectAll,i=t.getSelectAllState(e);o.setValue(i);const s=t.hasNodesToSelect(e);o.setDisabled(!s),this.refreshSelectAllLabel(),this.processingEventFromCheckbox=!1}refreshSelectAllLabel(e=!1){const t=this.getLocaleTextFunc(),{headerCellCtrl:o,cbSelectAll:i,cbSelectAllVisible:s}=this,r=i.getValue()?t("ariaChecked","checked"):t("ariaUnchecked","unchecked"),a=t("ariaRowSelectAll","Press Space to toggle all rows selection");o.setAriaDescriptionProperty("selectAll",s?`${a} (${r})`:null),i.setInputAriaLabel(t("ariaHeaderSelection","Column with Header Selection")),e||o.announceAriaDescription()}checkSelectionType(e){return Wo(this.gos)?!0:(_(128,{feature:e}),!1)}checkRightRowModelType(e){const{gos:t,rowModel:o}=this.beans;return Lt(t)||pt(t)?!0:(_(129,{feature:e,rowModel:o.getType()}),!1)}onCbSelectAll(){if(this.processingEventFromCheckbox||!this.cbSelectAllVisible)return;const e=this.cbSelectAll.getValue(),t=this.getSelectAllMode();let o="uiSelectAll";t==="currentPage"?o="uiSelectAllCurrentPage":t==="filtered"&&(o="uiSelectAllFiltered");const i={source:o,selectAll:t},s=this.beans.selectionSvc;e?s.selectAllRowNodes(i):s.deselectAllRowNodes(i)}isCheckboxSelection(){const{column:e,gos:t,beans:o}=this,i=t.get("rowSelection"),s=e.getColDef(),{headerCheckboxSelection:n}=s;let r=!1;const a=typeof i=="object";if(a){const d=io(e),c=Ln(e);(ts(i)==="autoGroupColumn"&&c||d&&o.selectionColSvc?.isSelectionColumnEnabled())&&(r=Os(i))}else typeof n=="function"?r=n(Z(t,{column:e,colDef:s})):r=!!n;const l=a?"headerCheckbox":"headerCheckboxSelection";return r&&this.checkRightRowModelType(l)&&this.checkSelectionType(l)}getSelectAllMode(){const e=mc(this.gos,!1);if(e)return e;const{headerCheckboxSelectionCurrentPageOnly:t,headerCheckboxSelectionFilteredOnly:o}=this.column.getColDef();return t?"currentPage":o?"filtered":"all"}},yC=class extends M{postConstruct(){const{gos:e,beans:t}=this;this.selectionCtx=new wC(t.rowModel),this.addManagedPropertyListeners(["isRowSelectable","rowSelection"],()=>{const o=Nr(e);o!==this.isRowSelectable&&(this.isRowSelectable=o,this.updateSelectable())}),this.isRowSelectable=Nr(e)}destroy(){super.destroy(),this.selectionCtx.reset()}createCheckboxSelectionComponent(){return new vC}createSelectAllFeature(e){return new SC(e)}isMultiSelect(){return Wo(this.gos)}onRowCtrlSelected(e,t,o){const i=!!e.rowNode.isSelected();e.forEachGui(o,s=>{s.rowComp.addOrRemoveCssClass("ag-row-selected",i);const n=s.element;Tr(n,i),n.contains(Ee(this.beans))&&t(s)})}announceAriaRowSelection(e){if(this.isRowSelectionBlocked(e))return;const t=e.isSelected();if(!e.selectable)return;const i=this.getLocaleTextFunc()(t?"ariaRowDeselect":"ariaRowSelect",`Press SPACE to ${t?"deselect":"select"} this row`);this.beans.ariaAnnounce?.announceValue(i,"rowSelection")}isRowSelectionBlocked(e){return!e.selectable||!!e.rowPinned||!Ht(this.gos)}updateRowSelectable(e,t){const o=this.isRowSelectable?.(e)??!0;return this.setRowSelectable(e,o,t),o}setRowSelectable(e,t,o){if(e.selectable!==t){if(e.selectable=t,e.dispatchRowEvent("selectableChanged"),o)return;if(os(this.gos)){const s=this.calculateSelectedFromChildren(e);this.setNodesSelected({nodes:[e],newValue:s??!1,source:"selectableChanged"});return}e.isSelected()&&!e.selectable&&this.setNodesSelected({nodes:[e],newValue:!1,source:"selectableChanged"})}}calculateSelectedFromChildren(e){let t=!1,o=!1;if(!e.childrenAfterGroup?.length)return e.selectable?e.__selected:null;for(let i=0;i<e.childrenAfterGroup.length;i++){const s=e.childrenAfterGroup[i];let n=s.isSelected();if(!s.selectable){const r=this.calculateSelectedFromChildren(s);if(r===null)continue;n=r}switch(n){case!0:t=!0;break;case!1:o=!0;break;default:return}}if(!(t&&o))return t?!0:o?!1:e.selectable?e.__selected:null}selectRowNode(e,t,o,i="api"){const s=!e.selectable&&t,n=e.__selected===t;if(s||n)return!1;e.__selected=t,e.dispatchRowEvent("rowSelected");const r=e.sibling;return r&&r.footer&&r.__localEventService&&r.dispatchRowEvent("rowSelected"),this.eventSvc.dispatchEvent({...su(e,this.gos,"rowSelected"),event:o||null,source:i}),!0}isCellCheckboxSelection(e,t){const o=this.gos.get("rowSelection");if(o&&typeof o!="string"){const i=io(e)&&Bo(o);return e.isColumnFunc(t,i)}else return e.isColumnFunc(t,e.colDef.checkboxSelection)}inferNodeSelections(e,t,o,i){const{gos:s,selectionCtx:n}=this,r=e.isSelected(),a=os(s),l=Yp(s),d=qp(s),c=this.isMultiSelect(),u=i==="rowClicked";if(u&&a&&e.group||u&&!(l||d))return null;if(t&&o&&c){const p=n.getRoot();if(p)if(p.isSelected()){const g=n.isInRange(e)?n.truncate(e):n.extend(e,a);return{deselect:g.discard,select:g.keep,reset:!1}}else{const g=n.extend(e,a);return{select:[],deselect:g.keep,reset:!1}}else return null}else if(t&&c){const p=n.selectAll?this.beans.rowModel.getRow(0):void 0,g=n.getRoot(p),f=n.isInRange(e)?n.truncate(e):n.extend(e,a);return{select:f.keep,deselect:f.discard,reset:n.selectAll||!!(g&&!g.isSelected())}}else{if(o)return n.setRoot(e),u&&r&&!d?null:{node:e,newValue:!r,clearSelection:!c};{n.setRoot(e);const p=Qp(s),g=fc(s)==="filteredDescendants",f=u&&(!p||!l);if(g&&r===void 0&&Lt(s))return{node:e,newValue:!1,clearSelection:!c||f};if(u){const m=r?!p:l;return m===r&&!f||m&&!l||!m&&!d?null:{node:e,newValue:m,clearSelection:!c||f}}return{node:e,newValue:!r,clearSelection:!c||f}}}}},bC=class extends Su{constructor(e,t="ag-text-field",o="text"){super(e,t,o)}postConstruct(){super.postConstruct(),this.config.allowedCharPattern&&this.preventDisallowedCharacters()}setValue(e,t){const o=this.eInput;return o.value!==e&&(o.value=j(e)?e:""),super.setValue(e,t)}setStartValue(e){this.setValue(e,!0)}preventDisallowedCharacters(){const e=new RegExp(`[${this.config.allowedCharPattern}]`),t=o=>{lu(o)&&o.key&&!e.test(o.key)&&o.preventDefault()};this.addManagedListeners(this.eInput,{keydown:t,paste:o=>{const i=o.clipboardData?.getData("text");i&&i.split("").some(s=>!e.test(s))&&o.preventDefault()}})}},Ga={selector:"AG-INPUT-TEXT-FIELD",component:bC};function Rl(e,t){return e.toString().padStart(t,"0")}function Fl(e,t=!0,o="-"){if(!e)return null;let i=[e.getFullYear(),e.getMonth()+1,e.getDate()].map(s=>Rl(s,2)).join(o);return t&&(i+=" "+[e.getHours(),e.getMinutes(),e.getSeconds()].map(s=>Rl(s,2)).join(":")),i}function xl(e){if(!e)return null;const[t,o]=e.split(" ");if(!t)return null;const i=t.split("-").map(u=>parseInt(u,10));if(i.filter(u=>!isNaN(u)).length!==3)return null;const[s,n,r]=i,a=new Date(s,n-1,r);if(a.getFullYear()!==s||a.getMonth()!==n-1||a.getDate()!==r)return null;if(!o||o==="00:00:00")return a;const[l,d,c]=o.split(":").map(u=>parseInt(u,10));return l>=0&&l<24&&a.setHours(l),d>=0&&d<60&&a.setMinutes(d),c>=0&&c<60&&a.setSeconds(c),a}var RC=1e3,FC=1e3,Dl=100,Ml,Fs=!1,xC=class extends M{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){return e==="show"?this.tooltipCtrl.getTooltipShowDelayOverride?.()??this.getGridOptionsTooltipDelay("tooltipShowDelay"):this.tooltipCtrl.getTooltipHideDelayOverride?.()??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()),!ko()&&(Fs?this.showTooltipTimeoutId=window.setTimeout(()=>{this.prepareToShowTooltip(e)},Dl):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){const t=e.relatedTarget,o=this.tooltipCtrl.getGui(),i=this.tooltipComp?.getGui();this.isInteractingWithTooltip||o.contains(t)||this.interactionEnabled&&i?.contains(t)||this.setToDoNothing()}onKeyDown(){this.isInteractingWithTooltip&&(this.isInteractingWithTooltip=!1),this.setToDoNothing()}prepareToShowTooltip(e){if(this.state!=0||Fs)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()-Ml<RC}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(){const e=this.getTooltipValue(),t=this.tooltipCtrl;if(!j(e)||t.shouldDisplayTooltip&&!t.shouldDisplayTooltip()){this.setToDoNothing();return}const o=t.getRowNode?.(),i=Z(this.gos,{location:t.getLocation?.()??"UNKNOWN",colDef:t.getColDef?.(),column:t.getColumn?.(),rowIndex:t.getRowIndex?.(),node:o,data:o?.data,value:e,valueFormatted:t.getValueFormatted?.(),hideTooltipCallback:()=>this.hideTooltip(!0),...t.getAdditionalParams?.()??{}});this.state=2,this.tooltipInstanceCount++;const s=this.newTooltipComponentCallback.bind(this,this.tooltipInstanceCount);nf(this.userCompFactory,i)?.newAgStackInstance().then(s)}hideTooltip(e){!e&&this.isInteractingWithTooltip||(this.tooltipComp&&(this.destroyTooltipComp(),Ml=Date.now()),this.eventSvc.dispatchEvent({type:"tooltipHide",parentGui:this.tooltipCtrl.getGui()}),e&&(this.isInteractingWithTooltip=!1),this.setToDoNothing(!0))}newTooltipComponentCallback(e,t){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=this.popupSvc?.addPopup({eChild:i,ariaLabel:s("ariaLabelTooltip","Tooltip")});if(n&&(this.tooltipPopupDestroyFunc=n.hideFunc),this.positionTooltip(),this.tooltipTrigger===1){const r=()=>this.setToDoNothing();[this.onBodyScrollEventCallback,this.onColumnMovedEventCallback]=this.addManagedEventListeners({bodyScroll:r,columnMoved:r})}this.interactionEnabled&&([this.tooltipMouseEnterListener,this.tooltipMouseLeaveListener]=this.addManagedElementListeners(i,{mouseenter:this.onTooltipMouseEnter.bind(this),mouseleave:this.onTooltipMouseLeave.bind(this)}),[this.onDocumentKeyDownCallback]=this.addManagedElementListeners(Le(this.beans),{keydown:r=>{i.contains(r?.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(){const e=this.tooltipComp?.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(){const e={type:"tooltip",ePopup:this.tooltipComp.getGui(),nudgeY:18,skipObserver:this.tooltipMouseTrack};this.lastMouseEvent?this.popupSvc?.positionPopupUnderMouseEvent({...e,mouseEvent:this.lastMouseEvent}):this.popupSvc?.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?FC: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(){Fs=!0,this.interactiveTooltipTimeoutId=window.setTimeout(()=>{this.unlockService(),this.setToDoNothing()},Dl)}unlockService(){Fs=!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 Vi(e){return e.get("tooltipShowMode")==="whenTruncated"}function Oa(e,t){return Vi(e)?_i(t):void 0}function _i(e){return()=>{const t=e();return t?t.scrollWidth>t.clientWidth:!0}}var DC=class extends M{constructor(e,t){super(),this.ctrl=e,t&&(this.beans=t)}postConstruct(){this.refreshTooltip()}setBrowserTooltip(e){const t="title",o=this.ctrl.getGui();o&&(e!=null&&e!=""?o.setAttribute(t,e):o.removeAttribute(t))}updateTooltipText(){const{getTooltipValue:e}=this.ctrl;e&&(this.tooltip=e())}createTooltipFeatureIfNeeded(){this.tooltipManager==null&&(this.tooltipManager=this.createBean(new xC(this.ctrl,()=>this.tooltip),this.beans.context))}setTooltipAndRefresh(e){this.tooltip=e,this.refreshTooltip()}refreshTooltip(){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(null),this.createTooltipFeatureIfNeeded())}destroy(){this.tooltipManager=this.destroyBean(this.tooltipManager,this.beans.context),super.destroy()}},MC=class extends pe{constructor(e="default",t=!1){super({tag:"div",cls:`ag-list ag-${e}-list`}),this.cssIdentifier=e,this.unFocusable=t,this.activeClass="ag-active-item",this.options=[],this.itemEls=[]}postConstruct(){const e=this.getGui();this.addManagedElementListeners(e,{mouseleave:()=>this.clearHighlighted()}),!this.unFocusable&&this.addManagedElementListeners(e,{keydown:this.handleKeyDown.bind(this)})}handleKeyDown(e){const t=e.key;switch(t){case D.ENTER:if(!this.highlightedEl)this.setValue(this.getValue());else{const o=this.itemEls.indexOf(this.highlightedEl);this.setValueByIndex(o)}break;case D.DOWN:case D.UP:e.preventDefault(),this.navigate(t);break;case D.PAGE_DOWN:case D.PAGE_UP:case D.PAGE_HOME:case D.PAGE_END:e.preventDefault(),this.navigateToPage(t);break}}navigate(e){const t=e===D.DOWN;let o;const{itemEls:i,highlightedEl:s}=this;if(!s)o=i[t?0:i.length-1];else{let r=i.indexOf(s)+(t?1:-1);r=Math.min(Math.max(r,0),i.length-1),o=i[r]}this.highlightItem(o)}navigateToPage(e){const{itemEls:t,highlightedEl:o}=this;if(!o||t.length===0)return;const i=t.indexOf(o),s=this.options.length-1,n=t[0].clientHeight,r=Math.floor(this.getGui().clientHeight/n);let a=-1;e===D.PAGE_HOME?a=0:e===D.PAGE_END?a=s:e===D.PAGE_DOWN?a=Math.min(i+r,s):e===D.PAGE_UP&&(a=Math.max(i-r,0)),a!==-1&&this.highlightItem(t[a])}addOptions(e){return e.forEach(t=>this.addOption(t)),this}addOption(e){const{value:t,text:o}=e,i=o||t;return this.options.push({value:t,text:i}),this.renderOption(t,i),this.updateIndices(),this}clearOptions(){this.options=[],this.reset(!0),this.itemEls.forEach(e=>{Nt(e)}),this.itemEls=[],this.refreshAriaRole()}refreshAriaRole(){const e=this.getGui();qe(e,this.options.length===0?"presentation":"listbox")}updateIndices(){const e=this.getGui().querySelectorAll(".ag-list-item");this.refreshAriaRole(),e.forEach((t,o)=>{zd(t,o+1),_d(t,e.length)})}renderOption(e,t){const o=Le(this.beans),i=o.createElement("div");qe(i,"option"),i.classList.add("ag-list-item",`ag-${this.cssIdentifier}-list-item`);const s=o.createElement("span");i.appendChild(s),s.textContent=t,this.unFocusable||(i.tabIndex=-1),this.itemEls.push(i),this.addManagedListeners(i,{mouseover:()=>this.highlightItem(i),mousedown:n=>{n.preventDefault(),n.stopPropagation(),this.setValue(e)}}),this.createOptionalManagedBean(this.beans.registry.createDynamicBean("tooltipFeature",!1,{getTooltipValue:()=>t,getGui:()=>i,getLocation:()=>"UNKNOWN",shouldDisplayTooltip:()=>s.scrollWidth>s.clientWidth})),this.getGui().appendChild(i)}setValue(e,t){if(this.value===e)return this.fireItemSelected(),this;if(e==null)return this.reset(t),this;const o=this.options.findIndex(i=>i.value===e);if(o!==-1){const i=this.options[o];this.value=i.value,this.displayValue=i.text,this.highlightItem(this.itemEls[o]),t||this.fireChangeEvent()}return this}setValueByIndex(e){return this.setValue(this.options[e].value)}getValue(){return this.value}getDisplayValue(){return this.displayValue}refreshHighlighted(){this.clearHighlighted();const e=this.options.findIndex(t=>t.value===this.value);e!==-1&&this.highlightItem(this.itemEls[e])}reset(e){this.value=null,this.displayValue=null,this.clearHighlighted(),e||this.fireChangeEvent()}highlightItem(e){if(!ht(e))return;this.clearHighlighted(),this.highlightedEl=e,e.classList.add(this.activeClass),Tr(e,!0);const t=this.getGui(),{scrollTop:o,clientHeight:i}=t,{offsetTop:s,offsetHeight:n}=e;(s+n>o+i||s<o)&&e.scrollIntoView({block:"nearest"}),this.unFocusable||e.focus()}clearHighlighted(){const e=this.highlightedEl;!e||!ht(e)||(e.classList.remove(this.activeClass),Tr(e,!1),this.highlightedEl=null)}fireChangeEvent(){this.dispatchLocalEvent({type:"fieldValueChanged"}),this.fireItemSelected()}fireItemSelected(){this.dispatchLocalEvent({type:"selectedItem"})}},PC=".ag-picker-field-display{flex:1 1 auto}.ag-picker-field{align-items:center;display:flex}.ag-picker-field-icon{border:0;cursor:pointer;display:flex;margin:0;padding:0}.ag-picker-field-wrapper{background-color:var(--ag-picker-button-background-color);border:var(--ag-picker-button-border);border-radius:5px;min-height:max(var(--ag-list-item-height),calc(var(--ag-spacing)*4));overflow:hidden;&:disabled{opacity:.5}&.ag-picker-has-focus,&:focus-within{background-color:var(--ag-picker-button-focus-background-color);border:var(--ag-picker-button-focus-border);box-shadow:var(--ag-focus-shadow)}}",EC={tag:"div",cls:"ag-picker-field",role:"presentation",children:[{tag:"div",ref:"eLabel"},{tag:"div",ref:"eWrapper",cls:"ag-wrapper ag-picker-field-wrapper ag-picker-collapsed",children:[{tag:"div",ref:"eDisplayField",cls:"ag-picker-field-display"},{tag:"div",ref:"eIcon",cls:"ag-picker-field-icon",attrs:{"aria-hidden":"true"}}]}]},AC=class extends wu{constructor(e){if(super(e,e?.template||EC,e?.agComponents||[],e?.className),this.isPickerDisplayed=!1,this.skipClick=!1,this.pickerGap=4,this.hideCurrentPicker=null,this.eLabel=O,this.eWrapper=O,this.eDisplayField=O,this.eIcon=O,this.registerCSS(PC),this.ariaRole=e?.ariaRole,this.onPickerFocusIn=this.onPickerFocusIn.bind(this),this.onPickerFocusOut=this.onPickerFocusOut.bind(this),!e)return;const{pickerGap:t,maxPickerHeight:o,variableWidth:i,minPickerWidth:s,maxPickerWidth:n}=e;t!=null&&(this.pickerGap=t),this.variableWidth=!!i,o!=null&&this.setPickerMaxHeight(o),s!=null&&this.setPickerMinWidth(s),n!=null&&this.setPickerMaxWidth(n)}postConstruct(){super.postConstruct(),this.setupAria();const e=`ag-${this.getCompId()}-display`;this.eDisplayField.setAttribute("id",e);const t=this.getAriaElement();this.addManagedElementListeners(t,{keydown:this.onKeyDown.bind(this)}),this.addManagedElementListeners(this.eLabel,{mousedown:this.onLabelOrWrapperMouseDown.bind(this)}),this.addManagedElementListeners(this.eWrapper,{mousedown:this.onLabelOrWrapperMouseDown.bind(this)});const{pickerIcon:o,inputWidth:i}=this.config;if(o){const s=oe(o,this.beans);s&&this.eIcon.appendChild(s)}i!=null&&this.setInputWidth(i)}setupAria(){const e=this.getAriaElement();e.setAttribute("tabindex",this.gos.get("tabIndex").toString()),to(e,!1),this.ariaRole&&qe(e,this.ariaRole)}onLabelOrWrapperMouseDown(e){if(e){const t=this.getFocusableElement();if(t!==this.eWrapper&&e?.target===t)return;e.preventDefault(),this.getFocusableElement().focus()}if(this.skipClick){this.skipClick=!1;return}this.isDisabled()||(this.isPickerDisplayed?this.hidePicker():this.showPicker())}onKeyDown(e){switch(e.key){case D.UP:case D.DOWN:case D.ENTER:case D.SPACE:e.preventDefault(),this.onLabelOrWrapperMouseDown();break;case D.ESCAPE:this.isPickerDisplayed&&(e.preventDefault(),e.stopPropagation(),this.hideCurrentPicker&&this.hideCurrentPicker());break}}showPicker(){this.isPickerDisplayed=!0,this.pickerComponent||(this.pickerComponent=this.createPickerComponent());const e=this.pickerComponent.getGui();e.addEventListener("focusin",this.onPickerFocusIn),e.addEventListener("focusout",this.onPickerFocusOut),this.hideCurrentPicker=this.renderAndPositionPicker(),this.toggleExpandedStyles(!0)}renderAndPositionPicker(){const e=this.pickerComponent.getGui();this.gos.get("suppressScrollWhenPopupsAreOpen")||([this.destroyMouseWheelFunc]=this.addManagedEventListeners({bodyScroll:()=>{this.hidePicker()}}));const t=this.getLocaleTextFunc(),{config:{pickerAriaLabelKey:o,pickerAriaLabelValue:i,modalPicker:s=!0},maxPickerHeight:n,minPickerWidth:r,maxPickerWidth:a,variableWidth:l,beans:d,eWrapper:c}=this,u={modal:s,eChild:e,closeOnEsc:!0,closedCallback:()=>{const m=rn(d);this.beforeHidePicker(),m&&this.isAlive()&&this.getFocusableElement().focus()},ariaLabel:t(o,i),anchorToElement:c};e.style.position="absolute";const p=d.popupSvc,g=p.addPopup(u);l?(r&&(e.style.minWidth=r),e.style.width=ua(en(c)),a&&(e.style.maxWidth=a)):sn(e,a??en(c));const f=n??`${Mn(p.getPopupParent())}px`;return e.style.setProperty("max-height",f),this.alignPickerToComponent(),g.hideFunc}alignPickerToComponent(){if(!this.pickerComponent)return;const{pickerGap:e,config:{pickerType:t},beans:{popupSvc:o,gos:i},eWrapper:s,pickerComponent:n}=this,r=i.get("enableRtl")?"right":"left";o.positionPopupByComponent({type:t,eventSource:s,ePopup:n.getGui(),position:"under",alignSide:r,keepWithinBounds:!0,nudgeY:e})}beforeHidePicker(){this.destroyMouseWheelFunc&&(this.destroyMouseWheelFunc(),this.destroyMouseWheelFunc=void 0),this.toggleExpandedStyles(!1);const e=this.pickerComponent.getGui();e.removeEventListener("focusin",this.onPickerFocusIn),e.removeEventListener("focusout",this.onPickerFocusOut),this.isPickerDisplayed=!1,this.pickerComponent=void 0,this.hideCurrentPicker=null}toggleExpandedStyles(e){if(!this.isAlive())return;const t=this.getAriaElement();to(t,e);const o=this.eWrapper.classList;o.toggle("ag-picker-expanded",e),o.toggle("ag-picker-collapsed",!e)}onPickerFocusIn(){this.togglePickerHasFocus(!0)}onPickerFocusOut(e){this.pickerComponent?.getGui().contains(e.relatedTarget)||this.togglePickerHasFocus(!1)}togglePickerHasFocus(e){this.pickerComponent&&this.eWrapper.classList.toggle("ag-picker-has-focus",e)}hidePicker(){this.hideCurrentPicker?.()}setInputWidth(e){return sn(this.eWrapper,e),this}getFocusableElement(){return this.eWrapper}setPickerGap(e){return this.pickerGap=e,this}setPickerMinWidth(e){return typeof e=="number"&&(e=`${e}px`),this.minPickerWidth=e??void 0,this}setPickerMaxWidth(e){return typeof e=="number"&&(e=`${e}px`),this.maxPickerWidth=e??void 0,this}setPickerMaxHeight(e){return typeof e=="number"&&(e=`${e}px`),this.maxPickerHeight=e??void 0,this}destroy(){this.hidePicker(),super.destroy()}},TC=".ag-select{align-items:center;display:flex;&.ag-disabled{opacity:.5}}:where(.ag-select){.ag-picker-field-wrapper{cursor:default}&.ag-disabled .ag-picker-field-wrapper:focus{box-shadow:none}&:not(.ag-cell-editor,.ag-label-align-top){min-height:var(--ag-list-item-height)}.ag-picker-field-display{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ag-picker-field-icon{align-items:center;display:flex}}:where(.ag-ltr) :where(.ag-select){.ag-picker-field-wrapper{padding-left:calc(var(--ag-cell-horizontal-padding)/2);padding-right:var(--ag-spacing)}}:where(.ag-rtl) :where(.ag-select){.ag-picker-field-wrapper{padding-left:var(--ag-spacing);padding-right:calc(var(--ag-cell-horizontal-padding)/2)}}",IC=class extends AC{constructor(e){super({pickerAriaLabelKey:"ariaLabelSelectField",pickerAriaLabelValue:"Select Field",pickerType:"ag-list",className:"ag-select",pickerIcon:"selectOpen",ariaRole:"combobox",...e}),this.registerCSS(TC)}postConstruct(){this.tooltipFeature=this.createOptionalManagedBean(this.beans.registry.createDynamicBean("tooltipFeature",!1,{shouldDisplayTooltip:_i(()=>this.eDisplayField),getGui:()=>this.getGui()})),super.postConstruct(),this.createListComponent(),this.eWrapper.tabIndex=this.gos.get("tabIndex");const{options:e,value:t,placeholder:o}=this.config;e!=null&&this.addOptions(e),t!=null&&this.setValue(t,!0),o&&t==null&&(this.eDisplayField.textContent=o),this.addManagedElementListeners(this.eWrapper,{focusout:this.onWrapperFocusOut.bind(this)})}onWrapperFocusOut(e){this.eWrapper.contains(e.relatedTarget)||this.hidePicker()}createListComponent(){const e=this.createBean(new MC("select",!0));this.listComponent=e,e.setParentComponent(this);const t=e.getAriaElement(),o=`ag-select-list-${e.getCompId()}`;t.setAttribute("id",o),yp(this.getAriaElement(),t),e.addManagedElementListeners(e.getGui(),{mousedown:i=>{i?.preventDefault()}}),e.addManagedListeners(e,{selectedItem:()=>{this.hidePicker(),this.dispatchLocalEvent({type:"selectedItem"})},fieldValueChanged:()=>{this.listComponent&&(this.setValue(this.listComponent.getValue(),!1,!0),this.hidePicker())}})}createPickerComponent(){return this.listComponent}onKeyDown(e){const{key:t}=e;switch(t===D.TAB&&this.hidePicker(),t){case D.ENTER:case D.UP:case D.DOWN:case D.PAGE_UP:case D.PAGE_DOWN:case D.PAGE_HOME:case D.PAGE_END:e.preventDefault(),this.isPickerDisplayed?this.listComponent?.handleKeyDown(e):super.onKeyDown(e);break;case D.ESCAPE:super.onKeyDown(e);break;case D.SPACE:this.isPickerDisplayed?e.preventDefault():super.onKeyDown(e);break}}showPicker(){const e=this.listComponent;e&&(super.showPicker(),e.refreshHighlighted())}addOptions(e){return e.forEach(t=>this.addOption(t)),this}addOption(e){return this.listComponent.addOption(e),this}clearOptions(){return this.listComponent?.clearOptions(),this.setValue(void 0,!0),this}setValue(e,t,o){const{listComponent:i,config:{placeholder:s},eDisplayField:n,tooltipFeature:r}=this;if(this.value===e||!i)return this;if(o||i.setValue(e,!0),i.getValue()===this.getValue())return this;let l=i.getDisplayValue();return l==null&&s&&(l=s),n.textContent=l,r?.setTooltipAndRefresh(l??null),super.setValue(e,t)}destroy(){this.listComponent=this.destroyBean(this.listComponent),super.destroy()}},Vs={TAB_GUARD:"ag-tab-guard",TAB_GUARD_TOP:"ag-tab-guard-top",TAB_GUARD_BOTTOM:"ag-tab-guard-bottom"},LC=class extends M{constructor(e){super(),this.skipTabGuardFocus=!1,this.forcingFocusOut=!1,this.allowFocus=!1;const{comp:t,eTopGuard:o,eBottomGuard:i,focusTrapActive:s,forceFocusOutWhenTabGuardsAreEmpty:n,isFocusableContainer:r,focusInnerElement:a,onFocusIn:l,onFocusOut:d,shouldStopEventPropagation:c,onTabKeyDown:u,handleKeyDown:p,isEmpty:g,eFocusableElement:f}=e;this.comp=t,this.eTopGuard=o,this.eBottomGuard=i,this.providedFocusInnerElement=a,this.eFocusableElement=f,this.focusTrapActive=!!s,this.forceFocusOutWhenTabGuardsAreEmpty=!!n,this.isFocusableContainer=!!r,this.providedFocusIn=l,this.providedFocusOut=d,this.providedShouldStopEventPropagation=c,this.providedOnTabKeyDown=u,this.providedHandleKeyDown=p,this.providedIsEmpty=g}postConstruct(){this.createManagedBean(new Si(this.eFocusableElement,{shouldStopEventPropagation:()=>this.shouldStopEventPropagation(),onTabKeyDown:e=>this.onTabKeyDown(e),handleKeyDown:e=>this.handleKeyDown(e),onFocusIn:e=>this.onFocusIn(e),onFocusOut:e=>this.onFocusOut(e)})),this.activateTabGuards(),[this.eTopGuard,this.eBottomGuard].forEach(e=>this.addManagedElementListeners(e,{focus:this.onFocus.bind(this)}))}handleKeyDown(e){this.providedHandleKeyDown&&this.providedHandleKeyDown(e)}tabGuardsAreActive(){return!!this.eTopGuard&&this.eTopGuard.hasAttribute("tabIndex")}shouldStopEventPropagation(){return this.providedShouldStopEventPropagation?this.providedShouldStopEventPropagation():!1}activateTabGuards(){if(this.forcingFocusOut)return;const e=this.gos.get("tabIndex");this.comp.setTabIndex(e.toString())}deactivateTabGuards(){this.comp.setTabIndex()}onFocus(e){if(this.isFocusableContainer&&!this.eFocusableElement.contains(e.relatedTarget)&&!this.allowFocus){this.findNextElementOutsideAndFocus(e.target===this.eBottomGuard);return}if(this.skipTabGuardFocus){this.skipTabGuardFocus=!1;return}if(this.forceFocusOutWhenTabGuardsAreEmpty&&(this.providedIsEmpty?this.providedIsEmpty():Ho(this.eFocusableElement,".ag-tab-guard").length===0)){this.findNextElementOutsideAndFocus(e.target===this.eBottomGuard);return}if(this.isFocusableContainer&&this.eFocusableElement.contains(e.relatedTarget))return;const t=e.target===this.eBottomGuard;!(this.providedFocusInnerElement?this.providedFocusInnerElement(t):this.focusInnerElement(t))&&this.forceFocusOutWhenTabGuardsAreEmpty&&this.findNextElementOutsideAndFocus(e.target===this.eBottomGuard)}findNextElementOutsideAndFocus(e){const t=Le(this.beans),o=Ho(t.body,null,!0),i=o.indexOf(e?this.eTopGuard:this.eBottomGuard);if(i===-1)return;let s,n;e?(s=0,n=i):(s=i+1,n=o.length);const r=o.slice(s,n),a=this.gos.get("tabIndex");r.sort((l,d)=>{const c=parseInt(l.getAttribute("tabindex")||"0"),u=parseInt(d.getAttribute("tabindex")||"0");return u===a?1:c===a?-1:c===0?1:u===0?-1:c-u}),r[e?r.length-1:0]?.focus()}onFocusIn(e){this.focusTrapActive||this.forcingFocusOut||(this.providedFocusIn&&this.providedFocusIn(e),this.isFocusableContainer||this.deactivateTabGuards())}onFocusOut(e){this.focusTrapActive||(this.providedFocusOut&&this.providedFocusOut(e),this.eFocusableElement.contains(e.relatedTarget)||this.activateTabGuards())}onTabKeyDown(e){if(this.providedOnTabKeyDown){this.providedOnTabKeyDown(e);return}if(this.focusTrapActive||e.defaultPrevented)return;const t=this.tabGuardsAreActive();t&&this.deactivateTabGuards();const o=this.getNextFocusableElement(e.shiftKey);t&&setTimeout(()=>this.activateTabGuards(),0),o&&(o.focus(),e.preventDefault())}focusInnerElement(e=!1){const t=Ho(this.eFocusableElement);return this.tabGuardsAreActive()&&(t.splice(0,1),t.splice(t.length-1,1)),t.length?(t[e?t.length-1:0].focus({preventScroll:!0}),!0):!1}getNextFocusableElement(e){return Kt(this.beans,this.eFocusableElement,!1,e)}forceFocusOutOfContainer(e=!1){if(this.forcingFocusOut)return;const t=e?this.eTopGuard:this.eBottomGuard;this.activateTabGuards(),this.skipTabGuardFocus=!0,this.forcingFocusOut=!0,t.focus(),window.setTimeout(()=>{this.forcingFocusOut=!1,this.activateTabGuards()})}isTabGuard(e,t){return e===this.eTopGuard&&!t||e===this.eBottomGuard&&(t??!0)}setAllowFocus(e){this.allowFocus=e}},bu=class extends M{constructor(e){super(),this.comp=e}initialiseTabGuard(e){this.eTopGuard=this.createTabGuard("top"),this.eBottomGuard=this.createTabGuard("bottom"),this.eFocusableElement=this.comp.getFocusableElement();const{eTopGuard:t,eBottomGuard:o,eFocusableElement:i}=this,s=[t,o],n={setTabIndex:C=>{s.forEach(v=>C!=null?v.setAttribute("tabindex",C):v.removeAttribute("tabindex"))}};this.addTabGuards(t,o);const{focusTrapActive:r=!1,onFocusIn:a,onFocusOut:l,focusInnerElement:d,handleKeyDown:c,onTabKeyDown:u,shouldStopEventPropagation:p,isEmpty:g,forceFocusOutWhenTabGuardsAreEmpty:f,isFocusableContainer:m}=e;this.tabGuardCtrl=this.createManagedBean(new LC({comp:n,focusTrapActive:r,eTopGuard:t,eBottomGuard:o,eFocusableElement:i,onFocusIn:a,onFocusOut:l,focusInnerElement:d,handleKeyDown:c,onTabKeyDown:u,shouldStopEventPropagation:p,isEmpty:g,forceFocusOutWhenTabGuardsAreEmpty:f,isFocusableContainer:m}))}getTabGuardCtrl(){return this.tabGuardCtrl}createTabGuard(e){const t=Le(this.beans).createElement("div"),o=e==="top"?Vs.TAB_GUARD_TOP:Vs.TAB_GUARD_BOTTOM;return t.classList.add(Vs.TAB_GUARD,o),qe(t,"presentation"),t}addTabGuards(e,t){const o=this.eFocusableElement;o.insertAdjacentElement("afterbegin",e),o.insertAdjacentElement("beforeend",t)}removeAllChildrenExceptTabGuards(){const e=[this.eTopGuard,this.eBottomGuard];ct(this.comp.getFocusableElement()),this.addTabGuards(...e)}forceFocusOutOfContainer(e=!1){this.tabGuardCtrl.forceFocusOutOfContainer(e)}appendChild(e,t,o){En(t)||(t=t.getGui());const{eBottomGuard:i}=this;i?i.insertAdjacentElement("beforebegin",t):e(t,o)}destroy(){const{eTopGuard:e,eBottomGuard:t}=this;Nt(e),Nt(t),super.destroy()}},bi=class extends pe{initialiseTabGuard(e){this.tabGuardFeature=this.createManagedBean(new bu(this)),this.tabGuardFeature.initialiseTabGuard(e)}forceFocusOutOfContainer(e=!1){this.tabGuardFeature.forceFocusOutOfContainer(e)}appendChild(e,t){this.tabGuardFeature.appendChild(super.appendChild.bind(this),e,t)}},kC=class extends pe{isPopup(){return!0}setParentComponent(e){e.addCssClass("ag-has-popup"),super.setParentComponent(e)}destroy(){const e=this.parentComponent;e&&e.isAlive()&&e.getGui().classList.remove("ag-has-popup"),super.destroy()}},Xo=class{constructor(e,t=!1){this.DOUBLE_TAP_MILLIS=500,this.destroyFuncs=[],this.touching=!1,this.localEventService=new eo,this.preventMouseClick=t;const o=this.onTouchStart.bind(this),i=this.onTouchMove.bind(this),s=this.onTouchEnd.bind(this);e.addEventListener("touchstart",o,{passive:!0}),e.addEventListener("touchmove",i,{passive:!0}),e.addEventListener("touchend",s,{passive:!1}),this.destroyFuncs.push(()=>{e.removeEventListener("touchstart",o,{passive:!0}),e.removeEventListener("touchmove",i,{passive:!0}),e.removeEventListener("touchend",s,{passive:!1})})}getActiveTouch(e){for(let t=0;t<e.length;t++)if(e[t].identifier===this.touchStart.identifier)return e[t];return null}addEventListener(e,t){this.localEventService.addEventListener(e,t)}removeEventListener(e,t){this.localEventService.removeEventListener(e,t)}onTouchStart(e){if(this.touching)return;this.touchStart=e.touches[0],this.touching=!0,this.moved=!1;const t=this.touchStart;window.setTimeout(()=>{const o=this.touchStart===t;if(this.touching&&o&&!this.moved){this.moved=!0;const i={type:"longTap",touchStart:this.touchStart,touchEvent:e};this.localEventService.dispatchEvent(i)}},500)}onTouchMove(e){if(!this.touching)return;const t=this.getActiveTouch(e.touches);if(!t)return;!tu(t,this.touchStart,4)&&(this.moved=!0)}onTouchEnd(e){if(this.touching){if(!this.moved){const t={type:"tap",touchStart:this.touchStart};this.localEventService.dispatchEvent(t),this.checkForDoubleTap()}this.preventMouseClick&&e.cancelable&&e.preventDefault(),this.touching=!1}}checkForDoubleTap(){const e=Date.now();if(this.lastTapTime&&this.lastTapTime>0)if(e-this.lastTapTime>this.DOUBLE_TAP_MILLIS){const o={type:"doubleTap",touchStart:this.touchStart};this.localEventService.dispatchEvent(o),this.lastTapTime=null}else this.lastTapTime=e;else this.lastTapTime=e}destroy(){this.destroyFuncs.forEach(e=>e())}},Ru=class{constructor(e="javascript"){this.frameworkName=e,this.renderingEngine="vanilla",this.batchFrameworkComps=!1,this.wrapIncoming=t=>t(),this.wrapOutgoing=t=>t(),this.baseDocLink=`${sc}/${this.frameworkName}-data-grid`,kp(this.baseDocLink)}setInterval(e,t){return new De(o=>{o(window.setInterval(e,t))})}addEventListener(e,t,o,i){let s={};if(typeof i=="object"?s=i:typeof i=="boolean"&&(s={capture:i}),s.passive==null){const n=bc(t);n!=null&&(s.passive=n)}e.addEventListener(t,o,s)}frameworkComponent(e){return null}isFrameworkComponent(e){return!1}getDocLink(e){return`${this.baseDocLink}${e?`/${e}`:""}`}};function GC(e){return{beanName:"gridApi",bean:e.getBean("apiFunctionSvc").api}}var OC=["licenseManager","environment","eventSvc","gos","paginationAutoPageSizeSvc","apiFunctionSvc","gridApi","registry","agCompUtils","userCompFactory","rowContainerHeight","horizontalResizeSvc","localeSvc","pinnedRowModel","dragSvc","colGroupSvc","visibleCols","popupSvc","selectionSvc","colFilter","quickFilter","filterManager","colModel","headerNavigation","pageBounds","pagination","pageBoundsListener","rowSpanSvc","stickyRowSvc","rowRenderer","expressionSvc","alignedGridsSvc","navigation","valueCache","valueSvc","autoWidthCalc","filterMenuFactory","dragAndDrop","focusSvc","cellNavigation","cellStyles","scrollVisibleSvc","sortSvc","colHover","colAnimation","autoColSvc","selectionColSvc","changeDetectionSvc","animationFrameSvc","undoRedo","colDefFactory","rowStyleSvc","rowNodeBlockLoader","rowNodeSorter","ctrlsSvc","pinnedCols","dataTypeSvc","syncSvc","overlays","stateSvc","expansionSvc","apiEventSvc","ariaAnnounce","menuSvc","colMoves","colAutosize","colFlex","colResize","pivotColsSvc","valueColsSvc","rowGroupColsSvc","funcColsSvc","colNames","colViewport","pivotResultCols","showRowGroupCols","validation"],Pl=Object.fromEntries(OC.map((e,t)=>[e,t]));function BC(e,t){const o=(e.beanName?Pl[e.beanName]:void 0)??Number.MAX_SAFE_INTEGER,i=(t.beanName?Pl[t.beanName]:void 0)??Number.MAX_SAFE_INTEGER;return o-i}function NC(e,t){return e?.beanName==="gridDestroySvc"?-1:0}var HC={tag:"div",cls:"ag-pinned-left-header",role:"rowgroup"},VC={tag:"div",cls:"ag-pinned-right-header",role:"rowgroup"},_C={tag:"div",cls:"ag-header-viewport",role:"presentation",attrs:{tabindex:"-1"},children:[{tag:"div",ref:"eCenterContainer",cls:"ag-header-container",role:"rowgroup"}]},ir=class extends pe{constructor(e){super(),this.eCenterContainer=O,this.headerRowComps={},this.rowCompsList=[],this.pinned=e}postConstruct(){this.selectAndSetTemplate();const e={setDisplayed:o=>this.setDisplayed(o),setCtrls:o=>this.setCtrls(o),setCenterWidth:o=>this.eCenterContainer.style.width=o,setViewportScrollLeft:o=>this.getGui().scrollLeft=o,setPinnedContainerWidth:o=>{const i=this.getGui();i.style.width=o,i.style.maxWidth=o,i.style.minWidth=o}};this.createManagedBean(new eC(this.pinned)).setComp(e,this.getGui())}selectAndSetTemplate(){const e=this.pinned=="left",t=this.pinned=="right",o=e?HC:t?VC:_C;this.setTemplate(o),this.eRowContainer=this.eCenterContainer!==O?this.eCenterContainer:this.getGui()}destroy(){this.setCtrls([]),super.destroy()}destroyRowComp(e){this.destroyBean(e),this.eRowContainer.removeChild(e.getGui())}setCtrls(e){const t=this.headerRowComps;this.headerRowComps={},this.rowCompsList=[];let o;const i=s=>{const n=s.getGui();n.parentElement!=this.eRowContainer&&this.eRowContainer.appendChild(n),o&&ec(this.eRowContainer,n,o),o=n};e.forEach(s=>{const n=s.instanceId,r=t[n];delete t[n];const a=r||this.createBean(new Qm(s));this.headerRowComps[n]=a,this.rowCompsList.push(a),i(a)}),Object.values(t).forEach(s=>this.destroyRowComp(s))}},zC={tag:"div",cls:"ag-header",role:"presentation"},WC=class extends pe{constructor(){super(zC)}postConstruct(){const e={addOrRemoveCssClass:(i,s)=>this.addOrRemoveCssClass(i,s),setHeightAndMinHeight:i=>{this.getGui().style.height=i,this.getGui().style.minHeight=i}};this.createManagedBean(new Wm).setComp(e,this.getGui(),this.getFocusableElement());const o=i=>{this.createManagedBean(i),this.appendChild(i)};o(new ir("left")),o(new ir(null)),o(new ir("right"))}},UC={selector:"AG-HEADER-ROOT",component:WC},$C=class extends pe{constructor(e,t,o,i,s){super(),this.cellCtrl=t,this.rendererVersion=0,this.editorVersion=0,this.beans=e,this.column=t.column,this.rowNode=t.rowNode,this.eRow=i;const n=Pe({tag:"div",role:t.getCellAriaRole(),attrs:{"comp-id":`${this.getCompId()}`,"col-id":t.colIdSanitised}});this.eCell=n;let r;t.isCellSpanning()?(r=Pe({tag:"div",cls:"ag-spanned-cell-wrapper",role:"presentation"}),r.appendChild(n),this.setTemplateFromElement(r)):this.setTemplateFromElement(n),this.cellCssClassManager=new Vc(()=>n),this.forceWrapper=t.isForceWrapper(),this.refreshWrapper(!1);const a={addOrRemoveCssClass:(l,d)=>this.cellCssClassManager.addOrRemoveCssClass(l,d),setUserStyles:l=>ds(n,l),getFocusableElement:()=>n,setIncludeSelection:l=>this.includeSelection=l,setIncludeRowDrag:l=>this.includeRowDrag=l,setIncludeDndSource:l=>this.includeDndSource=l,setRenderDetails:(l,d,c)=>this.setRenderDetails(l,d,c),setEditDetails:(l,d,c)=>this.setEditDetails(l,d,c),getCellEditor:()=>this.cellEditor||null,getCellRenderer:()=>this.cellRenderer||null,getParentOfValue:()=>this.getParentOfValue()};t.setComp(a,n,r,this.eCellWrapper,o,s,void 0)}getParentOfValue(){return this.eCellValue??this.eCellWrapper??this.eCell}setRenderDetails(e,t,o){if(this.cellEditor&&!this.cellEditorPopupWrapper)return;this.firstRender=this.firstRender==null;const s=this.refreshWrapper(!1);this.refreshEditStyles(!1),e?!(o||s)&&this.refreshCellRenderer(e)||(this.destroyRenderer(),this.createCellRendererInstance(e)):(this.destroyRenderer(),this.insertValueWithoutCellRenderer(t))}setEditDetails(e,t,o){e?this.createCellEditorInstance(e,t,o):this.destroyEditor()}removeControls(){const e=this.beans.context;this.checkboxSelectionComp=e.destroyBean(this.checkboxSelectionComp),this.dndSourceComp=e.destroyBean(this.dndSourceComp),this.rowDraggingComp=e.destroyBean(this.rowDraggingComp)}refreshWrapper(e){const t=this.includeRowDrag||this.includeDndSource||this.includeSelection,o=t||this.forceWrapper,i=o&&this.eCellWrapper==null;i&&(this.eCellWrapper=Pe({tag:"div",cls:"ag-cell-wrapper",role:"presentation"}),this.eCell.appendChild(this.eCellWrapper));const s=!o&&this.eCellWrapper!=null;s&&(Nt(this.eCellWrapper),this.eCellWrapper=void 0),this.cellCssClassManager.addOrRemoveCssClass("ag-cell-value",!o);const n=!e&&o,r=n&&this.eCellValue==null;r&&(this.eCellValue=Pe({tag:"span",cls:"ag-cell-value",role:"presentation"}),this.eCellWrapper.appendChild(this.eCellValue));const a=!n&&this.eCellValue!=null;a&&(Nt(this.eCellValue),this.eCellValue=void 0);const l=i||s||r||a;return l&&this.removeControls(),!e&&t&&this.addControls(),l}addControls(){const{cellCtrl:e,eCellWrapper:t,eCellValue:o,includeRowDrag:i,includeDndSource:s,includeSelection:n}=this,r=a=>{a&&t.insertBefore(a.getGui(),o)};i&&this.rowDraggingComp==null&&(this.rowDraggingComp=e.createRowDragComp(),r(this.rowDraggingComp)),s&&this.dndSourceComp==null&&(this.dndSourceComp=e.createDndSource(),r(this.dndSourceComp)),n&&this.checkboxSelectionComp==null&&(this.checkboxSelectionComp=e.createSelectionCheckbox(),r(this.checkboxSelectionComp))}createCellEditorInstance(e,t,o){const i=this.editorVersion,s=e.newAgStackInstance(),{params:n}=e;s.then(a=>this.afterCellEditorCreated(i,a,n,t,o)),Me(this.cellEditor)&&n.cellStartedEdit&&this.cellCtrl.focusCell(!0)}insertValueWithoutCellRenderer(e){const t=this.getParentOfValue();ct(t);const o=e!=null?St(e,!0):null;o!=null&&(t.textContent=o)}destroyRenderer(){const{context:e}=this.beans;this.cellRenderer=e.destroyBean(this.cellRenderer),Nt(this.cellRendererGui),this.cellRendererGui=null,this.rendererVersion++}destroyEditor(){const{context:e}=this.beans;(this.cellEditorPopupWrapper?.getGui().contains(Ee(this.beans))||this.cellCtrl.hasBrowserFocus())&&this.eCell.focus({preventScroll:!0}),this.hideEditorPopup?.(),this.hideEditorPopup=void 0,this.cellEditor=e.destroyBean(this.cellEditor),this.cellEditorPopupWrapper=e.destroyBean(this.cellEditorPopupWrapper),Nt(this.cellEditorGui),this.cellEditorGui=null,this.editorVersion++}refreshCellRenderer(e){if(this.cellRenderer?.refresh==null||this.cellRendererClass!==e.componentClass)return!1;const t=this.cellRenderer.refresh(e.params);return t===!0||t===void 0}createCellRendererInstance(e){const t=this.rendererVersion,{componentClass:o}=e,i=()=>{if(this.rendererVersion!==t||!this.isAlive())return;const r=e.newAgStackInstance(),a=this.afterCellRendererCreated.bind(this,t,o);r?.then(a)},{animationFrameSvc:s}=this.beans;s?.active&&this.firstRender?s.createTask(i,this.rowNode.rowIndex,"p2",e.componentFromFramework):i()}afterCellRendererCreated(e,t,o){if(!this.isAlive()||e!==this.rendererVersion){this.beans.context.destroyBean(o);return}this.cellRenderer=o,this.cellRendererClass=t;const s=o.getGui();if(this.cellRendererGui=s,s!=null){const n=this.getParentOfValue();ct(n),n.appendChild(s)}}afterCellEditorCreated(e,t,o,i,s){const n=e!==this.editorVersion,{context:r}=this.beans;if(n){r.destroyBean(t);return}if(t.isCancelBeforeStart&&t.isCancelBeforeStart()){r.destroyBean(t),this.cellCtrl.stopEditing(!0);return}if(!t.getGui){_(97,{colId:this.column.getId()}),r.destroyBean(t);return}this.cellEditor=t,this.cellEditorGui=t.getGui();const l=i||t.isPopup!==void 0&&t.isPopup();l?this.addPopupCellEditor(o,s):this.addInCellEditor(),this.refreshEditStyles(!0,l),t.afterGuiAttached?.(),this.cellCtrl.cellEditorAttached()}refreshEditStyles(e,t){const{cellCssClassManager:o}=this;o.addOrRemoveCssClass("ag-cell-inline-editing",e&&!t),o.addOrRemoveCssClass("ag-cell-popup-editing",e&&!!t),o.addOrRemoveCssClass("ag-cell-not-inline-editing",!e||!!t),this.cellCtrl.setInlineEditingCss()}addInCellEditor(){const{eCell:e}=this;e.contains(Ee(this.beans))&&e.focus(),this.destroyRenderer(),this.refreshWrapper(!0),ct(this.getParentOfValue()),this.cellEditorGui&&this.getParentOfValue().appendChild(this.cellEditorGui)}addPopupCellEditor(e,t){const{gos:o,context:i,editSvc:s,popupSvc:n,localeSvc:r}=this.beans;o.get("editType")==="fullRow"&&_(98);const a=this.cellEditor;this.cellEditorPopupWrapper=i.createBean(s.createPopupEditorWrapper(e));const l=this.cellEditorPopupWrapper.getGui();this.cellEditorGui&&l.appendChild(this.cellEditorGui);const d=o.get("stopEditingWhenCellsLoseFocus"),c=t??a.getPopupPosition?.()??"over",u=o.get("enableRtl"),p={ePopup:l,column:this.column,rowNode:this.rowNode,type:"popupCellEditor",eventSource:this.eCell,position:c,alignSide:u?"right":"left",keepWithinBounds:!0},g=n.positionPopupByComponent.bind(n,p),f=na(r),m=n.addPopup({modal:d,eChild:l,closeOnEsc:!0,closedCallback:()=>{this.cellCtrl.onPopupEditorClosed()},anchorToElement:this.eCell,positionCallback:g,ariaLabel:f("ariaLabelCellEditor","Cell Editor")});m&&(this.hideEditorPopup=m.hideFunc)}detach(){this.eRow.removeChild(this.getGui())}destroy(){this.cellCtrl.stopEditing(),this.destroyRenderer(),this.destroyEditor(),this.removeControls(),super.destroy()}},jC=class extends pe{constructor(e,t,o){super(),this.cellComps=new Map,this.beans=t,this.rowCtrl=e;const i=Pe({tag:"div",role:"row",attrs:{"comp-id":`${this.getCompId()}`}});this.setInitialStyle(i,o),this.setTemplateFromElement(i);const s=i.style;this.domOrder=this.rowCtrl.getDomOrder();const n={setDomOrder:r=>this.domOrder=r,setCellCtrls:r=>this.setCellCtrls(r),showFullWidth:r=>this.showFullWidth(r),getFullWidthCellRenderer:()=>this.fullWidthCellRenderer,addOrRemoveCssClass:(r,a)=>this.addOrRemoveCssClass(r,a),setUserStyles:r=>ds(i,r),setTop:r=>s.top=r,setTransform:r=>s.transform=r,setRowIndex:r=>i.setAttribute("row-index",r),setRowId:r=>i.setAttribute("row-id",r),setRowBusinessKey:r=>i.setAttribute("row-business-key",r),refreshFullWidth:r=>this.fullWidthCellRenderer?.refresh?.(r())??!1};e.setComp(n,this.getGui(),o,void 0),this.addDestroyFunc(()=>{e.unsetComp(o)})}setInitialStyle(e,t){const o=this.rowCtrl.getInitialTransform(t);if(o)e.style.setProperty("transform",o);else{const i=this.rowCtrl.getInitialRowTop(t);i&&e.style.setProperty("top",i)}}showFullWidth(e){const t=i=>{if(this.isAlive()){const s=i.getGui();this.getGui().appendChild(s),this.rowCtrl.setupDetailRowAutoHeight(s),this.setFullWidthRowComp(i)}else this.beans.context.destroyBean(i)};e.newAgStackInstance().then(t)}setCellCtrls(e){const t=new Map(this.cellComps);for(const o of e){const i=o.instanceId;this.cellComps.has(i)?t.delete(i):this.newCellComp(o)}this.destroyCells(t),this.ensureDomOrder(e)}ensureDomOrder(e){if(!this.domOrder)return;const t=[];for(const o of e){const i=this.cellComps.get(o.instanceId);i&&t.push(i.getGui())}tc(this.getGui(),t)}newCellComp(e){const t=new $C(this.beans,e,this.rowCtrl.printLayout,this.getGui(),this.rowCtrl.editing);this.cellComps.set(e.instanceId,t),this.getGui().appendChild(t.getGui())}destroy(){super.destroy(),this.destroyCells(this.cellComps)}setFullWidthRowComp(e){this.fullWidthCellRenderer=e,this.addDestroyFunc(()=>{this.fullWidthCellRenderer=this.beans.context.destroyBean(this.fullWidthCellRenderer)})}destroyCells(e){for(const t of e.values()){if(!t)return;const o=t.cellCtrl.instanceId;if(this.cellComps.get(o)!==t)return;t.detach(),t.destroy(),this.cellComps.delete(o)}}};function KC(e,t,o){const i=!!o.gos.get("enableCellSpan")&&!!t.getSpannedRowCtrls,s={tag:"div",ref:"eContainer",cls:Hs(e),role:"rowgroup"};if(t.type==="center"||i){const n={tag:"div",ref:"eSpannedContainer",cls:`ag-spanning-container ${wm(e)}`,role:"rowgroup"};return{tag:"div",ref:"eViewport",cls:`ag-viewport ${cu(e)}`,role:"presentation",children:[s,i?n:null]}}return s}var YC=class extends pe{constructor(e){super(),this.eViewport=O,this.eContainer=O,this.eSpannedContainer=O,this.rowCompsNoSpan={},this.rowCompsWithSpan={},this.name=e?.name,this.options=us(this.name)}postConstruct(){this.setTemplate(KC(this.name,this.options,this.beans));const e={setHorizontalScroll:o=>this.eViewport.scrollLeft=o,setViewportHeight:o=>this.eViewport.style.height=o,setRowCtrls:({rowCtrls:o})=>this.setRowCtrls(o),setSpannedRowCtrls:o=>this.setRowCtrls(o,!0),setDomOrder:o=>{this.domOrder=o},setContainerWidth:o=>{this.eContainer.style.width=o,this.eSpannedContainer&&(this.eSpannedContainer.style.width=o)},setOffsetTop:o=>{const i=`translateY(${o})`;this.eContainer.style.transform=i,this.eSpannedContainer&&(this.eSpannedContainer.style.transform=i)}};this.createManagedBean(new Em(this.name)).setComp(e,this.eContainer,this.eSpannedContainer,this.eViewport)}destroy(){this.setRowCtrls([]),this.setRowCtrls([],!0),super.destroy(),this.lastPlacedElement=null}setRowCtrls(e,t){const{beans:o,options:i}=this,s=t?this.eSpannedContainer:this.eContainer,n=t?{...this.rowCompsWithSpan}:{...this.rowCompsNoSpan},r={};t?this.rowCompsWithSpan=r:this.rowCompsNoSpan=r,this.lastPlacedElement=null;const a=[];for(const l of e){const d=l.instanceId,c=n[d];let u;if(c)u=c,delete n[d];else{if(!l.rowNode.displayed)continue;u=new jC(l,o,i.type)}r[d]=u,a.push([u,!c])}this.removeOldRows(Object.values(n),s),this.addRowNodes(a,s)}addRowNodes(e,t){const{domOrder:o}=this;for(const[i,s]of e){const n=i.getGui();o?this.ensureDomOrder(n,t):s&&t.appendChild(n)}}removeOldRows(e,t){for(const o of e)t.removeChild(o.getGui()),o.destroy()}ensureDomOrder(e,t){ec(t,e,this.lastPlacedElement),this.lastPlacedElement=e}},qC={selector:"AG-ROW-CONTAINER",component:YC};function Fi(e,t){return t.map(o=>{const i=`e${o[0].toUpperCase()+o.substring(1)}RowContainer`;return e[i]={name:o},{tag:"ag-row-container",ref:i,attrs:{name:o}}})}function QC(e){const t={},o={tag:"div",ref:"eGridRoot",cls:"ag-root ag-unselectable",children:[{tag:"ag-header-root"},{tag:"div",ref:"eTop",cls:"ag-floating-top",role:"presentation",children:Fi(t,["topLeft","topCenter","topRight","topFullWidth"])},{tag:"div",ref:"eBody",cls:"ag-body",role:"presentation",children:[{tag:"div",ref:"eBodyViewport",cls:"ag-body-viewport",role:"presentation",children:Fi(t,["left","center","right","fullWidth"])},{tag:"ag-fake-vertical-scroll"}]},{tag:"div",ref:"eStickyTop",cls:"ag-sticky-top",role:"presentation",children:Fi(t,["stickyTopLeft","stickyTopCenter","stickyTopRight","stickyTopFullWidth"])},{tag:"div",ref:"eStickyBottom",cls:"ag-sticky-bottom",role:"presentation",children:Fi(t,["stickyBottomLeft","stickyBottomCenter","stickyBottomRight","stickyBottomFullWidth"])},{tag:"div",ref:"eBottom",cls:"ag-floating-bottom",role:"presentation",children:Fi(t,["bottomLeft","bottomCenter","bottomRight","bottomFullWidth"])},{tag:"ag-fake-horizontal-scroll"},e?{tag:"ag-overlay-wrapper"}:null]};return{paramsMap:t,elementParams:o}}var XC=class extends pe{constructor(){super(...arguments),this.eGridRoot=O,this.eBodyViewport=O,this.eStickyTop=O,this.eStickyBottom=O,this.eTop=O,this.eBottom=O,this.eBody=O}postConstruct(){const{overlays:e,rangeSvc:t}=this.beans,o=e?.getOverlayWrapperSelector(),{paramsMap:i,elementParams:s}=QC(!!o);this.setTemplate(s,[...o?[o]:[],Gm,Nm,UC,qC],i);const n=(a,l)=>{const d=`${a}px`;l.style.minHeight=d,l.style.height=d},r={setRowAnimationCssOnBodyViewport:(a,l)=>this.setRowAnimationCssOnBodyViewport(a,l),setColumnCount:a=>Cp(this.getGui(),a),setRowCount:a=>mp(this.getGui(),a),setTopHeight:a=>n(a,this.eTop),setBottomHeight:a=>n(a,this.eBottom),setTopInvisible:a=>this.eTop.classList.toggle("ag-invisible",a),setBottomInvisible:a=>this.eBottom.classList.toggle("ag-invisible",a),setStickyTopHeight:a=>this.eStickyTop.style.height=a,setStickyTopTop:a=>this.eStickyTop.style.top=a,setStickyTopWidth:a=>this.eStickyTop.style.width=a,setStickyBottomHeight:a=>{this.eStickyBottom.style.height=a,this.eStickyBottom.classList.toggle("ag-invisible",a==="0px")},setStickyBottomBottom:a=>this.eStickyBottom.style.bottom=a,setStickyBottomWidth:a=>this.eStickyBottom.style.width=a,setColumnMovingCss:(a,l)=>this.addOrRemoveCssClass(a,l),updateLayoutClasses:(a,l)=>{const d=[this.eBodyViewport.classList,this.eBody.classList];for(const c of d)c.toggle(Dt.AUTO_HEIGHT,l.autoHeight),c.toggle(Dt.NORMAL,l.normal),c.toggle(Dt.PRINT,l.print);this.addOrRemoveCssClass(Dt.AUTO_HEIGHT,l.autoHeight),this.addOrRemoveCssClass(Dt.NORMAL,l.normal),this.addOrRemoveCssClass(Dt.PRINT,l.print)},setAlwaysVerticalScrollClass:(a,l)=>this.eBodyViewport.classList.toggle(pu,l),registerBodyViewportResizeListener:a=>{const l=bo(this.beans,this.eBodyViewport,a);this.addDestroyFunc(()=>l())},setPinnedTopBottomOverflowY:a=>this.eTop.style.overflowY=this.eBottom.style.overflowY=a,setCellSelectableCss:(a,l)=>{[this.eTop,this.eBodyViewport,this.eBottom].forEach(d=>d.classList.toggle(a,l))},setBodyViewportWidth:a=>this.eBodyViewport.style.width=a,setGridRootRole:a=>qe(this.eGridRoot,a)};this.ctrl=this.createManagedBean(new Im),this.ctrl.setComp(r,this.getGui(),this.eBodyViewport,this.eTop,this.eBottom,this.eStickyTop,this.eStickyBottom),(t&&zo(this.gos)||Wo(this.gos))&&fp(this.getGui(),!0)}setRowAnimationCssOnBodyViewport(e,t){const o=this.eBodyViewport.classList;o.toggle("ag-row-animation",t),o.toggle("ag-row-no-animation",!t)}},ZC={selector:"AG-GRID-BODY",component:XC},JC=class extends M{constructor(){super(...arguments),this.additionalFocusableContainers=new Set}setComp(e,t,o){this.view=e,this.eGridHostDiv=t,this.eGui=o,this.eGui.setAttribute("grid-id",this.beans.context.getGridId());const{dragAndDrop:i,ctrlsSvc:s}=this.beans;i?.registerGridDropTarget(()=>this.eGui,this),Jc(this.gos,t),this.createManagedBean(new Pa(this.view)),this.view.setRtlClass(this.gos.get("enableRtl")?"ag-rtl":"ag-ltr");const n=bo(this.beans,this.eGridHostDiv,this.onGridSizeChanged.bind(this));this.addDestroyFunc(()=>n()),s.register("gridCtrl",this)}isDetailGrid(){return Fa(this.getGui())?.getAttribute("row-id")?.startsWith("detail")||!1}getOptionalSelectors(){const e=this.beans;return{paginationSelector:e.pagination?.getPaginationSelector(),gridHeaderDropZonesSelector:e.registry.getSelector("AG-GRID-HEADER-DROP-ZONES"),sideBarSelector:e.sideBar?.getSelector(),statusBarSelector:e.registry?.getSelector("AG-STATUS-BAR"),watermarkSelector:e.licenseManager?.getWatermarkSelector()}}onGridSizeChanged(){this.eventSvc.dispatchEvent({type:"gridSizeChanged",clientWidth:this.eGridHostDiv.clientWidth,clientHeight:this.eGridHostDiv.clientHeight})}destroyGridUi(){this.view.destroyGridUi()}getGui(){return this.eGui}setResizeCursor(e){this.view.setCursor(e?"ew-resize":null)}disableUserSelect(e){this.view.setUserSelect(e?"none":null)}focusNextInnerContainer(e){const t=this.getFocusableContainers(),{indexWithFocus:o,nextIndex:i}=this.getNextFocusableIndex(t,e);if(i<0||i>=t.length)return!1;if(i===0){if(o>0){const{visibleCols:s,focusSvc:n}=this.beans,r=s.allCols,a=ve(r);if(n.focusGridView({column:a,backwards:!0}))return!0}return!1}return this.focusContainer(t[i],e)}focusInnerElement(e){const t=this.gos.getCallback("focusGridInnerElement");if(t&&t({fromBottom:!!e}))return!0;const o=this.getFocusableContainers(),{focusSvc:i,visibleCols:s}=this.beans,n=s.allCols;if(e){if(o.length>1)return this.focusContainer(ve(o),e);const r=ve(n);if(i.focusGridView({column:r,backwards:e}))return!0}if(this.gos.get("headerHeight")===0||Vo(this.beans)){if(i.focusGridView({column:n[0],backwards:e}))return!0;for(let r=1;r<o.length;r++)if(It(o[r].getGui(),e))return!0;return!1}return i.focusFirstHeader()}forceFocusOutOfContainer(e=!1){this.view.forceFocusOutOfContainer(e)}addFocusableContainer(e){this.additionalFocusableContainers.add(e)}removeFocusableContainer(e){this.additionalFocusableContainers.delete(e)}allowFocusForNextCoreContainer(e){const t=this.view.getFocusableContainers(),{nextIndex:o,indexWithFocus:i}=this.getNextFocusableIndex(t,e);if(i===-1||o<0||o>=t.length)return;const s=t[o];s.setAllowFocus?.(!0),setTimeout(()=>{s.setAllowFocus?.(!1)})}isFocusable(){const e=this.beans;return!xa(e)||!Vo(e)||!!e.sideBar?.comp?.isDisplayed()}getNextFocusableIndex(e,t){const o=Ee(this.beans),i=e.findIndex(n=>n.getGui().contains(o)),s=i+(t?-1:1);return{indexWithFocus:i,nextIndex:s}}focusContainer(e,t){e.setAllowFocus?.(!0);const o=It(e.getGui(),t,!1,!0);return e.setAllowFocus?.(!1),o}getFocusableContainers(){return[...this.view.getFocusableContainers(),...this.additionalFocusableContainers]}destroy(){this.additionalFocusableContainers.clear(),super.destroy()}},ev=class extends bi{constructor(e){super(),this.gridBody=O,this.sideBar=O,this.pagination=O,this.rootWrapperBody=O,this.eGridDiv=e}postConstruct(){const e={destroyGridUi:()=>this.destroyBean(this),setRtlClass:n=>this.addCssClass(n),forceFocusOutOfContainer:this.forceFocusOutOfContainer.bind(this),updateLayoutClasses:this.updateLayoutClasses.bind(this),getFocusableContainers:this.getFocusableContainers.bind(this),setUserSelect:n=>{this.getGui().style.userSelect=n??"",this.getGui().style.webkitUserSelect=n??""},setCursor:n=>{this.getGui().style.cursor=n??""}},t=this.createManagedBean(new JC),o=t.getOptionalSelectors(),i=this.createTemplate(o),s=[ZC,...Object.values(o).filter(n=>!!n)];this.setTemplate(i,s),t.setComp(e,this.eGridDiv,this.getGui()),this.insertGridIntoDom(),this.initialiseTabGuard({onTabKeyDown:()=>{},focusInnerElement:n=>t.focusInnerElement(n),forceFocusOutWhenTabGuardsAreEmpty:!0,isEmpty:()=>!t.isFocusable()})}insertGridIntoDom(){const e=this.getGui();this.eGridDiv.appendChild(e),this.addDestroyFunc(()=>{this.eGridDiv.removeChild(e),Zi(this.gos,"Grid removed from DOM")})}updateLayoutClasses(e,t){const o=this.rootWrapperBody.classList,{AUTO_HEIGHT:i,NORMAL:s,PRINT:n}=Dt,{autoHeight:r,normal:a,print:l}=t;o.toggle(i,r),o.toggle(s,a),o.toggle(n,l),this.addOrRemoveCssClass(i,r),this.addOrRemoveCssClass(s,a),this.addOrRemoveCssClass(n,l)}createTemplate(e){const t=e.gridHeaderDropZonesSelector?{tag:"ag-grid-header-drop-zones"}:null,o=e.sideBarSelector?{tag:"ag-side-bar",ref:"sideBar"}:null,i=e.statusBarSelector?{tag:"ag-status-bar"}:null,s=e.watermarkSelector?{tag:"ag-watermark"}:null,n=e.paginationSelector?{tag:"ag-pagination",ref:"pagination"}:null;return{tag:"div",cls:"ag-root-wrapper",role:"presentation",children:[t,{tag:"div",ref:"rootWrapperBody",cls:"ag-root-wrapper-body",role:"presentation",children:[{tag:"ag-grid-body",ref:"gridBody"},o]},i,n,s]}}getFocusableElement(){return this.rootWrapperBody}forceFocusOutOfContainer(e=!1){if(!e&&this.pagination?.isDisplayed()){this.pagination.forceFocusOutOfContainer(e);return}super.forceFocusOutOfContainer(e)}getFocusableContainers(){const e=[this.gridBody];return[this.sideBar,this.pagination].forEach(t=>{t&&e.push(t)}),e.filter(t=>ht(t.getGui()))}},J=(e,t)=>{for(const o of Object.keys(t))t[o]=e;return t},El={dispatchEvent:"CommunityCore",...J("CommunityCore",{destroy:0,getGridId:0,getGridOption:0,isDestroyed:0,setGridOption:0,updateGridOptions:0}),...J("GridState",{getState:0}),...J("SharedRowSelection",{setNodesSelected:0,selectAll:0,deselectAll:0,selectAllFiltered:0,deselectAllFiltered:0,selectAllOnCurrentPage:0,deselectAllOnCurrentPage:0,getSelectedNodes:0,getSelectedRows:0}),...J("RowApi",{redrawRows:0,setRowNodeExpanded:0,getRowNode:0,addRenderedRowListener:0,getRenderedNodes:0,forEachNode:0,getFirstDisplayedRowIndex:0,getLastDisplayedRowIndex:0,getDisplayedRowAtIndex:0,getDisplayedRowCount:0}),...J("ScrollApi",{getVerticalPixelRange:0,getHorizontalPixelRange:0,ensureColumnVisible:0,ensureIndexVisible:0,ensureNodeVisible:0}),...J("KeyboardNavigation",{getFocusedCell:0,clearFocusedCell:0,setFocusedCell:0,tabToNextCell:0,tabToPreviousCell:0,setFocusedHeader:0}),...J("EventApi",{addEventListener:0,addGlobalListener:0,removeEventListener:0,removeGlobalListener:0}),...J("ValueCache",{expireValueCache:0}),...J("CellApi",{getCellValue:0}),...J("SharedMenu",{showColumnMenu:0,hidePopupMenu:0}),...J("Sort",{onSortChanged:0}),...J("PinnedRow",{getPinnedTopRowCount:0,getPinnedBottomRowCount:0,getPinnedTopRow:0,getPinnedBottomRow:0}),...J("Overlay",{showLoadingOverlay:0,showNoRowsOverlay:0,hideOverlay:0}),...J("RenderApi",{setGridAriaProperty:0,refreshCells:0,refreshHeader:0,isAnimationFrameQueueEmpty:0,flushAllAnimationFrames:0,getSizesForCurrentTheme:0,getCellRendererInstances:0}),...J("HighlightChanges",{flashCells:0}),...J("RowDrag",{addRowDropZone:0,removeRowDropZone:0,getRowDropZoneParams:0}),...J("ColumnApi",{getColumnDefs:0,getColumnDef:0,getDisplayNameForColumn:0,getColumn:0,getColumns:0,applyColumnState:0,getColumnState:0,resetColumnState:0,isPinning:0,isPinningLeft:0,isPinningRight:0,getDisplayedColAfter:0,getDisplayedColBefore:0,setColumnsVisible:0,setColumnsPinned:0,getAllGridColumns:0,getDisplayedLeftColumns:0,getDisplayedCenterColumns:0,getDisplayedRightColumns:0,getAllDisplayedColumns:0,getAllDisplayedVirtualColumns:0}),...J("ColumnAutoSize",{sizeColumnsToFit:0,autoSizeColumns:0,autoSizeAllColumns:0}),...J("ColumnGroup",{setColumnGroupOpened:0,getColumnGroup:0,getProvidedColumnGroup:0,getDisplayNameForColumnGroup:0,getColumnGroupState:0,setColumnGroupState:0,resetColumnGroupState:0,getLeftDisplayedColumnGroups:0,getCenterDisplayedColumnGroups:0,getRightDisplayedColumnGroups:0,getAllDisplayedColumnGroups:0}),...J("ColumnMove",{moveColumnByIndex:0,moveColumns:0}),...J("ColumnResize",{setColumnWidths:0}),...J("ColumnHover",{isColumnHovered:0}),...J("EditCore",{getCellEditorInstances:0,getEditingCells:0,stopEditing:0,startEditingCell:0}),...J("UndoRedoEdit",{undoCellEditing:0,redoCellEditing:0,getCurrentUndoSize:0,getCurrentRedoSize:0}),...J("FilterCore",{isAnyFilterPresent:0,onFilterChanged:0}),...J("ColumnFilter",{isColumnFilterPresent:0,getColumnFilterInstance:0,destroyFilter:0,setFilterModel:0,getFilterModel:0,getColumnFilterModel:0,setColumnFilterModel:0,showColumnFilter:0}),...J("QuickFilter",{isQuickFilterPresent:0,getQuickFilter:0,resetQuickFilter:0}),...J("Find",{findGetActiveMatch:0,findGetTotalMatches:0,findGoTo:0,findNext:0,findPrevious:0,findGetNumMatches:0,findGetParts:0,findClearActive:0,findRefresh:0}),...J("Pagination",{paginationIsLastPageFound:0,paginationGetPageSize:0,paginationGetCurrentPage:0,paginationGetTotalPages:0,paginationGetRowCount:0,paginationGoToNextPage:0,paginationGoToPreviousPage:0,paginationGoToFirstPage:0,paginationGoToLastPage:0,paginationGoToPage:0}),...J("CsrmSsrmSharedApi",{expandAll:0,collapseAll:0,onRowHeightChanged:0}),...J("SsrmInfiniteSharedApi",{setRowCount:0,getCacheBlockState:0,isLastRowIndexKnown:0}),...J("ClientSideRowModelApi",{onGroupExpandedOrCollapsed:0,refreshClientSideRowModel:0,isRowDataEmpty:0,forEachLeafNode:0,forEachNodeAfterFilter:0,forEachNodeAfterFilterAndSort:0,resetRowHeights:0,applyTransaction:0,applyTransactionAsync:0,flushAsyncTransactions:0,getBestCostNodeSelection:0}),...J("CsvExport",{getDataAsCsv:0,exportDataAsCsv:0}),...J("InfiniteRowModel",{refreshInfiniteCache:0,purgeInfiniteCache:0,getInfiniteRowCount:0}),...J("AdvancedFilter",{getAdvancedFilterModel:0,setAdvancedFilterModel:0,showAdvancedFilterBuilder:0,hideAdvancedFilterBuilder:0}),...J("IntegratedCharts",{getChartModels:0,getChartRef:0,getChartImageDataURL:0,downloadChart:0,openChartToolPanel:0,closeChartToolPanel:0,createRangeChart:0,createPivotChart:0,createCrossFilterChart:0,updateChart:0,restoreChart:0}),...J("Clipboard",{copyToClipboard:0,cutToClipboard:0,copySelectedRowsToClipboard:0,copySelectedRangeToClipboard:0,copySelectedRangeDown:0,pasteFromClipboard:0}),...J("ExcelExport",{getDataAsExcel:0,exportDataAsExcel:0,getSheetDataForExcel:0,getMultipleSheetsAsExcel:0,exportMultipleSheetsAsExcel:0}),...J("SharedMasterDetail",{addDetailGridInfo:0,removeDetailGridInfo:0,getDetailGridInfo:0,forEachDetailGridInfo:0}),...J("ContextMenu",{showContextMenu:0}),...J("ColumnMenu",{showColumnChooser:0,hideColumnChooser:0}),...J("CellSelection",{getCellRanges:0,addCellRange:0,clearRangeSelection:0,clearCellSelection:0}),...J("SharedRowGrouping",{setRowGroupColumns:0,removeRowGroupColumns:0,addRowGroupColumns:0,getRowGroupColumns:0,moveRowGroupColumn:0}),...J("SharedAggregation",{addAggFuncs:0,clearAggFuncs:0,setColumnAggFunc:0}),...J("SharedPivot",{isPivotMode:0,getPivotResultColumn:0,setValueColumns:0,getValueColumns:0,removeValueColumns:0,addValueColumns:0,setPivotColumns:0,removePivotColumns:0,addPivotColumns:0,getPivotColumns:0,setPivotResultColumns:0,getPivotResultColumns:0}),...J("ServerSideRowModelApi",{getServerSideSelectionState:0,setServerSideSelectionState:0,applyServerSideTransaction:0,applyServerSideTransactionAsync:0,applyServerSideRowData:0,retryServerSideLoads:0,flushServerSideAsyncTransactions:0,refreshServerSide:0,getServerSideGroupLevelState:0}),...J("SideBar",{isSideBarVisible:0,setSideBarVisible:0,setSideBarPosition:0,openToolPanel:0,closeToolPanel:0,getOpenedToolPanel:0,refreshToolPanel:0,isToolPanelShowing:0,getToolPanelInstance:0,getSideBar:0}),...J("StatusBar",{getStatusPanel:0})},sr={isDestroyed:()=>!0,destroy(){},preConstruct(){},postConstruct(){},preWireBeans(){},wireBeans(){}},tv=(e,t)=>e.eventSvc.dispatchEvent(t),Fu=class{};Reflect.defineProperty(Fu,"name",{value:"GridApi"});var ov=class extends M{constructor(){super(),this.beanName="apiFunctionSvc",this.api=new Fu,this.fns={...sr,dispatchEvent:tv},this.preDestroyLink="";const{api:e}=this;for(const t of Object.keys(El))e[t]=this.makeApi(t)[t]}postConstruct(){this.preDestroyLink=this.beans.frameworkOverrides.getDocLink("grid-lifecycle/#grid-pre-destroyed")}addFunction(e,t){const{fns:o,beans:i}=this;o!==sr&&(o[e]=i?.validation?.validateApiFunction(e,t)??t)}makeApi(e){return{[e]:(...t)=>{const{beans:o,fns:{[e]:i}}=this;return i?i(o,...t):this.apiNotFound(e)}}}apiNotFound(e){const{beans:t,gos:o,preDestroyLink:i}=this;if(!t)_(26,{fnName:e,preDestroyLink:i});else{const s=El[e];o.assertModuleRegistered(s,`api.${e}`)&&_(27,{fnName:e,module:s})}}destroy(){super.destroy(),this.fns=sr,this.beans=null}};function iv(e){return e.context.getGridId()}function sv(e){e.gridDestroySvc.destroy()}function nv(e){return e.gridDestroySvc.destroyCalled}function rv(e,t){return e.gos.get(t)}function av(e,t,o){xu(e,{[t]:o})}function xu(e,t){e.gos.updateGridOptions({options:t})}var lv=class extends M{constructor(){super(...arguments),this.beanName="horizontalResizeSvc"}addResizeBar(e){const t={dragStartPixels:e.dragStartPixels||0,eElement:e.eResizeBar,onDragStart:this.onDragStart.bind(this,e),onDragStop:this.onDragStop.bind(this,e),onDragging:this.onDragging.bind(this,e),onDragCancel:this.onDragStop.bind(this,e),includeTouch:!0,stopPropagationForTouch:!0},{dragSvc:o}=this.beans;return o.addDragSource(t),()=>o.removeDragSource(t)}onDragStart(e,t){this.dragStartX=t.clientX,this.setResizeIcons();const o=t instanceof MouseEvent&&t.shiftKey===!0;e.onResizeStart(o)}setResizeIcons(){const e=this.beans.ctrlsSvc.get("gridCtrl");e.setResizeCursor(!0),e.disableUserSelect(!0)}onDragStop(e){e.onResizeEnd(this.resizeAmount),this.resetIcons()}resetIcons(){const e=this.beans.ctrlsSvc.get("gridCtrl");e.setResizeCursor(!1),e.disableUserSelect(!1)}onDragging(e,t){this.resizeAmount=t.clientX-this.dragStartX,e.onResizing(this.resizeAmount)}},Du={moduleName:"Drag",version:ne,beans:[Yf]},Mu={moduleName:"SharedDragAndDrop",version:ne,beans:[_f],dependsOn:[Du],userComponents:{agDragAndDropImage:lC},icons:{columnMovePin:"pin",columnMoveHide:"eye-slash",columnMoveMove:"arrows",columnMoveLeft:"left",columnMoveRight:"right",columnMoveGroup:"group",columnMoveValue:"aggregation",columnMovePivot:"pivot",dropNotAllowed:"not-allowed",rowDrag:"grip"}},dv={moduleName:"HorizontalResize",version:ne,beans:[lv],dependsOn:[Du]},cv=":where(.ag-ltr) :where(.ag-column-moving){.ag-cell,.ag-header-cell,.ag-spanned-cell-wrapper{transition:left .2s}.ag-header-group-cell{transition:left .2s,width .2s}}:where(.ag-rtl) :where(.ag-column-moving){.ag-cell,.ag-header-cell,.ag-spanned-cell-wrapper{transition:right .2s}.ag-header-group-cell{transition:right .2s,width .2s}}",uv=class extends M{constructor(){super(...arguments),this.beanName="colAnimation",this.executeNextFuncs=[],this.executeLaterFuncs=[],this.active=!1,this.activeNext=!1,this.suppressAnimation=!1,this.animationThreadCount=0}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>this.gridBodyCtrl=e.gridBodyCtrl)}isActive(){return this.active&&!this.suppressAnimation}setSuppressAnimation(e){this.suppressAnimation=e}start(){if(this.active)return;const{gos:e}=this;e.get("suppressColumnMoveAnimation")||e.get("enableRtl")||(this.ensureAnimationCssClassPresent(),this.active=!0,this.activeNext=!0)}finish(){this.active&&this.flush(()=>this.activeNext=!1,()=>this.active=!1)}executeNextVMTurn(e){this.activeNext?this.executeNextFuncs.push(e):e()}executeLaterVMTurn(e){this.active?this.executeLaterFuncs.push(e):e()}ensureAnimationCssClassPresent(){this.animationThreadCount++;const e=this.animationThreadCount,{gridBodyCtrl:t}=this;t.setColumnMovingCss(!0),this.executeLaterFuncs.push(()=>{this.animationThreadCount===e&&t.setColumnMovingCss(!1)})}flush(e,t){const{executeNextFuncs:o,executeLaterFuncs:i}=this;if(o.length===0&&i.length===0){e(),t();return}const s=n=>{for(;n.length;){const r=n.pop();r&&r()}};this.beans.frameworkOverrides.wrapIncoming(()=>{window.setTimeout(()=>{e(),s(o)},0),window.setTimeout(()=>{t(),s(i)},200)})}};function hv(e,t,o){e.colMoves?.moveColumnByIndex(t,o,"api")}function pv(e,t,o){e.colMoves?.moveColumns(t,o,"api")}var gv=class extends M{constructor(e){super(),this.pinned=e,this.columnsToAggregate=[],this.columnsToGroup=[],this.columnsToPivot=[]}onDragEnter(e){if(this.clearColumnsList(),this.gos.get("functionsReadOnly"))return;const t=e.dragItem.columns;t&&t.forEach(o=>{o.isPrimary()&&(o.isAnyFunctionActive()||(o.isAllowValue()?this.columnsToAggregate.push(o):o.isAllowRowGroup()?this.columnsToGroup.push(o):o.isAllowPivot()&&this.columnsToPivot.push(o)))})}getIconName(){return this.columnsToAggregate.length+this.columnsToGroup.length+this.columnsToPivot.length>0?this.pinned?"pinned":"move":null}onDragLeave(e){this.clearColumnsList()}clearColumnsList(){this.columnsToAggregate.length=0,this.columnsToGroup.length=0,this.columnsToPivot.length=0}onDragging(e){}onDragStop(e){const{valueColsSvc:t,rowGroupColsSvc:o,pivotColsSvc:i}=this.beans;this.columnsToAggregate.length>0&&t?.addColumns(this.columnsToAggregate,"toolPanelDragAndDrop"),this.columnsToGroup.length>0&&o?.addColumns(this.columnsToGroup,"toolPanelDragAndDrop"),this.columnsToPivot.length>0&&i?.addColumns(this.columnsToPivot,"toolPanelDragAndDrop")}onDragCancel(){this.clearColumnsList()}};function fv(e,t){!t||t.length<=1||t.filter(i=>e.indexOf(i)<0).length>0||t.sort((i,s)=>{const n=e.indexOf(i),r=e.indexOf(s);return n-r})}function Pu(e){const{isFromHeader:t,fromLeft:o,xPosition:i,fromEnter:s,fakeEvent:n,pinned:r,gos:a,colModel:l,colMoves:d,visibleCols:c}=e;let{allMovingColumns:u}=e;if(t){const T=[];u.forEach(A=>{let P=null,y=A.getParent();for(;y!=null&&y.getDisplayedLeafColumns().length===1;)P=y,y=y.getParent();P!=null?(!!P.getColGroupDef()?.marryChildren?P.getProvidedColumnGroup().getLeafColumns():P.getLeafColumns()).forEach(F=>{T.includes(F)||T.push(F)}):T.includes(A)||T.push(A)}),u=T}const p=u.slice();fv(l.getCols(),p);const g=wv({movingCols:p,draggingRight:o,xPosition:i,pinned:r,gos:a,colModel:l,visibleCols:c}),f=mv(p,l);if(g.length===0)return;const m=g[0];let C=f!==null&&!s;if(t&&(C=f!==null),C&&!n&&(!o&&m>=f||o&&m<=f))return;const v=c.allCols,S=[];let b=null;for(let T=0;T<g.length;T++){const A=g[T],P=d.getProposedColumnOrder(p,A);if(!d.doesOrderPassRules(P))continue;const y=P.filter(R=>v.includes(R));if(b===null)b=y;else if(!At(y,b))break;const w=Cv(P);S.push({move:A,fragCount:w})}if(S.length===0)return;S.sort((T,A)=>T.fragCount-A.fragCount);const x=S[0].move;if(!(x>l.getCols().length-u.length))return{columns:u,toIndex:x}}function Eu(e){const{columns:t,toIndex:o}=Pu(e)||{},{finished:i,colMoves:s}=e;return!t||o==null?null:(s.moveColumns(t,o,"uiColumnMoved",i),i?null:{columns:t,toIndex:o})}function mv(e,t){const o=t.getCols(),i=e.map(l=>o.indexOf(l)).sort((l,d)=>l-d),s=i[0];return ve(i)-s!==i.length-1?null:s}function Cv(e){function t(i){const s=[];let n=i.getOriginalParent();for(;n!=null;)s.push(n),n=n.getOriginalParent();return s}let o=0;for(let i=0;i<e.length-1;i++){let s=t(e[i]),n=t(e[i+1]);[s,n]=s.length>n.length?[s,n]:[n,s],s.forEach(r=>{n.indexOf(r)===-1&&o++})}return o}function vv(e,t){switch(t){case"left":return e.leftCols;case"right":return e.rightCols;default:return e.centerCols}}function wv(e){const{movingCols:t,draggingRight:o,xPosition:i,pinned:s,gos:n,colModel:r,visibleCols:a}=e;if(n.get("suppressMovableColumns")||t.some(b=>b.getColDef().suppressMovable))return[];const d=vv(a,s),c=r.getCols(),u=d.filter(b=>t.includes(b)),p=d.filter(b=>!t.includes(b)),g=c.filter(b=>!t.includes(b));let f=0,m=i;if(o){let b=0;u.forEach(x=>b+=x.getActualWidth()),m-=b}if(m>0){for(let b=0;b<p.length;b++){const x=p[b];if(m-=x.getActualWidth(),m<0)break;f++}o&&f++}let C;if(f>0){const b=p[f-1];C=g.indexOf(b)+1}else C=g.indexOf(p[0]),C===-1&&(C=0);const v=[C],S=(b,x)=>b-x;if(o){let b=C+1;const x=c.length-1;for(;b<=x;)v.push(b),b++;v.sort(S)}else{let b=C;const x=c.length-1;let T=c[b];for(;b<=x&&d.indexOf(T)<0;)b++,v.push(b),T=c[b];b=C-1;const A=0;for(;b>=A;)v.push(b),b--;v.sort(S).reverse()}return v}function Ur(e){const{pinned:t,fromKeyboard:o,gos:i,ctrlsSvc:s,useHeaderRow:n,skipScrollPadding:r}=e;let a=s.getHeaderRowContainerCtrl(t)?.eViewport,{x:l}=e;return a?(o&&(l-=a.getBoundingClientRect().left),i.get("enableRtl")&&(n&&(a=a.querySelector(".ag-header-row")),l=a.clientWidth-l),t==null&&!r&&(l+=s.get("center").getCenterViewportScrollLeft()),l):0}function nr(e,t){for(const o of e)o.moving=t,o.dispatchColEvent("movingChanged","uiColumnMoved")}var Al=7,$r=100,xs=$r/2,Sv=5,yv=100,bv=class extends M{constructor(e){super(),this.pinned=e,this.needToMoveLeft=!1,this.needToMoveRight=!1,this.lastMovedInfo=null,this.isCenterContainer=!j(e)}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.gridBodyCon=e.gridBodyCtrl})}getIconName(){const{pinned:e,lastDraggingEvent:t}=this,o=t?.dragItem.columns??[];for(const i of o){const s=i.getPinned();if(i.getColDef().lockPinned){if(s==e)return"move";continue}if(s===e||!e)return"move";if(!s&&e)return"pinned"}return"notAllowed"}onDragEnter(e){const t=e.dragItem,o=t.columns;if(e.dragSource.type===0)this.setColumnsVisible(o,!0,"uiColumnDragged");else{const s=t.visibleState,n=(o||[]).filter(r=>s[r.getId()]);this.setColumnsVisible(n,!0,"uiColumnDragged")}this.gos.get("suppressMoveWhenColumnDragging")||this.attemptToPinColumns(o,this.pinned),this.onDragging(e,!0,!0)}onDragging(e=this.lastDraggingEvent,t=!1,o=!1,i=!1){const{gos:s,ctrlsSvc:n}=this.beans,r=s.get("suppressMoveWhenColumnDragging");if(i&&!r){this.finishColumnMoving();return}if(this.lastDraggingEvent=e,!e||!i&&Me(e.hDirection))return;const a=Ur({x:e.x,pinned:this.pinned,gos:s,ctrlsSvc:n});t||this.checkCenterForScrolling(a),r?this.handleColumnDragWhileSuppressingMovement(e,t,o,a,i):this.handleColumnDragWhileAllowingMovement(e,t,o,a,i)}onDragLeave(){this.ensureIntervalCleared(),this.clearHighlighted(),this.lastMovedInfo=null}onDragStop(){this.onDragging(this.lastDraggingEvent,!1,!0,!0),this.ensureIntervalCleared(),this.lastMovedInfo=null}onDragCancel(){this.clearHighlighted(),this.ensureIntervalCleared(),this.lastMovedInfo=null}setColumnsVisible(e,t,o){if(!e)return;const i=e.filter(s=>!s.getColDef().lockVisible);this.beans.colModel.setColsVisible(i,t,o)}finishColumnMoving(){this.clearHighlighted();const e=this.lastMovedInfo;if(!e)return;const{columns:t,toIndex:o}=e;this.beans.colMoves.moveColumns(t,o,"uiColumnMoved",!0)}handleColumnDragWhileSuppressingMovement(e,t,o,i,s){const n=this.getAllMovingColumns(e,!0);if(s){const r=this.isAttemptingToPin(n);r&&this.attemptToPinColumns(n,void 0,!0);const{fromLeft:a,xPosition:l}=this.getNormalisedXPositionInfo(n,r)||{};if(a==null||l==null){this.finishColumnMoving();return}this.moveColumnsAfterHighlight({allMovingColumns:n,xPosition:l,fromEnter:t,fakeEvent:o,fromLeft:a})}else{if(!this.beans.dragAndDrop.isDropZoneWithinThisGrid(e))return;this.highlightHoveredColumn(n,i)}}handleColumnDragWhileAllowingMovement(e,t,o,i,s){const n=this.getAllMovingColumns(e),r=this.normaliseDirection(e.hDirection)==="right",a=e.dragSource.type===1,l=this.getMoveColumnParams({allMovingColumns:n,isFromHeader:a,xPosition:i,fromLeft:r,fromEnter:t,fakeEvent:o}),d=Eu({...l,finished:s});d&&(this.lastMovedInfo=d)}getAllMovingColumns(e,t=!1){const o=e.dragSource.getDragItem();let i=null;t?(i=o.columnsInSplit,i||(i=o.columns)):i=o.columns;const s=n=>n.getColDef().lockPinned?n.getPinned()==this.pinned:!0;return i?i.filter(s):[]}getMoveColumnParams(e){const{allMovingColumns:t,isFromHeader:o,xPosition:i,fromLeft:s,fromEnter:n,fakeEvent:r}=e,{gos:a,colModel:l,colMoves:d,visibleCols:c}=this.beans;return{allMovingColumns:t,isFromHeader:o,fromLeft:s,xPosition:i,pinned:this.pinned,fromEnter:n,fakeEvent:r,gos:a,colModel:l,colMoves:d,visibleCols:c}}highlightHoveredColumn(e,t){const{gos:o,colModel:i}=this.beans,s=o.get("enableRtl"),n=i.getCols().filter(c=>c.isVisible()&&c.getPinned()===this.pinned);let r=null,a=null,l=null;for(const c of n){if(a=c.getActualWidth(),r=this.getNormalisedColumnLeft(c,0,s),r!=null){const u=r+a;if(r<=t&&u>=t){l=c;break}}r=null,a=null}if(l)e.indexOf(l)!==-1&&(l=null);else{for(let c=n.length-1;c>=0;c--){const u=n[c],p=n[c].getParent();if(!p){l=u;break}const g=p?.getDisplayedLeafColumns();if(g.length){l=ve(g);break}}if(!l)return;r=this.getNormalisedColumnLeft(l,0,s),a=l.getActualWidth()}if(this.lastHighlightedColumn?.column!==l&&this.clearHighlighted(),l==null||r==null||a==null)return;let d;t-r<a/2!==s?d=0:d=1,Tl(l,d),this.lastHighlightedColumn={column:l,position:d}}getNormalisedXPositionInfo(e,t){const{gos:o,visibleCols:i}=this.beans,s=o.get("enableRtl"),{firstMovingCol:n,column:r,position:a}=this.getColumnMoveAndTargetInfo(e,t,s);if(!n||!r||a==null)return;const l=i.allCols,d=l.indexOf(n),c=l.indexOf(r),u=a===0!==s,p=d<c||d===c&&!u;let g=0;if(u?p&&(g-=1):p||(g+=1),c+g===d)return;const f=l[c+g];if(!f)return;const m=this.getNormalisedColumnLeft(f,20,s);return{fromLeft:p,xPosition:m}}getColumnMoveAndTargetInfo(e,t,o){const i=this.lastHighlightedColumn||{},{firstMovingCol:s,lastMovingCol:n}=Rv(e);if(!s||!n||i.column||!t)return{firstMovingCol:s,...i};const a=this.getPinDirection()==="left";return{firstMovingCol:s,position:a?1:0,column:a!==o?s:n}}normaliseDirection(e){if(this.gos.get("enableRtl"))switch(e){case"left":return"right";case"right":return"left"}return e}getNormalisedColumnLeft(e,t,o){const{gos:i,ctrlsSvc:s}=this.beans,n=e.getLeft();if(n==null)return null;const r=e.getActualWidth();return Ur({x:o?n+r-t:n+t,pinned:e.getPinned(),useHeaderRow:o,skipScrollPadding:!0,gos:i,ctrlsSvc:s})}isAttemptingToPin(e){const t=this.needToMoveLeft||this.needToMoveRight,o=this.failedMoveAttempts>Al;return t&&o||e.some(i=>i.getPinned()!==this.pinned)}moveColumnsAfterHighlight(e){const{allMovingColumns:t,xPosition:o,fromEnter:i,fakeEvent:s,fromLeft:n}=e,r=this.getMoveColumnParams({allMovingColumns:t,isFromHeader:!0,xPosition:o,fromLeft:n,fromEnter:i,fakeEvent:s}),{columns:a,toIndex:l}=Pu(r)||{};a&&l!=null&&(this.lastMovedInfo={columns:a,toIndex:l}),this.finishColumnMoving()}clearHighlighted(){const{lastHighlightedColumn:e}=this;e&&(Tl(e.column,null),this.lastHighlightedColumn=null)}checkCenterForScrolling(e){if(!this.isCenterContainer)return;const t=this.beans.ctrlsSvc.get("center"),o=t.getCenterViewportScrollLeft(),i=o+t.getCenterWidth();let s,n;this.gos.get("enableRtl")?(s=e<o+xs,n=e>i-xs):(n=e<o+xs,s=e>i-xs),this.needToMoveRight=s,this.needToMoveLeft=n,n||s?this.ensureIntervalStarted():this.ensureIntervalCleared()}ensureIntervalStarted(){this.movingIntervalId||(this.intervalCount=0,this.failedMoveAttempts=0,this.movingIntervalId=window.setInterval(this.moveInterval.bind(this),yv),this.beans.dragAndDrop.getDragAndDropImageComponent()?.setIcon(this.needToMoveLeft?"left":"right",!0))}ensureIntervalCleared(){this.movingIntervalId&&(window.clearInterval(this.movingIntervalId),this.movingIntervalId=null,this.failedMoveAttempts=0,this.beans.dragAndDrop.getDragAndDropImageComponent()?.setIcon(this.getIconName(),!1))}moveInterval(){let e;this.intervalCount++,e=10+this.intervalCount*Sv,e>$r&&(e=$r);let t=null;const o=this.gridBodyCon.scrollFeature;if(this.needToMoveLeft?t=o.scrollHorizontally(-e):this.needToMoveRight&&(t=o.scrollHorizontally(e)),t!==0)this.onDragging(this.lastDraggingEvent),this.failedMoveAttempts=0;else{this.failedMoveAttempts++;const{pinnedCols:i,dragAndDrop:s,gos:n}=this.beans;if(this.failedMoveAttempts<=Al+1||!i)return;if(s.getDragAndDropImageComponent()?.setIcon("pinned",!1),!n.get("suppressMoveWhenColumnDragging")){const r=this.lastDraggingEvent?.dragItem.columns;this.attemptToPinColumns(r,void 0,!0)}}}getPinDirection(){if(this.needToMoveLeft||this.pinned==="left")return"left";if(this.needToMoveRight||this.pinned==="right")return"right"}attemptToPinColumns(e,t,o=!1){const i=(e||[]).filter(r=>!r.getColDef().lockPinned);if(!i.length)return 0;o&&(t=this.getPinDirection());const{pinnedCols:s,dragAndDrop:n}=this.beans;return s?.setColsPinned(i,t,"uiColumnDragged"),o&&n.nudge(),i.length}destroy(){super.destroy(),this.lastDraggingEvent=null,this.clearHighlighted(),this.lastMovedInfo=null}};function Tl(e,t){e.highlighted!==t&&(e.highlighted=t,e.dispatchColEvent("headerHighlightChanged","uiColumnMoved"))}function Rv(e){const t=e.length;let o,i;for(let s=0;s<t;s++){if(!o){const n=e[s];n.getLeft()!=null&&(o=n)}if(!i){const n=e[t-1-s];n.getLeft()!=null&&(i=n)}if(o&&i)break}return{firstMovingCol:o,lastMovingCol:i}}var Fv=class extends M{constructor(e,t){super(),this.pinned=e,this.eContainer=t}postConstruct(){const{ctrlsSvc:e,dragAndDrop:t}=this.beans,o=this.pinned;e.whenReady(this,i=>{let s;const n=i.gridBodyCtrl.eBodyViewport;switch(o){case"left":s=[[n,i.left.eContainer],[i.bottomLeft.eContainer],[i.topLeft.eContainer]];break;case"right":s=[[n,i.right.eContainer],[i.bottomRight.eContainer],[i.topRight.eContainer]];break;default:s=[[n,i.center.eViewport],[i.bottomCenter.eViewport],[i.topCenter.eViewport]];break}this.eSecondaryContainers=s}),this.moveColumnFeature=this.createManagedBean(new bv(o)),this.bodyDropPivotTarget=this.createManagedBean(new gv(o)),t.addDropTarget(this),this.addDestroyFunc(()=>t.removeDropTarget(this))}isInterestedIn(e){return e===1||e===0&&this.gos.get("allowDragFromColumnsToolPanel")}getSecondaryContainers(){return this.eSecondaryContainers}getContainer(){return this.eContainer}getIconName(){return this.currentDropListener.getIconName()}isDropColumnInPivotMode(e){return this.beans.colModel.isPivotMode()&&e.dragSource.type===0}onDragEnter(e){this.currentDropListener=this.isDropColumnInPivotMode(e)?this.bodyDropPivotTarget:this.moveColumnFeature,this.currentDropListener.onDragEnter(e)}onDragLeave(e){this.currentDropListener.onDragLeave(e)}onDragging(e){this.currentDropListener.onDragging(e)}onDragStop(e){this.currentDropListener.onDragStop(e)}onDragCancel(){this.currentDropListener.onDragCancel()}},xv=class extends M{constructor(){super(...arguments),this.beanName="colMoves"}moveColumnByIndex(e,t,o){const i=this.beans.colModel.getCols();if(!i)return;const s=i[e];this.moveColumns([s],t,o)}moveColumns(e,t,o,i=!0){const{colModel:s,colAnimation:n,visibleCols:r,eventSvc:a}=this.beans,l=s.getCols();if(!l)return;if(t>l.length-e.length){_(30,{toIndex:t});return}n?.start();const d=s.getColsForKeys(e);this.doesMovePassRules(d,t)&&(pl(s.getCols(),d,t),r.refresh(o),a.dispatchEvent({type:"columnMoved",columns:d,column:d.length===1?d[0]:null,toIndex:t,finished:i,source:o})),n?.finish()}doesMovePassRules(e,t){const o=this.getProposedColumnOrder(e,t);return this.doesOrderPassRules(o)}doesOrderPassRules(e){const{colModel:t,gos:o}=this.beans;return!(!Ic(e,t.getColTree())||!(s=>{const n=d=>d?d==="left"||d===!0?-1:1:0,r=o.get("enableRtl");let a=r?1:-1,l=!0;return s.forEach(d=>{const c=n(d.getColDef().lockPosition);r?c>a&&(l=!1):c<a&&(l=!1),a=c}),l})(e))}getProposedColumnOrder(e,t){const i=this.beans.colModel.getCols().slice();return pl(i,e,t),i}createBodyDropTarget(e,t){return new Fv(e,t)}moveHeader(e,t,o,i,s){const{ctrlsSvc:n,gos:r,colModel:a,visibleCols:l,focusSvc:d}=this.beans,c=t.getBoundingClientRect(),u=c.left,p=Ie(o),g=p?c.width:o.getActualWidth(),f=e==="left"!==r.get("enableRtl"),m=Ur({x:f?u-20:u+g+20,pinned:i,fromKeyboard:!0,gos:r,ctrlsSvc:n}),C=d.focusedHeader;Eu({allMovingColumns:p?o.getLeafColumns():[o],isFromHeader:!0,fromLeft:e==="right",xPosition:m,pinned:i,fromEnter:!1,fakeEvent:!1,gos:r,colModel:a,colMoves:this,visibleCols:l,finished:!0});let v;if(p){const S=o.getDisplayedLeafColumns();v=f?S[0]:ve(S)}else v=o;if(n.getScrollFeature().ensureColumnVisible(v,"auto"),(!s.isAlive()||r.get("ensureDomOrder"))&&C){let S;if(p){const b=o.getGroupId(),x=o.getLeafColumns();if(!x.length)return;const T=x[0].getParent();if(!T)return;S=Dv(T,b)}else S=o;S&&d.focusHeaderPosition({headerPosition:{...C,column:S}})}}setDragSourceForHeader(e,t,o){const{gos:i,colModel:s,dragAndDrop:n,visibleCols:r}=this.beans;let a=!i.get("suppressDragLeaveHidesColumns");const l=Ie(t),d=l?t.getProvidedColumnGroup().getLeafColumns():[t],u={type:1,eElement:e,getDefaultIconName:()=>a?"hide":"notAllowed",getDragItem:l?()=>Pv(t,r.allCols):()=>Mv(t),dragItemName:o,onDragStarted:()=>{a=!i.get("suppressDragLeaveHidesColumns"),nr(d,!0)},onDragStopped:()=>nr(d,!1),onDragCancelled:()=>nr(d,!1),onGridEnter:p=>{if(a){const{columns:g=[],visibleState:f}=p??{},m=l?v=>!f||f[v.getColId()]:()=>!0,C=g.filter(v=>!v.getColDef().lockVisible&&m(v));s.setColsVisible(C,!0,"uiColumnMoved")}},onGridExit:p=>{if(a){const g=p?.columns?.filter(f=>!f.getColDef().lockVisible)||[];s.setColsVisible(g,!1,"uiColumnMoved")}}};return n.addDragSource(u,!0),u}};function Dv(e,t){for(;e;){if(e.getGroupId()===t)return e;e=e.getParent()}}function Mv(e){const t={};return t[e.getId()]=e.isVisible(),{columns:[e],visibleState:t}}function Pv(e,t){const o=e.getProvidedColumnGroup().getLeafColumns(),i={};o.forEach(a=>i[a.getId()]=a.isVisible());const s=[];t.forEach(a=>{o.indexOf(a)>=0&&(s.push(a),st(o,a))}),o.forEach(a=>s.push(a));const n=[],r=e.getLeafColumns();for(const a of s)r.indexOf(a)!==-1&&n.push(a);return{columns:s,columnsInSplit:n,visibleState:i}}var Au={moduleName:"ColumnMove",version:ne,beans:[xv,uv],apiFunctions:{moveColumnByIndex:hv,moveColumns:pv},dependsOn:[Mu],css:[cv]},Ev=class extends M{constructor(){super(...arguments),this.beanName="autoWidthCalc"}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.centerRowContainerCtrl=e.center})}getPreferredWidthForColumn(e,t){const o=this.getHeaderCellForColumn(e);if(!o)return-1;const i=this.beans.rowRenderer.getAllCellsNotSpanningForColumn(e);return t||i.push(o),this.getPreferredWidthForElements(i)}getPreferredWidthForColumnGroup(e){const t=this.getHeaderCellForColumn(e);return t?this.getPreferredWidthForElements([t]):-1}getPreferredWidthForElements(e,t){const o=document.createElement("form");o.style.position="fixed";const i=this.centerRowContainerCtrl.eContainer;e.forEach(n=>this.cloneItemIntoDummy(n,o)),i.appendChild(o);const s=o.offsetWidth;return i.removeChild(o),t=t??this.gos.get("autoSizePadding"),s+t}getHeaderCellForColumn(e){let t=null;return this.beans.ctrlsSvc.getHeaderRowContainerCtrls().forEach(o=>{const i=o.getHtmlElementForColumnHeader(e);i!=null&&(t=i)}),t}cloneItemIntoDummy(e,t){const o=e.cloneNode(!0);o.style.width="",o.style.position="static",o.style.left="";const i=document.createElement("div"),s=i.classList;["ag-header-cell","ag-header-group-cell"].some(a=>o.classList.contains(a))?(s.add("ag-header","ag-header-row"),i.style.position="static"):s.add("ag-row");let r=e.parentElement;for(;r;){if(["ag-header-row","ag-row"].some(l=>r.classList.contains(l))){for(let l=0;l<r.classList.length;l++){const d=r.classList[l];d!="ag-row-position-absolute"&&s.add(d)}break}r=r.parentElement}i.appendChild(o),t.appendChild(i)}},Av={moduleName:"AutoWidth",version:ne,beans:[Ev]};function Tv(e,t,o=!0,i="api"){e.colResize?.setColumnWidths(t,!1,o,i)}var Iv=class extends M{constructor(e,t,o,i){super(),this.comp=e,this.eResize=t,this.pinned=o,this.columnGroup=i}postConstruct(){if(!this.columnGroup.isResizable()){this.comp.setResizableDisplayed(!1);return}const{horizontalResizeSvc:e,gos:t,colAutosize:o}=this.beans,i=e.addResizeBar({eResizeBar:this.eResize,onResizeStart:this.onResizeStart.bind(this),onResizing:this.onResizing.bind(this,!1),onResizeEnd:this.onResizing.bind(this,!0)});this.addDestroyFunc(i),!t.get("suppressAutoSize")&&o&&this.addDestroyFunc(o.addColumnGroupResize(this.eResize,this.columnGroup,()=>this.resizeLeafColumnsToFit("uiColumnResized")))}onResizeStart(e){const{columnsToResize:t,resizeStartWidth:o,resizeRatios:i,groupAfterColumns:s,groupAfterStartWidth:n,groupAfterRatios:r}=this.getInitialValues(e);this.resizeCols=t,this.resizeStartWidth=o,this.resizeRatios=i,this.resizeTakeFromCols=s,this.resizeTakeFromStartWidth=n,this.resizeTakeFromRatios=r,this.toggleColumnResizing(!0)}onResizing(e,t,o="uiColumnResized"){const i=this.normaliseDragChange(t),s=this.resizeStartWidth+i;this.resizeColumnsFromLocalValues(s,o,e)}getInitialValues(e){const t=l=>l.reduce((d,c)=>d+c.getActualWidth(),0),o=(l,d)=>l.map(c=>c.getActualWidth()/d),i=this.getColumnsToResize(),s=t(i),n=o(i,s),r={columnsToResize:i,resizeStartWidth:s,resizeRatios:n};let a=null;if(e&&(a=this.beans.colGroupSvc?.getGroupAtDirection(this.columnGroup,"After")??null),a){const l=a.getDisplayedLeafColumns(),d=r.groupAfterColumns=l.filter(u=>u.isResizable()),c=r.groupAfterStartWidth=t(d);r.groupAfterRatios=o(d,c)}else r.groupAfterColumns=void 0,r.groupAfterStartWidth=void 0,r.groupAfterRatios=void 0;return r}resizeLeafColumnsToFit(e){const t=this.beans.autoWidthCalc.getPreferredWidthForColumnGroup(this.columnGroup),o=this.getInitialValues();t>o.resizeStartWidth&&this.resizeColumns(o,t,e,!0)}resizeColumnsFromLocalValues(e,t,o=!0){if(!this.resizeCols||!this.resizeRatios)return;const i={columnsToResize:this.resizeCols,resizeStartWidth:this.resizeStartWidth,resizeRatios:this.resizeRatios,groupAfterColumns:this.resizeTakeFromCols,groupAfterStartWidth:this.resizeTakeFromStartWidth,groupAfterRatios:this.resizeTakeFromRatios};this.resizeColumns(i,e,t,o)}resizeColumns(e,t,o,i=!0){const{columnsToResize:s,resizeStartWidth:n,resizeRatios:r,groupAfterColumns:a,groupAfterStartWidth:l,groupAfterRatios:d}=e,c=[];if(c.push({columns:s,ratios:r,width:t}),a){const u=t-n;c.push({columns:a,ratios:d,width:l-u})}this.beans.colResize?.resizeColumnSets({resizeSets:c,finished:i,source:o}),i&&this.toggleColumnResizing(!1)}toggleColumnResizing(e){this.comp.addOrRemoveCssClass("ag-column-resizing",e)}getColumnsToResize(){return this.columnGroup.getDisplayedLeafColumns().filter(t=>t.isResizable())}normaliseDragChange(e){let t=e;return this.gos.get("enableRtl")?this.pinned!=="left"&&(t*=-1):this.pinned==="right"&&(t*=-1),t}destroy(){super.destroy(),this.resizeCols=void 0,this.resizeRatios=void 0,this.resizeTakeFromCols=void 0,this.resizeTakeFromRatios=void 0}},Lv=class extends M{constructor(e,t,o,i,s){super(),this.pinned=e,this.column=t,this.eResize=o,this.comp=i,this.ctrl=s}postConstruct(){const e=[];let t,o;const i=()=>{if(he(this.eResize,t),!t)return;const{horizontalResizeSvc:r,colAutosize:a}=this.beans,l=r.addResizeBar({eResizeBar:this.eResize,onResizeStart:this.onResizeStart.bind(this),onResizing:this.onResizing.bind(this,!1),onResizeEnd:this.onResizing.bind(this,!0)});e.push(l),o&&a&&e.push(a.addColumnAutosize(this.eResize,this.column))},s=()=>{e.forEach(r=>r()),e.length=0},n=()=>{const r=this.column.isResizable(),a=!this.gos.get("suppressAutoSize")&&!this.column.getColDef().suppressAutoSize;(r!==t||a!==o)&&(t=r,o=a,s(),i())};n(),this.addDestroyFunc(s),this.ctrl.setRefreshFunction("resize",n)}onResizing(e,t){const{column:o,lastResizeAmount:i,resizeStartWidth:s,beans:n}=this,r=this.normaliseResizeAmount(t),a=s+r,l=[{key:o,newWidth:a}],{pinnedCols:d,ctrlsSvc:c,colResize:u}=n;if(this.column.getPinned()){const p=d?.leftWidth??0,g=d?.rightWidth??0,f=Qi(c.getGridBodyCtrl().eBodyViewport)-50;if(p+g+(r-i)>f)return}this.lastResizeAmount=r,u?.setColumnWidths(l,this.resizeWithShiftKey,e,"uiColumnResized"),e&&this.toggleColumnResizing(!1)}onResizeStart(e){this.resizeStartWidth=this.column.getActualWidth(),this.lastResizeAmount=0,this.resizeWithShiftKey=e,this.toggleColumnResizing(!0)}toggleColumnResizing(e){this.comp.addOrRemoveCssClass("ag-column-resizing",e)}normaliseResizeAmount(e){let t=e;const o=this.pinned!=="left",i=this.pinned==="right";return this.gos.get("enableRtl")?o&&(t*=-1):i&&(t*=-1),t}},kv=class extends M{constructor(){super(...arguments),this.beanName="colResize"}setColumnWidths(e,t,o,i){const s=[],{colModel:n,gos:r,visibleCols:a}=this.beans;e.forEach(l=>{const d=n.getColDefCol(l.key)||n.getCol(l.key);if(!d)return;if(s.push({width:l.newWidth,ratios:[1],columns:[d]}),r.get("colResizeDefault")==="shift"&&(t=!t),t){const u=a.getColAfter(d);if(!u)return;const p=d.getActualWidth()-l.newWidth,g=u.getActualWidth()+p;s.push({width:g,ratios:[1],columns:[u]})}}),s.length!==0&&this.resizeColumnSets({resizeSets:s,finished:o,source:i})}resizeColumnSets(e){const{resizeSets:t,finished:o,source:i}=e;if(!(!t||t.every(c=>Gv(c)))){if(o){const c=t&&t.length>0?t[0].columns:null;cn(this.eventSvc,c,o,i)}return}const n=[],r=[];t.forEach(c=>{const{width:u,columns:p,ratios:g}=c,f={},m={};p.forEach(S=>r.push(S));let C=!0,v=0;for(;C;){if(v++,v>1e3){ae(31);break}C=!1;const S=[];let b=0,x=u;p.forEach((A,P)=>{if(m[A.getId()])x-=f[A.getId()];else{S.push(A);const w=g[P];b+=w}});const T=1/b;S.forEach((A,P)=>{const y=P===S.length-1;let w;y?w=x:(w=Math.round(g[P]*u*T),x-=w);const R=A.getMinWidth(),F=A.getMaxWidth();w<R?(w=R,m[A.getId()]=!0,C=!0):F>0&&w>F&&(w=F,m[A.getId()]=!0,C=!0),f[A.getId()]=w})}p.forEach(S=>{const b=f[S.getId()];S.getActualWidth()!==b&&(S.setActualWidth(b,i),n.push(S))})});const a=n.length>0;let l=[];if(a){const{colFlex:c,visibleCols:u,colViewport:p}=this.beans;l=c?.refreshFlexedColumns({resizingCols:r,skipSetLeft:!0})??[],u.setLeftValues(i),u.updateBodyWidths(),p.checkViewportColumns()}const d=r.concat(l);(a||o)&&cn(this.eventSvc,d,o,i,l)}resizeHeader(e,t,o){if(!e.isResizable())return;const i=e.getActualWidth(),s=e.getMinWidth(),n=e.getMaxWidth(),r=Math.min(Math.max(i+t,s),n);this.setColumnWidths([{key:e,newWidth:r}],o,!0,"uiColumnResized")}createResizeFeature(e,t,o,i,s){return new Lv(e,t,o,i,s)}createGroupResizeFeature(e,t,o,i){return new Iv(e,t,o,i)}};function Gv(e){const{columns:t,width:o}=e;let i=0,s=0,n=!0;t.forEach(l=>{const d=l.getMinWidth();i+=d||0;const c=l.getMaxWidth();c>0?s+=c:n=!1});const r=o>=i,a=!n||o<=s;return r&&a}var Ov={moduleName:"ColumnResize",version:ne,beans:[kv],apiFunctions:{setColumnWidths:Tv},dependsOn:[dv,Av]},Bv=class extends M{constructor(e,t){super(),this.removeChildListenersFuncs=[],this.columnGroup=t,this.comp=e}postConstruct(){this.addListenersToChildrenColumns(),this.addManagedListeners(this.columnGroup,{displayedChildrenChanged:this.onDisplayedChildrenChanged.bind(this)}),this.onWidthChanged(),this.addDestroyFunc(this.removeListenersOnChildrenColumns.bind(this))}addListenersToChildrenColumns(){this.removeListenersOnChildrenColumns();const e=this.onWidthChanged.bind(this);this.columnGroup.getLeafColumns().forEach(t=>{t.__addEventListener("widthChanged",e),t.__addEventListener("visibleChanged",e),this.removeChildListenersFuncs.push(()=>{t.__removeEventListener("widthChanged",e),t.__removeEventListener("visibleChanged",e)})})}removeListenersOnChildrenColumns(){this.removeChildListenersFuncs.forEach(e=>e()),this.removeChildListenersFuncs=[]}onDisplayedChildrenChanged(){this.addListenersToChildrenColumns(),this.onWidthChanged()}onWidthChanged(){const e=this.columnGroup.getActualWidth();this.comp.setWidth(`${e}px`),this.comp.addOrRemoveCssClass("ag-hidden",e===0)}},Nv=class extends ka{constructor(){super(...arguments),this.onSuppressColMoveChange=()=>{!this.isAlive()||this.isSuppressMoving()?this.removeDragSource():this.dragSource||this.setDragSource(this.eGui)}}setComp(e,t,o,i,s){const{column:n,beans:r}=this,{context:a,colNames:l,colHover:d,rangeSvc:c,colResize:u}=r;this.comp=e,s=cs(this,a,s),this.setGui(t,s),this.displayName=l.getDisplayNameForColumnGroup(n,"header"),this.refreshHeaderStyles(),this.addClasses(),this.setupMovingCss(s),this.setupExpandable(s),this.setupTooltip(),this.setupAutoHeight({wrapperElement:i,compBean:s}),this.setupUserComp(),this.addHeaderMouseListeners(s),this.addManagedPropertyListener("groupHeaderHeight",this.refreshMaxHeaderHeight.bind(this)),this.refreshMaxHeaderHeight();const p=this.rowCtrl.pinned,g=n.getProvidedColumnGroup().getLeafColumns();d?.createHoverFeature(s,g,t),c?.createRangeHighlightFeature(s,n,e),s.createManagedBean(new La(n,t,r)),s.createManagedBean(new Bv(e,n)),u?this.resizeFeature=s.createManagedBean(u.createGroupResizeFeature(e,o,p,n)):e.setResizableDisplayed(!1),s.createManagedBean(new Si(t,{shouldStopEventPropagation:this.shouldStopEventPropagation.bind(this),onTabKeyDown:()=>{},handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this)})),this.addHighlightListeners(s,g),s.addManagedPropertyListener("suppressMovableColumns",this.onSuppressColMoveChange),this.addResizeAndMoveKeyboardListeners(s),s.addDestroyFunc(()=>this.clearComponent())}getHeaderClassParams(){const{column:e,beans:t}=this,o=e.getDefinition();return Z(t.gos,{colDef:o,columnGroup:e,floatingFilter:!1})}refreshMaxHeaderHeight(){const{gos:e,comp:t}=this,o=e.get("groupHeaderHeight");o!=null?o===0?t.setHeaderWrapperHidden(!0):t.setHeaderWrapperMaxHeight(o):(t.setHeaderWrapperHidden(!1),t.setHeaderWrapperMaxHeight(null))}addHighlightListeners(e,t){if(this.beans.gos.get("suppressMoveWhenColumnDragging"))for(const o of t)e.addManagedListeners(o,{headerHighlightChanged:this.onLeafColumnHighlightChanged.bind(this,o)})}onLeafColumnHighlightChanged(e){const t=this.column.getDisplayedLeafColumns(),o=t[0]===e,i=ve(t)===e;if(!o&&!i)return;const s=e.getHighlighted(),n=!!this.rowCtrl.getHeaderCellCtrls().find(l=>l.column.isMoving());let r=!1,a=!1;if(n){const l=this.beans.gos.get("enableRtl"),d=s===1,c=s===0;o&&(l?a=d:r=c),i&&(l?r=c:a=d)}this.comp.addOrRemoveCssClass("ag-header-highlight-before",r),this.comp.addOrRemoveCssClass("ag-header-highlight-after",a)}resizeHeader(e,t){const{resizeFeature:o}=this;if(!o)return;const i=o.getInitialValues(t);o.resizeColumns(i,i.resizeStartWidth+e,"uiColumnResized",!0)}resizeLeafColumnsToFit(e){this.resizeFeature?.resizeLeafColumnsToFit(e)}setupUserComp(){const{colGroupSvc:e,userCompFactory:t,gos:o}=this.beans,i=Z(o,{displayName:this.displayName,columnGroup:this.column,setExpanded:n=>{e.setColumnGroupOpened(this.column.getProvidedColumnGroup(),n,"gridInitializing")},setTooltip:(n,r)=>{o.assertModuleRegistered("Tooltip",3),this.setupTooltip(n,r)}}),s=Yg(t,i);s&&this.comp.setUserCompDetails(s)}addHeaderMouseListeners(e){const t=s=>this.handleMouseOverChange(s.type==="mouseenter"),o=()=>this.dispatchColumnMouseEvent("columnHeaderClicked",this.column.getProvidedColumnGroup()),i=s=>this.handleContextMenuMouseEvent(s,void 0,this.column.getProvidedColumnGroup());e.addManagedListeners(this.eGui,{mouseenter:t,mouseleave:t,click:o,contextmenu:i})}handleMouseOverChange(e){this.eventSvc.dispatchEvent({type:e?"columnHeaderMouseOver":"columnHeaderMouseLeave",column:this.column.getProvidedColumnGroup()})}setupTooltip(e,t){this.tooltipFeature=this.beans.tooltipSvc?.setupHeaderGroupTooltip(this.tooltipFeature,this,e,t)}setupExpandable(e){const t=this.column.getProvidedColumnGroup();this.refreshExpanded();const o=this.refreshExpanded.bind(this);e.addManagedListeners(t,{expandedChanged:o,expandableChanged:o})}refreshExpanded(){const{column:e}=this;this.expandable=e.isExpandable();const t=e.isExpanded();this.expandable?this.comp.setAriaExpanded(t?"true":"false"):this.comp.setAriaExpanded(void 0),this.refreshHeaderStyles()}addClasses(){const{column:e}=this,t=e.getColGroupDef(),o=jc(t,this.gos,null,e);e.isPadding()?(o.push("ag-header-group-cell-no-group"),e.getLeafColumns().every(s=>s.isSpanHeaderHeight())&&o.push("ag-header-span-height")):(o.push("ag-header-group-cell-with-group"),t?.wrapHeaderText&&o.push("ag-header-cell-wrap-text")),o.forEach(i=>this.comp.addOrRemoveCssClass(i,!0))}setupMovingCss(e){const{column:t}=this,i=t.getProvidedColumnGroup().getLeafColumns(),s=()=>this.comp.addOrRemoveCssClass("ag-header-cell-moving",t.isMoving());i.forEach(n=>{e.addManagedListeners(n,{movingChanged:s})}),s()}onFocusIn(e){this.eGui.contains(e.relatedTarget)||this.focusThis()}handleKeyDown(e){super.handleKeyDown(e);const t=this.getWrapperHasFocus();if(!(!this.expandable||!t)&&e.key===D.ENTER){const o=this.column,i=!o.isExpanded();this.beans.colGroupSvc.setColumnGroupOpened(o.getProvidedColumnGroup(),i,"uiColumnExpanded")}}setDragSource(e){!this.isAlive()||this.isSuppressMoving()||(this.removeDragSource(),e&&(this.dragSource=this.beans.colMoves?.setDragSourceForHeader(e,this.column,this.displayName)??null))}isSuppressMoving(){return this.gos.get("suppressMovableColumns")||this.column.getLeafColumns().some(e=>e.getColDef().suppressMovable||e.getColDef().lockPosition)}destroy(){this.tooltipFeature=this.destroyBean(this.tooltipFeature),super.destroy()}};function Hv(e,t,o){e.colGroupSvc?.setColumnGroupOpened(t,o,"api")}function Vv(e,t,o){return e.colGroupSvc?.getColumnGroup(t,o)??null}function _v(e,t){return e.colGroupSvc?.getProvidedColGroup(t)??null}function zv(e,t,o){return e.colNames.getDisplayNameForColumnGroup(t,o)||""}function Wv(e){return e.colGroupSvc?.getColumnGroupState()??[]}function Uv(e,t){e.colGroupSvc?.setColumnGroupState(t,"api")}function $v(e){e.colGroupSvc?.resetColumnGroupState("api")}function jv(e){return e.visibleCols.treeLeft}function Kv(e){return e.visibleCols.treeCenter}function Yv(e){return e.visibleCols.treeRight}function qv(e){return e.visibleCols.getAllTrees()}function Qv(e,t){for(let o=0;o<t.length;o++){const i=e.indexOf(t[o]);i>=0&&(e[i]=e[e.length-1],e.pop())}}var Xv=class extends M{constructor(){super(...arguments),this.beanName="visibleCols",this.colsAndGroupsMap={},this.leftCols=[],this.rightCols=[],this.centerCols=[],this.allCols=[],this.bodyWidth=0,this.leftWidth=0,this.rightWidth=0,this.isBodyWidthDirty=!0}refresh(e,t=!1){const{colModel:o,colGroupSvc:i,colViewport:s}=this.beans;t||this.buildTrees(o,i),i?.updateOpenClosedVisibility();const n=rr(this.treeLeft);this.leftCols=n,this.centerCols=rr(this.treeCenter);const r=rr(this.treeRight);this.rightCols=r,this.joinColsAriaOrder(o),this.joinCols(),this.setLeftValues(e),this.autoHeightCols=this.allCols.filter(a=>a.isAutoHeight()),this.beans.colFlex?.refreshFlexedColumns(),this.updateBodyWidths(),s.checkViewportColumns(!1),this.setFirstRightAndLastLeftPinned(o,n,r,e),this.eventSvc.dispatchEvent({type:"displayedColumnsChanged",source:e})}updateBodyWidths(){const e=Ko(this.centerCols),t=Ko(this.leftCols),o=Ko(this.rightCols);this.isBodyWidthDirty=this.bodyWidth!==e,(this.bodyWidth!==e||this.leftWidth!==t||this.rightWidth!==o)&&(this.bodyWidth=e,this.leftWidth=t,this.rightWidth=o,this.eventSvc.dispatchEvent({type:"columnContainerWidthChanged"}),this.eventSvc.dispatchEvent({type:"displayedColumnsWidthChanged"}))}setLeftValues(e){this.setLeftValuesOfCols(e),this.setLeftValuesOfGroups()}setFirstRightAndLastLeftPinned(e,t,o,i){let s,n;this.gos.get("enableRtl")?(s=t?t[0]:null,n=o?ve(o):null):(s=t?ve(t):null,n=o?o[0]:null),e.getCols().forEach(r=>{r.setLastLeftPinned(r===s,i),r.setFirstRightPinned(r===n,i)})}buildTrees(e,t){const o=e.getColsToShow(),i=o.filter(l=>l.getPinned()=="left"),s=o.filter(l=>l.getPinned()=="right"),n=o.filter(l=>l.getPinned()!="left"&&l.getPinned()!="right"),r=new Hc,a=l=>t?t.createColumnGroups(l):l.columns;this.treeLeft=a({columns:i,idCreator:r,pinned:"left",oldDisplayedGroups:this.treeLeft}),this.treeRight=a({columns:s,idCreator:r,pinned:"right",oldDisplayedGroups:this.treeRight}),this.treeCenter=a({columns:n,idCreator:r,pinned:null,oldDisplayedGroups:this.treeCenter}),this.updateColsAndGroupsMap()}clear(){this.leftCols=[],this.rightCols=[],this.centerCols=[],this.allCols=[],this.ariaOrderColumns=[]}joinColsAriaOrder(e){const t=e.getCols(),o=[],i=[],s=[];for(const n of t){const r=n.getPinned();r?r===!0||r==="left"?o.push(n):s.push(n):i.push(n)}this.ariaOrderColumns=o.concat(i).concat(s)}getAriaColIndex(e){let t;return Ie(e)?t=e.getLeafColumns()[0]:t=e,this.ariaOrderColumns.indexOf(t)+1}setLeftValuesOfGroups(){[this.treeLeft,this.treeRight,this.treeCenter].forEach(e=>{e.forEach(t=>{Ie(t)&&t.checkLeft()})})}setLeftValuesOfCols(e){const{colModel:t}=this.beans;if(!t.getColDefCols())return;const i=t.getCols().slice(0),s=this.gos.get("enableRtl");[this.leftCols,this.rightCols,this.centerCols].forEach(n=>{if(s){let r=Ko(n);n.forEach(a=>{r-=a.getActualWidth(),a.setLeft(r,e)})}else{let r=0;n.forEach(a=>{a.setLeft(r,e),r+=a.getActualWidth()})}Qv(i,n)}),i.forEach(n=>{n.setLeft(null,e)})}joinCols(){this.gos.get("enableRtl")?this.allCols=this.rightCols.concat(this.centerCols).concat(this.leftCols):this.allCols=this.leftCols.concat(this.centerCols).concat(this.rightCols)}getAllTrees(){return this.treeLeft&&this.treeRight&&this.treeCenter?this.treeLeft.concat(this.treeCenter).concat(this.treeRight):null}isColDisplayed(e){return this.allCols.indexOf(e)>=0}getLeftColsForRow(e){const{leftCols:t,beans:{colModel:o}}=this;return o.colSpanActive?this.getColsForRow(e,t):t}getRightColsForRow(e){const{rightCols:t,beans:{colModel:o}}=this;return o.colSpanActive?this.getColsForRow(e,t):t}getColsForRow(e,t,o,i){const s=[];let n=null;for(let r=0;r<t.length;r++){const a=t[r],l=t.length-r,d=Math.min(a.getColSpan(e),l),c=[a];if(d>1){const p=d-1;for(let g=1;g<=p;g++)c.push(t[r+g]);r+=p}let u;o?(u=!1,c.forEach(p=>{o(p)&&(u=!0)})):u=!0,u&&(s.length===0&&n&&(i&&i(a))&&s.push(n),s.push(a)),n=a}return s}getContainerWidth(e){switch(e){case"left":return this.leftWidth;case"right":return this.rightWidth;default:return this.bodyWidth}}getColBefore(e){const t=this.allCols,o=t.indexOf(e);return o>0?t[o-1]:null}isPinningLeft(){return this.leftCols.length>0}isPinningRight(){return this.rightCols.length>0}updateColsAndGroupsMap(){this.colsAndGroupsMap={};const e=t=>{this.colsAndGroupsMap[t.getUniqueId()]=t};_o(this.treeCenter,!1,e),_o(this.treeLeft,!1,e),_o(this.treeRight,!1,e)}isVisible(e){return this.colsAndGroupsMap[e.getUniqueId()]===e}getFirstColumn(){const e=this.gos.get("enableRtl"),t=["leftCols","centerCols","rightCols"];e&&t.reverse();for(let o=0;o<t.length;o++){const i=this[t[o]];if(i.length)return e?ve(i):i[0]}return null}getColAfter(e){const t=this.allCols,o=t.indexOf(e);return o<t.length-1?t[o+1]:null}getColsLeftWidth(){return Ko(this.leftCols)}getDisplayedColumnsRightWidth(){return Ko(this.rightCols)}isColAtEdge(e,t){const o=this.allCols;if(!o.length)return!1;const i=t==="first";let s;if(Ie(e)){const n=e.getDisplayedLeafColumns();if(!n.length)return!1;s=i?n[0]:ve(n)}else s=e;return(i?o[0]:ve(o))===s}};function _o(e,t,o){if(e)for(let i=0;i<e.length;i++){const s=e[i];if(Ie(s)){const n=t?s.getDisplayedChildren():s.getChildren();_o(n,t,o)}o(s)}}function rr(e){const t=[];return _o(e,!0,o=>{Ut(o)&&t.push(o)}),t}var Zv=class extends M{constructor(){super(...arguments),this.beanName="colGroupSvc"}getColumnGroupState(){const e=[],t=this.beans.colModel.getColTree();return Xt(null,t,o=>{Be(o)&&e.push({groupId:o.getGroupId(),open:o.isExpanded()})}),e}resetColumnGroupState(e){const t=this.beans.colModel.getColDefColTree();if(!t)return;const o=[];Xt(null,t,i=>{if(Be(i)){const s=i.getColGroupDef(),n={groupId:i.getGroupId(),open:s?s.openByDefault:void 0};o.push(n)}}),this.setColumnGroupState(o,e)}setColumnGroupState(e,t){const{colModel:o,colAnimation:i,visibleCols:s,eventSvc:n}=this.beans;if(!o.getColTree().length)return;i?.start();const a=[];e.forEach(l=>{const d=l.groupId,c=l.open,u=this.getProvidedColGroup(d);u&&u.isExpanded()!==c&&(u.setExpanded(c),a.push(u))}),s.refresh(t,!0),a.length&&n.dispatchEvent({type:"columnGroupOpened",columnGroup:a.length===1?a[0]:void 0,columnGroups:a}),i?.finish()}setColumnGroupOpened(e,t,o){let i;Be(e)?i=e.getId():i=e||"",this.setColumnGroupState([{groupId:i,open:t}],o)}getProvidedColGroup(e){let t=null;return Xt(null,this.beans.colModel.getColTree(),o=>{Be(o)&&o.getId()===e&&(t=o)}),t}getGroupAtDirection(e,t){const o=e.getProvidedColumnGroup().getLevel()+e.getPaddingLevel(),i=e.getDisplayedLeafColumns(),s=t==="After"?ve(i):i[0],n=`getCol${t}`;for(;;){const r=this.beans.visibleCols[n](s);if(!r)return null;const a=this.getColGroupAtLevel(r,o);if(a!==e)return a}}getColGroupAtLevel(e,t){let o=e.getParent(),i,s;for(;i=o.getProvidedColumnGroup().getLevel(),s=o.getPaddingLevel(),!(i+s<=t);)o=o.getParent();return o}updateOpenClosedVisibility(){const e=this.beans.visibleCols.getAllTrees();_o(e,!1,t=>{Ie(t)&&t.calculateDisplayedColumns()})}getColumnGroup(e,t){if(!e)return null;if(Ie(e))return e;const o=this.beans.visibleCols.getAllTrees(),i=typeof t=="number";let s=null;return _o(o,!1,n=>{if(Ie(n)){const r=n;let a;i?a=e===r.getGroupId()&&t===r.getPartId():a=e===r.getGroupId(),a&&(s=r)}}),s}createColumnGroups(e){const{columns:t,idCreator:o,pinned:i,oldDisplayedGroups:s,isStandaloneStructure:n}=e,r=this.mapOldGroupsById(s),a=[];let l=t;for(;l.length;){const d=l;l=[];let c=0;const u=p=>{const g=c;c=p;const f=d[g],C=(Ie(f)?f.getProvidedColumnGroup():f).getOriginalParent();if(C==null){for(let S=g;S<p;S++)a.push(d[S]);return}const v=this.createColumnGroup(C,o,r,i,n);for(let S=g;S<p;S++)v.addChild(d[S]);l.push(v)};for(let p=1;p<d.length;p++){const g=d[p],m=(Ie(g)?g.getProvidedColumnGroup():g).getOriginalParent(),C=d[c],S=(Ie(C)?C.getProvidedColumnGroup():C).getOriginalParent();m!==S&&u(p)}c<d.length&&u(d.length)}return n||this.setupParentsIntoCols(a,null),a}createProvidedColumnGroup(e,t,o,i,s,n,r){const a=s.getUniqueKey(t.groupId||null,null),l=this.createMergedColGroupDef(t,a),d=new Hi(l,a,!1,o);this.createBean(d);const c=this.findExistingGroup(t,n);c&&n.splice(c.idx,1);const u=c?.group;u&&d.setExpanded(u.isExpanded());const p=Ec(this.beans,l.children,o+1,e,i,s,n,r);return d.setChildren(p),d}balanceColumnTree(e,t,o,i){const s=[];for(let n=0;n<e.length;n++){const r=e[n];if(Be(r)){const a=r,l=this.balanceColumnTree(a.getChildren(),t+1,o,i);a.setChildren(l),s.push(a)}else{let a,l;for(let d=o-1;d>=t;d--){const c=i.getUniqueKey(null,null),u=this.createMergedColGroupDef(null,c),p=new Hi(u,c,!0,t);this.createBean(p),l&&l.setChildren([p]),l=p,a||(a=l)}if(a&&l)if(s.push(a),e.some(c=>Be(c))){l.setChildren([r]);continue}else{l.setChildren(e);break}s.push(r)}}return s}findDepth(e){let t=0,o=e;for(;o&&o[0]&&Be(o[0]);)t++,o=o[0].getChildren();return t}findMaxDepth(e,t){let o=t;for(let i=0;i<e.length;i++){const s=e[i];if(Be(s)){const n=s,r=this.findMaxDepth(n.getChildren(),t+1);o<r&&(o=r)}}return o}balanceTreeForAutoCols(e,t){const o=[];return e.forEach(i=>{let s=i;for(let n=t-1;n>=0;n--){const r=new Hi(null,`FAKE_PATH_${i.getId()}}_${n}`,!0,n);this.createBean(r),r.setChildren([s]),s.originalParent=r,s=r}t===0&&(i.originalParent=null),o.push(s)}),o}createMergedColGroupDef(e,t){const o={},{gos:i,validation:s}=this.beans;return Object.assign(o,i.get("defaultColGroupDef")),Object.assign(o,e),s?.validateColDef(o,t),o}findExistingGroup(e,t){if(e.groupId!=null)for(let i=0;i<t.length;i++){const s=t[i];if(s.getColGroupDef()&&s.getId()===e.groupId)return{idx:i,group:s}}}createColumnGroup(e,t,o,i,s){const n=e.getGroupId(),r=t.getInstanceIdForKey(n),a=ou(n,r);let l=o[a];return l&&l.getProvidedColumnGroup()!==e&&(l=null),j(l)?l.reset():(l=new iu(e,n,r,i),s||this.createBean(l)),l}mapOldGroupsById(e){const t={},o=i=>{i.forEach(s=>{if(Ie(s)){const n=s;t[s.getUniqueId()]=n,o(n.getChildren())}})};return e&&o(e),t}setupParentsIntoCols(e,t){e.forEach(o=>{if(o.parent=t,Ie(o)){const i=o;this.setupParentsIntoCols(i.getChildren(),i)}})}},Tu={moduleName:"ColumnGroup",version:ne,dynamicBeans:{headerGroupCellCtrl:Nv},beans:[Zv],apiFunctions:{getAllDisplayedColumnGroups:qv,getCenterDisplayedColumnGroups:Kv,getColumnGroup:Vv,getColumnGroupState:Wv,getDisplayNameForColumnGroup:zv,getLeftDisplayedColumnGroups:jv,getProvidedColumnGroup:_v,getRightDisplayedColumnGroups:Yv,resetColumnGroupState:$v,setColumnGroupOpened:Hv,setColumnGroupState:Uv}},Jv={moduleName:"CheckboxCellRenderer",version:ne,userComponents:{agCheckboxCellRenderer:gC}};function ew(e,t){const o=e.colModel.getColDefCol(t);return o?o.getColDef():null}function tw(e){return e.colModel.getColumnDefs()}function ow(e,t,o){return e.colNames.getDisplayNameForColumn(t,o)||""}function iw(e,t){return e.colModel.getColDefCol(t)}function sw(e){return e.colModel.getColDefCols()}function nw(e,t){return it(e,t,"api")}function rw(e){return ss(e)}function aw(e){Oc(e,"api")}function lw(e){return e.visibleCols.isPinningLeft()||e.visibleCols.isPinningRight()}function dw(e){return e.visibleCols.isPinningLeft()}function cw(e){return e.visibleCols.isPinningRight()}function uw(e,t){return e.visibleCols.getColAfter(t)}function hw(e,t){return e.visibleCols.getColBefore(t)}function pw(e,t,o){e.colModel.setColsVisible(t,o,"api")}function gw(e,t,o){e.pinnedCols?.setColsPinned(t,o,"api")}function fw(e){return e.colModel.getCols()}function mw(e){return e.visibleCols.leftCols}function Cw(e){return e.visibleCols.centerCols}function vw(e){return e.visibleCols.rightCols}function ww(e){return e.visibleCols.allCols}function Sw(e){return e.colViewport.getViewportColumns()}function jr(e,t){if(!e)return;const o=e,i={};return Object.keys(o).forEach(s=>{if(t&&t.indexOf(s)>=0||Rc.has(s))return;const n=o[s];typeof n=="object"&&n!==null&&n.constructor===Object?i[s]=jr(n):i[s]=n}),i}var yw=class extends M{constructor(){super(...arguments),this.beanName="colDefFactory"}wireBeans(e){this.rowGroupColsSvc=e.rowGroupColsSvc,this.pivotColsSvc=e.pivotColsSvc}getColumnDefs(e,t,o,i){const s=e.slice();t?s.sort((a,l)=>o.indexOf(a)-o.indexOf(l)):o&&s.sort((a,l)=>i.indexOf(a)-i.indexOf(l));const n=this.rowGroupColsSvc?.columns,r=this.pivotColsSvc?.columns;return this.buildColumnDefs(s,n,r)}buildColumnDefs(e,t=[],o=[]){const i=[],s={};return e.forEach(n=>{const r=this.createDefFromColumn(n,t,o);let a=!0,l=r,d=n.getOriginalParent(),c=null;for(;d;){let u=null;if(d.isPadding()){d=d.getOriginalParent();continue}const p=s[d.getGroupId()];if(p){p.children.push(l),a=!1;break}if(u=this.createDefFromGroup(d),u&&(u.children=[l],s[u.groupId]=u,l=u,d=d.getOriginalParent()),d!=null&&c===d){a=!1;break}c=d}a&&i.push(l)}),i}createDefFromGroup(e){const t=jr(e.getColGroupDef(),["children"]);return t&&(t.groupId=e.getGroupId()),t}createDefFromColumn(e,t,o){const i=jr(e.getColDef());return i.colId=e.getColId(),i.width=e.getActualWidth(),i.rowGroup=e.isRowGroupActive(),i.rowGroupIndex=e.isRowGroupActive()?t.indexOf(e):null,i.pivot=e.isPivotActive(),i.pivotIndex=e.isPivotActive()?o.indexOf(e):null,i.aggFunc=e.isValueActive()?e.getAggFunc():null,i.hide=e.isVisible()?void 0:!0,i.pinned=e.isPinned()?e.getPinned():null,i.sort=e.getSort()?e.getSort():null,i.sortIndex=e.getSortIndex()!=null?e.getSortIndex():null,i}},bw=class extends M{constructor(){super(...arguments),this.beanName="colFlex"}refreshFlexedColumns(e={}){const t=e.source??"flex";e.viewportWidth!=null&&(this.flexViewportWidth=e.viewportWidth);const o=this.flexViewportWidth;if(!o)return[];const{visibleCols:i}=this.beans,s=i.centerCols;let n=-1;if(e.resizingCols){const f=new Set(e.resizingCols);for(let m=s.length-1;m>=0;m--)if(f.has(s[m])){n=m;break}}let r=!1;const a=s.map((f,m)=>{const C=f.getFlex(),v=C!=null&&C>0&&m>n;return r||(r=v),{col:f,isFlex:v,flex:Math.max(0,C??0),initialSize:f.getActualWidth(),min:f.getMinWidth(),max:f.getMaxWidth(),targetSize:0}});if(!r)return[];let l=a.length,d=a.reduce((f,m)=>f+m.flex,0),c=o;const u=(f,m)=>{f.frozenSize=m,f.col.setActualWidth(m,t),c-=m,d-=f.flex,l-=1},p=f=>f.frozenSize!=null;for(const f of a)f.isFlex||u(f,f.initialSize);for(;l>0;){const f=Math.round(d<1?c*d:c);let m,C=0,v=0;for(const x of a){if(p(x))continue;m=x,v+=f*(x.flex/d);const T=v-C,A=Math.round(T);x.targetSize=A,C+=A}m&&(m.targetSize+=f-C);let S=0;for(const x of a){if(p(x))continue;const T=x.targetSize,A=Math.min(Math.max(T,x.min),x.max);S+=A-T,x.violationType=A===T?void 0:A<T?"max":"min",x.targetSize=A}const b=S===0?"all":S>0?"min":"max";for(const x of a)p(x)||(b==="all"||x.violationType===b)&&u(x,x.targetSize)}e.skipSetLeft||i.setLeftValues(t),e.updateBodyWidths&&i.updateBodyWidths();const g=a.filter(f=>f.isFlex&&!f.violationType).map(f=>f.col);if(e.fireResizedEvent){const f=a.filter(C=>C.initialSize!==C.frozenSize).map(C=>C.col),m=a.filter(C=>C.flex).map(C=>C.col);cn(this.eventSvc,f,!0,t,m)}return g}initCol(e){const{flex:t,initialFlex:o}=e.colDef;t!==void 0?e.flex=t:o!==void 0&&(e.flex=o)}setColFlex(e,t){e.flex=t??null,e.dispatchStateUpdatedEvent("flex")}},Rw=class extends M{constructor(){super(...arguments),this.beanName="dataTypeSvc",this.dataTypeDefinitions={},this.isPendingInference=!1,this.isColumnTypeOverrideInDataTypeDefinitions=!1,this.columnStateUpdatesPendingInference={},this.columnStateUpdateListenerDestroyFuncs=[]}wireBeans(e){this.colModel=e.colModel}postConstruct(){this.processDataTypeDefinitions(),this.addManagedPropertyListener("dataTypeDefinitions",e=>{this.processDataTypeDefinitions(),this.colModel.recreateColumnDefs(e)})}processDataTypeDefinitions(){const e=this.getDefaultDataTypes(),t={};this.dataTypeDefinitions=t;const o={};this.formatValueFuncs=o;const i=r=>a=>{const{column:l,node:d,value:c}=a;let u=l.getColDef().valueFormatter;return u===r.groupSafeValueFormatter&&(u=r.valueFormatter),this.beans.valueSvc.formatValue(l,d,c,u)};for(const r of Object.keys(e)){const a=e[r],l={...a,groupSafeValueFormatter:kl(a,this.gos)};t[r]=l,o[r]=i(l)}const s=this.gos.get("dataTypeDefinitions")??{},n={};this.dataTypeMatchers=n;for(const r of Object.keys(s)){const a=s[r],l=this.processDataTypeDefinition(a,s,[r],e);l&&(t[r]=l,a.dataTypeMatcher&&(n[r]=a.dataTypeMatcher),o[r]=i(l))}this.checkObjectValueHandlers(e),["dateString","text","number","boolean","date"].forEach(r=>{const a=n[r];a&&delete n[r],n[r]=a??e[r].dataTypeMatcher})}processDataTypeDefinition(e,t,o,i){let s;const n=e.extendsDataType;if(e.columnTypes&&(this.isColumnTypeOverrideInDataTypeDefinitions=!0),e.extendsDataType===e.baseDataType){let r=i[n];const a=t[n];if(r&&a&&(r=a),!Ll(e,r,n))return;s=Il(r,e)}else{if(o.includes(n)){_(44);return}const r=t[n];if(!Ll(e,r,n))return;const a=this.processDataTypeDefinition(r,t,[...o,n],i);if(!a)return;s=Il(a,e)}return{...s,groupSafeValueFormatter:kl(s,this.gos)}}updateColDefAndGetColumnType(e,t,o){let{cellDataType:i}=t;const{field:s}=t;if(i===void 0&&(i=e.cellDataType),(i==null||i===!0)&&(i=this.canInferCellDataType(e,t)?this.inferCellDataType(s,o):!1),!i){e.cellDataType=!1;return}const n=this.dataTypeDefinitions[i];if(!n){_(47,{cellDataType:i});return}return e.cellDataType=i,n.groupSafeValueFormatter&&(e.valueFormatter=n.groupSafeValueFormatter),n.valueParser&&(e.valueParser=n.valueParser),n.suppressDefaultProperties||this.setColDefPropertiesForBaseDataType(e,i,n,o),n.columnTypes}addColumnListeners(e){if(!this.isPendingInference)return;const t=this.columnStateUpdatesPendingInference[e.getColId()];if(!t)return;const o=i=>{t.add(i.key)};e.__addEventListener("columnStateUpdated",o),this.columnStateUpdateListenerDestroyFuncs.push(()=>e.__removeEventListener("columnStateUpdated",o))}canInferCellDataType(e,t){const{gos:o}=this;if(!Lt(o))return!1;const i={cellRenderer:!0,valueGetter:!0,valueParser:!0,refData:!0};if(ar(t,i))return!1;const s=t.type===null?e.type:t.type;if(s){const n=o.get("columnTypes")??{};if(ln(s).some(a=>{const l=n[a.trim()];return l&&ar(l,i)}))return!1}return!ar(e,i)}inferCellDataType(e,t){if(!e)return;let o;const i=this.getInitialData();if(i){const s=e.indexOf(".")>=0&&!this.gos.get("suppressFieldDotNotation");o=Ni(i,e,s)}else this.initWaitForRowData(t);if(o!=null)return Object.keys(this.dataTypeMatchers).find(s=>this.dataTypeMatchers[s](o))??"object"}getInitialData(){const e=this.gos.get("rowData");if(e?.length)return e[0];if(this.initialData)return this.initialData;{const t=this.beans.rowModel.rootNode?.allLeafChildren;if(t?.length)return t[0].data}return null}initWaitForRowData(e){if(this.columnStateUpdatesPendingInference[e]=new Set,this.isPendingInference)return;this.isPendingInference=!0;const t=this.isColumnTypeOverrideInDataTypeDefinitions,{colAutosize:o,eventSvc:i}=this.beans;t&&o&&(o.shouldQueueResizeOperations=!0);const[s]=this.addManagedEventListeners({rowDataUpdateStarted:n=>{const{firstRowData:r}=n;r&&(s?.(),this.isPendingInference=!1,this.processColumnsPendingInference(r,t),this.columnStateUpdatesPendingInference={},t&&o?.processResizeOperations(),i.dispatchEvent({type:"dataTypesInferred"}))}})}processColumnsPendingInference(e,t){this.initialData=e;const o=[];this.destroyColumnStateUpdateListeners();const i={},s={};for(const n of Object.keys(this.columnStateUpdatesPendingInference)){const r=this.columnStateUpdatesPendingInference[n],a=this.colModel.getCol(n);if(!a)return;const l=a.getColDef();if(!this.resetColDefIntoCol(a,"cellDataTypeInferred"))return;const d=a.getColDef();if(t&&d.type&&d.type!==l.type){const c=xw(a,r);c.rowGroup&&c.rowGroupIndex==null&&(i[n]=c),c.pivot&&c.pivotIndex==null&&(s[n]=c),o.push(c)}}t&&o.push(...this.generateColumnStateForRowGroupAndPivotIndexes(i,s)),o.length&&it(this.beans,{state:o},"cellDataTypeInferred"),this.initialData=null}generateColumnStateForRowGroupAndPivotIndexes(e,t){const o={},{rowGroupColsSvc:i,pivotColsSvc:s}=this.beans;return i?.restoreColumnOrder(o,e),s?.restoreColumnOrder(o,t),Object.values(o)}resetColDefIntoCol(e,t){const o=e.getUserProvidedColDef();if(!o)return!1;const i=dn(this.beans,o,e.getColId());return e.setColDef(i,o,t),!0}checkObjectValueHandlers(e){const t=this.dataTypeDefinitions.object,o=e.object;this.hasObjectValueParser=t.valueParser!==o.valueParser,this.hasObjectValueFormatter=t.valueFormatter!==o.valueFormatter}getDateStringTypeDefinition(e){const{dateString:t}=this.dataTypeDefinitions;return e?this.getDataTypeDefinition(e)??t:t}getDateParserFunction(e){return this.getDateStringTypeDefinition(e).dateParser}getDateFormatterFunction(e){return this.getDateStringTypeDefinition(e).dateFormatter}getDataTypeDefinition(e){const t=e.getColDef();if(t.cellDataType)return this.dataTypeDefinitions[t.cellDataType]}getBaseDataType(e){return this.getDataTypeDefinition(e)?.baseDataType}checkType(e,t){if(t==null)return!0;const o=this.getDataTypeDefinition(e)?.dataTypeMatcher;return o?o(t):!0}validateColDef(e){const t=o=>_(48,{property:o});if(e.cellDataType==="object"){const{object:o}=this.dataTypeDefinitions;e.valueFormatter===o.groupSafeValueFormatter&&!this.hasObjectValueFormatter&&t("Formatter"),e.editable&&e.valueParser===o.valueParser&&!this.hasObjectValueParser&&t("Parser")}}getFormatValue(e){return this.formatValueFuncs[e]}isColPendingInference(e){return this.isPendingInference&&!!this.columnStateUpdatesPendingInference[e]}setColDefPropertiesForBaseDataType(e,t,o,i){const s=this.formatValueFuncs[t];switch(o.baseDataType){case"number":{e.cellEditor="agNumberCellEditor";break}case"boolean":{e.cellEditor="agCheckboxCellEditor",e.cellRenderer="agCheckboxCellRenderer",e.getFindText=()=>null,e.suppressKeyboardEvent=n=>!!n.colDef.editable&&n.event.key===D.SPACE;break}case"date":{e.cellEditor="agDateCellEditor",e.keyCreator=s;break}case"dateString":{e.cellEditor="agDateStringCellEditor",e.keyCreator=s;break}case"object":{e.cellEditorParams={useFormatter:!0},e.comparator=(n,r)=>{const a=this.colModel.getColDefCol(i),l=a?.getColDef();if(!a||!l)return 0;const d=n==null?"":s({column:a,node:null,value:n}),c=r==null?"":s({column:a,node:null,value:r});return d===c?0:d>c?1:-1},e.keyCreator=s;break}}this.beans.filterManager?.setColDefPropertiesForDataType(e,o,s)}getDefaultDataTypes(){const e=o=>!!o.match("^\\d{4}-\\d{2}-\\d{2}$"),t=this.getLocaleTextFunc();return{number:{baseDataType:"number",valueParser:o=>o.newValue?.trim?.()===""?null:Number(o.newValue),valueFormatter:o=>o.value==null?"":typeof o.value!="number"||isNaN(o.value)?t("invalidNumber","Invalid Number"):String(o.value),dataTypeMatcher:o=>typeof o=="number"},text:{baseDataType:"text",valueParser:o=>o.newValue===""?null:Qt(o.newValue),dataTypeMatcher:o=>typeof o=="string"},boolean:{baseDataType:"boolean",valueParser:o=>o.newValue==null?o.newValue:o.newValue?.trim?.()===""?null:String(o.newValue).toLowerCase()==="true",valueFormatter:o=>o.value==null?"":String(o.value),dataTypeMatcher:o=>typeof o=="boolean"},date:{baseDataType:"date",valueParser:o=>xl(o.newValue==null?null:String(o.newValue)),valueFormatter:o=>o.value==null?"":!(o.value instanceof Date)||isNaN(o.value.getTime())?t("invalidDate","Invalid Date"):Fl(o.value,!1)??"",dataTypeMatcher:o=>o instanceof Date},dateString:{baseDataType:"dateString",dateParser:o=>xl(o)??void 0,dateFormatter:o=>Fl(o??null,!1)??void 0,valueParser:o=>e(String(o.newValue))?o.newValue:null,valueFormatter:o=>e(String(o.value))?o.value:"",dataTypeMatcher:o=>typeof o=="string"&&e(o)},object:{baseDataType:"object",valueParser:()=>null,valueFormatter:o=>Qt(o.value)??""}}}destroyColumnStateUpdateListeners(){this.columnStateUpdateListenerDestroyFuncs.forEach(e=>e()),this.columnStateUpdateListenerDestroyFuncs=[]}destroy(){this.dataTypeDefinitions={},this.dataTypeMatchers={},this.formatValueFuncs={},this.columnStateUpdatesPendingInference={},this.destroyColumnStateUpdateListeners(),super.destroy()}};function Il(e,t){const o={...e,...t};return e.columnTypes&&t.columnTypes&&t.appendColumnTypes&&(o.columnTypes=[...ln(e.columnTypes),...ln(t.columnTypes)]),o}function Ll(e,t,o){return t?t.baseDataType!==e.baseDataType?(_(46),!1):!0:(_(45,{parentCellDataType:o}),!1)}function kl(e,t){if(e.valueFormatter)return o=>{if(o.node?.group){const i=(o.colDef.pivotValueColumn??o.column).getAggFunc();if(i){if(i==="first"||i==="last")return e.valueFormatter(o);if(e.baseDataType==="number"&&i!=="count"){if(typeof o.value=="number")return e.valueFormatter(o);if(typeof o.value=="object"){if(!o.value)return;if("toNumber"in o.value)return e.valueFormatter({...o,value:o.value.toNumber()});if("value"in o.value)return e.valueFormatter({...o,value:o.value.value})}}return}if(t.get("groupDisplayType")==="groupRows"&&!t.get("treeData"))return}else if(t.get("groupHideOpenParents")&&o.column.isRowGroupActive()&&typeof o.value=="string"&&!e.dataTypeMatcher?.(o.value))return;return e.valueFormatter(o)}}function Fw(e,t,o,i){if(!t[o])return!1;const s=e[o];return s===null?(t[o]=!1,!1):i===void 0?!!s:s===i}function ar(e,t){return[["cellRenderer","agSparklineCellRenderer"],["valueGetter",void 0],["valueParser",void 0],["refData",void 0]].some(([o,i])=>Fw(e,t,o,i))}function xw(e,t){const o=Nc(e);return t.forEach(i=>{delete o[i],i==="rowGroup"?delete o.rowGroupIndex:i==="pivot"&&delete o.pivotIndex}),o}var Dw={moduleName:"DataType",version:ne,beans:[Rw],dependsOn:[Jv]},Mw={moduleName:"ColumnFlex",version:ne,beans:[bw]},Pw={moduleName:"ColumnApi",version:ne,beans:[yw],apiFunctions:{getColumnDef:ew,getDisplayNameForColumn:ow,getColumn:iw,getColumns:sw,applyColumnState:nw,getColumnState:rw,resetColumnState:aw,isPinning:lw,isPinningLeft:dw,isPinningRight:cw,getDisplayedColAfter:uw,getDisplayedColBefore:hw,setColumnsVisible:pw,setColumnsPinned:gw,getAllGridColumns:fw,getDisplayedLeftColumns:mw,getDisplayedCenterColumns:Cw,getDisplayedRightColumns:vw,getAllDisplayedColumns:ww,getAllDisplayedVirtualColumns:Sw,getColumnDefs:tw}};function Ew(e){if(!e||e==null)return null;const t=/([a-z])([A-Z])/g,o=/([A-Z]+)([A-Z])([a-z])/g;return e.replace(t,"$1 $2").replace(o,"$1 $2$3").replace(/\./g," ").split(" ").map(s=>s.substring(0,1).toUpperCase()+(s.length>1?s.substring(1,s.length):"")).join(" ")}var Aw=class extends M{constructor(){super(...arguments),this.beanName="colNames"}getDisplayNameForColumn(e,t,o=!1){if(!e)return null;const i=this.getHeaderName(e.getColDef(),e,null,null,t),{aggColNameSvc:s}=this.beans;return o&&s?s.getHeaderName(e,i):i}getDisplayNameForProvidedColumnGroup(e,t,o){const i=t?.getColGroupDef();return i?this.getHeaderName(i,null,e,t,o):null}getDisplayNameForColumnGroup(e,t){return this.getDisplayNameForProvidedColumnGroup(e,e.getProvidedColumnGroup(),t)}getHeaderName(e,t,o,i,s){const n=e.headerValueGetter;if(n){const r=Z(this.gos,{colDef:e,column:t,columnGroup:o,providedColumnGroup:i,location:s});return typeof n=="function"?n(r):typeof n=="string"?this.beans.expressionSvc?.evaluate(n,r)??null:""}else{if(e.headerName!=null)return e.headerName;if(e.field)return Ew(e.field)}return""}},Tw=class extends M{constructor(){super(...arguments),this.beanName="colViewport",this.colsWithinViewport=[],this.headerColsWithinViewport=[],this.colsWithinViewportHash="",this.rowsOfHeadersToRenderLeft={},this.rowsOfHeadersToRenderRight={},this.rowsOfHeadersToRenderCenter={}}wireBeans(e){this.visibleCols=e.visibleCols,this.colModel=e.colModel}postConstruct(){this.suppressColumnVirtualisation=this.gos.get("suppressColumnVirtualisation")}setScrollPosition(e,t,o=!1){const{visibleCols:i}=this,s=i.isBodyWidthDirty;if(!(e===this.scrollWidth&&t===this.scrollPosition&&!s)){if(this.scrollWidth=e,this.scrollPosition=t,i.isBodyWidthDirty=!0,this.gos.get("enableRtl")){const r=i.bodyWidth;this.viewportLeft=r-t-e,this.viewportRight=r-t}else this.viewportLeft=t,this.viewportRight=e+t;this.colModel.ready&&this.checkViewportColumns(o)}}getHeadersToRender(e,t){let o;switch(e){case"left":o=this.rowsOfHeadersToRenderLeft[t];break;case"right":o=this.rowsOfHeadersToRenderRight[t];break;default:o=this.rowsOfHeadersToRenderCenter[t];break}return o||[]}extractViewportColumns(){const e=this.visibleCols.centerCols;this.isColumnVirtualisationSuppressed()?(this.colsWithinViewport=e,this.headerColsWithinViewport=e):(this.colsWithinViewport=e.filter(this.isColumnInRowViewport.bind(this)),this.headerColsWithinViewport=e.filter(this.isColumnInHeaderViewport.bind(this)))}isColumnVirtualisationSuppressed(){return this.suppressColumnVirtualisation||this.viewportRight===0}clear(e){this.rowsOfHeadersToRenderLeft={},this.rowsOfHeadersToRenderRight={},this.rowsOfHeadersToRenderCenter={},e||(this.colsWithinViewportHash="")}isColumnInHeaderViewport(e){return e.isAutoHeaderHeight()||Iw(e)?!0:this.isColumnInRowViewport(e)}isColumnInRowViewport(e){if(e.isAutoHeight())return!0;const t=e.getLeft()||0,o=t+e.getActualWidth(),i=this.viewportLeft-200,s=this.viewportRight+200,n=t<i&&o<i,r=t>s&&o>s;return!n&&!r}getViewportColumns(){const{leftCols:e,rightCols:t}=this.visibleCols;return this.colsWithinViewport.concat(e).concat(t)}getColsWithinViewport(e){if(!this.colModel.colSpanActive)return this.colsWithinViewport;const t=n=>{const r=n.getLeft();return j(r)&&r>this.viewportLeft},o=this.isColumnVirtualisationSuppressed()?void 0:this.isColumnInRowViewport.bind(this),{visibleCols:i}=this,s=i.centerCols;return i.getColsForRow(e,s,o,t)}checkViewportColumns(e=!1){this.extractViewport()&&this.eventSvc.dispatchEvent({type:"virtualColumnsChanged",afterScroll:e})}calculateHeaderRows(){this.clear(!0);const e={},{leftCols:t,rightCols:o,treeLeft:i,treeRight:s,treeCenter:n}=this.visibleCols;this.headerColsWithinViewport.concat(t).concat(o).forEach(l=>e[l.getId()]=!0);const a=(l,d,c)=>{let u=!1;for(let p=0;p<l.length;p++){const g=l[p];let f=!1;if(Ut(g))f=e[g.getId()]===!0;else{const C=g.getDisplayedChildren();C&&(f=a(C,d,c+1))}f&&(u=!0,d[c]||(d[c]=[]),d[c].push(g))}return u};a(i,this.rowsOfHeadersToRenderLeft,0),a(s,this.rowsOfHeadersToRenderRight,0),a(n,this.rowsOfHeadersToRenderCenter,0)}extractViewport(){const e=i=>`${i.getId()}-${i.getPinned()||"normal"}`;this.extractViewportColumns();const t=this.getViewportColumns().map(e).join("#"),o=this.colsWithinViewportHash!==t;return o&&(this.colsWithinViewportHash=t,this.calculateHeaderRows()),o}};function Iw(e){for(;e;){if(e.isAutoHeaderHeight())return!0;e=e.getParent()}return!1}var Lw=class extends M{constructor(){super(...arguments),this.beanName="agCompUtils"}adaptFunction(e,t){if(!e.cellRenderer)return null;class o{refresh(){return!1}getGui(){return this.eGui}init(s){const n=t(s),r=typeof n;if(r==="string"||r==="number"||r==="boolean"){this.eGui=Pn("<span>"+n+"</span>");return}if(n==null){this.eGui=Pe({tag:"span"});return}this.eGui=n}}return o}},kw={moduleName:"CellRendererFunction",version:ne,beans:[Lw]},Gw=class extends M{constructor(){super(...arguments),this.beanName="registry",this.agGridDefaults={},this.agGridDefaultParams={},this.jsComps={},this.dynamicBeans={},this.selectors={},this.icons={}}postConstruct(){const e=this.gos.get("components");if(e!=null)for(const t of Object.keys(e))this.jsComps[t]=e[t]}registerModule(e){const{icons:t,userComponents:o,dynamicBeans:i,selectors:s}=e;if(o){const n=(r,a,l)=>{this.agGridDefaults[r]=a,l&&(this.agGridDefaultParams[r]=l)};for(const r of Object.keys(o)){const a=o[r];typeof a=="object"?n(r,a.classImp,a.params):n(r,a)}}if(i)for(const n of Object.keys(i))this.dynamicBeans[n]=i[n];if(s?.forEach(n=>{this.selectors[n.selector]=n}),t)for(const n of Object.keys(t))this.icons[n]=t[n]}getUserComponent(e,t){const o=(a,l,d)=>({componentFromFramework:l,component:a,params:d}),{frameworkOverrides:i}=this.beans,s=i.frameworkComponent(t,this.gos.get("components"));if(s!=null)return o(s,!0);const n=this.jsComps[t];if(n){const a=i.isFrameworkComponent(n);return o(n,a)}const r=this.agGridDefaults[t];return r?o(r,!1,this.agGridDefaultParams[t]):(this.beans.validation?.missingUserComponent(e,t,this.agGridDefaults,this.jsComps),null)}createDynamicBean(e,t,...o){const i=this.dynamicBeans[e];if(i==null){if(t)throw new Error(wo(256));return}return new i(...o)}getSelector(e){return this.selectors[e]}getIcon(e){return this.icons[e]}},Ow=23,Bw=class extends M{constructor(){super(...arguments),this.beanName="ctrlsSvc",this.params={},this.ready=!1,this.readyCallbacks=[]}postConstruct(){this.addEventListener("ready",()=>{this.updateReady(),this.ready&&(this.readyCallbacks.forEach(e=>e(this.params)),this.readyCallbacks.length=0)},this.beans.frameworkOverrides.runWhenReadyAsync?.()??!1)}updateReady(){const e=Object.values(this.params);this.ready=e.length===Ow&&e.every(t=>t?.isAlive()??!1)}whenReady(e,t){this.ready?t(this.params):this.readyCallbacks.push(t),e.addDestroyFunc(()=>{const o=this.readyCallbacks.indexOf(t);o>=0&&this.readyCallbacks.splice(o,1)})}register(e,t){this.params[e]=t,this.updateReady(),this.ready&&this.dispatchLocalEvent({type:"ready"}),t.addDestroyFunc(()=>{this.updateReady()})}get(e){return this.params[e]}getGridBodyCtrl(){return this.params.gridBodyCtrl}getHeaderRowContainerCtrls(){const{leftHeader:e,centerHeader:t,rightHeader:o}=this.params;return[e,o,t]}getHeaderRowContainerCtrl(e){const t=this.params;switch(e){case"left":return t.leftHeader;case"right":return t.rightHeader;default:return t.centerHeader}}getScrollFeature(){return this.getGridBodyCtrl().scrollFeature}},Nw=':where(.ag-root-wrapper,.ag-popup,.ag-dnd-ghost,.ag-chart),:where(.ag-root-wrapper,.ag-popup,.ag-dnd-ghost,.ag-chart) :where([class^=ag-]){box-sizing:border-box;&:after,&:before{box-sizing:border-box}&:where(div,span,label):focus-visible{box-shadow:inset var(--ag-focus-shadow);outline:none}}:where(.ag-root-wrapper,.ag-popup,.ag-dnd-ghost,.ag-chart) :where([class^=ag-]) ::-ms-clear{display:none}.ag-aria-description-container{border:0;z-index:9999;clip:rect(1px,1px,1px,1px);height:1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}.ag-hidden{display:none!important}.ag-invisible{visibility:hidden!important}.ag-unselectable{-webkit-user-select:none;-moz-user-select:none;user-select:none}.ag-selectable{-webkit-user-select:text;-moz-user-select:text;user-select:text}.ag-tab-guard{display:block;height:0;position:absolute;width:0}:where(.ag-virtual-list-viewport) .ag-tab-guard{position:sticky}.ag-tab-guard-top{top:1px}.ag-tab-guard-bottom{bottom:1px}.ag-shake-left-to-right{animation-direction:alternate;animation-duration:.2s;animation-iteration-count:infinite;animation-name:ag-shake-left-to-right}@keyframes ag-shake-left-to-right{0%{padding-left:6px;padding-right:2px}to{padding-left:2px;padding-right:6px}}.ag-body-horizontal-scroll-viewport,.ag-body-vertical-scroll-viewport,.ag-body-viewport,.ag-center-cols-viewport,.ag-floating-bottom-viewport,.ag-floating-top-viewport,.ag-header-viewport,.ag-sticky-bottom-viewport,.ag-sticky-top-viewport,.ag-virtual-list-viewport{flex:1 1 auto;height:100%;min-width:0;overflow:hidden;position:relative}.ag-viewport{position:relative}.ag-spanning-container{position:absolute;top:0;z-index:1}.ag-body-viewport,.ag-center-cols-viewport,.ag-floating-bottom-viewport,.ag-floating-top-viewport,.ag-header-viewport,.ag-sticky-bottom-viewport,.ag-sticky-top-viewport{overflow-x:auto;-ms-overflow-style:none!important;scrollbar-width:none!important;&::-webkit-scrollbar{display:none!important}}.ag-body-viewport{display:flex;overflow-x:hidden;&:where(.ag-layout-normal){overflow-y:auto;-webkit-overflow-scrolling:touch}}.ag-floating-bottom-container,.ag-floating-top-container,.ag-sticky-bottom-container,.ag-sticky-top-container{min-height:1px}.ag-center-cols-viewport{min-height:100%;width:100%}.ag-body-horizontal-scroll-viewport{overflow-x:scroll}.ag-body-vertical-scroll-viewport{overflow-y:scroll}.ag-virtual-list-viewport{overflow:auto;width:100%}.ag-body-container,.ag-body-horizontal-scroll-container,.ag-body-vertical-scroll-container,.ag-center-cols-container,.ag-floating-bottom-container,.ag-floating-bottom-full-width-container,.ag-floating-top-container,.ag-full-width-container,.ag-header-container,.ag-pinned-left-cols-container,.ag-pinned-right-cols-container,.ag-sticky-bottom-container,.ag-sticky-top-container,.ag-virtual-list-container{position:relative}.ag-floating-bottom-container,.ag-floating-top-container,.ag-header-container,.ag-pinned-left-floating-bottom,.ag-pinned-left-floating-top,.ag-pinned-right-floating-bottom,.ag-pinned-right-floating-top,.ag-sticky-bottom-container,.ag-sticky-top-container{height:100%;white-space:nowrap}.ag-center-cols-container,.ag-pinned-right-cols-container{display:block}.ag-body-horizontal-scroll-container{height:100%}.ag-body-vertical-scroll-container{width:100%}.ag-floating-bottom-full-width-container,.ag-floating-top-full-width-container,.ag-full-width-container,.ag-sticky-bottom-full-width-container,.ag-sticky-top-full-width-container{pointer-events:none;position:absolute;top:0}:where(.ag-ltr) .ag-floating-bottom-full-width-container,:where(.ag-ltr) .ag-floating-top-full-width-container,:where(.ag-ltr) .ag-full-width-container,:where(.ag-ltr) .ag-sticky-bottom-full-width-container,:where(.ag-ltr) .ag-sticky-top-full-width-container{left:0}:where(.ag-rtl) .ag-floating-bottom-full-width-container,:where(.ag-rtl) .ag-floating-top-full-width-container,:where(.ag-rtl) .ag-full-width-container,:where(.ag-rtl) .ag-sticky-bottom-full-width-container,:where(.ag-rtl) .ag-sticky-top-full-width-container{right:0}.ag-full-width-container{width:100%}.ag-floating-bottom-full-width-container,.ag-floating-top-full-width-container{display:inline-block;height:100%;overflow:hidden;width:100%}.ag-virtual-list-container{overflow:hidden}.ag-body{display:flex;flex:1 1 auto;flex-direction:row!important;min-height:0;position:relative}.ag-body-horizontal-scroll,.ag-body-vertical-scroll{display:flex;min-height:0;min-width:0;position:relative;&:where(.ag-scrollbar-invisible){bottom:0;position:absolute;&:where(.ag-apple-scrollbar){opacity:0;transition:opacity .4s;visibility:hidden;&:where(.ag-scrollbar-scrolling,.ag-scrollbar-active){opacity:1;visibility:visible}}}}.ag-body-horizontal-scroll{width:100%;&:where(.ag-scrollbar-invisible){left:0;right:0}}.ag-body-vertical-scroll{height:100%;&:where(.ag-scrollbar-invisible){top:0;z-index:10}}:where(.ag-ltr) .ag-body-vertical-scroll{&:where(.ag-scrollbar-invisible){right:0}}:where(.ag-rtl) .ag-body-vertical-scroll{&:where(.ag-scrollbar-invisible){left:0}}.ag-force-vertical-scroll{overflow-y:scroll!important}.ag-horizontal-left-spacer,.ag-horizontal-right-spacer{height:100%;min-width:0;overflow-x:scroll;&:where(.ag-scroller-corner){overflow-x:hidden}}:where(.ag-row-animation) .ag-row{transition:transform .4s,top .4s,opacity .2s;&:where(.ag-after-created){transition:transform .4s,top .4s,height .4s,opacity .2s}}:where(.ag-row-no-animation) .ag-row{transition:none}.ag-row-loading{align-items:center;display:flex}.ag-row-position-absolute{position:absolute}.ag-row-position-relative{position:relative}.ag-full-width-row{overflow:hidden;pointer-events:all}.ag-row-inline-editing{z-index:1}.ag-row-dragging{z-index:2}.ag-stub-cell{align-items:center;display:flex}.ag-cell{display:inline-block;height:100%;position:absolute;white-space:nowrap;&:focus-visible{box-shadow:none}}.ag-cell-value{flex:1 1 auto}.ag-cell-value,.ag-group-value{overflow:hidden;text-overflow:ellipsis}.ag-cell-wrap-text{white-space:normal;word-break:break-word}:where(.ag-cell) .ag-icon{display:inline-block;vertical-align:middle}.ag-floating-top{border-bottom:var(--ag-pinned-row-border)}.ag-floating-bottom,.ag-floating-top{display:flex;overflow:hidden;position:relative;white-space:nowrap;width:100%}.ag-floating-bottom{border-top:var(--ag-pinned-row-border)}.ag-sticky-bottom,.ag-sticky-top{background-color:var(--ag-background-color);display:flex;height:0;overflow:hidden;position:absolute;width:100%;z-index:1}.ag-opacity-zero{opacity:0!important}.ag-cell-label-container{align-items:center;display:flex;flex-direction:row-reverse;height:100%;justify-content:space-between;width:100%}:where(.ag-right-aligned-header){.ag-cell-label-container{flex-direction:row}.ag-header-cell-text{text-align:end}}.ag-column-group-icons{display:block;>*{cursor:pointer}}:where(.ag-ltr){direction:ltr;.ag-body,.ag-body-horizontal-scroll,.ag-body-viewport,.ag-floating-bottom,.ag-floating-top,.ag-header,.ag-sticky-bottom,.ag-sticky-top{flex-direction:row}}:where(.ag-rtl){direction:rtl;text-align:right;.ag-body,.ag-body-horizontal-scroll,.ag-body-viewport,.ag-floating-bottom,.ag-floating-top,.ag-header,.ag-sticky-bottom,.ag-sticky-top{flex-direction:row-reverse}.ag-icon-contracted,.ag-icon-expanded,.ag-icon-tree-closed{display:block}}:where(.ag-rtl){.ag-icon-contracted,.ag-icon-expanded,.ag-icon-tree-closed{transform:rotate(180deg)}}:where(.ag-rtl){.ag-icon-contracted,.ag-icon-expanded,.ag-icon-tree-closed{transform:rotate(-180deg)}}.ag-measurement-container{height:0;overflow:hidden;visibility:hidden;width:0}.ag-measurement-element-border{display:inline-block;&:before{border-left:var(--ag-internal-measurement-border);content:"";display:block}}.ag-group{position:relative;width:100%}.ag-group-title-bar{align-items:center;display:flex;padding:var(--ag-spacing)}.ag-group-title{display:inline;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:where(.ag-group-title-bar) .ag-group-title{cursor:default}.ag-group-toolbar{align-items:center;display:flex;padding:var(--ag-spacing)}.ag-group-container{display:flex}.ag-disabled .ag-group-container{pointer-events:none}.ag-disabled-group-container,.ag-disabled-group-title-bar{opacity:.5}.ag-group-container-horizontal{flex-flow:row wrap}.ag-group-container-vertical{flex-direction:column}.ag-group-title-bar-icon{cursor:pointer;flex:none}:where(.ag-ltr) .ag-group-title-bar-icon{margin-right:var(--ag-spacing)}:where(.ag-rtl) .ag-group-title-bar-icon{margin-left:var(--ag-spacing)}:where(.ag-group-item-alignment-stretch) .ag-group-item{align-items:stretch}:where(.ag-group-item-alignment-start) .ag-group-item{align-items:flex-start}:where(.ag-group-item-alignment-end) .ag-group-item{align-items:flex-end}.ag-popup-child{top:0;z-index:5;&:where(:not(.ag-tooltip-custom)){box-shadow:var(--ag-popup-shadow)}}.ag-popup-editor{position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none}.ag-large-text-input{display:block}:where(.ag-ltr) .ag-row:not(.ag-row-level-0) .ag-pivot-leaf-group{margin-left:var(--ag-row-group-indent-size)}:where(.ag-rtl) .ag-row:not(.ag-row-level-0) .ag-pivot-leaf-group{margin-right:var(--ag-row-group-indent-size)}:where(.ag-ltr) .ag-row-group-leaf-indent{margin-left:calc(var(--ag-cell-widget-spacing) + var(--ag-icon-size))}:where(.ag-rtl) .ag-row-group-leaf-indent{margin-right:calc(var(--ag-cell-widget-spacing) + var(--ag-icon-size))}.ag-value-change-delta{padding:0 2px}.ag-value-change-delta-up{color:var(--ag-value-change-delta-up-color)}.ag-value-change-delta-down{color:var(--ag-value-change-delta-down-color)}.ag-value-change-value{background-color:transparent;border-radius:1px;padding-left:1px;padding-right:1px;transition:background-color 1s}.ag-value-change-value-highlight{background-color:var(--ag-value-change-value-highlight-background-color);transition:background-color .1s}.ag-cell-data-changed{background-color:var(--ag-value-change-value-highlight-background-color)!important}.ag-cell-data-changed-animation{background-color:transparent}.ag-cell-highlight{background-color:var(--ag-range-selection-highlight-color)!important}.ag-row,.ag-spanned-row{color:var(--ag-cell-text-color);font-family:var(--ag-cell-font-family);font-size:var(--ag-data-font-size);white-space:nowrap;--ag-internal-content-line-height:calc(min(var(--ag-row-height), var(--ag-line-height, 1000px)) - var(--ag-internal-row-border-width, 1px) - 2px)}.ag-row{background-color:var(--ag-background-color);border-bottom:var(--ag-row-border);height:var(--ag-row-height);width:100%}:where(.ag-body-vertical-content-no-gap>div>div>div,.ag-body-vertical-content-no-gap>div>div>div>div)>.ag-row-last{border-bottom-color:transparent}.ag-sticky-bottom{border-top:var(--ag-row-border);box-sizing:content-box!important}.ag-group-contracted,.ag-group-expanded{cursor:pointer}.ag-cell,.ag-full-width-row .ag-cell-wrapper.ag-row-group{border:1px solid transparent;line-height:var(--ag-internal-content-line-height);-webkit-font-smoothing:subpixel-antialiased}:where(.ag-ltr) .ag-cell{border-right:var(--ag-column-border)}:where(.ag-rtl) .ag-cell{border-left:var(--ag-column-border)}.ag-spanned-cell-wrapper{background-color:var(--ag-background-color);position:absolute}.ag-spanned-cell-wrapper>.ag-spanned-cell{display:block;position:relative}:where(.ag-ltr) :where(.ag-body-horizontal-content-no-gap) .ag-column-last{border-right-color:transparent}:where(.ag-rtl) :where(.ag-body-horizontal-content-no-gap) .ag-column-last{border-left-color:transparent}.ag-cell-wrapper{align-items:center;display:flex;>:where(:not(.ag-cell-value,.ag-group-value)){align-items:center;display:flex;height:var(--ag-internal-content-line-height)}&:where(.ag-row-group){align-items:flex-start}:where(.ag-full-width-row) &:where(.ag-row-group){align-items:center;height:100%}}:where(.ag-ltr) .ag-cell-wrapper{padding-left:calc(var(--ag-indentation-level)*var(--ag-row-group-indent-size))}:where(.ag-rtl) .ag-cell-wrapper{padding-right:calc(var(--ag-indentation-level)*var(--ag-row-group-indent-size))}:where(.ag-cell-wrap-text:not(.ag-cell-auto-height)) .ag-cell-wrapper{align-items:normal;height:100%;:where(.ag-cell-value){height:100%}}:where(.ag-ltr) .ag-row>.ag-cell-wrapper.ag-row-group{padding-left:calc(var(--ag-cell-horizontal-padding) + var(--ag-row-group-indent-size)*var(--ag-indentation-level))}:where(.ag-rtl) .ag-row>.ag-cell-wrapper.ag-row-group{padding-right:calc(var(--ag-cell-horizontal-padding) + var(--ag-row-group-indent-size)*var(--ag-indentation-level))}.ag-cell-focus:not(.ag-cell-range-selected):focus-within,.ag-cell-range-single-cell,.ag-cell-range-single-cell.ag-cell-range-handle,.ag-context-menu-open .ag-cell-focus:not(.ag-cell-range-selected),.ag-context-menu-open .ag-full-width-row.ag-row-focus .ag-cell-wrapper.ag-row-group,.ag-full-width-row.ag-row-focus:focus .ag-cell-wrapper.ag-row-group{border:1px solid;border-color:var(--ag-range-selection-border-color);border-style:var(--ag-range-selection-border-style);outline:initial}.ag-full-width-row.ag-row-focus:focus{box-shadow:none}:where(.ag-ltr) .ag-group-contracted,:where(.ag-ltr) .ag-group-expanded,:where(.ag-ltr) .ag-row-drag,:where(.ag-ltr) .ag-selection-checkbox{margin-right:var(--ag-cell-widget-spacing)}:where(.ag-rtl) .ag-group-contracted,:where(.ag-rtl) .ag-group-expanded,:where(.ag-rtl) .ag-row-drag,:where(.ag-rtl) .ag-selection-checkbox{margin-left:var(--ag-cell-widget-spacing)}:where(.ag-ltr) .ag-group-child-count{margin-left:3px}:where(.ag-rtl) .ag-group-child-count{margin-right:3px}.ag-row-highlight-above:after,.ag-row-highlight-below:after{background-color:var(--ag-range-selection-border-color);content:"";height:1px;position:absolute;width:calc(100% - 1px)}:where(.ag-ltr) .ag-row-highlight-above:after,:where(.ag-ltr) .ag-row-highlight-below:after{left:1px}:where(.ag-rtl) .ag-row-highlight-above:after,:where(.ag-rtl) .ag-row-highlight-below:after{right:1px}.ag-row-highlight-above:after{top:0}.ag-row-highlight-below:after{bottom:0}.ag-row-odd{background-color:var(--ag-odd-row-background-color)}.ag-row-selected:before{background-color:var(--ag-selected-row-background-color);content:"";display:block;inset:0;pointer-events:none;position:absolute}.ag-row-hover.ag-full-width-row.ag-row-group:before,.ag-row-hover:not(.ag-full-width-row):before{background-color:var(--ag-row-hover-color);content:"";display:block;inset:0;pointer-events:none;position:absolute}.ag-row-hover.ag-row-selected:before{background-color:var(--ag-row-hover-color);background-image:linear-gradient(var(--ag-selected-row-background-color),var(--ag-selected-row-background-color))}.ag-row.ag-full-width-row.ag-row-group>*{position:relative}.ag-column-hover{background-color:var(--ag-column-hover-color)}.ag-header-range-highlight{background-color:var(--ag-range-header-highlight-color)}.ag-right-aligned-cell{font-variant-numeric:tabular-nums}:where(.ag-ltr) .ag-right-aligned-cell{text-align:right}:where(.ag-rtl) .ag-right-aligned-cell{text-align:left}.ag-right-aligned-cell .ag-cell-value,.ag-right-aligned-cell .ag-group-value{margin-left:auto}:where(.ag-ltr) .ag-cell:not(.ag-cell-inline-editing),:where(.ag-ltr) .ag-full-width-row .ag-cell-wrapper.ag-row-group{padding-left:calc(var(--ag-cell-horizontal-padding) - 1px + var(--ag-row-group-indent-size)*var(--ag-indentation-level));padding-right:calc(var(--ag-cell-horizontal-padding) - 1px)}:where(.ag-rtl) .ag-cell:not(.ag-cell-inline-editing),:where(.ag-rtl) .ag-full-width-row .ag-cell-wrapper.ag-row-group{padding-left:calc(var(--ag-cell-horizontal-padding) - 1px);padding-right:calc(var(--ag-cell-horizontal-padding) - 1px + var(--ag-row-group-indent-size)*var(--ag-indentation-level))}.ag-row>.ag-cell-wrapper{padding-left:calc(var(--ag-cell-horizontal-padding) - 1px);padding-right:calc(var(--ag-cell-horizontal-padding) - 1px)}.ag-row-dragging{cursor:move;opacity:.5}.ag-details-row{background-color:var(--ag-background-color);padding:calc(var(--ag-spacing)*3.75)}.ag-layout-auto-height,.ag-layout-print{.ag-center-cols-container,.ag-center-cols-viewport{min-height:150px}}.ag-overlay-loading-wrapper{background-color:var(--ag-modal-overlay-background-color)}.ag-skeleton-container{align-content:center;height:100%;width:100%}.ag-skeleton-effect{animation:ag-skeleton-loading 1.5s ease-in-out .5s infinite;background-color:var(--ag-row-loading-skeleton-effect-color);border-radius:.25rem;height:1em;width:100%}:where(.ag-ltr) .ag-right-aligned-cell .ag-skeleton-effect{margin-left:auto}:where(.ag-rtl) .ag-right-aligned-cell .ag-skeleton-effect{margin-right:auto}@keyframes ag-skeleton-loading{0%{opacity:1}50%{opacity:.4}to{opacity:1}}.ag-loading{align-items:center;display:flex;height:100%}:where(.ag-ltr) .ag-loading{padding-left:var(--ag-cell-horizontal-padding)}:where(.ag-rtl) .ag-loading{padding-right:var(--ag-cell-horizontal-padding)}:where(.ag-ltr) .ag-loading-icon{padding-right:var(--ag-cell-widget-spacing)}:where(.ag-rtl) .ag-loading-icon{padding-left:var(--ag-cell-widget-spacing)}.ag-icon-loading{animation-duration:1s;animation-iteration-count:infinite;animation-name:spin;animation-timing-function:linear}@keyframes spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.ag-input-wrapper,.ag-picker-field-wrapper{align-items:center;display:flex;flex:1 1 auto;line-height:normal;position:relative}.ag-input-field{align-items:center;display:flex;flex-direction:row}.ag-input-field-input:where(:not([type=checkbox],[type=radio])){flex:1 1 auto;min-width:0;width:100%}.ag-header{background-color:var(--ag-header-background-color);border-bottom:var(--ag-header-row-border);color:var(--ag-header-text-color);display:flex;font-family:var(--ag-header-font-family);font-size:var(--ag-header-font-size);font-weight:var(--ag-header-font-weight);overflow:hidden;white-space:nowrap;width:100%}.ag-header-row{height:var(--ag-header-height);position:absolute}.ag-floating-filter-button-button,.ag-header-cell-filter-button,.ag-header-cell-menu-button,.ag-header-expand-icon,.ag-panel-title-bar-button,:where(.ag-header-cell-sortable) .ag-header-cell-label{cursor:pointer}:where(.ag-ltr) .ag-header-expand-icon{margin-left:4px}:where(.ag-rtl) .ag-header-expand-icon{margin-right:4px}.ag-header-row:where(:not(:first-child)){:where(.ag-header-cell:not(.ag-header-span-height.ag-header-span-total,.ag-header-parent-hidden),.ag-header-group-cell.ag-header-group-cell-with-group){border-top:var(--ag-header-row-border)}}.ag-header-row:where(:not(.ag-header-row-column-group)){overflow:hidden}:where(.ag-header.ag-header-allow-overflow) .ag-header-row{overflow:visible}.ag-header-cell{display:inline-flex;overflow:hidden}.ag-header-group-cell{contain:paint;display:flex}.ag-header-cell,.ag-header-group-cell{align-items:center;gap:var(--ag-cell-widget-spacing);height:100%;padding:0 var(--ag-cell-horizontal-padding);position:absolute}@property --ag-internal-moving-color{syntax:"<color>";inherits:false;initial-value:transparent}@property --ag-internal-hover-color{syntax:"<color>";inherits:false;initial-value:transparent}.ag-header-cell:where(:not(.ag-floating-filter)),.ag-header-group-cell{&:before{background-image:linear-gradient(var(--ag-internal-hover-color),var(--ag-internal-hover-color)),linear-gradient(var(--ag-internal-moving-color),var(--ag-internal-moving-color));content:"";inset:0;position:absolute;--ag-internal-moving-color:transparent;--ag-internal-hover-color:transparent;transition:--ag-internal-moving-color var(--ag-header-cell-background-transition-duration),--ag-internal-hover-color var(--ag-header-cell-background-transition-duration)}&:where(:hover):before{--ag-internal-hover-color:var(--ag-header-cell-hover-background-color)}&:where(.ag-header-cell-moving):before{--ag-internal-moving-color:var(--ag-header-cell-moving-background-color);--ag-internal-hover-color:var(--ag-header-cell-hover-background-color)}}:where(.ag-header-cell:not(.ag-floating-filter) *,.ag-header-group-cell *){position:relative;z-index:1}.ag-header-cell-menu-button:where(:not(.ag-header-menu-always-show)){opacity:0;transition:opacity .2s}.ag-header-cell-filter-button,:where(.ag-header-cell.ag-header-active) .ag-header-cell-menu-button{opacity:1}.ag-header-cell-label,.ag-header-group-cell-label{align-items:center;align-self:stretch;display:flex;flex:1 1 auto;overflow:hidden;padding:5px 0}:where(.ag-ltr) .ag-sort-indicator-icon{padding-left:var(--ag-spacing)}:where(.ag-rtl) .ag-sort-indicator-icon{padding-right:var(--ag-spacing)}.ag-header-cell-label{text-overflow:ellipsis}.ag-header-group-cell-label.ag-sticky-label{flex:none;max-width:100%;overflow:visible;position:sticky}:where(.ag-ltr) .ag-header-group-cell-label.ag-sticky-label{left:var(--ag-cell-horizontal-padding)}:where(.ag-rtl) .ag-header-group-cell-label.ag-sticky-label{right:var(--ag-cell-horizontal-padding)}.ag-header-cell-text,.ag-header-group-text{overflow:hidden;text-overflow:ellipsis}.ag-header-cell-text{word-break:break-word}.ag-header-cell-comp-wrapper{width:100%}:where(.ag-header-group-cell) .ag-header-cell-comp-wrapper{display:flex}:where(.ag-header-cell:not(.ag-header-cell-auto-height)) .ag-header-cell-comp-wrapper{align-items:center;display:flex;height:100%}.ag-header-cell-wrap-text .ag-header-cell-comp-wrapper{white-space:normal}.ag-header-cell-comp-wrapper-limited-height>*{overflow:hidden}:where(.ag-right-aligned-header) .ag-header-cell-label{flex-direction:row-reverse}:where(.ag-ltr) :where(.ag-header-cell:not(.ag-right-aligned-header)){.ag-header-label-icon,.ag-header-menu-icon{margin-left:var(--ag-spacing)}}:where(.ag-rtl) :where(.ag-header-cell:not(.ag-right-aligned-header)){.ag-header-label-icon,.ag-header-menu-icon{margin-right:var(--ag-spacing)}}:where(.ag-ltr) :where(.ag-header-cell.ag-right-aligned-header){.ag-header-label-icon,.ag-header-menu-icon{margin-right:var(--ag-spacing)}}:where(.ag-rtl) :where(.ag-header-cell.ag-right-aligned-header){.ag-header-label-icon,.ag-header-menu-icon{margin-left:var(--ag-spacing)}}.ag-header-cell:after,.ag-header-group-cell:where(:not(.ag-header-span-height.ag-header-group-cell-no-group)):after{content:"";height:var(--ag-header-column-border-height);position:absolute;top:calc(50% - var(--ag-header-column-border-height)*.5);z-index:1}:where(.ag-ltr) .ag-header-cell:after,:where(.ag-ltr) .ag-header-group-cell:where(:not(.ag-header-span-height.ag-header-group-cell-no-group)):after{border-right:var(--ag-header-column-border);right:0}:where(.ag-rtl) .ag-header-cell:after,:where(.ag-rtl) .ag-header-group-cell:where(:not(.ag-header-span-height.ag-header-group-cell-no-group)):after{border-left:var(--ag-header-column-border);left:0}.ag-header-highlight-after:after,.ag-header-highlight-before:after{background-color:var(--ag-accent-color);content:"";height:100%;position:absolute;width:1px}:where(.ag-ltr) .ag-header-highlight-before:after{left:0}:where(.ag-rtl) .ag-header-highlight-before:after{right:0}:where(.ag-ltr) .ag-header-highlight-after:after{right:0;:where(.ag-pinned-left-header) &{right:1px}}:where(.ag-rtl) .ag-header-highlight-after:after{left:0;:where(.ag-pinned-left-header) &{left:1px}}.ag-header-cell-resize{align-items:center;cursor:ew-resize;display:flex;height:100%;position:absolute;top:0;width:8px;z-index:2;&:after{background-color:var(--ag-header-column-resize-handle-color);content:"";height:var(--ag-header-column-resize-handle-height);position:absolute;top:calc(50% - var(--ag-header-column-resize-handle-height)*.5);width:var(--ag-header-column-resize-handle-width);z-index:1}}:where(.ag-ltr) .ag-header-cell-resize{right:-3px;&:after{left:calc(50% - var(--ag-header-column-resize-handle-width))}}:where(.ag-rtl) .ag-header-cell-resize{left:-3px;&:after{right:calc(50% - var(--ag-header-column-resize-handle-width))}}:where(.ag-header-cell.ag-header-span-height) .ag-header-cell-resize:after{height:calc(100% - var(--ag-spacing)*4);top:calc(var(--ag-spacing)*2)}.ag-header-group-cell-no-group:where(.ag-header-span-height){display:none}.ag-sort-indicator-container{display:flex;gap:var(--ag-spacing)}.ag-layout-print{&.ag-body{display:block;height:unset}&.ag-root-wrapper{display:inline-block}.ag-body-horizontal-scroll,.ag-body-vertical-scroll{display:none}&.ag-force-vertical-scroll{overflow-y:visible!important}}@media print{.ag-root-wrapper.ag-layout-print{display:table;.ag-body-horizontal-scroll-viewport,.ag-body-viewport,.ag-center-cols-container,.ag-center-cols-viewport,.ag-root,.ag-root-wrapper-body,.ag-virtual-list-viewport{display:block!important;height:auto!important;overflow:hidden!important}.ag-cell,.ag-row{-moz-column-break-inside:avoid;break-inside:avoid}}}ag-grid,ag-grid-angular{display:block}.ag-chart,.ag-dnd-ghost,.ag-popup,.ag-root-wrapper{cursor:default;line-height:normal;white-space:normal;-webkit-font-smoothing:antialiased;background-color:var(--ag-background-color);color:var(--ag-text-color);color-scheme:var(--ag-browser-color-scheme);font-family:var(--ag-font-family);font-size:var(--ag-font-size);--ag-indentation-level:0}.ag-root-wrapper{border:var(--ag-wrapper-border);border-radius:var(--ag-wrapper-border-radius);display:flex;flex-direction:column;overflow:hidden;position:relative;&.ag-layout-normal{height:100%}}.ag-root-wrapper-body{display:flex;flex-direction:row;&.ag-layout-normal{flex:1 1 auto;height:0;min-height:0}}.ag-root{display:flex;flex-direction:column;position:relative;&.ag-layout-auto-height,&.ag-layout-normal{flex:1 1 auto;overflow:hidden;width:0}&.ag-layout-normal{height:100%}}.ag-drag-handle{color:var(--ag-drag-handle-color);cursor:grab}.ag-list-item,.ag-virtual-list-item{height:var(--ag-list-item-height)}.ag-virtual-list-item{position:absolute;width:100%}.ag-select-list{background-color:var(--ag-picker-list-background-color);border:var(--ag-picker-list-border);border-radius:var(--ag-border-radius);box-shadow:var(--ag-dropdown-shadow);overflow:hidden auto}.ag-list-item{align-items:center;display:flex;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;&.ag-active-item{background-color:var(--ag-row-hover-color)}}.ag-select-list-item{cursor:default;-webkit-user-select:none;-moz-user-select:none;user-select:none;:where(span){overflow:hidden;text-overflow:ellipsis;white-space:nowrap}}:where(.ag-ltr) .ag-select-list-item{padding-left:calc(var(--ag-cell-horizontal-padding)/2)}:where(.ag-rtl) .ag-select-list-item{padding-right:calc(var(--ag-cell-horizontal-padding)/2)}.ag-list-item-hovered:after{background-color:var(--ag-accent-color);content:"";height:1px;left:0;position:absolute;right:0}.ag-item-highlight-top:after{top:0}.ag-item-highlight-bottom:after{bottom:0}:where(.ag-icon):before{align-items:center;background-color:currentcolor;color:inherit;content:"";display:flex;font-family:inherit;font-size:var(--ag-icon-size);font-style:normal;font-variant:normal;height:var(--ag-icon-size);justify-content:center;line-height:var(--ag-icon-size);-webkit-mask-size:contain;mask-size:contain;text-transform:none;width:var(--ag-icon-size)}.ag-icon{background-position:50%;background-repeat:no-repeat;background-size:contain;color:var(--ag-icon-color);display:block;height:var(--ag-icon-size);position:relative;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:var(--ag-icon-size)}.ag-column-select-column-group-readonly,.ag-column-select-column-readonly,.ag-disabled,[disabled]{.ag-icon{opacity:.5}&.ag-icon-grip{opacity:.35}}.ag-column-select-column-readonly{&.ag-icon-grip,.ag-icon-grip{opacity:.35}}.ag-chart-menu-icon,.ag-chart-settings-next,.ag-chart-settings-prev,.ag-column-group-icons,.ag-column-select-header-icon,.ag-filter-toolpanel-expand,.ag-floating-filter-button-button,.ag-group-title-bar-icon,.ag-header-cell-filter-button,.ag-header-cell-menu-button,.ag-header-expand-icon,.ag-panel-title-bar-button,.ag-panel-title-bar-button-icon,.ag-set-filter-group-icons,:where(.ag-group-contracted) .ag-icon,:where(.ag-group-expanded) .ag-icon{background-color:var(--ag-icon-button-background-color);border-radius:var(--ag-icon-button-border-radius);box-shadow:0 0 0 var(--ag-icon-button-background-spread) var(--ag-icon-button-background-color);color:var(--ag-icon-button-color);&:hover{background-color:var(--ag-icon-button-hover-background-color);box-shadow:0 0 0 var(--ag-icon-button-background-spread) var(--ag-icon-button-hover-background-color);color:var(--ag-icon-button-hover-color)}}.ag-filter-active{background-image:linear-gradient(var(--ag-icon-button-active-background-color),var(--ag-icon-button-active-background-color));border-radius:1px;outline:solid var(--ag-icon-button-background-spread) var(--ag-icon-button-active-background-color);position:relative;&:after{background-color:var(--ag-accent-color);border-radius:50%;content:"";height:6px;position:absolute;top:-1px;width:6px}:where(.ag-icon-filter){clip-path:path("M8,0C8,4.415 11.585,8 16,8L16,16L0,16L0,0L8,0Z");color:var(--ag-icon-button-active-color)}}:where(.ag-ltr) .ag-filter-active{&:after{right:-1px}}:where(.ag-rtl) .ag-filter-active{&:after{left:-1px}}.ag-menu{background-color:var(--ag-menu-background-color);border:var(--ag-menu-border);border-radius:var(--ag-border-radius);box-shadow:var(--ag-menu-shadow);color:var(--ag-menu-text-color);max-height:100%;overflow-y:auto}.ag-menu,.ag-resizer{position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none}.ag-resizer{pointer-events:none;z-index:1}:where(.ag-resizer){&.ag-resizer-topLeft{cursor:nwse-resize;height:5px;left:0;top:0;width:5px}&.ag-resizer-top{cursor:ns-resize;height:5px;left:5px;right:5px;top:0}&.ag-resizer-topRight{cursor:nesw-resize;height:5px;right:0;top:0;width:5px}&.ag-resizer-right{bottom:5px;cursor:ew-resize;right:0;top:5px;width:5px}&.ag-resizer-bottomRight{bottom:0;cursor:nwse-resize;height:5px;right:0;width:5px}&.ag-resizer-bottom{bottom:0;cursor:ns-resize;height:5px;left:5px;right:5px}&.ag-resizer-bottomLeft{bottom:0;cursor:nesw-resize;height:5px;left:0;width:5px}&.ag-resizer-left{bottom:5px;cursor:ew-resize;left:0;top:5px;width:5px}}',Ba=typeof window!="object"||!window?.document?.fonts?.forEach,Kr=new WeakMap,Ci=(e,t,o,i,s,n)=>{if(Ba)return;i&&(e=`@layer ${CSS.escape(i)} { ${e} }`);let r=Kr.get(t);if(r||(r=[],Kr.set(t,r)),r.find(c=>c.css===e))return;const a=document.createElement("style");n&&a.setAttribute("nonce",n),a.dataset.agGlobalCss=o,a.textContent=e;const l={css:e,el:a,priority:s};let d;for(const c of r){if(c.priority>s)break;d=c}if(d){d.el.insertAdjacentElement("afterend",a);const c=r.indexOf(d);r.splice(c+1,0,l)}else t.insertBefore(a,t.querySelector(":not(title, meta)")),r.push(l)},Iu=(e,t,o)=>{Ci(Nw,e,"core",t,0,o),Array.from(gf()).sort((i,s)=>i.moduleName.localeCompare(s.moduleName)).forEach(i=>i.css?.forEach(s=>Ci(s,e,`module-${i.moduleName}`,t,0,o)))},Yr=new Set,Hw=e=>{Yr.add(e)},Vw=e=>{if(Yr.delete(e),Yr.size===0){Kr=new WeakMap;for(const t of document.head.querySelectorAll("style[data-ag-global-css]"))t.remove()}},so=e=>new Lu(e),uo="$default",_w=0,Lu=class{constructor({feature:e,params:t,modeParams:o={},css:i,cssImports:s}){this.feature=e,this.css=i,this.cssImports=s,this.modeParams={[uo]:{...o[uo]??{},...t??{}},...o}}use(e,t,o){let i=this._inject;if(i==null){let{css:s}=this;if(s){const n=`ag-theme-${this.feature??"part"}-${++_w}`;typeof s=="function"&&(s=s()),s=`:where(.${n}) {
10
+ ${s}
11
+ }
12
+ `;for(const r of this.cssImports??[])s=`@import url(${JSON.stringify(r)});
13
+ ${s}`;i={css:s,class:n}}else i=!1;this._inject=i}return i&&e&&Ci(i.css,e,i.class,t,1,o),i?i.class:!1}},zw=e=>e.replace(/[A-Z]/g,t=>`-${t}`).toLowerCase(),ku=e=>`--ag-${zw(e)}`,$t=e=>`var(${ku(e)})`,Ww=(e,t,o)=>Math.max(t,Math.min(o,e)),Uw=e=>{const t=new Map;return o=>{const i=o;return t.has(i)||t.set(i,e(o)),t.get(i)}},Ot=e=>({ref:"accentColor",mix:e}),mt=e=>({ref:"foregroundColor",mix:e}),Pt=e=>({ref:"foregroundColor",mix:e,onto:"backgroundColor"}),$w=e=>({ref:"foregroundColor",mix:e,onto:"headerBackgroundColor"}),dt={ref:"backgroundColor"},xi={ref:"foregroundColor"},mo={ref:"accentColor"},wn={backgroundColor:"#fff",foregroundColor:"#181d1f",borderColor:mt(.15),chromeBackgroundColor:Pt(.02),browserColorScheme:"light"},jw={...wn,textColor:xi,accentColor:"#2196f3",invalidColor:"#e02525",wrapperBorder:!0,rowBorder:!0,headerRowBorder:!0,footerRowBorder:{ref:"rowBorder"},columnBorder:{style:"solid",width:1,color:"transparent"},headerColumnBorder:!1,headerColumnBorderHeight:"100%",pinnedColumnBorder:!0,pinnedRowBorder:!0,sidePanelBorder:!0,sideBarPanelWidth:250,sideBarBackgroundColor:{ref:"chromeBackgroundColor"},sideButtonBarBackgroundColor:{ref:"sideBarBackgroundColor"},sideButtonBarTopPadding:0,sideButtonSelectedUnderlineWidth:2,sideButtonSelectedUnderlineColor:"transparent",sideButtonSelectedUnderlineTransitionDuration:0,sideButtonBackgroundColor:"transparent",sideButtonTextColor:{ref:"textColor"},sideButtonHoverBackgroundColor:{ref:"sideButtonBackgroundColor"},sideButtonHoverTextColor:{ref:"sideButtonTextColor"},sideButtonSelectedBackgroundColor:dt,sideButtonSelectedTextColor:{ref:"sideButtonTextColor"},sideButtonBorder:"solid 1px transparent",sideButtonSelectedBorder:!0,sideButtonLeftPadding:{ref:"spacing"},sideButtonRightPadding:{ref:"spacing"},sideButtonVerticalPadding:{calc:"spacing * 3"},fontFamily:["-apple-system","BlinkMacSystemFont","Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue","sans-serif"],headerBackgroundColor:{ref:"chromeBackgroundColor"},headerFontFamily:{ref:"fontFamily"},cellFontFamily:{ref:"fontFamily"},headerFontWeight:500,headerFontSize:{ref:"fontSize"},dataFontSize:{ref:"fontSize"},headerTextColor:{ref:"textColor"},headerCellHoverBackgroundColor:"transparent",headerCellMovingBackgroundColor:{ref:"headerCellHoverBackgroundColor"},headerCellBackgroundTransitionDuration:"0.2s",cellTextColor:{ref:"textColor"},subtleTextColor:{ref:"textColor",mix:.5},rangeSelectionBorderStyle:"solid",rangeSelectionBorderColor:mo,rangeSelectionBackgroundColor:Ot(.2),rangeSelectionChartBackgroundColor:"#0058FF1A",rangeSelectionChartCategoryBackgroundColor:"#00FF841A",rangeSelectionHighlightColor:Ot(.5),rangeHeaderHighlightColor:$w(.08),rowNumbersSelectedColor:Ot(.5),rowHoverColor:Ot(.08),columnHoverColor:Ot(.05),selectedRowBackgroundColor:Ot(.12),modalOverlayBackgroundColor:{ref:"backgroundColor",mix:.66},oddRowBackgroundColor:dt,borderRadius:4,wrapperBorderRadius:8,cellHorizontalPadding:{calc:"spacing * 2 * cellHorizontalPaddingScale"},cellWidgetSpacing:{calc:"spacing * 1.5"},cellHorizontalPaddingScale:1,rowGroupIndentSize:{calc:"cellWidgetSpacing + iconSize"},valueChangeDeltaUpColor:"#43a047",valueChangeDeltaDownColor:"#e53935",valueChangeValueHighlightBackgroundColor:"#16a08580",spacing:8,fontSize:14,rowHeight:{calc:"max(iconSize, dataFontSize) + spacing * 3.25 * rowVerticalPaddingScale"},rowVerticalPaddingScale:1,headerHeight:{calc:"max(iconSize, dataFontSize) + spacing * 4 * headerVerticalPaddingScale"},headerVerticalPaddingScale:1,popupShadow:"0 0 16px #00000026",cardShadow:"0 1px 4px 1px #00000018",dropdownShadow:{ref:"cardShadow"},dragAndDropImageBackgroundColor:dt,dragAndDropImageBorder:!0,dragAndDropImageShadow:{ref:"popupShadow"},dragHandleColor:mt(.7),focusShadow:{spread:3,color:Ot(.5)},headerColumnResizeHandleHeight:"30%",headerColumnResizeHandleWidth:2,headerColumnResizeHandleColor:{ref:"borderColor"},widgetContainerHorizontalPadding:{calc:"spacing * 1.5"},widgetContainerVerticalPadding:{calc:"spacing * 1.5"},widgetHorizontalSpacing:{calc:"spacing * 1.5"},widgetVerticalSpacing:{ref:"spacing"},listItemHeight:{calc:"max(iconSize, dataFontSize) + widgetVerticalSpacing"},iconSize:16,iconColor:"inherit",iconButtonColor:{ref:"iconColor"},iconButtonBackgroundColor:"transparent",iconButtonBackgroundSpread:4,iconButtonBorderRadius:1,iconButtonHoverColor:{ref:"iconButtonColor"},iconButtonHoverBackgroundColor:mt(.1),iconButtonActiveColor:mo,iconButtonActiveBackgroundColor:Ot(.28),iconButtonActiveIndicatorColor:mo,toggleButtonWidth:28,toggleButtonHeight:18,toggleButtonOnBackgroundColor:mo,toggleButtonOffBackgroundColor:Pt(.3),toggleButtonSwitchBackgroundColor:dt,toggleButtonSwitchInset:2,menuBorder:{color:mt(.2)},menuBackgroundColor:Pt(.03),menuTextColor:Pt(.95),menuShadow:{ref:"popupShadow"},menuSeparatorColor:{ref:"borderColor"},setFilterIndentSize:{ref:"iconSize"},chartMenuPanelWidth:260,chartMenuLabelColor:mt(.8),dialogShadow:{ref:"popupShadow"},cellEditingBorder:{color:mo},cellEditingShadow:{ref:"cardShadow"},dialogBorder:{color:mt(.2)},panelBackgroundColor:dt,panelTitleBarBackgroundColor:{ref:"headerBackgroundColor"},panelTitleBarIconColor:{ref:"headerTextColor"},panelTitleBarTextColor:{ref:"headerTextColor"},panelTitleBarFontWeight:{ref:"headerFontWeight"},panelTitleBarBorder:!0,columnSelectIndentSize:{ref:"iconSize"},toolPanelSeparatorBorder:!0,tooltipBackgroundColor:{ref:"chromeBackgroundColor"},tooltipTextColor:{ref:"textColor"},tooltipBorder:!0,columnDropCellBackgroundColor:mt(.07),columnDropCellTextColor:{ref:"textColor"},columnDropCellDragHandleColor:{ref:"textColor"},columnDropCellBorder:{color:mt(.13)},selectCellBackgroundColor:mt(.07),selectCellBorder:{color:mt(.13)},advancedFilterBuilderButtonBarBorder:!0,advancedFilterBuilderIndentSize:{calc:"spacing * 2 + iconSize"},advancedFilterBuilderJoinPillColor:"#f08e8d",advancedFilterBuilderColumnPillColor:"#a6e194",advancedFilterBuilderOptionPillColor:"#f3c08b",advancedFilterBuilderValuePillColor:"#85c0e4",findMatchColor:xi,findMatchBackgroundColor:"#ffff00",findActiveMatchColor:xi,findActiveMatchBackgroundColor:"#ffa500",filterToolPanelGroupIndent:{ref:"spacing"},rowLoadingSkeletonEffectColor:mt(.15),statusBarLabelColor:xi,statusBarLabelFontWeight:500,statusBarValueColor:xi,statusBarValueFontWeight:500},Kw=":where(.ag-button){background:none;border:none;color:inherit;cursor:pointer;font-family:inherit;font-size:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0;text-indent:inherit;text-shadow:inherit;text-transform:inherit;word-spacing:inherit;&:disabled{cursor:default}&:focus-visible{box-shadow:var(--ag-focus-shadow);outline:none}}.ag-standard-button{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:var(--ag-button-background-color);border:var(--ag-button-border);border-radius:var(--ag-button-border-radius);color:var(--ag-button-text-color);cursor:pointer;font-weight:var(--ag-button-font-weight);padding:var(--ag-button-vertical-padding) var(--ag-button-horizontal-padding);&:hover{background-color:var(--ag-button-hover-background-color);border:var(--ag-button-hover-border);color:var(--ag-button-hover-text-color)}&:active{background-color:var(--ag-button-active-background-color);border:var(--ag-button-active-border);color:var(--ag-button-active-text-color)}&:disabled{background-color:var(--ag-button-disabled-background-color);border:var(--ag-button-disabled-border);color:var(--ag-button-disabled-text-color)}}",Yw={buttonTextColor:"inherit",buttonFontWeight:"normal",buttonBackgroundColor:"transparent",buttonBorder:!1,buttonBorderRadius:{ref:"borderRadius"},buttonHorizontalPadding:{calc:"spacing * 2"},buttonVerticalPadding:{ref:"spacing"},buttonHoverTextColor:{ref:"buttonTextColor"},buttonHoverBackgroundColor:{ref:"buttonBackgroundColor"},buttonHoverBorder:{ref:"buttonBorder"},buttonActiveTextColor:{ref:"buttonHoverTextColor"},buttonActiveBackgroundColor:{ref:"buttonHoverBackgroundColor"},buttonActiveBorder:{ref:"buttonHoverBorder"},buttonDisabledTextColor:{ref:"inputDisabledTextColor"},buttonDisabledBackgroundColor:{ref:"inputDisabledBackgroundColor"},buttonDisabledBorder:{ref:"inputDisabledBorder"}},qw=()=>so({feature:"buttonStyle",params:{...Yw,buttonBackgroundColor:dt,buttonBorder:!0,buttonHoverBackgroundColor:{ref:"rowHoverColor"},buttonActiveBorder:{color:mo}},css:Kw}),Qw=qw(),Xw=".ag-column-drop-vertical-empty-message{align-items:center;border:1px dashed;border-color:var(--ag-border-color);display:flex;inset:0;justify-content:center;margin:calc(var(--ag-spacing)*1.5) calc(var(--ag-spacing)*2);overflow:hidden;padding:calc(var(--ag-spacing)*2);position:absolute}",Zw=()=>so({feature:"columnDropStyle",css:Xw}),Gu=Zw(),Jw=["colorScheme","color","length","scale","borderStyle","border","shadow","image","fontFamily","fontWeight","duration"],eS=Uw(e=>(e=e.toLowerCase(),Jw.find(t=>e.endsWith(t.toLowerCase()))??"length")),On=e=>typeof e=="object"&&e?.ref?$t(e.ref):typeof e=="string"?e:typeof e=="number"?String(e):!1,Na=e=>{if(typeof e=="string")return e;if(e&&"ref"in e){const t=$t(e.ref);return e.mix==null?t:`color-mix(in srgb, ${e.onto?$t(e.onto):"transparent"}, ${t} ${Ww(e.mix*100,0,100)}%)`}return!1},tS=On,ei=e=>typeof e=="string"?e:typeof e=="number"?`${e}px`:e&&"calc"in e?`calc(${e.calc.replace(/ ?[*/+] ?/g," $& ").replace(/-?\b[a-z][a-z0-9]*\b(?![-(])/gi,o=>o[0]==="-"?o:` ${$t(o)} `)})`:e&&"ref"in e?$t(e.ref):!1,oS=On,iS=(e,t)=>typeof e=="string"?e:e===!0?"solid 1px var(--ag-border-color)":e===!1?t==="columnBorder"?"solid 1px transparent":"none":e&&"ref"in e?$t(e.ref):Ou(e.style??"solid")+" "+ei(e.width??1)+" "+Na(e.color??{ref:"borderColor"}),sS=e=>typeof e=="string"?e:e===!1?"none":e&&"ref"in e?$t(e.ref):[ei(e.offsetX??0),ei(e.offsetY??0),ei(e.radius??0),ei(e.spread??0),Na(e.color??{ref:"foregroundColor"})].join(" "),Ou=On,Bu=e=>typeof e=="string"?e.includes(",")?e:Gl(e):e&&"googleFont"in e?Bu(e.googleFont):e&&"ref"in e?$t(e.ref):Array.isArray(e)?e.map(t=>(typeof t=="object"&&"googleFont"in t&&(t=t.googleFont),Gl(t))).join(", "):!1,Gl=e=>/^[\w-]+$|\w\(/.test(e)?e:JSON.stringify(e),nS=On,Nu=e=>typeof e=="string"?e:e&&"url"in e?`url(${JSON.stringify(e.url)})`:e&&"svg"in e?Nu({url:`data:image/svg+xml,${encodeURIComponent(e.svg)}`}):e&&"ref"in e?$t(e.ref):!1,rS=(e,t)=>typeof e=="string"?e:typeof e=="number"?(e>=10&&ae(104,{value:e,param:t}),`${e}s`):e&&"ref"in e?$t(e.ref):!1,aS={color:Na,colorScheme:tS,length:ei,scale:oS,border:iS,borderStyle:Ou,shadow:sS,image:Nu,fontFamily:Bu,fontWeight:nS,duration:rS},lS=(e,t)=>{const o=eS(e);return aS[o](t,e)},dS=()=>new Hu().withPart(Qw).withPart(Gu),Hu=class Vu{constructor(t=[]){this.parts=t}withPart(t){return typeof t=="function"&&(t=t()),t instanceof Lu?new Vu([...this.parts,t]):(Or(259,{part:t},"Invalid part"),this)}withoutPart(t){return this.withPart(so({feature:t}))}withParams(t,o=uo){return this.withPart(so({modeParams:{[o]:t}}))}_startUse({styleContainer:t,cssLayer:o,nonce:i,loadThemeGoogleFonts:s}){if(Ba)return;uS(),Iu(t,o,i);const n=cS(this);if(n.length>0)for(const r of n)s&&pS(r,i);for(const r of this.parts)r.use(t,o,i)}_getCssClass(){return this._cssClassCache??(this._cssClassCache=Ol(this.parts).map(t=>t.use(void 0,void 0,void 0)).filter(Boolean).join(" "))}_getModeParams(){let t=this._paramsCache;if(!t){const o={[uo]:{...jw}};for(const i of Ol(this.parts))for(const s of Object.keys(i.modeParams)){const n=i.modeParams[s];if(n){const r=o[s]??(o[s]={}),a=new Set;for(const l of Object.keys(n)){const d=n[l];d!==void 0&&(r[l]=d,a.add(l))}if(s===uo)for(const l of Object.keys(o)){const d=o[l];if(l!==uo)for(const c of a)delete d[c]}}}this._paramsCache=t=o}return t}_getPerGridCss(t){const o="##SELECTOR##";let i=this._paramsCssCache;if(!i){let s="",n="";const r=this._getModeParams();for(const l of Object.keys(r)){const d=r[l];if(l!==uo){const u=`:where([data-ag-theme-mode="${typeof CSS=="object"?CSS.escape(l):l}"]) & {
14
+ `;s+=u,n+=u}for(const c of Object.keys(d).sort()){const u=d[c],p=lS(c,u);if(p===!1)ae(107,{key:c,value:u});else{const g=ku(c),f=g.replace("--ag-","--ag-inherited-");s+=` ${g}: var(${f}, ${p});
15
+ `,n+=` ${f}: var(${g});
16
+ `}}l!==uo&&(s+=`}
17
+ `,n+=`}
18
+ `)}let a=`${o} {
19
+ ${s}}
20
+ `;a+=`:has(> ${o}):not(${o}) {
21
+ ${n}}
22
+ `,this._paramsCssCache=i=a}return i.replaceAll(o,`:where(.${t})`)}},Ol=e=>{const t=new Map;for(const i of e)t.set(i.feature,i);const o=[];for(const i of e)(!i.feature||t.get(i.feature)===i)&&o.push(i);return o},cS=e=>{const t=new Set,o=n=>{if(Array.isArray(n))n.forEach(o);else{const r=n?.googleFont;typeof r=="string"&&t.add(r)}};return Object.values(e._getModeParams()).flatMap(n=>Object.values(n)).forEach(o),Array.from(t).sort()},Bl=!1,uS=()=>{if(!Bl){Bl=!0;for(const e of Array.from(document.head.querySelectorAll('style[data-ag-scope="legacy"]')))e.remove()}},hS=new Set,pS=async(e,t)=>{hS.add(e);const o=`@import url('https://${gS}/css2?family=${encodeURIComponent(e)}:wght@100;200;300;400;500;600;700;800;900&display=swap');
23
+ `;Ci(o,document.head,`googleFont:${e}`,void 0,0,t)},gS="fonts.googleapis.com",fS='.ag-checkbox-input-wrapper,.ag-radio-button-input-wrapper{background-color:var(--ag-checkbox-unchecked-background-color);border:solid var(--ag-checkbox-border-width) var(--ag-checkbox-unchecked-border-color);flex:none;height:var(--ag-icon-size);position:relative;width:var(--ag-icon-size);:where(input){-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:pointer;display:block;height:var(--ag-icon-size);margin:0;opacity:0;width:var(--ag-icon-size)}&:after{content:"";display:block;inset:0;-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;pointer-events:none;position:absolute}&:where(.ag-checked){background-color:var(--ag-checkbox-checked-background-color);border-color:var(--ag-checkbox-checked-border-color);&:after{background-color:var(--ag-checkbox-checked-shape-color)}}&:where(:focus-within,:active){box-shadow:var(--ag-focus-shadow)}&:where(.ag-disabled){filter:grayscale();opacity:.5}}.ag-checkbox-input-wrapper{border-radius:var(--ag-checkbox-border-radius);&:where(.ag-checked):after{-webkit-mask-image:var(--ag-checkbox-checked-shape-image);mask-image:var(--ag-checkbox-checked-shape-image)}&:where(.ag-indeterminate){background-color:var(--ag-checkbox-indeterminate-background-color);border-color:var(--ag-checkbox-indeterminate-border-color);&:after{background-color:var(--ag-checkbox-indeterminate-shape-color);-webkit-mask-image:var(--ag-checkbox-indeterminate-shape-image);mask-image:var(--ag-checkbox-indeterminate-shape-image)}}}.ag-radio-button-input-wrapper{border-radius:100%;&:where(.ag-checked):after{-webkit-mask-image:var(--ag-radio-checked-shape-image);mask-image:var(--ag-radio-checked-shape-image)}}',mS=()=>so({feature:"checkboxStyle",params:{checkboxBorderWidth:1,checkboxBorderRadius:{ref:"borderRadius"},checkboxUncheckedBackgroundColor:dt,checkboxUncheckedBorderColor:Pt(.3),checkboxCheckedBackgroundColor:mo,checkboxCheckedBorderColor:{ref:"checkboxCheckedBackgroundColor"},checkboxCheckedShapeImage:{svg:'<svg xmlns="http://www.w3.org/2000/svg" width="10" height="7" fill="none"><path stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.75" d="M1 3.5 3.5 6l5-5"/></svg>'},checkboxCheckedShapeColor:dt,checkboxIndeterminateBackgroundColor:Pt(.3),checkboxIndeterminateBorderColor:{ref:"checkboxIndeterminateBackgroundColor"},checkboxIndeterminateShapeImage:{svg:'<svg xmlns="http://www.w3.org/2000/svg" width="10" height="2" fill="none"><rect width="10" height="2" fill="#000" rx="1"/></svg>'},checkboxIndeterminateShapeColor:dt,radioCheckedShapeImage:{svg:'<svg xmlns="http://www.w3.org/2000/svg" width="6" height="6" fill="none"><circle cx="3" cy="3" r="3" fill="#000"/></svg>'}},css:fS}),CS=mS(),_u=()=>({...wn,backgroundColor:"hsl(217, 0%, 17%)",foregroundColor:"#FFF",chromeBackgroundColor:Pt(.05),rowHoverColor:Ot(.15),selectedRowBackgroundColor:Ot(.2),menuBackgroundColor:Pt(.1),browserColorScheme:"dark",popupShadow:"0 0px 20px #000A",cardShadow:"0 1px 4px 1px #000A",advancedFilterBuilderJoinPillColor:"#7a3a37",advancedFilterBuilderColumnPillColor:"#355f2d",advancedFilterBuilderOptionPillColor:"#5a3168",advancedFilterBuilderValuePillColor:"#374c86",findMatchColor:dt,findActiveMatchColor:dt,checkboxUncheckedBorderColor:Pt(.4),toggleButtonOffBackgroundColor:Pt(.4)}),vS=()=>({..._u(),backgroundColor:"#1f2836"}),wS=()=>so({feature:"colorScheme",params:wn,modeParams:{light:wn,dark:_u(),"dark-blue":vS()}}),SS=wS(),zu={aggregation:'<path d="M18 7V4H6l6 8-6 8h12v-3"/>',arrows:'<polyline points="5 9 2 12 5 15"/><polyline points="9 5 12 2 15 5"/><polyline points="15 19 12 22 9 19"/><polyline points="19 9 22 12 19 15"/><line x1="2" x2="22" y1="12" y2="12"/><line x1="12" x2="12" y1="2" y2="22"/>',asc:'<path d="m5 12 7-7 7 7"/><path d="M12 19V5"/>',cancel:'<path d="m18 6-12 12"/><path d="m6 6 12 12"/>',chart:'<line x1="18" x2="18" y1="20" y2="10"/><line x1="12" x2="12" y1="20" y2="4"/><line x1="6" x2="6" y1="20" y2="14"/>',"color-picker":'<path d="m19 11-8-8-8.6 8.6a2 2 0 0 0 0 2.8l5.2 5.2c.8.8 2 .8 2.8 0L19 11Z"/><path d="m5 2 5 5"/><path d="M2 13h15"/><path d="M22 20a2 2 0 1 1-4 0c0-1.6 1.7-2.4 2-4 .3 1.6 2 2.4 2 4Z"/>',columns:'<path d="M9 3H5a2 2 0 0 0-2 2v4m6-6h10a2 2 0 0 1 2 2v4M9 3v18m0 0h10a2 2 0 0 0 2-2V9M9 21H5a2 2 0 0 1-2-2V9m0 0h18"/>',contracted:'<path d="m9 18 6-6-6-6"/>',copy:'<rect width="14" height="14" x="8" y="8" rx="2" ry="2"/><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"/>',cross:'<path d="M18 6 6 18"/><path d="m6 6 12 12"/>',csv:'<path d="M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z"/><polyline points="14 2 14 8 20 8"/><path d="M8 13h2"/><path d="M8 17h2"/><path d="M14 13h2"/><path d="M14 17h2"/>',cut:'<circle cx="6" cy="6" r="3"/><path d="M8.12 8.12 12 12"/><path d="M20 4 8.12 15.88"/><circle cx="6" cy="18" r="3"/><path d="M14.8 14.8 20 20"/>',desc:'<path d="M12 5v14"/><path d="m19 12-7 7-7-7"/>',down:'<path d="M12 5v14"/><path d="m19 12-7 7-7-7"/>',excel:'<path d="M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z"/><polyline points="14 2 14 8 20 8"/><path d="M8 13h2"/><path d="M8 17h2"/><path d="M14 13h2"/><path d="M14 17h2"/>',expanded:'<path d="m15 18-6-6 6-6"/>',"eye-slash":'<path d="M9.88 9.88a3 3 0 1 0 4.24 4.24"/><path d="M10.73 5.08A10.43 10.43 0 0 1 12 5c7 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68"/><path d="M6.61 6.61A13.526 13.526 0 0 0 2 12s3 7 10 7a9.74 9.74 0 0 0 5.39-1.61"/><line x1="2" x2="22" y1="2" y2="22"/>',eye:'<path d="M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z"/><circle cx="12" cy="12" r="3"/>',filter:'<path d="M3 6h18"/><path d="M7 12h10"/><path d="M10 18h4"/>',first:'<path d="m17 18-6-6 6-6"/><path d="M7 6v12"/>',group:'<path d="M16 12H3"/><path d="M16 18H3"/><path d="M10 6H3"/><path d="M21 18V8a2 2 0 0 0-2-2h-5"/><path d="m16 8-2-2 2-2"/>',last:'<path d="m7 18 6-6-6-6"/><path d="M17 6v12"/>',left:'<path d="m12 19-7-7 7-7"/><path d="M19 12H5"/>',linked:'<path d="M9 17H7A5 5 0 0 1 7 7h2"/><path d="M15 7h2a5 5 0 1 1 0 10h-2"/><line x1="8" x2="16" y1="12" y2="12"/>',loading:'<line x1="12" x2="12" y1="2" y2="6"/><line x1="12" x2="12" y1="18" y2="22"/><line x1="4.93" x2="7.76" y1="4.93" y2="7.76"/><line x1="16.24" x2="19.07" y1="16.24" y2="19.07"/><line x1="2" x2="6" y1="12" y2="12"/><line x1="18" x2="22" y1="12" y2="12"/><line x1="4.93" x2="7.76" y1="19.07" y2="16.24"/><line x1="16.24" x2="19.07" y1="7.76" y2="4.93"/>',maximize:'<polyline points="15 3 21 3 21 9"/><polyline points="9 21 3 21 3 15"/><line x1="21" x2="14" y1="3" y2="10"/><line x1="3" x2="10" y1="21" y2="14"/>',menu:'<line x1="4" x2="20" y1="12" y2="12"/><line x1="4" x2="20" y1="6" y2="6"/><line x1="4" x2="20" y1="18" y2="18"/>',"menu-alt":'<circle cx="12" cy="5" r="0.75" fill="#D9D9D9"/><circle cx="12" cy="12" r="0.75" fill="#D9D9D9"/><circle cx="12" cy="19" r="0.75" fill="#D9D9D9"/>',minimize:'<polyline points="4 14 10 14 10 20"/><polyline points="20 10 14 10 14 4"/><line x1="14" x2="21" y1="10" y2="3"/><line x1="3" x2="10" y1="21" y2="14"/>',minus:'<circle cx="12" cy="12" r="10"/><path d="M8 12h8"/>',next:'<path d="m9 18 6-6-6-6"/>',none:'<path d="m7 15 5 5 5-5"/><path d="m7 9 5-5 5 5"/>',"not-allowed":'<circle cx="12" cy="12" r="10"/><path d="m4.9 4.9 14.2 14.2"/>',paste:'<path d="M15 2H9a1 1 0 0 0-1 1v2c0 .6.4 1 1 1h6c.6 0 1-.4 1-1V3c0-.6-.4-1-1-1Z"/><path d="M8 4H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2M16 4h2a2 2 0 0 1 2 2v2M11 14h10"/><path d="m17 10 4 4-4 4"/>',pin:'<line x1="12" x2="12" y1="17" y2="22"/><path d="M5 17h14v-1.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V6h1a2 2 0 0 0 0-4H8a2 2 0 0 0 0 4h1v4.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24Z"/>',pivot:'<path d="M15 3v18"/><rect width="18" height="18" x="3" y="3" rx="2"/><path d="M21 9H3"/><path d="M21 15H3"/>',plus:'<circle cx="12" cy="12" r="10"/><path d="M8 12h8"/><path d="M12 8v8"/>',previous:'<path d="m15 18-6-6 6-6"/>',right:'<path d="M5 12h14"/><path d="m12 5 7 7-7 7"/>',save:'<path d="M12 17V3"/><path d="m6 11 6 6 6-6"/><path d="M19 21H5"/>',"small-left":'<path d="m15 18-6-6 6-6"/>',"small-right":'<path d="m9 18 6-6-6-6"/>',tick:'<path d="M20 6 9 17l-5-5"/>',"tree-closed":'<path d="m9 18 6-6-6-6"/>',"tree-indeterminate":'<path d="M5 12h14"/>',"tree-open":'<path d="m6 9 6 6 6-6"/>',unlinked:'<path d="M9 17H7A5 5 0 0 1 7 7"/><path d="M15 7h2a5 5 0 0 1 4 8"/><line x1="8" x2="12" y1="12" y2="12"/><line x1="2" x2="22" y1="2" y2="22"/>',up:'<path d="m5 12 7-7 7 7"/><path d="M12 19V5"/>',grip:'<circle cx="5" cy="8" r="0.5"/><circle cx="12" cy="8" r="0.5"/><circle cx="19" cy="8" r="0.5"/><circle cx="5" cy="16" r="0.5"/><circle cx="12" cy="16" r="0.5"/><circle cx="19" cy="16" r="0.5"/><g stroke="none" fill="currentColor"><circle cx="5" cy="8" r="1"/><circle cx="12" cy="8" r="1"/><circle cx="19" cy="8" r="1"/><circle cx="5" cy="16" r="1"/><circle cx="12" cy="16" r="1"/><circle cx="19" cy="16" r="1"/></g>',settings:'<path d="M20 7h-9"/><path d="M14 17H5"/><circle cx="17" cy="17" r="3"/><circle cx="7" cy="7" r="3"/>'},Wu={"small-down":'<svg xmlns="http://www.w3.org/2000/svg" class="ag-icon" fill="black" stroke="none" viewBox="0 0 32 32"><path d="M7.334 10.667 16 21.334l8.667-10.667H7.334Z"/></svg>',"small-up":'<svg xmlns="http://www.w3.org/2000/svg" class="ag-icon" fill="black" stroke="none" viewBox="0 0 32 32"><path d="M7.334 21.333 16 10.666l8.667 10.667H7.334Z"/></svg>'},yS=(e={})=>{let t="";for(const o of[...Object.keys(zu),...Object.keys(Wu)]){const i=bS(o,e.strokeWidth);t+=`.ag-icon-${o}::before { mask-image: url('data:image/svg+xml,${encodeURIComponent(i)}'); }
24
+ `}return t},bS=(e,t=1.5)=>{const o=Wu[e];if(o)return o;const i=zu[e];if(!i)throw new Error(`Missing icon data for ${e}`);return`<svg xmlns="http://www.w3.org/2000/svg" class="ag-icon" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke="black" stroke-width="${t}" viewBox="0 0 24 24"><style>* { vector-effect: non-scaling-stroke; }</style>`+i+"</svg>"},RS=(e={})=>so({feature:"iconSet",css:()=>yS(e)}),FS=RS(),xS=':where(.ag-input-field-input[type=number]:not(.ag-number-field-input-stepper)){-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield;&::-webkit-inner-spin-button,&::-webkit-outer-spin-button{-webkit-appearance:none;appearance:none;margin:0}}:where(input.ag-input-field-input:not([type]),input.ag-input-field-input[type=text],input.ag-input-field-input[type=number],input.ag-input-field-input[type=tel],input.ag-input-field-input[type=date],input.ag-input-field-input[type=datetime-local],textarea.ag-input-field-input){background-color:var(--ag-input-background-color);border:var(--ag-input-border);border-radius:var(--ag-input-border-radius);color:var(--ag-input-text-color);font-family:inherit;font-size:inherit;line-height:inherit;margin:0;min-height:var(--ag-input-height);padding:0;&:where(:disabled){background-color:var(--ag-input-disabled-background-color);border:var(--ag-input-disabled-border);color:var(--ag-input-disabled-text-color)}&:where(:focus){background-color:var(--ag-input-focus-background-color);border:var(--ag-input-focus-border);box-shadow:var(--ag-input-focus-shadow);color:var(--ag-input-focus-text-color);outline:none}&:where(:invalid){background-color:var(--ag-input-invalid-background-color);border:var(--ag-input-invalid-border);color:var(--ag-input-invalid-text-color)}&:where(.invalid){background-color:var(--ag-input-invalid-background-color);border:var(--ag-input-invalid-border);color:var(--ag-input-invalid-text-color)}&::-moz-placeholder{color:var(--ag-input-placeholder-text-color)}&::placeholder{color:var(--ag-input-placeholder-text-color)}}:where(.ag-ltr) :where(input.ag-input-field-input:not([type]),input.ag-input-field-input[type=text],input.ag-input-field-input[type=number],input.ag-input-field-input[type=tel],input.ag-input-field-input[type=date],input.ag-input-field-input[type=datetime-local],textarea.ag-input-field-input){padding-left:var(--ag-input-padding-start)}:where(.ag-rtl) :where(input.ag-input-field-input:not([type]),input.ag-input-field-input[type=text],input.ag-input-field-input[type=number],input.ag-input-field-input[type=tel],input.ag-input-field-input[type=date],input.ag-input-field-input[type=datetime-local],textarea.ag-input-field-input){padding-right:var(--ag-input-padding-start)}:where(.ag-column-select-header-filter-wrapper,.ag-filter-toolpanel-search,.ag-mini-filter,.ag-filter-filter){.ag-input-wrapper:before{background-color:currentcolor;color:var(--ag-input-icon-color);content:"";display:block;height:12px;-webkit-mask-image:url("data:image/svg+xml;charset=utf-8;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMiIgaGVpZ2h0PSIxMiIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMDAwIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIHN0cm9rZS13aWR0aD0iMS41Ij48cGF0aCBkPSJNNS4zIDlhMy43IDMuNyAwIDEgMCAwLTcuNSAzLjcgMy43IDAgMCAwIDAgNy41Wk0xMC41IDEwLjUgOC4zIDguMiIvPjwvc3ZnPg==");mask-image:url("data:image/svg+xml;charset=utf-8;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMiIgaGVpZ2h0PSIxMiIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMDAwIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIHN0cm9rZS13aWR0aD0iMS41Ij48cGF0aCBkPSJNNS4zIDlhMy43IDMuNyAwIDEgMCAwLTcuNSAzLjcgMy43IDAgMCAwIDAgNy41Wk0xMC41IDEwLjUgOC4zIDguMiIvPjwvc3ZnPg==");-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;opacity:.5;position:absolute;width:12px}}:where(.ag-ltr) :where(.ag-column-select-header-filter-wrapper,.ag-filter-toolpanel-search,.ag-mini-filter,.ag-filter-filter){.ag-input-wrapper:before{margin-left:var(--ag-spacing)}.ag-number-field-input,.ag-text-field-input{padding-left:calc(var(--ag-spacing)*1.5 + 12px)}}:where(.ag-rtl) :where(.ag-column-select-header-filter-wrapper,.ag-filter-toolpanel-search,.ag-mini-filter,.ag-filter-filter){.ag-input-wrapper:before{margin-right:var(--ag-spacing)}.ag-number-field-input,.ag-text-field-input{padding-right:calc(var(--ag-spacing)*1.5 + 12px)}}',DS=":where(input.ag-input-field-input:not([type]),input.ag-input-field-input[type=text],input.ag-input-field-input[type=number],input.ag-input-field-input[type=tel],input.ag-input-field-input[type=date],input.ag-input-field-input[type=datetime-local],textarea.ag-input-field-input){&:focus{box-shadow:var(--ag-focus-shadow)}}",MS={inputBackgroundColor:"transparent",inputBorder:!1,inputBorderRadius:0,inputTextColor:{ref:"textColor"},inputPlaceholderTextColor:{ref:"inputTextColor",mix:.5},inputPaddingStart:0,inputHeight:{calc:"max(iconSize, fontSize) + spacing * 2"},inputFocusBackgroundColor:{ref:"inputBackgroundColor"},inputFocusBorder:{ref:"inputBorder"},inputFocusShadow:"none",inputFocusTextColor:{ref:"inputTextColor"},inputDisabledBackgroundColor:{ref:"inputBackgroundColor"},inputDisabledBorder:{ref:"inputBorder"},inputDisabledTextColor:{ref:"inputTextColor"},inputInvalidBackgroundColor:{ref:"inputBackgroundColor"},inputInvalidBorder:{ref:"inputBorder"},inputInvalidTextColor:{ref:"inputTextColor"},inputIconColor:{ref:"inputTextColor"},pickerButtonBorder:!1,pickerButtonFocusBorder:{ref:"inputFocusBorder"},pickerButtonBackgroundColor:{ref:"backgroundColor"},pickerButtonFocusBackgroundColor:{ref:"backgroundColor"},pickerListBorder:!1,pickerListBackgroundColor:{ref:"backgroundColor"}},PS=()=>so({feature:"inputStyle",params:{...MS,inputBackgroundColor:dt,inputBorder:!0,inputBorderRadius:{ref:"borderRadius"},inputPaddingStart:{ref:"spacing"},inputFocusBorder:{color:mo},inputFocusShadow:{ref:"focusShadow"},inputDisabledBackgroundColor:Pt(.06),inputDisabledTextColor:{ref:"textColor",mix:.5},inputInvalidBorder:{color:{ref:"invalidColor"}},pickerButtonBorder:!0,pickerListBorder:!0},css:()=>xS+DS}),ES=PS(),AS='.ag-tabs-header{background-color:var(--ag-tab-bar-background-color);border-bottom:var(--ag-tab-bar-border);display:flex;flex:1;gap:var(--ag-tab-spacing);padding:var(--ag-tab-bar-top-padding) var(--ag-tab-bar-horizontal-padding) 0}.ag-tabs-header-wrapper{display:flex}.ag-tabs-close-button-wrapper{align-items:center;border:0;display:flex;padding:var(--ag-spacing)}:where(.ag-ltr) .ag-tabs-close-button-wrapper{border-right:1px solid var(--ag-border-color)}:where(.ag-rtl) .ag-tabs-close-button-wrapper{border-left:1px solid var(--ag-border-color)}.ag-tabs-close-button{background-color:unset;border:0;cursor:pointer;padding:0}.ag-tab{align-items:center;background-color:var(--ag-tab-background-color);border-left:var(--ag-tab-selected-border-width) solid transparent;border-right:var(--ag-tab-selected-border-width) solid transparent;color:var(--ag-tab-text-color);cursor:pointer;display:flex;flex:1;justify-content:center;padding:var(--ag-tab-top-padding) var(--ag-tab-horizontal-padding) var(--ag-tab-bottom-padding);position:relative;&:hover{background-color:var(--ag-tab-hover-background-color);color:var(--ag-tab-hover-text-color)}&.ag-tab-selected{background-color:var(--ag-tab-selected-background-color);color:var(--ag-tab-selected-text-color)}&:after{background-color:var(--ag-tab-selected-underline-color);bottom:0;content:"";display:block;height:var(--ag-tab-selected-underline-width);left:0;opacity:0;position:absolute;right:0;transition:opacity var(--ag-tab-selected-underline-transition-duration)}&.ag-tab-selected:after{opacity:1}}:where(.ag-ltr) .ag-tab{&.ag-tab-selected{&:where(:not(:first-of-type)){border-left-color:var(--ag-tab-selected-border-color)}&:where(:not(:last-of-type)){border-right-color:var(--ag-tab-selected-border-color)}}}:where(.ag-rtl) .ag-tab{&.ag-tab-selected{&:where(:not(:first-of-type)){border-right-color:var(--ag-tab-selected-border-color)}&:where(:not(:last-of-type)){border-left-color:var(--ag-tab-selected-border-color)}}}',TS={tabBarBackgroundColor:"transparent",tabBarHorizontalPadding:0,tabBarTopPadding:0,tabBackgroundColor:"transparent",tabTextColor:{ref:"textColor"},tabHorizontalPadding:{ref:"spacing"},tabTopPadding:{ref:"spacing"},tabBottomPadding:{ref:"spacing"},tabSpacing:"0",tabHoverBackgroundColor:{ref:"tabBackgroundColor"},tabHoverTextColor:{ref:"tabTextColor"},tabSelectedBackgroundColor:{ref:"tabBackgroundColor"},tabSelectedTextColor:{ref:"tabTextColor"},tabSelectedBorderWidth:1,tabSelectedBorderColor:"transparent",tabSelectedUnderlineColor:"transparent",tabSelectedUnderlineWidth:0,tabSelectedUnderlineTransitionDuration:0,tabBarBorder:!1},IS=()=>so({feature:"tabStyle",params:{...TS,tabBarBorder:!0,tabBarBackgroundColor:mt(.05),tabTextColor:{ref:"textColor",mix:.7},tabSelectedTextColor:{ref:"textColor"},tabHoverTextColor:{ref:"textColor"},tabSelectedBorderColor:{ref:"borderColor"},tabSelectedBackgroundColor:dt},css:AS}),LS=IS(),kS=()=>dS().withPart(CS).withPart(SS).withPart(FS).withPart(LS).withPart(ES).withPart(Gu).withParams({fontFamily:[{googleFont:"IBM Plex Sans"},"-apple-system","BlinkMacSystemFont","Segoe UI","Roboto","Oxygen-Sans","Ubuntu"]}),Ha=kS(),GS={cssName:"--ag-cell-horizontal-padding",changeKey:"cellHorizontalPaddingChanged",defaultValue:16},OS={cssName:"--ag-indentation-level",changeKey:"indentationLevelChanged",defaultValue:0,noWarn:!0,cacheDefault:!0},BS={cssName:"--ag-row-group-indent-size",changeKey:"rowGroupIndentSizeChanged",defaultValue:0},Nl={cssName:"--ag-row-height",changeKey:"rowHeightChanged",defaultValue:42},Hl={cssName:"--ag-header-height",changeKey:"headerHeightChanged",defaultValue:48},Vl={cssName:"--ag-list-item-height",changeKey:"listItemHeightChanged",defaultValue:24},lr={cssName:"--ag-row-border",changeKey:"rowBorderWidthChanged",defaultValue:1,border:!0},NS=0,HS=class extends M{constructor(){super(...arguments),this.beanName="environment",this.sizeEls=new Map,this.lastKnownValues=new Map,this.sizesMeasured=!1,this.paramsClass=`ag-theme-params-${++NS}`,this.globalCSS=[]}wireBeans(e){const{eGridDiv:t,gridOptions:o}=e;this.eGridDiv=t,this.eStyleContainer=o.themeStyleContainer??(t.getRootNode()===document?document.head:t),this.cssLayer=o.themeCssLayer,this.styleNonce=o.styleNonce}postConstruct(){this.addManagedPropertyListener("theme",()=>this.handleThemeGridOptionChange()),this.handleThemeGridOptionChange(),this.addManagedPropertyListener("rowHeight",()=>this.refreshRowHeightVariable()),this.getSizeEl(Nl),this.getSizeEl(Hl),this.getSizeEl(Vl),this.getSizeEl(lr),this.refreshRowBorderWidthVariable(),this.addDestroyFunc(()=>Vw(this)),this.mutationObserver=new MutationObserver(()=>{this.fireGridStylesChangedEvent("themeChanged")}),this.addDestroyFunc(()=>this.mutationObserver.disconnect())}getDefaultRowHeight(){return this.getCSSVariablePixelValue(Nl)}getDefaultHeaderHeight(){return this.getCSSVariablePixelValue(Hl)}getDefaultCellHorizontalPadding(){return this.getCSSVariablePixelValue(GS)}getDefaultIndentation(){return this.getCSSVariablePixelValue(OS)}getDefaultRowGroupIndentSize(){return this.getCSSVariablePixelValue(BS)}getCellPaddingLeft(){const e=this.getDefaultCellHorizontalPadding(),t=this.getDefaultIndentation(),o=this.getDefaultRowGroupIndentSize();return e-1+o*t}getCellPaddingRight(){return this.getDefaultCellHorizontalPadding()-1}getCellPadding(){return this.getCellPaddingLeft()+this.getCellPaddingRight()}getDefaultColumnMinWidth(){return Math.min(36,this.getDefaultRowHeight())}getDefaultListItemHeight(){return this.getCSSVariablePixelValue(Vl)}getRowBorderWidth(){return this.getCSSVariablePixelValue(lr)}applyThemeClasses(e){const{gridTheme:t}=this;let o="";if(t)o=`${this.paramsClass} ${t._getCssClass()}`;else{this.mutationObserver.disconnect();let i=this.eGridDiv;for(;i;){let s=!1;for(const n of Array.from(i.classList))n.startsWith("ag-theme-")&&(s=!0,o=o?`${o} ${n}`:n);s&&this.mutationObserver.observe(i,{attributes:!0,attributeFilter:["class"]}),i=i.parentElement}}for(const i of Array.from(e.classList))i.startsWith("ag-theme-")&&e.classList.remove(i);if(o){const i=e.className;e.className=i+(i?" ":"")+o}}refreshRowHeightVariable(){const{eGridDiv:e}=this,t=e.style.getPropertyValue("--ag-line-height").trim(),o=this.gos.get("rowHeight");if(o==null||isNaN(o)||!isFinite(o))return t!==null&&e.style.setProperty("--ag-line-height",null),-1;const i=`${o}px`;return t!=i?(e.style.setProperty("--ag-line-height",i),o):t!=""?parseFloat(t):-1}addGlobalCSS(e,t){this.gridTheme?Ci(e,this.eStyleContainer,t,this.cssLayer,0,this.styleNonce):this.globalCSS.push([e,t])}getCSSVariablePixelValue(e){const t=this.lastKnownValues.get(e);if(t!=null)return t;const o=this.measureSizeEl(e);return o==="detached"||o==="no-styles"?(e.cacheDefault&&this.lastKnownValues.set(e,e.defaultValue),e.defaultValue):(this.lastKnownValues.set(e,o),o)}measureSizeEl(e){const t=this.getSizeEl(e);if(t.offsetParent==null)return"detached";const o=t.offsetWidth;return o===dr?"no-styles":(this.sizesMeasured=!0,o)}getMeasurementContainer(){let e=this.eMeasurementContainer;return e||(e=this.eMeasurementContainer=Pe({tag:"div",cls:"ag-measurement-container"}),this.eGridDiv.appendChild(e)),e}getSizeEl(e){let t=this.sizeEls.get(e);if(t)return t;const o=this.getMeasurementContainer();t=Pe({tag:"div"});const{border:i,noWarn:s}=e;i?(t.className="ag-measurement-element-border",t.style.setProperty("--ag-internal-measurement-border",`var(${e.cssName}, solid ${dr}px)`)):t.style.width=`var(${e.cssName}, ${dr}px)`,o.appendChild(t),this.sizeEls.set(e,t);let n=this.measureSizeEl(e);n==="no-styles"&&!s&&_(9,{variable:e});const r=bo(this.beans,t,()=>{const a=this.measureSizeEl(e);a==="detached"||a==="no-styles"||(this.lastKnownValues.set(e,a),a!==n&&(n=a,this.fireGridStylesChangedEvent(e.changeKey)))});return this.addDestroyFunc(()=>r()),t}fireGridStylesChangedEvent(e){e==="rowBorderWidthChanged"&&this.refreshRowBorderWidthVariable(),this.eventSvc.dispatchEvent({type:"gridStylesChanged",[e]:!0})}refreshRowBorderWidthVariable(){const e=this.getCSSVariablePixelValue(lr);this.eGridDiv.style.setProperty("--ag-internal-row-border-width",`${e}px`)}handleThemeGridOptionChange(){const{gos:e,eGridDiv:t,globalCSS:o,gridTheme:i}=this,s=e.get("theme");let n;if(s==="legacy")n=void 0;else{const r=s??Ha;r instanceof Hu?n=r:ae(240,{theme:r})}if(n!==i){if(n){Hw(this),Iu(this.eStyleContainer,this.cssLayer,this.styleNonce);for(const[a,l]of o)Ci(a,this.eStyleContainer,l,this.cssLayer,0,this.styleNonce);o.length=0}this.gridTheme=n,n?._startUse({loadThemeGoogleFonts:e.get("loadThemeGoogleFonts"),styleContainer:this.eStyleContainer,cssLayer:this.cssLayer,nonce:this.styleNonce});let r=this.eParamsStyle;if(!r){r=this.eParamsStyle=Pe({tag:"style"});const a=this.gos.get("styleNonce");a&&r.setAttribute("nonce",a),t.appendChild(r)}Ba||(r.textContent=n?._getPerGridCss(this.paramsClass)||""),this.applyThemeClasses(t),this.fireGridStylesChangedEvent("themeChanged")}n&&getComputedStyle(this.getMeasurementContainer()).getPropertyValue("--ag-legacy-styles-loaded")&&ae(s?106:239)}},dr=15538,VS=class extends M{constructor(){super(...arguments),this.beanName="eventSvc",this.globalEventService=new eo}postConstruct(){const{globalListener:e,globalSyncListener:t}=this.beans;e&&this.addGlobalListener(e,!0),t&&this.addGlobalListener(t,!1)}addEventListener(e,t,o){this.globalEventService.addEventListener(e,t,o)}removeEventListener(e,t,o){this.globalEventService.removeEventListener(e,t,o)}addGlobalListener(e,t=!1){this.globalEventService.addGlobalListener(e,t)}removeGlobalListener(e,t=!1){this.globalEventService.removeGlobalListener(e,t)}dispatchLocalEvent(){}dispatchEvent(e){this.globalEventService.dispatchEvent(Z(this.gos,e))}dispatchEventOnce(e){this.globalEventService.dispatchEventOnce(Z(this.gos,e))}};function Uu(e){return e?e.getLeafColumns().some(t=>t.isSpanHeaderHeight()):!1}function qr(e,t){let o;if(Ie(e)&&Uu(e)&&e.isPadding()){const i=e;o=i.getLeafColumns()[0];let s=o;for(;s!==i;)t++,s=s.getParent()}return{column:o||e,headerRowIndex:t}}var _S=class extends M{constructor(){super(...arguments),this.beanName="headerNavigation",this.currentHeaderRowWithoutSpan=-1}postConstruct(){const e=this.beans;e.ctrlsSvc.whenReady(this,o=>{this.gridBodyCon=o.gridBodyCtrl});const t=Le(e);this.addManagedElementListeners(t,{mousedown:()=>{this.currentHeaderRowWithoutSpan=-1}})}getHeaderPositionForColumn(e,t){let o;const{colModel:i,colGroupSvc:s,ctrlsSvc:n}=this.beans;if(typeof e=="string"?(o=i.getCol(e),o||(o=s?.getColumnGroup(e)??null)):o=e,!o)return null;const a=n.getHeaderRowContainerCtrl()?.getAllCtrls(),l=ve(a||[]).type==="filter",d=Vt(this.beans)-1;let c=-1,u=o;for(;u;)c++,u=u.getParent();let p=c;return t&&l&&p===d-1&&p++,p===-1?null:{headerRowIndex:p,column:o}}navigateVertically(e,t,o){const i=this.beans.focusSvc;if(t||(t=i.focusedHeader),!t)return!1;const{headerRowIndex:s}=t,n=t.column,r=Vt(this.beans),a=e==="UP",l=this.getHeaderRowType(s);let{headerRowIndex:d,column:c,headerRowIndexWithoutSpan:u}=a?zS(l,n,s):WS(l,n,s),p=!1;return d<0&&(d=0,c=n,p=!0),d>=r?(d=-1,this.currentHeaderRowWithoutSpan=-1):u!==void 0&&(this.currentHeaderRowWithoutSpan=u),!p&&!c?!1:i.focusHeaderPosition({headerPosition:{headerRowIndex:d,column:c},allowUserOverride:!0,event:o})}navigateHorizontally(e,t=!1,o){const{focusSvc:i,gos:s}=this.beans,n=i.focusedHeader;let r,a;this.currentHeaderRowWithoutSpan!==-1?n.headerRowIndex=this.currentHeaderRowWithoutSpan:this.currentHeaderRowWithoutSpan=n.headerRowIndex,e==="LEFT"!==s.get("enableRtl")?(a="Before",r=this.findHeader(n,a)):(a="After",r=this.findHeader(n,a));const l=s.getCallback("tabToNextHeader");if(t&&l){const d=i.focusHeaderPositionFromUserFunc({userFunc:l,headerPosition:r,direction:a});if(d){const{headerRowIndex:c}=i.focusedHeader||{};c!=null&&c!=n.headerRowIndex&&(this.currentHeaderRowWithoutSpan=c)}return d}return r||!t?i.focusHeaderPosition({headerPosition:r,direction:a,fromTab:t,allowUserOverride:!0,event:o}):this.focusNextHeaderRow(n,a,o)}focusNextHeaderRow(e,t,o){const i=e.headerRowIndex;let s=null,n;const r=this.beans;if(t==="Before"?i>0&&(n=i-1,this.currentHeaderRowWithoutSpan-=1,s=this.findColAtEdgeForHeaderRow(n,"end")):(n=i+1,this.currentHeaderRowWithoutSpan<Vt(r)?this.currentHeaderRowWithoutSpan+=1:this.currentHeaderRowWithoutSpan=-1,s=this.findColAtEdgeForHeaderRow(n,"start")),!s)return!1;const{column:a,headerRowIndex:l}=qr(s.column,s?.headerRowIndex);return r.focusSvc.focusHeaderPosition({headerPosition:{column:a,headerRowIndex:l},direction:t,fromTab:!0,allowUserOverride:!0,event:o})}scrollToColumn(e,t="After"){if(e.getPinned())return;let o;if(Ie(e)){const i=e.getDisplayedLeafColumns();o=t==="Before"?ve(i):i[0]}else o=e;this.gridBodyCon.scrollFeature.ensureColumnVisible(o)}findHeader(e,t){let o,i;const{colGroupSvc:s,visibleCols:n}=this.beans;if(Ie(e.column)?o=s?.getGroupAtDirection(e.column,t)??void 0:(i=`getCol${t}`,o=n[i](e.column)),!o)return;const{headerRowIndex:r}=e;if(this.getHeaderRowType(r)!=="filter"){const d=[o];for(;o.getParent();)o=o.getParent(),d.push(o);o=d[Math.max(0,d.length-1-r)]}const{column:a,headerRowIndex:l}=qr(o,r);return{column:a,headerRowIndex:l}}getHeaderRowType(e){const t=this.beans.ctrlsSvc.getHeaderRowContainerCtrl();if(t)return t.getRowType(e)}findColAtEdgeForHeaderRow(e,t){const{visibleCols:o,ctrlsSvc:i,colGroupSvc:s}=this.beans,n=o.allCols,r=n[t==="start"?0:n.length-1];if(!r)return;const l=i.getHeaderRowContainerCtrl(r.getPinned())?.getRowType(e);if(l=="group"){const d=s?.getColGroupAtLevel(r,e);return{headerRowIndex:e,column:d}}return{headerRowIndex:l==null?-1:e,column:r}}};function zS(e,t,o){const i=e==="filter",s=e==="column";let n=i?t:t.getParent(),r=o-1,a=r;if(s&&Uu(t.getParent())){for(;n&&n.isPadding();)n=n.getParent(),r--;a=r,r<0&&(n=t,r=o,a=void 0)}return{column:n,headerRowIndex:r,headerRowIndexWithoutSpan:a}}function WS(e,t,o,i="After"){let s=t,n=o+1;const r=n;if(e==="group"){const a=t.getDisplayedLeafColumns(),l=i==="After"?a[0]:ve(a),d=[];let c=l;for(;c.getParent()!==t;)c=c.getParent(),d.push(c);if(s=l,l.isSpanHeaderHeight())for(let u=d.length-1;u>=0;u--){const p=d[u];if(!p.isPadding()){s=p;break}n++}else s=ve(d),s||(s=l)}return{column:s,headerRowIndex:n,headerRowIndexWithoutSpan:r}}var US=class extends M{constructor(){super(...arguments),this.beanName="focusSvc",this.focusFallbackTimeout=null,this.needsFocusRestored=!1}wireBeans(e){this.colModel=e.colModel,this.visibleCols=e.visibleCols,this.rowRenderer=e.rowRenderer,this.navigation=e.navigation,this.filterManager=e.filterManager,this.overlays=e.overlays}postConstruct(){const e=this.clearFocusedCell.bind(this);this.addManagedEventListeners({columnPivotModeChanged:e,newColumnsLoaded:this.onColumnEverythingChanged.bind(this),columnGroupOpened:e,columnRowGroupChanged:e}),this.addDestroyFunc(Rf(this.beans))}attemptToRecoverFocus(){this.needsFocusRestored=!0,this.focusFallbackTimeout!=null&&clearTimeout(this.focusFallbackTimeout),this.focusFallbackTimeout=window.setTimeout(this.setFocusRecovered.bind(this),100)}setFocusRecovered(){this.needsFocusRestored=!1,this.focusFallbackTimeout!=null&&(clearTimeout(this.focusFallbackTimeout),this.focusFallbackTimeout=null)}shouldTakeFocus(){return this.gos.get("suppressFocusAfterRefresh")?(this.setFocusRecovered(),!1):this.needsFocusRestored?(this.setFocusRecovered(),!0):this.doesRowOrCellHaveBrowserFocus()}onColumnEverythingChanged(){if(!this.focusedCell)return;const e=this.focusedCell.column,t=this.colModel.getCol(e.getId());e!==t&&this.clearFocusedCell()}getFocusCellToUseAfterRefresh(){const{gos:e,focusedCell:t}=this;return e.get("suppressFocusAfterRefresh")||e.get("suppressCellFocus")||!t||!this.doesRowOrCellHaveBrowserFocus()?null:t}getFocusHeaderToUseAfterRefresh(){return this.gos.get("suppressFocusAfterRefresh")||!this.focusedHeader||!this.isDomDataPresentInHierarchy(Ee(this.beans),Cu)?null:this.focusedHeader}doesRowOrCellHaveBrowserFocus(){const e=Ee(this.beans);return this.isDomDataPresentInHierarchy(e,gn)?!0:this.isDomDataPresentInHierarchy(e,Cn)}isDomDataPresentInHierarchy(e,t){let o=e;for(;o;){if(uc(this.gos,o,t))return!0;o=o.parentNode}return!1}getFocusedCell(){return this.focusedCell}getFocusEventParams(e){const{rowIndex:t,rowPinned:o,column:i}=e,s={rowIndex:t,rowPinned:o,column:i,isFullWidthCell:!1},n=this.rowRenderer.getRowByPosition({rowIndex:t,rowPinned:o});return n&&(s.isFullWidthCell=n.isFullWidth()),s}clearFocusedCell(){if(this.focusedCell==null)return;const e=this.getFocusEventParams(this.focusedCell);this.focusedCell=null,this.eventSvc.dispatchEvent({type:"cellFocusCleared",...e})}setFocusedCell(e){this.setFocusRecovered();const{column:t,rowIndex:o,rowPinned:i,forceBrowserFocus:s=!1,preventScrollOnBrowserFocus:n=!1}=e,r=this.colModel.getCol(t);if(!r){this.focusedCell=null;return}this.focusedCell={rowIndex:o,rowPinned:ot(i),column:r},this.eventSvc.dispatchEvent({type:"cellFocused",...this.getFocusEventParams(this.focusedCell),forceBrowserFocus:s,preventScrollOnBrowserFocus:n})}isCellFocused(e){return this.focusedCell==null?!1:Wf(e,this.focusedCell)}isHeaderWrapperFocused(e){if(this.focusedHeader==null)return!1;const{column:t,rowCtrl:{rowIndex:o,pinned:i}}=e,{column:s,headerRowIndex:n}=this.focusedHeader;return t===s&&o===n&&i==s.getPinned()}focusHeaderPosition(e){if(this.setFocusRecovered(),Vo(this.beans))return!1;const{direction:t,fromTab:o,allowUserOverride:i,event:s,fromCell:n,rowWithoutSpanValue:r}=e;let{headerPosition:a}=e;if(n&&this.filterManager?.isAdvFilterHeaderActive())return this.focusAdvancedFilter(a);if(i){const l=this.focusedHeader,d=Vt(this.beans);if(o){const c=this.gos.getCallback("tabToNextHeader");c&&(a=this.getHeaderPositionFromUserFunc({userFunc:c,direction:t,currentPosition:l,headerPosition:a,headerRowCount:d}))}else{const c=this.gos.getCallback("navigateToNextHeader");if(c&&s){const u={key:s.key,previousHeaderPosition:l,nextHeaderPosition:a,headerRowCount:d,event:s};a=c(u)}}}return a?this.focusProvidedHeaderPosition({headerPosition:a,direction:t,event:s,fromCell:n,rowWithoutSpanValue:r}):!1}focusHeaderPositionFromUserFunc(e){if(Vo(this.beans))return!1;const{userFunc:t,headerPosition:o,direction:i,event:s}=e,n=this.focusedHeader,r=Vt(this.beans),a=this.getHeaderPositionFromUserFunc({userFunc:t,direction:i,currentPosition:n,headerPosition:o,headerRowCount:r});return!!a&&this.focusProvidedHeaderPosition({headerPosition:a,direction:i,event:s})}getHeaderPositionFromUserFunc(e){const{userFunc:t,direction:o,currentPosition:i,headerPosition:s,headerRowCount:n}=e,a=t({backwards:o==="Before",previousHeaderPosition:i,nextHeaderPosition:s,headerRowCount:n});return a===!0?i:a===!1?null:a}focusProvidedHeaderPosition(e){const{headerPosition:t,direction:o,fromCell:i,rowWithoutSpanValue:s,event:n}=e,{column:r,headerRowIndex:a}=t,{filterManager:l,ctrlsSvc:d,headerNavigation:c}=this.beans;if(a===-1)return l?.isAdvFilterHeaderActive()?this.focusAdvancedFilter(t):this.focusGridView({column:r,event:n});c?.scrollToColumn(r,o);const p=d.getHeaderRowContainerCtrl(r.getPinned())?.focusHeader(t.headerRowIndex,r,n)||!1;return c&&p&&(s!=null||i)&&(c.currentHeaderRowWithoutSpan=s??-1),p}focusFirstHeader(){if(this.overlays?.isExclusive()&&this.focusOverlay())return!0;let e=this.visibleCols.allCols[0];if(!e)return!1;const{colGroupSvc:t}=this.beans;t&&e.getParent()&&(e=t.getColGroupAtLevel(e,0));const o=qr(e,0);return this.focusHeaderPosition({headerPosition:o,rowWithoutSpanValue:0})}focusLastHeader(e){if(this.overlays?.isExclusive()&&this.focusOverlay(!0))return!0;const t=Vt(this.beans)-1,o=ve(this.visibleCols.allCols);return this.focusHeaderPosition({headerPosition:{headerRowIndex:t,column:o},rowWithoutSpanValue:-1,event:e})}focusPreviousFromFirstCell(e){return this.filterManager?.isAdvFilterHeaderActive()?this.focusAdvancedFilter(null):this.focusLastHeader(e)}isAnyCellFocused(){return!!this.focusedCell}isRowFocused(e,t){return this.focusedCell==null?!1:this.focusedCell.rowIndex===e&&this.focusedCell.rowPinned===ot(t)}focusOverlay(e){const t=this.overlays?.isVisible()&&this.overlays.eWrapper?.getGui();return!!t&&It(t,e)}focusGridView(e){const{backwards:t=!1,canFocusOverlay:o=!0,event:i}=e;if(this.overlays?.isExclusive())return o&&this.focusOverlay(t);if(xa(this.beans))return t&&!Vo(this.beans)?this.focusLastHeader():o&&this.focusOverlay(t)?!0:t?!1:$o(this.beans,t);const s=t?jf(this.beans):$f(this.beans);if(s){const n=e.column??this.focusedHeader?.column,{rowIndex:r,rowPinned:a}=s,l=Da(this.beans,s);if(!n||!l||r==null)return!1;if(n.isSuppressNavigable(l)){const d=this.gos.get("enableRtl");let c;return!i||i.key===D.TAB?c=d?D.LEFT:D.RIGHT:c=i.key,this.beans.navigation?.navigateToNextCell(null,c,{rowIndex:r,column:n,rowPinned:a||null},!0),!0}return this.navigation?.ensureCellVisible({rowIndex:r,column:n,rowPinned:a}),t&&this.rowRenderer.getRowByPosition(s)?.isFullWidth()&&this.navigation?.tryToFocusFullWidthRow(s,t)||(this.setFocusedCell({rowIndex:r,column:n,rowPinned:ot(a),forceBrowserFocus:!0}),this.beans.rangeSvc?.setRangeToCell({rowIndex:r,rowPinned:a,column:n})),!0}return!!(o&&this.focusOverlay(t)||t&&this.focusLastHeader())}focusAdvancedFilter(e){return this.advFilterFocusColumn=e?.column,this.beans.advancedFilter?.getCtrl().focusHeaderComp()??!1}focusNextFromAdvancedFilter(e,t){const o=(t?void 0:this.advFilterFocusColumn)??this.visibleCols.allCols?.[0];return e?this.focusHeaderPosition({headerPosition:{column:o,headerRowIndex:Vt(this.beans)-1}}):this.focusGridView({column:o})}clearAdvancedFilterColumn(){this.advFilterFocusColumn=void 0}},$S=class extends M{constructor(){super(...arguments),this.beanName="scrollVisibleSvc"}wireBeans(e){this.ctrlsSvc=e.ctrlsSvc,this.colAnimation=e.colAnimation}postConstruct(){this.getScrollbarWidth(),this.addManagedEventListeners({displayedColumnsChanged:this.updateScrollVisible.bind(this),displayedColumnsWidthChanged:this.updateScrollVisible.bind(this)})}updateScrollVisible(){const{colAnimation:e}=this;e?.isActive()?e.executeLaterVMTurn(()=>{e.executeLaterVMTurn(()=>this.updateScrollVisibleImpl())}):this.updateScrollVisibleImpl()}updateScrollVisibleImpl(){const e=this.ctrlsSvc.get("center");if(!e||this.colAnimation?.isActive())return;const t={horizontalScrollShowing:e.isHorizontalScrollShowing(),verticalScrollShowing:this.verticalScrollShowing};this.setScrollsVisible(t),this.updateScrollGap()}updateScrollGap(){const e=this.ctrlsSvc.get("center"),t=e.hasHorizontalScrollGap(),o=e.hasVerticalScrollGap();(this.horizontalScrollGap!==t||this.verticalScrollGap!==o)&&(this.horizontalScrollGap=t,this.verticalScrollGap=o,this.eventSvc.dispatchEvent({type:"scrollGapChanged"}))}setScrollsVisible(e){(this.horizontalScrollShowing!==e.horizontalScrollShowing||this.verticalScrollShowing!==e.verticalScrollShowing)&&(this.horizontalScrollShowing=e.horizontalScrollShowing,this.verticalScrollShowing=e.verticalScrollShowing,this.eventSvc.dispatchEvent({type:"scrollVisibilityChanged"}))}getScrollbarWidth(){if(this.scrollbarWidth==null){const e=this.gos.get("scrollbarWidth"),o=typeof e=="number"&&e>=0?e:Fp();o!=null&&(this.scrollbarWidth=o,this.eventSvc.dispatchEvent({type:"scrollbarWidthChanged"}))}return this.scrollbarWidth}},jS=class extends M{constructor(){super(...arguments),this.beanName="gridDestroySvc",this.destroyCalled=!1}destroy(){if(this.destroyCalled)return;const{stateSvc:e,ctrlsSvc:t,context:o}=this.beans;this.eventSvc.dispatchEvent({type:"gridPreDestroyed",state:e?.getState()??{}}),this.destroyCalled=!0,t.get("gridCtrl")?.destroyGridUi(),o.destroy(),super.destroy()}},zi=new Set(["gridPreDestroyed","fillStart","pasteStart"]),KS={suppressContextMenu:!1,preventDefaultOnContextMenu:!1,allowContextMenuWithControlKey:!1,suppressMenuHide:!0,enableBrowserTooltips:!1,tooltipTrigger:"hover",tooltipShowDelay:2e3,tooltipHideDelay:1e4,tooltipMouseTrack:!1,tooltipShowMode:"standard",tooltipInteraction:!1,copyHeadersToClipboard:!1,copyGroupHeadersToClipboard:!1,clipboardDelimiter:" ",suppressCopyRowsToClipboard:!1,suppressCopySingleCellRanges:!1,suppressLastEmptyLineOnPaste:!1,suppressClipboardPaste:!1,suppressClipboardApi:!1,suppressCutToClipboard:!1,maintainColumnOrder:!1,enableStrictPivotColumnOrder:!1,suppressFieldDotNotation:!1,allowDragFromColumnsToolPanel:!1,suppressMovableColumns:!1,suppressColumnMoveAnimation:!1,suppressMoveWhenColumnDragging:!1,suppressDragLeaveHidesColumns:!1,suppressRowGroupHidesColumns:!1,suppressAutoSize:!1,autoSizePadding:20,skipHeaderOnAutoSize:!1,singleClickEdit:!1,suppressClickEdit:!1,readOnlyEdit:!1,stopEditingWhenCellsLoseFocus:!1,enterNavigatesVertically:!1,enterNavigatesVerticallyAfterEdit:!1,enableCellEditingOnBackspace:!1,undoRedoCellEditing:!1,undoRedoCellEditingLimit:10,suppressCsvExport:!1,suppressExcelExport:!1,cacheQuickFilter:!1,includeHiddenColumnsInQuickFilter:!1,excludeChildrenWhenTreeDataFiltering:!1,enableAdvancedFilter:!1,includeHiddenColumnsInAdvancedFilter:!1,enableCharts:!1,masterDetail:!1,keepDetailRows:!1,keepDetailRowsCount:10,detailRowAutoHeight:!1,tabIndex:0,rowBuffer:10,valueCache:!1,valueCacheNeverExpires:!1,enableCellExpressions:!1,suppressTouch:!1,suppressFocusAfterRefresh:!1,suppressBrowserResizeObserver:!1,suppressPropertyNamesCheck:!1,suppressChangeDetection:!1,debug:!1,suppressLoadingOverlay:!1,suppressNoRowsOverlay:!1,pagination:!1,paginationPageSize:100,paginationPageSizeSelector:!0,paginationAutoPageSize:!1,paginateChildRows:!1,suppressPaginationPanel:!1,pivotMode:!1,pivotPanelShow:"never",pivotDefaultExpanded:0,pivotSuppressAutoColumn:!1,suppressExpandablePivotGroups:!1,functionsReadOnly:!1,suppressAggFuncInHeader:!1,alwaysAggregateAtRootLevel:!1,aggregateOnlyChangedColumns:!1,suppressAggFilteredOnly:!1,removePivotHeaderRowWhenSingleValueColumn:!1,animateRows:!0,cellFlashDuration:500,cellFadeDuration:1e3,allowShowChangeAfterFilter:!1,domLayout:"normal",ensureDomOrder:!1,enableRtl:!1,suppressColumnVirtualisation:!1,suppressMaxRenderedRowRestriction:!1,suppressRowVirtualisation:!1,rowDragManaged:!1,suppressRowDrag:!1,suppressMoveWhenRowDragging:!1,rowDragEntireRow:!1,rowDragMultiRow:!1,embedFullWidthRows:!1,groupDisplayType:"singleColumn",groupDefaultExpanded:0,groupMaintainOrder:!1,groupSelectsChildren:!1,groupSuppressBlankHeader:!1,groupSelectsFiltered:!1,showOpenedGroup:!1,groupRemoveSingleChildren:!1,groupRemoveLowestSingleChildren:!1,groupHideOpenParents:!1,groupAllowUnbalanced:!1,rowGroupPanelShow:"never",suppressMakeColumnVisibleAfterUnGroup:!1,treeData:!1,rowGroupPanelSuppressSort:!1,suppressGroupRowsSticky:!1,rowModelType:"clientSide",asyncTransactionWaitMillis:50,suppressModelUpdateAfterUpdateTransaction:!1,cacheOverflowSize:1,infiniteInitialRowCount:1,serverSideInitialRowCount:1,cacheBlockSize:100,maxBlocksInCache:-1,maxConcurrentDatasourceRequests:2,blockLoadDebounceMillis:0,purgeClosedRowNodes:!1,serverSideSortAllLevels:!1,serverSideOnlyRefreshFilteredGroups:!1,serverSidePivotResultFieldSeparator:"_",viewportRowModelPageSize:5,viewportRowModelBufferSize:5,alwaysShowHorizontalScroll:!1,alwaysShowVerticalScroll:!1,debounceVerticalScrollbar:!1,suppressHorizontalScroll:!1,suppressScrollOnNewData:!1,suppressScrollWhenPopupsAreOpen:!1,suppressAnimationFrame:!1,suppressMiddleClickScrolls:!1,suppressPreventDefaultOnMouseWheel:!1,rowMultiSelectWithClick:!1,suppressRowDeselection:!1,suppressRowClickSelection:!1,suppressCellFocus:!1,suppressHeaderFocus:!1,suppressMultiRangeSelection:!1,enableCellTextSelection:!1,enableRangeSelection:!1,enableRangeHandle:!1,enableFillHandle:!1,fillHandleDirection:"xy",suppressClearOnFillReduction:!1,accentedSort:!1,unSortIcon:!1,suppressMultiSort:!1,alwaysMultiSort:!1,suppressMaintainUnsortedOrder:!1,suppressRowHoverHighlight:!1,suppressRowTransform:!1,columnHoverHighlight:!1,deltaSort:!1,enableGroupEdit:!1,groupLockGroupColumns:0,serverSideEnableClientSideSort:!1,suppressServerSideFullWidthLoadingRow:!1,pivotMaxGeneratedColumns:-1,columnMenu:"new",reactiveCustomComponents:!0,suppressSetFilterByDefault:!1,rowNumbers:!1},YS=0,qS=0,QS=class extends M{constructor(){super(...arguments),this.beanName="gos",this.domDataKey="__AG_"+Math.random().toString(),this.gridInstanceId=qS++,this.propEventSvc=new eo,this.globalEventHandlerFactory=e=>(t,o)=>{if(!this.isAlive())return;const i=zi.has(t);if(i&&!e||!i&&e)return;const s=va(t),n=this.gridOptions[s];typeof n=="function"&&this.beans.frameworkOverrides.wrapOutgoing(()=>{n(o)})}}wireBeans(e){this.gridOptions=e.gridOptions,this.validation=e.validation,this.api=e.gridApi,this.gridId=e.context.getGridId()}get gridOptionsContext(){return this.gridOptions.context}postConstruct(){this.eventSvc.addGlobalListener(this.globalEventHandlerFactory().bind(this),!0),this.eventSvc.addGlobalListener(this.globalEventHandlerFactory(!0).bind(this),!1),this.propEventSvc.setFrameworkOverrides(this.beans.frameworkOverrides),this.addManagedEventListeners({gridOptionsChanged:({options:e})=>{this.updateGridOptions({options:e,force:!0,source:"gridOptionsUpdated"})}})}get(e){return this.gridOptions[e]??KS[e]}getCallback(e){return this.mergeGridCommonParams(this.gridOptions[e])}exists(e){return j(this.gridOptions[e])}mergeGridCommonParams(e){return e&&(o=>e(this.addGridCommonParams(o)))}updateGridOptions({options:e,force:t,source:o="api"}){const i={id:YS++,properties:[]},s=[],{gridOptions:n,validation:r}=this;for(const a of Object.keys(e)){const l=e[a];r?.warnOnInitialPropertyUpdate(o,a);const d=t||typeof l=="object"&&o==="api",c=n[a];if(d||c!==l){n[a]=l;const u={type:a,currentValue:l,previousValue:c,changeSet:i,source:o};s.push(u)}}r?.processGridOptions(this.gridOptions),i.properties=s.map(a=>a.type),s.forEach(a=>{Zi(this,`Updated property ${a.type} from`,a.previousValue," to ",a.currentValue),this.propEventSvc.dispatchEvent(a)})}addPropertyEventListener(e,t){this.propEventSvc.addEventListener(e,t)}removePropertyEventListener(e,t){this.propEventSvc.removeEventListener(e,t)}getDomDataKey(){return this.domDataKey}addGridCommonParams(e){return e.api=this.api,e.context=this.gridOptionsContext,e}assertModuleRegistered(e,t){const o=Array.isArray(e)?e.some(i=>this.isModuleRegistered(i)):this.isModuleRegistered(e);return o||ae(200,{...this.getModuleErrorParams(),moduleName:e,reasonOrId:t}),o}getModuleErrorParams(){return{gridId:this.gridId,gridScoped:Ra(),rowModelType:this.get("rowModelType"),isUmd:ff()}}isModuleRegistered(e){return Uc(e,this.gridId,this.get("rowModelType"))}};function $u(e){const t={"aria-hidden":"true"};return{tag:"div",cls:"ag-cell-label-container",role:"presentation",children:[{tag:"span",ref:"eMenu",cls:"ag-header-icon ag-header-cell-menu-button",attrs:t},{tag:"span",ref:"eFilterButton",cls:"ag-header-icon ag-header-cell-filter-button",attrs:t},{tag:"div",ref:"eLabel",cls:"ag-header-cell-label",role:"presentation",children:[{tag:"span",ref:"eText",cls:"ag-header-cell-text"},{tag:"span",ref:"eFilter",cls:"ag-header-icon ag-header-label-icon ag-filter-icon",attrs:t},e?{tag:"ag-sort-indicator",ref:"eSortIndicator"}:null]}]}}var XS=$u(!0),ZS=$u(!1),JS=class extends pe{constructor(){super(...arguments),this.eFilter=O,this.eFilterButton=O,this.eSortIndicator=O,this.eMenu=O,this.eLabel=O,this.eText=O,this.eSortOrder=O,this.eSortAsc=O,this.eSortDesc=O,this.eSortMixed=O,this.eSortNone=O,this.isLoadingInnerComponent=!1}refresh(e){const t=this.params;if(this.params=e,this.workOutTemplate(e,!!this.beans?.sortSvc)!=this.currentTemplate||this.workOutShowMenu()!=this.currentShowMenu||e.enableSorting!=this.currentSort||this.currentSuppressMenuHide!=null&&this.shouldSuppressMenuHide()!=this.currentSuppressMenuHide||t.enableFilterButton!=e.enableFilterButton||t.enableFilterIcon!=e.enableFilterIcon)return!1;if(this.innerHeaderComponent){const o={...e};Ue(o,e.innerHeaderComponentParams),this.innerHeaderComponent.refresh?.(o)}else this.setDisplayName(e);return!0}workOutTemplate(e,t){const o=e.template;return o?o?.trim?o.trim():o:t?XS:ZS}init(e){this.params=e;const{sortSvc:t,touchSvc:o,rowNumbersSvc:i,userCompFactory:s}=this.beans,n=t?.getSortIndicatorSelector();this.currentTemplate=this.workOutTemplate(e,!!n),this.setTemplate(this.currentTemplate,n?[n]:void 0),o?.setupForHeader(this),this.setMenu(),this.setupSort(),i?.setupForHeader(this),this.setupFilterIcon(),this.setupFilterButton(),this.workOutInnerHeaderComponent(s,e),this.setDisplayName(e)}workOutInnerHeaderComponent(e,t){const o=Kg(e,t,t);o&&(this.isLoadingInnerComponent=!0,o.newAgStackInstance().then(i=>{this.isLoadingInnerComponent=!1,i&&(this.isAlive()?(this.innerHeaderComponent=i,this.eText.appendChild(i.getGui())):this.destroyBean(i))}))}setDisplayName(e){const{displayName:t}=e,o=this.currentDisplayName;if(this.currentDisplayName=t,o===t||this.innerHeaderComponent||this.isLoadingInnerComponent)return;const i=St(t,!0);this.eText.textContent=i}addInIcon(e,t,o){if(t==null)return;const i=oe(e,this.beans,o);i&&t.appendChild(i)}workOutShowMenu(){return this.params.enableMenu&&!!this.beans.menuSvc?.isHeaderMenuButtonEnabled()}shouldSuppressMenuHide(){return!!this.beans.menuSvc?.isHeaderMenuButtonAlwaysShowEnabled()}setMenu(){if(!this.eMenu)return;if(this.currentShowMenu=this.workOutShowMenu(),!this.currentShowMenu){Nt(this.eMenu),this.eMenu=void 0;return}const{gos:e,eMenu:t,params:o}=this,i=Ve(e);this.addInIcon(i?"menu":"menuAlt",t,o.column),t.classList.toggle("ag-header-menu-icon",!i);const s=this.shouldSuppressMenuHide();this.currentSuppressMenuHide=s,this.addManagedElementListeners(t,{click:()=>this.showColumnMenu(this.eMenu)}),this.toggleMenuAlwaysShow(s)}toggleMenuAlwaysShow(e){this.eMenu?.classList.toggle("ag-header-menu-always-show",e)}showColumnMenu(e){const{currentSuppressMenuHide:t,params:o}=this;t||this.toggleMenuAlwaysShow(!0),o.showColumnMenu(e,()=>{t||this.toggleMenuAlwaysShow(!1)})}onMenuKeyboardShortcut(e){const{params:t,gos:o,beans:i,eMenu:s,eFilterButton:n}=this,r=t.column,a=Ve(o);if(e&&!a){if(i.menuSvc?.isFilterMenuInHeaderEnabled(r))return t.showFilter(n??s??this.getGui()),!0}else if(t.enableMenu)return this.showColumnMenu(s??n??this.getGui()),!0;return!1}setupSort(){const{sortSvc:e}=this.beans;if(!e)return;const{enableSorting:t,column:o}=this.params;if(this.currentSort=t,!this.eSortIndicator){this.eSortIndicator=this.createBean(e.createSortIndicator(!0));const{eSortIndicator:i,eSortOrder:s,eSortAsc:n,eSortDesc:r,eSortMixed:a,eSortNone:l}=this;i.attachCustomElements(s,n,r,a,l)}this.eSortIndicator.setupSort(o),this.currentSort&&e.setupHeader(this,o,this.eLabel)}setupFilterIcon(){const{eFilter:e,params:t}=this;e&&this.configureFilter(t.enableFilterIcon,e,this.onFilterChangedIcon.bind(this),"filterActive")}setupFilterButton(){const{eFilterButton:e,params:t}=this;if(!e)return;this.configureFilter(t.enableFilterButton,e,this.onFilterChangedButton.bind(this),"filter")?this.addManagedElementListeners(e,{click:()=>t.showFilter(e)}):this.eFilterButton=void 0}configureFilter(e,t,o,i){if(!e)return Nt(t),!1;const s=this.params.column;return this.addInIcon(i,t,s),this.addManagedListeners(s,{filterChanged:o}),o(),!0}onFilterChangedIcon(){const e=this.params.column.isFilterActive();he(this.eFilter,e,{skipAriaHidden:!0})}onFilterChangedButton(){const e=this.params.column.isFilterActive();this.eFilterButton.classList.toggle("ag-filter-active",e)}getAnchorElementForMenu(e){const{eFilterButton:t,eMenu:o}=this;return e?t??o??this.getGui():o??t??this.getGui()}destroy(){super.destroy(),this.innerHeaderComponent&&(this.destroyBean(this.innerHeaderComponent),this.innerHeaderComponent=void 0)}},ey={tag:"div",cls:"ag-header-group-cell-label",role:"presentation",children:[{tag:"span",ref:"agLabel",cls:"ag-header-group-text",role:"presentation"},{tag:"span",ref:"agOpened",cls:"ag-header-icon ag-header-expand-icon ag-header-expand-icon-expanded"},{tag:"span",ref:"agClosed",cls:"ag-header-icon ag-header-expand-icon ag-header-expand-icon-collapsed"}]},ty=class extends pe{constructor(){super(ey),this.agOpened=O,this.agClosed=O,this.agLabel=O,this.isLoadingInnerComponent=!1}init(e){const{userCompFactory:t}=this.beans;this.params=e,this.checkWarnings(),this.workOutInnerHeaderGroupComponent(t,e),this.setupLabel(e),this.addGroupExpandIcon(e),this.setupExpandIcons()}checkWarnings(){this.params.template&&_(89)}workOutInnerHeaderGroupComponent(e,t){const o=qg(e,t,t);o&&(this.isLoadingInnerComponent=!0,o.newAgStackInstance().then(i=>{this.isLoadingInnerComponent=!1,i&&(this.isAlive()?(this.innerHeaderGroupComponent=i,this.agLabel.appendChild(i.getGui())):this.destroyBean(i))}))}setupExpandIcons(){const{agOpened:e,agClosed:t,params:{columnGroup:o},beans:i}=this;this.addInIcon("columnGroupOpened",e),this.addInIcon("columnGroupClosed",t);const s=l=>{if(Et(l))return;const d=!o.isExpanded();i.colGroupSvc.setColumnGroupOpened(o.getProvidedColumnGroup(),d,"uiColumnExpanded")};this.addTouchAndClickListeners(i,t,s),this.addTouchAndClickListeners(i,e,s);const n=l=>{oo(l)};this.addManagedElementListeners(t,{dblclick:n}),this.addManagedElementListeners(e,{dblclick:n}),this.addManagedElementListeners(this.getGui(),{dblclick:s}),this.updateIconVisibility();const r=o.getProvidedColumnGroup(),a=this.updateIconVisibility.bind(this);this.addManagedListeners(r,{expandedChanged:a,expandableChanged:a})}addTouchAndClickListeners(e,t,o){e.touchSvc?.setupForHeaderGroup(this,t,o),this.addManagedElementListeners(t,{click:o})}updateIconVisibility(){const{agOpened:e,agClosed:t,params:{columnGroup:o}}=this;if(o.isExpandable()){const i=o.isExpanded();he(e,i),he(t,!i)}else he(e,!1),he(t,!1)}addInIcon(e,t){const o=oe(e,this.beans,null);o&&t.appendChild(o)}addGroupExpandIcon(e){if(!e.columnGroup.isExpandable()){const{agOpened:t,agClosed:o}=this;he(t,!1),he(o,!1);return}}setupLabel(e){const{displayName:t,columnGroup:o}=e,i=this.innerHeaderGroupComponent||this.isLoadingInnerComponent;if(j(t)&&!i){const s=St(t,!0);this.agLabel.textContent=s}this.addOrRemoveCssClass("ag-sticky-label",!o.getColGroupDef()?.suppressStickyLabel)}destroy(){super.destroy(),this.innerHeaderGroupComponent&&(this.destroyBean(this.innerHeaderGroupComponent),this.innerHeaderGroupComponent=void 0)}},oy={moduleName:"ColumnHeaderComp",version:ne,userComponents:{agColumnHeader:JS},icons:{menu:"menu",menuAlt:"menu-alt"}},iy={moduleName:"ColumnGroupHeaderComp",version:ne,userComponents:{agColumnGroupHeader:ty},icons:{columnGroupOpened:"expanded",columnGroupClosed:"contracted"}},sy=class extends M{constructor(){super(...arguments),this.beanName="animationFrameSvc",this.p1={list:[],sorted:!1},this.p2={list:[],sorted:!1},this.f1={list:[],sorted:!1},this.destroyTasks=[],this.ticking=!1,this.scrollGoingDown=!0,this.lastScrollTop=0,this.taskCount=0}setScrollTop(e){this.scrollGoingDown=e>=this.lastScrollTop,e===0&&(this.scrollGoingDown=!0),this.lastScrollTop=e}postConstruct(){this.active=!this.gos.get("suppressAnimationFrame"),this.batchFrameworkComps=this.beans.frameworkOverrides.batchFrameworkComps}verify(){this.active===!1&&_(92)}createTask(e,t,o,i){this.verify();let s=o;i&&this.batchFrameworkComps&&(s="f1");const n={task:e,index:t,createOrder:++this.taskCount};this.addTaskToList(this[s],n),this.schedule()}addTaskToList(e,t){e.list.push(t),e.sorted=!1}sortTaskList(e){if(e.sorted)return;const t=this.scrollGoingDown?1:-1;e.list.sort((o,i)=>o.index!==i.index?t*(i.index-o.index):i.createOrder-o.createOrder),e.sorted=!0}addDestroyTask(e){this.verify(),this.destroyTasks.push(e),this.schedule()}executeFrame(e){const{p1:t,p2:o,f1:i,destroyTasks:s,beans:n}=this,{ctrlsSvc:r,frameworkOverrides:a}=n,l=t.list,d=o.list,c=i.list,u=Date.now();let p=0;const g=e<=0,f=r.getScrollFeature();for(;g||p<e;){if(!f.scrollGridIfNeeded()){let C;if(l.length)this.sortTaskList(t),C=l.pop().task;else if(d.length)this.sortTaskList(o),C=d.pop().task;else if(c.length)a.wrapOutgoing(()=>{for(;(g||p<e)&&!f.scrollGridIfNeeded();){if(c.length)this.sortTaskList(i),C=c.pop().task,C();else break;p=Date.now()-u}}),C=()=>{};else if(s.length)C=s.pop();else break;C()}p=Date.now()-u}l.length||d.length||c.length||s.length?this.requestFrame():this.ticking=!1}flushAllFrames(){this.active&&this.executeFrame(-1)}schedule(){this.active&&(this.ticking||(this.ticking=!0,this.requestFrame()))}requestFrame(){const e=this.executeFrame.bind(this,60);Tt(this.beans,e)}isQueueEmpty(){return!this.ticking}},ny={moduleName:"AnimationFrame",version:ne,beans:[sy]},ry=class extends M{constructor(){super(...arguments),this.beanName="touchSvc"}mockBodyContextMenu(e,t){this.mockContextMenu(e,e.eBodyViewport,t)}mockHeaderContextMenu(e,t){this.mockContextMenu(e,e.eGui,t)}mockRowContextMenu(e){if(!ko())return;const t=(o,i,s)=>{const{rowCtrl:n,cellCtrl:r}=e.getControlsForEventTarget(s?.target??null);r?.column&&r.dispatchCellContextMenuEvent(s??null),this.beans.contextMenuSvc?.handleContextMenuMouseEvent(void 0,s,n,r)};this.mockContextMenu(e,e.element,t)}handleCellDoubleClick(e,t){return(()=>{if(!ko()||Sc("dblclick"))return!1;const i=Date.now(),s=i-e.lastIPadMouseClickEvent<200;return e.lastIPadMouseClickEvent=i,s})()?(e.onCellDoubleClicked(t),t.preventDefault(),!0):!1}setupForHeader(e){const{gos:t,sortSvc:o}=this.beans;if(t.get("suppressTouch"))return;const{params:i,eMenu:s,eFilterButton:n}=e,r=new Xo(e.getGui(),!0),a=e.shouldSuppressMenuHide(),l=a&&j(s),d=l?new Xo(s,!0):r;if(i.enableMenu){const c=l?"tap":"longTap",u=p=>i.showColumnMenuAfterMouseClick(p.touchStart);e.addManagedListeners(d,{[c]:u})}if(i.enableSorting){const c=u=>{const p=u.touchStart.target;a&&(s?.contains(p)||n?.contains(p))||o?.progressSort(i.column,!1,"uiColumnSorted")};e.addManagedListeners(r,{tap:c})}if(i.enableFilterButton&&n){const c=new Xo(n,!0);e.addManagedListeners(c,{tap:()=>i.showFilter(n)}),e.addDestroyFunc(()=>c.destroy())}e.addDestroyFunc(()=>r.destroy()),l&&e.addDestroyFunc(()=>d.destroy())}setupForHeaderGroup(e,t,o){const i=new Xo(t,!0);e.addManagedListeners(i,{tap:o}),e.addDestroyFunc(()=>i.destroy())}mockContextMenu(e,t,o){if(!ko())return;const i=new Xo(t),s=n=>{rs(this.gos,n.touchEvent)&&o(void 0,n.touchStart,n.touchEvent)};e.addManagedListeners(i,{longTap:s}),e.addDestroyFunc(()=>i.destroy())}},ay={moduleName:"Touch",version:ne,beans:[ry]},ly=class extends M{constructor(){super(...arguments),this.beanName="cellNavigation"}wireBeans(e){this.rowSpanSvc=e.rowSpanSvc}getNextCellToFocus(e,t,o=!1){return o?this.getNextCellToFocusWithCtrlPressed(e,t):this.getNextCellToFocusWithoutCtrlPressed(e,t)}getNextCellToFocusWithCtrlPressed(e,t){const o=e===D.UP,i=e===D.DOWN,s=e===D.LEFT;let n,r;const{pageBounds:a,gos:l,visibleCols:d}=this.beans;if(o||i)r=o?a.getFirstRow():a.getLastRow(),n=t.column;else{const c=l.get("enableRtl");r=t.rowIndex,n=(s!==c?d.allCols:[...d.allCols].reverse()).find(p=>this.isCellGoodToFocusOn({rowIndex:r,rowPinned:null,column:p}))}return n?{rowIndex:r,rowPinned:null,column:n}:null}getNextCellToFocusWithoutCtrlPressed(e,t){let o=t,i=!1;for(;!i;){switch(e){case D.UP:o=this.getCellAbove(o);break;case D.DOWN:o=this.getCellBelow(o);break;case D.RIGHT:o=this.gos.get("enableRtl")?this.getCellToLeft(o):this.getCellToRight(o);break;case D.LEFT:o=this.gos.get("enableRtl")?this.getCellToRight(o):this.getCellToLeft(o);break;default:o=null,_(8,{key:e});break}o?i=this.isCellGoodToFocusOn(o):i=!0}return o}isCellGoodToFocusOn(e){const t=e.column;let o;const{pinnedRowModel:i,rowModel:s}=this.beans;switch(e.rowPinned){case"top":o=i?.getPinnedTopRow(e.rowIndex);break;case"bottom":o=i?.getPinnedBottomRow(e.rowIndex);break;default:o=s.getRow(e.rowIndex);break}return o?!this.isSuppressNavigable(t,o):!1}getCellToLeft(e){if(!e)return null;const t=this.beans.visibleCols.getColBefore(e.column);return t?{rowIndex:e.rowIndex,column:t,rowPinned:e.rowPinned}:null}getCellToRight(e){if(!e)return null;const t=this.beans.visibleCols.getColAfter(e.column);return t?{rowIndex:e.rowIndex,column:t,rowPinned:e.rowPinned}:null}getCellBelow(e){if(!e)return null;const t=this.rowSpanSvc?.getCellEnd(e)??e,o=ml(this.beans,t);return o?{rowIndex:o.rowIndex,column:e.column,rowPinned:o.rowPinned}:null}getCellAbove(e){if(!e)return null;const t=this.rowSpanSvc?.getCellStart(e)??e,o=fn(this.beans,{rowIndex:t.rowIndex,rowPinned:t.rowPinned});return o?{rowIndex:o.rowIndex,column:e.column,rowPinned:o.rowPinned}:null}getNextTabbedCell(e,t){return t?this.getNextTabbedCellBackwards(e):this.getNextTabbedCellForwards(e)}getNextTabbedCellForwards(e){const{visibleCols:t,pagination:o}=this.beans,i=t.allCols;let s=e.rowIndex,n=e.rowPinned,r=t.getColAfter(e.column);if(!r){r=i[0];const a=ml(this.beans,e);if(Me(a)||!a.rowPinned&&!(o?.isRowInPage(a.rowIndex)??!0))return null;s=a?a.rowIndex:null,n=a?a.rowPinned:null}return{rowIndex:s,column:r,rowPinned:n}}getNextTabbedCellBackwards(e){const{beans:t}=this,{visibleCols:o,pagination:i}=t,s=o.allCols;let n=e.rowIndex,r=e.rowPinned,a=o.getColBefore(e.column);if(!a){a=ve(s);const l=fn(t,{rowIndex:e.rowIndex,rowPinned:e.rowPinned});if(Me(l)||!l.rowPinned&&!(i?.isRowInPage(l.rowIndex)??!0))return null;n=l?l.rowIndex:null,r=l?l.rowPinned:null}return{rowIndex:n,column:a,rowPinned:r}}isSuppressNavigable(e,t){const{suppressNavigable:o}=e.colDef;if(typeof o=="boolean")return o;if(typeof o=="function"){const i=e.createColumnFunctionCallbackParams(t);return o(i)}return!1}};function dy(e){return e.focusSvc.getFocusedCell()}function cy(e){return e.focusSvc.clearFocusedCell()}function uy(e,t,o,i){e.focusSvc.setFocusedCell({rowIndex:t,column:o,rowPinned:i,forceBrowserFocus:!0})}function hy(e,t){return e.navigation?.tabToNextCell(!1,t)??!1}function py(e,t){return e.navigation?.tabToNextCell(!0,t)??!1}function gy(e,t,o=!1){const i=e.headerNavigation?.getHeaderPositionForColumn(t,o);i&&e.focusSvc.focusHeaderPosition({headerPosition:i})}var fy=class extends M{constructor(){super(),this.beanName="navigation",this.onPageDown=dl(this.onPageDown,100),this.onPageUp=dl(this.onPageUp,100)}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.gridBodyCon=e.gridBodyCtrl})}handlePageScrollingKey(e,t=!1){const o=e.key,i=e.altKey,s=e.ctrlKey||e.metaKey,n=!!this.beans.rangeSvc&&e.shiftKey,r=Vf(this.gos,e);let a=!1;switch(o){case D.PAGE_HOME:case D.PAGE_END:!s&&!i&&(this.onHomeOrEndKey(o),a=!0);break;case D.LEFT:case D.RIGHT:case D.UP:case D.DOWN:if(!r)return!1;s&&!i&&!n&&(this.onCtrlUpDownLeftRight(o,r),a=!0);break;case D.PAGE_DOWN:case D.PAGE_UP:!s&&!i&&(a=this.handlePageUpDown(o,r,t));break}return a&&e.preventDefault(),a}handlePageUpDown(e,t,o){return o&&(t=this.beans.focusSvc.getFocusedCell()),t?(e===D.PAGE_UP?this.onPageUp(t):this.onPageDown(t),!0):!1}navigateTo(e){const{scrollIndex:t,scrollType:o,scrollColumn:i,focusIndex:s,focusColumn:n}=e,{scrollFeature:r}=this.gridBodyCon;j(i)&&!i.isPinned()&&r.ensureColumnVisible(i),j(t)&&r.ensureIndexVisible(t,o),e.isAsync||r.ensureIndexVisible(s);const{focusSvc:a,rangeSvc:l}=this.beans;a.setFocusedCell({rowIndex:s,column:n,rowPinned:null,forceBrowserFocus:!0}),l?.setRangeToCell({rowIndex:s,rowPinned:null,column:n})}onPageDown(e){const t=this.beans,o=cr(t),i=this.getViewportHeight(),{pageBounds:s,rowModel:n,rowAutoHeight:r}=t,a=s.getPixelOffset(),l=o.top+i,d=n.getRowIndexAtPixel(l+a);r?.active?this.navigateToNextPageWithAutoHeight(e,d):this.navigateToNextPage(e,d)}onPageUp(e){const t=this.beans,o=cr(t),{pageBounds:i,rowModel:s,rowAutoHeight:n}=t,r=i.getPixelOffset(),a=o.top,l=s.getRowIndexAtPixel(a+r);n?.active?this.navigateToNextPageWithAutoHeight(e,l,!0):this.navigateToNextPage(e,l,!0)}navigateToNextPage(e,t,o=!1){const{pageBounds:i,rowModel:s}=this.beans,n=this.getViewportHeight(),r=i.getFirstRow(),a=i.getLastRow(),l=i.getPixelOffset(),d=s.getRow(e.rowIndex),c=o?d?.rowHeight-n-l:n-l,u=d?.rowTop+c;let p=s.getRowIndexAtPixel(u+l);if(p===e.rowIndex){const f=o?-1:1;t=p=e.rowIndex+f}let g;o?(g="bottom",p<r&&(p=r),t<r&&(t=r)):(g="top",p>a&&(p=a),t>a&&(t=a)),this.isRowTallerThanView(s.getRow(p))&&(t=p,g="top"),this.navigateTo({scrollIndex:t,scrollType:g,scrollColumn:null,focusIndex:p,focusColumn:e.column})}navigateToNextPageWithAutoHeight(e,t,o=!1){this.navigateTo({scrollIndex:t,scrollType:o?"bottom":"top",scrollColumn:null,focusIndex:t,focusColumn:e.column}),setTimeout(()=>{const i=this.getNextFocusIndexForAutoHeight(e,o);this.navigateTo({scrollIndex:t,scrollType:o?"bottom":"top",scrollColumn:null,focusIndex:i,focusColumn:e.column,isAsync:!0})},50)}getNextFocusIndexForAutoHeight(e,t=!1){const o=t?-1:1,i=this.getViewportHeight(),{pageBounds:s,rowModel:n}=this.beans,r=s.getLastRow();let a=0,l=e.rowIndex;for(;l>=0&&l<=r;){const d=n.getRow(l);if(d){const c=d.rowHeight??0;if(a+c>i)break;a+=c}l+=o}return Math.max(0,Math.min(l,r))}getViewportHeight(){const e=this.beans,t=cr(e),o=this.beans.scrollVisibleSvc.getScrollbarWidth();let i=t.bottom-t.top;return e.ctrlsSvc.get("center").isHorizontalScrollShowing()&&(i-=o),i}isRowTallerThanView(e){if(!e)return!1;const t=e.rowHeight;return typeof t!="number"?!1:t>this.getViewportHeight()}onCtrlUpDownLeftRight(e,t){const o=this.beans.cellNavigation.getNextCellToFocus(e,t,!0),{rowIndex:i}=o,s=o.column;this.navigateTo({scrollIndex:i,scrollType:null,scrollColumn:s,focusIndex:i,focusColumn:s})}onHomeOrEndKey(e){const t=e===D.PAGE_HOME,{visibleCols:o,pageBounds:i,rowModel:s}=this.beans,n=o.allCols,r=t?i.getFirstRow():i.getLastRow(),a=s.getRow(r);if(!a)return;const l=(t?n:[...n].reverse()).find(d=>!d.isSuppressNavigable(a));l&&this.navigateTo({scrollIndex:r,scrollType:null,scrollColumn:l,focusIndex:r,focusColumn:l})}onTabKeyDown(e,t){const o=t.shiftKey,i=this.tabToNextCellCommon(e,o,t),s=this.beans,{ctrlsSvc:n,pageBounds:r,focusSvc:a,gos:l}=s;if(i!==!1){i?t.preventDefault():i===null&&n.get("gridCtrl").allowFocusForNextCoreContainer(o);return}if(o){const{rowIndex:d,rowPinned:c}=e.getRowPosition();(c?d===0:d===r.getFirstRow())&&(l.get("headerHeight")===0||Vo(s)?$o(s,!0,!0):(t.preventDefault(),a.focusPreviousFromFirstCell(t)))}else e instanceof Ns&&e.focusCell(!0),(!o&&a.focusOverlay(!1)||$o(s,o))&&t.preventDefault()}tabToNextCell(e,t){const o=this.beans,{focusSvc:i,rowRenderer:s}=o,n=i.getFocusedCell();if(!n)return!1;let r=vs(o,n);return!r&&(r=s.getRowByPosition(n),!r||!r.isFullWidth())?!1:!!this.tabToNextCellCommon(r,e,t)}tabToNextCellCommon(e,t,o){let i=e.editing;if(!i&&e instanceof Ns){const r=e.rowCtrl;r&&(i=r.editing)}let s;return i?this.gos.get("editType")==="fullRow"?s=this.moveToNextEditingRow(e,t,o):s=this.moveToNextEditingCell(e,t,o):s=this.moveToNextCellNotEditing(e,t,o),s===null?s:s||!!this.beans.focusSvc.focusedHeader}moveToNextEditingCell(e,t,o=null){const i=e.cellPosition;e.eGui.focus(),e.stopEditing();const s=this.findNextCellToFocusOn(i,t,!0);return s===!1?null:s==null?!1:(this.beans.editSvc?.startEditing(s,null,!0,o),s.focusCell(!1),!0)}moveToNextEditingRow(e,t,o=null){const i=e.cellPosition,s=this.findNextCellToFocusOn(i,t,!0);if(s===!1)return null;if(s==null)return!1;const n=s.cellPosition,r=this.isCellEditable(i),a=this.isCellEditable(n),l=n&&i.rowIndex===n.rowIndex&&i.rowPinned===n.rowPinned,{editSvc:d,rowEditSvc:c}=this.beans;if(r&&d?.setFocusOutOnEditor(e),!l){const u=e.rowCtrl;d?.stopRowEditing(u);const p=s.rowCtrl;c?.startEditing(p,void 0,void 0,o)}return a?(d?.setFocusInOnEditor(s),s.focusCell()):s.focusCell(!0),!0}moveToNextCellNotEditing(e,t,o){const i=this.beans.visibleCols.allCols;let s;if(e instanceof Wr){if(s={...e.getRowPosition(),column:t?i[0]:ve(i)},this.gos.get("embedFullWidthRows")&&o){const r=e.findFullWidthInfoForEvent(o);r&&(s.column=r.column)}}else s=e.getFocusedCellPosition();const n=this.findNextCellToFocusOn(s,t,!1);if(n===!1)return null;if(n instanceof Ns)n.focusCell(!0);else if(n)return this.tryToFocusFullWidthRow(n,t);return j(n)}findNextCellToFocusOn(e,t,o){let i=e;const s=this.beans,{cellNavigation:n,gos:r,focusSvc:a,rowRenderer:l,rangeSvc:d}=s;for(;;){e!==i&&(e=i),t||(i=this.getLastCellOfColSpan(i)),i=n.getNextTabbedCell(i,t);const c=r.getCallback("tabToNextCell");if(j(c)){const f=c({backwards:t,editing:o,previousCellPosition:e,nextCellPosition:i||null});if(f===!0)i=e;else{if(f===!1)return!1;i={rowIndex:f.rowIndex,column:f.column,rowPinned:f.rowPinned}}}if(!i)return null;if(i.rowIndex<0){const g=Vt(s);return a.focusHeaderPosition({headerPosition:{headerRowIndex:g+i.rowIndex,column:i.column},fromCell:!0}),null}const u=r.get("editType")==="fullRow";if(o&&!u&&!this.isCellEditable(i))continue;this.ensureCellVisible(i);const p=vs(s,i);if(!p){const g=l.getRowByPosition(i);if(!g||!g.isFullWidth()||o)continue;return{...g.getRowPosition(),column:i?.column}}if(!n.isSuppressNavigable(p.column,p.rowNode))return p.setFocusedCellPosition(i),d?.setRangeToCell(i),p}}isCellEditable(e){const t=this.lookupRowNodeForCell(e);return t?e.column.isCellEditable(t):!1}lookupRowNodeForCell({rowIndex:e,rowPinned:t}){const{pinnedRowModel:o,rowModel:i}=this.beans;return t==="top"?o?.getPinnedTopRow(e):t==="bottom"?o?.getPinnedBottomRow(e):i.getRow(e)}navigateToNextCell(e,t,o,i){let s=o,n=!1;const r=this.beans,{cellNavigation:a,focusSvc:l,gos:d}=r;for(;s&&(s===o||!this.isValidNavigateCell(s));)d.get("enableRtl")?t===D.LEFT&&(s=this.getLastCellOfColSpan(s)):t===D.RIGHT&&(s=this.getLastCellOfColSpan(s)),s=a.getNextCellToFocus(t,s),n=Me(s);if(n&&e&&e.key===D.UP&&(s={rowIndex:-1,rowPinned:null,column:o.column}),i){const u=d.getCallback("navigateToNextCell");if(j(u)){const g=u({key:t,previousCellPosition:o,nextCellPosition:s||null,event:e});j(g)?s={rowPinned:g.rowPinned,rowIndex:g.rowIndex,column:g.column}:s=null}}if(!s)return;if(s.rowIndex<0){const u=Vt(r);l.focusHeaderPosition({headerPosition:{headerRowIndex:u+s.rowIndex,column:o.column},event:e||void 0,fromCell:!0});return}const c=this.getNormalisedPosition(s);c?this.focusPosition(c):this.tryToFocusFullWidthRow(s)}getNormalisedPosition(e){if(!!this.beans.spannedRowRenderer?.getCellByPosition(e))return e;this.ensureCellVisible(e);const o=vs(this.beans,e);return o?(e=o.getFocusedCellPosition(),this.ensureCellVisible(e),e):null}tryToFocusFullWidthRow(e,t){const{visibleCols:o,rowRenderer:i,focusSvc:s,eventSvc:n}=this.beans,r=o.allCols,a=i.getRowByPosition(e);if(!a||!a.isFullWidth())return!1;const l=s.getFocusedCell(),d={rowIndex:e.rowIndex,rowPinned:e.rowPinned,column:e.column||(t?ve(r):r[0])};this.focusPosition(d);const c=t??(l!=null&&Uf(d,l));return n.dispatchEvent({type:"fullWidthRowFocused",rowIndex:d.rowIndex,rowPinned:d.rowPinned,column:d.column,isFullWidthCell:!0,fromBelow:c}),!0}focusPosition(e){const{focusSvc:t,rangeSvc:o}=this.beans;t.setFocusedCell({rowIndex:e.rowIndex,column:e.column,rowPinned:e.rowPinned,forceBrowserFocus:!0}),o?.setRangeToCell(e)}isValidNavigateCell(e){return!!Da(this.beans,e)}getLastCellOfColSpan(e){const t=vs(this.beans,e);if(!t)return e;const o=t.getColSpanningList();return o.length===1?e:{rowIndex:e.rowIndex,column:ve(o),rowPinned:e.rowPinned}}ensureCellVisible(e){const t=An(this.gos),o=this.beans.rowModel.getRow(e.rowIndex),i=t&&o?.sticky,{scrollFeature:s}=this.gridBodyCon;!i&&Me(e.rowPinned)&&s.ensureIndexVisible(e.rowIndex),e.column.isPinned()||s.ensureColumnVisible(e.column)}};function cr(e){return e.ctrlsSvc.getScrollFeature().getVScrollPosition()}var my={moduleName:"KeyboardNavigation",version:ne,beans:[fy,ly,_S],apiFunctions:{getFocusedCell:dy,clearFocusedCell:cy,setFocusedCell:uy,setFocusedHeader:gy,tabToNextCell:hy,tabToPreviousCell:py}},Cy=class extends M{constructor(){super(...arguments),this.beanName="pageBoundsListener"}postConstruct(){this.addManagedEventListeners({modelUpdated:this.onModelUpdated.bind(this),recalculateRowBounds:this.calculatePages.bind(this)}),this.onModelUpdated()}onModelUpdated(e){this.calculatePages(),this.eventSvc.dispatchEvent({type:"paginationChanged",animate:e?.animate??!1,newData:e?.newData??!1,newPage:e?.newPage??!1,newPageSize:e?.newPageSize??!1,keepRenderedRows:e?.keepRenderedRows??!1})}calculatePages(){const{pageBounds:e,pagination:t,rowModel:o}=this.beans;t?t.calculatePages():e.calculateBounds(0,o.getRowCount()-1)}},vy=class extends M{constructor(){super(...arguments),this.beanName="pageBounds",this.pixelOffset=0}getFirstRow(){return this.topRowBounds?.rowIndex??-1}getLastRow(){return this.bottomRowBounds?.rowIndex??-1}getCurrentPageHeight(){const{topRowBounds:e,bottomRowBounds:t}=this;return!e||!t?0:Math.max(t.rowTop+t.rowHeight-e.rowTop,0)}getCurrentPagePixelRange(){const{topRowBounds:e,bottomRowBounds:t}=this,o=e?.rowTop??0,i=t?t.rowTop+t.rowHeight:0;return{pageFirstPixel:o,pageLastPixel:i}}calculateBounds(e,t){const{rowModel:o}=this.beans,i=o.getRowBounds(e);i&&(i.rowIndex=e),this.topRowBounds=i;const s=o.getRowBounds(t);s&&(s.rowIndex=t),this.bottomRowBounds=s,this.calculatePixelOffset()}getPixelOffset(){return this.pixelOffset}calculatePixelOffset(){const e=this.topRowBounds?.rowTop??0;this.pixelOffset!==e&&(this.pixelOffset=e,this.eventSvc.dispatchEvent({type:"paginationPixelOffsetChanged"}))}},wy=".ag-pinned-left-floating-bottom,.ag-pinned-left-floating-top,.ag-pinned-right-floating-bottom,.ag-pinned-right-floating-top{min-width:0;overflow:hidden;position:relative}.ag-pinned-left-sticky-top,.ag-pinned-right-sticky-top{height:100%;overflow:hidden;position:relative}.ag-sticky-bottom-full-width-container,.ag-sticky-top-full-width-container{height:100%;overflow:hidden;width:100%}.ag-pinned-left-header,.ag-pinned-right-header{display:inline-block;height:100%;overflow:hidden;position:relative}.ag-body-horizontal-scroll:not(.ag-scrollbar-invisible){.ag-horizontal-left-spacer:not(.ag-scroller-corner){border-right:var(--ag-pinned-column-border)}.ag-horizontal-right-spacer:not(.ag-scroller-corner){border-left:var(--ag-pinned-column-border)}}.ag-pinned-right-header{border-left:var(--ag-pinned-column-border)}.ag-pinned-left-header{border-right:var(--ag-pinned-column-border)}.ag-cell.ag-cell-first-right-pinned:not(.ag-cell-range-left,.ag-cell-range-single-cell,.ag-cell-focus:not(.ag-cell-range-selected):focus-within){border-left:var(--ag-pinned-column-border)}.ag-cell.ag-cell-last-left-pinned:not(.ag-cell-range-right,.ag-cell-range-single-cell,.ag-cell-focus:not(.ag-cell-range-selected):focus-within){border-right:var(--ag-pinned-column-border)}.ag-pinned-left-header .ag-header-cell-resize:after{left:calc(50% - var(--ag-header-column-resize-handle-width))}.ag-pinned-right-header .ag-header-cell-resize:after{left:50%}.ag-pinned-left-header .ag-header-cell-resize{right:-3px}.ag-pinned-right-header .ag-header-cell-resize{left:-3px}",Sy=class extends M{constructor(e,t){super(),this.isLeft=e,this.elements=t,this.getWidth=e?()=>this.beans.pinnedCols.leftWidth:()=>this.beans.pinnedCols.rightWidth}postConstruct(){this.addManagedEventListeners({[`${this.isLeft?"left":"right"}PinnedWidthChanged`]:this.onPinnedWidthChanged.bind(this)})}onPinnedWidthChanged(){const e=this.getWidth(),t=e>0;for(const o of this.elements)o&&(he(o,t),_t(o,e))}},yy=class extends M{constructor(){super(...arguments),this.beanName="pinnedCols"}postConstruct(){this.beans.ctrlsSvc.whenReady(this,t=>{this.gridBodyCtrl=t.gridBodyCtrl});const e=this.checkContainerWidths.bind(this);this.addManagedEventListeners({displayedColumnsChanged:e,displayedColumnsWidthChanged:e}),this.addManagedPropertyListener("domLayout",e)}checkContainerWidths(){const{gos:e,visibleCols:t,eventSvc:o}=this.beans,i=We(e,"print"),s=i?0:t.getColsLeftWidth(),n=i?0:t.getDisplayedColumnsRightWidth();s!=this.leftWidth&&(this.leftWidth=s,o.dispatchEvent({type:"leftPinnedWidthChanged"})),n!=this.rightWidth&&(this.rightWidth=n,o.dispatchEvent({type:"rightPinnedWidthChanged"}))}keepPinnedColumnsNarrowerThanViewport(){const e=this.gridBodyCtrl.eBodyViewport,t=Qi(e);if(t<=50)return;const o=this.getPinnedColumnsOverflowingViewport(t-50),i=this.gos.getCallback("processUnpinnedColumns"),{columns:s,hasLockedPinned:n}=o;let r=s;!r.length&&!n||(i&&(r=i({columns:r,viewportWidth:t})),!(!r||!r.length)&&(r=r.filter(a=>!is(a)),this.setColsPinned(r,null,"viewportSizeFeature")))}createPinnedWidthFeature(e,...t){return new Sy(e,t)}setColsPinned(e,t,o){const{colModel:i,colAnimation:s,visibleCols:n,gos:r}=this.beans;if(!i.cols||!e?.length)return;if(We(r,"print")){_(37);return}s?.start();let a;t===!0||t==="left"?a="left":t==="right"?a="right":a=null;const l=[];e.forEach(d=>{if(!d)return;const c=i.getCol(d);c&&c.getPinned()!==a&&(this.setColPinned(c,a),l.push(c))}),l.length&&(n.refresh(o),kc(this.eventSvc,l,o)),s?.finish()}initCol(e){const{pinned:t,initialPinned:o}=e.colDef;t!==void 0?this.setColPinned(e,t):this.setColPinned(e,o)}setColPinned(e,t){t===!0||t==="left"?e.pinned="left":t==="right"?e.pinned="right":e.pinned=null,e.dispatchStateUpdatedEvent("pinned")}setupHeaderPinnedWidth(e){const{scrollVisibleSvc:t}=this.beans;if(e.pinned==null)return;const o=e.pinned==="left",i=e.pinned==="right";e.hidden=!0;const s=()=>{const n=o?this.leftWidth:this.rightWidth;if(n==null)return;const r=n==0,a=e.hidden!==r,l=this.gos.get("enableRtl"),d=t.getScrollbarWidth(),u=t.verticalScrollShowing&&(l&&o||!l&&i)?n+d:n;e.comp.setPinnedContainerWidth(`${u}px`),e.comp.setDisplayed(!r),a&&(e.hidden=r,e.refresh())};e.addManagedEventListeners({leftPinnedWidthChanged:s,rightPinnedWidthChanged:s,scrollVisibilityChanged:s,scrollbarWidthChanged:s})}getHeaderResizeDiff(e,t){if(t.getPinned()){const{leftWidth:i,rightWidth:s}=this,n=Qi(this.beans.ctrlsSvc.getGridBodyCtrl().eBodyViewport)-50;if(i+s+e>n)if(n>i+s)e=n-i-s;else return 0}return e}getPinnedColumnsOverflowingViewport(e){const t=this.rightWidth??0,o=this.leftWidth??0,i=t+o;let s=!1;if(i<e)return{columns:[],hasLockedPinned:s};const{visibleCols:n}=this.beans,r=[...n.leftCols],a=[...n.rightCols];let l=0,d=0;const c=0,u=[];let p=i-c-e;for(;(d<r.length||l<a.length)&&p>0;){if(l<a.length){const g=a[l++];if(g.colDef.lockPinned){s=!0;continue}p-=g.getActualWidth(),u.push(g)}if(d<r.length&&p>0){const g=r[d++];if(g.colDef.lockPinned){s=!0;continue}p-=g.getActualWidth(),u.push(g)}}return{columns:u,hasLockedPinned:s}}},by={moduleName:"PinnedColumn",version:ne,beans:[yy],css:[wy]},Ry=class extends M{constructor(){super(),this.beanName="ariaAnnounce",this.descriptionContainer=null,this.pendingAnnouncements=new Map,this.lastAnnouncement="",this.updateAnnouncement=tt(this,this.updateAnnouncement.bind(this),200)}postConstruct(){const e=this.beans,t=Le(e),o=this.descriptionContainer=t.createElement("div");o.classList.add("ag-aria-description-container"),Bd(o,"polite"),pp(o,"additions text"),hp(o,!0),e.eGridDiv.appendChild(o)}announceValue(e,t){this.pendingAnnouncements.set(t,e),this.updateAnnouncement()}updateAnnouncement(){if(!this.descriptionContainer)return;const e=Array.from(this.pendingAnnouncements.values()).join(". ");this.pendingAnnouncements.clear(),this.descriptionContainer.textContent="",setTimeout(()=>{if(this.isAlive()&&this.descriptionContainer){let t=e;this.lastAnnouncement===t&&(t=`${t}.`),this.lastAnnouncement=t,this.descriptionContainer.textContent=t}},50)}destroy(){super.destroy();const{descriptionContainer:e}=this;e&&(ct(e),e.parentElement?.removeChild(e)),this.descriptionContainer=null,this.pendingAnnouncements.clear()}},Fy={moduleName:"Aria",version:ne,beans:[Ry]};function xy(e){e.overlays?.showLoadingOverlay()}function Dy(e){e.overlays?.showNoRowsOverlay()}function My(e){e.overlays?.hideOverlay()}var Py=".ag-overlay{inset:0;pointer-events:none;position:absolute;z-index:2}.ag-overlay-panel,.ag-overlay-wrapper{display:flex;height:100%;width:100%}.ag-overlay-wrapper{align-items:center;flex:none;justify-content:center;text-align:center}.ag-overlay-loading-wrapper{pointer-events:all}.ag-overlay-loading-center{background:var(--ag-background-color);border:1px solid var(--ag-border-color);border-radius:var(--ag-border-radius);box-shadow:var(--ag-popup-shadow);padding:var(--ag-spacing)}",Ey={tag:"div",cls:"ag-overlay",role:"presentation",children:[{tag:"div",cls:"ag-overlay-panel",role:"presentation",children:[{tag:"div",ref:"eOverlayWrapper",cls:"ag-overlay-wrapper",role:"presentation"}]}]},ju=class extends pe{constructor(){super(Ey),this.eOverlayWrapper=O,this.activePromise=null,this.activeOverlay=null,this.updateListenerDestroyFunc=null,this.activeCssClass=null,this.elToFocusAfter=null,this.registerCSS(Py)}handleKeyDown(e){if(e.key!==D.TAB||e.defaultPrevented||Et(e))return;const t=this.beans;if(Kt(t,this.eOverlayWrapper,!1,e.shiftKey))return;let i=!1;e.shiftKey?i=t.focusSvc.focusGridView({column:ve(t.visibleCols.allCols),backwards:!0,canFocusOverlay:!1}):i=$o(t,!1),i&&e.preventDefault()}updateLayoutClasses(e,t){const o=this.eOverlayWrapper.classList,{AUTO_HEIGHT:i,NORMAL:s,PRINT:n}=Dt;o.toggle(i,t.autoHeight),o.toggle(s,t.normal),o.toggle(n,t.print)}postConstruct(){this.createManagedBean(new Pa(this)),this.setDisplayed(!1,{skipAriaHidden:!0}),this.beans.overlays.setOverlayWrapperComp(this),this.addManagedElementListeners(this.getFocusableElement(),{keydown:this.handleKeyDown.bind(this)})}setWrapperTypeClass(e){const t=this.eOverlayWrapper.classList;this.activeCssClass&&t.toggle(this.activeCssClass,!1),this.activeCssClass=e,t.toggle(e,!0)}showOverlay(e,t,o,i){if(this.setWrapperTypeClass(t),this.destroyActiveOverlay(),this.elToFocusAfter=null,this.activePromise=e,!!e){if(this.setDisplayed(!0,{skipAriaHidden:!0}),o&&this.isGridFocused()){const s=Ee(this.beans);s&&!rn(this.beans)&&(this.elToFocusAfter=s)}e.then(s=>{if(this.activePromise!==e){this.activeOverlay!==s&&(this.destroyBean(s),s=null);return}if(this.activePromise=null,!!s){if(this.activeOverlay!==s&&(this.eOverlayWrapper.appendChild(s.getGui()),this.activeOverlay=s,i)){const n=s;this.updateListenerDestroyFunc=this.addManagedPropertyListener(i,({currentValue:r})=>{n.refresh?.(Z(this.gos,{...r??{}}))})}o&&this.isGridFocused()&&It(this.eOverlayWrapper)}})}}updateOverlayWrapperPaddingTop(e){this.eOverlayWrapper.style.setProperty("padding-top",`${e}px`)}destroyActiveOverlay(){this.activePromise=null;const e=this.activeOverlay;if(!e)return;let t=this.elToFocusAfter;this.activeOverlay=null,this.elToFocusAfter=null,t&&!this.isGridFocused()&&(t=null);const o=this.updateListenerDestroyFunc;o&&(o(),this.updateListenerDestroyFunc=null),this.destroyBean(e),ct(this.eOverlayWrapper),t?.focus?.({preventScroll:!0})}hideOverlay(){this.destroyActiveOverlay(),this.setDisplayed(!1,{skipAriaHidden:!0})}isGridFocused(){const e=Ee(this.beans);return!!e&&this.beans.eGridDiv.contains(e)}destroy(){this.elToFocusAfter=null,this.destroyActiveOverlay(),this.beans.overlays.setOverlayWrapperComp(void 0),super.destroy()}},Ay={selector:"AG-OVERLAY-WRAPPER",component:ju},Ty=class extends M{constructor(){super(...arguments),this.beanName="overlays",this.state=0,this.showInitialOverlay=!0,this.wrapperPadding=0}postConstruct(){this.isClientSide=Lt(this.gos),this.isServerSide=!this.isClientSide&&pt(this.gos);const e=()=>this.updateOverlayVisibility();this.addManagedEventListeners({newColumnsLoaded:e,rowDataUpdated:e,gridSizeChanged:this.refreshWrapperPadding.bind(this),rowCountReady:()=>{this.showInitialOverlay=!1,this.updateOverlayVisibility()}}),this.addManagedPropertyListener("loading",e)}setOverlayWrapperComp(e){this.eWrapper=e,this.updateOverlayVisibility()}isVisible(){return this.state!==0&&!!this.eWrapper}isExclusive(){return this.state===1&&!!this.eWrapper}showLoadingOverlay(){this.showInitialOverlay=!1;const e=this.gos,t=e.get("loading");!t&&(t!==void 0||e.get("suppressLoadingOverlay"))||this.doShowLoadingOverlay()}showNoRowsOverlay(){this.showInitialOverlay=!1;const e=this.gos;e.get("loading")||e.get("suppressNoRowsOverlay")||this.doShowNoRowsOverlay()}hideOverlay(){if(this.showInitialOverlay=!1,this.gos.get("loading")){_(99);return}this.doHideOverlay()}getOverlayWrapperSelector(){return Ay}getOverlayWrapperCompClass(){return ju}updateOverlayVisibility(){if(!this.eWrapper){this.state=0;return}const{state:e,isClientSide:t,isServerSide:o,beans:{gos:i,colModel:s,rowModel:n}}=this;let r=this.gos.get("loading");r!==void 0&&(this.showInitialOverlay=!1),this.showInitialOverlay&&r===void 0&&!i.get("suppressLoadingOverlay")&&(r=!i.get("columnDefs")||!s.ready||!i.get("rowData")&&t),r?e!==1&&this.doShowLoadingOverlay():(this.showInitialOverlay=!1,t&&n.isEmpty()&&!i.get("suppressNoRowsOverlay")?e!==2&&this.doShowNoRowsOverlay():(e===1||!o&&e!==0)&&this.doHideOverlay())}doShowLoadingOverlay(){this.eWrapper&&(this.state=1,this.showOverlay(of(this.beans.userCompFactory,Z(this.gos,{})),"ag-overlay-loading-wrapper","loadingOverlayComponentParams"),this.updateExclusive())}doShowNoRowsOverlay(){this.eWrapper&&(this.state=2,this.showOverlay(sf(this.beans.userCompFactory,Z(this.gos,{})),"ag-overlay-no-rows-wrapper","noRowsOverlayComponentParams"),this.updateExclusive())}doHideOverlay(){this.eWrapper&&(this.state=0,this.eWrapper.hideOverlay(),this.updateExclusive())}showOverlay(e,t,o){const i=e?.newAgStackInstance()??null;this.eWrapper?.showOverlay(i,t,this.isExclusive(),o),this.refreshWrapperPadding()}updateExclusive(){const e=this.exclusive;this.exclusive=this.isExclusive(),this.exclusive!==e&&this.eventSvc.dispatchEvent({type:"overlayExclusiveChanged"})}refreshWrapperPadding(){const e=this.eWrapper;if(!e)return;let t=0;this.state===2?t=this.beans.ctrlsSvc.get("gridHeaderCtrl")?.headerHeight||0:this.wrapperPadding!==0&&(t=0),this.wrapperPadding!==t&&(this.wrapperPadding=t,e.updateOverlayWrapperPaddingTop(t))}},Iy={moduleName:"Overlay",version:ne,userComponents:{agLoadingOverlay:iC,agNoRowsOverlay:nC},apiFunctions:{showLoadingOverlay:xy,showNoRowsOverlay:Dy,hideOverlay:My},beans:[Ty]},Ly=class extends M{constructor(){super(...arguments),this.beanName="rowContainerHeight",this.scrollY=0,this.uiBodyHeight=0}postConstruct(){this.addManagedEventListeners({bodyHeightChanged:this.updateOffset.bind(this)}),this.maxDivHeight=Rp(),Zi(this.gos,"RowContainerHeightService - maxDivHeight = "+this.maxDivHeight)}updateOffset(){if(!this.stretching)return;const e=this.beans.ctrlsSvc.getScrollFeature().getVScrollPosition().top,t=this.getUiBodyHeight();(e!==this.scrollY||t!==this.uiBodyHeight)&&(this.scrollY=e,this.uiBodyHeight=t,this.calculateOffset())}calculateOffset(){this.setUiContainerHeight(this.maxDivHeight),this.pixelsToShave=this.modelHeight-this.uiContainerHeight,this.maxScrollY=this.uiContainerHeight-this.uiBodyHeight;const e=this.scrollY/this.maxScrollY,t=e*this.pixelsToShave;Zi(this.gos,`RowContainerHeightService - Div Stretch Offset = ${t} (${this.pixelsToShave} * ${e})`),this.setDivStretchOffset(t)}setUiContainerHeight(e){e!==this.uiContainerHeight&&(this.uiContainerHeight=e,this.eventSvc.dispatchEvent({type:"rowContainerHeightChanged"}))}clearOffset(){this.setUiContainerHeight(this.modelHeight),this.pixelsToShave=0,this.setDivStretchOffset(0)}setDivStretchOffset(e){const t=typeof e=="number"?Math.floor(e):null;this.divStretchOffset!==t&&(this.divStretchOffset=t,this.eventSvc.dispatchEvent({type:"heightScaleChanged"}))}setModelHeight(e){this.modelHeight=e,this.stretching=e!=null&&this.maxDivHeight>0&&e>this.maxDivHeight,this.stretching?this.calculateOffset():this.clearOffset()}getRealPixelPosition(e){return e-this.divStretchOffset}getUiBodyHeight(){const e=this.beans.ctrlsSvc.getScrollFeature().getVScrollPosition();return e.bottom-e.top}getScrollPositionForPixel(e){if(this.pixelsToShave<=0)return e;const t=this.modelHeight-this.getUiBodyHeight(),o=e/t;return this.maxScrollY*o}},ky=400,Gy=class extends M{constructor(){super(...arguments),this.beanName="rowRenderer",this.destroyFuncsForColumnListeners=[],this.rowCtrlsByRowIndex={},this.zombieRowCtrls={},this.allRowCtrls=[],this.topRowCtrls=[],this.bottomRowCtrls=[],this.refreshInProgress=!1,this.dataFirstRenderedFired=!1,this.setupRangeSelectionListeners=()=>{const e=()=>{this.getAllCellCtrls().forEach(n=>n.onCellSelectionChanged())},t=()=>{this.getAllCellCtrls().forEach(n=>n.updateRangeBordersIfRangeCount())},o=()=>{this.eventSvc.addEventListener("cellSelectionChanged",e),this.eventSvc.addEventListener("columnMoved",t),this.eventSvc.addEventListener("columnPinned",t),this.eventSvc.addEventListener("columnVisible",t)},i=()=>{this.eventSvc.removeEventListener("cellSelectionChanged",e),this.eventSvc.removeEventListener("columnMoved",t),this.eventSvc.removeEventListener("columnPinned",t),this.eventSvc.removeEventListener("columnVisible",t)};this.addDestroyFunc(()=>i()),this.addManagedPropertyListeners(["enableRangeSelection","cellSelection"],()=>{zo(this.gos)?o():i()}),zo(this.gos)&&o()}}wireBeans(e){this.pageBounds=e.pageBounds,this.colModel=e.colModel,this.pinnedRowModel=e.pinnedRowModel,this.rowModel=e.rowModel,this.focusSvc=e.focusSvc,this.rowContainerHeight=e.rowContainerHeight,this.ctrlsSvc=e.ctrlsSvc}postConstruct(){this.ctrlsSvc.whenReady(this,e=>{this.gridBodyCtrl=e.gridBodyCtrl,this.initialise()})}initialise(){this.addManagedEventListeners({paginationChanged:this.onPageLoaded.bind(this),pinnedRowDataChanged:this.onPinnedRowDataChanged.bind(this),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this),bodyScroll:this.onBodyScroll.bind(this),bodyHeightChanged:this.redraw.bind(this,{})}),this.addManagedPropertyListeners(["domLayout","embedFullWidthRows"],()=>this.onDomLayoutChanged()),this.addManagedPropertyListeners(["suppressMaxRenderedRowRestriction","rowBuffer"],()=>this.redraw()),this.addManagedPropertyListener("suppressCellFocus",i=>this.onSuppressCellFocusChanged(i.currentValue)),this.addManagedPropertyListeners(["groupSuppressBlankHeader","getBusinessKeyForNode","fullWidthCellRenderer","fullWidthCellRendererParams","suppressStickyTotalRow","groupRowRenderer","groupRowRendererParams","loadingCellRenderer","loadingCellRendererParams","detailCellRenderer","detailCellRendererParams","enableRangeSelection","enableCellTextSelection"],()=>this.redrawRows()),this.addManagedPropertyListener("cellSelection",({currentValue:i,previousValue:s})=>{(!s&&i||s&&!i)&&this.redrawRows()});const{stickyRowSvc:e,gos:t,showRowGroupCols:o}=this.beans;if(o&&this.addManagedPropertyListener("showOpenedGroup",()=>{const i=o.getShowRowGroupCols();i.length&&this.refreshCells({columns:i,force:!0})}),e)this.stickyRowFeature=e.createStickyRowFeature(this,this.createRowCon.bind(this),this.destroyRowCtrls.bind(this));else{const i=this.gridBodyCtrl;i.setStickyTopHeight(0),i.setStickyBottomHeight(0)}this.registerCellEventListeners(),this.initialiseCache(),this.printLayout=We(t,"print"),this.embedFullWidthRows=this.printLayout||t.get("embedFullWidthRows"),this.redrawAfterModelUpdate()}initialiseCache(){if(this.gos.get("keepDetailRows")){const e=this.getKeepDetailRowsCount(),t=e??3;this.cachedRowCtrls=new Oy(t)}}getKeepDetailRowsCount(){return this.gos.get("keepDetailRowsCount")}getStickyTopRowCtrls(){return this.stickyRowFeature?.stickyTopRowCtrls??[]}getStickyBottomRowCtrls(){return this.stickyRowFeature?.stickyBottomRowCtrls??[]}updateAllRowCtrls(){const e=Object.values(this.rowCtrlsByRowIndex),t=Object.values(this.zombieRowCtrls),o=this.cachedRowCtrls?.getEntries()??[];t.length>0||o.length>0?this.allRowCtrls=[...e,...t,...o]:this.allRowCtrls=e}isCellBeingRendered(e,t){const o=this.rowCtrlsByRowIndex[e];return!t||!o?!!o:o.isFullWidth()?!0:!!this.beans.spannedRowRenderer?.getCellByPosition({rowIndex:e,column:t,rowPinned:null})||!!o.getCellCtrl(t)||!o.isRowRendered()}updateCellFocus(e){this.getAllCellCtrls().forEach(t=>t.onCellFocused(e)),this.getFullWidthRowCtrls().forEach(t=>t.onFullWidthRowFocused(e))}onCellFocusChanged(e){if(e&&e.rowIndex!=null&&!e.rowPinned){const t=this.beans.colModel.getCol(e.column)??void 0;this.isCellBeingRendered(e.rowIndex,t)||this.redraw()}this.updateCellFocus(e)}onSuppressCellFocusChanged(e){this.getAllCellCtrls().forEach(t=>t.onSuppressCellFocusChanged(e)),this.getFullWidthRowCtrls().forEach(t=>t.onSuppressCellFocusChanged(e))}registerCellEventListeners(){this.addManagedEventListeners({cellFocused:e=>this.onCellFocusChanged(e),cellFocusCleared:()=>this.updateCellFocus(),flashCells:e=>{const{cellFlashSvc:t}=this.beans;t&&this.getAllCellCtrls().forEach(o=>t.onFlashCells(o,e))},columnHoverChanged:()=>{this.getAllCellCtrls().forEach(e=>e.onColumnHover())},displayedColumnsChanged:()=>{this.getAllCellCtrls().forEach(e=>e.onDisplayedColumnsChanged())},displayedColumnsWidthChanged:()=>{this.printLayout&&this.getAllCellCtrls().forEach(e=>e.onLeftChanged())}}),this.setupRangeSelectionListeners(),this.refreshListenersToColumnsForCellComps(),this.addManagedEventListeners({gridColumnsChanged:this.refreshListenersToColumnsForCellComps.bind(this)}),this.addDestroyFunc(this.removeGridColumnListeners.bind(this))}removeGridColumnListeners(){this.destroyFuncsForColumnListeners.forEach(e=>e()),this.destroyFuncsForColumnListeners.length=0}refreshListenersToColumnsForCellComps(){this.removeGridColumnListeners(),this.colModel.getCols().forEach(t=>{const o=l=>{this.getAllCellCtrls().forEach(d=>{d.column===t&&l(d)})},i=()=>{o(l=>l.onLeftChanged())},s=()=>{o(l=>l.onWidthChanged())},n=()=>{o(l=>l.onFirstRightPinnedChanged())},r=()=>{o(l=>l.onLastLeftPinnedChanged())},a=()=>{o(l=>l.onColDefChanged())};t.__addEventListener("leftChanged",i),t.__addEventListener("widthChanged",s),t.__addEventListener("firstRightPinnedChanged",n),t.__addEventListener("lastLeftPinnedChanged",r),t.__addEventListener("colDefChanged",a),this.destroyFuncsForColumnListeners.push(()=>{t.__removeEventListener("leftChanged",i),t.__removeEventListener("widthChanged",s),t.__removeEventListener("firstRightPinnedChanged",n),t.__removeEventListener("lastLeftPinnedChanged",r),t.__removeEventListener("colDefChanged",a)})})}onDomLayoutChanged(){const e=We(this.gos,"print"),t=e||this.gos.get("embedFullWidthRows"),o=t!==this.embedFullWidthRows||this.printLayout!==e;this.printLayout=e,this.embedFullWidthRows=t,o&&this.redrawAfterModelUpdate({domLayoutChanged:!0})}datasourceChanged(){this.firstRenderedRow=0,this.lastRenderedRow=-1;const e=Object.keys(this.rowCtrlsByRowIndex);this.removeRowCtrls(e)}onPageLoaded(e){const t={recycleRows:e.keepRenderedRows,animate:e.animate,newData:e.newData,newPage:e.newPage,onlyBody:!0};this.redrawAfterModelUpdate(t)}getAllCellsNotSpanningForColumn(e){const t=[];return this.getAllRowCtrls().forEach(o=>{const i=o.getCellCtrl(e,!0)?.eGui;i&&t.push(i)}),t}refreshFloatingRowComps(){this.refreshFloatingRows(this.topRowCtrls,"top"),this.refreshFloatingRows(this.bottomRowCtrls,"bottom")}refreshFloatingRows(e,t){const{pinnedRowModel:o,beans:i,printLayout:s}=this,n=Object.fromEntries(e.map(a=>[a.rowNode.id,a]));o?.forEachPinnedRow(t,(a,l)=>{const d=e[l];d&&o.getPinnedRowById(d.rowNode.id,t)===void 0&&(d.destroyFirstPass(),d.destroySecondPass()),a.id in n?(e[l]=n[a.id],delete n[a.id]):e[l]=new Wr(a,i,!1,!1,s)});const r=(t==="top"?o?.getPinnedTopRowCount():o?.getPinnedBottomRowCount())??0;e.length=r}onPinnedRowDataChanged(){const e={recycleRows:!0};this.redrawAfterModelUpdate(e)}redrawRow(e,t=!1){if(e.sticky)this.stickyRowFeature?.refreshStickyNode(e);else if(this.cachedRowCtrls?.has(e)){this.cachedRowCtrls.removeRow(e);return}else{const o=i=>{const s=i[e.rowIndex];s&&s.rowNode===e&&(s.destroyFirstPass(),s.destroySecondPass(),i[e.rowIndex]=this.createRowCon(e,!1,!1))};switch(e.rowPinned){case"top":o(this.topRowCtrls);break;case"bottom":o(this.bottomRowCtrls);break;default:o(this.rowCtrlsByRowIndex),this.updateAllRowCtrls()}}t||this.dispatchDisplayedRowsChanged(!1)}redrawRows(e){if(e!=null){e?.forEach(o=>this.redrawRow(o,!0)),this.dispatchDisplayedRowsChanged(!1);return}this.redrawAfterModelUpdate()}redrawAfterModelUpdate(e={}){this.getLockOnRefresh();const t=this.beans.focusSvc?.getFocusCellToUseAfterRefresh();this.updateContainerHeights(),this.scrollToTopIfNewData(e);const o=!e.domLayoutChanged&&!!e.recycleRows,i=e.animate&&si(this.gos),s=o?this.getRowsToRecycle():null;o||this.removeAllRowComps(),this.workOutFirstAndLastRowsToRender();const{stickyRowFeature:n}=this;if(n){n.checkStickyRows();const r=n.extraTopHeight+n.extraBottomHeight;r&&this.updateContainerHeights(r)}this.recycleRows(s,i),this.gridBodyCtrl.updateRowCount(),e.onlyBody||this.refreshFloatingRowComps(),this.dispatchDisplayedRowsChanged(),t!=null&&this.restoreFocusedCell(t),this.releaseLockOnRefresh()}scrollToTopIfNewData(e){const t=e.newData||e.newPage,o=this.gos.get("suppressScrollOnNewData");t&&!o&&(this.gridBodyCtrl.scrollFeature.scrollToTop(),this.stickyRowFeature?.resetOffsets())}updateContainerHeights(e=0){const{rowContainerHeight:t}=this;if(this.printLayout){t.setModelHeight(null);return}let o=this.pageBounds.getCurrentPageHeight();o===0&&(o=1),t.setModelHeight(o+e)}getLockOnRefresh(){if(this.refreshInProgress)throw new Error(wo(252));this.refreshInProgress=!0,this.beans.frameworkOverrides.getLockOnRefresh?.()}releaseLockOnRefresh(){this.refreshInProgress=!1,this.beans.frameworkOverrides.releaseLockOnRefresh?.()}isRefreshInProgress(){return this.refreshInProgress}restoreFocusedCell(e){if(!e)return;const t=this.beans.focusSvc,o=this.findPositionToFocus(e);if(!o){t.focusHeaderPosition({headerPosition:{headerRowIndex:Vt(this.beans)-1,column:e.column}});return}if(e.rowIndex!==o.rowIndex||e.rowPinned!=o.rowPinned){t.setFocusedCell({...o,preventScrollOnBrowserFocus:!0,forceBrowserFocus:!0});return}t.doesRowOrCellHaveBrowserFocus()||this.updateCellFocus(Z(this.gos,{...o,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0,type:"cellFocused"}))}findPositionToFocus(e){const{pagination:t,pageBounds:o}=this.beans;let i=e;for(i.rowPinned==null&&t&&o&&!t.isRowInPage(i.rowIndex)&&(i={rowPinned:null,rowIndex:o.getFirstRow()});i;){if(i.rowPinned==null&&o)if(i.rowIndex<o.getFirstRow()){if(i=fn(this.beans,{rowPinned:null,rowIndex:0}),!i)return null}else i.rowIndex>o.getLastRow()&&(i={rowPinned:null,rowIndex:o.getLastRow()});const s=this.getRowByPosition(i);if(s?.isAlive())return{...s.getRowPosition(),column:e.column};i=fn(this.beans,i)}return null}getAllCellCtrls(){const e=[],t=this.getAllRowCtrls(),o=t.length;for(let i=0;i<o;i++){const s=t[i].getAllCellCtrls(),n=s.length;for(let r=0;r<n;r++)e.push(s[r])}return e}getAllRowCtrls(){const{spannedRowRenderer:e}=this.beans,t=this.getStickyTopRowCtrls(),o=this.getStickyBottomRowCtrls();return[...this.topRowCtrls,...this.bottomRowCtrls,...t,...o,...e?.getCtrls("top")??[],...e?.getCtrls("bottom")??[],...e?.getCtrls("center")??[],...Object.values(this.rowCtrlsByRowIndex)]}addRenderedRowListener(e,t,o){const i=this.rowCtrlsByRowIndex[t];i&&i.addEventListener(e,o)}refreshCells(e={}){const t={forceRefresh:e.force,newData:!1,suppressFlash:e.suppressFlash};for(const o of this.getCellCtrls(e.rowNodes,e.columns))o.refreshOrDestroyCell(t);this.refreshFullWidth(e.rowNodes)}refreshFullWidth(e){if(!e)return;let t=!1;for(const o of this.getRowCtrls(e)){if(!o.isFullWidth())continue;o.refreshFullWidth()||(t=!0,this.redrawRow(o.rowNode,!0))}t&&this.dispatchDisplayedRowsChanged(!1)}getRowCtrls(e){const t=_l(e),o=this.getAllRowCtrls();return!e||!t?o:o.filter(i=>{const s=i.rowNode;return zl(s,t)})}getCellCtrls(e,t){let o;j(t)&&(o={},t.forEach(s=>{const n=this.colModel.getCol(s);j(n)&&(o[n.getId()]=!0)}));const i=[];return this.getRowCtrls(e).forEach(s=>{s.getAllCellCtrls().forEach(n=>{const r=n.column.getId();o&&!o[r]||i.push(n)})}),i}destroy(){this.removeAllRowComps(!0),super.destroy()}removeAllRowComps(e=!1){const t=Object.keys(this.rowCtrlsByRowIndex);this.removeRowCtrls(t,e),this.stickyRowFeature?.destroyStickyCtrls()}getRowsToRecycle(){const e=[];for(const o of Object.keys(this.rowCtrlsByRowIndex))this.rowCtrlsByRowIndex[o].rowNode.id==null&&e.push(o);this.removeRowCtrls(e);const t={};for(const o of Object.values(this.rowCtrlsByRowIndex)){const i=o.rowNode;t[i.id]=o}return this.rowCtrlsByRowIndex={},t}removeRowCtrls(e,t=!1){e.forEach(o=>{const i=this.rowCtrlsByRowIndex[o];i&&(i.destroyFirstPass(t),i.destroySecondPass()),delete this.rowCtrlsByRowIndex[o]})}onBodyScroll(e){e.direction==="vertical"&&this.redraw({afterScroll:!0})}redraw(e={}){const{focusSvc:t,animationFrameSvc:o}=this.beans,{afterScroll:i}=e;let s;const n=this.stickyRowFeature;n&&(s=t?.getFocusCellToUseAfterRefresh()||void 0);const r=this.firstRenderedRow,a=this.lastRenderedRow;this.workOutFirstAndLastRowsToRender();let l=!1;if(n){l=n.checkStickyRows();const c=n.extraTopHeight+n.extraBottomHeight;c&&this.updateContainerHeights(c)}const d=this.firstRenderedRow!==r||this.lastRenderedRow!==a;if(!(i&&!l&&!d)&&(this.getLockOnRefresh(),this.recycleRows(null,!1,i),this.releaseLockOnRefresh(),this.dispatchDisplayedRowsChanged(i&&!l),s!=null)){const c=t?.getFocusCellToUseAfterRefresh();s!=null&&c==null&&(o?.flushAllFrames(),this.restoreFocusedCell(s))}}removeRowCompsNotToDraw(e,t){const o={};e.forEach(n=>o[n]=!0);const s=Object.keys(this.rowCtrlsByRowIndex).filter(n=>!o[n]);this.removeRowCtrls(s,t)}calculateIndexesToDraw(e){const t=[];for(let r=this.firstRenderedRow;r<=this.lastRenderedRow;r++)t.push(r);const o=this.beans.pagination,i=this.beans.focusSvc?.getFocusedCell()?.rowIndex;i!=null&&(i<this.firstRenderedRow||i>this.lastRenderedRow)&&(!o||o.isRowInPage(i))&&t.push(i);const s=r=>{const a=r.rowNode.rowIndex;a==null||a===i||(a<this.firstRenderedRow||a>this.lastRenderedRow)&&this.doNotUnVirtualiseRow(r)&&t.push(a)};for(const r of Object.values(this.rowCtrlsByRowIndex))s(r);if(e)for(const r of Object.values(e))s(r);t.sort((r,a)=>r-a);const n=[];for(let r=0;r<t.length;r++){const a=t[r],l=this.rowModel.getRow(a);l&&!l.sticky&&n.push(a)}return n}recycleRows(e,t=!1,o=!1){const i=this.calculateIndexesToDraw(e);if((this.printLayout||o)&&(t=!1),this.removeRowCompsNotToDraw(i,!t),i.forEach(s=>{this.createOrUpdateRowCtrl(s,e,t,o)}),e){const{animationFrameSvc:s}=this.beans;s?.active&&o&&!this.printLayout?s.addDestroyTask(()=>{this.destroyRowCtrls(e,t),this.updateAllRowCtrls(),this.dispatchDisplayedRowsChanged()}):this.destroyRowCtrls(e,t)}this.updateAllRowCtrls()}dispatchDisplayedRowsChanged(e=!1){this.eventSvc.dispatchEvent({type:"displayedRowsChanged",afterScroll:e})}onDisplayedColumnsChanged(){const{visibleCols:e}=this.beans,t=e.isPinningLeft(),o=e.isPinningRight();(this.pinningLeft!==t||o!==this.pinningRight)&&(this.pinningLeft=t,this.pinningRight=o,this.embedFullWidthRows&&this.redrawFullWidthEmbeddedRows())}redrawFullWidthEmbeddedRows(){const e=[];this.getFullWidthRowCtrls().forEach(t=>{const o=t.rowNode.rowIndex;e.push(o.toString())}),this.refreshFloatingRowComps(),this.removeRowCtrls(e),this.redraw({afterScroll:!0})}getFullWidthRowCtrls(e){const t=_l(e);return this.getAllRowCtrls().filter(o=>{if(!o.isFullWidth())return!1;const i=o.rowNode;return!(t!=null&&!zl(i,t))})}createOrUpdateRowCtrl(e,t,o,i){let s,n=this.rowCtrlsByRowIndex[e];if(n||(s=this.rowModel.getRow(e),j(s)&&j(t)&&t[s.id]&&s.alreadyRendered&&(n=t[s.id],t[s.id]=null)),!n)if(s||(s=this.rowModel.getRow(e)),j(s))n=this.createRowCon(s,o,i);else return;return s&&(s.alreadyRendered=!0),this.rowCtrlsByRowIndex[e]=n,n}destroyRowCtrls(e,t){const o=[];if(e){for(const i of Object.values(e))if(i){if(this.cachedRowCtrls&&i.isCacheable()){this.cachedRowCtrls.addRow(i);continue}if(i.destroyFirstPass(!t),t){const s=i.instanceId;this.zombieRowCtrls[s]=i,o.push(()=>{i.destroySecondPass(),delete this.zombieRowCtrls[s]})}else i.destroySecondPass()}}t&&(o.push(()=>{this.updateAllRowCtrls(),this.dispatchDisplayedRowsChanged()}),window.setTimeout(()=>o.forEach(i=>i()),ky))}getRowBuffer(){return this.gos.get("rowBuffer")}getRowBufferInPixels(){const e=this.getRowBuffer(),t=So(this.beans);return e*t}workOutFirstAndLastRowsToRender(){const{rowContainerHeight:e,pageBounds:t,rowModel:o}=this;e.updateOffset();let i,s;if(!o.isRowsToRender())i=0,s=-1;else if(this.printLayout)this.beans.environment.refreshRowHeightVariable(),i=t.getFirstRow(),s=t.getLastRow();else{const c=this.getRowBufferInPixels(),u=this.ctrlsSvc.getScrollFeature(),p=this.gos.get("suppressRowVirtualisation");let g=!1,f,m;do{const x=t.getPixelOffset(),{pageFirstPixel:T,pageLastPixel:A}=t.getCurrentPagePixelRange(),P=e.divStretchOffset,y=u.getVScrollPosition(),w=y.top,R=y.bottom;p?(f=T+P,m=A+P):(f=Math.max(w+x-c,T)+P,m=Math.min(R+x+c,A)+P),this.firstVisibleVPixel=Math.max(w+x,T)+P,this.lastVisibleVPixel=Math.min(R+x,A)+P,g=this.ensureAllRowsInRangeHaveHeightsCalculated(f,m)}while(g);let C=o.getRowIndexAtPixel(f),v=o.getRowIndexAtPixel(m);const S=t.getFirstRow(),b=t.getLastRow();C<S&&(C=S),v>b&&(v=b),i=C,s=v}const n=We(this.gos,"normal"),r=this.gos.get("suppressMaxRenderedRowRestriction"),a=Math.max(this.getRowBuffer(),500);n&&!r&&s-i>a&&(s=i+a);const l=i!==this.firstRenderedRow,d=s!==this.lastRenderedRow;(l||d)&&(this.firstRenderedRow=i,this.lastRenderedRow=s,this.eventSvc.dispatchEvent({type:"viewportChanged",firstRow:i,lastRow:s}))}dispatchFirstDataRenderedEvent(){this.dataFirstRenderedFired||(this.dataFirstRenderedFired=!0,Tt(this.beans,()=>{this.beans.eventSvc.dispatchEvent({type:"firstDataRendered",firstRow:this.firstRenderedRow,lastRow:this.lastRenderedRow})}))}ensureAllRowsInRangeHaveHeightsCalculated(e,t){const o=this.pinnedRowModel?.ensureRowHeightsValid(),i=this.stickyRowFeature?.ensureRowHeightsValid(),{pageBounds:s,rowModel:n}=this,r=n.ensureRowHeightsValid(e,t,s.getFirstRow(),s.getLastRow());return(r||i)&&this.eventSvc.dispatchEvent({type:"recalculateRowBounds"}),i||r||o?(this.updateContainerHeights(),!0):!1}doNotUnVirtualiseRow(e){const i=e.rowNode,s=this.focusSvc.isRowFocused(i.rowIndex,i.rowPinned),n=e.editing,r=i.detail;return s||n||r?!!this.isRowPresent(i):!1}isRowPresent(e){return this.rowModel.isRowPresent(e)?this.beans.pagination?.isRowInPage(e.rowIndex)??!0:!1}createRowCon(e,t,o){const i=this.cachedRowCtrls?.getRow(e)??null;if(i)return i;const s=o&&!this.printLayout&&!!this.beans.animationFrameSvc?.active;return new Wr(e,this.beans,t,s,this.printLayout)}getRenderedNodes(){const e=Object.values(this.rowCtrlsByRowIndex).map(i=>i.rowNode),t=this.getStickyTopRowCtrls().map(i=>i.rowNode),o=this.getStickyBottomRowCtrls().map(i=>i.rowNode);return[...t,...e,...o]}getRowByPosition(e){let t;const{rowIndex:o}=e;switch(e.rowPinned){case"top":t=this.topRowCtrls[o];break;case"bottom":t=this.bottomRowCtrls[o];break;default:t=this.rowCtrlsByRowIndex[o],t||(t=this.getStickyTopRowCtrls().find(i=>i.rowNode.rowIndex===o)||null,t||(t=this.getStickyBottomRowCtrls().find(i=>i.rowNode.rowIndex===o)||null));break}return t}isRangeInRenderedViewport(e,t){if(e==null||t==null)return!1;const i=e>this.lastRenderedRow;return!(t<this.firstRenderedRow)&&!i}},Oy=class{constructor(e){this.entriesMap={},this.entriesList=[],this.maxCount=e}addRow(e){if(this.entriesMap[e.rowNode.id]=e,this.entriesList.push(e),e.setCached(!0),this.entriesList.length>this.maxCount){const t=this.entriesList[0];t.destroyFirstPass(),t.destroySecondPass(),this.removeFromCache(t)}}getRow(e){if(e==null||e.id==null)return null;const t=this.entriesMap[e.id];return t?(this.removeFromCache(t),t.setCached(!1),t.rowNode!=e?null:t):null}has(e){return this.entriesMap[e.id]!=null}removeRow(e){const t=e.id,o=this.entriesMap[t];delete this.entriesMap[t],st(this.entriesList,o)}removeFromCache(e){const t=e.rowNode.id;delete this.entriesMap[t],st(this.entriesList,e)}getEntries(){return this.entriesList}};function _l(e){if(!e)return;const t={top:{},bottom:{},normal:{}};return e.forEach(o=>{const i=o.id;switch(o.rowPinned){case"top":t.top[i]=o;break;case"bottom":t.bottom[i]=o;break;default:t.normal[i]=o;break}}),t}function zl(e,t){const o=e.id;switch(e.rowPinned){case"top":return t.top[o]!=null;case"bottom":return t.bottom[o]!=null;default:return t.normal[o]!=null}}var By=class extends M{constructor(){super(...arguments),this.beanName="rowNodeSorter"}postConstruct(){const{gos:e}=this;this.isAccentedSort=e.get("accentedSort"),this.primaryColumnsSortGroups=Mt(e),this.addManagedPropertyListener("accentedSort",t=>this.isAccentedSort=t.currentValue),this.addManagedPropertyListener("autoGroupColumnDef",()=>this.primaryColumnsSortGroups=Mt(e))}doFullSort(e,t){const o=e.map((i,s)=>({currentPos:s,rowNode:i}));return o.sort(this.compareRowNodes.bind(this,t)),o.map(i=>i.rowNode)}compareRowNodes(e,t,o){const i=t.rowNode,s=o.rowNode;for(let n=0,r=e.length;n<r;n++){const a=e[n],l=a.sort==="desc",d=this.getValue(i,a.column),c=this.getValue(s,a.column);let u;const p=this.getComparator(a,i);if(p?u=p(d,c,i,s,l):u=Gs(d,c,this.isAccentedSort),!isNaN(u)&&u!==0)return a.sort==="asc"?u:u*-1}return t.currentPos-o.currentPos}getComparator(e,t){const o=e.column,i=o.getColDef().comparator;if(i!=null)return i;if(!o.getColDef().showRowGroup)return;const s=!t.group&&o.getColDef().field;if(!s)return;const n=this.beans.colModel.getColDefCol(s);if(n)return n.getColDef().comparator}getValue(e,t){const{valueSvc:o,colModel:i,showRowGroupCols:s,gos:n}=this.beans;if(!this.primaryColumnsSortGroups)return o.getValue(t,e,!1);if(e.rowGroupColumn===t){if(Tn(n,i.isPivotActive())){const d=e.allLeafChildren?.[0];return d?o.getValue(t,d,!1):void 0}const l=s?.getShowRowGroupCol(t.getId());return l?e.groupData?.[l.getId()]:void 0}if(!(e.group&&t.getColDef().showRowGroup))return o.getValue(t,e,!1)}};function Ny(e){e.sortSvc?.onSortChanged("api")}var Di=(e,t)=>({tag:"span",ref:`eSort${e}`,cls:`ag-sort-indicator-icon ag-sort-${t} ag-hidden`,attrs:{"aria-hidden":"true"}}),Hy={tag:"span",cls:"ag-sort-indicator-container",children:[Di("Order","order"),Di("Asc","ascending-icon"),Di("Desc","descending-icon"),Di("Mixed","mixed-icon"),Di("None","none-icon")]},Va=class extends pe{constructor(e){super(),this.eSortOrder=O,this.eSortAsc=O,this.eSortDesc=O,this.eSortMixed=O,this.eSortNone=O,e||this.setTemplate(Hy)}attachCustomElements(e,t,o,i,s){this.eSortOrder=e,this.eSortAsc=t,this.eSortDesc=o,this.eSortMixed=i,this.eSortNone=s}setupSort(e,t=!1){if(this.column=e,this.suppressOrder=t,this.setupMultiSortIndicator(),!e.isSortable()&&!e.getColDef().showRowGroup)return;this.addInIcon("sortAscending",this.eSortAsc,e),this.addInIcon("sortDescending",this.eSortDesc,e),this.addInIcon("sortUnSort",this.eSortNone,e);const o=this.updateIcons.bind(this),i=this.onSortChanged.bind(this);this.addManagedPropertyListener("unSortIcon",o),this.addManagedEventListeners({newColumnsLoaded:o,sortChanged:i,columnRowGroupChanged:i}),this.onSortChanged()}addInIcon(e,t,o){if(t==null)return;const i=oe(e,this.beans,o);i&&t.appendChild(i)}onSortChanged(){this.updateIcons(),this.suppressOrder||this.updateSortOrder()}updateIcons(){const{eSortAsc:e,eSortDesc:t,eSortNone:o,column:i,gos:s,beans:n}=this,r=n.sortSvc.getDisplaySortForColumn(i);if(e&&he(e,r==="asc",{skipAriaHidden:!0}),t&&he(t,r==="desc",{skipAriaHidden:!0}),o){const a=!i.getColDef().unSortIcon&&!s.get("unSortIcon"),l=r==null;he(o,!a&&l,{skipAriaHidden:!0})}}setupMultiSortIndicator(){const{eSortMixed:e,column:t,gos:o}=this;this.addInIcon("sortUnSort",e,t);const i=t.getColDef().showRowGroup;Mt(o)&&i&&(this.addManagedEventListeners({sortChanged:this.updateMultiSortIndicator.bind(this),columnRowGroupChanged:this.updateMultiSortIndicator.bind(this)}),this.updateMultiSortIndicator())}updateMultiSortIndicator(){const{eSortMixed:e,beans:t,column:o}=this;if(e){const i=t.sortSvc.getDisplaySortForColumn(o)==="mixed";he(e,i,{skipAriaHidden:!0})}}updateSortOrder(){const{eSortOrder:e,column:t,beans:{sortSvc:o}}=this;if(!e)return;const i=o.getColumnsWithSortingOrdered(),s=o.getDisplaySortIndexForColumn(t)??-1,n=i.some(a=>o.getDisplaySortIndexForColumn(a)??!1),r=s>=0&&n;he(e,r,{skipAriaHidden:!0}),s>=0?e.textContent=(s+1).toString():ct(e)}},Vy={selector:"AG-SORT-INDICATOR",component:Va},as=["asc","desc",null],_y=class extends M{constructor(){super(...arguments),this.beanName="sortSvc"}progressSort(e,t,o){const i=this.getNextSortDirection(e);this.setSortForColumn(e,i,t,o)}progressSortFromEvent(e,t){const i=this.gos.get("multiSortKey")==="ctrl"?t.ctrlKey||t.metaKey:t.shiftKey;this.progressSort(e,i,"uiColumnSorted")}setSortForColumn(e,t,o,i){t!=="asc"&&t!=="desc"&&(t=null);const{gos:s,showRowGroupCols:n}=this.beans,r=Mt(s);let a=[e];if(r&&e.getColDef().showRowGroup){const u=n?.getSourceColumnsForGroupColumn?.(e)?.filter(p=>p.isSortable());u&&(a=[e,...u])}a.forEach(c=>this.setColSort(c,t,i));const l=(o||s.get("alwaysMultiSort"))&&!s.get("suppressMultiSort"),d=[];if(!l){const c=this.clearSortBarTheseColumns(a,i);d.push(...c)}this.updateSortIndex(e),d.push(...a),this.dispatchSortChangedEvents(i,d)}updateSortIndex(e){const{gos:t,colModel:o,showRowGroupCols:i}=this.beans,s=Mt(t),n=i?.getShowRowGroupCol(e.getId()),r=s&&n||e,a=this.getColumnsWithSortingOrdered();o.forAllCols(c=>this.setColSortIndex(c,null));const l=a.filter(c=>s&&c.getColDef().showRowGroup?!1:c!==r);(r.getSort()?[...l,r]:l).forEach((c,u)=>this.setColSortIndex(c,u))}onSortChanged(e,t){this.dispatchSortChangedEvents(e,t)}isSortActive(){let e=!1;return this.beans.colModel.forAllCols(t=>{t.getSort()&&(e=!0)}),e}dispatchSortChangedEvents(e,t){const o={type:"sortChanged",source:e};t&&(o.columns=t),this.eventSvc.dispatchEvent(o)}clearSortBarTheseColumns(e,t){const o=[];return this.beans.colModel.forAllCols(i=>{e.includes(i)||(i.getSort()&&o.push(i),this.setColSort(i,void 0,t))}),o}getNextSortDirection(e){const t=e.getColDef().sortingOrder??this.gos.get("sortingOrder")??as,o=t.indexOf(e.getSort()),i=o<0,s=o==t.length-1;return i||s?t[0]:t[o+1]}getIndexedSortMap(){const{gos:e,colModel:t,showRowGroupCols:o,rowGroupColsSvc:i}=this.beans;let s=[];if(t.forAllCols(d=>{d.getSort()&&s.push(d)}),t.isPivotMode()){const d=Mt(e);s=s.filter(c=>{const u=!!c.getAggFunc(),p=!c.isPrimary(),g=d?o?.getShowRowGroupCol(c.getId()):c.getColDef().showRowGroup;return u||p||g})}const n=i?.columns.filter(d=>!!d.getSort())??[],r={};s.forEach((d,c)=>r[d.getId()]=c),s.sort((d,c)=>{const u=d.getSortIndex(),p=c.getSortIndex();if(u!=null&&p!=null)return u-p;if(u==null&&p==null){const g=r[d.getId()],f=r[c.getId()];return g>f?1:-1}else return p==null?-1:1});const a=Mt(e)&&!!n.length;a&&(s=[...new Set(s.map(d=>o?.getShowRowGroupCol(d.getId())??d))]);const l=new Map;return s.forEach((d,c)=>l.set(d,c)),a&&n.forEach(d=>{const c=o.getShowRowGroupCol(d.getId());l.set(d,l.get(c))}),l}getColumnsWithSortingOrdered(){return[...this.getIndexedSortMap().entries()].sort(([,e],[,t])=>e-t).map(([e])=>e)}getSortModel(){return this.getColumnsWithSortingOrdered().filter(e=>e.getSort()).map(e=>({sort:e.getSort(),colId:e.getId()}))}getSortOptions(){return this.getColumnsWithSortingOrdered().filter(e=>e.getSort()).map(e=>({sort:e.getSort(),column:e}))}canColumnDisplayMixedSort(e){const t=Mt(this.gos),o=!!e.getColDef().showRowGroup;return t&&o}getDisplaySortForColumn(e){const t=this.beans.showRowGroupCols?.getSourceColumnsForGroupColumn(e);if(!this.canColumnDisplayMixedSort(e)||!t?.length)return e.getSort();const i=e.getColDef().field!=null||!!e.getColDef().valueGetter?[e,...t]:t,s=i[0].getSort();return i.every(r=>r.getSort()==s)?s:"mixed"}getDisplaySortIndexForColumn(e){return this.getIndexedSortMap().get(e)}setupHeader(e,t,o){let i=0;e.addManagedListeners(t,{movingChanged:()=>{i=Date.now()}}),o&&e.addManagedElementListeners(o,{click:n=>{const r=t.isMoving(),l=Date.now()-i<50;r||l||this.progressSortFromEvent(t,n)}});const s=()=>{const n=t.getSort();if(e.addOrRemoveCssClass("ag-header-cell-sorted-asc",n==="asc"),e.addOrRemoveCssClass("ag-header-cell-sorted-desc",n==="desc"),e.addOrRemoveCssClass("ag-header-cell-sorted-none",!n),t.getColDef().showRowGroup){const l=!this.beans.showRowGroupCols?.getSourceColumnsForGroupColumn(t)?.every(d=>t.getSort()==d.getSort());e.addOrRemoveCssClass("ag-header-cell-sorted-mixed",l)}};e.addManagedEventListeners({sortChanged:s,columnRowGroupChanged:s})}initCol(e){const{sort:t,initialSort:o,sortIndex:i,initialSortIndex:s}=e.colDef;t!==void 0?(t==="asc"||t==="desc")&&(e.sort=t):(o==="asc"||o==="desc")&&(e.sort=o),i!==void 0?i!==null&&(e.sortIndex=i):s!==null&&(e.sortIndex=s)}updateColSort(e,t,o){t!==void 0&&(t==="desc"||t==="asc"?this.setColSort(e,t,o):this.setColSort(e,void 0,o))}setColSort(e,t,o){e.sort!==t&&(e.sort=t,e.dispatchColEvent("sortChanged",o)),e.dispatchStateUpdatedEvent("sort")}setColSortIndex(e,t){e.sortIndex=t,e.dispatchStateUpdatedEvent("sortIndex")}createSortIndicator(e){return new Va(e)}getSortIndicatorSelector(){return Vy}},_a={moduleName:"Sort",version:ne,beans:[_y,By],apiFunctions:{onSortChanged:Ny},userComponents:{agSortIndicator:Va},icons:{sortAscending:"asc",sortDescending:"desc",sortUnSort:"none"}},zy=class extends M{constructor(){super(...arguments),this.beanName="syncSvc",this.waitingForColumns=!1}postConstruct(){this.addManagedPropertyListener("columnDefs",e=>this.setColumnDefs(e))}start(){this.beans.ctrlsSvc.whenReady(this,()=>{const e=this.gos.get("columnDefs");e?this.setColumnsAndData(e):this.waitingForColumns=!0,this.gridReady()})}setColumnsAndData(e){const{colModel:t,rowModel:o}=this.beans;t.setColumnDefs(e??[],"gridInitializing"),o.start()}gridReady(){const{eventSvc:e,gos:t}=this;e.dispatchEvent({type:"gridReady"}),Zi(t,`initialised successfully, enterprise = ${t.isModuleRegistered("EnterpriseCore")}`)}setColumnDefs(e){const t=this.gos.get("columnDefs");if(t){if(this.waitingForColumns){this.waitingForColumns=!1,this.setColumnsAndData(t);return}this.beans.colModel.setColumnDefs(t,No(e.source))}}},Ku=class{constructor(e,t){this.active=!0,this.nodeIdsToColumns={},this.mapToItems={},this.keepingColumns=e,this.pathRoot={rowNode:t,children:null},this.mapToItems[t.id]=this.pathRoot}depthFirstSearchChangedPath(e,t){const{rowNode:o,children:i}=e;if(i)for(let s=0;s<i.length;++s)this.depthFirstSearchChangedPath(i[s],t);t(o)}depthFirstSearchEverything(e,t,o){const i=e.childrenAfterGroup;if(i)for(let s=0,n=i.length;s<n;++s){const r=i[s];r.childrenAfterGroup?this.depthFirstSearchEverything(r,t,o):o&&t(r)}t(e)}forEachChangedNodeDepthFirst(e,t=!1,o=!1){this.active&&!o?this.depthFirstSearchChangedPath(this.pathRoot,e):this.depthFirstSearchEverything(this.pathRoot.rowNode,e,t)}executeFromRootNode(e){e(this.pathRoot.rowNode)}createPathItems(e){let t=e,o=0;for(;!this.mapToItems[t.id];){const i={rowNode:t,children:null};this.mapToItems[t.id]=i,o++,t=t.parent}return o}populateColumnsMap(e,t){if(!this.keepingColumns||!t)return;let o=e;for(;o;)this.nodeIdsToColumns[o.id]||(this.nodeIdsToColumns[o.id]={}),t.forEach(i=>this.nodeIdsToColumns[o.id][i.getId()]=!0),o=o.parent}linkPathItems(e,t){let o=e;for(let i=0;i<t;i++){const s=this.mapToItems[o.id],n=this.mapToItems[o.parent.id];n.children||(n.children=[]),n.children.push(s),o=o.parent}}addParentNode(e,t){if(!e||e.isRowPinned())return;const o=this.createPathItems(e);this.linkPathItems(e,o),this.populateColumnsMap(e,t)}canSkip(e){return this.active&&!this.mapToItems[e.id]}getValueColumnsForNode(e,t){if(!this.keepingColumns)return t;const o=this.nodeIdsToColumns[e.id];return t.filter(s=>o[s.getId()])}getNotValueColumnsForNode(e,t){if(!this.keepingColumns)return null;const o=this.nodeIdsToColumns[e.id];return t.filter(s=>!o[s.getId()])}},Wy="paste",Uy=class extends M{constructor(){super(...arguments),this.beanName="changeDetectionSvc",this.clientSideRowModel=null}postConstruct(){const{gos:e,rowModel:t}=this.beans;Lt(e)&&(this.clientSideRowModel=t),this.addManagedEventListeners({cellValueChanged:this.onCellValueChanged.bind(this)})}onCellValueChanged(e){const{gos:t,rowRenderer:o}=this.beans;if(e.source===Wy||t.get("suppressChangeDetection"))return;const i=e.node,s=[i],n=this.clientSideRowModel,r=n?.rootNode;if(r&&!i.isRowPinned()){const a=t.get("aggregateOnlyChangedColumns"),l=new Ku(a,r);l.addParentNode(i.parent,[e.column]),n.doAggregate(l),l.forEachChangedNodeDepthFirst(d=>{s.push(d),d.sibling&&s.push(d.sibling)})}o.refreshCells({rowNodes:s})}},$y=class extends M{constructor(){super(...arguments),this.beanName="expressionSvc",this.cache={}}evaluate(e,t){if(typeof e=="string")return this.evaluateExpression(e,t);ae(15,{expression:e})}evaluateExpression(e,t){try{return this.createExpressionFunction(e)(t.value,t.context,t.oldValue,t.newValue,t.value,t.node,t.data,t.colDef,t.rowIndex,t.api,t.getValue,t.column,t.columnGroup)}catch(o){return ae(16,{expression:e,params:t,e:o}),null}}createExpressionFunction(e){const t=this.cache;if(t[e])return t[e];const o=this.createFunctionBody(e),i=new Function("x, ctx, oldValue, newValue, value, node, data, colDef, rowIndex, api, getValue, column, columnGroup",o);return t[e]=i,i}createFunctionBody(e){return e.indexOf("return")>=0?e:"return "+e+";"}},jy={moduleName:"Expression",version:ne,beans:[$y]},Ky={moduleName:"ChangeDetection",version:ne,beans:[Uy]},Yy=class extends M{constructor(){super(...arguments),this.beanName="valueSvc",this.initialised=!1,this.isSsrm=!1}wireBeans(e){this.expressionSvc=e.expressionSvc,this.colModel=e.colModel,this.valueCache=e.valueCache,this.dataTypeSvc=e.dataTypeSvc}postConstruct(){this.initialised||this.init()}init(){this.executeValueGetter=this.valueCache?this.executeValueGetterWithValueCache.bind(this):this.executeValueGetterWithoutValueCache.bind(this),this.isSsrm=pt(this.gos),this.cellExpressions=this.gos.get("enableCellExpressions"),this.isTreeData=this.gos.get("treeData"),this.initialised=!0;const e=t=>this.callColumnCellValueChangedHandler(t);this.eventSvc.addEventListener("cellValueChanged",e,!0),this.addDestroyFunc(()=>this.eventSvc.removeEventListener("cellValueChanged",e,!0)),this.addManagedPropertyListener("treeData",t=>this.isTreeData=t.currentValue)}getValueForDisplay(e,t){const o=e.getColDef().showRowGroup;if(o!=null){if(typeof o=="string"){const l=this.getDisplayedNode(t,e,!0);if(l)return this.getValue(e,l)}const a=this.getValue(e,t);if(a==null){const l=this.getDisplayedNode(t,e);if(l)return this.getValue(e,l)}return a}const i=t.leafGroup&&this.colModel.isPivotMode(),s=t.group&&t.expanded&&!t.footer&&!i,n=this.gos.get("groupSuppressBlankHeader")||!t.sibling,r=s&&!n;return this.getValue(e,t,r)}getValue(e,t,o=!1){if(this.initialised||this.init(),!t)return;const i=e.getColDef(),s=i.field,n=e.getColId(),r=t.data;let a;const l=i.showRowGroup;if(typeof l=="string"&&(this.beans.rowGroupColsSvc?.getColumnIndex(l)??-1)>t.level)return null;const d=t.groupData&&t.groupData[n]!==void 0,c=!o&&t.aggData&&t.aggData[n]!==void 0,u=this.isSsrm&&o&&!!e.getColDef().aggFunc,p=this.isSsrm&&t.footer&&t.field&&(e.getColDef().showRowGroup===!0||e.getColDef().showRowGroup===t.field);if(this.isTreeData&&c?a=t.aggData[n]:this.isTreeData&&i.valueGetter?a=this.executeValueGetter(i.valueGetter,r,e,t):this.isTreeData&&s&&r?a=Ni(r,s,e.isFieldContainsDots()):d?a=t.groupData[n]:c?a=t.aggData[n]:i.valueGetter?a=this.executeValueGetter(i.valueGetter,r,e,t):p?a=Ni(r,t.field,e.isFieldContainsDots()):s&&r&&!u&&(a=Ni(r,s,e.isFieldContainsDots())),this.cellExpressions&&typeof a=="string"&&a.indexOf("=")===0){const g=a.substring(1);a=this.executeValueGetter(g,r,e,t)}return a}parseValue(e,t,o,i){const s=e.getColDef(),n=s.valueParser;if(j(n)){const r=Z(this.gos,{node:t,data:t?.data,oldValue:i,newValue:o,colDef:s,column:e});return typeof n=="function"?n(r):this.expressionSvc?.evaluate(n,r)}return o}getDeleteValue(e,t){return j(e.getColDef().valueParser)?this.parseValue(e,t,"",this.getValueForDisplay(e,t))??null:null}formatValue(e,t,o,i,s=!0){let n=null,r;const a=e.getColDef();if(i?r=i:s&&(r=a.valueFormatter),r){const l=Z(this.gos,{value:o,node:t,data:t?t.data:null,colDef:a,column:e});typeof r=="function"?n=r(l):n=this.expressionSvc?this.expressionSvc.evaluate(r,l):null}else if(a.refData)return a.refData[o]||"";return n==null&&Array.isArray(o)&&(n=o.join(", ")),n}getDisplayedNode(e,t,o=!1){const i=this.gos,s=i.get("groupHideOpenParents"),n=i.get("showOpenedGroup")&&!o;if(!s&&!n)return;const r=t.colDef.showRowGroup;if(r===!0)return e.group?void 0:e.parent??void 0;let a=e;for(;a&&a.rowGroupColumn?.getId()!=r;){const l=a===a.parent?.childrenAfterSort?.[0];if(!n&&!l)return;a=a.parent}if(a!==e)return a??void 0}setValue(e,t,o,i){const s=this.colModel.getColDefCol(t);if(!e||!s)return!1;Me(e.data)&&(e.data={});const{field:n,valueSetter:r}=s.getColDef();if(Me(n)&&Me(r))return _(17),!1;if(this.dataTypeSvc&&!this.dataTypeSvc.checkType(s,o))return _(135),!1;const a=Z(this.gos,{node:e,data:e.data,oldValue:this.getValue(s,e),newValue:o,colDef:s.getColDef(),column:s});a.newValue=o;let l;if(j(r)?typeof r=="function"?l=r(a):l=this.expressionSvc?.evaluate(r,a):l=this.setValueUsingField(e.data,n,o,s.isFieldContainsDots()),l===void 0&&(l=!0),!l)return!1;e.resetQuickFilterAggregateText(),this.valueCache?.onDataChanged();const d=this.getValue(s,e);return this.eventSvc.dispatchEvent({type:"cellValueChanged",event:null,rowIndex:e.rowIndex,rowPinned:e.rowPinned,column:a.column,colDef:a.colDef,data:e.data,node:e,oldValue:a.oldValue,newValue:d,value:d,source:i}),!0}callColumnCellValueChangedHandler(e){const t=e.colDef.onCellValueChanged;typeof t=="function"&&this.beans.frameworkOverrides.wrapOutgoing(()=>{t({node:e.node,data:e.data,oldValue:e.oldValue,newValue:e.newValue,colDef:e.colDef,column:e.column,api:e.api,context:e.context})})}setValueUsingField(e,t,o,i){if(!t)return!1;let s=!1;if(!i)s=e[t]===o,s||(e[t]=o);else{const n=t.split(".");let r=e;for(;n.length>0&&r;){const a=n.shift();n.length===0?(s=r[a]===o,s||(r[a]=o)):r=r[a]}}return!s}executeValueGetterWithValueCache(e,t,o,i){const s=o.getColId(),n=this.valueCache.getValue(i,s);if(n!==void 0)return n;const r=this.executeValueGetterWithoutValueCache(e,t,o,i);return this.valueCache.setValue(i,s,r),r}executeValueGetterWithoutValueCache(e,t,o,i){const s=Z(this.gos,{data:t,node:i,column:o,colDef:o.getColDef(),getValue:this.getValueCallback.bind(this,i)});let n;return typeof e=="function"?n=e(s):n=this.expressionSvc?.evaluate(e,s),n}getValueCallback(e,t){const o=this.colModel.getColDefCol(t);return o?this.getValue(o,e):null}getKeyForNode(e,t){const o=this.getValue(e,t),i=e.getColDef().keyCreator;let s=o;if(i){const n=Z(this.gos,{value:o,colDef:e.getColDef(),column:e,node:t,data:t.data});s=i(n)}return typeof s=="string"||s==null||(s=String(s),s==="[object Object]"&&_(121)),s}},qy={moduleName:"CommunityCore",version:ne,beans:[jS,ov,Gw,Pg,Ly,Xv,VS,QS,xg,vy,Cy,Gy,Yy,US,HS,$S,Bw,zy,Aw,Tw],icons:{selectOpen:"small-down",smallDown:"small-down",colorPicker:"color-picker",smallUp:"small-up",checkboxChecked:"small-up",checkboxIndeterminate:"checkbox-indeterminate",checkboxUnchecked:"checkbox-unchecked",radioButtonOn:"radio-button-on",radioButtonOff:"radio-button-off",smallLeft:"small-left",smallRight:"small-right"},apiFunctions:{getGridId:iv,destroy:sv,isDestroyed:nv,getGridOption:rv,setGridOption:av,updateGridOptions:xu},dependsOn:[Dw,Au,Ov,_a,oy,Tu,iy,Iy,Ky,ny,my,by,Fy,ay,kw,Mw,jy]},za=class Po{static applyGlobalGridOptions(t){if(!Po.gridOptions)return{...t};let o={};return Ue(o,Po.gridOptions,!0,!0),Po.mergeStrategy==="deep"?Ue(o,t,!0,!0):o={...o,...t},Po.gridOptions.context&&(o.context=Po.gridOptions.context),t.context&&(Po.mergeStrategy==="deep"&&o.context&&Ue(t.context,o.context,!0,!0),o.context=t.context),o}};za.gridOptions=void 0;za.mergeStrategy="shallow";var Qy=za;function Xy(e,t,o){if(!t)return ae(11),{};const i=o;let s;if(!i?.setThemeOnGridDiv){const r=Pe({tag:"div"});r.style.height="100%",e.appendChild(r),e=r,s=()=>e.remove()}return new Jy().create(e,t,r=>{const a=new ev(e);r.createBean(a)},void 0,o,s)}var Zy=1,Jy=class{create(e,t,o,i,s,n){const r=Qy.applyGlobalGridOptions(t),a=r.gridId??String(Zy++),l=r.rowModelType??"clientSide",d=this.getRegisteredModules(s,a,l),c=this.createBeansList(l,d,a),u=this.createProvidedBeans(e,r,s);if(!c)return;const p={providedBeanInstances:u,beanClasses:c,gridId:a,beanInitComparator:BC,beanDestroyComparator:NC,derivedBeans:[GC],destroyCallback:n},g=new Cf(p);return this.registerModuleFeatures(g,d),o(g),g.getBean("syncSvc").start(),i&&i(g),g.getBean("gridApi")}getRegisteredModules(e,t,o){return ns(qy,void 0),e?.modules?.forEach(i=>ns(i,t)),pf(t,o)}registerModuleFeatures(e,t){const o=e.getBean("registry"),i=e.getBean("apiFunctionSvc");t.forEach(s=>{o.registerModule(s);const n=s.apiFunctions;n&&Object.keys(n).forEach(a=>{i?.addFunction(a,n[a])})})}createProvidedBeans(e,t,o){let i=o?o.frameworkOverrides:null;Me(i)&&(i=new Ru);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 s={clientSide:"ClientSideRowModel",infinite:"InfiniteRowModel",serverSide:"ServerSideRowModel",viewport:"ViewportRowModel"}[e];if(!s){Or(201,{rowModelType:e},`Unknown rowModelType ${e}.`);return}if(!Uc(s,o,e)){Or(200,{reasonOrId:`rowModelType = '${e}'`,moduleName:s,gridScoped:Ra(),gridId:o,rowModelType:e},`Missing module ${s}Module for rowModelType ${e}.
25
+ If upgrading from before v33, see ${Oo}/upgrading-to-ag-grid-33/#changes-to-modules/`);return}const n=new Set;return t.forEach(r=>r.beans?.forEach(a=>n.add(a))),Array.from(n)}};function Yt(e){const t=e.rowModel;return t.getType()==="clientSide"?t:void 0}function eb(e){const t=e.rowModel;return t.getType()==="infinite"?t:void 0}function Ri(e){const t=e.rowModel;return t.getType()==="serverSide"?t:void 0}var tb=["columnEverythingChanged","newColumnsLoaded","columnPivotModeChanged","pivotMaxColumnsExceeded","columnRowGroupChanged","expandOrCollapseAll","columnPivotChanged","gridColumnsChanged","columnValueChanged","columnMoved","columnVisible","columnPinned","columnGroupOpened","columnResized","displayedColumnsChanged","virtualColumnsChanged","columnHeaderMouseOver","columnHeaderMouseLeave","columnHeaderClicked","columnHeaderContextMenu","asyncTransactionsFlushed","rowGroupOpened","rowDataUpdated","pinnedRowDataChanged","rangeSelectionChanged","cellSelectionChanged","chartCreated","chartRangeSelectionChanged","chartOptionsChanged","chartDestroyed","toolPanelVisibleChanged","toolPanelSizeChanged","modelUpdated","cutStart","cutEnd","pasteStart","pasteEnd","fillStart","fillEnd","cellSelectionDeleteStart","cellSelectionDeleteEnd","rangeDeleteStart","rangeDeleteEnd","undoStarted","undoEnded","redoStarted","redoEnded","cellClicked","cellDoubleClicked","cellMouseDown","cellContextMenu","cellValueChanged","cellEditRequest","rowValueChanged","headerFocused","cellFocused","rowSelected","selectionChanged","tooltipShow","tooltipHide","cellKeyDown","cellMouseOver","cellMouseOut","filterChanged","filterModified","filterOpened","advancedFilterBuilderVisibleChanged","sortChanged","virtualRowRemoved","rowClicked","rowDoubleClicked","gridReady","gridPreDestroyed","gridSizeChanged","viewportChanged","firstDataRendered","dragStarted","dragStopped","dragCancelled","rowEditingStarted","rowEditingStopped","cellEditingStarted","cellEditingStopped","bodyScroll","bodyScrollEnd","paginationChanged","componentStateChanged","storeRefreshed","stateUpdated","columnMenuVisibleChanged","contextMenuVisibleChanged","rowDragEnter","rowDragMove","rowDragLeave","rowDragEnd","rowDragCancel","findChanged"],ob=["scrollbarWidthChanged","keyShortcutChangedCellStart","keyShortcutChangedCellEnd","pinnedHeightChanged","cellFocusCleared","fullWidthRowFocused","checkboxChanged","heightScaleChanged","suppressMovableColumns","suppressMenuHide","suppressFieldDotNotation","columnPanelItemDragStart","columnPanelItemDragEnd","bodyHeightChanged","columnContainerWidthChanged","displayedColumnsWidthChanged","scrollVisibilityChanged","scrollGapChanged","columnHoverChanged","flashCells","paginationPixelOffsetChanged","displayedRowsChanged","leftPinnedWidthChanged","rightPinnedWidthChanged","rowContainerHeightChanged","headerHeightChanged","columnGroupHeaderHeightChanged","columnHeaderHeightChanged","gridStylesChanged","storeUpdated","filterDestroyed","rowDataUpdateStarted","rowCountReady","advancedFilterEnabledChanged","dataTypesInferred","fieldValueChanged","fieldPickerValueSelected","richSelectListRowSelected","sideBarUpdated","alignedGridScroll","alignedGridColumn","gridOptionsChanged","chartTitleEdit","recalculateRowBounds","stickyTopOffsetChanged","overlayExclusiveChanged","beforeRefreshModel","rowNodeDataChanged"],Yu=[...tb,...ob],ib=["overlayLoadingTemplate","overlayNoRowsTemplate","gridId","quickFilterText","rowModelType","editType","domLayout","clipboardDelimiter","rowGroupPanelShow","multiSortKey","pivotColumnGroupTotals","pivotRowTotals","pivotPanelShow","fillHandleDirection","groupDisplayType","treeDataDisplayType","treeDataChildrenField","treeDataParentIdField","colResizeDefault","tooltipTrigger","serverSidePivotResultFieldSeparator","columnMenu","tooltipShowMode","grandTotalRow","themeCssLayer","findSearchValue","styleNonce"],sb=["components","rowStyle","context","autoGroupColumnDef","localeText","icons","datasource","dragAndDropImageComponentParams","serverSideDatasource","viewportDatasource","groupRowRendererParams","aggFuncs","fullWidthCellRendererParams","defaultColGroupDef","defaultColDef","defaultCsvExportParams","defaultExcelExportParams","columnTypes","rowClassRules","detailCellRendererParams","loadingCellRendererParams","loadingOverlayComponentParams","noRowsOverlayComponentParams","popupParent","themeStyleContainer","statusBar","chartThemeOverrides","customChartThemes","chartToolPanelsDef","dataTypeDefinitions","advancedFilterParent","advancedFilterBuilderParams","initialState","autoSizeStrategy","selectionColumnDef","findOptions"],nb=["sortingOrder","alignedGrids","rowData","columnDefs","excelStyles","pinnedTopRowData","pinnedBottomRowData","chartThemes","rowClass","paginationPageSizeSelector"],qu=["rowHeight","detailRowHeight","rowBuffer","headerHeight","groupHeaderHeight","groupLockGroupColumns","floatingFiltersHeight","pivotHeaderHeight","pivotGroupHeaderHeight","groupDefaultExpanded","pivotDefaultExpanded","viewportRowModelPageSize","viewportRowModelBufferSize","autoSizePadding","maxBlocksInCache","maxConcurrentDatasourceRequests","tooltipShowDelay","tooltipHideDelay","cacheOverflowSize","paginationPageSize","cacheBlockSize","infiniteInitialRowCount","serverSideInitialRowCount","scrollbarWidth","asyncTransactionWaitMillis","blockLoadDebounceMillis","keepDetailRowsCount","undoRedoCellEditingLimit","cellFlashDuration","cellFadeDuration","tabIndex","pivotMaxGeneratedColumns"],rb=["theme","rowSelection"],ab=["cellSelection","sideBar","rowNumbers","suppressGroupChangesColumnVisibility","groupAggFiltering","suppressStickyTotalRow","groupHideParentOfSingleChild"],Qu=["loadThemeGoogleFonts","suppressMakeColumnVisibleAfterUnGroup","suppressRowClickSelection","suppressCellFocus","suppressHeaderFocus","suppressHorizontalScroll","groupSelectsChildren","alwaysShowHorizontalScroll","alwaysShowVerticalScroll","debug","enableBrowserTooltips","enableCellExpressions","groupSuppressBlankHeader","suppressMenuHide","suppressRowDeselection","unSortIcon","suppressMultiSort","alwaysMultiSort","singleClickEdit","suppressLoadingOverlay","suppressNoRowsOverlay","suppressAutoSize","skipHeaderOnAutoSize","suppressColumnMoveAnimation","suppressMoveWhenColumnDragging","suppressMovableColumns","suppressFieldDotNotation","enableRangeSelection","enableRangeHandle","enableFillHandle","suppressClearOnFillReduction","deltaSort","suppressTouch","allowContextMenuWithControlKey","suppressContextMenu","suppressDragLeaveHidesColumns","suppressRowGroupHidesColumns","suppressMiddleClickScrolls","suppressPreventDefaultOnMouseWheel","suppressCopyRowsToClipboard","copyHeadersToClipboard","copyGroupHeadersToClipboard","pivotMode","suppressAggFuncInHeader","suppressColumnVirtualisation","alwaysAggregateAtRootLevel","suppressFocusAfterRefresh","functionsReadOnly","animateRows","groupSelectsFiltered","groupRemoveSingleChildren","groupRemoveLowestSingleChildren","enableRtl","enableCellSpan","suppressClickEdit","rowDragEntireRow","rowDragManaged","suppressRowDrag","suppressMoveWhenRowDragging","rowDragMultiRow","enableGroupEdit","embedFullWidthRows","suppressPaginationPanel","groupHideOpenParents","groupAllowUnbalanced","pagination","paginationAutoPageSize","suppressScrollOnNewData","suppressScrollWhenPopupsAreOpen","purgeClosedRowNodes","cacheQuickFilter","includeHiddenColumnsInQuickFilter","ensureDomOrder","accentedSort","suppressChangeDetection","valueCache","valueCacheNeverExpires","aggregateOnlyChangedColumns","suppressAnimationFrame","suppressExcelExport","suppressCsvExport","includeHiddenColumnsInAdvancedFilter","suppressMultiRangeSelection","enterNavigatesVerticallyAfterEdit","enterNavigatesVertically","suppressPropertyNamesCheck","rowMultiSelectWithClick","suppressRowHoverHighlight","suppressRowTransform","suppressClipboardPaste","suppressLastEmptyLineOnPaste","enableCharts","suppressMaintainUnsortedOrder","enableCellTextSelection","suppressBrowserResizeObserver","suppressMaxRenderedRowRestriction","excludeChildrenWhenTreeDataFiltering","tooltipMouseTrack","tooltipInteraction","keepDetailRows","paginateChildRows","preventDefaultOnContextMenu","undoRedoCellEditing","allowDragFromColumnsToolPanel","pivotSuppressAutoColumn","suppressExpandablePivotGroups","debounceVerticalScrollbar","detailRowAutoHeight","serverSideSortAllLevels","serverSideEnableClientSideSort","serverSideOnlyRefreshFilteredGroups","suppressAggFilteredOnly","showOpenedGroup","suppressClipboardApi","suppressModelUpdateAfterUpdateTransaction","stopEditingWhenCellsLoseFocus","groupMaintainOrder","columnHoverHighlight","readOnlyEdit","suppressRowVirtualisation","enableCellEditingOnBackspace","resetRowDataOnUpdate","removePivotHeaderRowWhenSingleValueColumn","suppressCopySingleCellRanges","suppressGroupRowsSticky","suppressCutToClipboard","rowGroupPanelSuppressSort","allowShowChangeAfterFilter","enableAdvancedFilter","masterDetail","treeData","reactiveCustomComponents","applyQuickFilterBeforePivotOrAgg","suppressServerSideFullWidthLoadingRow","suppressAdvancedFilterEval","loading","maintainColumnOrder","enableStrictPivotColumnOrder","suppressSetFilterByDefault"],lb=["doesExternalFilterPass","processPivotResultColDef","processPivotResultColGroupDef","getBusinessKeyForNode","isRowSelectable","rowDragText","groupRowRenderer","dragAndDropImageComponent","fullWidthCellRenderer","loadingCellRenderer","loadingOverlayComponent","noRowsOverlayComponent","detailCellRenderer","quickFilterParser","quickFilterMatcher","getLocaleText","isExternalFilterPresent","getRowHeight","getRowClass","getRowStyle","getContextMenuItems","getMainMenuItems","processRowPostCreate","processCellForClipboard","getGroupRowAgg","isFullWidthRow","sendToClipboard","focusGridInnerElement","navigateToNextHeader","tabToNextHeader","navigateToNextCell","tabToNextCell","processCellFromClipboard","getDocument","postProcessPopup","getChildCount","getDataPath","isRowMaster","postSortRows","processHeaderForClipboard","processUnpinnedColumns","processGroupHeaderForClipboard","paginationNumberFormatter","processDataFromClipboard","getServerSideGroupKey","isServerSideGroup","createChartContainer","getChartToolbarItems","fillOperation","isApplyServerSideTransaction","getServerSideGroupLevelParams","isServerSideGroupOpenByDefault","isGroupOpenByDefault","initialGroupOrderComparator","loadingCellRendererSelector","getRowId","chartMenuItems","groupTotalRow","alwaysPassFilter"],Qr=[...nb,...sb,...ib,...qu,...lb,...Qu,...ab,...rb],db=class{wrap(e,t,o,i){const s=this.createWrapper(e,i);return t?.forEach(n=>{this.createMethod(s,n,!0)}),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&&_(49,{methodName:t}),null)}}},cb={tag:"div",cls:"ag-tooltip"},ub=class extends kC{constructor(){super(cb)}init(e){const{value:t}=e;this.getGui().textContent=St(t,!0)}};function Xu(e){const{inputValue:t,allSuggestions:o,hideIrrelevant:i,filterByPercentageOfBestMatch:s}=e;let n=o.map((l,d)=>({value:l,relevance:hb(t,l),idx:d}));if(n.sort((l,d)=>d.relevance-l.relevance),i&&(n=n.filter(l=>l.relevance!==0)),n.length>0&&s&&s>0){const d=n[0].relevance*s;n=n.filter(c=>d-c.relevance<0)}const r=[],a=[];for(const l of n)r.push(l.value),a.push(l.idx);return{values:r,indices:a}}function hb(e,t){if(e===t)return 1e3;const o=e.length,i=t.length;if(o===0||i===0)return 0;const s=e.toLocaleLowerCase(),n=t.toLocaleLowerCase(),r=n.indexOf(s);if(r!==-1)return 980-r*2;if([...s].filter(u=>n.includes(u)).length===0)return 0;let l=Array.from({length:i+1},(u,p)=>p);for(let u=0;u<o;u++){const p=[u+1];for(let g=0;g<i;g++){const f=l[g+1]+1,m=p[g]+1;let C=l[g]+(e[u]!==t[g]?1:0);i>10&&g>i/2&&(C+=1),u>0&&g>0&&e[u-1]===t[g-1]&&(C-=4),p.push(Math.min(f,m,C))}l=p}const d=Math.round(l[i]),c=Math.max(1,1e3-d*30);return Math.max(1,c)}function pb(e,t){if(typeof e!="number")return"";const o=t(),i=o("thousandSeparator",","),s=o("decimalSeparator",".");return e.toString().replace(".",s).replace(/(\d)(?=(\d{3})+(?!\d))/g,`$1${i}`)}var gb=class extends M{getFileName(e){const t=this.getDefaultFileExtension();return(e==null||!e.length)&&(e=this.getDefaultFileName()),e.indexOf(".")===-1?`${e}.${t}`:e}getData(e){const t=this.createSerializingSession(e);return this.beans.gridSerializer.serialize(t,e)}getDefaultFileName(){return`export.${this.getDefaultFileExtension()}`}},fb=class{constructor(e){this.groupColumns=[];const{colModel:t,rowGroupColsSvc:o,colNames:i,valueSvc:s,gos:n,processCellCallback:r,processHeaderCallback:a,processGroupHeaderCallback:l,processRowGroupCallback:d}=e;this.colModel=t,this.rowGroupColsSvc=o,this.colNames=i,this.valueSvc=s,this.gos=n,this.processCellCallback=r,this.processHeaderCallback=a,this.processGroupHeaderCallback=l,this.processRowGroupCallback=d}prepare(e){this.groupColumns=e.filter(t=>!!t.getColDef().showRowGroup)}extractHeaderValue(e){return this.getHeaderName(this.processHeaderCallback,e)??""}extractRowCellValue(e,t,o,i,s){const r=(!this.gos.get("groupHideOpenParents")||s.footer)&&this.shouldRenderGroupSummaryCell(s,e,t)?this.createValueForGroupNode(e,s):this.valueSvc.getValueForDisplay(e,s);return this.processCell({accumulatedRowIndex:o,rowNode:s,column:e,value:r,processCellCallback:this.processCellCallback,type:i})}shouldRenderGroupSummaryCell(e,t,o){if(!(e.group&&!this.gos.get("treeData")))return!1;if(this.groupColumns.indexOf(t)!==-1){if(e.groupData?.[t.getId()]!==void 0||pt(this.gos)&&e.group)return!0;if(e.footer&&e.level===-1){const r=t.getColDef();return r==null||r.showRowGroup===!0||r.showRowGroup===this.rowGroupColsSvc?.columns[0].getId()}}const n=Tn(this.gos,this.colModel.isPivotMode());return o===0&&n}getHeaderName(e,t){return e?e(Z(this.gos,{column:t})):this.colNames.getDisplayNameForColumn(t,"csv",!0)}createValueForGroupNode(e,t){if(this.processRowGroupCallback)return this.processRowGroupCallback(Z(this.gos,{column:e,node:t}));const o=this.gos.get("treeData"),i=a=>{if(o)return a.key;const l=a.groupData?.[e.getId()];return!l||!a.rowGroupColumn||a.rowGroupColumn.getColDef().useValueFormatterForExport===!1?l:this.valueSvc.formatValue(a.rowGroupColumn,a,l)??l},s=t.footer,n=[i(t)];if(!Ca(this.gos))for(;t.parent;)t=t.parent,n.push(i(t));const r=n.reverse().join(" -> ");return s?`Total ${r}`:r}processCell(e){const{accumulatedRowIndex:t,rowNode:o,column:i,value:s,processCellCallback:n,type:r}=e;return n?{value:n(Z(this.gos,{accumulatedRowIndex:t,column:i,node:o,value:s,type:r,parseValue:a=>this.valueSvc.parseValue(i,o,a,this.valueSvc.getValue(i,o)),formatValue:a=>this.valueSvc.formatValue(i,o,a)??a}))??""}:i.getColDef().useValueFormatterForExport!==!1?{value:s??"",valueFormatted:this.valueSvc.formatValue(i,o,s)}:{value:s??""}}};function mb(e,t){const o=document.defaultView||window;if(!o){_(52);return}const i=document.createElement("a"),s=o.URL.createObjectURL(t);i.setAttribute("href",s),i.setAttribute("download",e),i.style.display="none",document.body.appendChild(i),i.dispatchEvent(new MouseEvent("click",{bubbles:!1,cancelable:!0,view:o})),document.body.removeChild(i),o.setTimeout(()=>{o.URL.revokeObjectURL(s)},0)}var Cb={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,columnMenu:!0,suppressSetFilterByDefault:!0,getDataPath:!0,enableCellSpan:!0},Xe="clientSide",Ke="serverSide",Yo="infinite",vb={onGroupExpandedOrCollapsed:[Xe],refreshClientSideRowModel:[Xe],isRowDataEmpty:[Xe],forEachLeafNode:[Xe],forEachNodeAfterFilter:[Xe],forEachNodeAfterFilterAndSort:[Xe],resetRowHeights:[Xe],applyTransaction:[Xe],applyTransactionAsync:[Xe],flushAsyncTransactions:[Xe],getBestCostNodeSelection:[Xe],getServerSideSelectionState:[Ke],setServerSideSelectionState:[Ke],applyServerSideTransaction:[Ke],applyServerSideTransactionAsync:[Ke],applyServerSideRowData:[Ke],retryServerSideLoads:[Ke],flushServerSideAsyncTransactions:[Ke],refreshServerSide:[Ke],getServerSideGroupLevelState:[Ke],refreshInfiniteCache:[Yo],purgeInfiniteCache:[Yo],getInfiniteRowCount:[Yo],isLastRowIndexKnown:[Yo,Ke],expandAll:[Xe,Ke],collapseAll:[Xe,Ke],onRowHeightChanged:[Xe,Ke],setRowCount:[Yo,Ke],getCacheBlockState:[Yo,Ke]},wb={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 Sb(e,t,o){const i=wb[e];if(i){const{version:n,new:r,old:a,message:l}=i,d=a??e;return(...c)=>{const u=r?`Please use ${r} instead. `:"";return Bi(`Since ${n} api.${d} is deprecated. ${u}${l??""}`),t.apply(t,c)}}const s=vb[e];return s?(...n)=>{const r=o.rowModel.getType();if(!s.includes(r)){ii(`api.${e} can only be called when gridOptions.rowModelType is ${s.join(" or ")}`);return}return t.apply(t,n)}:t}var Zu={AdvancedFilter:1,AllEnterprise:1,CellSelection:1,Clipboard:1,ColumnMenu:1,ColumnsToolPanel:1,ContextMenu:1,ExcelExport:1,FiltersToolPanel:1,Find:1,GridCharts:1,IntegratedCharts:1,GroupFilter:1,MasterDetail:1,Menu:1,MultiFilter:1,Pivot:1,RangeSelection:1,RichSelect:1,RowNumbers:1,RowGrouping:1,RowGroupingPanel:1,ServerSideRowModelApi:1,ServerSideRowModel:1,SetFilter:1,SideBar:1,Sparklines:1,StatusBar:1,TreeData:1,ViewportRowModel:1},ur=["TextFilter","NumberFilter","DateFilter","SetFilter","MultiFilter","GroupFilter","CustomFilter"],yb={EditCore:["TextEditor","NumberEditor","DateEditor","CheckboxEditor","LargeTextEditor","SelectEditor","RichSelect","CustomEditor"],CheckboxCellRenderer:["AllCommunity"],ClientSideRowModelHierarchy:["RowGrouping","Pivot","TreeData"],ColumnFilter:ur,ColumnGroupHeaderComp:["AllCommunity"],ColumnGroup:["AllCommunity"],ColumnHeaderComp:["AllCommunity"],ColumnMove:["AllCommunity"],ColumnResize:["AllCommunity"],CommunityCore:["AllCommunity"],CsrmSsrmSharedApi:["ClientSideRowModelApi","ServerSideRowModelApi"],EnterpriseCore:["AllEnterprise"],FilterCore:[...ur,"QuickFilter","ExternalFilter","AdvancedFilter"],GroupCellRenderer:["RowGrouping","Pivot","TreeData","MasterDetail","ServerSideRowModel"],KeyboardNavigation:["AllCommunity"],LoadingCellRenderer:["ServerSideRowModel"],MenuCore:["ColumnMenu","ContextMenu"],MenuItem:["ColumnMenu","ContextMenu","MultiFilter","IntegratedCharts","ColumnsToolPanel"],Overlay:["AllCommunity"],PinnedColumn:["AllCommunity"],SharedAggregation:["RowGrouping","Pivot","TreeData","ServerSideRowModel"],SharedDragAndDrop:["AllCommunity"],SharedMasterDetail:["MasterDetail","ServerSideRowModel"],SharedMenu:[...ur,"ColumnMenu","ContextMenu"],SharedPivot:["Pivot","ServerSideRowModel"],SharedRowGrouping:["RowGrouping","ServerSideRowModel"],SharedRowSelection:["RowSelection","ServerSideRowModel"],SkeletonCellRenderer:["ServerSideRowModel"],Sort:["AllCommunity"],SsrmInfiniteSharedApi:["InfiniteRowModel","ServerSideRowModelApi"],SharedTreeData:["TreeData","ServerSideRowModel"]},bb={InfiniteRowModel:"infinite",ClientSideRowModelApi:"clientSide",ClientSideRowModel:"clientSide",ServerSideRowModelApi:"serverSide",ServerSideRowModel:"serverSide",ViewportRowModel:"viewport"};function Rb(e,t){const o=[];return(Array.isArray(e)?e:[e]).forEach(i=>{const s=yb[i];s?s.forEach(n=>{const r=bb[n];(!r||r===t)&&o.push(n)}):o.push(i)}),o}var ai={agSetColumnFilter:"SetFilter",agSetColumnFloatingFilter:"SetFilter",agMultiColumnFilter:"MultiFilter",agMultiColumnFloatingFilter:"MultiFilter",agGroupColumnFilter:"GroupFilter",agGroupColumnFloatingFilter:"GroupFilter",agGroupCellRenderer:"GroupCellRenderer",agGroupRowRenderer:"GroupCellRenderer",agRichSelect:"RichSelect",agRichSelectCellEditor:"RichSelect",agDetailCellRenderer:"SharedMasterDetail",agSparklineCellRenderer:"Sparklines",agDragAndDropImage:"SharedDragAndDrop",agColumnHeader:"ColumnHeaderComp",agColumnGroupHeader:"ColumnGroupHeaderComp",agSortIndicator:"Sort",agAnimateShowChangeCellRenderer:"HighlightChanges",agAnimateSlideCellRenderer:"HighlightChanges",agLoadingCellRenderer:"LoadingCellRenderer",agSkeletonCellRenderer:"SkeletonCellRenderer",agCheckboxCellRenderer:"CheckboxCellRenderer",agLoadingOverlay:"Overlay",agNoRowsOverlay:"Overlay",agTooltipComponent:"Tooltip",agReadOnlyFloatingFilter:"CustomFilter",agTextColumnFilter:"TextFilter",agNumberColumnFilter:"NumberFilter",agDateColumnFilter:"DateFilter",agDateInput:"DateFilter",agTextColumnFloatingFilter:"TextFilter",agNumberColumnFloatingFilter:"NumberFilter",agDateColumnFloatingFilter:"DateFilter",agCellEditor:"TextEditor",agSelectCellEditor:"SelectEditor",agTextCellEditor:"TextEditor",agNumberCellEditor:"NumberEditor",agDateCellEditor:"DateEditor",agDateStringCellEditor:"DateEditor",agCheckboxCellEditor:"CheckboxEditor",agLargeTextCellEditor:"LargeTextEditor",agMenuItem:"MenuItem",agColumnsToolPanel:"ColumnsToolPanel",agFiltersToolPanel:"FiltersToolPanel",agAggregationComponent:"StatusBar",agSelectedRowCountComponent:"StatusBar",agTotalRowCountComponent:"StatusBar",agFilteredRowCountComponent:"StatusBar",agTotalAndFilteredRowCountComponent:"StatusBar",agFindCellRenderer:"Find"},Fb=e=>{const t=e.map(i=>`import { ${Wi(i)} } from '${Zu[i]?"ag-grid-enterprise":"ag-grid-community"}';`);return e.some(i=>i==="IntegratedCharts"||i==="Sparklines")&&t.push("import { AgChartsEnterpriseModule } from 'ag-charts-enterprise';"),`import { ModuleRegistry } from 'ag-grid-community';
26
+ ${t.join(`
27
+ `)}
28
+
29
+ ModuleRegistry.registerModules([ ${e.map(i=>Wi(i,!0)).join(", ")} ]);
30
+
31
+ For more info see: ${Oo}/modules/`};function Wi(e,t=!1){return t&&(e==="IntegratedCharts"||e==="Sparklines")?`${e}Module.with(AgChartsEnterpriseModule)`:`${e}Module`}function xb(e,t){const o=t.filter(n=>n==="IntegratedCharts"||n==="Sparklines");let i="";return!globalThis?.agCharts&&o.length>0?i=`Unable to use ${e} as either the ag-charts-community or ag-charts-enterprise script needs to be included alongside ag-grid-enterprise.
32
+ `:t.some(n=>Zu[n])&&(i=i+`Unable to use ${e} as that requires the ag-grid-enterprise script to be included.
33
+ `),i}var Wl=({reasonOrId:e,moduleName:t,gridScoped:o,gridId:i,rowModelType:s,additionalText:n,isUmd:r})=>{const a=Rb(t,s),l=typeof e=="string"?e:Eb[e];if(r)return xb(l,a);const d=a.filter(p=>p==="IntegratedCharts"||p==="Sparklines"),c=d.length>0?`${d.map(p=>Wi(p)).join()} must be initialised with an AG Charts module. One of 'AgChartsCommunityModule' / 'AgChartsEnterpriseModule'.`:"";return`${`Unable to use ${l} as ${a.length>1?"one of "+a.map(p=>Wi(p)).join(", "):Wi(a[0])} is not registered${o?" for gridId: "+i:""}. ${c} Check if you have registered the module:
34
+ `}
35
+ ${Fb(a)}`+(n?`
36
+
37
+ ${n}`:"")},Ul=e=>`${e} must be initialised with an AG Charts module. One of 'AgChartsCommunityModule' / 'AgChartsEnterpriseModule'.
38
+
39
+ import { AgChartsEnterpriseModule } from 'ag-charts-enterprise';
40
+ import { ModuleRegistry } from 'ag-grid-community';
41
+ import { ${e} } from 'ag-grid-enterprise';
42
+
43
+ ModuleRegistry.registerModules([${e}.with(AgChartsEnterpriseModule)]);
44
+ `,Db=e=>`AG Grid: Unable to use the Clipboard API (navigator.clipboard.${e}()). The reason why it could not be used has been logged in the previous line. For this reason the grid has defaulted to using a workaround which doesn't perform as well. Either fix why Clipboard API is blocked, OR stop this message from appearing by setting grid property suppressClipboardApi=true (which will default the grid to using the workaround rather than the API.`,Mb={1:()=>"`rowData` must be an array",2:({nodeId:e})=>`Duplicate node id '${e}' detected from getRowId callback, this could cause issues in your grid.`,3:()=>"Calling gridApi.resetRowHeights() makes no sense when using Auto Row Height.",4:({id:e})=>`Could not find row id=${e}, data item was not found for this id`,5:({data:e})=>["Could not find data item as object was not found.",e," Consider using getRowId to help the Grid find matching row data"],6:()=>"'groupHideOpenParents' only works when specifying specific columns for 'colDef.showRowGroup'",7:()=>"Pivoting is not supported with aligned grids as it may produce different columns in each grid.",8:({key:e})=>`Unknown key for navigation ${e}`,9:({variable:e})=>`No value for ${e?.cssName}. This usually means that the grid has been initialised before styles have been loaded. The default value of ${e?.defaultValue} will be used and updated when styles load.`,10:({eventType:e})=>`As of v33, the '${e}' event is deprecated. Use the global 'modelUpdated' event to determine when row children have changed.`,11:()=>"No gridOptions provided to createGrid",12:({colKey:e})=>["column ",e," not found"],13:()=>"Could not find rowIndex, this means tasks are being executed on a rowNode that has been removed from the grid.",14:({groupPrefix:e})=>`Row IDs cannot start with ${e}, this is a reserved prefix for AG Grid's row grouping feature.`,15:({expression:e})=>["value should be either a string or a function",e],16:({expression:e,params:t,e:o})=>["Processing of the expression failed","Expression = ",e,"Params = ",t,"Exception = ",o],17:()=>"you need either field or valueSetter set on colDef for editing to work",18:()=>"alignedGrids contains an undefined option.",19:()=>"alignedGrids - No api found on the linked grid.",20:()=>`You may want to configure via a callback to avoid setup race conditions:
45
+ "alignedGrids: () => [linkedGrid]"`,21:()=>"pivoting is not supported with aligned grids. You can only use one of these features at a time in a grid.",22:({key:e})=>`${e} is an initial property and cannot be updated.`,23:()=>"The return of `getRowHeight` cannot be zero. If the intention is to hide rows, use a filter instead.",24:()=>"row height must be a number if not using standard row model",25:({id:e})=>["The getRowId callback must return a string. The ID ",e," is being cast to a string."],26:({fnName:e,preDestroyLink:t})=>`Grid API function ${e}() cannot be called as the grid has been destroyed.
46
+ Either clear local references to the grid api, when it is destroyed, or check gridApi.isDestroyed() to avoid calling methods against a destroyed grid.
47
+ To run logic when the grid is about to be destroyed use the gridPreDestroy event. See: ${t}`,27:({fnName:e,module:t})=>`API function '${e}' not registered to module '${t}'`,28:()=>"setRowCount cannot be used while using row grouping.",29:()=>"tried to call sizeColumnsToFit() but the grid is coming back with zero width, maybe the grid is not visible yet on the screen?",30:({toIndex:e})=>["tried to insert columns in invalid location, toIndex = ",e,"remember that you should not count the moving columns when calculating the new index"],31:()=>"infinite loop in resizeColumnSets",32:()=>"applyColumnState() - the state attribute should be an array, however an array was not found. Please provide an array of items (one for each col you want to change) for state.",33:()=>"stateItem.aggFunc must be a string. if using your own aggregation functions, register the functions first before using them in get/set state. This is because it is intended for the column state to be stored and retrieved as simple JSON.",34:({key:e})=>`the column type '${e}' is a default column type and cannot be overridden.`,35:()=>"Column type definitions 'columnTypes' with a 'type' attribute are not supported because a column type cannot refer to another column type. Only column definitions 'columnDefs' can use the 'type' attribute to refer to a column type.",36:({t:e})=>"colDef.type '"+e+"' does not correspond to defined gridOptions.columnTypes",37:()=>"Changing the column pinning status is not allowed with domLayout='print'",38:({iconName:e})=>`provided icon '${e}' needs to be a string or a function`,39:()=>"Applying column order broke a group where columns should be married together. Applying new order has been discarded.",40:({e,method:t})=>`${e}
48
+ ${Db(t)}`,41:()=>"Browser did not allow document.execCommand('copy'). Ensure 'api.copySelectedRowsToClipboard() is invoked via a user event, i.e. button click, otherwise the browser will prevent it for security reasons.",42:()=>"Browser does not support document.execCommand('copy') for clipboard operations",43:({iconName:e})=>`As of v33, icon '${e}' is deprecated. Use the icon CSS name instead.`,44:()=>'Data type definition hierarchies (via the "extendsDataType" property) cannot contain circular references.',45:({parentCellDataType:e})=>`The data type definition ${e} does not exist.`,46:()=>'The "baseDataType" property of a data type definition must match that of its parent.',47:({cellDataType:e})=>`Missing data type definition - "${e}"`,48:({property:e})=>`Cell data type is "object" but no Value ${e} has been provided. Please either provide an object data type definition with a Value ${e}, or set "colDef.value${e}"`,49:({methodName:e})=>`Framework component is missing the method ${e}()`,50:({compName:e})=>`Could not find component ${e}, did you forget to configure this component?`,51:()=>"Export cancelled. Export is not allowed as per your configuration.",52:()=>"There is no `window` associated with the current `document`",53:()=>"unknown value type during csv conversion",54:()=>"Could not find document body, it is needed for drag and drop and context menu.",55:()=>"addRowDropZone - A container target needs to be provided",56:()=>"addRowDropZone - target already exists in the list of DropZones. Use `removeRowDropZone` before adding it again.",57:()=>"unable to show popup filter, filter instantiation failed",58:()=>"no values found for select cellEditor",59:()=>"cannot select pinned rows",60:()=>"cannot select node until it has finished loading",61:()=>"since version v32.2.0, rowNode.isFullWidthCell() has been deprecated. Instead check `rowNode.detail` followed by the user provided `isFullWidthRow` grid option.",62:({colId:e})=>`setFilterModel() - no column found for colId: ${e}`,63:({colId:e})=>`setFilterModel() - unable to fully apply model, filtering disabled for colId: ${e}`,64:({colId:e})=>`setFilterModel() - unable to fully apply model, unable to create filter for colId: ${e}`,65:()=>"filter missing setModel method, which is needed for setFilterModel",66:()=>"filter API missing getModel method, which is needed for getFilterModel",67:()=>"Filter is missing isFilterActive() method",68:()=>"Column Filter API methods have been disabled as Advanced Filters are enabled.",69:({guiFromFilter:e})=>`getGui method from filter returned ${e}; it should be a DOM element.`,70:({newFilter:e})=>`Grid option quickFilterText only supports string inputs, received: ${typeof e}`,71:()=>"debounceMs is ignored when apply button is present",72:({keys:e})=>["ignoring FilterOptionDef as it doesn't contain one of ",e],73:()=>"invalid FilterOptionDef supplied as it doesn't contain a 'displayKey'",74:()=>"no filter options for filter",75:()=>"Unknown button type specified",76:({filterModelType:e})=>['Unexpected type of filter "',e,'", it looks like the filter was configured with incorrect Filter Options'],77:()=>"Filter model is missing 'conditions'",78:()=>'Filter Model contains more conditions than "filterParams.maxNumConditions". Additional conditions have been ignored.',79:()=>'"filterParams.maxNumConditions" must be greater than or equal to zero.',80:()=>'"filterParams.numAlwaysVisibleConditions" must be greater than or equal to zero.',81:()=>'"filterParams.numAlwaysVisibleConditions" cannot be greater than "filterParams.maxNumConditions".',82:({param:e})=>`DateFilter ${e} is not a number`,83:()=>"DateFilter minValidYear should be <= maxValidYear",84:()=>"DateFilter minValidDate should be <= maxValidDate",85:()=>"DateFilter should not have both minValidDate and minValidYear parameters set at the same time! minValidYear will be ignored.",86:()=>"DateFilter should not have both maxValidDate and maxValidYear parameters set at the same time! maxValidYear will be ignored.",87:()=>"DateFilter parameter minValidDate should always be lower than or equal to parameter maxValidDate.",88:({index:e})=>`Invalid row index for ensureIndexVisible: ${e}`,89:()=>"A template was provided for Header Group Comp - templates are only supported for Header Comps (not groups)",90:()=>"datasource is missing getRows method",91:()=>"Filter is missing method doesFilterPass",92:()=>"AnimationFrameService called but animation frames are off",93:()=>"cannot add multiple ranges when `cellSelection.suppressMultiRanges = true`",94:({paginationPageSizeOption:e,pageSizeSet:t,pageSizesSet:o,pageSizeOptions:i})=>`'paginationPageSize=${e}'${t?"":" (default value)"}, but ${e} is not included in${o?"":" the default"} paginationPageSizeSelector=[${i?.join(", ")}].`,95:({paginationPageSizeOption:e,paginationPageSizeSelector:t})=>`Either set '${t}' to an array that includes ${e} or to 'false' to disable the page size selector.`,96:({id:e,data:t})=>["Duplicate ID",e,"found for pinned row with data",t,"When `getRowId` is defined, it must return unique IDs for all pinned rows. Use the `rowPinned` parameter."],97:({colId:e})=>`cellEditor for column ${e} is missing getGui() method`,98:()=>"popup cellEditor does not work with fullRowEdit - you cannot use them both - either turn off fullRowEdit, or stop using popup editors.",99:()=>"Since v32, `api.hideOverlay()` does not hide the loading overlay when `loading=true`. Set `loading=false` instead.",100:({rowModelType:e})=>`selectAll only available when rowModelType='clientSide', ie not ${e}`,101:({propertyName:e,componentName:t,agGridDefaults:o,jsComps:i})=>{const s=[],n=[...Object.keys(o??[]).filter(a=>!["agCellEditor","agGroupRowRenderer","agSortIndicator"].includes(a)),...Object.keys(i??[])],r=Xu({inputValue:t,allSuggestions:n,hideIrrelevant:!0,filterByPercentageOfBestMatch:.8}).values;return s.push(`Could not find '${t}' component. It was configured as "${e}: '${t}'" but it wasn't found in the list of registered components.
49
+ `),r.length>0&&s.push(` Did you mean: [${r.slice(0,3)}]?
50
+ `),s.push("If using a custom component check it has been registered correctly."),s},102:()=>"selectAll: 'filtered' only works when gridOptions.rowModelType='clientSide'",103:()=>"Invalid selection state. When using client-side row model, the state must conform to `string[]`.",104:({value:e,param:t})=>`Numeric value ${e} passed to ${t} param will be interpreted as ${e} seconds. If this is intentional use "${e}s" to silence this warning.`,105:({e})=>["chart rendering failed",e],106:()=>`Theming API and Legacy Themes are both used in the same page. A Theming API theme has been provided to the 'theme' grid option, but the file (ag-grid.css) is also included and will cause styling issues. Remove ag-grid.css from the page. See the migration guide: ${Oo}/theming-migration/`,107:({key:e,value:t})=>`Invalid value for theme param ${e} - ${t}`,108:({e})=>["chart update failed",e],109:({aggFuncOrString:e})=>`unrecognised aggregation function ${e}`,110:()=>"groupHideOpenParents only works when specifying specific columns for colDef.showRowGroup",111:()=>"Invalid selection state. When `groupSelects` is enabled, the state must conform to `IServerSideGroupSelectionState`.",113:()=>"Set Filter cannot initialise because you are using a row model that does not contain all rows in the browser. Either use a different filter type, or configure Set Filter such that you provide it with values",114:({component:e})=>`Could not find component with name of ${e}. Is it in Vue.components?`,116:()=>"Invalid selection state. The state must conform to `IServerSideSelectionState`.",117:()=>"selectAll must be of boolean type.",118:()=>"Infinite scrolling must be enabled in order to set the row count.",119:()=>"Unable to instantiate filter",120:()=>"MultiFloatingFilterComp expects MultiFilter as its parent",121:()=>"a column you are grouping or pivoting by has objects as values. If you want to group by complex objects then either a) use a colDef.keyCreator (see AG Grid docs) or b) to toString() on the object to return a key",122:()=>"could not find the document, document is empty",123:()=>"Advanced Filter is only supported with the Client-Side Row Model or Server-Side Row Model.",124:()=>"No active charts to update.",125:({chartId:e})=>`Unable to update chart. No active chart found with ID: ${e}.`,126:()=>"unable to restore chart as no chart model is provided",127:({allRange:e})=>`unable to create chart as ${e?"there are no columns in the grid":"no range is selected"}.`,128:({feature:e})=>`${e} is only available if using 'multiRow' selection mode.`,129:({feature:e,rowModel:t})=>`${e} is only available if using 'clientSide' or 'serverSide' rowModelType, you are using ${t}.`,130:()=>'cannot multi select unless selection mode is "multiRow"',132:()=>"Row selection features are not available unless `rowSelection` is enabled.",133:({iconName:e})=>`icon '${e}' function should return back a string or a dom object`,134:({iconName:e})=>`Did not find icon '${e}'`,135:()=>"Data type of the new value does not match the cell data type of the column",136:()=>"Unable to update chart as the 'type' is missing. It must be either 'rangeChartUpdate', 'pivotChartUpdate', or 'crossFilterChartUpdate'.",137:({type:e,currentChartType:t})=>`Unable to update chart as a '${e}' update type is not permitted on a ${t}.`,138:({chartType:e})=>`invalid chart type supplied: ${e}`,139:({customThemeName:e})=>`a custom chart theme with the name ${e} has been supplied but not added to the 'chartThemes' list`,140:({name:e})=>`no stock theme exists with the name '${e}' and no custom chart theme with that name was supplied to 'customChartThemes'`,141:()=>"cross filtering with row grouping is not supported.",142:()=>"cross filtering is only supported in the client side row model.",143:({panel:e})=>`'${e}' is not a valid Chart Tool Panel name`,144:({type:e})=>`Invalid charts data panel group name supplied: '${e}'`,145:({group:e})=>`As of v32, only one charts customize panel group can be expanded at a time. '${e}' will not be expanded.`,146:({comp:e})=>`Unable to instantiate component '${e}' as its module hasn't been loaded. Add 'ValidationModule' to see which module is required.`,147:({group:e})=>`Invalid charts customize panel group name supplied: '${e}'`,148:({group:e})=>`invalid chartGroupsDef config '${e}'`,149:({group:e,chartType:t})=>`invalid chartGroupsDef config '${e}.${t}'`,150:()=>"'seriesChartTypes' are required when the 'customCombo' chart type is specified.",151:({chartType:e})=>`invalid chartType '${e}' supplied in 'seriesChartTypes', converting to 'line' instead.`,152:({colId:e})=>`no 'seriesChartType' found for colId = '${e}', defaulting to 'line'.`,153:({chartDataType:e})=>`unexpected chartDataType value '${e}' supplied, instead use 'category', 'series' or 'excluded'`,154:({colId:e})=>`cross filtering requires a 'agSetColumnFilter' or 'agMultiColumnFilter' to be defined on the column with id: ${e}`,155:({option:e})=>`'${e}' is not a valid Chart Toolbar Option`,156:({panel:e})=>`Invalid panel in chartToolPanelsDef.panels: '${e}'`,157:({unrecognisedGroupIds:e})=>["unable to find group(s) for supplied groupIds:",e],158:()=>"can not expand a column item that does not represent a column group header",159:()=>"Invalid params supplied to createExcelFileForExcel() - `ExcelExportParams.data` is empty.",160:()=>"Export cancelled. Export is not allowed as per your configuration.",161:()=>"The Excel Exporter is currently on Multi Sheet mode. End that operation by calling 'api.getMultipleSheetAsExcel()' or 'api.exportMultipleSheetsAsExcel()'",162:({id:e,dataType:t})=>`Unrecognized data type for excel export [${e}.dataType=${t}]`,163:({featureName:e})=>`Excel table export does not work with ${e}. The exported Excel file will not contain any Excel tables.
51
+ Please turn off ${e} to enable Excel table exports.`,164:()=>"Unable to add data table to Excel sheet: A table already exists.",165:()=>"Unable to add data table to Excel sheet: Missing required parameters.",166:({unrecognisedGroupIds:e})=>["unable to find groups for these supplied groupIds:",e],167:({unrecognisedColIds:e})=>["unable to find columns for these supplied colIds:",e],168:()=>"detailCellRendererParams.template should be function or string",169:()=>'Reference to eDetailGrid was missing from the details template. Please add data-ref="eDetailGrid" to the template.',170:({providedStrategy:e})=>`invalid cellRendererParams.refreshStrategy = ${e} supplied, defaulting to refreshStrategy = 'rows'.`,171:()=>"could not find detail grid options for master detail, please set gridOptions.detailCellRendererParams.detailGridOptions",172:()=>"could not find getDetailRowData for master / detail, please set gridOptions.detailCellRendererParams.getDetailRowData",173:({group:e})=>`invalid chartGroupsDef config '${e}'`,174:({group:e,chartType:t})=>`invalid chartGroupsDef config '${e}.${t}'`,175:({menuTabName:e,itemsToConsider:t})=>[`Trying to render an invalid menu item '${e}'. Check that your 'menuTabs' contains one of `,t],176:({key:e})=>`unknown menu item type ${e}`,177:()=>"valid values for cellSelection.handle.direction are 'x', 'y' and 'xy'. Default to 'xy'.",178:({colId:e})=>`column ${e} is not visible`,179:()=>"totalValueGetter should be either a function or a string (expression)",180:()=>"agRichSelectCellEditor requires cellEditorParams.values to be set",181:()=>"agRichSelectCellEditor cannot have `multiSelect` and `allowTyping` set to `true`. AllowTyping has been turned off.",182:()=>'you cannot mix groupDisplayType = "multipleColumns" with treeData, only one column can be used to display groups when doing tree data',183:()=>"Group Column Filter only works on group columns. Please use a different filter.",184:({parentGroupData:e,childNodeData:t})=>["duplicate group keys for row data, keys should be unique",[e,t]],185:({data:e})=>["getDataPath() should not return an empty path",[e]],186:({rowId:e,rowData:t,duplicateRowsData:o})=>["duplicate group keys for row data, keys should be unique",e,t,...o??[]],187:({rowId:e,firstData:t,secondData:o})=>[`Duplicate node id ${e}. Row IDs are provided via the getRowId() callback. Please modify the getRowId() callback code to provide unique row id values.`,"first instance",t,"second instance",o],188:()=>"getRowId callback must be provided for Server Side Row Model selection to work correctly.",189:({startRow:e})=>`invalid value ${e} for startRow, the value should be >= 0`,190:({rowGroupId:e,data:t})=>["null and undefined values are not allowed for server side row model keys",e?`column = ${e}`:"","data is ",t],194:({method:e})=>`calling gridApi.${e}() is only possible when using rowModelType=\`clientSide\`.`,195:({justCurrentPage:e})=>`selecting just ${e?"current page":"filtered"} only works when gridOptions.rowModelType='clientSide'`,196:({key:e})=>`Provided ids must be of string type. Invalid id provided: ${e}`,197:()=>"`toggledNodes` must be an array of string ids.",199:()=>"getSelectedNodes and getSelectedRows functions cannot be used with select all functionality with the server-side row model. Use `api.getServerSideSelectionState()` instead.",200:Wl,201:({rowModelType:e})=>`Could not find row model for rowModelType = ${e}`,202:()=>"`getSelectedNodes` and `getSelectedRows` functions cannot be used with `groupSelectsChildren` and the server-side row model. Use `api.getServerSideSelectionState()` instead.",203:()=>"Server Side Row Model does not support Dynamic Row Height and Cache Purging. Either a) remove getRowHeight() callback or b) remove maxBlocksInCache property. Purging has been disabled.",204:()=>"Server Side Row Model does not support Auto Row Height and Cache Purging. Either a) remove colDef.autoHeight or b) remove maxBlocksInCache property. Purging has been disabled.",205:({duplicateIdText:e})=>`Unable to display rows as duplicate row ids (${e}) were returned by the getRowId callback. Please modify the getRowId callback to provide unique ids.`,206:()=>"getRowId callback must be implemented for transactions to work. Transaction was ignored.",207:()=>'The Set Filter Parameter "defaultToNothingSelected" value was ignored because it does not work when "excelMode" is used.',208:()=>"Set Filter Value Formatter must return string values. Please ensure the Set Filter Value Formatter returns string values for complex objects.",209:()=>`Set Filter Key Creator is returning null for provided values and provided values are primitives. Please provide complex objects. See ${Oo}/filter-set-filter-list/#filter-value-types`,210:()=>"Set Filter has a Key Creator, but provided values are primitives. Did you mean to provide complex objects?",211:()=>"property treeList=true for Set Filter params, but you did not provide a treeListPathGetter or values of type Date.",212:()=>"please review all your toolPanel components, it seems like at least one of them doesn't have an id",213:()=>"Advanced Filter does not work with Filters Tool Panel. Filters Tool Panel has been disabled.",214:({key:e})=>`unable to lookup Tool Panel as invalid key supplied: ${e}`,215:({key:e,defaultByKey:t})=>`the key ${e} is not a valid key for specifying a tool panel, valid keys are: ${Object.keys(t??{}).join(",")}`,216:({name:e})=>`Missing component for '${e}'`,217:({invalidColIds:e})=>["unable to find grid columns for the supplied colDef(s):",e],218:({property:e,defaultOffset:t})=>`${e} must be a number, the value you provided is not a valid number. Using the default of ${t}px.`,219:({property:e})=>`Property ${e} does not exist on the target object.`,220:({lineDash:e})=>`'${e}' is not a valid 'lineDash' option.`,221:()=>"agAggregationComponent should only be used with the client and server side row model.",222:()=>"agFilteredRowCountComponent should only be used with the client side row model.",223:()=>"agSelectedRowCountComponent should only be used with the client and server side row model.",224:()=>"agTotalAndFilteredRowCountComponent should only be used with the client side row model.",225:()=>"agTotalRowCountComponent should only be used with the client side row model.",226:()=>"viewport is missing init method.",227:()=>"menu item icon must be DOM node or string",228:({menuItemOrString:e})=>`unrecognised menu item ${e}`,229:({index:e})=>["invalid row index for ensureIndexVisible: ",e],230:()=>"detailCellRendererParams.template is not supported by AG Grid React. To change the template, provide a Custom Detail Cell Renderer. See https://www.ag-grid.com/react-data-grid/master-detail-custom-detail/",231:()=>"As of v32, using custom components with `reactiveCustomComponents = false` is deprecated.",232:()=>"Using both rowData and v-model. rowData will be ignored.",233:({methodName:e})=>`Framework component is missing the method ${e}()`,234:()=>'Group Column Filter does not work with the colDef property "field". This property will be ignored.',235:()=>'Group Column Filter does not work with the colDef property "filterValueGetter". This property will be ignored.',236:()=>'Group Column Filter does not work with the colDef property "filterParams". This property will be ignored.',237:()=>"Group Column Filter does not work with Tree Data enabled. Please disable Tree Data, or use a different filter.",238:()=>"setRowCount can only accept a positive row count.",239:()=>'Theming API and CSS File Themes are both used in the same page. In v33 we released the Theming API as the new default method of styling the grid. See the migration docs https://www.ag-grid.com/react-data-grid/theming-migration/. Because no value was provided to the `theme` grid option it defaulted to themeQuartz. But the file (ag-grid.css) is also included and will cause styling issues. Either pass the string "legacy" to the theme grid option to use v32 style themes, or remove ag-grid.css from the page to use Theming API.',240:({theme:e})=>`theme grid option must be a Theming API theme object or the string "legacy", received: ${e}`,243:()=>"Failed to deserialize state - each provided state object must be an object.",244:()=>"Failed to deserialize state - `selectAllChildren` must be a boolean value or undefined.",245:()=>"Failed to deserialize state - `toggledNodes` must be an array.",246:()=>"Failed to deserialize state - Every `toggledNode` requires an associated string id.",247:()=>`Row selection state could not be parsed due to invalid data. Ensure all child state has toggledNodes or does not conform with the parent rule.
52
+ Please rebuild the selection state and reapply it.`,248:()=>"SetFloatingFilter expects SetFilter as its parent",249:()=>"Must supply a Value Formatter in Set Filter params when using a Key Creator",250:()=>"Must supply a Key Creator in Set Filter params when `treeList = true` on a group column, and Tree Data or Row Grouping is enabled.",251:({chartType:e})=>`AG Grid: Unable to create chart as an invalid chartType = '${e}' was supplied.`,252:()=>`cannot get grid to draw rows when it is in the middle of drawing rows.
53
+ Your code probably called a grid API method while the grid was in the render stage.
54
+ To overcome this, put the API call into a timeout, e.g. instead of api.redrawRows(), call setTimeout(function() { api.redrawRows(); }, 0).
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?.toString(16).toUpperCase()} is not a scalar value`,256:()=>"Unable to initialise. See validation error, or load ValidationModule if missing.",257:()=>Ul("IntegratedChartsModule"),258:()=>Ul("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})=>Wl({reasonOrId:`AG Grid '${e}' component: ${t}`,moduleName:ai[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 ${Oo}/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.`};function Pb(e,t){const o=Mb[e];if(!o)return[`Missing error text for error id ${e}!`];const i=o(t),n=`
56
+ See ${dc(e,t)}`;return Array.isArray(i)?i.concat(n):[i,n]}var Eb={1:"Charting Aggregation",2:"pivotResultFields",3:"setTooltip"},Ab=()=>({checkboxSelection:{version:"32.2",message:"Use `rowSelection.checkboxes` in `GridOptions` instead."},headerCheckboxSelection:{version:"32.2",message:"Use `rowSelection.headerCheckbox = true` in `GridOptions` instead."},headerCheckboxSelectionFilteredOnly:{version:"32.2",message:'Use `rowSelection.selectAll = "filtered"` in `GridOptions` instead.'},headerCheckboxSelectionCurrentPageOnly:{version:"32.2",message:'Use `rowSelection.selectAll = "currentPage"` in `GridOptions` instead.'},showDisabledCheckboxes:{version:"32.2",message:"Use `rowSelection.hideDisabledCheckboxes = true` in `GridOptions` instead."}}),Tb=()=>({aggFunc:{module:"SharedAggregation"},autoHeight:{supportedRowModels:["clientSide","serverSide"],module:"RowAutoHeight"},cellClass:{module:"CellStyle"},cellClassRules:{module:"CellStyle"},cellEditor:({cellEditor:e,editable:t})=>{if(!t)return null;if(typeof e=="string"){const o=ai[e];if(o)return{module:o}}return{module:"CustomEditor"}},cellRenderer:({cellRenderer:e})=>{if(typeof e!="string")return null;const t=ai[e];return t?{module:t}:null},cellRendererParams:{validate:e=>(e.rowGroup!=null||e.rowGroupIndex!=null||e.cellRenderer==="agGroupCellRenderer")&&"checkbox"in e.cellRendererParams?'Since v33.0, `cellRendererParams.checkbox` has been deprecated. Use `rowSelection.checkboxLocation = "autoGroupColumn"` instead.':null},cellStyle:{module:"CellStyle"},children:()=>Ju(),columnChooserParams:{module:"ColumnMenu"},contextMenuItems:{module:"ContextMenu"},dndSource:{module:"DragAndDrop"},dndSourceOnRowDrag:{module:"DragAndDrop"},editable:({editable:e,cellEditor:t})=>e&&!t?{module:"TextEditor"}:null,enableCellChangeFlash:{module:"HighlightChanges"},enablePivot:{module:"SharedPivot"},enableRowGroup:{module:"SharedRowGrouping"},enableValue:{module:"SharedAggregation"},filter:({filter:e})=>{if(e&&typeof e!="string"&&typeof e!="boolean")return{module:"CustomFilter"};if(typeof e=="string"){const t=ai[e];if(t)return{module:t}}return{module:"ColumnFilter"}},floatingFilter:{module:"ColumnFilter"},headerCheckboxSelection:{supportedRowModels:["clientSide","serverSide"],validate:(e,{rowSelection:t})=>t==="multiple"?null:"headerCheckboxSelection is only supported with rowSelection=multiple"},headerCheckboxSelectionCurrentPageOnly:{supportedRowModels:["clientSide"],validate:(e,{rowSelection:t})=>t==="multiple"?null:"headerCheckboxSelectionCurrentPageOnly is only supported with rowSelection=multiple"},headerCheckboxSelectionFilteredOnly:{supportedRowModels:["clientSide"],validate:(e,{rowSelection:t})=>t==="multiple"?null:"headerCheckboxSelectionFilteredOnly is only supported with rowSelection=multiple"},headerTooltip:{module:"Tooltip"},headerValueGetter:{validate:e=>{const t=e.headerValueGetter;return typeof t=="function"||typeof t=="string"?null:"headerValueGetter must be a function or a valid string expression"}},icons:{validate:({icons:e})=>{if(e){if(e.smallDown)return wo(262);if(e.smallLeft)return wo(263);if(e.smallRight)return wo(264)}return null}},mainMenuItems:{module:"ColumnMenu"},menuTabs:e=>{const t=["columnsMenuTab","generalMenuTab"];return e.menuTabs?.some(o=>t.includes(o))?{module:"ColumnMenu"}:null},pivot:{module:"SharedPivot"},pivotIndex:{module:"SharedPivot"},rowDrag:{module:"RowDrag"},rowGroup:{module:"SharedRowGrouping"},rowGroupIndex:{module:"SharedRowGrouping"},sortingOrder:{validate:e=>{const t=e.sortingOrder;if(Array.isArray(t)&&t.length>0){const o=t.filter(i=>!as.includes(i));if(o.length>0)return`sortingOrder must be an array with elements from [${as.map(nn).join()}], currently it includes [${o.map(nn).join()}]`}else if(!Array.isArray(t)||t.length<=0)return`sortingOrder must be an array with at least one element, currently it's ${t}`;return null}},tooltipField:{module:"Tooltip"},tooltipValueGetter:{module:"Tooltip"},type:{validate:e=>{const t=e.type;return t instanceof Array?t.some(i=>typeof i!="string")?"if colDef.type is supplied an array it should be of type 'string[]'":null:typeof t=="string"?null:"colDef.type should be of type 'string' | 'string[]'"}},rowSpan:{validate:(e,{suppressRowTransform:t})=>t?null:"colDef.rowSpan requires suppressRowTransform to be enabled."},spanRows:{module:"CellSpan",dependencies:{editable:{required:[!1,void 0]},rowDrag:{required:[!1,void 0]},colSpan:{required:[!1,void 0]},rowSpan:{required:[!1,void 0]}},validate:(e,{rowSelection:t,cellSelection:o,suppressRowTransform:i,enableCellSpan:s,rowDragEntireRow:n,enableCellTextSelection:r})=>typeof t=="object"&&t?.mode==="singleRow"&&t?.enableClickSelection?"colDef.spanRows is not supported with rowSelection.clickSelection":o?"colDef.spanRows is not supported with cellSelection.":i?"colDef.spanRows is not supported with suppressRowTransform.":s?n?"colDef.spanRows is not supported with rowDragEntireRow.":r?"colDef.spanRows is not supported with enableCellTextSelection.":null:"colDef.spanRows requires enableCellSpan to be enabled."}}),Ib={headerName:void 0,columnGroupShow:void 0,headerStyle:void 0,headerClass:void 0,toolPanelClass:void 0,headerValueGetter:void 0,pivotKeys:void 0,groupId:void 0,colId:void 0,sort:void 0,initialSort:void 0,field:void 0,type:void 0,cellDataType:void 0,tooltipComponent:void 0,tooltipField:void 0,headerTooltip:void 0,cellClass:void 0,showRowGroup:void 0,filter:void 0,initialAggFunc:void 0,defaultAggFunc:void 0,aggFunc:void 0,pinned:void 0,initialPinned:void 0,chartDataType:void 0,cellAriaRole:void 0,cellEditorPopupPosition:void 0,headerGroupComponent:void 0,headerGroupComponentParams:void 0,cellStyle:void 0,cellRenderer:void 0,cellRendererParams:void 0,cellEditor:void 0,cellEditorParams:void 0,filterParams:void 0,pivotValueColumn:void 0,headerComponent:void 0,headerComponentParams:void 0,floatingFilterComponent:void 0,floatingFilterComponentParams:void 0,tooltipComponentParams:void 0,refData:void 0,columnChooserParams:void 0,children:void 0,sortingOrder:void 0,allowedAggFuncs:void 0,menuTabs:void 0,pivotTotalColumnIds:void 0,cellClassRules:void 0,icons:void 0,sortIndex:void 0,initialSortIndex:void 0,flex:void 0,initialFlex:void 0,width:void 0,initialWidth:void 0,minWidth:void 0,maxWidth:void 0,rowGroupIndex:void 0,initialRowGroupIndex:void 0,pivotIndex:void 0,initialPivotIndex:void 0,suppressColumnsToolPanel:void 0,suppressFiltersToolPanel:void 0,openByDefault:void 0,marryChildren:void 0,suppressStickyLabel:void 0,hide:void 0,initialHide:void 0,rowGroup:void 0,initialRowGroup:void 0,pivot:void 0,initialPivot:void 0,checkboxSelection:void 0,showDisabledCheckboxes:void 0,headerCheckboxSelection:void 0,headerCheckboxSelectionFilteredOnly:void 0,headerCheckboxSelectionCurrentPageOnly:void 0,suppressHeaderMenuButton:void 0,suppressMovable:void 0,lockPosition:void 0,lockVisible:void 0,lockPinned:void 0,unSortIcon:void 0,suppressSizeToFit:void 0,suppressAutoSize:void 0,enableRowGroup:void 0,enablePivot:void 0,enableValue:void 0,editable:void 0,suppressPaste:void 0,suppressNavigable:void 0,enableCellChangeFlash:void 0,rowDrag:void 0,dndSource:void 0,autoHeight:void 0,wrapText:void 0,sortable:void 0,resizable:void 0,singleClickEdit:void 0,floatingFilter:void 0,cellEditorPopup:void 0,suppressFillHandle:void 0,wrapHeaderText:void 0,autoHeaderHeight:void 0,dndSourceOnRowDrag:void 0,valueGetter:void 0,valueSetter:void 0,filterValueGetter:void 0,keyCreator:void 0,valueFormatter:void 0,valueParser:void 0,comparator:void 0,equals:void 0,pivotComparator:void 0,suppressKeyboardEvent:void 0,suppressHeaderKeyboardEvent:void 0,colSpan:void 0,rowSpan:void 0,spanRows:void 0,getQuickFilterText:void 0,onCellValueChanged:void 0,onCellClicked:void 0,onCellDoubleClicked:void 0,onCellContextMenu:void 0,rowDragText:void 0,tooltipValueGetter:void 0,cellRendererSelector:void 0,cellEditorSelector:void 0,suppressSpanHeaderHeight:void 0,useValueFormatterForExport:void 0,useValueParserForImport:void 0,mainMenuItems:void 0,contextMenuItems:void 0,suppressFloatingFilterButton:void 0,suppressHeaderFilterButton:void 0,suppressHeaderContextMenu:void 0,loadingCellRenderer:void 0,loadingCellRendererParams:void 0,loadingCellRendererSelector:void 0,context:void 0,dateComponent:void 0,dateComponentParams:void 0,getFindText:void 0},Lb=()=>Object.keys(Ib),Ju=()=>({objectName:"colDef",allProperties:Lb(),docsUrl:"column-properties/",deprecations:Ab(),validations:Tb()}),kb=()=>({suppressLoadingOverlay:{version:"32",message:"Use `loading`=false instead."},enableFillHandle:{version:"32.2",message:"Use `cellSelection.handle` instead."},enableRangeHandle:{version:"32.2",message:"Use `cellSelection.handle` instead."},enableRangeSelection:{version:"32.2",message:"Use `cellSelection = true` instead."},suppressMultiRangeSelection:{version:"32.2",message:"Use `cellSelection.suppressMultiRanges` instead."},suppressClearOnFillReduction:{version:"32.2",message:"Use `cellSelection.handle.suppressClearOnFillReduction` instead."},fillHandleDirection:{version:"32.2",message:"Use `cellSelection.handle.direction` instead."},fillOperation:{version:"32.2",message:"Use `cellSelection.handle.setFillValue` instead."},suppressRowClickSelection:{version:"32.2",message:"Use `rowSelection.enableClickSelection` instead."},suppressRowDeselection:{version:"32.2",message:"Use `rowSelection.enableClickSelection` instead."},rowMultiSelectWithClick:{version:"32.2",message:"Use `rowSelection.enableSelectionWithoutKeys` instead."},groupSelectsChildren:{version:"32.2",message:'Use `rowSelection.groupSelects = "descendants"` instead.'},groupSelectsFiltered:{version:"32.2",message:'Use `rowSelection.groupSelects = "filteredDescendants"` instead.'},isRowSelectable:{version:"32.2",message:"Use `selectionOptions.isRowSelectable` instead."},suppressCopySingleCellRanges:{version:"32.2",message:"Use `rowSelection.copySelectedRows` instead."},suppressCopyRowsToClipboard:{version:"32.2",message:"Use `rowSelection.copySelectedRows` instead."},onRangeSelectionChanged:{version:"32.2",message:"Use `onCellSelectionChanged` instead."},onRangeDeleteStart:{version:"32.2",message:"Use `onCellSelectionDeleteStart` instead."},onRangeDeleteEnd:{version:"32.2",message:"Use `onCellSelectionDeleteEnd` instead."},suppressBrowserResizeObserver:{version:"32.2",message:"The grid always uses the browser's ResizeObserver, this grid option has no effect."},onColumnEverythingChanged:{version:"32.2",message:"Either use `onDisplayedColumnsChanged` which is fired at the same time, or use one of the more specific column events."},groupRemoveSingleChildren:{version:"33",message:"Use `groupHideParentOfSingleChild` instead."},groupRemoveLowestSingleChildren:{version:"33",message:'Use `groupHideParentOfSingleChild: "leafGroupsOnly"` instead.'},suppressRowGroupHidesColumns:{version:"33",message:'Use `suppressGroupChangesColumnVisibility: "suppressHideOnGroup"` instead.'},suppressMakeColumnVisibleAfterUnGroup:{version:"33",message:'Use `suppressGroupChangesColumnVisibility: "suppressShowOnUngroup"` instead.'},unSortIcon:{version:"33",message:"Use `defaultColDef.unSortIcon` instead."},sortingOrder:{version:"33",message:"Use `defaultColDef.sortingOrder` instead."},suppressPropertyNamesCheck:{version:"33",message:"`gridOptions` and `columnDefs` both have a `context` property that should be used for arbitrary user data. This means that column definitions and gridOptions should only contain valid properties making this property redundant."}});function Gt(e,t,o,i=Number.MAX_VALUE){return typeof t=="number"||t==null?t==null||t>=o&&t<=i?null:i===Number.MAX_VALUE?`${e}: value should be greater than or equal to ${o}`:`${e}: value should be between ${o} and ${i}`:`${e}: value should be a number`}var Gb=()=>{const e={alignedGrids:{module:"AlignedGrids"},allowContextMenuWithControlKey:{module:"ContextMenu"},autoSizePadding:{validate({autoSizePadding:o}){return Gt("autoSizePadding",o,0)}},autoSizeStrategy:{module:"ColumnAutoSize"},cacheBlockSize:{supportedRowModels:["serverSide","infinite"],validate({cacheBlockSize:o}){return Gt("cacheBlockSize",o,1)}},cacheOverflowSize:{validate({cacheOverflowSize:o}){return Gt("cacheOverflowSize",o,1)}},cellSelection:{module:"CellSelection"},columnHoverHighlight:{module:"ColumnHover"},datasource:{supportedRowModels:["infinite"],module:"InfiniteRowModel"},doesExternalFilterPass:{module:"ExternalFilter"},domLayout:{validate:o=>{const i=o.domLayout,s=["autoHeight","normal","print"];return i&&!s.includes(i)?`domLayout must be one of [${s.join()}], currently it's ${i}`:null}},editType:{module:"EditCore"},enableAdvancedFilter:{module:"AdvancedFilter"},enableCharts:{module:"IntegratedCharts"},enableFillHandle:{dependencies:{enableRangeSelection:{required:[!0]}}},enableRangeHandle:{dependencies:{enableRangeSelection:{required:[!0]}}},enableRangeSelection:{module:"CellSelection",dependencies:{rowDragEntireRow:{required:[!1,void 0]}}},findSearchValue:{module:"Find"},rowNumbers:{module:"RowNumbers"},getContextMenuItems:{module:"ContextMenu"},getLocaleText:{module:"Locale"},getMainMenuItems:{module:"ColumnMenu"},getRowClass:{module:"RowStyle"},getRowStyle:{module:"RowStyle"},grandTotalRow:{module:"SharedRowGrouping"},groupDefaultExpanded:{supportedRowModels:["clientSide"]},groupHideOpenParents:{supportedRowModels:["clientSide","serverSide"],dependencies:{groupTotalRow:{required:[void 0,"bottom"]},treeData:{required:[void 0,!1],reason:"Tree Data has values at the group level so it doesn't make sense to hide them."}}},groupHideParentOfSingleChild:{dependencies:{groupHideOpenParents:{required:[void 0,!1]}}},groupRemoveLowestSingleChildren:{dependencies:{groupHideOpenParents:{required:[void 0,!1]},groupRemoveSingleChildren:{required:[void 0,!1]}}},groupRemoveSingleChildren:{dependencies:{groupHideOpenParents:{required:[void 0,!1]},groupRemoveLowestSingleChildren:{required:[void 0,!1]}}},groupSelectsChildren:{dependencies:{rowSelection:{required:["multiple"]}}},icons:{validate:({icons:o})=>{if(o){if(o.smallDown)return wo(262);if(o.smallLeft)return wo(263);if(o.smallRight)return wo(264)}return null}},infiniteInitialRowCount:{validate({infiniteInitialRowCount:o}){return Gt("infiniteInitialRowCount",o,1)}},initialGroupOrderComparator:{supportedRowModels:["clientSide"]},initialState:{module:"GridState"},isExternalFilterPresent:{module:"ExternalFilter"},keepDetailRowsCount:{validate({keepDetailRowsCount:o}){return Gt("keepDetailRowsCount",o,1)}},localeText:{module:"Locale"},masterDetail:{module:"SharedMasterDetail"},pagination:{module:"Pagination"},paginationPageSize:{validate({paginationPageSize:o}){return Gt("paginationPageSize",o,1)}},paginationPageSizeSelector:{validate:o=>{const i=o.paginationPageSizeSelector;return typeof i=="boolean"||i==null||i.length?null:`'paginationPageSizeSelector' cannot be an empty array.
57
+ If you want to hide the page size selector, set paginationPageSizeSelector to false.`}},pinnedTopRowData:{module:"PinnedRow"},pinnedBottomRowData:{module:"PinnedRow"},pivotMode:{dependencies:{treeData:{required:[!1,void 0],reason:"Pivot Mode is not supported with Tree Data."}},module:"SharedPivot"},pivotPanelShow:{module:"RowGroupingPanel"},quickFilterText:{supportedRowModels:["clientSide"],module:"QuickFilter"},rowBuffer:{validate({rowBuffer:o}){return Gt("rowBuffer",o,0)}},rowClass:{validate:o=>typeof o.rowClass=="function"?"rowClass should not be a function, please use getRowClass instead":null,module:"RowStyle"},rowClassRules:{module:"RowStyle"},rowData:{supportedRowModels:["clientSide"],module:"ClientSideRowModel"},rowDragManaged:{supportedRowModels:["clientSide"],dependencies:{treeData:{required:[!1,void 0]},pagination:{required:[!1,void 0]}},module:"RowDrag"},rowGroupPanelShow:{module:"RowGroupingPanel"},rowSelection:{validate({rowSelection:o}){return o&&typeof o=="string"?'As of version 32.2.1, using `rowSelection` with the values "single" or "multiple" has been deprecated. Use the object value instead.':o&&typeof o!="object"?"Expected `RowSelectionOptions` object for the `rowSelection` property.":o&&o.mode!=="multiRow"&&o.mode!=="singleRow"?`Selection mode "${o.mode}" is invalid. Use one of 'singleRow' or 'multiRow'.`:null},module:"SharedRowSelection"},rowStyle:{validate:o=>{const i=o.rowStyle;return i&&typeof i=="function"?"rowStyle should be an object of key/value styles, not be a function, use getRowStyle() instead":null},module:"RowStyle"},serverSideDatasource:{supportedRowModels:["serverSide"],module:"ServerSideRowModel"},serverSideInitialRowCount:{supportedRowModels:["serverSide"],validate({serverSideInitialRowCount:o}){return Gt("serverSideInitialRowCount",o,1)}},serverSideOnlyRefreshFilteredGroups:{supportedRowModels:["serverSide"]},serverSideSortAllLevels:{supportedRowModels:["serverSide"]},sideBar:{module:"SideBar"},sortingOrder:{validate:o=>{const i=o.sortingOrder;if(Array.isArray(i)&&i.length>0){const s=i.filter(n=>!as.includes(n));if(s.length>0)return`sortingOrder must be an array with elements from [${as.map(nn).join()}], currently it includes [${s.map(nn).join()}]`}else if(!Array.isArray(i)||i.length<=0)return`sortingOrder must be an array with at least one element, currently it's ${i}`;return null}},statusBar:{module:"StatusBar"},tooltipHideDelay:{validate:o=>o.tooltipHideDelay&&o.tooltipHideDelay<0?"tooltipHideDelay should not be lower than 0":null},tooltipShowDelay:{validate:o=>o.tooltipShowDelay&&o.tooltipShowDelay<0?"tooltipShowDelay should not be lower than 0":null},treeData:{supportedRowModels:["clientSide","serverSide"],module:"SharedTreeData",validate:o=>{const i=o.rowModelType??"clientSide";switch(i){case"clientSide":{const{treeDataChildrenField:s,treeDataParentIdField:n,getDataPath:r,getRowId:a}=o;if(!s&&!n&&!r)return"treeData requires either 'treeDataChildrenField' or 'treeDataParentIdField' or 'getDataPath' in the clientSide row model.";if(s){if(r)return"Cannot use both 'treeDataChildrenField' and 'getDataPath' at the same time.";if(n)return"Cannot use both 'treeDataChildrenField' and 'treeDataParentIdField' at the same time."}if(n){if(!a)return"getRowId callback not provided, tree data with parent id cannot be built.";if(r)return"Cannot use both 'treeDataParentIdField' and 'getDataPath' at the same time."}return null}case"serverSide":{const s=`treeData requires 'isServerSideGroup' and 'getServerSideGroupKey' in the ${i} row model.`;return o.isServerSideGroup&&o.getServerSideGroupKey?null:s}}return null}},treeDataChildrenField:{module:"SharedTreeData"},treeDataParentIdField:{module:"SharedTreeData"},undoRedoCellEditing:{module:"UndoRedoEdit"},valueCache:{module:"ValueCache"},viewportDatasource:{supportedRowModels:["viewport"],module:"ViewportRowModel"},viewportRowModelBufferSize:{validate({viewportRowModelBufferSize:o}){return Gt("viewportRowModelBufferSize",o,0)}},viewportRowModelPageSize:{validate({viewportRowModelPageSize:o}){return Gt("viewportRowModelPageSize",o,1)}},rowDragEntireRow:{dependencies:{cellSelection:{required:[void 0]}}},enableCellSpan:{module:"CellSpan"},autoGroupColumnDef:{validate({autoGroupColumnDef:o,showOpenedGroup:i}){return o?.field&&i?"autoGroupColumnDef.field and showOpenedGroup are not supported when used together.":o?.valueGetter&&i?"autoGroupColumnDef.valueGetter and showOpenedGroup are not supported when used together.":null}}},t={};return Qu.forEach(o=>{t[o]={expectedType:"boolean"}}),qu.forEach(o=>{t[o]={expectedType:"number"}}),Ue(t,e),t},Ob=()=>({objectName:"gridOptions",allProperties:[...Qr,...Yu.map(e=>va(e))],propertyExceptions:["api"],docsUrl:"grid-options/",deprecations:kb(),validations:Gb()}),Bb={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,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},Nb={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",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",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"},Hb=new Set(["colorPicker","smallUp","checkboxChecked","checkboxIndeterminate","checkboxUnchecked","radioButtonOn","radioButtonOff","smallDown","smallLeft","smallRight"]),Vb={pinSubMenu:"PinnedColumn",pinLeft:"PinnedColumn",pinRight:"PinnedColumn",clearPinned:"PinnedColumn",valueAggSubMenu:"SharedAggregation",autoSizeThis:"ColumnAutoSize",autoSizeAll:"ColumnAutoSize",rowGroup:"SharedRowGrouping",rowUnGroup:"SharedRowGrouping",resetColumns:"CommunityCore",expandAll:["ClientSideRowModelHierarchy","ServerSideRowModel"],contractAll:["ClientSideRowModelHierarchy","ServerSideRowModel"],copy:"Clipboard",copyWithHeaders:"Clipboard",copyWithGroupHeaders:"Clipboard",cut:"Clipboard",paste:"Clipboard",export:["CsvExport","ExcelExport"],csvExport:"CsvExport",excelExport:"ExcelExport",separator:"CommunityCore",pivotChart:"IntegratedCharts",chartRange:"IntegratedCharts",columnFilter:"ColumnFilter",columnChooser:"ColumnMenu",sortAscending:"Sort",sortDescending:"Sort",sortUnSort:"Sort"},_b=class extends M{constructor(){super(...arguments),this.beanName="validation"}wireBeans(e){this.gridOptions=e.gridOptions,Lp(this)}postConstruct(){this.processGridOptions(this.gridOptions)}warnOnInitialPropertyUpdate(e,t){e==="api"&&Cb[t]&&_(22,{key:t})}processGridOptions(e){this.processOptions(e,Ob())}validateApiFunction(e,t){return Sb(e,t,this.beans)}missingUserComponent(e,t,o,i){const s=ai[t];s?this.gos.assertModuleRegistered(s,`AG Grid '${e}' component: ${t}`):_(101,{propertyName:e,componentName:t,agGridDefaults:o,jsComps:i})}checkRowEvents(e){Wb.has(e)&&_(10,{eventType:e})}validateIcon(e){if(Hb.has(e)&&_(43,{iconName:e}),Bb[e])return;const t=Nb[e];if(t){ae(200,{reasonOrId:`icon '${e}'`,moduleName:t,gridScoped:Ra(),gridId:this.beans.context.getGridId(),rowModelType:this.gos.get("rowModelType"),additionalText:"Alternatively, use the CSS icon name directly."});return}_(134,{iconName:e})}validateMenuItem(e){const t=Vb[e];t&&this.gos.assertModuleRegistered(t,`menu item '${e}'`)}isProvidedUserComp(e){return!!ai[e]}validateColDef(e,t,o){(o||!this.beans.dataTypeSvc?.isColPendingInference(t))&&this.processOptions(e,Ju())}processOptions(e,t){const{validations:o,deprecations:i,allProperties:s,propertyExceptions:n,objectName:r,docsUrl:a}=t;s&&this.gridOptions.suppressPropertyNamesCheck!==!0&&this.checkProperties(e,[...n??[],...Object.keys(i)],s,r,a);const l=new Set,d=u=>{const p=o[u];if(p)if(typeof p=="function"){const g=p(e,this.gridOptions,this.beans);if(!g)return;if("objectName"in g){const f=e[u];if(Array.isArray(f)){f.forEach(m=>{this.processOptions(m,g)});return}this.processOptions(e[u],g);return}return g}else return p;else return};Object.keys(e).forEach(u=>{const p=i[u];if(p){const{message:x,version:T}=p;l.add(`As of v${T}, ${String(u)} is deprecated. ${x??""}`)}const g=e[u];if(g==null||g===!1)return;const f=d(u);if(!f)return;const{module:m,dependencies:C,validate:v,supportedRowModels:S,expectedType:b}=f;if(b){const x=typeof g;if(x!==b){l.add(`${String(u)} should be of type '${b}' but received '${x}' (${g}).`);return}}if(S){const x=this.gridOptions.rowModelType??"clientSide";if(!S.includes(x)){l.add(`${String(u)} is not supported with the '${x}' row model. It is only valid with: ${S.join(", ")}.`);return}}if(m){const x=Array.isArray(m)?m:[m];let T=!0;if(x.forEach(A=>{this.gos.assertModuleRegistered(A,String(u))||(T=!1)}),!T)return}if(C){const x=this.checkForRequiredDependencies(u,C,e);if(x){l.add(x);return}}if(v){const x=v(e,this.gridOptions,this.beans);if(x){l.add(x);return}}}),l.size>0&&l.forEach(u=>{Bi(u)})}checkForRequiredDependencies(e,t,o){const s=Object.entries(t).filter(([n,r])=>{const a=o[n];return!r.required.includes(a)});return s.length===0?null:s.map(([n,r])=>`'${String(e)}' requires '${n}' to be one of [${r.required.map(a=>a===null?"null":a===void 0?"undefined":a).join(", ")}]. ${r.reason??""}`).join(`
58
+ `)}checkProperties(e,t,o,i,s){const n=["__ob__","__v_skip","__metadata__"],r=zb(Object.getOwnPropertyNames(e),[...n,...t,...o],o),a=Object.keys(r);for(const l of a){const d=r[l];let c=`invalid ${i} property '${l}' did you mean any of these: ${d.slice(0,8).join(", ")}.`;o.includes("context")&&(c+=`
59
+ If you are trying to annotate ${i} with application data, use the '${i}.context' property instead.`),Bi(c)}if(a.length>0&&s){const l=this.beans.frameworkOverrides.getDocLink(s);Bi(`to see all the valid ${i} properties please check: ${l}`)}}getConsoleMessage(e,t){return Pb(e,t)}};function zb(e,t,o){const i={},s=e.filter(n=>!t.some(r=>r===n));return s.length>0&&s.forEach(n=>i[n]=Xu({inputValue:n,allSuggestions:o}).values),i}var Wb=new Set(["firstChildChanged","lastChildChanged","childIndexChanged"]),Ub={moduleName:"Validation",version:ne,beans:[_b]};function eh(e){e.sibling&&(e.sibling.childrenAfterFilter=e.childrenAfterFilter)}var $b=class extends M{constructor(){super(...arguments),this.beanName="filterStage",this.refreshProps=new Set(["excludeChildrenWhenTreeDataFiltering"]),this.step="filter"}wireBeans(e){this.filterManager=e.filterManager}execute(e){const{changedPath:t}=e;this.filter(t)}filter(e){const t=!!this.filterManager?.isChildFilterPresent();this.filterNodes(t,e)}filterNodes(e,t){const o=(i,s)=>{i.hasChildren()&&e&&!s?i.childrenAfterFilter=i.childrenAfterGroup.filter(n=>{const r=n.childrenAfterFilter&&n.childrenAfterFilter.length>0,a=n.data&&this.filterManager.doesRowPassFilter({rowNode:n});return r||a}):i.childrenAfterFilter=i.childrenAfterGroup,eh(i)};if(this.doingTreeDataFiltering()){const i=(n,r)=>{if(n.childrenAfterGroup)for(let a=0;a<n.childrenAfterGroup.length;a++){const l=n.childrenAfterGroup[a],d=r||this.filterManager.doesRowPassFilter({rowNode:l});l.childrenAfterGroup?i(n.childrenAfterGroup[a],d):o(l,d)}o(n,r)},s=n=>i(n,!1);t.executeFromRootNode(s)}else{const i=s=>o(s,!1);t.forEachChangedNodeDepthFirst(i,!0)}}doingTreeDataFiltering(){return this.gos.get("treeData")&&!this.gos.get("excludeChildrenWhenTreeDataFiltering")}},jb=class extends ka{constructor(){super(...arguments),this.iconCreated=!1}setComp(e,t,o,i,s){this.comp=e;const n=cs(this,this.beans.context,s);this.eButtonShowMainFilter=o,this.eFloatingFilterBody=i,this.setGui(t,n),this.setupActive(),this.refreshHeaderStyles(),this.setupWidth(n),this.setupLeft(n),this.setupHover(n),this.setupFocus(n),this.setupAria(),this.setupFilterButton(),this.setupUserComp(),this.setupSyncWithFilter(n),this.setupUi(),n.addManagedElementListeners(this.eButtonShowMainFilter,{click:this.showParentFilter.bind(this)}),this.setupFilterChangedListener(n),n.addManagedListeners(this.column,{colDefChanged:()=>this.onColDefChanged(n)}),n.addDestroyFunc(()=>{this.eButtonShowMainFilter=null,this.eFloatingFilterBody=null,this.userCompDetails=null,this.clearComponent()})}resizeHeader(){}moveHeader(){}getHeaderClassParams(){const{column:e,beans:t}=this,o=e.colDef;return Z(t.gos,{colDef:o,column:e,floatingFilter:!0})}setupActive(){const e=this.column.getColDef(),t=!!e.filter,o=!!e.floatingFilter;this.active=t&&o}setupUi(){if(this.comp.setButtonWrapperDisplayed(!this.suppressFilterButton&&this.active),this.comp.addOrRemoveBodyCssClass("ag-floating-filter-full-body",this.suppressFilterButton),this.comp.addOrRemoveBodyCssClass("ag-floating-filter-body",!this.suppressFilterButton),!this.active||this.iconCreated)return;const e=oe("filter",this.beans,this.column);e&&(this.iconCreated=!0,this.eButtonShowMainFilter.appendChild(e))}setupFocus(e){e.createManagedBean(new Si(this.eGui,{shouldStopEventPropagation:this.shouldStopEventPropagation.bind(this),onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this)}))}setupAria(){const e=this.getLocaleTextFunc();ut(this.eButtonShowMainFilter,e("ariaFilterMenuOpen","Open Filter Menu"))}onTabKeyDown(e){const{beans:t}=this;if(Ee(t)===this.eGui)return;const s=Kt(t,this.eGui,null,e.shiftKey);if(s){t.headerNavigation?.scrollToColumn(this.column),e.preventDefault(),s.focus();return}const n=this.findNextColumnWithFloatingFilter(e.shiftKey);n&&t.focusSvc.focusHeaderPosition({headerPosition:{headerRowIndex:this.rowCtrl.rowIndex,column:n},event:e})&&e.preventDefault()}findNextColumnWithFloatingFilter(e){const t=this.beans.visibleCols;let o=this.column;do if(o=e?t.getColBefore(o):t.getColAfter(o),!o)break;while(!o.getColDef().filter||!o.getColDef().floatingFilter);return o}handleKeyDown(e){super.handleKeyDown(e);const t=this.getWrapperHasFocus();switch(e.key){case D.UP:case D.DOWN:t||e.preventDefault();case D.LEFT:case D.RIGHT:if(t)return;e.stopPropagation();case D.ENTER:t&&It(this.eGui)&&e.preventDefault();break;case D.ESCAPE:t||this.eGui.focus()}}onFocusIn(e){if(this.eGui.contains(e.relatedTarget))return;const o=!!e.relatedTarget&&!e.relatedTarget.classList.contains("ag-floating-filter"),i=!!e.relatedTarget&&Go(e.relatedTarget,"ag-floating-filter");if(o&&i&&e.target===this.eGui){const s=this.lastFocusEvent,n=!!(s&&s.key===D.TAB);if(s&&n){const r=s.shiftKey;It(this.eGui,r)}}this.focusThis()}setupHover(e){this.beans.colHover?.addHeaderFilterColumnHoverListener(e,this.comp,this.column,this.eGui)}setupLeft(e){const t=new La(this.column,this.eGui,this.beans);e.createManagedBean(t)}setupFilterButton(){this.suppressFilterButton=!this.beans.menuSvc?.isFloatingFilterButtonEnabled(this.column),this.highlightFilterButtonWhenActive=!Ve(this.gos)}setupUserComp(){if(!this.active)return;const e=this.beans.filterManager?.getFloatingFilterCompDetails(this.column,()=>this.showParentFilter());e&&this.setCompDetails(e)}setCompDetails(e){this.userCompDetails=e,this.comp.setCompDetails(e)}showParentFilter(){const e=this.suppressFilterButton?this.eFloatingFilterBody:this.eButtonShowMainFilter;this.beans.menuSvc?.showFilterMenu({column:this.column,buttonElement:e,containerType:"floatingFilter",positionBy:"button"})}setupSyncWithFilter(e){if(!this.active)return;const{filterManager:t}=this.beans,o=i=>{if(i?.source==="filterDestroyed"&&!this.isAlive())return;const s=this.comp.getFloatingFilterComp();s&&s.then(n=>{if(n){const r=t?.getCurrentFloatingFilterParentModel(this.column),a=i?{...i,columns:i.columns??[],source:i.source==="api"?"api":"columnFilter"}:null;n.onParentModelChanged(r,a)}})};[this.destroySyncListener]=e.addManagedListeners(this.column,{filterChanged:o}),t?.isFilterActive(this.column)&&o(null)}setupWidth(e){const t=()=>{const o=`${this.column.getActualWidth()}px`;this.comp.setWidth(o)};e.addManagedListeners(this.column,{widthChanged:t}),t()}setupFilterChangedListener(e){this.active&&([this.destroyFilterChangedListener]=e.addManagedListeners(this.column,{filterChanged:this.updateFilterButton.bind(this)}),this.updateFilterButton())}updateFilterButton(){if(!this.suppressFilterButton&&this.comp){const e=!!this.beans.filterManager?.isFilterAllowed(this.column);this.comp.setButtonWrapperDisplayed(e),this.highlightFilterButtonWhenActive&&e&&this.eButtonShowMainFilter.classList.toggle("ag-filter-active",this.column.isFilterActive())}}onColDefChanged(e){const t=this.active;this.setupActive();const o=!t&&this.active;t&&!this.active&&(this.destroySyncListener(),this.destroyFilterChangedListener());const i=this.active?this.beans.filterManager?.getFloatingFilterCompDetails(this.column,()=>this.showParentFilter()):null,s=this.comp.getFloatingFilterComp();!s||!i?this.updateCompDetails(e,i,o):s.then(n=>{!n||this.beans.filterManager?.areFilterCompsDifferent(this.userCompDetails??null,i)?this.updateCompDetails(e,i,o):this.updateFloatingFilterParams(i)})}updateCompDetails(e,t,o){this.isAlive()&&(this.setCompDetails(t),this.setupFilterButton(),this.setupUi(),o&&(this.setupSyncWithFilter(e),this.setupFilterChangedListener(e)))}updateFloatingFilterParams(e){if(!e)return;const t=e.params;this.comp.getFloatingFilterComp()?.then(o=>{o?.refresh&&typeof o.refresh=="function"&&o.refresh(t)})}addResizeAndMoveKeyboardListeners(){}destroy(){super.destroy(),this.destroySyncListener=null,this.destroyFilterChangedListener=null}};function Kb(e,t){const o=e.colModel.getCol(t);if(!o){ae(12,{colKey:t});return}e.menuSvc?.showColumnMenu({column:o,positionBy:"auto"})}function Yb(e){e.menuSvc?.hidePopupMenu()}var th={moduleName:"SharedMenu",version:ne,beans:[tC],apiFunctions:{showColumnMenu:Kb,hidePopupMenu:Yb}},qb=0,Qb=200,Xb=class extends M{constructor(){super(...arguments),this.beanName="popupSvc",this.popupList=[]}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.gridCtrl=e.gridCtrl}),this.addManagedEventListeners({gridStylesChanged:this.handleThemeChange.bind(this)})}getPopupParent(){const e=this.gos.get("popupParent");return e||this.gridCtrl.getGui()}positionPopupForMenu(e){const{eventSource:t,ePopup:o,column:i,node:s,event:n}=e,r=t.getBoundingClientRect(),a=this.getParentRect();this.setAlignedTo(t,o);let l=!1;const d=()=>{const c=this.keepXYWithinBounds(o,r.top-a.top,0),u=o.clientWidth>0?o.clientWidth:200;l||(o.style.minWidth=`${u}px`,l=!0);const g=a.right-a.left-u;let f;return this.gos.get("enableRtl")?(f=C(),f<0&&(f=m(),this.setAlignedStyles(o,"left")),f>g&&(f=0,this.setAlignedStyles(o,"right"))):(f=m(),f>g&&(f=C(),this.setAlignedStyles(o,"right")),f<0&&(f=0,this.setAlignedStyles(o,"left"))),{x:f,y:c};function m(){return r.right-a.left-2}function C(){return r.left-a.left-u}};this.positionPopup({ePopup:o,keepWithinBounds:!0,updatePosition:d,postProcessCallback:()=>this.callPostProcessPopup("subMenu",o,t,n instanceof MouseEvent?n:void 0,i,s)})}positionPopupUnderMouseEvent(e){const{ePopup:t,nudgeX:o,nudgeY:i,skipObserver:s}=e;this.positionPopup({ePopup:t,nudgeX:o,nudgeY:i,keepWithinBounds:!0,skipObserver:s,updatePosition:()=>this.calculatePointerAlign(e.mouseEvent),postProcessCallback:()=>this.callPostProcessPopup(e.type,e.ePopup,null,e.mouseEvent,e.column,e.rowNode)})}calculatePointerAlign(e){const t=this.getParentRect();return{x:e.clientX-t.left,y:e.clientY-t.top}}positionPopupByComponent(e){const{ePopup:t,nudgeX:o,nudgeY:i,keepWithinBounds:s,eventSource:n,alignSide:r="left",position:a="over",column:l,rowNode:d,type:c}=e,u=n.getBoundingClientRect(),p=this.getParentRect();this.setAlignedTo(n,t);const g=()=>{let f=u.left-p.left;r==="right"&&(f-=t.offsetWidth-u.width);let m;return a==="over"?(m=u.top-p.top,this.setAlignedStyles(t,"over")):(this.setAlignedStyles(t,"under"),this.shouldRenderUnderOrAbove(t,u,p,e.nudgeY||0)==="under"?m=u.top-p.top+u.height:m=u.top-t.offsetHeight-(i||0)*2-p.top),{x:f,y:m}};this.positionPopup({ePopup:t,nudgeX:o,nudgeY:i,keepWithinBounds:s,updatePosition:g,postProcessCallback:()=>this.callPostProcessPopup(c,t,n,null,l,d)})}shouldRenderUnderOrAbove(e,t,o,i){const s=o.bottom-t.bottom,n=t.top-o.top,r=e.offsetHeight+i;return s>r?"under":n>r||n>s?"above":"under"}setAlignedStyles(e,t){const o=this.getPopupIndex(e);if(o===-1)return;const i=this.popupList[o],{alignedToElement:s}=i;!s||(["right","left","over","above","under"].forEach(r=>{s.classList.remove(`ag-has-popup-positioned-${r}`),e.classList.remove(`ag-popup-positioned-${r}`)}),!t)||(s.classList.add(`ag-has-popup-positioned-${t}`),e.classList.add(`ag-popup-positioned-${t}`))}setAlignedTo(e,t){const o=this.getPopupIndex(t);if(o!==-1){const i=this.popupList[o];i.alignedToElement=e}}callPostProcessPopup(e,t,o,i,s,n){const r=this.gos.getCallback("postProcessPopup");r&&r({column:s,rowNode:n,ePopup:t,type:e,eventSource:o,mouseEvent:i})}positionPopup(e){const{ePopup:t,keepWithinBounds:o,nudgeX:i,nudgeY:s,skipObserver:n,updatePosition:r}=e,a={width:0,height:0},l=(d=!1)=>{let{x:c,y:u}=r();d&&t.clientWidth===a.width&&t.clientHeight===a.height||(a.width=t.clientWidth,a.height=t.clientHeight,i&&(c+=i),s&&(u+=s),o&&(c=this.keepXYWithinBounds(t,c,1),u=this.keepXYWithinBounds(t,u,0)),t.style.left=`${c}px`,t.style.top=`${u}px`,e.postProcessCallback&&e.postProcessCallback())};if(l(),!n){const d=bo(this.beans,t,()=>l(!0));setTimeout(()=>d(),Qb)}}getActivePopups(){return this.popupList.map(e=>e.element)}getParentRect(){const e=Le(this.beans);let t=this.getPopupParent();return t===e.body?t=e.documentElement:getComputedStyle(t).position==="static"&&(t=t.offsetParent),Zd(t)}keepXYWithinBounds(e,t,o){const i=o===0,s=i?"clientHeight":"clientWidth",n=i?"top":"left",r=i?"height":"width",a=i?"scrollTop":"scrollLeft",l=Le(this.beans),d=l.documentElement,c=this.getPopupParent(),u=e.getBoundingClientRect(),p=c.getBoundingClientRect(),g=l.documentElement.getBoundingClientRect(),f=c===l.body,m=Math.ceil(u[r]);let v=f?(i?Xd:en)(d)+d[a]:c[s];f&&(v-=Math.abs(g[n]-p[n]));const S=v-m;return Math.min(Math.max(t,0),Math.abs(S))}addPopup(e){const t=Le(this.beans),{eChild:o,ariaLabel:i,alwaysOnTop:s,positionCallback:n,anchorToElement:r}=e;if(!t)return _(122),{hideFunc:()=>{}};const a=this.getPopupIndex(o);if(a!==-1)return{hideFunc:this.popupList[a].hideFunc};this.initialisePopupPosition(o);const l=this.createPopupWrapper(o,i,!!s),d=this.addEventListenersToPopup({...e,wrapperEl:l});return n&&n(),this.addPopupToPopupList(o,l,d,r),{hideFunc:d}}initialisePopupPosition(e){const o=this.getPopupParent().getBoundingClientRect();j(e.style.top)||(e.style.top=`${o.top*-1}px`),j(e.style.left)||(e.style.left=`${o.left*-1}px`)}createPopupWrapper(e,t,o){const i=this.getPopupParent(),{environment:s,gos:n}=this.beans,r=Pe({tag:"div"});return s.applyThemeClasses(r),r.classList.add("ag-popup"),e.classList.add(n.get("enableRtl")?"ag-rtl":"ag-ltr","ag-popup-child"),e.hasAttribute("role")||qe(e,"dialog"),ut(e,t),r.appendChild(e),i.appendChild(r),o?this.setAlwaysOnTop(e,!0):this.bringPopupToFront(e),r}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=Le(t),i=this.getPopupParent(),{wrapperEl:s,eChild:n,closedCallback:r,afterGuiAttached:a,closeOnEsc:l,modal:d}=e;let c=!1;const u=m=>{if(!s.contains(Ee(t)))return;m.key===D.ESCAPE&&!Et(m)&&f({keyboardEvent:m})},p=m=>f({mouseEvent:m}),g=m=>f({touchEvent:m}),f=(m={})=>{const{mouseEvent:C,touchEvent:v,keyboardEvent:S,forceHide:b}=m;!b&&(this.isEventFromCurrentPopup({mouseEvent:C,touchEvent:v},n)||c)||(c=!0,i.removeChild(s),o.removeEventListener("keydown",u),o.removeEventListener("mousedown",p),o.removeEventListener("touchstart",g),o.removeEventListener("contextmenu",p),this.eventSvc.removeEventListener("dragStarted",p),r&&r(C||v||S),this.removePopupFromPopupList(n))};return a&&a({hidePopup:f}),window.setTimeout(()=>{l&&o.addEventListener("keydown",u),d&&(o.addEventListener("mousedown",p),this.eventSvc.addEventListener("dragStarted",p),o.addEventListener("touchstart",g),o.addEventListener("contextmenu",p))},0),f}addPopupToPopupList(e,t,o,i){this.popupList.push({element:e,wrapper:t,hideFunc:o,instanceId:qb++,isAnchored:!!i}),i&&this.setPopupPositionRelatedToElement(e,i)}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){this.setAlignedStyles(e,null),this.setPopupPositionRelatedToElement(e,null),this.popupList=this.popupList.filter(t=>t.element!==e)}keepPopupPositionedRelativeTo(e){const t=this.getPopupParent(),o=t.getBoundingClientRect(),{element:i,ePopup:s}=e,n=i.getBoundingClientRect(),r=u=>parseInt(u.substring(0,u.length-1),10),a=(u,p)=>{const g=o[u]-n[u],f=r(s.style[u]);return{initialDiff:g,lastDiff:g,initial:f,last:f,direction:p}},l=a("top",0),d=a("left",1),c=this.beans.frameworkOverrides;return new De(u=>{c.wrapIncoming(()=>{c.setInterval(()=>{const p=t.getBoundingClientRect(),g=i.getBoundingClientRect();if(g.top==0&&g.left==0&&g.height==0&&g.width==0){e.hidePopup();return}const m=(C,v)=>{const S=r(s.style[v]);C.last!==S&&(C.initial=S,C.last=S);const b=p[v]-g[v];if(b!=C.lastDiff){const x=this.keepXYWithinBounds(s,C.initial+C.initialDiff-b,C.direction);s.style[v]=`${x}px`,C.last=x}C.lastDiff=b};m(l,"top"),m(d,"left")},200).then(p=>{u(()=>{p!=null&&window.clearInterval(p)})})},"popupPositioning")})}hasAnchoredPopup(){return this.popupList.some(e=>e.isAnchored)}isEventFromCurrentPopup(e,t){const{mouseEvent:o,touchEvent:i}=e,s=o||i;if(!s)return!1;const n=this.getPopupIndex(t);if(n===-1)return!1;for(let r=n;r<this.popupList.length;r++){const a=this.popupList[r];if(Hr(a.element,s))return!0}return this.isElementWithinCustomPopup(s.target)}isElementWithinCustomPopup(e){const t=Le(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 p of o)p!==s&&(p.classList.contains("ag-always-on-top")?r.push(p):n.push(p));const a=[],l=r.length,u=s.classList.contains("ag-always-on-top")||!l?[...n,...r,s]:[...n,s,...r];for(let p=0;p<=i;p++){const g=u[p];if(o[p]===u[p]||g===s)continue;g.querySelectorAll("div").forEach(m=>{m.scrollTop!==0&&a.push([m,m.scrollTop])}),p===0?t.insertAdjacentElement("afterbegin",g):u[p-1].insertAdjacentElement("afterend",g)}for(;a.length;){const p=a.pop();p[0].scrollTop=p[1]}}},Bn={moduleName:"Popup",version:ne,beans:[Xb]},Zb=".ag-set-filter{--ag-indentation-level:0}.ag-set-filter-item{align-items:center;display:flex;height:100%}:where(.ag-ltr) .ag-set-filter-item{padding-left:calc(var(--ag-widget-container-horizontal-padding) + var(--ag-indentation-level)*var(--ag-set-filter-indent-size))}:where(.ag-rtl) .ag-set-filter-item{padding-right:calc(var(--ag-widget-container-horizontal-padding) + var(--ag-indentation-level)*var(--ag-set-filter-indent-size))}.ag-set-filter-item-checkbox{display:flex;height:100%;width:100%}.ag-set-filter-group-icons{display:block;>*{cursor:pointer}}:where(.ag-ltr) .ag-set-filter-group-icons{margin-right:var(--ag-widget-container-horizontal-padding)}:where(.ag-rtl) .ag-set-filter-group-icons{margin-left:var(--ag-widget-container-horizontal-padding)}.ag-filter-body-wrapper{display:flex;flex-direction:column}:where(.ag-menu:not(.ag-tabs) .ag-filter) .ag-filter-body-wrapper,:where(.ag-menu:not(.ag-tabs) .ag-filter)>:not(.ag-filter-wrapper){min-width:180px}.ag-filter-filter{flex:1 1 0px}.ag-filter-condition{display:flex;justify-content:center}.ag-floating-filter-body{display:flex;flex:1 1 auto;height:100%;position:relative}.ag-floating-filter-full-body{align-items:center;display:flex;flex:1 1 auto;height:100%;overflow:hidden;width:100%}:where(.ag-floating-filter-full-body)>div{flex:1 1 auto}.ag-floating-filter-input{align-items:center;display:flex;width:100%;>*{flex:1 1 auto}:where(.ag-input-field-input[type=date]){width:1px}}.ag-floating-filter-button{display:flex;flex:none}.ag-date-floating-filter-wrapper{display:flex}.ag-set-floating-filter-input [disabled]{pointer-events:none}.ag-floating-filter-button-button{-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;height:var(--ag-icon-size);width:var(--ag-icon-size)}.ag-filter-loading{align-items:unset;background-color:var(--ag-chrome-background-color);height:100%;padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding);position:absolute;width:100%;z-index:1;:where(.ag-menu) &{background-color:var(--ag-menu-background-color)}}.ag-filter-separator{border-top:1px solid var(--menu-separator-color)}:where(.ag-filter-select) .ag-picker-field-wrapper{width:0}.ag-filter-condition-operator{height:17px}:where(.ag-ltr) .ag-filter-condition-operator-or{margin-left:calc(var(--ag-spacing)*2)}:where(.ag-rtl) .ag-filter-condition-operator-or{margin-right:calc(var(--ag-spacing)*2)}.ag-set-filter-select-all{padding-top:var(--ag-widget-container-vertical-padding)}.ag-filter-no-matches,.ag-set-filter-list{height:calc(var(--ag-list-item-height)*6)}.ag-filter-no-matches{padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding)}.ag-set-filter-tree-list{height:calc(var(--ag-list-item-height)*10)}.ag-set-filter-filter{margin-left:var(--ag-widget-container-horizontal-padding);margin-right:var(--ag-widget-container-horizontal-padding);margin-top:var(--ag-widget-container-vertical-padding)}.ag-filter-to{margin-top:var(--ag-widget-vertical-spacing)}.ag-mini-filter{margin:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding)}:where(.ag-ltr) .ag-set-filter-add-group-indent{margin-left:calc(var(--ag-icon-size) + var(--ag-widget-container-horizontal-padding))}:where(.ag-rtl) .ag-set-filter-add-group-indent{margin-right:calc(var(--ag-icon-size) + var(--ag-widget-container-horizontal-padding))}:where(.ag-filter-menu) .ag-set-filter-list{min-width:200px}.ag-filter-virtual-list-item:focus-visible{box-shadow:inset var(--ag-focus-shadow)}.ag-filter-apply-panel{display:flex;justify-content:flex-end;overflow:hidden;padding:var(--ag-widget-vertical-spacing) var(--ag-widget-container-horizontal-padding) var(--ag-widget-container-vertical-padding)}.ag-filter-apply-panel-button{line-height:1.5}:where(.ag-ltr) .ag-filter-apply-panel-button{margin-left:calc(var(--ag-spacing)*2)}:where(.ag-rtl) .ag-filter-apply-panel-button{margin-right:calc(var(--ag-spacing)*2)}.ag-simple-filter-body-wrapper{display:flex;flex-direction:column;min-height:calc(var(--ag-list-item-height) + var(--ag-widget-container-vertical-padding) + var(--ag-widget-vertical-spacing));overflow-y:auto;padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding);padding-bottom:calc(var(--ag-widget-container-vertical-padding) - var(--ag-widget-vertical-spacing));&>*{margin-bottom:var(--ag-widget-vertical-spacing)}:where(.ag-resizer-wrapper){margin:0}}.ag-multi-filter-menu-item{margin:var(--ag-spacing) 0}.ag-multi-filter-group-title-bar{background-color:transparent;color:var(--ag-header-text-color);font-weight:500;padding:calc(var(--ag-spacing)*1.5) var(--ag-spacing)}.ag-group-filter-field-select-wrapper{display:flex;flex-direction:column;gap:var(--ag-widget-vertical-spacing);padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding)}";function Jb(e){const t=e.filterManager;return!!t?.isColumnFilterPresent()||!!t?.isAggregateFilterPresent()}function eR(e,t){return e.filterManager?.getColumnFilterInstance(t)??Promise.resolve(void 0)}function tR(e,t){const o=e.colModel.getColDefCol(t);if(o)return e.filterManager?.destroyFilter(o,"api")}function oR(e,t){e.frameworkOverrides.wrapIncoming(()=>e.filterManager?.setFilterModel(t))}function iR(e){return e.filterManager?.getFilterModel()??{}}function sR(e,t){return e.filterManager?.getColumnFilterModel(t)??null}function nR(e,t,o){return e.filterManager?.setColumnFilterModel(t,o)??Promise.resolve()}function rR(e,t){const o=e.colModel.getCol(t);if(!o){ae(12,{colKey:t});return}e.menuSvc?.showFilterMenu({column:o,containerType:"columnFilter",positionBy:"auto"})}var $l={january:"January",february:"February",march:"March",april:"April",may:"May",june:"June",july:"July",august:"August",september:"September",october:"October",november:"November",december:"December"},jl=["january","february","march","april","may","june","july","august","september","october","november","december"];function aR(e,t){return e==null?-1:t==null?1:parseFloat(e)-parseFloat(t)}var lR=class extends M{constructor(){super(...arguments),this.beanName="colFilter",this.allColumnFilters=new Map,this.allColumnListeners=new Map,this.activeAggregateFilters=[],this.activeColumnFilters=[],this.processingFilterChange=!1,this.filterModelUpdateQueue=[],this.columnFilterModelUpdateQueue=[]}postConstruct(){this.addManagedEventListeners({gridColumnsChanged:this.onColumnsChanged.bind(this),beforeRefreshModel:({params:e})=>{(e.rowDataUpdated||e.changedProps?.has("treeData"))&&this.onNewRowsLoaded("rowDataUpdated")},dataTypesInferred:this.processFilterModelUpdateQueue.bind(this)}),this.initialFilterModel={...this.gos.get("initialState")?.filter?.filterModel??{}}}setFilterModel(e,t="api"){const{colModel:o,dataTypeSvc:i,filterManager:s}=this.beans;if(i?.isPendingInference){this.filterModelUpdateQueue.push({model:e,source:t});return}const n=[],r=this.getFilterModel(!0);if(e){const a=new Set(Object.keys(e));this.allColumnFilters.forEach((l,d)=>{const c=e[d];n.push(Ds(l.filterPromise,c)),a.delete(d)}),a.forEach(l=>{const d=o.getColDefCol(l)||o.getCol(l);if(!d){_(62,{colId:l});return}if(!d.isFilterAllowed()){_(63,{colId:l});return}const c=this.getOrCreateFilterWrapper(d);if(!c){_(64,{colId:l});return}n.push(Ds(c.filterPromise,e[l]))})}else this.allColumnFilters.forEach(a=>{n.push(Ds(a.filterPromise,null))});De.all(n).then(()=>{const a=this.getFilterModel(!0),l=[];this.allColumnFilters.forEach((d,c)=>{const u=r?r[c]:null,p=a?a[c]:null;Xi(u,p)||l.push(d.column)}),l.length>0&&s?.onFilterChanged({columns:l,source:t})})}getFilterModel(e){const t={},{allColumnFilters:o,initialFilterModel:i,beans:{colModel:s}}=this;if(o.forEach((n,r)=>{const a=this.getModelFromFilterWrapper(n);j(a)&&(t[r]=a)}),!e)for(const n of Object.keys(i)){const r=i[n];j(r)&&!o.has(n)&&s.getCol(n)?.isFilterAllowed()&&(t[n]=r)}return t}getModelFromFilterWrapper(e){const{filter:t}=e;return t?typeof t.getModel!="function"?(_(66),null):t.getModel():this.getModelFromInitialState(e.column)}getModelFromInitialState(e){return this.initialFilterModel[e.getColId()]??null}isColumnFilterPresent(){return this.activeColumnFilters.length>0}isAggregateFilterPresent(){return!!this.activeAggregateFilters.length}disableColumnFilters(){this.initialFilterModel={};const{allColumnFilters:e}=this;return e.size?(e.forEach(t=>this.disposeFilterWrapper(t,"advancedFilterEnabled")),!0):!1}doAggregateFiltersPass(e,t){return this.doColumnFiltersPass(e,t,!0)}updateActiveFilters(){const e=a=>a?a.isFilterActive?a.isFilterActive():(_(67),!1):!1,{colModel:t,gos:o}=this.beans,i=!!Ji(o),s=a=>{if(!a.isPrimary())return!0;const d=!t.isPivotActive();return!a.isValueActive()||!d?!1:t.isPivotMode()?!0:i},n=[],r=[];return this.forEachColumnFilter((a,l)=>{e(a)&&(s(l.column)?n.push(a):r.push(a))}).then(()=>{this.activeAggregateFilters=n,this.activeColumnFilters=r})}updateFilterFlagInColumns(e,t){return this.forEachColumnFilter((o,i)=>this.setColFilterActive(i.column,o.isFilterActive(),e,t))}forEachColumnFilter(e){const t=[];return this.allColumnFilters.forEach(o=>{const i=o.filterPromise;i&&t.push(i.then(s=>e(s,o)))}),De.all(t)}doColumnFiltersPass(e,t,o){const{data:i,aggData:s}=e,n=o?this.activeAggregateFilters:this.activeColumnFilters,r=o?s:i;for(let a=0;a<n.length;a++){const l=n[a];if(!(l==null||l===t)){if(typeof l.doesFilterPass!="function"){ae(91);continue}if(!l.doesFilterPass({node:e,data:r}))return!1}}return!0}callOnFilterChangedOutsideRenderCycle(e){const{rowRenderer:t,filterManager:o}=this.beans,i=()=>{this.isAlive()&&o?.onFilterChanged(e)};t.isRefreshInProgress()?setTimeout(i,0):i()}updateBeforeFilterChanged(e={}){const{filterInstance:t,additionalEventAttributes:o}=e;return this.updateDependentFilters(),this.updateActiveFilters().then(()=>this.updateFilterFlagInColumns("filterChanged",o).then(()=>{this.allColumnFilters.forEach(i=>{i.filterPromise&&i.filterPromise.then(s=>{s&&s!==t&&s.onAnyFilterChanged&&s.onAnyFilterChanged()})}),this.processingFilterChange=!0}))}updateAfterFilterChanged(){this.processingFilterChange=!1}isSuppressFlashingCellsBecauseFiltering(){return!(this.gos.get("allowShowChangeAfterFilter")??!1)&&this.processingFilterChange}onNewRowsLoaded(e){this.forEachColumnFilter(t=>{t.onNewRowsLoaded?.()}).then(()=>this.updateFilterFlagInColumns(e,{afterDataChange:!0})).then(()=>this.updateActiveFilters())}createGetValue(e){const{filterValueSvc:t,colModel:o}=this.beans;return(i,s)=>{const n=s?o.getCol(s):e;return n?t.getValue(n,i):void 0}}isFilterActive(e){const{filter:t}=this.cachedFilter(e)??{};return t?t.isFilterActive():this.getModelFromInitialState(e)!=null}getOrCreateFilterWrapper(e){if(!e.isFilterAllowed())return null;let t=this.cachedFilter(e);return t||(t=this.createFilterWrapper(e),this.setColumnFilterWrapper(e,t)),t}cachedFilter(e){return this.allColumnFilters.get(e.getColId())}getDefaultFilter(e){let t;const{gos:o,dataTypeSvc:i}=this.beans;if(Qn(o))t="agSetColumnFilter";else{const s=i?.getBaseDataType(e);s==="number"?t="agNumberColumnFilter":s==="date"||s==="dateString"?t="agDateColumnFilter":t="agTextColumnFilter"}return t}getDefaultFloatingFilter(e){let t;const{gos:o,dataTypeSvc:i}=this.beans;if(Qn(o))t="agSetColumnFloatingFilter";else{const s=i?.getBaseDataType(e);s==="number"?t="agNumberColumnFloatingFilter":s==="date"||s==="dateString"?t="agDateColumnFloatingFilter":t="agTextColumnFloatingFilter"}return t}createFilterInstance(e,t){const o=this.getDefaultFilter(e),i=e.getColDef();let s;const n={...this.createFilterParams(e,i),filterModifiedCallback:()=>this.filterModifiedCallbackFactory(s,e)(),filterChangedCallback:a=>this.filterChangedCallbackFactory(s,e)(a),doesRowPassOtherFilter:a=>this.beans.filterManager?.doesRowPassOtherFilters(s,a)??!0},r=tf(this.beans.userCompFactory,i,n,o);return r?{filterPromise:()=>{const a=r.newAgStackInstance();return a.then(l=>{s=l,t&&(t.filter=l??void 0)}),a},compDetails:r}:{filterPromise:null,compDetails:null}}createFilterParams(e,t){return Z(this.gos,{column:e,colDef:t,rowModel:this.beans.rowModel,filterChangedCallback:()=>{},filterModifiedCallback:()=>{},getValue:this.createGetValue(e),doesRowPassOtherFilter:()=>!0})}createFilterWrapper(e){const t={column:e,filterPromise:null,compDetails:null},{filterPromise:o,compDetails:i}=this.createFilterInstance(e,t);return t.filterPromise=o?.()??null,t.compDetails=i,t}onColumnsChanged(){const e=[],{colModel:t,filterManager:o}=this.beans;this.allColumnFilters.forEach((s,n)=>{let r;s.column.isPrimary()?r=t.getColDefCol(n):r=t.getCol(n),!(r&&r===s.column)&&(e.push(s.column),this.disposeFilterWrapper(s,"columnChanged"),this.disposeColumnListener(n))});const i=e.every(Kl);e.length>0&&!i?o?.onFilterChanged({columns:e,source:"api"}):this.updateDependentFilters()}updateDependentFilters(){this.beans.autoColSvc?.getColumns()?.forEach(e=>{Kl(e)&&this.getOrCreateFilterWrapper(e)})}isFilterAllowed(e){if(!e.isFilterAllowed())return!1;const{filter:o}=this.allColumnFilters.get(e.getColId())??{};return o&&typeof o?.isFilterAllowed=="function"?o.isFilterAllowed():!0}getFloatingFilterCompDetails(e,t){const o=c=>{const u=this.getOrCreateFilterWrapper(e)?.filterPromise;u?.then(p=>{c(fl(p))})},i=e.getColDef(),s={...this.createFilterParams(e,i),filterChangedCallback:()=>o(c=>this.filterChangedCallbackFactory(c,e)())},{userCompFactory:n,frameworkOverrides:r}=this.beans,a=lf(n,i,s);let l=im(r,i,()=>this.getDefaultFloatingFilter(e));l==null&&(l="agReadOnlyFloatingFilter");const d=Z(this.gos,{column:e,filterParams:a,currentParentModel:()=>this.getCurrentFloatingFilterParentModel(e),parentFilterInstance:o,showParentFilter:t});return rf(n,i,d,l)}getCurrentFloatingFilterParentModel(e){return this.getModelFromFilterWrapper(this.cachedFilter(e)??{column:e})}destroyFilter(e,t="api"){const o=e.getColId(),i=this.allColumnFilters.get(o);this.disposeColumnListener(o),delete this.initialFilterModel[o],i&&this.disposeFilterWrapper(i,t).then(s=>{s&&this.isAlive()&&this.beans.filterManager?.onFilterChanged({columns:[e],source:"api"})})}disposeColumnListener(e){const t=this.allColumnListeners.get(e);t&&(this.allColumnListeners.delete(e),t())}disposeFilterWrapper(e,t){return e.filterPromise?.then(o=>{const i=!!o?.isFilterActive();return this.destroyBean(o),this.setColFilterActive(e.column,!1,"filterDestroyed"),this.allColumnFilters.delete(e.column.getColId()),this.eventSvc.dispatchEvent({type:"filterDestroyed",source:t,column:e.column}),i})??De.resolve(!1)}filterModifiedCallbackFactory(e,t){return()=>{this.eventSvc.dispatchEvent({type:"filterModified",column:t,filterInstance:e})}}filterChangedCallbackFactory(e,t){return o=>{const i=o?.source??"columnFilter",s={filter:e,additionalEventAttributes:o,columns:[t],source:i};this.callOnFilterChangedOutsideRenderCycle(s)}}checkDestroyFilter(e){const t=this.allColumnFilters.get(e);if(!t)return;const o=t.column,{compDetails:i}=o.isFilterAllowed()?this.createFilterInstance(o):{compDetails:null};if(this.areFilterCompsDifferent(t.compDetails,i)){this.destroyFilter(o,"paramsUpdated");return}const s=o.getColDef().filterParams;if(!t.filterPromise){this.destroyFilter(o,"paramsUpdated");return}t.filterPromise.then(n=>{(n?.refresh?n.refresh({...this.createFilterParams(o,o.getColDef()),filterModifiedCallback:this.filterModifiedCallbackFactory(n,o),filterChangedCallback:this.filterChangedCallbackFactory(n,o),doesRowPassOtherFilter:a=>this.beans.filterManager?.doesRowPassOtherFilters(n,a)??!0,...s}):!0)===!1&&this.destroyFilter(o,"paramsUpdated")})}setColumnFilterWrapper(e,t){const o=e.getColId();this.allColumnFilters.set(o,t),this.allColumnListeners.set(o,this.addManagedListeners(e,{colDefChanged:()=>this.checkDestroyFilter(o)})[0])}areFilterCompsDifferent(e,t){if(!t||!e)return!0;const{componentClass:o}=e,{componentClass:i}=t;return!(o===i||o?.render&&i?.render&&o.render===i.render)}hasFloatingFilters(){return this.beans.colModel.getCols().some(t=>t.getColDef().floatingFilter)}getColumnFilterInstance(e){return new Promise(t=>{this.getFilterInstanceImpl(e).then(o=>{t(fl(o))})})}getFilterInstanceImpl(e){const t=this.beans.colModel.getColDefCol(e);return t?this.getOrCreateFilterWrapper(t)?.filterPromise??De.resolve(null):De.resolve(void 0)}processFilterModelUpdateQueue(){this.filterModelUpdateQueue.forEach(({model:e,source:t})=>this.setFilterModel(e,t)),this.filterModelUpdateQueue=[],this.columnFilterModelUpdateQueue.forEach(({key:e,model:t,resolve:o})=>{this.setColumnFilterModel(e,t).then(()=>o())}),this.columnFilterModelUpdateQueue=[]}getColumnFilterModel(e){const t=this.getFilterWrapper(e);return t?this.getModelFromFilterWrapper(t):null}setColumnFilterModel(e,t){const{colModel:o,dataTypeSvc:i}=this.beans;if(i?.isPendingInference){let a=()=>{};const l=new Promise(d=>{a=d});return this.columnFilterModelUpdateQueue.push({key:e,model:t,resolve:a}),l}const s=o.getColDefCol(e),n=s?this.getOrCreateFilterWrapper(s):null;return n?(a=>new Promise(l=>{a.then(d=>l(d))}))(Ds(n.filterPromise,t)):Promise.resolve()}getFilterWrapper(e){const t=this.beans.colModel.getColDefCol(e);return t?this.cachedFilter(t)??null:null}setColDefPropertiesForDataType(e,t,o){const i=Qn(this.gos),s=this.getLocaleTextFunc(),n=r=>{const{filterParams:a}=e;e.filterParams=typeof a=="object"?{...a,...r}:r};switch(t.baseDataType){case"number":{i&&n({comparator:aR});break}case"boolean":{n(i?{valueFormatter:r=>j(r.value)?s(String(r.value),r.value?"True":"False"):s("blanks","(Blanks)")}:{maxNumConditions:1,debounceMs:0,filterOptions:["empty",{displayKey:"true",displayName:"True",predicate:(r,a)=>a,numberOfInputs:0},{displayKey:"false",displayName:"False",predicate:(r,a)=>a===!1,numberOfInputs:0}]});break}case"date":{n(i?{valueFormatter:r=>{const a=o(r);return j(a)?a:s("blanks","(Blanks)")},treeList:!0,treeListFormatter:(r,a)=>{if(r==="NaN")return s("invalidDate","Invalid Date");if(a===1&&r!=null){const l=jl[Number(r)-1];return s(l,$l[l])}return r??s("blanks","(Blanks)")}}:{isValidDate:Yl});break}case"dateString":{const r=t.dateParser;n(i?{valueFormatter:a=>{const l=o(a);return j(l)?l:s("blanks","(Blanks)")},treeList:!0,treeListPathGetter:a=>{const l=r(a??void 0);return l?[String(l.getFullYear()),String(l.getMonth()+1),String(l.getDate())]:null},treeListFormatter:(a,l)=>{if(l===1&&a!=null){const d=jl[Number(a)-1];return s(d,$l[d])}return a??s("blanks","(Blanks)")}}:{comparator:(a,l)=>{const d=r(l);return l==null||d<a?-1:d>a?1:0},isValidDate:a=>typeof a=="string"&&Yl(r(a))});break}case"object":{i?n({valueFormatter:r=>{const a=o(r);return j(a)?a:s("blanks","(Blanks)")}}):e.filterValueGetter=r=>o({column:r.column,node:r.node,value:this.beans.valueSvc.getValue(r.column,r.node)});break}}}setColFilterActive(e,t,o,i){e.filterActive!==t&&(e.filterActive=t,e.dispatchColEvent("filterActiveChanged",o)),e.dispatchColEvent("filterChanged",o,i)}destroy(){super.destroy(),this.allColumnFilters.forEach(e=>this.disposeFilterWrapper(e,"gridDestroyed")),this.allColumnListeners.clear()}};function Ds(e,t){return e?new De(o=>{e.then(i=>{typeof i.setModel!="function"&&(_(65),o()),(i.setModel(t)||De.resolve()).then(()=>o())})}):De.resolve()}function Kl(e){return e.getColDef().filter==="agGroupColumnFilter"}function Yl(e){return e instanceof Date&&!isNaN(e.getTime())}function dR(e){return!!e.filterManager?.isAnyFilterPresent()}function cR(e,t="api"){e.filterManager?.onFilterChanged({source:t})}var uR=class extends M{constructor(){super(...arguments),this.beanName="filterManager",this.advFilterModelUpdateQueue=[]}wireBeans(e){this.quickFilter=e.quickFilter,this.advancedFilter=e.advancedFilter,this.colFilter=e.colFilter}postConstruct(){const e=this.refreshFiltersForAggregations.bind(this),t=this.updateAdvFilterColumns.bind(this);this.addManagedEventListeners({columnValueChanged:e,columnPivotChanged:e,columnPivotModeChanged:e,newColumnsLoaded:t,columnVisible:t,advancedFilterEnabledChanged:({enabled:i})=>this.onAdvFilterEnabledChanged(i),dataTypesInferred:this.processFilterModelUpdateQueue.bind(this)}),this.externalFilterPresent=this.isExternalFilterPresentCallback(),this.addManagedPropertyListeners(["isExternalFilterPresent","doesExternalFilterPass"],()=>{this.onFilterChanged({source:"api"})}),this.updateAggFiltering(),this.addManagedPropertyListener("groupAggFiltering",()=>{this.updateAggFiltering(),this.onFilterChanged()}),this.quickFilter&&this.addManagedListeners(this.quickFilter,{quickFilterChanged:()=>this.onFilterChanged({source:"quickFilter"})});const{gos:o}=this;this.alwaysPassFilter=o.get("alwaysPassFilter"),this.addManagedPropertyListener("alwaysPassFilter",()=>{this.alwaysPassFilter=o.get("alwaysPassFilter"),this.onFilterChanged({source:"api"})})}isExternalFilterPresentCallback(){const e=this.gos.getCallback("isExternalFilterPresent");return typeof e=="function"&&e({})}doesExternalFilterPass(e){const t=this.gos.get("doesExternalFilterPass");return typeof t=="function"&&t(e)}setFilterModel(e,t="api"){if(this.isAdvFilterEnabled()){this.warnAdvFilters();return}this.colFilter?.setFilterModel(e,t)}getFilterModel(){return this.colFilter?.getFilterModel()??{}}isColumnFilterPresent(){return!!this.colFilter?.isColumnFilterPresent()}isAggregateFilterPresent(){return!!this.colFilter?.isAggregateFilterPresent()}isChildFilterPresent(){return this.isColumnFilterPresent()||this.isQuickFilterPresent()||this.externalFilterPresent||this.isAdvFilterPresent()}isAnyFilterPresent(){return this.isChildFilterPresent()||this.isAggregateFilterPresent()}isAdvFilterPresent(){return this.isAdvFilterEnabled()&&this.advancedFilter.isFilterPresent()}onAdvFilterEnabledChanged(e){e?this.colFilter?.disableColumnFilters()&&this.onFilterChanged({source:"advancedFilter"}):this.advancedFilter?.isFilterPresent()&&(this.advancedFilter.setModel(null),this.onFilterChanged({source:"advancedFilter"}))}isAdvFilterEnabled(){return!!this.advancedFilter?.isEnabled()}isAdvFilterHeaderActive(){return this.isAdvFilterEnabled()&&this.advancedFilter.isHeaderActive()}refreshFiltersForAggregations(){Ji(this.gos)&&this.onFilterChanged()}onFilterChanged(e={}){const{source:t,additionalEventAttributes:o,columns:i=[]}=e;this.externalFilterPresent=this.isExternalFilterPresentCallback(),(this.colFilter?this.colFilter.updateBeforeFilterChanged(e):De.resolve()).then(()=>{const s={source:t,type:"filterChanged",columns:i};o&&Ue(s,o),this.eventSvc.dispatchEvent(s),this.colFilter?.updateAfterFilterChanged()})}isSuppressFlashingCellsBecauseFiltering(){return!!this.colFilter?.isSuppressFlashingCellsBecauseFiltering()}isQuickFilterPresent(){return!!this.quickFilter?.isFilterPresent()}updateAggFiltering(){this.aggFiltering=!!Ji(this.gos)}isAggregateQuickFilterPresent(){return this.isQuickFilterPresent()&&this.shouldApplyQuickFilterAfterAgg()}isNonAggregateQuickFilterPresent(){return this.isQuickFilterPresent()&&!this.shouldApplyQuickFilterAfterAgg()}shouldApplyQuickFilterAfterAgg(){return(this.aggFiltering||this.beans.colModel.isPivotMode())&&!this.gos.get("applyQuickFilterBeforePivotOrAgg")}doesRowPassOtherFilters(e,t){return this.doesRowPassFilter({rowNode:t,filterInstanceToSkip:e})}doesRowPassAggregateFilters(e){const{rowNode:t}=e;return this.alwaysPassFilter?.(t)?!0:!(this.isAggregateQuickFilterPresent()&&!this.quickFilter.doesRowPass(t)||this.isAggregateFilterPresent()&&!this.colFilter.doAggregateFiltersPass(t,e.filterInstanceToSkip))}doesRowPassFilter(e){const{rowNode:t}=e;return this.alwaysPassFilter?.(t)?!0:!(this.isNonAggregateQuickFilterPresent()&&!this.quickFilter.doesRowPass(t)||this.externalFilterPresent&&!this.doesExternalFilterPass(t)||this.isColumnFilterPresent()&&!this.colFilter.doColumnFiltersPass(t,e.filterInstanceToSkip)||this.isAdvFilterPresent()&&!this.advancedFilter.doesFilterPass(t))}isFilterActive(e){return!!this.colFilter?.isFilterActive(e)}getOrCreateFilterWrapper(e){return this.colFilter?.getOrCreateFilterWrapper(e)??null}getDefaultFloatingFilter(e){return this.colFilter.getDefaultFloatingFilter(e)}createFilterParams(e,t){return this.colFilter.createFilterParams(e,t)}isFilterAllowed(e){return this.isAdvFilterEnabled()?!1:!!this.colFilter?.isFilterAllowed(e)}getFloatingFilterCompDetails(e,t){return this.colFilter?.getFloatingFilterCompDetails(e,t)}getCurrentFloatingFilterParentModel(e){return this.colFilter?.getCurrentFloatingFilterParentModel(e)}destroyFilter(e,t="api"){this.colFilter?.destroyFilter(e,t)}areFilterCompsDifferent(e,t){return!!this.colFilter?.areFilterCompsDifferent(e,t)}getAdvFilterModel(){return this.isAdvFilterEnabled()?this.advancedFilter.getModel():null}setAdvFilterModel(e,t="api"){if(this.isAdvFilterEnabled()){if(this.beans.dataTypeSvc?.isPendingInference){this.advFilterModelUpdateQueue.push(e);return}this.advancedFilter.setModel(e??null),this.onFilterChanged({source:t})}}toggleAdvFilterBuilder(e,t){this.isAdvFilterEnabled()&&this.advancedFilter.getCtrl().toggleFilterBuilder({source:t,force:e})}updateAdvFilterColumns(){this.isAdvFilterEnabled()&&this.advancedFilter.updateValidity()&&this.onFilterChanged({source:"advancedFilter"})}hasFloatingFilters(){return this.isAdvFilterEnabled()?!1:!!this.colFilter?.hasFloatingFilters()}getColumnFilterInstance(e){return this.isAdvFilterEnabled()?(this.warnAdvFilters(),Promise.resolve(void 0)):this.colFilter?.getColumnFilterInstance(e)??Promise.resolve(void 0)}warnAdvFilters(){_(68)}setupAdvFilterHeaderComp(e){this.advancedFilter?.getCtrl().setupHeaderComp(e)}getHeaderRowCount(){return this.isAdvFilterHeaderActive()?1:0}getHeaderHeight(){return this.isAdvFilterHeaderActive()?this.advancedFilter.getCtrl().getHeaderHeight():0}processFilterModelUpdateQueue(){this.advFilterModelUpdateQueue.forEach(e=>this.setAdvFilterModel(e)),this.advFilterModelUpdateQueue=[]}getColumnFilterModel(e){return this.colFilter?.getColumnFilterModel(e)}setColumnFilterModel(e,t){return this.isAdvFilterEnabled()?(this.warnAdvFilters(),Promise.resolve()):this.colFilter?.setColumnFilterModel(e,t)??Promise.resolve()}setColDefPropertiesForDataType(e,t,o){this.colFilter?.setColDefPropertiesForDataType(e,t,o)}},hR=class extends M{constructor(){super(...arguments),this.beanName="filterMenuFactory"}wireBeans(e){this.popupSvc=e.popupSvc}hideActiveMenu(){this.hidePopup?.()}showMenuAfterMouseEvent(e,t,o,i){this.showPopup(e,s=>{this.popupSvc?.positionPopupUnderMouseEvent({column:e,type:o,mouseEvent:t,ePopup:s})},o,t.target,Ve(this.gos),i)}showMenuAfterButtonClick(e,t,o,i){let s=-1,n="left";const r=Ve(this.gos);!r&&this.gos.get("enableRtl")&&(s=1,n="right");const a=r?void 0:4*s,l=r?void 0:4;this.showPopup(e,d=>{this.popupSvc?.positionPopupByComponent({type:o,eventSource:t,ePopup:d,nudgeX:a,nudgeY:l,alignSide:n,keepWithinBounds:!0,position:"under",column:e})},o,t,r,i)}showPopup(e,t,o,i,s,n){const r=e?this.createBean(new nu(e,"COLUMN_MENU")):void 0;if(this.activeMenu=r,!r?.hasFilter()||!e){ae(57);return}const a=Pe({tag:"div",cls:`ag-menu${s?"":" ag-filter-menu"}`,role:"presentation"});[this.tabListener]=this.addManagedElementListeners(a,{keydown:m=>this.trapFocusWithin(m,a)}),a.appendChild(r?.getGui());let l;const d=()=>r?.afterGuiDetached(),c=Cc(this.gos)?i??this.beans.ctrlsSvc.getGridBodyCtrl().eGridBody:void 0,u=m=>{vn(e,!1,"contextMenu");const C=m instanceof KeyboardEvent;this.tabListener&&(this.tabListener=this.tabListener()),C&&i&&ht(i)&&Fa(i)?.focus({preventScroll:!0}),d(),this.destroyBean(this.activeMenu),this.dispatchVisibleChangedEvent(!1,o,e),n?.()},p=this.getLocaleTextFunc(),g=s&&o!=="columnFilter"?p("ariaLabelColumnMenu","Column Menu"):p("ariaLabelColumnFilter","Column Filter"),f=this.popupSvc?.addPopup({modal:!0,eChild:a,closeOnEsc:!0,closedCallback:u,positionCallback:()=>t(a),anchorToElement:c,ariaLabel:g});f&&(this.hidePopup=l=f.hideFunc),r.afterInit().then(()=>{t(a),r.afterGuiAttached({container:o,hidePopup:l})}),vn(e,!0,"contextMenu"),this.dispatchVisibleChangedEvent(!0,o,e)}trapFocusWithin(e,t){e.key!==D.TAB||e.defaultPrevented||Kt(this.beans,t,!1,e.shiftKey)||(e.preventDefault(),It(t,e.shiftKey))}dispatchVisibleChangedEvent(e,t,o){this.eventSvc.dispatchEvent({type:"columnMenuVisibleChanged",visible:e,switchingTab:!1,key:t,column:o??null,columnGroup:null})}isMenuEnabled(e){return e.isFilterAllowed()&&(e.getColDef().menuTabs??["filterMenuTab"]).includes("filterMenuTab")}showMenuAfterContextMenuEvent(){}destroy(){this.destroyBean(this.activeMenu),super.destroy()}},pR=class extends M{constructor(){super(...arguments),this.beanName="filterValueSvc"}getValue(e,t){if(!t)return;const o=e.getColDef(),{filterValueGetter:i}=o;return i?this.executeFilterValueGetter(i,t.data,e,t,o):this.beans.valueSvc.getValue(e,t)}executeFilterValueGetter(e,t,o,i,s){const{expressionSvc:n,valueSvc:r}=this.beans,a=Z(this.gos,{data:t,node:i,column:o,colDef:s,getValue:r.getValueCallback.bind(r,i)});return typeof e=="function"?e(a):n?.evaluate(e,a)}},gR={moduleName:"ClientSideRowModelFilter",version:ne,rowModels:["clientSide"],beans:[$b]},fR={moduleName:"FilterCore",version:ne,beans:[uR],apiFunctions:{isAnyFilterPresent:dR,onFilterChanged:cR},css:[Zb],dependsOn:[gR]},mR={moduleName:"FilterValue",version:ne,beans:[pR]},CR={moduleName:"ColumnFilter",version:ne,beans:[lR,hR],dynamicBeans:{headerFilterCellCtrl:jb},icons:{filter:"filter",filterActive:"filter"},apiFunctions:{isColumnFilterPresent:Jb,getColumnFilterInstance:eR,destroyFilter:tR,setFilterModel:oR,getFilterModel:iR,getColumnFilterModel:sR,setColumnFilterModel:nR,showColumnFilter:rR},dependsOn:[fR,Bn,mR,th]},vR=class extends M{constructor(){super(...arguments),this.beanName="selectionColSvc"}postConstruct(){this.addManagedPropertyListener("rowSelection",e=>{this.onSelectionOptionsChanged(e.currentValue,e.previousValue,No(e.source))}),this.addManagedPropertyListener("selectionColumnDef",this.updateColumns.bind(this))}addColumns(e){const t=this.columns;t!=null&&(e.list=t.list.concat(e.list),e.tree=t.tree.concat(e.tree),Mc(e))}createColumns(e,t){const o=()=>{yo(this.beans,this.columns?.tree),this.columns=null},i=e.treeDepth,n=(this.columns?.treeDepth??-1)==i,r=this.generateSelectionCols();if(Dc(r,this.columns?.list??[])&&n)return;o();const{colGroupSvc:l}=this.beans,d=l?.findDepth(e.tree)??0,c=l?.balanceTreeForAutoCols(r,d)??[];this.columns={list:r,tree:c,treeDepth:d,map:{}},t(p=>{if(!p)return null;const g=p.filter(f=>!io(f));return[...r,...g]})}updateColumns(e){const t=No(e.source),o=e.currentValue;this.columns?.list.forEach(i=>{const s=this.createSelectionColDef(o);i.setColDef(s,null,t),it(this.beans,{state:[{colId:i.getColId(),...s}]},t)})}getColumn(e){return this.columns?.list.find(t=>Sa(t,e))??null}getColumns(){return this.columns?.list??null}isSelectionColumnEnabled(){const{gos:e,beans:t}=this,o=e.get("rowSelection");if(typeof o!="object"||!Ht(e))return!1;const i=(t.autoColSvc?.getColumns()?.length??0)>0;if(o.checkboxLocation==="autoGroupColumn"&&i)return!1;const s=!!Bo(o),n=Os(o);return s||n}createSelectionColDef(e){const{gos:t}=this.beans,o=e??t.get("selectionColumnDef"),i=t.get("enableRtl"),{rowSpan:s,spanRows:n,...r}=o??{};return{width:50,resizable:!1,suppressHeaderMenuButton:!0,sortable:!1,suppressMovable:!0,lockPosition:i?"right":"left",comparator(a,l,d,c){const u=d.isSelected(),p=c.isSelected();return u===p?0:u?1:-1},editable:!1,suppressFillHandle:!0,pinned:null,...r,colId:xc}}generateSelectionCols(){if(!this.isSelectionColumnEnabled())return[];const e=this.createSelectionColDef(),t=e.colId;this.beans.validation?.validateColDef(e,t,!0);const o=new In(e,null,t,!1);return this.createBean(o),[o]}onSelectionOptionsChanged(e,t,o){const i=t&&typeof t!="string"?Bo(t):void 0,s=e&&typeof e!="string"?Bo(e):void 0,n=i!==s,r=t&&typeof t!="string"?Os(t):void 0,a=e&&typeof e!="string"?Os(e):void 0,l=r!==a,d=ts(e),c=ts(t);(n||l||d!==c)&&this.beans.colModel.refreshAll(o)}destroy(){yo(this.beans,this.columns?.tree),super.destroy()}refreshVisibility(e){if(!this.isSelectionColumnEnabled())return;const t=this.beans,o=t.visibleCols.getAllTrees()??[];if(o.length!==0){if(!o.some(oh)){const i=ss(t).find(s=>io(s.colId));i&&it(t,{state:[{colId:i.colId,hide:!i.hide}]},e)}if(o.length===1){const i=o[0],s=ih(i);if(!s)return;it(t,{state:[{colId:s.getColId(),hide:!0}]},e)}}}},oh=e=>e.isColumn?io(e):e.getChildren()?.some(oh)??!1;function ih(e){if(e.isColumn)return io(e)?e:null;const t=e.getChildren()??[];for(const o of t){const i=ih(o);if(i)return i}return null}function wR(e,t){if(!t.nodes.every(r=>r.rowPinned?(_(59),!1):r.id===void 0?(_(60),!1):!0))return;const{nodes:i,source:s,newValue:n}=t;e.selectionSvc?.setNodesSelected({nodes:i,source:s??"api",newValue:n})}function SR(e,t,o="apiSelectAll"){e.selectionSvc?.selectAllRowNodes({source:o,selectAll:t})}function yR(e,t,o="apiSelectAll"){e.selectionSvc?.deselectAllRowNodes({source:o,selectAll:t})}function bR(e,t="apiSelectAllFiltered"){e.selectionSvc?.selectAllRowNodes({source:t,selectAll:"filtered"})}function RR(e,t="apiSelectAllFiltered"){e.selectionSvc?.deselectAllRowNodes({source:t,selectAll:"filtered"})}function FR(e,t="apiSelectAllCurrentPage"){e.selectionSvc?.selectAllRowNodes({source:t,selectAll:"currentPage"})}function xR(e,t="apiSelectAllCurrentPage"){e.selectionSvc?.deselectAllRowNodes({source:t,selectAll:"currentPage"})}function DR(e){return e.selectionSvc?.getSelectedNodes()??[]}function MR(e){return e.selectionSvc?.getSelectedRows()??[]}var PR={moduleName:"SharedRowSelection",version:ne,beans:[vR],apiFunctions:{setNodesSelected:wR,selectAll:SR,deselectAll:yR,selectAllFiltered:bR,deselectAllFiltered:RR,selectAllOnCurrentPage:FR,deselectAllOnCurrentPage:xR,getSelectedNodes:DR,getSelectedRows:MR}};function ER(e){e.expansionSvc?.expandAll(!0)}function AR(e){e.expansionSvc?.expandAll(!1)}function TR(e){const t=Yt(e),o=Ri(e);t?t.onRowHeightChanged():o&&o.onRowHeightChanged()}function IR(e,t,o){const i=Ri(e);if(i){if(e.rowGroupColsSvc?.columns.length===0){if(t<0){ae(238);return}i.setRowCount(t,o);return}ae(28);return}const s=eb(e);if(s){s.setRowCount(t,o);return}}function LR(e){return pt(e.gos)?e.rowModel.getBlockStates():e.rowNodeBlockLoader?.getBlockState()??{}}function kR(e){return e.rowModel.isLastRowIndexKnown()}var sh={moduleName:"CsrmSsrmSharedApi",version:ne,apiFunctions:{expandAll:ER,collapseAll:AR,onRowHeightChanged:TR}},GR={moduleName:"SsrmInfiniteSharedApi",version:ne,apiFunctions:{setRowCount:IR,getCacheBlockState:LR,isLastRowIndexKnown:kR}},OR=class extends mC{constructor(){super(...arguments),this.beanName="csrmNodeSvc"}},hr=class{constructor(){this.removals=new Set,this.updates=new Set,this.adds=new Set}remove(e){this.adds.delete(e)||(this.updates.delete(e),this.removals.add(e))}update(e){this.adds.has(e)||this.updates.add(e)}add(e){this.adds.add(e)}};function BR(e){if(Me(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 nh(e){e.sibling&&(e.sibling.childrenAfterSort=e.childrenAfterSort),BR(e)}var NR=class extends M{constructor(){super(...arguments),this.beanName="sortStage",this.refreshProps=new Set(["postSortRows","groupDisplayType","accentedSort"]),this.step="sort"}execute(e){const t=this.beans,o=t.sortSvc.getSortOptions(),i=j(o)&&o.length>0,s=i&&!!e.changedRowNodes&&this.gos.get("deltaSort"),n=o.some(({column:r})=>Mt(t.gos)?r.isPrimary()&&r.isRowGroupActive():!!r.getColDef().showRowGroup);this.sort(t,o,i,s,e.changedRowNodes,e.changedPath,n)}sort(e,t,o,i,s,n,r){const{gos:a,colModel:l,rowGroupColsSvc:d,rowNodeSorter:c,rowRenderer:u,showRowGroupCols:p}=e,g=a.get("groupMaintainOrder"),f=l.getCols().some(b=>b.isRowGroupActive()),m=l.isPivotMode(),C=a.getCallback("postSortRows");let v=!1;const S=b=>{const x=m&&b.leafGroup,T=g&&f&&!b.leafGroup&&!r;let A;if(T){const y=d?.columns?.[b.level+1]?.getSort()===null,w=b.childrenAfterAggFilter.slice(0);if(b.childrenAfterSort&&!y){const R={};b.childrenAfterSort.forEach((F,H)=>{R[F.id]=H}),w.sort((F,H)=>(R[F.id]??0)-(R[H.id]??0))}A=w}else!o||x?A=b.childrenAfterAggFilter.slice(0):i&&s?A=HR(c,b,s,n,t):A=c.doFullSort(b.childrenAfterAggFilter,t);if(v||(v=b.childrenAfterSort?.[0]!==A[0]),b.childrenAfterSort=A,nh(b),C){const P={nodes:b.childrenAfterSort};C(P)}};if(n?.forEachChangedNodeDepthFirst(S),v&&this.gos.get("groupHideOpenParents")){const b=p?.getShowRowGroupCols();b?.length&&u.refreshCells({columns:b,force:!0})}}};function HR(e,t,o,i,s){const n=t.childrenAfterAggFilter,r=t.childrenAfterSort;if(!r)return e.doFullSort(n,s);const a=new Set,l=[],{updates:d,adds:c}=o;for(let p=0,g=n.length;p<g;++p){const f=n[p];d.has(f)||c.has(f)||i&&!i.canSkip(f)?l.push({currentPos:l.length,rowNode:f}):a.add(f.id)}const u=r.filter(p=>a.has(p.id)).map((p,g)=>({currentPos:g,rowNode:p}));return l.sort((p,g)=>e.compareRowNodes(s,p,g)),VR(e,s,l,u)}function VR(e,t,o,i){const s=[];let n=0,r=0;const a=o.length,l=i.length;for(;n<a&&r<l;){const d=o[n],c=i[r],u=e.compareRowNodes(t,d,c);let p;u<0?(p=d,++n):(p=c,++r),s.push(p.rowNode)}for(;n<a;)s.push(o[n++].rowNode);for(;r<l;)s.push(i[r++].rowNode);return s}var _R=class extends M{constructor(){super(...arguments),this.beanName="rowModel",this.rootNode=null,this.rowsToDisplay=[],this.started=!1,this.isRefreshingModel=!1,this.rowNodesCountReady=!1,this.rowCountReady=!1,this.onRowHeightChanged_debounced=tt(this,this.onRowHeightChanged.bind(this),100)}wireBeans(e){this.colModel=e.colModel,this.valueCache=e.valueCache,this.filterStage=e.filterStage,this.sortStage=e.sortStage,this.flattenStage=e.flattenStage,this.groupStage=e.groupStage,this.aggStage=e.aggStage,this.pivotStage=e.pivotStage,this.filterAggStage=e.filterAggStage}postConstruct(){this.orderedStages=[this.groupStage,this.filterStage,this.pivotStage,this.aggStage,this.sortStage,this.filterAggStage,this.flattenStage].filter(i=>!!i);const e=this.refreshModel.bind(this,{step:"group"}),t=this.refreshModel.bind(this,{step:"group",afterColumnsChanged:!0,keepRenderedRows:!0,animate:!this.gos.get("suppressAnimationFrame")});this.addManagedEventListeners({newColumnsLoaded:t,columnRowGroupChanged:e,columnValueChanged:this.onValueChanged.bind(this),columnPivotChanged:this.refreshModel.bind(this,{step:"pivot"}),filterChanged:this.onFilterChanged.bind(this),sortChanged:this.onSortChanged.bind(this),columnPivotModeChanged:e,gridStylesChanged:this.onGridStylesChanges.bind(this),gridReady:this.onGridReady.bind(this)}),this.addPropertyListeners(),this.rootNode=new jo(this.beans);const o=this.getNewNodeManager();this.nodeManager=o,o.activate(this.rootNode)}getNewNodeManager(){const{gos:e,beans:t}=this;switch(vc(e)){case"treeNested":return t.csrmChildrenTreeNodeSvc??t.csrmNodeSvc;case"treePath":return t.csrmPathTreeNodeSvc??t.csrmNodeSvc;default:return t.csrmNodeSvc}}addPropertyListeners(){const e=["treeData","treeDataChildrenField",...this.orderedStages.flatMap(({refreshProps:t})=>[...t])];this.addManagedPropertyListeners(e,t=>{const o=t.changeSet?.properties;o&&this.onPropChange(o)}),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(e,t,o,i){let s,n=!1;do{s=!1;const r=this.getRowIndexAtPixel(e),a=this.getRowIndexAtPixel(t),l=Math.max(r,o),d=Math.min(a,i);for(let c=l;c<=d;c++){const u=this.getRow(c);if(u.rowHeightEstimated){const p=vt(this.beans,u);u.setRowHeight(p.height),s=!0,n=!0}}s&&this.setRowTopAndRowIndex()}while(s);return n}onPropChange(e){if(!this.rootNode)return;const t=this.gos,o=new Set(e),i={step:"nothing",changedProps:o},s=o.has("rowData"),n=this.nodeManager,r=this.getNewNodeManager(),a=n!==r||s&&o.has("treeData")&&t.get("treeData")||o.has("treeDataChildrenField")&&t.get("treeData");let l;if((a||s)&&(l=t.get("rowData"),l!=null&&!Array.isArray(l)&&(l=null,_(1))),a&&(s||(l=n?.extractRowData()??l),n!==r&&(n?.deactivate(),this.nodeManager=r),r.activate(this.rootNode)),l&&(!a&&!this.isEmpty()&&l.length>0&&t.exists("getRowId")&&!t.get("resetRowDataOnUpdate")?(i.keepRenderedRows=!0,i.animate=!this.gos.get("suppressAnimationFrame"),i.changedRowNodes=new hr,r.setImmutableRowData(i,l)):(i.rowDataUpdated=!0,i.newData=!0,this.beans.selectionSvc?.reset("rowDataChanged"),this.rowNodesCountReady=!0,r.setNewRowData(l))),i.rowDataUpdated)i.step="group";else if(i.step==="nothing"){for(const{refreshProps:d,step:c}of this.orderedStages)if(e.some(u=>d.has(u))){i.step=c;break}}i.step!=="nothing"&&this.refreshModel(i)}setRowTopAndRowIndex(){const{beans:e}=this,t=e.environment.getDefaultRowHeight();let o=0;const i=new Set,s=We(this.gos,"normal"),n=this.rowsToDisplay;for(let r=0,a=n.length;r<a;++r){const l=n[r];if(l.id!=null&&i.add(l.id),l.rowHeight==null){const d=vt(e,l,s,t);l.setRowHeight(d.height,d.estimated)}l.setRowTop(o),l.setRowIndex(r),o+=l.rowHeight}return i}clearRowTopAndRowIndex(e,t){const o=e.active,i=n=>{n&&n.id!=null&&!t.has(n.id)&&n.clearRowTopAndRowIndex()},s=n=>{if(n!==null&&(i(n),i(n.detailNode),i(n.sibling),n.hasChildren()&&n.childrenAfterGroup)){const r=n.level==-1;o&&!r&&!n.expanded||n.childrenAfterGroup.forEach(s)}};s(this.rootNode)}ensureRowsAtPixel(e,t,o=0){const i=this.getRowIndexAtPixel(t),s=this.getRow(i),n=!this.gos.get("suppressAnimationFrame");if(s===e[0])return!1;const r=this.rootNode?.allLeafChildren;return r?(e.forEach(a=>{st(r,a)}),e.forEach((a,l)=>{r.splice(Math.max(i+o,0)+l,0,a)}),e.forEach((a,l)=>{a.sourceRowIndex=l}),this.refreshModel({step:"group",keepRenderedRows:!0,animate:n,rowNodesOrderChanged:!0}),!0):!1}highlightRowAtPixel(e,t){const o=t!=null?this.getRowIndexAtPixel(t):null,i=o!=null?this.getRow(o):null;if(!i||!e||t==null){this.clearHighlightedRow();return}const s=this.getHighlightPosition(t,i),n=this.isHighlightingCurrentPosition(e,i,s),r=this.lastHighlightedRow!=null&&this.lastHighlightedRow!==i;(n||r)&&(this.clearHighlightedRow(),n)||(this.setRowNodeHighlighted(i,s),this.lastHighlightedRow=i)}setRowNodeHighlighted(e,t){e.highlighted!==t&&(e.highlighted=t,e.dispatchRowEvent("rowHighlightChanged"))}getHighlightPosition(e,t){if(!t){const s=this.getRowIndexAtPixel(e);if(t=this.getRow(s||0),!t)return"Below"}const{rowTop:o,rowHeight:i}=t;return e-o<i/2?"Above":"Below"}getLastHighlightedRowNode(){return this.lastHighlightedRow}isHighlightingCurrentPosition(e,t,o){if(e===t)return!0;const i=o==="Above"?-1:1;return this.getRow(t.rowIndex+i)===e}clearHighlightedRow(){this.lastHighlightedRow&&(this.setRowNodeHighlighted(this.lastHighlightedRow,null),this.lastHighlightedRow=null)}isLastRowIndexKnown(){return!0}getRowCount(){return this.rowsToDisplay?this.rowsToDisplay.length:0}getTopLevelRowCount(){const e=this.rootNode;if(!e||this.rowsToDisplay.length===0)return 0;if(this.rowsToDisplay&&this.rowsToDisplay[0]===e)return 1;const o=e.childrenAfterAggFilter,i=e.sibling?1:0;return(o?o.length:0)+i}getTopLevelRowDisplayedIndex(e){const{rootNode:t,rowsToDisplay:o}=this;if(!t||!o.length||o[0]===t)return e;const{childrenAfterSort:s}=t,n=a=>{let l=s[a];if(this.gos.get("groupHideOpenParents"))for(;l.expanded&&l.childrenAfterSort&&l.childrenAfterSort.length>0;)l=l.childrenAfterSort[0];return l.rowIndex},{footerSvc:r}=this.beans;return r?r.getTopDisplayIndex(o,e,s,n):n(e)}getTopLevelIndexFromDisplayedIndex(e){const{rootNode:t,rowsToDisplay:o}=this;if(!t||!o.length||o[0]===t)return e;let s=this.getRow(e);for(s.footer&&(s=s.sibling);s.parent&&s.parent!==t;)s=s.parent;const n=t.childrenAfterSort?.findIndex(r=>r===s);return n===-1?e:n??e}getRowBounds(e){const t=this.rowsToDisplay[e];return t?{rowTop:t.rowTop,rowHeight:t.rowHeight}:null}onRowGroupOpened(){const e=si(this.gos);this.refreshModel({step:"map",keepRenderedRows:!0,animate:e})}onFilterChanged(e){if(e.afterDataChange)return;const t=si(this.gos),i=e.columns.length===0||e.columns.some(s=>s.isPrimary())?"filter":"filter_aggregates";this.refreshModel({step:i,keepRenderedRows:!0,animate:t})}onSortChanged(){const e=si(this.gos);this.refreshModel({step:"sort",keepRenderedRows:!0,animate:e})}getType(){return"clientSide"}onValueChanged(){this.refreshModel({step:this.colModel.isPivotActive()?"pivot":"aggregate"})}createChangePath(e){const t=new Ku(!1,this.rootNode);return e||(t.active=!1),t}isSuppressModelUpdateAfterUpdateTransaction(e){if(!this.gos.get("suppressModelUpdateAfterUpdateTransaction"))return!1;const{changedRowNodes:t,newData:o,rowDataUpdated:i}=e;return!(!t||o||!i||t.removals.size||t.adds.size)}refreshModel(e){if(!this.rootNode)return;const t=e.changedPath??(e.changedPath=this.createChangePath(!e.newData&&!!e.rowDataUpdated));if(this.nodeManager.refreshModel?.(e,this.started),this.eventSvc.dispatchEvent({type:"beforeRefreshModel",params:e}),!this.started||(e.rowDataUpdated&&this.eventSvc.dispatchEvent({type:"rowDataUpdated"}),this.isRefreshingModel||this.colModel.changeEventsDispatching||this.isSuppressModelUpdateAfterUpdateTransaction(e)))return;switch(this.isRefreshingModel=!0,e.step){case"group":this.doRowGrouping(e.changedRowNodes,t,!!e.rowNodesOrderChanged,!!e.afterColumnsChanged);case"filter":this.doFilter(t);case"pivot":this.doPivot(t);case"aggregate":this.doAggregate(t);case"filter_aggregates":this.doFilterAggregates(t);case"sort":this.doSort(e.changedRowNodes,t);case"map":this.doRowsToDisplay()}const o=this.setRowTopAndRowIndex();this.clearRowTopAndRowIndex(t,o),this.isRefreshingModel=!1,this.eventSvc.dispatchEvent({type:"modelUpdated",animate:e.animate,keepRenderedRows:e.keepRenderedRows,newData:e.newData,newPage:!1,keepUndoRedoStack:e.keepUndoRedoStack})}isEmpty(){return!this.rootNode?.allLeafChildren?.length||!this.colModel?.ready}isRowsToRender(){return this.rowsToDisplay.length>0}getNodesInRangeForSelection(e,t){let o=!1,i=!1;const s=[],n=os(this.gos);return this.forEachNodeAfterFilterAndSort(r=>{if(i)return;if(o&&(r===t||r===e)&&(i=!0,r.group&&n)){s.push(...r.allLeafChildren);return}if(!o){if(r!==t&&r!==e)return;o=!0}if(!r.group||!n){s.push(r);return}}),s}getTopLevelNodes(){return this.rootNode?.childrenAfterGroup??null}getRow(e){return this.rowsToDisplay[e]}isRowPresent(e){return this.rowsToDisplay.indexOf(e)>=0}getRowIndexAtPixel(e){const t=this.rowsToDisplay;if(this.isEmpty()||t.length===0)return-1;let o=0,i=t.length-1;if(e<=0)return 0;if(ve(t).rowTop<=e)return t.length-1;let n=-1,r=-1;for(;;){const a=Math.floor((o+i)/2),l=t[a];if(this.isRowInPixel(l,e)||(l.rowTop<e?o=a+1:l.rowTop>e&&(i=a-1),n===o&&r===i))return a;n=o,r=i}}isRowInPixel(e,t){const o=e.rowTop,i=e.rowTop+e.rowHeight;return o<=t&&i>t}forEachLeafNode(e){this.rootNode?.allLeafChildren?.forEach((t,o)=>e(t,o))}forEachNode(e,t=!1){this.depthFirstSearchRowNodes(e,t)}forEachDisplayedNode(e){this.rowsToDisplay.forEach(e)}forEachNodeAfterFilter(e,t=!1){this.depthFirstSearchRowNodes(e,t,o=>o.childrenAfterAggFilter)}forEachNodeAfterFilterAndSort(e,t=!1){this.depthFirstSearchRowNodes(e,t,o=>o.childrenAfterSort)}forEachPivotNode(e,t=!1,o=!1){const i=o?"childrenAfterSort":"childrenAfterGroup";this.depthFirstSearchRowNodes(e,t,s=>s.leafGroup?null:s[i])}depthFirstSearchRowNodes(e,t=!1,o=n=>n.childrenAfterGroup,i=this.rootNode,s=0){let n=s;if(!i)return n;const r=i===this.rootNode;r||e(i,n++);const{footerSvc:a}=this.beans;if(i.hasChildren()&&!i.footer){const l=o(i);if(l){n=a?.addTotalRows(n,i,e,t,r,"top")??n;for(const d of l)n=this.depthFirstSearchRowNodes(e,t,o,d,n);return a?.addTotalRows(n,i,e,t,r,"bottom")??n}}return n}doAggregate(e){const t=this.rootNode;t&&this.aggStage?.execute({rowNode:t,changedPath:e})}doFilterAggregates(e){const t=this.rootNode;this.filterAggStage?this.filterAggStage.execute({rowNode:t,changedPath:e}):t.childrenAfterAggFilter=t.childrenAfterFilter}doSort(e,t){this.sortStage?this.sortStage.execute({rowNode:this.rootNode,changedRowNodes:e,changedPath:t}):t.forEachChangedNodeDepthFirst(o=>{o.childrenAfterSort=o.childrenAfterAggFilter.slice(0),nh(o)})}doRowGrouping(e,t,o,i){const s=this.rootNode;if(!this.groupStage?.execute({rowNode:s,changedPath:t,changedRowNodes:e,rowNodesOrderChanged:o,afterColumnsChanged:i})&&!this.nodeManager.treeData){const r=s.sibling;s.childrenAfterGroup=s.allLeafChildren,r&&(r.childrenAfterGroup=s.childrenAfterGroup),s.updateHasChildren()}this.rowNodesCountReady&&(this.rowCountReady=!0,this.eventSvc.dispatchEventOnce({type:"rowCountReady"}))}doFilter(e){this.filterStage?this.filterStage.execute({rowNode:this.rootNode,changedPath:e}):e.forEachChangedNodeDepthFirst(t=>{t.childrenAfterFilter=t.childrenAfterGroup,eh(t)},!0)}doPivot(e){this.pivotStage?.execute({rowNode:this.rootNode,changedPath:e})}getRowNode(e){if(typeof e=="string"&&e.indexOf(mn)==0){let o;return this.forEachNode(i=>{i.id===e&&(o=i)}),o}return this.nodeManager.getRowNode(e)}batchUpdateRowData(e,t){if(this.applyAsyncTransactionsTimeout==null){this.rowDataTransactionBatch=[];const o=this.gos.get("asyncTransactionWaitMillis");this.applyAsyncTransactionsTimeout=window.setTimeout(()=>{this.isAlive()&&this.executeBatchUpdateRowData()},o)}this.rowDataTransactionBatch.push({rowDataTransaction:e,callback:t})}flushAsyncTransactions(){this.applyAsyncTransactionsTimeout!=null&&(clearTimeout(this.applyAsyncTransactionsTimeout),this.executeBatchUpdateRowData())}executeBatchUpdateRowData(){this.valueCache?.onDataChanged();const e=[],t=[],o=new hr;let i=!1;this.rowDataTransactionBatch?.forEach(s=>{this.rowNodesCountReady=!0;const{rowNodeTransaction:n,rowsInserted:r}=this.nodeManager.updateRowData(s.rowDataTransaction,o);r&&(i=!0),t.push(n),s.callback&&e.push(s.callback.bind(null,n))}),this.commitTransactions(i,o),e.length>0&&window.setTimeout(()=>{e.forEach(s=>s())},0),t.length>0&&this.eventSvc.dispatchEvent({type:"asyncTransactionsFlushed",results:t}),this.rowDataTransactionBatch=null,this.applyAsyncTransactionsTimeout=void 0}updateRowData(e){this.valueCache?.onDataChanged(),this.rowNodesCountReady=!0;const t=new hr,{rowNodeTransaction:o,rowsInserted:i}=this.nodeManager.updateRowData(e,t);return this.commitTransactions(i,t),o}commitTransactions(e,t){this.refreshModel({step:"group",rowDataUpdated:!0,rowNodesOrderChanged:e,keepRenderedRows:!0,animate:!this.gos.get("suppressAnimationFrame"),changedRowNodes:t,changedPath:this.createChangePath(!0)})}doRowsToDisplay(){const{flattenStage:e,rootNode:t}=this;let o;if(e)o=e.execute({rowNode:t});else{o=t?.childrenAfterSort??[];for(const i of o)i.setUiLevel(0)}this.rowsToDisplay=o}onRowHeightChanged(){this.refreshModel({step:"map",keepRenderedRows:!0,keepUndoRedoStack:!0})}resetRowHeights(){const e=this.rootNode;if(!e)return;const t=this.resetRowHeightsForAllRowNodes();e.setRowHeight(e.rowHeight,!0),e.sibling&&e.sibling.setRowHeight(e.sibling.rowHeight,!0),t&&this.onRowHeightChanged()}resetRowHeightsForAllRowNodes(){let e=!1;return this.forEachNode(t=>{t.setRowHeight(t.rowHeight,!0);const o=t.detailNode;o&&o.setRowHeight(o.rowHeight,!0),t.sibling&&t.sibling.setRowHeight(t.sibling.rowHeight,!0),e=!0}),e}onGridStylesChanges(e){if(e.rowHeightChanged){if(this.beans.rowAutoHeight?.active)return;this.resetRowHeights()}}onGridReady(){this.started||this.setInitialData()}isRowDataLoaded(){return this.rowCountReady}destroy(){super.destroy(),this.clearHighlightedRow(),this.started=!1,this.rootNode=null,this.nodeManager=null,this.rowDataTransactionBatch=null,this.lastHighlightedRow=null,this.orderedStages=Vr,this.rowsToDisplay=Vr}onRowHeightChangedDebounced(){this.onRowHeightChanged_debounced()}};function zR(e){e.expansionSvc?.onGroupExpandedOrCollapsed()}function WR(e,t){const o=Yt(e);o&&((!t||t==="everything")&&(t="group"),o.refreshModel({step:t,keepRenderedRows:!0,animate:!e.gos.get("suppressAnimationFrame")}))}function UR(e){return Yt(e)?.isEmpty()??!0}function $R(e,t){Yt(e)?.forEachLeafNode(t)}function jR(e,t){Yt(e)?.forEachNodeAfterFilter(t)}function KR(e,t){Yt(e)?.forEachNodeAfterFilterAndSort(t)}function YR(e){if(e.rowAutoHeight?.active){_(3);return}Yt(e)?.resetRowHeights()}function qR(e,t){return e.frameworkOverrides.wrapIncoming(()=>Yt(e)?.updateRowData(t))}function QR(e,t,o){e.frameworkOverrides.wrapIncoming(()=>Yt(e)?.batchUpdateRowData(t,o))}function XR(e){e.frameworkOverrides.wrapIncoming(()=>Yt(e)?.flushAsyncTransactions())}function ZR(e){return e.selectionSvc?.getBestCostNodeSelection()}var JR={moduleName:"ClientSideRowModel",version:ne,rowModels:["clientSide"],beans:[OR,_R,NR],dependsOn:[_a]},eF={moduleName:"ClientSideRowModelApi",version:ne,apiFunctions:{onGroupExpandedOrCollapsed:zR,refreshClientSideRowModel:WR,isRowDataEmpty:UR,forEachLeafNode:$R,forEachNodeAfterFilter:jR,forEachNodeAfterFilterAndSort:KR,resetRowHeights:YR,applyTransaction:qR,applyTransactionAsync:QR,flushAsyncTransactions:XR,getBestCostNodeSelection:ZR},dependsOn:[sh]},tF=class extends M{constructor(){super(...arguments),this.beanName="gridSerializer"}wireBeans(e){this.visibleCols=e.visibleCols,this.colModel=e.colModel,this.rowModel=e.rowModel,this.pinnedRowModel=e.pinnedRowModel}serialize(e,t={}){const{allColumns:o,columnKeys:i,skipRowGroups:s,exportRowNumbers:n}=t,r=this.getColumnsToExport({allColumns:o,skipRowGroups:s,columnKeys:i,exportRowNumbers:n});return[this.prepareSession(r),this.prependContent(t),this.exportColumnGroups(t,r),this.exportHeaders(t,r),this.processPinnedTopRows(t,r),this.processRows(t,r),this.processPinnedBottomRows(t,r),this.appendContent(t)].reduce((a,l)=>l(a),e).parse()}processRow(e,t,o,i){const s=t.shouldRowBeSkipped||(()=>!1),r=t.rowPositions!=null||!!t.onlySelected,a=this.gos.get("groupHideOpenParents")&&!r,l=this.colModel.isPivotMode()?i.leafGroup:!i.group,d=!!i.footer,c=i.allChildrenCount===1&&i.childrenAfterGroup?.length===1&&$p(this.gos,i);if(!l&&!d&&(t.skipRowGroups||c||a)||t.onlySelected&&!i.isSelected()||t.skipPinnedTop&&i.rowPinned==="top"||t.skipPinnedBottom&&i.rowPinned==="bottom"||i.level===-1&&!l&&!d||s(Z(this.gos,{node:i})))return;const g=e.onNewBodyRow(i);if(o.forEach((f,m)=>{g.onColumn(f,m,i)}),t.getCustomContentBelowRow){const f=t.getCustomContentBelowRow(Z(this.gos,{node:i}));f&&e.addCustomContent(f)}}appendContent(e){return t=>{const o=e.appendContent;return o&&t.addCustomContent(o),t}}prependContent(e){return t=>{const o=e.prependContent;return o&&t.addCustomContent(o),t}}prepareSession(e){return t=>(t.prepare(e),t)}exportColumnGroups(e,t){return o=>{if(!e.skipColumnGroupHeaders){const i=new Hc,{colGroupSvc:s}=this.beans,n=s?s.createColumnGroups({columns:t,idCreator:i,pinned:null,isStandaloneStructure:!0}):t;this.recursivelyAddHeaderGroups(n,o,e.processGroupHeaderCallback)}return o}}exportHeaders(e,t){return o=>{if(!e.skipColumnHeaders){const i=o.onNewHeaderRow();t.forEach((s,n)=>{i.onColumn(s,n,void 0)})}return o}}processPinnedTopRows(e,t){return o=>{const i=this.processRow.bind(this,o,e,t);return e.rowPositions?e.rowPositions.filter(s=>s.rowPinned==="top").sort((s,n)=>s.rowIndex-n.rowIndex).map(s=>this.pinnedRowModel?.getPinnedTopRow(s.rowIndex)).forEach(i):this.pinnedRowModel?.forEachPinnedRow("top",i),o}}processRows(e,t){return o=>{const i=this.rowModel,s=Lt(this.gos),n=pt(this.gos),r=!s&&e.onlySelected,a=this.processRow.bind(this,o,e,t),{exportedRows:l="filteredAndSorted"}=e;if(e.rowPositions)return e.rowPositions.filter(d=>d.rowPinned==null).sort((d,c)=>d.rowIndex-c.rowIndex).map(d=>i.getRow(d.rowIndex)).forEach(a),o;if(this.colModel.isPivotMode())return s?i.forEachPivotNode(a,!0,l==="filteredAndSorted"):n?i.forEachNodeAfterFilterAndSort(a,!0):i.forEachNode(a),o;if(e.onlySelectedAllPages||r){const d=this.beans.selectionSvc?.getSelectedNodes()??[];this.replicateSortedOrder(d),d.forEach(a)}else l==="all"?i.forEachNode(a):s||n?i.forEachNodeAfterFilterAndSort(a,!0):i.forEachNode(a);return o}}replicateSortedOrder(e){const{sortSvc:t,rowNodeSorter:o}=this.beans;if(!t||!o)return;const i=t.getSortOptions(),s=(n,r)=>n.rowIndex!=null&&r.rowIndex!=null?n.rowIndex-r.rowIndex:n.level===r.level?n.parent?.id===r.parent?.id?o.compareRowNodes(i,{rowNode:n,currentPos:n.rowIndex??-1},{rowNode:r,currentPos:r.rowIndex??-1}):s(n.parent,r.parent):n.level>r.level?s(n.parent,r):s(n,r.parent);e.sort(s)}processPinnedBottomRows(e,t){return o=>{const i=this.processRow.bind(this,o,e,t);return e.rowPositions?e.rowPositions.filter(s=>s.rowPinned==="bottom").sort((s,n)=>s.rowIndex-n.rowIndex).map(s=>this.pinnedRowModel?.getPinnedBottomRow(s.rowIndex)).forEach(i):this.pinnedRowModel?.forEachPinnedRow("bottom",i),o}}getColumnsToExport(e){const{allColumns:t=!1,skipRowGroups:o=!1,exportRowNumbers:i=!1,columnKeys:s}=e,{colModel:n,gos:r,visibleCols:a}=this,l=n.isPivotMode(),d=p=>io(p)?!1:!is(p)||i;if(s&&s.length)return n.getColsForKeys(s).filter(d);const c=r.get("treeData");let u=[];return t&&!l?u=n.getCols():u=a.allCols,u=u.filter(p=>d(p)&&(o&&!c?!Ln(p):!0)),u}recursivelyAddHeaderGroups(e,t,o){const i=[];e.forEach(s=>{const n=s;n.getChildren&&n.getChildren().forEach(r=>i.push(r))}),e.length>0&&Ie(e[0])&&this.doAddHeaderHeader(t,e,o),i&&i.length>0&&this.recursivelyAddHeaderGroups(i,t,o)}doAddHeaderHeader(e,t,o){const i=e.onNewHeaderGroupingRow();let s=0;t.forEach(n=>{const r=n;let a;o?a=o(Z(this.gos,{columnGroup:r})):a=this.beans.colNames.getDisplayNameForColumnGroup(r,"header");const l=r.getLeafColumns().reduce((d,c,u,p)=>{let g=ve(d);return c.getColumnGroupShow()==="open"?(!g||g[1]!=null)&&(g=[u],d.push(g)):g&&g[1]==null&&(g[1]=u-1),u===p.length-1&&g&&g[1]==null&&(g[1]=u),d},[]);i.onColumn(r,a||"",s++,r.getLeafColumns().length-1,l)})}},oF={moduleName:"SharedExport",version:ne,beans:[tF]},ql=`\r
60
+ `,iF=class extends fb{constructor(e){super(e),this.isFirstLine=!0,this.result="";const{suppressQuotes:t,columnSeparator:o}=e;this.suppressQuotes=t,this.columnSeparator=o}addCustomContent(e){e&&(typeof e=="string"?(/^\s*\n/.test(e)||this.beginNewLine(),e=e.replace(/\r?\n/g,ql),this.result+=e):e.forEach(t=>{this.beginNewLine(),t.forEach((o,i)=>{i!==0&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(o.data.value||""),o.mergeAcross&&this.appendEmptyCells(o.mergeAcross)})}))}onNewHeaderGroupingRow(){return this.beginNewLine(),{onColumn:this.onNewHeaderGroupingRowColumn.bind(this)}}onNewHeaderGroupingRowColumn(e,t,o,i){o!=0&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(t),this.appendEmptyCells(i)}appendEmptyCells(e){for(let t=1;t<=e;t++)this.result+=this.columnSeparator+this.putInQuotes("")}onNewHeaderRow(){return this.beginNewLine(),{onColumn:this.onNewHeaderRowColumn.bind(this)}}onNewHeaderRowColumn(e,t){t!=0&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(this.extractHeaderValue(e))}onNewBodyRow(){return this.beginNewLine(),{onColumn:this.onNewBodyRowColumn.bind(this)}}onNewBodyRowColumn(e,t,o){t!=0&&(this.result+=this.columnSeparator);const i=this.extractRowCellValue(e,t,t,"csv",o);this.result+=this.putInQuotes(i.valueFormatted??i.value)}putInQuotes(e){if(this.suppressQuotes)return e;if(e==null)return'""';let t;return typeof e=="string"?t=e:typeof e.toString=="function"?t=e.toString():(_(53),t=""),'"'+t.replace(/"/g,'""')+'"'}parse(){return this.result}beginNewLine(){this.isFirstLine||(this.result+=ql),this.isFirstLine=!1}},sF=class extends gb{constructor(){super(...arguments),this.beanName="csvCreator"}wireBeans(e){this.colModel=e.colModel,this.colNames=e.colNames,this.rowGroupColsSvc=e.rowGroupColsSvc,this.valueSvc=e.valueSvc}getMergedParams(e){const t=this.gos.get("defaultCsvExportParams");return Object.assign({},t,e)}export(e){if(this.isExportSuppressed()){_(51);return}const t=this.getMergedParams(e),o=this.getData(t),i=new Blob(["\uFEFF",o],{type:"text/plain"}),s=typeof t.fileName=="function"?t.fileName(Z(this.gos,{})):t.fileName;mb(this.getFileName(s),i)}exportDataAsCsv(e){this.export(e)}getDataAsCsv(e,t=!1){const o=t?Object.assign({},e):this.getMergedParams(e);return this.getData(o)}getDefaultFileExtension(){return"csv"}createSerializingSession(e){const{colModel:t,colNames:o,rowGroupColsSvc:i,valueSvc:s,gos:n}=this,{processCellCallback:r,processHeaderCallback:a,processGroupHeaderCallback:l,processRowGroupCallback:d,suppressQuotes:c,columnSeparator:u}=e;return new iF({colModel:t,colNames:o,valueSvc:s,gos:n,processCellCallback:r||void 0,processHeaderCallback:a||void 0,processGroupHeaderCallback:l||void 0,processRowGroupCallback:d||void 0,suppressQuotes:c||!1,columnSeparator:u||",",rowGroupColsSvc:i})}isExportSuppressed(){return this.gos.get("suppressCsvExport")}};function nF(e,t){return e.csvCreator?.getDataAsCsv(t)}function rF(e,t){e.csvCreator?.exportDataAsCsv(t)}var aF={moduleName:"CsvExport",version:ne,beans:[sF],apiFunctions:{getDataAsCsv:nF,exportDataAsCsv:rF},dependsOn:[oF]};function lF(e){return e.stateSvc?.getState()??{}}function dF(e){switch(e={...e},e.version||(e.version="32.1.0"),e.version){case"32.1.0":e=cF(e)}return e}function cF(e){return e.cellSelection=uF(e,"rangeSelection"),e}function uF(e,t){if(e&&typeof e=="object")return e[t]}var hF=class extends M{constructor(){super(...arguments),this.beanName="stateSvc",this.updateRowGroupExpansionStateTimer=0,this.suppressEvents=!0,this.queuedUpdateSources=new Set,this.dispatchStateUpdateEventDebounced=tt(this,()=>this.dispatchQueuedStateUpdateEvents(),0),this.onRowGroupOpenedDebounced=tt(this,()=>{this.updateCachedState("rowGroupExpansion",this.getRowGroupExpansionState())},0),this.onRowSelectedDebounced=tt(this,()=>{this.staleStateKeys.delete("rowSelection"),this.updateCachedState("rowSelection",this.getRowSelectionState())},0),this.staleStateKeys=new Set}postConstruct(){this.isClientSideRowModel=Lt(this.gos),this.cachedState=this.getInitialState(),this.setCachedStateValue("version",ne);const e=this.suppressEventsAndDispatchInitEvent.bind(this);this.beans.ctrlsSvc.whenReady(this,()=>e(()=>this.setupStateOnGridReady()));const[t,o,i]=this.addManagedEventListeners({newColumnsLoaded:({source:s})=>{s==="gridInitializing"&&(t(),e(()=>this.setupStateOnColumnsInitialised()))},rowCountReady:()=>{o?.(),e(()=>this.setupStateOnRowCountReady())},firstDataRendered:()=>{i?.(),e(()=>this.setupStateOnFirstDataRendered())}})}destroy(){super.destroy(),clearTimeout(this.updateRowGroupExpansionStateTimer),this.queuedUpdateSources.clear()}getInitialState(){return dF(this.gos.get("initialState")??{})}getState(){return this.staleStateKeys.size&&this.refreshStaleState(),this.cachedState}setupStateOnGridReady(){const e=()=>this.updateCachedState("sideBar",this.getSideBarState());e(),this.addManagedEventListeners({toolPanelVisibleChanged:e,sideBarUpdated:e})}setupStateOnColumnsInitialised(){const e=this.getInitialState();this.setColumnState(e),this.setColumnGroupState(e),this.updateColumnState(["aggregation","columnOrder","columnPinning","columnSizing","columnVisibility","pivot","pivot","rowGroup","sort"]),this.updateCachedState("columnGroup",this.getColumnGroupState());const t=o=>()=>this.updateColumnState([o]);this.addManagedEventListeners({columnValueChanged:t("aggregation"),columnMoved:t("columnOrder"),columnPinned:t("columnPinning"),columnResized:t("columnSizing"),columnVisible:t("columnVisibility"),columnPivotChanged:t("pivot"),columnPivotModeChanged:t("pivot"),columnRowGroupChanged:t("rowGroup"),sortChanged:t("sort"),newColumnsLoaded:()=>this.updateColumnState(["aggregation","columnOrder","columnPinning","columnSizing","columnVisibility","pivot","rowGroup","sort"]),columnGroupOpened:()=>this.updateCachedState("columnGroup",this.getColumnGroupState())})}setupStateOnRowCountReady(){const{filter:e,rowGroupExpansion:t,rowSelection:o,pagination:i}=this.getInitialState();e&&this.setFilterState(e),t&&this.setRowGroupExpansionState(t),o&&this.setRowSelectionState(o),i&&this.setPaginationState(i);const s=this.updateCachedState.bind(this);s("filter",this.getFilterState()),s("rowGroupExpansion",this.getRowGroupExpansionState()),s("rowSelection",this.getRowSelectionState()),s("pagination",this.getPaginationState());const n=()=>{this.updateRowGroupExpansionStateTimer=0,s("rowGroupExpansion",this.getRowGroupExpansionState())};this.addManagedEventListeners({filterChanged:()=>s("filter",this.getFilterState()),rowGroupOpened:()=>this.onRowGroupOpenedDebounced(),expandOrCollapseAll:n,columnRowGroupChanged:n,rowDataUpdated:()=>{this.gos.get("groupDefaultExpanded")!==0&&(this.updateRowGroupExpansionStateTimer||(this.updateRowGroupExpansionStateTimer=setTimeout(n)))},selectionChanged:()=>{this.staleStateKeys.add("rowSelection"),this.onRowSelectedDebounced()},paginationChanged:r=>{(r.newPage||r.newPageSize)&&s("pagination",this.getPaginationState())}})}setupStateOnFirstDataRendered(){const{scroll:e,cellSelection:t,focusedCell:o,columnOrder:i}=this.getInitialState();o&&this.setFocusedCellState(o),t&&this.setCellSelectionState(t),e&&this.setScrollState(e),this.setColumnPivotState(!!i?.orderedColIds);const s=this.updateCachedState.bind(this);s("sideBar",this.getSideBarState()),s("focusedCell",this.getFocusedCellState());const n=this.getRangeSelectionState();s("rangeSelection",n),s("cellSelection",n),s("scroll",this.getScrollState()),this.addManagedEventListeners({cellFocused:()=>s("focusedCell",this.getFocusedCellState()),cellSelectionChanged:r=>{if(r.finished){const a=this.getRangeSelectionState();s("rangeSelection",a),s("cellSelection",a)}},bodyScrollEnd:()=>s("scroll",this.getScrollState())})}getColumnState(){const e=this.beans,t=e.colModel.isPivotMode(),o=[],i=[],s=[],n=[],r=[],a=[],l=[],d=[],c=[];let u=0;const p=ss(e);for(let g=0;g<p.length;g++){const{colId:f,sort:m,sortIndex:C,rowGroup:v,rowGroupIndex:S,aggFunc:b,pivot:x,pivotIndex:T,pinned:A,hide:P,width:y,flex:w}=p[g];c.push(f),m&&(o[C??u++]={colId:f,sort:m}),v&&(i[S??0]=f),typeof b=="string"&&s.push({colId:f,aggFunc:b}),x&&(n[T??0]=f),A&&(A==="right"?a:r).push(f),P&&l.push(f),(w!=null||y)&&d.push({colId:f,flex:w??void 0,width:y})}return{sort:o.length?{sortModel:o}:void 0,rowGroup:i.length?{groupColIds:i}:void 0,aggregation:s.length?{aggregationModel:s}:void 0,pivot:n.length||t?{pivotMode:t,pivotColIds:n}:void 0,columnPinning:r.length||a.length?{leftColIds:r,rightColIds:a}:void 0,columnVisibility:l.length?{hiddenColIds:l}:void 0,columnSizing:d.length?{columnSizingModel:d}:void 0,columnOrder:c.length?{orderedColIds:c}:void 0}}setColumnState(e){const{sort:t,rowGroup:o,aggregation:i,pivot:s,columnPinning:n,columnVisibility:r,columnSizing:a,columnOrder:l,partialColumnState:d}=e,c={},u=C=>{let v=c[C];return v||(v={colId:C},c[C]=v,v)},p=d?{}:{sort:null,sortIndex:null,rowGroup:null,rowGroupIndex:null,aggFunc:null,pivot:null,pivotIndex:null,pinned:null,hide:null,flex:null};t&&(t.sortModel.forEach(({colId:C,sort:v},S)=>{const b=u(C);b.sort=v,b.sortIndex=S}),p.sort=null,p.sortIndex=null),o&&(o.groupColIds.forEach((C,v)=>{const S=u(C);S.rowGroup=!0,S.rowGroupIndex=v}),p.rowGroup=null,p.rowGroupIndex=null),i&&(i.aggregationModel.forEach(({colId:C,aggFunc:v})=>{u(C).aggFunc=v}),p.aggFunc=null),s&&(s.pivotColIds.forEach((C,v)=>{const S=u(C);S.pivot=!0,S.pivotIndex=v}),this.gos.updateGridOptions({options:{pivotMode:s.pivotMode},source:"gridInitializing"}),p.pivot=null,p.pivotIndex=null),n&&(n.leftColIds.forEach(C=>{u(C).pinned="left"}),n.rightColIds.forEach(C=>{u(C).pinned="right"}),p.pinned=null),r&&(r.hiddenColIds.forEach(C=>{u(C).hide=!0}),p.hide=null),a&&(a.columnSizingModel.forEach(({colId:C,flex:v,width:S})=>{const b=u(C);b.flex=v??null,b.width=S}),p.flex=null);const g=l?.orderedColIds,f=!!g?.length,m=f?g.map(C=>u(C)):Object.values(c);m.length&&(this.columnStates=m,it(this.beans,{state:m,applyOrder:f,defaultState:p},"gridInitializing"))}setColumnPivotState(e){const t=this.columnStates;this.columnStates=void 0;const o=this.columnGroupStates;this.columnGroupStates=void 0;const i=this.beans,{pivotResultCols:s,colGroupSvc:n}=i;if(s?.isPivotResultColsPresent()){if(t){const r=[];for(const a of t)s.getPivotResultCol(a.colId)&&r.push(a);it(i,{state:r,applyOrder:e},"gridInitializing")}o&&n?.setColumnGroupState(o,"gridInitializing")}}getColumnGroupState(){const e=this.beans.colGroupSvc;if(!e)return;const t=e.getColumnGroupState(),o=[];return t.forEach(({groupId:i,open:s})=>{s&&o.push(i)}),o.length?{openColumnGroupIds:o}:void 0}setColumnGroupState(e){const t=this.beans.colGroupSvc;if(!Object.prototype.hasOwnProperty.call(e,"columnGroup")||!t)return;const o=new Set(e.columnGroup?.openColumnGroupIds),s=t.getColumnGroupState().map(({groupId:n})=>{const r=o.has(n);return r&&o.delete(n),{groupId:n,open:r}});o.forEach(n=>{s.push({groupId:n,open:!0})}),s.length&&(this.columnGroupStates=s),t.setColumnGroupState(s,"gridInitializing")}getFilterState(){const e=this.beans.filterManager;let t=e?.getFilterModel();t&&Object.keys(t).length===0&&(t=void 0);const o=e?.getAdvFilterModel()??void 0;return t||o?{filterModel:t,advancedFilterModel:o}:void 0}setFilterState(e){const t=this.beans.filterManager,{filterModel:o,advancedFilterModel:i}=e??{};o&&t?.setFilterModel(o,"columnFilter"),i&&t?.setAdvFilterModel(i,"advancedFilter")}getRangeSelectionState(){const e=this.beans.rangeSvc?.getCellRanges().map(t=>{const{id:o,type:i,startRow:s,endRow:n,columns:r,startColumn:a}=t;return{id:o,type:i,startRow:s,endRow:n,colIds:r.map(l=>l.getColId()),startColId:a.getColId()}});return e?.length?{cellRanges:e}:void 0}setCellSelectionState(e){const{gos:t,rangeSvc:o,colModel:i,visibleCols:s}=this.beans;if(!zo(t)||!o)return;const n=[];e.cellRanges.forEach(r=>{const a=[];if(r.colIds.forEach(d=>{const c=i.getCol(d);c&&a.push(c)}),!a.length)return;let l=i.getCol(r.startColId);if(!l){const d=s.allCols,c=new Set(a);l=d.find(u=>c.has(u))}n.push({...r,columns:a,startColumn:l})}),o.setCellRanges(n)}getScrollState(){if(!this.isClientSideRowModel)return;const e=this.beans.ctrlsSvc.getScrollFeature(),{left:t}=e?.getHScrollPosition()??{left:0},{top:o}=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,{frameworkOverrides:i,rowRenderer:s,animationFrameSvc:n,ctrlsSvc:r}=this.beans;i.wrapIncoming(()=>{r.get("center").setCenterViewportScrollLeft(o),r.getScrollFeature()?.setVerticalScrollPosition(t),s.redraw({afterScroll:!0}),n?.flushAllFrames()})}getSideBarState(){return this.beans.sideBar?.comp?.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{colId:t,rowIndex:o,rowPinned:i}=e,{focusSvc:s,colModel:n}=this.beans;s.setFocusedCell({column:n.getCol(t),rowIndex:o,rowPinned:i,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){const{pagination:t,gos:o}=this.beans;t&&(e.pageSize&&!o.get("paginationAutoPageSize")&&t.setPageSize(e.pageSize,"initialState"),typeof e.page=="number"&&t.setPage(e.page))}getRowSelectionState(){const e=this.beans.selectionSvc;if(!e)return;const t=e.getSelectionState();return!t||!Array.isArray(t)&&(t.selectAll===!1||t.selectAllChildren===!1)&&!t?.toggledNodes?.length?void 0:t}setRowSelectionState(e){this.beans.selectionSvc?.setSelectionState(e,"gridInitializing")}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}setRowGroupExpansionState(e){this.beans.expansionSvc?.expandRows(e.expandedRowGroupIds)}updateColumnState(e){const t=this.getColumnState();let o=!1;const i=this.cachedState;for(const s of Object.keys(t)){const n=t[s];Xi(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),Xi(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})}suppressEventsAndDispatchInitEvent(e){this.suppressEvents=!0;const t=this.beans.colAnimation;t?.setSuppressAnimation(!0),e(),setTimeout(()=>{this.suppressEvents=!1,this.queuedUpdateSources.clear(),this.isAlive()&&(t?.setSuppressAnimation(!1),this.dispatchStateUpdateEvent(["gridInitializing"]))})}},pF={moduleName:"GridState",version:ne,beans:[hF],apiFunctions:{getState:lF}};function gF(e){return e.rowModel.isLastRowIndexKnown()}function fF(e){return e.pagination?.getPageSize()??100}function mF(e){return e.pagination?.getCurrentPage()??0}function CF(e){return e.pagination?.getTotalPages()??1}function vF(e){return e.pagination?e.pagination.getMasterRowCount():e.rowModel.getRowCount()}function wF(e){e.pagination?.goToNextPage()}function SF(e){e.pagination?.goToPreviousPage()}function yF(e){e.pagination?.goToFirstPage()}function bF(e){e.pagination?.goToLastPage()}function RF(e,t){e.pagination?.goToPage(t)}var FF=class extends M{constructor(){super(...arguments),this.beanName="paginationAutoPageSizeSvc"}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.centerRowsCtrl=e.center;const t=this.checkPageSize.bind(this);this.addManagedEventListeners({bodyHeightChanged:t,scrollVisibilityChanged:t}),this.addManagedPropertyListener("paginationAutoPageSize",this.onPaginationAutoSizeChanged.bind(this)),this.checkPageSize()})}notActive(){return!this.gos.get("paginationAutoPageSize")||this.centerRowsCtrl==null}onPaginationAutoSizeChanged(){this.notActive()?this.beans.pagination.unsetAutoCalculatedPageSize():this.checkPageSize()}checkPageSize(){if(this.notActive())return;const e=this.centerRowsCtrl.viewportSizeFeature.getBodyHeight();if(e>0){const t=this.beans,o=()=>{const i=Math.max(So(t),1),s=Math.floor(e/i);t.pagination.setPageSize(s,"autoCalculated")};this.isBodyRendered?tt(this,o,50)():(o(),this.isBodyRendered=!0)}else this.isBodyRendered=!1}},Mi="paginationPageSizeSelector",xF={tag:"span",cls:"ag-paging-page-size"},DF=class extends pe{constructor(){super(xF),this.hasEmptyOption=!1,this.handlePageSizeItemSelected=()=>{if(!this.selectPageSizeComp)return;const e=this.selectPageSizeComp.getValue();if(!e)return;const t=Number(e);isNaN(t)||t<1||t===this.pagination.getPageSize()||(this.pagination.setPageSize(t,"pageSizeSelector"),this.hasEmptyOption&&this.toggleSelectDisplay(!0),this.selectPageSizeComp.getFocusableElement().focus())}}wireBeans(e){this.pagination=e.pagination}postConstruct(){this.addManagedPropertyListener(Mi,()=>{this.onPageSizeSelectorValuesChange()}),this.addManagedEventListeners({paginationChanged:e=>this.handlePaginationChanged(e)})}handlePaginationChanged(e){if(!this.selectPageSizeComp||!e?.newPageSize)return;const t=this.pagination.getPageSize();this.getPageSizeSelectorValues().includes(t)?this.selectPageSizeComp.setValue(t.toString()):this.hasEmptyOption?this.selectPageSizeComp.setValue(""):this.toggleSelectDisplay(!0)}toggleSelectDisplay(e){this.selectPageSizeComp&&!e&&this.reset(),e&&(this.reloadPageSizesSelector(),this.selectPageSizeComp)}reset(){ct(this.getGui()),this.selectPageSizeComp&&(this.selectPageSizeComp=this.destroyBean(this.selectPageSizeComp))}onPageSizeSelectorValuesChange(){this.selectPageSizeComp&&this.shouldShowPageSizeSelector()&&this.reloadPageSizesSelector()}shouldShowPageSizeSelector(){return this.gos.get("pagination")&&!this.gos.get("suppressPaginationPanel")&&!this.gos.get("paginationAutoPageSize")&&this.gos.get(Mi)!==!1}reloadPageSizesSelector(){const e=this.getPageSizeSelectorValues(),t=this.pagination.getPageSize(),o=!t||!e.includes(t);if(o){const s=this.gos.exists("paginationPageSize"),n=this.gos.get(Mi)!==!0;_(94,{pageSizeSet:s,pageSizesSet:n,pageSizeOptions:e,paginationPageSizeOption:t}),n||_(95,{paginationPageSizeOption:t,paginationPageSizeSelector:Mi}),e.unshift("")}const i=String(o?"":t);this.selectPageSizeComp?(At(this.pageSizeOptions,e)||(this.selectPageSizeComp.clearOptions().addOptions(this.createPageSizeSelectOptions(e)),this.pageSizeOptions=e),this.selectPageSizeComp.setValue(i,!0)):this.createPageSizeSelectorComp(e,i),this.hasEmptyOption=o}createPageSizeSelectOptions(e){return e.map(t=>({value:String(t)}))}createPageSizeSelectorComp(e,t){const o=this.getLocaleTextFunc(),i=o("pageSizeSelectorLabel","Page Size:"),s=o("ariaPageSizeSelectorLabel","Page Size");this.selectPageSizeComp=this.createManagedBean(new IC).addOptions(this.createPageSizeSelectOptions(e)).setValue(t).setAriaLabel(s).setLabel(i).onValueChange(()=>this.handlePageSizeItemSelected()),this.appendChild(this.selectPageSizeComp)}getPageSizeSelectorValues(){const e=[20,50,100],t=this.gos.get(Mi);return!Array.isArray(t)||!t?.length?e:[...t].sort((o,i)=>o-i)}destroy(){this.toggleSelectDisplay(!1),super.destroy()}},MF={selector:"AG-PAGE-SIZE-SELECTOR",component:DF},PF=".ag-paging-panel{align-items:center;border-top:var(--ag-footer-row-border);display:flex;gap:calc(var(--ag-spacing)*4);height:max(var(--ag-row-height),22px);justify-content:flex-end;padding:0 var(--ag-cell-horizontal-padding)}:where(.ag-paging-page-size) .ag-wrapper{min-width:50px}.ag-paging-page-summary-panel{align-items:center;display:flex;gap:var(--ag-cell-widget-spacing);.ag-disabled &{pointer-events:none}}.ag-paging-button{cursor:pointer;position:relative;&.ag-disabled{cursor:default;opacity:.5}}.ag-paging-number,.ag-paging-row-summary-panel-number{font-weight:500}",EF=class extends bi{constructor(){super(),this.btFirst=O,this.btPrevious=O,this.btNext=O,this.btLast=O,this.lbRecordCount=O,this.lbFirstRowOnPage=O,this.lbLastRowOnPage=O,this.lbCurrent=O,this.lbTotal=O,this.pageSizeComp=O,this.previousAndFirstButtonsDisabled=!1,this.nextButtonDisabled=!1,this.lastButtonDisabled=!1,this.areListenersSetup=!1,this.allowFocusInnerElement=!1,this.registerCSS(PF)}wireBeans(e){this.rowModel=e.rowModel,this.pagination=e.pagination,this.ariaAnnounce=e.ariaAnnounce}postConstruct(){const e=this.gos.get("enableRtl");this.setTemplate(this.getTemplate(),[MF]);const{btFirst:t,btPrevious:o,btNext:i,btLast:s}=this;this.activateTabIndex([t,o,i,s]),t.insertAdjacentElement("afterbegin",oe(e?"last":"first",this.beans)),o.insertAdjacentElement("afterbegin",oe(e?"next":"previous",this.beans)),i.insertAdjacentElement("afterbegin",oe(e?"previous":"next",this.beans)),s.insertAdjacentElement("afterbegin",oe(e?"first":"last",this.beans)),this.addManagedPropertyListener("pagination",this.onPaginationChanged.bind(this)),this.addManagedPropertyListener("suppressPaginationPanel",this.onPaginationChanged.bind(this)),this.addManagedPropertyListeners(["paginationPageSizeSelector","paginationAutoPageSize","suppressPaginationPanel"],()=>this.onPageSizeRelatedOptionsChange()),this.pageSizeComp.toggleSelectDisplay(this.pageSizeComp.shouldShowPageSizeSelector()),this.initialiseTabGuard({onTabKeyDown:()=>{},focusInnerElement:n=>this.allowFocusInnerElement?this.tabGuardFeature.getTabGuardCtrl().focusInnerElement(n):xf(this.beans,n),forceFocusOutWhenTabGuardsAreEmpty:!0}),this.onPaginationChanged()}setAllowFocus(e){this.allowFocusInnerElement=e}onPaginationChanged(){const t=this.gos.get("pagination")&&!this.gos.get("suppressPaginationPanel");this.setDisplayed(t),t&&(this.setupListeners(),this.enableOrDisableButtons(),this.updateLabels(),this.onPageSizeRelatedOptionsChange())}onPageSizeRelatedOptionsChange(){this.pageSizeComp.toggleSelectDisplay(this.pageSizeComp.shouldShowPageSizeSelector())}setupListeners(){this.areListenersSetup||(this.addManagedEventListeners({paginationChanged:this.onPaginationChanged.bind(this)}),[{el:this.btFirst,fn:this.onBtFirst.bind(this)},{el:this.btPrevious,fn:this.onBtPrevious.bind(this)},{el:this.btNext,fn:this.onBtNext.bind(this)},{el:this.btLast,fn:this.onBtLast.bind(this)}].forEach(e=>{const{el:t,fn:o}=e;this.addManagedListeners(t,{click:o,keydown:i=>{(i.key===D.ENTER||i.key===D.SPACE)&&(i.preventDefault(),o())}})}),Ff(this.beans,this,this.getGui()),this.areListenersSetup=!0)}onBtFirst(){this.previousAndFirstButtonsDisabled||this.pagination.goToFirstPage()}formatNumber(e){const t=this.gos.getCallback("paginationNumberFormatter");return t?t({value:e}):pb(e,this.getLocaleTextFunc.bind(this))}getTemplate(){const e=this.getLocaleTextFunc(),t=`ag-${this.getCompId()}`;return{tag:"div",cls:"ag-paging-panel ag-unselectable",attrs:{id:`${t}`},children:[{tag:"ag-page-size-selector",ref:"pageSizeComp"},{tag:"span",cls:"ag-paging-row-summary-panel",children:[{tag:"span",ref:"lbFirstRowOnPage",cls:"ag-paging-row-summary-panel-number",attrs:{id:`${t}-first-row`}},{tag:"span",attrs:{id:`${t}-to`},children:e("to","to")},{tag:"span",ref:"lbLastRowOnPage",cls:"ag-paging-row-summary-panel-number",attrs:{id:`${t}-last-row`}},{tag:"span",attrs:{id:`${t}-of`},children:e("of","of")},{tag:"span",ref:"lbRecordCount",cls:"ag-paging-row-summary-panel-number",attrs:{id:`${t}-row-count`}}]},{tag:"span",cls:"ag-paging-page-summary-panel",role:"presentation",children:[{tag:"div",ref:"btFirst",cls:"ag-button ag-paging-button",role:"button",attrs:{"aria-label":e("firstPage","First Page")}},{tag:"div",ref:"btPrevious",cls:"ag-button ag-paging-button",role:"button",attrs:{"aria-label":e("previousPage","Previous Page")}},{tag:"span",cls:"ag-paging-description",children:[{tag:"span",attrs:{id:`${t}-start-page`},children:e("page","Page")},{tag:"span",ref:"lbCurrent",cls:"ag-paging-number",attrs:{id:`${t}-start-page-number`}},{tag:"span",attrs:{id:`${t}-of-page`},children:e("of","of")},{tag:"span",ref:"lbTotal",cls:"ag-paging-number",attrs:{id:`${t}-of-page-number`}}]},{tag:"div",ref:"btNext",cls:"ag-button ag-paging-button",role:"button",attrs:{"aria-label":e("nextPage","Next Page")}},{tag:"div",ref:"btLast",cls:"ag-button ag-paging-button",role:"button",attrs:{"aria-label":e("lastPage","Last Page")}}]}]}}onBtNext(){this.nextButtonDisabled||this.pagination.goToNextPage()}onBtPrevious(){this.previousAndFirstButtonsDisabled||this.pagination.goToPreviousPage()}onBtLast(){this.lastButtonDisabled||this.pagination.goToLastPage()}enableOrDisableButtons(){const e=this.pagination.getCurrentPage(),t=this.rowModel.isLastRowIndexKnown(),o=this.pagination.getTotalPages();this.previousAndFirstButtonsDisabled=e===0,this.toggleButtonDisabled(this.btFirst,this.previousAndFirstButtonsDisabled),this.toggleButtonDisabled(this.btPrevious,this.previousAndFirstButtonsDisabled);const i=this.isZeroPagesToDisplay(),s=e===o-1;this.nextButtonDisabled=s||i,this.lastButtonDisabled=!t||i||e===o-1,this.toggleButtonDisabled(this.btNext,this.nextButtonDisabled),this.toggleButtonDisabled(this.btLast,this.lastButtonDisabled)}toggleButtonDisabled(e,t){Hd(e,t),e.classList.toggle("ag-disabled",t)}isZeroPagesToDisplay(){const e=this.rowModel.isLastRowIndexKnown(),t=this.pagination.getTotalPages();return e&&t===0}updateLabels(){const e=this.rowModel.isLastRowIndexKnown(),t=this.pagination.getTotalPages(),o=this.pagination.getMasterRowCount(),i=e?o:null,s=this.pagination.getCurrentPage(),n=this.pagination.getPageSize();let r,a;this.isZeroPagesToDisplay()?r=a=0:(r=n*s+1,a=r+n-1,e&&a>i&&(a=i));const l=r+n-1,d=!e&&o<l,c=this.formatNumber(r);this.lbFirstRowOnPage.textContent=c;let u;const p=this.getLocaleTextFunc();d?u=p("pageLastRowUnknown","?"):u=this.formatNumber(a),this.lbLastRowOnPage.textContent=u;const f=t>0?s+1:0,m=this.formatNumber(f);this.lbCurrent.textContent=m;let C,v;if(e)C=this.formatNumber(t),v=this.formatNumber(i);else{const S=p("more","more");C=S,v=S}this.lbTotal.textContent=C,this.lbRecordCount.textContent=v,this.announceAriaStatus(c,u,v,m,C)}announceAriaStatus(e,t,o,i,s){const n=this.getLocaleTextFunc(),r=n("page","Page"),a=n("to","to"),l=n("of","of"),d=`${e} ${a} ${t} ${l} ${o}`,c=`${r} ${i} ${l} ${s}`;d!==this.ariaRowStatus&&(this.ariaRowStatus=d,this.ariaAnnounce?.announceValue(d,"paginationRow")),c!==this.ariaPageStatus&&(this.ariaPageStatus=c,this.ariaAnnounce?.announceValue(c,"paginationPage"))}setTotalLabelsToZero(){const e=this.formatNumber(0);this.lbFirstRowOnPage.textContent=e,this.lbCurrent.textContent=e,this.lbLastRowOnPage.textContent=e,this.lbTotal.textContent=e,this.lbRecordCount.textContent=e,this.announceAriaStatus(e,e,e,e,e)}},AF={selector:"AG-PAGINATION",component:EF},TF=class extends M{constructor(){super(...arguments),this.beanName="pagination",this.currentPage=0,this.topDisplayedRowIndex=0,this.bottomDisplayedRowIndex=0,this.masterRowCount=0}postConstruct(){const e=this.gos;this.active=e.get("pagination"),this.pageSizeFromGridOptions=e.get("paginationPageSize"),this.paginateChildRows=this.isPaginateChildRows(),this.addManagedPropertyListener("pagination",this.onPaginationGridOptionChanged.bind(this)),this.addManagedPropertyListener("paginationPageSize",this.onPageSizeGridOptionChanged.bind(this))}getPaginationSelector(){return AF}isPaginateChildRows(){const e=this.gos;return e.get("groupHideParentOfSingleChild")||e.get("groupRemoveSingleChildren")||e.get("groupRemoveLowestSingleChildren")?!0:e.get("paginateChildRows")}onPaginationGridOptionChanged(){this.active=this.gos.get("pagination"),this.calculatePages(),this.dispatchPaginationChangedEvent({keepRenderedRows:!0})}onPageSizeGridOptionChanged(){this.setPageSize(this.gos.get("paginationPageSize"),"gridOptions")}goToPage(e){const t=this.currentPage;!this.active||t===e||typeof t!="number"||(this.currentPage=e,this.calculatePages(),this.dispatchPaginationChangedEvent({newPage:!0}))}goToPageWithIndex(e){if(!this.active)return;let t=e;this.paginateChildRows||(t=this.beans.rowModel.getTopLevelIndexFromDisplayedIndex?.(e)??e),this.goToPage(Math.floor(t/this.pageSize))}isRowInPage(e){return this.active?e>=this.topDisplayedRowIndex&&e<=this.bottomDisplayedRowIndex:!0}getCurrentPage(){return this.currentPage}goToNextPage(){this.goToPage(this.currentPage+1)}goToPreviousPage(){this.goToPage(this.currentPage-1)}goToFirstPage(){this.goToPage(0)}goToLastPage(){const e=this.beans.rowModel.getRowCount(),t=Math.floor(e/this.pageSize);this.goToPage(t)}getPageSize(){return this.pageSize}getTotalPages(){return this.totalPages}setPage(e){this.currentPage=e}get pageSize(){return j(this.pageSizeAutoCalculated)&&this.gos.get("paginationAutoPageSize")?this.pageSizeAutoCalculated:j(this.pageSizeFromPageSizeSelector)?this.pageSizeFromPageSizeSelector:j(this.pageSizeFromInitialState)?this.pageSizeFromInitialState:j(this.pageSizeFromGridOptions)?this.pageSizeFromGridOptions:this.defaultPageSize}calculatePages(){this.active?this.paginateChildRows?this.calculatePagesAllRows():this.calculatePagesMasterRowsOnly():this.calculatedPagesNotActive(),this.beans.pageBounds.calculateBounds(this.topDisplayedRowIndex,this.bottomDisplayedRowIndex)}unsetAutoCalculatedPageSize(){if(this.pageSizeAutoCalculated===void 0)return;const e=this.pageSizeAutoCalculated;this.pageSizeAutoCalculated=void 0,this.pageSize!==e&&(this.calculatePages(),this.dispatchPaginationChangedEvent({newPageSize:!0}))}setPageSize(e,t){const o=this.pageSize;switch(t){case"autoCalculated":this.pageSizeAutoCalculated=e;break;case"pageSizeSelector":this.pageSizeFromPageSizeSelector=e,this.currentPage!==0&&this.goToFirstPage();break;case"initialState":this.pageSizeFromInitialState=e;break;case"gridOptions":this.pageSizeFromGridOptions=e,this.pageSizeFromInitialState=void 0,this.pageSizeFromPageSizeSelector=void 0,this.currentPage!==0&&this.goToFirstPage();break}o!==this.pageSize&&(this.calculatePages(),this.dispatchPaginationChangedEvent({newPageSize:!0,keepRenderedRows:!0}))}setZeroRows(){this.masterRowCount=0,this.topDisplayedRowIndex=0,this.bottomDisplayedRowIndex=-1,this.currentPage=0,this.totalPages=0}adjustCurrentPageIfInvalid(){const e=this.totalPages;this.currentPage>=e&&(this.currentPage=e-1);const t=this.currentPage;(!isFinite(t)||isNaN(t)||t<0)&&(this.currentPage=0)}calculatePagesMasterRowsOnly(){const e=this.beans.rowModel,t=e.getTopLevelRowCount();if(this.masterRowCount=t,t<=0){this.setZeroRows();return}const o=this.pageSize,i=t-1;this.totalPages=Math.floor(i/o)+1,this.adjustCurrentPageIfInvalid();const s=this.currentPage,n=o*s;let r=o*(s+1)-1;if(r>i&&(r=i),this.topDisplayedRowIndex=e.getTopLevelRowDisplayedIndex(n),r===i)this.bottomDisplayedRowIndex=e.getRowCount()-1;else{const a=e.getTopLevelRowDisplayedIndex(r+1);this.bottomDisplayedRowIndex=a-1}}getMasterRowCount(){return this.masterRowCount}calculatePagesAllRows(){const e=this.beans.rowModel.getRowCount();if(this.masterRowCount=e,e===0){this.setZeroRows();return}const{pageSize:t,currentPage:o}=this,i=e-1;this.totalPages=Math.floor(i/t)+1,this.adjustCurrentPageIfInvalid(),this.topDisplayedRowIndex=t*o,this.bottomDisplayedRowIndex=t*(o+1)-1,this.bottomDisplayedRowIndex>i&&(this.bottomDisplayedRowIndex=i)}calculatedPagesNotActive(){this.setPageSize(void 0,"autoCalculated"),this.totalPages=1,this.currentPage=0,this.topDisplayedRowIndex=0,this.bottomDisplayedRowIndex=this.beans.rowModel.getRowCount()-1}dispatchPaginationChangedEvent(e){const{keepRenderedRows:t=!1,newPage:o=!1,newPageSize:i=!1}=e;this.eventSvc.dispatchEvent({type:"paginationChanged",animate:!1,newData:!1,newPage:o,newPageSize:i,keepRenderedRows:t})}},IF={moduleName:"Pagination",version:ne,beans:[TF,FF],icons:{first:"first",previous:"previous",next:"next",last:"last"},apiFunctions:{paginationIsLastPageFound:gF,paginationGetPageSize:fF,paginationGetCurrentPage:mF,paginationGetTotalPages:CF,paginationGetRowCount:vF,paginationGoToNextPage:wF,paginationGoToPreviousPage:SF,paginationGoToFirstPage:yF,paginationGoToLastPage:bF,paginationGoToPage:RF},dependsOn:[Bn]};function LF(e,t={}){const o=t?t.rowNodes:void 0;e.frameworkOverrides.wrapIncoming(()=>e.rowRenderer.redrawRows(o))}function rh(e,t,o,i,s){t&&(i&&t.parent&&t.parent.level!==-1&&rh(e,t.parent,o,i,s),t.setExpanded(o,void 0,s))}function kF(e,t){return e.rowModel.getRowNode(t)}function GF(e,t,o,i){e.rowRenderer.addRenderedRowListener(t,o,i)}function OF(e){return e.rowRenderer.getRenderedNodes()}function BF(e,t,o){e.rowModel.forEachNode(t,o)}function NF(e){return e.rowRenderer.firstRenderedRow}function HF(e){return e.rowRenderer.lastRenderedRow}function VF(e,t){return e.rowModel.getRow(t)}function _F(e){return e.rowModel.getRowCount()}var zF={moduleName:"RowApi",version:ne,apiFunctions:{redrawRows:LF,setRowNodeExpanded:rh,getRowNode:kF,addRenderedRowListener:GF,getRenderedNodes:OF,forEachNode:BF,getFirstDisplayedRowIndex:NF,getLastDisplayedRowIndex:HF,getDisplayedRowAtIndex:VF,getDisplayedRowCount:_F}},WF={moduleName:"RowStyle",version:ne,beans:[am]},UF=class extends M{constructor(){super(...arguments),this.beanName="apiEventSvc",this.syncListeners=new Map,this.asyncListeners=new Map,this.syncGlobalListeners=new Set,this.globalListenerPairs=new Map}postConstruct(){this.wrapSvc=this.beans.frameworkOverrides.createGlobalEventListenerWrapper?.()}addEventListener(e,t){const o=this.wrapSvc?.wrap(t)??t,i=!zi.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){const o=this.wrapSvc?.unwrap(t)??t,s=!!this.asyncListeners.get(e)?.delete(o);s||this.syncListeners.get(e)?.delete(o),this.eventSvc.removeEventListener(e,o,s)}addGlobalListener(e){const t=this.wrapSvc?.wrapGlobal(e)??e,o=(n,r)=>{zi.has(n)&&t(n,r)},i=(n,r)=>{zi.has(n)||t(n,r)};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?.unwrapGlobal(e)??e;if(i.has(s)){const{syncListener:r,asyncListener:a}=i.get(s);t.removeGlobalListener(r,!1),t.removeGlobalListener(a,!0),i.delete(e)}else this.syncGlobalListeners.delete(s),t.removeGlobalListener(s,!1)}destroyEventListeners(e,t){e.forEach((o,i)=>{o.forEach(s=>this.eventSvc.removeEventListener(i,s,t)),o.clear()}),e.clear()}destroyGlobalListeners(e,t){e.forEach(o=>this.eventSvc.removeGlobalListener(o,t)),e.clear()}destroy(){super.destroy(),this.destroyEventListeners(this.syncListeners,!1),this.destroyEventListeners(this.asyncListeners,!0),this.destroyGlobalListeners(this.syncGlobalListeners,!1);const{globalListenerPairs:e,eventSvc:t}=this;e.forEach(({syncListener:o,asyncListener:i})=>{t.removeGlobalListener(o,!1),t.removeGlobalListener(i,!0)}),e.clear()}};function $F(e,t,o){e.apiEventSvc?.addEventListener(t,o)}function jF(e,t,o){e.apiEventSvc?.removeEventListener(t,o)}function KF(e,t){e.apiEventSvc?.addGlobalListener(t)}function YF(e,t){e.apiEventSvc?.removeGlobalListener(t)}var qF={moduleName:"EventApi",version:ne,apiFunctions:{addEventListener:$F,addGlobalListener:KF,removeEventListener:jF,removeGlobalListener:YF},beans:[UF]},QF=".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);white-space:normal}.ag-tooltip,.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}}",XF=class extends M{constructor(){super(...arguments),this.beanName="tooltipSvc"}setupHeaderTooltip(e,t,o,i){e&&t.destroyBean(e);const s=Vi(this.gos),{column:n,eGui:r}=t,a=n.getColDef();!i&&s&&!a.headerComponent&&(i=_i(()=>r.querySelector(".ag-header-cell-text")));const l={getColumn:()=>n,getColDef:()=>n.getColDef(),getGui:()=>r,getLocation:()=>"header",getTooltipValue:()=>o??n.getColDef().headerTooltip,shouldDisplayTooltip:i};let d=this.createTooltipFeature(l);return d&&(d=t.createBean(d),t.setRefreshFunction("tooltip",()=>d.refreshTooltip())),d}setupHeaderGroupTooltip(e,t,o,i){e&&t.destroyBean(e);const s=Vi(this.gos),{column:n,eGui:r}=t,a=n.getColGroupDef();!i&&s&&!a?.headerGroupComponent&&(i=_i(()=>r.querySelector(".ag-header-group-text")));const l={getColumn:()=>n,getGui:()=>r,getLocation:()=>"headerGroup",getTooltipValue:()=>o??(a&&a.headerTooltip),shouldDisplayTooltip:i};a&&(l.getColDef=()=>a);const d=this.createTooltipFeature(l);return d&&t.createBean(d)}enableCellTooltipFeature(e,t,o){const{column:i,rowNode:s}=e,n=()=>{const l=i.getColDef(),d=s.data;if(l.tooltipField&&j(d))return Ni(d,l.tooltipField,i.isTooltipFieldContainsDots());const c=l.tooltipValueGetter;return c?c(Z(this.gos,{location:"cell",colDef:i.getColDef(),column:i,rowIndex:e.cellPosition.rowIndex,node:s,data:s.data,value:e.value,valueFormatted:e.valueFormatted})):null},r=Vi(this.gos);!o&&r&&!e.isCellRenderer()&&(o=_i(()=>{const l=e.eGui;return l.children.length===0?l:l.querySelector(".ag-cell-value")}));const a={getColumn:()=>i,getColDef:()=>i.getColDef(),getRowIndex:()=>e.cellPosition.rowIndex,getRowNode:()=>s,getGui:()=>e.eGui,getLocation:()=>"cell",getTooltipValue:t!=null?()=>t:n,getValueFormatted:()=>e.valueFormatted,shouldDisplayTooltip:o};return this.createTooltipFeature(a,this.beans)}refreshRowTooltip(e,t,o,i){const s={getGui:()=>t.getFullWidthElement(),getTooltipValue:()=>o,getLocation:()=>"fullWidthRow",shouldDisplayTooltip:i},n=this.beans,r=n.context;e&&t.destroyBean(e,r);const a=this.createTooltipFeature(s,n);return t.createBean(a,r)}initCol(e){const{colDef:t}=e;e.tooltipEnabled=j(t.tooltipField)||j(t.tooltipValueGetter)||j(t.tooltipComponent)}createTooltipFeature(e,t){return this.beans.registry.createDynamicBean("tooltipFeature",!1,e,t)}},ZF={moduleName:"Tooltip",version:ne,beans:[XF],dynamicBeans:{tooltipFeature:DC},userComponents:{agTooltipComponent:ub},dependsOn:[Bn],css:[QF]},JF=Object.defineProperty,ex=(e,t,o)=>t in e?JF(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,li=(e,t,o)=>ex(e,typeof t!="symbol"?t+"":t,o);class ls{static getComponentDefinition(t,o){let i;return typeof t=="string"?i=this.searchForComponentInstance(o,t):i={extends:h.defineComponent({...t})},i||ae(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=ls.getComponentDefinition(t,i);if(!n)return;const{vNode:r,destroy:a,el:l}=this.mount(n,{params:Object.freeze(o)},i,s||{});return{componentInstance:r.component.proxy,element:l,destroy:a}}static mount(t,o,i,s){let n=h.createVNode(t,o);n.appContext={...i.appContext,provides:s};let r=document.createElement("div");return h.render(n,r),{vNode:n,destroy:()=>{r&&h.render(null,r),r=null,n=null},el:r}}static searchForComponentInstance(t,o,i=10,s=!1){let n=null,r=0,a=t.parent;for(;!n&&a&&a.components&&++r<i;)a.components&&a.components[o]&&(n=a.components[o]),a=a.parent;for(r=0,a=t.parent;!n&&a&&a.$options&&++r<i;){const l=a;l.$options&&l.$options.components&&l.$options.components[o]?n=l.$options.components[o]:l[o]&&(n=l[o]),a=a.parent}for(r=0,a=t.parent;!n&&a&&++r<i;){if(a.exposed){const l=a;l.exposed&&l.exposed[o]?n=l.exposed[o]:l[o]&&(n=l[o])}a=a.parent}if(!n){const l=t.appContext.components;l&&l[o]&&(n=l[o])}return!n&&!s?(ae(114,{component:o}),null):n}}class tx extends db{constructor(t,o){super(),li(this,"parent"),li(this,"provides"),this.parent=t,this.provides=o}createWrapper(t){const o=this;class i extends ox{init(r){super.init(r)}hasMethod(r){var a,l;const d=s.getFrameworkComponentInstance();return d[r]?!0:((a=d.$.exposed)==null?void 0:a[r])!=null||((l=d.exposed)==null?void 0:l[r])!=null||d.$.setupState[r]!=null}callMethod(r,a){var l,d;const c=this.getFrameworkComponentInstance(),u=s.getFrameworkComponentInstance();if(u[r])return u[r].apply(c,a);{const p=((l=c.$.exposed)==null?void 0:l[r])||((d=c.exposed)==null?void 0:d[r])||c.$.setupState[r];return p?.apply(c,a)}}addMethod(r,a){s[r]=a}processMethod(r,a){return r==="refresh"&&(this.getFrameworkComponentInstance().params=a[0]),this.hasMethod(r)?this.callMethod(r,a):r==="refresh"}createComponent(r){return o.createComponent(t,r)}}const s=new i;return s}createComponent(t,o){return ls.createAndMountComponent(t,o,this.parent,this.provides)}createMethodProxy(t,o,i){return function(){return t.hasMethod(o)?t.callMethod(o,arguments):(i&&_(233,{methodName:o}),null)}}destroy(){this.parent=null}}class ox{constructor(){li(this,"componentInstance"),li(this,"element"),li(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.firstElementChild??i}}class ix extends Ru{constructor(t){super("vue"),li(this,"parent"),this.parent=t}frameworkComponent(t,o){let i=ls.searchForComponentInstance(this.parent,t,10,!0)?t:null;if(!i&&o&&o[t]){const s=o[t];i=ls.searchForComponentInstance(this.parent,s,10,!0)?s:null}return i}isFrameworkComponent(t){return typeof t=="object"}}function sx(){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,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,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,suppressAdvancedFilterEval:void 0,suppressSetFilterByDefault:void 0,enableCharts:void 0,chartThemes:void 0,customChartThemes:void 0,chartThemeOverrides:void 0,chartToolPanelsDef:void 0,chartMenuItems: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,dragAndDropImageComponent:void 0,dragAndDropImageComponentParams: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,suppressRowDrag:void 0,suppressMoveWhenRowDragging:void 0,rowDragEntireRow:void 0,rowDragMultiRow:void 0,rowDragText: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,pinnedTopRowData:void 0,pinnedBottomRowData: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,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,"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,"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-opened":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}}const nx=(e,t)=>{let o;return()=>{const i=function(){e()};window.clearTimeout(o),o=window.setTimeout(i,t)}};function rx(e){return e&&e.constructor&&e.constructor.toString().substring(0,5)==="class"}function Pi(e){const t=o=>rx(o)?h.toRaw(o):Array.isArray(o)?o.map(i=>t(i)):h.isRef(o)||h.isReactive(o)||h.isProxy(o)?t(h.toRaw(o)):o;return t(e)}const ax={ref:"root"},lx=h.defineComponent({__name:"AgGridVue",props:h.mergeModels(h.mergeDefaults({gridOptions:{},modules:{},statusBar:{},sideBar:{type:[Object,String,Array,Boolean,null]},suppressContextMenu:{type:Boolean},preventDefaultOnContextMenu:{type:Boolean},allowContextMenuWithControlKey:{type:Boolean},columnMenu:{},suppressMenuHide:{type:Boolean},enableBrowserTooltips:{type:Boolean},tooltipTrigger:{},tooltipShowDelay:{},tooltipHideDelay:{},tooltipMouseTrack:{type:Boolean},tooltipShowMode:{},tooltipInteraction:{type:Boolean},popupParent:{},copyHeadersToClipboard:{type:Boolean},copyGroupHeadersToClipboard:{type:Boolean},clipboardDelimiter:{},suppressCopyRowsToClipboard:{type:Boolean},suppressCopySingleCellRanges:{type:Boolean},suppressLastEmptyLineOnPaste:{type:Boolean},suppressClipboardPaste:{type:Boolean},suppressClipboardApi:{type:Boolean},suppressCutToClipboard:{type:Boolean},columnDefs:{},defaultColDef:{},defaultColGroupDef:{},columnTypes:{},dataTypeDefinitions:{},maintainColumnOrder:{type:Boolean},enableStrictPivotColumnOrder:{type:Boolean},suppressFieldDotNotation:{type:Boolean},headerHeight:{},groupHeaderHeight:{},floatingFiltersHeight:{},pivotHeaderHeight:{},pivotGroupHeaderHeight:{},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:{},suppressAutoSize:{type:Boolean},autoSizePadding:{},skipHeaderOnAutoSize:{type:Boolean},autoSizeStrategy:{},components:{},editType:{},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:{},defaultCsvExportParams:{},suppressCsvExport:{type:Boolean},defaultExcelExportParams:{},suppressExcelExport:{type:Boolean},excelStyles:{},findSearchValue:{},findOptions:{},quickFilterText:{},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:{},advancedFilterBuilderParams:{},suppressAdvancedFilterEval:{type:Boolean},suppressSetFilterByDefault:{type:Boolean},enableCharts:{type:Boolean},chartThemes:{},customChartThemes:{},chartThemeOverrides:{},chartToolPanelsDef:{},chartMenuItems:{type:[Array,Function]},loadingCellRenderer:{},loadingCellRendererParams:{},loadingCellRendererSelector:{type:Function},localeText:{},masterDetail:{type:Boolean},keepDetailRows:{type:Boolean},keepDetailRowsCount:{},detailCellRenderer:{},detailCellRendererParams:{},detailRowHeight:{},detailRowAutoHeight:{type:Boolean},context:{},dragAndDropImageComponent:{},dragAndDropImageComponentParams:{},alignedGrids:{type:[Array,Function]},tabIndex:{},rowBuffer:{},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:{},loadingOverlayComponent:{},loadingOverlayComponentParams:{},suppressLoadingOverlay:{type:Boolean},overlayNoRowsTemplate:{},noRowsOverlayComponent:{},noRowsOverlayComponentParams:{},suppressNoRowsOverlay:{type:Boolean},pagination:{type:Boolean},paginationPageSize:{},paginationPageSizeSelector:{type:[Array,Boolean]},paginationAutoPageSize:{type:Boolean},paginateChildRows:{type:Boolean},suppressPaginationPanel:{type:Boolean},pivotMode:{type:Boolean},pivotPanelShow:{},pivotMaxGeneratedColumns:{},pivotDefaultExpanded:{},pivotColumnGroupTotals:{},pivotRowTotals:{},pivotSuppressAutoColumn:{type:Boolean},suppressExpandablePivotGroups:{type:Boolean},functionsReadOnly:{type:Boolean},aggFuncs:{},suppressAggFuncInHeader:{type:Boolean},alwaysAggregateAtRootLevel:{type:Boolean},aggregateOnlyChangedColumns:{type:Boolean},suppressAggFilteredOnly:{type:Boolean},removePivotHeaderRowWhenSingleValueColumn:{type:Boolean},animateRows:{type:Boolean},cellFlashDuration:{},cellFadeDuration:{},allowShowChangeAfterFilter:{type:Boolean},domLayout:{},ensureDomOrder:{type:Boolean},enableCellSpan:{type:Boolean},enableRtl:{type:Boolean},suppressColumnVirtualisation:{type:Boolean},suppressMaxRenderedRowRestriction:{type:Boolean},suppressRowVirtualisation:{type:Boolean},rowDragManaged:{type:Boolean},suppressRowDrag:{type:Boolean},suppressMoveWhenRowDragging:{type:Boolean},rowDragEntireRow:{type:Boolean},rowDragMultiRow:{type:Boolean},rowDragText:{type:Function},fullWidthCellRenderer:{},fullWidthCellRendererParams:{},embedFullWidthRows:{type:Boolean},groupDisplayType:{},groupDefaultExpanded:{},autoGroupColumnDef:{},groupMaintainOrder:{type:Boolean},groupSelectsChildren:{type:Boolean},groupLockGroupColumns:{},groupAggFiltering:{type:[Boolean,Function]},groupTotalRow:{type:[String,Function]},grandTotalRow:{},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:{},groupRowRenderer:{},groupRowRendererParams:{},treeData:{type:Boolean},treeDataChildrenField:{},treeDataParentIdField:{},rowGroupPanelSuppressSort:{type:Boolean},suppressGroupRowsSticky:{type:Boolean},pinnedTopRowData:{},pinnedBottomRowData:{},rowModelType:{},rowData:{},asyncTransactionWaitMillis:{},suppressModelUpdateAfterUpdateTransaction:{type:Boolean},datasource:{},cacheOverflowSize:{},infiniteInitialRowCount:{},serverSideInitialRowCount:{},suppressServerSideFullWidthLoadingRow:{type:Boolean},cacheBlockSize:{},maxBlocksInCache:{},maxConcurrentDatasourceRequests:{},blockLoadDebounceMillis:{},purgeClosedRowNodes:{type:Boolean},serverSideDatasource:{},serverSideSortAllLevels:{type:Boolean},serverSideEnableClientSideSort:{type:Boolean},serverSideOnlyRefreshFilteredGroups:{type:Boolean},serverSidePivotResultFieldSeparator:{},viewportDatasource:{},viewportRowModelPageSize:{},viewportRowModelBufferSize:{},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:{},rowSelection:{},cellSelection:{type:[Boolean,Object]},rowMultiSelectWithClick:{type:Boolean},suppressRowDeselection:{type:Boolean},suppressRowClickSelection:{type:Boolean},suppressCellFocus:{type:Boolean},suppressHeaderFocus:{type:Boolean},selectionColumnDef:{},rowNumbers:{type:[Boolean,Object]},suppressMultiRangeSelection:{type:Boolean},enableCellTextSelection:{type:Boolean},enableRangeSelection:{type:Boolean},enableRangeHandle:{type:Boolean},enableFillHandle:{type:Boolean},fillHandleDirection:{},suppressClearOnFillReduction:{type:Boolean},sortingOrder:{},accentedSort:{type:Boolean},unSortIcon:{type:Boolean},suppressMultiSort:{type:Boolean},alwaysMultiSort:{type:Boolean},multiSortKey:{},suppressMaintainUnsortedOrder:{type:Boolean},icons:{},rowHeight:{},rowStyle:{},rowClass:{},rowClassRules:{},suppressRowHoverHighlight:{type:Boolean},suppressRowTransform:{type:Boolean},columnHoverHighlight:{type:Boolean},gridId:{},deltaSort:{type:Boolean},treeDataDisplayType:{},enableGroupEdit:{type:Boolean},initialState:{},theme:{},loadThemeGoogleFonts:{type:Boolean},themeCssLayer:{},styleNonce:{},themeStyleContainer:{},getContextMenuItems:{type:Function},getMainMenuItems:{type:Function},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:{type:Function},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},initialGroupOrderComparator:{type:Function},processPivotResultColDef:{type:Function},processPivotResultColGroupDef:{type:Function},getDataPath:{type:Function},getChildCount:{type:Function},getServerSideGroupLevelParams:{type:Function},isServerSideGroupOpenByDefault:{type:Function},isApplyServerSideTransaction:{type:Function},isServerSideGroup:{type:Function},getServerSideGroupKey:{type:Function},getBusinessKeyForNode:{type:Function},getRowId:{type:Function},resetRowDataOnUpdate:{type:Boolean},processRowPostCreate:{type:Function},isRowSelectable:{type:Function},isRowMaster:{type:Function},fillOperation:{type:Function},postSortRows:{type:Function},getRowStyle:{type:Function},getRowClass:{type:Function},getRowHeight:{type:Function},isFullWidthRow:{type:Function},"onTool-panel-visible-changed":{},"onTool-panel-size-changed":{},"onColumn-menu-visible-changed":{},"onContext-menu-visible-changed":{},"onCut-start":{},"onCut-end":{},"onPaste-start":{},"onPaste-end":{},"onColumn-visible":{},"onColumn-pinned":{},"onColumn-resized":{},"onColumn-moved":{},"onColumn-value-changed":{},"onColumn-pivot-mode-changed":{},"onColumn-pivot-changed":{},"onColumn-group-opened":{},"onNew-columns-loaded":{},"onGrid-columns-changed":{},"onDisplayed-columns-changed":{},"onVirtual-columns-changed":{},"onColumn-everything-changed":{},"onColumn-header-mouse-over":{},"onColumn-header-mouse-leave":{},"onColumn-header-clicked":{},"onColumn-header-context-menu":{},"onComponent-state-changed":{},"onCell-value-changed":{},"onCell-edit-request":{},"onRow-value-changed":{},"onCell-editing-started":{},"onCell-editing-stopped":{},"onRow-editing-started":{},"onRow-editing-stopped":{},"onUndo-started":{},"onUndo-ended":{},"onRedo-started":{},"onRedo-ended":{},"onCell-selection-delete-start":{},"onCell-selection-delete-end":{},"onRange-delete-start":{},"onRange-delete-end":{},"onFill-start":{},"onFill-end":{},"onFilter-opened":{},"onFilter-changed":{},"onFilter-modified":{},"onAdvanced-filter-builder-visible-changed":{},"onFind-changed":{},"onChart-created":{},"onChart-range-selection-changed":{},"onChart-options-changed":{},"onChart-destroyed":{},"onCell-key-down":{},"onGrid-ready":{},"onGrid-pre-destroyed":{},"onFirst-data-rendered":{},"onGrid-size-changed":{},"onModel-updated":{},"onVirtual-row-removed":{},"onViewport-changed":{},"onBody-scroll":{},"onBody-scroll-end":{},"onDrag-started":{},"onDrag-stopped":{},"onDrag-cancelled":{},"onState-updated":{},"onPagination-changed":{},"onRow-drag-enter":{},"onRow-drag-move":{},"onRow-drag-leave":{},"onRow-drag-end":{},"onRow-drag-cancel":{},"onColumn-row-group-changed":{},"onRow-group-opened":{},"onExpand-or-collapse-all":{},"onPivot-max-columns-exceeded":{},"onPinned-row-data-changed":{},"onRow-data-updated":{},"onAsync-transactions-flushed":{},"onStore-refreshed":{},"onHeader-focused":{},"onCell-clicked":{},"onCell-double-clicked":{},"onCell-focused":{},"onCell-mouse-over":{},"onCell-mouse-out":{},"onCell-mouse-down":{},"onRow-clicked":{},"onRow-double-clicked":{},"onRow-selected":{},"onSelection-changed":{},"onCell-context-menu":{},"onRange-selection-changed":{},"onCell-selection-changed":{},"onTooltip-show":{},"onTooltip-hide":{},"onSort-changed":{}},sx()),{modelValue:{},modelModifiers:{}}),emits:h.mergeModels(["update:modelValue"],["update:modelValue"]),setup(e,{expose:t,emit:o}){const i=e,s=h.useTemplateRef("root"),n=h.ref(void 0),r=h.ref(!1),a=h.ref(!1),l=h.ref(!1),d=h.ref({}),c=h.ref(null),u=h.toRefs(i);Qr.filter(w=>w!="gridOptions").forEach(w=>{h.watch(()=>u[w],(R,F)=>{(w==="rowData"&&!m.value||w!=="rowData")&&P(w,R),m.value=!1},{deep:!0})});const p=new Set(["rowDataUpdated","cellValueChanged","rowValueChanged"]),g=h.useModel(e,"modelValue"),f=h.ref(!1),m=h.ref(!1),C=o;h.watch(g,(w,R)=>{r.value&&(m.value||(f.value=!0,P("rowData",Pi(w),Pi(R))),m.value=!1)},{deep:!0});const v=nx(()=>{m.value=!0,C("update:modelValue",T())},10),S=h.getCurrentInstance(),b=w=>{var R,F;l.value&&p.has(w)&&(F=(R=S?.vnode)==null?void 0:R.props)!=null&&F["onUpdate:modelValue"]&&v()},x=()=>g.value||i.rowData||i.gridOptions.rowData,T=()=>{const w=[];return n?.value.forEachLeafNode(R=>{w.push(R.data)}),w},A=w=>R=>{if(a.value)return;R==="gridReady"&&(l.value=!0);const F=zi.has(R);F&&!w||!F&&w||p.has(R)&&(f.value||b(R),f.value=!1)},P=(w,R,F)=>{if(r.value){let H=R.value||R;w==="rowData"&&H!=null&&(H=Pi(H)),d.value[w]=H,c.value==null&&(c.value=window.setTimeout(()=>{c.value=null,Zp(d.value,n.value),d.value={}},0))}},y=()=>Object.create(h.getCurrentInstance().provides);return h.onMounted(()=>{$c.registerModules([zF]);const w=new tx(h.getCurrentInstance(),y()),R={globalListener:A(),globalSyncListener:A(!0),frameworkOverrides:new ix(h.getCurrentInstance()),providedBeanInstances:{frameworkCompWrapper:w},modules:i.modules},F=h.markRaw(Xp(Pi(i.gridOptions),i,[...Qr,...Yu.map(z=>va(z))])),H=x();H!==void 0&&(F.rowData=Pi(H)),n.value=Xy(s.value,F,R),r.value=!0}),h.onUnmounted(()=>{var w;r.value&&((w=n?.value)==null||w.destroy(),a.value=!0)}),t({api:n}),(w,R)=>(h.openBlock(),h.createElementBlock("div",ax,null,512))}});var dx=class{constructor(){this.ieCompatibility=!1}init(){this.ieCompatibility=this.md5("hello")!="5d41402abc4b2a76b9719d911017c592"}md5cycle(e,t){let o=e[0],i=e[1],s=e[2],n=e[3];o=this.ff(o,i,s,n,t[0],7,-680876936),n=this.ff(n,o,i,s,t[1],12,-389564586),s=this.ff(s,n,o,i,t[2],17,606105819),i=this.ff(i,s,n,o,t[3],22,-1044525330),o=this.ff(o,i,s,n,t[4],7,-176418897),n=this.ff(n,o,i,s,t[5],12,1200080426),s=this.ff(s,n,o,i,t[6],17,-1473231341),i=this.ff(i,s,n,o,t[7],22,-45705983),o=this.ff(o,i,s,n,t[8],7,1770035416),n=this.ff(n,o,i,s,t[9],12,-1958414417),s=this.ff(s,n,o,i,t[10],17,-42063),i=this.ff(i,s,n,o,t[11],22,-1990404162),o=this.ff(o,i,s,n,t[12],7,1804603682),n=this.ff(n,o,i,s,t[13],12,-40341101),s=this.ff(s,n,o,i,t[14],17,-1502002290),i=this.ff(i,s,n,o,t[15],22,1236535329),o=this.gg(o,i,s,n,t[1],5,-165796510),n=this.gg(n,o,i,s,t[6],9,-1069501632),s=this.gg(s,n,o,i,t[11],14,643717713),i=this.gg(i,s,n,o,t[0],20,-373897302),o=this.gg(o,i,s,n,t[5],5,-701558691),n=this.gg(n,o,i,s,t[10],9,38016083),s=this.gg(s,n,o,i,t[15],14,-660478335),i=this.gg(i,s,n,o,t[4],20,-405537848),o=this.gg(o,i,s,n,t[9],5,568446438),n=this.gg(n,o,i,s,t[14],9,-1019803690),s=this.gg(s,n,o,i,t[3],14,-187363961),i=this.gg(i,s,n,o,t[8],20,1163531501),o=this.gg(o,i,s,n,t[13],5,-1444681467),n=this.gg(n,o,i,s,t[2],9,-51403784),s=this.gg(s,n,o,i,t[7],14,1735328473),i=this.gg(i,s,n,o,t[12],20,-1926607734),o=this.hh(o,i,s,n,t[5],4,-378558),n=this.hh(n,o,i,s,t[8],11,-2022574463),s=this.hh(s,n,o,i,t[11],16,1839030562),i=this.hh(i,s,n,o,t[14],23,-35309556),o=this.hh(o,i,s,n,t[1],4,-1530992060),n=this.hh(n,o,i,s,t[4],11,1272893353),s=this.hh(s,n,o,i,t[7],16,-155497632),i=this.hh(i,s,n,o,t[10],23,-1094730640),o=this.hh(o,i,s,n,t[13],4,681279174),n=this.hh(n,o,i,s,t[0],11,-358537222),s=this.hh(s,n,o,i,t[3],16,-722521979),i=this.hh(i,s,n,o,t[6],23,76029189),o=this.hh(o,i,s,n,t[9],4,-640364487),n=this.hh(n,o,i,s,t[12],11,-421815835),s=this.hh(s,n,o,i,t[15],16,530742520),i=this.hh(i,s,n,o,t[2],23,-995338651),o=this.ii(o,i,s,n,t[0],6,-198630844),n=this.ii(n,o,i,s,t[7],10,1126891415),s=this.ii(s,n,o,i,t[14],15,-1416354905),i=this.ii(i,s,n,o,t[5],21,-57434055),o=this.ii(o,i,s,n,t[12],6,1700485571),n=this.ii(n,o,i,s,t[3],10,-1894986606),s=this.ii(s,n,o,i,t[10],15,-1051523),i=this.ii(i,s,n,o,t[1],21,-2054922799),o=this.ii(o,i,s,n,t[8],6,1873313359),n=this.ii(n,o,i,s,t[15],10,-30611744),s=this.ii(s,n,o,i,t[6],15,-1560198380),i=this.ii(i,s,n,o,t[13],21,1309151649),o=this.ii(o,i,s,n,t[4],6,-145523070),n=this.ii(n,o,i,s,t[11],10,-1120210379),s=this.ii(s,n,o,i,t[2],15,718787259),i=this.ii(i,s,n,o,t[9],21,-343485551),e[0]=this.add32(o,e[0]),e[1]=this.add32(i,e[1]),e[2]=this.add32(s,e[2]),e[3]=this.add32(n,e[3])}cmn(e,t,o,i,s,n){return t=this.add32(this.add32(t,e),this.add32(i,n)),this.add32(t<<s|t>>>32-s,o)}ff(e,t,o,i,s,n,r){return this.cmn(t&o|~t&i,e,t,s,n,r)}gg(e,t,o,i,s,n,r){return this.cmn(t&i|o&~i,e,t,s,n,r)}hh(e,t,o,i,s,n,r){return this.cmn(t^o^i,e,t,s,n,r)}ii(e,t,o,i,s,n,r){return this.cmn(o^(t|~i),e,t,s,n,r)}md51(e){const t=e.length,o=[1732584193,-271733879,-1732584194,271733878];let i;for(i=64;i<=e.length;i+=64)this.md5cycle(o,this.md5blk(e.substring(i-64,i)));e=e.substring(i-64);const s=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(i=0;i<e.length;i++)s[i>>2]|=e.charCodeAt(i)<<(i%4<<3);if(s[i>>2]|=128<<(i%4<<3),i>55)for(this.md5cycle(o,s),i=0;i<16;i++)s[i]=0;return s[14]=t*8,this.md5cycle(o,s),o}md5blk(e){const t=[];for(let o=0;o<64;o+=4)t[o>>2]=e.charCodeAt(o)+(e.charCodeAt(o+1)<<8)+(e.charCodeAt(o+2)<<16)+(e.charCodeAt(o+3)<<24);return t}rhex(e){const t="0123456789abcdef".split("");let o="",i=0;for(;i<4;i++)o+=t[e>>i*8+4&15]+t[e>>i*8&15];return o}hex(e){for(let t=0;t<e.length;t++)e[t]=this.rhex(e[t]);return e.join("")}md5(e){return this.hex(this.md51(e))}add32(e,t){return this.ieCompatibility?this.add32Compat(e,t):this.add32Std(e,t)}add32Std(e,t){return e+t&4294967295}add32Compat(e,t){const o=(e&65535)+(t&65535);return(e>>16)+(t>>16)+(o>>16)<<16|o&65535}},Ms={"01":"GRID","02":"CHARTS","0102":"BOTH"},Ql="https://www.ag-grid.com/licensing/",ah=class Je{constructor(t){this.watermarkMessage=void 0,this.totalMessageLength=124,this.document=t,this.md5=new dx,this.md5.init()}validateLicense(){const t=this.getLicenseDetails(Je.licenseKey),o=`AG Grid ${t.currentLicenseType==="BOTH"?"and AG Charts ":""}Enterprise`,i=t.suppliedLicenseType===void 0?"":`AG ${t.suppliedLicenseType==="BOTH"?"Grid and AG Charts":t.suppliedLicenseType==="GRID"?"Grid":"Charts"} Enterprise`;if(t.missing)(!this.isWebsiteUrl()||this.isForceWatermark())&&this.outputMissingLicenseKey(o);else if(t.expired){const s=Je.getGridReleaseDate(),n=Je.formatDate(s);this.outputExpiredKey(t.expiry,n,o,i)}else t.valid?t.isTrial&&t.trialExpired&&this.outputExpiredTrialKey(t.expiry,o,i):this.outputInvalidLicenseKey(!!t.incorrectLicenseType,o,i)}static extractExpiry(t){const o=t.substring(t.lastIndexOf("_")+1,t.length);return new Date(parseInt(Je.decode(o),10))}static extractLicenseComponents(t){let o=t.replace(/[\u200B-\u200D\uFEFF]/g,"");if(o=o.replace(/\r?\n|\r/g,""),t.length<=32)return{md5:null,license:t,version:null,isTrial:null};const i=o.length-32,s=o.substring(i),n=o.substring(0,i),[r,a,l]=Je.extractBracketedInformation(o);return{md5:s,license:n,version:r,isTrial:a,type:l}}getLicenseDetails(t){const o=Je.chartsLicenseManager?"BOTH":"GRID";if(!t?.length)return{licenseKey:t,valid:!1,missing:!0,currentLicenseType:o};const i=Je.getGridReleaseDate(),{md5:s,license:n,version:r,isTrial:a,type:l}=Je.extractLicenseComponents(t);let d=s===this.md5.md5(n)&&t.indexOf("For_Trialing_ag-Grid_Only")===-1,c,u,p=null,g=!1,f;function m(){c=p<new Date,u=void 0}if(d&&(p=Je.extractExpiry(n),d=!isNaN(p.getTime()),d))switch(u=i>p,r){case"legacy":case"2":{a&&m();break}case"3":l?.length?(f=l,l!==Ms["01"]&&l!==Ms["0102"]||o==="BOTH"&&f!=="BOTH"?(d=!1,g=!0):a&&m()):d=!1}return d?{licenseKey:t,valid:d,expiry:Je.formatDate(p),expired:u,version:r,isTrial:a,trialExpired:c,incorrectLicenseType:g,currentLicenseType:o,suppliedLicenseType:f}:{licenseKey:t,valid:d,incorrectLicenseType:g,currentLicenseType:o,suppliedLicenseType:f}}isDisplayWatermark(){return this.isForceWatermark()||!this.isLocalhost()&&!this.isWebsiteUrl()&&!!this.watermarkMessage?.length}getWatermarkMessage(){return this.watermarkMessage||""}getHostname(){const o=(this.document.defaultView||window).location,{hostname:i=""}=o;return i}isForceWatermark(){const o=(this.document.defaultView||window).location,{pathname:i}=o;return i?i.indexOf("forceWatermark")!==-1:!1}isWebsiteUrl(){return this.getHostname().match(/^((?:[\w-]+\.)?ag-grid\.com)$/)!==null}isLocalhost(){return this.getHostname().match(/^(?:127\.0\.0\.1|localhost)$/)!==null}static formatDate(t){const o=["January","February","March","April","May","June","July","August","September","October","November","December"],i=t.getDate(),s=t.getMonth(),n=t.getFullYear();return i+" "+o[s]+" "+n}static getGridReleaseDate(){return new Date(parseInt(Je.decode(Je.RELEASE_INFORMATION),10))}static decode(t){const o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";let i="",s,n,r,a,l,d,c,u=0;const p=t.replace(/[^A-Za-z0-9+/=]/g,"");for(;u<p.length;)a=o.indexOf(p.charAt(u++)),l=o.indexOf(p.charAt(u++)),d=o.indexOf(p.charAt(u++)),c=o.indexOf(p.charAt(u++)),s=a<<2|l>>4,n=(l&15)<<4|d>>2,r=(d&3)<<6|c,i=i+String.fromCharCode(s),d!=64&&(i=i+String.fromCharCode(n)),c!=64&&(i=i+String.fromCharCode(r));return i=Je.utf8_decode(i),i}static utf8_decode(t){t=t.replace(/rn/g,"n");let o="";for(let i=0;i<t.length;i++){const s=t.charCodeAt(i);s<128?o+=String.fromCharCode(s):s>127&&s<2048?(o+=String.fromCharCode(s>>6|192),o+=String.fromCharCode(s&63|128)):(o+=String.fromCharCode(s>>12|224),o+=String.fromCharCode(s>>6&63|128),o+=String.fromCharCode(s&63|128))}return o}static setChartsLicenseManager(t){this.chartsLicenseManager=t}static setLicenseKey(t){this.licenseKey=t,this.chartsLicenseManager?.setLicenseKey(t,!0)}static extractBracketedInformation(t){if(!t.includes("["))return["legacy",!1,void 0];const o=t.match(/\[(.*?)\]/g).map(a=>a.replace("[","").replace("]",""));if(!o||o.length===0)return["legacy",!1,void 0];const i=o.filter(a=>a==="TRIAL").length===1,s=o.filter(a=>a.indexOf("v")===0)[0],n=s?s.replace("v",""):"legacy",r=Ms[o.filter(a=>Ms[a])[0]];return[n,i,r]}centerPadAndOutput(t){const o=this.totalMessageLength-t.length;console.error(t.padStart(o/2+t.length,"*").padEnd(this.totalMessageLength,"*"))}padAndOutput(t,o="*",i=""){console.error(t.padEnd(this.totalMessageLength-i.length,o)+i)}outputInvalidLicenseKey(t,o,i){t?(this.centerPadAndOutput(""),this.centerPadAndOutput(` ${o} License `),this.centerPadAndOutput(" Incompatible License Key "),this.padAndOutput(`* Your license key is for ${i} only and does not cover you for ${o}.`," ","*"),this.padAndOutput(`* To troubleshoot your license key visit ${Ql}.`," ","*"),this.centerPadAndOutput(""),this.centerPadAndOutput("")):(this.centerPadAndOutput(""),this.centerPadAndOutput(` ${o} License `),this.centerPadAndOutput(" Invalid License Key "),this.padAndOutput("* Your license key is not valid."," ","*"),this.padAndOutput(`* To troubleshoot your license key visit ${Ql}.`," ","*"),this.centerPadAndOutput(""),this.centerPadAndOutput("")),this.watermarkMessage="Invalid License"}outputExpiredTrialKey(t,o,i){this.centerPadAndOutput(""),this.centerPadAndOutput(` ${o} License `),this.centerPadAndOutput(" Trial Period Expired. "),this.padAndOutput(`* Your trial only license for ${i} expired on ${t}.`," ","*"),this.padAndOutput("* Please email info@ag-grid.com to purchase a license."," ","*"),this.centerPadAndOutput(""),this.centerPadAndOutput(""),this.watermarkMessage="Trial Period Expired"}outputMissingLicenseKey(t){this.centerPadAndOutput(""),this.centerPadAndOutput(` ${t} License `),this.centerPadAndOutput(" License Key Not Found "),this.padAndOutput(`* All ${t} features are unlocked for trial.`," ","*"),this.padAndOutput("* If you want to hide the watermark please email info@ag-grid.com for a trial license key."," ","*"),this.centerPadAndOutput(""),this.centerPadAndOutput(""),this.watermarkMessage="For Trial Use Only"}outputExpiredKey(t,o,i,s){this.centerPadAndOutput(""),this.centerPadAndOutput(` ${i} License `),this.centerPadAndOutput(" Incompatible Software Version "),this.padAndOutput(`* Your license key works with versions of ${s} released before ${t}.`," ","*"),this.padAndOutput(`* The version you are trying to use was released on ${o}.`," ","*"),this.padAndOutput("* Please contact info@ag-grid.com to renew your license key."," ","*"),this.centerPadAndOutput(""),this.centerPadAndOutput(""),this.watermarkMessage="License Expired"}};ah.RELEASE_INFORMATION="MTc0NDc4ODcwODE2Nw==";var Ps=ah,cx='.ag-watermark{bottom:20px;color:#9b9b9b;opacity:.7;position:absolute;transition:opacity 1s ease-out 3s;&:before{background-image:url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMDkiIGhlaWdodD0iMzYiIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCAyMDkgMzYiPjxwYXRoIGZpbGw9IiM5QjlCOUIiIGQ9Ik0xOTIuOTkzIDIzLjY1OHYtNy45NDZoLTEzLjU0MWwtNy45NDcgNy45NDZ6TTIwOC4yNSAzLjk1aC0xNi45NzRsLTguMDEgNy45NDdoMjQuOTg0ek0xNjMuNjIyIDMxLjYwNWw0LjA2OS00LjA2OWgxMy43MzJ2Ny45NDdoLTE3LjgwMXoiLz48cGF0aCBmaWxsPSIjOUI5QjlCIiBkPSJNMTY2LjYxIDE5Ljc4aDguNzczbDguMDEtNy45NDZIMTY2LjYxek0xNTcuMDExIDMxLjYwNWg2LjYxMWw3Ljg4My03Ljk0N2gtMTQuNDk0ek0xOTEuMjc2IDMuOTVsLTQuMDY4IDQuMDdIMTYxLjI3Vi4wNzJoMzAuMDA2ek0yMC44NCAzMC4yMDZIOC4zNzhsLTIuMTYyIDUuMzRILjc1TDEyLjI1NyA4LjU5Mmg0Ljc2OEwyOC41MyAzNS41NDZoLTUuNTN6bS0xLjcxNy00LjI2TDE0LjYwOSAxNC45NWwtNC41MTQgMTAuOTk4ek0xMDQuNDM3IDE4LjUwOWMxLjU4OS0yLjM1MiA1LjU5NC0yLjYwNyA3LjI0Ny0yLjYwN3Y0LjU3OGMtMi4wMzQgMC00LjA2OS4wNjMtNS4yNzcuOTUzLTEuMjA3Ljg5LTEuODQzIDIuMDk4LTEuODQzIDMuNTZ2MTAuNTUzaC00Ljk1OVYxNS45MDJoNC43Njh6TTExOS4zNzYgMTUuOTAyaC00Ljk1OHYxOS42NDRoNC45NTh6TTExOS4zNzYgNy4xM2gtNC45NTh2NS44NDhoNC45NTh6TTE0My45NzkgNy4xM3YyOC40MTZoLTQuNzY4bC0uMTI3LTIuOTg4YTguMyA4LjMgMCAwIDEtMi42NyAyLjQ4Yy0xLjA4MS41NzItMi40MTYuODktMy45NDIuODktMS4zMzUgMC0yLjYwNi0uMjU1LTMuNjg3LS43LTEuMTQ0LS41MDgtMi4xNjItMS4xNDQtMi45ODgtMi4wMzRhOS42IDkuNiAwIDAgMS0xLjk3MS0zLjE3OWMtLjUwOC0xLjIwNy0uNjk5LTIuNjA2LS42OTktNC4xMzJzLjI1NC0yLjkyNC42OTktNC4xOTZjLjUwOS0xLjI3MSAxLjE0NS0yLjM1MiAxLjk3MS0zLjI0MnMxLjg0NC0xLjU4OSAyLjk4OC0yLjA5OCAyLjM1Mi0uNzYzIDMuNjg3LS43NjNjMS41MjYgMCAyLjc5Ny4yNTUgMy44NzguODI3czEuOTcxIDEuMzM1IDIuNjcgMi40MTZWNy4xOTNoNC45NTl6bS0xMC40MjYgMjQuNTM4YzEuNjUzIDAgMi45MjQtLjU3MiAzLjk0MS0xLjY1M3MxLjUyNi0yLjU0MyAxLjUyNi00LjMyMy0uNTA5LTMuMTc4LTEuNTI2LTQuMzIyYy0xLjAxNy0xLjA4MS0yLjI4OC0xLjY1My0zLjk0MS0xLjY1My0xLjU5IDAtMi45MjUuNTcyLTMuODc4IDEuNjUzLTEuMDE3IDEuMDgtMS41MjYgMi41NDMtMS41MjYgNC4zMjIgMCAxLjc4LjUwOSAzLjE4IDEuNTI2IDQuMjYgMS4wMTcgMS4xNDQgMi4yODggMS43MTYgMy44NzggMS43MTZNNTcuMjAyIDIwLjM1M0g0NC45MzN2NC4yNTloNi45OTNjLS4xOSAyLjE2MS0xLjAxNyAzLjgxNC0yLjQxNiA1LjE1LTEuMzk4IDEuMjctMy4xNzggMS45MDYtNS40NjcgMS45MDYtMS4yNzEgMC0yLjQ4LS4yNTQtMy40OTYtLjY5OWE3IDcgMCAwIDEtMi43MzQtMS45N2MtLjc2My0uODI3LTEuMzM1LTEuODQ0LTEuNzgtMy4wNTJzLS42MzYtMi40OC0uNjM2LTMuOTQyLjE5LTIuNzMzLjYzNi0zLjk0MWMuMzgxLTEuMjA4IDEuMDE3LTIuMTYyIDEuNzgtMy4wNTIuNzYzLS44MjYgMS42NTMtMS40NjIgMi43MzMtMS45N2E5LjEgOS4xIDAgMCAxIDMuNTYtLjdxNC4wMDUgMCA2LjEwMyAxLjkwN2wzLjMwNi0zLjMwNWMtMi40OC0xLjkwNy01LjY1OC0yLjkyNS05LjQwOS0yLjkyNS0yLjA5NyAwLTQuMDA0LjMxOC01LjcyMSAxLjAxOC0xLjcxNi42OTktMy4xNzkgMS41ODktNC4zODYgMi43OTdBMTIuMSAxMi4xIDAgMCAwIDMxLjIgMTYuMjJjLS42MzUgMS43MTctLjk1MyAzLjYyNC0uOTUzIDUuNjU4cy4zMTggMy45NDIgMS4wMTcgNS42NThjLjcgMS43MTcgMS41OSAzLjE3OSAyLjc5NyA0LjM4N2ExMi4xIDEyLjEgMCAwIDAgNC4zODcgMi43OTdjMS43MTYuNyAzLjYyMyAxLjAxNyA1LjY1NyAxLjAxNyAyLjAzNSAwIDMuODc4LS4zMTggNS41MzEtMS4wMTcgMS42NTMtLjcgMy4wNTItMS41OSA0LjE5Ni0yLjc5N3ExLjcxNi0xLjgxMiAyLjY3LTQuMzg3Yy42MzYtMS43MTYuOTU0LTMuNjIzLjk1NC01LjY1OHYtLjgyNmMtLjE5MS0uMTI3LS4yNTUtLjQ0NS0uMjU1LS43TTk1Ljk4MiAyMC4zNTNoLTEyLjI3djQuMjU5aDYuOTkzYy0uMTkgMi4xNjEtMS4wMTcgMy44MTQtMi40MTYgNS4xNS0xLjM5OCAxLjI3LTMuMTc4IDEuOTA2LTUuNDY3IDEuOTA2LTEuMjcxIDAtMi40OC0uMjU0LTMuNDk2LS42OTlhNyA3IDAgMCAxLTIuNzM0LTEuOTdjLS43NjMtLjgyNy0xLjMzNS0xLjg0NC0xLjc4LTMuMDUycy0uNjM2LTIuNDgtLjYzNi0zLjk0Mi4xOS0yLjczMy42MzYtMy45NDFjLjM4MS0xLjIwOCAxLjAxNy0yLjE2MiAxLjc4LTMuMDUyLjc2My0uODI2IDEuNjUzLTEuNDYyIDIuNzM0LTEuOTdhOS4xIDkuMSAwIDAgMSAzLjU2LS43cTQuMDA1IDAgNi4xMDMgMS45MDdsMy4zMDUtMy4zMDVjLTIuNDc5LTEuOTA3LTUuNjU4LTIuOTI1LTkuNDA4LTIuOTI1LTIuMDk4IDAtNC4wMDUuMzE4LTUuNzIyIDEuMDE4LTEuNzE2LjY5OS0zLjE3OCAxLjU4OS00LjM4NiAyLjc5N2ExMi4xIDEyLjEgMCAwIDAtMi43OTcgNC4zODZjLS42MzYgMS43MTctLjk1NCAzLjYyNC0uOTU0IDUuNjU4cy4zMTggMy45NDIgMS4wMTcgNS42NThjLjcgMS43MTcgMS41OSAzLjE3OSAyLjc5NyA0LjM4N2ExMi4xIDEyLjEgMCAwIDAgNC4zODcgMi43OTdjMS43MTYuNyAzLjYyMyAxLjAxNyA1LjY1OCAxLjAxNyAyLjAzNCAwIDMuODc4LS4zMTggNS41My0xLjAxNyAxLjY1My0uNyAzLjA1Mi0xLjU5IDQuMTk2LTIuNzk3cTEuNzE4LTEuODEyIDIuNjctNC4zODdjLjYzNi0xLjcxNi45NTQtMy42MjMuOTU0LTUuNjU4di0uODI2Yy0uMTktLjEyNy0uMjU1LS40NDUtLjI1NS0uNyIvPjwvc3ZnPg==");background-repeat:no-repeat;background-size:170px 40px;content:"";display:block;height:40px;width:170px}}:where(.ag-ltr) .ag-watermark{right:25px}:where(.ag-rtl) .ag-watermark{left:25px}.ag-watermark-text{font-family:Impact,sans-serif;font-size:19px;font-weight:700;opacity:.5}:where(.ag-ltr) .ag-watermark-text{padding-left:.7rem}:where(.ag-rtl) .ag-watermark-text{padding-right:.7rem}',ux={tag:"div",cls:"ag-watermark",children:[{tag:"div",ref:"eLicenseTextRef",cls:"ag-watermark-text"}]},hx=class extends pe{constructor(){super(ux),this.eLicenseTextRef=O,this.registerCSS(cx)}wireBeans(e){this.licenseManager=e.licenseManager}postConstruct(){const e=this.shouldDisplayWatermark();this.setDisplayed(e),e&&(this.eLicenseTextRef.textContent=this.licenseManager.getWatermarkMessage(),window.setTimeout(()=>this.addCssClass("ag-opacity-zero"),0),window.setTimeout(()=>this.setDisplayed(!1),5e3))}shouldDisplayWatermark(){return this.licenseManager.isDisplayWatermark()}},px={selector:"AG-WATERMARK",component:hx},lh=class extends M{constructor(){super(...arguments),this.beanName="licenseManager"}postConstruct(){this.validateLicense()}validateLicense(){this.licenseManager=new Ps(Le(this.beans)),this.licenseManager.validateLicense()}static getLicenseDetails(e){return new Ps(null).getLicenseDetails(e)}getWatermarkSelector(){return px}isDisplayWatermark(){return this.licenseManager.isDisplayWatermark()}getWatermarkMessage(){return this.licenseManager.getWatermarkMessage()}static setLicenseKey(e){Ps.setLicenseKey(e)}static setChartsLicenseManager(e){Ps.setChartsLicenseManager(e)}},Ne="33.2.4",Rt={moduleName:"EnterpriseCore",version:Ne,beans:[lh],icons:{accordionOpen:"tree-open",accordionClosed:"tree-closed",accordionIndeterminate:"tree-indeterminate",close:"cross",cancel:"cancel",maximize:"maximize",minimize:"minimize",columnDrag:"grip"},dependsOn:[]},gx=".ag-panel{background-color:var(--ag-panel-background-color);display:flex;flex-direction:column;overflow:hidden;position:relative}.ag-dialog{border:var(--ag-dialog-border);border-radius:var(--ag-border-radius);box-shadow:var(--ag-dialog-shadow);position:absolute}.ag-panel-title-bar{align-items:center;background-color:var(--ag-panel-title-bar-background-color);border-bottom:var(--ag-panel-title-bar-border);color:var(--ag-panel-title-bar-text-color);cursor:default;display:flex;flex:none;font-weight:var(--ag-panel-title-bar-font-weight);height:var(--ag-header-height);padding:var(--ag-spacing) var(--ag-cell-horizontal-padding)}.ag-panel-title-bar-button{color:var(--ag-panel-title-bar-icon-color);cursor:pointer}:where(.ag-ltr) .ag-panel-title-bar-button{margin-left:calc(var(--ag-spacing)*2);margin-right:var(--ag-spacing)}:where(.ag-rtl) .ag-panel-title-bar-button{margin-left:var(--ag-spacing);margin-right:calc(var(--ag-spacing)*2)}.ag-panel-title-bar-title{flex:1 1 auto}.ag-panel-title-bar-buttons{display:flex}.ag-panel-content-wrapper{display:flex;flex:1 1 auto;overflow:hidden;position:relative}:where(.ag-dragging-fill-handle) .ag-dialog,:where(.ag-dragging-range-handle) .ag-dialog{opacity:.7;pointer-events:none}";function fx(e){const t=e.cssIdentifier||"default";return{tag:"div",cls:`ag-panel ag-${t}-panel`,attrs:{tabindex:"-1"},children:[{tag:"div",ref:"eTitleBar",cls:`ag-panel-title-bar ag-${t}-panel-title-bar ag-unselectable`,children:[{tag:"span",ref:"eTitle",cls:`ag-panel-title-bar-title ag-${t}-panel-title-bar-title`},{tag:"div",ref:"eTitleBarButtons",cls:`ag-panel-title-bar-buttons ag-${t}-panel-title-bar-buttons`}]},{tag:"div",ref:"eContentWrapper",cls:`ag-panel-content-wrapper ag-${t}-panel-content-wrapper`}]}}var mx=class extends pe{constructor(e){super(fx(e)),this.config=e,this.closable=!0,this.eContentWrapper=O,this.eTitleBar=O,this.eTitleBarButtons=O,this.eTitle=O,this.registerCSS(gx)}postConstruct(){const{component:e,closable:t,hideTitleBar:o,title:i,minWidth:s=250,width:n,minHeight:r=250,height:a,centered:l,popup:d,x:c,y:u}=this.config;this.positionableFeature=new Ma(this.getGui(),{minWidth:s,width:n,minHeight:r,height:a,centered:l,x:c,y:u,popup:d,calculateTopBuffer:()=>this.positionableFeature.getHeight()-this.getBodyHeight()}),this.createManagedBean(this.positionableFeature);const p=this.getGui();e&&this.setBodyComponent(e),o?he(this.eTitleBar,!1):(i&&this.setTitle(i),this.setClosable(t??this.closable)),this.addManagedElementListeners(this.eTitleBar,{mousedown:g=>{if(p.contains(g.relatedTarget)||p.contains(Ee(this.beans))||this.eTitleBarButtons.contains(g.target)){g.preventDefault();return}const f=this.eContentWrapper.querySelector("button, [href], input, select, textarea, [tabindex]");f&&f.focus()}}),!(d&&this.positionableFeature.isPositioned())&&(this.renderComponent&&this.renderComponent(),this.positionableFeature.initialisePosition(),this.eContentWrapper.style.height="0")}renderComponent(){const e=this.getGui();e.focus(),this.close=()=>{e.parentElement.removeChild(e),this.destroy()}}getHeight(){return this.positionableFeature.getHeight()}setHeight(e){this.positionableFeature.setHeight(e)}getWidth(){return this.positionableFeature.getWidth()}setWidth(e){this.positionableFeature.setWidth(e)}setClosable(e){if(e!==this.closable&&(this.closable=e),e){const t=this.closeButtonComp=new pe({tag:"div",cls:"ag-button"});this.createBean(t);const o=t.getGui(),i=oe("close",this.beans);i.classList.add("ag-panel-title-bar-button-icon"),o.appendChild(i),this.addTitleBarButton(t),t.addManagedElementListeners(o,{click:this.onBtClose.bind(this)})}else if(this.closeButtonComp){const t=this.closeButtonComp.getGui();t.parentElement.removeChild(t),this.closeButtonComp=this.destroyBean(this.closeButtonComp)}}setBodyComponent(e){e.setParentComponent(this),this.eContentWrapper.appendChild(e.getGui())}addTitleBarButton(e,t){const o=this.eTitleBarButtons,i=o.children,s=i.length;t==null&&(t=s),t=Math.max(0,Math.min(t,s)),e.addCssClass("ag-panel-title-bar-button");const n=e.getGui();t===0?o.insertAdjacentElement("afterbegin",n):t===s?o.insertAdjacentElement("beforeend",n):i[t-1].insertAdjacentElement("afterend",n),e.setParentComponent(this)}getBodyHeight(){return Mn(this.eContentWrapper)}getBodyWidth(){return Qi(this.eContentWrapper)}setTitle(e){this.eTitle.innerText=e}onBtClose(){this.close()}destroy(){this.closeButtonComp&&(this.closeButtonComp=this.destroyBean(this.closeButtonComp));const e=this.getGui();e&&ht(e)&&this.close(),super.destroy()}},Cx=class extends mx{constructor(e){super({...e,popup:!0}),this.isMaximizable=!1,this.isMaximized=!1,this.maximizeListeners=[],this.resizeListenerDestroy=null,this.lastPosition={x:0,y:0,width:0,height:0}}wireBeans(e){this.popupSvc=e.popupSvc}postConstruct(){const e=this.getGui(),{movable:t,resizable:o,maximizable:i,modal:s,postProcessPopupParams:n}=this.config;if(this.addCssClass("ag-dialog"),super.postConstruct(),n){const{type:r,eventSource:a,column:l,mouseEvent:d,rowNode:c}=n;this.popupSvc?.callPostProcessPopup(r,e,a,d,l,c)}if(this.tabGuardFeature=this.createManagedBean(new bu(this)),this.tabGuardFeature.initialiseTabGuard({isFocusableContainer:!0,onFocusIn:()=>{this.popupSvc?.bringPopupToFront(e)},onTabKeyDown:r=>{if(s)return;const a=r.shiftKey,l=Kt(this.beans,e,!1,a);(!l||this.tabGuardFeature.getTabGuardCtrl().isTabGuard(l))&&$o(this.beans,a)&&r.preventDefault()}}),t&&this.setMovable(t),i&&this.setMaximizable(i),o&&this.setResizable(o),!this.config.modal){const r=this.beans.ctrlsSvc.get("gridCtrl");r.addFocusableContainer(this),this.addDestroyFunc(()=>r.removeFocusableContainer(this))}}setAllowFocus(e){this.tabGuardFeature.getTabGuardCtrl().setAllowFocus(e)}renderComponent(){const e=this.getGui(),{alwaysOnTop:t,modal:o,title:i,afterGuiAttached:s}=this.config,n=this.getLocaleTextFunc(),r=this.popupSvc?.addPopup({modal:o,eChild:e,closeOnEsc:!0,closedCallback:this.onClosed.bind(this),alwaysOnTop:t,ariaLabel:i||n("ariaLabelDialog","Dialog"),afterGuiAttached:s});r&&(this.close=r.hideFunc)}onClosed(e){this.destroy(),this.config.closedCallback?.(e)}toggleMaximize(){const e=this.positionableFeature.getPosition();if(this.isMaximized){const{x:t,y:o,width:i,height:s}=this.lastPosition;this.setWidth(i),this.setHeight(s),this.positionableFeature.offsetElement(t,o)}else this.lastPosition.width=this.getWidth(),this.lastPosition.height=this.getHeight(),this.lastPosition.x=e.x,this.lastPosition.y=e.y,this.positionableFeature.offsetElement(0,0),this.setHeight("100%"),this.setWidth("100%");this.isMaximized=!this.isMaximized,this.refreshMaximizeIcon()}refreshMaximizeIcon(){he(this.maximizeIcon,!this.isMaximized),he(this.minimizeIcon,this.isMaximized)}clearMaximizebleListeners(){this.maximizeListeners.length&&(this.maximizeListeners.forEach(e=>e()),this.maximizeListeners.length=0),this.resizeListenerDestroy&&(this.resizeListenerDestroy(),this.resizeListenerDestroy=null)}destroy(){this.maximizeButtonComp=this.destroyBean(this.maximizeButtonComp),this.clearMaximizebleListeners(),super.destroy()}setResizable(e){this.positionableFeature.setResizable(e)}setMovable(e){this.positionableFeature.setMovable(e,this.eTitleBar)}setMaximizable(e){if(!e){this.clearMaximizebleListeners(),this.maximizeButtonComp&&(this.destroyBean(this.maximizeButtonComp),this.maximizeButtonComp=this.maximizeIcon=this.minimizeIcon=void 0);return}const t=this.eTitleBar;if(!t||e===this.isMaximizable)return;const o=this.buildMaximizeAndMinimizeElements();this.refreshMaximizeIcon(),o.addManagedElementListeners(o.getGui(),{click:this.toggleMaximize.bind(this)}),this.addTitleBarButton(o,0),this.maximizeListeners.push(...this.addManagedElementListeners(t,{dblclick:this.toggleMaximize.bind(this)})),[this.resizeListenerDestroy]=this.addManagedListeners(this.positionableFeature,{resize:()=>{this.isMaximized=!1,this.refreshMaximizeIcon()}})}buildMaximizeAndMinimizeElements(){const e=this.maximizeButtonComp=this.createBean(new pe({tag:"div",cls:"ag-dialog-button"})),t=e.getGui();return this.maximizeIcon=oe("maximize",this.beans),t.appendChild(this.maximizeIcon),this.maximizeIcon.classList.add("ag-panel-title-bar-button-icon"),this.minimizeIcon=oe("minimize",this.beans),t.appendChild(this.minimizeIcon),this.minimizeIcon.classList.add("ag-panel-title-bar-button-icon"),e}};function vx(e){return{tag:"div",cls:`ag-virtual-list-viewport ag-${e}-virtual-list-viewport`,role:"presentation",children:[{tag:"div",ref:"eContainer",cls:`ag-virtual-list-container ag-${e}-virtual-list-container`}]}}var dh=class extends bi{constructor(e){super(vx(e?.cssIdentifier||"default")),this.renderedRows=new Map,this.rowHeight=20,this.pageSize=-1,this.isScrolling=!1,this.isHeightFromTheme=!0,this.eContainer=O,this.awaitStableCallbacks=[];const{cssIdentifier:t="default",ariaRole:o="listbox",listName:i,moveItemCallback:s}=e||{};this.cssIdentifier=t,this.ariaRole=o,this.listName=i,this.moveItemCallback=s}wireBeans(e){this.environment=e.environment}postConstruct(){this.addScrollListener(),this.rowHeight=this.getItemHeight(),this.addResizeObserver(),this.initialiseTabGuard({onFocusIn:e=>this.onFocusIn(e),onFocusOut:e=>this.onFocusOut(e),focusInnerElement:e=>this.focusInnerElement(e),onTabKeyDown:e=>this.onTabKeyDown(e),handleKeyDown:e=>this.handleKeyDown(e)}),this.refreshAriaProperties(),this.addManagedEventListeners({gridStylesChanged:this.onGridStylesChanged.bind(this)})}onGridStylesChanged(e){e.listItemHeightChanged&&(this.rowHeight=this.getItemHeight(),this.refresh())}refreshAriaProperties(){const t=this.getLocaleTextFunc()("ariaDefaultListName",this.listName||"List"),o=this.eContainer;qe(o,this.model?.getRowCount()>0?this.ariaRole:"presentation"),ut(o,t)}addResizeObserver(){const e=()=>Tt(this.beans,()=>this.drawVirtualRows()),t=bo(this.beans,this.getGui(),e);this.addDestroyFunc(t)}focusInnerElement(e){return this.focusRow(e?this.model.getRowCount()-1:0),!0}onFocusIn(e){const t=e.target;t.classList.contains("ag-virtual-list-item")&&(this.lastFocusedRowIndex=cp(t)-1)}onFocusOut(e){this.getFocusableElement().contains(e.relatedTarget)||(this.lastFocusedRowIndex=null)}handleKeyDown(e){const{key:t,shiftKey:o}=e;switch(t){case D.UP:case D.DOWN:{const i=t===D.UP;e.preventDefault(),o?this.moveItem(i):this.navigate(i)}break;case D.PAGE_HOME:case D.PAGE_END:case D.PAGE_UP:case D.PAGE_DOWN:this.navigateToPage(t)!==null&&e.preventDefault();break}}onTabKeyDown(e){oo(e),this.forceFocusOutOfContainer(e.shiftKey)}getNextRow(e){if(this.lastFocusedRowIndex==null)return;const t=this.lastFocusedRowIndex+(e?-1:1);if(!(t<0||t>=this.model.getRowCount()))return t}moveItem(e){if(!this.moveItemCallback)return;const t=this.getComponentAt(this.lastFocusedRowIndex);t&&this.moveItemCallback(t,e)}navigate(e){const t=this.getNextRow(e);t!==void 0&&this.focusRow(t)}navigateToPage(e,t="focused"){let o=!1;t==="focused"&&(t=this.getLastFocusedRow(),o=!0);const i=this.model.getRowCount()-1;let s=-1;return e===D.PAGE_HOME?s=0:e===D.PAGE_END?s=i:e===D.PAGE_DOWN?s=Math.min(t+this.pageSize,i):e===D.PAGE_UP&&(s=Math.max(t-this.pageSize,0)),s===-1?null:(o?this.focusRow(s):this.ensureIndexVisible(s),s)}getLastFocusedRow(){return this.lastFocusedRowIndex}focusRow(e){this.isScrolling||(this.isScrolling=!0,this.ensureIndexVisible(e),Tt(this.beans,()=>{if(this.isScrolling=!1,!this.isAlive())return;const t=this.renderedRows.get(e);t&&t.eDiv.focus()}))}getComponentAt(e){const t=this.renderedRows.get(e);return t&&t.rowComponent}forEachRenderedRow(e){this.renderedRows.forEach((t,o)=>e(t.rowComponent,o))}getItemHeight(){return this.isHeightFromTheme?this.environment.getDefaultListItemHeight():this.rowHeight}ensureIndexVisible(e,t=!0){const o=this.model.getRowCount();if(typeof e!="number"||e<0||e>=o)return _(229,{index:e}),!1;const i=e*this.rowHeight,s=i+this.rowHeight,n=this.getGui(),r=n.scrollTop,a=n.offsetHeight,l=r+a,d=t?0:this.rowHeight,c=r>i+d,u=l<s-d;if(c)return n.scrollTop=i,!0;if(u){const p=s-a;return n.scrollTop=p,!0}return!1}setComponentCreator(e){this.componentCreator=e}setComponentUpdater(e){this.componentUpdater=e}getRowHeight(){return this.rowHeight}getScrollTop(){return this.getGui().scrollTop}setRowHeight(e){this.isHeightFromTheme=!1,this.rowHeight=e,this.refresh()}refresh(e){if(this.model==null||!this.isAlive())return;const t=this.model.getRowCount();this.eContainer.style.height=`${t*this.rowHeight}px`,this.refreshAriaProperties(),this.awaitStable(()=>{this.isAlive()&&(this.canSoftRefresh(e)?this.drawVirtualRows(!0):(this.clearVirtualRows(),this.drawVirtualRows()))})}awaitStable(e){if(this.awaitStableCallbacks.push(e),this.awaitStableCallbacks.length>1)return;const t=this.model.getRowCount();nc(()=>this.eContainer.clientHeight>=t*this.rowHeight,()=>{if(!this.isAlive())return;const o=this.awaitStableCallbacks;this.awaitStableCallbacks=[],o.forEach(i=>i())})}canSoftRefresh(e){return!!(e&&this.renderedRows.size&&typeof this.model.areRowsEqual=="function"&&this.componentUpdater)}clearVirtualRows(){this.renderedRows.forEach((e,t)=>this.removeRow(t))}drawVirtualRows(e){if(!this.isAlive()||!this.model)return;const t=this.getGui(),o=t.scrollTop,i=o+t.offsetHeight;if(o===i)this.clearVirtualRows();else{const s=Math.floor(o/this.rowHeight),n=Math.floor(i/this.rowHeight);this.pageSize=Math.floor((i-o)/this.rowHeight),this.ensureRowsRendered(s,n,e)}}ensureRowsRendered(e,t,o){this.renderedRows.forEach((i,s)=>{(s<e||s>t)&&s!==this.lastFocusedRowIndex&&this.removeRow(s)}),o&&this.refreshRows();for(let i=e;i<=t;i++)this.renderedRows.has(i)||i<this.model.getRowCount()&&this.insertRow(i)}insertRow(e){const t=this.model.getRow(e),o=this.ariaRole==="tree"?"treeitem":"option",i=Pe({tag:"div",cls:`ag-virtual-list-item ag-${this.cssIdentifier}-virtual-list-item`,role:o,attrs:{tabindex:"-1"}});_d(i,this.model.getRowCount()),zd(i,e+1),i.style.height=`${this.rowHeight}px`,i.style.top=`${this.rowHeight*e}px`;const s=this.componentCreator(t,i);s.addGuiEventListener("focusin",()=>this.lastFocusedRowIndex=e),i.appendChild(s.getGui()),this.renderedRows.has(e-1)?this.renderedRows.get(e-1).eDiv.insertAdjacentElement("afterend",i):this.renderedRows.has(e+1)?this.renderedRows.get(e+1).eDiv.insertAdjacentElement("beforebegin",i):this.eContainer.appendChild(i),this.renderedRows.set(e,{rowComponent:s,eDiv:i,value:t})}removeRow(e){const t=this.renderedRows.get(e);this.eContainer.removeChild(t.eDiv),this.destroyBean(t.rowComponent),this.renderedRows.delete(e)}refreshRows(){const e=this.model.getRowCount();this.renderedRows.forEach((t,o)=>{if(o>=e)this.removeRow(o);else{const i=this.model.getRow(o);this.model.areRowsEqual?.(t.value,i)?this.componentUpdater(i,t.rowComponent):this.removeRow(o)}})}addScrollListener(){this.addGuiEventListener("scroll",()=>this.drawVirtualRows(),{passive:!0})}setModel(e){this.model=e}getAriaElement(){return this.eContainer}destroy(){this.isAlive()&&(this.clearVirtualRows(),this.awaitStableCallbacks.length=0,super.destroy())}},pr="ag-list-item-hovered",wx=class extends M{constructor(e,t,o){super(),this.comp=e,this.virtualList=t,this.params=o,this.currentDragValue=null,this.lastHoveredListItem=null}wireBeans(e){this.dragAndDrop=e.dragAndDrop}postConstruct(){this.addManagedListeners(this.params.eventSource,{[this.params.listItemDragStartEvent]:this.listItemDragStart.bind(this),[this.params.listItemDragEndEvent]:this.listItemDragEnd.bind(this)}),this.createDropTarget(),this.createAutoScrollService()}listItemDragStart(e){this.currentDragValue=this.params.getCurrentDragValue(e),this.moveBlocked=this.params.isMoveBlocked(this.currentDragValue)}listItemDragEnd(){window.setTimeout(()=>{this.currentDragValue=null,this.moveBlocked=!1},10)}createDropTarget(){const e={isInterestedIn:t=>t===this.params.dragSourceType,getIconName:()=>this.moveBlocked?"pinned":"move",getContainer:()=>this.comp.getGui(),onDragging:t=>this.onDragging(t),onDragStop:()=>this.onDragStop(),onDragLeave:()=>this.onDragLeave(),onDragCancel:()=>this.onDragCancel()};this.dragAndDrop?.addDropTarget(e)}createAutoScrollService(){const e=this.virtualList.getGui();this.autoScrollService=new zf({scrollContainer:e,scrollAxis:"y",getVerticalPosition:()=>e.scrollTop,setVerticalPosition:t=>e.scrollTop=t})}onDragging(e){if(!this.currentDragValue||this.moveBlocked)return;const t=this.getListDragItem(e),o=this.virtualList.getComponentAt(t.rowIndex);if(!o)return;const i=o.getGui().parentElement;this.lastHoveredListItem&&this.lastHoveredListItem.rowIndex===t.rowIndex&&this.lastHoveredListItem.position===t.position||(this.autoScrollService.check(e.event),this.clearHoveredItems(),this.lastHoveredListItem=t,rl(i,pr),rl(i,`ag-item-highlight-${t.position}`))}getListDragItem(e){const t=this.virtualList.getGui(),o=parseFloat(window.getComputedStyle(t).paddingTop),i=this.virtualList.getRowHeight(),s=this.virtualList.getScrollTop(),n=Math.max(0,(e.y-o+s)/i),r=this.params.getNumRows(this.comp)-1,a=Math.min(r,n)|0;return{rowIndex:a,position:Math.round(n)>n||n>r?"bottom":"top",component:this.virtualList.getComponentAt(a)}}onDragStop(){this.moveBlocked||(this.params.moveItem(this.currentDragValue,this.lastHoveredListItem),this.clearDragProperties())}onDragCancel(){this.clearDragProperties()}onDragLeave(){this.clearDragProperties()}clearDragProperties(){this.clearHoveredItems(),this.autoScrollService.ensureCleared()}clearHoveredItems(){this.virtualList.getGui().querySelectorAll(`.${pr}`).forEach(t=>{[pr,"ag-item-highlight-top","ag-item-highlight-bottom"].forEach(o=>{t.classList.remove(o)})}),this.lastHoveredListItem=null}};function Xl(e,t){if(!t)return null;const o=Ho(e),i=o.indexOf(t);if(i===-1)return null;let s=-1;for(let n=i-1;n>=0;n--)if(o[n].classList.contains(Vs.TAB_GUARD_TOP)){s=n;break}return s<=0?null:o[s-1]}function Sx(e,t){if(!t)return!1;const o=e.querySelectorAll(`.${au}`);if(!o.length)return!1;for(let i=0;i<o.length;i++)if(o[i].contains(t))return!0;return!1}var yx={tag:"div"},bx=class extends pe{constructor(){super(yx)}init(e){this.params=e,this.cssClassPrefix=this.params.cssClassPrefix??"ag-menu-option",this.addAriaAttributes(),this.addIcon(),this.addName(),this.addShortcut(),this.addSubMenu()}configureDefaults(){return!0}addAriaAttributes(){const{checked:e,subMenu:t}=this.params,o=this.getGui();e&&$d(o,e),t&&to(o,!1)}addIcon(){if(this.params.isCompact)return;const e=Pe({tag:"span",ref:"eIcon",cls:`${this.getClassName("part")} ${this.getClassName("icon")}`,role:"presentation"}),{checked:t,icon:o}=this.params;t?e.appendChild(oe("check",this.beans)):o&&(En(o)?e.appendChild(o):typeof o=="string"?e.innerHTML=o:_(227)),this.getGui().appendChild(e)}addName(){const e=Pe({tag:"span",ref:"eName",cls:`${this.getClassName("part")} ${this.getClassName("text")}`,children:this.params.name||""});this.getGui().appendChild(e)}addShortcut(){if(this.params.isCompact)return;const e=Pe({tag:"span",ref:"eShortcut",cls:`${this.getClassName("part")} ${this.getClassName("shortcut")}`,children:this.params.shortcut||""});this.getGui().appendChild(e)}addSubMenu(){const e=Pe({tag:"span",ref:"ePopupPointer",cls:`${this.getClassName("part")} ${this.getClassName("popup-pointer")}`}),t=this.getGui();if(this.params.subMenu){const o=this.gos.get("enableRtl")?"subMenuOpenRtl":"subMenuOpen";e.appendChild(oe(o,this.beans))}t.appendChild(e)}getClassName(e){return`${this.cssClassPrefix}-${e}`}},Rx='.ag-menu-list{cursor:default;display:table;padding:var(--ag-spacing) 0;width:100%}.ag-menu-option,.ag-menu-separator{display:table-row}.ag-menu-option-part,.ag-menu-separator-part{display:table-cell;vertical-align:middle}.ag-menu-option{cursor:pointer;font-weight:500}:where(.ag-ltr) :where(.ag-menu-option-popup-pointer) .ag-icon{text-align:right}:where(.ag-rtl) :where(.ag-menu-option-popup-pointer) .ag-icon{text-align:left}.ag-menu-option-text{white-space:nowrap}.ag-menu-option-custom{display:contents}.ag-compact-menu-option{display:flex;flex-wrap:nowrap;width:100%}.ag-compact-menu-option-text{flex:1 1 auto;white-space:nowrap}.ag-menu-separator{height:calc(var(--ag-spacing)*2 + 1px)}.ag-menu-separator-part:after{border-top:1px solid var(--ag-menu-separator-color);content:"";display:block}.ag-compact-menu-option-active,.ag-menu-option-active{background-color:var(--ag-row-hover-color)}.ag-compact-menu-option-part,.ag-menu-option-part{line-height:var(--ag-icon-size);padding:calc(var(--ag-spacing) + 2px) 0}.ag-compact-menu-option-disabled,.ag-menu-option-disabled{cursor:not-allowed;opacity:.5}.ag-compact-menu-option-icon,.ag-menu-option-icon{width:var(--ag-icon-size)}:where(.ag-ltr) .ag-compact-menu-option-icon,:where(.ag-ltr) .ag-menu-option-icon{padding-left:calc(var(--ag-spacing)*2)}:where(.ag-rtl) .ag-compact-menu-option-icon,:where(.ag-rtl) .ag-menu-option-icon{padding-right:calc(var(--ag-spacing)*2)}.ag-compact-menu-option-text,.ag-menu-option-text{padding-left:calc(var(--ag-spacing)*2);padding-right:calc(var(--ag-spacing)*2)}:where(.ag-ltr) .ag-compact-menu-option-shortcut,:where(.ag-ltr) .ag-menu-option-shortcut{padding-right:var(--ag-spacing)}:where(.ag-rtl) .ag-compact-menu-option-shortcut,:where(.ag-rtl) .ag-menu-option-shortcut{padding-left:var(--ag-spacing)}:where(.ag-ltr) .ag-compact-menu-option-popup-pointer,:where(.ag-ltr) .ag-menu-option-popup-pointer{padding-right:var(--ag-spacing)}:where(.ag-rtl) .ag-compact-menu-option-popup-pointer,:where(.ag-rtl) .ag-menu-option-popup-pointer{padding-left:var(--ag-spacing)}.ag-menu-column-select-wrapper{height:265px;overflow:auto;:where(.ag-column-select){height:100%}}.ag-menu:where(.ag-tabs){min-width:290px}.ag-context-menu-loading-icon{pointer-events:none;position:absolute}',Fx={moduleName:"MenuItem",version:Ne,userComponents:{agMenuItem:bx},icons:{check:"tick",subMenuOpen:"small-right",subMenuOpenRtl:"small-left"},css:[Rx]},xx=".ag-column-select{display:flex;flex:3 1 0px;flex-direction:column;overflow:hidden;position:relative}.ag-column-select-header{align-items:center;display:flex;flex:none;gap:var(--ag-widget-horizontal-spacing);height:var(--ag-header-height);padding-left:var(--ag-widget-container-horizontal-padding);padding-right:var(--ag-widget-container-horizontal-padding);position:relative}.ag-column-select-column,.ag-column-select-column-group{align-items:center;display:flex;gap:var(--ag-widget-horizontal-spacing);height:100%;position:relative;&:where(:not(:last-child)){margin-bottom:var(--ag-widget-vertical-spacing)}}:where(.ag-ltr) .ag-column-select-column,:where(.ag-ltr) .ag-column-select-column-group{padding-left:calc(var(--ag-indentation-level)*var(--ag-column-select-indent-size))}:where(.ag-rtl) .ag-column-select-column,:where(.ag-rtl) .ag-column-select-column-group{padding-right:calc(var(--ag-indentation-level)*var(--ag-column-select-indent-size))}.ag-column-select-header-icon{border-radius:var(--ag-border-radius);cursor:pointer;height:var(--ag-icon-size);position:relative;width:var(--ag-icon-size);&:focus-visible{box-shadow:var(--ag-focus-shadow)}}.ag-column-select-header-filter-wrapper{flex:1 1 auto}.ag-column-select-header-filter{width:100%}.ag-column-select-list{flex:1 1 0px;overflow:hidden}:where(.ag-ltr) .ag-column-select-add-group-indent{margin-left:calc(var(--ag-icon-size) + var(--ag-spacing)*1.5)}:where(.ag-rtl) .ag-column-select-add-group-indent{margin-right:calc(var(--ag-icon-size) + var(--ag-spacing)*1.5)}.ag-column-select-column-group-readonly,.ag-column-select-column-readonly{opacity:.5;pointer-events:none}.ag-column-select-virtual-list-viewport{padding:calc(var(--ag-widget-container-vertical-padding)*.5) 0}.ag-column-select-virtual-list-item{padding:0 var(--ag-widget-container-horizontal-padding)}.ag-column-select-column-label{flex:1 1 auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ag-column-select-checkbox{display:flex}",Dx=300,Mx={tag:"div",cls:"ag-column-select-header",role:"presentation",children:[{tag:"div",ref:"eExpand",cls:"ag-column-select-header-icon"},{tag:"ag-checkbox",ref:"eSelect",cls:"ag-column-select-header-checkbox"},{tag:"ag-input-text-field",ref:"eFilterTextField",cls:"ag-column-select-header-filter-wrapper"}]},Px=class extends pe{constructor(){super(Mx,[yi,Ga]),this.eExpand=O,this.eSelect=O,this.eFilterTextField=O}postConstruct(){this.createExpandIcons(),this.addManagedListeners(this.eExpand,{click:this.onExpandClicked.bind(this),keydown:t=>{t.key===D.SPACE&&(t.preventDefault(),this.onExpandClicked())}}),this.addManagedElementListeners(this.eSelect.getInputElement(),{click:this.onSelectClicked.bind(this)}),this.addManagedPropertyListener("functionsReadOnly",()=>this.onFunctionsReadOnlyPropChanged()),this.eFilterTextField.setAutoComplete(!1).onValueChange(()=>this.onFilterTextChanged()),this.addManagedEventListeners({newColumnsLoaded:this.showOrHideOptions.bind(this)});const e=this.getLocaleTextFunc();this.eSelect.setInputAriaLabel(e("ariaColumnSelectAll","Toggle All Columns Visibility")),this.eFilterTextField.setInputAriaLabel(e("ariaFilterColumnsInput","Filter Columns Input")),this.activateTabIndex([this.eExpand])}onFunctionsReadOnlyPropChanged(){const e=this.gos.get("functionsReadOnly");this.eSelect.setReadOnly(e),this.eSelect.addOrRemoveCssClass("ag-column-select-column-readonly",e)}init(e){this.params=e;const t=this.gos.get("functionsReadOnly");this.eSelect.setReadOnly(t),this.eSelect.addOrRemoveCssClass("ag-column-select-column-readonly",t),this.beans.colModel.ready&&this.showOrHideOptions()}createExpandIcons(){const e=this.beans;this.eExpand.appendChild(this.eExpandChecked=oe("columnSelectOpen",e)),this.eExpand.appendChild(this.eExpandUnchecked=oe("columnSelectClosed",e)),this.eExpand.appendChild(this.eExpandIndeterminate=oe("columnSelectIndeterminate",e)),this.setExpandState(0)}showOrHideOptions(){const e=this.params,t=!e.suppressColumnFilter,o=!e.suppressColumnSelectAll,i=!e.suppressColumnExpandAll,s=!!this.beans.colModel.colDefCols?.treeDepth,n=this.getLocaleTextFunc();this.eFilterTextField.setInputPlaceholder(n("searchOoo","Search...")),he(this.eFilterTextField.getGui(),t),he(this.eSelect.getGui(),o),he(this.eExpand,i&&s)}onFilterTextChanged(){this.onFilterTextChangedDebounced||(this.onFilterTextChangedDebounced=tt(this,()=>{const e=this.eFilterTextField.getValue();this.dispatchLocalEvent({type:"filterChanged",filterText:e})},Dx)),this.onFilterTextChangedDebounced()}onSelectClicked(){this.dispatchLocalEvent({type:this.selectState?"unselectAll":"selectAll"})}onExpandClicked(){this.dispatchLocalEvent({type:this.expandState===0?"collapseAll":"expandAll"})}setExpandState(e){this.expandState=e,he(this.eExpandChecked,e===0),he(this.eExpandUnchecked,e===1),he(this.eExpandIndeterminate,e===2)}setSelectionState(e){this.selectState=e,this.eSelect.setValue(this.selectState)}},Ex={selector:"AG-PRIMARY-COLS-HEADER",component:Px};function di(e){return!!e&&typeof e.children<"u"}function ho(e){return di(e)?e.groupId:e.colId}function ch(e,t,o){const i=(r,a)=>{const d=r.children.map(ho).includes(ho(a)),c=ve(r.children),u=c&&ho(c)!==ho(a);return d&&u};if(!di(e))return!0;const s=e,n=o;if(i(s,n)||s.groupId===t&&!s.children.map(ho).includes(ho(n)))return s.children.push(n),!0;for(let r=s.children.length-1;r>=0&&!ch(s.children[r],t,o);r--);return!1}function Ax(e){const t=(s,n)=>di(s)&&di(n)&&ho(s)===ho(n),o=(s,n)=>{if(!di(n))return s;const r=s,a=n;return a.children&&a.groupId&&ch(r,a.groupId,a.children[0])||a.children.forEach(l=>o(r,l)),r},i=[];for(let s=1;s<=e.length;s++){const n=e[s-1],r=e[s];t(n,r)?e[s]=o(n,r):i.push(n)}return i}function Tx(e,t){const o=[],i=(n,r)=>{if(di(n)){const a=n,l=typeof a.groupId<"u"?a.groupId:a.headerName,d=new Hi(a,l,!1,r),c=[];return a.children.forEach(u=>{const p=i(u,r+1);p&&c.push(p)}),d.setChildren(c),d}else{const a=n,l=a.colId?a.colId:a.field,d=e.getColDefCol(l);return d||o.push(a),d}},s=[];return t.forEach(n=>{const r=i(n,0);r&&s.push(r)}),o.length>0&&_(217,{invalidColIds:o}),s}function Ix(e,t){const o=Lx(e),i=Ax(o);t(i)}function Lx(e){const t=(s,n)=>{let r;if(Be(s))if(s.isPadding())r=n;else{const l=Object.assign({},s.getColGroupDef());l.groupId=s.getGroupId(),l.children=[n],r=l}else{const l=Object.assign({},s.getColDef());l.colId=s.getColId(),r=l}const a=s.getOriginalParent();return a?t(a,r):r};return e.getCols().filter(s=>{const n=s.getColDef();return s.isPrimary()&&!n.showRowGroup}).map(s=>t(s,s.getColDef()))}var Zl=class{constructor(e,t,o,i=!1,s){this.displayName=e,this.depth=o,this.group=i,this.localEventService=new eo,i?(this.columnGroup=t,this._expanded=s,this.children=[]):this.column=t}get expanded(){return!!this._expanded}set expanded(e){e!==this._expanded&&(this._expanded=e,this.localEventService.dispatchEvent({type:"expandedChanged"}))}addEventListener(e,t){this.localEventService.addEventListener(e,t)}removeEventListener(e,t){this.localEventService.removeEventListener(e,t)}};function uh(e,t,o,i){const s=kx(t);hh(e,s,o,i)}function hh(e,t,o,i){e.colModel.isPivotMode()?Ox(e,t,o,i):Gx(e,t,o,i)}function kx(e){const t=[],o=i=>{i.forEach(s=>{s.passesFilter&&(s.group?o(s.children):t.push(s.column))})};return o(e),t}function Gx(e,t,o,i){const s=[];t.forEach(n=>{n.getColDef().lockVisible||n.isVisible()!=o&&s.push({colId:n.getId(),hide:!o})}),s.length>0&&it(e,{state:s},i),e.selectionColSvc?.refreshVisibility(i)}function Ox(e,t,o,i){Bx(e,t,o,i)}function Bx(e,t,o,i){const s=[],a=o?l=>{if(!l.isAnyFunctionActive())if(l.isAllowValue()){const d=typeof l.getAggFunc()=="string"?l.getAggFunc():e.aggFuncSvc?.getDefaultAggFunc(l);s.push({colId:l.getId(),aggFunc:d})}else l.isAllowRowGroup()?s.push({colId:l.getId(),rowGroup:!0}):l.isAllowPivot()&&s.push({colId:l.getId(),pivot:!0})}:l=>{(l.isPivotActive()||l.isRowGroupActive()||l.isValueActive())&&s.push({colId:l.getId(),pivot:!1,rowGroup:!1,aggFunc:null})};t.forEach(a),s.length>0&&it(e,{state:s},i)}function ph(e,t){const{columns:o,visibleState:i,pivotState:s,eventType:n}=t,r=o.map(a=>{const l=a.getColId();if(e.colModel.isPivotMode()){const d=s?.[l];return{colId:l,pivot:d?.pivot,rowGroup:d?.rowGroup,aggFunc:d?.aggFunc}}else return{colId:l,hide:!i?.[l]}});it(e,{state:r},n)}function gh(e){return{pivot:e.isPivotActive(),rowGroup:e.isRowGroupActive(),aggFunc:e.isValueActive()?e.getAggFunc():void 0}}function Jl(e,t,o,i){const s=t.getCol(o);e.groupData||(e.groupData={});const n=s.getColId(),r=e.groupData[n];r!==i&&(e.groupData[n]=i,e.dispatchCellChangedEvent(s,i,r))}function Nx(e,t,o){e.group!==o&&(e.group,e.group=o,e.updateHasChildren(),t.selectionSvc?.updateRowSelectable(e),e.dispatchRowEvent("groupChanged"))}function Sn(e,t){const{gos:o,rowGroupColsSvc:i}=t;if(!i||!e)return!1;const s=o.get("groupLockGroupColumns");if(!e.isRowGroupActive()||s===0)return!1;if(s===-1)return!0;const n=i.columns.findIndex(r=>r.getColId()===e.getColId());return s>n}var Hx=class extends bi{constructor(e){super(),this.setTemplateFromElement(e.getGui(),void 0,void 0,!0)}postConstruct(){this.initialiseTabGuard({onTabKeyDown:e=>this.onTabKeyDown(e),handleKeyDown:e=>this.handleKeyDown(e)})}handleKeyDown(e){e.key===D.ESCAPE&&this.closePanel()}onTabKeyDown(e){e.defaultPrevented||(this.closePanel(),e.preventDefault())}closePanel(){const e=this.parentComponent;e.closeSubMenu(),setTimeout(()=>e.getGui().focus(),0)}};function Vx(e,t,o){return e.getCompDetails(t,_x,"agMenuItem",o,!0)}var _x={name:"menuItem",optionalMethods:["setActive","select","setExpanded","configureDefaults"]},zx={tag:"div",cls:"ag-menu",role:"presentation"},ed=class extends M{constructor(){super(...arguments),this.ACTIVATION_DELAY=80,this.isActive=!1,this.subMenuIsOpen=!1,this.subMenuIsOpening=!1,this.suppressRootStyles=!0,this.suppressAria=!0,this.suppressFocus=!0}wireBeans(e){this.popupSvc=e.popupSvc,this.userCompFactory=e.userCompFactory,this.registry=e.registry}init(e){const{menuItemDef:t,isAnotherSubMenuOpen:o,level:i,childComponent:s,contextParams:n}=e;return this.params=e.menuItemDef,this.level=i,this.isAnotherSubMenuOpen=o,this.childComponent=s,this.contextParams=n,this.cssClassPrefix=this.params.menuItemParams?.cssClassPrefix??"ag-menu-option",Vx(this.userCompFactory,this.params,Z(this.gos,{...t,level:i,isAnotherSubMenuOpen:o,openSubMenu:a=>this.openSubMenu(a),closeSubMenu:()=>this.closeSubMenu(),closeMenu:a=>this.closeMenu(a),updateTooltip:(a,l)=>this.refreshTooltip(a,l),onItemActivated:()=>this.onItemActivated()}))?.newAgStackInstance().then(a=>{this.menuItemComp=a;const l=a.configureDefaults?.();l&&this.configureDefaults(l===!0?void 0:l)})??De.resolve()}addListeners(e,t){t?.suppressClick||this.addManagedElementListeners(e,{click:o=>this.onItemSelected(o)}),t?.suppressKeyboardSelect||this.addManagedElementListeners(e,{keydown:o=>{(o.key===D.ENTER||o.key===D.SPACE)&&(o.preventDefault(),this.onItemSelected(o))}}),t?.suppressMouseDown||this.addManagedElementListeners(e,{mousedown:o=>{o.stopPropagation(),o.preventDefault()}}),t?.suppressMouseOver||this.addManagedElementListeners(e,{mouseenter:()=>this.onMouseEnter(),mouseleave:()=>this.onMouseLeave()})}isDisabled(){return!!this.params.disabled}openSubMenu(e=!1,t){if(this.closeSubMenu(),!this.params.subMenu)return;this.subMenuIsOpening=!0;const o=Pe(zx);this.eSubMenuGui=o;let i,s=()=>{this.subMenuIsOpening=!1};if(this.childComponent){const d=this.createBean(new Hx(this.childComponent));d.setParentComponent(this);const c=d.getGui(),u="mouseenter",p=()=>this.cancelDeactivate();c.addEventListener(u,p),i=()=>{c.removeEventListener(u,p),this.destroyBean(d)},o.appendChild(c),this.childComponent.afterGuiAttached&&(s=()=>{this.childComponent.afterGuiAttached(),this.subMenuIsOpening=!1})}else if(this.params.subMenu){const d=this.createBean(new Wa(this.level+1,this.contextParams));d.setParentComponent(this),d.addMenuItems(this.params.subMenu),o.appendChild(d.getGui()),this.addManagedListeners(d,{closeMenu:c=>this.dispatchLocalEvent(c)}),d.addGuiEventListener("mouseenter",()=>this.cancelDeactivate()),i=()=>this.destroyBean(d),e&&(s=()=>{d.activateFirstItem(),this.subMenuIsOpening=!1})}const{popupSvc:n}=this,r=()=>{const d=this.eGui,{column:c,node:u}=this.contextParams;n?.positionPopupForMenu({eventSource:d,ePopup:o,event:t instanceof MouseEvent?t:void 0,column:c,node:u})},a=this.getLocaleTextFunc(),l=n?.addPopup({modal:!0,eChild:o,positionCallback:r,anchorToElement:this.eGui,ariaLabel:a("ariaLabelSubMenu","SubMenu"),afterGuiAttached:s});this.subMenuIsOpen=!0,this.setAriaExpanded(!0),this.hideSubMenu=()=>{l&&l.hideFunc(),this.subMenuIsOpen=!1,this.setAriaExpanded(!1),i(),this.menuItemComp.setExpanded?.(!1),this.eSubMenuGui=void 0},this.menuItemComp.setExpanded?.(!0)}setAriaExpanded(e){this.suppressAria||to(this.eGui,e)}closeSubMenu(){this.hideSubMenu&&(this.hideSubMenu(),this.hideSubMenu=null,this.setAriaExpanded(!1))}isSubMenuOpen(){return this.subMenuIsOpen}isSubMenuOpening(){return this.subMenuIsOpening}activate(e,t){this.cancelActivate(),!(this.params.disabled&&!t)&&(this.isActive=!0,this.suppressRootStyles||this.eGui.classList.add(`${this.cssClassPrefix}-active`),this.menuItemComp.setActive?.(!0),this.suppressFocus||oc(this.beans,()=>this.eGui.focus({preventScroll:!t})),e&&this.params.subMenu&&window.setTimeout(()=>{this.isAlive()&&this.isActive&&this.openSubMenu()},300),this.onItemActivated())}deactivate(){this.cancelDeactivate(),this.suppressRootStyles||this.eGui.classList.remove(`${this.cssClassPrefix}-active`),this.menuItemComp.setActive?.(!1),this.isActive=!1,this.subMenuIsOpen&&this.closeSubMenu()}getGui(){return this.menuItemComp.getGui()}getParentComponent(){return this.parentComponent}setParentComponent(e){this.parentComponent=e}getSubMenuGui(){return this.eSubMenuGui}onItemSelected(e){this.menuItemComp.select?.(),this.params.action?this.beans.frameworkOverrides.wrapOutgoing(()=>this.params.action(Z(this.gos,{...this.contextParams}))):this.openSubMenu(e&&e.type==="keydown",e),!(this.params.subMenu&&!this.params.action||this.params.suppressCloseOnSelect)&&this.closeMenu(e)}closeMenu(e){const t={type:"closeMenu"};e&&(e instanceof MouseEvent?t.mouseEvent=e:t.keyboardEvent=e),this.dispatchLocalEvent(t)}onItemActivated(){const e={type:"menuItemActivated",menuItem:this};this.dispatchLocalEvent(e)}cancelActivate(){this.activateTimeoutId&&(window.clearTimeout(this.activateTimeoutId),this.activateTimeoutId=0)}cancelDeactivate(){this.deactivateTimeoutId&&(window.clearTimeout(this.deactivateTimeoutId),this.deactivateTimeoutId=0)}onMouseEnter(){this.cancelDeactivate(),this.isAnotherSubMenuOpen()?this.activateTimeoutId=window.setTimeout(()=>this.activate(!0),this.ACTIVATION_DELAY):this.activate(!0)}onMouseLeave(){this.cancelActivate(),this.isSubMenuOpen()?this.deactivateTimeoutId=window.setTimeout(()=>this.deactivate(),this.ACTIVATION_DELAY):this.deactivate()}configureDefaults(e){if(!this.menuItemComp){setTimeout(()=>this.configureDefaults(e));return}let t=this.menuItemComp.getGui();const{suppressRootStyles:o,suppressTooltip:i,suppressAria:s,suppressTabIndex:n,suppressFocus:r}=e||{},a=this.menuItemComp.getRootElement?.();a&&(o||t.classList.add("ag-menu-option-custom"),t=a),this.eGui=t,this.suppressRootStyles=!!o,this.suppressRootStyles||(t.classList.add(this.cssClassPrefix),this.params.cssClasses?.forEach(l=>t.classList.add(l)),this.params.disabled&&t.classList.add(`${this.cssClassPrefix}-disabled`)),i||this.refreshTooltip(this.params.tooltip),this.suppressAria=!!s,this.suppressAria||(qe(t,"menuitem"),this.params.subMenu&&bp(t,this.params.subMenuRole??"menu"),this.params.disabled&&Hd(t,!0)),n||t.setAttribute("tabindex","-1"),this.params.disabled||this.addListeners(t,e),this.suppressFocus=!!r}refreshTooltip(e,t){if(this.tooltip=e,this.tooltipFeature=this.destroyBean(this.tooltipFeature),!e||!this.menuItemComp)return;const o=this.registry.createDynamicBean("tooltipFeature",!1,{getGui:()=>this.getGui(),getTooltipValue:()=>this.tooltip,getLocation:()=>"menu",shouldDisplayTooltip:t});o&&(this.tooltipFeature=this.createBean(o))}destroy(){this.tooltipFeature=this.destroyBean(this.tooltipFeature),this.menuItemComp?.destroy?.(),super.destroy()}},Wa=class extends bi{constructor(e=0,t){super({tag:"div",cls:"ag-menu-list",role:"menu"}),this.level=e,this.menuItems=[],this.params=t??{column:null,node:null,value:null}}postConstruct(){this.initialiseTabGuard({onTabKeyDown:e=>this.onTabKeyDown(e),handleKeyDown:e=>oc(this.beans,()=>this.handleKeyDown(e)),onFocusIn:e=>this.handleFocusIn(e),onFocusOut:e=>this.handleFocusOut(e)})}onTabKeyDown(e){this.getParentComponent()?.getGui()?.classList.contains("ag-focus-managed")||e.preventDefault(),e.shiftKey&&this.closeIfIsChild(e)}handleKeyDown(e){switch(e.key){case D.UP:case D.RIGHT:case D.DOWN:case D.LEFT:e.preventDefault(),this.handleNavKey(e.key);break;case D.ESCAPE:this.closeIfIsChild()&&oo(e);break}}handleFocusIn(e){const t=e.relatedTarget;!this.tabGuardFeature.getTabGuardCtrl().isTabGuard(t)&&(this.getGui().contains(t)||this.activeMenuItem?.getSubMenuGui()?.contains(t))||(this.activeMenuItem?this.activeMenuItem.activate():this.activateFirstItem())}handleFocusOut(e){const t=e.relatedTarget;!this.activeMenuItem||this.getGui().contains(t)||this.activeMenuItem.getSubMenuGui()?.contains(t)||this.activeMenuItem.isSubMenuOpening()||this.activeMenuItem.deactivate()}clearActiveItem(){this.activeMenuItem&&(this.activeMenuItem.deactivate(),this.activeMenuItem=null)}addMenuItems(e){e!=null&&De.all(e.map(t=>t==="separator"?De.resolve({eGui:this.createSeparator()}):typeof t=="string"?(_(228,{menuItemOrString:t}),De.resolve({eGui:null})):this.addItem(t))).then(t=>{(t??[]).forEach(o=>{o?.eGui&&(this.appendChild(o.eGui),o.comp&&this.menuItems.push(o.comp))})})}addItem(e){const t=this.createManagedBean(new ed);return t.init({menuItemDef:e,isAnotherSubMenuOpen:()=>this.menuItems.some(o=>o.isSubMenuOpen()),level:this.level,contextParams:this.params}).then(()=>(t.setParentComponent(this),this.addManagedListeners(t,{closeMenu:o=>{this.dispatchLocalEvent(o)},menuItemActivated:o=>{this.activeMenuItem&&this.activeMenuItem!==o.menuItem&&this.activeMenuItem.deactivate(),this.activeMenuItem=o.menuItem}}),{comp:t,eGui:t.getGui()}))}activateFirstItem(){const e=this.menuItems.filter(t=>!t.isDisabled())[0];e&&e.activate()}createSeparator(){const e={tag:"div",cls:"ag-menu-separator-part"};return Pe({tag:"div",cls:"ag-menu-separator",attrs:{"aria-hidden":"true"},children:[e,e,e,e]})}handleNavKey(e){switch(e){case D.UP:case D.DOWN:{const o=this.findNextItem(e===D.UP);o&&o!==this.activeMenuItem&&o.activate(!1,!0);return}}const t=this.gos.get("enableRtl")?D.RIGHT:D.LEFT;e===t?this.closeIfIsChild():this.openChild()}closeIfIsChild(e){const t=this.getParentComponent();return t&&t instanceof ed?(e&&e.preventDefault(),t.closeSubMenu(),t.getGui().focus(),!0):!1}openChild(){this.activeMenuItem&&this.activeMenuItem.openSubMenu(!0)}findNextItem(e){const t=[...this.menuItems];if(!t.length)return;if(!this.activeMenuItem)return e?ve(t):t[0];e&&t.reverse();let o,i=!1;for(const s of t){if(!i){s===this.activeMenuItem&&(i=!0);continue}o=s;break}return i&&!o?t[0]:o||this.activeMenuItem}destroy(){this.clearActiveItem(),super.destroy()}},fh=class extends pe{constructor(e,t,o){super({tag:"div",cls:"ag-menu"}),this.column=e,this.mouseEvent=t,this.parentEl=o,this.displayName=null}postConstruct(){const{column:e,beans:{colNames:t}}=this;this.initializeProperties(e);let o;if(Ut(e)?o=t.getDisplayNameForColumn(e,"columnToolPanel"):o=t.getDisplayNameForProvidedColumnGroup(null,e,"columnToolPanel"),this.displayName=o,this.buildMenuItemMap(),this.isActive()){this.mouseEvent.preventDefault();const i=this.getMappedMenuItems();if(i.length===0)return;this.displayContextMenu(i)}}initializeProperties(e){let t;Be(e)?t=e.getLeafColumns():t=[e],this.columns=t,this.allowGrouping=t.some(o=>o.isPrimary()&&o.isAllowRowGroup()),this.allowValues=t.some(o=>o.isPrimary()&&o.isAllowValue()),this.allowPivoting=this.beans.colModel.isPivotMode()&&t.some(o=>o.isPrimary()&&o.isAllowPivot())}buildMenuItemMap(){const e=this.getLocaleTextFunc(),{beans:t,displayName:o}=this,{rowGroupColsSvc:i,valueColsSvc:s,pivotColsSvc:n,colModel:r}=t,a=new Map;this.menuItemMap=a,a.set("rowGroup",{allowedFunction:l=>l.isPrimary()&&l.isAllowRowGroup()&&!Sn(l,t),activeFunction:l=>l.isRowGroupActive(),activateLabel:()=>`${e("groupBy","Group by")} ${o}`,deactivateLabel:()=>`${e("ungroupBy","Un-Group by")} ${o}`,activateFunction:()=>i?.setColumns(this.addColumnsToList(i.columns),"toolPanelUi"),deActivateFunction:()=>i?.setColumns(this.removeColumnsFromList(i.columns),"toolPanelUi"),addIcon:"menuAddRowGroup",removeIcon:"menuRemoveRowGroup"}),a.set("value",{allowedFunction:l=>l.isPrimary()&&l.isAllowValue(),activeFunction:l=>l.isValueActive(),activateLabel:()=>e("addToValues",`Add ${o} to values`,[o]),deactivateLabel:()=>e("removeFromValues",`Remove ${o} from values`,[o]),activateFunction:()=>s?.setColumns(this.addColumnsToList(s.columns),"toolPanelUi"),deActivateFunction:()=>s?.setColumns(this.removeColumnsFromList(s.columns),"toolPanelUi"),addIcon:"valuePanel",removeIcon:"valuePanel"}),a.set("pivot",{allowedFunction:l=>r.isPivotMode()&&l.isPrimary()&&l.isAllowPivot(),activeFunction:l=>l.isPivotActive(),activateLabel:()=>e("addToLabels",`Add ${o} to labels`,[o]),deactivateLabel:()=>e("removeFromLabels",`Remove ${o} from labels`,[o]),activateFunction:()=>n?.setColumns(this.addColumnsToList(n.columns),"toolPanelUi"),deActivateFunction:()=>n?.setColumns(this.removeColumnsFromList(n.columns),"toolPanelUi"),addIcon:"pivotPanel",removeIcon:"pivotPanel"})}addColumnsToList(e){return[...e].concat(this.columns.filter(t=>e.indexOf(t)===-1))}removeColumnsFromList(e){return e.filter(t=>this.columns.indexOf(t)===-1)}displayContextMenu(e){const t=this.getGui(),o=this.createBean(new Wa),i=this.getLocaleTextFunc();let s=()=>{};t.appendChild(o.getGui()),o.addMenuItems(e),o.addManagedListeners(o,{closeMenu:()=>{this.parentEl.focus(),s()}});const n=this.beans.popupSvc,r=n.addPopup({modal:!0,eChild:t,closeOnEsc:!0,afterGuiAttached:()=>It(o.getGui()),ariaLabel:i("ariaLabelContextMenu","Context Menu"),closedCallback:a=>{a instanceof KeyboardEvent&&this.parentEl.focus(),this.destroyBean(o)}});r&&(s=r.hideFunc),n.positionPopupUnderMouseEvent({type:"columnContextMenu",mouseEvent:this.mouseEvent,ePopup:t})}isActive(){return this.allowGrouping||this.allowValues||this.allowPivoting}getMappedMenuItems(){const e=[],{menuItemMap:t,columns:o,displayName:i,beans:s}=this;for(const n of t.values()){const r=o.some(l=>n.allowedFunction(l)&&!n.activeFunction(l)),a=o.some(l=>n.allowedFunction(l)&&n.activeFunction(l));r&&e.push({name:n.activateLabel(i),icon:oe(n.addIcon,s,null),action:()=>n.activateFunction()}),a&&e.push({name:n.deactivateLabel(i),icon:oe(n.removeIcon,s,null),action:()=>n.deActivateFunction()})}return e}},Wx={tag:"div",cls:"ag-column-select-column-group",children:[{tag:"span",ref:"eColumnGroupIcons",cls:"ag-column-group-icons",children:[{tag:"span",ref:"eGroupClosedIcon",cls:"ag-column-group-closed-icon"},{tag:"span",ref:"eGroupOpenedIcon",cls:"ag-column-group-opened-icon"}]},{tag:"ag-checkbox",ref:"cbSelect",cls:"ag-column-select-checkbox"},{tag:"span",ref:"eLabel",cls:"ag-column-select-column-label"}]},mh=class extends pe{constructor(e,t,o,i){super(),this.modelItem=e,this.allowDragging=t,this.eventType=o,this.focusWrapper=i,this.cbSelect=O,this.eLabel=O,this.eGroupOpenedIcon=O,this.eGroupClosedIcon=O,this.eColumnGroupIcons=O,this.processingColumnStateChange=!1;const{columnGroup:s,depth:n,displayName:r}=e;this.columnGroup=s,this.columnDepth=n,this.displayName=r}postConstruct(){this.setTemplate(Wx,[yi]);const{beans:e,cbSelect:t,eLabel:o,displayName:i,columnDepth:s,modelItem:n,focusWrapper:r,columnGroup:a}=this,{registry:l,gos:d}=e,c=oe("columnDrag",e);this.eDragHandle=c,c.classList.add("ag-drag-handle","ag-column-select-column-group-drag-handle");const u=t.getGui(),p=t.getInputElement();u.insertAdjacentElement("afterend",c),p.setAttribute("tabindex","-1"),o.innerHTML=i??"",this.setupExpandContract(),this.addCssClass("ag-column-select-indent-"+s),this.getGui().style.setProperty("--ag-indentation-level",String(s)),this.tooltipFeature=this.createOptionalManagedBean(l.createDynamicBean("tooltipFeature",!1,{getGui:()=>this.getGui(),getLocation:()=>"columnToolPanelColumnGroup",shouldDisplayTooltip:Oa(d,()=>o)})),this.addManagedEventListeners({columnPivotModeChanged:this.onColumnStateChanged.bind(this)}),this.addManagedElementListeners(o,{click:this.onLabelClicked.bind(this)}),this.addManagedListeners(t,{fieldValueChanged:this.onCheckboxChanged.bind(this)}),this.addManagedListeners(n,{expandedChanged:this.onExpandChanged.bind(this)}),this.addManagedListeners(r,{keydown:this.handleKeyDown.bind(this),contextmenu:this.onContextMenu.bind(this)}),this.setOpenClosedIcons(),this.setupDragging(),this.onColumnStateChanged(),this.addVisibilityListenersToAllChildren(),this.refreshAriaExpanded(),this.refreshAriaLabel(),this.setupTooltip(),Kc(a.getColGroupDef(),d,null,a).forEach(f=>this.addOrRemoveCssClass(f,!0))}getColumns(){return this.columnGroup.getLeafColumns()}setupTooltip(){const e=this.columnGroup.getColGroupDef();if(!e)return;const t=()=>this.tooltipFeature?.setTooltipAndRefresh(e.headerTooltip);t(),this.addManagedEventListeners({newColumnsLoaded:t})}handleKeyDown(e){switch(e.key){case D.LEFT:e.preventDefault(),this.modelItem.expanded=!1;break;case D.RIGHT:e.preventDefault(),this.modelItem.expanded=!0;break;case D.SPACE:e.preventDefault(),this.isSelectable()&&this.onSelectAllChanged(!this.isSelected());break}}onContextMenu(e){const{columnGroup:t,gos:o}=this;if(o.get("functionsReadOnly"))return;const i=this.createBean(new fh(t,e,this.focusWrapper));this.addDestroyFunc(()=>{i.isAlive()&&this.destroyBean(i)})}addVisibilityListenersToAllChildren(){const e=this.onColumnStateChanged.bind(this);this.columnGroup.getLeafColumns().forEach(t=>{this.addManagedListeners(t,{visibleChanged:e,columnValueChanged:e,columnPivotChanged:e,columnRowGroupChanged:e})})}setupDragging(){if(!this.allowDragging){he(this.eDragHandle,!1);return}const e=this.beans,{gos:t,eventSvc:o,dragAndDrop:i}=e;let s=!t.get("suppressDragLeaveHidesColumns");const n={type:kn.ToolPanel,eElement:this.eDragHandle,dragItemName:this.displayName,getDefaultIconName:()=>s?"hide":"notAllowed",getDragItem:()=>this.createDragItem(),onDragStarted:()=>{s=!t.get("suppressDragLeaveHidesColumns"),o.dispatchEvent({type:"columnPanelItemDragStart",column:this.columnGroup})},onDragStopped:()=>{o.dispatchEvent({type:"columnPanelItemDragEnd"})},onGridEnter:r=>{s&&ph(e,{columns:this.columnGroup.getLeafColumns(),visibleState:r?.visibleState,pivotState:r?.pivotState,eventType:this.eventType})},onGridExit:()=>{s&&this.onChangeCommon(!1)}};i.addDragSource(n,!0),this.addDestroyFunc(()=>i.removeDragSource(n))}createDragItem(){const e=this.columnGroup.getLeafColumns(),t={},o={};return e.forEach(i=>{const s=i.getId();t[s]=i.isVisible(),o[s]=gh(i)}),{columns:e,visibleState:t,pivotState:o}}setupExpandContract(){const{beans:e,eGroupClosedIcon:t,eGroupOpenedIcon:o,eColumnGroupIcons:i}=this;t.appendChild(ri("columnSelectClosed",e,null)),o.appendChild(ri("columnSelectOpen",e,null));const s=this.onExpandOrContractClicked.bind(this);this.addManagedElementListeners(t,{click:s}),this.addManagedElementListeners(o,{click:s});const n=new Xo(i,!0);this.addManagedListeners(n,{tap:s}),this.addDestroyFunc(n.destroy.bind(n))}onLabelClicked(){const e=!this.cbSelect.getValue();this.onChangeCommon(e)}onCheckboxChanged(e){this.onChangeCommon(e.selected)}getVisibleLeafColumns(){const e=[],t=o=>{o.forEach(i=>{i.passesFilter&&(i.group?t(i.children):e.push(i.column))})};return t(this.modelItem.children),e}onChangeCommon(e){this.refreshAriaLabel(),!this.processingColumnStateChange&&uh(this.beans,this.modelItem.children,e,this.eventType)}refreshAriaLabel(){const{cbSelect:e,focusWrapper:t,displayName:o}=this,i=this.getLocaleTextFunc(),s=i("ariaColumnGroup","Column Group"),n=e.getValue(),r=n===void 0?i("ariaIndeterminate","indeterminate"):n?i("ariaVisible","visible"):i("ariaHidden","hidden"),a=i("ariaToggleVisibility","Press SPACE to toggle visibility");ut(t,`${o} ${s}`),e.setInputAriaLabel(`${a} (${r})`),aa(t,e.getInputElement().id)}onColumnStateChanged(){const e=this.workOutSelectedValue(),t=this.workOutReadOnlyValue();this.processingColumnStateChange=!0;const o=this.cbSelect;o.setValue(e),o.setReadOnly(t),this.addOrRemoveCssClass("ag-column-select-column-group-readonly",t),this.processingColumnStateChange=!1}workOutSelectedValue(){const e=this.beans.colModel.isPivotMode(),t=this.getVisibleLeafColumns();let o=0,i=0;if(t.forEach(s=>{!e&&s.getColDef().lockVisible||(this.isColumnChecked(s,e)?o++:i++)}),!(o>0&&i>0))return o>0}workOutReadOnlyValue(){const e=this.beans.colModel.isPivotMode();let t=0;return this.columnGroup.getLeafColumns().forEach(o=>{e?o.isAnyFunctionAllowed()&&t++:o.getColDef().lockVisible||t++}),t===0}isColumnChecked(e,t){if(t){const o=e.isPivotActive(),i=e.isRowGroupActive(),s=e.isValueActive();return o||i||s}return e.isVisible()}onExpandOrContractClicked(){const e=this.modelItem,t=e.expanded;e.expanded=!t}onExpandChanged(){this.setOpenClosedIcons(),this.refreshAriaExpanded()}setOpenClosedIcons(){const e=this.modelItem.expanded;he(this.eGroupClosedIcon,!e),he(this.eGroupOpenedIcon,e)}refreshAriaExpanded(){to(this.focusWrapper,this.modelItem.expanded)}getDisplayName(){return this.displayName}onSelectAllChanged(e){const t=this.cbSelect,o=t.getValue();!t.isReadOnly()&&(e&&!o||!e&&o)&&t.toggle()}isSelected(){return this.cbSelect.getValue()}isSelectable(){return!this.cbSelect.isReadOnly()}setSelected(e){this.cbSelect.setValue(e,!0)}},gr=e=>Be(e)?e.getLeafColumns():e?[e]:[],Ux=(e,t,o,i)=>{if(!o||!t)return null;const s=e.colModel.getCols(),n=s.indexOf(o),r=i?n:n+1,a=$x(s,t,r);return r-a},$x=(e,t,o)=>{if(!t)return 0;const i=t[0],s=t.length;return e.indexOf(i)<o?s:0},td=(e,t,o)=>e.get("suppressMovableColumns")||t.colModel.isPivotMode()?!0:!!o.find(({colDef:n})=>!!n.suppressMovable||!!n.lockPosition),od=(e,t,o)=>{if(!o)return;const{component:i}=o;let s=null,n=o.position==="top";if(i instanceof mh?(s=i.getColumns()[0],n=!0):i&&(s=i.column),!s)return;const r=Ux(e,t,s,n);r!=null&&e.colMoves?.moveColumns(t,r,"toolPanelUi")},jx=e=>e.column,Kx={tag:"div",cls:"ag-column-select-column",children:[{tag:"ag-checkbox",ref:"cbSelect",cls:"ag-column-select-checkbox"},{tag:"span",ref:"eLabel",cls:"ag-column-select-column-label"}]},Yx=class extends pe{constructor(e,t,o,i){super(),this.modelItem=e,this.allowDragging=t,this.groupsExist=o,this.focusWrapper=i,this.eLabel=O,this.cbSelect=O,this.processingColumnStateChange=!1;const{column:s,depth:n,displayName:r}=e;this.column=s,this.columnDepth=n,this.displayName=r}postConstruct(){this.setTemplate(Kx,[yi]);const{beans:e,cbSelect:t,displayName:o,eLabel:i,columnDepth:s,groupsExist:n,column:r,gos:a,focusWrapper:l}=this,d=oe("columnDrag",e);this.eDragHandle=d,d.classList.add("ag-drag-handle","ag-column-select-column-drag-handle");const c=t.getGui(),u=t.getInputElement();c.insertAdjacentElement("afterend",d),u.setAttribute("tabindex","-1");const p=St(o);i.innerHTML=p,n&&this.addCssClass("ag-column-select-add-group-indent"),this.addCssClass(`ag-column-select-indent-${s}`),this.getGui().style.setProperty("--ag-indentation-level",String(s)),this.tooltipFeature=this.createOptionalManagedBean(e.registry.createDynamicBean("tooltipFeature",!1,{getGui:()=>this.getGui(),getLocation:()=>"columnToolPanelColumn",getColDef:()=>r.getColDef(),shouldDisplayTooltip:Oa(a,()=>i)})),this.setupDragging();const g=this.onColumnStateChanged.bind(this);this.addManagedEventListeners({columnPivotModeChanged:g}),this.addManagedListeners(r,{columnValueChanged:g,columnPivotChanged:g,columnRowGroupChanged:g,visibleChanged:g}),this.addManagedListeners(l,{keydown:this.handleKeyDown.bind(this),contextmenu:this.onContextMenu.bind(this)}),this.addManagedPropertyListener("functionsReadOnly",this.onColumnStateChanged.bind(this)),this.addManagedListeners(t,{fieldValueChanged:this.onCheckboxChanged.bind(this)}),this.addManagedElementListeners(i,{click:this.onLabelClicked.bind(this)}),this.onColumnStateChanged(),this.refreshAriaLabel(),this.setupTooltip(),Kc(r.getColDef(),a,r,null).forEach(m=>this.addOrRemoveCssClass(m,!0))}getColumn(){return this.column}setupTooltip(){const e=()=>this.tooltipFeature?.setTooltipAndRefresh(this.column.getColDef().headerTooltip);e(),this.addManagedEventListeners({newColumnsLoaded:e})}onContextMenu(e){const{column:t,gos:o}=this;if(o.get("functionsReadOnly"))return;const i=this.createBean(new fh(t,e,this.focusWrapper));this.addDestroyFunc(()=>{i.isAlive()&&this.destroyBean(i)})}handleKeyDown(e){e.key===D.SPACE&&(e.preventDefault(),this.isSelectable()&&this.onSelectAllChanged(!this.isSelected()))}onLabelClicked(){if(this.gos.get("functionsReadOnly"))return;const e=!this.cbSelect.getValue();this.onChangeCommon(e)}onCheckboxChanged(e){this.onChangeCommon(e.selected)}onChangeCommon(e){this.cbSelect.isReadOnly()||(this.refreshAriaLabel(),!this.processingColumnStateChange&&hh(this.beans,[this.column],e,"toolPanelUi"))}refreshAriaLabel(){const{cbSelect:e,focusWrapper:t,displayName:o}=this,i=this.getLocaleTextFunc(),s=i("ariaColumn","Column"),n=e.getValue()?i("ariaVisible","visible"):i("ariaHidden","hidden"),r=i("ariaToggleVisibility","Press SPACE to toggle visibility");ut(t,`${o} ${s}`),this.cbSelect.setInputAriaLabel(`${r} (${n})`),aa(t,e.getInputElement().id)}setupDragging(){const e=this.eDragHandle;if(!this.allowDragging){he(e,!1);return}const t=this.beans,{gos:o,eventSvc:i,dragAndDrop:s}=t;let n=!o.get("suppressDragLeaveHidesColumns");const r={type:kn.ToolPanel,eElement:e,dragItemName:this.displayName,getDefaultIconName:()=>n?"hide":"notAllowed",getDragItem:()=>this.createDragItem(),onDragStarted:()=>{n=!o.get("suppressDragLeaveHidesColumns"),i.dispatchEvent({type:"columnPanelItemDragStart",column:this.column})},onDragStopped:()=>{i.dispatchEvent({type:"columnPanelItemDragEnd"})},onGridEnter:a=>{n&&ph(t,{columns:[this.column],visibleState:a?.visibleState,pivotState:a?.pivotState,eventType:"toolPanelUi"})},onGridExit:()=>{n&&this.onChangeCommon(!1)}};s.addDragSource(r,!0),this.addDestroyFunc(()=>s.removeDragSource(r))}createDragItem(){const e=this.column.getColId(),t={[e]:this.column.isVisible()},o={[e]:gh(this.column)};return{columns:[this.column],visibleState:t,pivotState:o}}onColumnStateChanged(){this.processingColumnStateChange=!0;const e=this.beans.colModel.isPivotMode();if(e){const i=this.column.isAnyFunctionActive();this.cbSelect.setValue(i)}else this.cbSelect.setValue(this.column.isVisible());let t=!0,o=!0;if(e){const i=this.gos.get("functionsReadOnly"),s=!this.column.isAnyFunctionAllowed();t=!i&&!s,o=t}else{const{enableRowGroup:i,enableValue:s,lockPosition:n,suppressMovable:r,lockVisible:a}=this.column.getColDef(),l=!!i||!!s,d=!!n||!!r;t=!a,o=l||!d}this.cbSelect.setReadOnly(!t),this.eDragHandle.classList.toggle("ag-column-select-column-readonly",!o),this.addOrRemoveCssClass("ag-column-select-column-readonly",!o&&!t),this.cbSelect.setPassive(!1),this.processingColumnStateChange=!1}getDisplayName(){return this.displayName}onSelectAllChanged(e){const t=this.cbSelect;e!==t.getValue()&&(t.isReadOnly()||t.toggle())}isSelected(){return this.cbSelect.getValue()}isSelectable(){return!this.cbSelect.isReadOnly()}isExpandable(){return!1}setExpanded(e){_(158)}},qx=class{constructor(e){this.items=e}getRowCount(){return this.items.length}getRow(e){return this.items[e]}},Qx="ag-column-select-list",Xx=class extends pe{constructor(){super({tag:"div",cls:Qx,role:"presentation"}),this.destroyColumnItemFuncs=[],this.hasLoadedInitialState=!1,this.isInitialState=!1,this.skipRefocus=!1}wireBeans(e){this.colModel=e.colModel}destroy(){this.destroyColumnTree(),super.destroy()}destroyColumnTree(){this.allColsTree=[],this.destroyColumnItemFuncs.forEach(e=>e()),this.destroyColumnItemFuncs=[]}init(e,t,o){this.params=e;const{suppressSyncLayoutWithGrid:i,contractColumnSelection:s,suppressColumnMove:n}=e;this.allowDragging=t,this.eventType=o,i||this.addManagedEventListeners({columnMoved:this.onColumnsChanged.bind(this)}),this.addManagedEventListeners({newColumnsLoaded:this.onColumnsChanged.bind(this)});const r=this.fireSelectionChangedEvent.bind(this);this.addManagedEventListeners({columnPivotChanged:r,columnPivotModeChanged:r,columnRowGroupChanged:r,columnValueChanged:r,columnVisible:r,newColumnsLoaded:r}),this.expandGroupsByDefault=!s;const a=n||i,l=this.createManagedBean(new dh({cssIdentifier:"column-select",ariaRole:"tree",moveItemCallback:(d,c)=>{a||this.moveItems(d,c)}}));this.virtualList=l,this.appendChild(l.getGui()),l.setComponentCreator((d,c)=>(Nd(c,d.depth+1),this.createComponentFromItem(d,c))),this.colModel.ready&&this.onColumnsChanged(),!a&&this.createItemDragFeature()}createItemDragFeature(){const{gos:e,beans:t,eventSvc:o,virtualList:i}=this;this.createManagedBean(new wx(this,i,{dragSourceType:kn.ToolPanel,listItemDragStartEvent:"columnPanelItemDragStart",listItemDragEndEvent:"columnPanelItemDragEnd",eventSource:o,getCurrentDragValue:s=>jx(s),isMoveBlocked:s=>td(e,t,gr(s)),getNumRows:s=>s.getDisplayedColsList().length,moveItem:(s,n)=>od(t,gr(s),n)}))}moveItems(e,t){const{gos:o,beans:i}=this,{modelItem:s}=e,{group:n,columnGroup:r,column:a,expanded:l}=s,d=gr(n?r:a);if(td(o,i,d))return;const c=this.displayedColsList.indexOf(s),u=t?-1:1;let p=0;if(t){const f=e.columnDepth>0&&a.getParent()?.getChildren();f&&f.length&&a===f[0]&&(p=-1)}else n&&(p=l?s.children.length:0);const g=Math.min(Math.max(c+p+u,0),this.displayedColsList.length-1);this.skipRefocus=!0,od(i,d,{position:t?"top":"bottom",component:this.virtualList.getComponentAt(g)}),this.focusRowIfAlive(g-p).then(()=>{this.skipRefocus=!1})}createComponentFromItem(e,t){const o=this.allowDragging;if(e.group){const s=new mh(e,o,this.eventType,t);return this.createBean(s),s}const i=new Yx(e,o,this.groupsExist,t);return this.createBean(i),i}onColumnsChanged(){const e=this.params;this.hasLoadedInitialState||(this.hasLoadedInitialState=!0,this.isInitialState=!!e.initialState);const t=this.getExpandedStates(),o=this.colModel.isPivotMode();!e.suppressSyncLayoutWithGrid&&!o?this.buildTreeFromWhatGridIsDisplaying():this.buildTreeFromProvidedColumnDefs(),this.setExpandedStates(t),this.markFilteredColumns(),this.flattenAndFilterModel(),this.isInitialState=!1}getDisplayedColsList(){return this.displayedColsList}getExpandedStates(){const e={};if(this.isInitialState){const{expandedGroupIds:t}=this.params.initialState;return t.forEach(o=>{e[o]=!0}),e}return this.allColsTree?(this.forEachItem(t=>{if(!t.group)return;const o=t.columnGroup;o&&(e[o.getId()]=t.expanded)}),e):{}}setExpandedStates(e){if(!this.allColsTree)return;const{isInitialState:t}=this;this.forEachItem(o=>{if(!o.group)return;const i=o.columnGroup;if(i){const s=e[i.getId()];(s!=null||t)&&(o.expanded=!!s)}})}buildTreeFromWhatGridIsDisplaying(){Ix(this.colModel,this.setColumnLayout.bind(this))}setColumnLayout(e){const t=Tx(this.colModel,e);this.buildListModel(t),this.groupsExist=e.some(o=>o&&typeof o.children<"u"),this.markFilteredColumns(),this.flattenAndFilterModel()}buildTreeFromProvidedColumnDefs(){const e=this.colModel;this.buildListModel(e.getColDefColTree()),this.groupsExist=!!e.colDefCols?.treeDepth}buildListModel(e){const t=this.onColumnExpanded.bind(this),o=a=>{a.addEventListener("expandedChanged",t);const l=a.removeEventListener.bind(a,"expandedChanged",t);this.destroyColumnItemFuncs.push(l)},i=this.beans.colNames,s=(a,l,d)=>{a.forEach(c=>{Be(c)?n(c,l,d):r(c,l,d)})},n=(a,l,d)=>{const c=a.getColGroupDef();if(c&&c.suppressColumnsToolPanel)return;if(a.isPadding()){s(a.getChildren(),l,d);return}const p=i.getDisplayNameForProvidedColumnGroup(null,a,"columnToolPanel"),g=new Zl(p,a,l,!0,this.expandGroupsByDefault);d.push(g),o(g),s(a.getChildren(),l+1,g.children)},r=(a,l,d)=>{if(a.getColDef()&&a.getColDef().suppressColumnsToolPanel)return;const u=i.getDisplayNameForColumn(a,"columnToolPanel");d.push(new Zl(u,a,l))};this.destroyColumnTree(),s(e,0,this.allColsTree)}onColumnExpanded(){this.flattenAndFilterModel()}flattenAndFilterModel(){this.displayedColsList=[];const e=i=>{i.passesFilter&&(this.displayedColsList.push(i),i.group&&i.expanded&&i.children.forEach(e))},t=this.virtualList;this.allColsTree.forEach(e),t.setModel(new qx(this.displayedColsList));let o=null;this.skipRefocus||(o=t.getLastFocusedRow()),t.refresh(),o!=null&&this.focusRowIfAlive(o),this.notifyListeners(),this.refreshAriaLabel()}refreshAriaLabel(){const e=this.getLocaleTextFunc(),t=e("ariaColumnPanelList","Column List"),o=e("columns","Columns"),i=this.displayedColsList.length;ut(this.virtualList.getAriaElement(),`${t} ${i} ${o}`)}focusRowIfAlive(e){return e===-1?Promise.resolve():new Promise(t=>{window.setTimeout(()=>{this.isAlive()&&this.virtualList.focusRow(e),t()},0)})}forEachItem(e){const t=i=>{i.forEach(s=>{e(s),s.group&&t(s.children)})},o=this.allColsTree;o&&t(o)}doSetExpandedAll(e){this.forEachItem(t=>{t.group&&(t.expanded=e)})}setGroupsExpanded(e,t){if(!t){this.doSetExpandedAll(e);return}const o=[];this.forEachItem(s=>{if(!s.group)return;const n=s.columnGroup.getId();t.indexOf(n)>=0&&(s.expanded=e,o.push(n))});const i=t.filter(s=>!o.includes(s));i.length>0&&_(157,{unrecognisedGroupIds:i})}getExpandState(){let e=0,t=0;return this.forEachItem(o=>{o.group&&(o.expanded?e++:t++)}),e>0&&t>0?2:t>0?1:0}doSetSelectedAll(e){uh(this.beans,this.allColsTree,e,this.eventType)}getSelectionState(){let e=0,t=0;const o=this.colModel.isPivotMode();if(this.forEachItem(i=>{if(i.group||!i.passesFilter)return;const s=i.column,n=s.getColDef();let r;if(o){if(!s.isAllowPivot()&&!s.isAllowRowGroup()&&!s.isAllowValue())return;r=s.isValueActive()||s.isPivotActive()||s.isRowGroupActive()}else{if(n.lockVisible)return;r=s.isVisible()}r?e++:t++}),!(e>0&&t>0))return!(e===0||t>0)}setFilterText(e){this.filterText=j(e)?e.toLowerCase():null,this.markFilteredColumns(),this.flattenAndFilterModel()}markFilteredColumns(){const e=o=>{if(!j(this.filterText))return!0;const i=o.displayName;return i==null||i.toLowerCase().indexOf(this.filterText)!==-1},t=(o,i)=>{let s=!1;if(o.group){const r=e(o);o.children.forEach(a=>{const l=t(a,r||i);l&&(s=l)})}const n=i||s?!0:e(o);return o.passesFilter=n,n};this.allColsTree.forEach(o=>t(o,!1))}notifyListeners(){this.fireGroupExpandedEvent(),this.fireSelectionChangedEvent()}fireGroupExpandedEvent(){const e=this.getExpandState();this.dispatchLocalEvent({type:"groupExpanded",state:e})}fireSelectionChangedEvent(){if(!this.allColsTree)return;const e=this.getSelectionState();this.dispatchLocalEvent({type:"selectionChanged",state:e})}getExpandedGroups(){const e=[];return this.allColsTree&&this.forEachItem(t=>{t.group&&t.expanded&&e.push(t.columnGroup.getId())}),e}},Zx={selector:"AG-PRIMARY-COLS-LIST",component:Xx},Jx={tag:"div",cls:"ag-column-select",children:[{tag:"ag-primary-cols-header",ref:"primaryColsHeaderPanel"},{tag:"ag-primary-cols-list",ref:"primaryColsListPanel"}]},eD=class extends pe{constructor(){super(Jx,[Ex,Zx]),this.primaryColsHeaderPanel=O,this.primaryColsListPanel=O,this.registerCSS(xx)}init(e,t,o){const{primaryColsHeaderPanel:i,primaryColsListPanel:s}=this;i.init(t);const n=t.suppressColumnFilter,r=t.suppressColumnSelectAll;t.suppressColumnExpandAll&&n&&r&&i.setDisplayed(!1),this.addManagedListeners(s,{groupExpanded:l=>{i.setExpandState(l.state),t.onStateUpdated()},selectionChanged:l=>i.setSelectionState(l.state)}),s.init(t,e,o),this.addManagedListeners(i,{expandAll:s.doSetExpandedAll.bind(s,!0),collapseAll:s.doSetExpandedAll.bind(s,!1),selectAll:s.doSetSelectedAll.bind(s,!0),unselectAll:s.doSetSelectedAll.bind(s,!1),filterChanged:l=>s.setFilterText(l.filterText)}),this.positionableFeature=this.createManagedBean(new Ma(this.getGui(),{minHeight:100}))}toggleResizable(e){this.positionableFeature.setResizable(e?{bottom:!0}:!1)}expandGroups(e){this.primaryColsListPanel.setGroupsExpanded(!0,e)}collapseGroups(e){this.primaryColsListPanel.setGroupsExpanded(!1,e)}setColumnLayout(e){this.primaryColsListPanel.setColumnLayout(e)}syncLayoutWithGrid(){this.primaryColsListPanel.onColumnsChanged()}getExpandedGroups(){return this.primaryColsListPanel.getExpandedGroups()}},tD=class extends M{constructor(){super(...arguments),this.beanName="chartMenuItemMapper"}getChartItems(e){const t=this.beans,o=t.chartSvc,i=e==="pivotChart";if(!o)return null;const s=this.getLocaleTextFunc.bind(this),n=i?new oD(t,o,s):new iD(t,o,s),r=o.isEnterprise();let a=n.getMenuItem();if(a&&a.subMenu&&!r){const d=c=>({...c,subMenu:c.subMenu?.filter(u=>!u._enterprise).map(u=>d(u))});a=d(a)}const l=this.gos.get("chartToolPanelsDef")?.settingsPanel?.chartGroupsDef;return l&&(a=this.filterAndOrderChartMenu(a,l,n.getConfigLookup())),this.cleanInternals(a)}cleanInternals(e){if(!e)return e;const t=o=>(delete o?._key,delete o?._enterprise,o?.subMenu?.forEach(i=>t(i)),o);return t(e)}buildLookup(e){const t={},o=i=>{t[i._key]=i,i.subMenu&&i.subMenu.forEach(s=>o(s))};return o(e),t}filterAndOrderChartMenu(e,t,o){const i=this.buildLookup(e),s={...e,subMenu:[]};for(const n of Object.keys(t)){const r=t[n],a=o[n];if(a===null)continue;if(a==null){_(173,{group:n});continue}const l=i[a._key];if(l)if(l.subMenu){const d=r.map(c=>{const u=a[c];if(u==null){_(174,{group:n,chartType:c});return}return i[u]}).filter(c=>c!==void 0);d.length>0&&(l.subMenu=d,s.subMenu?.push(l))}else s.subMenu?.push(l)}return s.subMenu?.length==0?null:s}},oD=class{constructor(e,t,o){this.beans=e,this.chartSvc=t,this.getLocaleTextFunc=o}getMenuItem(){const e=this.getLocaleTextFunc(),t=(o,i,s,n,r=!1)=>({name:e(o,i+"‎"),action:()=>this.chartSvc.createPivotChart({chartType:s}),_key:n,_enterprise:r});return{name:e("pivotChart","Pivot Chart"),_key:"pivotChart",subMenu:[{_key:"pivotColumnChart",name:e("columnChart","Column"),subMenu:[t("groupedColumn","Grouped","groupedColumn","pivotGroupedColumn"),t("stackedColumn","Stacked","stackedColumn","pivotStackedColumn"),t("normalizedColumn","100% Stacked","normalizedColumn","pivotNormalizedColumn")]},{_key:"pivotBarChart",name:e("barChart","Bar"),subMenu:[t("groupedBar","Grouped","groupedBar","pivotGroupedBar"),t("stackedBar","Stacked","stackedBar","pivotStackedBar"),t("normalizedBar","100% Stacked","normalizedBar","pivotNormalizedBar")]},{_key:"pivotPieChart",name:e("pieChart","Pie"),subMenu:[t("pie","Pie","pie","pivotPie"),t("donut","Donut","donut","pivotDonut")]},{_key:"pivotLineChart",name:e("lineChart","Line"),subMenu:[t("lineChart","Line","line","pivotLineChart"),t("stackedLine","Stacked","stackedLine","pivotStackedLine"),t("normalizedLine","100% Stacked","normalizedLine","pivotNormalizedLine")]},{_key:"pivotAreaChart",name:e("areaChart","Area"),subMenu:[t("areaChart","Area","area","pivotArea"),t("stackedArea","Stacked","stackedArea","pivotStackedArea"),t("normalizedArea","100% Stacked","normalizedArea","pivotNormalizedArea")]},{_key:"pivotXYChart",name:e("xyChart","X Y (Scatter)"),subMenu:[t("scatter","Scatter","scatter","pivotScatter"),t("bubble","Bubble","bubble","pivotBubble")]},{_key:"pivotStatisticalChart",_enterprise:!1,name:e("statisticalChart","Statistical"),subMenu:[t("histogramChart","Histogram","histogram","pivotHistogram",!1)]},{_key:"pivotHierarchicalChart",_enterprise:!0,name:e("hierarchicalChart","Hierarchical"),subMenu:[t("treemapChart","Treemap","treemap","pivotTreemap",!0),t("sunburstChart","Sunburst","sunburst","pivotSunburst",!0)]},{_key:"pivotFunnel",name:e("funnel","Funnel"),subMenu:[t("funnel","Funnel","funnel","pivotFunnel"),t("coneFunnel","Cone Funnel","coneFunnel","pivotConeFunnel"),t("pyramid","Pyramid","pyramid","pivotPyramid")]},{_key:"pivotCombinationChart",name:e("combinationChart","Combination"),subMenu:[t("columnLineCombo","Column & Line","columnLineCombo","pivotColumnLineCombo"),t("AreaColumnCombo","Area & Column","areaColumnCombo","pivotAreaColumnCombo")]}],icon:oe("chart",this.beans,void 0)}}getConfigLookup(){return{columnGroup:{_key:"pivotColumnChart",column:"pivotGroupedColumn",stackedColumn:"pivotStackedColumn",normalizedColumn:"pivotNormalizedColumn"},barGroup:{_key:"pivotBarChart",bar:"pivotGroupedBar",stackedBar:"pivotStackedBar",normalizedBar:"pivotNormalizedBar"},pieGroup:{_key:"pivotPieChart",pie:"pivotPie",donut:"pivotDonut",doughnut:"pivotDonut"},lineGroup:{_key:"pivotLineChart",line:"pivotLineChart",stackedLine:"pivotStackedLine",normalizedLine:"pivotNormalizedLine"},areaGroup:{_key:"pivotAreaChart",area:"pivotArea",stackedArea:"pivotStackedArea",normalizedArea:"pivotNormalizedArea"},scatterGroup:{_key:"pivotXYChart",bubble:"pivotBubble",scatter:"pivotScatter"},combinationGroup:{_key:"pivotCombinationChart",columnLineCombo:"pivotColumnLineCombo",areaColumnCombo:"pivotAreaColumnCombo",customCombo:null},hierarchicalGroup:{_key:"pivotHierarchicalChart",treemap:"pivotTreemap",sunburst:"pivotSunburst"},statisticalGroup:{_key:"pivotStatisticalChart",histogram:"pivotHistogram",rangeBar:null,rangeArea:null,boxPlot:null},funnelGroup:{_key:"pivotFunnel",funnel:"pivotFunnel",coneFunnel:"pivotConeFunnel",pyramid:"pivotPyramid"},polarGroup:null,specializedGroup:null}}},iD=class{constructor(e,t,o){this.beans=e,this.chartSvc=t,this.getLocaleTextFunc=o}getMenuItem(){const e=this.getLocaleTextFunc(),t=(o,i,s,n,r=!1)=>({name:e(o,i),action:()=>this.chartSvc.createChartFromCurrentRange(s),_key:n,_enterprise:r});return{name:e("chartRange","Chart Range"),_key:"chartRange",subMenu:[{name:e("columnChart","Column"),subMenu:[t("groupedColumn","Grouped","groupedColumn","rangeGroupedColumn"),t("stackedColumn","Stacked","stackedColumn","rangeStackedColumn"),t("normalizedColumn","100% Stacked","normalizedColumn","rangeNormalizedColumn")],_key:"rangeColumnChart"},{name:e("barChart","Bar"),subMenu:[t("groupedBar","Grouped","groupedBar","rangeGroupedBar"),t("stackedBar","Stacked","stackedBar","rangeStackedBar"),t("normalizedBar","100% Stacked","normalizedBar","rangeNormalizedBar")],_key:"rangeBarChart"},{name:e("pieChart","Pie"),subMenu:[t("pie","Pie","pie","rangePie"),t("donut","Donut","donut","rangeDonut")],_key:"rangePieChart"},{name:e("lineChart","Line"),subMenu:[t("lineChart","Line","line","rangeLineChart"),t("stackedLine","Stacked","stackedLine","rangeStackedLine"),t("normalizedLine","100% Stacked","normalizedLine","rangeNormalizedLine")],_key:"rangeLineChart"},{name:e("areaChart","Area"),subMenu:[t("areaChart","Area","area","rangeArea"),t("stackedArea","Stacked","stackedArea","rangeStackedArea"),t("normalizedArea","100% Stacked","normalizedArea","rangeNormalizedArea")],_key:"rangeAreaChart"},{name:e("xyChart","X Y (Scatter)"),subMenu:[t("scatter","Scatter","scatter","rangeScatter"),t("bubble","Bubble","bubble","rangeBubble")],_key:"rangeXYChart"},{name:e("polarChart","Polar"),subMenu:[t("radarLine","Radar Line","radarLine","rangeRadarLine"),t("radarArea","Radar Area","radarArea","rangeRadarArea"),t("nightingale","Nightingale","nightingale","rangeNightingale"),t("radialColumn","Radial Column","radialColumn","rangeRadialColumn"),t("radialBar","Radial Bar","radialBar","rangeRadialBar")],_key:"rangePolarChart",_enterprise:!0},{name:e("statisticalChart","Statistical"),subMenu:[t("boxPlot","Box Plot","boxPlot","rangeBoxPlot",!0),t("histogramChart","Histogram","histogram","rangeHistogram",!1),t("rangeBar","Range Bar","rangeBar","rangeRangeBar",!0),t("rangeArea","Range Area","rangeArea","rangeRangeArea",!0)],_key:"rangeStatisticalChart",_enterprise:!1},{name:e("hierarchicalChart","Hierarchical"),subMenu:[t("treemap","Treemap","treemap","rangeTreemap"),t("sunburst","Sunburst","sunburst","rangeSunburst")],_key:"rangeHierarchicalChart",_enterprise:!0},{name:e("specializedChart","Specialized"),subMenu:[t("heatmap","Heatmap","heatmap","rangeHeatmap"),t("waterfall","Waterfall","waterfall","rangeWaterfall")],_key:"rangeSpecializedChart",_enterprise:!0},{name:e("funnel","Funnel"),subMenu:[t("funnel","Funnel","funnel","rangeFunnel"),t("coneFunnel","Cone Funnel","coneFunnel","rangeConeFunnel"),t("pyramid","Pyramid","pyramid","rangePyramid")],_key:"rangeFunnel",_enterprise:!0},{name:e("combinationChart","Combination"),subMenu:[t("columnLineCombo","Column & Line","columnLineCombo","rangeColumnLineCombo"),t("AreaColumnCombo","Area & Column","areaColumnCombo","rangeAreaColumnCombo")],_key:"rangeCombinationChart"}],icon:oe("chart",this.beans,void 0)}}getConfigLookup(){return{columnGroup:{_key:"rangeColumnChart",column:"rangeGroupedColumn",stackedColumn:"rangeStackedColumn",normalizedColumn:"rangeNormalizedColumn"},barGroup:{_key:"rangeBarChart",bar:"rangeGroupedBar",stackedBar:"rangeStackedBar",normalizedBar:"rangeNormalizedBar"},pieGroup:{_key:"rangePieChart",pie:"rangePie",donut:"rangeDonut",doughnut:"rangeDonut"},lineGroup:{_key:"rangeLineChart",line:"rangeLineChart",stackedLine:"rangeStackedLine",normalizedLine:"rangeNormalizedLine"},areaGroup:{_key:"rangeAreaChart",area:"rangeArea",stackedArea:"rangeStackedArea",normalizedArea:"rangeNormalizedArea"},scatterGroup:{_key:"rangeXYChart",bubble:"rangeBubble",scatter:"rangeScatter"},polarGroup:{_key:"rangePolarChart",radarLine:"rangeRadarLine",radarArea:"rangeRadarArea",nightingale:"rangeNightingale",radialColumn:"rangeRadialColumn",radialBar:"rangeRadialBar"},statisticalGroup:{_key:"rangeStatisticalChart",boxPlot:"rangeBoxPlot",histogram:"rangeHistogram",rangeBar:"rangeRangeBar",rangeArea:"rangeRangeArea"},hierarchicalGroup:{_key:"rangeHierarchicalChart",treemap:"rangeTreemap",sunburst:"rangeSunburst"},specializedGroup:{_key:"rangeSpecializedChart",heatmap:"rangeHeatmap",waterfall:"rangeWaterfall"},funnelGroup:{_key:"rangeFunnel",funnel:"rangeFunnel",coneFunnel:"rangeConeFunnel",pyramid:"rangePyramid"},combinationGroup:{_key:"rangeCombinationChart",columnLineCombo:"rangeColumnLineCombo",areaColumnCombo:"rangeAreaColumnCombo",customCombo:null}}}},sD=class extends M{constructor(){super(...arguments),this.beanName="colChooserFactory"}createColumnSelectPanel(e,t,o,i){const s=e.createManagedBean(new eD),n=i??t?.getColDef().columnChooserParams??{},{contractColumnSelection:r,suppressColumnExpandAll:a,suppressColumnFilter:l,suppressColumnSelectAll:d,suppressSyncLayoutWithGrid:c,columnLayout:u}=n;return s.init(!!o,Z(this.gos,{suppressColumnMove:!1,suppressValues:!1,suppressPivots:!1,suppressRowGroups:!1,suppressPivotMode:!1,contractColumnSelection:!!r,suppressColumnExpandAll:!!a,suppressColumnFilter:!!l,suppressColumnSelectAll:!!d,suppressSyncLayoutWithGrid:!!u||!!c,onStateUpdated:()=>{}}),"columnMenu"),u&&s.setColumnLayout(u),s}showColumnChooser({column:e,chooserParams:t,eventSource:o,headerPosition:i}){this.hideActiveColumnChooser();const s=this.createColumnSelectPanel(this,e,!0,t),n=this.getLocaleTextFunc(),r=this.beans,{visibleCols:a,focusSvc:l,menuUtils:d}=r,c=a.allCols.indexOf(e),u=e?l.focusedHeader??i??null:null;this.activeColumnChooserDialog=this.createBean(new Cx({title:n("chooseColumns","Choose Columns"),component:s,width:300,height:300,resizable:!0,movable:!0,centered:!0,closable:!0,afterGuiAttached:()=>{Kt(r,s.getGui())?.focus({preventScroll:!0}),this.dispatchVisibleChangedEvent(!0,e)},closedCallback:p=>{const g=this.activeColumnChooser.getGui();this.destroyBean(this.activeColumnChooser),this.activeColumnChooser=void 0,this.activeColumnChooserDialog=void 0,this.dispatchVisibleChangedEvent(!1,e),e&&d.restoreFocusOnClose({column:e,headerPosition:u,columnIndex:c,eventSource:o},g,p,!0)},postProcessPopupParams:{type:"columnChooser",column:e,eventSource:o}})),this.activeColumnChooser=s}hideActiveColumnChooser(){this.destroyBean(this.activeColumnChooserDialog)}dispatchVisibleChangedEvent(e,t){this.eventSvc.dispatchEvent({type:"columnMenuVisibleChanged",visible:e,switchingTab:!1,key:"columnChooser",column:t??null})}},Eo="separator";function Ch(e,t){if(e)for(let o=e.length-2;o>=0;o--){const i=e[o]===t,s=e[o+1]===t;i&&s&&e.splice(o+1,1)}}var nD=class extends M{constructor(){super(...arguments),this.beanName="menuItemMapper"}mapWithStockItems(e,t,o,i){if(!e)return[];const s=[],n=this.getLocaleTextFunc(),{beans:r,gos:a}=this,{validation:l,pinnedCols:d,colAutosize:c,aggFuncSvc:u,rowGroupColsSvc:p,colNames:g,colModel:f,clipboardSvc:m,expansionSvc:C,focusSvc:v,csvCreator:S,excelCreator:b,menuSvc:x,colChooserFactory:T,sortSvc:A,chartMenuItemMapper:P,valueColsSvc:y}=r,w=(R,F,H,z)=>{switch(l?.validateMenuItem(R),R){case"pinSubMenu":return d&&F?{name:n("pinColumn","Pin Column"),icon:oe("menuPin",r,null),subMenu:["clearPinned","pinLeft","pinRight"]}:null;case"pinLeft":return d&&F?{name:n("pinLeft","Pin Left"),action:()=>d.setColsPinned([F],"left",z),checked:!!F&&F.isPinnedLeft()}:null;case"pinRight":return d&&F?{name:n("pinRight","Pin Right"),action:()=>d.setColsPinned([F],"right",z),checked:!!F&&F.isPinnedRight()}:null;case"clearPinned":return d&&F?{name:n("noPin","No Pin"),action:()=>d.setColsPinned([F],null,z),checked:!!F&&!F.isPinned()}:null;case"valueAggSubMenu":return u&&y&&(F?.isPrimary()||F?.getColDef().pivotValueColumn)?{name:n("valueAggregation","Value Aggregation"),icon:oe("menuValue",r,null),subMenu:rD(F,u,y,n),disabled:a.get("functionsReadOnly")}:null;case"autoSizeThis":return c?{name:n("autosizeThisColumn","Autosize This Column"),action:()=>c.autoSizeColumn(F,z,a.get("skipHeaderOnAutoSize"))}:null;case"autoSizeAll":return c?{name:n("autosizeAllColumns","Autosize All Columns"),action:()=>c.autoSizeAllColumns(z,a.get("skipHeaderOnAutoSize"))}:null;case"rowGroup":return p?{name:n("groupBy","Group by")+" "+St(g.getDisplayNameForColumn(F,"header")),disabled:a.get("functionsReadOnly")||F?.isRowGroupActive()||!F?.getColDef().enableRowGroup,action:()=>p.addColumns([F],z),icon:oe("menuAddRowGroup",r,null)}:null;case"rowUnGroup":if(p&&a.isModuleRegistered("SharedRowGrouping")){const k=F?.getColDef().showRowGroup,V=a.get("groupLockGroupColumns");let G,B,N;if(k===!0)G=n("ungroupAll","Un-Group All"),B=a.get("functionsReadOnly")||V===-1||V>=(p.columns.length??0),N=()=>p.setColumns(p.columns.slice(0,V),z);else if(typeof k=="string"){const L=f.getColDefCol(k),Y=L!=null?St(g.getDisplayNameForColumn(L,"header")):k;G=n("ungroupBy","Un-Group by")+" "+Y,B=a.get("functionsReadOnly")||Sn(L,r),N=()=>{p.removeColumns([k],z)}}else G=n("ungroupBy","Un-Group by")+" "+St(g.getDisplayNameForColumn(F,"header")),B=a.get("functionsReadOnly")||!F?.isRowGroupActive()||!F?.getColDef().enableRowGroup||Sn(F,r),N=()=>p.removeColumns([F],z);return{name:G,disabled:B,action:N,icon:oe("menuRemoveRowGroup",r,null)}}else return null;case"resetColumns":return{name:n("resetColumns","Reset Columns"),action:()=>Oc(r,z)};case"expandAll":return C?{name:n("expandAll","Expand All Row Groups"),action:()=>C.expandAll(!0)}:null;case"contractAll":return C?{name:n("collapseAll","Collapse All Row Groups"),action:()=>C.expandAll(!1)}:null;case"copy":return m?{name:n("copy","Copy"),shortcut:n("ctrlC","Ctrl+C"),icon:oe("clipboardCopy",r,null),action:()=>m.copyToClipboard()}:null;case"copyWithHeaders":return m?{name:n("copyWithHeaders","Copy with Headers"),icon:oe("clipboardCopy",r,null),action:()=>m.copyToClipboard({includeHeaders:!0})}:null;case"copyWithGroupHeaders":return m?{name:n("copyWithGroupHeaders","Copy with Group Headers"),icon:oe("clipboardCopy",r,null),action:()=>m.copyToClipboard({includeHeaders:!0,includeGroupHeaders:!0})}:null;case"cut":if(m){const k=v.getFocusedCell(),V=k?Da(r,k):null,G=V?k?.column.isCellEditable(V):!1;return{name:n("cut","Cut"),shortcut:n("ctrlX","Ctrl+X"),icon:oe("clipboardCut",r,null),disabled:!G||a.get("suppressCutToClipboard"),action:()=>m.cutToClipboard(void 0,"contextMenu")}}else return null;case"paste":return m?{name:n("paste","Paste"),shortcut:n("ctrlV","Ctrl+V"),disabled:!0,icon:oe("clipboardPaste",r,null),action:()=>m.pasteFromClipboard()}:null;case"export":{const k=[];return!a.get("suppressCsvExport")&&S&&k.push("csvExport"),!a.get("suppressExcelExport")&&b&&k.push("excelExport"),k.length?{name:n("export","Export"),subMenu:k,icon:oe("save",r,null)}:null}case"csvExport":return S?{name:n("csvExport","CSV Export"),icon:oe("csvExport",r,null),action:()=>S.exportDataAsCsv()}:null;case"excelExport":return b?{name:n("excelExport","Excel Export"),icon:oe("excelExport",r,null),action:()=>b.exportDataAsExcel()}:null;case"separator":return"separator";case"pivotChart":case"chartRange":return P.getChartItems(R);case"columnFilter":return x&&F?{name:n("columnFilter","Column Filter"),icon:oe("filter",r,null),action:()=>x.showFilterMenu({column:F,buttonElement:H(),containerType:"columnFilter",positionBy:"button"})}:null;case"columnChooser":{const k=v.focusedHeader;return T?{name:n("columnChooser","Choose Columns"),icon:oe("columns",r,null),action:()=>T.showColumnChooser({column:F,eventSource:H(),headerPosition:k})}:null}case"sortAscending":return A?{name:n("sortAscending","Sort Ascending"),icon:oe("sortAscending",r,null),action:()=>A.setSortForColumn(F,"asc",!1,z)}:null;case"sortDescending":return A?{name:n("sortDescending","Sort Descending"),icon:oe("sortDescending",r,null),action:()=>A.setSortForColumn(F,"desc",!1,z)}:null;case"sortUnSort":return A?{name:n("sortUnSort","Clear Sort"),icon:oe("sortUnSort",r,null),action:()=>A.setSortForColumn(F,null,!1,z)}:null;default:return _(176,{key:R}),null}};return e.forEach(R=>{let F;if(typeof R=="string"?F=w(R,t,o,i):F={...R},!F)return;const H=F,{subMenu:z}=H;z&&z instanceof Array&&(H.subMenu=this.mapWithStockItems(z,t,o,i)),F!=null&&s.push(F)}),Ch(s,Eo),s}};function rD(e,t,o,i){let s;if(e.isPrimary())s=e;else{const r=e.getColDef().pivotValueColumn;s=j(r)?r:void 0}const n=[];if(s){const r=s.isValueActive(),a=t.getFuncNames(s);n.push({name:i("noAggregation","None"),action:()=>{o.removeColumns([s],"contextMenu"),o.setColumnAggFunc(s,void 0,"contextMenu")},checked:!r}),a.forEach(l=>{n.push({name:i(l,t.getDefaultFuncLabel(l)),action:()=>{o.setColumnAggFunc(s,l,"contextMenu"),o.addColumns([s],"contextMenu")},checked:r&&s.getAggFunc()===l})})}return n}var aD=class extends M{constructor(){super(...arguments),this.beanName="colMenuFactory"}createMenu(e,t,o,i){const s=e.createManagedBean(new Wa(0,{column:o??null,node:null,value:null})),n=this.beans.menuItemMapper.mapWithStockItems(t,o??null,i,"columnMenu");return s.addMenuItems(n),s}getMenuItems(e=null,t=null){const o=this.getDefaultMenuOptions(e);let i;const s=(e?.getColDef()??t?.getColGroupDef())?.mainMenuItems;if(Array.isArray(s))i=s;else if(typeof s=="function")i=s(Z(this.gos,{column:e,columnGroup:t,defaultItems:o}));else{const n=this.gos.getCallback("getMainMenuItems");n?i=n({column:e,columnGroup:t,defaultItems:o}):i=o}return Ch(i,Eo),i}getDefaultMenuOptions(e){const t=[],{beans:o,gos:i}=this,{colChooserFactory:s,rowGroupColsSvc:n,colModel:r,expansionSvc:a,sortSvc:l,menuSvc:d,pinnedCols:c,aggFuncSvc:u,colAutosize:p}=o,g=Ve(i),f=()=>{!g&&s&&t.push("columnChooser"),t.push("resetColumns")};if(!e)return f(),t;const{colDef:m}=e,C=c&&!m.lockPinned,v=n?.columns.length??0,S=v>0,b=e.isPrimary(),x=u&&b&&S&&e.isAllowValue()||!b;if(l&&!g&&e.isSortable()){const T=e.getSort();T!=="asc"&&t.push("sortAscending"),T!=="desc"&&t.push("sortDescending"),T&&t.push("sortUnSort"),t.push(Eo)}if(d?.isFilterMenuItemEnabled(e)&&(t.push("columnFilter"),t.push(Eo)),C&&t.push("pinSubMenu"),x&&t.push("valueAggSubMenu"),(C||x)&&t.push(Eo),p&&(t.push("autoSizeThis"),t.push("autoSizeAll"),t.push(Eo)),n&&i.isModuleRegistered("SharedRowGrouping")){const T=t.length;m.showRowGroup?t.push("rowUnGroup"):e.isAllowRowGroup()&&b&&(e.isRowGroupActive()?Sn(e,o)||t.push("rowUnGroup"):t.push("rowGroup")),t.length>T&&t.push(Eo)}return f(),a&&Lt(i)&&(i.get("treeData")||v>(r.isPivotMode()?1:0))&&(t.push("expandAll"),t.push("contractAll")),t}};function lD(e){return{tag:"div",cls:`ag-tabs ${e}`,children:[{tag:"div",ref:"eHeader"},{tag:"div",ref:"eBody",role:"presentation",cls:`ag-tabs-body ${e?`${e}-body`:""}`}]}}var dD=class extends bi{constructor(e){super(lD(e.cssClass)),this.eHeader=O,this.eBody=O,this.items=[],this.tabbedItemScrollMap=new Map,this.params=e}postConstruct(){this.setupHeader(),this.params.items&&this.params.items.forEach(e=>this.addItem(e)),this.initialiseTabGuard({onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.handleKeyDown.bind(this),focusInnerElement:this.focusInnerElement.bind(this),focusTrapActive:!0}),this.addDestroyFunc(()=>this.activeItem?.tabbedItem?.afterDetachedCallback?.())}setupHeader(){const{enableCloseButton:e,cssClass:t}=this.params,o=(i,s)=>{i.classList.add(`ag-tabs-${s}`),t&&i.classList.add(`${t}-${s}`)};e?(this.setupCloseButton(o),this.eTabHeader=Le(this.beans).createElement("div"),o(this.eHeader,"header-wrapper"),qe(this.eHeader,"presentation"),this.eHeader.appendChild(this.eTabHeader)):this.eTabHeader=this.eHeader,qe(this.eTabHeader,"tablist"),o(this.eTabHeader,"header")}setupCloseButton(e){const t=Le(this.beans),o=t.createElement("button");e(o,"close-button");const i=oe("close",this.beans);ut(o,this.params.closeButtonAriaLabel),o.appendChild(i),this.addManagedElementListeners(o,{click:()=>this.params.onCloseClicked?.()});const s=t.createElement("div");e(s,"close-button-wrapper"),qe(s,"presentation"),s.appendChild(o),this.eHeader.appendChild(s),this.eCloseButton=o}handleKeyDown(e){switch(e.key){case D.RIGHT:case D.LEFT:{if(!this.eTabHeader.contains(Ee(this.beans)))return;const t=e.key===D.RIGHT,o=this.gos.get("enableRtl"),i=this.items.indexOf(this.activeItem),s=t!==o?Math.min(i+1,this.items.length-1):Math.max(i-1,0);if(i===s)return;e.preventDefault();const n=this.items[s];this.showItemWrapper(n),n.eHeaderButton.focus();break}case D.UP:case D.DOWN:e.stopPropagation();break}}onTabKeyDown(e){if(e.defaultPrevented)return;const{beans:t,eHeader:o,eBody:i,activeItem:s,params:n}=this,{suppressTrapFocus:r,enableCloseButton:a}=n,l=Ee(t),d=e.target,c=e.shiftKey;if(o.contains(l)){e.preventDefault(),a&&c&&!this.eCloseButton?.contains(l)?this.eCloseButton?.focus():r&&c?Xl(Le(t).body,d)?.focus():this.focusBody(e.shiftKey);return}let u=null;if(Sx(i,d)&&(c&&(u=Xl(i,d)),!u&&!r&&(u=s.eHeaderButton)),!u&&i.contains(l)&&(u=Kt(t,i,!1,c),!u)){r&&!c?this.forceFocusOutOfContainer(c):a&&!c?(e.preventDefault(),this.eCloseButton?.focus()):(e.preventDefault(),this.focusHeader());return}u&&(e.preventDefault(),u.focus())}focusInnerElement(e){return e?this.focusBody(!0):(this.focusHeader(),!0)}focusHeader(e){this.activeItem.eHeaderButton.focus({preventScroll:e})}focusBody(e){return It(this.eBody,e)}setAfterAttachedParams(e){this.afterAttachedParams=e}showFirstItem(){this.items.length>0&&this.showItemWrapper(this.items[0])}addItem(e){const t=Pe({tag:"span",cls:"ag-tab",role:"tab",attrs:{tabindex:"-1"}});t.appendChild(e.title),this.eTabHeader.appendChild(t),ut(t,e.titleLabel);const o={tabbedItem:e,eHeaderButton:t};this.items.push(o),t.addEventListener("click",this.showItemWrapper.bind(this,o))}showItem(e){const t=this.items.find(o=>o.tabbedItem===e);t&&this.showItemWrapper(t)}showItemWrapper(e){const{tabbedItem:t,eHeaderButton:o}=e;if(this.params.onItemClicked?.({item:t}),this.activeItem===e){this.params.onActiveItemClicked?.();return}this.lastScrollListener&&(this.lastScrollListener=this.lastScrollListener()),ct(this.eBody),t.bodyPromise.then(i=>{this.eBody.appendChild(i);const s=!Qc();if(this.params.suppressFocusBodyOnOpen||It(this.eBody,!1,s),t.afterAttachedCallback&&t.afterAttachedCallback(this.afterAttachedParams),this.params.keepScrollPosition){const n=t.getScrollableContainer&&t.getScrollableContainer()||i;[this.lastScrollListener]=this.addManagedElementListeners(n,{scroll:()=>{this.tabbedItemScrollMap.set(t.name,n.scrollTop)}});const r=this.tabbedItemScrollMap.get(t.name);r!==void 0&&setTimeout(()=>{n.scrollTop=r},0)}}),this.activeItem&&(this.activeItem.eHeaderButton.classList.remove("ag-tab-selected"),this.activeItem.tabbedItem.afterDetachedCallback?.()),o.classList.add("ag-tab-selected"),this.activeItem=e}},po="filterMenuTab",go="generalMenuTab",Ao="columnsMenuTab",_s=[go,po,Ao],cD=class extends M{constructor(){super(...arguments),this.beanName="enterpriseMenuFactory"}hideActiveMenu(){this.destroyBean(this.activeMenu)}showMenuAfterMouseEvent(e,t,o,i,s){const{column:n,columnGroup:r}=this.splitColumnOrGroup(e),a=s?"filterMenuTab":void 0;this.showMenu(n,r,l=>{const d=l.getGui();this.beans.popupSvc.positionPopupUnderMouseEvent({type:o,column:n,mouseEvent:t,ePopup:d}),a&&l.showTab?.(a),this.dispatchVisibleChangedEvent(!0,!1,n,r,a)},o,a,void 0,t.target,i)}splitColumnOrGroup(e){const t=e&&Ut(e);return{column:t?e:void 0,columnGroup:t?void 0:e}}showMenuAfterButtonClick(e,t,o,i,s){let n=-1,r="left";this.gos.get("enableRtl")&&(n=1,r="right");const a=s?"filterMenuTab":void 0,l=a?[a]:void 0,d=Ve(this.gos),c=(d?9:4)*n,u=d?-23:4,{column:p,columnGroup:g}=this.splitColumnOrGroup(e);this.showMenu(p,g,f=>{const m=f.getGui();this.beans.popupSvc.positionPopupByComponent({type:o,column:p,eventSource:t,ePopup:m,alignSide:r,nudgeX:c,nudgeY:u,position:"under",keepWithinBounds:!0}),a&&f.showTab?.(a),this.dispatchVisibleChangedEvent(!0,!1,p,g,a)},o,a,l,t,i)}showMenu(e,t,o,i,s,n,r,a){const l=this.getMenuParams(e,t,n,r);if(!l)return;const{menu:d,eMenuGui:c,anchorToElement:u,restoreFocusParams:p}=l,g=[],{menuUtils:f,popupSvc:m}=this.beans;g.push(v=>{const S=d.getGui();this.destroyBean(d),e&&(vn(e,!1,"contextMenu"),f.restoreFocusOnClose(p,S,v)),a?.()});const C=this.getLocaleTextFunc();if(m.addPopup({modal:!0,eChild:c,closeOnEsc:!0,closedCallback:v=>{g.forEach(S=>S(v)),this.dispatchVisibleChangedEvent(!1,!1,e,t,s)},afterGuiAttached:v=>d.afterGuiAttached(Object.assign({},{container:i},v)),positionCallback:s?()=>o(d):void 0,ariaLabel:C("ariaLabelColumnMenu","Column Menu")}),s||(d.showTabBasedOnPreviousSelection?.(),o(d)),Cc(this.gos)){const v=m.setPopupPositionRelatedToElement(c,u);v&&e&&this.addStopAnchoring(v,e,g)}d.addEventListener("tabSelected",v=>{this.dispatchVisibleChangedEvent(!1,!0,e),this.lastSelectedTab=v.key,this.dispatchVisibleChangedEvent(!0,!0,e)}),e&&vn(e,!0,"contextMenu"),this.activeMenu=d,d.addEventListener("destroyed",()=>{this.activeMenu===d&&(this.activeMenu=null)})}addStopAnchoring(e,t,o){e.then(i=>{t.__addEventListener("leftChanged",i),t.__addEventListener("visibleChanged",i),o.push(()=>{t.__removeEventListener("leftChanged",i),t.__removeEventListener("visibleChanged",i)})})}getMenuParams(e,t,o,i){const{focusSvc:s,visibleCols:n,ctrlsSvc:r}=this.beans,a={column:e,headerPosition:s.focusedHeader,columnIndex:n.allCols.indexOf(e),eventSource:i},l=this.createMenu(e,t,a,o,i);return l?{menu:l,eMenuGui:l.getGui(),anchorToElement:i||r.getGridBodyCtrl().eGridBody,restoreFocusParams:a}:void 0}createMenu(e,t,o,i,s){if(Ve(this.gos))return this.createBean(new uD(e,o,this.lastSelectedTab,i,s));{const n=this.beans.colMenuFactory.getMenuItems(e,t);return n.length?this.createBean(new hD(n,e,o,s)):void 0}}dispatchVisibleChangedEvent(e,t,o,i,s){this.eventSvc.dispatchEvent({type:"columnMenuVisibleChanged",visible:e,switchingTab:t,key:this.lastSelectedTab??s??(Ve(this.gos)?go:"columnMenu"),column:o??null,columnGroup:i??null})}isMenuEnabled(e){if(!Ve(this.gos))return!0;const t=!this.beans.filterManager?.isFilterAllowed(e),o=e.getColDef().menuTabs??_s;return(t&&o.includes(po)?o.length-1:o.length)>0}showMenuAfterContextMenuEvent(e,t,o){this.beans.menuUtils.onContextMenu({mouseEvent:t,touchEvent:o,source:"ui",showMenuCallback:i=>(this.showMenuAfterMouseEvent(e,i,"columnMenu"),!0)})}},uD=class extends M{constructor(e,t,o,i,s){super(),this.column=e,this.restoreFocusParams=t,this.initialSelection=o,this.restrictTo=i,this.sourceElement=s,this.tabFactories={},this.includeChecks={};const{tabFactories:n,includeChecks:r}=this;n[go]=this.createMainPanel.bind(this),n[po]=this.createFilterPanel.bind(this),n[Ao]=this.createColumnsPanel.bind(this),r[go]=()=>!0,r[po]=()=>e?!!this.beans.filterManager?.isFilterAllowed(e):!1,r[Ao]=()=>!0}postConstruct(){const e=this.getTabsToCreate().map(o=>this.createTab(o)),t=new dD({items:e,cssClass:"ag-menu",onActiveItemClicked:this.onHidePopup.bind(this),onItemClicked:this.onTabItemClicked.bind(this)});this.tabbedLayout=this.createBean(t),this.mainMenuList?.setParentComponent(t),this.addDestroyFunc(()=>this.destroyBean(t))}getTabsToCreate(){return this.restrictTo?this.restrictTo:(this.column?.getColDef().menuTabs??_s).filter(e=>this.isValidMenuTabItem(e)&&this.isNotSuppressed(e))}isValidMenuTabItem(e){let t=!0,o=_s;return this.restrictTo!=null&&(t=this.restrictTo.indexOf(e)>-1,o=this.restrictTo),t=t&&_s.indexOf(e)>-1,t||_(175,{menuTabName:e,itemsToConsider:o}),t}isNotSuppressed(e){return this.includeChecks[e]()}createTab(e){return this.tabFactories[e]()}showTabBasedOnPreviousSelection(){this.showTab(this.initialSelection)}showTab(e){const{tabItemColumns:t,tabbedLayout:o,tabItemFilter:i,tabItemGeneral:s}=this;t&&e===Ao?o.showItem(t):i&&e===po?o.showItem(i):s&&e===go?o.showItem(s):o.showFirstItem()}onTabItemClicked(e){let t=null;switch(e.item){case this.tabItemColumns:t=Ao;break;case this.tabItemFilter:t=po;break;case this.tabItemGeneral:t=go;break}t&&this.activateTab(t)}activateTab(e){const t={type:"tabSelected",key:e};this.dispatchLocalEvent(t)}createMainPanel(){const{beans:e,column:t}=this,o=e.colMenuFactory,i=o.createMenu(this,o.getMenuItems(t),this.column,()=>this.sourceElement??this.getGui());this.mainMenuList=i,i.addEventListener("closeMenu",this.onHidePopup.bind(this));const s={title:oe("legacyMenu",e,t),titleLabel:go.replace("MenuTab",""),bodyPromise:De.resolve(i.getGui()),name:go};return this.tabItemGeneral=s,s}onHidePopup(e){this.beans.menuUtils.closePopupAndRestoreFocusOnSelect(this.hidePopupFunc,this.restoreFocusParams,e)}createFilterPanel(){const e=this.column?this.createBean(new nu(this.column,"COLUMN_MENU")):null;this.filterComp=e,e?.hasFilter()||ae(119);const t=i=>e?.afterGuiAttached(i),o=()=>e?.afterGuiDetached();return this.tabItemFilter={title:oe("filterTab",this.beans,this.column),titleLabel:po.replace("MenuTab",""),bodyPromise:De.resolve(e?.getGui()),afterAttachedCallback:t,afterDetachedCallback:o,name:po},this.tabItemFilter}createColumnsPanel(){const e=Pe({tag:"div",cls:"ag-menu-column-select-wrapper"}),{beans:t,column:o}=this,s=t.colChooserFactory.createColumnSelectPanel(this,o).getGui();s.classList.add("ag-menu-column-select"),e.appendChild(s);const n={title:oe("columns",t,o),titleLabel:Ao.replace("MenuTab",""),bodyPromise:De.resolve(e),name:Ao};return this.tabItemColumns=n,n}afterGuiAttached(e){const{container:t,hidePopup:o}=e;this.tabbedLayout.setAfterAttachedParams({container:t,hidePopup:o}),o&&(this.hidePopupFunc=o,this.addDestroyFunc(o))}getGui(){return this.tabbedLayout.getGui()}destroy(){super.destroy(),this.destroyBean(this.filterComp)}},hD=class extends pe{constructor(e,t,o,i){super({tag:"div",ref:"eColumnMenu",cls:"ag-menu ag-column-menu",role:"presentation"}),this.menuItems=e,this.column=t,this.restoreFocusParams=o,this.sourceElement=i,this.eColumnMenu=O}postConstruct(){const e=this.beans.colMenuFactory.createMenu(this,this.menuItems,this.column,()=>this.sourceElement??this.getGui());this.mainMenuList=e,e.addEventListener("closeMenu",this.onHidePopup.bind(this)),this.eColumnMenu.appendChild(e.getGui())}onHidePopup(e){this.beans.menuUtils.closePopupAndRestoreFocusOnSelect(this.hidePopupFunc,this.restoreFocusParams,e)}afterGuiAttached({hidePopup:e}){e&&(this.hidePopupFunc=e,this.addDestroyFunc(e)),It(this.mainMenuList.getGui())}};function pD(e,t){e.colChooserFactory?.showColumnChooser({chooserParams:t})}function gD(e){e.colChooserFactory?.hideActiveColumnChooser()}var fD=class extends M{constructor(){super(...arguments),this.beanName="menuUtils"}restoreFocusOnClose(e,t,o,i){const{eventSource:s}=e,n=o instanceof KeyboardEvent;if(!i&&!n||!s)return;const r=Ee(this.beans);!t.contains(r)&&!rn(this.beans)||this.focusHeaderCell(e)}closePopupAndRestoreFocusOnSelect(e,t,o){let i;o&&o.keyboardEvent&&(i=o.keyboardEvent),e(i&&{keyboardEvent:i});const s=this.beans,n=s.focusSvc,r=n.getFocusedCell();if(rn(s))if(r){const{rowIndex:a,rowPinned:l,column:d}=r;n.setFocusedCell({rowIndex:a,column:d,rowPinned:l,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0})}else this.focusHeaderCell(t)}onContextMenu(e){const{mouseEvent:t,touchEvent:o,showMenuCallback:i,source:s}=e;if(!this.gos.get("allowContextMenuWithControlKey")&&t&&(t.ctrlKey||t.metaKey)||(t&&this.blockMiddleClickScrollsIfNeeded(t),s==="ui"&&this.gos.get("suppressContextMenu")))return;const n=t??o.touches[0];if(i(n)){const r=t??o;r&&r.cancelable&&r.preventDefault()}}async focusHeaderCell(e){const{column:t,columnIndex:o,headerPosition:i,eventSource:s}=e,{visibleCols:n,headerNavigation:r,focusSvc:a}=this.beans,l=await n.allCols.some(d=>d===t);if(this.isAlive()){if(t?.isAlive()&&l&&s&&ht(s)){const d=Fa(s);d&&(r?.scrollToColumn(t),d.focus())}else if(i&&o!==-1){const d=n.allCols,c=d[o]||ve(d);c&&a.focusHeaderPosition({headerPosition:{headerRowIndex:i.headerRowIndex,column:c}})}}}blockMiddleClickScrollsIfNeeded(e){this.gos.get("suppressMiddleClickScrolls")&&e.which===2&&e.preventDefault()}},mD={moduleName:"MenuCore",version:Ne,beans:[nD,tD,fD],icons:{chart:"chart",columns:"columns",loadingMenuItems:"loading",menuPin:"pin",menuValue:"aggregation",menuAddRowGroup:"group",menuRemoveRowGroup:"group",clipboardCopy:"copy",clipboardCut:"cut",clipboardPaste:"paste",save:"save",csvExport:"csv",excelExport:"excel",sortAscending:"asc",sortDescending:"desc",sortUnSort:"none"},dependsOn:[Rt,Bn,th,Fx]},CD={moduleName:"ColumnMenu",version:Ne,beans:[cD,aD,sD],icons:{legacyMenu:"menu",filterTab:"filter",columnSelectClosed:"tree-closed",columnSelectOpen:"tree-open",columnSelectIndeterminate:"tree-indeterminate"},apiFunctions:{showColumnChooser:pD,hideColumnChooser:gD},dependsOn:[mD,Mu,Au]},Io="__AG_SELECT_ALL__",Lo="__AG_ADD_SELECTION_TO_FILTER__",vD={loadingOoo:"Loading...",blanks:"(Blanks)",searchOoo:"Search...",selectAll:"(Select All)",selectAllSearchResults:"(Select All Search Results)",addCurrentSelectionToFilter:"Add current selection to filter",noMatches:"No matches."},wD={tag:"div",cls:"ag-set-filter-item",attrs:{"aria-hidden":"true"},children:[{tag:"span",cls:"ag-set-filter-group-icons",children:[{tag:"span",ref:"eGroupClosedIcon",cls:"ag-set-filter-group-closed-icon"},{tag:"span",ref:"eGroupOpenedIcon",cls:"ag-set-filter-group-opened-icon"},{tag:"span",ref:"eGroupIndeterminateIcon",cls:"ag-set-filter-group-indeterminate-icon"}]},{tag:"ag-checkbox",ref:"eCheckbox",cls:"ag-set-filter-item-checkbox"}]},SD={tag:"div",cls:"ag-set-filter-item",children:[{tag:"ag-checkbox",ref:"eCheckbox",cls:"ag-set-filter-item-checkbox"}]},yD=class extends pe{constructor(e){super(e.isGroup?wD:SD,[yi]),this.eCheckbox=O,this.eGroupOpenedIcon=O,this.eGroupClosedIcon=O,this.eGroupIndeterminateIcon=O,this.formattedValue=null,this.focusWrapper=e.focusWrapper,this.value=e.value,this.params=e.params,this.translate=e.translate,this.valueFormatter=e.valueFormatter,this.item=e.item,this.isSelected=e.isSelected,this.isTree=e.isTree,this.depth=e.depth??0,this.isGroup=e.isGroup,this.groupsExist=e.groupsExist,this.isExpanded=e.isExpanded,this.hasIndeterminateExpandState=e.hasIndeterminateExpandState}postConstruct(){this.tooltipFeature=this.createOptionalManagedBean(this.beans.registry.createDynamicBean("tooltipFeature",!1,{getGui:()=>this.getGui(),getColDef:()=>this.params.colDef,getColumn:()=>this.params.column,getLocation:()=>"setFilterValue",shouldDisplayTooltip:()=>this.shouldDisplayTooltip?.()??!0,getValueFormatted:()=>this.formattedValue,getAdditionalParams:()=>this.isTree?{level:this.depth}:{}})),this.addDestroyFunc(()=>this.destroyCellRendererComponent?.()),this.render(),this.eCheckbox.setLabelEllipsis(!0).setValue(this.isSelected,!0).setDisabled(!!this.params.readOnly).getInputElement().setAttribute("tabindex","-1"),this.refreshVariableAriaLabels(),this.isTree&&(this.depth>0&&(this.addCssClass("ag-set-filter-indent-"+this.depth),this.getGui().style.setProperty("--ag-indentation-level",String(this.depth))),this.isGroup?this.setupExpansion():this.groupsExist&&this.addCssClass("ag-set-filter-add-group-indent"),Nd(this.getAriaElement(),this.depth+1)),this.refreshAriaChecked(),!this.params.readOnly&&this.eCheckbox.onValueChange(e=>this.onCheckboxChanged(!!e))}getFocusableElement(){return this.focusWrapper}setupExpansion(){const{eGroupClosedIcon:e,eGroupOpenedIcon:t,eGroupIndeterminateIcon:o,hasIndeterminateExpandState:i,beans:s}=this;e.appendChild(ri("setFilterGroupClosed",s,null)),t.appendChild(ri("setFilterGroupOpen",s,null));const n=this.onExpandOrContractClicked.bind(this);this.addManagedElementListeners(e,{click:n}),this.addManagedElementListeners(t,{click:n}),i&&(o.appendChild(ri("setFilterGroupIndeterminate",s,null)),this.addManagedElementListeners(o,{click:n})),this.setExpandedIcons(),this.refreshAriaExpanded()}onExpandOrContractClicked(){this.setExpanded(!this.isExpanded)}setExpanded(e,t){if(this.isGroup&&e!==this.isExpanded){this.isExpanded=e;const o={type:"expandedChanged",isExpanded:!!e,item:this.item};t||this.dispatchLocalEvent(o),this.setExpandedIcons(),this.refreshAriaExpanded()}}setExpandedIcons(){const{isExpanded:e,hasIndeterminateExpandState:t,eGroupClosedIcon:o,eGroupOpenedIcon:i,eGroupIndeterminateIcon:s}=this;he(o,t?e===!1:!e),he(i,e===!0),t&&he(s,e===void 0)}onCheckboxChanged(e){this.isSelected=e;const t={type:"selectionChanged",isSelected:e,item:this.item};this.dispatchLocalEvent(t),this.refreshVariableAriaLabels(),this.refreshAriaChecked()}toggleSelected(){this.params.readOnly||this.setSelected(!this.isSelected)}setSelected(e,t){this.isSelected=e,this.eCheckbox.setValue(e,t),this.refreshAriaChecked()}refreshVariableAriaLabels(){if(!this.isTree)return;const e=this.getLocaleTextFunc(),t=this.eCheckbox.getValue(),o=t===void 0?e("ariaIndeterminate","indeterminate"):t?e("ariaVisible","visible"):e("ariaHidden","hidden"),i=e("ariaToggleVisibility","Press SPACE to toggle visibility");hi(this.eCheckbox.getInputElement(),void 0),this.eCheckbox.setInputAriaLabel(`${i} (${o})`)}setupFixedAriaLabels(e){if(!this.isTree)return;const o=this.getLocaleTextFunc()("ariaFilterValue","Filter Value"),i=this.getAriaElement();ut(i,`${e} ${o}`),aa(i,this.eCheckbox.getInputElement().id)}refreshAriaChecked(){const e=this.getAriaElement();$d(e,this.eCheckbox.getValue())}refreshAriaExpanded(){to(this.getAriaElement(),!!this.isExpanded)}refresh(e,t,o){this.item=e,t!==this.isSelected&&this.setSelected(t,!0),this.setExpanded(o,!0);const{cellRendererComponent:i,cellRendererParams:s,beans:n,params:r}=this;if(this.valueFunction){const a=this.valueFunction();this.setTooltipAndCellRendererParams(a,a),i||this.renderCellWithoutCellRenderer()}if(i){const a=mi(n.userCompFactory,r,s);if(!i.refresh?.(a?.params??s)){const d=i;this.renderCell(),this.destroyBean(d)}}}render(){const{params:{column:e}}=this;let{value:t}=this,o=null;typeof t=="function"?(this.valueFunction=t,o=this.valueFunction(),t=o):this.isTree?o=Qt(t):o=this.getFormattedValue(e,t),this.formattedValue=o,this.setTooltipAndCellRendererParams(t,o),this.renderCell()}setTooltipAndCellRendererParams(e,t){const o=this.gos;if(this.params.showTooltips&&(!Vi(o)||!this.params.cellRenderer)){const i=t??Qt(e);this.shouldDisplayTooltip=Oa(o,()=>this.eCheckbox.getGui().querySelector(".ag-label")),this.tooltipFeature?.setTooltipAndRefresh(i)}this.cellRendererParams=Z(o,{value:e,valueFormatted:t,colDef:this.params.colDef,column:this.params.column,setTooltip:(i,s)=>{o.assertModuleRegistered("Tooltip",3),this.shouldDisplayTooltip=s,this.tooltipFeature?.setTooltipAndRefresh(i)}})}getFormattedValue(e,t){return this.beans.valueSvc.formatValue(e,null,t,this.valueFormatter,!1)}renderCell(){const t=mi(this.beans.userCompFactory,this.params,this.cellRendererParams)?.newAgStackInstance();if(t==null){this.renderCellWithoutCellRenderer();return}t.then(o=>{o&&(this.cellRendererComponent=o,this.eCheckbox.setLabel(o.getGui()),this.destroyCellRendererComponent=()=>this.destroyBean(o))})}renderCellWithoutCellRenderer(){const{valueFormatted:e,value:t}=this.cellRendererParams;let o=e??t??this.translate("blanks");typeof o!="string"&&(_(208),o=""),this.eCheckbox.setLabel(o),this.setupFixedAriaLabels(o)}getComponentHolder(){return this.params.column.getColDef()}},vh=class{getModelAsString(e,t){const{values:o}=e||t.getModel()||{},i=t.getValueModel();if(o==null||i==null)return"";const s=o.filter(a=>i.isKeyAvailable(a)),n=s.length,r=s.slice(0,10).map(a=>t.getFormattedValue(a));return`(${n}) ${r.join(",")}${n>10?",...":""}`}};function Xr(e,t,o){let i=e;return i?(i=i.map(s=>Qt(ot(s))),!t&&o&&i.some(s=>s==null)?ve(i)==null?null:i.filter(s=>s!=null):i):null}var bD=class{constructor(e,t,o,i,s,n,r,a,l,d){this.rowModel=e,this.filterParams=t,this.createKey=o,this.caseFormat=i,this.valueSvc=s,this.treeDataOrGrouping=n,this.treeData=r,this.groupAllowUnbalanced=a,this.addManagedEventListeners=l,this.rowGroupColsSvc=d}extractUniqueValuesAsync(e,t){return new De(o=>{if(this.rowModel.isRowDataLoaded())o(this.extractUniqueValues(e,t));else{const[i]=this.addManagedEventListeners({rowCountReady:()=>{i?.(),o(this.extractUniqueValues(e,t))}})}})}extractUniqueValues(e,t){const o=new Map,i=this.extractExistingFormattedKeys(t),s=new Set,n=this.treeData,r=this.rowGroupColsSvc?.columns,a=(l,d)=>{const c=this.caseFormat(l);if(!s.has(c)){s.add(c);let u=l,p=ot(d);const g=i?.get(c);g!=null&&(u=g,p=t.get(g)),o.set(u,p)}};return this.rowModel.forEachLeafNode(l=>{if(!l.data||!e(l))return;if(this.treeDataOrGrouping){this.addValueForTreeDataOrGrouping(l,n,r,a);return}const d=this.getValue(l);d!=null&&Array.isArray(d)?(d.forEach(c=>{a(this.createKey(c,l),c)}),d.length===0&&a(null,null)):a(this.createKey(d,l),d)}),o}addValueForTreeDataOrGrouping(e,t,o=[],i){let s;if(t){if(e.childrenAfterGroup?.length)return;s=e.getRoute()??[e.key??e.id]}else s=o.map(r=>this.valueSvc.getKeyForNode(r,e)),s.push(this.getValue(e));const n=Xr(s,t,this.groupAllowUnbalanced);i(this.createKey(n),n)}getValue(e){return this.filterParams.getValue(e)}extractExistingFormattedKeys(e){if(!e)return null;const t=new Map;return e.forEach((o,i)=>{t.set(this.caseFormat(i),i)}),t}},RD=class{constructor({caseFormat:e}){this.filteringKeys=null,this.filteringKeysCaseFormatted=null,this.hasNoAppliedFilteringKeys=!1,this.caseFormat=e}allFilteringKeys(){return this.filteringKeys}allFilteringKeysCaseFormatted(){return this.filteringKeysCaseFormatted}setFilteringKeys(e){this.filteringKeys=new Set(e),this.hasNoAppliedFilteringKeys=!this.filteringKeys||this.filteringKeys.size===0,this.filteringKeysCaseFormatted=new Set,this.filteringKeys.forEach(t=>this.filteringKeysCaseFormatted.add(this.caseFormat(t)))}addFilteringKey(e){this.filteringKeys==null&&(this.filteringKeys=new Set,this.filteringKeysCaseFormatted=new Set),this.filteringKeys.add(e),this.filteringKeysCaseFormatted.add(this.caseFormat(e)),this.hasNoAppliedFilteringKeys&&(this.hasNoAppliedFilteringKeys=!1)}hasCaseFormattedFilteringKey(e){return this.filteringKeysCaseFormatted.has(this.caseFormat(e))}hasFilteringKey(e){return this.filteringKeys.has(e)}reset(){this.filteringKeys=null,this.filteringKeysCaseFormatted=null,this.hasNoAppliedFilteringKeys=!1}},FD=class{constructor(e,t,o,i){this.valueSvc=e,this.valueFormatter=t,this.formatter=o,this.column=i,this.displayedKeys=[]}updateDisplayedValuesToAllAvailable(e,t,o){this.displayedKeys=Array.from(o)}updateDisplayedValuesToMatchMiniFilter(e,t,o,i,s){this.displayedKeys=[];for(const n of o)if(n==null)s&&this.displayedKeys.push(n);else{const r=e(n),a=this.valueSvc.formatValue(this.column,null,r,this.valueFormatter,!1),l=this.formatter(a);i(l)&&this.displayedKeys.push(n)}}getDisplayedValueCount(){return this.displayedKeys.length}getDisplayedItem(e){return this.displayedKeys[e]}getSelectAllItem(){return Io}getAddSelectionToFilterItem(){return Lo}getDisplayedKeys(){return this.displayedKeys}forEachDisplayedKey(e){this.displayedKeys.forEach(e)}someDisplayedKey(e){return this.displayedKeys.some(e)}hasGroups(){return!1}refresh(){}},xD=e=>Me(e)?null:!(e instanceof Date)||isNaN(e.getTime())?["NaN"]:[String(e.getFullYear()),String(e.getMonth()+1),String(e.getDate())],id=class{constructor(e,t,o,i){this.formatter=e,this.treeListPathGetter=t,this.treeListFormatter=o,this.treeDataOrGrouping=i,this.allDisplayedItemsTree=[],this.activeDisplayedItemsFlat=[],this.selectAllItem={depth:0,filterPasses:!0,available:!0,treeKey:Io,children:this.allDisplayedItemsTree,expanded:!0,key:Io,parentTreeKeys:[]},this.addSelectionToFilterItem={depth:0,filterPasses:!0,available:!0,treeKey:Lo,expanded:!0,key:Lo,parentTreeKeys:[]}}updateOnParamsChange(e){this.treeListFormatter=e}updateDisplayedValuesToAllAvailable(e,t,o,i){i==="reload"?this.generateItemTree(e,t,o):i==="otherFilter"?(this.updateAvailable(o),this.updateExpandAll()):i==="miniFilter"&&(this.resetFilter(),this.updateExpandAll()),this.flattenItems()}updateDisplayedValuesToMatchMiniFilter(e,t,o,i,s,n){n==="reload"?this.generateItemTree(e,t,o):n==="otherFilter"&&this.updateAvailable(o),this.updateFilter(i,s),this.updateExpandAll(),this.flattenItems()}generateItemTree(e,t,o){this.allDisplayedItemsTree=[],this.groupsExist=!1;const i=this.getTreeListPathGetter(e,o);for(const s of t){const n=e(s),r=i(n)??[null];r.length>1&&(this.groupsExist=!0);const a=o.has(s);let l=this.allDisplayedItemsTree,d,c=[];r.forEach((u,p)=>{l||(l=[],d.children=l),d=l.find(g=>g.treeKey?.toUpperCase()===u?.toUpperCase()),d||(d={treeKey:u,depth:p,filterPasses:!0,expanded:!1,available:a,parentTreeKeys:c},p===r.length-1&&(d.key=s),l.push(d)),l=d.children,c=[...c,u]})}this.updateAvailable(o),this.selectAllItem.children=this.allDisplayedItemsTree,this.selectAllItem.expanded=!1}getTreeListPathGetter(e,t){if(this.treeListPathGetter)return this.treeListPathGetter;if(this.treeDataOrGrouping)return i=>i;let o=!1;for(const i of t){const s=e(i);if(s instanceof Date){o=!0;break}else if(s!=null)break}return o?xD:(_(211),i=>[String(i)])}flattenItems(){this.activeDisplayedItemsFlat=[];const e=t=>{t.forEach(o=>{!o.filterPasses||!o.available||(this.activeDisplayedItemsFlat.push(o),o.children&&o.expanded&&e(o.children))})};e(this.allDisplayedItemsTree)}resetFilter(){const e=t=>{t.children&&t.children.forEach(o=>{e(o)}),t.filterPasses=!0};this.allDisplayedItemsTree.forEach(t=>e(t))}updateFilter(e,t){const o=i=>i.available?i.treeKey==null?t:e(this.formatter(this.treeListFormatter?this.treeListFormatter(i.treeKey,i.depth,i.parentTreeKeys):i.treeKey)):!1;this.allDisplayedItemsTree.forEach(i=>this.recursiveItemCheck(i,!1,o,"filterPasses"))}getDisplayedValueCount(){return this.activeDisplayedItemsFlat.length}getDisplayedItem(e){return this.activeDisplayedItemsFlat[e]}getSelectAllItem(){return this.selectAllItem}getAddSelectionToFilterItem(){return this.addSelectionToFilterItem}getDisplayedKeys(){const e=[];return this.forEachDisplayedKey(t=>e.push(t)),e}forEachDisplayedKey(e){const t=(o,i)=>{o.children?(!o.expanded||!i)&&o.children.forEach(s=>{s.filterPasses&&t(s,!1)}):e(o.key)};this.activeDisplayedItemsFlat.forEach(o=>t(o,!0))}someDisplayedKey(e){const t=(o,i)=>{if(o.children){if(!o.expanded||!i)return o.children.some(s=>s.filterPasses?t(s,!1):!1)}else return e(o.key);return!1};return this.activeDisplayedItemsFlat.some(o=>t(o,!0))}hasGroups(){return this.groupsExist}refresh(){this.updateExpandAll(),this.flattenItems()}updateExpandAll(){const e=(o,i,s)=>{for(const n of o){if(!n.filterPasses||!n.available||!n.children)continue;if(i=i||!!n.expanded,s=s||!n.expanded,i&&s)return;const r=e(n.children,i,s);if(r===void 0)return;r?i=!0:s=!0}return i&&s?void 0:i},t=this.getSelectAllItem();t.expanded=e(t.children,!1,!1)}recursiveItemCheck(e,t,o,i){let s=!1;e.children&&e.children.forEach(r=>{const a=this.recursiveItemCheck(r,t||o(e),o,i);s=s||a});const n=t||s||o(e);return e[i]=n,n}updateAvailable(e){const t=o=>e.has(o.key);this.allDisplayedItemsTree.forEach(o=>this.recursiveItemCheck(o,!1,t,"available"))}},DD=class{constructor(e){this.localEventService=new eo,this.miniFilterText=null,this.addCurrentSelectionToFilter=!1,this.providedValues=null,this.allValues=new Map,this.availableKeys=new Set,this.selectedKeys=new Set,this.initialised=!1;const{usingComplexObjects:t,rowGroupColsSvc:o,valueSvc:i,treeDataTreeList:s,groupingTreeList:n,filterParams:r,gos:a,valueFormatter:l,addManagedEventListeners:d}=e,{column:c,colDef:u,textFormatter:p,doesRowPassOtherFilter:g,suppressSorting:f,comparator:m,rowModel:C,values:v,caseSensitive:S,treeList:b,treeListPathGetter:x,treeListFormatter:T}=r;this.filterParams=r,this.gos=a,this.setIsLoading=e.setIsLoading,this.translate=e.translate,this.caseFormat=e.caseFormat,this.createKey=e.createKey,this.usingComplexObjects=!!e.usingComplexObjects,this.formatter=p??(w=>w??null),this.doesRowPassOtherFilters=g,this.suppressSorting=f||!1,this.filteringKeys=new RD({caseFormat:this.caseFormat});const A=m??u.comparator,P=!!s||!!n;this.compareByValue=!!(t&&A||P||b&&!x),P&&!A?this.entryComparator=this.createTreeDataOrGroupingComparator():b&&!x&&!A?this.entryComparator=([w,R],[F,H])=>Gs(R,H):this.entryComparator=([w,R],[F,H])=>A(R,H),this.keyComparator=A??Gs,this.caseSensitive=!!S;const y=a.get("groupAllowUnbalanced");Lt(a)&&(this.clientSideValuesExtractor=new bD(C,this.filterParams,this.createKey,this.caseFormat,i,P,!!s,y,d,o)),v==null?this.valuesType=2:(this.valuesType=Array.isArray(v)?0:1,this.providedValues=v),this.displayValueModel=b?new id(this.formatter,x,T,s||n):new FD(i,l,this.formatter,c),this.updateAllValues().then(w=>this.resetSelectionState(w||[]))}addEventListener(e,t,o){this.localEventService.addEventListener(e,t,o)}removeEventListener(e,t,o){this.localEventService.removeEventListener(e,t,o)}updateOnParamsChange(e){return new De(t=>{const{values:o,textFormatter:i,suppressSorting:s,treeListFormatter:n}=e,r=this.providedValues,a=this.suppressSorting;if(this.filterParams=e,this.formatter=i??(l=>l??null),this.suppressSorting=s||!1,this.providedValues=o??null,this.displayValueModel instanceof id&&this.displayValueModel.updateOnParamsChange(n),this.providedValues!==r||this.suppressSorting!==a){!o||o.length===0?(this.valuesType=2,this.providedValues=null):this.valuesType=Array.isArray(o)?0:1;const l=this.getModel();this.updateAllValues().then(()=>{this.setModel(l).then(()=>t())})}else t()})}refreshValues(){return new De(e=>{this.allValuesPromise.then(()=>{const t=this.getModel();this.updateAllValues(),this.setModel(t).then(()=>e())})})}overrideValues(e){return new De(t=>{this.allValuesPromise.then(()=>{this.valuesType=0,this.providedValues=e,this.refreshValues().then(()=>t())})})}refreshAfterAnyFilterChanged(){return this.showAvailableOnly()?this.allValuesPromise.then(e=>(this.updateAvailableKeys(e??[],"otherFilter"),!0)):De.resolve(!1)}isInitialised(){return this.initialised}updateAllValues(){return this.allValuesPromise=new De(e=>{switch(this.valuesType){case 2:this.getValuesFromRowsAsync(!1).then(t=>e(this.processAllValues(t)));break;case 0:{e(this.processAllValues(this.uniqueValues(this.validateProvidedValues(this.providedValues))));break}case 1:{this.setIsLoading(!0);const t=this.providedValues,{column:o,colDef:i}=this.filterParams,s=Z(this.gos,{success:n=>{this.setIsLoading(!1),e(this.processAllValues(this.uniqueValues(this.validateProvidedValues(n))))},colDef:i,column:o});window.setTimeout(()=>t(s),0);break}}}),this.allValuesPromise.then(e=>this.updateAvailableKeys(e||[],"reload")).then(()=>this.initialised=!0),this.allValuesPromise}processAllValues(e){const t=this.sortKeys(e);return this.allValues=e??new Map,t}validateProvidedValues(e){if(this.usingComplexObjects&&e?.length){const t=e[0];t&&typeof t!="object"&&typeof t!="function"&&(this.createKey(t)==null?_(209):_(210))}return e}setValuesType(e){this.valuesType=e}getValuesType(){return this.valuesType}isKeyAvailable(e){return this.availableKeys.has(e)}showAvailableOnly(){return this.valuesType===2}updateAvailableKeys(e,t){const o=this.showAvailableOnly()?this.sortKeys(this.getValuesFromRows(!0)):e;this.availableKeys=new Set(o),this.localEventService.dispatchEvent({type:"availableValuesChanged"}),this.updateDisplayedValues(t,e)}sortKeys(e){const t=e??new Map;if(this.suppressSorting)return Array.from(t.keys());let o;return this.compareByValue?o=Array.from(t.entries()).sort(this.entryComparator).map(([i])=>i):o=Array.from(t.keys()).sort(this.keyComparator),this.filterParams.excelMode&&t.has(null)&&(o=o.filter(i=>i!=null),o.push(null)),o}getParamsForValuesFromRows(e=!1){if(!this.clientSideValuesExtractor)return ae(113),null;const t=i=>!e||this.doesRowPassOtherFilters(i),o=e&&!this.caseSensitive?this.allValues:void 0;return{predicate:t,existingValues:o}}getValuesFromRows(e=!1){const t=this.getParamsForValuesFromRows(e);return t?this.clientSideValuesExtractor.extractUniqueValues(t.predicate,t.existingValues):null}getValuesFromRowsAsync(e=!1){const t=this.getParamsForValuesFromRows(e);return t?this.clientSideValuesExtractor.extractUniqueValuesAsync(t.predicate,t.existingValues):De.resolve(null)}setMiniFilter(e){return e=ot(e),this.miniFilterText===e?!1:(e===null&&this.setAddCurrentSelectionToFilter(!1),this.miniFilterText=e,this.updateDisplayedValues("miniFilter"),!0)}getMiniFilter(){return this.miniFilterText}updateDisplayedValues(e,t){if(e==="expansion"){this.displayValueModel.refresh();return}if(this.miniFilterText==null){this.displayValueModel.updateDisplayedValuesToAllAvailable(n=>this.getValue(n),t,this.availableKeys,e);return}const o=this.caseFormat(this.formatter(this.miniFilterText)||""),i=n=>n!=null&&this.caseFormat(n).indexOf(o)>=0,s=!!this.filterParams.excelMode&&i(this.translate("blanks"));this.displayValueModel.updateDisplayedValuesToMatchMiniFilter(n=>this.getValue(n),t,this.availableKeys,i,s,e)}getDisplayedValueCount(){return this.displayValueModel.getDisplayedValueCount()}getDisplayedItem(e){return this.displayValueModel.getDisplayedItem(e)}getSelectAllItem(){return this.displayValueModel.getSelectAllItem()}getAddSelectionToFilterItem(){return this.displayValueModel.getAddSelectionToFilterItem()}hasSelections(){return this.filterParams.defaultToNothingSelected?this.selectedKeys.size>0:this.allValues.size!==this.selectedKeys.size}getKeys(){return Array.from(this.allValues.keys())}getValues(){return Array.from(this.allValues.values())}getValue(e){return this.allValues.get(e)}setAddCurrentSelectionToFilter(e){this.addCurrentSelectionToFilter=e}isInWindowsExcelMode(){return this.filterParams.excelMode==="windows"}isAddCurrentSelectionToFilterChecked(){return this.isInWindowsExcelMode()&&this.addCurrentSelectionToFilter}showAddCurrentSelectionToFilter(){return this.isInWindowsExcelMode()&&j(this.miniFilterText)&&this.miniFilterText.length>0}selectAllMatchingMiniFilter(e=!1){this.miniFilterText==null?this.selectedKeys=new Set(this.allValues.keys()):(e&&this.selectedKeys.clear(),this.displayValueModel.forEachDisplayedKey(t=>this.selectedKeys.add(t)))}deselectAllMatchingMiniFilter(){this.miniFilterText==null?this.selectedKeys.clear():this.displayValueModel.forEachDisplayedKey(e=>this.selectedKeys.delete(e))}selectKey(e){this.selectedKeys.add(e)}deselectKey(e){this.filterParams.excelMode&&this.isEverythingVisibleSelected()&&this.resetSelectionState(this.displayValueModel.getDisplayedKeys()),this.selectedKeys.delete(e)}isKeySelected(e){return this.selectedKeys.has(e)}isEverythingVisibleSelected(){return!this.displayValueModel.someDisplayedKey(e=>!this.isKeySelected(e))}isNothingVisibleSelected(){return!this.displayValueModel.someDisplayedKey(e=>this.isKeySelected(e))}getModel(){if(!this.hasSelections())return null;const e=this.isAddCurrentSelectionToFilterChecked()?this.filteringKeys.allFilteringKeys():null;if(e&&e.size>0){if(this.selectedKeys){const t=new Set([...Array.from(e),...Array.from(this.selectedKeys).filter(o=>!e.has(o))]);return Array.from(t)}return Array.from(e)}return Array.from(this.selectedKeys)}setModel(e){return this.allValuesPromise.then(t=>{if(e==null)this.resetSelectionState(t??[]);else{this.selectedKeys.clear();const o=new Map;this.allValues.forEach((i,s)=>{o.set(this.caseFormat(s),s)}),e.forEach(i=>{const s=this.caseFormat(ot(i)),n=o.get(s);n!==void 0&&this.selectKey(n)})}})}uniqueValues(e){const t=new Map,o=new Set;return(e??[]).forEach(i=>{const s=ot(i),n=this.createKey(s),r=this.caseFormat(n);o.has(r)||(o.add(r),t.set(n,s))}),t}resetSelectionState(e){this.filterParams.defaultToNothingSelected?this.selectedKeys.clear():this.selectedKeys=new Set(e)}hasGroups(){return this.displayValueModel.hasGroups()}createTreeDataOrGroupingComparator(){return([e,t],[o,i])=>{if(t==null)return i==null?0:-1;if(i==null)return 1;for(let s=0;s<t.length;s++){if(s>=i.length)return 1;const n=Gs(t[s],i[s]);if(n!==0)return n}return 0}}setAppliedModelKeys(e){this.filteringKeys.setFilteringKeys(e)}addToAppliedModelKeys(e){this.filteringKeys.addFilteringKey(e)}getAppliedModelKeys(){return this.filteringKeys.allFilteringKeys()}getCaseFormattedAppliedModelKeys(){return this.filteringKeys.allFilteringKeysCaseFormatted()}hasAppliedModelKey(e){return this.filteringKeys.hasCaseFormattedFilteringKey(e)}hasAnyAppliedModelKey(){return!this.filteringKeys.hasNoAppliedFilteringKeys}},wh=class extends om{constructor(){super("setFilter"),this.filterType="set",this.eMiniFilter=O,this.eFilterLoading=O,this.eFilterLoadingIcon=O,this.eSetFilterList=O,this.eFilterNoMatches=O,this.caseSensitive=!1,this.treeDataTreeList=!1,this.groupingTreeList=!1,this.hardRefreshVirtualList=!1,this.noValueFormatterSupplied=!1,this.filterModelFormatter=new vh,this.updateSetFilterOnParamsChange=t=>{this.setFilterParams=t,this.caseSensitive=!!t.caseSensitive;const o=t.keyCreator??t.colDef.keyCreator;this.setValueFormatter(t.valueFormatter,o,!!t.treeList,!!t.colDef.refData);const i=t.column.getId().startsWith(Uo);this.treeDataTreeList=this.gos.get("treeData")&&!!t.treeList&&i,this.groupingTreeList=!!this.rowGroupColsSvc?.columns.length&&!!t.treeList&&i,this.createKey=this.generateCreateKey(o,this.treeDataTreeList||this.groupingTreeList)}}wireBeans(t){this.rowGroupColsSvc=t.rowGroupColsSvc,this.valueSvc=t.valueSvc,this.dataTypeSvc=t.dataTypeSvc}postConstruct(){super.postConstruct()}updateUiVisibility(){}createBodyTemplate(){return{tag:"div",cls:"ag-set-filter",children:[{tag:"div",ref:"eFilterLoading",cls:"ag-filter-loading ag-loading ag-hidden",children:[{tag:"span",ref:"eFilterLoadingIcon",cls:"ag-loading-icon"},{tag:"span",cls:"ag-loading-text",children:this.translateForSetFilter("loadingOoo")}]},{tag:"ag-input-text-field",ref:"eMiniFilter",cls:"ag-mini-filter"},{tag:"div",ref:"eFilterNoMatches",cls:"ag-filter-no-matches ag-hidden",children:this.translateForSetFilter("noMatches")},{tag:"div",ref:"eSetFilterList",cls:"ag-set-filter-list",role:"presentation"}]}}getAgComponents(){return[Ga]}handleKeyDown(t){if(super.handleKeyDown(t),!t.defaultPrevented)switch(t.key){case D.SPACE:this.handleKeySpace(t);break;case D.ENTER:this.handleKeyEnter(t);break;case D.LEFT:this.handleKeyLeft(t);break;case D.RIGHT:this.handleKeyRight(t);break}}handleKeySpace(t){this.getComponentForKeyEvent(t)?.toggleSelected()}handleKeyEnter(t){const{excelMode:o,readOnly:i}=this.setFilterParams;!o||i||(t.preventDefault(),this.onBtApply(!1,!1,t),this.setFilterParams.excelMode==="mac"&&this.eMiniFilter.getInputElement().select())}handleKeyLeft(t){this.getComponentForKeyEvent(t)?.setExpanded(!1)}handleKeyRight(t){this.getComponentForKeyEvent(t)?.setExpanded(!0)}getComponentForKeyEvent(t){if(!this.eSetFilterList.contains(Ee(this.beans)))return;const o=this.virtualList.getLastFocusedRow();if(o==null)return;const i=this.virtualList.getComponentAt(o);if(i==null)return;t.preventDefault();const{readOnly:s}=this.setFilterParams;if(!s)return i}getCssIdentifier(){return"set-filter"}setModel(t){return t==null&&this.valueModel.getModel()==null?(this.setMiniFilter(null),De.resolve()):super.setModel(t)}refresh(t){if(this.applyExcelModeOptions(t),!super.refresh(t))return!1;const o=this.setFilterParams;return["treeList","treeListPathGetter","caseSensitive","comparator","excelMode"].some(s=>t[s]!==o?.[s])||this.haveColDefParamsChanged(t)?!1:(super.updateParams(t),this.updateSetFilterOnParamsChange(t),this.updateMiniFilter(),t.suppressSelectAll!==o?.suppressSelectAll&&this.createVirtualListModel(t),this.valueModel.updateOnParamsChange(t).then(()=>{this.isAlive()&&this.refreshFilterValues()}),!0)}haveColDefParamsChanged(t){const{colDef:o,keyCreator:i}=t,{colDef:s,keyCreator:n}=this.setFilterParams,r=i??o.keyCreator,a=n??s?.keyCreator,l=o.filterValueGetter!==s?.filterValueGetter,d=r!==a,c=!!this.dataTypeSvc&&!!r&&this.dataTypeSvc.getFormatValue(o.cellDataType)===r&&o.valueFormatter!==s?.valueFormatter;return l||d||c}setModelAndRefresh(t){return this.valueModel.setModel(t).then(()=>{this.isAlive()&&this.checkAndRefreshVirtualList()})}resetUiToDefaults(){return this.setMiniFilter(null),this.setModelAndRefresh(null)}setModelIntoUi(t){this.setMiniFilter(null);const o=t==null?null:t.values;return this.setModelAndRefresh(o)}getModelFromUi(){const t=this.valueModel.getModel();return t?{values:t,filterType:this.filterType}:null}getValueModel(){return this.valueModel}areModelsEqual(t,o){return t==null&&o==null?!0:t!=null&&o!=null&&At(t.values,o.values)}setParams(t){this.applyExcelModeOptions(t),super.setParams(t),this.updateSetFilterOnParamsChange(t);const o=t.keyCreator??t.colDef.keyCreator;this.valueModel=new DD({filterParams:t,setIsLoading:i=>this.setIsLoading(i),translate:i=>this.translateForSetFilter(i),caseFormat:i=>this.caseFormat(i),createKey:this.createKey,valueFormatter:this.valueFormatter,usingComplexObjects:!!o,gos:this.gos,rowGroupColsSvc:this.rowGroupColsSvc,valueSvc:this.valueSvc,treeDataTreeList:this.treeDataTreeList,groupingTreeList:this.groupingTreeList,addManagedEventListeners:i=>this.addManagedEventListeners(i)}),this.initialiseFilterBodyUi(),this.addEventListenersForDataChanges()}onAddCurrentSelectionToFilterChange(t){this.valueModel.setAddCurrentSelectionToFilter(t)}setValueFormatter(t,o,i,s){let n=t;if(!n){if(o&&!i){ae(249);return}this.noValueFormatterSupplied=!0,s||(n=r=>Qt(r.value))}this.valueFormatter=n}generateCreateKey(t,o){return o&&!t?(ae(250),()=>null):t?(i,s=null)=>{const n=this.getKeyCreatorParams(i,s);return ot(t(n))}:i=>ot(Qt(i))}getFormattedValue(t){let o=this.valueModel.getValue(t);this.noValueFormatterSupplied&&(this.treeDataTreeList||this.groupingTreeList)&&Array.isArray(o)&&(o=ve(o));const i=this.valueSvc.formatValue(this.setFilterParams.column,null,o,this.valueFormatter,!1);return i??Qt(o)??this.translateForSetFilter("blanks")}applyExcelModeOptions(t){t.excelMode==="windows"?(t.buttons||(t.buttons=["apply","cancel"]),t.closeOnApply==null&&(t.closeOnApply=!0)):t.excelMode==="mac"&&(t.buttons||(t.buttons=["reset"]),t.applyMiniFilterWhileTyping==null&&(t.applyMiniFilterWhileTyping=!0),t.debounceMs==null&&(t.debounceMs=500)),t.excelMode&&t.defaultToNothingSelected&&(t.defaultToNothingSelected=!1,_(207))}addEventListenersForDataChanges(){if(!this.isValuesTakenFromGrid())return;this.addManagedPropertyListeners(["groupAllowUnbalanced"],()=>{this.syncAfterDataChange()});const t=tt(this,this.syncAfterDataChange.bind(this),0);this.addManagedEventListeners({cellValueChanged:o=>{o.column===this.setFilterParams.column&&t()}})}syncAfterDataChange(){const t=!this.applyActive||this.areModelsEqual(this.getModel(),this.getModelFromUi());return this.valueModel.refreshValues().then(()=>{this.isAlive()&&(this.checkAndRefreshVirtualList(),t&&this.onBtApply(!1,!0))})}setIsLoading(t){he(this.eFilterLoading,t),t||(this.hardRefreshVirtualList=!0)}initialiseFilterBodyUi(){this.initVirtualList(),this.initMiniFilter(),this.initLoading()}initLoading(){const t=oe("setFilterLoading",this.beans,this.setFilterParams.column);t&&this.eFilterLoadingIcon.appendChild(t)}initVirtualList(){const o=this.getLocaleTextFunc()("ariaFilterList","Filter List"),i=!!this.setFilterParams.treeList,s=this.virtualList=this.createBean(new dh({cssIdentifier:"filter",ariaRole:i?"tree":"listbox",listName:o})),n=this.eSetFilterList;i&&n.classList.add("ag-set-filter-tree-list"),n&&n.appendChild(s.getGui());const{cellHeight:r}=this.setFilterParams;r!=null&&s.setRowHeight(r);const a=(d,c)=>this.createSetListItem(d,i,c);s.setComponentCreator(a);const l=(d,c)=>this.updateSetListItem(d,c);s.setComponentUpdater(l),this.createVirtualListModel(this.setFilterParams)}createVirtualListModel(t){let o;t.suppressSelectAll?o=new MD(this.valueModel):o=new PD(this.valueModel,()=>this.isSelectAllSelected()),t.treeList&&(o=new ED(o)),this.virtualList.setModel(o)}getSelectAllLabel(){const t=this.valueModel.getMiniFilter()==null||!this.setFilterParams.excelMode?"selectAll":"selectAllSearchResults";return this.translateForSetFilter(t)}getAddSelectionToFilterLabel(){return this.translateForSetFilter("addCurrentSelectionToFilter")}createSetListItem(t,o,i){const s=this.valueModel.hasGroups(),{isSelected:n,isExpanded:r}=this.isSelectedExpanded(t),{value:a,depth:l,isGroup:d,hasIndeterminateExpandState:c,selectedListener:u,expandedListener:p}=this.newSetListItemAttributes(t),g={focusWrapper:i,value:a,params:this.setFilterParams,translate:m=>this.translateForSetFilter(m),valueFormatter:this.valueFormatter,item:t,isSelected:n,isTree:o,depth:l,groupsExist:s,isGroup:d,isExpanded:r,hasIndeterminateExpandState:c},f=this.createBean(new yD(g));return f.addEventListener("selectionChanged",u),p&&f.addEventListener("expandedChanged",p),f}newSetTreeItemAttributes(t){const o=this.valueModel.hasGroups();return t.key===Io?{value:()=>this.getSelectAllLabel(),isGroup:o,depth:t.depth,hasIndeterminateExpandState:!0,selectedListener:i=>this.onSelectAll(i.isSelected),expandedListener:i=>this.onExpandAll(i.item,i.isExpanded)}:t.key===Lo?{value:()=>this.getAddSelectionToFilterLabel(),depth:t.depth,isGroup:!1,hasIndeterminateExpandState:!1,selectedListener:i=>{this.onAddCurrentSelectionToFilterChange(i.isSelected)}}:t.children?{value:this.setFilterParams.treeListFormatter?.(t.treeKey,t.depth,t.parentTreeKeys)??t.treeKey,depth:t.depth,isGroup:!0,selectedListener:i=>this.onGroupItemSelected(i.item,i.isSelected),expandedListener:i=>this.onExpandedChanged(i.item,i.isExpanded)}:{value:this.setFilterParams.treeListFormatter?.(t.treeKey,t.depth,t.parentTreeKeys)??t.treeKey,depth:t.depth,selectedListener:i=>this.onItemSelected(i.item.key,i.isSelected)}}newSetListItemAttributes(t){return this.isSetFilterModelTreeItem(t)?this.newSetTreeItemAttributes(t):t===Io?{value:()=>this.getSelectAllLabel(),selectedListener:o=>this.onSelectAll(o.isSelected)}:t===Lo?{value:()=>this.getAddSelectionToFilterLabel(),selectedListener:o=>{this.onAddCurrentSelectionToFilterChange(o.isSelected)}}:{value:this.valueModel.getValue(t),selectedListener:o=>this.onItemSelected(o.item,o.isSelected)}}updateSetListItem(t,o){const{isSelected:i,isExpanded:s}=this.isSelectedExpanded(t);o.refresh(t,i,s)}isSelectedExpanded(t){let o,i;return this.isSetFilterModelTreeItem(t)?(i=t.expanded,t.key===Io?o=this.isSelectAllSelected():t.key===Lo?o=this.valueModel.isAddCurrentSelectionToFilterChecked():t.children?o=this.areAllChildrenSelected(t):o=this.valueModel.isKeySelected(t.key)):t===Io?o=this.isSelectAllSelected():t===Lo?o=this.valueModel.isAddCurrentSelectionToFilterChecked():o=this.valueModel.isKeySelected(t),{isSelected:o,isExpanded:i}}isSetFilterModelTreeItem(t){return t?.treeKey!==void 0}initMiniFilter(){const{eMiniFilter:t}=this,o=this.getLocaleTextFunc();t.setDisplayed(!this.setFilterParams.suppressMiniFilter),t.setValue(this.valueModel.getMiniFilter()),t.onValueChange(()=>this.onMiniFilterInput()),t.setInputAriaLabel(o("ariaSearchFilterValues","Search filter values")),this.addManagedElementListeners(t.getInputElement(),{keydown:i=>this.onMiniFilterKeyDown(i)})}updateMiniFilter(){const{eMiniFilter:t}=this;t.isDisplayed()!==!this.setFilterParams.suppressMiniFilter&&t.setDisplayed(!this.setFilterParams.suppressMiniFilter);const o=this.valueModel.getMiniFilter();t.getValue()!==o&&t.setValue(o)}afterGuiAttached(t){super.afterGuiAttached(t),this.resetExpansion(),this.refreshVirtualList();const{eMiniFilter:o}=this;o.setInputPlaceholder(this.translateForSetFilter("searchOoo")),(!t||!t.suppressFocus)&&(o.isDisplayed()?o.getFocusableElement().focus():this.virtualList.awaitStable(()=>this.virtualList.focusRow(0)))}afterGuiDetached(){super.afterGuiDetached(),this.setFilterParams.excelMode&&this.resetMiniFilter();const t=this.getModel();(this.setFilterParams.excelMode||!this.areModelsEqual(t,this.getModelFromUi()))&&(this.resetUiToActiveModel(t),this.showOrHideResults())}applyModel(t="api"){this.setFilterParams.excelMode&&t!=="rowDataUpdated"&&this.valueModel.isEverythingVisibleSelected()&&this.valueModel.selectAllMatchingMiniFilter();const o=this.valueModel.showAddCurrentSelectionToFilter()&&this.valueModel.isAddCurrentSelectionToFilterChecked();if(o&&!this.getModel())return!1;const i=super.applyModel(t),s=this.getModel();return s?(o||this.valueModel.setAppliedModelKeys(new Set),s.values.forEach(n=>{this.valueModel.addToAppliedModelKeys(n)})):o||this.valueModel.setAppliedModelKeys(null),i}isModelValid(t){return this.setFilterParams.excelMode?t==null||t.values.length>0:!0}doesFilterPass(t){if(!this.valueModel.getCaseFormattedAppliedModelKeys())return!0;if(!this.valueModel.hasAnyAppliedModelKey())return!1;const{node:o}=t;if(this.treeDataTreeList)return this.doesFilterPassForTreeData(o);if(this.groupingTreeList)return this.doesFilterPassForGrouping(o);const i=this.getValueFromNode(o);return i!=null&&Array.isArray(i)?i.length===0?this.valueModel.hasAppliedModelKey(null):i.some(s=>this.isInAppliedModel(this.createKey(s,o))):this.isInAppliedModel(this.createKey(i,o))}doesFilterPassForTreeData(t){return t.childrenAfterGroup?.length?!1:this.isInAppliedModel(this.createKey(Xr(t.getRoute()??[t.key??t.id],!0,this.gos.get("groupAllowUnbalanced"))))}doesFilterPassForGrouping(t){const o=(this.rowGroupColsSvc?.columns??[]).map(i=>this.valueSvc.getKeyForNode(i,t));return o.push(this.getValueFromNode(t)),this.isInAppliedModel(this.createKey(Xr(o,!1,this.gos.get("groupAllowUnbalanced"))))}isInAppliedModel(t){return this.valueModel.hasAppliedModelKey(t)}getValueFromNode(t){return this.setFilterParams.getValue(t)}getKeyCreatorParams(t,o=null){const{colDef:i,column:s,api:n,context:r}=this.setFilterParams;return{value:t,colDef:i,column:s,node:o,data:o?.data,api:n,context:r}}onNewRowsLoaded(){this.isValuesTakenFromGrid()&&this.syncAfterDataChange()}isValuesTakenFromGrid(){return this.valueModel.getValuesType()===2}setFilterValues(t){this.valueModel.overrideValues(t).then(()=>{this.isAlive()&&(this.checkAndRefreshVirtualList(),this.onUiChanged())})}resetFilterValues(){this.valueModel.setValuesType(2),this.syncAfterDataChange()}refreshFilterValues(){this.valueModel.isInitialised()&&this.valueModel.refreshValues().then(()=>{this.isAlive()&&(this.hardRefreshVirtualList=!0,this.checkAndRefreshVirtualList(),this.onUiChanged())})}onAnyFilterChanged(){setTimeout(()=>{this.isAlive()&&this.valueModel.refreshAfterAnyFilterChanged().then(t=>{t&&this.isAlive()&&(this.checkAndRefreshVirtualList(),this.showOrHideResults())})},0)}onMiniFilterInput(){if(!this.valueModel.setMiniFilter(this.eMiniFilter.getValue()))return;const{applyMiniFilterWhileTyping:t,readOnly:o}=this.setFilterParams;!o&&t?this.filterOnAllVisibleValues(!1):this.updateUiAfterMiniFilterChange()}updateUiAfterMiniFilterChange(){const{excelMode:t,readOnly:o}=this.setFilterParams;t==null||o?this.checkAndRefreshVirtualList():this.valueModel.getMiniFilter()==null?this.resetUiToActiveModel(this.getModel()):(this.valueModel.selectAllMatchingMiniFilter(!0),this.checkAndRefreshVirtualList(),this.onUiChanged()),this.showOrHideResults()}showOrHideResults(){const t=this.valueModel.getMiniFilter()!=null&&this.valueModel.getDisplayedValueCount()<1;he(this.eFilterNoMatches,t),he(this.eSetFilterList,!t)}resetMiniFilter(){this.eMiniFilter.setValue(null,!0),this.valueModel.setMiniFilter(null)}resetUiToActiveModel(t,o){this.setModelAndRefresh(t==null?null:t.values).then(()=>{this.isAlive()&&(this.onUiChanged(!1,"prevent"),o?.())})}handleCancelEnd(t){this.setMiniFilter(null),super.handleCancelEnd(t)}onMiniFilterKeyDown(t){const{excelMode:o,readOnly:i}=this.setFilterParams;t.key===D.ENTER&&!o&&!i&&this.filterOnAllVisibleValues()}filterOnAllVisibleValues(t=!0){this.valueModel.selectAllMatchingMiniFilter(!0),this.checkAndRefreshVirtualList(),this.onUiChanged(!1,t?"immediately":"debounce"),this.showOrHideResults()}focusRowIfAlive(t){return t==null?Promise.resolve():new Promise(o=>{window.setTimeout(()=>{this.isAlive()&&this.virtualList.focusRow(t),o()},0)})}onSelectAll(t){t?this.valueModel.selectAllMatchingMiniFilter():this.valueModel.deselectAllMatchingMiniFilter(),this.refreshAfterSelection()}onGroupItemSelected(t,o){const i=s=>{s.filterPasses&&(s.children?s.children.forEach(n=>i(n)):this.selectItem(s.key,o))};i(t),this.refreshAfterSelection()}onItemSelected(t,o){this.selectItem(t,o),this.refreshAfterSelection()}selectItem(t,o){o?this.valueModel.selectKey(t):this.valueModel.deselectKey(t)}onExpandAll(t,o){const i=s=>{s.filterPasses&&s.available&&s.children&&(s.children.forEach(n=>i(n)),s.expanded=o)};i(t),this.refreshAfterExpansion()}onExpandedChanged(t,o){t.expanded=o,this.refreshAfterExpansion()}refreshAfterExpansion(){const t=this.virtualList.getLastFocusedRow();this.valueModel.updateDisplayedValues("expansion"),this.checkAndRefreshVirtualList(),this.focusRowIfAlive(t)}refreshAfterSelection(){const t=this.virtualList.getLastFocusedRow();this.checkAndRefreshVirtualList(),this.onUiChanged(),this.focusRowIfAlive(t)}setMiniFilter(t){this.eMiniFilter.setValue(t),this.onMiniFilterInput()}getMiniFilter(){return this.valueModel.getMiniFilter()}checkAndRefreshVirtualList(){this.virtualList.refresh(!this.hardRefreshVirtualList),this.hardRefreshVirtualList&&(this.hardRefreshVirtualList=!1)}getFilterKeys(){return this.valueModel.getKeys()}getFilterValues(){return this.valueModel.getValues()}getValues(){return this.getFilterKeys()}refreshVirtualList(){this.setFilterParams.refreshValuesOnOpen?this.refreshFilterValues():this.checkAndRefreshVirtualList()}translateForSetFilter(t){return this.getLocaleTextFunc()(t,vD[t])}isSelectAllSelected(){if(this.setFilterParams.defaultToNothingSelected){if(this.valueModel.hasSelections()&&this.valueModel.isEverythingVisibleSelected())return!0;if(this.valueModel.isNothingVisibleSelected())return!1}else{if(this.valueModel.hasSelections()&&this.valueModel.isNothingVisibleSelected())return!1;if(this.valueModel.isEverythingVisibleSelected())return!0}}areAllChildrenSelected(t){const o=i=>{if(i.children){let s=!1,n=!1;return i.children.some(a=>{if(!a.filterPasses||!a.available)return!1;const l=o(a);return l===void 0?!0:(l?s=!0:n=!0,s&&n)})?void 0:s}else return this.valueModel.isKeySelected(i.key)};return this.setFilterParams.defaultToNothingSelected?this.valueModel.hasSelections()&&o(t):o(t)}destroy(){this.virtualList=this.destroyBean(this.virtualList),super.destroy()}caseFormat(t){return t==null||typeof t!="string"||this.caseSensitive?t:t.toUpperCase()}resetExpansion(){if(!this.setFilterParams.treeList)return;const t=this.valueModel.getSelectAllItem();if(this.isSetFilterModelTreeItem(t)){const o=i=>{i.children&&(i.children.forEach(s=>o(s)),i.expanded=!1)};o(t),this.valueModel.updateDisplayedValues("expansion")}}getModelAsString(t){return this.filterModelFormatter.getModelAsString(t,this)}getPositionableElement(){return this.eSetFilterList}},MD=class{constructor(e){this.model=e}getRowCount(){return this.model.getDisplayedValueCount()}getRow(e){return this.model.getDisplayedItem(e)}areRowsEqual(e,t){return e===t}},PD=class{constructor(e,t){this.model=e,this.isSelectAllSelected=t}getRowCount(){const t=this.model.showAddCurrentSelectionToFilter()?2:1;return this.model.getDisplayedValueCount()+t}getRow(e){if(e===0)return this.model.getSelectAllItem();const t=this.model.showAddCurrentSelectionToFilter(),o=t?2:1;return e===1&&t?this.model.getAddSelectionToFilterItem():this.model.getDisplayedItem(e-o)}areRowsEqual(e,t){return e===t}},ED=class{constructor(e){this.model=e}getRowCount(){return this.model.getRowCount()}getRow(e){return this.model.getRow(e)}areRowsEqual(e,t){return e==null&&t==null?!0:e!=null&&t!=null&&e.treeKey===t.treeKey&&e.depth===t.depth}},AD={tag:"div",cls:"ag-floating-filter-input ag-set-floating-filter-input",role:"presentation",children:[{tag:"ag-input-text-field",ref:"eFloatingFilterText"}]},TD=class extends pe{constructor(){super(AD,[Ga]),this.eFloatingFilterText=O,this.availableValuesListenerAdded=!1,this.filterModelFormatter=new vh}wireBeans(e){this.colNames=e.colNames}init(e){this.params=e,this.eFloatingFilterText.setDisabled(!0).addGuiEventListener("click",()=>this.params.showParentFilter()),this.setParams(e)}setParams(e){const t=this.colNames.getDisplayNameForColumn(e.column,"header",!0),o=this.getLocaleTextFunc();this.eFloatingFilterText.setInputAriaLabel(`${t} ${o("ariaFilterInput","Filter Input")}`)}refresh(e){this.params=e,this.setParams(e)}onParentModelChanged(e){this.updateFloatingFilterText(e)}parentSetFilterInstance(e){this.params.parentFilterInstance(t=>{if(!(t instanceof wh)){ae(248);return}e(t)})}addAvailableValuesListener(){this.parentSetFilterInstance(e=>{const t=e.getValueModel();t&&this.addManagedListeners(t,{availableValuesChanged:()=>this.updateFloatingFilterText()})}),this.availableValuesListenerAdded=!0}updateFloatingFilterText(e){this.availableValuesListenerAdded||this.addAvailableValuesListener(),this.parentSetFilterInstance(t=>{this.eFloatingFilterText.setValue(this.filterModelFormatter.getModelAsString(e,t))})}},ID={moduleName:"SetFilter",version:Ne,userComponents:{agSetColumnFilter:wh,agSetColumnFloatingFilter:TD},icons:{setFilterGroupClosed:"tree-closed",setFilterGroupOpen:"tree-open",setFilterGroupIndeterminate:"tree-indeterminate",setFilterLoading:"loading"},dependsOn:[Rt,CR]},LD=class extends M{constructor(){super(...arguments),this.beanName="aggColNameSvc"}getHeaderName(e,t){if(this.gos.get("suppressAggFuncInHeader"))return t;const{valueColsSvc:o,colModel:i,rowGroupColsSvc:s}=this.beans,n=e.getColDef().pivotValueColumn,r=j(n);let a=null,l;if(r){const d=o?.columns??[],c=this.gos.get("removePivotHeaderRowWhenSingleValueColumn")&&d.length===1,u=e.getColDef().pivotTotalColumnIds!==void 0;if(c&&!u)return t;a=n?n.getAggFunc():null,l=!0}else{const d=e.isValueActive(),c=i.isPivotMode()||s?.columns.length!==0;d&&c?(a=e.getAggFunc(),l=!0):l=!1}if(l){const d=typeof a=="string"?a:"func";return`${this.getLocaleTextFunc()(d,d)}(${t})`}return t}},kD={sum:"Sum",first:"First",last:"Last",min:"Min",max:"Max",count:"Count",avg:"Average"},GD=class extends M{constructor(){super(...arguments),this.beanName="aggFuncSvc",this.aggFuncsMap={},this.initialised=!1}postConstruct(){this.init()}init(){this.initialised||(this.initialiseWithDefaultAggregations(),this.addAggFuncs(this.gos.get("aggFuncs")))}initialiseWithDefaultAggregations(){const e=this.aggFuncsMap;e.sum=OD,e.first=BD,e.last=ND,e.min=HD,e.max=VD,e.count=_D,e.avg=zD,this.initialised=!0}isAggFuncPossible(e,t){const i=this.getFuncNames(e).includes(t),s=j(this.aggFuncsMap[t]);return i&&s}getDefaultFuncLabel(e){return kD[e]??e}getDefaultAggFunc(e){const t=e.getColDef().defaultAggFunc;if(j(t)&&this.isAggFuncPossible(e,t))return t;if(this.isAggFuncPossible(e,"sum"))return"sum";const o=this.getFuncNames(e);return o?.length?o[0]:null}addAggFuncs(e){if(this.init(),!!e)for(const t of Object.keys(e))this.aggFuncsMap[t]=e[t]}getAggFunc(e){return this.init(),this.aggFuncsMap[e]}getFuncNames(e){const t=e.getColDef().allowedAggFuncs;return t??Object.keys(this.aggFuncsMap).sort()}clear(){this.aggFuncsMap={}}};function OD(e){const{values:t}=e;let o=null;for(let i=0;i<t.length;i++){const s=t[i];typeof s=="number"?o===null?o=s:o+=typeof o=="number"?s:BigInt(s):typeof s=="bigint"&&(o===null?o=s:o=(typeof o=="bigint"?o:BigInt(o))+s)}return o}function BD(e){return e.values.length>0?e.values[0]:null}function ND(e){return e.values.length>0?ve(e.values):null}function HD(e){const{values:t}=e;let o=null;for(let i=0;i<t.length;i++){const s=t[i];(typeof s=="number"||typeof s=="bigint")&&(o===null||o>s)&&(o=s)}return o}function VD(e){const{values:t}=e;let o=null;for(let i=0;i<t.length;i++){const s=t[i];(typeof s=="number"||typeof s=="bigint")&&(o===null||o<s)&&(o=s)}return o}function _D(e){const{values:t}=e;let o=0;for(let s=0;s<t.length;s++){const n=t[s];o+=n!=null&&typeof n.value=="number"?n.value:1}const i=e.rowNode?.aggData?.[e.column.getColId()];return i&&i.value===o?i:{value:o,toString:function(){return this.value.toString()},toNumber:function(){return this.value}}}function zD(e){const{values:t}=e;let o=0,i=0;for(let r=0;r<t.length;r++){const a=t[r];let l=null;typeof a=="number"||typeof a=="bigint"?(l=a,i++):a!=null&&(typeof a.value=="number"||typeof a.value=="bigint")&&typeof a.count=="number"&&(l=a.value*(typeof a.value=="number"?a.count:BigInt(a.count)),i+=a.count),typeof l=="number"?o+=typeof o=="number"?l:BigInt(l):typeof l=="bigint"&&(o=(typeof o=="bigint"?o:BigInt(o))+l)}let s=null;i>0&&(s=o/(typeof o=="number"?i:BigInt(i)));const n=e.rowNode?.aggData?.[e.column?.getColId()];return n&&n.count===i&&n.value===s?n:{count:i,value:s,toString:function(){return typeof this.value=="number"||typeof this.value=="bigint"?this.value.toString():""},toNumber:function(){return this.value}}}function WD(e,t){e.aggFuncSvc&&e.aggFuncSvc.addAggFuncs(t)}function UD(e){e.aggFuncSvc&&e.aggFuncSvc.clear()}function $D(e,t,o){e.valueColsSvc?.setColumnAggFunc?.(t,o,"api")}function fr(e,t,o,i,s,n){const r=typeof o=="string"?e.aggFuncSvc.getAggFunc(o):o;if(typeof r!="function")return ae(109,{aggFuncOrString:o}),null;const a=Z(e.gos,{values:t,column:i,colDef:i.colDef,pivotResultColumn:n,rowNode:s,data:s?.data});return r(a)}var jD=class extends M{constructor(){super(...arguments),this.beanName="aggStage",this.refreshProps=new Set(["getGroupRowAgg","alwaysAggregateAtRootLevel","suppressAggFilteredOnly","grandTotalRow"]),this.step="aggregate"}wireBeans(e){this.colModel=e.colModel,this.pivotColsSvc=e.pivotColsSvc,this.valueColsSvc=e.valueColsSvc,this.pivotResultCols=e.pivotResultCols,this.valueSvc=e.valueSvc}execute(e){const t=!this.valueColsSvc?.columns?.length,o=!this.gos.getCallback("getGroupRowAgg");if(t&&o&&e.changedPath?.active)return;const i=this.createAggDetails(e);this.recursivelyCreateAggData(i)}createAggDetails(e){const t=this.colModel.isPivotActive(),o=this.valueColsSvc?.columns,i=t&&this.pivotColsSvc?this.pivotColsSvc.columns:[];return{alwaysAggregateAtRootLevel:this.gos.get("alwaysAggregateAtRootLevel"),groupIncludeTotalFooter:!!ma(this.gos),changedPath:e.changedPath,valueColumns:o??[],pivotColumns:i,filteredOnly:!this.isSuppressAggFilteredOnly(),userAggFunc:this.gos.getCallback("getGroupRowAgg")}}isSuppressAggFilteredOnly(){return Ji(this.gos)!==void 0||this.gos.get("suppressAggFilteredOnly")}recursivelyCreateAggData(e){const t=o=>{if(!o.hasChildren()){o.aggData&&this.setAggData(o,null);return}if(o.level===-1&&!e.groupIncludeTotalFooter){const n=!this.colModel.isPivotMode();if(!e.alwaysAggregateAtRootLevel&&n){this.setAggData(o,null);return}}this.aggregateRowNode(o,e)};e.changedPath.forEachChangedNodeDepthFirst(t,!0)}aggregateRowNode(e,t){const o=t.valueColumns.length===0,i=t.pivotColumns.length===0;let s;t.userAggFunc?s=t.userAggFunc({nodes:e.childrenAfterFilter}):o?s=null:i?s=this.aggregateRowNodeUsingValuesOnly(e,t):s=this.aggregateRowNodeUsingValuesAndPivot(e),this.setAggData(e,s),e.sibling&&this.setAggData(e.sibling,s)}aggregateRowNodeUsingValuesAndPivot(e){const t={},o=this.pivotResultCols?.getPivotResultCols()?.list??[];let i=!0;const s=this.beans;for(let n=0;n<o.length;n++){const r=o[n],a=r.getColDef();if(a.pivotTotalColumnIds!=null){i=!1;continue}const l=a.pivotKeys??[];let d;e.leafGroup?d=this.getValuesFromMappedSet(e.childrenMapped,l,a.pivotValueColumn):d=this.getValuesPivotNonLeaf(e,a.colId),t[a.colId]=fr(s,d,a.pivotValueColumn.getAggFunc(),a.pivotValueColumn,e,r)}if(!i)for(let n=0;n<o.length;n++){const r=o[n],a=r.getColDef();if(a.pivotTotalColumnIds==null||!a.pivotTotalColumnIds.length)continue;const l=a.pivotTotalColumnIds.map(d=>t[d]);t[a.colId]=fr(s,l,a.pivotValueColumn.getAggFunc(),a.pivotValueColumn,e,r)}return t}aggregateRowNodeUsingValuesOnly(e,t){const o={},{changedPath:i,valueColumns:s,filteredOnly:n}=t,r=i.active?i.getValueColumnsForNode(e,s):s,a=i.active?i.getNotValueColumnsForNode(e,s):null,l=this.getValuesNormal(e,r,n),d=e.aggData,c=this.beans;return r.forEach((u,p)=>{o[u.getId()]=fr(c,l[p],u.getAggFunc(),u,e)}),a&&d&&a.forEach(u=>{o[u.getId()]=d[u.getId()]}),o}getValuesPivotNonLeaf(e,t){return e.childrenAfterFilter.map(o=>o.aggData[t])}getValuesFromMappedSet(e,t,o){let i=e;for(let s=0;s<t.length;s++){const n=t[s];i=i?i[n]:null}return i?i.map(s=>this.valueSvc.getValue(o,s)):[]}getValuesNormal(e,t,o){const i=[];t.forEach(()=>i.push([]));const s=t.length,n=o?e.childrenAfterFilter:e.childrenAfterGroup,r=n.length;for(let a=0;a<r;a++){const l=n[a];for(let d=0;d<s;d++){const c=t[d],u=this.valueSvc.getValue(c,l);i[d].push(u)}}return i}setAggData(e,t){const o=e.aggData;if(e.aggData=t,e.__localEventService){const i=s=>{const n=e.aggData?e.aggData[s]:void 0,r=o?o[s]:void 0;if(n===r)return;const a=this.colModel.getCol(s);a&&e.dispatchCellChangedEvent(a,n,r)};if(o)for(const s of Object.keys(o))i(s);if(t)for(const s of Object.keys(t))(!o||!(s in o))&&i(s)}}},KD=class extends M{constructor(){super(...arguments),this.beanName="filterAggStage",this.refreshProps=new Set([]),this.step="filter_aggregates"}wireBeans(e){this.filterManager=e.filterManager}execute(e){const t=this.beans.colModel.isPivotMode(),o=this.filterManager?.isAggregateFilterPresent()||this.filterManager?.isAggregateQuickFilterPresent(),i=d=>!d.node.group,s=d=>d.node.leafGroup,n=Ji(this.gos)||(t?s:i),{changedPath:r}=e,a=(d,c=!1)=>{d.childrenAfterFilter&&(d.childrenAfterAggFilter=d.childrenAfterFilter,c&&d.childrenAfterAggFilter.forEach(u=>a(u,c)),this.setAllChildrenCount(d)),d.sibling&&(d.sibling.childrenAfterAggFilter=d.childrenAfterAggFilter)},l=d=>{d.childrenAfterAggFilter=d.childrenAfterFilter?.filter(c=>n({node:c})&&this.filterManager.doesRowPassAggregateFilters({rowNode:c})?(a(c,!0),!0):c.childrenAfterAggFilter?.length)||null,this.setAllChildrenCount(d),d.sibling&&(d.sibling.childrenAfterAggFilter=d.childrenAfterAggFilter)};r.forEachChangedNodeDepthFirst(o?l:a,!0)}setAllChildrenCountTreeData(e){const t=e.childrenAfterAggFilter;let o=0;if(t){const i=t.length;o=i;for(let s=0;s<i;++s)o+=t[s].allChildrenCount??0}e.setAllChildrenCount(o===0&&e.level>=0?null:o)}setAllChildrenCountGridGrouping(e){let t=0;e.childrenAfterAggFilter.forEach(o=>{o.group?t+=o.allChildrenCount:t++}),e.setAllChildrenCount(t)}setAllChildrenCount(e){if(!e.hasChildren()){e.setAllChildrenCount(null);return}this.gos.get("treeData")?this.setAllChildrenCountTreeData(e):this.setAllChildrenCountGridGrouping(e)}},YD=new Set(["__localEventService","__objectId","sticky","__autoHeights","__checkAutoHeightsDebounced"]);function Zt(e,t){if(e.sibling)return;const o=new jo(t);Object.keys(e).forEach(i=>{YD.has(i)||(o[i]=e[i])}),o.footer=!0,o.setRowTop(null),o.setRowIndex(null),o.oldRowTop=null,o.id="rowGroupFooter_"+e.id,o.sibling=e,e.sibling=o}function Ua(e){e.sibling&&(e.sibling.setRowTop(null),e.sibling.setRowIndex(null),e.sibling=void 0)}var qD=class extends M{constructor(){super(...arguments),this.beanName="footerSvc"}addTotalRows(e,t,o,i,s,n){let r=e;if(s)return(i&&ma(this.gos))===n&&(Zt(t,this.beans),o(t.sibling,r++)),r;const a=fi(this.gos);return(i&&a({node:t}))===n&&(Zt(t,this.beans),o(t.sibling,r++)),r}getTopDisplayIndex(e,t,o,i){let s=t;if(e[0].footer){if(t===0)return 0;s-=1}const n=e[e.length-1],r=s>=o.length;return n.footer&&r?n.rowIndex:i(s)}getTotalValue(e){return this.getLocaleTextFunc()("footerTotal","Total")+" "+(e??"")}},Sh=class extends ya{constructor(){super(...arguments),this.beanName="valueColsSvc",this.eventName="columnValueChanged",this.columnProcessors={set:(e,t,o)=>this.setValueActive(t,e,o),add:(e,t,o)=>this.setValueActive(!0,e,o),remove:(e,t,o)=>this.setValueActive(!1,e,o)},this.columnExtractors={setFlagFunc:(e,t,o)=>this.setColValueActive(e,t,o),getIndexFunc:()=>{},getInitialIndexFunc:()=>{},getValueFunc:e=>{const t=e.aggFunc;if(t===null||t==="")return null;if(t!==void 0)return!!t},getInitialValueFunc:e=>e.initialAggFunc!=null&&e.initialAggFunc!=""},this.modifyColumnsNoEventsCallbacks={addCol:e=>this.columns.push(e),removeCol:e=>st(this.columns,e)}}extractCols(e,t){return this.columns=super.extractCols(e,t),this.columns.forEach(o=>{const i=o.getColDef();i.aggFunc!=null&&i.aggFunc!=""?this.setColAggFunc(o,i.aggFunc):o.getAggFunc()||this.setColAggFunc(o,i.initialAggFunc)}),this.columns}setColumnAggFunc(e,t,o){if(!e)return;const i=this.colModel.getColDefCol(e);i&&(this.setColAggFunc(i,t),this.dispatchColumnChangedEvent(this.eventSvc,this.eventName,[i],o))}syncColumnWithState(e,t,o){const i=o("aggFunc").value1;i!==void 0&&(typeof i=="string"?(this.setColAggFunc(e,i),e.isValueActive()||(this.setColValueActive(e,!0,t),this.modifyColumnsNoEventsCallbacks.addCol(e))):(j(i)&&_(33),e.isValueActive()&&(this.setColValueActive(e,!1,t),this.modifyColumnsNoEventsCallbacks.removeCol(e))))}setValueActive(e,t,o){if(e!==t.isValueActive()&&(this.setColValueActive(t,e,o),e&&!t.getAggFunc()&&this.aggFuncSvc)){const i=this.aggFuncSvc.getDefaultAggFunc(t);this.setColAggFunc(t,i)}}setColAggFunc(e,t){e.aggFunc=t,e.dispatchStateUpdatedEvent("aggFunc")}setColValueActive(e,t,o){e.aggregationActive!==t&&(e.aggregationActive=t,e.dispatchColEvent("columnValueChanged",o))}},$a={moduleName:"SharedAggregation",version:Ne,beans:[GD,LD,qD,Sh],apiFunctions:{addAggFuncs:WD,clearAggFuncs:UD,setColumnAggFunc:$D},dependsOn:[Rt]},QD={moduleName:"Aggregation",version:Ne,beans:[jD,KD],rowModels:["clientSide"],dependsOn:[$a]},yh=class extends ya{constructor(){super(...arguments),this.beanName="pivotColsSvc",this.eventName="columnPivotChanged",this.columnProcessors={set:(e,t,o)=>this.setColPivotActive(e,t,o),add:(e,t,o)=>this.setColPivotActive(e,!0,o),remove:(e,t,o)=>this.setColPivotActive(e,!1,o)},this.columnOrdering={enableProp:"pivot",initialEnableProp:"initialPivot",indexProp:"pivotIndex",initialIndexProp:"initialPivotIndex"},this.columnExtractors={setFlagFunc:(e,t,o)=>this.setColPivotActive(e,t,o),getIndexFunc:e=>e.pivotIndex,getInitialIndexFunc:e=>e.initialPivotIndex,getValueFunc:e=>e.pivot,getInitialValueFunc:e=>e.initialPivot},this.modifyColumnsNoEventsCallbacks={addCol:e=>this.columns.push(e),removeCol:e=>st(this.columns,e)}}syncColumnWithState(e,t,o,i){const{value1:s,value2:n}=o("pivot","pivotIndex");(s!==void 0||n!==void 0)&&(typeof n=="number"||s?(e.isPivotActive()||(this.setColPivotActive(e,!0,t),this.modifyColumnsNoEventsCallbacks.addCol(e)),i&&typeof n=="number"&&(i[e.getId()]=n)):e.isPivotActive()&&(this.setColPivotActive(e,!1,t),this.modifyColumnsNoEventsCallbacks.removeCol(e)))}setColPivotActive(e,t,o){e.pivotActive!==t&&(e.pivotActive=t,e.dispatchColEvent("columnPivotChanged",o)),e.dispatchStateUpdatedEvent("pivot")}},XD=class extends ya{constructor(){super(...arguments),this.beanName="rowGroupColsSvc",this.eventName="columnRowGroupChanged",this.columnProcessors={set:(e,t,o)=>this.setActive(t,e,o),add:(e,t,o)=>this.setActive(!0,e,o),remove:(e,t,o)=>this.setActive(!1,e,o)},this.columnOrdering={enableProp:"rowGroup",initialEnableProp:"initialRowGroup",indexProp:"rowGroupIndex",initialIndexProp:"initialRowGroupIndex"},this.columnExtractors={setFlagFunc:(e,t,o)=>this.setColRowGroupActive(e,t,o),getIndexFunc:e=>e.rowGroupIndex,getInitialIndexFunc:e=>e.initialRowGroupIndex,getValueFunc:e=>e.rowGroup,getInitialValueFunc:e=>e.initialRowGroup},this.modifyColumnsNoEventsCallbacks={addCol:e=>this.columns.push(e),removeCol:e=>st(this.columns,e)}}moveColumn(e,t,o){if(this.columns.length===0)return;const i=this.columns[e],s=this.columns.slice(e,t);this.columns.splice(e,1),this.columns.splice(t,0,i),this.updateIndexMap(),this.eventSvc.dispatchEvent({type:this.eventName,columns:s,column:s.length===1?s[0]:null,source:o})}syncColumnWithState(e,t,o,i){const{value1:s,value2:n}=o("rowGroup","rowGroupIndex");(s!==void 0||n!==void 0)&&(typeof n=="number"||s?(e.isRowGroupActive()||(this.setColRowGroupActive(e,!0,t),this.modifyColumnsNoEventsCallbacks.addCol(e)),i&&typeof n=="number"&&(i[e.getId()]=n)):e.isRowGroupActive()&&(this.setColRowGroupActive(e,!1,t),this.modifyColumnsNoEventsCallbacks.removeCol(e)))}setActive(e,t,o){e!==t.isRowGroupActive()&&(this.setColRowGroupActive(t,e,o),Kp(this.gos,e)&&this.colModel.setColsVisible([t],!e,o))}setColRowGroupActive(e,t,o){e.rowGroupActive!==t&&(e.rowGroupActive=t,e.dispatchColEvent("columnRowGroupChanged",o)),e.dispatchStateUpdatedEvent("rowGroup")}},ZD=class extends M{constructor(){super(...arguments),this.beanName="autoColSvc"}postConstruct(){this.addManagedPropertyListener("autoGroupColumnDef",this.updateColumns.bind(this))}addColumns(e){this.columns!=null&&(e.list=this.columns.list.concat(e.list),e.tree=this.columns.tree.concat(e.tree),Mc(e))}createColumns(e,t){const o=this.beans,{colModel:i,gos:s,rowGroupColsSvc:n,colGroupSvc:r}=o,a=i.isPivotMode(),l=Tn(s,a),d=a?s.get("pivotSuppressAutoColumn"):this.isSuppressAutoCol(),c=n?.columns,p=!(c&&c.length>0||s.get("treeData"))||d||l,g=()=>{this.columns&&(yo(o,this.columns.tree),this.columns=null)};if(p){g();return}const f=this.generateAutoCols(c),m=Dc(f,this.columns?.list||null),C=e.treeDepth,S=(this.columns?this.columns.treeDepth:-1)==C;if(m&&S)return;g();const b=r?.findDepth(e.tree)??0,x=r?.balanceTreeForAutoCols(f,b)??[];this.columns={list:f,tree:x,treeDepth:b,map:{}},t(A=>{if(!A)return null;const P=A.filter(y=>!Ln(y));return[...f,...P]})}updateColumns(e){const t=No(e.source);this.columns?.list.forEach((o,i)=>this.updateOneAutoCol(o,i,t))}getColumn(e){return this.columns?.list.find(t=>Sa(t,e))??null}getColumns(){return this.columns?.list??null}generateAutoCols(e=[]){const t=[],o=this.gos.get("treeData");let i=Ca(this.gos);return o&&i&&(_(182),i=!1),i?e.forEach((s,n)=>{t.push(this.createOneAutoCol(s,n))}):t.push(this.createOneAutoCol()),t}isSuppressAutoCol(){const e=this.gos;return e.get("groupDisplayType")==="custom"?!0:e.get("treeDataDisplayType")==="custom"}createOneAutoCol(e,t){let o;e?o=`${Uo}-${e.getId()}`:o=Uo;const i=this.createAutoColDef(o,e,t);i.colId=o;const s=new In(i,null,o,!0);return this.createBean(s),s}updateOneAutoCol(e,t,o){const i=e.getColDef(),s=typeof i.showRowGroup=="string"?i.showRowGroup:void 0,n=this.beans,r=s!=null?n.colModel.getColDefCol(s):void 0,a=e.getId(),l=this.createAutoColDef(a,r??void 0,t);e.setColDef(l,null,o),it(n,{state:[{colId:a,...l}]},o)}createAutoColDef(e,t,o){let i=this.createBaseColDef(t);const s=this.gos.get("autoGroupColumnDef");Ue(i,s),i=dn(this.beans,i,e,!0),this.gos.get("treeData")||Me(i.field)&&Me(i.valueGetter)&&Me(i.filterValueGetter)&&i.filter!=="agGroupColumnFilter"&&(i.filter=!1),o&&o>0&&(i.headerCheckboxSelection=!1);const n=Mt(this.gos),r=i.valueGetter||i.field!=null;return n&&!r&&(i.sortIndex=void 0,i.initialSort=void 0),i}createBaseColDef(e){const t=this.gos.get("autoGroupColumnDef"),i={headerName:this.getLocaleTextFunc()("group","Group"),showRowGroup:e?.getColId()??!0};return t&&(t.cellRenderer||t.cellRendererSelector)||(i.cellRenderer="agGroupCellRenderer",this.beans.findSvc?.setupGroupCol(i)),e&&(i.headerName=this.beans.colNames.getDisplayNameForColumn(e,"header")??void 0,i.headerValueGetter=e.colDef.headerValueGetter),i}destroy(){yo(this.beans,this.columns?.tree),super.destroy()}},bh=class extends M{addExpandedCss(e,t){t.isExpandable()&&(e.push("ag-row-group"),e.push(t.expanded?"ag-row-group-expanded":"ag-row-group-contracted"))}getRowExpandedListeners(e){const{rowNode:t}=e,o=this.updateExpandedCss.bind(this,e,t);return{expandedChanged:o,hasChildrenChanged:o}}setExpanded(e,t,o,i){if(e.expanded===t)return;e.expanded=t,e.dispatchRowEvent("expandedChanged");const s={...su(e,this.gos,"rowGroupOpened"),expanded:t,event:o||null};this.dispatchExpandedEvent(s,i),this.beans.rowRenderer.refreshCells({rowNodes:[e]})}isExpandable(e){return e.footer?!1:this.beans.colModel.isPivotMode()?e.hasChildren()&&!e.leafGroup:e.hasChildren()||e.master}updateExpandedCss(e,t){const o=t.isExpandable(),i=t.expanded==!0;e.forEachGui(void 0,s=>{const n=s.rowComp;n.addOrRemoveCssClass("ag-row-group",o),n.addOrRemoveCssClass("ag-row-group-expanded",o&&i),n.addOrRemoveCssClass("ag-row-group-contracted",o&&!i),to(s.element,o&&i)})}},JD=class extends bh{constructor(){super(...arguments),this.beanName="expansionSvc",this.events=[]}wireBeans(e){this.rowModel=e.rowModel}expandRows(e){const t=new Set(e);this.rowModel.forEachNode(o=>{o.id&&t.has(o.id)&&(o.expanded=!0)}),this.onGroupExpandedOrCollapsed()}expandAll(e){const{gos:t,colModel:o,eventSvc:i}=this.beans,s=this.rowModel,n=t.get("treeData"),r=o.isPivotActive(),a=d=>{d&&d.forEach(c=>{const u=()=>{c.expanded=e,a(c.childrenAfterGroup)};if(n){j(c.childrenAfterGroup)&&u();return}if(r){!c.leafGroup&&u();return}c.group&&u()})},l=s.rootNode;l&&a(l.childrenAfterGroup),s.refreshModel({step:"map"}),i.dispatchEvent({type:"expandOrCollapseAll",source:e?"expandAll":"collapseAll"})}onGroupExpandedOrCollapsed(){this.rowModel.refreshModel({step:"map"})}dispatchExpandedEvent(e,t){this.events.push(e);const o=()=>{this.rowModel.onRowGroupOpened(),this.events.forEach(i=>this.eventSvc.dispatchEvent(i)),this.events=[]};t?o():(this.dispatchExpandedDebounced==null&&(this.dispatchExpandedDebounced=this.debounce(o)),this.dispatchExpandedDebounced())}debounce(e){const t=this.beans.animationFrameSvc;if(!t)return()=>window.setTimeout(e,0);let o=!1;return()=>{if(!t.active){window.setTimeout(e,0);return}o||(o=!0,t.addDestroyTask(()=>{o=!1,e()}))}}};function eM(e){let t=e.get("groupHideParentOfSingleChild");return t||(t=e.get("groupRemoveSingleChildren"),!t&&e.get("groupRemoveLowestSingleChildren")&&(t="leafGroupsOnly")),{groupHideParentOfSingleChild:t,isGroupMultiAutoColumn:Ca(e),hideOpenParents:e.get("groupHideOpenParents"),grandTotalRow:ma(e),groupTotalRow:fi(e)}}function tM(e,t,o){return e.groupHideParentOfSingleChild===!0&&o&&t.childrenAfterGroup.length===1}function oM(e,t,o){return e.groupHideParentOfSingleChild==="leafGroupsOnly"&&o&&t.leafGroup&&t.childrenAfterGroup.length===1}function iM(e,t,o,i,s,n){const r=i&&!o,a=i&&t.leafGroup,l=e.hideOpenParents&&t.expanded&&!t.master&&!a;return!r&&!l&&!s&&!n}var sM=class extends M{constructor(){super(...arguments),this.beanName="flattenStage",this.refreshProps=new Set(["groupHideParentOfSingleChild","groupRemoveSingleChildren","groupRemoveLowestSingleChildren","groupTotalRow","masterDetail"]),this.step="map"}execute(e){const t=e.rowNode,o=[],i=this.beans.colModel.isPivotMode(),s=i&&t.leafGroup&&t.aggData,n=s?[t]:t.childrenAfterSort,r=eM(this.gos);this.recursivelyAddToRowsToDisplay(r,n,o,i,0);const a=o.length>0;if(!s&&a&&r.grandTotalRow){Zt(t,this.beans);const d=r.grandTotalRow==="top";this.addRowNodeToRowsToDisplay(r,t.sibling,o,0,d)}return o}recursivelyAddToRowsToDisplay(e,t,o,i,s){if(t?.length)for(let n=0;n<t.length;n++){const r=t[n],a=r.hasChildren(),l=tM(e,r,a),d=oM(e,r,a);if(iM(e,r,a,i,l,d)&&this.addRowNodeToRowsToDisplay(e,r,o,s),!(i&&r.leafGroup))if(a){const u=l||d;if(r.expanded||u){const p=e.groupTotalRow({node:r});p||Ua(r);const g=u?s:s+1;p==="top"&&(Zt(r,this.beans),this.addRowNodeToRowsToDisplay(e,r.sibling,o,g)),this.recursivelyAddToRowsToDisplay(e,r.childrenAfterSort,o,i,g),p==="bottom"&&(Zt(r,this.beans),this.addRowNodeToRowsToDisplay(e,r.sibling,o,g))}}else{const u=this.beans.masterDetailSvc?.getDetail(r);u&&this.addRowNodeToRowsToDisplay(e,u,o,s)}}}addRowNodeToRowsToDisplay(e,t,o,i,s){s?o.unshift(t):o.push(t),t.setUiLevel(e.isGroupMultiAutoColumn?0:i)}},nM=class extends M{constructor(){super(...arguments),this.beanName="groupStage",this.refreshProps=new Set(["groupDefaultExpanded","groupAllowUnbalanced","initialGroupOrderComparator","groupHideOpenParents","groupDisplayType","treeData","treeDataChildrenField","treeDataParentIdField"]),this.step="group",this.approach=null,this.strategy=void 0}destroy(){super.destroy(),this.strategy=void 0,this.approach=null}createStrategy(){const{beans:e,approach:t}=this;let o;switch(t){case"treeSelfRef":o="treeParentIdStrategy";break;case"group":o="groupStrategy";break}if(o){const i=e.registry.createDynamicBean(o,!1);return this.createOptionalManagedBean(i),i}}execute(e){let t=this.strategy;const o=vc(this.gos);return this.approach!==o&&(this.approach=o,this.destroyBean(t),t&&this.approach!=="treeNested"&&this.approach!=="treePath"&&rM(e.rowNode),t=this.createStrategy(),this.strategy=t),t?.execute(e),!!t}},rM=e=>{const t=e.allLeafChildren,o=e.sibling;e.treeNodeFlags=0,e.childrenAfterGroup=t,e.childrenMapped=null,e.groupData=null,o&&(o.childrenAfterGroup=e.childrenAfterGroup,o.childrenAfterAggFilter=e.childrenAfterAggFilter,o.childrenAfterFilter=e.childrenAfterFilter,o.childrenAfterSort=e.childrenAfterSort,o.childrenMapped=null,o.groupData=null);for(const i of t){const s=i.sibling;sd(i),s&&sd(s),i.parent=e,i.level=0,i.key=null,i.treeNodeFlags=0,(i.group||i.hasChildren())&&(i.group=!1,i.updateHasChildren())}e.updateHasChildren()},sd=e=>{e.allLeafChildren=null,e.childrenAfterGroup=null,e.childrenAfterAggFilter=null,e.childrenAfterFilter=null,e.childrenAfterSort=null,e.childrenMapped=null,e.groupData&&(e.groupData=null)};function Zr(e,t,o){let i=e;const s=i.level-t.level;if(s<=0||!o.get("groupHideOpenParents"))return!1;for(let r=0;r<s;r++){if(!(i.parent?.childrenAfterSort?.[0]===i))return!1;i=i.parent}return i===t}function nd(e,t,o,i){const s=o.key==="",n=!!o.rowGroupColumn&&(!e||e?.isRowGroupDisplayed(o.rowGroupColumn.getId()));if(s&&n){const r=Zr(t,o,i.gos);if(o===t||r)return na(i.localeSvc)("blanks","(Blanks)")}return null}var Rh=class extends M{constructor(){super(...arguments),this.indentClass=null}init(e,t,o,i,s,n,r){this.params=r,this.eGui=t,this.eCheckbox=o,this.eExpanded=i,this.eContracted=s,this.comp=e,this.compClass=n;const{node:a,column:l}=r;if(this.node=a,this.displayedNode=a,!this.isEmbeddedRowMismatch()){if(a.footer){this.initFooterCell();return}if(!l){this.initFullWidthCell();return}this.displayedNode=this.beans.valueSvc.getDisplayedNode(a,l)??this.node,this.setupExpand(),this.setupCheckbox(),this.addGroupValue(),this.setupIndent()}}initFooterCell(){const{node:e,column:t}=this.params,o=e.level===-1;!(e.rowGroupColumn&&t&&t.isRowGroupDisplayed(e.rowGroupColumn.getId()))&&!o||(this.addFooterValue(),this.setupIndent(),o||this.comp.addOrRemoveCssClass("ag-row-group-leaf-indent",!0))}initFullWidthCell(){const e=()=>{const{rowDragSvc:t}=this.beans;if(!this.params.rowDrag||!t)return;const o=t.createRowDragComp(()=>this.params.value,this.params.node);this.createManagedBean(o),this.eGui.insertAdjacentElement("afterbegin",o.getGui())};this.setupExpand(),e(),this.setupCheckbox(),this.addGroupValue(),this.setupIndent()}getCellAriaRole(){const e=this.params.colDef?.cellAriaRole,t=this.params.column?.getColDef().cellAriaRole;return e||t||"gridcell"}isEmbeddedRowMismatch(){if(!this.params.fullWidth||!this.gos.get("embedFullWidthRows"))return!1;const{visibleCols:e}=this.beans,t=this.params.pinned==="left",o=this.params.pinned==="right",i=!t&&!o;return this.gos.get("enableRtl")?e.isPinningLeft()?!o:!i:e.isPinningLeft()?!t:!i}addGroupValue(){const{params:{column:e,value:t},node:o,displayedNode:i,beans:s}=this,n=this.getFormattedValue()??nd(e,o,i,s),r=this.getInnerCompDetails(n);this.comp.setInnerRenderer(r,n??t??null)}getFormattedValue(){const{valueSvc:e}=this.beans,{value:t,valueFormatted:o,column:i}=this.params,{rowGroupColumn:s}=this.displayedNode;return!s||!i?o:i?.isRowGroupDisplayed(s.getId())?e.formatValue(s,this.node,t):null}addFooterValue(){const{expressionSvc:e,footerSvc:t}=this.beans,{totalValueGetter:o,column:i,node:s,value:n}=this.params,r=this.getFormattedValue()??nd(i,s,s,this.beans);let a="";o?typeof o=="function"?a=o({...this.params,valueFormatted:r}):typeof o=="string"?a=e?.evaluate(o,{...this.params,valueFormatted:r}):_(179):a=t?.getTotalValue(r??n);const l=this.getInnerCompDetails(r);this.comp.setInnerRenderer(l,a??"")}setupExpand(){const{colModel:e}=this.beans,{eGridCell:t,column:o,suppressDoubleClickExpand:i}=this.params,s=(d,c)=>{const u=oe(d,this.beans,null);u&&(c.appendChild(u),this.addDestroyFunc(()=>c.removeChild(u)))};s("groupExpanded",this.eExpanded),s("groupContracted",this.eContracted);const n=this.comp,r=()=>{if(!this.isExpandable())return;const c=this.displayedNode.expanded;n.setExpandedDisplayed(c),n.setContractedDisplayed(!c),to(t,!!this.displayedNode.expanded)},a=()=>{const d=this.isExpandable();n.addOrRemoveCssClass("ag-cell-expandable",d),n.addOrRemoveCssClass("ag-row-group",d);const c=!d&&e.isPivotMode();n.addOrRemoveCssClass("ag-pivot-leaf-group",c);const u=!e.isPivotMode()&&(!this.displayedNode.footer||this.displayedNode.level!==-1);n.addOrRemoveCssClass("ag-row-group-leaf-indent",!d&&u);const p=this.getChildCount(),g=p>0?`(${p})`:"";n.setChildCount(g),d?r():(n.setExpandedDisplayed(!1),n.setContractedDisplayed(!1),gp(t))};(()=>{!(o?.isCellEditable(this.displayedNode)&&this.gos.get("enableGroupEdit"))&&!i&&this.addManagedListeners(t,{dblclick:this.onCellDblClicked.bind(this)}),this.addManagedListeners(this.eExpanded,{click:this.onExpandClicked.bind(this)}),this.addManagedListeners(this.eContracted,{click:this.onExpandClicked.bind(this)}),this.addManagedListeners(t,{keydown:this.onKeyDown.bind(this)}),this.addManagedListeners(this.displayedNode,{allChildrenCountChanged:a,masterChanged:a,groupChanged:a,hasChildrenChanged:a,expandedChanged:r})})(),a()}getInnerCompDetails(e){const{userCompFactory:t,findSvc:o}=this.beans,i={...this.params,valueFormatted:e};if(i.fullWidth){const d=this.gos.get("groupRowRendererParams"),c=Cs(t,d,i);return c||(o?.isMatch(i.node,null)?Cs(t,{...d,innerRenderer:"agFindCellRenderer"},i):void 0)}const s=d=>d&&d.componentClass==this.compClass,n=Cs(t,i,i);if(n&&!s(n))return n;const{displayedNode:{rowGroupColumn:r}}=this,a=r?.colDef,l=r&&i.column?.isRowGroupDisplayed(r.getId());if(a&&l){const d=mi(t,a,i);if(d)if(s(d)){if(a?.cellRendererParams?.innerRenderer)return Cs(t,a.cellRendererParams,i)}else return d}if(o?.isMatch(i.node,i.column))return mi(t,{...a??i.colDef,cellRenderer:"agFindCellRenderer"},i)}getChildCount(){const{column:e,suppressCount:t}=this.params;if(t)return 0;const{allChildrenCount:o,rowGroupColumn:i}=this.displayedNode;return!((o??0)>0&&(!i||!e||e?.isRowGroupDisplayed(i.getId())))||this.gos.get("showOpenedGroup")&&this.displayedNode!==this.node&&!Zr(this.node,this.displayedNode,this.gos)?0:o??0}isExpandable(){const{node:e,column:t,colDef:o}=this.params;if(!this.displayedNode.isExpandable())return!1;if(!t)return!0;if(e.hasChildren()&&o){const{showRowGroup:n}=o;if(!n)return!1;if(n===!0)return!0}return e===this.displayedNode?e.rowGroupColumn&&t?.isRowGroupDisplayed(e.rowGroupColumn.getId())?!0:e.master?o?.showRowGroup===!0||o?.showRowGroup==null:!1:Zr(this.node,this.displayedNode,this.gos)}setupIndent(){const{suppressPadding:e,node:t,colDef:o}=this.params;if(e)return;const i=()=>{let s=0;o&&o.showRowGroup!==!0?s=0:s=t.uiLevel;const n="ag-row-group-indent-"+s;n!==this.indentClass&&(this.indentClass&&this.comp.addOrRemoveCssClass(this.indentClass,!1),this.indentClass=n,this.comp.addOrRemoveCssClass(n,!0),this.eGui.style.setProperty("--ag-indentation-level",String(s)))};this.addManagedListeners(t,{uiLevelChanged:i.bind(this)}),i()}setupCheckbox(){const{node:e}=this.params;!e.footer&&!e.rowPinned&&!e.detail&&(this.addManagedPropertyListener("rowSelection",({currentValue:o,previousValue:i})=>{const s=typeof o=="object"?o:void 0,n=typeof i=="object"?i:void 0;s?.checkboxLocation!==n?.checkboxLocation&&(this.destroyCheckbox(),this.addCheckbox())}),this.addCheckbox())}addCheckbox(){const{selectionSvc:e}=this.beans;if(!e||!Ht(this.gos))return;const{node:t,column:o}=this.params,i=this.gos.get("rowSelection"),s=ts(i);if(s==="selectionColumn")return;if(s==="autoGroupColumn"){const d=o?.getColDef().showRowGroup!=null,c=!o&&t.group;if(!(d||c))return}const n=typeof i=="object"?Bo(i):this.params.checkbox;if(!(typeof n=="function"||n===!0))return;if(typeof o?.getColDef().showRowGroup=="string"&&!this.isExpandable()){this.comp.setCheckboxSpacing(!0);return}const l=e.createCheckboxSelectionComponent();this.cbComp=l,this.createBean(l),l.init({rowNode:t,column:o,overrides:{isVisible:n,callbackParams:this.params,removeHidden:!0}}),this.eCheckbox.appendChild(l.getGui()),this.comp.setCheckboxVisible(!0)}destroyCheckbox(){this.comp.setCheckboxSpacing(!1),this.comp.setCheckboxVisible(!1),this.cbComp&&this.eCheckbox.removeChild(this.cbComp.getGui()),this.cbComp=this.destroyBean(this.cbComp)}onExpandClicked(e){Et(e)||(oo(e),this.onExpandOrContract(e))}onKeyDown(e){!(e.key===D.ENTER)||this.params.suppressEnterExpand||this.params.column&&this.params.column.isCellEditable(this.params.node)||this.onExpandOrContract(e)}onCellDblClicked(e){if(Et(e))return;Hr(this.eExpanded,e)||Hr(this.eContracted,e)||this.onExpandOrContract(e)}onExpandOrContract(e){if(!this.isExpandable())return;const t=this.displayedNode,o=!t.expanded;!o&&t.sticky&&this.beans.ctrlsSvc.getScrollFeature().setVerticalScrollPosition(t.rowTop-t.stickyRowTop),t.setExpanded(o,e)}destroy(){super.destroy(),this.destroyCheckbox()}},aM={tag:"span",cls:"ag-cell-wrapper",children:[{tag:"span",ref:"eExpanded",cls:"ag-group-expanded ag-hidden"},{tag:"span",ref:"eContracted",cls:"ag-group-contracted ag-hidden"},{tag:"span",ref:"eCheckbox",cls:"ag-group-checkbox ag-invisible"},{tag:"span",ref:"eValue",cls:"ag-group-value"},{tag:"span",ref:"eChildCount",cls:"ag-group-child-count"}]},rd=class extends pe{constructor(){super(aM),this.eExpanded=O,this.eContracted=O,this.eCheckbox=O,this.eValue=O,this.eChildCount=O}init(e){const t={setInnerRenderer:(n,r)=>this.setRenderDetails(n,r),setChildCount:n=>this.eChildCount.textContent=n,addOrRemoveCssClass:(n,r)=>this.addOrRemoveCssClass(n,r),setContractedDisplayed:n=>he(this.eContracted,n),setExpandedDisplayed:n=>he(this.eExpanded,n),setCheckboxVisible:n=>this.eCheckbox.classList.toggle("ag-invisible",!n),setCheckboxSpacing:n=>this.eCheckbox.classList.toggle("ag-group-checkbox-spacing",n)},o=this.createManagedBean(new Rh),i=!e.colDef,s=this.getGui();o.init(t,s,this.eCheckbox,this.eExpanded,this.eContracted,this.constructor,e),i&&qe(s,o.getCellAriaRole())}setRenderDetails(e,t){e?e.newAgStackInstance().then(o=>{if(!o)return;const i=()=>this.destroyBean(o);this.isAlive()?(this.eValue.appendChild(o.getGui()),this.addDestroyFunc(i)):i()}):this.eValue.innerText=t}destroy(){this.destroyBean(this.innerCellRenderer),super.destroy()}refresh(){return!1}},lM=".ag-group-checkbox-spacing{width:var(--ag-icon-size)}:where(.ag-ltr) .ag-group-checkbox-spacing{margin-right:var(--ag-cell-widget-spacing)}:where(.ag-rtl) .ag-group-checkbox-spacing{margin-left:var(--ag-cell-widget-spacing)}",dM=class extends M{constructor(){super(...arguments),this.beanName="showRowGroupCols"}refresh(){this.showRowGroupCols=[],this.showRowGroupColsMap={};const{colModel:e,rowGroupColsSvc:t}=this.beans;e.getCols().forEach(o=>{const s=o.getColDef().showRowGroup,n=typeof s=="string";!n&&!(s===!0)||(this.showRowGroupCols.push(o),n?this.showRowGroupColsMap[s]=o:t&&t.columns.forEach(a=>{this.showRowGroupColsMap[a.getId()]=o}))})}getShowRowGroupCols(){return this.showRowGroupCols}getShowRowGroupCol(e){return this.showRowGroupColsMap[e]}getSourceColumnsForGroupColumn(e){const t=e.getColDef().showRowGroup;if(!t)return null;const{rowGroupColsSvc:o,colModel:i}=this.beans;if(t===!0&&o)return o.columns.slice(0);const s=i.getColDefCol(t);return s?[s]:null}isRowGroupDisplayed(e,t){const{colDef:o}=e;if(o?.showRowGroup==null)return!1;const i=o.showRowGroup===!0,s=o.showRowGroup===t;return i||s}},cM=class extends M{constructor(e,t){super(),this.createRowCon=e,this.destroyRowCtrls=t,this.stickyTopRowCtrls=[],this.stickyBottomRowCtrls=[],this.extraTopHeight=0,this.extraBottomHeight=0}postConstruct(){this.isClientSide=Lt(this.gos),this.beans.ctrlsSvc.whenReady(this,e=>{this.gridBodyCtrl=e.gridBodyCtrl}),this.resetStickyContainers()}setOffsetTop(e){this.extraTopHeight!==e&&(this.extraTopHeight=e,this.eventSvc.dispatchEvent({type:"stickyTopOffsetChanged",offset:e}))}setOffsetBottom(e){this.extraBottomHeight!==e&&(this.extraBottomHeight=e)}resetOffsets(){this.setOffsetBottom(0),this.setOffsetTop(0)}getLastPixelOfGroup(e){return this.isClientSide?hM(e):uM(e)}getFirstPixelOfGroup(e){return e.footer?e.sibling.rowTop+e.sibling.rowHeight-1:e.hasChildren()?e.rowTop-1:0}updateStickyRows(e){const t=e==="top";let o=0;if(!this.canRowsBeSticky())return this.refreshNodesAndContainerHeight(e,new Set,o);const{rowModel:i,rowRenderer:s}=this.beans,n=t?s.firstVisibleVPixel-this.extraTopHeight:s.lastVisibleVPixel-this.extraTopHeight,r=new Set,a=u=>{if(r.add(u),t){const p=this.getLastPixelOfGroup(u),g=n+o+u.rowHeight;p<g?u.stickyRowTop=o+(p-g):u.stickyRowTop=o}else{const p=this.getFirstPixelOfGroup(u),g=n-(o+u.rowHeight);p>g?u.stickyRowTop=o-(p-g):u.stickyRowTop=o}o=0,r.forEach(p=>{const g=p.stickyRowTop+p.rowHeight;o<g&&(o=g)})},l=this.areFooterRowsStickySuppressed(),d=this.gos.get("suppressGroupRowsSticky"),c=u=>{if(!u.displayed)return!1;if(u.footer){if(l===!0||l==="grand"&&u.level===-1||l==="group"&&u.level>-1)return!1;const p=u.sibling.rowIndex?u.sibling.rowIndex+1===u.rowIndex:!1;return e==="bottom"&&p?!1:!r.has(u)}return u.isExpandable()?d===!0||e==="bottom"?!1:!r.has(u)&&u.expanded:!1};for(let u=0;u<100;u++){let p=n+o;t||(p=n-o);const g=i.getRowIndexAtPixel(p),f=i.getRow(g);if(f==null)break;const C=this.getStickyAncestors(f).find(S=>(t?S.rowIndex<g:S.rowIndex>g)&&c(S));if(C){a(C);continue}if((t?f.rowTop<p:f.rowTop+f.rowHeight>p)&&c(f)){a(f);continue}break}return t||r.forEach(u=>{u.stickyRowTop=o-(u.stickyRowTop+u.rowHeight)}),this.refreshNodesAndContainerHeight(e,r,o)}areFooterRowsStickySuppressed(){const e=this.gos.get("suppressStickyTotalRow");if(e===!0)return!0;const t=e==="group",o=e==="grand";return t&&o?!0:o?"grand":t?"group":!1}canRowsBeSticky(){const e=An(this.gos),t=this.areFooterRowsStickySuppressed(),o=this.gos.get("suppressGroupRowsSticky");return e&&(!t||!o)}getStickyAncestors(e){const t=[];let o=e.footer?e.sibling:e.parent;for(;o;)o.sibling&&t.push(o.sibling),t.push(o),o=o.parent;return t.reverse()}checkStickyRows(){const e=this.updateStickyRows("top"),t=this.updateStickyRows("bottom");return e||t}destroyStickyCtrls(){this.resetStickyContainers()}resetStickyContainers(){this.refreshNodesAndContainerHeight("top",new Set,0),this.refreshNodesAndContainerHeight("bottom",new Set,0)}refreshStickyNode(e){const t=new Set;if(this.stickyTopRowCtrls.some(o=>o.rowNode===e)){for(let o=0;o<this.stickyTopRowCtrls.length;o++){const i=this.stickyTopRowCtrls[o].rowNode;i!==e&&t.add(i)}this.refreshNodesAndContainerHeight("top",t,this.topContainerHeight)&&this.checkStickyRows();return}for(let o=0;o<this.stickyBottomRowCtrls.length;o++){const i=this.stickyBottomRowCtrls[o].rowNode;i!==e&&t.add(i)}this.refreshNodesAndContainerHeight("bottom",t,this.bottomContainerHeight)&&this.checkStickyRows()}refreshNodesAndContainerHeight(e,t,o){const i=e==="top",s=i?this.stickyTopRowCtrls:this.stickyBottomRowCtrls,n={},r=[];for(let g=0;g<s.length;g++){const f=s[g].rowNode;if(!t.has(f)){n[f.id]=s[g],f.sticky=!1;continue}r.push(s[g])}const a=new Set;for(let g=0;g<r.length;g++)a.add(r[g].rowNode);const l=[];t.forEach(g=>{a.has(g)||(g.sticky=!0,l.push(this.createRowCon(g,!1,!1)))});let d=!!l.length||r.length!==s.length;i?this.topContainerHeight!==o&&(this.topContainerHeight=o,this.gridBodyCtrl.setStickyTopHeight(o),d=!0):this.bottomContainerHeight!==o&&(this.bottomContainerHeight=o,this.gridBodyCtrl.setStickyBottomHeight(o),d=!0),this.destroyRowCtrls(n,!1);const c=[...r,...l];c.sort((g,f)=>f.rowNode.rowIndex-g.rowNode.rowIndex),i||c.reverse(),c.forEach(g=>g.setRowTop(g.rowNode.stickyRowTop));const u=this.beans.pageBounds;let p=0;return i?(t.forEach(g=>{g.rowIndex<u.getFirstRow()&&(p+=g.rowHeight)}),p>this.topContainerHeight&&(p=this.topContainerHeight),this.setOffsetTop(p)):(t.forEach(g=>{g.rowIndex>u.getLastRow()&&(p+=g.rowHeight)}),p>this.bottomContainerHeight&&(p=this.bottomContainerHeight),this.setOffsetBottom(p)),d?(i?this.stickyTopRowCtrls=c:this.stickyBottomRowCtrls=c,!0):!1}ensureRowHeightsValid(){let e=!1;const t=o=>{const i=o.rowNode;if(i.rowHeightEstimated){const s=vt(this.beans,i);i.setRowHeight(s.height),e=!0}};return this.stickyTopRowCtrls.forEach(t),this.stickyBottomRowCtrls.forEach(t),e}};function uM(e){if(e.isExpandable()||e.footer){if(e.master&&e.detailNode)return e.detailNode.rowTop+e.detailNode.rowHeight;if(!e.sibling||Math.abs(e.sibling.rowIndex-e.rowIndex)===1){let o=e.childStore?.getStoreBounds();return e.footer&&(o=e.sibling.childStore?.getStoreBounds()),(o?.heightPx??0)+(o?.topPx??0)}return e.footer?e.rowTop+e.rowHeight:e.sibling.rowTop+e.sibling.rowHeight}return Number.MAX_SAFE_INTEGER}function hM(e){if(e.isExpandable()||e.footer){if(e.footer&&e.rowIndex===0)return Number.MAX_SAFE_INTEGER;if(!e.sibling||Math.abs(e.sibling.rowIndex-e.rowIndex)===1){let i=e.footer?e.sibling:e;for(;i.isExpandable()&&i.expanded;)if(i.master&&i.detailNode)i=i.detailNode;else if(i.childrenAfterSort){if(i.childrenAfterSort.length===0)break;i=ve(i.childrenAfterSort)}return i.rowTop+i.rowHeight}return e.footer?e.rowTop+e.rowHeight:e.sibling.rowTop+e.sibling.rowHeight}return Number.MAX_SAFE_INTEGER}var pM=class extends M{constructor(){super(...arguments),this.beanName="stickyRowSvc"}createStickyRowFeature(e,t,o){const i=this.gos;if(An(i)&&Lt(i)||pt(i))return e.createManagedBean(new cM(t,o))}},gM={moduleName:"GroupCellRenderer",version:Ne,userComponents:{agGroupRowRenderer:rd,agGroupCellRenderer:rd},dynamicBeans:{groupCellRendererCtrl:Rh},icons:{groupContracted:"tree-closed",groupExpanded:"tree-open"},css:[lM],dependsOn:[Rt]},Fh={moduleName:"GroupColumn",version:Ne,beans:[ZD,dM,XD,yh,Sh],dependsOn:[Rt,gM]},fM={moduleName:"ClientSideRowModelHierarchy",version:Ne,rowModels:["clientSide"],beans:[nM,sM,JD],dependsOn:[Rt]},xh={moduleName:"StickyRow",version:Ne,beans:[pM]},mr=class{constructor(){this.allSets=new Map}removeFromChildrenAfterGroup(e,t){const o=this.getSet(e);(o.fromChildrenAfterGroup??(o.fromChildrenAfterGroup=new Set)).add(t)}isRemoveFromAllLeafChildren(e,t){return!!this.allSets.get(e)?.fromAllLeafChildren?.has(t)}preventRemoveFromAllLeafChildren(e,t){this.allSets.get(e)?.fromAllLeafChildren?.delete(t)}removeFromAllLeafChildren(e,t){const o=this.getSet(e);(o.fromAllLeafChildren??(o.fromAllLeafChildren=new Set)).add(t)}getSet(e){let t=this.allSets.get(e);return t||(t={fromChildrenAfterGroup:null,fromAllLeafChildren:null},this.allSets.set(e,t)),t}getAllParents(){return Array.from(this.allSets.keys())}flush(){const e=this.allSets;for(const t of e.keys()){const o=e.get(t);if(o){const{fromChildrenAfterGroup:i,fromAllLeafChildren:s}=o,{childrenAfterGroup:n,allLeafChildren:r}=t;n&&i&&(ad(n,i),t.updateHasChildren()),r&&s&&ad(r,s)}}e.clear()}};function ad(e,t){let o=0;for(let i=0,s=e.length;i<s;++i){const n=e[i];t.has(n)||(e[o++]=n)}e.length=o}function mM(e){if(!e)return!1;const t=e.length;if(t<2)return!1;let o=!1;for(let i=1;i<t;i++)if(ld(e[i-1],e[i])>0){o=!0;break}return o?(e.sort(ld),!0):!1}function ld(e,t){const o=e.sourceRowIndex,i=t.sourceRowIndex,s=o>=0,n=i>=0,r=s&&n,a=!s&&!n;return r?o-i:a?e.__objectId-t.__objectId:s?1:-1}var CM=class extends M{wireBeans(e){this.colModel=e.colModel,this.rowGroupColsSvc=e.rowGroupColsSvc,this.valueSvc=e.valueSvc,this.selectionSvc=e.selectionSvc,this.showRowGroupCols=e.showRowGroupCols}execute(e){const t=this.createGroupingDetails(e),o=e.changedRowNodes;o?this.handleDeltaUpdate(t,o):this.shotgunResetEverything(t,!!e.afterColumnsChanged);const i=e.changedPath;this.positionLeafsAndGroups(i),this.orderGroups(t),this.selectionSvc?.updateSelectableAfterGrouping(i)}positionLeafsAndGroups(e){e.forEachChangedNodeDepthFirst(t=>{if(t.childrenAfterGroup){const o=[],i=[];let s;t.childrenAfterGroup.forEach(n=>{n.childrenAfterGroup?.length?n.key===""&&!s?s=n:i.push(n):o.push(n)}),s&&i.push(s),t.childrenAfterGroup=[...o,...i]}},!1)}createGroupingDetails(e){const{rowNode:t,changedPath:o,rowNodesOrderChanged:i}=e,s=this.rowGroupColsSvc?.columns;return{expandByDefault:this.gos.get("groupDefaultExpanded"),groupedCols:s,rootNode:t,pivotMode:this.colModel.isPivotMode(),groupedColCount:s?.length??0,rowNodesOrderChanged:!!i,changedPath:o,groupAllowUnbalanced:this.gos.get("groupAllowUnbalanced"),isGroupOpenByDefault:this.gos.getCallback("isGroupOpenByDefault"),initialGroupOrderComparator:this.gos.getCallback("initialGroupOrderComparator"),keyCreators:s?.map(r=>r.getColDef().keyCreator)??[]}}handleDeltaUpdate(e,{removals:t,updates:o,adds:i}){const s=new mr;t.size&&this.removeNodes(t,e,s);for(const a of o)this.moveNodeInWrongPath(a,e,s);const n=e.changedPath;for(const a of i)this.insertOneNode(a,e),n.active&&n.addParentNode(a.parent);const r=s.getAllParents();s.flush(),this.removeEmptyGroups(r,e),e.rowNodesOrderChanged&&this.sortChildren(e)}sortChildren(e){e.changedPath.forEachChangedNodeDepthFirst(t=>{mM(t.childrenAfterGroup)&&e.changedPath.addParentNode(t)},!1,!0)}orderGroups(e){const t=e.initialGroupOrderComparator;j(t)&&o(e.rootNode);function o(i){j(i.childrenAfterGroup)&&!i.leafGroup&&(i.childrenAfterGroup.sort((n,r)=>t({nodeA:n,nodeB:r})),i.childrenAfterGroup.forEach(n=>o(n)))}}getExistingPathForNode(e,t){const o=[];let i=e.parent;for(;i&&i!==t.rootNode;)o.push({key:i.key,rowGroupColumn:i.rowGroupColumn,field:i.field}),i=i.parent;return o.reverse(),o}moveNodeInWrongPath(e,t,o){t.changedPath.active&&t.changedPath.addParentNode(e.parent);const i=a=>a.key,s=this.getExistingPathForNode(e,t).map(i),n=this.getGroupInfo(e,t).map(i);At(s,n)||this.moveNode(e,t,o)}moveNode(e,t,o){if(this.removeNodesFromParents([e],t,o),this.insertOneNode(e,t,o),e.setData(e.data),t.changedPath.active){const i=e.parent;t.changedPath.addParentNode(i)}}removeNodes(e,t,o){if(this.removeNodesFromParents(e,t,o),t.changedPath.active)for(const i of e)t.changedPath.addParentNode(i.parent)}forEachParentGroup(e,t,o){let i=t;for(;i&&i!==e.rootNode;)o(i),i=i.parent}removeNodesFromParents(e,t,o){const i=o==null,s=o||new mr;for(const n of e)this.removeFromParent(n,s),this.forEachParentGroup(t,n.parent,r=>{s.removeFromAllLeafChildren(r,n)});i&&s.flush()}removeEmptyGroups(e,t){let o=!0;const i=s=>{const n=this.getChildrenMappedKey(s.key,s.rowGroupColumn),r=s.parent;return(r?.childrenMapped?!r.childrenMapped[n]:!0)?!1:!!s.group&&(s.childrenAfterGroup?.length??0)===0};for(;o;){o=!1;const s=new mr;e.forEach(n=>{this.forEachParentGroup(t,n,r=>{i(r)&&(o=!0,this.removeFromParent(r,s),this.selectionSvc?.setNodesSelected({nodes:[r],newValue:!1,source:"rowGroupChanged"}))})}),s.flush()}}removeFromParent(e,t){e.parent&&(t?t.removeFromChildrenAfterGroup(e.parent,e):(st(e.parent.childrenAfterGroup,e),e.parent.updateHasChildren()));const o=this.getChildrenMappedKey(e.key,e.rowGroupColumn);e.parent?.childrenMapped&&delete e.parent.childrenMapped[o],e.setRowTop(null),e.setRowIndex(null)}addToParent(e,t){const o=this.getChildrenMappedKey(e.key,e.rowGroupColumn);t?.childrenMapped&&t.childrenMapped[o]!==e&&(t.childrenMapped[o]=e,t.childrenAfterGroup.push(e),Nx(t,this.beans,!0))}areGroupColsEqual(e,t){return e==null||t==null||e.pivotMode!==t.pivotMode?!1:At(e.groupedCols,t.groupedCols)&&At(e.keyCreators,t.keyCreators)}checkAllGroupDataAfterColsChanged(e){const t=o=>{o&&o.forEach(i=>{if(!i.group)return;const n={field:i.field,key:i.key,rowGroupColumn:i.rowGroupColumn,leafNode:i.allLeafChildren?.[0]};this.setGroupData(i,n),t(i.childrenAfterGroup)})};t(e.rootNode.childrenAfterGroup)}shotgunResetEverything(e,t){if(this.noChangeInGroupingColumns(e,t))return;this.selectionSvc?.filterFromSelection?.(n=>!n.group);const{groupedCols:o}=e,i=e.rootNode;i.leafGroup=o.length===0,i.childrenAfterGroup=[],i.childrenMapped={},i.updateHasChildren();const s=i.sibling;s&&(s.childrenAfterGroup=i.childrenAfterGroup,s.childrenMapped=i.childrenMapped),this.insertNodes(i.allLeafChildren,e)}noChangeInGroupingColumns(e,t){let o=!1;const i=this.showRowGroupCols.getShowRowGroupCols(),s=i?i.map(n=>n.getId()).join("-"):"";return t&&(o=this.areGroupColsEqual(e,this.oldGroupingDetails),this.oldGroupDisplayColIds!==s&&this.checkAllGroupDataAfterColsChanged(e)),this.oldGroupingDetails=e,this.oldGroupDisplayColIds=s,o}insertNodes(e,t){e.forEach(o=>{this.insertOneNode(o,t),t.changedPath.active&&t.changedPath.addParentNode(o.parent)})}insertOneNode(e,t,o){const i=this.getGroupInfo(e,t),s=this.findParentForNode(e,i,t,o);s.group||_(184,{parentGroupData:s.data,childNodeData:e.data}),e.parent=s,e.level=i.length,s.childrenAfterGroup.push(e),s.updateHasChildren()}findParentForNode(e,t,o,i){let s=o.rootNode;return t.forEach((n,r)=>{s=this.getOrCreateNextNode(s,n,r,o),i?.isRemoveFromAllLeafChildren(s,e)?i?.preventRemoveFromAllLeafChildren(s,e):s.allLeafChildren.push(e)}),s}getOrCreateNextNode(e,t,o,i){const s=this.getChildrenMappedKey(t.key,t.rowGroupColumn);let n=e?.childrenMapped?.[s];return n||(n=this.createGroup(t,e,o,i),this.addToParent(n,e)),n}createGroup(e,t,o,i){const s=new jo(this.beans);return s.group=!0,s.field=e.field,s.rowGroupColumn=e.rowGroupColumn,this.setGroupData(s,e),s.key=e.key,s.id=this.createGroupId(s,t,o),s.level=o,s.leafGroup=o===i.groupedColCount-1,s.allLeafChildren=[],s.setAllChildrenCount(0),s.rowGroupIndex=o,s.childrenAfterGroup=[],s.childrenMapped={},s.updateHasChildren(),s.parent=t,this.setExpandedInitialValue(i,s),s}createGroupId(e,t,o){const i=(s,n)=>{if(!s.rowGroupColumn)return null;const r=n?i(n,n.parent):null;return`${r==null?"":r+"-"}${s.rowGroupColumn.getColId()}-${s.key}`};return mn+i(e,t)}setGroupData(e,t){const o=t.rowGroupColumn;o&&t.leafNode&&(e.groupValue=this.valueSvc.getValue(o,t.leafNode)),e.groupData={},this.showRowGroupCols.getShowRowGroupCols().forEach(s=>{const n=e.rowGroupColumn;n!==null&&s.isRowGroupDisplayed(n.getId())&&(e.groupData[s.getColId()]=this.valueSvc.getValue(n,t.leafNode))})}getChildrenMappedKey(e,t){return t?t.getId()+"-"+e:e}setExpandedInitialValue(e,t){if(e.pivotMode&&t.leafGroup){t.expanded=!1;return}const o=e.isGroupOpenByDefault;if(o){const i={rowNode:t,field:t.field,key:t.key,level:t.level,rowGroupColumn:t.rowGroupColumn};t.expanded=o(i)==!0;return}if(e.expandByDefault===-1){t.expanded=!0;return}t.expanded=t.level<e.expandByDefault}getGroupInfo(e,t){const o=[];return t.groupedCols.forEach(i=>{let s=this.valueSvc.getKeyForNode(i,e),n=s!=null&&s!=="";if((t.pivotMode||!t.groupAllowUnbalanced)&&!n&&(s="",n=!0),n){const a={key:s,field:i.getColDef().field,rowGroupColumn:i,leafNode:e};o.push(a)}}),o}};function vM(e,t){e.rowGroupColsSvc?.setColumns(t,"api")}function wM(e,t){e.rowGroupColsSvc?.removeColumns(t,"api")}function SM(e,t){e.rowGroupColsSvc?.addColumns(t,"api")}function yM(e,t,o){e.rowGroupColsSvc?.moveColumn?.(t,o,"api")}function bM(e){return e.rowGroupColsSvc?.columns??[]}var Dh={moduleName:"SharedRowGrouping",version:Ne,apiFunctions:{setRowGroupColumns:vM,removeRowGroupColumns:wM,addRowGroupColumns:SM,getRowGroupColumns:bM,moveRowGroupColumn:yM},dependsOn:[Rt,$a,Fh,xh]},RM={moduleName:"RowGrouping",version:Ne,dynamicBeans:{groupStrategy:CM},rowModels:["clientSide"],dependsOn:[Dh,QD,fM]},FM={tag:"div",cls:"ag-loading",children:[{tag:"span",ref:"eLoadingIcon",cls:"ag-loading-icon"},{tag:"span",ref:"eLoadingText",cls:"ag-loading-text"}]},xM=class extends pe{constructor(){super(FM),this.eLoadingIcon=O,this.eLoadingText=O}init(e){e.node.failedLoad?this.setupFailed():this.setupLoading()}setupFailed(){const e=this.getLocaleTextFunc();this.eLoadingText.innerText=e("loadingError","ERR")}setupLoading(){const e=oe("groupLoading",this.beans,null);e&&this.eLoadingIcon.appendChild(e);const t=this.getLocaleTextFunc();this.eLoadingText.innerText=t("loadingOoo","Loading")}refresh(e){return!1}},DM={tag:"div",cls:"ag-skeleton-container"},MM=class extends pe{constructor(){super(DM)}init(e){const t=`ag-cell-skeleton-renderer-${this.getCompId()}`;this.getGui().setAttribute("id",t),this.addDestroyFunc(()=>hi(e.eParentOfValue)),hi(e.eParentOfValue,t),e.node.failedLoad?this.setupFailed():this.setupLoading(e)}setupFailed(){const e=this.getLocaleTextFunc();this.getGui().innerText=e("loadingError","ERR");const t=e("ariaSkeletonCellLoadingFailed","Row failed to load");ut(this.getGui(),t)}setupLoading(e){const o=Le(this.beans).createElement("div");o.classList.add("ag-skeleton-effect");const i=e.node.rowIndex;if(i!=null){const r=75+25*(i%2===0?Math.sin(i):Math.cos(i));o.style.width=`${r}%`}this.getGui().appendChild(o);const n=this.getLocaleTextFunc()("ariaSkeletonCellLoading","Row data is loading");ut(this.getGui(),n)}refresh(e){return!1}},PM={moduleName:"LoadingCellRenderer",version:Ne,userComponents:{agLoadingCellRenderer:xM},icons:{groupLoading:"loading"},dependsOn:[Rt]},EM={moduleName:"SkeletonCellRenderer",version:Ne,userComponents:{agSkeletonCellRenderer:MM},dependsOn:[Rt]};function AM(e){return e.colModel.isPivotMode()}function TM(e,t,o){return e.pivotResultCols?.lookupPivotResultCol(t,o)??null}function IM(e,t){e.valueColsSvc?.setColumns(t,"api")}function LM(e){return e.valueColsSvc?.columns??[]}function kM(e,t){e.valueColsSvc?.removeColumns(t,"api")}function GM(e,t){e.valueColsSvc?.addColumns(t,"api")}function OM(e,t){e.pivotColsSvc?.setColumns(t,"api")}function BM(e,t){e.pivotColsSvc?.removeColumns(t,"api")}function NM(e,t){e.pivotColsSvc?.addColumns(t,"api")}function HM(e){return e.pivotColsSvc?.columns??[]}function VM(e,t){e.pivotResultCols?.setPivotResultCols(t,"api")}function _M(e){const t=e.pivotResultCols?.getPivotResultCols();return t?t.list:null}var dd="PivotRowTotal_",zM=({headerName:e},{headerName:t})=>e&&!t?1:!e&&t?-1:!e&&!t?0:e<t?-1:e>t?1:0,WM=e=>(t,o)=>e(t.headerName,o.headerName),UM=class extends M{constructor(){super(...arguments),this.beanName="pivotColDefSvc"}wireBeans(e){this.colModel=e.colModel,this.pivotColsSvc=e.pivotColsSvc,this.valueColsSvc=e.valueColsSvc,this.colNames=e.colNames}postConstruct(){const e=()=>this.gos.get("serverSidePivotResultFieldSeparator")??"_";this.fieldSeparator=e(),this.addManagedPropertyListener("serverSidePivotResultFieldSeparator",()=>{this.fieldSeparator=e()});const t=()=>this.gos.get("pivotDefaultExpanded");this.pivotDefaultExpanded=t(),this.addManagedPropertyListener("pivotDefaultExpanded",()=>{this.pivotDefaultExpanded=t()})}createPivotColumnDefs(e){const t=this.createPivotColumnsFromUniqueValues(e);function o(n,r=[]){return n.forEach(a=>{a.children!==void 0?o(a.children,r):r.push(a)}),r}const i=o(t);this.addRowGroupTotals(t,i),this.addExpandablePivotGroups(t,i),this.addPivotTotalsToGroups(t,i);const s=i.map(n=>({...n}));return{pivotColumnGroupDefs:t,pivotColumnDefs:s}}createPivotColumnsFromUniqueValues(e){const t=this.pivotColsSvc?.columns??[],o=t.length;return this.recursivelyBuildGroup(0,e,[],o,t)}recursivelyBuildGroup(e,t,o,i,s){if(e>=i)return this.buildMeasureCols(o);const{pivotComparator:n}=s[e].getColDef(),r=n?WM(n):zM,a=this.valueColsSvc?.columns;if(a?.length===1&&this.gos.get("removePivotHeaderRowWhenSingleValueColumn")&&e===i-1){const d=[];for(const c of t.keys()){const u=[...o,c],p=this.createColDef(a[0],c,u);p.columnGroupShow="open",d.push(p)}return d.sort(r),d}const l=[];for(const d of t.keys()){const c=this.pivotDefaultExpanded===-1||e<this.pivotDefaultExpanded,u=[...o,d];l.push({children:this.recursivelyBuildGroup(e+1,t.get(d),u,i,s),headerName:d,pivotKeys:u,columnGroupShow:"open",openByDefault:c,groupId:this.generateColumnGroupId(u)})}return l.sort(r),l}buildMeasureCols(e){const t=this.valueColsSvc?.columns??[];return t.length===0?[this.createColDef(null,"-",e)]:t.map(o=>{const i=this.colNames.getDisplayNameForColumn(o,"header");return{...this.createColDef(o,i,e),columnGroupShow:"open"}})}addExpandablePivotGroups(e,t){const o=this.gos.get("suppressExpandablePivotGroups");if(o||this.gos.get("pivotColumnGroupTotals"))return;const i=(s,n,r)=>{if("children"in s){const{valueColsSvc:d}=this,{columns:c=[]}=d??{},u=new Map;s.children.forEach(f=>{i(f,n,u)});const p=!s.children.some(f=>f.children),g=p&&c.length===1&&this.gos.get("removePivotHeaderRowWhenSingleValueColumn");c.forEach(f=>{const m=this.colNames.getDisplayNameForColumn(f,"header"),C=this.createColDef(f,m,s.pivotKeys);C.pivotTotalColumnIds=u.get(f.getColId()),C.columnGroupShow=o?"open":"closed",C.aggFunc=f.getAggFunc(),(!p||g)&&(s.children.push(C),n.push(C))}),this.merge(r,u);return}if(!s.pivotValueColumn)return;const a=s.pivotValueColumn.getColId();r.has(a)?r.get(a).push(s.colId):r.set(a,[s.colId])};e.forEach(s=>{i(s,t,new Map)})}addPivotTotalsToGroups(e,t){if(!this.gos.get("pivotColumnGroupTotals"))return;const o=this.gos.get("pivotColumnGroupTotals")==="after",i=this.valueColsSvc?.columns,s=i?.map(n=>n.getAggFunc());if(!(!s||s.length<1||!this.sameAggFuncs(s))&&i){const n=i[0];e.forEach(r=>{this.recursivelyAddPivotTotal(r,t,n,o)})}}recursivelyAddPivotTotal(e,t,o,i){const s=e;if(!s.children){const r=e;return r.colId?[r.colId]:null}let n=[];if(s.children.forEach(r=>{const a=this.recursivelyAddPivotTotal(r,t,o,i);a&&(n=n.concat(a))}),s.children.length>1){const a=this.getLocaleTextFunc()("pivotColumnGroupTotals","Total"),l=this.createColDef(o,a,e.pivotKeys,!0);l.pivotTotalColumnIds=n,l.aggFunc=o.getAggFunc(),l.columnGroupShow=this.gos.get("suppressExpandablePivotGroups")?"open":void 0;const d=e.children;i?d.push(l):d.unshift(l),t.push(l)}return n}addRowGroupTotals(e,t){if(!this.gos.get("pivotRowTotals"))return;const o=this.gos.get("pivotRowTotals")==="after",s=(this.valueColsSvc?.columns??[]).slice();o||s.reverse();const n=s.length>1||!this.gos.get("removePivotHeaderRowWhenSingleValueColumn");for(let r=0;r<s.length;r++){const a=s[r],l=this.colNames.getDisplayNameForColumn(a,"header"),d=this.createColDef(a,l,[]),c=[];for(let p=0;p<t.length;p++){const g=t[p];g.pivotValueColumn===a&&c.push(g.colId)}d.pivotTotalColumnIds=c,d.colId=dd+d.colId;const u=n?{children:[d],pivotKeys:[],groupId:`${dd}_pivotGroup_${a.getColId()}`}:d;t.push(d),o?e.push(u):e.unshift(u)}}createColDef(e,t,o,i=!1){const s={};if(e){const n=e.getColDef();Object.assign(s,n),s.hide=!1}return s.headerName=t,s.colId=this.generateColumnId(o||[],e&&!i?e.getColId():""),s.field=s.colId,s.valueGetter=n=>n.data?.[n.colDef.field],s.pivotKeys=o,s.pivotValueColumn=e,s.filter===!0&&(s.filter="agNumberColumnFilter"),s}sameAggFuncs(e){if(e.length==1)return!0;for(let t=1;t<e.length;t++)if(e[t]!==e[0])return!1;return!0}merge(e,t){t.forEach((o,i)=>{const n=[...e.has(i)?e.get(i):[],...o];e.set(i,n)})}generateColumnGroupId(e){return`pivotGroup_${(this.pivotColsSvc?.columns??[]).map(o=>o.getColId()).join("-")}_${e.join("-")}`}generateColumnId(e,t){return`pivot_${(this.pivotColsSvc?.columns??[]).map(i=>i.getColId()).join("-")}_${e.join("-")}_${t}`}createColDefsFromFields(e){const t={};for(let s=0;s<e.length;s++){const r=e[s].split(this.fieldSeparator);let a=t;for(let l=0;l<r.length;l++){const d=r[l];a[d]==null&&(a[d]={}),a=a[d]}}const o=(s,n,r,a)=>{const l=[];for(const u of Object.keys(r)){const p=r[u],g=o(`${s}${this.fieldSeparator}${u}`,u,p,a+1);l.push(g)}if(l.length===0){const u=this.colModel.getColDefCol(n);if(u){const g=this.colNames.getDisplayNameForColumn(u,"header")??n,f=this.createColDef(u,g,void 0,!1);return f.colId=s,f.aggFunc=u.getAggFunc(),f.valueGetter=m=>m.data?.[s],f}return{colId:s,headerName:n,valueGetter:g=>g.data?.[s]}}return this.gos.get("removePivotHeaderRowWhenSingleValueColumn")&&l.length===1&&"colId"in l[0]?(l[0].headerName=n,l[0]):{openByDefault:this.pivotDefaultExpanded===-1||a<this.pivotDefaultExpanded,groupId:s,headerName:n,children:l}},i=[];for(const s of Object.keys(t)){const n=t[s],r=o(s,s,n,0);i.push(r)}return i}},$M=class extends M{constructor(){super(...arguments),this.beanName="pivotResultCols"}wireBeans(e){this.colModel=e.colModel,this.visibleCols=e.visibleCols}destroy(){yo(this.beans,this.pivotResultCols?.tree),super.destroy()}isPivotResultColsPresent(){return this.pivotResultCols!=null}lookupPivotResultCol(e,t){if(this.pivotResultCols==null)return null;const o=this.colModel.getColDefCol(t);let i=null;return this.pivotResultCols.list.forEach(s=>{const n=s.getColDef().pivotKeys,r=s.getColDef().pivotValueColumn;At(n,e)&&r===o&&(i=s)}),i}getPivotResultCols(){return this.pivotResultCols}getPivotResultCol(e){return this.pivotResultCols?this.colModel.getColFromCollection(e,this.pivotResultCols):null}setPivotResultCols(e,t){if(this.colModel.ready&&!(e==null&&this.pivotResultCols==null)){if(e){this.processPivotResultColDef(e);const o=Pc(this.beans,e,!1,this.pivotResultCols?.tree||this.previousPivotResultCols||void 0,t);yo(this.beans,this.pivotResultCols?.tree,o.columnTree);const i=o.columnTree,s=o.treeDept,n=wa(i),r={};this.pivotResultCols={tree:i,treeDepth:s,list:n,map:r},this.pivotResultCols.list.forEach(l=>this.pivotResultCols.map[l.getId()]=l);const a=!!this.previousPivotResultCols;this.previousPivotResultCols=null,this.colModel.refreshCols(!a)}else this.previousPivotResultCols=this.pivotResultCols?this.pivotResultCols.tree:null,this.pivotResultCols=null,this.colModel.refreshCols(!1);this.visibleCols.refresh(t)}}processPivotResultColDef(e){const t=this.gos.get("processPivotResultColDef"),o=this.gos.get("processPivotResultColGroupDef");if(!t&&!o)return;const i=s=>{s.forEach(n=>{if(j(n.children)){const a=n;o&&o(a),i(a.children)}else t&&t(n)})};e&&i(e)}},jM={moduleName:"SharedPivot",version:Ne,beans:[$M,UM,yh],apiFunctions:{isPivotMode:AM,getPivotResultColumn:TM,setValueColumns:IM,getValueColumns:LM,removeValueColumns:kM,addValueColumns:GM,setPivotColumns:OM,removePivotColumns:BM,addPivotColumns:NM,getPivotColumns:HM,setPivotResultColumns:VM,getPivotResultColumns:_M},dependsOn:[Dh,Tu]};Vr.values();var KM={moduleName:"SharedTreeData",version:Ne,dependsOn:[Rt,$a,Fh,xh]},YM="ag-Grid-MissingKey",qM=class extends M{constructor(){super(...arguments),this.beanName="ssrmBlockUtils"}wireBeans(e){this.valueSvc=e.valueSvc,this.showRowGroupCols=e.showRowGroupCols,this.nodeManager=e.ssrmNodeManager,this.expansionSvc=e.expansionSvc,this.serverSideRowModel=e.rowModel,this.storeFactory=e.ssrmStoreFactory}createRowNode(e){const t=new jo(this.beans),o=e.rowHeight!=null?e.rowHeight:So(this.beans);return t.setRowHeight(o),t.group=e.group,t.leafGroup=e.leafGroup,t.level=e.level,t.uiLevel=e.level,t.parent=e.parent,t.stub=!0,t.__needsRefreshWhenVisible=!1,t.group&&(t.expanded=!1,t.field=e.field,t.rowGroupColumn=e.rowGroupColumn,t.rowGroupIndex=e.level),t}destroyRowNode(e,t=!1){e.childStore&&!t&&(this.destroyBean(e.childStore),e.childStore=null),e.sibling&&!e.footer&&this.destroyRowNode(e.sibling,!1),e.clearRowTopAndRowIndex(),e.id!=null&&this.nodeManager.removeNode(e)}setTreeGroupInfo(e){e.updateHasChildren();const t=this.gos.get("getServerSideGroupKey"),o=e.hasChildren();o&&t!=null&&(e.key=t(e.data)),!o&&e.childStore!=null&&(this.destroyBean(e.childStore),e.childStore=null,e.expanded=!1)}setRowGroupInfo(e){if(e.key=this.valueSvc.getValue(e.rowGroupColumn,e),(e.key===null||e.key===void 0)&&ha(()=>{_(190,{rowGroupId:e.rowGroupColumn?.getId(),data:e.data})},"SSBlock-BadKey"),this.gos.get("groupAllowUnbalanced")&&e.key===""){const s=this.serverSideRowModel.getParams();e.childStore=this.createBean(this.storeFactory.createStore(s,e))}fi(this.beans.gos)({node:e})&&(Zt(e,this.beans),e.sibling&&(e.sibling.uiLevel=e.uiLevel+1))}setMasterDetailInfo(e){const t=this.gos.get("isRowMaster");t!=null?e.master=t(e.data):e.master=!0}updateDataIntoRowNode(e,t){e.updateData(t),this.gos.get("treeData")?(this.setTreeGroupInfo(e),this.setChildCountIntoRowNode(e)):e.group?(this.setChildCountIntoRowNode(e),e.footer||(fi(this.beans.gos)({node:e})?e.sibling?e.sibling.updateData(t):Zt(e,this.beans):e.sibling&&Ua(e))):this.gos.get("masterDetail")}setDataIntoRowNode(e,t,o,i){e.stub=!1;const s=this.gos.get("treeData");e.setDataAndId(t,o),s?this.setTreeGroupInfo(e):e.group?this.setRowGroupInfo(e):this.gos.get("masterDetail")&&this.setMasterDetailInfo(e),(s||e.group)&&(this.setGroupDataIntoRowNode(e),this.setChildCountIntoRowNode(e)),j(t)&&(e.setRowHeight(vt(this.beans,e,!1,i).height),e.sibling?.setRowHeight(vt(this.beans,e.sibling,!1,i).height))}setChildCountIntoRowNode(e){const t=this.gos.get("getChildCount");t&&e.setAllChildrenCount(t(e.data))}setGroupDataIntoRowNode(e){e.groupValue=e.key;const t=this.showRowGroupCols?.getShowRowGroupCols()??[],o=this.gos.get("treeData");t.forEach(i=>{if(e.groupData==null&&(e.groupData={}),o)e.groupData[i.getColId()]=e.key;else if(i.isRowGroupDisplayed(e.rowGroupColumn.getId())){const s=this.valueSvc.getValue(e.rowGroupColumn,e);e.groupData[i.getColId()]=s}})}clearDisplayIndex(e){e.clearRowTopAndRowIndex(),e.hasChildren()&&!!e.childStore&&e.childStore?.clearDisplayIndexes(),e.master&&e.detailNode&&e.detailNode?.clearRowTopAndRowIndex()}setDisplayIndex(e,t,o,i){const s=this.gos.get("groupAllowUnbalanced")&&e.group&&e.key==="";if(this.gos.get("groupHideOpenParents")&&e.group&&e.expanded||s?(e.setRowIndex(null),e.setRowTop(null)):(e.setRowIndex(t.value++),e.setRowTop(o.value),o.value+=e.rowHeight),e.setUiLevel(i),e.footer)return;if(e.master&&(e.expanded&&e.detailNode?(e.detailNode.setRowIndex(t.value++),e.detailNode.setRowTop(o.value),o.value+=e.detailNode.rowHeight):e.detailNode&&e.detailNode.clearRowTopAndRowIndex()),e.hasChildren()&&!!e.childStore){const l=e.childStore;e.expanded||s?l.setDisplayIndexes(t,o,s?i:i+1):l.clearDisplayIndexes()}}extractRowBounds(e,t){const o=i=>({rowHeight:i.rowHeight,rowTop:i.rowTop});if(e.rowIndex===t)return o(e);if(e.hasChildren()&&e.expanded&&e.childStore){const i=e.childStore;if(i.isDisplayIndexInStore(t))return i.getRowBounds(t)}else if(e.master&&e.expanded&&e.detailNode&&e.detailNode.rowIndex===t)return o(e.detailNode)}isPixelInNodeRange(e,t){return!j(e.rowTop)||!j(e.rowHeight)?!1:t>=e.rowTop&&t<e.rowTop+e.rowHeight}getIndexAtPixel(e,t){if(this.isPixelInNodeRange(e,t))return e.rowIndex;const o=e.master&&e.expanded,i=e.detailNode;if(o&&i&&this.isPixelInNodeRange(i,t))return i.rowIndex;if(e.hasChildren()&&e.expanded&&e.childStore){const s=e.childStore;if(s.isPixelInRange(t))return s.getRowIndexAtPixel(t)}return null}createNodeIdPrefix(e){const t=[];let o=e;for(;o&&o.level>=0;)o.key===""?t.push(YM):t.push(o.key),o=o.parent;if(t.length>0)return t.reverse().join("-")}checkOpenByDefault(e){return this.expansionSvc?.checkOpenByDefault(e)}},QM=class extends M{constructor(){super(...arguments),this.beanName="ssrmExpandListener"}wireBeans(e){this.serverSideRowModel=e.rowModel,this.storeFactory=e.ssrmStoreFactory}postConstruct(){pt(this.gos)&&this.addManagedEventListeners({rowGroupOpened:this.onRowGroupOpened.bind(this)})}onRowGroupOpened(e){const t=e.node;if(t.expanded){if(t.master)this.createDetailNode(t);else if(Me(t.childStore)){const o=this.serverSideRowModel.getParams();t.childStore=this.createBean(this.storeFactory.createStore(o,t))}}else this.gos.get("purgeClosedRowNodes")&&j(t.childStore)&&(t.childStore=this.destroyBean(t.childStore));this.eventSvc.dispatchEvent({type:"storeUpdated"})}createDetailNode(e){if(j(e.detailNode))return e.detailNode;const t=new jo(this.beans);t.detail=!0,t.selectable=!1,t.parent=e,j(e.id)&&(t.id="detail_"+e.id),t.data=e.data,t.level=e.level+1;const o=200,i=vt(this.beans,t).height;return t.rowHeight=i||o,e.detailNode=t,t}},XM=class extends M{constructor(){super(...arguments),this.beanName="ssrmFilterListener"}wireBeans(e){this.serverSideRowModel=e.rowModel,this.filterManager=e.filterManager,this.listenerUtils=e.ssrmListenerUtils}postConstruct(){pt(this.gos)&&this.addManagedEventListeners({advancedFilterEnabledChanged:()=>this.onFilterChanged(!0),filterChanged:()=>this.onFilterChanged()})}onFilterChanged(e){const t=this.serverSideRowModel.getParams();if(!t)return;const o=t.filterModel;let i,s;if(this.filterManager?.isAdvFilterEnabled()){i=this.filterManager.getAdvFilterModel();const l=e?Object.keys(o??{}):this.getAdvancedFilterColumns(o),d=this.getAdvancedFilterColumns(i);l.forEach(c=>d.add(c)),s=Array.from(d)}else if(i=this.filterManager?.getFilterModel()??{},e){const l=this.getAdvancedFilterColumns(o);Object.keys(i).forEach(d=>l.add(d)),s=Array.from(l)}else s=this.findChangedColumns(o,i);const n=this.listenerUtils.isSortingWithValueColumn(s),r=this.listenerUtils.isSortingWithSecondaryColumn(s),a={valueColChanged:n,secondaryColChanged:r,changedColumns:s};this.serverSideRowModel.refreshAfterFilter(i,a)}findChangedColumns(e,t){const o={};Object.keys(e).forEach(s=>o[s]=!0),Object.keys(t).forEach(s=>o[s]=!0);const i=[];return Object.keys(o).forEach(s=>{const n=JSON.stringify(e[s]),r=JSON.stringify(t[s]);n!=r&&i.push(s)}),i}getAdvancedFilterColumns(e){const t=new Set;if(!e)return t;const o=i=>{i.filterType==="join"?i.conditions.forEach(s=>o(s)):t.add(i.colId)};return o(e),t}},ZM=class extends M{constructor(){super(...arguments),this.beanName="ssrmListenerUtils"}wireBeans(e){this.pivotResultCols=e.pivotResultCols,this.valueColsSvc=e.valueColsSvc}isSortingWithValueColumn(e){const t=(this.valueColsSvc?.columns??[]).map(o=>o.getColId());for(let o=0;o<e.length;o++)if(t.indexOf(e[o])>-1)return!0;return!1}isSortingWithSecondaryColumn(e){const t=this.pivotResultCols?.getPivotResultCols();if(!t)return!1;const o=t.list.map(i=>i.getColId());for(let i=0;i<e.length;i++)if(o.indexOf(e[i])>-1)return!0;return!1}},JM=class extends M{constructor(){super(...arguments),this.beanName="ssrmSortSvc"}wireBeans(e){this.sortSvc=e.sortSvc,this.serverSideRowModel=e.rowModel,this.listenerUtils=e.ssrmListenerUtils}postConstruct(){pt(this.gos)&&this.addManagedEventListeners({sortChanged:this.onSortChanged.bind(this)})}onSortChanged(){const e=this.serverSideRowModel.getParams();if(!e)return;const t=this.sortSvc.getSortModel(),o=e.sortModel,i=this.findChangedColumnsInSort(t,o),s=this.listenerUtils.isSortingWithValueColumn(i),n=this.listenerUtils.isSortingWithSecondaryColumn(i),r={valueColChanged:s,secondaryColChanged:n,changedColumns:i};this.serverSideRowModel.refreshAfterSort(t,r)}findChangedColumnsInSort(e,t){let o=[];[e,t].forEach(n=>{if(n){const r=n.map(a=>a.colId);o=o.concat(r)}});const i=(n,r)=>{const a=n?n.sort:null,l=r?r.sort:null;return a!==l},s=(n,r)=>{const a=n?t.indexOf(n):-1,l=r?e.indexOf(r):-1;return a!==l};return o.filter(n=>{const r=t.find(l=>l.colId===n),a=e.find(l=>l.colId===n);return i(r,a)||s(r,a)})}},eP=class extends M{constructor(){super(...arguments),this.beanName="ssrmNodeManager",this.rowNodes=new Map}addRowNode(e){const t=e.id;this.rowNodes.has(t)&&_(187,{rowId:t,firstData:this.rowNodes.get(t).data,secondData:e.data}),this.rowNodes.set(t,e)}removeNode(e){const t=e.id;this.rowNodes.delete(t)}destroy(){this.clear(),super.destroy()}clear(){this.rowNodes.clear(),super.destroy()}},tP=class extends M{constructor(){super(...arguments),this.beanName="rowModel",this.pauseStoreUpdateListening=!1,this.started=!1,this.managingPivotResultColumns=!1,this.onRowHeightChanged_debounced=tt(this,this.onRowHeightChanged.bind(this),100)}wireBeans(e){this.colModel=e.colModel,this.colNames=e.colNames,this.pivotResultCols=e.pivotResultCols,this.rowGroupColsSvc=e.rowGroupColsSvc,this.pivotColsSvc=e.pivotColsSvc,this.valueColsSvc=e.valueColsSvc,this.filterManager=e.filterManager,this.sortSvc=e.sortSvc,this.rowRenderer=e.rowRenderer,this.nodeManager=e.ssrmNodeManager,this.storeFactory=e.ssrmStoreFactory,this.pivotColDefSvc=e.pivotColDefSvc}ensureRowHeightsValid(){return!1}start(){this.started=!0,this.updateDatasource()}destroyDatasource(){this.datasource&&(this.datasource.destroy&&this.datasource.destroy(),this.rowRenderer.datasourceChanged(),this.datasource=void 0)}postConstruct(){const e=this.resetRootStore.bind(this);this.addManagedEventListeners({newColumnsLoaded:this.onColumnEverything.bind(this),storeUpdated:this.onStoreUpdated.bind(this),columnValueChanged:e,columnPivotChanged:e,columnRowGroupChanged:e,columnPivotModeChanged:e}),this.addManagedPropertyListeners(["masterDetail","treeData","removePivotHeaderRowWhenSingleValueColumn","cacheBlockSize"],e),this.addManagedPropertyListener("groupAllowUnbalanced",()=>this.onStoreUpdated()),this.addManagedPropertyListener("rowHeight",()=>this.resetRowHeights()),this.verifyProps(),this.addManagedPropertyListener("serverSideDatasource",()=>this.updateDatasource())}updateDatasource(){const e=this.gos.get("serverSideDatasource");e&&this.setDatasource(e)}verifyProps(){Ht(this.gos)&&!this.gos.exists("getRowId")&&_(188)}setDatasource(e){this.started&&(this.destroyDatasource(),this.datasource=e,this.resetRootStore())}applyRowData(e,t,o){const i=this.getRootStore();if(!i)return;const s=i.getChildStore(o);s&&s.applyRowData(e,t,e.rowData.length)}isLastRowIndexKnown(){const e=this.getRootStore();return e?e.isLastRowIndexKnown():!1}onColumnEverything(){if(!this.storeParams){this.resetRootStore();return}const e=this.columnsToValueObjects(this.rowGroupColsSvc?.columns),t=this.columnsToValueObjects(this.valueColsSvc?.columns),o=this.columnsToValueObjects(this.pivotColsSvc?.columns),i=d=>{const c={};d.oldCols.forEach(g=>c[g.id]=g);const u=d.newCols.every(g=>{const f=c[g.id];return f&&delete c[g.id],f&&f.field===g.field&&f.aggFunc===g.aggFunc}),p=!d.allowRemovedColumns&&!!Object.values(c).length;return u&&!p},s=!Xi(this.storeParams.sortModel,this.sortSvc?.getSortModel()??[]),n=!i({oldCols:this.storeParams.rowGroupCols,newCols:e}),r=!i({oldCols:this.storeParams.pivotCols,newCols:o}),a=!!e?.length&&!i({oldCols:this.storeParams.valueCols,newCols:t,allowRemovedColumns:!0});if(s||n||r||a)this.resetRootStore();else{const d=this.createStoreParams();this.storeParams.rowGroupCols=d.rowGroupCols,this.storeParams.pivotCols=d.pivotCols,this.storeParams.valueCols=d.valueCols}}destroyRootStore(){!this.rootNode||!this.rootNode.childStore||(this.rootNode.childStore=this.destroyBean(this.rootNode.childStore),this.nodeManager.clear())}refreshAfterSort(e,t){this.storeParams&&(this.storeParams.sortModel=e);const o=this.getRootStore();o&&(o.refreshAfterSort(t),this.onStoreUpdated())}generateSecondaryColumns(e){if(!this.pivotColDefSvc){this.gos.assertModuleRegistered("SharedPivot",2);return}const t=this.pivotColDefSvc.createColDefsFromFields(e);this.managingPivotResultColumns=!0,this.pivotResultCols?.setPivotResultCols(t,"rowModelUpdated")}resetRowHeights(){const e=this.resetRowHeightsForAllRowNodes(),t=vt(this.beans,this.rootNode);if(this.rootNode.setRowHeight(t.height,t.estimated),this.rootNode.sibling){const o=vt(this.beans,this.rootNode.sibling);this.rootNode.sibling.setRowHeight(o.height,o.estimated)}e&&this.onRowHeightChanged()}resetRowHeightsForAllRowNodes(){let e=!1;return this.forEachNode(t=>{const o=vt(this.beans,t);t.setRowHeight(o.height,o.estimated);const i=t.detailNode;if(i){const s=vt(this.beans,i);i.setRowHeight(s.height,s.estimated)}if(t.sibling){const s=vt(this.beans,t.sibling);i?.setRowHeight(s.height,s.estimated)}e=!0}),e}resetRootStore(){this.destroyRootStore(),this.rootNode=new jo(this.beans),this.rootNode.group=!0,this.rootNode.level=-1,this.datasource&&(this.storeParams=this.createStoreParams(),this.rootNode.childStore=this.createBean(this.storeFactory.createStore(this.storeParams,this.rootNode)),this.updateRowIndexesAndBounds()),this.managingPivotResultColumns&&(this.pivotResultCols?.setPivotResultCols(null,"api"),this.managingPivotResultColumns=!1),this.dispatchModelUpdated(!0)}columnsToValueObjects(e=[]){return e.map(t=>({id:t.getId(),aggFunc:t.getAggFunc(),displayName:this.colNames.getDisplayNameForColumn(t,"model"),field:t.getColDef().field}))}createStoreParams(){const e=this.columnsToValueObjects(this.rowGroupColsSvc?.columns),t=this.columnsToValueObjects(this.valueColsSvc?.columns),o=this.columnsToValueObjects(this.pivotColsSvc?.columns),i=ga(this.gos);return{valueCols:t,rowGroupCols:e,pivotCols:o,pivotMode:this.colModel.isPivotMode(),filterModel:this.filterManager?.isAdvFilterEnabled()?this.filterManager?.getAdvFilterModel():this.filterManager?.getFilterModel()??{},sortModel:this.sortSvc?.getSortModel()??[],datasource:this.datasource,lastAccessedSequence:{value:0},dynamicRowHeight:i}}getParams(){return this.storeParams}dispatchModelUpdated(e=!1){this.eventSvc.dispatchEvent({type:"modelUpdated",animate:!e,keepRenderedRows:!e,newPage:!1,newData:!1})}onStoreUpdated(){this.pauseStoreUpdateListening||(this.updateRowIndexesAndBounds(),this.dispatchModelUpdated())}onRowHeightChanged(){this.updateRowIndexesAndBounds(),this.dispatchModelUpdated()}updateRowIndexesAndBounds(){const e=this.getRootStore();e&&e.setDisplayIndexes({value:0},{value:0},0)}retryLoads(){const e=this.getRootStore();e&&(e.retryLoads(),this.onStoreUpdated())}getRow(e){const t=this.getRootStore();if(t)return t.getRowUsingDisplayIndex(e)}setPaused(e){this.pauseStoreUpdateListening=e}expandAll(e){this.pauseStoreUpdateListening=!0,this.forEachNode(t=>{t.stub||t.hasChildren()&&t.setExpanded(e)}),this.pauseStoreUpdateListening=!1,this.onStoreUpdated()}refreshAfterFilter(e,t){this.storeParams&&(this.storeParams.filterModel=e);const o=this.getRootStore();o&&(o.refreshAfterFilter(t),this.onStoreUpdated())}getRootStore(){return this.rootNode?.childStore}getRowCount(){const e=this.getRootStore();return e?e.getDisplayIndexEnd():0}getTopLevelRowCount(){const e=this.getRootStore();return e?e.getRowCount():1}getTopLevelRowDisplayedIndex(e){const t=this.getRootStore();return t?t.getTopLevelRowDisplayedIndex(e):e}getRowBounds(e){const t=this.getRootStore();return t?t.getRowBounds(e):{rowTop:0,rowHeight:So(this.beans)}}getBlockStates(){const e=this.getRootStore();if(!e)return;const t={};return e.forEachStoreDeep(o=>{const i=o.getBlockStates();for(const s of Object.keys(i))t[s]=i[s]}),t}getRowIndexAtPixel(e){const t=this.getRootStore();return e<=0||!t?0:t.getRowIndexAtPixel(e)}isEmpty(){return!1}isRowsToRender(){return this.getRootStore()!=null&&this.getRowCount()>0}getType(){return"serverSide"}forEachNode(e){const t=this.getRootStore();t&&t.forEachNodeDeep(e)}forEachDisplayedNode(e){const t=(o,i)=>{o.stub||!o.displayed||e(o,i)};this.forEachNode(t)}forEachNodeAfterFilterAndSort(e,t=!1){const o=this.getRootStore();o&&o.forEachNodeDeepAfterFilterAndSort(e,void 0,t)}executeOnStore(e,t){if(!this.started)return!1;const o=this.getRootStore();if(!o)return!0;const i=o.getChildStore(e);return i&&t(i),!0}refreshStore(e={}){const t=e.route?e.route:[];this.executeOnStore(t,o=>o.refreshStore(e.purge==!0))}getStoreState(){const e=[],t=this.getRootStore();return t&&t.addStoreStates(e),e}getNodesInRangeForSelection(e,t){const o=e.rowIndex,i=t.rowIndex;if(o===null&&i===null)return[];if(i===null)return e?[e]:[];if(o===null)return[t];const s=[],[n,r]=[o,i].sort((a,l)=>a-l);return this.forEachNode(a=>{const l=a.rowIndex;l==null||a.stub||l>=n&&l<=r&&s.push(a)}),s.length!==r-n+1?null:s}getRowNode(e){let t;return this.forEachNode(o=>{o.id===e&&(t=o),o.detailNode&&o.detailNode.id===e&&(t=o.detailNode)}),t}isRowPresent(e){return!!this.getRowNode(e.id)}setRowCount(e,t){const o=this.getRootStore();o&&o.setRowCount(e,t)}destroy(){this.destroyDatasource(),this.destroyRootStore(),super.destroy()}onRowHeightChangedDebounced(){this.onRowHeightChanged_debounced()}};function oP(e){return e.selectionSvc?.getSelectionState()??null}function iP(e,t){e.selectionSvc?.setSelectionState(t,"api")}function sP(e,t){return e.ssrmTxnManager?.applyTransaction(t)}function nP(e,t){const o=t.startRow??0,i=t.route??[];if(o<0){_(189,{startRow:o});return}Ri(e)?.applyRowData(t.successParams,o,i)}function rP(e,t,o){return e.ssrmTxnManager?.applyTransactionAsync(t,o)}function aP(e){Ri(e)?.retryLoads()}function lP(e){return e.ssrmTxnManager?.flushAsyncTransactions()}function dP(e,t){Ri(e)?.refreshStore(t)}function cP(e){return Ri(e)?.getStoreState()??[]}var uP=class extends bh{constructor(){super(...arguments),this.beanName="expansionSvc",this.queuedRowIds=new Set}wireBeans(e){this.serverSideRowModel=e.rowModel}postConstruct(){this.addManagedEventListeners({columnRowGroupChanged:()=>{this.queuedRowIds.clear()}})}checkOpenByDefault(e){if(!e.isExpandable())return;if(this.queuedRowIds.has(e.id)){this.queuedRowIds.delete(e.id),e.setExpanded(!0);return}const t=this.gos.getCallback("isServerSideGroupOpenByDefault");if(!t)return;const o={data:e.data,rowNode:e};t(o)&&e.setExpanded(!0)}expandRows(e){e.forEach(t=>{const o=this.serverSideRowModel.getRowNode(t);o?o.setExpanded(!0):this.queuedRowIds.add(t)})}expandAll(e){this.serverSideRowModel.expandAll(e)}onGroupExpandedOrCollapsed(){}dispatchExpandedEvent(e){this.eventSvc.dispatchEvent(e)}},Cr=class extends M{constructor(){super(...arguments),this.selectedState={selectAll:!1,toggledNodes:new Set},this.selectAllUsed=!1,this.selectedNodes={}}getSelectedState(){return{selectAll:this.selectedState.selectAll,toggledNodes:[...this.selectedState.toggledNodes]}}setSelectedState(e){if(typeof e!="object"){ae(116);return}if(!("selectAll"in e)){ae(116);return}if(typeof e.selectAll!="boolean"){ae(117);return}if(!("toggledNodes"in e)||!Array.isArray(e.toggledNodes))return _(197);const t={selectAll:e.selectAll,toggledNodes:new Set};e.toggledNodes.forEach(i=>{typeof i=="string"?t.toggledNodes.add(i):_(196,{key:i})});const o=t.selectAll||t.toggledNodes.size>1;if(pc(this.gos)&&!Wo(this.gos)&&o){_(130);return}this.selectedState=t}deleteSelectionStateFromParent(e,t){if(this.selectedState.toggledNodes.size===0)return!1;let o=!1;return t.forEach(i=>{this.selectedState.toggledNodes.delete(i)&&(o=!0)}),o}setNodesSelected(e){const{nodes:t,clearSelection:o,newValue:i}=e;if(t.length===0)return 0;const s=o&&i;if(!Wo(this.gos)||s){if(t.length>1)return ae(130),0;const r=t[0],a=r.footer?r.sibling:r;return i&&a.selectable?(this.selectedNodes={[a.id]:a},this.selectedState={selectAll:!1,toggledNodes:new Set([a.id])}):(this.selectedNodes={},this.selectedState={selectAll:!1,toggledNodes:new Set}),1}const n=(r,a=i)=>{const l=r.footer?r.sibling:r;a&&l.selectable?this.selectedNodes[l.id]=l:delete this.selectedNodes[l.id],a===this.selectedState.selectAll||!l.selectable?this.selectedState.toggledNodes.delete(l.id):this.selectedState.toggledNodes.add(l.id)};return t.forEach(r=>n(r)),1}processNewRow(e){this.selectedNodes[e.id]&&(this.selectedNodes[e.id]=e)}isNodeSelected(e){const t=this.selectedState.toggledNodes.has(e.id);return this.selectedState.selectAll?!t:t}getSelectedNodes(e=!1,t=!0){const{selectedState:{selectAll:o},selectedNodes:i,selectAllUsed:s}=this;return t&&s&&_(199),e&&o?null:Object.values(i)}getSelectedRows(){return(this.getSelectedNodes()??[]).map(e=>e.data)}getSelectionCount(){return this.selectedState.selectAll?-1:this.selectedState.toggledNodes.size}isEmpty(){return!this.selectedState.selectAll&&!this.selectedState.toggledNodes?.size}selectAllRowNodes(){this.reset(!0)}deselectAllRowNodes(){this.reset(!1)}reset(e){this.selectedState={selectAll:e,toggledNodes:new Set},this.selectedNodes={},this.selectAllUsed||(this.selectAllUsed=e)}getSelectAllState(){return this.selectedState.selectAll?this.selectedState.toggledNodes.size>0?null:!0:this.selectedState.toggledNodes.size>0?null:!1}},Es=class extends M{constructor(){super(...arguments),this.selectedState={selectAllChildren:!1,toggledNodes:new Map}}wireBeans(e){this.rowModel=e.rowModel,this.rowGroupColsSvc=e.rowGroupColsSvc,this.filterManager=e.filterManager,this.selectionSvc=e.selectionSvc}postConstruct(){this.addManagedEventListeners({modelUpdated:()=>this.removeRedundantState(),columnRowGroupChanged:()=>this.selectionSvc.reset("rowGroupChanged")})}getSelectedState(){const{gos:e,rowGroupColsSvc:t,selectedState:o}=this,i=e.get("treeData"),s=(n,r,a)=>{const l={nodeId:a};if((i||t&&r<=t.columns.length)&&(l.selectAllChildren=n.selectAllChildren),n.toggledNodes.size){const d=[];n.toggledNodes.forEach((c,u)=>{const p=s(c,r+1,u);d.push(p)}),l.toggledNodes=d}return l};return s(o,0)}setSelectedState(e){if("selectAll"in e){ae(111);return}const t=(o,i)=>{if(typeof o!="object")throw ae(243),new Error;if("selectAllChildren"in o&&typeof o.selectAllChildren!="boolean")throw ae(244),new Error;if("toggledNodes"in o){if(!Array.isArray(o.toggledNodes))throw ae(245),new Error;if(!o.toggledNodes.every(l=>typeof l=="object"&&"nodeId"in l&&typeof l.nodeId=="string"))throw ae(246),new Error}const s=o.selectAllChildren??!i,n=o.toggledNodes?.map(a=>[a.nodeId,t(a,s)]);if(n?.some(([,a])=>s===a.selectAllChildren&&a.toggledNodes.size===0))throw ae(247),new Error;return{selectAllChildren:s,toggledNodes:new Map(n)}};try{this.selectedState=t(e,!!e.selectAllChildren)}catch{}}deleteSelectionStateFromParent(e,t){let o=this.selectedState;const i=[...e];for(;o&&i.length;)o=o.toggledNodes.get(i.pop());if(!o)return!1;let s=!1;return t.forEach(n=>{o?.toggledNodes.delete(n)&&(s=!0)}),s&&this.removeRedundantState(),s}setNodesSelected({nodes:e,newValue:t,clearSelection:o}){if(e.length===0)return 0;const i=o&&t;if(!Wo(this.gos)||i){if(e.length>1)return ae(130),0;this.deselectAllRowNodes()}return e.forEach(s=>{const n=s.footer?s.sibling:s,r=this.getRouteToNode(n);this.recursivelySelectNode(r,this.selectedState,t)}),this.removeRedundantState(),1}isNodeSelected(e){const t=this.getRouteToNode(e);return this.isNodePathSelected(t,this.selectedState)}isNodePathSelected([e,...t],o){if(t.length===0){const i=o.toggledNodes.has(e.id);if(e.hasChildren()){const s=o.toggledNodes.get(e.id);if(s&&s.toggledNodes.size)return}return o.selectAllChildren?!i:i}if(o.toggledNodes.has(e.id)){const i=o.toggledNodes.get(e.id);if(i)return this.isNodePathSelected(t,i)}return o.selectAllChildren}getRouteToNode(e){const t=[];let o=e;for(;o.parent;)t.push(o),o=o.parent;return t.reverse()}removeRedundantState(){if(this.filterManager?.isAnyFilterPresent())return;const e=(t=this.selectedState,o,i)=>{if(t.toggledNodes.forEach((r,a)=>{e(r,a,t)}),o){const a=this.rowModel.getRowNode(o)?.childStore;if(a?.isLastRowIndexKnown()&&t.toggledNodes.size>=a.getRowCount()){for(const c of t.toggledNodes.entries()){const[u,p]=c;if(p.toggledNodes.size>0||!this.rowModel.getRowNode(u))return}t.selectAllChildren=!t.selectAllChildren,t.toggledNodes.clear()}}const s=t.toggledNodes.size===0,n=i?.selectAllChildren===t.selectAllChildren;s&&n&&i?.toggledNodes.delete(o)};e()}recursivelySelectNode([e,...t],o,i){if(!e)return;if(!t.length){const a=e.selectable;if(o.selectAllChildren===i||!a){o.toggledNodes.delete(e.id);return}const d={selectAllChildren:i,toggledNodes:new Map};o.toggledNodes.set(e.id,d);return}const n=o.toggledNodes.has(e.id),r=o.toggledNodes.get(e.id)??{selectAllChildren:o.selectAllChildren,toggledNodes:new Map};n||o.toggledNodes.set(e.id,r),this.recursivelySelectNode(t,r,i),o.selectAllChildren===r.selectAllChildren&&r.toggledNodes.size===0&&o.toggledNodes.delete(e.id)}getSelectedNodes(e=!1){if(_(202),this.selectedState.selectAllChildren&&e)return null;const t=[];return this.rowModel.forEachNode(o=>{o.isSelected()&&t.push(o)}),t}processNewRow(){}getSelectedRows(){return this.getSelectedNodes()?.map(e=>e.data)??[]}getSelectionCount(){return-1}isEmpty(){return!this.selectedState.selectAllChildren&&!this.selectedState.toggledNodes?.size}selectAllRowNodes(){this.reset(!0)}deselectAllRowNodes(){this.reset(!1)}reset(e){this.selectedState={selectAllChildren:e,toggledNodes:new Map}}getSelectAllState(){return this.selectedState.selectAllChildren?this.selectedState.toggledNodes.size>0?null:!0:this.selectedState.toggledNodes.size>0?null:!1}},hP=class extends yC{constructor(){super(...arguments),this.beanName="selectionSvc"}postConstruct(){super.postConstruct(),this.addManagedPropertyListeners(["groupSelectsChildren","rowSelection"],()=>{const o=os(this.gos),i=o&&this.selectionStrategy instanceof Cr?Es:!o&&this.selectionStrategy instanceof Es?Cr:void 0;i&&(this.destroyBean(this.selectionStrategy),this.selectionStrategy=this.createManagedBean(new i),this.shotgunResetNodeSelectionState(),this.dispatchSelectionChanged("api"))}),this.addManagedPropertyListeners(["rowSelection"],()=>{const o=an(this.gos);o!==this.selectionMode&&(this.selectionMode=o,this.deselectAllRowNodes({source:"api"}))}),this.selectionMode=an(this.gos);const t=os(this.gos)?Es:Cr;this.selectionStrategy=this.createManagedBean(new t)}handleSelectionEvent(e,t,o){if(this.isRowSelectionBlocked(t))return 0;let i=0;const s=this.inferNodeSelections(t,e.shiftKey,e.metaKey||e.ctrlKey,o);return s==null?0:(this.selectionCtx.selectAll=!1,"select"in s?(s.reset?this.selectionStrategy.deselectAllRowNodes({source:"api"}):this.selectionStrategy.setNodesSelected({nodes:s.deselect,newValue:!1,source:o}),i=this.selectionStrategy.setNodesSelected({nodes:s.select,newValue:!0,source:o})):i=this.selectionStrategy.setNodesSelected({nodes:[s.node],newValue:s.newValue,clearSelection:s.clearSelection,event:e,source:o}),this.shotgunResetNodeSelectionState(o),this.dispatchSelectionChanged(o),i)}getSelectionState(){return this.selectionStrategy.getSelectedState()}setSelectionState(e,t){if(!Ht(this.gos)){_(132);return}Array.isArray(e)||(this.selectionStrategy.setSelectedState(e),this.shotgunResetNodeSelectionState(),this.dispatchSelectionChanged(t))}setNodesSelected(e){if(!Ht(this.gos)&&e.newValue)return _(132),0;const{nodes:t,...o}=e;if(t.length>1&&this.selectionMode!=="multiRow")return _(130),0;const i={nodes:t.filter(n=>n.selectable),...o};if(!i.nodes.length)return 0;const s=this.selectionStrategy.setNodesSelected(i);return this.shotgunResetNodeSelectionState(i.source),this.dispatchSelectionChanged(i.source),s}deleteSelectionStateFromParent(e,t){this.selectionStrategy.deleteSelectionStateFromParent(e,t)&&(this.shotgunResetNodeSelectionState(),this.dispatchSelectionChanged("api"))}shotgunResetNodeSelectionState(e){this.beans.rowModel.forEachNode(t=>{if(t.stub)return;const o=this.selectionStrategy.isNodeSelected(t);o!==t.isSelected()&&this.selectRowNode(t,o,void 0,e)})}getSelectedNodes(){return this.selectionStrategy.getSelectedNodes()??[]}getSelectedRows(){return this.selectionStrategy.getSelectedRows()}getSelectionCount(){return this.selectionStrategy.getSelectionCount()}syncInRowNode(e){this.selectionStrategy.processNewRow(e);const t=this.selectionStrategy.isNodeSelected(e);if(t!=!1&&!e.selectable){this.selectionStrategy.setNodesSelected({nodes:[e],newValue:!1,source:"api"}),this.shotgunResetNodeSelectionState(),this.dispatchSelectionChanged("api");return}e.__selected=t}reset(){this.selectionStrategy.deselectAllRowNodes({source:"api"}),this.selectionCtx.reset()}isEmpty(){return this.selectionStrategy.isEmpty()}hasNodesToSelect(){return!0}selectAllRowNodes(e){if(!Ht(this.gos)){_(132);return}if(cd(e),pc(this.gos)&&!Wo(this.gos))return _(130);this.selectionStrategy.selectAllRowNodes(e),this.selectionCtx.selectAll=!0,this.beans.rowModel.forEachNode(t=>{t.stub||this.selectRowNode(t,!0,void 0,e.source)}),this.dispatchSelectionChanged(e.source)}deselectAllRowNodes(e){cd(e),this.selectionStrategy.deselectAllRowNodes(e),this.selectionCtx.selectAll=!1,this.beans.rowModel.forEachNode(t=>{t.stub||this.selectRowNode(t,!1,void 0,e.source)}),this.dispatchSelectionChanged(e.source)}getSelectAllState(e){return this.selectionStrategy.getSelectAllState(e)}getBestCostNodeSelection(){return _(194,{method:"getBestCostNodeSelection"})}updateSelectable(){if(!Ht(this.gos))return;const e=[];this.beans.rowModel.forEachNode(t=>{!this.updateRowSelectable(t,!0)&&t.isSelected()&&e.push(t)}),e.length&&this.setNodesSelected({nodes:e,newValue:!1,source:"selectableChanged"})}dispatchSelectionChanged(e){this.eventSvc.dispatchEvent({type:"selectionChanged",source:e,selectedNodes:this.selectionStrategy instanceof Es?null:this.selectionStrategy.getSelectedNodes(!0,!1),serverSideState:this.getSelectionState()})}updateSelectableAfterGrouping(){return ae(194,{method:"updateSelectableAfterGrouping"})}refreshMasterNodeState(){}setDetailSelectionState(){}};function cd({selectAll:e}){(e==="filtered"||e==="currentPage")&&_(195,{justCurrentPage:e==="currentPage"})}var pP=class extends M{constructor(){super(...arguments),this.beanName="rowChildrenSvc"}getHasChildrenValue(e){const t=this.gos.get("treeData"),o=this.gos.get("isServerSideGroup");return!e.stub&&!e.footer&&(t?!!o&&o(e.data):!!e.group)}},gP=class extends M{constructor(){super(...arguments),this.beanName="lazyBlockLoadingSvc",this.outboundRequests=0,this.cacheLoadingNodesMap=new Map,this.isCheckQueued=!1,this.nextBlockToLoad=void 0}wireBeans(e){this.rowRenderer=e.rowRenderer,this.rowModel=e.rowModel}postConstruct(){this.maxOutboundRequests=jp(this.gos)}subscribe(e){this.cacheLoadingNodesMap.set(e,new Set)}unsubscribe(e){this.cacheLoadingNodesMap.delete(e)}queueLoadCheck(){this.isCheckQueued||(this.isCheckQueued=!0,window.queueMicrotask(()=>{this.queueLoadAction(),this.isCheckQueued=!1}))}onLoadComplete(){this.outboundRequests-=1,this.queueLoadCheck()}hasAvailableLoadBandwidth(){return this.maxOutboundRequests===void 0?!0:this.outboundRequests<this.maxOutboundRequests}queueLoadAction(){const e=this.getBlockToLoad();if(!e)return;const t=this.nextBlockToLoad&&this.nextBlockToLoad.cache===e.cache&&this.nextBlockToLoad.index===e.index;if(!t&&(!this.nextBlockToLoad||!t)){this.nextBlockToLoad=e,window.clearTimeout(this.loaderTimeout);const o=Number(this.nextBlockToLoad.index),i=this.nextBlockToLoad.cache,s=e.index+e.cache.getBlockSize();this.loaderTimeout=window.setTimeout(()=>{i.isAlive()&&(this.loaderTimeout=void 0,this.attemptLoad(i,o,s),this.nextBlockToLoad=void 0)},this.gos.get("blockLoadDebounceMillis"))}}attemptLoad(e,t,o){this.hasAvailableLoadBandwidth()&&(this.executeLoad(e,t,o),this.queueLoadCheck())}executeLoad(e,t,o){const i=e.getSsrmParams(),s={startRow:t,endRow:o,rowGroupCols:i.rowGroupCols,valueCols:i.valueCols,pivotCols:i.pivotCols,pivotMode:i.pivotMode,groupKeys:e.store.getParentNode().getRoute()??[],filterModel:i.filterModel,sortModel:i.sortModel},n=this.cacheLoadingNodesMap.get(e),r=()=>{for(let u=0;u<o-t;u++)n.delete(t+u)},a=()=>{for(let u=0;u<o-t;u++)n.add(t+u)},l=u=>{this.onLoadComplete(),e.onLoadSuccess(t,o-t,u),r()},d=()=>{this.onLoadComplete(),e.onLoadFailed(t,o-t),r()},c=Z(this.gos,{request:s,success:l,fail:d,parentNode:e.store.getParentNode()});a(),this.outboundRequests+=1,e.getSsrmParams().datasource?.getRows(c)}getBlockToLoad(){const e=this.rowRenderer.firstRenderedRow,t=this.rowRenderer.lastRenderedRow;for(let a=e;a<=t;a++){const l=this.rowModel.getRow(a);if(!l)continue;const d=l.parent?.childStore;if(!d)continue;const c=d.getCache(),u=c.getNodes().getBy("node",l);if(!(!u||this.cacheLoadingNodesMap.get(c)?.has(u.index))&&(l.__needsRefreshWhenVisible||l.stub&&!l.failedLoad))return{cache:c,index:c.getBlockStartIndex(u.index)}}let o=null,i=null,s=Number.MAX_SAFE_INTEGER;for(const a of this.cacheLoadingNodesMap.keys())a.getNodesToRefresh().forEach(d=>{if(d.rowIndex==null){i=d,o=a;return}const c=a.getNodes().getBy("node",d);if(!c||this.cacheLoadingNodesMap.get(a)?.has(c.index))return;const p=Math.abs(e-d.rowIndex),g=Math.abs(d.rowIndex-t);p<s&&(i=d,s=p,o=a),g<s&&(i=d,s=g,o=a)});if(!o)return;const n=o,r=n.getNodes().getBy("node",i)?.index;return r==null?void 0:{cache:n,index:n.getBlockStartIndex(r)}}isRowLoading(e,t){return this.cacheLoadingNodesMap.get(e)?.has(t)??!1}},fP=class{constructor(...e){this.indexes=e,this.maps=new Map(this.indexes.map(t=>[t,new Map]))}getSize(){return this.maps.get(this.indexes[0]).size}getBy(e,t){return this.maps.get(e).get(t)}set(e){this.indexes.forEach(t=>{this.maps.get(t).set(e[t],e)})}delete(e){this.indexes.forEach(t=>{this.maps.get(t).delete(e[t])})}clear(){this.maps.forEach(e=>e.clear())}getIterator(e){return this.maps.get(e).values()}forEach(e){const t=this.getIterator(this.indexes[0]);let o;for(;(o=t.next())&&!o.done;)e(o.value)}find(e){const t=this.getIterator(this.indexes[0]);let o;for(;(o=t.next())&&!o.done;)if(e(o.value))return o.value}filter(e){const t=this.getIterator(this.indexes[0]);let o;const i=[];for(;(o=t.next())&&!o.done;)e(o.value)&&i.push(o.value);return i}},mP=100,vr=class extends M{constructor(e,t,o,i){super(),this.live=!0,this.removedNodeCache=new Map,this.store=e,this.numberOfRows=t,this.isLastRowKnown=o,this.storeParams=i}wireBeans(e){this.rowRenderer=e.rowRenderer,this.blockUtils=e.ssrmBlockUtils,this.focusSvc=e.focusSvc,this.nodeManager=e.ssrmNodeManager,this.serverSideRowModel=e.rowModel,this.rowNodeSorter=e.rowNodeSorter,this.sortSvc=e.sortSvc,this.lazyBlockLoadingSvc=e.lazyBlockLoadingSvc,this.colModel=e.colModel}postConstruct(){this.lazyBlockLoadingSvc.subscribe(this),this.nodeMap=new fP("index","id","node"),this.nodeDisplayIndexMap=new Map,this.nodesToRefresh=new Set,this.defaultNodeIdPrefix=this.blockUtils.createNodeIdPrefix(this.store.getParentNode()),this.getRowIdFunc=es(this.gos),this.isMasterDetail=this.gos.get("masterDetail")}destroy(){this.lazyBlockLoadingSvc.unsubscribe(this),this.numberOfRows=0,this.nodeMap.forEach(e=>this.blockUtils.destroyRowNode(e.node)),this.nodeMap.clear(),this.nodeDisplayIndexMap.clear(),this.nodesToRefresh.clear(),this.live=!1,super.destroy()}getRowByDisplayIndex(e){if(!this.store.isDisplayIndexInStore(e))return;const t=this.nodeDisplayIndexMap.get(e);if(t)return(t.stub||t.__needsRefreshWhenVisible)&&this.lazyBlockLoadingSvc.queueLoadCheck(),t;if(this.gos.get("groupHideOpenParents")||this.gos.get("groupAllowUnbalanced")){const l=this.nodeMap.find(d=>!!d.node.childStore?.isDisplayIndexInStore(e));if(l)return l.node.childStore?.getRowUsingDisplayIndex(e)}if(e===this.store.getDisplayIndexStart())return this.createStubNode(0,e);const i=this.nodeDisplayIndexMap.get(e-1);if(i){if(this.isMasterDetail&&i.master&&i.expanded)return i.detailNode;if(i.expanded&&i.childStore?.isDisplayIndexInStore(e))return i.childStore?.getRowUsingDisplayIndex(e);const l=this.nodeMap.getBy("node",i);return this.createStubNode(l.index+1,e)}const s=this.getSurroundingNodesByDisplayIndex(e);if(s==null){const l=this.store.getRowCount()-(this.store.getDisplayIndexEnd()-e);return this.createStubNode(l,e)}const{previousNode:n,nextNode:r}=s;if(n&&n.node.expanded&&n.node.childStore?.isDisplayIndexInStore(e))return n.node.childStore?.getRowUsingDisplayIndex(e);if(r){const l=r.node.rowIndex-e,d=r.index-l;return this.createStubNode(d,e)}const a=this.store.getRowCount()-(this.store.getDisplayIndexEnd()-e);return this.createStubNode(a,e)}createStubNode(e,t){const o=this.store.getRowBounds(t),i=this.createRowAtIndex(e,null,s=>{s.setRowIndex(t),s.setRowTop(o.rowTop),this.nodeDisplayIndexMap.set(t,s)});if(e===0&&this.gos.get("groupHideOpenParents")){const s=this.store.getParentNode().groupData;if(s)for(const n of Object.keys(s))Jl(i,this.colModel,n,s[n])}return this.lazyBlockLoadingSvc.queueLoadCheck(),i}getRowByStoreIndex(e){return this.nodeMap.getBy("index",e)?.node}skipDisplayIndexes(e,t,o){if(e===0)return;const i=So(this.beans);t.value+=e,o.value+=e*i}setDisplayIndexes(e,t,o){this.nodeDisplayIndexMap.clear();const i={};this.nodeMap.forEach(r=>{i[r.index]=r.node});let s=-1;for(const r of Object.keys(i)){const a=i[r],l=Number(r),d=l-1-s;this.skipDisplayIndexes(d,e,t);const c=l===0;if(a.setFirstChild(c),c&&this.gos.get("groupHideOpenParents")){const u=this.store.getParentNode().groupData;if(u)for(const p of Object.keys(u))Jl(a,this.colModel,p,c?u[p]:void 0)}this.blockUtils.setDisplayIndex(a,e,t,o),a.rowIndex!=null&&this.nodeDisplayIndexMap.set(a.rowIndex,a),s=l}const n=this.numberOfRows-1-s;this.skipDisplayIndexes(n,e,t),this.purgeExcessRows()}getRowCount(){return this.numberOfRows}setRowCount(e,t){this.numberOfRows=e,t!=null&&(this.isLastRowKnown=t,t===!1&&(this.numberOfRows+=1)),this.fireStoreUpdatedEvent()}getNodes(){return this.nodeMap}getNodeCachedByDisplayIndex(e){return this.nodeDisplayIndexMap.get(e)??null}getNodesToRefresh(){return this.nodesToRefresh}getSurroundingNodesByDisplayIndex(e){let t,o;return this.nodeMap.forEach(i=>{if(e>i.node.rowIndex){(o==null||o.node.rowIndex<i.node.rowIndex)&&(o=i);return}if(t==null||t.node.rowIndex>i.node.rowIndex){t=i;return}}),!o&&!t?null:{previousNode:o,nextNode:t}}getDisplayIndexFromStoreIndex(e){const t=this.nodeMap.getBy("index",e);if(t)return t.node.rowIndex;let o,i;if(this.nodeMap.forEach(r=>{if(e>r.index){(i==null||i.index<r.index)&&(i=r);return}if(o==null||o.index>r.index){o=r;return}}),!o)return this.store.getDisplayIndexEnd()-(this.numberOfRows-e);if(!i)return this.store.getDisplayIndexStart()+e;const s=e-i.index;return(i.node.childStore?.getDisplayIndexEnd()??i.node.rowIndex)+s}createRowAtIndex(e,t,o){const i=this.nodeMap.getBy("index",e);if(i){const{node:n}=i;if(n.__needsRefreshWhenVisible=!1,this.doesNodeMatch(t,n))return this.blockUtils.updateDataIntoRowNode(n,t),this.nodesToRefresh.delete(n),n;if(this.getRowIdFunc==null&&n.hasChildren()&&n.expanded)return this.nodesToRefresh.delete(n),n;this.destroyRowAtIndex(e)}if(t&&this.getRowIdFunc!=null){const n=this.getRowId(t),r=n&&this.removedNodeCache?.get(n);if(r)return this.removedNodeCache?.delete(n),this.blockUtils.updateDataIntoRowNode(r,t),this.nodeMap.set({id:r.id,node:r,index:e}),this.nodesToRefresh.delete(r),r.__needsRefreshWhenVisible=!1,r;const a=this.nodeMap.getBy("id",n);if(a){this.nodeMap.delete(a);const{node:l,index:d}=a;return this.blockUtils.updateDataIntoRowNode(l,t),this.nodeMap.set({id:l.id,node:l,index:e}),this.nodesToRefresh.delete(l),l.__needsRefreshWhenVisible=!1,this.getBlockStartIndex(d)===this.getBlockStartIndex(e)||this.markBlockForVerify(d),l}}const s=this.blockUtils.createRowNode(this.store.getRowDetails());if(t!=null){const n=this.getPrefixedId(this.store.getIdSequence().value++);this.blockUtils.setDataIntoRowNode(s,t,n,void 0),this.serverSideRowModel.setPaused(!0),this.blockUtils.checkOpenByDefault(s),this.serverSideRowModel.setPaused(!1),this.nodeManager.addRowNode(s)}return this.nodeMap.set({id:s.id,node:s,index:e}),o&&o(s),s}getBlockStates(){const e={},t={};this.nodeMap.forEach(({node:n,index:r})=>{const a=this.getBlockStartIndex(r);!n.stub&&!n.failedLoad&&(e[a]=(e[a]??0)+1);let l="loaded";n.failedLoad?l="failed":this.lazyBlockLoadingSvc.isRowLoading(this,a)?l="loading":(this.nodesToRefresh.has(n)||n.stub)&&(l="needsLoading"),t[a]||(t[a]=new Set),t[a].add(l)});const o={loading:4,failed:3,needsLoading:2,loaded:1},i=this.blockUtils.createNodeIdPrefix(this.store.getParentNode()),s={};for(const n of Object.keys(t)){const a=[...t[n]].sort((c,u)=>(o[c]??0)-(o[u]??0))[0],l=Number(n)/this.getBlockSize(),d=i?`${i}-${l}`:String(l);s[d]={blockNumber:l,startRow:Number(n),endRow:Number(n)+this.getBlockSize(),pageStatus:a,loadedRowCount:e[n]??0}}return s}destroyRowAtIndex(e){const t=this.nodeMap.getBy("index",e);t&&(this.nodeMap.delete(t),this.nodeDisplayIndexMap.delete(t.node.rowIndex),this.nodesToRefresh.size>0?this.removedNodeCache.set(t.node.id,t.node):this.blockUtils.destroyRowNode(t.node),this.nodesToRefresh.delete(t.node))}getSsrmParams(){return this.store.getSsrmParams()}getPrefixedId(e){return this.defaultNodeIdPrefix?this.defaultNodeIdPrefix+"-"+e:e.toString()}markBlockForVerify(e){const[t,o]=this.getBlockBounds(e);this.nodeMap.filter(s=>s.index>=t&&s.index<o).forEach(({node:s})=>{s.__needsRefreshWhenVisible=!0})}doesNodeMatch(e,t){if(t.stub)return!1;const o=this.getRowId(e);return o===null?t.data===e:t.id===o}purgeStubsOutsideOfViewport(){const{firstRenderedRow:e,lastRenderedRow:t}=this.rowRenderer,o=this.getBlockStartIndex(e),[,i]=this.getBlockBounds(t);this.nodeMap.forEach(s=>{this.lazyBlockLoadingSvc.isRowLoading(this,s.index)||s.node.failedLoad||s.node.stub&&(s.index<o||s.index>i)&&this.destroyRowAtIndex(s.index)})}getBlocksDistanceFromRow(e,t){const o={};return e.forEach(({node:i,index:s})=>{const[n,r]=this.getBlockBounds(s);if(n in o)return;const a=Math.abs(i.rowIndex-t);let l;const d=this.nodeMap.getBy("index",[r-1]);d&&(l=Math.abs(d.node.rowIndex-t));const c=l==null||a<l?a:l;o[n]=c}),Object.entries(o)}purgeExcessRows(){if(this.purgeStubsOutsideOfViewport(),this.store.getDisplayIndexEnd()==null||this.storeParams.maxBlocksInCache==null)return;const{firstRenderedRow:e,lastRenderedRow:t}=this.rowRenderer,o=new Set,i=new Set;this.nodeMap.forEach(({index:g,node:f})=>{const m=this.getBlockStartIndex(g);o.add(m),f.rowIndex>=e&&f.rowIndex<=t&&i.add(m)});const s=Math.max(i.size,this.storeParams.maxBlocksInCache??0),r=o.size-s;if(r<=0)return;let a=Number.MAX_SAFE_INTEGER,l=Number.MIN_SAFE_INTEGER;i.forEach(g=>{a>g&&(a=g),l<g&&(l=g)});const d=this.nodeMap.filter(({node:g,index:f})=>{const m=this.getBlockStartIndex(f);return!(m>=a&&m<=l)&&!this.isNodeCached(g)});if(d.length===0)return;const c=e+(t-e)/2,u=this.getBlocksDistanceFromRow(d,c),p=this.getBlockSize();u.sort((g,f)=>Math.sign(f[1]-g[1]));for(let g=0;g<Math.min(r,u.length);g++){const f=Number(u[g][0]);for(let m=f;m<f+p;m++){const C=this.nodeMap.getBy("index",m);!C||this.isNodeCached(C.node)||this.destroyRowAtIndex(m)}}}isNodeFocused(e){const t=this.focusSvc.getFocusCellToUseAfterRefresh();return!t||t.rowPinned!=null?!1:t.rowIndex===e.rowIndex}isNodeCached(e){const t=this.gos.get("groupAllowUnbalanced")&&e.key==="";return e.isExpandable()&&e.expanded||this.isNodeFocused(e)||t}extractDuplicateIds(e){if(this.getRowIdFunc==null)return[];const t=new Set,o=new Set;return e.forEach(i=>{const s=this.getRowId(i);if(t.has(s)){o.add(s);return}t.add(s)}),[...o]}onLoadSuccess(e,t,o){if(!this.live)return;const i=o.groupLevelInfo;if(this.store.setStoreInfo(i),this.getRowIdFunc!=null){const r=this.extractDuplicateIds(o.rowData);if(r.length>0){const a=r.join(", ");_(205,{duplicateIdText:a}),this.onLoadFailed(e,t);return}}o.pivotResultFields&&this.serverSideRowModel.generateSecondaryColumns(o.pivotResultFields);const s=this.nodesToRefresh.size>0;if(o.rowData.forEach((r,a)=>{const l=e+a,d=this.nodeMap.getBy("index",l);if(d?.node?.stub){this.createRowAtIndex(l,r);return}if(d&&this.doesNodeMatch(r,d.node)){this.blockUtils.updateDataIntoRowNode(d.node,r),this.nodesToRefresh.delete(d.node),d.node.__needsRefreshWhenVisible=!1;return}this.createRowAtIndex(l,r)}),o.rowCount!=null&&o.rowCount!==-1)this.numberOfRows=o.rowCount,this.isLastRowKnown=!0;else if(t>o.rowData.length)this.numberOfRows=e+o.rowData.length,this.isLastRowKnown=!0;else if(!this.isLastRowKnown){const r=e+o.rowData.length+1;r>this.numberOfRows&&(this.numberOfRows=r)}this.isLastRowKnown&&this.nodeMap.filter(a=>a.index>=this.numberOfRows).forEach(a=>this.destroyRowAtIndex(a.index)),this.fireStoreUpdatedEvent();const n=this.nodesToRefresh.size===0;s&&n&&this.fireRefreshFinishedEvent()}fireRefreshFinishedEvent(){this.nodesToRefresh.size===0&&(this.removedNodeCache.forEach(t=>{this.blockUtils.destroyRowNode(t)}),this.removedNodeCache=new Map,this.store.fireRefreshFinishedEvent())}isStoreFullyLoaded(){const e=this.isLastRowKnown,t=this.nodeMap.getSize()===this.numberOfRows;if(!e||!t||this.nodesToRefresh.size>0)return;let o=-1;return this.nodeMap.find(s=>(o+=1,!!(s.index!==o||s.node.__needsRefreshWhenVisible||s.node.stub)))==null}isLastRowIndexKnown(){return this.isLastRowKnown}onLoadFailed(e,t){if(!this.live)return;const o=this.nodesToRefresh.size>0;for(let s=e;s<e+t&&s<this.getRowCount();s++){let{node:n}=this.nodeMap.getBy("index",s)??{};n&&this.nodesToRefresh.delete(n),(!n||!n.stub)&&(n&&!n.stub&&this.destroyRowAtIndex(s),n=this.createRowAtIndex(s)),n.__needsRefreshWhenVisible=!1,n.failedLoad=!0}const i=this.nodesToRefresh.size===0;o&&i&&this.fireRefreshFinishedEvent(),this.fireStoreUpdatedEvent()}markNodesForRefresh(){this.nodeMap.forEach(e=>{e.node.stub&&!e.node.failedLoad||this.nodesToRefresh.add(e.node)}),this.lazyBlockLoadingSvc.queueLoadCheck(),this.isLastRowKnown&&this.numberOfRows===0&&(this.numberOfRows=1,this.isLastRowKnown=!1,this.fireStoreUpdatedEvent())}isNodeInCache(e){return!!this.nodeMap.getBy("id",e)}fireStoreUpdatedEvent(){this.live&&this.store.fireStoreUpdatedEvent()}getRowId(e){if(this.getRowIdFunc==null)return null;const{level:t}=this.store.getRowDetails(),o=this.store.getParentNode().getRoute()??[];return this.getRowIdFunc({data:e,parentKeys:o.length>0?o:void 0,level:t})}getOrderedNodeMap(){const e={};return this.nodeMap.forEach(t=>e[t.index]=t),e}clearDisplayIndexes(){this.nodeDisplayIndexMap.clear()}clientSideSortRows(){const e=this.sortSvc?.getSortOptions()??[];if(!e.some(s=>s.sort!=null)||!this.rowNodeSorter)return;const o=new Array(this.nodeMap.getSize());this.nodeMap.forEach(s=>o[s.index]=s.node),this.nodeMap.clear(),this.rowNodeSorter.doFullSort(o,e).forEach((s,n)=>{this.nodeMap.set({id:s.id,node:s,index:n})})}updateRowNodes(e){const t=[];return e.forEach(o=>{const i=this.getRowId(o),s=this.nodeMap.getBy("id",i);s&&(this.blockUtils.updateDataIntoRowNode(s.node,o),t.push(s.node))}),t}insertRowNodes(e,t){const o=this.store.getRowCount()-(this.store.getParentNode().sibling?1:0),i=t==null&&this.isLastRowKnown?o:t;if(i==null||o<i)return[];const s={};e.forEach(l=>{const d=this.getRowId(l);d&&this.isNodeInCache(d)||(s[d]=l)});const n=Object.values(s),r=n.length;if(r===0)return[];const a=this.nodeMap.filter(l=>l.index>=i);return a.forEach(l=>this.nodeMap.delete(l)),a.forEach(l=>{this.nodeMap.set({node:l.node,index:l.index+r,id:l.id})}),this.numberOfRows+=r,n.map((l,d)=>this.createRowAtIndex(i+d,l))}removeRowNodes(e){const t=[],o=[];let i=0;const s=[...e],n=this.getOrderedNodeMap();let r=-1;for(const a of Object.keys(n)){r+=1;const l=n[a],d=s.findIndex(u=>u===l.id);if(d!==-1){s.splice(d,1),this.destroyRowAtIndex(Number(a)),t.push(l.node),i+=1;continue}if(i===0)continue;const c=Number(a);r!==c&&o.push(l.node),this.nodeMap.delete(l),this.nodeMap.set({id:l.id,node:l.node,index:c-i})}return this.numberOfRows-=this.isLastRowIndexKnown()?e.length:i,s.length>0&&o.length>0&&(o.forEach(a=>a.__needsRefreshWhenVisible=!0),this.lazyBlockLoadingSvc.queueLoadCheck()),t}getBlockSize(){return this.storeParams.cacheBlockSize||mP}getBlockStartIndex(e){const t=this.getBlockSize();return e-e%t}getBlockBounds(e){const t=this.getBlockStartIndex(e),o=this.getBlockSize();return[t,t+o]}},CP=class extends M{constructor(e,t,o){super(),this.idSequence={value:0},this.ssrmParams=e,this.parentRowNode=o,this.storeParams=t,this.level=o.level+1,this.group=e.rowGroupCols?this.level<e.rowGroupCols.length:!1,this.leafGroup=e.rowGroupCols?this.level===e.rowGroupCols.length-1:!1,this.info={}}wireBeans(e){this.blockUtils=e.ssrmBlockUtils,this.storeUtils=e.ssrmStoreUtils,this.selectionSvc=e.selectionSvc,this.rowGroupColsSvc=e.rowGroupColsSvc}postConstruct(){let e=1;if(this.level===0&&(e=this.storeUtils.getServerSideInitialRowCount()??1,this.eventSvc.dispatchEventOnce({type:"rowCountReady"})),this.cache=this.createManagedBean(new vr(this,e,!1,this.storeParams)),!this.gos.get("treeData")&&this.group&&this.rowGroupColsSvc){const o=this.ssrmParams.rowGroupCols[this.level];this.groupField=o.field,this.rowGroupColumn=this.rowGroupColsSvc.columns[this.level]}}destroy(){this.displayIndexStart=void 0,this.displayIndexEnd=void 0,this.destroyBean(this.cache),super.destroy()}applyRowData(e,t,o){this.cache.onLoadSuccess(t,o,e)}applyTransaction(e){const t=es(this.gos);if(!t)return _(206),{status:Bt.Cancelled};const o=this.gos.getCallback("isApplyServerSideTransaction");if(o){const c={transaction:e,parentNode:this.parentRowNode,groupLevelInfo:this.info};if(!o(c))return{status:Bt.Cancelled}}const i=this.cache.isStoreFullyLoaded();let s;e.update?.length&&(s=this.cache.updateRowNodes(e.update));let n;if(e.add?.length){let c=e.addIndex;c!=null&&c<0&&(c=void 0),n=this.cache.insertRowNodes(e.add,c)}let r;if(e.remove?.length){const c=e.remove.map(p=>t({level:this.level,parentKeys:this.parentRowNode.getRoute()??[],data:p})),u=[...new Set(c)];r=this.cache.removeRowNodes(u)}const a=this.gos.get("serverSideEnableClientSideSort"),l=s?.length||n?.length;return i&&a&&l&&this.cache.clientSideSortRows(),this.updateSelectionAfterTransaction(s,r),{status:Bt.Applied,update:s,add:n,remove:r}}updateSelectionAfterTransaction(e,t){if(!this.selectionSvc)return;const o=[];e?.forEach(i=>{i.isSelected()&&!i.selectable&&o.push(i)}),t?.forEach(i=>{i.isSelected()&&o.push(i)}),o.length&&this.selectionSvc.setNodesSelected({newValue:!1,clearSelection:!1,nodes:o,source:"rowDataChanged"})}clearDisplayIndexes(){this.displayIndexStart=void 0,this.displayIndexEnd=void 0,this.cache.getNodes().forEach(e=>this.blockUtils.clearDisplayIndex(e.node)),this.parentRowNode.sibling&&this.blockUtils.clearDisplayIndex(this.parentRowNode.sibling),this.cache.clearDisplayIndexes()}getDisplayIndexStart(){return this.displayIndexStart}getDisplayIndexEnd(){return this.displayIndexEnd}getRowCount(){return this.parentRowNode.sibling?this.cache.getRowCount()+1:this.cache.getRowCount()}setRowCount(e,t){this.cache.setRowCount(e,t)}isDisplayIndexInStore(e){return this.cache.getRowCount()===0?!1:this.displayIndexStart<=e&&e<this.getDisplayIndexEnd()}setDisplayIndexes(e,t,o){this.displayIndexStart=e.value,this.topPx=t.value;const i=this.parentRowNode.level>-1&&fi(this.gos)({node:this.parentRowNode});i||Ua(this.parentRowNode),i==="top"&&(Zt(this.parentRowNode,this.beans),this.blockUtils.setDisplayIndex(this.parentRowNode.sibling,e,t,o)),this.cache.setDisplayIndexes(e,t,o),i==="bottom"&&(Zt(this.parentRowNode,this.beans),this.blockUtils.setDisplayIndex(this.parentRowNode.sibling,e,t,o)),this.displayIndexEnd=e.value,this.heightPx=t.value-this.topPx}forEachStoreDeep(e,t={value:0}){e(this,t.value++),this.cache.getNodes().forEach(o=>{const i=o.node.childStore;i&&i.forEachStoreDeep(e,t)})}forEachNodeDeep(e,t={value:0}){this.cache.getNodes().forEach(o=>{e(o.node,t.value++);const i=o.node.childStore;i&&i.forEachNodeDeep(e,t)})}forEachNodeDeepAfterFilterAndSort(e,t={value:0},o=!1){const i=this.parentRowNode.level>-1&&fi(this.gos)({node:this.parentRowNode});i==="top"&&e(this.parentRowNode.sibling,t.value++);const s=this.cache.getOrderedNodeMap();for(const n of Object.values(s)){e(n.node,t.value++);const r=n.node.childStore;r&&r.forEachNodeDeepAfterFilterAndSort(e,t,o)}i==="bottom"&&e(this.parentRowNode.sibling,t.value++)}retryLoads(){this.cache.getNodes().forEach(({node:e})=>{e.failedLoad&&(e.failedLoad=!1,e.__needsRefreshWhenVisible=!0,e.stub=!0)}),this.forEachChildStoreShallow(e=>e.retryLoads()),this.fireStoreUpdatedEvent()}getRowUsingDisplayIndex(e){return this.parentRowNode.sibling&&e===this.parentRowNode.sibling.rowIndex?this.parentRowNode.sibling:this.cache.getRowByDisplayIndex(e)}getRowBounds(e){if(!this.isDisplayIndexInStore(e))return null;const t=this.cache.getNodeCachedByDisplayIndex(e);if(t){const a=this.blockUtils.extractRowBounds(t,e);if(a)return a}const{previousNode:o,nextNode:i}=this.cache.getSurroundingNodesByDisplayIndex(e)??{};if(o){const a=this.blockUtils.extractRowBounds(o.node,e);if(a!=null)return a}const s=So(this.beans);if(i){const a=(i.node.rowIndex-e)*s;return{rowTop:i.node.rowTop-a,rowHeight:s}}const n=this.topPx+this.heightPx,r=(this.getDisplayIndexEnd()-e)*s;return{rowTop:n-r,rowHeight:s}}isPixelInRange(e){return e>=this.topPx&&e<this.topPx+this.heightPx}getRowIndexAtPixel(e){if(e<this.topPx)return this.getDisplayIndexStart();if(e>=this.topPx+this.heightPx)return this.getDisplayIndexEnd()-1;if(this.parentRowNode.sibling&&e>this.parentRowNode.sibling.rowTop&&e<this.parentRowNode.sibling.rowTop+this.parentRowNode.sibling.rowHeight)return this.parentRowNode.sibling.rowIndex;let t=Number.MAX_SAFE_INTEGER,o=null,i=Number.MAX_SAFE_INTEGER,s=null;if(this.cache.getNodes().forEach(({node:l})=>{const d=Math.abs(e-l.rowTop);if(l.rowTop<e){d<t&&(t=d,o=l);return}d<i&&(i=d,s=l)}),o=o,s=s,o){const l=this.blockUtils.getIndexAtPixel(o,e);if(l!=null)return l}const n=So(this.beans);if(s){const l=s.rowTop,d=Math.ceil((l-e)/n);return s.rowIndex-d}const r=this.topPx+this.heightPx,a=Math.floor((r-e)/n);return this.getDisplayIndexEnd()-a}getChildStore(e){return this.storeUtils.getChildStore(e,this,t=>{const o=this.cache.getNodes().find(i=>i.node.key==t);return o?o.node:null})}forEachChildStoreShallow(e){this.cache.getNodes().forEach(({node:t})=>{t.childStore&&e(t.childStore)})}refreshAfterSort(e){if(this.storeUtils.isServerSideSortAllLevels()||this.storeUtils.isServerRefreshNeeded(this.parentRowNode,this.ssrmParams.rowGroupCols,e)){const o=this.cache.isStoreFullyLoaded(),i=this.gos.get("serverSideEnableClientSideSort");if(!(o&&i)){const n=this.cache.getRowCount(),r=this.cache.isLastRowIndexKnown();this.destroyBean(this.cache),this.cache=this.createManagedBean(new vr(this,n,r,this.storeParams));return}this.cache.clientSideSortRows()}this.forEachChildStoreShallow(o=>o.refreshAfterSort(e))}refreshAfterFilter(e){if(!this.storeUtils.isServerSideOnlyRefreshFilteredGroups()||this.storeUtils.isServerRefreshNeeded(this.parentRowNode,this.ssrmParams.rowGroupCols,e)){this.refreshStore(!0);return}this.forEachChildStoreShallow(o=>o.refreshAfterFilter(e))}refreshStore(e){if(e){this.destroyBean(this.cache),this.cache=this.createManagedBean(new vr(this,1,!1,this.storeParams)),this.fireStoreUpdatedEvent();return}this.cache.markNodesForRefresh()}getTopLevelRowDisplayedIndex(e){return this.cache.getDisplayIndexFromStoreIndex(e)??e}isLastRowIndexKnown(){return this.cache.isLastRowIndexKnown()}getRowNodesInRange(e,t){return this.cache.getNodes().filter(({node:o})=>o.rowIndex>=e.rowIndex&&o.rowIndex<=t.rowIndex).map(({node:o})=>o)}addStoreStates(e){e.push({route:this.parentRowNode.getRoute()??[],rowCount:this.getRowCount(),lastRowIndexKnown:this.isLastRowIndexKnown(),info:this.info,maxBlocksInCache:this.storeParams.maxBlocksInCache,cacheBlockSize:this.storeParams.cacheBlockSize}),this.forEachChildStoreShallow(t=>t.addStoreStates(e))}getIdSequence(){return this.idSequence}getParentNode(){return this.parentRowNode}getRowDetails(){return{field:this.groupField,group:this.group,leafGroup:this.leafGroup,level:this.level,parent:this.parentRowNode,rowGroupColumn:this.rowGroupColumn}}getSsrmParams(){return this.ssrmParams}setStoreInfo(e){e&&Object.assign(this.info,e)}fireStoreUpdatedEvent(){this.eventSvc.dispatchEvent({type:"storeUpdated"})}fireRefreshFinishedEvent(){this.eventSvc.dispatchEvent({type:"storeRefreshed",route:this.parentRowNode.getRoute()})}getBlockStates(){return this.cache.getBlockStates()}getStoreBounds(){return{topPx:this.topPx,heightPx:this.heightPx}}getCache(){return this.cache}},vP=class extends M{constructor(){super(...arguments),this.beanName="ssrmStoreFactory"}wireBeans(e){this.colModel=e.colModel,this.rowGroupColsSvc=e.rowGroupColsSvc,this.pivotColsSvc=e.pivotColsSvc,this.rowAutoHeight=e.rowAutoHeight}createStore(e,t){const o=this.getStoreParams(e,t);return new CP(e,o,t)}getStoreParams(e,t){const o=this.getLevelSpecificParams(t),i=this.getBlockSize(o),s=this.getMaxBlocksInCache(e,o);return{cacheBlockSize:i,maxBlocksInCache:s}}getMaxBlocksInCache(e,t){const o=t&&t.maxBlocksInCache!=null?t.maxBlocksInCache:this.gos.get("maxBlocksInCache");if(o!=null&&o>=0){if(e.dynamicRowHeight){_(203);return}if(this.rowAutoHeight?.active){_(204);return}return o}}getBlockSize(e){const t=e&&e.cacheBlockSize!=null?e.cacheBlockSize:this.gos.get("cacheBlockSize");return t!=null&&t>0?t:100}getLevelSpecificParams(e){const t=this.gos.getCallback("getServerSideGroupLevelParams");if(!t)return;const o={level:e.level+1,parentRowNode:e.level>=0?e:void 0,rowGroupColumns:this.rowGroupColsSvc?.columns??[],pivotColumns:this.pivotColsSvc?.columns??[],pivotMode:this.colModel.isPivotMode()};return t(o)}},wP=class extends M{constructor(){super(...arguments),this.beanName="ssrmStoreUtils"}wireBeans(e){this.colModel=e.colModel,this.serverSideRowModel=e.rowModel,this.storeFactory=e.ssrmStoreFactory}getChildStore(e,t,o){if(!e?.length)return t;const i=e[0],s=o(i);if(s){if(e.length===1&&!s.childStore){const a=this.serverSideRowModel.getParams();s.childStore=this.createBean(this.storeFactory.createStore(a,s))}const n=e.slice(1,e.length),r=s.childStore;return r?r.getChildStore(n):null}return null}isServerRefreshNeeded(e,t,o){if(o.valueColChanged||o.secondaryColChanged)return!0;const i=e.level+1;if(!(i<t.length))return!0;const r=t[i].id;return o.changedColumns.indexOf(r)>-1?!0:this.colModel.getCols().filter(c=>c.getColDef().showRowGroup&&o.changedColumns.includes(c.getId())).map(c=>c.getColDef().showRowGroup).some(c=>c===!0||c===r)}getServerSideInitialRowCount(){return this.gos.get("serverSideInitialRowCount")}isServerSideSortAllLevels(){return this.gos.get("serverSideSortAllLevels")&&pt(this.gos)}isServerSideOnlyRefreshFilteredGroups(){return this.gos.get("serverSideOnlyRefreshFilteredGroups")&&pt(this.gos)}},SP=class extends M{constructor(){super(...arguments),this.beanName="ssrmTxnManager",this.asyncTransactions=[]}wireBeans(e){this.valueCache=e.valueCache,this.serverSideRowModel=e.rowModel,this.selectionSvc=e.selectionSvc}postConstruct(){pt(this.gos)}applyTransactionAsync(e,t){this.asyncTransactionsTimeout==null&&this.scheduleExecuteAsync(),this.asyncTransactions.push({transaction:e,callback:t})}scheduleExecuteAsync(){const e=this.gos.get("asyncTransactionWaitMillis");this.asyncTransactionsTimeout=window.setTimeout(()=>{this.executeAsyncTransactions()},e)}executeAsyncTransactions(){if(!this.asyncTransactions)return;const e=[],t=[],o=[];let i=!1;this.asyncTransactions.forEach(s=>{let n;if(this.serverSideRowModel.executeOnStore(s.transaction.route,l=>{n=l.applyTransaction(s.transaction)})?n==null&&(n={status:Bt.StoreNotFound}):n={status:Bt.StoreNotStarted},t.push(n),n.status==Bt.StoreLoading){o.push(s);return}s.callback&&e.push(()=>s.callback(n)),n.status===Bt.Applied&&(i=!0)}),e.length>0&&window.setTimeout(()=>{e.forEach(s=>s())},0),this.asyncTransactionsTimeout=void 0,this.asyncTransactions=o,i&&(this.valueCache?.onDataChanged(),this.eventSvc.dispatchEvent({type:"storeUpdated"})),t.length>0&&this.eventSvc.dispatchEvent({type:"asyncTransactionsFlushed",results:t})}flushAsyncTransactions(){this.asyncTransactionsTimeout!=null&&clearTimeout(this.asyncTransactionsTimeout),this.executeAsyncTransactions()}applyTransaction(e){let t;if(this.serverSideRowModel.executeOnStore(e.route,i=>{t=i.applyTransaction(e)}))if(t){if(this.valueCache?.onDataChanged(),t.remove&&this.selectionSvc){const i=t.remove.map(s=>s.id);this.selectionSvc.deleteSelectionStateFromParent(e.route||[],i)}return this.eventSvc.dispatchEvent({type:"storeUpdated"}),t}else return{status:Bt.StoreNotFound};else return{status:Bt.StoreNotStarted}}},yP={moduleName:"ServerSideRowModel",version:Ne,rowModels:["serverSide"],beans:[tP,QM,wP,qM,eP,SP,XM,vP,ZM,hP,gP,pP,uP,JM],dependsOn:[Rt,_a,PR,jM,KM,PM,EM]},bP={moduleName:"ServerSideRowModelApi",version:Ne,apiFunctions:{getServerSideSelectionState:oP,setServerSideSelectionState:iP,applyServerSideTransaction:sP,applyServerSideTransactionAsync:rP,applyServerSideRowData:nP,retryServerSideLoads:aP,flushServerSideAsyncTransactions:lP,refreshServerSide:dP,getServerSideGroupLevelState:cP},dependsOn:[Rt,sh,GR]},RP=["number","category","grouped-category","log","time"];RP.reduce((e,t)=>({...e,[t]:{title:{_enabledFromTheme:!0}}}),{});function Mh(e){return e.map((t,o,i)=>t.map((s,n)=>i.slice(0,o+1).reduce((r,a)=>r+a[n],0)))}function Ph(e){const t=e.map((o,i)=>e.reduce((s,n)=>Math.max(s,n[i]),0));return e.map(o=>o.map((i,s)=>i/t[s]*19))}var Eh=[[1,3,5],[2,6,4],[5,3,1]],FP=Mh(Eh);Ph(FP);var xP=Eh,DP=Mh(xP);Ph(DP);function hs(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var zs={exports:{}};/* @license
3
61
  Papa Parse
4
62
  v5.5.2
5
63
  https://github.com/mholt/PapaParse
6
64
  License: MIT
7
- */var Xn=Nt.exports,No;function Kn(){return No||(No=1,function(o,e){((n,r)=>{o.exports=r()})(Xn,function n(){var r=typeof self<"u"?self:typeof window<"u"?window:r!==void 0?r:{},a,i=!r.document&&!!r.postMessage,d=r.IS_PAPA_WORKER||!1,l={},u=0,s={};function f(p){this._handle=null,this._finished=!1,this._completed=!1,this._halted=!1,this._input=null,this._baseIndex=0,this._partialLine="",this._rowCount=0,this._start=0,this._nextChunk=null,this.isFirstChunk=!0,this._completeResults={data:[],errors:[],meta:{}},function(c){var h=W(c);h.chunkSize=parseInt(h.chunkSize),c.step||c.chunk||(h.chunkSize=null),this._handle=new C(h),(this._handle.streamer=this)._config=h}.call(this,p),this.parseChunk=function(c,h){var S=parseInt(this._config.skipFirstNLines)||0;if(this.isFirstChunk&&0<S){let L=this._config.newline;L||(O=this._config.quoteChar||'"',L=this._handle.guessLineEndings(c,O)),c=[...c.split(L).slice(S)].join(L)}this.isFirstChunk&&P(this._config.beforeFirstChunk)&&(O=this._config.beforeFirstChunk(c))!==void 0&&(c=O),this.isFirstChunk=!1,this._halted=!1;var S=this._partialLine+c,O=(this._partialLine="",this._handle.parse(S,this._baseIndex,!this._finished));if(!this._handle.paused()&&!this._handle.aborted()){if(c=O.meta.cursor,S=(this._finished||(this._partialLine=S.substring(c-this._baseIndex),this._baseIndex=c),O&&O.data&&(this._rowCount+=O.data.length),this._finished||this._config.preview&&this._rowCount>=this._config.preview),d)r.postMessage({results:O,workerId:s.WORKER_ID,finished:S});else if(P(this._config.chunk)&&!h){if(this._config.chunk(O,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);this._completeResults=O=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(O.data),this._completeResults.errors=this._completeResults.errors.concat(O.errors),this._completeResults.meta=O.meta),this._completed||!S||!P(this._config.complete)||O&&O.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),S||O&&O.meta.paused||this._nextChunk(),O}this._halted=!0},this._sendError=function(c){P(this._config.error)?this._config.error(c):d&&this._config.error&&r.postMessage({workerId:s.WORKER_ID,error:c,finished:!1})}}function v(p){var c;(p=p||{}).chunkSize||(p.chunkSize=s.RemoteChunkSize),f.call(this,p),this._nextChunk=i?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(h){this._input=h,this._nextChunk()},this._readChunk=function(){if(this._finished)this._chunkLoaded();else{if(c=new XMLHttpRequest,this._config.withCredentials&&(c.withCredentials=this._config.withCredentials),i||(c.onload=Z(this._chunkLoaded,this),c.onerror=Z(this._chunkError,this)),c.open(this._config.downloadRequestBody?"POST":"GET",this._input,!i),this._config.downloadRequestHeaders){var h,S=this._config.downloadRequestHeaders;for(h in S)c.setRequestHeader(h,S[h])}var O;this._config.chunkSize&&(O=this._start+this._config.chunkSize-1,c.setRequestHeader("Range","bytes="+this._start+"-"+O));try{c.send(this._config.downloadRequestBody)}catch(L){this._chunkError(L.message)}i&&c.status===0&&this._chunkError()}},this._chunkLoaded=function(){c.readyState===4&&(c.status<200||400<=c.status?this._chunkError():(this._start+=this._config.chunkSize||c.responseText.length,this._finished=!this._config.chunkSize||this._start>=(h=>(h=h.getResponseHeader("Content-Range"))!==null?parseInt(h.substring(h.lastIndexOf("/")+1)):-1)(c),this.parseChunk(c.responseText)))},this._chunkError=function(h){h=c.statusText||h,this._sendError(new Error(h))}}function _(p){(p=p||{}).chunkSize||(p.chunkSize=s.LocalChunkSize),f.call(this,p);var c,h,S=typeof FileReader<"u";this.stream=function(O){this._input=O,h=O.slice||O.webkitSlice||O.mozSlice,S?((c=new FileReader).onload=Z(this._chunkLoaded,this),c.onerror=Z(this._chunkError,this)):c=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount<this._config.preview)||this._readChunk()},this._readChunk=function(){var O=this._input,L=(this._config.chunkSize&&(L=Math.min(this._start+this._config.chunkSize,this._input.size),O=h.call(O,this._start,L)),c.readAsText(O,this._config.encoding));S||this._chunkLoaded({target:{result:L}})},this._chunkLoaded=function(O){this._start+=this._config.chunkSize,this._finished=!this._config.chunkSize||this._start>=this._input.size,this.parseChunk(O.target.result)},this._chunkError=function(){this._sendError(c.error)}}function k(p){var c;f.call(this,p=p||{}),this.stream=function(h){return c=h,this._nextChunk()},this._nextChunk=function(){var h,S;if(!this._finished)return h=this._config.chunkSize,c=h?(S=c.substring(0,h),c.substring(h)):(S=c,""),this._finished=!c,this.parseChunk(S)}}function y(p){f.call(this,p=p||{});var c=[],h=!0,S=!1;this.pause=function(){f.prototype.pause.apply(this,arguments),this._input.pause()},this.resume=function(){f.prototype.resume.apply(this,arguments),this._input.resume()},this.stream=function(O){this._input=O,this._input.on("data",this._streamData),this._input.on("end",this._streamEnd),this._input.on("error",this._streamError)},this._checkIsFinished=function(){S&&c.length===1&&(this._finished=!0)},this._nextChunk=function(){this._checkIsFinished(),c.length?this.parseChunk(c.shift()):h=!0},this._streamData=Z(function(O){try{c.push(typeof O=="string"?O:O.toString(this._config.encoding)),h&&(h=!1,this._checkIsFinished(),this.parseChunk(c.shift()))}catch(L){this._streamError(L)}},this),this._streamError=Z(function(O){this._streamCleanUp(),this._sendError(O)},this),this._streamEnd=Z(function(){this._streamCleanUp(),S=!0,this._streamData("")},this),this._streamCleanUp=Z(function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError)},this)}function C(p){var c,h,S,O,L=Math.pow(2,53),A=-L,R=/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/,D=/^((\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z)))$/,E=this,x=0,B=0,G=!1,N=!1,$=[],I={data:[],errors:[],meta:{}};function oe(X){return p.skipEmptyLines==="greedy"?X.join("").trim()==="":X.length===1&&X[0].length===0}function ne(){if(I&&S&&(ce("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+s.DefaultDelimiter+"'"),S=!1),p.skipEmptyLines&&(I.data=I.data.filter(function(w){return!oe(w)})),de()){let w=function(z,H){P(p.transformHeader)&&(z=p.transformHeader(z,H)),$.push(z)};if(I)if(Array.isArray(I.data[0])){for(var X=0;de()&&X<I.data.length;X++)I.data[X].forEach(w);I.data.splice(0,1)}else I.data.forEach(w)}function K(w,z){for(var H=p.header?{}:[],te=0;te<w.length;te++){var ae=te,re=w[te],re=((Be,ee)=>(ue=>(p.dynamicTypingFunction&&p.dynamicTyping[ue]===void 0&&(p.dynamicTyping[ue]=p.dynamicTypingFunction(ue)),(p.dynamicTyping[ue]||p.dynamicTyping)===!0))(Be)?ee==="true"||ee==="TRUE"||ee!=="false"&&ee!=="FALSE"&&((ue=>{if(R.test(ue)&&(ue=parseFloat(ue),A<ue&&ue<L))return 1})(ee)?parseFloat(ee):D.test(ee)?new Date(ee):ee===""?null:ee):ee)(ae=p.header?te>=$.length?"__parsed_extra":$[te]:ae,re=p.transform?p.transform(re,ae):re);ae==="__parsed_extra"?(H[ae]=H[ae]||[],H[ae].push(re)):H[ae]=re}return p.header&&(te>$.length?ce("FieldMismatch","TooManyFields","Too many fields: expected "+$.length+" fields but parsed "+te,B+z):te<$.length&&ce("FieldMismatch","TooFewFields","Too few fields: expected "+$.length+" fields but parsed "+te,B+z)),H}var J;I&&(p.header||p.dynamicTyping||p.transform)&&(J=1,!I.data.length||Array.isArray(I.data[0])?(I.data=I.data.map(K),J=I.data.length):I.data=K(I.data,0),p.header&&I.meta&&(I.meta.fields=$),B+=J)}function de(){return p.header&&$.length===0}function ce(X,K,J,w){X={type:X,code:K,message:J},w!==void 0&&(X.row=w),I.errors.push(X)}P(p.step)&&(O=p.step,p.step=function(X){I=X,de()?ne():(ne(),I.data.length!==0&&(x+=X.data.length,p.preview&&x>p.preview?h.abort():(I.data=I.data[0],O(I,E))))}),this.parse=function(X,K,J){var w=p.quoteChar||'"',w=(p.newline||(p.newline=this.guessLineEndings(X,w)),S=!1,p.delimiter?P(p.delimiter)&&(p.delimiter=p.delimiter(X),I.meta.delimiter=p.delimiter):((w=((z,H,te,ae,re)=>{var Be,ee,ue,Ve;re=re||[","," ","|",";",s.RECORD_SEP,s.UNIT_SEP];for(var Ye=0;Ye<re.length;Ye++){for(var Oe,Ze=re[Ye],Ce=0,Me=0,g=0,V=(ue=void 0,new b({comments:ae,delimiter:Ze,newline:H,preview:10}).parse(z)),q=0;q<V.data.length;q++)te&&oe(V.data[q])?g++:(Oe=V.data[q].length,Me+=Oe,ue===void 0?ue=Oe:0<Oe&&(Ce+=Math.abs(Oe-ue),ue=Oe));0<V.data.length&&(Me/=V.data.length-g),(ee===void 0||Ce<=ee)&&(Ve===void 0||Ve<Me)&&1.99<Me&&(ee=Ce,Be=Ze,Ve=Me)}return{successful:!!(p.delimiter=Be),bestDelimiter:Be}})(X,p.newline,p.skipEmptyLines,p.comments,p.delimitersToGuess)).successful?p.delimiter=w.bestDelimiter:(S=!0,p.delimiter=s.DefaultDelimiter),I.meta.delimiter=p.delimiter),W(p));return p.preview&&p.header&&w.preview++,c=X,h=new b(w),I=h.parse(c,K,J),ne(),G?{meta:{paused:!0}}:I||{meta:{paused:!1}}},this.paused=function(){return G},this.pause=function(){G=!0,h.abort(),c=P(p.chunk)?"":c.substring(h.getCharIndex())},this.resume=function(){E.streamer._halted?(G=!1,E.streamer.parseChunk(c,!0)):setTimeout(E.resume,3)},this.aborted=function(){return N},this.abort=function(){N=!0,h.abort(),I.meta.aborted=!0,P(p.complete)&&p.complete(I),c=""},this.guessLineEndings=function(z,w){z=z.substring(0,1048576);var w=new RegExp(m(w)+"([^]*?)"+m(w),"gm"),J=(z=z.replace(w,"")).split("\r"),w=z.split(`
8
- `),z=1<w.length&&w[0].length<J[0].length;if(J.length===1||z)return`
9
- `;for(var H=0,te=0;te<J.length;te++)J[te][0]===`
10
- `&&H++;return H>=J.length/2?`\r
11
- `:"\r"}}function m(p){return p.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function b(p){var c=(p=p||{}).delimiter,h=p.newline,S=p.comments,O=p.step,L=p.preview,A=p.fastMode,R=null,D=!1,E=p.quoteChar==null?'"':p.quoteChar,x=E;if(p.escapeChar!==void 0&&(x=p.escapeChar),(typeof c!="string"||-1<s.BAD_DELIMITERS.indexOf(c))&&(c=","),S===c)throw new Error("Comment character same as delimiter");S===!0?S="#":(typeof S!="string"||-1<s.BAD_DELIMITERS.indexOf(S))&&(S=!1),h!==`
12
- `&&h!=="\r"&&h!==`\r
13
- `&&(h=`
14
- `);var B=0,G=!1;this.parse=function(N,$,I){if(typeof N!="string")throw new Error("Input must be a string");var oe=N.length,ne=c.length,de=h.length,ce=S.length,X=P(O),K=[],J=[],w=[],z=B=0;if(!N)return Ce();if(A||A!==!1&&N.indexOf(E)===-1){for(var H=N.split(h),te=0;te<H.length;te++){if(w=H[te],B+=w.length,te!==H.length-1)B+=h.length;else if(I)return Ce();if(!S||w.substring(0,ce)!==S){if(X){if(K=[],Ve(w.split(c)),Me(),G)return Ce()}else Ve(w.split(c));if(L&&L<=te)return K=K.slice(0,L),Ce(!0)}}return Ce()}for(var ae=N.indexOf(c,B),re=N.indexOf(h,B),Be=new RegExp(m(x)+m(E),"g"),ee=N.indexOf(E,B);;)if(N[B]===E)for(ee=B,B++;;){if((ee=N.indexOf(E,ee+1))===-1)return I||J.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:K.length,index:B}),Oe();if(ee===oe-1)return Oe(N.substring(B,ee).replace(Be,E));if(E===x&&N[ee+1]===x)ee++;else if(E===x||ee===0||N[ee-1]!==x){ae!==-1&&ae<ee+1&&(ae=N.indexOf(c,ee+1));var ue=Ye((re=re!==-1&&re<ee+1?N.indexOf(h,ee+1):re)===-1?ae:Math.min(ae,re));if(N.substr(ee+1+ue,ne)===c){w.push(N.substring(B,ee).replace(Be,E)),N[B=ee+1+ue+ne]!==E&&(ee=N.indexOf(E,B)),ae=N.indexOf(c,B),re=N.indexOf(h,B);break}if(ue=Ye(re),N.substring(ee+1+ue,ee+1+ue+de)===h){if(w.push(N.substring(B,ee).replace(Be,E)),Ze(ee+1+ue+de),ae=N.indexOf(c,B),ee=N.indexOf(E,B),X&&(Me(),G))return Ce();if(L&&K.length>=L)return Ce(!0);break}J.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:K.length,index:B}),ee++}}else if(S&&w.length===0&&N.substring(B,B+ce)===S){if(re===-1)return Ce();B=re+de,re=N.indexOf(h,B),ae=N.indexOf(c,B)}else if(ae!==-1&&(ae<re||re===-1))w.push(N.substring(B,ae)),B=ae+ne,ae=N.indexOf(c,B);else{if(re===-1)break;if(w.push(N.substring(B,re)),Ze(re+de),X&&(Me(),G))return Ce();if(L&&K.length>=L)return Ce(!0)}return Oe();function Ve(g){K.push(g),z=B}function Ye(g){var V=0;return V=g!==-1&&(g=N.substring(ee+1,g))&&g.trim()===""?g.length:V}function Oe(g){return I||(g===void 0&&(g=N.substring(B)),w.push(g),B=oe,Ve(w),X&&Me()),Ce()}function Ze(g){B=g,Ve(w),w=[],re=N.indexOf(h,B)}function Ce(g){if(p.header&&!$&&K.length&&!D){var V=K[0],q={},se=new Set(V);let pe=!1;for(let _e=0;_e<V.length;_e++){let De=V[_e];if(q[De=P(p.transformHeader)?p.transformHeader(De,_e):De]){let Je,Rt=q[De];for(;Je=De+"_"+Rt,Rt++,se.has(Je););se.add(Je),V[_e]=Je,q[De]++,pe=!0,(R=R===null?{}:R)[Je]=De}else q[De]=1,V[_e]=De;se.add(De)}pe&&console.warn("Duplicate headers found and renamed."),D=!0}return{data:K,errors:J,meta:{delimiter:c,linebreak:h,aborted:G,truncated:!!g,cursor:z+($||0),renamedHeaders:R}}}function Me(){O(Ce()),K=[],J=[]}},this.abort=function(){G=!0},this.getCharIndex=function(){return B}}function F(p){var c=p.data,h=l[c.workerId],S=!1;if(c.error)h.userError(c.error,c.file);else if(c.results&&c.results.data){var O={abort:function(){S=!0,T(c.workerId,{data:[],errors:[],meta:{aborted:!0}})},pause:j,resume:j};if(P(h.userStep)){for(var L=0;L<c.results.data.length&&(h.userStep({data:c.results.data[L],errors:c.results.errors,meta:c.results.meta},O),!S);L++);delete c.results}else P(h.userChunk)&&(h.userChunk(c.results,O,c.file),delete c.results)}c.finished&&!S&&T(c.workerId,c.results)}function T(p,c){var h=l[p];P(h.userComplete)&&h.userComplete(c),h.terminate(),delete l[p]}function j(){throw new Error("Not implemented.")}function W(p){if(typeof p!="object"||p===null)return p;var c,h=Array.isArray(p)?[]:{};for(c in p)h[c]=W(p[c]);return h}function Z(p,c){return function(){p.apply(c,arguments)}}function P(p){return typeof p=="function"}return s.parse=function(p,c){var h=(c=c||{}).dynamicTyping||!1;if(P(h)&&(c.dynamicTypingFunction=h,h={}),c.dynamicTyping=h,c.transform=!!P(c.transform)&&c.transform,!c.worker||!s.WORKERS_SUPPORTED)return h=null,s.NODE_STREAM_INPUT,typeof p=="string"?(p=(S=>S.charCodeAt(0)!==65279?S:S.slice(1))(p),h=new(c.download?v:k)(c)):p.readable===!0&&P(p.read)&&P(p.on)?h=new y(c):(r.File&&p instanceof File||p instanceof Object)&&(h=new _(c)),h.stream(p);(h=(()=>{var S;return!!s.WORKERS_SUPPORTED&&(S=(()=>{var O=r.URL||r.webkitURL||null,L=n.toString();return s.BLOB_URL||(s.BLOB_URL=O.createObjectURL(new Blob(["var global = (function() { if (typeof self !== 'undefined') { return self; } if (typeof window !== 'undefined') { return window; } if (typeof global !== 'undefined') { return global; } return {}; })(); global.IS_PAPA_WORKER=true; ","(",L,")();"],{type:"text/javascript"})))})(),(S=new r.Worker(S)).onmessage=F,S.id=u++,l[S.id]=S)})()).userStep=c.step,h.userChunk=c.chunk,h.userComplete=c.complete,h.userError=c.error,c.step=P(c.step),c.chunk=P(c.chunk),c.complete=P(c.complete),c.error=P(c.error),delete c.worker,h.postMessage({input:p,config:c,workerId:h.id})},s.unparse=function(p,c){var h=!1,S=!0,O=",",L=`\r
15
- `,A='"',R=A+A,D=!1,E=null,x=!1,B=((()=>{if(typeof c=="object"){if(typeof c.delimiter!="string"||s.BAD_DELIMITERS.filter(function($){return c.delimiter.indexOf($)!==-1}).length||(O=c.delimiter),typeof c.quotes!="boolean"&&typeof c.quotes!="function"&&!Array.isArray(c.quotes)||(h=c.quotes),typeof c.skipEmptyLines!="boolean"&&typeof c.skipEmptyLines!="string"||(D=c.skipEmptyLines),typeof c.newline=="string"&&(L=c.newline),typeof c.quoteChar=="string"&&(A=c.quoteChar),typeof c.header=="boolean"&&(S=c.header),Array.isArray(c.columns)){if(c.columns.length===0)throw new Error("Option columns is empty");E=c.columns}c.escapeChar!==void 0&&(R=c.escapeChar+A),c.escapeFormulae instanceof RegExp?x=c.escapeFormulae:typeof c.escapeFormulae=="boolean"&&c.escapeFormulae&&(x=/^[=+\-@\t\r].*$/)}})(),new RegExp(m(A),"g"));if(typeof p=="string"&&(p=JSON.parse(p)),Array.isArray(p)){if(!p.length||Array.isArray(p[0]))return G(null,p,D);if(typeof p[0]=="object")return G(E||Object.keys(p[0]),p,D)}else if(typeof p=="object")return typeof p.data=="string"&&(p.data=JSON.parse(p.data)),Array.isArray(p.data)&&(p.fields||(p.fields=p.meta&&p.meta.fields||E),p.fields||(p.fields=Array.isArray(p.data[0])?p.fields:typeof p.data[0]=="object"?Object.keys(p.data[0]):[]),Array.isArray(p.data[0])||typeof p.data[0]=="object"||(p.data=[p.data])),G(p.fields||[],p.data||[],D);throw new Error("Unable to serialize unrecognized input");function G($,I,oe){var ne="",de=(typeof $=="string"&&($=JSON.parse($)),typeof I=="string"&&(I=JSON.parse(I)),Array.isArray($)&&0<$.length),ce=!Array.isArray(I[0]);if(de&&S){for(var X=0;X<$.length;X++)0<X&&(ne+=O),ne+=N($[X],X);0<I.length&&(ne+=L)}for(var K=0;K<I.length;K++){var J=(de?$:I[K]).length,w=!1,z=de?Object.keys(I[K]).length===0:I[K].length===0;if(oe&&!de&&(w=oe==="greedy"?I[K].join("").trim()==="":I[K].length===1&&I[K][0].length===0),oe==="greedy"&&de){for(var H=[],te=0;te<J;te++){var ae=ce?$[te]:te;H.push(I[K][ae])}w=H.join("").trim()===""}if(!w){for(var re=0;re<J;re++){0<re&&!z&&(ne+=O);var Be=de&&ce?$[re]:re;ne+=N(I[K][Be],re)}K<I.length-1&&(!oe||0<J&&!z)&&(ne+=L)}}return ne}function N($,I){var oe,ne;return $==null?"":$.constructor===Date?JSON.stringify($).slice(1,25):(ne=!1,x&&typeof $=="string"&&x.test($)&&($="'"+$,ne=!0),oe=$.toString().replace(B,R),(ne=ne||h===!0||typeof h=="function"&&h($,I)||Array.isArray(h)&&h[I]||((de,ce)=>{for(var X=0;X<ce.length;X++)if(-1<de.indexOf(ce[X]))return!0;return!1})(oe,s.BAD_DELIMITERS)||-1<oe.indexOf(O)||oe.charAt(0)===" "||oe.charAt(oe.length-1)===" ")?A+oe+A:oe)}},s.RECORD_SEP="",s.UNIT_SEP="",s.BYTE_ORDER_MARK="\uFEFF",s.BAD_DELIMITERS=["\r",`
16
- `,'"',s.BYTE_ORDER_MARK],s.WORKERS_SUPPORTED=!i&&!!r.Worker,s.NODE_STREAM_INPUT=1,s.LocalChunkSize=10485760,s.RemoteChunkSize=5242880,s.DefaultDelimiter=",",s.Parser=b,s.ParserHandle=C,s.NetworkStreamer=v,s.FileStreamer=_,s.StringStreamer=k,s.ReadableStreamStreamer=y,r.jQuery&&((a=r.jQuery).fn.parse=function(p){var c=p.config||{},h=[];return this.each(function(L){if(!(a(this).prop("tagName").toUpperCase()==="INPUT"&&a(this).attr("type").toLowerCase()==="file"&&r.FileReader)||!this.files||this.files.length===0)return!0;for(var A=0;A<this.files.length;A++)h.push({file:this.files[A],inputElem:this,instanceConfig:a.extend({},c)})}),S(),this;function S(){if(h.length===0)P(p.complete)&&p.complete();else{var L,A,R,D,E=h[0];if(P(p.before)){var x=p.before(E.file,E.inputElem);if(typeof x=="object"){if(x.action==="abort")return L="AbortError",A=E.file,R=E.inputElem,D=x.reason,void(P(p.error)&&p.error({name:L},A,R,D));if(x.action==="skip")return void O();typeof x.config=="object"&&(E.instanceConfig=a.extend(E.instanceConfig,x.config))}else if(x==="skip")return void O()}var B=E.instanceConfig.complete;E.instanceConfig.complete=function(G){P(B)&&B(G,E.file,E.inputElem),O()},s.parse(E.file,E.instanceConfig)}}function O(){h.splice(0,1),S()}}),d&&(r.onmessage=function(p){p=p.data,s.WORKER_ID===void 0&&p&&(s.WORKER_ID=p.workerId),typeof p.input=="string"?r.postMessage({workerId:s.WORKER_ID,results:s.parse(p.input,p.config),finished:!0}):(r.File&&p.input instanceof File||p.input instanceof Object)&&(p=s.parse(p.input,p.config))&&r.postMessage({workerId:s.WORKER_ID,results:p,finished:!0})}),(v.prototype=Object.create(f.prototype)).constructor=v,(_.prototype=Object.create(f.prototype)).constructor=_,(k.prototype=Object.create(k.prototype)).constructor=k,(y.prototype=Object.create(f.prototype)).constructor=y,s})}(Nt)),Nt.exports}var Qn=Kn();const Zn=Et(Qn);function Zt(o){return t.getCurrentScope()?(t.onScopeDispose(o),!0):!1}const Jt=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Jn=Object.prototype.toString,ln=o=>Jn.call(o)==="[object Object]",ze=()=>{},mo=er();function er(){var o,e;return Jt&&((o=window?.navigator)==null?void 0:o.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||((e=window?.navigator)==null?void 0:e.maxTouchPoints)>2&&/iPad|Macintosh/.test(window?.navigator.userAgent))}function sn(...o){if(o.length!==1)return t.toRef(...o);const e=o[0];return typeof e=="function"?t.readonly(t.customRef(()=>({get:e,set:ze}))):t.ref(e)}function tr(o,e){function n(...r){return new Promise((a,i)=>{Promise.resolve(o(()=>e.apply(this,r),{fn:e,thisArg:this,args:r})).then(a).catch(i)})}return n}const or=o=>o();function nr(o,e={}){let n,r,a=ze;const i=u=>{clearTimeout(u),a(),a=ze};let d;return u=>{const s=t.toValue(o),f=t.toValue(e.maxWait);return n&&i(n),s<=0||f!==void 0&&f<=0?(r&&(i(r),r=null),Promise.resolve(u())):new Promise((v,_)=>{a=e.rejectOnCancel?_:v,d=u,f&&!r&&(r=setTimeout(()=>{n&&i(n),r=null,v(d())},f)),n=setTimeout(()=>{r&&i(r),r=null,v(u())},s)})}}function ut(o){return Array.isArray(o)?o:[o]}function rr(o){return t.getCurrentInstance()}function ir(o,e,n={}){const{eventFilter:r=or,...a}=n;return t.watch(o,tr(r,e),a)}function ar(o,e=!0,n){rr()?t.onMounted(o,n):e?o():t.nextTick(o)}function lr(o,e,n={}){const{debounce:r=0,maxWait:a=void 0,...i}=n;return ir(o,e,{...i,eventFilter:nr(r,{maxWait:a})})}function un(o,e,n){return t.watch(o,e,{...n,immediate:!0})}const dn=Jt?window:void 0,sr=Jt?window.document:void 0;function cn(o){var e;const n=t.toValue(o);return(e=n?.$el)!=null?e:n}function ur(...o){const e=[],n=()=>{e.forEach(l=>l()),e.length=0},r=(l,u,s,f)=>(l.addEventListener(u,s,f),()=>l.removeEventListener(u,s,f)),a=t.computed(()=>{const l=ut(t.toValue(o[0])).filter(u=>u!=null);return l.every(u=>typeof u!="string")?l:void 0}),i=un(()=>{var l,u;return[(u=(l=a.value)==null?void 0:l.map(s=>cn(s)))!=null?u:[dn].filter(s=>s!=null),ut(t.toValue(a.value?o[1]:o[0])),ut(t.unref(a.value?o[2]:o[1])),t.toValue(a.value?o[3]:o[2])]},([l,u,s,f])=>{if(n(),!l?.length||!u?.length||!s?.length)return;const v=ln(f)?{...f}:f;e.push(...l.flatMap(_=>u.flatMap(k=>s.map(y=>r(_,k,y,v)))))},{flush:"post"}),d=()=>{i(),n()};return Zt(n),d}function dr(o){return typeof o=="function"?o:typeof o=="string"?e=>e.key===o:Array.isArray(o)?e=>o.includes(e.key):()=>!0}function cr(...o){let e,n,r={};o.length===3?(e=o[0],n=o[1],r=o[2]):o.length===2?typeof o[1]=="object"?(e=!0,n=o[0],r=o[1]):(e=o[0],n=o[1]):(e=!0,n=o[0]);const{target:a=dn,eventName:i="keydown",passive:d=!1,dedupe:l=!1}=r,u=dr(e);return ur(a,i,f=>{f.repeat&&t.toValue(l)||u(f)&&n(f)},d)}/**!
65
+ */var MP=zs.exports,ud;function PP(){return ud||(ud=1,function(e,t){((o,i)=>{e.exports=i()})(MP,function o(){var i=typeof self<"u"?self:typeof window<"u"?window:i!==void 0?i:{},s,n=!i.document&&!!i.postMessage,r=i.IS_PAPA_WORKER||!1,a={},l=0,d={};function c(y){this._handle=null,this._finished=!1,this._completed=!1,this._halted=!1,this._input=null,this._baseIndex=0,this._partialLine="",this._rowCount=0,this._start=0,this._nextChunk=null,this.isFirstChunk=!0,this._completeResults={data:[],errors:[],meta:{}},function(w){var R=T(w);R.chunkSize=parseInt(R.chunkSize),w.step||w.chunk||(R.chunkSize=null),this._handle=new m(R),(this._handle.streamer=this)._config=R}.call(this,y),this.parseChunk=function(w,R){var F=parseInt(this._config.skipFirstNLines)||0;if(this.isFirstChunk&&0<F){let z=this._config.newline;z||(H=this._config.quoteChar||'"',z=this._handle.guessLineEndings(w,H)),w=[...w.split(z).slice(F)].join(z)}this.isFirstChunk&&P(this._config.beforeFirstChunk)&&(H=this._config.beforeFirstChunk(w))!==void 0&&(w=H),this.isFirstChunk=!1,this._halted=!1;var F=this._partialLine+w,H=(this._partialLine="",this._handle.parse(F,this._baseIndex,!this._finished));if(!this._handle.paused()&&!this._handle.aborted()){if(w=H.meta.cursor,F=(this._finished||(this._partialLine=F.substring(w-this._baseIndex),this._baseIndex=w),H&&H.data&&(this._rowCount+=H.data.length),this._finished||this._config.preview&&this._rowCount>=this._config.preview),r)i.postMessage({results:H,workerId:d.WORKER_ID,finished:F});else if(P(this._config.chunk)&&!R){if(this._config.chunk(H,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);this._completeResults=H=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(H.data),this._completeResults.errors=this._completeResults.errors.concat(H.errors),this._completeResults.meta=H.meta),this._completed||!F||!P(this._config.complete)||H&&H.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),F||H&&H.meta.paused||this._nextChunk(),H}this._halted=!0},this._sendError=function(w){P(this._config.error)?this._config.error(w):r&&this._config.error&&i.postMessage({workerId:d.WORKER_ID,error:w,finished:!1})}}function u(y){var w;(y=y||{}).chunkSize||(y.chunkSize=d.RemoteChunkSize),c.call(this,y),this._nextChunk=n?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(R){this._input=R,this._nextChunk()},this._readChunk=function(){if(this._finished)this._chunkLoaded();else{if(w=new XMLHttpRequest,this._config.withCredentials&&(w.withCredentials=this._config.withCredentials),n||(w.onload=A(this._chunkLoaded,this),w.onerror=A(this._chunkError,this)),w.open(this._config.downloadRequestBody?"POST":"GET",this._input,!n),this._config.downloadRequestHeaders){var R,F=this._config.downloadRequestHeaders;for(R in F)w.setRequestHeader(R,F[R])}var H;this._config.chunkSize&&(H=this._start+this._config.chunkSize-1,w.setRequestHeader("Range","bytes="+this._start+"-"+H));try{w.send(this._config.downloadRequestBody)}catch(z){this._chunkError(z.message)}n&&w.status===0&&this._chunkError()}},this._chunkLoaded=function(){w.readyState===4&&(w.status<200||400<=w.status?this._chunkError():(this._start+=this._config.chunkSize||w.responseText.length,this._finished=!this._config.chunkSize||this._start>=(R=>(R=R.getResponseHeader("Content-Range"))!==null?parseInt(R.substring(R.lastIndexOf("/")+1)):-1)(w),this.parseChunk(w.responseText)))},this._chunkError=function(R){R=w.statusText||R,this._sendError(new Error(R))}}function p(y){(y=y||{}).chunkSize||(y.chunkSize=d.LocalChunkSize),c.call(this,y);var w,R,F=typeof FileReader<"u";this.stream=function(H){this._input=H,R=H.slice||H.webkitSlice||H.mozSlice,F?((w=new FileReader).onload=A(this._chunkLoaded,this),w.onerror=A(this._chunkError,this)):w=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount<this._config.preview)||this._readChunk()},this._readChunk=function(){var H=this._input,z=(this._config.chunkSize&&(z=Math.min(this._start+this._config.chunkSize,this._input.size),H=R.call(H,this._start,z)),w.readAsText(H,this._config.encoding));F||this._chunkLoaded({target:{result:z}})},this._chunkLoaded=function(H){this._start+=this._config.chunkSize,this._finished=!this._config.chunkSize||this._start>=this._input.size,this.parseChunk(H.target.result)},this._chunkError=function(){this._sendError(w.error)}}function g(y){var w;c.call(this,y=y||{}),this.stream=function(R){return w=R,this._nextChunk()},this._nextChunk=function(){var R,F;if(!this._finished)return R=this._config.chunkSize,w=R?(F=w.substring(0,R),w.substring(R)):(F=w,""),this._finished=!w,this.parseChunk(F)}}function f(y){c.call(this,y=y||{});var w=[],R=!0,F=!1;this.pause=function(){c.prototype.pause.apply(this,arguments),this._input.pause()},this.resume=function(){c.prototype.resume.apply(this,arguments),this._input.resume()},this.stream=function(H){this._input=H,this._input.on("data",this._streamData),this._input.on("end",this._streamEnd),this._input.on("error",this._streamError)},this._checkIsFinished=function(){F&&w.length===1&&(this._finished=!0)},this._nextChunk=function(){this._checkIsFinished(),w.length?this.parseChunk(w.shift()):R=!0},this._streamData=A(function(H){try{w.push(typeof H=="string"?H:H.toString(this._config.encoding)),R&&(R=!1,this._checkIsFinished(),this.parseChunk(w.shift()))}catch(z){this._streamError(z)}},this),this._streamError=A(function(H){this._streamCleanUp(),this._sendError(H)},this),this._streamEnd=A(function(){this._streamCleanUp(),F=!0,this._streamData("")},this),this._streamCleanUp=A(function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError)},this)}function m(y){var w,R,F,H,z=Math.pow(2,53),k=-z,V=/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/,G=/^((\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z)))$/,B=this,N=0,L=0,Y=!1,W=!1,q=[],$={data:[],errors:[],meta:{}};function ge(se){return y.skipEmptyLines==="greedy"?se.join("").trim()==="":se.length===1&&se[0].length===0}function fe(){if($&&F&&(Fe("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+d.DefaultDelimiter+"'"),F=!1),y.skipEmptyLines&&($.data=$.data.filter(function(I){return!ge(I)})),Re()){let I=function(X,Q){P(y.transformHeader)&&(X=y.transformHeader(X,Q)),q.push(X)};if($)if(Array.isArray($.data[0])){for(var se=0;Re()&&se<$.data.length;se++)$.data[se].forEach(I);$.data.splice(0,1)}else $.data.forEach(I)}function re(I,X){for(var Q=y.header?{}:[],ue=0;ue<I.length;ue++){var we=ue,me=I[ue],me=((nt,ce)=>(be=>(y.dynamicTypingFunction&&y.dynamicTyping[be]===void 0&&(y.dynamicTyping[be]=y.dynamicTypingFunction(be)),(y.dynamicTyping[be]||y.dynamicTyping)===!0))(nt)?ce==="true"||ce==="TRUE"||ce!=="false"&&ce!=="FALSE"&&((be=>{if(V.test(be)&&(be=parseFloat(be),k<be&&be<z))return 1})(ce)?parseFloat(ce):G.test(ce)?new Date(ce):ce===""?null:ce):ce)(we=y.header?ue>=q.length?"__parsed_extra":q[ue]:we,me=y.transform?y.transform(me,we):me);we==="__parsed_extra"?(Q[we]=Q[we]||[],Q[we].push(me)):Q[we]=me}return y.header&&(ue>q.length?Fe("FieldMismatch","TooManyFields","Too many fields: expected "+q.length+" fields but parsed "+ue,L+X):ue<q.length&&Fe("FieldMismatch","TooFewFields","Too few fields: expected "+q.length+" fields but parsed "+ue,L+X)),Q}var de;$&&(y.header||y.dynamicTyping||y.transform)&&(de=1,!$.data.length||Array.isArray($.data[0])?($.data=$.data.map(re),de=$.data.length):$.data=re($.data,0),y.header&&$.meta&&($.meta.fields=q),L+=de)}function Re(){return y.header&&q.length===0}function Fe(se,re,de,I){se={type:se,code:re,message:de},I!==void 0&&(se.row=I),$.errors.push(se)}P(y.step)&&(H=y.step,y.step=function(se){$=se,Re()?fe():(fe(),$.data.length!==0&&(N+=se.data.length,y.preview&&N>y.preview?R.abort():($.data=$.data[0],H($,B))))}),this.parse=function(se,re,de){var I=y.quoteChar||'"',I=(y.newline||(y.newline=this.guessLineEndings(se,I)),F=!1,y.delimiter?P(y.delimiter)&&(y.delimiter=y.delimiter(se),$.meta.delimiter=y.delimiter):((I=((X,Q,ue,we,me)=>{var nt,ce,be,kt;me=me||[","," ","|",";",d.RECORD_SEP,d.UNIT_SEP];for(var ao=0;ao<me.length;ao++){for(var gt,Fo=me[ao],He=0,ft=0,E=0,K=(be=void 0,new v({comments:we,delimiter:Fo,newline:Q,preview:10}).parse(X)),ie=0;ie<K.data.length;ie++)ue&&ge(K.data[ie])?E++:(gt=K.data[ie].length,ft+=gt,be===void 0?be=gt:0<gt&&(He+=Math.abs(gt-be),be=gt));0<K.data.length&&(ft/=K.data.length-E),(ce===void 0||He<=ce)&&(kt===void 0||kt<ft)&&1.99<ft&&(ce=He,nt=Fo,kt=ft)}return{successful:!!(y.delimiter=nt),bestDelimiter:nt}})(se,y.newline,y.skipEmptyLines,y.comments,y.delimitersToGuess)).successful?y.delimiter=I.bestDelimiter:(F=!0,y.delimiter=d.DefaultDelimiter),$.meta.delimiter=y.delimiter),T(y));return y.preview&&y.header&&I.preview++,w=se,R=new v(I),$=R.parse(w,re,de),fe(),Y?{meta:{paused:!0}}:$||{meta:{paused:!1}}},this.paused=function(){return Y},this.pause=function(){Y=!0,R.abort(),w=P(y.chunk)?"":w.substring(R.getCharIndex())},this.resume=function(){B.streamer._halted?(Y=!1,B.streamer.parseChunk(w,!0)):setTimeout(B.resume,3)},this.aborted=function(){return W},this.abort=function(){W=!0,R.abort(),$.meta.aborted=!0,P(y.complete)&&y.complete($),w=""},this.guessLineEndings=function(X,I){X=X.substring(0,1048576);var I=new RegExp(C(I)+"([^]*?)"+C(I),"gm"),de=(X=X.replace(I,"")).split("\r"),I=X.split(`
66
+ `),X=1<I.length&&I[0].length<de[0].length;if(de.length===1||X)return`
67
+ `;for(var Q=0,ue=0;ue<de.length;ue++)de[ue][0]===`
68
+ `&&Q++;return Q>=de.length/2?`\r
69
+ `:"\r"}}function C(y){return y.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function v(y){var w=(y=y||{}).delimiter,R=y.newline,F=y.comments,H=y.step,z=y.preview,k=y.fastMode,V=null,G=!1,B=y.quoteChar==null?'"':y.quoteChar,N=B;if(y.escapeChar!==void 0&&(N=y.escapeChar),(typeof w!="string"||-1<d.BAD_DELIMITERS.indexOf(w))&&(w=","),F===w)throw new Error("Comment character same as delimiter");F===!0?F="#":(typeof F!="string"||-1<d.BAD_DELIMITERS.indexOf(F))&&(F=!1),R!==`
70
+ `&&R!=="\r"&&R!==`\r
71
+ `&&(R=`
72
+ `);var L=0,Y=!1;this.parse=function(W,q,$){if(typeof W!="string")throw new Error("Input must be a string");var ge=W.length,fe=w.length,Re=R.length,Fe=F.length,se=P(H),re=[],de=[],I=[],X=L=0;if(!W)return He();if(k||k!==!1&&W.indexOf(B)===-1){for(var Q=W.split(R),ue=0;ue<Q.length;ue++){if(I=Q[ue],L+=I.length,ue!==Q.length-1)L+=R.length;else if($)return He();if(!F||I.substring(0,Fe)!==F){if(se){if(re=[],kt(I.split(w)),ft(),Y)return He()}else kt(I.split(w));if(z&&z<=ue)return re=re.slice(0,z),He(!0)}}return He()}for(var we=W.indexOf(w,L),me=W.indexOf(R,L),nt=new RegExp(C(N)+C(B),"g"),ce=W.indexOf(B,L);;)if(W[L]===B)for(ce=L,L++;;){if((ce=W.indexOf(B,ce+1))===-1)return $||de.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:re.length,index:L}),gt();if(ce===ge-1)return gt(W.substring(L,ce).replace(nt,B));if(B===N&&W[ce+1]===N)ce++;else if(B===N||ce===0||W[ce-1]!==N){we!==-1&&we<ce+1&&(we=W.indexOf(w,ce+1));var be=ao((me=me!==-1&&me<ce+1?W.indexOf(R,ce+1):me)===-1?we:Math.min(we,me));if(W.substr(ce+1+be,fe)===w){I.push(W.substring(L,ce).replace(nt,B)),W[L=ce+1+be+fe]!==B&&(ce=W.indexOf(B,L)),we=W.indexOf(w,L),me=W.indexOf(R,L);break}if(be=ao(me),W.substring(ce+1+be,ce+1+be+Re)===R){if(I.push(W.substring(L,ce).replace(nt,B)),Fo(ce+1+be+Re),we=W.indexOf(w,L),ce=W.indexOf(B,L),se&&(ft(),Y))return He();if(z&&re.length>=z)return He(!0);break}de.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:re.length,index:L}),ce++}}else if(F&&I.length===0&&W.substring(L,L+Fe)===F){if(me===-1)return He();L=me+Re,me=W.indexOf(R,L),we=W.indexOf(w,L)}else if(we!==-1&&(we<me||me===-1))I.push(W.substring(L,we)),L=we+fe,we=W.indexOf(w,L);else{if(me===-1)break;if(I.push(W.substring(L,me)),Fo(me+Re),se&&(ft(),Y))return He();if(z&&re.length>=z)return He(!0)}return gt();function kt(E){re.push(E),X=L}function ao(E){var K=0;return K=E!==-1&&(E=W.substring(ce+1,E))&&E.trim()===""?E.length:K}function gt(E){return $||(E===void 0&&(E=W.substring(L)),I.push(E),L=ge,kt(I),se&&ft()),He()}function Fo(E){L=E,kt(I),I=[],me=W.indexOf(R,L)}function He(E){if(y.header&&!q&&re.length&&!G){var K=re[0],ie={},ye=new Set(K);let xe=!1;for(let je=0;je<K.length;je++){let Qe=K[je];if(ie[Qe=P(y.transformHeader)?y.transformHeader(Qe,je):Qe]){let xo,fs=ie[Qe];for(;xo=Qe+"_"+fs,fs++,ye.has(xo););ye.add(xo),K[je]=xo,ie[Qe]++,xe=!0,(V=V===null?{}:V)[xo]=Qe}else ie[Qe]=1,K[je]=Qe;ye.add(Qe)}xe&&console.warn("Duplicate headers found and renamed."),G=!0}return{data:re,errors:de,meta:{delimiter:w,linebreak:R,aborted:Y,truncated:!!E,cursor:X+(q||0),renamedHeaders:V}}}function ft(){H(He()),re=[],de=[]}},this.abort=function(){Y=!0},this.getCharIndex=function(){return L}}function S(y){var w=y.data,R=a[w.workerId],F=!1;if(w.error)R.userError(w.error,w.file);else if(w.results&&w.results.data){var H={abort:function(){F=!0,b(w.workerId,{data:[],errors:[],meta:{aborted:!0}})},pause:x,resume:x};if(P(R.userStep)){for(var z=0;z<w.results.data.length&&(R.userStep({data:w.results.data[z],errors:w.results.errors,meta:w.results.meta},H),!F);z++);delete w.results}else P(R.userChunk)&&(R.userChunk(w.results,H,w.file),delete w.results)}w.finished&&!F&&b(w.workerId,w.results)}function b(y,w){var R=a[y];P(R.userComplete)&&R.userComplete(w),R.terminate(),delete a[y]}function x(){throw new Error("Not implemented.")}function T(y){if(typeof y!="object"||y===null)return y;var w,R=Array.isArray(y)?[]:{};for(w in y)R[w]=T(y[w]);return R}function A(y,w){return function(){y.apply(w,arguments)}}function P(y){return typeof y=="function"}return d.parse=function(y,w){var R=(w=w||{}).dynamicTyping||!1;if(P(R)&&(w.dynamicTypingFunction=R,R={}),w.dynamicTyping=R,w.transform=!!P(w.transform)&&w.transform,!w.worker||!d.WORKERS_SUPPORTED)return R=null,d.NODE_STREAM_INPUT,typeof y=="string"?(y=(F=>F.charCodeAt(0)!==65279?F:F.slice(1))(y),R=new(w.download?u:g)(w)):y.readable===!0&&P(y.read)&&P(y.on)?R=new f(w):(i.File&&y instanceof File||y instanceof Object)&&(R=new p(w)),R.stream(y);(R=(()=>{var F;return!!d.WORKERS_SUPPORTED&&(F=(()=>{var H=i.URL||i.webkitURL||null,z=o.toString();return d.BLOB_URL||(d.BLOB_URL=H.createObjectURL(new Blob(["var global = (function() { if (typeof self !== 'undefined') { return self; } if (typeof window !== 'undefined') { return window; } if (typeof global !== 'undefined') { return global; } return {}; })(); global.IS_PAPA_WORKER=true; ","(",z,")();"],{type:"text/javascript"})))})(),(F=new i.Worker(F)).onmessage=S,F.id=l++,a[F.id]=F)})()).userStep=w.step,R.userChunk=w.chunk,R.userComplete=w.complete,R.userError=w.error,w.step=P(w.step),w.chunk=P(w.chunk),w.complete=P(w.complete),w.error=P(w.error),delete w.worker,R.postMessage({input:y,config:w,workerId:R.id})},d.unparse=function(y,w){var R=!1,F=!0,H=",",z=`\r
73
+ `,k='"',V=k+k,G=!1,B=null,N=!1,L=((()=>{if(typeof w=="object"){if(typeof w.delimiter!="string"||d.BAD_DELIMITERS.filter(function(q){return w.delimiter.indexOf(q)!==-1}).length||(H=w.delimiter),typeof w.quotes!="boolean"&&typeof w.quotes!="function"&&!Array.isArray(w.quotes)||(R=w.quotes),typeof w.skipEmptyLines!="boolean"&&typeof w.skipEmptyLines!="string"||(G=w.skipEmptyLines),typeof w.newline=="string"&&(z=w.newline),typeof w.quoteChar=="string"&&(k=w.quoteChar),typeof w.header=="boolean"&&(F=w.header),Array.isArray(w.columns)){if(w.columns.length===0)throw new Error("Option columns is empty");B=w.columns}w.escapeChar!==void 0&&(V=w.escapeChar+k),w.escapeFormulae instanceof RegExp?N=w.escapeFormulae:typeof w.escapeFormulae=="boolean"&&w.escapeFormulae&&(N=/^[=+\-@\t\r].*$/)}})(),new RegExp(C(k),"g"));if(typeof y=="string"&&(y=JSON.parse(y)),Array.isArray(y)){if(!y.length||Array.isArray(y[0]))return Y(null,y,G);if(typeof y[0]=="object")return Y(B||Object.keys(y[0]),y,G)}else if(typeof y=="object")return typeof y.data=="string"&&(y.data=JSON.parse(y.data)),Array.isArray(y.data)&&(y.fields||(y.fields=y.meta&&y.meta.fields||B),y.fields||(y.fields=Array.isArray(y.data[0])?y.fields:typeof y.data[0]=="object"?Object.keys(y.data[0]):[]),Array.isArray(y.data[0])||typeof y.data[0]=="object"||(y.data=[y.data])),Y(y.fields||[],y.data||[],G);throw new Error("Unable to serialize unrecognized input");function Y(q,$,ge){var fe="",Re=(typeof q=="string"&&(q=JSON.parse(q)),typeof $=="string"&&($=JSON.parse($)),Array.isArray(q)&&0<q.length),Fe=!Array.isArray($[0]);if(Re&&F){for(var se=0;se<q.length;se++)0<se&&(fe+=H),fe+=W(q[se],se);0<$.length&&(fe+=z)}for(var re=0;re<$.length;re++){var de=(Re?q:$[re]).length,I=!1,X=Re?Object.keys($[re]).length===0:$[re].length===0;if(ge&&!Re&&(I=ge==="greedy"?$[re].join("").trim()==="":$[re].length===1&&$[re][0].length===0),ge==="greedy"&&Re){for(var Q=[],ue=0;ue<de;ue++){var we=Fe?q[ue]:ue;Q.push($[re][we])}I=Q.join("").trim()===""}if(!I){for(var me=0;me<de;me++){0<me&&!X&&(fe+=H);var nt=Re&&Fe?q[me]:me;fe+=W($[re][nt],me)}re<$.length-1&&(!ge||0<de&&!X)&&(fe+=z)}}return fe}function W(q,$){var ge,fe;return q==null?"":q.constructor===Date?JSON.stringify(q).slice(1,25):(fe=!1,N&&typeof q=="string"&&N.test(q)&&(q="'"+q,fe=!0),ge=q.toString().replace(L,V),(fe=fe||R===!0||typeof R=="function"&&R(q,$)||Array.isArray(R)&&R[$]||((Re,Fe)=>{for(var se=0;se<Fe.length;se++)if(-1<Re.indexOf(Fe[se]))return!0;return!1})(ge,d.BAD_DELIMITERS)||-1<ge.indexOf(H)||ge.charAt(0)===" "||ge.charAt(ge.length-1)===" ")?k+ge+k:ge)}},d.RECORD_SEP="",d.UNIT_SEP="",d.BYTE_ORDER_MARK="\uFEFF",d.BAD_DELIMITERS=["\r",`
74
+ `,'"',d.BYTE_ORDER_MARK],d.WORKERS_SUPPORTED=!n&&!!i.Worker,d.NODE_STREAM_INPUT=1,d.LocalChunkSize=10485760,d.RemoteChunkSize=5242880,d.DefaultDelimiter=",",d.Parser=v,d.ParserHandle=m,d.NetworkStreamer=u,d.FileStreamer=p,d.StringStreamer=g,d.ReadableStreamStreamer=f,i.jQuery&&((s=i.jQuery).fn.parse=function(y){var w=y.config||{},R=[];return this.each(function(z){if(!(s(this).prop("tagName").toUpperCase()==="INPUT"&&s(this).attr("type").toLowerCase()==="file"&&i.FileReader)||!this.files||this.files.length===0)return!0;for(var k=0;k<this.files.length;k++)R.push({file:this.files[k],inputElem:this,instanceConfig:s.extend({},w)})}),F(),this;function F(){if(R.length===0)P(y.complete)&&y.complete();else{var z,k,V,G,B=R[0];if(P(y.before)){var N=y.before(B.file,B.inputElem);if(typeof N=="object"){if(N.action==="abort")return z="AbortError",k=B.file,V=B.inputElem,G=N.reason,void(P(y.error)&&y.error({name:z},k,V,G));if(N.action==="skip")return void H();typeof N.config=="object"&&(B.instanceConfig=s.extend(B.instanceConfig,N.config))}else if(N==="skip")return void H()}var L=B.instanceConfig.complete;B.instanceConfig.complete=function(Y){P(L)&&L(Y,B.file,B.inputElem),H()},d.parse(B.file,B.instanceConfig)}}function H(){R.splice(0,1),F()}}),r&&(i.onmessage=function(y){y=y.data,d.WORKER_ID===void 0&&y&&(d.WORKER_ID=y.workerId),typeof y.input=="string"?i.postMessage({workerId:d.WORKER_ID,results:d.parse(y.input,y.config),finished:!0}):(i.File&&y.input instanceof File||y.input instanceof Object)&&(y=d.parse(y.input,y.config))&&i.postMessage({workerId:d.WORKER_ID,results:y,finished:!0})}),(u.prototype=Object.create(c.prototype)).constructor=u,(p.prototype=Object.create(c.prototype)).constructor=p,(g.prototype=Object.create(g.prototype)).constructor=g,(f.prototype=Object.create(c.prototype)).constructor=f,d})}(zs)),zs.exports}var EP=PP();const AP=hs(EP);function Nn(e){return h.getCurrentScope()?(h.onScopeDispose(e),!0):!1}const Hn=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const TP=Object.prototype.toString,Ah=e=>TP.call(e)==="[object Object]",qt=()=>{},Jr=IP();function IP(){var e,t;return Hn&&((e=window?.navigator)==null?void 0:e.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||((t=window?.navigator)==null?void 0:t.maxTouchPoints)>2&&/iPad|Macintosh/.test(window?.navigator.userAgent))}function Th(...e){if(e.length!==1)return h.toRef(...e);const t=e[0];return typeof t=="function"?h.readonly(h.customRef(()=>({get:t,set:qt}))):h.ref(t)}function LP(e,t){function o(...i){return new Promise((s,n)=>{Promise.resolve(e(()=>t.apply(this,i),{fn:t,thisArg:this,args:i})).then(s).catch(n)})}return o}const kP=e=>e();function GP(e,t={}){let o,i,s=qt;const n=l=>{clearTimeout(l),s(),s=qt};let r;return l=>{const d=h.toValue(e),c=h.toValue(t.maxWait);return o&&n(o),d<=0||c!==void 0&&c<=0?(i&&(n(i),i=null),Promise.resolve(l())):new Promise((u,p)=>{s=t.rejectOnCancel?p:u,r=l,c&&!i&&(i=setTimeout(()=>{o&&n(o),i=null,u(r())},c)),o=setTimeout(()=>{i&&n(i),i=null,u(l())},d)})}}function ci(e){return Array.isArray(e)?e:[e]}function OP(e){return h.getCurrentInstance()}function BP(e,t,o={}){const{eventFilter:i=kP,...s}=o;return h.watch(e,LP(i,t),s)}function NP(e,t=!0,o){OP()?h.onMounted(e,o):t?e():h.nextTick(e)}function HP(e,t,o={}){const{debounce:i=0,maxWait:s=void 0,...n}=o;return BP(e,t,{...n,eventFilter:GP(i,{maxWait:s})})}function Ih(e,t,o){return h.watch(e,t,{...o,immediate:!0})}const Lh=Hn?window:void 0,VP=Hn?window.document:void 0;function kh(e){var t;const o=h.toValue(e);return(t=o?.$el)!=null?t:o}function _P(...e){const t=[],o=()=>{t.forEach(a=>a()),t.length=0},i=(a,l,d,c)=>(a.addEventListener(l,d,c),()=>a.removeEventListener(l,d,c)),s=h.computed(()=>{const a=ci(h.toValue(e[0])).filter(l=>l!=null);return a.every(l=>typeof l!="string")?a:void 0}),n=Ih(()=>{var a,l;return[(l=(a=s.value)==null?void 0:a.map(d=>kh(d)))!=null?l:[Lh].filter(d=>d!=null),ci(h.toValue(s.value?e[1]:e[0])),ci(h.unref(s.value?e[2]:e[1])),h.toValue(s.value?e[3]:e[2])]},([a,l,d,c])=>{if(o(),!a?.length||!l?.length||!d?.length)return;const u=Ah(c)?{...c}:c;t.push(...a.flatMap(p=>l.flatMap(g=>d.map(f=>i(p,g,f,u)))))},{flush:"post"}),r=()=>{n(),o()};return Nn(o),r}function zP(e){return typeof e=="function"?e:typeof e=="string"?t=>t.key===e:Array.isArray(e)?t=>e.includes(t.key):()=>!0}function WP(...e){let t,o,i={};e.length===3?(t=e[0],o=e[1],i=e[2]):e.length===2?typeof e[1]=="object"?(t=!0,o=e[0],i=e[1]):(t=e[0],o=e[1]):(t=!0,o=e[0]);const{target:s=Lh,eventName:n="keydown",passive:r=!1,dedupe:a=!1}=i,l=zP(t);return _P(s,n,c=>{c.repeat&&h.toValue(a)||l(c)&&o(c)},r)}/**!
17
75
  * Sortable 1.15.6
18
76
  * @author RubaXa <trash@rubaxa.org>
19
77
  * @author owenm <owen23355@gmail.com>
20
78
  * @license MIT
21
- */function Ao(o,e){var n=Object.keys(o);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(o);e&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(o,a).enumerable})),n.push.apply(n,r)}return n}function He(o){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Ao(Object(n),!0).forEach(function(r){pr(o,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(n)):Ao(Object(n)).forEach(function(r){Object.defineProperty(o,r,Object.getOwnPropertyDescriptor(n,r))})}return o}function At(o){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?At=function(e){return typeof e}:At=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},At(o)}function pr(o,e,n){return e in o?Object.defineProperty(o,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):o[e]=n,o}function We(){return We=Object.assign||function(o){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(o[r]=n[r])}return o},We.apply(this,arguments)}function fr(o,e){if(o==null)return{};var n={},r=Object.keys(o),a,i;for(i=0;i<r.length;i++)a=r[i],!(e.indexOf(a)>=0)&&(n[a]=o[a]);return n}function vr(o,e){if(o==null)return{};var n=fr(o,e),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(o);for(a=0;a<i.length;a++)r=i[a],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(o,r)&&(n[r]=o[r])}return n}var hr="1.15.6";function je(o){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(o)}var Ue=je(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),xt=je(/Edge/i),Io=je(/firefox/i),Ct=je(/safari/i)&&!je(/chrome/i)&&!je(/android/i),So=je(/iP(ad|od|hone)/i),pn=je(/chrome/i)&&je(/android/i),fn={capture:!1,passive:!1};function le(o,e,n){o.addEventListener(e,n,!Ue&&fn)}function ie(o,e,n){o.removeEventListener(e,n,!Ue&&fn)}function Yt(o,e){if(e){if(e[0]===">"&&(e=e.substring(1)),o)try{if(o.matches)return o.matches(e);if(o.msMatchesSelector)return o.msMatchesSelector(e);if(o.webkitMatchesSelector)return o.webkitMatchesSelector(e)}catch{return!1}return!1}}function vn(o){return o.host&&o!==document&&o.host.nodeType?o.host:o.parentNode}function Ie(o,e,n,r){if(o){n=n||document;do{if(e!=null&&(e[0]===">"?o.parentNode===n&&Yt(o,e):Yt(o,e))||r&&o===n)return o;if(o===n)break}while(o=vn(o))}return null}var Vo=/\s+/g;function Fe(o,e,n){if(o&&e)if(o.classList)o.classList[n?"add":"remove"](e);else{var r=(" "+o.className+" ").replace(Vo," ").replace(" "+e+" "," ");o.className=(r+(n?" "+e:"")).replace(Vo," ")}}function U(o,e,n){var r=o&&o.style;if(r){if(n===void 0)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(o,""):o.currentStyle&&(n=o.currentStyle),e===void 0?n:n[e];!(e in r)&&e.indexOf("webkit")===-1&&(e="-webkit-"+e),r[e]=n+(typeof n=="string"?"":"px")}}function dt(o,e){var n="";if(typeof o=="string")n=o;else do{var r=U(o,"transform");r&&r!=="none"&&(n=r+" "+n)}while(!e&&(o=o.parentNode));var a=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return a&&new a(n)}function hn(o,e,n){if(o){var r=o.getElementsByTagName(e),a=0,i=r.length;if(n)for(;a<i;a++)n(r[a],a);return r}return[]}function $e(){var o=document.scrollingElement;return o||document.documentElement}function ye(o,e,n,r,a){if(!(!o.getBoundingClientRect&&o!==window)){var i,d,l,u,s,f,v;if(o!==window&&o.parentNode&&o!==$e()?(i=o.getBoundingClientRect(),d=i.top,l=i.left,u=i.bottom,s=i.right,f=i.height,v=i.width):(d=0,l=0,u=window.innerHeight,s=window.innerWidth,f=window.innerHeight,v=window.innerWidth),(e||n)&&o!==window&&(a=a||o.parentNode,!Ue))do if(a&&a.getBoundingClientRect&&(U(a,"transform")!=="none"||n&&U(a,"position")!=="static")){var _=a.getBoundingClientRect();d-=_.top+parseInt(U(a,"border-top-width")),l-=_.left+parseInt(U(a,"border-left-width")),u=d+i.height,s=l+i.width;break}while(a=a.parentNode);if(r&&o!==window){var k=dt(a||o),y=k&&k.a,C=k&&k.d;k&&(d/=C,l/=y,v/=y,f/=C,u=d+f,s=l+v)}return{top:d,left:l,bottom:u,right:s,width:v,height:f}}}function $o(o,e,n){for(var r=Ke(o,!0),a=ye(o)[e];r;){var i=ye(r)[n],d=void 0;if(d=a>=i,!d)return r;if(r===$e())break;r=Ke(r,!1)}return!1}function ct(o,e,n,r){for(var a=0,i=0,d=o.children;i<d.length;){if(d[i].style.display!=="none"&&d[i]!==Y.ghost&&(r||d[i]!==Y.dragged)&&Ie(d[i],n.draggable,o,!1)){if(a===e)return d[i];a++}i++}return null}function _o(o,e){for(var n=o.lastElementChild;n&&(n===Y.ghost||U(n,"display")==="none"||e&&!Yt(n,e));)n=n.previousElementSibling;return n||null}function Pe(o,e){var n=0;if(!o||!o.parentNode)return-1;for(;o=o.previousElementSibling;)o.nodeName.toUpperCase()!=="TEMPLATE"&&o!==Y.clone&&(!e||Yt(o,e))&&n++;return n}function Go(o){var e=0,n=0,r=$e();if(o)do{var a=dt(o),i=a.a,d=a.d;e+=o.scrollLeft*i,n+=o.scrollTop*d}while(o!==r&&(o=o.parentNode));return[e,n]}function mr(o,e){for(var n in o)if(o.hasOwnProperty(n)){for(var r in e)if(e.hasOwnProperty(r)&&e[r]===o[n][r])return Number(n)}return-1}function Ke(o,e){if(!o||!o.getBoundingClientRect)return $e();var n=o,r=!1;do if(n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight){var a=U(n);if(n.clientWidth<n.scrollWidth&&(a.overflowX=="auto"||a.overflowX=="scroll")||n.clientHeight<n.scrollHeight&&(a.overflowY=="auto"||a.overflowY=="scroll")){if(!n.getBoundingClientRect||n===document.body)return $e();if(r||e)return n;r=!0}}while(n=n.parentNode);return $e()}function gr(o,e){if(o&&e)for(var n in e)e.hasOwnProperty(n)&&(o[n]=e[n]);return o}function no(o,e){return Math.round(o.top)===Math.round(e.top)&&Math.round(o.left)===Math.round(e.left)&&Math.round(o.height)===Math.round(e.height)&&Math.round(o.width)===Math.round(e.width)}var wt;function mn(o,e){return function(){if(!wt){var n=arguments,r=this;n.length===1?o.call(r,n[0]):o.apply(r,n),wt=setTimeout(function(){wt=void 0},e)}}}function yr(){clearTimeout(wt),wt=void 0}function gn(o,e,n){o.scrollLeft+=e,o.scrollTop+=n}function yn(o){var e=window.Polymer,n=window.jQuery||window.Zepto;return e&&e.dom?e.dom(o).cloneNode(!0):n?n(o).clone(!0)[0]:o.cloneNode(!0)}function Cn(o,e,n){var r={};return Array.from(o.children).forEach(function(a){var i,d,l,u;if(!(!Ie(a,e.draggable,o,!1)||a.animated||a===n)){var s=ye(a);r.left=Math.min((i=r.left)!==null&&i!==void 0?i:1/0,s.left),r.top=Math.min((d=r.top)!==null&&d!==void 0?d:1/0,s.top),r.right=Math.max((l=r.right)!==null&&l!==void 0?l:-1/0,s.right),r.bottom=Math.max((u=r.bottom)!==null&&u!==void 0?u:-1/0,s.bottom)}}),r.width=r.right-r.left,r.height=r.bottom-r.top,r.x=r.left,r.y=r.top,r}var xe="Sortable"+new Date().getTime();function Cr(){var o=[],e;return{captureAnimationState:function(){if(o=[],!!this.options.animation){var r=[].slice.call(this.el.children);r.forEach(function(a){if(!(U(a,"display")==="none"||a===Y.ghost)){o.push({target:a,rect:ye(a)});var i=He({},o[o.length-1].rect);if(a.thisAnimationDuration){var d=dt(a,!0);d&&(i.top-=d.f,i.left-=d.e)}a.fromRect=i}})}},addAnimationState:function(r){o.push(r)},removeAnimationState:function(r){o.splice(mr(o,{target:r}),1)},animateAll:function(r){var a=this;if(!this.options.animation){clearTimeout(e),typeof r=="function"&&r();return}var i=!1,d=0;o.forEach(function(l){var u=0,s=l.target,f=s.fromRect,v=ye(s),_=s.prevFromRect,k=s.prevToRect,y=l.rect,C=dt(s,!0);C&&(v.top-=C.f,v.left-=C.e),s.toRect=v,s.thisAnimationDuration&&no(_,v)&&!no(f,v)&&(y.top-v.top)/(y.left-v.left)===(f.top-v.top)/(f.left-v.left)&&(u=br(y,_,k,a.options)),no(v,f)||(s.prevFromRect=f,s.prevToRect=v,u||(u=a.options.animation),a.animate(s,y,v,u)),u&&(i=!0,d=Math.max(d,u),clearTimeout(s.animationResetTimer),s.animationResetTimer=setTimeout(function(){s.animationTime=0,s.prevFromRect=null,s.fromRect=null,s.prevToRect=null,s.thisAnimationDuration=null},u),s.thisAnimationDuration=u)}),clearTimeout(e),i?e=setTimeout(function(){typeof r=="function"&&r()},d):typeof r=="function"&&r(),o=[]},animate:function(r,a,i,d){if(d){U(r,"transition",""),U(r,"transform","");var l=dt(this.el),u=l&&l.a,s=l&&l.d,f=(a.left-i.left)/(u||1),v=(a.top-i.top)/(s||1);r.animatingX=!!f,r.animatingY=!!v,U(r,"transform","translate3d("+f+"px,"+v+"px,0)"),this.forRepaintDummy=wr(r),U(r,"transition","transform "+d+"ms"+(this.options.easing?" "+this.options.easing:"")),U(r,"transform","translate3d(0,0,0)"),typeof r.animated=="number"&&clearTimeout(r.animated),r.animated=setTimeout(function(){U(r,"transition",""),U(r,"transform",""),r.animated=!1,r.animatingX=!1,r.animatingY=!1},d)}}}}function wr(o){return o.offsetWidth}function br(o,e,n,r){return Math.sqrt(Math.pow(e.top-o.top,2)+Math.pow(e.left-o.left,2))/Math.sqrt(Math.pow(e.top-n.top,2)+Math.pow(e.left-n.left,2))*r.animation}var nt=[],ro={initializeByDefault:!0},Bt={mount:function(e){for(var n in ro)ro.hasOwnProperty(n)&&!(n in e)&&(e[n]=ro[n]);nt.forEach(function(r){if(r.pluginName===e.pluginName)throw"Sortable: Cannot mount plugin ".concat(e.pluginName," more than once")}),nt.push(e)},pluginEvent:function(e,n,r){var a=this;this.eventCanceled=!1,r.cancel=function(){a.eventCanceled=!0};var i=e+"Global";nt.forEach(function(d){n[d.pluginName]&&(n[d.pluginName][i]&&n[d.pluginName][i](He({sortable:n},r)),n.options[d.pluginName]&&n[d.pluginName][e]&&n[d.pluginName][e](He({sortable:n},r)))})},initializePlugins:function(e,n,r,a){nt.forEach(function(l){var u=l.pluginName;if(!(!e.options[u]&&!l.initializeByDefault)){var s=new l(e,n,e.options);s.sortable=e,s.options=e.options,e[u]=s,We(r,s.defaults)}});for(var i in e.options)if(e.options.hasOwnProperty(i)){var d=this.modifyOption(e,i,e.options[i]);typeof d<"u"&&(e.options[i]=d)}},getEventProperties:function(e,n){var r={};return nt.forEach(function(a){typeof a.eventProperties=="function"&&We(r,a.eventProperties.call(n[a.pluginName],e))}),r},modifyOption:function(e,n,r){var a;return nt.forEach(function(i){e[i.pluginName]&&i.optionListeners&&typeof i.optionListeners[n]=="function"&&(a=i.optionListeners[n].call(e[i.pluginName],r))}),a}};function Sr(o){var e=o.sortable,n=o.rootEl,r=o.name,a=o.targetEl,i=o.cloneEl,d=o.toEl,l=o.fromEl,u=o.oldIndex,s=o.newIndex,f=o.oldDraggableIndex,v=o.newDraggableIndex,_=o.originalEvent,k=o.putSortable,y=o.extraEventProperties;if(e=e||n&&n[xe],!!e){var C,m=e.options,b="on"+r.charAt(0).toUpperCase()+r.substr(1);window.CustomEvent&&!Ue&&!xt?C=new CustomEvent(r,{bubbles:!0,cancelable:!0}):(C=document.createEvent("Event"),C.initEvent(r,!0,!0)),C.to=d||n,C.from=l||n,C.item=a||n,C.clone=i,C.oldIndex=u,C.newIndex=s,C.oldDraggableIndex=f,C.newDraggableIndex=v,C.originalEvent=_,C.pullMode=k?k.lastPutMode:void 0;var F=He(He({},y),Bt.getEventProperties(r,e));for(var T in F)C[T]=F[T];n&&n.dispatchEvent(C),m[b]&&m[b].call(e,C)}}var _r=["evt"],Ee=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a=r.evt,i=vr(r,_r);Bt.pluginEvent.bind(Y)(e,n,He({dragEl:M,parentEl:me,ghostEl:Q,rootEl:ve,nextEl:ot,lastDownEl:It,cloneEl:he,cloneHidden:Xe,dragStarted:ft,putSortable:we,activeSortable:Y.active,originalEvent:a,oldIndex:lt,oldDraggableIndex:bt,newIndex:Te,newDraggableIndex:qe,hideGhostForTarget:_n,unhideGhostForTarget:kn,cloneNowHidden:function(){Xe=!0},cloneNowShown:function(){Xe=!1},dispatchSortableEvent:function(l){ke({sortable:n,name:l,originalEvent:a})}},i))};function ke(o){Sr(He({putSortable:we,cloneEl:he,targetEl:M,rootEl:ve,oldIndex:lt,oldDraggableIndex:bt,newIndex:Te,newDraggableIndex:qe},o))}var M,me,Q,ve,ot,It,he,Xe,lt,Te,bt,qe,Ft,we,it=!1,qt=!1,Xt=[],et,Ae,io,ao,Ho,Lo,ft,rt,St,_t=!1,Tt=!1,Vt,be,lo=[],go=!1,Kt=[],eo=typeof document<"u",Ot=So,zo=xt||Ue?"cssFloat":"float",kr=eo&&!pn&&!So&&"draggable"in document.createElement("div"),wn=function(){if(eo){if(Ue)return!1;var o=document.createElement("x");return o.style.cssText="pointer-events:auto",o.style.pointerEvents==="auto"}}(),bn=function(e,n){var r=U(e),a=parseInt(r.width)-parseInt(r.paddingLeft)-parseInt(r.paddingRight)-parseInt(r.borderLeftWidth)-parseInt(r.borderRightWidth),i=ct(e,0,n),d=ct(e,1,n),l=i&&U(i),u=d&&U(d),s=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+ye(i).width,f=u&&parseInt(u.marginLeft)+parseInt(u.marginRight)+ye(d).width;if(r.display==="flex")return r.flexDirection==="column"||r.flexDirection==="column-reverse"?"vertical":"horizontal";if(r.display==="grid")return r.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(i&&l.float&&l.float!=="none"){var v=l.float==="left"?"left":"right";return d&&(u.clear==="both"||u.clear===v)?"vertical":"horizontal"}return i&&(l.display==="block"||l.display==="flex"||l.display==="table"||l.display==="grid"||s>=a&&r[zo]==="none"||d&&r[zo]==="none"&&s+f>a)?"vertical":"horizontal"},Dr=function(e,n,r){var a=r?e.left:e.top,i=r?e.right:e.bottom,d=r?e.width:e.height,l=r?n.left:n.top,u=r?n.right:n.bottom,s=r?n.width:n.height;return a===l||i===u||a+d/2===l+s/2},Er=function(e,n){var r;return Xt.some(function(a){var i=a[xe].options.emptyInsertThreshold;if(!(!i||_o(a))){var d=ye(a),l=e>=d.left-i&&e<=d.right+i,u=n>=d.top-i&&n<=d.bottom+i;if(l&&u)return r=a}}),r},Sn=function(e){function n(i,d){return function(l,u,s,f){var v=l.options.group.name&&u.options.group.name&&l.options.group.name===u.options.group.name;if(i==null&&(d||v))return!0;if(i==null||i===!1)return!1;if(d&&i==="clone")return i;if(typeof i=="function")return n(i(l,u,s,f),d)(l,u,s,f);var _=(d?l:u).options.group.name;return i===!0||typeof i=="string"&&i===_||i.join&&i.indexOf(_)>-1}}var r={},a=e.group;(!a||At(a)!="object")&&(a={name:a}),r.name=a.name,r.checkPull=n(a.pull,!0),r.checkPut=n(a.put),r.revertClone=a.revertClone,e.group=r},_n=function(){!wn&&Q&&U(Q,"display","none")},kn=function(){!wn&&Q&&U(Q,"display","")};eo&&!pn&&document.addEventListener("click",function(o){if(qt)return o.preventDefault(),o.stopPropagation&&o.stopPropagation(),o.stopImmediatePropagation&&o.stopImmediatePropagation(),qt=!1,!1},!0);var tt=function(e){if(M){e=e.touches?e.touches[0]:e;var n=Er(e.clientX,e.clientY);if(n){var r={};for(var a in e)e.hasOwnProperty(a)&&(r[a]=e[a]);r.target=r.rootEl=n,r.preventDefault=void 0,r.stopPropagation=void 0,n[xe]._onDragOver(r)}}},xr=function(e){M&&M.parentNode[xe]._isOutsideThisEl(e.target)};function Y(o,e){if(!(o&&o.nodeType&&o.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(o));this.el=o,this.options=e=We({},e),o[xe]=this;var n={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(o.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return bn(o,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(d,l){d.setData("Text",l.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:Y.supportPointer!==!1&&"PointerEvent"in window&&(!Ct||So),emptyInsertThreshold:5};Bt.initializePlugins(this,o,n);for(var r in n)!(r in e)&&(e[r]=n[r]);Sn(e);for(var a in this)a.charAt(0)==="_"&&typeof this[a]=="function"&&(this[a]=this[a].bind(this));this.nativeDraggable=e.forceFallback?!1:kr,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?le(o,"pointerdown",this._onTapStart):(le(o,"mousedown",this._onTapStart),le(o,"touchstart",this._onTapStart)),this.nativeDraggable&&(le(o,"dragover",this),le(o,"dragenter",this)),Xt.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),We(this,Cr())}Y.prototype={constructor:Y,_isOutsideThisEl:function(e){!this.el.contains(e)&&e!==this.el&&(rt=null)},_getDirection:function(e,n){return typeof this.options.direction=="function"?this.options.direction.call(this,e,n,M):this.options.direction},_onTapStart:function(e){if(e.cancelable){var n=this,r=this.el,a=this.options,i=a.preventOnFilter,d=e.type,l=e.touches&&e.touches[0]||e.pointerType&&e.pointerType==="touch"&&e,u=(l||e).target,s=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||u,f=a.filter;if(Nr(r),!M&&!(/mousedown|pointerdown/.test(d)&&e.button!==0||a.disabled)&&!s.isContentEditable&&!(!this.nativeDraggable&&Ct&&u&&u.tagName.toUpperCase()==="SELECT")&&(u=Ie(u,a.draggable,r,!1),!(u&&u.animated)&&It!==u)){if(lt=Pe(u),bt=Pe(u,a.draggable),typeof f=="function"){if(f.call(this,e,u,this)){ke({sortable:n,rootEl:s,name:"filter",targetEl:u,toEl:r,fromEl:r}),Ee("filter",n,{evt:e}),i&&e.preventDefault();return}}else if(f&&(f=f.split(",").some(function(v){if(v=Ie(s,v.trim(),r,!1),v)return ke({sortable:n,rootEl:v,name:"filter",targetEl:u,fromEl:r,toEl:r}),Ee("filter",n,{evt:e}),!0}),f)){i&&e.preventDefault();return}a.handle&&!Ie(s,a.handle,r,!1)||this._prepareDragStart(e,l,u)}}},_prepareDragStart:function(e,n,r){var a=this,i=a.el,d=a.options,l=i.ownerDocument,u;if(r&&!M&&r.parentNode===i){var s=ye(r);if(ve=i,M=r,me=M.parentNode,ot=M.nextSibling,It=r,Ft=d.group,Y.dragged=M,et={target:M,clientX:(n||e).clientX,clientY:(n||e).clientY},Ho=et.clientX-s.left,Lo=et.clientY-s.top,this._lastX=(n||e).clientX,this._lastY=(n||e).clientY,M.style["will-change"]="all",u=function(){if(Ee("delayEnded",a,{evt:e}),Y.eventCanceled){a._onDrop();return}a._disableDelayedDragEvents(),!Io&&a.nativeDraggable&&(M.draggable=!0),a._triggerDragStart(e,n),ke({sortable:a,name:"choose",originalEvent:e}),Fe(M,d.chosenClass,!0)},d.ignore.split(",").forEach(function(f){hn(M,f.trim(),so)}),le(l,"dragover",tt),le(l,"mousemove",tt),le(l,"touchmove",tt),d.supportPointer?(le(l,"pointerup",a._onDrop),!this.nativeDraggable&&le(l,"pointercancel",a._onDrop)):(le(l,"mouseup",a._onDrop),le(l,"touchend",a._onDrop),le(l,"touchcancel",a._onDrop)),Io&&this.nativeDraggable&&(this.options.touchStartThreshold=4,M.draggable=!0),Ee("delayStart",this,{evt:e}),d.delay&&(!d.delayOnTouchOnly||n)&&(!this.nativeDraggable||!(xt||Ue))){if(Y.eventCanceled){this._onDrop();return}d.supportPointer?(le(l,"pointerup",a._disableDelayedDrag),le(l,"pointercancel",a._disableDelayedDrag)):(le(l,"mouseup",a._disableDelayedDrag),le(l,"touchend",a._disableDelayedDrag),le(l,"touchcancel",a._disableDelayedDrag)),le(l,"mousemove",a._delayedDragTouchMoveHandler),le(l,"touchmove",a._delayedDragTouchMoveHandler),d.supportPointer&&le(l,"pointermove",a._delayedDragTouchMoveHandler),a._dragStartTimer=setTimeout(u,d.delay)}else u()}},_delayedDragTouchMoveHandler:function(e){var n=e.touches?e.touches[0]:e;Math.max(Math.abs(n.clientX-this._lastX),Math.abs(n.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){M&&so(M),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;ie(e,"mouseup",this._disableDelayedDrag),ie(e,"touchend",this._disableDelayedDrag),ie(e,"touchcancel",this._disableDelayedDrag),ie(e,"pointerup",this._disableDelayedDrag),ie(e,"pointercancel",this._disableDelayedDrag),ie(e,"mousemove",this._delayedDragTouchMoveHandler),ie(e,"touchmove",this._delayedDragTouchMoveHandler),ie(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,n){n=n||e.pointerType=="touch"&&e,!this.nativeDraggable||n?this.options.supportPointer?le(document,"pointermove",this._onTouchMove):n?le(document,"touchmove",this._onTouchMove):le(document,"mousemove",this._onTouchMove):(le(M,"dragend",this),le(ve,"dragstart",this._onDragStart));try{document.selection?$t(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(e,n){if(it=!1,ve&&M){Ee("dragStarted",this,{evt:n}),this.nativeDraggable&&le(document,"dragover",xr);var r=this.options;!e&&Fe(M,r.dragClass,!1),Fe(M,r.ghostClass,!0),Y.active=this,e&&this._appendGhost(),ke({sortable:this,name:"start",originalEvent:n})}else this._nulling()},_emulateDragOver:function(){if(Ae){this._lastX=Ae.clientX,this._lastY=Ae.clientY,_n();for(var e=document.elementFromPoint(Ae.clientX,Ae.clientY),n=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(Ae.clientX,Ae.clientY),e!==n);)n=e;if(M.parentNode[xe]._isOutsideThisEl(e),n)do{if(n[xe]){var r=void 0;if(r=n[xe]._onDragOver({clientX:Ae.clientX,clientY:Ae.clientY,target:e,rootEl:n}),r&&!this.options.dragoverBubble)break}e=n}while(n=vn(n));kn()}},_onTouchMove:function(e){if(et){var n=this.options,r=n.fallbackTolerance,a=n.fallbackOffset,i=e.touches?e.touches[0]:e,d=Q&&dt(Q,!0),l=Q&&d&&d.a,u=Q&&d&&d.d,s=Ot&&be&&Go(be),f=(i.clientX-et.clientX+a.x)/(l||1)+(s?s[0]-lo[0]:0)/(l||1),v=(i.clientY-et.clientY+a.y)/(u||1)+(s?s[1]-lo[1]:0)/(u||1);if(!Y.active&&!it){if(r&&Math.max(Math.abs(i.clientX-this._lastX),Math.abs(i.clientY-this._lastY))<r)return;this._onDragStart(e,!0)}if(Q){d?(d.e+=f-(io||0),d.f+=v-(ao||0)):d={a:1,b:0,c:0,d:1,e:f,f:v};var _="matrix(".concat(d.a,",").concat(d.b,",").concat(d.c,",").concat(d.d,",").concat(d.e,",").concat(d.f,")");U(Q,"webkitTransform",_),U(Q,"mozTransform",_),U(Q,"msTransform",_),U(Q,"transform",_),io=f,ao=v,Ae=i}e.cancelable&&e.preventDefault()}},_appendGhost:function(){if(!Q){var e=this.options.fallbackOnBody?document.body:ve,n=ye(M,!0,Ot,!0,e),r=this.options;if(Ot){for(be=e;U(be,"position")==="static"&&U(be,"transform")==="none"&&be!==document;)be=be.parentNode;be!==document.body&&be!==document.documentElement?(be===document&&(be=$e()),n.top+=be.scrollTop,n.left+=be.scrollLeft):be=$e(),lo=Go(be)}Q=M.cloneNode(!0),Fe(Q,r.ghostClass,!1),Fe(Q,r.fallbackClass,!0),Fe(Q,r.dragClass,!0),U(Q,"transition",""),U(Q,"transform",""),U(Q,"box-sizing","border-box"),U(Q,"margin",0),U(Q,"top",n.top),U(Q,"left",n.left),U(Q,"width",n.width),U(Q,"height",n.height),U(Q,"opacity","0.8"),U(Q,"position",Ot?"absolute":"fixed"),U(Q,"zIndex","100000"),U(Q,"pointerEvents","none"),Y.ghost=Q,e.appendChild(Q),U(Q,"transform-origin",Ho/parseInt(Q.style.width)*100+"% "+Lo/parseInt(Q.style.height)*100+"%")}},_onDragStart:function(e,n){var r=this,a=e.dataTransfer,i=r.options;if(Ee("dragStart",this,{evt:e}),Y.eventCanceled){this._onDrop();return}Ee("setupClone",this),Y.eventCanceled||(he=yn(M),he.removeAttribute("id"),he.draggable=!1,he.style["will-change"]="",this._hideClone(),Fe(he,this.options.chosenClass,!1),Y.clone=he),r.cloneId=$t(function(){Ee("clone",r),!Y.eventCanceled&&(r.options.removeCloneOnHide||ve.insertBefore(he,M),r._hideClone(),ke({sortable:r,name:"clone"}))}),!n&&Fe(M,i.dragClass,!0),n?(qt=!0,r._loopId=setInterval(r._emulateDragOver,50)):(ie(document,"mouseup",r._onDrop),ie(document,"touchend",r._onDrop),ie(document,"touchcancel",r._onDrop),a&&(a.effectAllowed="move",i.setData&&i.setData.call(r,a,M)),le(document,"drop",r),U(M,"transform","translateZ(0)")),it=!0,r._dragStartId=$t(r._dragStarted.bind(r,n,e)),le(document,"selectstart",r),ft=!0,window.getSelection().removeAllRanges(),Ct&&U(document.body,"user-select","none")},_onDragOver:function(e){var n=this.el,r=e.target,a,i,d,l=this.options,u=l.group,s=Y.active,f=Ft===u,v=l.sort,_=we||s,k,y=this,C=!1;if(go)return;function m(x,B){Ee(x,y,He({evt:e,isOwner:f,axis:k?"vertical":"horizontal",revert:d,dragRect:a,targetRect:i,canSort:v,fromSortable:_,target:r,completed:F,onMove:function(N,$){return Mt(ve,n,M,a,N,ye(N),e,$)},changed:T},B))}function b(){m("dragOverAnimationCapture"),y.captureAnimationState(),y!==_&&_.captureAnimationState()}function F(x){return m("dragOverCompleted",{insertion:x}),x&&(f?s._hideClone():s._showClone(y),y!==_&&(Fe(M,we?we.options.ghostClass:s.options.ghostClass,!1),Fe(M,l.ghostClass,!0)),we!==y&&y!==Y.active?we=y:y===Y.active&&we&&(we=null),_===y&&(y._ignoreWhileAnimating=r),y.animateAll(function(){m("dragOverAnimationComplete"),y._ignoreWhileAnimating=null}),y!==_&&(_.animateAll(),_._ignoreWhileAnimating=null)),(r===M&&!M.animated||r===n&&!r.animated)&&(rt=null),!l.dragoverBubble&&!e.rootEl&&r!==document&&(M.parentNode[xe]._isOutsideThisEl(e.target),!x&&tt(e)),!l.dragoverBubble&&e.stopPropagation&&e.stopPropagation(),C=!0}function T(){Te=Pe(M),qe=Pe(M,l.draggable),ke({sortable:y,name:"change",toEl:n,newIndex:Te,newDraggableIndex:qe,originalEvent:e})}if(e.preventDefault!==void 0&&e.cancelable&&e.preventDefault(),r=Ie(r,l.draggable,n,!0),m("dragOver"),Y.eventCanceled)return C;if(M.contains(e.target)||r.animated&&r.animatingX&&r.animatingY||y._ignoreWhileAnimating===r)return F(!1);if(qt=!1,s&&!l.disabled&&(f?v||(d=me!==ve):we===this||(this.lastPutMode=Ft.checkPull(this,s,M,e))&&u.checkPut(this,s,M,e))){if(k=this._getDirection(e,r)==="vertical",a=ye(M),m("dragOverValid"),Y.eventCanceled)return C;if(d)return me=ve,b(),this._hideClone(),m("revert"),Y.eventCanceled||(ot?ve.insertBefore(M,ot):ve.appendChild(M)),F(!0);var j=_o(n,l.draggable);if(!j||Tr(e,k,this)&&!j.animated){if(j===M)return F(!1);if(j&&n===e.target&&(r=j),r&&(i=ye(r)),Mt(ve,n,M,a,r,i,e,!!r)!==!1)return b(),j&&j.nextSibling?n.insertBefore(M,j.nextSibling):n.appendChild(M),me=n,T(),F(!0)}else if(j&&Fr(e,k,this)){var W=ct(n,0,l,!0);if(W===M)return F(!1);if(r=W,i=ye(r),Mt(ve,n,M,a,r,i,e,!1)!==!1)return b(),n.insertBefore(M,W),me=n,T(),F(!0)}else if(r.parentNode===n){i=ye(r);var Z=0,P,p=M.parentNode!==n,c=!Dr(M.animated&&M.toRect||a,r.animated&&r.toRect||i,k),h=k?"top":"left",S=$o(r,"top","top")||$o(M,"top","top"),O=S?S.scrollTop:void 0;rt!==r&&(P=i[h],_t=!1,Tt=!c&&l.invertSwap||p),Z=Or(e,r,i,k,c?1:l.swapThreshold,l.invertedSwapThreshold==null?l.swapThreshold:l.invertedSwapThreshold,Tt,rt===r);var L;if(Z!==0){var A=Pe(M);do A-=Z,L=me.children[A];while(L&&(U(L,"display")==="none"||L===Q))}if(Z===0||L===r)return F(!1);rt=r,St=Z;var R=r.nextElementSibling,D=!1;D=Z===1;var E=Mt(ve,n,M,a,r,i,e,D);if(E!==!1)return(E===1||E===-1)&&(D=E===1),go=!0,setTimeout(Rr,30),b(),D&&!R?n.appendChild(M):r.parentNode.insertBefore(M,D?R:r),S&&gn(S,0,O-S.scrollTop),me=M.parentNode,P!==void 0&&!Tt&&(Vt=Math.abs(P-ye(r)[h])),T(),F(!0)}if(n.contains(M))return F(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){ie(document,"mousemove",this._onTouchMove),ie(document,"touchmove",this._onTouchMove),ie(document,"pointermove",this._onTouchMove),ie(document,"dragover",tt),ie(document,"mousemove",tt),ie(document,"touchmove",tt)},_offUpEvents:function(){var e=this.el.ownerDocument;ie(e,"mouseup",this._onDrop),ie(e,"touchend",this._onDrop),ie(e,"pointerup",this._onDrop),ie(e,"pointercancel",this._onDrop),ie(e,"touchcancel",this._onDrop),ie(document,"selectstart",this)},_onDrop:function(e){var n=this.el,r=this.options;if(Te=Pe(M),qe=Pe(M,r.draggable),Ee("drop",this,{evt:e}),me=M&&M.parentNode,Te=Pe(M),qe=Pe(M,r.draggable),Y.eventCanceled){this._nulling();return}it=!1,Tt=!1,_t=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),yo(this.cloneId),yo(this._dragStartId),this.nativeDraggable&&(ie(document,"drop",this),ie(n,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),Ct&&U(document.body,"user-select",""),U(M,"transform",""),e&&(ft&&(e.cancelable&&e.preventDefault(),!r.dropBubble&&e.stopPropagation()),Q&&Q.parentNode&&Q.parentNode.removeChild(Q),(ve===me||we&&we.lastPutMode!=="clone")&&he&&he.parentNode&&he.parentNode.removeChild(he),M&&(this.nativeDraggable&&ie(M,"dragend",this),so(M),M.style["will-change"]="",ft&&!it&&Fe(M,we?we.options.ghostClass:this.options.ghostClass,!1),Fe(M,this.options.chosenClass,!1),ke({sortable:this,name:"unchoose",toEl:me,newIndex:null,newDraggableIndex:null,originalEvent:e}),ve!==me?(Te>=0&&(ke({rootEl:me,name:"add",toEl:me,fromEl:ve,originalEvent:e}),ke({sortable:this,name:"remove",toEl:me,originalEvent:e}),ke({rootEl:me,name:"sort",toEl:me,fromEl:ve,originalEvent:e}),ke({sortable:this,name:"sort",toEl:me,originalEvent:e})),we&&we.save()):Te!==lt&&Te>=0&&(ke({sortable:this,name:"update",toEl:me,originalEvent:e}),ke({sortable:this,name:"sort",toEl:me,originalEvent:e})),Y.active&&((Te==null||Te===-1)&&(Te=lt,qe=bt),ke({sortable:this,name:"end",toEl:me,originalEvent:e}),this.save()))),this._nulling()},_nulling:function(){Ee("nulling",this),ve=M=me=Q=ot=he=It=Xe=et=Ae=ft=Te=qe=lt=bt=rt=St=we=Ft=Y.dragged=Y.ghost=Y.clone=Y.active=null,Kt.forEach(function(e){e.checked=!0}),Kt.length=io=ao=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":M&&(this._onDragOver(e),Br(e));break;case"selectstart":e.preventDefault();break}},toArray:function(){for(var e=[],n,r=this.el.children,a=0,i=r.length,d=this.options;a<i;a++)n=r[a],Ie(n,d.draggable,this.el,!1)&&e.push(n.getAttribute(d.dataIdAttr)||Pr(n));return e},sort:function(e,n){var r={},a=this.el;this.toArray().forEach(function(i,d){var l=a.children[d];Ie(l,this.options.draggable,a,!1)&&(r[i]=l)},this),n&&this.captureAnimationState(),e.forEach(function(i){r[i]&&(a.removeChild(r[i]),a.appendChild(r[i]))}),n&&this.animateAll()},save:function(){var e=this.options.store;e&&e.set&&e.set(this)},closest:function(e,n){return Ie(e,n||this.options.draggable,this.el,!1)},option:function(e,n){var r=this.options;if(n===void 0)return r[e];var a=Bt.modifyOption(this,e,n);typeof a<"u"?r[e]=a:r[e]=n,e==="group"&&Sn(r)},destroy:function(){Ee("destroy",this);var e=this.el;e[xe]=null,ie(e,"mousedown",this._onTapStart),ie(e,"touchstart",this._onTapStart),ie(e,"pointerdown",this._onTapStart),this.nativeDraggable&&(ie(e,"dragover",this),ie(e,"dragenter",this)),Array.prototype.forEach.call(e.querySelectorAll("[draggable]"),function(n){n.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),Xt.splice(Xt.indexOf(this.el),1),this.el=e=null},_hideClone:function(){if(!Xe){if(Ee("hideClone",this),Y.eventCanceled)return;U(he,"display","none"),this.options.removeCloneOnHide&&he.parentNode&&he.parentNode.removeChild(he),Xe=!0}},_showClone:function(e){if(e.lastPutMode!=="clone"){this._hideClone();return}if(Xe){if(Ee("showClone",this),Y.eventCanceled)return;M.parentNode==ve&&!this.options.group.revertClone?ve.insertBefore(he,M):ot?ve.insertBefore(he,ot):ve.appendChild(he),this.options.group.revertClone&&this.animate(M,he),U(he,"display",""),Xe=!1}}};function Br(o){o.dataTransfer&&(o.dataTransfer.dropEffect="move"),o.cancelable&&o.preventDefault()}function Mt(o,e,n,r,a,i,d,l){var u,s=o[xe],f=s.options.onMove,v;return window.CustomEvent&&!Ue&&!xt?u=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(u=document.createEvent("Event"),u.initEvent("move",!0,!0)),u.to=e,u.from=o,u.dragged=n,u.draggedRect=r,u.related=a||e,u.relatedRect=i||ye(e),u.willInsertAfter=l,u.originalEvent=d,o.dispatchEvent(u),f&&(v=f.call(s,u,d)),v}function so(o){o.draggable=!1}function Rr(){go=!1}function Fr(o,e,n){var r=ye(ct(n.el,0,n.options,!0)),a=Cn(n.el,n.options,Q),i=10;return e?o.clientX<a.left-i||o.clientY<r.top&&o.clientX<r.right:o.clientY<a.top-i||o.clientY<r.bottom&&o.clientX<r.left}function Tr(o,e,n){var r=ye(_o(n.el,n.options.draggable)),a=Cn(n.el,n.options,Q),i=10;return e?o.clientX>a.right+i||o.clientY>r.bottom&&o.clientX>r.left:o.clientY>a.bottom+i||o.clientX>r.right&&o.clientY>r.top}function Or(o,e,n,r,a,i,d,l){var u=r?o.clientY:o.clientX,s=r?n.height:n.width,f=r?n.top:n.left,v=r?n.bottom:n.right,_=!1;if(!d){if(l&&Vt<s*a){if(!_t&&(St===1?u>f+s*i/2:u<v-s*i/2)&&(_t=!0),_t)_=!0;else if(St===1?u<f+Vt:u>v-Vt)return-St}else if(u>f+s*(1-a)/2&&u<v-s*(1-a)/2)return Mr(e)}return _=_||d,_&&(u<f+s*i/2||u>v-s*i/2)?u>f+s/2?1:-1:0}function Mr(o){return Pe(M)<Pe(o)?1:-1}function Pr(o){for(var e=o.tagName+o.className+o.src+o.href+o.textContent,n=e.length,r=0;n--;)r+=e.charCodeAt(n);return r.toString(36)}function Nr(o){Kt.length=0;for(var e=o.getElementsByTagName("input"),n=e.length;n--;){var r=e[n];r.checked&&Kt.push(r)}}function $t(o){return setTimeout(o,0)}function yo(o){return clearTimeout(o)}eo&&le(document,"touchmove",function(o){(Y.active||it)&&o.cancelable&&o.preventDefault()});Y.utils={on:le,off:ie,css:U,find:hn,is:function(e,n){return!!Ie(e,n,e,!1)},extend:gr,throttle:mn,closest:Ie,toggleClass:Fe,clone:yn,index:Pe,nextTick:$t,cancelNextTick:yo,detectDirection:bn,getChild:ct,expando:xe};Y.get=function(o){return o[xe]};Y.mount=function(){for(var o=arguments.length,e=new Array(o),n=0;n<o;n++)e[n]=arguments[n];e[0].constructor===Array&&(e=e[0]),e.forEach(function(r){if(!r.prototype||!r.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(r));r.utils&&(Y.utils=He(He({},Y.utils),r.utils)),Bt.mount(r)})};Y.create=function(o,e){return new Y(o,e)};Y.version=hr;var ge=[],vt,Co,wo=!1,uo,co,Qt,ht;function Ar(){function o(){this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0};for(var e in this)e.charAt(0)==="_"&&typeof this[e]=="function"&&(this[e]=this[e].bind(this))}return o.prototype={dragStarted:function(n){var r=n.originalEvent;this.sortable.nativeDraggable?le(document,"dragover",this._handleAutoScroll):this.options.supportPointer?le(document,"pointermove",this._handleFallbackAutoScroll):r.touches?le(document,"touchmove",this._handleFallbackAutoScroll):le(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(n){var r=n.originalEvent;!this.options.dragOverBubble&&!r.rootEl&&this._handleAutoScroll(r)},drop:function(){this.sortable.nativeDraggable?ie(document,"dragover",this._handleAutoScroll):(ie(document,"pointermove",this._handleFallbackAutoScroll),ie(document,"touchmove",this._handleFallbackAutoScroll),ie(document,"mousemove",this._handleFallbackAutoScroll)),jo(),Gt(),yr()},nulling:function(){Qt=Co=vt=wo=ht=uo=co=null,ge.length=0},_handleFallbackAutoScroll:function(n){this._handleAutoScroll(n,!0)},_handleAutoScroll:function(n,r){var a=this,i=(n.touches?n.touches[0]:n).clientX,d=(n.touches?n.touches[0]:n).clientY,l=document.elementFromPoint(i,d);if(Qt=n,r||this.options.forceAutoScrollFallback||xt||Ue||Ct){po(n,this.options,l,r);var u=Ke(l,!0);wo&&(!ht||i!==uo||d!==co)&&(ht&&jo(),ht=setInterval(function(){var s=Ke(document.elementFromPoint(i,d),!0);s!==u&&(u=s,Gt()),po(n,a.options,s,r)},10),uo=i,co=d)}else{if(!this.options.bubbleScroll||Ke(l,!0)===$e()){Gt();return}po(n,this.options,Ke(l,!1),!1)}}},We(o,{pluginName:"scroll",initializeByDefault:!0})}function Gt(){ge.forEach(function(o){clearInterval(o.pid)}),ge=[]}function jo(){clearInterval(ht)}var po=mn(function(o,e,n,r){if(e.scroll){var a=(o.touches?o.touches[0]:o).clientX,i=(o.touches?o.touches[0]:o).clientY,d=e.scrollSensitivity,l=e.scrollSpeed,u=$e(),s=!1,f;Co!==n&&(Co=n,Gt(),vt=e.scroll,f=e.scrollFn,vt===!0&&(vt=Ke(n,!0)));var v=0,_=vt;do{var k=_,y=ye(k),C=y.top,m=y.bottom,b=y.left,F=y.right,T=y.width,j=y.height,W=void 0,Z=void 0,P=k.scrollWidth,p=k.scrollHeight,c=U(k),h=k.scrollLeft,S=k.scrollTop;k===u?(W=T<P&&(c.overflowX==="auto"||c.overflowX==="scroll"||c.overflowX==="visible"),Z=j<p&&(c.overflowY==="auto"||c.overflowY==="scroll"||c.overflowY==="visible")):(W=T<P&&(c.overflowX==="auto"||c.overflowX==="scroll"),Z=j<p&&(c.overflowY==="auto"||c.overflowY==="scroll"));var O=W&&(Math.abs(F-a)<=d&&h+T<P)-(Math.abs(b-a)<=d&&!!h),L=Z&&(Math.abs(m-i)<=d&&S+j<p)-(Math.abs(C-i)<=d&&!!S);if(!ge[v])for(var A=0;A<=v;A++)ge[A]||(ge[A]={});(ge[v].vx!=O||ge[v].vy!=L||ge[v].el!==k)&&(ge[v].el=k,ge[v].vx=O,ge[v].vy=L,clearInterval(ge[v].pid),(O!=0||L!=0)&&(s=!0,ge[v].pid=setInterval(function(){r&&this.layer===0&&Y.active._onTouchMove(Qt);var R=ge[this.layer].vy?ge[this.layer].vy*l:0,D=ge[this.layer].vx?ge[this.layer].vx*l:0;typeof f=="function"&&f.call(Y.dragged.parentNode[xe],D,R,o,Qt,ge[this.layer].el)!=="continue"||gn(ge[this.layer].el,D,R)}.bind({layer:v}),24))),v++}while(e.bubbleScroll&&_!==u&&(_=Ke(_,!1)));wo=s}},30),Dn=function(e){var n=e.originalEvent,r=e.putSortable,a=e.dragEl,i=e.activeSortable,d=e.dispatchSortableEvent,l=e.hideGhostForTarget,u=e.unhideGhostForTarget;if(n){var s=r||i;l();var f=n.changedTouches&&n.changedTouches.length?n.changedTouches[0]:n,v=document.elementFromPoint(f.clientX,f.clientY);u(),s&&!s.el.contains(v)&&(d("spill"),this.onSpill({dragEl:a,putSortable:r}))}};function ko(){}ko.prototype={startIndex:null,dragStart:function(e){var n=e.oldDraggableIndex;this.startIndex=n},onSpill:function(e){var n=e.dragEl,r=e.putSortable;this.sortable.captureAnimationState(),r&&r.captureAnimationState();var a=ct(this.sortable.el,this.startIndex,this.options);a?this.sortable.el.insertBefore(n,a):this.sortable.el.appendChild(n),this.sortable.animateAll(),r&&r.animateAll()},drop:Dn};We(ko,{pluginName:"revertOnSpill"});function Do(){}Do.prototype={onSpill:function(e){var n=e.dragEl,r=e.putSortable,a=r||this.sortable;a.captureAnimationState(),n.parentNode&&n.parentNode.removeChild(n),a.animateAll()},drop:Dn};We(Do,{pluginName:"removeOnSpill"});Y.mount(new Ar);Y.mount(Do,ko);function Ir(o,e,n={}){let r;const{document:a=sr,...i}=n,d={onUpdate:f=>{Gr(e,f.oldIndex,f.newIndex,f)}},l=()=>{const f=typeof o=="string"?a?.querySelector(o):cn(o);!f||r!==void 0||(r=new Y(f,{...d,...i}))},u=()=>{r?.destroy(),r=void 0},s=(f,v)=>{if(v!==void 0)r?.option(f,v);else return r?.option(f)};return ar(l),Zt(u),{stop:u,start:l,option:s}}function Vr(o,e,n){const r=o.children[n];o.insertBefore(e,r)}function $r(o){o.parentNode&&o.parentNode.removeChild(o)}function Gr(o,e,n,r=null){r!=null&&($r(r.item),Vr(r.from,r.item,e));const a=t.isRef(o),i=a?[...t.toValue(o)]:t.toValue(o);if(n>=0&&n<i.length){const d=i.splice(e,1)[0];t.nextTick(()=>{i.splice(n,0,d),a&&(o.value=i)})}}const Hr=["data-align"],Lr={key:0,role:"list",class:"pv-popover-list",ref:"popoverList"},zr=t.defineComponent({__name:"PvPopover",props:{alignment:{default:void 0},cssCustomProperties:{default:()=>({})},isList:{type:Boolean,default:!1},isSortable:{type:Boolean}},emits:["list-order-updated"],setup(o,{expose:e,emit:n}){const r=t.ref(null),a=t.useTemplateRef("popoverList"),i=o,d=n;return i.isSortable&&i.isList&&Ir(a,[],{animation:150,onUpdate:()=>{const l=Array.from(a.value?.children||[]).map(u=>u.id);d("list-order-updated",l)}}),e({popoverRoot:r}),(l,u)=>(t.openBlock(),t.createElementBlock("div",{class:"pv-popover","data-align":l.alignment,style:t.normalizeStyle(l.cssCustomProperties),ref_key:"popoverRoot",ref:r},[l.isList?(t.openBlock(),t.createElementBlock("ul",Lr,[t.renderSlot(l.$slots,"default",{},void 0,!0)],512)):t.renderSlot(l.$slots,"default",{key:1},void 0,!0)],12,Hr))}}),Qe=(o,e)=>{const n=o.__vccOpts||o;for(const[r,a]of e)n[r]=a;return n},jr=Qe(zr,[["__scopeId","data-v-80ba65ea"]]),En=Jt?window:void 0;function mt(o){var e;const n=t.toValue(o);return(e=n?.$el)!=null?e:n}function at(...o){const e=[],n=()=>{e.forEach(l=>l()),e.length=0},r=(l,u,s,f)=>(l.addEventListener(u,s,f),()=>l.removeEventListener(u,s,f)),a=t.computed(()=>{const l=ut(t.toValue(o[0])).filter(u=>u!=null);return l.every(u=>typeof u!="string")?l:void 0}),i=un(()=>{var l,u;return[(u=(l=a.value)==null?void 0:l.map(s=>mt(s)))!=null?u:[En].filter(s=>s!=null),ut(t.toValue(a.value?o[1]:o[0])),ut(t.unref(a.value?o[2]:o[1])),t.toValue(a.value?o[3]:o[2])]},([l,u,s,f])=>{if(n(),!l?.length||!u?.length||!s?.length)return;const v=ln(f)?{...f}:f;e.push(...l.flatMap(_=>u.flatMap(k=>s.map(y=>r(_,k,y,v)))))},{flush:"post"}),d=()=>{i(),n()};return Zt(n),d}let Wo=!1;function Uo(o,e,n={}){const{window:r=En,ignore:a=[],capture:i=!0,detectIframe:d=!1,controls:l=!1}=n;if(!r)return l?{stop:ze,cancel:ze,trigger:ze}:ze;if(mo&&!Wo){Wo=!0;const m={passive:!0};Array.from(r.document.body.children).forEach(b=>at(b,"click",ze,m)),at(r.document.documentElement,"click",ze,m)}let u=!0;const s=m=>t.toValue(a).some(b=>{if(typeof b=="string")return Array.from(r.document.querySelectorAll(b)).some(F=>F===m.target||m.composedPath().includes(F));{const F=mt(b);return F&&(m.target===F||m.composedPath().includes(F))}});function f(m){const b=t.toValue(m);return b&&b.$.subTree.shapeFlag===16}function v(m,b){const F=t.toValue(m),T=F.$.subTree&&F.$.subTree.children;return T==null||!Array.isArray(T)?!1:T.some(j=>j.el===b.target||b.composedPath().includes(j.el))}const _=m=>{const b=mt(o);if(m.target!=null&&!(!(b instanceof Element)&&f(o)&&v(o,m))&&!(!b||b===m.target||m.composedPath().includes(b))){if("detail"in m&&m.detail===0&&(u=!s(m)),!u){u=!0;return}e(m)}};let k=!1;const y=[at(r,"click",m=>{k||(k=!0,setTimeout(()=>{k=!1},0),_(m))},{passive:!0,capture:i}),at(r,"pointerdown",m=>{const b=mt(o);u=!s(m)&&!!(b&&!m.composedPath().includes(b))},{passive:!0}),d&&at(r,"blur",m=>{setTimeout(()=>{var b;const F=mt(o);((b=r.document.activeElement)==null?void 0:b.tagName)==="IFRAME"&&!F?.contains(r.document.activeElement)&&e(m)},0)},{passive:!0})].filter(Boolean),C=()=>y.forEach(m=>m());return l?{stop:C,cancel:()=>{u=!1},trigger:m=>{u=!0,_(m),u=!1}}:C}const Wr={mounted(o,e){const n=!e.modifiers.bubble;if(typeof e.value=="function")o.__onClickOutside_stop=Uo(o,e.value,{capture:n});else{const[r,a]=e.value;o.__onClickOutside_stop=Uo(o,r,Object.assign({capture:n},a))}},unmounted(o){o.__onClickOutside_stop()}};function fo(o){return typeof Window<"u"&&o instanceof Window?o.document.documentElement:typeof Document<"u"&&o instanceof Document?o.documentElement:o}function xn(o){const e=window.getComputedStyle(o);if(e.overflowX==="scroll"||e.overflowY==="scroll"||e.overflowX==="auto"&&o.clientWidth<o.scrollWidth||e.overflowY==="auto"&&o.clientHeight<o.scrollHeight)return!0;{const n=o.parentNode;return!n||n.tagName==="BODY"?!1:xn(n)}}function Ur(o){const e=o||window.event,n=e.target;return xn(n)?!1:e.touches.length>1?!0:(e.preventDefault&&e.preventDefault(),!1)}const vo=new WeakMap;function Yr(o,e=!1){const n=t.shallowRef(e);let r=null,a="";t.watch(sn(o),l=>{const u=fo(t.toValue(l));if(u){const s=u;if(vo.get(s)||vo.set(s,s.style.overflow),s.style.overflow!=="hidden"&&(a=s.style.overflow),s.style.overflow==="hidden")return n.value=!0;if(n.value)return s.style.overflow="hidden"}},{immediate:!0});const i=()=>{const l=fo(t.toValue(o));!l||n.value||(mo&&(r=at(l,"touchmove",u=>{Ur(u)},{passive:!1})),l.style.overflow="hidden",n.value=!0)},d=()=>{const l=fo(t.toValue(o));!l||!n.value||(mo&&r?.(),l.style.overflow=a,vo.delete(l),n.value=!1)};return Zt(d),t.computed({get(){return n.value},set(l){l?i():d()}})}function qr(){let o=!1;const e=t.shallowRef(!1);return(n,r)=>{if(e.value=r.value,o)return;o=!0;const a=Yr(n,r.value);t.watch(e,i=>a.value=i)}}qr();const Xr={class:"pv-relative",style:{width:"fit-content"}},Kr=["disabled"],Qr={key:0,class:"pv-shimmer"},Zr=t.defineComponent({__name:"PvDropdown",props:{defaultOpen:{type:Boolean,default:!1},popoverCssProperties:{},alignment:{default:void 0},isList:{type:Boolean,default:!1},isSortable:{type:Boolean},icon:{type:Boolean},disabled:{type:Boolean,default:!1},isLoading:{type:Boolean,default:!1},useTeleport:{type:Boolean,default:!1},teleportLocation:{default:"body"}},emits:["dropdown-open","dropdown-closed","list-order-updated"],setup(o,{expose:e,emit:n}){const r=o,a=n,i=t.ref(r.defaultOpen),d=t.ref(null),l=t.ref(null),u=t.ref(null),s=t.ref(null),f=()=>{d.value&&(u.value=d.value.getBoundingClientRect()),l.value?.popoverRoot&&(s.value=l.value.popoverRoot.getBoundingClientRect())},v=t.computed(()=>({"pv-hide":!i.value})),_=b=>{i.value=!i.value},k=()=>{i.value=!1};e({closeDropdown:k}),t.watch(i,b=>{b?t.nextTick(()=>{f(),a("dropdown-open")}):a("dropdown-closed")});const y=t.computed(()=>!u.value||!s.value?0:r.alignment==="right"||r.alignment==="top right"?u.value.left+u.value.width-s.value.width:u.value.left),C=t.computed(()=>!u.value||!s.value?0:r.alignment==="top"||r.alignment==="top right"?u.value.top-s.value.height:u.value.top+u.value.height),m=t.computed(()=>r.useTeleport?{...{position:"absolute",left:`${y.value}px`,top:`${C.value}px`,zIndex:10},...r.popoverCssProperties}:r.popoverCssProperties);return(b,F)=>t.withDirectives((t.openBlock(),t.createElementBlock("div",Xr,[t.createElementVNode("button",{ref_key:"triggerRef",ref:d,class:t.normalizeClass({"pv-select":!b.icon,"pv-icon-button":b.icon}),style:{width:"auto"},onClick:_,disabled:b.disabled},[t.renderSlot(b.$slots,"trigger",{},()=>[F[1]||(F[1]=t.createTextVNode("Open"))],!0)],10,Kr),(t.openBlock(),t.createBlock(t.Teleport,{to:b.teleportLocation,disabled:!b.useTeleport},[t.createVNode(jr,{ref_key:"popoverRef",ref:l,class:t.normalizeClass(v.value),"css-custom-properties":m.value,alignment:b.alignment,isList:b.isList,isSortable:b.isSortable,onListOrderUpdated:F[0]||(F[0]=T=>b.$emit("list-order-updated",T))},{default:t.withCtx(()=>[t.renderSlot(b.$slots,"default",{},()=>[b.isLoading?(t.openBlock(),t.createElementBlock("span",Qr,"Loading...")):t.createCommentVNode("",!0)],!0)]),_:3},8,["class","css-custom-properties","alignment","isList","isSortable"])],8,["to","disabled"]))])),[[t.unref(Wr),k]])}}),Bn=Qe(Zr,[["__scopeId","data-v-5008b808"]]),Jr=["xlink:href"],ei=[void 0,10,12,20,24,32,64],Se=t.defineComponent({__name:"PvIcon",props:{name:{},size:{}},setup(o){const e=o,n=t.computed(()=>({"pv-icon":!0,[`pv-icon-${e.size}`]:ei.includes(e.size)}));return(r,a)=>(t.openBlock(),t.createElementBlock("svg",{"aria-hidden":"true",class:t.normalizeClass(n.value)},[t.createElementVNode("use",{"xlink:href":`#${r.name}`},null,8,Jr)],2))}}),ti=["disabled"],oi={key:0,class:"pv-button-loading"},ni=t.defineComponent({__name:"PvButton",props:{variant:{default:"primary"},disabled:{type:Boolean,default:!1},size:{default:void 0},inverse:{type:Boolean,default:!1},shadow:{type:Boolean,default:!1},loading:{type:Boolean,default:!1}},setup(o){const e=o,n=t.computed(()=>({[`pv-button-${e.variant}`]:!0,[`pv-button-${e.size}`]:!!e.size,"pv-button-inverse":e.inverse,"pv-button-shadow":e.shadow}));return(r,a)=>(t.openBlock(),t.createElementBlock("button",{type:"button",class:t.normalizeClass(n.value),disabled:r.disabled},[r.loading?(t.openBlock(),t.createElementBlock("span",oi)):t.renderSlot(r.$slots,"default",{key:1},void 0,!0)],10,ti))}}),Ge=Qe(ni,[["__scopeId","data-v-f00f6419"]]),ri=t.defineComponent({__name:"PvCounterBadge",props:{value:{},prefix:{default:""},variant:{default:"primary"},size:{default:"sm"},maxValue:{default:99}},setup(o){const e=o,n=t.computed(()=>e.size=="md"?"md":(e.size=="sm","sm")),r=t.computed(()=>e.maxValue&&e.value&&e.value>e.maxValue?`${e.maxValue}+`:e.value!=null?`${e.prefix}${e.value}`:"-"),a=t.computed(()=>({"pv-inline-block pv-inset-square pv-radius pv-text-center":!0,"pv-badge-md pv-text-body-xs":n.value=="md","pv-badge-sm pv-text-body-xxs":n.value=="sm","pv-surface-brand-inverse pv-text-inverse":e.variant=="primary","pv-surface pv-bordered":e.variant=="secondary","pv-surface-lighten-5":e.variant=="tertiary","pv-text-secondary":e.variant=="ghost"||e.variant=="tertiary","pv-surface":e.variant=="ghost"}));return(i,d)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(a.value)},t.toDisplayString(r.value),3))}}),Eo=Qe(ri,[["__scopeId","data-v-5afd0e59"]]),ii=["data-style"],ai=t.defineComponent({__name:"PvTag",props:{size:{default:"md"},variant:{default:"tertiary"},icon:{},label:{},showClear:{type:Boolean},rounded:{type:Boolean}},emits:["handle-close","handle-click"],setup(o){const e=o,n=t.computed(()=>{switch(e.size){case"lg":return"pv-tag-lg";case"sm":return"pv-tag-sm";default:return""}}),r=t.computed(()=>{switch(e.variant){case"primary":return"pv-tag-primary";case"tertiary":return"pv-tag-tertiary";default:return""}});return(a,i)=>(t.openBlock(),t.createElementBlock("button",{class:t.normalizeClass([r.value,n.value]),onClick:i[1]||(i[1]=d=>a.$emit("handle-click",a.label)),"data-testid":"pv-tag","data-style":a.rounded?"rounded":void 0},[a.icon?(t.openBlock(),t.createBlock(Se,{key:0,"data-testid":"pv-tag-icon",name:a.icon,size:12},null,8,["name"])):t.createCommentVNode("",!0),t.createElementVNode("span",null,t.toDisplayString(a.label),1),a.showClear?(t.openBlock(),t.createBlock(Se,{key:1,"data-testid":"pv-tag-close-icon",size:12,name:"close",onClick:i[0]||(i[0]=t.withModifiers(d=>a.$emit("handle-close",a.label),["stop"]))})):t.createCommentVNode("",!0)],10,ii))}});var Ht=(o=>(o.Vertical="Vertical",o.Horizontal="Horizontal",o))(Ht||{}),gt=(o=>(o.Primary="Primary",o.Secondary="Secondary",o.Tertiary="Tertiary",o))(gt||{});const li={class:"pv-text-title-sm pv-line-clamp",style:{"--lines":"2"}},si={key:0,class:"pv-flex"};gt.Primary,Ht.Horizontal;const ui=["data-style"],di=t.defineComponent({__name:"PvSuggestionTag",props:{size:{default:"md"},label:{},showIcon:{type:Boolean},rounded:{type:Boolean}},emits:["handle-close","handle-click"],setup(o){const e=o,n=t.computed(()=>{switch(e.size){case"lg":return"pv-tag-lg";case"sm":return"pv-tag-sm";default:return""}});return(r,a)=>(t.openBlock(),t.createElementBlock("button",{class:t.normalizeClass(["pv-border-dashed pv-tag-secondary",n.value]),onClick:a[0]||(a[0]=i=>r.$emit("handle-click",r.label)),"data-testid":"pv-suggestion-tag","data-style":r.rounded?"rounded":void 0},[r.showIcon?(t.openBlock(),t.createBlock(Se,{key:0,"data-testid":"pv-suggestion-tag-icon",name:"expand",size:12})):t.createCommentVNode("",!0),t.createElementVNode("span",null,t.toDisplayString(r.label),1)],10,ui))}}),ci={class:"pv-relative"},pi=["placeholder"],fi={key:0,"data-testid":"pv-search-input-shortcut",class:"pv-kbd"},Yo="/",vi=t.defineComponent({__name:"PvSearchInput",props:t.mergeModels({placeholder:{default:"Search"},disabled:{type:Boolean,default:!1},displayShortcut:{type:Boolean}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(o){const e=o,n=t.useTemplateRef("search-input"),r=t.useModel(o,"modelValue"),a=t.computed(()=>({"pv-input-search":!0,"pv-full-width":!0,"pv-input-padded-end":!0}));return t.onMounted(()=>{e.displayShortcut&&cr(Yo,i=>{const d=i.target,l=d instanceof HTMLInputElement||d instanceof HTMLTextAreaElement||(d?.isContentEditable??!1),u=document.activeElement===n.value;(!l||u)&&(u||(i.preventDefault(),n.value?.focus()))})}),(i,d)=>(t.openBlock(),t.createElementBlock("div",ci,[t.withDirectives(t.createElementVNode("input",{ref:"search-input","onUpdate:modelValue":d[0]||(d[0]=l=>r.value=l),type:"text",class:t.normalizeClass(a.value),placeholder:i.placeholder},null,10,pi),[[t.vModelText,r.value]]),i.displayShortcut?(t.openBlock(),t.createElementBlock("kbd",fi,t.toDisplayString(Yo))):t.createCommentVNode("",!0)]))}});var Lt={exports:{}},hi=Lt.exports,qo;function mi(){return qo||(qo=1,function(o,e){(function(n,r){o.exports=r()})(hi,function(){var n=1e3,r=6e4,a=36e5,i="millisecond",d="second",l="minute",u="hour",s="day",f="week",v="month",_="quarter",k="year",y="date",C="Invalid Date",m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,b=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,F={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(A){var R=["th","st","nd","rd"],D=A%100;return"["+A+(R[(D-20)%10]||R[D]||R[0])+"]"}},T=function(A,R,D){var E=String(A);return!E||E.length>=R?A:""+Array(R+1-E.length).join(D)+A},j={s:T,z:function(A){var R=-A.utcOffset(),D=Math.abs(R),E=Math.floor(D/60),x=D%60;return(R<=0?"+":"-")+T(E,2,"0")+":"+T(x,2,"0")},m:function A(R,D){if(R.date()<D.date())return-A(D,R);var E=12*(D.year()-R.year())+(D.month()-R.month()),x=R.clone().add(E,v),B=D-x<0,G=R.clone().add(E+(B?-1:1),v);return+(-(E+(D-x)/(B?x-G:G-x))||0)},a:function(A){return A<0?Math.ceil(A)||0:Math.floor(A)},p:function(A){return{M:v,y:k,w:f,d:s,D:y,h:u,m:l,s:d,ms:i,Q:_}[A]||String(A||"").toLowerCase().replace(/s$/,"")},u:function(A){return A===void 0}},W="en",Z={};Z[W]=F;var P="$isDayjsObject",p=function(A){return A instanceof O||!(!A||!A[P])},c=function A(R,D,E){var x;if(!R)return W;if(typeof R=="string"){var B=R.toLowerCase();Z[B]&&(x=B),D&&(Z[B]=D,x=B);var G=R.split("-");if(!x&&G.length>1)return A(G[0])}else{var N=R.name;Z[N]=R,x=N}return!E&&x&&(W=x),x||!E&&W},h=function(A,R){if(p(A))return A.clone();var D=typeof R=="object"?R:{};return D.date=A,D.args=arguments,new O(D)},S=j;S.l=c,S.i=p,S.w=function(A,R){return h(A,{locale:R.$L,utc:R.$u,x:R.$x,$offset:R.$offset})};var O=function(){function A(D){this.$L=c(D.locale,null,!0),this.parse(D),this.$x=this.$x||D.x||{},this[P]=!0}var R=A.prototype;return R.parse=function(D){this.$d=function(E){var x=E.date,B=E.utc;if(x===null)return new Date(NaN);if(S.u(x))return new Date;if(x instanceof Date)return new Date(x);if(typeof x=="string"&&!/Z$/i.test(x)){var G=x.match(m);if(G){var N=G[2]-1||0,$=(G[7]||"0").substring(0,3);return B?new Date(Date.UTC(G[1],N,G[3]||1,G[4]||0,G[5]||0,G[6]||0,$)):new Date(G[1],N,G[3]||1,G[4]||0,G[5]||0,G[6]||0,$)}}return new Date(x)}(D),this.init()},R.init=function(){var D=this.$d;this.$y=D.getFullYear(),this.$M=D.getMonth(),this.$D=D.getDate(),this.$W=D.getDay(),this.$H=D.getHours(),this.$m=D.getMinutes(),this.$s=D.getSeconds(),this.$ms=D.getMilliseconds()},R.$utils=function(){return S},R.isValid=function(){return this.$d.toString()!==C},R.isSame=function(D,E){var x=h(D);return this.startOf(E)<=x&&x<=this.endOf(E)},R.isAfter=function(D,E){return h(D)<this.startOf(E)},R.isBefore=function(D,E){return this.endOf(E)<h(D)},R.$g=function(D,E,x){return S.u(D)?this[E]:this.set(x,D)},R.unix=function(){return Math.floor(this.valueOf()/1e3)},R.valueOf=function(){return this.$d.getTime()},R.startOf=function(D,E){var x=this,B=!!S.u(E)||E,G=S.p(D),N=function(K,J){var w=S.w(x.$u?Date.UTC(x.$y,J,K):new Date(x.$y,J,K),x);return B?w:w.endOf(s)},$=function(K,J){return S.w(x.toDate()[K].apply(x.toDate("s"),(B?[0,0,0,0]:[23,59,59,999]).slice(J)),x)},I=this.$W,oe=this.$M,ne=this.$D,de="set"+(this.$u?"UTC":"");switch(G){case k:return B?N(1,0):N(31,11);case v:return B?N(1,oe):N(0,oe+1);case f:var ce=this.$locale().weekStart||0,X=(I<ce?I+7:I)-ce;return N(B?ne-X:ne+(6-X),oe);case s:case y:return $(de+"Hours",0);case u:return $(de+"Minutes",1);case l:return $(de+"Seconds",2);case d:return $(de+"Milliseconds",3);default:return this.clone()}},R.endOf=function(D){return this.startOf(D,!1)},R.$set=function(D,E){var x,B=S.p(D),G="set"+(this.$u?"UTC":""),N=(x={},x[s]=G+"Date",x[y]=G+"Date",x[v]=G+"Month",x[k]=G+"FullYear",x[u]=G+"Hours",x[l]=G+"Minutes",x[d]=G+"Seconds",x[i]=G+"Milliseconds",x)[B],$=B===s?this.$D+(E-this.$W):E;if(B===v||B===k){var I=this.clone().set(y,1);I.$d[N]($),I.init(),this.$d=I.set(y,Math.min(this.$D,I.daysInMonth())).$d}else N&&this.$d[N]($);return this.init(),this},R.set=function(D,E){return this.clone().$set(D,E)},R.get=function(D){return this[S.p(D)]()},R.add=function(D,E){var x,B=this;D=Number(D);var G=S.p(E),N=function(oe){var ne=h(B);return S.w(ne.date(ne.date()+Math.round(oe*D)),B)};if(G===v)return this.set(v,this.$M+D);if(G===k)return this.set(k,this.$y+D);if(G===s)return N(1);if(G===f)return N(7);var $=(x={},x[l]=r,x[u]=a,x[d]=n,x)[G]||1,I=this.$d.getTime()+D*$;return S.w(I,this)},R.subtract=function(D,E){return this.add(-1*D,E)},R.format=function(D){var E=this,x=this.$locale();if(!this.isValid())return x.invalidDate||C;var B=D||"YYYY-MM-DDTHH:mm:ssZ",G=S.z(this),N=this.$H,$=this.$m,I=this.$M,oe=x.weekdays,ne=x.months,de=x.meridiem,ce=function(J,w,z,H){return J&&(J[w]||J(E,B))||z[w].slice(0,H)},X=function(J){return S.s(N%12||12,J,"0")},K=de||function(J,w,z){var H=J<12?"AM":"PM";return z?H.toLowerCase():H};return B.replace(b,function(J,w){return w||function(z){switch(z){case"YY":return String(E.$y).slice(-2);case"YYYY":return S.s(E.$y,4,"0");case"M":return I+1;case"MM":return S.s(I+1,2,"0");case"MMM":return ce(x.monthsShort,I,ne,3);case"MMMM":return ce(ne,I);case"D":return E.$D;case"DD":return S.s(E.$D,2,"0");case"d":return String(E.$W);case"dd":return ce(x.weekdaysMin,E.$W,oe,2);case"ddd":return ce(x.weekdaysShort,E.$W,oe,3);case"dddd":return oe[E.$W];case"H":return String(N);case"HH":return S.s(N,2,"0");case"h":return X(1);case"hh":return X(2);case"a":return K(N,$,!0);case"A":return K(N,$,!1);case"m":return String($);case"mm":return S.s($,2,"0");case"s":return String(E.$s);case"ss":return S.s(E.$s,2,"0");case"SSS":return S.s(E.$ms,3,"0");case"Z":return G}return null}(J)||G.replace(":","")})},R.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},R.diff=function(D,E,x){var B,G=this,N=S.p(E),$=h(D),I=($.utcOffset()-this.utcOffset())*r,oe=this-$,ne=function(){return S.m(G,$)};switch(N){case k:B=ne()/12;break;case v:B=ne();break;case _:B=ne()/3;break;case f:B=(oe-I)/6048e5;break;case s:B=(oe-I)/864e5;break;case u:B=oe/a;break;case l:B=oe/r;break;case d:B=oe/n;break;default:B=oe}return x?B:S.a(B)},R.daysInMonth=function(){return this.endOf(v).$D},R.$locale=function(){return Z[this.$L]},R.locale=function(D,E){if(!D)return this.$L;var x=this.clone(),B=c(D,E,!0);return B&&(x.$L=B),x},R.clone=function(){return S.w(this.$d,this)},R.toDate=function(){return new Date(this.valueOf())},R.toJSON=function(){return this.isValid()?this.toISOString():null},R.toISOString=function(){return this.$d.toISOString()},R.toString=function(){return this.$d.toUTCString()},A}(),L=O.prototype;return h.prototype=L,[["$ms",i],["$s",d],["$m",l],["$H",u],["$W",s],["$M",v],["$y",k],["$D",y]].forEach(function(A){L[A[1]]=function(R){return this.$g(R,A[0],A[1])}}),h.extend=function(A,R){return A.$i||(A(R,O,h),A.$i=!0),h},h.locale=c,h.isDayjs=p,h.unix=function(A){return h(1e3*A)},h.en=Z[W],h.Ls=Z,h.p={},h})}(Lt)),Lt.exports}var gi=mi();const xo=Et(gi);var zt={exports:{}},yi=zt.exports,Xo;function Ci(){return Xo||(Xo=1,function(o,e){(function(n,r){o.exports=r()})(yi,function(){var n="minute",r=/[+-]\d\d(?::?\d\d)?/g,a=/([+-]|\d\d)/g;return function(i,d,l){var u=d.prototype;l.utc=function(C){var m={date:C,utc:!0,args:arguments};return new d(m)},u.utc=function(C){var m=l(this.toDate(),{locale:this.$L,utc:!0});return C?m.add(this.utcOffset(),n):m},u.local=function(){return l(this.toDate(),{locale:this.$L,utc:!1})};var s=u.parse;u.parse=function(C){C.utc&&(this.$u=!0),this.$utils().u(C.$offset)||(this.$offset=C.$offset),s.call(this,C)};var f=u.init;u.init=function(){if(this.$u){var C=this.$d;this.$y=C.getUTCFullYear(),this.$M=C.getUTCMonth(),this.$D=C.getUTCDate(),this.$W=C.getUTCDay(),this.$H=C.getUTCHours(),this.$m=C.getUTCMinutes(),this.$s=C.getUTCSeconds(),this.$ms=C.getUTCMilliseconds()}else f.call(this)};var v=u.utcOffset;u.utcOffset=function(C,m){var b=this.$utils().u;if(b(C))return this.$u?0:b(this.$offset)?v.call(this):this.$offset;if(typeof C=="string"&&(C=function(W){W===void 0&&(W="");var Z=W.match(r);if(!Z)return null;var P=(""+Z[0]).match(a)||["-",0,0],p=P[0],c=60*+P[1]+ +P[2];return c===0?0:p==="+"?c:-c}(C),C===null))return this;var F=Math.abs(C)<=16?60*C:C,T=this;if(m)return T.$offset=F,T.$u=C===0,T;if(C!==0){var j=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(T=this.local().add(F+j,n)).$offset=F,T.$x.$localOffset=j}else T=this.utc();return T};var _=u.format;u.format=function(C){var m=C||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return _.call(this,m)},u.valueOf=function(){var C=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*C},u.isUTC=function(){return!!this.$u},u.toISOString=function(){return this.toDate().toISOString()},u.toString=function(){return this.toDate().toUTCString()};var k=u.toDate;u.toDate=function(C){return C==="s"&&this.$offset?l(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():k.call(this)};var y=u.diff;u.diff=function(C,m,b){if(C&&this.$u===C.$u)return y.call(this,C,m,b);var F=this.local(),T=l(C).local();return y.call(F,T,m,b)}}})}(zt)),zt.exports}var wi=Ci();const bi=Et(wi);var jt={exports:{}},Si=jt.exports,Ko;function _i(){return Ko||(Ko=1,function(o,e){(function(n,r){o.exports=r()})(Si,function(){var n={year:0,month:1,day:2,hour:3,minute:4,second:5},r={};return function(a,i,d){var l,u=function(_,k,y){y===void 0&&(y={});var C=new Date(_),m=function(b,F){F===void 0&&(F={});var T=F.timeZoneName||"short",j=b+"|"+T,W=r[j];return W||(W=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:b,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:T}),r[j]=W),W}(k,y);return m.formatToParts(C)},s=function(_,k){for(var y=u(_,k),C=[],m=0;m<y.length;m+=1){var b=y[m],F=b.type,T=b.value,j=n[F];j>=0&&(C[j]=parseInt(T,10))}var W=C[3],Z=W===24?0:W,P=C[0]+"-"+C[1]+"-"+C[2]+" "+Z+":"+C[4]+":"+C[5]+":000",p=+_;return(d.utc(P).valueOf()-(p-=p%1e3))/6e4},f=i.prototype;f.tz=function(_,k){_===void 0&&(_=l);var y,C=this.utcOffset(),m=this.toDate(),b=m.toLocaleString("en-US",{timeZone:_}),F=Math.round((m-new Date(b))/1e3/60),T=15*-Math.round(m.getTimezoneOffset()/15)-F;if(!Number(T))y=this.utcOffset(0,k);else if(y=d(b,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(T,!0),k){var j=y.utcOffset();y=y.add(C-j,"minute")}return y.$x.$timezone=_,y},f.offsetName=function(_){var k=this.$x.$timezone||d.tz.guess(),y=u(this.valueOf(),k,{timeZoneName:_}).find(function(C){return C.type.toLowerCase()==="timezonename"});return y&&y.value};var v=f.startOf;f.startOf=function(_,k){if(!this.$x||!this.$x.$timezone)return v.call(this,_,k);var y=d(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L});return v.call(y,_,k).tz(this.$x.$timezone,!0)},d.tz=function(_,k,y){var C=y&&k,m=y||k||l,b=s(+d(),m);if(typeof _!="string")return d(_).tz(m);var F=function(Z,P,p){var c=Z-60*P*1e3,h=s(c,p);if(P===h)return[c,P];var S=s(c-=60*(h-P)*1e3,p);return h===S?[c,h]:[Z-60*Math.min(h,S)*1e3,Math.max(h,S)]}(d.utc(_,C).valueOf(),b,m),T=F[0],j=F[1],W=d(T).utcOffset(j);return W.$x.$timezone=m,W},d.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},d.tz.setDefault=function(_){l=_}}})}(jt)),jt.exports}var ki=_i();const Di=Et(ki);var Wt={exports:{}},Ei=Wt.exports,Qo;function xi(){return Qo||(Qo=1,function(o,e){(function(n,r){o.exports=r()})(Ei,function(){return function(n,r){var a=r.prototype,i=a.format;a.format=function(d){var l=this,u=this.$locale();if(!this.isValid())return i.bind(this)(d);var s=this.$utils(),f=(d||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,function(v){switch(v){case"Q":return Math.ceil((l.$M+1)/3);case"Do":return u.ordinal(l.$D);case"gggg":return l.weekYear();case"GGGG":return l.isoWeekYear();case"wo":return u.ordinal(l.week(),"W");case"w":case"ww":return s.s(l.week(),v==="w"?1:2,"0");case"W":case"WW":return s.s(l.isoWeek(),v==="W"?1:2,"0");case"k":case"kk":return s.s(String(l.$H===0?24:l.$H),v==="k"?1:2,"0");case"X":return Math.floor(l.$d.getTime()/1e3);case"x":return l.$d.getTime();case"z":return"["+l.offsetName()+"]";case"zzz":return"["+l.offsetName("long")+"]";default:return v}});return i.bind(this)(f)}}})}(Wt)),Wt.exports}var Bi=xi();const Ri=Et(Bi);xo.extend(Ri);xo.extend(bi);xo.extend(Di);const Fi={class:"pv-flex",style:{"--flex-wrap":"nowrap"}},Ti=["id"],Oi={key:1,style:{"padding-left":"16px"}},Mi=["checked","disabled","onChange"],Pi={class:"pv-text-body-md"},Ni={key:2},Ai={key:0,class:"pv-text-subdued pv-text-body-xxs"},Ii=t.defineComponent({__name:"GroupBySelector",props:{rowGroupLimit:{}},setup(o){const e=t.inject("gridApi"),n=t.inject("availableRowGroupColumns"),r=t.inject("rowGroupColumnFields"),a=o;t.watch(r,()=>{},{deep:!0});const i=y=>r.value.includes(y||""),d=(y,C)=>{C?e.value.addRowGroupColumns([y]):e.value.removeRowGroupColumns([y])},l=t.computed(()=>({"pv-hide":n.value.length===0})),u=t.computed(()=>a.rowGroupLimit?r.value.length>=a.rowGroupLimit:!1),s=t.computed(()=>r.value.map(y=>n.value.find(C=>C.field===y)).filter(y=>y!==void 0)),f=t.computed(()=>n.value.filter(y=>!r.value.includes(y.field))),v=t.computed(()=>{const y={label:"",value:"divider"},C=s.value.map(b=>({label:b.headerName,value:b.field})),m=f.value.map(b=>({label:b.headerName,value:b.field}));return[...C,y,...m]}),_=y=>`group-by-list-item-${y}`,k=y=>{const C=y.findIndex(F=>F==="divider"),b=y.slice(0,C).slice(0,a.rowGroupLimit).map(F=>F.replace("group-by-list-item-",""));e.value.setRowGroupColumns(b)};return(y,C)=>(t.openBlock(),t.createBlock(Bn,{isList:!0,isSortable:!0,popoverCssProperties:{width:"auto"},alignment:"right",class:t.normalizeClass(l.value),onListOrderUpdated:k},{trigger:t.withCtx(()=>[t.createElementVNode("div",Fi,[C[0]||(C[0]=t.createElementVNode("p",{class:"pv-truncate pv-text-body-md"},"Group by",-1)),t.unref(r).length>0?(t.openBlock(),t.createBlock(t.unref(Eo),{key:0,value:t.unref(r).length,variant:"tertiary"},null,8,["value"])):t.createCommentVNode("",!0)])]),default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(v.value,(m,b)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:m.value},[m.value!=="divider"?(t.openBlock(),t.createElementBlock("li",{key:0,id:_(m.value)},[t.createElementVNode("label",{class:t.normalizeClass(["pv-flex",{"pv-border-bottom":b+1===t.unref(r).length}])},[i(m.value)?(t.openBlock(),t.createBlock(Se,{key:0,name:"reorder",class:"pv-text-subdued"})):(t.openBlock(),t.createElementBlock("span",Oi)),t.createElementVNode("input",{type:"checkbox",class:"pv-checkbox",checked:i(m.value),disabled:!i(m.value)&&u.value,onChange:F=>d(m.value,F.target.checked)},null,40,Mi),t.createElementVNode("span",Pi,t.toDisplayString(m.label),1),i(m.value)?(t.openBlock(),t.createElementBlock("sup",Ni,t.toDisplayString(b+1),1)):t.createCommentVNode("",!0)],2)],8,Ti)):t.createCommentVNode("",!0)],64))),128)),u.value?(t.openBlock(),t.createElementBlock("p",Ai," Supports "+t.toDisplayString(y.rowGroupLimit)+" levels of grouping ",1)):t.createCommentVNode("",!0)]),_:1},8,["class"]))}}),Vi={},$i={class:"ag-custom-loading-cell pv-shimmer"};function Gi(o,e){return t.openBlock(),t.createElementBlock("div",$i)}const Hi=Qe(Vi,[["render",Gi]]),Li={key:0,class:"pv-table-group-cell"},zi={class:"pv-text-body-xxs pv-text-subdued"},ji={key:0},Wi={class:"pv-flex pv-space-between",style:{"line-height":"20px"}},Ui={class:"pv-text-title-md"},Yi={key:0,class:"pv-table-row-number"},qi=t.defineComponent({__name:"GroupedCellRenderer",props:{params:{}},setup(o){const e=o,n=t.inject("rowGroupColumnFields"),r=t.inject("groupColumnCellValueColumn"),a=t.inject("expandedRows"),i=t.computed(()=>!e.params.displayBaseAggregationsOnly||l.value.level===n.value.length-1),d=t.computed(()=>e.params.rowNode.group),l=sn(e.params,"rowNode"),u=(k,y)=>k?k({value:y,data:l.value.data,node:l.value,api:e.params.api}):y,s=t.computed(()=>{if(!r.value)return"";const k=r.value.getColId()||"",y=r.value.getColDef().valueFormatter,C=l.value;return k&&C&&C.data&&k in C.data?u(y,C.data[k]):""}),f=t.computed(()=>l.value.data&&l.value.data.groupedRecordCount?l.value.data.groupedRecordCount||0:l.value.allChildrenCount||0),v=t.computed(()=>{const k=l.value.rowIndex,y=l.value.parent?.rowIndex;return k!=null&&y!=null?k-y:null}),_=k=>{const y=k.node.expanded,C=k.node.rowIndex;C!=null&&(a.value[C]=y)};return t.onMounted(()=>{const k=l.value,y=k.rowIndex,C=k.expanded;y!=null&&(a.value[y]=C),l.value.addEventListener("expandedChanged",_)}),t.onBeforeUnmount(()=>{const k=l.value;l.value.removeEventListener("expandedChanged",_);const y=k.rowIndex;y!=null&&(a.value[y]=!1)}),(k,y)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[d.value?(t.openBlock(),t.createElementBlock("div",Li,[t.createElementVNode("p",zi,[t.createTextVNode(t.toDisplayString(t.unref(l).rowGroupColumn?.getColDef().headerName)+" ",1),k.params.displayCount&&i.value&&f.value>0?(t.openBlock(),t.createElementBlock("span",ji," ("+t.toDisplayString(f.value.toLocaleString())+") ",1)):t.createCommentVNode("",!0)]),t.createElementVNode("div",Wi,[t.createElementVNode("p",Ui,t.toDisplayString(k.params.formattedValue||k.params.rowNode.key),1)])])):t.createCommentVNode("",!0),t.createElementVNode("div",null,[t.createElementVNode("p",null,[k.params.displayRowNumber&&v.value?(t.openBlock(),t.createElementBlock("span",Yi,t.toDisplayString(v.value),1)):t.createCommentVNode("",!0),t.createTextVNode(" "+t.toDisplayString(s.value),1)])])],64))}});function Zo(o){const e=o.filter(r=>r!=null&&!isNaN(r)).sort((r,a)=>r-a),n=e.length;return n===0?null:e[Math.floor(n/2)]}var Ne=(o=>(o.String="string",o.Number="number",o.Boolean="boolean",o.Date="date",o.Currency="currency",o.Formula="formula",o.Select="select",o.Percent="percent",o.Entity="entity",o.Id="id",o.Integer="integer",o.User="user",o.Link="link",o.Location="location",o.Status="status",o.Tag="tag",o.File="file",o.None="none",o))(Ne||{});const Xi=o=>{switch(o){case"string":return"fonts";case"number":return"hash";case"boolean":return"list";case"date":return"calendar";case"currency":return"currency-dollar";case"formula":return"formula";case"select":return"list";case"percent":return"percent";case"entity":return"building";case"id":return"id-2";case"link":return"link";case"location":return"location";case"integer":return"hash";case"user":return"user";case"status":return"circle-chevron-down";case"tag":return"circle-chevron-down";case"file":return"file";case"none":return null;default:return null}},Ki=(o,e)=>{if(!o)return o;switch(e){case"percent":return o.replace(/^%+/,"").trim();default:return o}},Qi={style:{"line-height":"20px"}},Zi={class:"pv-text-subdued pv-text-body-xxs pv-relative"},Ji=t.defineComponent({__name:"GroupAggCellRenderer",props:{params:{}},setup(o){const e=o,n=t.inject("expandedRows"),r=t.computed(()=>{const f=e.params.column?.getColDef()?.context;return f&&f.aggFuncDisplayName?f.aggFuncDisplayName:(e.params.column?.getAggFunc()||"agg").toLowerCase()}),a=()=>{const s=e.params.api;if(s){const f=!d.value;s.setRowNodeExpanded(e.params.node,f),i.value&&(n.value[i.value]=f)}},i=t.computed(()=>e.params.node?.rowIndex),d=t.computed(()=>{let s=!1;return i.value!=null&&(s=i.value in n.value?n.value[i.value]:!1),s}),l=t.computed(()=>d.value?"chevron-down":"chevron-right"),u=t.computed(()=>{const f=e.params.column?.getColDef()?.context,v=e.params.valueFormatted||e.params.value;return f&&f.dataType&&[Ne.Currency,Ne.Percent,Ne.Number,Ne.Integer].includes(f.dataType)?v.toLocaleString():v});return t.onMounted(()=>{e.params.node.expanded&&i.value&&(n.value[i.value]=!0)}),(s,f)=>(t.openBlock(),t.createElementBlock("div",{class:"pv-flex",ondblclick:a},[t.createElementVNode("div",Qi,[t.createElementVNode("p",null,t.toDisplayString(u.value),1),t.createElementVNode("p",Zi,t.toDisplayString(r.value),1)]),t.createVNode(Ge,{variant:"icon",onClick:a},{default:t.withCtx(()=>[t.createVNode(Se,{name:l.value},null,8,["name"])]),_:1})]))}}),Ut=t.ref({}),Rn=t.ref(null),ea=t.ref(0),ta=t.ref(0),bo=t.ref({}),to=t.ref(void 0),Bo=t.ref({}),oo=t.ref({}),Ro=t.ref({}),Fn=t.ref({}),oa=()=>{const o={};return Object.entries(oo.value).forEach(([e,n])=>{const r=n.filter(a=>!!a);r.length>0&&(o[e]={filterType:"set",values:r})}),o},na=async(o,e,n,r)=>{const a=Fn.value[e.field]||void 0,i=oo.value[e.field]||[];let d=r;Rn.value!=null&&(d=oa());const l={api:o,colDef:e,column:n,filterModel:d,query:a,selectedValues:i};bo.value[e.field]=!0;const u=i.map(v=>{const _=Fo(e.field,v);return{value:_?.value||v,label:_?.label||v,isPreference:_?.isPreference||!1,isSelectable:_?.isSelectable||!0,metadata:_?.metadata||{}}}),s=await to.value?.(l);u.forEach(v=>{s?.some(_=>_?.value===v?.value)||s?.push(v)}),e.field&&s&&(Bo.value[e.field]=s);const f=s?.filter(v=>v!=null).map(v=>v.value)||[];return bo.value[e.field]=!1,f.filter((v,_)=>f.indexOf(v)===_)},ra=(o,e)=>{const n=e.filter((r,a)=>e.indexOf(r)===a).filter(r=>r!=null&&r!=="");return o&&o.trim()!==""&&!to.value?n.filter(r=>r?.toLowerCase().includes(o.toLowerCase())):n},Fo=(o,e)=>{const n=[...Bo.value[o]||[],...Ro.value[o]||[]];return n?n.find(r=>r?.value===e):null},ia=()=>to.value!=null,aa=(o,e)=>{const n=[];if(Ut.value&&Ut.value[o]?.values){const a=Ut.value[o].values||[];n.push(...a)}oo.value[o]=e,n.push(...e);const r=[];return e.forEach(a=>{const i=Fo(o,a);i&&r.push(i)}),Ro.value[o]=r,n.filter((a,i)=>n.indexOf(a)===i)},la=o=>oo.value[o]||[],sa=(o,e)=>{Fn.value[o]=e},To=()=>({filterModel:Ut,filterModelUpdated:ea,filterModelCleared:ta,filterValuesLoadingStatus:bo,filterValueMap:Bo,filterValueSelectedMetadataMap:Ro,filterStoreHandler:to,fetchFilterValues:na,filterValueContext:Fo,filterResultsByQuery:ra,getFilterSelectedValues:la,isServerSideFilter:ia,prevFilterModel:Rn,setFilterSelectedValues:aa,setFilterValueSearchText:sa}),ua={class:"pv-stack-8"},da={class:"pv-flex",style:{"--flex-wrap":"nowrap"}},ca={key:0,class:"pv-text-body-md pv-text-subdued",style:{"padding-top":"8px"}},pa={key:0,class:"pv-flex pv-text-subdued pv-space-between",style:{"padding-top":"8px"}},fa={class:"pv-flex"},va=["type","value","checked","disabled","onChange"],ha={class:"pv-text-body-md",style:{"padding-left":"4px"}},ma={key:1,class:"pv-flex pv-text-body-xxs pv-text-subdued",style:{"padding-top":"8px",cursor:"default"}},ga={key:0,class:"pv-tooltip suggested-label","aria-labelledby":"description"},ya=["role"],Ca={class:"pv-flex"},wa=["type","value","checked","disabled","onChange"],ba={class:"pv-text-body-md",style:{"padding-left":"4px"}},Sa={key:2,class:"pv-text-body-xxs pv-text-subdued"},_a={class:"pv-border-top pv-flex",style:{"--flex-justify":"end","padding-top":"8px"}},ka={key:0,class:"pv-full-width"},Da={class:"pv-flex-inline"},Ea={role:"list",class:"pv-flex pv-stack-8",style:{"--flex-wrap":"wrap"}},xa=4,Ba=t.defineComponent({__name:"SetFilter",props:{filterColDef:{},filterStyle:{default:"horizontal"},displayPreferencesIcon:{type:Boolean,default:!1}},emits:["filter-selection-changed","filter-closed","handle-settings-icon"],setup(o,{emit:e}){const n=o,r=e,a=t.inject("gridApi"),{filterModel:i,filterModelCleared:d,filterModelUpdated:l,filterValuesLoadingStatus:u,filterValueContext:s,filterResultsByQuery:f,getFilterSelectedValues:v,isServerSideFilter:_,setFilterValueSearchText:k,setFilterSelectedValues:y}=To(),C=t.inject("firstDataRendered"),m=t.ref([]),b=t.ref([]),F=t.ref(null),T=t.computed(()=>n.filterColDef.field||""),j=t.computed(()=>n.filterColDef.headerName||""),W=t.ref(!1),Z=t.computed(()=>{const w=n.filterColDef.context;return w&&w.filterValueFormatter&&typeof w.filterValueFormatter=="function"?w.filterValueFormatter:typeof n.filterColDef.valueFormatter=="function"?n.filterColDef.valueFormatter:null}),P=t.ref(""),p=t.ref(0),c=async()=>{h(),await S().then(()=>{W.value=!1})},h=()=>{const w=[];if(i.value&&i.value[T.value]?.values){const z=i.value[T.value].values||[];w.push(...z)}m.value=Array.from(new Set([...v(T.value),...w]))},S=async(w=!1,z=!1)=>{const H=await a.value.getColumnFilterInstance(T.value);(z||w&&u.value[T.value]!==!0&&l.value>p.value)&&(_()?(H.refreshFilterValues(),p.value=l.value):F.value=f(P.value,H.getFilterValues()));const te=new Set(H.getFilterValues());m.value.forEach(ae=>{te.add(ae)}),b.value=O(Array.from(te))},O=w=>w.sort((z,H)=>{const te=m.value.includes(z),ae=m.value.includes(H);return te&&!ae?-1:!te&&ae?1:0}),L=w=>{const z=s(T.value,w);return Z.value?Z.value({value:w,context:z}):w},A=t.computed(()=>{const w=n.filterColDef.context;return w&&w.filterSelectMax?w.filterSelectMax:null}),R=t.computed(()=>{const w=n.filterColDef.context;return w&&w.filterSelectMin?w.filterSelectMin===1&&A.value===1:!1}),D=t.computed(()=>{const w=n.filterColDef.context;return w&&w.filterOptionsSortDescription?w.filterOptionsSortDescription:null}),E=t.computed(()=>{const w=n.filterColDef.context;return w&&w.filterOptionsSortTooltip?w.filterOptionsSortTooltip:null}),x=t.computed(()=>A.value?m.value.length>=A.value:!1),B=t.computed(()=>b.value.filter(w=>!m.value.includes(w))),G=t.computed(()=>b.value.length===1&&b.value[0]===null&&m.value.length===0),N=t.computed(()=>b.value.filter(w=>s(T.value,w)?.isPreference)),$=w=>G.value||s(T.value,w)?.isSelectable===!1?!0:R.value?!1:x.value&&!m.value.includes(w),I=t.computed(()=>{if(F.value!=null)return F.value;const w=[...N.value,...b.value];return f(P.value,w)}),oe=t.computed(()=>I.value.filter(w=>!N.value.includes(w)));t.watch(()=>u.value[T.value],()=>{const w=u.value[T.value];W.value&&!w?(S(),W.value=!1):w&&(W.value=!0)},{deep:!0}),t.watch(()=>i.value,()=>{l.value+=1,h()}),t.watch(()=>d.value,()=>{m.value=[]}),t.watch(()=>C.value,()=>{h()}),t.watch(()=>m.value,w=>{y(T.value,w)}),lr(()=>P.value,async w=>{k(T.value,w),await S(!0,!0)},{debounce:300});const ne=w=>{w&&R.value?m.value=[w]:w&&!m.value.includes(w)&&(m.value=[...m.value,w]),K(),r("filter-selection-changed")},de=w=>{m.value=m.value.filter(z=>z!==w),K(),r("filter-selection-changed")},ce=()=>{m.value=[],K(),r("filter-selection-changed")},X=(w,z)=>{w.target.checked?ne(z):de(z)},K=()=>{const w=m.value.length>0?m.value:null;a.value.setColumnFilterModel(T.value,{values:w}).then(()=>{n.filterStyle==="horizontal"?a.value.onFilterChanged():l.value+=1})},J=()=>{P.value="",r("filter-closed")};return t.onMounted(()=>{c()}),(w,z)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createElementVNode("div",ua,[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(w.filterStyle==="vertical"?"ul":"div"),{role:"list",class:"pv-flex",style:{"--flex-wrap":"wrap"}},{default:t.withCtx(()=>[w.filterStyle==="vertical"?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(m.value,H=>(t.openBlock(),t.createElementBlock("li",{key:`${j.value}-${H}`},[t.createVNode(ai,{label:L(H)||"",showClear:!0,onHandleClose:te=>de(H)},null,8,["label","onHandleClose"])]))),128)):t.createCommentVNode("",!0)]),_:1})),t.createElementVNode("div",null,[t.createVNode(Bn,t.mergeProps({isList:!0,icon:w.filterStyle==="vertical",class:"pv-flex",popoverCssProperties:{width:"auto",maxWidth:w.filterStyle==="vertical"?"300px":"400px",overflowX:"auto"},isLoading:W.value,onDropdownOpen:z[3]||(z[3]=H=>S(!0)),onDropdownClosed:J},w.filterStyle==="horizontal"?{"data-horizontal-filter-field":T.value}:{}),t.createSlots({default:t.withCtx(()=>[t.createVNode(vi,{modelValue:P.value,"onUpdate:modelValue":z[0]||(z[0]=H=>P.value=H),size:"sm",style:{"min-width":"200px"}},null,8,["modelValue"]),I.value.length===0?(t.openBlock(),t.createElementBlock("li",ca,t.toDisplayString(W.value?"Loading...":"No results found"),1)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[N.value.length>0&&P.value===""?(t.openBlock(),t.createElementBlock("li",pa,[z[4]||(z[4]=t.createElementVNode("span",{class:"pv-text-subdued pv-text-body-xxs"},"Your Preferences",-1)),w.displayPreferencesIcon?(t.openBlock(),t.createBlock(Ge,{key:0,size:"small",variant:"ghost",onClick:z[1]||(z[1]=H=>w.$emit("handle-settings-icon",j.value))},{default:t.withCtx(()=>[t.createVNode(Se,{size:12,name:"sliders-horizontal"})]),_:1})):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(N.value,(H,te)=>(t.openBlock(),t.createElementBlock("li",{key:H,class:t.normalizeClass({"pv-border-bottom":te===N.value.length-1&&P.value===""})},[t.createElementVNode("label",fa,[t.createElementVNode("input",{type:R.value?"radio":"checkbox",class:t.normalizeClass(R.value?"pv-radio":"pv-checkbox"),value:H,checked:m.value.includes(H)||G.value,disabled:$(H),onChange:ae=>X(ae,H)},null,42,va),t.createElementVNode("span",ha,t.toDisplayString(L(H)),1)])],2))),128)),D.value&&P.value===""?(t.openBlock(),t.createElementBlock("li",ma,[D.value?(t.openBlock(),t.createElementBlock("span",ga,[t.createElementVNode("dfn",null,[t.createVNode(Se,{name:"ai",size:12})]),t.createElementVNode("span",{role:E.value?"tooltip":void 0,id:"description","data-position":"center-right",style:{"max-width":"175px"}},[t.createElementVNode("span",null,t.toDisplayString(E.value),1)],8,ya)])):t.createCommentVNode("",!0),t.createTextVNode(" "+t.toDisplayString(D.value),1)])):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(oe.value,H=>(t.openBlock(),t.createElementBlock("li",{key:H},[t.createElementVNode("label",Ca,[t.createElementVNode("input",{type:R.value?"radio":"checkbox",class:t.normalizeClass(R.value?"pv-radio":"pv-checkbox"),value:H,checked:m.value.includes(H)||G.value,disabled:$(H),onChange:te=>X(te,H)},null,42,wa),t.createElementVNode("span",ba,t.toDisplayString(L(H)),1)])]))),128))],64)),x.value?(t.openBlock(),t.createElementBlock("p",Sa," Max of "+t.toDisplayString(A.value)+" allowed ",1)):t.createCommentVNode("",!0),t.createElementVNode("div",_a,[t.createVNode(Ge,{variant:"ghost",size:"small",disabled:m.value.length===0,onClick:z[2]||(z[2]=H=>ce())},{default:t.withCtx(()=>z[5]||(z[5]=[t.createTextVNode("Clear All")])),_:1},8,["disabled"])])]),_:2},[w.filterStyle==="horizontal"?{name:"trigger",fn:t.withCtx(()=>[t.createElementVNode("div",da,[m.value.length>0?(t.openBlock(),t.createBlock(t.unref(Eo),{key:0,value:m.value.length,variant:"tertiary"},null,8,["value"])):t.createCommentVNode("",!0),t.createElementVNode("p",{class:t.normalizeClass(["pv-text-body-md pv-truncate",{"pv-shimmer":W.value}])},t.toDisplayString(j.value),3)])]),key:"0"}:{name:"trigger",fn:t.withCtx(()=>[t.createVNode(Se,{class:"pv-text-subdued",name:"add-circle"})]),key:"1"}]),1040,["icon","popoverCssProperties","isLoading"])])]),w.filterStyle=="vertical"?(t.openBlock(),t.createElementBlock("div",ka,[t.createElementVNode("div",Da,[t.createElementVNode("ul",Ea,[z[6]||(z[6]=t.createElementVNode("li",null,[t.createElementVNode("p",{class:"pv-text-subdued pv-text-body-md"},"Suggested:")],-1)),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(B.value.filter(H=>H!==""&&H!=null).slice(0,xa),H=>(t.openBlock(),t.createElementBlock("li",{key:`${j.value}-${H}-suggest`},[t.createVNode(t.unref(di),{label:L(H)||"",onHandleClick:te=>ne(H)},null,8,["label","onHandleClick"])]))),128))])])])):t.createCommentVNode("",!0)],64))}}),Jo=Qe(Ba,[["__scopeId","data-v-ad11d710"]]),Ra={class:"pv-flex"},Fa={class:"pv-flex-vertical pv-space-between pv-full-width",style:{height:"100%","overflow-x":"hidden"}},Ta={class:"pv-flex-vertical pv-full-width"},Oa={class:"pv-flex pv-inset-squish pv-full-width pv-space-between"},Ma={class:"pv-text-title-lg"},Pa={class:"pv-full-width pv-inset-inline-24"},Na={class:"pv-details",open:""},Aa={class:"pv-flex pv-stack-8",style:{width:"fit-content"}},Ia={class:"pv-text-title-lg"},Va={class:"pv-inset-block-8"},$a={class:"pv-sticky pv-border-top pv-full-width pv-inset-squish pv-flex pv-space-between pv-surface",style:{"--top":"unset",bottom:"0"}},Ga={class:"pv-flex"},en=5,Ha=t.defineComponent({__name:"FilterPanel",props:{enableVerticalPanel:{type:Boolean,default:!0},displayPreferencesIcon:{type:Boolean,default:!1}},emits:["handle-settings-icon"],setup(o){const e=t.inject("gridApi"),n=t.inject("availableFilterColumns"),r=t.inject("currentlyActiveFilter"),{filterModelCleared:a,prevFilterModel:i,filterModel:d}=To(),l=t.ref(null),u=t.computed(()=>{const m=[...n.value].slice(0,en);return r.value?[...m.slice(0,en-1),r.value]:m}),s=t.computed(()=>{const m=d.value||{};return Object.keys(m).length}),f=t.ref(!1),v=()=>{f.value=!0},_=()=>{f.value=!1,i.value=e.value.getFilterModel(),l.value?.showModal()},k=()=>{i.value=null,e.value.setFilterModel(null),e.value.onFilterChanged(),a.value+=1},y=()=>{i.value&&e.value.setFilterModel(i.value),i.value=null,l.value?.close()},C=()=>{e.value.onFilterChanged(),l.value?.close(),a.value+=1};return(m,b)=>(t.openBlock(),t.createElementBlock("div",Ra,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(u.value,F=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:F.field},[t.unref(e)?(t.openBlock(),t.createBlock(Jo,{key:0,"display-preferences-icon":m.displayPreferencesIcon,filterColDef:F,onHandleSettingsIcon:b[0]||(b[0]=T=>m.$emit("handle-settings-icon",T))},null,8,["display-preferences-icon","filterColDef"])):t.createCommentVNode("",!0)],64))),128)),m.enableVerticalPanel?(t.openBlock(),t.createElementBlock("button",{key:0,class:"pv-button-ghost pv-stack-8 pv-inset-block",onClick:_,style:{"--inset-size":"6px"}},[t.createVNode(t.unref(Se),{name:"filter"}),b[7]||(b[7]=t.createTextVNode(" All Filters ")),s.value>0?(t.openBlock(),t.createBlock(t.unref(Eo),{key:0,value:s.value,variant:"tertiary"},null,8,["value"])):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),m.enableVerticalPanel?(t.openBlock(),t.createElementBlock("dialog",{key:1,ref_key:"filterDrawer",ref:l,id:"filter-vertical-drawer",class:"pv-drawer pv-surface",onClick:b[6]||(b[6]=t.withModifiers(F=>y(),["self"])),style:{"max-width":"450px"}},[t.createElementVNode("div",Fa,[t.createElementVNode("div",Ta,[t.createElementVNode("div",Oa,[t.createElementVNode("p",Ma," All Filters ("+t.toDisplayString(t.unref(n).length)+") ",1),t.createElementVNode("button",{class:"pv-button-ghost",onClick:b[1]||(b[1]=F=>y())},[t.createVNode(t.unref(Se),{name:"close"})])]),t.createElementVNode("div",Pa,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(n),(F,T)=>(t.openBlock(),t.createElementBlock("div",{key:F.field,class:t.normalizeClass([{"pv-border-bottom":T<t.unref(n).length-1},"pv-stack-12"])},[t.createElementVNode("details",Na,[t.createElementVNode("summary",Aa,[t.createElementVNode("span",Ia,t.toDisplayString(F.headerName),1)]),t.createElementVNode("div",Va,[t.unref(e)?(t.openBlock(),t.createBlock(Jo,{key:0,"filter-style":"vertical",filterColDef:F,"display-preferences-icon":m.displayPreferencesIcon,onFilterSelectionChanged:v,onHandleSettingsIcon:b[2]||(b[2]=j=>m.$emit("handle-settings-icon",j))},null,8,["filterColDef","display-preferences-icon"])):t.createCommentVNode("",!0)])])],2))),128))])]),t.createElementVNode("div",$a,[t.createElementVNode("button",{class:"pv-button-ghost",onClick:b[3]||(b[3]=F=>k())}," Clear All "),t.createElementVNode("div",Ga,[t.createVNode(Ge,{variant:"ghost",onClick:b[4]||(b[4]=F=>y())},{default:t.withCtx(()=>b[8]||(b[8]=[t.createTextVNode(" Cancel ")])),_:1}),f.value?(t.openBlock(),t.createBlock(Ge,{key:0,variant:"primary",onClick:b[5]||(b[5]=F=>C())},{default:t.withCtx(()=>b[9]||(b[9]=[t.createTextVNode(" Apply ")])),_:1})):(t.openBlock(),t.createBlock(Ge,{key:1,variant:"primary",disabled:""},{default:t.withCtx(()=>b[10]||(b[10]=[t.createTextVNode(" No Changes ")])),_:1}))])])])],512)):t.createCommentVNode("",!0)]))}});function Tn(o){return o.toLocaleString(void 0,{minimumFractionDigits:0,maximumFractionDigits:2})}function On(o){const e=o.value?.value!=null?o.value.value:o.value;return e==null||e===""?"":e}function La(o){const e=On(o);return e===""?"":"$"+Tn(e)}function za(o){return On(o)===""?"":Tn(o.value*100)+"%"}const ja={class:"pv-flex"},Wa={key:0,class:"pv-flex ag-header-actions"},Ua=t.defineComponent({__name:"HeaderCellRenderer",props:{params:{}},setup(o,{expose:e}){const n=o,r=t.ref(!1),a=t.ref(!1),i=t.ref(null),d=t.ref(null),l=t.ref(null),u=t.ref(!1),s=t.computed(()=>{const T=n.params.column.getColDef();return T.sortable||T.filter||T.enableRowGroup}),f=t.inject("sortState"),v=t.computed(()=>{if(!f.value||f.value.length===0)return"";const T=f.value.find(W=>W.colId===n.params.column.getColId()),j=T?T.sort:"";return j==="asc"?"arrow-up":j==="desc"?"arrow-down":""}),_=t.computed(()=>a.value?{cursor:"pointer"}:{}),k=t.computed(()=>u.value?{opacity:1}:{}),y=()=>{u.value=!1},C=()=>{u.value=!0,l.value&&n.params.showColumnMenu(l.value,y)},m=T=>{r.value=T.enableFilterButton,a.value=T.enableSorting||!1,i.value=T.displayName,d.value=Xi(T.column.getColDef().context?.dataType),i.value=Ki(i.value,T.column.getColDef().context?.dataType)},b=()=>{a.value&&n.params.progressSort(!1)};t.onBeforeMount(()=>{m(n.params)});function F(T){return m(T),!0}return e({refresh:F}),(T,j)=>(t.openBlock(),t.createElementBlock("div",{class:"ag-custom-header-cell pv-flex pv-full-width pv-space-between",style:t.normalizeStyle(_.value),onClick:b},[t.createElementVNode("div",ja,[d.value?(t.openBlock(),t.createBlock(Se,{key:0,name:d.value,class:"pv-text-subdued"},null,8,["name"])):t.createCommentVNode("",!0),t.createElementVNode("p",null,t.toDisplayString(i.value),1),a.value&&v.value!==""?(t.openBlock(),t.createBlock(Se,{key:1,name:v.value},null,8,["name"])):t.createCommentVNode("",!0)]),s.value?(t.openBlock(),t.createElementBlock("div",Wa,[t.createElementVNode("div",{ref_key:"menuButton",ref:l,class:"ag-header-cell-menu-button",style:t.normalizeStyle(k.value)},[t.createVNode(Ge,{variant:"icon",onClick:t.withModifiers(C,["stop","prevent"])},{default:t.withCtx(()=>[t.createVNode(Se,{name:"menu"})]),_:1})],4)])):t.createCommentVNode("",!0)],4))}}),tn=Qe(Ua,[["__scopeId","data-v-a5b61e33"]]),Ya=fe.themeQuartz.withParams({headerHeight:"30px",headerBackgroundColor:"#F7F8F8",headerCellHoverBackgroundColor:"#F7F8F8",headerColumnResizeHandleHeight:"50%",headerColumnResizeHandleWidth:"3px",headerColumnBorder:"none",headerFontWeight:"bold",headerFontSize:"12px",fontFamily:"Inter, sans-serif",fontSize:12,headerRowBorder:!0,rowHoverColor:"#F7F8F8",rangeSelectionBorderColor:"#36C5BA",rangeSelectionBorderStyle:"solid",wrapperBorder:"none",wrapperBorderRadius:"0px",menuBackgroundColor:"white",accentColor:"#36C5BA"}),qa=fe.themeQuartz.withParams({headerHeight:"30px",headerBackgroundColor:"white",headerCellHoverBackgroundColor:"#F7F8F8",headerColumnResizeHandleHeight:"50%",headerColumnResizeHandleWidth:"3px",headerColumnBorder:"none",headerFontWeight:"bold",headerFontSize:"12px",fontFamily:"Inter, sans-serif",fontSize:12,headerRowBorder:!0,rowHoverColor:"#F7F8F8",rangeSelectionBorderColor:"#36C5BA",rangeSelectionBorderStyle:"solid",wrapperBorder:"none",wrapperBorderRadius:"0px",menuBackgroundColor:"white",accentColor:"#36C5BA"}),Xa={class:"pv-popover-menu"},Ka={class:"pv-popover",style:{"--height":"auto"}},Qa=["disabled"],Za=t.defineComponent({__name:"ExportMenu",props:{getCsvData:{type:Function}},setup(o){const e=o,n=t.ref(!1);async function r(){n.value=!0;const a=await e.getCsvData();if(!a){n.value=!1;return}const i=new Blob([a],{type:"text/csv;charset=utf-8;"}),d=document.createElement("a");d.href=URL.createObjectURL(i),d.setAttribute("download","datatable_export.csv"),d.click(),n.value=!1}return(a,i)=>(t.openBlock(),t.createElementBlock("nav",Xa,[i[0]||(i[0]=t.createElementVNode("button",{type:"button",class:"pv-button-icon"},[t.createElementVNode("svg",{"aria-hidden":"true",class:"pv-icon-24"},[t.createElementVNode("title",null,"ellipsis"),t.createElementVNode("use",{"xlink:href":"#ellipsis"})])],-1)),t.createElementVNode("div",Ka,[t.createElementVNode("button",{class:"pv-button pv-text-body-sm pv-inset-square-8",onClick:t.withModifiers(r,["prevent"]),disabled:n.value},[n.value?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode("Exporting...")],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode("Download CSV")],64))],8,Qa)])]))}}),Ja={key:1,class:""},el=t.defineComponent({__name:"PaginationPanel",props:{panelSize:{default:"xl"}},setup(o){fe.ModuleRegistry.registerModules([fe.EventApiModule]);const e=t.inject("gridApi"),n=t.inject("currentPage"),r=t.inject("totalPages"),a=o,i=t.computed(()=>{const s=r.value,f=n.value;if(s<=7)return Array.from({length:s},(_,k)=>k+1);const v=[];return f<=4?v.push(1,2,3,4,5,"...",s):f>=s-3?v.push(1,"...",s-4,s-3,s-2,s-1,s):v.push(1,"...",f-1,f,f+1,"...",s),v}),d=()=>{n.value>0&&e?.value.paginationGoToPage(n.value-2)},l=()=>{n.value<r.value&&e?.value.paginationGoToPage(n.value)},u=s=>{s>=1&&s<=r.value&&e?.value.paginationGoToPage(s-1)};return(s,f)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["pv-flex",{"pv-hide":t.unref(r)<=1}])},[t.createVNode(Ge,{variant:"icon",onClick:d,disabled:t.unref(n)===1,size:a.panelSize==="l"?"small":void 0},{default:t.withCtx(()=>[t.createVNode(Se,{name:"chevron-left"})]),_:1},8,["disabled","size"]),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(i.value,v=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:v},[typeof v=="number"?(t.openBlock(),t.createBlock(Ge,{key:0,variant:v===t.unref(n)?"primary":"tertiary",size:a.panelSize==="l"?"small":void 0,onClick:_=>u(v)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(v),1)]),_:2},1032,["variant","size","onClick"])):(t.openBlock(),t.createElementBlock("span",Ja,"..."))],64))),128)),t.createVNode(Ge,{variant:"icon",onClick:l,disabled:t.unref(n)===t.unref(r),size:a.panelSize==="l"?"small":void 0},{default:t.withCtx(()=>[t.createVNode(Se,{name:"chevron-right"})]),_:1},8,["disabled","size"])],2))}});function tl(){}function on(o){return Object.getOwnPropertySymbols(o).filter(e=>Object.prototype.propertyIsEnumerable.call(o,e))}function nn(o){return o==null?o===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(o)}const ol="[object RegExp]",nl="[object String]",rl="[object Number]",il="[object Boolean]",rn="[object Arguments]",al="[object Symbol]",ll="[object Date]",sl="[object Map]",ul="[object Set]",dl="[object Array]",cl="[object Function]",pl="[object ArrayBuffer]",ho="[object Object]",fl="[object Error]",vl="[object DataView]",hl="[object Uint8Array]",ml="[object Uint8ClampedArray]",gl="[object Uint16Array]",yl="[object Uint32Array]",Cl="[object BigUint64Array]",wl="[object Int8Array]",bl="[object Int16Array]",Sl="[object Int32Array]",_l="[object BigInt64Array]",kl="[object Float32Array]",Dl="[object Float64Array]";function an(o){if(!o||typeof o!="object")return!1;const e=Object.getPrototypeOf(o);return e===null||e===Object.prototype||Object.getPrototypeOf(e)===null?Object.prototype.toString.call(o)==="[object Object]":!1}function El(o,e){return o===e||Number.isNaN(o)&&Number.isNaN(e)}function xl(o,e,n){return yt(o,e,void 0,void 0,void 0,void 0,n)}function yt(o,e,n,r,a,i,d){const l=d(o,e,n,r,a,i);if(l!==void 0)return l;if(typeof o==typeof e)switch(typeof o){case"bigint":case"string":case"boolean":case"symbol":case"undefined":return o===e;case"number":return o===e||Object.is(o,e);case"function":return o===e;case"object":return kt(o,e,i,d)}return kt(o,e,i,d)}function kt(o,e,n,r){if(Object.is(o,e))return!0;let a=nn(o),i=nn(e);if(a===rn&&(a=ho),i===rn&&(i=ho),a!==i)return!1;switch(a){case nl:return o.toString()===e.toString();case rl:{const u=o.valueOf(),s=e.valueOf();return El(u,s)}case il:case ll:case al:return Object.is(o.valueOf(),e.valueOf());case ol:return o.source===e.source&&o.flags===e.flags;case cl:return o===e}n=n??new Map;const d=n.get(o),l=n.get(e);if(d!=null&&l!=null)return d===e;n.set(o,e),n.set(e,o);try{switch(a){case sl:{if(o.size!==e.size)return!1;for(const[u,s]of o.entries())if(!e.has(u)||!yt(s,e.get(u),u,o,e,n,r))return!1;return!0}case ul:{if(o.size!==e.size)return!1;const u=Array.from(o.values()),s=Array.from(e.values());for(let f=0;f<u.length;f++){const v=u[f],_=s.findIndex(k=>yt(v,k,void 0,o,e,n,r));if(_===-1)return!1;s.splice(_,1)}return!0}case dl:case hl:case ml:case gl:case yl:case Cl:case wl:case bl:case Sl:case _l:case kl:case Dl:{if(typeof Buffer<"u"&&Buffer.isBuffer(o)!==Buffer.isBuffer(e)||o.length!==e.length)return!1;for(let u=0;u<o.length;u++)if(!yt(o[u],e[u],u,o,e,n,r))return!1;return!0}case pl:return o.byteLength!==e.byteLength?!1:kt(new Uint8Array(o),new Uint8Array(e),n,r);case vl:return o.byteLength!==e.byteLength||o.byteOffset!==e.byteOffset?!1:kt(new Uint8Array(o),new Uint8Array(e),n,r);case fl:return o.name===e.name&&o.message===e.message;case ho:{if(!(kt(o.constructor,e.constructor,n,r)||an(o)&&an(e)))return!1;const s=[...Object.keys(o),...on(o)],f=[...Object.keys(e),...on(e)];if(s.length!==f.length)return!1;for(let v=0;v<s.length;v++){const _=s[v],k=o[_];if(!Object.hasOwn(e,_))return!1;const y=e[_];if(!yt(k,y,_,o,e,n,r))return!1}return!0}default:return!1}}finally{n.delete(o),n.delete(e)}}function Pt(o,e){return xl(o,e,tl)}const Bl={key:0,class:"pv-tag"},Rl=t.defineComponent({__name:"TagCellRenderer",props:{params:{}},setup(o){const e=o,n=t.computed(()=>{const r=e.params.valueFormatted||e.params.value||"";return r.trim()===""?null:r});return(r,a)=>n.value?(t.openBlock(),t.createElementBlock("div",Bl,t.toDisplayString(n.value),1)):t.createCommentVNode("",!0)}}),Fl={key:0,class:"pv-table-row-number"},Tl=t.defineComponent({__name:"RowCountCellRenderer",props:{params:{}},setup(o){const e=o,n=t.computed(()=>(e.params.node?.rowIndex||0)+1),r=t.computed(()=>{const i=e.params.column?.getColDef()?.context,d=e.params.valueFormatted||e.params.value;return i&&i.dataType&&[Ne.Currency,Ne.Percent,Ne.Number,Ne.Integer].includes(i.dataType)?d.toLocaleString():d});return(a,i)=>(t.openBlock(),t.createElementBlock("div",null,[t.createElementVNode("p",null,[n.value?(t.openBlock(),t.createElementBlock("span",Fl,t.toDisplayString(n.value),1)):t.createCommentVNode("",!0),t.createTextVNode(" "+t.toDisplayString(r.value),1)])]))}}),Ol=Qe(Tl,[["__scopeId","data-v-ae67b797"]]),Ml={style:{"background-color":"white"},class:"pv-inset-square-8 pv-bordered-md pv-text-md"},Pl={style:{color:"black"}},Nl=t.defineComponent({__name:"TableTooltip",props:{params:{}},setup(o){return(e,n)=>(t.openBlock(),t.createElementBlock("div",Ml,[t.createElementVNode("p",Pl,t.toDisplayString(e.params.value),1)]))}}),Al={class:"pv-stack-8"},Il={class:"pv-flex pv-space-between",style:{"align-items":"start"}},Vl={class:"pv-flex"},$l={key:0,class:"pv-table-overlay"},Gl={class:"pv-text-body-xs pv-text-center",style:{"padding-top":"50px"}},Hl=t.defineComponent({__name:"PvDataTable",props:{colDefs:{},rowData:{},serverSideRowHandler:{},filterValuesSetHandler:{},initialGridState:{},initialFilterValueMap:{},theme:{},displayBaseAggregationsOnly:{type:Boolean,default:!1},displayRowNumber:{type:Boolean,default:!1},displayGroupCount:{type:Boolean,default:!0},displayPreferencesIcon:{type:Boolean,default:!1},enableVerticalFilterPanel:{type:Boolean,default:!0},enableColumnVisibilitySelector:{type:Boolean,default:!1},enableGroupBySelector:{type:Boolean,default:!1},rowGroupLimit:{},groupDefaultExpanded:{default:1},isClientSideGroupOpenByDefault:{},enableCsvExport:{type:Boolean,default:!1},csvRowLimit:{default:2e4},serverSideCsvHandler:{},uniqueRowIdField:{},requireFiltersToShowData:{type:Boolean,default:!1},isLoading:{type:Boolean},containerHeight:{default:500},containerMinHeight:{default:200},debugMode:{type:Boolean,default:!1},pagination:{type:Boolean,default:!1},paginationPageSize:{default:50},rowHeight:{},tooltipShowDelay:{default:1e3},tooltipHideDelay:{},hideTable:{type:Boolean}},emits:["column-moved","column-resized","column-row-group-changed","grid-ready","filter-changed","sort-changed","filter-opened","first-data-rendered","handle-settings-icon"],setup(o,{expose:e,emit:n}){const r=[Le.ClientSideRowModelApiModule,fe.ClientSideRowModelModule,fe.ColumnApiModule,Le.ColumnMenuModule,fe.CsvExportModule,fe.GridStateModule,Le.ServerSideRowModelModule,Le.ServerSideRowModelApiModule,Le.SetFilterModule,Le.RowGroupingModule,fe.RowStyleModule,fe.PaginationModule,Le.TooltipModule];Le.LicenseManager.setLicenseKey("Using_this_{AG_Grid}_Enterprise_key_{AG-065231}_in_excess_of_the_licence_granted_is_not_permitted___Please_report_misuse_to_legal@ag-grid.com___For_help_with_changing_this_key_please_contact_info@ag-grid.com___{Turquoise_Health}_is_granted_a_{Multiple_Applications}_Developer_License_for_{3}_Front-End_JavaScript_developers___All_Front-End_JavaScript_developers_need_to_be_licensed_in_addition_to_the_ones_working_with_{AG_Grid}_Enterprise___This_key_has_been_granted_a_Deployment_License_Add-on_for_{2}_Production_Environments___This_key_works_with_{AG_Grid}_Enterprise_versions_released_before_{16_August_2025}____[v3]_[01]_MTc1NTI5ODgwMDAwMA==c042c2db0e82c322692ccb41e7b58f3e");const i=o;i.debugMode&&r.push(Le.ValidationModule);const d=t.computed(()=>({height:`${i.containerHeight}px`,minHeight:`${i.containerMinHeight}px`})),l=t.computed(()=>i.theme?i.theme:F.value.length>0?qa:Ya),u=n,s="serverSideRowHandler"in i&&i.serverSideRowHandler?{getRows:g=>{if(!W.value){g.success({rowData:[]});return}i.serverSideRowHandler?.(g)}}:null,f="filterValuesSetHandler"in i&&i.filterValuesSetHandler?async g=>{let V={...c.value};!T.value&&i.initialGridState&&(V=i.initialGridState.filter?.filterModel||{});const q=await L(g.api,g.colDef,g.column,V);g.success([...q,""])}:null,v=g=>{const V=g.node,q=g.column?.getColId();return!V.group||!q?!1:x.value.some(se=>{if(se.field===q)return!0})},_=(()=>{const g={suppressHeaderFilterButton:!0,editable:!1,sortable:!0,suppressHeaderMenuButton:!0,suppressColumnsToolPanel:!0,minWidth:200,flex:1,headerComponent:tn,cellDataType:!1,tooltipComponent:Nl,cellRendererSelector:V=>{if(i.displayRowNumber&&F.value.length===0){const q=V.api.getAllDisplayedColumns()||[],se=V.column;if(q.findIndex(_e=>_e===se)===0)return{component:Ol,params:V}}if(v(V))return{component:Ji,params:V}}};return s&&f&&(g.filterParams={values:f}),g})(),k=t.ref(void 0),y={name:"Column Filter",icon:'<span class="ag-icon ag-icon-filter"></span>',action:function(g){let V=g.column?.getColId();if(g.column&&de(g.column)&&(V=B.value?.getColId()||""),!re(V)){const se=g.api.getColumn(V)?.getColDef();se&&(b.value=se,t.nextTick(()=>{re(V)}))}}},C=(g,V)=>{const q={...g};return V.dataType===Ne.Percent&&!g.valueFormatter?q.valueFormatter=za:V.dataType===Ne.Currency&&!g.valueFormatter&&(q.valueFormatter=La),V.dataType===Ne.Tag&&!g.cellRenderer&&(q.cellRenderer=Rl),q},m=t.computed(()=>!i.colDefs||i.colDefs.length===0?[]:i.colDefs.map(g=>{const V=g.context;return V?C(g,V):g})),b=t.ref(null),F=t.ref([]),T=t.ref(!1),j=t.computed(()=>{if(F.value.length>0){const g=F.value[0],V=m.value.find(se=>se.field===g);if((!c.value||!c.value[g])&&V?.context?.filterRequiredToGroup)return V.headerName}return null}),W=t.computed(()=>(!c.value||Object.keys(c.value).length===0)&&i.requireFiltersToShowData?!1:j.value===null),Z=t.computed(()=>j.value?`Select at least one value for "${j.value}" to view data.`:"Select a filter to view data."),P=t.shallowRef(null),p=t.ref([]),{filterModel:c,filterValuesLoadingStatus:h,filterValueMap:S,filterValueSelectedMetadataMap:O,fetchFilterValues:L,filterStoreHandler:A}=To();A.value=i.filterValuesSetHandler,S.value=i.initialFilterValueMap||{};const R=t.ref(null),D=t.computed(()=>m.value.filter(g=>g.filter)),E=t.computed(()=>m.value.filter(g=>g.enableRowGroup)),x=t.computed(()=>m.value.filter(g=>g.aggFunc)),B=t.ref(null),G=t.ref({}),N=t.ref(1),$=t.ref(0);t.provide("filterModel",c),t.provide("sortState",p),t.provide("gridApi",P),t.provide("columnDisplayOrder",R),t.provide("currentlyActiveFilter",b),t.provide("availableFilterColumns",D),t.provide("availableRowGroupColumns",E),t.provide("rowGroupColumnFields",F),t.provide("groupColumnCellValueColumn",B),t.provide("expandedRows",G),t.provide("firstDataRendered",T),t.provide("filterValuesLoadingStatus",h),t.provide("displayUnfilteredTableData",W),t.provide("currentPage",N),t.provide("totalPages",$);const I=g=>{if(P.value=g.api,i.initialGridState){const V=i.initialGridState.filter?.filterModel||null;V&&P.value.setFilterModel(V)}if(F.value.length>0){const V=F.value[0];B.value=g.api.getColumn(V),g.api.setColumnsVisible([V],!1)}R.value=g.api.getAllGridColumns(),N.value=g.api.paginationGetCurrentPage()+1,$.value=g.api.paginationGetTotalPages(),u("grid-ready",g)},oe=g=>{if(P.value){const V=g.api.getFilterModel();Pt(c.value,V)||(c.value=V,u("filter-changed",g))}},ne=g=>{p.value=g.api?.getState()?.sort?.sortModel||[],u("sort-changed",g)},de=g=>g.getColId()&&g.getColId().includes("ag-Grid-AutoColumn"),ce=t.ref(!1),X=async g=>{if(!P.value){console.error("Grid API not available");return}const V=g||{route:[],purge:!0};P.value.refreshServerSide(V)},K=()=>O.value,J=async()=>{if(ce.value=!0,!P.value)return console.error("Grid API not available"),ce.value=!1,null;try{const g=i.serverSideCsvHandler,V=P.value?.getState(),q={rowGroupCols:[],valueCols:P.value?.getValueColumns().map(pe=>({id:pe.getId(),field:pe.getColDef().field,aggFunc:typeof pe.getColDef().aggFunc=="string"?pe.getColDef().aggFunc:void 0,displayName:pe.getColDef().headerName||pe.getColDef().field||""}))||[],filterModel:V?.filter?.filterModel||{},sortModel:V?.sort?.sortModel||[],pivotCols:[],pivotMode:!1,groupKeys:[],startRow:0,endRow:i.csvRowLimit};if(g){const pe={request:q,parentNode:{},api:P.value,context:void 0,success:()=>{},fail:()=>{}};return await i.serverSideCsvHandler(pe),ce.value=!1,null}const se=i.serverSideRowHandler;return se?await new Promise((pe,_e)=>{const De=P.value?.getState(),Je={request:q,parentNode:{},api:P.value,context:void 0,success:Rt=>{const Mn=P.value?.getRowGroupColumns().map(Re=>Re.getColDef().field).filter(Re=>!!Re)||[],Pn=P.value?.getAllDisplayedColumns().map(Re=>Re.getColDef().field).filter(Re=>!!Re)||[],Nn=P.value?.getValueColumns().map(Re=>Re.getColDef().field).filter(Re=>!!Re)||[],An=Array.from(new Set([...Mn,...Pn,...Nn])),In=Rt.rowData.map(Re=>{const Oo={};return An.forEach(Mo=>{const Po=Re[Mo];Oo[Mo]=Po!=null?String(Po):null}),Oo}),Vn=Zn.unparse(In);ce.value=!1,pe(Vn)},fail:()=>{ce.value=!1,_e("CSV export failed.")}};se(Je,!0)}):(console.warn("Client-side export does not return CSV string"),ce.value=!1,P.value.exportDataAsCsv(),null)}catch(g){return console.error("CSV export failed",g),ce.value=!1,null}},w=g=>{const V=B.value,q=g.api.getRowGroupColumns();F.value=[...q].map(_e=>_e.getColId());const se=q.length>0?q[0]:null;se?(B.value=se,ue.value.headerName=se.getColDef().headerName,ue.value.headerComponent=tn,ue.value.context={dataType:B.value?.getColDef().context?.dataType||null},g.api.setColumnsVisible([se.getColId()],!1)):(B.value=null,ue.value.headerName="",ue.value.headerComponent=void 0,ue.value.context=null);const pe=V?.getColId();(!se||pe!==se.getColId())&&g.api.setColumnsVisible([pe||""],!0),u("column-row-group-changed",g)},z=g=>{const V=g.column?.getColId()||"";if(V===B.value?.getColId()){g.api.setColumnsVisible([V],!1);return}},H=g=>{g.finished&&(R.value=g.api.getAllGridColumns()),u("column-moved",g)},te=g=>{g.api&&(N.value=g.api.paginationGetCurrentPage()+1,$.value=g.api.paginationGetTotalPages())},ae=g=>"allChildrenRowCount"in g&&g.allChildrenRowCount||0,re=g=>{const V=document.querySelector(`[data-horizontal-filter-field="${g}"]`);if(V){const q=V.querySelector("button");if(q)return q.click(),!0}return!1},Be=t.ref(Hi),ee=t.ref({loadingMessage:"One moment please..."}),ue=t.ref({headerName:"",minWidth:200,suppressMovable:!0,sortable:!1,pinned:"left",headerComponent:void 0,cellRendererParams:{suppressCount:!0,innerRenderer:qi,innerRendererParams:g=>({displayBaseAggregationsOnly:i.displayBaseAggregationsOnly,displayRowNumber:i.displayRowNumber,displayCount:i.displayGroupCount,formattedValue:g.valueFormatted,rowNode:g.node,api:P.value})}}),Ve=g=>{if(g.node.group)return{backgroundColor:"#F7F8F8"}},Ye={Median:g=>{const V=g.values;if(g.rowNode.leafGroup){const pe=Zo(V);return{values:V,value:pe}}const q=g.values.flatMap(pe=>pe.values||[]),se=Zo(q);return{values:q,value:se}}};t.onBeforeMount(()=>{const g=Array.isArray(i.rowData)&&i.rowData.length>0,V=typeof i.serverSideRowHandler=="function",q=typeof i.filterValuesSetHandler=="function";(g&&V||g&&q)&&console.warn("Only one of `rowData` or `serverSideRowHandler + hasFilterValuesSetHandler` params should be provided to PvDataTable, not both."),k.value=se=>{const pe=["sortAscending","sortDescending","sortUnSort","rowUnGroup","valueAggSubMenu"],_e=se.column&&de(se.column)?B.value:se.column;return _e&&_e.getColDef().filter&&pe.splice(2,0,y),pe.filter(De=>typeof De=="string"?se.defaultItems.includes(De):!0)}});const Oe=g=>{const V=P.value;if(!V)return;const q=g.filter?.filterModel||null,se=g.rowGroup?.groupColIds||null,pe=g.columnVisibility||null;q&&!Pt(q,q.value)&&V.setFilterModel(q),se&&!Pt(se,F.value)&&V.setRowGroupColumns(se),pe&&!Pt(pe,R.value)&&V.setColumnsVisible(pe.hiddenColIds,!1)};t.watch(()=>i.initialGridState,()=>{i.initialGridState&&Oe(i.initialGridState)},{deep:!0}),t.onMounted(()=>{i.initialGridState&&(c.value=i.initialGridState.filter?.filterModel||null,F.value=i.initialGridState.rowGroup?.groupColIds||[])});const Ze=g=>{T.value=!0,u("first-data-rendered",g)};e({getCsvData:J,refreshData:X,getFilterValueSelectedMetadataMap:K});const Ce=g=>s?g.rowNode.level===F.value.length-2:!1,Me=t.computed(()=>{if(!s)return i.groupDefaultExpanded});return(g,V)=>(t.openBlock(),t.createElementBlock("div",{class:"pv-full-width",style:t.normalizeStyle(d.value)},[t.createElementVNode("div",Al,[t.createElementVNode("div",Il,[D.value.length>0?(t.openBlock(),t.createBlock(Ha,{key:0,"enable-vertical-panel":g.enableVerticalFilterPanel,"display-preferences-icon":g.displayPreferencesIcon,onHandleSettingsIcon:V[0]||(V[0]=q=>g.$emit("handle-settings-icon",q))},null,8,["enable-vertical-panel","display-preferences-icon"])):t.createCommentVNode("",!0),t.createElementVNode("div",Vl,[g.enableGroupBySelector&&g.rowGroupLimit!==0?(t.openBlock(),t.createBlock(Ii,{key:0,rowGroupLimit:g.rowGroupLimit},null,8,["rowGroupLimit"])):t.createCommentVNode("",!0),g.enableCsvExport?(t.openBlock(),t.createBlock(Za,{key:1,getCsvData:J})):t.createCommentVNode("",!0)])])]),t.createElementVNode("div",{class:t.normalizeClass(["pv-relative pv-stack-8",g.hideTable?"pv-hide":""]),style:{width:"100%",height:"90%","border-bottom":"1px solid #d2d7db"}},[t.createVNode(t.unref(qn),t.mergeProps({ref:"gridRef",style:{width:"100%",height:"100%"}},t.unref(s)?{serverSideDatasource:t.unref(s)}:{},{onColumnMoved:H,onColumnRowGroupChanged:w,onColumnVisible:z,onFilterChanged:oe,onFilterOpened:V[1]||(V[1]=q=>u("filter-opened",q)),onFirstDataRendered:Ze,onGridReady:I,onPaginationChanged:te,onSortChanged:ne,aggFuncs:Ye,autoGroupColumnDef:ue.value,columnDefs:m.value,debug:g.debugMode,defaultColDef:t.unref(_),getChildCount:ae,getMainMenuItems:k.value,getRowStyle:Ve,groupDefaultExpanded:Me.value,groupDisplayType:"singleColumn",initialState:g.initialGridState,isGroupOpenByDefault:t.unref(s)?void 0:i.isClientSideGroupOpenByDefault,isServerSideGroupOpenByDefault:Ce,loading:t.unref(s)?!1:g.isLoading,loadingCellRenderer:Be.value,loadingCellRendererParams:ee.value,maxConcurrentDatasourceRequests:t.unref(s)?10:void 0,modules:r,rowData:g.rowData,rowHeight:g.rowHeight,rowModelType:t.unref(s)?"serverSide":"clientSide",serverSideInitialRowCount:t.unref(s)?1:void 0,showOpenedGroup:!0,suppressAggFuncInHeader:!0,suppressColumnMoveAnimation:!0,suppressDragLeaveHidesColumns:!0,serverSideSortAllLevels:!1,serverSideEnableClientSideSort:!1,theme:l.value,pagination:g.pagination,suppressPaginationPanel:!0,paginationPageSize:g.paginationPageSize,suppressScrollOnNewData:!0,"tooltip-show-delay":g.tooltipShowDelay,"tooltip-hide-delay":g.tooltipHideDelay}),null,16,["autoGroupColumnDef","columnDefs","debug","defaultColDef","getMainMenuItems","groupDefaultExpanded","initialState","isGroupOpenByDefault","loading","loadingCellRenderer","loadingCellRendererParams","maxConcurrentDatasourceRequests","rowData","rowHeight","rowModelType","serverSideInitialRowCount","theme","pagination","paginationPageSize","tooltip-show-delay","tooltip-hide-delay"]),W.value?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",$l,[t.createElementVNode("p",Gl,t.toDisplayString(Z.value),1)]))],2),g.pagination?(t.openBlock(),t.createBlock(el,{key:0})):t.createCommentVNode("",!0)],4))}});exports.PvDataTable=Hl;
79
+ */function hd(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),o.push.apply(o,i)}return o}function jt(e){for(var t=1;t<arguments.length;t++){var o=arguments[t]!=null?arguments[t]:{};t%2?hd(Object(o),!0).forEach(function(i){UP(e,i,o[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):hd(Object(o)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(o,i))})}return e}function Ws(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Ws=function(t){return typeof t}:Ws=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ws(e)}function UP(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function no(){return no=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(e[i]=o[i])}return e},no.apply(this,arguments)}function $P(e,t){if(e==null)return{};var o={},i=Object.keys(e),s,n;for(n=0;n<i.length;n++)s=i[n],!(t.indexOf(s)>=0)&&(o[s]=e[s]);return o}function jP(e,t){if(e==null)return{};var o=$P(e,t),i,s;if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(s=0;s<n.length;s++)i=n[s],!(t.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(o[i]=e[i])}return o}var KP="1.15.6";function Jt(e){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(e)}var ro=Jt(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),ps=Jt(/Edge/i),pd=Jt(/firefox/i),Ui=Jt(/safari/i)&&!Jt(/chrome/i)&&!Jt(/android/i),ja=Jt(/iP(ad|od|hone)/i),Gh=Jt(/chrome/i)&&Jt(/android/i),Oh={capture:!1,passive:!1};function Se(e,t,o){e.addEventListener(t,o,!ro&&Oh)}function Ce(e,t,o){e.removeEventListener(t,o,!ro&&Oh)}function yn(e,t){if(t){if(t[0]===">"&&(t=t.substring(1)),e)try{if(e.matches)return e.matches(t);if(e.msMatchesSelector)return e.msMatchesSelector(t);if(e.webkitMatchesSelector)return e.webkitMatchesSelector(t)}catch{return!1}return!1}}function Bh(e){return e.host&&e!==document&&e.host.nodeType?e.host:e.parentNode}function xt(e,t,o,i){if(e){o=o||document;do{if(t!=null&&(t[0]===">"?e.parentNode===o&&yn(e,t):yn(e,t))||i&&e===o)return e;if(e===o)break}while(e=Bh(e))}return null}var gd=/\s+/g;function at(e,t,o){if(e&&t)if(e.classList)e.classList[o?"add":"remove"](t);else{var i=(" "+e.className+" ").replace(gd," ").replace(" "+t+" "," ");e.className=(i+(o?" "+t:"")).replace(gd," ")}}function ee(e,t,o){var i=e&&e.style;if(i){if(o===void 0)return document.defaultView&&document.defaultView.getComputedStyle?o=document.defaultView.getComputedStyle(e,""):e.currentStyle&&(o=e.currentStyle),t===void 0?o:o[t];!(t in i)&&t.indexOf("webkit")===-1&&(t="-webkit-"+t),i[t]=o+(typeof o=="string"?"":"px")}}function ui(e,t){var o="";if(typeof e=="string")o=e;else do{var i=ee(e,"transform");i&&i!=="none"&&(o=i+" "+o)}while(!t&&(e=e.parentNode));var s=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return s&&new s(o)}function Nh(e,t,o){if(e){var i=e.getElementsByTagName(t),s=0,n=i.length;if(o)for(;s<n;s++)o(i[s],s);return i}return[]}function zt(){var e=document.scrollingElement;return e||document.documentElement}function Oe(e,t,o,i,s){if(!(!e.getBoundingClientRect&&e!==window)){var n,r,a,l,d,c,u;if(e!==window&&e.parentNode&&e!==zt()?(n=e.getBoundingClientRect(),r=n.top,a=n.left,l=n.bottom,d=n.right,c=n.height,u=n.width):(r=0,a=0,l=window.innerHeight,d=window.innerWidth,c=window.innerHeight,u=window.innerWidth),(t||o)&&e!==window&&(s=s||e.parentNode,!ro))do if(s&&s.getBoundingClientRect&&(ee(s,"transform")!=="none"||o&&ee(s,"position")!=="static")){var p=s.getBoundingClientRect();r-=p.top+parseInt(ee(s,"border-top-width")),a-=p.left+parseInt(ee(s,"border-left-width")),l=r+n.height,d=a+n.width;break}while(s=s.parentNode);if(i&&e!==window){var g=ui(s||e),f=g&&g.a,m=g&&g.d;g&&(r/=m,a/=f,u/=f,c/=m,l=r+c,d=a+u)}return{top:r,left:a,bottom:l,right:d,width:u,height:c}}}function fd(e,t,o){for(var i=vo(e,!0),s=Oe(e)[t];i;){var n=Oe(i)[o],r=void 0;if(r=s>=n,!r)return i;if(i===zt())break;i=vo(i,!1)}return!1}function vi(e,t,o,i){for(var s=0,n=0,r=e.children;n<r.length;){if(r[n].style.display!=="none"&&r[n]!==te.ghost&&(i||r[n]!==te.dragged)&&xt(r[n],o.draggable,e,!1)){if(s===t)return r[n];s++}n++}return null}function Ka(e,t){for(var o=e.lastElementChild;o&&(o===te.ghost||ee(o,"display")==="none"||t&&!yn(o,t));)o=o.previousElementSibling;return o||null}function Ct(e,t){var o=0;if(!e||!e.parentNode)return-1;for(;e=e.previousElementSibling;)e.nodeName.toUpperCase()!=="TEMPLATE"&&e!==te.clone&&(!t||yn(e,t))&&o++;return o}function md(e){var t=0,o=0,i=zt();if(e)do{var s=ui(e),n=s.a,r=s.d;t+=e.scrollLeft*n,o+=e.scrollTop*r}while(e!==i&&(e=e.parentNode));return[t,o]}function YP(e,t){for(var o in e)if(e.hasOwnProperty(o)){for(var i in t)if(t.hasOwnProperty(i)&&t[i]===e[o][i])return Number(o)}return-1}function vo(e,t){if(!e||!e.getBoundingClientRect)return zt();var o=e,i=!1;do if(o.clientWidth<o.scrollWidth||o.clientHeight<o.scrollHeight){var s=ee(o);if(o.clientWidth<o.scrollWidth&&(s.overflowX=="auto"||s.overflowX=="scroll")||o.clientHeight<o.scrollHeight&&(s.overflowY=="auto"||s.overflowY=="scroll")){if(!o.getBoundingClientRect||o===document.body)return zt();if(i||t)return o;i=!0}}while(o=o.parentNode);return zt()}function qP(e,t){if(e&&t)for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o]);return e}function wr(e,t){return Math.round(e.top)===Math.round(t.top)&&Math.round(e.left)===Math.round(t.left)&&Math.round(e.height)===Math.round(t.height)&&Math.round(e.width)===Math.round(t.width)}var $i;function Hh(e,t){return function(){if(!$i){var o=arguments,i=this;o.length===1?e.call(i,o[0]):e.apply(i,o),$i=setTimeout(function(){$i=void 0},t)}}}function QP(){clearTimeout($i),$i=void 0}function Vh(e,t,o){e.scrollLeft+=t,e.scrollTop+=o}function _h(e){var t=window.Polymer,o=window.jQuery||window.Zepto;return t&&t.dom?t.dom(e).cloneNode(!0):o?o(e).clone(!0)[0]:e.cloneNode(!0)}function zh(e,t,o){var i={};return Array.from(e.children).forEach(function(s){var n,r,a,l;if(!(!xt(s,t.draggable,e,!1)||s.animated||s===o)){var d=Oe(s);i.left=Math.min((n=i.left)!==null&&n!==void 0?n:1/0,d.left),i.top=Math.min((r=i.top)!==null&&r!==void 0?r:1/0,d.top),i.right=Math.max((a=i.right)!==null&&a!==void 0?a:-1/0,d.right),i.bottom=Math.max((l=i.bottom)!==null&&l!==void 0?l:-1/0,d.bottom)}}),i.width=i.right-i.left,i.height=i.bottom-i.top,i.x=i.left,i.y=i.top,i}var et="Sortable"+new Date().getTime();function XP(){var e=[],t;return{captureAnimationState:function(){if(e=[],!!this.options.animation){var i=[].slice.call(this.el.children);i.forEach(function(s){if(!(ee(s,"display")==="none"||s===te.ghost)){e.push({target:s,rect:Oe(s)});var n=jt({},e[e.length-1].rect);if(s.thisAnimationDuration){var r=ui(s,!0);r&&(n.top-=r.f,n.left-=r.e)}s.fromRect=n}})}},addAnimationState:function(i){e.push(i)},removeAnimationState:function(i){e.splice(YP(e,{target:i}),1)},animateAll:function(i){var s=this;if(!this.options.animation){clearTimeout(t),typeof i=="function"&&i();return}var n=!1,r=0;e.forEach(function(a){var l=0,d=a.target,c=d.fromRect,u=Oe(d),p=d.prevFromRect,g=d.prevToRect,f=a.rect,m=ui(d,!0);m&&(u.top-=m.f,u.left-=m.e),d.toRect=u,d.thisAnimationDuration&&wr(p,u)&&!wr(c,u)&&(f.top-u.top)/(f.left-u.left)===(c.top-u.top)/(c.left-u.left)&&(l=JP(f,p,g,s.options)),wr(u,c)||(d.prevFromRect=c,d.prevToRect=u,l||(l=s.options.animation),s.animate(d,f,u,l)),l&&(n=!0,r=Math.max(r,l),clearTimeout(d.animationResetTimer),d.animationResetTimer=setTimeout(function(){d.animationTime=0,d.prevFromRect=null,d.fromRect=null,d.prevToRect=null,d.thisAnimationDuration=null},l),d.thisAnimationDuration=l)}),clearTimeout(t),n?t=setTimeout(function(){typeof i=="function"&&i()},r):typeof i=="function"&&i(),e=[]},animate:function(i,s,n,r){if(r){ee(i,"transition",""),ee(i,"transform","");var a=ui(this.el),l=a&&a.a,d=a&&a.d,c=(s.left-n.left)/(l||1),u=(s.top-n.top)/(d||1);i.animatingX=!!c,i.animatingY=!!u,ee(i,"transform","translate3d("+c+"px,"+u+"px,0)"),this.forRepaintDummy=ZP(i),ee(i,"transition","transform "+r+"ms"+(this.options.easing?" "+this.options.easing:"")),ee(i,"transform","translate3d(0,0,0)"),typeof i.animated=="number"&&clearTimeout(i.animated),i.animated=setTimeout(function(){ee(i,"transition",""),ee(i,"transform",""),i.animated=!1,i.animatingX=!1,i.animatingY=!1},r)}}}}function ZP(e){return e.offsetWidth}function JP(e,t,o,i){return Math.sqrt(Math.pow(t.top-e.top,2)+Math.pow(t.left-e.left,2))/Math.sqrt(Math.pow(t.top-o.top,2)+Math.pow(t.left-o.left,2))*i.animation}var qo=[],Sr={initializeByDefault:!0},gs={mount:function(t){for(var o in Sr)Sr.hasOwnProperty(o)&&!(o in t)&&(t[o]=Sr[o]);qo.forEach(function(i){if(i.pluginName===t.pluginName)throw"Sortable: Cannot mount plugin ".concat(t.pluginName," more than once")}),qo.push(t)},pluginEvent:function(t,o,i){var s=this;this.eventCanceled=!1,i.cancel=function(){s.eventCanceled=!0};var n=t+"Global";qo.forEach(function(r){o[r.pluginName]&&(o[r.pluginName][n]&&o[r.pluginName][n](jt({sortable:o},i)),o.options[r.pluginName]&&o[r.pluginName][t]&&o[r.pluginName][t](jt({sortable:o},i)))})},initializePlugins:function(t,o,i,s){qo.forEach(function(a){var l=a.pluginName;if(!(!t.options[l]&&!a.initializeByDefault)){var d=new a(t,o,t.options);d.sortable=t,d.options=t.options,t[l]=d,no(i,d.defaults)}});for(var n in t.options)if(t.options.hasOwnProperty(n)){var r=this.modifyOption(t,n,t.options[n]);typeof r<"u"&&(t.options[n]=r)}},getEventProperties:function(t,o){var i={};return qo.forEach(function(s){typeof s.eventProperties=="function"&&no(i,s.eventProperties.call(o[s.pluginName],t))}),i},modifyOption:function(t,o,i){var s;return qo.forEach(function(n){t[n.pluginName]&&n.optionListeners&&typeof n.optionListeners[o]=="function"&&(s=n.optionListeners[o].call(t[n.pluginName],i))}),s}};function e0(e){var t=e.sortable,o=e.rootEl,i=e.name,s=e.targetEl,n=e.cloneEl,r=e.toEl,a=e.fromEl,l=e.oldIndex,d=e.newIndex,c=e.oldDraggableIndex,u=e.newDraggableIndex,p=e.originalEvent,g=e.putSortable,f=e.extraEventProperties;if(t=t||o&&o[et],!!t){var m,C=t.options,v="on"+i.charAt(0).toUpperCase()+i.substr(1);window.CustomEvent&&!ro&&!ps?m=new CustomEvent(i,{bubbles:!0,cancelable:!0}):(m=document.createEvent("Event"),m.initEvent(i,!0,!0)),m.to=r||o,m.from=a||o,m.item=s||o,m.clone=n,m.oldIndex=l,m.newIndex=d,m.oldDraggableIndex=c,m.newDraggableIndex=u,m.originalEvent=p,m.pullMode=g?g.lastPutMode:void 0;var S=jt(jt({},f),gs.getEventProperties(i,t));for(var b in S)m[b]=S[b];o&&o.dispatchEvent(m),C[v]&&C[v].call(t,m)}}var t0=["evt"],Ze=function(t,o){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s=i.evt,n=jP(i,t0);gs.pluginEvent.bind(te)(t,o,jt({dragEl:U,parentEl:ke,ghostEl:le,rootEl:Ae,nextEl:To,lastDownEl:Us,cloneEl:Te,cloneHidden:Co,dragStarted:Ai,putSortable:_e,activeSortable:te.active,originalEvent:s,oldIndex:ti,oldDraggableIndex:ji,newIndex:lt,newDraggableIndex:fo,hideGhostForTarget:jh,unhideGhostForTarget:Kh,cloneNowHidden:function(){Co=!0},cloneNowShown:function(){Co=!1},dispatchSortableEvent:function(a){Ye({sortable:o,name:a,originalEvent:s})}},n))};function Ye(e){e0(jt({putSortable:_e,cloneEl:Te,targetEl:U,rootEl:Ae,oldIndex:ti,oldDraggableIndex:ji,newIndex:lt,newDraggableIndex:fo},e))}var U,ke,le,Ae,To,Us,Te,Co,ti,lt,ji,fo,As,_e,Zo=!1,bn=!1,Rn=[],Do,Ft,yr,br,Cd,vd,Ai,Qo,Ki,Yi=!1,Ts=!1,$s,ze,Rr=[],ea=!1,Fn=[],Vn=typeof document<"u",Is=ja,wd=ps||ro?"cssFloat":"float",o0=Vn&&!Gh&&!ja&&"draggable"in document.createElement("div"),Wh=function(){if(Vn){if(ro)return!1;var e=document.createElement("x");return e.style.cssText="pointer-events:auto",e.style.pointerEvents==="auto"}}(),Uh=function(t,o){var i=ee(t),s=parseInt(i.width)-parseInt(i.paddingLeft)-parseInt(i.paddingRight)-parseInt(i.borderLeftWidth)-parseInt(i.borderRightWidth),n=vi(t,0,o),r=vi(t,1,o),a=n&&ee(n),l=r&&ee(r),d=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+Oe(n).width,c=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+Oe(r).width;if(i.display==="flex")return i.flexDirection==="column"||i.flexDirection==="column-reverse"?"vertical":"horizontal";if(i.display==="grid")return i.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(n&&a.float&&a.float!=="none"){var u=a.float==="left"?"left":"right";return r&&(l.clear==="both"||l.clear===u)?"vertical":"horizontal"}return n&&(a.display==="block"||a.display==="flex"||a.display==="table"||a.display==="grid"||d>=s&&i[wd]==="none"||r&&i[wd]==="none"&&d+c>s)?"vertical":"horizontal"},i0=function(t,o,i){var s=i?t.left:t.top,n=i?t.right:t.bottom,r=i?t.width:t.height,a=i?o.left:o.top,l=i?o.right:o.bottom,d=i?o.width:o.height;return s===a||n===l||s+r/2===a+d/2},s0=function(t,o){var i;return Rn.some(function(s){var n=s[et].options.emptyInsertThreshold;if(!(!n||Ka(s))){var r=Oe(s),a=t>=r.left-n&&t<=r.right+n,l=o>=r.top-n&&o<=r.bottom+n;if(a&&l)return i=s}}),i},$h=function(t){function o(n,r){return function(a,l,d,c){var u=a.options.group.name&&l.options.group.name&&a.options.group.name===l.options.group.name;if(n==null&&(r||u))return!0;if(n==null||n===!1)return!1;if(r&&n==="clone")return n;if(typeof n=="function")return o(n(a,l,d,c),r)(a,l,d,c);var p=(r?a:l).options.group.name;return n===!0||typeof n=="string"&&n===p||n.join&&n.indexOf(p)>-1}}var i={},s=t.group;(!s||Ws(s)!="object")&&(s={name:s}),i.name=s.name,i.checkPull=o(s.pull,!0),i.checkPut=o(s.put),i.revertClone=s.revertClone,t.group=i},jh=function(){!Wh&&le&&ee(le,"display","none")},Kh=function(){!Wh&&le&&ee(le,"display","")};Vn&&!Gh&&document.addEventListener("click",function(e){if(bn)return e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),bn=!1,!1},!0);var Mo=function(t){if(U){t=t.touches?t.touches[0]:t;var o=s0(t.clientX,t.clientY);if(o){var i={};for(var s in t)t.hasOwnProperty(s)&&(i[s]=t[s]);i.target=i.rootEl=o,i.preventDefault=void 0,i.stopPropagation=void 0,o[et]._onDragOver(i)}}},n0=function(t){U&&U.parentNode[et]._isOutsideThisEl(t.target)};function te(e,t){if(!(e&&e.nodeType&&e.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(e));this.el=e,this.options=t=no({},t),e[et]=this;var o={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(e.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Uh(e,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(r,a){r.setData("Text",a.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:te.supportPointer!==!1&&"PointerEvent"in window&&(!Ui||ja),emptyInsertThreshold:5};gs.initializePlugins(this,e,o);for(var i in o)!(i in t)&&(t[i]=o[i]);$h(t);for(var s in this)s.charAt(0)==="_"&&typeof this[s]=="function"&&(this[s]=this[s].bind(this));this.nativeDraggable=t.forceFallback?!1:o0,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?Se(e,"pointerdown",this._onTapStart):(Se(e,"mousedown",this._onTapStart),Se(e,"touchstart",this._onTapStart)),this.nativeDraggable&&(Se(e,"dragover",this),Se(e,"dragenter",this)),Rn.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),no(this,XP())}te.prototype={constructor:te,_isOutsideThisEl:function(t){!this.el.contains(t)&&t!==this.el&&(Qo=null)},_getDirection:function(t,o){return typeof this.options.direction=="function"?this.options.direction.call(this,t,o,U):this.options.direction},_onTapStart:function(t){if(t.cancelable){var o=this,i=this.el,s=this.options,n=s.preventOnFilter,r=t.type,a=t.touches&&t.touches[0]||t.pointerType&&t.pointerType==="touch"&&t,l=(a||t).target,d=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||l,c=s.filter;if(p0(i),!U&&!(/mousedown|pointerdown/.test(r)&&t.button!==0||s.disabled)&&!d.isContentEditable&&!(!this.nativeDraggable&&Ui&&l&&l.tagName.toUpperCase()==="SELECT")&&(l=xt(l,s.draggable,i,!1),!(l&&l.animated)&&Us!==l)){if(ti=Ct(l),ji=Ct(l,s.draggable),typeof c=="function"){if(c.call(this,t,l,this)){Ye({sortable:o,rootEl:d,name:"filter",targetEl:l,toEl:i,fromEl:i}),Ze("filter",o,{evt:t}),n&&t.preventDefault();return}}else if(c&&(c=c.split(",").some(function(u){if(u=xt(d,u.trim(),i,!1),u)return Ye({sortable:o,rootEl:u,name:"filter",targetEl:l,fromEl:i,toEl:i}),Ze("filter",o,{evt:t}),!0}),c)){n&&t.preventDefault();return}s.handle&&!xt(d,s.handle,i,!1)||this._prepareDragStart(t,a,l)}}},_prepareDragStart:function(t,o,i){var s=this,n=s.el,r=s.options,a=n.ownerDocument,l;if(i&&!U&&i.parentNode===n){var d=Oe(i);if(Ae=n,U=i,ke=U.parentNode,To=U.nextSibling,Us=i,As=r.group,te.dragged=U,Do={target:U,clientX:(o||t).clientX,clientY:(o||t).clientY},Cd=Do.clientX-d.left,vd=Do.clientY-d.top,this._lastX=(o||t).clientX,this._lastY=(o||t).clientY,U.style["will-change"]="all",l=function(){if(Ze("delayEnded",s,{evt:t}),te.eventCanceled){s._onDrop();return}s._disableDelayedDragEvents(),!pd&&s.nativeDraggable&&(U.draggable=!0),s._triggerDragStart(t,o),Ye({sortable:s,name:"choose",originalEvent:t}),at(U,r.chosenClass,!0)},r.ignore.split(",").forEach(function(c){Nh(U,c.trim(),Fr)}),Se(a,"dragover",Mo),Se(a,"mousemove",Mo),Se(a,"touchmove",Mo),r.supportPointer?(Se(a,"pointerup",s._onDrop),!this.nativeDraggable&&Se(a,"pointercancel",s._onDrop)):(Se(a,"mouseup",s._onDrop),Se(a,"touchend",s._onDrop),Se(a,"touchcancel",s._onDrop)),pd&&this.nativeDraggable&&(this.options.touchStartThreshold=4,U.draggable=!0),Ze("delayStart",this,{evt:t}),r.delay&&(!r.delayOnTouchOnly||o)&&(!this.nativeDraggable||!(ps||ro))){if(te.eventCanceled){this._onDrop();return}r.supportPointer?(Se(a,"pointerup",s._disableDelayedDrag),Se(a,"pointercancel",s._disableDelayedDrag)):(Se(a,"mouseup",s._disableDelayedDrag),Se(a,"touchend",s._disableDelayedDrag),Se(a,"touchcancel",s._disableDelayedDrag)),Se(a,"mousemove",s._delayedDragTouchMoveHandler),Se(a,"touchmove",s._delayedDragTouchMoveHandler),r.supportPointer&&Se(a,"pointermove",s._delayedDragTouchMoveHandler),s._dragStartTimer=setTimeout(l,r.delay)}else l()}},_delayedDragTouchMoveHandler:function(t){var o=t.touches?t.touches[0]:t;Math.max(Math.abs(o.clientX-this._lastX),Math.abs(o.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){U&&Fr(U),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;Ce(t,"mouseup",this._disableDelayedDrag),Ce(t,"touchend",this._disableDelayedDrag),Ce(t,"touchcancel",this._disableDelayedDrag),Ce(t,"pointerup",this._disableDelayedDrag),Ce(t,"pointercancel",this._disableDelayedDrag),Ce(t,"mousemove",this._delayedDragTouchMoveHandler),Ce(t,"touchmove",this._delayedDragTouchMoveHandler),Ce(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,o){o=o||t.pointerType=="touch"&&t,!this.nativeDraggable||o?this.options.supportPointer?Se(document,"pointermove",this._onTouchMove):o?Se(document,"touchmove",this._onTouchMove):Se(document,"mousemove",this._onTouchMove):(Se(U,"dragend",this),Se(Ae,"dragstart",this._onDragStart));try{document.selection?js(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(t,o){if(Zo=!1,Ae&&U){Ze("dragStarted",this,{evt:o}),this.nativeDraggable&&Se(document,"dragover",n0);var i=this.options;!t&&at(U,i.dragClass,!1),at(U,i.ghostClass,!0),te.active=this,t&&this._appendGhost(),Ye({sortable:this,name:"start",originalEvent:o})}else this._nulling()},_emulateDragOver:function(){if(Ft){this._lastX=Ft.clientX,this._lastY=Ft.clientY,jh();for(var t=document.elementFromPoint(Ft.clientX,Ft.clientY),o=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(Ft.clientX,Ft.clientY),t!==o);)o=t;if(U.parentNode[et]._isOutsideThisEl(t),o)do{if(o[et]){var i=void 0;if(i=o[et]._onDragOver({clientX:Ft.clientX,clientY:Ft.clientY,target:t,rootEl:o}),i&&!this.options.dragoverBubble)break}t=o}while(o=Bh(o));Kh()}},_onTouchMove:function(t){if(Do){var o=this.options,i=o.fallbackTolerance,s=o.fallbackOffset,n=t.touches?t.touches[0]:t,r=le&&ui(le,!0),a=le&&r&&r.a,l=le&&r&&r.d,d=Is&&ze&&md(ze),c=(n.clientX-Do.clientX+s.x)/(a||1)+(d?d[0]-Rr[0]:0)/(a||1),u=(n.clientY-Do.clientY+s.y)/(l||1)+(d?d[1]-Rr[1]:0)/(l||1);if(!te.active&&!Zo){if(i&&Math.max(Math.abs(n.clientX-this._lastX),Math.abs(n.clientY-this._lastY))<i)return;this._onDragStart(t,!0)}if(le){r?(r.e+=c-(yr||0),r.f+=u-(br||0)):r={a:1,b:0,c:0,d:1,e:c,f:u};var p="matrix(".concat(r.a,",").concat(r.b,",").concat(r.c,",").concat(r.d,",").concat(r.e,",").concat(r.f,")");ee(le,"webkitTransform",p),ee(le,"mozTransform",p),ee(le,"msTransform",p),ee(le,"transform",p),yr=c,br=u,Ft=n}t.cancelable&&t.preventDefault()}},_appendGhost:function(){if(!le){var t=this.options.fallbackOnBody?document.body:Ae,o=Oe(U,!0,Is,!0,t),i=this.options;if(Is){for(ze=t;ee(ze,"position")==="static"&&ee(ze,"transform")==="none"&&ze!==document;)ze=ze.parentNode;ze!==document.body&&ze!==document.documentElement?(ze===document&&(ze=zt()),o.top+=ze.scrollTop,o.left+=ze.scrollLeft):ze=zt(),Rr=md(ze)}le=U.cloneNode(!0),at(le,i.ghostClass,!1),at(le,i.fallbackClass,!0),at(le,i.dragClass,!0),ee(le,"transition",""),ee(le,"transform",""),ee(le,"box-sizing","border-box"),ee(le,"margin",0),ee(le,"top",o.top),ee(le,"left",o.left),ee(le,"width",o.width),ee(le,"height",o.height),ee(le,"opacity","0.8"),ee(le,"position",Is?"absolute":"fixed"),ee(le,"zIndex","100000"),ee(le,"pointerEvents","none"),te.ghost=le,t.appendChild(le),ee(le,"transform-origin",Cd/parseInt(le.style.width)*100+"% "+vd/parseInt(le.style.height)*100+"%")}},_onDragStart:function(t,o){var i=this,s=t.dataTransfer,n=i.options;if(Ze("dragStart",this,{evt:t}),te.eventCanceled){this._onDrop();return}Ze("setupClone",this),te.eventCanceled||(Te=_h(U),Te.removeAttribute("id"),Te.draggable=!1,Te.style["will-change"]="",this._hideClone(),at(Te,this.options.chosenClass,!1),te.clone=Te),i.cloneId=js(function(){Ze("clone",i),!te.eventCanceled&&(i.options.removeCloneOnHide||Ae.insertBefore(Te,U),i._hideClone(),Ye({sortable:i,name:"clone"}))}),!o&&at(U,n.dragClass,!0),o?(bn=!0,i._loopId=setInterval(i._emulateDragOver,50)):(Ce(document,"mouseup",i._onDrop),Ce(document,"touchend",i._onDrop),Ce(document,"touchcancel",i._onDrop),s&&(s.effectAllowed="move",n.setData&&n.setData.call(i,s,U)),Se(document,"drop",i),ee(U,"transform","translateZ(0)")),Zo=!0,i._dragStartId=js(i._dragStarted.bind(i,o,t)),Se(document,"selectstart",i),Ai=!0,window.getSelection().removeAllRanges(),Ui&&ee(document.body,"user-select","none")},_onDragOver:function(t){var o=this.el,i=t.target,s,n,r,a=this.options,l=a.group,d=te.active,c=As===l,u=a.sort,p=_e||d,g,f=this,m=!1;if(ea)return;function C(N,L){Ze(N,f,jt({evt:t,isOwner:c,axis:g?"vertical":"horizontal",revert:r,dragRect:s,targetRect:n,canSort:u,fromSortable:p,target:i,completed:S,onMove:function(W,q){return Ls(Ae,o,U,s,W,Oe(W),t,q)},changed:b},L))}function v(){C("dragOverAnimationCapture"),f.captureAnimationState(),f!==p&&p.captureAnimationState()}function S(N){return C("dragOverCompleted",{insertion:N}),N&&(c?d._hideClone():d._showClone(f),f!==p&&(at(U,_e?_e.options.ghostClass:d.options.ghostClass,!1),at(U,a.ghostClass,!0)),_e!==f&&f!==te.active?_e=f:f===te.active&&_e&&(_e=null),p===f&&(f._ignoreWhileAnimating=i),f.animateAll(function(){C("dragOverAnimationComplete"),f._ignoreWhileAnimating=null}),f!==p&&(p.animateAll(),p._ignoreWhileAnimating=null)),(i===U&&!U.animated||i===o&&!i.animated)&&(Qo=null),!a.dragoverBubble&&!t.rootEl&&i!==document&&(U.parentNode[et]._isOutsideThisEl(t.target),!N&&Mo(t)),!a.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),m=!0}function b(){lt=Ct(U),fo=Ct(U,a.draggable),Ye({sortable:f,name:"change",toEl:o,newIndex:lt,newDraggableIndex:fo,originalEvent:t})}if(t.preventDefault!==void 0&&t.cancelable&&t.preventDefault(),i=xt(i,a.draggable,o,!0),C("dragOver"),te.eventCanceled)return m;if(U.contains(t.target)||i.animated&&i.animatingX&&i.animatingY||f._ignoreWhileAnimating===i)return S(!1);if(bn=!1,d&&!a.disabled&&(c?u||(r=ke!==Ae):_e===this||(this.lastPutMode=As.checkPull(this,d,U,t))&&l.checkPut(this,d,U,t))){if(g=this._getDirection(t,i)==="vertical",s=Oe(U),C("dragOverValid"),te.eventCanceled)return m;if(r)return ke=Ae,v(),this._hideClone(),C("revert"),te.eventCanceled||(To?Ae.insertBefore(U,To):Ae.appendChild(U)),S(!0);var x=Ka(o,a.draggable);if(!x||d0(t,g,this)&&!x.animated){if(x===U)return S(!1);if(x&&o===t.target&&(i=x),i&&(n=Oe(i)),Ls(Ae,o,U,s,i,n,t,!!i)!==!1)return v(),x&&x.nextSibling?o.insertBefore(U,x.nextSibling):o.appendChild(U),ke=o,b(),S(!0)}else if(x&&l0(t,g,this)){var T=vi(o,0,a,!0);if(T===U)return S(!1);if(i=T,n=Oe(i),Ls(Ae,o,U,s,i,n,t,!1)!==!1)return v(),o.insertBefore(U,T),ke=o,b(),S(!0)}else if(i.parentNode===o){n=Oe(i);var A=0,P,y=U.parentNode!==o,w=!i0(U.animated&&U.toRect||s,i.animated&&i.toRect||n,g),R=g?"top":"left",F=fd(i,"top","top")||fd(U,"top","top"),H=F?F.scrollTop:void 0;Qo!==i&&(P=n[R],Yi=!1,Ts=!w&&a.invertSwap||y),A=c0(t,i,n,g,w?1:a.swapThreshold,a.invertedSwapThreshold==null?a.swapThreshold:a.invertedSwapThreshold,Ts,Qo===i);var z;if(A!==0){var k=Ct(U);do k-=A,z=ke.children[k];while(z&&(ee(z,"display")==="none"||z===le))}if(A===0||z===i)return S(!1);Qo=i,Ki=A;var V=i.nextElementSibling,G=!1;G=A===1;var B=Ls(Ae,o,U,s,i,n,t,G);if(B!==!1)return(B===1||B===-1)&&(G=B===1),ea=!0,setTimeout(a0,30),v(),G&&!V?o.appendChild(U):i.parentNode.insertBefore(U,G?V:i),F&&Vh(F,0,H-F.scrollTop),ke=U.parentNode,P!==void 0&&!Ts&&($s=Math.abs(P-Oe(i)[R])),b(),S(!0)}if(o.contains(U))return S(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){Ce(document,"mousemove",this._onTouchMove),Ce(document,"touchmove",this._onTouchMove),Ce(document,"pointermove",this._onTouchMove),Ce(document,"dragover",Mo),Ce(document,"mousemove",Mo),Ce(document,"touchmove",Mo)},_offUpEvents:function(){var t=this.el.ownerDocument;Ce(t,"mouseup",this._onDrop),Ce(t,"touchend",this._onDrop),Ce(t,"pointerup",this._onDrop),Ce(t,"pointercancel",this._onDrop),Ce(t,"touchcancel",this._onDrop),Ce(document,"selectstart",this)},_onDrop:function(t){var o=this.el,i=this.options;if(lt=Ct(U),fo=Ct(U,i.draggable),Ze("drop",this,{evt:t}),ke=U&&U.parentNode,lt=Ct(U),fo=Ct(U,i.draggable),te.eventCanceled){this._nulling();return}Zo=!1,Ts=!1,Yi=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),ta(this.cloneId),ta(this._dragStartId),this.nativeDraggable&&(Ce(document,"drop",this),Ce(o,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),Ui&&ee(document.body,"user-select",""),ee(U,"transform",""),t&&(Ai&&(t.cancelable&&t.preventDefault(),!i.dropBubble&&t.stopPropagation()),le&&le.parentNode&&le.parentNode.removeChild(le),(Ae===ke||_e&&_e.lastPutMode!=="clone")&&Te&&Te.parentNode&&Te.parentNode.removeChild(Te),U&&(this.nativeDraggable&&Ce(U,"dragend",this),Fr(U),U.style["will-change"]="",Ai&&!Zo&&at(U,_e?_e.options.ghostClass:this.options.ghostClass,!1),at(U,this.options.chosenClass,!1),Ye({sortable:this,name:"unchoose",toEl:ke,newIndex:null,newDraggableIndex:null,originalEvent:t}),Ae!==ke?(lt>=0&&(Ye({rootEl:ke,name:"add",toEl:ke,fromEl:Ae,originalEvent:t}),Ye({sortable:this,name:"remove",toEl:ke,originalEvent:t}),Ye({rootEl:ke,name:"sort",toEl:ke,fromEl:Ae,originalEvent:t}),Ye({sortable:this,name:"sort",toEl:ke,originalEvent:t})),_e&&_e.save()):lt!==ti&&lt>=0&&(Ye({sortable:this,name:"update",toEl:ke,originalEvent:t}),Ye({sortable:this,name:"sort",toEl:ke,originalEvent:t})),te.active&&((lt==null||lt===-1)&&(lt=ti,fo=ji),Ye({sortable:this,name:"end",toEl:ke,originalEvent:t}),this.save()))),this._nulling()},_nulling:function(){Ze("nulling",this),Ae=U=ke=le=To=Te=Us=Co=Do=Ft=Ai=lt=fo=ti=ji=Qo=Ki=_e=As=te.dragged=te.ghost=te.clone=te.active=null,Fn.forEach(function(t){t.checked=!0}),Fn.length=yr=br=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":U&&(this._onDragOver(t),r0(t));break;case"selectstart":t.preventDefault();break}},toArray:function(){for(var t=[],o,i=this.el.children,s=0,n=i.length,r=this.options;s<n;s++)o=i[s],xt(o,r.draggable,this.el,!1)&&t.push(o.getAttribute(r.dataIdAttr)||h0(o));return t},sort:function(t,o){var i={},s=this.el;this.toArray().forEach(function(n,r){var a=s.children[r];xt(a,this.options.draggable,s,!1)&&(i[n]=a)},this),o&&this.captureAnimationState(),t.forEach(function(n){i[n]&&(s.removeChild(i[n]),s.appendChild(i[n]))}),o&&this.animateAll()},save:function(){var t=this.options.store;t&&t.set&&t.set(this)},closest:function(t,o){return xt(t,o||this.options.draggable,this.el,!1)},option:function(t,o){var i=this.options;if(o===void 0)return i[t];var s=gs.modifyOption(this,t,o);typeof s<"u"?i[t]=s:i[t]=o,t==="group"&&$h(i)},destroy:function(){Ze("destroy",this);var t=this.el;t[et]=null,Ce(t,"mousedown",this._onTapStart),Ce(t,"touchstart",this._onTapStart),Ce(t,"pointerdown",this._onTapStart),this.nativeDraggable&&(Ce(t,"dragover",this),Ce(t,"dragenter",this)),Array.prototype.forEach.call(t.querySelectorAll("[draggable]"),function(o){o.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),Rn.splice(Rn.indexOf(this.el),1),this.el=t=null},_hideClone:function(){if(!Co){if(Ze("hideClone",this),te.eventCanceled)return;ee(Te,"display","none"),this.options.removeCloneOnHide&&Te.parentNode&&Te.parentNode.removeChild(Te),Co=!0}},_showClone:function(t){if(t.lastPutMode!=="clone"){this._hideClone();return}if(Co){if(Ze("showClone",this),te.eventCanceled)return;U.parentNode==Ae&&!this.options.group.revertClone?Ae.insertBefore(Te,U):To?Ae.insertBefore(Te,To):Ae.appendChild(Te),this.options.group.revertClone&&this.animate(U,Te),ee(Te,"display",""),Co=!1}}};function r0(e){e.dataTransfer&&(e.dataTransfer.dropEffect="move"),e.cancelable&&e.preventDefault()}function Ls(e,t,o,i,s,n,r,a){var l,d=e[et],c=d.options.onMove,u;return window.CustomEvent&&!ro&&!ps?l=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(l=document.createEvent("Event"),l.initEvent("move",!0,!0)),l.to=t,l.from=e,l.dragged=o,l.draggedRect=i,l.related=s||t,l.relatedRect=n||Oe(t),l.willInsertAfter=a,l.originalEvent=r,e.dispatchEvent(l),c&&(u=c.call(d,l,r)),u}function Fr(e){e.draggable=!1}function a0(){ea=!1}function l0(e,t,o){var i=Oe(vi(o.el,0,o.options,!0)),s=zh(o.el,o.options,le),n=10;return t?e.clientX<s.left-n||e.clientY<i.top&&e.clientX<i.right:e.clientY<s.top-n||e.clientY<i.bottom&&e.clientX<i.left}function d0(e,t,o){var i=Oe(Ka(o.el,o.options.draggable)),s=zh(o.el,o.options,le),n=10;return t?e.clientX>s.right+n||e.clientY>i.bottom&&e.clientX>i.left:e.clientY>s.bottom+n||e.clientX>i.right&&e.clientY>i.top}function c0(e,t,o,i,s,n,r,a){var l=i?e.clientY:e.clientX,d=i?o.height:o.width,c=i?o.top:o.left,u=i?o.bottom:o.right,p=!1;if(!r){if(a&&$s<d*s){if(!Yi&&(Ki===1?l>c+d*n/2:l<u-d*n/2)&&(Yi=!0),Yi)p=!0;else if(Ki===1?l<c+$s:l>u-$s)return-Ki}else if(l>c+d*(1-s)/2&&l<u-d*(1-s)/2)return u0(t)}return p=p||r,p&&(l<c+d*n/2||l>u-d*n/2)?l>c+d/2?1:-1:0}function u0(e){return Ct(U)<Ct(e)?1:-1}function h0(e){for(var t=e.tagName+e.className+e.src+e.href+e.textContent,o=t.length,i=0;o--;)i+=t.charCodeAt(o);return i.toString(36)}function p0(e){Fn.length=0;for(var t=e.getElementsByTagName("input"),o=t.length;o--;){var i=t[o];i.checked&&Fn.push(i)}}function js(e){return setTimeout(e,0)}function ta(e){return clearTimeout(e)}Vn&&Se(document,"touchmove",function(e){(te.active||Zo)&&e.cancelable&&e.preventDefault()});te.utils={on:Se,off:Ce,css:ee,find:Nh,is:function(t,o){return!!xt(t,o,t,!1)},extend:qP,throttle:Hh,closest:xt,toggleClass:at,clone:_h,index:Ct,nextTick:js,cancelNextTick:ta,detectDirection:Uh,getChild:vi,expando:et};te.get=function(e){return e[et]};te.mount=function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];t[0].constructor===Array&&(t=t[0]),t.forEach(function(i){if(!i.prototype||!i.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(i));i.utils&&(te.utils=jt(jt({},te.utils),i.utils)),gs.mount(i)})};te.create=function(e,t){return new te(e,t)};te.version=KP;var Ge=[],Ti,oa,ia=!1,xr,Dr,xn,Ii;function g0(){function e(){this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0};for(var t in this)t.charAt(0)==="_"&&typeof this[t]=="function"&&(this[t]=this[t].bind(this))}return e.prototype={dragStarted:function(o){var i=o.originalEvent;this.sortable.nativeDraggable?Se(document,"dragover",this._handleAutoScroll):this.options.supportPointer?Se(document,"pointermove",this._handleFallbackAutoScroll):i.touches?Se(document,"touchmove",this._handleFallbackAutoScroll):Se(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(o){var i=o.originalEvent;!this.options.dragOverBubble&&!i.rootEl&&this._handleAutoScroll(i)},drop:function(){this.sortable.nativeDraggable?Ce(document,"dragover",this._handleAutoScroll):(Ce(document,"pointermove",this._handleFallbackAutoScroll),Ce(document,"touchmove",this._handleFallbackAutoScroll),Ce(document,"mousemove",this._handleFallbackAutoScroll)),Sd(),Ks(),QP()},nulling:function(){xn=oa=Ti=ia=Ii=xr=Dr=null,Ge.length=0},_handleFallbackAutoScroll:function(o){this._handleAutoScroll(o,!0)},_handleAutoScroll:function(o,i){var s=this,n=(o.touches?o.touches[0]:o).clientX,r=(o.touches?o.touches[0]:o).clientY,a=document.elementFromPoint(n,r);if(xn=o,i||this.options.forceAutoScrollFallback||ps||ro||Ui){Mr(o,this.options,a,i);var l=vo(a,!0);ia&&(!Ii||n!==xr||r!==Dr)&&(Ii&&Sd(),Ii=setInterval(function(){var d=vo(document.elementFromPoint(n,r),!0);d!==l&&(l=d,Ks()),Mr(o,s.options,d,i)},10),xr=n,Dr=r)}else{if(!this.options.bubbleScroll||vo(a,!0)===zt()){Ks();return}Mr(o,this.options,vo(a,!1),!1)}}},no(e,{pluginName:"scroll",initializeByDefault:!0})}function Ks(){Ge.forEach(function(e){clearInterval(e.pid)}),Ge=[]}function Sd(){clearInterval(Ii)}var Mr=Hh(function(e,t,o,i){if(t.scroll){var s=(e.touches?e.touches[0]:e).clientX,n=(e.touches?e.touches[0]:e).clientY,r=t.scrollSensitivity,a=t.scrollSpeed,l=zt(),d=!1,c;oa!==o&&(oa=o,Ks(),Ti=t.scroll,c=t.scrollFn,Ti===!0&&(Ti=vo(o,!0)));var u=0,p=Ti;do{var g=p,f=Oe(g),m=f.top,C=f.bottom,v=f.left,S=f.right,b=f.width,x=f.height,T=void 0,A=void 0,P=g.scrollWidth,y=g.scrollHeight,w=ee(g),R=g.scrollLeft,F=g.scrollTop;g===l?(T=b<P&&(w.overflowX==="auto"||w.overflowX==="scroll"||w.overflowX==="visible"),A=x<y&&(w.overflowY==="auto"||w.overflowY==="scroll"||w.overflowY==="visible")):(T=b<P&&(w.overflowX==="auto"||w.overflowX==="scroll"),A=x<y&&(w.overflowY==="auto"||w.overflowY==="scroll"));var H=T&&(Math.abs(S-s)<=r&&R+b<P)-(Math.abs(v-s)<=r&&!!R),z=A&&(Math.abs(C-n)<=r&&F+x<y)-(Math.abs(m-n)<=r&&!!F);if(!Ge[u])for(var k=0;k<=u;k++)Ge[k]||(Ge[k]={});(Ge[u].vx!=H||Ge[u].vy!=z||Ge[u].el!==g)&&(Ge[u].el=g,Ge[u].vx=H,Ge[u].vy=z,clearInterval(Ge[u].pid),(H!=0||z!=0)&&(d=!0,Ge[u].pid=setInterval(function(){i&&this.layer===0&&te.active._onTouchMove(xn);var V=Ge[this.layer].vy?Ge[this.layer].vy*a:0,G=Ge[this.layer].vx?Ge[this.layer].vx*a:0;typeof c=="function"&&c.call(te.dragged.parentNode[et],G,V,e,xn,Ge[this.layer].el)!=="continue"||Vh(Ge[this.layer].el,G,V)}.bind({layer:u}),24))),u++}while(t.bubbleScroll&&p!==l&&(p=vo(p,!1)));ia=d}},30),Yh=function(t){var o=t.originalEvent,i=t.putSortable,s=t.dragEl,n=t.activeSortable,r=t.dispatchSortableEvent,a=t.hideGhostForTarget,l=t.unhideGhostForTarget;if(o){var d=i||n;a();var c=o.changedTouches&&o.changedTouches.length?o.changedTouches[0]:o,u=document.elementFromPoint(c.clientX,c.clientY);l(),d&&!d.el.contains(u)&&(r("spill"),this.onSpill({dragEl:s,putSortable:i}))}};function Ya(){}Ya.prototype={startIndex:null,dragStart:function(t){var o=t.oldDraggableIndex;this.startIndex=o},onSpill:function(t){var o=t.dragEl,i=t.putSortable;this.sortable.captureAnimationState(),i&&i.captureAnimationState();var s=vi(this.sortable.el,this.startIndex,this.options);s?this.sortable.el.insertBefore(o,s):this.sortable.el.appendChild(o),this.sortable.animateAll(),i&&i.animateAll()},drop:Yh};no(Ya,{pluginName:"revertOnSpill"});function qa(){}qa.prototype={onSpill:function(t){var o=t.dragEl,i=t.putSortable,s=i||this.sortable;s.captureAnimationState(),o.parentNode&&o.parentNode.removeChild(o),s.animateAll()},drop:Yh};no(qa,{pluginName:"removeOnSpill"});te.mount(new g0);te.mount(qa,Ya);function f0(e,t,o={}){let i;const{document:s=VP,...n}=o,r={onUpdate:c=>{v0(t,c.oldIndex,c.newIndex,c)}},a=()=>{const c=typeof e=="string"?s?.querySelector(e):kh(e);!c||i!==void 0||(i=new te(c,{...r,...n}))},l=()=>{i?.destroy(),i=void 0},d=(c,u)=>{if(u!==void 0)i?.option(c,u);else return i?.option(c)};return NP(a),Nn(l),{stop:l,start:a,option:d}}function m0(e,t,o){const i=e.children[o];e.insertBefore(t,i)}function C0(e){e.parentNode&&e.parentNode.removeChild(e)}function v0(e,t,o,i=null){i!=null&&(C0(i.item),m0(i.from,i.item,t));const s=h.isRef(e),n=s?[...h.toValue(e)]:h.toValue(e);if(o>=0&&o<n.length){const r=n.splice(t,1)[0];h.nextTick(()=>{n.splice(o,0,r),s&&(e.value=n)})}}const w0=["data-align"],S0={key:0,role:"list",class:"pv-popover-list",ref:"popoverList"},y0=h.defineComponent({__name:"PvPopover",props:{alignment:{default:void 0},cssCustomProperties:{default:()=>({})},isList:{type:Boolean,default:!1},isSortable:{type:Boolean}},emits:["list-order-updated"],setup(e,{expose:t,emit:o}){const i=h.ref(null),s=h.useTemplateRef("popoverList"),n=e,r=o;return n.isSortable&&n.isList&&f0(s,[],{animation:150,onUpdate:()=>{const a=Array.from(s.value?.children||[]).map(l=>l.id);r("list-order-updated",a)}}),t({popoverRoot:i}),(a,l)=>(h.openBlock(),h.createElementBlock("div",{class:"pv-popover","data-align":a.alignment,style:h.normalizeStyle(a.cssCustomProperties),ref_key:"popoverRoot",ref:i},[a.isList?(h.openBlock(),h.createElementBlock("ul",S0,[h.renderSlot(a.$slots,"default",{},void 0,!0)],512)):h.renderSlot(a.$slots,"default",{key:1},void 0,!0)],12,w0))}}),Ro=(e,t)=>{const o=e.__vccOpts||e;for(const[i,s]of t)o[i]=s;return o},b0=Ro(y0,[["__scopeId","data-v-80ba65ea"]]),qh=Hn?window:void 0;function Li(e){var t;const o=h.toValue(e);return(t=o?.$el)!=null?t:o}function Jo(...e){const t=[],o=()=>{t.forEach(a=>a()),t.length=0},i=(a,l,d,c)=>(a.addEventListener(l,d,c),()=>a.removeEventListener(l,d,c)),s=h.computed(()=>{const a=ci(h.toValue(e[0])).filter(l=>l!=null);return a.every(l=>typeof l!="string")?a:void 0}),n=Ih(()=>{var a,l;return[(l=(a=s.value)==null?void 0:a.map(d=>Li(d)))!=null?l:[qh].filter(d=>d!=null),ci(h.toValue(s.value?e[1]:e[0])),ci(h.unref(s.value?e[2]:e[1])),h.toValue(s.value?e[3]:e[2])]},([a,l,d,c])=>{if(o(),!a?.length||!l?.length||!d?.length)return;const u=Ah(c)?{...c}:c;t.push(...a.flatMap(p=>l.flatMap(g=>d.map(f=>i(p,g,f,u)))))},{flush:"post"}),r=()=>{n(),o()};return Nn(o),r}let yd=!1;function bd(e,t,o={}){const{window:i=qh,ignore:s=[],capture:n=!0,detectIframe:r=!1,controls:a=!1}=o;if(!i)return a?{stop:qt,cancel:qt,trigger:qt}:qt;if(Jr&&!yd){yd=!0;const C={passive:!0};Array.from(i.document.body.children).forEach(v=>Jo(v,"click",qt,C)),Jo(i.document.documentElement,"click",qt,C)}let l=!0;const d=C=>h.toValue(s).some(v=>{if(typeof v=="string")return Array.from(i.document.querySelectorAll(v)).some(S=>S===C.target||C.composedPath().includes(S));{const S=Li(v);return S&&(C.target===S||C.composedPath().includes(S))}});function c(C){const v=h.toValue(C);return v&&v.$.subTree.shapeFlag===16}function u(C,v){const S=h.toValue(C),b=S.$.subTree&&S.$.subTree.children;return b==null||!Array.isArray(b)?!1:b.some(x=>x.el===v.target||v.composedPath().includes(x.el))}const p=C=>{const v=Li(e);if(C.target!=null&&!(!(v instanceof Element)&&c(e)&&u(e,C))&&!(!v||v===C.target||C.composedPath().includes(v))){if("detail"in C&&C.detail===0&&(l=!d(C)),!l){l=!0;return}t(C)}};let g=!1;const f=[Jo(i,"click",C=>{g||(g=!0,setTimeout(()=>{g=!1},0),p(C))},{passive:!0,capture:n}),Jo(i,"pointerdown",C=>{const v=Li(e);l=!d(C)&&!!(v&&!C.composedPath().includes(v))},{passive:!0}),r&&Jo(i,"blur",C=>{setTimeout(()=>{var v;const S=Li(e);((v=i.document.activeElement)==null?void 0:v.tagName)==="IFRAME"&&!S?.contains(i.document.activeElement)&&t(C)},0)},{passive:!0})].filter(Boolean),m=()=>f.forEach(C=>C());return a?{stop:m,cancel:()=>{l=!1},trigger:C=>{l=!0,p(C),l=!1}}:m}const R0={mounted(e,t){const o=!t.modifiers.bubble;if(typeof t.value=="function")e.__onClickOutside_stop=bd(e,t.value,{capture:o});else{const[i,s]=t.value;e.__onClickOutside_stop=bd(e,i,Object.assign({capture:o},s))}},unmounted(e){e.__onClickOutside_stop()}};function Pr(e){return typeof Window<"u"&&e instanceof Window?e.document.documentElement:typeof Document<"u"&&e instanceof Document?e.documentElement:e}function Qh(e){const t=window.getComputedStyle(e);if(t.overflowX==="scroll"||t.overflowY==="scroll"||t.overflowX==="auto"&&e.clientWidth<e.scrollWidth||t.overflowY==="auto"&&e.clientHeight<e.scrollHeight)return!0;{const o=e.parentNode;return!o||o.tagName==="BODY"?!1:Qh(o)}}function F0(e){const t=e||window.event,o=t.target;return Qh(o)?!1:t.touches.length>1?!0:(t.preventDefault&&t.preventDefault(),!1)}const Er=new WeakMap;function x0(e,t=!1){const o=h.shallowRef(t);let i=null,s="";h.watch(Th(e),a=>{const l=Pr(h.toValue(a));if(l){const d=l;if(Er.get(d)||Er.set(d,d.style.overflow),d.style.overflow!=="hidden"&&(s=d.style.overflow),d.style.overflow==="hidden")return o.value=!0;if(o.value)return d.style.overflow="hidden"}},{immediate:!0});const n=()=>{const a=Pr(h.toValue(e));!a||o.value||(Jr&&(i=Jo(a,"touchmove",l=>{F0(l)},{passive:!1})),a.style.overflow="hidden",o.value=!0)},r=()=>{const a=Pr(h.toValue(e));!a||!o.value||(Jr&&i?.(),a.style.overflow=s,Er.delete(a),o.value=!1)};return Nn(r),h.computed({get(){return o.value},set(a){a?n():r()}})}function D0(){let e=!1;const t=h.shallowRef(!1);return(o,i)=>{if(t.value=i.value,e)return;e=!0;const s=x0(o,i.value);h.watch(t,n=>s.value=n)}}D0();const M0={class:"pv-relative",style:{width:"fit-content"}},P0=["disabled"],E0={key:0,class:"pv-shimmer"},A0=h.defineComponent({__name:"PvDropdown",props:{defaultOpen:{type:Boolean,default:!1},popoverCssProperties:{},alignment:{default:void 0},isList:{type:Boolean,default:!1},isSortable:{type:Boolean},icon:{type:Boolean},disabled:{type:Boolean,default:!1},isLoading:{type:Boolean,default:!1},useTeleport:{type:Boolean,default:!1},teleportLocation:{default:"body"}},emits:["dropdown-open","dropdown-closed","list-order-updated"],setup(e,{expose:t,emit:o}){const i=e,s=o,n=h.ref(i.defaultOpen),r=h.ref(null),a=h.ref(null),l=h.ref(null),d=h.ref(null),c=()=>{r.value&&(l.value=r.value.getBoundingClientRect()),a.value?.popoverRoot&&(d.value=a.value.popoverRoot.getBoundingClientRect())},u=h.computed(()=>({"pv-hide":!n.value})),p=v=>{n.value=!n.value},g=()=>{n.value=!1};t({closeDropdown:g}),h.watch(n,v=>{v?h.nextTick(()=>{c(),s("dropdown-open")}):s("dropdown-closed")});const f=h.computed(()=>!l.value||!d.value?0:i.alignment==="right"||i.alignment==="top right"?l.value.left+l.value.width-d.value.width:l.value.left),m=h.computed(()=>!l.value||!d.value?0:i.alignment==="top"||i.alignment==="top right"?l.value.top-d.value.height:l.value.top+l.value.height),C=h.computed(()=>i.useTeleport?{...{position:"absolute",left:`${f.value}px`,top:`${m.value}px`,zIndex:10},...i.popoverCssProperties}:i.popoverCssProperties);return(v,S)=>h.withDirectives((h.openBlock(),h.createElementBlock("div",M0,[h.createElementVNode("button",{ref_key:"triggerRef",ref:r,class:h.normalizeClass({"pv-select":!v.icon,"pv-icon-button":v.icon}),style:{width:"auto"},onClick:p,disabled:v.disabled},[h.renderSlot(v.$slots,"trigger",{},()=>[S[1]||(S[1]=h.createTextVNode("Open"))],!0)],10,P0),(h.openBlock(),h.createBlock(h.Teleport,{to:v.teleportLocation,disabled:!v.useTeleport},[h.createVNode(b0,{ref_key:"popoverRef",ref:a,class:h.normalizeClass(u.value),"css-custom-properties":C.value,alignment:v.alignment,isList:v.isList,isSortable:v.isSortable,onListOrderUpdated:S[0]||(S[0]=b=>v.$emit("list-order-updated",b))},{default:h.withCtx(()=>[h.renderSlot(v.$slots,"default",{},()=>[v.isLoading?(h.openBlock(),h.createElementBlock("span",E0,"Loading...")):h.createCommentVNode("",!0)],!0)]),_:3},8,["class","css-custom-properties","alignment","isList","isSortable"])],8,["to","disabled"]))])),[[h.unref(R0),g]])}}),Xh=Ro(A0,[["__scopeId","data-v-5008b808"]]),T0=["xlink:href"],I0=[void 0,10,12,20,24,32,64],$e=h.defineComponent({__name:"PvIcon",props:{name:{},size:{}},setup(e){const t=e,o=h.computed(()=>({"pv-icon":!0,[`pv-icon-${t.size}`]:I0.includes(t.size)}));return(i,s)=>(h.openBlock(),h.createElementBlock("svg",{"aria-hidden":"true",class:h.normalizeClass(o.value)},[h.createElementVNode("use",{"xlink:href":`#${i.name}`},null,8,T0)],2))}}),L0=["disabled"],k0={key:0,class:"pv-button-loading"},G0=h.defineComponent({__name:"PvButton",props:{variant:{default:"primary"},disabled:{type:Boolean,default:!1},size:{default:void 0},inverse:{type:Boolean,default:!1},shadow:{type:Boolean,default:!1},loading:{type:Boolean,default:!1}},setup(e){const t=e,o=h.computed(()=>({[`pv-button-${t.variant}`]:!0,[`pv-button-${t.size}`]:!!t.size,"pv-button-inverse":t.inverse,"pv-button-shadow":t.shadow}));return(i,s)=>(h.openBlock(),h.createElementBlock("button",{type:"button",class:h.normalizeClass(o.value),disabled:i.disabled},[i.loading?(h.openBlock(),h.createElementBlock("span",k0)):h.renderSlot(i.$slots,"default",{key:1},void 0,!0)],10,L0))}}),Wt=Ro(G0,[["__scopeId","data-v-f00f6419"]]),O0=h.defineComponent({__name:"PvCounterBadge",props:{value:{},prefix:{default:""},variant:{default:"primary"},size:{default:"sm"},maxValue:{default:99}},setup(e){const t=e,o=h.computed(()=>t.size=="md"?"md":(t.size=="sm","sm")),i=h.computed(()=>t.maxValue&&t.value&&t.value>t.maxValue?`${t.maxValue}+`:t.value!=null?`${t.prefix}${t.value}`:"-"),s=h.computed(()=>({"pv-inline-block pv-inset-square pv-radius pv-text-center":!0,"pv-badge-md pv-text-body-xs":o.value=="md","pv-badge-sm pv-text-body-xxs":o.value=="sm","pv-surface-brand-inverse pv-text-inverse":t.variant=="primary","pv-surface pv-bordered":t.variant=="secondary","pv-surface-lighten-5":t.variant=="tertiary","pv-text-secondary":t.variant=="ghost"||t.variant=="tertiary","pv-surface":t.variant=="ghost"}));return(n,r)=>(h.openBlock(),h.createElementBlock("div",{class:h.normalizeClass(s.value)},h.toDisplayString(i.value),3))}}),Qa=Ro(O0,[["__scopeId","data-v-5afd0e59"]]),B0=["data-style"],N0=h.defineComponent({__name:"PvTag",props:{size:{default:"md"},variant:{default:"tertiary"},icon:{},label:{},showClear:{type:Boolean},rounded:{type:Boolean}},emits:["handle-close","handle-click"],setup(e){const t=e,o=h.computed(()=>{switch(t.size){case"lg":return"pv-tag-lg";case"sm":return"pv-tag-sm";default:return""}}),i=h.computed(()=>{switch(t.variant){case"primary":return"pv-tag-primary";case"tertiary":return"pv-tag-tertiary";default:return""}});return(s,n)=>(h.openBlock(),h.createElementBlock("button",{class:h.normalizeClass([i.value,o.value]),onClick:n[1]||(n[1]=r=>s.$emit("handle-click",s.label)),"data-testid":"pv-tag","data-style":s.rounded?"rounded":void 0},[s.icon?(h.openBlock(),h.createBlock($e,{key:0,"data-testid":"pv-tag-icon",name:s.icon,size:12},null,8,["name"])):h.createCommentVNode("",!0),h.createElementVNode("span",null,h.toDisplayString(s.label),1),s.showClear?(h.openBlock(),h.createBlock($e,{key:1,"data-testid":"pv-tag-close-icon",size:12,name:"close",onClick:n[0]||(n[0]=h.withModifiers(r=>s.$emit("handle-close",s.label),["stop"]))})):h.createCommentVNode("",!0)],10,B0))}});var Ys=(e=>(e.Vertical="Vertical",e.Horizontal="Horizontal",e))(Ys||{}),ki=(e=>(e.Primary="Primary",e.Secondary="Secondary",e.Tertiary="Tertiary",e))(ki||{});const H0={class:"pv-text-title-sm pv-line-clamp",style:{"--lines":"2"}},V0={key:0,class:"pv-flex"};ki.Primary,Ys.Horizontal;const _0=["data-style"],z0=h.defineComponent({__name:"PvSuggestionTag",props:{size:{default:"md"},label:{},showIcon:{type:Boolean},rounded:{type:Boolean}},emits:["handle-close","handle-click"],setup(e){const t=e,o=h.computed(()=>{switch(t.size){case"lg":return"pv-tag-lg";case"sm":return"pv-tag-sm";default:return""}});return(i,s)=>(h.openBlock(),h.createElementBlock("button",{class:h.normalizeClass(["pv-border-dashed pv-tag-secondary",o.value]),onClick:s[0]||(s[0]=n=>i.$emit("handle-click",i.label)),"data-testid":"pv-suggestion-tag","data-style":i.rounded?"rounded":void 0},[i.showIcon?(h.openBlock(),h.createBlock($e,{key:0,"data-testid":"pv-suggestion-tag-icon",name:"expand",size:12})):h.createCommentVNode("",!0),h.createElementVNode("span",null,h.toDisplayString(i.label),1)],10,_0))}}),W0={class:"pv-relative"},U0=["placeholder"],$0={key:0,"data-testid":"pv-search-input-shortcut",class:"pv-kbd"},Rd="/",j0=h.defineComponent({__name:"PvSearchInput",props:h.mergeModels({placeholder:{default:"Search"},disabled:{type:Boolean,default:!1},displayShortcut:{type:Boolean}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=e,o=h.useTemplateRef("search-input"),i=h.useModel(e,"modelValue"),s=h.computed(()=>({"pv-input-search":!0,"pv-full-width":!0,"pv-input-padded-end":!0}));return h.onMounted(()=>{t.displayShortcut&&WP(Rd,n=>{const r=n.target,a=r instanceof HTMLInputElement||r instanceof HTMLTextAreaElement||(r?.isContentEditable??!1),l=document.activeElement===o.value;(!a||l)&&(l||(n.preventDefault(),o.value?.focus()))})}),(n,r)=>(h.openBlock(),h.createElementBlock("div",W0,[h.withDirectives(h.createElementVNode("input",{ref:"search-input","onUpdate:modelValue":r[0]||(r[0]=a=>i.value=a),type:"text",class:h.normalizeClass(s.value),placeholder:n.placeholder},null,10,U0),[[h.vModelText,i.value]]),n.displayShortcut?(h.openBlock(),h.createElementBlock("kbd",$0,h.toDisplayString(Rd))):h.createCommentVNode("",!0)]))}});var qs={exports:{}},K0=qs.exports,Fd;function Y0(){return Fd||(Fd=1,function(e,t){(function(o,i){e.exports=i()})(K0,function(){var o=1e3,i=6e4,s=36e5,n="millisecond",r="second",a="minute",l="hour",d="day",c="week",u="month",p="quarter",g="year",f="date",m="Invalid Date",C=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,v=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,S={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(k){var V=["th","st","nd","rd"],G=k%100;return"["+k+(V[(G-20)%10]||V[G]||V[0])+"]"}},b=function(k,V,G){var B=String(k);return!B||B.length>=V?k:""+Array(V+1-B.length).join(G)+k},x={s:b,z:function(k){var V=-k.utcOffset(),G=Math.abs(V),B=Math.floor(G/60),N=G%60;return(V<=0?"+":"-")+b(B,2,"0")+":"+b(N,2,"0")},m:function k(V,G){if(V.date()<G.date())return-k(G,V);var B=12*(G.year()-V.year())+(G.month()-V.month()),N=V.clone().add(B,u),L=G-N<0,Y=V.clone().add(B+(L?-1:1),u);return+(-(B+(G-N)/(L?N-Y:Y-N))||0)},a:function(k){return k<0?Math.ceil(k)||0:Math.floor(k)},p:function(k){return{M:u,y:g,w:c,d,D:f,h:l,m:a,s:r,ms:n,Q:p}[k]||String(k||"").toLowerCase().replace(/s$/,"")},u:function(k){return k===void 0}},T="en",A={};A[T]=S;var P="$isDayjsObject",y=function(k){return k instanceof H||!(!k||!k[P])},w=function k(V,G,B){var N;if(!V)return T;if(typeof V=="string"){var L=V.toLowerCase();A[L]&&(N=L),G&&(A[L]=G,N=L);var Y=V.split("-");if(!N&&Y.length>1)return k(Y[0])}else{var W=V.name;A[W]=V,N=W}return!B&&N&&(T=N),N||!B&&T},R=function(k,V){if(y(k))return k.clone();var G=typeof V=="object"?V:{};return G.date=k,G.args=arguments,new H(G)},F=x;F.l=w,F.i=y,F.w=function(k,V){return R(k,{locale:V.$L,utc:V.$u,x:V.$x,$offset:V.$offset})};var H=function(){function k(G){this.$L=w(G.locale,null,!0),this.parse(G),this.$x=this.$x||G.x||{},this[P]=!0}var V=k.prototype;return V.parse=function(G){this.$d=function(B){var N=B.date,L=B.utc;if(N===null)return new Date(NaN);if(F.u(N))return new Date;if(N instanceof Date)return new Date(N);if(typeof N=="string"&&!/Z$/i.test(N)){var Y=N.match(C);if(Y){var W=Y[2]-1||0,q=(Y[7]||"0").substring(0,3);return L?new Date(Date.UTC(Y[1],W,Y[3]||1,Y[4]||0,Y[5]||0,Y[6]||0,q)):new Date(Y[1],W,Y[3]||1,Y[4]||0,Y[5]||0,Y[6]||0,q)}}return new Date(N)}(G),this.init()},V.init=function(){var G=this.$d;this.$y=G.getFullYear(),this.$M=G.getMonth(),this.$D=G.getDate(),this.$W=G.getDay(),this.$H=G.getHours(),this.$m=G.getMinutes(),this.$s=G.getSeconds(),this.$ms=G.getMilliseconds()},V.$utils=function(){return F},V.isValid=function(){return this.$d.toString()!==m},V.isSame=function(G,B){var N=R(G);return this.startOf(B)<=N&&N<=this.endOf(B)},V.isAfter=function(G,B){return R(G)<this.startOf(B)},V.isBefore=function(G,B){return this.endOf(B)<R(G)},V.$g=function(G,B,N){return F.u(G)?this[B]:this.set(N,G)},V.unix=function(){return Math.floor(this.valueOf()/1e3)},V.valueOf=function(){return this.$d.getTime()},V.startOf=function(G,B){var N=this,L=!!F.u(B)||B,Y=F.p(G),W=function(re,de){var I=F.w(N.$u?Date.UTC(N.$y,de,re):new Date(N.$y,de,re),N);return L?I:I.endOf(d)},q=function(re,de){return F.w(N.toDate()[re].apply(N.toDate("s"),(L?[0,0,0,0]:[23,59,59,999]).slice(de)),N)},$=this.$W,ge=this.$M,fe=this.$D,Re="set"+(this.$u?"UTC":"");switch(Y){case g:return L?W(1,0):W(31,11);case u:return L?W(1,ge):W(0,ge+1);case c:var Fe=this.$locale().weekStart||0,se=($<Fe?$+7:$)-Fe;return W(L?fe-se:fe+(6-se),ge);case d:case f:return q(Re+"Hours",0);case l:return q(Re+"Minutes",1);case a:return q(Re+"Seconds",2);case r:return q(Re+"Milliseconds",3);default:return this.clone()}},V.endOf=function(G){return this.startOf(G,!1)},V.$set=function(G,B){var N,L=F.p(G),Y="set"+(this.$u?"UTC":""),W=(N={},N[d]=Y+"Date",N[f]=Y+"Date",N[u]=Y+"Month",N[g]=Y+"FullYear",N[l]=Y+"Hours",N[a]=Y+"Minutes",N[r]=Y+"Seconds",N[n]=Y+"Milliseconds",N)[L],q=L===d?this.$D+(B-this.$W):B;if(L===u||L===g){var $=this.clone().set(f,1);$.$d[W](q),$.init(),this.$d=$.set(f,Math.min(this.$D,$.daysInMonth())).$d}else W&&this.$d[W](q);return this.init(),this},V.set=function(G,B){return this.clone().$set(G,B)},V.get=function(G){return this[F.p(G)]()},V.add=function(G,B){var N,L=this;G=Number(G);var Y=F.p(B),W=function(ge){var fe=R(L);return F.w(fe.date(fe.date()+Math.round(ge*G)),L)};if(Y===u)return this.set(u,this.$M+G);if(Y===g)return this.set(g,this.$y+G);if(Y===d)return W(1);if(Y===c)return W(7);var q=(N={},N[a]=i,N[l]=s,N[r]=o,N)[Y]||1,$=this.$d.getTime()+G*q;return F.w($,this)},V.subtract=function(G,B){return this.add(-1*G,B)},V.format=function(G){var B=this,N=this.$locale();if(!this.isValid())return N.invalidDate||m;var L=G||"YYYY-MM-DDTHH:mm:ssZ",Y=F.z(this),W=this.$H,q=this.$m,$=this.$M,ge=N.weekdays,fe=N.months,Re=N.meridiem,Fe=function(de,I,X,Q){return de&&(de[I]||de(B,L))||X[I].slice(0,Q)},se=function(de){return F.s(W%12||12,de,"0")},re=Re||function(de,I,X){var Q=de<12?"AM":"PM";return X?Q.toLowerCase():Q};return L.replace(v,function(de,I){return I||function(X){switch(X){case"YY":return String(B.$y).slice(-2);case"YYYY":return F.s(B.$y,4,"0");case"M":return $+1;case"MM":return F.s($+1,2,"0");case"MMM":return Fe(N.monthsShort,$,fe,3);case"MMMM":return Fe(fe,$);case"D":return B.$D;case"DD":return F.s(B.$D,2,"0");case"d":return String(B.$W);case"dd":return Fe(N.weekdaysMin,B.$W,ge,2);case"ddd":return Fe(N.weekdaysShort,B.$W,ge,3);case"dddd":return ge[B.$W];case"H":return String(W);case"HH":return F.s(W,2,"0");case"h":return se(1);case"hh":return se(2);case"a":return re(W,q,!0);case"A":return re(W,q,!1);case"m":return String(q);case"mm":return F.s(q,2,"0");case"s":return String(B.$s);case"ss":return F.s(B.$s,2,"0");case"SSS":return F.s(B.$ms,3,"0");case"Z":return Y}return null}(de)||Y.replace(":","")})},V.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},V.diff=function(G,B,N){var L,Y=this,W=F.p(B),q=R(G),$=(q.utcOffset()-this.utcOffset())*i,ge=this-q,fe=function(){return F.m(Y,q)};switch(W){case g:L=fe()/12;break;case u:L=fe();break;case p:L=fe()/3;break;case c:L=(ge-$)/6048e5;break;case d:L=(ge-$)/864e5;break;case l:L=ge/s;break;case a:L=ge/i;break;case r:L=ge/o;break;default:L=ge}return N?L:F.a(L)},V.daysInMonth=function(){return this.endOf(u).$D},V.$locale=function(){return A[this.$L]},V.locale=function(G,B){if(!G)return this.$L;var N=this.clone(),L=w(G,B,!0);return L&&(N.$L=L),N},V.clone=function(){return F.w(this.$d,this)},V.toDate=function(){return new Date(this.valueOf())},V.toJSON=function(){return this.isValid()?this.toISOString():null},V.toISOString=function(){return this.$d.toISOString()},V.toString=function(){return this.$d.toUTCString()},k}(),z=H.prototype;return R.prototype=z,[["$ms",n],["$s",r],["$m",a],["$H",l],["$W",d],["$M",u],["$y",g],["$D",f]].forEach(function(k){z[k[1]]=function(V){return this.$g(V,k[0],k[1])}}),R.extend=function(k,V){return k.$i||(k(V,H,R),k.$i=!0),R},R.locale=w,R.isDayjs=y,R.unix=function(k){return R(1e3*k)},R.en=A[T],R.Ls=A,R.p={},R})}(qs)),qs.exports}var q0=Y0();const Xa=hs(q0);var Qs={exports:{}},Q0=Qs.exports,xd;function X0(){return xd||(xd=1,function(e,t){(function(o,i){e.exports=i()})(Q0,function(){var o="minute",i=/[+-]\d\d(?::?\d\d)?/g,s=/([+-]|\d\d)/g;return function(n,r,a){var l=r.prototype;a.utc=function(m){var C={date:m,utc:!0,args:arguments};return new r(C)},l.utc=function(m){var C=a(this.toDate(),{locale:this.$L,utc:!0});return m?C.add(this.utcOffset(),o):C},l.local=function(){return a(this.toDate(),{locale:this.$L,utc:!1})};var d=l.parse;l.parse=function(m){m.utc&&(this.$u=!0),this.$utils().u(m.$offset)||(this.$offset=m.$offset),d.call(this,m)};var c=l.init;l.init=function(){if(this.$u){var m=this.$d;this.$y=m.getUTCFullYear(),this.$M=m.getUTCMonth(),this.$D=m.getUTCDate(),this.$W=m.getUTCDay(),this.$H=m.getUTCHours(),this.$m=m.getUTCMinutes(),this.$s=m.getUTCSeconds(),this.$ms=m.getUTCMilliseconds()}else c.call(this)};var u=l.utcOffset;l.utcOffset=function(m,C){var v=this.$utils().u;if(v(m))return this.$u?0:v(this.$offset)?u.call(this):this.$offset;if(typeof m=="string"&&(m=function(T){T===void 0&&(T="");var A=T.match(i);if(!A)return null;var P=(""+A[0]).match(s)||["-",0,0],y=P[0],w=60*+P[1]+ +P[2];return w===0?0:y==="+"?w:-w}(m),m===null))return this;var S=Math.abs(m)<=16?60*m:m,b=this;if(C)return b.$offset=S,b.$u=m===0,b;if(m!==0){var x=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(b=this.local().add(S+x,o)).$offset=S,b.$x.$localOffset=x}else b=this.utc();return b};var p=l.format;l.format=function(m){var C=m||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return p.call(this,C)},l.valueOf=function(){var m=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*m},l.isUTC=function(){return!!this.$u},l.toISOString=function(){return this.toDate().toISOString()},l.toString=function(){return this.toDate().toUTCString()};var g=l.toDate;l.toDate=function(m){return m==="s"&&this.$offset?a(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():g.call(this)};var f=l.diff;l.diff=function(m,C,v){if(m&&this.$u===m.$u)return f.call(this,m,C,v);var S=this.local(),b=a(m).local();return f.call(S,b,C,v)}}})}(Qs)),Qs.exports}var Z0=X0();const J0=hs(Z0);var Xs={exports:{}},eE=Xs.exports,Dd;function tE(){return Dd||(Dd=1,function(e,t){(function(o,i){e.exports=i()})(eE,function(){var o={year:0,month:1,day:2,hour:3,minute:4,second:5},i={};return function(s,n,r){var a,l=function(p,g,f){f===void 0&&(f={});var m=new Date(p),C=function(v,S){S===void 0&&(S={});var b=S.timeZoneName||"short",x=v+"|"+b,T=i[x];return T||(T=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:v,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:b}),i[x]=T),T}(g,f);return C.formatToParts(m)},d=function(p,g){for(var f=l(p,g),m=[],C=0;C<f.length;C+=1){var v=f[C],S=v.type,b=v.value,x=o[S];x>=0&&(m[x]=parseInt(b,10))}var T=m[3],A=T===24?0:T,P=m[0]+"-"+m[1]+"-"+m[2]+" "+A+":"+m[4]+":"+m[5]+":000",y=+p;return(r.utc(P).valueOf()-(y-=y%1e3))/6e4},c=n.prototype;c.tz=function(p,g){p===void 0&&(p=a);var f,m=this.utcOffset(),C=this.toDate(),v=C.toLocaleString("en-US",{timeZone:p}),S=Math.round((C-new Date(v))/1e3/60),b=15*-Math.round(C.getTimezoneOffset()/15)-S;if(!Number(b))f=this.utcOffset(0,g);else if(f=r(v,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(b,!0),g){var x=f.utcOffset();f=f.add(m-x,"minute")}return f.$x.$timezone=p,f},c.offsetName=function(p){var g=this.$x.$timezone||r.tz.guess(),f=l(this.valueOf(),g,{timeZoneName:p}).find(function(m){return m.type.toLowerCase()==="timezonename"});return f&&f.value};var u=c.startOf;c.startOf=function(p,g){if(!this.$x||!this.$x.$timezone)return u.call(this,p,g);var f=r(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L});return u.call(f,p,g).tz(this.$x.$timezone,!0)},r.tz=function(p,g,f){var m=f&&g,C=f||g||a,v=d(+r(),C);if(typeof p!="string")return r(p).tz(C);var S=function(A,P,y){var w=A-60*P*1e3,R=d(w,y);if(P===R)return[w,P];var F=d(w-=60*(R-P)*1e3,y);return R===F?[w,R]:[A-60*Math.min(R,F)*1e3,Math.max(R,F)]}(r.utc(p,m).valueOf(),v,C),b=S[0],x=S[1],T=r(b).utcOffset(x);return T.$x.$timezone=C,T},r.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},r.tz.setDefault=function(p){a=p}}})}(Xs)),Xs.exports}var oE=tE();const iE=hs(oE);var Zs={exports:{}},sE=Zs.exports,Md;function nE(){return Md||(Md=1,function(e,t){(function(o,i){e.exports=i()})(sE,function(){return function(o,i){var s=i.prototype,n=s.format;s.format=function(r){var a=this,l=this.$locale();if(!this.isValid())return n.bind(this)(r);var d=this.$utils(),c=(r||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,function(u){switch(u){case"Q":return Math.ceil((a.$M+1)/3);case"Do":return l.ordinal(a.$D);case"gggg":return a.weekYear();case"GGGG":return a.isoWeekYear();case"wo":return l.ordinal(a.week(),"W");case"w":case"ww":return d.s(a.week(),u==="w"?1:2,"0");case"W":case"WW":return d.s(a.isoWeek(),u==="W"?1:2,"0");case"k":case"kk":return d.s(String(a.$H===0?24:a.$H),u==="k"?1:2,"0");case"X":return Math.floor(a.$d.getTime()/1e3);case"x":return a.$d.getTime();case"z":return"["+a.offsetName()+"]";case"zzz":return"["+a.offsetName("long")+"]";default:return u}});return n.bind(this)(c)}}})}(Zs)),Zs.exports}var rE=nE();const aE=hs(rE);Xa.extend(aE);Xa.extend(J0);Xa.extend(iE);const lE={class:"pv-flex",style:{"--flex-wrap":"nowrap"}},dE=["id"],cE={key:1,style:{"padding-left":"16px"}},uE=["checked","disabled","onChange"],hE={class:"pv-text-body-md"},pE={key:2},gE={key:0,class:"pv-text-subdued pv-text-body-xxs"},fE=h.defineComponent({__name:"GroupBySelector",props:{rowGroupLimit:{}},setup(e){const t=h.inject("gridApi"),o=h.inject("availableRowGroupColumns"),i=h.inject("rowGroupColumnFields"),s=e;h.watch(i,()=>{},{deep:!0});const n=f=>i.value.includes(f||""),r=(f,m)=>{m?t.value.addRowGroupColumns([f]):t.value.removeRowGroupColumns([f])},a=h.computed(()=>({"pv-hide":o.value.length===0})),l=h.computed(()=>s.rowGroupLimit?i.value.length>=s.rowGroupLimit:!1),d=h.computed(()=>i.value.map(f=>o.value.find(m=>m.field===f)).filter(f=>f!==void 0)),c=h.computed(()=>o.value.filter(f=>!i.value.includes(f.field))),u=h.computed(()=>{const f={label:"",value:"divider"},m=d.value.map(v=>({label:v.headerName,value:v.field})),C=c.value.map(v=>({label:v.headerName,value:v.field}));return[...m,f,...C]}),p=f=>`group-by-list-item-${f}`,g=f=>{const m=f.findIndex(S=>S==="divider"),v=f.slice(0,m).slice(0,s.rowGroupLimit).map(S=>S.replace("group-by-list-item-",""));t.value.setRowGroupColumns(v)};return(f,m)=>(h.openBlock(),h.createBlock(Xh,{isList:!0,isSortable:!0,popoverCssProperties:{width:"auto"},alignment:"right",class:h.normalizeClass(a.value),onListOrderUpdated:g},{trigger:h.withCtx(()=>[h.createElementVNode("div",lE,[m[0]||(m[0]=h.createElementVNode("p",{class:"pv-truncate pv-text-body-md"},"Group by",-1)),h.unref(i).length>0?(h.openBlock(),h.createBlock(h.unref(Qa),{key:0,value:h.unref(i).length,variant:"tertiary"},null,8,["value"])):h.createCommentVNode("",!0)])]),default:h.withCtx(()=>[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(u.value,(C,v)=>(h.openBlock(),h.createElementBlock(h.Fragment,{key:C.value},[C.value!=="divider"?(h.openBlock(),h.createElementBlock("li",{key:0,id:p(C.value)},[h.createElementVNode("label",{class:h.normalizeClass(["pv-flex",{"pv-border-bottom":v+1===h.unref(i).length}])},[n(C.value)?(h.openBlock(),h.createBlock($e,{key:0,name:"reorder",class:"pv-text-subdued"})):(h.openBlock(),h.createElementBlock("span",cE)),h.createElementVNode("input",{type:"checkbox",class:"pv-checkbox",checked:n(C.value),disabled:!n(C.value)&&l.value,onChange:S=>r(C.value,S.target.checked)},null,40,uE),h.createElementVNode("span",hE,h.toDisplayString(C.label),1),n(C.value)?(h.openBlock(),h.createElementBlock("sup",pE,h.toDisplayString(v+1),1)):h.createCommentVNode("",!0)],2)],8,dE)):h.createCommentVNode("",!0)],64))),128)),l.value?(h.openBlock(),h.createElementBlock("p",gE," Supports "+h.toDisplayString(f.rowGroupLimit)+" levels of grouping ",1)):h.createCommentVNode("",!0)]),_:1},8,["class"]))}}),mE={},CE={class:"ag-custom-loading-cell pv-shimmer"};function vE(e,t){return h.openBlock(),h.createElementBlock("div",CE)}const wE=Ro(mE,[["render",vE]]),SE={key:0,class:"pv-table-group-cell"},yE={class:"pv-text-body-xxs pv-text-subdued"},bE={key:0},RE={class:"pv-flex pv-space-between",style:{"line-height":"20px"}},FE={class:"pv-text-title-md"},xE={key:0,class:"pv-table-row-number"},DE=h.defineComponent({__name:"GroupedCellRenderer",props:{params:{}},setup(e){const t=e,o=h.inject("rowGroupColumnFields"),i=h.inject("groupColumnCellValueColumn"),s=h.inject("expandedRows"),n=h.computed(()=>!t.params.displayBaseAggregationsOnly||a.value.level===o.value.length-1),r=h.computed(()=>t.params.rowNode.group),a=Th(t.params,"rowNode"),l=(g,f)=>g?g({value:f,data:a.value.data,node:a.value,api:t.params.api}):f,d=h.computed(()=>{if(!i.value)return"";const g=i.value.getColId()||"",f=i.value.getColDef().valueFormatter,m=a.value;return g&&m&&m.data&&g in m.data?l(f,m.data[g]):""}),c=h.computed(()=>a.value.data&&a.value.data.groupedRecordCount?a.value.data.groupedRecordCount||0:a.value.allChildrenCount||0),u=h.computed(()=>{const g=a.value.rowIndex,f=a.value.parent?.rowIndex;return g!=null&&f!=null?g-f:null}),p=g=>{const f=g.node.expanded,m=g.node.rowIndex;m!=null&&(s.value[m]=f)};return h.onMounted(()=>{const g=a.value,f=g.rowIndex,m=g.expanded;f!=null&&(s.value[f]=m),a.value.addEventListener("expandedChanged",p)}),h.onBeforeUnmount(()=>{const g=a.value;a.value.removeEventListener("expandedChanged",p);const f=g.rowIndex;f!=null&&(s.value[f]=!1)}),(g,f)=>(h.openBlock(),h.createElementBlock(h.Fragment,null,[r.value?(h.openBlock(),h.createElementBlock("div",SE,[h.createElementVNode("p",yE,[h.createTextVNode(h.toDisplayString(h.unref(a).rowGroupColumn?.getColDef().headerName)+" ",1),g.params.displayCount&&n.value&&c.value>0?(h.openBlock(),h.createElementBlock("span",bE," ("+h.toDisplayString(c.value.toLocaleString())+") ",1)):h.createCommentVNode("",!0)]),h.createElementVNode("div",RE,[h.createElementVNode("p",FE,h.toDisplayString(g.params.formattedValue||g.params.rowNode.key),1)])])):h.createCommentVNode("",!0),h.createElementVNode("div",null,[h.createElementVNode("p",null,[g.params.displayRowNumber&&u.value?(h.openBlock(),h.createElementBlock("span",xE,h.toDisplayString(u.value),1)):h.createCommentVNode("",!0),h.createTextVNode(" "+h.toDisplayString(d.value),1)])])],64))}});function Pd(e){const t=e.filter(i=>i!=null&&!isNaN(i)).sort((i,s)=>i-s),o=t.length;return o===0?null:t[Math.floor(o/2)]}var wt=(e=>(e.String="string",e.Number="number",e.Boolean="boolean",e.Date="date",e.Currency="currency",e.Formula="formula",e.Select="select",e.Percent="percent",e.Entity="entity",e.Id="id",e.Integer="integer",e.User="user",e.Link="link",e.Location="location",e.Status="status",e.Tag="tag",e.File="file",e.None="none",e))(wt||{});const ME=e=>{switch(e){case"string":return"fonts";case"number":return"hash";case"boolean":return"list";case"date":return"calendar";case"currency":return"currency-dollar";case"formula":return"formula";case"select":return"list";case"percent":return"percent";case"entity":return"building";case"id":return"id-2";case"link":return"link";case"location":return"location";case"integer":return"hash";case"user":return"user";case"status":return"circle-chevron-down";case"tag":return"circle-chevron-down";case"file":return"file";case"none":return null;default:return null}},PE=(e,t)=>{if(!e)return e;switch(t){case"percent":return e.replace(/^%+/,"").trim();default:return e}},EE={style:{"line-height":"20px"}},AE={class:"pv-text-subdued pv-text-body-xxs pv-relative"},TE=h.defineComponent({__name:"GroupAggCellRenderer",props:{params:{}},setup(e){const t=e,o=h.inject("expandedRows"),i=h.computed(()=>{const c=t.params.column?.getColDef()?.context;return c&&c.aggFuncDisplayName?c.aggFuncDisplayName:(t.params.column?.getAggFunc()||"agg").toLowerCase()}),s=()=>{const d=t.params.api;if(d){const c=!r.value;d.setRowNodeExpanded(t.params.node,c),n.value&&(o.value[n.value]=c)}},n=h.computed(()=>t.params.node?.rowIndex),r=h.computed(()=>{let d=!1;return n.value!=null&&(d=n.value in o.value?o.value[n.value]:!1),d}),a=h.computed(()=>r.value?"chevron-down":"chevron-right"),l=h.computed(()=>{const c=t.params.column?.getColDef()?.context,u=t.params.valueFormatted||t.params.value;return c&&c.dataType&&[wt.Currency,wt.Percent,wt.Number,wt.Integer].includes(c.dataType)?u.toLocaleString():u});return h.onMounted(()=>{t.params.node.expanded&&n.value&&(o.value[n.value]=!0)}),(d,c)=>(h.openBlock(),h.createElementBlock("div",{class:"pv-flex",ondblclick:s},[h.createElementVNode("div",EE,[h.createElementVNode("p",null,h.toDisplayString(l.value),1),h.createElementVNode("p",AE,h.toDisplayString(i.value),1)]),h.createVNode(Wt,{variant:"icon",onClick:s},{default:h.withCtx(()=>[h.createVNode($e,{name:a.value},null,8,["name"])]),_:1})]))}}),Js=h.ref({}),Zh=h.ref(null),IE=h.ref(0),LE=h.ref(0),sa=h.ref({}),_n=h.ref(void 0),Za=h.ref({}),zn=h.ref({}),Ja=h.ref({}),Jh=h.ref({}),kE=()=>{const e={};return Object.entries(zn.value).forEach(([t,o])=>{const i=o.filter(s=>!!s);i.length>0&&(e[t]={filterType:"set",values:i})}),e},GE=async(e,t,o,i)=>{const s=Jh.value[t.field]||void 0,n=zn.value[t.field]||[];let r=i;Zh.value!=null&&(r=kE());const a={api:e,colDef:t,column:o,filterModel:r,query:s,selectedValues:n};sa.value[t.field]=!0;const l=n.map(u=>{const p=el(t.field,u);return{value:p?.value||u,label:p?.label||u,isPreference:p?.isPreference||!1,isSelectable:p?.isSelectable||!0,metadata:p?.metadata||{}}}),d=await _n.value?.(a);l.forEach(u=>{d?.some(p=>p?.value===u?.value)||d?.push(u)}),t.field&&d&&(Za.value[t.field]=d);const c=d?.filter(u=>u!=null).map(u=>u.value)||[];return sa.value[t.field]=!1,c.filter((u,p)=>c.indexOf(u)===p)},OE=(e,t)=>{const o=t.filter((i,s)=>t.indexOf(i)===s).filter(i=>i!=null&&i!=="");return e&&e.trim()!==""&&!_n.value?o.filter(i=>i?.toLowerCase().includes(e.toLowerCase())):o},el=(e,t)=>{const o=[...Za.value[e]||[],...Ja.value[e]||[]];return o?o.find(i=>i?.value===t):null},BE=()=>_n.value!=null,NE=(e,t)=>{const o=[];if(Js.value&&Js.value[e]?.values){const s=Js.value[e].values||[];o.push(...s)}zn.value[e]=t,o.push(...t);const i=[];return t.forEach(s=>{const n=el(e,s);n&&i.push(n)}),Ja.value[e]=i,o.filter((s,n)=>o.indexOf(s)===n)},HE=e=>zn.value[e]||[],VE=(e,t)=>{Jh.value[e]=t},tl=()=>({filterModel:Js,filterModelUpdated:IE,filterModelCleared:LE,filterValuesLoadingStatus:sa,filterValueMap:Za,filterValueSelectedMetadataMap:Ja,filterStoreHandler:_n,fetchFilterValues:GE,filterValueContext:el,filterResultsByQuery:OE,getFilterSelectedValues:HE,isServerSideFilter:BE,prevFilterModel:Zh,setFilterSelectedValues:NE,setFilterValueSearchText:VE}),_E={class:"pv-stack-8"},zE={class:"pv-flex",style:{"--flex-wrap":"nowrap"}},WE={key:0,class:"pv-text-body-md pv-text-subdued",style:{"padding-top":"8px"}},UE={key:0,class:"pv-flex pv-text-subdued pv-space-between",style:{"padding-top":"8px"}},$E={class:"pv-flex"},jE=["type","value","checked","disabled","onChange"],KE={class:"pv-text-body-md",style:{"padding-left":"4px"}},YE={key:1,class:"pv-flex pv-text-body-xxs pv-text-subdued",style:{"padding-top":"8px",cursor:"default"}},qE={key:0,class:"pv-tooltip suggested-label","aria-labelledby":"description"},QE=["role"],XE={class:"pv-flex"},ZE=["type","value","checked","disabled","onChange"],JE={class:"pv-text-body-md",style:{"padding-left":"4px"}},eA={key:2,class:"pv-text-body-xxs pv-text-subdued"},tA={class:"pv-border-top pv-flex",style:{"--flex-justify":"end","padding-top":"8px"}},oA={key:0,class:"pv-full-width"},iA={class:"pv-flex-inline"},sA={role:"list",class:"pv-flex pv-stack-8",style:{"--flex-wrap":"wrap"}},nA=4,rA=h.defineComponent({__name:"SetFilter",props:{filterColDef:{},filterStyle:{default:"horizontal"},displayPreferencesIcon:{type:Boolean,default:!1}},emits:["filter-selection-changed","filter-closed","handle-settings-icon"],setup(e,{emit:t}){const o=e,i=t,s=h.inject("gridApi"),{filterModel:n,filterModelCleared:r,filterModelUpdated:a,filterValuesLoadingStatus:l,filterValueContext:d,filterResultsByQuery:c,getFilterSelectedValues:u,isServerSideFilter:p,setFilterValueSearchText:g,setFilterSelectedValues:f}=tl(),m=h.inject("firstDataRendered"),C=h.ref([]),v=h.ref([]),S=h.ref(null),b=h.computed(()=>o.filterColDef.field||""),x=h.computed(()=>o.filterColDef.headerName||""),T=h.ref(!1),A=h.computed(()=>{const I=o.filterColDef.context;return I&&I.filterValueFormatter&&typeof I.filterValueFormatter=="function"?I.filterValueFormatter:typeof o.filterColDef.valueFormatter=="function"?o.filterColDef.valueFormatter:null}),P=h.ref(""),y=h.ref(0),w=async()=>{R(),await F().then(()=>{T.value=!1})},R=()=>{const I=[];if(n.value&&n.value[b.value]?.values){const X=n.value[b.value].values||[];I.push(...X)}C.value=Array.from(new Set([...u(b.value),...I]))},F=async(I=!1,X=!1)=>{const Q=await s.value.getColumnFilterInstance(b.value);(X||I&&l.value[b.value]!==!0&&a.value>y.value)&&(p()?(Q.refreshFilterValues(),y.value=a.value):S.value=c(P.value,Q.getFilterValues()));const ue=new Set(Q.getFilterValues());C.value.forEach(we=>{ue.add(we)}),v.value=H(Array.from(ue))},H=I=>I.sort((X,Q)=>{const ue=C.value.includes(X),we=C.value.includes(Q);return ue&&!we?-1:!ue&&we?1:0}),z=I=>{const X=d(b.value,I);return A.value?A.value({value:I,context:X}):I},k=h.computed(()=>{const I=o.filterColDef.context;return I&&I.filterSelectMax?I.filterSelectMax:null}),V=h.computed(()=>{const I=o.filterColDef.context;return I&&I.filterSelectMin?I.filterSelectMin===1&&k.value===1:!1}),G=h.computed(()=>{const I=o.filterColDef.context;return I&&I.filterOptionsSortDescription?I.filterOptionsSortDescription:null}),B=h.computed(()=>{const I=o.filterColDef.context;return I&&I.filterOptionsSortTooltip?I.filterOptionsSortTooltip:null}),N=h.computed(()=>k.value?C.value.length>=k.value:!1),L=h.computed(()=>v.value.filter(I=>!C.value.includes(I))),Y=h.computed(()=>v.value.length===1&&v.value[0]===null&&C.value.length===0),W=h.computed(()=>v.value.filter(I=>d(b.value,I)?.isPreference)),q=I=>Y.value||d(b.value,I)?.isSelectable===!1?!0:V.value?!1:N.value&&!C.value.includes(I),$=h.computed(()=>{if(S.value!=null)return S.value;const I=[...W.value,...v.value];return c(P.value,I)}),ge=h.computed(()=>$.value.filter(I=>!W.value.includes(I)));h.watch(()=>l.value[b.value],()=>{const I=l.value[b.value];T.value&&!I?(F(),T.value=!1):I&&(T.value=!0)},{deep:!0}),h.watch(()=>n.value,()=>{a.value+=1,R()}),h.watch(()=>r.value,()=>{C.value=[]}),h.watch(()=>m.value,()=>{R()}),h.watch(()=>C.value,I=>{f(b.value,I)}),HP(()=>P.value,async I=>{g(b.value,I),await F(!0,!0)},{debounce:300});const fe=I=>{I&&V.value?C.value=[I]:I&&!C.value.includes(I)&&(C.value=[...C.value,I]),re(),i("filter-selection-changed")},Re=I=>{C.value=C.value.filter(X=>X!==I),re(),i("filter-selection-changed")},Fe=()=>{C.value=[],re(),i("filter-selection-changed")},se=(I,X)=>{I.target.checked?fe(X):Re(X)},re=()=>{const I=C.value.length>0?C.value:null;s.value.setColumnFilterModel(b.value,{values:I}).then(()=>{o.filterStyle==="horizontal"?s.value.onFilterChanged():a.value+=1})},de=()=>{P.value="",i("filter-closed")};return h.onMounted(()=>{w()}),(I,X)=>(h.openBlock(),h.createElementBlock(h.Fragment,null,[h.createElementVNode("div",_E,[(h.openBlock(),h.createBlock(h.resolveDynamicComponent(I.filterStyle==="vertical"?"ul":"div"),{role:"list",class:"pv-flex",style:{"--flex-wrap":"wrap"}},{default:h.withCtx(()=>[I.filterStyle==="vertical"?(h.openBlock(!0),h.createElementBlock(h.Fragment,{key:0},h.renderList(C.value,Q=>(h.openBlock(),h.createElementBlock("li",{key:`${x.value}-${Q}`},[h.createVNode(N0,{label:z(Q)||"",showClear:!0,onHandleClose:ue=>Re(Q)},null,8,["label","onHandleClose"])]))),128)):h.createCommentVNode("",!0)]),_:1})),h.createElementVNode("div",null,[h.createVNode(Xh,h.mergeProps({isList:!0,icon:I.filterStyle==="vertical",class:"pv-flex",popoverCssProperties:{width:"auto",maxWidth:I.filterStyle==="vertical"?"300px":"400px",overflowX:"auto"},isLoading:T.value,onDropdownOpen:X[3]||(X[3]=Q=>F(!0)),onDropdownClosed:de},I.filterStyle==="horizontal"?{"data-horizontal-filter-field":b.value}:{}),h.createSlots({default:h.withCtx(()=>[h.createVNode(j0,{modelValue:P.value,"onUpdate:modelValue":X[0]||(X[0]=Q=>P.value=Q),size:"sm",style:{"min-width":"200px"}},null,8,["modelValue"]),$.value.length===0?(h.openBlock(),h.createElementBlock("li",WE,h.toDisplayString(T.value?"Loading...":"No results found"),1)):(h.openBlock(),h.createElementBlock(h.Fragment,{key:1},[W.value.length>0&&P.value===""?(h.openBlock(),h.createElementBlock("li",UE,[X[4]||(X[4]=h.createElementVNode("span",{class:"pv-text-subdued pv-text-body-xxs"},"Your Preferences",-1)),I.displayPreferencesIcon?(h.openBlock(),h.createBlock(Wt,{key:0,size:"small",variant:"ghost",onClick:X[1]||(X[1]=Q=>I.$emit("handle-settings-icon",x.value))},{default:h.withCtx(()=>[h.createVNode($e,{size:12,name:"sliders-horizontal"})]),_:1})):h.createCommentVNode("",!0)])):h.createCommentVNode("",!0),(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(W.value,(Q,ue)=>(h.openBlock(),h.createElementBlock("li",{key:Q,class:h.normalizeClass({"pv-border-bottom":ue===W.value.length-1&&P.value===""})},[h.createElementVNode("label",$E,[h.createElementVNode("input",{type:V.value?"radio":"checkbox",class:h.normalizeClass(V.value?"pv-radio":"pv-checkbox"),value:Q,checked:C.value.includes(Q)||Y.value,disabled:q(Q),onChange:we=>se(we,Q)},null,42,jE),h.createElementVNode("span",KE,h.toDisplayString(z(Q)),1)])],2))),128)),G.value&&P.value===""?(h.openBlock(),h.createElementBlock("li",YE,[G.value?(h.openBlock(),h.createElementBlock("span",qE,[h.createElementVNode("dfn",null,[h.createVNode($e,{name:"ai",size:12})]),h.createElementVNode("span",{role:B.value?"tooltip":void 0,id:"description","data-position":"center-right",style:{"max-width":"175px"}},[h.createElementVNode("span",null,h.toDisplayString(B.value),1)],8,QE)])):h.createCommentVNode("",!0),h.createTextVNode(" "+h.toDisplayString(G.value),1)])):h.createCommentVNode("",!0),(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(ge.value,Q=>(h.openBlock(),h.createElementBlock("li",{key:Q},[h.createElementVNode("label",XE,[h.createElementVNode("input",{type:V.value?"radio":"checkbox",class:h.normalizeClass(V.value?"pv-radio":"pv-checkbox"),value:Q,checked:C.value.includes(Q)||Y.value,disabled:q(Q),onChange:ue=>se(ue,Q)},null,42,ZE),h.createElementVNode("span",JE,h.toDisplayString(z(Q)),1)])]))),128))],64)),N.value?(h.openBlock(),h.createElementBlock("p",eA," Max of "+h.toDisplayString(k.value)+" allowed ",1)):h.createCommentVNode("",!0),h.createElementVNode("div",tA,[h.createVNode(Wt,{variant:"ghost",size:"small",disabled:C.value.length===0,onClick:X[2]||(X[2]=Q=>Fe())},{default:h.withCtx(()=>X[5]||(X[5]=[h.createTextVNode("Clear All")])),_:1},8,["disabled"])])]),_:2},[I.filterStyle==="horizontal"?{name:"trigger",fn:h.withCtx(()=>[h.createElementVNode("div",zE,[C.value.length>0?(h.openBlock(),h.createBlock(h.unref(Qa),{key:0,value:C.value.length,variant:"tertiary"},null,8,["value"])):h.createCommentVNode("",!0),h.createElementVNode("p",{class:h.normalizeClass(["pv-text-body-md pv-truncate",{"pv-shimmer":T.value}])},h.toDisplayString(x.value),3)])]),key:"0"}:{name:"trigger",fn:h.withCtx(()=>[h.createVNode($e,{class:"pv-text-subdued",name:"add-circle"})]),key:"1"}]),1040,["icon","popoverCssProperties","isLoading"])])]),I.filterStyle=="vertical"?(h.openBlock(),h.createElementBlock("div",oA,[h.createElementVNode("div",iA,[h.createElementVNode("ul",sA,[X[6]||(X[6]=h.createElementVNode("li",null,[h.createElementVNode("p",{class:"pv-text-subdued pv-text-body-md"},"Suggested:")],-1)),(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(L.value.filter(Q=>Q!==""&&Q!=null).slice(0,nA),Q=>(h.openBlock(),h.createElementBlock("li",{key:`${x.value}-${Q}-suggest`},[h.createVNode(h.unref(z0),{label:z(Q)||"",onHandleClick:ue=>fe(Q)},null,8,["label","onHandleClick"])]))),128))])])])):h.createCommentVNode("",!0)],64))}}),Ed=Ro(rA,[["__scopeId","data-v-ad11d710"]]),aA={class:"pv-flex"},lA={class:"pv-flex-vertical pv-space-between pv-full-width",style:{height:"100%","overflow-x":"hidden"}},dA={class:"pv-flex-vertical pv-full-width"},cA={class:"pv-flex pv-inset-squish pv-full-width pv-space-between"},uA={class:"pv-text-title-lg"},hA={class:"pv-full-width pv-inset-inline-24"},pA={class:"pv-details",open:""},gA={class:"pv-flex pv-stack-8",style:{width:"fit-content"}},fA={class:"pv-text-title-lg"},mA={class:"pv-inset-block-8"},CA={class:"pv-sticky pv-border-top pv-full-width pv-inset-squish pv-flex pv-space-between pv-surface",style:{"--top":"unset",bottom:"0"}},vA={class:"pv-flex"},Ad=5,wA=h.defineComponent({__name:"FilterPanel",props:{enableVerticalPanel:{type:Boolean,default:!0},displayPreferencesIcon:{type:Boolean,default:!1}},emits:["handle-settings-icon"],setup(e){const t=h.inject("gridApi"),o=h.inject("availableFilterColumns"),i=h.inject("currentlyActiveFilter"),{filterModelCleared:s,prevFilterModel:n,filterModel:r}=tl(),a=h.ref(null),l=h.computed(()=>{const C=[...o.value].slice(0,Ad);return i.value?[...C.slice(0,Ad-1),i.value]:C}),d=h.computed(()=>{const C=r.value||{};return Object.keys(C).length}),c=h.ref(!1),u=()=>{c.value=!0},p=()=>{c.value=!1,n.value=t.value.getFilterModel(),a.value?.showModal()},g=()=>{n.value=null,t.value.setFilterModel(null),t.value.onFilterChanged(),s.value+=1},f=()=>{n.value&&t.value.setFilterModel(n.value),n.value=null,a.value?.close()},m=()=>{t.value.onFilterChanged(),a.value?.close(),s.value+=1};return(C,v)=>(h.openBlock(),h.createElementBlock("div",aA,[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(l.value,S=>(h.openBlock(),h.createElementBlock(h.Fragment,{key:S.field},[h.unref(t)?(h.openBlock(),h.createBlock(Ed,{key:0,"display-preferences-icon":C.displayPreferencesIcon,filterColDef:S,onHandleSettingsIcon:v[0]||(v[0]=b=>C.$emit("handle-settings-icon",b))},null,8,["display-preferences-icon","filterColDef"])):h.createCommentVNode("",!0)],64))),128)),C.enableVerticalPanel?(h.openBlock(),h.createElementBlock("button",{key:0,class:"pv-button-ghost pv-stack-8 pv-inset-block",onClick:p,style:{"--inset-size":"6px"}},[h.createVNode(h.unref($e),{name:"filter"}),v[7]||(v[7]=h.createTextVNode(" All Filters ")),d.value>0?(h.openBlock(),h.createBlock(h.unref(Qa),{key:0,value:d.value,variant:"tertiary"},null,8,["value"])):h.createCommentVNode("",!0)])):h.createCommentVNode("",!0),C.enableVerticalPanel?(h.openBlock(),h.createElementBlock("dialog",{key:1,ref_key:"filterDrawer",ref:a,id:"filter-vertical-drawer",class:"pv-drawer pv-surface",onClick:v[6]||(v[6]=h.withModifiers(S=>f(),["self"])),style:{"max-width":"450px"}},[h.createElementVNode("div",lA,[h.createElementVNode("div",dA,[h.createElementVNode("div",cA,[h.createElementVNode("p",uA," All Filters ("+h.toDisplayString(h.unref(o).length)+") ",1),h.createElementVNode("button",{class:"pv-button-ghost",onClick:v[1]||(v[1]=S=>f())},[h.createVNode(h.unref($e),{name:"close"})])]),h.createElementVNode("div",hA,[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(h.unref(o),(S,b)=>(h.openBlock(),h.createElementBlock("div",{key:S.field,class:h.normalizeClass([{"pv-border-bottom":b<h.unref(o).length-1},"pv-stack-12"])},[h.createElementVNode("details",pA,[h.createElementVNode("summary",gA,[h.createElementVNode("span",fA,h.toDisplayString(S.headerName),1)]),h.createElementVNode("div",mA,[h.unref(t)?(h.openBlock(),h.createBlock(Ed,{key:0,"filter-style":"vertical",filterColDef:S,"display-preferences-icon":C.displayPreferencesIcon,onFilterSelectionChanged:u,onHandleSettingsIcon:v[2]||(v[2]=x=>C.$emit("handle-settings-icon",x))},null,8,["filterColDef","display-preferences-icon"])):h.createCommentVNode("",!0)])])],2))),128))])]),h.createElementVNode("div",CA,[h.createElementVNode("button",{class:"pv-button-ghost",onClick:v[3]||(v[3]=S=>g())}," Clear All "),h.createElementVNode("div",vA,[h.createVNode(Wt,{variant:"ghost",onClick:v[4]||(v[4]=S=>f())},{default:h.withCtx(()=>v[8]||(v[8]=[h.createTextVNode(" Cancel ")])),_:1}),c.value?(h.openBlock(),h.createBlock(Wt,{key:0,variant:"primary",onClick:v[5]||(v[5]=S=>m())},{default:h.withCtx(()=>v[9]||(v[9]=[h.createTextVNode(" Apply ")])),_:1})):(h.openBlock(),h.createBlock(Wt,{key:1,variant:"primary",disabled:""},{default:h.withCtx(()=>v[10]||(v[10]=[h.createTextVNode(" No Changes ")])),_:1}))])])])],512)):h.createCommentVNode("",!0)]))}});function ep(e){return e.toLocaleString(void 0,{minimumFractionDigits:0,maximumFractionDigits:2})}function tp(e){const t=e.value?.value!=null?e.value.value:e.value;return t==null||t===""?"":t}function SA(e){const t=tp(e);return t===""?"":"$"+ep(t)}function yA(e){return tp(e)===""?"":ep(e.value*100)+"%"}const bA={class:"pv-flex"},RA={key:0,class:"pv-flex ag-header-actions"},FA=h.defineComponent({__name:"HeaderCellRenderer",props:{params:{}},setup(e,{expose:t}){const o=e,i=h.ref(!1),s=h.ref(!1),n=h.ref(null),r=h.ref(null),a=h.ref(null),l=h.ref(!1),d=h.computed(()=>{const b=o.params.column.getColDef();return b.sortable||b.filter||b.enableRowGroup}),c=h.inject("sortState"),u=h.computed(()=>{if(!c.value||c.value.length===0)return"";const b=c.value.find(T=>T.colId===o.params.column.getColId()),x=b?b.sort:"";return x==="asc"?"arrow-up":x==="desc"?"arrow-down":""}),p=h.computed(()=>s.value?{cursor:"pointer"}:{}),g=h.computed(()=>l.value?{opacity:1}:{}),f=()=>{l.value=!1},m=()=>{l.value=!0,a.value&&o.params.showColumnMenu(a.value,f)},C=b=>{i.value=b.enableFilterButton,s.value=b.enableSorting||!1,n.value=b.displayName,r.value=ME(b.column.getColDef().context?.dataType),n.value=PE(n.value,b.column.getColDef().context?.dataType)},v=()=>{s.value&&o.params.progressSort(!1)};h.onBeforeMount(()=>{C(o.params)});function S(b){return C(b),!0}return t({refresh:S}),(b,x)=>(h.openBlock(),h.createElementBlock("div",{class:"ag-custom-header-cell pv-flex pv-full-width pv-space-between",style:h.normalizeStyle(p.value),onClick:v},[h.createElementVNode("div",bA,[r.value?(h.openBlock(),h.createBlock($e,{key:0,name:r.value,class:"pv-text-subdued"},null,8,["name"])):h.createCommentVNode("",!0),h.createElementVNode("p",null,h.toDisplayString(n.value),1),s.value&&u.value!==""?(h.openBlock(),h.createBlock($e,{key:1,name:u.value},null,8,["name"])):h.createCommentVNode("",!0)]),d.value?(h.openBlock(),h.createElementBlock("div",RA,[h.createElementVNode("div",{ref_key:"menuButton",ref:a,class:"ag-header-cell-menu-button",style:h.normalizeStyle(g.value)},[h.createVNode(Wt,{variant:"icon",onClick:h.withModifiers(m,["stop","prevent"])},{default:h.withCtx(()=>[h.createVNode($e,{name:"menu"})]),_:1})],4)])):h.createCommentVNode("",!0)],4))}}),Td=Ro(FA,[["__scopeId","data-v-a5b61e33"]]),xA=Ha.withParams({headerHeight:"30px",headerBackgroundColor:"#F7F8F8",headerCellHoverBackgroundColor:"#F7F8F8",headerColumnResizeHandleHeight:"50%",headerColumnResizeHandleWidth:"3px",headerColumnBorder:"none",headerFontWeight:"bold",headerFontSize:"12px",fontFamily:"Inter, sans-serif",fontSize:12,headerRowBorder:!0,rowHoverColor:"#F7F8F8",rangeSelectionBorderColor:"#36C5BA",rangeSelectionBorderStyle:"solid",wrapperBorder:"none",wrapperBorderRadius:"0px",menuBackgroundColor:"white",accentColor:"#36C5BA"}),DA=Ha.withParams({headerHeight:"30px",headerBackgroundColor:"white",headerCellHoverBackgroundColor:"#F7F8F8",headerColumnResizeHandleHeight:"50%",headerColumnResizeHandleWidth:"3px",headerColumnBorder:"none",headerFontWeight:"bold",headerFontSize:"12px",fontFamily:"Inter, sans-serif",fontSize:12,headerRowBorder:!0,rowHoverColor:"#F7F8F8",rangeSelectionBorderColor:"#36C5BA",rangeSelectionBorderStyle:"solid",wrapperBorder:"none",wrapperBorderRadius:"0px",menuBackgroundColor:"white",accentColor:"#36C5BA"}),MA={class:"pv-popover-menu"},PA={class:"pv-popover",style:{"--height":"auto"}},EA=["disabled"],AA=h.defineComponent({__name:"ExportMenu",props:{getCsvData:{type:Function}},setup(e){const t=e,o=h.ref(!1);async function i(){o.value=!0;const s=await t.getCsvData();if(!s){o.value=!1;return}const n=new Blob([s],{type:"text/csv;charset=utf-8;"}),r=document.createElement("a");r.href=URL.createObjectURL(n),r.setAttribute("download","datatable_export.csv"),r.click(),o.value=!1}return(s,n)=>(h.openBlock(),h.createElementBlock("nav",MA,[n[0]||(n[0]=h.createElementVNode("button",{type:"button",class:"pv-button-icon"},[h.createElementVNode("svg",{"aria-hidden":"true",class:"pv-icon-24"},[h.createElementVNode("title",null,"ellipsis"),h.createElementVNode("use",{"xlink:href":"#ellipsis"})])],-1)),h.createElementVNode("div",PA,[h.createElementVNode("button",{class:"pv-button pv-text-body-sm pv-inset-square-8",onClick:h.withModifiers(i,["prevent"]),disabled:o.value},[o.value?(h.openBlock(),h.createElementBlock(h.Fragment,{key:0},[h.createTextVNode("Exporting...")],64)):(h.openBlock(),h.createElementBlock(h.Fragment,{key:1},[h.createTextVNode("Download CSV")],64))],8,EA)])]))}}),TA={key:1,class:""},IA=h.defineComponent({__name:"PaginationPanel",props:{panelSize:{default:"xl"}},setup(e){$c.registerModules([qF]);const t=h.inject("gridApi"),o=h.inject("currentPage"),i=h.inject("totalPages"),s=e,n=h.computed(()=>{const d=i.value,c=o.value;if(d<=7)return Array.from({length:d},(p,g)=>g+1);const u=[];return c<=4?u.push(1,2,3,4,5,"...",d):c>=d-3?u.push(1,"...",d-4,d-3,d-2,d-1,d):u.push(1,"...",c-1,c,c+1,"...",d),u}),r=()=>{o.value>0&&t?.value.paginationGoToPage(o.value-2)},a=()=>{o.value<i.value&&t?.value.paginationGoToPage(o.value)},l=d=>{d>=1&&d<=i.value&&t?.value.paginationGoToPage(d-1)};return(d,c)=>(h.openBlock(),h.createElementBlock("div",{class:h.normalizeClass(["pv-flex",{"pv-hide":h.unref(i)<=1}])},[h.createVNode(Wt,{variant:"icon",onClick:r,disabled:h.unref(o)===1,size:s.panelSize==="l"?"small":void 0},{default:h.withCtx(()=>[h.createVNode($e,{name:"chevron-left"})]),_:1},8,["disabled","size"]),(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(n.value,u=>(h.openBlock(),h.createElementBlock(h.Fragment,{key:u},[typeof u=="number"?(h.openBlock(),h.createBlock(Wt,{key:0,variant:u===h.unref(o)?"primary":"tertiary",size:s.panelSize==="l"?"small":void 0,onClick:p=>l(u)},{default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(u),1)]),_:2},1032,["variant","size","onClick"])):(h.openBlock(),h.createElementBlock("span",TA,"..."))],64))),128)),h.createVNode(Wt,{variant:"icon",onClick:a,disabled:h.unref(o)===h.unref(i),size:s.panelSize==="l"?"small":void 0},{default:h.withCtx(()=>[h.createVNode($e,{name:"chevron-right"})]),_:1},8,["disabled","size"])],2))}});function LA(){}function Id(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}function Ld(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const kA="[object RegExp]",GA="[object String]",OA="[object Number]",BA="[object Boolean]",kd="[object Arguments]",NA="[object Symbol]",HA="[object Date]",VA="[object Map]",_A="[object Set]",zA="[object Array]",WA="[object Function]",UA="[object ArrayBuffer]",Ar="[object Object]",$A="[object Error]",jA="[object DataView]",KA="[object Uint8Array]",YA="[object Uint8ClampedArray]",qA="[object Uint16Array]",QA="[object Uint32Array]",XA="[object BigUint64Array]",ZA="[object Int8Array]",JA="[object Int16Array]",eT="[object Int32Array]",tT="[object BigInt64Array]",oT="[object Float32Array]",iT="[object Float64Array]";function Gd(e){if(!e||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);return t===null||t===Object.prototype||Object.getPrototypeOf(t)===null?Object.prototype.toString.call(e)==="[object Object]":!1}function sT(e,t){return e===t||Number.isNaN(e)&&Number.isNaN(t)}function nT(e,t,o){return Gi(e,t,void 0,void 0,void 0,void 0,o)}function Gi(e,t,o,i,s,n,r){const a=r(e,t,o,i,s,n);if(a!==void 0)return a;if(typeof e==typeof t)switch(typeof e){case"bigint":case"string":case"boolean":case"symbol":case"undefined":return e===t;case"number":return e===t||Object.is(e,t);case"function":return e===t;case"object":return qi(e,t,n,r)}return qi(e,t,n,r)}function qi(e,t,o,i){if(Object.is(e,t))return!0;let s=Ld(e),n=Ld(t);if(s===kd&&(s=Ar),n===kd&&(n=Ar),s!==n)return!1;switch(s){case GA:return e.toString()===t.toString();case OA:{const l=e.valueOf(),d=t.valueOf();return sT(l,d)}case BA:case HA:case NA:return Object.is(e.valueOf(),t.valueOf());case kA:return e.source===t.source&&e.flags===t.flags;case WA:return e===t}o=o??new Map;const r=o.get(e),a=o.get(t);if(r!=null&&a!=null)return r===t;o.set(e,t),o.set(t,e);try{switch(s){case VA:{if(e.size!==t.size)return!1;for(const[l,d]of e.entries())if(!t.has(l)||!Gi(d,t.get(l),l,e,t,o,i))return!1;return!0}case _A:{if(e.size!==t.size)return!1;const l=Array.from(e.values()),d=Array.from(t.values());for(let c=0;c<l.length;c++){const u=l[c],p=d.findIndex(g=>Gi(u,g,void 0,e,t,o,i));if(p===-1)return!1;d.splice(p,1)}return!0}case zA:case KA:case YA:case qA:case QA:case XA:case ZA:case JA:case eT:case tT:case oT:case iT:{if(typeof Buffer<"u"&&Buffer.isBuffer(e)!==Buffer.isBuffer(t)||e.length!==t.length)return!1;for(let l=0;l<e.length;l++)if(!Gi(e[l],t[l],l,e,t,o,i))return!1;return!0}case UA:return e.byteLength!==t.byteLength?!1:qi(new Uint8Array(e),new Uint8Array(t),o,i);case jA:return e.byteLength!==t.byteLength||e.byteOffset!==t.byteOffset?!1:qi(new Uint8Array(e),new Uint8Array(t),o,i);case $A:return e.name===t.name&&e.message===t.message;case Ar:{if(!(qi(e.constructor,t.constructor,o,i)||Gd(e)&&Gd(t)))return!1;const d=[...Object.keys(e),...Id(e)],c=[...Object.keys(t),...Id(t)];if(d.length!==c.length)return!1;for(let u=0;u<d.length;u++){const p=d[u],g=e[p];if(!Object.hasOwn(t,p))return!1;const f=t[p];if(!Gi(g,f,p,e,t,o,i))return!1}return!0}default:return!1}}finally{o.delete(e),o.delete(t)}}function ks(e,t){return nT(e,t,LA)}const rT={key:0,class:"pv-tag"},aT=h.defineComponent({__name:"TagCellRenderer",props:{params:{}},setup(e){const t=e,o=h.computed(()=>{const i=t.params.valueFormatted||t.params.value||"";return i.trim()===""?null:i});return(i,s)=>o.value?(h.openBlock(),h.createElementBlock("div",rT,h.toDisplayString(o.value),1)):h.createCommentVNode("",!0)}}),lT={key:0,class:"pv-table-row-number"},dT=h.defineComponent({__name:"RowCountCellRenderer",props:{params:{}},setup(e){const t=e,o=h.computed(()=>(t.params.node?.rowIndex||0)+1),i=h.computed(()=>{const n=t.params.column?.getColDef()?.context,r=t.params.valueFormatted||t.params.value;return n&&n.dataType&&[wt.Currency,wt.Percent,wt.Number,wt.Integer].includes(n.dataType)?r.toLocaleString():r});return(s,n)=>(h.openBlock(),h.createElementBlock("div",null,[h.createElementVNode("p",null,[o.value?(h.openBlock(),h.createElementBlock("span",lT,h.toDisplayString(o.value),1)):h.createCommentVNode("",!0),h.createTextVNode(" "+h.toDisplayString(i.value),1)])]))}}),cT=Ro(dT,[["__scopeId","data-v-ae67b797"]]),uT={style:{"background-color":"white"},class:"pv-inset-square-8 pv-bordered-md pv-text-md"},hT={style:{color:"black"}},pT=h.defineComponent({__name:"TableTooltip",props:{params:{}},setup(e){return(t,o)=>(h.openBlock(),h.createElementBlock("div",uT,[h.createElementVNode("p",hT,h.toDisplayString(t.params.value),1)]))}}),gT={class:"pv-stack-8"},fT={class:"pv-flex pv-space-between",style:{"align-items":"start"}},mT={class:"pv-flex"},CT={key:0,class:"pv-table-overlay"},vT={class:"pv-text-body-xs pv-text-center",style:{"padding-top":"50px"}},wT=h.defineComponent({__name:"PvDataTable",props:{colDefs:{},rowData:{},serverSideRowHandler:{},filterValuesSetHandler:{},initialGridState:{},initialFilterValueMap:{},theme:{},displayBaseAggregationsOnly:{type:Boolean,default:!1},displayRowNumber:{type:Boolean,default:!1},displayGroupCount:{type:Boolean,default:!0},displayPreferencesIcon:{type:Boolean,default:!1},enableVerticalFilterPanel:{type:Boolean,default:!0},enableColumnVisibilitySelector:{type:Boolean,default:!1},enableGroupBySelector:{type:Boolean,default:!1},rowGroupLimit:{},groupDefaultExpanded:{default:1},isClientSideGroupOpenByDefault:{},enableCsvExport:{type:Boolean,default:!1},csvRowLimit:{default:2e4},serverSideCsvHandler:{},uniqueRowIdField:{},requireFiltersToShowData:{type:Boolean,default:!1},isLoading:{type:Boolean},containerHeight:{default:500},containerMinHeight:{default:200},debugMode:{type:Boolean,default:!1},pagination:{type:Boolean,default:!1},paginationPageSize:{default:50},rowHeight:{},tooltipShowDelay:{default:1e3},tooltipHideDelay:{},hideTable:{type:Boolean}},emits:["column-moved","column-resized","column-row-group-changed","grid-ready","filter-changed","sort-changed","filter-opened","first-data-rendered","handle-settings-icon"],setup(e,{expose:t,emit:o}){const i=[eF,JR,Pw,CD,aF,pF,yP,bP,ID,RM,WF,IF,ZF];lh.setLicenseKey("Using_this_{AG_Grid}_Enterprise_key_{AG-065231}_in_excess_of_the_licence_granted_is_not_permitted___Please_report_misuse_to_legal@ag-grid.com___For_help_with_changing_this_key_please_contact_info@ag-grid.com___{Turquoise_Health}_is_granted_a_{Multiple_Applications}_Developer_License_for_{3}_Front-End_JavaScript_developers___All_Front-End_JavaScript_developers_need_to_be_licensed_in_addition_to_the_ones_working_with_{AG_Grid}_Enterprise___This_key_has_been_granted_a_Deployment_License_Add-on_for_{2}_Production_Environments___This_key_works_with_{AG_Grid}_Enterprise_versions_released_before_{16_August_2025}____[v3]_[01]_MTc1NTI5ODgwMDAwMA==c042c2db0e82c322692ccb41e7b58f3e");const n=e;n.debugMode&&i.push(Ub);const r=h.computed(()=>({height:`${n.containerHeight}px`,minHeight:`${n.containerMinHeight}px`})),a=h.computed(()=>n.theme?n.theme:S.value.length>0?DA:xA),l=o,d="serverSideRowHandler"in n&&n.serverSideRowHandler?{getRows:E=>{if(!T.value){E.success({rowData:[]});return}n.serverSideRowHandler?.(E)}}:null,c="filterValuesSetHandler"in n&&n.filterValuesSetHandler?async E=>{let K={...w.value};!b.value&&n.initialGridState&&(K=n.initialGridState.filter?.filterModel||{});const ie=await z(E.api,E.colDef,E.column,K);E.success([...ie,""])}:null,u=E=>{const K=E.node,ie=E.column?.getColId();return!K.group||!ie?!1:N.value.some(ye=>{if(ye.field===ie)return!0})},p=(()=>{const E={suppressHeaderFilterButton:!0,editable:!1,sortable:!0,suppressHeaderMenuButton:!0,suppressColumnsToolPanel:!0,minWidth:200,flex:1,headerComponent:Td,cellDataType:!1,tooltipComponent:pT,cellRendererSelector:K=>{if(n.displayRowNumber&&S.value.length===0){const ie=K.api.getAllDisplayedColumns()||[],ye=K.column;if(ie.findIndex(je=>je===ye)===0)return{component:cT,params:K}}if(u(K))return{component:TE,params:K}}};return d&&c&&(E.filterParams={values:c}),E})(),g=h.ref(void 0),f={name:"Column Filter",icon:'<span class="ag-icon ag-icon-filter"></span>',action:function(E){let K=E.column?.getColId();if(E.column&&Re(E.column)&&(K=L.value?.getColId()||""),!me(K)){const ye=E.api.getColumn(K)?.getColDef();ye&&(v.value=ye,h.nextTick(()=>{me(K)}))}}},m=(E,K)=>{const ie={...E};return K.dataType===wt.Percent&&!E.valueFormatter?ie.valueFormatter=yA:K.dataType===wt.Currency&&!E.valueFormatter&&(ie.valueFormatter=SA),K.dataType===wt.Tag&&!E.cellRenderer&&(ie.cellRenderer=aT),ie},C=h.computed(()=>!n.colDefs||n.colDefs.length===0?[]:n.colDefs.map(E=>{const K=E.context;return K?m(E,K):E})),v=h.ref(null),S=h.ref([]),b=h.ref(!1),x=h.computed(()=>{if(S.value.length>0){const E=S.value[0],K=C.value.find(ye=>ye.field===E);if((!w.value||!w.value[E])&&K?.context?.filterRequiredToGroup)return K.headerName}return null}),T=h.computed(()=>(!w.value||Object.keys(w.value).length===0)&&n.requireFiltersToShowData?!1:x.value===null),A=h.computed(()=>x.value?`Select at least one value for "${x.value}" to view data.`:"Select a filter to view data."),P=h.shallowRef(null),y=h.ref([]),{filterModel:w,filterValuesLoadingStatus:R,filterValueMap:F,filterValueSelectedMetadataMap:H,fetchFilterValues:z,filterStoreHandler:k}=tl();k.value=n.filterValuesSetHandler,F.value=n.initialFilterValueMap||{};const V=h.ref(null),G=h.computed(()=>C.value.filter(E=>E.filter)),B=h.computed(()=>C.value.filter(E=>E.enableRowGroup)),N=h.computed(()=>C.value.filter(E=>E.aggFunc)),L=h.ref(null),Y=h.ref({}),W=h.ref(1),q=h.ref(0);h.provide("filterModel",w),h.provide("sortState",y),h.provide("gridApi",P),h.provide("columnDisplayOrder",V),h.provide("currentlyActiveFilter",v),h.provide("availableFilterColumns",G),h.provide("availableRowGroupColumns",B),h.provide("rowGroupColumnFields",S),h.provide("groupColumnCellValueColumn",L),h.provide("expandedRows",Y),h.provide("firstDataRendered",b),h.provide("filterValuesLoadingStatus",R),h.provide("displayUnfilteredTableData",T),h.provide("currentPage",W),h.provide("totalPages",q);const $=E=>{if(P.value=E.api,n.initialGridState){const K=n.initialGridState.filter?.filterModel||null;K&&P.value.setFilterModel(K)}if(S.value.length>0){const K=S.value[0];L.value=E.api.getColumn(K),E.api.setColumnsVisible([K],!1)}V.value=E.api.getAllGridColumns(),W.value=E.api.paginationGetCurrentPage()+1,q.value=E.api.paginationGetTotalPages(),l("grid-ready",E)},ge=E=>{if(P.value){const K=E.api.getFilterModel();ks(w.value,K)||(w.value=K,l("filter-changed",E))}},fe=E=>{y.value=E.api?.getState()?.sort?.sortModel||[],l("sort-changed",E)},Re=E=>E.getColId()&&E.getColId().includes("ag-Grid-AutoColumn"),Fe=h.ref(!1),se=async E=>{if(!P.value){console.error("Grid API not available");return}const K=E||{route:[],purge:!0};P.value.refreshServerSide(K)},re=()=>H.value,de=async()=>{if(Fe.value=!0,!P.value)return console.error("Grid API not available"),Fe.value=!1,null;try{const E=n.serverSideCsvHandler,K=P.value?.getState(),ie={rowGroupCols:[],valueCols:P.value?.getValueColumns().map(xe=>({id:xe.getId(),field:xe.getColDef().field,aggFunc:typeof xe.getColDef().aggFunc=="string"?xe.getColDef().aggFunc:void 0,displayName:xe.getColDef().headerName||xe.getColDef().field||""}))||[],filterModel:K?.filter?.filterModel||{},sortModel:K?.sort?.sortModel||[],pivotCols:[],pivotMode:!1,groupKeys:[],startRow:0,endRow:n.csvRowLimit};if(E){const xe={request:ie,parentNode:{},api:P.value,context:void 0,success:()=>{},fail:()=>{}};return await n.serverSideCsvHandler(xe),Fe.value=!1,null}const ye=n.serverSideRowHandler;return ye?await new Promise((xe,je)=>{const Qe=P.value?.getState(),xo={request:ie,parentNode:{},api:P.value,context:void 0,success:fs=>{const op=P.value?.getRowGroupColumns().map(rt=>rt.getColDef().field).filter(rt=>!!rt)||[],ip=P.value?.getAllDisplayedColumns().map(rt=>rt.getColDef().field).filter(rt=>!!rt)||[],sp=P.value?.getValueColumns().map(rt=>rt.getColDef().field).filter(rt=>!!rt)||[],np=Array.from(new Set([...op,...ip,...sp])),rp=fs.rowData.map(rt=>{const ol={};return np.forEach(il=>{const sl=rt[il];ol[il]=sl!=null?String(sl):null}),ol}),ap=AP.unparse(rp);Fe.value=!1,xe(ap)},fail:()=>{Fe.value=!1,je("CSV export failed.")}};ye(xo,!0)}):(console.warn("Client-side export does not return CSV string"),Fe.value=!1,P.value.exportDataAsCsv(),null)}catch(E){return console.error("CSV export failed",E),Fe.value=!1,null}},I=E=>{const K=L.value,ie=E.api.getRowGroupColumns();S.value=[...ie].map(je=>je.getColId());const ye=ie.length>0?ie[0]:null;ye?(L.value=ye,be.value.headerName=ye.getColDef().headerName,be.value.headerComponent=Td,be.value.context={dataType:L.value?.getColDef().context?.dataType||null},E.api.setColumnsVisible([ye.getColId()],!1)):(L.value=null,be.value.headerName="",be.value.headerComponent=void 0,be.value.context=null);const xe=K?.getColId();(!ye||xe!==ye.getColId())&&E.api.setColumnsVisible([xe||""],!0),l("column-row-group-changed",E)},X=E=>{const K=E.column?.getColId()||"";if(K===L.value?.getColId()){E.api.setColumnsVisible([K],!1);return}},Q=E=>{E.finished&&(V.value=E.api.getAllGridColumns()),l("column-moved",E)},ue=E=>{E.api&&(W.value=E.api.paginationGetCurrentPage()+1,q.value=E.api.paginationGetTotalPages())},we=E=>"allChildrenRowCount"in E&&E.allChildrenRowCount||0,me=E=>{const K=document.querySelector(`[data-horizontal-filter-field="${E}"]`);if(K){const ie=K.querySelector("button");if(ie)return ie.click(),!0}return!1},nt=h.ref(wE),ce=h.ref({loadingMessage:"One moment please..."}),be=h.ref({headerName:"",minWidth:200,suppressMovable:!0,sortable:!1,pinned:"left",headerComponent:void 0,cellRendererParams:{suppressCount:!0,innerRenderer:DE,innerRendererParams:E=>({displayBaseAggregationsOnly:n.displayBaseAggregationsOnly,displayRowNumber:n.displayRowNumber,displayCount:n.displayGroupCount,formattedValue:E.valueFormatted,rowNode:E.node,api:P.value})}}),kt=E=>{if(E.node.group)return{backgroundColor:"#F7F8F8"}},ao={Median:E=>{const K=E.values;if(E.rowNode.leafGroup){const xe=Pd(K);return{values:K,value:xe}}const ie=E.values.flatMap(xe=>xe.values||[]),ye=Pd(ie);return{values:ie,value:ye}}};h.onBeforeMount(()=>{const E=Array.isArray(n.rowData)&&n.rowData.length>0,K=typeof n.serverSideRowHandler=="function",ie=typeof n.filterValuesSetHandler=="function";(E&&K||E&&ie)&&console.warn("Only one of `rowData` or `serverSideRowHandler + hasFilterValuesSetHandler` params should be provided to PvDataTable, not both."),g.value=ye=>{const xe=["sortAscending","sortDescending","sortUnSort","rowUnGroup","valueAggSubMenu"],je=ye.column&&Re(ye.column)?L.value:ye.column;return je&&je.getColDef().filter&&xe.splice(2,0,f),xe.filter(Qe=>typeof Qe=="string"?ye.defaultItems.includes(Qe):!0)}});const gt=E=>{const K=P.value;if(!K)return;const ie=E.filter?.filterModel||null,ye=E.rowGroup?.groupColIds||null,xe=E.columnVisibility||null;ie&&!ks(ie,ie.value)&&K.setFilterModel(ie),ye&&!ks(ye,S.value)&&K.setRowGroupColumns(ye),xe&&!ks(xe,V.value)&&K.setColumnsVisible(xe.hiddenColIds,!1)};h.watch(()=>n.initialGridState,()=>{n.initialGridState&&gt(n.initialGridState)},{deep:!0}),h.onMounted(()=>{n.initialGridState&&(w.value=n.initialGridState.filter?.filterModel||null,S.value=n.initialGridState.rowGroup?.groupColIds||[])});const Fo=E=>{b.value=!0,l("first-data-rendered",E)};t({getCsvData:de,refreshData:se,getFilterValueSelectedMetadataMap:re});const He=E=>d?E.rowNode.level===S.value.length-2:!1,ft=h.computed(()=>{if(!d)return n.groupDefaultExpanded});return(E,K)=>(h.openBlock(),h.createElementBlock("div",{class:"pv-full-width",style:h.normalizeStyle(r.value)},[h.createElementVNode("div",gT,[h.createElementVNode("div",fT,[G.value.length>0?(h.openBlock(),h.createBlock(wA,{key:0,"enable-vertical-panel":E.enableVerticalFilterPanel,"display-preferences-icon":E.displayPreferencesIcon,onHandleSettingsIcon:K[0]||(K[0]=ie=>E.$emit("handle-settings-icon",ie))},null,8,["enable-vertical-panel","display-preferences-icon"])):h.createCommentVNode("",!0),h.createElementVNode("div",mT,[E.enableGroupBySelector&&E.rowGroupLimit!==0?(h.openBlock(),h.createBlock(fE,{key:0,rowGroupLimit:E.rowGroupLimit},null,8,["rowGroupLimit"])):h.createCommentVNode("",!0),E.enableCsvExport?(h.openBlock(),h.createBlock(AA,{key:1,getCsvData:de})):h.createCommentVNode("",!0)])])]),h.createElementVNode("div",{class:h.normalizeClass(["pv-relative pv-stack-8",E.hideTable?"pv-hide":""]),style:{width:"100%",height:"90%","border-bottom":"1px solid #d2d7db"}},[h.createVNode(h.unref(lx),h.mergeProps({ref:"gridRef",style:{width:"100%",height:"100%"}},h.unref(d)?{serverSideDatasource:h.unref(d)}:{},{onColumnMoved:Q,onColumnRowGroupChanged:I,onColumnVisible:X,onFilterChanged:ge,onFilterOpened:K[1]||(K[1]=ie=>l("filter-opened",ie)),onFirstDataRendered:Fo,onGridReady:$,onPaginationChanged:ue,onSortChanged:fe,aggFuncs:ao,autoGroupColumnDef:be.value,columnDefs:C.value,debug:E.debugMode,defaultColDef:h.unref(p),getChildCount:we,getMainMenuItems:g.value,getRowStyle:kt,groupDefaultExpanded:ft.value,groupDisplayType:"singleColumn",initialState:E.initialGridState,isGroupOpenByDefault:h.unref(d)?void 0:n.isClientSideGroupOpenByDefault,isServerSideGroupOpenByDefault:He,loading:h.unref(d)?!1:E.isLoading,loadingCellRenderer:nt.value,loadingCellRendererParams:ce.value,maxConcurrentDatasourceRequests:h.unref(d)?10:void 0,modules:i,rowData:E.rowData,rowHeight:E.rowHeight,rowModelType:h.unref(d)?"serverSide":"clientSide",serverSideInitialRowCount:h.unref(d)?1:void 0,showOpenedGroup:!0,suppressAggFuncInHeader:!0,suppressColumnMoveAnimation:!0,suppressDragLeaveHidesColumns:!0,serverSideSortAllLevels:!1,serverSideEnableClientSideSort:!1,theme:a.value,pagination:E.pagination,suppressPaginationPanel:!0,paginationPageSize:E.paginationPageSize,suppressScrollOnNewData:!0,"tooltip-show-delay":E.tooltipShowDelay,"tooltip-hide-delay":E.tooltipHideDelay}),null,16,["autoGroupColumnDef","columnDefs","debug","defaultColDef","getMainMenuItems","groupDefaultExpanded","initialState","isGroupOpenByDefault","loading","loadingCellRenderer","loadingCellRendererParams","maxConcurrentDatasourceRequests","rowData","rowHeight","rowModelType","serverSideInitialRowCount","theme","pagination","paginationPageSize","tooltip-show-delay","tooltip-hide-delay"]),T.value?h.createCommentVNode("",!0):(h.openBlock(),h.createElementBlock("div",CT,[h.createElementVNode("p",vT,h.toDisplayString(A.value),1)]))],2),E.pagination?(h.openBlock(),h.createBlock(IA,{key:0})):h.createCommentVNode("",!0)],4))}});exports.PvDataTable=wT;