@scvzerng/element-ui-ag-grid-vue2 0.0.35 → 0.0.36

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,6 +1,6 @@
1
- (function(L,H){typeof exports=="object"&&typeof module<"u"?H(exports,require("lodash-unified"),require("md5"),require("vue"),require("element-ui")):typeof define=="function"&&define.amd?define(["exports","lodash-unified","md5","vue","element-ui"],H):(L=typeof globalThis<"u"?globalThis:L||self,H(L.ElementPlusAgGrid={},L.lodashUnified,L.oe,L.Vue,L.elementUi))})(this,function(L,H,Oe,E,Ad){"use strict";var p0=Object.defineProperty;var f0=(L,H,Oe)=>H in L?p0(L,H,{enumerable:!0,configurable:!0,writable:!0,value:Oe}):L[H]=Oe;var R=(L,H,Oe)=>f0(L,typeof H!="symbol"?H+"":H,Oe);var Rd,Ed;var je=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){this.getGlobalListeners(t).add(e)}removeGlobalListener(e,t=!1){this.getGlobalListeners(t).delete(e)}dispatchEvent(e){this.dispatchToListeners(e,!0),this.dispatchToListeners(e,!1),this.firedEvents[e.type]=!0}dispatchEventOnce(e){this.firedEvents[e.type]||this.dispatchEvent(e)}dispatchToListeners(e,t){const o=e.type;if(t&&"event"in e){const l=e.event;l instanceof Event&&(e.eventPath=l.composedPath())}const{frameworkOverrides:i}=this,s=l=>{const a=i?()=>i.wrapIncoming(l):l;t?this.dispatchAsync(a):a()},n=this.getListeners(o,t,!1);if(((n==null?void 0:n.size)??0)>0){const l=new Set(n);for(const a of l)n!=null&&n.has(a)&&s(()=>a(e))}const r=this.getGlobalListeners(t);if(r.size>0){const l=new Set(r);for(const a of l)s(()=>a(o,e))}}getGlobalListeners(e){return e?this.globalAsyncListeners:this.globalSyncListeners}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 Md(e,t){return t}function vn(e){return(e==null?void 0:e.getLocaleTextFunc())??Md}function qe(e){return e==null||e===""?null:e}function M(e){return e!=null&&e!==""}function K(e){return!M(e)}function Mi(e){return e!=null&&typeof e.toString=="function"?e.toString():null}function bn(e,t){const o=e?JSON.stringify(e):null,i=t?JSON.stringify(t):null;return o===i}function kd(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,l){return r>l?1:r<l?-1:0}if(typeof e!="string"||!o)return n(e,t);try{return e.localeCompare(t)}catch{return n(e,t)}}var Sn=new Set(["__proto__","constructor","prototype"]);function Ld(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).filter(i=>!Sn.has(i)))t(o,e[o])}}function re(e,t,o=!0,i=!1){M(t)&&Ld(t,(s,n)=>{let r=e[s];r!==n&&(i&&r==null&&n!=null&&typeof n=="object"&&n.constructor===Object&&(r={},e[s]=r),yn(n)&&yn(r)&&!Array.isArray(r)?re(r,n,o,i):(o||n!==void 0)&&(e[s]=n))})}function Wt(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 yn(e){return typeof e=="object"&&e!==null}var ki=class ut{static applyGlobalGridOptions(t){if(!ut.gridOptions)return{...t};let o={};return re(o,ut.gridOptions,!0,!0),ut.mergeStrategy==="deep"?re(o,t,!0,!0):o={...o,...t},ut.gridOptions.context&&(o.context=ut.gridOptions.context),t.context&&(ut.mergeStrategy==="deep"&&o.context&&re(t.context,o.context,!0,!0),o.context=t.context),o}};ki.gridOptions=void 0,ki.mergeStrategy="shallow";var Li=ki;function Gd(e,t="shallow"){Li.gridOptions=e,Li.mergeStrategy=t}var Hd={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,rowDragInsertDelay:500,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,enableFilterHandlers:!1};function Se(e,t,o){o==null||typeof o=="string"&&o==""?Rn(e,t):ue(e,t,o)}function ue(e,t,o){e.setAttribute(En(t),o.toString())}function Rn(e,t){e.removeAttribute(En(t))}function En(e){return`aria-${e}`}function Be(e,t){t?e.setAttribute("role",t):e.removeAttribute("role")}function Od(e){let t;return e==="asc"?t="ascending":e==="desc"?t="descending":e==="mixed"?t="other":t="none",t}function Bd(e){return e.getAttribute("aria-label")}function zt(e,t){Se(e,"label",t)}function $t(e,t){Se(e,"labelledby",t)}function xn(e,t){Se(e,"live",t)}function Vd(e,t){Se(e,"atomic",t)}function Nd(e,t){Se(e,"relevant",t)}function _d(e,t){Se(e,"invalid",t)}function Dn(e,t){Se(e,"hidden",t)}function Gi(e,t){ue(e,"expanded",t)}function Wd(e,t){ue(e,"setsize",t)}function zd(e,t){ue(e,"posinset",t)}function $d(e,t){ue(e,"multiselectable",t)}function Ud(e,t){ue(e,"rowcount",t)}function xo(e,t){ue(e,"rowindex",t)}function Kd(e,t){ue(e,"rowspan",t)}function jd(e,t){ue(e,"colcount",t)}function Fn(e,t){ue(e,"colindex",t)}function qd(e,t){ue(e,"colspan",t)}function Yd(e,t){ue(e,"sort",t)}function Zd(e){Rn(e,"sort")}function Hi(e,t){Se(e,"selected",t)}function Qd(e,t){Se(e,"controls",t)}function Xd(e,t){Qd(e,t.id),$t(t,e.id)}function Pn(e,t){Se(e,"owns",t)}function Tn(e,t){return t===void 0?e("ariaIndeterminate","indeterminate"):t===!0?e("ariaChecked","checked"):e("ariaUnchecked","unchecked")}var Oi,Bi,Vi,Ni,_i,Wi,zi;function ht(){return Oi===void 0&&(Oi=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)),Oi}function In(){return Bi===void 0&&(Bi=/(firefox)/i.test(navigator.userAgent)),Bi}function An(){return Vi===void 0&&(Vi=/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)),Vi}function gt(){return Ni===void 0&&(Ni=/iPad|iPhone|iPod/.test(navigator.platform)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1),Ni}function $i(e){if(!e)return null;const t=e.tabIndex,o=e.getAttribute("tabIndex");return t===-1&&(o===null||o===""&&!In())?null:t.toString()}function Jd(){if(zi!==void 0)return zi;if(!document.body)return-1;let e=1e6;const t=In()?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),zi=e,e}function ec(){return Wi==null&&Mn(),Wi}function Mn(){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&&(Wi=o,_i=o===0)}function kn(){return _i==null&&Mn(),_i}var tc="[tabindex], input, select, button, textarea, [href]",Ln="[disabled], .ag-disabled:not(.ag-button), .ag-disabled *";function Ui(e){const t=Element.prototype.matches||Element.prototype.msMatchesSelector,i=t.call(e,"input, select, button, textarea"),s=t.call(e,Ln),n=Me(e);return i&&!s&&n}function Z(e,t,o={}){const{skipAriaHidden:i}=o;e.classList.toggle("ag-hidden",!t),i||Dn(e,!t)}function oc(e,t,o={}){const{skipAriaHidden:i}=o;e.classList.toggle("ag-invisible",!t),i||Dn(e,!t)}function Gn(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 pt(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 Ye(e){const{height:t,width:o,borderTopWidth:i,borderRightWidth:s,borderBottomWidth:n,borderLeftWidth:r,paddingTop:l,paddingRight:a,paddingBottom:d,paddingLeft:c,marginTop:u,marginRight:h,marginBottom:g,marginLeft:p,boxSizing:f}=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(l||"0"),paddingRight:parseFloat(a||"0"),paddingBottom:parseFloat(d||"0"),paddingLeft:parseFloat(c||"0"),marginTop:parseFloat(u||"0"),marginRight:parseFloat(h||"0"),marginBottom:parseFloat(g||"0"),marginLeft:parseFloat(p||"0"),boxSizing:f}}function Ki(e){const t=Ye(e);return t.boxSizing==="border-box"?t.height-t.paddingTop-t.paddingBottom:t.height}function Ut(e){const t=Ye(e);return t.boxSizing==="border-box"?t.width-t.paddingLeft-t.paddingRight:t.width}function ic(e){const{height:t,marginBottom:o,marginTop:i}=Ye(e);return Math.floor(t+o+i)}function ji(e){const{width:t,marginLeft:o,marginRight:i}=Ye(e);return Math.floor(t+o+i)}function Hn(e){const t=e.getBoundingClientRect(),{borderTopWidth:o,borderLeftWidth:i,borderRightWidth:s,borderBottomWidth:n}=Ye(e);return{top:t.top+(o||0),left:t.left+(i||0),right:t.right+(s||0),bottom:t.bottom+(n||0)}}function Do(e,t){let o=e.scrollLeft;return t&&(o=Math.abs(o)),o}function Fo(e,t,o){o&&(t*=-1),e.scrollLeft=t}function he(e){for(;e&&e.firstChild;)e.removeChild(e.firstChild)}function Ae(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function On(e){return!!e.offsetParent}function Me(e){const t=e;return t.checkVisibility?t.checkVisibility({checkVisibilityCSS:!0}):!(!On(e)||window.getComputedStyle(e).visibility!=="visible")}function qi(e){const t=document.createElement("div");return t.innerHTML=(e||"").trim(),t.firstChild}function Bn(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 Vn(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 sc(e){return e.replace(/[A-Z]/g,t=>`-${t.toLocaleLowerCase()}`)}function Kt(e,t){if(t)for(const o of Object.keys(t)){const i=t[o];if(!o||!o.length||i==null)continue;const s=sc(o),n=i.toString(),r=n.replace(/\s*!important/g,""),l=r.length!=n.length?"important":void 0;e.style.setProperty(s,r,l)}}function Po(e){return()=>{const t=e();return t?Nn(t)||_n(t):!0}}function Nn(e){return e.clientWidth<e.scrollWidth}function _n(e){return e.clientHeight<e.scrollHeight}function To(e,t){t==="flex"?(e.style.removeProperty("width"),e.style.removeProperty("minWidth"),e.style.removeProperty("maxWidth"),e.style.flex="1 1 auto"):Ve(e,t)}function Ve(e,t){t=Zi(t),e.style.width=t,e.style.maxWidth=t,e.style.minWidth=t}function Yi(e,t){t=Zi(t),e.style.height=t,e.style.maxHeight=t,e.style.minHeight=t}function Zi(e){return typeof e=="number"?`${e}px`:e}function Qi(e){return e instanceof Node||e instanceof HTMLElement}function ce(e,t,o){o==null||o===""?e.removeAttribute(t):e.setAttribute(t,o.toString())}function Ze(e,t,o){const s=tr(e).ResizeObserver,n=s?new s(o):null;return n==null||n.observe(t),()=>n==null?void 0:n.disconnect()}function Ne(e,t){const o=tr(e);o.requestAnimationFrame?o.requestAnimationFrame(t):o.webkitRequestAnimationFrame?o.webkitRequestAnimationFrame(t):o.setTimeout(t,0)}var Wn="data-ref",Xi;function zn(){return Xi??(Xi=document.createTextNode(" ")),Xi.cloneNode()}function X(e){const{attrs:t,children:o,cls:i,ref:s,role:n,tag:r}=e,l=document.createElement(r);if(i&&(l.className=i),s&&l.setAttribute(Wn,s),n&&l.setAttribute("role",n),t)for(const a of Object.keys(t))l.setAttribute(a,t[a]);if(o)if(typeof o=="string")l.textContent=o;else{let a=!0;for(const d of o)d&&(typeof d=="string"?(l.appendChild(document.createTextNode(d)),a=!1):typeof d=="function"?l.appendChild(d()):(a&&(l.appendChild(zn()),a=!1),l.append(X(d)),l.appendChild(zn())))}return l}var $n={};function Ji(e,t){$n[t]||(e(),$n[t]=!0)}function jt(e,t,...o){e.get("debug")&&console.log("AG Grid: "+t,...o)}function qt(e,...t){Ji(()=>console.warn("AG Grid: "+e,...t),e+(t==null?void 0:t.join("")))}function ft(e,...t){Ji(()=>console.error("AG Grid: "+e,...t),e+(t==null?void 0:t.join("")))}var nc={pending:!1,funcs:[]},rc={pending:!1,funcs:[]};function es(e,t="setTimeout",o){const i=t==="raf"?rc:nc;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"?Ne(o,s):window.setTimeout(s,0)}function ge(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 Un(e,t){let o=0;return function(...i){const s=this,n=Date.now();n-o<t||(o=n,e.apply(s,i))}}function lc(e,t,o=100,i){const s=Date.now();let n=null,r=!1;const l=()=>{const a=Date.now()-s>o;(e()||a)&&(t(),r=!0,n!=null&&(window.clearInterval(n),n=null))};l(),r||(n=window.setInterval(l,10))}var Kn="https://www.ag-grid.com",G="34.1.1",jn=2e3,qn=100,Yn="_version_",Io=null,Ct=`${Kn}/javascript-data-grid`;function ac(e){Io=e}function dc(e){Ct=e}function Zn(e,t,o){return(Io==null?void 0:Io.getConsoleMessage(e,t))??[gc(e,t,o)]}function ts(e,t,o,i){e(`error #${t}`,...Zn(t,o,i))}function cc(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 uc(e){let t=e;return e instanceof Error?t=e.toString():typeof e=="object"&&(t=cc(e)),t}function Ao(e){return e===void 0?"undefined":e===null?"null":e}function os(e,t){return`${e}?${t.toString()}`}function hc(e,t,o){const i=Array.from(t.entries()).sort((n,r)=>r[1].length-n[1].length);let s=os(e,t);for(const[n,r]of i){if(n===Yn)continue;const l=s.length-o;if(l<=0)break;const a="...",d=l+a.length,c=r.length-d>qn?r.slice(0,r.length-d)+a:r.slice(0,qn)+a;t.set(n,c),s=os(e,t)}return s}function Qn(e,t){const o=new URLSearchParams;if(o.append(Yn,G),t)for(const n of Object.keys(t))o.append(n,uc(t[n]));const i=`${Ct}/errors/${e}`,s=os(i,o);return s.length<=jn?s:hc(i,o,jn)}var gc=(e,t,o)=>{const i=Qn(e,t);return`${o?o+`
1
+ (function(L,H){typeof exports=="object"&&typeof module<"u"?H(exports,require("lodash-unified"),require("md5"),require("vue"),require("element-ui")):typeof define=="function"&&define.amd?define(["exports","lodash-unified","md5","vue","element-ui"],H):(L=typeof globalThis<"u"?globalThis:L||self,H(L.ElementPlusAgGrid={},L.lodashUnified,L.oe,L.Vue,L.elementUi))})(this,function(L,H,Oe,E,Ad){"use strict";var f0=Object.defineProperty;var C0=(L,H,Oe)=>H in L?f0(L,H,{enumerable:!0,configurable:!0,writable:!0,value:Oe}):L[H]=Oe;var R=(L,H,Oe)=>C0(L,typeof H!="symbol"?H+"":H,Oe);var Rd,Ed;var je=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){this.getGlobalListeners(t).add(e)}removeGlobalListener(e,t=!1){this.getGlobalListeners(t).delete(e)}dispatchEvent(e){this.dispatchToListeners(e,!0),this.dispatchToListeners(e,!1),this.firedEvents[e.type]=!0}dispatchEventOnce(e){this.firedEvents[e.type]||this.dispatchEvent(e)}dispatchToListeners(e,t){const o=e.type;if(t&&"event"in e){const l=e.event;l instanceof Event&&(e.eventPath=l.composedPath())}const{frameworkOverrides:i}=this,s=l=>{const a=i?()=>i.wrapIncoming(l):l;t?this.dispatchAsync(a):a()},n=this.getListeners(o,t,!1);if(((n==null?void 0:n.size)??0)>0){const l=new Set(n);for(const a of l)n!=null&&n.has(a)&&s(()=>a(e))}const r=this.getGlobalListeners(t);if(r.size>0){const l=new Set(r);for(const a of l)s(()=>a(o,e))}}getGlobalListeners(e){return e?this.globalAsyncListeners:this.globalSyncListeners}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 Md(e,t){return t}function vn(e){return(e==null?void 0:e.getLocaleTextFunc())??Md}function qe(e){return e==null||e===""?null:e}function M(e){return e!=null&&e!==""}function K(e){return!M(e)}function Mi(e){return e!=null&&typeof e.toString=="function"?e.toString():null}function bn(e,t){const o=e?JSON.stringify(e):null,i=t?JSON.stringify(t):null;return o===i}function kd(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,l){return r>l?1:r<l?-1:0}if(typeof e!="string"||!o)return n(e,t);try{return e.localeCompare(t)}catch{return n(e,t)}}var Sn=new Set(["__proto__","constructor","prototype"]);function Ld(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).filter(i=>!Sn.has(i)))t(o,e[o])}}function re(e,t,o=!0,i=!1){M(t)&&Ld(t,(s,n)=>{let r=e[s];r!==n&&(i&&r==null&&n!=null&&typeof n=="object"&&n.constructor===Object&&(r={},e[s]=r),yn(n)&&yn(r)&&!Array.isArray(r)?re(r,n,o,i):(o||n!==void 0)&&(e[s]=n))})}function Wt(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 yn(e){return typeof e=="object"&&e!==null}var ki=class ut{static applyGlobalGridOptions(t){if(!ut.gridOptions)return{...t};let o={};return re(o,ut.gridOptions,!0,!0),ut.mergeStrategy==="deep"?re(o,t,!0,!0):o={...o,...t},ut.gridOptions.context&&(o.context=ut.gridOptions.context),t.context&&(ut.mergeStrategy==="deep"&&o.context&&re(t.context,o.context,!0,!0),o.context=t.context),o}};ki.gridOptions=void 0,ki.mergeStrategy="shallow";var Li=ki;function Gd(e,t="shallow"){Li.gridOptions=e,Li.mergeStrategy=t}var Hd={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,rowDragInsertDelay:500,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,enableFilterHandlers:!1};function Se(e,t,o){o==null||typeof o=="string"&&o==""?Rn(e,t):ue(e,t,o)}function ue(e,t,o){e.setAttribute(En(t),o.toString())}function Rn(e,t){e.removeAttribute(En(t))}function En(e){return`aria-${e}`}function Be(e,t){t?e.setAttribute("role",t):e.removeAttribute("role")}function Od(e){let t;return e==="asc"?t="ascending":e==="desc"?t="descending":e==="mixed"?t="other":t="none",t}function Bd(e){return e.getAttribute("aria-label")}function zt(e,t){Se(e,"label",t)}function $t(e,t){Se(e,"labelledby",t)}function xn(e,t){Se(e,"live",t)}function Vd(e,t){Se(e,"atomic",t)}function Nd(e,t){Se(e,"relevant",t)}function _d(e,t){Se(e,"invalid",t)}function Dn(e,t){Se(e,"hidden",t)}function Gi(e,t){ue(e,"expanded",t)}function Wd(e,t){ue(e,"setsize",t)}function zd(e,t){ue(e,"posinset",t)}function $d(e,t){ue(e,"multiselectable",t)}function Ud(e,t){ue(e,"rowcount",t)}function xo(e,t){ue(e,"rowindex",t)}function Kd(e,t){ue(e,"rowspan",t)}function jd(e,t){ue(e,"colcount",t)}function Fn(e,t){ue(e,"colindex",t)}function qd(e,t){ue(e,"colspan",t)}function Yd(e,t){ue(e,"sort",t)}function Zd(e){Rn(e,"sort")}function Hi(e,t){Se(e,"selected",t)}function Qd(e,t){Se(e,"controls",t)}function Xd(e,t){Qd(e,t.id),$t(t,e.id)}function Pn(e,t){Se(e,"owns",t)}function Tn(e,t){return t===void 0?e("ariaIndeterminate","indeterminate"):t===!0?e("ariaChecked","checked"):e("ariaUnchecked","unchecked")}var Oi,Bi,Vi,Ni,_i,Wi,zi;function ht(){return Oi===void 0&&(Oi=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)),Oi}function In(){return Bi===void 0&&(Bi=/(firefox)/i.test(navigator.userAgent)),Bi}function An(){return Vi===void 0&&(Vi=/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)),Vi}function gt(){return Ni===void 0&&(Ni=/iPad|iPhone|iPod/.test(navigator.platform)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1),Ni}function $i(e){if(!e)return null;const t=e.tabIndex,o=e.getAttribute("tabIndex");return t===-1&&(o===null||o===""&&!In())?null:t.toString()}function Jd(){if(zi!==void 0)return zi;if(!document.body)return-1;let e=1e6;const t=In()?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),zi=e,e}function ec(){return Wi==null&&Mn(),Wi}function Mn(){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&&(Wi=o,_i=o===0)}function kn(){return _i==null&&Mn(),_i}var tc="[tabindex], input, select, button, textarea, [href]",Ln="[disabled], .ag-disabled:not(.ag-button), .ag-disabled *";function Ui(e){const t=Element.prototype.matches||Element.prototype.msMatchesSelector,i=t.call(e,"input, select, button, textarea"),s=t.call(e,Ln),n=Me(e);return i&&!s&&n}function Z(e,t,o={}){const{skipAriaHidden:i}=o;e.classList.toggle("ag-hidden",!t),i||Dn(e,!t)}function oc(e,t,o={}){const{skipAriaHidden:i}=o;e.classList.toggle("ag-invisible",!t),i||Dn(e,!t)}function Gn(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 pt(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 Ye(e){const{height:t,width:o,borderTopWidth:i,borderRightWidth:s,borderBottomWidth:n,borderLeftWidth:r,paddingTop:l,paddingRight:a,paddingBottom:d,paddingLeft:c,marginTop:u,marginRight:h,marginBottom:g,marginLeft:p,boxSizing:f}=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(l||"0"),paddingRight:parseFloat(a||"0"),paddingBottom:parseFloat(d||"0"),paddingLeft:parseFloat(c||"0"),marginTop:parseFloat(u||"0"),marginRight:parseFloat(h||"0"),marginBottom:parseFloat(g||"0"),marginLeft:parseFloat(p||"0"),boxSizing:f}}function Ki(e){const t=Ye(e);return t.boxSizing==="border-box"?t.height-t.paddingTop-t.paddingBottom:t.height}function Ut(e){const t=Ye(e);return t.boxSizing==="border-box"?t.width-t.paddingLeft-t.paddingRight:t.width}function ic(e){const{height:t,marginBottom:o,marginTop:i}=Ye(e);return Math.floor(t+o+i)}function ji(e){const{width:t,marginLeft:o,marginRight:i}=Ye(e);return Math.floor(t+o+i)}function Hn(e){const t=e.getBoundingClientRect(),{borderTopWidth:o,borderLeftWidth:i,borderRightWidth:s,borderBottomWidth:n}=Ye(e);return{top:t.top+(o||0),left:t.left+(i||0),right:t.right+(s||0),bottom:t.bottom+(n||0)}}function Do(e,t){let o=e.scrollLeft;return t&&(o=Math.abs(o)),o}function Fo(e,t,o){o&&(t*=-1),e.scrollLeft=t}function he(e){for(;e&&e.firstChild;)e.removeChild(e.firstChild)}function Ae(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function On(e){return!!e.offsetParent}function Me(e){const t=e;return t.checkVisibility?t.checkVisibility({checkVisibilityCSS:!0}):!(!On(e)||window.getComputedStyle(e).visibility!=="visible")}function qi(e){const t=document.createElement("div");return t.innerHTML=(e||"").trim(),t.firstChild}function Bn(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 Vn(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 sc(e){return e.replace(/[A-Z]/g,t=>`-${t.toLocaleLowerCase()}`)}function Kt(e,t){if(t)for(const o of Object.keys(t)){const i=t[o];if(!o||!o.length||i==null)continue;const s=sc(o),n=i.toString(),r=n.replace(/\s*!important/g,""),l=r.length!=n.length?"important":void 0;e.style.setProperty(s,r,l)}}function Po(e){return()=>{const t=e();return t?Nn(t)||_n(t):!0}}function Nn(e){return e.clientWidth<e.scrollWidth}function _n(e){return e.clientHeight<e.scrollHeight}function To(e,t){t==="flex"?(e.style.removeProperty("width"),e.style.removeProperty("minWidth"),e.style.removeProperty("maxWidth"),e.style.flex="1 1 auto"):Ve(e,t)}function Ve(e,t){t=Zi(t),e.style.width=t,e.style.maxWidth=t,e.style.minWidth=t}function Yi(e,t){t=Zi(t),e.style.height=t,e.style.maxHeight=t,e.style.minHeight=t}function Zi(e){return typeof e=="number"?`${e}px`:e}function Qi(e){return e instanceof Node||e instanceof HTMLElement}function ce(e,t,o){o==null||o===""?e.removeAttribute(t):e.setAttribute(t,o.toString())}function Ze(e,t,o){const s=tr(e).ResizeObserver,n=s?new s(o):null;return n==null||n.observe(t),()=>n==null?void 0:n.disconnect()}function Ne(e,t){const o=tr(e);o.requestAnimationFrame?o.requestAnimationFrame(t):o.webkitRequestAnimationFrame?o.webkitRequestAnimationFrame(t):o.setTimeout(t,0)}var Wn="data-ref",Xi;function zn(){return Xi??(Xi=document.createTextNode(" ")),Xi.cloneNode()}function X(e){const{attrs:t,children:o,cls:i,ref:s,role:n,tag:r}=e,l=document.createElement(r);if(i&&(l.className=i),s&&l.setAttribute(Wn,s),n&&l.setAttribute("role",n),t)for(const a of Object.keys(t))l.setAttribute(a,t[a]);if(o)if(typeof o=="string")l.textContent=o;else{let a=!0;for(const d of o)d&&(typeof d=="string"?(l.appendChild(document.createTextNode(d)),a=!1):typeof d=="function"?l.appendChild(d()):(a&&(l.appendChild(zn()),a=!1),l.append(X(d)),l.appendChild(zn())))}return l}var $n={};function Ji(e,t){$n[t]||(e(),$n[t]=!0)}function jt(e,t,...o){e.get("debug")&&console.log("AG Grid: "+t,...o)}function qt(e,...t){Ji(()=>console.warn("AG Grid: "+e,...t),e+(t==null?void 0:t.join("")))}function ft(e,...t){Ji(()=>console.error("AG Grid: "+e,...t),e+(t==null?void 0:t.join("")))}var nc={pending:!1,funcs:[]},rc={pending:!1,funcs:[]};function es(e,t="setTimeout",o){const i=t==="raf"?rc:nc;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"?Ne(o,s):window.setTimeout(s,0)}function ge(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 Un(e,t){let o=0;return function(...i){const s=this,n=Date.now();n-o<t||(o=n,e.apply(s,i))}}function lc(e,t,o=100,i){const s=Date.now();let n=null,r=!1;const l=()=>{const a=Date.now()-s>o;(e()||a)&&(t(),r=!0,n!=null&&(window.clearInterval(n),n=null))};l(),r||(n=window.setInterval(l,10))}var Kn="https://www.ag-grid.com",G="34.1.1",jn=2e3,qn=100,Yn="_version_",Io=null,Ct=`${Kn}/javascript-data-grid`;function ac(e){Io=e}function dc(e){Ct=e}function Zn(e,t,o){return(Io==null?void 0:Io.getConsoleMessage(e,t))??[gc(e,t,o)]}function ts(e,t,o,i){e(`error #${t}`,...Zn(t,o,i))}function cc(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 uc(e){let t=e;return e instanceof Error?t=e.toString():typeof e=="object"&&(t=cc(e)),t}function Ao(e){return e===void 0?"undefined":e===null?"null":e}function os(e,t){return`${e}?${t.toString()}`}function hc(e,t,o){const i=Array.from(t.entries()).sort((n,r)=>r[1].length-n[1].length);let s=os(e,t);for(const[n,r]of i){if(n===Yn)continue;const l=s.length-o;if(l<=0)break;const a="...",d=l+a.length,c=r.length-d>qn?r.slice(0,r.length-d)+a:r.slice(0,qn)+a;t.set(n,c),s=os(e,t)}return s}function Qn(e,t){const o=new URLSearchParams;if(o.append(Yn,G),t)for(const n of Object.keys(t))o.append(n,uc(t[n]));const i=`${Ct}/errors/${e}`,s=os(i,o);return s.length<=jn?s:hc(i,o,jn)}var gc=(e,t,o)=>{const i=Qn(e,t);return`${o?o+`
2
2
  `:""}Visit ${i}${o?"":`
3
- Alternatively register the ValidationModule to see the full message in the console.`}`};function k(...e){ts(qt,e[0],e[1])}function U(...e){ts(ft,e[0],e[1])}function Yt(e,t,o){ts(ft,e,t,o)}function pc(e,t){const o=t[0];return`error #${o} `+Zn(o,t[1],e).join(" ")}function ye(...e){return pc(void 0,e)}function Xn(e,t){return e.get("rowModelType")===t}function oe(e,t){return Xn(e,"clientSide")}function Mo(e,t){return Xn(e,"serverSide")}function ee(e,t){return e.get("domLayout")===t}function Qe(e){return Ho(e)!==void 0}function Jn(e){return typeof e.get("getRowHeight")=="function"}function fc(e,t){return t?!e.get("enableStrictPivotColumnOrder"):e.get("maintainColumnOrder")}function _e(e,t,o=!1,i){const{gos:s,environment:n}=e;if(i==null&&(i=n.getDefaultRowHeight()),Jn(s)){if(o)return{height:i,estimated:!0};const a={node:t,data:t.data},d=s.getCallback("getRowHeight")(a);if(ss(d))return d===0&&k(23),{height:Math.max(1,d),estimated:!1}}if(t.detail&&s.get("masterDetail"))return Cc(s);const r=s.get("rowHeight");return{height:r&&ss(r)?r:i,estimated:!1}}function Cc(e){if(e.get("detailRowAutoHeight"))return{height:1,estimated:!1};const t=e.get("detailRowHeight");return ss(t)?{height:t,estimated:!1}:{height:300,estimated:!1}}function is(e){const{environment:t,gos:o}=e,i=o.get("rowHeight");if(!i||K(i))return t.getDefaultRowHeight();const s=t.refreshRowHeightVariable();return s!==-1?s:(k(24),t.getDefaultRowHeight())}function ss(e){return!isNaN(e)&&typeof e=="number"&&isFinite(e)}function er(e,t,o){const i=t[e.getDomDataKey()];return i?i[o]:void 0}function Xe(e,t,o,i){const s=e.getDomDataKey();let n=t[s];K(n)&&(n={},t[s]=n),n[o]=i}function J(e){const{gos:t,eGridDiv:o}=e;let i=null;const s=t.get("getDocument");return s&&M(s)?i=s():o&&(i=o.ownerDocument),i&&M(i)?i:document}function tr(e){return J(e).defaultView||window}function Zt(e){return e.eGridDiv.getRootNode()}function Y(e){return Zt(e).activeElement}function ns(e){let t=null,o=null;try{t=J(e).fullscreenElement}catch{}finally{t||(t=Zt(e));const i=t.querySelector("body");i?o=i:t instanceof ShadowRoot?o=t:t instanceof Document?o=t==null?void 0:t.documentElement:o=t}return o}function mc(e){const t=ns(e);return(t==null?void 0:t.clientWidth)??(window.innerWidth||-1)}function wc(e){const t=ns(e);return(t==null?void 0:t.clientHeight)??(window.innerHeight||-1)}function vc(e,t,o){const s=e.getBoundingClientRect().height,n=mc(o)-2,r=wc(o)-2;if(!e.offsetParent)return;const a=Hn(e.offsetParent),{clientY:d,clientX:c}=t;let u=d-a.top-s/2,h=c-a.left-10;const g=J(o),p=g.defaultView||window,f=p.pageYOffset||g.documentElement.scrollTop,C=p.pageXOffset||g.documentElement.scrollLeft;n>0&&h+e.clientWidth>n+C&&(h=n+C-e.clientWidth),h<0&&(h=0),r>0&&u+e.clientHeight>r+f&&(u=r+f-e.clientHeight),u<0&&(u=0),e.style.left=`${h}px`,e.style.top=`${u}px`}function or(e){const t=Y(e);return t===null||t===J(e).body}function mt(e){return e.get("ensureDomOrder")?!1:e.get("animateRows")}function ir(e){return!(e.get("paginateChildRows")||e.get("groupHideOpenParents")||ee(e,"print"))}function Re(e){const t=e.get("autoGroupColumnDef");return!(t!=null&&t.comparator)&&!e.get("treeData")}function sr(e){return e.get("grandTotalRow")}function nr(e,t){return t?!1:e.get("groupDisplayType")==="groupRows"}function bc(e,t,o){return!!t.group&&!t.footer&&nr(e,o)}function ko(e){const t=e.getCallback("getRowId");return t===void 0?t:o=>{let i=t(o);return typeof i!="string"&&(Ji(()=>k(25,{id:i}),"getRowIdString"),i=String(i)),i}}function wt(e){return(e==null?void 0:e.checkboxes)??!0}function Lo(e){return(e==null?void 0:e.mode)==="multiRow"&&(e.headerCheckbox??!0)}function Go(e){if(typeof e=="object")return e.checkboxLocation??"selectionColumn"}function Sc(e){return typeof e.get("rowSelection")!="string"}function Je(e){const t=e.get("cellSelection");return t!==void 0?!!t:e.get("enableRangeSelection")}function rs(e){const t=e.get("rowSelection");return typeof t=="string"?e.get("isRowSelectable"):t==null?void 0:t.isRowSelectable}function Ho(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==null?void 0:t.mode){case"multiRow":case"singleRow":return t.mode;default:return}}function Qt(e){return Ho(e)==="multiRow"}function Oo(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==null?void 0:t.mode)==="multiRow"?t.groupSelects:void 0}function yc(e,t=!0){const o=e.get("rowSelection");return typeof o!="object"?t?"all":void 0:o.mode==="multiRow"?o.selectAll:"all"}function Xt(e){const t=Oo(e);return t==="descendants"||t==="filteredDescendants"}function Bo(e){return e.get("columnMenu")==="legacy"}function Rc(e){return!e||e.length<2?e:"on"+e[0].toUpperCase()+e.substring(1)}function Ec(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 xc(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 _(e,t){return e.addGridCommonParams(t)}function Dc(e){return e.get("treeData")?e.get("treeDataParentIdField")?"treeSelfRef":e.get("treeDataChildrenField")?"treeNested":"treePath":"group"}var rr="__ag_Grid_Stop_Propagation",Fc=["touchstart","touchend","touchmove","touchcancel","scroll"],Pc=["wheel"],ls={};function vt(e){e[rr]=!0}function ke(e){return e[rr]===!0}var lr=(()=>{const e={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return o=>{if(typeof ls[o]=="boolean")return ls[o];const i=document.createElement(e[o]||"div");return o="on"+o,ls[o]=o in i}})();function ar(e,t,o){let i=t;for(;i;){const s=er(e,i,o);if(s)return s;i=i.parentElement}return null}function Tc(e,t){return!t||!e?!1:Ac(t).indexOf(e)>=0}function Ic(e){const t=[];let o=e.target;for(;o;)t.push(o),o=o.parentElement;return t}function Ac(e){const t=e;return t.path?t.path:t.composedPath?t.composedPath():Ic(t)}function Mc(e,t,o,i){const s=dr(o);let n;s!=null&&(n={passive:s}),e&&e.addEventListener&&e.addEventListener(t,o,i,n)}var dr=e=>{const t=Fc.includes(e),o=Pc.includes(e);if(t)return!0;if(o)return!1},x=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 je),this.localEventService.addEventListener(e,t,o)}removeEventListener(e,t,o){var i;(i=this.localEventService)==null||i.removeEventListener(e,t,o)}dispatchLocalEvent(e){var t;(t=this.localEventService)==null||t.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 kc(e)?(e.__addEventListener(t,o),i=()=>(e.__removeEventListener(t,o),null)):(e instanceof HTMLElement?Mc(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 vn(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 kc(e){return e.__addEventListener!==void 0}var Lc=/[&<>"']/g,Gc={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function bt(e){return(e==null?void 0:e.toString().toString())??null}function Vo(e){var t;return((t=bt(e))==null?void 0:t.replace(Lc,o=>Gc[o]))??null}var Hc={resizable:!0,sortable:!0},Oc=0;function cr(){return Oc++}function et(e){return e instanceof We}var We=class extends x{constructor(e,t,o,i){super(),this.colDef=e,this.userProvidedColDef=t,this.colId=o,this.primary=i,this.isColumn=!0,this.instanceId=cr(),this.autoHeaderHeight=null,this.moving=!1,this.resizing=!1,this.menuVisible=!1,this.lastLeftPinned=!1,this.firstRightPinned=!1,this.filterActive=!1,this.colEventSvc=new je,this.tooltipEnabled=!1,this.rowGroupActive=!1,this.pivotActive=!1,this.aggregationActive=!1,this.flex=null,this.colIdSanitised=Vo(o)}destroy(){var e;super.destroy(),(e=this.beans.rowSpanSvc)==null||e.deregister(this)}getInstanceId(){return this.instanceId}setState(){const{colDef:e,beans:{sortSvc:t,pinnedCols:o,colFlex:i}}=this;t==null||t.initCol(this);const s=e.hide;s!==void 0?this.visible=!s:this.visible=!e.initialHide,o==null||o.initCol(this),i==null||i.initCol(this)}setColDef(e,t,o){var s;const i=e.spanRows!==this.colDef.spanRows;this.colDef=e,this.userProvidedColDef=t,this.initMinAndMaxWidths(),this.initDotNotation(),this.initTooltip(),i&&((s=this.beans.rowSpanSvc)==null||s.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(),this.addPivotListener()}initDotNotation(){const{gos:e,colDef:{field:t,tooltipField:o}}=this,i=e.get("suppressFieldDotNotation");this.fieldContainsDots=M(t)&&t.indexOf(".")>=0&&!i,this.tooltipFieldContainsDots=M(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(){var e;(e=this.beans.tooltipSvc)==null||e.initCol(this)}initRowSpan(){var e;this.colDef.spanRows&&((e=this.beans.rowSpanSvc)==null||e.register(this))}addPivotListener(){const e=this.beans.pivotColDefSvc,t=this.colDef.pivotValueColumn;!e||!t||this.addManagedListeners(t,{colDefChanged:o=>{const i=e.recreateColDef(this.colDef);this.setColDef(i,i,o.source)}})}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){var t;return((t=this.beans.showRowGroupCols)==null?void 0:t.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){var i,s,n;this.frameworkEventListenerService=(s=(i=this.beans.frameworkOverrides).createLocalEventListenerWrapper)==null?void 0:s.call(i,this.frameworkEventListenerService,this.colEventSvc);const o=((n=this.frameworkEventListenerService)==null?void 0:n.wrap(e,t))??t;this.colEventSvc.addEventListener(e,o)}removeEventListener(e,t){var i;const o=((i=this.frameworkEventListenerService)==null?void 0:i.unwrap(e,t))??t;this.colEventSvc.removeEventListener(e,o)}createColumnFunctionCallbackParams(e){return _(this.gos,{node:e,data:e.data,column:this,colDef:this.colDef})}isSuppressNavigable(e){var t;return((t=this.beans.cellNavigation)==null?void 0:t.isSuppressNavigable(this,e))??!1}isCellEditable(e){var t;return((t=this.beans.editSvc)==null?void 0:t.isCellEditable({rowNode:e,column:this}))??!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){var t;return((t=this.beans.selectionSvc)==null?void 0:t.isCellCheckboxSelection(this,e))??!1}isSuppressPaste(e){var t;return this.isColumnFunc(e,((t=this.colDef)==null?void 0:t.suppressPaste)??null)}isResizable(){return!!this.getColDefValue("resizable")}getColDefValue(e){return this.colDef[e]??Hc[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 _(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 K(this.sort)}isSorting(){return M(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(){var e;return k(261),!!((e=this.beans.colHover)!=null&&e.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}getFirstRealParent(){let e=this.getOriginalParent();for(;e&&e.isPadding();)e=e.getOriginalParent();return e}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 _(this.gos,{node:e,data:e.data,colDef:this.colDef,column:this})}getColSpan(e){if(K(this.colDef.colSpan))return 1;const t=this.createBaseColDefParams(e),o=this.colDef.colSpan(t);return Math.max(o,1)}getRowSpan(e){if(K(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&&re(i,o),this.colEventSvc.dispatchEvent(i)}dispatchStateUpdatedEvent(e){this.colEventSvc.dispatchEvent({type:"columnStateUpdated",key:e})}};function te(e){return e instanceof No}var No=class extends x{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=cr(),this.expandableListenerRemoveCallback=null,this.expanded=!!(e!=null&&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}forEachLeafColumn(e){if(this.children)for(const t of this.children)et(t)?e(t):te(t)&&t.forEachLeafColumn(e)}addLeafColumns(e){this.children&&this.children.forEach(t=>{et(t)?e.push(t):te(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 l=i[n];if(!l.isVisible())continue;const a=l.getColumnGroupShow();a==="open"?(e=!0,o=!0):a==="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=>{te(i)&&i.isPadding()?t(i.children):e.push(i)})};return t(this.children),e}onColumnVisibilityChanged(){this.setExpandable()}},Bc={numericColumn:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"},rightAligned:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"}};function ur(e,t,o){const i={},s=e.gos;return Object.assign(i,s.get("defaultColGroupDef")),Object.assign(i,t),s.validateColDef(i,o),i}var Vc=class{constructor(){this.existingKeys={}}addExistingKeys(e){for(let t=0;t<e.length;t++)this.existingKeys[e[t]]=!0}getUniqueKey(e,t){e=Mi(e);let o=0;for(;;){let i=e??t;if(i?o!==0&&(i+="_"+o):i=o,!this.existingKeys[i]){const s=String(i);return e&&o>0&&k(273,{providedId:e,usedId:s}),this.existingKeys[s]=!0,s}o++}}},hr=Object.freeze([]);function $(e){if(e!=null&&e.length)return e[e.length-1]}function Jt(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 _o(e,t){if(e)for(const o of e)t(o)}function we(e,t){const o=e.indexOf(t);o>=0&&e.splice(o,1)}function gr(e,t,o){for(let i=0;i<t.length;i++)we(e,t[i]);for(let i=t.length-1;i>=0;i--)e.splice(o,0,t[i])}var Wo="ag-Grid-AutoColumn",pr="ag-Grid-SelectionColumn",fr="ag-Grid-RowNumbersColumn";function Cr(e){const t=[],o=i=>{for(let s=0;s<i.length;s++){const n=i[s];et(n)?t.push(n):te(n)&&o(n.getChildren())}};return o(e),t}function Le(e){return e.reduce((t,o)=>t+o.getActualWidth(),0)}function zo(e,t,o){const i={};if(!t)return;Ge(null,t,n=>{i[n.getInstanceId()]=n}),o&&Ge(null,o,n=>{i[n.getInstanceId()]=null});const s=Object.values(i).filter(n=>n!=null);e.context.destroyBeans(s)}function mr(e){return e.getId().startsWith(Wo)}function tt(e){const t=typeof e=="string"?e:"getColId"in e?e.getColId():e.colId;return(t==null?void 0:t.startsWith(pr))??!1}function ot(e){const t=typeof e=="string"?e:"getColId"in e?e.getColId():e.colId;return(t==null?void 0:t.startsWith(fr))??!1}function Nc(e){return tt(e)||ot(e)}function $o(e){let t=[];return e instanceof Array?t=e:typeof e=="string"&&(t=e.split(",")),t}function _c(e,t){return Jt(e,t,(o,i)=>o.getColId()===i.getColId())}function Wc(e){e.map={},e.list.forEach(t=>e.map[t.getId()]=t)}function St(e){return e==="gridOptionsUpdated"?"gridOptionsChanged":e}function wr(e,t){const o=e===t,i=e.getColDef()===t,s=e.getColId()==t;return o||i||s}var zc=(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),M(i)&&e[i]!==void 0&&(s.value2=e[i],n=!0)),!n&&t&&(t[o]!==void 0&&(s.value1=t[o]),M(i)&&t[i]!==void 0&&(s.value2=t[i])),s};function $c(e,t=null,o,i,s){const n=new Vc,{existingCols:r,existingGroups:l,existingColKeys:a}=Uc(i);n.addExistingKeys(a);const d=vr(e,t,0,o,r,n,l,s),{colGroupSvc:c}=e,u=(c==null?void 0:c.findMaxDepth(d,0))??0,h=c?c.balanceColumnTree(d,0,u,n):d;return Ge(null,h,(p,f)=>{te(p)&&p.setupExpandable(),p.originalParent=f}),{columnTree:h,treeDepth:u}}function Uc(e){const t=[],o=[],i=[];return e&&Ge(null,e,s=>{if(te(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 vr(e,t,o,i,s,n,r,l){if(!t)return[];const{colGroupSvc:a}=e,d=new Array(t.length);for(let c=0;c<d.length;c++){const u=t[c];a&&Qc(u)?d[c]=a.createProvidedColumnGroup(i,u,o,s,n,r,l):d[c]=Kc(e,i,u,s,n,l)}return d}function Kc(e,t,o,i,s,n){var a;const r=qc(o,i);r&&(i==null||i.splice(r.idx,1));let l=r==null?void 0:r.column;if(l){const d=as(e,o,l.getColId());l.setColDef(d,o,n),jc(e,l,d,n)}else{const d=s.getUniqueKey(o.colId,o.field),c=as(e,o,d);l=new We(c,o,d,t),e.context.createBean(l)}return(a=e.dataTypeSvc)==null||a.addColumnListeners(l),l}function br(e,t,o,i,s,n,r,l){const{sortSvc:a,pinnedCols:d,colFlex:c}=e;o!==void 0&&t.setVisible(!o,l),a&&(a.updateColSort(t,i,l),s!==void 0&&a.setColSortIndex(t,s)),n!==void 0&&(d==null||d.setColPinned(t,n)),r!==void 0&&(c==null||c.setColFlex(t,r))}function jc(e,t,o,i){br(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 qc(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 as(e,t,o,i){const{gos:s,dataTypeSvc:n}=e,r={},l=s.get("defaultColDef");re(r,l,!1,!0);const a=Yc(e,r,t,o);a&&Zc(e,a,r);const d=r.cellDataType;re(r,t,!1,!0),d!==void 0&&(r.cellDataType=d);const c=s.get("autoGroupColumnDef"),u=Re(s);return t.rowGroup&&c&&u&&re(r,{sort:c.sort,initialSort:c.initialSort},!1,!0),n&&(n.postProcess(r),n.validateColDef(r)),s.validateColDef(r,o,i),r}function Yc(e,t,o,i){var r;const s=(r=e.dataTypeSvc)==null?void 0:r.updateColDefAndGetColumnType(t,o,i),n=o.type??s??t.type;return t.type=n,n?$o(n):void 0}function Zc(e,t,o){if(!t.length)return;const i=Object.assign({},Bc),s=e.gos.get("columnTypes")||{};for(const n of Object.keys(s)){const r=s[n];n in i?k(34,{key:n}):(r.type&&k(35),i[n]=r)}t.forEach(n=>{const r=i[n.trim()];r?re(o,r,!1,!0):k(36,{t:n})})}function Qc(e){return e.children!==void 0}function Ge(e,t,o){if(t)for(let i=0;i<t.length;i++){const s=t[i];te(s)&&Ge(s,s.getChildren(),o),o(s,e)}}function Sr(e,t){const o=[],i=[],s=[];return e.forEach(r=>{const l=r.getColDef().lockPosition;l==="right"?s.push(r):l==="left"||l===!0?o.push(r):i.push(r)}),t.get("enableRtl")?[...s,...i,...o]:[...o,...i,...s]}function yr(e,t){let o=!0;return Ge(null,t,i=>{if(!te(i))return;const s=i,n=s.getColGroupDef();if(!(n&&n.marryChildren))return;const l=[];s.getLeafColumns().forEach(h=>{const g=e.indexOf(h);l.push(g)});const a=Math.max.apply(Math,l),d=Math.min.apply(Math,l),c=a-d,u=s.getLeafColumns().length-1;c>u&&(o=!1)}),o}function Rr(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 Er(e,t,o){if(!t.length)return;const i=t.length===1?t[0]:null,s=Rr(t,n=>n.getPinned());e.dispatchEvent({type:"columnPinned",pinned:s??null,columns:t,column:i,source:o})}function Xc(e,t,o){if(!t.length)return;const i=t.length===1?t[0]:null,s=Rr(t,n=>n.isVisible());e.dispatchEvent({type:"columnVisible",visible:s,columns:t,column:i,source:o})}function Jc(e,t,o,i){e.dispatchEvent({type:t,columns:o,column:o&&o.length==1?o[0]:null,source:i})}function yt(e,t,o,i,s=null){t!=null&&t.length&&e.dispatchEvent({type:"columnResized",columns:t,column:t.length===1?t[0]:null,flexColumns:s,finished:o,source:i})}function ve(e,t,o){var S;const{colModel:i,rowGroupColsSvc:s,pivotColsSvc:n,autoColSvc:r,selectionColSvc:l,colAnimation:a,visibleCols:d,pivotResultCols:c,environment:u,valueColsSvc:h,eventSvc:g,gos:p}=e,f=i.getColDefCols()??[],C=l==null?void 0:l.getColumns();if(!(f!=null&&f.length)&&!(C!=null&&C.length))return!1;if(t!=null&&t.state&&!t.state.forEach)return k(32),!1;const m=(D,I,O,F,P)=>{if(!D)return;const T=zc(I,t.defaultState),V=T("flex").value1;if(br(e,D,T("hide").value1,T("sort").value1,T("sortIndex").value1,T("pinned").value1,V,o),V==null){const B=T("width").value1;if(B!=null){const W=D.getColDef().minWidth??u.getDefaultColumnMinWidth();W!=null&&B>=W&&D.setActualWidth(B,o)}}P||!D.isPrimary()||(h==null||h.syncColumnWithState(D,o,T),s==null||s.syncColumnWithState(D,o,T,O),n==null||n.syncColumnWithState(D,o,T,F))},w=(D,I,O)=>{var Fd,Pd;const F=xr(e,o),P=I.slice(),T={},V={},B=[],W=[],z=[];let de=0;const Ie=(s==null?void 0:s.columns.slice())??[],g0=(n==null?void 0:n.columns.slice())??[];D.forEach(ne=>{const Ro=ne.colId;if(Ro.startsWith(Wo)){B.push(ne),z.push(ne);return}if(tt(Ro)){W.push(ne),z.push(ne);return}const _t=O(Ro);_t?(m(_t,ne,T,V,!1),we(P,_t)):(z.push(ne),de+=1)});const xd=ne=>m(ne,null,T,V,!1);P.forEach(xd),s==null||s.sortColumns(Fr.bind(s,T,Ie)),n==null||n.sortColumns(Fr.bind(n,V,g0)),i.refreshCols(!1);const Dd=(ne,Ro,wn=[])=>{Ro.forEach(_t=>{const Td=ne(_t.colId);we(wn,Td),m(Td,_t,null,null,!0)}),wn.forEach(xd)};return Dd(ne=>(r==null?void 0:r.getColumn(ne))??null,B,(Fd=r==null?void 0:r.getColumns())==null?void 0:Fd.slice()),Dd(ne=>(l==null?void 0:l.getColumn(ne))??null,W,(Pd=l==null?void 0:l.getColumns())==null?void 0:Pd.slice()),tu(t,i,p),d.refresh(o),g.dispatchEvent({type:"columnEverythingChanged",source:o}),F(),{unmatchedAndAutoStates:z,unmatchedCount:de}};a==null||a.start();let{unmatchedAndAutoStates:b,unmatchedCount:v}=w(t.state||[],f,D=>i.getColDefCol(D));if(b.length>0||M(t.defaultState)){const D=((S=c==null?void 0:c.getPivotResultCols())==null?void 0:S.list)??[];v=w(b,D,I=>(c==null?void 0:c.getPivotResultCol(I))??null).unmatchedCount}return a==null||a.finish(),v===0}function eu(e,t){var w,b;const{colModel:o,autoColSvc:i,selectionColSvc:s,eventSvc:n,gos:r}=e,l=o.getColDefCols();if(!(l!=null&&l.length))return;const a=o.getColDefColTree(),d=Cr(a),c=[];let u=1e3,h=1e3;const g=v=>{const S=Dr(v);K(S.rowGroupIndex)&&S.rowGroup&&(S.rowGroupIndex=u++),K(S.pivotIndex)&&S.pivot&&(S.pivotIndex=h++),c.push(S)};(w=i==null?void 0:i.getColumns())==null||w.forEach(g),(b=s==null?void 0:s.getColumns())==null||b.forEach(g),d==null||d.forEach(g),ve(e,{state:c},t);const p=(i==null?void 0:i.getColumns())??[],m=[...(s==null?void 0:s.getColumns())??[],...p,...l].map(v=>({colId:v.colId}));ve(e,{state:m,applyOrder:!0},t),n.dispatchEvent(_(r,{type:"columnsReset",source:t}))}function xr(e,t){const{rowGroupColsSvc:o,pivotColsSvc:i,valueColsSvc:s,colModel:n,sortSvc:r,eventSvc:l}=e,a={rowGroupColumns:(o==null?void 0:o.columns.slice())??[],pivotColumns:(i==null?void 0:i.columns.slice())??[],valueColumns:(s==null?void 0:s.columns.slice())??[]},d=Uo(e),c={};return d.forEach(u=>{c[u.colId]=u}),()=>{const u=(D,I,O,F)=>{const P=I.map(F),T=O.map(F);if(Jt(P,T))return;const B=new Set(I);O.forEach(z=>{B.delete(z)||B.add(z)});const W=[...B];l.dispatchEvent({type:D,columns:W,column:W.length===1?W[0]:null,source:t})},h=D=>{const I=[];return n.forAllCols(O=>{const F=c[O.getColId()];F&&D(F,O)&&I.push(O)}),I},g=D=>D.getColId();u("columnRowGroupChanged",a.rowGroupColumns,(o==null?void 0:o.columns)??[],g),u("columnPivotChanged",a.pivotColumns,(i==null?void 0:i.columns)??[],g);const f=h((D,I)=>{const O=D.aggFunc!=null,F=O!=I.isValueActive(),P=O&&D.aggFunc!=I.getAggFunc();return F||P});f.length>0&&Jc(l,"columnValueChanged",f,t),yt(l,h((D,I)=>D.width!=I.getActualWidth()),!0,t),Er(l,h((D,I)=>D.pinned!=I.getPinned()),t),Xc(l,h((D,I)=>D.hide==I.isVisible()),t);const v=h((D,I)=>D.sort!=I.getSort()||D.sortIndex!=I.getSortIndex());v.length>0&&(r==null||r.dispatchSortChangedEvents(t,v));const S=Uo(e);iu(d,S,t,n,l)}}function Uo(e){const{colModel:t,rowGroupColsSvc:o,pivotColsSvc:i}=e,s=t.getColDefCols();if(K(s)||!t.isAlive())return[];const n=o==null?void 0:o.columns,r=i==null?void 0:i.columns,l=[],a=c=>{const u=c.isRowGroupActive()&&n?n.indexOf(c):null,h=c.isPivotActive()&&r?r.indexOf(c):null,g=c.isValueActive()?c.getAggFunc():null,p=c.getSort()!=null?c.getSort():null,f=c.getSortIndex()!=null?c.getSortIndex():null;l.push({colId:c.getColId(),width:c.getActualWidth(),hide:!c.isVisible(),pinned:c.getPinned(),sort:p,sortIndex:f,aggFunc:g,rowGroup:c.isRowGroupActive(),rowGroupIndex:u,pivot:c.isPivotActive(),pivotIndex:h,flex:c.getFlex()??null})};t.forAllCols(c=>a(c));const d=new Map(t.getCols().map((c,u)=>[c.getColId(),u]));return l.sort((c,u)=>{const h=d.has(c.colId)?d.get(c.colId):-1,g=d.has(u.colId)?d.get(u.colId):-1;return h-g}),l}function Dr(e){const t=(p,f)=>p??f??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),l=t(o.width,o.initialWidth),a=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),h=t(o.pivot,o.initialPivot);u==null&&(h==null||h==!1)&&(u=null,h=null);const g=t(o.aggFunc,o.initialAggFunc);return{colId:e.getColId(),sort:i,sortIndex:s,hide:n,pinned:r,width:l,flex:a,rowGroup:c,rowGroupIndex:d,pivot:h,pivotIndex:u,aggFunc:g}}function tu(e,t,o){if(!e.applyOrder||!e.state)return;const i=[];e.state.forEach(s=>{s.colId!=null&&i.push(s.colId)}),ou(t.cols,i,t,o)}function ou(e,t,o,i){if(e==null)return;let s=[];const n={};t.forEach(l=>{if(n[l])return;const a=e.map[l];a&&(s.push(a),n[l]=!0)});let r=0;if(e.list.forEach(l=>{const a=l.getColId();if(n[a]!=null)return;a.startsWith(Wo)?s.splice(r++,0,l):s.push(l)}),s=Sr(s,i),!yr(s,o.getColTree())){k(39);return}e.list=s}function iu(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 l=e.filter(c=>r[c.colId]),a=t.filter(c=>r[c.colId]),d=[];a.forEach((c,u)=>{const h=l&&l[u];if(h&&h.colId!==c.colId){const g=i.getCol(h.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 Fr=(e,t,o,i)=>{const s=e[o.getId()],n=e[i.getId()],r=s!=null,l=n!=null;if(r&&l)return s-n;if(r)return-1;if(l)return 1;const a=t.indexOf(o),d=t.indexOf(i),c=a>=0,u=d>=0;return c&&u?a-d:c?-1:1},su=class extends x{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","rowNumbers","hidePaddedHeaderRows"],e=>this.refreshAll(St(e.source))),this.addManagedPropertyListeners(["defaultColDef","defaultColGroupDef","columnTypes","suppressFieldDotNotation"],this.recreateColumnDefs.bind(this)),this.addManagedPropertyListener("pivotMode",e=>this.setPivotMode(this.gos.get("pivotMode"),St(e.source)))}createColsFromColDefs(e){var m,w,b;const{beans:t}=this,{valueCache:o,colAutosize:i,rowGroupColsSvc:s,pivotColsSvc:n,valueColsSvc:r,visibleCols:l,eventSvc:a}=t,d=this.colDefs?xr(t,e):void 0;o==null||o.expire();const c=(m=this.colDefCols)==null?void 0:m.list,u=(w=this.colDefCols)==null?void 0:w.tree,h=$c(t,this.colDefs,!0,u,e);zo(t,(b=this.colDefCols)==null?void 0:b.tree,h.columnTree);const g=h.columnTree,p=h.treeDepth,f=Cr(g),C={};f.forEach(v=>C[v.getId()]=v),this.colDefCols={tree:g,treeDepth:p,list:f,map:C},s==null||s.extractCols(e,c),n==null||n.extractCols(e,c),r==null||r.extractCols(e,c),this.ready=!0,this.refreshCols(!0),l.refresh(e),a.dispatchEvent({type:"columnEverythingChanged",source:e}),d&&(this.changeEventsDispatching=!0,d(),this.changeEventsDispatching=!1),a.dispatchEvent({type:"newColumnsLoaded",source:e}),e==="gridInitializing"&&(i==null||i.applyAutosizeStrategy())}refreshCols(e){var f;if(!this.colDefCols)return;const t=(f=this.cols)==null?void 0:f.tree;this.saveColOrder();const{autoColSvc:o,selectionColSvc:i,rowNumbersSvc:s,quickFilter:n,pivotResultCols:r,showRowGroupCols:l,rowAutoHeight:a,visibleCols:d,colViewport:c,eventSvc:u}=this.beans,h=this.selectCols(r,this.colDefCols);this.createColumnsForService([o,i,s],h);const g=fc(this.gos,this.showingPivotResult);(!e||g)&&this.restoreColOrder(h),this.positionLockedCols(h),l==null||l.refresh(),n==null||n.refreshCols(),this.setColSpanActive(),a==null||a.setAutoHeightActive(h),d.clear(),c.clear(),!Jt(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==null?void 0: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(a=>{var d;return((d=this.cols)==null?void 0:d.map[a.getColId()])!==void 0})||(this.lastPivotOrder=null)),this.cols}getColsToShow(){if(!this.cols)return[];const{valueColsSvc:e,selectionColSvc:t,gos:o}=this.beans,i=this.isPivotMode()&&!this.showingPivotResult,s=t==null?void 0:t.isSelectionColumnEnabled(),n=o.get("rowNumbers"),r=e==null?void 0:e.columns;return this.cols.list.filter(a=>{const d=mr(a);if(i){const c=r==null?void 0:r.includes(a);return d||c||s&&tt(a)||n&&ot(a)}else return d||a.isVisible()})}refreshAll(e){this.ready&&(this.refreshCols(!1),this.beans.visibleCols.refresh(e))}setColsVisible(e,t=!1,o){ve(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=t.filter(u=>e.map[u.getId()]!=null);if(o.length===0)return;if(o.length===e.list.length){e.list=o;return}const i=u=>{const h=u.getOriginalParent();return h?h.getChildren().length>1?!0:i(h):!1};if(!o.some(u=>i(u))){const u=new Set(o);for(const h of e.list)u.has(h)||o.push(h);e.list=o;return}const s=new Map;for(let u=0;u<o.length;u++){const h=o[u];s.set(h,u)}const n=e.list.filter(u=>!s.has(u));if(n.length===0){e.list=o;return}const r=(u,h)=>{const g=h?h.getOriginalParent():u.getOriginalParent();if(!g)return null;let p=null,f=null;for(const C of g.getChildren())if(!(C===h||C===u)){if(C instanceof We){const m=s.get(C);if(m==null)continue;(p==null||p<m)&&(p=m,f=C);continue}C.forEachLeafColumn(m=>{const w=s.get(m);w!=null&&(p==null||p<w)&&(p=w,f=m)})}return f??r(u,g)},l=[],a=new Map;for(const u of n){const h=r(u,null);if(h==null){l.push(u);continue}const g=a.get(h);g===void 0?a.set(h,u):Array.isArray(g)?g.push(u):a.set(h,[g,u])}const d=new Array(e.list.length);let c=d.length-1;for(let u=l.length-1;u>=0;u--)d[c--]=l[u];for(let u=o.length-1;u>=0;u--){const h=o[u],g=a.get(h);if(g)if(Array.isArray(g))for(let p=g.length-1;p>=0;p--){const f=g[p];d[c--]=f}else d[c--]=g;d[c--]=h}e.list=d}positionLockedCols(e){e.list=Sr(e.list,this.gos)}saveColOrder(){var e,t;this.showingPivotResult?this.lastPivotOrder=((e=this.cols)==null?void 0:e.list)??null:this.lastOrder=((t=this.cols)==null?void 0:t.list)??null}getColumnDefs(){var e,t;return this.colDefCols?(t=this.beans.colDefFactory)==null?void 0:t.getColumnDefs(this.colDefCols.list,this.showingPivotResult,this.lastOrder,((e=this.cols)==null?void 0:e.list)??[]):void 0}setColSpanActive(){var e;this.colSpanActive=!!((e=this.cols)!=null&&e.list.some(t=>t.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(){var t;const e=(t=this.beans.pivotColsSvc)==null?void 0:t.columns;return this.pivotMode&&!!(e!=null&&e.length)}recreateColumnDefs(e){var o;if(!this.cols)return;(o=this.beans.autoColSvc)==null||o.updateColumns(e);const t=St(e.source);this.createColsFromColDefs(t)}setColumnDefs(e,t){this.colDefs=e,this.createColsFromColDefs(t)}destroy(){var e;zo(this.beans,(e=this.colDefCols)==null?void 0:e.tree),super.destroy()}getColTree(){var e;return((e=this.cols)==null?void 0:e.tree)??[]}getColDefColTree(){var e;return((e=this.colDefCols)==null?void 0:e.tree)??[]}getColDefCols(){var e;return((e=this.colDefCols)==null?void 0:e.list)??null}getCols(){var e;return((e=this.cols)==null?void 0:e.list)??[]}forAllCols(e){var s,n,r,l;const{pivotResultCols:t,autoColSvc:o,selectionColSvc:i}=this.beans;_o((s=this.colDefCols)==null?void 0:s.list,e),_o((n=o==null?void 0:o.columns)==null?void 0:n.list,e),_o((r=i==null?void 0:i.columns)==null?void 0:r.list,e),_o((l=t==null?void 0:t.getPivotResultCols())==null?void 0:l.list,e)}getColsForKeys(e){return e?e.map(t=>this.getCol(t)).filter(t=>t!=null):[]}getColDefCol(e){var t;return(t=this.colDefCols)!=null&&t.list?this.getColFromCollection(e,this.colDefCols):null}getCol(e){return e==null?null:this.getColFromCollection(e,this.cols)}getColById(e){var t;return((t=this.cols)==null?void 0:t.map[e])??null}getColFromCollection(e,t){var s,n;if(t==null)return null;const{map:o,list:i}=t;if(typeof e=="string"&&o[e])return o[e];for(let r=0;r<i.length;r++)if(wr(i[r],e))return i[r];return((s=this.beans.autoColSvc)==null?void 0:s.getColumn(e))??((n=this.beans.selectionColSvc)==null?void 0:n.getColumn(e))??null}},nu=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 Ko(e,t,o){return o&&e.addDestroyFunc(()=>t.destroyBean(o)),o??e}var Pr=class{constructor(e){this.cssClassStates={},this.getGui=e}toggleCss(e,t){var i;if(!e)return;if(e.indexOf(" ")>=0){const s=(e||"").split(" ");if(s.length>1){s.forEach(n=>this.toggleCss(n,t));return}}this.cssClassStates[e]!==t&&e.length&&((i=this.getGui())==null||i.classList.toggle(e,t),this.cssClassStates[e]=t)}},ru=0,A=null,j=class extends x{constructor(e,t){super(),this.suppressDataRefValidation=!1,this.displayed=!0,this.visible=!0,this.compId=ru++,this.cssManager=new Pr(()=>this.eGui),this.componentSelectors=new Map((t??[]).map(o=>[o.selector,o])),e&&this.setTemplate(e)}preConstruct(){var t,o,i;this.wireTemplate(this.getGui());const e="component-"+((o=(t=Object.getPrototypeOf(this))==null?void 0:t.constructor)==null?void 0:o.name);(i=this.css)==null||i.forEach(s=>this.beans.environment.addGlobalCSS(s,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(Wn):null}applyElementsToComponent(e,t,o,i=null){if(t===void 0&&(t=this.getDataRefAttribute(e)),t){const s=this[t];if(s===A)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 l of i.attributes??[])r.setAttribute(l.name,l.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 l=null;if(r){const a=o&&s?o[s]:void 0;l=new r.component(a),l.setParentComponent(this),this.createBean(l,null,t)}else if(n)throw new Error(`selector: ${i}`);return this.applyElementsToComponent(e,s,o,l),l}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=qi(e):i=X(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),Qi(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;oc(this.eGui,e,{skipAriaHidden:o})}}setDisplayed(e,t={}){if(e!==this.displayed){this.displayed=e;const{skipAriaHidden:o}=t;Z(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))}addCss(e){this.cssManager.toggleCss(e,!0)}removeCss(e){this.cssManager.toggleCss(e,!1)}toggleCss(e,t){this.cssManager.toggleCss(e,t)}registerCSS(e){this.css||(this.css=[]),this.css.push(e)}},eo=class Eo{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 Eo(o=>{let i=t.length;const s=new Array(i);t.forEach((n,r)=>{n.then(l=>{s[r]=l,i--,i===0&&o(s)})})}):Eo.resolve()}static resolve(t=null){return new Eo(o=>o(t))}then(t){return new Eo(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 lu(e){return e?e.prototype&&"getGui"in e.prototype:!1}function au(e,t,o,i){const{name:s}=o;let n,r,l,a,d,c;if(t){const u=t,h=u[s+"Selector"],g=h?h(i):null,p=f=>{typeof f=="string"?n=f:f!=null&&f!==!0&&(e.isFrameworkComponent(f)?l=f:r=f)};g?(p(g.component),a=g.params,d=g.popup,c=g.popupPosition):p(u[s])}return{compName:n,jsComp:r,fwComp:l,paramsFromSelector:a,popupFromSelector:d,popupPositionFromSelector:c}}var du=class extends x{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){var b;const{name:n,cellRenderer:r}=t;let{compName:l,jsComp:a,fwComp:d,paramsFromSelector:c,popupFromSelector:u,popupPositionFromSelector:h}=au(this.beans.frameworkOverrides,e,t,i),g,p;const f=v=>{const S=this.registry.getUserComponent(n,v);S&&(a=S.componentFromFramework?void 0:S.component,d=S.componentFromFramework?S.component:void 0,g=S.params,p=S.processParams)};if(l!=null&&f(l),a==null&&d==null&&o!=null&&f(o),a&&r&&!lu(a)&&(a=(b=this.agCompUtils)==null?void 0:b.adaptFunction(t,a)),!a&&!d){const{validation:v}=this.beans;s&&(l!==o||!o)?l?v!=null&&v.isProvidedUserComp(l)||U(50,{compName:l}):o?v||U(260,{...this.gos.getModuleErrorParams(),propName:n,compName:o}):U(216,{name:n}):o&&!v&&U(146,{comp:o});return}const C=this.mergeParams(e,t,i,c,g,p),m=a==null,w=a??d;return{componentFromFramework:m,componentClass:w,params:C,type:t,popupFromSelector:u,popupPositionFromSelector:h,newAgStackInstance:()=>this.newAgStackInstance(w,m,C,t)}}newAgStackInstance(e,t,o,i){var l;const s=!t;let n;s?n=new e:n=this.frameworkCompWrapper.wrap(e,i.mandatoryMethods,i.optionalMethods,i),this.createBean(n);const r=(l=n.init)==null?void 0:l.call(n,o);return r==null?eo.resolve(n):r.then(()=>n)}mergeParams(e,t,o,i=null,s,n){const r={...o,...s},l=e,a=l&&l[t.name+"Params"];if(typeof a=="function"){const d=a(o);re(r,d)}else typeof a=="object"&&re(r,a);return re(r,i),n?n(r):r}},cu={name:"dragAndDropImageComponent",mandatoryMethods:["setIcon","setLabel"]},uu={name:"headerComponent",optionalMethods:["refresh"]},hu={name:"innerHeaderComponent"},gu={name:"innerHeaderGroupComponent"},pu={name:"headerGroupComponent"},fu={name:"cellRenderer",optionalMethods:["refresh","afterGuiAttached"],cellRenderer:!0},Cu={name:"loadingCellRenderer",cellRenderer:!0},mu={name:"cellEditor",mandatoryMethods:["getValue"],optionalMethods:["isPopup","isCancelBeforeStart","isCancelAfterEnd","getPopupPosition","focusIn","focusOut","afterGuiAttached","refresh"]},wu={name:"loadingOverlayComponent",optionalMethods:["refresh"]},vu={name:"noRowsOverlayComponent",optionalMethods:["refresh"]},bu={name:"tooltipComponent"},Su={name:"fullWidthCellRenderer",optionalMethods:["refresh","afterGuiAttached"],cellRenderer:!0},yu={name:"loadingCellRenderer",cellRenderer:!0},Ru={name:"groupRowRenderer",optionalMethods:["afterGuiAttached"],cellRenderer:!0},Eu={name:"detailCellRenderer",optionalMethods:["refresh"],cellRenderer:!0};function xu(e,t){return e.getCompDetailsFromGridOptions(cu,"agDragAndDropImage",t,!0)}function Du(e,t,o){return e.getCompDetails(t,uu,"agColumnHeader",o)}function Fu(e,t,o){return e.getCompDetails(t,hu,void 0,o)}function Pu(e,t){const o=t.columnGroup.getColGroupDef();return e.getCompDetails(o,pu,"agColumnGroupHeader",t)}function Tu(e,t,o){return e.getCompDetails(t,gu,void 0,o)}function Iu(e,t){return e.getCompDetailsFromGridOptions(Su,void 0,t,!0)}function Au(e,t){return e.getCompDetailsFromGridOptions(yu,"agLoadingCellRenderer",t,!0)}function Mu(e,t){return e.getCompDetailsFromGridOptions(Ru,"agGroupRowRenderer",t,!0)}function ku(e,t){return e.getCompDetailsFromGridOptions(Eu,"agDetailCellRenderer",t,!0)}function Tr(e,t,o){return e.getCompDetails(t,fu,void 0,o)}function Ir(e,t,o){return e.getCompDetails(t,Cu,"agSkeletonCellRenderer",o,!0)}function Ar(e,t,o){return e.getCompDetails(t,mu,"agCellEditor",o,!0)}function Lu(e,t){return e.getCompDetailsFromGridOptions(wu,"agLoadingOverlay",t,!0)}function Gu(e,t){return e.getCompDetailsFromGridOptions(vu,"agNoRowsOverlay",t,!0)}function Hu(e,t){return e.getCompDetails(t.colDef,bu,"agTooltipComponent",t,!0)}function ds(e){const t=e;return t!=null&&t.getFrameworkComponentInstance!=null?t.getFrameworkComponentInstance():e}var Mr=new Set,jo={},Rt={},qo,kr=!1,Lr=!1,Ou=!1;function Bu(e){const[t,o]=e.version.split(".")||[],[i,s]=qo.split(".")||[];return t===i&&o===s}function Vu(e){qo||(qo=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?Bu(e)||ft(t(`'${e.moduleName}' is version ${e.version} but the other modules are version ${qo}.`)):ft(t(`'${e.moduleName}' is incompatible.`)),e.validate){const o=e.validate();o.isValid||ft(`${o.message}`)}}function Et(e,t,o=!1){o||(kr=!0),Vu(e);const i=e.rowModels??["all"];Mr.add(e);let s;t!==void 0?(Lr=!0,Rt[t]===void 0&&(Rt[t]={}),s=Rt[t]):s=jo,i.forEach(n=>{s[n]===void 0&&(s[n]={}),s[n][e.moduleName]=e}),e.dependsOn&&e.dependsOn.forEach(n=>Et(n,t,o))}function Nu(e){delete Rt[e]}function cs(e,t,o){const i=s=>{var n,r,l;return!!((n=jo[s])!=null&&n[e])||!!((l=(r=Rt[t])==null?void 0:r[s])!=null&&l[e])};return i(o)||i("all")}function us(){return Lr}function _u(e,t){const o=Rt[e]??{};return[...Object.values(jo.all??{}),...Object.values(o.all??{}),...Object.values(jo[t]??{}),...Object.values(o[t]??{})]}function Wu(){return new Set(Mr)}function zu(){return kr}function $u(){return Ou}var Uu=class{static register(e){Et(e,void 0)}static registerModules(e){e.forEach(t=>Et(t,void 0))}},Ku=class{constructor(e){this.beans={},this.createdBeans=[],this.destroyed=!1,!(!e||!e.beanClasses)&&(this.beanDestroyComparator=e.beanDestroyComparator,this.init(e))}init(e){var t;for(const o of Object.keys(e.providedBeanInstances))this.beans[o]=e.providedBeanInstances[o];e.beanClasses.forEach(o=>{const i=new o;i.beanName?this.beans[i.beanName]=i:console.error(`Bean ${o.name} is missing beanName`),this.createdBeans.push(i)}),(t=e.derivedBeans)==null||t.forEach(o=>{const{beanName:i,bean:s}=o(this);this.beans[i]=s,this.createdBeans.push(s)}),e.beanInitComparator&&this.createdBeans.sort(e.beanInitComparator),this.initBeans(this.createdBeans)}getBeanInstances(){return Object.values(this.beans)}createBean(e,t){return this.initBeans([e],t),e}initBeans(e,t){e.forEach(o=>{var i,s;(i=o.preWireBeans)==null||i.call(o,this.beans),(s=o.wireBeans)==null||s.call(o,this.beans)}),e.forEach(o=>{var i;return(i=o.preConstruct)==null?void 0:i.call(o)}),t&&e.forEach(t),e.forEach(o=>{var i;return(i=o.postConstruct)==null?void 0:i.call(o)})}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){var t;(t=e==null?void 0:e.destroy)==null||t.call(e)}destroyBeans(e){if(e)for(let t=0;t<e.length;t++)this.destroyBean(e[t]);return[]}isDestroyed(){return this.destroyed}};function ju(e){return typeof e=="object"&&!!e.getComp}var qu=class extends Ku{init(e){this.gridId=e.gridId,this.beans.context=this,this.destroyCallback=e.destroyCallback,super.init(e)}destroy(){var e;super.destroy(),Nu(this.gridId),(e=this.destroyCallback)==null||e.call(this)}getGridId(){return this.gridId}},Yu=class extends x{constructor(){super(...arguments),this.beanName="editModelSvc",this.edits=new Map,this.cellValidations=new Gr,this.rowValidations=new Hr,this.suspendEdits=!1}suspend(e){this.suspendEdits=e}removeEdits({rowNode:e,column:t}){if(!this.hasEdits({rowNode:e})||!e)return;const o=this.getEditRow(e);t?o.delete(t):o.clear(),o.size===0&&this.edits.delete(e)}getEditRow(e,t={}){if(this.suspendEdits||this.edits.size===0)return;const o=e&&this.edits.get(e);if(o)return o;if(t.checkSiblings){const i=e.pinnedSibling;if(i)return this.getEditRow(i)}}getEditRowDataValue(e,{checkSiblings:t}={}){if(this.edits.size===0)return e.data;const o=this.getEditRow(e),i=e.pinnedSibling,s=t&&i&&this.getEditRow(i);if(!o&&!s)return e.data;const n=Object.assign({},e.data),r=(l,a)=>l.forEach(({pendingValue:d},c)=>{d!==pe&&(a[c.getColId()]=d)});return o&&r(o,n),s&&r(s,n),n}getEdit(e,t){const o=this._getEdit(e);return t&&o?{...o}:o}_getEdit(e){var t;if(!this.suspendEdits&&this.edits.size!==0)return e.rowNode&&e.column&&((t=this.getEditRow(e.rowNode))==null?void 0:t.get(e.column))}getEditMap(e=!0){if(this.suspendEdits||this.edits.size===0)return new Map;if(!e)return this.edits;const t=new Map;return this.edits.forEach((o,i)=>t.set(i,new Map(o))),t}setEditMap(e){this.edits.clear(),e.forEach((t,o)=>{const i=new Map;t.forEach((s,n)=>i.set(n,{...s})),this.edits.set(o,i)})}setEdit(e,t){(this.edits.size===0||!this.edits.has(e.rowNode))&&this.edits.set(e.rowNode,new Map);const o={...this._getEdit(e),...t};return this.getEditRow(e.rowNode).set(e.column,o),o}clearEditValue(e){var i;const{rowNode:t,column:o}=e;if(t)if(o){const s=this._getEdit(e);s&&(s.editorValue=void 0,s.pendingValue=s.sourceValue,s.state="changed")}else(i=this.getEditRow(t))==null||i.forEach(s=>{s.editorValue=void 0,s.pendingValue=s.sourceValue,s.state="changed"})}getState(e){var t;if(!this.suspendEdits)return(t=this.getEdit(e))==null?void 0:t.state}getEditPositions(e){if(this.suspendEdits||(e??this.edits).size===0)return[];const t=[];return(e??this.edits).forEach((o,i)=>{for(const s of o.keys())t.push({rowNode:i,column:s,...o.get(s)})}),t}hasRowEdits(e,t){return this.suspendEdits||this.edits.size===0?!1:!!this.getEditRow(e,t)}hasEdits(e={},t={}){var n;if(this.suspendEdits||this.edits.size===0)return!1;const{rowNode:o,column:i}=e,{withOpenEditor:s}=t;if(o){const r=this.getEditRow(o,t);return r?i?s?((n=this.getEdit(e))==null?void 0:n.state)==="editing":r.has(i)??!1:r.size!==0?s?Array.from(r.values()).some(({state:l})=>l==="editing"):!0:!1:!1}return s?this.getEditPositions().some(({state:r})=>r==="editing"):this.edits.size>0}start(e){const t=this.getEditRow(e.rowNode)??new Map,{rowNode:o,column:i}=e;i&&!t.has(i)&&t.set(i,{editorValue:void 0,pendingValue:pe,sourceValue:this.beans.valueSvc.getValue(i,o,!0,"api"),state:"editing"}),this.edits.set(o,t)}stop(e){this.hasEdits(e)&&(e?this.removeEdits(e):this.clear())}clear(){for(const e of this.edits.values())e.clear();this.edits.clear()}getCellValidationModel(){return this.cellValidations}getRowValidationModel(){return this.rowValidations}setCellValidationModel(e){this.cellValidations=e}setRowValidationModel(e){this.rowValidations=e}destroy(){super.destroy(),this.clear()}},Gr=class{constructor(){this.cellValidations=new Map}getCellValidation(e){var i,s;const{rowNode:t,column:o}=e||{};return(s=(i=this.cellValidations)==null?void 0:i.get(t))==null?void 0:s.get(o)}hasCellValidation(e){return!e||!e.rowNode||!e.column?this.cellValidations.size>0:!!this.getCellValidation(e)}setCellValidation(e,t){const{rowNode:o,column:i}=e;this.cellValidations.has(o)||this.cellValidations.set(o,new Map),this.cellValidations.get(o).set(i,t)}clearCellValidation(e){var i;const{rowNode:t,column:o}=e;(i=this.cellValidations.get(t))==null||i.delete(o)}setCellValidationMap(e){this.cellValidations=e}getCellValidationMap(){return this.cellValidations}clearCellValidationMap(){this.cellValidations.clear()}},Hr=class{constructor(){this.rowValidations=new Map}getRowValidation(e){const{rowNode:t}=e||{};return this.rowValidations.get(t)}hasRowValidation(e){return!e||!e.rowNode?this.rowValidations.size>0:!!this.getRowValidation(e)}setRowValidation({rowNode:e},t){this.rowValidations.set(e,t)}clearRowValidation({rowNode:e}){this.rowValidations.delete(e)}setRowValidationMap(e){this.rowValidations=e}getRowValidationMap(){return this.rowValidations}clearRowValidationMap(){this.rowValidations.clear()}};function Zu(e){const{rowIndex:t,rowPinned:o,column:i}=e;return`${t}.${o??"null"}.${i.getId()}`}function Qu(e,t){const o=e.column===t.column,i=e.rowPinned===t.rowPinned,s=e.rowIndex===t.rowIndex;return o&&i&&s}function Xu(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(M(t.rowPinned))return t.rowPinned!=="top";break}return e.rowIndex<t.rowIndex}function Ju(e){let t=0,o;const{pinnedRowModel:i,rowModel:s,pageBounds:n}=e;return i!=null&&i.getPinnedTopRowCount()?o="top":s.getRowCount()?(o=null,t=n.getFirstRow()):i!=null&&i.getPinnedBottomRowCount()&&(o="bottom"),o===void 0?null:{rowIndex:t,rowPinned:o}}function eh(e){let t,o=null;const{pinnedRowModel:i,pageBounds:s}=e,n=i==null?void 0:i.getPinnedBottomRowCount(),r=i==null?void 0: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 it(e,t){var o,i;switch(t.rowPinned){case"top":return(o=e.pinnedRowModel)==null?void 0:o.getPinnedTopRow(t.rowIndex);case"bottom":return(i=e.pinnedRowModel)==null?void 0:i.getPinnedBottomRow(t.rowIndex);default:return e.rowModel.getRow(t.rowIndex)}}function Yo(e,t){var s;const o=(s=e.spannedRowRenderer)==null?void 0:s.getCellByPosition(t);if(o)return o;const i=e.rowRenderer.getRowByPosition(t);return i?i.getCellCtrl(t.column):null}function th(e,t,o){const{rowModel:i,pinnedRowModel:s}=e;let n;return n??(n=i==null?void 0:i.getRowNode(t)),o?n??(n=s==null?void 0:s.getPinnedRowById(t,o)):(n??(n=s==null?void 0:s.getPinnedRowById(t,"top")),n??(n=s==null?void 0:s.getPinnedRowById(t,"bottom"))),n}function Zo(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!=null&&n.isRowsToRender("top")?{rowIndex:n.getPinnedTopRowCount()-1,rowPinned:"top"}:null;const l=i?void 0:r.getRow(o);return Br(e,l,!0)??{rowIndex:o-1,rowPinned:i}}function Or(e,t){const{rowIndex:o,rowPinned:i}=t,{pageBounds:s,pinnedRowModel:n,rowModel:r}=e;if(oh(e,t))return i==="bottom"?null:i==="top"&&r.isRowsToRender()?{rowIndex:s.getFirstRow(),rowPinned:null}:n!=null&&n.isRowsToRender("bottom")?{rowIndex:0,rowPinned:"bottom"}:null;const l=i?void 0:r.getRow(o);return Br(e,l)??{rowIndex:o+1,rowPinned:i}}function Br(e,t,o=!1){const{gos:i,rowRenderer:s}=e;if(!(t!=null&&t.sticky)||!ir(i))return;const n=s.getStickyTopRowCtrls(),r=s.getStickyBottomRowCtrls(),l=!r.some(u=>u.rowNode.rowIndex===t.rowIndex),a=l?n:r,d=(o?-1:1)*(l?-1:1);let c;for(let u=0;u<a.length;u++)if(a[u].rowNode.rowIndex===t.rowIndex){c=a[u+d];break}return c?{rowIndex:c.rowNode.rowIndex,rowPinned:null}:void 0}function oh(e,t){const{rowPinned:o,rowIndex:i}=t,{pinnedRowModel:s,pageBounds:n}=e;return o==="top"?((s==null?void 0:s.getPinnedTopRowCount())??0)-1<=i:o==="bottom"?((s==null?void 0:s.getPinnedBottomRowCount())??0)-1<=i:n.getLastRow()<=i}function hs(e,t={}){var d;const{rowIndex:o,rowId:i,rowCtrl:s,rowPinned:n}=t;if(s)return s;const{rowModel:r,rowRenderer:l}=e;let{rowNode:a}=t;return a||(i?a=th(e,i,n):o!=null&&(a=r.getRow(o))),(d=l.getRowCtrls(a?[a]:[]))==null?void 0:d[0]}function q(e,t={}){var c;const{cellCtrl:o,colId:i,columnId:s,column:n}=t;if(o)return o;const r=e.colModel.getCol(i??s??gs(n)),l=t.rowCtrl??hs(e,t),a=(l==null?void 0:l.getCellCtrl(r))??void 0;if(a)return a;const d=t.rowNode??(l==null?void 0:l.rowNode);if(d)return(c=e.rowRenderer.getCellCtrls([d],[r]))==null?void 0:c[0]}function Vr(e){const{editSvc:t}=e;t!=null&&t.isBatchEditing()?Dt(e):t==null||t.stopEditing(void 0,{source:"api"})}function ih(e,t,o){const{gos:i,popupSvc:s}=t;if(!i.get("stopEditingWhenCellsLoseFocus"))return;const n=r=>{const l=r.relatedTarget;if($i(l)===null){Vr(t);return}let a=o.some(d=>d.contains(l))&&Qr(i,l);a||(a=!!s&&(s.getActivePopups().some(d=>d.contains(l))||s.isElementWithinCustomPopup(l))),a||Vr(t)};o.forEach(r=>e.addManagedElementListeners(r,{focusout:n}))}function gs(e){if(e)return typeof e=="string"?e:e.getColId()}var pe=Symbol("unedited");function Nr(e,t={}){var s;const o=[],i=e.rowRenderer.getCellCtrls(t.rowNodes,t.columns);for(const n of i){const r=(s=n.comp)==null?void 0:s.getCellEditor();r&&o.push({ctrl:n,editor:ds(r)})}return o}var sh=(e,t={})=>Nr(e,t).map(o=>o.editor);function nh(e,t,o,i,s,n){var u;t.length===0&&(o!=null&&o.rowNode)&&(o!=null&&o.column)&&xt(e,o,{key:i,event:s,cellStartedEdit:n});const{valueSvc:r,editSvc:l,editModelSvc:a}=e,{rowNode:d,column:c}=o??{};for(const h of t){const{rowNode:g,column:p}=h,f=q(e,h);if(!f){if(g&&p){const m=r.getValue(p,g,void 0,"api"),v=((o==null?void 0:o.rowNode)===g&&(o==null?void 0:o.column)===p&&i||void 0)??(l==null?void 0:l.getCellDataValue(h,!1))??((u=r.getValueForDisplay(p,g))==null?void 0:u.value)??m??pe;a==null||a.setEdit(h,{pendingValue:v,sourceValue:m,state:"editing"})}continue}const C=n&&d===f.rowNode&&f.column===c;xt(e,{rowNode:d,column:f.column},{key:C?i:null,event:C?s:null,cellStartedEdit:C})}}function ze({pendingValue:e,sourceValue:t}){return e===pe&&(e=t),e!==t}function xt(e,t,o){var C,m,w,b,v,S,D;const{key:i,event:s,cellStartedEdit:n,silent:r}=o??{},l=q(e,t),a=(C=l==null?void 0:l.comp)==null?void 0:C.getCellEditor(),d=Wr(e,t,i,n),c=(m=e.editModelSvc)==null?void 0:m.getEdit(t);let u=(i==null?void 0:i.length)===1?i:d.value;if(u===void 0&&(u=c==null?void 0:c.sourceValue),(w=e.editModelSvc)==null||w.setEdit(t,{editorValue:u,state:"editing"}),a){(b=a.refresh)==null||b.call(a,d);return}const h=t.column.getColDef(),g=Ar(e.userCompFactory,h,d),p=(g==null?void 0:g.popupFromSelector)!=null?g.popupFromSelector:!!h.cellEditorPopup,f=(g==null?void 0:g.popupPositionFromSelector)!=null?g.popupPositionFromSelector:h.cellEditorPopupPosition;zr(g.params,s),l&&(l.editCompDetails=g,(v=l.comp)==null||v.setEditDetails(g,p,f,e.gos.get("reactiveCustomComponents")),(S=l==null?void 0:l.rowCtrl)==null||S.refreshRow({suppressFlash:!0}),r||(D=e.editSvc)==null||D.dispatchCellEvent(t,s,"cellEditingStarted"))}function _r(e){var s;const t={editorValueExists:!1},o=(s=e.getValidationErrors)==null?void 0:s.call(e);return((o==null?void 0:o.length)??0)>0?t:{editorValue:e.getValue(),editorValueExists:!0}}function Wr(e,t,o,i){var C,m,w,b;const{valueSvc:s,gos:n,editSvc:r}=e,l=q(e,t),a=((C=t.rowNode)==null?void 0:C.rowIndex)??void 0,d=r==null?void 0:r.isBatchEditing(),c=e.colModel.getCol(t.column.getId()),{rowNode:u,column:h}=t,g=(m=l.comp)==null?void 0:m.getCellEditor(),p=(r==null?void 0:r.getCellDataValue(t,!1))??(g?(w=_r(g))==null?void 0:w.editorValue:void 0),f=p===pe?(b=s.getValueForDisplay(c,u))==null?void 0:b.value:p;return _(n,{value:f,eventKey:o??null,column:h,colDef:h.getColDef(),rowIndex:a,node:u,data:u.data,cellStartedEdit:i??!1,onKeyDown:l==null?void 0:l.onKeyDown.bind(l),stopEditing:v=>{r.stopEditing(t,{source:d?"ui":"api",suppressNavigateAfterEdit:v}),Xo(e,t)},eGridCell:l==null?void 0:l.eGui,parseValue:v=>s.parseValue(c,u,v,l==null?void 0:l.value),formatValue:l==null?void 0:l.formatValue.bind(l),validate:()=>{r==null||r.validateEdit()}})}function ps(e,t){const{editModelSvc:o}=e;o==null||o.getEditMap().forEach((i,s)=>{i.forEach((n,r)=>{!t&&(n.state==="editing"||n.pendingValue===pe)||!ze(n)&&(n.state!=="editing"||t)&&(o==null||o.removeEdits({rowNode:s,column:r}))})})}function rh(e,t){var d;const o=(d=t.comp)==null?void 0:d.getCellEditor();if(!(o!=null&&o.refresh))return;const{eventKey:i,cellStartedEdit:s}=t.editCompDetails.params,{column:n}=t,r=Wr(e,t,i,s),l=n.getColDef(),a=Ar(e.userCompFactory,l,r);o.refresh(zr(a.params,i))}function zr(e,t){var o;return t instanceof KeyboardEvent&&e.column.getColDef().cellEditor==="agNumberCellEditor"?e.suppressPreventDefault=["-","+",".","e"].includes((t==null?void 0:t.key)??"")||e.suppressPreventDefault:(o=t==null?void 0:t.preventDefault)==null||o.call(t),e}function st(e,t){var o;(o=e.editModelSvc)==null||o.getEditPositions().forEach(i=>{const s=q(e,i);if(!s)return;const n=s.comp.getCellEditor();if(!n)return;const{editorValue:r,editorValueExists:l}=_r(n);Qo(e,i,t,r,void 0,!l)})}function Qo(e,t,o,i,s,n){var g;const{editModelSvc:r,valueSvc:l}=e;if(!r)return;const{rowNode:a,column:d}=t;if(!(a&&d))return;const c=q(e,t),u=!!((g=c==null?void 0:c.comp)!=null&&g.getCellEditor());let h=r.getEdit(t,!0);h!=null&&h.sourceValue||(h=r.setEdit(t,{sourceValue:l.getValue(d,a,void 0,"api"),pendingValue:pe,state:u?"editing":"changed"})),r.setEdit(t,{editorValue:n?h.sourceValue:i,state:u?"editing":"changed"}),o&&lh(e,t)}function lh(e,t){const{editModelSvc:o}=e,i=o==null?void 0:o.getEdit(t,!0);o==null||o.setEdit(t,{pendingValue:i==null?void 0:i.editorValue})}function Dt(e,t,o){var i;t||(t=(i=e.editModelSvc)==null?void 0:i.getEditPositions()),t.forEach(s=>Xo(e,s,o))}function Xo(e,t,o){var h,g;const{editSvc:i,editModelSvc:s}=e,{rowNode:n,column:r}=t,l=q(e,t);if(!l){s!=null&&s.hasEdits(t)&&n&&r&&(s==null||s.setEdit(t,{state:"changed"}));return}const{comp:a}=l;if(a&&!a.getCellEditor())return;const d=(g=(h=a==null?void 0:a.getCellEditor())==null?void 0:h.getValidationErrors)==null?void 0:g.call(h),c=s==null?void 0:s.getCellValidationModel();d!=null&&d.length?c==null||c.setCellValidation(t,{errorMessages:d}):c==null||c.clearCellValidation(t),s!=null&&s.getEdit(t)&&(s==null||s.setEdit(t,{state:"changed"})),a==null||a.setEditDetails(),a==null||a.refreshEditStyles(!1,!1),l==null||l.refreshCell({force:!0,suppressFlash:!0});const u=s==null?void 0:s.getEdit(t);(u==null?void 0:u.state)==="changed"&&!(o!=null&&o.silent)&&(i==null||i.dispatchCellEvent(t,o==null?void 0:o.event,"cellEditingStopped",{valueChanged:ze(u),newValue:u==null?void 0:u.pendingValue,oldValue:u==null?void 0:u.sourceValue}))}function nt(e){var u,h,g,p,f,C,m,w;const t=Nr(e),o=new Gr,{ariaAnnounce:i,localeSvc:s,editModelSvc:n,gos:r}=e,l=r.get("editType")==="fullRow",d=vn(s)("ariaValidationErrorPrefix","Cell Editor Validation");for(const b of t){const{ctrl:v,editor:S}=b,{rowNode:D,column:I}=v,O=((u=S.getValidationErrors)==null?void 0:u.call(S))??[],F=((h=S.getValidationElement)==null?void 0:h.call(S,!1))||!((g=S.isPopup)!=null&&g.call(S))&&v.eGui;if(F){const P=O!=null&&O.length>0,T=P?O.join(". "):"";_d(F,P),P&&i.announceValue(`${d} ${O}`,"editorValidation"),F instanceof HTMLInputElement?F.setCustomValidity(T):F.classList.toggle("invalid",P)}(O==null?void 0:O.length)>0&&o.setCellValidation({rowNode:D,column:I},{errorMessages:O})}st(e,!1),n==null||n.setCellValidationModel(o);const c=new Set;for(const{ctrl:b}of t)c.add(b.rowCtrl);if(l){const b=ah(e);n==null||n.setRowValidationModel(b)}for(const b of c.values()){(p=b.rowEditStyleFeature)==null||p.applyRowStyles();for(const v of b.getAllCellCtrls())(f=v.tooltipFeature)==null||f.refreshTooltip(!0),(C=v.editorTooltipFeature)==null||C.refreshTooltip(!0),(w=(m=v.editStyleFeature)==null?void 0:m.applyCellStyles)==null||w.call(m)}}var ah=e=>{var s;const t=new Hr,o=e.gos.get("getFullRowEditValidationErrors"),i=(s=e.editModelSvc)==null?void 0:s.getEditMap();if(!i)return t;for(const n of i.keys()){const r=i.get(n);if(!r)continue;const l=[],{rowIndex:a,rowPinned:d}=n;for(const u of r.keys()){const h=r.get(u);if(!h)continue;const{editorValue:g,pendingValue:p,sourceValue:f}=h,C=g??(p===pe?void 0:p)??f;l.push({column:u,colId:u.getColId(),rowIndex:a,rowPinned:d,oldValue:f,newValue:C})}const c=(o==null?void 0:o({editorsState:l}))??[];c.length>0&&t.setRowValidation({rowNode:n},{errorMessages:c})}return t};function dh(e){var i;nt(e);const t=(i=e.editModelSvc)==null?void 0:i.getCellValidationModel().getCellValidationMap();if(!t)return null;const o=[];return t.forEach((s,n)=>{s.forEach(({errorMessages:r},l)=>{o.push({column:l,rowIndex:n.rowIndex,rowPinned:n.rowPinned,messages:r??null})})}),o}var ch="ag-column-first",uh="ag-column-last";function $r(e,t,o,i){return K(e)?[]:gh(e.headerClass,e,t,o,i)}function Ur(e,t,o){e.toggleCss(ch,o.isColAtEdge(t,"first")),e.toggleCss(uh,o.isColAtEdge(t,"last"))}function hh(e,t,o,i){return _(t,{colDef:e,column:o,columnGroup:i})}function gh(e,t,o,i,s){if(K(e))return[];let n;if(typeof e=="function"){const r=hh(t,o,i,s);n=e(r)}else n=e;return typeof n=="string"?[n]:Array.isArray(n)?[...n]:[]}function ph(e){return!!(e.rowPinned&&e.pinnedSibling)}var y={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"},fs=!1,Jo=0;function fh(e){Jo>0||(e.addEventListener("keydown",ei),e.addEventListener("mousedown",ei))}function Ch(e){Jo>0||(e.removeEventListener("keydown",ei),e.removeEventListener("mousedown",ei))}function ei(e){const t=fs,o=e.type==="keydown";o&&(e.ctrlKey||e.metaKey||e.altKey)||t!==o&&(fs=o)}function mh(e){const t=J(e);return fh(t),Jo++,()=>{Jo--,Ch(t)}}function wh(){return fs}function Ft(e,t,o=!1){const i=tc;let s=Ln;t&&(s+=", "+t),o&&(s+=', [tabindex="-1"]');const n=Array.prototype.slice.apply(e.querySelectorAll(i)).filter(a=>Me(a)),r=Array.prototype.slice.apply(e.querySelectorAll(s));return r.length?((a,d)=>a.filter(c=>d.indexOf(c)===-1))(n,r):n}function ti(e,t=!1,o=!1,i=!1){const s=Ft(e,i?".ag-tab-guard":null,o),n=t?$(s):s[0];return n?(n.focus({preventScroll:!0}),!0):!1}function oi(e,t,o,i){const s=Ft(t,null),n=Y(e);let r;r=s.indexOf(n);const l=r+(i?-1:1);return l<0||l>=s.length?null:s[l]}function vh(e,t=5){let o=0;for(;e&&$i(e)===null&&++o<=t;)e=e.parentElement;return $i(e)===null?null:e}function rt(e){var t;return e.gos.get("suppressHeaderFocus")||!!((t=e.overlays)!=null&&t.isExclusive())}function ii(e){var t;return e.gos.get("suppressCellFocus")||!!((t=e.overlays)!=null&&t.isExclusive())}function to(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 bh(e,t,o,{rowNode:i,column:s},n){return _(e.gos,{type:o,node:i,data:i.data,value:n,column:s,colDef:s.getColDef(),rowPinned:i.rowPinned,event:t,rowIndex:i.rowIndex})}function Sh(e,t=!1){return e===y.DELETE?!0:!t&&e===y.BACKSPACE?An():!1}var yh=class extends x{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 y.ENTER:this.onEnterKeyDown(e);break;case y.F2:this.onF2KeyDown(e);break;case y.ESCAPE:this.onEscapeKeyDown(e);break;case y.TAB:this.onTabKeyDown(e);break;case y.BACKSPACE:case y.DELETE:this.onBackspaceOrDeleteKeyDown(t,e);break;case y.DOWN:case y.UP:case y.RIGHT:case y.LEFT:this.onNavigationKeyDown(e,t);break}}onNavigationKeyDown(e,t){var s,n;const{cellCtrl:o,beans:i}=this;if(!((s=i.editSvc)!=null&&s.isEditing(o,{withOpenEditor:!0}))){if(e.shiftKey&&o.isRangeSelectionEnabled())this.onShiftRangeSelect(e);else{const r=o.getFocusedCellPosition();(n=i.navigation)==null||n.navigateToNextCell(e,t,r,!0)}e.preventDefault()}}onShiftRangeSelect(e){const{rangeSvc:t,navigation:o}=this.beans;if(!t)return;const i=t.extendLatestRangeInDirection(e);i&&(e.key===y.LEFT||e.key===y.RIGHT?o==null||o.ensureColumnVisible(i.column):o==null||o.ensureRowVisible(i.rowIndex))}onTabKeyDown(e){var t;(t=this.beans.navigation)==null||t.onTabKeyDown(this.cellCtrl,e)}onBackspaceOrDeleteKeyDown(e,t){var d;const{cellCtrl:o,beans:i,rowNode:s}=this,{gos:n,rangeSvc:r,eventSvc:l,editSvc:a}=i;if(l.dispatchEvent({type:"keyShortcutChangedCellStart"}),Sh(e,n.get("enableCellEditingOnBackspace"))&&!(a!=null&&a.isEditing(o,{withOpenEditor:!0}))){if(r&&Je(n))r.clearCellRangeCellValues({dispatchWrapperEvents:!0,wrapperEventSource:"deleteKey"});else if(o.isCellEditable()){const{column:c}=o,u=this.beans.valueSvc.getDeleteValue(c,s);s.setDataValue(c,u,"cellClear")}}else a!=null&&a.isEditing(o,{withOpenEditor:!0})||(d=i.editSvc)==null||d.startEditing(o,{startedEdit:!0,event:t});l.dispatchEvent({type:"keyShortcutChangedCellEnd"})}onEnterKeyDown(e){var d;const{cellCtrl:t,beans:o}=this,{editSvc:i,navigation:s}=o,n=i==null?void 0:i.isEditing(t),r=t.rowNode,l=i==null?void 0:i.isRowEditing(r),a=c=>{(i==null?void 0:i.startEditing(c,{startedEdit:!0,event:e}))&&e.preventDefault()};if(n||l){if(this.isCtrlEnter(e)){i==null||i.applyBulkEdit(t,((d=o==null?void 0:o.rangeSvc)==null?void 0:d.getCellRanges())||[]);return}if(nt(o),(i==null?void 0:i.checkNavWithValidation(void 0,e))==="block-stop")return;i!=null&&i.isEditing(t,{withOpenEditor:!0})?i==null||i.stopEditing(t,{event:e}):l&&!t.isCellEditable()?i==null||i.stopEditing({rowNode:r},{event:e}):a(t)}else if(o.gos.get("enterNavigatesVertically")){const c=e.shiftKey?y.UP:y.DOWN;s==null||s.navigateToNextCell(null,c,t.cellPosition,!1)}else{if(i!=null&&i.hasValidationErrors())return;i!=null&&i.hasValidationErrors(t)&&i.revertSingleCellEdit(t,!0),a(t)}}isCtrlEnter(e){return(e.ctrlKey||e.metaKey)&&e.key===y.ENTER}onF2KeyDown(e){const{cellCtrl:t,beans:{editSvc:o}}=this;o!=null&&o.isEditing()&&(nt(this.beans),(o==null?void 0:o.checkNavWithValidation(void 0,e))==="block-stop")||o==null||o.startEditing(t,{startedEdit:!0,event:e})}onEscapeKeyDown(e){const{cellCtrl:t,beans:{editSvc:o}}=this;(o==null?void 0:o.checkNavWithValidation(t,e))==="block-stop"&&o.revertSingleCellEdit(t),o==null||o.stopEditing(t,{event:e,cancel:!0})}processCharacter(e){var r;const o=e.target!==this.eGui,{beans:{editSvc:i},cellCtrl:s}=this;if(o||i!=null&&i.isEditing(s,{withOpenEditor:!0}))return;if(e.key===y.SPACE)this.onSpaceKeyDown(e);else if(i!=null&&i.isCellEditable(s,"ui")){if(i!=null&&i.hasValidationErrors()&&!(i!=null&&i.hasValidationErrors(s)))return;i==null||i.startEditing(s,{startedEdit:!0,event:e,source:"api"});const l=s.editCompDetails;!((r=l==null?void 0:l.params)!=null&&r.suppressPreventDefault)&&e.preventDefault()}}onSpaceKeyDown(e){var s;const{gos:t,editSvc:o}=this.beans,{rowNode:i}=this.cellCtrl;!(o!=null&&o.isEditing(this.cellCtrl,{withOpenEditor:!0}))&&Qe(t)&&((s=this.beans.selectionSvc)==null||s.handleSelectionEvent(e,i,"spaceKey")),e.preventDefault()}};function Kr(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}function jr({gos:e},t){return t.button===2||t.ctrlKey&&e.get("allowContextMenuWithControlKey")}var Rh=class extends x{constructor(e,t,o){super(),this.cellCtrl=e,this.column=o,this.beans=t}onMouseEvent(e,t){if(!ke(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){var h;if((h=this.beans.touchSvc)!=null&&h.handleCellDoubleClick(this,e))return;const{eventSvc:t,rangeSvc:o,editSvc:i,editModelSvc:s,frameworkOverrides:n}=this.beans,r=e.ctrlKey||e.metaKey,{cellCtrl:l}=this,{column:a,cellPosition:d}=l;o&&r&&o.getCellRangeCount(d)>1&&o.intersectLastRange(!0);const c=l.createEvent(e,"cellClicked");t.dispatchEvent(c);const u=a.getColDef();if(u.onCellClicked&&window.setTimeout(()=>{n.wrapOutgoing(()=>{u.onCellClicked(c)})},0),(s==null?void 0:s.getState(l))!=="editing"){const g=i==null?void 0:i.isEditing(),p=(s==null?void 0:s.getCellValidationModel().getCellValidationMap().size)??0,f=(s==null?void 0:s.getRowValidationModel().getRowValidationMap().size)??0;if(g&&(p>0||f>0))return;i!=null&&i.shouldStartEditing(l,e)?i==null||i.startEditing(l,{event:e}):i!=null&&i.shouldStopEditing(l,e)&&(i==null||i.stopEditing(l))}}onCellDoubleClicked(e){var c;const{column:t,beans:o,cellCtrl:i}=this,{eventSvc:s,frameworkOverrides:n,editSvc:r,editModelSvc:l}=o,a=t.getColDef(),d=i.createEvent(e,"cellDoubleClicked");if(s.dispatchEvent(d),typeof a.onCellDoubleClicked=="function"&&window.setTimeout(()=>{n.wrapOutgoing(()=>{a.onCellDoubleClicked(d)})},0),r!=null&&r.shouldStartEditing(this.cellCtrl,e)&&((c=this.beans.editModelSvc)==null?void 0:c.getState(this.cellCtrl))!=="editing"){const u=r==null?void 0:r.isEditing(),h=(l==null?void 0:l.getCellValidationModel().getCellValidationMap().size)??0,g=(l==null?void 0:l.getRowValidationModel().getRowValidationMap().size)??0;if(u&&(h>0||g>0))return;r==null||r.startEditing(i,{event:e})}}onMouseDown(e){const{ctrlKey:t,metaKey:o,shiftKey:i}=e,s=e.target,{cellCtrl:n,beans:r}=this,{eventSvc:l,rangeSvc:a,rowNumbersSvc:d,focusSvc:c,gos:u,editSvc:h}=r;if(this.isRightClickInExistingRange(e))return;const g=a&&!a.isEmpty(),p=this.containsWidget(s),{cellPosition:f,column:C}=n,m=ot(C);if(d&&m&&!d.handleMouseDownOnCell(f,e)){a&&e.preventDefault(),e.stopImmediatePropagation();return}if(!i||!g){const w=h==null?void 0:h.isEditing(n),v=u.get("enableCellTextSelection")&&e.defaultPrevented,S=(ht()||v)&&!w&&!Ui(s)&&!p;n.focusCell(S,e)}if(i&&g&&!c.isCellFocused(f)){e.preventDefault();const w=c.getFocusedCell();if(w){const{column:b,rowIndex:v,rowPinned:S}=w;h!=null&&h.isEditing(w)&&(h==null||h.stopEditing(w)),c.setFocusedCell({column:b,rowIndex:v,rowPinned:S,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0,sourceEvent:e})}}if(!p){if(a){m&&e.preventDefault();const w=jr(this.beans,e)&&m;if(i)a.extendLatestRangeToCell(f);else if(!w){const b=t||o;a.setRangeToCell(f,b)}}l.dispatchEvent(this.cellCtrl.createEvent(e,"cellMouseDown"))}}isRightClickInExistingRange(e){const{rangeSvc:t}=this.beans;if(t){const o=t.isCellInAnyRange(this.cellCtrl.cellPosition),i=jr(this.beans,e);if(o&&i)return!0}return!1}containsWidget(e){return pt(e,"ag-selection-checkbox",3)||pt(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==null||o.clearMouseOver()}onMouseOver(e){if(this.mouseStayingInsideCell(e))return;const{eventSvc:t,colHover:o}=this.beans;t.dispatchEvent(this.cellCtrl.createEvent(e,"cellMouseOver")),o==null||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}},Eh=class extends x{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();if(e||(this.setupColSpan(),this.setupRowSpan()),this.onLeftChanged(),this.onWidthChanged(),e||this._legacyApplyRowSpan(),e){const t=this.refreshSpanHeight.bind(this,e);t(),this.addManagedListeners(this.beans.eventSvc,{paginationChanged:t,recalculateRowBounds:t,pinnedHeightChanged:t})}}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();Jt(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||K(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=$(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=is(this.beans)*this.rowSpan;this.eContent.style.height=`${o}px`,this.eContent.style.zIndex="1"}destroy(){super.destroy()}},xh="ag-cell",Dh="ag-cell-auto-height",Fh="ag-cell-normal-height",Ph="ag-cell-focus",Th="ag-cell-first-right-pinned",Ih="ag-cell-last-left-pinned",Ah="ag-cell-not-inline-editing",Mh="ag-cell-wrap-text",si="cellCtrl";function qr(e,t){return ar(e,t,si)}var kh=0,Pt=class extends x{constructor(e,t,o,i){super(),this.column=e,this.rowNode=t,this.rowCtrl=i,this.rangeFeature=void 0,this.rowResizeFeature=void 0,this.positionFeature=void 0,this.customStyleFeature=void 0,this.editStyleFeature=void 0,this.mouseListener=void 0,this.keyboardListener=void 0,this.suppressRefreshCell=!1,this.onCompAttachedFuncs=[],this.onEditorAttachedFuncs=[],this.focusEventWhileNotReady=null,this.hasBeenFocused=!1,this.hasEdit=!1,this.tooltipFeature=void 0,this.editorTooltipFeature=void 0,this.beans=o,this.gos=o.gos,this.editSvc=o.editSvc,this.hasEdit=!!o.editSvc;const{colId:s}=e;this.instanceId=s+"-"+kh++,this.createCellPosition(),this.updateAndFormatValue(!1)}addFeatures(){var i,s;const{beans:e}=this;this.positionFeature=new Eh(this,e),this.customStyleFeature=(i=e.cellStyles)==null?void 0:i.createCellCustomStyleFeature(this,e),this.editStyleFeature=(s=e.editSvc)==null?void 0:s.createCellStyleFeature(this,e),this.mouseListener=new Rh(this,e,this.column),this.keyboardListener=new yh(this,e,this.rowNode,this.rowCtrl),this.enableTooltipFeature();const{rangeSvc:t}=e;t&&Je(e.gos)&&(this.rangeFeature=t.createCellRangeFeature(e,this)),ot(this.column)&&(this.rowResizeFeature=this.beans.rowNumbersSvc.createRowNumbersRowResizerFeature(e,this))}isCellSpanning(){return!1}getCellSpan(){}removeFeatures(){const e=this.beans.context;this.positionFeature=e.destroyBean(this.positionFeature),this.editorTooltipFeature=e.destroyBean(this.editorTooltipFeature),this.customStyleFeature=e.destroyBean(this.customStyleFeature),this.editStyleFeature=e.destroyBean(this.editStyleFeature),this.mouseListener=e.destroyBean(this.mouseListener),this.keyboardListener=e.destroyBean(this.keyboardListener),this.rangeFeature=e.destroyBean(this.rangeFeature),this.rowResizeFeature=e.destroyBean(this.rowResizeFeature),this.disableTooltipFeature()}enableTooltipFeature(e,t){var o;this.tooltipFeature=(o=this.beans.tooltipSvc)==null?void 0:o.enableCellTooltipFeature(this,e,t)}disableTooltipFeature(){this.tooltipFeature=this.beans.context.destroyBean(this.tooltipFeature)}enableEditorTooltipFeature(e){var t;this.editorTooltipFeature&&this.disableEditorTooltipFeature(),this.editorTooltipFeature=(t=this.beans.tooltipSvc)==null?void 0:t.setupCellEditorTooltip(this,e),nt(this.beans)}disableEditorTooltipFeature(){this.editorTooltipFeature=this.beans.context.destroyBean(this.editorTooltipFeature)}setComp(e,t,o,i,s,n,r){var l,a,d,c,u,h,g,p;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(),(l=this.positionFeature)==null||l.init(),(a=this.customStyleFeature)==null||a.setComp(e),(d=this.editStyleFeature)==null||d.setComp(e),(c=this.tooltipFeature)==null||c.refreshTooltip(),(u=this.keyboardListener)==null||u.init(),(h=this.rangeFeature)==null||h.setComp(e),(g=this.rowResizeFeature)==null||g.refreshRowResizer(),n&&this.isCellEditable()?(p=this.editSvc)==null||p.startEditing(this,{startedEdit:!0,source:"api"}):this.showValue(!1,!0),this.onCompAttachedFuncs.length&&(this.onCompAttachedFuncs.forEach(f=>f()),this.onCompAttachedFuncs=[])}setupAutoHeight(e,t){var o;this.isAutoHeight=((o=this.beans.rowAutoHeight)==null?void 0:o.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}getDeferLoadingCellRenderer(){var a,d;const{beans:e,column:t}=this,{userCompFactory:o,ctrlsSvc:i,eventSvc:s}=e,n=t.getColDef(),r=this.createCellRendererParams();r.deferRender=!0;const l=Ir(o,n,r);if((d=(a=i.getGridBodyCtrl())==null?void 0:a.scrollFeature)!=null&&d.isScrolling()){let c;const u=new eo(h=>{c=h});return this.addManagedListeners(s,{bodyScrollEnd:()=>c()}),{loadingComp:l,onReady:u}}return{loadingComp:l,onReady:eo.resolve()}}showValue(e,t){var u,h,g;const{beans:o,column:i,rowNode:s,rangeFeature:n}=this,{userCompFactory:r}=o;let l=this.getValueToDisplay(),a;const d=s.stub&&((u=s.groupData)==null?void 0:u[i.getId()])==null,c=i.getColDef();if(d||this.isCellRenderer()){const p=this.createCellRendererParams();!d||ot(i)?a=Tr(r,c,p):a=Ir(r,c,p)}if(!a&&!d&&((h=o.findSvc)!=null&&h.isMatch(s,i))){const p=this.createCellRendererParams();a=Tr(r,{...i.getColDef(),cellRenderer:"agFindCellRenderer"},p)}if(this.hasEdit&&this.editSvc.isBatchEditing()&&this.editSvc.isRowEditing(s,{checkSiblings:!0})){const p=this.editSvc.prepDetailsDuringBatch(this,{compDetails:a,valueToDisplay:l});p&&(p.compDetails?a=p.compDetails:p.valueToDisplay&&(l=p.valueToDisplay))}this.comp.setRenderDetails(a,l,e),!t&&n&&Ne(o,()=>n==null?void 0:n.refreshHandle()),(g=this.rowResizeFeature)==null||g.refreshRowResizer()}setupControlComps(){const e=this.column.getColDef();this.includeSelection=this.isIncludeControl(this.isCheckboxSelection(e),!0),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,t=!1){return(this.rowNode.rowPinned==null||t&&ph(this.rowNode))&&!!e}isCheckboxSelection(e){const{rowSelection:t,groupDisplayType:o}=this.beans.gridOptions,i=Go(t),s=tt(this.column);return o==="custom"&&i!=="selectionColumn"&&s?!1:e.checkboxSelection||s&&typeof t=="object"&&wt(t)}refreshShouldDestroy(){const e=this.column.getColDef(),t=this.includeSelection!=this.isIncludeControl(this.isCheckboxSelection(e),!0),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(){const{editSvc:e}=this.beans;e!=null&&e.isEditing(this,{withOpenEditor:!0})&&(e==null||e.stopEditing(this,{source:e!=null&&e.isBatchEditing()?"ui":"api"}))}stopEditing(e=!1){const{editSvc:t}=this.beans;return(t==null?void 0:t.stopEditing(this,{cancel:e,source:t!=null&&t.isBatchEditing()?"ui":"api"}))??!1}createCellRendererParams(){const{value:e,valueFormatted:t,column:o,rowNode:i,comp:s,eGui:n,beans:{valueSvc:r,gos:l,editSvc:a}}=this;return _(l,{value:e,valueFormatted:t,getValue:()=>r.getValueForDisplay(o,i).value,setValue:c=>(a==null?void 0:a.setDataValue({rowNode:i,column:o},c))||r.setValue(i,o,c),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:(c,u,h,g)=>this.registerRowDragger(c,u,g),setTooltip:(c,u)=>{var h;l.assertModuleRegistered("Tooltip",3),this.tooltipFeature&&this.disableTooltipFeature(),this.enableTooltipFeature(c,u),(h=this.tooltipFeature)==null||h.refreshTooltip()}})}onCellChanged(e){e.column===this.column&&this.refreshCell({})}refreshOrDestroyCell(e){var t;this.refreshShouldDestroy()?(t=this.rowCtrl)==null||t.recreateCell(this):this.refreshCell(e)}refreshCell({force:e,suppressFlash:t,newData:o}={}){var d,c,u,h,g,p,f,C;if(this.suppressRefreshCell)return;const i=this.column.getColDef(),s=i.field==null&&i.valueGetter==null&&i.showRowGroup==null,n=e||s||o,r=!!this.comp,l=this.updateAndFormatValue(r),a=n||l;if(r){if(a){this.showValue(!!o,!1);const m=(d=this.beans.filterManager)==null?void 0:d.isSuppressFlashingCellsBecauseFiltering();!t&&!m&&i.enableCellChangeFlash&&((c=this.beans.cellFlashSvc)==null||c.flashCell(this)),(h=(u=this.editStyleFeature)==null?void 0:u.applyCellStyles)==null||h.call(u),(g=this.customStyleFeature)==null||g.applyUserStyles(),(p=this.customStyleFeature)==null||p.applyClassesFromColDef()}(f=this.tooltipFeature)==null||f.refreshTooltip(),(C=this.customStyleFeature)==null||C.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,{value:i,valueFormatted:s}=this.beans.valueSvc.getValueForDisplay(this.column,this.rowNode,!0);return this.value=i,this.valueFormatted=s,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;Xe(this.beans.gos,t,si,this),e.addDestroyFunc(()=>Xe(this.beans.gos,t,si,null))}createEvent(e,t){const{rowNode:o,column:i,value:s,beans:n}=this;return bh(n,e,t,{rowNode:o,column:i},s)}processCharacter(e){var t;(t=this.keyboardListener)==null||t.processCharacter(e)}onKeyDown(e){var t;(t=this.keyboardListener)==null||t.onKeyDown(e)}onMouseEvent(e,t){var o;(o=this.mouseListener)==null||o.onMouseEvent(e,t)}getColSpanningList(){var e;return((e=this.positionFeature)==null?void 0:e.getColSpanningList())??[]}onLeftChanged(){var e;this.comp&&((e=this.positionFeature)==null||e.onLeftChanged())}onDisplayedColumnsChanged(){this.eGui&&(this.refreshAriaColIndex(),this.refreshFirstAndLastStyles())}refreshFirstAndLastStyles(){const{comp:e,column:t,beans:o}=this;Ur(e,t,o.visibleCols)}refreshAriaColIndex(){const e=this.beans.visibleCols.getAriaColIndex(this.column);Fn(this.eGui,e)}onWidthChanged(){var e;return(e=this.positionFeature)==null?void 0:e.onWidthChanged()}getRowPosition(){const{rowIndex:e,rowPinned:t}=this.cellPosition;return{rowIndex:e,rowPinned:t}}updateRangeBordersIfRangeCount(){var e;this.comp&&((e=this.rangeFeature)==null||e.updateRangeBordersIfRangeCount())}onCellSelectionChanged(){var e;this.comp&&((e=this.rangeFeature)==null||e.onCellSelectionChanged())}isRangeSelectionEnabled(){return this.rangeFeature!=null}focusCell(e=!1,t){var i;const o=(i=this.editSvc)==null?void 0:i.allowedFocusTargetOnValidation(this);o&&o!==this||this.beans.focusSvc.setFocusedCell({...this.getFocusedCellPosition(),forceBrowserFocus:e,sourceEvent:t})}restoreFocus(e=!1){const{beans:{editSvc:t,focusSvc:o},comp:i}=this;if(!i||t!=null&&t.isEditing(this)||!this.isCellFocused()||!o.shouldTakeFocus())return;const s=()=>{if(!this.isAlive())return;const n=i.getFocusableElement();this.isCellFocused()&&n.focus({preventScroll:!0})};if(e){setTimeout(s,0);return}s()}onRowIndexChanged(){var e,t;this.createCellPosition(),this.onCellFocused(),this.restoreFocus(),(e=this.rangeFeature)==null||e.onCellSelectionChanged(),(t=this.rowResizeFeature)==null||t.refreshRowResizer()}onSuppressCellFocusChanged(e){const t=this.eGui;t&&(ot(this.column)&&(e=!0),ce(t,"tabindex",e?void 0:-1))}onFirstRightPinnedChanged(){if(!this.comp)return;const e=this.column.isFirstRightPinned();this.comp.toggleCss(Th,e)}onLastLeftPinnedChanged(){if(!this.comp)return;const e=this.column.isLastLeftPinned();this.comp.toggleCss(Ih,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){var s;const{beans:t}=this;if(ii(t))return;if(!this.comp){e&&(this.focusEventWhileNotReady=e);return}const o=this.isCellFocused(),i=((s=t.editSvc)==null?void 0:s.isEditing(this))??!1;if(this.comp.toggleCss(Ph,o),o&&e&&e.forceBrowserFocus){let n=this.comp.getFocusableElement();if(i){const r=Ft(n,null,!0);r.length&&(n=r[0])}n.focus({preventScroll:!!e.preventScrollOnBrowserFocus})}o&&this.rowCtrl.announceDescription()}createCellPosition(){const{rowIndex:e,rowPinned:t}=this.rowNode;this.cellPosition={rowIndex:e,rowPinned:qe(t),column:this.column}}applyStaticCssClasses(){const{comp:e}=this;e.toggleCss(xh,!0),e.toggleCss(Ah,!0);const t=this.column.isAutoHeight()==!0;e.toggleCss(Dh,t),e.toggleCss(Fh,!t)}onColumnHover(){var e;(e=this.beans.colHover)==null||e.onCellColumnHover(this.column,this.comp)}onColDefChanged(){var e,t;this.comp&&(this.column.isTooltipEnabled()?(this.disableTooltipFeature(),this.enableTooltipFeature()):this.disableTooltipFeature(),this.setWrapText(),(e=this.editSvc)!=null&&e.isEditing(this)?(t=this.editSvc)==null||t.handleColDefChanged(this):this.refreshOrDestroyCell({force:!0,suppressFlash:!0}))}setWrapText(){const e=this.column.getColDef().wrapText==!0;this.comp.toggleCss(Mh,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(){var e;return((e=this.comp)==null?void 0:e.getCellRenderer())??null}destroy(){this.onCompAttachedFuncs=[],this.onEditorAttachedFuncs=[],this.isCellFocused()&&this.hasBrowserFocus()&&this.beans.focusSvc.attemptToRecoverFocus(),super.destroy()}hasBrowserFocus(){var e;return((e=this.eGui)==null?void 0:e.contains(Y(this.beans)))??!1}createSelectionCheckbox(){var t;const e=(t=this.beans.selectionSvc)==null?void 0:t.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){var s;const i=(s=this.beans.rowDragSvc)==null?void 0:s.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}},Yr="__ag_grid_instance";function Zr(e,t){t[Yr]=e.gridInstanceId}function oo(e,t){return Qr(e,t.target)}function Qr(e,t){let o=t;for(;o;){const i=o[Yr];if(M(i))return i===e.gridInstanceId;o=o.parentElement}return!1}function Lh(e,t){var o;return((o=qr(e,t.target))==null?void 0:o.getFocusedCellPosition())??null}var Gh=class extends x{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),we(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){var o;this.dragging=!0,this.dragSource=e,this.eventLastTime=t,this.dragItem=e.getDragItem(),(o=e.onDragStarted)==null||o.call(e),this.createDragAndDropImageComponent()}onDragStop(e){var o,i;(i=(o=this.dragSource)==null?void 0:o.onDragStopped)==null||i.call(o);const{lastDropTarget:t}=this;if(t!=null&&t.onDragStop){const s=this.createDropTargetEvent(t,e,null,null,!1);t.onDragStop(s)}this.clearDragAndDropProperties()}onDragCancel(){var o;const{dragSource:e,lastDropTarget:t}=this;(o=e==null?void 0:e.onDragCancelled)==null||o.call(e),t!=null&&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){var c,u;const o=this.getHorizontalDirection(e),i=this.getVerticalDirection(e);this.eventLastTime=e,this.positionDragAndDropImageComp(e);const s=this.dropTargets.filter(h=>this.isMouseOnDropTarget(e,h)),n=this.findCurrentDropTarget(e,s),{lastDropTarget:r,dragSource:l,dragAndDropImageComp:a,dragItem:d}=this;if(n!==r){if(this.leaveLastTargetIfExists(e,o,i,t),r!==null&&n===null&&((c=l==null?void 0:l.onGridExit)==null||c.call(l,d)),r===null&&n!==null&&((u=l==null?void 0:l.onGridEnter)==null||u.call(l,d)),this.enterDragTargetIfExists(n,e,o,i,t),n&&a){const{comp:h,promise:g}=a;h?h.setIcon(n.getIconName?n.getIconName():null,!1):g.then(p=>{p&&p.setIcon(n.getIconName?n.getIconName():null,!1)})}this.lastDropTarget=n}else if(n&&n.onDragging){const h=this.createDropTargetEvent(n,e,o,i,t);n.onDragging(h)}}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=(l,a)=>{for(const d of a){const{width:c,height:u,left:h,right:g,top:p,bottom:f}=d.getBoundingClientRect();if(c===0||u===0)return!1;const C=l.clientX>=h&&l.clientX<g,m=l.clientY>=p&&l.clientY<f;if(!C||!m)return!1}return!0};for(const l of o)if(s(e,l)){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=Zt(this.beans).elementsFromPoint(e.clientX,e.clientY);for(const n of s)for(const r of t)if(this.getAllContainersFromDropTarget(r).flatMap(a=>a).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){var i;const t=(i=this.eventLastTime)==null?void 0:i.clientX,o=e.clientX;return t===o?null:t>o?"left":"right"}getVerticalDirection(e){var i;const t=(i=this.eventLastTime)==null?void 0:i.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:l,dragSource:a,gos:d}=this,c=t.clientX-r.left,u=t.clientY-r.top;return _(d,{event:t,x:c,y:u,vDirection:i,hDirection:o,dragSource:a,fromNudge:s,dragItem:l,dropZoneTarget:n})}positionDragAndDropImageComp(e){const t=this.getDragAndDropImageComponent();t&&vc(t.getGui(),e,this.beans)}removeDragAndDropImageComponent(){var t;const{dragAndDropImageComp:e}=this;if(e){const{comp:o}=e;if(o){const i=o.getGui();(t=this.dragAndDropImageParent)==null||t.removeChild(i),this.destroyBean(o)}}this.dragAndDropImageComp=null}createDragAndDropImageComponent(){const{dragSource:e,gos:t,userCompFactory:o}=this;if(!e)return;const i=xu(o,_(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"),Zr(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=ns(this.beans);this.dragAndDropImageParent=n,n?n.appendChild(i):k(54)}registerGridDropTarget(e,t){const o={getContainer:e,isInterestedIn:i=>i===1||i===0,getIconName:()=>"notAllowed"};this.addDropTarget(o),t.addDestroyFunc(()=>this.removeDropTarget(o))}},Hh=class extends x{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),we(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=l=>{Ui(l.target)||(s&&l.stopPropagation(),this.onTouchStart(e,l))},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=a=>this.onTouchMove(a,e.eElement),s=a=>this.onTouchUp(a,e.eElement),n=a=>{a.cancelable&&a.preventDefault()},r=t.target,l=[{target:Zt(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(l),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===y.ESCAPE&&this.cancelDrag(e.eElement)},l=Zt(this.beans),a=[{target:l,type:"mousemove",listener:i},{target:l,type:"mouseup",listener:s},{target:l,type:"contextmenu",listener:n},{target:l,type:"keydown",listener:r}];this.addTemporaryEvents(a),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=M(o)?o:4;return Kr(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){var i;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)}(i=this.currentDragParams)==null||i.onDragging(e)}onTouchMove(e,t){const o=this.getFirstActiveTouch(e.touches);o&&this.onCommonMove(o,this.touchStart,t)}onMouseMove(e,t){var o;ht()&&((o=J(this.beans).getSelection())==null||o.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=>{const r=n.target,l=r==null?void 0:r.tagName.toLocaleLowerCase();return!!(l!=null&&l.match("^a$|textarea|input|select|button"))};return o&&i&&e.cancelable&&oo(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){var t,o;this.eventSvc.dispatchEvent({type:"dragCancelled",target:e}),(o=(t=this.currentDragParams)==null?void 0:t.onDragCancel)==null||o.call(t),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 Xr(e,t){return e+"_"+t}function Q(e){return e instanceof io}var io=class extends x{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 Xr(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=>{Q(e)&&e.checkLeft()}),this.displayedChildren.length>0)if(this.gos.get("enableRtl")){const t=$(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(){var t;let e=0;return(t=this.displayedChildren)==null||t.forEach(o=>{e+=o.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(){var e;return!!((e=this.getColGroupDef())!=null&&e.autoHeaderHeight)}getAutoHeaderHeight(){return this.autoHeaderHeight}setAutoHeaderHeight(e){const t=e!==this.autoHeaderHeight;return this.autoHeaderHeight=e,t}addDisplayedLeafColumns(e){this.displayedChildren.forEach(t=>{et(t)?e.push(t):Q(t)&&t.addDisplayedLeafColumns(e)})}addLeafColumns(e){this.children.forEach(t=>{et(t)?e.push(t):Q(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=>{var n;if(Q(o)&&!((n=o.displayedChildren)!=null&&n.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"})}},Cs="row-group-",ms="t-",ws="b-",Oh=0,so=class{constructor(e){this.master=!1,this.detail=void 0,this.rowIndex=null,this.key=null,this.sourceRowIndex=-1,this.childrenMapped=null,this.treeParent=null,this.treeNodeFlags=0,this.displayed=!1,this.rowTop=null,this.oldRowTop=null,this.selectable=!0,this.__objectId=Oh++,this.alreadyRendered=!1,this.hovered=!1,this.__selected=!1,this.beans=e}setData(e){this.setDataCommon(e,!1)}updateData(e){this.setDataCommon(e,!0)}setDataCommon(e,t){var l,a,d;const{valueCache:o,eventSvc:i}=this.beans,s=this.data;this.data=e,o==null||o.onDataChanged(),this.updateDataOnDetailNode(),this.resetQuickFilterAggregateText();const n=this.createDataChangedEvent(e,s,t);if((l=this.__localEventService)==null||l.dispatchEvent(n),this.sibling){this.sibling.data=e;const c=this.sibling.createDataChangedEvent(e,s,t);(a=this.sibling.__localEventService)==null||a.dispatchEvent(c)}i.dispatchEvent({type:"rowNodeDataChanged",node:this});const r=this.pinnedSibling;r&&(r.data=e,(d=r.__localEventService)==null||d.dispatchEvent(r.createDataChangedEvent(e,s,t)),i.dispatchEvent({type:"rowNodeDataChanged",node:r}))}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?(U(13),null):this.rowPinned==="top"?ms+this.rowIndex:this.rowPinned==="bottom"?ws+this.rowIndex:this.rowIndex.toString()}setDataAndId(e,t){var r,l;const{selectionSvc:o}=this.beans,i=(r=o==null?void 0:o.createDaemonNode)==null?void 0:r.call(o,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);(l=this.__localEventService)==null||l.dispatchEvent(n)}setId(e){var o;const t=ko(this.beans.gos);if(t)if(this.data){const i=((o=this.parent)==null?void 0:o.getRoute())??[];this.id=t({data:this.data,parentKeys:i.length>0?i:void 0,level:this.level,rowPinned:this.rowPinned}),this.id.startsWith(Cs)&&U(14,{groupPrefix:Cs})}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){var i;(i=this.beans.expansionSvc)==null||i.setExpanded(this,e,t,o)}setDataValue(e,t,o){const{colModel:i,valueSvc:s,gos:n,editSvc:r}=this.beans,l=typeof e!="string"?e:i.getCol(e)??i.getColDefCol(e);if(!l)return!1;const a=s.getValueForDisplay(l,this,void 0,void 0,"api").value;if(n.get("readOnlyEdit")){const{beans:{eventSvc:u},data:h,rowIndex:g,rowPinned:p}=this;return u.dispatchEvent({type:"cellEditRequest",event:null,rowIndex:g,rowPinned:p,column:l,colDef:l.colDef,data:h,node:this,oldValue:a,newValue:t,value:t,source:o}),!1}if(r){const u=r.setDataValue({rowNode:this,column:l},t,o);if(u!=null)return u}const d=s.setValue(this,l,t,o);this.dispatchCellChangedEvent(l,t,a);const c=this.pinnedSibling;return c&&d&&c.dispatchCellChangedEvent(l,t,a),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){var s;const i={type:"cellChanged",node:this,column:e,newValue:t,oldValue:o};(s=this.__localEventService)==null||s.dispatchEvent(i)}resetQuickFilterAggregateText(){this.quickFilterAggregateText=null}isExpandable(){var e;return((e=this.beans.expansionSvc)==null?void 0:e.isExpandable(this))??!1}isSelected(){return this.footer?this.sibling.isSelected():this.rowPinned&&this.pinnedSibling?this.pinnedSibling.isSelected():this.__selected}depthFirstSearch(e){var t;(t=this.childrenAfterGroup)==null||t.forEach(o=>o.depthFirstSearch(e)),e(this)}dispatchRowEvent(e){var t;(t=this.__localEventService)==null||t.dispatchEvent({type:e,node:this})}setSelected(e,t=!1,o="api"){var i;(i=this.beans.selectionSvc)==null||i.setNodesSelected({nodes:[this],newValue:e,clearSelection:t,source:o})}isRowPinned(){return!!this.rowPinned}__addEventListener(e,t){this.__localEventService||(this.__localEventService=new je),this.__localEventService.addEventListener(e,t)}__removeEventListener(e,t){this.removeLocalListener(e,t)}addEventListener(e,t){var i,s,n,r;(i=this.beans.validation)==null||i.checkRowEvents(e),this.__localEventService||(this.__localEventService=new je),this.frameworkEventListenerService=(n=(s=this.beans.frameworkOverrides).createLocalEventListenerWrapper)==null?void 0:n.call(s,this.frameworkEventListenerService,this.__localEventService);const o=((r=this.frameworkEventListenerService)==null?void 0:r.wrap(e,t))??t;this.__localEventService.addEventListener(e,o)}removeEventListener(e,t){var i;const o=((i=this.frameworkEventListenerService)==null?void 0:i.unwrap(e,t))??t;this.removeLocalListener(e,o)}removeLocalListener(e,t){var o,i;(o=this.__localEventService)==null||o.removeEventListener(e,t),(i=this.__localEventService)!=null&&i.noRegisteredListenersExist()&&(this.__localEventService=null)}isFullWidthCell(){if(k(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"))}getFirstChild(){var e;return this.childStore?this.childStore.getFirstNode():((e=this.childrenAfterSort)==null?void 0:e[0])??null}};function Bh(e,t,o){return _(t,{type:o,node:e,data:e.data,rowIndex:e.rowIndex,rowPinned:e.rowPinned})}var Vh=new Set(["__localEventService","__objectId","sticky","__autoHeights","__checkAutoHeightsDebounced","childStore"]);function Nh(e,t){const o=new so(t);return Object.keys(e).forEach(i=>{Vh.has(i)||(o[i]=e[i])}),o.oldRowTop=null,o}var _h={agSetColumnFilter:"agSetColumnFilterHandler",agMultiColumnFilter:"agMultiColumnFilterHandler",agGroupColumnFilter:"agGroupColumnFilterHandler",agNumberColumnFilter:"agNumberColumnFilterHandler",agDateColumnFilter:"agDateColumnFilterHandler",agTextColumnFilter:"agTextColumnFilterHandler"};new Set(Object.values(_h));var vs="T",Wh=new RegExp(`^\\d{4}-\\d{2}-\\d{2}(${vs}\\d{2}:\\d{2}:\\d{2}\\D?)?`);function Jr(e,t){return e.toString().padStart(t,"0")}function $e(e,t=!0,o="-"){if(!e)return null;let i=[e.getFullYear(),e.getMonth()+1,e.getDate()].map(s=>Jr(s,2)).join(o);return t&&(i+=vs+[e.getHours(),e.getMinutes(),e.getSeconds()].map(s=>Jr(s,2)).join(":")),i}function ni(e,t=!1){return!!no(e,t)}function zh(e){return ni(e,!0)}function no(e,t=!1){if(!e||!Wh.test(e))return null;const[o,i]=e.split(vs);if(!o)return null;const s=o.split("-").map(h=>parseInt(h,10));if(s.filter(h=>!isNaN(h)).length!==3)return null;const[n,r,l]=s,a=new Date(n,r-1,l);if(a.getFullYear()!==n||a.getMonth()!==r-1||a.getDate()!==l||!i&&t)return null;if(!i||i==="00:00:00")return a;const[d,c,u]=i.split(":").map(h=>parseInt(h,10));if(d>=0&&d<24)a.setHours(d);else if(t)return null;if(c>=0&&c<60)a.setMinutes(c);else if(t)return null;if(u>=0&&u<60)a.setSeconds(u);else if(t)return null;return a}var $h="ag-focus-managed",ri=class extends x{constructor(e,t={}){super(),this.eFocusable=e,this.callbacks=t,this.callbacks={shouldStopEventPropagation:()=>!1,onTabKeyDown:o=>{if(o.defaultPrevented)return;const i=oi(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($h),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||ke(t))return;const{callbacks:o}=this;if(o.shouldStopEventPropagation(t)){vt(t);return}t.key===y.TAB?o.onTabKeyDown(t):o.handleKeyDown&&o.handleKeyDown(t)}})}},be={AUTO_HEIGHT:"ag-layout-auto-height",NORMAL:"ag-layout-normal",PRINT:"ag-layout-print"},bs=class extends x{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?be.AUTO_HEIGHT:t.print?be.PRINT:be.NORMAL;this.view.updateLayoutClasses(o,t)}},Ue="Viewport",el="fakeVScrollComp",Ss=["fakeHScrollComp","centerHeader","topCenter","bottomCenter","stickyTopCenter","stickyBottomCenter"],tl=100,ys=150,Uh=class extends x{constructor(e){super(),this.clearRetryListenerFncs=[],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.isScrollActive=!1,this.isVerticalPositionInvalidated=!0,this.isHorizontalPositionInvalidated=!0,this.eBodyViewport=e,this.resetLastHScrollDebounced=ge(this,()=>this.lastScrollSource[1]=null,ys),this.resetLastVScrollDebounced=ge(this,()=>this.lastScrollSource[0]=null,ys)}wireBeans(e){this.ctrlsSvc=e.ctrlsSvc,this.animationFrameSvc=e.animationFrameSvc,this.visibleCols=e.visibleCols}destroy(){super.destroy(),this.clearRetryListenerFncs=[],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,Ue)});for(const e of Ss){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?ge(this,this.onVScroll.bind(this,Ue),tl):this.onVScroll.bind(this,Ue),i=t?ge(this,this.onVScroll.bind(this,el),tl):this.onVScroll.bind(this,el);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[...Ss,Ue]){if(this.lastScrollSource[1]===t)continue;const o=this.getViewportForSource(t);Fo(o,e,this.enableRtl)}}getViewportForSource(e){return e===Ue?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=Do(this.getViewportForSource(e),this.enableRtl);this.doHorizontalScroll(i),this.resetLastHScrollDebounced()}onVScroll(e){if(!this.isControllingScroll(e,0))return;let t;if(e===Ue?t=this.eBodyViewport.scrollTop:t=this.ctrlsSvc.get("fakeVScrollComp").getScrollPosition(),this.shouldBlockScrollUpdate(0,t,!0))return;const{animationFrameSvc:o}=this;o==null||o.setScrollTop(t),this.nextScrollTop=t,e===Ue?this.ctrlsSvc.get("fakeVScrollComp").setScrollPosition(t):this.eBodyViewport.scrollTop=t,o!=null&&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))}isScrolling(){return this.isScrollActive}fireScrollEvent(e){const t={type:"bodyScroll",direction:e===1?"horizontal":"vertical",left:this.scrollLeft,top:this.scrollTop};this.isScrollActive=!0,this.eventSvc.dispatchEvent(t),window.clearTimeout(this.scrollTimer),this.scrollTimer=window.setTimeout(()=>{this.scrollTimer=0,this.isScrollActive=!1,this.eventSvc.dispatchEvent({...t,type:"bodyScrollEnd"})},ys)}shouldBlockScrollUpdate(e,t,o=!1){return o&&!gt()?!1:e===0?this.shouldBlockVerticalScroll(t):this.shouldBlockHorizontalScroll(t)}shouldBlockVerticalScroll(e){const t=Ki(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(){const e=this.scrollLeft;let t=!1;for(const o of Ss)if(this.getViewportForSource(o).scrollLeft!==e){t=!0;break}t&&this.onHScroll(Ue)}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)),Fo(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,o=0){if(ee(this.gos,"print"))return;const{rowModel:i}=this.beans,s=i.getRowCount();if(typeof e!="number"||e<0||e>=s){k(88,{index:e});return}this.clearRetryListeners();const{frameworkOverrides:n,pageBounds:r,rowContainerHeight:l,rowRenderer:a}=this.beans;n.wrapIncoming(()=>{var p,f;const d=this.ctrlsSvc.getGridBodyCtrl(),c=i.getRow(e);let u,h,g=0;this.invalidateVerticalScroll();do{const{stickyTopHeight:C,stickyBottomHeight:m}=d,w=c.rowTop,b=c.rowHeight,v=r.getPixelOffset(),S=c.rowTop-v,D=S+c.rowHeight,I=this.getVScrollPosition(),O=l.divStretchOffset,F=I.top+O,P=I.bottom+O,T=P-F,V=l.getScrollPositionForPixel(S),B=l.getScrollPositionForPixel(D-T),W=Math.min((V+B)/2,S),z=F+C>S,de=P-m<D;let Ie=null;t==="top"?Ie=V-C:t==="bottom"?Ie=B+m:t==="middle"?Ie=W:z?Ie=V-C:de&&(B-V>T?Ie=V-C:Ie=B+m),Ie!==null&&(this.setVerticalScrollPosition(Ie),a.redraw({afterScroll:!0})),u=w!==c.rowTop||b!==c.rowHeight,h=C!==d.stickyTopHeight||m!==d.stickyBottomHeight,g++}while((u||h)&&g<10);if((p=this.animationFrameSvc)==null||p.flushAllFrames(),o<10&&(c!=null&&c.stub||!((f=this.beans.rowAutoHeight)!=null&&f.areRowsMeasured()))){const C=this.getVScrollPosition().top;this.clearRetryListenerFncs=this.addManagedEventListeners({bodyScroll:()=>{const m=this.getVScrollPosition().top;C!==m&&this.clearRetryListeners()},modelUpdated:()=>{this.clearRetryListeners(),!(e>=i.getRowCount())&&this.ensureIndexVisible(e,t,o+1)}})}})}clearRetryListeners(){this.clearRetryListenerFncs.forEach(e=>e()),this.clearRetryListenerFncs=[]}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(()=>{var r;n!==null&&this.centerRowsCtrl.setCenterViewportScrollLeft(n),this.centerRowsCtrl.onHorizontalViewportChanged(),(r=this.animationFrameSvc)==null||r.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 l=(r?o:i)||s,a=r?i:o;t!=="auto"&&(l=t==="start",a=t==="end");const d=t==="middle";if(l||a||d){const{colLeft:c,colMiddle:u,colRight:h}=this.getColumnBounds(e);return d?u-n/2:l?r?h:c:r?c-n:h-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,l=n?o<i:t>i;return{columnBeforeStart:r,columnAfterEnd:l}}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,l=r+i*n,a=r+i/2*n;return{colLeft:r,colMiddle:a,colRight:l}}getViewportBounds(){const e=this.centerRowsCtrl.getCenterWidth(),t=this.centerRowsCtrl.getCenterViewportScrollLeft(),o=t,i=e+t;return{start:o,end:i,width:e}}},Rs=class extends x{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=ee(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)}},Kh=class extends x{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=()=>{Ne(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==null||e.keepPinnedColumnsNarrowerThanViewport(),this.checkViewportAndScrolls();const o=this.centerContainerCtrl.getCenterWidth();o!==this.centerWidth&&(this.centerWidth=o,t==null||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=Ki(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 Es(e,t,o,i,s,n){if(o==null&&t==null)return;const r={},l={},a=(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],h=o[u];let g;typeof h=="string"?g=e?e.evaluate(h,i):!0:typeof h=="function"&&(g=h(i)),a(u,p=>{g?r[p]=!0:l[p]=!0})}}t&&n&&Object.keys(t).forEach(d=>a(d,c=>{r[c]||(l[c]=!0)})),n&&Object.keys(l).forEach(n),Object.keys(r).forEach(s)}function ol(e){if(e.group)return e.level;const t=e.parent;return t?t.level+1:0}var jh=class extends x{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(l=>e.push(l))},s=o.get("rowClass");s&&i(s);const n=o.getCallback("getRowClass");if(n){const r={data:t.data,node:t,rowIndex:t.rowIndex},l=n(r);i(l)}}preProcessRowClassRules(e,t){this.processRowClassRules(t,o=>{e.push(o)},()=>{})}processRowClassRules(e,t,o){const{gos:i,expressionSvc:s}=this.beans,n=_(i,{data:e.data,node:e,rowIndex:e.rowIndex});Es(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)}},qh=0,li="renderedRow",ai=class extends x{constructor(e,t,o,i,s){var n,r;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=((n=t.pagination)==null?void 0:n.getCurrentPage())??0,this.suppressRowTransform=this.gos.get("suppressRowTransform"),this.instanceId=e.id+"-"+qh++,this.rowId=Vo(e.id),this.initRowBusinessKey(),this.rowFocused=t.focusSvc.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned),this.rowLevel=ol(this.rowNode),this.setRowType(),this.setAnimateFlags(o),this.rowStyles=this.processStylesFromGridOptions(),this.rowEditStyleFeature=(r=t.editSvc)==null?void 0:r.createRowStyleFeature(this,t),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=Vo(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){var u,h;const{context:s,focusSvc:n}=this.beans;i=Ko(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 l=this.rowNode,a=this.rowType==="FullWidthLoading"||l.stub,d=!l.data&&this.beans.rowModel.getType()==="infinite";!a&&!d&&!l.rowPinned&&this.beans.rowRenderer.dispatchFirstDataRenderedEvent();const c=(u=this.fullWidthGui)==null?void 0:u.element;c&&!((h=this.beans.editSvc)!=null&&h.isEditing(this))&&n.isRowFocused(l.rowIndex,l.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),Qe(t)&&this.rowNode.selectable&&this.onRowSelected(e),this.updateColumnLists(!this.useAnimationFrameForCreate);const o=e.rowComp;this.getInitialRowClasses(e.containerType).forEach(s=>o.toggleCss(s,!0)),this.executeSlideAndFadeAnimations(e),this.rowNode.group&&Gi(e.element,this.rowNode.expanded==!0),this.setRowCompRowId(o),this.setRowCompRowBusinessKey(o),Xe(t,e.element,li,this),e.compBean.addDestroyFunc(()=>Xe(t,e.element,li,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.toggleCss("ag-after-created",!0)}),this.executeProcessRowPostCreateFunc()}setRowCompRowBusinessKey(e){this.businessKey!=null&&e.setRowBusinessKey(this.businessKey)}setRowCompRowId(e){const t=Vo(this.rowNode.id);this.rowId=t,t!=null&&e.setRowId(t)}executeSlideAndFadeAnimations(e){const{containerType:t}=e;this.slideInAnimation[t]&&(es(()=>{this.onTopChanged()}),this.slideInAnimation[t]=!1),this.fadeInAnimation[t]&&(es(()=>{e.rowComp.toggleCss("ag-opacity-zero",!1)}),this.fadeInAnimation[t]=!1)}addRowDraggerToRow(e){var i;const t=(i=this.beans.rowDragSvc)==null?void 0:i.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(s=>s!==o),this.rowEditStyleFeature=this.destroyBean(this.rowEditStyleFeature,this.beans.context),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(){var e,t;return this.gos.get("embedFullWidthRows")?this.allRowGuis.map(o=>{var i;return(i=o==null?void 0:o.rowComp)==null?void 0:i.getFullWidthCellRenderer()}):[(t=(e=this.fullWidthGui)==null?void 0:e.rowComp)==null?void 0:t.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(),s=bc(this.gos,this.rowNode,i);e?this.rowType="FullWidthLoading":o?this.rowType="FullWidthDetail":t?this.rowType="FullWidth":s?this.rowType="FullWidthGroup":this.rowType="Normal"}updateColumnLists(e=!1,t=!1){if(this.isFullWidth())return;const{animationFrameSvc:o}=this.beans;if(!(o!=null&&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){var o;if(!((o=this.beans.rowSpanSvc)!=null&&o.isCellSpanning(e,this.rowNode)))return new Pt(e,this.rowNode,this.beans,this)}isCorrectCtrlForSpan(e){var t;return!((t=this.beans.rowSpanSvc)!=null&&t.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()),h=u===-1?void 0:Math.max(u-1,0);s(d,c,h)}const{focusSvc:r,visibleCols:l}=this.beans,a=r.getFocusedCell();if(a&&a.column.getPinned()==o){const d=a.column.getInstanceId();if(!i.map[d]&&l.allCols.includes(a.column)){const u=this.createFocusedCellCtrl();if(u){const h=i.list.findIndex(p=>p.column.getLeft()>u.column.getLeft()),g=h===-1?void 0:Math.max(h-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==null?void 0: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{visibleCols:n,editSvc:r}=this.beans,l=r==null?void 0:r.isEditing(e),a=e.isCellFocused();return l||a?!(n.allCols.indexOf(s)>=0):!0}getDomOrder(){return this.gos.get("ensureDomOrder")||ee(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=M(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,l)=>r?r.rowComp.refreshFullWidth(()=>this.createFullWidthCompDetails(r.element,l).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(){const{beans:e,gos:t,rowNode:o}=this,{expansionSvc:i,eventSvc:s,context:n,rowSpanSvc:r}=e;this.addManagedListeners(this.rowNode,{heightChanged:()=>this.onRowHeightChanged(),rowSelected:()=>this.onRowSelected(),rowIndexChanged:this.onRowIndexChanged.bind(this),topChanged:this.onTopChanged.bind(this),...(i==null?void 0:i.getRowExpandedListeners(this))??{}}),o.detail&&this.addManagedListeners(o.parent,{dataChanged:this.onRowNodeDataChanged.bind(this)}),this.addManagedListeners(o,{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),rowPinned:this.onRowPinned.bind(this)}),this.addManagedListeners(s,{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()}),r&&this.addManagedListeners(r,{spannedCellsUpdated:({pinned:l})=>{l&&!o.rowPinned||this.updateColumnLists()}}),this.addDestroyFunc(()=>{this.rowDragComps=this.destroyBeans(this.rowDragComps,n),this.tooltipFeature=this.destroyBean(this.tooltipFeature,n),this.rowEditStyleFeature=this.destroyBean(this.rowEditStyleFeature,n)}),this.addManagedPropertyListeners(["rowStyle","getRowStyle","rowClass","getRowClass","rowClassRules"],this.postProcessCss.bind(this)),this.addManagedPropertyListener("rowDragEntireRow",()=>{if(t.get("rowDragEntireRow")){this.allRowGuis.forEach(a=>{this.addRowDraggerToRow(a)});return}this.rowDragComps=this.destroyBeans(this.rowDragComps,n)}),this.addListenersForCellComps()}addListenersForCellComps(){this.addManagedListeners(this.rowNode,{rowIndexChanged:()=>this.getAllCellCtrls().forEach(e=>e.onRowIndexChanged()),cellChanged:e=>this.getAllCellCtrls().forEach(t=>t.onCellChanged(e))})}onRowPinned(){for(const e of this.allRowGuis)e.rowComp.toggleCss("ag-row-pinned-source",!!this.rowNode.pinnedSibling)}onRowNodeDataChanged(e){this.refreshRow({suppressFlash:!e.update,newData:!e.update})}refreshRow(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(e)),this.allRowGuis.forEach(o=>{this.setRowCompRowId(o.rowComp),this.updateRowBusinessKey(),this.setRowCompRowBusinessKey(o.rowComp)}),this.onRowSelected(),this.postProcessCss()}postProcessCss(){var e;this.setStylesFromGridOptions(!0),this.postProcessClassesFromGridOptions(),this.postProcessRowClassRules(),(e=this.rowEditStyleFeature)==null||e.applyRowStyles(),this.postProcessRowDragging()}onRowNodeHighlightChanged(){const e=this.beans.rowDropHighlightSvc,t=(e==null?void 0:e.row)===this.rowNode?e.position:"none",o=t==="above",i=t==="inside",s=t==="below",r=this.gos.get("treeData")&&(s||o),l=this.rowNode.uiLevel.toString();this.allRowGuis.forEach(a=>{const d=a.rowComp;d.toggleCss("ag-row-highlight-above",o),d.toggleCss("ag-row-highlight-inside",i),d.toggleCss("ag-row-highlight-below",s),d.toggleCss("ag-row-highlight-indent",r),r?a.element.style.setProperty("--ag-row-highlight-level",l):a.element.style.removeProperty("--ag-row-highlight-level")})}postProcessRowDragging(){const e=this.rowNode.dragging;this.allRowGuis.forEach(t=>t.rowComp.toggleCss("ag-row-dragging",e))}onDisplayedColumnsChanged(){var e;this.updateColumnLists(!0),(e=this.beans.rowAutoHeight)==null||e.requestCheckAutoHeight()}onVirtualColumnsChanged(){this.updateColumnLists(!1,!0)}getRowPosition(){return{rowPinned:qe(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:l,navigation:a}=this.beans,d=l.getFocusedCell(),c={rowIndex:r.rowIndex,rowPinned:r.rowPinned,column:(d==null?void 0:d.column)??i};a==null||a.navigateToNextCell(e,e.key,c,!0),e.preventDefault()}onTabKeyDown(e){var l;if(e.defaultPrevented||ke(e))return;const t=this.allRowGuis.find(a=>a.element.contains(e.target)),o=t?t.element:null,i=o===e.target,s=Y(this.beans);let n=!1;o&&s&&(n=o.contains(s)&&s.classList.contains("ag-cell"));let r=null;!i&&!n&&(r=oi(this.beans,o,!1,e.shiftKey)),(this.isFullWidth()&&i||!r)&&((l=this.beans.navigation)==null||l.onTabKeyDown(this,e))}getFullWidthElement(){return this.fullWidthGui?this.fullWidthGui.element:null}getRowYPosition(){var t;const e=(t=this.allRowGuis.find(o=>Me(o.element)))==null?void 0:t.element;return e?e.getBoundingClientRect().top:0}onSuppressCellFocusChanged(e){const t=this.isFullWidth()&&e?void 0:-1;this.allRowGuis.forEach(o=>{ce(o.element,"tabindex",t)})}onFullWidthRowFocused(e){var s,n,r;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 l=this.beans.colModel.getCol(e==null?void 0:e.column),a=l==null?void 0:l.pinned;a?i=a==="right"?(s=this.rightGui)==null?void 0:s.element:(n=this.leftGui)==null?void 0:n.element:i=(r=this.centerGui)==null?void 0:r.element}i&&(i.classList.toggle("ag-full-width-focus",o),o&&(e!=null&&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 _(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){ke(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==null?void 0: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=pt(e.target,"ag-row-drag",3),!this.isFullWidth())return;const t=this.rowNode,{rangeSvc:o,focusSvc:i}=this.beans;o==null||o.removeAllCellRanges();const s=this.findFullWidthInfoForEvent(e);if(!s)return;const{rowGui:n,column:r}=s,l=n.element,a=e.target;let d=e.defaultPrevented||ht();l&&l.contains(a)&&Ui(a)&&(d=!1),i.setFocusedCell({rowIndex:t.rowIndex,column:r,rowPinned:t.rowPinned,forceBrowserFocus:d})}onRowClick(e){if(ke(e)||this.lastMouseDownOnDragger)return;const{eventSvc:o,selectionSvc:i}=this.beans;o.dispatchEvent(this.createRowEventWithSource("rowClicked",e)),i==null||i.handleSelectionEvent(e,this.rowNode,"rowClicked")}setupDetailRowAutoHeight(e){var t;this.rowType==="FullWidthDetail"&&((t=this.beans.masterDetailSvc)==null||t.setupDetailRowAutoHeight(this,e))}createFullWidthCompDetails(e,t){const{gos:o,rowNode:i}=this,s=_(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,l,a,d)=>this.addFullWidthRowDragging(r,l,a,d),setTooltip:(r,l)=>{o.assertModuleRegistered("Tooltip",3),this.setupFullWidthRowTooltip(r,l)}}),n=this.beans.userCompFactory;switch(this.rowType){case"FullWidthDetail":return ku(n,s);case"FullWidthGroup":{const{value:r,valueFormatted:l}=this.beans.valueSvc.getValueForDisplay(void 0,this.rowNode,!0);return s.value=r,s.valueFormatted=l,Mu(n,s)}case"FullWidthLoading":return Au(n,s);default:return Iu(n,s)}}setupFullWidthRowTooltip(e,t){var o;this.fullWidthGui&&(this.tooltipFeature=(o=this.beans.tooltipSvc)==null?void 0:o.setupFullWidthRowTooltip(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=ol(this.rowNode);if(this.rowLevel!=e){const t="ag-row-level-"+e,o="ag-row-level-"+this.rowLevel;this.allRowGuis.forEach(i=>{i.rowComp.toggleCss(t,!0),i.rowComp.toggleCss(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.toggleCss("ag-row-first",e))),this.lastRowOnPage!==t&&(this.lastRowOnPage=t,this.allRowGuis.forEach(o=>o.rowComp.toggleCss("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(){var t;const e=[];(t=this.beans.rowStyleSvc)==null||t.processClassesFromGridOptions(e,this.rowNode),e.length&&e.forEach(o=>{this.allRowGuis.forEach(i=>i.rowComp.toggleCss(o,!0))})}postProcessRowClassRules(){var e;(e=this.beans.rowStyleSvc)==null||e.processRowClassRules(this.rowNode,t=>{this.allRowGuis.forEach(o=>o.rowComp.toggleCss(t,!0))},t=>{this.allRowGuis.forEach(o=>o.rowComp.toggleCss(t,!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){var l,a;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"),(l=s.pinnedRowModel)!=null&&l.isManual()&&n.push("ag-row-pinned-manual")),!i.isRowPinned()&&i.pinnedSibling&&n.push("ag-row-pinned-source"),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"),(a=s.expansionSvc)==null||a.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(){var e;return((e=this.beans.rowStyleSvc)==null?void 0:e.processStylesFromGridOptions(this.rowNode))??this.emptyStyle}onRowSelected(e){var t;(t=this.beans.selectionSvc)==null||t.onRowCtrlSelected(this,o=>{(o===this.centerGui||o===this.fullWidthGui)&&this.announceDescription()},e)}announceDescription(){var e;(e=this.beans.selectionSvc)==null||e.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,{pointerenter:r=>{r.pointerType==="mouse"&&i.dispatchRowEvent("mouseEnter")},pointerleave:r=>{r.pointerType==="mouse"&&i.dispatchRowEvent("mouseLeave")}}),o.addManagedListeners(i,{mouseEnter:()=>{var r;!((r=s.dragSvc)!=null&&r.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=Jn(this.gos)?_e(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){var i;this.active=!1;const{rowNode:t}=this;if(!e&&mt(this.gos)&&!t.sticky)if(t.rowTop!=null){const n=this.roundRowTopToBounds(t.rowTop);this.setRowTop(n)}else this.allRowGuis.forEach(n=>n.rowComp.toggleCss("ag-opacity-zero",!0));(i=this.fullWidthGui)!=null&&i.element.contains(Y(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;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.toggleCss("ag-row-focus",this.rowFocused),t.rowComp.toggleCss("ag-row-no-focus",!this.rowFocused)})}onCellFocusChanged(){const{focusSvc:e}=this.beans,t=e.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned);t!==this.rowFocused&&(this.rowFocused=t,this.setFocusedClasses())}onPaginationChanged(){var t;const e=((t=this.beans.pagination)==null?void 0:t.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&&M(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==null?void 0:i.getColSpanningList().indexOf(e))>=0&&(o=i)}),o}onRowIndexChanged(){this.rowNode.rowIndex!=null&&(this.onCellFocusChanged(),this.updateRowIndexes(),this.postProcessCss())}updateRowIndexes(e){var n,r;const t=this.rowNode.getRowIndexString();if(t===null)return;const o=(((n=this.beans.ctrlsSvc.getHeaderRowContainerCtrl())==null?void 0:n.getRowCount())??0)+(((r=this.beans.filterManager)==null?void 0:r.getHeaderRowCount())??0),i=this.rowNode.rowIndex%2===0,s=o+this.rowNode.rowIndex+1;this.forEachGui(e,l=>{l.rowComp.setRowIndex(t),l.rowComp.toggleCss("ag-row-even",i),l.rowComp.toggleCss("ag-row-odd",!i),xo(l.element,s)})}};function il(e){var o;return e.altKey||e.ctrlKey||e.metaKey?!1:((o=e.key)==null?void 0:o.length)===1}function xs(e,t,o,i,s){const n=i?i.getColDef().suppressKeyboardEvent:void 0;if(!n)return!1;const r=_(e,{event:t,editing:s,column:i,node:o,data:o.data,colDef:i.getColDef()});return!!(n&&n(r))}function Yh(e){const{pinnedRowModel:t,rowModel:o}=e,[i,s]=[(t==null?void 0:t.isEmpty("top"))??!0,(t==null?void 0:t.isEmpty("bottom"))??!0],n=i?null:"top";let r,l;s?(r=null,l=o.getRowCount()-1):(r="bottom",l=(t==null?void 0:t.getPinnedBottomRowCount())??-1);const{visibleCols:a,rangeSvc:d}=e,c=a.allCols;!d||!(c!=null&&c.length)||d.setCellRange({rowStartIndex:0,rowStartPinned:n,rowEndIndex:l,rowEndPinned:r})}var Zh=65,Qh=67,Xh=86,Jh=68,eg=90,tg=89;function og(e){const{keyCode:t}=e;let o;switch(t){case Zh:o=y.A;break;case Qh:o=y.C;break;case Xh:o=y.V;break;case Jh:o=y.D;break;case eg:o=y.Z;break;case tg:o=y.Y;break;default:o=e.code}return o}var ig=class extends x{constructor(e){super(),this.element=e}postConstruct(){var e;this.addKeyboardListeners(),this.addMouseListeners(),(e=this.beans.touchSvc)==null||e.mockRowContextMenu(this),this.editSvc=this.beans.editSvc}addKeyboardListeners(){const e="keydown",t=this.processKeyboardEvent.bind(this,e);this.addManagedElementListeners(this.element,{[e]:t})}addMouseListeners(){["dblclick","contextmenu","mouseover","mouseout","click",lr("touchstart")?"touchstart":"mousedown"].forEach(o=>{const i=this.processMouseEvent.bind(this,o);this.addManagedElementListeners(this.element,{[o]:i})})}processMouseEvent(e,t){var s;if(!oo(this.gos,t)||ke(t))return;const{cellCtrl:o,rowCtrl:i}=this.getControlsForEventTarget(t.target);e==="contextmenu"?(o!=null&&o.column&&o.dispatchCellContextMenuEvent(t),(s=this.beans.contextMenuSvc)==null||s.handleContextMenuMouseEvent(t,void 0,i,o)):(o&&o.onMouseEvent(e,t),i&&i.onMouseEvent(e,t))}getControlsForEventTarget(e){const{gos:t}=this;return{cellCtrl:qr(t,e),rowCtrl:ar(t,e,li)}}processKeyboardEvent(e,t){const{cellCtrl:o,rowCtrl:i}=this.getControlsForEventTarget(t.target);t.defaultPrevented||(o?this.processCellKeyboardEvent(o,e,t):i!=null&&i.isFullWidth()&&this.processFullWidthRowKeyboardEvent(i,e,t))}processCellKeyboardEvent(e,t,o){var n,r;const i=((n=this.editSvc)==null?void 0:n.isEditing(e,{withOpenEditor:!0}))??!1;!xs(this.gos,o,e.rowNode,e.column,i)&&t==="keydown"&&(!i&&((r=this.beans.navigation)!=null&&r.handlePageScrollingKey(o))||e.onKeyDown(o),this.doGridOperations(o,i),il(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(),l=r==null?void 0:r.column;if(!xs(this.gos,o,i,l,!1)){const d=o.key;if(t==="keydown")switch(d){case y.PAGE_HOME:case y.PAGE_END:case y.PAGE_UP:case y.PAGE_DOWN:n==null||n.handlePageScrollingKey(o,!0);break;case y.LEFT:case y.RIGHT:if(!this.gos.get("embedFullWidthRows"))break;case y.UP:case y.DOWN:e.onKeyboardNavigate(o);break;case y.TAB:e.onTabKeyDown(o);break}}t==="keydown"&&this.eventSvc.dispatchEvent(e.createRowEvent("cellKeyDown",o))}doGridOperations(e,t){if(!e.ctrlKey&&!e.metaKey||t||!oo(this.gos,e))return;const o=og(e),{clipboardSvc:i,undoRedo:s}=this.beans;if(o===y.A)return this.onCtrlAndA(e);if(o===y.C)return this.onCtrlAndC(i,e);if(o===y.D)return this.onCtrlAndD(i,e);if(o===y.V)return this.onCtrlAndV(i,e);if(o===y.X)return this.onCtrlAndX(i,e);if(o===y.Y)return this.onCtrlAndY(s);if(o===y.Z)return this.onCtrlAndZ(s,e)}onCtrlAndA(e){const{beans:{rowModel:t,rangeSvc:o,selectionSvc:i},gos:s}=this;o&&Je(s)&&t.isRowsToRender()?Yh(this.beans):i&&(i==null||i.selectAllRowNodes({source:"keyboardSelectAll",selectAll:yc(s)})),e.preventDefault()}onCtrlAndC(e,t){var i;if(!e||this.gos.get("enableCellTextSelection"))return;const{cellCtrl:o}=this.getControlsForEventTarget(t.target);(i=this.editSvc)!=null&&i.isEditing(o,{withOpenEditor:!0})||(t.preventDefault(),e.copyToClipboard())}onCtrlAndX(e,t){var i;if(!e||this.gos.get("enableCellTextSelection")||this.gos.get("suppressCutToClipboard"))return;const{cellCtrl:o}=this.getControlsForEventTarget(t.target);(i=this.editSvc)!=null&&i.isEditing(o,{withOpenEditor:!0})||(t.preventDefault(),e.cutToClipboard(void 0,"ui"))}onCtrlAndV(e,t){var i;const{cellCtrl:o}=this.getControlsForEventTarget(t.target);(i=this.editSvc)!=null&&i.isEditing(o,{withOpenEditor:!0})||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==null||e.redo("ui")}},sl=class extends x{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)}},di=e=>e.topRowCtrls,ci=e=>e.getStickyTopRowCtrls(),ui=e=>e.getStickyBottomRowCtrls(),hi=e=>e.bottomRowCtrls,gi=e=>e.allRowCtrls,Ds=e=>e.getCtrls("top"),Fs=e=>e.getCtrls("center"),Ps=e=>e.getCtrls("bottom"),sg={center:{type:"center",name:"center-cols",getRowCtrls:gi,getSpannedRowCtrls:Fs},left:{type:"left",name:"pinned-left-cols",pinnedType:"left",getRowCtrls:gi,getSpannedRowCtrls:Fs},right:{type:"right",name:"pinned-right-cols",pinnedType:"right",getRowCtrls:gi,getSpannedRowCtrls:Fs},fullWidth:{type:"fullWidth",name:"full-width",fullWidth:!0,getRowCtrls:gi},topCenter:{type:"center",name:"floating-top",getRowCtrls:di,getSpannedRowCtrls:Ds},topLeft:{type:"left",name:"pinned-left-floating",container:"ag-pinned-left-floating-top",pinnedType:"left",getRowCtrls:di,getSpannedRowCtrls:Ds},topRight:{type:"right",name:"pinned-right-floating",container:"ag-pinned-right-floating-top",pinnedType:"right",getRowCtrls:di,getSpannedRowCtrls:Ds},topFullWidth:{type:"fullWidth",name:"floating-top-full-width",fullWidth:!0,getRowCtrls:di},stickyTopCenter:{type:"center",name:"sticky-top",getRowCtrls:ci},stickyTopLeft:{type:"left",name:"pinned-left-sticky-top",container:"ag-pinned-left-sticky-top",pinnedType:"left",getRowCtrls:ci},stickyTopRight:{type:"right",name:"pinned-right-sticky-top",container:"ag-pinned-right-sticky-top",pinnedType:"right",getRowCtrls:ci},stickyTopFullWidth:{type:"fullWidth",name:"sticky-top-full-width",fullWidth:!0,getRowCtrls:ci},stickyBottomCenter:{type:"center",name:"sticky-bottom",getRowCtrls:ui},stickyBottomLeft:{type:"left",name:"pinned-left-sticky-bottom",container:"ag-pinned-left-sticky-bottom",pinnedType:"left",getRowCtrls:ui},stickyBottomRight:{type:"right",name:"pinned-right-sticky-bottom",container:"ag-pinned-right-sticky-bottom",pinnedType:"right",getRowCtrls:ui},stickyBottomFullWidth:{type:"fullWidth",name:"sticky-bottom-full-width",fullWidth:!0,getRowCtrls:ui},bottomCenter:{type:"center",name:"floating-bottom",getRowCtrls:hi,getSpannedRowCtrls:Ps},bottomLeft:{type:"left",name:"pinned-left-floating-bottom",container:"ag-pinned-left-floating-bottom",pinnedType:"left",getRowCtrls:hi,getSpannedRowCtrls:Ps},bottomRight:{type:"right",name:"pinned-right-floating-bottom",container:"ag-pinned-right-floating-bottom",pinnedType:"right",getRowCtrls:hi,getSpannedRowCtrls:Ps},bottomFullWidth:{type:"fullWidth",name:"floating-bottom-full-width",fullWidth:!0,getRowCtrls:hi}};function nl(e){return`ag-${ro(e).name}-viewport`}function pi(e){const t=ro(e);return t.container??`ag-${t.name}-container`}function ng(e){return`ag-${ro(e).name}-spanned-cells-container`}function ro(e){return sg[e]}var rg=["topCenter","topLeft","topRight"],lg=["bottomCenter","bottomLeft","bottomRight"],ag=["center","left","right"],dg=["center","left","right","fullWidth"],cg=["stickyTopCenter","stickyBottomCenter","center","topCenter","bottomCenter"],ug=["left","bottomLeft","topLeft","stickyTopLeft","stickyBottomLeft"],hg=["right","bottomRight","topRight","stickyTopRight","stickyBottomRight"],rl=["stickyTopCenter","stickyTopLeft","stickyTopRight"],ll=["stickyBottomCenter","stickyBottomLeft","stickyBottomRight"],gg=[...rl,"stickyTopFullWidth",...ll,"stickyBottomFullWidth"],pg=[...rg,...lg,...ag,...rl,...ll],fg=class extends x{constructor(e){super(),this.name=e,this.visible=!0,this.EMPTY_CTRLS=[],this.options=ro(e)}postConstruct(){this.enableRtl=this.gos.get("enableRtl"),this.forContainers(["center"],()=>{this.viewportSizeFeature=this.createManagedBean(new Kh(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 ig(this.eViewport??this.eContainer)),this.addPreventScrollWhileDragging(),this.listenOnDomOrder();const{pinnedCols:s,rangeSvc:n}=this.beans,r=()=>this.onPinnedWidthChanged();this.forContainers(ug,()=>{this.pinnedWidthFeature=this.createOptionalManagedBean(s==null?void 0:s.createPinnedWidthFeature(!0,this.eContainer,this.eSpannedContainer)),this.addManagedEventListeners({leftPinnedWidthChanged:r})}),this.forContainers(hg,()=>{this.pinnedWidthFeature=this.createOptionalManagedBean(s==null?void 0:s.createPinnedWidthFeature(!1,this.eContainer,this.eSpannedContainer)),this.addManagedEventListeners({rightPinnedWidthChanged:r})}),this.forContainers(dg,()=>this.createManagedBean(new sl(this.eContainer,this.name==="center"?i:void 0))),n&&this.forContainers(pg,()=>this.createManagedBean(n.createDragListenerFeature(this.eContainer))),this.forContainers(cg,()=>this.createManagedBean(new Rs(l=>this.comp.setContainerWidth(`${l}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,o=this.onDisplayedColumnsChanged.bind(this);this.addManagedEventListeners({displayedColumnsChanged:o,displayedColumnsWidthChanged:o,displayedRowsChanged:i=>this.onDisplayedRowsChanged(i.afterScroll)}),o(),this.onDisplayedRowsChanged(),e&&this.options.getSpannedRowCtrls&&t.get("enableCellSpan")&&this.addManagedListeners(e,{spannedRowsUpdated:()=>{const i=this.options.getSpannedRowCtrls(e);i&&this.comp.setSpannedRowCtrls(i,!1)}})}listenOnDomOrder(){if(gg.indexOf(this.name)>=0){this.comp.setDomOrder(!0);return}const t=()=>{const o=this.gos.get("ensureDomOrder"),i=ee(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 Ut(this.eViewport)}getCenterViewportScrollLeft(){return Do(this.eViewport,this.enableRtl)}registerViewportResizeListener(e){const t=Ze(this.beans,this.eViewport,e);this.addDestroyFunc(()=>t())}isViewportInTheDOMTree(){return On(this.eViewport)}getViewportScrollLeft(){return Do(this.eViewport,this.enableRtl)}isHorizontalScrollShowing(){return this.gos.get("alwaysShowHorizontalScroll")||Nn(this.eViewport)}setHorizontalScroll(e){this.comp.setHorizontalScroll(e)}getHScrollPosition(){return{left:this.eViewport.scrollLeft,right:this.eViewport.scrollLeft+this.eViewport.offsetWidth}}setCenterViewportScrollLeft(e){Fo(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=ee(this.gos,"print"),s=this.gos.get("embedFullWidthRows")||o,n=t.filter(r=>{const l=r.isFullWidth();return this.options.fullWidth?!s&&l:s||!l});this.comp.setRowCtrls({rowCtrls:n,useFlushSync:e})}},al="ag-force-vertical-scroll",Cg="ag-selectable",mg="ag-column-moving",wg=class extends x{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){var l,a;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(`.${nl("center")}`),this.eFullWidthContainer=o.querySelector(`.${pi("fullWidth")}`),this.eStickyTopFullWidthContainer=n.querySelector(`.${pi("stickyTopFullWidth")}`),this.eStickyBottomFullWidthContainer=r.querySelector(`.${pi("stickyBottomFullWidth")}`),this.setCellTextSelection(this.gos.get("enableCellTextSelection")),this.addManagedPropertyListener("enableCellTextSelection",d=>this.setCellTextSelection(d.currentValue)),this.createManagedBean(new bs(this.comp)),this.scrollFeature=this.createManagedBean(new Uh(o)),(l=this.beans.rowDragSvc)==null||l.setupRowDrag(o,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(),(a=this.filterManager)==null||a.setupAdvFilterHeaderComp(i),this.ctrlsSvc.register("gridBodyCtrl",this)}addEventListeners(){const e=this.setFloatingHeights.bind(this),t=this.setGridRootRole.bind(this),o=this.toggleRowResizeStyles.bind(this);this.addManagedEventListeners({gridColumnsChanged:this.onGridColumnsChanged.bind(this),scrollVisibilityChanged:this.onScrollVisibilityChanged.bind(this),scrollGapChanged:this.updateScrollingClasses.bind(this),pinnedRowDataChanged:e,pinnedHeightChanged:e,pinnedRowsChanged:e,headerHeightChanged:this.setStickyTopOffsetTop.bind(this),columnRowGroupChanged:t,columnPivotChanged:t,rowResizeStarted:o,rowResizeEnded:o}),this.addManagedPropertyListener("treeData",t)}toggleRowResizeStyles(e){const t=e.type==="rowResizeStarted";this.eBodyViewport.classList.toggle("ag-prevent-animation",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=kn()?16:0,s=`calc(100% + ${o+i}px)`;Ne(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=pt(i,"ag-root",t);t.classList.toggle("ag-has-focus",!s)},focusout:o=>{const{target:i,relatedTarget:s}=o,n=t.contains(s),r=pt(s,"ag-root",t);pt(i,"ag-root",t)||(!n||r)&&t.classList.remove("ag-has-focus")}})})}setColumnMovingCss(e){this.comp.setColumnMovingCss(mg,e)}setCellTextSelection(e=!1){this.comp.setCellSelectableCss(Cg,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(){var e;(e=this.beans.editSvc)==null||e.addStopEditingWhenGridLosesFocus([this.eBodyViewport,this.eBottom,this.eTop,this.eStickyTop,this.eStickyBottom])}updateRowCount(){var s,n;const e=(((s=this.ctrlsSvc.getHeaderRowContainerCtrl())==null?void 0:s.getRowCount())??0)+(((n=this.filterManager)==null?void 0:n.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?al:null,o=ee(this.gos,"normal");return this.comp.setAlwaysVerticalScrollClass(t,e),e||o&&_n(this.eBodyViewport)}setupRowAnimationCssClass(){const{rowContainerHeight:e,environment:t}=this.beans;let o=t.sizesMeasured;const i=()=>{const s=o&&mt(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{eBodyViewport:e,eStickyTop:t,eStickyBottom:o,eTop:i,eBottom:s,beans:{popupSvc:n,touchSvc:r}}=this,l=this.onBodyViewportContextMenu.bind(this);this.addManagedElementListeners(e,{contextmenu:l}),r==null||r.mockBodyContextMenu(this,l),this.addManagedElementListeners(e,{wheel:this.onBodyViewportWheel.bind(this,n)});const a=this.onStickyWheel.bind(this);for(const c of[t,o,i,s])this.addManagedElementListeners(c,{wheel:a});const d=this.onHorizontalWheel.bind(this);for(const c of["left","right","topLeft","topRight","bottomLeft","bottomRight"])this.addManagedElementListeners(this.ctrlsSvc.get(c).eContainer,{wheel:d});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))&&oo(this.gos,e)&&this.scrollGridBodyToMatchEvent(e)}onStickyWheel(e){const{deltaY:t}=e;this.scrollVertically(t)>0&&e.preventDefault()}onHorizontalWheel(e){const{deltaX:t,deltaY:o,shiftKey:i}=e;(i||Math.abs(t)>Math.abs(o))&&this.scrollGridBodyToMatchEvent(e)}scrollGridBodyToMatchEvent(e){const{deltaX:t,deltaY:o}=e;e.preventDefault(),this.eCenterColsViewport.scrollBy({left:t||o})}onBodyViewportContextMenu(e,t,o){var s;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)&&((s=this.beans.contextMenuSvc)==null||s.showContextMenu({mouseEvent:e,touchEvent:o,value:null,anchorToElement:this.eGridBody,source:"ui"}))}onBodyViewportWheel(e,t){this.gos.get("suppressScrollWhenPopupsAreOpen")&&e!=null&&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,beans:{environment:t}}=this,o=e==null?void 0:e.getPinnedTopTotalHeight(),i=e==null?void 0:e.getPinnedBottomTotalHeight(),s=t.getPinnedRowBorderWidth(),n=t.getRowBorderWidth(),r=s-n,l=o?r+o:0,a=i?r+i:0;this.comp.setTopHeight(l),this.comp.setBottomHeight(a),this.comp.setTopInvisible(l<=0),this.comp.setBottomInvisible(a<=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(){var s,n;const t=this.ctrlsSvc.get("gridHeaderCtrl").headerHeight+(((s=this.filterManager)==null?void 0:s.getHeaderHeight())??0),o=((n=this.pinnedRowModel)==null?void 0:n.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==null?void 0:e.getPinnedBottomTotalHeight())??0,n=t.horizontalScrollShowing&&t.getScrollbarWidth()||0,r=i+n;o.setStickyBottomBottom(`${r}px`)}},dl=class extends j{constructor(e,t){super(),this.direction=t,this.eViewport=A,this.eContainer=A,this.hideTimeout=0,this.setTemplate(e)}postConstruct(){this.addManagedEventListeners({scrollVisibilityChanged:this.onScrollVisibilityChanged.bind(this)}),this.onScrollVisibilityChanged(),this.toggleCss("ag-apple-scrollbar",An()||gt())}destroy(){super.destroy(),window.clearTimeout(this.hideTimeout)}initialiseInvisibleScrollbar(){this.invisibleScrollbar===void 0&&(this.invisibleScrollbar=kn(),this.invisibleScrollbar&&(this.hideAndShowInvisibleScrollAsNeeded(),this.addActiveListenerToggles()))}addActiveListenerToggles(){const e=this.getGui(),t=()=>this.toggleCss("ag-scrollbar-active",!0),o=()=>this.toggleCss("ag-scrollbar-active",!1);this.addManagedListeners(e,{mouseenter:t,mousedown:t,touchstart:t,mouseleave:o,touchend:o})}onScrollVisibilityChanged(){this.invisibleScrollbar===void 0&&this.initialiseInvisibleScrollbar(),Ne(this.beans,()=>this.setScrollVisible())}hideAndShowInvisibleScrollAsNeeded(){this.addManagedEventListeners({bodyScroll:e=>{e.direction===this.direction&&(this.hideTimeout&&(window.clearTimeout(this.hideTimeout),this.hideTimeout=0),this.toggleCss("ag-scrollbar-scrolling",!0))},bodyScrollEnd:()=>{this.hideTimeout=window.setTimeout(()=>{this.toggleCss("ag-scrollbar-scrolling",!1),this.hideTimeout=0},400)}})}attemptSettingScrollPosition(e){const t=this.eViewport;lc(()=>Me(t),()=>this.setScrollPosition(e),100)}onScrollCallback(e){this.addManagedElementListeners(this.eViewport,{scroll:e})}},vg={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"}]},bg=class extends dl{constructor(){super(vg,"horizontal"),this.eLeftSpacer=A,this.eRightSpacer=A,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 Rs(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(){var t;if(!this.invisibleScrollbar)return;const e=((t=this.beans.pinnedRowModel)==null?void 0:t.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),Ve(this.eRightSpacer,t),this.eRightSpacer.classList.toggle("ag-scroller-corner",t<=i);let s=this.visibleCols.getColsLeftWidth();this.enableRtl&&e&&(s+=i),Ve(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.toggleCss("ag-scrollbar-invisible",t),Yi(this.getGui(),n),Yi(this.eViewport,n),Yi(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 Do(this.eViewport,this.enableRtl)}setScrollPosition(e){Me(this.eViewport)||this.attemptSettingScrollPosition(e),Fo(this.eViewport,e,this.enableRtl)}},Sg={selector:"AG-FAKE-HORIZONTAL-SCROLL",component:bg},yg={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"}]}]},Rg=class extends dl{constructor(){super(yg,"vertical")}postConstruct(){super.postConstruct(),this.createManagedBean(new sl(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.toggleCss("ag-scrollbar-invisible",o),Ve(this.getGui(),s),Ve(this.eViewport,s),Ve(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&&!Me(this.eViewport)&&this.attemptSettingScrollPosition(e),this.eViewport.scrollTop=e}},Eg={selector:"AG-FAKE-VERTICAL-SCROLL",component:Rg};function Ee(e){var t;return((t=e.ctrlsSvc.getHeaderRowContainerCtrl())==null?void 0:t.getRowCount())??0}function Ts(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),l=t[n];if(r){const a=xg(e,r);(l==null||a>l)&&(t[n]=a)}}}return t}function xg(e,t){let i=e.colModel.isPivotMode()?Fg(e):ul(e);const s=t.getHeaderCellCtrls();for(const n of s){const{column:r}=n,l=r.getAutoHeaderHeight();l!=null&&l>i&&r.isAutoHeaderHeight()&&(i=l)}return i}function Is(e){let o=e.colModel.isPivotMode()?Dg(e):lo(e);return e.colModel.forAllCols(i=>{const s=i.getAutoHeaderHeight();s!=null&&s>o&&i.isAutoHeaderHeight()&&(o=s)}),o}function lo(e){return e.gos.get("headerHeight")??e.environment.getDefaultHeaderHeight()}function cl(e){return e.gos.get("floatingFiltersHeight")??lo(e)}function ul(e){return e.gos.get("groupHeaderHeight")??lo(e)}function Dg(e){return e.gos.get("pivotHeaderHeight")??lo(e)}function Fg(e){return e.gos.get("pivotGroupHeaderHeight")??ul(e)}var Pg=class extends x{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 ri(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 l=this.onHeaderContextMenu.bind(this);this.addManagedElementListeners(this.eGui,{contextmenu:l}),n==null||n.mockHeaderContextMenu(this,l),r.register("gridHeaderCtrl",this)}setupHeaderHeight(){const e=this.setHeaderHeight.bind(this);e(),this.addManagedPropertyListeners(["headerHeight","pivotHeaderHeight","groupHeaderHeight","pivotGroupHeaderHeight","floatingFiltersHeight"],e),this.addManagedEventListeners({headerRowsChanged:e,columnHeaderHeightChanged:e,columnGroupHeaderHeightChanged:()=>Ne(this.beans,()=>e()),gridStylesChanged:e,advancedFilterEnabledChanged:e})}setHeaderHeight(){var n;const{beans:e}=this;let t=0;const o=Ts(e).reduce((r,l)=>r+l,0),i=Is(e);if((n=e.filterManager)!=null&&n.hasFloatingFilters()&&(t+=cl(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.toggleCss("ag-pivot-on",t),this.comp.toggleCss("ag-pivot-off",!t)}onDisplayedColumnsChanged(e){const o=e.visibleCols.allCols.some(i=>i.isSpanHeaderHeight());this.comp.toggleCss("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)||to(s,o,!0))&&e.preventDefault()}handleKeyDown(e){let t=null;const{headerNavigation:o}=this.beans;switch(e.key){case y.LEFT:t="LEFT";case y.RIGHT:{M(t)||(t="RIGHT"),o.navigateHorizontally(t,!1,e)&&e.preventDefault();break}case y.UP:t="UP";case y.DOWN:{M(t)||(t="DOWN"),o.navigateVertically(t,e)&&e.preventDefault();break}default:return}}onFocusOut(e){const{relatedTarget:t}=e,{eGui:o,beans:i}=this;!t&&o.contains(Y(i))||o.contains(t)||(i.focusSvc.focusedHeader=null)}onHeaderContextMenu(e,t,o){var r;const{menuSvc:i,ctrlsSvc:s}=this.beans;if(!e&&!o||!(i!=null&&i.isHeaderContextMenuEnabled()))return;const{target:n}=e??t;(n===this.eGui||n===((r=s.getHeaderRowContainerCtrl())==null?void 0:r.eViewport))&&i.showHeaderContextMenu(void 0,e,o)}},As=class extends j{constructor(e,t){super(e),this.ctrl=t}getCtrl(){return this.ctrl}},Tg={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"}]},Ig=class extends As{constructor(e){super(Tg,e),this.eResize=A,this.eHeaderCompWrapper=A,this.headerCompVersion=0}postConstruct(){const e=this.getGui(),t=(s,n)=>{n!=null&&n!=""?e.setAttribute(s,n):e.removeAttribute(s)},o=()=>{const s=this.ctrl.getSelectAllGui();s&&(this.eResize.insertAdjacentElement("afterend",s),this.addDestroyFunc(()=>s.remove()))};t("col-id",this.ctrl.column.getColId());const i={setWidth:s=>e.style.width=s,toggleCss:(s,n)=>this.toggleCss(s,n),setUserStyles:s=>Kt(e,s),setAriaSort:s=>s?Yd(e,s):Zd(e),setUserCompDetails:s=>this.setUserCompDetails(s),getUserCompInstance:()=>this.headerComp,refreshSelectAllGui:o,removeSelectAllGui:()=>{var s;return(s=this.ctrl.getSelectAllGui())==null?void 0:s.remove()}};this.ctrl.setComp(i,this.getGui(),this.eResize,this.eHeaderCompWrapper,void 0),o()}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())}},Ag={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"}]},Mg=class extends As{constructor(e){super(Ag,e),this.eResize=A,this.eHeaderCompWrapper=A}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={toggleCss:(i,s)=>this.toggleCss(i,s),setUserStyles:i=>Kt(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=>Z(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)}},kg={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"}}]}]},Lg=class extends As{constructor(e){super(kg,e),this.eFloatingFilterBody=A,this.eButtonWrapper=A,this.eButtonShowMainFilter=A}postConstruct(){const e=this.getGui(),t={toggleCss:(o,i)=>this.toggleCss(o,i),setUserStyles:o=>Kt(e,o),addOrRemoveBodyCssClass:(o,i)=>this.eFloatingFilterBody.classList.toggle(o,i),setButtonWrapperDisplayed:o=>Z(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()}}},Gg=class extends j{constructor(e){super({tag:"div",cls:e.headerRowClass,role:"row"}),this.ctrl=e,this.headerComps={}}postConstruct(){xo(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,setRowIndex:t=>xo(this.getGui(),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 l=n.getCtrl().column.getLeft(),a=r.getCtrl().column.getLeft();return l-a});const s=i.map(n=>n.getGui());Vn(this.getGui(),s)}}createHeaderComp(e){let t;switch(this.ctrl.type){case"group":t=new Mg(e);break;case"filter":t=new Lg(e);break;default:t=new Ig(e);break}return this.createBean(t),t.setParentComponent(this),t}},hl=class extends x{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?$(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=M(this.columnOrGroup.getOldLeft());(t==null?void 0: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(!ee(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(M(e)&&(this.eCell.style.left=`${e}px`),Q(this.columnOrGroup)){const t=this.columnOrGroup.getLeafColumns();if(!t.length)return;t.length>1&&qd(this.ariaEl,t.length)}}},Hg=0,gl="headerCtrl",pl=class extends x{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()+"-"+Hg++}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(!M(s))return!1;const n=_(this.gos,{colDef:i,column:o,headerRowIndex:t,event:e});return!!s(n)}getWrapperHasFocus(){return Y(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:h,paddingBottom:g,borderBottomWidth:p,borderTopWidth:f}=Ye(this.eGui),C=h+g+p+f,w=t.offsetHeight+C;if(u<5){const b=J(s),v=!b||!b.contains(t),S=w==0;if(v||S){es(()=>n(u+1),"raf",s);return}}this.setColHeaderHeight(this.column,w)};let r=!1,l;const a=()=>{const u=this.column.isAutoHeaderHeight();u&&!r&&d(),!u&&r&&c()},d=()=>{r=!0,n(0),this.comp.toggleCss("ag-header-cell-auto-height",!0),l=Ze(this.beans,t,()=>n(0))},c=()=>{r=!1,l&&l(),this.comp.toggleCss("ag-header-cell-auto-height",!1),l=void 0};a(),i.addDestroyFunc(()=>c()),i.addManagedListeners(this.column,{widthChanged:()=>r&&n(0)}),i.addManagedEventListeners({sortChanged:()=>{r&&window.setTimeout(()=>n(0))}}),o&&o(a)}onDisplayedColumnsChanged(){const{comp:e,column:t,beans:o,eGui:i}=this;!e||!t||!i||(Ur(e,t,o.visibleCols),Fn(i,o.visibleCols.getAriaColIndex(t)))}addResizeAndMoveKeyboardListeners(e){e.addManagedListeners(this.eGui,{keydown:this.onGuiKeyDown.bind(this),keyup:this.onGuiKeyUp.bind(this)})}refreshTabIndex(){const e=rt(this.beans);this.eGui&&ce(this.eGui,"tabindex",e?null:"-1")}onGuiKeyDown(e){var n;const t=Y(this.beans),o=e.key===y.LEFT||e.key===y.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===y.LEFT!==this.gos.get("enableRtl")?"left":"right";if(e.altKey){this.isResizing=!0,this.resizeMultiplier+=1;const r=this.getViewportAdjustedResizeDiff(e);this.resizeHeader(r,e.shiftKey),(n=this.resizeFeature)==null||n.toggleColumnResizing(!0)}else this.moveHeader(s)}moveHeader(e){var t;(t=this.beans.colMoves)==null||t.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===y.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(()=>{var e;(e=this.resizeFeature)==null||e.toggleColumnResizing(!1)},150))}handleKeyDown(e){const t=this.getWrapperHasFocus();switch(e.key){case y.PAGE_DOWN:case y.PAGE_UP:case y.PAGE_HOME:case y.PAGE_END:t&&e.preventDefault()}}addDomData(e){const t=gl,{eGui:o,gos:i}=this;Xe(i,o,t,this),e.addDestroyFunc(()=>Xe(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(){var e;this.dragSource&&((e=this.beans.dragAndDrop)==null||e.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!=null&&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}},Og=class extends pl{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:l}=this,{colResize:a,context:d,colHover:c,rangeSvc:u}=l,h=Ko(this,d,s);this.setGui(t,h),this.updateState(),this.setupWidth(h),this.setupMovingCss(h),this.setupMenuClass(h),this.setupSortableClass(h),this.setupWrapTextClass(),this.refreshSpanHeaderHeight(),this.setupAutoHeight({wrapperElement:i,checkMeasuringCallback:p=>this.setRefreshFunction("measuring",p),compBean:h}),this.addColumnHoverListener(h),this.setupFilterClass(h),this.setupStylesFromColDef(),this.setupClassesFromColDef(),this.setupTooltip(),this.addActiveHeaderMouseListeners(h),this.setupSelectAll(h),this.setupUserComp(),this.refreshAria(),a?this.resizeFeature=h.createManagedBean(a.createResizeFeature(n.pinned,r,o,e,this)):Z(o,!1),c==null||c.createHoverFeature(h,[r],t),u==null||u.createRangeHighlightFeature(h,r,e),h.createManagedBean(new hl(r,t,l)),h.createManagedBean(new ri(t,{shouldStopEventPropagation:p=>this.shouldStopEventPropagation(p),onTabKeyDown:()=>null,handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this),onFocusOut:this.onFocusOut.bind(this)})),this.addResizeAndMoveKeyboardListeners(h),h.addManagedPropertyListeners(["suppressMovableColumns","suppressMenuHide","suppressAggFuncInHeader","enableAdvancedFilter"],()=>this.refresh()),h.addManagedListeners(r,{colDefChanged:()=>this.refresh()}),h.addManagedListeners(r,{headerHighlightChanged:this.onHeaderHighlightChanged.bind(this)});const g=()=>this.checkDisplayName();h.addManagedEventListeners({columnValueChanged:g,columnRowGroupChanged:g,columnPivotChanged:g,headerHeightChanged:this.onHeaderHeightChanged.bind(this)}),h.addDestroyFunc(()=>{this.refreshFunctions={},this.selectAllFeature=null,this.dragSourceElement=void 0,this.userCompDetails=null,this.userHeaderClasses.clear(),this.ariaDescriptionProperties.clear(),this.clearComponent()})}resizeHeader(e,t){var o;(o=this.beans.colResize)==null||o.resizeHeader(this.column,e,t)}getHeaderClassParams(){const{column:e,beans:t}=this,o=e.colDef;return _(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 Du(this.beans.userCompFactory,t,e)}createParams(){const{menuSvc:e,sortSvc:t,colFilter:o,gos:i}=this.beans;return _(i,{column:this.column,displayName:this.displayName,enableSorting:this.column.isSortable(),enableMenu:this.menuEnabled,enableFilterButton:this.openFilterEnabled&&!!(e!=null&&e.isHeaderFilterButtonEnabled(this.column)),enableFilterIcon:!!o&&(!this.openFilterEnabled||Bo(this.gos)),showColumnMenu:(n,r)=>{e==null||e.showColumnMenu({column:this.column,buttonElement:n,positionBy:"button",onClosedCallback:r})},showColumnMenuAfterMouseClick:(n,r)=>{e==null||e.showColumnMenu({column:this.column,mouseEvent:n,positionBy:"mouse",onClosedCallback:r})},showFilter:n=>{e==null||e.showFilterMenu({column:this.column,buttonElement:n,containerType:"columnFilter",positionBy:"button"})},progressSort:n=>{t==null||t.progressSort(this.column,!!n,"uiColumnSorted")},setSort:(n,r)=>{t==null||t.setSortForColumn(this.column,n,!!r,"uiColumnSorted")},eGridHeader:this.eGui,setTooltip:(n,r)=>{i.assertModuleRegistered("Tooltip",3),this.setupTooltip(n,r)}})}setupSelectAll(e){var o;const{selectionSvc:t}=this.beans;t&&(this.selectAllFeature=e.createOptionalManagedBean(t.createSelectAllFeature(this.column)),(o=this.selectAllFeature)==null||o.setComp(this),e.addManagedPropertyListener("rowSelection",()=>{var s;const i=t.createSelectAllFeature(this.column);i&&!this.selectAllFeature?(this.selectAllFeature=e.createManagedBean(i),(s=this.selectAllFeature)==null||s.setComp(this),this.comp.refreshSelectAllGui()):this.selectAllFeature&&!i&&(this.comp.removeSelectAllGui(),this.selectAllFeature=this.destroyBean(this.selectAllFeature))}))}getSelectAllGui(){var e;return(e=this.selectAllFeature)==null?void 0:e.getCheckboxGui()}handleKeyDown(e){var t;super.handleKeyDown(e),e.key===y.SPACE&&((t=this.selectAllFeature)==null||t.onSpaceKeyDown(e)),e.key===y.ENTER&&this.onEnterKeyDown(e),e.key===y.DOWN&&e.altKey&&this.showMenuOnKeyPress(e,!1)}onEnterKeyDown(e){var t;e.ctrlKey||e.metaKey?this.showMenuOnKeyPress(e,!0):this.sortable&&((t=this.beans.sortSvc)==null||t.progressSort(this.column,e.shiftKey,"uiColumnSorted"))}showMenuOnKeyPress(e,t){const o=this.comp.getUserCompInstance();fl(o)&&o.onMenuKeyboardShortcut(t)&&e.preventDefault()}onFocusIn(e){this.eGui.contains(e.relatedTarget)||(this.focusThis(),this.announceAriaDescription()),wh()&&this.setActiveHeader(!0)}onFocusOut(e){this.eGui.contains(e.relatedTarget)||this.setActiveHeader(!1)}setupTooltip(e,t){var o;this.tooltipFeature=(o=this.beans.tooltipSvc)==null?void 0:o.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=$r(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.toggleCss(s,!0)}),i.forEach(s=>this.comp.toggleCss(s,!1))};this.setRefreshFunction("headerClasses",e),e()}setDragSource(e){var t;this.dragSourceElement=e,this.removeDragSource(),!(!e||!this.draggable)&&(this.dragSource=((t=this.beans.colMoves)==null?void 0:t.setDragSourceForHeader(e,this.column,this.displayName))??null)}updateState(){const{menuSvc:e}=this.beans;this.menuEnabled=!!(e!=null&&e.isColumnMenuInHeaderEnabled(this.column)),this.openFilterEnabled=!!(e!=null&&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.toggleCss("ag-header-cell-moving",this.column.isMoving())};e.addManagedListeners(this.column,{movingChanged:t}),t()}setupMenuClass(e){const t=()=>{var o;(o=this.comp)==null||o.toggleCss("ag-column-menu-visible",this.column.isMenuVisible())};e.addManagedListeners(this.column,{menuVisibleChanged:t}),t()}setupSortableClass(e){const t=()=>{this.comp.toggleCss("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.toggleCss("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.toggleCss("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.toggleCss("ag-header-highlight-before",t),this.comp.toggleCss("ag-header-highlight-after",o)}onDisplayedColumnsChanged(){super.onDisplayedColumnsChanged(),this.isAlive()&&this.onHeaderHeightChanged()}onHeaderHeightChanged(){this.refreshSpanHeaderHeight()}refreshSpanHeaderHeight(){var h;const{eGui:e,column:t,comp:o,beans:i}=this,s=Ts(this.beans),n=s.reduce((g,p)=>g+=p,0)===0;if(o.toggleCss("ag-header-parent-hidden",n),!t.isSpanHeaderHeight()){e.style.removeProperty("top"),e.style.removeProperty("height"),o.toggleCss("ag-header-span-height",!1),o.toggleCss("ag-header-span-total",!1);return}const{numberOfParents:r,isSpanningTotal:l}=this.column.getColumnGroupPaddingInfo();o.toggleCss("ag-header-span-height",r>0);const a=Is(i);if(r===0){o.toggleCss("ag-header-span-total",!1),e.style.setProperty("top","0px"),e.style.setProperty("height",`${a}px`);return}o.toggleCss("ag-header-span-total",l);const d=(((h=this.column.getFirstRealParent())==null?void 0:h.getLevel())??-1)+1,c=s.length-d;let u=0;for(let g=0;g<c;g++)u+=s[s.length-1-g];e.style.setProperty("top",`${-u}px`),e.style.setProperty("height",`${a+u}px`)}refreshAriaSort(){var e;if(this.sortable){const t=this.getLocaleTextFunc(),o=((e=this.beans.sortSvc)==null?void 0:e.getDisplaySortForColumn(this.column))||null;this.comp.setAriaSort(Od(o)),this.setAriaDescriptionProperty("sort",t("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&&!Bo(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(){var t;if(!this.eGui.contains(Y(this.beans)))return;const e=Array.from(this.ariaDescriptionProperties.keys()).sort((o,i)=>o==="filter"?-1:i.charCodeAt(0)-o.charCodeAt(0)).map(o=>this.ariaDescriptionProperties.get(o)).join(". ");(t=this.beans.ariaAnnounce)==null||t.announceValue(e,"columnHeader")}refreshAria(){this.refreshAriaSort(),this.refreshAriaMenu(),this.refreshAriaFilterButton(),this.refreshAriaFiltered()}addColumnHoverListener(e){var t;(t=this.beans.colHover)==null||t.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.toggleCss("ag-header-active",e)}getAnchorElementForMenu(e){const t=this.comp.getUserCompInstance();return fl(t)?t.getAnchorElementForMenu(e):this.eGui}destroy(){this.tooltipFeature=this.destroyBean(this.tooltipFeature),super.destroy()}};function fl(e){return typeof(e==null?void 0:e.getAnchorElementForMenu)=="function"&&typeof e.onMenuKeyboardShortcut=="function"}var Bg=0,Ms=class extends x{constructor(e,t,o){super(),this.rowIndex=e,this.pinned=t,this.type=o,this.instanceId=Bg++,this.comp=null,this.allCtrls=[];let i="ag-header-row-column";o==="group"?i="ag-header-row-group":o==="filter"&&(i="ag-header-row-filter"),this.headerRowClass=`ag-header-row ${i}`}setRowIndex(e){var t;this.rowIndex=e,(t=this.comp)==null||t.setRowIndex(this.getAriaRowIndex()),this.onRowHeightChanged()}postConstruct(){this.isPrintLayout=ee(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=Ko(this,this.beans.context,t),o&&(this.setRowIndex(this.rowIndex),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=ee(this.gos,"print"),this.onVirtualColumnsChanged(),this.setWidth(),this.onRowHeightChanged()}setWidth(){if(!this.comp)return;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(){if(!this.comp)return;const{topOffset:e,rowHeight:t}=this.getTopAndHeight();this.comp.setTop(e+"px"),this.comp.setHeight(t+"px")}getTopAndHeight(){let e=0;const t=Ts(this.beans);for(let s=0;s<t.length;s++){if(s===this.rowIndex&&this.type==="group")return{topOffset:e,rowHeight:t[s]};e+=t[s]}const o=Is(this.beans);if(this.type==="column")return{topOffset:e,rowHeight:o};e+=o;const i=cl(this.beans);return{topOffset:e,rowHeight:i}}onVirtualColumnsChanged(e=!1){if(!this.comp)return;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 Og(e,this));break}t.set(i,s)}getColumnsInViewport(){if(!this.isPrintLayout)return this.getComponentsToRender();if(this.pinned)return[];const e=[];return["left",null,"right"].forEach(t=>{e.push(...this.getComponentsToRender(t))}),e}getComponentsToRender(e=this.pinned){return this.type==="group"?this.beans.colViewport.getHeadersToRender(e,this.rowIndex):this.beans.colViewport.getColumnHeadersToRender(e)}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,this.comp=null,super.destroy()}},Vg=class extends x{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}=this.beans;this.setupCenterWidth(),o==null||o.setupHeaderPinnedWidth(this),this.setupDragAndDrop(n,this.eViewport);const r=this.refresh.bind(this,!0);this.addManagedEventListeners({displayedColumnsChanged:r,advancedFilterEnabledChanged:r});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,filterManager:o,visibleCols:i}=this.beans;let s=0;const n=t.getFocusHeaderToUseAfterRefresh(),r=()=>{const u=i.headerGroupRowCount;s=u;const h=this.groupsRowCtrls.length;if(h!==u){if(h>u){for(let g=u;g<h;g++)this.destroyBean(this.groupsRowCtrls[g]);this.groupsRowCtrls.length=u;return}for(let g=h;g<u;g++){const p=this.createBean(new Ms(g,this.pinned,"group"));this.groupsRowCtrls.push(p)}}},l=()=>{const u=s++;if(this.hidden){this.columnsRowCtrl=this.destroyBean(this.columnsRowCtrl);return}this.columnsRowCtrl==null||!e?(this.columnsRowCtrl=this.destroyBean(this.columnsRowCtrl),this.columnsRowCtrl=this.createBean(new Ms(u,this.pinned,"column"))):this.columnsRowCtrl.rowIndex!==u&&this.columnsRowCtrl.setRowIndex(u)},a=()=>{this.includeFloatingFilter=!!(o!=null&&o.hasFloatingFilters())&&!this.hidden;const u=()=>{this.filtersRowCtrl=this.destroyBean(this.filtersRowCtrl)};if(!this.includeFloatingFilter){u();return}e||u();const h=s++;this.filtersRowCtrl?this.filtersRowCtrl.rowIndex!==h&&this.filtersRowCtrl.setRowIndex(h):this.filtersRowCtrl=this.createBean(new Ms(h,this.pinned,"filter"))},d=this.getAllCtrls();r(),l(),a();const c=this.getAllCtrls();this.comp.setCtrls(c),this.restoreFocusOnHeader(t,n),d.length!==c.length&&this.beans.eventSvc.dispatchEvent({type:"headerRowsChanged"})}getHeaderCtrlForColumn(e){const t=o=>o==null?void 0:o.getHeaderCellCtrls().find(i=>i.column===e);if(et(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){var t;return((t=this.getHeaderCtrlForColumn(e))==null?void 0:t.eGui)??null}getRowType(e){var t;return(t=this.getAllCtrls()[e])==null?void 0:t.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==null?void 0: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})}setupCenterWidth(){this.pinned==null&&this.createManagedBean(new Rs(e=>this.comp.setCenterWidth(`${e}px`),!0))}},ks=class extends j{isPopup(){return!0}setParentComponent(e){e.addCss("ag-has-popup"),super.setParentComponent(e)}destroy(){const e=this.parentComponent;e&&e.isAlive()&&e.getGui().classList.remove("ag-has-popup"),super.destroy()}},fi=class extends ks{constructor(){super(...arguments),this.errorMessages=null}init(e){this.params=e,this.initialiseEditor(e),this.eEditor.onValueChange(()=>e.validate())}destroy(){this.errorMessages=null}},Cl=class extends j{constructor(){super()}},Ng={tag:"span",cls:"ag-overlay-loading-center",attrs:{"aria-live":"polite","aria-atomic":"true"}},_g=class extends Cl{init(){var t;const e=qe((t=this.gos.get("overlayLoadingTemplate"))==null?void 0:t.trim());if(this.setTemplate(e??Ng),!e){const o=this.getLocaleTextFunc();setTimeout(()=>{this.getGui().textContent=o("loadingOoo","Loading...")})}}},Wg={tag:"span",cls:"ag-overlay-no-rows-center"},zg=class extends Cl{init(){var t;const e=qe((t=this.gos.get("overlayNoRowsTemplate"))==null?void 0:t.trim());if(this.setTemplate(e??Wg),!e){const o=this.getLocaleTextFunc();setTimeout(()=>{this.getGui().textContent=o("noRowsToShow","No Rows To Show")})}}};function $g(e,t,o){const i=Tt(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=X({tag:"span"});return s.appendChild(i),s}function Tt(e,t,o){var n;let i=null;e==="smallDown"?k(262):e==="smallLeft"?k(263):e==="smallRight"&&k(264);const s=o&&o.getColDef().icons;if(s&&(i=s[e]),t.gos&&!i){const r=t.gos.get("icons");r&&(i=r[e])}if(i){let r;if(typeof i=="function")r=i();else if(typeof i=="string")r=i;else{k(38,{iconName:e});return}if(typeof r=="string")return qi(r);if(Qi(r))return r;k(133,{iconName:e});return}else{const r=t.registry.getIcon(e);return r||(n=t.validation)==null||n.validateIcon(e),X({tag:"span",cls:`ag-icon ag-icon-${r??e}`,role:"presentation",attrs:{unselectable:"on"}})}}var Ug=".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}",Kg={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"}]}]},jg=class extends j{constructor(){super(),this.dragSource=null,this.eIcon=A,this.eLabel=A,this.eGhost=A,this.registerCSS(Ug)}postConstruct(){const e=t=>$g(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(Kg),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;he(o);let r=null;e||(e=i!=null&&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}},qg=".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)}",Yg=class extends j{constructor(e,t,o){super(t,o),this.labelSeparator="",this.labelAlignment="left",this.disabled=!1,this.label="",this.config=e||{},this.registerCSS(qg)}postConstruct(){this.addCss("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;he(t),typeof e=="string"?t.innerText=e+this.labelSeparator:e&&t.appendChild(e),e===""?(Z(t,!1),Be(t,"presentation")):(Z(t,!0),Be(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:(To(this.eLabel,e),this)}setDisabled(e){e=!!e;const t=this.getGui();return Gn(t,e),t.classList.toggle("ag-disabled",e),this.disabled=e,this}isDisabled(){return!!this.disabled}},ml=class extends Yg{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.addCss(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==""||Bd(e)!==null?$t(e,""):$t(e,t??"")}setAriaLabel(e){return zt(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 Ve(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 Zg(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 Ls=class extends ml{constructor(e,t,o="text",i="input"){super(e,(e==null?void 0:e.template)??Zg(i),[],t),this.inputType=o,this.displayFieldTag=i,this.eLabel=A,this.eWrapper=A,this.eInput=A}postConstruct(){super.postConstruct(),this.setInputType(this.inputType);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.addCss("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(e){this.displayFieldTag==="input"&&(this.inputType=e,ce(this.eInput,"type",e))}getInputElement(){return this.eInput}setInputWidth(e){return To(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 ce(this.eInput,"placeholder",e),this}setInputAriaLabel(e){return zt(this.eInput,e),this.refreshAriaLabelledBy(),this}setDisabled(e){return Gn(this.eInput,e),super.setDisabled(e)}setAutoComplete(e){if(e===!0)ce(this.eInput,"autocomplete",null);else{const t=typeof e=="string"?e:"off";ce(this.eInput,"autocomplete",t)}return this}},wl=class extends Ls{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)}},Gs={selector:"AG-CHECKBOX",component:wl},Qg=".ag-checkbox-cell{height:100%}",Xg={tag:"div",cls:"ag-cell-wrapper ag-checkbox-cell",role:"presentation",children:[{tag:"ag-checkbox",ref:"eCheckbox",role:"presentation"}]},Jg=class extends j{constructor(){super(Xg,[Gs]),this.eCheckbox=A,this.registerCSS(Qg)}init(e){this.refresh(e);const{eCheckbox:t,beans:o}=this,i=t.getInputElement();i.setAttribute("tabindex","-1"),xn(i,"polite"),this.addManagedListeners(i,{click:s=>{if(vt(s),t.isDisabled())return;const n=t.getValue();this.onCheckboxChanged(n)},dblclick:s=>{vt(s)}}),this.addManagedElementListeners(e.eGridCell,{keydown:s=>{if(s.key===y.SPACE&&!t.isDisabled()){e.eGridCell===Y(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(Wo)?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 l=e.disabled??!(s!=null&&s.isCellEditable(n));r.setDisabled(l);const a=this.getLocaleTextFunc(),d=Tn(a,t),c=l?d:`${a("ariaToggleCellValue","Press SPACE to toggle cell value")} (${d})`;r.setInputAriaLabel(c)}onCheckboxChanged(e){var r,l,a,d;const{params:t}=this,{column:o,node:i,value:s}=t;(l=(r=this.beans)==null?void 0:r.editSvc)==null||l.setEditingCells([{column:o,colId:o.getColId(),rowIndex:i.rowIndex,rowPinned:i.rowPinned,state:"changed",oldValue:s,newValue:s}],{update:!0});const n=i.setDataValue(o,e,"renderer");(d=this.beans.editSvc)==null||d.stopEditing({rowNode:i,column:o},{source:(a=this.beans.editSvc)!=null&&a.isBatchEditing()?"ui":"api"}),n||this.updateCheckbox(t)}},vl=class{constructor(e,t){this.beans=e,this.floating=t,this.all=new Set,this.visible=new Set,this.order=[],this.queued=new Set}size(){return this.visible.size}add(e){const{all:t,visible:o,order:i}=this;t.has(e)||(t.add(e),o.add(e),i.push(e),this.sort())}delete(e){this.all.delete(e),this.visible.delete(e),this.queued.delete(e.id),we(this.order,e)}has(e){return this.visible.has(e)}forEach(e){this.order.forEach(e)}getByIndex(e){return this.order[e]}getById(e){for(const t of this.visible)if(t.id==e)return t}clear(){const{all:e,visible:t,order:o,queued:i}=this;e.clear(),i.clear(),t.clear(),o.length=0}sort(){const{sortSvc:e,rowNodeSorter:t,gos:o}=this.beans,i=(e==null?void 0:e.getSortOptions())??[],s=op(this.order);if(this.order.sort((r,l)=>{var a,d;return(((a=r.pinnedSibling)==null?void 0:a.rowIndex)??0)-(((d=l.pinnedSibling)==null?void 0:d.rowIndex)??0)}),this.order=(t==null?void 0:t.doFullSort(this.order,i))??this.order,!s)return;const n=sr(o);n==="bottom"||n==="pinnedBottom"?this.order.push(s):this.order.unshift(s)}hide(e){const{all:t,visible:o}=this;t.forEach(i=>e(i)?o.delete(i):o.add(i)),this.order=Array.from(o),this.sort()}queue(e){this.queued.add(e)}unqueue(e){this.queued.delete(e)}forEachQueued(e){this.queued.forEach(e)}};function bl(e){var o;if(e.level===-1)return!0;const t=e.parent;return(o=t==null?void 0:t.childrenAfterSort)!=null&&o.some(i=>i==e)?bl(t):!1}function Hs(e,t){const{gos:o,rowModel:i,filterManager:s}=e;return Mo(o)?!i.getRowNode(t.id):s!=null&&s.isAnyFilterPresent()?!bl(t):o.get("pivotMode")?!t.group:!1}function ep(e){return!!e.footer&&e.level===-1}function tp(e){return!!e.pinnedSibling&&ep(e.pinnedSibling)}function op(e){var o;const t=e.findIndex(tp);if(t>-1)return(o=e.splice(t,1))==null?void 0:o[0]}var Sl=class extends x{postConstruct(){const{gos:e,beans:t}=this;this.top=new vl(t,"top"),this.bottom=new vl(t,"bottom");const o=s=>Hs(t,s.pinnedSibling),i=()=>{const s=e.get("isRowPinned");s&&e.get("enableRowPinning")&&t.rowModel.forEachNode(n=>this.pinRow(n,s(n)),!0),this.refreshRowPositions(),this.dispatchRowPinnedEvents()};this.addManagedEventListeners({gridStylesChanged:this.onGridStylesChanges.bind(this),modelUpdated:({keepRenderedRows:s})=>{this.tryToEmptyQueues(),this.pinGrandTotalRow(),this.forContainers(n=>n.hide(o)),this.refreshRowPositions(),s||this.dispatchRowPinnedEvents()},columnRowGroupChanged:()=>{this.forContainers(sp),this.refreshRowPositions()},rowNodeDataChanged:({node:s})=>{const n=e.get("isRowPinnable");((n==null?void 0:n(s))??!0)||this.pinRow(s,null)},firstDataRendered:i}),this.addManagedPropertyListener("pivotMode",()=>{this.forContainers(s=>s.hide(o)),this.dispatchRowPinnedEvents()}),this.addManagedPropertyListener("grandTotalRow",({currentValue:s})=>{this._grandTotalPinned=s==="pinnedBottom"?"bottom":s==="pinnedTop"?"top":null}),this.addManagedPropertyListener("isRowPinned",i)}destroy(){this.reset(!1),super.destroy()}reset(e=!0){this.forContainers(t=>{const o=[];t.forEach(i=>o.push(i)),o.forEach(i=>this.pinRow(i,null)),t.clear()}),e&&this.dispatchRowPinnedEvents()}pinRow(e,t,o){var r;if(e.footer&&e.level>-1)return;if(e.footer&&e.level===-1){this._grandTotalPinned=t,rp(this.beans);return}const i=e.rowPinned??((r=e.pinnedSibling)==null?void 0:r.rowPinned);if(i!=null&&t!=null&&t!=i){const l=e.rowPinned?e:e.pinnedSibling,a=e.rowPinned?e.pinnedSibling:e;this.pinRow(l,null,o),this.pinRow(a,t,o);return}const n=o&&np(this.beans,e,o);if(n){n.forEach(l=>this.pinRow(l,t));return}if(t==null){const l=e.rowPinned?e:e.pinnedSibling,a=this.findPinnedRowNode(l);if(!a)return;a.delete(l);const d=l.pinnedSibling;Os(l),this.refreshRowPositions(t),this.dispatchRowPinnedEvents(d)}else{const l=yl(this.beans,e,t),a=this.getContainer(t);a.add(l),Hs(this.beans,e)&&a.hide(d=>Hs(this.beans,d.pinnedSibling)),this.refreshRowPositions(t),this.dispatchRowPinnedEvents(e)}}isManual(){return!0}isEmpty(e){return this.getContainer(e).size()===0}isRowsToRender(e){return!this.isEmpty(e)}ensureRowHeightsValid(){let e=!1,t=0;const o=i=>{if(i.rowHeightEstimated){const s=_e(this.beans,i);i.setRowTop(t),i.setRowHeight(s.height),t+=s.height,e=!0}};return this.bottom.forEach(o),t=0,this.top.forEach(o),this.eventSvc.dispatchEvent({type:"pinnedHeightChanged"}),e}getPinnedTopTotalHeight(){return Rl(this.top)}getPinnedBottomTotalHeight(){return Rl(this.bottom)}getPinnedTopRowCount(){return this.top.size()}getPinnedBottomRowCount(){return this.bottom.size()}getPinnedTopRow(e){return this.top.getByIndex(e)}getPinnedBottomRow(e){return this.bottom.getByIndex(e)}getPinnedRowById(e,t){return this.getContainer(t).getById(e)}forEachPinnedRow(e,t){this.getContainer(e).forEach(t)}getPinnedState(){const e=t=>{const o=[];return this.forEachPinnedRow(t,i=>o.push(i.pinnedSibling.id)),o};return{top:e("top"),bottom:e("bottom")}}setPinnedState(e){this.forContainers((t,o)=>{for(const i of e[o]){const s=this.beans.rowModel.getRowNode(i);s?this.pinRow(s,o):t.queue(i)}})}getGrandTotalPinned(){return this._grandTotalPinned}setGrandTotalPinned(e){this._grandTotalPinned=e}tryToEmptyQueues(){this.forContainers((e,t)=>{const o=new Set;e.forEachQueued(i=>{const s=this.beans.rowModel.getRowNode(i);s&&o.add(s)});for(const i of o)e.unqueue(i.id),this.pinRow(i,t)})}pinGrandTotalRow(){var l;const{gos:e,beans:t,_grandTotalPinned:o}=this,i=t.rowModel;if(!oe(e))return;const s=(l=i.rootNode)==null?void 0:l.sibling;if(!s)return;const n=s.pinnedSibling,r=n&&this.findPinnedRowNode(n);if(o){if(r&&r.floating!==o&&(r.delete(n),Os(n)),!r||r.floating!==o){const a=yl(t,s,o);this.getContainer(o).add(a)}}else{if(!r)return;r.delete(n),Os(n)}}onGridStylesChanges(e){e.rowHeightChanged&&this.forContainers(t=>t.forEach(o=>o.setRowHeight(o.rowHeight,!0)))}getContainer(e){return e==="top"?this.top:this.bottom}findPinnedRowNode(e){if(this.top.has(e))return this.top;if(this.bottom.has(e))return this.bottom}refreshRowPositions(e){const t=o=>ip(this.beans,o);return e==null?this.forContainers(t):t(this.getContainer(e))}forContainers(e){e(this.top,"top"),e(this.bottom,"bottom")}dispatchRowPinnedEvents(e){this.eventSvc.dispatchEvent({type:"pinnedRowsChanged"}),e==null||e.dispatchRowEvent("rowPinned")}};function ip(e,t){let o=0;t.forEach((i,s)=>{i.setRowTop(o),(i.rowHeightEstimated||i.rowHeight==null)&&i.setRowHeight(_e(e,i).height),i.setRowIndex(s),o+=i.rowHeight})}function yl(e,t,o){if(t.pinnedSibling)return t.pinnedSibling;const i=Nh(t,e);i.setRowTop(null),i.setRowIndex(null),i.rowPinned=o;const s=o==="top"?ms:ws;return i.id=`${s}${o}-${t.id}`,i.pinnedSibling=t,t.pinnedSibling=i,i}function Os(e){if(!e.pinnedSibling)return;e.rowPinned=null,e.setRowTop(null),e.setRowIndex(null);const t=e.pinnedSibling;e.pinnedSibling=void 0,t&&(t.pinnedSibling=void 0,t.rowPinned=null)}function sp(e){const t=new Set;e.forEach(o=>{o.group&&t.add(o)}),t.forEach(o=>e.delete(o))}function np(e,t,o){var n;const{rowSpanSvc:i}=e,s=(o&&(i==null?void 0:i.isCellSpanning(o,t)))??!1;if(o&&s)return(n=i==null?void 0:i.getCellSpan(o,t))==null?void 0:n.spannedNodes}function Rl(e){const t=e.size();if(t===0)return 0;const o=e.getByIndex(t-1);return o===void 0?0:o.rowTop+o.rowHeight}function rp({gos:e,rowModel:t}){oe(e)&&t.refreshModel({step:"map"})}var El=class extends x{constructor(){super(...arguments),this.nextId=0,this.pinnedTopRows={cache:{},order:[]},this.pinnedBottomRows={cache:{},order:[]}}postConstruct(){const e=this.gos;this.setPinnedRowData(e.get("pinnedTopRowData"),"top"),this.setPinnedRowData(e.get("pinnedBottomRowData"),"bottom"),this.addManagedPropertyListener("pinnedTopRowData",t=>this.setPinnedRowData(t.currentValue,"top")),this.addManagedPropertyListener("pinnedBottomRowData",t=>this.setPinnedRowData(t.currentValue,"bottom")),this.addManagedEventListeners({gridStylesChanged:this.onGridStylesChanges.bind(this)})}reset(){}isEmpty(e){return this.getCache(e).order.length===0}isRowsToRender(e){return!this.isEmpty(e)}isManual(){return!1}pinRow(e,t){}onGridStylesChanges(e){if(e.rowHeightChanged){const t=o=>{o.setRowHeight(o.rowHeight,!0)};co(this.pinnedBottomRows,t),co(this.pinnedTopRows,t)}}ensureRowHeightsValid(){let e=!1,t=0;const o=i=>{if(i.rowHeightEstimated){const s=_e(this.beans,i);i.setRowTop(t),i.setRowHeight(s.height),t+=s.height,e=!0}};return co(this.pinnedBottomRows,o),t=0,co(this.pinnedTopRows,o),this.eventSvc.dispatchEvent({type:"pinnedHeightChanged"}),e}setPinnedRowData(e,t){this.updateNodesFromRowData(e,t),this.eventSvc.dispatchEvent({type:"pinnedRowDataChanged"})}updateNodesFromRowData(e,t){const o=this.getCache(t);if(e===void 0){o.order.length=0,o.cache={};return}const i=ko(this.gos),s=t==="top"?ms:ws,n=new Set(o.order),r=[],l=new Set;let a=0,d=-1;for(const c of e){const u=(i==null?void 0:i({data:c,level:0,rowPinned:t}))??s+this.nextId++;if(l.has(u)){k(96,{id:u,data:c});continue}d++,l.add(u),r.push(u);const h=ao(o,u);if(h!==void 0)h.data!==c&&h.updateData(c),a+=this.setRowTopAndRowIndex(h,a,d),n.delete(u);else{const g=new so(this.beans);g.id=u,g.data=c,g.rowPinned=t,a+=this.setRowTopAndRowIndex(g,a,d),o.cache[u]=g,o.order.push(u)}}n.forEach(c=>{var u;(u=ao(o,c))==null||u.clearRowTopAndRowIndex(),delete o.cache[c]}),o.order=r}setRowTopAndRowIndex(e,t,o){return e.setRowTop(t),e.setRowHeight(_e(this.beans,e).height),e.setRowIndex(o),e.rowHeight}getPinnedTopTotalHeight(){return xl(this.pinnedTopRows)}getPinnedBottomTotalHeight(){return xl(this.pinnedBottomRows)}getPinnedTopRowCount(){return Vs(this.pinnedTopRows)}getPinnedBottomRowCount(){return Vs(this.pinnedBottomRows)}getPinnedTopRow(e){return Bs(this.pinnedTopRows,e)}getPinnedBottomRow(e){return Bs(this.pinnedBottomRows,e)}getPinnedRowById(e,t){return ao(this.getCache(t),e)}forEachPinnedRow(e,t){return co(this.getCache(e),t)}getCache(e){return e==="top"?this.pinnedTopRows:this.pinnedBottomRows}getPinnedState(){return{top:[],bottom:[]}}setPinnedState(){}getGrandTotalPinned(){}setGrandTotalPinned(){}};function xl(e){const t=Vs(e);if(t===0)return 0;const o=Bs(e,t-1);return o===void 0?0:o.rowTop+o.rowHeight}function ao(e,t){return e.cache[t]}function Bs(e,t){return ao(e,e.order[t])}function co(e,t){e.order.forEach((o,i)=>{const s=ao(e,o);s&&t(s,i)})}function Vs(e){return e.order.length}var lp=class extends x{constructor(){super(...arguments),this.beanName="pinnedRowModel"}postConstruct(){const{gos:e}=this,t=()=>{const o=e.get("enableRowPinning"),i=sr(e),n=!!o||(i==="pinnedBottom"||i==="pinnedTop"),r=n?this.inner instanceof El:this.inner instanceof Sl;this.inner&&r&&this.destroyBean(this.inner),(r||!this.inner)&&(this.inner=this.createManagedBean(n?new Sl:new El))};this.addManagedPropertyListeners(["enableRowPinning","grandTotalRow"],t),t()}reset(){return this.inner.reset()}isEmpty(e){return this.inner.isEmpty(e)}isManual(){return this.inner.isManual()}isRowsToRender(e){return this.inner.isRowsToRender(e)}pinRow(e,t,o){return this.inner.pinRow(e,t,o)}ensureRowHeightsValid(){return this.inner.ensureRowHeightsValid()}getPinnedRowById(e,t){return this.inner.getPinnedRowById(e,t)}getPinnedTopTotalHeight(){return this.inner.getPinnedTopTotalHeight()}getPinnedBottomTotalHeight(){return this.inner.getPinnedBottomTotalHeight()}getPinnedTopRowCount(){return this.inner.getPinnedTopRowCount()}getPinnedBottomRowCount(){return this.inner.getPinnedBottomRowCount()}getPinnedTopRow(e){return this.inner.getPinnedTopRow(e)}getPinnedBottomRow(e){return this.inner.getPinnedBottomRow(e)}forEachPinnedRow(e,t){return this.inner.forEachPinnedRow(e,t)}getPinnedState(){return this.inner.getPinnedState()}setPinnedState(e){return this.inner.setPinnedState(e)}setGrandTotalPinned(e){return this.inner.setGrandTotalPinned(e)}getGrandTotalPinned(){return this.inner.getGrandTotalPinned()}},Ns=class extends Ls{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=M(e)?e:""),super.setValue(e,t)}setStartValue(e){this.setValue(e,!0)}preventDisallowedCharacters(){const e=new RegExp(`[${this.config.allowedCharPattern}]`),t=o=>{il(o)&&o.key&&!e.test(o.key)&&o.preventDefault()};this.addManagedListeners(this.eInput,{keydown:t,paste:o=>{var s;const i=(s=o.clipboardData)==null?void 0:s.getData("text");i&&i.split("").some(n=>!e.test(n))&&o.preventDefault()}})}},ap={selector:"AG-INPUT-TEXT-FIELD",component:Ns},dp=class extends Ls{constructor(e){super(e,"ag-text-area",null,"textarea")}setValue(e,t){const o=super.setValue(e,t);return this.eInput.value=e,o}setCols(e){return this.eInput.cols=e,this}setRows(e){return this.eInput.rows=e,this}},cp={selector:"AG-INPUT-TEXT-AREA",component:dp},up=class extends Ns{constructor(e){super(e,"ag-number-field","number")}postConstruct(){super.postConstruct();const e=this.eInput;this.addManagedListeners(e,{blur:()=>{const n=parseFloat(e.value),r=isNaN(n)?"":this.normalizeValue(n.toString());this.value!==r&&this.setValue(r)},wheel:this.onWheel.bind(this)}),e.step="any";const{precision:t,min:o,max:i,step:s}=this.config;typeof t=="number"&&this.setPrecision(t),typeof o=="number"&&this.setMin(o),typeof i=="number"&&this.setMax(i),typeof s=="number"&&this.setStep(s)}onWheel(e){Y(this.beans)===this.eInput&&e.preventDefault()}normalizeValue(e){return e===""?"":(this.precision!=null&&(e=this.adjustPrecision(e)),e)}adjustPrecision(e,t){const o=this.precision;if(o==null)return e;if(t){const s=parseFloat(e).toFixed(o);return parseFloat(s).toString()}const i=String(e).split(".");if(i.length>1){if(i[1].length<=o)return e;if(o>0)return`${i[0]}.${i[1].slice(0,o)}`}return i[0]}setMin(e){return this.min===e?this:(this.min=e,ce(this.eInput,"min",e),this)}setMax(e){return this.max===e?this:(this.max=e,ce(this.eInput,"max",e),this)}setPrecision(e){return this.precision=e,this}setStep(e){return this.step===e?this:(this.step=e,ce(this.eInput,"step",e),this)}setValue(e,t){return this.setValueOrInputValue(o=>super.setValue(o,t),()=>this,e)}setStartValue(e){return this.setValueOrInputValue(t=>super.setValue(t,!0),t=>{this.eInput.value=t},e)}setValueOrInputValue(e,t,o){if(M(o)){let i=this.isScientificNotation(o);if(i&&this.eInput.validity.valid)return e(o);if(!i){o=this.adjustPrecision(o);const s=this.normalizeValue(o);i=o!=s}if(i)return t(o)}return e(o)}getValue(){const e=this.eInput;if(!e.validity.valid)return;const t=e.value;return this.isScientificNotation(t)?this.adjustPrecision(t,!0):super.getValue()}isScientificNotation(e){return typeof e=="string"&&e.includes("e")}},hp={selector:"AG-INPUT-NUMBER-FIELD",component:up},gp=class extends Ns{constructor(e){super(e,"ag-date-field","date")}postConstruct(){super.postConstruct();const e=ht();this.addManagedListeners(this.eInput,{wheel:this.onWheel.bind(this),mousedown:()=>{this.isDisabled()||e||this.eInput.focus()}}),this.eInput.step="any"}onWheel(e){Y(this.beans)===this.eInput&&e.preventDefault()}setMin(e){const t=e instanceof Date?$e(e??null,!!this.includeTime)??void 0:e;return this.min===t?this:(this.min=t,ce(this.eInput,"min",t),this)}setMax(e){const t=e instanceof Date?$e(e??null,!!this.includeTime)??void 0:e;return this.max===t?this:(this.max=t,ce(this.eInput,"max",t),this)}setStep(e){return this.step===e?this:(this.step=e,ce(this.eInput,"step",e),this)}setIncludeTime(e){return this.includeTime===e?this:(this.includeTime=e,super.setInputType(e?"datetime-local":"date"),e&&this.setStep(1),this)}getDate(){if(this.eInput.validity.valid)return no(this.getValue())??void 0}setDate(e,t){this.setValue($e(e??null,this.includeTime),t)}},Dl={selector:"AG-INPUT-DATE-FIELD",component:gp},pp=class extends j{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 y.ENTER:if(!this.highlightedEl)this.setValue(this.getValue());else{const o=this.itemEls.indexOf(this.highlightedEl);this.setValueByIndex(o)}break;case y.DOWN:case y.UP:e.preventDefault(),this.navigate(t);break;case y.PAGE_DOWN:case y.PAGE_UP:case y.PAGE_HOME:case y.PAGE_END:e.preventDefault(),this.navigateToPage(t);break}}navigate(e){const t=e===y.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 l=-1;e===y.PAGE_HOME?l=0:e===y.PAGE_END?l=s:e===y.PAGE_DOWN?l=Math.min(i+r,s):e===y.PAGE_UP&&(l=Math.max(i-r,0)),l!==-1&&this.highlightItem(t[l])}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=>{Ae(e)}),this.itemEls=[],this.refreshAriaRole()}refreshAriaRole(){const e=this.getGui();Be(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),Wd(t,e.length)})}renderOption(e,t){const o=X({tag:"div",cls:`ag-list-item ag-${this.cssIdentifier}-list-item`,attrs:{role:"option"}}),i=X({tag:"span",children:t});o.appendChild(i),this.unFocusable||(o.tabIndex=-1),this.itemEls.push(o),this.addManagedListeners(o,{mouseover:()=>this.highlightItem(o),mousedown:s=>{s.preventDefault(),s.stopPropagation(),this.setValue(e)}}),this.createOptionalManagedBean(this.beans.registry.createDynamicBean("tooltipFeature",!1,{getTooltipValue:()=>t,getGui:()=>o,getLocation:()=>"UNKNOWN",shouldDisplayTooltip:()=>i.scrollWidth>i.clientWidth})),this.getGui().appendChild(o)}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(!Me(e))return;this.clearHighlighted(),this.highlightedEl=e,e.classList.add(this.activeClass),Hi(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||!Me(e)||(e.classList.remove(this.activeClass),Hi(e,!1),this.highlightedEl=null)}fireChangeEvent(){this.dispatchLocalEvent({type:"fieldValueChanged"}),this.fireItemSelected()}fireItemSelected(){this.dispatchLocalEvent({type:"selectedItem"})}},fp=".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;&:where(.ag-picker-has-focus),&:where(:focus-within){background-color:var(--ag-picker-button-focus-background-color);border:var(--ag-picker-button-focus-border);box-shadow:var(--ag-focus-shadow);&:where(.invalid){box-shadow:var(--ag-focus-error-shadow)}}&:where(.invalid){background-color:var(--ag-input-invalid-background-color);border:var(--ag-input-invalid-border);color:var(--ag-input-invalid-text-color)}&:disabled{opacity:.5}}",Cp={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"}}]}]},mp=class extends ml{constructor(e){if(super(e,(e==null?void 0:e.template)||Cp,(e==null?void 0:e.agComponents)||[],e==null?void 0:e.className),this.isPickerDisplayed=!1,this.skipClick=!1,this.pickerGap=4,this.hideCurrentPicker=null,this.eLabel=A,this.eWrapper=A,this.eDisplayField=A,this.eIcon=A,this.registerCSS(fp),this.ariaRole=e==null?void 0: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=Tt(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()),Gi(e,!1),this.ariaRole&&Be(e,this.ariaRole)}onLabelOrWrapperMouseDown(e){if(e){const t=this.getFocusableElement();if(t!==this.eWrapper&&(e==null?void 0: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 y.UP:case y.DOWN:case y.ENTER:case y.SPACE:e.preventDefault(),this.onLabelOrWrapperMouseDown();break;case y.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:l,variableWidth:a,beans:d,eWrapper:c}=this,u={modal:s,eChild:e,closeOnEsc:!0,closedCallback:()=>{const f=or(d);this.beforeHidePicker(),f&&this.isAlive()&&this.getFocusableElement().focus()},ariaLabel:t(o,i),anchorToElement:c};e.style.position="absolute";const h=d.popupSvc,g=h.addPopup(u);a?(r&&(e.style.minWidth=r),e.style.width=Zi(ji(c)),l&&(e.style.maxWidth=l)):To(e,l??ji(c));const p=n??`${Ki(h.getPopupParent())}px`;return e.style.setProperty("max-height",p),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();Gi(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){var t;(t=this.pickerComponent)!=null&&t.getGui().contains(e.relatedTarget)||this.togglePickerHasFocus(!1)}togglePickerHasFocus(e){this.pickerComponent&&this.eWrapper.classList.toggle("ag-picker-has-focus",e)}hidePicker(){this.hideCurrentPicker&&(this.hideCurrentPicker(),this.dispatchLocalEvent({type:"pickerHidden"}))}setInputWidth(e){return To(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()}},wp=".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)}}",vp=class extends mp{constructor(e){super({pickerAriaLabelKey:"ariaLabelSelectField",pickerAriaLabelValue:"Select Field",pickerType:"ag-list",className:"ag-select",pickerIcon:"selectOpen",ariaRole:"combobox",...e}),this.registerCSS(wp)}postConstruct(){this.tooltipFeature=this.createOptionalManagedBean(this.beans.registry.createDynamicBean("tooltipFeature",!1,{shouldDisplayTooltip:Po(()=>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 pp("select",!0));this.listComponent=e,e.setParentComponent(this);const t=e.getAriaElement(),o=`ag-select-list-${e.getCompId()}`;t.setAttribute("id",o),Xd(this.getAriaElement(),t),e.addManagedElementListeners(e.getGui(),{mousedown:i=>{i==null||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){var o;const{key:t}=e;switch(t===y.TAB&&this.hidePicker(),t){case y.ENTER:case y.UP:case y.DOWN:case y.PAGE_UP:case y.PAGE_DOWN:case y.PAGE_HOME:case y.PAGE_END:e.preventDefault(),this.isPickerDisplayed?(o=this.listComponent)==null||o.handleKeyDown(e):super.onKeyDown(e);break;case y.ESCAPE:super.onKeyDown(e);break;case y.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(){var e;return(e=this.listComponent)==null||e.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 a=i.getDisplayValue();return a==null&&s&&(a=s),n.textContent=a,r==null||r.setTooltipAndRefresh(a??null),super.setValue(e,t)}destroy(){this.listComponent=this.destroyBean(this.listComponent),super.destroy()}},bp={selector:"AG-SELECT",component:vp},_s={TAB_GUARD:"ag-tab-guard",TAB_GUARD_TOP:"ag-tab-guard-top",TAB_GUARD_BOTTOM:"ag-tab-guard-bottom"},Sp=class extends x{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:l,onFocusIn:a,onFocusOut:d,shouldStopEventPropagation:c,onTabKeyDown:u,handleKeyDown:h,isEmpty:g,eFocusableElement:p}=e;this.comp=t,this.eTopGuard=o,this.eBottomGuard=i,this.providedFocusInnerElement=l,this.eFocusableElement=p,this.focusTrapActive=!!s,this.forceFocusOutWhenTabGuardsAreEmpty=!!n,this.isFocusableContainer=!!r,this.providedFocusIn=a,this.providedFocusOut=d,this.providedShouldStopEventPropagation=c,this.providedOnTabKeyDown=u,this.providedHandleKeyDown=h,this.providedIsEmpty=g}postConstruct(){this.createManagedBean(new ri(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():Ft(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){var a;const t=J(this.beans),o=Ft(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),l=this.gos.get("tabIndex");r.sort((d,c)=>{const u=parseInt(d.getAttribute("tabindex")||"0"),h=parseInt(c.getAttribute("tabindex")||"0");return h===l?1:u===l?-1:u===0?1:h===0?-1:u-h}),(a=r[e?r.length-1:0])==null||a.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=Ft(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 oi(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}},yp=class extends x{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(m=>C!=null?m.setAttribute("tabindex",C):m.removeAttribute("tabindex"))}};this.addTabGuards(t,o);const{focusTrapActive:r=!1,onFocusIn:l,onFocusOut:a,focusInnerElement:d,handleKeyDown:c,onTabKeyDown:u,shouldStopEventPropagation:h,isEmpty:g,forceFocusOutWhenTabGuardsAreEmpty:p,isFocusableContainer:f}=e;this.tabGuardCtrl=this.createManagedBean(new Sp({comp:n,focusTrapActive:r,eTopGuard:t,eBottomGuard:o,eFocusableElement:i,onFocusIn:l,onFocusOut:a,focusInnerElement:d,handleKeyDown:c,onTabKeyDown:u,shouldStopEventPropagation:h,isEmpty:g,forceFocusOutWhenTabGuardsAreEmpty:p,isFocusableContainer:f}))}getTabGuardCtrl(){return this.tabGuardCtrl}createTabGuard(e){const t=J(this.beans).createElement("div"),o=e==="top"?_s.TAB_GUARD_TOP:_s.TAB_GUARD_BOTTOM;return t.classList.add(_s.TAB_GUARD,o),Be(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];he(this.comp.getFocusableElement()),this.addTabGuards(...e)}forceFocusOutOfContainer(e=!1){this.tabGuardCtrl.forceFocusOutOfContainer(e)}appendChild(e,t,o){Qi(t)||(t=t.getGui());const{eBottomGuard:i}=this;i?i.insertAdjacentElement("beforebegin",t):e(t,o)}destroy(){const{eTopGuard:e,eBottomGuard:t}=this;Ae(e),Ae(t),super.destroy()}},Rp=class extends j{initialiseTabGuard(e){this.tabGuardFeature=this.createManagedBean(new yp(this)),this.tabGuardFeature.initialiseTabGuard(e)}forceFocusOutOfContainer(e=!1){this.tabGuardFeature.forceFocusOutOfContainer(e)}appendChild(e,t){this.tabGuardFeature.appendChild(super.appendChild.bind(this),e,t)}},lt=class{constructor(e,t=!1){this.DOUBLE_TAP_MILLIS=500,this.destroyFuncs=[],this.touching=!1,this.localEventService=new je,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;!Kr(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())}},Fl=class{constructor(e="javascript"){this.frameworkName=e,this.renderingEngine="vanilla",this.batchFrameworkComps=!1,this.wrapIncoming=t=>t(),this.wrapOutgoing=t=>t(),this.baseDocLink=`${Kn}/${this.frameworkName}-data-grid`,dc(this.baseDocLink)}setInterval(e,t){return new eo(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=dr(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 Ep(e){return{beanName:"gridApi",bean:e.getBean("apiFunctionSvc").api}}var xp=["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(xp.map((e,t)=>[e,t]));function Dp(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 Fp(e,t){return(e==null?void 0:e.beanName)==="gridDestroySvc"?-1:(t==null?void 0:t.beanName)==="gridDestroySvc"?1:0}var Pp={tag:"div",cls:"ag-pinned-left-header",role:"rowgroup"},Tp={tag:"div",cls:"ag-pinned-right-header",role:"rowgroup"},Ip={tag:"div",cls:"ag-header-viewport",role:"presentation",attrs:{tabindex:"-1"},children:[{tag:"div",ref:"eCenterContainer",cls:"ag-header-container",role:"rowgroup"}]},Ws=class extends j{constructor(e){super(),this.eCenterContainer=A,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 Vg(this.pinned)).setComp(e,this.getGui())}selectAndSetTemplate(){const e=this.pinned=="left",t=this.pinned=="right",o=e?Pp:t?Tp:Ip;this.setTemplate(o),this.eRowContainer=this.eCenterContainer!==A?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&&Bn(this.eRowContainer,n,o),o=n};e.forEach(s=>{const n=s.instanceId,r=t[n];delete t[n];const l=r||this.createBean(new Gg(s));this.headerRowComps[n]=l,this.rowCompsList.push(l),i(l)}),Object.values(t).forEach(s=>this.destroyRowComp(s))}},Ap={tag:"div",cls:"ag-header",role:"presentation"},Mp=class extends j{constructor(){super(Ap)}postConstruct(){const e={toggleCss:(i,s)=>this.toggleCss(i,s),setHeightAndMinHeight:i=>{this.getGui().style.height=i,this.getGui().style.minHeight=i}};this.createManagedBean(new Pg).setComp(e,this.getGui(),this.getFocusableElement());const o=i=>{this.createManagedBean(i),this.appendChild(i)};o(new Ws("left")),o(new Ws(null)),o(new Ws("right"))}},kp={selector:"AG-HEADER-ROOT",component:Mp},Lp=class extends j{constructor(e,t,o,i,s){super(),this.cellCtrl=t,this.rendererVersion=0,this.editorVersion=0,this.beans=e,this.gos=e.gos,this.column=t.column,this.rowNode=t.rowNode,this.eRow=i;const n=X({tag:"div",role:t.getCellAriaRole(),attrs:{"comp-id":`${this.getCompId()}`,"col-id":t.column.colIdSanitised}});this.eCell=n;let r;t.isCellSpanning()?(r=X({tag:"div",cls:"ag-spanned-cell-wrapper",role:"presentation"}),r.appendChild(n),this.setTemplateFromElement(r)):this.setTemplateFromElement(n),this.cellCssManager=new Pr(()=>n),this.forceWrapper=t.isForceWrapper(),this.refreshWrapper(!1);const l={toggleCss:(a,d)=>this.cellCssManager.toggleCss(a,d),setUserStyles:a=>Kt(n,a),getFocusableElement:()=>n,setIncludeSelection:a=>this.includeSelection=a,setIncludeRowDrag:a=>this.includeRowDrag=a,setIncludeDndSource:a=>this.includeDndSource=a,setRenderDetails:(a,d,c)=>this.setRenderDetails(a,d,c),setEditDetails:(a,d,c)=>this.setEditDetails(a,d,c),getCellEditor:()=>this.cellEditor||null,getCellRenderer:()=>this.cellRenderer||null,getParentOfValue:()=>this.getParentOfValue(),refreshEditStyles:(a,d)=>this.refreshEditStyles(a,d)};t.setComp(l,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=X({tag:"div",cls:"ag-cell-wrapper",role:"presentation"}),this.eCell.appendChild(this.eCellWrapper));const s=!o&&this.eCellWrapper!=null;s&&(Ae(this.eCellWrapper),this.eCellWrapper=void 0),this.cellCssManager.toggleCss("ag-cell-value",!o);const n=!e&&o,r=n&&this.eCellValue==null;r&&(this.eCellValue=X({tag:"span",cls:"ag-cell-value",role:"presentation"}),this.eCellWrapper.appendChild(this.eCellValue));const l=!n&&this.eCellValue!=null;l&&(Ae(this.eCellValue),this.eCellValue=void 0);const a=i||s||r||l;return a&&this.removeControls(),!e&&t&&this.addControls(),a}addControls(){const{cellCtrl:e,eCellWrapper:t,eCellValue:o,includeRowDrag:i,includeDndSource:s,includeSelection:n}=this,r=l=>{l&&t.insertBefore(l.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(l=>this.afterCellEditorCreated(i,l,n,t,o)),K(this.cellEditor)&&n.cellStartedEdit&&this.cellCtrl.focusCell(!0)}insertValueWithoutCellRenderer(e){const t=this.getParentOfValue();he(t);const o=bt(e);o!=null&&(t.textContent=o)}destroyRenderer(){const{context:e}=this.beans;this.cellRenderer=e.destroyBean(this.cellRenderer),Ae(this.cellRendererGui),this.cellRendererGui=null,this.rendererVersion++}destroyEditor(){var o,i;const{context:e}=this.beans;(((o=this.cellEditorPopupWrapper)==null?void 0:o.getGui().contains(Y(this.beans)))||this.cellCtrl.hasBrowserFocus())&&this.eCell.focus({preventScroll:!0}),(i=this.hideEditorPopup)==null||i.call(this),this.hideEditorPopup=void 0,this.cellEditor=e.destroyBean(this.cellEditor),this.cellEditorPopupWrapper=e.destroyBean(this.cellEditorPopupWrapper),Ae(this.cellEditorGui),this.cellCtrl.disableEditorTooltipFeature(),this.cellEditorGui=null,this.editorVersion++}refreshCellRenderer(e){var o;if(((o=this.cellRenderer)==null?void 0:o.refresh)==null||this.cellRendererClass!==e.componentClass)return!1;const t=this.cellRenderer.refresh(e.params);return t===!0||t===void 0}createCellRendererInstance(e){var n;const t=this.rendererVersion,o=r=>l=>{if(this.rendererVersion!==t||!this.isAlive())return;const d=r.newAgStackInstance(),c=this.afterCellRendererCreated.bind(this,t,r.componentClass);d==null||d.then(c)},{animationFrameSvc:i}=this.beans;let s;if(i!=null&&i.active&&this.firstRender?s=(r,l=!1)=>{i.createTask(o(r),this.rowNode.rowIndex,"p2",r.componentFromFramework,l)}:s=r=>o(r)(),(n=e.params)!=null&&n.deferRender&&!this.cellCtrl.rowNode.group){const{loadingComp:r,onReady:l}=this.cellCtrl.getDeferLoadingCellRenderer();r&&(s(r),l.then(()=>s(e,!0)))}else s(e)}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();he(n),n.appendChild(s)}}afterCellEditorCreated(e,t,o,i,s){var d;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){k(97,{colId:this.column.getId()}),r.destroyBean(t);return}this.cellEditor=t,this.cellEditorGui=t.getGui();const a=i||t.isPopup!==void 0&&t.isPopup();a?this.addPopupCellEditor(o,s):this.addInCellEditor(),this.refreshEditStyles(!0,a),(d=t.afterGuiAttached)==null||d.call(t),this.cellCtrl.enableEditorTooltipFeature(t),this.cellCtrl.cellEditorAttached()}refreshEditStyles(e,t){const{cellCssManager:o}=this;o.toggleCss("ag-cell-inline-editing",e&&!t),o.toggleCss("ag-cell-popup-editing",e&&!!t),o.toggleCss("ag-cell-not-inline-editing",!e||!!t)}addInCellEditor(){const{eCell:e}=this;e.contains(Y(this.beans))&&e.focus(),this.destroyRenderer(),this.refreshWrapper(!0),he(this.getParentOfValue()),this.cellEditorGui&&this.getParentOfValue().appendChild(this.cellEditorGui)}addPopupCellEditor(e,t){var v;const{gos:o,context:i,popupSvc:s,editSvc:n}=this.beans;o.get("editType")==="fullRow"&&k(98);const r=this.cellEditorPopupWrapper=i.createBean(n.createPopupEditorWrapper(e)),{cellEditor:l,cellEditorGui:a,eCell:d,rowNode:c,column:u,cellCtrl:h}=this,g=r.getGui();a&&g.appendChild(a);const p=o.get("stopEditingWhenCellsLoseFocus"),f=t??((v=l.getPopupPosition)==null?void 0:v.call(l))??"over",C=o.get("enableRtl"),m={ePopup:g,column:u,rowNode:c,type:"popupCellEditor",eventSource:d,position:f,alignSide:C?"right":"left",keepWithinBounds:!0},w=s.positionPopupByComponent.bind(s,m),b=s.addPopup({modal:p,eChild:g,closeOnEsc:!0,closedCallback:()=>{h.onPopupEditorClosed()},anchorToElement:d,positionCallback:w,ariaOwns:d});b&&(this.hideEditorPopup=b.hideFunc)}detach(){this.eRow.removeChild(this.getGui())}destroy(){this.destroyRenderer(),this.destroyEditor(),this.removeControls(),super.destroy()}},Gp=class extends j{constructor(e,t,o){super(),this.cellComps=new Map,this.beans=t,this.rowCtrl=e;const i=X({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,toggleCss:(r,l)=>this.toggleCss(r,l),setUserStyles:r=>Kt(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=>{var l,a;return((a=(l=this.fullWidthCellRenderer)==null?void 0:l.refresh)==null?void 0:a.call(l,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())}Vn(this.getGui(),t)}newCellComp(e){var i;const t=((i=this.beans.editSvc)==null?void 0:i.isEditing(e,{withOpenEditor:!0}))??!1,o=new Lp(this.beans,e,this.rowCtrl.printLayout,this.getGui(),t);this.cellComps.set(e.instanceId,o),this.getGui().appendChild(o.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 Hp(e,t,o){const i=!!o.gos.get("enableCellSpan")&&!!t.getSpannedRowCtrls,s={tag:"div",ref:"eContainer",cls:pi(e),role:"rowgroup"};if(t.type==="center"||i){const n={tag:"div",ref:"eSpannedContainer",cls:`ag-spanning-container ${ng(e)}`,role:"rowgroup"};return{tag:"div",ref:"eViewport",cls:`ag-viewport ${nl(e)}`,role:"presentation",children:[s,i?n:null]}}return s}var Op=class extends j{constructor(e){super(),this.eViewport=A,this.eContainer=A,this.eSpannedContainer=A,this.rowCompsNoSpan={},this.rowCompsWithSpan={},this.name=e==null?void 0:e.name,this.options=ro(this.name)}postConstruct(){this.setTemplate(Hp(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 fg(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 l=[];for(const a of e){const d=a.instanceId,c=n[d];let u;if(c)u=c,delete n[d];else{if(!a.rowNode.displayed)continue;u=new Gp(a,o,i.type)}r[d]=u,l.push([u,!c])}this.removeOldRows(Object.values(n),s),this.addRowNodes(l,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){Bn(t,e,this.lastPlacedElement),this.lastPlacedElement=e}},Bp={selector:"AG-ROW-CONTAINER",component:Op};function uo(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 Vp(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:uo(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:uo(t,["left","center","right","fullWidth"])},{tag:"ag-fake-vertical-scroll"}]},{tag:"div",ref:"eStickyTop",cls:"ag-sticky-top",role:"presentation",children:uo(t,["stickyTopLeft","stickyTopCenter","stickyTopRight","stickyTopFullWidth"])},{tag:"div",ref:"eStickyBottom",cls:"ag-sticky-bottom",role:"presentation",children:uo(t,["stickyBottomLeft","stickyBottomCenter","stickyBottomRight","stickyBottomFullWidth"])},{tag:"div",ref:"eBottom",cls:"ag-floating-bottom",role:"presentation",children:uo(t,["bottomLeft","bottomCenter","bottomRight","bottomFullWidth"])},{tag:"ag-fake-horizontal-scroll"},e?{tag:"ag-overlay-wrapper"}:null]};return{paramsMap:t,elementParams:o}}var Np=class extends j{constructor(){super(...arguments),this.eGridRoot=A,this.eBodyViewport=A,this.eStickyTop=A,this.eStickyBottom=A,this.eTop=A,this.eBottom=A,this.eBody=A}postConstruct(){const{overlays:e,rangeSvc:t}=this.beans,o=e==null?void 0:e.getOverlayWrapperSelector(),{paramsMap:i,elementParams:s}=Vp(!!o);this.setTemplate(s,[...o?[o]:[],Sg,Eg,kp,Bp],i);const n=(l,a)=>{const d=`${l}px`;a.style.minHeight=d,a.style.height=d},r={setRowAnimationCssOnBodyViewport:(l,a)=>this.setRowAnimationCssOnBodyViewport(l,a),setColumnCount:l=>jd(this.getGui(),l),setRowCount:l=>Ud(this.getGui(),l),setTopHeight:l=>n(l,this.eTop),setBottomHeight:l=>n(l,this.eBottom),setTopInvisible:l=>this.eTop.classList.toggle("ag-invisible",l),setBottomInvisible:l=>this.eBottom.classList.toggle("ag-invisible",l),setStickyTopHeight:l=>this.eStickyTop.style.height=l,setStickyTopTop:l=>this.eStickyTop.style.top=l,setStickyTopWidth:l=>this.eStickyTop.style.width=l,setStickyBottomHeight:l=>{this.eStickyBottom.style.height=l,this.eStickyBottom.classList.toggle("ag-invisible",l==="0px")},setStickyBottomBottom:l=>this.eStickyBottom.style.bottom=l,setStickyBottomWidth:l=>this.eStickyBottom.style.width=l,setColumnMovingCss:(l,a)=>this.toggleCss(l,a),updateLayoutClasses:(l,a)=>{const d=[this.eBodyViewport.classList,this.eBody.classList];for(const c of d)c.toggle(be.AUTO_HEIGHT,a.autoHeight),c.toggle(be.NORMAL,a.normal),c.toggle(be.PRINT,a.print);this.toggleCss(be.AUTO_HEIGHT,a.autoHeight),this.toggleCss(be.NORMAL,a.normal),this.toggleCss(be.PRINT,a.print)},setAlwaysVerticalScrollClass:(l,a)=>this.eBodyViewport.classList.toggle(al,a),registerBodyViewportResizeListener:l=>{const a=Ze(this.beans,this.eBodyViewport,l);this.addDestroyFunc(()=>a())},setPinnedTopBottomOverflowY:l=>this.eTop.style.overflowY=this.eBottom.style.overflowY=l,setCellSelectableCss:(l,a)=>{[this.eTop,this.eBodyViewport,this.eBottom].forEach(d=>d.classList.toggle(l,a))},setBodyViewportWidth:l=>this.eBodyViewport.style.width=l,setGridRootRole:l=>Be(this.eGridRoot,l)};this.ctrl=this.createManagedBean(new wg),this.ctrl.setComp(r,this.getGui(),this.eBodyViewport,this.eTop,this.eBottom,this.eStickyTop,this.eStickyBottom),(t&&Je(this.gos)||Qt(this.gos))&&$d(this.getGui(),!0)}setRowAnimationCssOnBodyViewport(e,t){const o=this.eBodyViewport.classList;o.toggle("ag-row-animation",t),o.toggle("ag-row-no-animation",!t)}},_p={selector:"AG-GRID-BODY",component:Np},Wp=class extends x{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==null||i.registerGridDropTarget(()=>this.eGui,this),Zr(this.gos,t),this.createManagedBean(new bs(this.view)),this.view.setRtlClass(this.gos.get("enableRtl")?"ag-rtl":"ag-ltr");const n=Ze(this.beans,this.eGridHostDiv,this.onGridSizeChanged.bind(this));this.addDestroyFunc(()=>n()),s.register("gridCtrl",this)}isDetailGrid(){var t;const e=vh(this.getGui());return((t=e==null?void 0:e.getAttribute("row-id"))==null?void 0:t.startsWith("detail"))||!1}getOptionalSelectors(){var t,o,i,s,n;const e=this.beans;return{paginationSelector:(t=e.pagination)==null?void 0:t.getPaginationSelector(),gridHeaderDropZonesSelector:(o=e.registry)==null?void 0:o.getSelector("AG-GRID-HEADER-DROP-ZONES"),sideBarSelector:(i=e.sideBar)==null?void 0:i.getSelector(),statusBarSelector:(s=e.registry)==null?void 0:s.getSelector("AG-STATUS-BAR"),watermarkSelector:(n=e.licenseManager)==null?void 0:n.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){const{view:t}=this;if(e===!1)t.setCursor(null);else{const o=e===1?"ew-resize":"ns-resize";t.setCursor(o)}}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,l=$(r);if(n.focusGridView({column:l,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($(o),e);const r=$(n);if(i.focusGridView({column:r,backwards:e}))return!0}if(this.gos.get("headerHeight")===0||rt(this.beans)){if(i.focusGridView({column:n[0],backwards:e}))return!0;for(let r=1;r<o.length;r++)if(ti(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){var n;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];(n=s.setAllowFocus)==null||n.call(s,!0),setTimeout(()=>{var r;(r=s.setAllowFocus)==null||r.call(s,!1)})}isFocusable(){var t,o;const e=this.beans;return!ii(e)||!rt(e)||!!((o=(t=e.sideBar)==null?void 0:t.comp)!=null&&o.isDisplayed())}getNextFocusableIndex(e,t){const o=Y(this.beans),i=e.findIndex(n=>n.getGui().contains(o)),s=i+(t?-1:1);return{indexWithFocus:i,nextIndex:s}}focusContainer(e,t){var i,s;(i=e.setAllowFocus)==null||i.call(e,!0);const o=ti(e.getGui(),t,!1,!0);return(s=e.setAllowFocus)==null||s.call(e,!1),o}getFocusableContainers(){return[...this.view.getFocusableContainers(),...this.additionalFocusableContainers]}destroy(){this.additionalFocusableContainers.clear(),super.destroy()}},zp=class extends Rp{constructor(e){super(),this.gridBody=A,this.sideBar=A,this.pagination=A,this.rootWrapperBody=A,this.eGridDiv=e}postConstruct(){const e={destroyGridUi:()=>this.destroyBean(this),setRtlClass:n=>this.addCss(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 Wp),o=t.getOptionalSelectors(),i=this.createTemplate(o),s=[_p,...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),jt(this.gos,"Grid removed from DOM")})}updateLayoutClasses(e,t){const o=this.rootWrapperBody.classList,{AUTO_HEIGHT:i,NORMAL:s,PRINT:n}=be,{autoHeight:r,normal:l,print:a}=t;o.toggle(i,r),o.toggle(s,l),o.toggle(n,a),this.toggleCss(i,r),this.toggleCss(s,l),this.toggleCss(n,a)}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){var t;if(!e&&((t=this.pagination)!=null&&t.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=>Me(t.getGui()))}},N=(e,t)=>{for(const o of Object.keys(t))t[o]=e;return t},Tl={dispatchEvent:"CommunityCore",...N("CommunityCore",{destroy:0,getGridId:0,getGridOption:0,isDestroyed:0,setGridOption:0,updateGridOptions:0,isModuleRegistered:0}),...N("GridState",{getState:0,setState:0}),...N("SharedRowSelection",{setNodesSelected:0,selectAll:0,deselectAll:0,selectAllFiltered:0,deselectAllFiltered:0,selectAllOnCurrentPage:0,deselectAllOnCurrentPage:0,getSelectedNodes:0,getSelectedRows:0}),...N("RowApi",{redrawRows:0,setRowNodeExpanded:0,getRowNode:0,addRenderedRowListener:0,getRenderedNodes:0,forEachNode:0,getFirstDisplayedRowIndex:0,getLastDisplayedRowIndex:0,getDisplayedRowAtIndex:0,getDisplayedRowCount:0}),...N("ScrollApi",{getVerticalPixelRange:0,getHorizontalPixelRange:0,ensureColumnVisible:0,ensureIndexVisible:0,ensureNodeVisible:0}),...N("KeyboardNavigation",{getFocusedCell:0,clearFocusedCell:0,setFocusedCell:0,tabToNextCell:0,tabToPreviousCell:0,setFocusedHeader:0}),...N("EventApi",{addEventListener:0,addGlobalListener:0,removeEventListener:0,removeGlobalListener:0}),...N("ValueCache",{expireValueCache:0}),...N("CellApi",{getCellValue:0}),...N("SharedMenu",{showColumnMenu:0,hidePopupMenu:0}),...N("Sort",{onSortChanged:0}),...N("PinnedRow",{getPinnedTopRowCount:0,getPinnedBottomRowCount:0,getPinnedTopRow:0,getPinnedBottomRow:0,forEachPinnedRow:0}),...N("Overlay",{showLoadingOverlay:0,showNoRowsOverlay:0,hideOverlay:0}),...N("RenderApi",{setGridAriaProperty:0,refreshCells:0,refreshHeader:0,isAnimationFrameQueueEmpty:0,flushAllAnimationFrames:0,getSizesForCurrentTheme:0,getCellRendererInstances:0}),...N("HighlightChanges",{flashCells:0}),...N("RowDrag",{addRowDropZone:0,removeRowDropZone:0,getRowDropZoneParams:0,getRowDropPositionIndicator:0,setRowDropPositionIndicator:0}),...N("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}),...N("ColumnAutoSize",{sizeColumnsToFit:0,autoSizeColumns:0,autoSizeAllColumns:0}),...N("ColumnGroup",{setColumnGroupOpened:0,getColumnGroup:0,getProvidedColumnGroup:0,getDisplayNameForColumnGroup:0,getColumnGroupState:0,setColumnGroupState:0,resetColumnGroupState:0,getLeftDisplayedColumnGroups:0,getCenterDisplayedColumnGroups:0,getRightDisplayedColumnGroups:0,getAllDisplayedColumnGroups:0}),...N("ColumnMove",{moveColumnByIndex:0,moveColumns:0}),...N("ColumnResize",{setColumnWidths:0}),...N("ColumnHover",{isColumnHovered:0}),...N("EditCore",{getCellEditorInstances:0,getEditingCells:0,stopEditing:0,startEditingCell:0,isEditing:0,validateEdit:0}),...N("BatchEdit",{startBatchEdit:0,cancelBatchEdit:0,commitBatchEdit:0,isBatchEditing:0}),...N("UndoRedoEdit",{undoCellEditing:0,redoCellEditing:0,getCurrentUndoSize:0,getCurrentRedoSize:0}),...N("FilterCore",{isAnyFilterPresent:0,onFilterChanged:0}),...N("ColumnFilter",{isColumnFilterPresent:0,getColumnFilterInstance:0,destroyFilter:0,setFilterModel:0,getFilterModel:0,getColumnFilterModel:0,setColumnFilterModel:0,showColumnFilter:0,hideColumnFilter:0,getColumnFilterHandler:0,doFilterAction:0}),...N("QuickFilter",{isQuickFilterPresent:0,getQuickFilter:0,resetQuickFilter:0}),...N("Find",{findGetActiveMatch:0,findGetTotalMatches:0,findGoTo:0,findNext:0,findPrevious:0,findGetNumMatches:0,findGetParts:0,findClearActive:0,findRefresh:0}),...N("Pagination",{paginationIsLastPageFound:0,paginationGetPageSize:0,paginationGetCurrentPage:0,paginationGetTotalPages:0,paginationGetRowCount:0,paginationGoToNextPage:0,paginationGoToPreviousPage:0,paginationGoToFirstPage:0,paginationGoToLastPage:0,paginationGoToPage:0}),...N("CsrmSsrmSharedApi",{expandAll:0,collapseAll:0,onRowHeightChanged:0}),...N("SsrmInfiniteSharedApi",{setRowCount:0,getCacheBlockState:0,isLastRowIndexKnown:0}),...N("ClientSideRowModelApi",{onGroupExpandedOrCollapsed:0,refreshClientSideRowModel:0,isRowDataEmpty:0,forEachLeafNode:0,forEachNodeAfterFilter:0,forEachNodeAfterFilterAndSort:0,resetRowHeights:0,applyTransaction:0,applyTransactionAsync:0,flushAsyncTransactions:0,getBestCostNodeSelection:0}),...N("CsvExport",{getDataAsCsv:0,exportDataAsCsv:0}),...N("InfiniteRowModel",{refreshInfiniteCache:0,purgeInfiniteCache:0,getInfiniteRowCount:0}),...N("AdvancedFilter",{getAdvancedFilterModel:0,setAdvancedFilterModel:0,showAdvancedFilterBuilder:0,hideAdvancedFilterBuilder:0}),...N("IntegratedCharts",{getChartModels:0,getChartRef:0,getChartImageDataURL:0,downloadChart:0,openChartToolPanel:0,closeChartToolPanel:0,createRangeChart:0,createPivotChart:0,createCrossFilterChart:0,updateChart:0,restoreChart:0}),...N("Clipboard",{copyToClipboard:0,cutToClipboard:0,copySelectedRowsToClipboard:0,copySelectedRangeToClipboard:0,copySelectedRangeDown:0,pasteFromClipboard:0}),...N("ExcelExport",{getDataAsExcel:0,exportDataAsExcel:0,getSheetDataForExcel:0,getMultipleSheetsAsExcel:0,exportMultipleSheetsAsExcel:0}),...N("SharedMasterDetail",{addDetailGridInfo:0,removeDetailGridInfo:0,getDetailGridInfo:0,forEachDetailGridInfo:0}),...N("ContextMenu",{showContextMenu:0}),...N("ColumnMenu",{showColumnChooser:0,hideColumnChooser:0}),...N("CellSelection",{getCellRanges:0,addCellRange:0,clearRangeSelection:0,clearCellSelection:0}),...N("SharedRowGrouping",{setRowGroupColumns:0,removeRowGroupColumns:0,addRowGroupColumns:0,getRowGroupColumns:0,moveRowGroupColumn:0}),...N("SharedAggregation",{addAggFuncs:0,clearAggFuncs:0,setColumnAggFunc:0}),...N("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}),...N("ServerSideRowModelApi",{getServerSideSelectionState:0,setServerSideSelectionState:0,applyServerSideTransaction:0,applyServerSideTransactionAsync:0,applyServerSideRowData:0,retryServerSideLoads:0,flushServerSideAsyncTransactions:0,refreshServerSide:0,getServerSideGroupLevelState:0}),...N("SideBar",{isSideBarVisible:0,setSideBarVisible:0,setSideBarPosition:0,openToolPanel:0,closeToolPanel:0,getOpenedToolPanel:0,refreshToolPanel:0,isToolPanelShowing:0,getToolPanelInstance:0,getSideBar:0}),...N("StatusBar",{getStatusPanel:0})},zs={isDestroyed:()=>!0,destroy(){},preConstruct(){},postConstruct(){},preWireBeans(){},wireBeans(){}},$p=(e,t)=>e.eventSvc.dispatchEvent(t),Il=class{};Reflect.defineProperty(Il,"name",{value:"GridApi"});var Up=class extends x{constructor(){super(),this.beanName="apiFunctionSvc",this.api=new Il,this.fns={...zs,dispatchEvent:$p},this.preDestroyLink="";const{api:e}=this;for(const t of Object.keys(Tl))e[t]=this.makeApi(t)[t]}postConstruct(){this.preDestroyLink=this.beans.frameworkOverrides.getDocLink("grid-lifecycle/#grid-pre-destroyed")}addFunction(e,t){var s;const{fns:o,beans:i}=this;o!==zs&&(o[e]=((s=i==null?void 0:i.validation)==null?void 0:s.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)k(26,{fnName:e,preDestroyLink:i});else{const s=Tl[e];o.assertModuleRegistered(s,`api.${e}`)&&k(27,{fnName:e,module:s})}}destroy(){super.destroy(),this.fns=zs,this.beans=null}};function Kp(e){return e.context.getGridId()}function jp(e){e.gridDestroySvc.destroy()}function qp(e){return e.gridDestroySvc.destroyCalled}function Yp(e,t){return e.gos.get(t)}function Zp(e,t,o){Al(e,{[t]:o})}function Al(e,t){e.gos.updateGridOptions({options:t})}function Qp(e,t){const o=t.replace(/Module$/,"");return e.gos.isModuleRegistered(o)}var Xp={tag:"div",cls:"ag-drag-handle ag-row-drag",attrs:{draggable:"true"}},Jp=class extends j{constructor(e,t,o){super(Xp),this.rowNode=e,this.column=t,this.eCell=o}postConstruct(){this.getGui().appendChild(Tt("rowDrag",this.beans,null)),this.addGuiEventListener("mousedown",t=>{t.stopPropagation()}),this.addDragSource(),this.checkVisibility()}addDragSource(){this.addGuiEventListener("dragstart",this.onDragStart.bind(this))}onDragStart(e){const{rowNode:t,column:o,eCell:i,gos:s}=this,n=o.getColDef().dndSourceOnRowDrag,r=e.dataTransfer;if(r.setDragImage(i,0,0),n){const l=_(s,{rowNode:t,dragEvent:e});n(l)}else try{const l=JSON.stringify(t.data);r.setData("application/json",l),r.setData("text/plain",l)}catch{}}checkVisibility(){const e=this.column.isDndSource(this.rowNode);this.setDisplayed(e)}},ef=class extends x{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(1),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)}},Ci=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()])}},Ml={moduleName:"Drag",version:G,beans:[Hh]},tf={moduleName:"DragAndDrop",version:G,dynamicBeans:{dndSourceComp:Jp},icons:{rowDrag:"grip"}},of={moduleName:"SharedDragAndDrop",version:G,beans:[Gh],dependsOn:[Ml],userComponents:{agDragAndDropImage:jg},icons:{columnMovePin:"pin",columnMoveHide:"eye-slash",columnMoveMove:"arrows",columnMoveLeft:"left",columnMoveRight:"right",columnMoveGroup:"group",columnMoveValue:"aggregation",columnMovePivot:"pivot",dropNotAllowed:"not-allowed",rowDrag:"grip"}},sf={moduleName:"HorizontalResize",version:G,beans:[ef],dependsOn:[Ml]},nf=":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}}",rf=class extends x{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 lf(e,t,o){var i;(i=e.colMoves)==null||i.moveColumnByIndex(t,o,"api")}function af(e,t,o){var i;(i=e.colMoves)==null||i.moveColumns(t,o,"api")}var df=class extends x{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==null||t.addColumns(this.columnsToAggregate,"toolPanelDragAndDrop")),this.columnsToGroup.length>0&&(o==null||o.addColumns(this.columnsToGroup,"toolPanelDragAndDrop")),this.columnsToPivot.length>0&&(i==null||i.addColumns(this.columnsToPivot,"toolPanelDragAndDrop"))}onDragCancel(){this.clearColumnsList()}};function cf(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 uf(e){const t=[...e];return e.forEach(o=>{var n;let i=null,s=o.getParent();for(;s!=null&&s.getDisplayedLeafColumns().length===1;)i=s,s=s.getParent();i!=null&&(!!((n=i.getColGroupDef())!=null&&n.marryChildren)?i.getProvidedColumnGroup().getLeafColumns():i.getLeafColumns()).forEach(a=>{t.includes(a)||t.push(a)})}),t}function hf(e,t,o,i){const s=i.allCols;let n=null,r=null;for(let l=0;l<e.length;l++){const a=e[l],d=o.getProposedColumnOrder(t,a);if(!o.doesOrderPassRules(d))continue;const c=d.filter(h=>s.includes(h));if(r===null)r=c;else if(!Jt(c,r))break;const u=pf(d);(n===null||u<n.fragCount)&&(n={move:a,fragCount:u})}return n}function kl(e){const{isFromHeader:t,fromLeft:o,xPosition:i,fromEnter:s,fakeEvent:n,pinned:r,gos:l,colModel:a,colMoves:d,visibleCols:c}=e;let{allMovingColumns:u}=e;t&&(u=uf(u));const h=u.slice();cf(a.getCols(),h);const g=Cf({movingCols:h,draggingRight:o,xPosition:i,pinned:r,gos:l,colModel:a,visibleCols:c}),p=gf(h,a);if(g.length===0)return;const f=g[0];if(p!==null&&(t||!s)&&!n&&(!o&&f>=p||o&&f<=p))return;const m=hf(g,h,d,c);if(!m)return;const w=m.move;if(!(w>a.getCols().length-h.length))return{columns:h,toIndex:w}}function Ll(e){const{columns:t,toIndex:o}=kl(e)||{},{finished:i,colMoves:s}=e;return!t||o==null?null:(s.moveColumns(t,o,"uiColumnMoved",i),i?null:{columns:t,toIndex:o})}function gf(e,t){const o=t.getCols(),i=e.map(a=>o.indexOf(a)).sort((a,d)=>a-d),s=i[0];return $(i)-s!==i.length-1?null:s}function pf(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 ff(e,t){switch(t){case"left":return e.leftCols;case"right":return e.rightCols;default:return e.centerCols}}function Cf(e){const{movingCols:t,draggingRight:o,xPosition:i,pinned:s,gos:n,colModel:r,visibleCols:l}=e;if(n.get("suppressMovableColumns")||t.some(b=>b.getColDef().suppressMovable))return[];const d=ff(l,s),c=r.getCols(),u=d.filter(b=>t.includes(b)),h=d.filter(b=>!t.includes(b)),g=c.filter(b=>!t.includes(b));let p=0,f=i;if(o){let b=0;u.forEach(v=>b+=v.getActualWidth()),f-=b}if(f>0){for(let b=0;b<h.length;b++){const v=h[b];if(f-=v.getActualWidth(),f<0)break;p++}o&&p++}let C;if(p>0){const b=h[p-1];C=g.indexOf(b)+1}else C=g.indexOf(h[0]),C===-1&&(C=0);const m=[C],w=(b,v)=>b-v;if(o){let b=C+1;const v=c.length-1;for(;b<=v;)m.push(b),b++;m.sort(w)}else{let b=C;const v=c.length-1;let S=c[b];for(;b<=v&&d.indexOf(S)<0;)b++,m.push(b),S=c[b];b=C-1;const D=0;for(;b>=D;)m.push(b),b--;m.sort(w).reverse()}return m}function $s(e){var d;const{pinned:t,fromKeyboard:o,gos:i,ctrlsSvc:s,useHeaderRow:n,skipScrollPadding:r}=e;let l=(d=s.getHeaderRowContainerCtrl(t))==null?void 0:d.eViewport,{x:a}=e;return l?(o&&(a-=l.getBoundingClientRect().left),i.get("enableRtl")&&(n&&(l=l.querySelector(".ag-header-row")),a=l.clientWidth-a),t==null&&!r&&(a+=s.get("center").getCenterViewportScrollLeft()),a):0}function Us(e,t){for(const o of e)o.moving=t,o.dispatchColEvent("movingChanged","uiColumnMoved")}var Gl=7,Ks=100,mi=Ks/2,mf=5,wf=100,vf=class extends x{constructor(e){super(),this.pinned=e,this.needToMoveLeft=!1,this.needToMoveRight=!1,this.lastMovedInfo=null,this.isCenterContainer=!M(e)}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.gridBodyCon=e.gridBodyCtrl})}getIconName(){const{pinned:e,lastDraggingEvent:t}=this,{dragItem:o}=t||{},i=(o==null?void 0:o.columns)??[];for(const s of i){const n=s.getPinned();if(s.getColDef().lockPinned){if(n==e)return"move";continue}const r=o==null?void 0:o.containerType;if(r===e||!e)return"move";if(e&&(!n||r!==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()]&&!r.isVisible());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&&K(e.hDirection))return;const l=$s({x:e.x,pinned:this.pinned,gos:s,ctrlsSvc:n});t||this.checkCenterForScrolling(l),r?this.handleColumnDragWhileSuppressingMovement(e,t,o,l,i):this.handleColumnDragWhileAllowingMovement(e,t,o,l,i)}onDragLeave(){this.ensureIntervalCleared(),this.clearHighlighted(),this.updateDragItemContainerType(),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!=null&&e.length))return;const i=e.filter(s=>!s.getColDef().lockVisible);i.length&&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)}updateDragItemContainerType(){const{lastDraggingEvent:e}=this;if(this.gos.get("suppressMoveWhenColumnDragging")||!e)return;const t=e.dragItem;t&&(t.containerType=this.pinned)}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:l,xPosition:a}=this.getNormalisedXPositionInfo(n,r)||{};if(l==null||a==null){this.finishColumnMoving();return}this.moveColumnsAfterHighlight({allMovingColumns:n,xPosition:a,fromEnter:t,fakeEvent:o,fromLeft:l})}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",l=e.dragSource.type===1,a=this.getMoveColumnParams({allMovingColumns:n,isFromHeader:l,xPosition:i,fromLeft:r,fromEnter:t,fakeEvent:o}),d=Ll({...a,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:l,colModel:a,colMoves:d,visibleCols:c}=this.beans;return{allMovingColumns:t,isFromHeader:o,fromLeft:s,xPosition:i,pinned:this.pinned,fromEnter:n,fakeEvent:r,gos:l,colModel:a,colMoves:d,visibleCols:c}}highlightHoveredColumn(e,t){var c;const{gos:o,colModel:i}=this.beans,s=o.get("enableRtl"),n=i.getCols().filter(u=>u.isVisible()&&u.getPinned()===this.pinned);let r=null,l=null,a=null;for(const u of n){if(l=u.getActualWidth(),r=this.getNormalisedColumnLeft(u,0,s),r!=null){const h=r+l;if(r<=t&&h>=t){a=u;break}}r=null,l=null}if(a)e.indexOf(a)!==-1&&(a=null);else{for(let u=n.length-1;u>=0;u--){const h=n[u],g=n[u].getParent();if(!g){a=h;break}const p=g==null?void 0:g.getDisplayedLeafColumns();if(p.length){a=$(p);break}}if(!a)return;r=this.getNormalisedColumnLeft(a,0,s),l=a.getActualWidth()}if(((c=this.lastHighlightedColumn)==null?void 0:c.column)!==a&&this.clearHighlighted(),a==null||r==null||l==null)return;let d;t-r<l/2!==s?d=0:d=1,Hl(a,d),this.lastHighlightedColumn={column:a,position:d}}getNormalisedXPositionInfo(e,t){const{gos:o,visibleCols:i}=this.beans,s=o.get("enableRtl"),{firstMovingCol:n,column:r,position:l}=this.getColumnMoveAndTargetInfo(e,t,s);if(!n||!r||l==null)return;const a=i.allCols,d=a.indexOf(n),c=a.indexOf(r),u=l===0!==s,h=d<c||d===c&&!u;let g=0;if(u?h&&(g-=1):h||(g+=1),c+g===d)return;const p=a[c+g];if(!p)return;const f=this.getNormalisedColumnLeft(p,20,s);return{fromLeft:h,xPosition:f}}getColumnMoveAndTargetInfo(e,t,o){const i=this.lastHighlightedColumn||{},{firstMovingCol:s,lastMovingCol:n}=bf(e);if(!s||!n||i.column||!t)return{firstMovingCol:s,...i};const l=this.getPinDirection()==="left";return{firstMovingCol:s,position:l?1:0,column:l!==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 $s({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>Gl;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:l,toIndex:a}=kl(r)||{};l&&a!=null&&(this.lastMovedInfo={columns:l,toIndex:a}),this.finishColumnMoving()}clearHighlighted(){const{lastHighlightedColumn:e}=this;e&&(Hl(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+mi,n=e>i-mi):(n=e<o+mi,s=e>i-mi),this.needToMoveRight=s,this.needToMoveLeft=n,n||s?this.ensureIntervalStarted():this.ensureIntervalCleared()}ensureIntervalStarted(){var e;this.movingIntervalId||(this.intervalCount=0,this.failedMoveAttempts=0,this.movingIntervalId=window.setInterval(this.moveInterval.bind(this),wf),(e=this.beans.dragAndDrop.getDragAndDropImageComponent())==null||e.setIcon(this.needToMoveLeft?"left":"right",!0))}ensureIntervalCleared(){var e;this.movingIntervalId&&(window.clearInterval(this.movingIntervalId),this.movingIntervalId=null,this.failedMoveAttempts=0,(e=this.beans.dragAndDrop.getDragAndDropImageComponent())==null||e.setIcon(this.getIconName(),!1))}moveInterval(){var i,s;let e;this.intervalCount++,e=10+this.intervalCount*mf,e>Ks&&(e=Ks);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:n,dragAndDrop:r,gos:l}=this.beans;if(this.failedMoveAttempts<=Gl+1||!n)return;if((i=r.getDragAndDropImageComponent())==null||i.setIcon("pinned",!1),!l.get("suppressMoveWhenColumnDragging")){const a=(s=this.lastDraggingEvent)==null?void 0:s.dragItem.columns;this.attemptToPinColumns(a,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==null||s.setColsPinned(i,t,"uiColumnDragged"),o&&n.nudge(),i.length}destroy(){super.destroy(),this.lastDraggingEvent=null,this.clearHighlighted(),this.lastMovedInfo=null}};function Hl(e,t){e.highlighted!==t&&(e.highlighted=t,e.dispatchColEvent("headerHighlightChanged","uiColumnMoved"))}function bf(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 Sf=class extends x{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 vf(o)),this.bodyDropPivotTarget=this.createManagedBean(new df(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()}},yf=class extends x{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:l}=this.beans,a=s.getCols();if(!a)return;if(t>a.length-e.length){k(30,{toIndex:t});return}n==null||n.start();const d=s.getColsForKeys(e);this.doesMovePassRules(d,t)&&(gr(s.getCols(),d,t),r.refresh(o),l.dispatchEvent({type:"columnMoved",columns:d,column:d.length===1?d[0]:null,toIndex:t,finished:i,source:o})),n==null||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!(!yr(e,t.getColTree())||!(s=>{const n=d=>d?d==="left"||d===!0?-1:1:0,r=o.get("enableRtl");let l=r?1:-1,a=!0;return s.forEach(d=>{const c=n(d.getColDef().lockPosition);r?c>l&&(a=!1):c<l&&(a=!1),l=c}),a})(e))}getProposedColumnOrder(e,t){const i=this.beans.colModel.getCols().slice();return gr(i,e,t),i}createBodyDropTarget(e,t){return new Sf(e,t)}moveHeader(e,t,o,i,s){const{ctrlsSvc:n,gos:r,colModel:l,visibleCols:a,focusSvc:d}=this.beans,c=t.getBoundingClientRect(),u=c.left,h=Q(o),g=h?c.width:o.getActualWidth(),p=e==="left"!==r.get("enableRtl"),f=$s({x:p?u-20:u+g+20,pinned:i,fromKeyboard:!0,gos:r,ctrlsSvc:n}),C=d.focusedHeader;Ll({allMovingColumns:h?o.getLeafColumns():[o],isFromHeader:!0,fromLeft:e==="right",xPosition:f,pinned:i,fromEnter:!1,fakeEvent:!1,gos:r,colModel:l,colMoves:this,visibleCols:a,finished:!0});let m;if(h){const w=o.getDisplayedLeafColumns();m=p?w[0]:$(w)}else m=o;if(n.getScrollFeature().ensureColumnVisible(m,"auto"),(!s.isAlive()||r.get("ensureDomOrder"))&&C){let w;if(h){const b=o.getGroupId(),v=o.getLeafColumns();if(!v.length)return;const S=v[0].getParent();if(!S)return;w=Rf(S,b)}else w=o;w&&d.focusHeaderPosition({headerPosition:{...C,column:w}})}}setDragSourceForHeader(e,t,o){const{gos:i,colModel:s,dragAndDrop:n,visibleCols:r}=this.beans;let l=!i.get("suppressDragLeaveHidesColumns");const a=Q(t),d=a?t.getProvidedColumnGroup().getLeafColumns():[t],u={type:1,eElement:e,getDefaultIconName:()=>l?"hide":"notAllowed",getDragItem:a?()=>xf(t,r.allCols):()=>Ef(t),dragItemName:o,onDragStarted:()=>{l=!i.get("suppressDragLeaveHidesColumns"),Us(d,!0)},onDragStopped:()=>Us(d,!1),onDragCancelled:()=>Us(d,!1),onGridEnter:h=>{if(l){const{columns:g=[],visibleState:p}=h??{},f=a?m=>!p||p[m.getColId()]:()=>!0,C=g.filter(m=>!m.getColDef().lockVisible&&f(m));s.setColsVisible(C,!0,"uiColumnMoved")}},onGridExit:h=>{var g;if(l){const p=((g=h==null?void 0:h.columns)==null?void 0:g.filter(f=>!f.getColDef().lockVisible))||[];s.setColsVisible(p,!1,"uiColumnMoved")}}};return n.addDragSource(u,!0),u}};function Rf(e,t){for(;e;){if(e.getGroupId()===t)return e;e=e.getParent()}}function Ef(e){const t={};return t[e.getId()]=e.isVisible(),{columns:[e],visibleState:t,containerType:e.pinned}}function xf(e,t){var l;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),we(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,containerType:(l=n[0])==null?void 0:l.pinned}}var Df={moduleName:"ColumnMove",version:G,beans:[yf,rf],apiFunctions:{moveColumnByIndex:lf,moveColumns:af},dependsOn:[of],css:[nf]},Ff=class extends x{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(l=>o.classList.contains(l))?(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(a=>r.classList.contains(a))){for(let a=0;a<r.classList.length;a++){const d=r.classList[a];d!="ag-row-position-absolute"&&s.add(d)}break}r=r.parentElement}i.appendChild(o),t.appendChild(i)}},Ol={moduleName:"AutoWidth",version:G,beans:[Ff]};function Pf(e,t,o=!0,i="api"){var s;(s=e.colResize)==null||s.setColumnWidths(t,!1,o,i)}var Tf=class extends x{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){var a;const t=d=>d.reduce((c,u)=>c+u.getActualWidth(),0),o=(d,c)=>d.map(u=>u.getActualWidth()/c),i=this.getColumnsToResize(),s=t(i),n=o(i,s),r={columnsToResize:i,resizeStartWidth:s,resizeRatios:n};let l=null;if(e&&(l=((a=this.beans.colGroupSvc)==null?void 0:a.getGroupAtDirection(this.columnGroup,"After"))??null),l){const d=l.getDisplayedLeafColumns(),c=r.groupAfterColumns=d.filter(h=>h.isResizable()),u=r.groupAfterStartWidth=t(c);r.groupAfterRatios=o(c,u)}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){var u;const{columnsToResize:s,resizeStartWidth:n,resizeRatios:r,groupAfterColumns:l,groupAfterStartWidth:a,groupAfterRatios:d}=e,c=[];if(c.push({columns:s,ratios:r,width:t}),l){const h=t-n;c.push({columns:l,ratios:d,width:a-h})}(u=this.beans.colResize)==null||u.resizeColumnSets({resizeSets:c,finished:i,source:o}),i&&this.toggleColumnResizing(!1)}toggleColumnResizing(e){this.comp.toggleCss("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}},If=class extends x{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(Z(this.eResize,t),!t)return;const{horizontalResizeSvc:r,colAutosize:l}=this.beans,a=r.addResizeBar({eResizeBar:this.eResize,onResizeStart:this.onResizeStart.bind(this),onResizing:this.onResizing.bind(this,!1),onResizeEnd:this.onResizing.bind(this,!0)});e.push(a),o&&l&&e.push(l.addColumnAutosize(this.eResize,this.column))},s=()=>{e.forEach(r=>r()),e.length=0},n=()=>{const r=this.column.isResizable(),l=!this.gos.get("suppressAutoSize")&&!this.column.getColDef().suppressAutoSize;(r!==t||l!==o)&&(t=r,o=l,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),l=s+r,a=[{key:o,newWidth:l}],{pinnedCols:d,ctrlsSvc:c,colResize:u}=n;if(this.column.getPinned()){const h=(d==null?void 0:d.leftWidth)??0,g=(d==null?void 0:d.rightWidth)??0,p=Ut(c.getGridBodyCtrl().eBodyViewport)-50;if(h+g+(r-i)>p)return}this.lastResizeAmount=r,u==null||u.setColumnWidths(a,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.column.resizing=e,this.comp.toggleCss("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}},Af=class extends x{constructor(){super(...arguments),this.beanName="colResize"}setColumnWidths(e,t,o,i){const s=[],{colModel:n,gos:r,visibleCols:l}=this.beans;e.forEach(a=>{const d=n.getColDefCol(a.key)||n.getCol(a.key);if(!d)return;if(s.push({width:a.newWidth,ratios:[1],columns:[d]}),r.get("colResizeDefault")==="shift"&&(t=!t),t){const u=l.getColAfter(d);if(!u)return;const h=d.getActualWidth()-a.newWidth,g=u.getActualWidth()+h;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=>Mf(c)))){if(o){const c=t&&t.length>0?t[0].columns:null;yt(this.eventSvc,c,o,i)}return}const n=[],r=[];t.forEach(c=>{const{width:u,columns:h,ratios:g}=c,p={},f={};h.forEach(w=>r.push(w));let C=!0,m=0;for(;C;){if(m++,m>1e3){U(31);break}C=!1;const w=[];let b=0,v=u;h.forEach((D,I)=>{if(f[D.getId()])v-=p[D.getId()];else{w.push(D);const F=g[I];b+=F}});const S=1/b;w.forEach((D,I)=>{const O=I===w.length-1;let F;O?F=v:(F=Math.round(g[I]*u*S),v-=F);const P=D.getMinWidth(),T=D.getMaxWidth();F<P?(F=P,f[D.getId()]=!0,C=!0):T>0&&F>T&&(F=T,f[D.getId()]=!0,C=!0),p[D.getId()]=F})}h.forEach(w=>{const b=p[w.getId()];w.getActualWidth()!==b&&(w.setActualWidth(b,i),n.push(w))})});const l=n.length>0;let a=[];if(l){const{colFlex:c,visibleCols:u,colViewport:h}=this.beans;a=(c==null?void 0:c.refreshFlexedColumns({resizingCols:r,skipSetLeft:!0}))??[],u.setLeftValues(i),u.updateBodyWidths(),h.checkViewportColumns()}const d=r.concat(a);(l||o)&&yt(this.eventSvc,d,o,i,a)}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 If(e,t,o,i,s)}createGroupResizeFeature(e,t,o,i){return new Tf(e,t,o,i)}};function Mf(e){const{columns:t,width:o}=e;let i=0,s=0,n=!0;t.forEach(a=>{const d=a.getMinWidth();i+=d||0;const c=a.getMaxWidth();c>0?s+=c:n=!1});const r=o>=i,l=!n||o<=s;return r&&l}var kf={moduleName:"ColumnResize",version:G,beans:[Af],apiFunctions:{setColumnWidths:Pf},dependsOn:[sf,Ol]},Lf=class extends x{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.toggleCss("ag-hidden",e===0)}},Gf=class extends pl{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:l,colNames:a,colHover:d,rangeSvc:c,colResize:u}=r;this.comp=e,s=Ko(this,l,s),this.setGui(t,s),this.displayName=a.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 h=this.rowCtrl.pinned,g=n.getProvidedColumnGroup().getLeafColumns();d==null||d.createHoverFeature(s,g,t),c==null||c.createRangeHighlightFeature(s,n,e),s.createManagedBean(new hl(n,t,r)),s.createManagedBean(new Lf(e,n)),u?this.resizeFeature=s.createManagedBean(u.createGroupResizeFeature(e,o,h,n)):e.setResizableDisplayed(!1),s.createManagedBean(new ri(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 _(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=$(t)===e;if(!o&&!i)return;const s=e.getHighlighted(),n=!!this.rowCtrl.getHeaderCellCtrls().find(a=>a.column.isMoving());let r=!1,l=!1;if(n){const a=this.beans.gos.get("enableRtl"),d=s===1,c=s===0;o&&(a?l=d:r=c),i&&(a?r=c:l=d)}this.comp.toggleCss("ag-header-highlight-before",r),this.comp.toggleCss("ag-header-highlight-after",l)}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){var t;(t=this.resizeFeature)==null||t.resizeLeafColumnsToFit(e)}setupUserComp(){const{colGroupSvc:e,userCompFactory:t,gos:o,enterpriseMenuFactory:i}=this.beans,s=this.column,n=s.getProvidedColumnGroup(),r=_(o,{displayName:this.displayName,columnGroup:s,setExpanded:a=>{e.setColumnGroupOpened(n,a,"gridInitializing")},setTooltip:(a,d)=>{o.assertModuleRegistered("Tooltip",3),this.setupTooltip(a,d)},showColumnMenu:(a,d)=>i==null?void 0:i.showMenuAfterButtonClick(n,a,"columnMenu",d),showColumnMenuAfterMouseClick:(a,d)=>i==null?void 0:i.showMenuAfterMouseEvent(n,a,"columnMenu",d),eGridHeader:this.eGui}),l=Pu(t,r);l&&this.comp.setUserCompDetails(l)}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){var o;this.tooltipFeature=(o=this.beans.tooltipSvc)==null?void 0:o.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=$r(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!=null&&t.wrapHeaderText&&o.push("ag-header-cell-wrap-text")),o.forEach(i=>this.comp.toggleCss(i,!0))}setupMovingCss(e){const{column:t}=this,i=t.getProvidedColumnGroup().getLeafColumns(),s=()=>this.comp.toggleCss("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===y.ENTER){const o=this.column,i=!o.isExpanded();this.beans.colGroupSvc.setColumnGroupOpened(o.getProvidedColumnGroup(),i,"uiColumnExpanded")}}setDragSource(e){var t;!this.isAlive()||this.isSuppressMoving()||(this.removeDragSource(),e&&(this.dragSource=((t=this.beans.colMoves)==null?void 0:t.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 Hf(e,t,o){var i;(i=e.colGroupSvc)==null||i.setColumnGroupOpened(t,o,"api")}function Of(e,t,o){var i;return((i=e.colGroupSvc)==null?void 0:i.getColumnGroup(t,o))??null}function Bf(e,t){var o;return((o=e.colGroupSvc)==null?void 0:o.getProvidedColGroup(t))??null}function Vf(e,t,o){return e.colNames.getDisplayNameForColumnGroup(t,o)||""}function Nf(e){var t;return((t=e.colGroupSvc)==null?void 0:t.getColumnGroupState())??[]}function _f(e,t){var o;(o=e.colGroupSvc)==null||o.setColumnGroupState(t,"api")}function Wf(e){var t;(t=e.colGroupSvc)==null||t.resetColumnGroupState("api")}function zf(e){return e.visibleCols.treeLeft}function $f(e){return e.visibleCols.treeCenter}function Uf(e){return e.visibleCols.treeRight}function Kf(e){return e.visibleCols.getAllTrees()}function jf(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 qf=class extends x{constructor(){super(...arguments),this.beanName="visibleCols",this.colsAndGroupsMap={},this.leftCols=[],this.rightCols=[],this.centerCols=[],this.allCols=[],this.headerGroupRowCount=0,this.bodyWidth=0,this.leftWidth=0,this.rightWidth=0,this.isBodyWidthDirty=!0}refresh(e,t=!1){const{colFlex:o,colModel:i,colGroupSvc:s,colViewport:n,selectionColSvc:r}=this.beans;t||this.buildTrees(i,s),s==null||s.updateOpenClosedVisibility(),this.leftCols=js(this.treeLeft),this.centerCols=js(this.treeCenter),this.rightCols=js(this.treeRight),r==null||r.refreshVisibility(this.leftCols,this.centerCols,this.rightCols),this.joinColsAriaOrder(i),this.joinCols(),this.headerGroupRowCount=this.getHeaderRowCount(),this.setLeftValues(e),this.autoHeightCols=this.allCols.filter(l=>l.isAutoHeight()),o==null||o.refreshFlexedColumns(),this.updateBodyWidths(),this.setFirstRightAndLastLeftPinned(i,this.leftCols,this.rightCols,e),n.checkViewportColumns(!1),this.eventSvc.dispatchEvent({type:"displayedColumnsChanged",source:e})}getHeaderRowCount(){if(!this.gos.get("hidePaddedHeaderRows"))return this.beans.colModel.cols.treeDepth;let e=0;for(const t of this.allCols){let o=t.getParent();for(;o;){if(!o.isPadding()){const i=o.getProvidedColumnGroup().getLevel()+1;i>e&&(e=i);break}o=o.getParent()}}return e}updateBodyWidths(){const e=Le(this.centerCols),t=Le(this.leftCols),o=Le(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?$(o):null):(s=t?$(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(a=>a.getPinned()=="left"),s=o.filter(a=>a.getPinned()=="right"),n=o.filter(a=>a.getPinned()!="left"&&a.getPinned()!="right"),r=new nu,l=a=>t?t.createColumnGroups(a):a.columns;this.treeLeft=l({columns:i,idCreator:r,pinned:"left",oldDisplayedGroups:this.treeLeft}),this.treeRight=l({columns:s,idCreator:r,pinned:"right",oldDisplayedGroups:this.treeRight}),this.treeCenter=l({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 Q(e)?t=e.getLeafColumns()[0]:t=e,this.ariaOrderColumns.indexOf(t)+1}setLeftValuesOfGroups(){[this.treeLeft,this.treeRight,this.treeCenter].forEach(e=>{e.forEach(t=>{Q(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=Le(n);n.forEach(l=>{r-=l.getActualWidth(),l.setLeft(r,e)})}else{let r=0;n.forEach(l=>{l.setLeft(r,e),r+=l.getActualWidth()})}jf(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 l=t[r],a=t.length-r,d=Math.min(l.getColSpan(e),a),c=[l];if(d>1){const h=d-1;for(let g=1;g<=h;g++)c.push(t[r+g]);r+=h}let u;o?(u=!1,c.forEach(h=>{o(h)&&(u=!0)})):u=!0,u&&(s.length===0&&n&&(i&&i(l))&&s.push(n),s.push(l)),n=l}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};at(this.treeCenter,!1,e),at(this.treeLeft,!1,e),at(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?$(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 Le(this.leftCols)}getDisplayedColumnsRightWidth(){return Le(this.rightCols)}isColAtEdge(e,t){const o=this.allCols;if(!o.length)return!1;const i=t==="first";let s;if(Q(e)){const n=e.getDisplayedLeafColumns();if(!n.length)return!1;s=i?n[0]:$(n)}else s=e;return(i?o[0]:$(o))===s}};function at(e,t,o){if(e)for(let i=0;i<e.length;i++){const s=e[i];if(Q(s)){const n=t?s.getDisplayedChildren():s.getChildren();at(n,t,o)}o(s)}}function js(e){const t=[];return at(e,!0,o=>{et(o)&&t.push(o)}),t}var Yf=class extends x{constructor(){super(...arguments),this.beanName="colGroupSvc"}getColumnGroupState(){const e=[],t=this.beans.colModel.getColTree();return Ge(null,t,o=>{te(o)&&e.push({groupId:o.getGroupId(),open:o.isExpanded()})}),e}resetColumnGroupState(e){const t=this.beans.colModel.getColDefColTree();if(!t)return;const o=[];Ge(null,t,i=>{if(te(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==null||i.start();const l=[];e.forEach(a=>{const d=a.groupId,c=a.open,u=this.getProvidedColGroup(d);u&&u.isExpanded()!==c&&(u.setExpanded(c),l.push(u))}),s.refresh(t,!0),l.length&&n.dispatchEvent({type:"columnGroupOpened",columnGroup:l.length===1?l[0]:void 0,columnGroups:l}),i==null||i.finish()}setColumnGroupOpened(e,t,o){let i;te(e)?i=e.getId():i=e||"",this.setColumnGroupState([{groupId:i,open:t}],o)}getProvidedColGroup(e){let t=null;return Ge(null,this.beans.colModel.getColTree(),o=>{te(o)&&o.getId()===e&&(t=o)}),t}getGroupAtDirection(e,t){const o=e.getProvidedColumnGroup().getLevel()+e.getPaddingLevel(),i=e.getDisplayedLeafColumns(),s=t==="After"?$(i):i[0],n=`getCol${t}`;for(;;){const r=this.beans.visibleCols[n](s);if(!r)return null;const l=this.getColGroupAtLevel(r,o);if(l!==e)return l}}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();at(e,!1,t=>{Q(t)&&t.calculateDisplayedColumns()})}getColumnGroup(e,t){if(!e)return null;if(Q(e))return e;const o=this.beans.visibleCols.getAllTrees(),i=typeof t=="number";let s=null;return at(o,!1,n=>{if(Q(n)){const r=n;let l;i?l=e===r.getGroupId()&&t===r.getPartId():l=e===r.getGroupId(),l&&(s=r)}}),s}createColumnGroups(e){const{columns:t,idCreator:o,pinned:i,oldDisplayedGroups:s,isStandaloneStructure:n}=e,r=this.mapOldGroupsById(s),l=[];let a=t;for(;a.length;){const d=a;a=[];let c=0;const u=h=>{const g=c;c=h;const p=d[g],C=(Q(p)?p.getProvidedColumnGroup():p).getOriginalParent();if(C==null){for(let w=g;w<h;w++)l.push(d[w]);return}const m=this.createColumnGroup(C,o,r,i,n);for(let w=g;w<h;w++)m.addChild(d[w]);a.push(m)};for(let h=1;h<d.length;h++){const g=d[h],f=(Q(g)?g.getProvidedColumnGroup():g).getOriginalParent(),C=d[c],w=(Q(C)?C.getProvidedColumnGroup():C).getOriginalParent();f!==w&&u(h)}c<d.length&&u(d.length)}return n||this.setupParentsIntoCols(l,null),l}createProvidedColumnGroup(e,t,o,i,s,n,r){const l=s.getUniqueKey(t.groupId||null,null),a=ur(this.beans,t,l),d=new No(a,l,!1,o);this.createBean(d);const c=this.findExistingGroup(t,n);c&&n.splice(c.idx,1);const u=c==null?void 0:c.group;u&&d.setExpanded(u.isExpanded());const h=vr(this.beans,a.children,o+1,e,i,s,n,r);return d.setChildren(h),d}balanceColumnTree(e,t,o,i){const s=[];for(let n=0;n<e.length;n++){const r=e[n];if(te(r)){const l=r,a=this.balanceColumnTree(l.getChildren(),t+1,o,i);l.setChildren(a),s.push(l)}else{let l,a;for(let d=t;d<o;d++){const c=i.getUniqueKey(null,null),u=ur(this.beans,null,c),h=new No(u,c,!0,d);this.createBean(h),a&&a.setChildren([h]),a=h,l||(l=a)}if(l&&a)if(s.push(l),e.some(c=>te(c))){a.setChildren([r]);continue}else{a.setChildren(e);break}s.push(r)}}return s}findDepth(e){let t=0,o=e;for(;o&&o[0]&&te(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(te(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 No(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}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),l=Xr(n,r);let a=o[l];return a&&a.getProvidedColumnGroup()!==e&&(a=null),M(a)?a.reset():(a=new io(e,n,r,i),s||this.createBean(a)),a}mapOldGroupsById(e){const t={},o=i=>{i.forEach(s=>{if(Q(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&&(this.beans.colViewport.colsWithinViewportHash=""),o.parent=t,Q(o)){const i=o;this.setupParentsIntoCols(i.getChildren(),i)}})}},Zf={moduleName:"ColumnGroup",version:G,dynamicBeans:{headerGroupCellCtrl:Gf},beans:[Yf],apiFunctions:{getAllDisplayedColumnGroups:Kf,getCenterDisplayedColumnGroups:$f,getColumnGroup:Of,getColumnGroupState:Nf,getDisplayNameForColumnGroup:Vf,getLeftDisplayedColumnGroups:zf,getProvidedColumnGroup:Bf,getRightDisplayedColumnGroups:Uf,resetColumnGroupState:Wf,setColumnGroupOpened:Hf,setColumnGroupState:_f}},Qf={tag:"div",cls:"ag-skeleton-container"},Xf=class extends j{constructor(){super(Qf)}init(e){const t=`ag-cell-skeleton-renderer-${this.getCompId()}`;this.getGui().setAttribute("id",t),this.addDestroyFunc(()=>$t(e.eParentOfValue)),$t(e.eParentOfValue,t),e.deferRender?this.setupLoading(e):e.node.failedLoad?this.setupFailed():this.setupLoading(e)}setupFailed(){const e=this.getLocaleTextFunc();this.getGui().textContent=e("loadingError","ERR");const t=e("ariaSkeletonCellLoadingFailed","Row failed to load");zt(this.getGui(),t)}setupLoading(e){const t=X({tag:"div",cls:"ag-skeleton-effect"}),o=e.node.rowIndex;if(o!=null){const n=75+25*(o%2===0?Math.sin(o):Math.cos(o));t.style.width=`${n}%`}this.getGui().appendChild(t);const i=this.getLocaleTextFunc(),s=e.deferRender?i("ariaDeferSkeletonCellLoading","Cell is loading"):i("ariaSkeletonCellLoading","Row data is loading");zt(this.getGui(),s)}refresh(e){return!1}},Jf={moduleName:"CheckboxCellRenderer",version:G,userComponents:{agCheckboxCellRenderer:Jg}},eC={moduleName:"SkeletonCellRenderer",version:G,userComponents:{agSkeletonCellRenderer:Xf}};function tC(e,t){const o=e.colModel.getColDefCol(t);return o?o.getColDef():null}function oC(e){return e.colModel.getColumnDefs()}function iC(e,t,o){return e.colNames.getDisplayNameForColumn(t,o)||""}function sC(e,t){return e.colModel.getColDefCol(t)}function nC(e){return e.colModel.getColDefCols()}function rC(e,t){return ve(e,t,"api")}function lC(e){return Uo(e)}function aC(e){eu(e,"api")}function dC(e){return e.visibleCols.isPinningLeft()||e.visibleCols.isPinningRight()}function cC(e){return e.visibleCols.isPinningLeft()}function uC(e){return e.visibleCols.isPinningRight()}function hC(e,t){return e.visibleCols.getColAfter(t)}function gC(e,t){return e.visibleCols.getColBefore(t)}function pC(e,t,o){e.colModel.setColsVisible(t,o,"api")}function fC(e,t,o){var i;(i=e.pinnedCols)==null||i.setColsPinned(t,o,"api")}function CC(e){return e.colModel.getCols()}function mC(e){return e.visibleCols.leftCols}function wC(e){return e.visibleCols.centerCols}function vC(e){return e.visibleCols.rightCols}function bC(e){return e.visibleCols.allCols}function SC(e){return e.colViewport.getViewportColumns()}function qs(e,t){if(!e)return;const o=e,i={};return Object.keys(o).forEach(s=>{if(t&&t.indexOf(s)>=0||Sn.has(s))return;const n=o[s];typeof n=="object"&&n!==null&&n.constructor===Object?i[s]=qs(n):i[s]=n}),i}var yC=class extends x{constructor(){super(...arguments),this.beanName="colDefFactory"}wireBeans(e){this.rowGroupColsSvc=e.rowGroupColsSvc,this.pivotColsSvc=e.pivotColsSvc}getColumnDefs(e,t,o,i){var l,a;const s=e.slice();t?s.sort((d,c)=>o.indexOf(d)-o.indexOf(c)):o&&s.sort((d,c)=>i.indexOf(d)-i.indexOf(c));const n=(l=this.rowGroupColsSvc)==null?void 0:l.columns,r=(a=this.pivotColsSvc)==null?void 0:a.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 l=!0,a=r,d=n.getOriginalParent(),c=null;for(;d;){let u=null;if(d.isPadding()){d=d.getOriginalParent();continue}const h=s[d.getGroupId()];if(h){h.children.push(a),l=!1;break}if(u=this.createDefFromGroup(d),u&&(u.children=[a],s[u.groupId]=u,a=u,d=d.getOriginalParent()),d!=null&&c===d){l=!1;break}c=d}l&&i.push(a)}),i}createDefFromGroup(e){const t=qs(e.getColGroupDef(),["children"]);return t&&(t.groupId=e.getGroupId()),t}createDefFromColumn(e,t,o){const i=qs(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}},RC=class extends x{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 p=new Set(e.resizingCols);for(let f=s.length-1;f>=0;f--)if(p.has(s[f])){n=f;break}}let r=!1;const l=s.map((p,f)=>{const C=p.getFlex(),m=C!=null&&C>0&&f>n;return r||(r=m),{col:p,isFlex:m,flex:Math.max(0,C??0),initialSize:p.getActualWidth(),min:p.getMinWidth(),max:p.getMaxWidth(),targetSize:0}});if(!r)return[];let a=l.length,d=l.reduce((p,f)=>p+f.flex,0),c=o;const u=(p,f)=>{p.frozenSize=f,p.col.setActualWidth(f,t),c-=f,d-=p.flex,a-=1},h=p=>p.frozenSize!=null;for(const p of l)p.isFlex||u(p,p.initialSize);for(;a>0;){const p=Math.round(d<1?c*d:c);let f,C=0,m=0;for(const v of l){if(h(v))continue;f=v,m+=p*(v.flex/d);const S=m-C,D=Math.round(S);v.targetSize=D,C+=D}f&&(f.targetSize+=p-C);let w=0;for(const v of l){if(h(v))continue;const S=v.targetSize,D=Math.min(Math.max(S,v.min),v.max);w+=D-S,v.violationType=D===S?void 0:D<S?"max":"min",v.targetSize=D}const b=w===0?"all":w>0?"min":"max";for(const v of l)h(v)||(b==="all"||v.violationType===b)&&u(v,v.targetSize)}e.skipSetLeft||i.setLeftValues(t),e.updateBodyWidths&&i.updateBodyWidths();const g=l.filter(p=>p.isFlex&&!p.violationType).map(p=>p.col);if(e.fireResizedEvent){const p=l.filter(C=>C.initialSize!==C.frozenSize).map(C=>C.col),f=l.filter(C=>C.flex).map(C=>C.col);yt(this.eventSvc,p,!0,t,f)}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")}},EC=["dateTimeString","dateString","text","number","boolean","date"],xC=class extends x{constructor(){super(...arguments),this.beanName="dataTypeSvc",this.dataTypeDefinitions={},this.isPendingInference=!1,this.isColumnTypeOverrideInDataTypeDefinitions=!1,this.columnStateUpdatesPendingInference={},this.columnStateUpdateListenerDestroyFuncs=[],this.columnDefinitionPropsPerDataType={number(){return{cellEditor:"agNumberCellEditor"}},boolean(){return{cellEditor:"agCheckboxCellEditor",cellRenderer:"agCheckboxCellRenderer",getFindText:()=>null,suppressKeyboardEvent:e=>!!e.colDef.editable&&e.event.key===y.SPACE}},date({formatValue:e}){return{cellEditor:"agDateCellEditor",keyCreator:e}},dateString({formatValue:e}){return{cellEditor:"agDateStringCellEditor",keyCreator:e}},dateTime(e){return this.date(e)},dateTimeString(e){return this.dateString(e)},object({formatValue:e,colModel:t,colId:o}){return{cellEditorParams:{useFormatter:!0},comparator:(i,s)=>{const n=t.getColDefCol(o),r=n==null?void 0:n.getColDef();if(!n||!r)return 0;const l=i==null?"":e({column:n,node:null,value:i}),a=s==null?"":e({column:n,node:null,value:s});return l===a?0:l>a?1:-1},keyCreator:e}},text(){return{}}}}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={},o={},i=c=>u=>{const{column:h,node:g,value:p}=u;let f=h.getColDef().valueFormatter;return f===c.groupSafeValueFormatter&&(f=c.valueFormatter),this.beans.valueSvc.formatValue(h,g,p,f)};for(const c of Object.keys(e)){const u=e[c],h={...u,groupSafeValueFormatter:Nl(u,this.gos)};t[c]=h,o[c]=i(h)}const s=this.gos.get("dataTypeDefinitions")??{},n={};for(const c of Object.keys(s)){const u=s[c],h=this.processDataTypeDefinition(u,s,[c],e);h&&(t[c]=h,u.dataTypeMatcher&&(n[c]=u.dataTypeMatcher),o[c]=i(h))}const{valueParser:r,valueFormatter:l}=e.object,{valueParser:a,valueFormatter:d}=t.object;this.hasObjectValueParser=a!==r,this.hasObjectValueFormatter=d!==l,this.formatValueFuncs=o,this.dataTypeDefinitions=t,this.dataTypeMatchers=this.sortKeysInMatchers(n,e)}sortKeysInMatchers(e,t){const o={...e};for(const i of EC)delete o[i],o[i]=e[i]??t[i].dataTypeMatcher;return o}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 l=t[n];if(r&&l&&(r=l),!Vl(e,r,n))return;s=Bl(r,e)}else{if(o.includes(n)){k(44);return}const r=t[n];if(!Vl(e,r,n))return;const l=this.processDataTypeDefinition(r,t,[...o,n],i);if(!l)return;s=Bl(l,e)}return{...s,groupSafeValueFormatter:Nl(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){k(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(!oe(o))return!1;const i={cellRenderer:!0,valueGetter:!0,valueParser:!0,refData:!0};if(Ys(t,i))return!1;const s=t.type===null?e.type:t.type;if(s){const n=o.get("columnTypes")??{};if($o(s).some(l=>{const a=n[l.trim()];return a&&Ys(a,i)}))return!1}return!Ys(e,i)}inferCellDataType(e,t){if(!e)return;let o;const i=this.getInitialData();if(i){const n=e.indexOf(".")>=0&&!this.gos.get("suppressFieldDotNotation");o=Wt(i,e,n)}else this.initWaitForRowData(t);return o==null?void 0:Object.keys(this.dataTypeMatchers).find(n=>this.dataTypeMatchers[n](o))??"object"}getInitialData(){var t;const e=this.gos.get("rowData");if(e!=null&&e.length)return e[0];if(this.initialData)return this.initialData;{const o=(t=this.beans.rowModel.rootNode)==null?void 0:t.allLeafChildren;if(o!=null&&o.length)return o[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==null||s(),this.isPendingInference=!1,this.processColumnsPendingInference(r,t),this.columnStateUpdatesPendingInference={},t&&(o==null||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],l=this.colModel.getCol(n);if(!l)return;const a=l.getColDef();if(!this.resetColDefIntoCol(l,"cellDataTypeInferred"))return;const d=l.getColDef();if(t&&d.type&&d.type!==a.type){const c=FC(l,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&&ve(this.beans,{state:o},"cellDataTypeInferred"),this.initialData=null}generateColumnStateForRowGroupAndPivotIndexes(e,t){const o={},{rowGroupColsSvc:i,pivotColsSvc:s}=this.beans;return i==null||i.restoreColumnOrder(o,e),s==null||s.restoreColumnOrder(o,t),Object.values(o)}resetColDefIntoCol(e,t){const o=e.getUserProvidedColDef();if(!o)return!1;const i=as(this.beans,o,e.getColId());return e.setColDef(i,o,t),!0}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}getDateIncludesTimeFlag(e){return e==="dateTime"||e==="dateTimeString"}getDataTypeDefinition(e){const t=e.getColDef();if(t.cellDataType)return this.dataTypeDefinitions[t.cellDataType]}getBaseDataType(e){var t;return(t=this.getDataTypeDefinition(e))==null?void 0:t.baseDataType}checkType(e,t){var i;if(t==null)return!0;const o=(i=this.getDataTypeDefinition(e))==null?void 0:i.dataTypeMatcher;return o?o(t):!0}validateColDef(e){const t=o=>k(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")}}postProcess(e){var r;const t=e.cellDataType;if(!t||typeof t!="string")return;const{dataTypeDefinitions:o,beans:i,formatValueFuncs:s}=this,n=o[t];(r=i.colFilter)==null||r.setColDefPropsForDataType(e,n,s[t])}getFormatValue(e){return this.formatValueFuncs[e]}isColPendingInference(e){return this.isPendingInference&&!!this.columnStateUpdatesPendingInference[e]}setColDefPropertiesForBaseDataType(e,t,o,i){const s=this.formatValueFuncs[t],n=this.columnDefinitionPropsPerDataType[o.baseDataType]({colDef:e,cellDataType:t,colModel:this.colModel,dataTypeDefinition:o,colId:i,formatValue:s});Object.assign(e,n)}getDateObjectTypeDef(e){const t=this.getLocaleTextFunc(),o=this.getDateIncludesTimeFlag(e);return{baseDataType:e,valueParser:i=>no(i.newValue&&String(i.newValue)),valueFormatter:i=>i.value==null?"":!(i.value instanceof Date)||isNaN(i.value.getTime())?t("invalidDate","Invalid Date"):$e(i.value,o)??"",dataTypeMatcher:i=>i instanceof Date}}getDateStringTypeDef(e){const t=this.getDateIncludesTimeFlag(e);return{baseDataType:e,dateParser:o=>no(o)??void 0,dateFormatter:o=>$e(o??null,t)??void 0,valueParser:o=>ni(String(o.newValue))?o.newValue:null,valueFormatter:o=>ni(String(o.value))?String(o.value):"",dataTypeMatcher:o=>typeof o=="string"&&ni(o)}}getDefaultDataTypes(){const e=this.getLocaleTextFunc();return{number:{baseDataType:"number",valueParser:t=>{var o,i;return((i=(o=t.newValue)==null?void 0:o.trim)==null?void 0:i.call(o))===""?null:Number(t.newValue)},valueFormatter:t=>t.value==null?"":typeof t.value!="number"||isNaN(t.value)?e("invalidNumber","Invalid Number"):String(t.value),dataTypeMatcher:t=>typeof t=="number"},text:{baseDataType:"text",valueParser:t=>t.newValue===""?null:Mi(t.newValue),dataTypeMatcher:t=>typeof t=="string"},boolean:{baseDataType:"boolean",valueParser:t=>{var o,i;return t.newValue==null?t.newValue:((i=(o=t.newValue)==null?void 0:o.trim)==null?void 0:i.call(o))===""?null:String(t.newValue).toLowerCase()==="true"},valueFormatter:t=>t.value==null?"":String(t.value),dataTypeMatcher:t=>typeof t=="boolean"},date:this.getDateObjectTypeDef("date"),dateString:this.getDateStringTypeDef("dateString"),dateTime:this.getDateObjectTypeDef("dateTime"),dateTimeString:{...this.getDateStringTypeDef("dateTimeString"),dataTypeMatcher:t=>typeof t=="string"&&zh(t)},object:{baseDataType:"object",valueParser:()=>null,valueFormatter:t=>Mi(t.value)??""}}}destroyColumnStateUpdateListeners(){this.columnStateUpdateListenerDestroyFuncs.forEach(e=>e()),this.columnStateUpdateListenerDestroyFuncs=[]}destroy(){this.dataTypeDefinitions={},this.dataTypeMatchers={},this.formatValueFuncs={},this.columnStateUpdatesPendingInference={},this.destroyColumnStateUpdateListeners(),super.destroy()}};function Bl(e,t){const o={...e,...t};return e.columnTypes&&t.columnTypes&&t.appendColumnTypes&&(o.columnTypes=[...$o(e.columnTypes),...$o(t.columnTypes)]),o}function Vl(e,t,o){return t?t.baseDataType!==e.baseDataType?(k(46),!1):!0:(k(45,{parentCellDataType:o}),!1)}function Nl(e,t){if(e.valueFormatter)return o=>{var i,s;if((i=o.node)!=null&&i.group){const n=(o.colDef.pivotValueColumn??o.column).getAggFunc();if(n){if(n==="first"||n==="last")return e.valueFormatter(o);if(e.baseDataType==="number"&&n!=="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}}else if(t.get("groupHideOpenParents")&&o.column.isRowGroupActive()&&typeof o.value=="string"&&!((s=e.dataTypeMatcher)!=null&&s.call(e,o.value)))return;return e.valueFormatter(o)}}function DC(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 Ys(e,t){return[["cellRenderer","agSparklineCellRenderer"],["valueGetter",void 0],["valueParser",void 0],["refData",void 0]].some(([o,i])=>DC(e,t,o,i))}function FC(e,t){const o=Dr(e);return t.forEach(i=>{delete o[i],i==="rowGroup"?delete o.rowGroupIndex:i==="pivot"&&delete o.pivotIndex}),o}var PC={moduleName:"DataType",version:G,beans:[xC],dependsOn:[Jf]},TC={moduleName:"ColumnFlex",version:G,beans:[RC]},_l={moduleName:"ColumnApi",version:G,beans:[yC],apiFunctions:{getColumnDef:tC,getDisplayNameForColumn:iC,getColumn:sC,getColumns:nC,applyColumnState:rC,getColumnState:lC,resetColumnState:aC,isPinning:dC,isPinningLeft:cC,isPinningRight:uC,getDisplayedColAfter:hC,getDisplayedColBefore:gC,setColumnsVisible:pC,setColumnsPinned:fC,getAllGridColumns:CC,getDisplayedLeftColumns:mC,getDisplayedCenterColumns:wC,getDisplayedRightColumns:vC,getAllDisplayedColumns:bC,getAllDisplayedVirtualColumns:SC,getColumnDefs:oC}};function IC(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 AC=class extends x{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==null?void 0: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){var r;const n=e.headerValueGetter;if(n){const l=_(this.gos,{colDef:e,column:t,columnGroup:o,providedColumnGroup:i,location:s});return typeof n=="function"?n(l):typeof n=="string"?((r=this.beans.expressionSvc)==null?void 0:r.evaluate(n,l))??null:""}else{if(e.headerName!=null)return e.headerName;if(e.field)return IC(e.field)}return""}},MC=class extends x{constructor(){super(...arguments),this.beanName="colViewport",this.colsWithinViewport=[],this.headerColsWithinViewport=[],this.colsWithinViewportHash="",this.rowsOfHeadersToRenderLeft={},this.rowsOfHeadersToRenderRight={},this.rowsOfHeadersToRenderCenter={},this.columnsToRenderLeft=[],this.columnsToRenderRight=[],this.columnsToRenderCenter=[]}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)}}getColumnHeadersToRender(e){switch(e){case"left":return this.columnsToRenderLeft;case"right":return this.columnsToRenderRight;default:return this.columnsToRenderCenter}}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(){this.rowsOfHeadersToRenderLeft={},this.rowsOfHeadersToRenderRight={},this.rowsOfHeadersToRenderCenter={},this.colsWithinViewportHash=""}isColumnInHeaderViewport(e){return e.isAutoHeaderHeight()||kC(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 M(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(){const{leftCols:e,rightCols:t}=this.visibleCols;this.columnsToRenderLeft=e,this.columnsToRenderRight=t,this.columnsToRenderCenter=this.colsWithinViewport;const o=i=>{const s=new Set,n={};for(const r of i){let l=r.getParent();const a=r.isSpanHeaderHeight();for(;l&&!s.has(l);){if(a&&l.isPadding()){l=l.getParent();continue}const c=l.getProvidedColumnGroup().getLevel();n[c]??(n[c]=[]),n[c].push(l),s.add(l),l=l.getParent()}}return n};this.rowsOfHeadersToRenderLeft=o(e),this.rowsOfHeadersToRenderRight=o(t),this.rowsOfHeadersToRenderCenter=o(this.headerColsWithinViewport)}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 kC(e){for(;e;){if(e.isAutoHeaderHeight())return!0;e=e.getParent()}return!1}var LC=class extends x{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=qi("<span>"+n+"</span>");return}if(n==null){this.eGui=X({tag:"span"});return}this.eGui=n}}return o}},GC={moduleName:"CellRendererFunction",version:G,beans:[LC]},HC=class extends x{constructor(){super(...arguments),this.beanName="registry",this.agGridDefaults={},this.agGridDefaultOverrides={},this.jsComps={},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,l,a,d)=>{this.agGridDefaults[r]=l,(a||d)&&(this.agGridDefaultOverrides[r]={params:a,processParams:d})};for(const r of Object.keys(o)){let l=o[r];if(ju(l)&&(l=l.getComp(this.beans)),typeof l=="object"){const{classImp:a,params:d,processParams:c}=l;n(r,a,d,c)}else n(r,l)}}if(i){this.dynamicBeans??(this.dynamicBeans={});for(const n of Object.keys(i))this.dynamicBeans[n]=i[n]}if(s==null||s.forEach(n=>{this.selectors[n.selector]=n}),t)for(const n of Object.keys(t))this.icons[n]=t[n]}getUserComponent(e,t){var l;const o=(a,d,c,u)=>({componentFromFramework:d,component:a,params:c,processParams:u}),{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];if(r){const a=this.agGridDefaultOverrides[t];return o(r,!1,a==null?void 0:a.params,a==null?void 0:a.processParams)}return(l=this.beans.validation)==null||l.missingUserComponent(e,t,this.agGridDefaults,this.jsComps),null}createDynamicBean(e,t,...o){var s;if(!this.dynamicBeans)throw new Error(ye(279,{name:e}));const i=this.dynamicBeans[e];if(i==null){if(t)throw new Error(((s=this.beans.validation)==null?void 0:s.missingDynamicBean(e))??ye(256));return}return new i(...o)}getSelector(e){return this.selectors[e]}getIcon(e){return this.icons[e]}},OC=23,BC=class extends x{constructor(){super(...arguments),this.beanName="ctrlsSvc",this.params={},this.ready=!1,this.readyCallbacks=[]}postConstruct(){var e,t;this.addEventListener("ready",()=>{this.updateReady(),this.ready&&(this.readyCallbacks.forEach(o=>o(this.params)),this.readyCallbacks.length=0)},((t=(e=this.beans.frameworkOverrides).runWhenReadyAsync)==null?void 0:t.call(e))??!1)}updateReady(){const e=Object.values(this.params);this.ready=e.length===OC&&e.every(t=>(t==null?void 0: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}},VC=':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(.invalid){box-shadow:inset var(--ag-focus-error-shadow)}}&:where(button){color:inherit}}: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-animation.ag-prevent-animation) .ag-row{transition:none!important;&:where(.ag-row.ag-after-created){transition:none!important}}: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{display:flex;overflow:hidden;position:relative;white-space:nowrap;width:100%}:where(.ag-floating-top:not(.ag-invisible)){border-bottom:var(--ag-pinned-row-border)}.ag-floating-bottom{display:flex;overflow:hidden;position:relative;white-space:nowrap;width:100%}:where(.ag-floating-bottom:not(.ag-invisible)){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%;&.ag-row-editing-invalid{background-color:var(--ag-full-row-edit-invalid-background-color)}}: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,.ag-row-highlight-inside:after{background-color:var(--ag-range-selection-border-color);content:"";height:1px;pointer-events:none;position:absolute;width:calc(100% - 1px)}:where(.ag-ltr) .ag-row-highlight-above:after,:where(.ag-ltr) .ag-row-highlight-below:after,:where(.ag-ltr) .ag-row-highlight-inside:after{left:1px}:where(.ag-rtl) .ag-row-highlight-above:after,:where(.ag-rtl) .ag-row-highlight-below:after,:where(.ag-rtl) .ag-row-highlight-inside:after{right:1px}.ag-row-highlight-above:after{top:0}.ag-row-highlight-below:after{bottom:0}.ag-row-highlight-indent:after{display:block;width:auto}:where(.ag-ltr) .ag-row-highlight-indent:after{left:calc((var(--ag-cell-widget-spacing) + var(--ag-icon-size))*2 + var(--ag-cell-horizontal-padding) + var(--ag-row-highlight-level)*var(--ag-row-group-indent-size));right:1px}:where(.ag-rtl) .ag-row-highlight-indent:after{left:1px;right:calc((var(--ag-cell-widget-spacing) + var(--ag-icon-size))*2 + var(--ag-cell-horizontal-padding) + var(--ag-row-highlight-level)*var(--ag-row-group-indent-size))}.ag-row-highlight-inside:after{background-color:var(--ag-selected-row-background-color);border:1px solid var(--ag-range-selection-border-color);display:block;height:auto;inset:0;width:auto}.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%{background-color:var(--ag-row-loading-skeleton-effect-color)}50%{background-color:color-mix(in srgb,transparent,var(--ag-row-loading-skeleton-effect-color) 40%)}to{background-color:var(--ag-row-loading-skeleton-effect-color)}}.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-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-drag-handle{color:var(--ag-drag-handle-color);cursor:grab;:where(.ag-icon){color:var(--ag-drag-handle-color)}}.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-icon-button-active-indicator-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}}',Zs=typeof window!="object"||!((Ed=(Rd=window==null?void 0:window.document)==null?void 0:Rd.fonts)!=null&&Ed.forEach),It=(e,t,o,i,s,n)=>{if(Zs)return;i&&(e=`@layer ${CSS.escape(i)} { ${e} }`);let r=At.map.get(t);if(r||(r=[],At.map.set(t,r)),r.find(c=>c.css===e))return;const l=document.createElement("style");n&&l.setAttribute("nonce",n),l.dataset.agGlobalCss=o,l.textContent=e;const a={css:e,el:l,priority:s};let d;for(const c of r){if(c.priority>s)break;d=c}if(d){d.el.insertAdjacentElement("afterend",l);const c=r.indexOf(d);r.splice(c+1,0,a)}else t.insertBefore(l,t.querySelector(":not(title, meta)")),r.push(a)},Wl=(e,t,o)=>{It(VC,e,"core",t,0,o),Array.from(Wu()).sort((i,s)=>i.moduleName.localeCompare(s.moduleName)).forEach(i=>{var s;return(s=i.css)==null?void 0:s.forEach(n=>It(n,e,`module-${i.moduleName}`,t,0,o))})},NC=e=>{At.grids.add(e)},_C=e=>{if(At.grids.delete(e),At.grids.size===0){At.map=new WeakMap;for(const t of document.head.querySelectorAll("style[data-ag-global-css]"))t.remove()}},zl,At=(zl=typeof window=="object"?window:{}).agStyleInjectionState??(zl.agStyleInjectionState={map:new WeakMap,grids:new Set}),xe=e=>new $l(e),Ke="$default",WC=0,$l=class{constructor({feature:e,params:t,modeParams:o={},css:i,cssImports:s}){this.feature=e,this.css=i,this.cssImports=s,this.modeParams={[Ke]:{...o[Ke]??{},...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"}-${++WC}`;typeof s=="function"&&(s=s()),s=`:where(.${n}) {
3
+ Alternatively register the ValidationModule to see the full message in the console.`}`};function k(...e){ts(qt,e[0],e[1])}function U(...e){ts(ft,e[0],e[1])}function Yt(e,t,o){ts(ft,e,t,o)}function pc(e,t){const o=t[0];return`error #${o} `+Zn(o,t[1],e).join(" ")}function ye(...e){return pc(void 0,e)}function Xn(e,t){return e.get("rowModelType")===t}function oe(e,t){return Xn(e,"clientSide")}function Mo(e,t){return Xn(e,"serverSide")}function ee(e,t){return e.get("domLayout")===t}function Qe(e){return Ho(e)!==void 0}function Jn(e){return typeof e.get("getRowHeight")=="function"}function fc(e,t){return t?!e.get("enableStrictPivotColumnOrder"):e.get("maintainColumnOrder")}function _e(e,t,o=!1,i){const{gos:s,environment:n}=e;if(i==null&&(i=n.getDefaultRowHeight()),Jn(s)){if(o)return{height:i,estimated:!0};const a={node:t,data:t.data},d=s.getCallback("getRowHeight")(a);if(ss(d))return d===0&&k(23),{height:Math.max(1,d),estimated:!1}}if(t.detail&&s.get("masterDetail"))return Cc(s);const r=s.get("rowHeight");return{height:r&&ss(r)?r:i,estimated:!1}}function Cc(e){if(e.get("detailRowAutoHeight"))return{height:1,estimated:!1};const t=e.get("detailRowHeight");return ss(t)?{height:t,estimated:!1}:{height:300,estimated:!1}}function is(e){const{environment:t,gos:o}=e,i=o.get("rowHeight");if(!i||K(i))return t.getDefaultRowHeight();const s=t.refreshRowHeightVariable();return s!==-1?s:(k(24),t.getDefaultRowHeight())}function ss(e){return!isNaN(e)&&typeof e=="number"&&isFinite(e)}function er(e,t,o){const i=t[e.getDomDataKey()];return i?i[o]:void 0}function Xe(e,t,o,i){const s=e.getDomDataKey();let n=t[s];K(n)&&(n={},t[s]=n),n[o]=i}function J(e){const{gos:t,eGridDiv:o}=e;let i=null;const s=t.get("getDocument");return s&&M(s)?i=s():o&&(i=o.ownerDocument),i&&M(i)?i:document}function tr(e){return J(e).defaultView||window}function Zt(e){return e.eGridDiv.getRootNode()}function Y(e){return Zt(e).activeElement}function ns(e){let t=null,o=null;try{t=J(e).fullscreenElement}catch{}finally{t||(t=Zt(e));const i=t.querySelector("body");i?o=i:t instanceof ShadowRoot?o=t:t instanceof Document?o=t==null?void 0:t.documentElement:o=t}return o}function mc(e){const t=ns(e);return(t==null?void 0:t.clientWidth)??(window.innerWidth||-1)}function wc(e){const t=ns(e);return(t==null?void 0:t.clientHeight)??(window.innerHeight||-1)}function vc(e,t,o){const s=e.getBoundingClientRect().height,n=mc(o)-2,r=wc(o)-2;if(!e.offsetParent)return;const a=Hn(e.offsetParent),{clientY:d,clientX:c}=t;let u=d-a.top-s/2,h=c-a.left-10;const g=J(o),p=g.defaultView||window,f=p.pageYOffset||g.documentElement.scrollTop,C=p.pageXOffset||g.documentElement.scrollLeft;n>0&&h+e.clientWidth>n+C&&(h=n+C-e.clientWidth),h<0&&(h=0),r>0&&u+e.clientHeight>r+f&&(u=r+f-e.clientHeight),u<0&&(u=0),e.style.left=`${h}px`,e.style.top=`${u}px`}function or(e){const t=Y(e);return t===null||t===J(e).body}function mt(e){return e.get("ensureDomOrder")?!1:e.get("animateRows")}function ir(e){return!(e.get("paginateChildRows")||e.get("groupHideOpenParents")||ee(e,"print"))}function Re(e){const t=e.get("autoGroupColumnDef");return!(t!=null&&t.comparator)&&!e.get("treeData")}function sr(e){return e.get("grandTotalRow")}function nr(e,t){return t?!1:e.get("groupDisplayType")==="groupRows"}function bc(e,t,o){return!!t.group&&!t.footer&&nr(e,o)}function ko(e){const t=e.getCallback("getRowId");return t===void 0?t:o=>{let i=t(o);return typeof i!="string"&&(Ji(()=>k(25,{id:i}),"getRowIdString"),i=String(i)),i}}function wt(e){return(e==null?void 0:e.checkboxes)??!0}function Lo(e){return(e==null?void 0:e.mode)==="multiRow"&&(e.headerCheckbox??!0)}function Go(e){if(typeof e=="object")return e.checkboxLocation??"selectionColumn"}function Sc(e){return typeof e.get("rowSelection")!="string"}function Je(e){const t=e.get("cellSelection");return t!==void 0?!!t:e.get("enableRangeSelection")}function rs(e){const t=e.get("rowSelection");return typeof t=="string"?e.get("isRowSelectable"):t==null?void 0:t.isRowSelectable}function Ho(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==null?void 0:t.mode){case"multiRow":case"singleRow":return t.mode;default:return}}function Qt(e){return Ho(e)==="multiRow"}function Oo(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==null?void 0:t.mode)==="multiRow"?t.groupSelects:void 0}function yc(e,t=!0){const o=e.get("rowSelection");return typeof o!="object"?t?"all":void 0:o.mode==="multiRow"?o.selectAll:"all"}function Xt(e){const t=Oo(e);return t==="descendants"||t==="filteredDescendants"}function Bo(e){return e.get("columnMenu")==="legacy"}function Rc(e){return!e||e.length<2?e:"on"+e[0].toUpperCase()+e.substring(1)}function Ec(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 xc(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 _(e,t){return e.addGridCommonParams(t)}function Dc(e){return e.get("treeData")?e.get("treeDataParentIdField")?"treeSelfRef":e.get("treeDataChildrenField")?"treeNested":"treePath":"group"}var rr="__ag_Grid_Stop_Propagation",Fc=["touchstart","touchend","touchmove","touchcancel","scroll"],Pc=["wheel"],ls={};function vt(e){e[rr]=!0}function ke(e){return e[rr]===!0}var lr=(()=>{const e={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return o=>{if(typeof ls[o]=="boolean")return ls[o];const i=document.createElement(e[o]||"div");return o="on"+o,ls[o]=o in i}})();function ar(e,t,o){let i=t;for(;i;){const s=er(e,i,o);if(s)return s;i=i.parentElement}return null}function Tc(e,t){return!t||!e?!1:Ac(t).indexOf(e)>=0}function Ic(e){const t=[];let o=e.target;for(;o;)t.push(o),o=o.parentElement;return t}function Ac(e){const t=e;return t.path?t.path:t.composedPath?t.composedPath():Ic(t)}function Mc(e,t,o,i){const s=dr(o);let n;s!=null&&(n={passive:s}),e&&e.addEventListener&&e.addEventListener(t,o,i,n)}var dr=e=>{const t=Fc.includes(e),o=Pc.includes(e);if(t)return!0;if(o)return!1},x=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 je),this.localEventService.addEventListener(e,t,o)}removeEventListener(e,t,o){var i;(i=this.localEventService)==null||i.removeEventListener(e,t,o)}dispatchLocalEvent(e){var t;(t=this.localEventService)==null||t.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 kc(e)?(e.__addEventListener(t,o),i=()=>(e.__removeEventListener(t,o),null)):(e instanceof HTMLElement?Mc(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 vn(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 kc(e){return e.__addEventListener!==void 0}var Lc=/[&<>"']/g,Gc={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function bt(e){return(e==null?void 0:e.toString().toString())??null}function Vo(e){var t;return((t=bt(e))==null?void 0:t.replace(Lc,o=>Gc[o]))??null}var Hc={resizable:!0,sortable:!0},Oc=0;function cr(){return Oc++}function et(e){return e instanceof We}var We=class extends x{constructor(e,t,o,i){super(),this.colDef=e,this.userProvidedColDef=t,this.colId=o,this.primary=i,this.isColumn=!0,this.instanceId=cr(),this.autoHeaderHeight=null,this.moving=!1,this.resizing=!1,this.menuVisible=!1,this.lastLeftPinned=!1,this.firstRightPinned=!1,this.filterActive=!1,this.colEventSvc=new je,this.tooltipEnabled=!1,this.rowGroupActive=!1,this.pivotActive=!1,this.aggregationActive=!1,this.flex=null,this.colIdSanitised=Vo(o)}destroy(){var e;super.destroy(),(e=this.beans.rowSpanSvc)==null||e.deregister(this)}getInstanceId(){return this.instanceId}setState(){const{colDef:e,beans:{sortSvc:t,pinnedCols:o,colFlex:i}}=this;t==null||t.initCol(this);const s=e.hide;s!==void 0?this.visible=!s:this.visible=!e.initialHide,o==null||o.initCol(this),i==null||i.initCol(this)}setColDef(e,t,o){var s;const i=e.spanRows!==this.colDef.spanRows;this.colDef=e,this.userProvidedColDef=t,this.initMinAndMaxWidths(),this.initDotNotation(),this.initTooltip(),i&&((s=this.beans.rowSpanSvc)==null||s.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(),this.addPivotListener()}initDotNotation(){const{gos:e,colDef:{field:t,tooltipField:o}}=this,i=e.get("suppressFieldDotNotation");this.fieldContainsDots=M(t)&&t.indexOf(".")>=0&&!i,this.tooltipFieldContainsDots=M(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(){var e;(e=this.beans.tooltipSvc)==null||e.initCol(this)}initRowSpan(){var e;this.colDef.spanRows&&((e=this.beans.rowSpanSvc)==null||e.register(this))}addPivotListener(){const e=this.beans.pivotColDefSvc,t=this.colDef.pivotValueColumn;!e||!t||this.addManagedListeners(t,{colDefChanged:o=>{const i=e.recreateColDef(this.colDef);this.setColDef(i,i,o.source)}})}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){var t;return((t=this.beans.showRowGroupCols)==null?void 0:t.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){var i,s,n;this.frameworkEventListenerService=(s=(i=this.beans.frameworkOverrides).createLocalEventListenerWrapper)==null?void 0:s.call(i,this.frameworkEventListenerService,this.colEventSvc);const o=((n=this.frameworkEventListenerService)==null?void 0:n.wrap(e,t))??t;this.colEventSvc.addEventListener(e,o)}removeEventListener(e,t){var i;const o=((i=this.frameworkEventListenerService)==null?void 0:i.unwrap(e,t))??t;this.colEventSvc.removeEventListener(e,o)}createColumnFunctionCallbackParams(e){return _(this.gos,{node:e,data:e.data,column:this,colDef:this.colDef})}isSuppressNavigable(e){var t;return((t=this.beans.cellNavigation)==null?void 0:t.isSuppressNavigable(this,e))??!1}isCellEditable(e){var t;return((t=this.beans.editSvc)==null?void 0:t.isCellEditable({rowNode:e,column:this}))??!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){var t;return((t=this.beans.selectionSvc)==null?void 0:t.isCellCheckboxSelection(this,e))??!1}isSuppressPaste(e){var t;return this.isColumnFunc(e,((t=this.colDef)==null?void 0:t.suppressPaste)??null)}isResizable(){return!!this.getColDefValue("resizable")}getColDefValue(e){return this.colDef[e]??Hc[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 _(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 K(this.sort)}isSorting(){return M(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(){var e;return k(261),!!((e=this.beans.colHover)!=null&&e.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}getFirstRealParent(){let e=this.getOriginalParent();for(;e&&e.isPadding();)e=e.getOriginalParent();return e}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 _(this.gos,{node:e,data:e.data,colDef:this.colDef,column:this})}getColSpan(e){if(K(this.colDef.colSpan))return 1;const t=this.createBaseColDefParams(e),o=this.colDef.colSpan(t);return Math.max(o,1)}getRowSpan(e){if(K(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&&re(i,o),this.colEventSvc.dispatchEvent(i)}dispatchStateUpdatedEvent(e){this.colEventSvc.dispatchEvent({type:"columnStateUpdated",key:e})}};function te(e){return e instanceof No}var No=class extends x{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=cr(),this.expandableListenerRemoveCallback=null,this.expanded=!!(e!=null&&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}forEachLeafColumn(e){if(this.children)for(const t of this.children)et(t)?e(t):te(t)&&t.forEachLeafColumn(e)}addLeafColumns(e){this.children&&this.children.forEach(t=>{et(t)?e.push(t):te(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 l=i[n];if(!l.isVisible())continue;const a=l.getColumnGroupShow();a==="open"?(e=!0,o=!0):a==="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=>{te(i)&&i.isPadding()?t(i.children):e.push(i)})};return t(this.children),e}onColumnVisibilityChanged(){this.setExpandable()}},Bc={numericColumn:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"},rightAligned:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"}};function ur(e,t,o){const i={},s=e.gos;return Object.assign(i,s.get("defaultColGroupDef")),Object.assign(i,t),s.validateColDef(i,o),i}var Vc=class{constructor(){this.existingKeys={}}addExistingKeys(e){for(let t=0;t<e.length;t++)this.existingKeys[e[t]]=!0}getUniqueKey(e,t){e=Mi(e);let o=0;for(;;){let i=e??t;if(i?o!==0&&(i+="_"+o):i=o,!this.existingKeys[i]){const s=String(i);return e&&o>0&&k(273,{providedId:e,usedId:s}),this.existingKeys[s]=!0,s}o++}}},hr=Object.freeze([]);function $(e){if(e!=null&&e.length)return e[e.length-1]}function Jt(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 _o(e,t){if(e)for(const o of e)t(o)}function we(e,t){const o=e.indexOf(t);o>=0&&e.splice(o,1)}function gr(e,t,o){for(let i=0;i<t.length;i++)we(e,t[i]);for(let i=t.length-1;i>=0;i--)e.splice(o,0,t[i])}var Wo="ag-Grid-AutoColumn",pr="ag-Grid-SelectionColumn",fr="ag-Grid-RowNumbersColumn";function Cr(e){const t=[],o=i=>{for(let s=0;s<i.length;s++){const n=i[s];et(n)?t.push(n):te(n)&&o(n.getChildren())}};return o(e),t}function Le(e){return e.reduce((t,o)=>t+o.getActualWidth(),0)}function zo(e,t,o){const i={};if(!t)return;Ge(null,t,n=>{i[n.getInstanceId()]=n}),o&&Ge(null,o,n=>{i[n.getInstanceId()]=null});const s=Object.values(i).filter(n=>n!=null);e.context.destroyBeans(s)}function mr(e){return e.getId().startsWith(Wo)}function tt(e){const t=typeof e=="string"?e:"getColId"in e?e.getColId():e.colId;return(t==null?void 0:t.startsWith(pr))??!1}function ot(e){const t=typeof e=="string"?e:"getColId"in e?e.getColId():e.colId;return(t==null?void 0:t.startsWith(fr))??!1}function Nc(e){return tt(e)||ot(e)}function $o(e){let t=[];return e instanceof Array?t=e:typeof e=="string"&&(t=e.split(",")),t}function _c(e,t){return Jt(e,t,(o,i)=>o.getColId()===i.getColId())}function Wc(e){e.map={},e.list.forEach(t=>e.map[t.getId()]=t)}function St(e){return e==="gridOptionsUpdated"?"gridOptionsChanged":e}function wr(e,t){const o=e===t,i=e.getColDef()===t,s=e.getColId()==t;return o||i||s}var zc=(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),M(i)&&e[i]!==void 0&&(s.value2=e[i],n=!0)),!n&&t&&(t[o]!==void 0&&(s.value1=t[o]),M(i)&&t[i]!==void 0&&(s.value2=t[i])),s};function $c(e,t=null,o,i,s){const n=new Vc,{existingCols:r,existingGroups:l,existingColKeys:a}=Uc(i);n.addExistingKeys(a);const d=vr(e,t,0,o,r,n,l,s),{colGroupSvc:c}=e,u=(c==null?void 0:c.findMaxDepth(d,0))??0,h=c?c.balanceColumnTree(d,0,u,n):d;return Ge(null,h,(p,f)=>{te(p)&&p.setupExpandable(),p.originalParent=f}),{columnTree:h,treeDepth:u}}function Uc(e){const t=[],o=[],i=[];return e&&Ge(null,e,s=>{if(te(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 vr(e,t,o,i,s,n,r,l){if(!t)return[];const{colGroupSvc:a}=e,d=new Array(t.length);for(let c=0;c<d.length;c++){const u=t[c];a&&Qc(u)?d[c]=a.createProvidedColumnGroup(i,u,o,s,n,r,l):d[c]=Kc(e,i,u,s,n,l)}return d}function Kc(e,t,o,i,s,n){var a;const r=qc(o,i);r&&(i==null||i.splice(r.idx,1));let l=r==null?void 0:r.column;if(l){const d=as(e,o,l.getColId());l.setColDef(d,o,n),jc(e,l,d,n)}else{const d=s.getUniqueKey(o.colId,o.field),c=as(e,o,d);l=new We(c,o,d,t),e.context.createBean(l)}return(a=e.dataTypeSvc)==null||a.addColumnListeners(l),l}function br(e,t,o,i,s,n,r,l){const{sortSvc:a,pinnedCols:d,colFlex:c}=e;o!==void 0&&t.setVisible(!o,l),a&&(a.updateColSort(t,i,l),s!==void 0&&a.setColSortIndex(t,s)),n!==void 0&&(d==null||d.setColPinned(t,n)),r!==void 0&&(c==null||c.setColFlex(t,r))}function jc(e,t,o,i){br(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 qc(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 as(e,t,o,i){const{gos:s,dataTypeSvc:n}=e,r={},l=s.get("defaultColDef");re(r,l,!1,!0);const a=Yc(e,r,t,o);a&&Zc(e,a,r);const d=r.cellDataType;re(r,t,!1,!0),d!==void 0&&(r.cellDataType=d);const c=s.get("autoGroupColumnDef"),u=Re(s);return t.rowGroup&&c&&u&&re(r,{sort:c.sort,initialSort:c.initialSort},!1,!0),n&&(n.postProcess(r),n.validateColDef(r)),s.validateColDef(r,o,i),r}function Yc(e,t,o,i){var r;const s=(r=e.dataTypeSvc)==null?void 0:r.updateColDefAndGetColumnType(t,o,i),n=o.type??s??t.type;return t.type=n,n?$o(n):void 0}function Zc(e,t,o){if(!t.length)return;const i=Object.assign({},Bc),s=e.gos.get("columnTypes")||{};for(const n of Object.keys(s)){const r=s[n];n in i?k(34,{key:n}):(r.type&&k(35),i[n]=r)}t.forEach(n=>{const r=i[n.trim()];r?re(o,r,!1,!0):k(36,{t:n})})}function Qc(e){return e.children!==void 0}function Ge(e,t,o){if(t)for(let i=0;i<t.length;i++){const s=t[i];te(s)&&Ge(s,s.getChildren(),o),o(s,e)}}function Sr(e,t){const o=[],i=[],s=[];return e.forEach(r=>{const l=r.getColDef().lockPosition;l==="right"?s.push(r):l==="left"||l===!0?o.push(r):i.push(r)}),t.get("enableRtl")?[...s,...i,...o]:[...o,...i,...s]}function yr(e,t){let o=!0;return Ge(null,t,i=>{if(!te(i))return;const s=i,n=s.getColGroupDef();if(!(n&&n.marryChildren))return;const l=[];s.getLeafColumns().forEach(h=>{const g=e.indexOf(h);l.push(g)});const a=Math.max.apply(Math,l),d=Math.min.apply(Math,l),c=a-d,u=s.getLeafColumns().length-1;c>u&&(o=!1)}),o}function Rr(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 Er(e,t,o){if(!t.length)return;const i=t.length===1?t[0]:null,s=Rr(t,n=>n.getPinned());e.dispatchEvent({type:"columnPinned",pinned:s??null,columns:t,column:i,source:o})}function Xc(e,t,o){if(!t.length)return;const i=t.length===1?t[0]:null,s=Rr(t,n=>n.isVisible());e.dispatchEvent({type:"columnVisible",visible:s,columns:t,column:i,source:o})}function Jc(e,t,o,i){e.dispatchEvent({type:t,columns:o,column:o&&o.length==1?o[0]:null,source:i})}function yt(e,t,o,i,s=null){t!=null&&t.length&&e.dispatchEvent({type:"columnResized",columns:t,column:t.length===1?t[0]:null,flexColumns:s,finished:o,source:i})}function ve(e,t,o){var S;const{colModel:i,rowGroupColsSvc:s,pivotColsSvc:n,autoColSvc:r,selectionColSvc:l,colAnimation:a,visibleCols:d,pivotResultCols:c,environment:u,valueColsSvc:h,eventSvc:g,gos:p}=e,f=i.getColDefCols()??[],C=l==null?void 0:l.getColumns();if(!(f!=null&&f.length)&&!(C!=null&&C.length))return!1;if(t!=null&&t.state&&!t.state.forEach)return k(32),!1;const m=(D,I,O,F,P)=>{if(!D)return;const T=zc(I,t.defaultState),V=T("flex").value1;if(br(e,D,T("hide").value1,T("sort").value1,T("sortIndex").value1,T("pinned").value1,V,o),V==null){const B=T("width").value1;if(B!=null){const W=D.getColDef().minWidth??u.getDefaultColumnMinWidth();W!=null&&B>=W&&D.setActualWidth(B,o)}}P||!D.isPrimary()||(h==null||h.syncColumnWithState(D,o,T),s==null||s.syncColumnWithState(D,o,T,O),n==null||n.syncColumnWithState(D,o,T,F))},w=(D,I,O)=>{var Fd,Pd;const F=xr(e,o),P=I.slice(),T={},V={},B=[],W=[],z=[];let de=0;const Ie=(s==null?void 0:s.columns.slice())??[],p0=(n==null?void 0:n.columns.slice())??[];D.forEach(ne=>{const Ro=ne.colId;if(Ro.startsWith(Wo)){B.push(ne),z.push(ne);return}if(tt(Ro)){W.push(ne),z.push(ne);return}const _t=O(Ro);_t?(m(_t,ne,T,V,!1),we(P,_t)):(z.push(ne),de+=1)});const xd=ne=>m(ne,null,T,V,!1);P.forEach(xd),s==null||s.sortColumns(Fr.bind(s,T,Ie)),n==null||n.sortColumns(Fr.bind(n,V,p0)),i.refreshCols(!1);const Dd=(ne,Ro,wn=[])=>{Ro.forEach(_t=>{const Td=ne(_t.colId);we(wn,Td),m(Td,_t,null,null,!0)}),wn.forEach(xd)};return Dd(ne=>(r==null?void 0:r.getColumn(ne))??null,B,(Fd=r==null?void 0:r.getColumns())==null?void 0:Fd.slice()),Dd(ne=>(l==null?void 0:l.getColumn(ne))??null,W,(Pd=l==null?void 0:l.getColumns())==null?void 0:Pd.slice()),tu(t,i,p),d.refresh(o),g.dispatchEvent({type:"columnEverythingChanged",source:o}),F(),{unmatchedAndAutoStates:z,unmatchedCount:de}};a==null||a.start();let{unmatchedAndAutoStates:b,unmatchedCount:v}=w(t.state||[],f,D=>i.getColDefCol(D));if(b.length>0||M(t.defaultState)){const D=((S=c==null?void 0:c.getPivotResultCols())==null?void 0:S.list)??[];v=w(b,D,I=>(c==null?void 0:c.getPivotResultCol(I))??null).unmatchedCount}return a==null||a.finish(),v===0}function eu(e,t){var w,b;const{colModel:o,autoColSvc:i,selectionColSvc:s,eventSvc:n,gos:r}=e,l=o.getColDefCols();if(!(l!=null&&l.length))return;const a=o.getColDefColTree(),d=Cr(a),c=[];let u=1e3,h=1e3;const g=v=>{const S=Dr(v);K(S.rowGroupIndex)&&S.rowGroup&&(S.rowGroupIndex=u++),K(S.pivotIndex)&&S.pivot&&(S.pivotIndex=h++),c.push(S)};(w=i==null?void 0:i.getColumns())==null||w.forEach(g),(b=s==null?void 0:s.getColumns())==null||b.forEach(g),d==null||d.forEach(g),ve(e,{state:c},t);const p=(i==null?void 0:i.getColumns())??[],m=[...(s==null?void 0:s.getColumns())??[],...p,...l].map(v=>({colId:v.colId}));ve(e,{state:m,applyOrder:!0},t),n.dispatchEvent(_(r,{type:"columnsReset",source:t}))}function xr(e,t){const{rowGroupColsSvc:o,pivotColsSvc:i,valueColsSvc:s,colModel:n,sortSvc:r,eventSvc:l}=e,a={rowGroupColumns:(o==null?void 0:o.columns.slice())??[],pivotColumns:(i==null?void 0:i.columns.slice())??[],valueColumns:(s==null?void 0:s.columns.slice())??[]},d=Uo(e),c={};return d.forEach(u=>{c[u.colId]=u}),()=>{const u=(D,I,O,F)=>{const P=I.map(F),T=O.map(F);if(Jt(P,T))return;const B=new Set(I);O.forEach(z=>{B.delete(z)||B.add(z)});const W=[...B];l.dispatchEvent({type:D,columns:W,column:W.length===1?W[0]:null,source:t})},h=D=>{const I=[];return n.forAllCols(O=>{const F=c[O.getColId()];F&&D(F,O)&&I.push(O)}),I},g=D=>D.getColId();u("columnRowGroupChanged",a.rowGroupColumns,(o==null?void 0:o.columns)??[],g),u("columnPivotChanged",a.pivotColumns,(i==null?void 0:i.columns)??[],g);const f=h((D,I)=>{const O=D.aggFunc!=null,F=O!=I.isValueActive(),P=O&&D.aggFunc!=I.getAggFunc();return F||P});f.length>0&&Jc(l,"columnValueChanged",f,t),yt(l,h((D,I)=>D.width!=I.getActualWidth()),!0,t),Er(l,h((D,I)=>D.pinned!=I.getPinned()),t),Xc(l,h((D,I)=>D.hide==I.isVisible()),t);const v=h((D,I)=>D.sort!=I.getSort()||D.sortIndex!=I.getSortIndex());v.length>0&&(r==null||r.dispatchSortChangedEvents(t,v));const S=Uo(e);iu(d,S,t,n,l)}}function Uo(e){const{colModel:t,rowGroupColsSvc:o,pivotColsSvc:i}=e,s=t.getColDefCols();if(K(s)||!t.isAlive())return[];const n=o==null?void 0:o.columns,r=i==null?void 0:i.columns,l=[],a=c=>{const u=c.isRowGroupActive()&&n?n.indexOf(c):null,h=c.isPivotActive()&&r?r.indexOf(c):null,g=c.isValueActive()?c.getAggFunc():null,p=c.getSort()!=null?c.getSort():null,f=c.getSortIndex()!=null?c.getSortIndex():null;l.push({colId:c.getColId(),width:c.getActualWidth(),hide:!c.isVisible(),pinned:c.getPinned(),sort:p,sortIndex:f,aggFunc:g,rowGroup:c.isRowGroupActive(),rowGroupIndex:u,pivot:c.isPivotActive(),pivotIndex:h,flex:c.getFlex()??null})};t.forAllCols(c=>a(c));const d=new Map(t.getCols().map((c,u)=>[c.getColId(),u]));return l.sort((c,u)=>{const h=d.has(c.colId)?d.get(c.colId):-1,g=d.has(u.colId)?d.get(u.colId):-1;return h-g}),l}function Dr(e){const t=(p,f)=>p??f??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),l=t(o.width,o.initialWidth),a=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),h=t(o.pivot,o.initialPivot);u==null&&(h==null||h==!1)&&(u=null,h=null);const g=t(o.aggFunc,o.initialAggFunc);return{colId:e.getColId(),sort:i,sortIndex:s,hide:n,pinned:r,width:l,flex:a,rowGroup:c,rowGroupIndex:d,pivot:h,pivotIndex:u,aggFunc:g}}function tu(e,t,o){if(!e.applyOrder||!e.state)return;const i=[];e.state.forEach(s=>{s.colId!=null&&i.push(s.colId)}),ou(t.cols,i,t,o)}function ou(e,t,o,i){if(e==null)return;let s=[];const n={};t.forEach(l=>{if(n[l])return;const a=e.map[l];a&&(s.push(a),n[l]=!0)});let r=0;if(e.list.forEach(l=>{const a=l.getColId();if(n[a]!=null)return;a.startsWith(Wo)?s.splice(r++,0,l):s.push(l)}),s=Sr(s,i),!yr(s,o.getColTree())){k(39);return}e.list=s}function iu(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 l=e.filter(c=>r[c.colId]),a=t.filter(c=>r[c.colId]),d=[];a.forEach((c,u)=>{const h=l&&l[u];if(h&&h.colId!==c.colId){const g=i.getCol(h.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 Fr=(e,t,o,i)=>{const s=e[o.getId()],n=e[i.getId()],r=s!=null,l=n!=null;if(r&&l)return s-n;if(r)return-1;if(l)return 1;const a=t.indexOf(o),d=t.indexOf(i),c=a>=0,u=d>=0;return c&&u?a-d:c?-1:1},su=class extends x{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","rowNumbers","hidePaddedHeaderRows"],e=>this.refreshAll(St(e.source))),this.addManagedPropertyListeners(["defaultColDef","defaultColGroupDef","columnTypes","suppressFieldDotNotation"],this.recreateColumnDefs.bind(this)),this.addManagedPropertyListener("pivotMode",e=>this.setPivotMode(this.gos.get("pivotMode"),St(e.source)))}createColsFromColDefs(e){var m,w,b;const{beans:t}=this,{valueCache:o,colAutosize:i,rowGroupColsSvc:s,pivotColsSvc:n,valueColsSvc:r,visibleCols:l,eventSvc:a}=t,d=this.colDefs?xr(t,e):void 0;o==null||o.expire();const c=(m=this.colDefCols)==null?void 0:m.list,u=(w=this.colDefCols)==null?void 0:w.tree,h=$c(t,this.colDefs,!0,u,e);zo(t,(b=this.colDefCols)==null?void 0:b.tree,h.columnTree);const g=h.columnTree,p=h.treeDepth,f=Cr(g),C={};f.forEach(v=>C[v.getId()]=v),this.colDefCols={tree:g,treeDepth:p,list:f,map:C},s==null||s.extractCols(e,c),n==null||n.extractCols(e,c),r==null||r.extractCols(e,c),this.ready=!0,this.refreshCols(!0),l.refresh(e),a.dispatchEvent({type:"columnEverythingChanged",source:e}),d&&(this.changeEventsDispatching=!0,d(),this.changeEventsDispatching=!1),a.dispatchEvent({type:"newColumnsLoaded",source:e}),e==="gridInitializing"&&(i==null||i.applyAutosizeStrategy())}refreshCols(e){var f;if(!this.colDefCols)return;const t=(f=this.cols)==null?void 0:f.tree;this.saveColOrder();const{autoColSvc:o,selectionColSvc:i,rowNumbersSvc:s,quickFilter:n,pivotResultCols:r,showRowGroupCols:l,rowAutoHeight:a,visibleCols:d,colViewport:c,eventSvc:u}=this.beans,h=this.selectCols(r,this.colDefCols);this.createColumnsForService([o,i,s],h);const g=fc(this.gos,this.showingPivotResult);(!e||g)&&this.restoreColOrder(h),this.positionLockedCols(h),l==null||l.refresh(),n==null||n.refreshCols(),this.setColSpanActive(),a==null||a.setAutoHeightActive(h),d.clear(),c.clear(),!Jt(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==null?void 0: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(a=>{var d;return((d=this.cols)==null?void 0:d.map[a.getColId()])!==void 0})||(this.lastPivotOrder=null)),this.cols}getColsToShow(){if(!this.cols)return[];const{valueColsSvc:e,selectionColSvc:t,gos:o}=this.beans,i=this.isPivotMode()&&!this.showingPivotResult,s=t==null?void 0:t.isSelectionColumnEnabled(),n=o.get("rowNumbers"),r=e==null?void 0:e.columns;return this.cols.list.filter(a=>{const d=mr(a);if(i){const c=r==null?void 0:r.includes(a);return d||c||s&&tt(a)||n&&ot(a)}else return d||a.isVisible()})}refreshAll(e){this.ready&&(this.refreshCols(!1),this.beans.visibleCols.refresh(e))}setColsVisible(e,t=!1,o){ve(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=t.filter(u=>e.map[u.getId()]!=null);if(o.length===0)return;if(o.length===e.list.length){e.list=o;return}const i=u=>{const h=u.getOriginalParent();return h?h.getChildren().length>1?!0:i(h):!1};if(!o.some(u=>i(u))){const u=new Set(o);for(const h of e.list)u.has(h)||o.push(h);e.list=o;return}const s=new Map;for(let u=0;u<o.length;u++){const h=o[u];s.set(h,u)}const n=e.list.filter(u=>!s.has(u));if(n.length===0){e.list=o;return}const r=(u,h)=>{const g=h?h.getOriginalParent():u.getOriginalParent();if(!g)return null;let p=null,f=null;for(const C of g.getChildren())if(!(C===h||C===u)){if(C instanceof We){const m=s.get(C);if(m==null)continue;(p==null||p<m)&&(p=m,f=C);continue}C.forEachLeafColumn(m=>{const w=s.get(m);w!=null&&(p==null||p<w)&&(p=w,f=m)})}return f??r(u,g)},l=[],a=new Map;for(const u of n){const h=r(u,null);if(h==null){l.push(u);continue}const g=a.get(h);g===void 0?a.set(h,u):Array.isArray(g)?g.push(u):a.set(h,[g,u])}const d=new Array(e.list.length);let c=d.length-1;for(let u=l.length-1;u>=0;u--)d[c--]=l[u];for(let u=o.length-1;u>=0;u--){const h=o[u],g=a.get(h);if(g)if(Array.isArray(g))for(let p=g.length-1;p>=0;p--){const f=g[p];d[c--]=f}else d[c--]=g;d[c--]=h}e.list=d}positionLockedCols(e){e.list=Sr(e.list,this.gos)}saveColOrder(){var e,t;this.showingPivotResult?this.lastPivotOrder=((e=this.cols)==null?void 0:e.list)??null:this.lastOrder=((t=this.cols)==null?void 0:t.list)??null}getColumnDefs(){var e,t;return this.colDefCols?(t=this.beans.colDefFactory)==null?void 0:t.getColumnDefs(this.colDefCols.list,this.showingPivotResult,this.lastOrder,((e=this.cols)==null?void 0:e.list)??[]):void 0}setColSpanActive(){var e;this.colSpanActive=!!((e=this.cols)!=null&&e.list.some(t=>t.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(){var t;const e=(t=this.beans.pivotColsSvc)==null?void 0:t.columns;return this.pivotMode&&!!(e!=null&&e.length)}recreateColumnDefs(e){var o;if(!this.cols)return;(o=this.beans.autoColSvc)==null||o.updateColumns(e);const t=St(e.source);this.createColsFromColDefs(t)}setColumnDefs(e,t){this.colDefs=e,this.createColsFromColDefs(t)}destroy(){var e;zo(this.beans,(e=this.colDefCols)==null?void 0:e.tree),super.destroy()}getColTree(){var e;return((e=this.cols)==null?void 0:e.tree)??[]}getColDefColTree(){var e;return((e=this.colDefCols)==null?void 0:e.tree)??[]}getColDefCols(){var e;return((e=this.colDefCols)==null?void 0:e.list)??null}getCols(){var e;return((e=this.cols)==null?void 0:e.list)??[]}forAllCols(e){var s,n,r,l;const{pivotResultCols:t,autoColSvc:o,selectionColSvc:i}=this.beans;_o((s=this.colDefCols)==null?void 0:s.list,e),_o((n=o==null?void 0:o.columns)==null?void 0:n.list,e),_o((r=i==null?void 0:i.columns)==null?void 0:r.list,e),_o((l=t==null?void 0:t.getPivotResultCols())==null?void 0:l.list,e)}getColsForKeys(e){return e?e.map(t=>this.getCol(t)).filter(t=>t!=null):[]}getColDefCol(e){var t;return(t=this.colDefCols)!=null&&t.list?this.getColFromCollection(e,this.colDefCols):null}getCol(e){return e==null?null:this.getColFromCollection(e,this.cols)}getColById(e){var t;return((t=this.cols)==null?void 0:t.map[e])??null}getColFromCollection(e,t){var s,n;if(t==null)return null;const{map:o,list:i}=t;if(typeof e=="string"&&o[e])return o[e];for(let r=0;r<i.length;r++)if(wr(i[r],e))return i[r];return((s=this.beans.autoColSvc)==null?void 0:s.getColumn(e))??((n=this.beans.selectionColSvc)==null?void 0:n.getColumn(e))??null}},nu=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 Ko(e,t,o){return o&&e.addDestroyFunc(()=>t.destroyBean(o)),o??e}var Pr=class{constructor(e){this.cssClassStates={},this.getGui=e}toggleCss(e,t){var i;if(!e)return;if(e.indexOf(" ")>=0){const s=(e||"").split(" ");if(s.length>1){s.forEach(n=>this.toggleCss(n,t));return}}this.cssClassStates[e]!==t&&e.length&&((i=this.getGui())==null||i.classList.toggle(e,t),this.cssClassStates[e]=t)}},ru=0,A=null,j=class extends x{constructor(e,t){super(),this.suppressDataRefValidation=!1,this.displayed=!0,this.visible=!0,this.compId=ru++,this.cssManager=new Pr(()=>this.eGui),this.componentSelectors=new Map((t??[]).map(o=>[o.selector,o])),e&&this.setTemplate(e)}preConstruct(){var t,o,i;this.wireTemplate(this.getGui());const e="component-"+((o=(t=Object.getPrototypeOf(this))==null?void 0:t.constructor)==null?void 0:o.name);(i=this.css)==null||i.forEach(s=>this.beans.environment.addGlobalCSS(s,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(Wn):null}applyElementsToComponent(e,t,o,i=null){if(t===void 0&&(t=this.getDataRefAttribute(e)),t){const s=this[t];if(s===A)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 l of i.attributes??[])r.setAttribute(l.name,l.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 l=null;if(r){const a=o&&s?o[s]:void 0;l=new r.component(a),l.setParentComponent(this),this.createBean(l,null,t)}else if(n)throw new Error(`selector: ${i}`);return this.applyElementsToComponent(e,s,o,l),l}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=qi(e):i=X(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),Qi(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;oc(this.eGui,e,{skipAriaHidden:o})}}setDisplayed(e,t={}){if(e!==this.displayed){this.displayed=e;const{skipAriaHidden:o}=t;Z(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))}addCss(e){this.cssManager.toggleCss(e,!0)}removeCss(e){this.cssManager.toggleCss(e,!1)}toggleCss(e,t){this.cssManager.toggleCss(e,t)}registerCSS(e){this.css||(this.css=[]),this.css.push(e)}},eo=class Eo{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 Eo(o=>{let i=t.length;const s=new Array(i);t.forEach((n,r)=>{n.then(l=>{s[r]=l,i--,i===0&&o(s)})})}):Eo.resolve()}static resolve(t=null){return new Eo(o=>o(t))}then(t){return new Eo(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 lu(e){return e?e.prototype&&"getGui"in e.prototype:!1}function au(e,t,o,i){const{name:s}=o;let n,r,l,a,d,c;if(t){const u=t,h=u[s+"Selector"],g=h?h(i):null,p=f=>{typeof f=="string"?n=f:f!=null&&f!==!0&&(e.isFrameworkComponent(f)?l=f:r=f)};g?(p(g.component),a=g.params,d=g.popup,c=g.popupPosition):p(u[s])}return{compName:n,jsComp:r,fwComp:l,paramsFromSelector:a,popupFromSelector:d,popupPositionFromSelector:c}}var du=class extends x{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){var b;const{name:n,cellRenderer:r}=t;let{compName:l,jsComp:a,fwComp:d,paramsFromSelector:c,popupFromSelector:u,popupPositionFromSelector:h}=au(this.beans.frameworkOverrides,e,t,i),g,p;const f=v=>{const S=this.registry.getUserComponent(n,v);S&&(a=S.componentFromFramework?void 0:S.component,d=S.componentFromFramework?S.component:void 0,g=S.params,p=S.processParams)};if(l!=null&&f(l),a==null&&d==null&&o!=null&&f(o),a&&r&&!lu(a)&&(a=(b=this.agCompUtils)==null?void 0:b.adaptFunction(t,a)),!a&&!d){const{validation:v}=this.beans;s&&(l!==o||!o)?l?v!=null&&v.isProvidedUserComp(l)||U(50,{compName:l}):o?v||U(260,{...this.gos.getModuleErrorParams(),propName:n,compName:o}):U(216,{name:n}):o&&!v&&U(146,{comp:o});return}const C=this.mergeParams(e,t,i,c,g,p),m=a==null,w=a??d;return{componentFromFramework:m,componentClass:w,params:C,type:t,popupFromSelector:u,popupPositionFromSelector:h,newAgStackInstance:()=>this.newAgStackInstance(w,m,C,t)}}newAgStackInstance(e,t,o,i){var l;const s=!t;let n;s?n=new e:n=this.frameworkCompWrapper.wrap(e,i.mandatoryMethods,i.optionalMethods,i),this.createBean(n);const r=(l=n.init)==null?void 0:l.call(n,o);return r==null?eo.resolve(n):r.then(()=>n)}mergeParams(e,t,o,i=null,s,n){const r={...o,...s},l=e,a=l&&l[t.name+"Params"];if(typeof a=="function"){const d=a(o);re(r,d)}else typeof a=="object"&&re(r,a);return re(r,i),n?n(r):r}},cu={name:"dragAndDropImageComponent",mandatoryMethods:["setIcon","setLabel"]},uu={name:"headerComponent",optionalMethods:["refresh"]},hu={name:"innerHeaderComponent"},gu={name:"innerHeaderGroupComponent"},pu={name:"headerGroupComponent"},fu={name:"cellRenderer",optionalMethods:["refresh","afterGuiAttached"],cellRenderer:!0},Cu={name:"loadingCellRenderer",cellRenderer:!0},mu={name:"cellEditor",mandatoryMethods:["getValue"],optionalMethods:["isPopup","isCancelBeforeStart","isCancelAfterEnd","getPopupPosition","focusIn","focusOut","afterGuiAttached","refresh"]},wu={name:"loadingOverlayComponent",optionalMethods:["refresh"]},vu={name:"noRowsOverlayComponent",optionalMethods:["refresh"]},bu={name:"tooltipComponent"},Su={name:"fullWidthCellRenderer",optionalMethods:["refresh","afterGuiAttached"],cellRenderer:!0},yu={name:"loadingCellRenderer",cellRenderer:!0},Ru={name:"groupRowRenderer",optionalMethods:["afterGuiAttached"],cellRenderer:!0},Eu={name:"detailCellRenderer",optionalMethods:["refresh"],cellRenderer:!0};function xu(e,t){return e.getCompDetailsFromGridOptions(cu,"agDragAndDropImage",t,!0)}function Du(e,t,o){return e.getCompDetails(t,uu,"agColumnHeader",o)}function Fu(e,t,o){return e.getCompDetails(t,hu,void 0,o)}function Pu(e,t){const o=t.columnGroup.getColGroupDef();return e.getCompDetails(o,pu,"agColumnGroupHeader",t)}function Tu(e,t,o){return e.getCompDetails(t,gu,void 0,o)}function Iu(e,t){return e.getCompDetailsFromGridOptions(Su,void 0,t,!0)}function Au(e,t){return e.getCompDetailsFromGridOptions(yu,"agLoadingCellRenderer",t,!0)}function Mu(e,t){return e.getCompDetailsFromGridOptions(Ru,"agGroupRowRenderer",t,!0)}function ku(e,t){return e.getCompDetailsFromGridOptions(Eu,"agDetailCellRenderer",t,!0)}function Tr(e,t,o){return e.getCompDetails(t,fu,void 0,o)}function Ir(e,t,o){return e.getCompDetails(t,Cu,"agSkeletonCellRenderer",o,!0)}function Ar(e,t,o){return e.getCompDetails(t,mu,"agCellEditor",o,!0)}function Lu(e,t){return e.getCompDetailsFromGridOptions(wu,"agLoadingOverlay",t,!0)}function Gu(e,t){return e.getCompDetailsFromGridOptions(vu,"agNoRowsOverlay",t,!0)}function Hu(e,t){return e.getCompDetails(t.colDef,bu,"agTooltipComponent",t,!0)}function ds(e){const t=e;return t!=null&&t.getFrameworkComponentInstance!=null?t.getFrameworkComponentInstance():e}var Mr=new Set,jo={},Rt={},qo,kr=!1,Lr=!1,Ou=!1;function Bu(e){const[t,o]=e.version.split(".")||[],[i,s]=qo.split(".")||[];return t===i&&o===s}function Vu(e){qo||(qo=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?Bu(e)||ft(t(`'${e.moduleName}' is version ${e.version} but the other modules are version ${qo}.`)):ft(t(`'${e.moduleName}' is incompatible.`)),e.validate){const o=e.validate();o.isValid||ft(`${o.message}`)}}function Et(e,t,o=!1){o||(kr=!0),Vu(e);const i=e.rowModels??["all"];Mr.add(e);let s;t!==void 0?(Lr=!0,Rt[t]===void 0&&(Rt[t]={}),s=Rt[t]):s=jo,i.forEach(n=>{s[n]===void 0&&(s[n]={}),s[n][e.moduleName]=e}),e.dependsOn&&e.dependsOn.forEach(n=>Et(n,t,o))}function Nu(e){delete Rt[e]}function cs(e,t,o){const i=s=>{var n,r,l;return!!((n=jo[s])!=null&&n[e])||!!((l=(r=Rt[t])==null?void 0:r[s])!=null&&l[e])};return i(o)||i("all")}function us(){return Lr}function _u(e,t){const o=Rt[e]??{};return[...Object.values(jo.all??{}),...Object.values(o.all??{}),...Object.values(jo[t]??{}),...Object.values(o[t]??{})]}function Wu(){return new Set(Mr)}function zu(){return kr}function $u(){return Ou}var Uu=class{static register(e){Et(e,void 0)}static registerModules(e){e.forEach(t=>Et(t,void 0))}},Ku=class{constructor(e){this.beans={},this.createdBeans=[],this.destroyed=!1,!(!e||!e.beanClasses)&&(this.beanDestroyComparator=e.beanDestroyComparator,this.init(e))}init(e){var t;for(const o of Object.keys(e.providedBeanInstances))this.beans[o]=e.providedBeanInstances[o];e.beanClasses.forEach(o=>{const i=new o;i.beanName?this.beans[i.beanName]=i:console.error(`Bean ${o.name} is missing beanName`),this.createdBeans.push(i)}),(t=e.derivedBeans)==null||t.forEach(o=>{const{beanName:i,bean:s}=o(this);this.beans[i]=s,this.createdBeans.push(s)}),e.beanInitComparator&&this.createdBeans.sort(e.beanInitComparator),this.initBeans(this.createdBeans)}getBeanInstances(){return Object.values(this.beans)}createBean(e,t){return this.initBeans([e],t),e}initBeans(e,t){e.forEach(o=>{var i,s;(i=o.preWireBeans)==null||i.call(o,this.beans),(s=o.wireBeans)==null||s.call(o,this.beans)}),e.forEach(o=>{var i;return(i=o.preConstruct)==null?void 0:i.call(o)}),t&&e.forEach(t),e.forEach(o=>{var i;return(i=o.postConstruct)==null?void 0:i.call(o)})}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){var t;(t=e==null?void 0:e.destroy)==null||t.call(e)}destroyBeans(e){if(e)for(let t=0;t<e.length;t++)this.destroyBean(e[t]);return[]}isDestroyed(){return this.destroyed}};function ju(e){return typeof e=="object"&&!!e.getComp}var qu=class extends Ku{init(e){this.gridId=e.gridId,this.beans.context=this,this.destroyCallback=e.destroyCallback,super.init(e)}destroy(){var e;super.destroy(),Nu(this.gridId),(e=this.destroyCallback)==null||e.call(this)}getGridId(){return this.gridId}},Yu=class extends x{constructor(){super(...arguments),this.beanName="editModelSvc",this.edits=new Map,this.cellValidations=new Gr,this.rowValidations=new Hr,this.suspendEdits=!1}suspend(e){this.suspendEdits=e}removeEdits({rowNode:e,column:t}){if(!this.hasEdits({rowNode:e})||!e)return;const o=this.getEditRow(e);t?o.delete(t):o.clear(),o.size===0&&this.edits.delete(e)}getEditRow(e,t={}){if(this.suspendEdits||this.edits.size===0)return;const o=e&&this.edits.get(e);if(o)return o;if(t.checkSiblings){const i=e.pinnedSibling;if(i)return this.getEditRow(i)}}getEditRowDataValue(e,{checkSiblings:t}={}){if(this.edits.size===0)return e.data;const o=this.getEditRow(e),i=e.pinnedSibling,s=t&&i&&this.getEditRow(i);if(!o&&!s)return e.data;const n=Object.assign({},e.data),r=(l,a)=>l.forEach(({pendingValue:d},c)=>{d!==pe&&(a[c.getColId()]=d)});return o&&r(o,n),s&&r(s,n),n}getEdit(e,t){const o=this._getEdit(e);return t&&o?{...o}:o}_getEdit(e){var t;if(!this.suspendEdits&&this.edits.size!==0)return e.rowNode&&e.column&&((t=this.getEditRow(e.rowNode))==null?void 0:t.get(e.column))}getEditMap(e=!0){if(this.suspendEdits||this.edits.size===0)return new Map;if(!e)return this.edits;const t=new Map;return this.edits.forEach((o,i)=>t.set(i,new Map(o))),t}setEditMap(e){this.edits.clear(),e.forEach((t,o)=>{const i=new Map;t.forEach((s,n)=>i.set(n,{...s})),this.edits.set(o,i)})}setEdit(e,t){(this.edits.size===0||!this.edits.has(e.rowNode))&&this.edits.set(e.rowNode,new Map);const o={...this._getEdit(e),...t};return this.getEditRow(e.rowNode).set(e.column,o),o}clearEditValue(e){var i;const{rowNode:t,column:o}=e;if(t)if(o){const s=this._getEdit(e);s&&(s.editorValue=void 0,s.pendingValue=s.sourceValue,s.state="changed")}else(i=this.getEditRow(t))==null||i.forEach(s=>{s.editorValue=void 0,s.pendingValue=s.sourceValue,s.state="changed"})}getState(e){var t;if(!this.suspendEdits)return(t=this.getEdit(e))==null?void 0:t.state}getEditPositions(e){if(this.suspendEdits||(e??this.edits).size===0)return[];const t=[];return(e??this.edits).forEach((o,i)=>{for(const s of o.keys())t.push({rowNode:i,column:s,...o.get(s)})}),t}hasRowEdits(e,t){return this.suspendEdits||this.edits.size===0?!1:!!this.getEditRow(e,t)}hasEdits(e={},t={}){var n;if(this.suspendEdits||this.edits.size===0)return!1;const{rowNode:o,column:i}=e,{withOpenEditor:s}=t;if(o){const r=this.getEditRow(o,t);return r?i?s?((n=this.getEdit(e))==null?void 0:n.state)==="editing":r.has(i)??!1:r.size!==0?s?Array.from(r.values()).some(({state:l})=>l==="editing"):!0:!1:!1}return s?this.getEditPositions().some(({state:r})=>r==="editing"):this.edits.size>0}start(e){const t=this.getEditRow(e.rowNode)??new Map,{rowNode:o,column:i}=e;i&&!t.has(i)&&t.set(i,{editorValue:void 0,pendingValue:pe,sourceValue:this.beans.valueSvc.getValue(i,o,!0,"api"),state:"editing"}),this.edits.set(o,t)}stop(e){this.hasEdits(e)&&(e?this.removeEdits(e):this.clear())}clear(){for(const e of this.edits.values())e.clear();this.edits.clear()}getCellValidationModel(){return this.cellValidations}getRowValidationModel(){return this.rowValidations}setCellValidationModel(e){this.cellValidations=e}setRowValidationModel(e){this.rowValidations=e}destroy(){super.destroy(),this.clear()}},Gr=class{constructor(){this.cellValidations=new Map}getCellValidation(e){var i,s;const{rowNode:t,column:o}=e||{};return(s=(i=this.cellValidations)==null?void 0:i.get(t))==null?void 0:s.get(o)}hasCellValidation(e){return!e||!e.rowNode||!e.column?this.cellValidations.size>0:!!this.getCellValidation(e)}setCellValidation(e,t){const{rowNode:o,column:i}=e;this.cellValidations.has(o)||this.cellValidations.set(o,new Map),this.cellValidations.get(o).set(i,t)}clearCellValidation(e){var i;const{rowNode:t,column:o}=e;(i=this.cellValidations.get(t))==null||i.delete(o)}setCellValidationMap(e){this.cellValidations=e}getCellValidationMap(){return this.cellValidations}clearCellValidationMap(){this.cellValidations.clear()}},Hr=class{constructor(){this.rowValidations=new Map}getRowValidation(e){const{rowNode:t}=e||{};return this.rowValidations.get(t)}hasRowValidation(e){return!e||!e.rowNode?this.rowValidations.size>0:!!this.getRowValidation(e)}setRowValidation({rowNode:e},t){this.rowValidations.set(e,t)}clearRowValidation({rowNode:e}){this.rowValidations.delete(e)}setRowValidationMap(e){this.rowValidations=e}getRowValidationMap(){return this.rowValidations}clearRowValidationMap(){this.rowValidations.clear()}};function Zu(e){const{rowIndex:t,rowPinned:o,column:i}=e;return`${t}.${o??"null"}.${i.getId()}`}function Qu(e,t){const o=e.column===t.column,i=e.rowPinned===t.rowPinned,s=e.rowIndex===t.rowIndex;return o&&i&&s}function Xu(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(M(t.rowPinned))return t.rowPinned!=="top";break}return e.rowIndex<t.rowIndex}function Ju(e){let t=0,o;const{pinnedRowModel:i,rowModel:s,pageBounds:n}=e;return i!=null&&i.getPinnedTopRowCount()?o="top":s.getRowCount()?(o=null,t=n.getFirstRow()):i!=null&&i.getPinnedBottomRowCount()&&(o="bottom"),o===void 0?null:{rowIndex:t,rowPinned:o}}function eh(e){let t,o=null;const{pinnedRowModel:i,pageBounds:s}=e,n=i==null?void 0:i.getPinnedBottomRowCount(),r=i==null?void 0: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 it(e,t){var o,i;switch(t.rowPinned){case"top":return(o=e.pinnedRowModel)==null?void 0:o.getPinnedTopRow(t.rowIndex);case"bottom":return(i=e.pinnedRowModel)==null?void 0:i.getPinnedBottomRow(t.rowIndex);default:return e.rowModel.getRow(t.rowIndex)}}function Yo(e,t){var s;const o=(s=e.spannedRowRenderer)==null?void 0:s.getCellByPosition(t);if(o)return o;const i=e.rowRenderer.getRowByPosition(t);return i?i.getCellCtrl(t.column):null}function th(e,t,o){const{rowModel:i,pinnedRowModel:s}=e;let n;return n??(n=i==null?void 0:i.getRowNode(t)),o?n??(n=s==null?void 0:s.getPinnedRowById(t,o)):(n??(n=s==null?void 0:s.getPinnedRowById(t,"top")),n??(n=s==null?void 0:s.getPinnedRowById(t,"bottom"))),n}function Zo(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!=null&&n.isRowsToRender("top")?{rowIndex:n.getPinnedTopRowCount()-1,rowPinned:"top"}:null;const l=i?void 0:r.getRow(o);return Br(e,l,!0)??{rowIndex:o-1,rowPinned:i}}function Or(e,t){const{rowIndex:o,rowPinned:i}=t,{pageBounds:s,pinnedRowModel:n,rowModel:r}=e;if(oh(e,t))return i==="bottom"?null:i==="top"&&r.isRowsToRender()?{rowIndex:s.getFirstRow(),rowPinned:null}:n!=null&&n.isRowsToRender("bottom")?{rowIndex:0,rowPinned:"bottom"}:null;const l=i?void 0:r.getRow(o);return Br(e,l)??{rowIndex:o+1,rowPinned:i}}function Br(e,t,o=!1){const{gos:i,rowRenderer:s}=e;if(!(t!=null&&t.sticky)||!ir(i))return;const n=s.getStickyTopRowCtrls(),r=s.getStickyBottomRowCtrls(),l=!r.some(u=>u.rowNode.rowIndex===t.rowIndex),a=l?n:r,d=(o?-1:1)*(l?-1:1);let c;for(let u=0;u<a.length;u++)if(a[u].rowNode.rowIndex===t.rowIndex){c=a[u+d];break}return c?{rowIndex:c.rowNode.rowIndex,rowPinned:null}:void 0}function oh(e,t){const{rowPinned:o,rowIndex:i}=t,{pinnedRowModel:s,pageBounds:n}=e;return o==="top"?((s==null?void 0:s.getPinnedTopRowCount())??0)-1<=i:o==="bottom"?((s==null?void 0:s.getPinnedBottomRowCount())??0)-1<=i:n.getLastRow()<=i}function hs(e,t={}){var d;const{rowIndex:o,rowId:i,rowCtrl:s,rowPinned:n}=t;if(s)return s;const{rowModel:r,rowRenderer:l}=e;let{rowNode:a}=t;return a||(i?a=th(e,i,n):o!=null&&(a=r.getRow(o))),(d=l.getRowCtrls(a?[a]:[]))==null?void 0:d[0]}function q(e,t={}){var c;const{cellCtrl:o,colId:i,columnId:s,column:n}=t;if(o)return o;const r=e.colModel.getCol(i??s??gs(n)),l=t.rowCtrl??hs(e,t),a=(l==null?void 0:l.getCellCtrl(r))??void 0;if(a)return a;const d=t.rowNode??(l==null?void 0:l.rowNode);if(d)return(c=e.rowRenderer.getCellCtrls([d],[r]))==null?void 0:c[0]}function Vr(e){const{editSvc:t}=e;t!=null&&t.isBatchEditing()?Dt(e):t==null||t.stopEditing(void 0,{source:"api"})}function ih(e,t,o){const{gos:i,popupSvc:s}=t;if(!i.get("stopEditingWhenCellsLoseFocus"))return;const n=r=>{const l=r.relatedTarget;if($i(l)===null){Vr(t);return}let a=o.some(d=>d.contains(l))&&Qr(i,l);a||(a=!!s&&(s.getActivePopups().some(d=>d.contains(l))||s.isElementWithinCustomPopup(l))),a||Vr(t)};o.forEach(r=>e.addManagedElementListeners(r,{focusout:n}))}function gs(e){if(e)return typeof e=="string"?e:e.getColId()}var pe=Symbol("unedited");function Nr(e,t={}){var s;const o=[],i=e.rowRenderer.getCellCtrls(t.rowNodes,t.columns);for(const n of i){const r=(s=n.comp)==null?void 0:s.getCellEditor();r&&o.push({ctrl:n,editor:ds(r)})}return o}var sh=(e,t={})=>Nr(e,t).map(o=>o.editor);function nh(e,t,o,i,s,n){var u;t.length===0&&(o!=null&&o.rowNode)&&(o!=null&&o.column)&&xt(e,o,{key:i,event:s,cellStartedEdit:n});const{valueSvc:r,editSvc:l,editModelSvc:a}=e,{rowNode:d,column:c}=o??{};for(const h of t){const{rowNode:g,column:p}=h,f=q(e,h);if(!f){if(g&&p){const m=r.getValue(p,g,void 0,"api"),v=((o==null?void 0:o.rowNode)===g&&(o==null?void 0:o.column)===p&&i||void 0)??(l==null?void 0:l.getCellDataValue(h,!1))??((u=r.getValueForDisplay(p,g))==null?void 0:u.value)??m??pe;a==null||a.setEdit(h,{pendingValue:v,sourceValue:m,state:"editing"})}continue}const C=n&&d===f.rowNode&&f.column===c;xt(e,{rowNode:d,column:f.column},{key:C?i:null,event:C?s:null,cellStartedEdit:C})}}function ze({pendingValue:e,sourceValue:t}){return e===pe&&(e=t),e!==t}function xt(e,t,o){var C,m,w,b,v,S,D;const{key:i,event:s,cellStartedEdit:n,silent:r}=o??{},l=q(e,t),a=(C=l==null?void 0:l.comp)==null?void 0:C.getCellEditor(),d=Wr(e,t,i,n),c=(m=e.editModelSvc)==null?void 0:m.getEdit(t);let u=(i==null?void 0:i.length)===1?i:d.value;if(u===void 0&&(u=c==null?void 0:c.sourceValue),(w=e.editModelSvc)==null||w.setEdit(t,{editorValue:u,state:"editing"}),a){(b=a.refresh)==null||b.call(a,d);return}const h=t.column.getColDef(),g=Ar(e.userCompFactory,h,d),p=(g==null?void 0:g.popupFromSelector)!=null?g.popupFromSelector:!!h.cellEditorPopup,f=(g==null?void 0:g.popupPositionFromSelector)!=null?g.popupPositionFromSelector:h.cellEditorPopupPosition;zr(g.params,s),l&&(l.editCompDetails=g,(v=l.comp)==null||v.setEditDetails(g,p,f,e.gos.get("reactiveCustomComponents")),(S=l==null?void 0:l.rowCtrl)==null||S.refreshRow({suppressFlash:!0}),r||(D=e.editSvc)==null||D.dispatchCellEvent(t,s,"cellEditingStarted"))}function _r(e){var s;const t={editorValueExists:!1},o=(s=e.getValidationErrors)==null?void 0:s.call(e);return((o==null?void 0:o.length)??0)>0?t:{editorValue:e.getValue(),editorValueExists:!0}}function Wr(e,t,o,i){var C,m,w,b;const{valueSvc:s,gos:n,editSvc:r}=e,l=q(e,t),a=((C=t.rowNode)==null?void 0:C.rowIndex)??void 0,d=r==null?void 0:r.isBatchEditing(),c=e.colModel.getCol(t.column.getId()),{rowNode:u,column:h}=t,g=(m=l.comp)==null?void 0:m.getCellEditor(),p=(r==null?void 0:r.getCellDataValue(t,!1))??(g?(w=_r(g))==null?void 0:w.editorValue:void 0),f=p===pe?(b=s.getValueForDisplay(c,u))==null?void 0:b.value:p;return _(n,{value:f,eventKey:o??null,column:h,colDef:h.getColDef(),rowIndex:a,node:u,data:u.data,cellStartedEdit:i??!1,onKeyDown:l==null?void 0:l.onKeyDown.bind(l),stopEditing:v=>{r.stopEditing(t,{source:d?"ui":"api",suppressNavigateAfterEdit:v}),Xo(e,t)},eGridCell:l==null?void 0:l.eGui,parseValue:v=>s.parseValue(c,u,v,l==null?void 0:l.value),formatValue:l==null?void 0:l.formatValue.bind(l),validate:()=>{r==null||r.validateEdit()}})}function ps(e,t){const{editModelSvc:o}=e;o==null||o.getEditMap().forEach((i,s)=>{i.forEach((n,r)=>{!t&&(n.state==="editing"||n.pendingValue===pe)||!ze(n)&&(n.state!=="editing"||t)&&(o==null||o.removeEdits({rowNode:s,column:r}))})})}function rh(e,t){var d;const o=(d=t.comp)==null?void 0:d.getCellEditor();if(!(o!=null&&o.refresh))return;const{eventKey:i,cellStartedEdit:s}=t.editCompDetails.params,{column:n}=t,r=Wr(e,t,i,s),l=n.getColDef(),a=Ar(e.userCompFactory,l,r);o.refresh(zr(a.params,i))}function zr(e,t){var o;return t instanceof KeyboardEvent&&e.column.getColDef().cellEditor==="agNumberCellEditor"?e.suppressPreventDefault=["-","+",".","e"].includes((t==null?void 0:t.key)??"")||e.suppressPreventDefault:(o=t==null?void 0:t.preventDefault)==null||o.call(t),e}function st(e,t){var o;(o=e.editModelSvc)==null||o.getEditPositions().forEach(i=>{const s=q(e,i);if(!s)return;const n=s.comp.getCellEditor();if(!n)return;const{editorValue:r,editorValueExists:l}=_r(n);Qo(e,i,t,r,void 0,!l)})}function Qo(e,t,o,i,s,n){var g;const{editModelSvc:r,valueSvc:l}=e;if(!r)return;const{rowNode:a,column:d}=t;if(!(a&&d))return;const c=q(e,t),u=!!((g=c==null?void 0:c.comp)!=null&&g.getCellEditor());let h=r.getEdit(t,!0);h!=null&&h.sourceValue||(h=r.setEdit(t,{sourceValue:l.getValue(d,a,void 0,"api"),pendingValue:pe,state:u?"editing":"changed"})),r.setEdit(t,{editorValue:n?h.sourceValue:i,state:u?"editing":"changed"}),o&&lh(e,t)}function lh(e,t){const{editModelSvc:o}=e,i=o==null?void 0:o.getEdit(t,!0);o==null||o.setEdit(t,{pendingValue:i==null?void 0:i.editorValue})}function Dt(e,t,o){var i;t||(t=(i=e.editModelSvc)==null?void 0:i.getEditPositions()),t.forEach(s=>Xo(e,s,o))}function Xo(e,t,o){var h,g;const{editSvc:i,editModelSvc:s}=e,{rowNode:n,column:r}=t,l=q(e,t);if(!l){s!=null&&s.hasEdits(t)&&n&&r&&(s==null||s.setEdit(t,{state:"changed"}));return}const{comp:a}=l;if(a&&!a.getCellEditor())return;const d=(g=(h=a==null?void 0:a.getCellEditor())==null?void 0:h.getValidationErrors)==null?void 0:g.call(h),c=s==null?void 0:s.getCellValidationModel();d!=null&&d.length?c==null||c.setCellValidation(t,{errorMessages:d}):c==null||c.clearCellValidation(t),s!=null&&s.getEdit(t)&&(s==null||s.setEdit(t,{state:"changed"})),a==null||a.setEditDetails(),a==null||a.refreshEditStyles(!1,!1),l==null||l.refreshCell({force:!0,suppressFlash:!0});const u=s==null?void 0:s.getEdit(t);(u==null?void 0:u.state)==="changed"&&!(o!=null&&o.silent)&&(i==null||i.dispatchCellEvent(t,o==null?void 0:o.event,"cellEditingStopped",{valueChanged:ze(u),newValue:u==null?void 0:u.pendingValue,oldValue:u==null?void 0:u.sourceValue}))}function nt(e){var u,h,g,p,f,C,m,w;const t=Nr(e),o=new Gr,{ariaAnnounce:i,localeSvc:s,editModelSvc:n,gos:r}=e,l=r.get("editType")==="fullRow",d=vn(s)("ariaValidationErrorPrefix","Cell Editor Validation");for(const b of t){const{ctrl:v,editor:S}=b,{rowNode:D,column:I}=v,O=((u=S.getValidationErrors)==null?void 0:u.call(S))??[],F=((h=S.getValidationElement)==null?void 0:h.call(S,!1))||!((g=S.isPopup)!=null&&g.call(S))&&v.eGui;if(F){const P=O!=null&&O.length>0,T=P?O.join(". "):"";_d(F,P),P&&i.announceValue(`${d} ${O}`,"editorValidation"),F instanceof HTMLInputElement?F.setCustomValidity(T):F.classList.toggle("invalid",P)}(O==null?void 0:O.length)>0&&o.setCellValidation({rowNode:D,column:I},{errorMessages:O})}st(e,!1),n==null||n.setCellValidationModel(o);const c=new Set;for(const{ctrl:b}of t)c.add(b.rowCtrl);if(l){const b=ah(e);n==null||n.setRowValidationModel(b)}for(const b of c.values()){(p=b.rowEditStyleFeature)==null||p.applyRowStyles();for(const v of b.getAllCellCtrls())(f=v.tooltipFeature)==null||f.refreshTooltip(!0),(C=v.editorTooltipFeature)==null||C.refreshTooltip(!0),(w=(m=v.editStyleFeature)==null?void 0:m.applyCellStyles)==null||w.call(m)}}var ah=e=>{var s;const t=new Hr,o=e.gos.get("getFullRowEditValidationErrors"),i=(s=e.editModelSvc)==null?void 0:s.getEditMap();if(!i)return t;for(const n of i.keys()){const r=i.get(n);if(!r)continue;const l=[],{rowIndex:a,rowPinned:d}=n;for(const u of r.keys()){const h=r.get(u);if(!h)continue;const{editorValue:g,pendingValue:p,sourceValue:f}=h,C=g??(p===pe?void 0:p)??f;l.push({column:u,colId:u.getColId(),rowIndex:a,rowPinned:d,oldValue:f,newValue:C})}const c=(o==null?void 0:o({editorsState:l}))??[];c.length>0&&t.setRowValidation({rowNode:n},{errorMessages:c})}return t};function dh(e){var i;nt(e);const t=(i=e.editModelSvc)==null?void 0:i.getCellValidationModel().getCellValidationMap();if(!t)return null;const o=[];return t.forEach((s,n)=>{s.forEach(({errorMessages:r},l)=>{o.push({column:l,rowIndex:n.rowIndex,rowPinned:n.rowPinned,messages:r??null})})}),o}var ch="ag-column-first",uh="ag-column-last";function $r(e,t,o,i){return K(e)?[]:gh(e.headerClass,e,t,o,i)}function Ur(e,t,o){e.toggleCss(ch,o.isColAtEdge(t,"first")),e.toggleCss(uh,o.isColAtEdge(t,"last"))}function hh(e,t,o,i){return _(t,{colDef:e,column:o,columnGroup:i})}function gh(e,t,o,i,s){if(K(e))return[];let n;if(typeof e=="function"){const r=hh(t,o,i,s);n=e(r)}else n=e;return typeof n=="string"?[n]:Array.isArray(n)?[...n]:[]}function ph(e){return!!(e.rowPinned&&e.pinnedSibling)}var y={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"},fs=!1,Jo=0;function fh(e){Jo>0||(e.addEventListener("keydown",ei),e.addEventListener("mousedown",ei))}function Ch(e){Jo>0||(e.removeEventListener("keydown",ei),e.removeEventListener("mousedown",ei))}function ei(e){const t=fs,o=e.type==="keydown";o&&(e.ctrlKey||e.metaKey||e.altKey)||t!==o&&(fs=o)}function mh(e){const t=J(e);return fh(t),Jo++,()=>{Jo--,Ch(t)}}function wh(){return fs}function Ft(e,t,o=!1){const i=tc;let s=Ln;t&&(s+=", "+t),o&&(s+=', [tabindex="-1"]');const n=Array.prototype.slice.apply(e.querySelectorAll(i)).filter(a=>Me(a)),r=Array.prototype.slice.apply(e.querySelectorAll(s));return r.length?((a,d)=>a.filter(c=>d.indexOf(c)===-1))(n,r):n}function ti(e,t=!1,o=!1,i=!1){const s=Ft(e,i?".ag-tab-guard":null,o),n=t?$(s):s[0];return n?(n.focus({preventScroll:!0}),!0):!1}function oi(e,t,o,i){const s=Ft(t,null),n=Y(e);let r;r=s.indexOf(n);const l=r+(i?-1:1);return l<0||l>=s.length?null:s[l]}function vh(e,t=5){let o=0;for(;e&&$i(e)===null&&++o<=t;)e=e.parentElement;return $i(e)===null?null:e}function rt(e){var t;return e.gos.get("suppressHeaderFocus")||!!((t=e.overlays)!=null&&t.isExclusive())}function ii(e){var t;return e.gos.get("suppressCellFocus")||!!((t=e.overlays)!=null&&t.isExclusive())}function to(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 bh(e,t,o,{rowNode:i,column:s},n){return _(e.gos,{type:o,node:i,data:i.data,value:n,column:s,colDef:s.getColDef(),rowPinned:i.rowPinned,event:t,rowIndex:i.rowIndex})}function Sh(e,t=!1){return e===y.DELETE?!0:!t&&e===y.BACKSPACE?An():!1}var yh=class extends x{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 y.ENTER:this.onEnterKeyDown(e);break;case y.F2:this.onF2KeyDown(e);break;case y.ESCAPE:this.onEscapeKeyDown(e);break;case y.TAB:this.onTabKeyDown(e);break;case y.BACKSPACE:case y.DELETE:this.onBackspaceOrDeleteKeyDown(t,e);break;case y.DOWN:case y.UP:case y.RIGHT:case y.LEFT:this.onNavigationKeyDown(e,t);break}}onNavigationKeyDown(e,t){var s,n;const{cellCtrl:o,beans:i}=this;if(!((s=i.editSvc)!=null&&s.isEditing(o,{withOpenEditor:!0}))){if(e.shiftKey&&o.isRangeSelectionEnabled())this.onShiftRangeSelect(e);else{const r=o.getFocusedCellPosition();(n=i.navigation)==null||n.navigateToNextCell(e,t,r,!0)}e.preventDefault()}}onShiftRangeSelect(e){const{rangeSvc:t,navigation:o}=this.beans;if(!t)return;const i=t.extendLatestRangeInDirection(e);i&&(e.key===y.LEFT||e.key===y.RIGHT?o==null||o.ensureColumnVisible(i.column):o==null||o.ensureRowVisible(i.rowIndex))}onTabKeyDown(e){var t;(t=this.beans.navigation)==null||t.onTabKeyDown(this.cellCtrl,e)}onBackspaceOrDeleteKeyDown(e,t){var d;const{cellCtrl:o,beans:i,rowNode:s}=this,{gos:n,rangeSvc:r,eventSvc:l,editSvc:a}=i;if(l.dispatchEvent({type:"keyShortcutChangedCellStart"}),Sh(e,n.get("enableCellEditingOnBackspace"))&&!(a!=null&&a.isEditing(o,{withOpenEditor:!0}))){if(r&&Je(n))r.clearCellRangeCellValues({dispatchWrapperEvents:!0,wrapperEventSource:"deleteKey"});else if(o.isCellEditable()){const{column:c}=o,u=this.beans.valueSvc.getDeleteValue(c,s);s.setDataValue(c,u,"cellClear")}}else a!=null&&a.isEditing(o,{withOpenEditor:!0})||(d=i.editSvc)==null||d.startEditing(o,{startedEdit:!0,event:t});l.dispatchEvent({type:"keyShortcutChangedCellEnd"})}onEnterKeyDown(e){var d;const{cellCtrl:t,beans:o}=this,{editSvc:i,navigation:s}=o,n=i==null?void 0:i.isEditing(t),r=t.rowNode,l=i==null?void 0:i.isRowEditing(r),a=c=>{(i==null?void 0:i.startEditing(c,{startedEdit:!0,event:e}))&&e.preventDefault()};if(n||l){if(this.isCtrlEnter(e)){i==null||i.applyBulkEdit(t,((d=o==null?void 0:o.rangeSvc)==null?void 0:d.getCellRanges())||[]);return}if(nt(o),(i==null?void 0:i.checkNavWithValidation(void 0,e))==="block-stop")return;i!=null&&i.isEditing(t,{withOpenEditor:!0})?i==null||i.stopEditing(t,{event:e}):l&&!t.isCellEditable()?i==null||i.stopEditing({rowNode:r},{event:e}):a(t)}else if(o.gos.get("enterNavigatesVertically")){const c=e.shiftKey?y.UP:y.DOWN;s==null||s.navigateToNextCell(null,c,t.cellPosition,!1)}else{if(i!=null&&i.hasValidationErrors())return;i!=null&&i.hasValidationErrors(t)&&i.revertSingleCellEdit(t,!0),a(t)}}isCtrlEnter(e){return(e.ctrlKey||e.metaKey)&&e.key===y.ENTER}onF2KeyDown(e){const{cellCtrl:t,beans:{editSvc:o}}=this;o!=null&&o.isEditing()&&(nt(this.beans),(o==null?void 0:o.checkNavWithValidation(void 0,e))==="block-stop")||o==null||o.startEditing(t,{startedEdit:!0,event:e})}onEscapeKeyDown(e){const{cellCtrl:t,beans:{editSvc:o}}=this;(o==null?void 0:o.checkNavWithValidation(t,e))==="block-stop"&&o.revertSingleCellEdit(t),o==null||o.stopEditing(t,{event:e,cancel:!0})}processCharacter(e){var r;const o=e.target!==this.eGui,{beans:{editSvc:i},cellCtrl:s}=this;if(o||i!=null&&i.isEditing(s,{withOpenEditor:!0}))return;if(e.key===y.SPACE)this.onSpaceKeyDown(e);else if(i!=null&&i.isCellEditable(s,"ui")){if(i!=null&&i.hasValidationErrors()&&!(i!=null&&i.hasValidationErrors(s)))return;i==null||i.startEditing(s,{startedEdit:!0,event:e,source:"api"});const l=s.editCompDetails;!((r=l==null?void 0:l.params)!=null&&r.suppressPreventDefault)&&e.preventDefault()}}onSpaceKeyDown(e){var s;const{gos:t,editSvc:o}=this.beans,{rowNode:i}=this.cellCtrl;!(o!=null&&o.isEditing(this.cellCtrl,{withOpenEditor:!0}))&&Qe(t)&&((s=this.beans.selectionSvc)==null||s.handleSelectionEvent(e,i,"spaceKey")),e.preventDefault()}};function Kr(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}function jr({gos:e},t){return t.button===2||t.ctrlKey&&e.get("allowContextMenuWithControlKey")}var Rh=class extends x{constructor(e,t,o){super(),this.cellCtrl=e,this.column=o,this.beans=t}onMouseEvent(e,t){if(!ke(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){var h;if((h=this.beans.touchSvc)!=null&&h.handleCellDoubleClick(this,e))return;const{eventSvc:t,rangeSvc:o,editSvc:i,editModelSvc:s,frameworkOverrides:n}=this.beans,r=e.ctrlKey||e.metaKey,{cellCtrl:l}=this,{column:a,cellPosition:d}=l;o&&r&&o.getCellRangeCount(d)>1&&o.intersectLastRange(!0);const c=l.createEvent(e,"cellClicked");t.dispatchEvent(c);const u=a.getColDef();if(u.onCellClicked&&window.setTimeout(()=>{n.wrapOutgoing(()=>{u.onCellClicked(c)})},0),(s==null?void 0:s.getState(l))!=="editing"){const g=i==null?void 0:i.isEditing(),p=(s==null?void 0:s.getCellValidationModel().getCellValidationMap().size)??0,f=(s==null?void 0:s.getRowValidationModel().getRowValidationMap().size)??0;if(g&&(p>0||f>0))return;i!=null&&i.shouldStartEditing(l,e)?i==null||i.startEditing(l,{event:e}):i!=null&&i.shouldStopEditing(l,e)&&(i==null||i.stopEditing(l))}}onCellDoubleClicked(e){var c;const{column:t,beans:o,cellCtrl:i}=this,{eventSvc:s,frameworkOverrides:n,editSvc:r,editModelSvc:l}=o,a=t.getColDef(),d=i.createEvent(e,"cellDoubleClicked");if(s.dispatchEvent(d),typeof a.onCellDoubleClicked=="function"&&window.setTimeout(()=>{n.wrapOutgoing(()=>{a.onCellDoubleClicked(d)})},0),r!=null&&r.shouldStartEditing(this.cellCtrl,e)&&((c=this.beans.editModelSvc)==null?void 0:c.getState(this.cellCtrl))!=="editing"){const u=r==null?void 0:r.isEditing(),h=(l==null?void 0:l.getCellValidationModel().getCellValidationMap().size)??0,g=(l==null?void 0:l.getRowValidationModel().getRowValidationMap().size)??0;if(u&&(h>0||g>0))return;r==null||r.startEditing(i,{event:e})}}onMouseDown(e){const{ctrlKey:t,metaKey:o,shiftKey:i}=e,s=e.target,{cellCtrl:n,beans:r}=this,{eventSvc:l,rangeSvc:a,rowNumbersSvc:d,focusSvc:c,gos:u,editSvc:h}=r;if(this.isRightClickInExistingRange(e))return;const g=a&&!a.isEmpty(),p=this.containsWidget(s),{cellPosition:f,column:C}=n,m=ot(C);if(d&&m&&!d.handleMouseDownOnCell(f,e)){a&&e.preventDefault(),e.stopImmediatePropagation();return}if(!i||!g){const w=h==null?void 0:h.isEditing(n),v=u.get("enableCellTextSelection")&&e.defaultPrevented,S=(ht()||v)&&!w&&!Ui(s)&&!p;n.focusCell(S,e)}if(i&&g&&!c.isCellFocused(f)){e.preventDefault();const w=c.getFocusedCell();if(w){const{column:b,rowIndex:v,rowPinned:S}=w;h!=null&&h.isEditing(w)&&(h==null||h.stopEditing(w)),c.setFocusedCell({column:b,rowIndex:v,rowPinned:S,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0,sourceEvent:e})}}if(!p){if(a){m&&e.preventDefault();const w=jr(this.beans,e)&&m;if(i)a.extendLatestRangeToCell(f);else if(!w){const b=t||o;a.setRangeToCell(f,b)}}l.dispatchEvent(this.cellCtrl.createEvent(e,"cellMouseDown"))}}isRightClickInExistingRange(e){const{rangeSvc:t}=this.beans;if(t){const o=t.isCellInAnyRange(this.cellCtrl.cellPosition),i=jr(this.beans,e);if(o&&i)return!0}return!1}containsWidget(e){return pt(e,"ag-selection-checkbox",3)||pt(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==null||o.clearMouseOver()}onMouseOver(e){if(this.mouseStayingInsideCell(e))return;const{eventSvc:t,colHover:o}=this.beans;t.dispatchEvent(this.cellCtrl.createEvent(e,"cellMouseOver")),o==null||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}},Eh=class extends x{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();if(e||(this.setupColSpan(),this.setupRowSpan()),this.onLeftChanged(),this.onWidthChanged(),e||this._legacyApplyRowSpan(),e){const t=this.refreshSpanHeight.bind(this,e);t(),this.addManagedListeners(this.beans.eventSvc,{paginationChanged:t,recalculateRowBounds:t,pinnedHeightChanged:t})}}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();Jt(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||K(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=$(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=is(this.beans)*this.rowSpan;this.eContent.style.height=`${o}px`,this.eContent.style.zIndex="1"}destroy(){super.destroy()}},xh="ag-cell",Dh="ag-cell-auto-height",Fh="ag-cell-normal-height",Ph="ag-cell-focus",Th="ag-cell-first-right-pinned",Ih="ag-cell-last-left-pinned",Ah="ag-cell-not-inline-editing",Mh="ag-cell-wrap-text",si="cellCtrl";function qr(e,t){return ar(e,t,si)}var kh=0,Pt=class extends x{constructor(e,t,o,i){super(),this.column=e,this.rowNode=t,this.rowCtrl=i,this.rangeFeature=void 0,this.rowResizeFeature=void 0,this.positionFeature=void 0,this.customStyleFeature=void 0,this.editStyleFeature=void 0,this.mouseListener=void 0,this.keyboardListener=void 0,this.suppressRefreshCell=!1,this.onCompAttachedFuncs=[],this.onEditorAttachedFuncs=[],this.focusEventWhileNotReady=null,this.hasBeenFocused=!1,this.hasEdit=!1,this.tooltipFeature=void 0,this.editorTooltipFeature=void 0,this.beans=o,this.gos=o.gos,this.editSvc=o.editSvc,this.hasEdit=!!o.editSvc;const{colId:s}=e;this.instanceId=s+"-"+kh++,this.createCellPosition(),this.updateAndFormatValue(!1)}addFeatures(){var i,s;const{beans:e}=this;this.positionFeature=new Eh(this,e),this.customStyleFeature=(i=e.cellStyles)==null?void 0:i.createCellCustomStyleFeature(this,e),this.editStyleFeature=(s=e.editSvc)==null?void 0:s.createCellStyleFeature(this,e),this.mouseListener=new Rh(this,e,this.column),this.keyboardListener=new yh(this,e,this.rowNode,this.rowCtrl),this.enableTooltipFeature();const{rangeSvc:t}=e;t&&Je(e.gos)&&(this.rangeFeature=t.createCellRangeFeature(e,this)),ot(this.column)&&(this.rowResizeFeature=this.beans.rowNumbersSvc.createRowNumbersRowResizerFeature(e,this))}isCellSpanning(){return!1}getCellSpan(){}removeFeatures(){const e=this.beans.context;this.positionFeature=e.destroyBean(this.positionFeature),this.editorTooltipFeature=e.destroyBean(this.editorTooltipFeature),this.customStyleFeature=e.destroyBean(this.customStyleFeature),this.editStyleFeature=e.destroyBean(this.editStyleFeature),this.mouseListener=e.destroyBean(this.mouseListener),this.keyboardListener=e.destroyBean(this.keyboardListener),this.rangeFeature=e.destroyBean(this.rangeFeature),this.rowResizeFeature=e.destroyBean(this.rowResizeFeature),this.disableTooltipFeature()}enableTooltipFeature(e,t){var o;this.tooltipFeature=(o=this.beans.tooltipSvc)==null?void 0:o.enableCellTooltipFeature(this,e,t)}disableTooltipFeature(){this.tooltipFeature=this.beans.context.destroyBean(this.tooltipFeature)}enableEditorTooltipFeature(e){var t;this.editorTooltipFeature&&this.disableEditorTooltipFeature(),this.editorTooltipFeature=(t=this.beans.tooltipSvc)==null?void 0:t.setupCellEditorTooltip(this,e),nt(this.beans)}disableEditorTooltipFeature(){this.editorTooltipFeature=this.beans.context.destroyBean(this.editorTooltipFeature)}setComp(e,t,o,i,s,n,r){var l,a,d,c,u,h,g,p;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(),(l=this.positionFeature)==null||l.init(),(a=this.customStyleFeature)==null||a.setComp(e),(d=this.editStyleFeature)==null||d.setComp(e),(c=this.tooltipFeature)==null||c.refreshTooltip(),(u=this.keyboardListener)==null||u.init(),(h=this.rangeFeature)==null||h.setComp(e),(g=this.rowResizeFeature)==null||g.refreshRowResizer(),n&&this.isCellEditable()?(p=this.editSvc)==null||p.startEditing(this,{startedEdit:!0,source:"api"}):this.showValue(!1,!0),this.onCompAttachedFuncs.length&&(this.onCompAttachedFuncs.forEach(f=>f()),this.onCompAttachedFuncs=[])}setupAutoHeight(e,t){var o;this.isAutoHeight=((o=this.beans.rowAutoHeight)==null?void 0:o.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}getDeferLoadingCellRenderer(){var a,d;const{beans:e,column:t}=this,{userCompFactory:o,ctrlsSvc:i,eventSvc:s}=e,n=t.getColDef(),r=this.createCellRendererParams();r.deferRender=!0;const l=Ir(o,n,r);if((d=(a=i.getGridBodyCtrl())==null?void 0:a.scrollFeature)!=null&&d.isScrolling()){let c;const u=new eo(h=>{c=h});return this.addManagedListeners(s,{bodyScrollEnd:()=>c()}),{loadingComp:l,onReady:u}}return{loadingComp:l,onReady:eo.resolve()}}showValue(e,t){var u,h,g;const{beans:o,column:i,rowNode:s,rangeFeature:n}=this,{userCompFactory:r}=o;let l=this.getValueToDisplay(),a;const d=s.stub&&((u=s.groupData)==null?void 0:u[i.getId()])==null,c=i.getColDef();if(d||this.isCellRenderer()){const p=this.createCellRendererParams();!d||ot(i)?a=Tr(r,c,p):a=Ir(r,c,p)}if(!a&&!d&&((h=o.findSvc)!=null&&h.isMatch(s,i))){const p=this.createCellRendererParams();a=Tr(r,{...i.getColDef(),cellRenderer:"agFindCellRenderer"},p)}if(this.hasEdit&&this.editSvc.isBatchEditing()&&this.editSvc.isRowEditing(s,{checkSiblings:!0})){const p=this.editSvc.prepDetailsDuringBatch(this,{compDetails:a,valueToDisplay:l});p&&(p.compDetails?a=p.compDetails:p.valueToDisplay&&(l=p.valueToDisplay))}this.comp.setRenderDetails(a,l,e),!t&&n&&Ne(o,()=>n==null?void 0:n.refreshHandle()),(g=this.rowResizeFeature)==null||g.refreshRowResizer()}setupControlComps(){const e=this.column.getColDef();this.includeSelection=this.isIncludeControl(this.isCheckboxSelection(e),!0),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,t=!1){return(this.rowNode.rowPinned==null||t&&ph(this.rowNode))&&!!e}isCheckboxSelection(e){const{rowSelection:t,groupDisplayType:o}=this.beans.gridOptions,i=Go(t),s=tt(this.column);return o==="custom"&&i!=="selectionColumn"&&s?!1:e.checkboxSelection||s&&typeof t=="object"&&wt(t)}refreshShouldDestroy(){const e=this.column.getColDef(),t=this.includeSelection!=this.isIncludeControl(this.isCheckboxSelection(e),!0),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(){const{editSvc:e}=this.beans;e!=null&&e.isEditing(this,{withOpenEditor:!0})&&(e==null||e.stopEditing(this,{source:e!=null&&e.isBatchEditing()?"ui":"api"}))}stopEditing(e=!1){const{editSvc:t}=this.beans;return(t==null?void 0:t.stopEditing(this,{cancel:e,source:t!=null&&t.isBatchEditing()?"ui":"api"}))??!1}createCellRendererParams(){const{value:e,valueFormatted:t,column:o,rowNode:i,comp:s,eGui:n,beans:{valueSvc:r,gos:l,editSvc:a}}=this;return _(l,{value:e,valueFormatted:t,getValue:()=>r.getValueForDisplay(o,i).value,setValue:c=>(a==null?void 0:a.setDataValue({rowNode:i,column:o},c))||r.setValue(i,o,c),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:(c,u,h,g)=>this.registerRowDragger(c,u,g),setTooltip:(c,u)=>{var h;l.assertModuleRegistered("Tooltip",3),this.tooltipFeature&&this.disableTooltipFeature(),this.enableTooltipFeature(c,u),(h=this.tooltipFeature)==null||h.refreshTooltip()}})}onCellChanged(e){e.column===this.column&&this.refreshCell({})}refreshOrDestroyCell(e){var t;this.refreshShouldDestroy()?(t=this.rowCtrl)==null||t.recreateCell(this):this.refreshCell(e)}refreshCell({force:e,suppressFlash:t,newData:o}={}){var d,c,u,h,g,p,f,C;if(this.suppressRefreshCell)return;const i=this.column.getColDef(),s=i.field==null&&i.valueGetter==null&&i.showRowGroup==null,n=e||s||o,r=!!this.comp,l=this.updateAndFormatValue(r),a=n||l;if(r){if(a){this.showValue(!!o,!1);const m=(d=this.beans.filterManager)==null?void 0:d.isSuppressFlashingCellsBecauseFiltering();!t&&!m&&i.enableCellChangeFlash&&((c=this.beans.cellFlashSvc)==null||c.flashCell(this)),(h=(u=this.editStyleFeature)==null?void 0:u.applyCellStyles)==null||h.call(u),(g=this.customStyleFeature)==null||g.applyUserStyles(),(p=this.customStyleFeature)==null||p.applyClassesFromColDef()}(f=this.tooltipFeature)==null||f.refreshTooltip(),(C=this.customStyleFeature)==null||C.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,{value:i,valueFormatted:s}=this.beans.valueSvc.getValueForDisplay(this.column,this.rowNode,!0);return this.value=i,this.valueFormatted=s,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;Xe(this.beans.gos,t,si,this),e.addDestroyFunc(()=>Xe(this.beans.gos,t,si,null))}createEvent(e,t){const{rowNode:o,column:i,value:s,beans:n}=this;return bh(n,e,t,{rowNode:o,column:i},s)}processCharacter(e){var t;(t=this.keyboardListener)==null||t.processCharacter(e)}onKeyDown(e){var t;(t=this.keyboardListener)==null||t.onKeyDown(e)}onMouseEvent(e,t){var o;(o=this.mouseListener)==null||o.onMouseEvent(e,t)}getColSpanningList(){var e;return((e=this.positionFeature)==null?void 0:e.getColSpanningList())??[]}onLeftChanged(){var e;this.comp&&((e=this.positionFeature)==null||e.onLeftChanged())}onDisplayedColumnsChanged(){this.eGui&&(this.refreshAriaColIndex(),this.refreshFirstAndLastStyles())}refreshFirstAndLastStyles(){const{comp:e,column:t,beans:o}=this;Ur(e,t,o.visibleCols)}refreshAriaColIndex(){const e=this.beans.visibleCols.getAriaColIndex(this.column);Fn(this.eGui,e)}onWidthChanged(){var e;return(e=this.positionFeature)==null?void 0:e.onWidthChanged()}getRowPosition(){const{rowIndex:e,rowPinned:t}=this.cellPosition;return{rowIndex:e,rowPinned:t}}updateRangeBordersIfRangeCount(){var e;this.comp&&((e=this.rangeFeature)==null||e.updateRangeBordersIfRangeCount())}onCellSelectionChanged(){var e;this.comp&&((e=this.rangeFeature)==null||e.onCellSelectionChanged())}isRangeSelectionEnabled(){return this.rangeFeature!=null}focusCell(e=!1,t){var i;const o=(i=this.editSvc)==null?void 0:i.allowedFocusTargetOnValidation(this);o&&o!==this||this.beans.focusSvc.setFocusedCell({...this.getFocusedCellPosition(),forceBrowserFocus:e,sourceEvent:t})}restoreFocus(e=!1){const{beans:{editSvc:t,focusSvc:o},comp:i}=this;if(!i||t!=null&&t.isEditing(this)||!this.isCellFocused()||!o.shouldTakeFocus())return;const s=()=>{if(!this.isAlive())return;const n=i.getFocusableElement();this.isCellFocused()&&n.focus({preventScroll:!0})};if(e){setTimeout(s,0);return}s()}onRowIndexChanged(){var e,t;this.createCellPosition(),this.onCellFocused(),this.restoreFocus(),(e=this.rangeFeature)==null||e.onCellSelectionChanged(),(t=this.rowResizeFeature)==null||t.refreshRowResizer()}onSuppressCellFocusChanged(e){const t=this.eGui;t&&(ot(this.column)&&(e=!0),ce(t,"tabindex",e?void 0:-1))}onFirstRightPinnedChanged(){if(!this.comp)return;const e=this.column.isFirstRightPinned();this.comp.toggleCss(Th,e)}onLastLeftPinnedChanged(){if(!this.comp)return;const e=this.column.isLastLeftPinned();this.comp.toggleCss(Ih,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){var s;const{beans:t}=this;if(ii(t))return;if(!this.comp){e&&(this.focusEventWhileNotReady=e);return}const o=this.isCellFocused(),i=((s=t.editSvc)==null?void 0:s.isEditing(this))??!1;if(this.comp.toggleCss(Ph,o),o&&e&&e.forceBrowserFocus){let n=this.comp.getFocusableElement();if(i){const r=Ft(n,null,!0);r.length&&(n=r[0])}n.focus({preventScroll:!!e.preventScrollOnBrowserFocus})}o&&this.rowCtrl.announceDescription()}createCellPosition(){const{rowIndex:e,rowPinned:t}=this.rowNode;this.cellPosition={rowIndex:e,rowPinned:qe(t),column:this.column}}applyStaticCssClasses(){const{comp:e}=this;e.toggleCss(xh,!0),e.toggleCss(Ah,!0);const t=this.column.isAutoHeight()==!0;e.toggleCss(Dh,t),e.toggleCss(Fh,!t)}onColumnHover(){var e;(e=this.beans.colHover)==null||e.onCellColumnHover(this.column,this.comp)}onColDefChanged(){var e,t;this.comp&&(this.column.isTooltipEnabled()?(this.disableTooltipFeature(),this.enableTooltipFeature()):this.disableTooltipFeature(),this.setWrapText(),(e=this.editSvc)!=null&&e.isEditing(this)?(t=this.editSvc)==null||t.handleColDefChanged(this):this.refreshOrDestroyCell({force:!0,suppressFlash:!0}))}setWrapText(){const e=this.column.getColDef().wrapText==!0;this.comp.toggleCss(Mh,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(){var e;return((e=this.comp)==null?void 0:e.getCellRenderer())??null}destroy(){this.onCompAttachedFuncs=[],this.onEditorAttachedFuncs=[],this.isCellFocused()&&this.hasBrowserFocus()&&this.beans.focusSvc.attemptToRecoverFocus(),super.destroy()}hasBrowserFocus(){var e;return((e=this.eGui)==null?void 0:e.contains(Y(this.beans)))??!1}createSelectionCheckbox(){var t;const e=(t=this.beans.selectionSvc)==null?void 0:t.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){var s;const i=(s=this.beans.rowDragSvc)==null?void 0:s.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}},Yr="__ag_grid_instance";function Zr(e,t){t[Yr]=e.gridInstanceId}function oo(e,t){return Qr(e,t.target)}function Qr(e,t){let o=t;for(;o;){const i=o[Yr];if(M(i))return i===e.gridInstanceId;o=o.parentElement}return!1}function Lh(e,t){var o;return((o=qr(e,t.target))==null?void 0:o.getFocusedCellPosition())??null}var Gh=class extends x{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),we(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){var o;this.dragging=!0,this.dragSource=e,this.eventLastTime=t,this.dragItem=e.getDragItem(),(o=e.onDragStarted)==null||o.call(e),this.createDragAndDropImageComponent()}onDragStop(e){var o,i;(i=(o=this.dragSource)==null?void 0:o.onDragStopped)==null||i.call(o);const{lastDropTarget:t}=this;if(t!=null&&t.onDragStop){const s=this.createDropTargetEvent(t,e,null,null,!1);t.onDragStop(s)}this.clearDragAndDropProperties()}onDragCancel(){var o;const{dragSource:e,lastDropTarget:t}=this;(o=e==null?void 0:e.onDragCancelled)==null||o.call(e),t!=null&&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){var c,u;const o=this.getHorizontalDirection(e),i=this.getVerticalDirection(e);this.eventLastTime=e,this.positionDragAndDropImageComp(e);const s=this.dropTargets.filter(h=>this.isMouseOnDropTarget(e,h)),n=this.findCurrentDropTarget(e,s),{lastDropTarget:r,dragSource:l,dragAndDropImageComp:a,dragItem:d}=this;if(n!==r){if(this.leaveLastTargetIfExists(e,o,i,t),r!==null&&n===null&&((c=l==null?void 0:l.onGridExit)==null||c.call(l,d)),r===null&&n!==null&&((u=l==null?void 0:l.onGridEnter)==null||u.call(l,d)),this.enterDragTargetIfExists(n,e,o,i,t),n&&a){const{comp:h,promise:g}=a;h?h.setIcon(n.getIconName?n.getIconName():null,!1):g.then(p=>{p&&p.setIcon(n.getIconName?n.getIconName():null,!1)})}this.lastDropTarget=n}else if(n&&n.onDragging){const h=this.createDropTargetEvent(n,e,o,i,t);n.onDragging(h)}}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=(l,a)=>{for(const d of a){const{width:c,height:u,left:h,right:g,top:p,bottom:f}=d.getBoundingClientRect();if(c===0||u===0)return!1;const C=l.clientX>=h&&l.clientX<g,m=l.clientY>=p&&l.clientY<f;if(!C||!m)return!1}return!0};for(const l of o)if(s(e,l)){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=Zt(this.beans).elementsFromPoint(e.clientX,e.clientY);for(const n of s)for(const r of t)if(this.getAllContainersFromDropTarget(r).flatMap(a=>a).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){var i;const t=(i=this.eventLastTime)==null?void 0:i.clientX,o=e.clientX;return t===o?null:t>o?"left":"right"}getVerticalDirection(e){var i;const t=(i=this.eventLastTime)==null?void 0:i.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:l,dragSource:a,gos:d}=this,c=t.clientX-r.left,u=t.clientY-r.top;return _(d,{event:t,x:c,y:u,vDirection:i,hDirection:o,dragSource:a,fromNudge:s,dragItem:l,dropZoneTarget:n})}positionDragAndDropImageComp(e){const t=this.getDragAndDropImageComponent();t&&vc(t.getGui(),e,this.beans)}removeDragAndDropImageComponent(){var t;const{dragAndDropImageComp:e}=this;if(e){const{comp:o}=e;if(o){const i=o.getGui();(t=this.dragAndDropImageParent)==null||t.removeChild(i),this.destroyBean(o)}}this.dragAndDropImageComp=null}createDragAndDropImageComponent(){const{dragSource:e,gos:t,userCompFactory:o}=this;if(!e)return;const i=xu(o,_(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"),Zr(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=ns(this.beans);this.dragAndDropImageParent=n,n?n.appendChild(i):k(54)}registerGridDropTarget(e,t){const o={getContainer:e,isInterestedIn:i=>i===1||i===0,getIconName:()=>"notAllowed"};this.addDropTarget(o),t.addDestroyFunc(()=>this.removeDropTarget(o))}},Hh=class extends x{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),we(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=l=>{Ui(l.target)||(s&&l.stopPropagation(),this.onTouchStart(e,l))},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=a=>this.onTouchMove(a,e.eElement),s=a=>this.onTouchUp(a,e.eElement),n=a=>{a.cancelable&&a.preventDefault()},r=t.target,l=[{target:Zt(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(l),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===y.ESCAPE&&this.cancelDrag(e.eElement)},l=Zt(this.beans),a=[{target:l,type:"mousemove",listener:i},{target:l,type:"mouseup",listener:s},{target:l,type:"contextmenu",listener:n},{target:l,type:"keydown",listener:r}];this.addTemporaryEvents(a),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=M(o)?o:4;return Kr(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){var i;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)}(i=this.currentDragParams)==null||i.onDragging(e)}onTouchMove(e,t){const o=this.getFirstActiveTouch(e.touches);o&&this.onCommonMove(o,this.touchStart,t)}onMouseMove(e,t){var o;ht()&&((o=J(this.beans).getSelection())==null||o.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=>{const r=n.target,l=r==null?void 0:r.tagName.toLocaleLowerCase();return!!(l!=null&&l.match("^a$|textarea|input|select|button"))};return o&&i&&e.cancelable&&oo(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){var t,o;this.eventSvc.dispatchEvent({type:"dragCancelled",target:e}),(o=(t=this.currentDragParams)==null?void 0:t.onDragCancel)==null||o.call(t),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 Xr(e,t){return e+"_"+t}function Q(e){return e instanceof io}var io=class extends x{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 Xr(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=>{Q(e)&&e.checkLeft()}),this.displayedChildren.length>0)if(this.gos.get("enableRtl")){const t=$(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(){var t;let e=0;return(t=this.displayedChildren)==null||t.forEach(o=>{e+=o.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(){var e;return!!((e=this.getColGroupDef())!=null&&e.autoHeaderHeight)}getAutoHeaderHeight(){return this.autoHeaderHeight}setAutoHeaderHeight(e){const t=e!==this.autoHeaderHeight;return this.autoHeaderHeight=e,t}addDisplayedLeafColumns(e){this.displayedChildren.forEach(t=>{et(t)?e.push(t):Q(t)&&t.addDisplayedLeafColumns(e)})}addLeafColumns(e){this.children.forEach(t=>{et(t)?e.push(t):Q(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=>{var n;if(Q(o)&&!((n=o.displayedChildren)!=null&&n.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"})}},Cs="row-group-",ms="t-",ws="b-",Oh=0,so=class{constructor(e){this.master=!1,this.detail=void 0,this.rowIndex=null,this.key=null,this.sourceRowIndex=-1,this.childrenMapped=null,this.treeParent=null,this.treeNodeFlags=0,this.displayed=!1,this.rowTop=null,this.oldRowTop=null,this.selectable=!0,this.__objectId=Oh++,this.alreadyRendered=!1,this.hovered=!1,this.__selected=!1,this.beans=e}setData(e){this.setDataCommon(e,!1)}updateData(e){this.setDataCommon(e,!0)}setDataCommon(e,t){var l,a,d;const{valueCache:o,eventSvc:i}=this.beans,s=this.data;this.data=e,o==null||o.onDataChanged(),this.updateDataOnDetailNode(),this.resetQuickFilterAggregateText();const n=this.createDataChangedEvent(e,s,t);if((l=this.__localEventService)==null||l.dispatchEvent(n),this.sibling){this.sibling.data=e;const c=this.sibling.createDataChangedEvent(e,s,t);(a=this.sibling.__localEventService)==null||a.dispatchEvent(c)}i.dispatchEvent({type:"rowNodeDataChanged",node:this});const r=this.pinnedSibling;r&&(r.data=e,(d=r.__localEventService)==null||d.dispatchEvent(r.createDataChangedEvent(e,s,t)),i.dispatchEvent({type:"rowNodeDataChanged",node:r}))}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?(U(13),null):this.rowPinned==="top"?ms+this.rowIndex:this.rowPinned==="bottom"?ws+this.rowIndex:this.rowIndex.toString()}setDataAndId(e,t){var r,l;const{selectionSvc:o}=this.beans,i=(r=o==null?void 0:o.createDaemonNode)==null?void 0:r.call(o,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);(l=this.__localEventService)==null||l.dispatchEvent(n)}setId(e){var o;const t=ko(this.beans.gos);if(t)if(this.data){const i=((o=this.parent)==null?void 0:o.getRoute())??[];this.id=t({data:this.data,parentKeys:i.length>0?i:void 0,level:this.level,rowPinned:this.rowPinned}),this.id.startsWith(Cs)&&U(14,{groupPrefix:Cs})}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){var i;(i=this.beans.expansionSvc)==null||i.setExpanded(this,e,t,o)}setDataValue(e,t,o){const{colModel:i,valueSvc:s,gos:n,editSvc:r}=this.beans,l=typeof e!="string"?e:i.getCol(e)??i.getColDefCol(e);if(!l)return!1;const a=s.getValueForDisplay(l,this,void 0,void 0,"api").value;if(n.get("readOnlyEdit")){const{beans:{eventSvc:u},data:h,rowIndex:g,rowPinned:p}=this;return u.dispatchEvent({type:"cellEditRequest",event:null,rowIndex:g,rowPinned:p,column:l,colDef:l.colDef,data:h,node:this,oldValue:a,newValue:t,value:t,source:o}),!1}if(r){const u=r.setDataValue({rowNode:this,column:l},t,o);if(u!=null)return u}const d=s.setValue(this,l,t,o);this.dispatchCellChangedEvent(l,t,a);const c=this.pinnedSibling;return c&&d&&c.dispatchCellChangedEvent(l,t,a),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){var s;const i={type:"cellChanged",node:this,column:e,newValue:t,oldValue:o};(s=this.__localEventService)==null||s.dispatchEvent(i)}resetQuickFilterAggregateText(){this.quickFilterAggregateText=null}isExpandable(){var e;return((e=this.beans.expansionSvc)==null?void 0:e.isExpandable(this))??!1}isSelected(){return this.footer?this.sibling.isSelected():this.rowPinned&&this.pinnedSibling?this.pinnedSibling.isSelected():this.__selected}depthFirstSearch(e){var t;(t=this.childrenAfterGroup)==null||t.forEach(o=>o.depthFirstSearch(e)),e(this)}dispatchRowEvent(e){var t;(t=this.__localEventService)==null||t.dispatchEvent({type:e,node:this})}setSelected(e,t=!1,o="api"){var i;(i=this.beans.selectionSvc)==null||i.setNodesSelected({nodes:[this],newValue:e,clearSelection:t,source:o})}isRowPinned(){return!!this.rowPinned}__addEventListener(e,t){this.__localEventService||(this.__localEventService=new je),this.__localEventService.addEventListener(e,t)}__removeEventListener(e,t){this.removeLocalListener(e,t)}addEventListener(e,t){var i,s,n,r;(i=this.beans.validation)==null||i.checkRowEvents(e),this.__localEventService||(this.__localEventService=new je),this.frameworkEventListenerService=(n=(s=this.beans.frameworkOverrides).createLocalEventListenerWrapper)==null?void 0:n.call(s,this.frameworkEventListenerService,this.__localEventService);const o=((r=this.frameworkEventListenerService)==null?void 0:r.wrap(e,t))??t;this.__localEventService.addEventListener(e,o)}removeEventListener(e,t){var i;const o=((i=this.frameworkEventListenerService)==null?void 0:i.unwrap(e,t))??t;this.removeLocalListener(e,o)}removeLocalListener(e,t){var o,i;(o=this.__localEventService)==null||o.removeEventListener(e,t),(i=this.__localEventService)!=null&&i.noRegisteredListenersExist()&&(this.__localEventService=null)}isFullWidthCell(){if(k(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"))}getFirstChild(){var e;return this.childStore?this.childStore.getFirstNode():((e=this.childrenAfterSort)==null?void 0:e[0])??null}};function Bh(e,t,o){return _(t,{type:o,node:e,data:e.data,rowIndex:e.rowIndex,rowPinned:e.rowPinned})}var Vh=new Set(["__localEventService","__objectId","sticky","__autoHeights","__checkAutoHeightsDebounced","childStore"]);function Nh(e,t){const o=new so(t);return Object.keys(e).forEach(i=>{Vh.has(i)||(o[i]=e[i])}),o.oldRowTop=null,o}var _h={agSetColumnFilter:"agSetColumnFilterHandler",agMultiColumnFilter:"agMultiColumnFilterHandler",agGroupColumnFilter:"agGroupColumnFilterHandler",agNumberColumnFilter:"agNumberColumnFilterHandler",agDateColumnFilter:"agDateColumnFilterHandler",agTextColumnFilter:"agTextColumnFilterHandler"};new Set(Object.values(_h));var vs="T",Wh=new RegExp(`^\\d{4}-\\d{2}-\\d{2}(${vs}\\d{2}:\\d{2}:\\d{2}\\D?)?`);function Jr(e,t){return e.toString().padStart(t,"0")}function $e(e,t=!0,o="-"){if(!e)return null;let i=[e.getFullYear(),e.getMonth()+1,e.getDate()].map(s=>Jr(s,2)).join(o);return t&&(i+=vs+[e.getHours(),e.getMinutes(),e.getSeconds()].map(s=>Jr(s,2)).join(":")),i}function ni(e,t=!1){return!!no(e,t)}function zh(e){return ni(e,!0)}function no(e,t=!1){if(!e||!Wh.test(e))return null;const[o,i]=e.split(vs);if(!o)return null;const s=o.split("-").map(h=>parseInt(h,10));if(s.filter(h=>!isNaN(h)).length!==3)return null;const[n,r,l]=s,a=new Date(n,r-1,l);if(a.getFullYear()!==n||a.getMonth()!==r-1||a.getDate()!==l||!i&&t)return null;if(!i||i==="00:00:00")return a;const[d,c,u]=i.split(":").map(h=>parseInt(h,10));if(d>=0&&d<24)a.setHours(d);else if(t)return null;if(c>=0&&c<60)a.setMinutes(c);else if(t)return null;if(u>=0&&u<60)a.setSeconds(u);else if(t)return null;return a}var $h="ag-focus-managed",ri=class extends x{constructor(e,t={}){super(),this.eFocusable=e,this.callbacks=t,this.callbacks={shouldStopEventPropagation:()=>!1,onTabKeyDown:o=>{if(o.defaultPrevented)return;const i=oi(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($h),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||ke(t))return;const{callbacks:o}=this;if(o.shouldStopEventPropagation(t)){vt(t);return}t.key===y.TAB?o.onTabKeyDown(t):o.handleKeyDown&&o.handleKeyDown(t)}})}},be={AUTO_HEIGHT:"ag-layout-auto-height",NORMAL:"ag-layout-normal",PRINT:"ag-layout-print"},bs=class extends x{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?be.AUTO_HEIGHT:t.print?be.PRINT:be.NORMAL;this.view.updateLayoutClasses(o,t)}},Ue="Viewport",el="fakeVScrollComp",Ss=["fakeHScrollComp","centerHeader","topCenter","bottomCenter","stickyTopCenter","stickyBottomCenter"],tl=100,ys=150,Uh=class extends x{constructor(e){super(),this.clearRetryListenerFncs=[],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.isScrollActive=!1,this.isVerticalPositionInvalidated=!0,this.isHorizontalPositionInvalidated=!0,this.eBodyViewport=e,this.resetLastHScrollDebounced=ge(this,()=>this.lastScrollSource[1]=null,ys),this.resetLastVScrollDebounced=ge(this,()=>this.lastScrollSource[0]=null,ys)}wireBeans(e){this.ctrlsSvc=e.ctrlsSvc,this.animationFrameSvc=e.animationFrameSvc,this.visibleCols=e.visibleCols}destroy(){super.destroy(),this.clearRetryListenerFncs=[],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,Ue)});for(const e of Ss){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?ge(this,this.onVScroll.bind(this,Ue),tl):this.onVScroll.bind(this,Ue),i=t?ge(this,this.onVScroll.bind(this,el),tl):this.onVScroll.bind(this,el);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[...Ss,Ue]){if(this.lastScrollSource[1]===t)continue;const o=this.getViewportForSource(t);Fo(o,e,this.enableRtl)}}getViewportForSource(e){return e===Ue?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=Do(this.getViewportForSource(e),this.enableRtl);this.doHorizontalScroll(i),this.resetLastHScrollDebounced()}onVScroll(e){if(!this.isControllingScroll(e,0))return;let t;if(e===Ue?t=this.eBodyViewport.scrollTop:t=this.ctrlsSvc.get("fakeVScrollComp").getScrollPosition(),this.shouldBlockScrollUpdate(0,t,!0))return;const{animationFrameSvc:o}=this;o==null||o.setScrollTop(t),this.nextScrollTop=t,e===Ue?this.ctrlsSvc.get("fakeVScrollComp").setScrollPosition(t):this.eBodyViewport.scrollTop=t,o!=null&&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))}isScrolling(){return this.isScrollActive}fireScrollEvent(e){const t={type:"bodyScroll",direction:e===1?"horizontal":"vertical",left:this.scrollLeft,top:this.scrollTop};this.isScrollActive=!0,this.eventSvc.dispatchEvent(t),window.clearTimeout(this.scrollTimer),this.scrollTimer=window.setTimeout(()=>{this.scrollTimer=0,this.isScrollActive=!1,this.eventSvc.dispatchEvent({...t,type:"bodyScrollEnd"})},ys)}shouldBlockScrollUpdate(e,t,o=!1){return o&&!gt()?!1:e===0?this.shouldBlockVerticalScroll(t):this.shouldBlockHorizontalScroll(t)}shouldBlockVerticalScroll(e){const t=Ki(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(){const e=this.scrollLeft;let t=!1;for(const o of Ss)if(this.getViewportForSource(o).scrollLeft!==e){t=!0;break}t&&this.onHScroll(Ue)}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)),Fo(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,o=0){if(ee(this.gos,"print"))return;const{rowModel:i}=this.beans,s=i.getRowCount();if(typeof e!="number"||e<0||e>=s){k(88,{index:e});return}this.clearRetryListeners();const{frameworkOverrides:n,pageBounds:r,rowContainerHeight:l,rowRenderer:a}=this.beans;n.wrapIncoming(()=>{var p,f;const d=this.ctrlsSvc.getGridBodyCtrl(),c=i.getRow(e);let u,h,g=0;this.invalidateVerticalScroll();do{const{stickyTopHeight:C,stickyBottomHeight:m}=d,w=c.rowTop,b=c.rowHeight,v=r.getPixelOffset(),S=c.rowTop-v,D=S+c.rowHeight,I=this.getVScrollPosition(),O=l.divStretchOffset,F=I.top+O,P=I.bottom+O,T=P-F,V=l.getScrollPositionForPixel(S),B=l.getScrollPositionForPixel(D-T),W=Math.min((V+B)/2,S),z=F+C>S,de=P-m<D;let Ie=null;t==="top"?Ie=V-C:t==="bottom"?Ie=B+m:t==="middle"?Ie=W:z?Ie=V-C:de&&(B-V>T?Ie=V-C:Ie=B+m),Ie!==null&&(this.setVerticalScrollPosition(Ie),a.redraw({afterScroll:!0})),u=w!==c.rowTop||b!==c.rowHeight,h=C!==d.stickyTopHeight||m!==d.stickyBottomHeight,g++}while((u||h)&&g<10);if((p=this.animationFrameSvc)==null||p.flushAllFrames(),o<10&&(c!=null&&c.stub||!((f=this.beans.rowAutoHeight)!=null&&f.areRowsMeasured()))){const C=this.getVScrollPosition().top;this.clearRetryListenerFncs=this.addManagedEventListeners({bodyScroll:()=>{const m=this.getVScrollPosition().top;C!==m&&this.clearRetryListeners()},modelUpdated:()=>{this.clearRetryListeners(),!(e>=i.getRowCount())&&this.ensureIndexVisible(e,t,o+1)}})}})}clearRetryListeners(){this.clearRetryListenerFncs.forEach(e=>e()),this.clearRetryListenerFncs=[]}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(()=>{var r;n!==null&&this.centerRowsCtrl.setCenterViewportScrollLeft(n),this.centerRowsCtrl.onHorizontalViewportChanged(),(r=this.animationFrameSvc)==null||r.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 l=(r?o:i)||s,a=r?i:o;t!=="auto"&&(l=t==="start",a=t==="end");const d=t==="middle";if(l||a||d){const{colLeft:c,colMiddle:u,colRight:h}=this.getColumnBounds(e);return d?u-n/2:l?r?h:c:r?c-n:h-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,l=n?o<i:t>i;return{columnBeforeStart:r,columnAfterEnd:l}}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,l=r+i*n,a=r+i/2*n;return{colLeft:r,colMiddle:a,colRight:l}}getViewportBounds(){const e=this.centerRowsCtrl.getCenterWidth(),t=this.centerRowsCtrl.getCenterViewportScrollLeft(),o=t,i=e+t;return{start:o,end:i,width:e}}},Rs=class extends x{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=ee(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)}},Kh=class extends x{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=()=>{Ne(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==null||e.keepPinnedColumnsNarrowerThanViewport(),this.checkViewportAndScrolls();const o=this.centerContainerCtrl.getCenterWidth();o!==this.centerWidth&&(this.centerWidth=o,t==null||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=Ki(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 Es(e,t,o,i,s,n){if(o==null&&t==null)return;const r={},l={},a=(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],h=o[u];let g;typeof h=="string"?g=e?e.evaluate(h,i):!0:typeof h=="function"&&(g=h(i)),a(u,p=>{g?r[p]=!0:l[p]=!0})}}t&&n&&Object.keys(t).forEach(d=>a(d,c=>{r[c]||(l[c]=!0)})),n&&Object.keys(l).forEach(n),Object.keys(r).forEach(s)}function ol(e){if(e.group)return e.level;const t=e.parent;return t?t.level+1:0}var jh=class extends x{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(l=>e.push(l))},s=o.get("rowClass");s&&i(s);const n=o.getCallback("getRowClass");if(n){const r={data:t.data,node:t,rowIndex:t.rowIndex},l=n(r);i(l)}}preProcessRowClassRules(e,t){this.processRowClassRules(t,o=>{e.push(o)},()=>{})}processRowClassRules(e,t,o){const{gos:i,expressionSvc:s}=this.beans,n=_(i,{data:e.data,node:e,rowIndex:e.rowIndex});Es(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)}},qh=0,li="renderedRow",ai=class extends x{constructor(e,t,o,i,s){var n,r;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=((n=t.pagination)==null?void 0:n.getCurrentPage())??0,this.suppressRowTransform=this.gos.get("suppressRowTransform"),this.instanceId=e.id+"-"+qh++,this.rowId=Vo(e.id),this.initRowBusinessKey(),this.rowFocused=t.focusSvc.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned),this.rowLevel=ol(this.rowNode),this.setRowType(),this.setAnimateFlags(o),this.rowStyles=this.processStylesFromGridOptions(),this.rowEditStyleFeature=(r=t.editSvc)==null?void 0:r.createRowStyleFeature(this,t),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=Vo(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){var u,h;const{context:s,focusSvc:n}=this.beans;i=Ko(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 l=this.rowNode,a=this.rowType==="FullWidthLoading"||l.stub,d=!l.data&&this.beans.rowModel.getType()==="infinite";!a&&!d&&!l.rowPinned&&this.beans.rowRenderer.dispatchFirstDataRenderedEvent();const c=(u=this.fullWidthGui)==null?void 0:u.element;c&&!((h=this.beans.editSvc)!=null&&h.isEditing(this))&&n.isRowFocused(l.rowIndex,l.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),Qe(t)&&this.rowNode.selectable&&this.onRowSelected(e),this.updateColumnLists(!this.useAnimationFrameForCreate);const o=e.rowComp;this.getInitialRowClasses(e.containerType).forEach(s=>o.toggleCss(s,!0)),this.executeSlideAndFadeAnimations(e),this.rowNode.group&&Gi(e.element,this.rowNode.expanded==!0),this.setRowCompRowId(o),this.setRowCompRowBusinessKey(o),Xe(t,e.element,li,this),e.compBean.addDestroyFunc(()=>Xe(t,e.element,li,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.toggleCss("ag-after-created",!0)}),this.executeProcessRowPostCreateFunc()}setRowCompRowBusinessKey(e){this.businessKey!=null&&e.setRowBusinessKey(this.businessKey)}setRowCompRowId(e){const t=Vo(this.rowNode.id);this.rowId=t,t!=null&&e.setRowId(t)}executeSlideAndFadeAnimations(e){const{containerType:t}=e;this.slideInAnimation[t]&&(es(()=>{this.onTopChanged()}),this.slideInAnimation[t]=!1),this.fadeInAnimation[t]&&(es(()=>{e.rowComp.toggleCss("ag-opacity-zero",!1)}),this.fadeInAnimation[t]=!1)}addRowDraggerToRow(e){var i;const t=(i=this.beans.rowDragSvc)==null?void 0:i.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(s=>s!==o),this.rowEditStyleFeature=this.destroyBean(this.rowEditStyleFeature,this.beans.context),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(){var e,t;return this.gos.get("embedFullWidthRows")?this.allRowGuis.map(o=>{var i;return(i=o==null?void 0:o.rowComp)==null?void 0:i.getFullWidthCellRenderer()}):[(t=(e=this.fullWidthGui)==null?void 0:e.rowComp)==null?void 0:t.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(),s=bc(this.gos,this.rowNode,i);e?this.rowType="FullWidthLoading":o?this.rowType="FullWidthDetail":t?this.rowType="FullWidth":s?this.rowType="FullWidthGroup":this.rowType="Normal"}updateColumnLists(e=!1,t=!1){if(this.isFullWidth())return;const{animationFrameSvc:o}=this.beans;if(!(o!=null&&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){var o;if(!((o=this.beans.rowSpanSvc)!=null&&o.isCellSpanning(e,this.rowNode)))return new Pt(e,this.rowNode,this.beans,this)}isCorrectCtrlForSpan(e){var t;return!((t=this.beans.rowSpanSvc)!=null&&t.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()),h=u===-1?void 0:Math.max(u-1,0);s(d,c,h)}const{focusSvc:r,visibleCols:l}=this.beans,a=r.getFocusedCell();if(a&&a.column.getPinned()==o){const d=a.column.getInstanceId();if(!i.map[d]&&l.allCols.includes(a.column)){const u=this.createFocusedCellCtrl();if(u){const h=i.list.findIndex(p=>p.column.getLeft()>u.column.getLeft()),g=h===-1?void 0:Math.max(h-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==null?void 0: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{visibleCols:n,editSvc:r}=this.beans,l=r==null?void 0:r.isEditing(e),a=e.isCellFocused();return l||a?!(n.allCols.indexOf(s)>=0):!0}getDomOrder(){return this.gos.get("ensureDomOrder")||ee(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=M(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,l)=>r?r.rowComp.refreshFullWidth(()=>this.createFullWidthCompDetails(r.element,l).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(){const{beans:e,gos:t,rowNode:o}=this,{expansionSvc:i,eventSvc:s,context:n,rowSpanSvc:r}=e;this.addManagedListeners(this.rowNode,{heightChanged:()=>this.onRowHeightChanged(),rowSelected:()=>this.onRowSelected(),rowIndexChanged:this.onRowIndexChanged.bind(this),topChanged:this.onTopChanged.bind(this),...(i==null?void 0:i.getRowExpandedListeners(this))??{}}),o.detail&&this.addManagedListeners(o.parent,{dataChanged:this.onRowNodeDataChanged.bind(this)}),this.addManagedListeners(o,{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),rowPinned:this.onRowPinned.bind(this)}),this.addManagedListeners(s,{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()}),r&&this.addManagedListeners(r,{spannedCellsUpdated:({pinned:l})=>{l&&!o.rowPinned||this.updateColumnLists()}}),this.addDestroyFunc(()=>{this.rowDragComps=this.destroyBeans(this.rowDragComps,n),this.tooltipFeature=this.destroyBean(this.tooltipFeature,n),this.rowEditStyleFeature=this.destroyBean(this.rowEditStyleFeature,n)}),this.addManagedPropertyListeners(["rowStyle","getRowStyle","rowClass","getRowClass","rowClassRules"],this.postProcessCss.bind(this)),this.addManagedPropertyListener("rowDragEntireRow",()=>{if(t.get("rowDragEntireRow")){this.allRowGuis.forEach(a=>{this.addRowDraggerToRow(a)});return}this.rowDragComps=this.destroyBeans(this.rowDragComps,n)}),this.addListenersForCellComps()}addListenersForCellComps(){this.addManagedListeners(this.rowNode,{rowIndexChanged:()=>this.getAllCellCtrls().forEach(e=>e.onRowIndexChanged()),cellChanged:e=>this.getAllCellCtrls().forEach(t=>t.onCellChanged(e))})}onRowPinned(){for(const e of this.allRowGuis)e.rowComp.toggleCss("ag-row-pinned-source",!!this.rowNode.pinnedSibling)}onRowNodeDataChanged(e){this.refreshRow({suppressFlash:!e.update,newData:!e.update})}refreshRow(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(e)),this.allRowGuis.forEach(o=>{this.setRowCompRowId(o.rowComp),this.updateRowBusinessKey(),this.setRowCompRowBusinessKey(o.rowComp)}),this.onRowSelected(),this.postProcessCss()}postProcessCss(){var e;this.setStylesFromGridOptions(!0),this.postProcessClassesFromGridOptions(),this.postProcessRowClassRules(),(e=this.rowEditStyleFeature)==null||e.applyRowStyles(),this.postProcessRowDragging()}onRowNodeHighlightChanged(){const e=this.beans.rowDropHighlightSvc,t=(e==null?void 0:e.row)===this.rowNode?e.position:"none",o=t==="above",i=t==="inside",s=t==="below",r=this.gos.get("treeData")&&(s||o),l=this.rowNode.uiLevel.toString();this.allRowGuis.forEach(a=>{const d=a.rowComp;d.toggleCss("ag-row-highlight-above",o),d.toggleCss("ag-row-highlight-inside",i),d.toggleCss("ag-row-highlight-below",s),d.toggleCss("ag-row-highlight-indent",r),r?a.element.style.setProperty("--ag-row-highlight-level",l):a.element.style.removeProperty("--ag-row-highlight-level")})}postProcessRowDragging(){const e=this.rowNode.dragging;this.allRowGuis.forEach(t=>t.rowComp.toggleCss("ag-row-dragging",e))}onDisplayedColumnsChanged(){var e;this.updateColumnLists(!0),(e=this.beans.rowAutoHeight)==null||e.requestCheckAutoHeight()}onVirtualColumnsChanged(){this.updateColumnLists(!1,!0)}getRowPosition(){return{rowPinned:qe(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:l,navigation:a}=this.beans,d=l.getFocusedCell(),c={rowIndex:r.rowIndex,rowPinned:r.rowPinned,column:(d==null?void 0:d.column)??i};a==null||a.navigateToNextCell(e,e.key,c,!0),e.preventDefault()}onTabKeyDown(e){var l;if(e.defaultPrevented||ke(e))return;const t=this.allRowGuis.find(a=>a.element.contains(e.target)),o=t?t.element:null,i=o===e.target,s=Y(this.beans);let n=!1;o&&s&&(n=o.contains(s)&&s.classList.contains("ag-cell"));let r=null;!i&&!n&&(r=oi(this.beans,o,!1,e.shiftKey)),(this.isFullWidth()&&i||!r)&&((l=this.beans.navigation)==null||l.onTabKeyDown(this,e))}getFullWidthElement(){return this.fullWidthGui?this.fullWidthGui.element:null}getRowYPosition(){var t;const e=(t=this.allRowGuis.find(o=>Me(o.element)))==null?void 0:t.element;return e?e.getBoundingClientRect().top:0}onSuppressCellFocusChanged(e){const t=this.isFullWidth()&&e?void 0:-1;this.allRowGuis.forEach(o=>{ce(o.element,"tabindex",t)})}onFullWidthRowFocused(e){var s,n,r;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 l=this.beans.colModel.getCol(e==null?void 0:e.column),a=l==null?void 0:l.pinned;a?i=a==="right"?(s=this.rightGui)==null?void 0:s.element:(n=this.leftGui)==null?void 0:n.element:i=(r=this.centerGui)==null?void 0:r.element}i&&(i.classList.toggle("ag-full-width-focus",o),o&&(e!=null&&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 _(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){ke(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==null?void 0: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=pt(e.target,"ag-row-drag",3),!this.isFullWidth())return;const t=this.rowNode,{rangeSvc:o,focusSvc:i}=this.beans;o==null||o.removeAllCellRanges();const s=this.findFullWidthInfoForEvent(e);if(!s)return;const{rowGui:n,column:r}=s,l=n.element,a=e.target;let d=e.defaultPrevented||ht();l&&l.contains(a)&&Ui(a)&&(d=!1),i.setFocusedCell({rowIndex:t.rowIndex,column:r,rowPinned:t.rowPinned,forceBrowserFocus:d})}onRowClick(e){if(ke(e)||this.lastMouseDownOnDragger)return;const{eventSvc:o,selectionSvc:i}=this.beans;o.dispatchEvent(this.createRowEventWithSource("rowClicked",e)),i==null||i.handleSelectionEvent(e,this.rowNode,"rowClicked")}setupDetailRowAutoHeight(e){var t;this.rowType==="FullWidthDetail"&&((t=this.beans.masterDetailSvc)==null||t.setupDetailRowAutoHeight(this,e))}createFullWidthCompDetails(e,t){const{gos:o,rowNode:i}=this,s=_(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,l,a,d)=>this.addFullWidthRowDragging(r,l,a,d),setTooltip:(r,l)=>{o.assertModuleRegistered("Tooltip",3),this.setupFullWidthRowTooltip(r,l)}}),n=this.beans.userCompFactory;switch(this.rowType){case"FullWidthDetail":return ku(n,s);case"FullWidthGroup":{const{value:r,valueFormatted:l}=this.beans.valueSvc.getValueForDisplay(void 0,this.rowNode,!0);return s.value=r,s.valueFormatted=l,Mu(n,s)}case"FullWidthLoading":return Au(n,s);default:return Iu(n,s)}}setupFullWidthRowTooltip(e,t){var o;this.fullWidthGui&&(this.tooltipFeature=(o=this.beans.tooltipSvc)==null?void 0:o.setupFullWidthRowTooltip(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=ol(this.rowNode);if(this.rowLevel!=e){const t="ag-row-level-"+e,o="ag-row-level-"+this.rowLevel;this.allRowGuis.forEach(i=>{i.rowComp.toggleCss(t,!0),i.rowComp.toggleCss(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.toggleCss("ag-row-first",e))),this.lastRowOnPage!==t&&(this.lastRowOnPage=t,this.allRowGuis.forEach(o=>o.rowComp.toggleCss("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(){var t;const e=[];(t=this.beans.rowStyleSvc)==null||t.processClassesFromGridOptions(e,this.rowNode),e.length&&e.forEach(o=>{this.allRowGuis.forEach(i=>i.rowComp.toggleCss(o,!0))})}postProcessRowClassRules(){var e;(e=this.beans.rowStyleSvc)==null||e.processRowClassRules(this.rowNode,t=>{this.allRowGuis.forEach(o=>o.rowComp.toggleCss(t,!0))},t=>{this.allRowGuis.forEach(o=>o.rowComp.toggleCss(t,!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){var l,a;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"),(l=s.pinnedRowModel)!=null&&l.isManual()&&n.push("ag-row-pinned-manual")),!i.isRowPinned()&&i.pinnedSibling&&n.push("ag-row-pinned-source"),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"),(a=s.expansionSvc)==null||a.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(){var e;return((e=this.beans.rowStyleSvc)==null?void 0:e.processStylesFromGridOptions(this.rowNode))??this.emptyStyle}onRowSelected(e){var t;(t=this.beans.selectionSvc)==null||t.onRowCtrlSelected(this,o=>{(o===this.centerGui||o===this.fullWidthGui)&&this.announceDescription()},e)}announceDescription(){var e;(e=this.beans.selectionSvc)==null||e.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,{pointerenter:r=>{r.pointerType==="mouse"&&i.dispatchRowEvent("mouseEnter")},pointerleave:r=>{r.pointerType==="mouse"&&i.dispatchRowEvent("mouseLeave")}}),o.addManagedListeners(i,{mouseEnter:()=>{var r;!((r=s.dragSvc)!=null&&r.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=Jn(this.gos)?_e(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){var i;this.active=!1;const{rowNode:t}=this;if(!e&&mt(this.gos)&&!t.sticky)if(t.rowTop!=null){const n=this.roundRowTopToBounds(t.rowTop);this.setRowTop(n)}else this.allRowGuis.forEach(n=>n.rowComp.toggleCss("ag-opacity-zero",!0));(i=this.fullWidthGui)!=null&&i.element.contains(Y(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;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.toggleCss("ag-row-focus",this.rowFocused),t.rowComp.toggleCss("ag-row-no-focus",!this.rowFocused)})}onCellFocusChanged(){const{focusSvc:e}=this.beans,t=e.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned);t!==this.rowFocused&&(this.rowFocused=t,this.setFocusedClasses())}onPaginationChanged(){var t;const e=((t=this.beans.pagination)==null?void 0:t.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&&M(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==null?void 0:i.getColSpanningList().indexOf(e))>=0&&(o=i)}),o}onRowIndexChanged(){this.rowNode.rowIndex!=null&&(this.onCellFocusChanged(),this.updateRowIndexes(),this.postProcessCss())}updateRowIndexes(e){var n,r;const t=this.rowNode.getRowIndexString();if(t===null)return;const o=(((n=this.beans.ctrlsSvc.getHeaderRowContainerCtrl())==null?void 0:n.getRowCount())??0)+(((r=this.beans.filterManager)==null?void 0:r.getHeaderRowCount())??0),i=this.rowNode.rowIndex%2===0,s=o+this.rowNode.rowIndex+1;this.forEachGui(e,l=>{l.rowComp.setRowIndex(t),l.rowComp.toggleCss("ag-row-even",i),l.rowComp.toggleCss("ag-row-odd",!i),xo(l.element,s)})}};function il(e){var o;return e.altKey||e.ctrlKey||e.metaKey?!1:((o=e.key)==null?void 0:o.length)===1}function xs(e,t,o,i,s){const n=i?i.getColDef().suppressKeyboardEvent:void 0;if(!n)return!1;const r=_(e,{event:t,editing:s,column:i,node:o,data:o.data,colDef:i.getColDef()});return!!(n&&n(r))}function Yh(e){const{pinnedRowModel:t,rowModel:o}=e,[i,s]=[(t==null?void 0:t.isEmpty("top"))??!0,(t==null?void 0:t.isEmpty("bottom"))??!0],n=i?null:"top";let r,l;s?(r=null,l=o.getRowCount()-1):(r="bottom",l=(t==null?void 0:t.getPinnedBottomRowCount())??-1);const{visibleCols:a,rangeSvc:d}=e,c=a.allCols;!d||!(c!=null&&c.length)||d.setCellRange({rowStartIndex:0,rowStartPinned:n,rowEndIndex:l,rowEndPinned:r})}var Zh=65,Qh=67,Xh=86,Jh=68,eg=90,tg=89;function og(e){const{keyCode:t}=e;let o;switch(t){case Zh:o=y.A;break;case Qh:o=y.C;break;case Xh:o=y.V;break;case Jh:o=y.D;break;case eg:o=y.Z;break;case tg:o=y.Y;break;default:o=e.code}return o}var ig=class extends x{constructor(e){super(),this.element=e}postConstruct(){var e;this.addKeyboardListeners(),this.addMouseListeners(),(e=this.beans.touchSvc)==null||e.mockRowContextMenu(this),this.editSvc=this.beans.editSvc}addKeyboardListeners(){const e="keydown",t=this.processKeyboardEvent.bind(this,e);this.addManagedElementListeners(this.element,{[e]:t})}addMouseListeners(){["dblclick","contextmenu","mouseover","mouseout","click",lr("touchstart")?"touchstart":"mousedown"].forEach(o=>{const i=this.processMouseEvent.bind(this,o);this.addManagedElementListeners(this.element,{[o]:i})})}processMouseEvent(e,t){var s;if(!oo(this.gos,t)||ke(t))return;const{cellCtrl:o,rowCtrl:i}=this.getControlsForEventTarget(t.target);e==="contextmenu"?(o!=null&&o.column&&o.dispatchCellContextMenuEvent(t),(s=this.beans.contextMenuSvc)==null||s.handleContextMenuMouseEvent(t,void 0,i,o)):(o&&o.onMouseEvent(e,t),i&&i.onMouseEvent(e,t))}getControlsForEventTarget(e){const{gos:t}=this;return{cellCtrl:qr(t,e),rowCtrl:ar(t,e,li)}}processKeyboardEvent(e,t){const{cellCtrl:o,rowCtrl:i}=this.getControlsForEventTarget(t.target);t.defaultPrevented||(o?this.processCellKeyboardEvent(o,e,t):i!=null&&i.isFullWidth()&&this.processFullWidthRowKeyboardEvent(i,e,t))}processCellKeyboardEvent(e,t,o){var n,r;const i=((n=this.editSvc)==null?void 0:n.isEditing(e,{withOpenEditor:!0}))??!1;!xs(this.gos,o,e.rowNode,e.column,i)&&t==="keydown"&&(!i&&((r=this.beans.navigation)!=null&&r.handlePageScrollingKey(o))||e.onKeyDown(o),this.doGridOperations(o,i),il(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(),l=r==null?void 0:r.column;if(!xs(this.gos,o,i,l,!1)){const d=o.key;if(t==="keydown")switch(d){case y.PAGE_HOME:case y.PAGE_END:case y.PAGE_UP:case y.PAGE_DOWN:n==null||n.handlePageScrollingKey(o,!0);break;case y.LEFT:case y.RIGHT:if(!this.gos.get("embedFullWidthRows"))break;case y.UP:case y.DOWN:e.onKeyboardNavigate(o);break;case y.TAB:e.onTabKeyDown(o);break}}t==="keydown"&&this.eventSvc.dispatchEvent(e.createRowEvent("cellKeyDown",o))}doGridOperations(e,t){if(!e.ctrlKey&&!e.metaKey||t||!oo(this.gos,e))return;const o=og(e),{clipboardSvc:i,undoRedo:s}=this.beans;if(o===y.A)return this.onCtrlAndA(e);if(o===y.C)return this.onCtrlAndC(i,e);if(o===y.D)return this.onCtrlAndD(i,e);if(o===y.V)return this.onCtrlAndV(i,e);if(o===y.X)return this.onCtrlAndX(i,e);if(o===y.Y)return this.onCtrlAndY(s);if(o===y.Z)return this.onCtrlAndZ(s,e)}onCtrlAndA(e){const{beans:{rowModel:t,rangeSvc:o,selectionSvc:i},gos:s}=this;o&&Je(s)&&t.isRowsToRender()?Yh(this.beans):i&&(i==null||i.selectAllRowNodes({source:"keyboardSelectAll",selectAll:yc(s)})),e.preventDefault()}onCtrlAndC(e,t){var i;if(!e||this.gos.get("enableCellTextSelection"))return;const{cellCtrl:o}=this.getControlsForEventTarget(t.target);(i=this.editSvc)!=null&&i.isEditing(o,{withOpenEditor:!0})||(t.preventDefault(),e.copyToClipboard())}onCtrlAndX(e,t){var i;if(!e||this.gos.get("enableCellTextSelection")||this.gos.get("suppressCutToClipboard"))return;const{cellCtrl:o}=this.getControlsForEventTarget(t.target);(i=this.editSvc)!=null&&i.isEditing(o,{withOpenEditor:!0})||(t.preventDefault(),e.cutToClipboard(void 0,"ui"))}onCtrlAndV(e,t){var i;const{cellCtrl:o}=this.getControlsForEventTarget(t.target);(i=this.editSvc)!=null&&i.isEditing(o,{withOpenEditor:!0})||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==null||e.redo("ui")}},sl=class extends x{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)}},di=e=>e.topRowCtrls,ci=e=>e.getStickyTopRowCtrls(),ui=e=>e.getStickyBottomRowCtrls(),hi=e=>e.bottomRowCtrls,gi=e=>e.allRowCtrls,Ds=e=>e.getCtrls("top"),Fs=e=>e.getCtrls("center"),Ps=e=>e.getCtrls("bottom"),sg={center:{type:"center",name:"center-cols",getRowCtrls:gi,getSpannedRowCtrls:Fs},left:{type:"left",name:"pinned-left-cols",pinnedType:"left",getRowCtrls:gi,getSpannedRowCtrls:Fs},right:{type:"right",name:"pinned-right-cols",pinnedType:"right",getRowCtrls:gi,getSpannedRowCtrls:Fs},fullWidth:{type:"fullWidth",name:"full-width",fullWidth:!0,getRowCtrls:gi},topCenter:{type:"center",name:"floating-top",getRowCtrls:di,getSpannedRowCtrls:Ds},topLeft:{type:"left",name:"pinned-left-floating",container:"ag-pinned-left-floating-top",pinnedType:"left",getRowCtrls:di,getSpannedRowCtrls:Ds},topRight:{type:"right",name:"pinned-right-floating",container:"ag-pinned-right-floating-top",pinnedType:"right",getRowCtrls:di,getSpannedRowCtrls:Ds},topFullWidth:{type:"fullWidth",name:"floating-top-full-width",fullWidth:!0,getRowCtrls:di},stickyTopCenter:{type:"center",name:"sticky-top",getRowCtrls:ci},stickyTopLeft:{type:"left",name:"pinned-left-sticky-top",container:"ag-pinned-left-sticky-top",pinnedType:"left",getRowCtrls:ci},stickyTopRight:{type:"right",name:"pinned-right-sticky-top",container:"ag-pinned-right-sticky-top",pinnedType:"right",getRowCtrls:ci},stickyTopFullWidth:{type:"fullWidth",name:"sticky-top-full-width",fullWidth:!0,getRowCtrls:ci},stickyBottomCenter:{type:"center",name:"sticky-bottom",getRowCtrls:ui},stickyBottomLeft:{type:"left",name:"pinned-left-sticky-bottom",container:"ag-pinned-left-sticky-bottom",pinnedType:"left",getRowCtrls:ui},stickyBottomRight:{type:"right",name:"pinned-right-sticky-bottom",container:"ag-pinned-right-sticky-bottom",pinnedType:"right",getRowCtrls:ui},stickyBottomFullWidth:{type:"fullWidth",name:"sticky-bottom-full-width",fullWidth:!0,getRowCtrls:ui},bottomCenter:{type:"center",name:"floating-bottom",getRowCtrls:hi,getSpannedRowCtrls:Ps},bottomLeft:{type:"left",name:"pinned-left-floating-bottom",container:"ag-pinned-left-floating-bottom",pinnedType:"left",getRowCtrls:hi,getSpannedRowCtrls:Ps},bottomRight:{type:"right",name:"pinned-right-floating-bottom",container:"ag-pinned-right-floating-bottom",pinnedType:"right",getRowCtrls:hi,getSpannedRowCtrls:Ps},bottomFullWidth:{type:"fullWidth",name:"floating-bottom-full-width",fullWidth:!0,getRowCtrls:hi}};function nl(e){return`ag-${ro(e).name}-viewport`}function pi(e){const t=ro(e);return t.container??`ag-${t.name}-container`}function ng(e){return`ag-${ro(e).name}-spanned-cells-container`}function ro(e){return sg[e]}var rg=["topCenter","topLeft","topRight"],lg=["bottomCenter","bottomLeft","bottomRight"],ag=["center","left","right"],dg=["center","left","right","fullWidth"],cg=["stickyTopCenter","stickyBottomCenter","center","topCenter","bottomCenter"],ug=["left","bottomLeft","topLeft","stickyTopLeft","stickyBottomLeft"],hg=["right","bottomRight","topRight","stickyTopRight","stickyBottomRight"],rl=["stickyTopCenter","stickyTopLeft","stickyTopRight"],ll=["stickyBottomCenter","stickyBottomLeft","stickyBottomRight"],gg=[...rl,"stickyTopFullWidth",...ll,"stickyBottomFullWidth"],pg=[...rg,...lg,...ag,...rl,...ll],fg=class extends x{constructor(e){super(),this.name=e,this.visible=!0,this.EMPTY_CTRLS=[],this.options=ro(e)}postConstruct(){this.enableRtl=this.gos.get("enableRtl"),this.forContainers(["center"],()=>{this.viewportSizeFeature=this.createManagedBean(new Kh(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 ig(this.eViewport??this.eContainer)),this.addPreventScrollWhileDragging(),this.listenOnDomOrder();const{pinnedCols:s,rangeSvc:n}=this.beans,r=()=>this.onPinnedWidthChanged();this.forContainers(ug,()=>{this.pinnedWidthFeature=this.createOptionalManagedBean(s==null?void 0:s.createPinnedWidthFeature(!0,this.eContainer,this.eSpannedContainer)),this.addManagedEventListeners({leftPinnedWidthChanged:r})}),this.forContainers(hg,()=>{this.pinnedWidthFeature=this.createOptionalManagedBean(s==null?void 0:s.createPinnedWidthFeature(!1,this.eContainer,this.eSpannedContainer)),this.addManagedEventListeners({rightPinnedWidthChanged:r})}),this.forContainers(dg,()=>this.createManagedBean(new sl(this.eContainer,this.name==="center"?i:void 0))),n&&this.forContainers(pg,()=>this.createManagedBean(n.createDragListenerFeature(this.eContainer))),this.forContainers(cg,()=>this.createManagedBean(new Rs(l=>this.comp.setContainerWidth(`${l}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,o=this.onDisplayedColumnsChanged.bind(this);this.addManagedEventListeners({displayedColumnsChanged:o,displayedColumnsWidthChanged:o,displayedRowsChanged:i=>this.onDisplayedRowsChanged(i.afterScroll)}),o(),this.onDisplayedRowsChanged(),e&&this.options.getSpannedRowCtrls&&t.get("enableCellSpan")&&this.addManagedListeners(e,{spannedRowsUpdated:()=>{const i=this.options.getSpannedRowCtrls(e);i&&this.comp.setSpannedRowCtrls(i,!1)}})}listenOnDomOrder(){if(gg.indexOf(this.name)>=0){this.comp.setDomOrder(!0);return}const t=()=>{const o=this.gos.get("ensureDomOrder"),i=ee(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 Ut(this.eViewport)}getCenterViewportScrollLeft(){return Do(this.eViewport,this.enableRtl)}registerViewportResizeListener(e){const t=Ze(this.beans,this.eViewport,e);this.addDestroyFunc(()=>t())}isViewportInTheDOMTree(){return On(this.eViewport)}getViewportScrollLeft(){return Do(this.eViewport,this.enableRtl)}isHorizontalScrollShowing(){return this.gos.get("alwaysShowHorizontalScroll")||Nn(this.eViewport)}setHorizontalScroll(e){this.comp.setHorizontalScroll(e)}getHScrollPosition(){return{left:this.eViewport.scrollLeft,right:this.eViewport.scrollLeft+this.eViewport.offsetWidth}}setCenterViewportScrollLeft(e){Fo(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=ee(this.gos,"print"),s=this.gos.get("embedFullWidthRows")||o,n=t.filter(r=>{const l=r.isFullWidth();return this.options.fullWidth?!s&&l:s||!l});this.comp.setRowCtrls({rowCtrls:n,useFlushSync:e})}},al="ag-force-vertical-scroll",Cg="ag-selectable",mg="ag-column-moving",wg=class extends x{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){var l,a;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(`.${nl("center")}`),this.eFullWidthContainer=o.querySelector(`.${pi("fullWidth")}`),this.eStickyTopFullWidthContainer=n.querySelector(`.${pi("stickyTopFullWidth")}`),this.eStickyBottomFullWidthContainer=r.querySelector(`.${pi("stickyBottomFullWidth")}`),this.setCellTextSelection(this.gos.get("enableCellTextSelection")),this.addManagedPropertyListener("enableCellTextSelection",d=>this.setCellTextSelection(d.currentValue)),this.createManagedBean(new bs(this.comp)),this.scrollFeature=this.createManagedBean(new Uh(o)),(l=this.beans.rowDragSvc)==null||l.setupRowDrag(o,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(),(a=this.filterManager)==null||a.setupAdvFilterHeaderComp(i),this.ctrlsSvc.register("gridBodyCtrl",this)}addEventListeners(){const e=this.setFloatingHeights.bind(this),t=this.setGridRootRole.bind(this),o=this.toggleRowResizeStyles.bind(this);this.addManagedEventListeners({gridColumnsChanged:this.onGridColumnsChanged.bind(this),scrollVisibilityChanged:this.onScrollVisibilityChanged.bind(this),scrollGapChanged:this.updateScrollingClasses.bind(this),pinnedRowDataChanged:e,pinnedHeightChanged:e,pinnedRowsChanged:e,headerHeightChanged:this.setStickyTopOffsetTop.bind(this),columnRowGroupChanged:t,columnPivotChanged:t,rowResizeStarted:o,rowResizeEnded:o}),this.addManagedPropertyListener("treeData",t)}toggleRowResizeStyles(e){const t=e.type==="rowResizeStarted";this.eBodyViewport.classList.toggle("ag-prevent-animation",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=kn()?16:0,s=`calc(100% + ${o+i}px)`;Ne(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=pt(i,"ag-root",t);t.classList.toggle("ag-has-focus",!s)},focusout:o=>{const{target:i,relatedTarget:s}=o,n=t.contains(s),r=pt(s,"ag-root",t);pt(i,"ag-root",t)||(!n||r)&&t.classList.remove("ag-has-focus")}})})}setColumnMovingCss(e){this.comp.setColumnMovingCss(mg,e)}setCellTextSelection(e=!1){this.comp.setCellSelectableCss(Cg,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(){var e;(e=this.beans.editSvc)==null||e.addStopEditingWhenGridLosesFocus([this.eBodyViewport,this.eBottom,this.eTop,this.eStickyTop,this.eStickyBottom])}updateRowCount(){var s,n;const e=(((s=this.ctrlsSvc.getHeaderRowContainerCtrl())==null?void 0:s.getRowCount())??0)+(((n=this.filterManager)==null?void 0:n.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?al:null,o=ee(this.gos,"normal");return this.comp.setAlwaysVerticalScrollClass(t,e),e||o&&_n(this.eBodyViewport)}setupRowAnimationCssClass(){const{rowContainerHeight:e,environment:t}=this.beans;let o=t.sizesMeasured;const i=()=>{const s=o&&mt(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{eBodyViewport:e,eStickyTop:t,eStickyBottom:o,eTop:i,eBottom:s,beans:{popupSvc:n,touchSvc:r}}=this,l=this.onBodyViewportContextMenu.bind(this);this.addManagedElementListeners(e,{contextmenu:l}),r==null||r.mockBodyContextMenu(this,l),this.addManagedElementListeners(e,{wheel:this.onBodyViewportWheel.bind(this,n)});const a=this.onStickyWheel.bind(this);for(const c of[t,o,i,s])this.addManagedElementListeners(c,{wheel:a});const d=this.onHorizontalWheel.bind(this);for(const c of["left","right","topLeft","topRight","bottomLeft","bottomRight"])this.addManagedElementListeners(this.ctrlsSvc.get(c).eContainer,{wheel:d});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))&&oo(this.gos,e)&&this.scrollGridBodyToMatchEvent(e)}onStickyWheel(e){const{deltaY:t}=e;this.scrollVertically(t)>0&&e.preventDefault()}onHorizontalWheel(e){const{deltaX:t,deltaY:o,shiftKey:i}=e;(i||Math.abs(t)>Math.abs(o))&&this.scrollGridBodyToMatchEvent(e)}scrollGridBodyToMatchEvent(e){const{deltaX:t,deltaY:o}=e;e.preventDefault(),this.eCenterColsViewport.scrollBy({left:t||o})}onBodyViewportContextMenu(e,t,o){var s;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)&&((s=this.beans.contextMenuSvc)==null||s.showContextMenu({mouseEvent:e,touchEvent:o,value:null,anchorToElement:this.eGridBody,source:"ui"}))}onBodyViewportWheel(e,t){this.gos.get("suppressScrollWhenPopupsAreOpen")&&e!=null&&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,beans:{environment:t}}=this,o=e==null?void 0:e.getPinnedTopTotalHeight(),i=e==null?void 0:e.getPinnedBottomTotalHeight(),s=t.getPinnedRowBorderWidth(),n=t.getRowBorderWidth(),r=s-n,l=o?r+o:0,a=i?r+i:0;this.comp.setTopHeight(l),this.comp.setBottomHeight(a),this.comp.setTopInvisible(l<=0),this.comp.setBottomInvisible(a<=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(){var s,n;const t=this.ctrlsSvc.get("gridHeaderCtrl").headerHeight+(((s=this.filterManager)==null?void 0:s.getHeaderHeight())??0),o=((n=this.pinnedRowModel)==null?void 0:n.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==null?void 0:e.getPinnedBottomTotalHeight())??0,n=t.horizontalScrollShowing&&t.getScrollbarWidth()||0,r=i+n;o.setStickyBottomBottom(`${r}px`)}},dl=class extends j{constructor(e,t){super(),this.direction=t,this.eViewport=A,this.eContainer=A,this.hideTimeout=0,this.setTemplate(e)}postConstruct(){this.addManagedEventListeners({scrollVisibilityChanged:this.onScrollVisibilityChanged.bind(this)}),this.onScrollVisibilityChanged(),this.toggleCss("ag-apple-scrollbar",An()||gt())}destroy(){super.destroy(),window.clearTimeout(this.hideTimeout)}initialiseInvisibleScrollbar(){this.invisibleScrollbar===void 0&&(this.invisibleScrollbar=kn(),this.invisibleScrollbar&&(this.hideAndShowInvisibleScrollAsNeeded(),this.addActiveListenerToggles()))}addActiveListenerToggles(){const e=this.getGui(),t=()=>this.toggleCss("ag-scrollbar-active",!0),o=()=>this.toggleCss("ag-scrollbar-active",!1);this.addManagedListeners(e,{mouseenter:t,mousedown:t,touchstart:t,mouseleave:o,touchend:o})}onScrollVisibilityChanged(){this.invisibleScrollbar===void 0&&this.initialiseInvisibleScrollbar(),Ne(this.beans,()=>this.setScrollVisible())}hideAndShowInvisibleScrollAsNeeded(){this.addManagedEventListeners({bodyScroll:e=>{e.direction===this.direction&&(this.hideTimeout&&(window.clearTimeout(this.hideTimeout),this.hideTimeout=0),this.toggleCss("ag-scrollbar-scrolling",!0))},bodyScrollEnd:()=>{this.hideTimeout=window.setTimeout(()=>{this.toggleCss("ag-scrollbar-scrolling",!1),this.hideTimeout=0},400)}})}attemptSettingScrollPosition(e){const t=this.eViewport;lc(()=>Me(t),()=>this.setScrollPosition(e),100)}onScrollCallback(e){this.addManagedElementListeners(this.eViewport,{scroll:e})}},vg={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"}]},bg=class extends dl{constructor(){super(vg,"horizontal"),this.eLeftSpacer=A,this.eRightSpacer=A,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 Rs(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(){var t;if(!this.invisibleScrollbar)return;const e=((t=this.beans.pinnedRowModel)==null?void 0:t.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),Ve(this.eRightSpacer,t),this.eRightSpacer.classList.toggle("ag-scroller-corner",t<=i);let s=this.visibleCols.getColsLeftWidth();this.enableRtl&&e&&(s+=i),Ve(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.toggleCss("ag-scrollbar-invisible",t),Yi(this.getGui(),n),Yi(this.eViewport,n),Yi(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 Do(this.eViewport,this.enableRtl)}setScrollPosition(e){Me(this.eViewport)||this.attemptSettingScrollPosition(e),Fo(this.eViewport,e,this.enableRtl)}},Sg={selector:"AG-FAKE-HORIZONTAL-SCROLL",component:bg},yg={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"}]}]},Rg=class extends dl{constructor(){super(yg,"vertical")}postConstruct(){super.postConstruct(),this.createManagedBean(new sl(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.toggleCss("ag-scrollbar-invisible",o),Ve(this.getGui(),s),Ve(this.eViewport,s),Ve(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&&!Me(this.eViewport)&&this.attemptSettingScrollPosition(e),this.eViewport.scrollTop=e}},Eg={selector:"AG-FAKE-VERTICAL-SCROLL",component:Rg};function Ee(e){var t;return((t=e.ctrlsSvc.getHeaderRowContainerCtrl())==null?void 0:t.getRowCount())??0}function Ts(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),l=t[n];if(r){const a=xg(e,r);(l==null||a>l)&&(t[n]=a)}}}return t}function xg(e,t){let i=e.colModel.isPivotMode()?Fg(e):ul(e);const s=t.getHeaderCellCtrls();for(const n of s){const{column:r}=n,l=r.getAutoHeaderHeight();l!=null&&l>i&&r.isAutoHeaderHeight()&&(i=l)}return i}function Is(e){let o=e.colModel.isPivotMode()?Dg(e):lo(e);return e.colModel.forAllCols(i=>{const s=i.getAutoHeaderHeight();s!=null&&s>o&&i.isAutoHeaderHeight()&&(o=s)}),o}function lo(e){return e.gos.get("headerHeight")??e.environment.getDefaultHeaderHeight()}function cl(e){return e.gos.get("floatingFiltersHeight")??lo(e)}function ul(e){return e.gos.get("groupHeaderHeight")??lo(e)}function Dg(e){return e.gos.get("pivotHeaderHeight")??lo(e)}function Fg(e){return e.gos.get("pivotGroupHeaderHeight")??ul(e)}var Pg=class extends x{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 ri(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 l=this.onHeaderContextMenu.bind(this);this.addManagedElementListeners(this.eGui,{contextmenu:l}),n==null||n.mockHeaderContextMenu(this,l),r.register("gridHeaderCtrl",this)}setupHeaderHeight(){const e=this.setHeaderHeight.bind(this);e(),this.addManagedPropertyListeners(["headerHeight","pivotHeaderHeight","groupHeaderHeight","pivotGroupHeaderHeight","floatingFiltersHeight"],e),this.addManagedEventListeners({headerRowsChanged:e,columnHeaderHeightChanged:e,columnGroupHeaderHeightChanged:()=>Ne(this.beans,()=>e()),gridStylesChanged:e,advancedFilterEnabledChanged:e})}setHeaderHeight(){var n;const{beans:e}=this;let t=0;const o=Ts(e).reduce((r,l)=>r+l,0),i=Is(e);if((n=e.filterManager)!=null&&n.hasFloatingFilters()&&(t+=cl(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.toggleCss("ag-pivot-on",t),this.comp.toggleCss("ag-pivot-off",!t)}onDisplayedColumnsChanged(e){const o=e.visibleCols.allCols.some(i=>i.isSpanHeaderHeight());this.comp.toggleCss("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)||to(s,o,!0))&&e.preventDefault()}handleKeyDown(e){let t=null;const{headerNavigation:o}=this.beans;switch(e.key){case y.LEFT:t="LEFT";case y.RIGHT:{M(t)||(t="RIGHT"),o.navigateHorizontally(t,!1,e)&&e.preventDefault();break}case y.UP:t="UP";case y.DOWN:{M(t)||(t="DOWN"),o.navigateVertically(t,e)&&e.preventDefault();break}default:return}}onFocusOut(e){const{relatedTarget:t}=e,{eGui:o,beans:i}=this;!t&&o.contains(Y(i))||o.contains(t)||(i.focusSvc.focusedHeader=null)}onHeaderContextMenu(e,t,o){var r;const{menuSvc:i,ctrlsSvc:s}=this.beans;if(!e&&!o||!(i!=null&&i.isHeaderContextMenuEnabled()))return;const{target:n}=e??t;(n===this.eGui||n===((r=s.getHeaderRowContainerCtrl())==null?void 0:r.eViewport))&&i.showHeaderContextMenu(void 0,e,o)}},As=class extends j{constructor(e,t){super(e),this.ctrl=t}getCtrl(){return this.ctrl}},Tg={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"}]},Ig=class extends As{constructor(e){super(Tg,e),this.eResize=A,this.eHeaderCompWrapper=A,this.headerCompVersion=0}postConstruct(){const e=this.getGui(),t=(s,n)=>{n!=null&&n!=""?e.setAttribute(s,n):e.removeAttribute(s)},o=()=>{const s=this.ctrl.getSelectAllGui();s&&(this.eResize.insertAdjacentElement("afterend",s),this.addDestroyFunc(()=>s.remove()))};t("col-id",this.ctrl.column.getColId());const i={setWidth:s=>e.style.width=s,toggleCss:(s,n)=>this.toggleCss(s,n),setUserStyles:s=>Kt(e,s),setAriaSort:s=>s?Yd(e,s):Zd(e),setUserCompDetails:s=>this.setUserCompDetails(s),getUserCompInstance:()=>this.headerComp,refreshSelectAllGui:o,removeSelectAllGui:()=>{var s;return(s=this.ctrl.getSelectAllGui())==null?void 0:s.remove()}};this.ctrl.setComp(i,this.getGui(),this.eResize,this.eHeaderCompWrapper,void 0),o()}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())}},Ag={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"}]},Mg=class extends As{constructor(e){super(Ag,e),this.eResize=A,this.eHeaderCompWrapper=A}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={toggleCss:(i,s)=>this.toggleCss(i,s),setUserStyles:i=>Kt(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=>Z(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)}},kg={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"}}]}]},Lg=class extends As{constructor(e){super(kg,e),this.eFloatingFilterBody=A,this.eButtonWrapper=A,this.eButtonShowMainFilter=A}postConstruct(){const e=this.getGui(),t={toggleCss:(o,i)=>this.toggleCss(o,i),setUserStyles:o=>Kt(e,o),addOrRemoveBodyCssClass:(o,i)=>this.eFloatingFilterBody.classList.toggle(o,i),setButtonWrapperDisplayed:o=>Z(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()}}},Gg=class extends j{constructor(e){super({tag:"div",cls:e.headerRowClass,role:"row"}),this.ctrl=e,this.headerComps={}}postConstruct(){xo(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,setRowIndex:t=>xo(this.getGui(),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 l=n.getCtrl().column.getLeft(),a=r.getCtrl().column.getLeft();return l-a});const s=i.map(n=>n.getGui());Vn(this.getGui(),s)}}createHeaderComp(e){let t;switch(this.ctrl.type){case"group":t=new Mg(e);break;case"filter":t=new Lg(e);break;default:t=new Ig(e);break}return this.createBean(t),t.setParentComponent(this),t}},hl=class extends x{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?$(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=M(this.columnOrGroup.getOldLeft());(t==null?void 0: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(!ee(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(M(e)&&(this.eCell.style.left=`${e}px`),Q(this.columnOrGroup)){const t=this.columnOrGroup.getLeafColumns();if(!t.length)return;t.length>1&&qd(this.ariaEl,t.length)}}},Hg=0,gl="headerCtrl",pl=class extends x{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()+"-"+Hg++}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(!M(s))return!1;const n=_(this.gos,{colDef:i,column:o,headerRowIndex:t,event:e});return!!s(n)}getWrapperHasFocus(){return Y(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:h,paddingBottom:g,borderBottomWidth:p,borderTopWidth:f}=Ye(this.eGui),C=h+g+p+f,w=t.offsetHeight+C;if(u<5){const b=J(s),v=!b||!b.contains(t),S=w==0;if(v||S){es(()=>n(u+1),"raf",s);return}}this.setColHeaderHeight(this.column,w)};let r=!1,l;const a=()=>{const u=this.column.isAutoHeaderHeight();u&&!r&&d(),!u&&r&&c()},d=()=>{r=!0,n(0),this.comp.toggleCss("ag-header-cell-auto-height",!0),l=Ze(this.beans,t,()=>n(0))},c=()=>{r=!1,l&&l(),this.comp.toggleCss("ag-header-cell-auto-height",!1),l=void 0};a(),i.addDestroyFunc(()=>c()),i.addManagedListeners(this.column,{widthChanged:()=>r&&n(0)}),i.addManagedEventListeners({sortChanged:()=>{r&&window.setTimeout(()=>n(0))}}),o&&o(a)}onDisplayedColumnsChanged(){const{comp:e,column:t,beans:o,eGui:i}=this;!e||!t||!i||(Ur(e,t,o.visibleCols),Fn(i,o.visibleCols.getAriaColIndex(t)))}addResizeAndMoveKeyboardListeners(e){e.addManagedListeners(this.eGui,{keydown:this.onGuiKeyDown.bind(this),keyup:this.onGuiKeyUp.bind(this)})}refreshTabIndex(){const e=rt(this.beans);this.eGui&&ce(this.eGui,"tabindex",e?null:"-1")}onGuiKeyDown(e){var n;const t=Y(this.beans),o=e.key===y.LEFT||e.key===y.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===y.LEFT!==this.gos.get("enableRtl")?"left":"right";if(e.altKey){this.isResizing=!0,this.resizeMultiplier+=1;const r=this.getViewportAdjustedResizeDiff(e);this.resizeHeader(r,e.shiftKey),(n=this.resizeFeature)==null||n.toggleColumnResizing(!0)}else this.moveHeader(s)}moveHeader(e){var t;(t=this.beans.colMoves)==null||t.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===y.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(()=>{var e;(e=this.resizeFeature)==null||e.toggleColumnResizing(!1)},150))}handleKeyDown(e){const t=this.getWrapperHasFocus();switch(e.key){case y.PAGE_DOWN:case y.PAGE_UP:case y.PAGE_HOME:case y.PAGE_END:t&&e.preventDefault()}}addDomData(e){const t=gl,{eGui:o,gos:i}=this;Xe(i,o,t,this),e.addDestroyFunc(()=>Xe(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(){var e;this.dragSource&&((e=this.beans.dragAndDrop)==null||e.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!=null&&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}},Og=class extends pl{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:l}=this,{colResize:a,context:d,colHover:c,rangeSvc:u}=l,h=Ko(this,d,s);this.setGui(t,h),this.updateState(),this.setupWidth(h),this.setupMovingCss(h),this.setupMenuClass(h),this.setupSortableClass(h),this.setupWrapTextClass(),this.refreshSpanHeaderHeight(),this.setupAutoHeight({wrapperElement:i,checkMeasuringCallback:p=>this.setRefreshFunction("measuring",p),compBean:h}),this.addColumnHoverListener(h),this.setupFilterClass(h),this.setupStylesFromColDef(),this.setupClassesFromColDef(),this.setupTooltip(),this.addActiveHeaderMouseListeners(h),this.setupSelectAll(h),this.setupUserComp(),this.refreshAria(),a?this.resizeFeature=h.createManagedBean(a.createResizeFeature(n.pinned,r,o,e,this)):Z(o,!1),c==null||c.createHoverFeature(h,[r],t),u==null||u.createRangeHighlightFeature(h,r,e),h.createManagedBean(new hl(r,t,l)),h.createManagedBean(new ri(t,{shouldStopEventPropagation:p=>this.shouldStopEventPropagation(p),onTabKeyDown:()=>null,handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this),onFocusOut:this.onFocusOut.bind(this)})),this.addResizeAndMoveKeyboardListeners(h),h.addManagedPropertyListeners(["suppressMovableColumns","suppressMenuHide","suppressAggFuncInHeader","enableAdvancedFilter"],()=>this.refresh()),h.addManagedListeners(r,{colDefChanged:()=>this.refresh()}),h.addManagedListeners(r,{headerHighlightChanged:this.onHeaderHighlightChanged.bind(this)});const g=()=>this.checkDisplayName();h.addManagedEventListeners({columnValueChanged:g,columnRowGroupChanged:g,columnPivotChanged:g,headerHeightChanged:this.onHeaderHeightChanged.bind(this)}),h.addDestroyFunc(()=>{this.refreshFunctions={},this.selectAllFeature=null,this.dragSourceElement=void 0,this.userCompDetails=null,this.userHeaderClasses.clear(),this.ariaDescriptionProperties.clear(),this.clearComponent()})}resizeHeader(e,t){var o;(o=this.beans.colResize)==null||o.resizeHeader(this.column,e,t)}getHeaderClassParams(){const{column:e,beans:t}=this,o=e.colDef;return _(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 Du(this.beans.userCompFactory,t,e)}createParams(){const{menuSvc:e,sortSvc:t,colFilter:o,gos:i}=this.beans;return _(i,{column:this.column,displayName:this.displayName,enableSorting:this.column.isSortable(),enableMenu:this.menuEnabled,enableFilterButton:this.openFilterEnabled&&!!(e!=null&&e.isHeaderFilterButtonEnabled(this.column)),enableFilterIcon:!!o&&(!this.openFilterEnabled||Bo(this.gos)),showColumnMenu:(n,r)=>{e==null||e.showColumnMenu({column:this.column,buttonElement:n,positionBy:"button",onClosedCallback:r})},showColumnMenuAfterMouseClick:(n,r)=>{e==null||e.showColumnMenu({column:this.column,mouseEvent:n,positionBy:"mouse",onClosedCallback:r})},showFilter:n=>{e==null||e.showFilterMenu({column:this.column,buttonElement:n,containerType:"columnFilter",positionBy:"button"})},progressSort:n=>{t==null||t.progressSort(this.column,!!n,"uiColumnSorted")},setSort:(n,r)=>{t==null||t.setSortForColumn(this.column,n,!!r,"uiColumnSorted")},eGridHeader:this.eGui,setTooltip:(n,r)=>{i.assertModuleRegistered("Tooltip",3),this.setupTooltip(n,r)}})}setupSelectAll(e){var o;const{selectionSvc:t}=this.beans;t&&(this.selectAllFeature=e.createOptionalManagedBean(t.createSelectAllFeature(this.column)),(o=this.selectAllFeature)==null||o.setComp(this),e.addManagedPropertyListener("rowSelection",()=>{var s;const i=t.createSelectAllFeature(this.column);i&&!this.selectAllFeature?(this.selectAllFeature=e.createManagedBean(i),(s=this.selectAllFeature)==null||s.setComp(this),this.comp.refreshSelectAllGui()):this.selectAllFeature&&!i&&(this.comp.removeSelectAllGui(),this.selectAllFeature=this.destroyBean(this.selectAllFeature))}))}getSelectAllGui(){var e;return(e=this.selectAllFeature)==null?void 0:e.getCheckboxGui()}handleKeyDown(e){var t;super.handleKeyDown(e),e.key===y.SPACE&&((t=this.selectAllFeature)==null||t.onSpaceKeyDown(e)),e.key===y.ENTER&&this.onEnterKeyDown(e),e.key===y.DOWN&&e.altKey&&this.showMenuOnKeyPress(e,!1)}onEnterKeyDown(e){var t;e.ctrlKey||e.metaKey?this.showMenuOnKeyPress(e,!0):this.sortable&&((t=this.beans.sortSvc)==null||t.progressSort(this.column,e.shiftKey,"uiColumnSorted"))}showMenuOnKeyPress(e,t){const o=this.comp.getUserCompInstance();fl(o)&&o.onMenuKeyboardShortcut(t)&&e.preventDefault()}onFocusIn(e){this.eGui.contains(e.relatedTarget)||(this.focusThis(),this.announceAriaDescription()),wh()&&this.setActiveHeader(!0)}onFocusOut(e){this.eGui.contains(e.relatedTarget)||this.setActiveHeader(!1)}setupTooltip(e,t){var o;this.tooltipFeature=(o=this.beans.tooltipSvc)==null?void 0:o.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=$r(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.toggleCss(s,!0)}),i.forEach(s=>this.comp.toggleCss(s,!1))};this.setRefreshFunction("headerClasses",e),e()}setDragSource(e){var t;this.dragSourceElement=e,this.removeDragSource(),!(!e||!this.draggable)&&(this.dragSource=((t=this.beans.colMoves)==null?void 0:t.setDragSourceForHeader(e,this.column,this.displayName))??null)}updateState(){const{menuSvc:e}=this.beans;this.menuEnabled=!!(e!=null&&e.isColumnMenuInHeaderEnabled(this.column)),this.openFilterEnabled=!!(e!=null&&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.toggleCss("ag-header-cell-moving",this.column.isMoving())};e.addManagedListeners(this.column,{movingChanged:t}),t()}setupMenuClass(e){const t=()=>{var o;(o=this.comp)==null||o.toggleCss("ag-column-menu-visible",this.column.isMenuVisible())};e.addManagedListeners(this.column,{menuVisibleChanged:t}),t()}setupSortableClass(e){const t=()=>{this.comp.toggleCss("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.toggleCss("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.toggleCss("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.toggleCss("ag-header-highlight-before",t),this.comp.toggleCss("ag-header-highlight-after",o)}onDisplayedColumnsChanged(){super.onDisplayedColumnsChanged(),this.isAlive()&&this.onHeaderHeightChanged()}onHeaderHeightChanged(){this.refreshSpanHeaderHeight()}refreshSpanHeaderHeight(){var h;const{eGui:e,column:t,comp:o,beans:i}=this,s=Ts(this.beans),n=s.reduce((g,p)=>g+=p,0)===0;if(o.toggleCss("ag-header-parent-hidden",n),!t.isSpanHeaderHeight()){e.style.removeProperty("top"),e.style.removeProperty("height"),o.toggleCss("ag-header-span-height",!1),o.toggleCss("ag-header-span-total",!1);return}const{numberOfParents:r,isSpanningTotal:l}=this.column.getColumnGroupPaddingInfo();o.toggleCss("ag-header-span-height",r>0);const a=Is(i);if(r===0){o.toggleCss("ag-header-span-total",!1),e.style.setProperty("top","0px"),e.style.setProperty("height",`${a}px`);return}o.toggleCss("ag-header-span-total",l);const d=(((h=this.column.getFirstRealParent())==null?void 0:h.getLevel())??-1)+1,c=s.length-d;let u=0;for(let g=0;g<c;g++)u+=s[s.length-1-g];e.style.setProperty("top",`${-u}px`),e.style.setProperty("height",`${a+u}px`)}refreshAriaSort(){var e;if(this.sortable){const t=this.getLocaleTextFunc(),o=((e=this.beans.sortSvc)==null?void 0:e.getDisplaySortForColumn(this.column))||null;this.comp.setAriaSort(Od(o)),this.setAriaDescriptionProperty("sort",t("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&&!Bo(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(){var t;if(!this.eGui.contains(Y(this.beans)))return;const e=Array.from(this.ariaDescriptionProperties.keys()).sort((o,i)=>o==="filter"?-1:i.charCodeAt(0)-o.charCodeAt(0)).map(o=>this.ariaDescriptionProperties.get(o)).join(". ");(t=this.beans.ariaAnnounce)==null||t.announceValue(e,"columnHeader")}refreshAria(){this.refreshAriaSort(),this.refreshAriaMenu(),this.refreshAriaFilterButton(),this.refreshAriaFiltered()}addColumnHoverListener(e){var t;(t=this.beans.colHover)==null||t.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.toggleCss("ag-header-active",e)}getAnchorElementForMenu(e){const t=this.comp.getUserCompInstance();return fl(t)?t.getAnchorElementForMenu(e):this.eGui}destroy(){this.tooltipFeature=this.destroyBean(this.tooltipFeature),super.destroy()}};function fl(e){return typeof(e==null?void 0:e.getAnchorElementForMenu)=="function"&&typeof e.onMenuKeyboardShortcut=="function"}var Bg=0,Ms=class extends x{constructor(e,t,o){super(),this.rowIndex=e,this.pinned=t,this.type=o,this.instanceId=Bg++,this.comp=null,this.allCtrls=[];let i="ag-header-row-column";o==="group"?i="ag-header-row-group":o==="filter"&&(i="ag-header-row-filter"),this.headerRowClass=`ag-header-row ${i}`}setRowIndex(e){var t;this.rowIndex=e,(t=this.comp)==null||t.setRowIndex(this.getAriaRowIndex()),this.onRowHeightChanged()}postConstruct(){this.isPrintLayout=ee(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=Ko(this,this.beans.context,t),o&&(this.setRowIndex(this.rowIndex),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=ee(this.gos,"print"),this.onVirtualColumnsChanged(),this.setWidth(),this.onRowHeightChanged()}setWidth(){if(!this.comp)return;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(){if(!this.comp)return;const{topOffset:e,rowHeight:t}=this.getTopAndHeight();this.comp.setTop(e+"px"),this.comp.setHeight(t+"px")}getTopAndHeight(){let e=0;const t=Ts(this.beans);for(let s=0;s<t.length;s++){if(s===this.rowIndex&&this.type==="group")return{topOffset:e,rowHeight:t[s]};e+=t[s]}const o=Is(this.beans);if(this.type==="column")return{topOffset:e,rowHeight:o};e+=o;const i=cl(this.beans);return{topOffset:e,rowHeight:i}}onVirtualColumnsChanged(e=!1){if(!this.comp)return;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 Og(e,this));break}t.set(i,s)}getColumnsInViewport(){if(!this.isPrintLayout)return this.getComponentsToRender();if(this.pinned)return[];const e=[];return["left",null,"right"].forEach(t=>{e.push(...this.getComponentsToRender(t))}),e}getComponentsToRender(e=this.pinned){return this.type==="group"?this.beans.colViewport.getHeadersToRender(e,this.rowIndex):this.beans.colViewport.getColumnHeadersToRender(e)}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,this.comp=null,super.destroy()}},Vg=class extends x{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}=this.beans;this.setupCenterWidth(),o==null||o.setupHeaderPinnedWidth(this),this.setupDragAndDrop(n,this.eViewport);const r=this.refresh.bind(this,!0);this.addManagedEventListeners({displayedColumnsChanged:r,advancedFilterEnabledChanged:r});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,filterManager:o,visibleCols:i}=this.beans;let s=0;const n=t.getFocusHeaderToUseAfterRefresh(),r=()=>{const u=i.headerGroupRowCount;s=u;const h=this.groupsRowCtrls.length;if(h!==u){if(h>u){for(let g=u;g<h;g++)this.destroyBean(this.groupsRowCtrls[g]);this.groupsRowCtrls.length=u;return}for(let g=h;g<u;g++){const p=this.createBean(new Ms(g,this.pinned,"group"));this.groupsRowCtrls.push(p)}}},l=()=>{const u=s++;if(this.hidden){this.columnsRowCtrl=this.destroyBean(this.columnsRowCtrl);return}this.columnsRowCtrl==null||!e?(this.columnsRowCtrl=this.destroyBean(this.columnsRowCtrl),this.columnsRowCtrl=this.createBean(new Ms(u,this.pinned,"column"))):this.columnsRowCtrl.rowIndex!==u&&this.columnsRowCtrl.setRowIndex(u)},a=()=>{this.includeFloatingFilter=!!(o!=null&&o.hasFloatingFilters())&&!this.hidden;const u=()=>{this.filtersRowCtrl=this.destroyBean(this.filtersRowCtrl)};if(!this.includeFloatingFilter){u();return}e||u();const h=s++;this.filtersRowCtrl?this.filtersRowCtrl.rowIndex!==h&&this.filtersRowCtrl.setRowIndex(h):this.filtersRowCtrl=this.createBean(new Ms(h,this.pinned,"filter"))},d=this.getAllCtrls();r(),l(),a();const c=this.getAllCtrls();this.comp.setCtrls(c),this.restoreFocusOnHeader(t,n),d.length!==c.length&&this.beans.eventSvc.dispatchEvent({type:"headerRowsChanged"})}getHeaderCtrlForColumn(e){const t=o=>o==null?void 0:o.getHeaderCellCtrls().find(i=>i.column===e);if(et(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){var t;return((t=this.getHeaderCtrlForColumn(e))==null?void 0:t.eGui)??null}getRowType(e){var t;return(t=this.getAllCtrls()[e])==null?void 0:t.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==null?void 0: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})}setupCenterWidth(){this.pinned==null&&this.createManagedBean(new Rs(e=>this.comp.setCenterWidth(`${e}px`),!0))}},ks=class extends j{isPopup(){return!0}setParentComponent(e){e.addCss("ag-has-popup"),super.setParentComponent(e)}destroy(){const e=this.parentComponent;e&&e.isAlive()&&e.getGui().classList.remove("ag-has-popup"),super.destroy()}},fi=class extends ks{constructor(){super(...arguments),this.errorMessages=null}init(e){this.params=e,this.initialiseEditor(e),this.eEditor.onValueChange(()=>e.validate())}destroy(){this.errorMessages=null}},Cl=class extends j{constructor(){super()}},Ng={tag:"span",cls:"ag-overlay-loading-center",attrs:{"aria-live":"polite","aria-atomic":"true"}},_g=class extends Cl{init(){var t;const e=qe((t=this.gos.get("overlayLoadingTemplate"))==null?void 0:t.trim());if(this.setTemplate(e??Ng),!e){const o=this.getLocaleTextFunc();setTimeout(()=>{this.getGui().textContent=o("loadingOoo","Loading...")})}}},Wg={tag:"span",cls:"ag-overlay-no-rows-center"},zg=class extends Cl{init(){var t;const e=qe((t=this.gos.get("overlayNoRowsTemplate"))==null?void 0:t.trim());if(this.setTemplate(e??Wg),!e){const o=this.getLocaleTextFunc();setTimeout(()=>{this.getGui().textContent=o("noRowsToShow","No Rows To Show")})}}};function $g(e,t,o){const i=Tt(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=X({tag:"span"});return s.appendChild(i),s}function Tt(e,t,o){var n;let i=null;e==="smallDown"?k(262):e==="smallLeft"?k(263):e==="smallRight"&&k(264);const s=o&&o.getColDef().icons;if(s&&(i=s[e]),t.gos&&!i){const r=t.gos.get("icons");r&&(i=r[e])}if(i){let r;if(typeof i=="function")r=i();else if(typeof i=="string")r=i;else{k(38,{iconName:e});return}if(typeof r=="string")return qi(r);if(Qi(r))return r;k(133,{iconName:e});return}else{const r=t.registry.getIcon(e);return r||(n=t.validation)==null||n.validateIcon(e),X({tag:"span",cls:`ag-icon ag-icon-${r??e}`,role:"presentation",attrs:{unselectable:"on"}})}}var Ug=".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}",Kg={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"}]}]},jg=class extends j{constructor(){super(),this.dragSource=null,this.eIcon=A,this.eLabel=A,this.eGhost=A,this.registerCSS(Ug)}postConstruct(){const e=t=>$g(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(Kg),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;he(o);let r=null;e||(e=i!=null&&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}},qg=".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)}",Yg=class extends j{constructor(e,t,o){super(t,o),this.labelSeparator="",this.labelAlignment="left",this.disabled=!1,this.label="",this.config=e||{},this.registerCSS(qg)}postConstruct(){this.addCss("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;he(t),typeof e=="string"?t.innerText=e+this.labelSeparator:e&&t.appendChild(e),e===""?(Z(t,!1),Be(t,"presentation")):(Z(t,!0),Be(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:(To(this.eLabel,e),this)}setDisabled(e){e=!!e;const t=this.getGui();return Gn(t,e),t.classList.toggle("ag-disabled",e),this.disabled=e,this}isDisabled(){return!!this.disabled}},ml=class extends Yg{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.addCss(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==""||Bd(e)!==null?$t(e,""):$t(e,t??"")}setAriaLabel(e){return zt(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 Ve(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 Zg(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 Ls=class extends ml{constructor(e,t,o="text",i="input"){super(e,(e==null?void 0:e.template)??Zg(i),[],t),this.inputType=o,this.displayFieldTag=i,this.eLabel=A,this.eWrapper=A,this.eInput=A}postConstruct(){super.postConstruct(),this.setInputType(this.inputType);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.addCss("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(e){this.displayFieldTag==="input"&&(this.inputType=e,ce(this.eInput,"type",e))}getInputElement(){return this.eInput}setInputWidth(e){return To(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 ce(this.eInput,"placeholder",e),this}setInputAriaLabel(e){return zt(this.eInput,e),this.refreshAriaLabelledBy(),this}setDisabled(e){return Gn(this.eInput,e),super.setDisabled(e)}setAutoComplete(e){if(e===!0)ce(this.eInput,"autocomplete",null);else{const t=typeof e=="string"?e:"off";ce(this.eInput,"autocomplete",t)}return this}},wl=class extends Ls{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)}},Gs={selector:"AG-CHECKBOX",component:wl},Qg=".ag-checkbox-cell{height:100%}",Xg={tag:"div",cls:"ag-cell-wrapper ag-checkbox-cell",role:"presentation",children:[{tag:"ag-checkbox",ref:"eCheckbox",role:"presentation"}]},Jg=class extends j{constructor(){super(Xg,[Gs]),this.eCheckbox=A,this.registerCSS(Qg)}init(e){this.refresh(e);const{eCheckbox:t,beans:o}=this,i=t.getInputElement();i.setAttribute("tabindex","-1"),xn(i,"polite"),this.addManagedListeners(i,{click:s=>{if(vt(s),t.isDisabled())return;const n=t.getValue();this.onCheckboxChanged(n)},dblclick:s=>{vt(s)}}),this.addManagedElementListeners(e.eGridCell,{keydown:s=>{if(s.key===y.SPACE&&!t.isDisabled()){e.eGridCell===Y(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(Wo)?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 l=e.disabled??!(s!=null&&s.isCellEditable(n));r.setDisabled(l);const a=this.getLocaleTextFunc(),d=Tn(a,t),c=l?d:`${a("ariaToggleCellValue","Press SPACE to toggle cell value")} (${d})`;r.setInputAriaLabel(c)}onCheckboxChanged(e){var r,l,a,d;const{params:t}=this,{column:o,node:i,value:s}=t;(l=(r=this.beans)==null?void 0:r.editSvc)==null||l.setEditingCells([{column:o,colId:o.getColId(),rowIndex:i.rowIndex,rowPinned:i.rowPinned,state:"changed",oldValue:s,newValue:s}],{update:!0});const n=i.setDataValue(o,e,"renderer");(d=this.beans.editSvc)==null||d.stopEditing({rowNode:i,column:o},{source:(a=this.beans.editSvc)!=null&&a.isBatchEditing()?"ui":"api"}),n||this.updateCheckbox(t)}},vl=class{constructor(e,t){this.beans=e,this.floating=t,this.all=new Set,this.visible=new Set,this.order=[],this.queued=new Set}size(){return this.visible.size}add(e){const{all:t,visible:o,order:i}=this;t.has(e)||(t.add(e),o.add(e),i.push(e),this.sort())}delete(e){this.all.delete(e),this.visible.delete(e),this.queued.delete(e.id),we(this.order,e)}has(e){return this.visible.has(e)}forEach(e){this.order.forEach(e)}getByIndex(e){return this.order[e]}getById(e){for(const t of this.visible)if(t.id==e)return t}clear(){const{all:e,visible:t,order:o,queued:i}=this;e.clear(),i.clear(),t.clear(),o.length=0}sort(){const{sortSvc:e,rowNodeSorter:t,gos:o}=this.beans,i=(e==null?void 0:e.getSortOptions())??[],s=op(this.order);if(this.order.sort((r,l)=>{var a,d;return(((a=r.pinnedSibling)==null?void 0:a.rowIndex)??0)-(((d=l.pinnedSibling)==null?void 0:d.rowIndex)??0)}),this.order=(t==null?void 0:t.doFullSort(this.order,i))??this.order,!s)return;const n=sr(o);n==="bottom"||n==="pinnedBottom"?this.order.push(s):this.order.unshift(s)}hide(e){const{all:t,visible:o}=this;t.forEach(i=>e(i)?o.delete(i):o.add(i)),this.order=Array.from(o),this.sort()}queue(e){this.queued.add(e)}unqueue(e){this.queued.delete(e)}forEachQueued(e){this.queued.forEach(e)}};function bl(e){var o;if(e.level===-1)return!0;const t=e.parent;return(o=t==null?void 0:t.childrenAfterSort)!=null&&o.some(i=>i==e)?bl(t):!1}function Hs(e,t){const{gos:o,rowModel:i,filterManager:s}=e;return Mo(o)?!i.getRowNode(t.id):s!=null&&s.isAnyFilterPresent()?!bl(t):o.get("pivotMode")?!t.group:!1}function ep(e){return!!e.footer&&e.level===-1}function tp(e){return!!e.pinnedSibling&&ep(e.pinnedSibling)}function op(e){var o;const t=e.findIndex(tp);if(t>-1)return(o=e.splice(t,1))==null?void 0:o[0]}var Sl=class extends x{postConstruct(){const{gos:e,beans:t}=this;this.top=new vl(t,"top"),this.bottom=new vl(t,"bottom");const o=s=>Hs(t,s.pinnedSibling),i=()=>{const s=e.get("isRowPinned");s&&e.get("enableRowPinning")&&t.rowModel.forEachNode(n=>this.pinRow(n,s(n)),!0),this.refreshRowPositions(),this.dispatchRowPinnedEvents()};this.addManagedEventListeners({gridStylesChanged:this.onGridStylesChanges.bind(this),modelUpdated:({keepRenderedRows:s})=>{this.tryToEmptyQueues(),this.pinGrandTotalRow(),this.forContainers(n=>n.hide(o)),this.refreshRowPositions(),s||this.dispatchRowPinnedEvents()},columnRowGroupChanged:()=>{this.forContainers(sp),this.refreshRowPositions()},rowNodeDataChanged:({node:s})=>{const n=e.get("isRowPinnable");((n==null?void 0:n(s))??!0)||this.pinRow(s,null)},firstDataRendered:i}),this.addManagedPropertyListener("pivotMode",()=>{this.forContainers(s=>s.hide(o)),this.dispatchRowPinnedEvents()}),this.addManagedPropertyListener("grandTotalRow",({currentValue:s})=>{this._grandTotalPinned=s==="pinnedBottom"?"bottom":s==="pinnedTop"?"top":null}),this.addManagedPropertyListener("isRowPinned",i)}destroy(){this.reset(!1),super.destroy()}reset(e=!0){this.forContainers(t=>{const o=[];t.forEach(i=>o.push(i)),o.forEach(i=>this.pinRow(i,null)),t.clear()}),e&&this.dispatchRowPinnedEvents()}pinRow(e,t,o){var r;if(e.footer&&e.level>-1)return;if(e.footer&&e.level===-1){this._grandTotalPinned=t,rp(this.beans);return}const i=e.rowPinned??((r=e.pinnedSibling)==null?void 0:r.rowPinned);if(i!=null&&t!=null&&t!=i){const l=e.rowPinned?e:e.pinnedSibling,a=e.rowPinned?e.pinnedSibling:e;this.pinRow(l,null,o),this.pinRow(a,t,o);return}const n=o&&np(this.beans,e,o);if(n){n.forEach(l=>this.pinRow(l,t));return}if(t==null){const l=e.rowPinned?e:e.pinnedSibling,a=this.findPinnedRowNode(l);if(!a)return;a.delete(l);const d=l.pinnedSibling;Os(l),this.refreshRowPositions(t),this.dispatchRowPinnedEvents(d)}else{const l=yl(this.beans,e,t),a=this.getContainer(t);a.add(l),Hs(this.beans,e)&&a.hide(d=>Hs(this.beans,d.pinnedSibling)),this.refreshRowPositions(t),this.dispatchRowPinnedEvents(e)}}isManual(){return!0}isEmpty(e){return this.getContainer(e).size()===0}isRowsToRender(e){return!this.isEmpty(e)}ensureRowHeightsValid(){let e=!1,t=0;const o=i=>{if(i.rowHeightEstimated){const s=_e(this.beans,i);i.setRowTop(t),i.setRowHeight(s.height),t+=s.height,e=!0}};return this.bottom.forEach(o),t=0,this.top.forEach(o),this.eventSvc.dispatchEvent({type:"pinnedHeightChanged"}),e}getPinnedTopTotalHeight(){return Rl(this.top)}getPinnedBottomTotalHeight(){return Rl(this.bottom)}getPinnedTopRowCount(){return this.top.size()}getPinnedBottomRowCount(){return this.bottom.size()}getPinnedTopRow(e){return this.top.getByIndex(e)}getPinnedBottomRow(e){return this.bottom.getByIndex(e)}getPinnedRowById(e,t){return this.getContainer(t).getById(e)}forEachPinnedRow(e,t){this.getContainer(e).forEach(t)}getPinnedState(){const e=t=>{const o=[];return this.forEachPinnedRow(t,i=>o.push(i.pinnedSibling.id)),o};return{top:e("top"),bottom:e("bottom")}}setPinnedState(e){this.forContainers((t,o)=>{for(const i of e[o]){const s=this.beans.rowModel.getRowNode(i);s?this.pinRow(s,o):t.queue(i)}})}getGrandTotalPinned(){return this._grandTotalPinned}setGrandTotalPinned(e){this._grandTotalPinned=e}tryToEmptyQueues(){this.forContainers((e,t)=>{const o=new Set;e.forEachQueued(i=>{const s=this.beans.rowModel.getRowNode(i);s&&o.add(s)});for(const i of o)e.unqueue(i.id),this.pinRow(i,t)})}pinGrandTotalRow(){var l;const{gos:e,beans:t,_grandTotalPinned:o}=this,i=t.rowModel;if(!oe(e))return;const s=(l=i.rootNode)==null?void 0:l.sibling;if(!s)return;const n=s.pinnedSibling,r=n&&this.findPinnedRowNode(n);if(o){if(r&&r.floating!==o&&(r.delete(n),Os(n)),!r||r.floating!==o){const a=yl(t,s,o);this.getContainer(o).add(a)}}else{if(!r)return;r.delete(n),Os(n)}}onGridStylesChanges(e){e.rowHeightChanged&&this.forContainers(t=>t.forEach(o=>o.setRowHeight(o.rowHeight,!0)))}getContainer(e){return e==="top"?this.top:this.bottom}findPinnedRowNode(e){if(this.top.has(e))return this.top;if(this.bottom.has(e))return this.bottom}refreshRowPositions(e){const t=o=>ip(this.beans,o);return e==null?this.forContainers(t):t(this.getContainer(e))}forContainers(e){e(this.top,"top"),e(this.bottom,"bottom")}dispatchRowPinnedEvents(e){this.eventSvc.dispatchEvent({type:"pinnedRowsChanged"}),e==null||e.dispatchRowEvent("rowPinned")}};function ip(e,t){let o=0;t.forEach((i,s)=>{i.setRowTop(o),(i.rowHeightEstimated||i.rowHeight==null)&&i.setRowHeight(_e(e,i).height),i.setRowIndex(s),o+=i.rowHeight})}function yl(e,t,o){if(t.pinnedSibling)return t.pinnedSibling;const i=Nh(t,e);i.setRowTop(null),i.setRowIndex(null),i.rowPinned=o;const s=o==="top"?ms:ws;return i.id=`${s}${o}-${t.id}`,i.pinnedSibling=t,t.pinnedSibling=i,i}function Os(e){if(!e.pinnedSibling)return;e.rowPinned=null,e.setRowTop(null),e.setRowIndex(null);const t=e.pinnedSibling;e.pinnedSibling=void 0,t&&(t.pinnedSibling=void 0,t.rowPinned=null)}function sp(e){const t=new Set;e.forEach(o=>{o.group&&t.add(o)}),t.forEach(o=>e.delete(o))}function np(e,t,o){var n;const{rowSpanSvc:i}=e,s=(o&&(i==null?void 0:i.isCellSpanning(o,t)))??!1;if(o&&s)return(n=i==null?void 0:i.getCellSpan(o,t))==null?void 0:n.spannedNodes}function Rl(e){const t=e.size();if(t===0)return 0;const o=e.getByIndex(t-1);return o===void 0?0:o.rowTop+o.rowHeight}function rp({gos:e,rowModel:t}){oe(e)&&t.refreshModel({step:"map"})}var El=class extends x{constructor(){super(...arguments),this.nextId=0,this.pinnedTopRows={cache:{},order:[]},this.pinnedBottomRows={cache:{},order:[]}}postConstruct(){const e=this.gos;this.setPinnedRowData(e.get("pinnedTopRowData"),"top"),this.setPinnedRowData(e.get("pinnedBottomRowData"),"bottom"),this.addManagedPropertyListener("pinnedTopRowData",t=>this.setPinnedRowData(t.currentValue,"top")),this.addManagedPropertyListener("pinnedBottomRowData",t=>this.setPinnedRowData(t.currentValue,"bottom")),this.addManagedEventListeners({gridStylesChanged:this.onGridStylesChanges.bind(this)})}reset(){}isEmpty(e){return this.getCache(e).order.length===0}isRowsToRender(e){return!this.isEmpty(e)}isManual(){return!1}pinRow(e,t){}onGridStylesChanges(e){if(e.rowHeightChanged){const t=o=>{o.setRowHeight(o.rowHeight,!0)};co(this.pinnedBottomRows,t),co(this.pinnedTopRows,t)}}ensureRowHeightsValid(){let e=!1,t=0;const o=i=>{if(i.rowHeightEstimated){const s=_e(this.beans,i);i.setRowTop(t),i.setRowHeight(s.height),t+=s.height,e=!0}};return co(this.pinnedBottomRows,o),t=0,co(this.pinnedTopRows,o),this.eventSvc.dispatchEvent({type:"pinnedHeightChanged"}),e}setPinnedRowData(e,t){this.updateNodesFromRowData(e,t),this.eventSvc.dispatchEvent({type:"pinnedRowDataChanged"})}updateNodesFromRowData(e,t){const o=this.getCache(t);if(e===void 0){o.order.length=0,o.cache={};return}const i=ko(this.gos),s=t==="top"?ms:ws,n=new Set(o.order),r=[],l=new Set;let a=0,d=-1;for(const c of e){const u=(i==null?void 0:i({data:c,level:0,rowPinned:t}))??s+this.nextId++;if(l.has(u)){k(96,{id:u,data:c});continue}d++,l.add(u),r.push(u);const h=ao(o,u);if(h!==void 0)h.data!==c&&h.updateData(c),a+=this.setRowTopAndRowIndex(h,a,d),n.delete(u);else{const g=new so(this.beans);g.id=u,g.data=c,g.rowPinned=t,a+=this.setRowTopAndRowIndex(g,a,d),o.cache[u]=g,o.order.push(u)}}n.forEach(c=>{var u;(u=ao(o,c))==null||u.clearRowTopAndRowIndex(),delete o.cache[c]}),o.order=r}setRowTopAndRowIndex(e,t,o){return e.setRowTop(t),e.setRowHeight(_e(this.beans,e).height),e.setRowIndex(o),e.rowHeight}getPinnedTopTotalHeight(){return xl(this.pinnedTopRows)}getPinnedBottomTotalHeight(){return xl(this.pinnedBottomRows)}getPinnedTopRowCount(){return Vs(this.pinnedTopRows)}getPinnedBottomRowCount(){return Vs(this.pinnedBottomRows)}getPinnedTopRow(e){return Bs(this.pinnedTopRows,e)}getPinnedBottomRow(e){return Bs(this.pinnedBottomRows,e)}getPinnedRowById(e,t){return ao(this.getCache(t),e)}forEachPinnedRow(e,t){return co(this.getCache(e),t)}getCache(e){return e==="top"?this.pinnedTopRows:this.pinnedBottomRows}getPinnedState(){return{top:[],bottom:[]}}setPinnedState(){}getGrandTotalPinned(){}setGrandTotalPinned(){}};function xl(e){const t=Vs(e);if(t===0)return 0;const o=Bs(e,t-1);return o===void 0?0:o.rowTop+o.rowHeight}function ao(e,t){return e.cache[t]}function Bs(e,t){return ao(e,e.order[t])}function co(e,t){e.order.forEach((o,i)=>{const s=ao(e,o);s&&t(s,i)})}function Vs(e){return e.order.length}var lp=class extends x{constructor(){super(...arguments),this.beanName="pinnedRowModel"}postConstruct(){const{gos:e}=this,t=()=>{const o=e.get("enableRowPinning"),i=sr(e),n=!!o||(i==="pinnedBottom"||i==="pinnedTop"),r=n?this.inner instanceof El:this.inner instanceof Sl;this.inner&&r&&this.destroyBean(this.inner),(r||!this.inner)&&(this.inner=this.createManagedBean(n?new Sl:new El))};this.addManagedPropertyListeners(["enableRowPinning","grandTotalRow"],t),t()}reset(){return this.inner.reset()}isEmpty(e){return this.inner.isEmpty(e)}isManual(){return this.inner.isManual()}isRowsToRender(e){return this.inner.isRowsToRender(e)}pinRow(e,t,o){return this.inner.pinRow(e,t,o)}ensureRowHeightsValid(){return this.inner.ensureRowHeightsValid()}getPinnedRowById(e,t){return this.inner.getPinnedRowById(e,t)}getPinnedTopTotalHeight(){return this.inner.getPinnedTopTotalHeight()}getPinnedBottomTotalHeight(){return this.inner.getPinnedBottomTotalHeight()}getPinnedTopRowCount(){return this.inner.getPinnedTopRowCount()}getPinnedBottomRowCount(){return this.inner.getPinnedBottomRowCount()}getPinnedTopRow(e){return this.inner.getPinnedTopRow(e)}getPinnedBottomRow(e){return this.inner.getPinnedBottomRow(e)}forEachPinnedRow(e,t){return this.inner.forEachPinnedRow(e,t)}getPinnedState(){return this.inner.getPinnedState()}setPinnedState(e){return this.inner.setPinnedState(e)}setGrandTotalPinned(e){return this.inner.setGrandTotalPinned(e)}getGrandTotalPinned(){return this.inner.getGrandTotalPinned()}},Ns=class extends Ls{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=M(e)?e:""),super.setValue(e,t)}setStartValue(e){this.setValue(e,!0)}preventDisallowedCharacters(){const e=new RegExp(`[${this.config.allowedCharPattern}]`),t=o=>{il(o)&&o.key&&!e.test(o.key)&&o.preventDefault()};this.addManagedListeners(this.eInput,{keydown:t,paste:o=>{var s;const i=(s=o.clipboardData)==null?void 0:s.getData("text");i&&i.split("").some(n=>!e.test(n))&&o.preventDefault()}})}},ap={selector:"AG-INPUT-TEXT-FIELD",component:Ns},dp=class extends Ls{constructor(e){super(e,"ag-text-area",null,"textarea")}setValue(e,t){const o=super.setValue(e,t);return this.eInput.value=e,o}setCols(e){return this.eInput.cols=e,this}setRows(e){return this.eInput.rows=e,this}},cp={selector:"AG-INPUT-TEXT-AREA",component:dp},up=class extends Ns{constructor(e){super(e,"ag-number-field","number")}postConstruct(){super.postConstruct();const e=this.eInput;this.addManagedListeners(e,{blur:()=>{const n=parseFloat(e.value),r=isNaN(n)?"":this.normalizeValue(n.toString());this.value!==r&&this.setValue(r)},wheel:this.onWheel.bind(this)}),e.step="any";const{precision:t,min:o,max:i,step:s}=this.config;typeof t=="number"&&this.setPrecision(t),typeof o=="number"&&this.setMin(o),typeof i=="number"&&this.setMax(i),typeof s=="number"&&this.setStep(s)}onWheel(e){Y(this.beans)===this.eInput&&e.preventDefault()}normalizeValue(e){return e===""?"":(this.precision!=null&&(e=this.adjustPrecision(e)),e)}adjustPrecision(e,t){const o=this.precision;if(o==null)return e;if(t){const s=parseFloat(e).toFixed(o);return parseFloat(s).toString()}const i=String(e).split(".");if(i.length>1){if(i[1].length<=o)return e;if(o>0)return`${i[0]}.${i[1].slice(0,o)}`}return i[0]}setMin(e){return this.min===e?this:(this.min=e,ce(this.eInput,"min",e),this)}setMax(e){return this.max===e?this:(this.max=e,ce(this.eInput,"max",e),this)}setPrecision(e){return this.precision=e,this}setStep(e){return this.step===e?this:(this.step=e,ce(this.eInput,"step",e),this)}setValue(e,t){return this.setValueOrInputValue(o=>super.setValue(o,t),()=>this,e)}setStartValue(e){return this.setValueOrInputValue(t=>super.setValue(t,!0),t=>{this.eInput.value=t},e)}setValueOrInputValue(e,t,o){if(M(o)){let i=this.isScientificNotation(o);if(i&&this.eInput.validity.valid)return e(o);if(!i){o=this.adjustPrecision(o);const s=this.normalizeValue(o);i=o!=s}if(i)return t(o)}return e(o)}getValue(){const e=this.eInput;if(!e.validity.valid)return;const t=e.value;return this.isScientificNotation(t)?this.adjustPrecision(t,!0):super.getValue()}isScientificNotation(e){return typeof e=="string"&&e.includes("e")}},hp={selector:"AG-INPUT-NUMBER-FIELD",component:up},gp=class extends Ns{constructor(e){super(e,"ag-date-field","date")}postConstruct(){super.postConstruct();const e=ht();this.addManagedListeners(this.eInput,{wheel:this.onWheel.bind(this),mousedown:()=>{this.isDisabled()||e||this.eInput.focus()}}),this.eInput.step="any"}onWheel(e){Y(this.beans)===this.eInput&&e.preventDefault()}setMin(e){const t=e instanceof Date?$e(e??null,!!this.includeTime)??void 0:e;return this.min===t?this:(this.min=t,ce(this.eInput,"min",t),this)}setMax(e){const t=e instanceof Date?$e(e??null,!!this.includeTime)??void 0:e;return this.max===t?this:(this.max=t,ce(this.eInput,"max",t),this)}setStep(e){return this.step===e?this:(this.step=e,ce(this.eInput,"step",e),this)}setIncludeTime(e){return this.includeTime===e?this:(this.includeTime=e,super.setInputType(e?"datetime-local":"date"),e&&this.setStep(1),this)}getDate(){if(this.eInput.validity.valid)return no(this.getValue())??void 0}setDate(e,t){this.setValue($e(e??null,this.includeTime),t)}},Dl={selector:"AG-INPUT-DATE-FIELD",component:gp},pp=class extends j{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 y.ENTER:if(!this.highlightedEl)this.setValue(this.getValue());else{const o=this.itemEls.indexOf(this.highlightedEl);this.setValueByIndex(o)}break;case y.DOWN:case y.UP:e.preventDefault(),this.navigate(t);break;case y.PAGE_DOWN:case y.PAGE_UP:case y.PAGE_HOME:case y.PAGE_END:e.preventDefault(),this.navigateToPage(t);break}}navigate(e){const t=e===y.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 l=-1;e===y.PAGE_HOME?l=0:e===y.PAGE_END?l=s:e===y.PAGE_DOWN?l=Math.min(i+r,s):e===y.PAGE_UP&&(l=Math.max(i-r,0)),l!==-1&&this.highlightItem(t[l])}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=>{Ae(e)}),this.itemEls=[],this.refreshAriaRole()}refreshAriaRole(){const e=this.getGui();Be(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),Wd(t,e.length)})}renderOption(e,t){const o=X({tag:"div",cls:`ag-list-item ag-${this.cssIdentifier}-list-item`,attrs:{role:"option"}}),i=X({tag:"span",children:t});o.appendChild(i),this.unFocusable||(o.tabIndex=-1),this.itemEls.push(o),this.addManagedListeners(o,{mouseover:()=>this.highlightItem(o),mousedown:s=>{s.preventDefault(),s.stopPropagation(),this.setValue(e)}}),this.createOptionalManagedBean(this.beans.registry.createDynamicBean("tooltipFeature",!1,{getTooltipValue:()=>t,getGui:()=>o,getLocation:()=>"UNKNOWN",shouldDisplayTooltip:()=>i.scrollWidth>i.clientWidth})),this.getGui().appendChild(o)}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(!Me(e))return;this.clearHighlighted(),this.highlightedEl=e,e.classList.add(this.activeClass),Hi(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||!Me(e)||(e.classList.remove(this.activeClass),Hi(e,!1),this.highlightedEl=null)}fireChangeEvent(){this.dispatchLocalEvent({type:"fieldValueChanged"}),this.fireItemSelected()}fireItemSelected(){this.dispatchLocalEvent({type:"selectedItem"})}},fp=".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;&:where(.ag-picker-has-focus),&:where(:focus-within){background-color:var(--ag-picker-button-focus-background-color);border:var(--ag-picker-button-focus-border);box-shadow:var(--ag-focus-shadow);&:where(.invalid){box-shadow:var(--ag-focus-error-shadow)}}&:where(.invalid){background-color:var(--ag-input-invalid-background-color);border:var(--ag-input-invalid-border);color:var(--ag-input-invalid-text-color)}&:disabled{opacity:.5}}",Cp={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"}}]}]},mp=class extends ml{constructor(e){if(super(e,(e==null?void 0:e.template)||Cp,(e==null?void 0:e.agComponents)||[],e==null?void 0:e.className),this.isPickerDisplayed=!1,this.skipClick=!1,this.pickerGap=4,this.hideCurrentPicker=null,this.eLabel=A,this.eWrapper=A,this.eDisplayField=A,this.eIcon=A,this.registerCSS(fp),this.ariaRole=e==null?void 0: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=Tt(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()),Gi(e,!1),this.ariaRole&&Be(e,this.ariaRole)}onLabelOrWrapperMouseDown(e){if(e){const t=this.getFocusableElement();if(t!==this.eWrapper&&(e==null?void 0: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 y.UP:case y.DOWN:case y.ENTER:case y.SPACE:e.preventDefault(),this.onLabelOrWrapperMouseDown();break;case y.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:l,variableWidth:a,beans:d,eWrapper:c}=this,u={modal:s,eChild:e,closeOnEsc:!0,closedCallback:()=>{const f=or(d);this.beforeHidePicker(),f&&this.isAlive()&&this.getFocusableElement().focus()},ariaLabel:t(o,i),anchorToElement:c};e.style.position="absolute";const h=d.popupSvc,g=h.addPopup(u);a?(r&&(e.style.minWidth=r),e.style.width=Zi(ji(c)),l&&(e.style.maxWidth=l)):To(e,l??ji(c));const p=n??`${Ki(h.getPopupParent())}px`;return e.style.setProperty("max-height",p),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();Gi(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){var t;(t=this.pickerComponent)!=null&&t.getGui().contains(e.relatedTarget)||this.togglePickerHasFocus(!1)}togglePickerHasFocus(e){this.pickerComponent&&this.eWrapper.classList.toggle("ag-picker-has-focus",e)}hidePicker(){this.hideCurrentPicker&&(this.hideCurrentPicker(),this.dispatchLocalEvent({type:"pickerHidden"}))}setInputWidth(e){return To(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()}},wp=".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)}}",vp=class extends mp{constructor(e){super({pickerAriaLabelKey:"ariaLabelSelectField",pickerAriaLabelValue:"Select Field",pickerType:"ag-list",className:"ag-select",pickerIcon:"selectOpen",ariaRole:"combobox",...e}),this.registerCSS(wp)}postConstruct(){this.tooltipFeature=this.createOptionalManagedBean(this.beans.registry.createDynamicBean("tooltipFeature",!1,{shouldDisplayTooltip:Po(()=>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 pp("select",!0));this.listComponent=e,e.setParentComponent(this);const t=e.getAriaElement(),o=`ag-select-list-${e.getCompId()}`;t.setAttribute("id",o),Xd(this.getAriaElement(),t),e.addManagedElementListeners(e.getGui(),{mousedown:i=>{i==null||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){var o;const{key:t}=e;switch(t===y.TAB&&this.hidePicker(),t){case y.ENTER:case y.UP:case y.DOWN:case y.PAGE_UP:case y.PAGE_DOWN:case y.PAGE_HOME:case y.PAGE_END:e.preventDefault(),this.isPickerDisplayed?(o=this.listComponent)==null||o.handleKeyDown(e):super.onKeyDown(e);break;case y.ESCAPE:super.onKeyDown(e);break;case y.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(){var e;return(e=this.listComponent)==null||e.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 a=i.getDisplayValue();return a==null&&s&&(a=s),n.textContent=a,r==null||r.setTooltipAndRefresh(a??null),super.setValue(e,t)}destroy(){this.listComponent=this.destroyBean(this.listComponent),super.destroy()}},bp={selector:"AG-SELECT",component:vp},_s={TAB_GUARD:"ag-tab-guard",TAB_GUARD_TOP:"ag-tab-guard-top",TAB_GUARD_BOTTOM:"ag-tab-guard-bottom"},Sp=class extends x{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:l,onFocusIn:a,onFocusOut:d,shouldStopEventPropagation:c,onTabKeyDown:u,handleKeyDown:h,isEmpty:g,eFocusableElement:p}=e;this.comp=t,this.eTopGuard=o,this.eBottomGuard=i,this.providedFocusInnerElement=l,this.eFocusableElement=p,this.focusTrapActive=!!s,this.forceFocusOutWhenTabGuardsAreEmpty=!!n,this.isFocusableContainer=!!r,this.providedFocusIn=a,this.providedFocusOut=d,this.providedShouldStopEventPropagation=c,this.providedOnTabKeyDown=u,this.providedHandleKeyDown=h,this.providedIsEmpty=g}postConstruct(){this.createManagedBean(new ri(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():Ft(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){var a;const t=J(this.beans),o=Ft(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),l=this.gos.get("tabIndex");r.sort((d,c)=>{const u=parseInt(d.getAttribute("tabindex")||"0"),h=parseInt(c.getAttribute("tabindex")||"0");return h===l?1:u===l?-1:u===0?1:h===0?-1:u-h}),(a=r[e?r.length-1:0])==null||a.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=Ft(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 oi(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}},yp=class extends x{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(m=>C!=null?m.setAttribute("tabindex",C):m.removeAttribute("tabindex"))}};this.addTabGuards(t,o);const{focusTrapActive:r=!1,onFocusIn:l,onFocusOut:a,focusInnerElement:d,handleKeyDown:c,onTabKeyDown:u,shouldStopEventPropagation:h,isEmpty:g,forceFocusOutWhenTabGuardsAreEmpty:p,isFocusableContainer:f}=e;this.tabGuardCtrl=this.createManagedBean(new Sp({comp:n,focusTrapActive:r,eTopGuard:t,eBottomGuard:o,eFocusableElement:i,onFocusIn:l,onFocusOut:a,focusInnerElement:d,handleKeyDown:c,onTabKeyDown:u,shouldStopEventPropagation:h,isEmpty:g,forceFocusOutWhenTabGuardsAreEmpty:p,isFocusableContainer:f}))}getTabGuardCtrl(){return this.tabGuardCtrl}createTabGuard(e){const t=J(this.beans).createElement("div"),o=e==="top"?_s.TAB_GUARD_TOP:_s.TAB_GUARD_BOTTOM;return t.classList.add(_s.TAB_GUARD,o),Be(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];he(this.comp.getFocusableElement()),this.addTabGuards(...e)}forceFocusOutOfContainer(e=!1){this.tabGuardCtrl.forceFocusOutOfContainer(e)}appendChild(e,t,o){Qi(t)||(t=t.getGui());const{eBottomGuard:i}=this;i?i.insertAdjacentElement("beforebegin",t):e(t,o)}destroy(){const{eTopGuard:e,eBottomGuard:t}=this;Ae(e),Ae(t),super.destroy()}},Rp=class extends j{initialiseTabGuard(e){this.tabGuardFeature=this.createManagedBean(new yp(this)),this.tabGuardFeature.initialiseTabGuard(e)}forceFocusOutOfContainer(e=!1){this.tabGuardFeature.forceFocusOutOfContainer(e)}appendChild(e,t){this.tabGuardFeature.appendChild(super.appendChild.bind(this),e,t)}},lt=class{constructor(e,t=!1){this.DOUBLE_TAP_MILLIS=500,this.destroyFuncs=[],this.touching=!1,this.localEventService=new je,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;!Kr(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())}},Fl=class{constructor(e="javascript"){this.frameworkName=e,this.renderingEngine="vanilla",this.batchFrameworkComps=!1,this.wrapIncoming=t=>t(),this.wrapOutgoing=t=>t(),this.baseDocLink=`${Kn}/${this.frameworkName}-data-grid`,dc(this.baseDocLink)}setInterval(e,t){return new eo(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=dr(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 Ep(e){return{beanName:"gridApi",bean:e.getBean("apiFunctionSvc").api}}var xp=["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(xp.map((e,t)=>[e,t]));function Dp(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 Fp(e,t){return(e==null?void 0:e.beanName)==="gridDestroySvc"?-1:(t==null?void 0:t.beanName)==="gridDestroySvc"?1:0}var Pp={tag:"div",cls:"ag-pinned-left-header",role:"rowgroup"},Tp={tag:"div",cls:"ag-pinned-right-header",role:"rowgroup"},Ip={tag:"div",cls:"ag-header-viewport",role:"presentation",attrs:{tabindex:"-1"},children:[{tag:"div",ref:"eCenterContainer",cls:"ag-header-container",role:"rowgroup"}]},Ws=class extends j{constructor(e){super(),this.eCenterContainer=A,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 Vg(this.pinned)).setComp(e,this.getGui())}selectAndSetTemplate(){const e=this.pinned=="left",t=this.pinned=="right",o=e?Pp:t?Tp:Ip;this.setTemplate(o),this.eRowContainer=this.eCenterContainer!==A?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&&Bn(this.eRowContainer,n,o),o=n};e.forEach(s=>{const n=s.instanceId,r=t[n];delete t[n];const l=r||this.createBean(new Gg(s));this.headerRowComps[n]=l,this.rowCompsList.push(l),i(l)}),Object.values(t).forEach(s=>this.destroyRowComp(s))}},Ap={tag:"div",cls:"ag-header",role:"presentation"},Mp=class extends j{constructor(){super(Ap)}postConstruct(){const e={toggleCss:(i,s)=>this.toggleCss(i,s),setHeightAndMinHeight:i=>{this.getGui().style.height=i,this.getGui().style.minHeight=i}};this.createManagedBean(new Pg).setComp(e,this.getGui(),this.getFocusableElement());const o=i=>{this.createManagedBean(i),this.appendChild(i)};o(new Ws("left")),o(new Ws(null)),o(new Ws("right"))}},kp={selector:"AG-HEADER-ROOT",component:Mp},Lp=class extends j{constructor(e,t,o,i,s){super(),this.cellCtrl=t,this.rendererVersion=0,this.editorVersion=0,this.beans=e,this.gos=e.gos,this.column=t.column,this.rowNode=t.rowNode,this.eRow=i;const n=X({tag:"div",role:t.getCellAriaRole(),attrs:{"comp-id":`${this.getCompId()}`,"col-id":t.column.colIdSanitised}});this.eCell=n;let r;t.isCellSpanning()?(r=X({tag:"div",cls:"ag-spanned-cell-wrapper",role:"presentation"}),r.appendChild(n),this.setTemplateFromElement(r)):this.setTemplateFromElement(n),this.cellCssManager=new Pr(()=>n),this.forceWrapper=t.isForceWrapper(),this.refreshWrapper(!1);const l={toggleCss:(a,d)=>this.cellCssManager.toggleCss(a,d),setUserStyles:a=>Kt(n,a),getFocusableElement:()=>n,setIncludeSelection:a=>this.includeSelection=a,setIncludeRowDrag:a=>this.includeRowDrag=a,setIncludeDndSource:a=>this.includeDndSource=a,setRenderDetails:(a,d,c)=>this.setRenderDetails(a,d,c),setEditDetails:(a,d,c)=>this.setEditDetails(a,d,c),getCellEditor:()=>this.cellEditor||null,getCellRenderer:()=>this.cellRenderer||null,getParentOfValue:()=>this.getParentOfValue(),refreshEditStyles:(a,d)=>this.refreshEditStyles(a,d)};t.setComp(l,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=X({tag:"div",cls:"ag-cell-wrapper",role:"presentation"}),this.eCell.appendChild(this.eCellWrapper));const s=!o&&this.eCellWrapper!=null;s&&(Ae(this.eCellWrapper),this.eCellWrapper=void 0),this.cellCssManager.toggleCss("ag-cell-value",!o);const n=!e&&o,r=n&&this.eCellValue==null;r&&(this.eCellValue=X({tag:"span",cls:"ag-cell-value",role:"presentation"}),this.eCellWrapper.appendChild(this.eCellValue));const l=!n&&this.eCellValue!=null;l&&(Ae(this.eCellValue),this.eCellValue=void 0);const a=i||s||r||l;return a&&this.removeControls(),!e&&t&&this.addControls(),a}addControls(){const{cellCtrl:e,eCellWrapper:t,eCellValue:o,includeRowDrag:i,includeDndSource:s,includeSelection:n}=this,r=l=>{l&&t.insertBefore(l.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(l=>this.afterCellEditorCreated(i,l,n,t,o)),K(this.cellEditor)&&n.cellStartedEdit&&this.cellCtrl.focusCell(!0)}insertValueWithoutCellRenderer(e){const t=this.getParentOfValue();he(t);const o=bt(e);o!=null&&(t.textContent=o)}destroyRenderer(){const{context:e}=this.beans;this.cellRenderer=e.destroyBean(this.cellRenderer),Ae(this.cellRendererGui),this.cellRendererGui=null,this.rendererVersion++}destroyEditor(){var o,i;const{context:e}=this.beans;(((o=this.cellEditorPopupWrapper)==null?void 0:o.getGui().contains(Y(this.beans)))||this.cellCtrl.hasBrowserFocus())&&this.eCell.focus({preventScroll:!0}),(i=this.hideEditorPopup)==null||i.call(this),this.hideEditorPopup=void 0,this.cellEditor=e.destroyBean(this.cellEditor),this.cellEditorPopupWrapper=e.destroyBean(this.cellEditorPopupWrapper),Ae(this.cellEditorGui),this.cellCtrl.disableEditorTooltipFeature(),this.cellEditorGui=null,this.editorVersion++}refreshCellRenderer(e){var o;if(((o=this.cellRenderer)==null?void 0:o.refresh)==null||this.cellRendererClass!==e.componentClass)return!1;const t=this.cellRenderer.refresh(e.params);return t===!0||t===void 0}createCellRendererInstance(e){var n;const t=this.rendererVersion,o=r=>l=>{if(this.rendererVersion!==t||!this.isAlive())return;const d=r.newAgStackInstance(),c=this.afterCellRendererCreated.bind(this,t,r.componentClass);d==null||d.then(c)},{animationFrameSvc:i}=this.beans;let s;if(i!=null&&i.active&&this.firstRender?s=(r,l=!1)=>{i.createTask(o(r),this.rowNode.rowIndex,"p2",r.componentFromFramework,l)}:s=r=>o(r)(),(n=e.params)!=null&&n.deferRender&&!this.cellCtrl.rowNode.group){const{loadingComp:r,onReady:l}=this.cellCtrl.getDeferLoadingCellRenderer();r&&(s(r),l.then(()=>s(e,!0)))}else s(e)}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();he(n),n.appendChild(s)}}afterCellEditorCreated(e,t,o,i,s){var d;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){k(97,{colId:this.column.getId()}),r.destroyBean(t);return}this.cellEditor=t,this.cellEditorGui=t.getGui();const a=i||t.isPopup!==void 0&&t.isPopup();a?this.addPopupCellEditor(o,s):this.addInCellEditor(),this.refreshEditStyles(!0,a),(d=t.afterGuiAttached)==null||d.call(t),this.cellCtrl.enableEditorTooltipFeature(t),this.cellCtrl.cellEditorAttached()}refreshEditStyles(e,t){const{cellCssManager:o}=this;o.toggleCss("ag-cell-inline-editing",e&&!t),o.toggleCss("ag-cell-popup-editing",e&&!!t),o.toggleCss("ag-cell-not-inline-editing",!e||!!t)}addInCellEditor(){const{eCell:e}=this;e.contains(Y(this.beans))&&e.focus(),this.destroyRenderer(),this.refreshWrapper(!0),he(this.getParentOfValue()),this.cellEditorGui&&this.getParentOfValue().appendChild(this.cellEditorGui)}addPopupCellEditor(e,t){var v;const{gos:o,context:i,popupSvc:s,editSvc:n}=this.beans;o.get("editType")==="fullRow"&&k(98);const r=this.cellEditorPopupWrapper=i.createBean(n.createPopupEditorWrapper(e)),{cellEditor:l,cellEditorGui:a,eCell:d,rowNode:c,column:u,cellCtrl:h}=this,g=r.getGui();a&&g.appendChild(a);const p=o.get("stopEditingWhenCellsLoseFocus"),f=t??((v=l.getPopupPosition)==null?void 0:v.call(l))??"over",C=o.get("enableRtl"),m={ePopup:g,column:u,rowNode:c,type:"popupCellEditor",eventSource:d,position:f,alignSide:C?"right":"left",keepWithinBounds:!0},w=s.positionPopupByComponent.bind(s,m),b=s.addPopup({modal:p,eChild:g,closeOnEsc:!0,closedCallback:()=>{h.onPopupEditorClosed()},anchorToElement:d,positionCallback:w,ariaOwns:d});b&&(this.hideEditorPopup=b.hideFunc)}detach(){this.eRow.removeChild(this.getGui())}destroy(){this.destroyRenderer(),this.destroyEditor(),this.removeControls(),super.destroy()}},Gp=class extends j{constructor(e,t,o){super(),this.cellComps=new Map,this.beans=t,this.rowCtrl=e;const i=X({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,toggleCss:(r,l)=>this.toggleCss(r,l),setUserStyles:r=>Kt(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=>{var l,a;return((a=(l=this.fullWidthCellRenderer)==null?void 0:l.refresh)==null?void 0:a.call(l,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())}Vn(this.getGui(),t)}newCellComp(e){var i;const t=((i=this.beans.editSvc)==null?void 0:i.isEditing(e,{withOpenEditor:!0}))??!1,o=new Lp(this.beans,e,this.rowCtrl.printLayout,this.getGui(),t);this.cellComps.set(e.instanceId,o),this.getGui().appendChild(o.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 Hp(e,t,o){const i=!!o.gos.get("enableCellSpan")&&!!t.getSpannedRowCtrls,s={tag:"div",ref:"eContainer",cls:pi(e),role:"rowgroup"};if(t.type==="center"||i){const n={tag:"div",ref:"eSpannedContainer",cls:`ag-spanning-container ${ng(e)}`,role:"rowgroup"};return{tag:"div",ref:"eViewport",cls:`ag-viewport ${nl(e)}`,role:"presentation",children:[s,i?n:null]}}return s}var Op=class extends j{constructor(e){super(),this.eViewport=A,this.eContainer=A,this.eSpannedContainer=A,this.rowCompsNoSpan={},this.rowCompsWithSpan={},this.name=e==null?void 0:e.name,this.options=ro(this.name)}postConstruct(){this.setTemplate(Hp(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 fg(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 l=[];for(const a of e){const d=a.instanceId,c=n[d];let u;if(c)u=c,delete n[d];else{if(!a.rowNode.displayed)continue;u=new Gp(a,o,i.type)}r[d]=u,l.push([u,!c])}this.removeOldRows(Object.values(n),s),this.addRowNodes(l,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){Bn(t,e,this.lastPlacedElement),this.lastPlacedElement=e}},Bp={selector:"AG-ROW-CONTAINER",component:Op};function uo(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 Vp(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:uo(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:uo(t,["left","center","right","fullWidth"])},{tag:"ag-fake-vertical-scroll"}]},{tag:"div",ref:"eStickyTop",cls:"ag-sticky-top",role:"presentation",children:uo(t,["stickyTopLeft","stickyTopCenter","stickyTopRight","stickyTopFullWidth"])},{tag:"div",ref:"eStickyBottom",cls:"ag-sticky-bottom",role:"presentation",children:uo(t,["stickyBottomLeft","stickyBottomCenter","stickyBottomRight","stickyBottomFullWidth"])},{tag:"div",ref:"eBottom",cls:"ag-floating-bottom",role:"presentation",children:uo(t,["bottomLeft","bottomCenter","bottomRight","bottomFullWidth"])},{tag:"ag-fake-horizontal-scroll"},e?{tag:"ag-overlay-wrapper"}:null]};return{paramsMap:t,elementParams:o}}var Np=class extends j{constructor(){super(...arguments),this.eGridRoot=A,this.eBodyViewport=A,this.eStickyTop=A,this.eStickyBottom=A,this.eTop=A,this.eBottom=A,this.eBody=A}postConstruct(){const{overlays:e,rangeSvc:t}=this.beans,o=e==null?void 0:e.getOverlayWrapperSelector(),{paramsMap:i,elementParams:s}=Vp(!!o);this.setTemplate(s,[...o?[o]:[],Sg,Eg,kp,Bp],i);const n=(l,a)=>{const d=`${l}px`;a.style.minHeight=d,a.style.height=d},r={setRowAnimationCssOnBodyViewport:(l,a)=>this.setRowAnimationCssOnBodyViewport(l,a),setColumnCount:l=>jd(this.getGui(),l),setRowCount:l=>Ud(this.getGui(),l),setTopHeight:l=>n(l,this.eTop),setBottomHeight:l=>n(l,this.eBottom),setTopInvisible:l=>this.eTop.classList.toggle("ag-invisible",l),setBottomInvisible:l=>this.eBottom.classList.toggle("ag-invisible",l),setStickyTopHeight:l=>this.eStickyTop.style.height=l,setStickyTopTop:l=>this.eStickyTop.style.top=l,setStickyTopWidth:l=>this.eStickyTop.style.width=l,setStickyBottomHeight:l=>{this.eStickyBottom.style.height=l,this.eStickyBottom.classList.toggle("ag-invisible",l==="0px")},setStickyBottomBottom:l=>this.eStickyBottom.style.bottom=l,setStickyBottomWidth:l=>this.eStickyBottom.style.width=l,setColumnMovingCss:(l,a)=>this.toggleCss(l,a),updateLayoutClasses:(l,a)=>{const d=[this.eBodyViewport.classList,this.eBody.classList];for(const c of d)c.toggle(be.AUTO_HEIGHT,a.autoHeight),c.toggle(be.NORMAL,a.normal),c.toggle(be.PRINT,a.print);this.toggleCss(be.AUTO_HEIGHT,a.autoHeight),this.toggleCss(be.NORMAL,a.normal),this.toggleCss(be.PRINT,a.print)},setAlwaysVerticalScrollClass:(l,a)=>this.eBodyViewport.classList.toggle(al,a),registerBodyViewportResizeListener:l=>{const a=Ze(this.beans,this.eBodyViewport,l);this.addDestroyFunc(()=>a())},setPinnedTopBottomOverflowY:l=>this.eTop.style.overflowY=this.eBottom.style.overflowY=l,setCellSelectableCss:(l,a)=>{[this.eTop,this.eBodyViewport,this.eBottom].forEach(d=>d.classList.toggle(l,a))},setBodyViewportWidth:l=>this.eBodyViewport.style.width=l,setGridRootRole:l=>Be(this.eGridRoot,l)};this.ctrl=this.createManagedBean(new wg),this.ctrl.setComp(r,this.getGui(),this.eBodyViewport,this.eTop,this.eBottom,this.eStickyTop,this.eStickyBottom),(t&&Je(this.gos)||Qt(this.gos))&&$d(this.getGui(),!0)}setRowAnimationCssOnBodyViewport(e,t){const o=this.eBodyViewport.classList;o.toggle("ag-row-animation",t),o.toggle("ag-row-no-animation",!t)}},_p={selector:"AG-GRID-BODY",component:Np},Wp=class extends x{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==null||i.registerGridDropTarget(()=>this.eGui,this),Zr(this.gos,t),this.createManagedBean(new bs(this.view)),this.view.setRtlClass(this.gos.get("enableRtl")?"ag-rtl":"ag-ltr");const n=Ze(this.beans,this.eGridHostDiv,this.onGridSizeChanged.bind(this));this.addDestroyFunc(()=>n()),s.register("gridCtrl",this)}isDetailGrid(){var t;const e=vh(this.getGui());return((t=e==null?void 0:e.getAttribute("row-id"))==null?void 0:t.startsWith("detail"))||!1}getOptionalSelectors(){var t,o,i,s,n;const e=this.beans;return{paginationSelector:(t=e.pagination)==null?void 0:t.getPaginationSelector(),gridHeaderDropZonesSelector:(o=e.registry)==null?void 0:o.getSelector("AG-GRID-HEADER-DROP-ZONES"),sideBarSelector:(i=e.sideBar)==null?void 0:i.getSelector(),statusBarSelector:(s=e.registry)==null?void 0:s.getSelector("AG-STATUS-BAR"),watermarkSelector:(n=e.licenseManager)==null?void 0:n.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){const{view:t}=this;if(e===!1)t.setCursor(null);else{const o=e===1?"ew-resize":"ns-resize";t.setCursor(o)}}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,l=$(r);if(n.focusGridView({column:l,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($(o),e);const r=$(n);if(i.focusGridView({column:r,backwards:e}))return!0}if(this.gos.get("headerHeight")===0||rt(this.beans)){if(i.focusGridView({column:n[0],backwards:e}))return!0;for(let r=1;r<o.length;r++)if(ti(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){var n;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];(n=s.setAllowFocus)==null||n.call(s,!0),setTimeout(()=>{var r;(r=s.setAllowFocus)==null||r.call(s,!1)})}isFocusable(){var t,o;const e=this.beans;return!ii(e)||!rt(e)||!!((o=(t=e.sideBar)==null?void 0:t.comp)!=null&&o.isDisplayed())}getNextFocusableIndex(e,t){const o=Y(this.beans),i=e.findIndex(n=>n.getGui().contains(o)),s=i+(t?-1:1);return{indexWithFocus:i,nextIndex:s}}focusContainer(e,t){var i,s;(i=e.setAllowFocus)==null||i.call(e,!0);const o=ti(e.getGui(),t,!1,!0);return(s=e.setAllowFocus)==null||s.call(e,!1),o}getFocusableContainers(){return[...this.view.getFocusableContainers(),...this.additionalFocusableContainers]}destroy(){this.additionalFocusableContainers.clear(),super.destroy()}},zp=class extends Rp{constructor(e){super(),this.gridBody=A,this.sideBar=A,this.pagination=A,this.rootWrapperBody=A,this.eGridDiv=e}postConstruct(){const e={destroyGridUi:()=>this.destroyBean(this),setRtlClass:n=>this.addCss(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 Wp),o=t.getOptionalSelectors(),i=this.createTemplate(o),s=[_p,...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),jt(this.gos,"Grid removed from DOM")})}updateLayoutClasses(e,t){const o=this.rootWrapperBody.classList,{AUTO_HEIGHT:i,NORMAL:s,PRINT:n}=be,{autoHeight:r,normal:l,print:a}=t;o.toggle(i,r),o.toggle(s,l),o.toggle(n,a),this.toggleCss(i,r),this.toggleCss(s,l),this.toggleCss(n,a)}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){var t;if(!e&&((t=this.pagination)!=null&&t.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=>Me(t.getGui()))}},N=(e,t)=>{for(const o of Object.keys(t))t[o]=e;return t},Tl={dispatchEvent:"CommunityCore",...N("CommunityCore",{destroy:0,getGridId:0,getGridOption:0,isDestroyed:0,setGridOption:0,updateGridOptions:0,isModuleRegistered:0}),...N("GridState",{getState:0,setState:0}),...N("SharedRowSelection",{setNodesSelected:0,selectAll:0,deselectAll:0,selectAllFiltered:0,deselectAllFiltered:0,selectAllOnCurrentPage:0,deselectAllOnCurrentPage:0,getSelectedNodes:0,getSelectedRows:0}),...N("RowApi",{redrawRows:0,setRowNodeExpanded:0,getRowNode:0,addRenderedRowListener:0,getRenderedNodes:0,forEachNode:0,getFirstDisplayedRowIndex:0,getLastDisplayedRowIndex:0,getDisplayedRowAtIndex:0,getDisplayedRowCount:0}),...N("ScrollApi",{getVerticalPixelRange:0,getHorizontalPixelRange:0,ensureColumnVisible:0,ensureIndexVisible:0,ensureNodeVisible:0}),...N("KeyboardNavigation",{getFocusedCell:0,clearFocusedCell:0,setFocusedCell:0,tabToNextCell:0,tabToPreviousCell:0,setFocusedHeader:0}),...N("EventApi",{addEventListener:0,addGlobalListener:0,removeEventListener:0,removeGlobalListener:0}),...N("ValueCache",{expireValueCache:0}),...N("CellApi",{getCellValue:0}),...N("SharedMenu",{showColumnMenu:0,hidePopupMenu:0}),...N("Sort",{onSortChanged:0}),...N("PinnedRow",{getPinnedTopRowCount:0,getPinnedBottomRowCount:0,getPinnedTopRow:0,getPinnedBottomRow:0,forEachPinnedRow:0}),...N("Overlay",{showLoadingOverlay:0,showNoRowsOverlay:0,hideOverlay:0}),...N("RenderApi",{setGridAriaProperty:0,refreshCells:0,refreshHeader:0,isAnimationFrameQueueEmpty:0,flushAllAnimationFrames:0,getSizesForCurrentTheme:0,getCellRendererInstances:0}),...N("HighlightChanges",{flashCells:0}),...N("RowDrag",{addRowDropZone:0,removeRowDropZone:0,getRowDropZoneParams:0,getRowDropPositionIndicator:0,setRowDropPositionIndicator:0}),...N("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}),...N("ColumnAutoSize",{sizeColumnsToFit:0,autoSizeColumns:0,autoSizeAllColumns:0}),...N("ColumnGroup",{setColumnGroupOpened:0,getColumnGroup:0,getProvidedColumnGroup:0,getDisplayNameForColumnGroup:0,getColumnGroupState:0,setColumnGroupState:0,resetColumnGroupState:0,getLeftDisplayedColumnGroups:0,getCenterDisplayedColumnGroups:0,getRightDisplayedColumnGroups:0,getAllDisplayedColumnGroups:0}),...N("ColumnMove",{moveColumnByIndex:0,moveColumns:0}),...N("ColumnResize",{setColumnWidths:0}),...N("ColumnHover",{isColumnHovered:0}),...N("EditCore",{getCellEditorInstances:0,getEditingCells:0,stopEditing:0,startEditingCell:0,isEditing:0,validateEdit:0}),...N("BatchEdit",{startBatchEdit:0,cancelBatchEdit:0,commitBatchEdit:0,isBatchEditing:0}),...N("UndoRedoEdit",{undoCellEditing:0,redoCellEditing:0,getCurrentUndoSize:0,getCurrentRedoSize:0}),...N("FilterCore",{isAnyFilterPresent:0,onFilterChanged:0}),...N("ColumnFilter",{isColumnFilterPresent:0,getColumnFilterInstance:0,destroyFilter:0,setFilterModel:0,getFilterModel:0,getColumnFilterModel:0,setColumnFilterModel:0,showColumnFilter:0,hideColumnFilter:0,getColumnFilterHandler:0,doFilterAction:0}),...N("QuickFilter",{isQuickFilterPresent:0,getQuickFilter:0,resetQuickFilter:0}),...N("Find",{findGetActiveMatch:0,findGetTotalMatches:0,findGoTo:0,findNext:0,findPrevious:0,findGetNumMatches:0,findGetParts:0,findClearActive:0,findRefresh:0}),...N("Pagination",{paginationIsLastPageFound:0,paginationGetPageSize:0,paginationGetCurrentPage:0,paginationGetTotalPages:0,paginationGetRowCount:0,paginationGoToNextPage:0,paginationGoToPreviousPage:0,paginationGoToFirstPage:0,paginationGoToLastPage:0,paginationGoToPage:0}),...N("CsrmSsrmSharedApi",{expandAll:0,collapseAll:0,onRowHeightChanged:0}),...N("SsrmInfiniteSharedApi",{setRowCount:0,getCacheBlockState:0,isLastRowIndexKnown:0}),...N("ClientSideRowModelApi",{onGroupExpandedOrCollapsed:0,refreshClientSideRowModel:0,isRowDataEmpty:0,forEachLeafNode:0,forEachNodeAfterFilter:0,forEachNodeAfterFilterAndSort:0,resetRowHeights:0,applyTransaction:0,applyTransactionAsync:0,flushAsyncTransactions:0,getBestCostNodeSelection:0}),...N("CsvExport",{getDataAsCsv:0,exportDataAsCsv:0}),...N("InfiniteRowModel",{refreshInfiniteCache:0,purgeInfiniteCache:0,getInfiniteRowCount:0}),...N("AdvancedFilter",{getAdvancedFilterModel:0,setAdvancedFilterModel:0,showAdvancedFilterBuilder:0,hideAdvancedFilterBuilder:0}),...N("IntegratedCharts",{getChartModels:0,getChartRef:0,getChartImageDataURL:0,downloadChart:0,openChartToolPanel:0,closeChartToolPanel:0,createRangeChart:0,createPivotChart:0,createCrossFilterChart:0,updateChart:0,restoreChart:0}),...N("Clipboard",{copyToClipboard:0,cutToClipboard:0,copySelectedRowsToClipboard:0,copySelectedRangeToClipboard:0,copySelectedRangeDown:0,pasteFromClipboard:0}),...N("ExcelExport",{getDataAsExcel:0,exportDataAsExcel:0,getSheetDataForExcel:0,getMultipleSheetsAsExcel:0,exportMultipleSheetsAsExcel:0}),...N("SharedMasterDetail",{addDetailGridInfo:0,removeDetailGridInfo:0,getDetailGridInfo:0,forEachDetailGridInfo:0}),...N("ContextMenu",{showContextMenu:0}),...N("ColumnMenu",{showColumnChooser:0,hideColumnChooser:0}),...N("CellSelection",{getCellRanges:0,addCellRange:0,clearRangeSelection:0,clearCellSelection:0}),...N("SharedRowGrouping",{setRowGroupColumns:0,removeRowGroupColumns:0,addRowGroupColumns:0,getRowGroupColumns:0,moveRowGroupColumn:0}),...N("SharedAggregation",{addAggFuncs:0,clearAggFuncs:0,setColumnAggFunc:0}),...N("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}),...N("ServerSideRowModelApi",{getServerSideSelectionState:0,setServerSideSelectionState:0,applyServerSideTransaction:0,applyServerSideTransactionAsync:0,applyServerSideRowData:0,retryServerSideLoads:0,flushServerSideAsyncTransactions:0,refreshServerSide:0,getServerSideGroupLevelState:0}),...N("SideBar",{isSideBarVisible:0,setSideBarVisible:0,setSideBarPosition:0,openToolPanel:0,closeToolPanel:0,getOpenedToolPanel:0,refreshToolPanel:0,isToolPanelShowing:0,getToolPanelInstance:0,getSideBar:0}),...N("StatusBar",{getStatusPanel:0})},zs={isDestroyed:()=>!0,destroy(){},preConstruct(){},postConstruct(){},preWireBeans(){},wireBeans(){}},$p=(e,t)=>e.eventSvc.dispatchEvent(t),Il=class{};Reflect.defineProperty(Il,"name",{value:"GridApi"});var Up=class extends x{constructor(){super(),this.beanName="apiFunctionSvc",this.api=new Il,this.fns={...zs,dispatchEvent:$p},this.preDestroyLink="";const{api:e}=this;for(const t of Object.keys(Tl))e[t]=this.makeApi(t)[t]}postConstruct(){this.preDestroyLink=this.beans.frameworkOverrides.getDocLink("grid-lifecycle/#grid-pre-destroyed")}addFunction(e,t){var s;const{fns:o,beans:i}=this;o!==zs&&(o[e]=((s=i==null?void 0:i.validation)==null?void 0:s.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)k(26,{fnName:e,preDestroyLink:i});else{const s=Tl[e];o.assertModuleRegistered(s,`api.${e}`)&&k(27,{fnName:e,module:s})}}destroy(){super.destroy(),this.fns=zs,this.beans=null}};function Kp(e){return e.context.getGridId()}function jp(e){e.gridDestroySvc.destroy()}function qp(e){return e.gridDestroySvc.destroyCalled}function Yp(e,t){return e.gos.get(t)}function Zp(e,t,o){Al(e,{[t]:o})}function Al(e,t){e.gos.updateGridOptions({options:t})}function Qp(e,t){const o=t.replace(/Module$/,"");return e.gos.isModuleRegistered(o)}var Xp={tag:"div",cls:"ag-drag-handle ag-row-drag",attrs:{draggable:"true"}},Jp=class extends j{constructor(e,t,o){super(Xp),this.rowNode=e,this.column=t,this.eCell=o}postConstruct(){this.getGui().appendChild(Tt("rowDrag",this.beans,null)),this.addGuiEventListener("mousedown",t=>{t.stopPropagation()}),this.addDragSource(),this.checkVisibility()}addDragSource(){this.addGuiEventListener("dragstart",this.onDragStart.bind(this))}onDragStart(e){const{rowNode:t,column:o,eCell:i,gos:s}=this,n=o.getColDef().dndSourceOnRowDrag,r=e.dataTransfer;if(r.setDragImage(i,0,0),n){const l=_(s,{rowNode:t,dragEvent:e});n(l)}else try{const l=JSON.stringify(t.data);r.setData("application/json",l),r.setData("text/plain",l)}catch{}}checkVisibility(){const e=this.column.isDndSource(this.rowNode);this.setDisplayed(e)}},ef=class extends x{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(1),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)}},Ci=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()])}},Ml={moduleName:"Drag",version:G,beans:[Hh]},tf={moduleName:"DragAndDrop",version:G,dynamicBeans:{dndSourceComp:Jp},icons:{rowDrag:"grip"}},of={moduleName:"SharedDragAndDrop",version:G,beans:[Gh],dependsOn:[Ml],userComponents:{agDragAndDropImage:jg},icons:{columnMovePin:"pin",columnMoveHide:"eye-slash",columnMoveMove:"arrows",columnMoveLeft:"left",columnMoveRight:"right",columnMoveGroup:"group",columnMoveValue:"aggregation",columnMovePivot:"pivot",dropNotAllowed:"not-allowed",rowDrag:"grip"}},sf={moduleName:"HorizontalResize",version:G,beans:[ef],dependsOn:[Ml]},nf=":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}}",rf=class extends x{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 lf(e,t,o){var i;(i=e.colMoves)==null||i.moveColumnByIndex(t,o,"api")}function af(e,t,o){var i;(i=e.colMoves)==null||i.moveColumns(t,o,"api")}var df=class extends x{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==null||t.addColumns(this.columnsToAggregate,"toolPanelDragAndDrop")),this.columnsToGroup.length>0&&(o==null||o.addColumns(this.columnsToGroup,"toolPanelDragAndDrop")),this.columnsToPivot.length>0&&(i==null||i.addColumns(this.columnsToPivot,"toolPanelDragAndDrop"))}onDragCancel(){this.clearColumnsList()}};function cf(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 uf(e){const t=[...e];return e.forEach(o=>{var n;let i=null,s=o.getParent();for(;s!=null&&s.getDisplayedLeafColumns().length===1;)i=s,s=s.getParent();i!=null&&(!!((n=i.getColGroupDef())!=null&&n.marryChildren)?i.getProvidedColumnGroup().getLeafColumns():i.getLeafColumns()).forEach(a=>{t.includes(a)||t.push(a)})}),t}function hf(e,t,o,i){const s=i.allCols;let n=null,r=null;for(let l=0;l<e.length;l++){const a=e[l],d=o.getProposedColumnOrder(t,a);if(!o.doesOrderPassRules(d))continue;const c=d.filter(h=>s.includes(h));if(r===null)r=c;else if(!Jt(c,r))break;const u=pf(d);(n===null||u<n.fragCount)&&(n={move:a,fragCount:u})}return n}function kl(e){const{isFromHeader:t,fromLeft:o,xPosition:i,fromEnter:s,fakeEvent:n,pinned:r,gos:l,colModel:a,colMoves:d,visibleCols:c}=e;let{allMovingColumns:u}=e;t&&(u=uf(u));const h=u.slice();cf(a.getCols(),h);const g=Cf({movingCols:h,draggingRight:o,xPosition:i,pinned:r,gos:l,colModel:a,visibleCols:c}),p=gf(h,a);if(g.length===0)return;const f=g[0];if(p!==null&&(t||!s)&&!n&&(!o&&f>=p||o&&f<=p))return;const m=hf(g,h,d,c);if(!m)return;const w=m.move;if(!(w>a.getCols().length-h.length))return{columns:h,toIndex:w}}function Ll(e){const{columns:t,toIndex:o}=kl(e)||{},{finished:i,colMoves:s}=e;return!t||o==null?null:(s.moveColumns(t,o,"uiColumnMoved",i),i?null:{columns:t,toIndex:o})}function gf(e,t){const o=t.getCols(),i=e.map(a=>o.indexOf(a)).sort((a,d)=>a-d),s=i[0];return $(i)-s!==i.length-1?null:s}function pf(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 ff(e,t){switch(t){case"left":return e.leftCols;case"right":return e.rightCols;default:return e.centerCols}}function Cf(e){const{movingCols:t,draggingRight:o,xPosition:i,pinned:s,gos:n,colModel:r,visibleCols:l}=e;if(n.get("suppressMovableColumns")||t.some(b=>b.getColDef().suppressMovable))return[];const d=ff(l,s),c=r.getCols(),u=d.filter(b=>t.includes(b)),h=d.filter(b=>!t.includes(b)),g=c.filter(b=>!t.includes(b));let p=0,f=i;if(o){let b=0;u.forEach(v=>b+=v.getActualWidth()),f-=b}if(f>0){for(let b=0;b<h.length;b++){const v=h[b];if(f-=v.getActualWidth(),f<0)break;p++}o&&p++}let C;if(p>0){const b=h[p-1];C=g.indexOf(b)+1}else C=g.indexOf(h[0]),C===-1&&(C=0);const m=[C],w=(b,v)=>b-v;if(o){let b=C+1;const v=c.length-1;for(;b<=v;)m.push(b),b++;m.sort(w)}else{let b=C;const v=c.length-1;let S=c[b];for(;b<=v&&d.indexOf(S)<0;)b++,m.push(b),S=c[b];b=C-1;const D=0;for(;b>=D;)m.push(b),b--;m.sort(w).reverse()}return m}function $s(e){var d;const{pinned:t,fromKeyboard:o,gos:i,ctrlsSvc:s,useHeaderRow:n,skipScrollPadding:r}=e;let l=(d=s.getHeaderRowContainerCtrl(t))==null?void 0:d.eViewport,{x:a}=e;return l?(o&&(a-=l.getBoundingClientRect().left),i.get("enableRtl")&&(n&&(l=l.querySelector(".ag-header-row")),a=l.clientWidth-a),t==null&&!r&&(a+=s.get("center").getCenterViewportScrollLeft()),a):0}function Us(e,t){for(const o of e)o.moving=t,o.dispatchColEvent("movingChanged","uiColumnMoved")}var Gl=7,Ks=100,mi=Ks/2,mf=5,wf=100,vf=class extends x{constructor(e){super(),this.pinned=e,this.needToMoveLeft=!1,this.needToMoveRight=!1,this.lastMovedInfo=null,this.isCenterContainer=!M(e)}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.gridBodyCon=e.gridBodyCtrl})}getIconName(){const{pinned:e,lastDraggingEvent:t}=this,{dragItem:o}=t||{},i=(o==null?void 0:o.columns)??[];for(const s of i){const n=s.getPinned();if(s.getColDef().lockPinned){if(n==e)return"move";continue}const r=o==null?void 0:o.containerType;if(r===e||!e)return"move";if(e&&(!n||r!==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()]&&!r.isVisible());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&&K(e.hDirection))return;const l=$s({x:e.x,pinned:this.pinned,gos:s,ctrlsSvc:n});t||this.checkCenterForScrolling(l),r?this.handleColumnDragWhileSuppressingMovement(e,t,o,l,i):this.handleColumnDragWhileAllowingMovement(e,t,o,l,i)}onDragLeave(){this.ensureIntervalCleared(),this.clearHighlighted(),this.updateDragItemContainerType(),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!=null&&e.length))return;const i=e.filter(s=>!s.getColDef().lockVisible);i.length&&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)}updateDragItemContainerType(){const{lastDraggingEvent:e}=this;if(this.gos.get("suppressMoveWhenColumnDragging")||!e)return;const t=e.dragItem;t&&(t.containerType=this.pinned)}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:l,xPosition:a}=this.getNormalisedXPositionInfo(n,r)||{};if(l==null||a==null){this.finishColumnMoving();return}this.moveColumnsAfterHighlight({allMovingColumns:n,xPosition:a,fromEnter:t,fakeEvent:o,fromLeft:l})}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",l=e.dragSource.type===1,a=this.getMoveColumnParams({allMovingColumns:n,isFromHeader:l,xPosition:i,fromLeft:r,fromEnter:t,fakeEvent:o}),d=Ll({...a,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:l,colModel:a,colMoves:d,visibleCols:c}=this.beans;return{allMovingColumns:t,isFromHeader:o,fromLeft:s,xPosition:i,pinned:this.pinned,fromEnter:n,fakeEvent:r,gos:l,colModel:a,colMoves:d,visibleCols:c}}highlightHoveredColumn(e,t){var c;const{gos:o,colModel:i}=this.beans,s=o.get("enableRtl"),n=i.getCols().filter(u=>u.isVisible()&&u.getPinned()===this.pinned);let r=null,l=null,a=null;for(const u of n){if(l=u.getActualWidth(),r=this.getNormalisedColumnLeft(u,0,s),r!=null){const h=r+l;if(r<=t&&h>=t){a=u;break}}r=null,l=null}if(a)e.indexOf(a)!==-1&&(a=null);else{for(let u=n.length-1;u>=0;u--){const h=n[u],g=n[u].getParent();if(!g){a=h;break}const p=g==null?void 0:g.getDisplayedLeafColumns();if(p.length){a=$(p);break}}if(!a)return;r=this.getNormalisedColumnLeft(a,0,s),l=a.getActualWidth()}if(((c=this.lastHighlightedColumn)==null?void 0:c.column)!==a&&this.clearHighlighted(),a==null||r==null||l==null)return;let d;t-r<l/2!==s?d=0:d=1,Hl(a,d),this.lastHighlightedColumn={column:a,position:d}}getNormalisedXPositionInfo(e,t){const{gos:o,visibleCols:i}=this.beans,s=o.get("enableRtl"),{firstMovingCol:n,column:r,position:l}=this.getColumnMoveAndTargetInfo(e,t,s);if(!n||!r||l==null)return;const a=i.allCols,d=a.indexOf(n),c=a.indexOf(r),u=l===0!==s,h=d<c||d===c&&!u;let g=0;if(u?h&&(g-=1):h||(g+=1),c+g===d)return;const p=a[c+g];if(!p)return;const f=this.getNormalisedColumnLeft(p,20,s);return{fromLeft:h,xPosition:f}}getColumnMoveAndTargetInfo(e,t,o){const i=this.lastHighlightedColumn||{},{firstMovingCol:s,lastMovingCol:n}=bf(e);if(!s||!n||i.column||!t)return{firstMovingCol:s,...i};const l=this.getPinDirection()==="left";return{firstMovingCol:s,position:l?1:0,column:l!==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 $s({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>Gl;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:l,toIndex:a}=kl(r)||{};l&&a!=null&&(this.lastMovedInfo={columns:l,toIndex:a}),this.finishColumnMoving()}clearHighlighted(){const{lastHighlightedColumn:e}=this;e&&(Hl(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+mi,n=e>i-mi):(n=e<o+mi,s=e>i-mi),this.needToMoveRight=s,this.needToMoveLeft=n,n||s?this.ensureIntervalStarted():this.ensureIntervalCleared()}ensureIntervalStarted(){var e;this.movingIntervalId||(this.intervalCount=0,this.failedMoveAttempts=0,this.movingIntervalId=window.setInterval(this.moveInterval.bind(this),wf),(e=this.beans.dragAndDrop.getDragAndDropImageComponent())==null||e.setIcon(this.needToMoveLeft?"left":"right",!0))}ensureIntervalCleared(){var e;this.movingIntervalId&&(window.clearInterval(this.movingIntervalId),this.movingIntervalId=null,this.failedMoveAttempts=0,(e=this.beans.dragAndDrop.getDragAndDropImageComponent())==null||e.setIcon(this.getIconName(),!1))}moveInterval(){var i,s;let e;this.intervalCount++,e=10+this.intervalCount*mf,e>Ks&&(e=Ks);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:n,dragAndDrop:r,gos:l}=this.beans;if(this.failedMoveAttempts<=Gl+1||!n)return;if((i=r.getDragAndDropImageComponent())==null||i.setIcon("pinned",!1),!l.get("suppressMoveWhenColumnDragging")){const a=(s=this.lastDraggingEvent)==null?void 0:s.dragItem.columns;this.attemptToPinColumns(a,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==null||s.setColsPinned(i,t,"uiColumnDragged"),o&&n.nudge(),i.length}destroy(){super.destroy(),this.lastDraggingEvent=null,this.clearHighlighted(),this.lastMovedInfo=null}};function Hl(e,t){e.highlighted!==t&&(e.highlighted=t,e.dispatchColEvent("headerHighlightChanged","uiColumnMoved"))}function bf(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 Sf=class extends x{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 vf(o)),this.bodyDropPivotTarget=this.createManagedBean(new df(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()}},yf=class extends x{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:l}=this.beans,a=s.getCols();if(!a)return;if(t>a.length-e.length){k(30,{toIndex:t});return}n==null||n.start();const d=s.getColsForKeys(e);this.doesMovePassRules(d,t)&&(gr(s.getCols(),d,t),r.refresh(o),l.dispatchEvent({type:"columnMoved",columns:d,column:d.length===1?d[0]:null,toIndex:t,finished:i,source:o})),n==null||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!(!yr(e,t.getColTree())||!(s=>{const n=d=>d?d==="left"||d===!0?-1:1:0,r=o.get("enableRtl");let l=r?1:-1,a=!0;return s.forEach(d=>{const c=n(d.getColDef().lockPosition);r?c>l&&(a=!1):c<l&&(a=!1),l=c}),a})(e))}getProposedColumnOrder(e,t){const i=this.beans.colModel.getCols().slice();return gr(i,e,t),i}createBodyDropTarget(e,t){return new Sf(e,t)}moveHeader(e,t,o,i,s){const{ctrlsSvc:n,gos:r,colModel:l,visibleCols:a,focusSvc:d}=this.beans,c=t.getBoundingClientRect(),u=c.left,h=Q(o),g=h?c.width:o.getActualWidth(),p=e==="left"!==r.get("enableRtl"),f=$s({x:p?u-20:u+g+20,pinned:i,fromKeyboard:!0,gos:r,ctrlsSvc:n}),C=d.focusedHeader;Ll({allMovingColumns:h?o.getLeafColumns():[o],isFromHeader:!0,fromLeft:e==="right",xPosition:f,pinned:i,fromEnter:!1,fakeEvent:!1,gos:r,colModel:l,colMoves:this,visibleCols:a,finished:!0});let m;if(h){const w=o.getDisplayedLeafColumns();m=p?w[0]:$(w)}else m=o;if(n.getScrollFeature().ensureColumnVisible(m,"auto"),(!s.isAlive()||r.get("ensureDomOrder"))&&C){let w;if(h){const b=o.getGroupId(),v=o.getLeafColumns();if(!v.length)return;const S=v[0].getParent();if(!S)return;w=Rf(S,b)}else w=o;w&&d.focusHeaderPosition({headerPosition:{...C,column:w}})}}setDragSourceForHeader(e,t,o){const{gos:i,colModel:s,dragAndDrop:n,visibleCols:r}=this.beans;let l=!i.get("suppressDragLeaveHidesColumns");const a=Q(t),d=a?t.getProvidedColumnGroup().getLeafColumns():[t],u={type:1,eElement:e,getDefaultIconName:()=>l?"hide":"notAllowed",getDragItem:a?()=>xf(t,r.allCols):()=>Ef(t),dragItemName:o,onDragStarted:()=>{l=!i.get("suppressDragLeaveHidesColumns"),Us(d,!0)},onDragStopped:()=>Us(d,!1),onDragCancelled:()=>Us(d,!1),onGridEnter:h=>{if(l){const{columns:g=[],visibleState:p}=h??{},f=a?m=>!p||p[m.getColId()]:()=>!0,C=g.filter(m=>!m.getColDef().lockVisible&&f(m));s.setColsVisible(C,!0,"uiColumnMoved")}},onGridExit:h=>{var g;if(l){const p=((g=h==null?void 0:h.columns)==null?void 0:g.filter(f=>!f.getColDef().lockVisible))||[];s.setColsVisible(p,!1,"uiColumnMoved")}}};return n.addDragSource(u,!0),u}};function Rf(e,t){for(;e;){if(e.getGroupId()===t)return e;e=e.getParent()}}function Ef(e){const t={};return t[e.getId()]=e.isVisible(),{columns:[e],visibleState:t,containerType:e.pinned}}function xf(e,t){var l;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),we(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,containerType:(l=n[0])==null?void 0:l.pinned}}var Df={moduleName:"ColumnMove",version:G,beans:[yf,rf],apiFunctions:{moveColumnByIndex:lf,moveColumns:af},dependsOn:[of],css:[nf]},Ff=class extends x{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(l=>o.classList.contains(l))?(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(a=>r.classList.contains(a))){for(let a=0;a<r.classList.length;a++){const d=r.classList[a];d!="ag-row-position-absolute"&&s.add(d)}break}r=r.parentElement}i.appendChild(o),t.appendChild(i)}},Ol={moduleName:"AutoWidth",version:G,beans:[Ff]};function Pf(e,t,o=!0,i="api"){var s;(s=e.colResize)==null||s.setColumnWidths(t,!1,o,i)}var Tf=class extends x{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){var a;const t=d=>d.reduce((c,u)=>c+u.getActualWidth(),0),o=(d,c)=>d.map(u=>u.getActualWidth()/c),i=this.getColumnsToResize(),s=t(i),n=o(i,s),r={columnsToResize:i,resizeStartWidth:s,resizeRatios:n};let l=null;if(e&&(l=((a=this.beans.colGroupSvc)==null?void 0:a.getGroupAtDirection(this.columnGroup,"After"))??null),l){const d=l.getDisplayedLeafColumns(),c=r.groupAfterColumns=d.filter(h=>h.isResizable()),u=r.groupAfterStartWidth=t(c);r.groupAfterRatios=o(c,u)}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){var u;const{columnsToResize:s,resizeStartWidth:n,resizeRatios:r,groupAfterColumns:l,groupAfterStartWidth:a,groupAfterRatios:d}=e,c=[];if(c.push({columns:s,ratios:r,width:t}),l){const h=t-n;c.push({columns:l,ratios:d,width:a-h})}(u=this.beans.colResize)==null||u.resizeColumnSets({resizeSets:c,finished:i,source:o}),i&&this.toggleColumnResizing(!1)}toggleColumnResizing(e){this.comp.toggleCss("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}},If=class extends x{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(Z(this.eResize,t),!t)return;const{horizontalResizeSvc:r,colAutosize:l}=this.beans,a=r.addResizeBar({eResizeBar:this.eResize,onResizeStart:this.onResizeStart.bind(this),onResizing:this.onResizing.bind(this,!1),onResizeEnd:this.onResizing.bind(this,!0)});e.push(a),o&&l&&e.push(l.addColumnAutosize(this.eResize,this.column))},s=()=>{e.forEach(r=>r()),e.length=0},n=()=>{const r=this.column.isResizable(),l=!this.gos.get("suppressAutoSize")&&!this.column.getColDef().suppressAutoSize;(r!==t||l!==o)&&(t=r,o=l,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),l=s+r,a=[{key:o,newWidth:l}],{pinnedCols:d,ctrlsSvc:c,colResize:u}=n;if(this.column.getPinned()){const h=(d==null?void 0:d.leftWidth)??0,g=(d==null?void 0:d.rightWidth)??0,p=Ut(c.getGridBodyCtrl().eBodyViewport)-50;if(h+g+(r-i)>p)return}this.lastResizeAmount=r,u==null||u.setColumnWidths(a,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.column.resizing=e,this.comp.toggleCss("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}},Af=class extends x{constructor(){super(...arguments),this.beanName="colResize"}setColumnWidths(e,t,o,i){const s=[],{colModel:n,gos:r,visibleCols:l}=this.beans;e.forEach(a=>{const d=n.getColDefCol(a.key)||n.getCol(a.key);if(!d)return;if(s.push({width:a.newWidth,ratios:[1],columns:[d]}),r.get("colResizeDefault")==="shift"&&(t=!t),t){const u=l.getColAfter(d);if(!u)return;const h=d.getActualWidth()-a.newWidth,g=u.getActualWidth()+h;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=>Mf(c)))){if(o){const c=t&&t.length>0?t[0].columns:null;yt(this.eventSvc,c,o,i)}return}const n=[],r=[];t.forEach(c=>{const{width:u,columns:h,ratios:g}=c,p={},f={};h.forEach(w=>r.push(w));let C=!0,m=0;for(;C;){if(m++,m>1e3){U(31);break}C=!1;const w=[];let b=0,v=u;h.forEach((D,I)=>{if(f[D.getId()])v-=p[D.getId()];else{w.push(D);const F=g[I];b+=F}});const S=1/b;w.forEach((D,I)=>{const O=I===w.length-1;let F;O?F=v:(F=Math.round(g[I]*u*S),v-=F);const P=D.getMinWidth(),T=D.getMaxWidth();F<P?(F=P,f[D.getId()]=!0,C=!0):T>0&&F>T&&(F=T,f[D.getId()]=!0,C=!0),p[D.getId()]=F})}h.forEach(w=>{const b=p[w.getId()];w.getActualWidth()!==b&&(w.setActualWidth(b,i),n.push(w))})});const l=n.length>0;let a=[];if(l){const{colFlex:c,visibleCols:u,colViewport:h}=this.beans;a=(c==null?void 0:c.refreshFlexedColumns({resizingCols:r,skipSetLeft:!0}))??[],u.setLeftValues(i),u.updateBodyWidths(),h.checkViewportColumns()}const d=r.concat(a);(l||o)&&yt(this.eventSvc,d,o,i,a)}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 If(e,t,o,i,s)}createGroupResizeFeature(e,t,o,i){return new Tf(e,t,o,i)}};function Mf(e){const{columns:t,width:o}=e;let i=0,s=0,n=!0;t.forEach(a=>{const d=a.getMinWidth();i+=d||0;const c=a.getMaxWidth();c>0?s+=c:n=!1});const r=o>=i,l=!n||o<=s;return r&&l}var kf={moduleName:"ColumnResize",version:G,beans:[Af],apiFunctions:{setColumnWidths:Pf},dependsOn:[sf,Ol]},Lf=class extends x{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.toggleCss("ag-hidden",e===0)}},Gf=class extends pl{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:l,colNames:a,colHover:d,rangeSvc:c,colResize:u}=r;this.comp=e,s=Ko(this,l,s),this.setGui(t,s),this.displayName=a.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 h=this.rowCtrl.pinned,g=n.getProvidedColumnGroup().getLeafColumns();d==null||d.createHoverFeature(s,g,t),c==null||c.createRangeHighlightFeature(s,n,e),s.createManagedBean(new hl(n,t,r)),s.createManagedBean(new Lf(e,n)),u?this.resizeFeature=s.createManagedBean(u.createGroupResizeFeature(e,o,h,n)):e.setResizableDisplayed(!1),s.createManagedBean(new ri(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 _(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=$(t)===e;if(!o&&!i)return;const s=e.getHighlighted(),n=!!this.rowCtrl.getHeaderCellCtrls().find(a=>a.column.isMoving());let r=!1,l=!1;if(n){const a=this.beans.gos.get("enableRtl"),d=s===1,c=s===0;o&&(a?l=d:r=c),i&&(a?r=c:l=d)}this.comp.toggleCss("ag-header-highlight-before",r),this.comp.toggleCss("ag-header-highlight-after",l)}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){var t;(t=this.resizeFeature)==null||t.resizeLeafColumnsToFit(e)}setupUserComp(){const{colGroupSvc:e,userCompFactory:t,gos:o,enterpriseMenuFactory:i}=this.beans,s=this.column,n=s.getProvidedColumnGroup(),r=_(o,{displayName:this.displayName,columnGroup:s,setExpanded:a=>{e.setColumnGroupOpened(n,a,"gridInitializing")},setTooltip:(a,d)=>{o.assertModuleRegistered("Tooltip",3),this.setupTooltip(a,d)},showColumnMenu:(a,d)=>i==null?void 0:i.showMenuAfterButtonClick(n,a,"columnMenu",d),showColumnMenuAfterMouseClick:(a,d)=>i==null?void 0:i.showMenuAfterMouseEvent(n,a,"columnMenu",d),eGridHeader:this.eGui}),l=Pu(t,r);l&&this.comp.setUserCompDetails(l)}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){var o;this.tooltipFeature=(o=this.beans.tooltipSvc)==null?void 0:o.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=$r(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!=null&&t.wrapHeaderText&&o.push("ag-header-cell-wrap-text")),o.forEach(i=>this.comp.toggleCss(i,!0))}setupMovingCss(e){const{column:t}=this,i=t.getProvidedColumnGroup().getLeafColumns(),s=()=>this.comp.toggleCss("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===y.ENTER){const o=this.column,i=!o.isExpanded();this.beans.colGroupSvc.setColumnGroupOpened(o.getProvidedColumnGroup(),i,"uiColumnExpanded")}}setDragSource(e){var t;!this.isAlive()||this.isSuppressMoving()||(this.removeDragSource(),e&&(this.dragSource=((t=this.beans.colMoves)==null?void 0:t.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 Hf(e,t,o){var i;(i=e.colGroupSvc)==null||i.setColumnGroupOpened(t,o,"api")}function Of(e,t,o){var i;return((i=e.colGroupSvc)==null?void 0:i.getColumnGroup(t,o))??null}function Bf(e,t){var o;return((o=e.colGroupSvc)==null?void 0:o.getProvidedColGroup(t))??null}function Vf(e,t,o){return e.colNames.getDisplayNameForColumnGroup(t,o)||""}function Nf(e){var t;return((t=e.colGroupSvc)==null?void 0:t.getColumnGroupState())??[]}function _f(e,t){var o;(o=e.colGroupSvc)==null||o.setColumnGroupState(t,"api")}function Wf(e){var t;(t=e.colGroupSvc)==null||t.resetColumnGroupState("api")}function zf(e){return e.visibleCols.treeLeft}function $f(e){return e.visibleCols.treeCenter}function Uf(e){return e.visibleCols.treeRight}function Kf(e){return e.visibleCols.getAllTrees()}function jf(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 qf=class extends x{constructor(){super(...arguments),this.beanName="visibleCols",this.colsAndGroupsMap={},this.leftCols=[],this.rightCols=[],this.centerCols=[],this.allCols=[],this.headerGroupRowCount=0,this.bodyWidth=0,this.leftWidth=0,this.rightWidth=0,this.isBodyWidthDirty=!0}refresh(e,t=!1){const{colFlex:o,colModel:i,colGroupSvc:s,colViewport:n,selectionColSvc:r}=this.beans;t||this.buildTrees(i,s),s==null||s.updateOpenClosedVisibility(),this.leftCols=js(this.treeLeft),this.centerCols=js(this.treeCenter),this.rightCols=js(this.treeRight),r==null||r.refreshVisibility(this.leftCols,this.centerCols,this.rightCols),this.joinColsAriaOrder(i),this.joinCols(),this.headerGroupRowCount=this.getHeaderRowCount(),this.setLeftValues(e),this.autoHeightCols=this.allCols.filter(l=>l.isAutoHeight()),o==null||o.refreshFlexedColumns(),this.updateBodyWidths(),this.setFirstRightAndLastLeftPinned(i,this.leftCols,this.rightCols,e),n.checkViewportColumns(!1),this.eventSvc.dispatchEvent({type:"displayedColumnsChanged",source:e})}getHeaderRowCount(){if(!this.gos.get("hidePaddedHeaderRows"))return this.beans.colModel.cols.treeDepth;let e=0;for(const t of this.allCols){let o=t.getParent();for(;o;){if(!o.isPadding()){const i=o.getProvidedColumnGroup().getLevel()+1;i>e&&(e=i);break}o=o.getParent()}}return e}updateBodyWidths(){const e=Le(this.centerCols),t=Le(this.leftCols),o=Le(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?$(o):null):(s=t?$(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(a=>a.getPinned()=="left"),s=o.filter(a=>a.getPinned()=="right"),n=o.filter(a=>a.getPinned()!="left"&&a.getPinned()!="right"),r=new nu,l=a=>t?t.createColumnGroups(a):a.columns;this.treeLeft=l({columns:i,idCreator:r,pinned:"left",oldDisplayedGroups:this.treeLeft}),this.treeRight=l({columns:s,idCreator:r,pinned:"right",oldDisplayedGroups:this.treeRight}),this.treeCenter=l({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 Q(e)?t=e.getLeafColumns()[0]:t=e,this.ariaOrderColumns.indexOf(t)+1}setLeftValuesOfGroups(){[this.treeLeft,this.treeRight,this.treeCenter].forEach(e=>{e.forEach(t=>{Q(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=Le(n);n.forEach(l=>{r-=l.getActualWidth(),l.setLeft(r,e)})}else{let r=0;n.forEach(l=>{l.setLeft(r,e),r+=l.getActualWidth()})}jf(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 l=t[r],a=t.length-r,d=Math.min(l.getColSpan(e),a),c=[l];if(d>1){const h=d-1;for(let g=1;g<=h;g++)c.push(t[r+g]);r+=h}let u;o?(u=!1,c.forEach(h=>{o(h)&&(u=!0)})):u=!0,u&&(s.length===0&&n&&(i&&i(l))&&s.push(n),s.push(l)),n=l}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};at(this.treeCenter,!1,e),at(this.treeLeft,!1,e),at(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?$(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 Le(this.leftCols)}getDisplayedColumnsRightWidth(){return Le(this.rightCols)}isColAtEdge(e,t){const o=this.allCols;if(!o.length)return!1;const i=t==="first";let s;if(Q(e)){const n=e.getDisplayedLeafColumns();if(!n.length)return!1;s=i?n[0]:$(n)}else s=e;return(i?o[0]:$(o))===s}};function at(e,t,o){if(e)for(let i=0;i<e.length;i++){const s=e[i];if(Q(s)){const n=t?s.getDisplayedChildren():s.getChildren();at(n,t,o)}o(s)}}function js(e){const t=[];return at(e,!0,o=>{et(o)&&t.push(o)}),t}var Yf=class extends x{constructor(){super(...arguments),this.beanName="colGroupSvc"}getColumnGroupState(){const e=[],t=this.beans.colModel.getColTree();return Ge(null,t,o=>{te(o)&&e.push({groupId:o.getGroupId(),open:o.isExpanded()})}),e}resetColumnGroupState(e){const t=this.beans.colModel.getColDefColTree();if(!t)return;const o=[];Ge(null,t,i=>{if(te(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==null||i.start();const l=[];e.forEach(a=>{const d=a.groupId,c=a.open,u=this.getProvidedColGroup(d);u&&u.isExpanded()!==c&&(u.setExpanded(c),l.push(u))}),s.refresh(t,!0),l.length&&n.dispatchEvent({type:"columnGroupOpened",columnGroup:l.length===1?l[0]:void 0,columnGroups:l}),i==null||i.finish()}setColumnGroupOpened(e,t,o){let i;te(e)?i=e.getId():i=e||"",this.setColumnGroupState([{groupId:i,open:t}],o)}getProvidedColGroup(e){let t=null;return Ge(null,this.beans.colModel.getColTree(),o=>{te(o)&&o.getId()===e&&(t=o)}),t}getGroupAtDirection(e,t){const o=e.getProvidedColumnGroup().getLevel()+e.getPaddingLevel(),i=e.getDisplayedLeafColumns(),s=t==="After"?$(i):i[0],n=`getCol${t}`;for(;;){const r=this.beans.visibleCols[n](s);if(!r)return null;const l=this.getColGroupAtLevel(r,o);if(l!==e)return l}}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();at(e,!1,t=>{Q(t)&&t.calculateDisplayedColumns()})}getColumnGroup(e,t){if(!e)return null;if(Q(e))return e;const o=this.beans.visibleCols.getAllTrees(),i=typeof t=="number";let s=null;return at(o,!1,n=>{if(Q(n)){const r=n;let l;i?l=e===r.getGroupId()&&t===r.getPartId():l=e===r.getGroupId(),l&&(s=r)}}),s}createColumnGroups(e){const{columns:t,idCreator:o,pinned:i,oldDisplayedGroups:s,isStandaloneStructure:n}=e,r=this.mapOldGroupsById(s),l=[];let a=t;for(;a.length;){const d=a;a=[];let c=0;const u=h=>{const g=c;c=h;const p=d[g],C=(Q(p)?p.getProvidedColumnGroup():p).getOriginalParent();if(C==null){for(let w=g;w<h;w++)l.push(d[w]);return}const m=this.createColumnGroup(C,o,r,i,n);for(let w=g;w<h;w++)m.addChild(d[w]);a.push(m)};for(let h=1;h<d.length;h++){const g=d[h],f=(Q(g)?g.getProvidedColumnGroup():g).getOriginalParent(),C=d[c],w=(Q(C)?C.getProvidedColumnGroup():C).getOriginalParent();f!==w&&u(h)}c<d.length&&u(d.length)}return n||this.setupParentsIntoCols(l,null),l}createProvidedColumnGroup(e,t,o,i,s,n,r){const l=s.getUniqueKey(t.groupId||null,null),a=ur(this.beans,t,l),d=new No(a,l,!1,o);this.createBean(d);const c=this.findExistingGroup(t,n);c&&n.splice(c.idx,1);const u=c==null?void 0:c.group;u&&d.setExpanded(u.isExpanded());const h=vr(this.beans,a.children,o+1,e,i,s,n,r);return d.setChildren(h),d}balanceColumnTree(e,t,o,i){const s=[];for(let n=0;n<e.length;n++){const r=e[n];if(te(r)){const l=r,a=this.balanceColumnTree(l.getChildren(),t+1,o,i);l.setChildren(a),s.push(l)}else{let l,a;for(let d=t;d<o;d++){const c=i.getUniqueKey(null,null),u=ur(this.beans,null,c),h=new No(u,c,!0,d);this.createBean(h),a&&a.setChildren([h]),a=h,l||(l=a)}if(l&&a)if(s.push(l),e.some(c=>te(c))){a.setChildren([r]);continue}else{a.setChildren(e);break}s.push(r)}}return s}findDepth(e){let t=0,o=e;for(;o&&o[0]&&te(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(te(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 No(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}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),l=Xr(n,r);let a=o[l];return a&&a.getProvidedColumnGroup()!==e&&(a=null),M(a)?a.reset():(a=new io(e,n,r,i),s||this.createBean(a)),a}mapOldGroupsById(e){const t={},o=i=>{i.forEach(s=>{if(Q(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&&(this.beans.colViewport.colsWithinViewportHash=""),o.parent=t,Q(o)){const i=o;this.setupParentsIntoCols(i.getChildren(),i)}})}},Zf={moduleName:"ColumnGroup",version:G,dynamicBeans:{headerGroupCellCtrl:Gf},beans:[Yf],apiFunctions:{getAllDisplayedColumnGroups:Kf,getCenterDisplayedColumnGroups:$f,getColumnGroup:Of,getColumnGroupState:Nf,getDisplayNameForColumnGroup:Vf,getLeftDisplayedColumnGroups:zf,getProvidedColumnGroup:Bf,getRightDisplayedColumnGroups:Uf,resetColumnGroupState:Wf,setColumnGroupOpened:Hf,setColumnGroupState:_f}},Qf={tag:"div",cls:"ag-skeleton-container"},Xf=class extends j{constructor(){super(Qf)}init(e){const t=`ag-cell-skeleton-renderer-${this.getCompId()}`;this.getGui().setAttribute("id",t),this.addDestroyFunc(()=>$t(e.eParentOfValue)),$t(e.eParentOfValue,t),e.deferRender?this.setupLoading(e):e.node.failedLoad?this.setupFailed():this.setupLoading(e)}setupFailed(){const e=this.getLocaleTextFunc();this.getGui().textContent=e("loadingError","ERR");const t=e("ariaSkeletonCellLoadingFailed","Row failed to load");zt(this.getGui(),t)}setupLoading(e){const t=X({tag:"div",cls:"ag-skeleton-effect"}),o=e.node.rowIndex;if(o!=null){const n=75+25*(o%2===0?Math.sin(o):Math.cos(o));t.style.width=`${n}%`}this.getGui().appendChild(t);const i=this.getLocaleTextFunc(),s=e.deferRender?i("ariaDeferSkeletonCellLoading","Cell is loading"):i("ariaSkeletonCellLoading","Row data is loading");zt(this.getGui(),s)}refresh(e){return!1}},Jf={moduleName:"CheckboxCellRenderer",version:G,userComponents:{agCheckboxCellRenderer:Jg}},eC={moduleName:"SkeletonCellRenderer",version:G,userComponents:{agSkeletonCellRenderer:Xf}};function tC(e,t){const o=e.colModel.getColDefCol(t);return o?o.getColDef():null}function oC(e){return e.colModel.getColumnDefs()}function iC(e,t,o){return e.colNames.getDisplayNameForColumn(t,o)||""}function sC(e,t){return e.colModel.getColDefCol(t)}function nC(e){return e.colModel.getColDefCols()}function rC(e,t){return ve(e,t,"api")}function lC(e){return Uo(e)}function aC(e){eu(e,"api")}function dC(e){return e.visibleCols.isPinningLeft()||e.visibleCols.isPinningRight()}function cC(e){return e.visibleCols.isPinningLeft()}function uC(e){return e.visibleCols.isPinningRight()}function hC(e,t){return e.visibleCols.getColAfter(t)}function gC(e,t){return e.visibleCols.getColBefore(t)}function pC(e,t,o){e.colModel.setColsVisible(t,o,"api")}function fC(e,t,o){var i;(i=e.pinnedCols)==null||i.setColsPinned(t,o,"api")}function CC(e){return e.colModel.getCols()}function mC(e){return e.visibleCols.leftCols}function wC(e){return e.visibleCols.centerCols}function vC(e){return e.visibleCols.rightCols}function bC(e){return e.visibleCols.allCols}function SC(e){return e.colViewport.getViewportColumns()}function qs(e,t){if(!e)return;const o=e,i={};return Object.keys(o).forEach(s=>{if(t&&t.indexOf(s)>=0||Sn.has(s))return;const n=o[s];typeof n=="object"&&n!==null&&n.constructor===Object?i[s]=qs(n):i[s]=n}),i}var yC=class extends x{constructor(){super(...arguments),this.beanName="colDefFactory"}wireBeans(e){this.rowGroupColsSvc=e.rowGroupColsSvc,this.pivotColsSvc=e.pivotColsSvc}getColumnDefs(e,t,o,i){var l,a;const s=e.slice();t?s.sort((d,c)=>o.indexOf(d)-o.indexOf(c)):o&&s.sort((d,c)=>i.indexOf(d)-i.indexOf(c));const n=(l=this.rowGroupColsSvc)==null?void 0:l.columns,r=(a=this.pivotColsSvc)==null?void 0:a.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 l=!0,a=r,d=n.getOriginalParent(),c=null;for(;d;){let u=null;if(d.isPadding()){d=d.getOriginalParent();continue}const h=s[d.getGroupId()];if(h){h.children.push(a),l=!1;break}if(u=this.createDefFromGroup(d),u&&(u.children=[a],s[u.groupId]=u,a=u,d=d.getOriginalParent()),d!=null&&c===d){l=!1;break}c=d}l&&i.push(a)}),i}createDefFromGroup(e){const t=qs(e.getColGroupDef(),["children"]);return t&&(t.groupId=e.getGroupId()),t}createDefFromColumn(e,t,o){const i=qs(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}},RC=class extends x{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 p=new Set(e.resizingCols);for(let f=s.length-1;f>=0;f--)if(p.has(s[f])){n=f;break}}let r=!1;const l=s.map((p,f)=>{const C=p.getFlex(),m=C!=null&&C>0&&f>n;return r||(r=m),{col:p,isFlex:m,flex:Math.max(0,C??0),initialSize:p.getActualWidth(),min:p.getMinWidth(),max:p.getMaxWidth(),targetSize:0}});if(!r)return[];let a=l.length,d=l.reduce((p,f)=>p+f.flex,0),c=o;const u=(p,f)=>{p.frozenSize=f,p.col.setActualWidth(f,t),c-=f,d-=p.flex,a-=1},h=p=>p.frozenSize!=null;for(const p of l)p.isFlex||u(p,p.initialSize);for(;a>0;){const p=Math.round(d<1?c*d:c);let f,C=0,m=0;for(const v of l){if(h(v))continue;f=v,m+=p*(v.flex/d);const S=m-C,D=Math.round(S);v.targetSize=D,C+=D}f&&(f.targetSize+=p-C);let w=0;for(const v of l){if(h(v))continue;const S=v.targetSize,D=Math.min(Math.max(S,v.min),v.max);w+=D-S,v.violationType=D===S?void 0:D<S?"max":"min",v.targetSize=D}const b=w===0?"all":w>0?"min":"max";for(const v of l)h(v)||(b==="all"||v.violationType===b)&&u(v,v.targetSize)}e.skipSetLeft||i.setLeftValues(t),e.updateBodyWidths&&i.updateBodyWidths();const g=l.filter(p=>p.isFlex&&!p.violationType).map(p=>p.col);if(e.fireResizedEvent){const p=l.filter(C=>C.initialSize!==C.frozenSize).map(C=>C.col),f=l.filter(C=>C.flex).map(C=>C.col);yt(this.eventSvc,p,!0,t,f)}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")}},EC=["dateTimeString","dateString","text","number","boolean","date"],xC=class extends x{constructor(){super(...arguments),this.beanName="dataTypeSvc",this.dataTypeDefinitions={},this.isPendingInference=!1,this.isColumnTypeOverrideInDataTypeDefinitions=!1,this.columnStateUpdatesPendingInference={},this.columnStateUpdateListenerDestroyFuncs=[],this.columnDefinitionPropsPerDataType={number(){return{cellEditor:"agNumberCellEditor"}},boolean(){return{cellEditor:"agCheckboxCellEditor",cellRenderer:"agCheckboxCellRenderer",getFindText:()=>null,suppressKeyboardEvent:e=>!!e.colDef.editable&&e.event.key===y.SPACE}},date({formatValue:e}){return{cellEditor:"agDateCellEditor",keyCreator:e}},dateString({formatValue:e}){return{cellEditor:"agDateStringCellEditor",keyCreator:e}},dateTime(e){return this.date(e)},dateTimeString(e){return this.dateString(e)},object({formatValue:e,colModel:t,colId:o}){return{cellEditorParams:{useFormatter:!0},comparator:(i,s)=>{const n=t.getColDefCol(o),r=n==null?void 0:n.getColDef();if(!n||!r)return 0;const l=i==null?"":e({column:n,node:null,value:i}),a=s==null?"":e({column:n,node:null,value:s});return l===a?0:l>a?1:-1},keyCreator:e}},text(){return{}}}}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={},o={},i=c=>u=>{const{column:h,node:g,value:p}=u;let f=h.getColDef().valueFormatter;return f===c.groupSafeValueFormatter&&(f=c.valueFormatter),this.beans.valueSvc.formatValue(h,g,p,f)};for(const c of Object.keys(e)){const u=e[c],h={...u,groupSafeValueFormatter:Nl(u,this.gos)};t[c]=h,o[c]=i(h)}const s=this.gos.get("dataTypeDefinitions")??{},n={};for(const c of Object.keys(s)){const u=s[c],h=this.processDataTypeDefinition(u,s,[c],e);h&&(t[c]=h,u.dataTypeMatcher&&(n[c]=u.dataTypeMatcher),o[c]=i(h))}const{valueParser:r,valueFormatter:l}=e.object,{valueParser:a,valueFormatter:d}=t.object;this.hasObjectValueParser=a!==r,this.hasObjectValueFormatter=d!==l,this.formatValueFuncs=o,this.dataTypeDefinitions=t,this.dataTypeMatchers=this.sortKeysInMatchers(n,e)}sortKeysInMatchers(e,t){const o={...e};for(const i of EC)delete o[i],o[i]=e[i]??t[i].dataTypeMatcher;return o}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 l=t[n];if(r&&l&&(r=l),!Vl(e,r,n))return;s=Bl(r,e)}else{if(o.includes(n)){k(44);return}const r=t[n];if(!Vl(e,r,n))return;const l=this.processDataTypeDefinition(r,t,[...o,n],i);if(!l)return;s=Bl(l,e)}return{...s,groupSafeValueFormatter:Nl(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){k(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(!oe(o))return!1;const i={cellRenderer:!0,valueGetter:!0,valueParser:!0,refData:!0};if(Ys(t,i))return!1;const s=t.type===null?e.type:t.type;if(s){const n=o.get("columnTypes")??{};if($o(s).some(l=>{const a=n[l.trim()];return a&&Ys(a,i)}))return!1}return!Ys(e,i)}inferCellDataType(e,t){if(!e)return;let o;const i=this.getInitialData();if(i){const n=e.indexOf(".")>=0&&!this.gos.get("suppressFieldDotNotation");o=Wt(i,e,n)}else this.initWaitForRowData(t);return o==null?void 0:Object.keys(this.dataTypeMatchers).find(n=>this.dataTypeMatchers[n](o))??"object"}getInitialData(){var t;const e=this.gos.get("rowData");if(e!=null&&e.length)return e[0];if(this.initialData)return this.initialData;{const o=(t=this.beans.rowModel.rootNode)==null?void 0:t.allLeafChildren;if(o!=null&&o.length)return o[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==null||s(),this.isPendingInference=!1,this.processColumnsPendingInference(r,t),this.columnStateUpdatesPendingInference={},t&&(o==null||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],l=this.colModel.getCol(n);if(!l)return;const a=l.getColDef();if(!this.resetColDefIntoCol(l,"cellDataTypeInferred"))return;const d=l.getColDef();if(t&&d.type&&d.type!==a.type){const c=FC(l,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&&ve(this.beans,{state:o},"cellDataTypeInferred"),this.initialData=null}generateColumnStateForRowGroupAndPivotIndexes(e,t){const o={},{rowGroupColsSvc:i,pivotColsSvc:s}=this.beans;return i==null||i.restoreColumnOrder(o,e),s==null||s.restoreColumnOrder(o,t),Object.values(o)}resetColDefIntoCol(e,t){const o=e.getUserProvidedColDef();if(!o)return!1;const i=as(this.beans,o,e.getColId());return e.setColDef(i,o,t),!0}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}getDateIncludesTimeFlag(e){return e==="dateTime"||e==="dateTimeString"}getDataTypeDefinition(e){const t=e.getColDef();if(t.cellDataType)return this.dataTypeDefinitions[t.cellDataType]}getBaseDataType(e){var t;return(t=this.getDataTypeDefinition(e))==null?void 0:t.baseDataType}checkType(e,t){var i;if(t==null)return!0;const o=(i=this.getDataTypeDefinition(e))==null?void 0:i.dataTypeMatcher;return o?o(t):!0}validateColDef(e){const t=o=>k(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")}}postProcess(e){var r;const t=e.cellDataType;if(!t||typeof t!="string")return;const{dataTypeDefinitions:o,beans:i,formatValueFuncs:s}=this,n=o[t];(r=i.colFilter)==null||r.setColDefPropsForDataType(e,n,s[t])}getFormatValue(e){return this.formatValueFuncs[e]}isColPendingInference(e){return this.isPendingInference&&!!this.columnStateUpdatesPendingInference[e]}setColDefPropertiesForBaseDataType(e,t,o,i){const s=this.formatValueFuncs[t],n=this.columnDefinitionPropsPerDataType[o.baseDataType]({colDef:e,cellDataType:t,colModel:this.colModel,dataTypeDefinition:o,colId:i,formatValue:s});Object.assign(e,n)}getDateObjectTypeDef(e){const t=this.getLocaleTextFunc(),o=this.getDateIncludesTimeFlag(e);return{baseDataType:e,valueParser:i=>no(i.newValue&&String(i.newValue)),valueFormatter:i=>i.value==null?"":!(i.value instanceof Date)||isNaN(i.value.getTime())?t("invalidDate","Invalid Date"):$e(i.value,o)??"",dataTypeMatcher:i=>i instanceof Date}}getDateStringTypeDef(e){const t=this.getDateIncludesTimeFlag(e);return{baseDataType:e,dateParser:o=>no(o)??void 0,dateFormatter:o=>$e(o??null,t)??void 0,valueParser:o=>ni(String(o.newValue))?o.newValue:null,valueFormatter:o=>ni(String(o.value))?String(o.value):"",dataTypeMatcher:o=>typeof o=="string"&&ni(o)}}getDefaultDataTypes(){const e=this.getLocaleTextFunc();return{number:{baseDataType:"number",valueParser:t=>{var o,i;return((i=(o=t.newValue)==null?void 0:o.trim)==null?void 0:i.call(o))===""?null:Number(t.newValue)},valueFormatter:t=>t.value==null?"":typeof t.value!="number"||isNaN(t.value)?e("invalidNumber","Invalid Number"):String(t.value),dataTypeMatcher:t=>typeof t=="number"},text:{baseDataType:"text",valueParser:t=>t.newValue===""?null:Mi(t.newValue),dataTypeMatcher:t=>typeof t=="string"},boolean:{baseDataType:"boolean",valueParser:t=>{var o,i;return t.newValue==null?t.newValue:((i=(o=t.newValue)==null?void 0:o.trim)==null?void 0:i.call(o))===""?null:String(t.newValue).toLowerCase()==="true"},valueFormatter:t=>t.value==null?"":String(t.value),dataTypeMatcher:t=>typeof t=="boolean"},date:this.getDateObjectTypeDef("date"),dateString:this.getDateStringTypeDef("dateString"),dateTime:this.getDateObjectTypeDef("dateTime"),dateTimeString:{...this.getDateStringTypeDef("dateTimeString"),dataTypeMatcher:t=>typeof t=="string"&&zh(t)},object:{baseDataType:"object",valueParser:()=>null,valueFormatter:t=>Mi(t.value)??""}}}destroyColumnStateUpdateListeners(){this.columnStateUpdateListenerDestroyFuncs.forEach(e=>e()),this.columnStateUpdateListenerDestroyFuncs=[]}destroy(){this.dataTypeDefinitions={},this.dataTypeMatchers={},this.formatValueFuncs={},this.columnStateUpdatesPendingInference={},this.destroyColumnStateUpdateListeners(),super.destroy()}};function Bl(e,t){const o={...e,...t};return e.columnTypes&&t.columnTypes&&t.appendColumnTypes&&(o.columnTypes=[...$o(e.columnTypes),...$o(t.columnTypes)]),o}function Vl(e,t,o){return t?t.baseDataType!==e.baseDataType?(k(46),!1):!0:(k(45,{parentCellDataType:o}),!1)}function Nl(e,t){if(e.valueFormatter)return o=>{var i,s;if((i=o.node)!=null&&i.group){const n=(o.colDef.pivotValueColumn??o.column).getAggFunc();if(n){if(n==="first"||n==="last")return e.valueFormatter(o);if(e.baseDataType==="number"&&n!=="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}}else if(t.get("groupHideOpenParents")&&o.column.isRowGroupActive()&&typeof o.value=="string"&&!((s=e.dataTypeMatcher)!=null&&s.call(e,o.value)))return;return e.valueFormatter(o)}}function DC(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 Ys(e,t){return[["cellRenderer","agSparklineCellRenderer"],["valueGetter",void 0],["valueParser",void 0],["refData",void 0]].some(([o,i])=>DC(e,t,o,i))}function FC(e,t){const o=Dr(e);return t.forEach(i=>{delete o[i],i==="rowGroup"?delete o.rowGroupIndex:i==="pivot"&&delete o.pivotIndex}),o}var PC={moduleName:"DataType",version:G,beans:[xC],dependsOn:[Jf]},TC={moduleName:"ColumnFlex",version:G,beans:[RC]},_l={moduleName:"ColumnApi",version:G,beans:[yC],apiFunctions:{getColumnDef:tC,getDisplayNameForColumn:iC,getColumn:sC,getColumns:nC,applyColumnState:rC,getColumnState:lC,resetColumnState:aC,isPinning:dC,isPinningLeft:cC,isPinningRight:uC,getDisplayedColAfter:hC,getDisplayedColBefore:gC,setColumnsVisible:pC,setColumnsPinned:fC,getAllGridColumns:CC,getDisplayedLeftColumns:mC,getDisplayedCenterColumns:wC,getDisplayedRightColumns:vC,getAllDisplayedColumns:bC,getAllDisplayedVirtualColumns:SC,getColumnDefs:oC}};function IC(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 AC=class extends x{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==null?void 0: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){var r;const n=e.headerValueGetter;if(n){const l=_(this.gos,{colDef:e,column:t,columnGroup:o,providedColumnGroup:i,location:s});return typeof n=="function"?n(l):typeof n=="string"?((r=this.beans.expressionSvc)==null?void 0:r.evaluate(n,l))??null:""}else{if(e.headerName!=null)return e.headerName;if(e.field)return IC(e.field)}return""}},MC=class extends x{constructor(){super(...arguments),this.beanName="colViewport",this.colsWithinViewport=[],this.headerColsWithinViewport=[],this.colsWithinViewportHash="",this.rowsOfHeadersToRenderLeft={},this.rowsOfHeadersToRenderRight={},this.rowsOfHeadersToRenderCenter={},this.columnsToRenderLeft=[],this.columnsToRenderRight=[],this.columnsToRenderCenter=[]}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)}}getColumnHeadersToRender(e){switch(e){case"left":return this.columnsToRenderLeft;case"right":return this.columnsToRenderRight;default:return this.columnsToRenderCenter}}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(){this.rowsOfHeadersToRenderLeft={},this.rowsOfHeadersToRenderRight={},this.rowsOfHeadersToRenderCenter={},this.colsWithinViewportHash=""}isColumnInHeaderViewport(e){return e.isAutoHeaderHeight()||kC(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 M(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(){const{leftCols:e,rightCols:t}=this.visibleCols;this.columnsToRenderLeft=e,this.columnsToRenderRight=t,this.columnsToRenderCenter=this.colsWithinViewport;const o=i=>{const s=new Set,n={};for(const r of i){let l=r.getParent();const a=r.isSpanHeaderHeight();for(;l&&!s.has(l);){if(a&&l.isPadding()){l=l.getParent();continue}const c=l.getProvidedColumnGroup().getLevel();n[c]??(n[c]=[]),n[c].push(l),s.add(l),l=l.getParent()}}return n};this.rowsOfHeadersToRenderLeft=o(e),this.rowsOfHeadersToRenderRight=o(t),this.rowsOfHeadersToRenderCenter=o(this.headerColsWithinViewport)}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 kC(e){for(;e;){if(e.isAutoHeaderHeight())return!0;e=e.getParent()}return!1}var LC=class extends x{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=qi("<span>"+n+"</span>");return}if(n==null){this.eGui=X({tag:"span"});return}this.eGui=n}}return o}},GC={moduleName:"CellRendererFunction",version:G,beans:[LC]},HC=class extends x{constructor(){super(...arguments),this.beanName="registry",this.agGridDefaults={},this.agGridDefaultOverrides={},this.jsComps={},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,l,a,d)=>{this.agGridDefaults[r]=l,(a||d)&&(this.agGridDefaultOverrides[r]={params:a,processParams:d})};for(const r of Object.keys(o)){let l=o[r];if(ju(l)&&(l=l.getComp(this.beans)),typeof l=="object"){const{classImp:a,params:d,processParams:c}=l;n(r,a,d,c)}else n(r,l)}}if(i){this.dynamicBeans??(this.dynamicBeans={});for(const n of Object.keys(i))this.dynamicBeans[n]=i[n]}if(s==null||s.forEach(n=>{this.selectors[n.selector]=n}),t)for(const n of Object.keys(t))this.icons[n]=t[n]}getUserComponent(e,t){var l;const o=(a,d,c,u)=>({componentFromFramework:d,component:a,params:c,processParams:u}),{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];if(r){const a=this.agGridDefaultOverrides[t];return o(r,!1,a==null?void 0:a.params,a==null?void 0:a.processParams)}return(l=this.beans.validation)==null||l.missingUserComponent(e,t,this.agGridDefaults,this.jsComps),null}createDynamicBean(e,t,...o){var s;if(!this.dynamicBeans)throw new Error(ye(279,{name:e}));const i=this.dynamicBeans[e];if(i==null){if(t)throw new Error(((s=this.beans.validation)==null?void 0:s.missingDynamicBean(e))??ye(256));return}return new i(...o)}getSelector(e){return this.selectors[e]}getIcon(e){return this.icons[e]}},OC=23,BC=class extends x{constructor(){super(...arguments),this.beanName="ctrlsSvc",this.params={},this.ready=!1,this.readyCallbacks=[]}postConstruct(){var e,t;this.addEventListener("ready",()=>{this.updateReady(),this.ready&&(this.readyCallbacks.forEach(o=>o(this.params)),this.readyCallbacks.length=0)},((t=(e=this.beans.frameworkOverrides).runWhenReadyAsync)==null?void 0:t.call(e))??!1)}updateReady(){const e=Object.values(this.params);this.ready=e.length===OC&&e.every(t=>(t==null?void 0: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}},VC=':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(.invalid){box-shadow:inset var(--ag-focus-error-shadow)}}&:where(button){color:inherit}}: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-animation.ag-prevent-animation) .ag-row{transition:none!important;&:where(.ag-row.ag-after-created){transition:none!important}}: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{display:flex;overflow:hidden;position:relative;white-space:nowrap;width:100%}:where(.ag-floating-top:not(.ag-invisible)){border-bottom:var(--ag-pinned-row-border)}.ag-floating-bottom{display:flex;overflow:hidden;position:relative;white-space:nowrap;width:100%}:where(.ag-floating-bottom:not(.ag-invisible)){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%;&.ag-row-editing-invalid{background-color:var(--ag-full-row-edit-invalid-background-color)}}: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,.ag-row-highlight-inside:after{background-color:var(--ag-range-selection-border-color);content:"";height:1px;pointer-events:none;position:absolute;width:calc(100% - 1px)}:where(.ag-ltr) .ag-row-highlight-above:after,:where(.ag-ltr) .ag-row-highlight-below:after,:where(.ag-ltr) .ag-row-highlight-inside:after{left:1px}:where(.ag-rtl) .ag-row-highlight-above:after,:where(.ag-rtl) .ag-row-highlight-below:after,:where(.ag-rtl) .ag-row-highlight-inside:after{right:1px}.ag-row-highlight-above:after{top:0}.ag-row-highlight-below:after{bottom:0}.ag-row-highlight-indent:after{display:block;width:auto}:where(.ag-ltr) .ag-row-highlight-indent:after{left:calc((var(--ag-cell-widget-spacing) + var(--ag-icon-size))*2 + var(--ag-cell-horizontal-padding) + var(--ag-row-highlight-level)*var(--ag-row-group-indent-size));right:1px}:where(.ag-rtl) .ag-row-highlight-indent:after{left:1px;right:calc((var(--ag-cell-widget-spacing) + var(--ag-icon-size))*2 + var(--ag-cell-horizontal-padding) + var(--ag-row-highlight-level)*var(--ag-row-group-indent-size))}.ag-row-highlight-inside:after{background-color:var(--ag-selected-row-background-color);border:1px solid var(--ag-range-selection-border-color);display:block;height:auto;inset:0;width:auto}.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%{background-color:var(--ag-row-loading-skeleton-effect-color)}50%{background-color:color-mix(in srgb,transparent,var(--ag-row-loading-skeleton-effect-color) 40%)}to{background-color:var(--ag-row-loading-skeleton-effect-color)}}.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-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-drag-handle{color:var(--ag-drag-handle-color);cursor:grab;:where(.ag-icon){color:var(--ag-drag-handle-color)}}.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-icon-button-active-indicator-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}}',Zs=typeof window!="object"||!((Ed=(Rd=window==null?void 0:window.document)==null?void 0:Rd.fonts)!=null&&Ed.forEach),It=(e,t,o,i,s,n)=>{if(Zs)return;i&&(e=`@layer ${CSS.escape(i)} { ${e} }`);let r=At.map.get(t);if(r||(r=[],At.map.set(t,r)),r.find(c=>c.css===e))return;const l=document.createElement("style");n&&l.setAttribute("nonce",n),l.dataset.agGlobalCss=o,l.textContent=e;const a={css:e,el:l,priority:s};let d;for(const c of r){if(c.priority>s)break;d=c}if(d){d.el.insertAdjacentElement("afterend",l);const c=r.indexOf(d);r.splice(c+1,0,a)}else t.insertBefore(l,t.querySelector(":not(title, meta)")),r.push(a)},Wl=(e,t,o)=>{It(VC,e,"core",t,0,o),Array.from(Wu()).sort((i,s)=>i.moduleName.localeCompare(s.moduleName)).forEach(i=>{var s;return(s=i.css)==null?void 0:s.forEach(n=>It(n,e,`module-${i.moduleName}`,t,0,o))})},NC=e=>{At.grids.add(e)},_C=e=>{if(At.grids.delete(e),At.grids.size===0){At.map=new WeakMap;for(const t of document.head.querySelectorAll("style[data-ag-global-css]"))t.remove()}},zl,At=(zl=typeof window=="object"?window:{}).agStyleInjectionState??(zl.agStyleInjectionState={map:new WeakMap,grids:new Set}),xe=e=>new $l(e),Ke="$default",WC=0,$l=class{constructor({feature:e,params:t,modeParams:o={},css:i,cssImports:s}){this.feature=e,this.css=i,this.cssImports=s,this.modeParams={[Ke]:{...o[Ke]??{},...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"}-${++WC}`;typeof s=="function"&&(s=s()),s=`:where(.${n}) {
4
4
  ${s}
5
5
  }
6
6
  `;for(const r of this.cssImports??[])s=`@import url(${JSON.stringify(r)});
@@ -55,4 +55,4 @@ To overcome this, put the API call into a timeout, e.g. instead of api.redrawRow
55
55
  To see what part of your code that caused the refresh check this stacktrace.`,253:({version:e})=>["Illegal version string: ",e],254:()=>"Cannot create chart: no chart themes available.",255:({point:e})=>`Lone surrogate U+${e==null?void 0:e.toString(16).toUpperCase()} is not a scalar value`,256:()=>"Unable to initialise. See validation error, or load ValidationModule if missing.",257:()=>wa("IntegratedChartsModule"),258:()=>wa("SparklinesModule"),259:({part:e})=>`the argument to theme.withPart must be a Theming API part object, received: ${e}`,260:({propName:e,compName:t,gridScoped:o,gridId:i,rowModelType:s})=>ma({reasonOrId:`AG Grid '${e}' component: ${t}`,moduleName:Lt[t],gridId:i,gridScoped:o,rowModelType:s}),261:()=>"As of v33, `column.isHovered()` is deprecated. Use `api.isColumnHovered(column)` instead.",262:()=>'As of v33, icon key "smallDown" is deprecated. Use "advancedFilterBuilderSelect" for Advanced Filter Builder dropdown, "selectOpen" for Select cell editor and dropdowns (e.g. Integrated Charts menu), "richSelectOpen" for Rich Select cell editor.',263:()=>'As of v33, icon key "smallLeft" is deprecated. Use "panelDelimiterRtl" for Row Group Panel / Pivot Panel, "subMenuOpenRtl" for sub-menus.',264:()=>'As of v33, icon key "smallRight" is deprecated. Use "panelDelimiter" for Row Group Panel / Pivot Panel, "subMenuOpen" for sub-menus.',265:({colId:e})=>`Unable to infer chart data type for column '${e}' if first data entry is null. Please specify "chartDataType", or a "cellDataType" in the column definition. For more information, see ${Ct}/integrated-charts-range-chart#coldefchartdatatype .`,266:()=>'As of v33.1, using "keyCreator" with the Rich Select Editor has been deprecated. It now requires the "formatValue" callback to convert complex data to strings.',267:()=>"Detail grids can not use a different theme to the master grid, the `theme` detail grid option will be ignored.",268:()=>"Transactions aren't supported with tree data when using treeDataChildrenField",269:()=>"When `masterSelects: 'detail'`, detail grids must be configured with multi-row selection",270:({id:e,parentId:t})=>`Cycle detected for row with id='${e}' and parent id='${t}'. Resetting the parent for row with id='${e}' and showing it as a root-level node.`,271:({id:e,parentId:t})=>`Parent row not found for row with id='${e}' and parent id='${t}'. Showing row with id='${e}' as a root-level node.`,272:()=>fa(),273:({providedId:e,usedId:t})=>`Provided column id '${e}' was already in use, ensure all column and group ids are unique. Using '${t}' instead.`,274:({prop:e})=>{let t=`Since v33, ${e} has been deprecated.`;switch(e){case"maxComponentCreationTimeMs":t+=" This property is no longer required and so will be removed in a future version.";break;case"setGridApi":t+=" This method is not called by AG Grid. To access the GridApi see: https://ag-grid.com/react-data-grid/grid-interface/#grid-api ";break;case"children":t+=" For multiple versions AgGridReact does not support children.";break}return t},275:Ca,276:()=>"Row Numbers Row Resizer cannot be used when Grid Columns have `autoHeight` enabled.",277:({colId:e})=>`'enableFilterHandlers' is set to true, but column '${e}' does not have 'filter.doesFilterPass' or 'filter.handler' set.`,278:({colId:e})=>`Unable to create filter handler for column '${e}'`,279:e=>{},280:({colId:e})=>`'name' must be provided for custom filter components for column '${e}`,281:({colId:e})=>`Filter for column '${e}' does not have 'filterParams.buttons', but the new Filters Tool Panel has buttons configured. Either configure buttons for the filter, or disable buttons on the Filters Tool Panel.`,282:()=>"New filter tool panel requires `enableFilterHandlers: true`.",283:()=>"As of v34, use the same method on the filter handler (`api.getColumnFilterHandler(colKey)`) instead.",284:()=>"As of v34, filters are active when they have a model. Use `api.getColumnFilterModel()` instead.",285:()=>"As of v34, use (`api.getColumnFilterModel()`) instead.",286:()=>"As of v34, use (`api.setColumnFilterModel()`) instead.",287:()=>"`api.doFilterAction()` requires `enableFilterHandlers = true",288:()=>"`api.getColumnFilterModel(key, true)` requires `enableFilterHandlers = true",289:({rowModelType:e})=>`Row Model '${e}' is not supported with Batch Editing`,290:({rowIndex:e,rowPinned:t})=>`Row with index '${e}' and pinned state '${t}' not found`};function Av(e,t){const o=Iv[e];if(!o)return[`Missing error text for error id ${e}!`];const i=o(t),n=`
56
56
  See ${Qn(e,t)}`;return Array.isArray(i)?i.concat(n):[i,n]}var Mv={1:"Charting Aggregation",2:"pivotResultFields",3:"setTooltip"},va=new WeakMap,ba=new WeakMap;function kv(e,t,o){if(!t)return U(11),{};const i=o;let s;if(!(i!=null&&i.setThemeOnGridDiv)){const r=X({tag:"div"});r.style.height="100%",e.appendChild(r),e=r,s=()=>e.remove()}return new Gv().create(e,t,r=>{const l=new zp(e);r.createBean(l)},void 0,o,s)}var Lv=1,Gv=class{create(e,t,o,i,s,n){const r=Li.applyGlobalGridOptions(t),l=r.gridId??String(Lv++),a=this.getRegisteredModules(s,l,r.rowModelType),d=this.createBeansList(r.rowModelType,a,l),c=this.createProvidedBeans(e,r,s);if(!d)return;const h={providedBeanInstances:c,beanClasses:d,gridId:l,beanInitComparator:Dp,beanDestroyComparator:Fp,derivedBeans:[Ep],destroyCallback:()=>{ba.delete(p),va.delete(e),n==null||n()}},g=new qu(h);this.registerModuleFeatures(g,a),o(g),g.getBean("syncSvc").start(),i==null||i(g);const p=g.getBean("gridApi");return va.set(e,p),ba.set(p,e),p}getRegisteredModules(e,t,o){var i;return Et(yv,void 0,!0),(i=e==null?void 0:e.modules)==null||i.forEach(s=>Et(s,t)),_u(t,Sa(o))}registerModuleFeatures(e,t){const o=e.getBean("registry"),i=e.getBean("apiFunctionSvc");t.forEach(s=>{o.registerModule(s);const n=s.apiFunctions;n&&Object.keys(n).forEach(l=>{i==null||i.addFunction(l,n[l])})})}createProvidedBeans(e,t,o){let i=o?o.frameworkOverrides:null;K(i)&&(i=new Fl);const s={gridOptions:t,eGridDiv:e,globalListener:o?o.globalListener:null,globalSyncListener:o?o.globalSyncListener:null,frameworkOverrides:i};return o&&o.providedBeanInstances&&Object.assign(s,o.providedBeanInstances),s}createBeansList(e,t,o){const i={clientSide:"ClientSideRowModel",infinite:"InfiniteRowModel",serverSide:"ServerSideRowModel",viewport:"ViewportRowModel"},s=Sa(e),n=i[s];if(!n){Yt(201,{rowModelType:s},`Unknown rowModelType ${s}.`);return}if(!zu()){Yt(272,void 0,fa());return}if(!e){const l=Object.entries(i).filter(([a,d])=>cs(d,o,a));if(l.length==1){const[a,d]=l[0];if(a!==s){const c={moduleName:d,rowModelType:a};Yt(275,c,Ca(c));return}}}if(!cs(n,o,s)){Yt(200,{reasonOrId:`rowModelType = '${s}'`,moduleName:n,gridScoped:us(),gridId:o,rowModelType:s},`Missing module ${n}Module for rowModelType ${s}.`);return}const r=new Set;return t.forEach(l=>{var a;return(a=l.beans)==null?void 0:a.forEach(d=>r.add(d))}),Array.from(r)}};function Sa(e){return e??"clientSide"}function Te(e){const t=e.rowModel;return t.getType()==="clientSide"?t:void 0}function Hv(e){const t=e.rowModel;return t.getType()==="serverSide"?t:void 0}var Ov=class extends x{constructor(){super(...arguments),this.beanName="localeSvc"}getLocaleTextFunc(){const e=this.gos,t=e.getCallback("getLocaleText");if(t)return(i,s,n)=>t({key:i,defaultValue:s,variableValues:n});const o=e.get("localeText");return(i,s,n)=>{let r=o&&o[i];if(r&&n&&n.length){let l=0;for(;!(l>=n.length||r.indexOf("${variable}")===-1);)r=r.replace("${variable}",n[l++])}return r??s}}};function Bv(e,t=!1){const o=[],i=[],s=[],n=[],r=[],l=[],a=[],d=[],c=[];let u=0;for(let h=0;h<e.length;h++){const{colId:g,sort:p,sortIndex:f,rowGroup:C,rowGroupIndex:m,aggFunc:w,pivot:b,pivotIndex:v,pinned:S,hide:D,width:I,flex:O}=e[h];c.push(g),p&&(o[f??u++]={colId:g,sort:p}),C&&(i[m??0]=g),typeof w=="string"&&s.push({colId:g,aggFunc:w}),b&&(n[v??0]=g),S&&(S==="right"?l:r).push(g),D&&a.push(g),(O!=null||I)&&d.push({colId:g,flex:O??void 0,width:I})}return{sort:o.length?{sortModel:o}:void 0,rowGroup:i.length?{groupColIds:i}:void 0,aggregation:s.length?{aggregationModel:s}:void 0,pivot:n.length||t?{pivotMode:t,pivotColIds:n}:void 0,columnPinning:r.length||l.length?{leftColIds:r,rightColIds:l}:void 0,columnVisibility:a.length?{hiddenColIds:a}:void 0,columnSizing:d.length?{columnSizingModel:d}:void 0,columnOrder:c.length?{orderedColIds:c}:void 0}}function Vv(e){const t=[];return e.forEach(({groupId:o,open:i})=>{i&&t.push(o)}),t.length?{openColumnGroupIds:t}:void 0}var Nv=class{wrap(e,t,o,i){const s=this.createWrapper(e,i);return t==null||t.forEach(n=>{this.createMethod(s,n,!0)}),o==null||o.forEach(n=>{this.createMethod(s,n,!1)}),s}createMethod(e,t,o){e.addMethod(t,this.createMethodProxy(e,t,o))}createMethodProxy(e,t,o){return function(){return e.hasMethod(t)?e.callMethod(t,arguments):(o&&k(49,{methodName:t}),null)}}},_v={tag:"div",cls:"ag-tooltip"},Wv=class extends ks{constructor(){super(_v)}init(e){const{value:t}=e,o=this.getGui();o.textContent=bt(t);const i=e.location.replace(/([a-z])([A-Z0-9])/g,"$1-$2").toLowerCase();o.classList.add(`ag-${i}-tooltip`)}},zv=1e3,$v=1e3,ya=100,Ra,yi=!1,Uv=class extends x{constructor(e,t){super(),this.tooltipCtrl=e,this.getTooltipValue=t,this.interactionEnabled=!1,this.isInteractingWithTooltip=!1,this.state=0,this.tooltipInstanceCount=0,this.tooltipMouseTrack=!1}wireBeans(e){this.popupSvc=e.popupSvc,this.userCompFactory=e.userCompFactory}postConstruct(){this.gos.get("tooltipInteraction")&&(this.interactionEnabled=!0),this.tooltipTrigger=this.getTooltipTrigger(),this.tooltipMouseTrack=this.gos.get("tooltipMouseTrack");const e=this.tooltipCtrl.getGui();this.tooltipTrigger===0&&this.addManagedListeners(e,{mouseenter:this.onMouseEnter.bind(this),mouseleave:this.onMouseLeave.bind(this)}),this.tooltipTrigger===1&&this.addManagedListeners(e,{focusin:this.onFocusIn.bind(this),focusout:this.onFocusOut.bind(this)}),this.addManagedListeners(e,{mousemove:this.onMouseMove.bind(this)}),this.interactionEnabled||this.addManagedListeners(e,{mousedown:this.onMouseDown.bind(this),keydown:this.onKeyDown.bind(this)})}getGridOptionsTooltipDelay(e){const t=this.gos.get(e);return Math.max(200,t)}getTooltipDelay(e){var t,o,i,s;return e==="show"?((o=(t=this.tooltipCtrl).getTooltipShowDelayOverride)==null?void 0:o.call(t))??this.getGridOptionsTooltipDelay("tooltipShowDelay"):((s=(i=this.tooltipCtrl).getTooltipHideDelayOverride)==null?void 0:s.call(i))??this.getGridOptionsTooltipDelay("tooltipHideDelay")}destroy(){this.setToDoNothing(),super.destroy()}getTooltipTrigger(){const e=this.gos.get("tooltipTrigger");return!e||e==="hover"?0:1}onMouseEnter(e){this.interactionEnabled&&this.interactiveTooltipTimeoutId&&(this.unlockService(),this.startHideTimeout()),!gt()&&(yi?this.showTooltipTimeoutId=window.setTimeout(()=>{this.prepareToShowTooltip(e)},ya):this.prepareToShowTooltip(e))}onMouseMove(e){this.lastMouseEvent&&(this.lastMouseEvent=e),this.tooltipMouseTrack&&this.state===2&&this.tooltipComp&&this.positionTooltip()}onMouseDown(){this.setToDoNothing()}onMouseLeave(){this.interactionEnabled?this.lockService():this.setToDoNothing()}onFocusIn(){this.prepareToShowTooltip()}onFocusOut(e){var s;const t=e.relatedTarget,o=this.tooltipCtrl.getGui(),i=(s=this.tooltipComp)==null?void 0:s.getGui();this.isInteractingWithTooltip||o.contains(t)||this.interactionEnabled&&(i!=null&&i.contains(t))||this.setToDoNothing()}onKeyDown(){this.isInteractingWithTooltip&&(this.isInteractingWithTooltip=!1),this.setToDoNothing()}prepareToShowTooltip(e){if(this.state!=0||yi)return;let t=0;e&&(t=this.isLastTooltipHiddenRecently()?200:this.getTooltipDelay("show")),this.lastMouseEvent=e||null,this.showTooltipTimeoutId=window.setTimeout(this.showTooltip.bind(this),t),this.state=1}isLastTooltipHiddenRecently(){return Date.now()-Ra<zv}setToDoNothing(e){!e&&this.state===2&&this.hideTooltip(),this.onBodyScrollEventCallback&&(this.onBodyScrollEventCallback(),this.onBodyScrollEventCallback=void 0),this.onColumnMovedEventCallback&&(this.onColumnMovedEventCallback(),this.onColumnMovedEventCallback=void 0),this.onDocumentKeyDownCallback&&(this.onDocumentKeyDownCallback(),this.onDocumentKeyDownCallback=void 0),this.clearTimeouts(),this.state=0,this.lastMouseEvent=null}showTooltip(){var r,l,a,d,c,u,h;const e=this.getTooltipValue(),t=this.tooltipCtrl;if(!M(e)||t.shouldDisplayTooltip&&!t.shouldDisplayTooltip()){this.setToDoNothing();return}const o=(r=t.getRowNode)==null?void 0:r.call(t),i=_(this.gos,{location:((l=t.getLocation)==null?void 0:l.call(t))??"UNKNOWN",colDef:(a=t.getColDef)==null?void 0:a.call(t),column:(d=t.getColumn)==null?void 0:d.call(t),rowIndex:(c=t.getRowIndex)==null?void 0:c.call(t),node:o,data:o==null?void 0:o.data,value:e,valueFormatted:(u=t.getValueFormatted)==null?void 0:u.call(t),hideTooltipCallback:()=>this.hideTooltip(!0),...((h=t.getAdditionalParams)==null?void 0:h.call(t))??{}});this.state=2,this.tooltipInstanceCount++;const s=this.newTooltipComponentCallback.bind(this,this.tooltipInstanceCount),n=Hu(this.userCompFactory,i);n==null||n.newAgStackInstance().then(s)}hideTooltip(e){!e&&this.isInteractingWithTooltip||(this.tooltipComp&&(this.destroyTooltipComp(),Ra=Date.now()),this.eventSvc.dispatchEvent({type:"tooltipHide",parentGui:this.tooltipCtrl.getGui()}),e&&(this.isInteractingWithTooltip=!1),this.setToDoNothing(!0))}newTooltipComponentCallback(e,t){var r;if(this.state!==2||this.tooltipInstanceCount!==e){this.destroyBean(t);return}const i=t.getGui();this.tooltipComp=t,i.classList.contains("ag-tooltip")||i.classList.add("ag-tooltip-custom"),this.tooltipTrigger===0&&i.classList.add("ag-tooltip-animate"),this.interactionEnabled&&i.classList.add("ag-tooltip-interactive");const s=this.getLocaleTextFunc(),n=(r=this.popupSvc)==null?void 0:r.addPopup({eChild:i,ariaLabel:s("ariaLabelTooltip","Tooltip")});if(n&&(this.tooltipPopupDestroyFunc=n.hideFunc),this.positionTooltip(),this.tooltipTrigger===1){const l=()=>this.setToDoNothing();[this.onBodyScrollEventCallback,this.onColumnMovedEventCallback]=this.addManagedEventListeners({bodyScroll:l,columnMoved:l})}this.interactionEnabled&&([this.tooltipMouseEnterListener,this.tooltipMouseLeaveListener]=this.addManagedElementListeners(i,{mouseenter:this.onTooltipMouseEnter.bind(this),mouseleave:this.onTooltipMouseLeave.bind(this)}),[this.onDocumentKeyDownCallback]=this.addManagedElementListeners(J(this.beans),{keydown:l=>{i.contains(l==null?void 0:l.target)||this.onKeyDown()}}),this.tooltipTrigger===1&&([this.tooltipFocusInListener,this.tooltipFocusOutListener]=this.addManagedElementListeners(i,{focusin:this.onTooltipFocusIn.bind(this),focusout:this.onTooltipFocusOut.bind(this)}))),this.eventSvc.dispatchEvent({type:"tooltipShow",tooltipGui:i,parentGui:this.tooltipCtrl.getGui()}),this.startHideTimeout()}onTooltipMouseEnter(){this.isInteractingWithTooltip=!0,this.unlockService()}onTooltipMouseLeave(){this.isTooltipFocused()||(this.isInteractingWithTooltip=!1,this.lockService())}onTooltipFocusIn(){this.isInteractingWithTooltip=!0}isTooltipFocused(){var o;const e=(o=this.tooltipComp)==null?void 0:o.getGui(),t=Y(this.beans);return!!e&&e.contains(t)}onTooltipFocusOut(e){const t=this.tooltipCtrl.getGui();this.isTooltipFocused()||(this.isInteractingWithTooltip=!1,t.contains(e.relatedTarget)?this.startHideTimeout():this.hideTooltip())}positionTooltip(){var t,o;const e={type:"tooltip",ePopup:this.tooltipComp.getGui(),nudgeY:18,skipObserver:this.tooltipMouseTrack};this.lastMouseEvent?(t=this.popupSvc)==null||t.positionPopupUnderMouseEvent({...e,mouseEvent:this.lastMouseEvent}):(o=this.popupSvc)==null||o.positionPopupByComponent({...e,eventSource:this.tooltipCtrl.getGui(),position:"under",keepWithinBounds:!0,nudgeY:5})}destroyTooltipComp(){this.tooltipComp.getGui().classList.add("ag-tooltip-hiding");const e=this.tooltipPopupDestroyFunc,t=this.tooltipComp,o=this.tooltipTrigger===0?$v:0;window.setTimeout(()=>{e(),this.destroyBean(t)},o),this.clearTooltipListeners(),this.tooltipPopupDestroyFunc=void 0,this.tooltipComp=void 0}clearTooltipListeners(){[this.tooltipMouseEnterListener,this.tooltipMouseLeaveListener,this.tooltipFocusInListener,this.tooltipFocusOutListener].forEach(e=>{e&&e()}),this.tooltipMouseEnterListener=this.tooltipMouseLeaveListener=this.tooltipFocusInListener=this.tooltipFocusOutListener=null}lockService(){yi=!0,this.interactiveTooltipTimeoutId=window.setTimeout(()=>{this.unlockService(),this.setToDoNothing()},ya)}unlockService(){yi=!1,this.clearInteractiveTimeout()}startHideTimeout(){this.clearHideTimeout(),this.hideTooltipTimeoutId=window.setTimeout(this.hideTooltip.bind(this),this.getTooltipDelay("hide"))}clearShowTimeout(){this.showTooltipTimeoutId&&(window.clearTimeout(this.showTooltipTimeoutId),this.showTooltipTimeoutId=void 0)}clearHideTimeout(){this.hideTooltipTimeoutId&&(window.clearTimeout(this.hideTooltipTimeoutId),this.hideTooltipTimeoutId=void 0)}clearInteractiveTimeout(){this.interactiveTooltipTimeoutId&&(window.clearTimeout(this.interactiveTooltipTimeoutId),this.interactiveTooltipTimeoutId=void 0)}clearTimeouts(){this.clearShowTimeout(),this.clearHideTimeout(),this.clearInteractiveTimeout()}};function dn(e){return e.get("tooltipShowMode")==="whenTruncated"}var Kv=class extends x{constructor(e,t){super(),this.ctrl=e,t&&(this.beans=t)}postConstruct(){this.refreshTooltip()}setBrowserTooltip(e,t){const o="title",i=this.ctrl.getGui();i&&(e!=null&&(e!=""||t)?i.setAttribute(o,e):i.removeAttribute(o))}updateTooltipText(){const{getTooltipValue:e}=this.ctrl;e&&(this.tooltip=e())}createTooltipFeatureIfNeeded(){this.tooltipManager==null&&(this.tooltipManager=this.createBean(new Uv(this.ctrl,()=>this.tooltip),this.beans.context))}setTooltipAndRefresh(e){this.tooltip=e,this.refreshTooltip()}refreshTooltip(e){this.browserTooltips=this.beans.gos.get("enableBrowserTooltips"),this.updateTooltipText(),this.browserTooltips?(this.setBrowserTooltip(this.tooltip),this.tooltipManager=this.destroyBean(this.tooltipManager,this.beans.context)):(this.setBrowserTooltip(e?"":null,e),this.createTooltipFeatureIfNeeded())}destroy(){this.tooltipManager=this.destroyBean(this.tooltipManager,this.beans.context),super.destroy()}},jv={enableBrowserTooltips:!0,tooltipTrigger:!0,tooltipMouseTrack:!0,tooltipShowMode:!0,tooltipInteraction:!0,defaultColGroupDef:!0,suppressAutoSize:!0,skipHeaderOnAutoSize:!0,autoSizeStrategy:!0,components:!0,stopEditingWhenCellsLoseFocus:!0,undoRedoCellEditing:!0,undoRedoCellEditingLimit:!0,excelStyles:!0,cacheQuickFilter:!0,customChartThemes:!0,chartThemeOverrides:!0,chartToolPanelsDef:!0,loadingCellRendererSelector:!0,localeText:!0,keepDetailRows:!0,keepDetailRowsCount:!0,detailRowHeight:!0,detailRowAutoHeight:!0,tabIndex:!0,valueCache:!0,valueCacheNeverExpires:!0,enableCellExpressions:!0,suppressTouch:!0,suppressBrowserResizeObserver:!0,suppressPropertyNamesCheck:!0,debug:!0,dragAndDropImageComponent:!0,loadingOverlayComponent:!0,suppressLoadingOverlay:!0,noRowsOverlayComponent:!0,paginationPageSizeSelector:!0,paginateChildRows:!0,pivotPanelShow:!0,pivotSuppressAutoColumn:!0,suppressExpandablePivotGroups:!0,aggFuncs:!0,allowShowChangeAfterFilter:!0,ensureDomOrder:!0,enableRtl:!0,suppressColumnVirtualisation:!0,suppressMaxRenderedRowRestriction:!0,suppressRowVirtualisation:!0,rowDragText:!0,groupLockGroupColumns:!0,suppressGroupRowsSticky:!0,rowModelType:!0,cacheOverflowSize:!0,infiniteInitialRowCount:!0,serverSideInitialRowCount:!0,maxBlocksInCache:!0,maxConcurrentDatasourceRequests:!0,blockLoadDebounceMillis:!0,serverSideOnlyRefreshFilteredGroups:!0,serverSidePivotResultFieldSeparator:!0,viewportRowModelPageSize:!0,viewportRowModelBufferSize:!0,debounceVerticalScrollbar:!0,suppressAnimationFrame:!0,suppressPreventDefaultOnMouseWheel:!0,scrollbarWidth:!0,icons:!0,suppressRowTransform:!0,gridId:!0,enableGroupEdit:!0,initialState:!0,processUnpinnedColumns:!0,createChartContainer:!0,getLocaleText:!0,getRowId:!0,reactiveCustomComponents:!0,renderingMode:!0,columnMenu:!0,suppressSetFilterByDefault:!0,getDataPath:!0,enableCellSpan:!0,enableFilterHandlers:!0,filterHandlers:!0},ae="clientSide",ie="serverSide",Gt="infinite",qv={onGroupExpandedOrCollapsed:[ae],refreshClientSideRowModel:[ae],isRowDataEmpty:[ae],forEachLeafNode:[ae],forEachNodeAfterFilter:[ae],forEachNodeAfterFilterAndSort:[ae],resetRowHeights:[ae],applyTransaction:[ae],applyTransactionAsync:[ae],flushAsyncTransactions:[ae],getBestCostNodeSelection:[ae],getServerSideSelectionState:[ie],setServerSideSelectionState:[ie],applyServerSideTransaction:[ie],applyServerSideTransactionAsync:[ie],applyServerSideRowData:[ie],retryServerSideLoads:[ie],flushServerSideAsyncTransactions:[ie],refreshServerSide:[ie],getServerSideGroupLevelState:[ie],refreshInfiniteCache:[Gt],purgeInfiniteCache:[Gt],getInfiniteRowCount:[Gt],isLastRowIndexKnown:[Gt,ie],expandAll:[ae,ie],collapseAll:[ae,ie],onRowHeightChanged:[ae,ie],setRowCount:[Gt,ie],getCacheBlockState:[Gt,ie]},Yv={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 Zv(e,t,o){const i=Yv[e];if(i){const{version:n,new:r,old:l,message:a}=i,d=l??e;return(...c)=>{const u=r?`Please use ${r} instead. `:"";return qt(`Since ${n} api.${d} is deprecated. ${u}${a??""}`),t.apply(t,c)}}const s=qv[e];return s?(...n)=>{const r=o.rowModel.getType();if(!s.includes(r)){ft(`api.${e} can only be called when gridOptions.rowModelType is ${s.join(" or ")}`);return}return t.apply(t,n)}:t}var Qv={detailCellRendererCtrl:"SharedMasterDetail",dndSourceComp:"DragAndDrop",fillHandle:"CellSelection",groupCellRendererCtrl:"GroupCellRenderer",headerFilterCellCtrl:"ColumnFilter",headerGroupCellCtrl:"ColumnGroup",rangeHandle:"CellSelection",tooltipFeature:"Tooltip",groupStrategy:"RowGrouping",treeGroupStrategy:"TreeData",rowNumberRowResizer:"RowNumbers",singleCell:"EditCore",fullRow:"EditCore",agSetColumnFilterHandler:"SetFilter",agMultiColumnFilterHandler:"MultiFilter",agGroupColumnFilterHandler:"GroupFilter",agNumberColumnFilterHandler:"NumberFilter",agDateColumnFilterHandler:"DateFilter",agTextColumnFilterHandler:"TextFilter"},Xv={expanded:1,contracted:1,"tree-closed":1,"tree-open":1,"tree-indeterminate":1,pin:1,"eye-slash":1,arrows:1,left:1,right:1,group:1,aggregation:1,pivot:1,"not-allowed":1,chart:1,cross:1,cancel:1,tick:1,first:1,previous:1,next:1,last:1,linked:1,unlinked:1,"color-picker":1,loading:1,menu:1,"menu-alt":1,filter:1,"filter-add":1,columns:1,maximize:1,minimize:1,copy:1,cut:1,paste:1,grip:1,save:1,csv:1,excel:1,"small-down":1,"small-left":1,"small-right":1,"small-up":1,asc:1,desc:1,none:1,up:1,down:1,plus:1,minus:1,settings:1,"checkbox-checked":1,"checkbox-indeterminate":1,"checkbox-unchecked":1,"radio-button-on":1,"radio-button-off":1,eye:1,"column-arrow":1,"un-pin":1,"pinned-top":1,"pinned-bottom":1,"chevron-up":1,"chevron-down":1,"chevron-left":1,"chevron-right":1,edit:1},Jv={chart:"MenuCore",cancel:"EnterpriseCore",first:"Pagination",previous:"Pagination",next:"Pagination",last:"Pagination",linked:"IntegratedCharts",loadingMenuItems:"MenuCore",unlinked:"IntegratedCharts",menu:"ColumnHeaderComp",legacyMenu:"ColumnMenu",filter:"ColumnFilter",filterActive:"ColumnFilter",filterAdd:"NewFiltersToolPanel",filterCardCollapse:"NewFiltersToolPanel",filterCardExpand:"NewFiltersToolPanel",filterCardEditing:"NewFiltersToolPanel",filterTab:"ColumnMenu",filtersToolPanel:"FiltersToolPanel",columns:["MenuCore"],columnsToolPanel:["ColumnsToolPanel"],maximize:"EnterpriseCore",minimize:"EnterpriseCore",save:"MenuCore",columnGroupOpened:"ColumnGroupHeaderComp",columnGroupClosed:"ColumnGroupHeaderComp",accordionOpen:"EnterpriseCore",accordionClosed:"EnterpriseCore",accordionIndeterminate:"EnterpriseCore",columnSelectClosed:["ColumnsToolPanel","ColumnMenu"],columnSelectOpen:["ColumnsToolPanel","ColumnMenu"],columnSelectIndeterminate:["ColumnsToolPanel","ColumnMenu"],columnMovePin:"SharedDragAndDrop",columnMoveHide:"SharedDragAndDrop",columnMoveMove:"SharedDragAndDrop",columnMoveLeft:"SharedDragAndDrop",columnMoveRight:"SharedDragAndDrop",columnMoveGroup:"SharedDragAndDrop",columnMoveValue:"SharedDragAndDrop",columnMovePivot:"SharedDragAndDrop",dropNotAllowed:"SharedDragAndDrop",ensureColumnVisible:["ColumnsToolPanel","ColumnMenu"],groupContracted:"GroupCellRenderer",groupExpanded:"GroupCellRenderer",setFilterGroupClosed:"SetFilter",setFilterGroupOpen:"SetFilter",setFilterGroupIndeterminate:"SetFilter",setFilterLoading:"SetFilter",close:"EnterpriseCore",check:"MenuItem",colorPicker:"CommunityCore",groupLoading:"LoadingCellRenderer",menuAlt:"ColumnHeaderComp",menuPin:"MenuCore",menuValue:"MenuCore",menuAddRowGroup:["MenuCore","ColumnsToolPanel"],menuRemoveRowGroup:["MenuCore","ColumnsToolPanel"],clipboardCopy:"MenuCore",clipboardCut:"MenuCore",clipboardPaste:"MenuCore",pivotPanel:["ColumnsToolPanel","RowGroupingPanel"],rowGroupPanel:["ColumnsToolPanel","RowGroupingPanel"],valuePanel:"ColumnsToolPanel",columnDrag:"EnterpriseCore",rowDrag:["RowDrag","DragAndDrop"],csvExport:"MenuCore",excelExport:"MenuCore",smallDown:"CommunityCore",selectOpen:"CommunityCore",richSelectOpen:"RichSelect",richSelectRemove:"RichSelect",smallLeft:"CommunityCore",smallRight:"CommunityCore",subMenuOpen:"MenuItem",subMenuOpenRtl:"MenuItem",panelDelimiter:"RowGroupingPanel",panelDelimiterRtl:"RowGroupingPanel",smallUp:"CommunityCore",sortAscending:["MenuCore","Sort"],sortDescending:["MenuCore","Sort"],sortUnSort:["MenuCore","Sort"],advancedFilterBuilder:"AdvancedFilter",advancedFilterBuilderDrag:"AdvancedFilter",advancedFilterBuilderInvalid:"AdvancedFilter",advancedFilterBuilderMoveUp:"AdvancedFilter",advancedFilterBuilderMoveDown:"AdvancedFilter",advancedFilterBuilderAdd:"AdvancedFilter",advancedFilterBuilderRemove:"AdvancedFilter",advancedFilterBuilderSelectOpen:"AdvancedFilter",chartsMenu:"IntegratedCharts",chartsMenuEdit:"IntegratedCharts",chartsMenuAdvancedSettings:"IntegratedCharts",chartsMenuAdd:"IntegratedCharts",chartsColorPicker:"IntegratedCharts",chartsThemePrevious:"IntegratedCharts",chartsThemeNext:"IntegratedCharts",chartsDownload:"IntegratedCharts",checkboxChecked:"CommunityCore",checkboxIndeterminate:"CommunityCore",checkboxUnchecked:"CommunityCore",radioButtonOn:"CommunityCore",radioButtonOff:"CommunityCore",rowPin:"PinnedRow",rowUnpin:"PinnedRow",rowPinBottom:"PinnedRow",rowPinTop:"PinnedRow"},eb=new Set(["colorPicker","smallUp","checkboxChecked","checkboxIndeterminate","checkboxUnchecked","radioButtonOn","radioButtonOff","smallDown","smallLeft","smallRight"]),tb=class extends x{constructor(){super(...arguments),this.beanName="validation"}wireBeans(e){this.gridOptions=e.gridOptions,ac(this)}warnOnInitialPropertyUpdate(e,t){e==="api"&&jv[t]&&k(22,{key:t})}processGridOptions(e){this.processOptions(e,mw())}validateApiFunction(e,t){return Zv(e,t,this.beans)}missingUserComponent(e,t,o,i){const s=Lt[t];s?this.gos.assertModuleRegistered(s,`AG Grid '${e}' component: ${t}`):k(101,{propertyName:e,componentName:t,agGridDefaults:o,jsComps:i})}missingDynamicBean(e){const t=Qv[e];return t?ye(200,{...this.gos.getModuleErrorParams(),moduleName:t,reasonOrId:e}):void 0}checkRowEvents(e){ib.has(e)&&k(10,{eventType:e})}validateIcon(e){if(eb.has(e)&&k(43,{iconName:e}),Xv[e])return;const t=Jv[e];if(t){U(200,{reasonOrId:`icon '${e}'`,moduleName:t,gridScoped:us(),gridId:this.beans.context.getGridId(),rowModelType:this.gos.get("rowModelType"),additionalText:"Alternatively, use the CSS icon name directly."});return}k(134,{iconName:e})}isProvidedUserComp(e){return!!Lt[e]}validateColDef(e){this.processOptions(e,lw())}processOptions(e,t){const{validations:o,deprecations:i,allProperties:s,propertyExceptions:n,objectName:r,docsUrl:l}=t;s&&this.gridOptions.suppressPropertyNamesCheck!==!0&&this.checkProperties(e,[...n??[],...Object.keys(i)],s,r,l);const a=new Set;Object.keys(e).forEach(c=>{const u=i[c];if(u){const{message:w,version:b}=u;a.add(`As of v${b}, ${String(c)} is deprecated. ${w??""}`)}const h=e[c];if(h==null||h===!1)return;const g=o[c];if(!g)return;const{dependencies:p,validate:f,supportedRowModels:C,expectedType:m}=g;if(m){const w=typeof h;if(w!==m){a.add(`${String(c)} should be of type '${m}' but received '${w}' (${h}).`);return}}if(C){const w=this.gridOptions.rowModelType??"clientSide";if(!C.includes(w)){a.add(`${String(c)} is not supported with the '${w}' row model. It is only valid with: ${C.join(", ")}.`);return}}if(p){const w=this.checkForRequiredDependencies(c,p,e);if(w){a.add(w);return}}if(f){const w=f(e,this.gridOptions,this.beans);if(w){a.add(w);return}}}),a.size>0&&a.forEach(c=>{qt(c)})}checkForRequiredDependencies(e,t,o){const s=Object.entries(t).filter(([n,r])=>{const l=o[n];return!r.required.includes(l)});return s.length===0?null:s.map(([n,r])=>`'${String(e)}' requires '${n}' to be one of [${r.required.map(l=>l===null?"null":l===void 0?"undefined":l).join(", ")}]. ${r.reason??""}`).join(`
57
57
  `)}checkProperties(e,t,o,i,s){const n=["__ob__","__v_skip","__metadata__"],r=ob(Object.getOwnPropertyNames(e),[...n,...t,...o],o),l=Object.keys(r);for(const a of l){const d=r[a];let c=`invalid ${i} property '${a}' did you mean any of these: ${d.slice(0,8).join(", ")}.`;o.includes("context")&&(c+=`
58
- If you are trying to annotate ${i} with application data, use the '${i}.context' property instead.`),qt(c)}if(l.length>0&&s){const a=this.beans.frameworkOverrides.getDocLink(s);qt(`to see all the valid ${i} properties please check: ${a}`)}}getConsoleMessage(e,t){return Av(e,t)}};function ob(e,t,o){const i={},s=e.filter(n=>!t.some(r=>r===n));return s.length>0&&s.forEach(n=>i[n]=ln({inputValue:n,allSuggestions:o}).values),i}var ib=new Set(["firstChildChanged","lastChildChanged","childIndexChanged"]),sb={moduleName:"Validation",version:G,beans:[tb]},Ri=0,nb=200,rb=class extends x{constructor(){super(...arguments),this.beanName="popupSvc",this.popupList=[]}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.gridCtrl=e.gridCtrl}),this.addManagedEventListeners({gridStylesChanged:this.handleThemeChange.bind(this)})}getPopupParent(){const e=this.gos.get("popupParent");return e||this.gridCtrl.getGui()}positionPopupForMenu(e){const{eventSource:t,ePopup:o,column:i,node:s,event:n}=e,r=t.getBoundingClientRect(),l=this.getParentRect();this.setAlignedTo(t,o);let a=!1;const d=()=>{const c=this.keepXYWithinBounds(o,r.top-l.top,0),u=o.clientWidth>0?o.clientWidth:200;a||(o.style.minWidth=`${u}px`,a=!0);const g=l.right-l.left-u;let p;return this.gos.get("enableRtl")?(p=C(),p<0&&(p=f(),this.setAlignedStyles(o,"left")),p>g&&(p=0,this.setAlignedStyles(o,"right"))):(p=f(),p>g&&(p=C(),this.setAlignedStyles(o,"right")),p<0&&(p=0,this.setAlignedStyles(o,"left"))),{x:p,y:c};function f(){return r.right-l.left-2}function C(){return r.left-l.left-u}};this.positionPopup({ePopup:o,keepWithinBounds:!0,updatePosition:d,postProcessCallback:()=>this.callPostProcessPopup("subMenu",o,t,n instanceof MouseEvent?n:void 0,i,s)})}positionPopupUnderMouseEvent(e){const{ePopup:t,nudgeX:o,nudgeY:i,skipObserver:s}=e;this.positionPopup({ePopup:t,nudgeX:o,nudgeY:i,keepWithinBounds:!0,skipObserver:s,updatePosition:()=>this.calculatePointerAlign(e.mouseEvent),postProcessCallback:()=>this.callPostProcessPopup(e.type,e.ePopup,null,e.mouseEvent,e.column,e.rowNode)})}calculatePointerAlign(e){const t=this.getParentRect();return{x:e.clientX-t.left,y:e.clientY-t.top}}positionPopupByComponent(e){const{ePopup:t,nudgeX:o,nudgeY:i,keepWithinBounds:s,eventSource:n,alignSide:r="left",position:l="over",column:a,rowNode:d,type:c}=e,u=n.getBoundingClientRect(),h=this.getParentRect();this.setAlignedTo(n,t);const g=()=>{let p=u.left-h.left;r==="right"&&(p-=t.offsetWidth-u.width);let f;return l==="over"?(f=u.top-h.top,this.setAlignedStyles(t,"over")):(this.setAlignedStyles(t,"under"),this.shouldRenderUnderOrAbove(t,u,h,e.nudgeY||0)==="under"?f=u.top-h.top+u.height:f=u.top-t.offsetHeight-(i||0)*2-h.top),{x:p,y:f}};this.positionPopup({ePopup:t,nudgeX:o,nudgeY:i,keepWithinBounds:s,updatePosition:g,postProcessCallback:()=>this.callPostProcessPopup(c,t,n,null,a,d)})}shouldRenderUnderOrAbove(e,t,o,i){const s=o.bottom-t.bottom,n=t.top-o.top,r=e.offsetHeight+i;return s>r?"under":n>r||n>s?"above":"under"}setAlignedStyles(e,t){const o=this.getPopupIndex(e);if(o===-1)return;const i=this.popupList[o],{alignedToElement:s}=i;!s||(["right","left","over","above","under"].forEach(r=>{s.classList.remove(`ag-has-popup-positioned-${r}`),e.classList.remove(`ag-popup-positioned-${r}`)}),!t)||(s.classList.add(`ag-has-popup-positioned-${t}`),e.classList.add(`ag-popup-positioned-${t}`))}setAlignedTo(e,t){const o=this.getPopupIndex(t);if(o!==-1){const i=this.popupList[o];i.alignedToElement=e}}callPostProcessPopup(e,t,o,i,s,n){const r=this.gos.getCallback("postProcessPopup");r&&r({column:s,rowNode:n,ePopup:t,type:e,eventSource:o,mouseEvent:i})}positionPopup(e){const{ePopup:t,keepWithinBounds:o,nudgeX:i,nudgeY:s,skipObserver:n,updatePosition:r}=e,l={width:0,height:0},a=(d=!1)=>{let{x:c,y:u}=r();d&&t.clientWidth===l.width&&t.clientHeight===l.height||(l.width=t.clientWidth,l.height=t.clientHeight,i&&(c+=i),s&&(u+=s),o&&(c=this.keepXYWithinBounds(t,c,1),u=this.keepXYWithinBounds(t,u,0)),t.style.left=`${c}px`,t.style.top=`${u}px`,e.postProcessCallback&&e.postProcessCallback())};if(a(),!n){const d=Ze(this.beans,t,()=>a(!0));setTimeout(()=>d(),nb)}}getActivePopups(){return this.popupList.map(e=>e.element)}getParentRect(){const e=J(this.beans);let t=this.getPopupParent();return t===e.body?t=e.documentElement:getComputedStyle(t).position==="static"&&(t=t.offsetParent),Hn(t)}keepXYWithinBounds(e,t,o){const i=o===0,s=i?"clientHeight":"clientWidth",n=i?"top":"left",r=i?"height":"width",l=i?"scrollTop":"scrollLeft",a=J(this.beans),d=a.documentElement,c=this.getPopupParent(),u=e.getBoundingClientRect(),h=c.getBoundingClientRect(),g=a.documentElement.getBoundingClientRect(),p=c===a.body,f=Math.ceil(u[r]);let m=p?(i?ic:ji)(d)+d[l]:c[s];p&&(m-=Math.abs(g[n]-h[n]));const w=m-f;return Math.min(Math.max(t,0),Math.abs(w))}addPopup(e){const t=J(this.beans),{eChild:o,ariaLabel:i,ariaOwns:s,alwaysOnTop:n,positionCallback:r,anchorToElement:l}=e;if(!t)return k(122),{hideFunc:()=>{}};const a=this.getPopupIndex(o);if(a!==-1)return{hideFunc:this.popupList[a].hideFunc};this.initialisePopupPosition(o);const d=this.createPopupWrapper(o,!!n,i,s),c=this.addEventListenersToPopup({...e,wrapperEl:d});return r&&r(),this.addPopupToPopupList(o,d,c,l),{hideFunc:c}}initialisePopupPosition(e){const o=this.getPopupParent().getBoundingClientRect();M(e.style.top)||(e.style.top=`${o.top*-1}px`),M(e.style.left)||(e.style.left=`${o.left*-1}px`)}createPopupWrapper(e,t,o,i){const s=this.getPopupParent(),{environment:n,gos:r}=this.beans,l=X({tag:"div"});return n.applyThemeClasses(l),l.classList.add("ag-popup"),e.classList.add(r.get("enableRtl")?"ag-rtl":"ag-ltr","ag-popup-child"),e.hasAttribute("role")||Be(e,"dialog"),o?zt(e,o):i&&(e.id||(e.id=`popup-component-${Ri}`),Pn(i,e.id)),l.appendChild(e),s.appendChild(l),t?this.setAlwaysOnTop(e,!0):this.bringPopupToFront(e),l}handleThemeChange(e){if(e.themeChanged){const t=this.beans.environment;for(const o of this.popupList)t.applyThemeClasses(o.wrapper)}}addEventListenersToPopup(e){const t=this.beans,o=J(t),i=this.getPopupParent(),{wrapperEl:s,eChild:n,closedCallback:r,afterGuiAttached:l,closeOnEsc:a,modal:d,ariaOwns:c}=e;let u=!1;const h=C=>{if(!s.contains(Y(t)))return;C.key===y.ESCAPE&&!ke(C)&&f({keyboardEvent:C})},g=C=>f({mouseEvent:C}),p=C=>f({touchEvent:C}),f=(C={})=>{const{mouseEvent:m,touchEvent:w,keyboardEvent:b,forceHide:v}=C;!v&&(this.isEventFromCurrentPopup({mouseEvent:m,touchEvent:w},n)||u)||(u=!0,i.removeChild(s),o.removeEventListener("keydown",h),o.removeEventListener("mousedown",g),o.removeEventListener("touchstart",p),o.removeEventListener("contextmenu",g),this.eventSvc.removeEventListener("dragStarted",g),r&&r(m||w||b),this.removePopupFromPopupList(n,c))};return l&&l({hidePopup:f}),window.setTimeout(()=>{a&&o.addEventListener("keydown",h),d&&(o.addEventListener("mousedown",g),this.eventSvc.addEventListener("dragStarted",g),o.addEventListener("touchstart",p),o.addEventListener("contextmenu",g))},0),f}addPopupToPopupList(e,t,o,i){this.popupList.push({element:e,wrapper:t,hideFunc:o,instanceId:Ri,isAnchored:!!i}),i&&this.setPopupPositionRelatedToElement(e,i),Ri=Ri+1}getPopupIndex(e){return this.popupList.findIndex(t=>t.element===e)}setPopupPositionRelatedToElement(e,t){const o=this.getPopupIndex(e);if(o===-1)return;const i=this.popupList[o];if(i.stopAnchoringPromise&&i.stopAnchoringPromise.then(n=>n&&n()),i.stopAnchoringPromise=void 0,i.isAnchored=!1,!t)return;const s=this.keepPopupPositionedRelativeTo({element:t,ePopup:e,hidePopup:i.hideFunc});return i.stopAnchoringPromise=s,i.isAnchored=!0,s}removePopupFromPopupList(e,t){this.setAlignedStyles(e,null),this.setPopupPositionRelatedToElement(e,null),t&&Pn(t,null),this.popupList=this.popupList.filter(o=>o.element!==e)}keepPopupPositionedRelativeTo(e){const t=this.getPopupParent(),o=t.getBoundingClientRect(),{element:i,ePopup:s}=e,n=i.getBoundingClientRect(),r=u=>parseInt(u.substring(0,u.length-1),10),l=(u,h)=>{const g=o[u]-n[u],p=r(s.style[u]);return{initialDiff:g,lastDiff:g,initial:p,last:p,direction:h}},a=l("top",0),d=l("left",1),c=this.beans.frameworkOverrides;return new eo(u=>{c.wrapIncoming(()=>{c.setInterval(()=>{const h=t.getBoundingClientRect(),g=i.getBoundingClientRect();if(g.top==0&&g.left==0&&g.height==0&&g.width==0){e.hidePopup();return}const f=(C,m)=>{const w=r(s.style[m]);C.last!==w&&(C.initial=w,C.last=w);const b=h[m]-g[m];if(b!=C.lastDiff){const v=this.keepXYWithinBounds(s,C.initial+C.initialDiff-b,C.direction);s.style[m]=`${v}px`,C.last=v}C.lastDiff=b};f(a,"top"),f(d,"left")},200).then(h=>{u(()=>{h!=null&&window.clearInterval(h)})})},"popupPositioning")})}hasAnchoredPopup(){return this.popupList.some(e=>e.isAnchored)}isEventFromCurrentPopup(e,t){const{mouseEvent:o,touchEvent:i}=e,s=o||i;if(!s)return!1;const n=this.getPopupIndex(t);if(n===-1)return!1;for(let r=n;r<this.popupList.length;r++){const l=this.popupList[r];if(Tc(l.element,s))return!0}return this.isElementWithinCustomPopup(s.target)}isElementWithinCustomPopup(e){const t=J(this.beans);for(;e&&e!==t.body;){if(e.classList.contains("ag-custom-component-popup")||e.parentElement===null)return!0;e=e.parentElement}return!1}getWrapper(e){for(;!e.classList.contains("ag-popup")&&e.parentElement;)e=e.parentElement;return e.classList.contains("ag-popup")?e:null}setAlwaysOnTop(e,t){const o=this.getWrapper(e);o&&(o.classList.toggle("ag-always-on-top",!!t),t&&this.bringPopupToFront(o))}bringPopupToFront(e){const t=this.getPopupParent(),o=Array.prototype.slice.call(t.querySelectorAll(".ag-popup")),i=o.length,s=this.getWrapper(e);if(!s||i<=1||!t.contains(e))return;const n=[],r=[];for(const h of o)h!==s&&(h.classList.contains("ag-always-on-top")?r.push(h):n.push(h));const l=[],a=r.length,u=s.classList.contains("ag-always-on-top")||!a?[...n,...r,s]:[...n,s,...r];for(let h=0;h<=i;h++){const g=u[h];if(o[h]===u[h]||g===s)continue;g.querySelectorAll("div").forEach(f=>{f.scrollTop!==0&&l.push([f,f.scrollTop])}),h===0?t.insertAdjacentElement("afterbegin",g):u[h-1].insertAdjacentElement("afterend",g)}for(;l.length;){const h=l.pop();h[0].scrollTop=h[1]}}},Ea={moduleName:"Popup",version:G,beans:[rb]},lb=".ag-tooltip{background-color:var(--ag-tooltip-background-color);border:var(--ag-tooltip-border);border-radius:var(--ag-border-radius);color:var(--ag-tooltip-text-color);padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding);position:absolute;white-space:normal;z-index:99999;&:where(.ag-cell-editor-tooltip){background-color:var(--ag-tooltip-error-background-color);border:var(--ag-tooltip-error-border);color:var(--ag-tooltip-error-text-color);font-weight:500}}.ag-tooltip-custom{position:absolute;z-index:99999}.ag-tooltip-custom:where(:not(.ag-tooltip-interactive)),.ag-tooltip:where(:not(.ag-tooltip-interactive)){pointer-events:none}.ag-tooltip-animate{transition:opacity 1s;&:where(.ag-tooltip-hiding){opacity:0}}",cn=(e,t,o)=>{var l,a,d;const{editModelSvc:i}=e,s=(a=(l=i==null?void 0:i.getCellValidationModel())==null?void 0:l.getCellValidation(t))==null?void 0:a.errorMessages,n=(d=i==null?void 0:i.getRowValidationModel().getRowValidation(t))==null?void 0:d.errorMessages,r=s||n;return r&&r.length?r.join(o("tooltipValidationErrorSeparator",". ")):void 0},ab=class extends x{constructor(){super(...arguments),this.beanName="tooltipSvc"}setupHeaderTooltip(e,t,o,i){e&&t.destroyBean(e);const s=dn(this.gos),{column:n,eGui:r}=t,l=n.getColDef();!i&&s&&!l.headerComponent&&(i=Po(()=>r.querySelector(".ag-header-cell-text")));const a={getColumn:()=>n,getColDef:()=>n.getColDef(),getGui:()=>r,getLocation:()=>"header",getTooltipValue:()=>o??n.getColDef().headerTooltip,shouldDisplayTooltip:i};let d=this.createTooltipFeature(a);return d&&(d=t.createBean(d),t.setRefreshFunction("tooltip",()=>d.refreshTooltip())),d}setupHeaderGroupTooltip(e,t,o,i){e&&t.destroyBean(e);const s=dn(this.gos),{column:n,eGui:r}=t,l=n.getColGroupDef();!i&&s&&!(l!=null&&l.headerGroupComponent)&&(i=Po(()=>r.querySelector(".ag-header-group-text")));const a={getColumn:()=>n,getGui:()=>r,getLocation:()=>"headerGroup",getTooltipValue:()=>o??(l&&l.headerTooltip),shouldDisplayTooltip:i};l&&(a.getColDef=()=>l);const d=this.createTooltipFeature(a);return d&&t.createBean(d)}enableCellTooltipFeature(e,t,o){const{beans:i}=this,{gos:s,editSvc:n}=i,{column:r,rowNode:l}=e;let a="cell";const d=()=>{const g=!!!(n!=null&&n.isEditing(e))&&cn(i,e,this.getLocaleTextFunc());if(g)return a="cellEditor",g;a="cell";const p=r.getColDef(),f=l.data;if(p.tooltipField&&M(f))return Wt(f,p.tooltipField,r.isTooltipFieldContainsDots());const C=p.tooltipValueGetter;return C?C(_(s,{location:"cell",colDef:r.getColDef(),column:r,rowIndex:e.cellPosition.rowIndex,node:l,data:l.data,value:e.value,valueFormatted:e.valueFormatted})):null},c=dn(s);o||(c&&!e.isCellRenderer()?o=()=>{const h=!!(n!=null&&n.isEditing(e));if(!h&&cn(i,e,this.getLocaleTextFunc()))return!0;if(!r.isTooltipEnabled())return!1;const f=Po(()=>{const C=e.eGui;return C.children.length===0?C:C.querySelector(".ag-cell-value")});return!h&&f()}:o=()=>!(n!=null&&n.isEditing(e)));const u={getColumn:()=>r,getColDef:()=>r.getColDef(),getRowIndex:()=>e.cellPosition.rowIndex,getRowNode:()=>l,getGui:()=>e.eGui,getLocation:()=>a,getTooltipValue:t!=null?()=>t:d,getValueFormatted:()=>e.valueFormatted,shouldDisplayTooltip:o};return this.createTooltipFeature(u,i)}setupFullWidthRowTooltip(e,t,o,i){const s={getGui:()=>t.getFullWidthElement(),getTooltipValue:()=>o,getLocation:()=>"fullWidthRow",shouldDisplayTooltip:i},n=this.beans,r=n.context;e&&t.destroyBean(e,r);const l=this.createTooltipFeature(s,n);if(l)return t.createBean(l,r)}setupCellEditorTooltip(e,t){var l,a;const{beans:o}=this,{context:i}=o,s=((l=t.getValidationElement)==null?void 0:l.call(t,!0))||!((a=t.isPopup)!=null&&a.call(t))&&e.eGui;if(!s)return;const n={getGui:()=>s,getTooltipValue:()=>cn(o,e,this.getLocaleTextFunc()),getLocation:()=>"cellEditor",shouldDisplayTooltip:()=>{var p,f;const{editModelSvc:d}=o,c=(p=d==null?void 0:d.getRowValidationModel())==null?void 0:p.getRowValidationMap(),u=(f=d==null?void 0:d.getCellValidationModel())==null?void 0:f.getCellValidationMap(),h=!!c&&c.size>0,g=!!u&&u.size>0;return h||g}},r=this.createTooltipFeature(n,o);if(r)return e.createBean(r,i)}initCol(e){const{colDef:t}=e;e.tooltipEnabled=M(t.tooltipField)||M(t.tooltipValueGetter)||M(t.tooltipComponent)}createTooltipFeature(e,t){return this.beans.registry.createDynamicBean("tooltipFeature",!1,e,t)}},xa={moduleName:"Tooltip",version:G,beans:[ab],dynamicBeans:{tooltipFeature:Kv},userComponents:{agTooltipComponent:Wv},dependsOn:[Ea],css:[lb]},db=".ag-cell-inline-editing{border:var(--ag-cell-editing-border)!important;border-radius:var(--ag-border-radius);box-shadow:var(--ag-cell-editing-shadow);padding:0;z-index:1;.ag-cell-edit-wrapper,.ag-cell-editor,.ag-cell-wrapper,:where(.ag-cell-editor) .ag-input-field-input,:where(.ag-cell-editor) .ag-wrapper{height:100%;line-height:normal;min-height:100%;width:100%}&.ag-cell-editing-error{border-color:var(--ag-invalid-color)!important}}:where(.ag-popup-editor) .ag-large-text{background-color:var(--ag-background-color);border-radius:var(--ag-border-radius);box-shadow:var(--ag-dropdown-shadow);padding:0}.ag-large-text-input{height:auto;padding:var(--ag-cell-horizontal-padding)}:where(.ag-rtl .ag-large-text-input) textarea{resize:none}:where(.ag-ltr) .ag-checkbox-edit{padding-left:var(--ag-cell-horizontal-padding)}:where(.ag-rtl) .ag-checkbox-edit{padding-right:var(--ag-cell-horizontal-padding)}:where(.ag-row.ag-row-editing-invalid .ag-cell-inline-editing){opacity:.8}",cb={tag:"div",cls:"ag-cell-wrapper ag-cell-edit-wrapper ag-checkbox-edit",children:[{tag:"ag-checkbox",ref:"eEditor",role:"presentation"}]},ub=class extends fi{constructor(){super(cb,[Gs]),this.eEditor=A}initialiseEditor(e){const t=e.value??void 0,o=this.eEditor;o.setValue(t),o.getInputElement().setAttribute("tabindex","-1"),this.setAriaLabel(t),this.addManagedListeners(o,{fieldValueChanged:s=>this.setAriaLabel(s.selected)})}getValue(){return this.eEditor.getValue()}focusIn(){this.eEditor.getFocusableElement().focus()}afterGuiAttached(){this.params.cellStartedEdit&&this.focusIn()}isPopup(){return!1}setAriaLabel(e){const t=this.getLocaleTextFunc(),o=Tn(t,e),i=t("ariaToggleCellValue","Press SPACE to toggle cell value");this.eEditor.setInputAriaLabel(`${i} (${o})`)}getValidationElement(e){return e?this.params.eGridCell:this.eEditor.getInputElement()}getValidationErrors(){const{params:e}=this,{getValidationErrors:t}=e,o=this.getValue();return t?t({value:o,internalErrors:null,cellEditorParams:e}):null}},Ei=class extends fi{constructor(e){super(),this.cellEditorInput=e,this.eEditor=A}initialiseEditor(e){const{cellEditorInput:t}=this;this.setTemplate({tag:"div",cls:"ag-cell-edit-wrapper",children:[t.getTemplate()]},t.getAgComponents());const{eEditor:o}=this,{cellStartedEdit:i,eventKey:s,suppressPreventDefault:n}=e;o.getInputElement().setAttribute("title",""),t.init(o,e);let r,l=!0;i?(this.focusAfterAttached=!0,s===y.BACKSPACE||s===y.DELETE?r="":s&&s.length===1?n?l=!1:r=s:(r=t.getStartValue(),s!==y.F2&&(this.highlightAllOnFocus=!0))):(this.focusAfterAttached=!1,r=t.getStartValue()),l&&r!=null&&o.setStartValue(r),this.addGuiEventListener("keydown",a=>{const{key:d}=a;(d===y.PAGE_UP||d===y.PAGE_DOWN)&&a.preventDefault()})}afterGuiAttached(){var i,s;const e=this.getLocaleTextFunc(),t=this.eEditor;if(t.setInputAriaLabel(e("ariaInputEditor","Input Editor")),!this.focusAfterAttached)return;ht()||t.getFocusableElement().focus();const o=t.getInputElement();this.highlightAllOnFocus?o.select():(s=(i=this.cellEditorInput).setCaret)==null||s.call(i)}focusIn(){const{eEditor:e}=this,t=e.getFocusableElement(),o=e.getInputElement();t.focus(),o.select()}getValue(){return this.cellEditorInput.getValue()}isPopup(){return!1}getValidationElement(){return this.eEditor.getInputElement()}getValidationErrors(){return this.cellEditorInput.getValidationErrors()}},hb={tag:"ag-input-date-field",ref:"eEditor",cls:"ag-cell-editor"},gb=class{constructor(e,t){this.getDataTypeService=e,this.getLocaleTextFunc=t}getTemplate(){return hb}getAgComponents(){return[Dl]}init(e,t){var r,l;this.eEditor=e,this.params=t;const{min:o,max:i,step:s,colDef:n}=t;o!=null&&e.setMin(o),i!=null&&e.setMax(i),s!=null&&e.setStep(s),this.includeTime=t.includeTime??((l=(r=this.getDataTypeService())==null?void 0:r.getDateIncludesTimeFlag)==null?void 0:l.call(r,n.cellDataType)),this.includeTime!=null&&e.setIncludeTime(this.includeTime)}getValidationErrors(){const t=this.eEditor.getInputElement().valueAsDate,{params:o}=this,{min:i,max:s,getValidationErrors:n}=o;let r=[];const l=this.getLocaleTextFunc();if(t instanceof Date&&!isNaN(t.getTime())){if(i){const a=i instanceof Date?i:new Date(i);if(t<a){const d=a.toLocaleDateString();r.push(l("minDateValidation",`Date must be after ${d}`,[d]))}}if(s){const a=s instanceof Date?s:new Date(s);if(t>a){const d=a.toLocaleDateString();r.push(l("maxDateValidation",`Date must be before ${d}`,[d]))}}}return r.length||(r=null),n?n({value:t,cellEditorParams:o,internalErrors:r}):r}getValue(){const{eEditor:e,params:t}=this,o=e.getDate();return!M(o)&&!M(t.value)?t.value:o??null}getStartValue(){const{value:e}=this.params;if(e instanceof Date)return $e(e,this.includeTime??!1)}},pb=class extends Ei{constructor(){super(new gb(()=>this.beans.dataTypeSvc,()=>this.getLocaleTextFunc()))}},fb={tag:"ag-input-date-field",ref:"eEditor",cls:"ag-cell-editor"},Cb=class{constructor(e,t){this.getDataTypeService=e,this.getLocaleTextFunc=t}getTemplate(){return fb}getAgComponents(){return[Dl]}init(e,t){var r,l;this.eEditor=e,this.params=t;const{min:o,max:i,step:s,colDef:n}=t;o!=null&&e.setMin(o),i!=null&&e.setMax(i),s!=null&&e.setStep(s),this.includeTime=t.includeTime??((l=(r=this.getDataTypeService())==null?void 0:r.getDateIncludesTimeFlag)==null?void 0:l.call(r,n.cellDataType)),this.includeTime!=null&&e.setIncludeTime(this.includeTime)}getValidationErrors(){const{eEditor:e,params:t}=this,o=e.getInputElement().value,i=this.formatDate(this.parseDate(o??void 0)),{min:s,max:n,getValidationErrors:r}=t;let l=[];if(i){const a=new Date(i),d=this.getLocaleTextFunc();if(s){const c=new Date(s);if(a<c){const u=c.toLocaleDateString();l.push(d("minDateValidation",`Date must be after ${u}`,[u]))}}if(n){const c=new Date(n);if(a>c){const u=c.toLocaleDateString();l.push(d("maxDateValidation",`Date must be before ${u}`,[u]))}}}return l.length||(l=null),r?r({value:this.getValue(),cellEditorParams:t,internalErrors:l}):l}getValue(){const{params:e,eEditor:t}=this,o=this.formatDate(t.getDate());return!M(o)&&!M(e.value)?e.value:e.parseValue(o??"")}getStartValue(){return $e(this.parseDate(this.params.value??void 0)??null,this.includeTime??!1)}parseDate(e){const t=this.getDataTypeService();return t?t.getDateParserFunction(this.params.column)(e):no(e)??void 0}formatDate(e){const t=this.getDataTypeService();return t?t.getDateFormatterFunction(this.params.column)(e):$e(e??null,this.includeTime??!1)??void 0}},mb=class extends Ei{constructor(){super(new Cb(()=>this.beans.dataTypeSvc,()=>this.getLocaleTextFunc()))}},wb={tag:"div",cls:"ag-large-text",children:[{tag:"ag-input-text-area",ref:"eEditor",cls:"ag-large-text-input"}]},vb=class extends fi{constructor(){super(wb,[cp]),this.eEditor=A}initialiseEditor(e){const{eEditor:t}=this,{cellStartedEdit:o,eventKey:i,value:s,maxLength:n,cols:r,rows:l}=e;this.focusAfterAttached=o,t.getInputElement().setAttribute("title",""),t.setMaxLength(n||200).setCols(r||60).setRows(l||10);let a;o?(this.focusAfterAttached=!0,i===y.BACKSPACE||i===y.DELETE?a="":i&&i.length===1?a=i:(a=s.toString(),i!==y.F2&&(this.highlightAllOnFocus=!0))):(this.focusAfterAttached=!1,a=s.toString()),a!=null&&t.setValue(a,!0),this.addGuiEventListener("keydown",this.onKeyDown.bind(this)),this.activateTabIndex()}onKeyDown(e){const t=e.key;(t===y.LEFT||t===y.UP||t===y.RIGHT||t===y.DOWN||e.shiftKey&&t===y.ENTER)&&e.stopPropagation()}afterGuiAttached(){const{eEditor:e,focusAfterAttached:t,highlightAllOnFocus:o}=this,i=this.getLocaleTextFunc();e.setInputAriaLabel(i("ariaInputEditor","Input Editor")),t&&(e.getFocusableElement().focus(),o&&e.getInputElement().select())}getValue(){const{eEditor:e,params:t}=this,{value:o}=t,i=e.getValue();return!M(i)&&!M(o)?o:t.parseValue(i)}getValidationElement(){return this.eEditor.getInputElement()}getValidationErrors(){const{params:e}=this,{maxLength:t,getValidationErrors:o}=e,i=this.getLocaleTextFunc(),s=this.getValue();let n=[];return typeof s=="string"&&t!=null&&s.length>t&&n.push(i("maxLengthValidation",`Must be ${t} characters or fewer.`,[String(t)])),n.length||(n=null),o?o({value:s,internalErrors:n,cellEditorParams:e}):n}},bb={tag:"ag-input-number-field",ref:"eEditor",cls:"ag-cell-editor"},Sb=class{constructor(e){this.getLocaleTextFunc=e}getTemplate(){return bb}getAgComponents(){return[hp]}init(e,t){this.eEditor=e,this.params=t;const{max:o,min:i,precision:s,step:n}=t;o!=null&&e.setMax(o),i!=null&&e.setMin(i),s!=null&&e.setPrecision(s),n!=null&&e.setStep(n);const r=e.getInputElement();t.preventStepping?e.addManagedElementListeners(r,{keydown:this.preventStepping}):t.showStepperButtons&&r.classList.add("ag-number-field-input-stepper")}getValidationErrors(){const{params:e}=this,{min:t,max:o,getValidationErrors:i}=e,n=this.eEditor.getInputElement().valueAsNumber,r=this.getLocaleTextFunc();let l=[];return typeof n=="number"&&(t!=null&&n<t&&l.push(r("minValueValidation",`Must be greater than or equal to ${t}.`,[String(t)])),o!=null&&n>o&&l.push(r("maxValueValidation",`Must be less than or equal to ${o}.`,[String(o)]))),l.length||(l=null),i?i({value:n,cellEditorParams:e,internalErrors:l}):l}preventStepping(e){(e.key===y.UP||e.key===y.DOWN)&&e.preventDefault()}getValue(){const{eEditor:e,params:t}=this,o=e.getValue();if(!M(o)&&!M(t.value))return t.value;let i=t.parseValue(o);if(i==null)return i;if(typeof i=="string"){if(i==="")return null;i=Number(i)}return isNaN(i)?null:i}getStartValue(){return this.params.value}setCaret(){ht()&&this.eEditor.getInputElement().focus({preventScroll:!0})}},yb=class extends Ei{constructor(){super(new Sb(()=>this.getLocaleTextFunc()))}},Rb={tag:"div",cls:"ag-cell-edit-wrapper",children:[{tag:"ag-select",ref:"eEditor",cls:"ag-cell-editor"}]},Eb=class extends fi{constructor(){super(Rb,[bp]),this.eEditor=A,this.startedByEnter=!1}wireBeans(e){this.valueSvc=e.valueSvc}initialiseEditor(e){this.focusAfterAttached=e.cellStartedEdit;const{eEditor:t,valueSvc:o,gos:i}=this,{values:s,value:n,eventKey:r}=e;if(K(s)){k(58);return}this.startedByEnter=r!=null?r===y.ENTER:!1;let l=!1;s.forEach(u=>{const h={value:u},g=o.formatValue(e.column,null,u),p=g!=null;h.text=p?g:u,t.addOption(h),l=l||n===u}),l?t.setValue(e.value,!0):e.values.length&&t.setValue(e.values[0],!0);const{valueListGap:a,valueListMaxWidth:d,valueListMaxHeight:c}=e;a!=null&&t.setPickerGap(a),c!=null&&t.setPickerMaxHeight(c),d!=null&&t.setPickerMaxWidth(d),i.get("editType")!=="fullRow"&&this.addManagedListeners(this.eEditor,{selectedItem:()=>e.stopEditing()})}afterGuiAttached(){this.focusAfterAttached&&this.eEditor.getFocusableElement().focus(),this.startedByEnter&&setTimeout(()=>{this.isAlive()&&this.eEditor.showPicker()})}focusIn(){this.eEditor.getFocusableElement().focus()}getValue(){return this.eEditor.getValue()}isPopup(){return!1}getValidationElement(){return this.eEditor.getAriaElement()}getValidationErrors(){const{params:e}=this,{values:t,getValidationErrors:o}=e,i=this.getValue();let s=[];if(t&&!t.includes(i)){const n=this.getLocaleTextFunc();s.push(n("invalidSelectionValidation","Invalid selection."))}else s=null;return o?o({value:i,internalErrors:s,cellEditorParams:e}):s}},xb={tag:"ag-input-text-field",ref:"eEditor",cls:"ag-cell-editor"},Db=class{constructor(e){this.getLocaleTextFunc=e}getTemplate(){return xb}getAgComponents(){return[ap]}init(e,t){this.eEditor=e,this.params=t;const o=t.maxLength;o!=null&&e.setMaxLength(o)}getValidationErrors(){const{params:e}=this,{maxLength:t,getValidationErrors:o}=e,i=this.getValue(),s=this.getLocaleTextFunc();let n=[];return t!=null&&typeof i=="string"&&i.length>t&&n.push(s("maxLengthValidation",`Must be ${t} characters or fewer.`,[String(t)])),n.length||(n=null),o?o({value:i,cellEditorParams:e,internalErrors:n}):n}getValue(){const{eEditor:e,params:t}=this,o=e.getValue();return!M(o)&&!M(t.value)?t.value:t.parseValue(o)}getStartValue(){const e=this.params;return e.useFormatter||e.column.getColDef().refData?e.formatValue(e.value):e.value}setCaret(){const e=this.eEditor,t=e.getValue(),o=M(t)&&t.length||0;o&&e.getInputElement().setSelectionRange(o,o)}},Da=class extends Ei{constructor(){super(new Db(()=>this.getLocaleTextFunc()))}};function Fb(e){return e.ctrlsSvc.getScrollFeature().getVScrollPosition()}function Pb(e){return e.ctrlsSvc.getScrollFeature().getHScrollPosition()}function Fa(e,t,o="auto"){e.frameworkOverrides.wrapIncoming(()=>e.ctrlsSvc.getScrollFeature().ensureColumnVisible(t,o),"ensureVisible")}function Pa(e,t,o){e.frameworkOverrides.wrapIncoming(()=>e.ctrlsSvc.getScrollFeature().ensureIndexVisible(t,o),"ensureVisible")}function Tb(e,t,o=null){e.frameworkOverrides.wrapIncoming(()=>e.ctrlsSvc.getScrollFeature().ensureNodeVisible(t,o),"ensureVisible")}function Ib(e){var i;const t=(i=e.editModelSvc)==null?void 0:i.getEditMap(),o=[];return t==null||t.forEach((s,n)=>{const{rowIndex:r,rowPinned:l}=n;s.forEach((a,d)=>{const{editorValue:c,pendingValue:u,sourceValue:h,state:g}=a,p=ze(a);let f=c??u;f===pe&&(f=void 0);const C={newValue:f,oldValue:h,state:g,column:d,colId:d.getColId(),colKey:d.getColId(),rowIndex:r,rowPinned:l};(g==="editing"||g==="changed"&&p)&&o.push(C)})}),o}function Ab(e,t=!1){var i;const{editSvc:o}=e;o!=null&&o.isBatchEditing()?(t?(i=e.editModelSvc)==null||i.getEditPositions().forEach(s=>{s.state==="editing"&&o.revertSingleCellEdit(s)}):st(e,!0),Dt(e)):o==null||o.stopEditing(void 0,{cancel:t,source:"api"})}function Mb(e,t){var i;const o=q(e,t);return((i=e.editSvc)==null?void 0:i.isEditing(o))??!1}function kb(e,t){const{key:o,colKey:i,rowIndex:s,rowPinned:n}=t,{editSvc:r,colModel:l}=e,a=l.getCol(i);if(!a){k(12,{colKey:i});return}const c=it(e,{rowIndex:s,rowPinned:n||null});if(!c){k(290,{rowIndex:s,rowPinned:n});return}if(!a.isCellEditable(c))return;n==null&&Pa(e,s),Fa(e,i),r==null||r.startEditing({rowNode:c,column:a},{event:o?new KeyboardEvent("keydown",{key:o}):void 0,source:"api"})}function Lb(e){var t;return((t=e.editSvc)==null?void 0:t.validateEdit())||null}var Gb={tag:"div",cls:"ag-popup-editor",attrs:{tabindex:"-1"}},Hb=class extends ks{constructor(e){super(Gb),this.params=e}postConstruct(){Xe(this.gos,this.getGui(),"popupEditorWrapper",!0),this.addKeyDownListener()}addKeyDownListener(){const e=this.getGui(),t=this.params,o=i=>{xs(this.gos,i,t.node,t.column,!0)||t.onKeyDown(i)};this.addManagedElementListeners(e,{keydown:o})}},xi=(e,t=!1)=>{if(e!==void 0)return ze(e)||t&&e.state==="editing"};function Ta(e,t,o=!1){var i;return xi((i=e.editModelSvc)==null?void 0:i.getEdit(t),o)}function Ia(e,t){const{editModelSvc:o}=e,{column:i,rowNode:s}=t;if(e.gos.get("groupTotalRow")&&!(s!=null&&s.footer))return!1;for(const n of(s==null?void 0:s.allLeafChildren)??[])if(xi(o==null?void 0:o.getEdit({rowNode:n,column:i}))||xi(o==null?void 0:o.getEdit({rowNode:n.pinnedSibling,column:i})))return!0}function Aa(e,{rowNode:t,column:o}){var i;if(t=t.pinnedSibling,!!t)return xi((i=e.editModelSvc)==null?void 0:i.getEdit({rowNode:t,column:o}))}var Ob=class extends x{constructor(e,t){super(),this.cellCtrl=e,this.beans=t,this.editSvc=t.editSvc,this.editModelSvc=t.editModelSvc}setComp(e){this.cellComp=e,this.applyCellStyles()}applyCellStyles(){var s;const{cellCtrl:e,editSvc:t,beans:o}=this;if(t!=null&&t.isBatchEditing()&&t.isEditing()){const n=Ta(o,e)||Ia(o,e)||Aa(o,e);this.applyBatchingStyle(n)}else this.applyBatchingStyle(!1);const i=!!((s=this.editModelSvc)!=null&&s.getCellValidationModel().hasCellValidation(this.cellCtrl));this.cellComp.toggleCss("ag-cell-editing-error",i)}applyBatchingStyle(e){var t;this.cellComp.toggleCss("ag-cell-editing",e??!1),this.cellComp.toggleCss("ag-cell-batch-edit",(e&&((t=this.editSvc)==null?void 0:t.isBatchEditing()))??!1)}},Bb=class extends x{constructor(e,t){super(),this.rowCtrl=e,this.beans=t,this.gos=t.gos,this.editSvc=t.editSvc,this.editModelSvc=t.editModelSvc}applyRowStyles(){var r;const{rowCtrl:e,editModelSvc:t,beans:o}=this;let i=e.rowNode,s=t==null?void 0:t.getEditRow(i);const n=(r=this.editModelSvc)==null?void 0:r.getRowValidationModel().hasRowValidation({rowNode:i});if(!s&&i.pinnedSibling&&(i=i.pinnedSibling,s=t==null?void 0:t.getEditRow(i)),s){const l=Array.from(s.keys()).some(a=>{const d={rowNode:i,column:a};return Ta(o,d,!0)||Ia(o,d)||Aa(o,d)});this.applyStyle(n,l);return}this.applyStyle(n)}applyStyle(e=!1,t=!1){var s,n;const o=((s=this.editSvc)==null?void 0:s.isBatchEditing())??!1,i=this.gos.get("editType")==="fullRow";(n=this.rowCtrl)==null||n.forEachGui(void 0,({rowComp:r})=>{r.toggleCss("ag-row-editing",i&&t),r.toggleCss("ag-row-batch-edit",i&&t&&o),r.toggleCss("ag-row-inline-editing",t),r.toggleCss("ag-row-not-inline-editing",!t),r.toggleCss("ag-row-editing-invalid",i&&t&&e)})}},Vb=({rowModel:e,pinnedRowModel:t,editModelSvc:o},i)=>{const s=new Set;return e.forEachNode(n=>i.has(n)&&s.add(n)),t==null||t.forEachPinnedRow("top",n=>i.has(n)&&s.add(n)),t==null||t.forEachPinnedRow("bottom",n=>i.has(n)&&s.add(n)),i.forEach(n=>{s.has(n)||o.removeEdits({rowNode:n})}),s},Nb=({editModelSvc:e},t,o)=>{t.forEach(i=>{var s;return(s=e==null?void 0:e.getEditRow(i))==null?void 0:s.forEach((n,r)=>!o.has(r)&&e.removeEdits({rowNode:i,column:r}))})},_b=e=>()=>{const t=new Set(e.colModel.getCols()),o=e.editModelSvc.getEditMap(!0),i=new Set(o.keys());Nb(e,Vb(e,i),t)},Wb=new Set(["undo","redo"]),Ma={paste:"ui",rangeSvc:"ui",fillHandle:"api",cellClear:"api"},zb=new Set(Object.keys(Ma)),$b=new Set(["paste","rangeSvc","renderer","cellClear","redo","undo"]),Di={cancel:!0,source:"api"},Ub={cancel:!1,source:"api"},Ht={checkSiblings:!0},Co={force:!0,suppressFlash:!0},Kb=class extends x{constructor(){super(...arguments),this.beanName="editSvc",this.batch=!1}postConstruct(){const{beans:e}=this;this.model=e.editModelSvc,this.valueSvc=e.valueSvc,this.rangeSvc=e.rangeSvc,this.addManagedPropertyListener("editType",({currentValue:i})=>{this.stopEditing(void 0,Di),this.createStrategy(i)});const t=_b(e),o=()=>{const i=this.model.getCellValidationModel().getCellValidationMap().size>0,s=this.model.getRowValidationModel().getRowValidationMap().size>0;return i||s?this.stopEditing(void 0,Di):this.isEditing()&&(this.isBatchEditing()?Dt(e,this.model.getEditPositions()):this.stopEditing(void 0,Ub)),!1};this.addManagedEventListeners({columnPinned:t,columnVisible:t,columnRowGroupChanged:t,rowGroupOpened:t,pinnedRowsChanged:t,displayedRowsChanged:t,sortChanged:o,filterChanged:o,cellFocused:this.onCellFocused.bind(this)})}isBatchEditing(){return this.batch}setBatchEditing(e){e?(this.batch=!0,this.stopEditing(void 0,Di)):(this.stopEditing(void 0,Di),this.batch=!1)}createStrategy(e){const{beans:t,gos:o,strategy:i}=this,s=e??o.get("editType")??"singleCell";if(i){if(i.beanName===s)return i;this.destroyStrategy()}return this.strategy=this.createOptionalManagedBean(t.registry.createDynamicBean(s,!0))}destroyStrategy(){this.strategy&&(this.strategy.destroy(),this.strategy=this.destroyBean(this.strategy))}shouldStartEditing(e,t,o,i="ui"){var s;return this.strategy??(this.strategy=this.createStrategy()),((s=this.strategy)==null?void 0:s.shouldStart(e,t,o,i))??null}shouldStopEditing(e,t,o="ui"){var i;return((i=this.strategy)==null?void 0:i.shouldStop(e,t,o))??null}shouldCancelEditing(e,t,o="ui"){var i;return((i=this.strategy)==null?void 0:i.shouldCancel(e,t,o))??null}validateEdit(){return dh(this.beans)}isEditing(e,t){return this.model.hasEdits(e,t??Ht)}isRowEditing(e,t){return(e&&this.model.hasRowEdits(e,t))??!1}startEditing(e,t){var a;const{startedEdit:o=!0,event:i=null,source:s="ui",ignoreEventKey:n=!1}=t;if(this.strategy??(this.strategy=this.createStrategy()),!this.isCellEditable(e,"api"))return;const r=q(this.beans,e);if(r&&!r.comp){r.onCompAttachedFuncs.push(()=>this.startEditing(e,t));return}const l=(a=this.shouldStartEditing)==null?void 0:a.call(this,e,i,o,s);if(l===!1&&s!=="api"){this.isEditing(e)&&this.stopEditing();return}!this.batch&&this.shouldStopEditing(e,void 0,s)&&this.stopEditing(void 0,{source:s}),l&&this.isBatchEditing()&&this.dispatchBatchEvent("batchEditingStarted",new Map),this.strategy.start(e,i,s,n)}stopEditing(e,t){var p,f,C;const{event:o,cancel:i,source:s="ui",suppressNavigateAfterEdit:n}=t||{},{beans:r,model:l}=this;if(zb.has(s))return this.isBatchEditing()?(this.bulkRefresh(e),!1):this.stopEditing(e,{...t,source:Ma[s]});if(!(this.isEditing(e)||this.isBatchEditing()&&l.hasEdits(e,Ht))||!this.strategy)return!1;const d=q(r,e);d&&(d.onEditorAttachedFuncs=[]);let c=l.getEditMap(!0),u=!1;const h=!i&&!!this.shouldStopEditing(e,o,s),g=i&&!!this.shouldCancelEditing(e,o,s);if(h||g){st(r,!0);const m=l.getEditMap();this.processEdits(m,i),(p=this.strategy)==null||p.stop(i,o),this.bulkRefresh(void 0,c),c=m,u||(u=h)}else if(o instanceof KeyboardEvent&&this.batch&&((f=this.strategy)!=null&&f.midBatchInputsAllowed(e))&&this.isEditing(e,{withOpenEditor:!0})){const m=o.key,w=m===y.ENTER,b=m===y.ESCAPE,v=m===y.TAB;(w||v||b)&&(w||v?st(r,!0):b&&this.revertSingleCellEdit(d),this.isBatchEditing()?(C=this.strategy)==null||C.cleanupEditors():Dt(r,l.getEditPositions(),{event:o}),o.preventDefault(),this.bulkRefresh(e,c,{suppressFlash:!0}),c=l.getEditMap())}else st(r,!0),c=l.getEditMap();return u&&e&&this.model.removeEdits(e),!n&&d&&this.navigateAfterEdit(o instanceof KeyboardEvent&&o.shiftKey,d.cellPosition),ps(r),this.model.hasEdits()||(this.model.getCellValidationModel().clearCellValidationMap(),this.model.getRowValidationModel().clearRowValidationMap()),this.bulkRefresh(),g&&this.beans.rowRenderer.refreshRows({rowNodes:Array.from(c.keys())}),this.isBatchEditing()&&(this.beans.rowRenderer.refreshRows({suppressFlash:!0,force:!0}),u&&h&&this.dispatchBatchEvent("batchEditingStopped",c)),u}navigateAfterEdit(e,t){var i;if(this.gos.get("enterNavigatesVerticallyAfterEdit")){const s=e?y.UP:y.DOWN;(i=this.beans.navigation)==null||i.navigateToNextCell(null,s,t,!1)}}processEdits(e,t=!1){var r,l,a;const o=Array.from(e.keys()),{beans:i}=this,s=this.model.getCellValidationModel().getCellValidationMap().size>0||this.model.getRowValidationModel().getRowValidationMap().size>0,n=[];for(const d of o){const c=e.get(d);for(const u of c.keys()){const h=c.get(u),g={rowNode:d,column:u},p=q(i,g),f=ze(h),C=(a=(l=(r=p==null?void 0:p.comp)==null?void 0:r.getCellEditor())==null?void 0:l.isCancelAfterEnd)==null?void 0:a.call(l);!t&&!C&&f&&!s&&(this.setNodeDataValue(d,u,h.pendingValue)||n.push(g)),p==null||p.refreshCell(Co)}}n.forEach(d=>{this.model.clearEditValue(d)})}setNodeDataValue(e,t,o,i){const{beans:s}=this,n=q(s,{rowNode:e,column:t});n&&(n.suppressRefreshCell=!0);const r=e.setDataValue(t,o,"commit");return n&&(n.suppressRefreshCell=!1),i&&(n==null||n.refreshCell(Co)),r}setEditMap(e,t){var o;this.strategy??(this.strategy=this.createStrategy()),(o=this.strategy)==null||o.setEditMap(e,t),this.bulkRefresh(),this.beans.rowRenderer.refreshCells(Co)}dispatchEditValuesChanged({rowNode:e,column:t},o={}){if(!e||!t||!o)return;const{pendingValue:i,sourceValue:s}=o,{rowIndex:n,rowPinned:r,data:l}=e;this.beans.eventSvc.dispatchEvent({type:"cellEditValuesChanged",node:e,rowIndex:n,rowPinned:r,column:t,source:"api",data:l,newValue:i,oldValue:s,value:i,colDef:t.getColDef()})}bulkRefresh(e={},t,o={}){var l;const{beans:i,gos:s}=this,{editModelSvc:n,rowModel:r}=i;oe(s)&&(e.rowNode&&e.column?this.refCell(e,this.model.getEdit(e),o):t&&((l=n==null?void 0:n.getEditMap(!1))==null||l.forEach((a,d)=>{for(const c of a.keys())this.refCell({rowNode:d,column:c},a.get(c),o)})))}refCell({rowNode:e,column:t},o,i={}){var u;const{beans:s,gos:n}=this,r=new Set([e]),l=new Set,a=e.pinnedSibling;a&&r.add(a);const d=e.sibling;d&&l.add(d);let c=e.parent;for(;c;)(u=c.sibling)!=null&&u.footer&&n.get("groupTotalRow")||!c.parent&&c.sibling&&n.get("grandTotalRow")?l.add(c.sibling):l.add(c),c=c.parent;r.forEach(h=>this.dispatchEditValuesChanged({rowNode:h,column:t},o)),r.forEach(h=>{var g;return(g=q(s,{rowNode:h,column:t}))==null?void 0:g.refreshCell(i)}),l.forEach(h=>{var g;return(g=q(s,{rowNode:h,column:t}))==null?void 0:g.refreshCell(i)})}stopAllEditing(e=!1,t="ui"){this.isEditing()&&this.stopEditing(void 0,{cancel:e,source:t})}isCellEditable(e,t="ui"){var i;const{rowNode:o}=e;if(o.group){if(this.gos.get("treeData")){if(!o.data&&!this.gos.get("enableGroupEdit"))return!1}else if(!this.gos.get("enableGroupEdit"))return!1}return this.strategy??(this.strategy=this.createStrategy()),((i=this.strategy)==null?void 0:i.isCellEditable(e,t))??!1}cellEditingInvalidCommitBlocks(){return this.gos.get("invalidEditValueMode")==="block"}checkNavWithValidation(e,t,o=!0){var i,s,n,r;if(this.hasValidationErrors(e)){const l=q(this.beans,e);return this.cellEditingInvalidCommitBlocks()?((i=t==null?void 0:t.preventDefault)==null||i.call(t),o&&(!(l!=null&&l.hasBrowserFocus())&&(l==null||l.focusCell()),(r=(n=(s=l==null?void 0:l.comp)==null?void 0:s.getCellEditor())==null?void 0:n.focusIn)==null||r.call(n)),"block-stop"):(l&&this.revertSingleCellEdit(l),"revert-continue")}return"continue"}revertSingleCellEdit(e,t=!1){var i,s,n,r,l;const o=q(this.beans,e);(i=o==null?void 0:o.comp)!=null&&i.getCellEditor()&&(Dt(this.beans,[e],{silent:!0}),this.model.clearEditValue(e),xt(this.beans,e,{silent:!0}),nt(this.beans),o==null||o.refreshCell(Co),(s=o.rowCtrl.rowEditStyleFeature)==null||s.applyRowStyles(),t&&(o==null||o.focusCell(),(l=(r=(n=o==null?void 0:o.comp)==null?void 0:n.getCellEditor())==null?void 0:r.focusIn)==null||l.call(r)))}hasValidationErrors(e){var i;nt(this.beans);const t=q(this.beans,e);t&&(t.refreshCell(Co),(i=t.rowCtrl.rowEditStyleFeature)==null||i.applyRowStyles());let o=!1;return e!=null&&e.rowNode?(o||(o=this.model.getRowValidationModel().hasRowValidation({rowNode:e.rowNode})),e.column&&(o||(o=this.model.getCellValidationModel().hasCellValidation({rowNode:e.rowNode,column:e.column})))):(o||(o=this.model.getCellValidationModel().getCellValidationMap().size>0),o||(o=this.model.getRowValidationModel().getRowValidationMap().size>0)),o}moveToNextCell(e,t,o,i="ui"){var l;let s;const n=this.isEditing(),r=n&&this.checkNavWithValidation(void 0,o)==="block-stop";return e instanceof Pt&&n&&(s=(l=this.strategy)==null?void 0:l.moveToNextEditingCell(e,t,o,i,r)),s===null||(s=s||!!this.beans.focusSvc.focusedHeader,s===!1&&!r&&this.stopEditing()),s}getCellDataValue({rowNode:e,column:t},o=!0){if(!e||!t)return;let i=this.model.getEdit({rowNode:e,column:t});const s=e.pinnedSibling;if(s){const r=this.model.getEdit({rowNode:s,column:t});r&&(i=r)}const n=o?(i==null?void 0:i.editorValue)??(i==null?void 0:i.pendingValue):i==null?void 0:i.pendingValue;return n===pe||!i?this.valueSvc.getValue(t,e,!0,"api"):n}getRowDataValue(e,t){return this.model.getEditRowDataValue(e,t)}addStopEditingWhenGridLosesFocus(e){ih(this,this.beans,e)}createPopupEditorWrapper(e){return new Hb(e)}setDataValue(e,t,o){var r;if((!this.isEditing()||o==="commit")&&!$b.has(o))return;const{beans:i}=this;this.strategy??(this.strategy=this.createStrategy());const s=this.isBatchEditing()?"ui":"api";if(!o||Wb.has(o))return Qo(i,e,!0,t),this.setNodeDataValue(e.rowNode,e.column,t,!0);const n=this.model.getEdit(e);if(n){if(n.pendingValue===t)return!1;if(n.sourceValue!==t)return Qo(i,e,!0,t),this.stopEditing(e,{source:s,suppressNavigateAfterEdit:!0}),!0;if(n.sourceValue===t)return(r=i.editModelSvc)==null||r.removeEdits(e),this.dispatchEditValuesChanged(e,{...n,pendingValue:t}),!0}return Qo(i,e,!0,t),this.stopEditing(e,{source:s,suppressNavigateAfterEdit:!0}),!0}handleColDefChanged(e){rh(this.beans,e)}destroy(){this.model.clear(),this.destroyStrategy(),super.destroy()}prepDetailsDuringBatch(e,t){if(!this.batch||!this.model.hasRowEdits(e.rowNode,Ht))return;const{rowNode:i,column:s}=e,{compDetails:n,valueToDisplay:r}=t;if(n){const{params:a}=n;return a.data=this.model.getEditRowDataValue(i,Ht),{compDetails:n}}const l=this.model.getEditRow(e.rowNode,Ht);if(r!==void 0&&(l!=null&&l.has(s)))return{valueToDisplay:this.valueSvc.getValue(s,i)}}cleanupEditors(){var e;(e=this.strategy)==null||e.cleanupEditors()}dispatchCellEvent(e,t,o,i){var s;(s=this.strategy)==null||s.dispatchCellEvent(e,t,o,i)}dispatchRowEvent(e,t){var o;(o=this.strategy)==null||o.dispatchRowEvent(e,t)}dispatchBatchEvent(e,t){this.eventSvc.dispatchEvent(this.createBatchEditEvent(e,t))}createBatchEditEvent(e,t){return _(this.gos,{type:e,...e==="batchEditingStopped"?{changes:this.toEventChangeList(t)}:{}})}toEventChangeList(e){return this.model.getEditPositions(e).map(t=>({rowIndex:t.rowNode.rowIndex,rowPinned:t.rowNode.rowPinned,columnId:t.column.getColId(),newValue:t.pendingValue,oldValue:t.sourceValue}))}applyBulkEdit({rowNode:e,column:t},o){var d,c;if(!o||o.length===0)return;const{beans:i,rangeSvc:s,valueSvc:n}=this;st(i,!0);const r=this.model.getEditMap(!0),l=(c=(d=r.get(e))==null?void 0:d.get(t))==null?void 0:c.pendingValue;this.batch||this.eventSvc.dispatchEvent({type:"bulkEditingStarted"}),o.forEach(u=>{if(s==null||s.forEachRowInRange(u,h=>{const g=it(i,h);if(g===void 0)return;const p=r.get(g)??new Map;for(const f of u.columns)if(f&&this.isCellEditable({rowNode:g,column:f},"api")){const C=n.getValue(f,g,!0,"api");let m=n.parseValue(f,g??null,l,C);Number.isNaN(m)&&(m=null),p.set(f,{editorValue:void 0,pendingValue:m,sourceValue:C,state:"changed"})}p.size>0&&r.set(g,p)}),this.setEditMap(r),this.batch){this.cleanupEditors(),ps(i),this.bulkRefresh();return}this.stopEditing(void 0,{source:"api"}),this.eventSvc.dispatchEvent({type:"bulkEditingStopped",changes:this.toEventChangeList(r)})}),this.bulkRefresh();const a=q(i,{rowNode:e,column:t});a&&a.focusCell(!0)}createCellStyleFeature(e,t){return new Ob(e,t)}createRowStyleFeature(e,t){return new Bb(e,t)}setEditingCells(e,t){const{beans:o}=this,{colModel:i,valueSvc:s}=o,n=new Map;e.forEach(({colId:r,column:l,colKey:a,rowIndex:d,rowPinned:c,newValue:u,state:h})=>{const g=r?i.getCol(r):a?i.getCol(a):l;if(!g)return;const p=it(o,{rowIndex:d,rowPinned:c});if(!p)return;const f=s.getValue(g,p,!0,"api");if(!ze({pendingValue:u,sourceValue:f})&&h!=="editing")return;let C=n.get(p);C||(C=new Map,n.set(p,C)),u===void 0&&(u=pe),C.set(g,{editorValue:void 0,pendingValue:u,sourceValue:f,state:h??"changed"})}),this.setEditMap(n,t)}onCellFocused(e){var n;const t=q(this.beans,e);if(!t||!this.isEditing(t,Ht))return;const o=this.model.getEdit(t);if(!o||!ze(o))return;const s=this.getLocaleTextFunc()("ariaPendingChange","Pending Change");(n=this.beans.ariaAnnounce)==null||n.announceValue(s,"pendingChange")}allowedFocusTargetOnValidation(e){return q(this.beans,e)}},ka=class extends x{postConstruct(){var e,t;this.model=this.beans.editModelSvc,this.editSvc=this.beans.editSvc,this.addManagedEventListeners({cellFocused:(e=this.onCellFocusChanged)==null?void 0:e.bind(this),cellFocusCleared:(t=this.onCellFocusChanged)==null?void 0:t.bind(this)})}clearEdits(e){this.model.clearEditValue(e)}onCellFocusChanged(e){let t;const o=e.previousParams,{editSvc:i,beans:s}=this,n=e.type==="cellFocused"?e.sourceEvent:null;o&&(t=q(s,o));const{gos:r,editModelSvc:l}=s,a=e.type==="cellFocusCleared";if(i.isEditing(void 0,{withOpenEditor:!0})){const{column:d,rowIndex:c,rowPinned:u}=e,h={column:d,rowNode:it(s,{rowIndex:c,rowPinned:u})},g=r.get("invalidEditValueMode")==="block";if(g)return;const p=!g,f=!!(l!=null&&l.getCellValidationModel().hasCellValidation(h)),C=p&&f;(o||a?i.stopEditing(void 0,{cancel:C,source:a&&p?"api":void 0,event:n}):!0)||(i.isBatchEditing()?i.cleanupEditors():i.stopEditing(void 0,{source:"api"}))}t==null||t.refreshCell({suppressFlash:!0,force:!0})}isCellEditable({rowNode:e,column:t},o="ui"){return t.isColumnFunc(e,t.getColDef().editable)}stop(e,t){const o=this.model.getEditPositions(),i={all:[],pass:[],fail:[]};if(o.forEach(n=>{var l;i.all.push(n);const r=this.model.getCellValidationModel().getCellValidation(n);if((((l=r==null?void 0:r.errorMessages)==null?void 0:l.length)??0)>0){i.fail.push(n);return}i.pass.push(n)}),e)return o.forEach(n=>{Xo(this.beans,n),this.model.stop(n)}),!0;const s=this.processValidationResults(i);return s.destroy.length>0&&s.destroy.forEach(n=>{Xo(this.beans,n,{event:t}),this.model.stop(n)}),s.keep.length>0&&s.keep.forEach(n=>{var l;const r=q(this.beans,n);(l=this.editSvc)!=null&&l.cellEditingInvalidCommitBlocks()||r&&this.editSvc.revertSingleCellEdit(r)}),!0}cleanupEditors({rowNode:e}={},t){st(this.beans,!1);const o=this.model.getEditPositions(),i=[];e?o.forEach(s=>{!e||s.rowNode===e||i.push(s)}):o.forEach(s=>{i.push(s)}),Dt(this.beans,i),ps(this.beans,t)}setFocusOutOnEditor(e){var t,o,i;(i=(o=(t=e.comp)==null?void 0:t.getCellEditor())==null?void 0:o.focusOut)==null||i.call(o)}setFocusInOnEditor(e){const t=e.comp,o=t==null?void 0:t.getCellEditor();if(o!=null&&o.focusIn)o.focusIn();else{const i=this.beans.gos.get("editType")==="fullRow";e.focusCell(i),e.onEditorAttachedFuncs.push(()=>{var s,n;return(n=(s=t==null?void 0:t.getCellEditor())==null?void 0:s.focusIn)==null?void 0:n.call(s)})}}setupEditors(e=this.model.getEditPositions(),t,o,i,s=!1){const n=i instanceof KeyboardEvent&&!s&&i.key||void 0;nh(this.beans,e,t,n,i,o)}dispatchCellEvent(e,t,o,i){const s=q(this.beans,e);s&&this.eventSvc.dispatchEvent({...s.createEvent(t??null,o),...i})}dispatchRowEvent(e,t){const o=hs(this.beans,e);o&&this.eventSvc.dispatchEvent(o.createRowEvent(t))}shouldStart({column:e},t,o,i="ui"){var a;if(t instanceof KeyboardEvent&&(t.key===y.TAB||t.key===y.ENTER||t.key===y.F2||t.key===y.BACKSPACE&&o))return!0;if((t==null?void 0:t.shiftKey)&&((a=this.beans.rangeSvc)==null?void 0:a.getCellRanges().length)!=0)return!1;const n=e==null?void 0:e.getColDef(),r=this.deriveClickCount(n),l=t==null?void 0:t.type;return l==="click"&&(t==null?void 0:t.detail)===1&&r===1||l==="dblclick"&&(t==null?void 0:t.detail)===2&&r===2?!0:i==="api"?o??!1:!1}shouldStop(e,t,o="ui"){const i=this.editSvc.isBatchEditing();return i&&o==="api"?!0:i&&o==="ui"?!1:o==="api"?!0:t instanceof KeyboardEvent&&!i?t.key===y.ENTER:null}shouldCancel(e,t,o="ui"){const i=this.editSvc.isBatchEditing();return!!(t instanceof KeyboardEvent&&!i&&t.key===y.ESCAPE||i&&o==="api"||o==="api")}setEditMap(e,t){var i;t!=null&&t.update||this.editSvc.stopEditing(void 0,{cancel:!0,source:"api"});const o=[];if(e.forEach((s,n)=>{s.forEach((r,l)=>{r.state==="editing"&&o.push({...r,rowNode:n,column:l})})}),t!=null&&t.update&&(e=new Map([...this.model.getEditMap(),...e])),(i=this.model)==null||i.setEditMap(e),o.length>0){const s=o.at(-1),n=s.pendingValue===pe?void 0:s.pendingValue;this.start(s,new KeyboardEvent("keydown",{key:n}),"api");const r=q(this.beans,s);r&&this.setFocusInOnEditor(r)}}deriveClickCount(e){const{gos:t}=this.beans;return t.get("suppressClickEdit")===!0?0:t.get("singleClickEdit")===!0||e!=null&&e.singleClickEdit?1:2}destroy(){this.cleanupEditors(),super.destroy()}},jb=class extends ka{constructor(){super(...arguments),this.beanName="fullRow",this.startedRows=[]}isCellEditable(e,t="ui"){const o=super.isCellEditable(e,t);return o===!0||t==="ui"?o:this.beans.colModel.getCols().some(s=>super.isCellEditable({rowNode:e.rowNode,column:s},t))}shouldStop(e,t,o="ui"){const{rowNode:i}=e||{};if(!hs(this.beans,{rowNode:this.rowNode}))return!0;const n=super.shouldStop({rowNode:this.rowNode},t,o);return n!==null?n:this.rowNode?i!==this.rowNode:!1}midBatchInputsAllowed({rowNode:e}){return e?this.model.hasEdits({rowNode:e}):!1}clearEdits(e){this.model.clearEditValue(e)}start(e,t,o="ui",i){const{rowNode:s}=e;this.rowNode!==s&&super.cleanupEditors(e),this.dispatchRowEvent({rowNode:s},"rowEditingStarted"),this.startedRows.push(s);const n=this.beans.visibleCols.allCols,r=[];n.forEach(l=>{if(!l.isCellEditable(s))return;const a={rowNode:s,column:l};r.push(a),this.model.hasEdits(a)||this.model.start(a)}),this.rowNode=s,this.setupEditors(r,e,!0,t,i)}processValidationResults(e){return e.fail.length>0&&this.editSvc.cellEditingInvalidCommitBlocks()?{destroy:[],keep:e.all}:{destroy:e.all,keep:[]}}stop(e,t){var s;const{rowNode:o}=this;if(o&&!this.model.hasRowEdits(o))return!1;const i=[];return e||this.model.getEditMap().forEach((n,r)=>{if(!(!n||n.size===0)){for(const l of n.values())if(ze(l)){i.push(r);break}}}),nt(this.beans),!e&&((s=this.editSvc)==null?void 0:s.checkNavWithValidation({rowNode:o}))==="block-stop"?!1:(super.stop(e,t),i.forEach(n=>this.dispatchRowEvent({rowNode:n},"rowValueChanged")),this.cleanupEditors({rowNode:o},!0),this.rowNode=void 0,!0)}onCellFocusChanged(e){const{rowIndex:t}=e,o=e.previousParams;if((o==null?void 0:o.rowIndex)===t||e.sourceEvent instanceof KeyboardEvent)return;const i=q(this.beans,o);this.gos.get("invalidEditValueMode")==="block"&&i&&(this.model.getCellValidationModel().getCellValidation(i)||this.model.getRowValidationModel().getRowValidation(i))||super.onCellFocusChanged(e)}cleanupEditors(e={},t){super.cleanupEditors(e,t),this.startedRows.forEach(o=>this.dispatchRowEvent({rowNode:o},"rowEditingStopped")),this.startedRows.length=0}moveToNextEditingCell(e,t,o,i="ui",s=!1){var h,g,p;const n=e.cellPosition;let r;this.model.suspend(!0);try{r=(h=this.beans.navigation)==null?void 0:h.findNextCellToFocusOn(n,{backwards:t,startEditing:!0,skipToNextEditableCell:!1})}finally{this.model.suspend(!1)}if(r===!1)return null;if(r==null)return!1;const l=r.cellPosition,a=e.isCellEditable(),d=r.isCellEditable(),c=l&&n.rowIndex===l.rowIndex&&n.rowPinned===l.rowPinned;a&&this.setFocusOutOnEditor(e),this.restoreEditors();const u=this.gos.get("suppressStartEditOnTab");return d&&!s?u?r.focusCell(!0,o):((g=r.comp)!=null&&g.getCellEditor()||xt(this.beans,r,{event:o,cellStartedEdit:!0}),this.setFocusInOnEditor(r),r.focusCell(!1,o)):(d&&s&&this.setFocusInOnEditor(r),r.focusCell(!0,o)),!c&&!s&&(this.cleanupEditors(r,!0),u?r.focusCell(!0,o):this.editSvc.startEditing(r,{startedEdit:!0,event:o,source:i,ignoreEventKey:!0})),(p=e.rowCtrl)==null||p.refreshRow({suppressFlash:!0,force:!0}),!0}restoreEditors(){this.model.getEditMap().forEach((e,t)=>e.forEach(({state:o},i)=>{var n;if(o!=="editing")return;const s=q(this.beans,{rowNode:t,column:i});s&&!((n=s.comp)!=null&&n.getCellEditor())&&xt(this.beans,s,{silent:!0})}))}destroy(){super.destroy(),this.rowNode=void 0,this.startedRows.length=0}},qb=class extends ka{constructor(){super(...arguments),this.beanName="singleCell"}shouldStop(e,t,o="ui"){const i=super.shouldStop(e,t,o);if(i!==null)return i;const{rowNode:s,column:n}=e||{};return(!this.rowNode||!this.column)&&s&&n?null:this.rowNode!==s||this.column!==n}midBatchInputsAllowed(e){return this.model.hasEdits(e)}start(e,t,o="ui",i){(this.rowNode!==e.rowNode||this.column!==e.column)&&super.cleanupEditors(),this.rowNode=e.rowNode,this.column=e.column,this.model.start(e),this.setupEditors([e],e,!0,t,i)}dispatchRowEvent(e,t){}processValidationResults(e){return e.fail.length>0&&this.editSvc.cellEditingInvalidCommitBlocks()?{destroy:[],keep:e.all}:{destroy:e.all,keep:[]}}stop(e,t){return super.stop(e,t),this.rowNode=void 0,this.column=void 0,!0}onCellFocusChanged(e){const{colModel:t,editSvc:o}=this.beans,{rowIndex:i,column:s,rowPinned:n}=e,r=it(this.beans,{rowIndex:i,rowPinned:n}),l=gs(s),a=t.getCol(l),d=e.previousParams;if(d){const c=gs(d.column);if((d==null?void 0:d.rowIndex)===i&&c===l&&(d==null?void 0:d.rowPinned)===n)return}o!=null&&o.isEditing({rowNode:r,column:a},{withOpenEditor:!0})&&e.type==="cellFocused"||super.onCellFocusChanged(e)}moveToNextEditingCell(e,t,o,i="ui",s=!1){var g,p,f,C,m;const n=e.cellPosition;let r;const l=this.beans.gos.get("editType")==="fullRow";l&&this.model.suspend(!0),s||(e.eGui.focus(),(p=this.editSvc)==null||p.stopEditing(e,{source:(g=this.editSvc)!=null&&g.isBatchEditing()?"ui":"api",event:o}));try{r=(f=this.beans.navigation)==null?void 0:f.findNextCellToFocusOn(n,{backwards:t,startEditing:!0})}finally{l&&this.model.suspend(!1)}if(r===!1)return null;if(r==null)return!1;const a=r.cellPosition,d=e.isCellEditable(),c=r.isCellEditable(),u=a&&n.rowIndex===a.rowIndex&&n.rowPinned===a.rowPinned;d&&!s&&this.setFocusOutOnEditor(e);const h=this.gos.get("suppressStartEditOnTab");return!u&&!s&&(super.cleanupEditors(r,!0),h?r.focusCell(!0,o):this.editSvc.startEditing(r,{startedEdit:!0,event:o,source:i,ignoreEventKey:!0})),c&&!s?(r.focusCell(!1,o),h?r.focusCell(!0,o):(C=r.comp)!=null&&C.getCellEditor()||(xt(this.beans,r,{event:o,cellStartedEdit:!0}),this.setFocusInOnEditor(r))):(c&&s&&this.setFocusInOnEditor(r),r.focusCell(!0,o)),(m=e.rowCtrl)==null||m.refreshRow({suppressFlash:!0,force:!0}),!0}destroy(){super.destroy(),this.rowNode=void 0,this.column=void 0}},dt={moduleName:"EditCore",version:G,beans:[Yu,Kb],apiFunctions:{getEditingCells:Ib,getCellEditorInstances:sh,startEditingCell:kb,stopEditing:Ab,isEditing:Mb,validateEdit:Lb},dynamicBeans:{singleCell:qb,fullRow:jb},dependsOn:[Ea,xa],css:[db]},Yb={moduleName:"TextEditor",version:G,userComponents:{agCellEditor:Da,agTextCellEditor:Da},dependsOn:[dt]},Zb={moduleName:"NumberEditor",version:G,userComponents:{agNumberCellEditor:{classImp:yb}},dependsOn:[dt]},Qb={moduleName:"DateEditor",version:G,userComponents:{agDateCellEditor:pb,agDateStringCellEditor:mb},dependsOn:[dt]},Xb={moduleName:"CheckboxEditor",version:G,userComponents:{agCheckboxCellEditor:ub},dependsOn:[dt]},Jb={moduleName:"SelectEditor",version:G,userComponents:{agSelectCellEditor:Eb},dependsOn:[dt]},eS={moduleName:"LargeTextEditor",version:G,userComponents:{agLargeTextCellEditor:vb},dependsOn:[dt]},tS={moduleName:"CustomEditor",version:G,dependsOn:[dt]};function oS(e){var t;(t=e.expansionSvc)==null||t.expandAll(!0)}function iS(e){var t;(t=e.expansionSvc)==null||t.expandAll(!1)}function sS(e){const t=Te(e),o=Hv(e);t?t.onRowHeightChanged():o&&o.onRowHeightChanged()}var nS={moduleName:"CsrmSsrmSharedApi",version:G,apiFunctions:{expandAll:oS,collapseAll:iS,onRowHeightChanged:sS}},rS=class extends x{constructor(){super(...arguments),this.beanName="alignedGridsSvc",this.consuming=!1}getAlignedGridApis(){let e=this.gos.get("alignedGrids")??[];const t=typeof e=="function";return typeof e=="function"&&(e=e()),e.map(i=>{var n;if(!i){U(18),t||U(20);return}if(this.isGridApi(i))return i;const s=i;return"current"in s?(n=s.current)==null?void 0:n.api:(s.api||U(19),s.api)}).filter(i=>!!i&&!i.isDestroyed())}isGridApi(e){return!!e&&!!e.dispatchEvent}postConstruct(){const e=this.fireColumnEvent.bind(this);this.addManagedEventListeners({columnMoved:e,columnVisible:e,columnPinned:e,columnGroupOpened:e,columnResized:e,bodyScroll:this.fireScrollEvent.bind(this),alignedGridColumn:({event:t})=>this.onColumnEvent(t),alignedGridScroll:({event:t})=>this.onScrollEvent(t)})}fireEvent(e){this.consuming||this.getAlignedGridApis().forEach(t=>{t.isDestroyed()||t.dispatchEvent(e)})}onEvent(e){this.consuming=!0,e(),this.consuming=!1}fireColumnEvent(e){this.fireEvent({type:"alignedGridColumn",event:e})}fireScrollEvent(e){e.direction==="horizontal"&&this.fireEvent({type:"alignedGridScroll",event:e})}onScrollEvent(e){this.onEvent(()=>{this.beans.ctrlsSvc.getScrollFeature().setHorizontalScrollPosition(e.left,!0)})}extractDataFromEvent(e,t){const o=[];return e.columns?e.columns.forEach(i=>{o.push(t(i))}):e.column&&o.push(t(e.column)),o}getMasterColumns(e){return this.extractDataFromEvent(e,t=>t)}getColumnIds(e){return this.extractDataFromEvent(e,t=>t.getColId())}onColumnEvent(e){this.onEvent(()=>{switch(e.type){case"columnMoved":case"columnVisible":case"columnPinned":case"columnResized":{this.processColumnEvent(e);break}case"columnGroupOpened":{this.processGroupOpenedEvent(e);break}case"columnPivotChanged":k(21);break}})}processGroupOpenedEvent(e){const{colGroupSvc:t}=this.beans;t&&e.columnGroups.forEach(o=>{let i=null;o&&(i=t.getProvidedColGroup(o.getGroupId())),!(o&&!i)&&t.setColumnGroupOpened(i,o.isExpanded(),"alignedGridChanged")})}processColumnEvent(e){var c;const t=e.column;let o=null;const i=this.beans,{colResize:s,ctrlsSvc:n,colModel:r}=i;if(t&&(o=r.getColDefCol(t.getColId())),t&&!o)return;const l=this.getMasterColumns(e);switch(e.type){case"columnMoved":{const h=e.api.getColumnState().map(g=>({colId:g.colId}));ve(i,{state:h,applyOrder:!0},"alignedGridChanged")}break;case"columnVisible":{const h=e.api.getColumnState().map(g=>({colId:g.colId,hide:g.hide}));ve(i,{state:h},"alignedGridChanged")}break;case"columnPinned":{const h=e.api.getColumnState().map(g=>({colId:g.colId,pinned:g.pinned}));ve(i,{state:h},"alignedGridChanged")}break;case"columnResized":{const u=e,h={};l.forEach(g=>{h[g.getId()]={key:g.getColId(),newWidth:g.getActualWidth()}}),(c=u.flexColumns)==null||c.forEach(g=>{h[g.getId()]&&delete h[g.getId()]}),s==null||s.setColumnWidths(Object.values(h),!1,u.finished,"alignedGridChanged");break}}const d=n.getGridBodyCtrl().isVerticalScrollShowing();this.getAlignedGridApis().forEach(u=>{u.setGridOption("alwaysShowVerticalScroll",d)})}},lS={moduleName:"AlignedGrids",version:G,beans:[rS],dependsOn:[_l]},aS="↑",dS="↓",cS={tag:"span",children:[{tag:"span",ref:"eDelta",cls:"ag-value-change-delta"},{tag:"span",ref:"eValue",cls:"ag-value-change-value"}]},uS=class extends j{constructor(){super(cS),this.eValue=A,this.eDelta=A,this.refreshCount=0}init(e){this.refresh(e,!0)}showDelta(e,t){const o=Math.abs(t),i=e.formatValue(o),s=M(i)?i:o,n=t>=0,r=this.eDelta;n?r.textContent=aS+s:r.textContent=dS+s,r.classList.toggle("ag-value-change-delta-up",n),r.classList.toggle("ag-value-change-delta-down",!n)}setTimerToRemoveDelta(){this.refreshCount++;const e=this.refreshCount;this.beans.frameworkOverrides.wrapIncoming(()=>{window.setTimeout(()=>{e===this.refreshCount&&this.hideDeltaValue()},2e3)})}hideDeltaValue(){this.eValue.classList.remove("ag-value-change-value-highlight"),he(this.eDelta)}refresh(e,t=!1){var d;const{value:o,valueFormatted:i}=e,{eValue:s,lastValue:n,beans:r}=this;if(o===n||(M(i)?s.textContent=i:M(o)?s.textContent=o:he(s),(d=r.filterManager)!=null&&d.isSuppressFlashingCellsBecauseFiltering()))return!1;const l=o&&typeof o=="object"&&"toNumber"in o?o.toNumber():o,a=n&&typeof n=="object"&&"toNumber"in n?n.toNumber():n;if(l===a)return!1;if(typeof l=="number"&&typeof a=="number"){const c=l-a;this.showDelta(e,c)}return n&&s.classList.add("ag-value-change-value-highlight"),t||this.setTimerToRemoveDelta(),this.lastValue=o,!0}},hS=".ag-value-slide-out{opacity:1}:where(.ag-ltr) .ag-value-slide-out{margin-right:5px;transition:opacity 3s,margin-right 3s}:where(.ag-rtl) .ag-value-slide-out{margin-left:5px;transition:opacity 3s,margin-left 3s}:where(.ag-ltr,.ag-rtl) .ag-value-slide-out{transition-timing-function:linear}.ag-value-slide-out-end{opacity:0}:where(.ag-ltr) .ag-value-slide-out-end{margin-right:10px}:where(.ag-rtl) .ag-value-slide-out-end{margin-left:10px}",gS={tag:"span",children:[{tag:"span",ref:"eCurrent",cls:"ag-value-slide-current"}]},pS=class extends j{constructor(){super(gS),this.eCurrent=A,this.refreshCount=0,this.registerCSS(hS)}init(e){this.refresh(e,!0)}addSlideAnimation(){this.refreshCount++;const e=this.refreshCount;this.ePrevious&&this.getGui().removeChild(this.ePrevious);const{beans:t,eCurrent:o}=this,i=X({tag:"span",cls:"ag-value-slide-previous ag-value-slide-out"});this.ePrevious=i,i.textContent=o.textContent,this.getGui().insertBefore(i,o),t.frameworkOverrides.wrapIncoming(()=>{window.setTimeout(()=>{e===this.refreshCount&&this.ePrevious.classList.add("ag-value-slide-out-end")},50),window.setTimeout(()=>{e===this.refreshCount&&(this.getGui().removeChild(this.ePrevious),this.ePrevious=null)},3e3)})}refresh(e,t=!1){var s;let o=e.value;if(K(o)&&(o=""),o===this.lastValue||(s=this.beans.filterManager)!=null&&s.isSuppressFlashingCellsBecauseFiltering())return!1;t||this.addSlideAnimation(),this.lastValue=o;const i=this.eCurrent;return M(e.valueFormatted)?i.textContent=e.valueFormatted:M(e.value)?i.textContent=o:he(i),!0}},fS=class extends x{constructor(){super(...arguments),this.beanName="cellFlashSvc",this.nextAnimationTime=null,this.nextAnimationCycle=null,this.animations={highlight:new Map,"data-changed":new Map}}animateCell(e,t,o=this.beans.gos.get("cellFlashDuration"),i=this.beans.gos.get("cellFadeDuration")){const s=this.animations[t];s.delete(e);const n=Date.now(),r=n+o,l=n+o+i,a={phase:"flash",flashEndTime:r,fadeEndTime:l};s.set(e,a);const d=`ag-cell-${t}`,c=`${d}-animation`,{comp:u,eGui:{style:h}}=e;u.toggleCss(d,!0),u.toggleCss(c,!1),h.removeProperty("transition"),h.removeProperty("transition-delay"),this.nextAnimationTime&&r+15<this.nextAnimationTime&&(clearTimeout(this.nextAnimationCycle),this.nextAnimationCycle=null,this.nextAnimationTime=null),this.nextAnimationCycle||(this.beans.frameworkOverrides.wrapIncoming(()=>{this.nextAnimationCycle=setTimeout(this.advanceAnimations.bind(this),o)}),this.nextAnimationTime=r)}advanceAnimations(){const e=Date.now();let t=null;for(const o of Object.keys(this.animations)){const i=this.animations[o],s=`ag-cell-${o}`,n=`${s}-animation`;for(const[r,l]of i){if(!r.isAlive()||!r.comp){i.delete(r);continue}const{phase:a,flashEndTime:d,fadeEndTime:c}=l,u=a==="flash"?d:c;if(!(e+15>=u)){t=Math.min(u,t??1/0);continue}const{comp:g,eGui:{style:p}}=r;switch(a){case"flash":g.toggleCss(s,!1),g.toggleCss(n,!0),p.transition=`background-color ${c-d}ms`,p.transitionDelay=`${d-e}ms`,t=Math.min(c,t??1/0),l.phase="fade";break;case"fade":g.toggleCss(s,!1),g.toggleCss(n,!1),p.removeProperty("transition"),p.removeProperty("transition-delay"),i.delete(r);break}}}t==null?(this.nextAnimationTime=null,this.nextAnimationCycle=null):t&&(this.nextAnimationCycle=setTimeout(this.advanceAnimations.bind(this),t-e),this.nextAnimationTime=t)}onFlashCells(e,t){if(!e.comp)return;const o=Zu(e.cellPosition);t.cells[o]&&this.animateCell(e,"highlight")}flashCell(e,t){this.animateCell(e,"data-changed",t==null?void 0:t.flashDuration,t==null?void 0:t.fadeDuration)}destroy(){for(const e of Object.keys(this.animations))this.animations[e].clear()}};function CS(e,t={}){const{cellFlashSvc:o}=e;o&&e.frameworkOverrides.wrapIncoming(()=>{e.rowRenderer.getCellCtrls(t.rowNodes,t.columns).forEach(i=>o.flashCell(i,t))})}var mS={moduleName:"HighlightChanges",version:G,beans:[fS],userComponents:{agAnimateShowChangeCellRenderer:uS,agAnimateSlideCellRenderer:pS},apiFunctions:{flashCells:CS}};function wS(e){var t;return((t=e.stateSvc)==null?void 0:t.getState())??{}}function vS(e,t,o){var i;return(i=e.stateSvc)==null?void 0:i.setState(t,o)}function La(e){switch(e={...e},e.version||(e.version="32.1.0"),e.version){case"32.1.0":e=bS(e)}return e.version=G,e}function bS(e){return e.cellSelection=SS(e,"rangeSelection"),e}function SS(e,t){if(e&&typeof e=="object")return e[t]}var yS=class extends x{constructor(){super(...arguments),this.beanName="stateSvc",this.updateRowGroupExpansionStateTimer=0,this.suppressEvents=!0,this.queuedUpdateSources=new Set,this.dispatchStateUpdateEventDebounced=ge(this,()=>this.dispatchQueuedStateUpdateEvents(),0),this.onRowGroupOpenedDebounced=ge(this,()=>{this.updateCachedState("rowGroupExpansion",this.getRowGroupExpansionState())},0),this.onRowSelectedDebounced=ge(this,()=>{this.staleStateKeys.delete("rowSelection"),this.updateCachedState("rowSelection",this.getRowSelectionState())},0),this.staleStateKeys=new Set}postConstruct(){this.isClientSideRowModel=oe(this.gos);const e=La(this.gos.get("initialState")??{}),t=e.partialColumnState;delete e.partialColumnState,this.cachedState=e;const o=this.suppressEventsAndDispatchInitEvent.bind(this);this.beans.ctrlsSvc.whenReady(this,()=>o(()=>this.setupStateOnGridReady(e)));const[i,s,n]=this.addManagedEventListeners({newColumnsLoaded:({source:r})=>{r==="gridInitializing"&&(i(),o(()=>this.setupStateOnColumnsInitialised(e,!!t)))},rowCountReady:()=>{s==null||s(),o(()=>this.setupStateOnRowCountReady(e))},firstDataRendered:()=>{n==null||n(),o(()=>this.setupStateOnFirstDataRendered(e))}})}destroy(){super.destroy(),clearTimeout(this.updateRowGroupExpansionStateTimer),this.queuedUpdateSources.clear()}getState(){return this.staleStateKeys.size&&this.refreshStaleState(),this.cachedState}setState(e,t){const o=La(e);delete o.partialColumnState,this.cachedState=o,this.startSuppressEvents();const i="api",s=t?new Set(t):void 0;this.setGridReadyState(o,i,s),this.setColumnsInitialisedState(o,i,!1,s),this.setRowCountState(o,i,s),setTimeout(()=>{this.isAlive()&&this.setFirstDataRenderedState(o,i,s),this.stopSuppressEvents(i)})}setGridReadyState(e,t,o){var i,s;t==="api"&&!(o!=null&&o.has("sideBar"))&&((s=(i=this.beans.sideBar)==null?void 0:i.comp)==null||s.setState(e.sideBar)),this.updateCachedState("sideBar",this.getSideBarState())}setupStateOnGridReady(e){this.setGridReadyState(e,"gridInitializing");const t=()=>this.updateCachedState("sideBar",this.getSideBarState());this.addManagedEventListeners({toolPanelVisibleChanged:t,sideBarUpdated:t})}updateColumnAndGroupState(){this.updateColumnState(["aggregation","columnOrder","columnPinning","columnSizing","columnVisibility","pivot","rowGroup","sort"]),this.updateCachedState("columnGroup",this.getColumnGroupState())}setColumnsInitialisedState(e,t,o,i){this.setColumnState(e,t,o,i),this.setColumnGroupState(e,t,i),this.updateColumnAndGroupState()}setupStateOnColumnsInitialised(e,t){this.setColumnsInitialisedState(e,"gridInitializing",t);const o=i=>()=>this.updateColumnState([i]);this.addManagedEventListeners({columnValueChanged:o("aggregation"),columnMoved:o("columnOrder"),columnPinned:o("columnPinning"),columnResized:o("columnSizing"),columnVisible:o("columnVisibility"),columnPivotChanged:o("pivot"),columnPivotModeChanged:o("pivot"),columnRowGroupChanged:o("rowGroup"),sortChanged:o("sort"),newColumnsLoaded:this.updateColumnAndGroupState.bind(this),columnGroupOpened:()=>this.updateCachedState("columnGroup",this.getColumnGroupState())})}setRowCountState(e,t,o){const{filter:i,rowGroupExpansion:s,rowSelection:n,pagination:r}=e,l=(d,c)=>!(o!=null&&o.has(d))&&(c||t==="api");l("filter",i)&&this.setFilterState(i),l("rowGroupExpansion",s)&&this.setRowGroupExpansionState(s,t),l("rowSelection",n)&&this.setRowSelectionState(n,t),l("pagination",r)&&this.setPaginationState(r,t);const a=this.updateCachedState.bind(this);a("filter",this.getFilterState()),a("rowGroupExpansion",this.getRowGroupExpansionState()),a("rowSelection",this.getRowSelectionState()),a("pagination",this.getPaginationState())}setupStateOnRowCountReady(e){this.setRowCountState(e,"gridInitializing");const t=this.updateCachedState.bind(this),o=()=>{this.updateRowGroupExpansionStateTimer=0,t("rowGroupExpansion",this.getRowGroupExpansionState())},i=()=>t("filter",this.getFilterState()),{gos:s,colFilter:n}=this.beans;this.addManagedEventListeners({filterChanged:i,rowGroupOpened:()=>this.onRowGroupOpenedDebounced(),expandOrCollapseAll:o,columnRowGroupChanged:o,rowDataUpdated:()=>{(s.get("groupDefaultExpanded")!==0||s.get("isGroupOpenByDefault"))&&(this.updateRowGroupExpansionStateTimer||(this.updateRowGroupExpansionStateTimer=setTimeout(o)))},selectionChanged:()=>{this.staleStateKeys.add("rowSelection"),this.onRowSelectedDebounced()},paginationChanged:r=>{(r.newPage||r.newPageSize)&&t("pagination",this.getPaginationState())}}),n&&this.addManagedListeners(n,{filterStateChanged:i})}setFirstDataRenderedState(e,t,o){const{scroll:i,cellSelection:s,focusedCell:n,columnOrder:r,rowPinning:l}=e,a=(u,h)=>!(o!=null&&o.has(u))&&(h||t==="api");a("focusedCell",n)&&this.setFocusedCellState(n),a("cellSelection",s)&&this.setCellSelectionState(s),a("scroll",i)&&this.setScrollState(i),a("rowPinning",l)&&this.setRowPinningState(l),this.setColumnPivotState(!!(r!=null&&r.orderedColIds),t);const d=this.updateCachedState.bind(this);d("sideBar",this.getSideBarState()),d("focusedCell",this.getFocusedCellState());const c=this.getRangeSelectionState();d("rangeSelection",c),d("cellSelection",c),d("scroll",this.getScrollState())}setupStateOnFirstDataRendered(e){this.setFirstDataRenderedState(e,"gridInitializing");const t=this.updateCachedState.bind(this);this.addManagedEventListeners({cellFocused:()=>t("focusedCell",this.getFocusedCellState()),cellSelectionChanged:o=>{if(o.finished){const i=this.getRangeSelectionState();t("rangeSelection",i),t("cellSelection",i)}},bodyScrollEnd:()=>t("scroll",this.getScrollState()),pinnedRowsChanged:()=>t("rowPinning",this.getRowPinningState())})}getColumnState(){const e=this.beans;return Bv(Uo(e),e.colModel.isPivotMode())}setColumnState(e,t,o,i){const{sort:s,rowGroup:n,aggregation:r,pivot:l,columnPinning:a,columnVisibility:d,columnSizing:c,columnOrder:u}=e,h=(P,T)=>!(i!=null&&i.has(P))&&(T||t==="api"),g={},p=P=>{let T=g[P];return T||(T={colId:P},g[P]=T,T)},f={},C=h("sort",s);C&&(s==null||s.sortModel.forEach(({colId:P,sort:T},V)=>{const B=p(P);B.sort=T,B.sortIndex=V})),(C||!o)&&(f.sort=null,f.sortIndex=null);const m=h("rowGroup",n);m&&(n==null||n.groupColIds.forEach((P,T)=>{const V=p(P);V.rowGroup=!0,V.rowGroupIndex=T})),(m||!o)&&(f.rowGroup=null,f.rowGroupIndex=null);const w=h("aggregation",r);w&&(r==null||r.aggregationModel.forEach(({colId:P,aggFunc:T})=>{p(P).aggFunc=T})),(w||!o)&&(f.aggFunc=null);const b=h("pivot",l);b&&(l==null||l.pivotColIds.forEach((P,T)=>{const V=p(P);V.pivot=!0,V.pivotIndex=T}),this.gos.updateGridOptions({options:{pivotMode:!!(l!=null&&l.pivotMode)},source:t})),(b||!o)&&(f.pivot=null,f.pivotIndex=null);const v=h("columnPinning",a);v&&(a==null||a.leftColIds.forEach(P=>{p(P).pinned="left"}),a==null||a.rightColIds.forEach(P=>{p(P).pinned="right"})),(v||!o)&&(f.pinned=null);const S=h("columnVisibility",d);S&&(d==null||d.hiddenColIds.forEach(P=>{p(P).hide=!0})),(S||!o)&&(f.hide=null);const D=h("columnSizing",c);D&&(c==null||c.columnSizingModel.forEach(({colId:P,flex:T,width:V})=>{const B=p(P);B.flex=T??null,B.width=V})),(D||!o)&&(f.flex=null);const I=u==null?void 0:u.orderedColIds,O=!!(I!=null&&I.length)&&!(i!=null&&i.has("columnOrder")),F=O?I.map(P=>p(P)):Object.values(g);F.length&&(this.columnStates=F,ve(this.beans,{state:F,applyOrder:O,defaultState:f},t))}setColumnPivotState(e,t){const o=this.columnStates;this.columnStates=void 0;const i=this.columnGroupStates;this.columnGroupStates=void 0;const s=this.beans,{pivotResultCols:n,colGroupSvc:r}=s;if(n!=null&&n.isPivotResultColsPresent()){if(o){const l=[];for(const a of o)n.getPivotResultCol(a.colId)&&l.push(a);ve(s,{state:l,applyOrder:e},t)}i&&(r==null||r.setColumnGroupState(i,t))}}getColumnGroupState(){const e=this.beans.colGroupSvc;if(!e)return;const t=e.getColumnGroupState();return Vv(t)}setColumnGroupState(e,t,o){var l;const i=this.beans.colGroupSvc;if(!i||o!=null&&o.has("columnGroup")||t!=="api"&&!Object.prototype.hasOwnProperty.call(e,"columnGroup"))return;const s=new Set((l=e.columnGroup)==null?void 0:l.openColumnGroupIds),r=i.getColumnGroupState().map(({groupId:a})=>{const d=s.has(a);return d&&s.delete(a),{groupId:a,open:d}});s.forEach(a=>{r.push({groupId:a,open:!0})}),r.length&&(this.columnGroupStates=r),i.setColumnGroupState(r,t)}getFilterState(){const e=this.beans.filterManager;let t=e==null?void 0:e.getFilterModel();t&&Object.keys(t).length===0&&(t=void 0);const o=e==null?void 0:e.getFilterState(),i=(e==null?void 0:e.getAdvFilterModel())??void 0;return t||i||o?{filterModel:t,columnFilterState:o,advancedFilterModel:i}:void 0}setFilterState(e){const t=this.beans.filterManager,{filterModel:o,columnFilterState:i,advancedFilterModel:s}=e??{filterModel:null,columnFilterState:null,advancedFilterModel:null};(o!==void 0||i!==void 0)&&(t==null||t.setFilterState(o??null,i??null,"columnFilter")),s!==void 0&&(t==null||t.setAdvFilterModel(s??null,"advancedFilter"))}getRangeSelectionState(){var t;const e=(t=this.beans.rangeSvc)==null?void 0:t.getCellRanges().map(o=>{const{id:i,type:s,startRow:n,endRow:r,columns:l,startColumn:a}=o;return{id:i,type:s,startRow:n,endRow:r,colIds:l.map(d=>d.getColId()),startColId:a.getColId()}});return e!=null&&e.length?{cellRanges:e}:void 0}setCellSelectionState(e){const{gos:t,rangeSvc:o,colModel:i,visibleCols:s}=this.beans;if(!Je(t)||!o)return;const n=[];e==null||e.cellRanges.forEach(r=>{const l=[];if(r.colIds.forEach(d=>{const c=i.getCol(d);c&&l.push(c)}),!l.length)return;let a=i.getCol(r.startColId);if(!a){const d=s.allCols,c=new Set(l);a=d.find(u=>c.has(u))}n.push({...r,columns:l,startColumn:a})}),o.setCellRanges(n)}getScrollState(){if(!this.isClientSideRowModel)return;const e=this.beans.ctrlsSvc.getScrollFeature(),{left:t}=(e==null?void 0:e.getHScrollPosition())??{left:0},{top:o}=(e==null?void 0:e.getVScrollPosition())??{top:0};return o||t?{top:o,left:t}:void 0}setScrollState(e){if(!this.isClientSideRowModel)return;const{top:t,left:o}=e??{top:0,left:0},{frameworkOverrides:i,rowRenderer:s,animationFrameSvc:n,ctrlsSvc:r}=this.beans;i.wrapIncoming(()=>{var l;r.get("center").setCenterViewportScrollLeft(o),(l=r.getScrollFeature())==null||l.setVerticalScrollPosition(t),s.redraw({afterScroll:!0}),n==null||n.flushAllFrames()})}getSideBarState(){var e,t;return(t=(e=this.beans.sideBar)==null?void 0:e.comp)==null?void 0:t.getState()}getFocusedCellState(){if(!this.isClientSideRowModel)return;const e=this.beans.focusSvc.getFocusedCell();if(e){const{column:t,rowIndex:o,rowPinned:i}=e;return{colId:t.getColId(),rowIndex:o,rowPinned:i}}}setFocusedCellState(e){if(!this.isClientSideRowModel)return;const{focusSvc:t,colModel:o}=this.beans;if(!e){t.clearFocusedCell();return}const{colId:i,rowIndex:s,rowPinned:n}=e;t.setFocusedCell({column:o.getCol(i),rowIndex:s,rowPinned:n,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0})}getPaginationState(){const{pagination:e,gos:t}=this.beans;if(!e)return;const o=e.getCurrentPage(),i=t.get("paginationAutoPageSize")?void 0:e.getPageSize();if(!(!o&&!i))return{page:o,pageSize:i}}setPaginationState(e,t){const{pagination:o,gos:i}=this.beans;if(!o)return;const{pageSize:s,page:n}=e??{page:0,pageSize:i.get("paginationPageSize")},r=t==="gridInitializing";s&&!i.get("paginationAutoPageSize")&&o.setPageSize(s,r?"initialState":"pageSizeSelector"),typeof n=="number"&&(r?o.setPage(n):o.goToPage(n))}getRowSelectionState(){var i;const e=this.beans.selectionSvc;if(!e)return;const t=e.getSelectionState();return!t||!Array.isArray(t)&&(t.selectAll===!1||t.selectAllChildren===!1)&&!((i=t==null?void 0:t.toggledNodes)!=null&&i.length)?void 0:t}setRowSelectionState(e,t){var o;(o=this.beans.selectionSvc)==null||o.setSelectionState(e,t,t==="api")}getRowGroupExpansionState(){const{expansionSvc:e,rowModel:t}=this.beans;if(!e)return;const o=[];return t.forEachNode(({expanded:i,id:s})=>{i&&s&&o.push(s)}),o.length?{expandedRowGroupIds:o}:void 0}getRowPinningState(){var e;return(e=this.beans.pinnedRowModel)==null?void 0:e.getPinnedState()}setRowPinningState(e){const t=this.beans.pinnedRowModel;e?t==null||t.setPinnedState(e):t==null||t.reset()}setRowGroupExpansionState(e,t){var n;const o=this.beans.expansionSvc;if(!o)return;const i=(e==null?void 0:e.expandedRowGroupIds)??[];let s;if(t==="api"){const r=(n=this.getRowGroupExpansionState())==null?void 0:n.expandedRowGroupIds;if(r!=null&&r.length){const l=new Set(r);for(const a of i)l.delete(a);s=Array.from(l)}}o.expandRows(i,s)}updateColumnState(e){const t=this.getColumnState();let o=!1;const i=this.cachedState;for(const s of Object.keys(t)){const n=t[s];bn(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),bn(t,o)||this.dispatchStateUpdateEvent([e])}setCachedStateValue(e,t){this.cachedState={...this.cachedState,[e]:t}}refreshStaleState(){const e=this.staleStateKeys;e.forEach(t=>{switch(t){case"rowSelection":this.setCachedStateValue(t,this.getRowSelectionState());break}}),e.clear()}dispatchStateUpdateEvent(e){this.suppressEvents||(e.forEach(t=>this.queuedUpdateSources.add(t)),this.dispatchStateUpdateEventDebounced())}dispatchQueuedStateUpdateEvents(){const e=this.queuedUpdateSources,t=Array.from(e);e.clear(),this.eventSvc.dispatchEvent({type:"stateUpdated",sources:t,state:this.cachedState})}startSuppressEvents(){var e;this.suppressEvents=!0,(e=this.beans.colAnimation)==null||e.setSuppressAnimation(!0)}stopSuppressEvents(e){setTimeout(()=>{var t;this.suppressEvents=!1,this.queuedUpdateSources.clear(),this.isAlive()&&((t=this.beans.colAnimation)==null||t.setSuppressAnimation(!1),this.dispatchStateUpdateEvent([e]))})}suppressEventsAndDispatchInitEvent(e){this.startSuppressEvents(),e(),this.stopSuppressEvents("gridInitializing")}},RS={moduleName:"GridState",version:G,beans:[yS],apiFunctions:{getState:wS,setState:vS}};function ES(e,t={}){const o=t?t.rowNodes:void 0;e.frameworkOverrides.wrapIncoming(()=>e.rowRenderer.redrawRows(o))}function Ga(e,t,o,i,s){t&&(i&&t.parent&&t.parent.level!==-1&&Ga(e,t.parent,o,i,s),t.setExpanded(o,void 0,s))}function xS(e,t){return e.rowModel.getRowNode(t)}function DS(e,t,o,i){e.rowRenderer.addRenderedRowListener(t,o,i)}function FS(e){return e.rowRenderer.getRenderedNodes()}function PS(e,t,o){e.rowModel.forEachNode(t,o)}function TS(e){return e.rowRenderer.firstRenderedRow}function IS(e){return e.rowRenderer.lastRenderedRow}function AS(e,t){return e.rowModel.getRow(t)}function MS(e){return e.rowModel.getRowCount()}var Ha={moduleName:"RowApi",version:G,apiFunctions:{redrawRows:ES,setRowNodeExpanded:Ga,getRowNode:xS,addRenderedRowListener:DS,getRenderedNodes:FS,forEachNode:PS,getFirstDisplayedRowIndex:TS,getLastDisplayedRowIndex:IS,getDisplayedRowAtIndex:AS,getDisplayedRowCount:MS}},kS={moduleName:"ScrollApi",version:G,apiFunctions:{getVerticalPixelRange:Fb,getHorizontalPixelRange:Pb,ensureColumnVisible:Fa,ensureIndexVisible:Pa,ensureNodeVisible:Tb}};function LS(e,t,o){if(!t)return;const i=e.ctrlsSvc.getGridBodyCtrl().eGridBody,s=`aria-${t}`;o===null?i.removeAttribute(s):i.setAttribute(s,o)}function GS(e,t={}){e.frameworkOverrides.wrapIncoming(()=>e.rowRenderer.refreshCells(t))}function HS(e){e.frameworkOverrides.wrapIncoming(()=>e.ctrlsSvc.getHeaderRowContainerCtrls().forEach(t=>t.refresh()))}function OS(e){var t;return((t=e.animationFrameSvc)==null?void 0:t.isQueueEmpty())??!0}function BS(e){var t;(t=e.animationFrameSvc)==null||t.flushAllFrames()}function VS(e){return{rowHeight:is(e),headerHeight:lo(e)}}function NS(e,t={}){var n;const o=[];if(e.rowRenderer.getCellCtrls(t.rowNodes,t.columns).forEach(r=>{const l=r.getCellRenderer();l!=null&&o.push(ds(l))}),(n=t.columns)!=null&&n.length)return o;const i=[],s=nn(t.rowNodes);return e.rowRenderer.getAllRowCtrls().forEach(r=>{if(s&&!rn(r.rowNode,s)||!r.isFullWidth())return;const l=r.getFullWidthCellRenderers();for(let a=0;a<l.length;a++){const d=l[a];d!=null&&i.push(ds(d))}}),[...i,...o]}var _S={moduleName:"RenderApi",version:G,apiFunctions:{setGridAriaProperty:LS,refreshCells:GS,refreshHeader:HS,isAnimationFrameQueueEmpty:OS,flushAllAnimationFrames:BS,getSizesForCurrentTheme:VS,getCellRendererInstances:NS}};function WS(e,t){var o,i;typeof t=="number"?(o=e.colAutosize)==null||o.sizeColumnsToFit(t,"api"):(i=e.colAutosize)==null||i.sizeColumnsToFitGridBody(t)}function Oa({colAutosize:e,visibleCols:t},o,i){Array.isArray(o)?e==null||e.autoSizeCols({colKeys:o,skipHeader:i,source:"api"}):e==null||e.autoSizeCols({colKeys:o.colIds??t.allCols,skipHeader:o.skipHeader,defaultMaxWidth:o.defaultMaxWidth,defaultMinWidth:o.defaultMinWidth,columnLimits:o.columnLimits,source:"api"})}function zS(e,t){var o;t&&typeof t=="object"?Oa(e,t):(o=e.colAutosize)==null||o.autoSizeAllColumns({source:"api",skipHeader:t})}var $S=class extends x{constructor(){super(...arguments),this.beanName="colAutosize",this.timesDelayed=0,this.shouldQueueResizeOperations=!1,this.resizeOperationQueue=[]}postConstruct(){this.addManagedEventListeners({firstDataRendered:()=>this.onFirstDataRendered()})}autoSizeCols(e){if(this.shouldQueueResizeOperations){this.pushResizeOperation(()=>this.autoSizeCols(e));return}const{colKeys:t,skipHeader:o,skipHeaderGroups:i,stopAtGroup:s,defaultMaxWidth:n,defaultMinWidth:r,columnLimits:l=[],source:a="api"}=e,{animationFrameSvc:d,renderStatus:c,colModel:u,autoWidthCalc:h,visibleCols:g}=this.beans;if(d==null||d.flushAllFrames(),this.timesDelayed<5&&c&&!c.areHeaderCellsRendered()){this.timesDelayed++,setTimeout(()=>{this.isAlive()&&this.autoSizeCols(e)});return}this.timesDelayed=0;const p=[];let f=-1;const C=Object.fromEntries(l.map(({colId:b,maxWidth:v,minWidth:S})=>[b,{maxWidth:v,minWidth:S}])),m=o??this.gos.get("skipHeaderOnAutoSize"),w=i??m;for(;f!==0;){f=0;const b=[];t.forEach(v=>{if(!v||Nc(v))return;const S=u.getCol(v);if(!S||p.indexOf(S)>=0)return;const D=h.getPreferredWidthForColumn(S,m);if(D>0){const I=C[S.colId]??{};I.minWidth??(I.minWidth=r),I.maxWidth??(I.maxWidth=n);const O=US(S,D,I);S.setActualWidth(O,a),p.push(S),f++}b.push(S)}),b.length&&g.refresh(a)}w||this.autoSizeColumnGroupsByColumns(t,a,s),yt(this.eventSvc,p,!0,"autosizeColumns")}autoSizeColumn(e,t,o){e&&this.autoSizeCols({colKeys:[e],skipHeader:o,skipHeaderGroups:!0,source:t})}autoSizeColumnGroupsByColumns(e,t,o){const{colModel:i,ctrlsSvc:s}=this.beans,n=new Set;i.getColsForKeys(e).forEach(d=>{let c=d.getParent();for(;c&&c!=o;)c.isPadding()||n.add(c),c=c.getParent()});let l;const a=[];for(const d of n){for(const c of s.getHeaderRowContainerCtrls())if(l=c.getHeaderCtrlForColumn(d),l)break;l&&l.resizeLeafColumnsToFit(t)}return a}autoSizeAllColumns(e){if(this.shouldQueueResizeOperations){this.pushResizeOperation(()=>this.autoSizeAllColumns(e));return}const t=this.beans.visibleCols.allCols;this.autoSizeCols({colKeys:t,...e})}addColumnAutosize(e,t){const o=this.gos.get("skipHeaderOnAutoSize"),i=()=>{this.autoSizeColumn(t,"uiColumnResized",o)};e.addEventListener("dblclick",i);const s=new lt(e);return s.addEventListener("doubleTap",i),()=>{e.removeEventListener("dblclick",i),s.removeEventListener("doubleTap",i),s.destroy()}}addColumnGroupResize(e,t,o){const i=this.gos.get("skipHeaderOnAutoSize"),s=()=>{const n=[];t.getDisplayedLeafColumns().forEach(l=>{l.getColDef().suppressAutoSize||n.push(l.getColId())}),n.length>0&&this.autoSizeCols({colKeys:n,skipHeader:i,stopAtGroup:t,source:"uiColumnResized"}),o()};return e.addEventListener("dblclick",s),()=>e.removeEventListener("dblclick",s)}sizeColumnsToFitGridBody(e,t){if(!this.isAlive())return;const{ctrlsSvc:o,scrollVisibleSvc:i}=this.beans,s=o.getGridBodyCtrl(),r=s.isVerticalScrollShowing()?i.getScrollbarWidth():0,a=Ut(s.eGridBody)-r;if(a>0){this.sizeColumnsToFit(a,"sizeColumnsToFit",!1,e);return}t===void 0?window.setTimeout(()=>{this.sizeColumnsToFitGridBody(e,100)},0):t===100?window.setTimeout(()=>{this.sizeColumnsToFitGridBody(e,500)},100):t===500?window.setTimeout(()=>{this.sizeColumnsToFitGridBody(e,-1)},500):k(29)}sizeColumnsToFit(e,t="sizeColumnsToFit",o,i){var g;if(this.shouldQueueResizeOperations){this.pushResizeOperation(()=>this.sizeColumnsToFit(e,t,o,i));return}const s={};i&&((g=i==null?void 0:i.columnLimits)==null||g.forEach(({key:p,...f})=>{s[typeof p=="string"?p:p.getColId()]=f}));const n=this.beans.visibleCols.allCols;if(e<=0||!n.length||e===Le(n)&&n.every(f=>{if(f.colDef.suppressSizeToFit)return!0;const C=s==null?void 0:s[f.getId()],m=(C==null?void 0:C.minWidth)??(i==null?void 0:i.defaultMinWidth),w=(C==null?void 0:C.maxWidth)??(i==null?void 0:i.defaultMaxWidth),b=f.getActualWidth();return(m==null||b>=m)&&(w==null||b<=w)}))return;const l=[],a=[];n.forEach(p=>{p.getColDef().suppressSizeToFit===!0?a.push(p):l.push(p)});const d=l.slice(0);let c=!1;const u=p=>{we(l,p),a.push(p)};for(l.forEach(p=>{p.resetActualWidth(t);const f=s==null?void 0:s[p.getId()],C=(f==null?void 0:f.minWidth)??(i==null?void 0:i.defaultMinWidth),m=(f==null?void 0:f.maxWidth)??(i==null?void 0:i.defaultMaxWidth),w=p.getActualWidth();typeof C=="number"&&w<C?p.setActualWidth(C,t,!0):typeof m=="number"&&w>m&&p.setActualWidth(m,t,!0)});!c;){c=!0;const p=e-Le(a);if(p<=0)l.forEach(f=>{var m;const C=((m=s==null?void 0:s[f.getId()])==null?void 0:m.minWidth)??(i==null?void 0:i.defaultMinWidth);if(typeof C=="number"){f.setActualWidth(C,t,!0);return}f.setActualWidth(f.minWidth,t)});else{const f=p/Le(l);let C=p;for(let m=l.length-1;m>=0;m--){const w=l[m],b=s==null?void 0:s[w.getId()],v=(b==null?void 0:b.minWidth)??(i==null?void 0:i.defaultMinWidth),S=(b==null?void 0:b.maxWidth)??(i==null?void 0:i.defaultMaxWidth),D=w.getMinWidth(),I=w.getMaxWidth(),O=typeof v=="number"&&v>D?v:D,F=typeof S=="number"&&S<I?S:I;let P=Math.round(w.getActualWidth()*f);P<O?(P=O,u(w),c=!1):P>F?(P=F,u(w),c=!1):m===0&&(P=C),w.setActualWidth(P,t,!0),C-=P}}}d.forEach(p=>{p.fireColumnWidthChangedEvent(t)});const h=this.beans.visibleCols;h.setLeftValues(t),h.updateBodyWidths(),!o&&yt(this.eventSvc,d,!0,t)}applyAutosizeStrategy(){const e=this.gos.get("autoSizeStrategy");if(!e)return;const{type:t}=e;setTimeout(()=>{if(t==="fitGridWidth"){const{columnLimits:o,defaultMinWidth:i,defaultMaxWidth:s}=e,n=o==null?void 0:o.map(({colId:r,minWidth:l,maxWidth:a})=>({key:r,minWidth:l,maxWidth:a}));this.sizeColumnsToFitGridBody({defaultMinWidth:i,defaultMaxWidth:s,columnLimits:n})}else t==="fitProvidedWidth"&&this.sizeColumnsToFit(e.width,"sizeColumnsToFit")})}onFirstDataRendered(){const e=this.gos.get("autoSizeStrategy");if((e==null?void 0:e.type)!=="fitCellContents")return;const{colIds:t,skipHeader:o,defaultMaxWidth:i,defaultMinWidth:s,columnLimits:n}=e;setTimeout(()=>{const r={skipHeader:o,source:"autosizeColumns",defaultMaxWidth:i,defaultMinWidth:s,columnLimits:n};t?this.autoSizeCols({colKeys:t,...r}):this.autoSizeAllColumns(r)})}processResizeOperations(){this.shouldQueueResizeOperations=!1,this.resizeOperationQueue.forEach(e=>e()),this.resizeOperationQueue=[]}pushResizeOperation(e){this.resizeOperationQueue.push(e)}destroy(){this.resizeOperationQueue.length=0,super.destroy()}};function US(e,t,o={}){const i=o.minWidth??e.getMinWidth();t<i&&(t=i);const s=o.maxWidth??e.getMaxWidth();return t>s&&(t=s),t}var KS={moduleName:"ColumnAutoSize",version:G,beans:[$S],apiFunctions:{sizeColumnsToFit:WS,autoSizeColumns:Oa,autoSizeAllColumns:zS},dependsOn:[Ol]},jS=".ag-row-pinned-source{background-color:var(--ag-pinned-source-row-background-color);color:var(--ag-pinned-source-row-text-color);font-weight:var(--ag-pinned-source-row-font-weight)}.ag-row-pinned-manual{background-color:var(--ag-pinned-row-background-color);color:var(--ag-pinned-row-text-color);font-weight:var(--ag-pinned-row-font-weight)}";function qS(e){var t;return((t=e.pinnedRowModel)==null?void 0:t.getPinnedTopRowCount())??0}function YS(e){var t;return((t=e.pinnedRowModel)==null?void 0:t.getPinnedBottomRowCount())??0}function ZS(e,t){var o;return(o=e.pinnedRowModel)==null?void 0:o.getPinnedTopRow(t)}function QS(e,t){var o;return(o=e.pinnedRowModel)==null?void 0:o.getPinnedBottomRow(t)}function XS(e,t,o){var i;return(i=e.pinnedRowModel)==null?void 0:i.forEachPinnedRow(t,o)}var JS={moduleName:"PinnedRow",version:G,beans:[lp],css:[jS],apiFunctions:{getPinnedTopRowCount:qS,getPinnedBottomRowCount:YS,getPinnedTopRow:ZS,getPinnedBottomRow:QS,forEachPinnedRow:XS},icons:{rowPin:"pin",rowPinTop:"pinned-top",rowPinBottom:"pinned-bottom",rowUnpin:"un-pin"}},ey=class extends Pt{constructor(e,t,o){super(e.col,e.firstNode,o,t),this.cellSpan=e,this.SPANNED_CELL_CSS_CLASS="ag-spanned-cell"}setComp(e,t,o,i,s,n,r){this.eWrapper=o,super.setComp(e,t,o,i,s,n,r),this.setAriaRowSpan(),this.refreshAriaRowIndex()}isCellSpanning(){return!0}getCellSpan(){return this.cellSpan}refreshAriaRowIndex(){this.rowNode.rowIndex!=null&&xo(this.eGui,this.rowNode.rowIndex)}setAriaRowSpan(){Kd(this.eGui,this.cellSpan.spannedNodes.size)}setFocusedCellPosition(e){this.focusedCellPosition=e}getFocusedCellPosition(){return this.focusedCellPosition??this.cellPosition}checkCellFocused(){const e=this.beans.focusSvc.getFocusedCell();return!!e&&this.cellSpan.doesSpanContain(e)}applyStaticCssClasses(){super.applyStaticCssClasses(),this.comp.toggleCss(this.SPANNED_CELL_CSS_CLASS,!0)}onCellFocused(e){const{beans:t}=this;if(ii(t)){this.focusedCellPosition=void 0;return}const o=this.isCellFocused();o||(this.focusedCellPosition=void 0),e&&o&&(this.focusedCellPosition={rowIndex:e.rowIndex,rowPinned:e.rowPinned,column:e.column}),super.onCellFocused(e)}getRootElement(){return this.eWrapper}},ty=class extends ai{onRowIndexChanged(){super.onRowIndexChanged(),this.getAllCellCtrls().forEach(e=>e.refreshAriaRowIndex())}getInitialRowClasses(e){return["ag-spanned-row"]}getNewCellCtrl(e){var i;const t=(i=this.beans.rowSpanSvc)==null?void 0:i.getCellSpan(e,this.rowNode);if(!(!t||t.firstNode!==this.rowNode))return new ey(t,this,this.beans)}isCorrectCtrlForSpan(e){var i;const t=(i=this.beans.rowSpanSvc)==null?void 0:i.getCellSpan(e.column,this.rowNode);return!t||t.firstNode!==this.rowNode?!1:e.getCellSpan()===t}onRowHeightChanged(){}refreshFirstAndLastRowStyles(){}addHoverFunctionality(){}resetHoveredStatus(){}},oy=class extends x{constructor(){super(...arguments),this.beanName="spannedRowRenderer",this.topCtrls=new Map,this.bottomCtrls=new Map,this.centerCtrls=new Map}postConstruct(){this.addManagedEventListeners({displayedRowsChanged:this.createAllCtrls.bind(this)})}createAllCtrls(){this.createCtrls("top"),this.createCtrls("bottom"),this.createCtrls("center")}createCtrls(e){const{rowSpanSvc:t}=this.beans,o=`${e}Ctrls`,i=this[o],s=i.size,n=this.getAllRelevantRowControls(e),r=new Map;let l=!1;for(const d of n)d.isAlive()&&(t==null||t.forEachSpannedColumn(d.rowNode,(c,u)=>{if(r.has(u.firstNode))return;const h=i.get(u.firstNode);if(h){r.set(u.firstNode,h),i.delete(u.firstNode);return}l=!0;const g=new ty(u.firstNode,this.beans,!1,!1,!1);r.set(u.firstNode,g)}));this[o]=r;const a=r.size===s;if(!(!l&&a)){for(const d of i.values())d.destroyFirstPass(!0),d.destroySecondPass();this.dispatchLocalEvent({type:"spannedRowsUpdated",ctrlsKey:e})}}getAllRelevantRowControls(e){const{rowRenderer:t}=this.beans;switch(e){case"top":return t.topRowCtrls;case"bottom":return t.bottomRowCtrls;case"center":return t.allRowCtrls}}getCellByPosition(e){const{rowSpanSvc:t}=this.beans,o=t==null?void 0:t.getCellSpanByPosition(e);if(!o)return;const i=`${Ba(e.rowPinned)}Ctrls`,s=this[i].get(o.firstNode);if(s)return s.getAllCellCtrls().find(n=>n.column===e.column)}getCtrls(e){const t=`${e}Ctrls`;return[...this[t].values()]}destroyRowCtrls(e){const t=`${e}Ctrls`;for(const o of this[t].values())o.destroyFirstPass(!0),o.destroySecondPass();this[t]=new Map}destroy(){super.destroy(),this.destroyRowCtrls("top"),this.destroyRowCtrls("bottom"),this.destroyRowCtrls("center")}},Ba=e=>e??"center",iy=class{constructor(e,t){this.col=e,this.firstNode=t,this.cellSpan=!0,this.spannedNodes=new Set,this.addSpannedNode(t)}reset(){this.spannedNodes.clear(),this.addSpannedNode(this.firstNode)}addSpannedNode(e){this.spannedNodes.add(e),this.lastNode=e}getLastNode(){return this.lastNode}getCellHeight(){return this.lastNode.rowTop+this.lastNode.rowHeight-this.firstNode.rowTop-1}doesSpanContain(e){return e.column!==this.col||e.rowPinned!=this.firstNode.rowPinned?!1:this.firstNode.rowIndex<=e.rowIndex&&e.rowIndex<=this.lastNode.rowIndex}getLastNodeAutoHeight(){var o;const e=(o=this.firstNode.__autoHeights)==null?void 0:o[this.col.getColId()];if(e==null)return;let t=0;return this.spannedNodes.forEach(i=>{i!==this.lastNode&&(t+=i.rowHeight)}),e-t}},sy=class extends x{constructor(e){super(),this.column=e}buildCache(e){var b;const{column:t,beans:{gos:o,pinnedRowModel:i,rowModel:s,valueSvc:n,pagination:r}}=this,{colDef:l}=t,a=this[`${e}ValueNodeMap`],d=new Map,c=o.getCallback("isFullWidthRow"),u=l.equals,h=l.spanRows,g=typeof h=="function";let p=null,f=null,C;const m=(v,S)=>{p=v,f=null,C=S},w=v=>{const S=!v.isExpandable()&&!v.group&&!v.detail&&(c?!c({rowNode:v}):!0);if(v.rowIndex==null||!S){m(null,null);return}if(p==null||v.level!==p.level||v.footer||f&&v.rowIndex-1!==(f==null?void 0:f.getLastNode().rowIndex)){m(v,n.getValue(t,v));return}const D=n.getValue(t,v);if(g){const I=_(o,{valueA:C,nodeA:p,valueB:D,nodeB:v,column:t,colDef:l});if(!h(I)){m(v,D);return}}else if(u?!u(C,D):C!==D){m(v,D);return}if(!f){const I=a==null?void 0:a.get(p);(I==null?void 0:I.firstNode)===p?(I.reset(),f=I):f=new iy(t,p),d.set(p,f)}f.addSpannedNode(v),d.set(v,f)};switch(e){case"center":(b=s.forEachDisplayedNode)==null||b.call(s,v=>{(!r||r.isRowInPage(v.rowIndex))&&w(v)});break;case"top":i==null||i.forEachPinnedRow("top",w);break;case"bottom":i==null||i.forEachPinnedRow("bottom",w);break}this[`${e}ValueNodeMap`]=d}isCellSpanning(e){return!!this.getCellSpan(e)}getCellSpan(e){return this[`${Ba(e.rowPinned)}ValueNodeMap`].get(e)}},ny=class extends x{constructor(){super(...arguments),this.beanName="rowSpanSvc",this.spanningColumns=new Map,this.debouncePinnedEvent=ge(this,this.dispatchCellsUpdatedEvent.bind(this,!0),0),this.debounceModelEvent=ge(this,this.dispatchCellsUpdatedEvent.bind(this,!1),0),this.pinnedTimeout=null,this.modelTimeout=null}postConstruct(){const e=this.onRowDataUpdated.bind(this),t=this.buildPinnedCaches.bind(this);this.addManagedEventListeners({paginationChanged:this.buildModelCaches.bind(this),pinnedRowDataChanged:t,pinnedRowsChanged:t,rowNodeDataChanged:e,cellValueChanged:e})}register(e){const{gos:t}=this.beans;if(!t.get("enableCellSpan")||this.spanningColumns.has(e))return;const o=this.createManagedBean(new sy(e));this.spanningColumns.set(e,o),o.buildCache("top"),o.buildCache("bottom"),o.buildCache("center"),this.debouncePinnedEvent(),this.debounceModelEvent()}dispatchCellsUpdatedEvent(e){this.dispatchLocalEvent({type:"spannedCellsUpdated",pinned:e})}deregister(e){this.spanningColumns.delete(e)}onRowDataUpdated({node:e}){const{spannedRowRenderer:t}=this.beans;if(e.rowPinned){if(this.pinnedTimeout!=null)return;this.pinnedTimeout=window.setTimeout(()=>{this.pinnedTimeout=null,this.buildPinnedCaches(),t==null||t.createCtrls("top"),t==null||t.createCtrls("bottom")},0);return}this.modelTimeout==null&&(this.modelTimeout=window.setTimeout(()=>{this.modelTimeout=null,this.buildModelCaches(),t==null||t.createCtrls("center")},0))}buildModelCaches(){this.modelTimeout!=null&&clearTimeout(this.modelTimeout),this.spanningColumns.forEach(e=>e.buildCache("center")),this.debounceModelEvent()}buildPinnedCaches(){this.pinnedTimeout!=null&&clearTimeout(this.pinnedTimeout),this.spanningColumns.forEach(e=>{e.buildCache("top"),e.buildCache("bottom")}),this.debouncePinnedEvent()}isCellSpanning(e,t){const o=this.spanningColumns.get(e);return o?o.isCellSpanning(t):!1}getCellSpanByPosition(e){const{pinnedRowModel:t,rowModel:o}=this.beans,i=e.column,s=e.rowIndex,n=this.spanningColumns.get(i);if(!n)return;let r;switch(e.rowPinned){case"top":r=t==null?void 0:t.getPinnedTopRow(s);break;case"bottom":r=t==null?void 0:t.getPinnedBottomRow(s);break;default:r=o.getRow(s)}if(r)return n.getCellSpan(r)}getCellStart(e){const t=this.getCellSpanByPosition(e);return t?{...e,rowIndex:t.firstNode.rowIndex}:e}getCellEnd(e){const t=this.getCellSpanByPosition(e);return t?{...e,rowIndex:t.getLastNode().rowIndex}:e}getCellSpan(e,t){const o=this.spanningColumns.get(e);if(o)return o.getCellSpan(t)}forEachSpannedColumn(e,t){for(const[o,i]of this.spanningColumns)if(i.isCellSpanning(e)){const s=i.getCellSpan(e);t(o,s)}}destroy(){super.destroy(),this.spanningColumns.clear()}},ry={moduleName:"CellSpan",version:G,beans:[ny,oy]},ly=class extends x{constructor(e,t){super(),this.cellCtrl=e,this.staticClasses=[],this.beans=t,this.column=e.column}setComp(e){this.cellComp=e,this.applyUserStyles(),this.applyCellClassRules(),this.applyClassesFromColDef()}applyCellClassRules(){const{column:e,cellComp:t}=this,o=e.colDef,i=o.cellClassRules,s=this.getCellClassParams(e,o);Es(this.beans.expressionSvc,i===this.cellClassRules?void 0:this.cellClassRules,i,s,n=>t.toggleCss(n,!0),n=>t.toggleCss(n,!1)),this.cellClassRules=i}applyUserStyles(){const e=this.column,t=e.colDef,o=t.cellStyle;if(!o)return;let i;if(typeof o=="function"){const s=this.getCellClassParams(e,t);i=o(s)}else i=o;i&&this.cellComp.setUserStyles(i)}applyClassesFromColDef(){const{column:e,cellComp:t}=this,o=e.colDef,i=this.getCellClassParams(e,o);this.staticClasses.forEach(n=>t.toggleCss(n,!1));const s=this.beans.cellStyles.getStaticCellClasses(o,i);this.staticClasses=s,s.forEach(n=>t.toggleCss(n,!0))}getCellClassParams(e,t){const{value:o,rowNode:i}=this.cellCtrl;return _(this.beans.gos,{value:o,data:i.data,node:i,colDef:t,column:e,rowIndex:i.rowIndex})}},ay=class extends x{constructor(){super(...arguments),this.beanName="cellStyles"}processAllCellClasses(e,t,o,i){Es(this.beans.expressionSvc,void 0,e.cellClassRules,t,o,i),this.processStaticCellClasses(e,t,o)}getStaticCellClasses(e,t){const{cellClass:o}=e;if(!o)return[];let i;return typeof o=="function"?i=o(t):i=o,typeof i=="string"&&(i=[i]),i||[]}createCellCustomStyleFeature(e,t){return new ly(e,t)}processStaticCellClasses(e,t,o){this.getStaticCellClasses(e,t).forEach(s=>{o(s)})}},dy={moduleName:"CellStyle",version:G,beans:[ay]},cy={moduleName:"RowStyle",version:G,beans:[jh]};function uy(e,t){var o;return!!((o=e.colHover)!=null&&o.isHovered(t))}var hy=class extends x{constructor(e,t){super(),this.columns=e,this.element=t,this.destroyManagedListeners=[],this.enableFeature=o=>{const{beans:i,gos:s,element:n,columns:r}=this,l=i.colHover;o??!!s.get("columnHoverHighlight")?this.destroyManagedListeners=this.addManagedElementListeners(n,{mouseover:l.setMouseOver.bind(l,r),mouseout:l.clearMouseOver.bind(l)}):(this.destroyManagedListeners.forEach(d=>d()),this.destroyManagedListeners=[])}}postConstruct(){this.addManagedPropertyListener("columnHoverHighlight",({currentValue:e})=>{this.enableFeature(e)}),this.enableFeature()}destroy(){super.destroy(),this.destroyManagedListeners=null}},gy="ag-column-hover",py=class extends x{constructor(){super(...arguments),this.beanName="colHover"}postConstruct(){this.addManagedPropertyListener("columnHoverHighlight",({currentValue:e})=>{e||this.clearMouseOver()})}setMouseOver(e){this.updateState(e)}clearMouseOver(){this.updateState(null)}isHovered(e){if(!this.gos.get("columnHoverHighlight"))return!1;const t=this.selectedColumns;return!!t&&t.indexOf(e)>=0}addHeaderColumnHoverListener(e,t,o){const i=()=>{const s=this.isHovered(o);t.toggleCss("ag-column-hover",s)};e.addManagedEventListeners({columnHoverChanged:i}),i()}onCellColumnHover(e,t){if(!t)return;const o=this.isHovered(e);t.toggleCss(gy,o)}addHeaderFilterColumnHoverListener(e,t,o,i){this.createHoverFeature(e,[o],i);const s=()=>{const n=this.isHovered(o);t.toggleCss("ag-column-hover",n)};e.addManagedEventListeners({columnHoverChanged:s}),s()}createHoverFeature(e,t,o){e.createManagedBean(new hy(t,o))}updateState(e){this.selectedColumns=e,this.eventSvc.dispatchEvent({type:"columnHoverChanged"})}},fy={moduleName:"ColumnHover",version:G,beans:[py],apiFunctions:{isColumnHovered:uy}},Cy=class extends x{constructor(){super(...arguments),this.beanName="apiEventSvc",this.syncListeners=new Map,this.asyncListeners=new Map,this.syncGlobalListeners=new Set,this.globalListenerPairs=new Map}postConstruct(){var e,t;this.wrapSvc=(t=(e=this.beans.frameworkOverrides).createGlobalEventListenerWrapper)==null?void 0:t.call(e)}addEventListener(e,t){var n;const o=((n=this.wrapSvc)==null?void 0:n.wrap(e,t))??t,i=!ho.has(e),s=i?this.asyncListeners:this.syncListeners;s.has(e)||s.set(e,new Set),s.get(e).add(o),this.eventSvc.addEventListener(e,o,i)}removeEventListener(e,t){var n,r;const o=((n=this.wrapSvc)==null?void 0:n.unwrap(e,t))??t,i=this.asyncListeners.get(e),s=!!(i!=null&&i.delete(o));s||(r=this.syncListeners.get(e))==null||r.delete(o),this.eventSvc.removeEventListener(e,o,s)}addGlobalListener(e){var n;const t=((n=this.wrapSvc)==null?void 0:n.wrapGlobal(e))??e,o=(r,l)=>{ho.has(r)&&t(r,l)},i=(r,l)=>{ho.has(r)||t(r,l)};this.globalListenerPairs.set(e,{syncListener:o,asyncListener:i});const s=this.eventSvc;s.addGlobalListener(o,!1),s.addGlobalListener(i,!0)}removeGlobalListener(e){const{eventSvc:t,wrapSvc:o,globalListenerPairs:i}=this,s=(o==null?void 0:o.unwrapGlobal(e))??e;if(i.has(s)){const{syncListener:r,asyncListener:l}=i.get(s);t.removeGlobalListener(r,!1),t.removeGlobalListener(l,!0),i.delete(e)}else this.syncGlobalListeners.delete(s),t.removeGlobalListener(s,!1)}destroyEventListeners(e,t){e.forEach((o,i)=>{o.forEach(s=>this.eventSvc.removeEventListener(i,s,t)),o.clear()}),e.clear()}destroyGlobalListeners(e,t){e.forEach(o=>this.eventSvc.removeGlobalListener(o,t)),e.clear()}destroy(){super.destroy(),this.destroyEventListeners(this.syncListeners,!1),this.destroyEventListeners(this.asyncListeners,!0),this.destroyGlobalListeners(this.syncGlobalListeners,!1);const{globalListenerPairs:e,eventSvc:t}=this;e.forEach(({syncListener:o,asyncListener:i})=>{t.removeGlobalListener(o,!1),t.removeGlobalListener(i,!0)}),e.clear()}};function my(e,t,o){var i;(i=e.apiEventSvc)==null||i.addEventListener(t,o)}function wy(e,t,o){var i;(i=e.apiEventSvc)==null||i.removeEventListener(t,o)}function vy(e,t){var o;(o=e.apiEventSvc)==null||o.addGlobalListener(t)}function by(e,t){var o;(o=e.apiEventSvc)==null||o.removeGlobalListener(t)}var Sy={moduleName:"EventApi",version:G,apiFunctions:{addEventListener:my,addGlobalListener:vy,removeEventListener:wy,removeGlobalListener:by},beans:[Cy]},yy={moduleName:"Locale",version:G,beans:[Ov]},Ry=class extends x{constructor(){super(...arguments),this.beanName="rowAutoHeight",this.wasEverActive=!1,this._debouncedCalculateRowHeights=ge(this,this.calculateRowHeights.bind(this),1)}requestCheckAutoHeight(){this.wasEverActive&&this._debouncedCalculateRowHeights()}calculateRowHeights(){var l,a,d,c;const{visibleCols:e,rowModel:t,rowSpanSvc:o,pinnedRowModel:i}=this.beans,s=e.autoHeightCols;let n=!1;const r=u=>{var p;const h=u.__autoHeights;let g=_e(this.beans,u).height;for(const f of s){let C=h==null?void 0:h[f.getColId()];const m=o==null?void 0:o.getCellSpan(f,u);if(m){if(m.getLastNode()!==u)continue;if(C=(p=o==null?void 0:o.getCellSpan(f,u))==null?void 0:p.getLastNodeAutoHeight(),!C)return}if(C==null){if(this.colSpanSkipCell(f,u))continue;return}g=Math.max(C,g)}g!==u.rowHeight&&(u.setRowHeight(g),n=!0)};(l=i==null?void 0:i.forEachPinnedRow)==null||l.call(i,"top",r),(a=i==null?void 0:i.forEachPinnedRow)==null||a.call(i,"bottom",r),(d=t.forEachDisplayedNode)==null||d.call(t,r),n&&((c=t.onRowHeightChanged)==null||c.call(t))}setRowAutoHeight(e,t,o){if(e.__autoHeights??(e.__autoHeights={}),t==null){delete e.__autoHeights[o.getId()];return}const i=e.__autoHeights[o.getId()];e.__autoHeights[o.getId()]=t,i!==t&&this.requestCheckAutoHeight()}colSpanSkipCell(e,t){const{colModel:o,colViewport:i,visibleCols:s}=this.beans;if(!o.colSpanActive)return!1;let n=[];switch(e.getPinned()){case"left":n=s.getLeftColsForRow(t);break;case"right":n=s.getRightColsForRow(t);break;case null:n=i.getColsWithinViewport(t);break}return!n.includes(e)}setupCellAutoHeight(e,t,o){if(!e.column.isAutoHeight()||!t)return!1;this.wasEverActive=!0;const i=t.parentElement,{rowNode:s,column:n}=e,r=this.beans,l=c=>{var w;if((w=this.beans.editSvc)!=null&&w.isEditing(e)||!e.isAlive()||!o.isAlive())return;const{paddingTop:u,paddingBottom:h,borderBottomWidth:g,borderTopWidth:p}=Ye(i),f=u+h+g+p,m=t.offsetHeight+f;if(c<5){const b=J(r),v=!b||!b.contains(t),S=m==0;if(v||S){window.setTimeout(()=>l(c+1),0);return}}this.setRowAutoHeight(s,m,n)},a=()=>l(0);a();const d=Ze(r,t,a);return o.addDestroyFunc(()=>{d(),this.setRowAutoHeight(s,void 0,n)}),!0}setAutoHeightActive(e){this.active=e.list.some(t=>t.isVisible()&&t.isAutoHeight())}areRowsMeasured(){if(!this.active)return!0;const e=this.beans.rowRenderer.getAllRowCtrls();let t=null;for(const{rowNode:o}of e)if((!t||this.beans.colModel.colSpanActive)&&(t=this.beans.colViewport.getColsWithinViewport(o).filter(s=>s.isAutoHeight())),t.length!==0){if(!o.__autoHeights)return!1;for(const i of t){const s=o.__autoHeights[i.getColId()];if(!s||o.rowHeight<s)return!1}}return!0}},Ey={moduleName:"RowAutoHeight",version:G,beans:[Ry]};const ct=Symbol("grid-context"),un=e=>{const t=e.getColumnState().filter(i=>i.sort!=null),o={};return t.forEach((i,s)=>o[i.colId]=s),t.sort((i,s)=>{const n=i.sortIndex,r=s.sortIndex;if(n!=null&&r!=null)return n-r;if(n==null&&r==null){const l=o[i.colId],a=o[s.colId];return l>a?1:-1}else return r==null?-1:1}),t},Va=e=>{const t=un(e),o=new Map;return t.forEach((i,s)=>{o.set(i.colId,s)}),o},Na=(e,t)=>Va(e).get(t)??-1,xy=e=>!!e&&(typeof e=="object"||typeof e=="function")&&typeof e.then=="function";class _a{constructor(t,o){R(this,"loading",!1);R(this,"dataGetter");R(this,"cache");R(this,"_api");R(this,"loadingDelay");R(this,"getSorts",()=>un(this.api).map(t=>({colId:t.colId,sort:t.sort})));this.dataGetter=t,this.cache=o}set api(t){this._api=t}get api(){return this._api}destroy(){this.loading=!1}loadData(){const t=this.cache.getRows().map((o,i)=>(o.__setIndex(i),o)).flatMap(o=>o.flat());this.api.setGridOption("rowData",t),this.api.redrawRows(),this.loading=!1}getRows(t){var o,i,s,n,r,l,a,d;if(this.loading||!this._api){(i=(o=t.context)==null?void 0:o.resolve)==null||i.call(o);return}if(this.cache.isFinished&&t.pageNum!==1){(n=(s=t.context)==null?void 0:s.resolve)==null||n.call(s);return}if(this.loading=!0,H.isFunction(this.dataGetter)){const c=this.dataGetter({startRow:t.startRow,endRow:t.endRow,pageNum:t.pageNum,pageSize:t.pageSize,params:t.filterModel,sorts:this.getSorts()});xy(c)&&(this.loadingDelay=setTimeout(()=>{this.api.setGridOption("loading",!0)},500),c.then(u=>{var h,g;t.successCallback(u,u.length),(g=(h=t.context)==null?void 0:h.resolve)==null||g.call(h)}).catch(u=>{var h,g;t.failCallback(),(g=(h=t.context)==null?void 0:h.reject)==null||g.call(h,u)}).finally(()=>{clearTimeout(this.loadingDelay),this.api.setGridOption("loading",!1),this.loadData()})),H.isArray(c)&&(t.successCallback(c,c.length),this.loadData(),(l=(r=t.context)==null?void 0:r.resolve)==null||l.call(r))}else t.successCallback(this.dataGetter,this.dataGetter.length),this.loadData(),(d=(a=t.context)==null?void 0:a.resolve)==null||d.call(a)}}class hn{constructor(t,o,i){R(this,"spanMatrix");R(this,"rootId");R(this,"rowIdToNestingIdx");this.spanMatrix=o,this.rootId=i,this.rowIdToNestingIdx=new Map;for(let s=0;s<t.length;s++)this.rowIdToNestingIdx.set(t[s].id,s)}get(t,o){const i=o.getColId(),s=this.rowIdToNestingIdx.get(t);return s===void 0?0:this.spanMatrix.getCellSpan(this.rootId,s,i)}set(t,o,i){}}class Ot{constructor(t,o,i=[]){R(this,"actualRow");R(this,"id");R(this,"nestingIndexes");this.actualRow=o,this.id=t,this.nestingIndexes=i}delete(){this.actualRow.delete()}redraw(){this.actualRow.redraw()}getActualRow(){return this.actualRow}isCellEditing(t){return this.actualRow.isCellEditing(this.id,t)}startEditing(t){t!==null&&this.actualRow.isEditing()&&(this.actualRow=this.actualRow.stopEditing(!0)),this.actualRow.isEditing(t)||(t==null?this.actualRow.startEditing(!0):this.actualRow.startEditingCell(this.id,t,!0))}getDataIndex(){return this.actualRow.getDataIndex()}getRowSpans(){return this.actualRow.getRowSpans()}isEditing(){return this.actualRow.isEditing()}getValue(t){var o;return(o=this.actualRow.getCell(t,this.getNestingIndexes()))==null?void 0:o.value}getRowSpan(t){return this.actualRow.getRowSpans().get(this.id,t)}getData(){return this.actualRow.getData()}isColumnValueChanged(t,o){return this.actualRow.isEditing()&&this.actualRow.getValue(o,this.getNestingIndexes())!==t}getNestingIndexes(){return this.nestingIndexes}getSignature(){return this.actualRow.getSignature()}getId(){return this.actualRow.getId()}getCell(t){return this.actualRow.getCell(t,this.getNestingIndexes())}isTransient(){return this.actualRow.isTransient()}setData(t){this.actualRow.setData(t)}buildSpan(){this.actualRow.buildSpan()}scrollIntoView(){this.actualRow.scrollIntoView()}match(t){return t.data.getId()===this.actualRow.getId()}getHostObject(t){var r;const o=this.getCell(t.column);if(!o)return{hostObject:this.getData()};if(!o.parent||o.parent.field==="$")return{hostObject:this.getData()};let i=o.isArrayElement()?o.path:o.parent.path;((r=t.colDef)==null?void 0:r.cellDataType)==="array"&&(i=o.path);const s=H.get(this.getData(),i),n=i.endsWith("]")?H.get(this.getData(),i.substring(0,i.lastIndexOf("["))):void 0;return{hostObject:s,hostArray:n}}}class Wa{constructor(t,o,i){R(this,"actualRow");R(this,"idMapper");R(this,"draft");this.actualRow=t,this.idMapper=i,this.draft=E.reactive(H.cloneDeep(o))}getSourceRow(){return this.actualRow}getDataIndex(){return this.actualRow.getDataIndex()}getSignature(){return this.actualRow.signature}getValue(t,o){var i;return(i=this.getCell(t,o))==null?void 0:i.value}getCell(t,o){return this.actualRow.getCell(t,o)}getId(){return this.actualRow.id}getRowSpans(){return this.actualRow.getRowSpans()}match(t){return this.actualRow.match(t)}__setIndex(t){this.actualRow.__setIndex(t)}getData(){return this.draft}getDraft(){return this.draft}setData(t){this.draft=E.reactive(t)}buildSpan(){this.actualRow.update(this.actualRow.id,E.toRaw(this.draft))}flat(){return this.actualRow.leafCells.map(t=>new Ot(t.id,this,t.nestingIndexes))}scrollIntoView(){this.actualRow.scrollIntoView()}_stopEditingImpl(t=!1){const o=E.toRaw(this.draft),i=this.idMapper(o);return this.actualRow.update(i,o),t&&this.redraw(),this.actualRow.dataCache.replace(this.actualRow),this.actualRow}get expand(){return this.actualRow.expand===!0}set expand(t){var o,i;this.actualRow.expand=t===!0,(i=(o=this.actualRow.bridge)==null?void 0:o.refreshModel)==null||i.call(o,{step:"map"})}get detailCardData(){return this.actualRow.detailCardData}set detailCardData(t){this.actualRow.detailCardData=t}isExpanded(){return this.actualRow.isExpanded()}setExpanded(t,o){this.actualRow.setExpanded(t,o)}toggleExpanded(){this.actualRow.toggleExpanded()}isEditing(t){return!!this.draft}isCellEditing(t,o){return!!this.draft}stopEditing(t=!1){return this._stopEditingImpl(t)}}class Fi extends Wa{constructor(o,i,s=!1){super(o,H.cloneDeep(o.data),i);R(this,"transient");this.transient=s}redraw(){this.actualRow.redraw()}delete(){this.actualRow.delete()}isTransient(){return this.transient}async persistent(o){const i=await o(H.cloneDeep(this.draft));return this.actualRow.update(this.idMapper(i),i),this.draft=E.reactive(i),this.transient=!1,this}}class Pi extends Wa{constructor(o,i,s,n){super(o,o.data,n);R(this,"editingColumn");R(this,"rowId");this.rowId=i,this.editingColumn=s}getEditingColumn(){return this.editingColumn}getRowId(){return this.rowId}delete(){throw new Error("CellEditableRow 不允许删除")}redraw(){this.actualRow.redrawCell(this.rowId,this.editingColumn)}isCellEditing(o,i){return!!this.draft&&this.editingColumn.getColId()===i.getColId()&&this.rowId===o}isTransient(){return!1}}class Bt{constructor(t,o,i,s,n){R(this,"id");R(this,"field");R(this,"value");R(this,"index");R(this,"properties",new Map);R(this,"parent");R(this,"spanRow",1);R(this,"path");this.id=t,this.field=o,this.value=i,this.index=s,this.parent=n,this.path=this.getReadPath()}getRoot(){let t=this.parent;for(;;){if(t.field==="$")return t;t=t==null?void 0:t.parent}}pretreatmentValue(t,o,i){const s=this.properties.get(t);if(s)return s;const n=H.get(this.value,t);let r;if(H.isArray(n)&&i.cellDataType!=="native"){r=new Array(n.length);for(let l=0;l<n.length;l++)r[l]=new Bt(`${this.id}_${l}`,t,n[l],l,o)}else r=new Bt(this.id,t,n,void 0,o);return this.properties.set(t,r),r}isNeedSpan(){return Array.from(this.properties.values()).some(t=>H.isArray(t))}get(t){return this.properties.get(t)}calcSpan(){if(this.isNeedSpan()){let t=1,o=!1;for(const i of this.properties.values())if(H.isArray(i)){o=!0;let s=0;for(const n of i)s+=n.calcSpan();t=Math.max(t,s)}if(o&&t>1)for(const i of this.properties.values())H.isArray(i)||i.setRowSpan(t);return this.spanRow=t,this.spanRow}return this.spanRow}setRowSpan(t){this.spanRow=t;for(const o of this.properties.values())H.isArray(o)||o.setRowSpan(this.spanRow)}getPath(){const t=[];let o=this;for(;o;)t.push(o.field),o=o.parent;return t.reverse().slice(1).join(".")}getReadPath(){const t=[];let o=this;for(;o;)t.push(`${o.field}${H.isNumber(o.index)?`[${o.index}]`:""}`),o=o.parent;return t.reverse().slice(1).join(".")}isArrayElement(){return this.path.endsWith("]")}}class za{constructor(){R(this,"trees",new Map);R(this,"arrayParents",new Map);R(this,"cellSpanCaches",new Map);R(this,"columns",new Map);R(this,"dirtyRoots",new Set)}setRow(t,o,i){this.columns.clear();for(const c of i.columns)this.columns.set(c.colId,c);const s=this._computeExpandPaths(o,i.columns),n=new Map;this.arrayParents.set(t,n);const r=this.buildTree(t,o,n,s);this.computeSpans(r),this.trees.set(t,r);const l=new Map,a=new Set,d=this.collectLeaves(r);for(const c of d)this._walkUpAndRecord(c,l,a,t);if(d.length>0){const c=new Set;for(const g of d)for(const p of l.keys())if(p.startsWith(`${g.id}|`)){const f=p.substring(g.id.length+1);c.add(f)}const u=d[0],h=r.spanRow;for(const g of this.columns.keys())c.has(g)||l.set(`${u.id}|${g}`,h)}this.cellSpanCaches.set(t,l),this.dirtyRoots.add(t)}_computeExpandPaths(t,o){const i=new Set;for(const s of o){const n=s.colId.split(".");let r=t,l="";const a=s.cellDataType==="native"&&r!=null&&Array.isArray(r[n[0]]);for(let d=0;d<n.length&&r!=null;d++){const c=n[d];l=l?`${l}.${c}`:c;const u=r[c];if(Array.isArray(u)){if(d===0&&a)break;i.add(l),r=u[0]}else r=u}}return i}setArrayLength(t,o,i){var g,p;const s=this.trees.get(t);if(!s)return;const n=(g=this.arrayParents.get(t))==null?void 0:g.get(o);if(!n){this.dirtyRoots.add(t);return}const r=n.children.filter(f=>f.isArrayElement&&f.path===o),l=r.length,a=((p=r[0])==null?void 0:p.field)??o.split(".").pop();if(l===i){this.dirtyRoots.add(t);return}if(i<l)n.children=n.children.filter(f=>!(f.isArrayElement&&f.path===o)||f.index<i);else{n.children=n.children.filter(f=>!(f.path===o&&Array.isArray(f.value)&&f.value.length===0));for(let f=l;f<i;f++){const C=n.children.filter(w=>w.isArrayElement&&w.path===o),m=C.length>0?C[0].nestingIndexes.slice(0,-1):n.nestingIndexes;n.children.push({id:`${n.id}_${a}_${f}`,field:a,value:void 0,index:f,isArrayElement:!0,parent:n,children:[],spanRow:1,path:o,readPath:`${o}[${f}]`,nestingIndexes:[...m,f]})}}let d=n;for(;d;)this.computeSpans(d),d=d.parent;const c=new Map,u=new Set,h=this.collectLeaves(s);for(const f of h)this._walkUpAndRecord(f,c,u,t);if(h.length>0){const f=new Set;for(const w of h)for(const b of c.keys())if(b.startsWith(`${w.id}|`)){const v=b.substring(w.id.length+1);f.add(v)}const C=h[0],m=s.spanRow;for(const w of this.columns.keys())f.has(w)||c.set(`${C.id}|${w}`,m)}this.cellSpanCaches.set(t,c),this.dirtyRoots.add(t)}getCellSpan(t,o,i){if(!this.columns.has(i))return 0;const s=this.cellSpanCaches.get(t);if(!s)return 0;const n=this.trees.get(t);if(!n)return 0;const r=this.collectLeaves(n);if(o<0||o>=r.length)return 0;const l=r[o];return s.get(`${l.id}|${i}`)??0}getCellPath(t,o){if(!this.columns.has(t))return null;const i=this.firstArrayPaths();if(!i)return null;const s=t.split("."),n=[];let r=0;for(let l=0;l<s.length;l++){let a=s[l];if(l<s.length-1){const d=s.slice(0,l+1).join(".");i.has(d)&&r<o.length&&(a+=`[${o[r]}]`,r++)}n.push(a)}return n.join(".")}getMaxArrayLength(t){const o=this.trees.get(t);return o?o.spanRow:1}getLeaves(t){const o=this.trees.get(t);return o?this.collectLeaves(o):[]}getDirtyRoots(){return this.dirtyRoots}clearDirty(){this.dirtyRoots.clear()}buildTree(t,o,i,s){const n={id:t,field:"$",value:o,isArrayElement:!1,children:[],spanRow:1,path:"",readPath:"",nestingIndexes:[]};return this.expandChildren(n,o,i,s),n}expandChildren(t,o,i,s){if(Array.isArray(o)){if(s.has(t.path)){i.set(t.path,t);for(let n=0;n<o.length;n++){const r=this.createNode(`${t.id}_${t.field}_${n}`,t.field,o[n],n,t,t.path,[...t.nestingIndexes,n]);t.children.push(r),this.expandChildren(r,o[n],i,s)}}else{const n=this.createNode(t.id,t.field,o,void 0,t,t.path,t.nestingIndexes);t.children.push(n)}return}if(this.isPlainObject(o))for(const[n,r]of Object.entries(o)){const l=t.path?`${t.path}.${n}`:n;if(Array.isArray(r))if(s.has(l)){i.set(l,t);for(let a=0;a<r.length;a++){const d=this.createNode(`${t.id}_${n}_${a}`,n,r[a],a,t,l,[...t.nestingIndexes,a]);t.children.push(d),this.expandChildren(d,r[a],i,s)}if(r.length===0){const a=this.createNode(`${t.id}_${n}_empty`,n,r,void 0,t,l,t.nestingIndexes);t.children.push(a)}}else{const a=this.createNode(t.id,n,r,void 0,t,l,t.nestingIndexes);t.children.push(a)}else{const a=this.createNode(t.id,n,r,void 0,t,l,t.nestingIndexes);t.children.push(a),this.expandChildren(a,r,i,s)}}}createNode(t,o,i,s,n,r,l){return{id:t,field:o,value:i,index:s,isArrayElement:s!==void 0,parent:n,children:[],spanRow:1,path:r,readPath:s!==void 0?`${r}[${s}]`:r,nestingIndexes:l}}isPlainObject(t){return t!=null&&typeof t=="object"&&!Array.isArray(t)}computeSpans(t){if(t.children.length===0)return t.spanRow=1,1;const o=[],i=[];for(const s of t.children)this.computeSpans(s),s.isArrayElement?o.push(s):i.push(s);if(o.length>0){const s=new Map;for(const r of o){const l=r.path;s.set(l,(s.get(l)??0)+r.spanRow)}let n=1;for(const r of s.values())r>n&&(n=r);if(t.spanRow=n,n>1)for(const r of i)this.propagateSpan(r,n)}else{let s=1;for(const n of i)n.spanRow>s&&(s=n.spanRow);t.spanRow=s}return t.spanRow}propagateSpan(t,o){t.spanRow=o;for(const i of t.children)i.isArrayElement||this.propagateSpan(i,o)}collectLeaves(t){const o=[];return this._collectLeaves(t,o),o.length===0&&o.push(t),o}_collectLeaves(t,o){for(const i of t.children)i.isArrayElement?this._hasArrayDescendant(i)?this._collectLeaves(i,o):o.push(i):this._collectLeaves(i,o)}_hasArrayDescendant(t){for(const o of t.children)if(o.isArrayElement||this._hasArrayDescendant(o))return!0;return!1}findSpanByPath(t,o){let i=t;for(;i;){if(i.path===o)return i.spanRow;const s=this.searchInNonArrayChildren(i,o);if(s!==null)return s;i=i.parent}return 0}searchInNonArrayChildren(t,o){for(const i of t.children){if(i.isArrayElement)continue;if(i.path===o)return i.spanRow;const s=this.searchInNonArrayChildren(i,o);if(s!==null)return s}return null}_walkUpAndRecord(t,o,i,s){let n=t;for(;n;){if(i.has(n))return;i.add(n),Array.from(this.columns.keys()),o.set(`${t.id}|${n.path}`,n.spanRow);for(const r of n.children)r.isArrayElement?Array.isArray(r.value)&&r.value.length===0&&this._recordEmptyArrayColumns(t,n,r.field,o):(o.set(`${t.id}|${r.path}`,r.spanRow),this._processDeep(t,r,o,i),Array.isArray(r.value)&&r.value.length===0&&this._recordEmptyArrayColumns(t,n,r.field,o));n=n.parent}}_processDeep(t,o,i,s){if(!s.has(o)){s.add(o);for(const n of o.children)n.isArrayElement||(i.set(`${t.id}|${n.path}`,n.spanRow),this._processDeep(t,n,i,s))}}_recordEmptyArrayColumns(t,o,i,s){const n=o.path?`${o.path}.${i}`:i;for(const r of this.columns.keys())r.startsWith(n)&&s.set(`${t.id}|${r}`,o.spanRow)}_collectArrayPaths(t,o){for(const i of t.children)i.isArrayElement&&o.add(i.path),this._collectArrayPaths(i,o)}collectArrayPaths(t){const o=new Set;return this._collectArrayPaths(t,o),o}firstArrayPaths(){const t=this.trees.values().next().value;return t?this.collectArrayPaths(t):null}}class Dy{constructor(t,o,i){R(this,"id");R(this,"rootValue");R(this,"spanMatrix");R(this,"leafCells");R(this,"columns");R(this,"data");this.id=t,this.data=o,this.columns=i,this.rootValue=new Bt(this.id,"$",this.data),this._buildPathCells(i),this.rootValue.calcSpan(),this.spanMatrix=new za,this.spanMatrix.setRow(this.id,this.data,{columns:i}),this.leafCells=this.spanMatrix.getLeaves(this.id)}_buildPathCells(t){for(const o of t){const i=o.colId.split(".");let s=this.rootValue;for(let n=0;n<i.length;n++){const r=i[n];if(!H.isArray(s))s=s.pretreatmentValue(r,s,o);else{const l=[];for(const a of s){const d=a.pretreatmentValue(r,a,o);H.isArray(d)?l.push(...d):l.push(d)}s=l}}}}getMaxArrayLength(){return this.spanMatrix.getMaxArrayLength(this.id)}getCell(t,o){const i=t.getColId().split(".");let s=this.rootValue.properties.get(i.shift());if(!s)return;let n=0;H.isArray(s)&&(s=s[o[n]],n++);let r=s;for(const l of i){if(!r)break;if(!H.isArray(r)){const a=r.get(l);H.isArray(a)?(r=a[o[n]],n=n+1):r=a}}return r}getValue(t,o){const i=this.getCell(t,o);if(i)return H.get(this.data,i.path)}setArrayLength(t,o){this.spanMatrix.setArrayLength(this.id,t,o),this.leafCells=this.spanMatrix.getLeaves(this.id)}rebuild(t,o){const i=o??this.columns;this.data=t,this.spanMatrix.setRow(this.id,t,{columns:i}),this.leafCells=this.spanMatrix.getLeaves(this.id);const s=new Bt(this.id,"$",t);for(const n of i){const r=n.colId.split(".");let l=s;for(let a=0;a<r.length;a++){const d=r[a];if(!H.isArray(l))l=l.pretreatmentValue(d,l,n);else{const c=[];for(const u of l){const h=u.pretreatmentValue(d,u,n);H.isArray(h)?c.push(...h):c.push(h)}l=c}}}s.calcSpan(),this.rootValue=s,o&&(this.columns=i)}getSpanMatrix(){return this.spanMatrix}}class mo{constructor(t,o,i,s,n,r){R(this,"id");R(this,"data");R(this,"signature");R(this,"dataModel");R(this,"spanCache");R(this,"columns");R(this,"bridge");R(this,"idMapper");R(this,"dataCache");R(this,"index");R(this,"expand",!1);R(this,"detailCardData",null);this.index=r,this.dataCache=s,this.idMapper=i,this.columns=o,this.bridge=n,this.id=i(t),this.data=t,this.signature=Oe(JSON.stringify(t)),this.buildSpan()}get pathCells(){return this.dataModel.rootValue.properties}get leafCells(){return this.dataModel.leafCells}get spanMatrix(){return this.dataModel.spanMatrix}buildSpan(){this.dataModel=new Dy(this.id,this.data,this.columns),this.spanCache=new hn(this.dataModel.leafCells,this.dataModel.spanMatrix,this.id)}getMaxArrayLength(){return this.dataModel.getMaxArrayLength()}getCell(t,o){return this.dataModel.getCell(t,o)}getValue(t,o){return this.dataModel.getValue(t,o)}getSpanMatrix(){return this.dataModel.getSpanMatrix()}setArrayLength(t,o){this.dataModel.setArrayLength(t,o)}delete(){this.dataCache.remove([this])}redraw(){var t;(t=this.bridge)==null||t.redraw(this)}redrawCell(t,o){var i;(i=this.bridge)==null||i.redrawCell(this,t,o)}getSourceRow(){return this}isExpanded(){return this.expand===!0}setExpanded(t,o){var s,n;const i=t===!0;this.expand!==i&&(this.expand=i,(n=(s=this.bridge)==null?void 0:s.refreshModel)==null||n.call(s,{step:"map"}))}toggleExpanded(){this.setExpanded(!this.expand)}getDataIndex(){if(this.index===void 0)throw new Error(`row[${this.id}] not ready`);return this.index}getRowSpans(){return this.spanCache}isCellEditing(t,o){return!1}getSignature(){return this.signature}startEditing(t=!1){const o=new Fi(this,this.idMapper,!1);return this.dataCache.replace(o),t&&this.redraw(),o}startEditingCell(t,o,i=!1){const s=new Pi(this,t,o,this.idMapper);return this.dataCache.replace(s),i&&this.redrawCell(t,o),s}__setIndex(t){this.index=t}update(t,o){this.id=t,this.data=o,this.signature=Oe(JSON.stringify(o)),this.dataModel.rebuild(o),this.spanCache=new hn(this.dataModel.leafCells,this.dataModel.spanMatrix,this.id)}isTransient(){return!1}getId(){return this.id}isEditing(){return!1}getData(){return this.data}scrollIntoView(){var o;const t=this.leafCells[this.leafCells.length-1];t&&((o=this.bridge)==null||o.ensureNodeVisible(t.id))}flat(){return this.dataModel.leafCells.map(t=>new Ot(t.id,this,t.nestingIndexes))}setData(t){this.update(this.idMapper(t),t)}match(t){return this.getId()===t.data.getId()}}class $a{constructor(t){R(this,"rows");R(this,"pageNum",1);R(this,"pageSize",100);R(this,"isFinished",!1);R(this,"idMapper");R(this,"idMap",new Map);R(this,"bridge");this.rows=[],this.idMapper=t}createRow(t){var o;return new mo(t,((o=this.bridge)==null?void 0:o.getColumns())??[],this.idMapper,this,this.bridge)}rebuildIdMap(){this.idMap.clear(),this.rows.forEach((t,o)=>this.idMap.set(t.getId(),o))}setRows(t){return this.rows=t,this.rebuildIdMap(),this}replace(t){this.rows[t.getDataIndex()]=t,this.rebuildIdMap()}remove(t){var i;const o=new Set(t.map(s=>s.getId()));this.rows=this.rows.filter(s=>!o.has(s.getId())),this.rebuildIdMap(),(i=this.bridge)==null||i.reload()}getRows(){return this.rows??[]}appendRows(t){if(!this.rows){this.setRows(t);return}for(const o of t){const i=o.getId(),s=this.idMap.get(i);s!==void 0?(this.rows[s]=o,this.idMap.set(i,s)):(this.rows.push(o),this.idMap.set(i,this.rows.length-1))}}insertRows(t,o=0){if(!this.rows){this.setRows(t);return}const i=new Set(t.map(s=>s.getId()));this.rows=this.rows.filter(s=>!i.has(s.getId())),this.rows.splice(o,0,...t),this.rebuildIdMap()}deleteRows(t){const o=new Set(t.map(i=>H.isString(i)?i:i.getId()));this.rows=this.rows.filter(i=>!o.has(i.getId())),this.rebuildIdMap()}}const Ua={getContextMenuItems:void 0},Fy=e=>e instanceof mo||e instanceof Ot?!0:e instanceof Fi,Py=e=>e instanceof mo,Ti="_",Ka=1;class ja{static createRowNode(t,o,i={}){return{...t,__id:o(t),...i}}static generateId(t){if(t.length===0)throw new Error("传入标识数组为空无法生成ID");return t.join(Ti)}static getId(t){return t.__id?t.__id.split(Ti)[0]:t.id}static getSignature(t){return t.__signature}static getFlatIndex(t,o=Ka){if(!t.__id)throw new Error("不包含有效的ID信息");const i=t.__id.split(Ti);if(i.length===1)throw new Error(`${i} 不包含索引信息`);const s=i[o];if(!s)throw new Error(`${i} deep[${o}] 不包含索引信息`);const n=Number.parseInt(s);if(!Number.isFinite(n))throw new TypeError(`${s} 不是一个正确的数组索引`);return n}static ValueGetter(t){return console.warn("deprecated GridUtils.ValueGetter 现在只需要正常使用valueGetter了"),o=>{if(!(o.data.id&&typeof o.data.id=="string"&&o.data.id.includes("footer-")))return t(o)}}static spanRow(t,o,i){const s=t[o];return!s||s.length===0?t:s.map((n,r)=>({...t,__id:`${i??t.id}_${r}`,rowSpan:r===0?s.length:0}))}static isGroupColDef(t){return!!t.children}}const qa=(e,t,o,i,s)=>{const n=E.ref(t),r=E.ref(),l=E.ref(!1),a=(g,p)=>{if(n.value)return n.value;const f=p??[];if(!g){const w=Oe(f.join(","));return n.value=w,w}const C=e.getInstanceName(g);C&&f.push(C);const m=e.getParentInstance(g);return a(m,f)},d=g=>{const p=localStorage.getItem(g);if(!(!p||p==="undefined"))return JSON.parse(p)},c=H.debounce(()=>{const g=a(s);localStorage.setItem(g,JSON.stringify(o.value.getColumnState()))},200),u=async()=>{const g=a(s),p=d(g);if(p&&p.length>0){const f=p.filter(C=>{var m;return!((m=C.colId)!=null&&m.includes("ag-Grid-SelectionColumn"))});o.value.applyColumnState({state:f,applyOrder:!0}),l.value=!0}},h=()=>H.sumBy(o.value.getAllDisplayedVirtualColumns().map(g=>g.getActualWidth()));return{storeGridState:c,restoreGridState:u,resetGridState:()=>{o.value.applyColumnState({state:r.value,applyOrder:!0})},initGridState:()=>{const g=a(s);if(r.value=o.value.getColumnState(),!localStorage.getItem(`${g}-initial`)){const p=h();i.value>p&&o.value.sizeColumnsToFit()}},isStateInitialized:l}},wo=e=>{if(e.id)return`${e.id}`.split("_")[0]},Ya=e=>{const{options:t,elRef:o,editable:i,onRowChange:s,onMessageError:n,findOtherEditingCell:r,isCellEditable:l}=e;let a;const d=h=>{o.value&&o.value.querySelectorAll(`.row_${h}`).forEach(g=>{g.classList.add("row-hover")})},c=h=>{o.value&&o.value.querySelectorAll(`.row_${h}`).forEach(g=>{g.classList.remove("row-hover")})},u=(h,g)=>{var C;if(!h||!o.value)return!1;const p=h;if(!p||typeof p.contains!="function")return!1;const f=o.value.querySelectorAll(`.row_${g}`);for(let m=0;m<f.length;m++){const w=f[m];if(w===p||(C=w.contains)!=null&&C.call(w,p))return!0}return!1};return{...t,onCellMouseOver(h){var p,f,C;const g=wo(h.node);if(!g){(p=t.onCellMouseOver)==null||p.call(t,h);return}u((f=h.event)==null?void 0:f.relatedTarget,g)||(a&&a!==g&&c(a),a=g,d(g),(C=t.onCellMouseOver)==null||C.call(t,h))},onCellMouseOut(h){var p;const g=wo(h.node);g&&(u((p=h.event)==null?void 0:p.relatedTarget,g)||a===g&&(c(g),a=void 0))},onCellClicked(h){if(i==="cell"&&h.data instanceof Ot){if(l&&!l(h.column,h.node))return;const g=h.data.getActualRow(),p=r==null?void 0:r(h.node.id);if(g instanceof Pi){const f=g.getEditingColumn(),C=g.getRowId();if(s==null)throw new Error("可编辑单元格必须配置保存能力");if(f.getId()==h.column.getId()&&C===h.node.id)return;s(g).then(()=>{g.stopEditing(!0);const m=g.getSourceRow();m.setData(g.getData()),m.startEditingCell(h.node.id,h.column,!0)}).catch(m=>{n==null||n(`单元格[${h.column.getColDef().headerName}]保存失败: `+m.message)})}else if(g instanceof mo)if(p){if(s==null)throw new Error("可编辑单元格必须配置保存能力");s(p).then(()=>{p.stopEditing(!0),p.getSourceRow().setData(p.getData()),g.startEditingCell(h.node.id,h.column,!0)}).catch(f=>{n==null||n(`单元格[${h.column.getColDef().headerName}]保存失败: `+f.message)})}else g.startEditingCell(h.node.id,h.column,!0)}},onRowSelected(h){var C;const g=wo(h.node),p=h.api.getRenderedNodes().filter(m=>wo(m)===g),f=h.node.isSelected();p.forEach(m=>{m.setSelected(!!f,!1,"api")}),(C=t==null?void 0:t.onRowSelected)==null||C.call(t,h)},getRowClass(h){var m,w;const g=(m=t==null?void 0:t.getRowClass)==null?void 0:m.call(t,h),p=[];g&&(H.isArray(g)?p.push(...g):p.push(g)),p.push(`row_${wo(h.node)}`);const f=h.node.data,C=((w=(f==null?void 0:f.actualRow)??f)==null?void 0:w.index)??h.node.rowIndex??0;return p.push(`row-zebra-${C%2}`),p},onRowDoubleClicked(h){i==="row"&&(h.data.isEditing()||h.data.startEditing())}}},Za={"cell-span":({data:e,column:t})=>e.getRowSpan(t)>0,"cell-span-hide":({data:e,column:t})=>e.getRowSpan(t)===0},Qa={"cell-span":({data:e,column:t})=>e.getRowSpan(t)>0,"cell-span-hide":({data:e,column:t})=>e.getRowSpan(t)===0},gn=(e,t)=>({...e,...t??{}});class Vt{constructor(t,o,i,s=[],n){R(this,"context");R(this,"endRow");R(this,"filterModel");R(this,"sortModel");R(this,"startRow");R(this,"dataCache");R(this,"pageNum");R(this,"pageSize");R(this,"onError");R(this,"onFirstPageLoaded");this.pageNum=t,this.pageSize=o,this.sortModel=s,this.startRow=(t-1)*o,this.endRow=this.startRow+this.pageSize,this.dataCache=i,this.onError=n}static from(t,o,i,s){const n=o??i.pageSize;return new Vt(t,n,i,[],s)}static nextPage(t,o){return new Vt(t.pageNum+1,t.pageSize,t,[],o)}failCallback(){var t;(t=this.onError)==null||t.call(this,"表格数据加载失败,请重试")}successCallback(t){var o;(H.isEmpty(t)||t.length<this.pageSize)&&(this.dataCache.isFinished=!0),this.pageNum===1?this.dataCache.setRows((t??[]).map(i=>this.dataCache.createRow(i))):this.dataCache.appendRows((t??[]).map(i=>this.dataCache.createRow(i))),this.dataCache.pageNum=this.pageNum,this.pageNum===1&&((o=this.onFirstPageLoaded)==null||o.call(this,t??[]))}}const Xa=e=>{const t=s=>{const n=s.getLastDisplayedRowIndex();return s.getDisplayedRowCount()-1===n},o=({direction:s,api:n})=>{s==="vertical"&&t(n)&&i()},i=()=>{var s;(s=e==null?void 0:e.onVScrollEnd)==null||s.call(e)};return{onBodyScrollEnd:o}};class Ty{constructor(t){R(this,"gridApi");this.gridApi=t}reload(){this.gridApi.getGridOption("context").reload()}redraw(t){const o=this.gridApi.getRenderedNodes().filter(i=>{var s;return((s=i.data)==null?void 0:s.getId())===t.getId()});this.gridApi.getGridOption("context").reload(),this.gridApi.redrawRows({rowNodes:o})}redrawCell(t,o,i){const s=this.gridApi.getRenderedNodes().filter(n=>{var r;return((r=n.data)==null?void 0:r.getId())===o});this.gridApi.getGridOption("context").reload(),this.gridApi.refreshCells({rowNodes:s,columns:[i],force:!0,suppressFlash:!0})}ensureNodeVisible(t){const o=this.gridApi.getRowNode(t);o&&this.gridApi.ensureNodeVisible(o)}refreshModel(t){var i,s,n,r;const o=this.gridApi.getGridOption("rowModelType")==="clientSide"?this.gridApi.rowModel:null;o!=null&&o.refreshModel?o.refreshModel(t):t.step==="everything"?(s=(i=this.gridApi).refreshClientSideRowModel)==null||s.call(i):(r=(n=this.gridApi).refreshClientSideRowModel)==null||r.call(n,{step:"map"})}getColumns(){return this.gridApi.getAllGridColumns().map(t=>{var i,s;const o=(s=(i=t.getColDef)==null?void 0:i.call(t))==null?void 0:s.cellDataType;return{colId:t.getColId(),cellDataType:typeof o=="string"?o:void 0}})}}const Ja=(e,t)=>{if(t.length===0)return[];const o=new Set(t),i=[];return e.forEachNode(s=>{const n=s.data;n&&typeof n.getId=="function"&&o.has(n.getId())&&i.push(s)}),i},Iy=(e,t,o)=>{!e||t.length===0||e.setNodesSelected({nodes:Ja(e,t),newValue:!0,source:o})},Ay=(e,t,o)=>{!e||t.length===0||e.setNodesSelected({nodes:Ja(e,t),newValue:!1,source:o})},ed=(e,t)=>{var P;const o=E.ref(),i=E.ref(),s=E.ref({height:`calc(100% - ${e.footerHeight??0}px)`,width:"100%"}),n=new Set(["columnSizing","columnVisibility","columnPinning","columnOrder"]),r=E.ref(0),l=E.ref(),{onBodyScrollEnd:a}=Xa({onVScrollEnd(){u.value.getRows(Vt.nextPage(c.value,e.onError))}}),d=({data:T})=>T.id,c=E.ref(new $a(e.rowIdMapper)),u=E.ref(new _a(e.rowData,c.value)),{initGridState:h,resetGridState:g,storeGridState:p,restoreGridState:f}=qa(e.instanceCtx,e.id,o,l,e.currentInstance),C=async T=>{D(),c.value.pageSize=e.pageSize,c.value.bridge=new Ty(T.api),u.value.api=T.api,T.api.getAllGridColumns(),o.value=T.api,h(),await f(),await I(),T.api.setGridOption("popupParent",document.querySelector("body"))},m=()=>{u.value.loadData()},w=async(T,V=0)=>{c.value.insertRows(T,V),m()},b=T=>c.value.getRows().some(V=>V.getId()===T.getId()),v=()=>c.value.getRows(),S=()=>{var z,de;const T=i.value.querySelector(".ag-body-viewport"),V=Number.parseFloat(T.querySelector(".ag-center-cols-container").style.height),B=i.value.querySelector(".ag-header").offsetHeight,W=(de=(z=i.value.querySelector(".ag-overlay-no-rows-wrapper"))==null?void 0:z.querySelector(".el-empty"))==null?void 0:de.offsetHeight;V<r.value?s.value.height=`${B+(W||V)+(e.footerHeight?2:11)}px`:s.value.height.includes("100%")||(s.value.height=`calc(100% - ${e.footerHeight??0}px)`)},D=()=>{const T=i.value.querySelector(".ag-body-viewport");l.value=T.offsetWidth,r.value=T.offsetHeight},I=()=>new Promise((T,V)=>{c.value.isFinished=!1;const B=Vt.from(1,c.value.pageSize,c.value,e.onError);B.onFirstPageLoaded=W=>{E.nextTick(()=>{var z;return(z=e.onFirstPageLoaded)==null?void 0:z.call(e,W)})},B.context={resolve:T,reject:V},u.value.getRows(B),u.value.api.getDisplayedRowCount()>0&&u.value.api.ensureIndexVisible(0)}),O=E.computed(()=>{var T,V;return{onGridReady:C,onBodyScrollEnd:a,scrollbarWidth:8,getRowId:d,columnDefs:e.columns,preventDefaultOnContextMenu:!0,suppressRowTransform:!0,suppressRowHoverHighlight:!0,selectionColumnDef:{pinned:"left",rowSpan:({data:B,column:W})=>B.getRowSpan(W),cellClassRules:gn(Za,(T=e.gridOptions)==null?void 0:T.rowClassRules)},defaultColGroupDef:{marryChildren:!0},onStateUpdated(B){B.sources.some(W=>n.has(W))&&p()},onSortChanged(B){B.source==="uiColumnSorted"&&p()},context:{refresh:I,reload:m},onRowDataUpdated(){E.nextTick(()=>{S()})},defaultColDef:{rowSpan({column:B,data:W}){return W.getRowSpan(B)},cellClassRules:gn(Qa,(V=e.gridOptions)==null?void 0:V.rowClassRules),suppressFloatingFilterButton:!0,enableCellChangeFlash:!0,tooltipValueGetter(B){return B.valueFormatted},resizable:!0,sortable:!1,headerComponent:"HeaderRenderer",cellRenderer:"CellRenderer",valueGetter({column:B,data:W}){return W.getValue(B)},valueFormatter({value:B}){return B}},...Ya({options:e.gridOptions??{},elRef:i,editable:e.editable,onRowChange:e.onRowChange,onMessageError:e.onError,findOtherEditingCell:B=>c.value.getRows().find(W=>W instanceof Pi&&W.getRowId()!==B),isCellEditable:(B,W)=>{var de;const z=(de=B.getColDef)==null?void 0:de.call(B);return typeof(z==null?void 0:z.editable)=="function"?z.editable({column:B,colDef:z,node:W,data:W.data}):(z==null?void 0:z.editable)!==!1}}),onBodyScroll(B){F.left=B.left,F.top=B.top},...Ua}}),F={left:0,top:0};return(P=t==null?void 0:t.onActivated)==null||P.call(t,()=>{}),{gridOptions:O,datasource:u,gridStyles:s,dataCache:c,gridApi:o,gridElRef:i,resetGridState:g,reload:m,insertRows:w,existRow:b,getRows:v,refresh:I,selectByIds:(T,V)=>Iy(o.value,T,V),deselectByIds:(T,V)=>Ay(o.value,T,V)}},td=(e,t,o)=>{const i=E.ref(),s=E.ref([{}]),n=E.computed(()=>e.footerHeight?{height:`${e.footerHeight+10}px`}:{});E.watch(()=>[s.value,i.value],()=>{var d;s.value&&i.value&&((d=i.value)==null||d.setGridOption("rowData",s.value.map((c,u)=>({id:`footer-${u}`,...c}))))});const r=d=>!!d.children,l=d=>{var c;return r(d)?{headerName:d.headerName,groupId:d.groupId,children:[...d.children.map(u=>l(u))]}:{width:d.width,headerName:d.headerName,field:d.field,cellRendererParams:{render:(c=d.cellRendererParams)==null?void 0:c.footerRender}}},a=E.computed(()=>{var d;return{scrollbarWidth:8,suppressRowTransform:!0,suppressRowHoverHighlight:!0,columnDefs:e.columns.map(c=>l(c)),defaultColGroupDef:{marryChildren:!0},rowSelection:(d=e.gridOptions)!=null&&d.rowSelection?{mode:"singleRow",isRowSelectable:()=>!1,hideDisabledCheckboxes:!0}:void 0,rowHeight:e.footerHeight,headerHeight:0,alwaysShowVerticalScroll:o.value.height.includes("100%"),defaultColDef:{suppressFloatingFilterButton:!0,cellRenderer:"FooterCellRender",enableCellChangeFlash:!0,tooltipValueGetter(c){return c.value}},onGridReady(c){i.value=c.api,c.api.setGridOption("popupParent",document.querySelector("body"))},alignedGrids:()=>{const c=t.value;if(!c)return[];const u=c.api??(typeof c.addEventListener=="function"?c:void 0);return u?[u]:[]}}});return{setFooterData:d=>{s.value=d},footerGridApi:i,footerData:s,footerStyles:n,footerGridOptions:a}};class My extends x{constructor(){super(...arguments);R(this,"beanName","selectionColSvc");R(this,"columns")}postConstruct(){this.addManagedPropertyListener("rowSelection",o=>{this.onSelectionOptionsChanged(o.currentValue,o.previousValue,St(o.source))}),this.addManagedPropertyListener("selectionColumnDef",this.updateColumns.bind(this))}addColumns(o){const i=this.columns;i!=null&&(o.list=i.list.concat(o.list),o.tree=i.tree.concat(o.tree),Wc(o))}createColumns(o,i){var u,h;const s=()=>{var g;zo(this.beans,(g=this.columns)==null?void 0:g.tree),this.columns=null},n=o.treeDepth,r=(((u=this.columns)==null?void 0:u.treeDepth)??-1)==n,l=this.generateSelectionCols();if(_c(l,((h=this.columns)==null?void 0:h.list)??[])&&r)return;s();const{colGroupSvc:a}=this.beans,d=(a==null?void 0:a.findDepth(o.tree))??0,c=(a==null?void 0:a.balanceTreeForAutoCols(l,d))??[];this.columns={list:l,tree:c,treeDepth:d,map:{}},i(g=>{if(!g)return null;const p=g.filter(f=>!tt(f));return[...l,...p]})}updateColumns(o){var s;const i=St(o.source);(s=this.columns)==null||s.list.forEach(n=>{const r=this.createSelectionColDef(o.currentValue);n.setColDef(r,null,i),ve(this.beans,{state:[{...r,colId:n.getColId()}]},i)})}getColumn(o){var i;return((i=this.columns)==null?void 0:i.list.find(s=>wr(s,o)))??null}getColumns(){var o;return((o=this.columns)==null?void 0:o.list)??null}isSelectionColumnEnabled(){var a,d;const{gos:o,beans:i}=this,s=o.get("rowSelection");if(typeof s!="object"||!Qe(o))return!1;const n=(((d=(a=i.autoColSvc)==null?void 0:a.getColumns())==null?void 0:d.length)??0)>0;if(s.checkboxLocation==="autoGroupColumn"&&n)return!1;const r=!!wt(s),l=Lo(s);return r||l}createSelectionColDef(o){const{gos:i}=this,s=o??i.get("selectionColumnDef"),n=i.get("enableRtl"),{rowSpan:r,spanRows:l,...a}=s??{};return{width:50,resizable:!1,suppressHeaderMenuButton:!0,sortable:!1,suppressMovable:!0,lockPosition:n?"right":"left",comparator(d,c,u,h){const g=u.isSelected(),p=h.isSelected();return g===p?0:g?1:-1},editable:!1,suppressFillHandle:!0,pinned:"left",rowSpan:r,...a,colId:pr,chartDataType:"excluded"}}generateSelectionCols(){if(!this.isSelectionColumnEnabled())return[];const o=this.createSelectionColDef(),i=o.colId;this.gos.validateColDef(o,i,!0);const s=new We(o,null,i,!1);return this.createBean(s),[s]}onSelectionOptionsChanged(o,i,s){const n=i&&typeof i!="string"?wt(i):void 0,r=o&&typeof o!="string"?wt(o):void 0,l=n!==r,a=i&&typeof i!="string"?Lo(i):void 0,d=o&&typeof o!="string"?Lo(o):void 0,c=a!==d,u=Go(o),h=Go(i);(l||c||u!==h)&&this.beans.colModel.refreshAll(s)}destroy(){var o;zo(this.beans,(o=this.columns)==null?void 0:o.tree),super.destroy()}refreshVisibility(o,i,s){var a,d;if(!((a=this.columns)!=null&&a.list.length))return;const n=o.length+i.length+s.length;if(n===0)return;const r=this.columns.list[0];if(!r.isVisible())return;const l=()=>{let c;switch(r.pinned){case"left":case!0:c=o;break;case"right":c=s;break;default:c=i}c&&we(c,r)};((d=this.beans.rowNumbersSvc)!=null&&d.getColumn(fr)?2:1)===n&&l()}}const Ii="34.1.1";function od(e){const t=e.get("rowSelection");return typeof t=="object"&&t.masterSelects||"self"}function Ai(e){return!!(e.rowPinned&&e.pinnedSibling)}function ky(e,t=!0){const o=e.get("rowSelection");return typeof o!="object"?t?"all":void 0:o.mode==="multiRow"?o.selectAll:"all"}function id(e,t){return t===void 0?e("ariaIndeterminate","indeterminate"):t===!0?e("ariaChecked","checked"):e("ariaUnchecked","unchecked")}function me(e,t,o,i){const s=t==="top";if(!o)return me(e,t,s?e.getPinnedTopRow(0):e.getPinnedBottomRow(0),i);if(!i){const a=s?e.getPinnedTopRowCount():e.getPinnedBottomRowCount();return me(e,t,o,s?e.getPinnedTopRow(a-1):e.getPinnedBottomRow(a-1))}let n=!1,r=!1;const l=[];return e.forEachPinnedRow(t,a=>{if(a===o&&!n){n=!0,l.push(a);return}if(n&&a===i){r=!0,l.push(a);return}n&&!r&&l.push(a)}),l}function pn(e){return(e==null?void 0:e.hideDisabledCheckboxes)??!1}function sd(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 Ly(e){const t=sd(e);return t===!0||t==="enableDeselection"}function Gy(e){const t=sd(e);return t===!0||t==="enableSelection"}function Hy(e){const t=e.get("rowSelection");return typeof t=="string"?e.get("rowMultiSelectWithClick"):(t==null?void 0:t.enableSelectionWithoutKeys)??!1}function Oy(e,t){var n;if(!t.nodes.every(r=>r.rowPinned&&!Ai(r)?(k(59),!1):r.id===void 0?(k(60),!1):!0))return;const{nodes:o,source:i,newValue:s}=t;(n=e.selectionSvc)==null||n.setNodesSelected({nodes:o,source:i??"api",newValue:s})}function By(e,t,o="apiSelectAll"){var i;(i=e.selectionSvc)==null||i.selectAllRowNodes({source:o,selectAll:t})}function Vy(e,t,o="apiSelectAll"){var i;(i=e.selectionSvc)==null||i.deselectAllRowNodes({source:o,selectAll:t})}function Ny(e){var t;return((t=e.selectionSvc)==null?void 0:t.getSelectedNodes())??[]}function _y(e){var t;return((t=e.selectionSvc)==null?void 0:t.getSelectedRows())??[]}const Wy={tag:"div",cls:"ag-selection-checkbox",role:"presentation",children:[{tag:"ag-checkbox",ref:"eCheckbox",role:"presentation"}]};class zy extends j{constructor(){super(Wy,[Gs]);R(this,"eCheckbox",A);R(this,"rowNode");R(this,"column");R(this,"overrides")}postConstruct(){this.eCheckbox.setPassive(!0)}onDataChanged(){this.onSelectionChanged()}onSelectableChanged(){this.showOrHideSelect()}onSelectionChanged(){const o=this.getLocaleTextFunc(),{rowNode:i,eCheckbox:s}=this,n=i.isSelected(),r=id(o,n),[l,a]=i.selectable?["ariaRowToggleSelection","Press Space to toggle row selection"]:["ariaRowSelectionDisabled","Row Selection is disabled for this row"],d=o(l,a);s.setValue(n,!0),s.setInputAriaLabel(`${d} (${r})`)}init(o){if(this.rowNode=o.rowNode,this.column=o.column,this.overrides=o.overrides,this.onSelectionChanged(),this.addManagedListeners(this.eCheckbox.getInputElement(),{dblclick:vt,click:i=>{var s;vt(i),(s=this.beans.selectionSvc)==null||s.handleSelectionEvent(i,this.rowNode,"checkboxSelected")}}),this.addManagedListeners(this.rowNode,{rowSelected:this.onSelectionChanged.bind(this),dataChanged:this.onDataChanged.bind(this),selectableChanged:this.onSelectableChanged.bind(this)}),this.addManagedPropertyListener("rowSelection",({currentValue:i,previousValue:s})=>{const n=typeof i=="object"?pn(i):void 0,r=typeof s=="object"?pn(s):void 0;n!==r&&this.onSelectableChanged()}),rs(this.gos)||typeof this.getIsVisible()=="function"){const i=this.showOrHideSelect.bind(this);this.addManagedEventListeners({displayedColumnsChanged:i}),this.addManagedListeners(this.rowNode,{dataChanged:i,cellChanged:i}),this.showOrHideSelect()}this.eCheckbox.getInputElement().setAttribute("tabindex","-1")}showOrHideSelect(){const{column:o,rowNode:i,overrides:s,gos:n}=this,r=i.selectable,l=this.getIsVisible();let a;if(typeof l=="function"){const g=s==null?void 0:s.callbackParams;if(!o)a=l({...g,node:i,data:i.data});else{const p=o.createColumnFunctionCallbackParams(i);a=l({...g,...p})}}else a=l??!1;const d=r&&!a||!r&&a,c=r||a,u=n.get("rowSelection"),h=u&&typeof u!="string"?!pn(u):!!(o!=null&&o.getColDef().showDisabledCheckboxes);if(this.setVisible(c&&(d?h:!0)),this.setDisplayed(c&&(d?h:!0)),c&&this.eCheckbox.setDisabled(d),s==null?void 0:s.removeHidden){this.setDisplayed(c);return}}getIsVisible(){var s,n;const o=this.overrides;if(o)return o.isVisible;const i=this.gos.get("rowSelection");return i&&typeof i!="string"?wt(i):(n=(s=this.column)==null?void 0:s.getColDef())==null?void 0:n.checkboxSelection}}class $y{constructor(t,o){R(this,"rowModel");R(this,"pinnedRowModel");R(this,"selectAll",!1);R(this,"rootId",null);R(this,"endId",null);R(this,"cachedRange",[]);this.rowModel=t,this.pinnedRowModel=o}reset(){this.rootId=null,this.endId=null,this.cachedRange.length=0}setRoot(t){this.rootId=t.id,this.endId=null,this.cachedRange.length=0}setEndRange(t){this.endId=t.id,this.cachedRange.length=0}getRange(){if(this.cachedRange.length===0){const t=this.getRoot(),o=this.getEnd();if(t==null||o==null)return this.cachedRange;this.cachedRange=this.getNodesInRange(t,o)??[]}return this.cachedRange}isInRange(t){return this.rootId===null?!1:this.getRange().some(o=>o.id===t.id)}getRoot(t){if(this.rootId)return this.getRowNode(this.rootId);if(t)return this.setRoot(t),t}getEnd(){if(this.endId)return this.getRowNode(this.endId)}getRowNode(t){let o;const{rowModel:i,pinnedRowModel:s}=this;return o??(o=i.getRowNode(t)),s!=null&&s.isManual()&&(o??(o=s.getPinnedRowById(t,"top")),o??(o=s.getPinnedRowById(t,"bottom"))),o}truncate(t){const o=this.getRange();if(o.length===0)return{keep:[],discard:[]};const i=o[0].id===this.rootId,s=o.findIndex(n=>n.id===t.id);if(s>-1){const n=o.slice(0,s),r=o.slice(s+1);return this.setEndRange(t),i?{keep:n,discard:r}:{keep:r,discard:n}}else return{keep:o,discard:[]}}extend(t,o=!1){const i=this.getRoot();if(i==null){const n=this.getRange().slice();return o&&t.depthFirstSearch(r=>!r.group&&n.push(r)),n.push(t),this.setRoot(t),{keep:n,discard:[]}}const s=this.getNodesInRange(i,t);if(!s)return this.setRoot(t),{keep:[t],discard:[]};if(s.find(n=>n.id===this.endId))return this.setEndRange(t),{keep:this.getRange(),discard:[]};{const n=this.getRange().slice();return this.setEndRange(t),{keep:this.getRange(),discard:n}}}getNodesInRange(t,o){const{pinnedRowModel:i,rowModel:s}=this;if(!(i!=null&&i.isManual()))return s.getNodesInRangeForSelection(t,o);if(t.rowPinned==="top"&&!o.rowPinned)return me(i,"top",t,void 0).concat(s.getNodesInRangeForSelection(s.getRow(0),o)??[]);if(t.rowPinned==="bottom"&&!o.rowPinned){const n=me(i,"bottom",void 0,t),r=s.getRowCount(),l=s.getRow(r-1);return(s.getNodesInRangeForSelection(o,l)??[]).concat(n)}if(!t.rowPinned&&!o.rowPinned)return s.getNodesInRangeForSelection(t,o);if(t.rowPinned==="top"&&o.rowPinned==="top")return me(i,"top",t,o);if(t.rowPinned==="bottom"&&o.rowPinned==="top"){const n=me(i,"top",o,void 0),r=me(i,"bottom",void 0,t),l=s.getRow(0),a=s.getRow(s.getRowCount()-1);return n.concat(s.getNodesInRangeForSelection(l,a)??[]).concat(r)}if(!t.rowPinned&&o.rowPinned==="top")return me(i,"top",o,void 0).concat(s.getNodesInRangeForSelection(s.getRow(0),t)??[]);if(t.rowPinned==="top"&&o.rowPinned==="bottom"){const n=me(i,"top",t,void 0),r=me(i,"bottom",void 0,o),l=s.getRow(0),a=s.getRow(s.getRowCount()-1);return n.concat(s.getNodesInRangeForSelection(l,a)??[]).concat(r)}if(t.rowPinned==="bottom"&&o.rowPinned==="bottom")return me(i,"bottom",t,o);if(!t.rowPinned&&o.rowPinned==="bottom"){const n=me(i,"bottom",void 0,o),r=s.getRow(s.getRowCount());return(s.getNodesInRangeForSelection(t,r)??[]).concat(n)}return null}}class Uy extends x{constructor(o){super();R(this,"column");R(this,"cbSelectAllVisible",!1);R(this,"processingEventFromCheckbox",!1);R(this,"headerCellCtrl");R(this,"cbSelectAll");this.column=o}onSpaceKeyDown(o){const i=this.cbSelectAll;i.isDisplayed()&&!i.getGui().contains(Y(this.beans))&&(o.preventDefault(),i.setValue(!i.getValue()))}getCheckboxGui(){return this.cbSelectAll.getGui()}setComp(o){this.headerCellCtrl=o;const i=this.createManagedBean(new wl);this.cbSelectAll=i,i.addCss("ag-header-select-all"),Be(i.getGui(),"presentation"),this.showOrHideSelectAll();const s=this.updateStateOfCheckbox.bind(this);this.addManagedEventListeners({newColumnsLoaded:()=>this.showOrHideSelectAll(),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this),selectionChanged:s,paginationChanged:s,modelUpdated:s}),this.addManagedPropertyListener("rowSelection",({currentValue:n,previousValue:r})=>{const l=a=>typeof a=="string"||!a||a.mode==="singleRow"?void 0:a.selectAll;l(n)!==l(r)&&this.showOrHideSelectAll(),this.updateStateOfCheckbox()}),this.addManagedListeners(i,{fieldValueChanged:this.onCbSelectAll.bind(this)}),i.getInputElement().setAttribute("tabindex","-1"),this.refreshSelectAllLabel()}onDisplayedColumnsChanged(o){this.isAlive()&&this.showOrHideSelectAll(o.source==="uiColumnMoved")}showOrHideSelectAll(o=!1){const i=this.isCheckboxSelection();this.cbSelectAllVisible=i,this.cbSelectAll.setDisplayed(i),i&&(this.checkRightRowModelType("selectAllCheckbox"),this.checkSelectionType("selectAllCheckbox"),this.updateStateOfCheckbox()),this.refreshSelectAllLabel(o)}updateStateOfCheckbox(){if(!this.cbSelectAllVisible||this.processingEventFromCheckbox)return;this.processingEventFromCheckbox=!0;const o=this.getSelectAllMode(),i=this.beans.selectionSvc,s=this.cbSelectAll,n=i.getSelectAllState(o);s.setValue(n);const r=i.hasNodesToSelect(o);s.setDisabled(!r),this.refreshSelectAllLabel(),this.processingEventFromCheckbox=!1}refreshSelectAllLabel(o=!1){const i=this.getLocaleTextFunc(),{headerCellCtrl:s,cbSelectAll:n,cbSelectAllVisible:r}=this,l=n.getValue(),a=id(i,l),d=i("ariaRowSelectAll","Press Space to toggle all rows selection");s.setAriaDescriptionProperty("selectAll",r?`${d} (${a})`:null),n.setInputAriaLabel(i("ariaHeaderSelection","Column with Header Selection")),o||s.announceAriaDescription()}checkSelectionType(o){return Qt(this.gos)?!0:(k(128,{feature:o}),!1)}checkRightRowModelType(o){const{gos:i,rowModel:s}=this.beans;return oe(i)||Mo(i)?!0:(k(129,{feature:o,rowModel:s.getType()}),!1)}onCbSelectAll(){if(this.processingEventFromCheckbox||!this.cbSelectAllVisible)return;const o=this.cbSelectAll.getValue(),i=this.getSelectAllMode();let s="uiSelectAll";i==="currentPage"?s="uiSelectAllCurrentPage":i==="filtered"&&(s="uiSelectAllFiltered");const n={source:s,selectAll:i},r=this.beans.selectionSvc;o?r.selectAllRowNodes(n):r.deselectAllRowNodes(n)}isCheckboxSelection(){const{column:o,gos:i,beans:s}=this,n=typeof i.get("rowSelection")=="object"?"headerCheckbox":"headerCheckboxSelection";return nd(s,o)&&this.checkRightRowModelType(n)&&this.checkSelectionType(n)}getSelectAllMode(){const o=ky(this.gos,!1);if(o)return o;const{headerCheckboxSelectionCurrentPageOnly:i,headerCheckboxSelectionFilteredOnly:s}=this.column.getColDef();return i?"currentPage":s?"filtered":"all"}destroy(){super.destroy(),this.cbSelectAll=void 0,this.headerCellCtrl=void 0}}function nd({gos:e,selectionColSvc:t},o){const i=e.get("rowSelection"),s=o.getColDef(),{headerCheckboxSelection:n}=s;let r=!1;if(typeof i=="object"){const l=tt(o),a=mr(o);(Go(i)==="autoGroupColumn"&&a||l&&(t!=null&&t.isSelectionColumnEnabled()))&&(r=Lo(i))}else typeof n=="function"?r=n(_(e,{column:o,colDef:s})):r=!!n;return r}class Ky extends x{constructor(){super(...arguments);R(this,"isRowSelectable");R(this,"selectionCtx")}postConstruct(){const{gos:o,beans:i}=this;this.selectionCtx=new $y(i.rowModel,i.pinnedRowModel),this.addManagedPropertyListeners(["isRowSelectable","rowSelection"],()=>{const s=rs(o);s!==this.isRowSelectable&&(this.isRowSelectable=s,this.updateSelectable())}),this.isRowSelectable=rs(o),this.addManagedEventListeners({cellValueChanged:s=>this.updateRowSelectable(s.node),rowNodeDataChanged:s=>this.updateRowSelectable(s.node)})}destroy(){super.destroy(),this.selectionCtx.reset()}createCheckboxSelectionComponent(){return new zy}createSelectAllFeature(o){if(nd(this.beans,o))return new Uy(o)}isMultiSelect(){return Qt(this.gos)}onRowCtrlSelected(o,i,s){const n=!!o.rowNode.isSelected();o.forEachGui(s,r=>{r.rowComp.toggleCss("ag-row-selected",n);const l=r.element;Hi(l,n),l.contains(Y(this.beans))&&i(r)})}announceAriaRowSelection(o){var n;if(this.isRowSelectionBlocked(o))return;const i=o.isSelected();if(!o.selectable)return;const s=this.getLocaleTextFunc()(i?"ariaRowDeselect":"ariaRowSelect",`Press SPACE to ${i?"deselect":"select"} this row`);(n=this.beans.ariaAnnounce)==null||n.announceValue(s,"rowSelection")}isRowSelectionBlocked(o){return!o.selectable||o.rowPinned&&!Ai(o)||!Qe(this.gos)}updateRowSelectable(o,i){var n;const s=o.rowPinned&&o.pinnedSibling?o.pinnedSibling.selectable:((n=this.isRowSelectable)==null?void 0:n.call(this,o))??!0;return this.setRowSelectable(o,s,i),s}setRowSelectable(o,i,s){if(o.selectable!==i){if(o.selectable=i,o.dispatchRowEvent("selectableChanged"),s)return;if(Xt(this.gos)){const n=this.calculateSelectedFromChildren(o);this.setNodesSelected({nodes:[o],newValue:n??!1,source:"selectableChanged"});return}o.isSelected()&&!o.selectable&&this.setNodesSelected({nodes:[o],newValue:!1,source:"selectableChanged"})}}calculateSelectedFromChildren(o){var n;let i=!1,s=!1;if(!((n=o.childrenAfterGroup)!=null&&n.length))return o.selectable?o.__selected:null;for(let r=0;r<o.childrenAfterGroup.length;r++){const l=o.childrenAfterGroup[r];let a=l.isSelected();if(!l.selectable){const d=this.calculateSelectedFromChildren(l);if(d===null)continue;a=d}switch(a){case!0:i=!0;break;case!1:s=!0;break;default:return}}if(!(i&&s))return i?!0:s?!1:o.selectable?o.__selected:null}selectRowNode(o,i,s,n="api"){const r=!o.selectable&&i,l=o.__selected===i;if(r||l)return!1;o.__selected=i,o.dispatchRowEvent("rowSelected");const a=o.sibling;a&&a.footer&&a.__localEventService&&a.dispatchRowEvent("rowSelected");const d=o.pinnedSibling;return d&&d.rowPinned&&d.__localEventService&&d.dispatchRowEvent("rowSelected"),this.eventSvc.dispatchEvent({...Bh(o,this.gos,"rowSelected"),event:s||null,source:n}),!0}isCellCheckboxSelection(o,i){const s=this.gos.get("rowSelection");if(s&&typeof s!="string"){const n=tt(o)&&wt(s);return o.isColumnFunc(i,n)}else return o.isColumnFunc(i,o.colDef.checkboxSelection)}inferNodeSelections(o,i,s,n){const{gos:r,selectionCtx:l}=this,a=o.isSelected(),d=Xt(r),c=Gy(r),u=Ly(r),h=this.isMultiSelect(),g=n==="rowClicked";if(g&&!(c||u))return null;if(i&&s&&h){const p=l.getRoot();if(p)if(p.isSelected()){const f=l.isInRange(o)?l.truncate(o):l.extend(o,d);return{deselect:f.discard,select:f.keep,reset:!1}}else{const f=l.extend(o,d);return{select:[],deselect:f.keep,reset:!1}}else return null}else if(i&&h){const p=l.selectAll?this.beans.rowModel.getRow(0):void 0,f=l.getRoot(p),C=l.isInRange(o)?l.truncate(o):l.extend(o,d);return{select:C.keep,deselect:C.discard,reset:l.selectAll||!!(f&&!f.isSelected())}}else if(s){if(g){const p=!a;return p&&!c||!p&&!u?null:(l.setRoot(o),{node:o,newValue:p,clearSelection:!1})}return l.setRoot(o),{node:o,newValue:!a,clearSelection:!h}}else{l.setRoot(o);const p=Hy(r),f=Oo(r)==="filteredDescendants",C=g&&(!p||!c);if(f&&a===void 0&&oe(r))return{node:o,newValue:!1,clearSelection:!h||C};if(g){const m=a?!p:c;return m===a&&!C||m&&!c||!m&&!u?null:{node:o,newValue:m,clearSelection:!h||C,keepDescendants:o.group&&d}}return{node:o,newValue:!a,clearSelection:!h||C}}}}class jy extends Ky{constructor(){super(...arguments);R(this,"beanName","selectionSvc");R(this,"selectedNodes",new Map);R(this,"detailSelection",new Map);R(this,"groupSelectsDescendants");R(this,"groupSelectsFiltered");R(this,"mode");R(this,"masterSelectsDetail",!1)}postConstruct(){super.postConstruct();const{gos:o}=this;this.mode=Ho(o),this.groupSelectsDescendants=Xt(o),this.groupSelectsFiltered=Oo(o)==="filteredDescendants",this.masterSelectsDetail=od(o)==="detail",this.addManagedPropertyListeners(["groupSelectsChildren","groupSelectsFiltered","rowSelection"],()=>{const i=Xt(o),s=Ho(o),n=Oo(o)==="filteredDescendants";this.masterSelectsDetail=od(o)==="detail",(i!==this.groupSelectsDescendants||n!==this.groupSelectsFiltered||s!==this.mode)&&(this.deselectAllRowNodes({source:"api"}),this.groupSelectsDescendants=i,this.groupSelectsFiltered=n,this.mode=s)}),this.addManagedEventListeners({rowSelected:this.onRowSelected.bind(this)})}destroy(){super.destroy(),this.resetNodes()}handleSelectionEvent(o,i,s){if(this.isRowSelectionBlocked(i))return 0;const n=this.inferNodeSelections(i,o.shiftKey,o.metaKey||o.ctrlKey,s);return n==null?0:(this.selectionCtx.selectAll=!1,"select"in n?(n.reset?this.resetNodes():this.selectRange(n.deselect,!1,s),this.selectRange(n.select,!0,s)):this.setNodesSelected({nodes:[n.node],newValue:n.newValue,clearSelection:n.clearSelection,keepDescendants:n.keepDescendants,event:o,source:s}))}setNodesSelected({newValue:o,clearSelection:i,suppressFinishActions:s,nodes:n,event:r,source:l,keepDescendants:a=!1}){var c;if(!Qe(this.gos)&&o)return k(132),0;if(n.length===0)return 0;if(n.length>1&&!this.isMultiSelect())return k(130),0;let d=0;for(let u=0;u<n.length;u++){const h=n[u],g=Nt(h),p=this.groupSelectsFiltered&&g.group;if(g.rowPinned&&!Ai(g)){k(59);continue}if(g.id===void 0){k(60);continue}p||this.selectRowNode(g,o,r,l)&&(this.detailSelection.delete(g.id),d++),this.groupSelectsDescendants&&((c=g.childrenAfterGroup)!=null&&c.length)&&(d+=this.selectChildren(g,o,l))}return s||(n.length===1&&l==="api"&&this.selectionCtx.setRoot(Nt(n[0])),o&&(i||!this.isMultiSelect())&&(d+=this.clearOtherNodes(Nt(n[0]),a,l)),d>0&&(this.updateGroupsFromChildrenSelections(l),this.dispatchSelectionChanged(l))),d}selectRange(o,i,s){let n=0;return o.forEach(r=>{const l=Nt(r);l.group&&this.groupSelectsDescendants||this.selectRowNode(l,i,void 0,s)&&n++}),n>0&&(this.updateGroupsFromChildrenSelections(s),this.dispatchSelectionChanged(s)),n}selectChildren(o,i,s){const n=this.groupSelectsFiltered?o.childrenAfterAggFilter:o.childrenAfterGroup;return n?this.setNodesSelected({newValue:i,clearSelection:!1,suppressFinishActions:!0,source:s,nodes:n}):0}getSelectedNodes(){return Array.from(this.selectedNodes.values())}getSelectedRows(){const o=[];return this.selectedNodes.forEach(i=>i.data&&o.push(i.data)),o}getSelectionCount(){return this.selectedNodes.size}filterFromSelection(o){const i=new Map;this.selectedNodes.forEach((s,n)=>{o(s)&&i.set(n,s)}),this.selectedNodes=i}updateGroupsFromChildrenSelections(o,i){if(!this.groupSelectsDescendants)return!1;const{gos:s,rowModel:n}=this.beans;if(!oe(s))return!1;const r=n.rootNode;if(!r)return!1;i||(i=new Ci(!0,r),i.active=!1);let l=!1;return i.forEachChangedNodeDepthFirst(a=>{if(a!==r){const d=this.calculateSelectedFromChildren(a);l=this.selectRowNode(a,d===null?!1:d,void 0,o)||l}}),l}clearOtherNodes(o,i,s){const n=new Map;let r=0;return this.selectedNodes.forEach(l=>{const a=l.id==o.id;if((!i||!Yy(o,l))&&!a){const d=this.selectedNodes.get(l.id);r+=this.setNodesSelected({nodes:[d],newValue:!1,clearSelection:!1,suppressFinishActions:!0,source:s}),this.groupSelectsDescendants&&l.parent&&n.set(l.parent.id,l.parent)}}),n.forEach(l=>{const a=this.calculateSelectedFromChildren(l);this.selectRowNode(l,a===null?!1:a,void 0,s)}),r}onRowSelected(o){const i=o.node;this.groupSelectsDescendants&&i.group||(i.isSelected()?this.selectedNodes.set(i.id,i):this.selectedNodes.delete(i.id))}syncInRowNode(o,i){this.syncInOldRowNode(o,i),this.syncInNewRowNode(o)}createDaemonNode(o){if(!o.id)return;const i=new so(this.beans);return i.id=o.id,i.data=o.data,i.__daemon=!0,i.__selected=o.__selected,i.level=o.level,i}syncInOldRowNode(o,i){i&&o.id!==i.id&&this.selectedNodes.get(i.id)==o&&this.selectedNodes.set(i.id,i)}syncInNewRowNode(o){this.selectedNodes.has(o.id)?(o.__selected=!0,this.selectedNodes.set(o.id,o)):o.__selected=!1}reset(o){const i=this.getSelectionCount();this.resetNodes(),i&&this.dispatchSelectionChanged(o)}resetNodes(){this.selectedNodes.forEach(o=>{this.selectRowNode(o,!1)}),this.selectedNodes.clear()}getBestCostNodeSelection(){const{gos:o,rowModel:i}=this.beans;if(!oe(o))return;const s=i.getTopLevelNodes();if(s===null)return;const n=[];function r(l){for(let a=0,d=l.length;a<d;a++){const c=l[a];c.isSelected()?n.push(c):c.group&&c.childrenAfterGroup&&r(c.childrenAfterGroup)}}return r(s),n}isEmpty(){return this.getSelectionCount()===0}deselectAllRowNodes({source:o,selectAll:i}){const s=oe(this.gos);let n=!1;const r=l=>{const a=this.selectRowNode(Nt(l),!1,void 0,o);n||(n=a)};if(i==="currentPage"||i==="filtered"){if(!s){U(102);return}this.getNodesToSelect(i).forEach(r)}else this.selectedNodes.forEach(r),this.reset(o);if(this.selectionCtx.selectAll=!1,s&&this.groupSelectsDescendants){const l=this.updateGroupsFromChildrenSelections(o);n||(n=l)}n&&this.dispatchSelectionChanged(o)}getSelectedCounts(o){let i=0,s=0;return this.getNodesToSelect(o).forEach(n=>{this.groupSelectsDescendants&&n.group||(n.isSelected()?i++:n.selectable&&s++)}),{selectedCount:i,notSelectedCount:s}}getSelectAllState(o){const{selectedCount:i,notSelectedCount:s}=this.getSelectedCounts(o);return rd(i,s)??null}hasNodesToSelect(o){return this.getNodesToSelect(o).filter(i=>i.selectable).length>0}getNodesToSelect(o){if(!this.canSelectAll())return[];const i=[],s=r=>i.push(r);if(o==="currentPage")return this.forEachNodeOnPage(r=>{if(!r.group){s(r);return}if(!r.expanded&&!r.footer){const l=a=>{var d;s(a),(d=a.childrenAfterFilter)==null||d.forEach(l)};l(r);return}this.groupSelectsDescendants||s(r)}),i;const n=this.beans.rowModel;return o==="filtered"?(n.forEachNodeAfterFilter(s),i):(n.forEachNode(s),i)}forEachNodeOnPage(o){const{pageBounds:i,rowModel:s}=this.beans,n=i.getFirstRow(),r=i.getLastRow();for(let l=n;l<=r;l++){const a=s.getRow(l);a&&o(a)}}selectAllRowNodes(o){const{gos:i,selectionCtx:s}=this;if(!Qe(i)){k(132);return}if(Sc(i)&&!Qt(i)){k(130);return}if(!this.canSelectAll())return;const{source:n,selectAll:r}=o;let l=!1;if(this.getNodesToSelect(r).forEach(a=>{const d=this.selectRowNode(Nt(a),!0,void 0,n);l||(l=d)}),s.selectAll=!0,oe(i)&&this.groupSelectsDescendants){const a=this.updateGroupsFromChildrenSelections(n);l||(l=a)}l&&this.dispatchSelectionChanged(n)}getSelectionState(){return this.isEmpty()?null:Array.from(this.selectedNodes.keys())}setSelectionState(o,i,s){if(o||(o=[]),!Array.isArray(o)){U(103);return}const n=new Set(o),r=[];this.beans.rowModel.forEachNode(l=>{n.has(l.id)&&r.push(l)}),s&&this.resetNodes(),this.setNodesSelected({newValue:!0,nodes:r,source:i})}canSelectAll(){const{gos:o}=this.beans;return!!oe(o)}updateSelectable(o){var c;const{gos:i,rowModel:s}=this.beans;if(!Qe(i))return;const n="selectableChanged",r=o!==void 0,l=oe(i)&&this.groupSelectsDescendants,a=[],d=u=>{var h;if(!(r&&!u.group)){if(l&&u.group){const g=((h=u.childrenAfterGroup)==null?void 0:h.some(p=>p.selectable))??!1;this.setRowSelectable(u,g,!0);return}!this.updateRowSelectable(u,!0)&&u.isSelected()&&a.push(u)}};if(l){if(o===void 0){const u=s.rootNode;o=u?new Ci(!1,u):void 0}o==null||o.forEachChangedNodeDepthFirst(d,!r,!r)}else s.forEachNode(d);a.length&&this.setNodesSelected({nodes:a,newValue:!1,source:n}),!r&&l&&((c=this.updateGroupsFromChildrenSelections)==null||c.call(this,n))}updateSelectableAfterGrouping(o){var i;this.updateSelectable(o),this.groupSelectsDescendants&&((i=this.updateGroupsFromChildrenSelections)!=null&&i.call(this,"rowGroupChanged",o))&&this.dispatchSelectionChanged("rowGroupChanged")}refreshMasterNodeState(o,i){var r,l;if(!this.masterSelectsDetail)return;const s=(l=(r=o.detailNode)==null?void 0:r.detailGridInfo)==null?void 0:l.api;if(!s)return;const n=qy(s);if(o.isSelected()!==n&&this.selectRowNode(o,n,i,"masterDetail")&&this.dispatchSelectionChanged("masterDetail"),!n){const a=this.detailSelection.get(o.id)??new Set;for(const d of s.getSelectedNodes())a.add(d.id);this.detailSelection.set(o.id,a)}}setDetailSelectionState(o,i,s){if(this.masterSelectsDetail){if(!Qt(i)){k(269);return}switch(o.isSelected()){case!0:{s.selectAll();break}case!1:{s.deselectAll();break}case void 0:{const n=this.detailSelection.get(o.id);if(n){const r=[];for(const l of n){const a=s.getRowNode(l);a&&r.push(a)}s.setNodesSelected({nodes:r,newValue:!0,source:"masterDetail"})}break}}}}dispatchSelectionChanged(o){this.eventSvc.dispatchEvent({type:"selectionChanged",source:o,selectedNodes:this.getSelectedNodes(),serverSideState:null})}}function Nt(e){return Ai(e)?e.pinnedSibling:e.footer?e.sibling:e}function qy(e){let t=0,o=0;return e.forEachNode(i=>{i.isSelected()?t++:i.selectable&&o++}),rd(t,o)}function rd(e,t){if(e===0&&t===0)return!1;if(!(e>0&&t>0))return e>0}function Yy(e,t){let o=t.parent;for(;o;){if(o===e)return!0;o=o.parent}return!1}const ld={moduleName:"SharedRowSelection",version:Ii,beans:[My],apiFunctions:{setNodesSelected:Oy,selectAll:By,deselectAll:Vy,getSelectedNodes:Ny,getSelectedRows:_y}},ad={moduleName:"RowSelection",version:Ii,rowModels:["clientSide","infinite","viewport"],beans:[jy],dependsOn:[ld]},Zy="ROOT_NODE_ID";class Qy extends x{constructor(){super(...arguments);R(this,"nextId",0);R(this,"allNodesMap",{});R(this,"rootNode",null)}getRowNode(o){return this.allNodesMap[o]}extractRowData(){var o,i;return(i=(o=this.rootNode)==null?void 0:o.allLeafChildren)==null?void 0:i.map(s=>s.data)}activate(o){this.rootNode=o,o.group=!0,o.level=-1,o.id=Zy,o.allLeafChildren=[],o.childrenAfterGroup=[],o.childrenAfterSort=[],o.childrenAfterAggFilter=[],o.childrenAfterFilter=[],this.updateRootSiblingArrays(o)}deactivate(){this.rootNode&&(this.allNodesMap={},this.rootNode=null)}destroy(){super.destroy(),this.allNodesMap={},this.rootNode=null}setNewRowData(o){const i=this.rootNode;i&&(this.dispatchRowDataUpdateStartedEvent(o),i.childrenAfterFilter=null,i.childrenAfterGroup=null,i.childrenAfterAggFilter=null,i.childrenAfterSort=null,i.childrenMapped=null,i.updateHasChildren(),this.allNodesMap={},this.nextId=0,this.loadNewRowData(o),this.updateRootSiblingArrays(i))}updateRootSiblingArrays(o){const i=o.sibling;i&&(i.childrenAfterFilter=o.childrenAfterFilter,i.childrenAfterGroup=o.childrenAfterGroup,i.childrenAfterAggFilter=o.childrenAfterAggFilter,i.childrenAfterSort=o.childrenAfterSort,i.childrenMapped=o.childrenMapped,i.allLeafChildren=o.allLeafChildren)}loadNewRowData(o){this.rootNode.allLeafChildren=(o==null?void 0:o.map((i,s)=>this.createRowNode(i,s)))??[]}setImmutableRowData(o,i){var C;const s=ko(this.gos),n=!this.gos.get("suppressMaintainUnsortedOrder"),r=o.changedRowNodes,l=new Set,a=this.rootNode,d=a.allLeafChildren,c=d.length;let u=!1,h=!1,g=!1,p=!1;for(let m=0,w=-1,b=i.length;m<b;m++){const v=i[m];let S=this.getRowNode(s({data:v,level:0}));if(!S)u=!0,S=this.createRowNode(v,-1),r.add(S);else{if(n){const D=S.sourceRowIndex;p||(p=D<=w||u),w=D}S.data!==v&&(g=!0,S.updateData(v),r.update(S))}l.add(S)}const f=[];for(let m=0;m<c;m++){const w=d[m];l.has(w)||(h=!0,w.isSelected()&&f.push(w),w.pinnedSibling&&((C=this.beans.pinnedRowModel)==null||C.pinRow(w.pinnedSibling,null)),this.rowNodeDeleted(w),r.remove(w))}if(u||h||p){const m=new Array(l.size);let w=0;if(!n)for(let v=0;v<c;++v){const S=d[v];l.delete(S)&&(S.sourceRowIndex=w,m[w++]=S)}for(const v of l)v.sourceRowIndex=w,m[w++]=v;a.allLeafChildren=m;const b=a.sibling;b&&(b.allLeafChildren=m),o.rowNodesOrderChanged||(o.rowNodesOrderChanged=p)}(u||h||p||g)&&(this.deselectNodes(f),o.rowDataUpdated=!0)}rowNodeDeleted(o){o.clearRowTopAndRowIndex();const i=o.id,s=this.allNodesMap;s[i]===o&&delete s[i]}updateRowData(o,i){this.dispatchRowDataUpdateStartedEvent(o.add);const s={changedRowNodes:i,rowNodeTransaction:{remove:[],update:[],add:[]},rowsInserted:!1},n=[],r=ko(this.gos);return this.executeRemove(r,o,s,n),this.executeUpdate(r,o,s,n),this.executeAdd(o,s),this.deselectNodes(n),s}executeAdd(o,i){var h;const s=o.add;if(!(s!=null&&s.length))return;let n=this.rootNode.allLeafChildren,r=n.length;if(typeof o.addIndex=="number"&&(r=this.sanitizeAddIndex(o.addIndex),r>0&&this.gos.get("treeData")&&this.gos.get("getDataPath"))){for(let g=0;g<n.length;g++)if(((h=n[g])==null?void 0:h.rowIndex)==r-1){r=g+1;break}}const l=s.length,a=i.changedRowNodes,d=new Array(l);for(let g=0;g<l;g++){const p=this.createRowNode(s[g],r+g);a.add(p),d[g]=p}const c=this.rootNode;if(r<n.length){const g=n.slice(0,r),p=n.slice(r,n.length),f=g.length+d.length;for(let C=0,m=p.length;C<m;++C)p[C].sourceRowIndex=f+C;n=[...g,...d,...p],i.rowsInserted=!0}else n=n.concat(d);c.allLeafChildren=n;const u=c.sibling;u&&(u.allLeafChildren=n),i.rowNodeTransaction.add=d}executeRemove(o,i,{changedRowNodes:s,rowNodeTransaction:n},r){var u,h;const{remove:l}=i;if(!(l!=null&&l.length))return;const a={};l.forEach(g=>{var f;const p=this.lookupRowNode(o,g);p&&(p.isSelected()&&r.push(p),p.pinnedSibling&&((f=this.beans.pinnedRowModel)==null||f.pinRow(p.pinnedSibling,null)),p.clearRowTopAndRowIndex(),a[p.id]=!0,delete this.allNodesMap[p.id],n.remove.push(p),s.remove(p))});const d=this.rootNode;d.allLeafChildren=((u=d.allLeafChildren)==null?void 0:u.filter(g=>!a[g.id]))??null,(h=d.allLeafChildren)==null||h.forEach((g,p)=>{g.sourceRowIndex=p});const c=d.sibling;c&&(c.allLeafChildren=d.allLeafChildren)}executeUpdate(o,i,{changedRowNodes:s,rowNodeTransaction:n},r){const{update:l}=i;l!=null&&l.length&&l.forEach(a=>{const d=this.lookupRowNode(o,a);d&&(d.updateData(a),!d.selectable&&d.isSelected()&&r.push(d),n.update.push(d),s.update(d))})}dispatchRowDataUpdateStartedEvent(o){this.eventSvc.dispatchEvent({type:"rowDataUpdateStarted",firstRowData:o!=null&&o.length?o[0]:null})}deselectNodes(o){var r;const i="rowDataChanged",s=this.beans.selectionSvc,n=o.length>0;n&&(s==null||s.setNodesSelected({newValue:!1,nodes:o,suppressFinishActions:!0,source:i})),(r=s==null?void 0:s.updateGroupsFromChildrenSelections)==null||r.call(s,i),n&&this.eventSvc.dispatchEvent({type:"selectionChanged",source:i,selectedNodes:(s==null?void 0:s.getSelectedNodes())??null,serverSideState:null})}sanitizeAddIndex(o){var s;const i=((s=this.rootNode.allLeafChildren)==null?void 0:s.length)??0;return o<0||o>=i||Number.isNaN(o)?i:Math.ceil(o)}createRowNode(o,i){const s=new so(this.beans);return s.parent=this.rootNode,s.level=0,s.group=!1,s.expanded=!1,s.sourceRowIndex=i,s.setDataAndId(o,String(this.nextId)),this.allNodesMap[s.id]&&k(2,{nodeId:s.id}),this.allNodesMap[s.id]=s,this.nextId++,s}lookupRowNode(o,i){var n,r;let s;if(o){const l=o({data:i,level:0});if(s=this.allNodesMap[l],!s)return U(4,{id:l}),null}else if(s=(r=(n=this.rootNode)==null?void 0:n.allLeafChildren)==null?void 0:r.find(l=>l.data===i),!s)return U(5,{data:i}),null;return s||null}}class Xy extends Qy{constructor(){super(...arguments);R(this,"beanName","csrmNodeSvc")}}class fn{constructor(){R(this,"removals",new Set);R(this,"updates",new Set);R(this,"adds",new Set)}remove(t){this.adds.delete(t)||(this.updates.delete(t),this.removals.add(t))}update(t){this.adds.has(t)||this.updates.add(t)}add(t){this.adds.add(t)}}function Jy(e){e.sibling&&(e.sibling.childrenAfterFilter=e.childrenAfterFilter)}function eR(e){if(K(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 dd(e){e.sibling&&(e.sibling.childrenAfterSort=e.childrenAfterSort),eR(e)}class tR extends x{constructor(){super(...arguments);R(this,"beanName","sortStage");R(this,"refreshProps",new Set(["postSortRows","groupDisplayType","accentedSort"]));R(this,"step","sort")}execute(o){const i=this.beans,s=i.sortSvc.getSortOptions(),n=M(s)&&s.length>0,r=n&&!!o.changedRowNodes&&this.gos.get("deltaSort"),l=s.some(({column:a})=>Re(i.gos)?a.isPrimary()&&a.isRowGroupActive():!!a.getColDef().showRowGroup);this.sort(i,s,n,r,o.changedRowNodes,o.changedPath,l)}sort(o,i,s,n,r,l,a){const{gos:d,colModel:c,rowGroupColsSvc:u,rowNodeSorter:h,rowRenderer:g,showRowGroupCols:p}=o,f=d.get("groupMaintainOrder"),C=c.getCols().some(S=>S.isRowGroupActive()),m=c.isPivotMode(),w=d.getCallback("postSortRows");let b=!1;const v=S=>{var F,P,T;const D=m&&S.leafGroup,I=f&&C&&!S.leafGroup&&!a;let O;if(I){const V=((P=(F=u==null?void 0:u.columns)==null?void 0:F[S.level+1])==null?void 0:P.getSort())===null,B=S.childrenAfterAggFilter.slice(0);if(S.childrenAfterSort&&!V){const W={};S.childrenAfterSort.forEach((z,de)=>{W[z.id]=de}),B.sort((z,de)=>(W[z.id]??0)-(W[de.id]??0))}O=B}else!s||D?O=S.childrenAfterAggFilter.slice(0):n&&r?O=oR(h,S,r,l,i):O=S.childrenAfterAggFilter.slice(0);if(b||(b=((T=S.childrenAfterSort)==null?void 0:T[0])!==O[0]),S.childrenAfterSort=O,dd(S),w){const V={nodes:S.childrenAfterSort};w(V)}};if(l==null||l.forEachChangedNodeDepthFirst(v),b&&this.gos.get("groupHideOpenParents")){const S=p==null?void 0:p.getShowRowGroupCols();S!=null&&S.length&&g.refreshCells({columns:S,force:!0})}}}function oR(e,t,o,i,s){const n=t.childrenAfterAggFilter,r=t.childrenAfterSort;if(!r)return e.doFullSort(n,s);const l=new Set,a=[],{updates:d,adds:c}=o;for(let h=0,g=n.length;h<g;++h){const p=n[h];d.has(p)||c.has(p)||i&&!i.canSkip(p)?a.push({currentPos:a.length,rowNode:p}):l.add(p.id)}const u=r.filter(h=>l.has(h.id)).map((h,g)=>({currentPos:g,rowNode:h}));return a.sort((h,g)=>e.compareRowNodes(s,h,g)),iR(e,s,a,u)}function iR(e,t,o,i){const s=[];let n=0,r=0;const l=o.length,a=i.length;for(;n<l&&r<a;){const d=o[n],c=i[r],u=e.compareRowNodes(t,d,c);let h;u<0?(h=d,++n):(h=c,++r),s.push(h.rowNode)}for(;n<l;)s.push(o[n++].rowNode);for(;r<a;)s.push(i[r++].rowNode);return s}class sR extends x{constructor(){super(...arguments);R(this,"beanName","rowModel");R(this,"colModel");R(this,"valueCache");R(this,"filterStage");R(this,"sortStage");R(this,"flattenStage");R(this,"groupStage");R(this,"aggStage");R(this,"pivotStage");R(this,"filterAggStage");R(this,"rootNode",null);R(this,"rowsToDisplay",[]);R(this,"nodeManager");R(this,"rowDataTransactionBatch");R(this,"rowDataUpdatedPending",!1);R(this,"applyAsyncTransactionsTimeout");R(this,"started",!1);R(this,"isRefreshingModel",!1);R(this,"rowNodesCountReady",!1);R(this,"rowCountReady",!1);R(this,"orderedStages");R(this,"onRowHeightChanged_debounced",ge(this,this.onRowHeightChanged.bind(this),100))}wireBeans(o){this.colModel=o.colModel,this.valueCache=o.valueCache,this.filterStage=o.filterStage,this.sortStage=o.sortStage,this.flattenStage=o.flattenStage,this.groupStage=o.groupStage,this.aggStage=o.aggStage,this.pivotStage=o.pivotStage,this.filterAggStage=o.filterAggStage}postConstruct(){this.orderedStages=[this.groupStage,this.filterStage,this.pivotStage,this.aggStage,this.sortStage,this.filterAggStage,this.flattenStage].filter(n=>!!n);const o=this.refreshModel.bind(this,{step:"group"}),i=this.refreshModel.bind(this,{step:"group",afterColumnsChanged:!0,keepRenderedRows:!0,animate:!this.gos.get("suppressAnimationFrame")});this.addManagedEventListeners({newColumnsLoaded:i,columnRowGroupChanged:o,columnValueChanged:this.onValueChanged.bind(this),columnPivotChanged:this.refreshModel.bind(this,{step:"pivot"}),filterChanged:this.onFilterChanged.bind(this),sortChanged:this.onSortChanged.bind(this),columnPivotModeChanged:o,gridStylesChanged:this.onGridStylesChanges.bind(this),gridReady:this.onGridReady.bind(this)}),this.addPropertyListeners(),this.rootNode=new so(this.beans);const s=this.getNewNodeManager();this.nodeManager=s,s.activate(this.rootNode)}getNewNodeManager(){const{gos:o,beans:i}=this;return Dc(o)==="treeNested"&&i.csrmChildrenTreeNodeSvc||i.csrmNodeSvc}addPropertyListeners(){const o=["treeData","treeDataChildrenField",...this.orderedStages.flatMap(({refreshProps:i})=>[...i])];this.addManagedPropertyListeners(o,i=>{var n;const s=(n=i.changeSet)==null?void 0:n.properties;s&&this.onPropChange(s)}),this.addManagedPropertyListener("rowData",()=>this.onPropChange(["rowData"])),this.addManagedPropertyListener("rowHeight",()=>this.resetRowHeights())}start(){this.started=!0,this.rowNodesCountReady?this.refreshModel({step:"group",rowDataUpdated:!0,newData:!0}):this.setInitialData()}setInitialData(){this.gos.get("rowData")&&this.onPropChange(["rowData"])}ensureRowHeightsValid(o,i,s,n){let r,l=!1;do{r=!1;const a=this.getRowIndexAtPixel(o),d=this.getRowIndexAtPixel(i),c=Math.max(a,s),u=Math.min(d,n);for(let h=c;h<=u;h++){const g=this.getRow(h);if(g.rowHeightEstimated){const p=_e(this.beans,g);g.setRowHeight(p.height),r=!0,l=!0}}r&&this.setRowTopAndRowIndex()}while(r);return l}onPropChange(o){if(!this.rootNode)return;const i=this.gos,s=new Set(o),n={step:"nothing",changedProps:s},r=s.has("rowData"),l=this.nodeManager,a=this.getNewNodeManager(),d=l!==a||r&&s.has("treeData")&&i.get("treeData")||s.has("treeDataChildrenField")&&i.get("treeData");let c;if((d||r)&&(c=i.get("rowData"),c!=null&&!Array.isArray(c)&&(c=null,k(1))),d&&(r||(c=(l==null?void 0:l.extractRowData())??c),l!==a&&(l==null||l.deactivate(),this.nodeManager=a),a.activate(this.rootNode)),c)if(!d&&!this.isEmpty()&&c.length>0&&i.exists("getRowId")&&!i.get("resetRowDataOnUpdate"))n.keepRenderedRows=!0,n.animate=!this.gos.get("suppressAnimationFrame"),n.changedRowNodes=new fn,a.setImmutableRowData(n,c);else{n.rowDataUpdated=!0,n.newData=!0;const{selectionSvc:u,pinnedRowModel:h}=this.beans;u==null||u.reset("rowDataChanged"),h!=null&&h.isManual()&&h.reset(),this.rowNodesCountReady=!0,a.setNewRowData(c)}if(n.rowDataUpdated)n.step="group";else if(n.step==="nothing"){for(const{refreshProps:u,step:h}of this.orderedStages)if(o.some(g=>u.has(g))){n.step=h;break}}n.step!=="nothing"&&this.refreshModel(n)}setRowTopAndRowIndex(){const{beans:o,rowsToDisplay:i}=this,s=o.environment.getDefaultRowHeight();let n=0;const r=new Set,l=ee(this.gos,"normal");for(let a=0,d=i.length;a<d;++a){const c=i[a];if(c.id!=null&&r.add(c.id),c.rowHeight==null){const u=_e(o,c,l,s);c.setRowHeight(u.height,u.estimated)}c.setRowTop(n),c.setRowIndex(a),n+=c.rowHeight}return r}clearRowTopAndRowIndex(o,i){const s=o.active,n=l=>{l&&l.id!=null&&!i.has(l.id)&&l.clearRowTopAndRowIndex()},r=l=>{if(l!==null&&(n(l),n(l.detailNode),n(l.sibling),l.hasChildren()&&l.childrenAfterGroup)){const a=l.level==-1;s&&!a&&!l.expanded||l.childrenAfterGroup.forEach(r)}};r(this.rootNode)}isLastRowIndexKnown(){return!0}getRowCount(){return this.rowsToDisplay?this.rowsToDisplay.length:0}getTopLevelRowCount(){const o=this.rootNode;if(!o||this.rowsToDisplay.length===0)return 0;if(this.rowsToDisplay&&this.rowsToDisplay[0]===o)return 1;const i=o.childrenAfterSort,s=o.sibling&&o.sibling.displayed?1:0;return(i?i.length:0)+s}getTopLevelRowDisplayedIndex(o){const{rootNode:i,rowsToDisplay:s}=this;if(!i||!s.length||s[0]===i)return o;const{childrenAfterSort:n}=i,r=a=>{let d=n[a];if(this.gos.get("groupHideOpenParents"))for(;d.expanded&&d.childrenAfterSort&&d.childrenAfterSort.length>0;)d=d.childrenAfterSort[0];return d.rowIndex},{footerSvc:l}=this.beans;return l?l.getTopDisplayIndex(s,o,n,r):r(o)}getTopLevelIndexFromDisplayedIndex(o){var l;const{rootNode:i,rowsToDisplay:s}=this;if(!i||!s.length||s[0]===i)return o;let n=this.getRow(o);for(n.footer&&(n=n.sibling);n.parent&&n.parent!==i;)n=n.parent;const r=(l=i.childrenAfterSort)==null?void 0:l.findIndex(a=>a===n);return r===-1?o:r??o}getRowBounds(o){const i=this.rowsToDisplay[o];return i?{rowTop:i.rowTop,rowHeight:i.rowHeight}:null}onRowGroupOpened(){const o=mt(this.gos);this.refreshModel({step:"map",keepRenderedRows:!0,animate:o})}onFilterChanged(o){if(o.afterDataChange)return;const i=mt(this.gos),s=o.columns.length===0||o.columns.some(n=>n.isPrimary())?"filter":"filter_aggregates";this.refreshModel({step:s,keepRenderedRows:!0,animate:i})}onSortChanged(){const o=mt(this.gos);this.refreshModel({step:"sort",keepRenderedRows:!1,animate:o})}getType(){return"clientSide"}onValueChanged(){this.refreshModel({step:this.colModel.isPivotActive()?"pivot":"aggregate"})}createChangePath(o){const i=new Ci(!1,this.rootNode);return o||(i.active=!1),i}isSuppressModelUpdateAfterUpdateTransaction(o){if(!this.gos.get("suppressModelUpdateAfterUpdateTransaction"))return!1;const{changedRowNodes:i,newData:s,rowDataUpdated:n}=o;return!(!i||s||!n||i.removals.size||i.adds.size)}refreshModel(o){var l,a,d;if(!this.rootNode)return;const i=this.beans;let s=!!o.rowDataUpdated;const n=o.changedPath??(o.changedPath=this.createChangePath(!o.newData&&s));if(this.started&&s&&this.eventSvc.dispatchEvent({type:"rowDataUpdated"}),this.rowDataUpdatedPending||(this.rowDataUpdatedPending=s),!this.started||this.isRefreshingModel||this.colModel.changeEventsDispatching||this.isSuppressModelUpdateAfterUpdateTransaction(o))return;switch(this.rowDataUpdatedPending&&(this.rowDataUpdatedPending=!1,o.rowDataUpdated=s=!0),this.isRefreshingModel=!0,(l=i.masterDetailSvc)==null||l.refreshModel(o),s&&o.step!=="group"&&((a=i.colFilter)==null||a.refreshModel()),o.step){case"group":(this.doRowGrouping(o)||s)&&((d=i.colFilter)==null||d.refreshModel()),!this.rowCountReady&&this.rowNodesCountReady&&(this.rowCountReady=!0,this.eventSvc.dispatchEventOnce({type:"rowCountReady"}));case"filter":this.doFilter(n);case"pivot":this.doPivot(n);case"aggregate":this.doAggregate(n);case"filter_aggregates":this.doFilterAggregates(n);case"sort":this.doSort(o.changedRowNodes,n);case"map":this.doRowsToDisplay()}const r=this.setRowTopAndRowIndex();this.clearRowTopAndRowIndex(n,r),this.isRefreshingModel=!1,this.eventSvc.dispatchEvent({type:"modelUpdated",animate:o.animate,keepRenderedRows:o.keepRenderedRows,newData:o.newData,newPage:!1,keepUndoRedoStack:o.keepUndoRedoStack})}isEmpty(){var o,i,s;return!((i=(o=this.rootNode)==null?void 0:o.allLeafChildren)!=null&&i.length)||!((s=this.colModel)!=null&&s.ready)}isRowsToRender(){return this.rowsToDisplay.length>0}getNodesInRangeForSelection(o,i){let s=!1,n=!1;const r=[],l=Xt(this.gos);return this.forEachNodeAfterFilterAndSort(a=>{if(!n){if(s&&(a===i||a===o)&&(n=!0,a.group&&l)){r.push(...a.allLeafChildren);return}if(!s){if(a!==i&&a!==o)return;s=!0}if(!a.group||!l){r.push(a);return}}}),r}getTopLevelNodes(){var o;return((o=this.rootNode)==null?void 0:o.childrenAfterGroup)??null}getRow(o){return this.rowsToDisplay[o]}isRowPresent(o){return this.rowsToDisplay.indexOf(o)>=0}getRowIndexAtPixel(o){const i=this.rowsToDisplay;if(this.isEmpty()||i.length===0)return-1;let s=0,n=i.length-1;if(o<=0)return 0;if($(i).rowTop<=o)return i.length-1;let r=-1,l=-1;for(;;){const a=Math.floor((s+n)/2),d=i[a];if(this.isRowInPixel(d,o)||(d.rowTop<o?s=a+1:d.rowTop>o&&(n=a-1),r===s&&l===n))return a;r=s,l=n}}isRowInPixel(o,i){const s=o.rowTop,n=o.rowTop+o.rowHeight;return s<=i&&n>i}forEachLeafNode(o){var i,s;(s=(i=this.rootNode)==null?void 0:i.allLeafChildren)==null||s.forEach((n,r)=>o(n,r))}forEachNode(o,i=!1){this.depthFirstSearchRowNodes(o,i)}forEachDisplayedNode(o){this.rowsToDisplay.forEach(o)}forEachNodeAfterFilter(o,i=!1){this.depthFirstSearchRowNodes(o,i,s=>s.childrenAfterAggFilter)}forEachNodeAfterFilterAndSort(o,i=!1){this.depthFirstSearchRowNodes(o,i,s=>s.childrenAfterSort)}forEachPivotNode(o,i=!1,s=!1){const{colModel:n,rowGroupColsSvc:r}=this.beans;if(!n.isPivotMode())return;if(!(r!=null&&r.columns.length)){o(this.rootNode,0);return}const l=s?"childrenAfterSort":"childrenAfterGroup";this.depthFirstSearchRowNodes(o,i,a=>a.leafGroup?null:a[l])}depthFirstSearchRowNodes(o,i=!1,s=l=>l.childrenAfterGroup,n=this.rootNode,r=0){let l=r;if(!n)return l;const a=n===this.rootNode;a||o(n,l++);const{footerSvc:d}=this.beans;if(n.hasChildren()&&!n.footer){const c=s(n);if(c){l=(d==null?void 0:d.addTotalRows(l,n,o,i,a,"top"))??l;for(const u of c)l=this.depthFirstSearchRowNodes(o,i,s,u,l);return(d==null?void 0:d.addTotalRows(l,n,o,i,a,"bottom"))??l}}return l}doAggregate(o){var s;const i=this.rootNode;i&&((s=this.aggStage)==null||s.execute({rowNode:i,changedPath:o}))}doFilterAggregates(o){const i=this.rootNode;this.filterAggStage?this.filterAggStage.execute({rowNode:i,changedPath:o}):i.childrenAfterAggFilter=i.childrenAfterFilter}doSort(o,i){this.sortStage?this.sortStage.execute({rowNode:this.rootNode,changedRowNodes:o,changedPath:i}):i.forEachChangedNodeDepthFirst(s=>{s.childrenAfterSort=s.childrenAfterAggFilter.slice(0),dd(s)})}doRowGrouping(o){var r;const i=this.rootNode,s=(r=this.groupStage)==null?void 0:r.execute({rowNode:i,changedRowNodes:o.changedRowNodes,changedPath:o.changedPath,rowNodesOrderChanged:!!o.rowNodesOrderChanged,afterColumnsChanged:!!o.afterColumnsChanged});if(s!==void 0)return s;const n=i.sibling;return i.childrenAfterGroup=i.allLeafChildren,n&&(n.childrenAfterGroup=i.childrenAfterGroup),i.updateHasChildren(),!1}doFilter(o){this.filterStage?this.filterStage.execute({rowNode:this.rootNode,changedPath:o}):o.forEachChangedNodeDepthFirst(i=>{i.childrenAfterFilter=i.childrenAfterGroup,Jy(i)},!0)}doPivot(o){var i;(i=this.pivotStage)==null||i.execute({rowNode:this.rootNode,changedPath:o})}getRowNode(o){var s;const i=this.nodeManager.getRowNode(o);return typeof i=="object"?i:typeof o=="string"&&o.indexOf(Cs)===0?(s=this.groupStage)==null?void 0:s.getNode(o):void 0}batchUpdateRowData(o,i){if(this.applyAsyncTransactionsTimeout==null){this.rowDataTransactionBatch=[];const s=this.gos.get("asyncTransactionWaitMillis");this.applyAsyncTransactionsTimeout=window.setTimeout(()=>{this.isAlive()&&this.executeBatchUpdateRowData()},s)}this.rowDataTransactionBatch.push({rowDataTransaction:o,callback:i})}flushAsyncTransactions(){this.applyAsyncTransactionsTimeout!=null&&(clearTimeout(this.applyAsyncTransactionsTimeout),this.executeBatchUpdateRowData())}executeBatchUpdateRowData(){var r,l;(r=this.valueCache)==null||r.onDataChanged();const o=[],i=[],s=new fn;let n=!1;(l=this.rowDataTransactionBatch)==null||l.forEach(a=>{this.rowNodesCountReady=!0;const{rowNodeTransaction:d,rowsInserted:c}=this.nodeManager.updateRowData(a.rowDataTransaction,s);c&&(n=!0),i.push(d),a.callback&&o.push(a.callback.bind(null,d))}),this.commitTransactions(n,s),o.length>0&&window.setTimeout(()=>{o.forEach(a=>a())},0),i.length>0&&this.eventSvc.dispatchEvent({type:"asyncTransactionsFlushed",results:i}),this.rowDataTransactionBatch=null,this.applyAsyncTransactionsTimeout=void 0}updateRowData(o){var r;(r=this.valueCache)==null||r.onDataChanged(),this.rowNodesCountReady=!0;const i=new fn,{rowNodeTransaction:s,rowsInserted:n}=this.nodeManager.updateRowData(o,i);return this.commitTransactions(n,i),s}commitTransactions(o,i){this.refreshModel({step:"group",rowDataUpdated:!0,rowNodesOrderChanged:o,keepRenderedRows:!0,animate:!this.gos.get("suppressAnimationFrame"),changedRowNodes:i,changedPath:this.createChangePath(!0)})}doRowsToDisplay(){const{flattenStage:o,rootNode:i}=this;let s;if(o)s=o.execute({rowNode:i});else{s=(i==null?void 0:i.childrenAfterSort)??[];for(const n of s)n.setUiLevel(0)}this.rowsToDisplay=s}onRowHeightChanged(){this.refreshModel({step:"map",keepRenderedRows:!0,keepUndoRedoStack:!0})}resetRowHeights(){const o=this.rootNode;if(!o)return;const i=this.resetRowHeightsForAllRowNodes();o.setRowHeight(o.rowHeight,!0),o.sibling&&o.sibling.setRowHeight(o.sibling.rowHeight,!0),i&&this.onRowHeightChanged()}resetRowHeightsForAllRowNodes(){let o=!1;return this.forEachNode(i=>{i.setRowHeight(i.rowHeight,!0);const s=i.detailNode;s&&s.setRowHeight(s.rowHeight,!0),i.sibling&&i.sibling.setRowHeight(i.sibling.rowHeight,!0),o=!0}),o}onGridStylesChanges(o){var i;if(o.rowHeightChanged){if((i=this.beans.rowAutoHeight)!=null&&i.active)return;this.resetRowHeights()}}onGridReady(){this.started||this.setInitialData()}isRowDataLoaded(){return this.rowCountReady}destroy(){super.destroy(),this.started=!1,this.rootNode=null,this.nodeManager=null,this.rowDataTransactionBatch=null,this.orderedStages=hr,this.rowsToDisplay=hr}onRowHeightChangedDebounced(){this.onRowHeightChanged_debounced()}}function nR(e){var t;(t=e.expansionSvc)==null||t.onGroupExpandedOrCollapsed()}function rR(e,t){const o=Te(e);o&&((!t||t==="everything")&&(t="group"),o.refreshModel({step:t,keepRenderedRows:!0,animate:!e.gos.get("suppressAnimationFrame")}))}function lR(e){var t;return((t=Te(e))==null?void 0:t.isEmpty())??!0}function aR(e,t){var o;(o=Te(e))==null||o.forEachLeafNode(t)}function dR(e,t){var o;(o=Te(e))==null||o.forEachNodeAfterFilter(t)}function cR(e,t){var o;(o=Te(e))==null||o.forEachNodeAfterFilterAndSort(t)}function uR(e){var t,o;if((t=e.rowAutoHeight)!=null&&t.active){k(3);return}(o=Te(e))==null||o.resetRowHeights()}function hR(e,t){return e.frameworkOverrides.wrapIncoming(()=>{var o;return(o=Te(e))==null?void 0:o.updateRowData(t)})}function gR(e,t,o){e.frameworkOverrides.wrapIncoming(()=>{var i;return(i=Te(e))==null?void 0:i.batchUpdateRowData(t,o)})}function pR(e){e.frameworkOverrides.wrapIncoming(()=>{var t;return(t=Te(e))==null?void 0:t.flushAsyncTransactions()})}function fR(e){var t;return(t=e.selectionSvc)==null?void 0:t.getBestCostNodeSelection()}const cd={moduleName:"ClientSideRowModel",version:Ii,rowModels:["clientSide"],beans:[Xy,sR,tR],dependsOn:[ga]},ud={moduleName:"ClientSideRowModelApi",version:Ii,apiFunctions:{onGroupExpandedOrCollapsed:nR,refreshClientSideRowModel:rR,isRowDataEmpty:lR,forEachLeafNode:aR,forEachNodeAfterFilter:dR,forEachNodeAfterFilterAndSort:cR,resetRowHeights:uR,applyTransaction:hR,applyTransactionAsync:gR,flushAsyncTransactions:pR,getBestCostNodeSelection:fR},dependsOn:[nS]};class vo{static getComponentDefinition(t,o){let i;return typeof t=="string"?i=this.searchForComponentInstance(o,t):i={extends:E.defineComponent({...t})},i||U(114,{component:t}),i.extends?(i.extends.setup&&(i.setup=i.extends.setup),i.extends.props=this.addParamsToProps(i.extends.props)):i.props=this.addParamsToProps(i.props),i}static addParamsToProps(t){return!t||Array.isArray(t)&&t.indexOf("params")===-1?t=["params",...t||[]]:typeof t=="object"&&!t.params&&(t.params={type:Object}),t}static createAndMountComponent(t,o,i,s){const n=vo.getComponentDefinition(t,i);if(!n)return;const{vm:r,destroy:l,el:a}=this.mount(n,{params:Object.freeze(o)},i,s||{});return{componentInstance:r,element:a,destroy:l}}static mount(t,o,i,s){let n=new E({beforeCreate(){s?(this._provided=Object.create(i.proxy._provided||null),Object.keys(s).forEach(a=>{this._provided[a]=s[a]})):this._provided=i.proxy._provided||{};const l=i.proxy.$root;l&&l.$router&&(Object.defineProperty(this,"$route",{value:i.proxy.$root.$route,writable:!1,configurable:!0}),Object.defineProperty(this,"$router",{value:i.proxy.$root.$router,writable:!1,configurable:!0}))},render(l){return l(t,{props:o})}});return n.$mount(),{vm:n,destroy:()=>{n&&(n.$destroy(),n=null)},el:n.$el}}static searchForComponentInstance(t,o,i=10,s=!1){let n=null,r=0,l=t.proxy.$parent;for(;!n&&l&&l.components&&++r<i;)l.components&&l.components[o]&&(n=l.components[o]),l=l.$parent;for(r=0,l=t.proxy.$parent;!n&&l&&l.$options&&++r<i;){const a=l;a.$options&&a.$options.components&&a.$options.components[o]?n=a.$options.components[o]:a[o]&&(n=a[o]),l=l.$parent}for(r=0,l=t.proxy.$parent;!n&&l&&++r<i;){if(l.exposed){const a=l;a.exposed&&a.exposed[o]?n=a.exposed[o]:a[o]&&(n=a[o])}l=l.$parent}return n||E.options&&E.options.components&&E.options.components[o]&&(n=E.options.components[o]),!n&&!s?(U(114,{component:o}),null):n}}var CR=Object.defineProperty,mR=(e,t,o)=>t in e?CR(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,bo=(e,t,o)=>mR(e,typeof t!="symbol"?t+"":t,o);class wR extends Nv{constructor(t,o){super(),bo(this,"parent"),bo(this,"provides"),this.parent=t,this.provides=o}createWrapper(t){const o=this;class i extends vR{init(r){super.init(r)}hasMethod(r){return s.getFrameworkComponentInstance()[r]}callMethod(r,l){var a,d;const c=this.getFrameworkComponentInstance(),u=s.getFrameworkComponentInstance();if(u[r])return u[r].apply(c,l);{const h=((a=c.$.exposed)==null?void 0:a[r])||((d=c.exposed)==null?void 0:d[r])||c.$.setupState[r];return h==null?void 0:h.apply(c,l)}}addMethod(r,l){s[r]=l}processMethod(r,l){return r==="refresh"&&(this.getFrameworkComponentInstance().params=l[0]),this.hasMethod(r)?this.callMethod(r,l):r==="refresh"}createComponent(r){return o.createComponent(t,r)}}const s=new i;return s}createComponent(t,o){return vo.createAndMountComponent(t,o,this.parent,this.provides)}createMethodProxy(t,o,i){return function(){return t.hasMethod(o)?t.callMethod(o,arguments):(i&&k(233,{methodName:o}),null)}}destroy(){this.parent=null}}class vR{constructor(){bo(this,"componentInstance"),bo(this,"element"),bo(this,"unmount")}getGui(){return this.element}destroy(){this.getFrameworkComponentInstance()&&typeof this.getFrameworkComponentInstance().destroy=="function"&&this.getFrameworkComponentInstance().destroy(),this.unmount()}getFrameworkComponentInstance(){return this.componentInstance}init(t){const{componentInstance:o,element:i,destroy:s}=this.createComponent(t);this.componentInstance=o,this.unmount=s,this.element=i}}var bR=Object.defineProperty,SR=(e,t,o)=>t in e?bR(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,yR=(e,t,o)=>SR(e,t+"",o);class RR extends Fl{constructor(t){super("vue"),yR(this,"parent"),this.parent=t}frameworkComponent(t,o){let i=vo.searchForComponentInstance(this.parent,t,10,!0)?t:null;if(!i&&o&&o[t]){const s=o[t];i=vo.searchForComponentInstance(this.parent,s,10,!0)?s:null}return i}isFrameworkComponent(t){return typeof t=="object"}}function ER(){return{gridOptions:()=>({}),modules:()=>[],statusBar:void 0,sideBar:void 0,suppressContextMenu:void 0,preventDefaultOnContextMenu:void 0,allowContextMenuWithControlKey:void 0,columnMenu:void 0,suppressMenuHide:void 0,enableBrowserTooltips:void 0,tooltipTrigger:void 0,tooltipShowDelay:void 0,tooltipHideDelay:void 0,tooltipMouseTrack:void 0,tooltipShowMode:void 0,tooltipInteraction:void 0,popupParent:void 0,copyHeadersToClipboard:void 0,copyGroupHeadersToClipboard:void 0,clipboardDelimiter:void 0,suppressCopyRowsToClipboard:void 0,suppressCopySingleCellRanges:void 0,suppressLastEmptyLineOnPaste:void 0,suppressClipboardPaste:void 0,suppressClipboardApi:void 0,suppressCutToClipboard:void 0,columnDefs:void 0,defaultColDef:void 0,defaultColGroupDef:void 0,columnTypes:void 0,dataTypeDefinitions:void 0,maintainColumnOrder:void 0,enableStrictPivotColumnOrder:void 0,suppressFieldDotNotation:void 0,headerHeight:void 0,groupHeaderHeight:void 0,floatingFiltersHeight:void 0,pivotHeaderHeight:void 0,pivotGroupHeaderHeight:void 0,hidePaddedHeaderRows:void 0,allowDragFromColumnsToolPanel:void 0,suppressMovableColumns:void 0,suppressColumnMoveAnimation:void 0,suppressMoveWhenColumnDragging:void 0,suppressDragLeaveHidesColumns:void 0,suppressGroupChangesColumnVisibility:void 0,suppressMakeColumnVisibleAfterUnGroup:void 0,suppressRowGroupHidesColumns:void 0,colResizeDefault:void 0,suppressAutoSize:void 0,autoSizePadding:void 0,skipHeaderOnAutoSize:void 0,autoSizeStrategy:void 0,components:void 0,editType:void 0,suppressStartEditOnTab:void 0,getFullRowEditValidationErrors:void 0,invalidEditValueMode:void 0,singleClickEdit:void 0,suppressClickEdit:void 0,readOnlyEdit:void 0,stopEditingWhenCellsLoseFocus:void 0,enterNavigatesVertically:void 0,enterNavigatesVerticallyAfterEdit:void 0,enableCellEditingOnBackspace:void 0,undoRedoCellEditing:void 0,undoRedoCellEditingLimit:void 0,defaultCsvExportParams:void 0,suppressCsvExport:void 0,defaultExcelExportParams:void 0,suppressExcelExport:void 0,excelStyles:void 0,findSearchValue:void 0,findOptions:void 0,quickFilterText:void 0,cacheQuickFilter:void 0,includeHiddenColumnsInQuickFilter:void 0,quickFilterParser:void 0,quickFilterMatcher:void 0,applyQuickFilterBeforePivotOrAgg:void 0,excludeChildrenWhenTreeDataFiltering:void 0,enableAdvancedFilter:void 0,alwaysPassFilter:void 0,includeHiddenColumnsInAdvancedFilter:void 0,advancedFilterParent:void 0,advancedFilterBuilderParams:void 0,advancedFilterParams:void 0,suppressAdvancedFilterEval:void 0,suppressSetFilterByDefault:void 0,enableFilterHandlers:void 0,filterHandlers:void 0,loadingCellRenderer:void 0,loadingCellRendererParams:void 0,loadingCellRendererSelector:void 0,localeText:void 0,masterDetail:void 0,keepDetailRows:void 0,keepDetailRowsCount:void 0,detailCellRenderer:void 0,detailCellRendererParams:void 0,detailRowHeight:void 0,detailRowAutoHeight:void 0,context:void 0,alignedGrids:void 0,tabIndex:void 0,rowBuffer:void 0,valueCache:void 0,valueCacheNeverExpires:void 0,enableCellExpressions:void 0,suppressTouch:void 0,suppressFocusAfterRefresh:void 0,suppressBrowserResizeObserver:void 0,suppressPropertyNamesCheck:void 0,suppressChangeDetection:void 0,debug:void 0,loading:void 0,overlayLoadingTemplate:void 0,loadingOverlayComponent:void 0,loadingOverlayComponentParams:void 0,suppressLoadingOverlay:void 0,overlayNoRowsTemplate:void 0,noRowsOverlayComponent:void 0,noRowsOverlayComponentParams:void 0,suppressNoRowsOverlay:void 0,pagination:void 0,paginationPageSize:void 0,paginationPageSizeSelector:void 0,paginationAutoPageSize:void 0,paginateChildRows:void 0,suppressPaginationPanel:void 0,pivotMode:void 0,pivotPanelShow:void 0,pivotMaxGeneratedColumns:void 0,pivotDefaultExpanded:void 0,pivotColumnGroupTotals:void 0,pivotRowTotals:void 0,pivotSuppressAutoColumn:void 0,suppressExpandablePivotGroups:void 0,functionsReadOnly:void 0,aggFuncs:void 0,suppressAggFuncInHeader:void 0,alwaysAggregateAtRootLevel:void 0,aggregateOnlyChangedColumns:void 0,suppressAggFilteredOnly:void 0,removePivotHeaderRowWhenSingleValueColumn:void 0,animateRows:void 0,cellFlashDuration:void 0,cellFadeDuration:void 0,allowShowChangeAfterFilter:void 0,domLayout:void 0,ensureDomOrder:void 0,enableCellSpan:void 0,enableRtl:void 0,suppressColumnVirtualisation:void 0,suppressMaxRenderedRowRestriction:void 0,suppressRowVirtualisation:void 0,rowDragManaged:void 0,rowDragInsertDelay:void 0,suppressRowDrag:void 0,suppressMoveWhenRowDragging:void 0,rowDragEntireRow:void 0,rowDragMultiRow:void 0,rowDragText:void 0,dragAndDropImageComponent:void 0,dragAndDropImageComponentParams:void 0,fullWidthCellRenderer:void 0,fullWidthCellRendererParams:void 0,embedFullWidthRows:void 0,groupDisplayType:void 0,groupDefaultExpanded:void 0,autoGroupColumnDef:void 0,groupMaintainOrder:void 0,groupSelectsChildren:void 0,groupLockGroupColumns:void 0,groupAggFiltering:void 0,groupTotalRow:void 0,grandTotalRow:void 0,suppressStickyTotalRow:void 0,groupSuppressBlankHeader:void 0,groupSelectsFiltered:void 0,showOpenedGroup:void 0,groupHideParentOfSingleChild:void 0,groupRemoveSingleChildren:void 0,groupRemoveLowestSingleChildren:void 0,groupHideOpenParents:void 0,groupAllowUnbalanced:void 0,rowGroupPanelShow:void 0,groupRowRenderer:void 0,groupRowRendererParams:void 0,treeData:void 0,treeDataChildrenField:void 0,treeDataParentIdField:void 0,rowGroupPanelSuppressSort:void 0,suppressGroupRowsSticky:void 0,groupHierarchyConfig:void 0,pinnedTopRowData:void 0,pinnedBottomRowData:void 0,enableRowPinning:void 0,isRowPinnable:void 0,isRowPinned:void 0,rowModelType:void 0,rowData:void 0,asyncTransactionWaitMillis:void 0,suppressModelUpdateAfterUpdateTransaction:void 0,datasource:void 0,cacheOverflowSize:void 0,infiniteInitialRowCount:void 0,serverSideInitialRowCount:void 0,suppressServerSideFullWidthLoadingRow:void 0,cacheBlockSize:void 0,maxBlocksInCache:void 0,maxConcurrentDatasourceRequests:void 0,blockLoadDebounceMillis:void 0,purgeClosedRowNodes:void 0,serverSideDatasource:void 0,serverSideSortAllLevels:void 0,serverSideEnableClientSideSort:void 0,serverSideOnlyRefreshFilteredGroups:void 0,serverSidePivotResultFieldSeparator:void 0,viewportDatasource:void 0,viewportRowModelPageSize:void 0,viewportRowModelBufferSize:void 0,alwaysShowHorizontalScroll:void 0,alwaysShowVerticalScroll:void 0,debounceVerticalScrollbar:void 0,suppressHorizontalScroll:void 0,suppressScrollOnNewData:void 0,suppressScrollWhenPopupsAreOpen:void 0,suppressAnimationFrame:void 0,suppressMiddleClickScrolls:void 0,suppressPreventDefaultOnMouseWheel:void 0,scrollbarWidth:void 0,rowSelection:void 0,cellSelection:void 0,rowMultiSelectWithClick:void 0,suppressRowDeselection:void 0,suppressRowClickSelection:void 0,suppressCellFocus:void 0,suppressHeaderFocus:void 0,selectionColumnDef:void 0,rowNumbers:void 0,suppressMultiRangeSelection:void 0,enableCellTextSelection:void 0,enableRangeSelection:void 0,enableRangeHandle:void 0,enableFillHandle:void 0,fillHandleDirection:void 0,suppressClearOnFillReduction:void 0,sortingOrder:void 0,accentedSort:void 0,unSortIcon:void 0,suppressMultiSort:void 0,alwaysMultiSort:void 0,multiSortKey:void 0,suppressMaintainUnsortedOrder:void 0,icons:void 0,rowHeight:void 0,rowStyle:void 0,rowClass:void 0,rowClassRules:void 0,suppressRowHoverHighlight:void 0,suppressRowTransform:void 0,columnHoverHighlight:void 0,gridId:void 0,deltaSort:void 0,treeDataDisplayType:void 0,enableGroupEdit:void 0,initialState:void 0,theme:void 0,loadThemeGoogleFonts:void 0,themeCssLayer:void 0,styleNonce:void 0,themeStyleContainer:void 0,getContextMenuItems:void 0,getMainMenuItems:void 0,postProcessPopup:void 0,processUnpinnedColumns:void 0,processCellForClipboard:void 0,processHeaderForClipboard:void 0,processGroupHeaderForClipboard:void 0,processCellFromClipboard:void 0,sendToClipboard:void 0,processDataFromClipboard:void 0,isExternalFilterPresent:void 0,doesExternalFilterPass:void 0,getChartToolbarItems:void 0,createChartContainer:void 0,focusGridInnerElement:void 0,navigateToNextHeader:void 0,tabToNextHeader:void 0,navigateToNextCell:void 0,tabToNextCell:void 0,getLocaleText:void 0,getDocument:void 0,paginationNumberFormatter:void 0,getGroupRowAgg:void 0,isGroupOpenByDefault:void 0,ssrmExpandAllAffectsAllRows:void 0,initialGroupOrderComparator:void 0,processPivotResultColDef:void 0,processPivotResultColGroupDef:void 0,getDataPath:void 0,getChildCount:void 0,getServerSideGroupLevelParams:void 0,isServerSideGroupOpenByDefault:void 0,isApplyServerSideTransaction:void 0,isServerSideGroup:void 0,getServerSideGroupKey:void 0,getBusinessKeyForNode:void 0,getRowId:void 0,resetRowDataOnUpdate:void 0,processRowPostCreate:void 0,isRowSelectable:void 0,isRowMaster:void 0,fillOperation:void 0,postSortRows:void 0,getRowStyle:void 0,getRowClass:void 0,getRowHeight:void 0,isFullWidthRow:void 0,isRowValidDropPosition:void 0,"onColumn-everything-changed":void 0,"onNew-columns-loaded":void 0,"onColumn-pivot-mode-changed":void 0,"onPivot-max-columns-exceeded":void 0,"onColumn-row-group-changed":void 0,"onExpand-or-collapse-all":void 0,"onColumn-pivot-changed":void 0,"onGrid-columns-changed":void 0,"onColumn-value-changed":void 0,"onColumn-moved":void 0,"onColumn-visible":void 0,"onColumn-pinned":void 0,"onColumn-group-opened":void 0,"onColumn-resized":void 0,"onDisplayed-columns-changed":void 0,"onVirtual-columns-changed":void 0,"onColumn-header-mouse-over":void 0,"onColumn-header-mouse-leave":void 0,"onColumn-header-clicked":void 0,"onColumn-header-context-menu":void 0,"onAsync-transactions-flushed":void 0,"onRow-group-opened":void 0,"onRow-data-updated":void 0,"onPinned-row-data-changed":void 0,"onPinned-rows-changed":void 0,"onRange-selection-changed":void 0,"onCell-selection-changed":void 0,"onChart-created":void 0,"onChart-range-selection-changed":void 0,"onChart-options-changed":void 0,"onChart-destroyed":void 0,"onTool-panel-visible-changed":void 0,"onTool-panel-size-changed":void 0,"onModel-updated":void 0,"onCut-start":void 0,"onCut-end":void 0,"onPaste-start":void 0,"onPaste-end":void 0,"onFill-start":void 0,"onFill-end":void 0,"onCell-selection-delete-start":void 0,"onCell-selection-delete-end":void 0,"onRange-delete-start":void 0,"onRange-delete-end":void 0,"onUndo-started":void 0,"onUndo-ended":void 0,"onRedo-started":void 0,"onRedo-ended":void 0,"onCell-clicked":void 0,"onCell-double-clicked":void 0,"onCell-mouse-down":void 0,"onCell-context-menu":void 0,"onCell-value-changed":void 0,"onCell-edit-request":void 0,"onRow-value-changed":void 0,"onHeader-focused":void 0,"onCell-focused":void 0,"onRow-selected":void 0,"onSelection-changed":void 0,"onTooltip-show":void 0,"onTooltip-hide":void 0,"onCell-key-down":void 0,"onCell-mouse-over":void 0,"onCell-mouse-out":void 0,"onFilter-changed":void 0,"onFilter-modified":void 0,"onFilter-ui-changed":void 0,"onFilter-opened":void 0,"onFloating-filter-ui-changed":void 0,"onAdvanced-filter-builder-visible-changed":void 0,"onSort-changed":void 0,"onVirtual-row-removed":void 0,"onRow-clicked":void 0,"onRow-double-clicked":void 0,"onGrid-ready":void 0,"onGrid-pre-destroyed":void 0,"onGrid-size-changed":void 0,"onViewport-changed":void 0,"onFirst-data-rendered":void 0,"onDrag-started":void 0,"onDrag-stopped":void 0,"onDrag-cancelled":void 0,"onRow-editing-started":void 0,"onRow-editing-stopped":void 0,"onCell-editing-started":void 0,"onCell-editing-stopped":void 0,"onBody-scroll":void 0,"onBody-scroll-end":void 0,"onPagination-changed":void 0,"onComponent-state-changed":void 0,"onStore-refreshed":void 0,"onState-updated":void 0,"onColumn-menu-visible-changed":void 0,"onContext-menu-visible-changed":void 0,"onRow-drag-enter":void 0,"onRow-drag-move":void 0,"onRow-drag-leave":void 0,"onRow-drag-end":void 0,"onRow-drag-cancel":void 0,"onFind-changed":void 0,"onRow-resize-started":void 0,"onRow-resize-ended":void 0,"onColumns-reset":void 0,"onBulk-editing-started":void 0,"onBulk-editing-stopped":void 0,"onBatch-editing-started":void 0,"onBatch-editing-stopped":void 0}}const xR=(e,t)=>{let o;return()=>{const i=function(){e()};window.clearTimeout(o),o=window.setTimeout(i,t)}};function DR(e){return e&&e.constructor&&e.constructor.toString().substring(0,5)==="class"}function So(e){const t=new WeakSet,o=i=>{if(DR(i))return E.toRaw(i);if(E.isRef(i)||E.isReactive(i)||E.isProxy(i)){const s=E.toRaw(i);return s===i?i:o(s)}if(i!==null&&typeof i=="object"){if(t.has(i))return i;t.add(i)}return Array.isArray(i)?i.map(s=>o(s)):i};return o(e)}const FR=E.defineComponent({__name:"AgGridVue",props:E.mergeDefaults({gridOptions:null,modules:null,modelValue:null,statusBar:null,sideBar:{type:[String,Boolean]},suppressContextMenu:{type:Boolean},preventDefaultOnContextMenu:{type:Boolean},allowContextMenuWithControlKey:{type:Boolean},columnMenu:null,suppressMenuHide:{type:Boolean},enableBrowserTooltips:{type:Boolean},tooltipTrigger:null,tooltipShowDelay:null,tooltipHideDelay:null,tooltipMouseTrack:{type:Boolean},tooltipShowMode:null,tooltipInteraction:{type:Boolean},popupParent:null,copyHeadersToClipboard:{type:Boolean},copyGroupHeadersToClipboard:{type:Boolean},clipboardDelimiter:null,suppressCopyRowsToClipboard:{type:Boolean},suppressCopySingleCellRanges:{type:Boolean},suppressLastEmptyLineOnPaste:{type:Boolean},suppressClipboardPaste:{type:Boolean},suppressClipboardApi:{type:Boolean},suppressCutToClipboard:{type:Boolean},columnDefs:null,defaultColDef:null,defaultColGroupDef:null,columnTypes:null,dataTypeDefinitions:null,maintainColumnOrder:{type:Boolean},enableStrictPivotColumnOrder:{type:Boolean},suppressFieldDotNotation:{type:Boolean},headerHeight:null,groupHeaderHeight:null,floatingFiltersHeight:null,pivotHeaderHeight:null,pivotGroupHeaderHeight:null,hidePaddedHeaderRows:{type:Boolean},allowDragFromColumnsToolPanel:{type:Boolean},suppressMovableColumns:{type:Boolean},suppressColumnMoveAnimation:{type:Boolean},suppressMoveWhenColumnDragging:{type:Boolean},suppressDragLeaveHidesColumns:{type:Boolean},suppressGroupChangesColumnVisibility:{type:[Boolean,String]},suppressMakeColumnVisibleAfterUnGroup:{type:Boolean},suppressRowGroupHidesColumns:{type:Boolean},colResizeDefault:null,suppressAutoSize:{type:Boolean},autoSizePadding:null,skipHeaderOnAutoSize:{type:Boolean},autoSizeStrategy:null,components:null,editType:null,suppressStartEditOnTab:{type:Boolean},getFullRowEditValidationErrors:null,invalidEditValueMode:null,singleClickEdit:{type:Boolean},suppressClickEdit:{type:Boolean},readOnlyEdit:{type:Boolean},stopEditingWhenCellsLoseFocus:{type:Boolean},enterNavigatesVertically:{type:Boolean},enterNavigatesVerticallyAfterEdit:{type:Boolean},enableCellEditingOnBackspace:{type:Boolean},undoRedoCellEditing:{type:Boolean},undoRedoCellEditingLimit:null,defaultCsvExportParams:null,suppressCsvExport:{type:Boolean},defaultExcelExportParams:null,suppressExcelExport:{type:Boolean},excelStyles:null,findSearchValue:null,findOptions:null,quickFilterText:null,cacheQuickFilter:{type:Boolean},includeHiddenColumnsInQuickFilter:{type:Boolean},quickFilterParser:{type:Function},quickFilterMatcher:{type:Function},applyQuickFilterBeforePivotOrAgg:{type:Boolean},excludeChildrenWhenTreeDataFiltering:{type:Boolean},enableAdvancedFilter:{type:Boolean},alwaysPassFilter:{type:Function},includeHiddenColumnsInAdvancedFilter:{type:Boolean},advancedFilterParent:null,advancedFilterBuilderParams:null,advancedFilterParams:null,suppressAdvancedFilterEval:{type:Boolean},suppressSetFilterByDefault:{type:Boolean},enableFilterHandlers:{type:Boolean},filterHandlers:null,loadingCellRenderer:null,loadingCellRendererParams:null,loadingCellRendererSelector:null,localeText:null,masterDetail:{type:Boolean},keepDetailRows:{type:Boolean},keepDetailRowsCount:null,detailCellRenderer:null,detailCellRendererParams:null,detailRowHeight:null,detailRowAutoHeight:{type:Boolean},context:null,alignedGrids:{type:Function},tabIndex:null,rowBuffer:null,valueCache:{type:Boolean},valueCacheNeverExpires:{type:Boolean},enableCellExpressions:{type:Boolean},suppressTouch:{type:Boolean},suppressFocusAfterRefresh:{type:Boolean},suppressBrowserResizeObserver:{type:Boolean},suppressPropertyNamesCheck:{type:Boolean},suppressChangeDetection:{type:Boolean},debug:{type:Boolean},loading:{type:Boolean},overlayLoadingTemplate:null,loadingOverlayComponent:null,loadingOverlayComponentParams:null,suppressLoadingOverlay:{type:Boolean},overlayNoRowsTemplate:null,noRowsOverlayComponent:null,noRowsOverlayComponentParams:null,suppressNoRowsOverlay:{type:Boolean},pagination:{type:Boolean},paginationPageSize:null,paginationPageSizeSelector:{type:Boolean},paginationAutoPageSize:{type:Boolean},paginateChildRows:{type:Boolean},suppressPaginationPanel:{type:Boolean},pivotMode:{type:Boolean},pivotPanelShow:null,pivotMaxGeneratedColumns:null,pivotDefaultExpanded:null,pivotColumnGroupTotals:null,pivotRowTotals:null,pivotSuppressAutoColumn:{type:Boolean},suppressExpandablePivotGroups:{type:Boolean},functionsReadOnly:{type:Boolean},aggFuncs:null,suppressAggFuncInHeader:{type:Boolean},alwaysAggregateAtRootLevel:{type:Boolean},aggregateOnlyChangedColumns:{type:Boolean},suppressAggFilteredOnly:{type:Boolean},removePivotHeaderRowWhenSingleValueColumn:{type:Boolean},animateRows:{type:Boolean},cellFlashDuration:null,cellFadeDuration:null,allowShowChangeAfterFilter:{type:Boolean},domLayout:null,ensureDomOrder:{type:Boolean},enableCellSpan:{type:Boolean},enableRtl:{type:Boolean},suppressColumnVirtualisation:{type:Boolean},suppressMaxRenderedRowRestriction:{type:Boolean},suppressRowVirtualisation:{type:Boolean},rowDragManaged:{type:Boolean},rowDragInsertDelay:null,suppressRowDrag:{type:Boolean},suppressMoveWhenRowDragging:{type:Boolean},rowDragEntireRow:{type:Boolean},rowDragMultiRow:{type:Boolean},rowDragText:{type:Function},dragAndDropImageComponent:null,dragAndDropImageComponentParams:null,fullWidthCellRenderer:null,fullWidthCellRendererParams:null,embedFullWidthRows:{type:Boolean},groupDisplayType:null,groupDefaultExpanded:null,autoGroupColumnDef:null,groupMaintainOrder:{type:Boolean},groupSelectsChildren:{type:Boolean},groupLockGroupColumns:null,groupAggFiltering:{type:Boolean},groupTotalRow:null,grandTotalRow:null,suppressStickyTotalRow:{type:[Boolean,String]},groupSuppressBlankHeader:{type:Boolean},groupSelectsFiltered:{type:Boolean},showOpenedGroup:{type:Boolean},groupHideParentOfSingleChild:{type:[Boolean,String]},groupRemoveSingleChildren:{type:Boolean},groupRemoveLowestSingleChildren:{type:Boolean},groupHideOpenParents:{type:Boolean},groupAllowUnbalanced:{type:Boolean},rowGroupPanelShow:null,groupRowRenderer:null,groupRowRendererParams:null,treeData:{type:Boolean},treeDataChildrenField:null,treeDataParentIdField:null,rowGroupPanelSuppressSort:{type:Boolean},suppressGroupRowsSticky:{type:Boolean},groupHierarchyConfig:null,pinnedTopRowData:null,pinnedBottomRowData:null,enableRowPinning:{type:[Boolean,String]},isRowPinnable:null,isRowPinned:null,rowModelType:null,rowData:null,asyncTransactionWaitMillis:null,suppressModelUpdateAfterUpdateTransaction:{type:Boolean},datasource:null,cacheOverflowSize:null,infiniteInitialRowCount:null,serverSideInitialRowCount:null,suppressServerSideFullWidthLoadingRow:{type:Boolean},cacheBlockSize:null,maxBlocksInCache:null,maxConcurrentDatasourceRequests:null,blockLoadDebounceMillis:null,purgeClosedRowNodes:{type:Boolean},serverSideDatasource:null,serverSideSortAllLevels:{type:Boolean},serverSideEnableClientSideSort:{type:Boolean},serverSideOnlyRefreshFilteredGroups:{type:Boolean},serverSidePivotResultFieldSeparator:null,viewportDatasource:null,viewportRowModelPageSize:null,viewportRowModelBufferSize:null,alwaysShowHorizontalScroll:{type:Boolean},alwaysShowVerticalScroll:{type:Boolean},debounceVerticalScrollbar:{type:Boolean},suppressHorizontalScroll:{type:Boolean},suppressScrollOnNewData:{type:Boolean},suppressScrollWhenPopupsAreOpen:{type:Boolean},suppressAnimationFrame:{type:Boolean},suppressMiddleClickScrolls:{type:Boolean},suppressPreventDefaultOnMouseWheel:{type:Boolean},scrollbarWidth:null,rowSelection:null,cellSelection:{type:Boolean},rowMultiSelectWithClick:{type:Boolean},suppressRowDeselection:{type:Boolean},suppressRowClickSelection:{type:Boolean},suppressCellFocus:{type:Boolean},suppressHeaderFocus:{type:Boolean},selectionColumnDef:null,rowNumbers:{type:Boolean},suppressMultiRangeSelection:{type:Boolean},enableCellTextSelection:{type:Boolean},enableRangeSelection:{type:Boolean},enableRangeHandle:{type:Boolean},enableFillHandle:{type:Boolean},fillHandleDirection:null,suppressClearOnFillReduction:{type:Boolean},sortingOrder:null,accentedSort:{type:Boolean},unSortIcon:{type:Boolean},suppressMultiSort:{type:Boolean},alwaysMultiSort:{type:Boolean},multiSortKey:null,suppressMaintainUnsortedOrder:{type:Boolean},icons:null,rowHeight:null,rowStyle:null,rowClass:null,rowClassRules:null,suppressRowHoverHighlight:{type:Boolean},suppressRowTransform:{type:Boolean},columnHoverHighlight:{type:Boolean},gridId:null,deltaSort:{type:Boolean},treeDataDisplayType:null,enableGroupEdit:{type:Boolean},initialState:null,theme:null,loadThemeGoogleFonts:{type:Boolean},themeCssLayer:null,styleNonce:null,themeStyleContainer:null,getContextMenuItems:null,getMainMenuItems:null,postProcessPopup:{type:Function},processUnpinnedColumns:{type:Function},processCellForClipboard:{type:Function},processHeaderForClipboard:{type:Function},processGroupHeaderForClipboard:{type:Function},processCellFromClipboard:{type:Function},sendToClipboard:{type:Function},processDataFromClipboard:{type:Function},isExternalFilterPresent:{type:Function},doesExternalFilterPass:{type:Function},getChartToolbarItems:null,createChartContainer:{type:Function},focusGridInnerElement:{type:Function},navigateToNextHeader:{type:Function},tabToNextHeader:{type:Function},navigateToNextCell:{type:Function},tabToNextCell:{type:Function},getLocaleText:{type:Function},getDocument:{type:Function},paginationNumberFormatter:{type:Function},getGroupRowAgg:{type:Function},isGroupOpenByDefault:{type:Function},ssrmExpandAllAffectsAllRows:{type:Boolean},initialGroupOrderComparator:{type:Function},processPivotResultColDef:{type:Function},processPivotResultColGroupDef:{type:Function},getDataPath:null,getChildCount:{type:Function},getServerSideGroupLevelParams:{type:Function},isServerSideGroupOpenByDefault:{type:Function},isApplyServerSideTransaction:null,isServerSideGroup:null,getServerSideGroupKey:null,getBusinessKeyForNode:{type:Function},getRowId:null,resetRowDataOnUpdate:{type:Boolean},processRowPostCreate:{type:Function},isRowSelectable:null,isRowMaster:null,fillOperation:{type:Function},postSortRows:{type:Function},getRowStyle:{type:Function},getRowClass:{type:Function},getRowHeight:{type:Function},isFullWidthRow:{type:Function},isRowValidDropPosition:null,"onTool-panel-visible-changed":null,"onTool-panel-size-changed":null,"onColumn-menu-visible-changed":null,"onContext-menu-visible-changed":null,"onCut-start":null,"onCut-end":null,"onPaste-start":null,"onPaste-end":null,"onColumn-visible":null,"onColumn-pinned":null,"onColumn-resized":null,"onColumn-moved":null,"onColumn-value-changed":null,"onColumn-pivot-mode-changed":null,"onColumn-pivot-changed":null,"onColumn-group-opened":null,"onNew-columns-loaded":null,"onGrid-columns-changed":null,"onDisplayed-columns-changed":null,"onVirtual-columns-changed":null,"onColumn-everything-changed":null,"onColumns-reset":null,"onColumn-header-mouse-over":null,"onColumn-header-mouse-leave":null,"onColumn-header-clicked":null,"onColumn-header-context-menu":null,"onComponent-state-changed":null,"onCell-value-changed":null,"onCell-edit-request":null,"onRow-value-changed":null,"onCell-editing-started":null,"onCell-editing-stopped":null,"onRow-editing-started":null,"onRow-editing-stopped":null,"onBulk-editing-started":null,"onBulk-editing-stopped":null,"onBatch-editing-started":null,"onBatch-editing-stopped":null,"onUndo-started":null,"onUndo-ended":null,"onRedo-started":null,"onRedo-ended":null,"onCell-selection-delete-start":null,"onCell-selection-delete-end":null,"onRange-delete-start":null,"onRange-delete-end":null,"onFill-start":null,"onFill-end":null,"onFilter-opened":null,"onFilter-changed":null,"onFilter-modified":null,"onFilter-ui-changed":null,"onFloating-filter-ui-changed":null,"onAdvanced-filter-builder-visible-changed":null,"onFind-changed":null,"onChart-created":null,"onChart-range-selection-changed":null,"onChart-options-changed":null,"onChart-destroyed":null,"onCell-key-down":null,"onGrid-ready":null,"onGrid-pre-destroyed":null,"onFirst-data-rendered":null,"onGrid-size-changed":null,"onModel-updated":null,"onVirtual-row-removed":null,"onViewport-changed":null,"onBody-scroll":null,"onBody-scroll-end":null,"onDrag-started":null,"onDrag-stopped":null,"onDrag-cancelled":null,"onState-updated":null,"onPagination-changed":null,"onRow-drag-enter":null,"onRow-drag-move":null,"onRow-drag-leave":null,"onRow-drag-end":null,"onRow-drag-cancel":null,"onRow-resize-started":null,"onRow-resize-ended":null,"onColumn-row-group-changed":null,"onRow-group-opened":null,"onExpand-or-collapse-all":null,"onPivot-max-columns-exceeded":null,"onPinned-row-data-changed":null,"onPinned-rows-changed":null,"onRow-data-updated":null,"onAsync-transactions-flushed":null,"onStore-refreshed":null,"onHeader-focused":null,"onCell-clicked":null,"onCell-double-clicked":null,"onCell-focused":null,"onCell-mouse-over":null,"onCell-mouse-out":null,"onCell-mouse-down":null,"onRow-clicked":null,"onRow-double-clicked":null,"onRow-selected":null,"onSelection-changed":null,"onCell-context-menu":null,"onRange-selection-changed":null,"onCell-selection-changed":null,"onTooltip-show":null,"onTooltip-hide":null,"onSort-changed":null},ER()),emits:["update:modelValue"],setup(e,{expose:t,emit:o}){const i=e,s=E.ref(),n=E.ref(void 0),r=E.ref(!1),l=E.ref(!1),a=E.ref(!1),d=E.ref({}),c=E.ref(null),u=E.toRefs(i);on().filter(F=>F!="gridOptions").forEach(F=>{E.watch(()=>u[F],(P,T)=>{(F==="rowData"&&!f.value||F!=="rowData")&&I(F,P),f.value=!1},{deep:!0})});const h=new Set(["rowDataUpdated","cellValueChanged","rowValueChanged"]),g=E.ref(i.modelValue),p=E.ref(!1),f=E.ref(!1);E.watch(()=>i.modelValue,F=>{g.value=F}),E.watch(g,(F,P)=>{r.value&&(f.value||(p.value=!0,I("rowData",So(F),So(P))),f.value=!1)},{deep:!0});const C=xR(()=>{f.value=!0,o("update:modelValue",S())},10),m=E.getCurrentInstance(),w=F=>{var P;a.value&&h.has(F)&&(P=m==null?void 0:m.proxy)!=null&&P.$props["onUpdate:modelValue"]&&C()},b=()=>{var F;(i.rowData||(F=i.gridOptions)!=null&&F.rowData)&&g.value&&k(232)},v=()=>{var F;return g.value||i.rowData||((F=i.gridOptions)==null?void 0:F.rowData)},S=()=>{const F=[];return n==null||n.value.forEachLeafNode(P=>{F.push(P.data)}),F},D=F=>P=>{if(l.value)return;P==="gridReady"&&(a.value=!0);const T=ho.has(P);T&&!F||!T&&F||h.has(P)&&(p.value||w(P),p.value=!1)},I=(F,P,T)=>{if(r.value){let V=P.value||P;F==="rowData"&&V!=null&&(V=So(V)),d.value[F]=V,c.value==null&&(c.value=window.setTimeout(()=>{c.value=null,xc(d.value,n.value),d.value={}},0))}},O=()=>Object.create(E.getCurrentInstance().proxy._provided);return E.onMounted(()=>{Et(Ha,void 0,!0);const F=new wR(E.getCurrentInstance(),O()),P={globalListener:D(),globalSyncListener:D(!0),frameworkOverrides:new RR(E.getCurrentInstance()),providedBeanInstances:{frameworkCompWrapper:F},modules:i.modules},T=E.markRaw(Ec(So(i.gridOptions),i,[...on(),...Object.values(bi)])),V=v();V!==void 0&&(T.rowData=So(V)),n.value=kv(s.value,T,P),r.value=!0}),E.onUnmounted(()=>{var F;r.value&&((F=n==null?void 0:n.value)==null||F.destroy(),l.value=!0)}),t({api:n}),{__sfc:!0,props:i,rootRef:s,api:n,gridCreated:r,isDestroyed:l,gridReadyFired:a,batchChanges:d,batchTimeout:c,propsAsRefs:u,ROW_DATA_EVENTS:h,rowDataModel:g,rowDataUpdating:p,emittingRowData:f,emits:o,emitRowModel:C,thisInstance:m,updateModelIfUsed:w,checkForBindingConflicts:b,getRowDataBasedOnBindings:v,getRowData:S,globalEventListenerFactory:D,processChanges:I,getProvides:O}}});function se(e,t,o,i,s,n,r,l){var a=typeof e=="function"?e.options:e;return t&&(a.render=t,a.staticRenderFns=o,a._compiled=!0),n&&(a._scopeId="data-v-"+n),{exports:e,options:a}}var PR=function(){var t=this,o=t._self._c;return t._self._setupProxy,o("div",{ref:"rootRef"})},TR=[],IR=se(FR,PR,TR,!1,null,"60566900");const hd=IR.exports,AR=e=>{const t=E.getCurrentInstance(),o={id:e.id,rowIdMapper:e.rowIdMapper,columns:e.columns,rowData:e.rowData,pageSize:e.pageSize,gridOptions:e.gridOptions,footerHeight:e.footerHeight,editable:e.editable,onRowChange:e.onRowChange,onError:i=>Ad.Message.error(i),instanceCtx:{getInstanceName:i=>{var s,n;return(n=(s=i==null?void 0:i.$options)==null?void 0:s.name)!=null?n:null},getParentInstance:i=>{var s;return(s=i==null?void 0:i.$parent)!=null?s:null}},currentInstance:t==null?void 0:t.proxy};return ed(o)},gd={functional:!0,name:"VNodeRender",props:["params"],render(e,t){var o;const i=t.props.params;return i.render?i.render(i):e("span",(o=i.valueFormatted)!=null?o:i.value)}},MR={functional:!0,props:{params:{type:Object,required:!0}},render(e,t){const o=e("",{});return o.text=`${t.props.params.column.getColId()} holder`,o}},kR=E.defineComponent({name:"CellRenderer"}),LR=E.defineComponent({...kR,props:{params:null},setup(e){const t=e,o=E.computed(()=>{const r=t.params.data,l=r.isEditing()&&t.params.editeRender?t.params.editeRender:t.params.render,a={...t.params,render:l};if(r instanceof Ot){const d=r.getCell(a.column);if(!d)return a.render=t.params.render,a;const{hostArray:c,hostObject:u}=r.getHostObject(a);r.getActualRow().isCellEditing(t.params.node.id,t.params.column)||(a.render=t.params.render),a.hostObject=u,a.hostArrayHook=g=>{var p;let f=c;((p=a.colDef)==null?void 0:p.cellDataType)==="array"&&!c&&(f=[],H.set(r.getData(),d.path,f)),f&&(g(f),r.buildSpan(),a.context.reload(),a.api.redrawRows({rowNodes:a.api.getRenderedNodes().filter(C=>r.match(C))}))}}return a}),i=E.computed(()=>{const r=t.params.data,l=r.getActualRow();if(l.isEditing()&&t.params.editeRender){const d=l.getSourceRow().getData(),c=r.getCell(t.params.column);return c?!H.isEqual(H.get(d,c.getReadPath()),t.params.value):!1}return!1}),s=E.computed(()=>t.params.data.isTransient()),n=E.computed(()=>t.params.data.getRowSpan(t.params.column));return{__sfc:!0,props:t,eventParams:o,isChange:i,isDraft:s,rowSpan:n,VNodeRenderer:gd,CellHolder:MR}}});var GR=function(){var t=this,o=t._self._c,i=t._self._setupProxy;return i.rowSpan>0?o("div",{staticClass:"custom-cell"},[i.isChange?o("span",{staticClass:"value-change"}):t._e(),i.isDraft?o("span",{staticClass:"value-change transient"}):t._e(),o(i.VNodeRenderer,{attrs:{params:i.eventParams}})],1):o(i.CellHolder,{attrs:{params:i.eventParams}})},HR=[],OR=se(LR,GR,HR,!1,null,null);const BR=OR.exports,VR=E.defineComponent({name:"GridToolbar"}),NR=E.defineComponent({...VR,setup(e){return{__sfc:!0}}});var _R=function(){var t=this,o=t._self._c;return t._self._setupProxy,o("div",{staticClass:"grid-toolbar"},[o("div",{staticClass:"grid-toolbar-left"},[t._t("default")],2),o("div",{staticClass:"grid-toolbar-right"},[t._t("system")],2)])},WR=[],zR=se(NR,_R,WR,!1,null,"f12c2536");const pd=zR.exports,$R=E.defineComponent({__name:"FooterCellRender",props:{params:null},setup(e){return{__sfc:!0,props:e,VNodeRenderer:gd}}});var UR=function(){var t=this,o=t._self._c,i=t._self._setupProxy;return o("div",{staticClass:"custom-cell"},[o(i.VNodeRenderer,{attrs:{params:t.params}})],1)},KR=[],jR=se($R,UR,KR,!1,null,"4998e205");const qR=jR.exports,YR=E.defineComponent({name:"SearchItem",props:{search:{type:Object,required:!0},teleported:{type:Boolean}},setup(e){return()=>e.search.render(e.search)}});var ZR=se(YR,null,null,!1,null,"e1931525");const Cn=ZR.exports,QR=E.defineComponent({name:"ClSearch"}),XR=E.defineComponent({...QR,props:{search:null,teleported:{type:Boolean},searchRemote:{type:Function},id:null,confirmButtonText:{default:"搜索"},resetButtonText:{default:"重置"},autoResetSearch:{type:Boolean,default:!0},enable:{type:Boolean,default:!0}},setup(e){const t=e,o=E.ref(),i=E.ref(),s=()=>{t.search.forEach(c=>{c.value=H.cloneDeep(c.initValue)})},n=E.computed(()=>`${t.id}_SEARCH`),r=()=>{localStorage.setItem(n.value,JSON.stringify(t.search.filter(c=>!c.transient).map(c=>({field:c.field,value:c.value}))))},l=()=>{var c;const u=JSON.parse((c=localStorage.getItem(n.value))!=null?c:"[]");t.search.forEach(h=>{const g=u.find(p=>h.field===p.field);h.transient||!g?h.value=H.cloneDeep(h.initValue):h.value=g.value})},a=async()=>{i.value=!0;try{await t.searchRemote(),t.id&&r()}catch(c){console.error(c)}finally{i.value=!1}},d=()=>{if(s(),t.autoResetSearch)return a()};return E.onBeforeMount(()=>{l()}),{__sfc:!0,searchForm:o,props:t,loading:i,reset:s,persistenceKey:n,doPersistence:r,restore:l,doSearch:a,handleReset:d,SearchItem:Cn}}});var JR=function(){var t=this,o=t._self._c,i=t._self._setupProxy;return o("el-form",{ref:"searchForm"},[o("div",{staticClass:"search-container"},[t._l(t.search,function(s){return o("el-form-item",{key:s.field},[o(i.SearchItem,{attrs:{search:s}})],1)}),o("el-form-item",[o("el-button",{staticStyle:{width:"80px"},attrs:{disabled:!t.enable||i.loading,type:"primary"},on:{click:i.doSearch}},[t._v(" "+t._s(t.confirmButtonText)+" ")]),o("el-button",{staticStyle:{width:"80px"},attrs:{disabled:i.loading},on:{click:i.handleReset}},[t._v(t._s(t.resetButtonText))])],1),t._t("default")],2)])},eE=[],tE=se(XR,JR,eE,!1,null,"962588ec");const oE=tE.exports,fd=(e,t,o)=>{const i=E.ref(),s=E.ref(!1),n=E.computed(()=>{if(Array.isArray(o)){const h=o.map(g=>{var p;return(p=g.width)!=null?p:-1}).filter(g=>g);if(h.length>0)return Math.max(...h)}else return o==null?void 0:o.width}),r=h=>H.isEmpty(h)&&!H.isNumber(h),l=E.computed(()=>Array.isArray(o)?o.some(h=>!r(h.value)):!r(o==null?void 0:o.value)),a=E.computed(()=>[s.value?"is-loading":""]),d=E.computed(()=>l.value?"var(--el-color-primary)":void 0);return{visible:i,loading:s,width:n,loadingClass:a,hasCondition:l,hasConditionColor:d,doSearch:async()=>{s.value=!0;try{await e()}catch(h){console.error(h)}finally{s.value=!1,i.value=!1}},reset:()=>{Array.isArray(o)?o.forEach(h=>{h.value=H.cloneDeep(h.initValue)}):o.value=H.cloneDeep(o==null?void 0:o.initValue)}}},iE=E.defineComponent({name:"ClPopoverSearch"}),sE=E.defineComponent({...iE,props:{search:null,teleported:{type:Boolean},searchRemote:{type:Function},field:null},setup(e){const t=e,o=E.computed(()=>{var u;return(u=t.search)==null?void 0:u.find(h=>h.field===t.field)}),{visible:i,loading:s,width:n,loadingClass:r,hasConditionColor:l,doSearch:a,reset:d}=fd(t.searchRemote,t,o.value),c=E.computed(()=>{var u;return(u=n.value)!=null?u:300});return{__sfc:!0,props:t,search:o,visible:i,loading:s,width:n,loadingClass:r,hasConditionColor:l,doSearch:a,reset:d,popoverWidth:c,SearchItem:Cn}}});var nE=function(){var t=this,o=t._self._c,i=t._self._setupProxy;return i.search?o("el-popover",{attrs:{width:i.popoverWidth,trigger:"click"},scopedSlots:t._u([{key:"reference",fn:function(){return[o("div",[t._t("default",function(){return[o("i",{class:["el-icon-search",i.loadingClass],attrs:{color:i.hasConditionColor}})]},null,{loading:i.loading})],2)]},proxy:!0}],null,!0),model:{value:i.visible,callback:function(s){i.visible=s},expression:"visible"}},[o("div",{on:{keyup:function(s){return!s.type.indexOf("key")&&t._k(s.keyCode,"enter",13,s.key,"Enter")?null:i.doSearch.apply(null,arguments)}}},[o("el-form",{on:{submit:function(s){s.preventDefault(),s.stopPropagation()}}},[o("el-form-item",[o(i.SearchItem,t._b({attrs:{search:i.search,teleported:!1}},"SearchItem",{style:"width: 100%"},!1))],1)],1),o("el-space",{staticStyle:{width:"100%","justify-content":"end"},attrs:{size:"small"}},[o("el-button",{attrs:{size:"small"},on:{click:i.reset}},[t._v(" 重置 ")]),o("el-button",{attrs:{loading:i.loading,size:"small",type:"primary"},on:{click:i.doSearch}},[t._v("搜索")])],1)],1)]):t._e()},rE=[],lE=se(sE,nE,rE,!1,null,null);const aE=lE.exports,dE=E.defineComponent({name:"ClDrawerSearch"}),cE=E.defineComponent({...dE,props:{search:null,teleported:{type:Boolean},searchRemote:{type:Function},attached:{type:Boolean}},setup(e){const t=e,{visible:o,loading:i,loadingClass:s,hasConditionColor:n,doSearch:r,reset:l}=fd(t.searchRemote,t,t.search);return E.onMounted(()=>{t.attached||l()}),{__sfc:!0,props:t,visible:o,loading:i,loadingClass:s,hasConditionColor:n,doSearch:r,reset:l,SearchItem:Cn}}});var uE=function(){var t=this,o=t._self._c,i=t._self._setupProxy;return o("div",[o("div",{on:{click:function(s){i.visible=!0}}},[t._t("default",function(){return[o("el-button",{attrs:{disabled:i.loading,circle:""}},[o("i",{class:["el-icon-search",i.loadingClass],attrs:{color:i.hasConditionColor}},[o("Search")],1)])]},null,{loading:i.loading})],2),o("el-drawer",{attrs:{"append-to-body":"","with-header":!1},on:{keyup:function(s){return!s.type.indexOf("key")&&t._k(s.keyCode,"enter",13,s.key,"Enter")?null:i.doSearch.apply(null,arguments)}},model:{value:i.visible,callback:function(s){i.visible=s},expression:"visible"}},[o("el-form",{staticStyle:{height:"calc(100% - 100px)"},attrs:{"label-position":"right","label-suffix":":","label-width":"auto"}},[o("el-scrollbar",t._l(t.search,function(s){return o("el-form-item",{key:s.field,attrs:{label:s.label}},[o(i.SearchItem,t._b({attrs:{search:s,teleported:""}},"SearchItem",{style:"width: 100%"},!1))],1)}),1)],1),o("el-divider"),o("el-space",{staticStyle:{width:"100%","justify-content":"end"},attrs:{size:"small"}},[o("el-button",{on:{click:i.reset}},[t._v(" 重置 ")]),o("el-button",{attrs:{loading:i.loading,type:"primary"},on:{click:i.doSearch}},[t._v("搜索")])],1)],1)],1)},hE=[],gE=se(cE,uE,hE,!1,null,null);const Cd=gE.exports;var pE=Object.defineProperty,fE=(e,t,o)=>t in e?pE(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,CE=(e,t,o)=>fE(e,t+"",o);class mn{constructor(t){CE(this,"record"),this.record=t}static from(t){const o=t.filter(i=>{var s;return(s=i.value)!=null?s:!1}).reduce((i,s)=>({...i,...H.isPlainObject(s.value)?s.value:{[s.field]:s.value}}),{});return new mn(o)}transform(t,o){const i=this.record[t],s=o(i);return delete this.record[t],this.record={...this.record,...s},this}toCondition(t){return{...this.record,...t??{}}}}const mE=E.defineComponent({name:"SearchButton"}),wE=E.defineComponent({...mE,props:{searches:null},setup(e){const t=e,o=E.inject(ct);return{__sfc:!0,props:t,context:o,ClDrawerSearch:Cd}}});var vE=function(){var t=this,o=t._self._c,i=t._self._setupProxy;return o(i.ClDrawerSearch,{attrs:{search:t.searches,"search-remote":i.context.refresh}})},bE=[],SE=se(wE,vE,bE,!1,null,"45be5dfc");const md=SE.exports,yE=E.defineComponent({name:"RefreshButton"}),RE=E.defineComponent({...yE,setup(e){const t=E.ref(!1),{refresh:o}=E.inject(ct);return{__sfc:!0,loading:t,refresh:o,handlerRefreshClick:async()=>{if(!t.value){t.value=!0;try{await o()}catch(s){console.error(s)}finally{t.value=!1}}}}}});var EE=function(){var t=this,o=t._self._c,i=t._self._setupProxy;return o("el-button",{attrs:{disabled:i.loading,circle:""},on:{click:i.handlerRefreshClick}},[o("i",{class:["el-icon-refresh",i.loading?"is-loading":""]})])},xE=[],DE=se(RE,EE,xE,!1,null,"0eaeb325");const wd=DE.exports;function vd(e,t){const o=t(e);return FE(e)&&(o.children=e.children.map(i=>vd(i,t))),o}const FE=e=>!!e.children,PE=()=>{const e=E.inject(ct),t=E.ref(),o=E.ref([]),i=E.ref([]),s=E.ref(),n=C=>{const m=e.api.value.getAllDisplayedColumns(),w=m.find(b=>b.getColId()===C);return w?m.indexOf(w):-1},r=C=>{if(C.field)return C.field;if(C.groupId)return C.groupId;throw new Error(`${C.headerName} field or groupId not found`)},l=()=>{var C,m;o.value=(m=(C=e.api.value.getColumnDefs())==null?void 0:C.map(w=>vd(w,b=>{var v,S;return{id:r(b),label:b.headerName,pined:(S=(v=e.api.value.getColumnGroup(r(b)))==null?void 0:v.getPinned())!=null?S:b.pinned}})))!=null?m:[],i.value=e.api.value.getAllDisplayedColumns().map(w=>w.getColId())},a=(C,m,w)=>w!=="inner"&&C.parent===m.parent,d=()=>{s.value=t.value.getCheckedKeys()},c=C=>{if(C instanceof We)return[C];const m=C.getChildren();return m?[...m.flatMap(w=>c(w))]:[]},u=(C,m,w)=>{const b=n(m[0].colId),v=n(w.colId);return C==="after"?v-m.length+1:v>b?v-m.length:v};return{treeData:o,defaultCheckedKeys:i,treeRef:t,refreshTreeData:l,checkColumnAllowDrop:a,onColumnDragStart:d,onColumnDragFinish:(C,m,w)=>{if(m&&C&&C.key!==m.key){const b=e.api.value.getColumnGroup(C.key),v=e.api.value.getColumn(C.key),S=e.api.value.getColumn(m.key),D=c(b??v);if(S){const I=u(w,D,S);e.api.value.moveColumns(D,I)}}t.value.setCheckedKeys(s.value),s.value=void 0},onColumnVisibleChange:(C,m)=>{e.api.value.setColumnsVisible([C.id],m)},onColumnPinedChange:(C,m)=>{var w;const b=e.api.value.getColumnGroup(C),v=b?b.getDisplayedLeafColumns().map(D=>D.getColId()):[C],S=b?b.getPinned():(w=e.api.value.getColumn(C))==null?void 0:w.getPinned();e.api.value.setColumnsPinned(v,S===m?null:m),l()},columnAutoResize:()=>{e.api.value.sizeColumnsToFit()}}},TE=E.defineComponent({name:"SettingButton"}),IE=E.defineComponent({...TE,setup(e){const{treeRef:t,treeData:o,defaultCheckedKeys:i,refreshTreeData:s,checkColumnAllowDrop:n,onColumnDragStart:r,onColumnDragFinish:l,onColumnVisibleChange:a,onColumnPinedChange:d,columnAutoResize:c}=PE(),u=E.ref(!1),h=E.inject(ct);return{__sfc:!0,treeRef:t,treeData:o,defaultCheckedKeys:i,refreshTreeData:s,checkColumnAllowDrop:n,onColumnDragStart:r,onColumnDragFinish:l,onColumnVisibleChange:a,onColumnPinedChange:d,columnAutoResize:c,visible:u,gridContext:h,handleResetGridState:()=>{h.resetGridState(),s()}}}});var AE=function(){var t=this,o=t._self._c,i=t._self._setupProxy;return o("div",[o("el-button",{attrs:{circle:""},on:{click:function(s){i.visible=!0}}},[o("i",{staticClass:"el-icon-setting"})]),o("el-drawer",{staticClass:"setting-drawer",attrs:{visible:i.visible,size:280,"modal-append-to-body":!0,"append-to-body":!0},on:{"update:visible":function(s){i.visible=s},open:i.refreshTreeData},scopedSlots:t._u([{key:"title",fn:function(){return[o("div",{staticStyle:{display:"flex","align-items":"center"}},[o("span",[t._v("表格显示设置")])])]},proxy:!0}])},[o("el-button",{staticStyle:{"margin-left":"10px"},attrs:{type:"primary",plain:"",size:"mini"},on:{click:i.handleResetGridState}},[t._v("重置")]),o("el-button",{attrs:{type:"primary",plain:"",size:"mini"},on:{click:i.columnAutoResize}},[t._v("自适应")]),i.treeData.length>0?o("el-tree",{ref:"treeRef",staticClass:"cl-grid-column-settings cl-scrollbar",attrs:{"allow-drop":i.checkColumnAllowDrop,"node-key":"id","default-checked-keys":i.defaultCheckedKeys,"show-checkbox":"",data:i.treeData,"default-expand-all":"",draggable:"","highlight-current":""},on:{"node-drag-start":i.onColumnDragStart,"node-drag-end":i.onColumnDragFinish,"check-change":i.onColumnVisibleChange},scopedSlots:t._u([{key:"default",fn:function({node:s}){return[o("div",{class:{"pined-row":s.data.pined==="left"||s.data.pined==="right"},staticStyle:{display:"flex","justify-content":"space-between",width:"100%"}},[o("span",{class:[s.data.pined==="left"||s.data.pined==="right"?"pined-active":""]},[t._v(" "+t._s(s.label)+" ")]),o("span",[o("i",{class:["el-icon-arrow-left",s.data.pined==="left"?"pined-active":""],on:{click:function(n){return n.stopPropagation(),(()=>i.onColumnPinedChange(s.key,"left")).apply(null,arguments)}}}),o("i",{class:["el-icon-arrow-right",s.data.pined==="right"?"pined-active":""],on:{click:function(n){return n.stopPropagation(),(()=>i.onColumnPinedChange(s.key,"right")).apply(null,arguments)}}})])])]}}],null,!1,2278526884)}):t._e()],1)],1)},ME=[],kE=se(IE,AE,ME,!1,null,"522bf761");const bd=kE.exports,LE={functional:!0,name:"HeaderVNodeRender",props:["params"],render(e,t){const o=t.props.params;return o.headerRender?o.headerRender(o):e("span",o.displayName)}},GE=E.defineComponent({name:"HeaderRenderer"}),HE=E.defineComponent({...GE,props:{params:null},setup(e){const t=e,o=E.ref(),i=E.ref(-1),s=E.inject(ct),n=()=>{o.value=t.params.column.getSort(),i.value=Na(t.params.api,t.params.column.getColId())},r=async(l,a)=>{try{o.value=l,t.params.setSort(l,a.shiftKey),await s.refresh()}catch{}};return E.onMounted(()=>{t.params.api.addEventListener("sortChanged",n),n()}),E.onUnmounted(()=>{t.params.api.removeEventListener("sortChanged",n)}),{__sfc:!0,props:t,sorted:o,sortIndex:i,context:s,handleSortChange:n,handleSortClick:r,HeaderVNodeRender:LE}}});var OE=function(){var t=this,o=t._self._c,i=t._self._setupProxy;return o("div",[t.params.headerRender?o(i.HeaderVNodeRender,{attrs:{params:t.params}}):o("span",[t._v(t._s(t.params.displayName))]),t.params.enableSorting?[i.sortIndex>=0?o("span",{staticStyle:{"line-height":"12px"}},[t._v(" "+t._s(i.sortIndex+1))]):t._e(),i.sorted==="asc"?o("i",{staticClass:"el-icon-sort-up",staticStyle:{cursor:"pointer"},attrs:{color:"var(--el-color-primary)"},on:{click:s=>i.handleSortClick(null,s)}}):i.sorted==="desc"?o("i",{staticClass:"el-icon-sort-down",staticStyle:{cursor:"pointer"},attrs:{color:"var(--el-color-danger, #F56C6C)"},on:{click:s=>i.handleSortClick("asc",s)}}):o("i",{staticClass:"el-icon-sort",staticStyle:{cursor:"pointer"},on:{click:s=>i.handleSortClick("desc",s)}})]:t._e()],2)},BE=[],VE=se(HE,OE,BE,!1,null,"126699e0");const NE=VE.exports,_E=E.defineComponent({name:"GridEmptyDataOverlay"}),WE=E.defineComponent({..._E,setup(e){return{__sfc:!0}}});var zE=function(){var t=this,o=t._self._c;return t._self._setupProxy,o("el-empty",{attrs:{description:"没有数据了","image-size":75}})},$E=[],UE=se(WE,zE,$E,!1,null,"05fc87c0");const KE=UE.exports,jE=E.defineComponent({name:"GridLoadingOverlay"}),qE=E.defineComponent({...jE,setup(e){return{__sfc:!0}}});var YE=function(){var t=this,o=t._self._c;return t._self._setupProxy,o("div",{directives:[{name:"loading",rawName:"v-loading",value:!0,expression:"true"}],staticClass:"table-loading",staticStyle:{height:"100%",width:"100%"},attrs:{"element-loading-text":"加载中","element-loading-background":"rgba(0, 0, 0, 0.1)"}})},ZE=[],QE=se(qE,YE,ZE,!1,null,"c60c1386");const XE=QE.exports,JE=(e,t,o)=>{const i=td({columns:e.columns,gridOptions:e.gridOptions,footerHeight:e.footerHeight},t,o);return{...i,footerGridOptions:i.footerGridOptions}},e0=()=>({theme:E.ref("ag-theme-alpine")}),t0=E.defineComponent({name:"Grid",components:{SearchButton:md,RefreshButton:wd,SettingButton:bd,CellRenderer:BR,GridEmptyDataOverlay:KE,HeaderRenderer:NE,GridLoadingOverlay:XE,AgGridVue:hd,GridToolbar:pd,FooterCellRender:qR}}),o0=E.defineComponent({...t0,props:{id:null,rowIdMapper:{type:Function},columns:null,rowData:{type:Function},pageSize:{default:50},footerHeight:null,tools:{default:()=>["search","refresh","setting"]},searches:null,gridOptions:{default:()=>({})},editable:null,onRowChange:{type:Function}},setup(e,{expose:t}){const o=e,i=E.ref(),s=E.ref(),{theme:n}=e0(),{gridOptions:r,dataCache:l,gridStyles:a,gridApi:d,gridElRef:c,reload:u,insertRows:h,existRow:g,getRows:p,refresh:f,resetGridState:C}=AR(o),{footerGridOptions:m,setFooterData:w,footerStyles:b}=JE(o,s,a);return E.provide(ct,{refresh:f,resetGridState:C,api:d}),E.watch(()=>r.value,()=>{d.value&&d.value.updateGridOptions(H.omit(r.value,["scrollbarWidth","getRowId","suppressRowTransform","defaultColGroupDef"]))},{deep:!0}),t({setFooterData:w,updateGridOptions:v=>{d.value.updateGridOptions(v)},reload:u,refresh:f,getRows:p,createRow(v,S=!1){const D=l.value.createRow(v);return S?new Fi(D,o.rowIdMapper,!0):D},existRow:g,insertRows:h,startEditing:()=>{const v=l.value.getRows().filter(S=>!S.isEditing());H.isEmpty(v)||(v.forEach(S=>S.startEditing()),u(),d.value.redrawRows())},stopEditing:()=>{const v=l.value.getRows().filter(S=>S.isEditing());H.isEmpty(v)||(v.forEach(S=>S.stopEditing()),u(),d.value.redrawRows())},deselectAll:(v,S)=>{d.value.deselectAll(v,S)}}),{__sfc:!0,props:o,bottomRef:i,gridRef:s,theme:n,options:r,dataCache:l,gridStyles:a,gridApi:d,gridElRef:c,reload:u,insertRows:h,existRow:g,getRows:p,refresh:f,resetGridState:C,footerGridOptions:m,setFooterData:w,footerStyles:b,AgGridVue:hd,GridToolbar:pd,SearchButton:md,RefreshButton:wd,SettingButton:bd}}});var i0=function(){var t=this,o=t._self._c,i=t._self._setupProxy;return o("div",{ref:"gridElRef",staticClass:"cl-grid"},[o(i.GridToolbar,{scopedSlots:t._u([{key:"system",fn:function(){return[t.searches&&t.tools.includes("search")?o(i.SearchButton,{attrs:{searches:t.searches}}):t._e(),t.tools.includes("refresh")?o(i.RefreshButton):t._e(),t.tools.includes("setting")?o(i.SettingButton):t._e()]},proxy:!0}])},[t._t("toolbar")],2),o("div",{staticClass:"cl-grid-container"},[o(i.AgGridVue,{ref:"gridRef",staticClass:"cl-scrollbar flex-1",class:[i.theme],style:i.gridStyles,attrs:{tooltipShowDelay:500,"loading-overlay-component":"GridLoadingOverlay","no-rows-overlay-component":"GridEmptyDataOverlay","grid-options":{...i.options,suppressHorizontalScroll:!!t.footerHeight,alignedGrids:()=>[i.bottomRef].filter(s=>s)}}}),t.footerHeight?o(i.AgGridVue,{ref:"bottomRef",staticClass:"cl-scrollbar footer-grid",class:[i.theme],style:i.footerStyles,attrs:{"grid-options":i.footerGridOptions}}):t._e()],1)],1)},s0=[],n0=se(o0,i0,s0,!1,null,null);const r0=n0.exports;var l0=Object.defineProperty,a0=(e,t,o)=>t in e?l0(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,yo=(e,t,o)=>a0(e,typeof t!="symbol"?t+"":t,o);const d0=e=>new Sd(e);class Sd{constructor(t){yo(this,"colDef"),yo(this,"agGridCellRenderParams"),this.colDef=t,this.agGridCellRenderParams={}}cellRender(t){return this.agGridCellRenderParams.render=t,this}footerRender(t){return this.agGridCellRenderParams.footerRender=t,this}editeRender(t){return this.agGridCellRenderParams.editeRender=t,this}headerRender(t){return this.agGridCellRenderParams.headerRender=t,this}build(){return this.agGridCellRenderParams.headerRender&&(this.colDef.headerComponentParams=this.agGridCellRenderParams.headerRender),this.colDef.cellRendererParams=this.agGridCellRenderParams,this.colDef}}const c0=e=>new yd(e);class yd{constructor(t){yo(this,"colDefs"),yo(this,"rendersMap",new Map),yo(this,"headerRendersMap",new Map),this.colDefs=t,this.eachColDef(t,o=>{this.rendersMap.set(o.field,{}),this.headerRendersMap.set(o.field,{})})}eachColDef(t,o){for(const i of t)ja.isGroupColDef(i)?this.eachColDef(i.children,o):o(i)}getRenderParams(t){if(!this.rendersMap.has(t))throw new Error(`${t} 不存在配置项`);return this.rendersMap.get(t)}getHeaderRenderParams(t){if(!this.headerRendersMap.has(t))throw new Error(`${t} 不存在配置项`);return this.headerRendersMap.get(t)}render(t,o){return this.getRenderParams(t).render=o,this}footerRender(t,o){return this.getRenderParams(t).footerRender=o,this}editRender(t,o){return this.getRenderParams(t).editeRender=o,this}headerRender(t,o){return this.getHeaderRenderParams(t).headerRender=o,this}alwaysRender(t){this.eachColDef(this.colDefs,o=>{o.field===t&&(o.enableCellChangeFlash=!1,o.tooltipValueGetter=()=>"",o.valueGetter=i=>i.data.getSignature())})}build(){return this.eachColDef(this.colDefs,t=>{const o=this.headerRendersMap.get(t.field);o!=null&&o.headerRender&&(t.headerComponentParams=o),t.cellRendererParams=this.rendersMap.get(t.field)}),this.colDefs}}const u0=(e,t)=>({model:{value:H.get(e,t),callback:o=>{H.set(e,t,o)}}});Gd({theme:"legacy"});const h0={install:()=>{Uu.registerModules([Yb,Zb,Qb,Xb,eS,Jb,RS,lS,sb,_l,Ha,kS,_S,KS,JS,ad,mv,dy,fy,cy,Sy,bv,mS,xa,yy,Ey,tf,ry,ud,cd,tS])}};L.ActualRow=mo,L.CLEAN_AG_GRID_OPTIONS=Ua,L.CellEditableRow=Pi,L.CellRenderAdapter=Sd,L.CellValue=Bt,L.ClDrawerSearch=Cd,L.ClPopoverSearch=aE,L.ClSearch=oE,L.ClientSideRowModelApiModule=ud,L.ClientSideRowModelModule=cd,L.ColumnRendersBuilder=yd,L.EditableRow=Fi,L.GRID_CONTEXT=ct,L.Grid=r0,L.GridDataCache=$a,L.GridDataSource=_a,L.GridUtils=ja,L.ID_FIRST_DEEP=Ka,L.ID_SPLITTER=Ti,L.ProjectionRow=Ot,L.RowSelectionModule=ad,L.RowSpans=hn,L.Searches=mn,L.ServerGetRowsParamsRequest=Vt,L.SharedRowSelectionModule=ld,L.SpanMatrix=za,L.VueGridPlugin=h0,L._getColumnSortIndexe=Na,L._getSortedColumns=un,L._getSortedColumnsIndexes=Va,L.buildProxyOptions=Ya,L.defaultColDefCellClassRules=Qa,L.isActualRow=Py,L.isGridRow=Fy,L.mergeRowClass=gn,L.selectionColumnCellClassRules=Za,L.useFooter=td,L.useGrid=ed,L.useGridScroll=Xa,L.useGridState=qa,L.vModel=u0,L.withColumnRenderBuilder=c0,L.withRender=d0,Object.defineProperty(L,Symbol.toStringTag,{value:"Module"})});
58
+ If you are trying to annotate ${i} with application data, use the '${i}.context' property instead.`),qt(c)}if(l.length>0&&s){const a=this.beans.frameworkOverrides.getDocLink(s);qt(`to see all the valid ${i} properties please check: ${a}`)}}getConsoleMessage(e,t){return Av(e,t)}};function ob(e,t,o){const i={},s=e.filter(n=>!t.some(r=>r===n));return s.length>0&&s.forEach(n=>i[n]=ln({inputValue:n,allSuggestions:o}).values),i}var ib=new Set(["firstChildChanged","lastChildChanged","childIndexChanged"]),sb={moduleName:"Validation",version:G,beans:[tb]},Ri=0,nb=200,rb=class extends x{constructor(){super(...arguments),this.beanName="popupSvc",this.popupList=[]}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.gridCtrl=e.gridCtrl}),this.addManagedEventListeners({gridStylesChanged:this.handleThemeChange.bind(this)})}getPopupParent(){const e=this.gos.get("popupParent");return e||this.gridCtrl.getGui()}positionPopupForMenu(e){const{eventSource:t,ePopup:o,column:i,node:s,event:n}=e,r=t.getBoundingClientRect(),l=this.getParentRect();this.setAlignedTo(t,o);let a=!1;const d=()=>{const c=this.keepXYWithinBounds(o,r.top-l.top,0),u=o.clientWidth>0?o.clientWidth:200;a||(o.style.minWidth=`${u}px`,a=!0);const g=l.right-l.left-u;let p;return this.gos.get("enableRtl")?(p=C(),p<0&&(p=f(),this.setAlignedStyles(o,"left")),p>g&&(p=0,this.setAlignedStyles(o,"right"))):(p=f(),p>g&&(p=C(),this.setAlignedStyles(o,"right")),p<0&&(p=0,this.setAlignedStyles(o,"left"))),{x:p,y:c};function f(){return r.right-l.left-2}function C(){return r.left-l.left-u}};this.positionPopup({ePopup:o,keepWithinBounds:!0,updatePosition:d,postProcessCallback:()=>this.callPostProcessPopup("subMenu",o,t,n instanceof MouseEvent?n:void 0,i,s)})}positionPopupUnderMouseEvent(e){const{ePopup:t,nudgeX:o,nudgeY:i,skipObserver:s}=e;this.positionPopup({ePopup:t,nudgeX:o,nudgeY:i,keepWithinBounds:!0,skipObserver:s,updatePosition:()=>this.calculatePointerAlign(e.mouseEvent),postProcessCallback:()=>this.callPostProcessPopup(e.type,e.ePopup,null,e.mouseEvent,e.column,e.rowNode)})}calculatePointerAlign(e){const t=this.getParentRect();return{x:e.clientX-t.left,y:e.clientY-t.top}}positionPopupByComponent(e){const{ePopup:t,nudgeX:o,nudgeY:i,keepWithinBounds:s,eventSource:n,alignSide:r="left",position:l="over",column:a,rowNode:d,type:c}=e,u=n.getBoundingClientRect(),h=this.getParentRect();this.setAlignedTo(n,t);const g=()=>{let p=u.left-h.left;r==="right"&&(p-=t.offsetWidth-u.width);let f;return l==="over"?(f=u.top-h.top,this.setAlignedStyles(t,"over")):(this.setAlignedStyles(t,"under"),this.shouldRenderUnderOrAbove(t,u,h,e.nudgeY||0)==="under"?f=u.top-h.top+u.height:f=u.top-t.offsetHeight-(i||0)*2-h.top),{x:p,y:f}};this.positionPopup({ePopup:t,nudgeX:o,nudgeY:i,keepWithinBounds:s,updatePosition:g,postProcessCallback:()=>this.callPostProcessPopup(c,t,n,null,a,d)})}shouldRenderUnderOrAbove(e,t,o,i){const s=o.bottom-t.bottom,n=t.top-o.top,r=e.offsetHeight+i;return s>r?"under":n>r||n>s?"above":"under"}setAlignedStyles(e,t){const o=this.getPopupIndex(e);if(o===-1)return;const i=this.popupList[o],{alignedToElement:s}=i;!s||(["right","left","over","above","under"].forEach(r=>{s.classList.remove(`ag-has-popup-positioned-${r}`),e.classList.remove(`ag-popup-positioned-${r}`)}),!t)||(s.classList.add(`ag-has-popup-positioned-${t}`),e.classList.add(`ag-popup-positioned-${t}`))}setAlignedTo(e,t){const o=this.getPopupIndex(t);if(o!==-1){const i=this.popupList[o];i.alignedToElement=e}}callPostProcessPopup(e,t,o,i,s,n){const r=this.gos.getCallback("postProcessPopup");r&&r({column:s,rowNode:n,ePopup:t,type:e,eventSource:o,mouseEvent:i})}positionPopup(e){const{ePopup:t,keepWithinBounds:o,nudgeX:i,nudgeY:s,skipObserver:n,updatePosition:r}=e,l={width:0,height:0},a=(d=!1)=>{let{x:c,y:u}=r();d&&t.clientWidth===l.width&&t.clientHeight===l.height||(l.width=t.clientWidth,l.height=t.clientHeight,i&&(c+=i),s&&(u+=s),o&&(c=this.keepXYWithinBounds(t,c,1),u=this.keepXYWithinBounds(t,u,0)),t.style.left=`${c}px`,t.style.top=`${u}px`,e.postProcessCallback&&e.postProcessCallback())};if(a(),!n){const d=Ze(this.beans,t,()=>a(!0));setTimeout(()=>d(),nb)}}getActivePopups(){return this.popupList.map(e=>e.element)}getParentRect(){const e=J(this.beans);let t=this.getPopupParent();return t===e.body?t=e.documentElement:getComputedStyle(t).position==="static"&&(t=t.offsetParent),Hn(t)}keepXYWithinBounds(e,t,o){const i=o===0,s=i?"clientHeight":"clientWidth",n=i?"top":"left",r=i?"height":"width",l=i?"scrollTop":"scrollLeft",a=J(this.beans),d=a.documentElement,c=this.getPopupParent(),u=e.getBoundingClientRect(),h=c.getBoundingClientRect(),g=a.documentElement.getBoundingClientRect(),p=c===a.body,f=Math.ceil(u[r]);let m=p?(i?ic:ji)(d)+d[l]:c[s];p&&(m-=Math.abs(g[n]-h[n]));const w=m-f;return Math.min(Math.max(t,0),Math.abs(w))}addPopup(e){const t=J(this.beans),{eChild:o,ariaLabel:i,ariaOwns:s,alwaysOnTop:n,positionCallback:r,anchorToElement:l}=e;if(!t)return k(122),{hideFunc:()=>{}};const a=this.getPopupIndex(o);if(a!==-1)return{hideFunc:this.popupList[a].hideFunc};this.initialisePopupPosition(o);const d=this.createPopupWrapper(o,!!n,i,s),c=this.addEventListenersToPopup({...e,wrapperEl:d});return r&&r(),this.addPopupToPopupList(o,d,c,l),{hideFunc:c}}initialisePopupPosition(e){const o=this.getPopupParent().getBoundingClientRect();M(e.style.top)||(e.style.top=`${o.top*-1}px`),M(e.style.left)||(e.style.left=`${o.left*-1}px`)}createPopupWrapper(e,t,o,i){const s=this.getPopupParent(),{environment:n,gos:r}=this.beans,l=X({tag:"div"});return n.applyThemeClasses(l),l.classList.add("ag-popup"),e.classList.add(r.get("enableRtl")?"ag-rtl":"ag-ltr","ag-popup-child"),e.hasAttribute("role")||Be(e,"dialog"),o?zt(e,o):i&&(e.id||(e.id=`popup-component-${Ri}`),Pn(i,e.id)),l.appendChild(e),s.appendChild(l),t?this.setAlwaysOnTop(e,!0):this.bringPopupToFront(e),l}handleThemeChange(e){if(e.themeChanged){const t=this.beans.environment;for(const o of this.popupList)t.applyThemeClasses(o.wrapper)}}addEventListenersToPopup(e){const t=this.beans,o=J(t),i=this.getPopupParent(),{wrapperEl:s,eChild:n,closedCallback:r,afterGuiAttached:l,closeOnEsc:a,modal:d,ariaOwns:c}=e;let u=!1;const h=C=>{if(!s.contains(Y(t)))return;C.key===y.ESCAPE&&!ke(C)&&f({keyboardEvent:C})},g=C=>f({mouseEvent:C}),p=C=>f({touchEvent:C}),f=(C={})=>{const{mouseEvent:m,touchEvent:w,keyboardEvent:b,forceHide:v}=C;!v&&(this.isEventFromCurrentPopup({mouseEvent:m,touchEvent:w},n)||u)||(u=!0,i.removeChild(s),o.removeEventListener("keydown",h),o.removeEventListener("mousedown",g),o.removeEventListener("touchstart",p),o.removeEventListener("contextmenu",g),this.eventSvc.removeEventListener("dragStarted",g),r&&r(m||w||b),this.removePopupFromPopupList(n,c))};return l&&l({hidePopup:f}),window.setTimeout(()=>{a&&o.addEventListener("keydown",h),d&&(o.addEventListener("mousedown",g),this.eventSvc.addEventListener("dragStarted",g),o.addEventListener("touchstart",p),o.addEventListener("contextmenu",g))},0),f}addPopupToPopupList(e,t,o,i){this.popupList.push({element:e,wrapper:t,hideFunc:o,instanceId:Ri,isAnchored:!!i}),i&&this.setPopupPositionRelatedToElement(e,i),Ri=Ri+1}getPopupIndex(e){return this.popupList.findIndex(t=>t.element===e)}setPopupPositionRelatedToElement(e,t){const o=this.getPopupIndex(e);if(o===-1)return;const i=this.popupList[o];if(i.stopAnchoringPromise&&i.stopAnchoringPromise.then(n=>n&&n()),i.stopAnchoringPromise=void 0,i.isAnchored=!1,!t)return;const s=this.keepPopupPositionedRelativeTo({element:t,ePopup:e,hidePopup:i.hideFunc});return i.stopAnchoringPromise=s,i.isAnchored=!0,s}removePopupFromPopupList(e,t){this.setAlignedStyles(e,null),this.setPopupPositionRelatedToElement(e,null),t&&Pn(t,null),this.popupList=this.popupList.filter(o=>o.element!==e)}keepPopupPositionedRelativeTo(e){const t=this.getPopupParent(),o=t.getBoundingClientRect(),{element:i,ePopup:s}=e,n=i.getBoundingClientRect(),r=u=>parseInt(u.substring(0,u.length-1),10),l=(u,h)=>{const g=o[u]-n[u],p=r(s.style[u]);return{initialDiff:g,lastDiff:g,initial:p,last:p,direction:h}},a=l("top",0),d=l("left",1),c=this.beans.frameworkOverrides;return new eo(u=>{c.wrapIncoming(()=>{c.setInterval(()=>{const h=t.getBoundingClientRect(),g=i.getBoundingClientRect();if(g.top==0&&g.left==0&&g.height==0&&g.width==0){e.hidePopup();return}const f=(C,m)=>{const w=r(s.style[m]);C.last!==w&&(C.initial=w,C.last=w);const b=h[m]-g[m];if(b!=C.lastDiff){const v=this.keepXYWithinBounds(s,C.initial+C.initialDiff-b,C.direction);s.style[m]=`${v}px`,C.last=v}C.lastDiff=b};f(a,"top"),f(d,"left")},200).then(h=>{u(()=>{h!=null&&window.clearInterval(h)})})},"popupPositioning")})}hasAnchoredPopup(){return this.popupList.some(e=>e.isAnchored)}isEventFromCurrentPopup(e,t){const{mouseEvent:o,touchEvent:i}=e,s=o||i;if(!s)return!1;const n=this.getPopupIndex(t);if(n===-1)return!1;for(let r=n;r<this.popupList.length;r++){const l=this.popupList[r];if(Tc(l.element,s))return!0}return this.isElementWithinCustomPopup(s.target)}isElementWithinCustomPopup(e){const t=J(this.beans);for(;e&&e!==t.body;){if(e.classList.contains("ag-custom-component-popup")||e.parentElement===null)return!0;e=e.parentElement}return!1}getWrapper(e){for(;!e.classList.contains("ag-popup")&&e.parentElement;)e=e.parentElement;return e.classList.contains("ag-popup")?e:null}setAlwaysOnTop(e,t){const o=this.getWrapper(e);o&&(o.classList.toggle("ag-always-on-top",!!t),t&&this.bringPopupToFront(o))}bringPopupToFront(e){const t=this.getPopupParent(),o=Array.prototype.slice.call(t.querySelectorAll(".ag-popup")),i=o.length,s=this.getWrapper(e);if(!s||i<=1||!t.contains(e))return;const n=[],r=[];for(const h of o)h!==s&&(h.classList.contains("ag-always-on-top")?r.push(h):n.push(h));const l=[],a=r.length,u=s.classList.contains("ag-always-on-top")||!a?[...n,...r,s]:[...n,s,...r];for(let h=0;h<=i;h++){const g=u[h];if(o[h]===u[h]||g===s)continue;g.querySelectorAll("div").forEach(f=>{f.scrollTop!==0&&l.push([f,f.scrollTop])}),h===0?t.insertAdjacentElement("afterbegin",g):u[h-1].insertAdjacentElement("afterend",g)}for(;l.length;){const h=l.pop();h[0].scrollTop=h[1]}}},Ea={moduleName:"Popup",version:G,beans:[rb]},lb=".ag-tooltip{background-color:var(--ag-tooltip-background-color);border:var(--ag-tooltip-border);border-radius:var(--ag-border-radius);color:var(--ag-tooltip-text-color);padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding);position:absolute;white-space:normal;z-index:99999;&:where(.ag-cell-editor-tooltip){background-color:var(--ag-tooltip-error-background-color);border:var(--ag-tooltip-error-border);color:var(--ag-tooltip-error-text-color);font-weight:500}}.ag-tooltip-custom{position:absolute;z-index:99999}.ag-tooltip-custom:where(:not(.ag-tooltip-interactive)),.ag-tooltip:where(:not(.ag-tooltip-interactive)){pointer-events:none}.ag-tooltip-animate{transition:opacity 1s;&:where(.ag-tooltip-hiding){opacity:0}}",cn=(e,t,o)=>{var l,a,d;const{editModelSvc:i}=e,s=(a=(l=i==null?void 0:i.getCellValidationModel())==null?void 0:l.getCellValidation(t))==null?void 0:a.errorMessages,n=(d=i==null?void 0:i.getRowValidationModel().getRowValidation(t))==null?void 0:d.errorMessages,r=s||n;return r&&r.length?r.join(o("tooltipValidationErrorSeparator",". ")):void 0},ab=class extends x{constructor(){super(...arguments),this.beanName="tooltipSvc"}setupHeaderTooltip(e,t,o,i){e&&t.destroyBean(e);const s=dn(this.gos),{column:n,eGui:r}=t,l=n.getColDef();!i&&s&&!l.headerComponent&&(i=Po(()=>r.querySelector(".ag-header-cell-text")));const a={getColumn:()=>n,getColDef:()=>n.getColDef(),getGui:()=>r,getLocation:()=>"header",getTooltipValue:()=>o??n.getColDef().headerTooltip,shouldDisplayTooltip:i};let d=this.createTooltipFeature(a);return d&&(d=t.createBean(d),t.setRefreshFunction("tooltip",()=>d.refreshTooltip())),d}setupHeaderGroupTooltip(e,t,o,i){e&&t.destroyBean(e);const s=dn(this.gos),{column:n,eGui:r}=t,l=n.getColGroupDef();!i&&s&&!(l!=null&&l.headerGroupComponent)&&(i=Po(()=>r.querySelector(".ag-header-group-text")));const a={getColumn:()=>n,getGui:()=>r,getLocation:()=>"headerGroup",getTooltipValue:()=>o??(l&&l.headerTooltip),shouldDisplayTooltip:i};l&&(a.getColDef=()=>l);const d=this.createTooltipFeature(a);return d&&t.createBean(d)}enableCellTooltipFeature(e,t,o){const{beans:i}=this,{gos:s,editSvc:n}=i,{column:r,rowNode:l}=e;let a="cell";const d=()=>{const g=!!!(n!=null&&n.isEditing(e))&&cn(i,e,this.getLocaleTextFunc());if(g)return a="cellEditor",g;a="cell";const p=r.getColDef(),f=l.data;if(p.tooltipField&&M(f))return Wt(f,p.tooltipField,r.isTooltipFieldContainsDots());const C=p.tooltipValueGetter;return C?C(_(s,{location:"cell",colDef:r.getColDef(),column:r,rowIndex:e.cellPosition.rowIndex,node:l,data:l.data,value:e.value,valueFormatted:e.valueFormatted})):null},c=dn(s);o||(c&&!e.isCellRenderer()?o=()=>{const h=!!(n!=null&&n.isEditing(e));if(!h&&cn(i,e,this.getLocaleTextFunc()))return!0;if(!r.isTooltipEnabled())return!1;const f=Po(()=>{const C=e.eGui;return C.children.length===0?C:C.querySelector(".ag-cell-value")});return!h&&f()}:o=()=>!(n!=null&&n.isEditing(e)));const u={getColumn:()=>r,getColDef:()=>r.getColDef(),getRowIndex:()=>e.cellPosition.rowIndex,getRowNode:()=>l,getGui:()=>e.eGui,getLocation:()=>a,getTooltipValue:t!=null?()=>t:d,getValueFormatted:()=>e.valueFormatted,shouldDisplayTooltip:o};return this.createTooltipFeature(u,i)}setupFullWidthRowTooltip(e,t,o,i){const s={getGui:()=>t.getFullWidthElement(),getTooltipValue:()=>o,getLocation:()=>"fullWidthRow",shouldDisplayTooltip:i},n=this.beans,r=n.context;e&&t.destroyBean(e,r);const l=this.createTooltipFeature(s,n);if(l)return t.createBean(l,r)}setupCellEditorTooltip(e,t){var l,a;const{beans:o}=this,{context:i}=o,s=((l=t.getValidationElement)==null?void 0:l.call(t,!0))||!((a=t.isPopup)!=null&&a.call(t))&&e.eGui;if(!s)return;const n={getGui:()=>s,getTooltipValue:()=>cn(o,e,this.getLocaleTextFunc()),getLocation:()=>"cellEditor",shouldDisplayTooltip:()=>{var p,f;const{editModelSvc:d}=o,c=(p=d==null?void 0:d.getRowValidationModel())==null?void 0:p.getRowValidationMap(),u=(f=d==null?void 0:d.getCellValidationModel())==null?void 0:f.getCellValidationMap(),h=!!c&&c.size>0,g=!!u&&u.size>0;return h||g}},r=this.createTooltipFeature(n,o);if(r)return e.createBean(r,i)}initCol(e){const{colDef:t}=e;e.tooltipEnabled=M(t.tooltipField)||M(t.tooltipValueGetter)||M(t.tooltipComponent)}createTooltipFeature(e,t){return this.beans.registry.createDynamicBean("tooltipFeature",!1,e,t)}},xa={moduleName:"Tooltip",version:G,beans:[ab],dynamicBeans:{tooltipFeature:Kv},userComponents:{agTooltipComponent:Wv},dependsOn:[Ea],css:[lb]},db=".ag-cell-inline-editing{border:var(--ag-cell-editing-border)!important;border-radius:var(--ag-border-radius);box-shadow:var(--ag-cell-editing-shadow);padding:0;z-index:1;.ag-cell-edit-wrapper,.ag-cell-editor,.ag-cell-wrapper,:where(.ag-cell-editor) .ag-input-field-input,:where(.ag-cell-editor) .ag-wrapper{height:100%;line-height:normal;min-height:100%;width:100%}&.ag-cell-editing-error{border-color:var(--ag-invalid-color)!important}}:where(.ag-popup-editor) .ag-large-text{background-color:var(--ag-background-color);border-radius:var(--ag-border-radius);box-shadow:var(--ag-dropdown-shadow);padding:0}.ag-large-text-input{height:auto;padding:var(--ag-cell-horizontal-padding)}:where(.ag-rtl .ag-large-text-input) textarea{resize:none}:where(.ag-ltr) .ag-checkbox-edit{padding-left:var(--ag-cell-horizontal-padding)}:where(.ag-rtl) .ag-checkbox-edit{padding-right:var(--ag-cell-horizontal-padding)}:where(.ag-row.ag-row-editing-invalid .ag-cell-inline-editing){opacity:.8}",cb={tag:"div",cls:"ag-cell-wrapper ag-cell-edit-wrapper ag-checkbox-edit",children:[{tag:"ag-checkbox",ref:"eEditor",role:"presentation"}]},ub=class extends fi{constructor(){super(cb,[Gs]),this.eEditor=A}initialiseEditor(e){const t=e.value??void 0,o=this.eEditor;o.setValue(t),o.getInputElement().setAttribute("tabindex","-1"),this.setAriaLabel(t),this.addManagedListeners(o,{fieldValueChanged:s=>this.setAriaLabel(s.selected)})}getValue(){return this.eEditor.getValue()}focusIn(){this.eEditor.getFocusableElement().focus()}afterGuiAttached(){this.params.cellStartedEdit&&this.focusIn()}isPopup(){return!1}setAriaLabel(e){const t=this.getLocaleTextFunc(),o=Tn(t,e),i=t("ariaToggleCellValue","Press SPACE to toggle cell value");this.eEditor.setInputAriaLabel(`${i} (${o})`)}getValidationElement(e){return e?this.params.eGridCell:this.eEditor.getInputElement()}getValidationErrors(){const{params:e}=this,{getValidationErrors:t}=e,o=this.getValue();return t?t({value:o,internalErrors:null,cellEditorParams:e}):null}},Ei=class extends fi{constructor(e){super(),this.cellEditorInput=e,this.eEditor=A}initialiseEditor(e){const{cellEditorInput:t}=this;this.setTemplate({tag:"div",cls:"ag-cell-edit-wrapper",children:[t.getTemplate()]},t.getAgComponents());const{eEditor:o}=this,{cellStartedEdit:i,eventKey:s,suppressPreventDefault:n}=e;o.getInputElement().setAttribute("title",""),t.init(o,e);let r,l=!0;i?(this.focusAfterAttached=!0,s===y.BACKSPACE||s===y.DELETE?r="":s&&s.length===1?n?l=!1:r=s:(r=t.getStartValue(),s!==y.F2&&(this.highlightAllOnFocus=!0))):(this.focusAfterAttached=!1,r=t.getStartValue()),l&&r!=null&&o.setStartValue(r),this.addGuiEventListener("keydown",a=>{const{key:d}=a;(d===y.PAGE_UP||d===y.PAGE_DOWN)&&a.preventDefault()})}afterGuiAttached(){var i,s;const e=this.getLocaleTextFunc(),t=this.eEditor;if(t.setInputAriaLabel(e("ariaInputEditor","Input Editor")),!this.focusAfterAttached)return;ht()||t.getFocusableElement().focus();const o=t.getInputElement();this.highlightAllOnFocus?o.select():(s=(i=this.cellEditorInput).setCaret)==null||s.call(i)}focusIn(){const{eEditor:e}=this,t=e.getFocusableElement(),o=e.getInputElement();t.focus(),o.select()}getValue(){return this.cellEditorInput.getValue()}isPopup(){return!1}getValidationElement(){return this.eEditor.getInputElement()}getValidationErrors(){return this.cellEditorInput.getValidationErrors()}},hb={tag:"ag-input-date-field",ref:"eEditor",cls:"ag-cell-editor"},gb=class{constructor(e,t){this.getDataTypeService=e,this.getLocaleTextFunc=t}getTemplate(){return hb}getAgComponents(){return[Dl]}init(e,t){var r,l;this.eEditor=e,this.params=t;const{min:o,max:i,step:s,colDef:n}=t;o!=null&&e.setMin(o),i!=null&&e.setMax(i),s!=null&&e.setStep(s),this.includeTime=t.includeTime??((l=(r=this.getDataTypeService())==null?void 0:r.getDateIncludesTimeFlag)==null?void 0:l.call(r,n.cellDataType)),this.includeTime!=null&&e.setIncludeTime(this.includeTime)}getValidationErrors(){const t=this.eEditor.getInputElement().valueAsDate,{params:o}=this,{min:i,max:s,getValidationErrors:n}=o;let r=[];const l=this.getLocaleTextFunc();if(t instanceof Date&&!isNaN(t.getTime())){if(i){const a=i instanceof Date?i:new Date(i);if(t<a){const d=a.toLocaleDateString();r.push(l("minDateValidation",`Date must be after ${d}`,[d]))}}if(s){const a=s instanceof Date?s:new Date(s);if(t>a){const d=a.toLocaleDateString();r.push(l("maxDateValidation",`Date must be before ${d}`,[d]))}}}return r.length||(r=null),n?n({value:t,cellEditorParams:o,internalErrors:r}):r}getValue(){const{eEditor:e,params:t}=this,o=e.getDate();return!M(o)&&!M(t.value)?t.value:o??null}getStartValue(){const{value:e}=this.params;if(e instanceof Date)return $e(e,this.includeTime??!1)}},pb=class extends Ei{constructor(){super(new gb(()=>this.beans.dataTypeSvc,()=>this.getLocaleTextFunc()))}},fb={tag:"ag-input-date-field",ref:"eEditor",cls:"ag-cell-editor"},Cb=class{constructor(e,t){this.getDataTypeService=e,this.getLocaleTextFunc=t}getTemplate(){return fb}getAgComponents(){return[Dl]}init(e,t){var r,l;this.eEditor=e,this.params=t;const{min:o,max:i,step:s,colDef:n}=t;o!=null&&e.setMin(o),i!=null&&e.setMax(i),s!=null&&e.setStep(s),this.includeTime=t.includeTime??((l=(r=this.getDataTypeService())==null?void 0:r.getDateIncludesTimeFlag)==null?void 0:l.call(r,n.cellDataType)),this.includeTime!=null&&e.setIncludeTime(this.includeTime)}getValidationErrors(){const{eEditor:e,params:t}=this,o=e.getInputElement().value,i=this.formatDate(this.parseDate(o??void 0)),{min:s,max:n,getValidationErrors:r}=t;let l=[];if(i){const a=new Date(i),d=this.getLocaleTextFunc();if(s){const c=new Date(s);if(a<c){const u=c.toLocaleDateString();l.push(d("minDateValidation",`Date must be after ${u}`,[u]))}}if(n){const c=new Date(n);if(a>c){const u=c.toLocaleDateString();l.push(d("maxDateValidation",`Date must be before ${u}`,[u]))}}}return l.length||(l=null),r?r({value:this.getValue(),cellEditorParams:t,internalErrors:l}):l}getValue(){const{params:e,eEditor:t}=this,o=this.formatDate(t.getDate());return!M(o)&&!M(e.value)?e.value:e.parseValue(o??"")}getStartValue(){return $e(this.parseDate(this.params.value??void 0)??null,this.includeTime??!1)}parseDate(e){const t=this.getDataTypeService();return t?t.getDateParserFunction(this.params.column)(e):no(e)??void 0}formatDate(e){const t=this.getDataTypeService();return t?t.getDateFormatterFunction(this.params.column)(e):$e(e??null,this.includeTime??!1)??void 0}},mb=class extends Ei{constructor(){super(new Cb(()=>this.beans.dataTypeSvc,()=>this.getLocaleTextFunc()))}},wb={tag:"div",cls:"ag-large-text",children:[{tag:"ag-input-text-area",ref:"eEditor",cls:"ag-large-text-input"}]},vb=class extends fi{constructor(){super(wb,[cp]),this.eEditor=A}initialiseEditor(e){const{eEditor:t}=this,{cellStartedEdit:o,eventKey:i,value:s,maxLength:n,cols:r,rows:l}=e;this.focusAfterAttached=o,t.getInputElement().setAttribute("title",""),t.setMaxLength(n||200).setCols(r||60).setRows(l||10);let a;o?(this.focusAfterAttached=!0,i===y.BACKSPACE||i===y.DELETE?a="":i&&i.length===1?a=i:(a=s.toString(),i!==y.F2&&(this.highlightAllOnFocus=!0))):(this.focusAfterAttached=!1,a=s.toString()),a!=null&&t.setValue(a,!0),this.addGuiEventListener("keydown",this.onKeyDown.bind(this)),this.activateTabIndex()}onKeyDown(e){const t=e.key;(t===y.LEFT||t===y.UP||t===y.RIGHT||t===y.DOWN||e.shiftKey&&t===y.ENTER)&&e.stopPropagation()}afterGuiAttached(){const{eEditor:e,focusAfterAttached:t,highlightAllOnFocus:o}=this,i=this.getLocaleTextFunc();e.setInputAriaLabel(i("ariaInputEditor","Input Editor")),t&&(e.getFocusableElement().focus(),o&&e.getInputElement().select())}getValue(){const{eEditor:e,params:t}=this,{value:o}=t,i=e.getValue();return!M(i)&&!M(o)?o:t.parseValue(i)}getValidationElement(){return this.eEditor.getInputElement()}getValidationErrors(){const{params:e}=this,{maxLength:t,getValidationErrors:o}=e,i=this.getLocaleTextFunc(),s=this.getValue();let n=[];return typeof s=="string"&&t!=null&&s.length>t&&n.push(i("maxLengthValidation",`Must be ${t} characters or fewer.`,[String(t)])),n.length||(n=null),o?o({value:s,internalErrors:n,cellEditorParams:e}):n}},bb={tag:"ag-input-number-field",ref:"eEditor",cls:"ag-cell-editor"},Sb=class{constructor(e){this.getLocaleTextFunc=e}getTemplate(){return bb}getAgComponents(){return[hp]}init(e,t){this.eEditor=e,this.params=t;const{max:o,min:i,precision:s,step:n}=t;o!=null&&e.setMax(o),i!=null&&e.setMin(i),s!=null&&e.setPrecision(s),n!=null&&e.setStep(n);const r=e.getInputElement();t.preventStepping?e.addManagedElementListeners(r,{keydown:this.preventStepping}):t.showStepperButtons&&r.classList.add("ag-number-field-input-stepper")}getValidationErrors(){const{params:e}=this,{min:t,max:o,getValidationErrors:i}=e,n=this.eEditor.getInputElement().valueAsNumber,r=this.getLocaleTextFunc();let l=[];return typeof n=="number"&&(t!=null&&n<t&&l.push(r("minValueValidation",`Must be greater than or equal to ${t}.`,[String(t)])),o!=null&&n>o&&l.push(r("maxValueValidation",`Must be less than or equal to ${o}.`,[String(o)]))),l.length||(l=null),i?i({value:n,cellEditorParams:e,internalErrors:l}):l}preventStepping(e){(e.key===y.UP||e.key===y.DOWN)&&e.preventDefault()}getValue(){const{eEditor:e,params:t}=this,o=e.getValue();if(!M(o)&&!M(t.value))return t.value;let i=t.parseValue(o);if(i==null)return i;if(typeof i=="string"){if(i==="")return null;i=Number(i)}return isNaN(i)?null:i}getStartValue(){return this.params.value}setCaret(){ht()&&this.eEditor.getInputElement().focus({preventScroll:!0})}},yb=class extends Ei{constructor(){super(new Sb(()=>this.getLocaleTextFunc()))}},Rb={tag:"div",cls:"ag-cell-edit-wrapper",children:[{tag:"ag-select",ref:"eEditor",cls:"ag-cell-editor"}]},Eb=class extends fi{constructor(){super(Rb,[bp]),this.eEditor=A,this.startedByEnter=!1}wireBeans(e){this.valueSvc=e.valueSvc}initialiseEditor(e){this.focusAfterAttached=e.cellStartedEdit;const{eEditor:t,valueSvc:o,gos:i}=this,{values:s,value:n,eventKey:r}=e;if(K(s)){k(58);return}this.startedByEnter=r!=null?r===y.ENTER:!1;let l=!1;s.forEach(u=>{const h={value:u},g=o.formatValue(e.column,null,u),p=g!=null;h.text=p?g:u,t.addOption(h),l=l||n===u}),l?t.setValue(e.value,!0):e.values.length&&t.setValue(e.values[0],!0);const{valueListGap:a,valueListMaxWidth:d,valueListMaxHeight:c}=e;a!=null&&t.setPickerGap(a),c!=null&&t.setPickerMaxHeight(c),d!=null&&t.setPickerMaxWidth(d),i.get("editType")!=="fullRow"&&this.addManagedListeners(this.eEditor,{selectedItem:()=>e.stopEditing()})}afterGuiAttached(){this.focusAfterAttached&&this.eEditor.getFocusableElement().focus(),this.startedByEnter&&setTimeout(()=>{this.isAlive()&&this.eEditor.showPicker()})}focusIn(){this.eEditor.getFocusableElement().focus()}getValue(){return this.eEditor.getValue()}isPopup(){return!1}getValidationElement(){return this.eEditor.getAriaElement()}getValidationErrors(){const{params:e}=this,{values:t,getValidationErrors:o}=e,i=this.getValue();let s=[];if(t&&!t.includes(i)){const n=this.getLocaleTextFunc();s.push(n("invalidSelectionValidation","Invalid selection."))}else s=null;return o?o({value:i,internalErrors:s,cellEditorParams:e}):s}},xb={tag:"ag-input-text-field",ref:"eEditor",cls:"ag-cell-editor"},Db=class{constructor(e){this.getLocaleTextFunc=e}getTemplate(){return xb}getAgComponents(){return[ap]}init(e,t){this.eEditor=e,this.params=t;const o=t.maxLength;o!=null&&e.setMaxLength(o)}getValidationErrors(){const{params:e}=this,{maxLength:t,getValidationErrors:o}=e,i=this.getValue(),s=this.getLocaleTextFunc();let n=[];return t!=null&&typeof i=="string"&&i.length>t&&n.push(s("maxLengthValidation",`Must be ${t} characters or fewer.`,[String(t)])),n.length||(n=null),o?o({value:i,cellEditorParams:e,internalErrors:n}):n}getValue(){const{eEditor:e,params:t}=this,o=e.getValue();return!M(o)&&!M(t.value)?t.value:t.parseValue(o)}getStartValue(){const e=this.params;return e.useFormatter||e.column.getColDef().refData?e.formatValue(e.value):e.value}setCaret(){const e=this.eEditor,t=e.getValue(),o=M(t)&&t.length||0;o&&e.getInputElement().setSelectionRange(o,o)}},Da=class extends Ei{constructor(){super(new Db(()=>this.getLocaleTextFunc()))}};function Fb(e){return e.ctrlsSvc.getScrollFeature().getVScrollPosition()}function Pb(e){return e.ctrlsSvc.getScrollFeature().getHScrollPosition()}function Fa(e,t,o="auto"){e.frameworkOverrides.wrapIncoming(()=>e.ctrlsSvc.getScrollFeature().ensureColumnVisible(t,o),"ensureVisible")}function Pa(e,t,o){e.frameworkOverrides.wrapIncoming(()=>e.ctrlsSvc.getScrollFeature().ensureIndexVisible(t,o),"ensureVisible")}function Tb(e,t,o=null){e.frameworkOverrides.wrapIncoming(()=>e.ctrlsSvc.getScrollFeature().ensureNodeVisible(t,o),"ensureVisible")}function Ib(e){var i;const t=(i=e.editModelSvc)==null?void 0:i.getEditMap(),o=[];return t==null||t.forEach((s,n)=>{const{rowIndex:r,rowPinned:l}=n;s.forEach((a,d)=>{const{editorValue:c,pendingValue:u,sourceValue:h,state:g}=a,p=ze(a);let f=c??u;f===pe&&(f=void 0);const C={newValue:f,oldValue:h,state:g,column:d,colId:d.getColId(),colKey:d.getColId(),rowIndex:r,rowPinned:l};(g==="editing"||g==="changed"&&p)&&o.push(C)})}),o}function Ab(e,t=!1){var i;const{editSvc:o}=e;o!=null&&o.isBatchEditing()?(t?(i=e.editModelSvc)==null||i.getEditPositions().forEach(s=>{s.state==="editing"&&o.revertSingleCellEdit(s)}):st(e,!0),Dt(e)):o==null||o.stopEditing(void 0,{cancel:t,source:"api"})}function Mb(e,t){var i;const o=q(e,t);return((i=e.editSvc)==null?void 0:i.isEditing(o))??!1}function kb(e,t){const{key:o,colKey:i,rowIndex:s,rowPinned:n}=t,{editSvc:r,colModel:l}=e,a=l.getCol(i);if(!a){k(12,{colKey:i});return}const c=it(e,{rowIndex:s,rowPinned:n||null});if(!c){k(290,{rowIndex:s,rowPinned:n});return}if(!a.isCellEditable(c))return;n==null&&Pa(e,s),Fa(e,i),r==null||r.startEditing({rowNode:c,column:a},{event:o?new KeyboardEvent("keydown",{key:o}):void 0,source:"api"})}function Lb(e){var t;return((t=e.editSvc)==null?void 0:t.validateEdit())||null}var Gb={tag:"div",cls:"ag-popup-editor",attrs:{tabindex:"-1"}},Hb=class extends ks{constructor(e){super(Gb),this.params=e}postConstruct(){Xe(this.gos,this.getGui(),"popupEditorWrapper",!0),this.addKeyDownListener()}addKeyDownListener(){const e=this.getGui(),t=this.params,o=i=>{xs(this.gos,i,t.node,t.column,!0)||t.onKeyDown(i)};this.addManagedElementListeners(e,{keydown:o})}},xi=(e,t=!1)=>{if(e!==void 0)return ze(e)||t&&e.state==="editing"};function Ta(e,t,o=!1){var i;return xi((i=e.editModelSvc)==null?void 0:i.getEdit(t),o)}function Ia(e,t){const{editModelSvc:o}=e,{column:i,rowNode:s}=t;if(e.gos.get("groupTotalRow")&&!(s!=null&&s.footer))return!1;for(const n of(s==null?void 0:s.allLeafChildren)??[])if(xi(o==null?void 0:o.getEdit({rowNode:n,column:i}))||xi(o==null?void 0:o.getEdit({rowNode:n.pinnedSibling,column:i})))return!0}function Aa(e,{rowNode:t,column:o}){var i;if(t=t.pinnedSibling,!!t)return xi((i=e.editModelSvc)==null?void 0:i.getEdit({rowNode:t,column:o}))}var Ob=class extends x{constructor(e,t){super(),this.cellCtrl=e,this.beans=t,this.editSvc=t.editSvc,this.editModelSvc=t.editModelSvc}setComp(e){this.cellComp=e,this.applyCellStyles()}applyCellStyles(){var s;const{cellCtrl:e,editSvc:t,beans:o}=this;if(t!=null&&t.isBatchEditing()&&t.isEditing()){const n=Ta(o,e)||Ia(o,e)||Aa(o,e);this.applyBatchingStyle(n)}else this.applyBatchingStyle(!1);const i=!!((s=this.editModelSvc)!=null&&s.getCellValidationModel().hasCellValidation(this.cellCtrl));this.cellComp.toggleCss("ag-cell-editing-error",i)}applyBatchingStyle(e){var t;this.cellComp.toggleCss("ag-cell-editing",e??!1),this.cellComp.toggleCss("ag-cell-batch-edit",(e&&((t=this.editSvc)==null?void 0:t.isBatchEditing()))??!1)}},Bb=class extends x{constructor(e,t){super(),this.rowCtrl=e,this.beans=t,this.gos=t.gos,this.editSvc=t.editSvc,this.editModelSvc=t.editModelSvc}applyRowStyles(){var r;const{rowCtrl:e,editModelSvc:t,beans:o}=this;let i=e.rowNode,s=t==null?void 0:t.getEditRow(i);const n=(r=this.editModelSvc)==null?void 0:r.getRowValidationModel().hasRowValidation({rowNode:i});if(!s&&i.pinnedSibling&&(i=i.pinnedSibling,s=t==null?void 0:t.getEditRow(i)),s){const l=Array.from(s.keys()).some(a=>{const d={rowNode:i,column:a};return Ta(o,d,!0)||Ia(o,d)||Aa(o,d)});this.applyStyle(n,l);return}this.applyStyle(n)}applyStyle(e=!1,t=!1){var s,n;const o=((s=this.editSvc)==null?void 0:s.isBatchEditing())??!1,i=this.gos.get("editType")==="fullRow";(n=this.rowCtrl)==null||n.forEachGui(void 0,({rowComp:r})=>{r.toggleCss("ag-row-editing",i&&t),r.toggleCss("ag-row-batch-edit",i&&t&&o),r.toggleCss("ag-row-inline-editing",t),r.toggleCss("ag-row-not-inline-editing",!t),r.toggleCss("ag-row-editing-invalid",i&&t&&e)})}},Vb=({rowModel:e,pinnedRowModel:t,editModelSvc:o},i)=>{const s=new Set;return e.forEachNode(n=>i.has(n)&&s.add(n)),t==null||t.forEachPinnedRow("top",n=>i.has(n)&&s.add(n)),t==null||t.forEachPinnedRow("bottom",n=>i.has(n)&&s.add(n)),i.forEach(n=>{s.has(n)||o.removeEdits({rowNode:n})}),s},Nb=({editModelSvc:e},t,o)=>{t.forEach(i=>{var s;return(s=e==null?void 0:e.getEditRow(i))==null?void 0:s.forEach((n,r)=>!o.has(r)&&e.removeEdits({rowNode:i,column:r}))})},_b=e=>()=>{const t=new Set(e.colModel.getCols()),o=e.editModelSvc.getEditMap(!0),i=new Set(o.keys());Nb(e,Vb(e,i),t)},Wb=new Set(["undo","redo"]),Ma={paste:"ui",rangeSvc:"ui",fillHandle:"api",cellClear:"api"},zb=new Set(Object.keys(Ma)),$b=new Set(["paste","rangeSvc","renderer","cellClear","redo","undo"]),Di={cancel:!0,source:"api"},Ub={cancel:!1,source:"api"},Ht={checkSiblings:!0},Co={force:!0,suppressFlash:!0},Kb=class extends x{constructor(){super(...arguments),this.beanName="editSvc",this.batch=!1}postConstruct(){const{beans:e}=this;this.model=e.editModelSvc,this.valueSvc=e.valueSvc,this.rangeSvc=e.rangeSvc,this.addManagedPropertyListener("editType",({currentValue:i})=>{this.stopEditing(void 0,Di),this.createStrategy(i)});const t=_b(e),o=()=>{const i=this.model.getCellValidationModel().getCellValidationMap().size>0,s=this.model.getRowValidationModel().getRowValidationMap().size>0;return i||s?this.stopEditing(void 0,Di):this.isEditing()&&(this.isBatchEditing()?Dt(e,this.model.getEditPositions()):this.stopEditing(void 0,Ub)),!1};this.addManagedEventListeners({columnPinned:t,columnVisible:t,columnRowGroupChanged:t,rowGroupOpened:t,pinnedRowsChanged:t,displayedRowsChanged:t,sortChanged:o,filterChanged:o,cellFocused:this.onCellFocused.bind(this)})}isBatchEditing(){return this.batch}setBatchEditing(e){e?(this.batch=!0,this.stopEditing(void 0,Di)):(this.stopEditing(void 0,Di),this.batch=!1)}createStrategy(e){const{beans:t,gos:o,strategy:i}=this,s=e??o.get("editType")??"singleCell";if(i){if(i.beanName===s)return i;this.destroyStrategy()}return this.strategy=this.createOptionalManagedBean(t.registry.createDynamicBean(s,!0))}destroyStrategy(){this.strategy&&(this.strategy.destroy(),this.strategy=this.destroyBean(this.strategy))}shouldStartEditing(e,t,o,i="ui"){var s;return this.strategy??(this.strategy=this.createStrategy()),((s=this.strategy)==null?void 0:s.shouldStart(e,t,o,i))??null}shouldStopEditing(e,t,o="ui"){var i;return((i=this.strategy)==null?void 0:i.shouldStop(e,t,o))??null}shouldCancelEditing(e,t,o="ui"){var i;return((i=this.strategy)==null?void 0:i.shouldCancel(e,t,o))??null}validateEdit(){return dh(this.beans)}isEditing(e,t){return this.model.hasEdits(e,t??Ht)}isRowEditing(e,t){return(e&&this.model.hasRowEdits(e,t))??!1}startEditing(e,t){var a;const{startedEdit:o=!0,event:i=null,source:s="ui",ignoreEventKey:n=!1}=t;if(this.strategy??(this.strategy=this.createStrategy()),!this.isCellEditable(e,"api"))return;const r=q(this.beans,e);if(r&&!r.comp){r.onCompAttachedFuncs.push(()=>this.startEditing(e,t));return}const l=(a=this.shouldStartEditing)==null?void 0:a.call(this,e,i,o,s);if(l===!1&&s!=="api"){this.isEditing(e)&&this.stopEditing();return}!this.batch&&this.shouldStopEditing(e,void 0,s)&&this.stopEditing(void 0,{source:s}),l&&this.isBatchEditing()&&this.dispatchBatchEvent("batchEditingStarted",new Map),this.strategy.start(e,i,s,n)}stopEditing(e,t){var p,f,C;const{event:o,cancel:i,source:s="ui",suppressNavigateAfterEdit:n}=t||{},{beans:r,model:l}=this;if(zb.has(s))return this.isBatchEditing()?(this.bulkRefresh(e),!1):this.stopEditing(e,{...t,source:Ma[s]});if(!(this.isEditing(e)||this.isBatchEditing()&&l.hasEdits(e,Ht))||!this.strategy)return!1;const d=q(r,e);d&&(d.onEditorAttachedFuncs=[]);let c=l.getEditMap(!0),u=!1;const h=!i&&!!this.shouldStopEditing(e,o,s),g=i&&!!this.shouldCancelEditing(e,o,s);if(h||g){st(r,!0);const m=l.getEditMap();this.processEdits(m,i),(p=this.strategy)==null||p.stop(i,o),this.bulkRefresh(void 0,c),c=m,u||(u=h)}else if(o instanceof KeyboardEvent&&this.batch&&((f=this.strategy)!=null&&f.midBatchInputsAllowed(e))&&this.isEditing(e,{withOpenEditor:!0})){const m=o.key,w=m===y.ENTER,b=m===y.ESCAPE,v=m===y.TAB;(w||v||b)&&(w||v?st(r,!0):b&&this.revertSingleCellEdit(d),this.isBatchEditing()?(C=this.strategy)==null||C.cleanupEditors():Dt(r,l.getEditPositions(),{event:o}),o.preventDefault(),this.bulkRefresh(e,c,{suppressFlash:!0}),c=l.getEditMap())}else st(r,!0),c=l.getEditMap();return u&&e&&this.model.removeEdits(e),!n&&d&&this.navigateAfterEdit(o instanceof KeyboardEvent&&o.shiftKey,d.cellPosition),ps(r),this.model.hasEdits()||(this.model.getCellValidationModel().clearCellValidationMap(),this.model.getRowValidationModel().clearRowValidationMap()),this.bulkRefresh(),g&&this.beans.rowRenderer.refreshRows({rowNodes:Array.from(c.keys())}),this.isBatchEditing()&&(this.beans.rowRenderer.refreshRows({suppressFlash:!0,force:!0}),u&&h&&this.dispatchBatchEvent("batchEditingStopped",c)),u}navigateAfterEdit(e,t){var i;if(this.gos.get("enterNavigatesVerticallyAfterEdit")){const s=e?y.UP:y.DOWN;(i=this.beans.navigation)==null||i.navigateToNextCell(null,s,t,!1)}}processEdits(e,t=!1){var r,l,a;const o=Array.from(e.keys()),{beans:i}=this,s=this.model.getCellValidationModel().getCellValidationMap().size>0||this.model.getRowValidationModel().getRowValidationMap().size>0,n=[];for(const d of o){const c=e.get(d);for(const u of c.keys()){const h=c.get(u),g={rowNode:d,column:u},p=q(i,g),f=ze(h),C=(a=(l=(r=p==null?void 0:p.comp)==null?void 0:r.getCellEditor())==null?void 0:l.isCancelAfterEnd)==null?void 0:a.call(l);!t&&!C&&f&&!s&&(this.setNodeDataValue(d,u,h.pendingValue)||n.push(g)),p==null||p.refreshCell(Co)}}n.forEach(d=>{this.model.clearEditValue(d)})}setNodeDataValue(e,t,o,i){const{beans:s}=this,n=q(s,{rowNode:e,column:t});n&&(n.suppressRefreshCell=!0);const r=e.setDataValue(t,o,"commit");return n&&(n.suppressRefreshCell=!1),i&&(n==null||n.refreshCell(Co)),r}setEditMap(e,t){var o;this.strategy??(this.strategy=this.createStrategy()),(o=this.strategy)==null||o.setEditMap(e,t),this.bulkRefresh(),this.beans.rowRenderer.refreshCells(Co)}dispatchEditValuesChanged({rowNode:e,column:t},o={}){if(!e||!t||!o)return;const{pendingValue:i,sourceValue:s}=o,{rowIndex:n,rowPinned:r,data:l}=e;this.beans.eventSvc.dispatchEvent({type:"cellEditValuesChanged",node:e,rowIndex:n,rowPinned:r,column:t,source:"api",data:l,newValue:i,oldValue:s,value:i,colDef:t.getColDef()})}bulkRefresh(e={},t,o={}){var l;const{beans:i,gos:s}=this,{editModelSvc:n,rowModel:r}=i;oe(s)&&(e.rowNode&&e.column?this.refCell(e,this.model.getEdit(e),o):t&&((l=n==null?void 0:n.getEditMap(!1))==null||l.forEach((a,d)=>{for(const c of a.keys())this.refCell({rowNode:d,column:c},a.get(c),o)})))}refCell({rowNode:e,column:t},o,i={}){var u;const{beans:s,gos:n}=this,r=new Set([e]),l=new Set,a=e.pinnedSibling;a&&r.add(a);const d=e.sibling;d&&l.add(d);let c=e.parent;for(;c;)(u=c.sibling)!=null&&u.footer&&n.get("groupTotalRow")||!c.parent&&c.sibling&&n.get("grandTotalRow")?l.add(c.sibling):l.add(c),c=c.parent;r.forEach(h=>this.dispatchEditValuesChanged({rowNode:h,column:t},o)),r.forEach(h=>{var g;return(g=q(s,{rowNode:h,column:t}))==null?void 0:g.refreshCell(i)}),l.forEach(h=>{var g;return(g=q(s,{rowNode:h,column:t}))==null?void 0:g.refreshCell(i)})}stopAllEditing(e=!1,t="ui"){this.isEditing()&&this.stopEditing(void 0,{cancel:e,source:t})}isCellEditable(e,t="ui"){var i;const{rowNode:o}=e;if(o.group){if(this.gos.get("treeData")){if(!o.data&&!this.gos.get("enableGroupEdit"))return!1}else if(!this.gos.get("enableGroupEdit"))return!1}return this.strategy??(this.strategy=this.createStrategy()),((i=this.strategy)==null?void 0:i.isCellEditable(e,t))??!1}cellEditingInvalidCommitBlocks(){return this.gos.get("invalidEditValueMode")==="block"}checkNavWithValidation(e,t,o=!0){var i,s,n,r;if(this.hasValidationErrors(e)){const l=q(this.beans,e);return this.cellEditingInvalidCommitBlocks()?((i=t==null?void 0:t.preventDefault)==null||i.call(t),o&&(!(l!=null&&l.hasBrowserFocus())&&(l==null||l.focusCell()),(r=(n=(s=l==null?void 0:l.comp)==null?void 0:s.getCellEditor())==null?void 0:n.focusIn)==null||r.call(n)),"block-stop"):(l&&this.revertSingleCellEdit(l),"revert-continue")}return"continue"}revertSingleCellEdit(e,t=!1){var i,s,n,r,l;const o=q(this.beans,e);(i=o==null?void 0:o.comp)!=null&&i.getCellEditor()&&(Dt(this.beans,[e],{silent:!0}),this.model.clearEditValue(e),xt(this.beans,e,{silent:!0}),nt(this.beans),o==null||o.refreshCell(Co),(s=o.rowCtrl.rowEditStyleFeature)==null||s.applyRowStyles(),t&&(o==null||o.focusCell(),(l=(r=(n=o==null?void 0:o.comp)==null?void 0:n.getCellEditor())==null?void 0:r.focusIn)==null||l.call(r)))}hasValidationErrors(e){var i;nt(this.beans);const t=q(this.beans,e);t&&(t.refreshCell(Co),(i=t.rowCtrl.rowEditStyleFeature)==null||i.applyRowStyles());let o=!1;return e!=null&&e.rowNode?(o||(o=this.model.getRowValidationModel().hasRowValidation({rowNode:e.rowNode})),e.column&&(o||(o=this.model.getCellValidationModel().hasCellValidation({rowNode:e.rowNode,column:e.column})))):(o||(o=this.model.getCellValidationModel().getCellValidationMap().size>0),o||(o=this.model.getRowValidationModel().getRowValidationMap().size>0)),o}moveToNextCell(e,t,o,i="ui"){var l;let s;const n=this.isEditing(),r=n&&this.checkNavWithValidation(void 0,o)==="block-stop";return e instanceof Pt&&n&&(s=(l=this.strategy)==null?void 0:l.moveToNextEditingCell(e,t,o,i,r)),s===null||(s=s||!!this.beans.focusSvc.focusedHeader,s===!1&&!r&&this.stopEditing()),s}getCellDataValue({rowNode:e,column:t},o=!0){if(!e||!t)return;let i=this.model.getEdit({rowNode:e,column:t});const s=e.pinnedSibling;if(s){const r=this.model.getEdit({rowNode:s,column:t});r&&(i=r)}const n=o?(i==null?void 0:i.editorValue)??(i==null?void 0:i.pendingValue):i==null?void 0:i.pendingValue;return n===pe||!i?this.valueSvc.getValue(t,e,!0,"api"):n}getRowDataValue(e,t){return this.model.getEditRowDataValue(e,t)}addStopEditingWhenGridLosesFocus(e){ih(this,this.beans,e)}createPopupEditorWrapper(e){return new Hb(e)}setDataValue(e,t,o){var r;if((!this.isEditing()||o==="commit")&&!$b.has(o))return;const{beans:i}=this;this.strategy??(this.strategy=this.createStrategy());const s=this.isBatchEditing()?"ui":"api";if(!o||Wb.has(o))return Qo(i,e,!0,t),this.setNodeDataValue(e.rowNode,e.column,t,!0);const n=this.model.getEdit(e);if(n){if(n.pendingValue===t)return!1;if(n.sourceValue!==t)return Qo(i,e,!0,t),this.stopEditing(e,{source:s,suppressNavigateAfterEdit:!0}),!0;if(n.sourceValue===t)return(r=i.editModelSvc)==null||r.removeEdits(e),this.dispatchEditValuesChanged(e,{...n,pendingValue:t}),!0}return Qo(i,e,!0,t),this.stopEditing(e,{source:s,suppressNavigateAfterEdit:!0}),!0}handleColDefChanged(e){rh(this.beans,e)}destroy(){this.model.clear(),this.destroyStrategy(),super.destroy()}prepDetailsDuringBatch(e,t){if(!this.batch||!this.model.hasRowEdits(e.rowNode,Ht))return;const{rowNode:i,column:s}=e,{compDetails:n,valueToDisplay:r}=t;if(n){const{params:a}=n;return a.data=this.model.getEditRowDataValue(i,Ht),{compDetails:n}}const l=this.model.getEditRow(e.rowNode,Ht);if(r!==void 0&&(l!=null&&l.has(s)))return{valueToDisplay:this.valueSvc.getValue(s,i)}}cleanupEditors(){var e;(e=this.strategy)==null||e.cleanupEditors()}dispatchCellEvent(e,t,o,i){var s;(s=this.strategy)==null||s.dispatchCellEvent(e,t,o,i)}dispatchRowEvent(e,t){var o;(o=this.strategy)==null||o.dispatchRowEvent(e,t)}dispatchBatchEvent(e,t){this.eventSvc.dispatchEvent(this.createBatchEditEvent(e,t))}createBatchEditEvent(e,t){return _(this.gos,{type:e,...e==="batchEditingStopped"?{changes:this.toEventChangeList(t)}:{}})}toEventChangeList(e){return this.model.getEditPositions(e).map(t=>({rowIndex:t.rowNode.rowIndex,rowPinned:t.rowNode.rowPinned,columnId:t.column.getColId(),newValue:t.pendingValue,oldValue:t.sourceValue}))}applyBulkEdit({rowNode:e,column:t},o){var d,c;if(!o||o.length===0)return;const{beans:i,rangeSvc:s,valueSvc:n}=this;st(i,!0);const r=this.model.getEditMap(!0),l=(c=(d=r.get(e))==null?void 0:d.get(t))==null?void 0:c.pendingValue;this.batch||this.eventSvc.dispatchEvent({type:"bulkEditingStarted"}),o.forEach(u=>{if(s==null||s.forEachRowInRange(u,h=>{const g=it(i,h);if(g===void 0)return;const p=r.get(g)??new Map;for(const f of u.columns)if(f&&this.isCellEditable({rowNode:g,column:f},"api")){const C=n.getValue(f,g,!0,"api");let m=n.parseValue(f,g??null,l,C);Number.isNaN(m)&&(m=null),p.set(f,{editorValue:void 0,pendingValue:m,sourceValue:C,state:"changed"})}p.size>0&&r.set(g,p)}),this.setEditMap(r),this.batch){this.cleanupEditors(),ps(i),this.bulkRefresh();return}this.stopEditing(void 0,{source:"api"}),this.eventSvc.dispatchEvent({type:"bulkEditingStopped",changes:this.toEventChangeList(r)})}),this.bulkRefresh();const a=q(i,{rowNode:e,column:t});a&&a.focusCell(!0)}createCellStyleFeature(e,t){return new Ob(e,t)}createRowStyleFeature(e,t){return new Bb(e,t)}setEditingCells(e,t){const{beans:o}=this,{colModel:i,valueSvc:s}=o,n=new Map;e.forEach(({colId:r,column:l,colKey:a,rowIndex:d,rowPinned:c,newValue:u,state:h})=>{const g=r?i.getCol(r):a?i.getCol(a):l;if(!g)return;const p=it(o,{rowIndex:d,rowPinned:c});if(!p)return;const f=s.getValue(g,p,!0,"api");if(!ze({pendingValue:u,sourceValue:f})&&h!=="editing")return;let C=n.get(p);C||(C=new Map,n.set(p,C)),u===void 0&&(u=pe),C.set(g,{editorValue:void 0,pendingValue:u,sourceValue:f,state:h??"changed"})}),this.setEditMap(n,t)}onCellFocused(e){var n;const t=q(this.beans,e);if(!t||!this.isEditing(t,Ht))return;const o=this.model.getEdit(t);if(!o||!ze(o))return;const s=this.getLocaleTextFunc()("ariaPendingChange","Pending Change");(n=this.beans.ariaAnnounce)==null||n.announceValue(s,"pendingChange")}allowedFocusTargetOnValidation(e){return q(this.beans,e)}},ka=class extends x{postConstruct(){var e,t;this.model=this.beans.editModelSvc,this.editSvc=this.beans.editSvc,this.addManagedEventListeners({cellFocused:(e=this.onCellFocusChanged)==null?void 0:e.bind(this),cellFocusCleared:(t=this.onCellFocusChanged)==null?void 0:t.bind(this)})}clearEdits(e){this.model.clearEditValue(e)}onCellFocusChanged(e){let t;const o=e.previousParams,{editSvc:i,beans:s}=this,n=e.type==="cellFocused"?e.sourceEvent:null;o&&(t=q(s,o));const{gos:r,editModelSvc:l}=s,a=e.type==="cellFocusCleared";if(i.isEditing(void 0,{withOpenEditor:!0})){const{column:d,rowIndex:c,rowPinned:u}=e,h={column:d,rowNode:it(s,{rowIndex:c,rowPinned:u})},g=r.get("invalidEditValueMode")==="block";if(g)return;const p=!g,f=!!(l!=null&&l.getCellValidationModel().hasCellValidation(h)),C=p&&f;(o||a?i.stopEditing(void 0,{cancel:C,source:a&&p?"api":void 0,event:n}):!0)||(i.isBatchEditing()?i.cleanupEditors():i.stopEditing(void 0,{source:"api"}))}t==null||t.refreshCell({suppressFlash:!0,force:!0})}isCellEditable({rowNode:e,column:t},o="ui"){return t.isColumnFunc(e,t.getColDef().editable)}stop(e,t){const o=this.model.getEditPositions(),i={all:[],pass:[],fail:[]};if(o.forEach(n=>{var l;i.all.push(n);const r=this.model.getCellValidationModel().getCellValidation(n);if((((l=r==null?void 0:r.errorMessages)==null?void 0:l.length)??0)>0){i.fail.push(n);return}i.pass.push(n)}),e)return o.forEach(n=>{Xo(this.beans,n),this.model.stop(n)}),!0;const s=this.processValidationResults(i);return s.destroy.length>0&&s.destroy.forEach(n=>{Xo(this.beans,n,{event:t}),this.model.stop(n)}),s.keep.length>0&&s.keep.forEach(n=>{var l;const r=q(this.beans,n);(l=this.editSvc)!=null&&l.cellEditingInvalidCommitBlocks()||r&&this.editSvc.revertSingleCellEdit(r)}),!0}cleanupEditors({rowNode:e}={},t){st(this.beans,!1);const o=this.model.getEditPositions(),i=[];e?o.forEach(s=>{!e||s.rowNode===e||i.push(s)}):o.forEach(s=>{i.push(s)}),Dt(this.beans,i),ps(this.beans,t)}setFocusOutOnEditor(e){var t,o,i;(i=(o=(t=e.comp)==null?void 0:t.getCellEditor())==null?void 0:o.focusOut)==null||i.call(o)}setFocusInOnEditor(e){const t=e.comp,o=t==null?void 0:t.getCellEditor();if(o!=null&&o.focusIn)o.focusIn();else{const i=this.beans.gos.get("editType")==="fullRow";e.focusCell(i),e.onEditorAttachedFuncs.push(()=>{var s,n;return(n=(s=t==null?void 0:t.getCellEditor())==null?void 0:s.focusIn)==null?void 0:n.call(s)})}}setupEditors(e=this.model.getEditPositions(),t,o,i,s=!1){const n=i instanceof KeyboardEvent&&!s&&i.key||void 0;nh(this.beans,e,t,n,i,o)}dispatchCellEvent(e,t,o,i){const s=q(this.beans,e);s&&this.eventSvc.dispatchEvent({...s.createEvent(t??null,o),...i})}dispatchRowEvent(e,t){const o=hs(this.beans,e);o&&this.eventSvc.dispatchEvent(o.createRowEvent(t))}shouldStart({column:e},t,o,i="ui"){var a;if(t instanceof KeyboardEvent&&(t.key===y.TAB||t.key===y.ENTER||t.key===y.F2||t.key===y.BACKSPACE&&o))return!0;if((t==null?void 0:t.shiftKey)&&((a=this.beans.rangeSvc)==null?void 0:a.getCellRanges().length)!=0)return!1;const n=e==null?void 0:e.getColDef(),r=this.deriveClickCount(n),l=t==null?void 0:t.type;return l==="click"&&(t==null?void 0:t.detail)===1&&r===1||l==="dblclick"&&(t==null?void 0:t.detail)===2&&r===2?!0:i==="api"?o??!1:!1}shouldStop(e,t,o="ui"){const i=this.editSvc.isBatchEditing();return i&&o==="api"?!0:i&&o==="ui"?!1:o==="api"?!0:t instanceof KeyboardEvent&&!i?t.key===y.ENTER:null}shouldCancel(e,t,o="ui"){const i=this.editSvc.isBatchEditing();return!!(t instanceof KeyboardEvent&&!i&&t.key===y.ESCAPE||i&&o==="api"||o==="api")}setEditMap(e,t){var i;t!=null&&t.update||this.editSvc.stopEditing(void 0,{cancel:!0,source:"api"});const o=[];if(e.forEach((s,n)=>{s.forEach((r,l)=>{r.state==="editing"&&o.push({...r,rowNode:n,column:l})})}),t!=null&&t.update&&(e=new Map([...this.model.getEditMap(),...e])),(i=this.model)==null||i.setEditMap(e),o.length>0){const s=o.at(-1),n=s.pendingValue===pe?void 0:s.pendingValue;this.start(s,new KeyboardEvent("keydown",{key:n}),"api");const r=q(this.beans,s);r&&this.setFocusInOnEditor(r)}}deriveClickCount(e){const{gos:t}=this.beans;return t.get("suppressClickEdit")===!0?0:t.get("singleClickEdit")===!0||e!=null&&e.singleClickEdit?1:2}destroy(){this.cleanupEditors(),super.destroy()}},jb=class extends ka{constructor(){super(...arguments),this.beanName="fullRow",this.startedRows=[]}isCellEditable(e,t="ui"){const o=super.isCellEditable(e,t);return o===!0||t==="ui"?o:this.beans.colModel.getCols().some(s=>super.isCellEditable({rowNode:e.rowNode,column:s},t))}shouldStop(e,t,o="ui"){const{rowNode:i}=e||{};if(!hs(this.beans,{rowNode:this.rowNode}))return!0;const n=super.shouldStop({rowNode:this.rowNode},t,o);return n!==null?n:this.rowNode?i!==this.rowNode:!1}midBatchInputsAllowed({rowNode:e}){return e?this.model.hasEdits({rowNode:e}):!1}clearEdits(e){this.model.clearEditValue(e)}start(e,t,o="ui",i){const{rowNode:s}=e;this.rowNode!==s&&super.cleanupEditors(e),this.dispatchRowEvent({rowNode:s},"rowEditingStarted"),this.startedRows.push(s);const n=this.beans.visibleCols.allCols,r=[];n.forEach(l=>{if(!l.isCellEditable(s))return;const a={rowNode:s,column:l};r.push(a),this.model.hasEdits(a)||this.model.start(a)}),this.rowNode=s,this.setupEditors(r,e,!0,t,i)}processValidationResults(e){return e.fail.length>0&&this.editSvc.cellEditingInvalidCommitBlocks()?{destroy:[],keep:e.all}:{destroy:e.all,keep:[]}}stop(e,t){var s;const{rowNode:o}=this;if(o&&!this.model.hasRowEdits(o))return!1;const i=[];return e||this.model.getEditMap().forEach((n,r)=>{if(!(!n||n.size===0)){for(const l of n.values())if(ze(l)){i.push(r);break}}}),nt(this.beans),!e&&((s=this.editSvc)==null?void 0:s.checkNavWithValidation({rowNode:o}))==="block-stop"?!1:(super.stop(e,t),i.forEach(n=>this.dispatchRowEvent({rowNode:n},"rowValueChanged")),this.cleanupEditors({rowNode:o},!0),this.rowNode=void 0,!0)}onCellFocusChanged(e){const{rowIndex:t}=e,o=e.previousParams;if((o==null?void 0:o.rowIndex)===t||e.sourceEvent instanceof KeyboardEvent)return;const i=q(this.beans,o);this.gos.get("invalidEditValueMode")==="block"&&i&&(this.model.getCellValidationModel().getCellValidation(i)||this.model.getRowValidationModel().getRowValidation(i))||super.onCellFocusChanged(e)}cleanupEditors(e={},t){super.cleanupEditors(e,t),this.startedRows.forEach(o=>this.dispatchRowEvent({rowNode:o},"rowEditingStopped")),this.startedRows.length=0}moveToNextEditingCell(e,t,o,i="ui",s=!1){var h,g,p;const n=e.cellPosition;let r;this.model.suspend(!0);try{r=(h=this.beans.navigation)==null?void 0:h.findNextCellToFocusOn(n,{backwards:t,startEditing:!0,skipToNextEditableCell:!1})}finally{this.model.suspend(!1)}if(r===!1)return null;if(r==null)return!1;const l=r.cellPosition,a=e.isCellEditable(),d=r.isCellEditable(),c=l&&n.rowIndex===l.rowIndex&&n.rowPinned===l.rowPinned;a&&this.setFocusOutOnEditor(e),this.restoreEditors();const u=this.gos.get("suppressStartEditOnTab");return d&&!s?u?r.focusCell(!0,o):((g=r.comp)!=null&&g.getCellEditor()||xt(this.beans,r,{event:o,cellStartedEdit:!0}),this.setFocusInOnEditor(r),r.focusCell(!1,o)):(d&&s&&this.setFocusInOnEditor(r),r.focusCell(!0,o)),!c&&!s&&(this.cleanupEditors(r,!0),u?r.focusCell(!0,o):this.editSvc.startEditing(r,{startedEdit:!0,event:o,source:i,ignoreEventKey:!0})),(p=e.rowCtrl)==null||p.refreshRow({suppressFlash:!0,force:!0}),!0}restoreEditors(){this.model.getEditMap().forEach((e,t)=>e.forEach(({state:o},i)=>{var n;if(o!=="editing")return;const s=q(this.beans,{rowNode:t,column:i});s&&!((n=s.comp)!=null&&n.getCellEditor())&&xt(this.beans,s,{silent:!0})}))}destroy(){super.destroy(),this.rowNode=void 0,this.startedRows.length=0}},qb=class extends ka{constructor(){super(...arguments),this.beanName="singleCell"}shouldStop(e,t,o="ui"){const i=super.shouldStop(e,t,o);if(i!==null)return i;const{rowNode:s,column:n}=e||{};return(!this.rowNode||!this.column)&&s&&n?null:this.rowNode!==s||this.column!==n}midBatchInputsAllowed(e){return this.model.hasEdits(e)}start(e,t,o="ui",i){(this.rowNode!==e.rowNode||this.column!==e.column)&&super.cleanupEditors(),this.rowNode=e.rowNode,this.column=e.column,this.model.start(e),this.setupEditors([e],e,!0,t,i)}dispatchRowEvent(e,t){}processValidationResults(e){return e.fail.length>0&&this.editSvc.cellEditingInvalidCommitBlocks()?{destroy:[],keep:e.all}:{destroy:e.all,keep:[]}}stop(e,t){return super.stop(e,t),this.rowNode=void 0,this.column=void 0,!0}onCellFocusChanged(e){const{colModel:t,editSvc:o}=this.beans,{rowIndex:i,column:s,rowPinned:n}=e,r=it(this.beans,{rowIndex:i,rowPinned:n}),l=gs(s),a=t.getCol(l),d=e.previousParams;if(d){const c=gs(d.column);if((d==null?void 0:d.rowIndex)===i&&c===l&&(d==null?void 0:d.rowPinned)===n)return}o!=null&&o.isEditing({rowNode:r,column:a},{withOpenEditor:!0})&&e.type==="cellFocused"||super.onCellFocusChanged(e)}moveToNextEditingCell(e,t,o,i="ui",s=!1){var g,p,f,C,m;const n=e.cellPosition;let r;const l=this.beans.gos.get("editType")==="fullRow";l&&this.model.suspend(!0),s||(e.eGui.focus(),(p=this.editSvc)==null||p.stopEditing(e,{source:(g=this.editSvc)!=null&&g.isBatchEditing()?"ui":"api",event:o}));try{r=(f=this.beans.navigation)==null?void 0:f.findNextCellToFocusOn(n,{backwards:t,startEditing:!0})}finally{l&&this.model.suspend(!1)}if(r===!1)return null;if(r==null)return!1;const a=r.cellPosition,d=e.isCellEditable(),c=r.isCellEditable(),u=a&&n.rowIndex===a.rowIndex&&n.rowPinned===a.rowPinned;d&&!s&&this.setFocusOutOnEditor(e);const h=this.gos.get("suppressStartEditOnTab");return!u&&!s&&(super.cleanupEditors(r,!0),h?r.focusCell(!0,o):this.editSvc.startEditing(r,{startedEdit:!0,event:o,source:i,ignoreEventKey:!0})),c&&!s?(r.focusCell(!1,o),h?r.focusCell(!0,o):(C=r.comp)!=null&&C.getCellEditor()||(xt(this.beans,r,{event:o,cellStartedEdit:!0}),this.setFocusInOnEditor(r))):(c&&s&&this.setFocusInOnEditor(r),r.focusCell(!0,o)),(m=e.rowCtrl)==null||m.refreshRow({suppressFlash:!0,force:!0}),!0}destroy(){super.destroy(),this.rowNode=void 0,this.column=void 0}},dt={moduleName:"EditCore",version:G,beans:[Yu,Kb],apiFunctions:{getEditingCells:Ib,getCellEditorInstances:sh,startEditingCell:kb,stopEditing:Ab,isEditing:Mb,validateEdit:Lb},dynamicBeans:{singleCell:qb,fullRow:jb},dependsOn:[Ea,xa],css:[db]},Yb={moduleName:"TextEditor",version:G,userComponents:{agCellEditor:Da,agTextCellEditor:Da},dependsOn:[dt]},Zb={moduleName:"NumberEditor",version:G,userComponents:{agNumberCellEditor:{classImp:yb}},dependsOn:[dt]},Qb={moduleName:"DateEditor",version:G,userComponents:{agDateCellEditor:pb,agDateStringCellEditor:mb},dependsOn:[dt]},Xb={moduleName:"CheckboxEditor",version:G,userComponents:{agCheckboxCellEditor:ub},dependsOn:[dt]},Jb={moduleName:"SelectEditor",version:G,userComponents:{agSelectCellEditor:Eb},dependsOn:[dt]},eS={moduleName:"LargeTextEditor",version:G,userComponents:{agLargeTextCellEditor:vb},dependsOn:[dt]},tS={moduleName:"CustomEditor",version:G,dependsOn:[dt]};function oS(e){var t;(t=e.expansionSvc)==null||t.expandAll(!0)}function iS(e){var t;(t=e.expansionSvc)==null||t.expandAll(!1)}function sS(e){const t=Te(e),o=Hv(e);t?t.onRowHeightChanged():o&&o.onRowHeightChanged()}var nS={moduleName:"CsrmSsrmSharedApi",version:G,apiFunctions:{expandAll:oS,collapseAll:iS,onRowHeightChanged:sS}},rS=class extends x{constructor(){super(...arguments),this.beanName="alignedGridsSvc",this.consuming=!1}getAlignedGridApis(){let e=this.gos.get("alignedGrids")??[];const t=typeof e=="function";return typeof e=="function"&&(e=e()),e.map(i=>{var n;if(!i){U(18),t||U(20);return}if(this.isGridApi(i))return i;const s=i;return"current"in s?(n=s.current)==null?void 0:n.api:(s.api||U(19),s.api)}).filter(i=>!!i&&!i.isDestroyed())}isGridApi(e){return!!e&&!!e.dispatchEvent}postConstruct(){const e=this.fireColumnEvent.bind(this);this.addManagedEventListeners({columnMoved:e,columnVisible:e,columnPinned:e,columnGroupOpened:e,columnResized:e,bodyScroll:this.fireScrollEvent.bind(this),alignedGridColumn:({event:t})=>this.onColumnEvent(t),alignedGridScroll:({event:t})=>this.onScrollEvent(t)})}fireEvent(e){this.consuming||this.getAlignedGridApis().forEach(t=>{t.isDestroyed()||t.dispatchEvent(e)})}onEvent(e){this.consuming=!0,e(),this.consuming=!1}fireColumnEvent(e){this.fireEvent({type:"alignedGridColumn",event:e})}fireScrollEvent(e){e.direction==="horizontal"&&this.fireEvent({type:"alignedGridScroll",event:e})}onScrollEvent(e){this.onEvent(()=>{this.beans.ctrlsSvc.getScrollFeature().setHorizontalScrollPosition(e.left,!0)})}extractDataFromEvent(e,t){const o=[];return e.columns?e.columns.forEach(i=>{o.push(t(i))}):e.column&&o.push(t(e.column)),o}getMasterColumns(e){return this.extractDataFromEvent(e,t=>t)}getColumnIds(e){return this.extractDataFromEvent(e,t=>t.getColId())}onColumnEvent(e){this.onEvent(()=>{switch(e.type){case"columnMoved":case"columnVisible":case"columnPinned":case"columnResized":{this.processColumnEvent(e);break}case"columnGroupOpened":{this.processGroupOpenedEvent(e);break}case"columnPivotChanged":k(21);break}})}processGroupOpenedEvent(e){const{colGroupSvc:t}=this.beans;t&&e.columnGroups.forEach(o=>{let i=null;o&&(i=t.getProvidedColGroup(o.getGroupId())),!(o&&!i)&&t.setColumnGroupOpened(i,o.isExpanded(),"alignedGridChanged")})}processColumnEvent(e){var c;const t=e.column;let o=null;const i=this.beans,{colResize:s,ctrlsSvc:n,colModel:r}=i;if(t&&(o=r.getColDefCol(t.getColId())),t&&!o)return;const l=this.getMasterColumns(e);switch(e.type){case"columnMoved":{const h=e.api.getColumnState().map(g=>({colId:g.colId}));ve(i,{state:h,applyOrder:!0},"alignedGridChanged")}break;case"columnVisible":{const h=e.api.getColumnState().map(g=>({colId:g.colId,hide:g.hide}));ve(i,{state:h},"alignedGridChanged")}break;case"columnPinned":{const h=e.api.getColumnState().map(g=>({colId:g.colId,pinned:g.pinned}));ve(i,{state:h},"alignedGridChanged")}break;case"columnResized":{const u=e,h={};l.forEach(g=>{h[g.getId()]={key:g.getColId(),newWidth:g.getActualWidth()}}),(c=u.flexColumns)==null||c.forEach(g=>{h[g.getId()]&&delete h[g.getId()]}),s==null||s.setColumnWidths(Object.values(h),!1,u.finished,"alignedGridChanged");break}}const d=n.getGridBodyCtrl().isVerticalScrollShowing();this.getAlignedGridApis().forEach(u=>{u.setGridOption("alwaysShowVerticalScroll",d)})}},lS={moduleName:"AlignedGrids",version:G,beans:[rS],dependsOn:[_l]},aS="↑",dS="↓",cS={tag:"span",children:[{tag:"span",ref:"eDelta",cls:"ag-value-change-delta"},{tag:"span",ref:"eValue",cls:"ag-value-change-value"}]},uS=class extends j{constructor(){super(cS),this.eValue=A,this.eDelta=A,this.refreshCount=0}init(e){this.refresh(e,!0)}showDelta(e,t){const o=Math.abs(t),i=e.formatValue(o),s=M(i)?i:o,n=t>=0,r=this.eDelta;n?r.textContent=aS+s:r.textContent=dS+s,r.classList.toggle("ag-value-change-delta-up",n),r.classList.toggle("ag-value-change-delta-down",!n)}setTimerToRemoveDelta(){this.refreshCount++;const e=this.refreshCount;this.beans.frameworkOverrides.wrapIncoming(()=>{window.setTimeout(()=>{e===this.refreshCount&&this.hideDeltaValue()},2e3)})}hideDeltaValue(){this.eValue.classList.remove("ag-value-change-value-highlight"),he(this.eDelta)}refresh(e,t=!1){var d;const{value:o,valueFormatted:i}=e,{eValue:s,lastValue:n,beans:r}=this;if(o===n||(M(i)?s.textContent=i:M(o)?s.textContent=o:he(s),(d=r.filterManager)!=null&&d.isSuppressFlashingCellsBecauseFiltering()))return!1;const l=o&&typeof o=="object"&&"toNumber"in o?o.toNumber():o,a=n&&typeof n=="object"&&"toNumber"in n?n.toNumber():n;if(l===a)return!1;if(typeof l=="number"&&typeof a=="number"){const c=l-a;this.showDelta(e,c)}return n&&s.classList.add("ag-value-change-value-highlight"),t||this.setTimerToRemoveDelta(),this.lastValue=o,!0}},hS=".ag-value-slide-out{opacity:1}:where(.ag-ltr) .ag-value-slide-out{margin-right:5px;transition:opacity 3s,margin-right 3s}:where(.ag-rtl) .ag-value-slide-out{margin-left:5px;transition:opacity 3s,margin-left 3s}:where(.ag-ltr,.ag-rtl) .ag-value-slide-out{transition-timing-function:linear}.ag-value-slide-out-end{opacity:0}:where(.ag-ltr) .ag-value-slide-out-end{margin-right:10px}:where(.ag-rtl) .ag-value-slide-out-end{margin-left:10px}",gS={tag:"span",children:[{tag:"span",ref:"eCurrent",cls:"ag-value-slide-current"}]},pS=class extends j{constructor(){super(gS),this.eCurrent=A,this.refreshCount=0,this.registerCSS(hS)}init(e){this.refresh(e,!0)}addSlideAnimation(){this.refreshCount++;const e=this.refreshCount;this.ePrevious&&this.getGui().removeChild(this.ePrevious);const{beans:t,eCurrent:o}=this,i=X({tag:"span",cls:"ag-value-slide-previous ag-value-slide-out"});this.ePrevious=i,i.textContent=o.textContent,this.getGui().insertBefore(i,o),t.frameworkOverrides.wrapIncoming(()=>{window.setTimeout(()=>{e===this.refreshCount&&this.ePrevious.classList.add("ag-value-slide-out-end")},50),window.setTimeout(()=>{e===this.refreshCount&&(this.getGui().removeChild(this.ePrevious),this.ePrevious=null)},3e3)})}refresh(e,t=!1){var s;let o=e.value;if(K(o)&&(o=""),o===this.lastValue||(s=this.beans.filterManager)!=null&&s.isSuppressFlashingCellsBecauseFiltering())return!1;t||this.addSlideAnimation(),this.lastValue=o;const i=this.eCurrent;return M(e.valueFormatted)?i.textContent=e.valueFormatted:M(e.value)?i.textContent=o:he(i),!0}},fS=class extends x{constructor(){super(...arguments),this.beanName="cellFlashSvc",this.nextAnimationTime=null,this.nextAnimationCycle=null,this.animations={highlight:new Map,"data-changed":new Map}}animateCell(e,t,o=this.beans.gos.get("cellFlashDuration"),i=this.beans.gos.get("cellFadeDuration")){const s=this.animations[t];s.delete(e);const n=Date.now(),r=n+o,l=n+o+i,a={phase:"flash",flashEndTime:r,fadeEndTime:l};s.set(e,a);const d=`ag-cell-${t}`,c=`${d}-animation`,{comp:u,eGui:{style:h}}=e;u.toggleCss(d,!0),u.toggleCss(c,!1),h.removeProperty("transition"),h.removeProperty("transition-delay"),this.nextAnimationTime&&r+15<this.nextAnimationTime&&(clearTimeout(this.nextAnimationCycle),this.nextAnimationCycle=null,this.nextAnimationTime=null),this.nextAnimationCycle||(this.beans.frameworkOverrides.wrapIncoming(()=>{this.nextAnimationCycle=setTimeout(this.advanceAnimations.bind(this),o)}),this.nextAnimationTime=r)}advanceAnimations(){const e=Date.now();let t=null;for(const o of Object.keys(this.animations)){const i=this.animations[o],s=`ag-cell-${o}`,n=`${s}-animation`;for(const[r,l]of i){if(!r.isAlive()||!r.comp){i.delete(r);continue}const{phase:a,flashEndTime:d,fadeEndTime:c}=l,u=a==="flash"?d:c;if(!(e+15>=u)){t=Math.min(u,t??1/0);continue}const{comp:g,eGui:{style:p}}=r;switch(a){case"flash":g.toggleCss(s,!1),g.toggleCss(n,!0),p.transition=`background-color ${c-d}ms`,p.transitionDelay=`${d-e}ms`,t=Math.min(c,t??1/0),l.phase="fade";break;case"fade":g.toggleCss(s,!1),g.toggleCss(n,!1),p.removeProperty("transition"),p.removeProperty("transition-delay"),i.delete(r);break}}}t==null?(this.nextAnimationTime=null,this.nextAnimationCycle=null):t&&(this.nextAnimationCycle=setTimeout(this.advanceAnimations.bind(this),t-e),this.nextAnimationTime=t)}onFlashCells(e,t){if(!e.comp)return;const o=Zu(e.cellPosition);t.cells[o]&&this.animateCell(e,"highlight")}flashCell(e,t){this.animateCell(e,"data-changed",t==null?void 0:t.flashDuration,t==null?void 0:t.fadeDuration)}destroy(){for(const e of Object.keys(this.animations))this.animations[e].clear()}};function CS(e,t={}){const{cellFlashSvc:o}=e;o&&e.frameworkOverrides.wrapIncoming(()=>{e.rowRenderer.getCellCtrls(t.rowNodes,t.columns).forEach(i=>o.flashCell(i,t))})}var mS={moduleName:"HighlightChanges",version:G,beans:[fS],userComponents:{agAnimateShowChangeCellRenderer:uS,agAnimateSlideCellRenderer:pS},apiFunctions:{flashCells:CS}};function wS(e){var t;return((t=e.stateSvc)==null?void 0:t.getState())??{}}function vS(e,t,o){var i;return(i=e.stateSvc)==null?void 0:i.setState(t,o)}function La(e){switch(e={...e},e.version||(e.version="32.1.0"),e.version){case"32.1.0":e=bS(e)}return e.version=G,e}function bS(e){return e.cellSelection=SS(e,"rangeSelection"),e}function SS(e,t){if(e&&typeof e=="object")return e[t]}var yS=class extends x{constructor(){super(...arguments),this.beanName="stateSvc",this.updateRowGroupExpansionStateTimer=0,this.suppressEvents=!0,this.queuedUpdateSources=new Set,this.dispatchStateUpdateEventDebounced=ge(this,()=>this.dispatchQueuedStateUpdateEvents(),0),this.onRowGroupOpenedDebounced=ge(this,()=>{this.updateCachedState("rowGroupExpansion",this.getRowGroupExpansionState())},0),this.onRowSelectedDebounced=ge(this,()=>{this.staleStateKeys.delete("rowSelection"),this.updateCachedState("rowSelection",this.getRowSelectionState())},0),this.staleStateKeys=new Set}postConstruct(){this.isClientSideRowModel=oe(this.gos);const e=La(this.gos.get("initialState")??{}),t=e.partialColumnState;delete e.partialColumnState,this.cachedState=e;const o=this.suppressEventsAndDispatchInitEvent.bind(this);this.beans.ctrlsSvc.whenReady(this,()=>o(()=>this.setupStateOnGridReady(e)));const[i,s,n]=this.addManagedEventListeners({newColumnsLoaded:({source:r})=>{r==="gridInitializing"&&(i(),o(()=>this.setupStateOnColumnsInitialised(e,!!t)))},rowCountReady:()=>{s==null||s(),o(()=>this.setupStateOnRowCountReady(e))},firstDataRendered:()=>{n==null||n(),o(()=>this.setupStateOnFirstDataRendered(e))}})}destroy(){super.destroy(),clearTimeout(this.updateRowGroupExpansionStateTimer),this.queuedUpdateSources.clear()}getState(){return this.staleStateKeys.size&&this.refreshStaleState(),this.cachedState}setState(e,t){const o=La(e);delete o.partialColumnState,this.cachedState=o,this.startSuppressEvents();const i="api",s=t?new Set(t):void 0;this.setGridReadyState(o,i,s),this.setColumnsInitialisedState(o,i,!1,s),this.setRowCountState(o,i,s),setTimeout(()=>{this.isAlive()&&this.setFirstDataRenderedState(o,i,s),this.stopSuppressEvents(i)})}setGridReadyState(e,t,o){var i,s;t==="api"&&!(o!=null&&o.has("sideBar"))&&((s=(i=this.beans.sideBar)==null?void 0:i.comp)==null||s.setState(e.sideBar)),this.updateCachedState("sideBar",this.getSideBarState())}setupStateOnGridReady(e){this.setGridReadyState(e,"gridInitializing");const t=()=>this.updateCachedState("sideBar",this.getSideBarState());this.addManagedEventListeners({toolPanelVisibleChanged:t,sideBarUpdated:t})}updateColumnAndGroupState(){this.updateColumnState(["aggregation","columnOrder","columnPinning","columnSizing","columnVisibility","pivot","rowGroup","sort"]),this.updateCachedState("columnGroup",this.getColumnGroupState())}setColumnsInitialisedState(e,t,o,i){this.setColumnState(e,t,o,i),this.setColumnGroupState(e,t,i),this.updateColumnAndGroupState()}setupStateOnColumnsInitialised(e,t){this.setColumnsInitialisedState(e,"gridInitializing",t);const o=i=>()=>this.updateColumnState([i]);this.addManagedEventListeners({columnValueChanged:o("aggregation"),columnMoved:o("columnOrder"),columnPinned:o("columnPinning"),columnResized:o("columnSizing"),columnVisible:o("columnVisibility"),columnPivotChanged:o("pivot"),columnPivotModeChanged:o("pivot"),columnRowGroupChanged:o("rowGroup"),sortChanged:o("sort"),newColumnsLoaded:this.updateColumnAndGroupState.bind(this),columnGroupOpened:()=>this.updateCachedState("columnGroup",this.getColumnGroupState())})}setRowCountState(e,t,o){const{filter:i,rowGroupExpansion:s,rowSelection:n,pagination:r}=e,l=(d,c)=>!(o!=null&&o.has(d))&&(c||t==="api");l("filter",i)&&this.setFilterState(i),l("rowGroupExpansion",s)&&this.setRowGroupExpansionState(s,t),l("rowSelection",n)&&this.setRowSelectionState(n,t),l("pagination",r)&&this.setPaginationState(r,t);const a=this.updateCachedState.bind(this);a("filter",this.getFilterState()),a("rowGroupExpansion",this.getRowGroupExpansionState()),a("rowSelection",this.getRowSelectionState()),a("pagination",this.getPaginationState())}setupStateOnRowCountReady(e){this.setRowCountState(e,"gridInitializing");const t=this.updateCachedState.bind(this),o=()=>{this.updateRowGroupExpansionStateTimer=0,t("rowGroupExpansion",this.getRowGroupExpansionState())},i=()=>t("filter",this.getFilterState()),{gos:s,colFilter:n}=this.beans;this.addManagedEventListeners({filterChanged:i,rowGroupOpened:()=>this.onRowGroupOpenedDebounced(),expandOrCollapseAll:o,columnRowGroupChanged:o,rowDataUpdated:()=>{(s.get("groupDefaultExpanded")!==0||s.get("isGroupOpenByDefault"))&&(this.updateRowGroupExpansionStateTimer||(this.updateRowGroupExpansionStateTimer=setTimeout(o)))},selectionChanged:()=>{this.staleStateKeys.add("rowSelection"),this.onRowSelectedDebounced()},paginationChanged:r=>{(r.newPage||r.newPageSize)&&t("pagination",this.getPaginationState())}}),n&&this.addManagedListeners(n,{filterStateChanged:i})}setFirstDataRenderedState(e,t,o){const{scroll:i,cellSelection:s,focusedCell:n,columnOrder:r,rowPinning:l}=e,a=(u,h)=>!(o!=null&&o.has(u))&&(h||t==="api");a("focusedCell",n)&&this.setFocusedCellState(n),a("cellSelection",s)&&this.setCellSelectionState(s),a("scroll",i)&&this.setScrollState(i),a("rowPinning",l)&&this.setRowPinningState(l),this.setColumnPivotState(!!(r!=null&&r.orderedColIds),t);const d=this.updateCachedState.bind(this);d("sideBar",this.getSideBarState()),d("focusedCell",this.getFocusedCellState());const c=this.getRangeSelectionState();d("rangeSelection",c),d("cellSelection",c),d("scroll",this.getScrollState())}setupStateOnFirstDataRendered(e){this.setFirstDataRenderedState(e,"gridInitializing");const t=this.updateCachedState.bind(this);this.addManagedEventListeners({cellFocused:()=>t("focusedCell",this.getFocusedCellState()),cellSelectionChanged:o=>{if(o.finished){const i=this.getRangeSelectionState();t("rangeSelection",i),t("cellSelection",i)}},bodyScrollEnd:()=>t("scroll",this.getScrollState()),pinnedRowsChanged:()=>t("rowPinning",this.getRowPinningState())})}getColumnState(){const e=this.beans;return Bv(Uo(e),e.colModel.isPivotMode())}setColumnState(e,t,o,i){const{sort:s,rowGroup:n,aggregation:r,pivot:l,columnPinning:a,columnVisibility:d,columnSizing:c,columnOrder:u}=e,h=(P,T)=>!(i!=null&&i.has(P))&&(T||t==="api"),g={},p=P=>{let T=g[P];return T||(T={colId:P},g[P]=T,T)},f={},C=h("sort",s);C&&(s==null||s.sortModel.forEach(({colId:P,sort:T},V)=>{const B=p(P);B.sort=T,B.sortIndex=V})),(C||!o)&&(f.sort=null,f.sortIndex=null);const m=h("rowGroup",n);m&&(n==null||n.groupColIds.forEach((P,T)=>{const V=p(P);V.rowGroup=!0,V.rowGroupIndex=T})),(m||!o)&&(f.rowGroup=null,f.rowGroupIndex=null);const w=h("aggregation",r);w&&(r==null||r.aggregationModel.forEach(({colId:P,aggFunc:T})=>{p(P).aggFunc=T})),(w||!o)&&(f.aggFunc=null);const b=h("pivot",l);b&&(l==null||l.pivotColIds.forEach((P,T)=>{const V=p(P);V.pivot=!0,V.pivotIndex=T}),this.gos.updateGridOptions({options:{pivotMode:!!(l!=null&&l.pivotMode)},source:t})),(b||!o)&&(f.pivot=null,f.pivotIndex=null);const v=h("columnPinning",a);v&&(a==null||a.leftColIds.forEach(P=>{p(P).pinned="left"}),a==null||a.rightColIds.forEach(P=>{p(P).pinned="right"})),(v||!o)&&(f.pinned=null);const S=h("columnVisibility",d);S&&(d==null||d.hiddenColIds.forEach(P=>{p(P).hide=!0})),(S||!o)&&(f.hide=null);const D=h("columnSizing",c);D&&(c==null||c.columnSizingModel.forEach(({colId:P,flex:T,width:V})=>{const B=p(P);B.flex=T??null,B.width=V})),(D||!o)&&(f.flex=null);const I=u==null?void 0:u.orderedColIds,O=!!(I!=null&&I.length)&&!(i!=null&&i.has("columnOrder")),F=O?I.map(P=>p(P)):Object.values(g);F.length&&(this.columnStates=F,ve(this.beans,{state:F,applyOrder:O,defaultState:f},t))}setColumnPivotState(e,t){const o=this.columnStates;this.columnStates=void 0;const i=this.columnGroupStates;this.columnGroupStates=void 0;const s=this.beans,{pivotResultCols:n,colGroupSvc:r}=s;if(n!=null&&n.isPivotResultColsPresent()){if(o){const l=[];for(const a of o)n.getPivotResultCol(a.colId)&&l.push(a);ve(s,{state:l,applyOrder:e},t)}i&&(r==null||r.setColumnGroupState(i,t))}}getColumnGroupState(){const e=this.beans.colGroupSvc;if(!e)return;const t=e.getColumnGroupState();return Vv(t)}setColumnGroupState(e,t,o){var l;const i=this.beans.colGroupSvc;if(!i||o!=null&&o.has("columnGroup")||t!=="api"&&!Object.prototype.hasOwnProperty.call(e,"columnGroup"))return;const s=new Set((l=e.columnGroup)==null?void 0:l.openColumnGroupIds),r=i.getColumnGroupState().map(({groupId:a})=>{const d=s.has(a);return d&&s.delete(a),{groupId:a,open:d}});s.forEach(a=>{r.push({groupId:a,open:!0})}),r.length&&(this.columnGroupStates=r),i.setColumnGroupState(r,t)}getFilterState(){const e=this.beans.filterManager;let t=e==null?void 0:e.getFilterModel();t&&Object.keys(t).length===0&&(t=void 0);const o=e==null?void 0:e.getFilterState(),i=(e==null?void 0:e.getAdvFilterModel())??void 0;return t||i||o?{filterModel:t,columnFilterState:o,advancedFilterModel:i}:void 0}setFilterState(e){const t=this.beans.filterManager,{filterModel:o,columnFilterState:i,advancedFilterModel:s}=e??{filterModel:null,columnFilterState:null,advancedFilterModel:null};(o!==void 0||i!==void 0)&&(t==null||t.setFilterState(o??null,i??null,"columnFilter")),s!==void 0&&(t==null||t.setAdvFilterModel(s??null,"advancedFilter"))}getRangeSelectionState(){var t;const e=(t=this.beans.rangeSvc)==null?void 0:t.getCellRanges().map(o=>{const{id:i,type:s,startRow:n,endRow:r,columns:l,startColumn:a}=o;return{id:i,type:s,startRow:n,endRow:r,colIds:l.map(d=>d.getColId()),startColId:a.getColId()}});return e!=null&&e.length?{cellRanges:e}:void 0}setCellSelectionState(e){const{gos:t,rangeSvc:o,colModel:i,visibleCols:s}=this.beans;if(!Je(t)||!o)return;const n=[];e==null||e.cellRanges.forEach(r=>{const l=[];if(r.colIds.forEach(d=>{const c=i.getCol(d);c&&l.push(c)}),!l.length)return;let a=i.getCol(r.startColId);if(!a){const d=s.allCols,c=new Set(l);a=d.find(u=>c.has(u))}n.push({...r,columns:l,startColumn:a})}),o.setCellRanges(n)}getScrollState(){if(!this.isClientSideRowModel)return;const e=this.beans.ctrlsSvc.getScrollFeature(),{left:t}=(e==null?void 0:e.getHScrollPosition())??{left:0},{top:o}=(e==null?void 0:e.getVScrollPosition())??{top:0};return o||t?{top:o,left:t}:void 0}setScrollState(e){if(!this.isClientSideRowModel)return;const{top:t,left:o}=e??{top:0,left:0},{frameworkOverrides:i,rowRenderer:s,animationFrameSvc:n,ctrlsSvc:r}=this.beans;i.wrapIncoming(()=>{var l;r.get("center").setCenterViewportScrollLeft(o),(l=r.getScrollFeature())==null||l.setVerticalScrollPosition(t),s.redraw({afterScroll:!0}),n==null||n.flushAllFrames()})}getSideBarState(){var e,t;return(t=(e=this.beans.sideBar)==null?void 0:e.comp)==null?void 0:t.getState()}getFocusedCellState(){if(!this.isClientSideRowModel)return;const e=this.beans.focusSvc.getFocusedCell();if(e){const{column:t,rowIndex:o,rowPinned:i}=e;return{colId:t.getColId(),rowIndex:o,rowPinned:i}}}setFocusedCellState(e){if(!this.isClientSideRowModel)return;const{focusSvc:t,colModel:o}=this.beans;if(!e){t.clearFocusedCell();return}const{colId:i,rowIndex:s,rowPinned:n}=e;t.setFocusedCell({column:o.getCol(i),rowIndex:s,rowPinned:n,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0})}getPaginationState(){const{pagination:e,gos:t}=this.beans;if(!e)return;const o=e.getCurrentPage(),i=t.get("paginationAutoPageSize")?void 0:e.getPageSize();if(!(!o&&!i))return{page:o,pageSize:i}}setPaginationState(e,t){const{pagination:o,gos:i}=this.beans;if(!o)return;const{pageSize:s,page:n}=e??{page:0,pageSize:i.get("paginationPageSize")},r=t==="gridInitializing";s&&!i.get("paginationAutoPageSize")&&o.setPageSize(s,r?"initialState":"pageSizeSelector"),typeof n=="number"&&(r?o.setPage(n):o.goToPage(n))}getRowSelectionState(){var i;const e=this.beans.selectionSvc;if(!e)return;const t=e.getSelectionState();return!t||!Array.isArray(t)&&(t.selectAll===!1||t.selectAllChildren===!1)&&!((i=t==null?void 0:t.toggledNodes)!=null&&i.length)?void 0:t}setRowSelectionState(e,t){var o;(o=this.beans.selectionSvc)==null||o.setSelectionState(e,t,t==="api")}getRowGroupExpansionState(){const{expansionSvc:e,rowModel:t}=this.beans;if(!e)return;const o=[];return t.forEachNode(({expanded:i,id:s})=>{i&&s&&o.push(s)}),o.length?{expandedRowGroupIds:o}:void 0}getRowPinningState(){var e;return(e=this.beans.pinnedRowModel)==null?void 0:e.getPinnedState()}setRowPinningState(e){const t=this.beans.pinnedRowModel;e?t==null||t.setPinnedState(e):t==null||t.reset()}setRowGroupExpansionState(e,t){var n;const o=this.beans.expansionSvc;if(!o)return;const i=(e==null?void 0:e.expandedRowGroupIds)??[];let s;if(t==="api"){const r=(n=this.getRowGroupExpansionState())==null?void 0:n.expandedRowGroupIds;if(r!=null&&r.length){const l=new Set(r);for(const a of i)l.delete(a);s=Array.from(l)}}o.expandRows(i,s)}updateColumnState(e){const t=this.getColumnState();let o=!1;const i=this.cachedState;for(const s of Object.keys(t)){const n=t[s];bn(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),bn(t,o)||this.dispatchStateUpdateEvent([e])}setCachedStateValue(e,t){this.cachedState={...this.cachedState,[e]:t}}refreshStaleState(){const e=this.staleStateKeys;e.forEach(t=>{switch(t){case"rowSelection":this.setCachedStateValue(t,this.getRowSelectionState());break}}),e.clear()}dispatchStateUpdateEvent(e){this.suppressEvents||(e.forEach(t=>this.queuedUpdateSources.add(t)),this.dispatchStateUpdateEventDebounced())}dispatchQueuedStateUpdateEvents(){const e=this.queuedUpdateSources,t=Array.from(e);e.clear(),this.eventSvc.dispatchEvent({type:"stateUpdated",sources:t,state:this.cachedState})}startSuppressEvents(){var e;this.suppressEvents=!0,(e=this.beans.colAnimation)==null||e.setSuppressAnimation(!0)}stopSuppressEvents(e){setTimeout(()=>{var t;this.suppressEvents=!1,this.queuedUpdateSources.clear(),this.isAlive()&&((t=this.beans.colAnimation)==null||t.setSuppressAnimation(!1),this.dispatchStateUpdateEvent([e]))})}suppressEventsAndDispatchInitEvent(e){this.startSuppressEvents(),e(),this.stopSuppressEvents("gridInitializing")}},RS={moduleName:"GridState",version:G,beans:[yS],apiFunctions:{getState:wS,setState:vS}};function ES(e,t={}){const o=t?t.rowNodes:void 0;e.frameworkOverrides.wrapIncoming(()=>e.rowRenderer.redrawRows(o))}function Ga(e,t,o,i,s){t&&(i&&t.parent&&t.parent.level!==-1&&Ga(e,t.parent,o,i,s),t.setExpanded(o,void 0,s))}function xS(e,t){return e.rowModel.getRowNode(t)}function DS(e,t,o,i){e.rowRenderer.addRenderedRowListener(t,o,i)}function FS(e){return e.rowRenderer.getRenderedNodes()}function PS(e,t,o){e.rowModel.forEachNode(t,o)}function TS(e){return e.rowRenderer.firstRenderedRow}function IS(e){return e.rowRenderer.lastRenderedRow}function AS(e,t){return e.rowModel.getRow(t)}function MS(e){return e.rowModel.getRowCount()}var Ha={moduleName:"RowApi",version:G,apiFunctions:{redrawRows:ES,setRowNodeExpanded:Ga,getRowNode:xS,addRenderedRowListener:DS,getRenderedNodes:FS,forEachNode:PS,getFirstDisplayedRowIndex:TS,getLastDisplayedRowIndex:IS,getDisplayedRowAtIndex:AS,getDisplayedRowCount:MS}},kS={moduleName:"ScrollApi",version:G,apiFunctions:{getVerticalPixelRange:Fb,getHorizontalPixelRange:Pb,ensureColumnVisible:Fa,ensureIndexVisible:Pa,ensureNodeVisible:Tb}};function LS(e,t,o){if(!t)return;const i=e.ctrlsSvc.getGridBodyCtrl().eGridBody,s=`aria-${t}`;o===null?i.removeAttribute(s):i.setAttribute(s,o)}function GS(e,t={}){e.frameworkOverrides.wrapIncoming(()=>e.rowRenderer.refreshCells(t))}function HS(e){e.frameworkOverrides.wrapIncoming(()=>e.ctrlsSvc.getHeaderRowContainerCtrls().forEach(t=>t.refresh()))}function OS(e){var t;return((t=e.animationFrameSvc)==null?void 0:t.isQueueEmpty())??!0}function BS(e){var t;(t=e.animationFrameSvc)==null||t.flushAllFrames()}function VS(e){return{rowHeight:is(e),headerHeight:lo(e)}}function NS(e,t={}){var n;const o=[];if(e.rowRenderer.getCellCtrls(t.rowNodes,t.columns).forEach(r=>{const l=r.getCellRenderer();l!=null&&o.push(ds(l))}),(n=t.columns)!=null&&n.length)return o;const i=[],s=nn(t.rowNodes);return e.rowRenderer.getAllRowCtrls().forEach(r=>{if(s&&!rn(r.rowNode,s)||!r.isFullWidth())return;const l=r.getFullWidthCellRenderers();for(let a=0;a<l.length;a++){const d=l[a];d!=null&&i.push(ds(d))}}),[...i,...o]}var _S={moduleName:"RenderApi",version:G,apiFunctions:{setGridAriaProperty:LS,refreshCells:GS,refreshHeader:HS,isAnimationFrameQueueEmpty:OS,flushAllAnimationFrames:BS,getSizesForCurrentTheme:VS,getCellRendererInstances:NS}};function WS(e,t){var o,i;typeof t=="number"?(o=e.colAutosize)==null||o.sizeColumnsToFit(t,"api"):(i=e.colAutosize)==null||i.sizeColumnsToFitGridBody(t)}function Oa({colAutosize:e,visibleCols:t},o,i){Array.isArray(o)?e==null||e.autoSizeCols({colKeys:o,skipHeader:i,source:"api"}):e==null||e.autoSizeCols({colKeys:o.colIds??t.allCols,skipHeader:o.skipHeader,defaultMaxWidth:o.defaultMaxWidth,defaultMinWidth:o.defaultMinWidth,columnLimits:o.columnLimits,source:"api"})}function zS(e,t){var o;t&&typeof t=="object"?Oa(e,t):(o=e.colAutosize)==null||o.autoSizeAllColumns({source:"api",skipHeader:t})}var $S=class extends x{constructor(){super(...arguments),this.beanName="colAutosize",this.timesDelayed=0,this.shouldQueueResizeOperations=!1,this.resizeOperationQueue=[]}postConstruct(){this.addManagedEventListeners({firstDataRendered:()=>this.onFirstDataRendered()})}autoSizeCols(e){if(this.shouldQueueResizeOperations){this.pushResizeOperation(()=>this.autoSizeCols(e));return}const{colKeys:t,skipHeader:o,skipHeaderGroups:i,stopAtGroup:s,defaultMaxWidth:n,defaultMinWidth:r,columnLimits:l=[],source:a="api"}=e,{animationFrameSvc:d,renderStatus:c,colModel:u,autoWidthCalc:h,visibleCols:g}=this.beans;if(d==null||d.flushAllFrames(),this.timesDelayed<5&&c&&!c.areHeaderCellsRendered()){this.timesDelayed++,setTimeout(()=>{this.isAlive()&&this.autoSizeCols(e)});return}this.timesDelayed=0;const p=[];let f=-1;const C=Object.fromEntries(l.map(({colId:b,maxWidth:v,minWidth:S})=>[b,{maxWidth:v,minWidth:S}])),m=o??this.gos.get("skipHeaderOnAutoSize"),w=i??m;for(;f!==0;){f=0;const b=[];t.forEach(v=>{if(!v||Nc(v))return;const S=u.getCol(v);if(!S||p.indexOf(S)>=0)return;const D=h.getPreferredWidthForColumn(S,m);if(D>0){const I=C[S.colId]??{};I.minWidth??(I.minWidth=r),I.maxWidth??(I.maxWidth=n);const O=US(S,D,I);S.setActualWidth(O,a),p.push(S),f++}b.push(S)}),b.length&&g.refresh(a)}w||this.autoSizeColumnGroupsByColumns(t,a,s),yt(this.eventSvc,p,!0,"autosizeColumns")}autoSizeColumn(e,t,o){e&&this.autoSizeCols({colKeys:[e],skipHeader:o,skipHeaderGroups:!0,source:t})}autoSizeColumnGroupsByColumns(e,t,o){const{colModel:i,ctrlsSvc:s}=this.beans,n=new Set;i.getColsForKeys(e).forEach(d=>{let c=d.getParent();for(;c&&c!=o;)c.isPadding()||n.add(c),c=c.getParent()});let l;const a=[];for(const d of n){for(const c of s.getHeaderRowContainerCtrls())if(l=c.getHeaderCtrlForColumn(d),l)break;l&&l.resizeLeafColumnsToFit(t)}return a}autoSizeAllColumns(e){if(this.shouldQueueResizeOperations){this.pushResizeOperation(()=>this.autoSizeAllColumns(e));return}const t=this.beans.visibleCols.allCols;this.autoSizeCols({colKeys:t,...e})}addColumnAutosize(e,t){const o=this.gos.get("skipHeaderOnAutoSize"),i=()=>{this.autoSizeColumn(t,"uiColumnResized",o)};e.addEventListener("dblclick",i);const s=new lt(e);return s.addEventListener("doubleTap",i),()=>{e.removeEventListener("dblclick",i),s.removeEventListener("doubleTap",i),s.destroy()}}addColumnGroupResize(e,t,o){const i=this.gos.get("skipHeaderOnAutoSize"),s=()=>{const n=[];t.getDisplayedLeafColumns().forEach(l=>{l.getColDef().suppressAutoSize||n.push(l.getColId())}),n.length>0&&this.autoSizeCols({colKeys:n,skipHeader:i,stopAtGroup:t,source:"uiColumnResized"}),o()};return e.addEventListener("dblclick",s),()=>e.removeEventListener("dblclick",s)}sizeColumnsToFitGridBody(e,t){if(!this.isAlive())return;const{ctrlsSvc:o,scrollVisibleSvc:i}=this.beans,s=o.getGridBodyCtrl(),r=s.isVerticalScrollShowing()?i.getScrollbarWidth():0,a=Ut(s.eGridBody)-r;if(a>0){this.sizeColumnsToFit(a,"sizeColumnsToFit",!1,e);return}t===void 0?window.setTimeout(()=>{this.sizeColumnsToFitGridBody(e,100)},0):t===100?window.setTimeout(()=>{this.sizeColumnsToFitGridBody(e,500)},100):t===500?window.setTimeout(()=>{this.sizeColumnsToFitGridBody(e,-1)},500):k(29)}sizeColumnsToFit(e,t="sizeColumnsToFit",o,i){var g;if(this.shouldQueueResizeOperations){this.pushResizeOperation(()=>this.sizeColumnsToFit(e,t,o,i));return}const s={};i&&((g=i==null?void 0:i.columnLimits)==null||g.forEach(({key:p,...f})=>{s[typeof p=="string"?p:p.getColId()]=f}));const n=this.beans.visibleCols.allCols;if(e<=0||!n.length||e===Le(n)&&n.every(f=>{if(f.colDef.suppressSizeToFit)return!0;const C=s==null?void 0:s[f.getId()],m=(C==null?void 0:C.minWidth)??(i==null?void 0:i.defaultMinWidth),w=(C==null?void 0:C.maxWidth)??(i==null?void 0:i.defaultMaxWidth),b=f.getActualWidth();return(m==null||b>=m)&&(w==null||b<=w)}))return;const l=[],a=[];n.forEach(p=>{p.getColDef().suppressSizeToFit===!0?a.push(p):l.push(p)});const d=l.slice(0);let c=!1;const u=p=>{we(l,p),a.push(p)};for(l.forEach(p=>{p.resetActualWidth(t);const f=s==null?void 0:s[p.getId()],C=(f==null?void 0:f.minWidth)??(i==null?void 0:i.defaultMinWidth),m=(f==null?void 0:f.maxWidth)??(i==null?void 0:i.defaultMaxWidth),w=p.getActualWidth();typeof C=="number"&&w<C?p.setActualWidth(C,t,!0):typeof m=="number"&&w>m&&p.setActualWidth(m,t,!0)});!c;){c=!0;const p=e-Le(a);if(p<=0)l.forEach(f=>{var m;const C=((m=s==null?void 0:s[f.getId()])==null?void 0:m.minWidth)??(i==null?void 0:i.defaultMinWidth);if(typeof C=="number"){f.setActualWidth(C,t,!0);return}f.setActualWidth(f.minWidth,t)});else{const f=p/Le(l);let C=p;for(let m=l.length-1;m>=0;m--){const w=l[m],b=s==null?void 0:s[w.getId()],v=(b==null?void 0:b.minWidth)??(i==null?void 0:i.defaultMinWidth),S=(b==null?void 0:b.maxWidth)??(i==null?void 0:i.defaultMaxWidth),D=w.getMinWidth(),I=w.getMaxWidth(),O=typeof v=="number"&&v>D?v:D,F=typeof S=="number"&&S<I?S:I;let P=Math.round(w.getActualWidth()*f);P<O?(P=O,u(w),c=!1):P>F?(P=F,u(w),c=!1):m===0&&(P=C),w.setActualWidth(P,t,!0),C-=P}}}d.forEach(p=>{p.fireColumnWidthChangedEvent(t)});const h=this.beans.visibleCols;h.setLeftValues(t),h.updateBodyWidths(),!o&&yt(this.eventSvc,d,!0,t)}applyAutosizeStrategy(){const e=this.gos.get("autoSizeStrategy");if(!e)return;const{type:t}=e;setTimeout(()=>{if(t==="fitGridWidth"){const{columnLimits:o,defaultMinWidth:i,defaultMaxWidth:s}=e,n=o==null?void 0:o.map(({colId:r,minWidth:l,maxWidth:a})=>({key:r,minWidth:l,maxWidth:a}));this.sizeColumnsToFitGridBody({defaultMinWidth:i,defaultMaxWidth:s,columnLimits:n})}else t==="fitProvidedWidth"&&this.sizeColumnsToFit(e.width,"sizeColumnsToFit")})}onFirstDataRendered(){const e=this.gos.get("autoSizeStrategy");if((e==null?void 0:e.type)!=="fitCellContents")return;const{colIds:t,skipHeader:o,defaultMaxWidth:i,defaultMinWidth:s,columnLimits:n}=e;setTimeout(()=>{const r={skipHeader:o,source:"autosizeColumns",defaultMaxWidth:i,defaultMinWidth:s,columnLimits:n};t?this.autoSizeCols({colKeys:t,...r}):this.autoSizeAllColumns(r)})}processResizeOperations(){this.shouldQueueResizeOperations=!1,this.resizeOperationQueue.forEach(e=>e()),this.resizeOperationQueue=[]}pushResizeOperation(e){this.resizeOperationQueue.push(e)}destroy(){this.resizeOperationQueue.length=0,super.destroy()}};function US(e,t,o={}){const i=o.minWidth??e.getMinWidth();t<i&&(t=i);const s=o.maxWidth??e.getMaxWidth();return t>s&&(t=s),t}var KS={moduleName:"ColumnAutoSize",version:G,beans:[$S],apiFunctions:{sizeColumnsToFit:WS,autoSizeColumns:Oa,autoSizeAllColumns:zS},dependsOn:[Ol]},jS=".ag-row-pinned-source{background-color:var(--ag-pinned-source-row-background-color);color:var(--ag-pinned-source-row-text-color);font-weight:var(--ag-pinned-source-row-font-weight)}.ag-row-pinned-manual{background-color:var(--ag-pinned-row-background-color);color:var(--ag-pinned-row-text-color);font-weight:var(--ag-pinned-row-font-weight)}";function qS(e){var t;return((t=e.pinnedRowModel)==null?void 0:t.getPinnedTopRowCount())??0}function YS(e){var t;return((t=e.pinnedRowModel)==null?void 0:t.getPinnedBottomRowCount())??0}function ZS(e,t){var o;return(o=e.pinnedRowModel)==null?void 0:o.getPinnedTopRow(t)}function QS(e,t){var o;return(o=e.pinnedRowModel)==null?void 0:o.getPinnedBottomRow(t)}function XS(e,t,o){var i;return(i=e.pinnedRowModel)==null?void 0:i.forEachPinnedRow(t,o)}var JS={moduleName:"PinnedRow",version:G,beans:[lp],css:[jS],apiFunctions:{getPinnedTopRowCount:qS,getPinnedBottomRowCount:YS,getPinnedTopRow:ZS,getPinnedBottomRow:QS,forEachPinnedRow:XS},icons:{rowPin:"pin",rowPinTop:"pinned-top",rowPinBottom:"pinned-bottom",rowUnpin:"un-pin"}},ey=class extends Pt{constructor(e,t,o){super(e.col,e.firstNode,o,t),this.cellSpan=e,this.SPANNED_CELL_CSS_CLASS="ag-spanned-cell"}setComp(e,t,o,i,s,n,r){this.eWrapper=o,super.setComp(e,t,o,i,s,n,r),this.setAriaRowSpan(),this.refreshAriaRowIndex()}isCellSpanning(){return!0}getCellSpan(){return this.cellSpan}refreshAriaRowIndex(){this.rowNode.rowIndex!=null&&xo(this.eGui,this.rowNode.rowIndex)}setAriaRowSpan(){Kd(this.eGui,this.cellSpan.spannedNodes.size)}setFocusedCellPosition(e){this.focusedCellPosition=e}getFocusedCellPosition(){return this.focusedCellPosition??this.cellPosition}checkCellFocused(){const e=this.beans.focusSvc.getFocusedCell();return!!e&&this.cellSpan.doesSpanContain(e)}applyStaticCssClasses(){super.applyStaticCssClasses(),this.comp.toggleCss(this.SPANNED_CELL_CSS_CLASS,!0)}onCellFocused(e){const{beans:t}=this;if(ii(t)){this.focusedCellPosition=void 0;return}const o=this.isCellFocused();o||(this.focusedCellPosition=void 0),e&&o&&(this.focusedCellPosition={rowIndex:e.rowIndex,rowPinned:e.rowPinned,column:e.column}),super.onCellFocused(e)}getRootElement(){return this.eWrapper}},ty=class extends ai{onRowIndexChanged(){super.onRowIndexChanged(),this.getAllCellCtrls().forEach(e=>e.refreshAriaRowIndex())}getInitialRowClasses(e){return["ag-spanned-row"]}getNewCellCtrl(e){var i;const t=(i=this.beans.rowSpanSvc)==null?void 0:i.getCellSpan(e,this.rowNode);if(!(!t||t.firstNode!==this.rowNode))return new ey(t,this,this.beans)}isCorrectCtrlForSpan(e){var i;const t=(i=this.beans.rowSpanSvc)==null?void 0:i.getCellSpan(e.column,this.rowNode);return!t||t.firstNode!==this.rowNode?!1:e.getCellSpan()===t}onRowHeightChanged(){}refreshFirstAndLastRowStyles(){}addHoverFunctionality(){}resetHoveredStatus(){}},oy=class extends x{constructor(){super(...arguments),this.beanName="spannedRowRenderer",this.topCtrls=new Map,this.bottomCtrls=new Map,this.centerCtrls=new Map}postConstruct(){this.addManagedEventListeners({displayedRowsChanged:this.createAllCtrls.bind(this)})}createAllCtrls(){this.createCtrls("top"),this.createCtrls("bottom"),this.createCtrls("center")}createCtrls(e){const{rowSpanSvc:t}=this.beans,o=`${e}Ctrls`,i=this[o],s=i.size,n=this.getAllRelevantRowControls(e),r=new Map;let l=!1;for(const d of n)d.isAlive()&&(t==null||t.forEachSpannedColumn(d.rowNode,(c,u)=>{if(r.has(u.firstNode))return;const h=i.get(u.firstNode);if(h){r.set(u.firstNode,h),i.delete(u.firstNode);return}l=!0;const g=new ty(u.firstNode,this.beans,!1,!1,!1);r.set(u.firstNode,g)}));this[o]=r;const a=r.size===s;if(!(!l&&a)){for(const d of i.values())d.destroyFirstPass(!0),d.destroySecondPass();this.dispatchLocalEvent({type:"spannedRowsUpdated",ctrlsKey:e})}}getAllRelevantRowControls(e){const{rowRenderer:t}=this.beans;switch(e){case"top":return t.topRowCtrls;case"bottom":return t.bottomRowCtrls;case"center":return t.allRowCtrls}}getCellByPosition(e){const{rowSpanSvc:t}=this.beans,o=t==null?void 0:t.getCellSpanByPosition(e);if(!o)return;const i=`${Ba(e.rowPinned)}Ctrls`,s=this[i].get(o.firstNode);if(s)return s.getAllCellCtrls().find(n=>n.column===e.column)}getCtrls(e){const t=`${e}Ctrls`;return[...this[t].values()]}destroyRowCtrls(e){const t=`${e}Ctrls`;for(const o of this[t].values())o.destroyFirstPass(!0),o.destroySecondPass();this[t]=new Map}destroy(){super.destroy(),this.destroyRowCtrls("top"),this.destroyRowCtrls("bottom"),this.destroyRowCtrls("center")}},Ba=e=>e??"center",iy=class{constructor(e,t){this.col=e,this.firstNode=t,this.cellSpan=!0,this.spannedNodes=new Set,this.addSpannedNode(t)}reset(){this.spannedNodes.clear(),this.addSpannedNode(this.firstNode)}addSpannedNode(e){this.spannedNodes.add(e),this.lastNode=e}getLastNode(){return this.lastNode}getCellHeight(){return this.lastNode.rowTop+this.lastNode.rowHeight-this.firstNode.rowTop-1}doesSpanContain(e){return e.column!==this.col||e.rowPinned!=this.firstNode.rowPinned?!1:this.firstNode.rowIndex<=e.rowIndex&&e.rowIndex<=this.lastNode.rowIndex}getLastNodeAutoHeight(){var o;const e=(o=this.firstNode.__autoHeights)==null?void 0:o[this.col.getColId()];if(e==null)return;let t=0;return this.spannedNodes.forEach(i=>{i!==this.lastNode&&(t+=i.rowHeight)}),e-t}},sy=class extends x{constructor(e){super(),this.column=e}buildCache(e){var b;const{column:t,beans:{gos:o,pinnedRowModel:i,rowModel:s,valueSvc:n,pagination:r}}=this,{colDef:l}=t,a=this[`${e}ValueNodeMap`],d=new Map,c=o.getCallback("isFullWidthRow"),u=l.equals,h=l.spanRows,g=typeof h=="function";let p=null,f=null,C;const m=(v,S)=>{p=v,f=null,C=S},w=v=>{const S=!v.isExpandable()&&!v.group&&!v.detail&&(c?!c({rowNode:v}):!0);if(v.rowIndex==null||!S){m(null,null);return}if(p==null||v.level!==p.level||v.footer||f&&v.rowIndex-1!==(f==null?void 0:f.getLastNode().rowIndex)){m(v,n.getValue(t,v));return}const D=n.getValue(t,v);if(g){const I=_(o,{valueA:C,nodeA:p,valueB:D,nodeB:v,column:t,colDef:l});if(!h(I)){m(v,D);return}}else if(u?!u(C,D):C!==D){m(v,D);return}if(!f){const I=a==null?void 0:a.get(p);(I==null?void 0:I.firstNode)===p?(I.reset(),f=I):f=new iy(t,p),d.set(p,f)}f.addSpannedNode(v),d.set(v,f)};switch(e){case"center":(b=s.forEachDisplayedNode)==null||b.call(s,v=>{(!r||r.isRowInPage(v.rowIndex))&&w(v)});break;case"top":i==null||i.forEachPinnedRow("top",w);break;case"bottom":i==null||i.forEachPinnedRow("bottom",w);break}this[`${e}ValueNodeMap`]=d}isCellSpanning(e){return!!this.getCellSpan(e)}getCellSpan(e){return this[`${Ba(e.rowPinned)}ValueNodeMap`].get(e)}},ny=class extends x{constructor(){super(...arguments),this.beanName="rowSpanSvc",this.spanningColumns=new Map,this.debouncePinnedEvent=ge(this,this.dispatchCellsUpdatedEvent.bind(this,!0),0),this.debounceModelEvent=ge(this,this.dispatchCellsUpdatedEvent.bind(this,!1),0),this.pinnedTimeout=null,this.modelTimeout=null}postConstruct(){const e=this.onRowDataUpdated.bind(this),t=this.buildPinnedCaches.bind(this);this.addManagedEventListeners({paginationChanged:this.buildModelCaches.bind(this),pinnedRowDataChanged:t,pinnedRowsChanged:t,rowNodeDataChanged:e,cellValueChanged:e})}register(e){const{gos:t}=this.beans;if(!t.get("enableCellSpan")||this.spanningColumns.has(e))return;const o=this.createManagedBean(new sy(e));this.spanningColumns.set(e,o),o.buildCache("top"),o.buildCache("bottom"),o.buildCache("center"),this.debouncePinnedEvent(),this.debounceModelEvent()}dispatchCellsUpdatedEvent(e){this.dispatchLocalEvent({type:"spannedCellsUpdated",pinned:e})}deregister(e){this.spanningColumns.delete(e)}onRowDataUpdated({node:e}){const{spannedRowRenderer:t}=this.beans;if(e.rowPinned){if(this.pinnedTimeout!=null)return;this.pinnedTimeout=window.setTimeout(()=>{this.pinnedTimeout=null,this.buildPinnedCaches(),t==null||t.createCtrls("top"),t==null||t.createCtrls("bottom")},0);return}this.modelTimeout==null&&(this.modelTimeout=window.setTimeout(()=>{this.modelTimeout=null,this.buildModelCaches(),t==null||t.createCtrls("center")},0))}buildModelCaches(){this.modelTimeout!=null&&clearTimeout(this.modelTimeout),this.spanningColumns.forEach(e=>e.buildCache("center")),this.debounceModelEvent()}buildPinnedCaches(){this.pinnedTimeout!=null&&clearTimeout(this.pinnedTimeout),this.spanningColumns.forEach(e=>{e.buildCache("top"),e.buildCache("bottom")}),this.debouncePinnedEvent()}isCellSpanning(e,t){const o=this.spanningColumns.get(e);return o?o.isCellSpanning(t):!1}getCellSpanByPosition(e){const{pinnedRowModel:t,rowModel:o}=this.beans,i=e.column,s=e.rowIndex,n=this.spanningColumns.get(i);if(!n)return;let r;switch(e.rowPinned){case"top":r=t==null?void 0:t.getPinnedTopRow(s);break;case"bottom":r=t==null?void 0:t.getPinnedBottomRow(s);break;default:r=o.getRow(s)}if(r)return n.getCellSpan(r)}getCellStart(e){const t=this.getCellSpanByPosition(e);return t?{...e,rowIndex:t.firstNode.rowIndex}:e}getCellEnd(e){const t=this.getCellSpanByPosition(e);return t?{...e,rowIndex:t.getLastNode().rowIndex}:e}getCellSpan(e,t){const o=this.spanningColumns.get(e);if(o)return o.getCellSpan(t)}forEachSpannedColumn(e,t){for(const[o,i]of this.spanningColumns)if(i.isCellSpanning(e)){const s=i.getCellSpan(e);t(o,s)}}destroy(){super.destroy(),this.spanningColumns.clear()}},ry={moduleName:"CellSpan",version:G,beans:[ny,oy]},ly=class extends x{constructor(e,t){super(),this.cellCtrl=e,this.staticClasses=[],this.beans=t,this.column=e.column}setComp(e){this.cellComp=e,this.applyUserStyles(),this.applyCellClassRules(),this.applyClassesFromColDef()}applyCellClassRules(){const{column:e,cellComp:t}=this,o=e.colDef,i=o.cellClassRules,s=this.getCellClassParams(e,o);Es(this.beans.expressionSvc,i===this.cellClassRules?void 0:this.cellClassRules,i,s,n=>t.toggleCss(n,!0),n=>t.toggleCss(n,!1)),this.cellClassRules=i}applyUserStyles(){const e=this.column,t=e.colDef,o=t.cellStyle;if(!o)return;let i;if(typeof o=="function"){const s=this.getCellClassParams(e,t);i=o(s)}else i=o;i&&this.cellComp.setUserStyles(i)}applyClassesFromColDef(){const{column:e,cellComp:t}=this,o=e.colDef,i=this.getCellClassParams(e,o);this.staticClasses.forEach(n=>t.toggleCss(n,!1));const s=this.beans.cellStyles.getStaticCellClasses(o,i);this.staticClasses=s,s.forEach(n=>t.toggleCss(n,!0))}getCellClassParams(e,t){const{value:o,rowNode:i}=this.cellCtrl;return _(this.beans.gos,{value:o,data:i.data,node:i,colDef:t,column:e,rowIndex:i.rowIndex})}},ay=class extends x{constructor(){super(...arguments),this.beanName="cellStyles"}processAllCellClasses(e,t,o,i){Es(this.beans.expressionSvc,void 0,e.cellClassRules,t,o,i),this.processStaticCellClasses(e,t,o)}getStaticCellClasses(e,t){const{cellClass:o}=e;if(!o)return[];let i;return typeof o=="function"?i=o(t):i=o,typeof i=="string"&&(i=[i]),i||[]}createCellCustomStyleFeature(e,t){return new ly(e,t)}processStaticCellClasses(e,t,o){this.getStaticCellClasses(e,t).forEach(s=>{o(s)})}},dy={moduleName:"CellStyle",version:G,beans:[ay]},cy={moduleName:"RowStyle",version:G,beans:[jh]};function uy(e,t){var o;return!!((o=e.colHover)!=null&&o.isHovered(t))}var hy=class extends x{constructor(e,t){super(),this.columns=e,this.element=t,this.destroyManagedListeners=[],this.enableFeature=o=>{const{beans:i,gos:s,element:n,columns:r}=this,l=i.colHover;o??!!s.get("columnHoverHighlight")?this.destroyManagedListeners=this.addManagedElementListeners(n,{mouseover:l.setMouseOver.bind(l,r),mouseout:l.clearMouseOver.bind(l)}):(this.destroyManagedListeners.forEach(d=>d()),this.destroyManagedListeners=[])}}postConstruct(){this.addManagedPropertyListener("columnHoverHighlight",({currentValue:e})=>{this.enableFeature(e)}),this.enableFeature()}destroy(){super.destroy(),this.destroyManagedListeners=null}},gy="ag-column-hover",py=class extends x{constructor(){super(...arguments),this.beanName="colHover"}postConstruct(){this.addManagedPropertyListener("columnHoverHighlight",({currentValue:e})=>{e||this.clearMouseOver()})}setMouseOver(e){this.updateState(e)}clearMouseOver(){this.updateState(null)}isHovered(e){if(!this.gos.get("columnHoverHighlight"))return!1;const t=this.selectedColumns;return!!t&&t.indexOf(e)>=0}addHeaderColumnHoverListener(e,t,o){const i=()=>{const s=this.isHovered(o);t.toggleCss("ag-column-hover",s)};e.addManagedEventListeners({columnHoverChanged:i}),i()}onCellColumnHover(e,t){if(!t)return;const o=this.isHovered(e);t.toggleCss(gy,o)}addHeaderFilterColumnHoverListener(e,t,o,i){this.createHoverFeature(e,[o],i);const s=()=>{const n=this.isHovered(o);t.toggleCss("ag-column-hover",n)};e.addManagedEventListeners({columnHoverChanged:s}),s()}createHoverFeature(e,t,o){e.createManagedBean(new hy(t,o))}updateState(e){this.selectedColumns=e,this.eventSvc.dispatchEvent({type:"columnHoverChanged"})}},fy={moduleName:"ColumnHover",version:G,beans:[py],apiFunctions:{isColumnHovered:uy}},Cy=class extends x{constructor(){super(...arguments),this.beanName="apiEventSvc",this.syncListeners=new Map,this.asyncListeners=new Map,this.syncGlobalListeners=new Set,this.globalListenerPairs=new Map}postConstruct(){var e,t;this.wrapSvc=(t=(e=this.beans.frameworkOverrides).createGlobalEventListenerWrapper)==null?void 0:t.call(e)}addEventListener(e,t){var n;const o=((n=this.wrapSvc)==null?void 0:n.wrap(e,t))??t,i=!ho.has(e),s=i?this.asyncListeners:this.syncListeners;s.has(e)||s.set(e,new Set),s.get(e).add(o),this.eventSvc.addEventListener(e,o,i)}removeEventListener(e,t){var n,r;const o=((n=this.wrapSvc)==null?void 0:n.unwrap(e,t))??t,i=this.asyncListeners.get(e),s=!!(i!=null&&i.delete(o));s||(r=this.syncListeners.get(e))==null||r.delete(o),this.eventSvc.removeEventListener(e,o,s)}addGlobalListener(e){var n;const t=((n=this.wrapSvc)==null?void 0:n.wrapGlobal(e))??e,o=(r,l)=>{ho.has(r)&&t(r,l)},i=(r,l)=>{ho.has(r)||t(r,l)};this.globalListenerPairs.set(e,{syncListener:o,asyncListener:i});const s=this.eventSvc;s.addGlobalListener(o,!1),s.addGlobalListener(i,!0)}removeGlobalListener(e){const{eventSvc:t,wrapSvc:o,globalListenerPairs:i}=this,s=(o==null?void 0:o.unwrapGlobal(e))??e;if(i.has(s)){const{syncListener:r,asyncListener:l}=i.get(s);t.removeGlobalListener(r,!1),t.removeGlobalListener(l,!0),i.delete(e)}else this.syncGlobalListeners.delete(s),t.removeGlobalListener(s,!1)}destroyEventListeners(e,t){e.forEach((o,i)=>{o.forEach(s=>this.eventSvc.removeEventListener(i,s,t)),o.clear()}),e.clear()}destroyGlobalListeners(e,t){e.forEach(o=>this.eventSvc.removeGlobalListener(o,t)),e.clear()}destroy(){super.destroy(),this.destroyEventListeners(this.syncListeners,!1),this.destroyEventListeners(this.asyncListeners,!0),this.destroyGlobalListeners(this.syncGlobalListeners,!1);const{globalListenerPairs:e,eventSvc:t}=this;e.forEach(({syncListener:o,asyncListener:i})=>{t.removeGlobalListener(o,!1),t.removeGlobalListener(i,!0)}),e.clear()}};function my(e,t,o){var i;(i=e.apiEventSvc)==null||i.addEventListener(t,o)}function wy(e,t,o){var i;(i=e.apiEventSvc)==null||i.removeEventListener(t,o)}function vy(e,t){var o;(o=e.apiEventSvc)==null||o.addGlobalListener(t)}function by(e,t){var o;(o=e.apiEventSvc)==null||o.removeGlobalListener(t)}var Sy={moduleName:"EventApi",version:G,apiFunctions:{addEventListener:my,addGlobalListener:vy,removeEventListener:wy,removeGlobalListener:by},beans:[Cy]},yy={moduleName:"Locale",version:G,beans:[Ov]},Ry=class extends x{constructor(){super(...arguments),this.beanName="rowAutoHeight",this.wasEverActive=!1,this._debouncedCalculateRowHeights=ge(this,this.calculateRowHeights.bind(this),1)}requestCheckAutoHeight(){this.wasEverActive&&this._debouncedCalculateRowHeights()}calculateRowHeights(){var l,a,d,c;const{visibleCols:e,rowModel:t,rowSpanSvc:o,pinnedRowModel:i}=this.beans,s=e.autoHeightCols;let n=!1;const r=u=>{var p;const h=u.__autoHeights;let g=_e(this.beans,u).height;for(const f of s){let C=h==null?void 0:h[f.getColId()];const m=o==null?void 0:o.getCellSpan(f,u);if(m){if(m.getLastNode()!==u)continue;if(C=(p=o==null?void 0:o.getCellSpan(f,u))==null?void 0:p.getLastNodeAutoHeight(),!C)return}if(C==null){if(this.colSpanSkipCell(f,u))continue;return}g=Math.max(C,g)}g!==u.rowHeight&&(u.setRowHeight(g),n=!0)};(l=i==null?void 0:i.forEachPinnedRow)==null||l.call(i,"top",r),(a=i==null?void 0:i.forEachPinnedRow)==null||a.call(i,"bottom",r),(d=t.forEachDisplayedNode)==null||d.call(t,r),n&&((c=t.onRowHeightChanged)==null||c.call(t))}setRowAutoHeight(e,t,o){if(e.__autoHeights??(e.__autoHeights={}),t==null){delete e.__autoHeights[o.getId()];return}const i=e.__autoHeights[o.getId()];e.__autoHeights[o.getId()]=t,i!==t&&this.requestCheckAutoHeight()}colSpanSkipCell(e,t){const{colModel:o,colViewport:i,visibleCols:s}=this.beans;if(!o.colSpanActive)return!1;let n=[];switch(e.getPinned()){case"left":n=s.getLeftColsForRow(t);break;case"right":n=s.getRightColsForRow(t);break;case null:n=i.getColsWithinViewport(t);break}return!n.includes(e)}setupCellAutoHeight(e,t,o){if(!e.column.isAutoHeight()||!t)return!1;this.wasEverActive=!0;const i=t.parentElement,{rowNode:s,column:n}=e,r=this.beans,l=c=>{var w;if((w=this.beans.editSvc)!=null&&w.isEditing(e)||!e.isAlive()||!o.isAlive())return;const{paddingTop:u,paddingBottom:h,borderBottomWidth:g,borderTopWidth:p}=Ye(i),f=u+h+g+p,m=t.offsetHeight+f;if(c<5){const b=J(r),v=!b||!b.contains(t),S=m==0;if(v||S){window.setTimeout(()=>l(c+1),0);return}}this.setRowAutoHeight(s,m,n)},a=()=>l(0);a();const d=Ze(r,t,a);return o.addDestroyFunc(()=>{d(),this.setRowAutoHeight(s,void 0,n)}),!0}setAutoHeightActive(e){this.active=e.list.some(t=>t.isVisible()&&t.isAutoHeight())}areRowsMeasured(){if(!this.active)return!0;const e=this.beans.rowRenderer.getAllRowCtrls();let t=null;for(const{rowNode:o}of e)if((!t||this.beans.colModel.colSpanActive)&&(t=this.beans.colViewport.getColsWithinViewport(o).filter(s=>s.isAutoHeight())),t.length!==0){if(!o.__autoHeights)return!1;for(const i of t){const s=o.__autoHeights[i.getColId()];if(!s||o.rowHeight<s)return!1}}return!0}},Ey={moduleName:"RowAutoHeight",version:G,beans:[Ry]};const ct=Symbol("grid-context"),un=e=>{const t=e.getColumnState().filter(i=>i.sort!=null),o={};return t.forEach((i,s)=>o[i.colId]=s),t.sort((i,s)=>{const n=i.sortIndex,r=s.sortIndex;if(n!=null&&r!=null)return n-r;if(n==null&&r==null){const l=o[i.colId],a=o[s.colId];return l>a?1:-1}else return r==null?-1:1}),t},Va=e=>{const t=un(e),o=new Map;return t.forEach((i,s)=>{o.set(i.colId,s)}),o},Na=(e,t)=>Va(e).get(t)??-1,xy=e=>!!e&&(typeof e=="object"||typeof e=="function")&&typeof e.then=="function";class _a{constructor(t,o){R(this,"loading",!1);R(this,"dataGetter");R(this,"cache");R(this,"_api");R(this,"loadingDelay");R(this,"getSorts",()=>un(this.api).map(t=>({colId:t.colId,sort:t.sort})));this.dataGetter=t,this.cache=o}set api(t){this._api=t}get api(){return this._api}destroy(){this.loading=!1}loadData(){const t=this.cache.getRows().map((o,i)=>(o.__setIndex(i),o)).flatMap(o=>o.flat());this.api.setGridOption("rowData",t),this.api.redrawRows(),this.loading=!1}getRows(t){var o,i,s,n,r,l,a,d;if(this.loading||!this._api){(i=(o=t.context)==null?void 0:o.resolve)==null||i.call(o);return}if(this.cache.isFinished&&t.pageNum!==1){(n=(s=t.context)==null?void 0:s.resolve)==null||n.call(s);return}if(this.loading=!0,H.isFunction(this.dataGetter)){const c=this.dataGetter({startRow:t.startRow,endRow:t.endRow,pageNum:t.pageNum,pageSize:t.pageSize,params:t.filterModel,sorts:this.getSorts()});xy(c)&&(this.loadingDelay=setTimeout(()=>{this.api.setGridOption("loading",!0)},500),c.then(u=>{var h,g;t.successCallback(u,u.length),(g=(h=t.context)==null?void 0:h.resolve)==null||g.call(h)}).catch(u=>{var h,g;t.failCallback(),(g=(h=t.context)==null?void 0:h.reject)==null||g.call(h,u)}).finally(()=>{clearTimeout(this.loadingDelay),this.api.setGridOption("loading",!1),this.loadData()})),H.isArray(c)&&(t.successCallback(c,c.length),this.loadData(),(l=(r=t.context)==null?void 0:r.resolve)==null||l.call(r))}else t.successCallback(this.dataGetter,this.dataGetter.length),this.loadData(),(d=(a=t.context)==null?void 0:a.resolve)==null||d.call(a)}}class hn{constructor(t,o,i){R(this,"spanMatrix");R(this,"rootId");R(this,"rowIdToNestingIdx");this.spanMatrix=o,this.rootId=i,this.rowIdToNestingIdx=new Map;for(let s=0;s<t.length;s++)this.rowIdToNestingIdx.set(t[s].id,s)}get(t,o){const i=o.getColId(),s=this.rowIdToNestingIdx.get(t);return s===void 0?0:this.spanMatrix.getCellSpan(this.rootId,s,i)}set(t,o,i){}}class Ot{constructor(t,o,i=[]){R(this,"actualRow");R(this,"id");R(this,"nestingIndexes");this.actualRow=o,this.id=t,this.nestingIndexes=i}delete(){this.actualRow.delete()}redraw(){this.actualRow.redraw()}getActualRow(){return this.actualRow}isCellEditing(t){return this.actualRow.isCellEditing(this.id,t)}startEditing(t){t!==null&&this.actualRow.isEditing()&&(this.actualRow=this.actualRow.stopEditing(!0)),this.actualRow.isEditing(t)||(t==null?this.actualRow.startEditing(!0):this.actualRow.startEditingCell(this.id,t,!0))}getDataIndex(){return this.actualRow.getDataIndex()}getRowSpans(){return this.actualRow.getRowSpans()}isEditing(){return this.actualRow.isEditing()}getValue(t){var o;return(o=this.actualRow.getCell(t,this.getNestingIndexes()))==null?void 0:o.value}getRowSpan(t){return this.actualRow.getRowSpans().get(this.id,t)}getData(){return this.actualRow.getData()}isColumnValueChanged(t,o){return this.actualRow.isEditing()&&this.actualRow.getValue(o,this.getNestingIndexes())!==t}getNestingIndexes(){return this.nestingIndexes}getSignature(){return this.actualRow.getSignature()}getId(){return this.actualRow.getId()}getCell(t){return this.actualRow.getCell(t,this.getNestingIndexes())}isTransient(){return this.actualRow.isTransient()}setData(t){this.actualRow.setData(t)}buildSpan(){this.actualRow.buildSpan()}scrollIntoView(){this.actualRow.scrollIntoView()}match(t){return t.data.getId()===this.actualRow.getId()}getHostObject(t){var r;const o=this.getCell(t.column);if(!o)return{hostObject:this.getData()};if(!o.parent||o.parent.field==="$")return{hostObject:this.getData()};let i=o.isArrayElement()?o.path:o.parent.path;((r=t.colDef)==null?void 0:r.cellDataType)==="array"&&(i=o.path);const s=H.get(this.getData(),i),n=i.endsWith("]")?H.get(this.getData(),i.substring(0,i.lastIndexOf("["))):void 0;return{hostObject:s,hostArray:n}}}class Wa{constructor(t,o,i){R(this,"actualRow");R(this,"idMapper");R(this,"draft");this.actualRow=t,this.idMapper=i,this.draft=E.reactive(H.cloneDeep(o))}getSourceRow(){return this.actualRow}getDataIndex(){return this.actualRow.getDataIndex()}getSignature(){return this.actualRow.signature}getValue(t,o){var i;return(i=this.getCell(t,o))==null?void 0:i.value}getCell(t,o){return this.actualRow.getCell(t,o)}getId(){return this.actualRow.id}getRowSpans(){return this.actualRow.getRowSpans()}match(t){return this.actualRow.match(t)}__setIndex(t){this.actualRow.__setIndex(t)}getData(){return this.draft}getDraft(){return this.draft}setData(t){this.draft=E.reactive(t)}buildSpan(){this.actualRow.update(this.actualRow.id,E.toRaw(this.draft))}flat(){return this.actualRow.leafCells.map(t=>new Ot(t.id,this,t.nestingIndexes))}scrollIntoView(){this.actualRow.scrollIntoView()}_stopEditingImpl(t=!1){const o=E.toRaw(this.draft),i=this.idMapper(o);return this.actualRow.update(i,o),t&&this.redraw(),this.actualRow.dataCache.replace(this.actualRow),this.actualRow}get expand(){return this.actualRow.expand===!0}set expand(t){var o,i;this.actualRow.expand=t===!0,(i=(o=this.actualRow.bridge)==null?void 0:o.refreshModel)==null||i.call(o,{step:"map"})}get detailCardData(){return this.actualRow.detailCardData}set detailCardData(t){this.actualRow.detailCardData=t}isExpanded(){return this.actualRow.isExpanded()}setExpanded(t,o){this.actualRow.setExpanded(t,o)}toggleExpanded(){this.actualRow.toggleExpanded()}isEditing(t){return!!this.draft}isCellEditing(t,o){return!!this.draft}stopEditing(t=!1){return this._stopEditingImpl(t)}}class Fi extends Wa{constructor(o,i,s=!1){super(o,H.cloneDeep(o.data),i);R(this,"transient");this.transient=s}redraw(){this.actualRow.redraw()}delete(){this.actualRow.delete()}isTransient(){return this.transient}async persistent(o){const i=await o(H.cloneDeep(this.draft));return this.actualRow.update(this.idMapper(i),i),this.draft=E.reactive(i),this.transient=!1,this}}class Pi extends Wa{constructor(o,i,s,n){super(o,o.data,n);R(this,"editingColumn");R(this,"rowId");this.rowId=i,this.editingColumn=s}getEditingColumn(){return this.editingColumn}getRowId(){return this.rowId}delete(){throw new Error("CellEditableRow 不允许删除")}redraw(){this.actualRow.redrawCell(this.rowId,this.editingColumn)}isCellEditing(o,i){return!!this.draft&&this.editingColumn.getColId()===i.getColId()&&this.rowId===o}isTransient(){return!1}}class Bt{constructor(t,o,i,s,n){R(this,"id");R(this,"field");R(this,"value");R(this,"index");R(this,"properties",new Map);R(this,"parent");R(this,"spanRow",1);R(this,"path");this.id=t,this.field=o,this.value=i,this.index=s,this.parent=n,this.path=this.getReadPath()}getRoot(){let t=this.parent;for(;;){if(t.field==="$")return t;t=t==null?void 0:t.parent}}pretreatmentValue(t,o,i){const s=this.properties.get(t);if(s)return s;const n=H.get(this.value,t);let r;if(H.isArray(n)&&i.cellDataType!=="native"){r=new Array(n.length);for(let l=0;l<n.length;l++)r[l]=new Bt(`${this.id}_${l}`,t,n[l],l,o)}else r=new Bt(this.id,t,n,void 0,o);return this.properties.set(t,r),r}isNeedSpan(){return Array.from(this.properties.values()).some(t=>H.isArray(t))}get(t){return this.properties.get(t)}calcSpan(){if(this.isNeedSpan()){let t=1,o=!1;for(const i of this.properties.values())if(H.isArray(i)){o=!0;let s=0;for(const n of i)s+=n.calcSpan();t=Math.max(t,s)}if(o&&t>1)for(const i of this.properties.values())H.isArray(i)||i.setRowSpan(t);return this.spanRow=t,this.spanRow}return this.spanRow}setRowSpan(t){this.spanRow=t;for(const o of this.properties.values())H.isArray(o)||o.setRowSpan(this.spanRow)}getPath(){const t=[];let o=this;for(;o;)t.push(o.field),o=o.parent;return t.reverse().slice(1).join(".")}getReadPath(){const t=[];let o=this;for(;o;)t.push(`${o.field}${H.isNumber(o.index)?`[${o.index}]`:""}`),o=o.parent;return t.reverse().slice(1).join(".")}isArrayElement(){return this.path.endsWith("]")}}class za{constructor(){R(this,"trees",new Map);R(this,"arrayParents",new Map);R(this,"cellSpanCaches",new Map);R(this,"columns",new Map);R(this,"dirtyRoots",new Set)}setRow(t,o,i){this.columns.clear();for(const c of i.columns)this.columns.set(c.colId,c);const s=this._computeExpandPaths(o,i.columns),n=new Map;this.arrayParents.set(t,n);const r=this.buildTree(t,o,n,s);this.computeSpans(r),this.trees.set(t,r);const l=new Map,a=new Set,d=this.collectLeaves(r);for(const c of d)this._walkUpAndRecord(c,l,a,t);if(d.length>0){const c=new Set;for(const g of d)for(const p of l.keys())if(p.startsWith(`${g.id}|`)){const f=p.substring(g.id.length+1);c.add(f)}const u=d[0],h=r.spanRow;for(const g of this.columns.keys())c.has(g)||l.set(`${u.id}|${g}`,h)}this.cellSpanCaches.set(t,l),this.dirtyRoots.add(t)}_computeExpandPaths(t,o){const i=new Set;for(const s of o){const n=s.colId.split(".");let r=t,l="";const a=s.cellDataType==="native"&&r!=null&&Array.isArray(r[n[0]]);for(let d=0;d<n.length&&r!=null;d++){const c=n[d];l=l?`${l}.${c}`:c;const u=r[c];if(Array.isArray(u)){if(d===0&&a)break;i.add(l),r=u[0]}else r=u}}return i}setArrayLength(t,o,i){var g,p;const s=this.trees.get(t);if(!s)return;const n=(g=this.arrayParents.get(t))==null?void 0:g.get(o);if(!n){this.dirtyRoots.add(t);return}const r=n.children.filter(f=>f.isArrayElement&&f.path===o),l=r.length,a=((p=r[0])==null?void 0:p.field)??o.split(".").pop();if(l===i){this.dirtyRoots.add(t);return}if(i<l)n.children=n.children.filter(f=>!(f.isArrayElement&&f.path===o)||f.index<i);else{n.children=n.children.filter(f=>!(f.path===o&&Array.isArray(f.value)&&f.value.length===0));for(let f=l;f<i;f++){const C=n.children.filter(w=>w.isArrayElement&&w.path===o),m=C.length>0?C[0].nestingIndexes.slice(0,-1):n.nestingIndexes;n.children.push({id:`${n.id}_${a}_${f}`,field:a,value:void 0,index:f,isArrayElement:!0,parent:n,children:[],spanRow:1,path:o,readPath:`${o}[${f}]`,nestingIndexes:[...m,f]})}}let d=n;for(;d;)this.computeSpans(d),d=d.parent;const c=new Map,u=new Set,h=this.collectLeaves(s);for(const f of h)this._walkUpAndRecord(f,c,u,t);if(h.length>0){const f=new Set;for(const w of h)for(const b of c.keys())if(b.startsWith(`${w.id}|`)){const v=b.substring(w.id.length+1);f.add(v)}const C=h[0],m=s.spanRow;for(const w of this.columns.keys())f.has(w)||c.set(`${C.id}|${w}`,m)}this.cellSpanCaches.set(t,c),this.dirtyRoots.add(t)}getCellSpan(t,o,i){if(!this.columns.has(i))return 0;const s=this.cellSpanCaches.get(t);if(!s)return 0;const n=this.trees.get(t);if(!n)return 0;const r=this.collectLeaves(n);if(o<0||o>=r.length)return 0;const l=r[o];return s.get(`${l.id}|${i}`)??0}getCellPath(t,o){if(!this.columns.has(t))return null;const i=this.firstArrayPaths();if(!i)return null;const s=t.split("."),n=[];let r=0;for(let l=0;l<s.length;l++){let a=s[l];if(l<s.length-1){const d=s.slice(0,l+1).join(".");i.has(d)&&r<o.length&&(a+=`[${o[r]}]`,r++)}n.push(a)}return n.join(".")}getMaxArrayLength(t){const o=this.trees.get(t);return o?o.spanRow:1}getLeaves(t){const o=this.trees.get(t);return o?this.collectLeaves(o):[]}getDirtyRoots(){return this.dirtyRoots}clearDirty(){this.dirtyRoots.clear()}buildTree(t,o,i,s){const n={id:t,field:"$",value:o,isArrayElement:!1,children:[],spanRow:1,path:"",readPath:"",nestingIndexes:[]};return this.expandChildren(n,o,i,s),n}expandChildren(t,o,i,s){if(Array.isArray(o)){if(s.has(t.path)){i.set(t.path,t);for(let n=0;n<o.length;n++){const r=this.createNode(`${t.id}_${t.field}_${n}`,t.field,o[n],n,t,t.path,[...t.nestingIndexes,n]);t.children.push(r),this.expandChildren(r,o[n],i,s)}}else{const n=this.createNode(t.id,t.field,o,void 0,t,t.path,t.nestingIndexes);t.children.push(n)}return}if(this.isPlainObject(o))for(const[n,r]of Object.entries(o)){const l=t.path?`${t.path}.${n}`:n;if(Array.isArray(r))if(s.has(l)){i.set(l,t);for(let a=0;a<r.length;a++){const d=this.createNode(`${t.id}_${n}_${a}`,n,r[a],a,t,l,[...t.nestingIndexes,a]);t.children.push(d),this.expandChildren(d,r[a],i,s)}if(r.length===0){const a=this.createNode(`${t.id}_${n}_empty`,n,r,void 0,t,l,t.nestingIndexes);t.children.push(a)}}else{const a=this.createNode(t.id,n,r,void 0,t,l,t.nestingIndexes);t.children.push(a)}else{const a=this.createNode(t.id,n,r,void 0,t,l,t.nestingIndexes);t.children.push(a),this.expandChildren(a,r,i,s)}}}createNode(t,o,i,s,n,r,l){return{id:t,field:o,value:i,index:s,isArrayElement:s!==void 0,parent:n,children:[],spanRow:1,path:r,readPath:s!==void 0?`${r}[${s}]`:r,nestingIndexes:l}}isPlainObject(t){return t!=null&&typeof t=="object"&&!Array.isArray(t)}computeSpans(t){if(t.children.length===0)return t.spanRow=1,1;const o=[],i=[];for(const s of t.children)this.computeSpans(s),s.isArrayElement?o.push(s):i.push(s);if(o.length>0){const s=new Map;for(const r of o){const l=r.path;s.set(l,(s.get(l)??0)+r.spanRow)}let n=1;for(const r of s.values())r>n&&(n=r);if(t.spanRow=n,n>1)for(const r of i)this.propagateSpan(r,n)}else{let s=1;for(const n of i)n.spanRow>s&&(s=n.spanRow);t.spanRow=s}return t.spanRow}propagateSpan(t,o){t.spanRow=o;for(const i of t.children)i.isArrayElement||this.propagateSpan(i,o)}collectLeaves(t){const o=[];return this._collectLeaves(t,o),o.length===0&&o.push(t),o}_collectLeaves(t,o){for(const i of t.children)i.isArrayElement?this._hasArrayDescendant(i)?this._collectLeaves(i,o):o.push(i):this._collectLeaves(i,o)}_hasArrayDescendant(t){for(const o of t.children)if(o.isArrayElement||this._hasArrayDescendant(o))return!0;return!1}findSpanByPath(t,o){let i=t;for(;i;){if(i.path===o)return i.spanRow;const s=this.searchInNonArrayChildren(i,o);if(s!==null)return s;i=i.parent}return 0}searchInNonArrayChildren(t,o){for(const i of t.children){if(i.isArrayElement)continue;if(i.path===o)return i.spanRow;const s=this.searchInNonArrayChildren(i,o);if(s!==null)return s}return null}_walkUpAndRecord(t,o,i,s){let n=t;for(;n;){if(i.has(n))return;i.add(n),Array.from(this.columns.keys()),o.set(`${t.id}|${n.path}`,n.spanRow);for(const r of n.children)r.isArrayElement?Array.isArray(r.value)&&r.value.length===0&&this._recordEmptyArrayColumns(t,n,r.field,o):(o.set(`${t.id}|${r.path}`,r.spanRow),this._processDeep(t,r,o,i),Array.isArray(r.value)&&r.value.length===0&&this._recordEmptyArrayColumns(t,n,r.field,o));n=n.parent}}_processDeep(t,o,i,s){if(!s.has(o)){s.add(o);for(const n of o.children)n.isArrayElement||(i.set(`${t.id}|${n.path}`,n.spanRow),this._processDeep(t,n,i,s))}}_recordEmptyArrayColumns(t,o,i,s){const n=o.path?`${o.path}.${i}`:i;for(const r of this.columns.keys())r.startsWith(n)&&s.set(`${t.id}|${r}`,o.spanRow)}_collectArrayPaths(t,o){for(const i of t.children)i.isArrayElement&&o.add(i.path),this._collectArrayPaths(i,o)}collectArrayPaths(t){const o=new Set;return this._collectArrayPaths(t,o),o}firstArrayPaths(){const t=this.trees.values().next().value;return t?this.collectArrayPaths(t):null}}class Dy{constructor(t,o,i){R(this,"id");R(this,"rootValue");R(this,"spanMatrix");R(this,"leafCells");R(this,"columns");R(this,"data");this.id=t,this.data=o,this.columns=i,this.rootValue=new Bt(this.id,"$",this.data),this._buildPathCells(i),this.rootValue.calcSpan(),this.spanMatrix=new za,this.spanMatrix.setRow(this.id,this.data,{columns:i}),this.leafCells=this.spanMatrix.getLeaves(this.id)}_buildPathCells(t){for(const o of t){const i=o.colId.split(".");let s=this.rootValue;for(let n=0;n<i.length;n++){const r=i[n];if(!H.isArray(s))s=s.pretreatmentValue(r,s,o);else{const l=[];for(const a of s){const d=a.pretreatmentValue(r,a,o);H.isArray(d)?l.push(...d):l.push(d)}s=l}}}}getMaxArrayLength(){return this.spanMatrix.getMaxArrayLength(this.id)}getCell(t,o){const i=t.getColId().split(".");let s=this.rootValue.properties.get(i.shift());if(!s)return;let n=0;H.isArray(s)&&(s=s[o[n]],n++);let r=s;for(const l of i){if(!r)break;if(!H.isArray(r)){const a=r.get(l);H.isArray(a)?(r=a[o[n]],n=n+1):r=a}}return r}getValue(t,o){const i=this.getCell(t,o);if(i)return H.get(this.data,i.path)}setArrayLength(t,o){this.spanMatrix.setArrayLength(this.id,t,o),this.leafCells=this.spanMatrix.getLeaves(this.id)}rebuild(t,o){const i=o??this.columns;this.data=t,this.spanMatrix.setRow(this.id,t,{columns:i}),this.leafCells=this.spanMatrix.getLeaves(this.id);const s=new Bt(this.id,"$",t);for(const n of i){const r=n.colId.split(".");let l=s;for(let a=0;a<r.length;a++){const d=r[a];if(!H.isArray(l))l=l.pretreatmentValue(d,l,n);else{const c=[];for(const u of l){const h=u.pretreatmentValue(d,u,n);H.isArray(h)?c.push(...h):c.push(h)}l=c}}}s.calcSpan(),this.rootValue=s,o&&(this.columns=i)}getSpanMatrix(){return this.spanMatrix}}class mo{constructor(t,o,i,s,n,r){R(this,"id");R(this,"data");R(this,"signature");R(this,"dataModel");R(this,"spanCache");R(this,"columns");R(this,"bridge");R(this,"idMapper");R(this,"dataCache");R(this,"index");R(this,"expand",!1);R(this,"detailCardData",null);this.index=r,this.dataCache=s,this.idMapper=i,this.columns=o,this.bridge=n,this.id=i(t),this.data=t,this.signature=Oe(JSON.stringify(t)),this.buildSpan()}get pathCells(){return this.dataModel.rootValue.properties}get leafCells(){return this.dataModel.leafCells}get spanMatrix(){return this.dataModel.spanMatrix}buildSpan(){this.dataModel=new Dy(this.id,this.data,this.columns),this.spanCache=new hn(this.dataModel.leafCells,this.dataModel.spanMatrix,this.id)}getMaxArrayLength(){return this.dataModel.getMaxArrayLength()}getCell(t,o){return this.dataModel.getCell(t,o)}getValue(t,o){return this.dataModel.getValue(t,o)}getSpanMatrix(){return this.dataModel.getSpanMatrix()}setArrayLength(t,o){this.dataModel.setArrayLength(t,o)}delete(){this.dataCache.remove([this])}redraw(){var t;(t=this.bridge)==null||t.redraw(this)}redrawCell(t,o){var i;(i=this.bridge)==null||i.redrawCell(this,t,o)}getSourceRow(){return this}isExpanded(){return this.expand===!0}setExpanded(t,o){var s,n;const i=t===!0;this.expand!==i&&(this.expand=i,(n=(s=this.bridge)==null?void 0:s.refreshModel)==null||n.call(s,{step:"map"}))}toggleExpanded(){this.setExpanded(!this.expand)}getDataIndex(){if(this.index===void 0)throw new Error(`row[${this.id}] not ready`);return this.index}getRowSpans(){return this.spanCache}isCellEditing(t,o){return!1}getSignature(){return this.signature}startEditing(t=!1){const o=new Fi(this,this.idMapper,!1);return this.dataCache.replace(o),t&&this.redraw(),o}startEditingCell(t,o,i=!1){const s=new Pi(this,t,o,this.idMapper);return this.dataCache.replace(s),i&&this.redrawCell(t,o),s}__setIndex(t){this.index=t}update(t,o){this.id=t,this.data=o,this.signature=Oe(JSON.stringify(o)),this.dataModel.rebuild(o),this.spanCache=new hn(this.dataModel.leafCells,this.dataModel.spanMatrix,this.id)}isTransient(){return!1}getId(){return this.id}isEditing(){return!1}getData(){return this.data}scrollIntoView(){var o;const t=this.leafCells[this.leafCells.length-1];t&&((o=this.bridge)==null||o.ensureNodeVisible(t.id))}flat(){return this.dataModel.leafCells.map(t=>new Ot(t.id,this,t.nestingIndexes))}setData(t){this.update(this.idMapper(t),t)}match(t){return this.getId()===t.data.getId()}}class $a{constructor(t){R(this,"rows");R(this,"pageNum",1);R(this,"pageSize",100);R(this,"isFinished",!1);R(this,"idMapper");R(this,"idMap",new Map);R(this,"bridge");this.rows=[],this.idMapper=t}createRow(t){var o;return new mo(t,((o=this.bridge)==null?void 0:o.getColumns())??[],this.idMapper,this,this.bridge)}rebuildIdMap(){this.idMap.clear(),this.rows.forEach((t,o)=>this.idMap.set(t.getId(),o))}setRows(t){return this.rows=t,this.rebuildIdMap(),this}replace(t){this.rows[t.getDataIndex()]=t,this.rebuildIdMap()}remove(t){var i;const o=new Set(t.map(s=>s.getId()));this.rows=this.rows.filter(s=>!o.has(s.getId())),this.rebuildIdMap(),(i=this.bridge)==null||i.reload()}getRows(){return this.rows??[]}appendRows(t){if(!this.rows){this.setRows(t);return}for(const o of t){const i=o.getId(),s=this.idMap.get(i);s!==void 0?(this.rows[s]=o,this.idMap.set(i,s)):(this.rows.push(o),this.idMap.set(i,this.rows.length-1))}}insertRows(t,o=0){if(!this.rows){this.setRows(t);return}const i=new Set(t.map(s=>s.getId()));this.rows=this.rows.filter(s=>!i.has(s.getId())),this.rows.splice(o,0,...t),this.rebuildIdMap()}deleteRows(t){const o=new Set(t.map(i=>H.isString(i)?i:i.getId()));this.rows=this.rows.filter(i=>!o.has(i.getId())),this.rebuildIdMap()}}const Ua={getContextMenuItems:void 0},Fy=e=>e instanceof mo||e instanceof Ot?!0:e instanceof Fi,Py=e=>e instanceof mo,Ti="_",Ka=1;class ja{static createRowNode(t,o,i={}){return{...t,__id:o(t),...i}}static generateId(t){if(t.length===0)throw new Error("传入标识数组为空无法生成ID");return t.join(Ti)}static getId(t){return t.__id?t.__id.split(Ti)[0]:t.id}static getSignature(t){return t.__signature}static getFlatIndex(t,o=Ka){if(!t.__id)throw new Error("不包含有效的ID信息");const i=t.__id.split(Ti);if(i.length===1)throw new Error(`${i} 不包含索引信息`);const s=i[o];if(!s)throw new Error(`${i} deep[${o}] 不包含索引信息`);const n=Number.parseInt(s);if(!Number.isFinite(n))throw new TypeError(`${s} 不是一个正确的数组索引`);return n}static ValueGetter(t){return console.warn("deprecated GridUtils.ValueGetter 现在只需要正常使用valueGetter了"),o=>{if(!(o.data.id&&typeof o.data.id=="string"&&o.data.id.includes("footer-")))return t(o)}}static spanRow(t,o,i){const s=t[o];return!s||s.length===0?t:s.map((n,r)=>({...t,__id:`${i??t.id}_${r}`,rowSpan:r===0?s.length:0}))}static isGroupColDef(t){return!!t.children}}const qa=(e,t,o,i,s)=>{const n=E.ref(t),r=E.ref(),l=E.ref(!1),a=(g,p)=>{if(n.value)return n.value;const f=p??[];if(!g){const w=Oe(f.join(","));return n.value=w,w}const C=e.getInstanceName(g);C&&f.push(C);const m=e.getParentInstance(g);return a(m,f)},d=g=>{const p=localStorage.getItem(g);if(!(!p||p==="undefined"))return JSON.parse(p)},c=H.debounce(()=>{const g=a(s);localStorage.setItem(g,JSON.stringify(o.value.getColumnState()))},200),u=async()=>{const g=a(s),p=d(g);if(p&&p.length>0){const f=p.filter(C=>{var m;return!((m=C.colId)!=null&&m.includes("ag-Grid-SelectionColumn"))});o.value.applyColumnState({state:f,applyOrder:!0}),l.value=!0}},h=()=>H.sumBy(o.value.getAllDisplayedVirtualColumns().map(g=>g.getActualWidth()));return{storeGridState:c,restoreGridState:u,resetGridState:()=>{o.value.applyColumnState({state:r.value,applyOrder:!0})},initGridState:()=>{const g=a(s);if(r.value=o.value.getColumnState(),!localStorage.getItem(`${g}-initial`)){const p=h();i.value>p&&o.value.sizeColumnsToFit()}},isStateInitialized:l}},wo=e=>{if(e.id)return`${e.id}`.split("_")[0]},Ya=e=>{const{options:t,elRef:o,editable:i,onRowChange:s,onMessageError:n,findOtherEditingCell:r,isCellEditable:l}=e;let a;const d=h=>{o.value&&o.value.querySelectorAll(`.row_${h}`).forEach(g=>{g.classList.add("row-hover")})},c=h=>{o.value&&o.value.querySelectorAll(`.row_${h}`).forEach(g=>{g.classList.remove("row-hover")})},u=(h,g)=>{var C;if(!h||!o.value)return!1;const p=h;if(!p||typeof p.contains!="function")return!1;const f=o.value.querySelectorAll(`.row_${g}`);for(let m=0;m<f.length;m++){const w=f[m];if(w===p||(C=w.contains)!=null&&C.call(w,p))return!0}return!1};return{...t,onCellMouseOver(h){var p,f,C;const g=wo(h.node);if(!g){(p=t.onCellMouseOver)==null||p.call(t,h);return}u((f=h.event)==null?void 0:f.relatedTarget,g)||(a&&a!==g&&c(a),a=g,d(g),(C=t.onCellMouseOver)==null||C.call(t,h))},onCellMouseOut(h){var p;const g=wo(h.node);g&&(u((p=h.event)==null?void 0:p.relatedTarget,g)||a===g&&(c(g),a=void 0))},onCellClicked(h){if(i==="cell"&&h.data instanceof Ot){if(l&&!l(h.column,h.node))return;const g=h.data.getActualRow(),p=r==null?void 0:r(h.node.id);if(g instanceof Pi){const f=g.getEditingColumn(),C=g.getRowId();if(s==null)throw new Error("可编辑单元格必须配置保存能力");if(f.getId()==h.column.getId()&&C===h.node.id)return;s(g).then(()=>{g.stopEditing(!0);const m=g.getSourceRow();m.setData(g.getData()),m.startEditingCell(h.node.id,h.column,!0)}).catch(m=>{n==null||n(`单元格[${h.column.getColDef().headerName}]保存失败: `+m.message)})}else if(g instanceof mo)if(p){if(s==null)throw new Error("可编辑单元格必须配置保存能力");s(p).then(()=>{p.stopEditing(!0),p.getSourceRow().setData(p.getData()),g.startEditingCell(h.node.id,h.column,!0)}).catch(f=>{n==null||n(`单元格[${h.column.getColDef().headerName}]保存失败: `+f.message)})}else g.startEditingCell(h.node.id,h.column,!0)}},onRowSelected(h){var C;const g=wo(h.node),p=h.api.getRenderedNodes().filter(m=>wo(m)===g),f=h.node.isSelected();p.forEach(m=>{m.setSelected(!!f,!1,"api")}),(C=t==null?void 0:t.onRowSelected)==null||C.call(t,h)},getRowClass(h){var m,w;const g=(m=t==null?void 0:t.getRowClass)==null?void 0:m.call(t,h),p=[];g&&(H.isArray(g)?p.push(...g):p.push(g)),p.push(`row_${wo(h.node)}`);const f=h.node.data,C=((w=(f==null?void 0:f.actualRow)??f)==null?void 0:w.index)??h.node.rowIndex??0;return p.push(`row-zebra-${C%2}`),p},onRowDoubleClicked(h){i==="row"&&(h.data.isEditing()||h.data.startEditing())}}},Za={"cell-span":({data:e,column:t})=>e.getRowSpan(t)>0,"cell-span-hide":({data:e,column:t})=>e.getRowSpan(t)===0},Qa={"cell-span":({data:e,column:t})=>e.getRowSpan(t)>0,"cell-span-hide":({data:e,column:t})=>e.getRowSpan(t)===0},gn=(e,t)=>({...e,...t??{}});class Vt{constructor(t,o,i,s=[],n){R(this,"context");R(this,"endRow");R(this,"filterModel");R(this,"sortModel");R(this,"startRow");R(this,"dataCache");R(this,"pageNum");R(this,"pageSize");R(this,"onError");R(this,"onFirstPageLoaded");this.pageNum=t,this.pageSize=o,this.sortModel=s,this.startRow=(t-1)*o,this.endRow=this.startRow+this.pageSize,this.dataCache=i,this.onError=n}static from(t,o,i,s){const n=o??i.pageSize;return new Vt(t,n,i,[],s)}static nextPage(t,o){return new Vt(t.pageNum+1,t.pageSize,t,[],o)}failCallback(){var t;(t=this.onError)==null||t.call(this,"表格数据加载失败,请重试")}successCallback(t){var o;(H.isEmpty(t)||t.length<this.pageSize)&&(this.dataCache.isFinished=!0),this.pageNum===1?this.dataCache.setRows((t??[]).map(i=>this.dataCache.createRow(i))):this.dataCache.appendRows((t??[]).map(i=>this.dataCache.createRow(i))),this.dataCache.pageNum=this.pageNum,this.pageNum===1&&((o=this.onFirstPageLoaded)==null||o.call(this,t??[]))}}const Xa=e=>{const t=s=>{const n=s.getLastDisplayedRowIndex();return s.getDisplayedRowCount()-1===n},o=({direction:s,api:n})=>{s==="vertical"&&t(n)&&i()},i=()=>{var s;(s=e==null?void 0:e.onVScrollEnd)==null||s.call(e)};return{onBodyScrollEnd:o}};class Ty{constructor(t){R(this,"gridApi");this.gridApi=t}reload(){this.gridApi.getGridOption("context").reload()}redraw(t){const o=this.gridApi.getRenderedNodes().filter(i=>{var s;return((s=i.data)==null?void 0:s.getId())===t.getId()});this.gridApi.getGridOption("context").reload(),this.gridApi.redrawRows({rowNodes:o})}redrawCell(t,o,i){const s=this.gridApi.getRenderedNodes().filter(n=>{var r;return((r=n.data)==null?void 0:r.getId())===o});this.gridApi.getGridOption("context").reload(),this.gridApi.refreshCells({rowNodes:s,columns:[i],force:!0,suppressFlash:!0})}ensureNodeVisible(t){const o=this.gridApi.getRowNode(t);o&&this.gridApi.ensureNodeVisible(o)}refreshModel(t){var i,s,n,r;const o=this.gridApi.getGridOption("rowModelType")==="clientSide"?this.gridApi.rowModel:null;o!=null&&o.refreshModel?o.refreshModel(t):t.step==="everything"?(s=(i=this.gridApi).refreshClientSideRowModel)==null||s.call(i):(r=(n=this.gridApi).refreshClientSideRowModel)==null||r.call(n,{step:"map"})}getColumns(){return this.gridApi.getAllGridColumns().map(t=>{var i,s;const o=(s=(i=t.getColDef)==null?void 0:i.call(t))==null?void 0:s.cellDataType;return{colId:t.getColId(),cellDataType:typeof o=="string"?o:void 0}})}}const Ja=(e,t)=>{if(t.length===0)return[];const o=new Set(t),i=[];return e.forEachNode(s=>{const n=s.data;n&&typeof n.getId=="function"&&o.has(n.getId())&&i.push(s)}),i},Iy=(e,t,o)=>{!e||t.length===0||e.setNodesSelected({nodes:Ja(e,t),newValue:!0,source:o})},Ay=(e,t,o)=>{!e||t.length===0||e.setNodesSelected({nodes:Ja(e,t),newValue:!1,source:o})},My=e=>{if(!e)return[];const t=new Set,o=[];return e.forEachNode(i=>{if(!i.isSelected()||!i.data)return;const s=i.data,n=s!=null&&s.getActualRow?s.getActualRow():i.data;t.has(n)||(t.add(n),o.push(n))}),o},ed=(e,t)=>{var P;const o=E.ref(),i=E.ref(),s=E.ref({height:`calc(100% - ${e.footerHeight??0}px)`,width:"100%"}),n=new Set(["columnSizing","columnVisibility","columnPinning","columnOrder"]),r=E.ref(0),l=E.ref(),{onBodyScrollEnd:a}=Xa({onVScrollEnd(){u.value.getRows(Vt.nextPage(c.value,e.onError))}}),d=({data:T})=>T.id,c=E.ref(new $a(e.rowIdMapper)),u=E.ref(new _a(e.rowData,c.value)),{initGridState:h,resetGridState:g,storeGridState:p,restoreGridState:f}=qa(e.instanceCtx,e.id,o,l,e.currentInstance),C=async T=>{D(),c.value.pageSize=e.pageSize,c.value.bridge=new Ty(T.api),u.value.api=T.api,T.api.getAllGridColumns(),o.value=T.api,h(),await f(),await I(),T.api.setGridOption("popupParent",document.querySelector("body"))},m=()=>{u.value.loadData()},w=async(T,V=0)=>{c.value.insertRows(T,V),m()},b=T=>c.value.getRows().some(V=>V.getId()===T.getId()),v=()=>c.value.getRows(),S=()=>{var z,de;const T=i.value.querySelector(".ag-body-viewport"),V=Number.parseFloat(T.querySelector(".ag-center-cols-container").style.height),B=i.value.querySelector(".ag-header").offsetHeight,W=(de=(z=i.value.querySelector(".ag-overlay-no-rows-wrapper"))==null?void 0:z.querySelector(".el-empty"))==null?void 0:de.offsetHeight;V<r.value?s.value.height=`${B+(W||V)+(e.footerHeight?2:11)}px`:s.value.height.includes("100%")||(s.value.height=`calc(100% - ${e.footerHeight??0}px)`)},D=()=>{const T=i.value.querySelector(".ag-body-viewport");l.value=T.offsetWidth,r.value=T.offsetHeight},I=()=>new Promise((T,V)=>{c.value.isFinished=!1;const B=Vt.from(1,c.value.pageSize,c.value,e.onError);B.onFirstPageLoaded=W=>{E.nextTick(()=>{var z;return(z=e.onFirstPageLoaded)==null?void 0:z.call(e,W)})},B.context={resolve:T,reject:V},u.value.getRows(B),u.value.api.getDisplayedRowCount()>0&&u.value.api.ensureIndexVisible(0)}),O=E.computed(()=>{var T,V;return{onGridReady:C,onBodyScrollEnd:a,scrollbarWidth:8,getRowId:d,columnDefs:e.columns,preventDefaultOnContextMenu:!0,suppressRowTransform:!0,suppressRowHoverHighlight:!0,selectionColumnDef:{pinned:"left",rowSpan:({data:B,column:W})=>B.getRowSpan(W),cellClassRules:gn(Za,(T=e.gridOptions)==null?void 0:T.rowClassRules)},defaultColGroupDef:{marryChildren:!0},onStateUpdated(B){B.sources.some(W=>n.has(W))&&p()},onSortChanged(B){B.source==="uiColumnSorted"&&p()},context:{refresh:I,reload:m},onRowDataUpdated(){E.nextTick(()=>{S()})},defaultColDef:{rowSpan({column:B,data:W}){return W.getRowSpan(B)},cellClassRules:gn(Qa,(V=e.gridOptions)==null?void 0:V.rowClassRules),suppressFloatingFilterButton:!0,enableCellChangeFlash:!0,tooltipValueGetter(B){return B.valueFormatted},resizable:!0,sortable:!1,headerComponent:"HeaderRenderer",cellRenderer:"CellRenderer",valueGetter({column:B,data:W}){return W.getValue(B)},valueFormatter({value:B}){return B}},...Ya({options:e.gridOptions??{},elRef:i,editable:e.editable,onRowChange:e.onRowChange,onMessageError:e.onError,findOtherEditingCell:B=>c.value.getRows().find(W=>W instanceof Pi&&W.getRowId()!==B),isCellEditable:(B,W)=>{var de;const z=(de=B.getColDef)==null?void 0:de.call(B);return typeof(z==null?void 0:z.editable)=="function"?z.editable({column:B,colDef:z,node:W,data:W.data}):(z==null?void 0:z.editable)!==!1}}),onBodyScroll(B){F.left=B.left,F.top=B.top},...Ua}}),F={left:0,top:0};return(P=t==null?void 0:t.onActivated)==null||P.call(t,()=>{}),{gridOptions:O,datasource:u,gridStyles:s,dataCache:c,gridApi:o,gridElRef:i,resetGridState:g,reload:m,insertRows:w,existRow:b,getRows:v,refresh:I,selectByIds:(T,V)=>Iy(o.value,T,V),deselectByIds:(T,V)=>Ay(o.value,T,V),getSelectedRows:()=>My(o.value)}},td=(e,t,o)=>{const i=E.ref(),s=E.ref([{}]),n=E.computed(()=>e.footerHeight?{height:`${e.footerHeight+10}px`}:{});E.watch(()=>[s.value,i.value],()=>{var d;s.value&&i.value&&((d=i.value)==null||d.setGridOption("rowData",s.value.map((c,u)=>({id:`footer-${u}`,...c}))))});const r=d=>!!d.children,l=d=>{var c;return r(d)?{headerName:d.headerName,groupId:d.groupId,children:[...d.children.map(u=>l(u))]}:{width:d.width,headerName:d.headerName,field:d.field,cellRendererParams:{render:(c=d.cellRendererParams)==null?void 0:c.footerRender}}},a=E.computed(()=>{var d;return{scrollbarWidth:8,suppressRowTransform:!0,suppressRowHoverHighlight:!0,columnDefs:e.columns.map(c=>l(c)),defaultColGroupDef:{marryChildren:!0},rowSelection:(d=e.gridOptions)!=null&&d.rowSelection?{mode:"singleRow",isRowSelectable:()=>!1,hideDisabledCheckboxes:!0}:void 0,rowHeight:e.footerHeight,headerHeight:0,alwaysShowVerticalScroll:o.value.height.includes("100%"),defaultColDef:{suppressFloatingFilterButton:!0,cellRenderer:"FooterCellRender",enableCellChangeFlash:!0,tooltipValueGetter(c){return c.value}},onGridReady(c){i.value=c.api,c.api.setGridOption("popupParent",document.querySelector("body"))},alignedGrids:()=>{const c=t.value;if(!c)return[];const u=c.api??(typeof c.addEventListener=="function"?c:void 0);return u?[u]:[]}}});return{setFooterData:d=>{s.value=d},footerGridApi:i,footerData:s,footerStyles:n,footerGridOptions:a}};class ky extends x{constructor(){super(...arguments);R(this,"beanName","selectionColSvc");R(this,"columns")}postConstruct(){this.addManagedPropertyListener("rowSelection",o=>{this.onSelectionOptionsChanged(o.currentValue,o.previousValue,St(o.source))}),this.addManagedPropertyListener("selectionColumnDef",this.updateColumns.bind(this))}addColumns(o){const i=this.columns;i!=null&&(o.list=i.list.concat(o.list),o.tree=i.tree.concat(o.tree),Wc(o))}createColumns(o,i){var u,h;const s=()=>{var g;zo(this.beans,(g=this.columns)==null?void 0:g.tree),this.columns=null},n=o.treeDepth,r=(((u=this.columns)==null?void 0:u.treeDepth)??-1)==n,l=this.generateSelectionCols();if(_c(l,((h=this.columns)==null?void 0:h.list)??[])&&r)return;s();const{colGroupSvc:a}=this.beans,d=(a==null?void 0:a.findDepth(o.tree))??0,c=(a==null?void 0:a.balanceTreeForAutoCols(l,d))??[];this.columns={list:l,tree:c,treeDepth:d,map:{}},i(g=>{if(!g)return null;const p=g.filter(f=>!tt(f));return[...l,...p]})}updateColumns(o){var s;const i=St(o.source);(s=this.columns)==null||s.list.forEach(n=>{const r=this.createSelectionColDef(o.currentValue);n.setColDef(r,null,i),ve(this.beans,{state:[{...r,colId:n.getColId()}]},i)})}getColumn(o){var i;return((i=this.columns)==null?void 0:i.list.find(s=>wr(s,o)))??null}getColumns(){var o;return((o=this.columns)==null?void 0:o.list)??null}isSelectionColumnEnabled(){var a,d;const{gos:o,beans:i}=this,s=o.get("rowSelection");if(typeof s!="object"||!Qe(o))return!1;const n=(((d=(a=i.autoColSvc)==null?void 0:a.getColumns())==null?void 0:d.length)??0)>0;if(s.checkboxLocation==="autoGroupColumn"&&n)return!1;const r=!!wt(s),l=Lo(s);return r||l}createSelectionColDef(o){const{gos:i}=this,s=o??i.get("selectionColumnDef"),n=i.get("enableRtl"),{rowSpan:r,spanRows:l,...a}=s??{};return{width:50,resizable:!1,suppressHeaderMenuButton:!0,sortable:!1,suppressMovable:!0,lockPosition:n?"right":"left",comparator(d,c,u,h){const g=u.isSelected(),p=h.isSelected();return g===p?0:g?1:-1},editable:!1,suppressFillHandle:!0,pinned:"left",rowSpan:r,...a,colId:pr,chartDataType:"excluded"}}generateSelectionCols(){if(!this.isSelectionColumnEnabled())return[];const o=this.createSelectionColDef(),i=o.colId;this.gos.validateColDef(o,i,!0);const s=new We(o,null,i,!1);return this.createBean(s),[s]}onSelectionOptionsChanged(o,i,s){const n=i&&typeof i!="string"?wt(i):void 0,r=o&&typeof o!="string"?wt(o):void 0,l=n!==r,a=i&&typeof i!="string"?Lo(i):void 0,d=o&&typeof o!="string"?Lo(o):void 0,c=a!==d,u=Go(o),h=Go(i);(l||c||u!==h)&&this.beans.colModel.refreshAll(s)}destroy(){var o;zo(this.beans,(o=this.columns)==null?void 0:o.tree),super.destroy()}refreshVisibility(o,i,s){var a,d;if(!((a=this.columns)!=null&&a.list.length))return;const n=o.length+i.length+s.length;if(n===0)return;const r=this.columns.list[0];if(!r.isVisible())return;const l=()=>{let c;switch(r.pinned){case"left":case!0:c=o;break;case"right":c=s;break;default:c=i}c&&we(c,r)};((d=this.beans.rowNumbersSvc)!=null&&d.getColumn(fr)?2:1)===n&&l()}}const Ii="34.1.1";function od(e){const t=e.get("rowSelection");return typeof t=="object"&&t.masterSelects||"self"}function Ai(e){return!!(e.rowPinned&&e.pinnedSibling)}function Ly(e,t=!0){const o=e.get("rowSelection");return typeof o!="object"?t?"all":void 0:o.mode==="multiRow"?o.selectAll:"all"}function id(e,t){return t===void 0?e("ariaIndeterminate","indeterminate"):t===!0?e("ariaChecked","checked"):e("ariaUnchecked","unchecked")}function me(e,t,o,i){const s=t==="top";if(!o)return me(e,t,s?e.getPinnedTopRow(0):e.getPinnedBottomRow(0),i);if(!i){const a=s?e.getPinnedTopRowCount():e.getPinnedBottomRowCount();return me(e,t,o,s?e.getPinnedTopRow(a-1):e.getPinnedBottomRow(a-1))}let n=!1,r=!1;const l=[];return e.forEachPinnedRow(t,a=>{if(a===o&&!n){n=!0,l.push(a);return}if(n&&a===i){r=!0,l.push(a);return}n&&!r&&l.push(a)}),l}function pn(e){return(e==null?void 0:e.hideDisabledCheckboxes)??!1}function sd(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 Gy(e){const t=sd(e);return t===!0||t==="enableDeselection"}function Hy(e){const t=sd(e);return t===!0||t==="enableSelection"}function Oy(e){const t=e.get("rowSelection");return typeof t=="string"?e.get("rowMultiSelectWithClick"):(t==null?void 0:t.enableSelectionWithoutKeys)??!1}function By(e,t){var n;if(!t.nodes.every(r=>r.rowPinned&&!Ai(r)?(k(59),!1):r.id===void 0?(k(60),!1):!0))return;const{nodes:o,source:i,newValue:s}=t;(n=e.selectionSvc)==null||n.setNodesSelected({nodes:o,source:i??"api",newValue:s})}function Vy(e,t,o="apiSelectAll"){var i;(i=e.selectionSvc)==null||i.selectAllRowNodes({source:o,selectAll:t})}function Ny(e,t,o="apiSelectAll"){var i;(i=e.selectionSvc)==null||i.deselectAllRowNodes({source:o,selectAll:t})}function _y(e){var t;return((t=e.selectionSvc)==null?void 0:t.getSelectedNodes())??[]}function Wy(e){var t;return((t=e.selectionSvc)==null?void 0:t.getSelectedRows())??[]}const zy={tag:"div",cls:"ag-selection-checkbox",role:"presentation",children:[{tag:"ag-checkbox",ref:"eCheckbox",role:"presentation"}]};class $y extends j{constructor(){super(zy,[Gs]);R(this,"eCheckbox",A);R(this,"rowNode");R(this,"column");R(this,"overrides")}postConstruct(){this.eCheckbox.setPassive(!0)}onDataChanged(){this.onSelectionChanged()}onSelectableChanged(){this.showOrHideSelect()}onSelectionChanged(){const o=this.getLocaleTextFunc(),{rowNode:i,eCheckbox:s}=this,n=i.isSelected(),r=id(o,n),[l,a]=i.selectable?["ariaRowToggleSelection","Press Space to toggle row selection"]:["ariaRowSelectionDisabled","Row Selection is disabled for this row"],d=o(l,a);s.setValue(n,!0),s.setInputAriaLabel(`${d} (${r})`)}init(o){if(this.rowNode=o.rowNode,this.column=o.column,this.overrides=o.overrides,this.onSelectionChanged(),this.addManagedListeners(this.eCheckbox.getInputElement(),{dblclick:vt,click:i=>{var s;vt(i),(s=this.beans.selectionSvc)==null||s.handleSelectionEvent(i,this.rowNode,"checkboxSelected")}}),this.addManagedListeners(this.rowNode,{rowSelected:this.onSelectionChanged.bind(this),dataChanged:this.onDataChanged.bind(this),selectableChanged:this.onSelectableChanged.bind(this)}),this.addManagedPropertyListener("rowSelection",({currentValue:i,previousValue:s})=>{const n=typeof i=="object"?pn(i):void 0,r=typeof s=="object"?pn(s):void 0;n!==r&&this.onSelectableChanged()}),rs(this.gos)||typeof this.getIsVisible()=="function"){const i=this.showOrHideSelect.bind(this);this.addManagedEventListeners({displayedColumnsChanged:i}),this.addManagedListeners(this.rowNode,{dataChanged:i,cellChanged:i}),this.showOrHideSelect()}this.eCheckbox.getInputElement().setAttribute("tabindex","-1")}showOrHideSelect(){const{column:o,rowNode:i,overrides:s,gos:n}=this,r=i.selectable,l=this.getIsVisible();let a;if(typeof l=="function"){const g=s==null?void 0:s.callbackParams;if(!o)a=l({...g,node:i,data:i.data});else{const p=o.createColumnFunctionCallbackParams(i);a=l({...g,...p})}}else a=l??!1;const d=r&&!a||!r&&a,c=r||a,u=n.get("rowSelection"),h=u&&typeof u!="string"?!pn(u):!!(o!=null&&o.getColDef().showDisabledCheckboxes);if(this.setVisible(c&&(d?h:!0)),this.setDisplayed(c&&(d?h:!0)),c&&this.eCheckbox.setDisabled(d),s==null?void 0:s.removeHidden){this.setDisplayed(c);return}}getIsVisible(){var s,n;const o=this.overrides;if(o)return o.isVisible;const i=this.gos.get("rowSelection");return i&&typeof i!="string"?wt(i):(n=(s=this.column)==null?void 0:s.getColDef())==null?void 0:n.checkboxSelection}}class Uy{constructor(t,o){R(this,"rowModel");R(this,"pinnedRowModel");R(this,"selectAll",!1);R(this,"rootId",null);R(this,"endId",null);R(this,"cachedRange",[]);this.rowModel=t,this.pinnedRowModel=o}reset(){this.rootId=null,this.endId=null,this.cachedRange.length=0}setRoot(t){this.rootId=t.id,this.endId=null,this.cachedRange.length=0}setEndRange(t){this.endId=t.id,this.cachedRange.length=0}getRange(){if(this.cachedRange.length===0){const t=this.getRoot(),o=this.getEnd();if(t==null||o==null)return this.cachedRange;this.cachedRange=this.getNodesInRange(t,o)??[]}return this.cachedRange}isInRange(t){return this.rootId===null?!1:this.getRange().some(o=>o.id===t.id)}getRoot(t){if(this.rootId)return this.getRowNode(this.rootId);if(t)return this.setRoot(t),t}getEnd(){if(this.endId)return this.getRowNode(this.endId)}getRowNode(t){let o;const{rowModel:i,pinnedRowModel:s}=this;return o??(o=i.getRowNode(t)),s!=null&&s.isManual()&&(o??(o=s.getPinnedRowById(t,"top")),o??(o=s.getPinnedRowById(t,"bottom"))),o}truncate(t){const o=this.getRange();if(o.length===0)return{keep:[],discard:[]};const i=o[0].id===this.rootId,s=o.findIndex(n=>n.id===t.id);if(s>-1){const n=o.slice(0,s),r=o.slice(s+1);return this.setEndRange(t),i?{keep:n,discard:r}:{keep:r,discard:n}}else return{keep:o,discard:[]}}extend(t,o=!1){const i=this.getRoot();if(i==null){const n=this.getRange().slice();return o&&t.depthFirstSearch(r=>!r.group&&n.push(r)),n.push(t),this.setRoot(t),{keep:n,discard:[]}}const s=this.getNodesInRange(i,t);if(!s)return this.setRoot(t),{keep:[t],discard:[]};if(s.find(n=>n.id===this.endId))return this.setEndRange(t),{keep:this.getRange(),discard:[]};{const n=this.getRange().slice();return this.setEndRange(t),{keep:this.getRange(),discard:n}}}getNodesInRange(t,o){const{pinnedRowModel:i,rowModel:s}=this;if(!(i!=null&&i.isManual()))return s.getNodesInRangeForSelection(t,o);if(t.rowPinned==="top"&&!o.rowPinned)return me(i,"top",t,void 0).concat(s.getNodesInRangeForSelection(s.getRow(0),o)??[]);if(t.rowPinned==="bottom"&&!o.rowPinned){const n=me(i,"bottom",void 0,t),r=s.getRowCount(),l=s.getRow(r-1);return(s.getNodesInRangeForSelection(o,l)??[]).concat(n)}if(!t.rowPinned&&!o.rowPinned)return s.getNodesInRangeForSelection(t,o);if(t.rowPinned==="top"&&o.rowPinned==="top")return me(i,"top",t,o);if(t.rowPinned==="bottom"&&o.rowPinned==="top"){const n=me(i,"top",o,void 0),r=me(i,"bottom",void 0,t),l=s.getRow(0),a=s.getRow(s.getRowCount()-1);return n.concat(s.getNodesInRangeForSelection(l,a)??[]).concat(r)}if(!t.rowPinned&&o.rowPinned==="top")return me(i,"top",o,void 0).concat(s.getNodesInRangeForSelection(s.getRow(0),t)??[]);if(t.rowPinned==="top"&&o.rowPinned==="bottom"){const n=me(i,"top",t,void 0),r=me(i,"bottom",void 0,o),l=s.getRow(0),a=s.getRow(s.getRowCount()-1);return n.concat(s.getNodesInRangeForSelection(l,a)??[]).concat(r)}if(t.rowPinned==="bottom"&&o.rowPinned==="bottom")return me(i,"bottom",t,o);if(!t.rowPinned&&o.rowPinned==="bottom"){const n=me(i,"bottom",void 0,o),r=s.getRow(s.getRowCount());return(s.getNodesInRangeForSelection(t,r)??[]).concat(n)}return null}}class Ky extends x{constructor(o){super();R(this,"column");R(this,"cbSelectAllVisible",!1);R(this,"processingEventFromCheckbox",!1);R(this,"headerCellCtrl");R(this,"cbSelectAll");this.column=o}onSpaceKeyDown(o){const i=this.cbSelectAll;i.isDisplayed()&&!i.getGui().contains(Y(this.beans))&&(o.preventDefault(),i.setValue(!i.getValue()))}getCheckboxGui(){return this.cbSelectAll.getGui()}setComp(o){this.headerCellCtrl=o;const i=this.createManagedBean(new wl);this.cbSelectAll=i,i.addCss("ag-header-select-all"),Be(i.getGui(),"presentation"),this.showOrHideSelectAll();const s=this.updateStateOfCheckbox.bind(this);this.addManagedEventListeners({newColumnsLoaded:()=>this.showOrHideSelectAll(),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this),selectionChanged:s,paginationChanged:s,modelUpdated:s}),this.addManagedPropertyListener("rowSelection",({currentValue:n,previousValue:r})=>{const l=a=>typeof a=="string"||!a||a.mode==="singleRow"?void 0:a.selectAll;l(n)!==l(r)&&this.showOrHideSelectAll(),this.updateStateOfCheckbox()}),this.addManagedListeners(i,{fieldValueChanged:this.onCbSelectAll.bind(this)}),i.getInputElement().setAttribute("tabindex","-1"),this.refreshSelectAllLabel()}onDisplayedColumnsChanged(o){this.isAlive()&&this.showOrHideSelectAll(o.source==="uiColumnMoved")}showOrHideSelectAll(o=!1){const i=this.isCheckboxSelection();this.cbSelectAllVisible=i,this.cbSelectAll.setDisplayed(i),i&&(this.checkRightRowModelType("selectAllCheckbox"),this.checkSelectionType("selectAllCheckbox"),this.updateStateOfCheckbox()),this.refreshSelectAllLabel(o)}updateStateOfCheckbox(){if(!this.cbSelectAllVisible||this.processingEventFromCheckbox)return;this.processingEventFromCheckbox=!0;const o=this.getSelectAllMode(),i=this.beans.selectionSvc,s=this.cbSelectAll,n=i.getSelectAllState(o);s.setValue(n);const r=i.hasNodesToSelect(o);s.setDisabled(!r),this.refreshSelectAllLabel(),this.processingEventFromCheckbox=!1}refreshSelectAllLabel(o=!1){const i=this.getLocaleTextFunc(),{headerCellCtrl:s,cbSelectAll:n,cbSelectAllVisible:r}=this,l=n.getValue(),a=id(i,l),d=i("ariaRowSelectAll","Press Space to toggle all rows selection");s.setAriaDescriptionProperty("selectAll",r?`${d} (${a})`:null),n.setInputAriaLabel(i("ariaHeaderSelection","Column with Header Selection")),o||s.announceAriaDescription()}checkSelectionType(o){return Qt(this.gos)?!0:(k(128,{feature:o}),!1)}checkRightRowModelType(o){const{gos:i,rowModel:s}=this.beans;return oe(i)||Mo(i)?!0:(k(129,{feature:o,rowModel:s.getType()}),!1)}onCbSelectAll(){if(this.processingEventFromCheckbox||!this.cbSelectAllVisible)return;const o=this.cbSelectAll.getValue(),i=this.getSelectAllMode();let s="uiSelectAll";i==="currentPage"?s="uiSelectAllCurrentPage":i==="filtered"&&(s="uiSelectAllFiltered");const n={source:s,selectAll:i},r=this.beans.selectionSvc;o?r.selectAllRowNodes(n):r.deselectAllRowNodes(n)}isCheckboxSelection(){const{column:o,gos:i,beans:s}=this,n=typeof i.get("rowSelection")=="object"?"headerCheckbox":"headerCheckboxSelection";return nd(s,o)&&this.checkRightRowModelType(n)&&this.checkSelectionType(n)}getSelectAllMode(){const o=Ly(this.gos,!1);if(o)return o;const{headerCheckboxSelectionCurrentPageOnly:i,headerCheckboxSelectionFilteredOnly:s}=this.column.getColDef();return i?"currentPage":s?"filtered":"all"}destroy(){super.destroy(),this.cbSelectAll=void 0,this.headerCellCtrl=void 0}}function nd({gos:e,selectionColSvc:t},o){const i=e.get("rowSelection"),s=o.getColDef(),{headerCheckboxSelection:n}=s;let r=!1;if(typeof i=="object"){const l=tt(o),a=mr(o);(Go(i)==="autoGroupColumn"&&a||l&&(t!=null&&t.isSelectionColumnEnabled()))&&(r=Lo(i))}else typeof n=="function"?r=n(_(e,{column:o,colDef:s})):r=!!n;return r}class jy extends x{constructor(){super(...arguments);R(this,"isRowSelectable");R(this,"selectionCtx")}postConstruct(){const{gos:o,beans:i}=this;this.selectionCtx=new Uy(i.rowModel,i.pinnedRowModel),this.addManagedPropertyListeners(["isRowSelectable","rowSelection"],()=>{const s=rs(o);s!==this.isRowSelectable&&(this.isRowSelectable=s,this.updateSelectable())}),this.isRowSelectable=rs(o),this.addManagedEventListeners({cellValueChanged:s=>this.updateRowSelectable(s.node),rowNodeDataChanged:s=>this.updateRowSelectable(s.node)})}destroy(){super.destroy(),this.selectionCtx.reset()}createCheckboxSelectionComponent(){return new $y}createSelectAllFeature(o){if(nd(this.beans,o))return new Ky(o)}isMultiSelect(){return Qt(this.gos)}onRowCtrlSelected(o,i,s){const n=!!o.rowNode.isSelected();o.forEachGui(s,r=>{r.rowComp.toggleCss("ag-row-selected",n);const l=r.element;Hi(l,n),l.contains(Y(this.beans))&&i(r)})}announceAriaRowSelection(o){var n;if(this.isRowSelectionBlocked(o))return;const i=o.isSelected();if(!o.selectable)return;const s=this.getLocaleTextFunc()(i?"ariaRowDeselect":"ariaRowSelect",`Press SPACE to ${i?"deselect":"select"} this row`);(n=this.beans.ariaAnnounce)==null||n.announceValue(s,"rowSelection")}isRowSelectionBlocked(o){return!o.selectable||o.rowPinned&&!Ai(o)||!Qe(this.gos)}updateRowSelectable(o,i){var n;const s=o.rowPinned&&o.pinnedSibling?o.pinnedSibling.selectable:((n=this.isRowSelectable)==null?void 0:n.call(this,o))??!0;return this.setRowSelectable(o,s,i),s}setRowSelectable(o,i,s){if(o.selectable!==i){if(o.selectable=i,o.dispatchRowEvent("selectableChanged"),s)return;if(Xt(this.gos)){const n=this.calculateSelectedFromChildren(o);this.setNodesSelected({nodes:[o],newValue:n??!1,source:"selectableChanged"});return}o.isSelected()&&!o.selectable&&this.setNodesSelected({nodes:[o],newValue:!1,source:"selectableChanged"})}}calculateSelectedFromChildren(o){var n;let i=!1,s=!1;if(!((n=o.childrenAfterGroup)!=null&&n.length))return o.selectable?o.__selected:null;for(let r=0;r<o.childrenAfterGroup.length;r++){const l=o.childrenAfterGroup[r];let a=l.isSelected();if(!l.selectable){const d=this.calculateSelectedFromChildren(l);if(d===null)continue;a=d}switch(a){case!0:i=!0;break;case!1:s=!0;break;default:return}}if(!(i&&s))return i?!0:s?!1:o.selectable?o.__selected:null}selectRowNode(o,i,s,n="api"){const r=!o.selectable&&i,l=o.__selected===i;if(r||l)return!1;o.__selected=i,o.dispatchRowEvent("rowSelected");const a=o.sibling;a&&a.footer&&a.__localEventService&&a.dispatchRowEvent("rowSelected");const d=o.pinnedSibling;return d&&d.rowPinned&&d.__localEventService&&d.dispatchRowEvent("rowSelected"),this.eventSvc.dispatchEvent({...Bh(o,this.gos,"rowSelected"),event:s||null,source:n}),!0}isCellCheckboxSelection(o,i){const s=this.gos.get("rowSelection");if(s&&typeof s!="string"){const n=tt(o)&&wt(s);return o.isColumnFunc(i,n)}else return o.isColumnFunc(i,o.colDef.checkboxSelection)}inferNodeSelections(o,i,s,n){const{gos:r,selectionCtx:l}=this,a=o.isSelected(),d=Xt(r),c=Hy(r),u=Gy(r),h=this.isMultiSelect(),g=n==="rowClicked";if(g&&!(c||u))return null;if(i&&s&&h){const p=l.getRoot();if(p)if(p.isSelected()){const f=l.isInRange(o)?l.truncate(o):l.extend(o,d);return{deselect:f.discard,select:f.keep,reset:!1}}else{const f=l.extend(o,d);return{select:[],deselect:f.keep,reset:!1}}else return null}else if(i&&h){const p=l.selectAll?this.beans.rowModel.getRow(0):void 0,f=l.getRoot(p),C=l.isInRange(o)?l.truncate(o):l.extend(o,d);return{select:C.keep,deselect:C.discard,reset:l.selectAll||!!(f&&!f.isSelected())}}else if(s){if(g){const p=!a;return p&&!c||!p&&!u?null:(l.setRoot(o),{node:o,newValue:p,clearSelection:!1})}return l.setRoot(o),{node:o,newValue:!a,clearSelection:!h}}else{l.setRoot(o);const p=Oy(r),f=Oo(r)==="filteredDescendants",C=g&&(!p||!c);if(f&&a===void 0&&oe(r))return{node:o,newValue:!1,clearSelection:!h||C};if(g){const m=a?!p:c;return m===a&&!C||m&&!c||!m&&!u?null:{node:o,newValue:m,clearSelection:!h||C,keepDescendants:o.group&&d}}return{node:o,newValue:!a,clearSelection:!h||C}}}}class qy extends jy{constructor(){super(...arguments);R(this,"beanName","selectionSvc");R(this,"selectedNodes",new Map);R(this,"detailSelection",new Map);R(this,"groupSelectsDescendants");R(this,"groupSelectsFiltered");R(this,"mode");R(this,"masterSelectsDetail",!1)}postConstruct(){super.postConstruct();const{gos:o}=this;this.mode=Ho(o),this.groupSelectsDescendants=Xt(o),this.groupSelectsFiltered=Oo(o)==="filteredDescendants",this.masterSelectsDetail=od(o)==="detail",this.addManagedPropertyListeners(["groupSelectsChildren","groupSelectsFiltered","rowSelection"],()=>{const i=Xt(o),s=Ho(o),n=Oo(o)==="filteredDescendants";this.masterSelectsDetail=od(o)==="detail",(i!==this.groupSelectsDescendants||n!==this.groupSelectsFiltered||s!==this.mode)&&(this.deselectAllRowNodes({source:"api"}),this.groupSelectsDescendants=i,this.groupSelectsFiltered=n,this.mode=s)}),this.addManagedEventListeners({rowSelected:this.onRowSelected.bind(this)})}destroy(){super.destroy(),this.resetNodes()}handleSelectionEvent(o,i,s){if(this.isRowSelectionBlocked(i))return 0;const n=this.inferNodeSelections(i,o.shiftKey,o.metaKey||o.ctrlKey,s);return n==null?0:(this.selectionCtx.selectAll=!1,"select"in n?(n.reset?this.resetNodes():this.selectRange(n.deselect,!1,s),this.selectRange(n.select,!0,s)):this.setNodesSelected({nodes:[n.node],newValue:n.newValue,clearSelection:n.clearSelection,keepDescendants:n.keepDescendants,event:o,source:s}))}setNodesSelected({newValue:o,clearSelection:i,suppressFinishActions:s,nodes:n,event:r,source:l,keepDescendants:a=!1}){var c;if(!Qe(this.gos)&&o)return k(132),0;if(n.length===0)return 0;if(n.length>1&&!this.isMultiSelect())return k(130),0;let d=0;for(let u=0;u<n.length;u++){const h=n[u],g=Nt(h),p=this.groupSelectsFiltered&&g.group;if(g.rowPinned&&!Ai(g)){k(59);continue}if(g.id===void 0){k(60);continue}p||this.selectRowNode(g,o,r,l)&&(this.detailSelection.delete(g.id),d++),this.groupSelectsDescendants&&((c=g.childrenAfterGroup)!=null&&c.length)&&(d+=this.selectChildren(g,o,l))}return s||(n.length===1&&l==="api"&&this.selectionCtx.setRoot(Nt(n[0])),o&&(i||!this.isMultiSelect())&&(d+=this.clearOtherNodes(Nt(n[0]),a,l)),d>0&&(this.updateGroupsFromChildrenSelections(l),this.dispatchSelectionChanged(l))),d}selectRange(o,i,s){let n=0;return o.forEach(r=>{const l=Nt(r);l.group&&this.groupSelectsDescendants||this.selectRowNode(l,i,void 0,s)&&n++}),n>0&&(this.updateGroupsFromChildrenSelections(s),this.dispatchSelectionChanged(s)),n}selectChildren(o,i,s){const n=this.groupSelectsFiltered?o.childrenAfterAggFilter:o.childrenAfterGroup;return n?this.setNodesSelected({newValue:i,clearSelection:!1,suppressFinishActions:!0,source:s,nodes:n}):0}getSelectedNodes(){return Array.from(this.selectedNodes.values())}getSelectedRows(){const o=[];return this.selectedNodes.forEach(i=>i.data&&o.push(i.data)),o}getSelectionCount(){return this.selectedNodes.size}filterFromSelection(o){const i=new Map;this.selectedNodes.forEach((s,n)=>{o(s)&&i.set(n,s)}),this.selectedNodes=i}updateGroupsFromChildrenSelections(o,i){if(!this.groupSelectsDescendants)return!1;const{gos:s,rowModel:n}=this.beans;if(!oe(s))return!1;const r=n.rootNode;if(!r)return!1;i||(i=new Ci(!0,r),i.active=!1);let l=!1;return i.forEachChangedNodeDepthFirst(a=>{if(a!==r){const d=this.calculateSelectedFromChildren(a);l=this.selectRowNode(a,d===null?!1:d,void 0,o)||l}}),l}clearOtherNodes(o,i,s){const n=new Map;let r=0;return this.selectedNodes.forEach(l=>{const a=l.id==o.id;if((!i||!Zy(o,l))&&!a){const d=this.selectedNodes.get(l.id);r+=this.setNodesSelected({nodes:[d],newValue:!1,clearSelection:!1,suppressFinishActions:!0,source:s}),this.groupSelectsDescendants&&l.parent&&n.set(l.parent.id,l.parent)}}),n.forEach(l=>{const a=this.calculateSelectedFromChildren(l);this.selectRowNode(l,a===null?!1:a,void 0,s)}),r}onRowSelected(o){const i=o.node;this.groupSelectsDescendants&&i.group||(i.isSelected()?this.selectedNodes.set(i.id,i):this.selectedNodes.delete(i.id))}syncInRowNode(o,i){this.syncInOldRowNode(o,i),this.syncInNewRowNode(o)}createDaemonNode(o){if(!o.id)return;const i=new so(this.beans);return i.id=o.id,i.data=o.data,i.__daemon=!0,i.__selected=o.__selected,i.level=o.level,i}syncInOldRowNode(o,i){i&&o.id!==i.id&&this.selectedNodes.get(i.id)==o&&this.selectedNodes.set(i.id,i)}syncInNewRowNode(o){this.selectedNodes.has(o.id)?(o.__selected=!0,this.selectedNodes.set(o.id,o)):o.__selected=!1}reset(o){const i=this.getSelectionCount();this.resetNodes(),i&&this.dispatchSelectionChanged(o)}resetNodes(){this.selectedNodes.forEach(o=>{this.selectRowNode(o,!1)}),this.selectedNodes.clear()}getBestCostNodeSelection(){const{gos:o,rowModel:i}=this.beans;if(!oe(o))return;const s=i.getTopLevelNodes();if(s===null)return;const n=[];function r(l){for(let a=0,d=l.length;a<d;a++){const c=l[a];c.isSelected()?n.push(c):c.group&&c.childrenAfterGroup&&r(c.childrenAfterGroup)}}return r(s),n}isEmpty(){return this.getSelectionCount()===0}deselectAllRowNodes({source:o,selectAll:i}){const s=oe(this.gos);let n=!1;const r=l=>{const a=this.selectRowNode(Nt(l),!1,void 0,o);n||(n=a)};if(i==="currentPage"||i==="filtered"){if(!s){U(102);return}this.getNodesToSelect(i).forEach(r)}else this.selectedNodes.forEach(r),this.reset(o);if(this.selectionCtx.selectAll=!1,s&&this.groupSelectsDescendants){const l=this.updateGroupsFromChildrenSelections(o);n||(n=l)}n&&this.dispatchSelectionChanged(o)}getSelectedCounts(o){let i=0,s=0;return this.getNodesToSelect(o).forEach(n=>{this.groupSelectsDescendants&&n.group||(n.isSelected()?i++:n.selectable&&s++)}),{selectedCount:i,notSelectedCount:s}}getSelectAllState(o){const{selectedCount:i,notSelectedCount:s}=this.getSelectedCounts(o);return rd(i,s)??null}hasNodesToSelect(o){return this.getNodesToSelect(o).filter(i=>i.selectable).length>0}getNodesToSelect(o){if(!this.canSelectAll())return[];const i=[],s=r=>i.push(r);if(o==="currentPage")return this.forEachNodeOnPage(r=>{if(!r.group){s(r);return}if(!r.expanded&&!r.footer){const l=a=>{var d;s(a),(d=a.childrenAfterFilter)==null||d.forEach(l)};l(r);return}this.groupSelectsDescendants||s(r)}),i;const n=this.beans.rowModel;return o==="filtered"?(n.forEachNodeAfterFilter(s),i):(n.forEachNode(s),i)}forEachNodeOnPage(o){const{pageBounds:i,rowModel:s}=this.beans,n=i.getFirstRow(),r=i.getLastRow();for(let l=n;l<=r;l++){const a=s.getRow(l);a&&o(a)}}selectAllRowNodes(o){const{gos:i,selectionCtx:s}=this;if(!Qe(i)){k(132);return}if(Sc(i)&&!Qt(i)){k(130);return}if(!this.canSelectAll())return;const{source:n,selectAll:r}=o;let l=!1;if(this.getNodesToSelect(r).forEach(a=>{const d=this.selectRowNode(Nt(a),!0,void 0,n);l||(l=d)}),s.selectAll=!0,oe(i)&&this.groupSelectsDescendants){const a=this.updateGroupsFromChildrenSelections(n);l||(l=a)}l&&this.dispatchSelectionChanged(n)}getSelectionState(){return this.isEmpty()?null:Array.from(this.selectedNodes.keys())}setSelectionState(o,i,s){if(o||(o=[]),!Array.isArray(o)){U(103);return}const n=new Set(o),r=[];this.beans.rowModel.forEachNode(l=>{n.has(l.id)&&r.push(l)}),s&&this.resetNodes(),this.setNodesSelected({newValue:!0,nodes:r,source:i})}canSelectAll(){const{gos:o}=this.beans;return!!oe(o)}updateSelectable(o){var c;const{gos:i,rowModel:s}=this.beans;if(!Qe(i))return;const n="selectableChanged",r=o!==void 0,l=oe(i)&&this.groupSelectsDescendants,a=[],d=u=>{var h;if(!(r&&!u.group)){if(l&&u.group){const g=((h=u.childrenAfterGroup)==null?void 0:h.some(p=>p.selectable))??!1;this.setRowSelectable(u,g,!0);return}!this.updateRowSelectable(u,!0)&&u.isSelected()&&a.push(u)}};if(l){if(o===void 0){const u=s.rootNode;o=u?new Ci(!1,u):void 0}o==null||o.forEachChangedNodeDepthFirst(d,!r,!r)}else s.forEachNode(d);a.length&&this.setNodesSelected({nodes:a,newValue:!1,source:n}),!r&&l&&((c=this.updateGroupsFromChildrenSelections)==null||c.call(this,n))}updateSelectableAfterGrouping(o){var i;this.updateSelectable(o),this.groupSelectsDescendants&&((i=this.updateGroupsFromChildrenSelections)!=null&&i.call(this,"rowGroupChanged",o))&&this.dispatchSelectionChanged("rowGroupChanged")}refreshMasterNodeState(o,i){var r,l;if(!this.masterSelectsDetail)return;const s=(l=(r=o.detailNode)==null?void 0:r.detailGridInfo)==null?void 0:l.api;if(!s)return;const n=Yy(s);if(o.isSelected()!==n&&this.selectRowNode(o,n,i,"masterDetail")&&this.dispatchSelectionChanged("masterDetail"),!n){const a=this.detailSelection.get(o.id)??new Set;for(const d of s.getSelectedNodes())a.add(d.id);this.detailSelection.set(o.id,a)}}setDetailSelectionState(o,i,s){if(this.masterSelectsDetail){if(!Qt(i)){k(269);return}switch(o.isSelected()){case!0:{s.selectAll();break}case!1:{s.deselectAll();break}case void 0:{const n=this.detailSelection.get(o.id);if(n){const r=[];for(const l of n){const a=s.getRowNode(l);a&&r.push(a)}s.setNodesSelected({nodes:r,newValue:!0,source:"masterDetail"})}break}}}}dispatchSelectionChanged(o){this.eventSvc.dispatchEvent({type:"selectionChanged",source:o,selectedNodes:this.getSelectedNodes(),serverSideState:null})}}function Nt(e){return Ai(e)?e.pinnedSibling:e.footer?e.sibling:e}function Yy(e){let t=0,o=0;return e.forEachNode(i=>{i.isSelected()?t++:i.selectable&&o++}),rd(t,o)}function rd(e,t){if(e===0&&t===0)return!1;if(!(e>0&&t>0))return e>0}function Zy(e,t){let o=t.parent;for(;o;){if(o===e)return!0;o=o.parent}return!1}const ld={moduleName:"SharedRowSelection",version:Ii,beans:[ky],apiFunctions:{setNodesSelected:By,selectAll:Vy,deselectAll:Ny,getSelectedNodes:_y,getSelectedRows:Wy}},ad={moduleName:"RowSelection",version:Ii,rowModels:["clientSide","infinite","viewport"],beans:[qy],dependsOn:[ld]},Qy="ROOT_NODE_ID";class Xy extends x{constructor(){super(...arguments);R(this,"nextId",0);R(this,"allNodesMap",{});R(this,"rootNode",null)}getRowNode(o){return this.allNodesMap[o]}extractRowData(){var o,i;return(i=(o=this.rootNode)==null?void 0:o.allLeafChildren)==null?void 0:i.map(s=>s.data)}activate(o){this.rootNode=o,o.group=!0,o.level=-1,o.id=Qy,o.allLeafChildren=[],o.childrenAfterGroup=[],o.childrenAfterSort=[],o.childrenAfterAggFilter=[],o.childrenAfterFilter=[],this.updateRootSiblingArrays(o)}deactivate(){this.rootNode&&(this.allNodesMap={},this.rootNode=null)}destroy(){super.destroy(),this.allNodesMap={},this.rootNode=null}setNewRowData(o){const i=this.rootNode;i&&(this.dispatchRowDataUpdateStartedEvent(o),i.childrenAfterFilter=null,i.childrenAfterGroup=null,i.childrenAfterAggFilter=null,i.childrenAfterSort=null,i.childrenMapped=null,i.updateHasChildren(),this.allNodesMap={},this.nextId=0,this.loadNewRowData(o),this.updateRootSiblingArrays(i))}updateRootSiblingArrays(o){const i=o.sibling;i&&(i.childrenAfterFilter=o.childrenAfterFilter,i.childrenAfterGroup=o.childrenAfterGroup,i.childrenAfterAggFilter=o.childrenAfterAggFilter,i.childrenAfterSort=o.childrenAfterSort,i.childrenMapped=o.childrenMapped,i.allLeafChildren=o.allLeafChildren)}loadNewRowData(o){this.rootNode.allLeafChildren=(o==null?void 0:o.map((i,s)=>this.createRowNode(i,s)))??[]}setImmutableRowData(o,i){var C;const s=ko(this.gos),n=!this.gos.get("suppressMaintainUnsortedOrder"),r=o.changedRowNodes,l=new Set,a=this.rootNode,d=a.allLeafChildren,c=d.length;let u=!1,h=!1,g=!1,p=!1;for(let m=0,w=-1,b=i.length;m<b;m++){const v=i[m];let S=this.getRowNode(s({data:v,level:0}));if(!S)u=!0,S=this.createRowNode(v,-1),r.add(S);else{if(n){const D=S.sourceRowIndex;p||(p=D<=w||u),w=D}S.data!==v&&(g=!0,S.updateData(v),r.update(S))}l.add(S)}const f=[];for(let m=0;m<c;m++){const w=d[m];l.has(w)||(h=!0,w.isSelected()&&f.push(w),w.pinnedSibling&&((C=this.beans.pinnedRowModel)==null||C.pinRow(w.pinnedSibling,null)),this.rowNodeDeleted(w),r.remove(w))}if(u||h||p){const m=new Array(l.size);let w=0;if(!n)for(let v=0;v<c;++v){const S=d[v];l.delete(S)&&(S.sourceRowIndex=w,m[w++]=S)}for(const v of l)v.sourceRowIndex=w,m[w++]=v;a.allLeafChildren=m;const b=a.sibling;b&&(b.allLeafChildren=m),o.rowNodesOrderChanged||(o.rowNodesOrderChanged=p)}(u||h||p||g)&&(this.deselectNodes(f),o.rowDataUpdated=!0)}rowNodeDeleted(o){o.clearRowTopAndRowIndex();const i=o.id,s=this.allNodesMap;s[i]===o&&delete s[i]}updateRowData(o,i){this.dispatchRowDataUpdateStartedEvent(o.add);const s={changedRowNodes:i,rowNodeTransaction:{remove:[],update:[],add:[]},rowsInserted:!1},n=[],r=ko(this.gos);return this.executeRemove(r,o,s,n),this.executeUpdate(r,o,s,n),this.executeAdd(o,s),this.deselectNodes(n),s}executeAdd(o,i){var h;const s=o.add;if(!(s!=null&&s.length))return;let n=this.rootNode.allLeafChildren,r=n.length;if(typeof o.addIndex=="number"&&(r=this.sanitizeAddIndex(o.addIndex),r>0&&this.gos.get("treeData")&&this.gos.get("getDataPath"))){for(let g=0;g<n.length;g++)if(((h=n[g])==null?void 0:h.rowIndex)==r-1){r=g+1;break}}const l=s.length,a=i.changedRowNodes,d=new Array(l);for(let g=0;g<l;g++){const p=this.createRowNode(s[g],r+g);a.add(p),d[g]=p}const c=this.rootNode;if(r<n.length){const g=n.slice(0,r),p=n.slice(r,n.length),f=g.length+d.length;for(let C=0,m=p.length;C<m;++C)p[C].sourceRowIndex=f+C;n=[...g,...d,...p],i.rowsInserted=!0}else n=n.concat(d);c.allLeafChildren=n;const u=c.sibling;u&&(u.allLeafChildren=n),i.rowNodeTransaction.add=d}executeRemove(o,i,{changedRowNodes:s,rowNodeTransaction:n},r){var u,h;const{remove:l}=i;if(!(l!=null&&l.length))return;const a={};l.forEach(g=>{var f;const p=this.lookupRowNode(o,g);p&&(p.isSelected()&&r.push(p),p.pinnedSibling&&((f=this.beans.pinnedRowModel)==null||f.pinRow(p.pinnedSibling,null)),p.clearRowTopAndRowIndex(),a[p.id]=!0,delete this.allNodesMap[p.id],n.remove.push(p),s.remove(p))});const d=this.rootNode;d.allLeafChildren=((u=d.allLeafChildren)==null?void 0:u.filter(g=>!a[g.id]))??null,(h=d.allLeafChildren)==null||h.forEach((g,p)=>{g.sourceRowIndex=p});const c=d.sibling;c&&(c.allLeafChildren=d.allLeafChildren)}executeUpdate(o,i,{changedRowNodes:s,rowNodeTransaction:n},r){const{update:l}=i;l!=null&&l.length&&l.forEach(a=>{const d=this.lookupRowNode(o,a);d&&(d.updateData(a),!d.selectable&&d.isSelected()&&r.push(d),n.update.push(d),s.update(d))})}dispatchRowDataUpdateStartedEvent(o){this.eventSvc.dispatchEvent({type:"rowDataUpdateStarted",firstRowData:o!=null&&o.length?o[0]:null})}deselectNodes(o){var r;const i="rowDataChanged",s=this.beans.selectionSvc,n=o.length>0;n&&(s==null||s.setNodesSelected({newValue:!1,nodes:o,suppressFinishActions:!0,source:i})),(r=s==null?void 0:s.updateGroupsFromChildrenSelections)==null||r.call(s,i),n&&this.eventSvc.dispatchEvent({type:"selectionChanged",source:i,selectedNodes:(s==null?void 0:s.getSelectedNodes())??null,serverSideState:null})}sanitizeAddIndex(o){var s;const i=((s=this.rootNode.allLeafChildren)==null?void 0:s.length)??0;return o<0||o>=i||Number.isNaN(o)?i:Math.ceil(o)}createRowNode(o,i){const s=new so(this.beans);return s.parent=this.rootNode,s.level=0,s.group=!1,s.expanded=!1,s.sourceRowIndex=i,s.setDataAndId(o,String(this.nextId)),this.allNodesMap[s.id]&&k(2,{nodeId:s.id}),this.allNodesMap[s.id]=s,this.nextId++,s}lookupRowNode(o,i){var n,r;let s;if(o){const l=o({data:i,level:0});if(s=this.allNodesMap[l],!s)return U(4,{id:l}),null}else if(s=(r=(n=this.rootNode)==null?void 0:n.allLeafChildren)==null?void 0:r.find(l=>l.data===i),!s)return U(5,{data:i}),null;return s||null}}class Jy extends Xy{constructor(){super(...arguments);R(this,"beanName","csrmNodeSvc")}}class fn{constructor(){R(this,"removals",new Set);R(this,"updates",new Set);R(this,"adds",new Set)}remove(t){this.adds.delete(t)||(this.updates.delete(t),this.removals.add(t))}update(t){this.adds.has(t)||this.updates.add(t)}add(t){this.adds.add(t)}}function eR(e){e.sibling&&(e.sibling.childrenAfterFilter=e.childrenAfterFilter)}function tR(e){if(K(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 dd(e){e.sibling&&(e.sibling.childrenAfterSort=e.childrenAfterSort),tR(e)}class oR extends x{constructor(){super(...arguments);R(this,"beanName","sortStage");R(this,"refreshProps",new Set(["postSortRows","groupDisplayType","accentedSort"]));R(this,"step","sort")}execute(o){const i=this.beans,s=i.sortSvc.getSortOptions(),n=M(s)&&s.length>0,r=n&&!!o.changedRowNodes&&this.gos.get("deltaSort"),l=s.some(({column:a})=>Re(i.gos)?a.isPrimary()&&a.isRowGroupActive():!!a.getColDef().showRowGroup);this.sort(i,s,n,r,o.changedRowNodes,o.changedPath,l)}sort(o,i,s,n,r,l,a){const{gos:d,colModel:c,rowGroupColsSvc:u,rowNodeSorter:h,rowRenderer:g,showRowGroupCols:p}=o,f=d.get("groupMaintainOrder"),C=c.getCols().some(S=>S.isRowGroupActive()),m=c.isPivotMode(),w=d.getCallback("postSortRows");let b=!1;const v=S=>{var F,P,T;const D=m&&S.leafGroup,I=f&&C&&!S.leafGroup&&!a;let O;if(I){const V=((P=(F=u==null?void 0:u.columns)==null?void 0:F[S.level+1])==null?void 0:P.getSort())===null,B=S.childrenAfterAggFilter.slice(0);if(S.childrenAfterSort&&!V){const W={};S.childrenAfterSort.forEach((z,de)=>{W[z.id]=de}),B.sort((z,de)=>(W[z.id]??0)-(W[de.id]??0))}O=B}else!s||D?O=S.childrenAfterAggFilter.slice(0):n&&r?O=iR(h,S,r,l,i):O=S.childrenAfterAggFilter.slice(0);if(b||(b=((T=S.childrenAfterSort)==null?void 0:T[0])!==O[0]),S.childrenAfterSort=O,dd(S),w){const V={nodes:S.childrenAfterSort};w(V)}};if(l==null||l.forEachChangedNodeDepthFirst(v),b&&this.gos.get("groupHideOpenParents")){const S=p==null?void 0:p.getShowRowGroupCols();S!=null&&S.length&&g.refreshCells({columns:S,force:!0})}}}function iR(e,t,o,i,s){const n=t.childrenAfterAggFilter,r=t.childrenAfterSort;if(!r)return e.doFullSort(n,s);const l=new Set,a=[],{updates:d,adds:c}=o;for(let h=0,g=n.length;h<g;++h){const p=n[h];d.has(p)||c.has(p)||i&&!i.canSkip(p)?a.push({currentPos:a.length,rowNode:p}):l.add(p.id)}const u=r.filter(h=>l.has(h.id)).map((h,g)=>({currentPos:g,rowNode:h}));return a.sort((h,g)=>e.compareRowNodes(s,h,g)),sR(e,s,a,u)}function sR(e,t,o,i){const s=[];let n=0,r=0;const l=o.length,a=i.length;for(;n<l&&r<a;){const d=o[n],c=i[r],u=e.compareRowNodes(t,d,c);let h;u<0?(h=d,++n):(h=c,++r),s.push(h.rowNode)}for(;n<l;)s.push(o[n++].rowNode);for(;r<a;)s.push(i[r++].rowNode);return s}class nR extends x{constructor(){super(...arguments);R(this,"beanName","rowModel");R(this,"colModel");R(this,"valueCache");R(this,"filterStage");R(this,"sortStage");R(this,"flattenStage");R(this,"groupStage");R(this,"aggStage");R(this,"pivotStage");R(this,"filterAggStage");R(this,"rootNode",null);R(this,"rowsToDisplay",[]);R(this,"nodeManager");R(this,"rowDataTransactionBatch");R(this,"rowDataUpdatedPending",!1);R(this,"applyAsyncTransactionsTimeout");R(this,"started",!1);R(this,"isRefreshingModel",!1);R(this,"rowNodesCountReady",!1);R(this,"rowCountReady",!1);R(this,"orderedStages");R(this,"onRowHeightChanged_debounced",ge(this,this.onRowHeightChanged.bind(this),100))}wireBeans(o){this.colModel=o.colModel,this.valueCache=o.valueCache,this.filterStage=o.filterStage,this.sortStage=o.sortStage,this.flattenStage=o.flattenStage,this.groupStage=o.groupStage,this.aggStage=o.aggStage,this.pivotStage=o.pivotStage,this.filterAggStage=o.filterAggStage}postConstruct(){this.orderedStages=[this.groupStage,this.filterStage,this.pivotStage,this.aggStage,this.sortStage,this.filterAggStage,this.flattenStage].filter(n=>!!n);const o=this.refreshModel.bind(this,{step:"group"}),i=this.refreshModel.bind(this,{step:"group",afterColumnsChanged:!0,keepRenderedRows:!0,animate:!this.gos.get("suppressAnimationFrame")});this.addManagedEventListeners({newColumnsLoaded:i,columnRowGroupChanged:o,columnValueChanged:this.onValueChanged.bind(this),columnPivotChanged:this.refreshModel.bind(this,{step:"pivot"}),filterChanged:this.onFilterChanged.bind(this),sortChanged:this.onSortChanged.bind(this),columnPivotModeChanged:o,gridStylesChanged:this.onGridStylesChanges.bind(this),gridReady:this.onGridReady.bind(this)}),this.addPropertyListeners(),this.rootNode=new so(this.beans);const s=this.getNewNodeManager();this.nodeManager=s,s.activate(this.rootNode)}getNewNodeManager(){const{gos:o,beans:i}=this;return Dc(o)==="treeNested"&&i.csrmChildrenTreeNodeSvc||i.csrmNodeSvc}addPropertyListeners(){const o=["treeData","treeDataChildrenField",...this.orderedStages.flatMap(({refreshProps:i})=>[...i])];this.addManagedPropertyListeners(o,i=>{var n;const s=(n=i.changeSet)==null?void 0:n.properties;s&&this.onPropChange(s)}),this.addManagedPropertyListener("rowData",()=>this.onPropChange(["rowData"])),this.addManagedPropertyListener("rowHeight",()=>this.resetRowHeights())}start(){this.started=!0,this.rowNodesCountReady?this.refreshModel({step:"group",rowDataUpdated:!0,newData:!0}):this.setInitialData()}setInitialData(){this.gos.get("rowData")&&this.onPropChange(["rowData"])}ensureRowHeightsValid(o,i,s,n){let r,l=!1;do{r=!1;const a=this.getRowIndexAtPixel(o),d=this.getRowIndexAtPixel(i),c=Math.max(a,s),u=Math.min(d,n);for(let h=c;h<=u;h++){const g=this.getRow(h);if(g.rowHeightEstimated){const p=_e(this.beans,g);g.setRowHeight(p.height),r=!0,l=!0}}r&&this.setRowTopAndRowIndex()}while(r);return l}onPropChange(o){if(!this.rootNode)return;const i=this.gos,s=new Set(o),n={step:"nothing",changedProps:s},r=s.has("rowData"),l=this.nodeManager,a=this.getNewNodeManager(),d=l!==a||r&&s.has("treeData")&&i.get("treeData")||s.has("treeDataChildrenField")&&i.get("treeData");let c;if((d||r)&&(c=i.get("rowData"),c!=null&&!Array.isArray(c)&&(c=null,k(1))),d&&(r||(c=(l==null?void 0:l.extractRowData())??c),l!==a&&(l==null||l.deactivate(),this.nodeManager=a),a.activate(this.rootNode)),c)if(!d&&!this.isEmpty()&&c.length>0&&i.exists("getRowId")&&!i.get("resetRowDataOnUpdate"))n.keepRenderedRows=!0,n.animate=!this.gos.get("suppressAnimationFrame"),n.changedRowNodes=new fn,a.setImmutableRowData(n,c);else{n.rowDataUpdated=!0,n.newData=!0;const{selectionSvc:u,pinnedRowModel:h}=this.beans;u==null||u.reset("rowDataChanged"),h!=null&&h.isManual()&&h.reset(),this.rowNodesCountReady=!0,a.setNewRowData(c)}if(n.rowDataUpdated)n.step="group";else if(n.step==="nothing"){for(const{refreshProps:u,step:h}of this.orderedStages)if(o.some(g=>u.has(g))){n.step=h;break}}n.step!=="nothing"&&this.refreshModel(n)}setRowTopAndRowIndex(){const{beans:o,rowsToDisplay:i}=this,s=o.environment.getDefaultRowHeight();let n=0;const r=new Set,l=ee(this.gos,"normal");for(let a=0,d=i.length;a<d;++a){const c=i[a];if(c.id!=null&&r.add(c.id),c.rowHeight==null){const u=_e(o,c,l,s);c.setRowHeight(u.height,u.estimated)}c.setRowTop(n),c.setRowIndex(a),n+=c.rowHeight}return r}clearRowTopAndRowIndex(o,i){const s=o.active,n=l=>{l&&l.id!=null&&!i.has(l.id)&&l.clearRowTopAndRowIndex()},r=l=>{if(l!==null&&(n(l),n(l.detailNode),n(l.sibling),l.hasChildren()&&l.childrenAfterGroup)){const a=l.level==-1;s&&!a&&!l.expanded||l.childrenAfterGroup.forEach(r)}};r(this.rootNode)}isLastRowIndexKnown(){return!0}getRowCount(){return this.rowsToDisplay?this.rowsToDisplay.length:0}getTopLevelRowCount(){const o=this.rootNode;if(!o||this.rowsToDisplay.length===0)return 0;if(this.rowsToDisplay&&this.rowsToDisplay[0]===o)return 1;const i=o.childrenAfterSort,s=o.sibling&&o.sibling.displayed?1:0;return(i?i.length:0)+s}getTopLevelRowDisplayedIndex(o){const{rootNode:i,rowsToDisplay:s}=this;if(!i||!s.length||s[0]===i)return o;const{childrenAfterSort:n}=i,r=a=>{let d=n[a];if(this.gos.get("groupHideOpenParents"))for(;d.expanded&&d.childrenAfterSort&&d.childrenAfterSort.length>0;)d=d.childrenAfterSort[0];return d.rowIndex},{footerSvc:l}=this.beans;return l?l.getTopDisplayIndex(s,o,n,r):r(o)}getTopLevelIndexFromDisplayedIndex(o){var l;const{rootNode:i,rowsToDisplay:s}=this;if(!i||!s.length||s[0]===i)return o;let n=this.getRow(o);for(n.footer&&(n=n.sibling);n.parent&&n.parent!==i;)n=n.parent;const r=(l=i.childrenAfterSort)==null?void 0:l.findIndex(a=>a===n);return r===-1?o:r??o}getRowBounds(o){const i=this.rowsToDisplay[o];return i?{rowTop:i.rowTop,rowHeight:i.rowHeight}:null}onRowGroupOpened(){const o=mt(this.gos);this.refreshModel({step:"map",keepRenderedRows:!0,animate:o})}onFilterChanged(o){if(o.afterDataChange)return;const i=mt(this.gos),s=o.columns.length===0||o.columns.some(n=>n.isPrimary())?"filter":"filter_aggregates";this.refreshModel({step:s,keepRenderedRows:!0,animate:i})}onSortChanged(){const o=mt(this.gos);this.refreshModel({step:"sort",keepRenderedRows:!1,animate:o})}getType(){return"clientSide"}onValueChanged(){this.refreshModel({step:this.colModel.isPivotActive()?"pivot":"aggregate"})}createChangePath(o){const i=new Ci(!1,this.rootNode);return o||(i.active=!1),i}isSuppressModelUpdateAfterUpdateTransaction(o){if(!this.gos.get("suppressModelUpdateAfterUpdateTransaction"))return!1;const{changedRowNodes:i,newData:s,rowDataUpdated:n}=o;return!(!i||s||!n||i.removals.size||i.adds.size)}refreshModel(o){var l,a,d;if(!this.rootNode)return;const i=this.beans;let s=!!o.rowDataUpdated;const n=o.changedPath??(o.changedPath=this.createChangePath(!o.newData&&s));if(this.started&&s&&this.eventSvc.dispatchEvent({type:"rowDataUpdated"}),this.rowDataUpdatedPending||(this.rowDataUpdatedPending=s),!this.started||this.isRefreshingModel||this.colModel.changeEventsDispatching||this.isSuppressModelUpdateAfterUpdateTransaction(o))return;switch(this.rowDataUpdatedPending&&(this.rowDataUpdatedPending=!1,o.rowDataUpdated=s=!0),this.isRefreshingModel=!0,(l=i.masterDetailSvc)==null||l.refreshModel(o),s&&o.step!=="group"&&((a=i.colFilter)==null||a.refreshModel()),o.step){case"group":(this.doRowGrouping(o)||s)&&((d=i.colFilter)==null||d.refreshModel()),!this.rowCountReady&&this.rowNodesCountReady&&(this.rowCountReady=!0,this.eventSvc.dispatchEventOnce({type:"rowCountReady"}));case"filter":this.doFilter(n);case"pivot":this.doPivot(n);case"aggregate":this.doAggregate(n);case"filter_aggregates":this.doFilterAggregates(n);case"sort":this.doSort(o.changedRowNodes,n);case"map":this.doRowsToDisplay()}const r=this.setRowTopAndRowIndex();this.clearRowTopAndRowIndex(n,r),this.isRefreshingModel=!1,this.eventSvc.dispatchEvent({type:"modelUpdated",animate:o.animate,keepRenderedRows:o.keepRenderedRows,newData:o.newData,newPage:!1,keepUndoRedoStack:o.keepUndoRedoStack})}isEmpty(){var o,i,s;return!((i=(o=this.rootNode)==null?void 0:o.allLeafChildren)!=null&&i.length)||!((s=this.colModel)!=null&&s.ready)}isRowsToRender(){return this.rowsToDisplay.length>0}getNodesInRangeForSelection(o,i){let s=!1,n=!1;const r=[],l=Xt(this.gos);return this.forEachNodeAfterFilterAndSort(a=>{if(!n){if(s&&(a===i||a===o)&&(n=!0,a.group&&l)){r.push(...a.allLeafChildren);return}if(!s){if(a!==i&&a!==o)return;s=!0}if(!a.group||!l){r.push(a);return}}}),r}getTopLevelNodes(){var o;return((o=this.rootNode)==null?void 0:o.childrenAfterGroup)??null}getRow(o){return this.rowsToDisplay[o]}isRowPresent(o){return this.rowsToDisplay.indexOf(o)>=0}getRowIndexAtPixel(o){const i=this.rowsToDisplay;if(this.isEmpty()||i.length===0)return-1;let s=0,n=i.length-1;if(o<=0)return 0;if($(i).rowTop<=o)return i.length-1;let r=-1,l=-1;for(;;){const a=Math.floor((s+n)/2),d=i[a];if(this.isRowInPixel(d,o)||(d.rowTop<o?s=a+1:d.rowTop>o&&(n=a-1),r===s&&l===n))return a;r=s,l=n}}isRowInPixel(o,i){const s=o.rowTop,n=o.rowTop+o.rowHeight;return s<=i&&n>i}forEachLeafNode(o){var i,s;(s=(i=this.rootNode)==null?void 0:i.allLeafChildren)==null||s.forEach((n,r)=>o(n,r))}forEachNode(o,i=!1){this.depthFirstSearchRowNodes(o,i)}forEachDisplayedNode(o){this.rowsToDisplay.forEach(o)}forEachNodeAfterFilter(o,i=!1){this.depthFirstSearchRowNodes(o,i,s=>s.childrenAfterAggFilter)}forEachNodeAfterFilterAndSort(o,i=!1){this.depthFirstSearchRowNodes(o,i,s=>s.childrenAfterSort)}forEachPivotNode(o,i=!1,s=!1){const{colModel:n,rowGroupColsSvc:r}=this.beans;if(!n.isPivotMode())return;if(!(r!=null&&r.columns.length)){o(this.rootNode,0);return}const l=s?"childrenAfterSort":"childrenAfterGroup";this.depthFirstSearchRowNodes(o,i,a=>a.leafGroup?null:a[l])}depthFirstSearchRowNodes(o,i=!1,s=l=>l.childrenAfterGroup,n=this.rootNode,r=0){let l=r;if(!n)return l;const a=n===this.rootNode;a||o(n,l++);const{footerSvc:d}=this.beans;if(n.hasChildren()&&!n.footer){const c=s(n);if(c){l=(d==null?void 0:d.addTotalRows(l,n,o,i,a,"top"))??l;for(const u of c)l=this.depthFirstSearchRowNodes(o,i,s,u,l);return(d==null?void 0:d.addTotalRows(l,n,o,i,a,"bottom"))??l}}return l}doAggregate(o){var s;const i=this.rootNode;i&&((s=this.aggStage)==null||s.execute({rowNode:i,changedPath:o}))}doFilterAggregates(o){const i=this.rootNode;this.filterAggStage?this.filterAggStage.execute({rowNode:i,changedPath:o}):i.childrenAfterAggFilter=i.childrenAfterFilter}doSort(o,i){this.sortStage?this.sortStage.execute({rowNode:this.rootNode,changedRowNodes:o,changedPath:i}):i.forEachChangedNodeDepthFirst(s=>{s.childrenAfterSort=s.childrenAfterAggFilter.slice(0),dd(s)})}doRowGrouping(o){var r;const i=this.rootNode,s=(r=this.groupStage)==null?void 0:r.execute({rowNode:i,changedRowNodes:o.changedRowNodes,changedPath:o.changedPath,rowNodesOrderChanged:!!o.rowNodesOrderChanged,afterColumnsChanged:!!o.afterColumnsChanged});if(s!==void 0)return s;const n=i.sibling;return i.childrenAfterGroup=i.allLeafChildren,n&&(n.childrenAfterGroup=i.childrenAfterGroup),i.updateHasChildren(),!1}doFilter(o){this.filterStage?this.filterStage.execute({rowNode:this.rootNode,changedPath:o}):o.forEachChangedNodeDepthFirst(i=>{i.childrenAfterFilter=i.childrenAfterGroup,eR(i)},!0)}doPivot(o){var i;(i=this.pivotStage)==null||i.execute({rowNode:this.rootNode,changedPath:o})}getRowNode(o){var s;const i=this.nodeManager.getRowNode(o);return typeof i=="object"?i:typeof o=="string"&&o.indexOf(Cs)===0?(s=this.groupStage)==null?void 0:s.getNode(o):void 0}batchUpdateRowData(o,i){if(this.applyAsyncTransactionsTimeout==null){this.rowDataTransactionBatch=[];const s=this.gos.get("asyncTransactionWaitMillis");this.applyAsyncTransactionsTimeout=window.setTimeout(()=>{this.isAlive()&&this.executeBatchUpdateRowData()},s)}this.rowDataTransactionBatch.push({rowDataTransaction:o,callback:i})}flushAsyncTransactions(){this.applyAsyncTransactionsTimeout!=null&&(clearTimeout(this.applyAsyncTransactionsTimeout),this.executeBatchUpdateRowData())}executeBatchUpdateRowData(){var r,l;(r=this.valueCache)==null||r.onDataChanged();const o=[],i=[],s=new fn;let n=!1;(l=this.rowDataTransactionBatch)==null||l.forEach(a=>{this.rowNodesCountReady=!0;const{rowNodeTransaction:d,rowsInserted:c}=this.nodeManager.updateRowData(a.rowDataTransaction,s);c&&(n=!0),i.push(d),a.callback&&o.push(a.callback.bind(null,d))}),this.commitTransactions(n,s),o.length>0&&window.setTimeout(()=>{o.forEach(a=>a())},0),i.length>0&&this.eventSvc.dispatchEvent({type:"asyncTransactionsFlushed",results:i}),this.rowDataTransactionBatch=null,this.applyAsyncTransactionsTimeout=void 0}updateRowData(o){var r;(r=this.valueCache)==null||r.onDataChanged(),this.rowNodesCountReady=!0;const i=new fn,{rowNodeTransaction:s,rowsInserted:n}=this.nodeManager.updateRowData(o,i);return this.commitTransactions(n,i),s}commitTransactions(o,i){this.refreshModel({step:"group",rowDataUpdated:!0,rowNodesOrderChanged:o,keepRenderedRows:!0,animate:!this.gos.get("suppressAnimationFrame"),changedRowNodes:i,changedPath:this.createChangePath(!0)})}doRowsToDisplay(){const{flattenStage:o,rootNode:i}=this;let s;if(o)s=o.execute({rowNode:i});else{s=(i==null?void 0:i.childrenAfterSort)??[];for(const n of s)n.setUiLevel(0)}this.rowsToDisplay=s}onRowHeightChanged(){this.refreshModel({step:"map",keepRenderedRows:!0,keepUndoRedoStack:!0})}resetRowHeights(){const o=this.rootNode;if(!o)return;const i=this.resetRowHeightsForAllRowNodes();o.setRowHeight(o.rowHeight,!0),o.sibling&&o.sibling.setRowHeight(o.sibling.rowHeight,!0),i&&this.onRowHeightChanged()}resetRowHeightsForAllRowNodes(){let o=!1;return this.forEachNode(i=>{i.setRowHeight(i.rowHeight,!0);const s=i.detailNode;s&&s.setRowHeight(s.rowHeight,!0),i.sibling&&i.sibling.setRowHeight(i.sibling.rowHeight,!0),o=!0}),o}onGridStylesChanges(o){var i;if(o.rowHeightChanged){if((i=this.beans.rowAutoHeight)!=null&&i.active)return;this.resetRowHeights()}}onGridReady(){this.started||this.setInitialData()}isRowDataLoaded(){return this.rowCountReady}destroy(){super.destroy(),this.started=!1,this.rootNode=null,this.nodeManager=null,this.rowDataTransactionBatch=null,this.orderedStages=hr,this.rowsToDisplay=hr}onRowHeightChangedDebounced(){this.onRowHeightChanged_debounced()}}function rR(e){var t;(t=e.expansionSvc)==null||t.onGroupExpandedOrCollapsed()}function lR(e,t){const o=Te(e);o&&((!t||t==="everything")&&(t="group"),o.refreshModel({step:t,keepRenderedRows:!0,animate:!e.gos.get("suppressAnimationFrame")}))}function aR(e){var t;return((t=Te(e))==null?void 0:t.isEmpty())??!0}function dR(e,t){var o;(o=Te(e))==null||o.forEachLeafNode(t)}function cR(e,t){var o;(o=Te(e))==null||o.forEachNodeAfterFilter(t)}function uR(e,t){var o;(o=Te(e))==null||o.forEachNodeAfterFilterAndSort(t)}function hR(e){var t,o;if((t=e.rowAutoHeight)!=null&&t.active){k(3);return}(o=Te(e))==null||o.resetRowHeights()}function gR(e,t){return e.frameworkOverrides.wrapIncoming(()=>{var o;return(o=Te(e))==null?void 0:o.updateRowData(t)})}function pR(e,t,o){e.frameworkOverrides.wrapIncoming(()=>{var i;return(i=Te(e))==null?void 0:i.batchUpdateRowData(t,o)})}function fR(e){e.frameworkOverrides.wrapIncoming(()=>{var t;return(t=Te(e))==null?void 0:t.flushAsyncTransactions()})}function CR(e){var t;return(t=e.selectionSvc)==null?void 0:t.getBestCostNodeSelection()}const cd={moduleName:"ClientSideRowModel",version:Ii,rowModels:["clientSide"],beans:[Jy,nR,oR],dependsOn:[ga]},ud={moduleName:"ClientSideRowModelApi",version:Ii,apiFunctions:{onGroupExpandedOrCollapsed:rR,refreshClientSideRowModel:lR,isRowDataEmpty:aR,forEachLeafNode:dR,forEachNodeAfterFilter:cR,forEachNodeAfterFilterAndSort:uR,resetRowHeights:hR,applyTransaction:gR,applyTransactionAsync:pR,flushAsyncTransactions:fR,getBestCostNodeSelection:CR},dependsOn:[nS]};class vo{static getComponentDefinition(t,o){let i;return typeof t=="string"?i=this.searchForComponentInstance(o,t):i={extends:E.defineComponent({...t})},i||U(114,{component:t}),i.extends?(i.extends.setup&&(i.setup=i.extends.setup),i.extends.props=this.addParamsToProps(i.extends.props)):i.props=this.addParamsToProps(i.props),i}static addParamsToProps(t){return!t||Array.isArray(t)&&t.indexOf("params")===-1?t=["params",...t||[]]:typeof t=="object"&&!t.params&&(t.params={type:Object}),t}static createAndMountComponent(t,o,i,s){const n=vo.getComponentDefinition(t,i);if(!n)return;const{vm:r,destroy:l,el:a}=this.mount(n,{params:Object.freeze(o)},i,s||{});return{componentInstance:r,element:a,destroy:l}}static mount(t,o,i,s){let n=new E({beforeCreate(){s?(this._provided=Object.create(i.proxy._provided||null),Object.keys(s).forEach(a=>{this._provided[a]=s[a]})):this._provided=i.proxy._provided||{};const l=i.proxy.$root;l&&l.$router&&(Object.defineProperty(this,"$route",{value:i.proxy.$root.$route,writable:!1,configurable:!0}),Object.defineProperty(this,"$router",{value:i.proxy.$root.$router,writable:!1,configurable:!0}))},render(l){return l(t,{props:o})}});return n.$mount(),{vm:n,destroy:()=>{n&&(n.$destroy(),n=null)},el:n.$el}}static searchForComponentInstance(t,o,i=10,s=!1){let n=null,r=0,l=t.proxy.$parent;for(;!n&&l&&l.components&&++r<i;)l.components&&l.components[o]&&(n=l.components[o]),l=l.$parent;for(r=0,l=t.proxy.$parent;!n&&l&&l.$options&&++r<i;){const a=l;a.$options&&a.$options.components&&a.$options.components[o]?n=a.$options.components[o]:a[o]&&(n=a[o]),l=l.$parent}for(r=0,l=t.proxy.$parent;!n&&l&&++r<i;){if(l.exposed){const a=l;a.exposed&&a.exposed[o]?n=a.exposed[o]:a[o]&&(n=a[o])}l=l.$parent}return n||E.options&&E.options.components&&E.options.components[o]&&(n=E.options.components[o]),!n&&!s?(U(114,{component:o}),null):n}}var mR=Object.defineProperty,wR=(e,t,o)=>t in e?mR(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,bo=(e,t,o)=>wR(e,typeof t!="symbol"?t+"":t,o);class vR extends Nv{constructor(t,o){super(),bo(this,"parent"),bo(this,"provides"),this.parent=t,this.provides=o}createWrapper(t){const o=this;class i extends bR{init(r){super.init(r)}hasMethod(r){return s.getFrameworkComponentInstance()[r]}callMethod(r,l){var a,d;const c=this.getFrameworkComponentInstance(),u=s.getFrameworkComponentInstance();if(u[r])return u[r].apply(c,l);{const h=((a=c.$.exposed)==null?void 0:a[r])||((d=c.exposed)==null?void 0:d[r])||c.$.setupState[r];return h==null?void 0:h.apply(c,l)}}addMethod(r,l){s[r]=l}processMethod(r,l){return r==="refresh"&&(this.getFrameworkComponentInstance().params=l[0]),this.hasMethod(r)?this.callMethod(r,l):r==="refresh"}createComponent(r){return o.createComponent(t,r)}}const s=new i;return s}createComponent(t,o){return vo.createAndMountComponent(t,o,this.parent,this.provides)}createMethodProxy(t,o,i){return function(){return t.hasMethod(o)?t.callMethod(o,arguments):(i&&k(233,{methodName:o}),null)}}destroy(){this.parent=null}}class bR{constructor(){bo(this,"componentInstance"),bo(this,"element"),bo(this,"unmount")}getGui(){return this.element}destroy(){this.getFrameworkComponentInstance()&&typeof this.getFrameworkComponentInstance().destroy=="function"&&this.getFrameworkComponentInstance().destroy(),this.unmount()}getFrameworkComponentInstance(){return this.componentInstance}init(t){const{componentInstance:o,element:i,destroy:s}=this.createComponent(t);this.componentInstance=o,this.unmount=s,this.element=i}}var SR=Object.defineProperty,yR=(e,t,o)=>t in e?SR(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,RR=(e,t,o)=>yR(e,t+"",o);class ER extends Fl{constructor(t){super("vue"),RR(this,"parent"),this.parent=t}frameworkComponent(t,o){let i=vo.searchForComponentInstance(this.parent,t,10,!0)?t:null;if(!i&&o&&o[t]){const s=o[t];i=vo.searchForComponentInstance(this.parent,s,10,!0)?s:null}return i}isFrameworkComponent(t){return typeof t=="object"}}function xR(){return{gridOptions:()=>({}),modules:()=>[],statusBar:void 0,sideBar:void 0,suppressContextMenu:void 0,preventDefaultOnContextMenu:void 0,allowContextMenuWithControlKey:void 0,columnMenu:void 0,suppressMenuHide:void 0,enableBrowserTooltips:void 0,tooltipTrigger:void 0,tooltipShowDelay:void 0,tooltipHideDelay:void 0,tooltipMouseTrack:void 0,tooltipShowMode:void 0,tooltipInteraction:void 0,popupParent:void 0,copyHeadersToClipboard:void 0,copyGroupHeadersToClipboard:void 0,clipboardDelimiter:void 0,suppressCopyRowsToClipboard:void 0,suppressCopySingleCellRanges:void 0,suppressLastEmptyLineOnPaste:void 0,suppressClipboardPaste:void 0,suppressClipboardApi:void 0,suppressCutToClipboard:void 0,columnDefs:void 0,defaultColDef:void 0,defaultColGroupDef:void 0,columnTypes:void 0,dataTypeDefinitions:void 0,maintainColumnOrder:void 0,enableStrictPivotColumnOrder:void 0,suppressFieldDotNotation:void 0,headerHeight:void 0,groupHeaderHeight:void 0,floatingFiltersHeight:void 0,pivotHeaderHeight:void 0,pivotGroupHeaderHeight:void 0,hidePaddedHeaderRows:void 0,allowDragFromColumnsToolPanel:void 0,suppressMovableColumns:void 0,suppressColumnMoveAnimation:void 0,suppressMoveWhenColumnDragging:void 0,suppressDragLeaveHidesColumns:void 0,suppressGroupChangesColumnVisibility:void 0,suppressMakeColumnVisibleAfterUnGroup:void 0,suppressRowGroupHidesColumns:void 0,colResizeDefault:void 0,suppressAutoSize:void 0,autoSizePadding:void 0,skipHeaderOnAutoSize:void 0,autoSizeStrategy:void 0,components:void 0,editType:void 0,suppressStartEditOnTab:void 0,getFullRowEditValidationErrors:void 0,invalidEditValueMode:void 0,singleClickEdit:void 0,suppressClickEdit:void 0,readOnlyEdit:void 0,stopEditingWhenCellsLoseFocus:void 0,enterNavigatesVertically:void 0,enterNavigatesVerticallyAfterEdit:void 0,enableCellEditingOnBackspace:void 0,undoRedoCellEditing:void 0,undoRedoCellEditingLimit:void 0,defaultCsvExportParams:void 0,suppressCsvExport:void 0,defaultExcelExportParams:void 0,suppressExcelExport:void 0,excelStyles:void 0,findSearchValue:void 0,findOptions:void 0,quickFilterText:void 0,cacheQuickFilter:void 0,includeHiddenColumnsInQuickFilter:void 0,quickFilterParser:void 0,quickFilterMatcher:void 0,applyQuickFilterBeforePivotOrAgg:void 0,excludeChildrenWhenTreeDataFiltering:void 0,enableAdvancedFilter:void 0,alwaysPassFilter:void 0,includeHiddenColumnsInAdvancedFilter:void 0,advancedFilterParent:void 0,advancedFilterBuilderParams:void 0,advancedFilterParams:void 0,suppressAdvancedFilterEval:void 0,suppressSetFilterByDefault:void 0,enableFilterHandlers:void 0,filterHandlers:void 0,loadingCellRenderer:void 0,loadingCellRendererParams:void 0,loadingCellRendererSelector:void 0,localeText:void 0,masterDetail:void 0,keepDetailRows:void 0,keepDetailRowsCount:void 0,detailCellRenderer:void 0,detailCellRendererParams:void 0,detailRowHeight:void 0,detailRowAutoHeight:void 0,context:void 0,alignedGrids:void 0,tabIndex:void 0,rowBuffer:void 0,valueCache:void 0,valueCacheNeverExpires:void 0,enableCellExpressions:void 0,suppressTouch:void 0,suppressFocusAfterRefresh:void 0,suppressBrowserResizeObserver:void 0,suppressPropertyNamesCheck:void 0,suppressChangeDetection:void 0,debug:void 0,loading:void 0,overlayLoadingTemplate:void 0,loadingOverlayComponent:void 0,loadingOverlayComponentParams:void 0,suppressLoadingOverlay:void 0,overlayNoRowsTemplate:void 0,noRowsOverlayComponent:void 0,noRowsOverlayComponentParams:void 0,suppressNoRowsOverlay:void 0,pagination:void 0,paginationPageSize:void 0,paginationPageSizeSelector:void 0,paginationAutoPageSize:void 0,paginateChildRows:void 0,suppressPaginationPanel:void 0,pivotMode:void 0,pivotPanelShow:void 0,pivotMaxGeneratedColumns:void 0,pivotDefaultExpanded:void 0,pivotColumnGroupTotals:void 0,pivotRowTotals:void 0,pivotSuppressAutoColumn:void 0,suppressExpandablePivotGroups:void 0,functionsReadOnly:void 0,aggFuncs:void 0,suppressAggFuncInHeader:void 0,alwaysAggregateAtRootLevel:void 0,aggregateOnlyChangedColumns:void 0,suppressAggFilteredOnly:void 0,removePivotHeaderRowWhenSingleValueColumn:void 0,animateRows:void 0,cellFlashDuration:void 0,cellFadeDuration:void 0,allowShowChangeAfterFilter:void 0,domLayout:void 0,ensureDomOrder:void 0,enableCellSpan:void 0,enableRtl:void 0,suppressColumnVirtualisation:void 0,suppressMaxRenderedRowRestriction:void 0,suppressRowVirtualisation:void 0,rowDragManaged:void 0,rowDragInsertDelay:void 0,suppressRowDrag:void 0,suppressMoveWhenRowDragging:void 0,rowDragEntireRow:void 0,rowDragMultiRow:void 0,rowDragText:void 0,dragAndDropImageComponent:void 0,dragAndDropImageComponentParams:void 0,fullWidthCellRenderer:void 0,fullWidthCellRendererParams:void 0,embedFullWidthRows:void 0,groupDisplayType:void 0,groupDefaultExpanded:void 0,autoGroupColumnDef:void 0,groupMaintainOrder:void 0,groupSelectsChildren:void 0,groupLockGroupColumns:void 0,groupAggFiltering:void 0,groupTotalRow:void 0,grandTotalRow:void 0,suppressStickyTotalRow:void 0,groupSuppressBlankHeader:void 0,groupSelectsFiltered:void 0,showOpenedGroup:void 0,groupHideParentOfSingleChild:void 0,groupRemoveSingleChildren:void 0,groupRemoveLowestSingleChildren:void 0,groupHideOpenParents:void 0,groupAllowUnbalanced:void 0,rowGroupPanelShow:void 0,groupRowRenderer:void 0,groupRowRendererParams:void 0,treeData:void 0,treeDataChildrenField:void 0,treeDataParentIdField:void 0,rowGroupPanelSuppressSort:void 0,suppressGroupRowsSticky:void 0,groupHierarchyConfig:void 0,pinnedTopRowData:void 0,pinnedBottomRowData:void 0,enableRowPinning:void 0,isRowPinnable:void 0,isRowPinned:void 0,rowModelType:void 0,rowData:void 0,asyncTransactionWaitMillis:void 0,suppressModelUpdateAfterUpdateTransaction:void 0,datasource:void 0,cacheOverflowSize:void 0,infiniteInitialRowCount:void 0,serverSideInitialRowCount:void 0,suppressServerSideFullWidthLoadingRow:void 0,cacheBlockSize:void 0,maxBlocksInCache:void 0,maxConcurrentDatasourceRequests:void 0,blockLoadDebounceMillis:void 0,purgeClosedRowNodes:void 0,serverSideDatasource:void 0,serverSideSortAllLevels:void 0,serverSideEnableClientSideSort:void 0,serverSideOnlyRefreshFilteredGroups:void 0,serverSidePivotResultFieldSeparator:void 0,viewportDatasource:void 0,viewportRowModelPageSize:void 0,viewportRowModelBufferSize:void 0,alwaysShowHorizontalScroll:void 0,alwaysShowVerticalScroll:void 0,debounceVerticalScrollbar:void 0,suppressHorizontalScroll:void 0,suppressScrollOnNewData:void 0,suppressScrollWhenPopupsAreOpen:void 0,suppressAnimationFrame:void 0,suppressMiddleClickScrolls:void 0,suppressPreventDefaultOnMouseWheel:void 0,scrollbarWidth:void 0,rowSelection:void 0,cellSelection:void 0,rowMultiSelectWithClick:void 0,suppressRowDeselection:void 0,suppressRowClickSelection:void 0,suppressCellFocus:void 0,suppressHeaderFocus:void 0,selectionColumnDef:void 0,rowNumbers:void 0,suppressMultiRangeSelection:void 0,enableCellTextSelection:void 0,enableRangeSelection:void 0,enableRangeHandle:void 0,enableFillHandle:void 0,fillHandleDirection:void 0,suppressClearOnFillReduction:void 0,sortingOrder:void 0,accentedSort:void 0,unSortIcon:void 0,suppressMultiSort:void 0,alwaysMultiSort:void 0,multiSortKey:void 0,suppressMaintainUnsortedOrder:void 0,icons:void 0,rowHeight:void 0,rowStyle:void 0,rowClass:void 0,rowClassRules:void 0,suppressRowHoverHighlight:void 0,suppressRowTransform:void 0,columnHoverHighlight:void 0,gridId:void 0,deltaSort:void 0,treeDataDisplayType:void 0,enableGroupEdit:void 0,initialState:void 0,theme:void 0,loadThemeGoogleFonts:void 0,themeCssLayer:void 0,styleNonce:void 0,themeStyleContainer:void 0,getContextMenuItems:void 0,getMainMenuItems:void 0,postProcessPopup:void 0,processUnpinnedColumns:void 0,processCellForClipboard:void 0,processHeaderForClipboard:void 0,processGroupHeaderForClipboard:void 0,processCellFromClipboard:void 0,sendToClipboard:void 0,processDataFromClipboard:void 0,isExternalFilterPresent:void 0,doesExternalFilterPass:void 0,getChartToolbarItems:void 0,createChartContainer:void 0,focusGridInnerElement:void 0,navigateToNextHeader:void 0,tabToNextHeader:void 0,navigateToNextCell:void 0,tabToNextCell:void 0,getLocaleText:void 0,getDocument:void 0,paginationNumberFormatter:void 0,getGroupRowAgg:void 0,isGroupOpenByDefault:void 0,ssrmExpandAllAffectsAllRows:void 0,initialGroupOrderComparator:void 0,processPivotResultColDef:void 0,processPivotResultColGroupDef:void 0,getDataPath:void 0,getChildCount:void 0,getServerSideGroupLevelParams:void 0,isServerSideGroupOpenByDefault:void 0,isApplyServerSideTransaction:void 0,isServerSideGroup:void 0,getServerSideGroupKey:void 0,getBusinessKeyForNode:void 0,getRowId:void 0,resetRowDataOnUpdate:void 0,processRowPostCreate:void 0,isRowSelectable:void 0,isRowMaster:void 0,fillOperation:void 0,postSortRows:void 0,getRowStyle:void 0,getRowClass:void 0,getRowHeight:void 0,isFullWidthRow:void 0,isRowValidDropPosition:void 0,"onColumn-everything-changed":void 0,"onNew-columns-loaded":void 0,"onColumn-pivot-mode-changed":void 0,"onPivot-max-columns-exceeded":void 0,"onColumn-row-group-changed":void 0,"onExpand-or-collapse-all":void 0,"onColumn-pivot-changed":void 0,"onGrid-columns-changed":void 0,"onColumn-value-changed":void 0,"onColumn-moved":void 0,"onColumn-visible":void 0,"onColumn-pinned":void 0,"onColumn-group-opened":void 0,"onColumn-resized":void 0,"onDisplayed-columns-changed":void 0,"onVirtual-columns-changed":void 0,"onColumn-header-mouse-over":void 0,"onColumn-header-mouse-leave":void 0,"onColumn-header-clicked":void 0,"onColumn-header-context-menu":void 0,"onAsync-transactions-flushed":void 0,"onRow-group-opened":void 0,"onRow-data-updated":void 0,"onPinned-row-data-changed":void 0,"onPinned-rows-changed":void 0,"onRange-selection-changed":void 0,"onCell-selection-changed":void 0,"onChart-created":void 0,"onChart-range-selection-changed":void 0,"onChart-options-changed":void 0,"onChart-destroyed":void 0,"onTool-panel-visible-changed":void 0,"onTool-panel-size-changed":void 0,"onModel-updated":void 0,"onCut-start":void 0,"onCut-end":void 0,"onPaste-start":void 0,"onPaste-end":void 0,"onFill-start":void 0,"onFill-end":void 0,"onCell-selection-delete-start":void 0,"onCell-selection-delete-end":void 0,"onRange-delete-start":void 0,"onRange-delete-end":void 0,"onUndo-started":void 0,"onUndo-ended":void 0,"onRedo-started":void 0,"onRedo-ended":void 0,"onCell-clicked":void 0,"onCell-double-clicked":void 0,"onCell-mouse-down":void 0,"onCell-context-menu":void 0,"onCell-value-changed":void 0,"onCell-edit-request":void 0,"onRow-value-changed":void 0,"onHeader-focused":void 0,"onCell-focused":void 0,"onRow-selected":void 0,"onSelection-changed":void 0,"onTooltip-show":void 0,"onTooltip-hide":void 0,"onCell-key-down":void 0,"onCell-mouse-over":void 0,"onCell-mouse-out":void 0,"onFilter-changed":void 0,"onFilter-modified":void 0,"onFilter-ui-changed":void 0,"onFilter-opened":void 0,"onFloating-filter-ui-changed":void 0,"onAdvanced-filter-builder-visible-changed":void 0,"onSort-changed":void 0,"onVirtual-row-removed":void 0,"onRow-clicked":void 0,"onRow-double-clicked":void 0,"onGrid-ready":void 0,"onGrid-pre-destroyed":void 0,"onGrid-size-changed":void 0,"onViewport-changed":void 0,"onFirst-data-rendered":void 0,"onDrag-started":void 0,"onDrag-stopped":void 0,"onDrag-cancelled":void 0,"onRow-editing-started":void 0,"onRow-editing-stopped":void 0,"onCell-editing-started":void 0,"onCell-editing-stopped":void 0,"onBody-scroll":void 0,"onBody-scroll-end":void 0,"onPagination-changed":void 0,"onComponent-state-changed":void 0,"onStore-refreshed":void 0,"onState-updated":void 0,"onColumn-menu-visible-changed":void 0,"onContext-menu-visible-changed":void 0,"onRow-drag-enter":void 0,"onRow-drag-move":void 0,"onRow-drag-leave":void 0,"onRow-drag-end":void 0,"onRow-drag-cancel":void 0,"onFind-changed":void 0,"onRow-resize-started":void 0,"onRow-resize-ended":void 0,"onColumns-reset":void 0,"onBulk-editing-started":void 0,"onBulk-editing-stopped":void 0,"onBatch-editing-started":void 0,"onBatch-editing-stopped":void 0}}const DR=(e,t)=>{let o;return()=>{const i=function(){e()};window.clearTimeout(o),o=window.setTimeout(i,t)}};function FR(e){return e&&e.constructor&&e.constructor.toString().substring(0,5)==="class"}function So(e){const t=new WeakSet,o=i=>{if(FR(i))return E.toRaw(i);if(E.isRef(i)||E.isReactive(i)||E.isProxy(i)){const s=E.toRaw(i);return s===i?i:o(s)}if(i!==null&&typeof i=="object"){if(t.has(i))return i;t.add(i)}return Array.isArray(i)?i.map(s=>o(s)):i};return o(e)}const PR=E.defineComponent({__name:"AgGridVue",props:E.mergeDefaults({gridOptions:null,modules:null,modelValue:null,statusBar:null,sideBar:{type:[String,Boolean]},suppressContextMenu:{type:Boolean},preventDefaultOnContextMenu:{type:Boolean},allowContextMenuWithControlKey:{type:Boolean},columnMenu:null,suppressMenuHide:{type:Boolean},enableBrowserTooltips:{type:Boolean},tooltipTrigger:null,tooltipShowDelay:null,tooltipHideDelay:null,tooltipMouseTrack:{type:Boolean},tooltipShowMode:null,tooltipInteraction:{type:Boolean},popupParent:null,copyHeadersToClipboard:{type:Boolean},copyGroupHeadersToClipboard:{type:Boolean},clipboardDelimiter:null,suppressCopyRowsToClipboard:{type:Boolean},suppressCopySingleCellRanges:{type:Boolean},suppressLastEmptyLineOnPaste:{type:Boolean},suppressClipboardPaste:{type:Boolean},suppressClipboardApi:{type:Boolean},suppressCutToClipboard:{type:Boolean},columnDefs:null,defaultColDef:null,defaultColGroupDef:null,columnTypes:null,dataTypeDefinitions:null,maintainColumnOrder:{type:Boolean},enableStrictPivotColumnOrder:{type:Boolean},suppressFieldDotNotation:{type:Boolean},headerHeight:null,groupHeaderHeight:null,floatingFiltersHeight:null,pivotHeaderHeight:null,pivotGroupHeaderHeight:null,hidePaddedHeaderRows:{type:Boolean},allowDragFromColumnsToolPanel:{type:Boolean},suppressMovableColumns:{type:Boolean},suppressColumnMoveAnimation:{type:Boolean},suppressMoveWhenColumnDragging:{type:Boolean},suppressDragLeaveHidesColumns:{type:Boolean},suppressGroupChangesColumnVisibility:{type:[Boolean,String]},suppressMakeColumnVisibleAfterUnGroup:{type:Boolean},suppressRowGroupHidesColumns:{type:Boolean},colResizeDefault:null,suppressAutoSize:{type:Boolean},autoSizePadding:null,skipHeaderOnAutoSize:{type:Boolean},autoSizeStrategy:null,components:null,editType:null,suppressStartEditOnTab:{type:Boolean},getFullRowEditValidationErrors:null,invalidEditValueMode:null,singleClickEdit:{type:Boolean},suppressClickEdit:{type:Boolean},readOnlyEdit:{type:Boolean},stopEditingWhenCellsLoseFocus:{type:Boolean},enterNavigatesVertically:{type:Boolean},enterNavigatesVerticallyAfterEdit:{type:Boolean},enableCellEditingOnBackspace:{type:Boolean},undoRedoCellEditing:{type:Boolean},undoRedoCellEditingLimit:null,defaultCsvExportParams:null,suppressCsvExport:{type:Boolean},defaultExcelExportParams:null,suppressExcelExport:{type:Boolean},excelStyles:null,findSearchValue:null,findOptions:null,quickFilterText:null,cacheQuickFilter:{type:Boolean},includeHiddenColumnsInQuickFilter:{type:Boolean},quickFilterParser:{type:Function},quickFilterMatcher:{type:Function},applyQuickFilterBeforePivotOrAgg:{type:Boolean},excludeChildrenWhenTreeDataFiltering:{type:Boolean},enableAdvancedFilter:{type:Boolean},alwaysPassFilter:{type:Function},includeHiddenColumnsInAdvancedFilter:{type:Boolean},advancedFilterParent:null,advancedFilterBuilderParams:null,advancedFilterParams:null,suppressAdvancedFilterEval:{type:Boolean},suppressSetFilterByDefault:{type:Boolean},enableFilterHandlers:{type:Boolean},filterHandlers:null,loadingCellRenderer:null,loadingCellRendererParams:null,loadingCellRendererSelector:null,localeText:null,masterDetail:{type:Boolean},keepDetailRows:{type:Boolean},keepDetailRowsCount:null,detailCellRenderer:null,detailCellRendererParams:null,detailRowHeight:null,detailRowAutoHeight:{type:Boolean},context:null,alignedGrids:{type:Function},tabIndex:null,rowBuffer:null,valueCache:{type:Boolean},valueCacheNeverExpires:{type:Boolean},enableCellExpressions:{type:Boolean},suppressTouch:{type:Boolean},suppressFocusAfterRefresh:{type:Boolean},suppressBrowserResizeObserver:{type:Boolean},suppressPropertyNamesCheck:{type:Boolean},suppressChangeDetection:{type:Boolean},debug:{type:Boolean},loading:{type:Boolean},overlayLoadingTemplate:null,loadingOverlayComponent:null,loadingOverlayComponentParams:null,suppressLoadingOverlay:{type:Boolean},overlayNoRowsTemplate:null,noRowsOverlayComponent:null,noRowsOverlayComponentParams:null,suppressNoRowsOverlay:{type:Boolean},pagination:{type:Boolean},paginationPageSize:null,paginationPageSizeSelector:{type:Boolean},paginationAutoPageSize:{type:Boolean},paginateChildRows:{type:Boolean},suppressPaginationPanel:{type:Boolean},pivotMode:{type:Boolean},pivotPanelShow:null,pivotMaxGeneratedColumns:null,pivotDefaultExpanded:null,pivotColumnGroupTotals:null,pivotRowTotals:null,pivotSuppressAutoColumn:{type:Boolean},suppressExpandablePivotGroups:{type:Boolean},functionsReadOnly:{type:Boolean},aggFuncs:null,suppressAggFuncInHeader:{type:Boolean},alwaysAggregateAtRootLevel:{type:Boolean},aggregateOnlyChangedColumns:{type:Boolean},suppressAggFilteredOnly:{type:Boolean},removePivotHeaderRowWhenSingleValueColumn:{type:Boolean},animateRows:{type:Boolean},cellFlashDuration:null,cellFadeDuration:null,allowShowChangeAfterFilter:{type:Boolean},domLayout:null,ensureDomOrder:{type:Boolean},enableCellSpan:{type:Boolean},enableRtl:{type:Boolean},suppressColumnVirtualisation:{type:Boolean},suppressMaxRenderedRowRestriction:{type:Boolean},suppressRowVirtualisation:{type:Boolean},rowDragManaged:{type:Boolean},rowDragInsertDelay:null,suppressRowDrag:{type:Boolean},suppressMoveWhenRowDragging:{type:Boolean},rowDragEntireRow:{type:Boolean},rowDragMultiRow:{type:Boolean},rowDragText:{type:Function},dragAndDropImageComponent:null,dragAndDropImageComponentParams:null,fullWidthCellRenderer:null,fullWidthCellRendererParams:null,embedFullWidthRows:{type:Boolean},groupDisplayType:null,groupDefaultExpanded:null,autoGroupColumnDef:null,groupMaintainOrder:{type:Boolean},groupSelectsChildren:{type:Boolean},groupLockGroupColumns:null,groupAggFiltering:{type:Boolean},groupTotalRow:null,grandTotalRow:null,suppressStickyTotalRow:{type:[Boolean,String]},groupSuppressBlankHeader:{type:Boolean},groupSelectsFiltered:{type:Boolean},showOpenedGroup:{type:Boolean},groupHideParentOfSingleChild:{type:[Boolean,String]},groupRemoveSingleChildren:{type:Boolean},groupRemoveLowestSingleChildren:{type:Boolean},groupHideOpenParents:{type:Boolean},groupAllowUnbalanced:{type:Boolean},rowGroupPanelShow:null,groupRowRenderer:null,groupRowRendererParams:null,treeData:{type:Boolean},treeDataChildrenField:null,treeDataParentIdField:null,rowGroupPanelSuppressSort:{type:Boolean},suppressGroupRowsSticky:{type:Boolean},groupHierarchyConfig:null,pinnedTopRowData:null,pinnedBottomRowData:null,enableRowPinning:{type:[Boolean,String]},isRowPinnable:null,isRowPinned:null,rowModelType:null,rowData:null,asyncTransactionWaitMillis:null,suppressModelUpdateAfterUpdateTransaction:{type:Boolean},datasource:null,cacheOverflowSize:null,infiniteInitialRowCount:null,serverSideInitialRowCount:null,suppressServerSideFullWidthLoadingRow:{type:Boolean},cacheBlockSize:null,maxBlocksInCache:null,maxConcurrentDatasourceRequests:null,blockLoadDebounceMillis:null,purgeClosedRowNodes:{type:Boolean},serverSideDatasource:null,serverSideSortAllLevels:{type:Boolean},serverSideEnableClientSideSort:{type:Boolean},serverSideOnlyRefreshFilteredGroups:{type:Boolean},serverSidePivotResultFieldSeparator:null,viewportDatasource:null,viewportRowModelPageSize:null,viewportRowModelBufferSize:null,alwaysShowHorizontalScroll:{type:Boolean},alwaysShowVerticalScroll:{type:Boolean},debounceVerticalScrollbar:{type:Boolean},suppressHorizontalScroll:{type:Boolean},suppressScrollOnNewData:{type:Boolean},suppressScrollWhenPopupsAreOpen:{type:Boolean},suppressAnimationFrame:{type:Boolean},suppressMiddleClickScrolls:{type:Boolean},suppressPreventDefaultOnMouseWheel:{type:Boolean},scrollbarWidth:null,rowSelection:null,cellSelection:{type:Boolean},rowMultiSelectWithClick:{type:Boolean},suppressRowDeselection:{type:Boolean},suppressRowClickSelection:{type:Boolean},suppressCellFocus:{type:Boolean},suppressHeaderFocus:{type:Boolean},selectionColumnDef:null,rowNumbers:{type:Boolean},suppressMultiRangeSelection:{type:Boolean},enableCellTextSelection:{type:Boolean},enableRangeSelection:{type:Boolean},enableRangeHandle:{type:Boolean},enableFillHandle:{type:Boolean},fillHandleDirection:null,suppressClearOnFillReduction:{type:Boolean},sortingOrder:null,accentedSort:{type:Boolean},unSortIcon:{type:Boolean},suppressMultiSort:{type:Boolean},alwaysMultiSort:{type:Boolean},multiSortKey:null,suppressMaintainUnsortedOrder:{type:Boolean},icons:null,rowHeight:null,rowStyle:null,rowClass:null,rowClassRules:null,suppressRowHoverHighlight:{type:Boolean},suppressRowTransform:{type:Boolean},columnHoverHighlight:{type:Boolean},gridId:null,deltaSort:{type:Boolean},treeDataDisplayType:null,enableGroupEdit:{type:Boolean},initialState:null,theme:null,loadThemeGoogleFonts:{type:Boolean},themeCssLayer:null,styleNonce:null,themeStyleContainer:null,getContextMenuItems:null,getMainMenuItems:null,postProcessPopup:{type:Function},processUnpinnedColumns:{type:Function},processCellForClipboard:{type:Function},processHeaderForClipboard:{type:Function},processGroupHeaderForClipboard:{type:Function},processCellFromClipboard:{type:Function},sendToClipboard:{type:Function},processDataFromClipboard:{type:Function},isExternalFilterPresent:{type:Function},doesExternalFilterPass:{type:Function},getChartToolbarItems:null,createChartContainer:{type:Function},focusGridInnerElement:{type:Function},navigateToNextHeader:{type:Function},tabToNextHeader:{type:Function},navigateToNextCell:{type:Function},tabToNextCell:{type:Function},getLocaleText:{type:Function},getDocument:{type:Function},paginationNumberFormatter:{type:Function},getGroupRowAgg:{type:Function},isGroupOpenByDefault:{type:Function},ssrmExpandAllAffectsAllRows:{type:Boolean},initialGroupOrderComparator:{type:Function},processPivotResultColDef:{type:Function},processPivotResultColGroupDef:{type:Function},getDataPath:null,getChildCount:{type:Function},getServerSideGroupLevelParams:{type:Function},isServerSideGroupOpenByDefault:{type:Function},isApplyServerSideTransaction:null,isServerSideGroup:null,getServerSideGroupKey:null,getBusinessKeyForNode:{type:Function},getRowId:null,resetRowDataOnUpdate:{type:Boolean},processRowPostCreate:{type:Function},isRowSelectable:null,isRowMaster:null,fillOperation:{type:Function},postSortRows:{type:Function},getRowStyle:{type:Function},getRowClass:{type:Function},getRowHeight:{type:Function},isFullWidthRow:{type:Function},isRowValidDropPosition:null,"onTool-panel-visible-changed":null,"onTool-panel-size-changed":null,"onColumn-menu-visible-changed":null,"onContext-menu-visible-changed":null,"onCut-start":null,"onCut-end":null,"onPaste-start":null,"onPaste-end":null,"onColumn-visible":null,"onColumn-pinned":null,"onColumn-resized":null,"onColumn-moved":null,"onColumn-value-changed":null,"onColumn-pivot-mode-changed":null,"onColumn-pivot-changed":null,"onColumn-group-opened":null,"onNew-columns-loaded":null,"onGrid-columns-changed":null,"onDisplayed-columns-changed":null,"onVirtual-columns-changed":null,"onColumn-everything-changed":null,"onColumns-reset":null,"onColumn-header-mouse-over":null,"onColumn-header-mouse-leave":null,"onColumn-header-clicked":null,"onColumn-header-context-menu":null,"onComponent-state-changed":null,"onCell-value-changed":null,"onCell-edit-request":null,"onRow-value-changed":null,"onCell-editing-started":null,"onCell-editing-stopped":null,"onRow-editing-started":null,"onRow-editing-stopped":null,"onBulk-editing-started":null,"onBulk-editing-stopped":null,"onBatch-editing-started":null,"onBatch-editing-stopped":null,"onUndo-started":null,"onUndo-ended":null,"onRedo-started":null,"onRedo-ended":null,"onCell-selection-delete-start":null,"onCell-selection-delete-end":null,"onRange-delete-start":null,"onRange-delete-end":null,"onFill-start":null,"onFill-end":null,"onFilter-opened":null,"onFilter-changed":null,"onFilter-modified":null,"onFilter-ui-changed":null,"onFloating-filter-ui-changed":null,"onAdvanced-filter-builder-visible-changed":null,"onFind-changed":null,"onChart-created":null,"onChart-range-selection-changed":null,"onChart-options-changed":null,"onChart-destroyed":null,"onCell-key-down":null,"onGrid-ready":null,"onGrid-pre-destroyed":null,"onFirst-data-rendered":null,"onGrid-size-changed":null,"onModel-updated":null,"onVirtual-row-removed":null,"onViewport-changed":null,"onBody-scroll":null,"onBody-scroll-end":null,"onDrag-started":null,"onDrag-stopped":null,"onDrag-cancelled":null,"onState-updated":null,"onPagination-changed":null,"onRow-drag-enter":null,"onRow-drag-move":null,"onRow-drag-leave":null,"onRow-drag-end":null,"onRow-drag-cancel":null,"onRow-resize-started":null,"onRow-resize-ended":null,"onColumn-row-group-changed":null,"onRow-group-opened":null,"onExpand-or-collapse-all":null,"onPivot-max-columns-exceeded":null,"onPinned-row-data-changed":null,"onPinned-rows-changed":null,"onRow-data-updated":null,"onAsync-transactions-flushed":null,"onStore-refreshed":null,"onHeader-focused":null,"onCell-clicked":null,"onCell-double-clicked":null,"onCell-focused":null,"onCell-mouse-over":null,"onCell-mouse-out":null,"onCell-mouse-down":null,"onRow-clicked":null,"onRow-double-clicked":null,"onRow-selected":null,"onSelection-changed":null,"onCell-context-menu":null,"onRange-selection-changed":null,"onCell-selection-changed":null,"onTooltip-show":null,"onTooltip-hide":null,"onSort-changed":null},xR()),emits:["update:modelValue"],setup(e,{expose:t,emit:o}){const i=e,s=E.ref(),n=E.ref(void 0),r=E.ref(!1),l=E.ref(!1),a=E.ref(!1),d=E.ref({}),c=E.ref(null),u=E.toRefs(i);on().filter(F=>F!="gridOptions").forEach(F=>{E.watch(()=>u[F],(P,T)=>{(F==="rowData"&&!f.value||F!=="rowData")&&I(F,P),f.value=!1},{deep:!0})});const h=new Set(["rowDataUpdated","cellValueChanged","rowValueChanged"]),g=E.ref(i.modelValue),p=E.ref(!1),f=E.ref(!1);E.watch(()=>i.modelValue,F=>{g.value=F}),E.watch(g,(F,P)=>{r.value&&(f.value||(p.value=!0,I("rowData",So(F),So(P))),f.value=!1)},{deep:!0});const C=DR(()=>{f.value=!0,o("update:modelValue",S())},10),m=E.getCurrentInstance(),w=F=>{var P;a.value&&h.has(F)&&(P=m==null?void 0:m.proxy)!=null&&P.$props["onUpdate:modelValue"]&&C()},b=()=>{var F;(i.rowData||(F=i.gridOptions)!=null&&F.rowData)&&g.value&&k(232)},v=()=>{var F;return g.value||i.rowData||((F=i.gridOptions)==null?void 0:F.rowData)},S=()=>{const F=[];return n==null||n.value.forEachLeafNode(P=>{F.push(P.data)}),F},D=F=>P=>{if(l.value)return;P==="gridReady"&&(a.value=!0);const T=ho.has(P);T&&!F||!T&&F||h.has(P)&&(p.value||w(P),p.value=!1)},I=(F,P,T)=>{if(r.value){let V=P.value||P;F==="rowData"&&V!=null&&(V=So(V)),d.value[F]=V,c.value==null&&(c.value=window.setTimeout(()=>{c.value=null,xc(d.value,n.value),d.value={}},0))}},O=()=>Object.create(E.getCurrentInstance().proxy._provided);return E.onMounted(()=>{Et(Ha,void 0,!0);const F=new vR(E.getCurrentInstance(),O()),P={globalListener:D(),globalSyncListener:D(!0),frameworkOverrides:new ER(E.getCurrentInstance()),providedBeanInstances:{frameworkCompWrapper:F},modules:i.modules},T=E.markRaw(Ec(So(i.gridOptions),i,[...on(),...Object.values(bi)])),V=v();V!==void 0&&(T.rowData=So(V)),n.value=kv(s.value,T,P),r.value=!0}),E.onUnmounted(()=>{var F;r.value&&((F=n==null?void 0:n.value)==null||F.destroy(),l.value=!0)}),t({api:n}),{__sfc:!0,props:i,rootRef:s,api:n,gridCreated:r,isDestroyed:l,gridReadyFired:a,batchChanges:d,batchTimeout:c,propsAsRefs:u,ROW_DATA_EVENTS:h,rowDataModel:g,rowDataUpdating:p,emittingRowData:f,emits:o,emitRowModel:C,thisInstance:m,updateModelIfUsed:w,checkForBindingConflicts:b,getRowDataBasedOnBindings:v,getRowData:S,globalEventListenerFactory:D,processChanges:I,getProvides:O}}});function se(e,t,o,i,s,n,r,l){var a=typeof e=="function"?e.options:e;return t&&(a.render=t,a.staticRenderFns=o,a._compiled=!0),n&&(a._scopeId="data-v-"+n),{exports:e,options:a}}var TR=function(){var t=this,o=t._self._c;return t._self._setupProxy,o("div",{ref:"rootRef"})},IR=[],AR=se(PR,TR,IR,!1,null,"60566900");const hd=AR.exports,MR=e=>{const t=E.getCurrentInstance(),o={id:e.id,rowIdMapper:e.rowIdMapper,columns:e.columns,rowData:e.rowData,pageSize:e.pageSize,gridOptions:e.gridOptions,footerHeight:e.footerHeight,editable:e.editable,onRowChange:e.onRowChange,onError:i=>Ad.Message.error(i),instanceCtx:{getInstanceName:i=>{var s,n;return(n=(s=i==null?void 0:i.$options)==null?void 0:s.name)!=null?n:null},getParentInstance:i=>{var s;return(s=i==null?void 0:i.$parent)!=null?s:null}},currentInstance:t==null?void 0:t.proxy};return ed(o)},gd={functional:!0,name:"VNodeRender",props:["params"],render(e,t){var o;const i=t.props.params;return i.render?i.render(i):e("span",(o=i.valueFormatted)!=null?o:i.value)}},kR={functional:!0,props:{params:{type:Object,required:!0}},render(e,t){const o=e("",{});return o.text=`${t.props.params.column.getColId()} holder`,o}},LR=E.defineComponent({name:"CellRenderer"}),GR=E.defineComponent({...LR,props:{params:null},setup(e){const t=e,o=E.computed(()=>{const r=t.params.data,l=r.isEditing()&&t.params.editeRender?t.params.editeRender:t.params.render,a={...t.params,render:l};if(r instanceof Ot){const d=r.getCell(a.column);if(!d)return a.render=t.params.render,a;const{hostArray:c,hostObject:u}=r.getHostObject(a);r.getActualRow().isCellEditing(t.params.node.id,t.params.column)||(a.render=t.params.render),a.hostObject=u,a.hostArrayHook=g=>{var p;let f=c;((p=a.colDef)==null?void 0:p.cellDataType)==="array"&&!c&&(f=[],H.set(r.getData(),d.path,f)),f&&(g(f),r.buildSpan(),a.context.reload(),a.api.redrawRows({rowNodes:a.api.getRenderedNodes().filter(C=>r.match(C))}))}}return a}),i=E.computed(()=>{const r=t.params.data,l=r.getActualRow();if(l.isEditing()&&t.params.editeRender){const d=l.getSourceRow().getData(),c=r.getCell(t.params.column);return c?!H.isEqual(H.get(d,c.getReadPath()),t.params.value):!1}return!1}),s=E.computed(()=>t.params.data.isTransient()),n=E.computed(()=>t.params.data.getRowSpan(t.params.column));return{__sfc:!0,props:t,eventParams:o,isChange:i,isDraft:s,rowSpan:n,VNodeRenderer:gd,CellHolder:kR}}});var HR=function(){var t=this,o=t._self._c,i=t._self._setupProxy;return i.rowSpan>0?o("div",{staticClass:"custom-cell"},[i.isChange?o("span",{staticClass:"value-change"}):t._e(),i.isDraft?o("span",{staticClass:"value-change transient"}):t._e(),o(i.VNodeRenderer,{attrs:{params:i.eventParams}})],1):o(i.CellHolder,{attrs:{params:i.eventParams}})},OR=[],BR=se(GR,HR,OR,!1,null,null);const VR=BR.exports,NR=E.defineComponent({name:"GridToolbar"}),_R=E.defineComponent({...NR,setup(e){return{__sfc:!0}}});var WR=function(){var t=this,o=t._self._c;return t._self._setupProxy,o("div",{staticClass:"grid-toolbar"},[o("div",{staticClass:"grid-toolbar-left"},[t._t("default")],2),o("div",{staticClass:"grid-toolbar-right"},[t._t("system")],2)])},zR=[],$R=se(_R,WR,zR,!1,null,"f12c2536");const pd=$R.exports,UR=E.defineComponent({__name:"FooterCellRender",props:{params:null},setup(e){return{__sfc:!0,props:e,VNodeRenderer:gd}}});var KR=function(){var t=this,o=t._self._c,i=t._self._setupProxy;return o("div",{staticClass:"custom-cell"},[o(i.VNodeRenderer,{attrs:{params:t.params}})],1)},jR=[],qR=se(UR,KR,jR,!1,null,"4998e205");const YR=qR.exports,ZR=E.defineComponent({name:"SearchItem",props:{search:{type:Object,required:!0},teleported:{type:Boolean}},setup(e){return()=>e.search.render(e.search)}});var QR=se(ZR,null,null,!1,null,"e1931525");const Cn=QR.exports,XR=E.defineComponent({name:"ClSearch"}),JR=E.defineComponent({...XR,props:{search:null,teleported:{type:Boolean},searchRemote:{type:Function},id:null,confirmButtonText:{default:"搜索"},resetButtonText:{default:"重置"},autoResetSearch:{type:Boolean,default:!0},enable:{type:Boolean,default:!0}},setup(e){const t=e,o=E.ref(),i=E.ref(),s=()=>{t.search.forEach(c=>{c.value=H.cloneDeep(c.initValue)})},n=E.computed(()=>`${t.id}_SEARCH`),r=()=>{localStorage.setItem(n.value,JSON.stringify(t.search.filter(c=>!c.transient).map(c=>({field:c.field,value:c.value}))))},l=()=>{var c;const u=JSON.parse((c=localStorage.getItem(n.value))!=null?c:"[]");t.search.forEach(h=>{const g=u.find(p=>h.field===p.field);h.transient||!g?h.value=H.cloneDeep(h.initValue):h.value=g.value})},a=async()=>{i.value=!0;try{await t.searchRemote(),t.id&&r()}catch(c){console.error(c)}finally{i.value=!1}},d=()=>{if(s(),t.autoResetSearch)return a()};return E.onBeforeMount(()=>{l()}),{__sfc:!0,searchForm:o,props:t,loading:i,reset:s,persistenceKey:n,doPersistence:r,restore:l,doSearch:a,handleReset:d,SearchItem:Cn}}});var eE=function(){var t=this,o=t._self._c,i=t._self._setupProxy;return o("el-form",{ref:"searchForm"},[o("div",{staticClass:"search-container"},[t._l(t.search,function(s){return o("el-form-item",{key:s.field},[o(i.SearchItem,{attrs:{search:s}})],1)}),o("el-form-item",[o("el-button",{staticStyle:{width:"80px"},attrs:{disabled:!t.enable||i.loading,type:"primary"},on:{click:i.doSearch}},[t._v(" "+t._s(t.confirmButtonText)+" ")]),o("el-button",{staticStyle:{width:"80px"},attrs:{disabled:i.loading},on:{click:i.handleReset}},[t._v(t._s(t.resetButtonText))])],1),t._t("default")],2)])},tE=[],oE=se(JR,eE,tE,!1,null,"962588ec");const iE=oE.exports,fd=(e,t,o)=>{const i=E.ref(),s=E.ref(!1),n=E.computed(()=>{if(Array.isArray(o)){const h=o.map(g=>{var p;return(p=g.width)!=null?p:-1}).filter(g=>g);if(h.length>0)return Math.max(...h)}else return o==null?void 0:o.width}),r=h=>H.isEmpty(h)&&!H.isNumber(h),l=E.computed(()=>Array.isArray(o)?o.some(h=>!r(h.value)):!r(o==null?void 0:o.value)),a=E.computed(()=>[s.value?"is-loading":""]),d=E.computed(()=>l.value?"var(--el-color-primary)":void 0);return{visible:i,loading:s,width:n,loadingClass:a,hasCondition:l,hasConditionColor:d,doSearch:async()=>{s.value=!0;try{await e()}catch(h){console.error(h)}finally{s.value=!1,i.value=!1}},reset:()=>{Array.isArray(o)?o.forEach(h=>{h.value=H.cloneDeep(h.initValue)}):o.value=H.cloneDeep(o==null?void 0:o.initValue)}}},sE=E.defineComponent({name:"ClPopoverSearch"}),nE=E.defineComponent({...sE,props:{search:null,teleported:{type:Boolean},searchRemote:{type:Function},field:null},setup(e){const t=e,o=E.computed(()=>{var u;return(u=t.search)==null?void 0:u.find(h=>h.field===t.field)}),{visible:i,loading:s,width:n,loadingClass:r,hasConditionColor:l,doSearch:a,reset:d}=fd(t.searchRemote,t,o.value),c=E.computed(()=>{var u;return(u=n.value)!=null?u:300});return{__sfc:!0,props:t,search:o,visible:i,loading:s,width:n,loadingClass:r,hasConditionColor:l,doSearch:a,reset:d,popoverWidth:c,SearchItem:Cn}}});var rE=function(){var t=this,o=t._self._c,i=t._self._setupProxy;return i.search?o("el-popover",{attrs:{width:i.popoverWidth,trigger:"click"},scopedSlots:t._u([{key:"reference",fn:function(){return[o("div",[t._t("default",function(){return[o("i",{class:["el-icon-search",i.loadingClass],attrs:{color:i.hasConditionColor}})]},null,{loading:i.loading})],2)]},proxy:!0}],null,!0),model:{value:i.visible,callback:function(s){i.visible=s},expression:"visible"}},[o("div",{on:{keyup:function(s){return!s.type.indexOf("key")&&t._k(s.keyCode,"enter",13,s.key,"Enter")?null:i.doSearch.apply(null,arguments)}}},[o("el-form",{on:{submit:function(s){s.preventDefault(),s.stopPropagation()}}},[o("el-form-item",[o(i.SearchItem,t._b({attrs:{search:i.search,teleported:!1}},"SearchItem",{style:"width: 100%"},!1))],1)],1),o("el-space",{staticStyle:{width:"100%","justify-content":"end"},attrs:{size:"small"}},[o("el-button",{attrs:{size:"small"},on:{click:i.reset}},[t._v(" 重置 ")]),o("el-button",{attrs:{loading:i.loading,size:"small",type:"primary"},on:{click:i.doSearch}},[t._v("搜索")])],1)],1)]):t._e()},lE=[],aE=se(nE,rE,lE,!1,null,null);const dE=aE.exports,cE=E.defineComponent({name:"ClDrawerSearch"}),uE=E.defineComponent({...cE,props:{search:null,teleported:{type:Boolean},searchRemote:{type:Function},attached:{type:Boolean}},setup(e){const t=e,{visible:o,loading:i,loadingClass:s,hasConditionColor:n,doSearch:r,reset:l}=fd(t.searchRemote,t,t.search);return E.onMounted(()=>{t.attached||l()}),{__sfc:!0,props:t,visible:o,loading:i,loadingClass:s,hasConditionColor:n,doSearch:r,reset:l,SearchItem:Cn}}});var hE=function(){var t=this,o=t._self._c,i=t._self._setupProxy;return o("div",[o("div",{on:{click:function(s){i.visible=!0}}},[t._t("default",function(){return[o("el-button",{attrs:{disabled:i.loading,circle:""}},[o("i",{class:["el-icon-search",i.loadingClass],attrs:{color:i.hasConditionColor}},[o("Search")],1)])]},null,{loading:i.loading})],2),o("el-drawer",{attrs:{"append-to-body":"","with-header":!1},on:{keyup:function(s){return!s.type.indexOf("key")&&t._k(s.keyCode,"enter",13,s.key,"Enter")?null:i.doSearch.apply(null,arguments)}},model:{value:i.visible,callback:function(s){i.visible=s},expression:"visible"}},[o("el-form",{staticStyle:{height:"calc(100% - 100px)"},attrs:{"label-position":"right","label-suffix":":","label-width":"auto"}},[o("el-scrollbar",t._l(t.search,function(s){return o("el-form-item",{key:s.field,attrs:{label:s.label}},[o(i.SearchItem,t._b({attrs:{search:s,teleported:""}},"SearchItem",{style:"width: 100%"},!1))],1)}),1)],1),o("el-divider"),o("el-space",{staticStyle:{width:"100%","justify-content":"end"},attrs:{size:"small"}},[o("el-button",{on:{click:i.reset}},[t._v(" 重置 ")]),o("el-button",{attrs:{loading:i.loading,type:"primary"},on:{click:i.doSearch}},[t._v("搜索")])],1)],1)],1)},gE=[],pE=se(uE,hE,gE,!1,null,null);const Cd=pE.exports;var fE=Object.defineProperty,CE=(e,t,o)=>t in e?fE(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,mE=(e,t,o)=>CE(e,t+"",o);class mn{constructor(t){mE(this,"record"),this.record=t}static from(t){const o=t.filter(i=>{var s;return(s=i.value)!=null?s:!1}).reduce((i,s)=>({...i,...H.isPlainObject(s.value)?s.value:{[s.field]:s.value}}),{});return new mn(o)}transform(t,o){const i=this.record[t],s=o(i);return delete this.record[t],this.record={...this.record,...s},this}toCondition(t){return{...this.record,...t??{}}}}const wE=E.defineComponent({name:"SearchButton"}),vE=E.defineComponent({...wE,props:{searches:null},setup(e){const t=e,o=E.inject(ct);return{__sfc:!0,props:t,context:o,ClDrawerSearch:Cd}}});var bE=function(){var t=this,o=t._self._c,i=t._self._setupProxy;return o(i.ClDrawerSearch,{attrs:{search:t.searches,"search-remote":i.context.refresh}})},SE=[],yE=se(vE,bE,SE,!1,null,"45be5dfc");const md=yE.exports,RE=E.defineComponent({name:"RefreshButton"}),EE=E.defineComponent({...RE,setup(e){const t=E.ref(!1),{refresh:o}=E.inject(ct);return{__sfc:!0,loading:t,refresh:o,handlerRefreshClick:async()=>{if(!t.value){t.value=!0;try{await o()}catch(s){console.error(s)}finally{t.value=!1}}}}}});var xE=function(){var t=this,o=t._self._c,i=t._self._setupProxy;return o("el-button",{attrs:{disabled:i.loading,circle:""},on:{click:i.handlerRefreshClick}},[o("i",{class:["el-icon-refresh",i.loading?"is-loading":""]})])},DE=[],FE=se(EE,xE,DE,!1,null,"0eaeb325");const wd=FE.exports;function vd(e,t){const o=t(e);return PE(e)&&(o.children=e.children.map(i=>vd(i,t))),o}const PE=e=>!!e.children,TE=()=>{const e=E.inject(ct),t=E.ref(),o=E.ref([]),i=E.ref([]),s=E.ref(),n=C=>{const m=e.api.value.getAllDisplayedColumns(),w=m.find(b=>b.getColId()===C);return w?m.indexOf(w):-1},r=C=>{if(C.field)return C.field;if(C.groupId)return C.groupId;throw new Error(`${C.headerName} field or groupId not found`)},l=()=>{var C,m;o.value=(m=(C=e.api.value.getColumnDefs())==null?void 0:C.map(w=>vd(w,b=>{var v,S;return{id:r(b),label:b.headerName,pined:(S=(v=e.api.value.getColumnGroup(r(b)))==null?void 0:v.getPinned())!=null?S:b.pinned}})))!=null?m:[],i.value=e.api.value.getAllDisplayedColumns().map(w=>w.getColId())},a=(C,m,w)=>w!=="inner"&&C.parent===m.parent,d=()=>{s.value=t.value.getCheckedKeys()},c=C=>{if(C instanceof We)return[C];const m=C.getChildren();return m?[...m.flatMap(w=>c(w))]:[]},u=(C,m,w)=>{const b=n(m[0].colId),v=n(w.colId);return C==="after"?v-m.length+1:v>b?v-m.length:v};return{treeData:o,defaultCheckedKeys:i,treeRef:t,refreshTreeData:l,checkColumnAllowDrop:a,onColumnDragStart:d,onColumnDragFinish:(C,m,w)=>{if(m&&C&&C.key!==m.key){const b=e.api.value.getColumnGroup(C.key),v=e.api.value.getColumn(C.key),S=e.api.value.getColumn(m.key),D=c(b??v);if(S){const I=u(w,D,S);e.api.value.moveColumns(D,I)}}t.value.setCheckedKeys(s.value),s.value=void 0},onColumnVisibleChange:(C,m)=>{e.api.value.setColumnsVisible([C.id],m)},onColumnPinedChange:(C,m)=>{var w;const b=e.api.value.getColumnGroup(C),v=b?b.getDisplayedLeafColumns().map(D=>D.getColId()):[C],S=b?b.getPinned():(w=e.api.value.getColumn(C))==null?void 0:w.getPinned();e.api.value.setColumnsPinned(v,S===m?null:m),l()},columnAutoResize:()=>{e.api.value.sizeColumnsToFit()}}},IE=E.defineComponent({name:"SettingButton"}),AE=E.defineComponent({...IE,setup(e){const{treeRef:t,treeData:o,defaultCheckedKeys:i,refreshTreeData:s,checkColumnAllowDrop:n,onColumnDragStart:r,onColumnDragFinish:l,onColumnVisibleChange:a,onColumnPinedChange:d,columnAutoResize:c}=TE(),u=E.ref(!1),h=E.inject(ct);return{__sfc:!0,treeRef:t,treeData:o,defaultCheckedKeys:i,refreshTreeData:s,checkColumnAllowDrop:n,onColumnDragStart:r,onColumnDragFinish:l,onColumnVisibleChange:a,onColumnPinedChange:d,columnAutoResize:c,visible:u,gridContext:h,handleResetGridState:()=>{h.resetGridState(),s()}}}});var ME=function(){var t=this,o=t._self._c,i=t._self._setupProxy;return o("div",[o("el-button",{attrs:{circle:""},on:{click:function(s){i.visible=!0}}},[o("i",{staticClass:"el-icon-setting"})]),o("el-drawer",{staticClass:"setting-drawer",attrs:{visible:i.visible,size:280,"modal-append-to-body":!0,"append-to-body":!0},on:{"update:visible":function(s){i.visible=s},open:i.refreshTreeData},scopedSlots:t._u([{key:"title",fn:function(){return[o("div",{staticStyle:{display:"flex","align-items":"center"}},[o("span",[t._v("表格显示设置")])])]},proxy:!0}])},[o("el-button",{staticStyle:{"margin-left":"10px"},attrs:{type:"primary",plain:"",size:"mini"},on:{click:i.handleResetGridState}},[t._v("重置")]),o("el-button",{attrs:{type:"primary",plain:"",size:"mini"},on:{click:i.columnAutoResize}},[t._v("自适应")]),i.treeData.length>0?o("el-tree",{ref:"treeRef",staticClass:"cl-grid-column-settings cl-scrollbar",attrs:{"allow-drop":i.checkColumnAllowDrop,"node-key":"id","default-checked-keys":i.defaultCheckedKeys,"show-checkbox":"",data:i.treeData,"default-expand-all":"",draggable:"","highlight-current":""},on:{"node-drag-start":i.onColumnDragStart,"node-drag-end":i.onColumnDragFinish,"check-change":i.onColumnVisibleChange},scopedSlots:t._u([{key:"default",fn:function({node:s}){return[o("div",{class:{"pined-row":s.data.pined==="left"||s.data.pined==="right"},staticStyle:{display:"flex","justify-content":"space-between",width:"100%"}},[o("span",{class:[s.data.pined==="left"||s.data.pined==="right"?"pined-active":""]},[t._v(" "+t._s(s.label)+" ")]),o("span",[o("i",{class:["el-icon-arrow-left",s.data.pined==="left"?"pined-active":""],on:{click:function(n){return n.stopPropagation(),(()=>i.onColumnPinedChange(s.key,"left")).apply(null,arguments)}}}),o("i",{class:["el-icon-arrow-right",s.data.pined==="right"?"pined-active":""],on:{click:function(n){return n.stopPropagation(),(()=>i.onColumnPinedChange(s.key,"right")).apply(null,arguments)}}})])])]}}],null,!1,2278526884)}):t._e()],1)],1)},kE=[],LE=se(AE,ME,kE,!1,null,"522bf761");const bd=LE.exports,GE={functional:!0,name:"HeaderVNodeRender",props:["params"],render(e,t){const o=t.props.params;return o.headerRender?o.headerRender(o):e("span",o.displayName)}},HE=E.defineComponent({name:"HeaderRenderer"}),OE=E.defineComponent({...HE,props:{params:null},setup(e){const t=e,o=E.ref(),i=E.ref(-1),s=E.inject(ct),n=()=>{o.value=t.params.column.getSort(),i.value=Na(t.params.api,t.params.column.getColId())},r=async(l,a)=>{try{o.value=l,t.params.setSort(l,a.shiftKey),await s.refresh()}catch{}};return E.onMounted(()=>{t.params.api.addEventListener("sortChanged",n),n()}),E.onUnmounted(()=>{t.params.api.removeEventListener("sortChanged",n)}),{__sfc:!0,props:t,sorted:o,sortIndex:i,context:s,handleSortChange:n,handleSortClick:r,HeaderVNodeRender:GE}}});var BE=function(){var t=this,o=t._self._c,i=t._self._setupProxy;return o("div",[t.params.headerRender?o(i.HeaderVNodeRender,{attrs:{params:t.params}}):o("span",[t._v(t._s(t.params.displayName))]),t.params.enableSorting?[i.sortIndex>=0?o("span",{staticStyle:{"line-height":"12px"}},[t._v(" "+t._s(i.sortIndex+1))]):t._e(),i.sorted==="asc"?o("i",{staticClass:"el-icon-sort-up",staticStyle:{cursor:"pointer"},attrs:{color:"var(--el-color-primary)"},on:{click:s=>i.handleSortClick(null,s)}}):i.sorted==="desc"?o("i",{staticClass:"el-icon-sort-down",staticStyle:{cursor:"pointer"},attrs:{color:"var(--el-color-danger, #F56C6C)"},on:{click:s=>i.handleSortClick("asc",s)}}):o("i",{staticClass:"el-icon-sort",staticStyle:{cursor:"pointer"},on:{click:s=>i.handleSortClick("desc",s)}})]:t._e()],2)},VE=[],NE=se(OE,BE,VE,!1,null,"126699e0");const _E=NE.exports,WE=E.defineComponent({name:"GridEmptyDataOverlay"}),zE=E.defineComponent({...WE,setup(e){return{__sfc:!0}}});var $E=function(){var t=this,o=t._self._c;return t._self._setupProxy,o("el-empty",{attrs:{description:"没有数据了","image-size":75}})},UE=[],KE=se(zE,$E,UE,!1,null,"05fc87c0");const jE=KE.exports,qE=E.defineComponent({name:"GridLoadingOverlay"}),YE=E.defineComponent({...qE,setup(e){return{__sfc:!0}}});var ZE=function(){var t=this,o=t._self._c;return t._self._setupProxy,o("div",{directives:[{name:"loading",rawName:"v-loading",value:!0,expression:"true"}],staticClass:"table-loading",staticStyle:{height:"100%",width:"100%"},attrs:{"element-loading-text":"加载中","element-loading-background":"rgba(0, 0, 0, 0.1)"}})},QE=[],XE=se(YE,ZE,QE,!1,null,"c60c1386");const JE=XE.exports,e0=(e,t,o)=>{const i=td({columns:e.columns,gridOptions:e.gridOptions,footerHeight:e.footerHeight},t,o);return{...i,footerGridOptions:i.footerGridOptions}},t0=()=>({theme:E.ref("ag-theme-alpine")}),o0=E.defineComponent({name:"Grid",components:{SearchButton:md,RefreshButton:wd,SettingButton:bd,CellRenderer:VR,GridEmptyDataOverlay:jE,HeaderRenderer:_E,GridLoadingOverlay:JE,AgGridVue:hd,GridToolbar:pd,FooterCellRender:YR}}),i0=E.defineComponent({...o0,props:{id:null,rowIdMapper:{type:Function},columns:null,rowData:{type:Function},pageSize:{default:50},footerHeight:null,tools:{default:()=>["search","refresh","setting"]},searches:null,gridOptions:{default:()=>({})},editable:null,onRowChange:{type:Function}},setup(e,{expose:t}){const o=e,i=E.ref(),s=E.ref(),{theme:n}=t0(),{gridOptions:r,dataCache:l,gridStyles:a,gridApi:d,gridElRef:c,reload:u,insertRows:h,existRow:g,getRows:p,refresh:f,resetGridState:C}=MR(o),{footerGridOptions:m,setFooterData:w,footerStyles:b}=e0(o,s,a);return E.provide(ct,{refresh:f,resetGridState:C,api:d}),E.watch(()=>r.value,()=>{d.value&&d.value.updateGridOptions(H.omit(r.value,["scrollbarWidth","getRowId","suppressRowTransform","defaultColGroupDef"]))},{deep:!0}),t({setFooterData:w,updateGridOptions:v=>{d.value.updateGridOptions(v)},reload:u,refresh:f,getRows:p,createRow(v,S=!1){const D=l.value.createRow(v);return S?new Fi(D,o.rowIdMapper,!0):D},existRow:g,insertRows:h,startEditing:()=>{const v=l.value.getRows().filter(S=>!S.isEditing());H.isEmpty(v)||(v.forEach(S=>S.startEditing()),u(),d.value.redrawRows())},stopEditing:()=>{const v=l.value.getRows().filter(S=>S.isEditing());H.isEmpty(v)||(v.forEach(S=>S.stopEditing()),u(),d.value.redrawRows())},deselectAll:(v,S)=>{d.value.deselectAll(v,S)}}),{__sfc:!0,props:o,bottomRef:i,gridRef:s,theme:n,options:r,dataCache:l,gridStyles:a,gridApi:d,gridElRef:c,reload:u,insertRows:h,existRow:g,getRows:p,refresh:f,resetGridState:C,footerGridOptions:m,setFooterData:w,footerStyles:b,AgGridVue:hd,GridToolbar:pd,SearchButton:md,RefreshButton:wd,SettingButton:bd}}});var s0=function(){var t=this,o=t._self._c,i=t._self._setupProxy;return o("div",{ref:"gridElRef",staticClass:"cl-grid"},[o(i.GridToolbar,{scopedSlots:t._u([{key:"system",fn:function(){return[t.searches&&t.tools.includes("search")?o(i.SearchButton,{attrs:{searches:t.searches}}):t._e(),t.tools.includes("refresh")?o(i.RefreshButton):t._e(),t.tools.includes("setting")?o(i.SettingButton):t._e()]},proxy:!0}])},[t._t("toolbar")],2),o("div",{staticClass:"cl-grid-container"},[o(i.AgGridVue,{ref:"gridRef",staticClass:"cl-scrollbar flex-1",class:[i.theme],style:i.gridStyles,attrs:{tooltipShowDelay:500,"loading-overlay-component":"GridLoadingOverlay","no-rows-overlay-component":"GridEmptyDataOverlay","grid-options":{...i.options,suppressHorizontalScroll:!!t.footerHeight,alignedGrids:()=>[i.bottomRef].filter(s=>s)}}}),t.footerHeight?o(i.AgGridVue,{ref:"bottomRef",staticClass:"cl-scrollbar footer-grid",class:[i.theme],style:i.footerStyles,attrs:{"grid-options":i.footerGridOptions}}):t._e()],1)],1)},n0=[],r0=se(i0,s0,n0,!1,null,null);const l0=r0.exports;var a0=Object.defineProperty,d0=(e,t,o)=>t in e?a0(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,yo=(e,t,o)=>d0(e,typeof t!="symbol"?t+"":t,o);const c0=e=>new Sd(e);class Sd{constructor(t){yo(this,"colDef"),yo(this,"agGridCellRenderParams"),this.colDef=t,this.agGridCellRenderParams={}}cellRender(t){return this.agGridCellRenderParams.render=t,this}footerRender(t){return this.agGridCellRenderParams.footerRender=t,this}editeRender(t){return this.agGridCellRenderParams.editeRender=t,this}headerRender(t){return this.agGridCellRenderParams.headerRender=t,this}build(){return this.agGridCellRenderParams.headerRender&&(this.colDef.headerComponentParams=this.agGridCellRenderParams.headerRender),this.colDef.cellRendererParams=this.agGridCellRenderParams,this.colDef}}const u0=e=>new yd(e);class yd{constructor(t){yo(this,"colDefs"),yo(this,"rendersMap",new Map),yo(this,"headerRendersMap",new Map),this.colDefs=t,this.eachColDef(t,o=>{this.rendersMap.set(o.field,{}),this.headerRendersMap.set(o.field,{})})}eachColDef(t,o){for(const i of t)ja.isGroupColDef(i)?this.eachColDef(i.children,o):o(i)}getRenderParams(t){if(!this.rendersMap.has(t))throw new Error(`${t} 不存在配置项`);return this.rendersMap.get(t)}getHeaderRenderParams(t){if(!this.headerRendersMap.has(t))throw new Error(`${t} 不存在配置项`);return this.headerRendersMap.get(t)}render(t,o){return this.getRenderParams(t).render=o,this}footerRender(t,o){return this.getRenderParams(t).footerRender=o,this}editRender(t,o){return this.getRenderParams(t).editeRender=o,this}headerRender(t,o){return this.getHeaderRenderParams(t).headerRender=o,this}alwaysRender(t){this.eachColDef(this.colDefs,o=>{o.field===t&&(o.enableCellChangeFlash=!1,o.tooltipValueGetter=()=>"",o.valueGetter=i=>i.data.getSignature())})}build(){return this.eachColDef(this.colDefs,t=>{const o=this.headerRendersMap.get(t.field);o!=null&&o.headerRender&&(t.headerComponentParams=o),t.cellRendererParams=this.rendersMap.get(t.field)}),this.colDefs}}const h0=(e,t)=>({model:{value:H.get(e,t),callback:o=>{H.set(e,t,o)}}});Gd({theme:"legacy"});const g0={install:()=>{Uu.registerModules([Yb,Zb,Qb,Xb,eS,Jb,RS,lS,sb,_l,Ha,kS,_S,KS,JS,ad,mv,dy,fy,cy,Sy,bv,mS,xa,yy,Ey,tf,ry,ud,cd,tS])}};L.ActualRow=mo,L.CLEAN_AG_GRID_OPTIONS=Ua,L.CellEditableRow=Pi,L.CellRenderAdapter=Sd,L.CellValue=Bt,L.ClDrawerSearch=Cd,L.ClPopoverSearch=dE,L.ClSearch=iE,L.ClientSideRowModelApiModule=ud,L.ClientSideRowModelModule=cd,L.ColumnRendersBuilder=yd,L.EditableRow=Fi,L.GRID_CONTEXT=ct,L.Grid=l0,L.GridDataCache=$a,L.GridDataSource=_a,L.GridUtils=ja,L.ID_FIRST_DEEP=Ka,L.ID_SPLITTER=Ti,L.ProjectionRow=Ot,L.RowSelectionModule=ad,L.RowSpans=hn,L.Searches=mn,L.ServerGetRowsParamsRequest=Vt,L.SharedRowSelectionModule=ld,L.SpanMatrix=za,L.VueGridPlugin=g0,L._getColumnSortIndexe=Na,L._getSortedColumns=un,L._getSortedColumnsIndexes=Va,L.buildProxyOptions=Ya,L.defaultColDefCellClassRules=Qa,L.isActualRow=Py,L.isGridRow=Fy,L.mergeRowClass=gn,L.selectionColumnCellClassRules=Za,L.useFooter=td,L.useGrid=ed,L.useGridScroll=Xa,L.useGridState=qa,L.vModel=h0,L.withColumnRenderBuilder=u0,L.withRender=c0,Object.defineProperty(L,Symbol.toStringTag,{value:"Module"})});