@riab/illumis-components 1.0.6-beta.0 → 1.0.7-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/illumis-demo-components.js +615 -611
- package/dist/illumis-demo-components.umd.cjs +13 -13
- package/package.json +1 -1
|
@@ -20,22 +20,22 @@ ${n}}
|
|
|
20
20
|
`;$s(n,document.head,`googleFont:${e}`,void 0,0,t)},QH="fonts.googleapis.com",CF={changeKey:"listItemHeight",type:"length",defaultValue:24},YH=class extends Vn{constructor(){super(...arguments),this.beanName="environment",this.sizeEls=new Map,this.lastKnownValues=new Map,this.sizesMeasured=!1,this.globalCSS=[]}wireBeans(e){this.eRootDiv=e.eRootDiv}postConstruct(){const{gos:e,eRootDiv:t}=this;e.setInstanceDomData(t);const n=e.get("themeStyleContainer"),i=typeof ShadowRoot<"u",o=i&&t.getRootNode()instanceof ShadowRoot;this.eStyleContainer=(typeof n=="function"?n():n)??(o?t:document.head),!n&&!o&&i&&ZH(t,this.shadowRootError.bind(this),this.addDestroyFunc.bind(this)),this.cssLayer=e.get("themeCssLayer"),this.styleNonce=e.get("styleNonce"),this.addManagedPropertyListener("theme",()=>this.handleThemeChange()),this.handleThemeChange(),this.getSizeEl(CF),this.initVariables(),this.addDestroyFunc(()=>TH(this)),this.mutationObserver=new MutationObserver(()=>{this.fireStylesChangedEvent("theme")}),this.addDestroyFunc(()=>this.mutationObserver.disconnect())}applyThemeClasses(e,t=[]){const{theme:n}=this,i=n?n._getCssClass():this.applyLegacyThemeClasses();for(const o of Array.from(e.classList))o.startsWith("ag-theme-")&&e.classList.remove(o);if(i){const o=e.className;e.className=`${o}${o?" ":""}${i}${t?.length?" "+t.join(" "):""}`}}applyLegacyThemeClasses(){let e="";this.mutationObserver.disconnect();let t=this.eRootDiv;for(;t;){let n=!1;for(const i of Array.from(t.classList))i.startsWith("ag-theme-")&&(n=!0,e=e?`${e} ${i}`:i);n&&this.mutationObserver.observe(t,{attributes:!0,attributeFilter:["class"]}),t=t.parentElement}return e}addGlobalCSS(e,t){this.theme?$s(e,this.eStyleContainer,t,this.cssLayer,0,this.styleNonce):this.globalCSS.push([e,t])}getDefaultListItemHeight(){return this.getCSSVariablePixelValue(CF)}getCSSVariablePixelValue(e){const t=this.lastKnownValues.get(e);if(t!=null)return t;const n=this.measureSizeEl(e);return n==="detached"||n==="no-styles"?(e.cacheDefault&&this.lastKnownValues.set(e,e.defaultValue),e.defaultValue):(this.lastKnownValues.set(e,n),n)}measureSizeEl(e){const t=this.getSizeEl(e);if(t.offsetParent==null)return"detached";const n=t.offsetWidth;return n===Vm?"no-styles":(this.sizesMeasured=!0,n)}getMeasurementContainer(){let e=this.eMeasurementContainer;return e||(e=this.eMeasurementContainer=Ms({tag:"div",cls:"ag-measurement-container"}),this.eRootDiv.appendChild(e)),e}getSizeEl(e){let t=this.sizeEls.get(e);if(t)return t;const n=this.getMeasurementContainer();t=Ms({tag:"div"});const i=this.setSizeElStyles(t,e);n.appendChild(t),this.sizeEls.set(e,t);const{type:o,noWarn:r}=e;if(o!=="length"&&o!=="border")return t;let s=this.measureSizeEl(e);s==="no-styles"&&!r&&this.varError(i,e.defaultValue);const a=_r(this.beans,t,()=>{const l=this.measureSizeEl(e);l==="detached"||l==="no-styles"||(this.lastKnownValues.set(e,l),l!==s&&(s=l,this.fireStylesChangedEvent(e.changeKey)))});return this.addDestroyFunc(()=>a()),t}setSizeElStyles(e,t){const{changeKey:n,type:i}=t;let o=Bm(n);return i==="border"?(o.endsWith("-width")&&(o=o.slice(0,-6)),e.className="ag-measurement-element-border",e.style.setProperty("--ag-internal-measurement-border",`var(${o}, solid ${Vm}px)`)):e.style.width=`var(${o}, ${Vm}px)`,o}handleThemeChange(){const{gos:e,theme:t}=this,n=e.get("theme");let i;if(n==="legacy")i=void 0;else{const o=n??this.getDefaultTheme();o instanceof gF?i=o:this.themeError(o)}i!==t&&this.handleNewTheme(i),this.postProcessThemeChange(i,n)}handleNewTheme(e){const{gos:t,eRootDiv:n,globalCSS:i}=this,o=this.getAdditionalCss();if(e){aF(this.eStyleContainer,this.cssLayer,this.styleNonce,o);for(const[r,s]of i)$s(r,this.eStyleContainer,s,this.cssLayer,0,this.styleNonce);i.length=0}this.theme=e,e?._startUse({loadThemeGoogleFonts:t.get("loadThemeGoogleFonts"),styleContainer:this.eStyleContainer,cssLayer:this.cssLayer,nonce:this.styleNonce,moduleCss:o}),DH(this,e?._getParamsCss()??null,e?._getParamsClassName()??null,this.eStyleContainer,this.cssLayer,this.styleNonce),this.applyThemeClasses(n),this.fireStylesChangedEvent("theme")}fireStylesChangedEvent(e){this.eventSvc.dispatchEvent({type:"stylesChanged",[`${e}Changed`]:!0})}},Vm=15538,ZH=(e,t,n)=>{let i=60;const o=setInterval(()=>{typeof ShadowRoot<"u"&&e.getRootNode()instanceof ShadowRoot&&(t(),clearInterval(o)),(e.isConnected||--i<0)&&clearInterval(o)},1e3);n(()=>clearInterval(o))},XH='.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-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-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{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}.ag-body-viewport::-webkit-scrollbar,.ag-center-cols-viewport::-webkit-scrollbar,.ag-floating-bottom-viewport::-webkit-scrollbar,.ag-floating-top-viewport::-webkit-scrollbar,.ag-header-viewport::-webkit-scrollbar,.ag-sticky-bottom-viewport::-webkit-scrollbar,.ag-sticky-top-viewport::-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-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-left-sticky-bottom,.ag-pinned-right-cols-container,.ag-pinned-right-sticky-bottom,.ag-sticky-bottom-container,.ag-sticky-top-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-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-active),&:where(.ag-scrollbar-scrolling){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:not(.ag-allow-overflow),.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-data-background-color);display:flex;height:0;overflow:hidden;position:absolute;width:100%;z-index:1}.ag-sticky-bottom{box-sizing:content-box!important;:where(.ag-pinned-left-sticky-bottom),:where(.ag-pinned-right-sticky-bottom),:where(.ag-sticky-bottom-container){border-top:var(--ag-row-border);box-sizing:border-box}}.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;:where(.ag-column-group-closed-icon),:where(.ag-column-group-opened-icon){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)}}: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-cell-font-size);font-weight:var(--ag-cell-font-weight);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-data-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-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-data-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)}.ag-drag-handle-disabled{opacity:.35;pointer-events:none}: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-row-drag-indicator-color);border-radius:calc(var(--ag-row-drag-indicator-width)/2);content:"";height:var(--ag-row-drag-indicator-width);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-body,.ag-floating-bottom,.ag-floating-top{background-color:var(--ag-data-background-color)}.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-data-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-exporting-wrapper,.ag-overlay-loading-wrapper,.ag-overlay-modal-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-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,:where(.ag-header-group-cell-selectable) .ag-header-cell-comp-wrapper{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)),:where(.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)):before,.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)}.ag-header-cell:where(:not(.ag-floating-filter)):where(:hover):before,.ag-header-group-cell:where(:hover):before{--ag-internal-hover-color:var(--ag-header-cell-hover-background-color)}.ag-header-cell:where(:not(.ag-floating-filter)):where(.ag-header-cell-moving):before,.ag-header-group-cell: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-header-cell:not(.ag-right-aligned-header)){.ag-header-col-ref{color:var(--ag-subtle-text-color)}}:where(.ag-ltr) :where(.ag-header-cell:not(.ag-right-aligned-header)){.ag-header-col-ref{margin-right:var(--ag-spacing)}.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-col-ref{margin-left:var(--ag-spacing)}.ag-header-label-icon,.ag-header-menu-icon{margin-right:var(--ag-spacing)}}:where(.ag-header-cell.ag-right-aligned-header){.ag-header-col-ref{color:var(--ag-subtle-text-color)}}:where(.ag-ltr) :where(.ag-header-cell.ag-right-aligned-header){.ag-header-col-ref{margin-left:var(--ag-spacing)}.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-col-ref{margin-right:var(--ag-spacing)}.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-column-drag-indicator-color);border-radius:calc(var(--ag-column-drag-indicator-width)/2);content:"";height:100%;position:absolute;top:0;width:var(--ag-column-drag-indicator-width)}: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}:where(.ag-ltr) .ag-header-cell-resize{right:-3px}:where(.ag-rtl) .ag-header-cell-resize{left:-3px}.ag-header-cell-resize: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:after{left:calc(50% - var(--ag-header-column-resize-handle-width))}:where(.ag-rtl) .ag-header-cell-resize: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{container-type:normal;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{container-type:normal;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-root-wrapper{border:var(--ag-wrapper-border);border-radius:var(--ag-wrapper-border-radius);container-type:inline-size;display:flex;flex-direction:column;overflow:hidden;position:relative;&.ag-layout-normal{height:100%}}.ag-root-wrapper-body{display:flex;flex-direction:row;&.ag-layout-normal{flex:1 1 auto;height:0;min-height:0}}.ag-root{display:flex;flex-direction:column;position:relative;&.ag-layout-auto-height,&.ag-layout-normal{flex:1 1 auto;overflow:hidden;width:0}&.ag-layout-normal{height:100%}}.ag-drag-handle{color:var(--ag-drag-handle-color);cursor:grab;: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)}.ag-chart-menu-icon:hover,.ag-chart-settings-next:hover,.ag-chart-settings-prev:hover,.ag-column-group-icons:hover,.ag-column-select-header-icon:hover,.ag-filter-toolpanel-expand:hover,.ag-floating-filter-button-button:hover,.ag-group-title-bar-icon:hover,.ag-header-cell-filter-button:hover,.ag-header-cell-menu-button:hover,.ag-header-expand-icon:hover,.ag-panel-title-bar-button-icon:hover,.ag-panel-title-bar-button:hover,.ag-set-filter-group-icons:hover,:where(.ag-group-contracted) .ag-icon:hover,:where(.ag-group-expanded) .ag-icon: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)}:where(.ag-filter-active),:where(.ag-filter-toolpanel-group-instance-header-icon),:where(.ag-filter-toolpanel-instance-header-icon){position:relative}:where(.ag-filter-active):after,:where(.ag-filter-toolpanel-group-instance-header-icon):after,:where(.ag-filter-toolpanel-instance-header-icon):after{background-color:var(--ag-icon-button-active-indicator-color);border-radius:50%;content:"";height:6px;position:absolute;top:-1px;width:6px}:where(.ag-ltr) :where(.ag-filter-active):after,:where(.ag-ltr) :where(.ag-filter-toolpanel-group-instance-header-icon):after,:where(.ag-ltr) :where(.ag-filter-toolpanel-instance-header-icon):after{right:-1px}:where(.ag-rtl) :where(.ag-filter-active):after,:where(.ag-rtl) :where(.ag-filter-toolpanel-group-instance-header-icon):after,:where(.ag-rtl) :where(.ag-filter-toolpanel-instance-header-icon):after{left:-1px}.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);: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)}}',JH={wrapperBorder:!0,rowBorder:!0,headerRowBorder:!0,footerRowBorder:{ref:"rowBorder"},columnBorder:{style:"solid",width:1,color:"transparent"},headerColumnBorder:!1,headerColumnBorderHeight:"100%",pinnedColumnBorder:!0,pinnedRowBorder:!0,sidePanelBorder:!0,sideBarPanelWidth:250,sideBarPanelAnimationDuration:0,sideBarBackgroundColor:{ref:"chromeBackgroundColor"},sideButtonBarBackgroundColor:{ref:"sideBarBackgroundColor"},sideButtonBarTopPadding:0,sideButtonSelectedUnderlineWidth:2,sideButtonSelectedUnderlineColor:"transparent",sideButtonSelectedUnderlineTransitionDuration:0,sideButtonBackgroundColor:"transparent",sideButtonTextColor:{ref:"textColor"},sideButtonHoverBackgroundColor:{ref:"sideButtonBackgroundColor"},sideButtonHoverTextColor:{ref:"sideButtonTextColor"},sideButtonSelectedBackgroundColor:jn,sideButtonSelectedTextColor:{ref:"sideButtonTextColor"},sideButtonBorder:"solid 1px transparent",sideButtonSelectedBorder:!0,sideButtonLeftPadding:{ref:"spacing"},sideButtonRightPadding:{ref:"spacing"},sideButtonVerticalPadding:{calc:"spacing * 3"},cellFontFamily:{ref:"fontFamily"},cellFontSize:{ref:"dataFontSize"},cellFontWeight:{ref:"fontWeight"},headerCellHoverBackgroundColor:"transparent",headerCellMovingBackgroundColor:{ref:"headerCellHoverBackgroundColor"},headerCellBackgroundTransitionDuration:"0.2s",cellTextColor:{ref:"textColor"},rangeSelectionBorderStyle:"solid",rangeSelectionBorderColor:Lo,rangeSelectionBackgroundColor:ko(.2),rangeSelectionChartBackgroundColor:"#0058FF1A",rangeSelectionChartCategoryBackgroundColor:"#00FF841A",rangeSelectionHighlightColor:ko(.5),rangeHeaderHighlightColor:LH(.08),rowNumbersSelectedColor:ko(.5),rowHoverColor:ko(.08),columnHoverColor:ko(.05),selectedRowBackgroundColor:ko(.12),modalOverlayBackgroundColor:{ref:"backgroundColor",mix:.66},dataBackgroundColor:jn,oddRowBackgroundColor:{ref:"dataBackgroundColor"},wrapperBorderRadius:8,cellHorizontalPadding:{calc:"spacing * 2 * cellHorizontalPaddingScale"},cellWidgetSpacing:{calc:"spacing * 1.5"},cellHorizontalPaddingScale:1,rowGroupIndentSize:{calc:"cellWidgetSpacing + iconSize"},valueChangeDeltaUpColor:"#43a047",valueChangeDeltaDownColor:"#e53935",valueChangeValueHighlightBackgroundColor:"#16a08580",rowHeight:{calc:"max(iconSize, cellFontSize) + spacing * 3.25 * rowVerticalPaddingScale"},rowVerticalPaddingScale:1,paginationPanelHeight:{ref:"rowHeight",calc:"max(rowHeight, 22px)"},dragHandleColor:_i(.7),headerColumnResizeHandleHeight:"30%",headerColumnResizeHandleWidth:2,headerColumnResizeHandleColor:{ref:"borderColor"},iconButtonColor:{ref:"iconColor"},iconButtonBackgroundColor:"transparent",iconButtonBackgroundSpread:4,iconButtonBorderRadius:1,iconButtonHoverColor:{ref:"iconButtonColor"},iconButtonHoverBackgroundColor:_i(.1),iconButtonActiveColor:Lo,iconButtonActiveBackgroundColor:ko(.28),iconButtonActiveIndicatorColor:Lo,setFilterIndentSize:{ref:"iconSize"},chartMenuPanelWidth:260,chartMenuLabelColor:_i(.8),cellEditingBorder:{color:Lo},cellEditingShadow:{ref:"cardShadow"},fullRowEditInvalidBackgroundColor:{ref:"invalidColor",onto:"backgroundColor",mix:.25},columnSelectIndentSize:{ref:"iconSize"},toolPanelSeparatorBorder:!0,columnDropCellBackgroundColor:_i(.07),columnDropCellTextColor:{ref:"textColor"},columnDropCellDragHandleColor:{ref:"textColor"},columnDropCellBorder:{color:_i(.13)},selectCellBackgroundColor:_i(.07),selectCellBorder:{color:_i(.13)},advancedFilterBuilderButtonBarBorder:!0,advancedFilterBuilderIndentSize:{calc:"spacing * 2 + iconSize"},advancedFilterBuilderJoinPillColor:"#f08e8d",advancedFilterBuilderColumnPillColor:"#a6e194",advancedFilterBuilderOptionPillColor:"#f3c08b",advancedFilterBuilderValuePillColor:"#85c0e4",filterPanelApplyButtonColor:jn,filterPanelApplyButtonBackgroundColor:Lo,columnPanelApplyButtonColor:jn,columnPanelApplyButtonBackgroundColor:Lo,filterPanelCardSubtleColor:{ref:"textColor",mix:.7},filterPanelCardSubtleHoverColor:{ref:"textColor"},findMatchColor:js,findMatchBackgroundColor:"#ffff00",findActiveMatchColor:js,findActiveMatchBackgroundColor:"#ffa500",filterToolPanelGroupIndent:{ref:"spacing"},rowLoadingSkeletonEffectColor:_i(.15),statusBarLabelColor:js,statusBarLabelFontWeight:500,statusBarValueColor:js,statusBarValueFontWeight:500,pinnedSourceRowTextColor:{ref:"textColor"},pinnedSourceRowBackgroundColor:{ref:"dataBackgroundColor"},pinnedSourceRowFontWeight:600,pinnedRowFontWeight:600,pinnedRowBackgroundColor:{ref:"dataBackgroundColor"},pinnedRowTextColor:{ref:"textColor"},rowDragIndicatorColor:{ref:"rangeSelectionBorderColor"},rowDragIndicatorWidth:2,columnDragIndicatorColor:{ref:"accentColor"},columnDragIndicatorWidth:2},eV=".ag-cell-batch-edit{background-color:var(--ag-cell-batch-edit-background-color);color:var(--ag-cell-batch-edit-text-color);display:inherit}.ag-row-batch-edit{background-color:var(--ag-row-batch-edit-background-color);color:var(--ag-row-batch-edit-text-color)}",wF={cellBatchEditBackgroundColor:"rgba(220 181 139 / 16%)",cellBatchEditTextColor:"#422f00",rowBatchEditBackgroundColor:{ref:"cellBatchEditBackgroundColor"},rowBatchEditTextColor:{ref:"cellBatchEditTextColor"}},tV={...wF,cellBatchEditTextColor:"#f3d0b3"},nV=()=>ro({feature:"batchEditStyle",params:wF,css:eV}),iV=nV(),oV=":where(.ag-button){background:none;border:none;color:inherit;cursor:pointer;font-family:inherit;font-size:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0;text-indent:inherit;text-shadow:inherit;text-transform:inherit;word-spacing:inherit;&:disabled{cursor:default}&:focus-visible{box-shadow:var(--ag-focus-shadow);outline:none}}.ag-standard-button{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:var(--ag-button-background-color);border:var(--ag-button-border);border-radius:var(--ag-button-border-radius);color:var(--ag-button-text-color);cursor:pointer;font-weight:var(--ag-button-font-weight);padding:var(--ag-button-vertical-padding) var(--ag-button-horizontal-padding);&:active{background-color:var(--ag-button-active-background-color);border:var(--ag-button-active-border);color:var(--ag-button-active-text-color)}&:disabled{background-color:var(--ag-button-disabled-background-color);border:var(--ag-button-disabled-border);color:var(--ag-button-disabled-text-color)}}.ag-standard-button:hover{background-color:var(--ag-button-hover-background-color);border:var(--ag-button-hover-border);color:var(--ag-button-hover-text-color)}",rV={buttonTextColor:"inherit",buttonFontWeight:"normal",buttonBackgroundColor:"transparent",buttonBorder:!1,buttonBorderRadius:{ref:"borderRadius"},buttonHorizontalPadding:{calc:"spacing * 2"},buttonVerticalPadding:{ref:"spacing"},buttonHoverTextColor:{ref:"buttonTextColor"},buttonHoverBackgroundColor:{ref:"buttonBackgroundColor"},buttonHoverBorder:{ref:"buttonBorder"},buttonActiveTextColor:{ref:"buttonHoverTextColor"},buttonActiveBackgroundColor:{ref:"buttonHoverBackgroundColor"},buttonActiveBorder:{ref:"buttonHoverBorder"},buttonDisabledTextColor:{ref:"inputDisabledTextColor"},buttonDisabledBackgroundColor:{ref:"inputDisabledBackgroundColor"},buttonDisabledBorder:{ref:"inputDisabledBorder"}},sV=()=>ro({feature:"buttonStyle",params:{...rV,buttonBackgroundColor:jn,buttonBorder:!0,buttonHoverBackgroundColor:{ref:"rowHoverColor"},buttonActiveBorder:{color:Lo}},css:oV}),aV=sV(),lV=".ag-column-drop-vertical-empty-message{align-items:center;border:dashed var(--ag-border-width);border-color:var(--ag-border-color);display:flex;inset:0;justify-content:center;margin:calc(var(--ag-spacing)*1.5) calc(var(--ag-spacing)*2);overflow:hidden;padding:calc(var(--ag-spacing)*2);position:absolute}",cV=()=>ro({feature:"columnDropStyle",css:lV}),bF=cV(),uV={formulaToken1Color:"#3269c6",formulaToken1BackgroundColor:{ref:"formulaToken1Color",mix:.08},formulaToken1Border:{color:{ref:"formulaToken1Color"}},formulaToken2Color:"#c0343f",formulaToken2BackgroundColor:{ref:"formulaToken2Color",mix:.06},formulaToken2Border:{color:{ref:"formulaToken2Color"}},formulaToken3Color:"#8156b8",formulaToken3BackgroundColor:{ref:"formulaToken3Color",mix:.08},formulaToken3Border:{color:{ref:"formulaToken3Color"}},formulaToken4Color:"#007c1f",formulaToken4BackgroundColor:{ref:"formulaToken4Color",mix:.06},formulaToken4Border:{color:{ref:"formulaToken4Color"}},formulaToken5Color:"#b03e85",formulaToken5BackgroundColor:{ref:"formulaToken5Color",mix:.08},formulaToken5Border:{color:{ref:"formulaToken5Color"}},formulaToken6Color:"#b74900",formulaToken6BackgroundColor:{ref:"formulaToken6Color",mix:.06},formulaToken6Border:{color:{ref:"formulaToken6Color"}},formulaToken7Color:"#247492",formulaToken7BackgroundColor:{ref:"formulaToken7Color",mix:.08},formulaToken7Border:{color:{ref:"formulaToken7Color"}}},dV=()=>ro({feature:"formulaStyle",params:uV}),hV=dV(),fV={warn:(...e)=>{se(e[0],e[1])},error:(...e)=>{gt(e[0],e[1])},preInitErr:(...e)=>{Cc(e[0],e[2],e[1])}},pV=()=>$H(fV).withParams(JH).withPart(aV).withPart(bF).withPart(iV).withPart(hV),gV='.ag-checkbox-input-wrapper,.ag-radio-button-input-wrapper{background-color:var(--ag-checkbox-unchecked-background-color);border:solid var(--ag-checkbox-border-width) var(--ag-checkbox-unchecked-border-color);flex:none;height:var(--ag-icon-size);position:relative;width:var(--ag-icon-size);&:where(.ag-checked){background-color:var(--ag-checkbox-checked-background-color);border-color:var(--ag-checkbox-checked-border-color)}&:where(.ag-checked):after{background-color:var(--ag-checkbox-checked-shape-color)}&:where(.ag-disabled){filter:grayscale();opacity:.5}}.ag-checkbox-input,.ag-radio-button-input{-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:pointer;display:block;height:var(--ag-icon-size);margin:0;opacity:0;width:var(--ag-icon-size)}.ag-checkbox-input-wrapper:after,.ag-radio-button-input-wrapper:after{content:"";display:block;inset:0;-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;pointer-events:none;position:absolute}.ag-checkbox-input-wrapper:where(:focus-within,:active),.ag-radio-button-input-wrapper:where(:focus-within,:active){box-shadow:var(--ag-focus-shadow)}.ag-checkbox-input-wrapper{border-radius:var(--ag-checkbox-border-radius);&:where(.ag-checked):after{-webkit-mask-image:var(--ag-checkbox-checked-shape-image);mask-image:var(--ag-checkbox-checked-shape-image)}&:where(.ag-indeterminate){background-color:var(--ag-checkbox-indeterminate-background-color);border-color:var(--ag-checkbox-indeterminate-border-color)}&:where(.ag-indeterminate):after{background-color:var(--ag-checkbox-indeterminate-shape-color);-webkit-mask-image:var(--ag-checkbox-indeterminate-shape-image);mask-image:var(--ag-checkbox-indeterminate-shape-image)}}.ag-cell-editing-error .ag-checkbox-input-wrapper:focus-within{box-shadow:var(--ag-focus-error-shadow)}.ag-radio-button-input-wrapper{border-radius:100%;&:where(.ag-checked):after{-webkit-mask-image:var(--ag-radio-checked-shape-image);mask-image:var(--ag-radio-checked-shape-image)}}',mV=()=>ro({feature:"checkboxStyle",params:{checkboxBorderWidth:1,checkboxBorderRadius:{ref:"borderRadius"},checkboxUncheckedBackgroundColor:jn,checkboxUncheckedBorderColor:Ni(.3),checkboxCheckedBackgroundColor:Lo,checkboxCheckedBorderColor:{ref:"checkboxCheckedBackgroundColor"},checkboxCheckedShapeImage:{svg:'<svg xmlns="http://www.w3.org/2000/svg" width="10" height="7" fill="none"><path stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.75" d="M1 3.5 3.5 6l5-5"/></svg>'},checkboxCheckedShapeColor:jn,checkboxIndeterminateBackgroundColor:Ni(.3),checkboxIndeterminateBorderColor:{ref:"checkboxIndeterminateBackgroundColor"},checkboxIndeterminateShapeImage:{svg:'<svg xmlns="http://www.w3.org/2000/svg" width="10" height="2" fill="none"><rect width="10" height="2" fill="#000" rx="1"/></svg>'},checkboxIndeterminateShapeColor:jn,radioCheckedShapeImage:{svg:'<svg xmlns="http://www.w3.org/2000/svg" width="6" height="6" fill="none"><circle cx="3" cy="3" r="3" fill="#000"/></svg>'}},css:gV}),vV=mV(),yF=()=>({...gh,...tV,backgroundColor:"hsl(217, 0%, 17%)",foregroundColor:"#FFF",chromeBackgroundColor:Ni(.05),rowHoverColor:ko(.15),selectedRowBackgroundColor:ko(.2),menuBackgroundColor:Ni(.1),browserColorScheme:"dark",popupShadow:"0 0px 20px #000A",cardShadow:"0 1px 4px 1px #000A",advancedFilterBuilderJoinPillColor:"#7a3a37",advancedFilterBuilderColumnPillColor:"#355f2d",advancedFilterBuilderOptionPillColor:"#5a3168",advancedFilterBuilderValuePillColor:"#374c86",filterPanelApplyButtonColor:js,columnPanelApplyButtonColor:js,findMatchColor:jn,findActiveMatchColor:jn,checkboxUncheckedBorderColor:Ni(.4),toggleButtonOffBackgroundColor:Ni(.4),rowBatchEditBackgroundColor:Ni(.1),formulaToken1Color:"#4da3e5",formulaToken2Color:"#f55864",formulaToken3Color:"#b688f2",formulaToken4Color:"#24bb4a",formulaToken5Color:"#e772ba",formulaToken6Color:"#f69b5f",formulaToken7Color:"#a3e6ff"}),CV=()=>({...yF(),backgroundColor:"#1f2836"}),wV=()=>ro({feature:"colorScheme",params:gh,modeParams:{light:gh,dark:yF(),"dark-blue":CV()}}),bV=wV(),SF={aggregation:'<path d="M18 7V4H6l6 8-6 8h12v-3"/>',arrows:'<polyline points="5 9 2 12 5 15"/><polyline points="9 5 12 2 15 5"/><polyline points="15 19 12 22 9 19"/><polyline points="19 9 22 12 19 15"/><line x1="2" x2="22" y1="12" y2="12"/><line x1="12" x2="12" y1="2" y2="22"/>',asc:'<path d="m5 12 7-7 7 7"/><path d="M12 19V5"/>',cancel:'<path d="m18 6-12 12"/><path d="m6 6 12 12"/>',chart:'<line x1="18" x2="18" y1="20" y2="10"/><line x1="12" x2="12" y1="20" y2="4"/><line x1="6" x2="6" y1="20" y2="14"/>',"color-picker":'<path d="m19 11-8-8-8.6 8.6a2 2 0 0 0 0 2.8l5.2 5.2c.8.8 2 .8 2.8 0L19 11Z"/><path d="m5 2 5 5"/><path d="M2 13h15"/><path d="M22 20a2 2 0 1 1-4 0c0-1.6 1.7-2.4 2-4 .3 1.6 2 2.4 2 4Z"/>',columns:'<path d="M9 3H5a2 2 0 0 0-2 2v4m6-6h10a2 2 0 0 1 2 2v4M9 3v18m0 0h10a2 2 0 0 0 2-2V9M9 21H5a2 2 0 0 1-2-2V9m0 0h18"/>',contracted:'<path d="m9 18 6-6-6-6"/>',copy:'<rect width="14" height="14" x="8" y="8" rx="2" ry="2"/><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"/>',cross:'<path d="M18 6 6 18"/><path d="m6 6 12 12"/>',csv:'<path d="M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z"/><polyline points="14 2 14 8 20 8"/><path d="M8 13h2"/><path d="M8 17h2"/><path d="M14 13h2"/><path d="M14 17h2"/>',cut:'<circle cx="6" cy="6" r="3"/><path d="M8.12 8.12 12 12"/><path d="M20 4 8.12 15.88"/><circle cx="6" cy="18" r="3"/><path d="M14.8 14.8 20 20"/>',desc:'<path d="M12 5v14"/><path d="m19 12-7 7-7-7"/>',down:'<path d="M12 5v14"/><path d="m19 12-7 7-7-7"/>',excel:'<path d="M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z"/><polyline points="14 2 14 8 20 8"/><path d="M8 13h2"/><path d="M8 17h2"/><path d="M14 13h2"/><path d="M14 17h2"/>',expanded:'<path d="m15 18-6-6 6-6"/>',eye:'<path d="M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z"/><circle cx="12" cy="12" r="3"/>',"eye-slash":'<path d="M9.88 9.88a3 3 0 1 0 4.24 4.24"/><path d="M10.73 5.08A10.43 10.43 0 0 1 12 5c7 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68"/><path d="M6.61 6.61A13.526 13.526 0 0 0 2 12s3 7 10 7a9.74 9.74 0 0 0 5.39-1.61"/><line x1="2" x2="22" y1="2" y2="22"/>',filter:'<path d="M3 6h18"/><path d="M7 12h10"/><path d="M10 18h4"/>',first:'<path d="m17 18-6-6 6-6"/><path d="M7 6v12"/>',grip:'<circle cx="5" cy="8" r="0.5"/><circle cx="12" cy="8" r="0.5"/><circle cx="19" cy="8" r="0.5"/><circle cx="5" cy="16" r="0.5"/><circle cx="12" cy="16" r="0.5"/><circle cx="19" cy="16" r="0.5"/><g stroke="none" fill="currentColor"><circle cx="5" cy="8" r="1"/><circle cx="12" cy="8" r="1"/><circle cx="19" cy="8" r="1"/><circle cx="5" cy="16" r="1"/><circle cx="12" cy="16" r="1"/><circle cx="19" cy="16" r="1"/></g>',group:'<path d="M16 12H3"/><path d="M16 18H3"/><path d="M10 6H3"/><path d="M21 18V8a2 2 0 0 0-2-2h-5"/><path d="m16 8-2-2 2-2"/>',last:'<path d="m7 18 6-6-6-6"/><path d="M17 6v12"/>',left:'<path d="m12 19-7-7 7-7"/><path d="M19 12H5"/>',linked:'<path d="M9 17H7A5 5 0 0 1 7 7h2"/><path d="M15 7h2a5 5 0 1 1 0 10h-2"/><line x1="8" x2="16" y1="12" y2="12"/>',loading:'<line x1="12" x2="12" y1="2" y2="6"/><line x1="12" x2="12" y1="18" y2="22"/><line x1="4.93" x2="7.76" y1="4.93" y2="7.76"/><line x1="16.24" x2="19.07" y1="16.24" y2="19.07"/><line x1="2" x2="6" y1="12" y2="12"/><line x1="18" x2="22" y1="12" y2="12"/><line x1="4.93" x2="7.76" y1="19.07" y2="16.24"/><line x1="16.24" x2="19.07" y1="7.76" y2="4.93"/>',maximize:'<polyline points="15 3 21 3 21 9"/><polyline points="9 21 3 21 3 15"/><line x1="21" x2="14" y1="3" y2="10"/><line x1="3" x2="10" y1="21" y2="14"/>',menu:'<line x1="4" x2="20" y1="12" y2="12"/><line x1="4" x2="20" y1="6" y2="6"/><line x1="4" x2="20" y1="18" y2="18"/>',"menu-alt":'<circle cx="12" cy="5" r="0.75" fill="#D9D9D9"/><circle cx="12" cy="12" r="0.75" fill="#D9D9D9"/><circle cx="12" cy="19" r="0.75" fill="#D9D9D9"/>',minimize:'<polyline points="4 14 10 14 10 20"/><polyline points="20 10 14 10 14 4"/><line x1="14" x2="21" y1="10" y2="3"/><line x1="3" x2="10" y1="21" y2="14"/>',minus:'<circle cx="12" cy="12" r="10"/><path d="M8 12h8"/>',next:'<path d="m9 18 6-6-6-6"/>',none:'<path d="m7 15 5 5 5-5"/><path d="m7 9 5-5 5 5"/>',"not-allowed":'<circle cx="12" cy="12" r="10"/><path d="m4.9 4.9 14.2 14.2"/>',paste:'<path d="M15 2H9a1 1 0 0 0-1 1v2c0 .6.4 1 1 1h6c.6 0 1-.4 1-1V3c0-.6-.4-1-1-1Z"/><path d="M8 4H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2M16 4h2a2 2 0 0 1 2 2v2M11 14h10"/><path d="m17 10 4 4-4 4"/>',pin:'<line x1="12" x2="12" y1="17" y2="22"/><path d="M5 17h14v-1.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V6h1a2 2 0 0 0 0-4H8a2 2 0 0 0 0 4h1v4.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24Z"/>',pivot:'<path d="M15 3v18"/><rect width="18" height="18" x="3" y="3" rx="2"/><path d="M21 9H3"/><path d="M21 15H3"/>',plus:'<circle cx="12" cy="12" r="10"/><path d="M8 12h8"/><path d="M12 8v8"/>',previous:'<path d="m15 18-6-6 6-6"/>',right:'<path d="M5 12h14"/><path d="m12 5 7 7-7 7"/>',save:'<path d="M12 17V3"/><path d="m6 11 6 6 6-6"/><path d="M19 21H5"/>',settings:'<path d="M20 7h-9"/><path d="M14 17H5"/><circle cx="17" cy="17" r="3"/><circle cx="7" cy="7" r="3"/>',"small-left":'<path d="m15 18-6-6 6-6"/>',"small-right":'<path d="m9 18 6-6-6-6"/>',tick:'<path d="M20 6 9 17l-5-5"/>',"tree-closed":'<path d="m9 18 6-6-6-6"/>',"tree-indeterminate":'<path d="M5 12h14"/>',"tree-open":'<path d="m6 9 6 6 6-6"/>',unlinked:'<path d="M9 17H7A5 5 0 0 1 7 7"/><path d="M15 7h2a5 5 0 0 1 4 8"/><line x1="8" x2="12" y1="12" y2="12"/><line x1="2" x2="22" y1="2" y2="22"/>',up:'<path d="m5 12 7-7 7 7"/><path d="M12 19V5"/>'},RF={aasc:'<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M13.2012 8.07928C13.6346 8.0793 14.0128 8.15365 14.3359 8.30193C14.6609 8.45018 14.9141 8.65595 15.0947 8.9201C15.2754 9.18439 15.3683 9.49109 15.374 9.83904H14.1904C14.1676 9.60898 14.0695 9.4303 13.8965 9.30291C13.7235 9.1756 13.4889 9.1115 13.1924 9.1115C12.9909 9.1115 12.8204 9.1404 12.6816 9.19744C12.543 9.25255 12.4364 9.32917 12.3623 9.42791C12.2901 9.52678 12.2539 9.63933 12.2539 9.76482C12.2501 9.8692 12.272 9.9604 12.3193 10.0383C12.3688 10.1162 12.4369 10.1843 12.5225 10.2414C12.6079 10.2964 12.7064 10.3451 12.8184 10.3869C12.9304 10.4268 13.0505 10.4609 13.1777 10.4894L13.7031 10.6144C13.9578 10.6715 14.1914 10.7479 14.4043 10.8429C14.6173 10.938 14.8021 11.0547 14.958 11.1935C15.1138 11.3323 15.2348 11.4957 15.3203 11.6838C15.4077 11.8719 15.4522 12.088 15.4541 12.3312C15.4522 12.6885 15.3611 12.9986 15.1807 13.2609C15.0019 13.5214 14.7427 13.7248 14.4043 13.8693C14.0678 14.0118 13.6617 14.0832 13.1865 14.0832C12.7153 14.0832 12.3048 14.0107 11.9551 13.8664C11.6071 13.7219 11.3345 13.5071 11.1387 13.2238C10.9449 12.9387 10.8435 12.5862 10.834 12.1662H12.0283C12.0416 12.362 12.0984 12.5252 12.1973 12.6564C12.298 12.7857 12.4323 12.8838 12.5996 12.9504C12.7688 13.0149 12.96 13.047 13.1729 13.047C13.3817 13.047 13.563 13.0169 13.7168 12.9562C13.8727 12.8954 13.9935 12.8106 14.0791 12.7023C14.1647 12.5939 14.208 12.469 14.208 12.3283C14.2079 12.1974 14.1686 12.0875 14.0908 11.9982C14.0148 11.9089 13.9022 11.8324 13.7539 11.7697C13.6076 11.707 13.4276 11.6501 13.2148 11.5988L12.5791 11.4387C12.0869 11.3189 11.6982 11.1318 11.4131 10.8771C11.128 10.6224 10.9855 10.2793 10.9873 9.84783C10.9854 9.49418 11.0804 9.18439 11.2705 8.9201C11.4625 8.65603 11.7261 8.45015 12.0605 8.30193C12.3951 8.15369 12.7754 8.07928 13.2012 8.07928Z" fill="black"/><path fill-rule="evenodd" clip-rule="evenodd" d="M5.8125 14.0002H4.48926L4.05664 12.6681H1.94824L1.51465 14.0002H0.19043L2.20703 8.15935H3.79883L5.8125 14.0002ZM2.26172 11.7043H3.74316L3.02539 9.49334H2.98047L2.26172 11.7043Z" fill="black"/><path fill-rule="evenodd" clip-rule="evenodd" d="M8.45215 8.15935C8.88165 8.15935 9.24031 8.22251 9.52734 8.34978C9.81445 8.47717 10.0303 8.65477 10.1748 8.88103C10.3192 9.10536 10.3916 9.36368 10.3916 9.65642C10.3916 9.88452 10.3461 10.085 10.2549 10.258C10.1637 10.4289 10.0384 10.5696 9.87891 10.6799C9.72117 10.7882 9.54024 10.8657 9.33691 10.9113V10.9679C9.55917 10.9775 9.76716 11.0406 9.96094 11.1564C10.1568 11.2724 10.3158 11.4356 10.4375 11.6447C10.5591 11.8519 10.6201 12.099 10.6201 12.3859C10.6201 12.6958 10.5427 12.9727 10.3887 13.216C10.2366 13.4573 10.0113 13.6486 9.71289 13.7892C9.41443 13.9299 9.04655 14.0002 8.60938 14.0002H6.11426V8.15935H8.45215ZM7.34863 12.9904H8.35547C8.69943 12.9904 8.95057 12.9252 9.1084 12.7941C9.26621 12.661 9.34473 12.4834 9.34473 12.2629C9.34468 12.1014 9.30643 11.9587 9.22852 11.8351C9.15056 11.7116 9.03903 11.6145 8.89453 11.5441C8.75195 11.4738 8.58148 11.4387 8.38379 11.4387H7.34863V12.9904ZM7.34863 10.6037H8.26465C8.43369 10.6036 8.58376 10.5737 8.71484 10.5148C8.84793 10.454 8.95227 10.3683 9.02832 10.258C9.10628 10.1477 9.14551 10.0155 9.14551 9.8615C9.14546 9.65055 9.07008 9.48001 8.91992 9.35076C8.77165 9.22169 8.56064 9.15741 8.28711 9.1574H7.34863V10.6037Z" fill="black"/><path d="M7.16602 0.377127C7.44584 0.189493 7.82551 0.20905 8.08496 0.442557L11.418 3.44256C11.7257 3.71966 11.7507 4.19428 11.4736 4.50213C11.1966 4.80961 10.7228 4.83441 10.415 4.55779L7.60938 2.03338L5.11328 4.53045C4.82042 4.82326 4.34562 4.82322 4.05273 4.53045C3.75986 4.23757 3.75989 3.7628 4.05273 3.4699L7.05273 0.4699L7.16602 0.377127Z" fill="black"/></svg>',adesc:'<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M10.3867 11.4697C10.6796 11.1771 11.1544 11.1769 11.4473 11.4697C11.7399 11.7626 11.7399 12.2374 11.4473 12.5303L8.44727 15.5303L8.33398 15.623C8.05425 15.8106 7.67449 15.7909 7.41504 15.5576L4.08203 12.5576C3.77415 12.2805 3.74927 11.8059 4.02637 11.498C4.30342 11.1907 4.77722 11.1657 5.08496 11.4424L7.89062 13.9668L10.3867 11.4697Z" fill="black"/><path d="M13.2012 3.0791C13.6346 3.07912 14.0128 3.1535 14.3359 3.30176C14.6611 3.45006 14.9141 3.65661 15.0947 3.9209C15.2752 4.18513 15.3683 4.49104 15.374 4.83887H14.1904C14.1676 4.60882 14.0695 4.43012 13.8965 4.30273C13.7235 4.17546 13.4889 4.11133 13.1924 4.11133C12.9909 4.11133 12.8204 4.14023 12.6816 4.19727C12.5431 4.25236 12.4364 4.32902 12.3623 4.42773C12.2901 4.52659 12.2539 4.63919 12.2539 4.76465C12.2501 4.86901 12.272 4.96023 12.3193 5.03809C12.3688 5.11604 12.4369 5.18417 12.5225 5.24121C12.6079 5.29623 12.7064 5.34496 12.8184 5.38672C12.9304 5.42661 13.0505 5.46075 13.1777 5.48926L13.7031 5.61426C13.9578 5.67128 14.1914 5.74776 14.4043 5.84277C14.6172 5.93784 14.8021 6.05457 14.958 6.19336C15.1139 6.33216 15.2348 6.49633 15.3203 6.68457C15.4076 6.8727 15.4522 7.08885 15.4541 7.33203C15.4521 7.68929 15.3612 7.99944 15.1807 8.26172C15.0019 8.52216 14.7427 8.72465 14.4043 8.86914C14.0678 9.01165 13.6617 9.08301 13.1865 9.08301C12.7153 9.08299 12.3048 9.01057 11.9551 8.86621C11.6072 8.72173 11.3345 8.50786 11.1387 8.22461C10.9447 7.9394 10.8435 7.58622 10.834 7.16602H12.0283C12.0416 7.36176 12.0985 7.52509 12.1973 7.65625C12.298 7.78554 12.4323 7.88365 12.5996 7.9502C12.7688 8.01477 12.96 8.04785 13.1729 8.04785C13.3817 8.04781 13.5629 8.01678 13.7168 7.95605C13.8727 7.89522 13.9935 7.81051 14.0791 7.70215C14.1646 7.59387 14.2079 7.46965 14.208 7.3291C14.208 7.19796 14.1687 7.08739 14.0908 6.99805C14.0148 6.90868 13.9022 6.83228 13.7539 6.76953C13.6076 6.70685 13.4276 6.64993 13.2148 6.59863L12.5791 6.43848C12.0868 6.31871 11.6982 6.13163 11.4131 5.87695C11.1279 5.62221 10.9855 5.27916 10.9873 4.84766C10.9854 4.49404 11.0804 4.18517 11.2705 3.9209C11.4625 3.65661 11.7259 3.45006 12.0605 3.30176C12.3951 3.15353 12.7754 3.0791 13.2012 3.0791Z" fill="black"/><path fill-rule="evenodd" clip-rule="evenodd" d="M5.8125 9H4.48926L4.05664 7.66797H1.94824L1.51465 9H0.19043L2.20703 3.15918H3.79883L5.8125 9ZM2.26172 6.7041H3.74316L3.02539 4.49414H2.98047L2.26172 6.7041Z" fill="black"/><path fill-rule="evenodd" clip-rule="evenodd" d="M8.45215 3.15918C8.88181 3.15918 9.24025 3.22322 9.52734 3.35059C9.81445 3.47798 10.0303 3.6546 10.1748 3.88086C10.3193 4.10518 10.3916 4.36351 10.3916 4.65625C10.3916 4.88432 10.3461 5.08484 10.2549 5.25781C10.1636 5.4289 10.0386 5.57039 9.87891 5.68066C9.72118 5.78898 9.54022 5.86549 9.33691 5.91113V5.96875C9.55913 5.9783 9.76719 6.04044 9.96094 6.15625C10.1568 6.27223 10.3158 6.43538 10.4375 6.64453C10.5591 6.85173 10.6201 7.09875 10.6201 7.38574C10.6201 7.69567 10.5427 7.97245 10.3887 8.21582C10.2366 8.45719 10.0113 8.64841 9.71289 8.78906C9.41442 8.9297 9.04658 8.99999 8.60938 9H6.11426V3.15918H8.45215ZM7.34863 7.99023H8.35547C8.69948 7.99023 8.95057 7.92504 9.1084 7.79395C9.26621 7.66085 9.34473 7.48325 9.34473 7.2627C9.34466 7.10125 9.3064 6.95844 9.22852 6.83496C9.15056 6.71143 9.03899 6.61427 8.89453 6.54395C8.75196 6.47365 8.58145 6.43848 8.38379 6.43848H7.34863V7.99023ZM7.34863 5.60352H8.26465C8.43369 5.60347 8.58376 5.57354 8.71484 5.51465C8.84791 5.45381 8.95228 5.36807 9.02832 5.25781C9.10623 5.14755 9.14551 5.01529 9.14551 4.86133C9.14542 4.65046 9.07002 4.48078 8.91992 4.35156C8.77163 4.22228 8.56087 4.15724 8.28711 4.15723H7.34863V5.60352Z" fill="black"/></svg>',"chevron-down":'<svg width="16" height="16" viewBox="0 0 16 16" class="ag-icon" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M12 6L8 10L4 6" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>',"chevron-left":'<svg width="16" height="16" viewBox="0 0 16 16" class="ag-icon" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M10 12L6 8L10 4" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>',"chevron-right":'<svg width="16" height="16" viewBox="0 0 16 16" class="ag-icon" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M6 12L10 8L6 4" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>',"chevron-up":'<svg width="16" height="16" viewBox="0 0 16 16" class="ag-icon" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M4 10L8 6L12 10" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>',"column-arrow":'<svg xmlns="http://www.w3.org/2000/svg" class="ag-icon" fill="none" viewBox="0 0 32 32"><path fill-rule="evenodd" clip-rule="evenodd" d="M0 26C0 28.2092 1.79086 30 4 30H14C16.2091 30 18 28.2092 18 26V15H25.8786L24.4394 16.4393C23.8536 17.0251 23.8536 17.9749 24.4394 18.5607C25.0252 19.1464 25.9748 19.1464 26.5606 18.5607L30.5606 14.5607C31.1464 13.9749 31.1464 13.0251 30.5606 12.4393L26.5606 8.43934C25.9748 7.85356 25.0252 7.85356 24.4394 8.43934C23.8536 9.02512 23.8536 9.97488 24.4394 10.5607L25.8786 12H18V6C18 3.79086 16.2091 2 14 2H4C1.79086 2 0 3.79086 0 6V26ZM14 5H10.5V12H15V6C15 5.44772 14.5523 5 14 5ZM4 5H7.5V12H3V6C3 5.44772 3.44772 5 4 5ZM10.5 15H15V26C15 26.5522 14.5523 27 14 27H10.5V15ZM4 27H7.5V15H3V26C3 26.5522 3.44772 27 4 27Z" fill="currentColor"/></svg>',edit:'<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M3.5 10.6262V12.5012H5.375L10.905 6.97122L9.03 5.09622L3.5 10.6262ZM12.355 5.52122C12.4014 5.47497 12.4381 5.42002 12.4632 5.35953C12.4883 5.29905 12.5012 5.23421 12.5012 5.16872C12.5012 5.10324 12.4883 5.0384 12.4632 4.97791C12.4381 4.91742 12.4014 4.86248 12.355 4.81622L11.185 3.64622C11.1387 3.59987 11.0838 3.5631 11.0233 3.53801C10.9628 3.51291 10.898 3.5 10.8325 3.5C10.767 3.5 10.7022 3.51291 10.6417 3.53801C10.5812 3.5631 10.5263 3.59987 10.48 3.64622L9.565 4.56122L11.44 6.43622L12.355 5.52122Z" fill="currentColor"/></svg>',"filter-add":'<svg width="16" height="16" viewBox="0 0 16 16" class="ag-icon" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M5.12126 7.75L10.8517 7.75" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/><path d="M6.65934 11.748L9.32778 11.748" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/><path d="M12.2943 1.04872V6.19184M14.9886 3.74341H9.68478" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/><path d="M8.25488 3C8.04799 3.18323 7.91706 3.45099 7.91699 3.74902C7.91713 4.04868 8.04988 4.31681 8.25879 4.5H2C1.58579 4.5 1.25 4.16421 1.25 3.75C1.25 3.33579 1.58579 3 2 3H8.25488Z" fill="currentColor"/></svg>',"pinned-bottom":'<svg xmlns="http://www.w3.org/2000/svg" fill="none" class="ag-icon" viewBox="0 0 16 16"><path fill="currentColor" d="M3.47 12.28A.75.75 0 0 1 4 11h8a.75.75 0 0 1 0 1.5H4a.75.75 0 0 1-.53-.22ZM12.731 5.256a.75.75 0 0 1-.2.524l-4 4a.75.75 0 0 1-1.06 0l-4-4a.75.75 0 1 1 1.06-1.06l2.72 2.72V2a.75.75 0 0 1 1.5 0v5.44l2.72-2.72a.75.75 0 0 1 1.26.536Z"/></svg>',"pinned-top":'<svg xmlns="http://www.w3.org/2000/svg" class="ag-icon" fill="none" viewBox="0 0 16 16"><path fill="currentColor" d="M12.53 3.72A.75.75 0 0 1 12 5H4a.75.75 0 0 1 0-1.5h8a.75.75 0 0 1 .53.22ZM3.269 10.744a.75.75 0 0 1 .2-.524l4-4a.75.75 0 0 1 1.06 0l4 4a.75.75 0 1 1-1.06 1.06L8.75 8.56V14a.75.75 0 0 1-1.5 0V8.56l-2.72 2.72a.75.75 0 0 1-1.26-.536Z"/></svg>',"small-down":'<svg xmlns="http://www.w3.org/2000/svg" class="ag-icon" fill="black" stroke="none" viewBox="0 0 32 32"><path d="M7.334 10.667 16 21.334l8.667-10.667H7.334Z"/></svg>',"small-up":'<svg xmlns="http://www.w3.org/2000/svg" class="ag-icon" fill="black" stroke="none" viewBox="0 0 32 32"><path d="M7.334 21.333 16 10.666l8.667 10.667H7.334Z"/></svg>',"un-pin":'<svg xmlns="http://www.w3.org/2000/svg" fill="none" class="ag-icon" viewBox="0 0 16 16"><path fill="currentColor" d="M8 11a.75.75 0 0 0-.75.75v3.333a.75.75 0 1 0 1.5 0V11.75A.75.75 0 0 0 8 11Z"/><path fill="currentColor" d="M13.11 1.436a.75.75 0 0 0-1.22-.872l-10 14a.75.75 0 1 0 1.22.872L5.207 12.5h7.376a.75.75 0 0 0 .75-.75v-1.174a2.08 2.08 0 0 0-1.153-1.863l-1.185-.599-.005-.002a.58.58 0 0 1-.323-.522V5.165a2.083 2.083 0 0 0 1.854-2.904l.589-.825Zm-3.943 5.52v.634a2.08 2.08 0 0 0 1.153 1.863l1.185.6.005.002a.58.58 0 0 1 .323.522V11H6.28l2.887-4.044ZM9.277 1H5.25a2.084 2.084 0 0 0-.083 4.165v1.676l1.5-2.132v-.292a.75.75 0 0 0-.75-.75H5.25a.584.584 0 0 1 0-1.167h2.972L9.277 1Z"/></svg>'},yV=(e={})=>{let t="";for(const n of[...Object.keys(SF),...Object.keys(RF)]){const i=SV(n,e.strokeWidth);t+=`.ag-icon-${n}::before { mask-image: url('data:image/svg+xml,${encodeURIComponent(i)}'); }
|
|
21
21
|
`}return t},SV=(e,t=1.5)=>{const n=RF[e];if(n)return n;const i=SF[e];if(!i)throw new Error(`Missing icon data for ${e}`);return`<svg xmlns="http://www.w3.org/2000/svg" class="ag-icon" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke="black" stroke-width="${t}" viewBox="0 0 24 24"><style>* { vector-effect: non-scaling-stroke; }</style>`+i+"</svg>"},RV=(e={})=>ro({feature:"iconSet",css:()=>yV(e)}),FV=RV(),xV=':where(.ag-input-field-input[type=number]:not(.ag-number-field-input-stepper)){-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield;&::-webkit-inner-spin-button,&::-webkit-outer-spin-button{-webkit-appearance:none;appearance:none;margin:0}}.ag-input-field-input:where(input:not([type]),input[type=text],input[type=number],input[type=tel],input[type=date],input[type=datetime-local],textarea){background-color:var(--ag-input-background-color);border:var(--ag-input-border);border-radius:var(--ag-input-border-radius);color:var(--ag-input-text-color);font-family:inherit;font-size:inherit;line-height:inherit;margin:0;min-height:var(--ag-input-height);padding:0;&:where(:disabled){background-color:var(--ag-input-disabled-background-color);border:var(--ag-input-disabled-border);color:var(--ag-input-disabled-text-color)}&:where(:focus){background-color:var(--ag-input-focus-background-color);border:var(--ag-input-focus-border);box-shadow:var(--ag-input-focus-shadow);color:var(--ag-input-focus-text-color);outline:none}&:where(:invalid){background-color:var(--ag-input-invalid-background-color);border:var(--ag-input-invalid-border);color:var(--ag-input-invalid-text-color)}&:where(.invalid){background-color:var(--ag-input-invalid-background-color);border:var(--ag-input-invalid-border);color:var(--ag-input-invalid-text-color)}&::-moz-placeholder{color:var(--ag-input-placeholder-text-color)}&::placeholder{color:var(--ag-input-placeholder-text-color)}}:where(.ag-ltr) .ag-input-field-input:where(input:not([type]),input[type=text],input[type=number],input[type=tel],input[type=date],input[type=datetime-local],textarea){padding-left:var(--ag-input-padding-start)}:where(.ag-rtl) .ag-input-field-input:where(input:not([type]),input[type=text],input[type=number],input[type=tel],input[type=date],input[type=datetime-local],textarea){padding-right:var(--ag-input-padding-start)}&:where(.ag-ltr,.ag-rtl) .ag-input-field-input:where(input:not([type]),input[type=text],input[type=number],input[type=tel],input[type=date],input[type=datetime-local],textarea){padding:0 var(--ag-input-padding-start)}:where(.ag-column-select-header-filter-wrapper),:where(.ag-filter-add-select),:where(.ag-filter-filter),:where(.ag-filter-toolpanel-search),:where(.ag-floating-filter-search-icon),:where(.ag-mini-filter){.ag-input-wrapper:before{background-color:currentcolor;color:var(--ag-input-icon-color);content:"";display:block;height:12px;-webkit-mask-image:url("data:image/svg+xml;charset=utf-8;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMiIgaGVpZ2h0PSIxMiIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMDAwIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIHN0cm9rZS13aWR0aD0iMS41Ij48cGF0aCBkPSJNNS4zIDlhMy43IDMuNyAwIDEgMCAwLTcuNSAzLjcgMy43IDAgMCAwIDAgNy41Wk0xMC41IDEwLjUgOC4zIDguMiIvPjwvc3ZnPg==");mask-image:url("data:image/svg+xml;charset=utf-8;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMiIgaGVpZ2h0PSIxMiIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMDAwIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIHN0cm9rZS13aWR0aD0iMS41Ij48cGF0aCBkPSJNNS4zIDlhMy43IDMuNyAwIDEgMCAwLTcuNSAzLjcgMy43IDAgMCAwIDAgNy41Wk0xMC41IDEwLjUgOC4zIDguMiIvPjwvc3ZnPg==");-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;opacity:.5;position:absolute;width:12px}}:where(.ag-ltr) :where(.ag-column-select-header-filter-wrapper),:where(.ag-ltr) :where(.ag-filter-add-select),:where(.ag-ltr) :where(.ag-filter-filter),:where(.ag-ltr) :where(.ag-filter-toolpanel-search),:where(.ag-ltr) :where(.ag-floating-filter-search-icon),:where(.ag-ltr) :where(.ag-mini-filter){.ag-input-wrapper:before{margin-left:var(--ag-spacing)}.ag-number-field-input,.ag-text-field-input{padding-left:calc(var(--ag-spacing)*1.5 + 12px)}}:where(.ag-rtl) :where(.ag-column-select-header-filter-wrapper),:where(.ag-rtl) :where(.ag-filter-add-select),:where(.ag-rtl) :where(.ag-filter-filter),:where(.ag-rtl) :where(.ag-filter-toolpanel-search),:where(.ag-rtl) :where(.ag-floating-filter-search-icon),:where(.ag-rtl) :where(.ag-mini-filter){.ag-input-wrapper:before{margin-right:var(--ag-spacing)}.ag-number-field-input,.ag-text-field-input{padding-right:calc(var(--ag-spacing)*1.5 + 12px)}}',PV=".ag-input-field-input:where(input:not([type]),input[type=text],input[type=number],input[type=tel],input[type=date],input[type=datetime-local],textarea){&:focus{box-shadow:var(--ag-focus-shadow);&:where(.invalid),&:where(:invalid){box-shadow:var(--ag-focus-error-shadow)}}}",EV={inputBackgroundColor:"transparent",inputBorder:!1,inputBorderRadius:0,inputTextColor:{ref:"textColor"},inputPlaceholderTextColor:{ref:"inputTextColor",mix:.5},inputPaddingStart:0,inputHeight:{calc:"max(iconSize, fontSize) + spacing * 2"},inputFocusBackgroundColor:{ref:"inputBackgroundColor"},inputFocusBorder:{ref:"inputBorder"},inputFocusShadow:"none",inputFocusTextColor:{ref:"inputTextColor"},inputDisabledBackgroundColor:{ref:"inputBackgroundColor"},inputDisabledBorder:{ref:"inputBorder"},inputDisabledTextColor:{ref:"inputTextColor"},inputInvalidBackgroundColor:{ref:"inputBackgroundColor"},inputInvalidBorder:{ref:"inputBorder"},inputInvalidTextColor:{ref:"inputTextColor"},inputIconColor:{ref:"inputTextColor"},pickerButtonBorder:!1,pickerButtonFocusBorder:{ref:"inputFocusBorder"},pickerButtonBackgroundColor:{ref:"backgroundColor"},pickerButtonFocusBackgroundColor:{ref:"backgroundColor"},pickerListBorder:!1,pickerListBackgroundColor:{ref:"backgroundColor"},colorPickerThumbSize:18,colorPickerTrackSize:12,colorPickerThumbBorderWidth:3,colorPickerTrackBorderRadius:12,colorPickerColorBorderRadius:4},DV=()=>ro({feature:"inputStyle",params:{...EV,inputBackgroundColor:jn,inputBorder:!0,inputBorderRadius:{ref:"borderRadius"},inputPaddingStart:{ref:"spacing"},inputFocusBorder:{color:Lo},inputFocusShadow:{ref:"focusShadow"},inputDisabledBackgroundColor:Ni(.06),inputDisabledTextColor:{ref:"textColor",mix:.5},inputInvalidBorder:{color:{ref:"invalidColor"}},pickerButtonBorder:!0,pickerListBorder:!0},css:()=>xV+PV}),TV=DV(),AV='.ag-tabs-header{background-color:var(--ag-tab-bar-background-color);border-bottom:var(--ag-tab-bar-border);display:flex;flex:1;gap:var(--ag-tab-spacing);padding:var(--ag-tab-bar-top-padding) var(--ag-tab-bar-horizontal-padding) 0}.ag-tabs-header-wrapper{display:flex}.ag-tabs-close-button-wrapper{align-items:center;border:0;display:flex;padding:var(--ag-spacing)}:where(.ag-ltr) .ag-tabs-close-button-wrapper{border-right:solid var(--ag-border-width) var(--ag-border-color)}:where(.ag-rtl) .ag-tabs-close-button-wrapper{border-left:solid var(--ag-border-width) var(--ag-border-color)}.ag-tabs-close-button{background-color:unset;border:0;cursor:pointer;padding:0}.ag-tab{align-items:center;background-color:var(--ag-tab-background-color);border-left:var(--ag-tab-selected-border-width) solid transparent;border-right:var(--ag-tab-selected-border-width) solid transparent;color:var(--ag-tab-text-color);cursor:pointer;display:flex;flex:1;justify-content:center;padding:var(--ag-tab-top-padding) var(--ag-tab-horizontal-padding) var(--ag-tab-bottom-padding);position:relative}.ag-tab:hover{background-color:var(--ag-tab-hover-background-color);color:var(--ag-tab-hover-text-color)}.ag-tab.ag-tab-selected{background-color:var(--ag-tab-selected-background-color);color:var(--ag-tab-selected-text-color)}:where(.ag-ltr) .ag-tab.ag-tab-selected:where(:not(:first-of-type)){border-left-color:var(--ag-tab-selected-border-color)}:where(.ag-rtl) .ag-tab.ag-tab-selected:where(:not(:first-of-type)){border-right-color:var(--ag-tab-selected-border-color)}:where(.ag-ltr) .ag-tab.ag-tab-selected:where(:not(:last-of-type)){border-right-color:var(--ag-tab-selected-border-color)}:where(.ag-rtl) .ag-tab.ag-tab-selected:where(:not(:last-of-type)){border-left-color:var(--ag-tab-selected-border-color)}.ag-tab:after{background-color:var(--ag-tab-selected-underline-color);bottom:0;content:"";display:block;height:var(--ag-tab-selected-underline-width);left:0;opacity:0;position:absolute;right:0;transition:opacity var(--ag-tab-selected-underline-transition-duration)}.ag-tab.ag-tab-selected:after{opacity:1}',IV={tabBarBackgroundColor:"transparent",tabBarHorizontalPadding:0,tabBarTopPadding:0,tabBackgroundColor:"transparent",tabTextColor:{ref:"textColor"},tabHorizontalPadding:{ref:"spacing"},tabTopPadding:{ref:"spacing"},tabBottomPadding:{ref:"spacing"},tabSpacing:"0",tabHoverBackgroundColor:{ref:"tabBackgroundColor"},tabHoverTextColor:{ref:"tabTextColor"},tabSelectedBackgroundColor:{ref:"tabBackgroundColor"},tabSelectedTextColor:{ref:"tabTextColor"},tabSelectedBorderWidth:{ref:"borderWidth"},tabSelectedBorderColor:"transparent",tabSelectedUnderlineColor:"transparent",tabSelectedUnderlineWidth:0,tabSelectedUnderlineTransitionDuration:0,tabBarBorder:!1},MV=()=>ro({feature:"tabStyle",params:{...IV,tabBarBorder:!0,tabBarBackgroundColor:_i(.05),tabTextColor:{ref:"textColor",mix:.7},tabSelectedTextColor:{ref:"textColor"},tabHoverTextColor:{ref:"textColor"},tabSelectedBorderColor:{ref:"borderColor"},tabSelectedBackgroundColor:jn},css:AV}),kV=MV(),LV=()=>({fontFamily:[{googleFont:"IBM Plex Sans"},"-apple-system","BlinkMacSystemFont","Segoe UI","Roboto","Oxygen-Sans","Ubuntu"]}),OV=()=>pV().withPart(vV).withPart(bV).withPart(FV).withPart(kV).withPart(TV).withPart(bF).withParams(LV()),_V=OV(),Qr=(e,t,n,i,o)=>({changeKey:e,type:t,defaultValue:n,noWarn:i,cacheDefault:o}),NV=Qr("cellHorizontalPadding","length",16),BV=Qr("indentationLevel","length",0,!0,!0),GV=Qr("rowGroupIndentSize","length",0),FF=Qr("rowHeight","length",42),xF=Qr("headerHeight","length",48),Wm=Qr("rowBorderWidth","border",1),PF=Qr("pinnedRowBorderWidth","border",1),HV=Qr("headerRowBorderWidth","border",1);function VV(e,t){for(const n of t.sort((i,o)=>i.moduleName.localeCompare(o.moduleName))){const i=n.css;i&&e.set(`module-${n.moduleName}`,i)}}var WV=class extends YH{initVariables(){this.addManagedPropertyListener("rowHeight",()=>this.refreshRowHeightVariable()),this.getSizeEl(FF),this.getSizeEl(xF),this.getSizeEl(Wm),this.getSizeEl(PF),this.refreshRowBorderWidthVariable()}getPinnedRowBorderWidth(){return this.getCSSVariablePixelValue(PF)}getRowBorderWidth(){return this.getCSSVariablePixelValue(Wm)}getHeaderRowBorderWidth(){return this.getCSSVariablePixelValue(HV)}getDefaultRowHeight(){return this.getCSSVariablePixelValue(FF)}getDefaultHeaderHeight(){return this.getCSSVariablePixelValue(xF)}getDefaultCellHorizontalPadding(){return this.getCSSVariablePixelValue(NV)}getCellPaddingLeft(){const e=this.getDefaultCellHorizontalPadding(),t=this.getCSSVariablePixelValue(BV),n=this.getCSSVariablePixelValue(GV);return e-1+n*t}getCellPadding(){const e=this.getDefaultCellHorizontalPadding()-1;return this.getCellPaddingLeft()+e}getDefaultColumnMinWidth(){return Math.min(36,this.getDefaultRowHeight())}refreshRowHeightVariable(){const{eRootDiv:e}=this,t=e.style.getPropertyValue("--ag-line-height").trim(),n=this.gos.get("rowHeight");if(n==null||isNaN(n)||!isFinite(n))return t!==null&&e.style.setProperty("--ag-line-height",null),-1;const i=`${n}px`;return t!=i?(e.style.setProperty("--ag-line-height",i),n):t!=""?Number.parseFloat(t):-1}fireStylesChangedEvent(e){e==="rowBorderWidth"&&this.refreshRowBorderWidthVariable(),super.fireStylesChangedEvent(e)}refreshRowBorderWidthVariable(){const e=this.getCSSVariablePixelValue(Wm);this.eRootDiv.style.setProperty("--ag-internal-row-border-width",`${e}px`)}postProcessThemeChange(e,t){e&&getComputedStyle(this.getMeasurementContainer()).getPropertyValue("--ag-legacy-styles-loaded")&>(t?106:239)}getAdditionalCss(){const e=new Map;return e.set("core",[XH]),VV(e,Array.from(JL())),e}getDefaultTheme(){return _V}varError(e,t){se(9,{variable:{cssName:e,defaultValue:t}})}themeError(e){gt(240,{theme:e})}shadowRootError(){gt(293)}},zV=class extends Vn{constructor(){super(...arguments),this.beanName="eventSvc",this.eventServiceType="global",this.globalSvc=new Ts}addListener(e,t,n){this.globalSvc.addEventListener(e,t,n)}removeListener(e,t,n){this.globalSvc.removeEventListener(e,t,n)}addGlobalListener(e,t=!1){this.globalSvc.addGlobalListener(e,t)}removeGlobalListener(e,t=!1){this.globalSvc.removeGlobalListener(e,t)}dispatchEvent(e){this.globalSvc.dispatchEvent(this.gos.addCommon(e))}dispatchEventOnce(e){this.globalSvc.dispatchEventOnce(this.gos.addCommon(e))}},UV=class extends zV{postConstruct(){const{globalListener:e,globalSyncListener:t}=this.beans;e&&this.addGlobalListener(e,!0),t&&this.addGlobalListener(t,!1)}};function zm(e,t,n){const i=e.visibleCols.headerGroupRowCount;if(n>=i)return{column:t,headerRowIndex:n};let o=t.getParent();for(;o&&o.getProvidedColumnGroup().getLevel()>n;)o=o.getParent();const r=t.isSpanHeaderHeight();return!o||r&&o.isPadding()?{column:t,headerRowIndex:i}:{column:o,headerRowIndex:o.getProvidedColumnGroup().getLevel()}}var $V=class extends X{constructor(){super(...arguments),this.beanName="headerNavigation",this.currentHeaderRowWithoutSpan=-1}postConstruct(){const e=this.beans;e.ctrlsSvc.whenReady(this,n=>{this.gridBodyCon=n.gridBodyCtrl});const t=nn(e);this.addManagedElementListeners(t,{mousedown:()=>{this.currentHeaderRowWithoutSpan=-1}})}getHeaderPositionForColumn(e,t){let n;const{colModel:i,colGroupSvc:o,ctrlsSvc:r}=this.beans;if(typeof e=="string"?(n=i.getCol(e),n||(n=o?.getColumnGroup(e)??null)):n=e,!n)return null;const a=r.getHeaderRowContainerCtrl()?.getAllCtrls(),l=Pt(a||[]).type==="filter",u=Oi(this.beans)-1;let h=-1,f=n;for(;f;)h++,f=f.getParent();let p=h;return t&&l&&p===u-1&&p++,p===-1?null:{headerRowIndex:p,column:n}}navigateVertically(e,t){const{focusSvc:n,visibleCols:i}=this.beans,{focusedHeader:o}=n;if(!o)return!1;const{headerRowIndex:r}=o,s=o.column,a=Oi(this.beans),l=this.getHeaderRowType(r),u=i.headerGroupRowCount;let{headerRowIndex:h,column:f,headerRowIndexWithoutSpan:p}=e==="UP"?jV(l,s,r):KV(s,r,u),m=!1;return h<0&&(h=0,f=s,m=!0),h>=a?(h=-1,this.currentHeaderRowWithoutSpan=-1):p!==void 0&&(this.currentHeaderRowWithoutSpan=p),!m&&!f?!1:n.focusHeaderPosition({headerPosition:{headerRowIndex:h,column:f},allowUserOverride:!0,event:t})}navigateHorizontally(e,t=!1,n){const{focusSvc:i,gos:o}=this.beans,r={...i.focusedHeader};let s,a;this.currentHeaderRowWithoutSpan!==-1?r.headerRowIndex=this.currentHeaderRowWithoutSpan:this.currentHeaderRowWithoutSpan=r.headerRowIndex,e==="LEFT"!==o.get("enableRtl")?(a="Before",s=this.findHeader(r,a)):(a="After",s=this.findHeader(r,a));const l=o.getCallback("tabToNextHeader");if(t&&l){const u=i.focusHeaderPositionFromUserFunc({userFunc:l,headerPosition:s,direction:a});if(u){const{headerRowIndex:h}=i.focusedHeader||{};h!=null&&h!=r.headerRowIndex&&(this.currentHeaderRowWithoutSpan=h)}return u}return s||!t?i.focusHeaderPosition({headerPosition:s,direction:a,fromTab:t,allowUserOverride:!0,event:n}):this.focusNextHeaderRow(r,a,n)}focusNextHeaderRow(e,t,n){const i=this.beans,o=e.headerRowIndex;let r=null,s;const a=Oi(i),l=this.beans.visibleCols.allCols;if(t==="Before"){if(o<=0)return!1;r=Pt(l),s=o-1,this.currentHeaderRowWithoutSpan-=1}else r=l[0],s=o+1,this.currentHeaderRowWithoutSpan<a?this.currentHeaderRowWithoutSpan+=1:this.currentHeaderRowWithoutSpan=-1;let{column:u,headerRowIndex:h}=zm(this.beans,r,s);return h>=a&&(h=-1),i.focusSvc.focusHeaderPosition({headerPosition:{column:u,headerRowIndex:h},direction:t,fromTab:!0,allowUserOverride:!0,event:n})}scrollToColumn(e,t="After"){if(e.getPinned())return;let n;if(Zt(e)){const i=e.getDisplayedLeafColumns();n=t==="Before"?Pt(i):i[0]}else n=e;this.gridBodyCon.scrollFeature.ensureColumnVisible(n)}findHeader(e,t){const{colGroupSvc:n,visibleCols:i}=this.beans;let o=e.column;if(o instanceof Rc){const l=o.getDisplayedLeafColumns();o=t==="Before"?l[0]:l[l.length-1]}const r=t==="Before"?i.getColBefore(o):i.getColAfter(o);if(!r)return;const s=i.headerGroupRowCount;if(e.headerRowIndex>=s)return{headerRowIndex:e.headerRowIndex,column:r};const a=n?.getColGroupAtLevel(r,e.headerRowIndex);return a?a.isPadding()&&r.isSpanHeaderHeight()?{headerRowIndex:i.headerGroupRowCount,column:r}:{headerRowIndex:e.headerRowIndex,column:a??r}:{headerRowIndex:r instanceof _s&&r.isSpanHeaderHeight()?i.headerGroupRowCount:e.headerRowIndex,column:r}}getHeaderRowType(e){const t=this.beans.ctrlsSvc.getHeaderRowContainerCtrl();if(t)return t.getRowType(e)}};function jV(e,t,n){const i=n-1;if(e!=="filter"){const o=t instanceof _s&&t.isSpanHeaderHeight();let r=t.getParent();for(;r&&(r.getProvidedColumnGroup().getLevel()>i||o&&r.isPadding());)r=r.getParent();if(r)return o?{column:r,headerRowIndex:r.getProvidedColumnGroup().getLevel(),headerRowIndexWithoutSpan:i}:{column:r,headerRowIndex:i,headerRowIndexWithoutSpan:i}}return{column:t,headerRowIndex:i,headerRowIndexWithoutSpan:i}}function KV(e,t,n){const i=t+1,o={column:e,headerRowIndex:i,headerRowIndexWithoutSpan:i};if(e instanceof Rc){if(i>=n)return{column:e.getDisplayedLeafColumns()[0],headerRowIndex:n,headerRowIndexWithoutSpan:i};let s=e.getDisplayedChildren()[0];if(s instanceof Rc&&s.isPadding()){const l=s.getDisplayedLeafColumns()[0];l.isSpanHeaderHeight()&&(s=l)}o.column=s,s instanceof _s&&s.isSpanHeaderHeight()&&(o.headerRowIndex=n,o.headerRowIndexWithoutSpan=i)}return o}var qV=class extends X{constructor(){super(...arguments),this.beanName="focusSvc",this.focusFallbackTimeout=null,this.needsFocusRestored=!1}wireBeans(e){this.colModel=e.colModel,this.visibleCols=e.visibleCols,this.rowRenderer=e.rowRenderer,this.navigation=e.navigation,this.filterManager=e.filterManager,this.overlays=e.overlays}postConstruct(){const e=this.clearFocusedCell.bind(this);this.addManagedEventListeners({columnPivotModeChanged:e,newColumnsLoaded:this.onColumnEverythingChanged.bind(this),columnGroupOpened:e,columnRowGroupChanged:e}),this.addDestroyFunc(H_(this.beans))}attemptToRecoverFocus(){this.needsFocusRestored=!0,this.focusFallbackTimeout!=null&&clearTimeout(this.focusFallbackTimeout),this.focusFallbackTimeout=window.setTimeout(this.setFocusRecovered.bind(this),100)}setFocusRecovered(){this.needsFocusRestored=!1,this.focusFallbackTimeout!=null&&(clearTimeout(this.focusFallbackTimeout),this.focusFallbackTimeout=null)}shouldTakeFocus(){return this.gos.get("suppressFocusAfterRefresh")?(this.setFocusRecovered(),!1):this.needsFocusRestored?(this.setFocusRecovered(),!0):this.doesRowOrCellHaveBrowserFocus()}onColumnEverythingChanged(){if(!this.focusedCell)return;const e=this.focusedCell.column,t=this.colModel.getCol(e.getId());e!==t&&this.clearFocusedCell()}getFocusCellToUseAfterRefresh(){const{gos:e,focusedCell:t}=this;return e.get("suppressFocusAfterRefresh")||e.get("suppressCellFocus")||!t||!this.doesRowOrCellHaveBrowserFocus()?null:t}getFocusHeaderToUseAfterRefresh(){return this.gos.get("suppressFocusAfterRefresh")||!this.focusedHeader||!this.isDomDataPresentInHierarchy(It(this.beans),uR)?null:this.focusedHeader}doesRowOrCellHaveBrowserFocus(){const e=It(this.beans);return this.isDomDataPresentInHierarchy(e,th,!0)?!0:this.isDomDataPresentInHierarchy(e,nh,!0)}isDomDataPresentInHierarchy(e,t,n){let i=e;for(;i;){const o=l0(this.gos,i,t);if(o)return o.destroyed&&n?(this.attemptToRecoverFocus(),!1):!0;i=i.parentNode}return!1}getFocusedCell(){return this.focusedCell}getFocusEventParams(e){const{rowIndex:t,rowPinned:n,column:i}=e,o={rowIndex:t,rowPinned:n,column:i,isFullWidthCell:!1},r=this.rowRenderer.getRowByPosition({rowIndex:t,rowPinned:n});return r&&(o.isFullWidthCell=r.isFullWidth()),o}clearFocusedCell(){if(this.focusedCell==null)return;const e=this.getFocusEventParams(this.focusedCell);this.focusedCell=null,this.eventSvc.dispatchEvent({type:"cellFocusCleared",...e})}setFocusedCell(e){this.setFocusRecovered();const{column:t,rowIndex:n,rowPinned:i,forceBrowserFocus:o=!1,preventScrollOnBrowserFocus:r=!1,sourceEvent:s}=e,a=this.colModel.getCol(t);if(!a){this.focusedCell=null;return}this.focusedCell={rowIndex:n,rowPinned:Jo(i),column:a};const l=this.getFocusEventParams(this.focusedCell);this.eventSvc.dispatchEvent({type:"cellFocused",...l,...this.previousCellFocusParams&&{previousParams:this.previousCellFocusParams},forceBrowserFocus:o,preventScrollOnBrowserFocus:r,sourceEvent:s}),this.previousCellFocusParams=l}isCellFocused(e){return this.focusedCell==null?!1:im(e,this.focusedCell)}isHeaderWrapperFocused(e){if(this.focusedHeader==null)return!1;const{column:t,rowCtrl:{rowIndex:n,pinned:i}}=e,{column:o,headerRowIndex:r}=this.focusedHeader;return t===o&&n===r&&i==o.getPinned()}focusHeaderPosition(e){if(this.setFocusRecovered(),no(this.beans))return!1;const{direction:t,fromTab:n,allowUserOverride:i,event:o,fromCell:r,rowWithoutSpanValue:s,scroll:a=!0}=e;let{headerPosition:l}=e;if(r&&this.filterManager?.isAdvFilterHeaderActive())return this.focusAdvancedFilter(l);if(i){const u=this.focusedHeader,h=Oi(this.beans);if(n){const f=this.gos.getCallback("tabToNextHeader");f&&(l=this.getHeaderPositionFromUserFunc({userFunc:f,direction:t,currentPosition:u,headerPosition:l,headerRowCount:h}))}else{const f=this.gos.getCallback("navigateToNextHeader");if(f&&o){const p={key:o.key,previousHeaderPosition:u,nextHeaderPosition:l,headerRowCount:h,event:o},m=f(p);l=m===null?u:m}}}return l?this.focusProvidedHeaderPosition({headerPosition:l,direction:t,event:o,fromCell:r,rowWithoutSpanValue:s,scroll:a}):!1}focusHeaderPositionFromUserFunc(e){if(no(this.beans))return!1;const{userFunc:t,headerPosition:n,direction:i,event:o}=e,r=this.focusedHeader,s=Oi(this.beans),a=this.getHeaderPositionFromUserFunc({userFunc:t,direction:i,currentPosition:r,headerPosition:n,headerRowCount:s});return!!a&&this.focusProvidedHeaderPosition({headerPosition:a,direction:i,event:o})}getHeaderPositionFromUserFunc(e){const{userFunc:t,direction:n,currentPosition:i,headerPosition:o,headerRowCount:r}=e,a=t({backwards:n==="Before",previousHeaderPosition:i,nextHeaderPosition:o,headerRowCount:r});return a===!0?i:a===!1?null:a}focusProvidedHeaderPosition(e){const{headerPosition:t,direction:n,fromCell:i,rowWithoutSpanValue:o,event:r,scroll:s=!0}=e,{column:a,headerRowIndex:l}=t,{filterManager:u,ctrlsSvc:h,headerNavigation:f}=this.beans;if(this.focusedHeader&&x2(e.headerPosition,this.focusedHeader))return!1;if(l===-1)return u?.isAdvFilterHeaderActive()?this.focusAdvancedFilter(t):this.focusGridView({column:a,event:r});s&&f?.scrollToColumn(a,n);const m=h.getHeaderRowContainerCtrl(a.getPinned())?.focusHeader(t.headerRowIndex,a,r)||!1;return f&&m&&(o!=null||i)&&(f.currentHeaderRowWithoutSpan=o??-1),m}focusFirstHeader(){if(this.overlays?.exclusive&&this.focusOverlay())return!0;const e=this.visibleCols.allCols[0];if(!e)return!1;const t=zm(this.beans,e,0);return this.focusHeaderPosition({headerPosition:t,rowWithoutSpanValue:0})}focusLastHeader(e){if(this.overlays?.exclusive&&this.focusOverlay(!0))return!0;const t=Oi(this.beans)-1,n=Pt(this.visibleCols.allCols);return this.focusHeaderPosition({headerPosition:{headerRowIndex:t,column:n},rowWithoutSpanValue:-1,event:e})}focusPreviousFromFirstCell(e){return this.filterManager?.isAdvFilterHeaderActive()?this.focusAdvancedFilter(null):this.focusLastHeader(e)}isAnyCellFocused(){return!!this.focusedCell}isRowFocused(e,t){return this.focusedCell==null?!1:this.focusedCell.rowIndex===e&&this.focusedCell.rowPinned===Jo(t)}focusOverlay(e){const t=this.overlays?.isVisible()&&this.overlays.eWrapper?.getGui();return!!t&&Gs(t,e)}getDefaultTabToNextGridContainerTarget(e){const{backwards:t,focusableContainers:n}=e,i=t?-1:1;let o;const r=()=>(o===void 0&&(o=this.getGridBodyTabTarget(t)),o);for(let s=e.nextIndex;s>=0&&s<n.length;s+=i){const a=w2(n[s],r);if(a)return a}return null}getGridBodyTabTarget(e){if(e)return this.getGridViewTabTarget({column:Pt(this.visibleCols.allCols),backwards:!0});const t=this.visibleCols.allCols[0];return this.gos.get("headerHeight")===0||no(this.beans)?this.getGridViewTabTarget({column:t}):t?zm(this.beans,t,0):null}getGridViewTabTarget(e){const{backwards:t=!1}=e,n=e.column??this.focusedHeader?.column;if(!n||this.overlays?.exclusive)return null;if(Ec(this.beans))return t&&!no(this.beans)?{headerRowIndex:Oi(this.beans)-1,column:n}:null;const i=t?nR(this.beans):tR(this.beans);if(i?.rowIndex==null){if(this.overlays?.isVisible())return null;if(t&&!no(this.beans)){const r=Pt(this.visibleCols.allCols);if(r)return{headerRowIndex:Oi(this.beans)-1,column:r}}return null}const o=Do(this.beans,i);return!o||n.isSuppressNavigable(o)||t&&this.rowRenderer.getRowByPosition(i)?.isFullWidth()?null:{rowIndex:i.rowIndex,rowPinned:i.rowPinned,column:n}}focusGridView(e){const{backwards:t=!1,canFocusOverlay:n=!0,event:i}=e;if(this.overlays?.exclusive)return n&&this.focusOverlay(t);if(Ec(this.beans))return t&&!no(this.beans)?this.focusLastHeader():n&&this.focusOverlay(t)?!0:t?!1:Xa(this.beans,t);const o=t?nR(this.beans):tR(this.beans);if(o){const r=e.column??this.focusedHeader?.column,{rowIndex:s,rowPinned:a}=o,l=Do(this.beans,o);if(!r||!l||s==null)return!1;if(r.isSuppressNavigable(l)){const u=this.gos.get("enableRtl");let h;return!i||i.key===q.TAB?h=u?q.LEFT:q.RIGHT:h=i.key,this.beans.navigation?.navigateToNextCell(null,h,{rowIndex:s,column:r,rowPinned:a||null},!0),!0}return this.navigation?.ensureCellVisible({rowIndex:s,column:r,rowPinned:a}),t&&this.rowRenderer.getRowByPosition(o)?.isFullWidth()&&this.navigation?.tryToFocusFullWidthRow(o,t)||(this.setFocusedCell({rowIndex:s,column:r,rowPinned:Jo(a),forceBrowserFocus:!0}),zn(r)||this.beans.rangeSvc?.setRangeToCell({rowIndex:s,rowPinned:a,column:r})),!0}return!!(n&&this.focusOverlay(t)||t&&this.focusLastHeader())}focusAdvancedFilter(e){return this.advFilterFocusColumn=e?.column,this.beans.advancedFilter?.getCtrl().focusHeaderComp()??!1}focusNextFromAdvancedFilter(e,t){const n=(t?void 0:this.advFilterFocusColumn)??this.visibleCols.allCols?.[0];return e?this.focusHeaderPosition({headerPosition:{column:n,headerRowIndex:Oi(this.beans)-1}}):this.focusGridView({column:n})}clearAdvancedFilterColumn(){this.advFilterFocusColumn=void 0}},QV=class extends X{constructor(){super(...arguments),this.beanName="scrollVisibleSvc"}wireBeans(e){this.ctrlsSvc=e.ctrlsSvc,this.colAnimation=e.colAnimation}postConstruct(){const{gos:e}=this;this.horizontalScrollShowing=e.get("alwaysShowHorizontalScroll")===!0,this.verticalScrollShowing=e.get("alwaysShowVerticalScroll")===!0,this.getScrollbarWidth();const t=this.updateScrollVisible.bind(this);this.addManagedEventListeners({displayedColumnsChanged:t,displayedColumnsWidthChanged:t,newColumnsLoaded:t})}updateScrollVisible(){const{colAnimation:e}=this;e?.isActive()?e.executeLaterVMTurn(()=>{e.executeLaterVMTurn(()=>this.updateScrollVisibleImpl())}):this.updateScrollVisibleImpl()}updateScrollVisibleImpl(){const e=this.ctrlsSvc.get("center");if(!e||this.colAnimation?.isActive())return;const t={horizontalScrollShowing:e.isHorizontalScrollShowing(),verticalScrollShowing:this.verticalScrollShowing};this.setScrollsVisible(t),this.updateScrollGap()}updateScrollGap(){const e=this.ctrlsSvc.get("center"),t=e.hasHorizontalScrollGap(),n=e.hasVerticalScrollGap();(this.horizontalScrollGap!==t||this.verticalScrollGap!==n)&&(this.horizontalScrollGap=t,this.verticalScrollGap=n,this.eventSvc.dispatchEvent({type:"scrollGapChanged"}))}setScrollsVisible(e){(this.horizontalScrollShowing!==e.horizontalScrollShowing||this.verticalScrollShowing!==e.verticalScrollShowing)&&(this.horizontalScrollShowing=e.horizontalScrollShowing,this.verticalScrollShowing=e.verticalScrollShowing,this.eventSvc.dispatchEvent({type:"scrollVisibilityChanged"}))}getScrollbarWidth(){if(this.scrollbarWidth==null){const e=this.gos.get("scrollbarWidth"),n=typeof e=="number"&&e>=0?e:jg();n!=null&&(this.scrollbarWidth=n,this.eventSvc.dispatchEvent({type:"scrollbarWidthChanged"}))}return this.scrollbarWidth}},YV=class extends X{constructor(){super(...arguments),this.beanName="gridDestroySvc",this.destroyCalled=!1}destroy(){if(this.destroyCalled)return;const{stateSvc:e,ctrlsSvc:t,context:n}=this.beans;this.eventSvc.dispatchEvent({type:"gridPreDestroyed",state:e?.getState()??{}}),this.destroyCalled=!0,t.get("gridCtrl")?.destroyGridUi(),n.destroy(),super.destroy()}},ZV=["columnEverythingChanged","newColumnsLoaded","columnPivotModeChanged","pivotMaxColumnsExceeded","columnRowGroupChanged","expandOrCollapseAll","columnPivotChanged","gridColumnsChanged","columnValueChanged","columnMoved","columnVisible","columnPinned","columnGroupOpened","columnResized","displayedColumnsChanged","virtualColumnsChanged","columnHeaderMouseOver","columnHeaderMouseLeave","columnHeaderClicked","columnHeaderContextMenu","asyncTransactionsFlushed","rowGroupOpened","rowDataUpdated","pinnedRowDataChanged","pinnedRowsChanged","rangeSelectionChanged","cellSelectionChanged","chartCreated","chartRangeSelectionChanged","chartOptionsChanged","chartDestroyed","toolPanelVisibleChanged","toolPanelSizeChanged","modelUpdated","cutStart","cutEnd","pasteStart","pasteEnd","fillStart","fillEnd","cellSelectionDeleteStart","cellSelectionDeleteEnd","rangeDeleteStart","rangeDeleteEnd","undoStarted","undoEnded","redoStarted","redoEnded","cellClicked","cellDoubleClicked","cellMouseDown","cellContextMenu","cellValueChanged","cellEditRequest","rowValueChanged","headerFocused","cellFocused","rowSelected","selectionChanged","tooltipShow","tooltipHide","cellKeyDown","cellMouseOver","cellMouseOut","filterChanged","filterModified","filterUiChanged","filterOpened","floatingFilterUiChanged","advancedFilterBuilderVisibleChanged","sortChanged","virtualRowRemoved","rowClicked","rowDoubleClicked","gridReady","gridPreDestroyed","gridSizeChanged","viewportChanged","firstDataRendered","dragStarted","dragStopped","dragCancelled","rowEditingStarted","rowEditingStopped","cellEditingStarted","cellEditingStopped","bodyScroll","bodyScrollEnd","paginationChanged","componentStateChanged","storeRefreshed","stateUpdated","columnMenuVisibleChanged","contextMenuVisibleChanged","rowDragEnter","rowDragMove","rowDragLeave","rowDragEnd","rowDragCancel","findChanged","rowResizeStarted","rowResizeEnded","columnsReset","bulkEditingStarted","bulkEditingStopped","batchEditingStarted","batchEditingStopped"],kc=new Set(["gridPreDestroyed","fillStart","pasteStart"]),vh=ZV.reduce((e,t)=>(e[t]=RO(t),e),{}),il={agSetColumnFilter:"SetFilter",agSetColumnFloatingFilter:"SetFilter",agMultiColumnFilter:"MultiFilter",agMultiColumnFloatingFilter:"MultiFilter",agGroupColumnFilter:"GroupFilter",agGroupColumnFloatingFilter:"GroupFilter",agGroupCellRenderer:"GroupCellRenderer",agGroupRowRenderer:"GroupCellRenderer",agRichSelect:"RichSelect",agRichSelectCellEditor:"RichSelect",agDetailCellRenderer:"SharedMasterDetail",agSparklineCellRenderer:"Sparklines",agDragAndDropImage:"SharedDragAndDrop",agColumnHeader:"ColumnHeaderComp",agColumnGroupHeader:"ColumnGroupHeaderComp",agSortIndicator:"Sort",agAnimateShowChangeCellRenderer:"HighlightChanges",agAnimateSlideCellRenderer:"HighlightChanges",agLoadingCellRenderer:"LoadingCellRenderer",agSkeletonCellRenderer:"SkeletonCellRenderer",agCheckboxCellRenderer:"CheckboxCellRenderer",agLoadingOverlay:"Overlay",agExportingOverlay:"Overlay",agNoRowsOverlay:"Overlay",agNoMatchingRowsOverlay:"Overlay",agTooltipComponent:"Tooltip",agReadOnlyFloatingFilter:"CustomFilter",agTextColumnFilter:"TextFilter",agNumberColumnFilter:"NumberFilter",agBigIntColumnFilter:"BigIntFilter",agDateColumnFilter:"DateFilter",agDateInput:"DateFilter",agTextColumnFloatingFilter:"TextFilter",agNumberColumnFloatingFilter:"NumberFilter",agBigIntColumnFloatingFilter:"BigIntFilter",agDateColumnFloatingFilter:"DateFilter",agFormulaCellEditor:"Formula",agCellEditor:"TextEditor",agSelectCellEditor:"SelectEditor",agTextCellEditor:"TextEditor",agNumberCellEditor:"NumberEditor",agDateCellEditor:"DateEditor",agDateStringCellEditor:"DateEditor",agCheckboxCellEditor:"CheckboxEditor",agLargeTextCellEditor:"LargeTextEditor",agMenuItem:"MenuItem",agColumnsToolPanel:"ColumnsToolPanel",agFiltersToolPanel:"FiltersToolPanel",agNewFiltersToolPanel:"NewFiltersToolPanel",agAggregationComponent:"StatusBar",agSelectedRowCountComponent:"StatusBar",agTotalRowCountComponent:"StatusBar",agFilteredRowCountComponent:"StatusBar",agTotalAndFilteredRowCountComponent:"StatusBar",agFindCellRenderer:"Find"};function EF(e){return`"${e}"`}var XV=()=>({checkboxSelection:{version:"32.2",message:"Use `rowSelection.checkboxes` in `GridOptions` instead."},headerCheckboxSelection:{version:"32.2",message:"Use `rowSelection.headerCheckbox = true` in `GridOptions` instead."},headerCheckboxSelectionFilteredOnly:{version:"32.2",message:'Use `rowSelection.selectAll = "filtered"` in `GridOptions` instead.'},headerCheckboxSelectionCurrentPageOnly:{version:"32.2",message:'Use `rowSelection.selectAll = "currentPage"` in `GridOptions` instead.'},showDisabledCheckboxes:{version:"32.2",message:"Use `rowSelection.hideDisabledCheckboxes = true` in `GridOptions` instead."},rowGroupingHierarchy:{version:"34.3",message:"Use `colDef.groupHierarchy` instead."}}),JV={allowFormula:"Formula",aggFunc:"SharedAggregation",autoHeight:"RowAutoHeight",cellClass:"CellStyle",cellClassRules:"CellStyle",cellEditor:({cellEditor:e,editable:t,groupRowEditable:n})=>!!t||!!n?typeof e=="string"?il[e]??"CustomEditor":"CustomEditor":null,cellRenderer:({cellRenderer:e})=>typeof e!="string"?null:il[e],cellStyle:"CellStyle",columnChooserParams:"ColumnMenu",contextMenuItems:"ContextMenu",dndSource:"DragAndDrop",dndSourceOnRowDrag:"DragAndDrop",editable:({editable:e,cellEditor:t})=>e&&!t?"TextEditor":null,groupRowEditable:({groupRowEditable:e,cellEditor:t})=>e?t?"RowGroupingEdit":["RowGroupingEdit","TextEditor"]:null,groupRowValueSetter:({groupRowValueSetter:e})=>e?"RowGroupingEdit":null,enableCellChangeFlash:"HighlightChanges",enablePivot:"SharedPivot",enableRowGroup:"SharedRowGrouping",enableValue:"SharedAggregation",filter:({filter:e})=>e&&typeof e!="string"&&typeof e!="boolean"?"CustomFilter":typeof e=="string"?il[e]??"ColumnFilter":"ColumnFilter",floatingFilter:"ColumnFilter",getQuickFilterText:"QuickFilter",headerTooltip:"Tooltip",headerTooltipValueGetter:"Tooltip",mainMenuItems:"ColumnMenu",menuTabs:e=>{const t=["columnsMenuTab","generalMenuTab"];return e.menuTabs?.some(n=>t.includes(n))?"ColumnMenu":null},pivot:"SharedPivot",pivotIndex:"SharedPivot",rowDrag:"RowDrag",rowGroup:"SharedRowGrouping",rowGroupIndex:"SharedRowGrouping",tooltipField:"Tooltip",tooltipValueGetter:"Tooltip",tooltipComponentSelector:"Tooltip",spanRows:"CellSpan",groupHierarchy:"SharedRowGrouping"},e5=()=>({autoHeight:{supportedRowModels:["clientSide","serverSide"],validate:(t,{paginationAutoPageSize:n})=>n?"colDef.autoHeight is not supported with paginationAutoPageSize.":null},allowFormula:{supportedRowModels:["clientSide"]},cellRendererParams:{validate:t=>(t.rowGroup!=null||t.rowGroupIndex!=null||t.cellRenderer==="agGroupCellRenderer")&&"checkbox"in t.cellRendererParams?'Since v33.0, `cellRendererParams.checkbox` has been deprecated. Use `rowSelection.checkboxLocation = "autoGroupColumn"` instead.':null},flex:{validate:(t,n)=>n.autoSizeStrategy?"colDef.flex is not supported with gridOptions.autoSizeStrategy":null},headerCheckboxSelection:{supportedRowModels:["clientSide","serverSide"],validate:(t,{rowSelection:n})=>n==="multiple"?null:"headerCheckboxSelection is only supported with rowSelection=multiple"},headerCheckboxSelectionCurrentPageOnly:{supportedRowModels:["clientSide"],validate:(t,{rowSelection:n})=>n==="multiple"?null:"headerCheckboxSelectionCurrentPageOnly is only supported with rowSelection=multiple"},headerCheckboxSelectionFilteredOnly:{supportedRowModels:["clientSide"],validate:(t,{rowSelection:n})=>n==="multiple"?null:"headerCheckboxSelectionFilteredOnly is only supported with rowSelection=multiple"},headerValueGetter:{validate:t=>{const n=t.headerValueGetter;return typeof n=="function"||typeof n=="string"?null:"headerValueGetter must be a function or a valid string expression"}},icons:{validate:({icons:t})=>{if(t){if(t.smallDown)return Po(262);if(t.smallLeft)return Po(263);if(t.smallRight)return Po(264)}return null}},sort:{validate:t=>Ka(t.sort)||Vr(t.sort)?null:`sort must be of type (SortDirection | SortDef), currently it is ${typeof t.sort=="object"?JSON.stringify(t.sort):Od(t.sort)}`},initialSort:{validate:t=>Ka(t.initialSort)||Vr(t.initialSort)?null:`initialSort must be of non-null type (SortDirection | SortDef), currently it is ${typeof t.initialSort=="object"?JSON.stringify(t.initialSort):Od(t.initialSort)}`},sortingOrder:{validate:t=>{const n=t.sortingOrder;if(Array.isArray(n)&&n.length>0){const i=n.filter(o=>!(Ka(o)||Vr(o)));if(i.length>0)return`sortingOrder must be an array of type non-null (SortDirection | SortDef)[], incorrect items are: [${i.map(o=>typeof o=="string"||o==null?Od(o):JSON.stringify(o)).join(", ")}]`}else if(!Array.isArray(n)||!n.length)return`sortingOrder must be an array with at least one element, currently it is [${n}]`;return null}},type:{validate:t=>{const n=t.type;return n instanceof Array?n.some(o=>typeof o!="string")?"if colDef.type is supplied an array it should be of type 'string[]'":null:typeof n=="string"?null:"colDef.type should be of type 'string' | 'string[]'"}},rowSpan:{validate:(t,{suppressRowTransform:n})=>n?null:"colDef.rowSpan requires suppressRowTransform to be enabled."},spanRows:{dependencies:{editable:{required:[!1,void 0]},groupRowEditable:{required:[!1,void 0]},rowDrag:{required:[!1,void 0]},colSpan:{required:[void 0]},rowSpan:{required:[void 0]}},validate:(t,{rowSelection:n,cellSelection:i,suppressRowTransform:o,enableCellSpan:r,rowDragEntireRow:s,enableCellTextSelection:a})=>typeof n=="object"&&n?.mode==="singleRow"&&n?.enableClickSelection?"colDef.spanRows is not supported with rowSelection.clickSelection":i?"colDef.spanRows is not supported with cellSelection.":o?"colDef.spanRows is not supported with suppressRowTransform.":r?s?"colDef.spanRows is not supported with rowDragEntireRow.":a?"colDef.spanRows is not supported with enableCellTextSelection.":null:"colDef.spanRows requires enableCellSpan to be enabled."},groupHierarchy:{validate(t,{groupHierarchyConfig:n={}},i){const o=new Set(["year","quarter","month","formattedMonth","day","hour","minute","second"]),r=[];for(const s of t.groupHierarchy??[]){if(typeof s=="object"){i.validation?.validateColDef(s);continue}!o.has(s)&&!(s in n)&&r.push(EF(s))}if(r.length>0){const s=`The following parts of colDef.groupHierarchy are not recognised: ${r.join(", ")}.`,a=`Choose one of ${[...o].map(EF).join(", ")}, or define your own parts in gridOptions.groupHierarchyConfig.`;return`${s}
|
|
22
22
|
${a}`}return null}}}),t5={headerName:void 0,columnGroupShow:void 0,headerStyle:void 0,headerClass:void 0,toolPanelClass:void 0,headerValueGetter:void 0,pivotKeys:void 0,groupId:void 0,colId:void 0,sort:void 0,initialSort:void 0,field:void 0,type:void 0,cellDataType:void 0,tooltipComponent:void 0,tooltipField:void 0,headerTooltip:void 0,headerTooltipValueGetter:void 0,cellClass:void 0,showRowGroup:void 0,filter:void 0,initialAggFunc:void 0,defaultAggFunc:void 0,aggFunc:void 0,groupRowEditable:void 0,groupRowValueSetter:void 0,pinned:void 0,initialPinned:void 0,chartDataType:void 0,cellAriaRole:void 0,cellEditorPopupPosition:void 0,headerGroupComponent:void 0,headerGroupComponentParams:void 0,cellStyle:void 0,cellRenderer:void 0,cellRendererParams:void 0,cellEditor:void 0,cellEditorParams:void 0,filterParams:void 0,pivotValueColumn:void 0,headerComponent:void 0,headerComponentParams:void 0,floatingFilterComponent:void 0,floatingFilterComponentParams:void 0,tooltipComponentParams:void 0,refData:void 0,columnChooserParams:void 0,children:void 0,sortingOrder:void 0,allowedAggFuncs:void 0,menuTabs:void 0,pivotTotalColumnIds:void 0,cellClassRules:void 0,icons:void 0,sortIndex:void 0,initialSortIndex:void 0,flex:void 0,initialFlex:void 0,width:void 0,initialWidth:void 0,minWidth:void 0,maxWidth:void 0,rowGroupIndex:void 0,initialRowGroupIndex:void 0,pivotIndex:void 0,initialPivotIndex:void 0,suppressColumnsToolPanel:void 0,suppressFiltersToolPanel:void 0,openByDefault:void 0,marryChildren:void 0,suppressStickyLabel:void 0,hide:void 0,initialHide:void 0,rowGroup:void 0,initialRowGroup:void 0,pivot:void 0,initialPivot:void 0,checkboxSelection:void 0,showDisabledCheckboxes:void 0,headerCheckboxSelection:void 0,headerCheckboxSelectionFilteredOnly:void 0,headerCheckboxSelectionCurrentPageOnly:void 0,suppressHeaderMenuButton:void 0,suppressMovable:void 0,lockPosition:void 0,lockVisible:void 0,lockPinned:void 0,unSortIcon:void 0,suppressSizeToFit:void 0,suppressAutoSize:void 0,enableRowGroup:void 0,enablePivot:void 0,enableValue:void 0,editable:void 0,suppressPaste:void 0,suppressNavigable:void 0,enableCellChangeFlash:void 0,rowDrag:void 0,dndSource:void 0,autoHeight:void 0,wrapText:void 0,sortable:void 0,resizable:void 0,singleClickEdit:void 0,floatingFilter:void 0,cellEditorPopup:void 0,suppressFillHandle:void 0,wrapHeaderText:void 0,autoHeaderHeight:void 0,dndSourceOnRowDrag:void 0,valueGetter:void 0,valueSetter:void 0,filterValueGetter:void 0,keyCreator:void 0,valueFormatter:void 0,valueParser:void 0,comparator:void 0,equals:void 0,pivotComparator:void 0,suppressKeyboardEvent:void 0,suppressHeaderKeyboardEvent:void 0,colSpan:void 0,rowSpan:void 0,spanRows:void 0,getQuickFilterText:void 0,onCellValueChanged:void 0,onCellClicked:void 0,onCellDoubleClicked:void 0,onCellContextMenu:void 0,rowDragText:void 0,tooltipValueGetter:void 0,tooltipComponentSelector:void 0,cellRendererSelector:void 0,cellEditorSelector:void 0,suppressSpanHeaderHeight:void 0,useValueFormatterForExport:void 0,useValueParserForImport:void 0,mainMenuItems:void 0,contextMenuItems:void 0,suppressFloatingFilterButton:void 0,suppressHeaderFilterButton:void 0,suppressHeaderContextMenu:void 0,loadingCellRenderer:void 0,loadingCellRendererParams:void 0,loadingCellRendererSelector:void 0,context:void 0,dateComponent:void 0,dateComponentParams:void 0,getFindText:void 0,rowGroupingHierarchy:void 0,groupHierarchy:void 0,allowFormula:void 0},n5=()=>Object.keys(t5),i5=()=>({objectName:"colDef",allProperties:n5(),docsUrl:"column-properties/",deprecations:XV(),validations:e5()}),DF=["overlayLoadingTemplate","overlayNoRowsTemplate","gridId","quickFilterText","rowModelType","editType","domLayout","clipboardDelimiter","rowGroupPanelShow","multiSortKey","pivotColumnGroupTotals","pivotRowTotals","pivotPanelShow","fillHandleDirection","groupDisplayType","treeDataDisplayType","treeDataChildrenField","treeDataParentIdField","colResizeDefault","tooltipTrigger","serverSidePivotResultFieldSeparator","columnMenu","tooltipShowMode","invalidEditValueMode","grandTotalRow","themeCssLayer","findSearchValue","styleNonce","renderingMode"],o5=["components","rowStyle","context","autoGroupColumnDef","localeText","icons","datasource","dragAndDropImageComponentParams","serverSideDatasource","viewportDatasource","groupRowRendererParams","aggFuncs","fullWidthCellRendererParams","defaultColGroupDef","defaultColDef","defaultCsvExportParams","defaultExcelExportParams","columnTypes","rowClassRules","detailCellRendererParams","loadingCellRendererParams","overlayComponentParams","loadingOverlayComponentParams","noRowsOverlayComponentParams","activeOverlayParams","popupParent","themeStyleContainer","statusBar","chartThemeOverrides","customChartThemes","chartToolPanelsDef","dataTypeDefinitions","advancedFilterParent","advancedFilterBuilderParams","advancedFilterParams","formulaDataSource","formulaFuncs","initialState","autoSizeStrategy","selectionColumnDef","findOptions","filterHandlers","groupHierarchyConfig"],r5=["sortingOrder","alignedGrids","rowData","columnDefs","excelStyles","pinnedTopRowData","pinnedBottomRowData","chartThemes","rowClass","paginationPageSizeSelector","suppressOverlays"],Um=["rowHeight","detailRowHeight","rowBuffer","headerHeight","groupHeaderHeight","groupLockGroupColumns","floatingFiltersHeight","pivotHeaderHeight","pivotGroupHeaderHeight","groupDefaultExpanded","pivotDefaultExpanded","viewportRowModelPageSize","viewportRowModelBufferSize","autoSizePadding","maxBlocksInCache","maxConcurrentDatasourceRequests","tooltipShowDelay","tooltipSwitchShowDelay","tooltipHideDelay","cacheOverflowSize","paginationPageSize","cacheBlockSize","infiniteInitialRowCount","serverSideInitialRowCount","scrollbarWidth","asyncTransactionWaitMillis","blockLoadDebounceMillis","keepDetailRowsCount","undoRedoCellEditingLimit","cellFlashDuration","cellFadeDuration","tabIndex","pivotMaxGeneratedColumns","rowDragInsertDelay"],s5=["theme","rowSelection"],TF=["cellSelection","sideBar","rowNumbers","suppressGroupChangesColumnVisibility","groupAggFiltering","suppressStickyTotalRow","groupHideParentOfSingleChild","enableRowPinning"],$m=["loadThemeGoogleFonts","suppressMakeColumnVisibleAfterUnGroup","suppressRowClickSelection","suppressCellFocus","suppressHeaderFocus","suppressHorizontalScroll","groupSelectsChildren","alwaysShowHorizontalScroll","alwaysShowVerticalScroll","debug","enableBrowserTooltips","enableCellExpressions","groupSuppressBlankHeader","suppressMenuHide","suppressRowDeselection","unSortIcon","suppressMultiSort","alwaysMultiSort","singleClickEdit","suppressLoadingOverlay","suppressNoRowsOverlay","suppressAutoSize","skipHeaderOnAutoSize","suppressColumnMoveAnimation","suppressMoveWhenColumnDragging","suppressMovableColumns","suppressFieldDotNotation","enableRangeSelection","enableRangeHandle","enableFillHandle","suppressClearOnFillReduction","deltaSort","suppressTouch","allowContextMenuWithControlKey","suppressContextMenu","suppressDragLeaveHidesColumns","suppressRowGroupHidesColumns","suppressMiddleClickScrolls","suppressPreventDefaultOnMouseWheel","suppressCopyRowsToClipboard","copyHeadersToClipboard","copyGroupHeadersToClipboard","pivotMode","suppressAggFuncInHeader","suppressColumnVirtualisation","alwaysAggregateAtRootLevel","suppressFocusAfterRefresh","functionsReadOnly","animateRows","groupSelectsFiltered","groupRemoveSingleChildren","groupRemoveLowestSingleChildren","enableRtl","enableCellSpan","suppressClickEdit","rowDragEntireRow","rowDragManaged","refreshAfterGroupEdit","suppressRowDrag","suppressMoveWhenRowDragging","rowDragMultiRow","enableGroupEdit","embedFullWidthRows","suppressPaginationPanel","groupHideOpenParents","groupHideColumnsUntilExpanded","groupAllowUnbalanced","pagination","paginationAutoPageSize","suppressScrollOnNewData","suppressScrollWhenPopupsAreOpen","purgeClosedRowNodes","cacheQuickFilter","includeHiddenColumnsInQuickFilter","ensureDomOrder","accentedSort","suppressChangeDetection","valueCache","valueCacheNeverExpires","aggregateOnlyChangedColumns","suppressAnimationFrame","suppressExcelExport","suppressCsvExport","includeHiddenColumnsInAdvancedFilter","suppressMultiRangeSelection","enterNavigatesVerticallyAfterEdit","enterNavigatesVertically","suppressPropertyNamesCheck","rowMultiSelectWithClick","suppressRowHoverHighlight","suppressRowTransform","suppressClipboardPaste","suppressLastEmptyLineOnPaste","enableCharts","suppressMaintainUnsortedOrder","enableCellTextSelection","suppressBrowserResizeObserver","suppressMaxRenderedRowRestriction","excludeChildrenWhenTreeDataFiltering","tooltipMouseTrack","tooltipInteraction","keepDetailRows","paginateChildRows","preventDefaultOnContextMenu","undoRedoCellEditing","allowDragFromColumnsToolPanel","pivotSuppressAutoColumn","suppressExpandablePivotGroups","debounceVerticalScrollbar","detailRowAutoHeight","serverSideSortAllLevels","serverSideEnableClientSideSort","serverSideOnlyRefreshFilteredGroups","suppressAggFilteredOnly","showOpenedGroup","suppressClipboardApi","suppressModelUpdateAfterUpdateTransaction","stopEditingWhenCellsLoseFocus","groupMaintainOrder","columnHoverHighlight","readOnlyEdit","suppressRowVirtualisation","enableCellEditingOnBackspace","resetRowDataOnUpdate","removePivotHeaderRowWhenSingleValueColumn","suppressCopySingleCellRanges","suppressGroupRowsSticky","suppressCutToClipboard","rowGroupPanelSuppressSort","allowShowChangeAfterFilter","enableAdvancedFilter","masterDetail","treeData","reactiveCustomComponents","applyQuickFilterBeforePivotOrAgg","suppressServerSideFullWidthLoadingRow","suppressAdvancedFilterEval","loading","maintainColumnOrder","enableStrictPivotColumnOrder","suppressSetFilterByDefault","enableFilterHandlers","suppressStartEditOnTab","hidePaddedHeaderRows","ssrmExpandAllAffectsAllRows","animateColumnResizing"],AF=["doesExternalFilterPass","processPivotResultColDef","processPivotResultColGroupDef","getBusinessKeyForNode","isRowSelectable","rowDragText","groupRowRenderer","dragAndDropImageComponent","fullWidthCellRenderer","loadingCellRenderer","overlayComponent","loadingOverlayComponent","noRowsOverlayComponent","overlayComponentSelector","activeOverlay","detailCellRenderer","quickFilterParser","quickFilterMatcher","getLocaleText","isExternalFilterPresent","getRowHeight","getRowClass","getRowStyle","getFullRowEditValidationErrors","getContextMenuItems","getMainMenuItems","processRowPostCreate","processCellForClipboard","getGroupRowAgg","isFullWidthRow","sendToClipboard","focusGridInnerElement","navigateToNextHeader","tabToNextHeader","navigateToNextCell","tabToNextCell","tabToNextGridContainer","processCellFromClipboard","getDocument","postProcessPopup","getChildCount","getDataPath","isRowMaster","postSortRows","processHeaderForClipboard","processUnpinnedColumns","processGroupHeaderForClipboard","paginationNumberFormatter","processDataFromClipboard","getServerSideGroupKey","isServerSideGroup","createChartContainer","getChartToolbarItems","fillOperation","isApplyServerSideTransaction","getServerSideGroupLevelParams","isServerSideGroupOpenByDefault","isGroupOpenByDefault","initialGroupOrderComparator","loadingCellRendererSelector","getRowId","chartMenuItems","groupTotalRow","alwaysPassFilter","isRowPinnable","isRowPinned","isRowValidDropPosition"],jm=()=>[...r5,...o5,...DF,...Um,...AF,...$m,...TF,...s5],a5=()=>[...DF,...Um,...AF,...$m,...TF],l5=()=>({suppressLoadingOverlay:{version:"32",message:"Use `loading`=false instead."},enableFillHandle:{version:"32.2",message:"Use `cellSelection.handle` instead."},enableRangeHandle:{version:"32.2",message:"Use `cellSelection.handle` instead."},enableRangeSelection:{version:"32.2",message:"Use `cellSelection = true` instead."},suppressMultiRangeSelection:{version:"32.2",message:"Use `cellSelection.suppressMultiRanges` instead."},suppressClearOnFillReduction:{version:"32.2",message:"Use `cellSelection.handle.suppressClearOnFillReduction` instead."},fillHandleDirection:{version:"32.2",message:"Use `cellSelection.handle.direction` instead."},fillOperation:{version:"32.2",message:"Use `cellSelection.handle.setFillValue` instead."},suppressRowClickSelection:{version:"32.2",message:"Use `rowSelection.enableClickSelection` instead."},suppressRowDeselection:{version:"32.2",message:"Use `rowSelection.enableClickSelection` instead."},rowMultiSelectWithClick:{version:"32.2",message:"Use `rowSelection.enableSelectionWithoutKeys` instead."},groupSelectsChildren:{version:"32.2",message:'Use `rowSelection.groupSelects = "descendants"` instead.'},groupSelectsFiltered:{version:"32.2",message:'Use `rowSelection.groupSelects = "filteredDescendants"` instead.'},isRowSelectable:{version:"32.2",message:"Use `selectionOptions.isRowSelectable` instead."},suppressCopySingleCellRanges:{version:"32.2",message:"Use `rowSelection.copySelectedRows` instead."},suppressCopyRowsToClipboard:{version:"32.2",message:"Use `rowSelection.copySelectedRows` instead."},onRangeSelectionChanged:{version:"32.2",message:"Use `onCellSelectionChanged` instead."},onRangeDeleteStart:{version:"32.2",message:"Use `onCellSelectionDeleteStart` instead."},onRangeDeleteEnd:{version:"32.2",message:"Use `onCellSelectionDeleteEnd` instead."},suppressBrowserResizeObserver:{version:"32.2",message:"The grid always uses the browser's ResizeObserver, this grid option has no effect."},onColumnEverythingChanged:{version:"32.2",message:"Either use `onDisplayedColumnsChanged` which is fired at the same time, or use one of the more specific column events."},groupRemoveSingleChildren:{version:"33",message:"Use `groupHideParentOfSingleChild` instead."},groupRemoveLowestSingleChildren:{version:"33",message:'Use `groupHideParentOfSingleChild: "leafGroupsOnly"` instead.'},suppressRowGroupHidesColumns:{version:"33",message:'Use `suppressGroupChangesColumnVisibility: "suppressHideOnGroup"` instead.'},suppressMakeColumnVisibleAfterUnGroup:{version:"33",message:'Use `suppressGroupChangesColumnVisibility: "suppressShowOnUngroup"` instead.'},unSortIcon:{version:"33",message:"Use `defaultColDef.unSortIcon` instead."},sortingOrder:{version:"33",message:"Use `defaultColDef.sortingOrder` instead."},suppressPropertyNamesCheck:{version:"33",message:"`gridOptions` and `columnDefs` both have a `context` property that should be used for arbitrary user data. This means that column definitions and gridOptions should only contain valid properties making this property redundant."},suppressAdvancedFilterEval:{version:"34",message:"Advanced filter no longer uses function evaluation, so this option has no effect."}});function Oo(e,t,n){return typeof t=="number"||t==null?t==null||t>=n?null:`${e}: value should be greater than or equal to ${n}`:`${e}: value should be a number`}var c5={alignedGrids:"AlignedGrids",allowContextMenuWithControlKey:"ContextMenu",autoSizeStrategy:"ColumnAutoSize",cellSelection:"CellSelection",columnHoverHighlight:"ColumnHover",datasource:"InfiniteRowModel",doesExternalFilterPass:"ExternalFilter",editType:"EditCore",invalidEditValueMode:"EditCore",enableAdvancedFilter:"AdvancedFilter",enableCellSpan:"CellSpan",enableCharts:"IntegratedCharts",enableRangeSelection:"CellSelection",enableRowPinning:"PinnedRow",findSearchValue:"Find",getFullRowEditValidationErrors:"EditCore",getContextMenuItems:"ContextMenu",getLocaleText:"Locale",getMainMenuItems:"ColumnMenu",getRowClass:"RowStyle",getRowStyle:"RowStyle",groupTotalRow:"SharedRowGrouping",grandTotalRow:"ClientSideRowModelHierarchy",initialState:"GridState",isExternalFilterPresent:"ExternalFilter",isRowPinnable:"PinnedRow",isRowPinned:"PinnedRow",localeText:"Locale",masterDetail:"SharedMasterDetail",pagination:"Pagination",pinnedBottomRowData:"PinnedRow",pinnedTopRowData:"PinnedRow",pivotMode:"SharedPivot",pivotPanelShow:"RowGroupingPanel",quickFilterText:"QuickFilter",rowClass:"RowStyle",rowClassRules:"RowStyle",rowData:"ClientSideRowModel",rowDragManaged:"RowDrag",refreshAfterGroupEdit:["RowGrouping","TreeData"],rowGroupPanelShow:"RowGroupingPanel",rowNumbers:"RowNumbers",rowSelection:"SharedRowSelection",rowStyle:"RowStyle",serverSideDatasource:"ServerSideRowModel",sideBar:"SideBar",statusBar:"StatusBar",treeData:"SharedTreeData",undoRedoCellEditing:"UndoRedoEdit",valueCache:"ValueCache",viewportDatasource:"ViewportRowModel"},u5=()=>{const e={autoSizePadding:{validate({autoSizePadding:n}){return Oo("autoSizePadding",n,0)}},cacheBlockSize:{supportedRowModels:["serverSide","infinite"],validate({cacheBlockSize:n}){return Oo("cacheBlockSize",n,1)}},cacheOverflowSize:{validate({cacheOverflowSize:n}){return Oo("cacheOverflowSize",n,1)}},datasource:{supportedRowModels:["infinite"]},domLayout:{validate:n=>{const i=n.domLayout,o=["autoHeight","normal","print"];return i&&!o.includes(i)?`domLayout must be one of [${o.join()}], currently it's ${i}`:null}},enableFillHandle:{dependencies:{enableRangeSelection:{required:[!0]}}},enableRangeHandle:{dependencies:{enableRangeSelection:{required:[!0]}}},enableCellSpan:{supportedRowModels:["clientSide","serverSide"]},enableRangeSelection:{dependencies:{rowDragEntireRow:{required:[!1,void 0]}}},enableRowPinning:{supportedRowModels:["clientSide"],validate({enableRowPinning:n,pinnedTopRowData:i,pinnedBottomRowData:o}){return n&&(i||o)?"Manual row pinning cannot be used together with pinned row data. Either set `enableRowPinning` to `false`, or remove `pinnedTopRowData` and `pinnedBottomRowData`.":null}},isRowPinnable:{supportedRowModels:["clientSide"],validate({enableRowPinning:n,isRowPinnable:i,pinnedTopRowData:o,pinnedBottomRowData:r}){return i&&(o||r)?"Manual row pinning cannot be used together with pinned row data. Either remove `isRowPinnable`, or remove `pinnedTopRowData` and `pinnedBottomRowData`.":!n&&i?"`isRowPinnable` requires `enableRowPinning` to be set.":null}},isRowPinned:{supportedRowModels:["clientSide"],validate({enableRowPinning:n,isRowPinned:i,pinnedTopRowData:o,pinnedBottomRowData:r}){return i&&(o||r)?"Manual row pinning cannot be used together with pinned row data. Either remove `isRowPinned`, or remove `pinnedTopRowData` and `pinnedBottomRowData`.":!n&&i?"`isRowPinned` requires `enableRowPinning` to be set.":null}},groupDefaultExpanded:{supportedRowModels:["clientSide"]},groupHideColumnsUntilExpanded:{supportedRowModels:["clientSide"],validate({groupHideColumnsUntilExpanded:n,groupHideOpenParents:i,groupDisplayType:o}){return n&&!i&&o!=="multipleColumns"?"`groupHideColumnsUntilExpanded = true` requires either `groupDisplayType = 'multipleColumns'` or `groupHideOpenParents = true`":null}},groupHideOpenParents:{supportedRowModels:["clientSide","serverSide"],dependencies:{groupTotalRow:{required:[void 0,"bottom"]},treeData:{required:[void 0,!1],reason:"Tree Data has values at the group level so it doesn't make sense to hide them."}}},groupHideParentOfSingleChild:{dependencies:{groupHideOpenParents:{required:[void 0,!1]}}},groupRemoveLowestSingleChildren:{dependencies:{groupHideOpenParents:{required:[void 0,!1]},groupRemoveSingleChildren:{required:[void 0,!1]}}},groupRemoveSingleChildren:{dependencies:{groupHideOpenParents:{required:[void 0,!1]},groupRemoveLowestSingleChildren:{required:[void 0,!1]}}},groupSelectsChildren:{dependencies:{rowSelection:{required:["multiple"]}}},groupHierarchyConfig:{validate({groupHierarchyConfig:n={}},i,o){for(const r of Object.keys(n))o.validation?.validateColDef(n[r]);return null}},icons:{validate:({icons:n})=>{if(n){if(n.smallDown)return Po(262);if(n.smallLeft)return Po(263);if(n.smallRight)return Po(264)}return null}},infiniteInitialRowCount:{validate({infiniteInitialRowCount:n}){return Oo("infiniteInitialRowCount",n,1)}},initialGroupOrderComparator:{supportedRowModels:["clientSide"]},ssrmExpandAllAffectsAllRows:{validate:n=>{if(typeof n.ssrmExpandAllAffectsAllRows=="boolean"){if(n.rowModelType!=="serverSide")return"'ssrmExpandAllAffectsAllRows' is only supported with the Server Side Row Model.";if(n.ssrmExpandAllAffectsAllRows&&typeof n.getRowId!="function")return"'getRowId' callback must be provided for Server Side Row Model grouping to work correctly."}return null}},keepDetailRowsCount:{validate({keepDetailRowsCount:n}){return Oo("keepDetailRowsCount",n,1)}},paginationPageSize:{validate({paginationPageSize:n}){return Oo("paginationPageSize",n,1)}},paginationPageSizeSelector:{validate:n=>{const i=n.paginationPageSizeSelector;return typeof i=="boolean"||i==null||i.length?null:`'paginationPageSizeSelector' cannot be an empty array.
|
|
23
|
-
If you want to hide the page size selector, set paginationPageSizeSelector to false.`}},pivotMode:{dependencies:{treeData:{required:[!1,void 0],reason:"Pivot Mode is not supported with Tree Data."}}},quickFilterText:{supportedRowModels:["clientSide"]},rowBuffer:{validate({rowBuffer:n}){return Oo("rowBuffer",n,0)}},rowClass:{validate:n=>typeof n.rowClass=="function"?"rowClass should not be a function, please use getRowClass instead":null},rowData:{supportedRowModels:["clientSide"]},rowDragManaged:{supportedRowModels:["clientSide"],dependencies:{pagination:{required:[!1,void 0]}}},rowSelection:{validate({rowSelection:n}){return n&&typeof n=="string"?'As of version 32.2.1, using `rowSelection` with the values "single" or "multiple" has been deprecated. Use the object value instead.':n&&typeof n!="object"?"Expected `RowSelectionOptions` object for the `rowSelection` property.":n&&n.mode!=="multiRow"&&n.mode!=="singleRow"?`Selection mode "${n.mode}" is invalid. Use one of 'singleRow' or 'multiRow'.`:null}},rowStyle:{validate:n=>{const i=n.rowStyle;return i&&typeof i=="function"?"rowStyle should be an object of key/value styles, not be a function, use getRowStyle() instead":null}},serverSideDatasource:{supportedRowModels:["serverSide"]},serverSideInitialRowCount:{supportedRowModels:["serverSide"],validate({serverSideInitialRowCount:n}){return Oo("serverSideInitialRowCount",n,1)}},serverSideOnlyRefreshFilteredGroups:{supportedRowModels:["serverSide"]},serverSideSortAllLevels:{supportedRowModels:["serverSide"]},sortingOrder:{validate:n=>{const i=n.sortingOrder;if(Array.isArray(i)&&i.length>0){const o=i.filter(r=>!Li(r));if(o.length>0)return`sortingOrder must be an array of type (SortDirection | SortDef)[], incorrect items are: ${o.map(r=>typeof r=="string"||r==null?Od(r):JSON.stringify(r))}]`}else if(!Array.isArray(i)||!i.length)return`sortingOrder must be an array with at least one element, currently it's ${i}`;return null}},tooltipHideDelay:{validate:n=>n.tooltipHideDelay&&n.tooltipHideDelay<0?"tooltipHideDelay should not be lower than 0":null},tooltipShowDelay:{validate:n=>n.tooltipShowDelay&&n.tooltipShowDelay<0?"tooltipShowDelay should not be lower than 0":null},tooltipSwitchShowDelay:{validate:n=>n.tooltipSwitchShowDelay&&n.tooltipSwitchShowDelay<0?"tooltipSwitchShowDelay should not be lower than 0":null},treeData:{supportedRowModels:["clientSide","serverSide"],validate:n=>{const i=n.rowModelType??"clientSide";switch(i){case"clientSide":{const{treeDataChildrenField:o,treeDataParentIdField:r,getDataPath:s,getRowId:a}=n;if(!o&&!r&&!s)return"treeData requires either 'treeDataChildrenField' or 'treeDataParentIdField' or 'getDataPath' in the clientSide row model.";if(o){if(s)return"Cannot use both 'treeDataChildrenField' and 'getDataPath' at the same time.";if(r)return"Cannot use both 'treeDataChildrenField' and 'treeDataParentIdField' at the same time."}if(r){if(!a)return"getRowId callback not provided, tree data with parent id cannot be built.";if(s)return"Cannot use both 'treeDataParentIdField' and 'getDataPath' at the same time."}return null}case"serverSide":{const o=`treeData requires 'isServerSideGroup' and 'getServerSideGroupKey' in the ${i} row model.`;return n.isServerSideGroup&&n.getServerSideGroupKey?null:o}}return null}},viewportDatasource:{supportedRowModels:["viewport"]},viewportRowModelBufferSize:{validate({viewportRowModelBufferSize:n}){return Oo("viewportRowModelBufferSize",n,0)}},viewportRowModelPageSize:{validate({viewportRowModelPageSize:n}){return Oo("viewportRowModelPageSize",n,1)}},rowDragEntireRow:{dependencies:{cellSelection:{required:[void 0]}}},autoGroupColumnDef:{validate({autoGroupColumnDef:n,showOpenedGroup:i}){return n?.field&&i?"autoGroupColumnDef.field and showOpenedGroup are not supported when used together.":n?.valueGetter&&i?"autoGroupColumnDef.valueGetter and showOpenedGroup are not supported when used together.":null}},renderingMode:{validate:n=>{const i=n.renderingMode,o=["default","legacy"];return i&&!o.includes(i)?`renderingMode must be one of [${o.join()}], currently it's ${i}`:null}},autoSizeStrategy:{validate:({autoSizeStrategy:n})=>{if(!n)return null;const i=["fitCellContents","fitGridWidth","fitProvidedWidth"],o=n.type;return o!=="fitCellContents"&&o!=="fitGridWidth"&&o!=="fitProvidedWidth"?`Invalid Auto-size strategy. \`autoSizeStrategy\` must be one of ${i.map(r=>'"'+r+'"').join(", ")}, currently it's ${o}`:o==="fitProvidedWidth"&&typeof n.width!="number"?`When using the 'fitProvidedWidth' auto-size strategy, must provide a numeric \`width\`. You provided ${n.width}`:null}}},t={};for(const n of $m)t[n]={expectedType:"boolean"};for(const n of Um)t[n]={expectedType:"number"};return Wn(t,e),t},d5=()=>({objectName:"gridOptions",allProperties:[...jm(),...Object.values(vh)],propertyExceptions:["api"],docsUrl:"grid-options/",deprecations:l5(),validations:u5()}),h5=0,f5=0,IF="__ag_grid_instance",p5=class extends X{constructor(){super(...arguments),this.beanName="gos",this.domDataKey="__AG_"+Math.random().toString(),this.instanceId=f5++,this.gridReadyFired=!1,this.queueEvents=[],this.propEventSvc=new Ts,this.globalEventHandlerFactory=e=>(t,n)=>{if(!this.isAlive())return;const i=kc.has(t);if(i&&!e||!i&&e||!g5(t))return;const o=(r,s)=>{const a=vh[r],l=this.gridOptions[a];typeof l=="function"&&this.beans.frameworkOverrides.wrapOutgoing(()=>l(s))};if(this.gridReadyFired)o(t,n);else if(t==="gridReady"){o(t,n),this.gridReadyFired=!0;for(const r of this.queueEvents)o(r.eventName,r.event);this.queueEvents=[]}else this.queueEvents.push({eventName:t,event:n})}}wireBeans(e){this.gridOptions=e.gridOptions,this.validation=e.validation,this.api=e.gridApi,this.gridId=e.context.getId()}get gridOptionsContext(){return this.gridOptions.context}postConstruct(){this.validateGridOptions(this.gridOptions),this.eventSvc.addGlobalListener(this.globalEventHandlerFactory().bind(this),!0),this.eventSvc.addGlobalListener(this.globalEventHandlerFactory(!0).bind(this),!1),this.propEventSvc.setFrameworkOverrides(this.beans.frameworkOverrides),this.addManagedEventListeners({gridOptionsChanged:({options:e})=>{this.updateGridOptions({options:e,force:!0,source:"optionsUpdated"})}})}destroy(){super.destroy(),this.queueEvents=[]}get(e){return this.gridOptions[e]??jL[e]}getCallback(e){return this.mergeGridCommonParams(this.gridOptions[e])}exists(e){return we(this.gridOptions[e])}mergeGridCommonParams(e){return e&&(n=>e(this.addCommon(n)))}updateGridOptions({options:e,force:t,source:n="api"}){const i={id:h5++,properties:[]},o=[],{gridOptions:r,validation:s}=this;for(const a of Object.keys(e)){const l=xg.applyGlobalGridOption(a,e[a]);s?.warnOnInitialPropertyUpdate(n,a);const u=t||typeof l=="object"&&n==="api",h=r[a];if(u||h!==l){r[a]=l;const f={type:a,currentValue:l,previousValue:h,changeSet:i,source:n};o.push(f)}}this.validateGridOptions(this.gridOptions),i.properties=o.map(a=>a.type);for(const a of o)Br(this,`Updated property ${a.type} from`,a.previousValue," to ",a.currentValue),this.propEventSvc.dispatchEvent(a)}addPropertyEventListener(e,t){this.propEventSvc.addEventListener(e,t)}removePropertyEventListener(e,t){this.propEventSvc.removeEventListener(e,t)}getDomDataKey(){return this.domDataKey}addCommon(e){return e.api=this.api,e.context=this.gridOptionsContext,e}validateOptions(e,t){for(const n of Object.keys(e)){const i=e[n];if(i==null||i===!1)continue;let o=t[n];typeof o=="function"&&(o=o(e,this.gridOptions,this.beans)),o&&this.assertModuleRegistered(o,n)}}validateGridOptions(e){this.validateOptions(e,c5),this.validation?.processGridOptions(e)}validateColDef(e,t,n){(n||!this.beans.dataTypeSvc?.isColPendingInference(t))&&(this.validateOptions(e,JV),this.validation?.validateColDef(e))}assertModuleRegistered(e,t){const n=Array.isArray(e)?e.some(i=>this.isModuleRegistered(i)):this.isModuleRegistered(e);return n||gt(200,{...this.getModuleErrorParams(),moduleName:e,reasonOrId:t}),n}getModuleErrorParams(){return{gridId:this.gridId,gridScoped:Eg(),rowModelType:this.get("rowModelType"),isUmd:JS()}}isModuleRegistered(e){return Pg(e,this.gridId,this.get("rowModelType"))}setInstanceDomData(e){e[IF]=this.instanceId}isElementInThisInstance(e){let t=e;for(;t;){const n=t[IF];if(we(n))return n===this.instanceId;t=t.parentElement}return!1}};function g5(e){return!!vh[e]}var m5=class extends X{constructor(e,t){super(),this.column=e,this.eGui=t,this.lastMovingChanged=0}postConstruct(){this.addManagedElementListeners(this.eGui,{click:e=>e&&this.onClick(e)}),this.addManagedListeners(this.column,{movingChanged:()=>{this.lastMovingChanged=Date.now()}})}onClick(e){const{sortSvc:t,rangeSvc:n,gos:i}=this.beans;if(!(ja(i)?e.altKey:!0))n?.handleColumnSelection(this.column,e);else if(this.column.isSortable()){const r=this.column.isMoving(),a=Date.now()-this.lastMovingChanged<50;r||a||t?.progressSortFromEvent(this.column,e)}}};function v5(e,t){const n={"aria-hidden":"true"};return{tag:"div",cls:"ag-cell-label-container",role:"presentation",children:[{tag:"span",ref:"eMenu",cls:"ag-header-icon ag-header-cell-menu-button",attrs:n},{tag:"span",ref:"eFilterButton",cls:"ag-header-icon ag-header-cell-filter-button",attrs:n},{tag:"div",ref:"eLabel",cls:"ag-header-cell-label",role:"presentation",children:[e?{tag:"span",ref:"eColRef",cls:"ag-header-col-ref"}:null,{tag:"span",ref:"eText",cls:"ag-header-cell-text"},{tag:"span",ref:"eFilter",cls:"ag-header-icon ag-header-label-icon ag-filter-icon",attrs:n},t?{tag:"ag-sort-indicator",ref:"eSortIndicator"}:null]}]}}var C5=class extends yt{constructor(){super(...arguments),this.eFilter=he,this.eFilterButton=he,this.eSortIndicator=he,this.eMenu=he,this.eLabel=he,this.eText=he,this.eColRef=he,this.eSortOrder=he,this.eSortAsc=he,this.eSortDesc=he,this.eSortMixed=he,this.eSortNone=he,this.eSortAbsoluteAsc=he,this.eSortAbsoluteDesc=he,this.isLoadingInnerComponent=!1}refresh(e){const t=this.params;if(this.params=e,this.workOutTemplate(e,!!this.beans?.sortSvc)!=this.currentTemplate||this.workOutShowMenu()!=this.currentShowMenu||e.enableSorting!=this.currentSort||e.column.formulaRef!=this.currentRef||this.currentSuppressMenuHide!=null&&this.shouldSuppressMenuHide()!=this.currentSuppressMenuHide||t.enableFilterButton!=e.enableFilterButton||t.enableFilterIcon!=e.enableFilterIcon)return!1;if(this.innerHeaderComponent){const n={...e};Wn(n,e.innerHeaderComponentParams),this.innerHeaderComponent.refresh?.(n)}else this.setDisplayName(e);return!0}workOutTemplate(e,t){const{formula:n}=this.beans,i=e.template;return i?i?.trim?i.trim():i:v5(!!n?.active,t)}init(e){this.params=e;const{sortSvc:t,touchSvc:n,rowNumbersSvc:i,userCompFactory:o}=this.beans,r=t?.getSortIndicatorSelector();this.currentTemplate=this.workOutTemplate(e,!!r),this.setTemplate(this.currentTemplate,r?[r]:void 0),this.eLabel&&(this.mouseListener??(this.mouseListener=this.createManagedBean(new m5(e.column,this.eLabel)))),n?.setupForHeader(this),this.setMenu(),this.setupSort(),this.setupColumnRefIndicator(),i?.setupForHeader(this),this.setupFilterIcon(),this.setupFilterButton(),this.workOutInnerHeaderComponent(o,e),this.setDisplayName(e)}workOutInnerHeaderComponent(e,t){const n=y_(e,t,t);n&&(this.isLoadingInnerComponent=!0,n.newAgStackInstance().then(i=>{this.isLoadingInnerComponent=!1,i&&(this.isAlive()?(this.innerHeaderComponent=i,this.eText&&this.eText.appendChild(i.getGui())):this.destroyBean(i))}))}setDisplayName(e){const{displayName:t}=e,n=this.currentDisplayName;this.currentDisplayName=t,!(!this.eText||n===t||this.innerHeaderComponent||this.isLoadingInnerComponent)&&(this.eText.textContent=_a(t))}addInIcon(e,t,n){const i=ii(e,this.beans,n);i&&t.appendChild(i)}workOutShowMenu(){return this.params.enableMenu&&!!this.beans.menuSvc?.isHeaderMenuButtonEnabled()}shouldSuppressMenuHide(){return!!this.beans.menuSvc?.isHeaderMenuButtonAlwaysShowEnabled()}setMenu(){if(!this.eMenu)return;if(this.currentShowMenu=this.workOutShowMenu(),!this.currentShowMenu){Mi(this.eMenu),this.eMenu=void 0;return}const{gos:e,eMenu:t,params:n}=this,i=ni(e);this.addInIcon(i?"menu":"menuAlt",t,n.column),t.classList.toggle("ag-header-menu-icon",!i);const o=this.shouldSuppressMenuHide();this.currentSuppressMenuHide=o,this.addManagedElementListeners(t,{click:()=>this.showColumnMenu(this.eMenu)}),this.toggleMenuAlwaysShow(o)}toggleMenuAlwaysShow(e){this.eMenu?.classList.toggle("ag-header-menu-always-show",e)}showColumnMenu(e){const{currentSuppressMenuHide:t,params:n}=this;t||this.toggleMenuAlwaysShow(!0),n.showColumnMenu(e,()=>{t||this.toggleMenuAlwaysShow(!1)})}onMenuKeyboardShortcut(e){const{params:t,gos:n,beans:i,eMenu:o,eFilterButton:r}=this,s=t.column,a=ni(n);if(e&&!a){if(i.menuSvc?.isFilterMenuInHeaderEnabled(s))return t.showFilter(r??o??this.getGui()),!0}else if(t.enableMenu)return this.showColumnMenu(o??r??this.getGui()),!0;return!1}setupSort(){const{sortSvc:e}=this.beans;if(!e)return;const{enableSorting:t,column:n}=this.params;if(this.currentSort=t,!this.eSortIndicator){this.eSortIndicator=this.createBean(e.createSortIndicator(!0));const{eSortIndicator:i,eSortOrder:o,eSortAsc:r,eSortDesc:s,eSortMixed:a,eSortNone:l,eSortAbsoluteAsc:u,eSortAbsoluteDesc:h}=this;i.attachCustomElements(o,r,s,a,l,u,h)}this.eSortIndicator.setupSort(n),this.currentSort&&e.setupHeader(this,n)}setupColumnRefIndicator(){const{eColRef:e,beans:{editModelSvc:t},params:n}=this;e&&(this.currentRef=n.column.formulaRef,e.textContent=this.currentRef,bt(e,!1),this.addManagedEventListeners({cellEditingStarted:()=>{const i=t?.getEditPositions(),o=!!this.currentRef&&!!i?.some(r=>r.column.isAllowFormula());bt(e,o)},cellEditingStopped:()=>{bt(e,!1)}}))}setupFilterIcon(){const{eFilter:e,params:t}=this;if(!e)return;const n=()=>{const i=t.column.isFilterActive();bt(e,i,{skipAriaHidden:!0})};this.configureFilter(t.enableFilterIcon,e,n,"filterActive")}setupFilterButton(){const{eFilterButton:e,params:t}=this;if(!e)return;this.configureFilter(t.enableFilterButton,e,this.onFilterChangedButton.bind(this),"filter")?this.addManagedElementListeners(e,{click:()=>t.showFilter(e)}):this.eFilterButton=void 0}configureFilter(e,t,n,i){if(!e)return Mi(t),!1;const o=this.params.column;return this.addInIcon(i,t,o),this.addManagedListeners(o,{filterChanged:n}),n(),!0}onFilterChangedButton(){const e=this.params.column.isFilterActive();this.eFilterButton.classList.toggle("ag-filter-active",e)}getAnchorElementForMenu(e){const{eFilterButton:t,eMenu:n}=this;return e?t??n??this.getGui():n??t??this.getGui()}destroy(){super.destroy(),this.innerHeaderComponent=this.destroyBean(this.innerHeaderComponent),this.mouseListener=this.destroyBean(this.mouseListener)}},w5=class extends X{constructor(e,t){super(),this.eLabel=e,this.columnGroup=t,this.isSticky=!1,this.left=null,this.right=null}postConstruct(){const{columnGroup:e,beans:t}=this,{ctrlsSvc:n}=t;n.whenReady(this,()=>{const i=this.refreshPosition.bind(this);e.getPinned()==null&&this.addManagedEventListeners({bodyScroll:o=>{o.direction==="horizontal"&&this.updateSticky(o.left)}}),this.addManagedListeners(e,{leftChanged:i,displayedChildrenChanged:i}),this.addManagedEventListeners({columnResized:i}),this.refreshPosition()})}refreshPosition(){const{columnGroup:e,beans:t}=this,n=e.getLeft(),i=e.getActualWidth();if(n==null||i===0){this.left=null,this.right=null,this.setSticky(!1);return}this.left=n,this.right=n+i;const o=t.colViewport.getScrollPosition();o!=null&&this.updateSticky(o)}updateSticky(e){const{beans:t,left:n,right:i}=this;if(n==null||i==null){this.setSticky(!1);return}const{gos:o,visibleCols:r}=t,a=o.get("enableRtl")?r.bodyWidth-e:e;this.setSticky(n<a&&i>a)}setSticky(e){const{isSticky:t,eLabel:n}=this;t!==e&&(this.isSticky=e,n.classList.toggle("ag-sticky-label",e))}},b5={tag:"div",cls:"ag-header-group-cell-label",role:"presentation",children:[{tag:"span",ref:"agLabel",cls:"ag-header-group-text",role:"presentation"},{tag:"span",ref:"agOpened",cls:"ag-header-icon ag-header-expand-icon ag-header-expand-icon-expanded"},{tag:"span",ref:"agClosed",cls:"ag-header-icon ag-header-expand-icon ag-header-expand-icon-collapsed"}]},y5=class extends yt{constructor(){super(b5),this.agOpened=he,this.agClosed=he,this.agLabel=he,this.isLoadingInnerComponent=!1}init(e){const{userCompFactory:t,touchSvc:n}=this.beans;this.params=e,this.checkWarnings(),this.workOutInnerHeaderGroupComponent(t,e),this.setupLabel(e),this.addGroupExpandIcon(e),this.setupExpandIcons(),n?.setupForHeaderGroup(this)}checkWarnings(){this.params.template&&se(89)}workOutInnerHeaderGroupComponent(e,t){const n=R_(e,t,t);n&&(this.isLoadingInnerComponent=!0,n.newAgStackInstance().then(i=>{this.isLoadingInnerComponent=!1,i&&(this.isAlive()?(this.innerHeaderGroupComponent=i,this.agLabel.appendChild(i.getGui())):this.destroyBean(i))}))}setupExpandIcons(){const{agOpened:e,agClosed:t,params:{columnGroup:n},beans:{colGroupSvc:i}}=this;this.addInIcon("columnGroupOpened",e),this.addInIcon("columnGroupClosed",t);const o=l=>{if(sr(l))return;const u=!n.isExpanded();i.setColumnGroupOpened(n.getProvidedColumnGroup(),u,"uiColumnExpanded")};this.addTouchAndClickListeners(t,o),this.addTouchAndClickListeners(e,o);const r=l=>{Vs(l)};this.addManagedElementListeners(t,{dblclick:r}),this.addManagedElementListeners(e,{dblclick:r}),this.addManagedElementListeners(this.getGui(),{dblclick:o}),this.updateIconVisibility();const s=n.getProvidedColumnGroup(),a=this.updateIconVisibility.bind(this);this.addManagedListeners(s,{expandedChanged:a,expandableChanged:a})}addTouchAndClickListeners(e,t){this.beans.touchSvc?.setupForHeaderGroupElement(this,e,t),this.addManagedElementListeners(e,{click:t})}updateIconVisibility(){const{agOpened:e,agClosed:t,params:{columnGroup:n}}=this;if(n.isExpandable()){const i=n.isExpanded();bt(e,i),bt(t,!i)}else bt(e,!1),bt(t,!1)}addInIcon(e,t){const n=ii(e,this.beans,null);n&&t.appendChild(n)}addGroupExpandIcon(e){if(!e.columnGroup.isExpandable()){const{agOpened:t,agClosed:n}=this;bt(t,!1),bt(n,!1)}}setupLabel(e){const{displayName:t,columnGroup:n}=e,{innerHeaderGroupComponent:i,isLoadingInnerComponent:o}=this,r=i||o;we(t)&&!r&&(this.agLabel.textContent=_a(t)),n.getColGroupDef()?.suppressStickyLabel||this.createManagedBean(new w5(this.getGui(),n))}destroy(){super.destroy(),this.innerHeaderGroupComponent&&(this.destroyBean(this.innerHeaderGroupComponent),this.innerHeaderGroupComponent=void 0)}},S5={moduleName:"ColumnHeaderComp",version:ve,userComponents:{agColumnHeader:C5},icons:{menu:"menu",menuAlt:"menu-alt"}},R5={moduleName:"ColumnGroupHeaderComp",version:ve,userComponents:{agColumnGroupHeader:y5},icons:{columnGroupOpened:"expanded",columnGroupClosed:"contracted"}},F5=class extends X{constructor(){super(...arguments),this.beanName="animationFrameSvc",this.p1={list:[],sorted:!1},this.p2={list:[],sorted:!1},this.f1={list:[],sorted:!1},this.destroyTasks=[],this.ticking=!1,this.scrollGoingDown=!0,this.lastScrollTop=0,this.taskCount=0}setScrollTop(e){this.scrollGoingDown=e>=this.lastScrollTop,e===0&&(this.scrollGoingDown=!0),this.lastScrollTop=e}postConstruct(){this.active=!this.gos.get("suppressAnimationFrame"),this.batchFrameworkComps=this.beans.frameworkOverrides.batchFrameworkComps}verify(){this.active===!1&&se(92)}createTask(e,t,n,i,o=!1){this.verify();let r=n;i&&this.batchFrameworkComps&&(r="f1");const s={task:e,index:t,createOrder:++this.taskCount,deferred:o};this.addTaskToList(this[r],s),this.schedule()}addTaskToList(e,t){e.list.push(t),e.sorted=!1}sortTaskList(e){if(e.sorted)return;const t=this.scrollGoingDown?1:-1;e.list.sort((n,i)=>n.deferred!==i.deferred?n.deferred?-1:1:n.index!==i.index?t*(i.index-n.index):i.createOrder-n.createOrder),e.sorted=!0}addDestroyTask(e){this.verify(),this.destroyTasks.push(e),this.schedule()}executeFrame(e){const{p1:t,p2:n,f1:i,destroyTasks:o,beans:r}=this,{ctrlsSvc:s,frameworkOverrides:a}=r,l=t.list,u=n.list,h=i.list,f=Date.now();let p=0;const m=e<=0,v=s.getScrollFeature();for(;m||p<e;){if(!v.scrollGridIfNeeded()){let b;if(l.length)this.sortTaskList(t),b=l.pop().task;else if(u.length)this.sortTaskList(n),b=u.pop().task;else if(h.length)a.wrapOutgoing(()=>{for(;(m||p<e)&&!v.scrollGridIfNeeded();){if(h.length)this.sortTaskList(i),b=h.pop().task,b();else break;p=Date.now()-f}}),b=()=>{};else if(o.length)b=o.pop();else break;b()}p=Date.now()-f}l.length||u.length||h.length||o.length?this.requestFrame():this.ticking=!1}flushAllFrames(){this.active&&this.executeFrame(-1)}schedule(){this.active&&(this.ticking||(this.ticking=!0,this.requestFrame()))}requestFrame(){const e=this.executeFrame.bind(this,60);er(this.beans,e)}isQueueEmpty(){return!this.ticking}},x5={moduleName:"AnimationFrame",version:ve,beans:[F5]},P5=class extends X{constructor(){super(...arguments),this.beanName="iconSvc"}createIconNoSpan(e,t){return ii(e,this.beans,t?.column)}},E5=(e,t,n)=>t||e&&n,D5=class extends X{constructor(){super(...arguments),this.beanName="touchSvc"}mockBodyContextMenu(e,t){this.mockContextMenu(e,e.eBodyViewport,t)}mockHeaderContextMenu(e,t){this.mockContextMenu(e,e.eGui,t)}mockRowContextMenu(e){if(!Ns())return;const t=(n,i,o)=>{const{rowCtrl:r,cellCtrl:s}=e.getControlsForEventTarget(o?.target??null);s?.column&&s.dispatchCellContextMenuEvent(o??null),this.beans.contextMenuSvc?.handleContextMenuMouseEvent(void 0,o,r,s)};this.mockContextMenu(e,e.element,t)}handleCellDoubleClick(e,t){return(()=>{if(!Ns()||Ad("dblclick"))return!1;const i=Date.now(),o=i-e.lastIPadMouseClickEvent<200;return e.lastIPadMouseClickEvent=i,o})()?(e.onCellDoubleClicked(t),t.preventDefault(),!0):!1}setupForHeader(e){const{gos:t,sortSvc:n,menuSvc:i}=this.beans;if(t.get("suppressTouch"))return;const{params:o,eMenu:r,eFilterButton:s}=e,a=new Ws(e.getGui(),!0);e.addDestroyFunc(()=>a.destroy());const l=e.shouldSuppressMenuHide(),u=l&&we(r)&&o.enableMenu,h=!!i?.isHeaderContextMenuEnabled(o.column),f=E5(o.enableMenu,h,ni(t));let p=a;u&&(p=new Ws(r,!0),e.addDestroyFunc(()=>p.destroy()));const m=v=>o.showColumnMenuAfterMouseClick(v.touchStart);if(u&&o.enableMenu&&e.addManagedListeners(p,{tap:m}),f&&e.addManagedListeners(a,{longTap:m}),o.enableSorting){const v=w=>{const b=w.touchStart.target;l&&(r?.contains(b)||s?.contains(b))||n?.progressSort(o.column,!1,"uiColumnSorted")};e.addManagedListeners(a,{tap:v})}if(o.enableFilterButton&&s){const v=new Ws(s,!0);e.addManagedListeners(v,{tap:()=>o.showFilter(s)}),e.addDestroyFunc(()=>v.destroy())}}setupForHeaderGroup(e){const t=e.params;if(this.beans.menuSvc?.isHeaderContextMenuEnabled(t.columnGroup.getProvidedColumnGroup())){const n=new Ws(t.eGridHeader,!0),i=o=>t.showColumnMenuAfterMouseClick(o.touchStart);e.addManagedListeners(n,{longTap:i}),e.addDestroyFunc(()=>n.destroy())}}setupForHeaderGroupElement(e,t,n){const i=new Ws(t,!0);e.addManagedListeners(i,{tap:n}),e.addDestroyFunc(()=>i.destroy())}mockContextMenu(e,t,n){if(!Ns())return;const i=new Ws(t),o=r=>{mc(this.beans,r.touchEvent)&&n(void 0,r.touchStart,r.touchEvent)};e.addManagedListeners(i,{longTap:o}),e.addDestroyFunc(()=>i.destroy())}},T5={moduleName:"Touch",version:ve,beans:[D5]},A5=class extends X{constructor(){super(...arguments),this.beanName="cellNavigation"}wireBeans(e){this.rowSpanSvc=e.rowSpanSvc}getNextCellToFocus(e,t,n=!1){return n?this.getNextCellToFocusWithCtrlPressed(e,t):this.getNextCellToFocusWithoutCtrlPressed(e,t)}getNextCellToFocusWithCtrlPressed(e,t){const n=e===q.UP,i=e===q.DOWN,o=e===q.LEFT;let r,s;const{pageBounds:a,gos:l,visibleCols:u,pinnedRowModel:h}=this.beans,{rowPinned:f}=t;if(n||i)f&&h?n?s=0:s=f==="top"?h.getPinnedTopRowCount()-1:h.getPinnedBottomRowCount()-1:s=n?a.getFirstRow():a.getLastRow(),r=t.column;else{const p=l.get("enableRtl");s=t.rowIndex,r=(o!==p?u.allCols:[...u.allCols].reverse()).find(v=>!zn(v)&&this.isCellGoodToFocusOn({rowIndex:s,rowPinned:null,column:v}))}return r?{rowIndex:s,rowPinned:f,column:r}:null}getNextCellToFocusWithoutCtrlPressed(e,t){let n=t,i=!1;for(;!i;){switch(e){case q.UP:n=this.getCellAbove(n);break;case q.DOWN:n=this.getCellBelow(n);break;case q.RIGHT:n=this.gos.get("enableRtl")?this.getCellToLeft(n):this.getCellToRight(n);break;case q.LEFT:n=this.gos.get("enableRtl")?this.getCellToRight(n):this.getCellToLeft(n);break;default:n=null,se(8,{key:e});break}n?i=this.isCellGoodToFocusOn(n):i=!0}return n}isCellGoodToFocusOn(e){const t=e.column;let n;const{pinnedRowModel:i,rowModel:o}=this.beans;switch(e.rowPinned){case"top":n=i?.getPinnedTopRow(e.rowIndex);break;case"bottom":n=i?.getPinnedBottomRow(e.rowIndex);break;default:n=o.getRow(e.rowIndex);break}return n?!this.isSuppressNavigable(t,n):!1}getCellToLeft(e){if(!e)return null;const t=this.beans.visibleCols.getColBefore(e.column);return t?{rowIndex:e.rowIndex,column:t,rowPinned:e.rowPinned}:null}getCellToRight(e){if(!e)return null;const t=this.beans.visibleCols.getColAfter(e.column);return t?{rowIndex:e.rowIndex,column:t,rowPinned:e.rowPinned}:null}getCellBelow(e){if(!e)return null;const t=this.rowSpanSvc?.getCellEnd(e)??e,n=iR(this.beans,t,!0);return n?{rowIndex:n.rowIndex,column:e.column,rowPinned:n.rowPinned}:null}getCellAbove(e){if(!e)return null;const t=this.rowSpanSvc?.getCellStart(e)??e,n=Jd(this.beans,{rowIndex:t.rowIndex,rowPinned:t.rowPinned},!0);return n?{rowIndex:n.rowIndex,column:e.column,rowPinned:n.rowPinned}:null}getNextTabbedCell(e,t){return t?this.getNextTabbedCellBackwards(e):this.getNextTabbedCellForwards(e)}getNextTabbedCellForwards(e){const{visibleCols:t,pagination:n}=this.beans,i=t.allCols;let o=e.rowIndex,r=e.rowPinned,s=t.getColAfter(e.column);if(!s){s=i[0];const a=iR(this.beans,e,!0);if(Nt(a)||!a.rowPinned&&!(n?.isRowInPage(a.rowIndex)??!0))return null;o=a?a.rowIndex:null,r=a?a.rowPinned:null}return{rowIndex:o,column:s,rowPinned:r}}getNextTabbedCellBackwards(e){const{beans:t}=this,{visibleCols:n,pagination:i}=t,o=n.allCols;let r=e.rowIndex,s=e.rowPinned,a=n.getColBefore(e.column);if(!a){a=Pt(o);const l=Jd(t,{rowIndex:e.rowIndex,rowPinned:e.rowPinned},!0);if(Nt(l)||!l.rowPinned&&!(i?.isRowInPage(l.rowIndex)??!0))return null;r=l?l.rowIndex:null,s=l?l.rowPinned:null}return{rowIndex:r,column:a,rowPinned:s}}isSuppressNavigable(e,t){const{suppressNavigable:n}=e.colDef;if(typeof n=="boolean")return n;if(typeof n=="function"){const i=e.createColumnFunctionCallbackParams(t);return n(i)}return!1}};function I5(e){return e.focusSvc.getFocusedCell()}function M5(e){return e.focusSvc.clearFocusedCell()}function k5(e,t,n,i){e.focusSvc.setFocusedCell({rowIndex:t,column:n,rowPinned:i,forceBrowserFocus:!0})}function L5(e,t){return e.navigation?.tabToNextCell(!1,t)??!1}function O5(e,t){return e.navigation?.tabToNextCell(!0,t)??!1}function _5(e,t,n=!1){const i=e.headerNavigation?.getHeaderPositionForColumn(t,n);i&&e.focusSvc.focusHeaderPosition({headerPosition:i})}function Ks(e){const t=e;return t?.getFrameworkComponentInstance!=null?t.getFrameworkComponentInstance():e}var N5=class extends X{constructor(){super(...arguments),this.beanName="editModelSvc",this.edits=new Map,this.cellValidations=new MF,this.rowValidations=new kF,this.suspendEdits=!1}suspend(e){this.suspendEdits=e}removeEdits({rowNode:e,column:t}){if(!this.hasEdits({rowNode:e})||!e)return;const n=this.getEditRow(e);t?n.delete(t):n.clear(),n.size===0&&this.edits.delete(e)}getEditRow(e,t={}){if(this.suspendEdits||this.edits.size===0)return;const n=e&&this.edits.get(e);if(n)return n;if(t.checkSiblings){const i=e.pinnedSibling;if(i)return this.getEditRow(i)}}getEditRowDataValue(e,{checkSiblings:t}={}){if(!e||this.edits.size===0)return;const n=this.getEditRow(e),i=e.pinnedSibling,o=t&&i&&this.getEditRow(i);if(!n&&!o)return;const r={...e.data},s=(a,l)=>a.forEach(({editorValue:u,pendingValue:h},f)=>{const p=u===void 0?h:u;p!==fn&&(l[f.getColId()]=p)});return n&&s(n,r),o&&s(o,r),r}getEdit(e={},t){const{rowNode:n,column:i}=e,o=this.edits;if(this.suspendEdits||o.size===0||!n||!i)return;const r=o.get(n)?.get(i);if(r)return r;if(t?.checkSiblings){const s=n.pinnedSibling;if(s)return o.get(s)?.get(i)}}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((n,i)=>{const o=new Map;n.forEach(({editorState:r,...s},a)=>o.set(a,{...s})),t.set(i,o)}),t}setEditMap(e){this.edits.clear(),e.forEach((t,n)=>{const i=new Map;t.forEach((o,r)=>i.set(r,{...o})),this.edits.set(n,i)})}setEdit(e,t){const n=this.edits;(n.size===0||!n.has(e.rowNode))&&n.set(e.rowNode,new Map);const i=this.getEdit(e),o={editorState:{isCancelAfterEnd:void 0,isCancelBeforeStart:void 0},...i,...t};return this.getEditRow(e.rowNode).set(e.column,o),o}clearEditValue(e){const{rowNode:t,column:n}=e;if(!t)return;const i=r=>{r.editorValue=void 0,r.pendingValue=r.sourceValue,r.state="changed"};if(!n){this.getEditRow(t)?.forEach(i);return}const o=this.getEdit(e);o&&i(o)}getState(e){if(!this.suspendEdits)return this.getEdit(e)?.state}getEditPositions(e){if(this.suspendEdits||(e??this.edits).size===0)return[];const t=[];return(e??this.edits).forEach((n,i)=>{for(const o of n.keys()){const{editorState:r,...s}=n.get(o);t.push({rowNode:i,column:o,...s})}}),t}hasRowEdits(e,t){return this.suspendEdits||this.edits.size===0?!1:!!this.getEditRow(e,t)}hasEdits(e={},t={}){if(this.suspendEdits||this.edits.size===0)return!1;const{rowNode:n,column:i}=e,{withOpenEditor:o}=t;if(n){const r=this.getEditRow(n,t);return r?i?o?this.getEdit(e)?.state==="editing":r.has(i):r.size!==0?o?Array.from(r.values()).some(({state:s})=>s==="editing"):!0:!1:!1}return o?this.getEditPositions().some(({state:r})=>r==="editing"):this.edits.size>0}start(e){const t=this.getEditRow(e.rowNode)??new Map,{rowNode:n,column:i}=e;i&&!t.has(i)&&t.set(i,{editorValue:void 0,pendingValue:fn,sourceValue:this.beans.valueSvc.getValue(i,n,"data"),state:"editing",editorState:{isCancelAfterEnd:void 0,isCancelBeforeStart:void 0}}),this.edits.set(n,t)}stop(e,t,n){if(this.hasEdits(e))if(t){const i=this.getEditRow(e.rowNode)?.get(e.column);i&&(i.pendingValue===fn||i.pendingValue===i.sourceValue)?this.removeEdits(e):i&&n&&(i.editorValue=void 0)}else this.removeEdits(e)}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()}},MF=class{constructor(){this.cellValidations=new Map}getCellValidation(e){const{rowNode:t,column:n}=e||{};return this.cellValidations?.get(t)?.get(n)}hasCellValidation(e){return!e?.rowNode||!e.column?this.cellValidations.size>0:!!this.getCellValidation(e)}setCellValidation(e,t){const{rowNode:n,column:i}=e;this.cellValidations.has(n)||this.cellValidations.set(n,new Map),this.cellValidations.get(n).set(i,t)}clearCellValidation(e){const{rowNode:t,column:n}=e;this.cellValidations.get(t)?.delete(n)}setCellValidationMap(e){this.cellValidations=e}getCellValidationMap(){return this.cellValidations}clearCellValidationMap(){this.cellValidations.clear()}},kF=class{constructor(){this.rowValidations=new Map}getRowValidation(e){const{rowNode:t}=e||{};return this.rowValidations.get(t)}hasRowValidation(e){return e?.rowNode?!!this.getRowValidation(e):this.rowValidations.size>0}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 Ch(e,t={}){const{rowIndex:n,rowId:i,rowCtrl:o,rowPinned:r}=t;if(o)return o;const{rowModel:s,rowRenderer:a}=e;let{rowNode:l}=t;return l||(i?l=p2(e,i,r):n!=null&&(l=s.getRow(n))),l?a.getRowCtrlByNode(l):void 0}function ft(e,t={}){const{cellCtrl:n,colId:i,columnId:o,column:r}=t;if(n)return n;const s=e.colModel.getCol(i??o??Km(r)),a=t.rowCtrl??Ch(e,t),l=a?.getCellCtrl(s)??void 0;if(l)return l;const u=t.rowNode??a?.rowNode;if(u)return e.rowRenderer.getCellCtrls([u],[s])?.[0]}function LF(e){const{editSvc:t}=e;t?.isBatchEditing()?(Yr(e,{persist:!0}),Zr(e)):t?.stopEditing(void 0,{source:"api"})}function B5(e,t,n){const{gos:i,popupSvc:o}=t;if(!i.get("stopEditingWhenCellsLoseFocus"))return;const r=s=>{const a=s.relatedTarget;if($g(a)===null){LF(t);return}let l=n.some(u=>u.contains(a))&&i.isElementInThisInstance(a);l||(l=!!o&&(o.getActivePopups().some(u=>u.contains(a))||o.isElementWithinCustomPopup(a))),l||LF(t)};for(const s of n)e.addManagedElementListeners(s,{focusout:r})}function Km(e){if(e)return typeof e=="string"?e:e.getColId()}var fn=Symbol("unedited"),G5=(e,t={})=>{const n=e.rowRenderer.getCellCtrls(t.rowNodes,t.columns),i=new Array(n.length);let o=0;for(let r=0,s=n.length;r<s;++r){const l=n[r].comp?.getCellEditor();l&&(i[o++]=Ks(l))}return i.length=o,i};function H5(e,t,n,i,o,r){t.length===0&&n?.rowNode&&n?.column&&qs(e,n,{key:i,event:o,cellStartedEdit:r});const{valueSvc:s,editSvc:a,editModelSvc:l}=e,{rowNode:u,column:h}=n??{};for(const f of t){const{rowNode:p,column:m}=f,v=ft(e,f);if(!v){if(p&&m){const b=s.getValue(m,p,"data"),S=(n?.rowNode===p&&n?.column===m&&i||void 0)??a?.getCellDataValue(f)??s.getValueForDisplay({column:m,node:p,from:"edit"})?.value??b??fn;l?.setEdit(f,{pendingValue:rl(e,S,!1,m),sourceValue:b,state:"editing"})}continue}const w=r&&u===v.rowNode&&v.column===h;qs(e,{rowNode:u,column:v.column},{key:w?i:null,event:w?o:null,cellStartedEdit:w&&r})}}function so({pendingValue:e,sourceValue:t}){return e===fn&&(e=t),e!==t}function V5(e){const t=new Map;for(const[n,i]of e){const o=new Map;for(const[r,s]of i)so(s)&&o.set(r,s);o.size>0&&t.set(n,o)}return t}function qs(e,t,n){const{key:i,event:o,cellStartedEdit:r,silent:s}=n??{},{editModelSvc:a,gos:l,userCompFactory:u}=e,h=ft(e,t),f=h?.comp?.getCellEditor(),p=_F(e,t,i,r&&!s),m=a?.getEdit(t),v=p.value??m?.sourceValue;if(f){a?.setEdit(t,{editorValue:rl(e,v,!0,t.column),state:"editing"}),f.refresh?.(p);return}const w=t.column.getColDef(),b=A0(u,w,p);if(!b)return;const{popupFromSelector:y,popupPositionFromSelector:R}=b,S=y??!!w.cellEditorPopup,P=R??w.cellEditorPopupPosition;if(NF(b.params,o),!h)return;const{rangeFeature:F,rowCtrl:I,comp:L,onEditorAttachedFuncs:V}=h;a?.setEdit(t,{editorValue:rl(e,v,!0,t.column),state:"editing",editorState:{cellStartedEditing:void 0,cellStoppedEditing:void 0}}),h.editCompDetails=b,V.push(()=>F?.unsetComp()),L?.setEditDetails(b,S,P,l.get("reactiveCustomComponents")),I?.refreshRow({suppressFlash:!0}),W5(e,t,o,v,s)}function W5(e,t,n,i,o){const{editSvc:r,editModelSvc:s}=e,a=s?.getEdit(t);!o&&a?.state==="editing"&&!a?.editorState?.cellStartedEditing&&(r?.dispatchCellEvent(t,n,"cellEditingStarted",{value:i}),s?.setEdit(t,{editorState:{cellStartedEditing:!0}}))}function OF(e,t,n){const i={editorValueExists:!1};if(qm(e)&&(t.getValidationErrors?.()?.length??0)>0||n?.isCancelling)return i;if(n?.isStopping){const r=t?.isCancelAfterEnd?.();if(r)return{...i,isCancelAfterEnd:r}}return{editorValue:t.getValue(),editorValueExists:!0}}function _F(e,t,n,i){const{valueSvc:o,gos:r,editSvc:s}=e,a=e.gos.get("enableGroupEdit"),l=ft(e,t),u=t.rowNode?.rowIndex??void 0,h=s?.isBatchEditing(),f=e.colModel.getCol(t.column.getId()),{rowNode:p,column:m}=t,v=l.comp?.getCellEditor(),w=s?.getCellDataValue(t),b=w===void 0?v?OF(e,v)?.editorValue:void 0:w,y=b===fn?o.getValueForDisplay({column:f,node:p,from:"edit"})?.value:b;let R=a?b:y;return m.isAllowFormula()&&e.formula?.isFormula(R)&&(R=e.formula?.normaliseFormula(R,!0)??R),We(r,{value:R,eventKey:n??null,column:m,colDef:m.getColDef(),rowIndex:u,node:p,data:p.data,cellStartedEdit:!!i,onKeyDown:l?.onKeyDown.bind(l),stopEditing:S=>{s.stopEditing(t,{source:h?"ui":"api",suppressNavigateAfterEdit:S}),Oc(e,t,{})},eGridCell:l?.eGui,parseValue:S=>o.parseValue(f,p,S,l?.value),formatValue:l?.formatValue.bind(l),validate:()=>{s?.validateEdit()}})}function Lc(e,t){const{editModelSvc:n}=e;n?.getEditMap().forEach((i,o)=>{i.forEach((r,s)=>{!t&&(r.state==="editing"||r.pendingValue===fn)||!so(r)&&(r.state!=="editing"||t)&&n?.removeEdits({rowNode:o,column:s})})})}function z5(e,t){const n=t.comp?.getCellEditor();if(!n?.refresh)return;const{eventKey:i,cellStartedEdit:o}=t.editCompDetails.params,{column:r}=t,s=_F(e,t,i,o),a=r.getColDef(),l=A0(e.userCompFactory,a,s);n.refresh(NF(l.params,i))}function NF(e,t){return t instanceof KeyboardEvent&&e.column.getColDef().cellEditor==="agNumberCellEditor"?e.suppressPreventDefault=["-","+",".","e"].includes(t?.key??"")||e.suppressPreventDefault:t?.preventDefault?.(),e}function Yr(e,t){for(const n of e.editModelSvc?.getEditPositions()??[]){const i=ft(e,n);if(!i)continue;const o=i.comp?.getCellEditor();if(!o)continue;const{editorValue:r,editorValueExists:s,isCancelAfterEnd:a}=OF(e,o,t);if(a){const{cellStartedEditing:l,cellStoppedEditing:u}=e.editModelSvc?.getEdit(n)?.editorState||{};e.editModelSvc?.setEdit(n,{editorState:{isCancelAfterEnd:a,cellStartedEditing:l,cellStoppedEditing:u}})}ol(e,n,r,void 0,!s,t)}}function ol(e,t,n,i,o,r){const{editModelSvc:s,valueSvc:a}=e;if(!s)return;const{rowNode:l,column:u}=t;if(!(l&&u))return;let h=s.getEdit(t);if(h?.sourceValue===void 0){const f=h?rl(e,h.editorValue,!1,u):fn,p={sourceValue:a.getValue(u,l,"data"),pendingValue:f};r?.persist&&(p.state="changed"),h=s.setEdit(t,p)}s.setEdit(t,{editorValue:o?rl(e,h.sourceValue,!0,u):n}),r?.persist&&U5(e,t)}function rl(e,t,n,i){const{formula:o}=e;return i.isAllowFormula()&&o?.isFormula(t)?o?.normaliseFormula(t,n)??t:t}function U5(e,t){const{editModelSvc:n}=e,i=n?.getEdit(t),r={pendingValue:rl(e,i?.editorValue,!1,t.column)};!i?.editorState?.cellStoppedEditing&&i?.state!=="editing"&&(r.state="changed"),n?.setEdit(t,r)}function Zr(e,t,n={}){if(t||(t=e.editModelSvc?.getEditPositions()),t)for(const i of t)Oc(e,i,n)}function Oc(e,t,n,i=ft(e,t)){const o=e.editModelSvc,r=o?.getEdit(t);let s;if(r&&r.state!=="editing"&&r.editorState?.cellStoppedEditing?s=r.state:s="changed",!i){r&&o?.setEdit(t,{state:s});return}const a=i.comp,l=a?.getCellEditor();if(a&&!l){if(i?.refreshCell(),r){o?.setEdit(t,{state:s});const h=e.gos.get("enableGroupEdit")?BF(r,n?.cancel):{valueChanged:!1,newValue:void 0,oldValue:r.sourceValue};GF(e,t,h,n)}return}if(qm(e)){const h=r&&l?.getValidationErrors?.(),f=o?.getCellValidationModel();h?.length?f?.setCellValidation(t,{errorMessages:h}):f?.clearCellValidation(t)}r&&o?.setEdit(t,{state:s}),a?.setEditDetails(),a?.refreshEditStyles(!1,!1),i?.refreshCell({force:!0,suppressFlash:!0});const u=o?.getEdit(t);if(u&&u.state!=="editing"){const h=n?.cancel,f=e.gos.get("enableGroupEdit")?BF(u,h):$5(u,r,h);GF(e,t,f,n)}}function BF(e,t){const{sourceValue:n,pendingValue:i}=e;let o;return!t&&i!==fn&&(o=i),{valueChanged:!t&&so(e),newValue:o,oldValue:n,value:n}}function $5(e,t,n){if(n||e.editorState.isCancelAfterEnd)return{valueChanged:!1,newValue:void 0,oldValue:e.sourceValue};let i=e.editorValue;return(i==null||i===fn)&&(i=t?.pendingValue),i===fn&&(i=void 0),{valueChanged:so(e),newValue:i,oldValue:e.sourceValue}}function GF(e,t,n,{silent:i,event:o}={}){const{editSvc:r,editModelSvc:s}=e,a=s?.getEdit(t),{editorState:l}=a||{},{isCancelBeforeStart:u,cellStartedEditing:h,cellStoppedEditing:f}=l||{};!i&&!u&&h&&!f&&(r?.dispatchCellEvent(t,o,"cellEditingStopped",n),s?.setEdit(t,{editorState:{cellStoppedEditing:!0}}))}function j5(e){if(!e)return!1;for(let t=0,n=e.length;t<n;++t){const i=e[t],o=i.cellEditorParams;if(!(!o||!i.editable&&!i.groupRowEditable)&&(o.minLength!==void 0||o.maxLength!==void 0||o.getValidationErrors!==void 0||o.min!==void 0||o.max!==void 0))return!0}return!1}function K5(e){const t=e.rowRenderer.getCellCtrls();for(let n=0,i=t.length;n<i;++n){const r=t[n].comp?.getCellEditor();if(r){const s=Ks(r);if(s.getValidationElement||s.getValidationErrors)return!0}}return!1}function qm(e){return!!e.gos.get("getFullRowEditValidationErrors")||j5(e.colModel.getColumnDefs())||K5(e)}function Xr(e,t){if(!(t||qm(e)))return;const n=new MF,{ariaAnnounce:i,localeSvc:o,editModelSvc:r,gos:s}=e,a=s.get("editType")==="fullRow",u=US(o)("ariaValidationErrorPrefix","Cell Editor Validation"),h=new Set;for(const f of e.rowRenderer.getCellCtrls()){const p=f.comp?.getCellEditor();if(!p)continue;const m=Ks(p),{rowNode:v,column:w}=f,b=m.getValidationErrors?.()??[],y=m.getValidationElement?.(!1)||!m.isPopup?.()&&f.eGui;if(y){const R=b!=null&&b.length>0,S=R?b.join(". "):"";fg(y,R),R&&i.announceValue(`${u} ${b}`,"editorValidation"),y instanceof HTMLInputElement?y.setCustomValidity(S):y.classList.toggle("invalid",R)}b?.length>0&&n.setCellValidation({rowNode:v,column:w},{errorMessages:b}),h.add(f.rowCtrl)}if(Yr(e,{persist:!1}),r?.setCellValidationModel(n),a){const f=q5(e);r?.setRowValidationModel(f)}for(const f of h.values()){f.rowEditStyleFeature?.applyRowStyles();for(const p of f.getAllCellCtrls())p.tooltipFeature?.refreshTooltip(!0),p.editorTooltipFeature?.refreshTooltip(!0),p.editStyleFeature?.applyCellStyles?.()}}var q5=e=>{const t=new kF,n=e.gos.get("getFullRowEditValidationErrors"),i=e.editModelSvc?.getEditMap();if(!i)return t;for(const o of i.keys()){const r=i.get(o);if(!r)continue;const s=[],{rowIndex:a,rowPinned:l}=o;for(const h of r.keys()){const f=r.get(h);if(!f)continue;const{editorValue:p,pendingValue:m,sourceValue:v}=f,w=p??(m===fn?void 0:m)??v;s.push({column:h,colId:h.getColId(),rowIndex:a,rowPinned:l,oldValue:v,newValue:w})}const u=n?.({editorsState:s})??[];u.length>0&&t.setRowValidation({rowNode:o},{errorMessages:u})}return t};function Q5(e){Xr(e,!0);const t=e.editModelSvc?.getCellValidationModel().getCellValidationMap();if(!t)return null;const n=[];return t.forEach((i,o)=>{i.forEach(({errorMessages:r},s)=>{n.push({column:s,rowIndex:o.rowIndex,rowPinned:o.rowPinned,messages:r??null})})}),n}function wh(e){return!!(e.rowPinned&&e.pinnedSibling)}function Bi(e,t,n,i){const o=t==="top";if(!n)return Bi(e,t,o?e.getPinnedTopRow(0):e.getPinnedBottomRow(0),i);if(!i){const l=o?e.getPinnedTopRowCount():e.getPinnedBottomRowCount();return Bi(e,t,n,o?e.getPinnedTopRow(l-1):e.getPinnedBottomRow(l-1))}let r=!1,s=!1;const a=[];return e.forEachPinnedRow(t,l=>{if(l===n&&!r){r=!0,a.push(l);return}if(r&&l===i){s=!0,a.push(l);return}r&&!s&&a.push(l)}),a}function Y5(e,t,n,{rowNode:i,column:o},r){return We(e.gos,{type:n,node:i,data:i.data,value:r,column:o,colDef:o.getColDef(),rowPinned:i.rowPinned,event:t,rowIndex:i.rowIndex})}function Z5(e,t=!1){return e===q.DELETE?!0:!t&&e===q.BACKSPACE?N0():!1}var X5=class extends X{constructor(e,t,n,i){super(),this.cellCtrl=e,this.rowNode=n,this.rowCtrl=i,this.beans=t}init(){this.eGui=this.cellCtrl.eGui}onKeyDown(e){const t=e.key;if(!(t===q.ENTER&&zn(this.cellCtrl.column)&&this.beans.rowNumbersSvc?.handleKeyDownOnCell(this.cellCtrl.cellPosition,e)))switch(t){case q.ENTER:this.onEnterKeyDown(e);break;case q.F2:this.onF2KeyDown(e);break;case q.ESCAPE:this.onEscapeKeyDown(e);break;case q.TAB:this.onTabKeyDown(e);break;case q.BACKSPACE:case q.DELETE:this.onBackspaceOrDeleteKeyDown(t,e);break;case q.DOWN:case q.UP:case q.RIGHT:case q.LEFT:this.onNavigationKeyDown(e,t);break}}onNavigationKeyDown(e,t){const{cellCtrl:n,beans:i}=this;if(!i.editSvc?.isEditing(n,{withOpenEditor:!0})){if(e.shiftKey&&n.isRangeSelectionEnabled())this.onShiftRangeSelect(e);else{const o=n.getFocusedCellPosition();i.navigation?.navigateToNextCell(e,t,o,!0)}e.preventDefault()}}onShiftRangeSelect(e){const{rangeSvc:t,navigation:n}=this.beans;if(!t)return;const i=t.extendLatestRangeInDirection(e);i&&(e.key===q.LEFT||e.key===q.RIGHT?n?.ensureColumnVisible(i.column):n?.ensureRowVisible(i.rowIndex))}onTabKeyDown(e){this.beans.navigation?.onTabKeyDown(this.cellCtrl,e)}onBackspaceOrDeleteKeyDown(e,t){const{cellCtrl:n,beans:i,rowNode:o}=this,{gos:r,rangeSvc:s,eventSvc:a,editSvc:l}=i;if(a.dispatchEvent({type:"keyShortcutChangedCellStart"}),Z5(e,r.get("enableCellEditingOnBackspace"))&&!l?.isEditing(n,{withOpenEditor:!0})){if(s&&nr(r))s.clearCellRangeCellValues({dispatchWrapperEvents:!0,wrapperEventSource:"deleteKey"});else if(n.isCellEditable()){const u=i.valueSvc.getDeleteValue(n.column,o);o.setDataValue(n.column,u,"cellClear")}}else l?.isEditing(n,{withOpenEditor:!0})||i.editSvc?.startEditing(n,{startedEdit:!0,event:t});a.dispatchEvent({type:"keyShortcutChangedCellEnd"})}onEnterKeyDown(e){const{cellCtrl:t,beans:n}=this,{editSvc:i,navigation:o}=n,r=i?.isEditing(t,{withOpenEditor:!0}),s=t.rowNode,a=i?.isRowEditing(s,{withOpenEditor:!0}),l=u=>{i?.startEditing(u,{startedEdit:!0,event:e,source:"edit"})&&e.preventDefault()};if(r||a){if(this.isCtrlEnter(e)){i?.applyBulkEdit(t,n?.rangeSvc?.getCellRanges()||[]);return}if(Xr(n),i?.checkNavWithValidation(void 0,e)==="block-stop")return;i?.isEditing(t,{withOpenEditor:!0})?i?.stopEditing(t,{event:e,source:"edit"}):a&&!t.isCellEditable()?i?.stopEditing({rowNode:s},{event:e,source:"edit"}):l(t)}else if(n.gos.get("enterNavigatesVertically")){const u=e.shiftKey?q.UP:q.DOWN;o?.navigateToNextCell(null,u,t.cellPosition,!1)}else{if(i?.hasValidationErrors())return;i?.hasValidationErrors(t)&&i.revertSingleCellEdit(t,!0),l(t)}}isCtrlEnter(e){return(e.ctrlKey||e.metaKey)&&e.key===q.ENTER}onF2KeyDown(e){const{cellCtrl:t,beans:{editSvc:n}}=this;n?.isEditing()&&(Xr(this.beans),n?.checkNavWithValidation(void 0,e)==="block-stop")||n?.startEditing(t,{startedEdit:!0,event:e})}onEscapeKeyDown(e){const{cellCtrl:t,beans:{editSvc:n}}=this;n?.checkNavWithValidation(t,e)==="block-stop"&&n.revertSingleCellEdit(t),setTimeout(()=>{n?.stopEditing(t,{event:e,cancel:!0})})}processCharacter(e){const n=e.target!==this.eGui,{beans:{editSvc:i},cellCtrl:o}=this;if(n||i?.isEditing(o,{withOpenEditor:!0}))return;if(e.key===q.SPACE)this.onSpaceKeyDown(e);else if(i?.isCellEditable(o,"ui")){if(i?.hasValidationErrors()&&!i?.hasValidationErrors(o))return;i?.startEditing(o,{startedEdit:!0,event:e,source:"api",editable:!0}),!o.editCompDetails?.params?.suppressPreventDefault&&e.preventDefault()}}onSpaceKeyDown(e){const{gos:t,editSvc:n}=this.beans,{rowNode:i}=this.cellCtrl;!n?.isEditing(this.cellCtrl,{withOpenEditor:!0})&&ks(t)&&this.beans.selectionSvc?.handleSelectionEvent(e,i,"spaceKey"),e.preventDefault()}},J5=class extends X{constructor(e,t,n){super(),this.cellCtrl=e,this.column=n,this.beans=t}onMouseEvent(e,t){if(!sr(t))switch(e){case"click":this.onCellClicked(t);break;case"pointerdown":case"mousedown":case"touchstart":this.onMouseDown(t);break;case"dblclick":this.onCellDoubleClicked(t);break;case"mouseout":this.onMouseOut(t);break;case"mouseover":this.onMouseOver(t);break}}onCellClicked(e){if(this.beans.touchSvc?.handleCellDoubleClick(this,e))return;const{eventSvc:t,rangeSvc:n,editSvc:i,editModelSvc:o,frameworkOverrides:r,gos:s}=this.beans,a=e.ctrlKey||e.metaKey,{cellCtrl:l}=this,{column:u,cellPosition:h,rowNode:f}=l,p=eh(s,u,f,e);n&&a&&!p&&n.getCellRangeCount(h)>1&&n.intersectLastRange(!0);const m=l.createEvent(e,"cellClicked");m.isEventHandlingSuppressed=p,t.dispatchEvent(m);const v=u.getColDef();if(v.onCellClicked&&window.setTimeout(()=>{r.wrapOutgoing(()=>{v.onCellClicked(m)})},0),!p&&o?.getState(l)!=="editing"){const w=i?.isEditing(),b=i?.isRangeSelectionEnabledWhileEditing(),y=o?.getCellValidationModel().getCellValidationMap().size??0,R=o?.getRowValidationModel().getRowValidationMap().size??0;if(w&&(b||y>0||R>0))return;i?.shouldStartEditing(l,e)?i?.startEditing(l,{event:e}):i?.shouldStopEditing(l,e)&&(this.beans.gos.get("editType")==="fullRow"?i?.stopEditing(l,{event:e,source:"edit"}):i?.stopEditing(void 0,{event:e,source:"edit"}))}}onCellDoubleClicked(e){const{column:t,beans:n,cellCtrl:i}=this,{eventSvc:o,frameworkOverrides:r,editSvc:s,editModelSvc:a,gos:l}=n,u=eh(l,i.column,i.rowNode,e),h=t.getColDef(),f=i.createEvent(e,"cellDoubleClicked");if(f.isEventHandlingSuppressed=u,o.dispatchEvent(f),typeof h.onCellDoubleClicked=="function"&&window.setTimeout(()=>{r.wrapOutgoing(()=>{h.onCellDoubleClicked(f)})},0),!u&&s?.shouldStartEditing(i,e)&&a?.getState(i)!=="editing"){const p=s?.isEditing(),m=s?.isRangeSelectionEnabledWhileEditing(),v=a?.getCellValidationModel().getCellValidationMap().size??0,w=a?.getRowValidationModel().getRowValidationMap().size??0;if(p&&(m||v>0||w>0))return;s?.startEditing(i,{event:e})}}onMouseDown(e){const{shiftKey:t}=e,n=e.target,{cellCtrl:i,beans:o}=this,{eventSvc:r,rangeSvc:s,rowNumbersSvc:a,focusSvc:l,gos:u,editSvc:h}=o,{column:f,rowNode:p,cellPosition:m}=i,v=eh(u,f,p,e),w=()=>{const S=i.createEvent(e,"cellMouseDown");S.isEventHandlingSuppressed=v,r.dispatchEvent(S)};if(v){w();return}if(this.isRightClickInExistingRange(e))return;const b=s&&!s.isEmpty(),y=this.containsWidget(n),R=zn(f);if(!(a&&R&&!a.handleMouseDownOnCell(m,e))){if(!t||!b){const S=h?.isEditing(i),F=u.get("enableCellTextSelection")&&e.defaultPrevented,I=(Ur()||F)&&!S&&!uc(n)&&!y;i.focusCell(I,e)}if(t&&b&&!l.isCellFocused(m)){e.preventDefault();const S=l.getFocusedCell();if(S){const{column:P,rowIndex:F,rowPinned:I}=S,L=!!h?.isRangeSelectionEnabledWhileEditing?.();h?.isEditing(S)&&!L&&h?.stopEditing(S),L||l.setFocusedCell({column:P,rowIndex:F,rowPinned:I,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0,sourceEvent:e})}}y||(s?.handleCellMouseDown(e,m),w())}}isRightClickInExistingRange(e){const{rangeSvc:t}=this.beans;if(t){const n=t.isCellInAnyRange(this.cellCtrl.cellPosition),i=PO(this.beans,e);if(n&&i)return!0}return!1}containsWidget(e){return As(e,"ag-selection-checkbox",3)||As(e,"ag-drag-handle",3)}onMouseOut(e){if(this.mouseStayingInsideCell(e))return;const{eventSvc:t,colHover:n}=this.beans;t.dispatchEvent(this.cellCtrl.createEvent(e,"cellMouseOut")),n?.clearMouseOver()}onMouseOver(e){if(this.mouseStayingInsideCell(e))return;const{eventSvc:t,colHover:n}=this.beans;t.dispatchEvent(this.cellCtrl.createEvent(e,"cellMouseOver")),n?.setMouseOver([this.column])}mouseStayingInsideCell(e){if(!e.target||!e.relatedTarget)return!1;const t=this.cellCtrl.eGui,n=t.contains(e.target),i=t.contains(e.relatedTarget);return n&&i}},eW=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();Lr(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,n=e.getColSpan(t),i=[];if(n===1)i.push(e);else{let o=e;const r=e.getPinned();for(let s=0;o&&s<n&&(i.push(o),o=this.beans.visibleCols.getColAfter(o),!(!o||Nt(o)||r!==o.getPinned()));s++);}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=Pt(this.colsSpanning):e=this.column,e.getLeft()}modifyLeftForPrintLayout(e){if(!this.cellCtrl.printLayout||this.column.getPinned()==="left")return e;const{visibleCols:t}=this.beans,n=t.getColsLeftWidth();if(this.column.getPinned()==="right"){const i=t.bodyWidth;return n+i+(e||0)}return n+(e||0)}_legacyApplyRowSpan(e){if(this.rowSpan===1&&!e)return;const n=Ls(this.beans)*this.rowSpan;this.eContent.style.height=`${n}px`,this.eContent.style.zIndex="1"}destroy(){super.destroy()}},tW="ag-cell",nW="ag-cell-auto-height",iW="ag-cell-normal-height",oW="ag-cell-focus",rW="ag-cell-first-right-pinned",sW="ag-cell-last-left-pinned",aW="ag-cell-not-inline-editing",lW="ag-cell-wrap-text",cW=0,sl=class extends X{constructor(e,t,n,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=n,this.gos=n.gos,this.editSvc=n.editSvc,this.hasEdit=!!n.editSvc;const{colId:o}=e;this.instanceId=o+"-"+cW++,this.createCellPosition(),this.updateAndFormatValue(!1)}addFeatures(){const{beans:e}=this;this.positionFeature=new eW(this,e),this.customStyleFeature=e.cellStyles?.createCellCustomStyleFeature(this),this.editStyleFeature=e.editSvc?.createCellStyleFeature(this),this.mouseListener=new J5(this,e,this.column),this.keyboardListener=new X5(this,e,this.rowNode,this.rowCtrl),this.enableTooltipFeature();const{rangeSvc:t}=e;t&&nr(e.gos)&&(this.rangeFeature=t.createCellRangeFeature(this)),zn(this.column)&&(this.rowResizeFeature=this.beans.rowNumbersSvc.createRowNumbersRowResizerFeature(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){this.tooltipFeature=this.beans.tooltipSvc?.enableCellTooltipFeature(this,e,t)}disableTooltipFeature(){this.tooltipFeature=this.beans.context.destroyBean(this.tooltipFeature)}enableEditorTooltipFeature(e){this.editorTooltipFeature&&this.disableEditorTooltipFeature(),this.editorTooltipFeature=this.beans.tooltipSvc?.setupCellEditorTooltip(this,e),Xr(this.beans)}disableEditorTooltipFeature(){this.editorTooltipFeature=this.beans.context.destroyBean(this.editorTooltipFeature)}setComp(e,t,n,i,o,r,s){this.comp=e,this.eGui=t,this.printLayout=o,s??(s=this),this.addDomData(s),this.addFeatures(),s.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,s),this.refreshFirstAndLastStyles(),this.checkFormulaError(),this.refreshAriaRowIndex(),this.refreshAriaColIndex(),this.positionFeature?.init(),this.customStyleFeature?.setComp(e),this.editStyleFeature?.setComp(e),this.tooltipFeature?.refreshTooltip(),this.keyboardListener?.init(),this.rangeFeature?.setComp(e),this.rowResizeFeature?.refreshRowResizer();const a=r?this.isCellEditable():void 0,l=!a&&this.hasEdit&&this.editSvc?.isEditing(this,{withOpenEditor:!0});if(a||l?this.editSvc?.startEditing(this,{startedEdit:!1,source:"api",silent:!0,continueEditing:!0,editable:a}):this.showValue(!1,!0),this.onCompAttachedFuncs.length){for(const u of this.onCompAttachedFuncs)u();this.onCompAttachedFuncs=[]}}checkFormulaError(){const e=!!this.beans.formula?.getFormulaError(this.column,this.rowNode);this.eGui.classList.toggle("formula-error",e)}setupAutoHeight(e,t){this.isAutoHeight=this.beans.rowAutoHeight?.setupCellAutoHeight(this,e,t)??!1}getCellAriaRole(){return this.column.getColDef().cellAriaRole??"gridcell"}isCellRenderer(){const e=this.column.getColDef();return e.cellRenderer!=null||e.cellRendererSelector!=null}getValueToDisplay(){return this.valueFormatted??this.value}getDeferLoadingCellRenderer(){const{beans:e,column:t}=this,{userCompFactory:n,ctrlsSvc:i,eventSvc:o}=e,r=t.getColDef(),s=this.createCellRendererParams();s.deferRender=!0;const a=T0(n,r,s);if(i.getGridBodyCtrl()?.scrollFeature?.isScrolling()){let l;const u=new Mt(f=>{l=f}),[h]=this.addManagedListeners(o,{bodyScrollEnd:()=>{l(),h()}});return{loadingComp:a,onReady:u}}return{loadingComp:a,onReady:Mt.resolve()}}showValue(e,t){const{beans:n,column:i,rowNode:o,rangeFeature:r}=this,{userCompFactory:s}=n;let a=this.getValueToDisplay(),l;const u=o.stub&&o.groupData?.[i.getId()]==null,h=i.getColDef();if(u||this.isCellRenderer()){const f=this.createCellRendererParams();!u||zn(i)?l=D0(s,h,f):l=T0(s,h,f)}if(!l&&!u&&n.findSvc?.isMatch(o,i)){const f=this.createCellRendererParams();l=D0(s,{...i.getColDef(),cellRenderer:"agFindCellRenderer"},f)}if(this.hasEdit&&this.editSvc.isBatchEditing()&&this.editSvc.isRowEditing(o,{checkSiblings:!0})){const f=this.editSvc.prepDetailsDuringBatch(this,{compDetails:l,valueToDisplay:a});f&&(f.compDetails?l=f.compDetails:f.valueToDisplay&&(a=f.valueToDisplay))}this.comp.setRenderDetails(l,a,e),this.customRowDragComp?.refreshVisibility(),!t&&r&&er(n,()=>r?.refreshRangeStyleAndHandle()),this.rowResizeFeature?.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()}getCellValueClass(){const e="ag-cell-value",t=this.column.getColDef().cellRenderer==="agCheckboxCellRenderer";let n="";return t&&(n=" ag-allow-overflow"),`${e}${n}`}isIncludeControl(e,t=!1){return(this.rowNode.rowPinned==null||t&&wh(this.rowNode))&&!!e}isCheckboxSelection(e){const{rowSelection:t,groupDisplayType:n}=this.beans.gridOptions,i=Bd(t),o=Wr(this.column);return n==="custom"&&i!=="selectionColumn"&&o?!1:e.checkboxSelection||o&&typeof t=="object"&&$a(t)}refreshShouldDestroy(){const e=this.column.getColDef(),t=this.includeSelection!=this.isIncludeControl(this.isCheckboxSelection(e),!0),n=this.includeRowDrag!=this.isIncludeControl(e.rowDrag),i=this.includeDndSource!=this.isIncludeControl(e.dndSource),o=this.isAutoHeight!=this.column.isAutoHeight();return t||n||i||o}onPopupEditorClosed(e){const{editSvc:t}=this.beans;if(!t?.isEditing(this,{withOpenEditor:!0}))return;const n=e instanceof KeyboardEvent,i=e instanceof MouseEvent,o=n&&e.key===q.ESCAPE;t.stopEditing(this,{source:t.isBatchEditing()?"ui":"api",cancel:o,event:n||i?e:void 0}),o&&this.focusCell(!0,e)}stopEditing(e=!1){const{editSvc:t}=this.beans;return t?.stopEditing(this,{cancel:e,source:t?.isBatchEditing()?"ui":"api"})??!1}createCellRendererParams(){const{value:e,valueFormatted:t,column:n,rowNode:i,comp:o,eGui:r,beans:{valueSvc:s,gos:a,editSvc:l}}=this;return We(a,{value:e,valueFormatted:t,getValue:()=>s.getValueForDisplay({column:n,node:i,from:"edit"}).value,setValue:h=>l?.setDataValue({rowNode:i,column:n},h)||i.setDataValue(n,h),formatValue:this.formatValue.bind(this),data:i.data,node:i,pinned:n.getPinned(),colDef:n.getColDef(),column:n,refreshCell:this.refreshCell.bind(this),eGridCell:r,eParentOfValue:o.getParentOfValue(),registerRowDragger:(h,f,p,m)=>this.registerRowDragger(h,f,m),setTooltip:(h,f)=>{a.assertModuleRegistered("Tooltip",3),this.tooltipFeature&&this.disableTooltipFeature(),this.enableTooltipFeature(h,f),this.tooltipFeature?.refreshTooltip()}})}onCellChanged(e){e.column===this.column&&this.refreshCell()}refreshOrDestroyCell(e){if(this.refreshShouldDestroy()?this.rowCtrl?.recreateCell(this):this.refreshCell(e),this.hasEdit&&this.editCompDetails){const{editSvc:t,comp:n}=this;!n?.getCellEditor()&&t.isEditing(this,{withOpenEditor:!0})&&t.startEditing(this,{startedEdit:!1,source:"api",silent:!0})}}refreshCell(e){const{editStyleFeature:t,customStyleFeature:n,rowCtrl:{rowEditStyleFeature:i},beans:{cellFlashSvc:o,filterManager:r},column:s,comp:a,suppressRefreshCell:l,tooltipFeature:u}=this;if(l)return;const{field:h,valueGetter:f,showRowGroup:p,enableCellChangeFlash:m}=s.getColDef(),v=h==null&&f==null&&p==null,w=e?.newData??!1,b=v||e&&(e.force||w),y=!!a,R=this.updateAndFormatValue(y),S=b||R;if(y){if(S){this.showValue(!!w,!1);const P=r?.isSuppressFlashingCellsBecauseFiltering();!e?.suppressFlash&&!P&&m&&o?.flashCell(this),t?.applyCellStyles?.(),n?.applyUserStyles(),n?.applyClassesFromColDef(),i?.applyRowStyles(),this.checkFormulaError()}u?.refreshTooltip(),n?.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,n=this.valueFormatted,{value:i,valueFormatted:o}=this.beans.valueSvc.getValueForDisplay({column:this.column,node:this.rowNode,includeValueFormatted:!0,from:"edit"});return this.value=i,this.valueFormatted=o,e?!this.valuesAreEqual(t,this.value)||this.valueFormatted!=n:!0}valuesAreEqual(e,t){const n=this.column.getColDef();return n.equals?n.equals(e,t):e===t}addDomData(e){const t=this.eGui;Os(this.beans.gos,t,th,this),e.addDestroyFunc(()=>Os(this.beans.gos,t,th,null))}createEvent(e,t){const{rowNode:n,column:i,value:o,beans:r}=this;return Y5(r,e,t,{rowNode:n,column:i},o)}processCharacter(e){this.keyboardListener?.processCharacter(e)}onKeyDown(e){this.keyboardListener?.onKeyDown(e)}onMouseEvent(e,t){this.mouseListener?.onMouseEvent(e,t)}getColSpanningList(){return this.positionFeature?.getColSpanningList()??[]}onLeftChanged(){this.comp&&this.positionFeature?.onLeftChanged()}onDisplayedColumnsChanged(){this.eGui&&(this.refreshAriaColIndex(),this.refreshFirstAndLastStyles())}refreshFirstAndLastStyles(){const{comp:e,column:t,beans:n}=this;cR(e,t,n.visibleCols)}refreshAriaColIndex(){const e=this.beans.visibleCols.getAriaColIndex(this.column);IS(this.eGui,e)}onWidthChanged(){return this.positionFeature?.onWidthChanged()}getRowPosition(){const{rowIndex:e,rowPinned:t}=this.cellPosition;return{rowIndex:e,rowPinned:t}}updateRangeBordersIfRangeCount(){this.comp&&this.rangeFeature?.updateRangeBordersIfRangeCount()}onCellSelectionChanged(){this.comp&&this.rangeFeature?.onCellSelectionChanged()}isRangeSelectionEnabled(){return this.rangeFeature!=null}focusCell(e=!1,t){const n=this.editSvc?.allowedFocusTargetOnValidation(this);n&&n!==this||this.beans.focusSvc.setFocusedCell({...this.getFocusedCellPosition(),forceBrowserFocus:e,sourceEvent:t})}restoreFocus(e=!1){const{beans:{editSvc:t,focusSvc:n},comp:i}=this;if(!i||t?.isEditing(this)||!this.isCellFocused()||!n.shouldTakeFocus())return;const o=()=>{if(!this.isAlive())return;const r=i.getFocusableElement();this.isCellFocused()&&r.focus({preventScroll:!0})};if(e){setTimeout(o,0);return}o()}onRowIndexChanged(){this.createCellPosition(),this.refreshAriaRowIndex(),this.onCellFocused(),this.restoreFocus(),this.rangeFeature?.onCellSelectionChanged(),this.rowResizeFeature?.refreshRowResizer()}onSuppressCellFocusChanged(e){const t=this.eGui;t&&ti(t,"tabindex",e?void 0:-1)}onFirstRightPinnedChanged(){if(!this.comp)return;const e=this.column.isFirstRightPinned();this.comp.toggleCss(rW,e)}onLastLeftPinnedChanged(){if(!this.comp)return;const e=this.column.isLastLeftPinned();this.comp.toggleCss(sW,e)}checkCellFocused(){return this.beans.focusSvc.isCellFocused(this.cellPosition)}isCellFocused(){const e=this.checkCellFocused();return this.hasBeenFocused||(this.hasBeenFocused=e),e}setupFocus(){this.restoreFocus(!0),this.onCellFocused(this.focusEventWhileNotReady??void 0)}onCellFocused(e){const{beans:t}=this;if(Ec(t))return;if(!this.comp){e&&(this.focusEventWhileNotReady=e);return}const n=this.isCellFocused(),i=t.editSvc?.isEditing(this)??!1;if(this.comp.toggleCss(oW,n),n&&(e?.forceBrowserFocus||!this.hasBrowserFocus()&&this.beans.focusSvc.shouldTakeFocus())){let o=this.comp.getFocusableElement();if(i){const s=Bs(o,null,!0);s.length&&(o=s[0])}const r=e?e.preventScrollOnBrowserFocus:!0;o.focus({preventScroll:r}),PL(t,o)}n&&this.focusEventWhileNotReady&&(this.focusEventWhileNotReady=null),n&&e&&this.rowCtrl.announceDescription()}createCellPosition(){const{rowIndex:e,rowPinned:t}=this.rowNode;this.cellPosition={rowIndex:e,rowPinned:Jo(t),column:this.column}}applyStaticCssClasses(){const{comp:e}=this;e.toggleCss(tW,!0),e.toggleCss(aW,!0);const t=this.column.isAutoHeight()==!0;e.toggleCss(nW,t),e.toggleCss(iW,!t)}onColumnHover(){this.beans.colHover?.onCellColumnHover(this.column,this.comp)}onColDefChanged(){this.comp&&(this.column.isTooltipEnabled()?(this.disableTooltipFeature(),this.enableTooltipFeature()):this.disableTooltipFeature(),this.setWrapText(),this.editSvc?.isEditing(this)?this.editSvc?.handleColDefChanged(this):this.refreshOrDestroyCell({force:!0,suppressFlash:!0}))}setWrapText(){const e=this.column.getColDef().wrapText==!0;this.comp.toggleCss(lW,e)}dispatchCellContextMenuEvent(e){const t=this.column.getColDef(),n=this.createEvent(e,"cellContextMenu"),{beans:i}=this;i.eventSvc.dispatchEvent(n),t.onCellContextMenu&&window.setTimeout(()=>{i.frameworkOverrides.wrapOutgoing(()=>{t.onCellContextMenu(n)})},0)}getCellRenderer(){return this.comp?.getCellRenderer()??null}destroy(){this.onCompAttachedFuncs=[],this.onEditorAttachedFuncs=[],this.isCellFocused()&&this.hasBrowserFocus()&&this.beans.focusSvc.attemptToRecoverFocus(),super.destroy()}hasBrowserFocus(){return this.eGui?.contains(It(this.beans))??!1}createSelectionCheckbox(){const e=this.beans.selectionSvc?.createCheckboxSelectionComponent();if(e)return this.beans.context.createBean(e),e.init({rowNode:this.rowNode,column:this.column}),e}createDndSource(){const e=this.beans.registry.createDynamicBean("dndSourceComp",!1,this.rowNode,this.column,this.eGui);return e&&this.beans.context.createBean(e),e}registerRowDragger(e,t,n){if(this.customRowDragComp){this.customRowDragComp.setDragElement(e,t);return}const i=this.createRowDragComp(e,t,n);i&&(this.customRowDragComp=i,this.addDestroyFunc(()=>{this.beans.context.destroyBean(i),this.customRowDragComp=null}),i.refreshVisibility())}createRowDragComp(e,t,n){const i=this.beans.rowDragSvc?.createRowDragCompForCell(this.rowNode,this.column,()=>this.value,e,t,n);if(i)return this.beans.context.createBean(i),i}cellEditorAttached(){for(const e of this.onEditorAttachedFuncs)e();this.onEditorAttachedFuncs=[]}setFocusedCellPosition(e){}getFocusedCellPosition(){return this.cellPosition}refreshAriaRowIndex(){if(!zn(this.column)||!this.eGui)return;const{ariaRowIndex:e}=this.rowCtrl;e!=null&&cc(this.eGui,e)}getRootElement(){return this.eGui}};function Qm(e,t,n,i,o,r){if(n==null&&t==null)return;const s={},a={},l=(u,h)=>{for(const f of u.split(" "))f.trim()!=""&&h(f)};if(n){const u=Object.keys(n);for(let h=0;h<u.length;h++){const f=u[h],p=n[f];let m;typeof p=="string"?m=e?e.evaluate(p,i):!0:typeof p=="function"&&(m=p(i)),l(f,v=>{m?s[v]=!0:a[v]=!0})}}if(t&&r)for(const u of Object.keys(t))l(u,h=>{s[h]||(a[h]=!0)});r&&Object.keys(a).forEach(r),Object.keys(s).forEach(o)}function HF(e){if(e.group)return e.level;const t=e.parent;return t?t.level+1:0}var uW=class extends X{constructor(){super(...arguments),this.beanName="rowStyleSvc"}processClassesFromGridOptions(e,t){const n=this.gos,i=s=>{if(typeof s=="string")e.push(s);else if(Array.isArray(s))for(const a of s)e.push(a)},o=n.get("rowClass");o&&i(o);const r=n.getCallback("getRowClass");if(r){const s={data:t.data,node:t,rowIndex:t.rowIndex},a=r(s);i(a)}}preProcessRowClassRules(e,t){this.processRowClassRules(t,n=>{e.push(n)},()=>{})}processRowClassRules(e,t,n){const{gos:i,expressionSvc:o}=this.beans,r=We(i,{data:e.data,node:e,rowIndex:e.rowIndex});Qm(o,void 0,i.get("rowClassRules"),r,t,n)}processStylesFromGridOptions(e){const t=this.gos,n=t.get("rowStyle"),i=t.getCallback("getRowStyle");let o;if(i){const r={data:e.data,node:e,rowIndex:e.rowIndex};o=i(r)}if(o||n)return Object.assign({},n,o)}},dW=0,bh=class extends X{constructor(e,t,n,i,o){super(),this.rowNode=e,this.useAnimationFrameForCreate=i,this.printLayout=o,this.focusEventWhileNotReady=null,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.ariaRowIndex=null,this.businessKey=null,this.beans=t,this.gos=t.gos,this.paginationPage=t.pagination?.getCurrentPage()??0,this.suppressRowTransform=this.gos.get("suppressRowTransform"),this.instanceId=e.id+"-"+dW++,this.rowId=ac(e.id),this.initRowBusinessKey(),this.rowFocused=t.focusSvc.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned),this.rowLevel=HF(this.rowNode),this.setRowType(),this.setAnimateFlags(n),this.rowStyles=this.processStylesFromGridOptions(),this.rowEditStyleFeature=t.editSvc?.createRowStyleFeature(this),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=ac(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,n,i){const{context:o,rowRenderer:r}=this.beans;i=Tc(this,o,i);const s={rowComp:e,element:t,containerType:n,compBean:i};this.allRowGuis.push(s),this.updateGui(n,s),this.initialiseRowComp(s);const a=this.rowNode,l=this.rowType==="FullWidthLoading"||a.stub,u=!a.data&&this.beans.rowModel.getType()==="infinite";!l&&!u&&!a.rowPinned&&r.dispatchFirstDataRenderedEvent(),this.setupFocus()}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":"";for(const n of this.allRowGuis)n.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),ks(t)&&this.rowNode.selectable&&this.onRowSelected(e),this.updateColumnLists(!this.useAnimationFrameForCreate);const n=e.rowComp,i=this.getInitialRowClasses(e.containerType);for(const o of i)n.toggleCss(o,!0);this.executeSlideAndFadeAnimations(e),this.rowNode.group&&pg(e.element,!!this.rowNode.expanded),this.setRowCompRowId(n),this.setRowCompRowBusinessKey(n),Os(t,e.element,nh,this),e.compBean.addDestroyFunc(()=>Os(t,e.element,nh,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=ac(this.rowNode.id);this.rowId=t,t!=null&&e.setRowId(t)}executeSlideAndFadeAnimations(e){const{containerType:t}=e;this.slideInAnimation[t]&&(Rg(()=>{this.onTopChanged()}),this.slideInAnimation[t]=!1),this.fadeInAnimation[t]&&(Rg(()=>{e.rowComp.toggleCss("ag-opacity-zero",!1)}),this.fadeInAnimation[t]=!1)}addRowDraggerToRow(e){const t=this.beans.rowDragSvc?.createRowDragCompForRow(this.rowNode,e.element);if(!t)return;const n=this.createBean(t,this.beans.context);this.rowDragComps.push(n),e.compBean.addDestroyFunc(()=>{this.rowDragComps=this.rowDragComps.filter(i=>i!==n),this.rowEditStyleFeature=this.destroyBean(this.rowEditStyleFeature,this.beans.context),this.destroyBean(n,this.beans.context)})}setupFullWidth(e){const t=this.getPinnedForContainer(e.containerType),n=this.createFullWidthCompDetails(e.element,t);e.rowComp.showFullWidth(n)}getFullWidthCellRenderers(){return this.gos.get("embedFullWidthRows")?this.allRowGuis.map(e=>e?.rowComp?.getFullWidthCellRenderer()):[this.fullWidthGui?.rowComp?.getFullWidthCellRenderer()]}executeProcessRowPostCreateFunc(){const e=this.gos.getCallback("processRowPostCreate");if(!e||!this.areAllContainersReady())return;const t={eRow:this.centerGui.element,ePinnedLeftRow:this.leftGui?this.leftGui.element:void 0,ePinnedRightRow:this.rightGui?this.rightGui.element:void 0,node:this.rowNode,rowIndex:this.rowNode.rowIndex,addRenderedRowListener:this.addEventListener.bind(this)};e(t)}areAllContainersReady(){const{leftGui:e,centerGui:t,rightGui:n,beans:{visibleCols:i}}=this,o=!!e||!i.isPinningLeft(),r=!!t,s=!!n||!i.isPinningRight();return o&&r&&s}isNodeFullWidthCell(){if(this.rowNode.detail)return!0;const e=this.beans.gos.getCallback("isFullWidthRow");return e?e({rowNode:this.rowNode}):!1}setRowType(){const{rowNode:e,gos:t,beans:{colModel:n}}=this,i=e.stub&&!t.get("suppressServerSideFullWidthLoadingRow")&&!t.get("groupHideOpenParents"),o=this.isNodeFullWidthCell(),r=t.get("masterDetail")&&e.detail,s=n.isPivotMode(),a=h0(t,e,s);i?this.rowType="FullWidthLoading":r?this.rowType="FullWidthDetail":o?this.rowType="FullWidth":a?this.rowType="FullWidthGroup":this.rowType="Normal"}updateColumnLists(e=!1,t=!1){if(this.isFullWidth())return;const{animationFrameSvc:n}=this.beans;if(!n?.active||e||this.printLayout){this.updateColumnListsImpl(t);return}this.updateColumnListsPending||(n.createTask(()=>{this.active&&this.updateColumnListsImpl(!0)},this.rowNode.rowIndex,"p1",!1),this.updateColumnListsPending=!0)}getNewCellCtrl(e){if(!this.beans.rowSpanSvc?.isCellSpanning(e,this.rowNode))return new sl(e,this.rowNode,this.beans,this)}isCorrectCtrlForSpan(e){return!this.beans.rowSpanSvc?.isCellSpanning(e.column,this.rowNode)}createCellCtrls(e,t,n=null){const i={list:[],map:{}},o=(u,h,f)=>{f!=null?i.list.splice(f,0,h):i.list.push(h),i.map[u]=h},r=[];for(const u of t){const h=u.getInstanceId();let f=e.map[h];f&&!this.isCorrectCtrlForSpan(f)&&(f.destroy(),f=void 0),f||(f=this.getNewCellCtrl(u)),f&&o(h,f)}for(const u of e.list){const h=u.column.getInstanceId();if(i.map[h]!=null)continue;!this.isCellEligibleToBeRemoved(u,n)?r.push([h,u]):u.destroy()}if(r.length)for(const[u,h]of r){const f=i.list.findIndex(m=>m.column.getLeft()>h.column.getLeft()),p=f===-1?void 0:Math.max(f-1,0);o(u,h,p)}const{focusSvc:s,visibleCols:a}=this.beans,l=s.getFocusedCell();if(l&&l.column.getPinned()==n){const u=l.column.getInstanceId();if(!i.map[u]&&a.allCols.includes(l.column)){const f=this.createFocusedCellCtrl();if(f){const p=i.list.findIndex(v=>v.column.getLeft()>f.column.getLeft()),m=p===-1?void 0:Math.max(p-1,0);o(u,f,m)}}}return i}createFocusedCellCtrl(){const{focusSvc:e,rowSpanSvc:t}=this.beans,n=e.getFocusedCell();if(!n)return;const i=t?.getCellSpan(n.column,this.rowNode);if(i){if(i.firstNode!==this.rowNode||!i.doesSpanContain(n))return}else if(!e.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned))return;return this.getNewCellCtrl(n.column)}updateColumnListsImpl(e){this.updateColumnListsPending=!1,this.createAllCellCtrls(),this.setCellCtrls(e)}setCellCtrls(e){for(const t of this.allRowGuis){const n=this.getCellCtrlsForContainer(t.containerType);t.rowComp.setCellCtrls(n,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 n=e.getColsWithinViewport(this.rowNode);this.centerCellCtrls=this.createCellCtrls(this.centerCellCtrls,n);const i=t.getLeftColsForRow(this.rowNode);this.leftCellCtrls=this.createCellCtrls(this.leftCellCtrls,i,"left");const o=t.getRightColsForRow(this.rowNode);this.rightCellCtrls=this.createCellCtrls(this.rightCellCtrls,o,"right")}}isCellEligibleToBeRemoved(e,t){const{column:o}=e;if(o.getPinned()!=t||!this.isCorrectCtrlForSpan(e))return!0;const{visibleCols:r,editSvc:s}=this.beans,a=s?.isEditing(e),l=e.isCellFocused();return a||l?!(r.allCols.indexOf(o)>=0):!0}getDomOrder(){return this.gos.get("ensureDomOrder")||yn(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=we(this.rowNode.oldRowTop),{visibleCols:n}=this.beans,i=n.isPinningLeft(),o=n.isPinningRight();if(t){const{slideInAnimation:r}=this;if(this.isFullWidth()&&!this.gos.get("embedFullWidthRows")){r.fullWidth=!0;return}r.center=!0,r.left=i,r.right=o}else{const{fadeInAnimation:r}=this;if(this.isFullWidth()&&!this.gos.get("embedFullWidthRows")){r.fullWidth=!0;return}r.center=!0,r.left=i,r.right=o}}isFullWidth(){return this.rowType!=="Normal"}refreshFullWidth(){const e=(s,a)=>s?s.rowComp.refreshFullWidth(()=>this.createFullWidthCompDetails(s.element,a).params):!0,t=e(this.fullWidthGui,null),n=e(this.centerGui,null),i=e(this.leftGui,"left"),o=e(this.rightGui,"right");return t&&n&&i&&o}addListeners(){const{beans:e,gos:t,rowNode:n}=this,{expansionSvc:i,eventSvc:o,context:r,rowSpanSvc:s}=e;this.addManagedListeners(this.rowNode,{heightChanged:()=>this.onRowHeightChanged(),rowSelected:()=>this.onRowSelected(),rowIndexChanged:this.onRowIndexChanged.bind(this),topChanged:this.onTopChanged.bind(this),...i?.getRowExpandedListeners(this)??{}}),n.detail&&this.addManagedListeners(n.parent,{dataChanged:this.onRowNodeDataChanged.bind(this)}),this.addManagedListeners(n,{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(o,{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()}),s&&this.addManagedListeners(s,{spannedCellsUpdated:({pinned:a})=>{a&&!n.rowPinned||this.updateColumnLists()}}),this.addDestroyFunc(()=>{this.rowDragComps=this.destroyBeans(this.rowDragComps,r),this.tooltipFeature=this.destroyBean(this.tooltipFeature,r),this.rowEditStyleFeature=this.destroyBean(this.rowEditStyleFeature,r)}),this.addManagedPropertyListeners(["rowStyle","getRowStyle","rowClass","getRowClass","rowClassRules"],this.postProcessCss.bind(this)),this.addManagedPropertyListener("rowDragEntireRow",()=>{if(t.get("rowDragEntireRow")){for(const l of this.allRowGuis)this.addRowDraggerToRow(l);return}this.rowDragComps=this.destroyBeans(this.rowDragComps,r)}),this.addListenersForCellComps()}addListenersForCellComps(){this.addManagedListeners(this.rowNode,{rowIndexChanged:()=>{for(const e of this.getAllCellCtrls())e.onRowIndexChanged()},cellChanged:e=>{for(const t of this.getAllCellCtrls())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}for(const n of this.getAllCellCtrls())n.refreshCell(e);for(const n of this.allRowGuis)this.setRowCompRowId(n.rowComp),this.updateRowBusinessKey(),this.setRowCompRowBusinessKey(n.rowComp);this.onRowSelected(),this.postProcessCss()}postProcessCss(){this.setStylesFromGridOptions(!0),this.postProcessClassesFromGridOptions(),this.postProcessRowClassRules(),this.rowEditStyleFeature?.applyRowStyles(),this.postProcessRowDragging()}onRowNodeHighlightChanged(){const e=this.beans.rowDropHighlightSvc,t=e?.row===this.rowNode?e.position:"none",n=t==="above",i=t==="inside",o=t==="below",r=t!=="none",s=n||o,a=this.rowNode.uiLevel,l=s&&a>0,u=l?a.toString():"0";for(const h of this.allRowGuis){const f=h.rowComp;f.toggleCss("ag-row-highlight-above",n),f.toggleCss("ag-row-highlight-inside",i),f.toggleCss("ag-row-highlight-below",o),f.toggleCss("ag-row-highlight-indent",l),r?h.element.style.setProperty("--ag-row-highlight-level",u):h.element.style.removeProperty("--ag-row-highlight-level")}}postProcessRowDragging(){const e=this.rowNode.dragging;for(const t of this.allRowGuis)t.rowComp.toggleCss("ag-row-dragging",e)}onDisplayedColumnsChanged(){this.updateColumnLists(!0),this.beans.rowAutoHeight?.requestCheckAutoHeight()}onVirtualColumnsChanged(){this.updateColumnLists(!1,!0)}getRowPosition(){return{rowPinned:Jo(this.rowNode.rowPinned),rowIndex:this.rowNode.rowIndex}}onKeyboardNavigate(e){const t=this.findFullWidthInfoForEvent(e);if(!t)return;const{rowGui:n,column:i}=t;if(!(n.element===e.target))return;const s=this.rowNode,{focusSvc:a,navigation:l}=this.beans,u=a.getFocusedCell(),h={rowIndex:s.rowIndex,rowPinned:s.rowPinned,column:u?.column??i};l?.navigateToNextCell(e,e.key,h,!0),e.preventDefault()}onTabKeyDown(e){if(e.defaultPrevented||sr(e))return;const t=this.allRowGuis.find(a=>a.element.contains(e.target)),n=t?t.element:null,i=n===e.target,o=It(this.beans);let r=!1;n&&o&&(r=n.contains(o)&&o.classList.contains("ag-cell"));let s=null;!i&&!r&&(s=Hs(this.beans,n,!1,e.shiftKey)),(this.isFullWidth()&&i||!s)&&this.beans.navigation?.onTabKeyDown(this,e)}getFullWidthElement(){return this.fullWidthGui?this.fullWidthGui.element:null}getRowYPosition(){const e=this.allRowGuis.find(t=>ki(t.element))?.element;return e?e.getBoundingClientRect().top:0}onSuppressCellFocusChanged(e){const t=this.isFullWidth()&&e?void 0:this.gos.get("tabIndex");for(const n of this.allRowGuis)ti(n.element,"tabindex",t)}setupFocus(){this.isFullWidth()&&(this.restoreFullWidthFocus(!0),this.onFullWidthRowFocused(this.focusEventWhileNotReady??void 0))}restoreFullWidthFocus(e=!1){const{focusSvc:t,editSvc:n}=this.beans;if(n?.isEditing(this)||!t.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned)||!t.shouldTakeFocus())return;const i=this.getFullWidthRowGuiForFocus();if(!i)return;const o=()=>{this.isAlive()&&t.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned)&&i.element.focus({preventScroll:!0})};if(e){setTimeout(o,0);return}o()}getFullWidthRowGuiForFocus(e){if(this.fullWidthGui)return this.fullWidthGui;const t=this.beans.focusSvc.getFocusedCell(),n=this.beans.colModel.getCol(e?.column??t?.column);if(!n)return;const i=n?.pinned;return i==="right"?this.rightGui:i==="left"?this.leftGui:this.centerGui}setFullWidthRowFocusedClass(e,t){this.forEachGui(void 0,n=>{n.element.classList.toggle("ag-full-width-focus",t&&n===e)})}onFullWidthRowFocused(e){const{focusSvc:t}=this.beans;if(!(this.isFullWidth()&&t.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned))){this.setFullWidthRowFocusedClass(void 0,!1);return}const i=this.getFullWidthRowGuiForFocus(e);if(!i){e&&(this.focusEventWhileNotReady=e),this.setFullWidthRowFocusedClass(void 0,!1);return}this.setFullWidthRowFocusedClass(i,!0),this.focusEventWhileNotReady=null,e?.forceBrowserFocus&&i.element.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 n={list:[],map:{}};for(const i of e.list)i!==t&&(n.list.push(i),n.map[i.column.getInstanceId()]=i);return n}onMouseEvent(e,t){switch(e){case"dblclick":this.onRowDblClick(t);break;case"click":this.onRowClick(t);break;case"pointerdown":case"touchstart":case"mousedown":this.onRowMouseDown(t);break}}createRowEvent(e,t){const{rowNode:n}=this;return We(this.gos,{type:e,node:n,data:n.data,rowIndex:n.rowIndex,rowPinned:n.rowPinned,event:t})}createRowEventWithSource(e,t){const n=this.createRowEvent(e,t);return n.source=this,n}onRowDblClick(e){if(sr(e))return;const t=this.createRowEventWithSource("rowDoubleClicked",e);t.isEventHandlingSuppressed=this.isSuppressMouseEvent(e),this.beans.eventSvc.dispatchEvent(t)}findFullWidthInfoForEvent(e){if(!e)return;const t=this.findFullWidthRowGui(e.target),n=this.getColumnForFullWidth(t);if(!(!t||!n))return{rowGui:t,column:n}}findFullWidthRowGui(e){return this.allRowGuis.find(t=>t.element.contains(e))}getColumnForFullWidth(e){const{visibleCols:t}=this.beans;switch(e?.containerType){case"center":return t.centerCols[0];case"left":return t.leftCols[0];case"right":return t.rightCols[0];default:return t.allCols[0]}}onRowMouseDown(e){if(this.lastMouseDownOnDragger=As(e.target,"ag-row-drag",3),!this.isFullWidth()||this.isSuppressMouseEvent(e))return;const{rangeSvc:t,focusSvc:n}=this.beans;t?.removeAllCellRanges();const i=this.findFullWidthInfoForEvent(e);if(!i)return;const{rowGui:o,column:r}=i,s=o.element,a=e.target,l=this.rowNode;let u=e.defaultPrevented||Ur();s&&s.contains(a)&&uc(a)&&(u=!1),n.setFocusedCell({rowIndex:l.rowIndex,column:r,rowPinned:l.rowPinned,forceBrowserFocus:u})}isSuppressMouseEvent(e){const{gos:t,rowNode:n}=this;if(this.isFullWidth()){const o=this.findFullWidthRowGui(e.target);return sN(t,o?.rowComp.getFullWidthCellRendererParams(),n,e)}const i=gm(t,e.target);return i!=null&&eh(t,i.column,n,e)}onRowClick(e){if(sr(e)||this.lastMouseDownOnDragger)return;const n=this.isSuppressMouseEvent(e),{eventSvc:i,selectionSvc:o}=this.beans,r=this.createRowEventWithSource("rowClicked",e);r.isEventHandlingSuppressed=n,i.dispatchEvent(r),!n&&o?.handleSelectionEvent(e,this.rowNode,"rowClicked")}setupDetailRowAutoHeight(e){this.rowType==="FullWidthDetail"&&this.beans.masterDetailSvc?.setupDetailRowAutoHeight(this,e)}createFullWidthCompDetails(e,t){const{gos:n,rowNode:i}=this,o=We(n,{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:(s,a,l,u)=>this.addFullWidthRowDragging(s,a,l,u),setTooltip:(s,a)=>{n.assertModuleRegistered("Tooltip",3),this.setupFullWidthRowTooltip(s,a)}}),r=this.beans.userCompFactory;switch(this.rowType){case"FullWidthDetail":return E_(r,o);case"FullWidthGroup":{const{value:s,valueFormatted:a}=this.beans.valueSvc.getValueForDisplay({node:this.rowNode,includeValueFormatted:!0,from:"edit"});return o.value=s,o.valueFormatted=a,P_(r,o)}case"FullWidthLoading":return x_(r,o);default:return F_(r,o)}}setupFullWidthRowTooltip(e,t){this.fullWidthGui&&(this.tooltipFeature=this.beans.tooltipSvc?.setupFullWidthRowTooltip(this.tooltipFeature,this,e,t))}addFullWidthRowDragging(e,t,n="",i){const{rowDragSvc:o,context:r}=this.beans;if(!o||!this.isFullWidth())return;const s=o.createRowDragComp(()=>n,this.rowNode,void 0,e,t,i);this.createBean(s,r),this.addDestroyFunc(()=>{this.destroyBean(s,r)})}onUiLevelChanged(){const e=HF(this.rowNode);if(this.rowLevel!=e){const t="ag-row-level-"+e,n="ag-row-level-"+this.rowLevel;for(const i of this.allRowGuis)i.rowComp.toggleCss(t,!0),i.rowComp.toggleCss(n,!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();if(this.firstRowOnPage!==e){this.firstRowOnPage=e;for(const n of this.allRowGuis)n.rowComp.toggleCss("ag-row-first",e)}if(this.lastRowOnPage!==t){this.lastRowOnPage=t;for(const n of this.allRowGuis)n.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(){const e=[];if(this.beans.rowStyleSvc?.processClassesFromGridOptions(e,this.rowNode),!!e.length)for(const t of e)for(const n of this.allRowGuis)n.rowComp.toggleCss(t,!0)}postProcessRowClassRules(){this.beans.rowStyleSvc?.processRowClassRules(this.rowNode,e=>{for(const t of this.allRowGuis)t.rowComp.toggleCss(e,!0)},e=>{for(const t of this.allRowGuis)t.rowComp.toggleCss(e,!1)})}setStylesFromGridOptions(e,t){e&&(this.rowStyles=this.processStylesFromGridOptions()),this.forEachGui(t,n=>n.rowComp.setUserStyles(this.rowStyles))}getPinnedForContainer(e){return e==="left"||e==="right"?e:null}getInitialRowClasses(e){const t=this.getPinnedForContainer(e),n=this.isFullWidth(),{rowNode:i,beans:o}=this,r=[];r.push("ag-row"),r.push(this.rowFocused?"ag-row-focus":"ag-row-no-focus"),this.fadeInAnimation[e]&&r.push("ag-opacity-zero"),r.push(i.rowIndex%2===0?"ag-row-even":"ag-row-odd"),i.isRowPinned()&&(r.push("ag-row-pinned"),o.pinnedRowModel?.isManual()&&r.push("ag-row-pinned-manual")),!i.isRowPinned()&&i.pinnedSibling&&r.push("ag-row-pinned-source"),i.isSelected()&&r.push("ag-row-selected"),i.footer&&r.push("ag-row-footer"),r.push("ag-row-level-"+this.rowLevel),i.stub&&r.push("ag-row-loading"),n&&r.push("ag-full-width-row"),o.expansionSvc?.addExpandedCss(r,i),i.dragging&&r.push("ag-row-dragging");const{rowStyleSvc:s}=o;return s&&(s.processClassesFromGridOptions(r,i),s.preProcessRowClassRules(r,i)),r.push(this.printLayout?"ag-row-position-relative":"ag-row-position-absolute"),this.isFirstRowOnPage()&&r.push("ag-row-first"),this.isLastRowOnPage()&&r.push("ag-row-last"),n&&(t==="left"&&r.push("ag-cell-last-left-pinned"),t==="right"&&r.push("ag-cell-first-right-pinned")),r}processStylesFromGridOptions(){return this.beans.rowStyleSvc?.processStylesFromGridOptions(this.rowNode)??this.emptyStyle}onRowSelected(e){this.beans.selectionSvc?.onRowCtrlSelected(this,t=>{(t===this.centerGui||t===this.fullWidthGui)&&this.announceDescription()},e)}announceDescription(){this.beans.selectionSvc?.announceAriaRowSelection(this.rowNode)}addHoverFunctionality(e){if(!this.active)return;const{element:t,compBean:n}=e,{rowNode:i,beans:o,gos:r}=this;n.addManagedListeners(t,{pointerenter:s=>{s.pointerType==="mouse"&&i.dispatchRowEvent("mouseEnter")},pointerleave:s=>{s.pointerType==="mouse"&&i.dispatchRowEvent("mouseLeave")}}),n.addManagedListeners(i,{mouseEnter:()=>{!o.dragSvc?.dragging&&!r.get("suppressRowHoverHighlight")&&(t.classList.add("ag-row-hover"),i.setHovered(!0))},mouseLeave:()=>{this.resetHoveredStatus(t)}})}resetHoveredStatus(e){const t=e?[e]:this.allRowGuis.map(n=>n.element);for(const n of t)n.classList.remove("ag-row-hover");this.rowNode.setHovered(!1)}roundRowTopToBounds(e){const t=this.beans.ctrlsSvc.getScrollFeature().getApproximateVScollPosition(),n=this.applyPaginationOffset(t.top,!0)-100,i=this.applyPaginationOffset(t.bottom,!0)+100;return Math.min(Math.max(n,e),i)}forEachGui(e,t){if(e)t(e);else for(const n of this.allRowGuis)t(n)}isRowRendered(){return this.allRowGuis.length>0}onRowHeightChanged(e){if(this.rowNode.rowHeight==null)return;const t=this.rowNode.rowHeight,n=this.beans.environment.getDefaultRowHeight(),o=a0(this.gos)?Gr(this.beans,this.rowNode).height:void 0,r=o?`${Math.min(n,o)-2}px`:void 0;this.forEachGui(e,s=>{s.element.style.height=`${t}px`,r&&s.element.style.setProperty("--ag-line-height",r)})}destroyFirstPass(e=!1){this.active=!1;const{rowNode:t}=this;if(!e&&za(this.gos)&&!t.sticky)if(t.rowTop!=null){const o=this.roundRowTopToBounds(t.rowTop);this.setRowTop(o)}else for(const o of this.allRowGuis)o.rowComp.toggleCss("ag-opacity-zero",!0);this.fullWidthGui?.element.contains(It(this.beans))&&this.beans.focusSvc.attemptToRecoverFocus(),t.setHovered(!1);const n=this.createRowEvent("virtualRowRemoved");this.dispatchLocalEvent(n),this.beans.eventSvc.dispatchEvent(n),super.destroy()}destroySecondPass(){this.allRowGuis.length=0;const e=t=>{for(const n of t.list)n.destroy();return{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(){const e=this.beans.pagination?.getCurrentPage()??0;this.paginationPage!==e&&(this.paginationPage=e,this.onTopChanged()),this.refreshFirstAndLastRowStyles()}onTopChanged(){this.setRowTop(this.rowNode.rowTop)}onPaginationPixelOffsetChanged(){this.onTopChanged()}applyPaginationOffset(e,t=!1){if(this.rowNode.isRowPinned()||this.rowNode.sticky)return e;const n=this.beans.pageBounds.getPixelOffset();return e+n*(t?1:-1)}setRowTop(e){if(!this.printLayout&&we(e)){const t=this.applyPaginationOffset(e),o=`${this.rowNode.isRowPinned()||this.rowNode.sticky?t:this.beans.rowContainerHeight.getRealPixelPosition(t)}px`;this.setRowTopStyle(o)}}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 n;if(t.sticky)n=t.stickyRowTop;else{const i=this.slideInAnimation[e]?this.roundRowTopToBounds(t.oldRowTop):t.rowTop,o=this.applyPaginationOffset(i);n=t.isRowPinned()?o:this.beans.rowContainerHeight.getRealPixelPosition(o)}return n+"px"}setRowTopStyle(e){for(const t of this.allRowGuis)this.suppressRowTransform?t.rowComp.setTop(e):t.rowComp.setTransform(`translateY(${e})`)}getCellCtrl(e,t=!1){let n=null;for(const i of this.getAllCellCtrls())i.column==e&&(n=i);if(n!=null||t)return n;for(const i of this.getAllCellCtrls())i?.getColSpanningList().indexOf(e)>=0&&(n=i);return n}onRowIndexChanged(){this.rowNode.rowIndex!=null&&(this.onCellFocusChanged(),this.updateRowIndexes(),this.postProcessCss())}updateRowIndexes(e){const t=this.rowNode.getRowIndexString();if(t===null)return;const n=(this.beans.ctrlsSvc.getHeaderRowContainerCtrl()?.getRowCount()??0)+(this.beans.filterManager?.getHeaderRowCount()??0),i=this.rowNode.rowIndex%2===0,o=this.ariaRowIndex=n+this.rowNode.rowIndex+1;this.forEachGui(e,r=>{r.rowComp.setRowIndex(t),r.rowComp.toggleCss("ag-row-even",i),r.rowComp.toggleCss("ag-row-odd",!i),cc(r.element,o)})}},hW=class extends X{constructor(){super(),this.beanName="navigation",this.onPageDown=$S(this.onPageDown,100),this.onPageUp=$S(this.onPageUp,100)}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.gridBodyCon=e.gridBodyCtrl})}handlePageScrollingKey(e,t=!1){const n=e.key,i=e.altKey,o=e.ctrlKey||e.metaKey,r=!!this.beans.rangeSvc&&e.shiftKey,s=pB(this.gos,e);let a=!1;switch(n){case q.PAGE_HOME:case q.PAGE_END:!o&&!i&&(this.onHomeOrEndKey(n),a=!0);break;case q.LEFT:case q.RIGHT:case q.UP:case q.DOWN:if(!s)return!1;o&&!i&&!r&&(this.onCtrlUpDownLeftRight(n,s),a=!0);break;case q.PAGE_DOWN:case q.PAGE_UP:!o&&!i&&(a=this.handlePageUpDown(n,s,t));break}return a&&e.preventDefault(),a}handlePageUpDown(e,t,n){return n&&(t=this.beans.focusSvc.getFocusedCell()),t?(e===q.PAGE_UP?this.onPageUp(t):this.onPageDown(t),!0):!1}navigateTo({scrollIndex:e,scrollType:t,scrollColumn:n,focusIndex:i,focusColumn:o,isAsync:r,rowPinned:s}){const{scrollFeature:a}=this.gridBodyCon;we(n)&&!n.isPinned()&&a.ensureColumnVisible(n),we(e)&&a.ensureIndexVisible(e,t),r||a.ensureIndexVisible(i);const{focusSvc:l}=this.beans;l.setFocusedCell({rowIndex:i,column:o,rowPinned:s,forceBrowserFocus:!0}),this.setRangeToCellIfSupported({rowIndex:i,rowPinned:s,column:o})}onPageDown(e){const t=this.beans,n=Ym(t),i=this.getViewportHeight(),{pageBounds:o,rowModel:r,rowAutoHeight:s}=t,a=o.getPixelOffset(),l=n.top+i,u=r.getRowIndexAtPixel(l+a);s?.active?this.navigateToNextPageWithAutoHeight(e,u):this.navigateToNextPage(e,u)}onPageUp(e){const t=this.beans,n=Ym(t),{pageBounds:i,rowModel:o,rowAutoHeight:r}=t,s=i.getPixelOffset(),a=n.top,l=o.getRowIndexAtPixel(a+s);r?.active?this.navigateToNextPageWithAutoHeight(e,l,!0):this.navigateToNextPage(e,l,!0)}navigateToNextPage(e,t,n=!1){const{pageBounds:i,rowModel:o}=this.beans,r=this.getViewportHeight(),s=i.getFirstRow(),a=i.getLastRow(),l=i.getPixelOffset(),u=o.getRow(e.rowIndex),h=n?u?.rowHeight-r-l:r-l,f=u?.rowTop+h;let p=o.getRowIndexAtPixel(f+l);if(p===e.rowIndex){const v=n?-1:1;t=p=e.rowIndex+v}let m;n?(m="bottom",p<s&&(p=s),t<s&&(t=s)):(m="top",p>a&&(p=a),t>a&&(t=a)),this.isRowTallerThanView(o.getRow(p))&&(t=p,m="top"),this.navigateTo({scrollIndex:t,scrollType:m,scrollColumn:null,focusIndex:p,focusColumn:e.column})}navigateToNextPageWithAutoHeight(e,t,n=!1){this.navigateTo({scrollIndex:t,scrollType:n?"bottom":"top",scrollColumn:null,focusIndex:t,focusColumn:e.column}),setTimeout(()=>{const i=this.getNextFocusIndexForAutoHeight(e,n);this.navigateTo({scrollIndex:t,scrollType:n?"bottom":"top",scrollColumn:null,focusIndex:i,focusColumn:e.column,isAsync:!0})},50)}getNextFocusIndexForAutoHeight(e,t=!1){const n=t?-1:1,i=this.getViewportHeight(),{pageBounds:o,rowModel:r}=this.beans,s=o.getLastRow();let a=0,l=e.rowIndex;for(;l>=0&&l<=s;){const u=r.getRow(l);if(u){const h=u.rowHeight??0;if(a+h>i)break;a+=h}l+=n}return Math.max(0,Math.min(l,s))}getViewportHeight(){const e=this.beans,t=Ym(e),n=this.beans.scrollVisibleSvc.getScrollbarWidth();let i=t.bottom-t.top;return e.ctrlsSvc.get("center").isHorizontalScrollShowing()&&(i-=n),i}isRowTallerThanView(e){if(!e)return!1;const t=e.rowHeight;return typeof t!="number"?!1:t>this.getViewportHeight()}onCtrlUpDownLeftRight(e,t){const n=this.beans.cellNavigation.getNextCellToFocus(e,t,!0);if(!n)return;const i=this.getNormalisedPosition(n),{rowIndex:o,rowPinned:r,column:s}=i??n,a=s;this.navigateTo({scrollIndex:o,scrollType:null,scrollColumn:a,focusIndex:o,focusColumn:a,rowPinned:r})}onHomeOrEndKey(e){const t=e===q.PAGE_HOME,{visibleCols:n,pageBounds:i,rowModel:o}=this.beans,r=n.allCols,s=t?i.getFirstRow():i.getLastRow(),a=o.getRow(s);if(!a)return;const l=(t?r:[...r].reverse()).find(u=>!u.isSuppressNavigable(a)&&!zn(u));l&&this.navigateTo({scrollIndex:s,scrollType:null,scrollColumn:l,focusIndex:s,focusColumn:l})}onTabKeyDown(e,t){const n=t.shiftKey,i=this.tabToNextCellCommon(e,n,t),o=this.beans,{ctrlsSvc:r,pageBounds:s,focusSvc:a,gos:l}=o;if(i!==!1){i?t.preventDefault():i===null&&r.get("gridCtrl").allowFocusForNextCoreContainer(n);return}if(n){const{rowIndex:u,rowPinned:h}=e.getRowPosition();(h?u===0:u===s.getFirstRow())&&(l.get("headerHeight")===0||no(o)?Xa(o,!0,!0):(t.preventDefault(),a.focusPreviousFromFirstCell(t)))}else e instanceof sl&&e.focusCell(!0),(a.focusOverlay(!1)||Xa(o,n))&&t.preventDefault()}tabToNextCell(e,t){const n=this.beans,{focusSvc:i,rowRenderer:o}=n,r=i.getFocusedCell();if(!r)return!1;let s=Za(n,r);return!s&&(s=o.getRowByPosition(r),!s?.isFullWidth())?!1:!!this.tabToNextCellCommon(s,e,t,"api")}tabToNextCellCommon(e,t,n,i="ui"){const{editSvc:o,focusSvc:r}=this.beans;let s;const a=e instanceof sl?e:e.getAllCellCtrls()?.[0];return o?.isEditing()?s=o?.moveToNextCell(a,t,n,i):s=this.moveToNextCellNotEditing(e,t,n),s===null?s:s||!!r.focusedHeader}moveToNextCellNotEditing(e,t,n){const i=this.beans.visibleCols.allCols;let o;if(e instanceof bh){if(o={...e.getRowPosition(),column:t?i[0]:Pt(i)},this.gos.get("embedFullWidthRows")&&n){const s=e.findFullWidthInfoForEvent(n);s&&(o.column=s.column)}}else o=e.getFocusedCellPosition();const r=this.findNextCellToFocusOn(o,{backwards:t,startEditing:!1});if(r===!1)return null;if(r instanceof sl)r.focusCell(!0);else if(r)return this.tryToFocusFullWidthRow(r,t);return we(r)}findNextCellToFocusOn(e,{backwards:t,startEditing:n,skipToNextEditableCell:i}){let o=e;const r=this.beans,{cellNavigation:s,gos:a,focusSvc:l,rowRenderer:u}=r;for(;;){e!==o&&(e=o),t||(o=this.getLastCellOfColSpan(o)),o=s.getNextTabbedCell(o,t);const h=a.getCallback("tabToNextCell");if(we(h)){const v=h({backwards:t,editing:n,previousCellPosition:e,nextCellPosition:o||null});if(v===!0)o=e;else{if(v===!1)return!1;o={rowIndex:v.rowIndex,column:v.column,rowPinned:v.rowPinned}}}if(!o)return null;if(o.rowIndex<0){const m=Oi(r);return l.focusHeaderPosition({headerPosition:{headerRowIndex:m+o.rowIndex,column:o.column},fromCell:!0}),null}const f=a.get("editType")==="fullRow";if(n&&(!f||i)&&!this.isCellEditable(o))continue;this.ensureCellVisible(o);const p=Za(r,o);if(!p){const m=u.getRowByPosition(o);if(!m||!m.isFullWidth()||n)continue;return{...m.getRowPosition(),column:o?.column}}if(!s.isSuppressNavigable(p.column,p.rowNode))return p.setFocusedCellPosition(o),this.setRangeToCellIfSupported(o),p}}isCellEditable(e){const t=this.lookupRowNodeForCell(e);return t?e.column.isCellEditable(t):!1}lookupRowNodeForCell({rowIndex:e,rowPinned:t}){const{pinnedRowModel:n,rowModel:i}=this.beans;return t==="top"?n?.getPinnedTopRow(e):t==="bottom"?n?.getPinnedBottomRow(e):i.getRow(e)}navigateToNextCell(e,t,n,i){let o=n,r=!1;const s=this.beans,{cellNavigation:a,focusSvc:l,gos:u}=s;for(;o&&(o===n||!this.isValidNavigateCell(o));)u.get("enableRtl")?t===q.LEFT&&(o=this.getLastCellOfColSpan(o)):t===q.RIGHT&&(o=this.getLastCellOfColSpan(o)),o=a.getNextCellToFocus(t,o),r=Nt(o);if(r&&e&&e.key===q.UP&&(o={rowIndex:-1,rowPinned:null,column:n.column}),i){const f=u.getCallback("navigateToNextCell");if(we(f)){const m=f({key:t,previousCellPosition:n,nextCellPosition:o||null,event:e});we(m)?o={rowPinned:m.rowPinned,rowIndex:m.rowIndex,column:m.column}:o=null}}if(!o)return;if(o.rowIndex<0){const f=Oi(s);l.focusHeaderPosition({headerPosition:{headerRowIndex:f+o.rowIndex,column:o.column??n.column},event:e||void 0,fromCell:!0});return}const h=this.getNormalisedPosition(o);h?this.focusPosition(h):this.tryToFocusFullWidthRow(o)}getNormalisedPosition(e){if(!!this.beans.spannedRowRenderer?.getCellByPosition(e))return e;this.ensureCellVisible(e);const n=Za(this.beans,e);return n?(e=n.getFocusedCellPosition(),this.ensureCellVisible(e),e):null}tryToFocusFullWidthRow(e,t){const{visibleCols:n,rowRenderer:i,focusSvc:o,eventSvc:r}=this.beans,s=n.allCols;if(!i.getRowByPosition(e)?.isFullWidth())return!1;const l=o.getFocusedCell(),u={rowIndex:e.rowIndex,rowPinned:e.rowPinned,column:e.column||(t?Pt(s):s[0])};this.focusPosition(u);const h=t??(l!=null&&h2(u,l));return r.dispatchEvent({type:"fullWidthRowFocused",rowIndex:u.rowIndex,rowPinned:u.rowPinned,column:u.column,isFullWidthCell:!0,fromBelow:h}),!0}focusPosition(e){const{focusSvc:t}=this.beans;t.setFocusedCell({rowIndex:e.rowIndex,column:e.column,rowPinned:e.rowPinned,forceBrowserFocus:!0}),this.setRangeToCellIfSupported(e)}setRangeToCellIfSupported(e){zn(e.column)||this.beans.rangeSvc?.setRangeToCell(e)}isValidNavigateCell(e){return!!Do(this.beans,e)}getLastCellOfColSpan(e){const t=Za(this.beans,e);if(!t)return e;const n=t.getColSpanningList();return n.length===1?e:{rowIndex:e.rowIndex,column:Pt(n),rowPinned:e.rowPinned}}ensureCellVisible(e){const t=c0(this.gos),n=this.beans.rowModel.getRow(e.rowIndex),i=t&&n?.sticky,{scrollFeature:o}=this.gridBodyCon;!i&&Nt(e.rowPinned)&&o.ensureIndexVisible(e.rowIndex),e.column.isPinned()||o.ensureColumnVisible(e.column)}ensureColumnVisible(e){const t=this.gridBodyCon.scrollFeature;e.isPinned()||t.ensureColumnVisible(e)}ensureRowVisible(e){this.gridBodyCon.scrollFeature.ensureIndexVisible(e)}};function Ym(e){return e.ctrlsSvc.getScrollFeature().getVScrollPosition()}var fW={moduleName:"KeyboardNavigation",version:ve,beans:[hW,A5,$V],apiFunctions:{getFocusedCell:I5,clearFocusedCell:M5,setFocusedCell:k5,setFocusedHeader:_5,tabToNextCell:L5,tabToPreviousCell:O5}},pW=class extends X{constructor(){super(...arguments),this.beanName="pageBoundsListener"}postConstruct(){this.addManagedEventListeners({modelUpdated:this.onModelUpdated.bind(this),recalculateRowBounds:this.calculatePages.bind(this)}),this.onModelUpdated()}onModelUpdated(e){this.calculatePages(),this.eventSvc.dispatchEvent({type:"paginationChanged",animate:e?.animate??!1,newData:e?.newData??!1,newPage:e?.newPage??!1,newPageSize:e?.newPageSize??!1,keepRenderedRows:e?.keepRenderedRows??!1})}calculatePages(){const{pageBounds:e,pagination:t,rowModel:n}=this.beans;t?t.calculatePages():e.calculateBounds(0,n.getRowCount()-1)}},gW=class extends X{constructor(){super(...arguments),this.beanName="pageBounds",this.pixelOffset=0}getFirstRow(){return this.topRowBounds?.rowIndex??-1}getLastRow(){return this.bottomRowBounds?.rowIndex??-1}getCurrentPageHeight(){const{topRowBounds:e,bottomRowBounds:t}=this;return!e||!t?0:Math.max(t.rowTop+t.rowHeight-e.rowTop,0)}getCurrentPagePixelRange(){const{topRowBounds:e,bottomRowBounds:t}=this,n=e?.rowTop??0,i=t?t.rowTop+t.rowHeight:0;return{pageFirstPixel:n,pageLastPixel:i}}calculateBounds(e,t){const{rowModel:n}=this.beans,i=n.getRowBounds(e);i&&(i.rowIndex=e),this.topRowBounds=i;const o=n.getRowBounds(t);o&&(o.rowIndex=t),this.bottomRowBounds=o,this.calculatePixelOffset()}getPixelOffset(){return this.pixelOffset}calculatePixelOffset(){const e=this.topRowBounds?.rowTop??0;this.pixelOffset!==e&&(this.pixelOffset=e,this.eventSvc.dispatchEvent({type:"paginationPixelOffsetChanged"}))}},mW=".ag-pinned-left-floating-bottom,.ag-pinned-left-floating-top,.ag-pinned-right-floating-bottom,.ag-pinned-right-floating-top{min-width:0;overflow:hidden;position:relative}.ag-pinned-left-sticky-top,.ag-pinned-right-sticky-top{height:100%;overflow:hidden;position:relative}.ag-sticky-bottom-full-width-container,.ag-sticky-top-full-width-container{height:100%;overflow:hidden;width:100%}.ag-pinned-left-header,.ag-pinned-right-header{display:inline-block;height:100%;overflow:hidden;position:relative}.ag-body-horizontal-scroll:not(.ag-scrollbar-invisible){.ag-horizontal-left-spacer:not(.ag-scroller-corner){border-right:var(--ag-pinned-column-border)}.ag-horizontal-right-spacer:not(.ag-scroller-corner){border-left:var(--ag-pinned-column-border)}}.ag-pinned-right-header{border-left:var(--ag-pinned-column-border)}.ag-pinned-left-header{border-right:var(--ag-pinned-column-border)}.ag-cell.ag-cell-first-right-pinned:not(.ag-cell-range-left,.ag-cell-range-single-cell,.ag-cell-focus:not(.ag-cell-range-selected):focus-within){border-left:var(--ag-pinned-column-border)}.ag-cell.ag-cell-last-left-pinned:not(.ag-cell-range-right,.ag-cell-range-single-cell,.ag-cell-focus:not(.ag-cell-range-selected):focus-within){border-right:var(--ag-pinned-column-border)}.ag-pinned-left-header .ag-header-cell-resize:after{left:calc(50% - var(--ag-header-column-resize-handle-width))}.ag-pinned-right-header .ag-header-cell-resize:after{left:50%}.ag-pinned-left-header .ag-header-cell-resize{right:-3px}.ag-pinned-right-header .ag-header-cell-resize{left:-3px}",vW=class extends X{constructor(e,t){super(),this.isLeft=e,this.elements=t,this.getWidth=e?()=>this.beans.pinnedCols.leftWidth:()=>this.beans.pinnedCols.rightWidth}postConstruct(){this.addManagedEventListeners({[`${this.isLeft?"left":"right"}PinnedWidthChanged`]:this.onPinnedWidthChanged.bind(this)})}onPinnedWidthChanged(){const e=this.getWidth(),t=e>0;for(const n of this.elements)n&&(bt(n,t),xo(n,e))}},CW=class extends X{constructor(){super(...arguments),this.beanName="pinnedCols"}postConstruct(){this.beans.ctrlsSvc.whenReady(this,t=>{this.gridBodyCtrl=t.gridBodyCtrl});const e=this.checkContainerWidths.bind(this);this.addManagedEventListeners({displayedColumnsChanged:e,displayedColumnsWidthChanged:e}),this.addManagedPropertyListener("domLayout",e)}checkContainerWidths(){const{gos:e,visibleCols:t,eventSvc:n}=this.beans,i=yn(e,"print"),o=i?0:t.getColsLeftWidth(),r=i?0:t.getDisplayedColumnsRightWidth();o!=this.leftWidth&&(this.leftWidth=o,n.dispatchEvent({type:"leftPinnedWidthChanged"})),r!=this.rightWidth&&(this.rightWidth=r,n.dispatchEvent({type:"rightPinnedWidthChanged"}))}keepPinnedColumnsNarrowerThanViewport(){const e=this.gridBodyCtrl.eBodyViewport,t=hc(e);if(t<=50)return;const n=this.getPinnedColumnsOverflowingViewport(t-50),i=this.gos.getCallback("processUnpinnedColumns"),{columns:o,hasLockedPinned:r}=n;let s=o;!s.length&&!r||(i&&(s=i({columns:s,viewportWidth:t})),s?.length&&(s=s.filter(a=>!zn(a)),this.setColsPinned(s,null,"viewportSizeFeature")))}createPinnedWidthFeature(e,...t){return new vW(e,t)}setColsPinned(e,t,n){const{colModel:i,colAnimation:o,visibleCols:r,gos:s}=this.beans;if(!i.cols||!e?.length)return;if(yn(s,"print")){se(37);return}o?.start();let a;t===!0||t==="left"?a="left":t==="right"?a="right":a=null;const l=[];for(const u of e){if(!u)continue;const h=i.getCol(u);h&&h.getPinned()!==a&&(this.setColPinned(h,a),l.push(h))}l.length&&(r.refresh(n),qR(this.eventSvc,l,n)),o?.finish()}initCol(e){const{pinned:t,initialPinned:n}=e.colDef;t!==void 0?this.setColPinned(e,t):this.setColPinned(e,n)}setColPinned(e,t){t===!0||t==="left"?e.pinned="left":t==="right"?e.pinned="right":e.pinned=null,e.dispatchStateUpdatedEvent("pinned")}setupHeaderPinnedWidth(e){const{scrollVisibleSvc:t}=this.beans;if(e.pinned==null)return;const n=e.pinned==="left",i=e.pinned==="right";e.hidden=!0;const o=()=>{const r=n?this.leftWidth:this.rightWidth;if(r==null)return;const s=r==0,a=e.hidden!==s,l=this.gos.get("enableRtl"),u=t.getScrollbarWidth(),f=t.verticalScrollShowing&&(l&&n||!l&&i)?r+u:r;e.comp.setPinnedContainerWidth(`${f}px`),e.comp.setDisplayed(!s),a&&(e.hidden=s,e.refresh())};e.addManagedEventListeners({leftPinnedWidthChanged:o,rightPinnedWidthChanged:o,scrollVisibilityChanged:o,scrollbarWidthChanged:o})}getHeaderResizeDiff(e,t){if(t.getPinned()){const{leftWidth:i,rightWidth:o}=this,r=hc(this.beans.ctrlsSvc.getGridBodyCtrl().eBodyViewport)-50;if(i+o+e>r)if(r>i+o)e=r-i-o;else return 0}return e}getPinnedColumnsOverflowingViewport(e){const t=this.rightWidth??0,n=this.leftWidth??0,i=t+n;let o=!1;if(i<e)return{columns:[],hasLockedPinned:o};const{visibleCols:r}=this.beans,s=[...r.leftCols],a=[...r.rightCols];let l=0,u=0;const h=0,f=[];let p=i-h-e;for(;(u<s.length||l<a.length)&&p>0;){if(l<a.length){const m=a[l++];if(m.colDef.lockPinned){o=!0;continue}p-=m.getActualWidth(),f.push(m)}if(u<s.length&&p>0){const m=s[u++];if(m.colDef.lockPinned){o=!0;continue}p-=m.getActualWidth(),f.push(m)}}return{columns:f,hasLockedPinned:o}}},wW={moduleName:"PinnedColumn",version:ve,beans:[CW],css:[mW]},bW=class extends Vn{constructor(){super(),this.beanName="ariaAnnounce",this.descriptionContainer=null,this.pendingAnnouncements=new Map,this.lastAnnouncement="",this.updateAnnouncement=hn(this,this.updateAnnouncement.bind(this),200)}postConstruct(){const e=this.beans,t=nn(e),n=this.descriptionContainer=t.createElement("div");n.classList.add("ag-aria-description-container"),TS(n,"polite"),cL(n,"additions text"),lL(n,!0),e.eRootDiv.appendChild(n)}announceValue(e,t){this.pendingAnnouncements.set(t,e),this.updateAnnouncement()}updateAnnouncement(){if(!this.descriptionContainer)return;const e=Array.from(this.pendingAnnouncements.values()).join(". ");this.pendingAnnouncements.clear(),this.descriptionContainer.textContent="",setTimeout(()=>{this.handleAnnouncementUpdate(e)},50)}handleAnnouncementUpdate(e){if(!this.isAlive()||!this.descriptionContainer)return;let t=e;if(t==null||t.replace(/[ .]/g,"")==""){this.lastAnnouncement="";return}this.lastAnnouncement===t&&(t=`${t}`),this.lastAnnouncement=t,this.descriptionContainer.textContent=t}destroy(){super.destroy();const{descriptionContainer:e}=this;e&&(bn(e),e.remove()),this.descriptionContainer=null,this.pendingAnnouncements.clear()}},yW=class extends bW{},SW={moduleName:"Aria",version:ve,beans:[yW]},RW=":where(.ag-delay-render){.ag-cell,.ag-header-cell,.ag-header-group-cell,.ag-row,.ag-spanned-cell-wrapper{visibility:hidden}}",VF="ag-delay-render",FW=class extends X{constructor(){super(...arguments),this.beanName="colDelayRenderSvc",this.hideRequested=!1,this.alreadyRevealed=!1,this.timesRetried=0,this.requesters=new Set}hideColumns(e){this.alreadyRevealed||this.requesters.has(e)||(this.requesters.add(e),this.hideRequested||(this.beans.ctrlsSvc.whenReady(this,t=>{t.gridBodyCtrl.eGridBody.classList.add(VF)}),this.hideRequested=!0))}revealColumns(e){if(this.alreadyRevealed||!this.isAlive()||(this.requesters.delete(e),this.requesters.size>0))return;const{renderStatus:t,ctrlsSvc:n}=this.beans;if(t){if(!t.areHeaderCellsRendered()&&this.timesRetried<5){this.timesRetried++,setTimeout(()=>this.revealColumns(e));return}this.timesRetried=0}n.getGridBodyCtrl().eGridBody.classList.remove(VF),this.alreadyRevealed=!0}},xW={moduleName:"ColumnDelayRender",version:ve,beans:[FW],css:[RW]},yh=class extends yt{constructor(){super()}},PW={tag:"div",cls:"ag-overlay-exporting-center",children:[{tag:"span",ref:"eExportingIcon",cls:"ag-loading-icon"},{tag:"span",ref:"eExportingText",cls:"ag-exporting-text"}]},EW=class extends yh{constructor(){super(...arguments),this.eExportingIcon=he,this.eExportingText=he}init(e){const{beans:t}=this;this.setTemplate(PW);const n=ii("overlayExporting",t,null);n&&this.eExportingIcon.appendChild(n);const i=e.exporting?.overlayText??this.getLocaleTextFunc()("exportingOoo","Exporting...");this.eExportingText.textContent=i,t.ariaAnnounce.announceValue(i,"overlay")}},DW={tag:"div",cls:"ag-overlay-loading-center",children:[{tag:"span",ref:"eLoadingIcon",cls:"ag-loading-icon"},{tag:"span",ref:"eLoadingText",cls:"ag-loading-text"}]},TW=class extends yh{constructor(){super(...arguments),this.eLoadingIcon=he,this.eLoadingText=he}init(e){const{beans:t,gos:n}=this,i=Jo(n.get("overlayLoadingTemplate")?.trim());if(this.setTemplate(i??DW),!i){const o=ii("overlayLoading",t,null);o&&this.eLoadingIcon.appendChild(o);const r=e.loading?.overlayText??this.getLocaleTextFunc()("loadingOoo","Loading...");this.eLoadingText.textContent=r,t.ariaAnnounce.announceValue(r,"overlay")}}},AW={tag:"span",cls:"ag-overlay-no-matching-rows-center"},IW=class extends yh{init(e){const{beans:t}=this;this.setTemplate(AW);const n=e.noMatchingRows?.overlayText??this.getLocaleTextFunc()("noMatchingRows","No Matching Rows");this.getGui().textContent=n,t.ariaAnnounce.announceValue(n,"overlay")}},MW={tag:"span",cls:"ag-overlay-no-rows-center"},kW=class extends yh{init(e){const{beans:t,gos:n}=this,i=Jo(n.get("overlayNoRowsTemplate")?.trim());if(this.setTemplate(i??MW),!i){const o=e.noRows?.overlayText??this.getLocaleTextFunc()("noRowsToShow","No Rows To Show");this.getGui().textContent=o,t.ariaAnnounce.announceValue(o,"overlay")}}};function LW(e){e.overlays?.showLoadingOverlay()}function OW(e){e.overlays?.showNoRowsOverlay()}function _W(e){e.overlays?.hideOverlay()}var NW=".ag-overlay{inset:0;pointer-events:none;position:absolute;z-index:2}.ag-overlay-panel,.ag-overlay-wrapper{display:flex;height:100%;width:100%}.ag-overlay-wrapper{align-items:center;flex:none;justify-content:center;text-align:center}.ag-overlay-exporting-wrapper,.ag-overlay-loading-wrapper,.ag-overlay-modal-wrapper{pointer-events:all}.ag-overlay-exporting-center,.ag-overlay-loading-center{background:var(--ag-background-color);border:solid var(--ag-border-width) var(--ag-border-color);border-radius:var(--ag-border-radius);box-shadow:var(--ag-popup-shadow);display:flex;padding:var(--ag-spacing)}",BW={tag:"div",cls:"ag-overlay",role:"presentation",children:[{tag:"div",cls:"ag-overlay-panel",role:"presentation",children:[{tag:"div",ref:"eOverlayWrapper",cls:"ag-overlay-wrapper",role:"presentation"}]}]},WF=class extends yt{constructor(){super(BW),this.eOverlayWrapper=he,this.activeOverlay=null,this.activePromise=null,this.activeCssClass=null,this.elToFocusAfter=null,this.overlayExclusive=!1,this.oldWrapperPadding=null,this.registerCSS(NW)}handleKeyDown(e){if(e.key!==q.TAB||e.defaultPrevented||sr(e))return;const{beans:t,eOverlayWrapper:n}=this;if(n&&Hs(t,n,!1,e.shiftKey))return;let o=!1;e.shiftKey?o=t.focusSvc.focusGridView({column:Pt(t.visibleCols.allCols),backwards:!0,canFocusOverlay:!1}):o=Xa(t,!1),o&&e.preventDefault()}updateLayoutClasses(e,t){const n=this.eOverlayWrapper;if(!n)return;const i=n.classList,{AUTO_HEIGHT:o,NORMAL:r,PRINT:s}=io;i.toggle(o,t.autoHeight),i.toggle(r,t.normal),i.toggle(s,t.print)}postConstruct(){this.createManagedBean(new hm(this)),this.setDisplayed(!1,{skipAriaHidden:!0}),this.beans.overlays.setWrapperComp(this,!1),this.addManagedElementListeners(this.getFocusableElement(),{keydown:this.handleKeyDown.bind(this)}),this.addManagedEventListeners({gridSizeChanged:this.refreshWrapperPadding.bind(this)})}setWrapperTypeClass(e){const t=this.eOverlayWrapper?.classList;if(!t){this.activeCssClass=null;return}this.activeCssClass&&t.toggle(this.activeCssClass,!1),this.activeCssClass=e,t.toggle(e,!0)}showOverlay(e,t,n){if(this.destroyActiveOverlay(),this.elToFocusAfter=null,this.activePromise=e,this.overlayExclusive=n,!e)return this.refreshWrapperPadding(),Mt.resolve();if(this.setWrapperTypeClass(t),this.setDisplayed(!0,{skipAriaHidden:!0}),this.refreshWrapperPadding(),n&&this.isGridFocused()){const i=It(this.beans);i&&!ug(this.beans)&&(this.elToFocusAfter=i)}return e.then(i=>{const o=this.eOverlayWrapper;if(!o){this.destroyBean(i);return}if(this.activePromise!==e){this.activeOverlay!==i&&(this.destroyBean(i),i=null);return}this.activePromise=null,i&&(this.activeOverlay!==i&&(o.appendChild(i.getGui()),this.activeOverlay=i),n&&this.isGridFocused()&&Gs(o))}),e}refreshWrapperPadding(){if(!this.eOverlayWrapper){this.oldWrapperPadding=null;return}const e=!!this.activeOverlay||!!this.activePromise;let t=0;e&&!this.overlayExclusive&&(t=this.beans.ctrlsSvc.get("gridHeaderCtrl")?.headerHeight||0),t!==this.oldWrapperPadding&&(this.oldWrapperPadding=t,this.eOverlayWrapper.style.setProperty("padding-top",`${t}px`))}destroyActiveOverlay(){this.activePromise=null;const e=this.activeOverlay;if(!e){this.overlayExclusive=!1,this.elToFocusAfter=null,this.refreshWrapperPadding();return}let t=this.elToFocusAfter;this.elToFocusAfter=null,this.activeOverlay=null,this.overlayExclusive=!1,t&&!this.isGridFocused()&&(t=null),this.destroyBean(e);const n=this.eOverlayWrapper;n&&bn(n),t?.focus?.({preventScroll:!0}),this.refreshWrapperPadding()}hideOverlay(){this.destroyActiveOverlay(),this.setDisplayed(!1,{skipAriaHidden:!0})}isGridFocused(){const e=It(this.beans);return!!e&&this.beans.eGridDiv.contains(e)}destroy(){this.elToFocusAfter=null,this.destroyActiveOverlay(),this.beans.overlays.setWrapperComp(this,!0),super.destroy(),this.eOverlayWrapper=null}},GW={selector:"AG-OVERLAY-WRAPPER",component:WF},HW=["refresh"],_c=e=>({name:e,optionalMethods:HW}),Qs={id:"agLoadingOverlay",overlayType:"loading",comp:_c("loadingOverlayComponent"),wrapperCls:"ag-overlay-loading-wrapper",exclusive:!0,compKey:"loadingOverlayComponent",paramsKey:"loadingOverlayComponentParams",isSuppressed:e=>{const t=e.get("loading");return t===!1||e.get("suppressLoadingOverlay")===!0&&t!==!0}},al={id:"agNoRowsOverlay",overlayType:"noRows",comp:_c("noRowsOverlayComponent"),wrapperCls:"ag-overlay-no-rows-wrapper",compKey:"noRowsOverlayComponent",paramsKey:"noRowsOverlayComponentParams",isSuppressed:e=>e.get("suppressNoRowsOverlay")},Zm={id:"agNoMatchingRowsOverlay",overlayType:"noMatchingRows",comp:_c("noMatchingRowsOverlayComponent"),wrapperCls:"ag-overlay-no-matching-rows-wrapper"},Sh={id:"agExportingOverlay",overlayType:"exporting",comp:_c("exportingOverlayComponent"),wrapperCls:"ag-overlay-exporting-wrapper",exclusive:!0},Rh={id:"activeOverlay",comp:_c("activeOverlay"),wrapperCls:"ag-overlay-modal-wrapper",exclusive:!0},VW=e=>e?{agLoadingOverlay:Qs,agNoRowsOverlay:al,agNoMatchingRowsOverlay:Zm,agExportingOverlay:Sh}[e]??Rh:null,WW=e=>e?{loading:Qs,noRows:al,noMatchingRows:Zm,exporting:Sh}[e]:null,zW=class extends X{constructor(){super(...arguments),this.beanName="overlays",this.eWrapper=void 0,this.exclusive=!1,this.oldExclusive=!1,this.currentDef=null,this.showInitialOverlay=!0,this.userForcedNoRows=!1,this.exportsInProgress=0,this.newColumnsLoadedCleanup=null}postConstruct(){const e=this.gos;this.showInitialOverlay=Yt(e);const t=()=>{this.userForcedNoRows||this.updateOverlay(!1)},[n,i,o,r]=this.addManagedEventListeners({newColumnsLoaded:t,rowCountReady:()=>{this.disableInitialOverlay(),t(),i()},rowDataUpdated:t,modelUpdated:t});this.newColumnsLoadedCleanup=n,this.addManagedPropertyListeners(["loading","activeOverlay","activeOverlayParams","overlayComponentParams","loadingOverlayComponentParams","noRowsOverlayComponentParams"],s=>this.onPropChange(new Set(s.changeSet?.properties)))}destroy(){this.doHideOverlay(),super.destroy(),this.eWrapper=void 0}setWrapperComp(e,t){this.isAlive()&&(t?this.eWrapper===e&&(this.eWrapper=void 0):this.eWrapper=e,this.updateOverlay(!1))}isVisible(){return!!this.currentDef}showLoadingOverlay(){this.showInitialOverlay=!1;const e=this.gos;if(!this.eWrapper||e.get("activeOverlay")||this.isDisabled(Qs))return;const t=e.get("loading");!t&&t!==void 0||this.doShowOverlay(Qs)}showNoRowsOverlay(){this.showInitialOverlay=!1;const e=this.gos;!this.eWrapper||e.get("activeOverlay")||e.get("loading")||this.isDisabled(al)||(this.userForcedNoRows=!0,this.doShowOverlay(al))}async showExportOverlay(e){const{gos:t,beans:n}=this;if(!this.eWrapper||t.get("activeOverlay")||t.get("loading")||this.isDisabled(Sh)||this.userForcedNoRows&&this.currentDef===al){e();return}const i=this.getDesiredDefWithOverride(Sh);if(!i){e();return}this.exportsInProgress++,this.focusedCell=n.focusSvc.getFocusedCell(),await this.doShowOverlay(i),await new Promise(r=>setTimeout(()=>r()));const o=Date.now();try{e()}finally{const r=Date.now()-o,s=Math.max(0,300-r),a=()=>{this.exportsInProgress--,this.exportsInProgress===0&&(this.updateOverlay(!1),C2(n,this.focusedCell),this.focusedCell=null)};s>0?setTimeout(()=>a(),s):a()}}hideOverlay(){const e=this.gos;this.showInitialOverlay=!1;const t=this.userForcedNoRows;if(this.userForcedNoRows=!1,e.get("loading")){se(99);return}if(e.get("activeOverlay")){se(296);return}if(this.currentDef===Zm){se(297);return}this.doHideOverlay(),t&&this.getOverlayDef()!==al&&this.updateOverlay(!1)}getOverlayWrapperSelector(){return GW}getOverlayWrapperCompClass(){return WF}onPropChange(e){const t=e.has("activeOverlay");if((t||e.has("loading"))&&this.updateOverlay(t))return;const n=this.currentDef,i=this.eWrapper?.activeOverlay;if(i&&n){const o=e.has("activeOverlayParams");if(n===Rh)o&&i.refresh?.(this.makeCompParams(!0));else{const r=n.paramsKey;(e.has("overlayComponentParams")||r&&e.has(r))&&i.refresh?.(this.makeCompParams(!1,r,n.overlayType))}}}updateOverlay(e){const t=this.eWrapper;if(!t)return this.currentDef=null,!1;const n=this.getDesiredDefWithOverride(),i=this.currentDef,o=n===Rh&&e;return n!==i?n?(this.doShowOverlay(n),!0):(this.disableInitialOverlay(),this.doHideOverlay()):o&&n?(t.hideOverlay(),this.doShowOverlay(n),!0):(n||this.disableInitialOverlay(),!1)}getDesiredDefWithOverride(e){const{gos:t}=this;let n=VW(t.get("activeOverlay"));return n||(n=e??this.getOverlayDef(),n&&this.isDisabled(n)&&(n=null)),n}getOverlayDef(){const{gos:e,beans:t}=this,{rowModel:n}=t,i=e.get("loading");if(i!==void 0){if(this.disableInitialOverlay(),i)return Qs}else if(this.showInitialOverlay){if(!this.isDisabled(Qs)&&(!e.get("columnDefs")||!e.get("rowData")))return Qs;this.disableInitialOverlay()}else this.disableInitialOverlay();const r=n.getOverlayType();return WW(r)}disableInitialOverlay(){this.showInitialOverlay=!1,this.newColumnsLoadedCleanup?.(),this.newColumnsLoadedCleanup=null}doShowOverlay(e){const{gos:t,beans:n}=this,{userCompFactory:i}=n;this.currentDef=e;const o=e!==Rh,r=!!e.exclusive;this.exclusive=r;let s;(e.paramsKey&&t.get(e.paramsKey)||e.compKey&&t.get(e.compKey))&&(s=e.paramsKey);let a;o&&(t.get("overlayComponent")||t.get("overlayComponentSelector"))&&(a=i.getCompDetailsFromGridOptions({name:"overlayComponent",optionalMethods:["refresh"]},void 0,this.makeCompParams(!1,e.paramsKey,e.overlayType))),a??(a=i.getCompDetailsFromGridOptions(e.comp,o?e.id:void 0,this.makeCompParams(!o,s,e.overlayType),!1));const l=a?.newAgStackInstance()??null,u=this.eWrapper?this.eWrapper.showOverlay(l,e.wrapperCls,r):Mt.resolve();return this.eWrapper?.refreshWrapperPadding(),this.setExclusive(r),u}makeCompParams(e,t,n){const{gos:i}=this,o=e?i.get("activeOverlayParams"):{...i.get("overlayComponentParams"),...t&&i.get(t)||null,overlayType:n};return We(i,o??{})}doHideOverlay(){let e=!1;this.currentDef&&(this.currentDef=null,e=!0),this.exclusive=!1;const t=this.eWrapper;return t&&(t.hideOverlay(),t.refreshWrapperPadding(),this.setExclusive(!1)),e}setExclusive(e){this.oldExclusive!==e&&(this.oldExclusive=e,this.eventSvc.dispatchEvent({type:"overlayExclusiveChanged"}))}isDisabled(e){const{gos:t}=this;return e.overlayType&&t.get("suppressOverlays")?.includes(e.overlayType)||e.isSuppressed?.(t)===!0}},UW={moduleName:"Overlay",version:ve,userComponents:{agLoadingOverlay:TW,agNoRowsOverlay:kW,agNoMatchingRowsOverlay:IW,agExportingOverlay:EW},apiFunctions:{showLoadingOverlay:LW,showNoRowsOverlay:OW,hideOverlay:_W},icons:{overlayLoading:"loading",overlayExporting:"loading"},beans:[zW]},$W=class extends X{constructor(){super(...arguments),this.beanName="rowContainerHeight",this.scrollY=0,this.uiBodyHeight=0}postConstruct(){this.addManagedEventListeners({bodyHeightChanged:this.updateOffset.bind(this)}),this.maxDivHeight=N_(),Br(this.gos,"RowContainerHeightService - maxDivHeight = "+this.maxDivHeight)}updateOffset(){if(!this.stretching)return;const e=this.beans.ctrlsSvc.getScrollFeature().getVScrollPosition().top,t=this.getUiBodyHeight();(e!==this.scrollY||t!==this.uiBodyHeight)&&(this.scrollY=e,this.uiBodyHeight=t,this.calculateOffset())}calculateOffset(){this.setUiContainerHeight(this.maxDivHeight),this.pixelsToShave=this.modelHeight-this.uiContainerHeight,this.maxScrollY=this.uiContainerHeight-this.uiBodyHeight;const e=this.scrollY/this.maxScrollY,t=e*this.pixelsToShave;Br(this.gos,`RowContainerHeightService - Div Stretch Offset = ${t} (${this.pixelsToShave} * ${e})`),this.setDivStretchOffset(t)}setUiContainerHeight(e){e!==this.uiContainerHeight&&(this.uiContainerHeight=e,this.eventSvc.dispatchEvent({type:"rowContainerHeightChanged"}))}clearOffset(){this.setUiContainerHeight(this.modelHeight),this.pixelsToShave=0,this.setDivStretchOffset(0)}setDivStretchOffset(e){const t=typeof e=="number"?Math.floor(e):null;this.divStretchOffset!==t&&(this.divStretchOffset=t,this.eventSvc.dispatchEvent({type:"heightScaleChanged"}))}setModelHeight(e){this.modelHeight=e,this.stretching=e!=null&&this.maxDivHeight>0&&e>this.maxDivHeight,this.stretching?this.calculateOffset():this.clearOffset()}getRealPixelPosition(e){return e-this.divStretchOffset}getUiBodyHeight(){const e=this.beans.ctrlsSvc.getScrollFeature().getVScrollPosition();return e.bottom-e.top}getScrollPositionForPixel(e){if(this.pixelsToShave<=0)return e;const t=this.modelHeight-this.getUiBodyHeight(),n=e/t;return this.maxScrollY*n}},jW=400,KW=class extends X{constructor(){super(...arguments),this.beanName="rowRenderer",this.destroyFuncsForColumnListeners=[],this.rowCtrlsByRowIndex={},this.zombieRowCtrls={},this.allRowCtrls=[],this.topRowCtrls=[],this.bottomRowCtrls=[],this.refreshInProgress=!1,this.dataFirstRenderedFired=!1,this.setupRangeSelectionListeners=()=>{const e=()=>{for(const r of this.getAllCellCtrls())r.onCellSelectionChanged()},t=()=>{for(const r of this.getAllCellCtrls())r.updateRangeBordersIfRangeCount()},n=()=>{this.eventSvc.addListener("cellSelectionChanged",e),this.eventSvc.addListener("columnMoved",t),this.eventSvc.addListener("columnPinned",t),this.eventSvc.addListener("columnVisible",t)},i=()=>{this.eventSvc.removeListener("cellSelectionChanged",e),this.eventSvc.removeListener("columnMoved",t),this.eventSvc.removeListener("columnPinned",t),this.eventSvc.removeListener("columnVisible",t)};this.addDestroyFunc(()=>i()),this.addManagedPropertyListeners(["enableRangeSelection","cellSelection"],()=>{nr(this.gos)?n():i()}),nr(this.gos)&&n()}}wireBeans(e){this.pageBounds=e.pageBounds,this.colModel=e.colModel,this.pinnedRowModel=e.pinnedRowModel,this.rowModel=e.rowModel,this.focusSvc=e.focusSvc,this.rowContainerHeight=e.rowContainerHeight,this.ctrlsSvc=e.ctrlsSvc,this.editSvc=e.editSvc}postConstruct(){this.ctrlsSvc.whenReady(this,e=>{this.gridBodyCtrl=e.gridBodyCtrl,this.initialise()})}initialise(){this.addManagedEventListeners({paginationChanged:this.onPageLoaded.bind(this),pinnedRowDataChanged:this.onPinnedRowDataChanged.bind(this),pinnedRowsChanged:this.onPinnedRowsChanged.bind(this),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this),bodyScroll:this.onBodyScroll.bind(this),bodyHeightChanged:this.redraw.bind(this,{})}),this.addManagedPropertyListeners(["domLayout","embedFullWidthRows"],()=>this.onDomLayoutChanged()),this.addManagedPropertyListeners(["suppressMaxRenderedRowRestriction","rowBuffer"],()=>this.redraw()),this.addManagedPropertyListener("suppressCellFocus",i=>this.onSuppressCellFocusChanged(i.currentValue)),this.addManagedPropertyListeners(["groupSuppressBlankHeader","getBusinessKeyForNode","fullWidthCellRenderer","fullWidthCellRendererParams","suppressStickyTotalRow","groupRowRenderer","groupRowRendererParams","loadingCellRenderer","loadingCellRendererParams","detailCellRenderer","detailCellRendererParams","enableRangeSelection","enableCellTextSelection"],()=>this.redrawRows()),this.addManagedPropertyListener("cellSelection",({currentValue:i,previousValue:o})=>{(!o&&i||o&&!i)&&this.redrawRows()});const{stickyRowSvc:e,gos:t,showRowGroupCols:n}=this.beans;if(n&&this.addManagedPropertyListener("showOpenedGroup",()=>{const i=n.columns;i.length&&this.refreshCells({columns:i,force:!0})}),e)this.stickyRowFeature=e.createStickyRowFeature(this,this.createRowCon.bind(this),this.destroyRowCtrls.bind(this));else{const i=this.gridBodyCtrl;i.setStickyTopHeight(0),i.setStickyBottomHeight(0)}this.registerCellEventListeners(),this.initialiseCache(),this.printLayout=yn(t,"print"),this.embedFullWidthRows=this.printLayout||t.get("embedFullWidthRows"),this.redrawAfterModelUpdate()}initialiseCache(){if(this.gos.get("keepDetailRows")){const e=this.getKeepDetailRowsCount(),t=e??3;this.cachedRowCtrls=new qW(t)}}getKeepDetailRowsCount(){return this.gos.get("keepDetailRowsCount")}getStickyTopRowCtrls(){return this.stickyRowFeature?.stickyTopRowCtrls??[]}getStickyBottomRowCtrls(){return this.stickyRowFeature?.stickyBottomRowCtrls??[]}updateAllRowCtrls(){const e=Object.values(this.rowCtrlsByRowIndex),t=Object.values(this.zombieRowCtrls),n=this.cachedRowCtrls?.getEntries()??[];t.length>0||n.length>0?this.allRowCtrls=[...e,...t,...n]:this.allRowCtrls=e}isCellBeingRendered(e,t){const n=this.rowCtrlsByRowIndex[e];return!t||!n?!!n:n.isFullWidth()?!0:!!this.beans.spannedRowRenderer?.getCellByPosition({rowIndex:e,column:t,rowPinned:null})||!!n.getCellCtrl(t)||!n.isRowRendered()}updateCellFocus(e){for(const t of this.getAllCellCtrls())t.onCellFocused(e);for(const t of this.getFullWidthRowCtrls())t.onFullWidthRowFocused(e)}onCellFocusChanged(e){if(e?.rowIndex!=null&&!e.rowPinned){const t=this.beans.colModel.getCol(e.column)??void 0;this.isCellBeingRendered(e.rowIndex,t)||this.redraw()}this.updateCellFocus(e)}onSuppressCellFocusChanged(e){for(const t of this.getAllCellCtrls())t.onSuppressCellFocusChanged(e);for(const t of this.getFullWidthRowCtrls())t.onSuppressCellFocusChanged(e)}registerCellEventListeners(){this.addManagedEventListeners({cellFocused:e=>this.onCellFocusChanged(e),cellFocusCleared:()=>this.updateCellFocus(),flashCells:e=>{const{cellFlashSvc:t}=this.beans;if(t)for(const n of this.getAllCellCtrls())t.onFlashCells(n,e)},columnHoverChanged:()=>{for(const e of this.getAllCellCtrls())e.onColumnHover()},displayedColumnsChanged:()=>{for(const e of this.getAllCellCtrls())e.onDisplayedColumnsChanged()},displayedColumnsWidthChanged:()=>{if(this.printLayout)for(const e of this.getAllCellCtrls())e.onLeftChanged()}}),this.setupRangeSelectionListeners(),this.refreshListenersToColumnsForCellComps(),this.addManagedEventListeners({gridColumnsChanged:this.refreshListenersToColumnsForCellComps.bind(this)}),this.addDestroyFunc(this.removeGridColumnListeners.bind(this))}removeGridColumnListeners(){for(const e of this.destroyFuncsForColumnListeners)e();this.destroyFuncsForColumnListeners.length=0}refreshListenersToColumnsForCellComps(){this.removeGridColumnListeners();const e=this.colModel.getCols();for(const t of e){const n=l=>{for(const u of this.getAllCellCtrls())u.column===t&&l(u)},i=()=>{n(l=>l.onLeftChanged())},o=()=>{n(l=>l.onWidthChanged())},r=()=>{n(l=>l.onFirstRightPinnedChanged())},s=()=>{n(l=>l.onLastLeftPinnedChanged())},a=()=>{n(l=>l.onColDefChanged())};t.__addEventListener("leftChanged",i),t.__addEventListener("widthChanged",o),t.__addEventListener("firstRightPinnedChanged",r),t.__addEventListener("lastLeftPinnedChanged",s),t.__addEventListener("colDefChanged",a),this.destroyFuncsForColumnListeners.push(()=>{t.__removeEventListener("leftChanged",i),t.__removeEventListener("widthChanged",o),t.__removeEventListener("firstRightPinnedChanged",r),t.__removeEventListener("lastLeftPinnedChanged",s),t.__removeEventListener("colDefChanged",a)})}}onDomLayoutChanged(){const e=yn(this.gos,"print"),t=e||this.gos.get("embedFullWidthRows"),n=t!==this.embedFullWidthRows||this.printLayout!==e;this.printLayout=e,this.embedFullWidthRows=t,n&&this.redrawAfterModelUpdate({domLayoutChanged:!0})}datasourceChanged(){this.firstRenderedRow=0,this.lastRenderedRow=-1;const e=Object.keys(this.rowCtrlsByRowIndex);this.removeRowCtrls(e)}onPageLoaded(e){const t={recycleRows:e.keepRenderedRows,animate:e.animate,newData:e.newData,newPage:e.newPage,onlyBody:!0};this.redrawAfterModelUpdate(t)}getAllCellsNotSpanningForColumn(e){const t=[];for(const n of this.getAllRowCtrls()){const i=n.getCellCtrl(e,!0)?.eGui;i&&t.push(i)}return t}refreshFloatingRowComps(e=!0){this.refreshFloatingRows(this.topRowCtrls,"top",e),this.refreshFloatingRows(this.bottomRowCtrls,"bottom",e)}refreshFloatingRows(e,t,n){const{pinnedRowModel:i,beans:o,printLayout:r}=this,s=Object.fromEntries(e.map(l=>[l.rowNode.id,l]));i?.forEachPinnedRow(t,(l,u)=>{const h=e[u];h&&i.getPinnedRowById(h.rowNode.id,t)===void 0&&(h.destroyFirstPass(),h.destroySecondPass()),l.id in s&&n?(e[u]=s[l.id],delete s[l.id]):e[u]=new bh(l,o,!1,!1,r)});const a=(t==="top"?i?.getPinnedTopRowCount():i?.getPinnedBottomRowCount())??0;e.length=a}onPinnedRowDataChanged(){const e={recycleRows:!0};this.redrawAfterModelUpdate(e)}onPinnedRowsChanged(){this.redrawAfterModelUpdate({recycleRows:!0})}redrawRow(e,t=!1){if(e.sticky)this.stickyRowFeature?.refreshStickyNode(e);else if(this.cachedRowCtrls?.has(e)){this.cachedRowCtrls.removeRow(e);return}else{const n=i=>{const o=i[e.rowIndex];o&&o.rowNode===e&&(o.destroyFirstPass(),o.destroySecondPass(),i[e.rowIndex]=this.createRowCon(e,!1,!1))};switch(e.rowPinned){case"top":n(this.topRowCtrls);break;case"bottom":n(this.bottomRowCtrls);break;default:n(this.rowCtrlsByRowIndex),this.updateAllRowCtrls()}}t||this.dispatchDisplayedRowsChanged(!1)}redrawRows(e){const{editSvc:t}=this.beans;if(t?.isEditing()&&(t.isBatchEditing()?t.cleanupEditors():t.stopEditing(void 0,{source:"api"})),e!=null){for(const i of e??[])this.redrawRow(i,!0);this.dispatchDisplayedRowsChanged(!1);return}this.redrawAfterModelUpdate()}redrawAfterModelUpdate(e={}){this.getLockOnRefresh();const t=this.beans.focusSvc?.getFocusCellToUseAfterRefresh();this.updateContainerHeights(),this.scrollToTopIfNewData(e);const n=!e.domLayoutChanged&&!!e.recycleRows,i=e.animate&&za(this.gos),o=n?this.getRowsToRecycle():null;n||this.removeAllRowComps(),this.workOutFirstAndLastRowsToRender();const{stickyRowFeature:r,gos:s}=this;if(r){r.checkStickyRows();const a=r.extraTopHeight+r.extraBottomHeight;a&&this.updateContainerHeights(a)}this.recycleRows(o,i),this.gridBodyCtrl.updateRowCount(),e.onlyBody||this.refreshFloatingRowComps(s.get("enableRowPinning")?n:void 0),this.dispatchDisplayedRowsChanged(),t!=null&&this.restoreFocusedCell(t),this.releaseLockOnRefresh()}scrollToTopIfNewData(e){const t=e.newData||e.newPage,n=this.gos.get("suppressScrollOnNewData");t&&!n&&(this.gridBodyCtrl.scrollFeature.scrollToTop(),this.stickyRowFeature?.resetOffsets())}updateContainerHeights(e=0){const{rowContainerHeight:t}=this;if(this.printLayout){t.setModelHeight(null);return}let n=this.pageBounds.getCurrentPageHeight();n===0&&(n=1),t.setModelHeight(n+e)}getLockOnRefresh(){if(this.refreshInProgress)throw new Error(Po(252));this.refreshInProgress=!0,this.beans.frameworkOverrides.getLockOnRefresh?.()}releaseLockOnRefresh(){this.refreshInProgress=!1,this.beans.frameworkOverrides.releaseLockOnRefresh?.()}isRefreshInProgress(){return this.refreshInProgress}restoreFocusedCell(e){if(!e)return;const t=this.beans.focusSvc,n=this.findPositionToFocus(e);if(!n){t.focusHeaderPosition({headerPosition:{headerRowIndex:Oi(this.beans)-1,column:e.column}});return}if(e.rowIndex!==n.rowIndex||e.rowPinned!=n.rowPinned){t.setFocusedCell({...n,preventScrollOnBrowserFocus:!0,forceBrowserFocus:!0});return}t.doesRowOrCellHaveBrowserFocus()||this.updateCellFocus(We(this.gos,{...n,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0,type:"cellFocused"}))}findPositionToFocus(e){const{pagination:t,pageBounds:n}=this.beans;let i=e;for(i.rowPinned==null&&t&&n&&!t.isRowInPage(i.rowIndex)&&(i={rowPinned:null,rowIndex:n.getFirstRow()});i;){if(i.rowPinned==null&&n)if(i.rowIndex<n.getFirstRow()){if(i=Jd(this.beans,{rowPinned:null,rowIndex:0}),!i)return null}else i.rowIndex>n.getLastRow()&&(i={rowPinned:null,rowIndex:n.getLastRow()});const o=this.getRowByPosition(i);if(o?.isAlive())return{...o.getRowPosition(),column:e.column};i=Jd(this.beans,i)}return null}getAllCellCtrls(){const e=[],t=this.getAllRowCtrls(),n=t.length;for(let i=0;i<n;i++){const o=t[i].getAllCellCtrls(),r=o.length;for(let s=0;s<r;s++)e.push(o[s])}return e}getAllRowCtrls(){const{spannedRowRenderer:e}=this.beans,t=this.getStickyTopRowCtrls(),n=this.getStickyBottomRowCtrls();return[...this.topRowCtrls,...this.bottomRowCtrls,...t,...n,...e?.getCtrls("top")??[],...e?.getCtrls("bottom")??[],...e?.getCtrls("center")??[],...Object.values(this.rowCtrlsByRowIndex)]}addRenderedRowListener(e,t,n){const i=this.rowCtrlsByRowIndex[t];i&&i.addEventListener(e,n)}refreshCells({rowNodes:e,columns:t,force:n,suppressFlash:i}={}){const o={force:n,newData:!1,suppressFlash:i};for(const r of this.getCellCtrls(e,t))r.refreshOrDestroyCell(o);this.refreshFullWidth(e)}refreshRows(e={}){for(const t of this.getRowCtrls(e.rowNodes))t.refreshRow(e);this.refreshFullWidth(e.rowNodes)}getRowCtrlByNode(e){const t=e.rowIndex;if(t==null)return;const n=e.rowPinned;if(n==="top"){const o=this.topRowCtrls[t];return o?.rowNode===e?o:void 0}if(n==="bottom"){const o=this.bottomRowCtrls[t];return o?.rowNode===e?o:void 0}const i=this.rowCtrlsByRowIndex[t];return i?.rowNode===e?i:this.getStickyRowCtrlByNode(e)}getStickyRowCtrlByNode(e){const t=this.stickyRowFeature;if(t){for(const n of t.stickyTopRowCtrls)if(n.rowNode===e)return n;for(const n of t.stickyBottomRowCtrls)if(n.rowNode===e)return n}}refreshRowByNode(e){e&&this.getRowCtrlByNode(e)?.refreshRow()}refreshFullWidth(e){if(!e)return;let t=!1;for(const n of this.getRowCtrls(e)){if(!n.isFullWidth())continue;n.refreshFullWidth()||(t=!0,this.redrawRow(n.rowNode,!0))}t&&this.dispatchDisplayedRowsChanged(!1)}getRowCtrls(e){const t=Xm(e),n=this.getAllRowCtrls();return!e||!t?n:n.filter(i=>{const o=i.rowNode;return Jm(o,t)})}getCellCtrls(e,t){let n;we(t)&&(n={},t.forEach(o=>{const r=this.colModel.getCol(o);we(r)&&(n[r.getId()]=!0)}));const i=[];for(const o of this.getRowCtrls(e))for(const r of o.getAllCellCtrls()){const s=r.column.getId();n&&!n[s]||i.push(r)}return i}destroy(){this.removeAllRowComps(!0),super.destroy()}removeAllRowComps(e=!1){const t=Object.keys(this.rowCtrlsByRowIndex);this.removeRowCtrls(t,e),this.stickyRowFeature?.destroyStickyCtrls()}getRowsToRecycle(){const e=[];for(const n of Object.keys(this.rowCtrlsByRowIndex))this.rowCtrlsByRowIndex[n].rowNode.id==null&&e.push(n);this.removeRowCtrls(e);const t={};for(const n of Object.values(this.rowCtrlsByRowIndex)){const i=n.rowNode;t[i.id]=n}return this.rowCtrlsByRowIndex={},t}removeRowCtrls(e,t=!1){for(const n of e){const i=this.rowCtrlsByRowIndex[n];i&&(i.destroyFirstPass(t),i.destroySecondPass()),delete this.rowCtrlsByRowIndex[n]}}onBodyScroll(e){e.direction==="vertical"&&this.redraw({afterScroll:!0})}redraw(e={}){const{focusSvc:t,animationFrameSvc:n}=this.beans,{afterScroll:i}=e;let o;const r=this.stickyRowFeature;r&&(o=t?.getFocusCellToUseAfterRefresh()||void 0);const s=this.firstRenderedRow,a=this.lastRenderedRow;this.workOutFirstAndLastRowsToRender();let l=!1;if(r){l=r.checkStickyRows();const h=r.extraTopHeight+r.extraBottomHeight;h&&this.updateContainerHeights(h)}const u=this.firstRenderedRow!==s||this.lastRenderedRow!==a;if(!(i&&!l&&!u)&&(this.getLockOnRefresh(),this.recycleRows(null,!1,i),this.releaseLockOnRefresh(),this.dispatchDisplayedRowsChanged(i&&!l),o!=null)){const h=t?.getFocusCellToUseAfterRefresh();o!=null&&h==null&&(n?.flushAllFrames(),this.restoreFocusedCell(o))}}removeRowCompsNotToDraw(e,t){const n={};for(const r of e)n[r]=!0;const o=Object.keys(this.rowCtrlsByRowIndex).filter(r=>!n[r]);this.removeRowCtrls(o,t)}calculateIndexesToDraw(e){const t=[];for(let s=this.firstRenderedRow;s<=this.lastRenderedRow;s++)t.push(s);const n=this.beans.pagination,i=this.beans.focusSvc?.getFocusedCell()?.rowIndex;i!=null&&(i<this.firstRenderedRow||i>this.lastRenderedRow)&&(!n||n.isRowInPage(i))&&i<this.rowModel.getRowCount()&&t.push(i);const o=s=>{const a=s.rowNode.rowIndex;a==null||a===i||(a<this.firstRenderedRow||a>this.lastRenderedRow)&&this.doNotUnVirtualiseRow(s)&&t.push(a)};for(const s of Object.values(this.rowCtrlsByRowIndex))o(s);if(e)for(const s of Object.values(e))o(s);t.sort((s,a)=>s-a);const r=[];for(let s=0;s<t.length;s++){const a=t[s],l=this.rowModel.getRow(a);l&&!l.sticky&&r.push(a)}return r}recycleRows(e,t=!1,n=!1){const i=this.calculateIndexesToDraw(e);(this.printLayout||n)&&(t=!1),this.removeRowCompsNotToDraw(i,!t);for(const o of i)this.createOrUpdateRowCtrl(o,e,t,n);if(e){const{animationFrameSvc:o}=this.beans;o?.active&&n&&!this.printLayout?o.addDestroyTask(()=>{this.destroyRowCtrls(e,t),this.updateAllRowCtrls(),this.dispatchDisplayedRowsChanged()}):this.destroyRowCtrls(e,t)}this.updateAllRowCtrls()}dispatchDisplayedRowsChanged(e=!1){this.eventSvc.dispatchEvent({type:"displayedRowsChanged",afterScroll:e})}onDisplayedColumnsChanged(){const{visibleCols:e}=this.beans,t=e.isPinningLeft(),n=e.isPinningRight();(this.pinningLeft!==t||n!==this.pinningRight)&&(this.pinningLeft=t,this.pinningRight=n,this.embedFullWidthRows&&this.redrawFullWidthEmbeddedRows())}redrawFullWidthEmbeddedRows(){const e=[];for(const t of this.getFullWidthRowCtrls()){const n=t.rowNode.rowIndex;e.push(n.toString())}this.refreshFloatingRowComps(),this.removeRowCtrls(e),this.redraw({afterScroll:!0})}getFullWidthRowCtrls(e){const t=Xm(e);return this.getAllRowCtrls().filter(n=>{if(!n.isFullWidth())return!1;const i=n.rowNode;return!(t!=null&&!Jm(i,t))})}createOrUpdateRowCtrl(e,t,n,i){let o,r=this.rowCtrlsByRowIndex[e];if(r||(o=this.rowModel.getRow(e),we(o)&&we(t)&&t[o.id]&&o.alreadyRendered&&(r=t[o.id],t[o.id]=null)),!r)if(o||(o=this.rowModel.getRow(e)),we(o))r=this.createRowCon(o,n,i);else return;o&&(o.alreadyRendered=!0),this.rowCtrlsByRowIndex[e]=r}destroyRowCtrls(e,t){const n=[];if(e){for(const i of Object.values(e))if(i){if(this.cachedRowCtrls&&i.isCacheable()){this.cachedRowCtrls.addRow(i);continue}if(i.destroyFirstPass(!t),t){const o=i.instanceId;this.zombieRowCtrls[o]=i,n.push(()=>{i.destroySecondPass(),delete this.zombieRowCtrls[o]})}else i.destroySecondPass()}}t&&(n.push(()=>{this.isAlive()&&(this.updateAllRowCtrls(),this.dispatchDisplayedRowsChanged())}),window.setTimeout(()=>{for(const i of n)i()},jW))}getRowBuffer(){return this.gos.get("rowBuffer")}getRowBufferInPixels(){const e=this.getRowBuffer(),t=Ls(this.beans);return e*t}workOutFirstAndLastRowsToRender(){const{rowContainerHeight:e,pageBounds:t,rowModel:n}=this;e.updateOffset();let i,o;if(!n.isRowsToRender())i=0,o=-1;else if(this.printLayout)this.beans.environment.refreshRowHeightVariable(),i=t.getFirstRow(),o=t.getLastRow();else{const h=this.getRowBufferInPixels(),f=this.ctrlsSvc.getScrollFeature(),p=this.gos.get("suppressRowVirtualisation");let m=!1,v,w;do{const P=t.getPixelOffset(),{pageFirstPixel:F,pageLastPixel:I}=t.getCurrentPagePixelRange(),L=e.divStretchOffset,V=f.getVScrollPosition(),G=V.top,_=V.bottom;p?(v=F+L,w=I+L):(v=Math.max(G+P-h,F)+L,w=Math.min(_+P+h,I)+L),this.firstVisibleVPixel=Math.max(G+P,F)+L,this.lastVisibleVPixel=Math.min(_+P,I)+L,m=this.ensureAllRowsInRangeHaveHeightsCalculated(v,w)}while(m);let b=n.getRowIndexAtPixel(v),y=n.getRowIndexAtPixel(w);const R=t.getFirstRow(),S=t.getLastRow();b<R&&(b=R),y>S&&(y=S),i=b,o=y}const r=yn(this.gos,"normal"),s=this.gos.get("suppressMaxRenderedRowRestriction"),a=Math.max(this.getRowBuffer(),500);r&&!s&&o-i>a&&(o=i+a);const l=i!==this.firstRenderedRow,u=o!==this.lastRenderedRow;(l||u)&&(this.firstRenderedRow=i,this.lastRenderedRow=o,this.eventSvc.dispatchEvent({type:"viewportChanged",firstRow:i,lastRow:o}))}dispatchFirstDataRenderedEvent(){this.dataFirstRenderedFired||(this.dataFirstRenderedFired=!0,er(this.beans,()=>{this.beans.eventSvc.dispatchEvent({type:"firstDataRendered",firstRow:this.firstRenderedRow,lastRow:this.lastRenderedRow})}))}ensureAllRowsInRangeHaveHeightsCalculated(e,t){const n=this.pinnedRowModel?.ensureRowHeightsValid(),i=this.stickyRowFeature?.ensureRowHeightsValid(),{pageBounds:o,rowModel:r}=this,s=r.ensureRowHeightsValid(e,t,o.getFirstRow(),o.getLastRow());return(s||i)&&this.eventSvc.dispatchEvent({type:"recalculateRowBounds"}),i||s||n?(this.updateContainerHeights(),!0):!1}doNotUnVirtualiseRow(e){const i=e.rowNode,o=this.focusSvc.isRowFocused(i.rowIndex,i.rowPinned),r=this.editSvc?.isEditing(e),s=i.detail;return o||r||s?!!this.isRowPresent(i):!1}isRowPresent(e){return this.rowModel.isRowPresent(e)?this.beans.pagination?.isRowInPage(e.rowIndex)??!0:!1}createRowCon(e,t,n){const i=this.cachedRowCtrls?.getRow(e)??null;if(i)return i;const o=n&&!this.printLayout&&!!this.beans.animationFrameSvc?.active;return new bh(e,this.beans,t,o,this.printLayout)}getRenderedNodes(){const e=Object.values(this.rowCtrlsByRowIndex).map(i=>i.rowNode),t=this.getStickyTopRowCtrls().map(i=>i.rowNode),n=this.getStickyBottomRowCtrls().map(i=>i.rowNode);return[...t,...e,...n]}getRowByPosition(e){let t;const{rowIndex:n}=e;switch(e.rowPinned){case"top":t=this.topRowCtrls[n];break;case"bottom":t=this.bottomRowCtrls[n];break;default:t=this.rowCtrlsByRowIndex[n],t||(t=this.getStickyTopRowCtrls().find(i=>i.rowNode.rowIndex===n)||null,t||(t=this.getStickyBottomRowCtrls().find(i=>i.rowNode.rowIndex===n)||null));break}return t}isRangeInRenderedViewport(e,t){if(e==null||t==null)return!1;const i=e>this.lastRenderedRow;return!(t<this.firstRenderedRow)&&!i}},qW=class{constructor(e){this.entriesMap={},this.entriesList=[],this.maxCount=e}addRow(e){if(this.entriesMap[e.rowNode.id]=e,this.entriesList.push(e),e.setCached(!0),this.entriesList.length>this.maxCount){const t=this.entriesList[0];t.destroyFirstPass(),t.destroySecondPass(),this.removeFromCache(t)}}getRow(e){if(e?.id==null)return null;const t=this.entriesMap[e.id];return t?(this.removeFromCache(t),t.setCached(!1),t.rowNode!=e?null:t):null}has(e){return this.entriesMap[e.id]!=null}removeRow(e){const t=e.id,n=this.entriesMap[t];delete this.entriesMap[t],Ro(this.entriesList,n)}removeFromCache(e){const t=e.rowNode.id;delete this.entriesMap[t],Ro(this.entriesList,e)}getEntries(){return this.entriesList}};function Xm(e){if(!e)return;const t={top:{},bottom:{},normal:{}};for(const n of e){const i=n.id;switch(n.rowPinned){case"top":t.top[i]=n;break;case"bottom":t.bottom[i]=n;break;default:t.normal[i]=n;break}}return t}function Jm(e,t){const n=e.id;switch(e.rowPinned){case"top":return t.top[n]!=null;case"bottom":return t.bottom[n]!=null;default:return t.normal[n]!=null}}var QW=class extends X{constructor(){super(...arguments),this.beanName="rowNodeSorter",this.accentedSort=!1,this.primaryColumnsSortGroups=!1,this.pivotActive=!1}postConstruct(){this.firstLeaf=Yt(this.gos)?uh:YW,this.addManagedPropertyListeners(["accentedSort","autoGroupColumnDef","treeData"],this.updateOptions.bind(this));const e=this.updatePivotModeState.bind(this);this.addManagedEventListeners({columnPivotModeChanged:e,columnPivotChanged:e}),this.updateOptions(),e()}updateOptions(){this.accentedSort=!!this.gos.get("accentedSort"),this.primaryColumnsSortGroups=tr(this.gos)}updatePivotModeState(){this.pivotActive=this.beans.colModel.isPivotActive()}doFullSortInPlace(e,t){return e.sort((n,i)=>this.compareRowNodes(t,n,i))}compareRowNodes(e,t,n){if(t===n)return 0;const i=this.accentedSort;for(let o=0,r=e.length;o<r;++o){const s=e[o],a=s.sort==="desc";let l=this.getValue(t,s.column),u=this.getValue(n,s.column),h;const f=this.getComparator(s,t);if(f?h=f(l,u,t,n,a):(s.type==="absolute"&&(l=zF(l),u=zF(u)),h=eL(l,u,i)),h)return s.sort==="asc"?h:-h}return 0}getComparator(e,t){const n=e.column.getColDef(),i=this.getComparatorFromColDef(n,e);if(i)return i;if(!n.showRowGroup)return;const o=!t.group&&n.field;if(!o)return;const r=this.beans.colModel.getColDefCol(o);if(r)return this.getComparatorFromColDef(r.getColDef(),e)}getComparatorFromColDef(e,t){const n=e.comparator;if(n!=null)return typeof n=="object"?n[ir(t.type)]:n}getValue(e,t){const n=this.beans;if(this.primaryColumnsSortGroups){if(e.rowGroupColumn===t)return this.getGroupDataValue(e,t);if(e.group&&t.getColDef().showRowGroup)return}const i=n.valueSvc.getValue(t,e,"data");if(t.isAllowFormula()){const o=n.formula;if(o?.isFormula(i))return o.resolveValue(t,e)}return i}getGroupDataValue(e,t){if(d0(this.gos,this.pivotActive)){const i=this.firstLeaf(e);return i&&this.beans.valueSvc.getValue(t,i,"data")}const n=this.beans.showRowGroupCols?.getShowRowGroupCol(t.getId());return n?e.groupData?.[n.getId()]:void 0}},YW=e=>{if(e.data)return e;let t=e.childrenAfterGroup;for(;t?.length;){const n=t[0];if(n.data)return n;t=n.childrenAfterGroup}},zF=e=>{if(!e)return e;if(typeof e=="bigint")return e<0n?-e:e;const t=Number(e);return isNaN(t)?e:Math.abs(t)};function ZW(e){e.sortSvc?.onSortChanged("api")}var Ys=(e,t)=>({tag:"span",ref:`eSort${e}`,cls:`ag-sort-indicator-icon ag-sort-${t} ag-hidden`,attrs:{"aria-hidden":"true"}}),XW={tag:"span",cls:"ag-sort-indicator-container",children:[Ys("Order","order"),Ys("Asc","ascending-icon"),Ys("Desc","descending-icon"),Ys("Mixed","mixed-icon"),Ys("AbsoluteAsc","absolute-ascending-icon"),Ys("AbsoluteDesc","absolute-descending-icon"),Ys("None","none-icon")]},ev=class extends yt{constructor(e){super(),this.eSortOrder=he,this.eSortAsc=he,this.eSortDesc=he,this.eSortMixed=he,this.eSortNone=he,this.eSortAbsoluteAsc=he,this.eSortAbsoluteDesc=he,e||this.setTemplate(XW)}attachCustomElements(e,t,n,i,o,r,s){this.eSortOrder=e,this.eSortAsc=t,this.eSortDesc=n,this.eSortMixed=i,this.eSortNone=o,this.eSortAbsoluteAsc=r,this.eSortAbsoluteDesc=s}setupSort(e,t=!1,n){if(this.column=e,this.suppressOrder=t,this.getSortDefOverride=n,this.setupMultiSortIndicator(),!e.isSortable()&&!e.getColDef().showRowGroup)return;this.addInIcon("sortAscending",this.eSortAsc,e),this.addInIcon("sortDescending",this.eSortDesc,e),this.addInIcon("sortUnSort",this.eSortNone,e),this.addInIcon("sortAbsoluteAscending",this.eSortAbsoluteAsc,e),this.addInIcon("sortAbsoluteDescending",this.eSortAbsoluteDesc,e);const i=this.updateIcons.bind(this),o=this.onSortChanged.bind(this);this.addManagedPropertyListener("unSortIcon",i),this.addManagedEventListeners({newColumnsLoaded:i,sortChanged:o,columnRowGroupChanged:o}),this.onSortChanged()}addInIcon(e,t,n){if(t==null)return;const i=ii(e,this.beans,n);i&&t.appendChild(i)}onSortChanged(){this.updateIcons(),this.suppressOrder||this.updateSortOrder()}updateIcons(){const{eSortAsc:e,eSortDesc:t,eSortAbsoluteAsc:n,eSortAbsoluteDesc:i,eSortNone:o,column:r,gos:s,beans:a}=this,l=IO(r,a,this.getSortDefOverride),u=l.isDefaultSortAllowed,h=l.isAbsoluteSortAllowed,{isAbsoluteSort:f,isDefaultSort:p,isAscending:m,isDescending:v,direction:w}=l;if(e&&bt(e,m&&p&&u,{skipAriaHidden:!0}),t&&bt(t,v&&p&&u,{skipAriaHidden:!0}),o){const b=!r.getColDef().unSortIcon&&!s.get("unSortIcon");bt(o,!b&&!w,{skipAriaHidden:!0})}n&&bt(n,m&&f&&h,{skipAriaHidden:!0}),i&&bt(i,v&&f&&h,{skipAriaHidden:!0})}setupMultiSortIndicator(){const{eSortMixed:e,column:t,gos:n}=this;this.addInIcon("sortUnSort",e,t);const i=t.getColDef().showRowGroup;tr(n)&&i&&(this.addManagedEventListeners({sortChanged:this.updateMultiSortIndicator.bind(this),columnRowGroupChanged:this.updateMultiSortIndicator.bind(this)}),this.updateMultiSortIndicator())}updateMultiSortIndicator(){const{eSortMixed:e,beans:t,column:n}=this;if(e){const i=t.sortSvc.getDisplaySortForColumn(n)?.direction==="mixed";bt(e,i,{skipAriaHidden:!0})}}updateSortOrder(){const{eSortOrder:e,column:t,beans:{sortSvc:n}}=this;if(!e)return;const i=n.getColumnsWithSortingOrdered(),o=n.getDisplaySortIndexForColumn(t)??-1,r=i.some(a=>n.getDisplaySortIndexForColumn(a)??!1),s=o>=0&&r;bt(e,s,{skipAriaHidden:!0}),o>=0?e.textContent=(o+1).toString():bn(e)}refresh(){this.onSortChanged()}},JW={selector:"AG-SORT-INDICATOR",component:ev},e3=class extends X{constructor(){super(...arguments),this.beanName="sortSvc"}progressSort(e,t,n){const i=this.getNextSortDirection(e);this.setSortForColumn(e,i,t,n)}progressSortFromEvent(e,t){const i=this.gos.get("multiSortKey")==="ctrl"?t.ctrlKey||t.metaKey:t.shiftKey;this.progressSort(e,i,"uiColumnSorted")}setSortForColumn(e,t,n,i){const{gos:o,showRowGroupCols:r}=this.beans,s=tr(o);let a=[e];if(s&&e.getColDef().showRowGroup){const f=r?.getSourceColumnsForGroupColumn?.(e)?.filter(p=>p.isSortable());f&&(a=[e,...f])}for(const h of a)this.setColSort(h,t,i);const l=(n||o.get("alwaysMultiSort"))&&!o.get("suppressMultiSort"),u=[];if(!l){const h=this.clearSortBarTheseColumns(a,i);u.push(...h)}this.updateSortIndex(e),u.push(...a),this.dispatchSortChangedEvents(i,u)}updateSortIndex(e){const{gos:t,colModel:n,showRowGroupCols:i}=this.beans,o=tr(t),r=i?.getShowRowGroupCol(e.getId()),s=o&&r||e,a=this.getColumnsWithSortingOrdered();n.forAllCols(h=>this.setColSortIndex(h,null));const l=a.filter(h=>o&&h.getColDef().showRowGroup?!1:h!==s);(s.getSortDef()?[...l,s]:l).forEach((h,f)=>this.setColSortIndex(h,f))}onSortChanged(e,t){this.dispatchSortChangedEvents(e,t)}isSortActive(){let e=!1;return this.beans.colModel.forAllCols(t=>{if(t.getSortDef())return e=!0,!0}),e}dispatchSortChangedEvents(e,t){const n={type:"sortChanged",source:e};t&&(n.columns=t),this.eventSvc.dispatchEvent(n)}clearSortBarTheseColumns(e,t){const n=[];return this.beans.colModel.forAllCols(i=>{e.includes(i)||(i.getSortDef()&&n.push(i),this.setColSort(i,void 0,t))}),n}getNextSortDirection(e,t){const n=e.getSortingOrder(),i=t===void 0?e.getSortDef():Li(t);let r=n.findIndex(s=>Vd(s,i))+1;return r>=n.length&&(r=0),Li(n[r])}getIndexedSortMap(){const{gos:e,colModel:t,showRowGroupCols:n,rowGroupColsSvc:i}=this.beans;let o=[];if(t.forAllCols(u=>{u.getSortDef()&&o.push(u)}),t.isPivotMode()){const u=tr(e);o=o.filter(h=>{const f=!!h.getAggFunc(),p=!h.isPrimary(),m=u?n?.getShowRowGroupCol(h.getId()):h.getColDef().showRowGroup;return f||p||m})}const r=i?.columns.filter(u=>!!u.getSortDef())??[],s={};o.forEach((u,h)=>s[u.getId()]=h),o.sort((u,h)=>{const f=u.getSortIndex(),p=h.getSortIndex();if(f!=null&&p!=null)return f-p;if(f==null&&p==null){const m=s[u.getId()],v=s[h.getId()];return m>v?1:-1}else return p==null?-1:1});const a=tr(e)&&!!r.length;a&&(o=[...new Set(o.map(u=>n?.getShowRowGroupCol(u.getId())??u))]);const l=new Map;if(o.forEach((u,h)=>l.set(u,h)),a)for(const u of r){const h=n.getShowRowGroupCol(u.getId());l.set(u,l.get(h))}return l}getColumnsWithSortingOrdered(){return[...this.getIndexedSortMap().entries()].sort(([,e],[,t])=>e-t).map(([e])=>e)}collectSortItems(e=!1){const t=[],n=this.getColumnsWithSortingOrdered();for(const i of n){const o=i.getSortDef()?.direction;if(!o)continue;const r=ir(i.getSortDef()?.type),s={sort:o,type:r};e?s.colId=i.getId():s.column=i,t.push(s)}return t}getSortModel(){return this.collectSortItems(!0)}getSortOptions(){return this.collectSortItems()}canColumnDisplayMixedSort(e){const t=tr(this.gos),n=!!e.getColDef().showRowGroup;return t&&n}getDisplaySortForColumn(e){const t=this.beans.showRowGroupCols?.getSourceColumnsForGroupColumn(e);if(!this.canColumnDisplayMixedSort(e)||!t?.length)return e.getSortDef();const i=e.getColDef().field!=null||!!e.getColDef().valueGetter?[e,...t]:t,o=i[0].getSortDef();return i.every(s=>Vd(s.getSortDef(),o))?o:{type:ir(e.getSortDef()?.type),direction:"mixed"}}getDisplaySortIndexForColumn(e){return this.getIndexedSortMap().get(e)}setupHeader(e,t){const n=()=>{const{type:i,direction:o}=Li(t.getSortDef());if(e.toggleCss("ag-header-cell-sorted-asc",o==="asc"),e.toggleCss("ag-header-cell-sorted-desc",o==="desc"),e.toggleCss("ag-header-cell-sorted-abs-asc",i==="absolute"&&o==="asc"),e.toggleCss("ag-header-cell-sorted-abs-desc",i==="absolute"&&o==="desc"),e.toggleCss("ag-header-cell-sorted-none",!o),t.getColDef().showRowGroup){const a=!this.beans.showRowGroupCols?.getSourceColumnsForGroupColumn(t)?.every(l=>o==l.getSortDef()?.direction);e.toggleCss("ag-header-cell-sorted-mixed",a)}};e.addManagedEventListeners({sortChanged:n,columnPinned:n,columnRowGroupChanged:n,displayedColumnsChanged:n})}initCol(e){const{sortIndex:t,initialSortIndex:n}=e.colDef,i=R0(e.colDef);i&&e.setSortDef(i,!0),t!==void 0?t!==null&&(e.sortIndex=t):n!==null&&(e.sortIndex=n)}updateColSort(e,t,n){t!==void 0&&this.setColSort(e,Li(t),n)}setColSort(e,t,n){Vd(e.getSortDef(),t)||(e.setSortDef(Li(t),t===void 0),e.dispatchColEvent("sortChanged",n)),e.dispatchStateUpdatedEvent("sort")}setColSortIndex(e,t){e.sortIndex=t,e.dispatchStateUpdatedEvent("sortIndex")}createSortIndicator(e){return new ev(e)}getSortIndicatorSelector(){return JW}},UF={moduleName:"Sort",version:ve,beans:[e3,QW],apiFunctions:{onSortChanged:ZW},userComponents:{agSortIndicator:ev},icons:{sortAscending:"asc",sortDescending:"desc",sortUnSort:"none",sortAbsoluteAscending:"aasc",sortAbsoluteDescending:"adesc"}},t3=class extends X{constructor(){super(...arguments),this.beanName="syncSvc",this.waitingForColumns=!1}postConstruct(){this.addManagedPropertyListener("columnDefs",e=>this.setColumnDefs(e))}start(){this.beans.ctrlsSvc.whenReady(this,()=>{const e=this.gos.get("columnDefs");e?this.setColumnsAndData(e):this.waitingForColumns=!0,this.gridReady()})}setColumnsAndData(e){const{colModel:t,rowModel:n}=this.beans;t.setColumnDefs(e??[],"gridInitializing"),n.start()}gridReady(){const{eventSvc:e,gos:t}=this;e.dispatchEvent({type:"gridReady"}),Br(t,`initialised successfully, enterprise = ${t.isModuleRegistered("EnterpriseCore")}`)}setColumnDefs(e){const t=this.gos.get("columnDefs");if(t){if(this.waitingForColumns){this.waitingForColumns=!1,this.setColumnsAndData(t);return}this.beans.colModel.setColumnDefs(t,qa(e.source))}}};function n3(e){e.valueCache?.expire()}function i3(e,t){const{colKey:n,rowNode:i,useFormatter:o,from:r="edit"}=t,s=e.colModel.getColDefCol(n)??e.colModel.getCol(n);if(!s)return null;const a=e.valueSvc.getValueForDisplay({column:s,node:i,includeValueFormatted:o,from:r});return o?a.valueFormatted??_a(a.value):a.value}var o3="paste",r3=class extends X{constructor(){super(...arguments),this.beanName="changeDetectionSvc",this.deferredDepth=0,this.batchedPath=null,this.batchedNodes=null}destroy(){super.destroy(),this.batchedPath=null,this.batchedNodes=null}postConstruct(){this.csrm=Eo(this.beans),this.addManagedEventListeners({cellValueChanged:this.onCellValueChanged.bind(this)})}beginDeferred(){this.deferredDepth++}endDeferred(){if(this.deferredDepth===0||--this.deferredDepth>0)return;const e=this.batchedPath,t=this.batchedNodes;this.batchedPath=null,this.batchedNodes=null,e&&this.csrm?.doAggregate(e);const{rowRenderer:n}=this.beans;if(t)for(const i of t)$F(n,i);if(e){const i=e.getSortedRows();for(let o=0,r=i.length;o<r;++o)$F(n,i[o])}(this.batchedPath||this.batchedNodes)&&(this.deferredDepth=1,this.endDeferred())}onCellValueChanged(e){const{gos:t,rowModel:n,changedPathFactory:i}=this.beans;if(e.source===o3||t.get("suppressChangeDetection")||!n.rootNode)return;const o=e.node.primaryRow;if(this.csrm){let r=this.batchedPath;r||(r=i?.newPath(t.get("aggregateOnlyChangedColumns"))??null,this.batchedPath=r);let s=o;o.group||((this.batchedNodes??(this.batchedNodes=new Set)).add(o),s=o.parent),r?.addCell(s,e.column.getColId())}else(this.batchedNodes??(this.batchedNodes=new Set)).add(o);this.deferredDepth===0&&(this.deferredDepth=1,this.endDeferred())}},$F=(e,t)=>{const{sibling:n,pinnedSibling:i}=t;e.refreshRowByNode(t),e.refreshRowByNode(n),e.refreshRowByNode(i),e.refreshRowByNode(n?.pinnedSibling),e.refreshRowByNode(i?.sibling)},s3=class extends X{constructor(){super(...arguments),this.beanName="expressionSvc",this.cache={}}evaluate(e,t){if(typeof e=="string")return this.evaluateExpression(e,t);gt(15,{expression:e})}evaluateExpression(e,t){try{return this.createExpressionFunction(e)(t.value,t.context,t.oldValue,t.newValue,t.value,t.node,t.data,t.colDef,t.rowIndex,t.api,t.getValue,t.column,t.columnGroup)}catch(n){return gt(16,{expression:e,params:t,e:n}),null}}createExpressionFunction(e){const t=this.cache;if(t[e])return t[e];const n=this.createFunctionBody(e),i=new Function("x, ctx, oldValue, newValue, value, node, data, colDef, rowIndex, api, getValue, column, columnGroup",n);return t[e]=i,i}createFunctionBody(e){return e.includes("return")?e:"return "+e+";"}},a3=class extends X{constructor(){super(...arguments),this.beanName="valueCache",this.cacheVersion=0}postConstruct(){const e=this.gos;this.active=e.get("valueCache"),this.neverExpires=e.get("valueCacheNeverExpires")}onDataChanged(){this.neverExpires||this.expire()}expire(){this.cacheVersion++}setValue(e,t,n){if(this.active){const i=this.cacheVersion;e.__cacheVersion!==i&&(e.__cacheVersion=i,e.__cacheData={}),e.__cacheData[t]=n}}getValue(e,t){if(!(!this.active||e.__cacheVersion!==this.cacheVersion))return e.__cacheData[t]}},l3={moduleName:"ValueCache",version:ve,beans:[a3],apiFunctions:{expireValueCache:n3}},c3={moduleName:"Expression",version:ve,beans:[s3]},u3={moduleName:"ChangeDetection",version:ve,beans:[r3]},d3={moduleName:"CellApi",version:ve,apiFunctions:{getCellValue:i3}},h3=class extends X{constructor(){super(...arguments),this.beanName="valueSvc",this.initialised=!1,this.isSsrm=!1}wireBeans(e){this.expressionSvc=e.expressionSvc,this.colModel=e.colModel,this.valueCache=e.valueCache,this.dataTypeSvc=e.dataTypeSvc,this.editSvc=e.editSvc,this.formulaDataSvc=e.formulaDataSvc,this.rowGroupColsSvc=e.rowGroupColsSvc}postConstruct(){this.initialised||this.init()}init(){const{gos:e,valueCache:t}=this;this.executeValueGetter=t?this.executeValueGetterWithValueCache.bind(this):this.executeValueGetterWithoutValueCache.bind(this),this.isSsrm=wc(e),this.cellExpressions=e.get("enableCellExpressions"),this.isTreeData=e.get("treeData"),this.initialised=!0;const n=i=>this.callColumnCellValueChangedHandler(i);this.eventSvc.addListener("cellValueChanged",n,!0),this.addDestroyFunc(()=>this.eventSvc.removeListener("cellValueChanged",n,!0)),this.addManagedPropertyListener("treeData",i=>this.isTreeData=i.currentValue)}getValueForDisplay(e){const t=this.beans,n=e.column,i=e.node,o=t.showRowGroupColValueSvc,r=!n&&i.group,s=n?.colDef.showRowGroup,a=!this.isTreeData||i.footer;if(o&&a&&(r||s)){const p=o.getGroupValue(i,n,this.displayIgnoresAggData(i));return p==null?{value:null,valueFormatted:null}:{value:p.value,valueFormatted:e.includeValueFormatted?o.formatAndPrefixGroupColValue(p,n,e.exporting):null}}if(!n)return{value:i.key,valueFormatted:null};let l=this.getValue(n,i,e.from,this.displayIgnoresAggData(i)),u=l;const h=t.formula;n.isAllowFormula()&&h?.isFormula(l)&&(e.useRawFormula?(l=h.normaliseFormula(l,!0),u=h.resolveValue(n,i)):(l=h.resolveValue(n,i),u=l));const f=e.includeValueFormatted&&!(e.exporting&&n.colDef.useValueFormatterForExport===!1);return{value:l,valueFormatted:f?this.formatValue(n,i,u):null}}getValue(e,t,n,i=!1){if(this.initialised||this.init(),!t)return;const o=e.colDef,r=t.group;if(!r){const l=o.pivotValueColumn;l&&(e=l)}const s=this.editSvc?.getPendingEditValue(t,e,n);if(s!==void 0)return s;let a=this.resolveValue(e,t,i,r);if(a===void 0){if(r){const l=o.showRowGroup;if(typeof l=="string"){const u=this.rowGroupColsSvc?.getColumnIndex(l);if(u!=null&&u>t.level)return null}}return}if(this.cellExpressions&&PS(a)){const l=a.substring(1);a=this.executeValueGetter(l,t.data,e,t)}return a}displayIgnoresAggData(e){return!e.group||e.footer||e.level===-1||!e.sibling||this.gos.get("groupSuppressBlankHeader")||e.leafGroup&&this.colModel.isPivotMode()?!1:!!e.expanded}resolveValue(e,t,n,i){const o=e.colDef,r=e.colId,s=!i&&this.formulaDataSvc;if(s&&s.hasDataSource()&&o.allowFormula===!0){const R=s.getFormula({column:e,rowNode:t});if(PS(R))return R}const a=i&&!n?t.aggData:void 0,l=this.isTreeData;if(l&&a?.[r]!==void 0)return a[r];const u=t.data,h=o.field,f=o.valueGetter;if(l){if(f)return this.executeValueGetter(f,u,e,t);if(h&&u)return Mc(u,h,e.isFieldContainsDots())}const p=t.groupData;if(p&&r in p)return p[r];if(a?.[r]!==void 0)return a[r];const m=o.showRowGroup,v=typeof m!="string"||!i,w=this.isSsrm,b=w&&n&&!!o.aggFunc;if(f&&!b)return v?this.executeValueGetter(f,u,e,t):void 0;if(w&&t.footer&&t.field&&(m===!0||m===t.field))return Mc(u,t.field,e.isFieldContainsDots());if(h&&u&&!b)return v?Mc(u,h,e.isFieldContainsDots()):void 0}parseValue(e,t,n,i){const o=e.getColDef();if(o.allowFormula&&this.beans.formula?.isFormula(n))return n;const r=o.valueParser;if(we(r)){const s=We(this.gos,{node:t,data:t?.data,oldValue:i,newValue:n,colDef:o,column:e});return typeof r=="function"?r(s):this.expressionSvc?.evaluate(r,s)}return n}getDeleteValue(e,t){return we(e.getColDef().valueParser)?this.parseValue(e,t,"",this.getValueForDisplay({column:e,node:t,from:"edit"}).value)??null:null}formatValue(e,t,n,i,o=!0){const{expressionSvc:r}=this.beans;let s=null,a;const l=e.getColDef();if(i?a=i:o&&(a=l.valueFormatter),a){const u=t?t.data:null,h=We(this.gos,{value:n,node:t,data:u,colDef:l,column:e});typeof a=="function"?s=a(h):s=r?r.evaluate(a,h):null}else if(l.refData)return l.refData[n]||"";return s==null&&Array.isArray(n)&&(s=n.join(", ")),s}setValue(e,t,n,i){const o=t.getColDef();if(!e.data&&this.canCreateRowNodeData(e,o)&&(e.data={}),!this.isSetValueSupported(t,e,n,o))return!1;const r=this.getValue(t,e,"data"),s=We(this.gos,{node:e,data:e.data,oldValue:r,newValue:n,colDef:o,column:t});let a=!1;if(e.data){const u=this.handleExternalFormulaChange({column:t,eventSource:i,newValue:n,setterParams:s,rowNode:e});if(u!==null)return u;a=this.computeValueChange({column:t,rowNode:e,newValue:n,params:s,rowData:e.data,valueSetter:o.valueSetter,field:o.field})??!0}const l=this.beans.changeDetectionSvc;l?.beginDeferred();try{if(e.group){const u=this.beans.rowGroupingEditValueSvc?.setGroupDataValue(e,t,n,r,i,a||n!==r);if(u!==void 0)return!a&&!u?!1:this.finishValueChange(e,t,s,i,n)}return a?this.finishValueChange(e,t,s,i):!1}finally{l?.endDeferred()}}canCreateRowNodeData(e,t){return e.group?!(t.groupRowValueSetter!=null||t.groupRowEditable!=null||t.pivotValueColumn):!0}finishValueChange(e,t,n,i,o){e.resetQuickFilterAggregateText(),this.valueCache?.onDataChanged();const r=o===void 0?this.getValue(t,e,"data"):o;return this.dispatchCellValueChangedEvent(e,n,r,i),e.pinnedSibling&&this.dispatchCellValueChangedEvent(e.pinnedSibling,n,r,i),!0}isSetValueSupported(e,t,n,i){const{field:o,valueSetter:r}=i,s=this.beans.formula,a=e.isAllowFormula()&&s?.isFormula(n),l=!!this.formulaDataSvc?.hasDataSource();return Nt(o)&&Nt(r)&&!(l&&a)?t.group&&(i.groupRowValueSetter||i.groupRowEditable)?!0:(se(17),!1):this.dataTypeSvc&&!this.dataTypeSvc.checkType(e,n)?(se(135),!1):!0}handleExternalFormulaChange(e){const{column:t,rowNode:n,newValue:i,eventSource:o,setterParams:r}=e,s=this.beans.formula,a=this.formulaDataSvc;if(!a?.hasDataSource()||!t.isAllowFormula())return null;const l=s?.isFormula(i),u=a.getFormula({column:t,rowNode:n});if(l){if(!(u!==i))return!1;a.setFormula({column:t,rowNode:n,formula:i});const f=s?.resolveValue(t,n),p=t.getColDef();if(we(p.valueSetter)||!Nt(p.field)){const m={...r,newValue:f};this.computeValueChange({column:t,rowNode:n,newValue:f,params:m,rowData:n.data,valueSetter:p.valueSetter,field:p.field})}return this.finishValueChange(n,t,r,o)}return u!==void 0&&a.setFormula({column:t,rowNode:n,formula:void 0}),null}computeValueChange(e){const{valueSetter:t,params:n,rowData:i,field:o,column:r,newValue:s}=e;return we(t)?typeof t=="function"?t(n):this.expressionSvc?.evaluate(t,n):!!i&&this.setValueUsingField(i,o,s,r.isFieldContainsDots())}dispatchCellValueChangedEvent(e,t,n,i){this.eventSvc.dispatchEvent({type:"cellValueChanged",event:null,rowIndex:e.rowIndex,rowPinned:e.rowPinned,column:t.column,colDef:t.colDef,data:e.data,node:e,oldValue:t.oldValue,newValue:n,newRawValue:t.newValue,value:n,source:i})}callColumnCellValueChangedHandler(e){const t=e.colDef.onCellValueChanged;typeof t=="function"&&this.beans.frameworkOverrides.wrapOutgoing(()=>{t(e)})}setValueUsingField(e,t,n,i){if(!t)return!1;let o=!1;if(!i)o=e[t]===n,o||(e[t]=n);else{const r=t.split(".");let s=e;for(;r.length>0&&s;){const a=r.shift();r.length===0?(o=s[a]===n,o||(s[a]=n)):s=s[a]}}return!o}executeValueGetterWithValueCache(e,t,n,i){const o=n.getColId(),r=this.valueCache.getValue(i,o);if(r!==void 0)return r;const s=this.executeValueGetterWithoutValueCache(e,t,n,i);return this.valueCache.setValue(i,o,s),s}executeValueGetterWithoutValueCache(e,t,n,i){const o=We(this.gos,{data:t,node:i,column:n,colDef:n.getColDef(),getValue:s=>this.getValueCallback(i,s)});let r;return typeof e=="function"?r=e(o):r=this.expressionSvc?.evaluate(e,o),r}getValueCallback(e,t){const n=this.colModel.getColDefCol(t);return n?this.getValue(n,e,"data"):null}getKeyForNode(e,t){const n=this.getValue(e,t,"data"),i=e.getColDef().keyCreator;let o=n;if(i){const r=We(this.gos,{value:n,colDef:e.getColDef(),column:e,node:t,data:t.data});o=i(r)}return typeof o=="string"||o==null||(o=String(o),o==="[object Object]"&&se(121)),o}},f3={moduleName:"CommunityCore",version:ve,beans:[YV,HN,FH,i_,$W,mG,UV,p5,RG,gW,pW,KW,h3,qV,WV,QV,PH,t3,vH,CH,P5],icons:{selectOpen:"small-down",smallDown:"small-down",colorPicker:"color-picker",smallUp:"small-up",checkboxChecked:"small-up",checkboxIndeterminate:"checkbox-indeterminate",checkboxUnchecked:"checkbox-unchecked",radioButtonOn:"radio-button-on",radioButtonOff:"radio-button-off",smallLeft:"small-left",smallRight:"small-right"},apiFunctions:{getGridId:VN,destroy:WN,isDestroyed:zN,getGridOption:UN,setGridOption:$N,updateGridOptions:IR,isModuleRegistered:jN},dependsOn:[gH,jB,tG,UF,S5,CG,R5,UW,u3,x5,fW,wW,SW,T5,yH,mH,c3,kG,xW]};function tv(e){const{inputValue:t,allSuggestions:n,hideIrrelevant:i,filterByPercentageOfBestMatch:o}=e;let r=(n??[]).map((l,u)=>({value:l,relevance:p3(t,l),idx:u}));if(r.sort((l,u)=>l.relevance-u.relevance),i&&(r=r.filter(l=>l.relevance<Math.max(l.value.length,t.length))),r.length>0&&o&&o>0){const u=r[0].relevance*o;r=r.filter(h=>u-h.relevance<0)}const s=[],a=[];for(const l of r)s.push(l.value),a.push(l.idx);return{values:s,indices:a}}function p3(e,t){const n=e.length,i=t.length;if(i===0)return n||0;let o=e.toLocaleLowerCase(),r=t.toLocaleLowerCase(),s;e.length<t.length&&(s=r,r=o,o=s,s=t,t=e,e=s);let a=new Uint16Array(i+1),l=new Uint16Array(i+1);for(let f=0;f<=i;f++)a[f]=f;let u=0;const h=n/2-10;for(let f=1;f<=n;f++){const p=e[f-1],m=o[f-1];l[0]=f;for(let v=1;v<=i;v++){const w=t[v-1],b=r[v-1];if(m!==b){const y=l[v-1],R=a[v],S=a[v-1];let P=y<R?y:R;S<P&&(P=S),l[v]=P+1|0;continue}if(u++,p===w&&u++,f>1&&v>1){const y=e[f-2],R=o[f-2],S=t[v-2],P=r[v-2];R===P&&(u++,y===S&&u++)}f<h&&u++,l[v]=a[v-1]}s=a,a=l,l=s}return a[i]/(u+1)}var jF={AdvancedFilter:1,AiToolkit:1,AllEnterprise:1,BatchEdit:1,CellSelection:1,Clipboard:1,ColumnMenu:1,ColumnsToolPanel:1,ContextMenu:1,ExcelExport:1,FiltersToolPanel:1,Find:1,GridCharts:1,IntegratedCharts:1,GroupFilter:1,MasterDetail:1,Menu:1,MultiFilter:1,NewFiltersToolPanel:1,Pivot:1,RangeSelection:1,RichSelect:1,RowNumbers:1,RowGrouping:1,RowGroupingEdit:1,RowGroupingPanel:1,ServerSideRowModelApi:1,ServerSideRowModel:1,SetFilter:1,SideBar:1,Sparklines:1,StatusBar:1,TreeData:1,ViewportRowModel:1,Formula:1},nv=["TextFilter","NumberFilter","BigIntFilter","DateFilter","SetFilter","MultiFilter","GroupFilter","CustomFilter"],g3={EditCore:["TextEditor","NumberEditor","DateEditor","CheckboxEditor","LargeTextEditor","SelectEditor","RichSelect","CustomEditor"],CheckboxCellRenderer:["AllCommunity"],ClientSideRowModelHierarchy:["RowGrouping","Pivot","TreeData"],ColumnFilter:nv,ColumnGroupHeaderComp:["AllCommunity"],ColumnGroup:["AllCommunity"],ColumnHeaderComp:["AllCommunity"],ColumnMove:["AllCommunity"],ColumnResize:["AllCommunity"],CommunityCore:["AllCommunity"],CsrmSsrmSharedApi:["ClientSideRowModelApi","ServerSideRowModelApi"],RowModelSharedApi:["ClientSideRowModelApi","ServerSideRowModelApi"],EnterpriseCore:["AllEnterprise"],FilterCore:[...nv,"QuickFilter","ExternalFilter","AdvancedFilter"],GroupCellRenderer:["RowGrouping","Pivot","TreeData","MasterDetail","ServerSideRowModel"],KeyboardNavigation:["AllCommunity"],LoadingCellRenderer:["ServerSideRowModel"],MenuCore:["ColumnMenu","ContextMenu"],MenuItem:["ColumnMenu","ContextMenu","MultiFilter","IntegratedCharts","ColumnsToolPanel"],Overlay:["AllCommunity"],PinnedColumn:["AllCommunity"],SharedAggregation:["RowGrouping","Pivot","TreeData","ServerSideRowModel"],SharedDragAndDrop:["AllCommunity"],SharedMasterDetail:["MasterDetail","ServerSideRowModel"],SharedMenu:[...nv,"ColumnMenu","ContextMenu"],SharedPivot:["Pivot","ServerSideRowModel"],SharedRowGrouping:["RowGrouping","ServerSideRowModel"],SharedRowSelection:["RowSelection","ServerSideRowModel"],SkeletonCellRenderer:["ServerSideRowModel"],Sort:["AllCommunity"],SsrmInfiniteSharedApi:["InfiniteRowModel","ServerSideRowModelApi"],SharedTreeData:["TreeData","ServerSideRowModel"]},m3={InfiniteRowModel:"infinite",ClientSideRowModelApi:"clientSide",ClientSideRowModel:"clientSide",ServerSideRowModelApi:"serverSide",ServerSideRowModel:"serverSide",ViewportRowModel:"viewport"};function v3(e,t){const n=[];for(const i of Array.isArray(e)?e:[e]){const o=g3[i];if(o)for(const r of o){const s=m3[r];(!s||s===t)&&n.push(r)}else n.push(i)}return n}var KF=()=>`No AG Grid modules are registered! It is recommended to start with all Community features via the AllCommunityModule:
|
|
23
|
+
If you want to hide the page size selector, set paginationPageSizeSelector to false.`}},pivotMode:{dependencies:{treeData:{required:[!1,void 0],reason:"Pivot Mode is not supported with Tree Data."}}},quickFilterText:{supportedRowModels:["clientSide"]},rowBuffer:{validate({rowBuffer:n}){return Oo("rowBuffer",n,0)}},rowClass:{validate:n=>typeof n.rowClass=="function"?"rowClass should not be a function, please use getRowClass instead":null},rowData:{supportedRowModels:["clientSide"]},rowDragManaged:{supportedRowModels:["clientSide"],dependencies:{pagination:{required:[!1,void 0]}}},rowSelection:{validate({rowSelection:n}){return n&&typeof n=="string"?'As of version 32.2.1, using `rowSelection` with the values "single" or "multiple" has been deprecated. Use the object value instead.':n&&typeof n!="object"?"Expected `RowSelectionOptions` object for the `rowSelection` property.":n&&n.mode!=="multiRow"&&n.mode!=="singleRow"?`Selection mode "${n.mode}" is invalid. Use one of 'singleRow' or 'multiRow'.`:null}},rowStyle:{validate:n=>{const i=n.rowStyle;return i&&typeof i=="function"?"rowStyle should be an object of key/value styles, not be a function, use getRowStyle() instead":null}},serverSideDatasource:{supportedRowModels:["serverSide"]},serverSideInitialRowCount:{supportedRowModels:["serverSide"],validate({serverSideInitialRowCount:n}){return Oo("serverSideInitialRowCount",n,1)}},serverSideOnlyRefreshFilteredGroups:{supportedRowModels:["serverSide"]},serverSideSortAllLevels:{supportedRowModels:["serverSide"]},sortingOrder:{validate:n=>{const i=n.sortingOrder;if(Array.isArray(i)&&i.length>0){const o=i.filter(r=>!Li(r));if(o.length>0)return`sortingOrder must be an array of type (SortDirection | SortDef)[], incorrect items are: ${o.map(r=>typeof r=="string"||r==null?Od(r):JSON.stringify(r))}]`}else if(!Array.isArray(i)||!i.length)return`sortingOrder must be an array with at least one element, currently it's ${i}`;return null}},tooltipHideDelay:{validate:n=>n.tooltipHideDelay&&n.tooltipHideDelay<0?"tooltipHideDelay should not be lower than 0":null},tooltipShowDelay:{validate:n=>n.tooltipShowDelay&&n.tooltipShowDelay<0?"tooltipShowDelay should not be lower than 0":null},tooltipSwitchShowDelay:{validate:n=>n.tooltipSwitchShowDelay&&n.tooltipSwitchShowDelay<0?"tooltipSwitchShowDelay should not be lower than 0":null},treeData:{supportedRowModels:["clientSide","serverSide"],validate:n=>{const i=n.rowModelType??"clientSide";switch(i){case"clientSide":{const{treeDataChildrenField:o,treeDataParentIdField:r,getDataPath:s,getRowId:a}=n;if(!o&&!r&&!s)return"treeData requires either 'treeDataChildrenField' or 'treeDataParentIdField' or 'getDataPath' in the clientSide row model.";if(o){if(s)return"Cannot use both 'treeDataChildrenField' and 'getDataPath' at the same time.";if(r)return"Cannot use both 'treeDataChildrenField' and 'treeDataParentIdField' at the same time."}if(r){if(!a)return"getRowId callback not provided, tree data with parent id cannot be built.";if(s)return"Cannot use both 'treeDataParentIdField' and 'getDataPath' at the same time."}return null}case"serverSide":{const o=`treeData requires 'isServerSideGroup' and 'getServerSideGroupKey' in the ${i} row model.`;return n.isServerSideGroup&&n.getServerSideGroupKey?null:o}}return null}},viewportDatasource:{supportedRowModels:["viewport"]},viewportRowModelBufferSize:{validate({viewportRowModelBufferSize:n}){return Oo("viewportRowModelBufferSize",n,0)}},viewportRowModelPageSize:{validate({viewportRowModelPageSize:n}){return Oo("viewportRowModelPageSize",n,1)}},rowDragEntireRow:{dependencies:{cellSelection:{required:[void 0]}}},autoGroupColumnDef:{validate({autoGroupColumnDef:n,showOpenedGroup:i}){return n?.field&&i?"autoGroupColumnDef.field and showOpenedGroup are not supported when used together.":n?.valueGetter&&i?"autoGroupColumnDef.valueGetter and showOpenedGroup are not supported when used together.":null}},renderingMode:{validate:n=>{const i=n.renderingMode,o=["default","legacy"];return i&&!o.includes(i)?`renderingMode must be one of [${o.join()}], currently it's ${i}`:null}},autoSizeStrategy:{validate:({autoSizeStrategy:n})=>{if(!n)return null;const i=["fitCellContents","fitGridWidth","fitProvidedWidth"],o=n.type;return o!=="fitCellContents"&&o!=="fitGridWidth"&&o!=="fitProvidedWidth"?`Invalid Auto-size strategy. \`autoSizeStrategy\` must be one of ${i.map(r=>'"'+r+'"').join(", ")}, currently it's ${o}`:o==="fitProvidedWidth"&&typeof n.width!="number"?`When using the 'fitProvidedWidth' auto-size strategy, must provide a numeric \`width\`. You provided ${n.width}`:null}}},t={};for(const n of $m)t[n]={expectedType:"boolean"};for(const n of Um)t[n]={expectedType:"number"};return Wn(t,e),t},d5=()=>({objectName:"gridOptions",allProperties:[...jm(),...Object.values(vh)],propertyExceptions:["api"],docsUrl:"grid-options/",deprecations:l5(),validations:u5()}),h5=0,f5=0,IF="__ag_grid_instance",p5=class extends X{constructor(){super(...arguments),this.beanName="gos",this.domDataKey="__AG_"+Math.random().toString(),this.instanceId=f5++,this.gridReadyFired=!1,this.queueEvents=[],this.propEventSvc=new Ts,this.globalEventHandlerFactory=e=>(t,n)=>{if(!this.isAlive())return;const i=kc.has(t);if(i&&!e||!i&&e||!g5(t))return;const o=(r,s)=>{const a=vh[r],l=this.gridOptions[a];typeof l=="function"&&this.beans.frameworkOverrides.wrapOutgoing(()=>l(s))};if(this.gridReadyFired)o(t,n);else if(t==="gridReady"){o(t,n),this.gridReadyFired=!0;for(const r of this.queueEvents)o(r.eventName,r.event);this.queueEvents=[]}else this.queueEvents.push({eventName:t,event:n})}}wireBeans(e){this.gridOptions=e.gridOptions,this.validation=e.validation,this.api=e.gridApi,this.gridId=e.context.getId()}get gridOptionsContext(){return this.gridOptions.context}postConstruct(){this.validateGridOptions(this.gridOptions),this.eventSvc.addGlobalListener(this.globalEventHandlerFactory().bind(this),!0),this.eventSvc.addGlobalListener(this.globalEventHandlerFactory(!0).bind(this),!1),this.propEventSvc.setFrameworkOverrides(this.beans.frameworkOverrides),this.addManagedEventListeners({gridOptionsChanged:({options:e})=>{this.updateGridOptions({options:e,force:!0,source:"optionsUpdated"})}})}destroy(){super.destroy(),this.queueEvents=[]}get(e){return this.gridOptions[e]??jL[e]}getCallback(e){return this.mergeGridCommonParams(this.gridOptions[e])}exists(e){return we(this.gridOptions[e])}mergeGridCommonParams(e){return e&&(n=>e(this.addCommon(n)))}updateGridOptions({options:e,force:t,source:n="api"}){const i={id:h5++,properties:[]},o=[],{gridOptions:r,validation:s}=this;for(const a of Object.keys(e)){const l=xg.applyGlobalGridOption(a,e[a]);s?.warnOnInitialPropertyUpdate(n,a);const u=t||typeof l=="object"&&n==="api",h=r[a];if(u||h!==l){r[a]=l;const f={type:a,currentValue:l,previousValue:h,changeSet:i,source:n};o.push(f)}}this.validateGridOptions(this.gridOptions),i.properties=o.map(a=>a.type);for(const a of o)Br(this,`Updated property ${a.type} from`,a.previousValue," to ",a.currentValue),this.propEventSvc.dispatchEvent(a)}addPropertyEventListener(e,t){this.propEventSvc.addEventListener(e,t)}removePropertyEventListener(e,t){this.propEventSvc.removeEventListener(e,t)}getDomDataKey(){return this.domDataKey}addCommon(e){return e.api=this.api,e.context=this.gridOptionsContext,e}validateOptions(e,t){for(const n of Object.keys(e)){const i=e[n];if(i==null||i===!1)continue;let o=t[n];typeof o=="function"&&(o=o(e,this.gridOptions,this.beans)),o&&this.assertModuleRegistered(o,n)}}validateGridOptions(e){this.validateOptions(e,c5),this.validation?.processGridOptions(e)}validateColDef(e,t,n){(n||!this.beans.dataTypeSvc?.isColPendingInference(t))&&(this.validateOptions(e,JV),this.validation?.validateColDef(e))}assertModuleRegistered(e,t){const n=Array.isArray(e)?e.some(i=>this.isModuleRegistered(i)):this.isModuleRegistered(e);return n||gt(200,{...this.getModuleErrorParams(),moduleName:e,reasonOrId:t}),n}getModuleErrorParams(){return{gridId:this.gridId,gridScoped:Eg(),rowModelType:this.get("rowModelType"),isUmd:JS()}}isModuleRegistered(e){return Pg(e,this.gridId,this.get("rowModelType"))}setInstanceDomData(e){e[IF]=this.instanceId}isElementInThisInstance(e){let t=e;for(;t;){const n=t[IF];if(we(n))return n===this.instanceId;t=t.parentElement}return!1}};function g5(e){return!!vh[e]}var m5=class extends X{constructor(e,t){super(),this.column=e,this.eGui=t,this.lastMovingChanged=0}postConstruct(){this.addManagedElementListeners(this.eGui,{click:e=>e&&this.onClick(e)}),this.addManagedListeners(this.column,{movingChanged:()=>{this.lastMovingChanged=Date.now()}})}onClick(e){const{sortSvc:t,rangeSvc:n,gos:i}=this.beans;if(!(ja(i)?e.altKey:!0))n?.handleColumnSelection(this.column,e);else if(this.column.isSortable()){const r=this.column.isMoving(),a=Date.now()-this.lastMovingChanged<50;r||a||t?.progressSortFromEvent(this.column,e)}}};function v5(e,t){const n={"aria-hidden":"true"};return{tag:"div",cls:"ag-cell-label-container",role:"presentation",children:[{tag:"span",ref:"eMenu",cls:"ag-header-icon ag-header-cell-menu-button",attrs:n},{tag:"span",ref:"eFilterButton",cls:"ag-header-icon ag-header-cell-filter-button",attrs:n},{tag:"div",ref:"eLabel",cls:"ag-header-cell-label",role:"presentation",children:[e?{tag:"span",ref:"eColRef",cls:"ag-header-col-ref"}:null,{tag:"span",ref:"eText",cls:"ag-header-cell-text"},{tag:"span",ref:"eFilter",cls:"ag-header-icon ag-header-label-icon ag-filter-icon",attrs:n},t?{tag:"ag-sort-indicator",ref:"eSortIndicator"}:null]}]}}var C5=class extends yt{constructor(){super(...arguments),this.eFilter=he,this.eFilterButton=he,this.eSortIndicator=he,this.eMenu=he,this.eLabel=he,this.eText=he,this.eColRef=he,this.eSortOrder=he,this.eSortAsc=he,this.eSortDesc=he,this.eSortMixed=he,this.eSortNone=he,this.eSortAbsoluteAsc=he,this.eSortAbsoluteDesc=he,this.isLoadingInnerComponent=!1}refresh(e){const t=this.params;if(this.params=e,this.workOutTemplate(e,!!this.beans?.sortSvc)!=this.currentTemplate||this.workOutShowMenu()!=this.currentShowMenu||e.enableSorting!=this.currentSort||e.column.formulaRef!=this.currentRef||this.currentSuppressMenuHide!=null&&this.shouldSuppressMenuHide()!=this.currentSuppressMenuHide||t.enableFilterButton!=e.enableFilterButton||t.enableFilterIcon!=e.enableFilterIcon)return!1;if(this.innerHeaderComponent){const n={...e};Wn(n,e.innerHeaderComponentParams),this.innerHeaderComponent.refresh?.(n)}else this.setDisplayName(e);return!0}workOutTemplate(e,t){const{formula:n}=this.beans,i=e.template;return i?i?.trim?i.trim():i:v5(!!n?.active,t)}init(e){this.params=e;const{sortSvc:t,touchSvc:n,rowNumbersSvc:i,userCompFactory:o}=this.beans,r=t?.getSortIndicatorSelector();this.currentTemplate=this.workOutTemplate(e,!!r),this.setTemplate(this.currentTemplate,r?[r]:void 0),this.eLabel&&(this.mouseListener??(this.mouseListener=this.createManagedBean(new m5(e.column,this.eLabel)))),n?.setupForHeader(this),this.setMenu(),this.setupSort(),this.setupColumnRefIndicator(),i?.setupForHeader(this),this.setupFilterIcon(),this.setupFilterButton(),this.workOutInnerHeaderComponent(o,e),this.setDisplayName(e)}workOutInnerHeaderComponent(e,t){const n=y_(e,t,t);n&&(this.isLoadingInnerComponent=!0,n.newAgStackInstance().then(i=>{this.isLoadingInnerComponent=!1,i&&(this.isAlive()?(this.innerHeaderComponent=i,this.eText&&this.eText.appendChild(i.getGui())):this.destroyBean(i))}))}setDisplayName(e){const{displayName:t}=e,n=this.currentDisplayName;this.currentDisplayName=t,!(!this.eText||n===t||this.innerHeaderComponent||this.isLoadingInnerComponent)&&(this.eText.textContent=_a(t))}addInIcon(e,t,n){const i=ii(e,this.beans,n);i&&t.appendChild(i)}workOutShowMenu(){return this.params.enableMenu&&!!this.beans.menuSvc?.isHeaderMenuButtonEnabled()}shouldSuppressMenuHide(){return!!this.beans.menuSvc?.isHeaderMenuButtonAlwaysShowEnabled()}setMenu(){if(!this.eMenu)return;if(this.currentShowMenu=this.workOutShowMenu(),!this.currentShowMenu){Mi(this.eMenu),this.eMenu=void 0;return}const{gos:e,eMenu:t,params:n}=this,i=ni(e);this.addInIcon(i?"menu":"menuAlt",t,n.column),t.classList.toggle("ag-header-menu-icon",!i);const o=this.shouldSuppressMenuHide();this.currentSuppressMenuHide=o,this.addManagedElementListeners(t,{click:()=>this.showColumnMenu(this.eMenu)}),this.toggleMenuAlwaysShow(o)}toggleMenuAlwaysShow(e){this.eMenu?.classList.toggle("ag-header-menu-always-show",e)}showColumnMenu(e){const{currentSuppressMenuHide:t,params:n}=this;t||this.toggleMenuAlwaysShow(!0),n.showColumnMenu(e,()=>{t||this.toggleMenuAlwaysShow(!1)})}onMenuKeyboardShortcut(e){const{params:t,gos:n,beans:i,eMenu:o,eFilterButton:r}=this,s=t.column,a=ni(n);if(e&&!a){if(i.menuSvc?.isFilterMenuInHeaderEnabled(s))return t.showFilter(r??o??this.getGui()),!0}else if(t.enableMenu)return this.showColumnMenu(o??r??this.getGui()),!0;return!1}setupSort(){const{sortSvc:e}=this.beans;if(!e)return;const{enableSorting:t,column:n}=this.params;if(this.currentSort=t,!this.eSortIndicator){this.eSortIndicator=this.createBean(e.createSortIndicator(!0));const{eSortIndicator:i,eSortOrder:o,eSortAsc:r,eSortDesc:s,eSortMixed:a,eSortNone:l,eSortAbsoluteAsc:u,eSortAbsoluteDesc:h}=this;i.attachCustomElements(o,r,s,a,l,u,h)}this.eSortIndicator.setupSort(n),this.currentSort&&e.setupHeader(this,n)}setupColumnRefIndicator(){const{eColRef:e,beans:{editModelSvc:t},params:n}=this;e&&(this.currentRef=n.column.formulaRef,e.textContent=this.currentRef,bt(e,!1),this.addManagedEventListeners({cellEditingStarted:()=>{const i=t?.getEditPositions(),o=!!this.currentRef&&!!i?.some(r=>r.column.isAllowFormula());bt(e,o)},cellEditingStopped:()=>{bt(e,!1)}}))}setupFilterIcon(){const{eFilter:e,params:t}=this;if(!e)return;const n=()=>{const i=t.column.isFilterActive();bt(e,i,{skipAriaHidden:!0})};this.configureFilter(t.enableFilterIcon,e,n,"filterActive")}setupFilterButton(){const{eFilterButton:e,params:t}=this;if(!e)return;this.configureFilter(t.enableFilterButton,e,this.onFilterChangedButton.bind(this),"filter")?this.addManagedElementListeners(e,{click:()=>t.showFilter(e)}):this.eFilterButton=void 0}configureFilter(e,t,n,i){if(!e)return Mi(t),!1;const o=this.params.column;return this.addInIcon(i,t,o),this.addManagedListeners(o,{filterChanged:n}),n(),!0}onFilterChangedButton(){const e=this.params.column.isFilterActive();this.eFilterButton.classList.toggle("ag-filter-active",e)}getAnchorElementForMenu(e){const{eFilterButton:t,eMenu:n}=this;return e?t??n??this.getGui():n??t??this.getGui()}destroy(){super.destroy(),this.innerHeaderComponent=this.destroyBean(this.innerHeaderComponent),this.mouseListener=this.destroyBean(this.mouseListener)}},w5=class extends X{constructor(e,t){super(),this.eLabel=e,this.columnGroup=t,this.isSticky=!1,this.left=null,this.right=null}postConstruct(){const{columnGroup:e,beans:t}=this,{ctrlsSvc:n}=t;n.whenReady(this,()=>{const i=this.refreshPosition.bind(this);e.getPinned()==null&&this.addManagedEventListeners({bodyScroll:o=>{o.direction==="horizontal"&&this.updateSticky(o.left)}}),this.addManagedListeners(e,{leftChanged:i,displayedChildrenChanged:i}),this.addManagedEventListeners({columnResized:i}),this.refreshPosition()})}refreshPosition(){const{columnGroup:e,beans:t}=this,n=e.getLeft(),i=e.getActualWidth();if(n==null||i===0){this.left=null,this.right=null,this.setSticky(!1);return}this.left=n,this.right=n+i;const o=t.colViewport.getScrollPosition();o!=null&&this.updateSticky(o)}updateSticky(e){const{beans:t,left:n,right:i}=this;if(n==null||i==null){this.setSticky(!1);return}const{gos:o,visibleCols:r}=t,a=o.get("enableRtl")?r.bodyWidth-e:e;this.setSticky(n<a&&i>a)}setSticky(e){const{isSticky:t,eLabel:n}=this;t!==e&&(this.isSticky=e,n.classList.toggle("ag-sticky-label",e))}},b5={tag:"div",cls:"ag-header-group-cell-label",role:"presentation",children:[{tag:"span",ref:"agLabel",cls:"ag-header-group-text",role:"presentation"},{tag:"span",ref:"agOpened",cls:"ag-header-icon ag-header-expand-icon ag-header-expand-icon-expanded"},{tag:"span",ref:"agClosed",cls:"ag-header-icon ag-header-expand-icon ag-header-expand-icon-collapsed"}]},y5=class extends yt{constructor(){super(b5),this.agOpened=he,this.agClosed=he,this.agLabel=he,this.isLoadingInnerComponent=!1}init(e){const{userCompFactory:t,touchSvc:n}=this.beans;this.params=e,this.checkWarnings(),this.workOutInnerHeaderGroupComponent(t,e),this.setupLabel(e),this.addGroupExpandIcon(e),this.setupExpandIcons(),n?.setupForHeaderGroup(this)}checkWarnings(){this.params.template&&se(89)}workOutInnerHeaderGroupComponent(e,t){const n=R_(e,t,t);n&&(this.isLoadingInnerComponent=!0,n.newAgStackInstance().then(i=>{this.isLoadingInnerComponent=!1,i&&(this.isAlive()?(this.innerHeaderGroupComponent=i,this.agLabel.appendChild(i.getGui())):this.destroyBean(i))}))}setupExpandIcons(){const{agOpened:e,agClosed:t,params:{columnGroup:n},beans:{colGroupSvc:i}}=this;this.addInIcon("columnGroupOpened",e),this.addInIcon("columnGroupClosed",t);const o=l=>{if(sr(l))return;const u=!n.isExpanded();i.setColumnGroupOpened(n.getProvidedColumnGroup(),u,"uiColumnExpanded")};this.addTouchAndClickListeners(t,o),this.addTouchAndClickListeners(e,o);const r=l=>{Vs(l)};this.addManagedElementListeners(t,{dblclick:r}),this.addManagedElementListeners(e,{dblclick:r}),this.addManagedElementListeners(this.getGui(),{dblclick:o}),this.updateIconVisibility();const s=n.getProvidedColumnGroup(),a=this.updateIconVisibility.bind(this);this.addManagedListeners(s,{expandedChanged:a,expandableChanged:a})}addTouchAndClickListeners(e,t){this.beans.touchSvc?.setupForHeaderGroupElement(this,e,t),this.addManagedElementListeners(e,{click:t})}updateIconVisibility(){const{agOpened:e,agClosed:t,params:{columnGroup:n}}=this;if(n.isExpandable()){const i=n.isExpanded();bt(e,i),bt(t,!i)}else bt(e,!1),bt(t,!1)}addInIcon(e,t){const n=ii(e,this.beans,null);n&&t.appendChild(n)}addGroupExpandIcon(e){if(!e.columnGroup.isExpandable()){const{agOpened:t,agClosed:n}=this;bt(t,!1),bt(n,!1)}}setupLabel(e){const{displayName:t,columnGroup:n}=e,{innerHeaderGroupComponent:i,isLoadingInnerComponent:o}=this,r=i||o;we(t)&&!r&&(this.agLabel.textContent=_a(t)),n.getColGroupDef()?.suppressStickyLabel||this.createManagedBean(new w5(this.getGui(),n))}destroy(){super.destroy(),this.innerHeaderGroupComponent&&(this.destroyBean(this.innerHeaderGroupComponent),this.innerHeaderGroupComponent=void 0)}},S5={moduleName:"ColumnHeaderComp",version:ve,userComponents:{agColumnHeader:C5},icons:{menu:"menu",menuAlt:"menu-alt"}},R5={moduleName:"ColumnGroupHeaderComp",version:ve,userComponents:{agColumnGroupHeader:y5},icons:{columnGroupOpened:"expanded",columnGroupClosed:"contracted"}},F5=class extends X{constructor(){super(...arguments),this.beanName="animationFrameSvc",this.p1={list:[],sorted:!1},this.p2={list:[],sorted:!1},this.f1={list:[],sorted:!1},this.destroyTasks=[],this.ticking=!1,this.scrollGoingDown=!0,this.lastScrollTop=0,this.taskCount=0}setScrollTop(e){this.scrollGoingDown=e>=this.lastScrollTop,e===0&&(this.scrollGoingDown=!0),this.lastScrollTop=e}postConstruct(){this.active=!this.gos.get("suppressAnimationFrame"),this.batchFrameworkComps=this.beans.frameworkOverrides.batchFrameworkComps}verify(){this.active===!1&&se(92)}createTask(e,t,n,i,o=!1){this.verify();let r=n;i&&this.batchFrameworkComps&&(r="f1");const s={task:e,index:t,createOrder:++this.taskCount,deferred:o};this.addTaskToList(this[r],s),this.schedule()}addTaskToList(e,t){e.list.push(t),e.sorted=!1}sortTaskList(e){if(e.sorted)return;const t=this.scrollGoingDown?1:-1;e.list.sort((n,i)=>n.deferred!==i.deferred?n.deferred?-1:1:n.index!==i.index?t*(i.index-n.index):i.createOrder-n.createOrder),e.sorted=!0}addDestroyTask(e){this.verify(),this.destroyTasks.push(e),this.schedule()}executeFrame(e){const{p1:t,p2:n,f1:i,destroyTasks:o,beans:r}=this,{ctrlsSvc:s,frameworkOverrides:a}=r,l=t.list,u=n.list,h=i.list,f=Date.now();let p=0;const m=e<=0,v=s.getScrollFeature();for(;m||p<e;){if(!v.scrollGridIfNeeded()){let b;if(l.length)this.sortTaskList(t),b=l.pop().task;else if(u.length)this.sortTaskList(n),b=u.pop().task;else if(h.length)a.wrapOutgoing(()=>{for(;(m||p<e)&&!v.scrollGridIfNeeded();){if(h.length)this.sortTaskList(i),b=h.pop().task,b();else break;p=Date.now()-f}}),b=()=>{};else if(o.length)b=o.pop();else break;b()}p=Date.now()-f}l.length||u.length||h.length||o.length?this.requestFrame():this.ticking=!1}flushAllFrames(){this.active&&this.executeFrame(-1)}schedule(){this.active&&(this.ticking||(this.ticking=!0,this.requestFrame()))}requestFrame(){const e=this.executeFrame.bind(this,60);er(this.beans,e)}isQueueEmpty(){return!this.ticking}},x5={moduleName:"AnimationFrame",version:ve,beans:[F5]},P5=class extends X{constructor(){super(...arguments),this.beanName="iconSvc"}createIconNoSpan(e,t){return ii(e,this.beans,t?.column)}},E5=(e,t,n)=>t||e&&n,D5=class extends X{constructor(){super(...arguments),this.beanName="touchSvc"}mockBodyContextMenu(e,t){this.mockContextMenu(e,e.eBodyViewport,t)}mockHeaderContextMenu(e,t){this.mockContextMenu(e,e.eGui,t)}mockRowContextMenu(e){if(!Ns())return;const t=(n,i,o)=>{const{rowCtrl:r,cellCtrl:s}=e.getControlsForEventTarget(o?.target??null);s?.column&&s.dispatchCellContextMenuEvent(o??null),this.beans.contextMenuSvc?.handleContextMenuMouseEvent(void 0,o,r,s)};this.mockContextMenu(e,e.element,t)}handleCellDoubleClick(e,t){return(()=>{if(!Ns()||Ad("dblclick"))return!1;const i=Date.now(),o=i-e.lastIPadMouseClickEvent<200;return e.lastIPadMouseClickEvent=i,o})()?(e.onCellDoubleClicked(t),t.preventDefault(),!0):!1}setupForHeader(e){const{gos:t,sortSvc:n,menuSvc:i}=this.beans;if(t.get("suppressTouch"))return;const{params:o,eMenu:r,eFilterButton:s}=e,a=new Ws(e.getGui(),!0);e.addDestroyFunc(()=>a.destroy());const l=e.shouldSuppressMenuHide(),u=l&&we(r)&&o.enableMenu,h=!!i?.isHeaderContextMenuEnabled(o.column),f=E5(o.enableMenu,h,ni(t));let p=a;u&&(p=new Ws(r,!0),e.addDestroyFunc(()=>p.destroy()));const m=v=>o.showColumnMenuAfterMouseClick(v.touchStart);if(u&&o.enableMenu&&e.addManagedListeners(p,{tap:m}),f&&e.addManagedListeners(a,{longTap:m}),o.enableSorting){const v=w=>{const b=w.touchStart.target;l&&(r?.contains(b)||s?.contains(b))||n?.progressSort(o.column,!1,"uiColumnSorted")};e.addManagedListeners(a,{tap:v})}if(o.enableFilterButton&&s){const v=new Ws(s,!0);e.addManagedListeners(v,{tap:()=>o.showFilter(s)}),e.addDestroyFunc(()=>v.destroy())}}setupForHeaderGroup(e){const t=e.params;if(this.beans.menuSvc?.isHeaderContextMenuEnabled(t.columnGroup.getProvidedColumnGroup())){const n=new Ws(t.eGridHeader,!0),i=o=>t.showColumnMenuAfterMouseClick(o.touchStart);e.addManagedListeners(n,{longTap:i}),e.addDestroyFunc(()=>n.destroy())}}setupForHeaderGroupElement(e,t,n){const i=new Ws(t,!0);e.addManagedListeners(i,{tap:n}),e.addDestroyFunc(()=>i.destroy())}mockContextMenu(e,t,n){if(!Ns())return;const i=new Ws(t),o=r=>{mc(this.beans,r.touchEvent)&&n(void 0,r.touchStart,r.touchEvent)};e.addManagedListeners(i,{longTap:o}),e.addDestroyFunc(()=>i.destroy())}},T5={moduleName:"Touch",version:ve,beans:[D5]},A5=class extends X{constructor(){super(...arguments),this.beanName="cellNavigation"}wireBeans(e){this.rowSpanSvc=e.rowSpanSvc}getNextCellToFocus(e,t,n=!1){return n?this.getNextCellToFocusWithCtrlPressed(e,t):this.getNextCellToFocusWithoutCtrlPressed(e,t)}getNextCellToFocusWithCtrlPressed(e,t){const n=e===q.UP,i=e===q.DOWN,o=e===q.LEFT;let r,s;const{pageBounds:a,gos:l,visibleCols:u,pinnedRowModel:h}=this.beans,{rowPinned:f}=t;if(n||i)f&&h?n?s=0:s=f==="top"?h.getPinnedTopRowCount()-1:h.getPinnedBottomRowCount()-1:s=n?a.getFirstRow():a.getLastRow(),r=t.column;else{const p=l.get("enableRtl");s=t.rowIndex,r=(o!==p?u.allCols:[...u.allCols].reverse()).find(v=>!zn(v)&&this.isCellGoodToFocusOn({rowIndex:s,rowPinned:null,column:v}))}return r?{rowIndex:s,rowPinned:f,column:r}:null}getNextCellToFocusWithoutCtrlPressed(e,t){let n=t,i=!1;for(;!i;){switch(e){case q.UP:n=this.getCellAbove(n);break;case q.DOWN:n=this.getCellBelow(n);break;case q.RIGHT:n=this.gos.get("enableRtl")?this.getCellToLeft(n):this.getCellToRight(n);break;case q.LEFT:n=this.gos.get("enableRtl")?this.getCellToRight(n):this.getCellToLeft(n);break;default:n=null,se(8,{key:e});break}n?i=this.isCellGoodToFocusOn(n):i=!0}return n}isCellGoodToFocusOn(e){const t=e.column;let n;const{pinnedRowModel:i,rowModel:o}=this.beans;switch(e.rowPinned){case"top":n=i?.getPinnedTopRow(e.rowIndex);break;case"bottom":n=i?.getPinnedBottomRow(e.rowIndex);break;default:n=o.getRow(e.rowIndex);break}return n?!this.isSuppressNavigable(t,n):!1}getCellToLeft(e){if(!e)return null;const t=this.beans.visibleCols.getColBefore(e.column);return t?{rowIndex:e.rowIndex,column:t,rowPinned:e.rowPinned}:null}getCellToRight(e){if(!e)return null;const t=this.beans.visibleCols.getColAfter(e.column);return t?{rowIndex:e.rowIndex,column:t,rowPinned:e.rowPinned}:null}getCellBelow(e){if(!e)return null;const t=this.rowSpanSvc?.getCellEnd(e)??e,n=iR(this.beans,t,!0);return n?{rowIndex:n.rowIndex,column:e.column,rowPinned:n.rowPinned}:null}getCellAbove(e){if(!e)return null;const t=this.rowSpanSvc?.getCellStart(e)??e,n=Jd(this.beans,{rowIndex:t.rowIndex,rowPinned:t.rowPinned},!0);return n?{rowIndex:n.rowIndex,column:e.column,rowPinned:n.rowPinned}:null}getNextTabbedCell(e,t){return t?this.getNextTabbedCellBackwards(e):this.getNextTabbedCellForwards(e)}getNextTabbedCellForwards(e){const{visibleCols:t,pagination:n}=this.beans,i=t.allCols;let o=e.rowIndex,r=e.rowPinned,s=t.getColAfter(e.column);if(!s){s=i[0];const a=iR(this.beans,e,!0);if(Nt(a)||!a.rowPinned&&!(n?.isRowInPage(a.rowIndex)??!0))return null;o=a?a.rowIndex:null,r=a?a.rowPinned:null}return{rowIndex:o,column:s,rowPinned:r}}getNextTabbedCellBackwards(e){const{beans:t}=this,{visibleCols:n,pagination:i}=t,o=n.allCols;let r=e.rowIndex,s=e.rowPinned,a=n.getColBefore(e.column);if(!a){a=Pt(o);const l=Jd(t,{rowIndex:e.rowIndex,rowPinned:e.rowPinned},!0);if(Nt(l)||!l.rowPinned&&!(i?.isRowInPage(l.rowIndex)??!0))return null;r=l?l.rowIndex:null,s=l?l.rowPinned:null}return{rowIndex:r,column:a,rowPinned:s}}isSuppressNavigable(e,t){const{suppressNavigable:n}=e.colDef;if(typeof n=="boolean")return n;if(typeof n=="function"){const i=e.createColumnFunctionCallbackParams(t);return n(i)}return!1}};function I5(e){return e.focusSvc.getFocusedCell()}function M5(e){return e.focusSvc.clearFocusedCell()}function k5(e,t,n,i){e.focusSvc.setFocusedCell({rowIndex:t,column:n,rowPinned:i,forceBrowserFocus:!0})}function L5(e,t){return e.navigation?.tabToNextCell(!1,t)??!1}function O5(e,t){return e.navigation?.tabToNextCell(!0,t)??!1}function _5(e,t,n=!1){const i=e.headerNavigation?.getHeaderPositionForColumn(t,n);i&&e.focusSvc.focusHeaderPosition({headerPosition:i})}function Ks(e){const t=e;return t?.getFrameworkComponentInstance!=null?t.getFrameworkComponentInstance():e}var N5=class extends X{constructor(){super(...arguments),this.beanName="editModelSvc",this.edits=new Map,this.cellValidations=new MF,this.rowValidations=new kF,this.suspendEdits=!1}suspend(e){this.suspendEdits=e}removeEdits({rowNode:e,column:t}){if(!this.hasEdits({rowNode:e})||!e)return;const n=this.getEditRow(e);t?n.delete(t):n.clear(),n.size===0&&this.edits.delete(e)}getEditRow(e,t={}){if(this.suspendEdits||this.edits.size===0)return;const n=e&&this.edits.get(e);if(n)return n;if(t.checkSiblings){const i=e.pinnedSibling;if(i)return this.getEditRow(i)}}getEditRowDataValue(e,{checkSiblings:t}={}){if(!e||this.edits.size===0)return;const n=this.getEditRow(e),i=e.pinnedSibling,o=t&&i&&this.getEditRow(i);if(!n&&!o)return;const r={...e.data},s=(a,l)=>a.forEach(({editorValue:u,pendingValue:h},f)=>{const p=u===void 0?h:u;p!==fn&&(l[f.getColId()]=p)});return n&&s(n,r),o&&s(o,r),r}getEdit(e={},t){const{rowNode:n,column:i}=e,o=this.edits;if(this.suspendEdits||o.size===0||!n||!i)return;const r=o.get(n)?.get(i);if(r)return r;if(t?.checkSiblings){const s=n.pinnedSibling;if(s)return o.get(s)?.get(i)}}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((n,i)=>{const o=new Map;n.forEach(({editorState:r,...s},a)=>o.set(a,{...s})),t.set(i,o)}),t}setEditMap(e){this.edits.clear(),e.forEach((t,n)=>{const i=new Map;t.forEach((o,r)=>i.set(r,{...o})),this.edits.set(n,i)})}setEdit(e,t){const n=this.edits;(n.size===0||!n.has(e.rowNode))&&n.set(e.rowNode,new Map);const i=this.getEdit(e),o={editorState:{isCancelAfterEnd:void 0,isCancelBeforeStart:void 0},...i,...t};return this.getEditRow(e.rowNode).set(e.column,o),o}clearEditValue(e){const{rowNode:t,column:n}=e;if(!t)return;const i=r=>{r.editorValue=void 0,r.pendingValue=r.sourceValue,r.state="changed"};if(!n){this.getEditRow(t)?.forEach(i);return}const o=this.getEdit(e);o&&i(o)}getState(e){if(!this.suspendEdits)return this.getEdit(e)?.state}getEditPositions(e){if(this.suspendEdits||(e??this.edits).size===0)return[];const t=[];return(e??this.edits).forEach((n,i)=>{for(const o of n.keys()){const{editorState:r,...s}=n.get(o);t.push({rowNode:i,column:o,...s})}}),t}hasRowEdits(e,t){return this.suspendEdits||this.edits.size===0?!1:!!this.getEditRow(e,t)}hasEdits(e={},t={}){if(this.suspendEdits||this.edits.size===0)return!1;const{rowNode:n,column:i}=e,{withOpenEditor:o}=t;if(n){const r=this.getEditRow(n,t);return r?i?o?this.getEdit(e)?.state==="editing":r.has(i):r.size!==0?o?Array.from(r.values()).some(({state:s})=>s==="editing"):!0:!1:!1}return o?this.getEditPositions().some(({state:r})=>r==="editing"):this.edits.size>0}start(e){const t=this.getEditRow(e.rowNode)??new Map,{rowNode:n,column:i}=e;i&&!t.has(i)&&t.set(i,{editorValue:void 0,pendingValue:fn,sourceValue:this.beans.valueSvc.getValue(i,n,"data"),state:"editing",editorState:{isCancelAfterEnd:void 0,isCancelBeforeStart:void 0}}),this.edits.set(n,t)}stop(e,t,n){if(this.hasEdits(e))if(t){const i=this.getEditRow(e.rowNode)?.get(e.column);i&&(i.pendingValue===fn||i.pendingValue===i.sourceValue)?this.removeEdits(e):i&&n&&(i.editorValue=void 0)}else this.removeEdits(e)}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()}},MF=class{constructor(){this.cellValidations=new Map}getCellValidation(e){const{rowNode:t,column:n}=e||{};return this.cellValidations?.get(t)?.get(n)}hasCellValidation(e){return!e?.rowNode||!e.column?this.cellValidations.size>0:!!this.getCellValidation(e)}setCellValidation(e,t){const{rowNode:n,column:i}=e;this.cellValidations.has(n)||this.cellValidations.set(n,new Map),this.cellValidations.get(n).set(i,t)}clearCellValidation(e){const{rowNode:t,column:n}=e;this.cellValidations.get(t)?.delete(n)}setCellValidationMap(e){this.cellValidations=e}getCellValidationMap(){return this.cellValidations}clearCellValidationMap(){this.cellValidations.clear()}},kF=class{constructor(){this.rowValidations=new Map}getRowValidation(e){const{rowNode:t}=e||{};return this.rowValidations.get(t)}hasRowValidation(e){return e?.rowNode?!!this.getRowValidation(e):this.rowValidations.size>0}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 Ch(e,t={}){const{rowIndex:n,rowId:i,rowCtrl:o,rowPinned:r}=t;if(o)return o;const{rowModel:s,rowRenderer:a}=e;let{rowNode:l}=t;return l||(i?l=p2(e,i,r):n!=null&&(l=s.getRow(n))),l?a.getRowCtrlByNode(l):void 0}function ft(e,t={}){const{cellCtrl:n,colId:i,columnId:o,column:r}=t;if(n)return n;const s=e.colModel.getCol(i??o??Km(r)),a=t.rowCtrl??Ch(e,t),l=a?.getCellCtrl(s)??void 0;if(l)return l;const u=t.rowNode??a?.rowNode;if(u)return e.rowRenderer.getCellCtrls([u],[s])?.[0]}function LF(e){const{editSvc:t}=e;t?.isBatchEditing()?(Yr(e,{persist:!0}),Zr(e)):t?.stopEditing(void 0,{source:"api"})}function B5(e,t,n){const{gos:i,popupSvc:o}=t;if(!i.get("stopEditingWhenCellsLoseFocus"))return;const r=s=>{const a=s.relatedTarget;if($g(a)===null){LF(t);return}let l=n.some(u=>u.contains(a))&&i.isElementInThisInstance(a);l||(l=!!o&&(o.getActivePopups().some(u=>u.contains(a))||o.isElementWithinCustomPopup(a))),l||LF(t)};for(const s of n)e.addManagedElementListeners(s,{focusout:r})}function Km(e){if(e)return typeof e=="string"?e:e.getColId()}var fn=Symbol("unedited"),G5=(e,t={})=>{const n=e.rowRenderer.getCellCtrls(t.rowNodes,t.columns),i=new Array(n.length);let o=0;for(let r=0,s=n.length;r<s;++r){const l=n[r].comp?.getCellEditor();l&&(i[o++]=Ks(l))}return i.length=o,i};function H5(e,t,n,i,o,r){t.length===0&&n?.rowNode&&n?.column&&qs(e,n,{key:i,event:o,cellStartedEdit:r});const{valueSvc:s,editSvc:a,editModelSvc:l}=e,{rowNode:u,column:h}=n??{};for(const f of t){const{rowNode:p,column:m}=f,v=ft(e,f);if(!v){if(p&&m){const b=s.getValue(m,p,"data"),S=(n?.rowNode===p&&n?.column===m&&i||void 0)??a?.getCellDataValue(f)??s.getValueForDisplay({column:m,node:p,from:"edit"})?.value??b??fn;l?.setEdit(f,{pendingValue:rl(e,S,!1,m),sourceValue:b,state:"editing"})}continue}const w=r&&u===v.rowNode&&v.column===h;qs(e,{rowNode:u,column:v.column},{key:w?i:null,event:w?o:null,cellStartedEdit:w&&r})}}function so({pendingValue:e,sourceValue:t}){return e===fn&&(e=t),e!==t}function V5(e){const t=new Map;for(const[n,i]of e){const o=new Map;for(const[r,s]of i)so(s)&&o.set(r,s);o.size>0&&t.set(n,o)}return t}function qs(e,t,n){const{key:i,event:o,cellStartedEdit:r,silent:s}=n??{},{editModelSvc:a,gos:l,userCompFactory:u}=e,h=ft(e,t),f=h?.comp?.getCellEditor(),p=_F(e,t,i,r&&!s),m=a?.getEdit(t),v=p.value??m?.sourceValue;if(f){a?.setEdit(t,{editorValue:rl(e,v,!0,t.column),state:"editing"}),f.refresh?.(p);return}const w=t.column.getColDef(),b=A0(u,w,p);if(!b)return;const{popupFromSelector:y,popupPositionFromSelector:R}=b,S=y??!!w.cellEditorPopup,P=R??w.cellEditorPopupPosition;if(NF(b.params,o),!h)return;const{rangeFeature:F,rowCtrl:I,comp:L,onEditorAttachedFuncs:V}=h;a?.setEdit(t,{editorValue:rl(e,v,!0,t.column),state:"editing",editorState:{cellStartedEditing:void 0,cellStoppedEditing:void 0}}),h.editCompDetails=b,V.push(()=>F?.unsetComp()),L?.setEditDetails(b,S,P,l.get("reactiveCustomComponents")),I?.refreshRow({suppressFlash:!0}),W5(e,t,o,v,s)}function W5(e,t,n,i,o){const{editSvc:r,editModelSvc:s}=e,a=s?.getEdit(t);!o&&a?.state==="editing"&&!a?.editorState?.cellStartedEditing&&(r?.dispatchCellEvent(t,n,"cellEditingStarted",{value:i}),s?.setEdit(t,{editorState:{cellStartedEditing:!0}}))}function OF(e,t,n){const i={editorValueExists:!1};if(qm(e)&&(t.getValidationErrors?.()?.length??0)>0||n?.isCancelling)return i;if(n?.isStopping){const r=t?.isCancelAfterEnd?.();if(r)return{...i,isCancelAfterEnd:r}}return{editorValue:t.getValue(),editorValueExists:!0}}function _F(e,t,n,i){const{valueSvc:o,gos:r,editSvc:s}=e,a=e.gos.get("enableGroupEdit"),l=ft(e,t),u=t.rowNode?.rowIndex??void 0,h=s?.isBatchEditing(),f=e.colModel.getCol(t.column.getId()),{rowNode:p,column:m}=t,v=l.comp?.getCellEditor(),w=s?.getCellDataValue(t),b=w===void 0?v?OF(e,v)?.editorValue:void 0:w,y=b===fn?o.getValueForDisplay({column:f,node:p,from:"edit"})?.value:b;let R=a?b:y;return m.isAllowFormula()&&e.formula?.isFormula(R)&&(R=e.formula?.normaliseFormula(R,!0)??R),We(r,{value:R,eventKey:n??null,column:m,colDef:m.getColDef(),rowIndex:u,node:p,data:p.data,cellStartedEdit:!!i,onKeyDown:l?.onKeyDown.bind(l),stopEditing:S=>{s.stopEditing(t,{source:h?"ui":"api",suppressNavigateAfterEdit:S}),Oc(e,t,{})},eGridCell:l?.eGui,parseValue:S=>o.parseValue(f,p,S,l?.value),formatValue:l?.formatValue.bind(l),validate:()=>{s?.validateEdit()}})}function Lc(e,t){const{editModelSvc:n}=e;n?.getEditMap().forEach((i,o)=>{i.forEach((r,s)=>{!t&&(r.state==="editing"||r.pendingValue===fn)||!so(r)&&(r.state!=="editing"||t)&&n?.removeEdits({rowNode:o,column:s})})})}function z5(e,t){const n=t.comp?.getCellEditor();if(!n?.refresh)return;const{eventKey:i,cellStartedEdit:o}=t.editCompDetails.params,{column:r}=t,s=_F(e,t,i,o),a=r.getColDef(),l=A0(e.userCompFactory,a,s);n.refresh(NF(l.params,i))}function NF(e,t){return t instanceof KeyboardEvent&&e.column.getColDef().cellEditor==="agNumberCellEditor"?e.suppressPreventDefault=["-","+",".","e"].includes(t?.key??"")||e.suppressPreventDefault:t?.preventDefault?.(),e}function Yr(e,t){for(const n of e.editModelSvc?.getEditPositions()??[]){const i=ft(e,n);if(!i)continue;const o=i.comp?.getCellEditor();if(!o)continue;const{editorValue:r,editorValueExists:s,isCancelAfterEnd:a}=OF(e,o,t);if(a){const{cellStartedEditing:l,cellStoppedEditing:u}=e.editModelSvc?.getEdit(n)?.editorState||{};e.editModelSvc?.setEdit(n,{editorState:{isCancelAfterEnd:a,cellStartedEditing:l,cellStoppedEditing:u}})}ol(e,n,r,void 0,!s,t)}}function ol(e,t,n,i,o,r){const{editModelSvc:s,valueSvc:a}=e;if(!s)return;const{rowNode:l,column:u}=t;if(!(l&&u))return;let h=s.getEdit(t);if(h?.sourceValue===void 0){const f=h?rl(e,h.editorValue,!1,u):fn,p={sourceValue:a.getValue(u,l,"data"),pendingValue:f};r?.persist&&(p.state="changed"),h=s.setEdit(t,p)}s.setEdit(t,{editorValue:o?rl(e,h.sourceValue,!0,u):n}),r?.persist&&U5(e,t)}function rl(e,t,n,i){const{formula:o}=e;return i.isAllowFormula()&&o?.isFormula(t)?o?.normaliseFormula(t,n)??t:t}function U5(e,t){const{editModelSvc:n}=e,i=n?.getEdit(t),r={pendingValue:rl(e,i?.editorValue,!1,t.column)};!i?.editorState?.cellStoppedEditing&&i?.state!=="editing"&&(r.state="changed"),n?.setEdit(t,r)}function Zr(e,t,n={}){if(t||(t=e.editModelSvc?.getEditPositions()),t)for(const i of t)Oc(e,i,n)}function Oc(e,t,n,i=ft(e,t)){const o=e.editModelSvc,r=o?.getEdit(t);let s;if(r&&r.state!=="editing"&&r.editorState?.cellStoppedEditing?s=r.state:s="changed",!i){r&&o?.setEdit(t,{state:s});return}const a=i.comp,l=a?.getCellEditor();if(a&&!l){if(i?.refreshCell(),r){o?.setEdit(t,{state:s});const h=e.gos.get("enableGroupEdit")?BF(r,n?.cancel):{valueChanged:!1,newValue:void 0,oldValue:r.sourceValue};GF(e,t,h,n)}return}if(qm(e)){const h=r&&l?.getValidationErrors?.(),f=o?.getCellValidationModel();h?.length?f?.setCellValidation(t,{errorMessages:h}):f?.clearCellValidation(t)}r&&o?.setEdit(t,{state:s}),a?.setEditDetails(),a?.refreshEditStyles(!1,!1),i?.refreshCell({force:!0,suppressFlash:!0});const u=o?.getEdit(t);if(u&&u.state!=="editing"){const h=n?.cancel,f=e.gos.get("enableGroupEdit")?BF(u,h):$5(u,r,h);GF(e,t,f,n)}}function BF(e,t){const{sourceValue:n,pendingValue:i}=e;let o;return!t&&i!==fn&&(o=i),{valueChanged:!t&&so(e),newValue:o,oldValue:n,value:n}}function $5(e,t,n){if(n||e.editorState.isCancelAfterEnd)return{valueChanged:!1,newValue:void 0,oldValue:e.sourceValue};let i=e.editorValue;return(i==null||i===fn)&&(i=t?.pendingValue),i===fn&&(i=void 0),{valueChanged:so(e),newValue:i,oldValue:e.sourceValue}}function GF(e,t,n,{silent:i,event:o}={}){const{editSvc:r,editModelSvc:s}=e,a=s?.getEdit(t),{editorState:l}=a||{},{isCancelBeforeStart:u,cellStartedEditing:h,cellStoppedEditing:f}=l||{};!i&&!u&&h&&!f&&(r?.dispatchCellEvent(t,o,"cellEditingStopped",n),s?.setEdit(t,{editorState:{cellStoppedEditing:!0}}))}function j5(e){if(!e)return!1;for(let t=0,n=e.length;t<n;++t){const i=e[t],o=i.cellEditorParams;if(!(!o||!i.editable&&!i.groupRowEditable)&&(o.minLength!==void 0||o.maxLength!==void 0||o.getValidationErrors!==void 0||o.min!==void 0||o.max!==void 0))return!0}return!1}function K5(e){const t=e.rowRenderer.getCellCtrls();for(let n=0,i=t.length;n<i;++n){const r=t[n].comp?.getCellEditor();if(r){const s=Ks(r);if(s.getValidationElement||s.getValidationErrors)return!0}}return!1}function qm(e){return!!e.gos.get("getFullRowEditValidationErrors")||j5(e.colModel.getColumnDefs())||K5(e)}function Xr(e,t){if(!(t||qm(e)))return;const n=new MF,{ariaAnnounce:i,localeSvc:o,editModelSvc:r,gos:s}=e,a=s.get("editType")==="fullRow",u=US(o)("ariaValidationErrorPrefix","Cell Editor Validation"),h=new Set;for(const f of e.rowRenderer.getCellCtrls()){const p=f.comp?.getCellEditor();if(!p)continue;const m=Ks(p),{rowNode:v,column:w}=f,b=m.getValidationErrors?.()??[],y=m.getValidationElement?.(!1)||!m.isPopup?.()&&f.eGui;if(y){const R=b!=null&&b.length>0,S=R?b.join(". "):"";fg(y,R),R&&i.announceValue(`${u} ${b}`,"editorValidation"),y instanceof HTMLInputElement?y.setCustomValidity(S):y.classList.toggle("invalid",R)}b?.length>0&&n.setCellValidation({rowNode:v,column:w},{errorMessages:b}),h.add(f.rowCtrl)}if(Yr(e,{persist:!1}),r?.setCellValidationModel(n),a){const f=q5(e);r?.setRowValidationModel(f)}for(const f of h.values()){f.rowEditStyleFeature?.applyRowStyles();for(const p of f.getAllCellCtrls())p.tooltipFeature?.refreshTooltip(!0),p.editorTooltipFeature?.refreshTooltip(!0),p.editStyleFeature?.applyCellStyles?.()}}var q5=e=>{const t=new kF,n=e.gos.get("getFullRowEditValidationErrors"),i=e.editModelSvc?.getEditMap();if(!i)return t;for(const o of i.keys()){const r=i.get(o);if(!r)continue;const s=[],{rowIndex:a,rowPinned:l}=o;for(const h of r.keys()){const f=r.get(h);if(!f)continue;const{editorValue:p,pendingValue:m,sourceValue:v}=f,w=p??(m===fn?void 0:m)??v;s.push({column:h,colId:h.getColId(),rowIndex:a,rowPinned:l,oldValue:v,newValue:w})}const u=n?.({editorsState:s})??[];u.length>0&&t.setRowValidation({rowNode:o},{errorMessages:u})}return t};function Q5(e){Xr(e,!0);const t=e.editModelSvc?.getCellValidationModel().getCellValidationMap();if(!t)return null;const n=[];return t.forEach((i,o)=>{i.forEach(({errorMessages:r},s)=>{n.push({column:s,rowIndex:o.rowIndex,rowPinned:o.rowPinned,messages:r??null})})}),n}function wh(e){return!!(e.rowPinned&&e.pinnedSibling)}function Bi(e,t,n,i){const o=t==="top";if(!n)return Bi(e,t,o?e.getPinnedTopRow(0):e.getPinnedBottomRow(0),i);if(!i){const l=o?e.getPinnedTopRowCount():e.getPinnedBottomRowCount();return Bi(e,t,n,o?e.getPinnedTopRow(l-1):e.getPinnedBottomRow(l-1))}let r=!1,s=!1;const a=[];return e.forEachPinnedRow(t,l=>{if(l===n&&!r){r=!0,a.push(l);return}if(r&&l===i){s=!0,a.push(l);return}r&&!s&&a.push(l)}),a}function Y5(e,t,n,{rowNode:i,column:o},r){return We(e.gos,{type:n,node:i,data:i.data,value:r,column:o,colDef:o.getColDef(),rowPinned:i.rowPinned,event:t,rowIndex:i.rowIndex})}function Z5(e,t=!1){return e===q.DELETE?!0:!t&&e===q.BACKSPACE?N0():!1}var X5=class extends X{constructor(e,t,n,i){super(),this.cellCtrl=e,this.rowNode=n,this.rowCtrl=i,this.beans=t}init(){this.eGui=this.cellCtrl.eGui}onKeyDown(e){const t=e.key;if(!(t===q.ENTER&&zn(this.cellCtrl.column)&&this.beans.rowNumbersSvc?.handleKeyDownOnCell(this.cellCtrl.cellPosition,e)))switch(t){case q.ENTER:this.onEnterKeyDown(e);break;case q.F2:this.onF2KeyDown(e);break;case q.ESCAPE:this.onEscapeKeyDown(e);break;case q.TAB:this.onTabKeyDown(e);break;case q.BACKSPACE:case q.DELETE:this.onBackspaceOrDeleteKeyDown(t,e);break;case q.DOWN:case q.UP:case q.RIGHT:case q.LEFT:this.onNavigationKeyDown(e,t);break}}onNavigationKeyDown(e,t){const{cellCtrl:n,beans:i}=this;if(!i.editSvc?.isEditing(n,{withOpenEditor:!0})){if(e.shiftKey&&n.isRangeSelectionEnabled())this.onShiftRangeSelect(e);else{const o=n.getFocusedCellPosition();i.navigation?.navigateToNextCell(e,t,o,!0)}e.preventDefault()}}onShiftRangeSelect(e){const{rangeSvc:t,navigation:n}=this.beans;if(!t)return;const i=t.extendLatestRangeInDirection(e);i&&(e.key===q.LEFT||e.key===q.RIGHT?n?.ensureColumnVisible(i.column):n?.ensureRowVisible(i.rowIndex))}onTabKeyDown(e){this.beans.navigation?.onTabKeyDown(this.cellCtrl,e)}onBackspaceOrDeleteKeyDown(e,t){const{cellCtrl:n,beans:i,rowNode:o}=this,{gos:r,rangeSvc:s,eventSvc:a,editSvc:l}=i;if(a.dispatchEvent({type:"keyShortcutChangedCellStart"}),Z5(e,r.get("enableCellEditingOnBackspace"))&&!l?.isEditing(n,{withOpenEditor:!0})){if(s&&nr(r))s.clearCellRangeCellValues({dispatchWrapperEvents:!0,wrapperEventSource:"deleteKey"});else if(n.isCellEditable()){const u=i.valueSvc.getDeleteValue(n.column,o);o.setDataValue(n.column,u,"cellClear")}}else l?.isEditing(n,{withOpenEditor:!0})||i.editSvc?.startEditing(n,{startedEdit:!0,event:t});a.dispatchEvent({type:"keyShortcutChangedCellEnd"})}onEnterKeyDown(e){const{cellCtrl:t,beans:n}=this,{editSvc:i,navigation:o}=n,r=i?.isEditing(t,{withOpenEditor:!0}),s=t.rowNode,a=i?.isRowEditing(s,{withOpenEditor:!0}),l=u=>{i?.startEditing(u,{startedEdit:!0,event:e,source:"edit"})&&e.preventDefault()};if(r||a){if(this.isCtrlEnter(e)){i?.applyBulkEdit(t,n?.rangeSvc?.getCellRanges()||[]);return}if(Xr(n),i?.checkNavWithValidation(void 0,e)==="block-stop")return;i?.isEditing(t,{withOpenEditor:!0})?i?.stopEditing(t,{event:e,source:"edit"}):a&&!t.isCellEditable()?i?.stopEditing({rowNode:s},{event:e,source:"edit"}):l(t)}else if(n.gos.get("enterNavigatesVertically")){const u=e.shiftKey?q.UP:q.DOWN;o?.navigateToNextCell(null,u,t.cellPosition,!1)}else{if(i?.hasValidationErrors())return;i?.hasValidationErrors(t)&&i.revertSingleCellEdit(t,!0),l(t)}}isCtrlEnter(e){return(e.ctrlKey||e.metaKey)&&e.key===q.ENTER}onF2KeyDown(e){const{cellCtrl:t,beans:{editSvc:n}}=this;n?.isEditing()&&(Xr(this.beans),n?.checkNavWithValidation(void 0,e)==="block-stop")||n?.startEditing(t,{startedEdit:!0,event:e})}onEscapeKeyDown(e){const{cellCtrl:t,beans:{editSvc:n}}=this;n?.checkNavWithValidation(t,e)==="block-stop"&&n.revertSingleCellEdit(t),setTimeout(()=>{n?.stopEditing(t,{event:e,cancel:!0})})}processCharacter(e){const n=e.target!==this.eGui,{beans:{editSvc:i},cellCtrl:o}=this;if(n||i?.isEditing(o,{withOpenEditor:!0}))return;if(e.key===q.SPACE)this.onSpaceKeyDown(e);else if(i?.isCellEditable(o,"ui")){if(i?.hasValidationErrors()&&!i?.hasValidationErrors(o))return;i?.startEditing(o,{startedEdit:!0,event:e,source:"api",editable:!0}),!o.editCompDetails?.params?.suppressPreventDefault&&e.preventDefault()}}onSpaceKeyDown(e){const{gos:t,editSvc:n}=this.beans,{rowNode:i}=this.cellCtrl;!n?.isEditing(this.cellCtrl,{withOpenEditor:!0})&&ks(t)&&this.beans.selectionSvc?.handleSelectionEvent(e,i,"spaceKey"),e.preventDefault()}},J5=class extends X{constructor(e,t,n){super(),this.cellCtrl=e,this.column=n,this.beans=t}onMouseEvent(e,t){if(!sr(t))switch(e){case"click":this.onCellClicked(t);break;case"pointerdown":case"mousedown":case"touchstart":this.onMouseDown(t);break;case"dblclick":this.onCellDoubleClicked(t);break;case"mouseout":this.onMouseOut(t);break;case"mouseover":this.onMouseOver(t);break}}onCellClicked(e){if(this.beans.touchSvc?.handleCellDoubleClick(this,e))return;const{eventSvc:t,rangeSvc:n,editSvc:i,editModelSvc:o,frameworkOverrides:r,gos:s}=this.beans,a=e.ctrlKey||e.metaKey,{cellCtrl:l}=this,{column:u,cellPosition:h,rowNode:f}=l,p=eh(s,u,f,e);n&&a&&!p&&n.getCellRangeCount(h)>1&&n.intersectLastRange(!0);const m=l.createEvent(e,"cellClicked");m.isEventHandlingSuppressed=p,t.dispatchEvent(m);const v=u.getColDef();if(v.onCellClicked&&window.setTimeout(()=>{r.wrapOutgoing(()=>{v.onCellClicked(m)})},0),!p&&o?.getState(l)!=="editing"){const w=i?.isEditing(),b=i?.isRangeSelectionEnabledWhileEditing(),y=o?.getCellValidationModel().getCellValidationMap().size??0,R=o?.getRowValidationModel().getRowValidationMap().size??0;if(w&&(b||y>0||R>0))return;i?.shouldStartEditing(l,e)?i?.startEditing(l,{event:e}):i?.shouldStopEditing(l,e)&&(this.beans.gos.get("editType")==="fullRow"?i?.stopEditing(l,{event:e,source:"edit"}):i?.stopEditing(void 0,{event:e,source:"edit"}))}}onCellDoubleClicked(e){const{column:t,beans:n,cellCtrl:i}=this,{eventSvc:o,frameworkOverrides:r,editSvc:s,editModelSvc:a,gos:l}=n,u=eh(l,i.column,i.rowNode,e),h=t.getColDef(),f=i.createEvent(e,"cellDoubleClicked");if(f.isEventHandlingSuppressed=u,o.dispatchEvent(f),typeof h.onCellDoubleClicked=="function"&&window.setTimeout(()=>{r.wrapOutgoing(()=>{h.onCellDoubleClicked(f)})},0),!u&&s?.shouldStartEditing(i,e)&&a?.getState(i)!=="editing"){const p=s?.isEditing(),m=s?.isRangeSelectionEnabledWhileEditing(),v=a?.getCellValidationModel().getCellValidationMap().size??0,w=a?.getRowValidationModel().getRowValidationMap().size??0;if(p&&(m||v>0||w>0))return;s?.startEditing(i,{event:e})}}onMouseDown(e){const{shiftKey:t}=e,n=e.target,{cellCtrl:i,beans:o}=this,{eventSvc:r,rangeSvc:s,rowNumbersSvc:a,focusSvc:l,gos:u,editSvc:h}=o,{column:f,rowNode:p,cellPosition:m}=i,v=eh(u,f,p,e),w=()=>{const S=i.createEvent(e,"cellMouseDown");S.isEventHandlingSuppressed=v,r.dispatchEvent(S)};if(v){w();return}if(this.isRightClickInExistingRange(e))return;const b=s&&!s.isEmpty(),y=this.containsWidget(n),R=zn(f);if(!(a&&R&&!a.handleMouseDownOnCell(m,e))){if(!t||!b){const S=h?.isEditing(i),F=u.get("enableCellTextSelection")&&e.defaultPrevented,I=(Ur()||F)&&!S&&!uc(n)&&!y;i.focusCell(I,e)}if(t&&b&&!l.isCellFocused(m)){e.preventDefault();const S=l.getFocusedCell();if(S){const{column:P,rowIndex:F,rowPinned:I}=S,L=!!h?.isRangeSelectionEnabledWhileEditing?.();h?.isEditing(S)&&!L&&h?.stopEditing(S),L||l.setFocusedCell({column:P,rowIndex:F,rowPinned:I,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0,sourceEvent:e})}}y||(s?.handleCellMouseDown(e,m),w())}}isRightClickInExistingRange(e){const{rangeSvc:t}=this.beans;if(t){const n=t.isCellInAnyRange(this.cellCtrl.cellPosition),i=PO(this.beans,e);if(n&&i)return!0}return!1}containsWidget(e){return As(e,"ag-selection-checkbox",3)||As(e,"ag-drag-handle",3)}onMouseOut(e){if(this.mouseStayingInsideCell(e))return;const{eventSvc:t,colHover:n}=this.beans;t.dispatchEvent(this.cellCtrl.createEvent(e,"cellMouseOut")),n?.clearMouseOver()}onMouseOver(e){if(this.mouseStayingInsideCell(e))return;const{eventSvc:t,colHover:n}=this.beans;t.dispatchEvent(this.cellCtrl.createEvent(e,"cellMouseOver")),n?.setMouseOver([this.column])}mouseStayingInsideCell(e){if(!e.target||!e.relatedTarget)return!1;const t=this.cellCtrl.eGui,n=t.contains(e.target),i=t.contains(e.relatedTarget);return n&&i}},e3=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();Lr(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,n=e.getColSpan(t),i=[];if(n===1)i.push(e);else{let o=e;const r=e.getPinned();for(let s=0;o&&s<n&&(i.push(o),o=this.beans.visibleCols.getColAfter(o),!(!o||Nt(o)||r!==o.getPinned()));s++);}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=Pt(this.colsSpanning):e=this.column,e.getLeft()}modifyLeftForPrintLayout(e){if(!this.cellCtrl.printLayout||this.column.getPinned()==="left")return e;const{visibleCols:t}=this.beans,n=t.getColsLeftWidth();if(this.column.getPinned()==="right"){const i=t.bodyWidth;return n+i+(e||0)}return n+(e||0)}_legacyApplyRowSpan(e){if(this.rowSpan===1&&!e)return;const n=Ls(this.beans)*this.rowSpan;this.eContent.style.height=`${n}px`,this.eContent.style.zIndex="1"}destroy(){super.destroy()}},t3="ag-cell",n3="ag-cell-auto-height",i3="ag-cell-normal-height",o3="ag-cell-focus",r3="ag-cell-first-right-pinned",s3="ag-cell-last-left-pinned",a3="ag-cell-not-inline-editing",l3="ag-cell-wrap-text",c3=0,sl=class extends X{constructor(e,t,n,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=n,this.gos=n.gos,this.editSvc=n.editSvc,this.hasEdit=!!n.editSvc;const{colId:o}=e;this.instanceId=o+"-"+c3++,this.createCellPosition(),this.updateAndFormatValue(!1)}addFeatures(){const{beans:e}=this;this.positionFeature=new e3(this,e),this.customStyleFeature=e.cellStyles?.createCellCustomStyleFeature(this),this.editStyleFeature=e.editSvc?.createCellStyleFeature(this),this.mouseListener=new J5(this,e,this.column),this.keyboardListener=new X5(this,e,this.rowNode,this.rowCtrl),this.enableTooltipFeature();const{rangeSvc:t}=e;t&&nr(e.gos)&&(this.rangeFeature=t.createCellRangeFeature(this)),zn(this.column)&&(this.rowResizeFeature=this.beans.rowNumbersSvc.createRowNumbersRowResizerFeature(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){this.tooltipFeature=this.beans.tooltipSvc?.enableCellTooltipFeature(this,e,t)}disableTooltipFeature(){this.tooltipFeature=this.beans.context.destroyBean(this.tooltipFeature)}enableEditorTooltipFeature(e){this.editorTooltipFeature&&this.disableEditorTooltipFeature(),this.editorTooltipFeature=this.beans.tooltipSvc?.setupCellEditorTooltip(this,e),Xr(this.beans)}disableEditorTooltipFeature(){this.editorTooltipFeature=this.beans.context.destroyBean(this.editorTooltipFeature)}setComp(e,t,n,i,o,r,s){this.comp=e,this.eGui=t,this.printLayout=o,s??(s=this),this.addDomData(s),this.addFeatures(),s.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,s),this.refreshFirstAndLastStyles(),this.checkFormulaError(),this.refreshAriaRowIndex(),this.refreshAriaColIndex(),this.positionFeature?.init(),this.customStyleFeature?.setComp(e),this.editStyleFeature?.setComp(e),this.tooltipFeature?.refreshTooltip(),this.keyboardListener?.init(),this.rangeFeature?.setComp(e),this.rowResizeFeature?.refreshRowResizer();const a=r?this.isCellEditable():void 0,l=!a&&this.hasEdit&&this.editSvc?.isEditing(this,{withOpenEditor:!0});if(a||l?this.editSvc?.startEditing(this,{startedEdit:!1,source:"api",silent:!0,continueEditing:!0,editable:a}):this.showValue(!1,!0),this.onCompAttachedFuncs.length){for(const u of this.onCompAttachedFuncs)u();this.onCompAttachedFuncs=[]}}checkFormulaError(){const e=!!this.beans.formula?.getFormulaError(this.column,this.rowNode);this.eGui.classList.toggle("formula-error",e)}setupAutoHeight(e,t){this.isAutoHeight=this.beans.rowAutoHeight?.setupCellAutoHeight(this,e,t)??!1}getCellAriaRole(){return this.column.getColDef().cellAriaRole??"gridcell"}isCellRenderer(){const e=this.column.getColDef();return e.cellRenderer!=null||e.cellRendererSelector!=null}getValueToDisplay(){return this.valueFormatted??this.value}getDeferLoadingCellRenderer(){const{beans:e,column:t}=this,{userCompFactory:n,ctrlsSvc:i,eventSvc:o}=e,r=t.getColDef(),s=this.createCellRendererParams();s.deferRender=!0;const a=T0(n,r,s);if(i.getGridBodyCtrl()?.scrollFeature?.isScrolling()){let l;const u=new Mt(f=>{l=f}),[h]=this.addManagedListeners(o,{bodyScrollEnd:()=>{l(),h()}});return{loadingComp:a,onReady:u}}return{loadingComp:a,onReady:Mt.resolve()}}showValue(e,t){const{beans:n,column:i,rowNode:o,rangeFeature:r}=this,{userCompFactory:s}=n;let a=this.getValueToDisplay(),l;const u=o.stub&&o.groupData?.[i.getId()]==null,h=i.getColDef();if(u||this.isCellRenderer()){const f=this.createCellRendererParams();!u||zn(i)?l=D0(s,h,f):l=T0(s,h,f)}if(!l&&!u&&n.findSvc?.isMatch(o,i)){const f=this.createCellRendererParams();l=D0(s,{...i.getColDef(),cellRenderer:"agFindCellRenderer"},f)}if(this.hasEdit&&this.editSvc.isBatchEditing()&&this.editSvc.isRowEditing(o,{checkSiblings:!0})){const f=this.editSvc.prepDetailsDuringBatch(this,{compDetails:l,valueToDisplay:a});f&&(f.compDetails?l=f.compDetails:f.valueToDisplay&&(a=f.valueToDisplay))}this.comp.setRenderDetails(l,a,e),this.customRowDragComp?.refreshVisibility(),!t&&r&&er(n,()=>r?.refreshRangeStyleAndHandle()),this.rowResizeFeature?.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()}getCellValueClass(){const e="ag-cell-value",t=this.column.getColDef().cellRenderer==="agCheckboxCellRenderer";let n="";return t&&(n=" ag-allow-overflow"),`${e}${n}`}isIncludeControl(e,t=!1){return(this.rowNode.rowPinned==null||t&&wh(this.rowNode))&&!!e}isCheckboxSelection(e){const{rowSelection:t,groupDisplayType:n}=this.beans.gridOptions,i=Bd(t),o=Wr(this.column);return n==="custom"&&i!=="selectionColumn"&&o?!1:e.checkboxSelection||o&&typeof t=="object"&&$a(t)}refreshShouldDestroy(){const e=this.column.getColDef(),t=this.includeSelection!=this.isIncludeControl(this.isCheckboxSelection(e),!0),n=this.includeRowDrag!=this.isIncludeControl(e.rowDrag),i=this.includeDndSource!=this.isIncludeControl(e.dndSource),o=this.isAutoHeight!=this.column.isAutoHeight();return t||n||i||o}onPopupEditorClosed(e){const{editSvc:t}=this.beans;if(!t?.isEditing(this,{withOpenEditor:!0}))return;const n=e instanceof KeyboardEvent,i=e instanceof MouseEvent,o=n&&e.key===q.ESCAPE;t.stopEditing(this,{source:t.isBatchEditing()?"ui":"api",cancel:o,event:n||i?e:void 0}),o&&this.focusCell(!0,e)}stopEditing(e=!1){const{editSvc:t}=this.beans;return t?.stopEditing(this,{cancel:e,source:t?.isBatchEditing()?"ui":"api"})??!1}createCellRendererParams(){const{value:e,valueFormatted:t,column:n,rowNode:i,comp:o,eGui:r,beans:{valueSvc:s,gos:a,editSvc:l}}=this;return We(a,{value:e,valueFormatted:t,getValue:()=>s.getValueForDisplay({column:n,node:i,from:"edit"}).value,setValue:h=>l?.setDataValue({rowNode:i,column:n},h)||i.setDataValue(n,h),formatValue:this.formatValue.bind(this),data:i.data,node:i,pinned:n.getPinned(),colDef:n.getColDef(),column:n,refreshCell:this.refreshCell.bind(this),eGridCell:r,eParentOfValue:o.getParentOfValue(),registerRowDragger:(h,f,p,m)=>this.registerRowDragger(h,f,m),setTooltip:(h,f)=>{a.assertModuleRegistered("Tooltip",3),this.tooltipFeature&&this.disableTooltipFeature(),this.enableTooltipFeature(h,f),this.tooltipFeature?.refreshTooltip()}})}onCellChanged(e){e.column===this.column&&this.refreshCell()}refreshOrDestroyCell(e){if(this.refreshShouldDestroy()?this.rowCtrl?.recreateCell(this):this.refreshCell(e),this.hasEdit&&this.editCompDetails){const{editSvc:t,comp:n}=this;!n?.getCellEditor()&&t.isEditing(this,{withOpenEditor:!0})&&t.startEditing(this,{startedEdit:!1,source:"api",silent:!0})}}refreshCell(e){const{editStyleFeature:t,customStyleFeature:n,rowCtrl:{rowEditStyleFeature:i},beans:{cellFlashSvc:o,filterManager:r},column:s,comp:a,suppressRefreshCell:l,tooltipFeature:u}=this;if(l)return;const{field:h,valueGetter:f,showRowGroup:p,enableCellChangeFlash:m}=s.getColDef(),v=h==null&&f==null&&p==null,w=e?.newData??!1,b=v||e&&(e.force||w),y=!!a,R=this.updateAndFormatValue(y),S=b||R;if(y){if(S){this.showValue(!!w,!1);const P=r?.isSuppressFlashingCellsBecauseFiltering();!e?.suppressFlash&&!P&&m&&o?.flashCell(this),t?.applyCellStyles?.(),n?.applyUserStyles(),n?.applyClassesFromColDef(),i?.applyRowStyles(),this.checkFormulaError()}u?.refreshTooltip(),n?.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,n=this.valueFormatted,{value:i,valueFormatted:o}=this.beans.valueSvc.getValueForDisplay({column:this.column,node:this.rowNode,includeValueFormatted:!0,from:"edit"});return this.value=i,this.valueFormatted=o,e?!this.valuesAreEqual(t,this.value)||this.valueFormatted!=n:!0}valuesAreEqual(e,t){const n=this.column.getColDef();return n.equals?n.equals(e,t):e===t}addDomData(e){const t=this.eGui;Os(this.beans.gos,t,th,this),e.addDestroyFunc(()=>Os(this.beans.gos,t,th,null))}createEvent(e,t){const{rowNode:n,column:i,value:o,beans:r}=this;return Y5(r,e,t,{rowNode:n,column:i},o)}processCharacter(e){this.keyboardListener?.processCharacter(e)}onKeyDown(e){this.keyboardListener?.onKeyDown(e)}onMouseEvent(e,t){this.mouseListener?.onMouseEvent(e,t)}getColSpanningList(){return this.positionFeature?.getColSpanningList()??[]}onLeftChanged(){this.comp&&this.positionFeature?.onLeftChanged()}onDisplayedColumnsChanged(){this.eGui&&(this.refreshAriaColIndex(),this.refreshFirstAndLastStyles())}refreshFirstAndLastStyles(){const{comp:e,column:t,beans:n}=this;cR(e,t,n.visibleCols)}refreshAriaColIndex(){const e=this.beans.visibleCols.getAriaColIndex(this.column);IS(this.eGui,e)}onWidthChanged(){return this.positionFeature?.onWidthChanged()}getRowPosition(){const{rowIndex:e,rowPinned:t}=this.cellPosition;return{rowIndex:e,rowPinned:t}}updateRangeBordersIfRangeCount(){this.comp&&this.rangeFeature?.updateRangeBordersIfRangeCount()}onCellSelectionChanged(){this.comp&&this.rangeFeature?.onCellSelectionChanged()}isRangeSelectionEnabled(){return this.rangeFeature!=null}focusCell(e=!1,t){const n=this.editSvc?.allowedFocusTargetOnValidation(this);n&&n!==this||this.beans.focusSvc.setFocusedCell({...this.getFocusedCellPosition(),forceBrowserFocus:e,sourceEvent:t})}restoreFocus(e=!1){const{beans:{editSvc:t,focusSvc:n},comp:i}=this;if(!i||t?.isEditing(this)||!this.isCellFocused()||!n.shouldTakeFocus())return;const o=()=>{if(!this.isAlive())return;const r=i.getFocusableElement();this.isCellFocused()&&r.focus({preventScroll:!0})};if(e){setTimeout(o,0);return}o()}onRowIndexChanged(){this.createCellPosition(),this.refreshAriaRowIndex(),this.onCellFocused(),this.restoreFocus(),this.rangeFeature?.onCellSelectionChanged(),this.rowResizeFeature?.refreshRowResizer()}onSuppressCellFocusChanged(e){const t=this.eGui;t&&ti(t,"tabindex",e?void 0:-1)}onFirstRightPinnedChanged(){if(!this.comp)return;const e=this.column.isFirstRightPinned();this.comp.toggleCss(r3,e)}onLastLeftPinnedChanged(){if(!this.comp)return;const e=this.column.isLastLeftPinned();this.comp.toggleCss(s3,e)}checkCellFocused(){return this.beans.focusSvc.isCellFocused(this.cellPosition)}isCellFocused(){const e=this.checkCellFocused();return this.hasBeenFocused||(this.hasBeenFocused=e),e}setupFocus(){this.restoreFocus(!0),this.onCellFocused(this.focusEventWhileNotReady??void 0)}onCellFocused(e){const{beans:t}=this;if(Ec(t))return;if(!this.comp){e&&(this.focusEventWhileNotReady=e);return}const n=this.isCellFocused(),i=t.editSvc?.isEditing(this)??!1;if(this.comp.toggleCss(o3,n),n&&(e?.forceBrowserFocus||!this.hasBrowserFocus()&&this.beans.focusSvc.shouldTakeFocus())){let o=this.comp.getFocusableElement();if(i){const s=Bs(o,null,!0);s.length&&(o=s[0])}const r=e?e.preventScrollOnBrowserFocus:!0;o.focus({preventScroll:r}),PL(t,o)}n&&this.focusEventWhileNotReady&&(this.focusEventWhileNotReady=null),n&&e&&this.rowCtrl.announceDescription()}createCellPosition(){const{rowIndex:e,rowPinned:t}=this.rowNode;this.cellPosition={rowIndex:e,rowPinned:Jo(t),column:this.column}}applyStaticCssClasses(){const{comp:e}=this;e.toggleCss(t3,!0),e.toggleCss(a3,!0);const t=this.column.isAutoHeight()==!0;e.toggleCss(n3,t),e.toggleCss(i3,!t)}onColumnHover(){this.beans.colHover?.onCellColumnHover(this.column,this.comp)}onColDefChanged(){this.comp&&(this.column.isTooltipEnabled()?(this.disableTooltipFeature(),this.enableTooltipFeature()):this.disableTooltipFeature(),this.setWrapText(),this.editSvc?.isEditing(this)?this.editSvc?.handleColDefChanged(this):this.refreshOrDestroyCell({force:!0,suppressFlash:!0}))}setWrapText(){const e=this.column.getColDef().wrapText==!0;this.comp.toggleCss(l3,e)}dispatchCellContextMenuEvent(e){const t=this.column.getColDef(),n=this.createEvent(e,"cellContextMenu"),{beans:i}=this;i.eventSvc.dispatchEvent(n),t.onCellContextMenu&&window.setTimeout(()=>{i.frameworkOverrides.wrapOutgoing(()=>{t.onCellContextMenu(n)})},0)}getCellRenderer(){return this.comp?.getCellRenderer()??null}destroy(){this.onCompAttachedFuncs=[],this.onEditorAttachedFuncs=[],this.isCellFocused()&&this.hasBrowserFocus()&&this.beans.focusSvc.attemptToRecoverFocus(),super.destroy()}hasBrowserFocus(){return this.eGui?.contains(It(this.beans))??!1}createSelectionCheckbox(){const e=this.beans.selectionSvc?.createCheckboxSelectionComponent();if(e)return this.beans.context.createBean(e),e.init({rowNode:this.rowNode,column:this.column}),e}createDndSource(){const e=this.beans.registry.createDynamicBean("dndSourceComp",!1,this.rowNode,this.column,this.eGui);return e&&this.beans.context.createBean(e),e}registerRowDragger(e,t,n){if(this.customRowDragComp){this.customRowDragComp.setDragElement(e,t);return}const i=this.createRowDragComp(e,t,n);i&&(this.customRowDragComp=i,this.addDestroyFunc(()=>{this.beans.context.destroyBean(i),this.customRowDragComp=null}),i.refreshVisibility())}createRowDragComp(e,t,n){const i=this.beans.rowDragSvc?.createRowDragCompForCell(this.rowNode,this.column,()=>this.value,e,t,n);if(i)return this.beans.context.createBean(i),i}cellEditorAttached(){for(const e of this.onEditorAttachedFuncs)e();this.onEditorAttachedFuncs=[]}setFocusedCellPosition(e){}getFocusedCellPosition(){return this.cellPosition}refreshAriaRowIndex(){if(!zn(this.column)||!this.eGui)return;const{ariaRowIndex:e}=this.rowCtrl;e!=null&&cc(this.eGui,e)}getRootElement(){return this.eGui}};function Qm(e,t,n,i,o,r){if(n==null&&t==null)return;const s={},a={},l=(u,h)=>{for(const f of u.split(" "))f.trim()!=""&&h(f)};if(n){const u=Object.keys(n);for(let h=0;h<u.length;h++){const f=u[h],p=n[f];let m;typeof p=="string"?m=e?e.evaluate(p,i):!0:typeof p=="function"&&(m=p(i)),l(f,v=>{m?s[v]=!0:a[v]=!0})}}if(t&&r)for(const u of Object.keys(t))l(u,h=>{s[h]||(a[h]=!0)});r&&Object.keys(a).forEach(r),Object.keys(s).forEach(o)}function HF(e){if(e.group)return e.level;const t=e.parent;return t?t.level+1:0}var u3=class extends X{constructor(){super(...arguments),this.beanName="rowStyleSvc"}processClassesFromGridOptions(e,t){const n=this.gos,i=s=>{if(typeof s=="string")e.push(s);else if(Array.isArray(s))for(const a of s)e.push(a)},o=n.get("rowClass");o&&i(o);const r=n.getCallback("getRowClass");if(r){const s={data:t.data,node:t,rowIndex:t.rowIndex},a=r(s);i(a)}}preProcessRowClassRules(e,t){this.processRowClassRules(t,n=>{e.push(n)},()=>{})}processRowClassRules(e,t,n){const{gos:i,expressionSvc:o}=this.beans,r=We(i,{data:e.data,node:e,rowIndex:e.rowIndex});Qm(o,void 0,i.get("rowClassRules"),r,t,n)}processStylesFromGridOptions(e){const t=this.gos,n=t.get("rowStyle"),i=t.getCallback("getRowStyle");let o;if(i){const r={data:e.data,node:e,rowIndex:e.rowIndex};o=i(r)}if(o||n)return Object.assign({},n,o)}},d3=0,bh=class extends X{constructor(e,t,n,i,o){super(),this.rowNode=e,this.useAnimationFrameForCreate=i,this.printLayout=o,this.focusEventWhileNotReady=null,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.ariaRowIndex=null,this.businessKey=null,this.beans=t,this.gos=t.gos,this.paginationPage=t.pagination?.getCurrentPage()??0,this.suppressRowTransform=this.gos.get("suppressRowTransform"),this.instanceId=e.id+"-"+d3++,this.rowId=ac(e.id),this.initRowBusinessKey(),this.rowFocused=t.focusSvc.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned),this.rowLevel=HF(this.rowNode),this.setRowType(),this.setAnimateFlags(n),this.rowStyles=this.processStylesFromGridOptions(),this.rowEditStyleFeature=t.editSvc?.createRowStyleFeature(this),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=ac(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,n,i){const{context:o,rowRenderer:r}=this.beans;i=Tc(this,o,i);const s={rowComp:e,element:t,containerType:n,compBean:i};this.allRowGuis.push(s),this.updateGui(n,s),this.initialiseRowComp(s);const a=this.rowNode,l=this.rowType==="FullWidthLoading"||a.stub,u=!a.data&&this.beans.rowModel.getType()==="infinite";!l&&!u&&!a.rowPinned&&r.dispatchFirstDataRenderedEvent(),this.setupFocus()}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":"";for(const n of this.allRowGuis)n.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),ks(t)&&this.rowNode.selectable&&this.onRowSelected(e),this.updateColumnLists(!this.useAnimationFrameForCreate);const n=e.rowComp,i=this.getInitialRowClasses(e.containerType);for(const o of i)n.toggleCss(o,!0);this.executeSlideAndFadeAnimations(e),this.rowNode.group&&pg(e.element,!!this.rowNode.expanded),this.setRowCompRowId(n),this.setRowCompRowBusinessKey(n),Os(t,e.element,nh,this),e.compBean.addDestroyFunc(()=>Os(t,e.element,nh,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=ac(this.rowNode.id);this.rowId=t,t!=null&&e.setRowId(t)}executeSlideAndFadeAnimations(e){const{containerType:t}=e;this.slideInAnimation[t]&&(Rg(()=>{this.onTopChanged()}),this.slideInAnimation[t]=!1),this.fadeInAnimation[t]&&(Rg(()=>{e.rowComp.toggleCss("ag-opacity-zero",!1)}),this.fadeInAnimation[t]=!1)}addRowDraggerToRow(e){const t=this.beans.rowDragSvc?.createRowDragCompForRow(this.rowNode,e.element);if(!t)return;const n=this.createBean(t,this.beans.context);this.rowDragComps.push(n),e.compBean.addDestroyFunc(()=>{this.rowDragComps=this.rowDragComps.filter(i=>i!==n),this.rowEditStyleFeature=this.destroyBean(this.rowEditStyleFeature,this.beans.context),this.destroyBean(n,this.beans.context)})}setupFullWidth(e){const t=this.getPinnedForContainer(e.containerType),n=this.createFullWidthCompDetails(e.element,t);e.rowComp.showFullWidth(n)}getFullWidthCellRenderers(){return this.gos.get("embedFullWidthRows")?this.allRowGuis.map(e=>e?.rowComp?.getFullWidthCellRenderer()):[this.fullWidthGui?.rowComp?.getFullWidthCellRenderer()]}executeProcessRowPostCreateFunc(){const e=this.gos.getCallback("processRowPostCreate");if(!e||!this.areAllContainersReady())return;const t={eRow:this.centerGui.element,ePinnedLeftRow:this.leftGui?this.leftGui.element:void 0,ePinnedRightRow:this.rightGui?this.rightGui.element:void 0,node:this.rowNode,rowIndex:this.rowNode.rowIndex,addRenderedRowListener:this.addEventListener.bind(this)};e(t)}areAllContainersReady(){const{leftGui:e,centerGui:t,rightGui:n,beans:{visibleCols:i}}=this,o=!!e||!i.isPinningLeft(),r=!!t,s=!!n||!i.isPinningRight();return o&&r&&s}isNodeFullWidthCell(){if(this.rowNode.detail)return!0;const e=this.beans.gos.getCallback("isFullWidthRow");return e?e({rowNode:this.rowNode}):!1}setRowType(){const{rowNode:e,gos:t,beans:{colModel:n}}=this,i=e.stub&&!t.get("suppressServerSideFullWidthLoadingRow")&&!t.get("groupHideOpenParents"),o=this.isNodeFullWidthCell(),r=t.get("masterDetail")&&e.detail,s=n.isPivotMode(),a=h0(t,e,s);i?this.rowType="FullWidthLoading":r?this.rowType="FullWidthDetail":o?this.rowType="FullWidth":a?this.rowType="FullWidthGroup":this.rowType="Normal"}updateColumnLists(e=!1,t=!1){if(this.isFullWidth())return;const{animationFrameSvc:n}=this.beans;if(!n?.active||e||this.printLayout){this.updateColumnListsImpl(t);return}this.updateColumnListsPending||(n.createTask(()=>{this.active&&this.updateColumnListsImpl(!0)},this.rowNode.rowIndex,"p1",!1),this.updateColumnListsPending=!0)}getNewCellCtrl(e){if(!this.beans.rowSpanSvc?.isCellSpanning(e,this.rowNode))return new sl(e,this.rowNode,this.beans,this)}isCorrectCtrlForSpan(e){return!this.beans.rowSpanSvc?.isCellSpanning(e.column,this.rowNode)}createCellCtrls(e,t,n=null){const i={list:[],map:{}},o=(u,h,f)=>{f!=null?i.list.splice(f,0,h):i.list.push(h),i.map[u]=h},r=[];for(const u of t){const h=u.getInstanceId();let f=e.map[h];f&&!this.isCorrectCtrlForSpan(f)&&(f.destroy(),f=void 0),f||(f=this.getNewCellCtrl(u)),f&&o(h,f)}for(const u of e.list){const h=u.column.getInstanceId();if(i.map[h]!=null)continue;!this.isCellEligibleToBeRemoved(u,n)?r.push([h,u]):u.destroy()}if(r.length)for(const[u,h]of r){const f=i.list.findIndex(m=>m.column.getLeft()>h.column.getLeft()),p=f===-1?void 0:Math.max(f-1,0);o(u,h,p)}const{focusSvc:s,visibleCols:a}=this.beans,l=s.getFocusedCell();if(l&&l.column.getPinned()==n){const u=l.column.getInstanceId();if(!i.map[u]&&a.allCols.includes(l.column)){const f=this.createFocusedCellCtrl();if(f){const p=i.list.findIndex(v=>v.column.getLeft()>f.column.getLeft()),m=p===-1?void 0:Math.max(p-1,0);o(u,f,m)}}}return i}createFocusedCellCtrl(){const{focusSvc:e,rowSpanSvc:t}=this.beans,n=e.getFocusedCell();if(!n)return;const i=t?.getCellSpan(n.column,this.rowNode);if(i){if(i.firstNode!==this.rowNode||!i.doesSpanContain(n))return}else if(!e.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned))return;return this.getNewCellCtrl(n.column)}updateColumnListsImpl(e){this.updateColumnListsPending=!1,this.createAllCellCtrls(),this.setCellCtrls(e)}setCellCtrls(e){for(const t of this.allRowGuis){const n=this.getCellCtrlsForContainer(t.containerType);t.rowComp.setCellCtrls(n,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 n=e.getColsWithinViewport(this.rowNode);this.centerCellCtrls=this.createCellCtrls(this.centerCellCtrls,n);const i=t.getLeftColsForRow(this.rowNode);this.leftCellCtrls=this.createCellCtrls(this.leftCellCtrls,i,"left");const o=t.getRightColsForRow(this.rowNode);this.rightCellCtrls=this.createCellCtrls(this.rightCellCtrls,o,"right")}}isCellEligibleToBeRemoved(e,t){const{column:o}=e;if(o.getPinned()!=t||!this.isCorrectCtrlForSpan(e))return!0;const{visibleCols:r,editSvc:s}=this.beans,a=s?.isEditing(e),l=e.isCellFocused();return a||l?!(r.allCols.indexOf(o)>=0):!0}getDomOrder(){return this.gos.get("ensureDomOrder")||yn(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=we(this.rowNode.oldRowTop),{visibleCols:n}=this.beans,i=n.isPinningLeft(),o=n.isPinningRight();if(t){const{slideInAnimation:r}=this;if(this.isFullWidth()&&!this.gos.get("embedFullWidthRows")){r.fullWidth=!0;return}r.center=!0,r.left=i,r.right=o}else{const{fadeInAnimation:r}=this;if(this.isFullWidth()&&!this.gos.get("embedFullWidthRows")){r.fullWidth=!0;return}r.center=!0,r.left=i,r.right=o}}isFullWidth(){return this.rowType!=="Normal"}refreshFullWidth(){const e=(s,a)=>s?s.rowComp.refreshFullWidth(()=>this.createFullWidthCompDetails(s.element,a).params):!0,t=e(this.fullWidthGui,null),n=e(this.centerGui,null),i=e(this.leftGui,"left"),o=e(this.rightGui,"right");return t&&n&&i&&o}addListeners(){const{beans:e,gos:t,rowNode:n}=this,{expansionSvc:i,eventSvc:o,context:r,rowSpanSvc:s}=e;this.addManagedListeners(this.rowNode,{heightChanged:()=>this.onRowHeightChanged(),rowSelected:()=>this.onRowSelected(),rowIndexChanged:this.onRowIndexChanged.bind(this),topChanged:this.onTopChanged.bind(this),...i?.getRowExpandedListeners(this)??{}}),n.detail&&this.addManagedListeners(n.parent,{dataChanged:this.onRowNodeDataChanged.bind(this)}),this.addManagedListeners(n,{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(o,{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()}),s&&this.addManagedListeners(s,{spannedCellsUpdated:({pinned:a})=>{a&&!n.rowPinned||this.updateColumnLists()}}),this.addDestroyFunc(()=>{this.rowDragComps=this.destroyBeans(this.rowDragComps,r),this.tooltipFeature=this.destroyBean(this.tooltipFeature,r),this.rowEditStyleFeature=this.destroyBean(this.rowEditStyleFeature,r)}),this.addManagedPropertyListeners(["rowStyle","getRowStyle","rowClass","getRowClass","rowClassRules"],this.postProcessCss.bind(this)),this.addManagedPropertyListener("rowDragEntireRow",()=>{if(t.get("rowDragEntireRow")){for(const l of this.allRowGuis)this.addRowDraggerToRow(l);return}this.rowDragComps=this.destroyBeans(this.rowDragComps,r)}),this.addListenersForCellComps()}addListenersForCellComps(){this.addManagedListeners(this.rowNode,{rowIndexChanged:()=>{for(const e of this.getAllCellCtrls())e.onRowIndexChanged()},cellChanged:e=>{for(const t of this.getAllCellCtrls())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}for(const n of this.getAllCellCtrls())n.refreshCell(e);for(const n of this.allRowGuis)this.setRowCompRowId(n.rowComp),this.updateRowBusinessKey(),this.setRowCompRowBusinessKey(n.rowComp);this.onRowSelected(),this.postProcessCss()}postProcessCss(){this.setStylesFromGridOptions(!0),this.postProcessClassesFromGridOptions(),this.postProcessRowClassRules(),this.rowEditStyleFeature?.applyRowStyles(),this.postProcessRowDragging()}onRowNodeHighlightChanged(){const e=this.beans.rowDropHighlightSvc,t=e?.row===this.rowNode?e.position:"none",n=t==="above",i=t==="inside",o=t==="below",r=t!=="none",s=n||o,a=this.rowNode.uiLevel,l=s&&a>0,u=l?a.toString():"0";for(const h of this.allRowGuis){const f=h.rowComp;f.toggleCss("ag-row-highlight-above",n),f.toggleCss("ag-row-highlight-inside",i),f.toggleCss("ag-row-highlight-below",o),f.toggleCss("ag-row-highlight-indent",l),r?h.element.style.setProperty("--ag-row-highlight-level",u):h.element.style.removeProperty("--ag-row-highlight-level")}}postProcessRowDragging(){const e=this.rowNode.dragging;for(const t of this.allRowGuis)t.rowComp.toggleCss("ag-row-dragging",e)}onDisplayedColumnsChanged(){this.updateColumnLists(!0),this.beans.rowAutoHeight?.requestCheckAutoHeight()}onVirtualColumnsChanged(){this.updateColumnLists(!1,!0)}getRowPosition(){return{rowPinned:Jo(this.rowNode.rowPinned),rowIndex:this.rowNode.rowIndex}}onKeyboardNavigate(e){const t=this.findFullWidthInfoForEvent(e);if(!t)return;const{rowGui:n,column:i}=t;if(!(n.element===e.target))return;const s=this.rowNode,{focusSvc:a,navigation:l}=this.beans,u=a.getFocusedCell(),h={rowIndex:s.rowIndex,rowPinned:s.rowPinned,column:u?.column??i};l?.navigateToNextCell(e,e.key,h,!0),e.preventDefault()}onTabKeyDown(e){if(e.defaultPrevented||sr(e))return;const t=this.allRowGuis.find(a=>a.element.contains(e.target)),n=t?t.element:null,i=n===e.target,o=It(this.beans);let r=!1;n&&o&&(r=n.contains(o)&&o.classList.contains("ag-cell"));let s=null;!i&&!r&&(s=Hs(this.beans,n,!1,e.shiftKey)),(this.isFullWidth()&&i||!s)&&this.beans.navigation?.onTabKeyDown(this,e)}getFullWidthElement(){return this.fullWidthGui?this.fullWidthGui.element:null}getRowYPosition(){const e=this.allRowGuis.find(t=>ki(t.element))?.element;return e?e.getBoundingClientRect().top:0}onSuppressCellFocusChanged(e){const t=this.isFullWidth()&&e?void 0:this.gos.get("tabIndex");for(const n of this.allRowGuis)ti(n.element,"tabindex",t)}setupFocus(){this.isFullWidth()&&(this.restoreFullWidthFocus(!0),this.onFullWidthRowFocused(this.focusEventWhileNotReady??void 0))}restoreFullWidthFocus(e=!1){const{focusSvc:t,editSvc:n}=this.beans;if(n?.isEditing(this)||!t.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned)||!t.shouldTakeFocus())return;const i=this.getFullWidthRowGuiForFocus();if(!i)return;const o=()=>{this.isAlive()&&t.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned)&&i.element.focus({preventScroll:!0})};if(e){setTimeout(o,0);return}o()}getFullWidthRowGuiForFocus(e){if(this.fullWidthGui)return this.fullWidthGui;const t=this.beans.focusSvc.getFocusedCell(),n=this.beans.colModel.getCol(e?.column??t?.column);if(!n)return;const i=n?.pinned;return i==="right"?this.rightGui:i==="left"?this.leftGui:this.centerGui}setFullWidthRowFocusedClass(e,t){this.forEachGui(void 0,n=>{n.element.classList.toggle("ag-full-width-focus",t&&n===e)})}onFullWidthRowFocused(e){const{focusSvc:t}=this.beans;if(!(this.isFullWidth()&&t.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned))){this.setFullWidthRowFocusedClass(void 0,!1);return}const i=this.getFullWidthRowGuiForFocus(e);if(!i){e&&(this.focusEventWhileNotReady=e),this.setFullWidthRowFocusedClass(void 0,!1);return}this.setFullWidthRowFocusedClass(i,!0),this.focusEventWhileNotReady=null,e?.forceBrowserFocus&&i.element.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 n={list:[],map:{}};for(const i of e.list)i!==t&&(n.list.push(i),n.map[i.column.getInstanceId()]=i);return n}onMouseEvent(e,t){switch(e){case"dblclick":this.onRowDblClick(t);break;case"click":this.onRowClick(t);break;case"pointerdown":case"touchstart":case"mousedown":this.onRowMouseDown(t);break}}createRowEvent(e,t){const{rowNode:n}=this;return We(this.gos,{type:e,node:n,data:n.data,rowIndex:n.rowIndex,rowPinned:n.rowPinned,event:t})}createRowEventWithSource(e,t){const n=this.createRowEvent(e,t);return n.source=this,n}onRowDblClick(e){if(sr(e))return;const t=this.createRowEventWithSource("rowDoubleClicked",e);t.isEventHandlingSuppressed=this.isSuppressMouseEvent(e),this.beans.eventSvc.dispatchEvent(t)}findFullWidthInfoForEvent(e){if(!e)return;const t=this.findFullWidthRowGui(e.target),n=this.getColumnForFullWidth(t);if(!(!t||!n))return{rowGui:t,column:n}}findFullWidthRowGui(e){return this.allRowGuis.find(t=>t.element.contains(e))}getColumnForFullWidth(e){const{visibleCols:t}=this.beans;switch(e?.containerType){case"center":return t.centerCols[0];case"left":return t.leftCols[0];case"right":return t.rightCols[0];default:return t.allCols[0]}}onRowMouseDown(e){if(this.lastMouseDownOnDragger=As(e.target,"ag-row-drag",3),!this.isFullWidth()||this.isSuppressMouseEvent(e))return;const{rangeSvc:t,focusSvc:n}=this.beans;t?.removeAllCellRanges();const i=this.findFullWidthInfoForEvent(e);if(!i)return;const{rowGui:o,column:r}=i,s=o.element,a=e.target,l=this.rowNode;let u=e.defaultPrevented||Ur();s&&s.contains(a)&&uc(a)&&(u=!1),n.setFocusedCell({rowIndex:l.rowIndex,column:r,rowPinned:l.rowPinned,forceBrowserFocus:u})}isSuppressMouseEvent(e){const{gos:t,rowNode:n}=this;if(this.isFullWidth()){const o=this.findFullWidthRowGui(e.target);return sN(t,o?.rowComp.getFullWidthCellRendererParams(),n,e)}const i=gm(t,e.target);return i!=null&&eh(t,i.column,n,e)}onRowClick(e){if(sr(e)||this.lastMouseDownOnDragger)return;const n=this.isSuppressMouseEvent(e),{eventSvc:i,selectionSvc:o}=this.beans,r=this.createRowEventWithSource("rowClicked",e);r.isEventHandlingSuppressed=n,i.dispatchEvent(r),!n&&o?.handleSelectionEvent(e,this.rowNode,"rowClicked")}setupDetailRowAutoHeight(e){this.rowType==="FullWidthDetail"&&this.beans.masterDetailSvc?.setupDetailRowAutoHeight(this,e)}createFullWidthCompDetails(e,t){const{gos:n,rowNode:i}=this,o=We(n,{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:(s,a,l,u)=>this.addFullWidthRowDragging(s,a,l,u),setTooltip:(s,a)=>{n.assertModuleRegistered("Tooltip",3),this.setupFullWidthRowTooltip(s,a)}}),r=this.beans.userCompFactory;switch(this.rowType){case"FullWidthDetail":return E_(r,o);case"FullWidthGroup":{const{value:s,valueFormatted:a}=this.beans.valueSvc.getValueForDisplay({node:this.rowNode,includeValueFormatted:!0,from:"edit"});return o.value=s,o.valueFormatted=a,P_(r,o)}case"FullWidthLoading":return x_(r,o);default:return F_(r,o)}}setupFullWidthRowTooltip(e,t){this.fullWidthGui&&(this.tooltipFeature=this.beans.tooltipSvc?.setupFullWidthRowTooltip(this.tooltipFeature,this,e,t))}addFullWidthRowDragging(e,t,n="",i){const{rowDragSvc:o,context:r}=this.beans;if(!o||!this.isFullWidth())return;const s=o.createRowDragComp(()=>n,this.rowNode,void 0,e,t,i);this.createBean(s,r),this.addDestroyFunc(()=>{this.destroyBean(s,r)})}onUiLevelChanged(){const e=HF(this.rowNode);if(this.rowLevel!=e){const t="ag-row-level-"+e,n="ag-row-level-"+this.rowLevel;for(const i of this.allRowGuis)i.rowComp.toggleCss(t,!0),i.rowComp.toggleCss(n,!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();if(this.firstRowOnPage!==e){this.firstRowOnPage=e;for(const n of this.allRowGuis)n.rowComp.toggleCss("ag-row-first",e)}if(this.lastRowOnPage!==t){this.lastRowOnPage=t;for(const n of this.allRowGuis)n.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(){const e=[];if(this.beans.rowStyleSvc?.processClassesFromGridOptions(e,this.rowNode),!!e.length)for(const t of e)for(const n of this.allRowGuis)n.rowComp.toggleCss(t,!0)}postProcessRowClassRules(){this.beans.rowStyleSvc?.processRowClassRules(this.rowNode,e=>{for(const t of this.allRowGuis)t.rowComp.toggleCss(e,!0)},e=>{for(const t of this.allRowGuis)t.rowComp.toggleCss(e,!1)})}setStylesFromGridOptions(e,t){e&&(this.rowStyles=this.processStylesFromGridOptions()),this.forEachGui(t,n=>n.rowComp.setUserStyles(this.rowStyles))}getPinnedForContainer(e){return e==="left"||e==="right"?e:null}getInitialRowClasses(e){const t=this.getPinnedForContainer(e),n=this.isFullWidth(),{rowNode:i,beans:o}=this,r=[];r.push("ag-row"),r.push(this.rowFocused?"ag-row-focus":"ag-row-no-focus"),this.fadeInAnimation[e]&&r.push("ag-opacity-zero"),r.push(i.rowIndex%2===0?"ag-row-even":"ag-row-odd"),i.isRowPinned()&&(r.push("ag-row-pinned"),o.pinnedRowModel?.isManual()&&r.push("ag-row-pinned-manual")),!i.isRowPinned()&&i.pinnedSibling&&r.push("ag-row-pinned-source"),i.isSelected()&&r.push("ag-row-selected"),i.footer&&r.push("ag-row-footer"),r.push("ag-row-level-"+this.rowLevel),i.stub&&r.push("ag-row-loading"),n&&r.push("ag-full-width-row"),o.expansionSvc?.addExpandedCss(r,i),i.dragging&&r.push("ag-row-dragging");const{rowStyleSvc:s}=o;return s&&(s.processClassesFromGridOptions(r,i),s.preProcessRowClassRules(r,i)),r.push(this.printLayout?"ag-row-position-relative":"ag-row-position-absolute"),this.isFirstRowOnPage()&&r.push("ag-row-first"),this.isLastRowOnPage()&&r.push("ag-row-last"),n&&(t==="left"&&r.push("ag-cell-last-left-pinned"),t==="right"&&r.push("ag-cell-first-right-pinned")),r}processStylesFromGridOptions(){return this.beans.rowStyleSvc?.processStylesFromGridOptions(this.rowNode)??this.emptyStyle}onRowSelected(e){this.beans.selectionSvc?.onRowCtrlSelected(this,t=>{(t===this.centerGui||t===this.fullWidthGui)&&this.announceDescription()},e)}announceDescription(){this.beans.selectionSvc?.announceAriaRowSelection(this.rowNode)}addHoverFunctionality(e){if(!this.active)return;const{element:t,compBean:n}=e,{rowNode:i,beans:o,gos:r}=this;n.addManagedListeners(t,{pointerenter:s=>{s.pointerType==="mouse"&&i.dispatchRowEvent("mouseEnter")},pointerleave:s=>{s.pointerType==="mouse"&&i.dispatchRowEvent("mouseLeave")}}),n.addManagedListeners(i,{mouseEnter:()=>{!o.dragSvc?.dragging&&!r.get("suppressRowHoverHighlight")&&(t.classList.add("ag-row-hover"),i.setHovered(!0))},mouseLeave:()=>{this.resetHoveredStatus(t)}})}resetHoveredStatus(e){const t=e?[e]:this.allRowGuis.map(n=>n.element);for(const n of t)n.classList.remove("ag-row-hover");this.rowNode.setHovered(!1)}roundRowTopToBounds(e){const t=this.beans.ctrlsSvc.getScrollFeature().getApproximateVScollPosition(),n=this.applyPaginationOffset(t.top,!0)-100,i=this.applyPaginationOffset(t.bottom,!0)+100;return Math.min(Math.max(n,e),i)}forEachGui(e,t){if(e)t(e);else for(const n of this.allRowGuis)t(n)}isRowRendered(){return this.allRowGuis.length>0}onRowHeightChanged(e){if(this.rowNode.rowHeight==null)return;const t=this.rowNode.rowHeight,n=this.beans.environment.getDefaultRowHeight(),o=a0(this.gos)?Gr(this.beans,this.rowNode).height:void 0,r=o?`${Math.min(n,o)-2}px`:void 0;this.forEachGui(e,s=>{s.element.style.height=`${t}px`,r&&s.element.style.setProperty("--ag-line-height",r)})}destroyFirstPass(e=!1){this.active=!1;const{rowNode:t}=this;if(!e&&za(this.gos)&&!t.sticky)if(t.rowTop!=null){const o=this.roundRowTopToBounds(t.rowTop);this.setRowTop(o)}else for(const o of this.allRowGuis)o.rowComp.toggleCss("ag-opacity-zero",!0);this.fullWidthGui?.element.contains(It(this.beans))&&this.beans.focusSvc.attemptToRecoverFocus(),t.setHovered(!1);const n=this.createRowEvent("virtualRowRemoved");this.dispatchLocalEvent(n),this.beans.eventSvc.dispatchEvent(n),super.destroy()}destroySecondPass(){this.allRowGuis.length=0;const e=t=>{for(const n of t.list)n.destroy();return{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(){const e=this.beans.pagination?.getCurrentPage()??0;this.paginationPage!==e&&(this.paginationPage=e,this.onTopChanged()),this.refreshFirstAndLastRowStyles()}onTopChanged(){this.setRowTop(this.rowNode.rowTop)}onPaginationPixelOffsetChanged(){this.onTopChanged()}applyPaginationOffset(e,t=!1){if(this.rowNode.isRowPinned()||this.rowNode.sticky)return e;const n=this.beans.pageBounds.getPixelOffset();return e+n*(t?1:-1)}setRowTop(e){if(!this.printLayout&&we(e)){const t=this.applyPaginationOffset(e),o=`${this.rowNode.isRowPinned()||this.rowNode.sticky?t:this.beans.rowContainerHeight.getRealPixelPosition(t)}px`;this.setRowTopStyle(o)}}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 n;if(t.sticky)n=t.stickyRowTop;else{const i=this.slideInAnimation[e]?this.roundRowTopToBounds(t.oldRowTop):t.rowTop,o=this.applyPaginationOffset(i);n=t.isRowPinned()?o:this.beans.rowContainerHeight.getRealPixelPosition(o)}return n+"px"}setRowTopStyle(e){for(const t of this.allRowGuis)this.suppressRowTransform?t.rowComp.setTop(e):t.rowComp.setTransform(`translateY(${e})`)}getCellCtrl(e,t=!1){let n=null;for(const i of this.getAllCellCtrls())i.column==e&&(n=i);if(n!=null||t)return n;for(const i of this.getAllCellCtrls())i?.getColSpanningList().indexOf(e)>=0&&(n=i);return n}onRowIndexChanged(){this.rowNode.rowIndex!=null&&(this.onCellFocusChanged(),this.updateRowIndexes(),this.postProcessCss())}updateRowIndexes(e){const t=this.rowNode.getRowIndexString();if(t===null)return;const n=(this.beans.ctrlsSvc.getHeaderRowContainerCtrl()?.getRowCount()??0)+(this.beans.filterManager?.getHeaderRowCount()??0),i=this.rowNode.rowIndex%2===0,o=this.ariaRowIndex=n+this.rowNode.rowIndex+1;this.forEachGui(e,r=>{r.rowComp.setRowIndex(t),r.rowComp.toggleCss("ag-row-even",i),r.rowComp.toggleCss("ag-row-odd",!i),cc(r.element,o)})}},h3=class extends X{constructor(){super(),this.beanName="navigation",this.onPageDown=$S(this.onPageDown,100),this.onPageUp=$S(this.onPageUp,100)}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.gridBodyCon=e.gridBodyCtrl})}handlePageScrollingKey(e,t=!1){const n=e.key,i=e.altKey,o=e.ctrlKey||e.metaKey,r=!!this.beans.rangeSvc&&e.shiftKey,s=pB(this.gos,e);let a=!1;switch(n){case q.PAGE_HOME:case q.PAGE_END:!o&&!i&&(this.onHomeOrEndKey(n),a=!0);break;case q.LEFT:case q.RIGHT:case q.UP:case q.DOWN:if(!s)return!1;o&&!i&&!r&&(this.onCtrlUpDownLeftRight(n,s),a=!0);break;case q.PAGE_DOWN:case q.PAGE_UP:!o&&!i&&(a=this.handlePageUpDown(n,s,t));break}return a&&e.preventDefault(),a}handlePageUpDown(e,t,n){return n&&(t=this.beans.focusSvc.getFocusedCell()),t?(e===q.PAGE_UP?this.onPageUp(t):this.onPageDown(t),!0):!1}navigateTo({scrollIndex:e,scrollType:t,scrollColumn:n,focusIndex:i,focusColumn:o,isAsync:r,rowPinned:s}){const{scrollFeature:a}=this.gridBodyCon;we(n)&&!n.isPinned()&&a.ensureColumnVisible(n),we(e)&&a.ensureIndexVisible(e,t),r||a.ensureIndexVisible(i);const{focusSvc:l}=this.beans;l.setFocusedCell({rowIndex:i,column:o,rowPinned:s,forceBrowserFocus:!0}),this.setRangeToCellIfSupported({rowIndex:i,rowPinned:s,column:o})}onPageDown(e){const t=this.beans,n=Ym(t),i=this.getViewportHeight(),{pageBounds:o,rowModel:r,rowAutoHeight:s}=t,a=o.getPixelOffset(),l=n.top+i,u=r.getRowIndexAtPixel(l+a);s?.active?this.navigateToNextPageWithAutoHeight(e,u):this.navigateToNextPage(e,u)}onPageUp(e){const t=this.beans,n=Ym(t),{pageBounds:i,rowModel:o,rowAutoHeight:r}=t,s=i.getPixelOffset(),a=n.top,l=o.getRowIndexAtPixel(a+s);r?.active?this.navigateToNextPageWithAutoHeight(e,l,!0):this.navigateToNextPage(e,l,!0)}navigateToNextPage(e,t,n=!1){const{pageBounds:i,rowModel:o}=this.beans,r=this.getViewportHeight(),s=i.getFirstRow(),a=i.getLastRow(),l=i.getPixelOffset(),u=o.getRow(e.rowIndex),h=n?u?.rowHeight-r-l:r-l,f=u?.rowTop+h;let p=o.getRowIndexAtPixel(f+l);if(p===e.rowIndex){const v=n?-1:1;t=p=e.rowIndex+v}let m;n?(m="bottom",p<s&&(p=s),t<s&&(t=s)):(m="top",p>a&&(p=a),t>a&&(t=a)),this.isRowTallerThanView(o.getRow(p))&&(t=p,m="top"),this.navigateTo({scrollIndex:t,scrollType:m,scrollColumn:null,focusIndex:p,focusColumn:e.column})}navigateToNextPageWithAutoHeight(e,t,n=!1){this.navigateTo({scrollIndex:t,scrollType:n?"bottom":"top",scrollColumn:null,focusIndex:t,focusColumn:e.column}),setTimeout(()=>{const i=this.getNextFocusIndexForAutoHeight(e,n);this.navigateTo({scrollIndex:t,scrollType:n?"bottom":"top",scrollColumn:null,focusIndex:i,focusColumn:e.column,isAsync:!0})},50)}getNextFocusIndexForAutoHeight(e,t=!1){const n=t?-1:1,i=this.getViewportHeight(),{pageBounds:o,rowModel:r}=this.beans,s=o.getLastRow();let a=0,l=e.rowIndex;for(;l>=0&&l<=s;){const u=r.getRow(l);if(u){const h=u.rowHeight??0;if(a+h>i)break;a+=h}l+=n}return Math.max(0,Math.min(l,s))}getViewportHeight(){const e=this.beans,t=Ym(e),n=this.beans.scrollVisibleSvc.getScrollbarWidth();let i=t.bottom-t.top;return e.ctrlsSvc.get("center").isHorizontalScrollShowing()&&(i-=n),i}isRowTallerThanView(e){if(!e)return!1;const t=e.rowHeight;return typeof t!="number"?!1:t>this.getViewportHeight()}onCtrlUpDownLeftRight(e,t){const n=this.beans.cellNavigation.getNextCellToFocus(e,t,!0);if(!n)return;const i=this.getNormalisedPosition(n),{rowIndex:o,rowPinned:r,column:s}=i??n,a=s;this.navigateTo({scrollIndex:o,scrollType:null,scrollColumn:a,focusIndex:o,focusColumn:a,rowPinned:r})}onHomeOrEndKey(e){const t=e===q.PAGE_HOME,{visibleCols:n,pageBounds:i,rowModel:o}=this.beans,r=n.allCols,s=t?i.getFirstRow():i.getLastRow(),a=o.getRow(s);if(!a)return;const l=(t?r:[...r].reverse()).find(u=>!u.isSuppressNavigable(a)&&!zn(u));l&&this.navigateTo({scrollIndex:s,scrollType:null,scrollColumn:l,focusIndex:s,focusColumn:l})}onTabKeyDown(e,t){const n=t.shiftKey,i=this.tabToNextCellCommon(e,n,t),o=this.beans,{ctrlsSvc:r,pageBounds:s,focusSvc:a,gos:l}=o;if(i!==!1){i?t.preventDefault():i===null&&r.get("gridCtrl").allowFocusForNextCoreContainer(n);return}if(n){const{rowIndex:u,rowPinned:h}=e.getRowPosition();(h?u===0:u===s.getFirstRow())&&(l.get("headerHeight")===0||no(o)?Xa(o,!0,!0):(t.preventDefault(),a.focusPreviousFromFirstCell(t)))}else e instanceof sl&&e.focusCell(!0),(a.focusOverlay(!1)||Xa(o,n))&&t.preventDefault()}tabToNextCell(e,t){const n=this.beans,{focusSvc:i,rowRenderer:o}=n,r=i.getFocusedCell();if(!r)return!1;let s=Za(n,r);return!s&&(s=o.getRowByPosition(r),!s?.isFullWidth())?!1:!!this.tabToNextCellCommon(s,e,t,"api")}tabToNextCellCommon(e,t,n,i="ui"){const{editSvc:o,focusSvc:r}=this.beans;let s;const a=e instanceof sl?e:e.getAllCellCtrls()?.[0];return o?.isEditing()?s=o?.moveToNextCell(a,t,n,i):s=this.moveToNextCellNotEditing(e,t,n),s===null?s:s||!!r.focusedHeader}moveToNextCellNotEditing(e,t,n){const i=this.beans.visibleCols.allCols;let o;if(e instanceof bh){if(o={...e.getRowPosition(),column:t?i[0]:Pt(i)},this.gos.get("embedFullWidthRows")&&n){const s=e.findFullWidthInfoForEvent(n);s&&(o.column=s.column)}}else o=e.getFocusedCellPosition();const r=this.findNextCellToFocusOn(o,{backwards:t,startEditing:!1});if(r===!1)return null;if(r instanceof sl)r.focusCell(!0);else if(r)return this.tryToFocusFullWidthRow(r,t);return we(r)}findNextCellToFocusOn(e,{backwards:t,startEditing:n,skipToNextEditableCell:i}){let o=e;const r=this.beans,{cellNavigation:s,gos:a,focusSvc:l,rowRenderer:u}=r;for(;;){e!==o&&(e=o),t||(o=this.getLastCellOfColSpan(o)),o=s.getNextTabbedCell(o,t);const h=a.getCallback("tabToNextCell");if(we(h)){const v=h({backwards:t,editing:n,previousCellPosition:e,nextCellPosition:o||null});if(v===!0)o=e;else{if(v===!1)return!1;o={rowIndex:v.rowIndex,column:v.column,rowPinned:v.rowPinned}}}if(!o)return null;if(o.rowIndex<0){const m=Oi(r);return l.focusHeaderPosition({headerPosition:{headerRowIndex:m+o.rowIndex,column:o.column},fromCell:!0}),null}const f=a.get("editType")==="fullRow";if(n&&(!f||i)&&!this.isCellEditable(o))continue;this.ensureCellVisible(o);const p=Za(r,o);if(!p){const m=u.getRowByPosition(o);if(!m||!m.isFullWidth()||n)continue;return{...m.getRowPosition(),column:o?.column}}if(!s.isSuppressNavigable(p.column,p.rowNode))return p.setFocusedCellPosition(o),this.setRangeToCellIfSupported(o),p}}isCellEditable(e){const t=this.lookupRowNodeForCell(e);return t?e.column.isCellEditable(t):!1}lookupRowNodeForCell({rowIndex:e,rowPinned:t}){const{pinnedRowModel:n,rowModel:i}=this.beans;return t==="top"?n?.getPinnedTopRow(e):t==="bottom"?n?.getPinnedBottomRow(e):i.getRow(e)}navigateToNextCell(e,t,n,i){let o=n,r=!1;const s=this.beans,{cellNavigation:a,focusSvc:l,gos:u}=s;for(;o&&(o===n||!this.isValidNavigateCell(o));)u.get("enableRtl")?t===q.LEFT&&(o=this.getLastCellOfColSpan(o)):t===q.RIGHT&&(o=this.getLastCellOfColSpan(o)),o=a.getNextCellToFocus(t,o),r=Nt(o);if(r&&e&&e.key===q.UP&&(o={rowIndex:-1,rowPinned:null,column:n.column}),i){const f=u.getCallback("navigateToNextCell");if(we(f)){const m=f({key:t,previousCellPosition:n,nextCellPosition:o||null,event:e});we(m)?o={rowPinned:m.rowPinned,rowIndex:m.rowIndex,column:m.column}:o=null}}if(!o)return;if(o.rowIndex<0){const f=Oi(s);l.focusHeaderPosition({headerPosition:{headerRowIndex:f+o.rowIndex,column:o.column??n.column},event:e||void 0,fromCell:!0});return}const h=this.getNormalisedPosition(o);h?this.focusPosition(h):this.tryToFocusFullWidthRow(o)}getNormalisedPosition(e){if(!!this.beans.spannedRowRenderer?.getCellByPosition(e))return e;this.ensureCellVisible(e);const n=Za(this.beans,e);return n?(e=n.getFocusedCellPosition(),this.ensureCellVisible(e),e):null}tryToFocusFullWidthRow(e,t){const{visibleCols:n,rowRenderer:i,focusSvc:o,eventSvc:r}=this.beans,s=n.allCols;if(!i.getRowByPosition(e)?.isFullWidth())return!1;const l=o.getFocusedCell(),u={rowIndex:e.rowIndex,rowPinned:e.rowPinned,column:e.column||(t?Pt(s):s[0])};this.focusPosition(u);const h=t??(l!=null&&h2(u,l));return r.dispatchEvent({type:"fullWidthRowFocused",rowIndex:u.rowIndex,rowPinned:u.rowPinned,column:u.column,isFullWidthCell:!0,fromBelow:h}),!0}focusPosition(e){const{focusSvc:t}=this.beans;t.setFocusedCell({rowIndex:e.rowIndex,column:e.column,rowPinned:e.rowPinned,forceBrowserFocus:!0}),this.setRangeToCellIfSupported(e)}setRangeToCellIfSupported(e){zn(e.column)||this.beans.rangeSvc?.setRangeToCell(e)}isValidNavigateCell(e){return!!Do(this.beans,e)}getLastCellOfColSpan(e){const t=Za(this.beans,e);if(!t)return e;const n=t.getColSpanningList();return n.length===1?e:{rowIndex:e.rowIndex,column:Pt(n),rowPinned:e.rowPinned}}ensureCellVisible(e){const t=c0(this.gos),n=this.beans.rowModel.getRow(e.rowIndex),i=t&&n?.sticky,{scrollFeature:o}=this.gridBodyCon;!i&&Nt(e.rowPinned)&&o.ensureIndexVisible(e.rowIndex),e.column.isPinned()||o.ensureColumnVisible(e.column)}ensureColumnVisible(e){const t=this.gridBodyCon.scrollFeature;e.isPinned()||t.ensureColumnVisible(e)}ensureRowVisible(e){this.gridBodyCon.scrollFeature.ensureIndexVisible(e)}};function Ym(e){return e.ctrlsSvc.getScrollFeature().getVScrollPosition()}var f3={moduleName:"KeyboardNavigation",version:ve,beans:[h3,A5,$V],apiFunctions:{getFocusedCell:I5,clearFocusedCell:M5,setFocusedCell:k5,setFocusedHeader:_5,tabToNextCell:L5,tabToPreviousCell:O5}},p3=class extends X{constructor(){super(...arguments),this.beanName="pageBoundsListener"}postConstruct(){this.addManagedEventListeners({modelUpdated:this.onModelUpdated.bind(this),recalculateRowBounds:this.calculatePages.bind(this)}),this.onModelUpdated()}onModelUpdated(e){this.calculatePages(),this.eventSvc.dispatchEvent({type:"paginationChanged",animate:e?.animate??!1,newData:e?.newData??!1,newPage:e?.newPage??!1,newPageSize:e?.newPageSize??!1,keepRenderedRows:e?.keepRenderedRows??!1})}calculatePages(){const{pageBounds:e,pagination:t,rowModel:n}=this.beans;t?t.calculatePages():e.calculateBounds(0,n.getRowCount()-1)}},g3=class extends X{constructor(){super(...arguments),this.beanName="pageBounds",this.pixelOffset=0}getFirstRow(){return this.topRowBounds?.rowIndex??-1}getLastRow(){return this.bottomRowBounds?.rowIndex??-1}getCurrentPageHeight(){const{topRowBounds:e,bottomRowBounds:t}=this;return!e||!t?0:Math.max(t.rowTop+t.rowHeight-e.rowTop,0)}getCurrentPagePixelRange(){const{topRowBounds:e,bottomRowBounds:t}=this,n=e?.rowTop??0,i=t?t.rowTop+t.rowHeight:0;return{pageFirstPixel:n,pageLastPixel:i}}calculateBounds(e,t){const{rowModel:n}=this.beans,i=n.getRowBounds(e);i&&(i.rowIndex=e),this.topRowBounds=i;const o=n.getRowBounds(t);o&&(o.rowIndex=t),this.bottomRowBounds=o,this.calculatePixelOffset()}getPixelOffset(){return this.pixelOffset}calculatePixelOffset(){const e=this.topRowBounds?.rowTop??0;this.pixelOffset!==e&&(this.pixelOffset=e,this.eventSvc.dispatchEvent({type:"paginationPixelOffsetChanged"}))}},m3=".ag-pinned-left-floating-bottom,.ag-pinned-left-floating-top,.ag-pinned-right-floating-bottom,.ag-pinned-right-floating-top{min-width:0;overflow:hidden;position:relative}.ag-pinned-left-sticky-top,.ag-pinned-right-sticky-top{height:100%;overflow:hidden;position:relative}.ag-sticky-bottom-full-width-container,.ag-sticky-top-full-width-container{height:100%;overflow:hidden;width:100%}.ag-pinned-left-header,.ag-pinned-right-header{display:inline-block;height:100%;overflow:hidden;position:relative}.ag-body-horizontal-scroll:not(.ag-scrollbar-invisible){.ag-horizontal-left-spacer:not(.ag-scroller-corner){border-right:var(--ag-pinned-column-border)}.ag-horizontal-right-spacer:not(.ag-scroller-corner){border-left:var(--ag-pinned-column-border)}}.ag-pinned-right-header{border-left:var(--ag-pinned-column-border)}.ag-pinned-left-header{border-right:var(--ag-pinned-column-border)}.ag-cell.ag-cell-first-right-pinned:not(.ag-cell-range-left,.ag-cell-range-single-cell,.ag-cell-focus:not(.ag-cell-range-selected):focus-within){border-left:var(--ag-pinned-column-border)}.ag-cell.ag-cell-last-left-pinned:not(.ag-cell-range-right,.ag-cell-range-single-cell,.ag-cell-focus:not(.ag-cell-range-selected):focus-within){border-right:var(--ag-pinned-column-border)}.ag-pinned-left-header .ag-header-cell-resize:after{left:calc(50% - var(--ag-header-column-resize-handle-width))}.ag-pinned-right-header .ag-header-cell-resize:after{left:50%}.ag-pinned-left-header .ag-header-cell-resize{right:-3px}.ag-pinned-right-header .ag-header-cell-resize{left:-3px}",v3=class extends X{constructor(e,t){super(),this.isLeft=e,this.elements=t,this.getWidth=e?()=>this.beans.pinnedCols.leftWidth:()=>this.beans.pinnedCols.rightWidth}postConstruct(){this.addManagedEventListeners({[`${this.isLeft?"left":"right"}PinnedWidthChanged`]:this.onPinnedWidthChanged.bind(this)})}onPinnedWidthChanged(){const e=this.getWidth(),t=e>0;for(const n of this.elements)n&&(bt(n,t),xo(n,e))}},C3=class extends X{constructor(){super(...arguments),this.beanName="pinnedCols"}postConstruct(){this.beans.ctrlsSvc.whenReady(this,t=>{this.gridBodyCtrl=t.gridBodyCtrl});const e=this.checkContainerWidths.bind(this);this.addManagedEventListeners({displayedColumnsChanged:e,displayedColumnsWidthChanged:e}),this.addManagedPropertyListener("domLayout",e)}checkContainerWidths(){const{gos:e,visibleCols:t,eventSvc:n}=this.beans,i=yn(e,"print"),o=i?0:t.getColsLeftWidth(),r=i?0:t.getDisplayedColumnsRightWidth();o!=this.leftWidth&&(this.leftWidth=o,n.dispatchEvent({type:"leftPinnedWidthChanged"})),r!=this.rightWidth&&(this.rightWidth=r,n.dispatchEvent({type:"rightPinnedWidthChanged"}))}keepPinnedColumnsNarrowerThanViewport(){const e=this.gridBodyCtrl.eBodyViewport,t=hc(e);if(t<=50)return;const n=this.getPinnedColumnsOverflowingViewport(t-50),i=this.gos.getCallback("processUnpinnedColumns"),{columns:o,hasLockedPinned:r}=n;let s=o;!s.length&&!r||(i&&(s=i({columns:s,viewportWidth:t})),s?.length&&(s=s.filter(a=>!zn(a)),this.setColsPinned(s,null,"viewportSizeFeature")))}createPinnedWidthFeature(e,...t){return new v3(e,t)}setColsPinned(e,t,n){const{colModel:i,colAnimation:o,visibleCols:r,gos:s}=this.beans;if(!i.cols||!e?.length)return;if(yn(s,"print")){se(37);return}o?.start();let a;t===!0||t==="left"?a="left":t==="right"?a="right":a=null;const l=[];for(const u of e){if(!u)continue;const h=i.getCol(u);h&&h.getPinned()!==a&&(this.setColPinned(h,a),l.push(h))}l.length&&(r.refresh(n),qR(this.eventSvc,l,n)),o?.finish()}initCol(e){const{pinned:t,initialPinned:n}=e.colDef;t!==void 0?this.setColPinned(e,t):this.setColPinned(e,n)}setColPinned(e,t){t===!0||t==="left"?e.pinned="left":t==="right"?e.pinned="right":e.pinned=null,e.dispatchStateUpdatedEvent("pinned")}setupHeaderPinnedWidth(e){const{scrollVisibleSvc:t}=this.beans;if(e.pinned==null)return;const n=e.pinned==="left",i=e.pinned==="right";e.hidden=!0;const o=()=>{const r=n?this.leftWidth:this.rightWidth;if(r==null)return;const s=r==0,a=e.hidden!==s,l=this.gos.get("enableRtl"),u=t.getScrollbarWidth(),f=t.verticalScrollShowing&&(l&&n||!l&&i)?r+u:r;e.comp.setPinnedContainerWidth(`${f}px`),e.comp.setDisplayed(!s),a&&(e.hidden=s,e.refresh())};e.addManagedEventListeners({leftPinnedWidthChanged:o,rightPinnedWidthChanged:o,scrollVisibilityChanged:o,scrollbarWidthChanged:o})}getHeaderResizeDiff(e,t){if(t.getPinned()){const{leftWidth:i,rightWidth:o}=this,r=hc(this.beans.ctrlsSvc.getGridBodyCtrl().eBodyViewport)-50;if(i+o+e>r)if(r>i+o)e=r-i-o;else return 0}return e}getPinnedColumnsOverflowingViewport(e){const t=this.rightWidth??0,n=this.leftWidth??0,i=t+n;let o=!1;if(i<e)return{columns:[],hasLockedPinned:o};const{visibleCols:r}=this.beans,s=[...r.leftCols],a=[...r.rightCols];let l=0,u=0;const h=0,f=[];let p=i-h-e;for(;(u<s.length||l<a.length)&&p>0;){if(l<a.length){const m=a[l++];if(m.colDef.lockPinned){o=!0;continue}p-=m.getActualWidth(),f.push(m)}if(u<s.length&&p>0){const m=s[u++];if(m.colDef.lockPinned){o=!0;continue}p-=m.getActualWidth(),f.push(m)}}return{columns:f,hasLockedPinned:o}}},w3={moduleName:"PinnedColumn",version:ve,beans:[C3],css:[m3]},b3=class extends Vn{constructor(){super(),this.beanName="ariaAnnounce",this.descriptionContainer=null,this.pendingAnnouncements=new Map,this.lastAnnouncement="",this.updateAnnouncement=hn(this,this.updateAnnouncement.bind(this),200)}postConstruct(){const e=this.beans,t=nn(e),n=this.descriptionContainer=t.createElement("div");n.classList.add("ag-aria-description-container"),TS(n,"polite"),cL(n,"additions text"),lL(n,!0),e.eRootDiv.appendChild(n)}announceValue(e,t){this.pendingAnnouncements.set(t,e),this.updateAnnouncement()}updateAnnouncement(){if(!this.descriptionContainer)return;const e=Array.from(this.pendingAnnouncements.values()).join(". ");this.pendingAnnouncements.clear(),this.descriptionContainer.textContent="",setTimeout(()=>{this.handleAnnouncementUpdate(e)},50)}handleAnnouncementUpdate(e){if(!this.isAlive()||!this.descriptionContainer)return;let t=e;if(t==null||t.replace(/[ .]/g,"")==""){this.lastAnnouncement="";return}this.lastAnnouncement===t&&(t=`${t}`),this.lastAnnouncement=t,this.descriptionContainer.textContent=t}destroy(){super.destroy();const{descriptionContainer:e}=this;e&&(bn(e),e.remove()),this.descriptionContainer=null,this.pendingAnnouncements.clear()}},y3=class extends b3{},S3={moduleName:"Aria",version:ve,beans:[y3]},R3=":where(.ag-delay-render){.ag-cell,.ag-header-cell,.ag-header-group-cell,.ag-row,.ag-spanned-cell-wrapper{visibility:hidden}}",VF="ag-delay-render",F3=class extends X{constructor(){super(...arguments),this.beanName="colDelayRenderSvc",this.hideRequested=!1,this.alreadyRevealed=!1,this.timesRetried=0,this.requesters=new Set}hideColumns(e){this.alreadyRevealed||this.requesters.has(e)||(this.requesters.add(e),this.hideRequested||(this.beans.ctrlsSvc.whenReady(this,t=>{t.gridBodyCtrl.eGridBody.classList.add(VF)}),this.hideRequested=!0))}revealColumns(e){if(this.alreadyRevealed||!this.isAlive()||(this.requesters.delete(e),this.requesters.size>0))return;const{renderStatus:t,ctrlsSvc:n}=this.beans;if(t){if(!t.areHeaderCellsRendered()&&this.timesRetried<5){this.timesRetried++,setTimeout(()=>this.revealColumns(e));return}this.timesRetried=0}n.getGridBodyCtrl().eGridBody.classList.remove(VF),this.alreadyRevealed=!0}},x3={moduleName:"ColumnDelayRender",version:ve,beans:[F3],css:[R3]},yh=class extends yt{constructor(){super()}},P3={tag:"div",cls:"ag-overlay-exporting-center",children:[{tag:"span",ref:"eExportingIcon",cls:"ag-loading-icon"},{tag:"span",ref:"eExportingText",cls:"ag-exporting-text"}]},E3=class extends yh{constructor(){super(...arguments),this.eExportingIcon=he,this.eExportingText=he}init(e){const{beans:t}=this;this.setTemplate(P3);const n=ii("overlayExporting",t,null);n&&this.eExportingIcon.appendChild(n);const i=e.exporting?.overlayText??this.getLocaleTextFunc()("exportingOoo","Exporting...");this.eExportingText.textContent=i,t.ariaAnnounce.announceValue(i,"overlay")}},D3={tag:"div",cls:"ag-overlay-loading-center",children:[{tag:"span",ref:"eLoadingIcon",cls:"ag-loading-icon"},{tag:"span",ref:"eLoadingText",cls:"ag-loading-text"}]},T3=class extends yh{constructor(){super(...arguments),this.eLoadingIcon=he,this.eLoadingText=he}init(e){const{beans:t,gos:n}=this,i=Jo(n.get("overlayLoadingTemplate")?.trim());if(this.setTemplate(i??D3),!i){const o=ii("overlayLoading",t,null);o&&this.eLoadingIcon.appendChild(o);const r=e.loading?.overlayText??this.getLocaleTextFunc()("loadingOoo","Loading...");this.eLoadingText.textContent=r,t.ariaAnnounce.announceValue(r,"overlay")}}},A3={tag:"span",cls:"ag-overlay-no-matching-rows-center"},I3=class extends yh{init(e){const{beans:t}=this;this.setTemplate(A3);const n=e.noMatchingRows?.overlayText??this.getLocaleTextFunc()("noMatchingRows","No Matching Rows");this.getGui().textContent=n,t.ariaAnnounce.announceValue(n,"overlay")}},M3={tag:"span",cls:"ag-overlay-no-rows-center"},k3=class extends yh{init(e){const{beans:t,gos:n}=this,i=Jo(n.get("overlayNoRowsTemplate")?.trim());if(this.setTemplate(i??M3),!i){const o=e.noRows?.overlayText??this.getLocaleTextFunc()("noRowsToShow","No Rows To Show");this.getGui().textContent=o,t.ariaAnnounce.announceValue(o,"overlay")}}};function L3(e){e.overlays?.showLoadingOverlay()}function O3(e){e.overlays?.showNoRowsOverlay()}function _3(e){e.overlays?.hideOverlay()}var N3=".ag-overlay{inset:0;pointer-events:none;position:absolute;z-index:2}.ag-overlay-panel,.ag-overlay-wrapper{display:flex;height:100%;width:100%}.ag-overlay-wrapper{align-items:center;flex:none;justify-content:center;text-align:center}.ag-overlay-exporting-wrapper,.ag-overlay-loading-wrapper,.ag-overlay-modal-wrapper{pointer-events:all}.ag-overlay-exporting-center,.ag-overlay-loading-center{background:var(--ag-background-color);border:solid var(--ag-border-width) var(--ag-border-color);border-radius:var(--ag-border-radius);box-shadow:var(--ag-popup-shadow);display:flex;padding:var(--ag-spacing)}",B3={tag:"div",cls:"ag-overlay",role:"presentation",children:[{tag:"div",cls:"ag-overlay-panel",role:"presentation",children:[{tag:"div",ref:"eOverlayWrapper",cls:"ag-overlay-wrapper",role:"presentation"}]}]},WF=class extends yt{constructor(){super(B3),this.eOverlayWrapper=he,this.activeOverlay=null,this.activePromise=null,this.activeCssClass=null,this.elToFocusAfter=null,this.overlayExclusive=!1,this.oldWrapperPadding=null,this.registerCSS(N3)}handleKeyDown(e){if(e.key!==q.TAB||e.defaultPrevented||sr(e))return;const{beans:t,eOverlayWrapper:n}=this;if(n&&Hs(t,n,!1,e.shiftKey))return;let o=!1;e.shiftKey?o=t.focusSvc.focusGridView({column:Pt(t.visibleCols.allCols),backwards:!0,canFocusOverlay:!1}):o=Xa(t,!1),o&&e.preventDefault()}updateLayoutClasses(e,t){const n=this.eOverlayWrapper;if(!n)return;const i=n.classList,{AUTO_HEIGHT:o,NORMAL:r,PRINT:s}=io;i.toggle(o,t.autoHeight),i.toggle(r,t.normal),i.toggle(s,t.print)}postConstruct(){this.createManagedBean(new hm(this)),this.setDisplayed(!1,{skipAriaHidden:!0}),this.beans.overlays.setWrapperComp(this,!1),this.addManagedElementListeners(this.getFocusableElement(),{keydown:this.handleKeyDown.bind(this)}),this.addManagedEventListeners({gridSizeChanged:this.refreshWrapperPadding.bind(this)})}setWrapperTypeClass(e){const t=this.eOverlayWrapper?.classList;if(!t){this.activeCssClass=null;return}this.activeCssClass&&t.toggle(this.activeCssClass,!1),this.activeCssClass=e,t.toggle(e,!0)}showOverlay(e,t,n){if(this.destroyActiveOverlay(),this.elToFocusAfter=null,this.activePromise=e,this.overlayExclusive=n,!e)return this.refreshWrapperPadding(),Mt.resolve();if(this.setWrapperTypeClass(t),this.setDisplayed(!0,{skipAriaHidden:!0}),this.refreshWrapperPadding(),n&&this.isGridFocused()){const i=It(this.beans);i&&!ug(this.beans)&&(this.elToFocusAfter=i)}return e.then(i=>{const o=this.eOverlayWrapper;if(!o){this.destroyBean(i);return}if(this.activePromise!==e){this.activeOverlay!==i&&(this.destroyBean(i),i=null);return}this.activePromise=null,i&&(this.activeOverlay!==i&&(o.appendChild(i.getGui()),this.activeOverlay=i),n&&this.isGridFocused()&&Gs(o))}),e}refreshWrapperPadding(){if(!this.eOverlayWrapper){this.oldWrapperPadding=null;return}const e=!!this.activeOverlay||!!this.activePromise;let t=0;e&&!this.overlayExclusive&&(t=this.beans.ctrlsSvc.get("gridHeaderCtrl")?.headerHeight||0),t!==this.oldWrapperPadding&&(this.oldWrapperPadding=t,this.eOverlayWrapper.style.setProperty("padding-top",`${t}px`))}destroyActiveOverlay(){this.activePromise=null;const e=this.activeOverlay;if(!e){this.overlayExclusive=!1,this.elToFocusAfter=null,this.refreshWrapperPadding();return}let t=this.elToFocusAfter;this.elToFocusAfter=null,this.activeOverlay=null,this.overlayExclusive=!1,t&&!this.isGridFocused()&&(t=null),this.destroyBean(e);const n=this.eOverlayWrapper;n&&bn(n),t?.focus?.({preventScroll:!0}),this.refreshWrapperPadding()}hideOverlay(){this.destroyActiveOverlay(),this.setDisplayed(!1,{skipAriaHidden:!0})}isGridFocused(){const e=It(this.beans);return!!e&&this.beans.eGridDiv.contains(e)}destroy(){this.elToFocusAfter=null,this.destroyActiveOverlay(),this.beans.overlays.setWrapperComp(this,!0),super.destroy(),this.eOverlayWrapper=null}},G3={selector:"AG-OVERLAY-WRAPPER",component:WF},H3=["refresh"],_c=e=>({name:e,optionalMethods:H3}),Qs={id:"agLoadingOverlay",overlayType:"loading",comp:_c("loadingOverlayComponent"),wrapperCls:"ag-overlay-loading-wrapper",exclusive:!0,compKey:"loadingOverlayComponent",paramsKey:"loadingOverlayComponentParams",isSuppressed:e=>{const t=e.get("loading");return t===!1||e.get("suppressLoadingOverlay")===!0&&t!==!0}},al={id:"agNoRowsOverlay",overlayType:"noRows",comp:_c("noRowsOverlayComponent"),wrapperCls:"ag-overlay-no-rows-wrapper",compKey:"noRowsOverlayComponent",paramsKey:"noRowsOverlayComponentParams",isSuppressed:e=>e.get("suppressNoRowsOverlay")},Zm={id:"agNoMatchingRowsOverlay",overlayType:"noMatchingRows",comp:_c("noMatchingRowsOverlayComponent"),wrapperCls:"ag-overlay-no-matching-rows-wrapper"},Sh={id:"agExportingOverlay",overlayType:"exporting",comp:_c("exportingOverlayComponent"),wrapperCls:"ag-overlay-exporting-wrapper",exclusive:!0},Rh={id:"activeOverlay",comp:_c("activeOverlay"),wrapperCls:"ag-overlay-modal-wrapper",exclusive:!0},V3=e=>e?{agLoadingOverlay:Qs,agNoRowsOverlay:al,agNoMatchingRowsOverlay:Zm,agExportingOverlay:Sh}[e]??Rh:null,W3=e=>e?{loading:Qs,noRows:al,noMatchingRows:Zm,exporting:Sh}[e]:null,z3=class extends X{constructor(){super(...arguments),this.beanName="overlays",this.eWrapper=void 0,this.exclusive=!1,this.oldExclusive=!1,this.currentDef=null,this.showInitialOverlay=!0,this.userForcedNoRows=!1,this.exportsInProgress=0,this.newColumnsLoadedCleanup=null}postConstruct(){const e=this.gos;this.showInitialOverlay=Yt(e);const t=()=>{this.userForcedNoRows||this.updateOverlay(!1)},[n,i,o,r]=this.addManagedEventListeners({newColumnsLoaded:t,rowCountReady:()=>{this.disableInitialOverlay(),t(),i()},rowDataUpdated:t,modelUpdated:t});this.newColumnsLoadedCleanup=n,this.addManagedPropertyListeners(["loading","activeOverlay","activeOverlayParams","overlayComponentParams","loadingOverlayComponentParams","noRowsOverlayComponentParams"],s=>this.onPropChange(new Set(s.changeSet?.properties)))}destroy(){this.doHideOverlay(),super.destroy(),this.eWrapper=void 0}setWrapperComp(e,t){this.isAlive()&&(t?this.eWrapper===e&&(this.eWrapper=void 0):this.eWrapper=e,this.updateOverlay(!1))}isVisible(){return!!this.currentDef}showLoadingOverlay(){this.showInitialOverlay=!1;const e=this.gos;if(!this.eWrapper||e.get("activeOverlay")||this.isDisabled(Qs))return;const t=e.get("loading");!t&&t!==void 0||this.doShowOverlay(Qs)}showNoRowsOverlay(){this.showInitialOverlay=!1;const e=this.gos;!this.eWrapper||e.get("activeOverlay")||e.get("loading")||this.isDisabled(al)||(this.userForcedNoRows=!0,this.doShowOverlay(al))}async showExportOverlay(e){const{gos:t,beans:n}=this;if(!this.eWrapper||t.get("activeOverlay")||t.get("loading")||this.isDisabled(Sh)||this.userForcedNoRows&&this.currentDef===al){e();return}const i=this.getDesiredDefWithOverride(Sh);if(!i){e();return}this.exportsInProgress++,this.focusedCell=n.focusSvc.getFocusedCell(),await this.doShowOverlay(i),await new Promise(r=>setTimeout(()=>r()));const o=Date.now();try{e()}finally{const r=Date.now()-o,s=Math.max(0,300-r),a=()=>{this.exportsInProgress--,this.exportsInProgress===0&&(this.updateOverlay(!1),C2(n,this.focusedCell),this.focusedCell=null)};s>0?setTimeout(()=>a(),s):a()}}hideOverlay(){const e=this.gos;this.showInitialOverlay=!1;const t=this.userForcedNoRows;if(this.userForcedNoRows=!1,e.get("loading")){se(99);return}if(e.get("activeOverlay")){se(296);return}if(this.currentDef===Zm){se(297);return}this.doHideOverlay(),t&&this.getOverlayDef()!==al&&this.updateOverlay(!1)}getOverlayWrapperSelector(){return G3}getOverlayWrapperCompClass(){return WF}onPropChange(e){const t=e.has("activeOverlay");if((t||e.has("loading"))&&this.updateOverlay(t))return;const n=this.currentDef,i=this.eWrapper?.activeOverlay;if(i&&n){const o=e.has("activeOverlayParams");if(n===Rh)o&&i.refresh?.(this.makeCompParams(!0));else{const r=n.paramsKey;(e.has("overlayComponentParams")||r&&e.has(r))&&i.refresh?.(this.makeCompParams(!1,r,n.overlayType))}}}updateOverlay(e){const t=this.eWrapper;if(!t)return this.currentDef=null,!1;const n=this.getDesiredDefWithOverride(),i=this.currentDef,o=n===Rh&&e;return n!==i?n?(this.doShowOverlay(n),!0):(this.disableInitialOverlay(),this.doHideOverlay()):o&&n?(t.hideOverlay(),this.doShowOverlay(n),!0):(n||this.disableInitialOverlay(),!1)}getDesiredDefWithOverride(e){const{gos:t}=this;let n=V3(t.get("activeOverlay"));return n||(n=e??this.getOverlayDef(),n&&this.isDisabled(n)&&(n=null)),n}getOverlayDef(){const{gos:e,beans:t}=this,{rowModel:n}=t,i=e.get("loading");if(i!==void 0){if(this.disableInitialOverlay(),i)return Qs}else if(this.showInitialOverlay){if(!this.isDisabled(Qs)&&(!e.get("columnDefs")||!e.get("rowData")))return Qs;this.disableInitialOverlay()}else this.disableInitialOverlay();const r=n.getOverlayType();return W3(r)}disableInitialOverlay(){this.showInitialOverlay=!1,this.newColumnsLoadedCleanup?.(),this.newColumnsLoadedCleanup=null}doShowOverlay(e){const{gos:t,beans:n}=this,{userCompFactory:i}=n;this.currentDef=e;const o=e!==Rh,r=!!e.exclusive;this.exclusive=r;let s;(e.paramsKey&&t.get(e.paramsKey)||e.compKey&&t.get(e.compKey))&&(s=e.paramsKey);let a;o&&(t.get("overlayComponent")||t.get("overlayComponentSelector"))&&(a=i.getCompDetailsFromGridOptions({name:"overlayComponent",optionalMethods:["refresh"]},void 0,this.makeCompParams(!1,e.paramsKey,e.overlayType))),a??(a=i.getCompDetailsFromGridOptions(e.comp,o?e.id:void 0,this.makeCompParams(!o,s,e.overlayType),!1));const l=a?.newAgStackInstance()??null,u=this.eWrapper?this.eWrapper.showOverlay(l,e.wrapperCls,r):Mt.resolve();return this.eWrapper?.refreshWrapperPadding(),this.setExclusive(r),u}makeCompParams(e,t,n){const{gos:i}=this,o=e?i.get("activeOverlayParams"):{...i.get("overlayComponentParams"),...t&&i.get(t)||null,overlayType:n};return We(i,o??{})}doHideOverlay(){let e=!1;this.currentDef&&(this.currentDef=null,e=!0),this.exclusive=!1;const t=this.eWrapper;return t&&(t.hideOverlay(),t.refreshWrapperPadding(),this.setExclusive(!1)),e}setExclusive(e){this.oldExclusive!==e&&(this.oldExclusive=e,this.eventSvc.dispatchEvent({type:"overlayExclusiveChanged"}))}isDisabled(e){const{gos:t}=this;return e.overlayType&&t.get("suppressOverlays")?.includes(e.overlayType)||e.isSuppressed?.(t)===!0}},U3={moduleName:"Overlay",version:ve,userComponents:{agLoadingOverlay:T3,agNoRowsOverlay:k3,agNoMatchingRowsOverlay:I3,agExportingOverlay:E3},apiFunctions:{showLoadingOverlay:L3,showNoRowsOverlay:O3,hideOverlay:_3},icons:{overlayLoading:"loading",overlayExporting:"loading"},beans:[z3]},$3=class extends X{constructor(){super(...arguments),this.beanName="rowContainerHeight",this.scrollY=0,this.uiBodyHeight=0}postConstruct(){this.addManagedEventListeners({bodyHeightChanged:this.updateOffset.bind(this)}),this.maxDivHeight=N_(),Br(this.gos,"RowContainerHeightService - maxDivHeight = "+this.maxDivHeight)}updateOffset(){if(!this.stretching)return;const e=this.beans.ctrlsSvc.getScrollFeature().getVScrollPosition().top,t=this.getUiBodyHeight();(e!==this.scrollY||t!==this.uiBodyHeight)&&(this.scrollY=e,this.uiBodyHeight=t,this.calculateOffset())}calculateOffset(){this.setUiContainerHeight(this.maxDivHeight),this.pixelsToShave=this.modelHeight-this.uiContainerHeight,this.maxScrollY=this.uiContainerHeight-this.uiBodyHeight;const e=this.scrollY/this.maxScrollY,t=e*this.pixelsToShave;Br(this.gos,`RowContainerHeightService - Div Stretch Offset = ${t} (${this.pixelsToShave} * ${e})`),this.setDivStretchOffset(t)}setUiContainerHeight(e){e!==this.uiContainerHeight&&(this.uiContainerHeight=e,this.eventSvc.dispatchEvent({type:"rowContainerHeightChanged"}))}clearOffset(){this.setUiContainerHeight(this.modelHeight),this.pixelsToShave=0,this.setDivStretchOffset(0)}setDivStretchOffset(e){const t=typeof e=="number"?Math.floor(e):null;this.divStretchOffset!==t&&(this.divStretchOffset=t,this.eventSvc.dispatchEvent({type:"heightScaleChanged"}))}setModelHeight(e){this.modelHeight=e,this.stretching=e!=null&&this.maxDivHeight>0&&e>this.maxDivHeight,this.stretching?this.calculateOffset():this.clearOffset()}getRealPixelPosition(e){return e-this.divStretchOffset}getUiBodyHeight(){const e=this.beans.ctrlsSvc.getScrollFeature().getVScrollPosition();return e.bottom-e.top}getScrollPositionForPixel(e){if(this.pixelsToShave<=0)return e;const t=this.modelHeight-this.getUiBodyHeight(),n=e/t;return this.maxScrollY*n}},j3=400,K3=class extends X{constructor(){super(...arguments),this.beanName="rowRenderer",this.destroyFuncsForColumnListeners=[],this.rowCtrlsByRowIndex={},this.zombieRowCtrls={},this.allRowCtrls=[],this.topRowCtrls=[],this.bottomRowCtrls=[],this.refreshInProgress=!1,this.dataFirstRenderedFired=!1,this.setupRangeSelectionListeners=()=>{const e=()=>{for(const r of this.getAllCellCtrls())r.onCellSelectionChanged()},t=()=>{for(const r of this.getAllCellCtrls())r.updateRangeBordersIfRangeCount()},n=()=>{this.eventSvc.addListener("cellSelectionChanged",e),this.eventSvc.addListener("columnMoved",t),this.eventSvc.addListener("columnPinned",t),this.eventSvc.addListener("columnVisible",t)},i=()=>{this.eventSvc.removeListener("cellSelectionChanged",e),this.eventSvc.removeListener("columnMoved",t),this.eventSvc.removeListener("columnPinned",t),this.eventSvc.removeListener("columnVisible",t)};this.addDestroyFunc(()=>i()),this.addManagedPropertyListeners(["enableRangeSelection","cellSelection"],()=>{nr(this.gos)?n():i()}),nr(this.gos)&&n()}}wireBeans(e){this.pageBounds=e.pageBounds,this.colModel=e.colModel,this.pinnedRowModel=e.pinnedRowModel,this.rowModel=e.rowModel,this.focusSvc=e.focusSvc,this.rowContainerHeight=e.rowContainerHeight,this.ctrlsSvc=e.ctrlsSvc,this.editSvc=e.editSvc}postConstruct(){this.ctrlsSvc.whenReady(this,e=>{this.gridBodyCtrl=e.gridBodyCtrl,this.initialise()})}initialise(){this.addManagedEventListeners({paginationChanged:this.onPageLoaded.bind(this),pinnedRowDataChanged:this.onPinnedRowDataChanged.bind(this),pinnedRowsChanged:this.onPinnedRowsChanged.bind(this),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this),bodyScroll:this.onBodyScroll.bind(this),bodyHeightChanged:this.redraw.bind(this,{})}),this.addManagedPropertyListeners(["domLayout","embedFullWidthRows"],()=>this.onDomLayoutChanged()),this.addManagedPropertyListeners(["suppressMaxRenderedRowRestriction","rowBuffer"],()=>this.redraw()),this.addManagedPropertyListener("suppressCellFocus",i=>this.onSuppressCellFocusChanged(i.currentValue)),this.addManagedPropertyListeners(["groupSuppressBlankHeader","getBusinessKeyForNode","fullWidthCellRenderer","fullWidthCellRendererParams","suppressStickyTotalRow","groupRowRenderer","groupRowRendererParams","loadingCellRenderer","loadingCellRendererParams","detailCellRenderer","detailCellRendererParams","enableRangeSelection","enableCellTextSelection"],()=>this.redrawRows()),this.addManagedPropertyListener("cellSelection",({currentValue:i,previousValue:o})=>{(!o&&i||o&&!i)&&this.redrawRows()});const{stickyRowSvc:e,gos:t,showRowGroupCols:n}=this.beans;if(n&&this.addManagedPropertyListener("showOpenedGroup",()=>{const i=n.columns;i.length&&this.refreshCells({columns:i,force:!0})}),e)this.stickyRowFeature=e.createStickyRowFeature(this,this.createRowCon.bind(this),this.destroyRowCtrls.bind(this));else{const i=this.gridBodyCtrl;i.setStickyTopHeight(0),i.setStickyBottomHeight(0)}this.registerCellEventListeners(),this.initialiseCache(),this.printLayout=yn(t,"print"),this.embedFullWidthRows=this.printLayout||t.get("embedFullWidthRows"),this.redrawAfterModelUpdate()}initialiseCache(){if(this.gos.get("keepDetailRows")){const e=this.getKeepDetailRowsCount(),t=e??3;this.cachedRowCtrls=new q3(t)}}getKeepDetailRowsCount(){return this.gos.get("keepDetailRowsCount")}getStickyTopRowCtrls(){return this.stickyRowFeature?.stickyTopRowCtrls??[]}getStickyBottomRowCtrls(){return this.stickyRowFeature?.stickyBottomRowCtrls??[]}updateAllRowCtrls(){const e=Object.values(this.rowCtrlsByRowIndex),t=Object.values(this.zombieRowCtrls),n=this.cachedRowCtrls?.getEntries()??[];t.length>0||n.length>0?this.allRowCtrls=[...e,...t,...n]:this.allRowCtrls=e}isCellBeingRendered(e,t){const n=this.rowCtrlsByRowIndex[e];return!t||!n?!!n:n.isFullWidth()?!0:!!this.beans.spannedRowRenderer?.getCellByPosition({rowIndex:e,column:t,rowPinned:null})||!!n.getCellCtrl(t)||!n.isRowRendered()}updateCellFocus(e){for(const t of this.getAllCellCtrls())t.onCellFocused(e);for(const t of this.getFullWidthRowCtrls())t.onFullWidthRowFocused(e)}onCellFocusChanged(e){if(e?.rowIndex!=null&&!e.rowPinned){const t=this.beans.colModel.getCol(e.column)??void 0;this.isCellBeingRendered(e.rowIndex,t)||this.redraw()}this.updateCellFocus(e)}onSuppressCellFocusChanged(e){for(const t of this.getAllCellCtrls())t.onSuppressCellFocusChanged(e);for(const t of this.getFullWidthRowCtrls())t.onSuppressCellFocusChanged(e)}registerCellEventListeners(){this.addManagedEventListeners({cellFocused:e=>this.onCellFocusChanged(e),cellFocusCleared:()=>this.updateCellFocus(),flashCells:e=>{const{cellFlashSvc:t}=this.beans;if(t)for(const n of this.getAllCellCtrls())t.onFlashCells(n,e)},columnHoverChanged:()=>{for(const e of this.getAllCellCtrls())e.onColumnHover()},displayedColumnsChanged:()=>{for(const e of this.getAllCellCtrls())e.onDisplayedColumnsChanged()},displayedColumnsWidthChanged:()=>{if(this.printLayout)for(const e of this.getAllCellCtrls())e.onLeftChanged()}}),this.setupRangeSelectionListeners(),this.refreshListenersToColumnsForCellComps(),this.addManagedEventListeners({gridColumnsChanged:this.refreshListenersToColumnsForCellComps.bind(this)}),this.addDestroyFunc(this.removeGridColumnListeners.bind(this))}removeGridColumnListeners(){for(const e of this.destroyFuncsForColumnListeners)e();this.destroyFuncsForColumnListeners.length=0}refreshListenersToColumnsForCellComps(){this.removeGridColumnListeners();const e=this.colModel.getCols();for(const t of e){const n=l=>{for(const u of this.getAllCellCtrls())u.column===t&&l(u)},i=()=>{n(l=>l.onLeftChanged())},o=()=>{n(l=>l.onWidthChanged())},r=()=>{n(l=>l.onFirstRightPinnedChanged())},s=()=>{n(l=>l.onLastLeftPinnedChanged())},a=()=>{n(l=>l.onColDefChanged())};t.__addEventListener("leftChanged",i),t.__addEventListener("widthChanged",o),t.__addEventListener("firstRightPinnedChanged",r),t.__addEventListener("lastLeftPinnedChanged",s),t.__addEventListener("colDefChanged",a),this.destroyFuncsForColumnListeners.push(()=>{t.__removeEventListener("leftChanged",i),t.__removeEventListener("widthChanged",o),t.__removeEventListener("firstRightPinnedChanged",r),t.__removeEventListener("lastLeftPinnedChanged",s),t.__removeEventListener("colDefChanged",a)})}}onDomLayoutChanged(){const e=yn(this.gos,"print"),t=e||this.gos.get("embedFullWidthRows"),n=t!==this.embedFullWidthRows||this.printLayout!==e;this.printLayout=e,this.embedFullWidthRows=t,n&&this.redrawAfterModelUpdate({domLayoutChanged:!0})}datasourceChanged(){this.firstRenderedRow=0,this.lastRenderedRow=-1;const e=Object.keys(this.rowCtrlsByRowIndex);this.removeRowCtrls(e)}onPageLoaded(e){const t={recycleRows:e.keepRenderedRows,animate:e.animate,newData:e.newData,newPage:e.newPage,onlyBody:!0};this.redrawAfterModelUpdate(t)}getAllCellsNotSpanningForColumn(e){const t=[];for(const n of this.getAllRowCtrls()){const i=n.getCellCtrl(e,!0)?.eGui;i&&t.push(i)}return t}refreshFloatingRowComps(e=!0){this.refreshFloatingRows(this.topRowCtrls,"top",e),this.refreshFloatingRows(this.bottomRowCtrls,"bottom",e)}refreshFloatingRows(e,t,n){const{pinnedRowModel:i,beans:o,printLayout:r}=this,s=Object.fromEntries(e.map(l=>[l.rowNode.id,l]));i?.forEachPinnedRow(t,(l,u)=>{const h=e[u];h&&i.getPinnedRowById(h.rowNode.id,t)===void 0&&(h.destroyFirstPass(),h.destroySecondPass()),l.id in s&&n?(e[u]=s[l.id],delete s[l.id]):e[u]=new bh(l,o,!1,!1,r)});const a=(t==="top"?i?.getPinnedTopRowCount():i?.getPinnedBottomRowCount())??0;e.length=a}onPinnedRowDataChanged(){const e={recycleRows:!0};this.redrawAfterModelUpdate(e)}onPinnedRowsChanged(){this.redrawAfterModelUpdate({recycleRows:!0})}redrawRow(e,t=!1){if(e.sticky)this.stickyRowFeature?.refreshStickyNode(e);else if(this.cachedRowCtrls?.has(e)){this.cachedRowCtrls.removeRow(e);return}else{const n=i=>{const o=i[e.rowIndex];o&&o.rowNode===e&&(o.destroyFirstPass(),o.destroySecondPass(),i[e.rowIndex]=this.createRowCon(e,!1,!1))};switch(e.rowPinned){case"top":n(this.topRowCtrls);break;case"bottom":n(this.bottomRowCtrls);break;default:n(this.rowCtrlsByRowIndex),this.updateAllRowCtrls()}}t||this.dispatchDisplayedRowsChanged(!1)}redrawRows(e){const{editSvc:t}=this.beans;if(t?.isEditing()&&(t.isBatchEditing()?t.cleanupEditors():t.stopEditing(void 0,{source:"api"})),e!=null){for(const i of e??[])this.redrawRow(i,!0);this.dispatchDisplayedRowsChanged(!1);return}this.redrawAfterModelUpdate()}redrawAfterModelUpdate(e={}){this.getLockOnRefresh();const t=this.beans.focusSvc?.getFocusCellToUseAfterRefresh();this.updateContainerHeights(),this.scrollToTopIfNewData(e);const n=!e.domLayoutChanged&&!!e.recycleRows,i=e.animate&&za(this.gos),o=n?this.getRowsToRecycle():null;n||this.removeAllRowComps(),this.workOutFirstAndLastRowsToRender();const{stickyRowFeature:r,gos:s}=this;if(r){r.checkStickyRows();const a=r.extraTopHeight+r.extraBottomHeight;a&&this.updateContainerHeights(a)}this.recycleRows(o,i),this.gridBodyCtrl.updateRowCount(),e.onlyBody||this.refreshFloatingRowComps(s.get("enableRowPinning")?n:void 0),this.dispatchDisplayedRowsChanged(),t!=null&&this.restoreFocusedCell(t),this.releaseLockOnRefresh()}scrollToTopIfNewData(e){const t=e.newData||e.newPage,n=this.gos.get("suppressScrollOnNewData");t&&!n&&(this.gridBodyCtrl.scrollFeature.scrollToTop(),this.stickyRowFeature?.resetOffsets())}updateContainerHeights(e=0){const{rowContainerHeight:t}=this;if(this.printLayout){t.setModelHeight(null);return}let n=this.pageBounds.getCurrentPageHeight();n===0&&(n=1),t.setModelHeight(n+e)}getLockOnRefresh(){if(this.refreshInProgress)throw new Error(Po(252));this.refreshInProgress=!0,this.beans.frameworkOverrides.getLockOnRefresh?.()}releaseLockOnRefresh(){this.refreshInProgress=!1,this.beans.frameworkOverrides.releaseLockOnRefresh?.()}isRefreshInProgress(){return this.refreshInProgress}restoreFocusedCell(e){if(!e)return;const t=this.beans.focusSvc,n=this.findPositionToFocus(e);if(!n){t.focusHeaderPosition({headerPosition:{headerRowIndex:Oi(this.beans)-1,column:e.column}});return}if(e.rowIndex!==n.rowIndex||e.rowPinned!=n.rowPinned){t.setFocusedCell({...n,preventScrollOnBrowserFocus:!0,forceBrowserFocus:!0});return}t.doesRowOrCellHaveBrowserFocus()||this.updateCellFocus(We(this.gos,{...n,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0,type:"cellFocused"}))}findPositionToFocus(e){const{pagination:t,pageBounds:n}=this.beans;let i=e;for(i.rowPinned==null&&t&&n&&!t.isRowInPage(i.rowIndex)&&(i={rowPinned:null,rowIndex:n.getFirstRow()});i;){if(i.rowPinned==null&&n)if(i.rowIndex<n.getFirstRow()){if(i=Jd(this.beans,{rowPinned:null,rowIndex:0}),!i)return null}else i.rowIndex>n.getLastRow()&&(i={rowPinned:null,rowIndex:n.getLastRow()});const o=this.getRowByPosition(i);if(o?.isAlive())return{...o.getRowPosition(),column:e.column};i=Jd(this.beans,i)}return null}getAllCellCtrls(){const e=[],t=this.getAllRowCtrls(),n=t.length;for(let i=0;i<n;i++){const o=t[i].getAllCellCtrls(),r=o.length;for(let s=0;s<r;s++)e.push(o[s])}return e}getAllRowCtrls(){const{spannedRowRenderer:e}=this.beans,t=this.getStickyTopRowCtrls(),n=this.getStickyBottomRowCtrls();return[...this.topRowCtrls,...this.bottomRowCtrls,...t,...n,...e?.getCtrls("top")??[],...e?.getCtrls("bottom")??[],...e?.getCtrls("center")??[],...Object.values(this.rowCtrlsByRowIndex)]}addRenderedRowListener(e,t,n){const i=this.rowCtrlsByRowIndex[t];i&&i.addEventListener(e,n)}refreshCells({rowNodes:e,columns:t,force:n,suppressFlash:i}={}){const o={force:n,newData:!1,suppressFlash:i};for(const r of this.getCellCtrls(e,t))r.refreshOrDestroyCell(o);this.refreshFullWidth(e)}refreshRows(e={}){for(const t of this.getRowCtrls(e.rowNodes))t.refreshRow(e);this.refreshFullWidth(e.rowNodes)}getRowCtrlByNode(e){const t=e.rowIndex;if(t==null)return;const n=e.rowPinned;if(n==="top"){const o=this.topRowCtrls[t];return o?.rowNode===e?o:void 0}if(n==="bottom"){const o=this.bottomRowCtrls[t];return o?.rowNode===e?o:void 0}const i=this.rowCtrlsByRowIndex[t];return i?.rowNode===e?i:this.getStickyRowCtrlByNode(e)}getStickyRowCtrlByNode(e){const t=this.stickyRowFeature;if(t){for(const n of t.stickyTopRowCtrls)if(n.rowNode===e)return n;for(const n of t.stickyBottomRowCtrls)if(n.rowNode===e)return n}}refreshRowByNode(e){e&&this.getRowCtrlByNode(e)?.refreshRow()}refreshFullWidth(e){if(!e)return;let t=!1;for(const n of this.getRowCtrls(e)){if(!n.isFullWidth())continue;n.refreshFullWidth()||(t=!0,this.redrawRow(n.rowNode,!0))}t&&this.dispatchDisplayedRowsChanged(!1)}getRowCtrls(e){const t=Xm(e),n=this.getAllRowCtrls();return!e||!t?n:n.filter(i=>{const o=i.rowNode;return Jm(o,t)})}getCellCtrls(e,t){let n;we(t)&&(n={},t.forEach(o=>{const r=this.colModel.getCol(o);we(r)&&(n[r.getId()]=!0)}));const i=[];for(const o of this.getRowCtrls(e))for(const r of o.getAllCellCtrls()){const s=r.column.getId();n&&!n[s]||i.push(r)}return i}destroy(){this.removeAllRowComps(!0),super.destroy()}removeAllRowComps(e=!1){const t=Object.keys(this.rowCtrlsByRowIndex);this.removeRowCtrls(t,e),this.stickyRowFeature?.destroyStickyCtrls()}getRowsToRecycle(){const e=[];for(const n of Object.keys(this.rowCtrlsByRowIndex))this.rowCtrlsByRowIndex[n].rowNode.id==null&&e.push(n);this.removeRowCtrls(e);const t={};for(const n of Object.values(this.rowCtrlsByRowIndex)){const i=n.rowNode;t[i.id]=n}return this.rowCtrlsByRowIndex={},t}removeRowCtrls(e,t=!1){for(const n of e){const i=this.rowCtrlsByRowIndex[n];i&&(i.destroyFirstPass(t),i.destroySecondPass()),delete this.rowCtrlsByRowIndex[n]}}onBodyScroll(e){e.direction==="vertical"&&this.redraw({afterScroll:!0})}redraw(e={}){const{focusSvc:t,animationFrameSvc:n}=this.beans,{afterScroll:i}=e;let o;const r=this.stickyRowFeature;r&&(o=t?.getFocusCellToUseAfterRefresh()||void 0);const s=this.firstRenderedRow,a=this.lastRenderedRow;this.workOutFirstAndLastRowsToRender();let l=!1;if(r){l=r.checkStickyRows();const h=r.extraTopHeight+r.extraBottomHeight;h&&this.updateContainerHeights(h)}const u=this.firstRenderedRow!==s||this.lastRenderedRow!==a;if(!(i&&!l&&!u)&&(this.getLockOnRefresh(),this.recycleRows(null,!1,i),this.releaseLockOnRefresh(),this.dispatchDisplayedRowsChanged(i&&!l),o!=null)){const h=t?.getFocusCellToUseAfterRefresh();o!=null&&h==null&&(n?.flushAllFrames(),this.restoreFocusedCell(o))}}removeRowCompsNotToDraw(e,t){const n={};for(const r of e)n[r]=!0;const o=Object.keys(this.rowCtrlsByRowIndex).filter(r=>!n[r]);this.removeRowCtrls(o,t)}calculateIndexesToDraw(e){const t=[];for(let s=this.firstRenderedRow;s<=this.lastRenderedRow;s++)t.push(s);const n=this.beans.pagination,i=this.beans.focusSvc?.getFocusedCell()?.rowIndex;i!=null&&(i<this.firstRenderedRow||i>this.lastRenderedRow)&&(!n||n.isRowInPage(i))&&i<this.rowModel.getRowCount()&&t.push(i);const o=s=>{const a=s.rowNode.rowIndex;a==null||a===i||(a<this.firstRenderedRow||a>this.lastRenderedRow)&&this.doNotUnVirtualiseRow(s)&&t.push(a)};for(const s of Object.values(this.rowCtrlsByRowIndex))o(s);if(e)for(const s of Object.values(e))o(s);t.sort((s,a)=>s-a);const r=[];for(let s=0;s<t.length;s++){const a=t[s],l=this.rowModel.getRow(a);l&&!l.sticky&&r.push(a)}return r}recycleRows(e,t=!1,n=!1){const i=this.calculateIndexesToDraw(e);(this.printLayout||n)&&(t=!1),this.removeRowCompsNotToDraw(i,!t);for(const o of i)this.createOrUpdateRowCtrl(o,e,t,n);if(e){const{animationFrameSvc:o}=this.beans;o?.active&&n&&!this.printLayout?o.addDestroyTask(()=>{this.destroyRowCtrls(e,t),this.updateAllRowCtrls(),this.dispatchDisplayedRowsChanged()}):this.destroyRowCtrls(e,t)}this.updateAllRowCtrls()}dispatchDisplayedRowsChanged(e=!1){this.eventSvc.dispatchEvent({type:"displayedRowsChanged",afterScroll:e})}onDisplayedColumnsChanged(){const{visibleCols:e}=this.beans,t=e.isPinningLeft(),n=e.isPinningRight();(this.pinningLeft!==t||n!==this.pinningRight)&&(this.pinningLeft=t,this.pinningRight=n,this.embedFullWidthRows&&this.redrawFullWidthEmbeddedRows())}redrawFullWidthEmbeddedRows(){const e=[];for(const t of this.getFullWidthRowCtrls()){const n=t.rowNode.rowIndex;e.push(n.toString())}this.refreshFloatingRowComps(),this.removeRowCtrls(e),this.redraw({afterScroll:!0})}getFullWidthRowCtrls(e){const t=Xm(e);return this.getAllRowCtrls().filter(n=>{if(!n.isFullWidth())return!1;const i=n.rowNode;return!(t!=null&&!Jm(i,t))})}createOrUpdateRowCtrl(e,t,n,i){let o,r=this.rowCtrlsByRowIndex[e];if(r||(o=this.rowModel.getRow(e),we(o)&&we(t)&&t[o.id]&&o.alreadyRendered&&(r=t[o.id],t[o.id]=null)),!r)if(o||(o=this.rowModel.getRow(e)),we(o))r=this.createRowCon(o,n,i);else return;o&&(o.alreadyRendered=!0),this.rowCtrlsByRowIndex[e]=r}destroyRowCtrls(e,t){const n=[];if(e){for(const i of Object.values(e))if(i){if(this.cachedRowCtrls&&i.isCacheable()){this.cachedRowCtrls.addRow(i);continue}if(i.destroyFirstPass(!t),t){const o=i.instanceId;this.zombieRowCtrls[o]=i,n.push(()=>{i.destroySecondPass(),delete this.zombieRowCtrls[o]})}else i.destroySecondPass()}}t&&(n.push(()=>{this.isAlive()&&(this.updateAllRowCtrls(),this.dispatchDisplayedRowsChanged())}),window.setTimeout(()=>{for(const i of n)i()},j3))}getRowBuffer(){return this.gos.get("rowBuffer")}getRowBufferInPixels(){const e=this.getRowBuffer(),t=Ls(this.beans);return e*t}workOutFirstAndLastRowsToRender(){const{rowContainerHeight:e,pageBounds:t,rowModel:n}=this;e.updateOffset();let i,o;if(!n.isRowsToRender())i=0,o=-1;else if(this.printLayout)this.beans.environment.refreshRowHeightVariable(),i=t.getFirstRow(),o=t.getLastRow();else{const h=this.getRowBufferInPixels(),f=this.ctrlsSvc.getScrollFeature(),p=this.gos.get("suppressRowVirtualisation");let m=!1,v,w;do{const P=t.getPixelOffset(),{pageFirstPixel:F,pageLastPixel:I}=t.getCurrentPagePixelRange(),L=e.divStretchOffset,V=f.getVScrollPosition(),G=V.top,_=V.bottom;p?(v=F+L,w=I+L):(v=Math.max(G+P-h,F)+L,w=Math.min(_+P+h,I)+L),this.firstVisibleVPixel=Math.max(G+P,F)+L,this.lastVisibleVPixel=Math.min(_+P,I)+L,m=this.ensureAllRowsInRangeHaveHeightsCalculated(v,w)}while(m);let b=n.getRowIndexAtPixel(v),y=n.getRowIndexAtPixel(w);const R=t.getFirstRow(),S=t.getLastRow();b<R&&(b=R),y>S&&(y=S),i=b,o=y}const r=yn(this.gos,"normal"),s=this.gos.get("suppressMaxRenderedRowRestriction"),a=Math.max(this.getRowBuffer(),500);r&&!s&&o-i>a&&(o=i+a);const l=i!==this.firstRenderedRow,u=o!==this.lastRenderedRow;(l||u)&&(this.firstRenderedRow=i,this.lastRenderedRow=o,this.eventSvc.dispatchEvent({type:"viewportChanged",firstRow:i,lastRow:o}))}dispatchFirstDataRenderedEvent(){this.dataFirstRenderedFired||(this.dataFirstRenderedFired=!0,er(this.beans,()=>{this.beans.eventSvc.dispatchEvent({type:"firstDataRendered",firstRow:this.firstRenderedRow,lastRow:this.lastRenderedRow})}))}ensureAllRowsInRangeHaveHeightsCalculated(e,t){const n=this.pinnedRowModel?.ensureRowHeightsValid(),i=this.stickyRowFeature?.ensureRowHeightsValid(),{pageBounds:o,rowModel:r}=this,s=r.ensureRowHeightsValid(e,t,o.getFirstRow(),o.getLastRow());return(s||i)&&this.eventSvc.dispatchEvent({type:"recalculateRowBounds"}),i||s||n?(this.updateContainerHeights(),!0):!1}doNotUnVirtualiseRow(e){const i=e.rowNode,o=this.focusSvc.isRowFocused(i.rowIndex,i.rowPinned),r=this.editSvc?.isEditing(e),s=i.detail;return o||r||s?!!this.isRowPresent(i):!1}isRowPresent(e){return this.rowModel.isRowPresent(e)?this.beans.pagination?.isRowInPage(e.rowIndex)??!0:!1}createRowCon(e,t,n){const i=this.cachedRowCtrls?.getRow(e)??null;if(i)return i;const o=n&&!this.printLayout&&!!this.beans.animationFrameSvc?.active;return new bh(e,this.beans,t,o,this.printLayout)}getRenderedNodes(){const e=Object.values(this.rowCtrlsByRowIndex).map(i=>i.rowNode),t=this.getStickyTopRowCtrls().map(i=>i.rowNode),n=this.getStickyBottomRowCtrls().map(i=>i.rowNode);return[...t,...e,...n]}getRowByPosition(e){let t;const{rowIndex:n}=e;switch(e.rowPinned){case"top":t=this.topRowCtrls[n];break;case"bottom":t=this.bottomRowCtrls[n];break;default:t=this.rowCtrlsByRowIndex[n],t||(t=this.getStickyTopRowCtrls().find(i=>i.rowNode.rowIndex===n)||null,t||(t=this.getStickyBottomRowCtrls().find(i=>i.rowNode.rowIndex===n)||null));break}return t}isRangeInRenderedViewport(e,t){if(e==null||t==null)return!1;const i=e>this.lastRenderedRow;return!(t<this.firstRenderedRow)&&!i}},q3=class{constructor(e){this.entriesMap={},this.entriesList=[],this.maxCount=e}addRow(e){if(this.entriesMap[e.rowNode.id]=e,this.entriesList.push(e),e.setCached(!0),this.entriesList.length>this.maxCount){const t=this.entriesList[0];t.destroyFirstPass(),t.destroySecondPass(),this.removeFromCache(t)}}getRow(e){if(e?.id==null)return null;const t=this.entriesMap[e.id];return t?(this.removeFromCache(t),t.setCached(!1),t.rowNode!=e?null:t):null}has(e){return this.entriesMap[e.id]!=null}removeRow(e){const t=e.id,n=this.entriesMap[t];delete this.entriesMap[t],Ro(this.entriesList,n)}removeFromCache(e){const t=e.rowNode.id;delete this.entriesMap[t],Ro(this.entriesList,e)}getEntries(){return this.entriesList}};function Xm(e){if(!e)return;const t={top:{},bottom:{},normal:{}};for(const n of e){const i=n.id;switch(n.rowPinned){case"top":t.top[i]=n;break;case"bottom":t.bottom[i]=n;break;default:t.normal[i]=n;break}}return t}function Jm(e,t){const n=e.id;switch(e.rowPinned){case"top":return t.top[n]!=null;case"bottom":return t.bottom[n]!=null;default:return t.normal[n]!=null}}var Q3=class extends X{constructor(){super(...arguments),this.beanName="rowNodeSorter",this.accentedSort=!1,this.primaryColumnsSortGroups=!1,this.pivotActive=!1}postConstruct(){this.firstLeaf=Yt(this.gos)?uh:Y3,this.addManagedPropertyListeners(["accentedSort","autoGroupColumnDef","treeData"],this.updateOptions.bind(this));const e=this.updatePivotModeState.bind(this);this.addManagedEventListeners({columnPivotModeChanged:e,columnPivotChanged:e}),this.updateOptions(),e()}updateOptions(){this.accentedSort=!!this.gos.get("accentedSort"),this.primaryColumnsSortGroups=tr(this.gos)}updatePivotModeState(){this.pivotActive=this.beans.colModel.isPivotActive()}doFullSortInPlace(e,t){return e.sort((n,i)=>this.compareRowNodes(t,n,i))}compareRowNodes(e,t,n){if(t===n)return 0;const i=this.accentedSort;for(let o=0,r=e.length;o<r;++o){const s=e[o],a=s.sort==="desc";let l=this.getValue(t,s.column),u=this.getValue(n,s.column),h;const f=this.getComparator(s,t);if(f?h=f(l,u,t,n,a):(s.type==="absolute"&&(l=zF(l),u=zF(u)),h=eL(l,u,i)),h)return s.sort==="asc"?h:-h}return 0}getComparator(e,t){const n=e.column.getColDef(),i=this.getComparatorFromColDef(n,e);if(i)return i;if(!n.showRowGroup)return;const o=!t.group&&n.field;if(!o)return;const r=this.beans.colModel.getColDefCol(o);if(r)return this.getComparatorFromColDef(r.getColDef(),e)}getComparatorFromColDef(e,t){const n=e.comparator;if(n!=null)return typeof n=="object"?n[ir(t.type)]:n}getValue(e,t){const n=this.beans;if(this.primaryColumnsSortGroups){if(e.rowGroupColumn===t)return this.getGroupDataValue(e,t);if(e.group&&t.getColDef().showRowGroup)return}const i=n.valueSvc.getValue(t,e,"data");if(t.isAllowFormula()){const o=n.formula;if(o?.isFormula(i))return o.resolveValue(t,e)}return i}getGroupDataValue(e,t){if(d0(this.gos,this.pivotActive)){const i=this.firstLeaf(e);return i&&this.beans.valueSvc.getValue(t,i,"data")}const n=this.beans.showRowGroupCols?.getShowRowGroupCol(t.getId());return n?e.groupData?.[n.getId()]:void 0}},Y3=e=>{if(e.data)return e;let t=e.childrenAfterGroup;for(;t?.length;){const n=t[0];if(n.data)return n;t=n.childrenAfterGroup}},zF=e=>{if(!e)return e;if(typeof e=="bigint")return e<0n?-e:e;const t=Number(e);return isNaN(t)?e:Math.abs(t)};function Z3(e){e.sortSvc?.onSortChanged("api")}var Ys=(e,t)=>({tag:"span",ref:`eSort${e}`,cls:`ag-sort-indicator-icon ag-sort-${t} ag-hidden`,attrs:{"aria-hidden":"true"}}),X3={tag:"span",cls:"ag-sort-indicator-container",children:[Ys("Order","order"),Ys("Asc","ascending-icon"),Ys("Desc","descending-icon"),Ys("Mixed","mixed-icon"),Ys("AbsoluteAsc","absolute-ascending-icon"),Ys("AbsoluteDesc","absolute-descending-icon"),Ys("None","none-icon")]},ev=class extends yt{constructor(e){super(),this.eSortOrder=he,this.eSortAsc=he,this.eSortDesc=he,this.eSortMixed=he,this.eSortNone=he,this.eSortAbsoluteAsc=he,this.eSortAbsoluteDesc=he,e||this.setTemplate(X3)}attachCustomElements(e,t,n,i,o,r,s){this.eSortOrder=e,this.eSortAsc=t,this.eSortDesc=n,this.eSortMixed=i,this.eSortNone=o,this.eSortAbsoluteAsc=r,this.eSortAbsoluteDesc=s}setupSort(e,t=!1,n){if(this.column=e,this.suppressOrder=t,this.getSortDefOverride=n,this.setupMultiSortIndicator(),!e.isSortable()&&!e.getColDef().showRowGroup)return;this.addInIcon("sortAscending",this.eSortAsc,e),this.addInIcon("sortDescending",this.eSortDesc,e),this.addInIcon("sortUnSort",this.eSortNone,e),this.addInIcon("sortAbsoluteAscending",this.eSortAbsoluteAsc,e),this.addInIcon("sortAbsoluteDescending",this.eSortAbsoluteDesc,e);const i=this.updateIcons.bind(this),o=this.onSortChanged.bind(this);this.addManagedPropertyListener("unSortIcon",i),this.addManagedEventListeners({newColumnsLoaded:i,sortChanged:o,columnRowGroupChanged:o}),this.onSortChanged()}addInIcon(e,t,n){if(t==null)return;const i=ii(e,this.beans,n);i&&t.appendChild(i)}onSortChanged(){this.updateIcons(),this.suppressOrder||this.updateSortOrder()}updateIcons(){const{eSortAsc:e,eSortDesc:t,eSortAbsoluteAsc:n,eSortAbsoluteDesc:i,eSortNone:o,column:r,gos:s,beans:a}=this,l=IO(r,a,this.getSortDefOverride),u=l.isDefaultSortAllowed,h=l.isAbsoluteSortAllowed,{isAbsoluteSort:f,isDefaultSort:p,isAscending:m,isDescending:v,direction:w}=l;if(e&&bt(e,m&&p&&u,{skipAriaHidden:!0}),t&&bt(t,v&&p&&u,{skipAriaHidden:!0}),o){const b=!r.getColDef().unSortIcon&&!s.get("unSortIcon");bt(o,!b&&!w,{skipAriaHidden:!0})}n&&bt(n,m&&f&&h,{skipAriaHidden:!0}),i&&bt(i,v&&f&&h,{skipAriaHidden:!0})}setupMultiSortIndicator(){const{eSortMixed:e,column:t,gos:n}=this;this.addInIcon("sortUnSort",e,t);const i=t.getColDef().showRowGroup;tr(n)&&i&&(this.addManagedEventListeners({sortChanged:this.updateMultiSortIndicator.bind(this),columnRowGroupChanged:this.updateMultiSortIndicator.bind(this)}),this.updateMultiSortIndicator())}updateMultiSortIndicator(){const{eSortMixed:e,beans:t,column:n}=this;if(e){const i=t.sortSvc.getDisplaySortForColumn(n)?.direction==="mixed";bt(e,i,{skipAriaHidden:!0})}}updateSortOrder(){const{eSortOrder:e,column:t,beans:{sortSvc:n}}=this;if(!e)return;const i=n.getColumnsWithSortingOrdered(),o=n.getDisplaySortIndexForColumn(t)??-1,r=i.some(a=>n.getDisplaySortIndexForColumn(a)??!1),s=o>=0&&r;bt(e,s,{skipAriaHidden:!0}),o>=0?e.textContent=(o+1).toString():bn(e)}refresh(){this.onSortChanged()}},J3={selector:"AG-SORT-INDICATOR",component:ev},eW=class extends X{constructor(){super(...arguments),this.beanName="sortSvc"}progressSort(e,t,n){const i=this.getNextSortDirection(e);this.setSortForColumn(e,i,t,n)}progressSortFromEvent(e,t){const i=this.gos.get("multiSortKey")==="ctrl"?t.ctrlKey||t.metaKey:t.shiftKey;this.progressSort(e,i,"uiColumnSorted")}setSortForColumn(e,t,n,i){const{gos:o,showRowGroupCols:r}=this.beans,s=tr(o);let a=[e];if(s&&e.getColDef().showRowGroup){const f=r?.getSourceColumnsForGroupColumn?.(e)?.filter(p=>p.isSortable());f&&(a=[e,...f])}for(const h of a)this.setColSort(h,t,i);const l=(n||o.get("alwaysMultiSort"))&&!o.get("suppressMultiSort"),u=[];if(!l){const h=this.clearSortBarTheseColumns(a,i);u.push(...h)}this.updateSortIndex(e),u.push(...a),this.dispatchSortChangedEvents(i,u)}updateSortIndex(e){const{gos:t,colModel:n,showRowGroupCols:i}=this.beans,o=tr(t),r=i?.getShowRowGroupCol(e.getId()),s=o&&r||e,a=this.getColumnsWithSortingOrdered();n.forAllCols(h=>this.setColSortIndex(h,null));const l=a.filter(h=>o&&h.getColDef().showRowGroup?!1:h!==s);(s.getSortDef()?[...l,s]:l).forEach((h,f)=>this.setColSortIndex(h,f))}onSortChanged(e,t){this.dispatchSortChangedEvents(e,t)}isSortActive(){let e=!1;return this.beans.colModel.forAllCols(t=>{if(t.getSortDef())return e=!0,!0}),e}dispatchSortChangedEvents(e,t){const n={type:"sortChanged",source:e};t&&(n.columns=t),this.eventSvc.dispatchEvent(n)}clearSortBarTheseColumns(e,t){const n=[];return this.beans.colModel.forAllCols(i=>{e.includes(i)||(i.getSortDef()&&n.push(i),this.setColSort(i,void 0,t))}),n}getNextSortDirection(e,t){const n=e.getSortingOrder(),i=t===void 0?e.getSortDef():Li(t);let r=n.findIndex(s=>Vd(s,i))+1;return r>=n.length&&(r=0),Li(n[r])}getIndexedSortMap(){const{gos:e,colModel:t,showRowGroupCols:n,rowGroupColsSvc:i}=this.beans;let o=[];if(t.forAllCols(u=>{u.getSortDef()&&o.push(u)}),t.isPivotMode()){const u=tr(e);o=o.filter(h=>{const f=!!h.getAggFunc(),p=!h.isPrimary(),m=u?n?.getShowRowGroupCol(h.getId()):h.getColDef().showRowGroup;return f||p||m})}const r=i?.columns.filter(u=>!!u.getSortDef())??[],s={};o.forEach((u,h)=>s[u.getId()]=h),o.sort((u,h)=>{const f=u.getSortIndex(),p=h.getSortIndex();if(f!=null&&p!=null)return f-p;if(f==null&&p==null){const m=s[u.getId()],v=s[h.getId()];return m>v?1:-1}else return p==null?-1:1});const a=tr(e)&&!!r.length;a&&(o=[...new Set(o.map(u=>n?.getShowRowGroupCol(u.getId())??u))]);const l=new Map;if(o.forEach((u,h)=>l.set(u,h)),a)for(const u of r){const h=n.getShowRowGroupCol(u.getId());l.set(u,l.get(h))}return l}getColumnsWithSortingOrdered(){return[...this.getIndexedSortMap().entries()].sort(([,e],[,t])=>e-t).map(([e])=>e)}collectSortItems(e=!1){const t=[],n=this.getColumnsWithSortingOrdered();for(const i of n){const o=i.getSortDef()?.direction;if(!o)continue;const r=ir(i.getSortDef()?.type),s={sort:o,type:r};e?s.colId=i.getId():s.column=i,t.push(s)}return t}getSortModel(){return this.collectSortItems(!0)}getSortOptions(){return this.collectSortItems()}canColumnDisplayMixedSort(e){const t=tr(this.gos),n=!!e.getColDef().showRowGroup;return t&&n}getDisplaySortForColumn(e){const t=this.beans.showRowGroupCols?.getSourceColumnsForGroupColumn(e);if(!this.canColumnDisplayMixedSort(e)||!t?.length)return e.getSortDef();const i=e.getColDef().field!=null||!!e.getColDef().valueGetter?[e,...t]:t,o=i[0].getSortDef();return i.every(s=>Vd(s.getSortDef(),o))?o:{type:ir(e.getSortDef()?.type),direction:"mixed"}}getDisplaySortIndexForColumn(e){return this.getIndexedSortMap().get(e)}setupHeader(e,t){const n=()=>{const{type:i,direction:o}=Li(t.getSortDef());if(e.toggleCss("ag-header-cell-sorted-asc",o==="asc"),e.toggleCss("ag-header-cell-sorted-desc",o==="desc"),e.toggleCss("ag-header-cell-sorted-abs-asc",i==="absolute"&&o==="asc"),e.toggleCss("ag-header-cell-sorted-abs-desc",i==="absolute"&&o==="desc"),e.toggleCss("ag-header-cell-sorted-none",!o),t.getColDef().showRowGroup){const a=!this.beans.showRowGroupCols?.getSourceColumnsForGroupColumn(t)?.every(l=>o==l.getSortDef()?.direction);e.toggleCss("ag-header-cell-sorted-mixed",a)}};e.addManagedEventListeners({sortChanged:n,columnPinned:n,columnRowGroupChanged:n,displayedColumnsChanged:n})}initCol(e){const{sortIndex:t,initialSortIndex:n}=e.colDef,i=R0(e.colDef);i&&e.setSortDef(i,!0),t!==void 0?t!==null&&(e.sortIndex=t):n!==null&&(e.sortIndex=n)}updateColSort(e,t,n){t!==void 0&&this.setColSort(e,Li(t),n)}setColSort(e,t,n){Vd(e.getSortDef(),t)||(e.setSortDef(Li(t),t===void 0),e.dispatchColEvent("sortChanged",n)),e.dispatchStateUpdatedEvent("sort")}setColSortIndex(e,t){e.sortIndex=t,e.dispatchStateUpdatedEvent("sortIndex")}createSortIndicator(e){return new ev(e)}getSortIndicatorSelector(){return J3}},UF={moduleName:"Sort",version:ve,beans:[eW,Q3],apiFunctions:{onSortChanged:Z3},userComponents:{agSortIndicator:ev},icons:{sortAscending:"asc",sortDescending:"desc",sortUnSort:"none",sortAbsoluteAscending:"aasc",sortAbsoluteDescending:"adesc"}},tW=class extends X{constructor(){super(...arguments),this.beanName="syncSvc",this.waitingForColumns=!1}postConstruct(){this.addManagedPropertyListener("columnDefs",e=>this.setColumnDefs(e))}start(){this.beans.ctrlsSvc.whenReady(this,()=>{const e=this.gos.get("columnDefs");e?this.setColumnsAndData(e):this.waitingForColumns=!0,this.gridReady()})}setColumnsAndData(e){const{colModel:t,rowModel:n}=this.beans;t.setColumnDefs(e??[],"gridInitializing"),n.start()}gridReady(){const{eventSvc:e,gos:t}=this;e.dispatchEvent({type:"gridReady"}),Br(t,`initialised successfully, enterprise = ${t.isModuleRegistered("EnterpriseCore")}`)}setColumnDefs(e){const t=this.gos.get("columnDefs");if(t){if(this.waitingForColumns){this.waitingForColumns=!1,this.setColumnsAndData(t);return}this.beans.colModel.setColumnDefs(t,qa(e.source))}}};function nW(e){e.valueCache?.expire()}function iW(e,t){const{colKey:n,rowNode:i,useFormatter:o,from:r="edit"}=t,s=e.colModel.getColDefCol(n)??e.colModel.getCol(n);if(!s)return null;const a=e.valueSvc.getValueForDisplay({column:s,node:i,includeValueFormatted:o,from:r});return o?a.valueFormatted??_a(a.value):a.value}var oW="paste",rW=class extends X{constructor(){super(...arguments),this.beanName="changeDetectionSvc",this.deferredDepth=0,this.batchedPath=null,this.batchedNodes=null}destroy(){super.destroy(),this.batchedPath=null,this.batchedNodes=null}postConstruct(){this.csrm=Eo(this.beans),this.addManagedEventListeners({cellValueChanged:this.onCellValueChanged.bind(this)})}beginDeferred(){this.deferredDepth++}endDeferred(){if(this.deferredDepth===0||--this.deferredDepth>0)return;const e=this.batchedPath,t=this.batchedNodes;this.batchedPath=null,this.batchedNodes=null,e&&this.csrm?.doAggregate(e);const{rowRenderer:n}=this.beans;if(t)for(const i of t)$F(n,i);if(e){const i=e.getSortedRows();for(let o=0,r=i.length;o<r;++o)$F(n,i[o])}(this.batchedPath||this.batchedNodes)&&(this.deferredDepth=1,this.endDeferred())}onCellValueChanged(e){const{gos:t,rowModel:n,changedPathFactory:i}=this.beans;if(e.source===oW||t.get("suppressChangeDetection")||!n.rootNode)return;const o=e.node.primaryRow;if(this.csrm){let r=this.batchedPath;r||(r=i?.newPath(t.get("aggregateOnlyChangedColumns"))??null,this.batchedPath=r);let s=o;o.group||((this.batchedNodes??(this.batchedNodes=new Set)).add(o),s=o.parent),r?.addCell(s,e.column.getColId())}else(this.batchedNodes??(this.batchedNodes=new Set)).add(o);this.deferredDepth===0&&(this.deferredDepth=1,this.endDeferred())}},$F=(e,t)=>{const{sibling:n,pinnedSibling:i}=t;e.refreshRowByNode(t),e.refreshRowByNode(n),e.refreshRowByNode(i),e.refreshRowByNode(n?.pinnedSibling),e.refreshRowByNode(i?.sibling)},sW=class extends X{constructor(){super(...arguments),this.beanName="expressionSvc",this.cache={}}evaluate(e,t){if(typeof e=="string")return this.evaluateExpression(e,t);gt(15,{expression:e})}evaluateExpression(e,t){try{return this.createExpressionFunction(e)(t.value,t.context,t.oldValue,t.newValue,t.value,t.node,t.data,t.colDef,t.rowIndex,t.api,t.getValue,t.column,t.columnGroup)}catch(n){return gt(16,{expression:e,params:t,e:n}),null}}createExpressionFunction(e){const t=this.cache;if(t[e])return t[e];const n=this.createFunctionBody(e),i=new Function("x, ctx, oldValue, newValue, value, node, data, colDef, rowIndex, api, getValue, column, columnGroup",n);return t[e]=i,i}createFunctionBody(e){return e.includes("return")?e:"return "+e+";"}},aW=class extends X{constructor(){super(...arguments),this.beanName="valueCache",this.cacheVersion=0}postConstruct(){const e=this.gos;this.active=e.get("valueCache"),this.neverExpires=e.get("valueCacheNeverExpires")}onDataChanged(){this.neverExpires||this.expire()}expire(){this.cacheVersion++}setValue(e,t,n){if(this.active){const i=this.cacheVersion;e.__cacheVersion!==i&&(e.__cacheVersion=i,e.__cacheData={}),e.__cacheData[t]=n}}getValue(e,t){if(!(!this.active||e.__cacheVersion!==this.cacheVersion))return e.__cacheData[t]}},lW={moduleName:"ValueCache",version:ve,beans:[aW],apiFunctions:{expireValueCache:nW}},cW={moduleName:"Expression",version:ve,beans:[sW]},uW={moduleName:"ChangeDetection",version:ve,beans:[rW]},dW={moduleName:"CellApi",version:ve,apiFunctions:{getCellValue:iW}},hW=class extends X{constructor(){super(...arguments),this.beanName="valueSvc",this.initialised=!1,this.isSsrm=!1}wireBeans(e){this.expressionSvc=e.expressionSvc,this.colModel=e.colModel,this.valueCache=e.valueCache,this.dataTypeSvc=e.dataTypeSvc,this.editSvc=e.editSvc,this.formulaDataSvc=e.formulaDataSvc,this.rowGroupColsSvc=e.rowGroupColsSvc}postConstruct(){this.initialised||this.init()}init(){const{gos:e,valueCache:t}=this;this.executeValueGetter=t?this.executeValueGetterWithValueCache.bind(this):this.executeValueGetterWithoutValueCache.bind(this),this.isSsrm=wc(e),this.cellExpressions=e.get("enableCellExpressions"),this.isTreeData=e.get("treeData"),this.initialised=!0;const n=i=>this.callColumnCellValueChangedHandler(i);this.eventSvc.addListener("cellValueChanged",n,!0),this.addDestroyFunc(()=>this.eventSvc.removeListener("cellValueChanged",n,!0)),this.addManagedPropertyListener("treeData",i=>this.isTreeData=i.currentValue)}getValueForDisplay(e){const t=this.beans,n=e.column,i=e.node,o=t.showRowGroupColValueSvc,r=!n&&i.group,s=n?.colDef.showRowGroup,a=!this.isTreeData||i.footer;if(o&&a&&(r||s)){const p=o.getGroupValue(i,n,this.displayIgnoresAggData(i));return p==null?{value:null,valueFormatted:null}:{value:p.value,valueFormatted:e.includeValueFormatted?o.formatAndPrefixGroupColValue(p,n,e.exporting):null}}if(!n)return{value:i.key,valueFormatted:null};let l=this.getValue(n,i,e.from,this.displayIgnoresAggData(i)),u=l;const h=t.formula;n.isAllowFormula()&&h?.isFormula(l)&&(e.useRawFormula?(l=h.normaliseFormula(l,!0),u=h.resolveValue(n,i)):(l=h.resolveValue(n,i),u=l));const f=e.includeValueFormatted&&!(e.exporting&&n.colDef.useValueFormatterForExport===!1);return{value:l,valueFormatted:f?this.formatValue(n,i,u):null}}getValue(e,t,n,i=!1){if(this.initialised||this.init(),!t)return;const o=e.colDef,r=t.group;if(!r){const l=o.pivotValueColumn;l&&(e=l)}const s=this.editSvc?.getPendingEditValue(t,e,n);if(s!==void 0)return s;let a=this.resolveValue(e,t,i,r);if(a===void 0){if(r){const l=o.showRowGroup;if(typeof l=="string"){const u=this.rowGroupColsSvc?.getColumnIndex(l);if(u!=null&&u>t.level)return null}}return}if(this.cellExpressions&&PS(a)){const l=a.substring(1);a=this.executeValueGetter(l,t.data,e,t)}return a}displayIgnoresAggData(e){return!e.group||e.footer||e.level===-1||!e.sibling||this.gos.get("groupSuppressBlankHeader")||e.leafGroup&&this.colModel.isPivotMode()?!1:!!e.expanded}resolveValue(e,t,n,i){const o=e.colDef,r=e.colId,s=!i&&this.formulaDataSvc;if(s&&s.hasDataSource()&&o.allowFormula===!0){const R=s.getFormula({column:e,rowNode:t});if(PS(R))return R}const a=i&&!n?t.aggData:void 0,l=this.isTreeData;if(l&&a?.[r]!==void 0)return a[r];const u=t.data,h=o.field,f=o.valueGetter;if(l){if(f)return this.executeValueGetter(f,u,e,t);if(h&&u)return Mc(u,h,e.isFieldContainsDots())}const p=t.groupData;if(p&&r in p)return p[r];if(a?.[r]!==void 0)return a[r];const m=o.showRowGroup,v=typeof m!="string"||!i,w=this.isSsrm,b=w&&n&&!!o.aggFunc;if(f&&!b)return v?this.executeValueGetter(f,u,e,t):void 0;if(w&&t.footer&&t.field&&(m===!0||m===t.field))return Mc(u,t.field,e.isFieldContainsDots());if(h&&u&&!b)return v?Mc(u,h,e.isFieldContainsDots()):void 0}parseValue(e,t,n,i){const o=e.getColDef();if(o.allowFormula&&this.beans.formula?.isFormula(n))return n;const r=o.valueParser;if(we(r)){const s=We(this.gos,{node:t,data:t?.data,oldValue:i,newValue:n,colDef:o,column:e});return typeof r=="function"?r(s):this.expressionSvc?.evaluate(r,s)}return n}getDeleteValue(e,t){return we(e.getColDef().valueParser)?this.parseValue(e,t,"",this.getValueForDisplay({column:e,node:t,from:"edit"}).value)??null:null}formatValue(e,t,n,i,o=!0){const{expressionSvc:r}=this.beans;let s=null,a;const l=e.getColDef();if(i?a=i:o&&(a=l.valueFormatter),a){const u=t?t.data:null,h=We(this.gos,{value:n,node:t,data:u,colDef:l,column:e});typeof a=="function"?s=a(h):s=r?r.evaluate(a,h):null}else if(l.refData)return l.refData[n]||"";return s==null&&Array.isArray(n)&&(s=n.join(", ")),s}setValue(e,t,n,i){const o=t.getColDef();if(!e.data&&this.canCreateRowNodeData(e,o)&&(e.data={}),!this.isSetValueSupported(t,e,n,o))return!1;const r=this.getValue(t,e,"data"),s=We(this.gos,{node:e,data:e.data,oldValue:r,newValue:n,colDef:o,column:t});let a=!1;if(e.data){const u=this.handleExternalFormulaChange({column:t,eventSource:i,newValue:n,setterParams:s,rowNode:e});if(u!==null)return u;a=this.computeValueChange({column:t,rowNode:e,newValue:n,params:s,rowData:e.data,valueSetter:o.valueSetter,field:o.field})??!0}const l=this.beans.changeDetectionSvc;l?.beginDeferred();try{if(e.group){const u=this.beans.rowGroupingEditValueSvc?.setGroupDataValue(e,t,n,r,i,a||n!==r);if(u!==void 0)return!a&&!u?!1:this.finishValueChange(e,t,s,i,n)}return a?this.finishValueChange(e,t,s,i):!1}finally{l?.endDeferred()}}canCreateRowNodeData(e,t){return e.group?!(t.groupRowValueSetter!=null||t.groupRowEditable!=null||t.pivotValueColumn):!0}finishValueChange(e,t,n,i,o){e.resetQuickFilterAggregateText(),this.valueCache?.onDataChanged();const r=o===void 0?this.getValue(t,e,"data"):o;return this.dispatchCellValueChangedEvent(e,n,r,i),e.pinnedSibling&&this.dispatchCellValueChangedEvent(e.pinnedSibling,n,r,i),!0}isSetValueSupported(e,t,n,i){const{field:o,valueSetter:r}=i,s=this.beans.formula,a=e.isAllowFormula()&&s?.isFormula(n),l=!!this.formulaDataSvc?.hasDataSource();return Nt(o)&&Nt(r)&&!(l&&a)?t.group&&(i.groupRowValueSetter||i.groupRowEditable)?!0:(se(17),!1):this.dataTypeSvc&&!this.dataTypeSvc.checkType(e,n)?(se(135),!1):!0}handleExternalFormulaChange(e){const{column:t,rowNode:n,newValue:i,eventSource:o,setterParams:r}=e,s=this.beans.formula,a=this.formulaDataSvc;if(!a?.hasDataSource()||!t.isAllowFormula())return null;const l=s?.isFormula(i),u=a.getFormula({column:t,rowNode:n});if(l){if(!(u!==i))return!1;a.setFormula({column:t,rowNode:n,formula:i});const f=s?.resolveValue(t,n),p=t.getColDef();if(we(p.valueSetter)||!Nt(p.field)){const m={...r,newValue:f};this.computeValueChange({column:t,rowNode:n,newValue:f,params:m,rowData:n.data,valueSetter:p.valueSetter,field:p.field})}return this.finishValueChange(n,t,r,o)}return u!==void 0&&a.setFormula({column:t,rowNode:n,formula:void 0}),null}computeValueChange(e){const{valueSetter:t,params:n,rowData:i,field:o,column:r,newValue:s}=e;return we(t)?typeof t=="function"?t(n):this.expressionSvc?.evaluate(t,n):!!i&&this.setValueUsingField(i,o,s,r.isFieldContainsDots())}dispatchCellValueChangedEvent(e,t,n,i){this.eventSvc.dispatchEvent({type:"cellValueChanged",event:null,rowIndex:e.rowIndex,rowPinned:e.rowPinned,column:t.column,colDef:t.colDef,data:e.data,node:e,oldValue:t.oldValue,newValue:n,newRawValue:t.newValue,value:n,source:i})}callColumnCellValueChangedHandler(e){const t=e.colDef.onCellValueChanged;typeof t=="function"&&this.beans.frameworkOverrides.wrapOutgoing(()=>{t(e)})}setValueUsingField(e,t,n,i){if(!t)return!1;let o=!1;if(!i)o=e[t]===n,o||(e[t]=n);else{const r=t.split(".");let s=e;for(;r.length>0&&s;){const a=r.shift();r.length===0?(o=s[a]===n,o||(s[a]=n)):s=s[a]}}return!o}executeValueGetterWithValueCache(e,t,n,i){const o=n.getColId(),r=this.valueCache.getValue(i,o);if(r!==void 0)return r;const s=this.executeValueGetterWithoutValueCache(e,t,n,i);return this.valueCache.setValue(i,o,s),s}executeValueGetterWithoutValueCache(e,t,n,i){const o=We(this.gos,{data:t,node:i,column:n,colDef:n.getColDef(),getValue:s=>this.getValueCallback(i,s)});let r;return typeof e=="function"?r=e(o):r=this.expressionSvc?.evaluate(e,o),r}getValueCallback(e,t){const n=this.colModel.getColDefCol(t);return n?this.getValue(n,e,"data"):null}getKeyForNode(e,t){const n=this.getValue(e,t,"data"),i=e.getColDef().keyCreator;let o=n;if(i){const r=We(this.gos,{value:n,colDef:e.getColDef(),column:e,node:t,data:t.data});o=i(r)}return typeof o=="string"||o==null||(o=String(o),o==="[object Object]"&&se(121)),o}},fW={moduleName:"CommunityCore",version:ve,beans:[YV,HN,FH,i_,$3,mG,UV,p5,RG,g3,p3,K3,hW,qV,WV,QV,PH,tW,vH,CH,P5],icons:{selectOpen:"small-down",smallDown:"small-down",colorPicker:"color-picker",smallUp:"small-up",checkboxChecked:"small-up",checkboxIndeterminate:"checkbox-indeterminate",checkboxUnchecked:"checkbox-unchecked",radioButtonOn:"radio-button-on",radioButtonOff:"radio-button-off",smallLeft:"small-left",smallRight:"small-right"},apiFunctions:{getGridId:VN,destroy:WN,isDestroyed:zN,getGridOption:UN,setGridOption:$N,updateGridOptions:IR,isModuleRegistered:jN},dependsOn:[gH,jB,tG,UF,S5,CG,R5,U3,uW,x5,f3,w3,S3,T5,yH,mH,cW,kG,x3]};function tv(e){const{inputValue:t,allSuggestions:n,hideIrrelevant:i,filterByPercentageOfBestMatch:o}=e;let r=(n??[]).map((l,u)=>({value:l,relevance:pW(t,l),idx:u}));if(r.sort((l,u)=>l.relevance-u.relevance),i&&(r=r.filter(l=>l.relevance<Math.max(l.value.length,t.length))),r.length>0&&o&&o>0){const u=r[0].relevance*o;r=r.filter(h=>u-h.relevance<0)}const s=[],a=[];for(const l of r)s.push(l.value),a.push(l.idx);return{values:s,indices:a}}function pW(e,t){const n=e.length,i=t.length;if(i===0)return n||0;let o=e.toLocaleLowerCase(),r=t.toLocaleLowerCase(),s;e.length<t.length&&(s=r,r=o,o=s,s=t,t=e,e=s);let a=new Uint16Array(i+1),l=new Uint16Array(i+1);for(let f=0;f<=i;f++)a[f]=f;let u=0;const h=n/2-10;for(let f=1;f<=n;f++){const p=e[f-1],m=o[f-1];l[0]=f;for(let v=1;v<=i;v++){const w=t[v-1],b=r[v-1];if(m!==b){const y=l[v-1],R=a[v],S=a[v-1];let P=y<R?y:R;S<P&&(P=S),l[v]=P+1|0;continue}if(u++,p===w&&u++,f>1&&v>1){const y=e[f-2],R=o[f-2],S=t[v-2],P=r[v-2];R===P&&(u++,y===S&&u++)}f<h&&u++,l[v]=a[v-1]}s=a,a=l,l=s}return a[i]/(u+1)}var jF={AdvancedFilter:1,AiToolkit:1,AllEnterprise:1,BatchEdit:1,CellSelection:1,Clipboard:1,ColumnMenu:1,ColumnsToolPanel:1,ContextMenu:1,ExcelExport:1,FiltersToolPanel:1,Find:1,GridCharts:1,IntegratedCharts:1,GroupFilter:1,MasterDetail:1,Menu:1,MultiFilter:1,NewFiltersToolPanel:1,Pivot:1,RangeSelection:1,RichSelect:1,RowNumbers:1,RowGrouping:1,RowGroupingEdit:1,RowGroupingPanel:1,ServerSideRowModelApi:1,ServerSideRowModel:1,SetFilter:1,SideBar:1,Sparklines:1,StatusBar:1,TreeData:1,ViewportRowModel:1,Formula:1},nv=["TextFilter","NumberFilter","BigIntFilter","DateFilter","SetFilter","MultiFilter","GroupFilter","CustomFilter"],gW={EditCore:["TextEditor","NumberEditor","DateEditor","CheckboxEditor","LargeTextEditor","SelectEditor","RichSelect","CustomEditor"],CheckboxCellRenderer:["AllCommunity"],ClientSideRowModelHierarchy:["RowGrouping","Pivot","TreeData"],ColumnFilter:nv,ColumnGroupHeaderComp:["AllCommunity"],ColumnGroup:["AllCommunity"],ColumnHeaderComp:["AllCommunity"],ColumnMove:["AllCommunity"],ColumnResize:["AllCommunity"],CommunityCore:["AllCommunity"],CsrmSsrmSharedApi:["ClientSideRowModelApi","ServerSideRowModelApi"],RowModelSharedApi:["ClientSideRowModelApi","ServerSideRowModelApi"],EnterpriseCore:["AllEnterprise"],FilterCore:[...nv,"QuickFilter","ExternalFilter","AdvancedFilter"],GroupCellRenderer:["RowGrouping","Pivot","TreeData","MasterDetail","ServerSideRowModel"],KeyboardNavigation:["AllCommunity"],LoadingCellRenderer:["ServerSideRowModel"],MenuCore:["ColumnMenu","ContextMenu"],MenuItem:["ColumnMenu","ContextMenu","MultiFilter","IntegratedCharts","ColumnsToolPanel"],Overlay:["AllCommunity"],PinnedColumn:["AllCommunity"],SharedAggregation:["RowGrouping","Pivot","TreeData","ServerSideRowModel"],SharedDragAndDrop:["AllCommunity"],SharedMasterDetail:["MasterDetail","ServerSideRowModel"],SharedMenu:[...nv,"ColumnMenu","ContextMenu"],SharedPivot:["Pivot","ServerSideRowModel"],SharedRowGrouping:["RowGrouping","ServerSideRowModel"],SharedRowSelection:["RowSelection","ServerSideRowModel"],SkeletonCellRenderer:["ServerSideRowModel"],Sort:["AllCommunity"],SsrmInfiniteSharedApi:["InfiniteRowModel","ServerSideRowModelApi"],SharedTreeData:["TreeData","ServerSideRowModel"]},mW={InfiniteRowModel:"infinite",ClientSideRowModelApi:"clientSide",ClientSideRowModel:"clientSide",ServerSideRowModelApi:"serverSide",ServerSideRowModel:"serverSide",ViewportRowModel:"viewport"};function vW(e,t){const n=[];for(const i of Array.isArray(e)?e:[e]){const o=gW[i];if(o)for(const r of o){const s=mW[r];(!s||s===t)&&n.push(r)}else n.push(i)}return n}var KF=()=>`No AG Grid modules are registered! It is recommended to start with all Community features via the AllCommunityModule:
|
|
24
24
|
|
|
25
25
|
import { ModuleRegistry, AllCommunityModule } from 'ag-grid-community';
|
|
26
26
|
|
|
27
27
|
ModuleRegistry.registerModules([ AllCommunityModule ]);
|
|
28
|
-
`,
|
|
28
|
+
`,CW=e=>{const t=e.map(i=>`import { ${Nc(i)} } from '${jF[i]?"ag-grid-enterprise":"ag-grid-community"}';`);return e.some(i=>i==="IntegratedCharts"||i==="Sparklines")&&t.push("import { AgChartsEnterpriseModule } from 'ag-charts-enterprise';"),`import { ModuleRegistry } from 'ag-grid-community';
|
|
29
29
|
${t.join(`
|
|
30
30
|
`)}
|
|
31
31
|
|
|
32
32
|
ModuleRegistry.registerModules([ ${e.map(i=>Nc(i,!0)).join(", ")} ]);
|
|
33
33
|
|
|
34
|
-
For more info see: ${Wa}/modules/`};function Nc(e,t=!1){return t&&(e==="IntegratedCharts"||e==="Sparklines")?`${e}Module.with(AgChartsEnterpriseModule)`:`${e}Module`}function
|
|
34
|
+
For more info see: ${Wa}/modules/`};function Nc(e,t=!1){return t&&(e==="IntegratedCharts"||e==="Sparklines")?`${e}Module.with(AgChartsEnterpriseModule)`:`${e}Module`}function wW(e,t){const n=t.filter(r=>r==="IntegratedCharts"||r==="Sparklines");let i="";return!globalThis?.agCharts&&n.length>0?i=`Unable to use ${e} as either the ag-charts-community or ag-charts-enterprise script needs to be included alongside ag-grid-enterprise.
|
|
35
35
|
`:t.some(r=>jF[r])&&(i=i+`Unable to use ${e} as that requires the ag-grid-enterprise script to be included.
|
|
36
|
-
`),i}function qF({moduleName:e,rowModelType:t}){return`To use the ${e}Module you must set the gridOption "rowModelType='${t}'"`}var QF=({reasonOrId:e,moduleName:t,gridScoped:n,gridId:i,rowModelType:o,additionalText:r,isUmd:s})=>{const a=
|
|
36
|
+
`),i}function qF({moduleName:e,rowModelType:t}){return`To use the ${e}Module you must set the gridOption "rowModelType='${t}'"`}var QF=({reasonOrId:e,moduleName:t,gridScoped:n,gridId:i,rowModelType:o,additionalText:r,isUmd:s})=>{const a=vW(t,o),l=typeof e=="string"?e:RW[e];if(s)return wW(l,a);const u=a.filter(p=>p==="IntegratedCharts"||p==="Sparklines"),h=u.length>0?`${u.map(p=>Nc(p)).join()} must be initialised with an AG Charts module. One of 'AgChartsCommunityModule' / 'AgChartsEnterpriseModule'.`:"";return`${`Unable to use ${l} as ${a.length>1?"one of "+a.map(p=>Nc(p)).join(", "):Nc(a[0])} is not registered${n?" for gridId: "+i:""}. ${h} Check if you have registered the module:
|
|
37
37
|
`}
|
|
38
|
-
${
|
|
38
|
+
${CW(a)}`+(r?`
|
|
39
39
|
|
|
40
40
|
${r}`:"")},YF=e=>`${e} must be initialised with an AG Charts module. One of 'AgChartsCommunityModule' / 'AgChartsEnterpriseModule'.
|
|
41
41
|
|
|
@@ -44,11 +44,11 @@ import { ModuleRegistry } from 'ag-grid-community';
|
|
|
44
44
|
import { ${e} } from 'ag-grid-enterprise';
|
|
45
45
|
|
|
46
46
|
ModuleRegistry.registerModules([${e}.with(AgChartsEnterpriseModule)]);
|
|
47
|
-
`,
|
|
47
|
+
`,bW=e=>`AG Grid: Unable to use the Clipboard API (navigator.clipboard.${e}()). The reason why it could not be used has been logged in the previous line. For this reason the grid has defaulted to using a workaround which doesn't perform as well. Either fix why Clipboard API is blocked, OR stop this message from appearing by setting grid property suppressClipboardApi=true (which will default the grid to using the workaround rather than the API.`,yW={1:()=>"`rowData` must be an array",2:({nodeId:e})=>`Duplicate node id '${e}' detected from getRowId callback, this could cause issues in your grid.`,3:()=>"Calling gridApi.resetRowHeights() makes no sense when using Auto Row Height.",4:({id:e})=>`Could not find row id=${e}, data item was not found for this id`,5:({data:e})=>["Could not find data item as object was not found.",e," Consider using getRowId to help the Grid find matching row data"],6:()=>"'groupHideOpenParents' only works when specifying specific columns for 'colDef.showRowGroup'",7:()=>"Pivoting is not supported with aligned grids as it may produce different columns in each grid.",8:({key:e})=>`Unknown key for navigation ${e}`,9:({variable:e})=>`No value for ${e?.cssName}. This usually means that the grid has been initialised before styles have been loaded. The default value of ${e?.defaultValue} will be used and updated when styles load.`,10:({eventType:e})=>`As of v33, the '${e}' event is deprecated. Use the global 'modelUpdated' event to determine when row children have changed.`,11:()=>"No gridOptions provided to createGrid",12:({colKey:e})=>["column ",e," not found"],13:()=>"Could not find rowIndex, this means tasks are being executed on a rowNode that has been removed from the grid.",14:({groupPrefix:e})=>`Row IDs cannot start with ${e}, this is a reserved prefix for AG Grid's row grouping feature.`,15:({expression:e})=>["value should be either a string or a function",e],16:({expression:e,params:t,e:n})=>["Processing of the expression failed","Expression = ",e,"Params = ",t,"Exception = ",n],17:()=>"you need either field or valueSetter set on colDef for editing to work",18:()=>"alignedGrids contains an undefined option.",19:()=>"alignedGrids - No api found on the linked grid.",20:()=>`You may want to configure via a callback to avoid setup race conditions:
|
|
48
48
|
"alignedGrids: () => [linkedGrid]"`,21:()=>"pivoting is not supported with aligned grids. You can only use one of these features at a time in a grid.",22:({key:e})=>`${e} is an initial property and cannot be updated.`,23:()=>"The return of `getRowHeight` cannot be zero. If the intention is to hide rows, use a filter instead.",24:()=>"row height must be a number if not using standard row model",25:({id:e})=>["The getRowId callback must return a string. The ID ",e," is being cast to a string."],26:({fnName:e,preDestroyLink:t})=>`Grid API function ${e}() cannot be called as the grid has been destroyed.
|
|
49
49
|
Either clear local references to the grid api, when it is destroyed, or check gridApi.isDestroyed() to avoid calling methods against a destroyed grid.
|
|
50
50
|
To run logic when the grid is about to be destroyed use the gridPreDestroy event. See: ${t}`,27:({fnName:e,module:t})=>`API function '${e}' not registered to module '${t}'`,28:()=>"setRowCount cannot be used while using row grouping.",29:()=>"tried to call sizeColumnsToFit() but the grid is coming back with zero width, maybe the grid is not visible yet on the screen?",30:({toIndex:e})=>["tried to insert columns in invalid location, toIndex = ",e,"remember that you should not count the moving columns when calculating the new index"],31:()=>"infinite loop in resizeColumnSets",32:()=>"applyColumnState() - the state attribute should be an array, however an array was not found. Please provide an array of items (one for each col you want to change) for state.",33:()=>"stateItem.aggFunc must be a string. if using your own aggregation functions, register the functions first before using them in get/set state. This is because it is intended for the column state to be stored and retrieved as simple JSON.",34:({key:e})=>`the column type '${e}' is a default column type and cannot be overridden.`,35:()=>"Column type definitions 'columnTypes' with a 'type' attribute are not supported because a column type cannot refer to another column type. Only column definitions 'columnDefs' can use the 'type' attribute to refer to a column type.",36:({t:e})=>"colDef.type '"+e+"' does not correspond to defined gridOptions.columnTypes",37:()=>"Changing the column pinning status is not allowed with domLayout='print'",38:({iconName:e})=>`provided icon '${e}' needs to be a string or a function`,39:()=>"Applying column order broke a group where columns should be married together. Applying new order has been discarded.",40:({e,method:t})=>`${e}
|
|
51
|
-
${
|
|
51
|
+
${bW(t)}`,41:()=>"Browser did not allow document.execCommand('copy'). Ensure 'api.copySelectedRowsToClipboard() is invoked via a user event, i.e. button click, otherwise the browser will prevent it for security reasons.",42:()=>"Browser does not support document.execCommand('copy') for clipboard operations",43:({iconName:e})=>`As of v33, icon '${e}' is deprecated. Use the icon CSS name instead.`,44:()=>'Data type definition hierarchies (via the "extendsDataType" property) cannot contain circular references.',45:({parentCellDataType:e})=>`The data type definition ${e} does not exist.`,46:()=>'The "baseDataType" property of a data type definition must match that of its parent.',47:({cellDataType:e})=>`Missing data type definition - "${e}"`,48:({property:e,inferred:t,colId:n})=>{const i=t?" (inferred)":"",o=n?` for column "${n}"`:"";return`Cell data type is "object"${i} but no Value ${e} has been provided${o}. Please either provide an object data type definition with a Value ${e}, or set:
|
|
52
52
|
- "colDef.value${e}"${t&&e==="Parser"?`
|
|
53
53
|
- "colDef.cellDataType = 'object'"`:""}`},49:({methodName:e})=>`Framework component is missing the method ${e}()`,50:({compName:e})=>`Could not find component ${e}, did you forget to configure this component?`,51:()=>"Export cancelled. Export is not allowed as per your configuration.",52:()=>"There is no `window` associated with the current `document`",53:()=>"unknown value type during csv conversion",54:()=>"Could not find document body, it is needed for drag and drop and context menu.",55:()=>"addRowDropZone - A container target needs to be provided",56:()=>"addRowDropZone - target already exists in the list of DropZones. Use `removeRowDropZone` before adding it again.",57:()=>"unable to show popup filter, filter instantiation failed",58:()=>"no values found for select cellEditor",59:()=>"cannot select pinned rows",60:()=>"cannot select node until it has finished loading",61:()=>"since version v32.2.0, rowNode.isFullWidthCell() has been deprecated. Instead check `rowNode.detail` followed by the user provided `isFullWidthRow` grid option.",62:({colId:e})=>`setFilterModel() - no column found for colId: ${e}`,63:({colId:e})=>`setFilterModel() - unable to fully apply model, filtering disabled for colId: ${e}`,64:({colId:e})=>`setFilterModel() - unable to fully apply model, unable to create filter for colId: ${e}`,65:()=>"filter missing setModel method, which is needed for setFilterModel",66:()=>"filter API missing getModel method, which is needed for getFilterModel",67:()=>"Filter is missing isFilterActive() method",68:()=>"Column Filter API methods have been disabled as Advanced Filters are enabled.",69:({guiFromFilter:e})=>`getGui method from filter returned ${e}; it should be a DOM element.`,70:({newFilter:e})=>`Grid option quickFilterText only supports string inputs, received: ${typeof e}`,71:()=>"debounceMs is ignored when apply button is present",72:({keys:e})=>["ignoring FilterOptionDef as it doesn't contain one of ",e],73:()=>"invalid FilterOptionDef supplied as it doesn't contain a 'displayKey'",74:()=>"no filter options for filter",75:()=>"Unknown button type specified",76:({filterModelType:e})=>['Unexpected type of filter "',e,'", it looks like the filter was configured with incorrect Filter Options'],77:()=>"Filter model is missing 'conditions'",78:()=>'Filter Model contains more conditions than "filterParams.maxNumConditions". Additional conditions have been ignored.',79:()=>'"filterParams.maxNumConditions" must be greater than or equal to zero.',80:()=>'"filterParams.numAlwaysVisibleConditions" must be greater than or equal to zero.',81:()=>'"filterParams.numAlwaysVisibleConditions" cannot be greater than "filterParams.maxNumConditions".',82:({param:e})=>`DateFilter ${e} is not a number`,83:()=>"DateFilter minValidYear should be <= maxValidYear",84:()=>"DateFilter minValidDate should be <= maxValidDate",85:()=>"DateFilter should not have both minValidDate and minValidYear parameters set at the same time! minValidYear will be ignored.",86:()=>"DateFilter should not have both maxValidDate and maxValidYear parameters set at the same time! maxValidYear will be ignored.",87:()=>"DateFilter parameter minValidDate should always be lower than or equal to parameter maxValidDate.",88:({index:e})=>`Invalid row index for ensureIndexVisible: ${e}`,89:()=>"A template was provided for Header Group Comp - templates are only supported for Header Comps (not groups)",90:()=>"datasource is missing getRows method",91:()=>"Filter is missing method doesFilterPass",92:()=>"AnimationFrameService called but animation frames are off",93:()=>"cannot add multiple ranges when `cellSelection.suppressMultiRanges = true`",94:({paginationPageSizeOption:e,pageSizeSet:t,pageSizesSet:n,pageSizeOptions:i})=>`'paginationPageSize=${e}'${t?"":" (default value)"}, but ${e} is not included in${n?"":" the default"} paginationPageSizeSelector=[${i?.join(", ")}].`,95:({paginationPageSizeOption:e,paginationPageSizeSelector:t})=>`Either set '${t}' to an array that includes ${e} or to 'false' to disable the page size selector.`,96:({id:e,data:t})=>["Duplicate ID",e,"found for pinned row with data",t,"When `getRowId` is defined, it must return unique IDs for all pinned rows. Use the `rowPinned` parameter."],97:({colId:e})=>`cellEditor for column ${e} is missing getGui() method`,98:()=>"popup cellEditor does not work with fullRowEdit - you cannot use them both - either turn off fullRowEdit, or stop using popup editors.",99:()=>"Since v32, `api.hideOverlay()` does not hide the loading overlay when `loading=true`. Set `loading=false` instead.",101:({propertyName:e,componentName:t,agGridDefaults:n,jsComps:i})=>{const o=[],r=[...Object.keys(n??[]).filter(a=>!["agCellEditor","agGroupRowRenderer","agSortIndicator"].includes(a)),...Object.keys(i??[]).filter(a=>!!i[a])],s=tv({inputValue:t,allSuggestions:r,hideIrrelevant:!0,filterByPercentageOfBestMatch:.8}).values;return o.push(`Could not find '${t}' component. It was configured as "${e}: '${t}'" but it wasn't found in the list of registered components.
|
|
54
54
|
`),s.length>0&&o.push(` Did you mean: [${s.slice(0,3)}]?
|
|
@@ -58,12 +58,12 @@ ${b3(t)}`,41:()=>"Browser did not allow document.execCommand('copy'). Ensure 'ap
|
|
|
58
58
|
Please rebuild the selection state and reapply it.`,248:()=>"SetFloatingFilter expects SetFilter as its parent",249:()=>"Must supply a Value Formatter in Set Filter params when using a Key Creator",250:()=>"Must supply a Key Creator in Set Filter params when `treeList = true` on a group column, and Tree Data or Row Grouping is enabled.",251:({chartType:e})=>`AG Grid: Unable to create chart as an invalid chartType = '${e}' was supplied.`,252:()=>`cannot get grid to draw rows when it is in the middle of drawing rows.
|
|
59
59
|
Your code probably called a grid API method while the grid was in the render stage.
|
|
60
60
|
To overcome this, put the API call into a timeout, e.g. instead of api.redrawRows(), call setTimeout(function() { api.redrawRows(); }, 0).
|
|
61
|
-
To see what part of your code that caused the refresh check this stacktrace.`,253:({version:e})=>["Illegal version string: ",e],254:()=>"Cannot create chart: no chart themes available.",255:({point:e})=>`Lone surrogate U+${e?.toString(16).toUpperCase()} is not a scalar value`,256:()=>"Unable to initialise. See validation error, or load ValidationModule if missing.",257:()=>YF("IntegratedChartsModule"),258:()=>YF("SparklinesModule"),259:({part:e})=>`the argument to theme.withPart must be a Theming API part object, received: ${e}`,260:({propName:e,compName:t,gridScoped:n,gridId:i,rowModelType:o})=>QF({reasonOrId:`AG Grid '${e}' component: ${t}`,moduleName:il[t],gridId:i,gridScoped:n,rowModelType:o}),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 ${Wa}/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:()=>KF(),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:qF,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`,291:()=>"License Key being set multiple times with different values. This can result in an incorrect license key being used,",292:({colId:e})=>`The Multi Filter for column '${e}' has buttons configured against the child filters. When 'enableFilterHandlers=true', buttons must instead be provided against the parent Multi Filter params. The child filter buttons will be ignored.`,293:()=>"The grid was initialised detached from the DOM and was then inserted into a Shadow Root. Theme styles are probably broken. Pass the themeStyleContainer grid option to let the grid know where in the document to insert theme CSS.",294:()=>"When using the `agRichSelectCellEditor` setting `filterListAsync = true` requires `allowTyping = true` and the `values()` callback must return a Promise of filtered values.",295:({blockedService:e})=>`colDef.allowFormula is not supported with ${e}. Formulas has been turned off.`,296:()=>"Since v35, `api.hideOverlay()` does not hide the overlay when `activeOverlay` is set. Set `activeOverlay=null` instead.",297:()=>'`api.hideOverlay()` does not hide the no matching rows overlay as it is only controlled by grid state. Set `suppressOverlays=["noMatchingRows"] to not show it.',298:()=>"Columns Tool Panel 'buttons' requires 'apply' to enable Deferred Updates."};function
|
|
62
|
-
See ${r0(e,t)}`;return Array.isArray(i)?i.concat(r):[i,r]}var R3={1:"Charting Aggregation",2:"pivotResultFields",3:"setTooltip"},ZF=class{constructor(e="javascript"){this.frameworkName=e,this.renderingEngine="vanilla",this.batchFrameworkComps=!1,this.wrapIncoming=t=>t(),this.wrapOutgoing=t=>t(),this.baseDocLink=`${qS}/${this.frameworkName}-data-grid`,iO(this.baseDocLink)}frameworkComponent(e){return null}isFrameworkComponent(e){return!1}getDocLink(e){return this.baseDocLink+(e?"/"+e:"")}},XF=new WeakMap,JF=new WeakMap;function F3(e,t,n){if(!t)return gt(11),{};const i=n;let o;if(!i?.setThemeOnGridDiv){const s=on({tag:"div"});s.style.height="100%",e.appendChild(s),e=s,o=()=>e.remove()}return new P3().create(e,t,s=>{const a=new BN(e);s.createBean(a)},void 0,n,o)}var x3=1,P3=class{create(e,t,n,i,o,r){const s=xg.applyGlobalGridOptions(t),a=s.gridId??String(x3++),l=this.getRegisteredModules(o,a,s.rowModelType),u=this.createBeansList(s.rowModelType,l,a),h=this.createProvidedBeans(e,s,o);if(!u)return;const p={providedBeanInstances:h,beanClasses:u,id:a,beanInitComparator:c2,beanDestroyComparator:u2,derivedBeans:[a2],destroyCallback:()=>{JF.delete(v),XF.delete(e),ZL(a),r?.()}},m=new s2(p);this.registerModuleFeatures(m,l),n(m),m.getBean("syncSvc").start(),i?.(m);const v=m.getBean("gridApi");return XF.set(e,v),JF.set(v,e),v}getRegisteredModules(e,t,n){return Va(f3,void 0,!0),e?.modules?.forEach(i=>Va(i,t)),XL(t,ex(n))}registerModuleFeatures(e,t){const n=e.getBean("registry"),i=e.getBean("apiFunctionSvc");for(const o of t){n.registerModule(o);const r=o.apiFunctions;if(r){const s=Object.keys(r);for(const a of s)i?.addFunction(a,r[a])}}}createProvidedBeans(e,t,n){let i=n?n.frameworkOverrides:null;Nt(i)&&(i=new ZF);const o={gridOptions:t,eGridDiv:e,eRootDiv:e,globalListener:n?n.globalListener:null,globalSyncListener:n?n.globalSyncListener:null,frameworkOverrides:i,withinStudio:n?.withinStudio};return n?.providedBeanInstances&&Object.assign(o,n.providedBeanInstances),o}createBeansList(e,t,n){const i={clientSide:"ClientSideRowModel",infinite:"InfiniteRowModel",serverSide:"ServerSideRowModel",viewport:"ViewportRowModel"},o=ex(e),r=i[o];if(!r){Cc(201,{rowModelType:o},`Unknown rowModelType ${o}.`);return}if(!eO()){Cc(272,void 0,KF());return}if(!e){const a=Object.entries(i).filter(([l,u])=>Pg(u,n,l));if(a.length==1){const[l,u]=a[0];if(l!==o){const h={moduleName:u,rowModelType:l};Cc(275,h,qF(h));return}}}if(!Pg(r,n,o)){const a=JS(),l=`rowModelType = '${o}'`,u=`Missing module ${r}Module for rowModelType ${o}.`;Cc(200,{reasonOrId:l,moduleName:r,gridScoped:Eg(),gridId:n,rowModelType:o,isUmd:a},u);return}const s=new Set;for(const a of t)for(const l of a.beans??[])s.add(l);return Array.from(s)}};function ex(e){return e??"clientSide"}function E3(e,t=!1){const n=[],i=[],o=[],r=[],s=[],a=[],l=[],u=[],h=[];let f=0;for(let p=0;p<e.length;p++){const{colId:m,sort:v,sortType:w,sortIndex:b,rowGroup:y,rowGroupIndex:R,aggFunc:S,pivot:P,pivotIndex:F,pinned:I,hide:L,width:V,flex:G}=e[p];h.push(m),v&&(n[b??f++]={colId:m,sort:v,type:w}),y&&(i[R??0]=m),typeof S=="string"&&o.push({colId:m,aggFunc:S}),P&&(r[F??0]=m),I&&(I==="right"?a:s).push(m),L&&l.push(m),(G!=null||V)&&u.push({colId:m,flex:G??void 0,width:V===null?void 0:V})}return{sort:n.length?{sortModel:iv(n)}:void 0,rowGroup:i.length?{groupColIds:iv(i)}:void 0,aggregation:o.length?{aggregationModel:o}:void 0,pivot:r.length||t?{pivotMode:t,pivotColIds:iv(r)}:void 0,columnPinning:s.length||a.length?{leftColIds:s,rightColIds:a}:void 0,columnVisibility:l.length?{hiddenColIds:l}:void 0,columnSizing:u.length?{columnSizingModel:u}:void 0,columnOrder:h.length?{orderedColIds:h}:void 0}}function iv(e){return e.filter(t=>t!=null)}function D3(e){const t=[];for(const{groupId:n,open:i}of e)i&&t.push(n);return t.length?{openColumnGroupIds:t}:void 0}var T3=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=>{if(!i){gt(18),t||gt(20);return}if(this.isGridApi(i))return i;const o=i;return"current"in o?o.current?.api:(o.api||gt(19),o.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){if(!this.consuming)for(const t of this.getAlignedGridApis())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 n=[];return e.columns?e.columns.forEach(i=>{n.push(t(i))}):e.column&&n.push(t(e.column)),n}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":se(21);break}})}processGroupOpenedEvent(e){const{colGroupSvc:t}=this.beans;if(t)for(const n of e.columnGroups){let i=null;n&&(i=t.getProvidedColGroup(n.getGroupId())),!(n&&!i)&&t.setColumnGroupOpened(i,n.isExpanded(),"alignedGridChanged")}}processColumnEvent(e){const t=e.column;let n=null;const i=this.beans,{colResize:o,ctrlsSvc:r,colModel:s}=i;if(t&&(n=s.getColDefCol(t.getColId())),t&&!n)return;const a=this.getMasterColumns(e);switch(e.type){case"columnMoved":{const f=e.api.getColumnState().map(p=>({colId:p.colId}));oo(i,{state:f,applyOrder:!0},"alignedGridChanged")}break;case"columnVisible":{const f=e.api.getColumnState().map(p=>({colId:p.colId,hide:p.hide}));oo(i,{state:f},"alignedGridChanged")}break;case"columnPinned":{const f=e.api.getColumnState().map(p=>({colId:p.colId,pinned:p.pinned}));oo(i,{state:f},"alignedGridChanged")}break;case"columnResized":{const h=e,f={};for(const p of a)f[p.getId()]={key:p.getColId(),newWidth:p.getActualWidth()};for(const p of h.flexColumns??[])f[p.getId()]&&delete f[p.getId()];o?.setColumnWidths(Object.values(f),!1,h.finished,"alignedGridChanged");break}}const u=r.getGridBodyCtrl().isVerticalScrollShowing();for(const h of this.getAlignedGridApis())h.setGridOption("alwaysShowVerticalScroll",u)}},A3={moduleName:"AlignedGrids",version:ve,beans:[T3],dependsOn:[rF]};function I3(e,t={}){const n=t?t.rowNodes:void 0;e.frameworkOverrides.wrapIncoming(()=>e.rowRenderer.redrawRows(n))}function tx(e,t,n,i,o){t&&(i&&t.parent&&t.parent.level!==-1&&tx(e,t.parent,n,i,o),t.setExpanded(n,void 0,o))}function M3(e,t){return e.rowModel.getRowNode(t)}function k3(e,t,n,i){e.rowRenderer.addRenderedRowListener(t,n,i)}function L3(e){return e.rowRenderer.getRenderedNodes()}function O3(e,t,n){e.rowModel.forEachNode(t,n)}function _3(e){return e.rowRenderer.firstRenderedRow}function N3(e){return e.rowRenderer.lastRenderedRow}function B3(e,t){return e.rowModel.getRow(t)}function G3(e){return e.rowModel.getRowCount()}function H3(e){return e.ctrlsSvc.getScrollFeature().getVScrollPosition()}function V3(e){return e.ctrlsSvc.getScrollFeature().getHScrollPosition()}function nx(e,t,n="auto"){e.frameworkOverrides.wrapIncoming(()=>e.ctrlsSvc.getScrollFeature().ensureColumnVisible(t,n),"ensureVisible")}function ix(e,t,n){e.frameworkOverrides.wrapIncoming(()=>e.ctrlsSvc.getScrollFeature().ensureIndexVisible(t,n),"ensureVisible")}function W3(e,t,n=null){e.frameworkOverrides.wrapIncoming(()=>e.ctrlsSvc.getScrollFeature().ensureNodeVisible(t,n),"ensureVisible")}var ox={moduleName:"RowApi",version:ve,apiFunctions:{redrawRows:I3,setRowNodeExpanded:tx,getRowNode:M3,addRenderedRowListener:k3,getRenderedNodes:L3,forEachNode:O3,getFirstDisplayedRowIndex:_3,getLastDisplayedRowIndex:N3,getDisplayedRowAtIndex:B3,getDisplayedRowCount:G3}},z3={moduleName:"ScrollApi",version:ve,apiFunctions:{getVerticalPixelRange:H3,getHorizontalPixelRange:V3,ensureColumnVisible:nx,ensureIndexVisible:ix,ensureNodeVisible:W3}};function U3(e){e.expansionSvc?.expandAll(!0)}function $3(e){e.expansionSvc?.expandAll(!1)}function rx(e){e.rowModel?.onRowHeightChanged()}function sx(e){if(e.rowAutoHeight?.active){se(3);return}e.rowModel?.resetRowHeights()}function j3(e){e.expansionSvc?.resetExpansion()}function K3(e,t,n){const i=U_(e);if(i){if(e.rowGroupColsSvc?.columns.length===0){if(t<0){gt(238);return}i.setRowCount(t,n);return}gt(28);return}Zd(e)?.setRowCount(t,n)}function q3(e){return wc(e.gos)?e.rowModel.getBlockStates():e.rowNodeBlockLoader?.getBlockState()??{}}function Q3(e){return e.rowModel.isLastRowIndexKnown()}var Y3={moduleName:"CsrmSsrmSharedApi",version:ve,apiFunctions:{expandAll:U3,collapseAll:$3,resetRowGroupExpansion:j3}},Z3={moduleName:"RowModelSharedApi",version:ve,apiFunctions:{onRowHeightChanged:rx,resetRowHeights:sx}},X3={moduleName:"SsrmInfiniteSharedApi",version:ve,apiFunctions:{setRowCount:K3,getCacheBlockState:q3,isLastRowIndexKnown:Q3}},ax=(e,t)=>{for(let n=0,i=e.length;n<i;++n){const o=e[n],r=o.childrenAfterGroup;r!==null&&(ax(r,t),t(o))}},Zs=(e,t,n,i)=>{if(n!=null){const r=n.getSortedRows();for(let s=0,a=r.length;s<a;++s){const l=r[s];l.childrenAfterGroup!==null&&!l.destroyed&&i(l)}return}if(e==null)return;const o=e.childrenAfterGroup;o!==null&&(t&&ax(o,i),i(e))},J3=class extends X{constructor(e){super(),this.rootNode=e,this.nextId=0,this.allNodesMap={},lx(e)}getRowNode(e){return this.allNodesMap[e]}setNewRowData(e){this.dispatchRowDataUpdateStarted(e),this.destroyAllNodes();const t=lx(this.rootNode),n=new Array(e.length);t._leafs=n;let i=0;const o=this.beans.groupStage?.getNestedDataGetter(),r=o?new Set:null,s=(a,l)=>{const u=a.level+1;for(let h=0,f=l.length;h<f;++h){const p=l[h];if(!p)continue;const m=this.createRowNode(p,u,i);if(n[i++]=m,r&&!r.has(p)){r.add(p),m.treeParent=a;const v=o(p);v&&s(m,v)}}};s(t,e),n.length=i}destroyAllNodes(){const{selectionSvc:e,pinnedRowModel:t,groupStage:n}=this.beans;e?.reset("rowDataChanged"),t?.isManual()&&t.reset(),n?.clearNonLeafs();const i=this.rootNode._leafs;if(i)for(let o=0,r=i.length;o<r;++o)i[o]._destroy(!1);this.allNodesMap=Object.create(null),this.nextId=0}setImmutableRowData(e,t){const{rootNode:n,gos:i}=this;this.dispatchRowDataUpdateStarted(t);const o=Ua(i),r=e.changedRowNodes,{adds:s,updates:a}=r,l=new Set,u=[],h=this.beans.groupStage?.getNestedDataGetter();let f=i.get("suppressMaintainUnsortedOrder")?void 0:!1,p=-1,m=!1;const v=(y,R)=>{if(!f&&f!==void 0){const S=y.sourceRowIndex;f=S<=p,p=S}y.data!==R&&(y.updateData(R),s.has(y)||a.add(y),!y.selectable&&y.isSelected()&&u.push(y))},w=(y,R,S)=>{for(let P=0,F=R.length;P<F;++P){const I=R[P];if(!I)continue;let L=this.getRowNode(o({data:I,level:S}));if(L?(v(L,I),m||(m=!!h&&L.treeParent!==y)):(L=this.createRowNode(I,S),s.add(L)),!h||l.has(L)){l.add(L);continue}l.add(L),L.treeParent=y;const V=h(I);V&&w(L,V,S+1)}};w(n,t,0);const b=this.deleteUnusedNodes(l,r,u,!!e.animate)||f||s.size>0;if(b){const y=n._leafs??(n._leafs=[]);f===void 0?o6(y,l,r):i6(y,l)&&(r.reordered=!0)}(b||m||a.size)&&(e.rowDataUpdated=!0,this.deselect(u))}deleteUnusedNodes(e,{removals:t},n,i){const o=this.rootNode._leafs;for(let r=0,s=o.length;r<s;r++){const a=o[r];e.has(a)||this.destroyNode(a,i)&&(t.push(a),a.isSelected()&&n.push(a))}return t.length>0}updateRowData(e,t,n){if(this.dispatchRowDataUpdateStarted(e.add),this.beans.groupStage?.getNestedDataGetter())return se(268),{remove:[],update:[],add:[]};const i=[],o=Ua(this.gos),r=this.executeRemove(o,e,t,i,n),s=this.executeUpdate(o,e,t,i),a=this.executeAdd(e,t);return this.deselect(i),{remove:r,update:s,add:a}}executeRemove(e,{remove:t},{adds:n,updates:i,removals:o},r,s){const a=this.rootNode._leafs,l=a?.length,u=t?.length;if(!u||!l)return[];let h=0,f=l,p=0;const m=new Array(u);for(let v=0;v<u;++v){const w=this.lookupNode(e,t[v]);if(!w)continue;const b=w.sourceRowIndex;b<f&&(f=b),b>p&&(p=b),m[h++]=w,this.destroyNode(w,s)&&(w.isSelected()&&r.push(w),n.delete(w)||(i.delete(w),o.push(w)))}return m.length=h,h&&n6(a,f,p),m}executeUpdate(e,{update:t},{adds:n,updates:i},o){const r=t?.length;if(!r)return[];const s=new Array(r);let a=0;for(let l=0;l<r;l++){const u=t[l],h=this.lookupNode(e,u);h&&(h.updateData(u),!h.selectable&&h.isSelected()&&o.push(h),s[a++]=h,n.has(h)||i.add(h))}return s.length=a,s}executeAdd(e,t){var n;const i=(n=this.rootNode)._leafs??(n._leafs=[]),o=i.length,r=e.add,s=r?.length;if(!s)return[];const a=o+s;let l=this.sanitizeAddIndex(i,e.addIndex);if(l<o){for(let f=o-1,p=a-1;f>=l;--f){const m=i[f];m.sourceRowIndex=p,i[p--]=m}t.reordered=!0}i.length=a;const u=new Array(s),h=t.adds;for(let f=0;f<s;f++){const p=this.createRowNode(r[f],0,l);h.add(p),i[l]=p,u[f]=p,l++}return u}dispatchRowDataUpdateStarted(e){this.eventSvc.dispatchEvent({type:"rowDataUpdateStarted",firstRowData:e?.length?e[0]:null})}deselect(e){const t="rowDataChanged",n=this.beans.selectionSvc;e.length&&n?.setNodesSelected({newValue:!1,nodes:e,suppressFinishActions:!0,source:t}),n?.updateGroupsFromChildrenSelections?.(t),e.length&&this.eventSvc.dispatchEvent({type:"selectionChanged",source:t,selectedNodes:n?.getSelectedNodes()??null,serverSideState:null})}createRowNode(e,t,n){const i=new $r(this.beans);i.parent=this.rootNode,i.level=t,i.group=!1,n!=null&&(i.sourceRowIndex=n),i.setDataAndId(e,String(this.nextId++));const o=i.id,r=this.allNodesMap;return r[o]&&se(2,{nodeId:o}),r[o]=i,i}destroyNode(e,t){if(!e._destroy(t))return!1;const n=e.id,i=this.allNodesMap;return i[n]===e&&delete i[n],!0}lookupNode(e,t){if(!e)return t6(this.rootNode._leafs,t);const n=e({data:t,level:0}),i=this.allNodesMap[n];return i||(gt(4,{id:n}),null)}sanitizeAddIndex(e,t){const n=e.length;if(typeof t!="number"||t<0||t>=n||Number.isNaN(t))return n;t=Math.ceil(t);const i=this.gos;return t>0&&i.get("treeData")&&i.get("getDataPath")&&(t=e6(e,t)),t}},e6=(e,t)=>{for(let n=0,i=e.length;n<i;n++)if(e[n]?.rowIndex==t-1)return n+1;return t},lx=e=>{e.group=!0,e.level=-1,e._expanded=!0,e.id="ROOT_NODE_ID",e._leafs?.length!==0&&(e._leafs=[]);const t=[],n=[],i=[],o=[];e.childrenAfterGroup=t,e.childrenAfterSort=n,e.childrenAfterAggFilter=i,e.childrenAfterFilter=o;const r=e.sibling;return r&&(r.childrenAfterGroup=t,r.childrenAfterSort=n,r.childrenAfterAggFilter=i,r.childrenAfterFilter=o,r.childrenMapped=e.childrenMapped),e.updateHasChildren(),e},t6=(e,t)=>{if(e)for(let n=0,i=e.length;n<i;n++){const o=e[n];if(o.data===t)return o}return gt(5,{data:t}),null},n6=(e,t,n)=>{t=Math.max(0,t);for(let i=t,o=e.length;i<o;++i){const r=e[i];i<=n&&r.destroyed||(r.sourceRowIndex=t,e[t++]=r)}e.length=t},i6=(e,t)=>{const n=t.size;e.length=n;let i=0,o=!1,r=!1;for(const s of t){const a=s.sourceRowIndex;a===i?r||(r=o):(a>=0?r=!0:o=!0,s.sourceRowIndex=i,e[i]=s),++i}return r},o6=(e,t,{adds:n})=>{const i=e.length,o=t.size;o>i&&(e.length=o);let r=0;for(let s=0;s<i;++s){const a=e[s];a.destroyed||(r!==s&&(a.sourceRowIndex=r,e[r]=a),++r)}for(const s of n)s.sourceRowIndex<0&&(s.sourceRowIndex=r,e[r++]=s);e.length=r};function ov(e){const t=e.sibling;t&&(t.childrenAfterFilter=e.childrenAfterFilter)}var r6=class extends X{constructor(){super(...arguments),this.beanName="filterStage",this.step="filter",this.refreshProps=["excludeChildrenWhenTreeDataFiltering"]}wireBeans(e){this.filterManager=e.filterManager}execute(e){const t=!!this.filterManager?.isChildFilterPresent();this.beans.formula?.active?this.softFilter(t,e):this.filterNodes(t,e)}filterNodes(e,t){const n=(i,o)=>{i.hasChildren()&&e&&!o?i.childrenAfterFilter=i.childrenAfterGroup.filter(r=>{const s=r.childrenAfterFilter&&r.childrenAfterFilter.length>0,a=r.data&&this.filterManager.doesRowPassFilter({rowNode:r});return s||a}):i.childrenAfterFilter=i.childrenAfterGroup,ov(i)};if(this.doingTreeDataFiltering()){const i=(o,r)=>{if(o.childrenAfterGroup)for(let s=0;s<o.childrenAfterGroup.length;s++){const a=o.childrenAfterGroup[s],l=r||this.filterManager.doesRowPassFilter({rowNode:a});a.childrenAfterGroup?i(o.childrenAfterGroup[s],l):n(a,l)}n(o,r)};i(this.beans.rowModel.rootNode,!1)}else{const i=o=>n(o,!1);Zs(this.beans.rowModel.rootNode,this.beans.rowModel.hierarchical,t,i)}}softFilter(e,t){const n=o=>{if(o.childrenAfterFilter=o.childrenAfterGroup,o.hasChildren())for(const r of o.childrenAfterGroup)r.softFiltered=e&&!(r.data&&this.filterManager.doesRowPassFilter({rowNode:r}));ov(o)},i=this.beans.rowModel;Zs(i.rootNode,i.hierarchical,t,n)}doingTreeDataFiltering(){const{gos:e}=this;return!!this.beans.groupStage?.treeData&&!e.get("excludeChildrenWhenTreeDataFiltering")}},s6=4,a6=(e,t,n,i,o)=>{const r=t.childrenAfterSort,s=t.childrenAfterAggFilter;if(!s)return r&&r.length>0?r:[];const a=s.length;if(a<=1)return r?.length===a&&(a===0||r[0]===s[0])?r:s.slice();if(!r||a<=s6)return e.doFullSortInPlace(s.slice(),o);const l=new Map,{updates:u,adds:h}=n,f=[];for(let m=0;m<a;++m){const v=s[m];u.has(v)||h.has(v)||i?.hasRow(v)?(l.set(v,~m),f.push(v)):l.set(v,m)}const p=f.length;return p===0?a===r.length?r:c6(r,l,f):(f.sort((m,v)=>e.compareRowNodes(o,m,v)||~l.get(m)-~l.get(v)),p===a?f:l6(e,o,f,r,l,a))},l6=(e,t,n,i,o,r)=>{const s=new Array(r);let a=0,l=n[a],u,h=-1,f=0,p=0;const m=n.length,v=i.length;for(;;){if(h<0){if(f>=v)break;if(u=i[f++],h=o.get(u)??-1,h<0)continue}if((e.compareRowNodes(t,l,u)||~o.get(l)-h)<0){if(s[p++]=l,++a>=m)break;l=n[a]}else s[p++]=u,h=-1}for(;a<m;)s[p++]=n[a++];if(h<0)return s;for(s[p++]=u;f<v;){const w=i[f++];o.get(w)>=0&&(s[p++]=w)}return s},c6=(e,t,n)=>{let i=0;n.length=t.size;for(let o=0,r=e.length;o<r;++o){const s=e[o];t.has(s)&&(n[i++]=s)}return n.length=i,n},cx=e=>{const t=e.childrenAfterSort,n=e.sibling;if(n&&(n.childrenAfterSort=t),!!t)for(let i=0,o=t.length-1;i<=o;i++){const r=t[i],s=i===0,a=i===o;r.firstChild!==s&&(r.firstChild=s,r.dispatchRowEvent("firstChildChanged")),r.lastChild!==a&&(r.lastChild=a,r.dispatchRowEvent("lastChildChanged")),r.childIndex!==i&&(r.childIndex=i,r.dispatchRowEvent("childIndexChanged"))}},u6=class extends X{constructor(){super(...arguments),this.beanName="sortStage",this.step="sort",this.refreshProps=["postSortRows","groupDisplayType","accentedSort"]}execute(e,t){const n=this.beans.sortSvc.getSortOptions(),i=n.length>0&&!!t&&this.gos.get("deltaSort"),{gos:o,colModel:r,rowGroupColsSvc:s,rowNodeSorter:a,rowRenderer:l,showRowGroupCols:u}=this.beans,h=o.get("groupMaintainOrder"),f=r.getCols().some(R=>R.isRowGroupActive()),p=s?.columns,m=r.isPivotMode(),v=o.getCallback("postSortRows");let w=!1,b;const y=R=>{const S=m&&R.leafGroup;let P=h&&f&&!R.leafGroup;P&&(b??(b=this.shouldSortContainsGroupCols(n)),P&&(P=!b));let F=null;if(P){let I=!1;if(p){const L=R.level+1;L<p.length&&(I=p[L].wasSortExplicitlyRemoved)}I||(F=d6(R))}else!n.length||S||(i&&t?F=a6(a,R,t,e,n):F=a.doFullSortInPlace(R.childrenAfterAggFilter.slice(),n));if(F||(F=R.childrenAfterAggFilter?.slice()??[]),w||(w=R.childrenAfterSort?.[0]!==F[0]),R.childrenAfterSort=F,cx(R),v){const I={nodes:R.childrenAfterSort};v(I)}};if(Zs(this.beans.rowModel.rootNode,this.beans.rowModel.hierarchical,e,y),w&&o.get("groupHideOpenParents")){const R=u?.columns;R?.length&&l.refreshCells({columns:R,force:!0})}}shouldSortContainsGroupCols(e){const t=e.length;if(!t)return!1;if(tr(this.gos)){for(let n=0;n<t;++n){const i=e[n].column;if(i.isPrimary()&&i.isRowGroupActive())return!0}return!1}for(let n=0;n<t;++n)if(e[n].column.getColDef().showRowGroup)return!0;return!1}},d6=e=>{const t=e.childrenAfterSort,n=e.childrenAfterAggFilter,i=t?.length,o=n?.length;if(!i||!o)return null;const r=new Array(o),s=new Set;for(let l=0;l<o;++l)s.add(n[l]);let a=0;for(let l=0;l<i;++l){const u=t[l];s.delete(u)&&(r[a++]=u)}if(s.size===0&&a===i)return t;for(const l of s)r[a++]=l;return r.length=a,r},h6=class extends X{constructor(){super(...arguments),this.beanName="rowModel",this.rootNode=null,this.rowCountReady=!1,this.hierarchical=!1,this.nodeManager=void 0,this.rowsToDisplay=[],this.formulaRows=[],this.stages=null,this.asyncTransactions=null,this.asyncTransactionsTimer=0,this.started=!1,this.refreshingData=!1,this.rowDataUpdatedPending=!1,this.refreshingModel=!1,this.pendingNewData=!1,this.noKeepRenderedRows=!1,this.noKeepUndoRedoStack=!1,this.noAnimate=!1,this.rowNodesCountReady=!1,this.stagesRefreshProps=new Map,this.onRowHeightChanged_debounced=hn(this,this.onRowHeightChanged.bind(this),100)}postConstruct(){const e=this.beans,t=new $r(e);this.rootNode=t,this.nodeManager=this.createBean(new J3(t));const n=()=>{this.beans.groupStage?.invalidateGroupCols(),this.refreshModel({step:"group",afterColumnsChanged:!0,keepRenderedRows:!0,animate:!this.gos.get("suppressAnimationFrame")})};this.addManagedEventListeners({newColumnsLoaded:n,columnRowGroupChanged:n,columnValueChanged:this.onValueChanged.bind(this),columnPivotChanged:()=>this.refreshModel({step:"pivot"}),columnPivotModeChanged:()=>this.refreshModel({step:"group"}),filterChanged:this.onFilterChanged.bind(this),sortChanged:this.onSortChanged.bind(this),stylesChanged:this.onGridStylesChanges.bind(this),gridReady:this.onGridReady.bind(this),rowExpansionStateChanged:this.onRowGroupOpened.bind(this)}),this.addPropertyListeners()}addPropertyListeners(){const{beans:e,stagesRefreshProps:t}=this,n=[e.groupStage,e.filterStage,e.pivotStage,e.aggStage,e.sortStage,e.filterAggStage,e.flattenStage].filter(i=>!!i);this.stages=n;for(let i=n.length-1;i>=0;--i){const o=n[i];for(const r of o.refreshProps)t.set(r,i)}this.addManagedPropertyListeners([...t.keys(),"rowData"],i=>{const o=i.changeSet?.properties;o&&this.onPropChange(o)}),this.addManagedPropertyListener("rowHeight",()=>this.resetRowHeights())}start(){this.started=!0,this.rowNodesCountReady?this.refreshModel({step:"group",rowDataUpdated:!0,newData:!0}):this.setInitialData()}setInitialData(){this.gos.get("rowData")&&this.onPropChange(["rowData"])}ensureRowHeightsValid(e,t,n,i){let o,r=!1;do{o=!1;const s=this.getRowIndexAtPixel(e),a=this.getRowIndexAtPixel(t),l=Math.max(s,n),u=Math.min(a,i);for(let h=l;h<=u;h++){const f=this.getRow(h);if(f.rowHeightEstimated){const p=Gr(this.beans,f);f.setRowHeight(p.height),o=!0,r=!0}}o&&this.setRowTopAndRowIndex()}while(o);return r}onPropChange(e){const{nodeManager:t,gos:n,beans:i}=this,o=i.groupStage;if(!t)return;const r=new Set(e),s=o?.onPropChange(r);let a;r.has("rowData")?a=n.get("rowData"):s&&(a=o?.extractData()),a&&!Array.isArray(a)&&(a=null,se(1));const l={step:"nothing",changedProps:r};if(a){const h=!s&&!this.isEmpty()&&a.length>0&&n.exists("getRowId")&&!n.get("resetRowDataOnUpdate");this.refreshingData=!0,h?(l.keepRenderedRows=!0,l.animate=!n.get("suppressAnimationFrame"),l.changedRowNodes=new ch,t.setImmutableRowData(l,a)):(l.rowDataUpdated=!0,l.newData=!0,t.setNewRowData(a),this.rowNodesCountReady=!0)}const u=l.rowDataUpdated?"group":this.getRefreshedStage(e);u&&(l.step=u,this.refreshModel(l))}getRefreshedStage(e){const{stages:t,stagesRefreshProps:n}=this;if(!t)return null;const i=t.length;let o=i;for(let r=0,s=e.length;r<s&&o;++r)o=Math.min(o,n.get(e[r])??o);return o<i?t[o].step:null}setRowTopAndRowIndex(e){const{beans:t,rowsToDisplay:n}=this,i=t.environment.getDefaultRowHeight();let o=0;const r=yn(this.gos,"normal");for(let s=0,a=n.length;s<a;++s){const l=n[s],u=l.id;if(u!=null&&e?.add(u),l.rowHeight==null){const h=Gr(t,l,r,i);l.setRowHeight(h.height,h.estimated)}l.setRowTop(o),l.setRowIndex(s),o+=l.rowHeight}if(this.beans.formula?.active){const s=this.formulaRows;for(let a=0,l=s.length;a<l;++a){const u=s[a];u.formulaRowIndex=a}}}clearRowTopAndRowIndex(e,t){const n=r=>{r?.id!=null&&!t.has(r.id)&&r.clearRowTopAndRowIndex()},i=r=>{n(r),n(r.detailNode),n(r.sibling);const s=r.childrenAfterGroup;if(!(!r.hasChildren()||!s)&&!(e&&r.level!==-1&&!r.expanded))for(let a=0,l=s.length;a<l;++a)i(s[a])},o=this.rootNode;o&&i(o)}isLastRowIndexKnown(){return!0}getRowCount(){return this.rowsToDisplay.length}getTopLevelRowCount(){const{rootNode:e,rowsToDisplay:t}=this;if(!e||!t.length)return 0;if(t[0]===e)return 1;const i=e.sibling?.displayed?1:0;return(e.childrenAfterSort?.length??0)+i}getTopLevelRowDisplayedIndex(e){const{beans:t,rootNode:n,rowsToDisplay:i}=this;if(!n||!i.length||i[0]===n)return e;const r=n.childrenAfterSort,s=l=>{let u=r[l];if(this.gos.get("groupHideOpenParents"))for(;u.expanded&&u.childrenAfterSort&&u.childrenAfterSort.length>0;)u=u.childrenAfterSort[0];return u.rowIndex},a=t.footerSvc;return a?a?.getTopDisplayIndex(i,e,r,s):s(e)}getTopLevelIndexFromDisplayedIndex(e){const{rootNode:t,rowsToDisplay:n}=this;if(!t||!n.length||n[0]===t)return e;let o=this.getRow(e);o.footer&&(o=o.sibling);let r=o.parent;for(;r&&r!==t;)o=r,r=o.parent;const s=t.childrenAfterSort?.indexOf(o)??-1;return s>=0?s:e}getRowBounds(e){const t=this.rowsToDisplay[e];return t?{rowTop:t.rowTop,rowHeight:t.rowHeight}:null}onRowGroupOpened(){this.refreshModel({step:"map",keepRenderedRows:!0,animate:za(this.gos)})}onFilterChanged({afterDataChange:e,columns:t}){if(!e){const i=t.length===0||t.some(o=>o.isPrimary())?"filter":"filter_aggregates";this.refreshModel({step:i,keepRenderedRows:!0,animate:za(this.gos)})}}onSortChanged(){this.refreshModel({step:"sort",keepRenderedRows:!0,animate:za(this.gos)})}getType(){return"clientSide"}onValueChanged(){this.refreshModel({step:this.beans.colModel.isPivotActive()?"pivot":"aggregate"})}isSuppressModelUpdateAfterUpdateTransaction(e){if(!this.gos.get("suppressModelUpdateAfterUpdateTransaction"))return!1;const{changedRowNodes:t,newData:n,rowDataUpdated:i}=e;return!(!t||n||!i||t.removals.length||t.adds.size)}reMapRows(){if(this.refreshingModel||this.refreshingData){this.noKeepRenderedRows=!0,this.noKeepUndoRedoStack=!0,this.noAnimate=!0;return}this.refreshModel({step:"map",keepRenderedRows:!1,keepUndoRedoStack:!1,animate:!1})}refreshModel(e){const{nodeManager:t,eventSvc:n,started:i}=this;if(!t)return;const o=!!e.rowDataUpdated;if(i&&o&&n.dispatchEvent({type:"rowDataUpdated"}),this.deferRefresh(e)){this.setPendingRefreshFlags(e),this.rowDataUpdatedPending||(this.rowDataUpdatedPending=o);return}this.rowDataUpdatedPending&&(this.rowDataUpdatedPending=!1,e.step="group"),this.updateRefreshParams(e);let r=!1;this.refreshingModel=!0;try{this.executeRefresh(e,o),r=!0}finally{this.refreshingData=!1,this.refreshingModel=!1,r||this.setPendingRefreshFlags(e)}this.clearPendingRefreshFlags(),n.dispatchEvent({type:"modelUpdated",animate:e.animate,keepRenderedRows:e.keepRenderedRows,newData:e.newData,newPage:!1,keepUndoRedoStack:e.keepUndoRedoStack})}executeRefresh(e,t){const{beans:n,rootNode:i}=this;n.masterDetailSvc?.refreshModel(e),t&&e.step!=="group"&&n.colFilter?.refreshModel();let o=e.changedPath;switch(o?.addRow(i),e.step==="group"&&(this.doGrouping(i,e),o??(o=e.changedPath)),o??(o=n.changedPathFactory?.ensureRowsPath(e,i)),e.step){case"group":case"filter":this.doFilter(o);case"pivot":this.doPivot(o)&&(o=void 0,e.changedPath=void 0);case"aggregate":this.doAggregate(o);case"filter_aggregates":this.doFilterAggregates(o);case"sort":this.doSort(o,e.changedRowNodes);case"map":this.doRowsToDisplay()}const r=new Set;this.setRowTopAndRowIndex(r),this.clearRowTopAndRowIndex(o,r),this.updateRefreshParams(e)}deferRefresh(e){return this.refreshingModel||this.beans.colModel.changeEventsDispatching?!0:this.isSuppressModelUpdateAfterUpdateTransaction(e)?(this.started&&(this.refreshingData=!1),!0):!this.started}setPendingRefreshFlags(e){this.pendingNewData||(this.pendingNewData=!!e.newData),this.noKeepRenderedRows||(this.noKeepRenderedRows=!e.keepRenderedRows),this.noKeepUndoRedoStack||(this.noKeepUndoRedoStack=!e.keepUndoRedoStack),this.noAnimate||(this.noAnimate=!e.animate)}clearPendingRefreshFlags(){this.pendingNewData=!1,this.noKeepRenderedRows=!1,this.noKeepUndoRedoStack=!1,this.noAnimate=!1}updateRefreshParams(e){e.newData=this.pendingNewData||!!e.newData,e.keepRenderedRows=!this.noKeepRenderedRows&&!!e.keepRenderedRows,e.keepUndoRedoStack=!this.noKeepUndoRedoStack&&!!e.keepUndoRedoStack,e.animate=!this.noAnimate&&!!e.animate}isEmpty(){return!this.rootNode?._leafs?.length||!this.beans.colModel?.ready}isRowsToRender(){return this.rowsToDisplay.length>0}getOverlayType(){const{beans:e,gos:t}=this;if(this.rootNode?._leafs?.length){if(e.filterManager?.isAnyFilterPresent()&&this.getRowCount()===0)return"noMatchingRows"}else if(this.rowCountReady||(t.get("rowData")?.length??0)==0)return"noRows";return null}getNodesInRangeForSelection(e,t){let n=!1,i=!1;const o=[],r=yc(this.gos);return this.forEachNodeAfterFilterAndSort(s=>{if(i)return;if(n&&(s===t||s===e)&&(i=!0,r&&s.group)){ux(o,s);return}if(!n){if(s!==t&&s!==e)return;n=!0,t===e&&(i=!0)}(!s.group||!r)&&o.push(s)}),o}getTopLevelNodes(){return this.rootNode?.childrenAfterGroup??null}getRow(e){return this.rowsToDisplay[e]}getFormulaRow(e){return this.formulaRows[e]}isRowPresent(e){return this.rowsToDisplay.indexOf(e)>=0}getRowIndexAtPixel(e){const t=this.rowsToDisplay,n=t.length;if(this.isEmpty()||n===0)return-1;let i=0,o=n-1;if(e<=0)return 0;if(t[o].rowTop<=e)return o;let s=-1,a=-1;for(;;){const l=Math.floor((i+o)/2),u=t[l];if(this.isRowInPixel(u,e)||(u.rowTop<e?i=l+1:u.rowTop>e&&(o=l-1),s===i&&a===o))return l;s=i,a=o}}isRowInPixel(e,t){const n=e.rowTop,i=n+e.rowHeight;return n<=t&&i>t}forEachLeafNode(e){const t=this.rootNode?._leafs;if(t)for(let n=0,i=t.length;n<i;++n)e(t[n],n)}forEachNode(e,t=!1){this.depthFirstSearchRowNodes(e,t)}forEachDisplayedNode(e){const t=this.rowsToDisplay;for(let n=0,i=t.length;n<i;++n)e(t[n],n)}forEachNodeAfterFilter(e,t=!1){this.depthFirstSearchRowNodes(e,t,n=>n.childrenAfterAggFilter)}forEachNodeAfterFilterAndSort(e,t=!1){this.depthFirstSearchRowNodes(e,t,n=>n.childrenAfterSort)}forEachPivotNode(e,t,n){const{colModel:i,rowGroupColsSvc:o}=this.beans;if(!i.isPivotMode())return;if(!o?.columns.length){e(this.rootNode,0);return}const r=n?"childrenAfterSort":"childrenAfterGroup";this.depthFirstSearchRowNodes(e,t,s=>s.leafGroup?null:s[r])}depthFirstSearchRowNodes(e,t=!1,n=r=>r.childrenAfterGroup,i=this.rootNode,o=0){let r=o;if(!i)return r;const s=i===this.rootNode;if(s||e(i,r++),i.hasChildren()&&!i.footer){const a=s||this.hierarchical?n(i):null;if(a){const l=this.beans.footerSvc;r=l?.addTotalRows(r,i,e,t,s,"top")??r;for(const u of a)r=this.depthFirstSearchRowNodes(e,t,n,u,r);return l?.addTotalRows(r,i,e,t,s,"bottom")??r}}return r}doAggregate(e){this.rootNode&&this.beans.aggStage?.execute(e)}doFilterAggregates(e){const t=this.rootNode,n=this.beans.filterAggStage;if(n&&this.hierarchical){n.execute(e);return}t.childrenAfterAggFilter=t.childrenAfterFilter;const i=t.sibling;i&&(i.childrenAfterAggFilter=t.childrenAfterFilter)}doSort(e,t){const n=this.beans.sortStage;if(n){n.execute(e,t);return}Zs(this.rootNode,this.hierarchical,e,i=>{i.childrenAfterSort=i.childrenAfterAggFilter.slice(0),cx(i)})}doGrouping(e,t){const i=this.beans.groupStage?.execute(t);if(i===void 0){const o=e._leafs;e.childrenAfterGroup=o,e.updateHasChildren();const r=e.sibling;r&&(r.childrenAfterGroup=o)}(i||t.rowDataUpdated)&&this.beans.colFilter?.refreshModel(),!this.rowCountReady&&this.rowNodesCountReady&&(this.rowCountReady=!0,this.eventSvc.dispatchEventOnce({type:"rowCountReady"}))}doFilter(e){const t=this.beans.filterStage;if(t){t.execute(e);return}Zs(this.rootNode,this.hierarchical,e,n=>{n.childrenAfterFilter=n.childrenAfterGroup,ov(n)})}doPivot(e){return this.beans.pivotStage?.execute(e)??!1}getRowNode(e){const t=this.nodeManager?.getRowNode(e);return typeof t=="object"?t:this.beans.groupStage?.getNonLeaf(e)}batchUpdateRowData(e,t){if(!this.asyncTransactionsTimer){this.asyncTransactions=[];const n=this.gos.get("asyncTransactionWaitMillis");this.asyncTransactionsTimer=setTimeout(()=>this.executeBatchUpdateRowData(),n)}this.asyncTransactions.push({rowDataTransaction:e,callback:t})}flushAsyncTransactions(){const e=this.asyncTransactionsTimer;e&&(clearTimeout(e),this.executeBatchUpdateRowData())}executeBatchUpdateRowData(){const{nodeManager:e,beans:t,eventSvc:n,asyncTransactions:i}=this;if(!e)return;t.valueCache?.onDataChanged();const o=[],r=[],s=new ch,a=!this.gos.get("suppressAnimationFrame");for(const{rowDataTransaction:l,callback:u}of i??[]){this.rowNodesCountReady=!0,this.refreshingData=!0;const h=e.updateRowData(l,s,a);o.push(h),u&&r.push(u.bind(null,h))}this.commitTransactions(s,a),r.length>0&&setTimeout(()=>{for(let l=0,u=r.length;l<u;l++)r[l]()},0),o.length>0&&n.dispatchEvent({type:"asyncTransactionsFlushed",results:o}),this.asyncTransactionsTimer=0,this.asyncTransactions=null}updateRowData(e){const t=this.nodeManager;if(!t)return null;this.beans.valueCache?.onDataChanged(),this.rowNodesCountReady=!0;const n=new ch,i=!this.gos.get("suppressAnimationFrame");this.refreshingData=!0;const o=t.updateRowData(e,n,i);return this.commitTransactions(n,i),o}commitTransactions(e,t){this.refreshModel({step:"group",rowDataUpdated:!0,keepRenderedRows:!0,animate:t,changedRowNodes:e})}doRowsToDisplay(){const{rootNode:e,beans:t}=this;if(t.formula?.active){const o=e?.childrenAfterSort??[];this.formulaRows=o,this.rowsToDisplay=o.filter(r=>!r.softFiltered);for(const r of this.rowsToDisplay)r.setUiLevel(0);return}const n=t.flattenStage;if(n){this.rowsToDisplay=n.execute();return}const i=this.rootNode.childrenAfterSort??[];for(const o of i)o.setUiLevel(0);this.rowsToDisplay=i}onRowHeightChanged(){this.refreshModel({step:"map",keepRenderedRows:!0,keepUndoRedoStack:!0})}resetRowHeights(){const e=this.rootNode;if(!e)return;const t=this.resetRowHeightsForAllRowNodes();e.setRowHeight(e.rowHeight,!0);const n=e.sibling;n?.setRowHeight(n.rowHeight,!0),t&&this.onRowHeightChanged()}resetRowHeightsForAllRowNodes(){let e=!1;return this.forEachNode(t=>{t.setRowHeight(t.rowHeight,!0);const n=t.detailNode;n?.setRowHeight(n.rowHeight,!0);const i=t.sibling;i?.setRowHeight(i.rowHeight,!0),e=!0}),e}onGridStylesChanges(e){e.rowHeightChanged&&!this.beans.rowAutoHeight?.active&&this.resetRowHeights()}onGridReady(){this.started||this.setInitialData()}destroy(){super.destroy(),this.nodeManager=this.destroyBean(this.nodeManager),this.started=!1,this.rootNode=null,this.rowsToDisplay=[],this.asyncTransactions=null,this.stages=null,this.stagesRefreshProps.clear(),clearTimeout(this.asyncTransactionsTimer)}onRowHeightChangedDebounced(){this.onRowHeightChanged_debounced()}},ux=(e,t)=>{const n=t.childrenAfterGroup;if(n)for(let i=0,o=n.length;i<o;++i){const r=n[i];r.data&&e.push(r),r.group&&ux(e,r)}};function f6(e){e.expansionSvc?.onGroupExpandedOrCollapsed()}function p6(e,t){const n=Eo(e);n&&((!t||t==="everything")&&(t="group"),n.refreshModel({step:t,keepRenderedRows:!0,animate:!e.gos.get("suppressAnimationFrame")}))}function g6(e){return Eo(e)?.isEmpty()??!0}function m6(e,t){Eo(e)?.forEachLeafNode(t)}function v6(e,t){Eo(e)?.forEachNodeAfterFilter(t)}function C6(e,t){Eo(e)?.forEachNodeAfterFilterAndSort(t)}function w6(e,t){return e.frameworkOverrides.wrapIncoming(()=>Eo(e)?.updateRowData(t))}function b6(e,t,n){e.frameworkOverrides.wrapIncoming(()=>Eo(e)?.batchUpdateRowData(t,n))}function y6(e){e.frameworkOverrides.wrapIncoming(()=>Eo(e)?.flushAsyncTransactions())}function S6(e){return e.selectionSvc?.getBestCostNodeSelection()}var R6={moduleName:"ClientSideRowModel",version:ve,rowModels:["clientSide"],beans:[h6,u6],dependsOn:[UF]},F6={moduleName:"ClientSideRowModelApi",version:ve,apiFunctions:{onGroupExpandedOrCollapsed:f6,refreshClientSideRowModel:p6,isRowDataEmpty:g6,forEachLeafNode:m6,forEachNodeAfterFilter:v6,forEachNodeAfterFilterAndSort:C6,applyTransaction:w6,applyTransactionAsync:b6,flushAsyncTransactions:y6,getBestCostNodeSelection:S6,resetRowHeights:sx,onRowHeightChanged:rx},dependsOn:[Y3,Z3]},x6=":where(.ag-ltr) :where(.ag-animate-autosize){.ag-cell,.ag-header-cell,.ag-header-group-cell{transition:width .2s ease-in-out,left .2s ease-in-out}}:where(.ag-rtl) :where(.ag-animate-autosize){.ag-cell,.ag-header-cell,.ag-header-group-cell{transition:width .2s ease-in-out,right .2s ease-in-out}}";function P6(e,t){typeof t=="number"?e.colAutosize?.sizeColumnsToFit(t,"api"):e.colAutosize?.sizeColumnsToFitGridBody(t)}function dx({colAutosize:e,visibleCols:t},n,i){Array.isArray(n)?e?.autoSizeCols({colKeys:n,skipHeader:i,source:"api"}):e?.autoSizeCols({...n,colKeys:n.colIds??t.allCols,source:"api"})}function E6(e,t){t&&typeof t=="object"?dx(e,t):e.colAutosize?.autoSizeAllColumns({source:"api",skipHeader:t})}var D6=class extends X{constructor(){super(...arguments),this.beanName="colAutosize",this.timesDelayed=0,this.shouldQueueResizeOperations=!1,this.resizeOperationQueue=[]}postConstruct(){const{gos:e}=this,t=e.get("autoSizeStrategy");if(t){let n=!1;const i=t.type;if(i==="fitGridWidth"||i==="fitProvidedWidth")n=!0;else if(i==="fitCellContents"){this.addManagedEventListeners({firstDataRendered:()=>this.onFirstDataRendered(t)});const o=e.get("rowData");n=o!=null&&o.length>0&&Yt(e)}n&&this.beans.colDelayRenderSvc?.hideColumns(i)}}autoSizeCols(e){const{eventSvc:t,visibleCols:n,colModel:i}=this.beans;Bc(this.beans,!0),this.innerAutoSizeCols(e).then(o=>{const r=h=>tl(t,Array.from(h),!0,"autosizeColumns");if(!e.scaleUpToFitGridWidth)return Bc(this.beans,!1),r(o);const s=hx(this.beans),a=h=>n.leftCols.some(f=>Sc(f,h)),l=h=>n.rightCols.some(f=>Sc(f,h)),u=e.colKeys.filter(h=>!i.getCol(h)?.getColDef().suppressAutoSize&&!zn(h)&&!a(h)&&!l(h));this.sizeColumnsToFit(s,e.source,!0,{defaultMaxWidth:e.defaultMaxWidth,defaultMinWidth:e.defaultMinWidth,columnLimits:e.columnLimits?.map(h=>({...h,key:h.colId})),colKeys:u,onlyScaleUp:!0,animate:!1}),Bc(this.beans,!1),r(o)})}innerAutoSizeCols(e){return new Promise((t,n)=>{if(this.shouldQueueResizeOperations)return this.pushResizeOperation(()=>this.innerAutoSizeCols(e).then(t,n));const{colKeys:i,skipHeader:o,skipHeaderGroups:r,stopAtGroup:s,defaultMaxWidth:a,defaultMinWidth:l,columnLimits:u=[],source:h="api"}=e,{animationFrameSvc:f,renderStatus:p,colModel:m,autoWidthCalc:v,visibleCols:w}=this.beans;if(f?.flushAllFrames(),this.timesDelayed<5&&p&&(!p.areHeaderCellsRendered()||!p.areCellsRendered())){this.timesDelayed++,setTimeout(()=>{this.isAlive()&&this.innerAutoSizeCols(e).then(t,n)});return}this.timesDelayed=0;const b=new Set;let y=-1;const R=Object.fromEntries(u.map(({colId:F,...I})=>[F,I])),S=o??this.gos.get("skipHeaderOnAutoSize"),P=r??S;for(;y!==0;){y=0;const F=[];for(const I of i){if(!I||zO(I))continue;const L=m.getCol(I);if(!L||b.has(L)||L.getColDef().suppressAutoSize)continue;const V=v.getPreferredWidthForColumn(L,S);if(V>0){const G=R[L.colId]??{};G.minWidth??(G.minWidth=l),G.maxWidth??(G.maxWidth=a);const _=T6(L,V,G);L.setActualWidth(_,h),b.add(L),y++}F.push(L)}F.length&&w.refresh(h)}P||this.autoSizeColumnGroupsByColumns(i,h,s),t(b)})}autoSizeColumn(e,t,n){this.autoSizeCols({colKeys:[e],skipHeader:n,skipHeaderGroups:!0,source:t})}autoSizeColumnGroupsByColumns(e,t,n){const{colModel:i,ctrlsSvc:o}=this.beans,r=new Set,s=i.getColsForKeys(e);for(const l of s){let u=l.getParent();for(;u&&u!=n;)u.isPadding()||r.add(u),u=u.getParent()}let a;for(const l of r){for(const u of o.getHeaderRowContainerCtrls())if(a=u.getHeaderCtrlForColumn(l),a)break;a?.resizeLeafColumnsToFit(t)}}autoSizeAllColumns(e){if(this.shouldQueueResizeOperations){this.pushResizeOperation(()=>this.autoSizeAllColumns(e));return}this.autoSizeCols({colKeys:this.beans.visibleCols.allCols,...e})}addColumnAutosizeListeners(e,t){const n=this.gos.get("skipHeaderOnAutoSize"),i=()=>{this.autoSizeColumn(t,"uiColumnResized",n)};e.addEventListener("dblclick",i);const o=new Ws(e);return o.addEventListener("doubleTap",i),()=>{e.removeEventListener("dblclick",i),o.destroy()}}addColumnGroupResize(e,t,n){const i=this.gos.get("skipHeaderOnAutoSize"),o=()=>{const r=[],s=t.getDisplayedLeafColumns();for(const a of s)a.getColDef().suppressAutoSize||r.push(a.getColId());r.length>0&&this.autoSizeCols({colKeys:r,skipHeader:i,stopAtGroup:t,source:"uiColumnResized"}),n()};return e.addEventListener("dblclick",o),()=>e.removeEventListener("dblclick",o)}sizeColumnsToFitGridBody(e,t){if(!this.isAlive())return;const n=hx(this.beans);if(n>0){this.sizeColumnsToFit(n,"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):se(29)}sizeColumnsToFit(e,t="sizeColumnsToFit",n,i){if(this.shouldQueueResizeOperations){this.pushResizeOperation(()=>this.sizeColumnsToFit(e,t,n,i));return}const{beans:o}=this,r=i?.animate??!0;r&&Bc(o,!0);const s={};for(const{key:y,...R}of i?.columnLimits??[])s[typeof y=="string"?y:y.getColId()]=R;const a=o.visibleCols.allCols;if(e<=0||!a.length)return;const l=rr(a);if(i?.onlyScaleUp&&l>e||e===l&&a.every(R=>{if(R.colDef.suppressSizeToFit)return!0;const S=s?.[R.getId()],P=S?.minWidth??i?.defaultMinWidth,F=S?.maxWidth??i?.defaultMaxWidth,I=R.getActualWidth();return(P==null||I>=P)&&(F==null||I<=F)}))return;const h=[],f=[];for(const y of a){const R=i?.colKeys?.some(S=>Sc(y,S))??!0;y.getColDef().suppressSizeToFit||!R?f.push(y):h.push(y)}const p=h.slice(0);let m=!1;const v=y=>{Ro(h,y),f.push(y)},w={};for(const y of h){i?.onlyScaleUp&&(w[y.getColId()]=y.getActualWidth()),y.resetActualWidth(t);const R=s?.[y.getId()],S=R?.minWidth??i?.defaultMinWidth??-1/0,P=R?.maxWidth??i?.defaultMaxWidth??1/0,F=y.getActualWidth(),I=Math.max(Math.min(F,P),S);I!=F&&y.setActualWidth(I,t,!0)}for(;!m;){m=!0;const y=e-rr(f);if(y<=0)for(const R of h){const S=s?.[R.getId()]?.minWidth??i?.defaultMinWidth??R.minWidth;R.setActualWidth(S,t,!0)}else{const R=y/rr(h);let S=y;for(let P=h.length-1;P>=0;P--){const F=h[P],I=F.getColId(),L=w[I],V=s?.[I],G=V?.minWidth??i?.defaultMinWidth??L,_=V?.maxWidth??i?.defaultMaxWidth,A=Math.max(G??-1/0,F.getMinWidth()),T=Math.min(_??1/0,F.getMaxWidth());let k=Math.round(F.getActualWidth()*R);k<A?(k=A,v(F),m=!1):k>T?(k=T,v(F),m=!1):P===0&&(k=S),F.setActualWidth(k,t,!0),S-=k}}}for(const y of p)y.fireColumnWidthChangedEvent(t);const b=o.visibleCols;b.setLeftValues(t),b.updateBodyWidths(),!n&&(tl(this.eventSvc,p,!0,t),r&&Bc(o,!1))}applyAutosizeStrategy(){const{gos:e,colDelayRenderSvc:t}=this.beans,n=e.get("autoSizeStrategy");n?.type!=="fitGridWidth"&&n?.type!=="fitProvidedWidth"||setTimeout(()=>{if(!this.isAlive())return;const i=n.type;if(i==="fitGridWidth"){const{columnLimits:o,defaultMinWidth:r,defaultMaxWidth:s}=n,a=o?.map(({colId:l,minWidth:u,maxWidth:h})=>({key:l,minWidth:u,maxWidth:h}));this.sizeColumnsToFitGridBody({defaultMinWidth:r,defaultMaxWidth:s,columnLimits:a})}else i==="fitProvidedWidth"&&this.sizeColumnsToFit(n.width,"sizeColumnsToFit");t?.revealColumns(i)})}onFirstDataRendered({colIds:e,...t}){setTimeout(()=>{if(!this.isAlive())return;const n="autosizeColumns";e?this.autoSizeCols({...t,source:n,colKeys:e}):this.autoSizeAllColumns({...t,source:n}),this.beans.colDelayRenderSvc?.revealColumns(t.type)})}processResizeOperations(){this.shouldQueueResizeOperations=!1;for(const e of this.resizeOperationQueue)e();this.resizeOperationQueue=[]}pushResizeOperation(e){this.resizeOperationQueue.push(e)}destroy(){this.resizeOperationQueue.length=0,super.destroy()}};function T6(e,t,n={}){const i=n.minWidth??e.getMinWidth();t<i&&(t=i);const o=n.maxWidth??e.getMaxWidth();return t>o&&(t=o),t}function hx({ctrlsSvc:e,scrollVisibleSvc:t}){const n=e.getGridBodyCtrl(),o=n.isVerticalScrollShowing()?t.getScrollbarWidth():0;return hc(n.eGridBody)-o}var fx="ag-animate-autosize";function Bc({ctrlsSvc:e,gos:t},n){if(!t.get("animateColumnResizing")||t.get("enableRtl")||!e.isAlive())return;const i=e.getGridBodyCtrl().eGridBody.classList;n?i.add(fx):i.remove(fx)}var A6={moduleName:"ColumnAutoSize",version:ve,beans:[D6],apiFunctions:{sizeColumnsToFit:P6,autoSizeColumns:dx,autoSizeAllColumns:E6},dependsOn:[jR],css:[x6]};function I6(e,t){return!!e.colHover?.isHovered(t)}var M6=class extends X{constructor(e,t){super(),this.columns=e,this.element=t,this.destroyManagedListeners=[],this.enableFeature=n=>{const{beans:i,gos:o,element:r,columns:s}=this,a=i.colHover;if(n??!!o.get("columnHoverHighlight"))this.destroyManagedListeners=this.addManagedElementListeners(r,{mouseover:a.setMouseOver.bind(a,s),mouseout:a.clearMouseOver.bind(a)});else{for(const u of this.destroyManagedListeners)u();this.destroyManagedListeners=[]}}}postConstruct(){this.addManagedPropertyListener("columnHoverHighlight",({currentValue:e})=>{this.enableFeature(e)}),this.enableFeature()}destroy(){super.destroy(),this.destroyManagedListeners=null}},k6="ag-column-hover",L6=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,n){const i=()=>{const o=this.isHovered(n);t.toggleCss("ag-column-hover",o)};e.addManagedEventListeners({columnHoverChanged:i}),i()}onCellColumnHover(e,t){if(!t)return;const n=this.isHovered(e);t.toggleCss(k6,n)}addHeaderFilterColumnHoverListener(e,t,n,i){this.createHoverFeature(e,[n],i);const o=()=>{const r=this.isHovered(n);t.toggleCss("ag-column-hover",r)};e.addManagedEventListeners({columnHoverChanged:o}),o()}createHoverFeature(e,t,n){e.createManagedBean(new M6(t,n))}updateState(e){this.selectedColumns=e,this.eventSvc.dispatchEvent({type:"columnHoverChanged"})}},O6={moduleName:"ColumnHover",version:ve,beans:[L6],apiFunctions:{isColumnHovered:I6}},_6=class extends X{constructor(){super(...arguments),this.beanName="gridSerializer"}wireBeans(e){this.visibleCols=e.visibleCols,this.colModel=e.colModel,this.rowModel=e.rowModel,this.pinnedRowModel=e.pinnedRowModel}serialize(e,t={}){const{allColumns:n,columnKeys:i,skipRowGroups:o,exportRowNumbers:r}=t,s=this.getColumnsToExport({allColumns:n,skipRowGroups:o,columnKeys:i,exportRowNumbers:r});return[this.prepareSession(s),this.prependContent(t),this.exportColumnGroups(t,s),this.exportHeaders(t,s),this.processPinnedTopRows(t,s),this.processRows(t,s),this.processPinnedBottomRows(t,s),this.appendContent(t)].reduce((a,l)=>l(a),e).parse()}processRow(e,t,n,i){const o=t.shouldRowBeSkipped||(()=>!1),s=t.rowPositions!=null||!!t.onlySelected,a=this.gos.get("groupHideOpenParents")&&!s,l=this.colModel.isPivotMode()?i.leafGroup:!i.group,u=!!i.footer,h=i.allChildrenCount===1&&i.childrenAfterGroup?.length===1&&pO(this.gos,i);if(!l&&!u&&(t.skipRowGroups||h||a)||t.onlySelected&&!i.isSelected()||t.skipPinnedTop&&i.rowPinned==="top"||t.skipPinnedBottom&&i.rowPinned==="bottom"||i.stub||i.level===-1&&!l&&!u||o(We(this.gos,{node:i})))return;const m=e.onNewBodyRow(i);if(n.forEach((v,w)=>{m.onColumn(v,w,i)}),t.getCustomContentBelowRow){const v=t.getCustomContentBelowRow(We(this.gos,{node:i}));v&&e.addCustomContent(v)}}appendContent(e){return t=>{const n=e.appendContent;return n&&t.addCustomContent(n),t}}prependContent(e){return t=>{const n=e.prependContent;return n&&t.addCustomContent(n),t}}prepareSession(e){return t=>(t.prepare(e),t)}exportColumnGroups(e,t){return n=>{if(!e.skipColumnGroupHeaders){const i=new QR,{colGroupSvc:o}=this.beans,r=o?o.createColumnGroups({columns:t,idCreator:i,pinned:null,isStandaloneStructure:!0}):t;this.recursivelyAddHeaderGroups(r,n,e.processGroupHeaderCallback)}return n}}exportHeaders(e,t){return n=>{if(!e.skipColumnHeaders){const i=n.onNewHeaderRow();t.forEach((o,r)=>{i.onColumn(o,r,void 0)})}return n}}processPinnedTopRows(e,t){return n=>{const i=this.processRow.bind(this,n,e,t);return e.rowPositions?e.rowPositions.filter(o=>o.rowPinned==="top").sort((o,r)=>o.rowIndex-r.rowIndex).map(o=>this.pinnedRowModel?.getPinnedTopRow(o.rowIndex)).forEach(i):this.pinnedRowModel?.isManual()||this.pinnedRowModel?.forEachPinnedRow("top",i),n}}processRows(e,t){return n=>{const i=this.rowModel,o=Yt(this.gos),r=wc(this.gos),s=!o&&e.onlySelected,a=this.processRow.bind(this,n,e,t),{exportedRows:l="filteredAndSorted"}=e;if(e.rowPositions)e.rowPositions.filter(u=>u.rowPinned==null).sort((u,h)=>u.rowIndex-h.rowIndex).map(u=>i.getRow(u.rowIndex)).forEach(a);else if(this.colModel.isPivotMode())o?i.forEachPivotNode(a,!0,l==="filteredAndSorted"):r?i.forEachNodeAfterFilterAndSort(a,!0):i.forEachNode(a);else if(e.onlySelectedAllPages||s){const u=this.beans.selectionSvc?.getSelectedNodes()??[];this.replicateSortedOrder(u),u.forEach(a)}else l==="all"?i.forEachNode(a):o||r?i.forEachNodeAfterFilterAndSort(a,!0):i.forEachNode(a);return n}}replicateSortedOrder(e){const{sortSvc:t,rowNodeSorter:n}=this.beans;if(!t||!n)return;const i=t.getSortOptions(),o=(r,s)=>r.rowIndex!=null&&s.rowIndex!=null?r.rowIndex-s.rowIndex:r.level===s.level?r.parent?.id===s.parent?.id?n.compareRowNodes(i,r,s)||(r.rowIndex??-1)-(s.rowIndex??-1):o(r.parent,s.parent):r.level>s.level?o(r.parent,s):o(r,s.parent);e.sort(o)}processPinnedBottomRows(e,t){return n=>{const i=this.processRow.bind(this,n,e,t);return e.rowPositions?e.rowPositions.filter(o=>o.rowPinned==="bottom").sort((o,r)=>o.rowIndex-r.rowIndex).map(o=>this.pinnedRowModel?.getPinnedBottomRow(o.rowIndex)).forEach(i):this.pinnedRowModel?.isManual()||this.pinnedRowModel?.forEachPinnedRow("bottom",i),n}}getColumnsToExport(e){const{allColumns:t=!1,skipRowGroups:n=!1,exportRowNumbers:i=!1,columnKeys:o}=e,{colModel:r,gos:s,visibleCols:a}=this,l=r.isPivotMode(),u=p=>Wr(p)?!1:!zn(p)||i;if(o?.length)return r.getColsForKeys(o).filter(u);const h=s.get("treeData");let f=[];return t&&!l?f=r.getCols():f=a.allCols,f=f.filter(p=>u(p)&&(n&&!h?!Og(p):!0)),f}recursivelyAddHeaderGroups(e,t,n){const i=[];for(const o of e){const r=o;if(r.getChildren)for(const s of r.getChildren()??[])i.push(s)}e.length>0&&Zt(e[0])&&this.doAddHeaderHeader(t,e,n),i&&i.length>0&&this.recursivelyAddHeaderGroups(i,t,n)}doAddHeaderHeader(e,t,n){const i=e.onNewHeaderGroupingRow();let o=0;for(const r of t){const s=r;let a;n?a=n(We(this.gos,{columnGroup:s})):a=this.beans.colNames.getDisplayNameForColumnGroup(s,"header");const u=(s.isExpandable()?s.getLeafColumns():[]).reduce((h,f,p,m)=>{let v=Pt(h);return f.getColumnGroupShow()==="open"?(!v||v[1]!=null)&&(v=[p],h.push(v)):v&&v[1]==null&&(v[1]=p-1),p===m.length-1&&v&&v[1]==null&&(v[1]=p),h},[]);i.onColumn(s,a||"",o++,s.getLeafColumns().length-1,u)}}},N6={moduleName:"SharedExport",version:ve,beans:[_6]},B6=class extends X{getFileName(e){const t=this.getDefaultFileExtension();return e?.length||(e=this.getDefaultFileName()),e.includes(".")?e:`${e}.${t}`}getData(e){return this.beans.gridSerializer.serialize(this.createSerializingSession(e),e)}getDefaultFileName(){return`export.${this.getDefaultFileExtension()}`}};function G6(e,t){const n=document.defaultView||window;if(!n){se(52);return}const i=document.createElement("a"),o=n.URL.createObjectURL(t);i.setAttribute("href",o),i.setAttribute("download",e),i.style.display="none",document.body.appendChild(i),i.dispatchEvent(new MouseEvent("click",{bubbles:!1,cancelable:!0,view:n})),i.remove(),n.setTimeout(()=>{n.URL.revokeObjectURL(o)},0)}var H6=class{constructor(e){this.valueFrom="data";const{colModel:t,rowGroupColsSvc:n,colNames:i,valueSvc:o,gos:r,processCellCallback:s,processHeaderCallback:a,processGroupHeaderCallback:l,processRowGroupCallback:u,valueFrom:h}=e;this.colModel=t,this.rowGroupColsSvc=n,this.colNames=i,this.valueSvc=o,this.gos=r,this.processCellCallback=s,this.processHeaderCallback=a,this.processGroupHeaderCallback=l,this.processRowGroupCallback=u,h&&(this.valueFrom=h)}prepare(e){}extractHeaderValue(e){return this.getHeaderName(this.processHeaderCallback,e)??""}extractRowCellValue(e){const{column:t,node:n,currentColumnIndex:i,accumulatedRowIndex:o,type:r,useRawFormula:s}=e,a=i===0&&h0(this.gos,n,this.colModel.isPivotMode());if(this.processRowGroupCallback&&(this.gos.get("treeData")||n.group)&&(t.isRowGroupDisplayed(n.rowGroupColumn?.getColId()??"")||a))return{value:this.processRowGroupCallback(We(this.gos,{column:t,node:n}))??""};if(this.processCellCallback)return{value:this.processCellCallback(We(this.gos,{accumulatedRowIndex:o,column:t,node:n,value:this.valueSvc.getValueForDisplay({column:t,node:n,from:this.valueFrom}).value,type:r,parseValue:v=>this.valueSvc.parseValue(t,n,v,this.valueSvc.getValue(t,n,this.valueFrom)),formatValue:v=>this.valueSvc.formatValue(t,n,v)??v}))??""};const l=this.gos.get("treeData"),u=this.valueSvc,h=n.level===-1&&n.footer,f=t.colDef.showRowGroup===!0&&(n.group||l);if(!h&&(a||f)){let v="",w=n;for(;w&&w.level!==-1;){const{value:b,valueFormatted:y}=u.getValueForDisplay({column:a?void 0:t,node:w,includeValueFormatted:!0,exporting:!0,from:this.valueFrom});v=` -> ${y??b??""}${v}`,w=w.parent}return{value:v,valueFormatted:v}}const{value:p,valueFormatted:m}=u.getValueForDisplay({column:t,node:n,includeValueFormatted:!0,exporting:!0,useRawFormula:s,from:this.valueFrom});return{value:p??"",valueFormatted:m}}getHeaderName(e,t){return e?e(We(this.gos,{column:t})):this.colNames.getDisplayNameForColumn(t,"csv",!0)}},px=`\r
|
|
63
|
-
`,V6=class extends H6{constructor(e){super(e),this.config=e,this.isFirstLine=!0,this.result="";const{suppressQuotes:t,columnSeparator:n}=e;this.suppressQuotes=t,this.columnSeparator=n}addCustomContent(e){e&&(typeof e=="string"?(/^\s*\n/.test(e)||this.beginNewLine(),e=e.replace(/\r?\n/g,px),this.result+=e):e.forEach(t=>{this.beginNewLine(),t.forEach((n,i)=>{i!==0&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(n.data.value||""),n.mergeAcross&&this.appendEmptyCells(n.mergeAcross)})}))}onNewHeaderGroupingRow(){return this.beginNewLine(),{onColumn:this.onNewHeaderGroupingRowColumn.bind(this)}}onNewHeaderGroupingRowColumn(e,t,n,i){n!=0&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(t),this.appendEmptyCells(i)}appendEmptyCells(e){for(let t=1;t<=e;t++)this.result+=this.columnSeparator+this.putInQuotes("")}onNewHeaderRow(){return this.beginNewLine(),{onColumn:this.onNewHeaderRowColumn.bind(this)}}onNewHeaderRowColumn(e,t){t!=0&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(this.extractHeaderValue(e))}onNewBodyRow(){return this.beginNewLine(),{onColumn:this.onNewBodyRowColumn.bind(this)}}onNewBodyRowColumn(e,t,n){t!=0&&(this.result+=this.columnSeparator);const i=this.extractRowCellValue({column:e,node:n,currentColumnIndex:t,accumulatedRowIndex:t,type:"csv",useRawFormula:!1});this.result+=this.putInQuotes(i.valueFormatted??i.value)}putInQuotes(e){if(this.suppressQuotes)return e;if(e==null)return'""';let t;return typeof e=="string"?t=e:typeof e.toString=="function"?t=e.toString():(se(53),t=""),'"'+t.replace(/"/g,'""')+'"'}parse(){return this.result}beginNewLine(){this.isFirstLine||(this.result+=px),this.isFirstLine=!1}},W6=class extends B6{constructor(){super(...arguments),this.beanName="csvCreator"}getMergedParams(e){const t=this.gos.get("defaultCsvExportParams");return Object.assign({},t,e)}export(e){if(this.isExportSuppressed()){se(51);return}const t=()=>{const i=this.getMergedParams(e),o=this.getData(i),r=new Blob(["\uFEFF",o],{type:"text/plain"}),s=i.fileName,a=typeof s=="function"?s(We(this.gos,{})):s;G6(this.getFileName(a),r)},{overlays:n}=this.beans;n?n.showExportOverlay(t):t()}exportDataAsCsv(e){this.export(e)}getDataAsCsv(e,t=!1){const n=t?Object.assign({},e):this.getMergedParams(e);return this.getData(n)}getDefaultFileExtension(){return"csv"}createSerializingSession(e){const{colModel:t,colNames:n,rowGroupColsSvc:i,valueSvc:o,gos:r}=this.beans,{processCellCallback:s,processHeaderCallback:a,processGroupHeaderCallback:l,processRowGroupCallback:u,suppressQuotes:h,columnSeparator:f,valueFrom:p}=e;return new V6({colModel:t,colNames:n,valueSvc:o,gos:r,processCellCallback:s||void 0,processHeaderCallback:a||void 0,processGroupHeaderCallback:l||void 0,processRowGroupCallback:u||void 0,suppressQuotes:h||!1,columnSeparator:f||",",rowGroupColsSvc:i,valueFrom:p})}isExportSuppressed(){return this.gos.get("suppressCsvExport")}};function z6(e,t){return e.csvCreator?.getDataAsCsv(t)}function U6(e,t){e.csvCreator?.exportDataAsCsv(t)}var $6={moduleName:"CsvExport",version:ve,beans:[W6],apiFunctions:{getDataAsCsv:z6,exportDataAsCsv:U6},dependsOn:[N6]},gx=class extends Vn{constructor(e,t){super(),this.ctrl=e,t&&(this.beans=t)}postConstruct(){this.refreshTooltip()}setBrowserTooltip(e,t){const n="title",i=this.ctrl.getGui();i&&(e!=null&&(e!=""||t)?i.setAttribute(n,e):i.removeAttribute(n))}updateTooltipText(){const{getTooltipValue:e}=this.ctrl;e&&(this.tooltip=e())}createTooltipFeatureIfNeeded(){if(this.tooltipManager==null){const e=this.beans.registry.createDynamicBean("tooltipStateManager",!0,this.ctrl,()=>this.tooltip);e&&(this.tooltipManager=this.createBean(e,this.beans.context))}}attemptToShowTooltip(){this.tooltipManager?.prepareToShowTooltip()}attemptToHideTooltip(){this.tooltipManager?.hideTooltip()}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()}},j6=1e3,K6=1e3,mx=100,vx,Fh=!1,q6=class extends Vn{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}postConstruct(){this.gos.get("tooltipInteraction")&&(this.interactionEnabled=!0),this.tooltipTrigger=this.getTooltipTrigger(),this.tooltipMouseTrack=this.gos.get("tooltipMouseTrack");const e=this.tooltipCtrl.getGui();this.tooltipTrigger===0&&this.addManagedListeners(e,{mouseenter:this.onMouseEnter.bind(this),mouseleave:this.onMouseLeave.bind(this)}),this.tooltipTrigger===1&&this.addManagedListeners(e,{focusin:this.onFocusIn.bind(this),focusout:this.onFocusOut.bind(this)}),this.addManagedListeners(e,{mousemove:this.onMouseMove.bind(this)}),this.interactionEnabled||this.addManagedListeners(e,{mousedown:this.onMouseDown.bind(this),keydown:this.onKeyDown.bind(this)})}getGridOptionsTooltipDelay(e){const t=this.gos.get(e);return Math.max(200,t)}getTooltipDelay(e){return this.tooltipCtrl[`getTooltip${e}DelayOverride`]?.()??this.getGridOptionsTooltipDelay(`tooltip${e}Delay`)}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()),!Ns()&&(Fh?this.showTooltipTimeoutId=window.setTimeout(()=>{this.prepareToShowTooltip(e)},mx):this.prepareToShowTooltip(e))}onMouseMove(e){this.lastMouseEvent&&(this.lastMouseEvent=e),this.tooltipMouseTrack&&this.state===2&&this.tooltipComp&&this.positionTooltip()}onMouseDown(){this.setToDoNothing()}onMouseLeave(){this.interactionEnabled?this.lockService():this.setToDoNothing()}onFocusIn(){this.prepareToShowTooltip()}onFocusOut(e){const t=e.relatedTarget,n=this.tooltipCtrl.getGui(),i=this.tooltipComp?.getGui();this.isInteractingWithTooltip||n.contains(t)||this.interactionEnabled&&i?.contains(t)||this.setToDoNothing()}onKeyDown(){this.isInteractingWithTooltip&&(this.isInteractingWithTooltip=!1),this.setToDoNothing()}prepareToShowTooltip(e){if(this.state!=0||Fh)return;let t=0;e&&(t=this.isLastTooltipHiddenRecently()?this.getTooltipDelay("SwitchShow"):this.getTooltipDelay("Show")),this.lastMouseEvent=e||null,this.showTooltipTimeoutId=window.setTimeout(this.showTooltip.bind(this),t),this.state=1}isLastTooltipHiddenRecently(){return Date.now()-vx<j6}setToDoNothing(e){!e&&this.state===2&&this.hideTooltip(),this.onBodyScrollEventCallback&&(this.onBodyScrollEventCallback(),this.onBodyScrollEventCallback=void 0),this.clearEventHandlers(),this.onDocumentKeyDownCallback&&(this.onDocumentKeyDownCallback(),this.onDocumentKeyDownCallback=void 0),this.clearTimeouts(),this.state=0,this.lastMouseEvent=null}showTooltip(){const e=this.getTooltipValue(),t=this.tooltipCtrl;if(!we(e)||t.shouldDisplayTooltip&&!t.shouldDisplayTooltip()){this.setToDoNothing();return}const n=this.gos.addCommon({location:t.getLocation?.()??"UNKNOWN",value:e,hideTooltipCallback:()=>this.hideTooltip(!0),...t.getAdditionalParams?.()});this.state=2,this.tooltipInstanceCount++;const i=this.newTooltipComponentCallback.bind(this,this.tooltipInstanceCount);this.createTooltipComp(n,i)}hideTooltip(e){!e&&this.isInteractingWithTooltip||(this.tooltipComp&&(this.destroyTooltipComp(),vx=Date.now()),this.eventSvc.dispatchEvent({type:"tooltipHide",parentGui:this.tooltipCtrl.getGui()}),e&&(this.isInteractingWithTooltip=!1),this.setToDoNothing(!0))}newTooltipComponentCallback(e,t){if(this.state!==2||this.tooltipInstanceCount!==e){this.destroyBean(t);return}const i=t.getGui();this.tooltipComp=t,i.classList.contains("ag-tooltip")||i.classList.add("ag-tooltip-custom"),this.tooltipTrigger===0&&i.classList.add("ag-tooltip-animate"),this.interactionEnabled&&i.classList.add("ag-tooltip-interactive");const o=this.getLocaleTextFunc(),r=this.popupSvc?.addPopup({eChild:i,ariaLabel:o("ariaLabelTooltip","Tooltip")});if(r&&(this.tooltipPopupDestroyFunc=r.hideFunc),this.positionTooltip(),this.tooltipTrigger===1){const s=()=>this.setToDoNothing();[this.onBodyScrollEventCallback]=this.addManagedEventListeners({bodyScroll:s}),this.setEventHandlers(s)}this.interactionEnabled&&([this.tooltipMouseEnterListener,this.tooltipMouseLeaveListener]=this.addManagedElementListeners(i,{mouseenter:this.onTooltipMouseEnter.bind(this),mouseleave:this.onTooltipMouseLeave.bind(this)}),[this.onDocumentKeyDownCallback]=this.addManagedElementListeners(nn(this.beans),{keydown:s=>{i.contains(s?.target)||this.onKeyDown()}}),this.tooltipTrigger===1&&([this.tooltipFocusInListener,this.tooltipFocusOutListener]=this.addManagedElementListeners(i,{focusin:this.onTooltipFocusIn.bind(this),focusout:this.onTooltipFocusOut.bind(this)}))),this.eventSvc.dispatchEvent({type:"tooltipShow",tooltipGui:i,parentGui:this.tooltipCtrl.getGui()}),this.startHideTimeout()}onTooltipMouseEnter(){this.isInteractingWithTooltip=!0,this.unlockService()}onTooltipMouseLeave(){this.isTooltipFocused()||(this.isInteractingWithTooltip=!1,this.lockService())}onTooltipFocusIn(){this.isInteractingWithTooltip=!0}isTooltipFocused(){const e=this.tooltipComp?.getGui(),t=It(this.beans);return!!e&&e.contains(t)}onTooltipFocusOut(e){const t=this.tooltipCtrl.getGui();this.isTooltipFocused()||(this.isInteractingWithTooltip=!1,t.contains(e.relatedTarget)?this.startHideTimeout():this.hideTooltip())}positionTooltip(){const e={type:"tooltip",ePopup:this.tooltipComp.getGui(),nudgeY:18,skipObserver:this.tooltipMouseTrack};this.lastMouseEvent?this.popupSvc?.positionPopupUnderMouseEvent({...e,mouseEvent:this.lastMouseEvent}):this.popupSvc?.positionPopupByComponent({...e,eventSource:this.tooltipCtrl.getGui(),position:"under",keepWithinBounds:!0,nudgeY:5})}destroyTooltipComp(){this.tooltipComp.getGui().classList.add("ag-tooltip-hiding");const e=this.tooltipPopupDestroyFunc,t=this.tooltipComp,n=this.tooltipTrigger===0?K6:0;window.setTimeout(()=>{e(),this.destroyBean(t)},n),this.clearTooltipListeners(),this.tooltipPopupDestroyFunc=void 0,this.tooltipComp=void 0}clearTooltipListeners(){for(const e of[this.tooltipMouseEnterListener,this.tooltipMouseLeaveListener,this.tooltipFocusInListener,this.tooltipFocusOutListener])e&&e();this.tooltipMouseEnterListener=this.tooltipMouseLeaveListener=this.tooltipFocusInListener=this.tooltipFocusOutListener=null}lockService(){Fh=!0,this.interactiveTooltipTimeoutId=window.setTimeout(()=>{this.unlockService(),this.setToDoNothing()},mx)}unlockService(){Fh=!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()}},Q6=class extends gx{constructor(e,t,n){super(e,n),this.highlightTracker=t,this.onHighlight=this.onHighlight.bind(this)}postConstruct(){super.postConstruct(),this.wireHighlightListeners()}wireHighlightListeners(){this.addManagedPropertyListener("tooltipTrigger",({currentValue:e})=>{this.setTooltipMode(e)}),this.setTooltipMode(this.gos.get("tooltipTrigger")),this.highlightTracker.addEventListener("itemHighlighted",this.onHighlight)}onHighlight(e){this.tooltipMode===1&&(e.highlighted?this.attemptToShowTooltip():this.attemptToHideTooltip())}setTooltipMode(e="focus"){this.tooltipMode=e==="focus"?1:0}destroy(){this.highlightTracker.removeEventListener("itemHighlighted",this.onHighlight),super.destroy()}},Y6=class extends Qg{constructor(){super({tag:"div",cls:"ag-tooltip"})}init(e){const{value:t}=e,n=this.getGui();n.textContent=_a(t);const i=e.location.replace(/([a-z])([A-Z0-9])/g,"$1-$2").toLowerCase();n.classList.add(`ag-${i}-tooltip`)}},Z6=".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),&:where(.ag-cell-formula-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}}",xh=0,X6=200,J6=class extends Vn{constructor(){super(...arguments),this.beanName="popupSvc",this.popupList=[]}postConstruct(){this.addManagedEventListeners({stylesChanged:this.handleThemeChange.bind(this)})}getPopupParent(){const e=this.gos.get("popupParent");return e||this.getDefaultPopupParent()}positionPopupUnderMouseEvent(e){const{ePopup:t,nudgeX:n,nudgeY:i,skipObserver:o}=e;this.positionPopup({ePopup:t,nudgeX:n,nudgeY:i,keepWithinBounds:!0,skipObserver:o,updatePosition:()=>this.calculatePointerAlign(e.mouseEvent),postProcessCallback:()=>this.callPostProcessPopup(e.additionalParams,e.type,e.ePopup,null,e.mouseEvent)})}calculatePointerAlign(e){const t=this.getParentRect();return{x:e.clientX-t.left,y:e.clientY-t.top}}positionPopupByComponent(e){const{ePopup:t,nudgeX:n,nudgeY:i,keepWithinBounds:o,eventSource:r,alignSide:s="left",position:a="over",type:l}=e,u=r.getBoundingClientRect(),h=this.getParentRect();this.setAlignedTo(r,t);const f=()=>{let p=u.left-h.left;s==="right"&&(p-=t.offsetWidth-u.width);let m;return a==="over"?(m=u.top-h.top,this.setAlignedStyles(t,"over")):(this.setAlignedStyles(t,"under"),this.shouldRenderUnderOrAbove(t,u,h,e.nudgeY||0)==="under"?m=u.top-h.top+u.height:m=u.top-t.offsetHeight-(i||0)*2-h.top),{x:p,y:m}};this.positionPopup({ePopup:t,nudgeX:n,nudgeY:i,keepWithinBounds:o,updatePosition:f,postProcessCallback:()=>this.callPostProcessPopup(e.additionalParams,l,t,r,null)})}positionPopupForMenu(e){const{eventSource:t,ePopup:n,event:i}=e,o=t.getBoundingClientRect(),r=this.getParentRect();this.setAlignedTo(t,n);let s=!1;const a=()=>{const l=this.keepXYWithinBounds(n,o.top-r.top,0),u=n.clientWidth>0?n.clientWidth:200;s||(n.style.minWidth=`${u}px`,s=!0);const f=r.right-r.left-u;let p;return this.gos.get("enableRtl")?(p=v(),p<0&&(p=m(),this.setAlignedStyles(n,"left")),p>f&&(p=0,this.setAlignedStyles(n,"right"))):(p=m(),p>f&&(p=v(),this.setAlignedStyles(n,"right")),p<0&&(p=0,this.setAlignedStyles(n,"left"))),{x:p,y:l};function m(){return o.right-r.left-2}function v(){return o.left-r.left-u}};this.positionPopup({ePopup:n,keepWithinBounds:!0,updatePosition:a,postProcessCallback:()=>this.callPostProcessPopup(e.additionalParams,"subMenu",n,t,i instanceof MouseEvent?i:void 0)})}shouldRenderUnderOrAbove(e,t,n,i){const o=n.bottom-t.bottom,r=t.top-n.top,s=e.offsetHeight+i;return o>s?"under":r>s||r>o?"above":"under"}setAlignedStyles(e,t){const n=this.getPopupIndex(e);if(n===-1)return;const i=this.popupList[n],{alignedToElement:o}=i;if(!o)return;const r=["right","left","over","above","under"];for(const s of r)o.classList.remove(`ag-has-popup-positioned-${s}`),e.classList.remove(`ag-popup-positioned-${s}`);t&&(o.classList.add(`ag-has-popup-positioned-${t}`),e.classList.add(`ag-popup-positioned-${t}`))}setAlignedTo(e,t){const n=this.getPopupIndex(t);if(n!==-1){const i=this.popupList[n];i.alignedToElement=e}}positionPopup(e){const{ePopup:t,keepWithinBounds:n,nudgeX:i,nudgeY:o,skipObserver:r,updatePosition:s}=e,a={width:0,height:0},l=(u=!1)=>{let{x:h,y:f}=s();u&&t.clientWidth===a.width&&t.clientHeight===a.height||(a.width=t.clientWidth,a.height=t.clientHeight,i&&(h+=i),o&&(f+=o),n&&(h=this.keepXYWithinBounds(t,h,1),f=this.keepXYWithinBounds(t,f,0)),t.style.left=`${h}px`,t.style.top=`${f}px`,e.postProcessCallback&&e.postProcessCallback())};if(l(),!r){const u=_r(this.beans,t,()=>l(!0));setTimeout(()=>u(),X6)}}getParentRect(){const e=nn(this.beans);let t=this.getPopupParent();return t===e.body?t=e.documentElement:getComputedStyle(t).position==="static"&&(t=t.offsetParent),_S(t)}keepXYWithinBounds(e,t,n){const i=n===0,o=i?"clientHeight":"clientWidth",r=i?"top":"left",s=i?"height":"width",a=i?"scrollTop":"scrollLeft",l=nn(this.beans),u=l.documentElement,h=this.getPopupParent(),f=e.getBoundingClientRect(),p=h.getBoundingClientRect(),m=l.documentElement.getBoundingClientRect(),v=h===l.body,w=Math.ceil(f[s]);let y=v?(i?OS:Pd)(u)+u[a]:h[o];v&&(y-=Math.abs(m[r]-p[r]));const R=y-w;return Math.min(Math.max(t,0),Math.max(R,0))}addPopup(e){const{eChild:t,ariaLabel:n,ariaOwns:i,alwaysOnTop:o,positionCallback:r,anchorToElement:s}=e,a=this.getPopupIndex(t);if(a!==-1)return{hideFunc:this.popupList[a].hideFunc};this.initialisePopupPosition(t);const l=this.createPopupWrapper(t,!!o,n,i),u=this.addEventListenersToPopup({...e,wrapperEl:l});return r&&r(),this.addPopupToPopupList(t,l,u,s),{hideFunc:u}}initialisePopupPosition(e){const n=this.getPopupParent().getBoundingClientRect();we(e.style.top)||(e.style.top=`${n.top*-1}px`),we(e.style.left)||(e.style.left=`${n.left*-1}px`)}createPopupWrapper(e,t,n,i){const o=this.getPopupParent(),{environment:r,gos:s}=this.beans,a=Ms({tag:"div"});return r.applyThemeClasses(a),a.classList.add("ag-popup"),e.classList.add(s.get("enableRtl")?"ag-rtl":"ag-ltr","ag-popup-child"),e.hasAttribute("role")||Or(e,"dialog"),n?Na(e,n):i&&(e.id||(e.id=`popup-component-${xh}`),kS(i,e.id)),a.appendChild(e),o.appendChild(a),t?this.setAlwaysOnTop(e,!0):this.bringPopupToFront(e),a}addEventListenersToPopup(e){const t=this.beans,n=nn(t),{wrapperEl:i,eChild:o,closedCallback:r,afterGuiAttached:s,closeOnEsc:a,modal:l,ariaOwns:u}=e;let h=!1;const f=w=>{if(!i.contains(It(t)))return;w.key===q.ESCAPE&&!this.isStopPropagation(w)&&v({keyboardEvent:w})},p=w=>v({mouseEvent:w}),m=w=>v({touchEvent:w}),v=(w={})=>{const{mouseEvent:b,touchEvent:y,keyboardEvent:R,forceHide:S}=w;!S&&(this.isEventFromCurrentPopup({mouseEvent:b,touchEvent:y},o)||h)||(h=!0,i.remove(),n.removeEventListener("keydown",f),n.removeEventListener("mousedown",p),n.removeEventListener("touchstart",m),n.removeEventListener("contextmenu",p),this.eventSvc.removeListener("dragStarted",p),r&&r(b||y||R),this.removePopupFromPopupList(o,u))};return s&&s({hidePopup:v}),window.setTimeout(()=>{a&&n.addEventListener("keydown",f),l&&(n.addEventListener("mousedown",p),this.eventSvc.addListener("dragStarted",p),n.addEventListener("touchstart",m),n.addEventListener("contextmenu",p))},0),v}addPopupToPopupList(e,t,n,i){this.popupList.push({element:e,wrapper:t,hideFunc:n,instanceId:xh,isAnchored:!!i}),i&&this.setPopupPositionRelatedToElement(e,i),xh=xh+1}getPopupIndex(e){return this.popupList.findIndex(t=>t.element===e)}setPopupPositionRelatedToElement(e,t){const n=this.getPopupIndex(e);if(n===-1)return;const i=this.popupList[n];if(i.stopAnchoringPromise&&i.stopAnchoringPromise.then(r=>r&&r()),i.stopAnchoringPromise=void 0,i.isAnchored=!1,!t)return;const o=this.keepPopupPositionedRelativeTo({element:t,ePopup:e,hidePopup:i.hideFunc});return i.stopAnchoringPromise=o,i.isAnchored=!0,o}removePopupFromPopupList(e,t){this.setAlignedStyles(e,null),this.setPopupPositionRelatedToElement(e,null),t&&kS(t,null),this.popupList=this.popupList.filter(n=>n.element!==e)}keepPopupPositionedRelativeTo(e){const t=this.getPopupParent(),n=t.getBoundingClientRect(),{element:i,ePopup:o}=e,r=i.getBoundingClientRect(),s=f=>Number.parseInt(f.substring(0,f.length-1),10),a=(f,p)=>{const m=n[f]-r[f],v=s(o.style[f]);return{initialDiff:m,lastDiff:m,initial:v,last:v,direction:p}},l=a("top",0),u=a("left",1),h=this.beans.frameworkOverrides;return new Mt(f=>{h.wrapIncoming(()=>{e_(()=>{const p=t.getBoundingClientRect(),m=i.getBoundingClientRect();if(m.top==0&&m.left==0&&m.height==0&&m.width==0){e.hidePopup();return}const w=(b,y)=>{const R=s(o.style[y]);b.last!==R&&(b.initial=R,b.last=R);const S=p[y]-m[y];if(S!=b.lastDiff){const P=this.keepXYWithinBounds(o,b.initial+b.initialDiff-S,b.direction);o.style[y]=`${P}px`,b.last=P}b.lastDiff=S};w(l,"top"),w(u,"left")},200).then(p=>{f(()=>{p!=null&&window.clearInterval(p)})})},"popupPositioning")})}isEventFromCurrentPopup(e,t){const{mouseEvent:n,touchEvent:i}=e,o=n||i;if(!o)return!1;const r=this.getPopupIndex(t);if(r===-1)return!1;for(let s=r;s<this.popupList.length;s++){const a=this.popupList[s];if(TL(a.element,o))return!0}return this.isElementWithinCustomPopup(o.target)}isElementWithinCustomPopup(e){const t=nn(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 n=this.getWrapper(e);n&&(n.classList.toggle("ag-always-on-top",!!t),t&&this.bringPopupToFront(n))}bringPopupToFront(e){const t=this.getPopupParent(),n=Array.prototype.slice.call(t.querySelectorAll(".ag-popup")),i=n.length,o=this.getWrapper(e);if(!o||i<=1||!t.contains(e))return;const r=[],s=[];for(const p of n)p!==o&&(p.classList.contains("ag-always-on-top")?s.push(p):r.push(p));const a=[],l=s.length,f=o.classList.contains("ag-always-on-top")||!l?[...r,...s,o]:[...r,o,...s];for(let p=0;p<=i;p++){const m=f[p];if(n[p]===f[p]||m===o)continue;const v=m.querySelectorAll("div");for(const w of v)w.scrollTop!==0&&a.push([w,w.scrollTop]);p===0?t.prepend(m):f[p-1].after(m)}for(;a.length;){const p=a.pop();p[0].scrollTop=p[1]}}handleThemeChange(e){if(e.themeChanged){const t=this.beans.environment;for(const n of this.popupList)t.applyThemeClasses(n.wrapper)}}},ez=class extends J6{getDefaultPopupParent(){return this.beans.ctrlsSvc.get("gridCtrl").getGui()}callPostProcessPopup(e,t,n,i,o){const r=this.gos.getCallback("postProcessPopup");if(r){const{column:s,rowNode:a}=e??{};r({column:s,rowNode:a,ePopup:n,type:t,eventSource:i,mouseEvent:o})}}getActivePopups(){return this.popupList.map(e=>e.element)}hasAnchoredPopup(){return this.popupList.some(e=>e.isAnchored)}isStopPropagation(e){return sr(e)}},Ph={moduleName:"Popup",version:ve,beans:[ez]};function rv(e){return e.get("tooltipShowMode")==="whenTruncated"}var tz=(e,t)=>{const n=e;return typeof n.getTranslatedMessage=="function"?n.getTranslatedMessage(t):e.message},sv=(e,t,n)=>{const{editModelSvc:i}=e,o=i?.getCellValidationModel()?.getCellValidation(t)?.errorMessages,r=i?.getRowValidationModel().getRowValidation(t)?.errorMessages,s=o||r;return s?.length?s.join(n("tooltipValidationErrorSeparator",". ")):void 0},nz=(e,t)=>{if(rv(e.gos)){if(t.isCellRenderer()){const i=t.column.getColDef();return!!i.showRowGroup||i.cellRenderer==="agGroupCellRenderer"?pc(()=>{const r=t.eGui;return r.querySelector(".ag-group-value")||r.querySelector(".ag-cell-value")||r}):void 0}return pc(()=>{const i=t.eGui;return i.children.length===0?i:i.querySelector(".ag-cell-value")})}},iz=(e,t,n)=>{const{editSvc:i}=e,{column:o}=t,r=nz(e,t),s=()=>i?.isEditing(t)?!1:r?o.isTooltipEnabled()?r():!1:!0;return{shouldDisplayDefault:s,shouldDisplayColumnTooltip:s,shouldDisplayCustomTooltip:n??s}},oz=({beans:e,ctrl:t,value:n,displayFunctions:i,translate:o})=>{const{editSvc:r,formula:s,gos:a}=e,{column:l,rowNode:u}=t;if(s?.active&&l.isAllowFormula()){const b=s.getFormulaError(l,u);if(b)return{value:tz(b,o),location:"cellFormula",shouldDisplay:()=>!!s?.getFormulaError(l,u)}}if(!!!r?.isEditing(t)){const b=sv(e,t,o);if(b)return{value:b,location:"cellEditor",shouldDisplay:()=>!r?.isEditing(t)&&!!sv(e,t,o)}}const{shouldDisplayCustomTooltip:f,shouldDisplayColumnTooltip:p}=i;if(n!=null)return{value:n,location:"cell",shouldDisplay:f};const m=l.getColDef(),v=u.data;if(m.tooltipField&&we(v))return{value:Mc(v,m.tooltipField,l.isTooltipFieldContainsDots()),location:"cell",shouldDisplay:p};const w=m.tooltipValueGetter;return w?{value:w(We(a,{location:"cell",colDef:l.getColDef(),column:l,rowIndex:t.cellPosition.rowIndex,node:u,data:u.data,value:t.value,valueFormatted:t.valueFormatted})),location:"cell",shouldDisplay:p}:null},rz=class extends X{constructor(){super(...arguments),this.beanName="tooltipSvc"}setupHeaderTooltip(e,t,n,i){e&&t.destroyBean(e);const o=this.gos,r=rv(o),{column:s,eGui:a}=t,l=s.getColDef();!i&&r&&!l.headerComponent&&(i=pc(()=>a.querySelector(".ag-header-cell-text")));const u="header",f=this.beans.colNames.getDisplayNameForColumn(s,"header",!0),p=n??f,m={getGui:()=>a,getLocation:()=>u,getTooltipValue:()=>n??l?.headerTooltipValueGetter?.(We(o,{location:u,colDef:l,column:s,value:p,valueFormatted:f}))??l?.headerTooltip,shouldDisplayTooltip:i,getAdditionalParams:()=>({column:s,colDef:s.getColDef()})};let v=this.createTooltipFeature(m);return v&&(v=t.createBean(v),t.setRefreshFunction("tooltip",()=>v.refreshTooltip())),v}setupHeaderGroupTooltip(e,t,n,i){e&&t.destroyBean(e);const o=this.gos,r=rv(o),{column:s,eGui:a}=t,l=s.getColGroupDef();!i&&r&&!l?.headerGroupComponent&&(i=pc(()=>a.querySelector(".ag-header-group-text")));const u="headerGroup",f=this.beans.colNames.getDisplayNameForColumnGroup(s,"header"),p=n??f,m={getGui:()=>a,getLocation:()=>u,getTooltipValue:()=>n??l?.headerTooltipValueGetter?.(We(o,{location:u,colDef:l,column:s,value:p,valueFormatted:f}))??l?.headerTooltip,shouldDisplayTooltip:i,getAdditionalParams:()=>{const w={column:s};return l&&(w.colDef=l),w}},v=this.createTooltipFeature(m);return v&&t.createBean(v)}enableCellTooltipFeature(e,t,n){const{beans:i}=this,{column:o,rowNode:r}=e,s=iz(i,e,n),a=this.getLocaleTextFunc();let l=null;const u=()=>(l=oz({beans:i,ctrl:e,value:t,displayFunctions:s,translate:a}),l),f={getGui:()=>e.eGui,getLocation:()=>l?.location??"cell",getTooltipValue:()=>u()?.value,shouldDisplayTooltip:()=>{const p=l??u();return p?p.shouldDisplay?p.shouldDisplay():!0:!1},getAdditionalParams:()=>({column:o,colDef:o.getColDef(),rowIndex:e.cellPosition.rowIndex,node:r,data:r.data,valueFormatted:e.valueFormatted})};return this.createTooltipFeature(f,i)}setupFullWidthRowTooltip(e,t,n,i){const o={getGui:()=>t.getFullWidthElement(),getTooltipValue:()=>n,getLocation:()=>"fullWidthRow",shouldDisplayTooltip:i},r=this.beans,s=r.context;e&&t.destroyBean(e,s);const a=this.createTooltipFeature(o,r);if(a)return t.createBean(a,s)}setupCellEditorTooltip(e,t){const{beans:n}=this,{context:i}=n,o=t.getValidationElement?.(!0)||!t.isPopup?.()&&e.eGui;if(!o)return;const r={getGui:()=>o,getTooltipValue:()=>sv(n,e,this.getLocaleTextFunc()),getLocation:()=>"cellEditor",shouldDisplayTooltip:()=>{const{editModelSvc:a}=n,l=a?.getRowValidationModel()?.getRowValidationMap(),u=a?.getCellValidationModel()?.getCellValidationMap(),h=!!l&&l.size>0,f=!!u&&u.size>0;return h||f}},s=this.createTooltipFeature(r,n);if(s)return e.createBean(s,i)}initCol(e){const{colDef:t}=e;e.tooltipEnabled=we(t.tooltipField)||we(t.tooltipValueGetter)||we(t.tooltipComponent)}createTooltipFeature(e,t){return this.beans.registry.createDynamicBean("tooltipFeature",!1,e,t)}},sz=class extends q6{createTooltipComp(e,t){A_(this.beans.userCompFactory,e)?.newAgStackInstance().then(t)}setEventHandlers(e){[this.onColumnMovedEventCallback]=this.addManagedEventListeners({columnMoved:e})}clearEventHandlers(){this.onColumnMovedEventCallback?.(),this.onColumnMovedEventCallback=void 0}},Cx={moduleName:"Tooltip",version:ve,beans:[rz],dynamicBeans:{tooltipFeature:gx,highlightTooltipFeature:Q6,tooltipStateManager:sz},userComponents:{agTooltipComponent:Y6},dependsOn:[Ph],css:[Z6]},ll=class{constructor(e){this.cellValueChanges=e}},av=class extends ll{constructor(e,t,n,i){super(e),this.initialRange=t,this.finalRange=n,this.ranges=i}},az=10,wx=class{constructor(e){this.actionStack=[],this.maxStackSize=e||az,this.actionStack=new Array(this.maxStackSize)}pop(){return this.actionStack.pop()}push(e){e.cellValueChanges&&e.cellValueChanges.length>0&&(this.actionStack.length===this.maxStackSize&&this.actionStack.shift(),this.actionStack.push(e))}clear(){this.actionStack=[]}getCurrentStackSize(){return this.actionStack.length}},lz=class extends X{constructor(){super(...arguments),this.beanName="undoRedo",this.cellValueChanges=[],this.activeCellEdit=null,this.activeRowEdit=null,this.isPasting=!1,this.isRangeInAction=!1,this.batchEditing=!1,this.bulkEditing=!1,this.onCellValueChanged=e=>{const t={column:e.column,rowIndex:e.rowIndex,rowPinned:e.rowPinned},n=this.activeCellEdit!==null&&im(this.activeCellEdit,t),i=this.activeRowEdit!==null&&f2(this.activeRowEdit,t);if(!(n||i||this.isPasting||this.isRangeInAction))return;const{rowPinned:r,rowIndex:s,column:a,oldValue:l,value:u}=e,h={rowPinned:r,rowIndex:s,columnId:a.getColId(),newValue:u,oldValue:l};this.cellValueChanges.push(h)},this.clearStacks=()=>{this.undoStack.clear(),this.redoStack.clear()}}postConstruct(){const{gos:e,ctrlsSvc:t}=this.beans;if(!e.get("undoRedoCellEditing"))return;const n=e.get("undoRedoCellEditingLimit");if(n<=0)return;this.undoStack=new wx(n),this.redoStack=new wx(n),this.addListeners();const i=this.clearStacks.bind(this);this.addManagedEventListeners({cellValueChanged:this.onCellValueChanged.bind(this),modelUpdated:o=>{o.keepUndoRedoStack||this.clearStacks()},columnPivotModeChanged:i,newColumnsLoaded:i,columnGroupOpened:i,columnRowGroupChanged:i,columnMoved:i,columnPinned:i,columnVisible:i,rowDragEnd:i}),t.whenReady(this,o=>{this.gridBodyCtrl=o.gridBodyCtrl})}getCurrentUndoStackSize(){return this.undoStack?.getCurrentStackSize()??0}getCurrentRedoStackSize(){return this.redoStack?.getCurrentStackSize()??0}undo(e){const{eventSvc:t,undoStack:n,redoStack:i}=this;t.dispatchEvent({type:"undoStarted",source:e});const o=this.undoRedo(n,i,"initialRange","oldValue","undo");t.dispatchEvent({type:"undoEnded",source:e,operationPerformed:o})}redo(e){const{eventSvc:t,undoStack:n,redoStack:i}=this;t.dispatchEvent({type:"redoStarted",source:e});const o=this.undoRedo(i,n,"finalRange","newValue","redo");t.dispatchEvent({type:"redoEnded",source:e,operationPerformed:o})}undoRedo(e,t,n,i,o){if(!e)return!1;const r=e.pop();return r?.cellValueChanges?(this.processAction(r,s=>s[i],o),r instanceof av?this.processRange(r.ranges||[r[n]]):this.processCell(r.cellValueChanges),t.push(r),!0):!1}processAction(e,t,n){const{changeDetectionSvc:i}=this.beans;i?.beginDeferred();try{for(const o of e.cellValueChanges){const{rowIndex:r,rowPinned:s,columnId:a}=o,l={rowIndex:r,rowPinned:s},u=Do(this.beans,l);u?.displayed&&u.setDataValue(a,t(o),n)}}finally{i?.endDeferred()}}processRange(e){let t;const n=this.beans.rangeSvc;n.removeAllCellRanges(!0),e.forEach((i,o)=>{if(!i)return;const r=i.startRow,s=i.endRow;o===e.length-1&&(t={rowPinned:r.rowPinned,rowIndex:r.rowIndex,columnId:i.startColumn.getColId()},this.setLastFocusedCell(t));const a={rowStartIndex:r.rowIndex,rowStartPinned:r.rowPinned,rowEndIndex:s.rowIndex,rowEndPinned:s.rowPinned,columnStart:i.startColumn,columns:i.columns};n.addCellRange(a)})}processCell(e){const t=e[0],{rowIndex:n,rowPinned:i}=t,o={rowIndex:n,rowPinned:i},r=Do(this.beans,o),s={rowPinned:t.rowPinned,rowIndex:r.rowIndex,columnId:t.columnId};this.setLastFocusedCell(s)}setLastFocusedCell(e){const{rowIndex:t,columnId:n,rowPinned:i}=e,{colModel:o,focusSvc:r,rangeSvc:s}=this.beans,a=o.getCol(n);if(!a)return;const{scrollFeature:l}=this.gridBodyCtrl;l.ensureIndexVisible(t),l.ensureColumnVisible(a);const u={rowIndex:t,column:a,rowPinned:i};r.setFocusedCell({...u,forceBrowserFocus:!0}),s?.setRangeToCell(u)}addListeners(){this.addManagedEventListeners({rowEditingStarted:e=>{this.activeRowEdit={rowIndex:e.rowIndex,rowPinned:e.rowPinned}},rowEditingStopped:()=>{const e=new ll(this.cellValueChanges);this.pushActionsToUndoStack(e),this.activeRowEdit=null},cellEditingStarted:e=>{this.activeCellEdit={column:e.column,rowIndex:e.rowIndex,rowPinned:e.rowPinned}},cellEditingStopped:e=>{if(this.activeCellEdit=null,e.valueChanged&&!this.activeRowEdit&&!this.isPasting&&!this.isRangeInAction){const n=new ll(this.cellValueChanges);this.pushActionsToUndoStack(n)}},pasteStart:()=>{this.isPasting=!0},pasteEnd:()=>{const e=new ll(this.cellValueChanges);this.pushActionsToUndoStack(e),this.isPasting=!1},fillStart:()=>{this.isRangeInAction=!0},fillEnd:e=>{const t=new av(this.cellValueChanges,e.initialRange,e.finalRange);this.pushActionsToUndoStack(t),this.isRangeInAction=!1},keyShortcutChangedCellStart:()=>{this.isRangeInAction=!0},keyShortcutChangedCellEnd:()=>{let e;const{rangeSvc:t,gos:n}=this.beans;t&&nr(n)?e=new av(this.cellValueChanges,void 0,void 0,[...t.getCellRanges()]):e=new ll(this.cellValueChanges),this.pushActionsToUndoStack(e),this.isRangeInAction=!1},batchEditingStarted:()=>this.startBigChange("batchEditing"),batchEditingStopped:({changes:e})=>this.stopBigChange("batchEditing",e),bulkEditingStarted:()=>this.startBigChange("bulkEditing"),bulkEditingStopped:({changes:e})=>this.stopBigChange("bulkEditing",e)})}startBigChange(e){this.updateBigChange(e,!0)}updateBigChange(e,t){e==="bulkEditing"?this.bulkEditing=t:this.batchEditing=t}stopBigChange(e,t){if(e==="bulkEditing"&&!this.bulkEditing||e==="batchEditing"&&!this.batchEditing||(this.updateBigChange(e,!1),t?.length===0))return;const n=new ll(t??[]);this.pushActionsToUndoStack(n),this.cellValueChanges=[]}pushActionsToUndoStack(e){this.undoStack.push(e),this.cellValueChanges=[],this.redoStack.clear()}},cz=".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{display:block;height:auto;padding:var(--ag-cell-horizontal-padding)}:where(.ag-rtl .ag-large-text-input) .ag-text-area-input{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}.ag-popup-editor{position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none}",uz={tag:"div",cls:"ag-cell-wrapper ag-cell-edit-wrapper ag-checkbox-edit",children:[{tag:"ag-checkbox",ref:"eEditor",role:"presentation"}]},dz=class extends Yd{constructor(){super(uz,[Am]),this.eEditor=he}initialiseEditor(e){this.agSetEditValue(e.value),this.eEditor.getInputElement().setAttribute("tabindex","-1"),this.addManagedListeners(this.eEditor,{fieldValueChanged:n=>this.setAriaLabel(n.selected)})}agSetEditValue(e){this.params.value=e;const t=e??void 0;this.eEditor.setValue(t,!0),this.setAriaLabel(t)}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(),n=xd(t,e),i=t("ariaToggleCellValue","Press SPACE to toggle cell value");this.eEditor.setInputAriaLabel(`${i} (${n})`)}getValidationElement(e){return e?this.params.eGridCell:this.eEditor.getInputElement()}getValidationErrors(){const{params:e}=this,{getValidationErrors:t}=e,n=this.getValue();return t?t({value:n,internalErrors:null,cellEditorParams:e}):null}},ar=class extends Us{constructor(e,t="ag-text-field",n="text"){super(e,t,n)}postConstruct(){super.postConstruct(),this.config.allowedCharPattern&&this.preventDisallowedCharacters()}setValue(e,t){const n=this.eInput;return n.value!==e&&(n.value=we(e)?e:""),super.setValue(e,t)}setStartValue(e){this.setValue(e,!0)}setCustomValidity(e){const t=this.eInput,n=e.length>0;t.setCustomValidity(e),n&&t.reportValidity(),fg(t,n)}preventDisallowedCharacters(){const e=new RegExp(`[${this.config.allowedCharPattern}]`),t=n=>{CR(n)&&n.key&&!e.test(n.key)&&n.preventDefault()};this.addManagedListeners(this.eInput,{keydown:t,paste:n=>{n.clipboardData?.getData("text")?.split("").some(o=>!e.test(o))&&n.preventDefault()}})}},Eh={selector:"AG-INPUT-TEXT-FIELD",component:ar},hz=class extends ar{constructor(e){super(e,"ag-date-field","date")}postConstruct(){super.postConstruct();const e=Ur();this.addManagedListeners(this.eInput,{wheel:this.onWheel.bind(this),mousedown:()=>{this.isDisabled()||e||this.eInput.focus()}}),this.eInput.step="any"}onWheel(e){It(this.beans)===this.eInput&&e.preventDefault()}setMin(e){const t=e instanceof Date?Un(e??null,!!this.includeTime)??void 0:e;return this.min===t?this:(this.min=t,ti(this.eInput,"min",t),this)}setMax(e){const t=e instanceof Date?Un(e??null,!!this.includeTime)??void 0:e;return this.max===t?this:(this.max=t,ti(this.eInput,"max",t),this)}setStep(e){return this.step===e?this:(this.step=e,ti(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 $n(this.getValue())??void 0}setDate(e,t){this.setValue(Un(e??null,this.includeTime),t)}},bx={selector:"AG-INPUT-DATE-FIELD",component:hz},Dh=class extends Yd{constructor(e){super(),this.cellEditorInput=e,this.eEditor=he}initialiseEditor(e){const{cellEditorInput:t}=this;this.setTemplate({tag:"div",cls:"ag-cell-edit-wrapper",children:[t.getTemplate()]},t.getAgComponents());const{eEditor:n}=this,{cellStartedEdit:i,eventKey:o,suppressPreventDefault:r}=e;n.getInputElement().setAttribute("title",""),t.init(n,e);let s,a=!0;i?(this.focusAfterAttached=!0,o===q.BACKSPACE||o===q.DELETE?s="":o&&o.length===1?r?a=!1:s=o:(s=t.getStartValue(),o!==q.F2&&(this.highlightAllOnFocus=!0))):(this.focusAfterAttached=!1,s=t.getStartValue()),a&&s!=null&&n.setStartValue(s),this.addGuiEventListener("keydown",l=>{const{key:u}=l;(u===q.PAGE_UP||u===q.PAGE_DOWN)&&l.preventDefault()})}afterGuiAttached(){const e=this.getLocaleTextFunc(),t=this.eEditor;if(t.setInputAriaLabel(e("ariaInputEditor","Input Editor")),!this.focusAfterAttached)return;Ur()||t.getFocusableElement().focus();const n=t.getInputElement();this.highlightAllOnFocus?n.select():this.cellEditorInput.setCaret?.()}focusIn(){const{eEditor:e}=this,t=e.getFocusableElement(),n=e.getInputElement();t.focus(),n.select()}getValue(){return this.cellEditorInput.getValue()}agSetEditValue(e){this.params.value=e;const t=this.cellEditorInput.getStartValue();this.eEditor.setStartValue(t??null)}isPopup(){return!1}getValidationElement(){return this.eEditor.getInputElement()}getValidationErrors(){return this.cellEditorInput.getValidationErrors()}},fz={tag:"ag-input-date-field",ref:"eEditor",cls:"ag-cell-editor"},pz=class{constructor(e,t){this.getDataTypeService=e,this.getLocaleTextFunc=t}getTemplate(){return fz}getAgComponents(){return[bx]}init(e,t){this.eEditor=e,this.params=t;const{min:n,max:i,step:o,colDef:r}=t;n!=null&&e.setMin(n),i!=null&&e.setMax(i),o!=null&&e.setStep(o),this.includeTime=t.includeTime??this.getDataTypeService()?.getDateIncludesTimeFlag?.(r.cellDataType),this.includeTime!=null&&e.setIncludeTime(this.includeTime)}getValidationErrors(){const t=this.eEditor.getInputElement().valueAsDate,{params:n}=this,{min:i,max:o,getValidationErrors:r}=n;let s=[];const a=this.getLocaleTextFunc();if(t instanceof Date&&!isNaN(t.getTime())){if(i){const l=i instanceof Date?i:new Date(i);if(t<l){const u=l.toLocaleDateString();s.push(a("minDateValidation",`Date must be after ${u}`,[u]))}}if(o){const l=o instanceof Date?o:new Date(o);if(t>l){const u=l.toLocaleDateString();s.push(a("maxDateValidation",`Date must be before ${u}`,[u]))}}}return s.length||(s=null),r?r({value:t,cellEditorParams:n,internalErrors:s}):s}getValue(){const{eEditor:e,params:t}=this,n=e.getDate();return!we(n)&&!we(t.value)?t.value:n??null}getStartValue(){const{value:e}=this.params;if(e instanceof Date)return Un(e,this.includeTime??!1)}},gz=class extends Dh{constructor(){super(new pz(()=>this.beans.dataTypeSvc,()=>this.getLocaleTextFunc()))}},mz={tag:"ag-input-date-field",ref:"eEditor",cls:"ag-cell-editor"},vz=class{constructor(e,t){this.getDataTypeService=e,this.getLocaleTextFunc=t}getTemplate(){return mz}getAgComponents(){return[bx]}init(e,t){this.eEditor=e,this.params=t;const{min:n,max:i,step:o,colDef:r}=t;n!=null&&e.setMin(n),i!=null&&e.setMax(i),o!=null&&e.setStep(o),this.includeTime=t.includeTime??this.getDataTypeService()?.getDateIncludesTimeFlag?.(r.cellDataType),this.includeTime!=null&&e.setIncludeTime(this.includeTime)}getValidationErrors(){const{eEditor:e,params:t}=this,n=e.getInputElement().value,i=this.formatDate(this.parseDate(n??void 0)),{min:o,max:r,getValidationErrors:s}=t;let a=[];if(i){const l=new Date(i),u=this.getLocaleTextFunc();if(o){const h=new Date(o);if(l<h){const f=h.toLocaleDateString();a.push(u("minDateValidation",`Date must be after ${f}`,[f]))}}if(r){const h=new Date(r);if(l>h){const f=h.toLocaleDateString();a.push(u("maxDateValidation",`Date must be before ${f}`,[f]))}}}return a.length||(a=null),s?s({value:this.getValue(),cellEditorParams:t,internalErrors:a}):a}getValue(){const{params:e,eEditor:t}=this,n=this.formatDate(t.getDate());return!we(n)&&!we(e.value)?e.value:e.parseValue(n??"")}getStartValue(){return Un(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):$n(e)??void 0}formatDate(e){const t=this.getDataTypeService();return t?t.getDateFormatterFunction(this.params.column)(e):Un(e??null,this.includeTime??!1)??void 0}},Cz=class extends Dh{constructor(){super(new vz(()=>this.beans.dataTypeSvc,()=>this.getLocaleTextFunc()))}},wz=class extends Us{constructor(e){super(e,"ag-text-area",null,"textarea")}setValue(e,t){const n=super.setValue(e,t);return this.eInput.value=e,n}setCols(e){return this.eInput.cols=e,this}setRows(e){return this.eInput.rows=e,this}},bz={selector:"AG-INPUT-TEXT-AREA",component:wz},yz={tag:"div",cls:"ag-large-text",children:[{tag:"ag-input-text-area",ref:"eEditor",cls:"ag-large-text-input"}]},Sz=class extends Yd{constructor(){super(yz,[bz]),this.eEditor=he}initialiseEditor(e){const{eEditor:t}=this,{cellStartedEdit:n,eventKey:i,maxLength:o,cols:r,rows:s}=e;this.focusAfterAttached=n,t.getInputElement().setAttribute("title",""),t.setMaxLength(o||200).setCols(r||60).setRows(s||10);let a;n?(this.focusAfterAttached=!0,i===q.BACKSPACE||i===q.DELETE?a="":i&&i.length===1?a=i:(a=this.getStartValue(e),i!==q.F2&&(this.highlightAllOnFocus=!0))):(this.focusAfterAttached=!1,a=this.getStartValue(e)),a!=null&&t.setValue(a,!0),this.addGuiEventListener("keydown",this.onKeyDown.bind(this)),this.activateTabIndex()}getStartValue(e){const{value:t}=e;return t?.toString()??t}agSetEditValue(e){this.params.value=e;const t=this.getStartValue(this.params);this.eEditor.setValue(t??"",!0)}onKeyDown(e){const t=e.key;(t===q.LEFT||t===q.UP||t===q.RIGHT||t===q.DOWN||e.shiftKey&&t===q.ENTER)&&e.stopPropagation()}afterGuiAttached(){const{eEditor:e,focusAfterAttached:t,highlightAllOnFocus:n}=this,i=this.getLocaleTextFunc();e.setInputAriaLabel(i("ariaInputEditor","Input Editor")),t&&(e.getFocusableElement().focus(),n&&e.getInputElement().select())}getValue(){const{eEditor:e,params:t}=this,{value:n}=t,i=e.getValue();return!we(i)&&!we(n)?n:t.parseValue(i)}getValidationElement(){return this.eEditor.getInputElement()}getValidationErrors(){const{params:e}=this,{maxLength:t,getValidationErrors:n}=e,i=this.getLocaleTextFunc(),o=this.getValue();let r=[];return typeof o=="string"&&t!=null&&o.length>t&&r.push(i("maxLengthValidation",`Must be ${t} characters or fewer.`,[String(t)])),r.length||(r=null),n?n({value:o,internalErrors:r,cellEditorParams:e}):r}},lv=class extends ar{constructor(e){super(e,"ag-number-field","number")}postConstruct(){super.postConstruct();const e=this.eInput;this.addManagedListeners(e,{blur:()=>{const r=Number.parseFloat(e.value),s=isNaN(r)?"":this.normalizeValue(r.toString());this.value!==s&&this.setValue(s)},wheel:this.onWheel.bind(this)}),e.step="any";const{precision:t,min:n,max:i,step:o}=this.config;typeof t=="number"&&this.setPrecision(t),typeof n=="number"&&this.setMin(n),typeof i=="number"&&this.setMax(i),typeof o=="number"&&this.setStep(o)}onWheel(e){It(this.beans)===this.eInput&&e.preventDefault()}normalizeValue(e){return e===""?"":(this.precision!=null&&(e=this.adjustPrecision(e)),e)}adjustPrecision(e,t){const n=this.precision;if(n==null)return e;if(t){const o=Number.parseFloat(e).toFixed(n);return Number.parseFloat(o).toString()}const i=String(e).split(".");if(i.length>1){if(i[1].length<=n)return e;if(n>0)return`${i[0]}.${i[1].slice(0,n)}`}return i[0]}setMin(e){return this.min===e?this:(this.min=e,ti(this.eInput,"min",e),this)}setMax(e){return this.max===e?this:(this.max=e,ti(this.eInput,"max",e),this)}setPrecision(e){return this.precision=e,this}setStep(e){return this.step===e?this:(this.step=e,ti(this.eInput,"step",e),this)}setValue(e,t){return this.setValueOrInputValue(n=>super.setValue(n,t),()=>this,e)}setStartValue(e){return this.setValueOrInputValue(t=>super.setValue(t,!0),t=>{this.eInput.value=t},e)}setValueOrInputValue(e,t,n){if(we(n)){let i=this.isScientificNotation(n);if(i&&this.eInput.validity.valid)return e(n);if(!i){n=this.adjustPrecision(n);const o=this.normalizeValue(n);i=n!=o}if(i)return t(n)}return e(n)}getValue(e=!1){const t=this.eInput;if(!t.validity.valid&&!e)return;const n=t.value;return this.isScientificNotation(n)?this.adjustPrecision(n,!0):super.getValue()}isScientificNotation(e){return typeof e=="string"&&e.includes("e")}},Rz={selector:"AG-INPUT-NUMBER-FIELD",component:lv},Fz={tag:"ag-input-number-field",ref:"eEditor",cls:"ag-cell-editor"},xz=class{constructor(e){this.getLocaleTextFunc=e}getTemplate(){return Fz}getAgComponents(){return[Rz]}init(e,t){this.eEditor=e,this.params=t;const{max:n,min:i,precision:o,step:r}=t;n!=null&&e.setMax(n),i!=null&&e.setMin(i),o!=null&&e.setPrecision(o),r!=null&&e.setStep(r);const s=e.getInputElement();t.preventStepping?e.addManagedElementListeners(s,{keydown:this.preventStepping}):t.showStepperButtons&&s.classList.add("ag-number-field-input-stepper")}getValidationErrors(){const{params:e}=this,{min:t,max:n,getValidationErrors:i}=e,r=this.eEditor.getInputElement().valueAsNumber,s=this.getLocaleTextFunc();let a=[];return typeof r=="number"&&(t!=null&&r<t&&a.push(s("minValueValidation",`Must be greater than or equal to ${t}.`,[String(t)])),n!=null&&r>n&&a.push(s("maxValueValidation",`Must be less than or equal to ${n}.`,[String(n)]))),a.length||(a=null),i?i({value:r,cellEditorParams:e,internalErrors:a}):a}preventStepping(e){(e.key===q.UP||e.key===q.DOWN)&&e.preventDefault()}getValue(){const{eEditor:e,params:t}=this,n=e.getValue();if(!we(n)&&!we(t.value))return t.value;let i=t.parseValue(n);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(){Ur()&&this.eEditor.getInputElement().focus({preventScroll:!0})}},Pz=class extends Dh{constructor(){super(new xz(()=>this.getLocaleTextFunc()))}},Ez=".ag-list-item{align-items:center;display:flex;height:var(--ag-list-item-height);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;&.ag-active-item{background-color:var(--ag-row-hover-color)}}",Dz="ag-active-item",Tz=(e,t)=>({tag:"div",cls:`ag-list-item ag-${e}-list-item`,attrs:{role:"option"},children:[{tag:"span",cls:`ag-list-item-text ag-${e}-list-item-text`,ref:"eText",children:t}]}),Az=class extends Qa{constructor(e,t,n){super(Tz(e,t)),this.label=t,this.value=n,this.eText=he}postConstruct(){this.createTooltip(),this.addEventListeners()}setHighlighted(e){const t=this.getGui();t.classList.toggle(Dz,e),MS(t,e),this.dispatchLocalEvent({type:"itemHighlighted",highlighted:e})}getHeight(){return this.getGui().clientHeight}setIndex(e,t){const n=this.getGui();hL(n,e),dL(n,t)}createTooltip(){const e={getTooltipValue:()=>this.label,getGui:()=>this.getGui(),getLocation:()=>"UNKNOWN",shouldDisplayTooltip:()=>HS(this.eText)},t=this.createOptionalManagedBean(this.beans.registry.createDynamicBean("highlightTooltipFeature",!1,e,this));t&&(this.tooltipFeature=t)}addEventListeners(){const e=this.getParentComponent();e&&(this.addGuiEventListener("mouseover",()=>{e.highlightItem(this)}),this.addGuiEventListener("mousedown",t=>{t.preventDefault(),t.stopPropagation(),e.setValue(this.value)}))}},Iz=class extends Qa{constructor(e="default"){super({tag:"div",cls:`ag-list ag-${e}-list`}),this.cssIdentifier=e,this.options=[],this.listItems=[],this.highlightedItem=null,this.registerCSS(Ez)}postConstruct(){const e=this.getGui();this.addManagedElementListeners(e,{mouseleave:()=>this.clearHighlighted()})}handleKeyDown(e){const t=e.key;switch(t){case q.ENTER:if(!this.highlightedItem)this.setValue(this.getValue());else{const n=this.listItems.indexOf(this.highlightedItem);this.setValueByIndex(n)}break;case q.DOWN:case q.UP:e.preventDefault(),this.navigate(t);break;case q.PAGE_DOWN:case q.PAGE_UP:case q.PAGE_HOME:case q.PAGE_END:e.preventDefault(),this.navigateToPage(t);break}}addOptions(e){for(const t of e)this.addOption(t);return this}addOption(e){const{value:t,text:n}=e,i=n??t;return this.options.push({value:t,text:i}),this.renderOption(t,i),this.updateIndices(),this}clearOptions(){this.options=[],this.reset(!0);for(const e of this.listItems)e.destroy();bn(this.getGui()),this.listItems=[],this.refreshAriaRole()}updateOptions(e){const t=this.options!==e;return t&&(this.clearOptions(),this.addOptions(e)),t}setValue(e,t){if(this.value===e)return this.fireItemSelected(),this;if(e==null)return this.reset(t),this;const n=this.options.findIndex(i=>i.value===e);if(n!==-1){const i=this.options[n];this.value=i.value,this.displayValue=i.text,this.highlightItem(this.listItems[n]),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.listItems[e])}highlightItem(e){const t=e.getGui();if(!ki(t))return;this.clearHighlighted(),e.setHighlighted(!0),this.highlightedItem=e;const n=this.getGui(),{scrollTop:i,clientHeight:o}=n,{offsetTop:r,offsetHeight:s}=t;(r+s>i+o||r<i)&&t.scrollIntoView({block:"nearest"})}hideItemTooltip(){this.highlightedItem?.tooltipFeature?.attemptToHideTooltip()}destroy(){this.hideItemTooltip(),super.destroy()}reset(e){this.value=null,this.displayValue=null,this.clearHighlighted(),e||this.fireChangeEvent()}clearHighlighted(){this.highlightedItem?.setHighlighted(!1),this.highlightedItem=null}renderOption(e,t){const n=new Az(this.cssIdentifier,t,e);n.setParentComponent(this);const i=this.createManagedBean(n);this.listItems.push(i),this.getGui().appendChild(i.getGui())}navigate(e){const t=e===q.DOWN;let n;const{listItems:i,highlightedItem:o}=this;if(!o)n=t?i[0]:Pt(i);else{let s=i.indexOf(o)+(t?1:-1);s=Math.min(Math.max(s,0),i.length-1),n=i[s]}this.highlightItem(n)}navigateToPage(e){const{listItems:t,highlightedItem:n}=this;if(!n||t.length===0)return;const i=t.indexOf(n),o=this.options.length-1,r=t[0].getHeight(),s=Math.floor(this.getGui().clientHeight/r);let a=-1;e===q.PAGE_HOME?a=0:e===q.PAGE_END?a=o:e===q.PAGE_DOWN?a=Math.min(i+s,o):e===q.PAGE_UP&&(a=Math.max(i-s,0)),a!==-1&&this.highlightItem(t[a])}refreshAriaRole(){Or(this.getGui(),this.options.length===0?"presentation":"listbox")}updateIndices(){this.refreshAriaRole();const e=this.listItems,t=e.length;e.forEach((n,i)=>{n.setIndex(i+1,t)})}fireChangeEvent(){this.dispatchLocalEvent({type:"fieldValueChanged"}),this.fireItemSelected()}fireItemSelected(){this.dispatchLocalEvent({type:"selectedItem"})}},Mz=".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(.invalid){background-color:var(--ag-input-invalid-background-color);border:var(--ag-input-invalid-border);color:var(--ag-input-invalid-text-color)}}.ag-picker-field-wrapper:where(.ag-picker-has-focus),.ag-picker-field-wrapper: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)}}.ag-picker-field-wrapper:disabled{opacity:.5}",kz={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"}}]}]},Lz=class extends JR{constructor(e){if(super(e,e?.template||kz,e?.agComponents||[],e?.className),this.isPickerDisplayed=!1,this.skipClick=!1,this.pickerGap=4,this.hideCurrentPicker=null,this.eLabel=he,this.eWrapper=he,this.eDisplayField=he,this.eIcon=he,this.registerCSS(Mz),this.ariaRole=e?.ariaRole,this.onPickerFocusIn=this.onPickerFocusIn.bind(this),this.onPickerFocusOut=this.onPickerFocusOut.bind(this),!e)return;const{pickerGap:t,maxPickerHeight:n,variableWidth:i,minPickerWidth:o,maxPickerWidth:r}=e;t!=null&&(this.pickerGap=t),this.variableWidth=!!i,n!=null&&this.setPickerMaxHeight(n),o!=null&&this.setPickerMinWidth(o),r!=null&&this.setPickerMaxWidth(r)}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:n,inputWidth:i}=this.config;if(n){const o=this.beans.iconSvc.createIconNoSpan(n);o&&this.eIcon.appendChild(o)}i!=null&&this.setInputWidth(i)}setupAria(){const e=this.getAriaElement();e.setAttribute("tabindex",this.gos.get("tabIndex").toString()),pg(e,!1),this.ariaRole&&Or(e,this.ariaRole)}onLabelOrWrapperMouseDown(e){if(e){const t=this.getFocusableElement();if(t!==this.eWrapper&&e?.target===t)return;e.preventDefault(),this.getFocusableElement().focus()}if(this.skipClick){this.skipClick=!1;return}this.isDisabled()||(this.isPickerDisplayed?this.hidePicker():this.showPicker())}onKeyDown(e){switch(e.key){case q.UP:case q.DOWN:case q.ENTER:case q.SPACE:e.preventDefault(),this.onLabelOrWrapperMouseDown();break;case q.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:n,pickerAriaLabelValue:i,modalPicker:o=!0},maxPickerHeight:r,minPickerWidth:s,maxPickerWidth:a,variableWidth:l,beans:u,eWrapper:h}=this,f={modal:o,eChild:e,closeOnEsc:!0,closedCallback:()=>{const w=ug(u);this.beforeHidePicker(),w&&this.isAlive()&&this.getFocusableElement().focus()},ariaLabel:t(n,i),anchorToElement:h};e.style.position="absolute";const p=u.popupSvc,m=p.addPopup(f);l?(s&&(e.style.minWidth=s),e.style.width=vg(Pd(h)),a&&(e.style.maxWidth=a)):Td(e,a??Pd(h));const v=r??`${gg(p.getPopupParent())}px`;return e.style.setProperty("max-height",v),this.alignPickerToComponent(),m.hideFunc}alignPickerToComponent(){if(!this.pickerComponent)return;const{pickerGap:e,config:{pickerType:t},beans:{popupSvc:n,gos:i},eWrapper:o,pickerComponent:r}=this,s=i.get("enableRtl")?"right":"left";n.positionPopupByComponent({type:t,eventSource:o,ePopup:r.getGui(),position:"under",alignSide:s,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();pg(t,e);const n=this.eWrapper.classList;n.toggle("ag-picker-expanded",e),n.toggle("ag-picker-collapsed",!e)}onPickerFocusIn(){this.togglePickerHasFocus(!0)}onPickerFocusOut(e){this.pickerComponent?.getGui().contains(e.relatedTarget)||this.togglePickerHasFocus(!1)}togglePickerHasFocus(e){this.pickerComponent&&this.eWrapper.classList.toggle("ag-picker-has-focus",e)}hidePicker(){this.hideCurrentPicker&&(this.hideCurrentPicker(),this.dispatchLocalEvent({type:"pickerHidden"}))}setInputWidth(e){return Td(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()}},Oz=".ag-select{align-items:center;display:flex;&.ag-disabled{opacity:.5}}.ag-select:where(:not(.ag-cell-editor,.ag-label-align-top)){min-height:var(--ag-list-item-height)}:where(.ag-select){.ag-picker-field-wrapper{cursor:default;padding-left:var(--ag-spacing);padding-right:var(--ag-spacing)}&.ag-disabled .ag-picker-field-wrapper:focus{box-shadow:none}.ag-picker-field-display{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ag-picker-field-icon{align-items:center;display:flex}}.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-select-list-item{cursor:default;-webkit-user-select:none;-moz-user-select:none;user-select:none}:where(.ag-ltr) .ag-select-list-item{padding-left:var(--ag-spacing)}:where(.ag-rtl) .ag-select-list-item{padding-right:var(--ag-spacing)}.ag-select-list-item-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}",cv=class extends Lz{constructor(e){super({pickerAriaLabelKey:"ariaLabelSelectField",pickerAriaLabelValue:"Select Field",pickerType:"ag-list",className:"ag-select",pickerIcon:"selectOpen",ariaRole:"combobox",...e}),this.registerCSS(Oz)}postConstruct(){this.tooltipFeature=this.createOptionalManagedBean(this.beans.registry.createDynamicBean("tooltipFeature",!1,{shouldDisplayTooltip:pc(()=>this.eDisplayField),getGui:()=>this.getGui()})),super.postConstruct(),this.createListComponent(),this.eWrapper.tabIndex=this.gos.get("tabIndex");const{options:e,value:t,placeholder:n}=this.config;e!=null&&this.addOptions(e),t!=null&&this.setValue(t,!0),n&&t==null&&(this.eDisplayField.textContent=n),this.addManagedElementListeners(this.eWrapper,{focusout:this.onWrapperFocusOut.bind(this)})}onWrapperFocusOut(e){this.eWrapper.contains(e.relatedTarget)||this.hidePicker()}createListComponent(){const e=this.createBean(new Iz("select"));this.listComponent=e,e.setParentComponent(this);const t=e.getAriaElement(),n=`ag-select-list-${e.getCompId()}`;t.setAttribute("id",n),yL(this.getAriaElement(),t),e.addManagedElementListeners(e.getGui(),{mousedown:i=>{i?.preventDefault()}}),e.addManagedListeners(e,{selectedItem:()=>{this.hidePicker(),this.dispatchLocalEvent({type:"selectedItem"})},fieldValueChanged:()=>{this.listComponent&&(this.setValue(this.listComponent.getValue(),!1,!0),this.hidePicker())}})}createPickerComponent(){return this.listComponent}beforeHidePicker(){this.listComponent?.hideItemTooltip(),super.beforeHidePicker()}onKeyDown(e){const{key:t}=e;switch(t===q.TAB&&this.hidePicker(),t){case q.ENTER:case q.UP:case q.DOWN:case q.PAGE_UP:case q.PAGE_DOWN:case q.PAGE_HOME:case q.PAGE_END:e.preventDefault(),this.isPickerDisplayed?this.listComponent?.handleKeyDown(e):super.onKeyDown(e);break;case q.ESCAPE:super.onKeyDown(e);break;case q.SPACE:this.isPickerDisplayed?e.preventDefault():super.onKeyDown(e);break}}showPicker(){const e=this.listComponent;e&&(super.showPicker(),e.refreshHighlighted())}addOptions(e){for(const t of e)this.addOption(t);return this}addOption(e){return this.listComponent.addOption(e),this}clearOptions(){return this.listComponent?.clearOptions(),this.setValue(void 0,!0),this}updateOptions(e){return this.listComponent?.updateOptions(e)&&this.setValue(void 0,!0),this}setValue(e,t,n){const{listComponent:i,config:{placeholder:o},eDisplayField:r,tooltipFeature:s}=this;if(this.value===e||!i)return this;if(n||i.setValue(e,!0),i.getValue()===this.getValue())return this;let l=i.getDisplayValue();return l==null&&o&&(l=o),r.textContent=l,s?.setTooltipAndRefresh(l??null),super.setValue(e,t)}destroy(){this.listComponent=this.destroyBean(this.listComponent),super.destroy()}},_z={selector:"AG-SELECT",component:cv},Nz={tag:"div",cls:"ag-cell-edit-wrapper",children:[{tag:"ag-select",ref:"eEditor",cls:"ag-cell-editor"}]},Bz=class extends Yd{constructor(){super(Nz,[_z]),this.eEditor=he,this.startedByEnter=!1}wireBeans(e){this.valueSvc=e.valueSvc}initialiseEditor(e){this.focusAfterAttached=e.cellStartedEdit;const{eEditor:t,valueSvc:n,gos:i}=this,{values:o,value:r,eventKey:s}=e;if(Nt(o)){se(58);return}this.startedByEnter=s!=null?s===q.ENTER:!1;let a=!1;o.forEach(f=>{const p={value:f},m=n.formatValue(e.column,null,f),v=m!=null;p.text=v?m:f,t.addOption(p),a=a||r===f}),a?t.setValue(e.value??void 0,!0):e.values.length&&t.setValue(e.values[0],!0);const{valueListGap:l,valueListMaxWidth:u,valueListMaxHeight:h}=e;l!=null&&t.setPickerGap(l),h!=null&&t.setPickerMaxHeight(h),u!=null&&t.setPickerMaxWidth(u),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()}agSetEditValue(e){this.params.value=e,this.eEditor.setValue(e??void 0,!0)}getValue(){return this.eEditor.getValue()}isPopup(){return!1}getValidationElement(){return this.eEditor.getAriaElement()}getValidationErrors(){const{params:e}=this,{values:t,getValidationErrors:n}=e,i=this.getValue();let o=[];if(t&&i!=null&&!t.includes(i)){const r=this.getLocaleTextFunc();o.push(r("invalidSelectionValidation","Invalid selection."))}else o=null;return n?n({value:i,internalErrors:o,cellEditorParams:e}):o}},Gz={tag:"ag-input-text-field",ref:"eEditor",cls:"ag-cell-editor"},Hz=class{constructor(e){this.getLocaleTextFunc=e}getTemplate(){return Gz}getAgComponents(){return[Eh]}init(e,t){this.eEditor=e,this.params=t;const n=t.maxLength;n!=null&&e.setMaxLength(n)}getValidationErrors(){const{params:e}=this,{maxLength:t,getValidationErrors:n}=e,i=this.getValue(),o=this.getLocaleTextFunc();let r=[];return t!=null&&typeof i=="string"&&i.length>t&&r.push(o("maxLengthValidation",`Must be ${t} characters or fewer.`,[String(t)])),r.length||(r=null),n?n({value:i,cellEditorParams:e,internalErrors:r}):r}getValue(){const{eEditor:e,params:t}=this,n=e.getValue();return!we(n)&&!we(t.value)?t.value:t.parseValue(n)}getStartValue(){const e=this.params;return e.useFormatter||e.column.getColDef().refData?e.formatValue(e.value):e.value}setCaret(){Ur()&&this.eEditor.getInputElement().focus({preventScroll:!0});const e=this.eEditor,t=e.getValue(),n=we(t)&&t.length||0;n&&e.getInputElement().setSelectionRange(n,n)}},yx=class extends Dh{constructor(){super(new Hz(()=>this.getLocaleTextFunc()))}};function Vz(e){e.undoRedo?.undo("api")}function Wz(e){e.undoRedo?.redo("api")}function zz(e,t){return e.editModelSvc?.getEditRowDataValue(t,{checkSiblings:!0})}function Uz(e){const t=e.editModelSvc?.getEditMap(),n=[];return t?.forEach((i,o)=>{const{rowIndex:r,rowPinned:s}=o;i.forEach((a,l)=>{const{editorValue:u,pendingValue:h,sourceValue:f,state:p}=a,m=so(a);let v=u??h;v===fn&&(v=void 0);const w={newValue:v,oldValue:f,state:p,column:l,colId:l.getColId(),colKey:l.getColId(),rowIndex:r,rowPinned:s},b=p==="editing";(b||!b&&m)&&n.push(w)})}),n}function $z(e,t=!1){const{editSvc:n}=e;if(n?.isBatchEditing()){if(t)for(const i of e.editModelSvc?.getEditPositions()??[])i.state==="editing"&&n.revertSingleCellEdit(i);else Yr(e,{persist:!0});Zr(e,void 0,{cancel:t})}else n?.stopEditing(void 0,{cancel:t,source:"edit",forceStop:!t,forceCancel:t})}function jz(e,t){const n=ft(e,t);return!!e.editSvc?.isEditing(n)}function Kz(e,t){const{key:n,colKey:i,rowIndex:o,rowPinned:r}=t,{editSvc:s,colModel:a}=e,l=a.getCol(i);if(!l){se(12,{colKey:i});return}const h=Do(e,{rowIndex:o,rowPinned:r||null});if(!h){se(290,{rowIndex:o,rowPinned:r});return}if(!s?.isCellEditable({rowNode:h,column:l},"api"))return;r==null&&ix(e,o),nx(e,i),s?.startEditing({rowNode:h,column:l},{event:n?new KeyboardEvent("keydown",{key:n}):void 0,source:"api",editable:!0})}function qz(e){return e.editSvc?.validateEdit()||null}function Qz(e){return e.undoRedo?.getCurrentUndoStackSize()??0}function Yz(e){return e.undoRedo?.getCurrentRedoStackSize()??0}var Zz={tag:"div",cls:"ag-popup-editor",attrs:{tabindex:"-1"}},Xz=class extends Qg{constructor(e){super(Zz),this.params=e}postConstruct(){Os(this.gos,this.getGui(),"popupEditorWrapper",!0),this.addKeyDownListener()}addKeyDownListener(){const e=this.getGui(),t=this.params,n=i=>{mm(this.gos,i,t.node,t.column,!0)||t.onKeyDown(i)};this.addManagedElementListeners(e,{keydown:n})}};function Jz(e,{column:t},n,i,o="ui"){if(n instanceof KeyboardEvent&&(n.key===q.TAB||n.key===q.ENTER||n.key===q.F2||n.key===q.BACKSPACE&&i))return!0;if(n?.shiftKey&&e.rangeSvc?.getCellRanges().length!=0)return!1;const s=t?.getColDef(),a=e4(e.gos,s),l=n?.type;return l==="click"&&n?.detail===1&&a===1||l==="dblclick"&&n?.detail===2&&a===2?!0:o==="api"?!!i:!1}function e4(e,t){return e.get("suppressClickEdit")===!0?0:e.get("singleClickEdit")===!0||t?.singleClickEdit?1:2}function uv(e,t){return e.editModelSvc?.hasEdits(t,{withOpenEditor:!0})??!1}function dv(e,t){const n=t.column,i=t.rowNode,o=n.getColDef();if(!i)return uv(e,t);const r=o.editable;return i.group&&o.groupRowEditable!=null?e.rowGroupingEditValueSvc?.isGroupCellEditable(i,n)?!0:uv(e,t):n.isColumnFunc(i,r)?!0:uv(e,t)}function t4(e,t,n="ui"){const i=dv(e,t);if(i||n==="ui")return i;const{rowNode:o,column:r}=t;for(const s of e.colModel.getCols())if(s!==r&&dv(e,{rowNode:o,column:s}))return!0;return!1}var Th=(e,t=!1)=>{if(e!==void 0)return so(e)||t&&e.state==="editing"};function Sx(e,t,n=!1){return Th(e.editModelSvc?.getEdit(t),n)}var Rx=(e,t,n)=>{if(e)for(let i=0,o=e.length;i<o;++i){const r=e[i];if(r.data&&(Th(t?.getEdit({rowNode:r,column:n}))||Th(t?.getEdit({rowNode:r.pinnedSibling,column:n})))||Rx(r.childrenAfterGroup,t,n))return!0}};function Fx(e,t){const{column:n,rowNode:i}=t;return e.gos.get("groupTotalRow")&&!i?.footer?!1:Rx(i?.childrenAfterGroup,e.editModelSvc,n)}function xx(e,{rowNode:t,column:n}){if(t=t.pinnedSibling,!!t)return Th(e.editModelSvc?.getEdit({rowNode:t,column:n}))}var n4=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(){const{cellCtrl:e,editSvc:t,beans:n}=this;if(t?.isBatchEditing()&&t.isEditing()){const o=Sx(n,e)||Fx(n,e)||xx(n,e);this.applyBatchingStyle(o)}else this.applyBatchingStyle(!1);const i=!!this.editModelSvc?.getCellValidationModel().hasCellValidation(this.cellCtrl);this.cellComp.toggleCss("ag-cell-editing-error",i)}applyBatchingStyle(e){this.cellComp.toggleCss("ag-cell-editing",e??!1),this.cellComp.toggleCss("ag-cell-batch-edit",(e&&this.editSvc?.isBatchEditing())??!1)}},i4=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(){const{rowCtrl:e,editModelSvc:t,beans:n}=this;let i=e.rowNode,o=t?.getEditRow(i);const r=this.editModelSvc?.getRowValidationModel().hasRowValidation({rowNode:i});if(!o&&i.pinnedSibling&&(i=i.pinnedSibling,o=t?.getEditRow(i)),o){const s=Array.from(o.keys()).some(a=>{const l={rowNode:i,column:a};return Sx(n,l,!0)||Fx(n,l)||xx(n,l)});this.applyStyle(r,s);return}this.applyStyle(r)}applyStyle(e=!1,t=!1){const n=!!this.editSvc?.isBatchEditing(),i=this.gos.get("editType")==="fullRow";this.rowCtrl?.forEachGui(void 0,({rowComp:o})=>{o.toggleCss("ag-row-editing",i&&t),o.toggleCss("ag-row-batch-edit",i&&t&&n),o.toggleCss("ag-row-inline-editing",t),o.toggleCss("ag-row-not-inline-editing",!t),o.toggleCss("ag-row-editing-invalid",i&&t&&e)})}},o4=({rowModel:e,pinnedRowModel:t,editModelSvc:n},i)=>{const o=new Set;e.forEachNode(r=>i.has(r)&&o.add(r)),t?.forEachPinnedRow("top",r=>i.has(r)&&o.add(r)),t?.forEachPinnedRow("bottom",r=>i.has(r)&&o.add(r));for(const r of i)o.has(r)||n.removeEdits({rowNode:r});return o},r4=({editModelSvc:e},t,n)=>{for(const i of t)e?.getEditRow(i)?.forEach((o,r)=>!n.has(r)&&e.removeEdits({rowNode:i,column:r}))},s4=e=>()=>{const t=new Set(e.colModel.getCols()),n=e.editModelSvc.getEditMap(!0),i=new Set(n.keys());r4(e,o4(e,i),t)},a4=new Set(["undo","redo","paste","bulk","rangeSvc"]),l4=new Set(["ui","api"]),Px={paste:"api",rangeSvc:"api",fillHandle:"api",cellClear:"api",bulk:"api"},c4=new Set(Object.keys(Px)),u4=new Set(["paste","rangeSvc","cellClear","redo","undo"]),hv={cancel:!0,source:"api"},d4={cancel:!1,source:"api"},Xs={checkSiblings:!0},Jr={force:!0,suppressFlash:!0},h4={force:!0},f4=class extends X{constructor(){super(...arguments),this.beanName="editSvc",this.committing=!1,this.batch=!1,this.batchStartDispatched=!1,this.stopping=!1,this.rangeSelectionWhileEditing=0}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,hv),this.createStrategy(i)});const t=s4(e),n=()=>{const i=this.model.getCellValidationModel().getCellValidationMap().size>0,o=this.model.getRowValidationModel().getRowValidationMap().size>0;return i||o?this.stopEditing(void 0,hv):this.isEditing()&&(this.batch?Zr(e,this.model.getEditPositions()):this.stopEditing(void 0,d4)),!1};this.addManagedEventListeners({columnPinned:t,columnVisible:t,columnRowGroupChanged:t,rowExpansionStateChanged:t,pinnedRowsChanged:t,displayedRowsChanged:t,sortChanged:n,filterChanged:n,cellFocused:this.onCellFocused.bind(this)})}isBatchEditing(){return this.batch}startBatchEditing(){this.batch||(this.batch=!0,this.batchStartDispatched=!1,this.stopEditing(void 0,hv))}stopBatchEditing(e){this.batch&&(e&&this.stopEditing(void 0,e),this.batchStartDispatched&&this.dispatchBatchStopped(new Map,!1),this.batch=!1,this.batchStartDispatched=!1)}ensureBatchStarted(){!this.batch||this.batchStartDispatched||(this.batchStartDispatched=!0,this.dispatchBatchEvent("batchEditingStarted",new Map))}createStrategy(e){const{beans:t,gos:n,strategy:i}=this,o=Ex(n,e);if(i){if(i.beanName===o)return i;this.destroyStrategy()}return this.strategy=this.createOptionalManagedBean(t.registry.createDynamicBean(o,!0))}destroyStrategy(){this.strategy&&(this.strategy.destroy(),this.strategy=this.destroyBean(this.strategy))}shouldStartEditing(e,t,n,i="ui"){const o=Jz(this.beans,e,t,n,i);return o&&(this.strategy??(this.strategy=this.createStrategy())),o}shouldStopEditing(e,t,n="ui"){return this.strategy?.shouldStop(e,t,n)??null}shouldCancelEditing(e,t,n="ui"){return this.strategy?.shouldCancel(e,t,n)??null}validateEdit(){return Q5(this.beans)}isEditing(e,t){return this.model.hasEdits(e??void 0,t??Xs)}isRowEditing(e,t){return!!e&&this.model.hasRowEdits(e,t)}enableRangeSelectionWhileEditing(){this.beans.rangeSvc&&this.gos.get("cellSelection")&&this.rangeSelectionWhileEditing++}disableRangeSelectionWhileEditing(){this.rangeSelectionWhileEditing=Math.max(0,this.rangeSelectionWhileEditing-1)}isRangeSelectionEnabledWhileEditing(){return this.rangeSelectionWhileEditing>0}startEditing(e,t){const{startedEdit:n=!0,event:i=null,source:o="ui",ignoreEventKey:r=!1,silent:s}=t;if(this.strategy??(this.strategy=this.createStrategy()),!(t.editable??this.isCellEditable(e,"api")))return;const l=ft(this.beans,e);if(l&&!l.comp){t.editable=void 0,l.onCompAttachedFuncs.push(()=>this.startEditing(e,t));return}const u=this.shouldStartEditing(e,i,n,o);if(u===!1&&o!=="api"){this.isEditing(e)&&this.stopEditing();return}!this.batch&&this.shouldStopEditing(e,void 0,o)&&!t.continueEditing&&this.stopEditing(void 0,{source:o}),u&&this.ensureBatchStarted(),this.strategy.start({position:e,event:i,source:o,ignoreEventKey:r,startedEdit:n,silent:s})}stopEditing(e,t){const n=this.prepareStopContext(e,t);if(!n)return!1;this.stopping=!0;let i=!1,{edits:o}=n;try{const r=this.processStopRequest(n);return i||(i=r.res),o=r.edits,this.finishStopEditing({...n,edits:o,params:t,position:e,res:i}),i}finally{this.rangeSelectionWhileEditing=0,this.stopping=!1}}prepareStopContext(e,t){const{event:n=null,cancel:i=!1,source:o="ui",forceCancel:r=!1,forceStop:s=!1,commit:a=!1}=t||{};if(c4.has(o)&&this.batch)return e?.rowNode&&e?.column&&this.bulkRefreshCell(e),null;const l=this.committing?Px[o]:o;if(!(this.committing||this.isEditing(e)||this.batch&&this.model.hasEdits(e,Xs))||!this.strategy||this.stopping)return null;const h=ft(this.beans,e);h&&(h.onEditorAttachedFuncs=[]);const f=!i&&(!!this.shouldStopEditing(e,n,l)||(this.committing||o==="paste")&&!this.batch)||s,p=i&&!!this.shouldCancelEditing(e,n,l)||r;return{cancel:i,cellCtrl:h,edits:this.model.getEditMap(!0),event:n??null,forceCancel:r,forceStop:s,commit:a,position:e,source:o,treatAsSource:l,willCancel:p,willStop:f}}processStopRequest(e){const{event:t,position:n,willCancel:i,willStop:o}=e;return o||i?this.handleStopOrCancel(e):this.shouldHandleMidBatchKey(t,n)?{res:!1,edits:this.handleMidBatchKey(t,n,e)}:(Yr(this.beans,{persist:!0}),this.batch&&this.strategy?.cleanupEditors(n),{res:!1,edits:this.model.getEditMap()})}handleStopOrCancel(e){const{beans:t,model:n}=this,{cancel:i,commit:o,edits:r,event:s,source:a,willCancel:l,willStop:u}=e,h=!this.batch||!l;Yr(t,{persist:h,isCancelling:l||i,isStopping:u});const f=n.getEditMap(),m=!l&&(!this.batch||o)?this.processEdits(f,a):[];i?this.strategy?.stopCancelled(e.forceCancel):this.strategy?.stopCommitted(s,o),this.clearValidationIfNoOpenEditors();for(const v of m)n.clearEditValue(v);this.bulkRefreshMap(r);for(const v of n.getEditPositions(f)){const w=ft(t,v),b=so(v);w?.refreshCell({force:!0,suppressFlash:!b})}return{res:u,edits:f}}shouldHandleMidBatchKey(e,t){return e instanceof KeyboardEvent&&this.batch&&!!this.strategy?.midBatchInputsAllowed(t)&&this.isEditing(t,{withOpenEditor:!0})}handleMidBatchKey(e,t,n){const{beans:i,model:o}=this,{cellCtrl:r,edits:s}=n,{key:a}=e,l=a===q.ENTER,u=a===q.ESCAPE,h=a===q.TAB;if(l||h||u){if(l||h)Yr(i,{persist:!0});else if(u&&r){const{rowNode:f,column:p}=r;if(this.batch&&f&&p){const m={rowNode:f,column:p};Zr(i,[m],{silent:!0}),this.model.stop(m,!0,!0),ft(i,m)?.refreshCell(Jr)}else this.revertSingleCellEdit(r)}return this.batch?this.strategy?.cleanupEditors():Zr(i,o.getEditPositions(),{event:e,cancel:u}),e.preventDefault(),this.bulkRefreshMap(s,{suppressFlash:!0}),o.getEditMap()}return s}finishStopEditing({cellCtrl:e,edits:t,params:n,position:i,res:o,commit:r,forceCancel:s,willCancel:a,willStop:l}){const u=this.beans;o&&i&&(!this.batch||r)&&this.model.removeEdits(i),this.navigateAfterEdit(n,e?.cellPosition),Lc(u),this.clearValidationIfNoOpenEditors();const{rowRenderer:h,formula:f}=u;if(a&&h.refreshRows({rowNodes:Array.from(t.keys())}),this.batch){f?f.refreshFormulas(!0):h.refreshRows({suppressFlash:!0,force:!0});const p=l&&r;(p||a&&s)&&this.dispatchBatchStopped(t,p)}}dispatchBatchStopped(e,t){let n;t&&(n=V5(e),n.size>0&&this.ensureBatchStarted()),this.batchStartDispatched&&(this.batchStartDispatched=!1,this.dispatchBatchEvent("batchEditingStopped",n??new Map))}clearValidationIfNoOpenEditors(){this.model.hasEdits(void 0,{withOpenEditor:!0})||(this.model.getCellValidationModel().clearCellValidationMap(),this.model.getRowValidationModel().clearRowValidationMap())}navigateAfterEdit(e,t){if(!e||!t)return;const{event:n,suppressNavigateAfterEdit:i}=e;if(!(n instanceof KeyboardEvent)||i)return;const{key:r,shiftKey:s}=n,a=this.gos.get("enterNavigatesVerticallyAfterEdit");if(r!==q.ENTER||!a)return;const l=s?q.UP:q.DOWN;this.beans.navigation?.navigateToNextCell(null,l,t,!1)}processEdits(e,t){const n=Array.from(e.keys()),i=this.model.getCellValidationModel().getCellValidationMap().size>0||this.model.getRowValidationModel().getRowValidationMap().size>0,o=[],{changeDetectionSvc:r}=this.beans;r?.beginDeferred();try{for(const s of n){const a=e.get(s);for(const l of a.keys()){const u=a.get(l),h={rowNode:s,column:l};if(so(u)&&!i){const f=ft(this.beans,h);this.setNodeDataValue(s,l,u.pendingValue,f,t)||o.push(h)}}}}finally{r?.endDeferred()}return o}setNodeDataValue(e,t,n,i,o="edit"){const r=l4.has(o)?"edit":o;i&&(i.suppressRefreshCell=!0),this.committing=!0;try{return e.setDataValue(t,n,r)}finally{this.committing=!1,i&&(i.suppressRefreshCell=!1)}}syncEditAfterCommit(e,t){const n=this.model.getEdit(e);n&&n.state!=="editing"&&(t?this.beans.editModelSvc?.setEdit(e,{sourceValue:n.pendingValue}):this.model.clearEditValue(e))}setEditMap(e,t){this.strategy??(this.strategy=this.createStrategy()),this.strategy?.setEditMap(e,t),this.bulkRefreshMap(e);let n=Jr;t?.forceRefreshOfEditCellsOnly&&(n={...p4(e),...Jr}),this.beans.rowRenderer.refreshCells(n)}dispatchEditValuesChanged({rowNode:e,column:t},n={}){if(!e||!t||!n)return;const{pendingValue:i,sourceValue:o}=n,{rowIndex:r,rowPinned:s,data:a}=e;this.beans.eventSvc.dispatchEvent({type:"cellEditValuesChanged",node:e,rowIndex:r,rowPinned:s,column:t,source:"api",data:a,newValue:i,oldValue:o,value:i,colDef:t.getColDef()})}bulkRefreshCell(e,t){Yt(this.gos,this.beans.rowModel)&&this.refCell(e,this.model.getEdit(e),t)}bulkRefreshMap(e,t){Yt(this.gos,this.beans.rowModel)&&e.forEach((n,i)=>{for(const o of n.keys())this.refCell({rowNode:i,column:o},n.get(o),t)})}refCell({rowNode:e,column:t},n,i={}){const{beans:o,gos:r}=this,s=new Set([e]),a=new Set,l=e.pinnedSibling;l&&s.add(l);const u=e.sibling;u&&a.add(u);let h=e.parent;for(;h;)h.sibling?.footer&&r.get("groupTotalRow")||!h.parent&&h.sibling&&r.get("grandTotalRow")?a.add(h.sibling):a.add(h),h=h.parent;for(const f of s)this.dispatchEditValuesChanged({rowNode:f,column:t},n);for(const f of s)ft(o,{rowNode:f,column:t})?.refreshCell(i);for(const f of a){const p=ft(o,{rowNode:f,column:t});p&&(p.refreshCell(i),!i.force&&this.batch&&p.editStyleFeature?.applyCellStyles?.())}}stopAllEditing(e=!1,t="ui"){this.isEditing()&&this.stopEditing(void 0,{cancel:e,source:t})}isCellEditable(e,t="ui"){const{gos:n,beans:i}=this,o=e.rowNode;if(o.group&&e.column.getColDef().groupRowEditable==null){if(n.get("treeData")){if(!o.data&&!n.get("enableGroupEdit"))return!1}else if(!n.get("enableGroupEdit"))return!1}const r=Ex(n)==="fullRow"?t4(i,e,t):dv(i,e);return r&&(this.strategy??(this.strategy=this.createStrategy())),r}cellEditingInvalidCommitBlocks(){return this.gos.get("invalidEditValueMode")==="block"}checkNavWithValidation(e,t,n=!0){if(this.hasValidationErrors(e)){const i=ft(this.beans,e);return this.cellEditingInvalidCommitBlocks()?(t?.preventDefault?.(),n&&(i&&!i.hasBrowserFocus()&&i.focusCell(),i?.comp?.getCellEditor()?.focusIn?.()),"block-stop"):(i&&this.revertSingleCellEdit(i),"revert-continue")}return"continue"}revertSingleCellEdit(e,t=!1){const n=ft(this.beans,e);n?.comp?.getCellEditor()&&(Zr(this.beans,[e],{silent:!0}),this.model.clearEditValue(e),qs(this.beans,e,{silent:!0}),Xr(this.beans),n?.refreshCell(Jr),t&&(n?.focusCell(),n?.comp?.getCellEditor()?.focusIn?.()))}hasValidationErrors(e){Xr(this.beans);const t=ft(this.beans,e);t&&(t.refreshCell(Jr),t.rowCtrl.rowEditStyleFeature?.applyRowStyles());let n=!1;return e?.rowNode?(n||(n=this.model.getRowValidationModel().hasRowValidation({rowNode:e.rowNode})),e.column&&(n||(n=this.model.getCellValidationModel().hasCellValidation({rowNode:e.rowNode,column:e.column})))):(n||(n=this.model.getCellValidationModel().getCellValidationMap().size>0),n||(n=this.model.getRowValidationModel().getRowValidationMap().size>0)),n}moveToNextCell(e,t,n,i="ui"){let o;const r=this.isEditing(),s=r&&this.checkNavWithValidation(void 0,n)==="block-stop";return e instanceof sl&&r&&(o=this.strategy?.moveToNextEditingCell(e,t,n,i,s)),o===null||(o=o||!!this.beans.focusSvc.focusedHeader,o===!1&&!s&&this.stopEditing()),o}getPendingEditValue(e,t,n){if(n==="data"||n==="batch"&&!this.batch)return;const i=this.model.getEdit({rowNode:e,column:t},Xs);if(!i||this.stopping&&!this.batch&&!i.editorState?.cellStartedEditing)return;if(n==="edit"){const r=i.editorValue;if(r!=null&&r!==fn)return r}const o=i.pendingValue;if(o!==fn)return o}getCellDataValue(e){const t=this.model.getEdit(e,Xs);if(t){const n=t.pendingValue;if(n!==fn)return n;const i=t.sourceValue;if(i!=null)return i}return this.valueSvc.getValue(e.column,e.rowNode,"data")}addStopEditingWhenGridLosesFocus(e){B5(this,this.beans,e)}createPopupEditorWrapper(e){return new Xz(e)}batchResetToSourceValue(e){if(!this.batch)return!1;const t=this.model.getEdit(e);if(!t)return!1;const{pendingValue:n,sourceValue:i,state:o}=t;return n===i||o==="editing"?!1:(this.dispatchEditValuesChanged(e,{...t,pendingValue:i}),this.beans.editModelSvc?.removeEdits(e),ft(this.beans,e)?.refreshCell(Jr),!0)}setDataValue(e,t,n){try{const i=this.batch,o=this.isEditing(i?void 0:e);if((!o||this.committing)&&!i&&!u4.has(n)||!o&&!i&&n==="paste"||n==="batch"&&!i)return;if(n==="edit"){if(o&&this.applyEditorValue(e,t))return!0;if(!i)return}if(this.strategy??(this.strategy=this.createStrategy()),n==="batch"||n==="edit")return this.applyDirectValue(e,t,n);const r=this.beans;let s;if(i?s="ui":this.committing?s=n??"api":s="api",!n||a4.has(n))return this.applyDirectValue(e,t,n);const a=this.applyExistingEdit(e,t,n,s);return a!==void 0?a:(ol(r,e,t,n,void 0,{persist:!0}),this.ensureBatchStarted(),this.stopEditing(e,{source:s,suppressNavigateAfterEdit:!0}),!0)}finally{this.committing=!1}}applyExistingEdit(e,t,n,i){const o=this.model.getEdit(e);if(o)return o.pendingValue===t?!1:o.sourceValue!==t?(ol(this.beans,e,t,n,void 0,{persist:!0}),this.ensureBatchStarted(),this.stopEditing(e,{source:i,suppressNavigateAfterEdit:!0}),!0):(this.beans.editModelSvc?.removeEdits(e),this.ensureBatchStarted(),this.dispatchEditValuesChanged(e,{...o,pendingValue:t}),!0)}applyEditorValue(e,t){const n=this.beans,i=ft(n,e),o=i?.comp?.getCellEditor();return!i||!o?!1:(ol(n,e,t,"edit",void 0,{persist:!0}),i.editStyleFeature?.applyCellStyles?.(),"agSetEditValue"in o?(o.agSetEditValue(t),!0):o.refresh&&i.editCompDetails?(o.refresh({...i.editCompDetails.params,value:t}),!0):(i.hasBrowserFocus()&&i.onEditorAttachedFuncs.push(()=>{const s=ft(this.beans,e);s?.focusCell(!0),s?.comp?.getCellEditor()?.focusIn?.()}),Zr(n,[e],{silent:!0,cancel:!0}),qs(n,e,{silent:!0}),Xr(n),ft(n,e)?.refreshCell(Jr),!0))}applyDirectValue(e,t,n){const i=this.beans;if(this.batch){if(n==="batch"&&ft(i,e)?.comp?.getCellEditor()){const{editModelSvc:s,valueSvc:a}=i,{rowNode:l,column:u}=e;s?.getEdit(e)?.sourceValue===void 0&&s?.setEdit(e,{sourceValue:a.getValue(u,l,"data")}),s?.setEdit(e,{pendingValue:t})}else ol(i,e,t,n,void 0,{persist:!0}),n!=="batch"&&this.cleanupEditors();return Lc(i),this.ensureBatchStarted(),this.bulkRefreshCell(e),!0}ol(i,e,t,n,void 0,{persist:!0});const o=ft(i,e),r=this.setNodeDataValue(e.rowNode,e.column,t,o,n);return this.syncEditAfterCommit(e,r),Lc(i),ft(i,e)?.refreshCell(r?h4:Jr),r}handleColDefChanged(e){z5(this.beans,e)}destroy(){this.model.clear(),this.destroyStrategy(),super.destroy()}prepDetailsDuringBatch(e,t){const{model:n}=this;if(!this.batch||!n.hasRowEdits(e.rowNode,Xs))return;const{rowNode:o}=e,{compDetails:r,valueToDisplay:s}=t;if(r){const{params:a}=r;return a.data=n.getEditRowDataValue(o,Xs),{compDetails:r}}return{valueToDisplay:s}}cleanupEditors(){this.strategy?.cleanupEditors()}dispatchCellEvent(e,t,n,i){this.strategy?.dispatchCellEvent(e,t,n,i)}dispatchBatchEvent(e,t){this.eventSvc.dispatchEvent(this.createBatchEditEvent(e,t))}createBatchEditEvent(e,t){return We(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},n){if(!n||n.length===0)return;const{beans:i,rangeSvc:o,valueSvc:r}=this,{formula:s}=i;Yr(i,{persist:!0});const a=this.model.getEditMap(!0);let l=a.get(e)?.get(t)?.pendingValue,u=!1;this.batch||(this.eventSvc.dispatchEvent({type:"bulkEditingStarted"}),u=!0);const h=s?.isFormula(l)??!1;n.forEach(p=>{const m=p.columns.some(v=>v?.isAllowFormula());if(o?.forEachRowInRange(p,v=>{const w=Do(i,v);if(w===void 0)return;const b=a.get(w)??new Map;let y=l;for(const R of p.columns){if(!R)continue;const S=!!h&&R.isAllowFormula();if(this.isCellEditable({rowNode:w,column:R},"api")){const P=r.getValue(R,w,"data",!0);let F=r.parseValue(R,w??null,y,P);Number.isNaN(F)&&(F=null),b.set(R,{editorValue:void 0,pendingValue:F,sourceValue:P,state:"changed",editorState:{isCancelAfterEnd:void 0,isCancelBeforeStart:void 0}})}S&&(y=s?.updateFormulaByOffset({value:y,columnDelta:1}))}b.size>0&&a.set(w,b),h&&m&&(l=s?.updateFormulaByOffset({value:l,rowDelta:1}))}),this.setEditMap(a),this.batch){this.cleanupEditors(),Lc(i),this.ensureBatchStarted();return}this.committing=!0;try{this.stopEditing(void 0,{source:"bulk"})}finally{this.committing=!1,u&&this.eventSvc.dispatchEvent({type:"bulkEditingStopped",changes:this.toEventChangeList(a)})}});const f=ft(i,{rowNode:e,column:t});f&&f.focusCell(!0)}createCellStyleFeature(e){return new n4(e,this.beans)}createRowStyleFeature(e){return new i4(e,this.beans)}setEditingCells(e,t){const{beans:n}=this,{colModel:i,valueSvc:o}=n,r=new Map;for(let{colId:s,column:a,colKey:l,rowIndex:u,rowPinned:h,newValue:f,state:p}of e){const m=s?i.getCol(s):l?i.getCol(l):a;if(!m)continue;const v=Do(n,{rowIndex:u,rowPinned:h});if(!v)continue;const w=o.getValue(m,v,"data",!0);if(!t?.forceRefreshOfEditCellsOnly&&!so({pendingValue:f,sourceValue:w})&&p!=="editing")continue;let b=r.get(v);b||(b=new Map,r.set(v,b)),f===void 0&&(f=fn),b.set(m,{editorValue:void 0,pendingValue:f,sourceValue:w,state:p??"changed",editorState:{isCancelAfterEnd:void 0,isCancelBeforeStart:void 0}})}this.setEditMap(r,t)}onCellFocused(e){const t=ft(this.beans,e);if(!t||!this.isEditing(t,Xs))return;const n=this.model.getEdit(t);if(!n||!so(n))return;const o=this.getLocaleTextFunc()("ariaPendingChange","Pending Change");this.beans.ariaAnnounce?.announceValue(o,"pendingChange")}allowedFocusTargetOnValidation(e){return ft(this.beans,e)}};function p4(e){return{rowNodes:e?Array.from(e.keys()):void 0,columns:e?[...new Set(Array.from(e.values()).flatMap(t=>Array.from(t.keys())))]:void 0}}function Ex(e,t){return t??e.get("editType")??"singleCell"}var Dx=class extends X{postConstruct(){this.model=this.beans.editModelSvc,this.editSvc=this.beans.editSvc,this.addManagedEventListeners({cellFocused:this.onCellFocusChanged?.bind(this),cellFocusCleared:this.onCellFocusChanged?.bind(this)})}clearEdits(e){this.model.clearEditValue(e)}onCellFocusChanged(e){let t;const n=e.previousParams,{editSvc:i,beans:o}=this,r=e.type==="cellFocused"?e.sourceEvent:null;n&&(t=ft(o,n));const{gos:s,editModelSvc:a}=o,l=e.type==="cellFocusCleared";if(i.isEditing(void 0,{withOpenEditor:!0})){const{column:u,rowIndex:h,rowPinned:f}=e,p={column:u,rowNode:Do(o,{rowIndex:h,rowPinned:f})},m=s.get("invalidEditValueMode")==="block";if(m)return;const v=!m,w=!!a?.getCellValidationModel().hasCellValidation(p),b=v&&w;!(n||l)||i.stopEditing(void 0,{cancel:b,source:l&&v?"api":void 0,event:r})||(i.isBatchEditing()?i.cleanupEditors():i.stopEditing(void 0,{source:"api"}))}t?.refreshCell({suppressFlash:!0,force:!0})}stopCancelled(e){const t=this.editSvc.isBatchEditing()&&!e;for(const n of this.model.getEditPositions())Oc(this.beans,n,{cancel:!0},ft(this.beans,n)),this.model.stop(n,t,!0);return!0}stopCommitted(e,t){const n=this.model.getEditPositions(),i={all:[],pass:[],fail:[]};for(const s of n)i.all.push(s),(this.model.getCellValidationModel().getCellValidation(s)?.errorMessages?.length??0)>0?i.fail.push(s):i.pass.push(s);const o=this.processValidationResults(i),r=this.editSvc.isBatchEditing()&&!t;for(const s of o.destroy)Oc(this.beans,s,{event:e},ft(this.beans,s)),this.model.stop(s,r,!1);for(const s of o.keep){const a=ft(this.beans,s);!this.editSvc.cellEditingInvalidCommitBlocks()&&a&&this.editSvc.revertSingleCellEdit(a)}return!0}cleanupEditors({rowNode:e}={},t){Yr(this.beans,{persist:!1});const n=this.model.getEditPositions(),i=[];if(e)for(const o of n)o.rowNode!==e&&i.push(o);else for(const o of n)i.push(o);Zr(this.beans,i),Lc(this.beans,t)}setFocusOutOnEditor(e){e.comp?.getCellEditor()?.focusOut?.()}setFocusInOnEditor(e){const t=e.comp,n=t?.getCellEditor();if(n?.focusIn)n.focusIn();else{const i=this.beans.gos.get("editType")==="fullRow";e.focusCell(i),e.onEditorAttachedFuncs.push(()=>t?.getCellEditor()?.focusIn?.())}}setupEditors(e){const{event:t,ignoreEventKey:n=!1,startedEdit:i,position:o,cells:r=this.model.getEditPositions()}=e,s=t instanceof KeyboardEvent&&!n&&t.key||void 0;H5(this.beans,r,o,s,t,i)}dispatchCellEvent(e,t,n,i){const o=ft(this.beans,e);o&&this.eventSvc.dispatchEvent({...o.createEvent(t??null,n),...i})}dispatchRowEvent(e,t,n){if(n)return;const i=Ch(this.beans,e);i&&this.eventSvc.dispatchEvent(i.createRowEvent(t))}shouldStop(e,t,n="ui"){const i=this.editSvc.isBatchEditing();return i&&n==="api"?!0:i&&(n==="ui"||n==="edit")?!1:n==="api"?!0:t instanceof KeyboardEvent&&!i?t.key===q.ENTER:null}shouldCancel(e,t,n="ui"){const i=this.editSvc.isBatchEditing();return!!(t instanceof KeyboardEvent&&!i&&t.key===q.ESCAPE||i&&n==="api"||n==="api")}setEditMap(e,t){t?.update||this.editSvc.stopEditing(void 0,{cancel:!0,source:"api"});const n=[];if(e.forEach((i,o)=>{i.forEach((r,s)=>{r.state==="editing"&&n.push({...r,rowNode:o,column:s})})}),t?.update&&(e=new Map([...this.model.getEditMap(),...e])),this.model?.setEditMap(e),n.length>0){const i=n.at(-1),o=i.pendingValue===fn?void 0:i.pendingValue;this.start({position:i,event:new KeyboardEvent("keydown",{key:o}),source:"api"});const r=ft(this.beans,i);r&&this.setFocusInOnEditor(r)}}destroy(){this.cleanupEditors(),super.destroy()}},g4=class extends Dx{constructor(){super(...arguments),this.beanName="fullRow",this.startedRows=new Set}shouldStop(e,t,n="ui"){const{rowNode:i,beans:o}=this,{rowNode:r}=e||{};if(!Ch(o,{rowNode:i}))return!0;const a=super.shouldStop({rowNode:i},t,n);return a!==null?a:i?r!==i:!1}midBatchInputsAllowed({rowNode:e}){return e?this.model.hasEdits({rowNode:e}):!1}clearEdits(e){this.model.clearEditValue(e)}start(e){const{position:t,silent:n,startedEdit:i,event:o,ignoreEventKey:r}=e,{rowNode:s}=t,{beans:a,model:l,startedRows:u}=this;this.rowNode!==s&&super.cleanupEditors(t);const h=a.visibleCols.allCols,f=[],p=[];for(const m of h)m.isCellEditable(s)&&p.push(m);if(p.length!=0){u.has(s)||(this.dispatchRowEvent({rowNode:s},"rowEditingStarted",n),u.add(s));for(const m of p){const v={rowNode:s,column:m};f.push(v),l.start(v)}this.rowNode=s,this.setupEditors({cells:f,position:t,startedEdit:i,event:o,ignoreEventKey:r})}}processValidationResults(e){return e.fail.length>0&&this.editSvc.cellEditingInvalidCommitBlocks()?{destroy:[],keep:e.all}:{destroy:e.all,keep:[]}}stopCancelled(e){const{rowNode:t,model:n}=this;return t&&!n.hasRowEdits(t)?!1:(super.stopCancelled(e),this.cleanupEditors({rowNode:t},!0),this.rowNode=void 0,!0)}stopCommitted(e,t){const{rowNode:n,beans:i,model:o,editSvc:r}=this;if(n&&!o.hasRowEdits(n))return!1;const s=[];if(o.getEditMap().forEach((a,l)=>{if(!(!a||a.size===0)){for(const u of a.values())if(so(u)){s.push(l);break}}}),Xr(i),r.checkNavWithValidation({rowNode:n})==="block-stop")return!1;if(super.stopCommitted(e,t),t||!r.isBatchEditing())for(const a of s)this.dispatchRowEvent({rowNode:a},"rowValueChanged");return this.cleanupEditors({rowNode:n},!0),this.rowNode=void 0,!0}onCellFocusChanged(e){const{rowIndex:t}=e,n=e.previousParams;if(n?.rowIndex===t||e.sourceEvent instanceof KeyboardEvent)return;const{beans:i,gos:o,model:r}=this;if(i.editSvc?.isRangeSelectionEnabledWhileEditing())return;const s=ft(i,n);o.get("invalidEditValueMode")==="block"&&s&&(r.getCellValidationModel().getCellValidation(s)||r.getRowValidationModel().getRowValidation(s))||super.onCellFocusChanged(e)}cleanupEditors(e={},t){super.cleanupEditors(e,t);const{startedRows:n}=this;for(const i of n)this.dispatchRowEvent({rowNode:i},"rowEditingStopped"),this.destroyEditorsForRow(i);n.clear()}destroyEditorsForRow(e){const t=Ch(this.beans,{rowNode:e});if(!t)return;const n={};for(const i of t.getAllCellCtrls())i.comp?.getCellEditor()&&Oc(this.beans,i,n,i)}moveToNextEditingCell(e,t,n,i="ui",o=!1){const{beans:r,model:s,gos:a,editSvc:l}=this,u=e.cellPosition;let h;s.suspend(!0);try{h=r.navigation?.findNextCellToFocusOn(u,{backwards:t,startEditing:!0,skipToNextEditableCell:!1})}finally{s.suspend(!1)}if(h===!1)return null;if(h==null)return!1;const f=h.cellPosition,p=e.isCellEditable(),m=h.isCellEditable(),v=f&&u.rowIndex===f.rowIndex&&u.rowPinned===f.rowPinned;p&&this.setFocusOutOnEditor(e),this.restoreEditors();const w=a.get("suppressStartEditOnTab");return m&&!o?w?h.focusCell(!0,n):(h.comp?.getCellEditor()||qs(r,h,{event:n,cellStartedEdit:!0}),this.setFocusInOnEditor(h),h.focusCell(!1,n)):(m&&o&&this.setFocusInOnEditor(h),h.focusCell(!0,n)),!v&&!o&&(l?.stopEditing({rowNode:e.rowNode},{event:n,forceStop:!0}),l?.isRowEditing(e.rowNode,{withOpenEditor:!0})&&this.cleanupEditors(h,!0),w?h.focusCell(!0,n):l.startEditing(h,{startedEdit:!0,event:n,source:i,ignoreEventKey:!0,editable:m||void 0})),e.rowCtrl?.refreshRow({suppressFlash:!0,force:!0}),!0}restoreEditors(){const{beans:e,model:t}=this;t.getEditMap().forEach((n,i)=>n.forEach(({state:o},r)=>{if(o!=="editing")return;const s=ft(e,{rowNode:i,column:r});s&&!s.comp?.getCellEditor()&&qs(e,s,{silent:!0})}))}destroy(){super.destroy(),this.rowNode=void 0,this.startedRows.clear()}},m4=class extends Dx{constructor(){super(...arguments),this.beanName="singleCell"}shouldStop(e,t,n="ui"){const i=super.shouldStop(e,t,n);if(i!==null)return i;const o=e?.rowNode,r=e?.column,s=this.rowNode,a=this.column;return(!s||!a)&&o&&r?null:s!==o||a!==r?!0:!s&&!a?this.model.hasEdits(void 0,{withOpenEditor:!0}):!1}midBatchInputsAllowed(e){return this.model.hasEdits(e)}start(e){const{position:t,startedEdit:n,event:i,ignoreEventKey:o}=e;(this.rowNode!==t.rowNode||this.column!==t.column)&&super.cleanupEditors(),this.rowNode=t.rowNode,this.column=t.column,this.model.start(t),this.setupEditors({cells:[t],position:t,startedEdit:n,event:i,ignoreEventKey:o})}dispatchRowEvent(e,t,n){}processValidationResults(e){return e.fail.length>0&&this.editSvc.cellEditingInvalidCommitBlocks()?{destroy:[],keep:e.all}:{destroy:e.all,keep:[]}}stopCancelled(e){return super.stopCancelled(e),this.clearPosition()}stopCommitted(e,t){return super.stopCommitted(e,t),this.clearPosition()}clearPosition(){return this.rowNode=void 0,this.column=void 0,!0}onCellFocusChanged(e){const{colModel:t,editSvc:n}=this.beans,{rowIndex:i,column:o,rowPinned:r}=e,s=Do(this.beans,{rowIndex:i,rowPinned:r}),a=Km(o),l=t.getCol(a),u=e.previousParams;if(u){const h=Km(u.column);if(u?.rowIndex===i&&h===a&&u?.rowPinned===r)return}e.type=="cellFocused"&&(n?.isRangeSelectionEnabledWhileEditing()||n?.isEditing({rowNode:s,column:l},{withOpenEditor:!0}))||super.onCellFocusChanged(e)}moveToNextEditingCell(e,t,n,i="ui",o=!1){const r=this.beans.focusSvc.getFocusedCell();r&&(e=Za(this.beans,r)??e);const s=e.cellPosition;let a;const l=this.beans.gos.get("editType")==="fullRow";l&&this.model.suspend(!0),o||(e.eGui.focus(),this.editSvc?.stopEditing(e,{source:this.editSvc?.isBatchEditing()?"ui":"api",event:n}));try{a=this.beans.navigation?.findNextCellToFocusOn(s,{backwards:t,startEditing:!0})}finally{l&&this.model.suspend(!1)}if(a===!1)return null;if(a==null)return!1;const u=a.cellPosition,h=e.isCellEditable(),f=a.isCellEditable(),p=u&&s.rowIndex===u.rowIndex&&s.rowPinned===u.rowPinned;h&&!o&&this.setFocusOutOnEditor(e);const m=this.gos.get("suppressStartEditOnTab");let v=!1;if(!p&&!o&&(super.cleanupEditors(a,!0),m?a.focusCell(!0,n):(v=!0,this.editSvc.startEditing(a,{startedEdit:!0,event:n,source:i,ignoreEventKey:!0,editable:f}))),f&&!o){if(a.focusCell(!1,n),m)a.focusCell(!0,n);else if(!a.comp?.getCellEditor()){if(!v){const w=this.editSvc?.isEditing(a,{withOpenEditor:!0});qs(this.beans,a,{event:n,cellStartedEdit:!0,silent:w})}this.setFocusInOnEditor(a),this.cleanupEditors(a)}}else f&&o&&this.setFocusInOnEditor(a),a.focusCell(!0,n);return e.rowCtrl?.refreshRow({suppressFlash:!0,force:!0}),!0}destroy(){super.destroy(),this.rowNode=void 0,this.column=void 0}},es={moduleName:"EditCore",version:ve,beans:[N5,f4],apiFunctions:{getEditingCells:Uz,getEditRowValues:zz,getCellEditorInstances:G5,startEditingCell:Kz,stopEditing:$z,isEditing:jz,validateEdit:qz},dynamicBeans:{singleCell:m4,fullRow:g4},dependsOn:[Ph,Cx],css:[cz]},v4={moduleName:"UndoRedoEdit",version:ve,beans:[lz],apiFunctions:{undoCellEditing:Vz,redoCellEditing:Wz,getCurrentUndoSize:Qz,getCurrentRedoSize:Yz},dependsOn:[es]},C4={moduleName:"TextEditor",version:ve,userComponents:{agCellEditor:yx,agTextCellEditor:yx},dependsOn:[es]},w4={moduleName:"NumberEditor",version:ve,userComponents:{agNumberCellEditor:{classImp:Pz}},dependsOn:[es]},b4={moduleName:"DateEditor",version:ve,userComponents:{agDateCellEditor:gz,agDateStringCellEditor:Cz},dependsOn:[es]},y4={moduleName:"CheckboxEditor",version:ve,userComponents:{agCheckboxCellEditor:dz},dependsOn:[es]},S4={moduleName:"SelectEditor",version:ve,userComponents:{agSelectCellEditor:Bz},dependsOn:[es]},R4={moduleName:"LargeTextEditor",version:ve,userComponents:{agLargeTextCellEditor:Sz},dependsOn:[es]},F4={moduleName:"CustomEditor",version:ve,dependsOn:[es]},Tx={agSetColumnFilter:"agSetColumnFilterHandler",agMultiColumnFilter:"agMultiColumnFilterHandler",agGroupColumnFilter:"agGroupColumnFilterHandler",agNumberColumnFilter:"agNumberColumnFilterHandler",agBigIntColumnFilter:"agBigIntColumnFilterHandler",agDateColumnFilter:"agDateColumnFilterHandler",agTextColumnFilter:"agTextColumnFilterHandler"},x4=new Set(Object.values(Tx));function ts(e,t){const n=e.filterUi;if(!n)return null;if(n.created)return n.promise;if(t)return null;const i=n.create(n.refreshed),o=n;return o.created=!0,o.promise=i,i}function P4(e,t,n,i,o,r,s){return t.refresh?.({...n,model:i,source:r,additionalEventAttributes:s}),e().then(a=>{if(a){const{filter:l,filterParams:u}=a;Ax(l,u,i,o,r,s)}})}function Ax(e,t,n,i,o,r){e?.refresh?.({...t,model:n,state:i,source:o,additionalEventAttributes:r})}function Ix(e,t,n,i){const o=e();o?.created&&o.promise.then(r=>{const s=t();Ax(r,o.filterParams,s,n()??{model:s},"ui",i)})}function Mx(e){let t,n=!1,i;const{action:o,filterParams:r,getFilterUi:s,getModel:a,getState:l,updateState:u,updateModel:h,processModelToApply:f}=e;switch(o){case"apply":{const p=l();i=p?.model??null,f&&(i=f(i)),t={state:p?.state,model:i},n=!0;break}case"clear":{t={model:null},r?.buttons?.includes("apply")||(n=!0,i=null);break}case"reset":{t={model:null},n=!0,i=null;break}case"cancel":{t={model:a()};break}}u(t),n?h(i):Ix(s,a,l,{fromAction:o})}function pn(e,t){return e[t]??null}var E4=class extends cm{constructor(){super(...arguments),this.iconCreated=!1}wireComp(e,t,n,i,o){this.comp=e;const r=Tc(this,this.beans.context,o);this.eButtonShowMainFilter=n,this.eFloatingFilterBody=i,this.setGui(t,r),this.setupActive(),this.refreshHeaderStyles(),this.setupWidth(r),this.setupLeft(r),this.setupHover(r),this.setupFocus(r),this.setupAria(),this.setupFilterButton(),this.setupUserComp(),this.setupSyncWithFilter(r),this.setupUi(),r.addManagedElementListeners(this.eButtonShowMainFilter,{click:this.showParentFilter.bind(this)}),this.setupFilterChangedListener(r);const s=()=>this.onColDefChanged(r);r.addManagedListeners(this.column,{colDefChanged:s}),r.addManagedEventListeners({filterSwitched:({column:a})=>{a===this.column&&s()}}),r.addDestroyFunc(()=>{this.eButtonShowMainFilter=null,this.eFloatingFilterBody=null,this.userCompDetails=null,this.clearComponent()})}resizeHeader(){}moveHeader(){}getHeaderClassParams(){const{column:e,beans:t}=this,n=e.colDef;return We(t.gos,{colDef:n,column:e,floatingFilter:!0})}setupActive(){const e=this.column.getColDef(),t=!!e.filter,n=!!e.floatingFilter;this.active=t&&n}setupUi(){if(this.comp.setButtonWrapperDisplayed(!this.suppressFilterButton&&this.active),this.comp.addOrRemoveBodyCssClass("ag-floating-filter-full-body",this.suppressFilterButton),this.comp.addOrRemoveBodyCssClass("ag-floating-filter-body",!this.suppressFilterButton),!this.active||this.iconCreated)return;const e=ii("filter",this.beans,this.column);e&&(this.iconCreated=!0,this.eButtonShowMainFilter.appendChild(e))}setupFocus(e){e.createManagedBean(new Fc(this.eGui,{shouldStopEventPropagation:this.shouldStopEventPropagation.bind(this),onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this)}))}setupAria(){const e=this.getLocaleTextFunc();Na(this.eButtonShowMainFilter,e("ariaFilterMenuOpen","Open Filter Menu"))}onTabKeyDown(e){const{beans:t}=this;if(It(t)===this.eGui)return;const o=Hs(t,this.eGui,null,e.shiftKey);if(o){t.headerNavigation?.scrollToColumn(this.column),e.preventDefault(),o.focus();return}const r=this.findNextColumnWithFloatingFilter(e.shiftKey);r&&t.focusSvc.focusHeaderPosition({headerPosition:{headerRowIndex:this.rowCtrl.rowIndex,column:r},event:e})&&e.preventDefault()}findNextColumnWithFloatingFilter(e){const t=this.beans.visibleCols;let n=this.column;do if(n=e?t.getColBefore(n):t.getColAfter(n),!n)break;while(!n.getColDef().filter||!n.getColDef().floatingFilter);return n}handleKeyDown(e){super.handleKeyDown(e);const t=this.getWrapperHasFocus();switch(e.key){case q.UP:case q.DOWN:case q.LEFT:case q.RIGHT:if(t)return;Vs(e);case q.ENTER:t&&Gs(this.eGui)&&e.preventDefault();break;case q.ESCAPE:t||this.eGui.focus()}}onFocusIn(e){if(this.eGui.contains(e.relatedTarget))return;const n=!!e.relatedTarget&&!e.relatedTarget.classList.contains("ag-floating-filter"),i=!!e.relatedTarget&&As(e.relatedTarget,"ag-floating-filter");if(n&&i&&e.target===this.eGui){const o=this.lastFocusEvent,r=!!(o&&o.key===q.TAB);if(o&&r){const s=o.shiftKey;Gs(this.eGui,s)}}this.focusThis()}setupHover(e){this.beans.colHover?.addHeaderFilterColumnHoverListener(e,this.comp,this.column,this.eGui)}setupLeft(e){const t=new lm(this.column,this.eGui,this.beans);e.createManagedBean(t)}setupFilterButton(){this.suppressFilterButton=!this.beans.menuSvc?.isFloatingFilterButtonEnabled(this.column),this.highlightFilterButtonWhenActive=!ni(this.gos)}setupUserComp(){if(!this.active)return;const e=this.beans.colFilter?.getFloatingFilterCompDetails(this.column,()=>this.showParentFilter());e&&this.setCompDetails(e)}setCompDetails(e){this.userCompDetails=e,this.comp.setCompDetails(e)}showParentFilter(){const e=this.suppressFilterButton?this.eFloatingFilterBody:this.eButtonShowMainFilter;this.beans.menuSvc?.showFilterMenu({column:this.column,buttonElement:e,containerType:"floatingFilter",positionBy:"button"})}setupSyncWithFilter(e){if(!this.active)return;const{beans:{colFilter:t},column:n,gos:i}=this,o=r=>{if(r?.source==="filterDestroyed"&&(!this.isAlive()||!t?.isAlive()))return;const s=this.comp.getFloatingFilterComp();s&&s.then(a=>{if(a){if(i.get("enableFilterHandlers")){const h=r;let f="filter";h?.afterFloatingFilter?f="ui":h?.afterDataChange?f="dataChanged":r?.source==="api"&&(f="api"),this.updateFloatingFilterParams(this.userCompDetails,f);return}const l=t?.getCurrentFloatingFilterParentModel(n),u=r?{...r,columns:r.columns??[],source:r.source==="api"?"api":"columnFilter"}:null;a.onParentModelChanged(l,u)}})};[this.destroySyncListener]=e.addManagedListeners(n,{filterChanged:o}),t?.isFilterActive(n)&&o(null)}setupWidth(e){const t=()=>{const n=`${this.column.getActualWidth()}px`;this.comp.setWidth(n)};e.addManagedListeners(this.column,{widthChanged:t}),t()}setupFilterChangedListener(e){this.active&&([this.destroyFilterChangedListener]=e.addManagedListeners(this.column,{filterChanged:this.updateFilterButton.bind(this)}),this.updateFilterButton())}updateFilterButton(){if(!this.suppressFilterButton&&this.comp){const e=!!this.beans.filterManager?.isFilterAllowed(this.column);this.comp.setButtonWrapperDisplayed(e),this.highlightFilterButtonWhenActive&&e&&this.eButtonShowMainFilter.classList.toggle("ag-filter-active",this.column.isFilterActive())}}onColDefChanged(e){const t=this.active;this.setupActive();const n=!t&&this.active;t&&!this.active&&(this.destroySyncListener(),this.destroyFilterChangedListener());const i=this.beans.colFilter,o=this.active?i?.getFloatingFilterCompDetails(this.column,()=>this.showParentFilter()):null,r=this.comp.getFloatingFilterComp();!r||!o?this.updateCompDetails(e,o,n):r.then(s=>{!s||i?.areFilterCompsDifferent(this.userCompDetails??null,o)?this.updateCompDetails(e,o,n):this.updateFloatingFilterParams(o,"colDef")})}updateCompDetails(e,t,n){this.isAlive()&&(this.setCompDetails(t),this.setupFilterButton(),this.setupUi(),n&&(this.setupSyncWithFilter(e),this.setupFilterChangedListener(e)))}updateFloatingFilterParams(e,t){if(!e)return;let n=e.params;this.comp.getFloatingFilterComp()?.then(i=>{typeof i?.refresh=="function"&&(this.gos.get("enableFilterHandlers")&&(n={...n,model:pn(this.beans.colFilter?.model??{},this.column.getColId()),source:t}),i.refresh(n))})}addResizeAndMoveKeyboardListeners(){}destroy(){super.destroy(),this.destroySyncListener=null,this.destroyFilterChangedListener=null}};function D4(e,t){const n=e.colModel.getCol(t);if(!n){gt(12,{colKey:t});return}e.menuSvc?.showColumnMenu({column:n,positionBy:"auto"})}function T4(e){e.menuSvc?.hidePopupMenu()}var A4=class extends X{constructor(){super(...arguments),this.beanName="menuSvc"}postConstruct(){const{enterpriseMenuFactory:e,filterMenuFactory:t}=this.beans;this.activeMenuFactory=e??t}showColumnMenu(e){this.showColumnMenuCommon(this.activeMenuFactory,e,"columnMenu")}showFilterMenu(e){this.showColumnMenuCommon(Lx(this.beans),e,e.containerType,!0)}showHeaderContextMenu(e,t,n){this.activeMenuFactory?.showMenuAfterContextMenuEvent(e,t,n)}hidePopupMenu(){this.beans.contextMenuSvc?.hideActiveMenu(),this.activeMenuFactory?.hideActiveMenu()}hideFilterMenu(){Lx(this.beans)?.hideActiveMenu()}isColumnMenuInHeaderEnabled(e){const{suppressHeaderMenuButton:t}=e.getColDef();return!t&&!!this.activeMenuFactory?.isMenuEnabled(e)&&(ni(this.gos)||!!this.beans.enterpriseMenuFactory)}isFilterMenuInHeaderEnabled(e){return!e.getColDef().suppressHeaderFilterButton&&!!this.beans.filterManager?.isFilterAllowed(e)}isHeaderContextMenuEnabled(e){return!(e&&Hr(e)?e.getColDef():e?.getColGroupDef())?.suppressHeaderContextMenu&&this.gos.get("columnMenu")==="new"}isHeaderMenuButtonAlwaysShowEnabled(){return this.isSuppressMenuHide()}isHeaderMenuButtonEnabled(){const e=!this.isSuppressMenuHide();return!(Ns()&&e)}isHeaderFilterButtonEnabled(e){return this.isFilterMenuInHeaderEnabled(e)&&!ni(this.gos)&&!this.isFloatingFilterButtonDisplayed(e)}isFilterMenuItemEnabled(e){return!!this.beans.filterManager?.isFilterAllowed(e)&&!ni(this.gos)&&!this.isFilterMenuInHeaderEnabled(e)&&!this.isFloatingFilterButtonDisplayed(e)}isFloatingFilterButtonEnabled(e){return!e.getColDef().suppressFloatingFilterButton}isFloatingFilterButtonDisplayed(e){return!!e.getColDef().floatingFilter&&this.isFloatingFilterButtonEnabled(e)}isSuppressMenuHide(){const e=this.gos,t=e.get("suppressMenuHide");return ni(e)?e.exists("suppressMenuHide")?t:!1:t}showColumnMenuCommon(e,t,n,i){const{positionBy:o,onClosedCallback:r}=t,s=t.column;if(o==="button"){const{buttonElement:a}=t;e?.showMenuAfterButtonClick(s,a,n,r,i)}else if(o==="mouse"){const{mouseEvent:a}=t;e?.showMenuAfterMouseEvent(s,a,n,r,i)}else if(s){const a=this.beans,l=a.ctrlsSvc;l.getScrollFeature().ensureColumnVisible(s,"auto"),er(a,()=>{const u=l.getHeaderRowContainerCtrl(s.getPinned())?.getHeaderCtrlForColumn(s);u&&e?.showMenuAfterButtonClick(s,u.getAnchorElementForMenu(i),n,r,i)})}}};function kx(e,t,n){e.menuVisible!==t&&(e.menuVisible=t,e.dispatchColEvent("menuVisibleChanged",n))}function Lx(e){const{enterpriseMenuFactory:t,filterMenuFactory:n,gos:i}=e;return t&&ni(i)?t:n}var I4={moduleName:"SharedMenu",version:ve,beans:[A4],apiFunctions:{showColumnMenu:D4,hidePopupMenu:T4}},M4=".ag-set-filter{--ag-indentation-level:0}.ag-set-filter-item{align-items:center;display:flex;height:100%}:where(.ag-ltr) .ag-set-filter-item{padding-left:calc(var(--ag-widget-container-horizontal-padding) + var(--ag-indentation-level)*var(--ag-set-filter-indent-size))}:where(.ag-rtl) .ag-set-filter-item{padding-right:calc(var(--ag-widget-container-horizontal-padding) + var(--ag-indentation-level)*var(--ag-set-filter-indent-size))}.ag-set-filter-item-checkbox{display:flex;height:100%;width:100%}.ag-set-filter-group-icons{display:block;:where(.ag-set-filter-group-closed-icon),:where(.ag-set-filter-group-indeterminate-icon),:where(.ag-set-filter-group-opened-icon){cursor:pointer}}:where(.ag-ltr) .ag-set-filter-group-icons{margin-right:var(--ag-widget-container-horizontal-padding)}:where(.ag-rtl) .ag-set-filter-group-icons{margin-left:var(--ag-widget-container-horizontal-padding)}.ag-filter-body-wrapper{display:flex;flex-direction:column}:where(.ag-menu:not(.ag-tabs) .ag-filter) .ag-filter-body-wrapper{min-width:180px}.ag-filter-filter{flex:1 1 0px}.ag-filter-condition{display:flex;justify-content:center}.ag-floating-filter-body{display:flex;flex:1 1 auto;height:100%;position:relative}.ag-floating-filter-full-body{align-items:center;display:flex;flex:1 1 auto;height:100%;overflow:hidden;width:100%}.ag-floating-filter-input{align-items:center;display:flex;width:100%;>:where(.ag-date-floating-filter-wrapper),>:where(.ag-floating-filter-input),>:where(.ag-input-field){flex:1 1 auto}:where(.ag-input-field-input[type=date]),:where(.ag-input-field-input[type=datetime-local]){width:1px}}.ag-floating-filter-button{display:flex;flex:none}.ag-date-floating-filter-wrapper{display:flex}.ag-set-floating-filter-input :where(.ag-input-field-input)[disabled]{pointer-events:none}.ag-floating-filter-button-button{-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;height:var(--ag-icon-size);width:var(--ag-icon-size)}.ag-filter-loading{align-items:unset;background-color:var(--ag-chrome-background-color);height:100%;padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding);position:absolute;width:100%;z-index:1;:where(.ag-menu) &{background-color:var(--ag-menu-background-color)}}.ag-filter-separator{border-top:solid var(--ag-border-width) var(--menu-separator-color)}:where(.ag-filter-select) .ag-picker-field-wrapper{width:0}.ag-filter-condition-operator{height:17px}:where(.ag-ltr) .ag-filter-condition-operator-or{margin-left:calc(var(--ag-spacing)*2)}:where(.ag-rtl) .ag-filter-condition-operator-or{margin-right:calc(var(--ag-spacing)*2)}.ag-set-filter-select-all{padding-top:var(--ag-widget-container-vertical-padding)}.ag-filter-no-matches,.ag-set-filter-list{height:calc(var(--ag-list-item-height)*6)}.ag-filter-no-matches{padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding)}.ag-set-filter-tree-list{height:calc(var(--ag-list-item-height)*10)}.ag-set-filter-filter{margin-left:var(--ag-widget-container-horizontal-padding);margin-right:var(--ag-widget-container-horizontal-padding);margin-top:var(--ag-widget-container-vertical-padding)}.ag-filter-to{margin-top:var(--ag-widget-vertical-spacing)}.ag-mini-filter{margin:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding)}:where(.ag-ltr) .ag-set-filter-add-group-indent{margin-left:calc(var(--ag-icon-size) + var(--ag-widget-container-horizontal-padding))}:where(.ag-rtl) .ag-set-filter-add-group-indent{margin-right:calc(var(--ag-icon-size) + var(--ag-widget-container-horizontal-padding))}:where(.ag-filter-menu) .ag-set-filter-list{min-width:200px}.ag-filter-virtual-list-item:focus-visible{box-shadow:inset var(--ag-focus-shadow)}.ag-filter-apply-panel{display:flex;justify-content:flex-end;overflow:hidden;padding:var(--ag-widget-vertical-spacing) var(--ag-widget-container-horizontal-padding) var(--ag-widget-container-vertical-padding)}.ag-filter-apply-panel-button{line-height:1.5}:where(.ag-ltr) .ag-filter-apply-panel-button{margin-left:calc(var(--ag-spacing)*2)}:where(.ag-rtl) .ag-filter-apply-panel-button{margin-right:calc(var(--ag-spacing)*2)}.ag-simple-filter-body-wrapper{display:flex;flex-direction:column;gap:var(--ag-widget-vertical-spacing);min-height:calc(var(--ag-list-item-height) + var(--ag-widget-container-vertical-padding) + var(--ag-widget-vertical-spacing));overflow-y:auto;padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding);padding-bottom:var(--ag-widget-container-vertical-padding);:where(.ag-resizer-wrapper){margin:0}}.ag-multi-filter-menu-item{margin:var(--ag-spacing) 0}.ag-multi-filter-group-title-bar{background-color:transparent;color:var(--ag-header-text-color);font-weight:500;padding:calc(var(--ag-spacing)*1.5) var(--ag-spacing)}.ag-group-filter-field-select-wrapper{display:flex;flex-direction:column;gap:var(--ag-widget-vertical-spacing);padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding)}";function k4(e){const t=e.filterManager;return!!t?.isColumnFilterPresent()||!!t?.isAggregateFilterPresent()}function L4(e,t){return e.filterManager?.getColumnFilterInstance(t)??Promise.resolve(void 0)}function O4(e,t){const n=e.colModel.getColDefCol(t);if(n)return e.colFilter?.destroyFilter(n,"api")}function _4(e,t){e.frameworkOverrides.wrapIncoming(()=>e.filterManager?.setFilterModel(t))}function N4(e){return e.filterManager?.getFilterModel()??{}}function B4(e,t,n){const{gos:i,colModel:o,colFilter:r}=e;n&&!i.get("enableFilterHandlers")&&(se(288),n=!1);const s=o.getColDefCol(t);return s?r?.getModelForColumn(s,n)??null:null}function G4(e,t,n){return e.filterManager?.setColumnFilterModel(t,n)??Promise.resolve()}function H4(e,t){const n=e.colModel.getCol(t);if(!n){gt(12,{colKey:t});return}e.menuSvc?.showFilterMenu({column:n,containerType:"columnFilter",positionBy:"auto"})}function V4(e){e.menuSvc?.hideFilterMenu()}function W4(e,t){const n=e.colModel.getCol(t);if(!n){gt(12,{colKey:t});return}return e.colFilter?.getHandler(n,!0)}function z4(e,t){const{colModel:n,colFilter:i,gos:o}=e;if(!o.get("enableFilterHandlers")){se(287);return}const{colId:r,action:s}=t;if(r){const a=n.getColById(r);a&&i?.updateModel(a,s)}else i?.updateAllModels(s)}var Ox={january:"January",february:"February",march:"March",april:"April",may:"May",june:"June",july:"July",august:"August",september:"September",october:"October",november:"November",december:"December"},_x=["january","february","march","april","may","june","july","august","september","october","november","december"];function U4(e,t){return e==null?-1:t==null?1:Number.parseFloat(e)-Number.parseFloat(t)}function $4(e,t){if(e==null)return-1;if(t==null)return 1;const n=oi(e),i=oi(t);return n!=null&&i!=null?n===i?0:n>i?1:-1:String(e).localeCompare(String(t))}function Nx(e){return e instanceof Date&&!isNaN(e.getTime())}var fv={number:()=>{},bigint:()=>{},boolean:()=>({maxNumConditions:1,debounceMs:0,filterOptions:["empty",{displayKey:"true",displayName:"True",predicate:(e,t)=>t,numberOfInputs:0},{displayKey:"false",displayName:"False",predicate:(e,t)=>t===!1,numberOfInputs:0}]}),date:()=>({isValidDate:Nx}),dateString:({dataTypeDefinition:e})=>({comparator:(t,n)=>{const i=e.dateParser(n);return n==null||i<t?-1:i>t?1:0},isValidDate:t=>typeof t=="string"&&Nx(e.dateParser(t))}),dateTime:e=>fv.date(e),dateTimeString:e=>fv.dateString(e),object:()=>{},text:()=>{}},pv={number:()=>({comparator:U4}),bigint:()=>({comparator:$4}),boolean:({t:e})=>({valueFormatter:t=>we(t.value)?e(String(t.value),t.value?"True":"False"):e("blanks","(Blanks)")}),date:({formatValue:e,t})=>({valueFormatter:n=>{const i=e(n);return we(i)?i:t("blanks","(Blanks)")},treeList:!0,treeListFormatter:(n,i)=>{if(n==="NaN")return t("invalidDate","Invalid Date");if(i===1&&n!=null){const o=_x[Number(n)-1];return t(o,Ox[o])}return n??t("blanks","(Blanks)")},treeListPathGetter:n=>fh(n,!1)}),dateString:({formatValue:e,dataTypeDefinition:t,t:n})=>({valueFormatter:i=>{const o=e(i);return we(o)?o:n("blanks","(Blanks)")},treeList:!0,treeListPathGetter:i=>fh(t.dateParser(i??void 0),!1),treeListFormatter:(i,o)=>{if(o===1&&i!=null){const r=_x[Number(i)-1];return n(r,Ox[r])}return i??n("blanks","(Blanks)")}}),dateTime:e=>{const t=pv.date(e);return t.treeListPathGetter=fh,t},dateTimeString(e){const t=e.dataTypeDefinition.dateParser,n=pv.dateString(e);return n.treeListPathGetter=i=>fh(t(i??void 0)),n},object:({formatValue:e,t})=>({valueFormatter:n=>{const i=e(n);return we(i)?i:t("blanks","(Blanks)")}}),text:()=>{}};function j4(e,t,n,i,o,r,s){let a=t,l=n;const u=e==="agSetColumnFilter";!l&&i.baseDataType==="object"&&!u&&(l=({column:m,node:v})=>o({column:m,node:v,value:r.valueSvc.getValue(m,v,"data")}));const f=(u?pv:fv)[i.baseDataType],p=f({dataTypeDefinition:i,formatValue:o,t:s});return a=typeof t=="object"?{...p,...t}:p,{filterParams:a,filterValueGetter:l}}var K4={boolean:"agTextColumnFilter",date:"agDateColumnFilter",dateString:"agDateColumnFilter",dateTime:"agDateColumnFilter",dateTimeString:"agDateColumnFilter",bigint:"agBigIntColumnFilter",number:"agNumberColumnFilter",object:"agTextColumnFilter",text:"agTextColumnFilter"},q4={boolean:"agTextColumnFloatingFilter",date:"agDateColumnFloatingFilter",dateString:"agDateColumnFloatingFilter",dateTime:"agDateColumnFloatingFilter",dateTimeString:"agDateColumnFloatingFilter",bigint:"agBigIntColumnFloatingFilter",number:"agNumberColumnFloatingFilter",object:"agTextColumnFloatingFilter",text:"agTextColumnFloatingFilter"};function Q4(e,t=!1){return(t?q4:K4)[e??"text"]}function Y4(e,t,n){if(t==null)return null;let i=null;const{compName:o,jsComp:r,fwComp:s}=I0(e,t);return o?i={agSetColumnFilter:"agSetColumnFloatingFilter",agMultiColumnFilter:"agMultiColumnFloatingFilter",agGroupColumnFilter:"agGroupColumnFloatingFilter",agNumberColumnFilter:"agNumberColumnFloatingFilter",agBigIntColumnFilter:"agBigIntColumnFloatingFilter",agDateColumnFilter:"agDateColumnFloatingFilter",agTextColumnFilter:"agTextColumnFloatingFilter"}[o]:r==null&&s==null&&t.filter===!0&&(i=n()),i}var Z4={filterHandler:()=>({doesFilterPass:()=>!0})};function Bx(e,t,n,i){if(!e.isPrimary())return!0;const r=!n;return!e.isValueActive()||!r?!1:t?!0:i}var X4=class extends X{constructor(){super(...arguments),this.beanName="colFilter",this.allColumnFilters=new Map,this.allColumnListeners=new Map,this.activeAggregateFilters=[],this.activeColumnFilters=[],this.processingFilterChange=!1,this.modelUpdates=[],this.columnModelUpdates=[],this.state=new Map,this.handlerMap={...Tx},this.isGlobalButtons=!1,this.activeFilterComps=new Set}postConstruct(){this.addManagedEventListeners({gridColumnsChanged:this.onColumnsChanged.bind(this),dataTypesInferred:this.processFilterModelUpdateQueue.bind(this)}),this.addManagedPropertyListener("pivotMode",this.onPivotModeChanged.bind(this));const e=this.gos,t={...e.get("initialState")?.filter?.filterModel??{}};this.initialModel=t,this.model={...t},e.get("enableFilterHandlers")||delete this.handlerMap.agMultiColumnFilter}refreshModel(){this.onNewRowsLoaded("rowDataUpdated")}setModel(e,t="api",n){const{colModel:i,dataTypeSvc:o,filterManager:r}=this.beans;if(o?.isPendingInference){this.modelUpdates.push({model:e,source:t});return}const s=[],a=this.getModel(!0);if(e){const l=new Set(Object.keys(e));this.allColumnFilters.forEach((u,h)=>{const f=e[h];s.push(this.setModelOnFilterWrapper(u,f)),l.delete(h)}),l.forEach(u=>{const h=i.getColDefCol(u)||i.getCol(u);if(!h){se(62,{colId:u});return}if(!h.isFilterAllowed()){se(63,{colId:u});return}const f=this.getOrCreateFilterWrapper(h,!0);if(!f){se(64,{colId:u});return}s.push(this.setModelOnFilterWrapper(f,e[u],!0))})}else this.model={},this.allColumnFilters.forEach(l=>{s.push(this.setModelOnFilterWrapper(l,null))});Mt.all(s).then(()=>{const l=this.getModel(!0),u=[];this.allColumnFilters.forEach((h,f)=>{const p=a?a[f]:null,m=l?l[f]:null;sc(p,m)||u.push(h.column)}),u.length>0?r?.onFilterChanged({columns:u,source:t}):n&&this.updateActive("filterChanged")})}getModel(e){const t={},{allColumnFilters:n,initialModel:i,beans:{colModel:o}}=this;if(n.forEach((r,s)=>{const a=this.getModelFromFilterWrapper(r);we(a)&&(t[s]=a)}),!e)for(const r of Object.keys(i)){const s=i[r];we(s)&&!n.has(r)&&o.getCol(r)?.isFilterAllowed()&&(t[r]=s)}return t}setState(e,t,n="api"){if(this.state.clear(),t)for(const i of Object.keys(t)){const o=t[i];this.state.set(i,{model:pn(this.model,i),state:o})}this.setModel(e,n,!0)}getState(){const e=this.state;if(!e.size)return;const t={};let n=!1;return e.forEach((i,o)=>{const r=i.state;r!=null&&(n=!0,t[o]=r)}),n?t:void 0}getModelFromFilterWrapper(e){const n=e.column.getColId();if(e.isHandler)return pn(this.model,n);const i=e.filter;return i?typeof i.getModel!="function"?(se(66),null):i.getModel():pn(this.initialModel,n)}isFilterPresent(){return this.activeColumnFilters.length>0}isAggFilterPresent(){return!!this.activeAggregateFilters.length}disableFilters(){this.initialModel={};const{allColumnFilters:e}=this;return e.size?(e.forEach(t=>this.disposeFilterWrapper(t,"advancedFilterEnabled")),!0):!1}updateActiveFilters(){const e=l=>l?l.isFilterActive?l.isFilterActive():(se(67),!1):!1,{colModel:t,gos:n}=this.beans,i=!!_d(n),o=[],r=[],s=(l,u,h)=>{u&&(Bx(l,t.isPivotMode(),t.isPivotActive(),i)?o.push(h):r.push(h))},a=[];return this.allColumnFilters.forEach(l=>{const u=l.column,h=u.getColId();if(l.isHandler)a.push(Mt.resolve().then(()=>{s(u,this.isHandlerActive(u),{colId:h,isHandler:!0,handler:l.handler,handlerParams:l.handlerParams})}));else{const f=ts(l);f&&a.push(f.then(p=>{s(u,e(p),{colId:h,isHandler:!1,comp:p})}))}}),Mt.all(a).then(()=>{this.activeAggregateFilters=o,this.activeColumnFilters=r})}updateFilterFlagInColumns(e,t){const n=[];return this.allColumnFilters.forEach(i=>{const o=i.column;if(i.isHandler)n.push(Mt.resolve().then(()=>{this.setColFilterActive(o,this.isHandlerActive(o),e,t)}));else{const r=ts(i);r&&n.push(r.then(s=>{this.setColFilterActive(o,s.isFilterActive(),e,t)}))}}),this.beans.groupFilter?.updateFilterFlags(e,t),Mt.all(n)}doFiltersPass(e,t,n){const{data:i,aggData:o}=e,r=n?this.activeAggregateFilters:this.activeColumnFilters,s=n?o:i,a=this.model;for(let l=0;l<r.length;l++){const u=r[l],{colId:h,isHandler:f}=u;if(h!==t)if(f){const{handler:p,handlerParams:m}=u;if(!p.doesFilterPass({node:e,data:s,model:pn(a,h),handlerParams:m}))return!1}else{const p=u.comp;if(typeof p.doesFilterPass!="function"){gt(91);continue}if(!p.doesFilterPass({node:e,data:s}))return!1}}return!0}getHandlerParams(e){const t=this.allColumnFilters.get(e.getColId());return t?.isHandler?t.handlerParams:void 0}callOnFilterChangedOutsideRenderCycle(e){const{rowRenderer:t,filterManager:n}=this.beans,i=()=>{this.isAlive()&&n?.onFilterChanged(e)};t.isRefreshInProgress()?setTimeout(i,0):i()}updateBeforeFilterChanged(e={}){const{column:t,additionalEventAttributes:n}=e,i=t?.getColId();return this.updateActiveFilters().then(()=>this.updateFilterFlagInColumns("filterChanged",n).then(()=>{this.allColumnFilters.forEach(o=>{const{column:r,isHandler:s}=o;i!==r.getColId()&&(s&&o.handler.onAnyFilterChanged?.(),ts(o,s)?.then(a=>{typeof a?.onAnyFilterChanged=="function"&&a.onAnyFilterChanged()}))}),this.processingFilterChange=!0}))}updateAfterFilterChanged(){this.processingFilterChange=!1}isSuppressFlashingCellsBecauseFiltering(){return!(this.gos.get("allowShowChangeAfterFilter")??!1)&&this.processingFilterChange}onNewRowsLoaded(e){const t=[];this.allColumnFilters.forEach(n=>{const i=n.isHandler;i&&n.handler.onNewRowsLoaded?.();const o=ts(n,i);o&&t.push(o.then(r=>{r.onNewRowsLoaded?.()}))}),Mt.all(t).then(()=>this.updateActive(e,{afterDataChange:!0}))}updateActive(e,t){this.updateFilterFlagInColumns(e,t).then(()=>this.updateActiveFilters())}createGetValue(e,t){const{filterValueSvc:n,colModel:i}=this.beans;return(o,r)=>{const s=r?i.getCol(r):e;return s?n.getValue(s,o,t):void 0}}isFilterActive(e){const t=this.cachedFilter(e);if(t?.isHandler)return this.isHandlerActive(e);const n=t?.filter;return n?n.isFilterActive():pn(this.initialModel,e.getColId())!=null}isHandlerActive(e){const t=we(pn(this.model,e.getColId()));if(t)return t;const n=this.beans.groupFilter;return n?.isGroupFilter(e)?n.isFilterActive(e):!1}getOrCreateFilterUi(e){const t=this.getOrCreateFilterWrapper(e,!0);return t?ts(t):null}getFilterUiForDisplay(e){const t=this.getOrCreateFilterWrapper(e,!0);if(!t)return null;const n=ts(t);return n?n.then(i=>({comp:i,params:t.filterUi.filterParams,isHandler:t.isHandler})):null}getHandler(e,t){const n=this.getOrCreateFilterWrapper(e,t);return n?.isHandler?n.handler:void 0}getOrCreateFilterWrapper(e,t){if(!e.isFilterAllowed())return;let n=this.cachedFilter(e);return!n&&t&&(n=this.createFilterWrapper(e),this.setColumnFilterWrapper(e,n)),n}cachedFilter(e){return this.allColumnFilters.get(e.getColId())}getDefaultFilter(e,t=!1){return this.getDefaultFilterFromDataType(()=>this.beans.dataTypeSvc?.getBaseDataType(e),t)}getDefaultFilterFromDataType(e,t=!1){return yO(this.gos)?t?"agSetColumnFloatingFilter":"agSetColumnFilter":Q4(e(),t)}getDefaultFloatingFilter(e){return this.getDefaultFilter(e,!0)}createFilterComp(e,t,n,i,o,r){const s=()=>{const u=this.createFilterCompParams(e,o,r),h=i(u,o);return D_(this.beans.userCompFactory,t,h,n)},a=s();return a?{compDetails:a,createFilterUi:u=>(u?s():a).newAgStackInstance()}:null}createFilterInstance(e,t,n,i){const o=this.beans.selectableFilter;o?.isSelectable(t)&&(t=o.getFilterDef(e,t));const{handler:r,handlerParams:s,handlerGenerator:a}=this.createHandler(e,t,n)??{},l=this.createFilterComp(e,t,n,i,!!r,"init");if(!l)return{compDetails:null,createFilterUi:null,handler:r,handlerGenerator:a,handlerParams:s};const{compDetails:u,createFilterUi:h}=l;return this.isGlobalButtons&&(u.params?.buttons?.length||se(281,{colId:e.getColId()})),{compDetails:u,handler:r,handlerGenerator:a,handlerParams:s,createFilterUi:h}}createBaseFilterParams(e,t){const{filterManager:n,rowModel:i}=this.beans;return We(this.gos,{column:e,colDef:e.getColDef(),getValue:this.createGetValue(e),doesRowPassOtherFilter:t?()=>!0:o=>n?.doesRowPassOtherFilters(e.getColId(),o)??!0,rowModel:i})}createFilterCompParams(e,t,n,i){const o=this.filterChangedCallbackFactory(e),r=this.createBaseFilterParams(e,i);if(r.filterChangedCallback=o,r.filterModifiedCallback=i?()=>{}:s=>this.filterModified(e,s),t){const s=r,a=e.getColId(),l=pn(this.model,a);s.model=l,s.state=this.state.get(a)??{model:l},s.onModelChange=(u,h)=>{this.updateStoredModel(a,u),this.refreshHandlerAndUi(e,u,"ui",!1,h).then(()=>{o({...h,source:"columnFilter"})})},s.onStateChange=u=>{this.updateState(e,u),this.updateOrRefreshFilterUi(e)},s.onAction=(u,h,f)=>{this.updateModel(e,u,h),this.dispatchLocalEvent({type:"filterAction",column:e,action:u,event:f})},s.getHandler=()=>this.getHandler(e,!0),s.onUiChange=u=>this.filterUiChanged(e,u),s.source=n}return r}createFilterUiForHandler(e,t){return t?{created:!1,create:t,filterParams:e.params,compDetails:e}:null}createFilterUiLegacy(e,t,n){const i=t(),o={created:!0,create:t,filterParams:e.params,compDetails:e,promise:i};return i.then(n),o}createFilterWrapper(e){const{compDetails:t,handler:n,handlerGenerator:i,handlerParams:o,createFilterUi:r}=this.createFilterInstance(e,e.getColDef(),this.getDefaultFilter(e),a=>a),s=e.getColId();if(n)return delete this.initialModel[s],n.init?.({...o,source:"init",model:pn(this.model,s)}),{column:e,isHandler:!0,handler:n,handlerGenerator:i,handlerParams:o,filterUi:this.createFilterUiForHandler(t,r)};if(r){const a={column:e,filterUi:null,isHandler:!1};return a.filterUi=this.createFilterUiLegacy(t,r,l=>{a.filter=l??void 0}),a}return{column:e,filterUi:null,isHandler:!1}}createHandlerFunc(e,t,n){const{gos:i,frameworkOverrides:o,registry:r}=this.beans;let s;const a=m=>{const v=m.filter;if(P0(v)){const w=v.handler;return w||(s=v.doesFilterPass,s?()=>({doesFilterPass:s}):void 0)}return typeof v=="string"?v:void 0},l=i.get("enableFilterHandlers"),u=l?a(t):void 0,h=m=>()=>this.createBean(r.createDynamicBean(m,!0));let f,p;if(typeof u=="string"){const m=i.get("filterHandlers")?.[u];m!=null?f=m:x4.has(u)&&(f=h(u),p=u)}else f=u;if(!f){let m;const{compName:v,jsComp:w,fwComp:b}=I0(o,t);v?m=v:w==null&&b==null&&t.filter===!0&&(m=n),p=this.handlerMap[m],p&&(f=h(p))}return f?{filterHandler:f,handlerNameOrCallback:s??p}:l?(Yt(i)&&se(277,{colId:e.getColId()}),Z4):void 0}createHandler(e,t,n){const i=this.createHandlerFunc(e,t,n);if(!i)return;const o=Ng(this.beans.userCompFactory,t,this.createFilterCompParams(e,!0,"init")),{handlerNameOrCallback:r,filterHandler:s}=i,{handler:a,handlerParams:l}=this.createHandlerFromFunc(e,s,o);return{handler:a,handlerParams:l,handlerGenerator:r??s}}createHandlerFromFunc(e,t,n){const i=e.getColDef(),o=t(We(this.gos,{column:e,colDef:i})),r=this.createHandlerParams(e,n);return{handler:o,handlerParams:r}}createHandlerParams(e,t){const n=e.getColDef(),i=e.getColId(),o=this.filterChangedCallbackFactory(e);return We(this.gos,{colDef:n,column:e,getValue:this.createGetValue(e),doesRowPassOtherFilter:r=>this.beans.filterManager?.doesRowPassOtherFilters(i,r)??!0,onModelChange:(r,s)=>{this.updateStoredModel(i,r),this.refreshHandlerAndUi(e,r,"handler",!1,s).then(()=>{o({...s,source:"columnFilter"})})},onModelAsStringChange:()=>{e.dispatchColEvent("filterChanged","filterChanged"),this.dispatchLocalEvent({type:"filterModelAsStringChanged",column:e})},filterParams:t})}onColumnsChanged(){const e=[],{colModel:t,filterManager:n,groupFilter:i}=this.beans;this.allColumnFilters.forEach((r,s)=>{let a;r.column.isPrimary()?a=t.getColDefCol(s):a=t.getCol(s),!(a&&a===r.column)&&(e.push(r.column),this.disposeFilterWrapper(r,"columnChanged"),this.disposeColumnListener(s))});const o=i&&e.every(r=>i.isGroupFilter(r));e.length>0&&!o&&n?.onFilterChanged({columns:e,source:"api"})}isFilterAllowed(e){if(!e.isFilterAllowed())return!1;const n=this.beans.groupFilter;return n?.isGroupFilter(e)?n.isFilterAllowed(e):!0}getFloatingFilterCompDetails(e,t){const{userCompFactory:n,frameworkOverrides:i,selectableFilter:o,gos:r}=this.beans,s=m=>{this.getOrCreateFilterUi(e)?.then(w=>{m(Ks(w))})},a=e.getColDef(),l=o?.isSelectable(a)?o.getFilterDef(e,a):a,u=Y4(i,l,()=>this.getDefaultFloatingFilter(e))??"agReadOnlyFloatingFilter",h=r.get("enableFilterHandlers"),f=Ng(n,l,this.createFilterCompParams(e,h,"init",!0)),p=We(r,{column:e,filterParams:f,currentParentModel:()=>this.getCurrentFloatingFilterParentModel(e),parentFilterInstance:s,showParentFilter:t});if(h){const m=p,v=e.getColId(),w=this.filterChangedCallbackFactory(e);m.onUiChange=b=>this.floatingFilterUiChanged(e,b),m.model=pn(this.model,v),m.onModelChange=(b,y)=>{this.updateStoredModel(v,b),this.refreshHandlerAndUi(e,b,"floating",!0,y).then(()=>{w({...y,source:"columnFilter"})})},m.getHandler=()=>this.getHandler(e,!0),m.source="init"}return I_(n,a,p,u)}getCurrentFloatingFilterParentModel(e){return this.getModelFromFilterWrapper(this.cachedFilter(e)??{column:e})}destroyFilterUi(e,t,n,i){const o="paramsUpdated";if(e.isHandler){const r=t.getColId();delete this.initialModel[r],this.state.delete(r);const s=e.filterUi,a=this.createFilterUiForHandler(n,i);e.filterUi=a;const l=this.eventSvc;s?.created?s.promise.then(u=>{this.destroyBean(u),l.dispatchEvent({type:"filterDestroyed",source:o,column:t})}):l.dispatchEvent({type:"filterHandlerDestroyed",source:o,column:t})}else this.destroyFilter(t,o)}destroyFilter(e,t="api"){const n=e.getColId(),i=this.allColumnFilters.get(n);this.disposeColumnListener(n),delete this.initialModel[n],i&&this.disposeFilterWrapper(i,t).then(o=>{o&&this.isAlive()&&this.beans.filterManager?.onFilterChanged({columns:[e],source:"api"})})}disposeColumnListener(e){const t=this.allColumnListeners.get(e);t&&(this.allColumnListeners.delete(e),t())}disposeFilterWrapper(e,t){let n=!1;const{column:i,isHandler:o,filterUi:r}=e,s=i.getColId();o&&(n=this.isHandlerActive(i),this.destroyBean(e.handler),delete this.model[s],this.state.delete(s));const a=()=>{this.setColFilterActive(i,!1,"filterDestroyed"),this.allColumnFilters.delete(s),this.eventSvc.dispatchEvent({type:"filterDestroyed",source:t,column:i})};if(r){if(r.created)return r.promise.then(l=>(n=o?n:!!l?.isFilterActive(),this.destroyBean(l),a(),n));a()}return Mt.resolve(n)}filterChangedCallbackFactory(e){return t=>{this.callOnFilterChangedOutsideRenderCycle({additionalEventAttributes:t,columns:[e],column:e,source:t?.source??"columnFilter"})}}filterParamsChanged(e,t="api"){const n=this.allColumnFilters.get(e);if(!n)return;const i=this.beans,o=n.column,r=o.getColDef(),s=o.isFilterAllowed(),a=this.getDefaultFilter(o),l=i.selectableFilter,u=l?.isSelectable(r)?l.getFilterDef(o,r):r,h=s?this.createHandlerFunc(o,u,this.getDefaultFilter(o)):void 0,f=!!h,p=n.isHandler;if(p!=f){this.destroyFilter(o,"paramsUpdated");return}const{compDetails:m,createFilterUi:v}=(s?this.createFilterComp(o,u,a,b=>b,f,"colDef"):null)??{compDetails:null,createFilterUi:null},w=m?.params??Ng(i.userCompFactory,u,this.createFilterCompParams(o,f,"colDef"));if(p){const b=h?.handlerNameOrCallback??h?.filterHandler,y=pn(this.model,e);if(n.handlerGenerator!=b){const R=n.handler,{handler:S,handlerParams:P}=this.createHandlerFromFunc(o,h.filterHandler,w);n.handler=S,n.handlerParams=P,n.handlerGenerator=b,delete this.model[e],S.init?.({...P,source:"init",model:null}),this.destroyBean(R),y!=null&&this.beans.filterManager?.onFilterChanged({columns:[o],source:t})}else{const R=this.createHandlerParams(o,m?.params);n.handlerParams=R,n.handler.refresh?.({...R,source:"colDef",model:y})}}if(this.areFilterCompsDifferent(n.filterUi?.compDetails??null,m)||!n.filterUi||!m){this.destroyFilterUi(n,o,m,v);return}n.filterUi.filterParams=w,ts(n,p)?.then(b=>{(b?.refresh?b.refresh(w):!0)===!1?this.destroyFilterUi(n,o,m,v):this.dispatchLocalEvent({type:"filterParamsChanged",column:o,params:w})})}refreshHandlerAndUi(e,t,n,i,o){const r=this.cachedFilter(e);if(!r)return i&&this.getOrCreateFilterWrapper(e,!0),Mt.resolve();if(!r.isHandler)return Mt.resolve();const{filterUi:s,handler:a,handlerParams:l}=r;return P4(()=>{if(s){const{created:u,filterParams:h}=s;if(u)return s.promise.then(f=>f?{filter:f,filterParams:h}:void 0);s.refreshed=!0}return Mt.resolve(void 0)},a,l,t,this.state.get(e.getColId())??{model:t},n,o)}setColumnFilterWrapper(e,t){const n=e.getColId();this.allColumnFilters.set(n,t),this.allColumnListeners.set(n,this.addManagedListeners(e,{colDefChanged:()=>this.filterParamsChanged(n)})[0])}areFilterCompsDifferent(e,t){if(!t||!e)return!0;const{componentClass:n}=e,{componentClass:i}=t;return!(n===i||n?.render&&i?.render&&n.render===i.render)}hasFloatingFilters(){return this.beans.colModel.getCols().some(t=>t.getColDef().floatingFilter)}getFilterInstance(e){const t=this.beans.colModel.getColDefCol(e);if(!t)return Promise.resolve(void 0);const n=this.getOrCreateFilterUi(t);return n?new Promise(i=>{n.then(o=>{i(Ks(o))})}):Promise.resolve(null)}processFilterModelUpdateQueue(){this.modelUpdates.forEach(({model:e,source:t})=>this.setModel(e,t)),this.modelUpdates=[],this.columnModelUpdates.forEach(({key:e,model:t,resolve:n})=>{this.setModelForColumn(e,t).then(()=>n())}),this.columnModelUpdates=[]}getModelForColumn(e,t){if(t){const{state:i,model:o}=this,r=e.getColId(),s=i.get(r);return s?s.model??null:pn(o,r)}const n=this.cachedFilter(e);return n?this.getModelFromFilterWrapper(n):null}setModelForColumn(e,t){if(this.beans.dataTypeSvc?.isPendingInference){let n=()=>{};const i=new Promise(o=>{n=o});return this.columnModelUpdates.push({key:e,model:t,resolve:n}),i}return new Promise(n=>{this.setModelForColumnLegacy(e,t).then(i=>n(i))})}getStateForColumn(e){return this.state.get(e)??{model:pn(this.model,e)}}setModelForColumnLegacy(e,t){const n=this.beans.colModel.getColDefCol(e),i=n?this.getOrCreateFilterWrapper(n,!0):null;return i?this.setModelOnFilterWrapper(i,t):Mt.resolve()}setColDefPropsForDataType(e,t,n){const i=e.filter,o=i===!0?this.getDefaultFilterFromDataType(()=>t.baseDataType):i;if(typeof o!="string")return;let r,s;const a=this.beans,{filterParams:l,filterValueGetter:u}=e;o==="agMultiColumnFilter"?{filterParams:r,filterValueGetter:s}=a.multiFilter?.getParamsForDataType(l,u,t,n)??{}:{filterParams:r,filterValueGetter:s}=j4(o,l,u,t,n,a,this.getLocaleTextFunc()),e.filterParams=r,s&&(e.filterValueGetter=s)}setColFilterActive(e,t,n,i){e.filterActive!==t&&(e.filterActive=t,e.dispatchColEvent("filterActiveChanged",n)),e.dispatchColEvent("filterChanged",n,i)}setModelOnFilterWrapper(e,t,n){return new Mt(i=>{if(e.isHandler){const r=e.column,s=r.getColId(),a=this.model[s];if(this.updateStoredModel(s,t),n&&t===a){i();return}this.refreshHandlerAndUi(r,t,"api").then(()=>i());return}const o=ts(e);if(o){o.then(r=>{if(typeof r?.setModel!="function"){se(65),i();return}(r.setModel(t)||Mt.resolve()).then(()=>i())});return}i()})}updateStoredModel(e,t){we(t)?this.model[e]=t:delete this.model[e];const n=this.state.get(e),i={model:t,state:n?.state};this.state.set(e,i)}filterModified(e,t){this.getOrCreateFilterUi(e)?.then(n=>{this.eventSvc.dispatchEvent({type:"filterModified",column:e,filterInstance:n,...t})})}filterUiChanged(e,t){this.gos.get("enableFilterHandlers")&&this.eventSvc.dispatchEvent({type:"filterUiChanged",column:e,...t})}floatingFilterUiChanged(e,t){this.gos.get("enableFilterHandlers")&&this.eventSvc.dispatchEvent({type:"floatingFilterUiChanged",column:e,...t})}updateModel(e,t,n){const i=e.getColId(),o=this.cachedFilter(e),r=()=>o?.filterUi;Mx({action:t,filterParams:o?.filterUi?.filterParams,getFilterUi:r,getModel:()=>pn(this.model,i),getState:()=>this.state.get(i),updateState:s=>this.updateState(e,s),updateModel:s=>r()?.filterParams?.onModelChange(s,{...n,fromAction:t}),processModelToApply:o?.isHandler?o.handler.processModelToApply?.bind(o.handler):void 0})}updateAllModels(e,t){const n=[];this.allColumnFilters.forEach((i,o)=>{const r=this.beans.colModel.getColDefCol(o);r&&Mx({action:e,filterParams:i.filterUi?.filterParams,getFilterUi:()=>i.filterUi,getModel:()=>pn(this.model,o),getState:()=>this.state.get(o),updateState:s=>this.updateState(r,s),updateModel:s=>{this.updateStoredModel(o,s),this.dispatchLocalEvent({type:"filterAction",column:r,action:e}),n.push(this.refreshHandlerAndUi(r,s,"ui"))},processModelToApply:i?.isHandler?i.handler.processModelToApply?.bind(i.handler):void 0})}),n.length&&Mt.all(n).then(()=>{this.callOnFilterChangedOutsideRenderCycle({source:"columnFilter",additionalEventAttributes:t,columns:[]})})}updateOrRefreshFilterUi(e){const t=e.getColId();Ix(()=>this.cachedFilter(e)?.filterUi,()=>pn(this.model,t),()=>this.state.get(t))}updateState(e,t){this.state.set(e.getColId(),t),this.dispatchLocalEvent({type:"filterStateChanged",column:e,state:t})}canApplyAll(){const{state:e,model:t,activeFilterComps:n}=this;for(const o of n)if(o.source==="COLUMN_MENU")return!1;let i=!1;for(const o of e.keys()){const r=e.get(o);if(r.valid===!1)return!1;(r.model??null)!==pn(t,o)&&(i=!0)}return i}hasUnappliedModel(e){const{model:t,state:n}=this;return(n.get(e)?.model??null)!==pn(t,e)}setGlobalButtons(e){this.isGlobalButtons=e,this.dispatchLocalEvent({type:"filterGlobalButtons",isGlobal:e})}shouldKeepStateOnDetach(e,t){if(t==="newFiltersToolPanel")return!0;const n=this.beans.filterPanelSvc;return n?.isActive?!!n.getState(e.getColId()):!1}onPivotModeChanged(e){const{colModel:t,pivotColsSvc:n}=this.beans,i=!!_d(this.gos),o=e.currentValue,r=o?this.activeColumnFilters:this.activeAggregateFilters,s=o?this.activeAggregateFilters:this.activeColumnFilters,a=[];for(const l of r){const u=t.getColById(l.colId),h=o&&!!n?.columns.length;u&&o===Bx(u,o,h,i)&&(s.push(l),a.push(l))}Jk(r,a)}destroy(){super.destroy(),this.allColumnFilters.forEach(e=>this.disposeFilterWrapper(e,"gridDestroyed")),this.allColumnListeners.clear(),this.state.clear(),this.activeFilterComps.clear()}};function J4(e){return!!e.filterManager?.isAnyFilterPresent()}function e9(e,t="api"){e.filterManager?.onFilterChanged({source:t})}var t9=class extends X{constructor(){super(...arguments),this.beanName="filterManager",this.advFilterModelUpdateQueue=[]}wireBeans(e){this.quickFilter=e.quickFilter,this.advancedFilter=e.advancedFilter,this.colFilter=e.colFilter}postConstruct(){const e=this.refreshFiltersForAggregations.bind(this),t=this.updateAdvFilterColumns.bind(this);this.addManagedEventListeners({columnValueChanged:e,columnPivotChanged:e,columnPivotModeChanged:e,newColumnsLoaded:t,columnVisible:t,advancedFilterEnabledChanged:({enabled:i})=>this.onAdvFilterEnabledChanged(i),dataTypesInferred:this.processFilterModelUpdateQueue.bind(this)}),this.externalFilterPresent=this.isExternalFilterPresentCallback(),this.addManagedPropertyListeners(["isExternalFilterPresent","doesExternalFilterPass"],()=>{this.onFilterChanged({source:"api"})}),this.updateAggFiltering(),this.addManagedPropertyListener("groupAggFiltering",()=>{this.updateAggFiltering(),this.onFilterChanged()}),this.quickFilter&&this.addManagedListeners(this.quickFilter,{quickFilterChanged:()=>this.onFilterChanged({source:"quickFilter"})});const{gos:n}=this;this.alwaysPassFilter=n.get("alwaysPassFilter"),this.addManagedPropertyListener("alwaysPassFilter",()=>{this.alwaysPassFilter=n.get("alwaysPassFilter"),this.onFilterChanged({source:"api"})})}isExternalFilterPresentCallback(){const e=this.gos.getCallback("isExternalFilterPresent");return typeof e=="function"&&e({})}doesExternalFilterPass(e){const t=this.gos.get("doesExternalFilterPass");return typeof t=="function"&&t(e)}setFilterState(e,t,n="api"){this.isAdvFilterEnabled()||this.colFilter?.setState(e,t,n)}setFilterModel(e,t="api",n){if(this.isAdvFilterEnabled()){n||this.warnAdvFilters();return}this.colFilter?.setModel(e,t)}getFilterModel(){return this.colFilter?.getModel()??{}}getFilterState(){return this.colFilter?.getState()}isColumnFilterPresent(){return!!this.colFilter?.isFilterPresent()}isAggregateFilterPresent(){return!!this.colFilter?.isAggFilterPresent()}isChildFilterPresent(){return this.isColumnFilterPresent()||this.isQuickFilterPresent()||this.externalFilterPresent||this.isAdvFilterPresent()}isAnyFilterPresent(){return this.isChildFilterPresent()||this.isAggregateFilterPresent()}isAdvFilterPresent(){return this.isAdvFilterEnabled()&&this.advancedFilter.isFilterPresent()}onAdvFilterEnabledChanged(e){e?this.colFilter?.disableFilters()&&this.onFilterChanged({source:"advancedFilter"}):this.advancedFilter?.isFilterPresent()&&(this.advancedFilter.setModel(null),this.onFilterChanged({source:"advancedFilter"}))}isAdvFilterEnabled(){return!!this.advancedFilter?.isEnabled()}isAdvFilterHeaderActive(){return this.isAdvFilterEnabled()&&this.advancedFilter.isHeaderActive()}refreshFiltersForAggregations(){_d(this.gos)&&this.isAnyFilterPresent()&&this.onFilterChanged()}onFilterChanged(e={}){const{source:t,additionalEventAttributes:n,columns:i=[]}=e;this.externalFilterPresent=this.isExternalFilterPresentCallback(),(this.colFilter?this.colFilter.updateBeforeFilterChanged(e):Mt.resolve()).then(()=>{const o={source:t,type:"filterChanged",columns:i};n&&Wn(o,n),this.eventSvc.dispatchEvent(o),this.colFilter?.updateAfterFilterChanged()})}isSuppressFlashingCellsBecauseFiltering(){return!!this.colFilter?.isSuppressFlashingCellsBecauseFiltering()}isQuickFilterPresent(){return!!this.quickFilter?.isFilterPresent()}updateAggFiltering(){this.aggFiltering=!!_d(this.gos)}isAggregateQuickFilterPresent(){return this.isQuickFilterPresent()&&this.shouldApplyQuickFilterAfterAgg()}isNonAggregateQuickFilterPresent(){return this.isQuickFilterPresent()&&!this.shouldApplyQuickFilterAfterAgg()}shouldApplyQuickFilterAfterAgg(){return(this.aggFiltering||this.beans.colModel.isPivotMode())&&!this.gos.get("applyQuickFilterBeforePivotOrAgg")}doesRowPassOtherFilters(e,t){return this.doesRowPassFilter({rowNode:t,colIdToSkip:e})}doesRowPassAggregateFilters(e){const{rowNode:t}=e;return this.alwaysPassFilter?.(t)?!0:!(this.isAggregateQuickFilterPresent()&&!this.quickFilter.doesRowPass(t)||this.isAggregateFilterPresent()&&!this.colFilter.doFiltersPass(t,e.colIdToSkip,!0))}doesRowPassFilter(e){const{rowNode:t}=e;return this.alwaysPassFilter?.(t)?!0:!(this.isNonAggregateQuickFilterPresent()&&!this.quickFilter.doesRowPass(t)||this.externalFilterPresent&&!this.doesExternalFilterPass(t)||this.isColumnFilterPresent()&&!this.colFilter.doFiltersPass(t,e.colIdToSkip)||this.isAdvFilterPresent()&&!this.advancedFilter.doesFilterPass(t))}isFilterAllowed(e){return this.isAdvFilterEnabled()?!1:!!this.colFilter?.isFilterAllowed(e)}getAdvFilterModel(){return this.isAdvFilterEnabled()?this.advancedFilter.getModel():null}setAdvFilterModel(e,t="api"){if(this.isAdvFilterEnabled()){if(this.beans.dataTypeSvc?.isPendingInference){this.advFilterModelUpdateQueue.push(e);return}this.advancedFilter.setModel(e??null),this.onFilterChanged({source:t})}}toggleAdvFilterBuilder(e,t){this.isAdvFilterEnabled()&&this.advancedFilter.getCtrl().toggleFilterBuilder({source:t,force:e})}updateAdvFilterColumns(){this.isAdvFilterEnabled()&&this.advancedFilter.updateValidity()&&this.onFilterChanged({source:"advancedFilter"})}hasFloatingFilters(){return this.isAdvFilterEnabled()?!1:!!this.colFilter?.hasFloatingFilters()}getColumnFilterInstance(e){return this.isAdvFilterEnabled()?(this.warnAdvFilters(),Promise.resolve(void 0)):this.colFilter?.getFilterInstance(e)??Promise.resolve(void 0)}warnAdvFilters(){se(68)}setupAdvFilterHeaderComp(e){this.advancedFilter?.getCtrl().setupHeaderComp(e)}getHeaderRowCount(){return this.isAdvFilterHeaderActive()?1:0}getHeaderHeight(){return this.isAdvFilterHeaderActive()?this.advancedFilter.getCtrl().getHeaderHeight():0}processFilterModelUpdateQueue(){for(const e of this.advFilterModelUpdateQueue)this.setAdvFilterModel(e);this.advFilterModelUpdateQueue=[]}setColumnFilterModel(e,t){return this.isAdvFilterEnabled()?(this.warnAdvFilters(),Promise.resolve()):this.colFilter?.setModelForColumn(e,t)??Promise.resolve()}};function n9(e){return{tag:"div",cls:e}}var i9=class extends yt{constructor(e){const{className:t="ag-filter-apply-panel"}=e??{};super(n9(t)),this.listeners=[],this.validationMessage=null,this.className=t}updateButtons(e,t){const n=this.buttons;if(this.buttons=e,n===e)return;const i=this.getGui();bn(i);let o;this.destroyListeners();const r=document.createDocumentFragment(),s=this.className,a=({type:u,label:h})=>{const f=y=>{this.dispatchLocalEvent({type:u,event:y})};["apply","clear","reset","cancel"].includes(u)||se(75);const p=u==="apply",v=on({tag:"button",attrs:{type:p&&t?"submit":"button"},ref:`${u}FilterButton`,cls:`ag-button ag-standard-button ${s}-button${p?" "+s+"-apply-button":""}`,children:h});this.activateTabIndex([v]),p&&(o=v);const w=y=>{y.key===q.ENTER&&(y.preventDefault(),f(y))},b=this.listeners;v.addEventListener("click",f),b.push(()=>v.removeEventListener("click",f)),v.addEventListener("keydown",w),b.push(()=>v.removeEventListener("keydown",w)),r.append(v)};for(const u of e)a(u);this.eApply=o;const l=this.validationTooltipFeature;o&&!l?this.validationTooltipFeature=this.createOptionalManagedBean(this.beans.registry.createDynamicBean("tooltipFeature",!1,{getGui:()=>this.eApply,getLocation:()=>"advancedFilter",getTooltipShowDelayOverride:()=>1e3})):!o&&l&&(this.validationTooltipFeature=this.destroyBean(l)),i.append(r)}getApplyButton(){return this.eApply}updateValidity(e,t=null){const n=this.eApply;n&&(dc(n,!e),this.validationMessage=t,this.validationTooltipFeature?.setTooltipAndRefresh(this.validationMessage))}destroyListeners(){for(const e of this.listeners)e();this.listeners=[]}destroy(){this.destroyListeners(),super.destroy()}},o9=class extends yt{constructor(e,t,n,i,o,r){super(),this.column=e,this.wrapper=t,this.eventParent=n,this.updateModel=i,this.isGlobalButtons=o,this.enableGlobalButtonCheck=r,this.hidePopup=null,this.applyActive=!1}postConstruct(){const{comp:e,params:t}=this.wrapper,n=t,i=n.useForm,o=i?"form":"div";this.setTemplate({tag:o,cls:"ag-filter-wrapper"}),i&&this.addManagedElementListeners(this.getGui(),{submit:r=>{r?.preventDefault()},keydown:this.handleKeyDown.bind(this)}),this.appendChild(e.getGui()),this.params=n,this.resetButtonsPanel(n),this.addManagedListeners(this.eventParent,{filterParamsChanged:({column:r,params:s})=>{r===this.column&&this.resetButtonsPanel(s,this.params)},filterStateChanged:({column:r,state:s})=>{r===this.column&&this.eButtons?.updateValidity(s.valid!==!1)},filterAction:({column:r,action:s,event:a})=>{r===this.column&&this.afterAction(s,a)},...this.enableGlobalButtonCheck?{filterGlobalButtons:({isGlobal:r})=>{if(r!==this.isGlobalButtons){this.isGlobalButtons=r;const s=this.params;this.resetButtonsPanel(s,s,!0)}}}:void 0})}afterGuiAttached(e){e&&(this.hidePopup=e.hidePopup)}resetButtonsPanel(e,t,n){const{buttons:i,readOnly:o}=t??{},{buttons:r,readOnly:s,useForm:a}=e;if(!n&&o===s&&sc(i,r))return;const l=r&&r.length>0&&!e.readOnly&&!this.isGlobalButtons;let u=this.eButtons;if(l){const h=r.map(f=>{const p=`${f}Filter`;return{type:f,label:to(this,p)}});if(this.applyActive=Qd(this.params),!u){u=this.createBean(new i9),this.appendChild(u.getGui());const f=this.column,p=m=>({event:v})=>{this.updateModel(f,m,{fromButtons:!0}),this.afterAction(m,v)};u?.addManagedListeners(u,{apply:p("apply"),clear:p("clear"),reset:p("reset"),cancel:p("cancel")}),this.eButtons=u}u.updateButtons(h,a)}else this.applyActive=!1,u&&(Mi(u.getGui()),this.eButtons=this.destroyBean(u))}close(e){const t=this.hidePopup;if(!t)return;const n=e,i=n?.key;let o;(i===q.ENTER||i===q.SPACE)&&(o={keyboardEvent:n}),t(o),this.hidePopup=null}afterAction(e,t){const{params:n,applyActive:i}=this,o=n?.closeOnApply;switch(e){case"apply":{t?.preventDefault(),o&&i&&this.close(t);break}case"reset":{o&&i&&this.close();break}case"cancel":{o&&this.close(t);break}}}handleKeyDown(e){!e.defaultPrevented&&e.key===q.ENTER&&this.applyActive&&(this.updateModel(this.column,"apply",{fromButtons:!0}),this.afterAction("apply",e))}destroy(){this.hidePopup=null,this.eButtons=this.destroyBean(this.eButtons)}},r9=":where(.ag-menu:not(.ag-tabs) .ag-filter)>:not(.ag-filter-wrapper){min-width:180px}",s9={tag:"div",cls:"ag-filter"},a9=class extends yt{constructor(e,t,n){super(s9),this.column=e,this.source=t,this.enableGlobalButtonCheck=n,this.wrapper=null}postConstruct(){this.beans.colFilter?.activeFilterComps.add(this),this.createFilter(!0),this.addManagedEventListeners({filterDestroyed:this.onFilterDestroyed.bind(this)})}hasFilter(){return this.wrapper!=null}getFilter(){return this.wrapper?.then(e=>e.comp)??null}afterInit(){return this.wrapper?.then(()=>{})??Mt.resolve()}afterGuiAttached(e){this.afterGuiAttachedParams=e,this.wrapper?.then(t=>{this.comp?.afterGuiAttached(e),t?.comp?.afterGuiAttached?.(e)})}afterGuiDetached(){this.wrapper?.then(e=>{e?.comp?.afterGuiDetached?.()})}createFilter(e){const{column:t,source:n,beans:{colFilter:i}}=this,o=i.getFilterUiForDisplay(t)??null;this.wrapper=o,o?.then(r=>{if(!r)return;const{isHandler:s,comp:a}=r;let l;if(s){const u=!!this.enableGlobalButtonCheck,h=this.createBean(new o9(t,r,i,i.updateModel.bind(i),u&&i.isGlobalButtons,u));this.comp=h,l=h.getGui()}else this.registerCSS(r9),l=a.getGui(),we(l)||se(69,{guiFromFilter:l});this.appendChild(l),e?this.eventSvc.dispatchEvent({type:"filterOpened",column:t,source:n,eGui:this.getGui()}):a.afterGuiAttached?.(this.afterGuiAttachedParams)})}onFilterDestroyed(e){const{source:t,column:n}=e;(t==="api"||t==="paramsUpdated")&&n.getId()===this.column.getId()&&this.beans.colModel.getColDefCol(this.column)&&(bn(this.getGui()),this.comp=this.destroyBean(this.comp),this.createFilter())}destroy(){this.beans.colFilter?.activeFilterComps.delete(this),this.eventSvc.dispatchEvent({type:"filterClosed",column:this.column}),this.wrapper=null,this.comp=this.destroyBean(this.comp),this.afterGuiAttachedParams=void 0,super.destroy()}},l9=class extends X{constructor(){super(...arguments),this.beanName="filterMenuFactory"}wireBeans(e){this.popupSvc=e.popupSvc}hideActiveMenu(){this.hidePopup?.()}showMenuAfterMouseEvent(e,t,n,i){e&&!e.isColumn||this.showPopup(e,o=>{this.popupSvc?.positionPopupUnderMouseEvent({additionalParams:{column:e},type:n,mouseEvent:t,ePopup:o})},n,t.target,ni(this.gos),i)}showMenuAfterButtonClick(e,t,n,i){if(e&&!e.isColumn)return;let o=-1,r="left";const s=ni(this.gos);!s&&this.gos.get("enableRtl")&&(o=1,r="right");const a=s?void 0:4*o,l=s?void 0:4;this.showPopup(e,u=>{this.popupSvc?.positionPopupByComponent({type:n,eventSource:t,ePopup:u,nudgeX:a,nudgeY:l,alignSide:r,keepWithinBounds:!0,position:"under",additionalParams:{column:e}})},n,t,s,i)}showPopup(e,t,n,i,o,r){const s=e?this.createBean(new a9(e,"COLUMN_MENU")):void 0;if(this.activeMenu=s,!s?.hasFilter()||!e){gt(57);return}const a=on({tag:"div",cls:`ag-menu${o?"":" ag-filter-menu"}`,role:"presentation"});[this.tabListener]=this.addManagedElementListeners(a,{keydown:w=>this.trapFocusWithin(w,a)}),a.appendChild(s?.getGui());let l;const u=()=>s?.afterGuiDetached(),h=SO(this.gos)?i??this.beans.ctrlsSvc.getGridBodyCtrl().eGridBody:void 0,f=w=>{kx(e,!1,"contextMenu");const b=w instanceof KeyboardEvent;this.tabListener&&(this.tabListener=this.tabListener()),b&&i&&ki(i)&&V0(i)?.focus({preventScroll:!0}),u(),this.destroyBean(this.activeMenu),this.dispatchVisibleChangedEvent(!1,n,e),r?.()},p=this.getLocaleTextFunc(),m=o&&n!=="columnFilter"?p("ariaLabelColumnMenu","Column Menu"):p("ariaLabelColumnFilter","Column Filter"),v=this.popupSvc?.addPopup({modal:!0,eChild:a,closeOnEsc:!0,closedCallback:f,positionCallback:()=>t(a),anchorToElement:h,ariaLabel:m});v&&(this.hidePopup=l=v.hideFunc),s.afterInit().then(()=>{t(a),s.afterGuiAttached({container:n,hidePopup:l})}),kx(e,!0,"contextMenu"),this.dispatchVisibleChangedEvent(!0,n,e)}trapFocusWithin(e,t){e.key!==q.TAB||e.defaultPrevented||Hs(this.beans,t,!1,e.shiftKey)||(e.preventDefault(),Gs(t,e.shiftKey))}dispatchVisibleChangedEvent(e,t,n){this.eventSvc.dispatchEvent({type:"columnMenuVisibleChanged",visible:e,switchingTab:!1,key:t,column:n??null,columnGroup:null})}isMenuEnabled(e){return e.isFilterAllowed()&&(e.getColDef().menuTabs??["filterMenuTab"]).includes("filterMenuTab")}showMenuAfterContextMenuEvent(){}destroy(){this.destroyBean(this.activeMenu),super.destroy()}},c9=class extends X{constructor(){super(...arguments),this.beanName="filterValueSvc"}getValue(e,t,n){if(!t)return;const i=e.getColDef(),{selectableFilter:o,valueSvc:r,formula:s}=this.beans,a=n??o?.getFilterValueGetter(e.getColId())??i.filterValueGetter;if(a)return this.executeFilterValueGetter(a,t.data,e,t,i);const l=r.getValue(e,t,"data");return e.isAllowFormula()&&s?.isFormula(l)?s.resolveValue(e,t):l}executeFilterValueGetter(e,t,n,i,o){const{expressionSvc:r,valueSvc:s}=this.beans,a=We(this.gos,{data:t,node:i,column:n,colDef:o,getValue:s.getValueCallback.bind(s,i)});return typeof e=="function"?e(a):r?.evaluate(e,a)}},u9={tag:"div",cls:"ag-floating-filter-input",role:"presentation",children:[{tag:"ag-input-text-field",ref:"eFloatingFilterText"}]},d9=class extends yt{constructor(){super(u9,[Eh]),this.eFloatingFilterText=he}init(e){this.params=e;const t=this.beans.colNames.getDisplayNameForColumn(e.column,"header",!0);if(this.eFloatingFilterText.setDisabled(!0).setInputAriaLabel(`${t} ${this.getLocaleTextFunc()("ariaFilterInput","Filter Input")}`),this.gos.get("enableFilterHandlers")){const n=e,i=n.getHandler();if(i.getModelAsString){const o=i.getModelAsString(n.model);this.eFloatingFilterText.setValue(o)}}}onParentModelChanged(e){if(e==null){this.eFloatingFilterText.setValue("");return}this.params.parentFilterInstance(t=>{if(t.getModelAsString){const n=t.getModelAsString(e);this.eFloatingFilterText.setValue(n)}})}refresh(e){this.init(e)}},h9=class extends Tm{constructor(e){super(e,"ag-radio-button","radio")}isSelected(){return this.eInput.checked}toggle(){this.eInput.disabled||this.isSelected()||this.setValue(!0)}addInputListeners(){super.addInputListeners(),this.addManagedEventListeners({checkboxChanged:this.onChange.bind(this)})}onChange(e){const t=this.eInput;e.selected&&e.name&&t.name&&t.name===e.name&&e.id&&t.id!==e.id&&this.setValue(!1,!0)}},gv=class{constructor(){this.customFilterOptions={}}init(e,t){this.filterOptions=e.filterOptions??t,this.mapCustomOptions(),this.defaultOption=this.getDefaultItem(e.defaultOption)}refresh(e,t){const n=e.filterOptions??t;this.filterOptions!==n&&(this.filterOptions=n,this.customFilterOptions={},this.mapCustomOptions()),this.defaultOption=this.getDefaultItem(e.defaultOption)}mapCustomOptions(){const{filterOptions:e}=this;if(e)for(const t of e){if(typeof t=="string")continue;const n=[["displayKey"],["displayName"],["predicate","test"]],i=o=>o.some(r=>t[r]!=null)?!0:(se(72,{keys:o}),!1);if(!n.every(i)){this.filterOptions=e.filter(o=>o===t)||[];continue}this.customFilterOptions[t.displayKey]=t}}getDefaultItem(e){const{filterOptions:t}=this;if(e)return e;if(t.length>=1){const n=t[0];if(typeof n=="string")return n;if(n.displayKey)return n.displayKey;se(73)}else se(74)}getCustomOption(e){return this.customFilterOptions[e]}};function Gc(e,t,n){return n==null?e.splice(t):e.splice(t,n)}function Ah(e){return e==null||typeof e=="string"&&e.trim().length===0}function f9(e){return e==="AND"||e==="OR"?e:"AND"}function p9(e,t,n){if(e==null)return;const{predicate:i}=e;if(i!=null&&!t.some(o=>o==null))return i(t,n)}function g9(e,t){let n=e.length;return n>t&&(e.splice(t),se(78),n=t),n}var m9=new Set(["empty","notBlank","blank","today","yesterday","tomorrow","thisWeek","lastWeek","nextWeek","thisMonth","lastMonth","nextMonth","thisQuarter","lastQuarter","nextQuarter","thisYear","lastYear","nextYear","yearToDate","last7Days","last30Days","last90Days","last6Months","last12Months","last24Months"]);function ns(e,t){const n=t.getCustomOption(e);if(n){const{numberOfInputs:i}=n;return i??1}return e&&m9.has(e)?0:e==="inRange"?2:1}var Ih=class extends z_{constructor(e,t,n){super(e,"simple-filter"),this.mapValuesFromModel=t,this.defaultOptions=n,this.eTypes=[],this.eJoinPanels=[],this.eJoinAnds=[],this.eJoinOrs=[],this.eConditionBodies=[],this.listener=()=>this.onUiChanged(),this.lastUiCompletePosition=null,this.joinOperatorId=0}setParams(e){super.setParams(e);const t=new gv;this.optionsFactory=t,t.init(e,this.defaultOptions),this.commonUpdateSimpleParams(e),this.createOption(),this.createMissingConditionsAndOperators()}updateParams(e,t){this.optionsFactory.refresh(e,this.defaultOptions),super.updateParams(e,t),this.commonUpdateSimpleParams(e)}commonUpdateSimpleParams(e){this.setNumConditions(e),this.defaultJoinOperator=f9(e.defaultJoinOperator),this.filterPlaceholder=e.filterPlaceholder,this.createFilterListOptions(),ti(this.getGui(),"tabindex",this.isReadOnly()?"-1":null)}onFloatingFilterChanged(e,t){this.setTypeFromFloatingFilter(e),this.setValueFromFloatingFilter(t),this.onUiChanged("immediately",!0)}setTypeFromFloatingFilter(e){this.eTypes.forEach((t,n)=>{const i=n===0?e:this.optionsFactory.defaultOption;t.setValue(i,!0)})}getModelFromUi(){const e=this.getUiCompleteConditions();return e.length===0?null:this.maxNumConditions>1&&e.length>1?{filterType:this.filterType,operator:this.getJoinOperator(),conditions:e}:e[0]}getConditionTypes(){return this.eTypes.map(e=>e.getValue())}getConditionType(e){return this.eTypes[e].getValue()}getJoinOperator(){const{eJoinOrs:e,defaultJoinOperator:t}=this;return e.length===0?t:e[0].getValue()===!0?"OR":"AND"}areNonNullModelsEqual(e,t){const n=!e.operator,i=!t.operator;if(!n&&i||n&&!i)return!1;let r;if(n){const s=e,a=t;r=this.areSimpleModelsEqual(s,a)}else{const s=e,a=t;r=s.operator===a.operator&&Lr(s.conditions,a.conditions,(l,u)=>this.areSimpleModelsEqual(l,u))}return r}setModelIntoUi(e,t){if(e==null)return this.resetUiToDefaults(t),Mt.resolve();if(e.operator){const i=e;let o=i.conditions;o==null&&(o=[],se(77));const r=g9(o,this.maxNumConditions),s=this.getNumConditions();if(r<s)this.removeConditionsAndOperators(r);else if(r>s)for(let l=s;l<r;l++)this.createJoinOperatorPanel(),this.createOption();const a=i.operator==="OR";this.eJoinAnds.forEach(l=>l.setValue(!a,!0)),this.eJoinOrs.forEach(l=>l.setValue(a,!0)),o.forEach((l,u)=>{this.eTypes[u].setValue(l.type,!0),this.setConditionIntoUi(l,u)})}else{const i=e;this.getNumConditions()>1&&this.removeConditionsAndOperators(1),this.eTypes[0].setValue(i.type,!0),this.setConditionIntoUi(i,0)}return this.lastUiCompletePosition=this.getNumConditions()-1,this.createMissingConditionsAndOperators(),this.updateUiVisibility(),t||this.params.onUiChange(this.getUiChangeEventParams()),Mt.resolve()}setNumConditions(e){let t=e.maxNumConditions??2;t<1&&(se(79),t=1),this.maxNumConditions=t;let n=e.numAlwaysVisibleConditions??1;n<1&&(se(80),n=1),n>t&&(se(81),n=t),this.numAlwaysVisibleConditions=n}createOption(){const e=this.getGui(),t=this.createManagedBean(new cv);this.eTypes.push(t),t.addCss("ag-filter-select"),e.appendChild(t.getGui());const n=this.createEValue();this.eConditionBodies.push(n),e.appendChild(n),this.putOptionsIntoDropdown(t),this.resetType(t);const i=this.getNumConditions()-1;this.forEachPositionInput(i,o=>this.resetInput(o)),this.addChangedListeners(t,i)}createJoinOperatorPanel(){const e=on({tag:"div",cls:"ag-filter-condition"});this.eJoinPanels.push(e);const t=this.createJoinOperator(this.eJoinAnds,e,"and"),n=this.createJoinOperator(this.eJoinOrs,e,"or");this.getGui().appendChild(e);const i=this.eJoinPanels.length-1,o=this.joinOperatorId++;this.resetJoinOperatorAnd(t,i,o),this.resetJoinOperatorOr(n,i,o),this.isReadOnly()||(t.onValueChange(this.listener),n.onValueChange(this.listener))}createJoinOperator(e,t,n){const i=this.createManagedBean(new h9);e.push(i);const o="ag-filter-condition-operator";return i.addCss(o),i.addCss(`${o}-${n}`),t.appendChild(i.getGui()),i}createFilterListOptions(){this.filterListOptions=this.optionsFactory.filterOptions.map(e=>typeof e=="string"?this.createBoilerplateListOption(e):this.createCustomListOption(e))}putOptionsIntoDropdown(e){const{filterListOptions:t}=this;for(const n of t)e.addOption(n);e.setDisabled(t.length<=1)}createBoilerplateListOption(e){return{value:e,text:this.translate(e)}}createCustomListOption(e){const{displayKey:t}=e,n=this.optionsFactory.getCustomOption(e.displayKey);return{value:t,text:n?this.getLocaleTextFunc()(n.displayKey,n.displayName):this.translate(t)}}createBodyTemplate(){return null}getAgComponents(){return[]}updateUiVisibility(){const e=this.getJoinOperator();this.updateNumConditions(),this.updateConditionStatusesAndValues(this.lastUiCompletePosition,e)}updateNumConditions(){let e=-1,t=!0;for(let n=0;n<this.getNumConditions();n++)this.isConditionUiComplete(n)?e=n:t=!1;if(this.shouldAddNewConditionAtEnd(t))this.createJoinOperatorPanel(),this.createOption();else{const n=this.lastUiCompletePosition??this.getNumConditions()-2;if(e<n){this.removeConditionsAndOperators(n+1);const i=e+1,o=n-i;o>0&&this.removeConditionsAndOperators(i,o),this.createMissingConditionsAndOperators()}}this.lastUiCompletePosition=e}updateConditionStatusesAndValues(e,t){this.eTypes.forEach((i,o)=>{const r=this.isConditionDisabled(o,e);i.setDisabled(r||this.filterListOptions.length<=1),o===1&&(dc(this.eJoinPanels[0],r),this.eJoinAnds[0].setDisabled(r),this.eJoinOrs[0].setDisabled(r))}),this.eConditionBodies.forEach((i,o)=>{bt(i,this.isConditionBodyVisible(o))});const n=(t??this.getJoinOperator())==="OR";for(const i of this.eJoinAnds)i.setValue(!n,!0);for(const i of this.eJoinOrs)i.setValue(n,!0);this.forEachInput((i,o,r,s)=>{this.setElementDisplayed(i,o<s),this.setElementDisabled(i,this.isConditionDisabled(r,e))}),this.resetPlaceholder()}shouldAddNewConditionAtEnd(e){return e&&this.getNumConditions()<this.maxNumConditions&&!this.isReadOnly()}removeConditionsAndOperators(e,t){if(e>=this.getNumConditions())return;const{eTypes:n,eConditionBodies:i,eJoinPanels:o,eJoinAnds:r,eJoinOrs:s}=this;this.removeComponents(n,e,t),this.removeElements(i,e,t),this.removeEValues(e,t);const a=Math.max(e-1,0);this.removeElements(o,a,t),this.removeComponents(r,a,t),this.removeComponents(s,a,t)}removeElements(e,t,n){const i=Gc(e,t,n);for(const o of i)Mi(o)}removeComponents(e,t,n){const i=Gc(e,t,n);for(const o of i)Mi(o.getGui()),this.destroyBean(o)}afterGuiAttached(e){if(super.afterGuiAttached(e),this.resetPlaceholder(),!e?.suppressFocus){let t;if(!this.isReadOnly()){const n=this.getInputs(0)[0];n instanceof Us&&this.isConditionBodyVisible(0)?t=n.getInputElement():t=this.eTypes[0]?.getFocusableElement()}(t??this.getGui()).focus({preventScroll:!0})}}shouldKeepInvalidInputState(){return!1}afterGuiDetached(){super.afterGuiDetached();const e=this.params;if(this.beans.colFilter?.shouldKeepStateOnDetach(e.column)||this.shouldKeepInvalidInputState())return;e.onStateChange({model:e.model});let t=-1,n=-1,i=!1;const o=this.getJoinOperator();for(let s=this.getNumConditions()-1;s>=0;s--)if(this.isConditionUiComplete(s))t===-1&&(t=s,n=s);else{const a=s>=this.numAlwaysVisibleConditions&&!this.isConditionUiComplete(s-1),l=s<t;(a||l)&&(this.removeConditionsAndOperators(s,1),i=!0,l&&n--)}let r=!1;this.getNumConditions()<this.numAlwaysVisibleConditions&&(this.createMissingConditionsAndOperators(),r=!0),this.shouldAddNewConditionAtEnd(n===this.getNumConditions()-1)&&(this.createJoinOperatorPanel(),this.createOption(),r=!0),r&&this.updateConditionStatusesAndValues(n,o),i&&this.updateJoinOperatorsDisabled(),this.lastUiCompletePosition=n}getModelAsString(e){return this.params.getHandler()?.getModelAsString?.(e)??""}resetPlaceholder(){const e=this.getLocaleTextFunc(),{filterPlaceholder:t,eTypes:n}=this;this.forEachInput((i,o,r,s)=>{if(!(i instanceof Us))return;const a=o===0&&s>1?"inRangeStart":o===0?"filterOoo":"inRangeEnd",l=o===0&&s>1?e("ariaFilterFromValue","Filter from value"):o===0?e("ariaFilterValue","Filter Value"):e("ariaFilterToValue","Filter to Value"),u=n[r].getValue(),h=$0(this,t,a,u);i.setInputPlaceholder(h),i.setInputAriaLabel(l)})}setElementValue(e,t,n){e instanceof Us&&e.setValue(t!=null?String(t):null,!0)}setElementDisplayed(e,t){L0(e)&&bt(e.getGui(),t)}setElementDisabled(e,t){L0(e)&&dc(e.getGui(),t)}attachElementOnChange(e,t){e instanceof Us&&e.onValueChange(t)}forEachInput(e){this.getConditionTypes().forEach((t,n)=>{this.forEachPositionTypeInput(n,t,e)})}forEachPositionInput(e,t){const n=this.getConditionType(e);this.forEachPositionTypeInput(e,n,t)}forEachPositionTypeInput(e,t,n){const i=ns(t,this.optionsFactory),o=this.getInputs(e);for(let r=0;r<o.length;r++){const s=o[r];s!=null&&n(s,r,e,i)}}isConditionDisabled(e,t){return this.isReadOnly()?!0:e===0?!1:e>t+1}isConditionBodyVisible(e){const t=this.getConditionType(e);return ns(t,this.optionsFactory)>0}isConditionUiComplete(e){return!(e>=this.getNumConditions()||this.getConditionType(e)==="empty"||this.getValues(e).some(n=>n==null)||this.positionHasInvalidInputs(e))}getNumConditions(){return this.eTypes.length}getUiCompleteConditions(){const e=[];for(let t=0;t<this.getNumConditions();t++)this.isConditionUiComplete(t)&&e.push(this.createCondition(t));return e}createMissingConditionsAndOperators(){if(!this.isReadOnly())for(let e=this.getNumConditions();e<this.numAlwaysVisibleConditions;e++)this.createJoinOperatorPanel(),this.createOption()}resetUiToDefaults(e){this.removeConditionsAndOperators(this.isReadOnly()?1:this.numAlwaysVisibleConditions),this.eTypes.forEach(t=>this.resetType(t)),this.eJoinAnds.forEach((t,n)=>this.resetJoinOperatorAnd(t,n,this.joinOperatorId+n)),this.eJoinOrs.forEach((t,n)=>this.resetJoinOperatorOr(t,n,this.joinOperatorId+n)),this.joinOperatorId++,this.forEachInput(t=>this.resetInput(t)),this.resetPlaceholder(),this.createMissingConditionsAndOperators(),this.lastUiCompletePosition=null,this.updateUiVisibility(),e||this.params.onUiChange(this.getUiChangeEventParams())}resetType(e){const n=this.getLocaleTextFunc()("ariaFilteringOperator","Filtering operator");e.setValue(this.optionsFactory.defaultOption,!0).setAriaLabel(n).setDisabled(this.isReadOnly()||this.filterListOptions.length<=1)}resetJoinOperatorAnd(e,t,n){this.resetJoinOperator(e,t,this.defaultJoinOperator==="AND",this.translate("andCondition"),n)}resetJoinOperatorOr(e,t,n){this.resetJoinOperator(e,t,this.defaultJoinOperator==="OR",this.translate("orCondition"),n)}resetJoinOperator(e,t,n,i,o){this.updateJoinOperatorDisabled(e.setValue(n,!0).setName(`ag-simple-filter-and-or-${this.getCompId()}-${o}`).setLabel(i),t)}updateJoinOperatorsDisabled(){const e=(t,n)=>this.updateJoinOperatorDisabled(t,n);this.eJoinAnds.forEach(e),this.eJoinOrs.forEach(e)}updateJoinOperatorDisabled(e,t){e.setDisabled(this.isReadOnly()||t>0)}resetInput(e){this.setElementValue(e,null),this.setElementDisabled(e,this.isReadOnly())}setConditionIntoUi(e,t){const n=this.mapValuesFromModel(e,this.optionsFactory);this.forEachInput((i,o,r)=>{r===t&&this.setElementValue(i,n[o]!=null?n[o]:null)})}setValueFromFloatingFilter(e){this.forEachInput((t,n,i)=>{this.setElementValue(t,n===0&&i===0?e:null,!0)})}addChangedListeners(e,t){this.isReadOnly()||(e.onValueChange(this.listener),this.forEachPositionInput(t,n=>{this.attachElementOnChange(n,this.listener)}))}hasInvalidInputs(){return!1}positionHasInvalidInputs(e){return!1}isReadOnly(){return!!this.params.readOnly}},mv=["equals","notEqual","greaterThan","greaterThanOrEqual","lessThan","lessThanOrEqual","inRange","blank","notBlank"];function vv(e){return e?.allowedCharPattern??null}function Gx(e,t){const{filter:n,filterTo:i,type:o}=e||{};return[oi(n),oi(i)].slice(0,ns(o,t))}var v9=class extends Ih{constructor(){super("bigintFilter",Gx,mv),this.eValuesFrom=[],this.eValuesTo=[],this.filterType="bigint",this.defaultDebounceMs=500}afterGuiAttached(e){super.afterGuiAttached(e),this.refreshInputValidation()}shouldKeepInvalidInputState(){return!Ya()&&this.hasInvalidInputs()&&this.getConditionTypes().includes("inRange")}refreshInputValidation(){for(let e=0;e<this.eValuesFrom.length;e++){const t=this.eValuesFrom[e],n=this.eValuesTo[e];this.refreshInputPairValidation(t,n)}}refreshInputPairValidation(e,t,n=!1){const{bigintParser:i}=this.params,o=this.getParsedValue(e,i),r=this.getParsedValue(t,i),s=this.isInvalidValue(e,o),a=this.isInvalidValue(t,r),l=n?e:t,u=n?t:e,h=n?s:a,f=n?a:s;let p="";if(h)p=this.getLocaleTextFunc()("invalidBigInt","Invalid BigInt");else if(!s&&!a){const m=C9(o,r,n);m&&(p=this.translate(m,[String(n?t.getValue():e.getValue())]))}l.setCustomValidity(p),f||u.setCustomValidity(""),p.length>0&&this.beans.ariaAnnounce.announceValue(p,"dateFilter")}getState(){return{isInvalid:this.hasInvalidInputs()}}areStatesEqual(e,t){return(e?.isInvalid??!1)===(t?.isInvalid??!1)}refresh(e){const t=super.refresh(e),{state:n,additionalEventAttributes:i}=e,o=this.state,r=i?.fromAction;return(r&&r!="apply"||n.model!==o.model||!this.areStatesEqual(n.state,o.state))&&this.refreshInputValidation(),t}setElementValue(e,t,n){super.setElementValue(e,t,n),t===null&&e.setCustomValidity("")}createEValue(){const{params:e,eValuesFrom:t,eValuesTo:n}=this,i=vv(e),o=on({tag:"div",cls:"ag-filter-body",role:"presentation"}),r=this.createFromToElement(o,t,"from",i),s=this.createFromToElement(o,n,"to",i),a=(h,f,p)=>()=>this.refreshInputPairValidation(h,f,p),l=a(r,s,!0);r.onValueChange(l),r.addGuiEventListener("focusin",l);const u=a(r,s,!1);return s.onValueChange(u),s.addGuiEventListener("focusin",u),o}createFromToElement(e,t,n,i){const o=this.createManagedBean(i?new ar({allowedCharPattern:i}):new ar);return o.addCss(`ag-filter-${n}`),o.addCss("ag-filter-filter"),t.push(o),e.appendChild(o.getGui()),o}removeEValues(e,t){const n=i=>this.removeComponents(i,e,t);n(this.eValuesFrom),n(this.eValuesTo)}getValues(e){const t=[];return this.forEachPositionInput(e,(n,i,o,r)=>{i<r&&t.push(oi(n.getValue()??null))}),t}areSimpleModelsEqual(e,t){return e.filter===t.filter&&e.filterTo===t.filterTo&&e.type===t.type}createCondition(e){const t=this.getConditionType(e),n={filterType:this.filterType,type:t},i=this.getValues(e);return i.length>0&&(n.filter=String(i[0])),i.length>1&&(n.filterTo=String(i[1])),n}removeConditionsAndOperators(e,t){if(!this.hasInvalidInputs())return super.removeConditionsAndOperators(e,t)}getInputs(e){const{eValuesFrom:t,eValuesTo:n}=this;return e>=t.length?[null,null]:[t[e],n[e]]}hasInvalidInputs(){let e=!1;return this.forEachInput(t=>e||(e=!t.getInputElement().validity.valid)),e}positionHasInvalidInputs(e){let t=!1;return this.forEachPositionInput(e,n=>t||(t=!n.getInputElement().validity.valid)),t}canApply(e){return!this.hasInvalidInputs()}getParsedValue(e,t){const n=e.getValue();return n==null||typeof n=="string"&&n.trim()===""?null:t?t(n):oi(n)}isInvalidValue(e,t){const n=e.getValue();return n!=null&&String(n).trim()!==""&&t===null}};function C9(e,t,n){return e!=null&&t!=null&&e>=t?`strict${n?"Max":"Min"}ValueValidation`:null}var Hx=class extends X{constructor(e,t){super(),this.mapValuesFromModel=e,this.defaultOptions=t}init(e){const t=e.filterParams,n=new gv;this.optionsFactory=n,n.init(t,this.defaultOptions),this.filterModelFormatter=this.createManagedBean(new this.FilterModelFormatterClass(n,t)),this.updateParams(e),this.validateModel(e)}refresh(e){if(e.source==="colDef"){const t=e.filterParams,n=this.optionsFactory;n.refresh(t,this.defaultOptions),this.filterModelFormatter.updateParams({optionsFactory:n,filterParams:t}),this.updateParams(e)}this.validateModel(e)}updateParams(e){this.params=e}doesFilterPass(e){const t=e.model;if(t==null)return!0;const{operator:n}=t,i=[];if(n){const s=t;i.push(...s.conditions??[])}else i.push(t);const o=n&&n==="OR"?"some":"every",r=this.params.getValue(e.node);return i[o](s=>this.individualConditionPasses(e,s,r))}getModelAsString(e,t){return this.filterModelFormatter.getModelAsString(e,t)??""}validateModel(e){const{model:t,filterParams:{filterOptions:n,maxNumConditions:i}}=e;if(t==null)return;let r=M0(t)?t.conditions:[t];const s=n?.map(h=>typeof h=="string"?h:h.displayKey)??this.defaultOptions;if(!(!r||r.every(h=>s.find(f=>f===h.type)!==void 0))){this.params={...e,model:null},e.onModelChange(null);return}let l=!1;const u=this.filterType;if((r&&!r.every(h=>h.filterType===u)||t.filterType!==u)&&(r=r.map(h=>({...h,filterType:u})),l=!0),typeof i=="number"&&r&&r.length>i&&(r=r.slice(0,i),l=!0),l){const h=r.length>1?{...t,filterType:u,conditions:r}:{...r[0],filterType:u};this.params={...e,model:h},e.onModelChange(h)}}individualConditionPasses(e,t,n){const i=this.optionsFactory,o=this.mapValuesFromModel(t,i),r=i.getCustomOption(t.type),s=p9(r,o,n);return s??(n==null?this.evaluateNullValue(t.type):this.evaluateNonNullValue(o,n,t,e))}},Cv=class extends Hx{evaluateNullValue(e){const{includeBlanksInEquals:t,includeBlanksInNotEqual:n,includeBlanksInGreaterThan:i,includeBlanksInLessThan:o,includeBlanksInRange:r}=this.params.filterParams;switch(e){case"equals":if(t)return!0;break;case"notEqual":if(n)return!0;break;case"greaterThan":case"greaterThanOrEqual":if(i)return!0;break;case"lessThan":case"lessThanOrEqual":if(o)return!0;break;case"inRange":if(r)return!0;break;case"blank":return!0;case"notBlank":return!1}return!1}evaluateNonNullValue(e,t,n){const i=n.type;if(!this.isValid(t))return i==="notEqual"||i==="notBlank";const o=this.comparator(),r=e[0]!=null?o(e[0],t):0;switch(i){case"equals":return r===0;case"notEqual":return r!==0;case"greaterThan":return r>0;case"greaterThanOrEqual":return r>=0;case"lessThan":return r<0;case"lessThanOrEqual":return r<=0;case"inRange":{const s=o(e[1],t);return this.params.filterParams.inRangeInclusive?r>=0&&s<=0:r>0&&s<0}case"blank":return Ah(t);case"notBlank":return!Ah(t);default:return se(76,{filterModelType:i}),!0}}},wv={equals:"Equals",notEqual:"NotEqual",greaterThan:"GreaterThan",greaterThanOrEqual:"GreaterThanOrEqual",lessThan:"LessThan",lessThanOrEqual:"LessThanOrEqual",inRange:"InRange"},w9={contains:"Contains",notContains:"NotContains",equals:"TextEquals",notEqual:"TextNotEqual",startsWith:"StartsWith",endsWith:"EndsWith",inRange:"InRange"},Mh=class extends X{constructor(e,t,n){super(),this.optionsFactory=e,this.filterParams=t,this.valueFormatter=n}getModelAsString(e,t){const n=this.getLocaleTextFunc(),i=t==="filterToolPanel";if(!e)return i?to(this,"filterSummaryInactive"):null;if(e.operator!=null){const r=e,a=(r.conditions??[]).map(u=>this.getModelAsString(u,t)),l=r.operator==="AND"?"andCondition":"orCondition";return a.join(` ${to(this,l)} `)}else{if(e.type==="blank"||e.type==="notBlank")return i?to(this,e.type==="blank"?"filterSummaryBlank":"filterSummaryNotBlank"):n(e.type,e.type);{const r=e,s=this.optionsFactory.getCustomOption(r.type),{displayKey:a,displayName:l,numberOfInputs:u}=s||{};return a&&l&&u===0?n(a,l):this.conditionToString(r,i,r.type==="inRange"||u===2,a,l)}}}updateParams(e){const{optionsFactory:t,filterParams:n}=e;this.optionsFactory=t,this.filterParams=n}conditionForToolPanel(e,t,n,i,o,r){let s;const a=this.getTypeKey(e);return a&&(s=to(this,a)),o&&r&&(s=this.getLocaleTextFunc()(o,r)),s!=null?t?`${s} ${to(this,"filterSummaryInRangeValues",[n(),i()])}`:`${s} ${n()}`:null}getTypeKey(e){const t=this.filterTypeKeys[e];return t?`filterSummary${t}`:null}formatValue(e){const t=this.valueFormatter;return t?t(e??null)??"":String(e)}},Vx=class extends Mh{constructor(e,t){super(e,t,t.bigintFormatter),this.filterTypeKeys=wv}conditionToString(e,t,n,i,o){const{filter:r,filterTo:s,type:a}=e,l=this.formatValue.bind(this),u=oi(r),h=oi(s);if(t){const f=this.conditionForToolPanel(a,n,()=>l(u),()=>l(h),i,o);if(f!=null)return f}return n?`${l(u)}-${l(h)}`:r!=null?l(u):`${a}`}},b9=class extends Cv{constructor(){super(Gx,mv),this.filterType="bigint",this.FilterModelFormatterClass=Vx}comparator(){return(e,t)=>e===t?0:e<t?1:-1}isValid(e){return oi(e)!==null}},bv=class extends X{constructor(e){super(),this.params=e,this.eInput=he,this.onValueChanged=()=>{}}setupGui(e){this.eInput=this.createManagedBean(new ar(this.params?.config));const t=this.eInput.getGui();e.appendChild(t);const n=i=>this.onValueChanged(i);this.addManagedListeners(t,{input:n,keydown:n})}setEditable(e){this.eInput.setDisabled(!e)}getValue(){return this.eInput.getValue()}setValue(e,t){this.eInput.setValue(e,t)}setValueChangedListener(e){this.onValueChanged=e}setParams({ariaLabel:e,autoComplete:t,placeholder:n}){const{eInput:i}=this;i.setInputAriaLabel(e),t!==void 0&&i.setAutoComplete(t),i.toggleCss("ag-floating-filter-search-icon",!!n),i.setInputPlaceholder(n)}};function yv(e){const t=e?.trim();return t===""?e:t}function Wx(e,t){const{filter:n,filterTo:i,type:o}=e||{};return[n||null,i||null].slice(0,ns(o,t))}var zx=class extends yt{constructor(){super(...arguments),this.defaultDebounceMs=0}setLastTypeFromModel(e){if(!e){this.lastType=this.optionsFactory.defaultOption;return}const t=e.operator;let n;t?n=e.conditions[0]:n=e,this.lastType=n.type}canWeEditAfterModelFromParentFilter(e){if(!e)return this.isTypeEditable(this.lastType);if(e.operator)return!1;const n=e;return this.isTypeEditable(n.type)}init(e){this.params=e;const t=this.gos.get("enableFilterHandlers");if(this.reactive=t,this.setParams(e),t){const n=e;this.onModelUpdated(n.model)}}setParams(e){const t=new gv;this.optionsFactory=t,t.init(e.filterParams,this.defaultOptions),this.filterModelFormatter=this.createManagedBean(new this.FilterModelFormatterClass(t,e.filterParams)),this.setSimpleParams(e,!1)}setSimpleParams(e,t=!0){const n=this.optionsFactory.defaultOption;t||(this.lastType=n),this.readOnly=!!e.filterParams.readOnly;const i=this.isTypeEditable(n);this.setEditable(i)}refresh(e){this.params=e;const t=e,n=this.reactive;if((!n||t.source==="colDef")&&this.updateParams(e),n){const{source:i,model:o}=t;if(i==="dataChanged"||i==="ui")return;this.onModelUpdated(o)}}updateParams(e){const t=this.optionsFactory;t.refresh(e.filterParams,this.defaultOptions),this.setSimpleParams(e),this.filterModelFormatter.updateParams({optionsFactory:t,filterParams:e.filterParams})}onParentModelChanged(e,t){t?.afterFloatingFilter||t?.afterDataChange||this.onModelUpdated(e)}isTypeEditable(e){return!!e&&!this.readOnly&&ns(e,this.optionsFactory)===1}getAriaLabel(e){return`${this.beans.colNames.getDisplayNameForColumn(e,"header",!0)} ${this.getLocaleTextFunc()("ariaFilterInput","Filter Input")}`}},y9={tag:"div",ref:"eFloatingFilterInputContainer",cls:"ag-floating-filter-input",role:"presentation"},Sv=class extends zx{constructor(){super(...arguments),this.eFloatingFilterInputContainer=he,this.defaultDebounceMs=500}postConstruct(){this.setTemplate(y9)}onModelUpdated(e){this.setLastTypeFromModel(e),this.setEditable(this.canWeEditAfterModelFromParentFilter(e)),this.inputSvc.setValue(this.filterModelFormatter.getModelAsString(e))}setParams(e){this.setupFloatingFilterInputService(e),super.setParams(e),this.setTextInputParams(e)}setupFloatingFilterInputService(e){this.inputSvc=this.createFloatingFilterInputService(e),this.inputSvc.setupGui(this.eFloatingFilterInputContainer)}setTextInputParams(e){const{inputSvc:t,defaultDebounceMs:n,readOnly:i}=this,{filterPlaceholder:o,column:r,browserAutoComplete:s,filterParams:a}=e,l=this.lastType??this.optionsFactory.defaultOption,u=e.filterParams.filterPlaceholder,h=o===!0?$0(this,u,"filterOoo",l):o||void 0;if(t.setParams({ariaLabel:this.getAriaLabel(r),autoComplete:s??!1,placeholder:h}),this.applyActive=Qd(a),!i){const f=qg(a,n);t.setValueChangedListener(hn(this,this.syncUpWithParentFilter.bind(this),f))}}updateParams(e){super.updateParams(e),this.setTextInputParams(e)}recreateFloatingFilterInputService(e){const{inputSvc:t}=this,n=t.getValue();bn(this.eFloatingFilterInputContainer),this.destroyBean(t),this.setupFloatingFilterInputService(e),t.setValue(n,!0)}syncUpWithParentFilter(e){const t=e.key===q.ENTER,n=this.reactive;if(n&&this.params.onUiChange(),this.applyActive&&!t)return;const{inputSvc:i,params:o,lastType:r}=this;let s=i.getValue();if(o.filterParams.trimInput&&(s=yv(s),i.setValue(s,!0)),n){const a=o,l=a.model,u=this.convertValue(s),h=u==null?null:{...l??{filterType:this.filterType,type:r??this.optionsFactory.defaultOption},filter:u};a.onModelChange(h,{afterFloatingFilter:!0})}else o.parentFilterInstance(a=>{a?.onFloatingFilterChanged(r||null,s||null)})}convertValue(e){return e||null}setEditable(e){this.inputSvc.setEditable(e)}},S9=class extends Sv{constructor(){super(...arguments),this.FilterModelFormatterClass=Vx,this.filterType="bigint",this.defaultOptions=mv}updateParams(e){const t=e.filterParams;vv(t)!==this.allowedCharPattern&&this.recreateFloatingFilterInputService(e),this.bigintParser=t?.bigintParser,super.updateParams(e)}createFloatingFilterInputService(e){const t=e.filterParams;this.allowedCharPattern=vv(t),this.bigintParser=t?.bigintParser;const n=this.allowedCharPattern?{allowedCharPattern:this.allowedCharPattern}:void 0;return this.createManagedBean(new bv({config:n}))}convertValue(e){return e==null||e===""?null:this.bigintParser?this.bigintParser(e):oi(e)}},Ux=".ag-input-field-input",$x=class{constructor(e,t,n,i,o,r){this.context=e,this.eParent=o,this.alive=!0,this.debouncedReport=hn({isAlive:()=>this.alive},jx,500),this.timeoutHandle=null,T_(t,n,i)?.newAgStackInstance().then(a=>{if(!this.alive){e.destroyBean(a);return}if(this.dateComp=a,!a)return;o.appendChild(a.getGui()),a?.afterGuiAttached?.();const{tempValue:l,disabled:u}=this;l&&a.setDate(l),u!=null&&a.setDisabled?.(u),r?.(this)})}destroy(){this.alive=!1,this.dateComp=this.context.destroyBean(this.dateComp)}getDate(){return this.dateComp?this.dateComp.getDate():this.tempValue}setDate(e){const t=this.dateComp;t?t.setDate(e):this.tempValue=e}setDisabled(e){const t=this.dateComp;t?t.setDisabled?.(e):this.disabled=e}setDisplayed(e){bt(this.eParent,e)}setInputPlaceholder(e){this.dateComp?.setInputPlaceholder?.(e)}setInputAriaLabel(e){this.dateComp?.setInputAriaLabel?.(e)}afterGuiAttached(e){this.dateComp?.afterGuiAttached?.(e)}updateParams(e){this.dateComp?.refresh?.(e)}setCustomValidity(e,t=!1){const n=this.dateComp?.getGui().querySelector(Ux);if(n&&"setCustomValidity"in n){const i=e.length>0;n.setCustomValidity(e),i?t?this.timeoutHandle=this.debouncedReport(n):jx(n):this.timeoutHandle&&window.clearTimeout(this.timeoutHandle),fg(n,i)}}getValidity(){return this.dateComp?.getGui().querySelector(Ux)?.validity}};function jx(e){e.reportValidity()}var Rv=["equals","notEqual","lessThan","greaterThan","inRange","blank","notBlank"];function Kx(e,t){const{dateFrom:n,dateTo:i,type:o}=e||{};return[n&&$n(n,void 0,!0)||null,i&&$n(i,void 0,!0)||null].slice(0,ns(o,t))}var qx=1e3,Qx=1/0,R9=class extends Ih{constructor(){super("dateFilter",Kx,Rv),this.eConditionPanelsFrom=[],this.eConditionPanelsTo=[],this.dateConditionFromComps=[],this.dateConditionToComps=[],this.minValidYear=qx,this.maxValidYear=Qx,this.minValidDate=null,this.maxValidDate=null,this.filterType="date"}afterGuiAttached(e){super.afterGuiAttached(e),this.dateConditionFromComps[0].afterGuiAttached(e),this.refreshInputValidation()}shouldKeepInvalidInputState(){return!Ya()&&this.hasInvalidInputs()&&this.getConditionTypes().includes("inRange")}commonUpdateSimpleParams(e){super.commonUpdateSimpleParams(e);const t=(l,u)=>{const h=e[l];if(h!=null)if(isNaN(h))se(82,{param:l});else return h==null?u:Number(h);return u},n=t("minValidYear",qx),i=t("maxValidYear",Qx);this.minValidYear=n,this.maxValidYear=i,n>i&&se(83);const{minValidDate:o,maxValidDate:r}=e,s=o instanceof Date?o:$n(o);this.minValidDate=s;const a=r instanceof Date?r:$n(r);this.maxValidDate=a,s&&a&&s>a&&se(84)}refreshInputValidation(){for(let e=0;e<this.dateConditionFromComps.length;e++)this.refreshInputPairValidation(e,!1,!0)}refreshInputPairValidation(e,t=!1,n=!1){const{dateConditionFromComps:i,dateConditionToComps:o,beans:r}=this,s=i[e],a=o[e],l=ns(this.getConditionType(e),this.optionsFactory),u=s.getDate(),h=a.getDate(),f=l>=2?F9(u,h,t):null,p=f?this.translate(f,[String(t?h:u)]):"",m=!Ya()&&!n;(t?s:a).setCustomValidity(p,m),(t?a:s).setCustomValidity("",m),p.length>0&&r.ariaAnnounce.announceValue(p,"dateFilter")}createDateCompWrapper(e,t,n){const{beans:{userCompFactory:i,context:o,gos:r},params:s}=this,a=n==="from",l=new $x(o,i,s.colDef,We(r,{onDateChanged:()=>{this.refreshInputPairValidation(t,a),this.onUiChanged()},onFocusIn:()=>this.refreshInputPairValidation(t,a),filterParams:s,location:"filter"}),e);return this.addDestroyFunc(()=>l.destroy()),l}getState(){return{isInvalid:this.hasInvalidInputs()}}areStatesEqual(e,t){return(e?.isInvalid??!1)===(t?.isInvalid??!1)}setElementValue(e,t){e.setDate(t),t||e.setCustomValidity("")}setElementDisplayed(e,t){e.setDisplayed(t)}setElementDisabled(e,t){e.setDisabled(t)}createEValue(){const e=on({tag:"div",cls:"ag-filter-body"});return this.createFromToElement(e,this.eConditionPanelsFrom,this.dateConditionFromComps,"from"),this.createFromToElement(e,this.eConditionPanelsTo,this.dateConditionToComps,"to"),e}createFromToElement(e,t,n,i){const o=on({tag:"div",cls:`ag-filter-${i} ag-filter-date-${i}`});t.push(o),e.appendChild(o),n.push(this.createDateCompWrapper(o,t.length-1,i))}removeEValues(e,t){this.removeDateComps(this.dateConditionFromComps,e,t),this.removeDateComps(this.dateConditionToComps,e,t),Gc(this.eConditionPanelsFrom,e,t),Gc(this.eConditionPanelsTo,e,t)}removeDateComps(e,t,n){const i=Gc(e,t,n);for(const o of i)o.destroy()}isValidDateValue(e){if(e===null)return!1;const{minValidDate:t,maxValidDate:n,minValidYear:i,maxValidYear:o}=this;if(t){if(e<t)return!1}else if(e.getUTCFullYear()<i)return!1;if(n){if(e>n)return!1}else if(e.getUTCFullYear()>o)return!1;return!0}hasInvalidInputs(){let e=!1;return this.forEachInput(t=>e||(e=t.getDate()!=null&&!(t.getValidity()?.valid??!0))),e}positionHasInvalidInputs(e){let t=!1;return this.forEachPositionInput(e,n=>t||(t=!(n.getValidity()?.valid??!0))),t}canApply(e){return!this.hasInvalidInputs()}isConditionUiComplete(e){if(!super.isConditionUiComplete(e))return!1;let t=!0;return this.forEachPositionInput(e,(n,i,o,r)=>{!t||i>=r||t&&(t=this.isValidDateValue(n.getDate()))}),t}areSimpleModelsEqual(e,t){return e.dateFrom===t.dateFrom&&e.dateTo===t.dateTo&&e.type===t.type}createCondition(e){const t=this.getConditionType(e),n={},{params:i,filterType:o}=this,r=this.getValues(e),s=i.useIsoSeparator?"T":" ";return r.length>0&&(n.dateFrom=Un(r[0],!0,s)),r.length>1&&(n.dateTo=Un(r[1],!0,s)),{dateFrom:null,dateTo:null,filterType:o,type:t,...n}}removeConditionsAndOperators(e,t){if(!this.hasInvalidInputs())return super.removeConditionsAndOperators(e,t)}resetPlaceholder(){const e=this.getLocaleTextFunc(),t=this.translate("dateFormatOoo"),n=e("ariaFilterValue","Filter Value");this.forEachInput(i=>{i.setInputPlaceholder(t),i.setInputAriaLabel(n)})}getInputs(e){const{dateConditionFromComps:t,dateConditionToComps:n}=this;return e>=t.length?[null,null]:[t[e],n[e]]}getValues(e){const t=[];return this.forEachPositionInput(e,(n,i,o,r)=>{i<r&&t.push(n.getDate())}),t}translate(e,t){let n=e;return e==="lessThan"?n="before":e==="greaterThan"&&(n="after"),super.translate(n,t)}};function F9(e,t,n){return e!=null&&t!=null&&e>=t?`${n?"max":"min"}DateValidation`:null}var Yx=class extends Mh{constructor(e,t){super(e,t,n=>{const{dataTypeSvc:i,valueSvc:o}=this.beans,r=t.column,s=i?.getDateFormatterFunction(r),a=s?s(n??void 0):n;return o.formatValue(r,null,a)}),this.filterTypeKeys=wv}conditionToString(e,t,n,i,o){const{type:r}=e,s=$n(e.dateFrom),a=$n(e.dateTo),l=this.filterParams.inRangeFloatingFilterDateFormat,u=t?this.formatValue.bind(this):p=>rH(p,l),h=()=>s!==null?u(s):"null",f=()=>a!==null?u(a):"null";if(s==null&&a==null)return to(this,r);if(t){const p=this.conditionForToolPanel(r,n,h,f,i,o);if(p!=null)return p}return n?`${h()}-${f()}`:s!=null?u(s):`${r}`}};function x9(e,t){const n=t;return n<e?-1:n>e?1:0}var P9=class extends Cv{constructor(){super(Kx,Rv),this.filterType="date",this.FilterModelFormatterClass=Yx,this.filterTypeToRangeCache=new Map}getOrRefreshRangeCacheItem(e,t){const{filterTypeToRangeCache:n}=this,i=Date.now();let o=n.get(e);if(o&&o.expires<i&&(o=void 0),!o){const[r,s]=t(new Date(i),new Date(i));o={from:r,to:s,expires:Gi(new Date(i)).getTime()-i},n.set(e,o)}return o}comparator(){return this.params.filterParams.comparator??x9}isValid(e){const t=this.params.filterParams.isValidDate;return!t||t(e)}evaluateNonNullValue(e,t,n){const i=n.type,o=this.comparator();if(!this.isValid(t))return i==="notEqual"||i==="notBlank";const r=i,s=j9[r];if(s){const{from:a,to:l}=this.getOrRefreshRangeCacheItem(r,s);return o(a,t)>=0&&o(l,t)<0}return super.evaluateNonNullValue(e,t,n)}},E9=1,kh=null,D9=()=>{if(kh!=null)return kh;let e;const t=typeof navigator>"u"?void 0:navigator.languages?.[0]??navigator.language;if(t&&typeof Intl<"u"&&typeof Intl.Locale=="function")try{e=new Intl.Locale(t).getWeekInfo?.()?.firstDay}catch{e=void 0}return kh=e==null?E9:e%7,kh},mi=e=>(e.setHours(0,0,0,0),e),Lh=e=>{const t=e.getDay(),n=D9(),i=(t-n+7)%7;return e.setDate(e.getDate()-i),mi(e)},Oh=(e,t=1)=>(e.setDate(e.getDate()-t),e),Gi=e=>(e.setDate(e.getDate()+1),mi(e)),Zx=e=>(Lh(e),e.setDate(e.getDate()+6),Gi(e)),_h=e=>(e.setDate(1),mi(e)),Fv=e=>(e.setDate(1),e.setMonth(e.getMonth()+1),mi(e)),xv=e=>{const t=Math.floor(e.getMonth()/3);return e.setMonth(t*3),_h(e)},Xx=e=>{const t=Math.floor(e.getMonth()/3);return e.setMonth(t*3+2),Fv(e)},Pv=e=>(e.setMonth(0,1),mi(e)),Jx=e=>(e.setMonth(12,0),Gi(e)),cl=e=>Oh(e),Ev=e=>cl(Lh(e)),Dv=e=>cl(_h(e)),Tv=e=>cl(xv(e)),Av=(e,t)=>[mi(e),Gi(t)],T9=(e,t)=>Av(cl(e),cl(t)),Iv=(e,t)=>[Lh(e),Zx(t)],A9=(e,t)=>Iv(Ev(e),Ev(t)),Mv=(e,t)=>[_h(e),Fv(t)],I9=(e,t)=>Mv(Dv(e),Dv(t)),kv=(e,t)=>[xv(e),Xx(t)],M9=(e,t)=>kv(Tv(e),Tv(t)),Lv=(e,t)=>[Pv(e),Jx(t)],k9=(e,t)=>[Pv(e),Gi(t)],L9=(e,t)=>[mi(Oh(e,7)),Gi(t)],O9=(e,t)=>[mi(Oh(e,30)),Gi(t)],_9=(e,t)=>[mi(Oh(e,90)),Gi(t)],N9=(e,t)=>(e.setFullYear(e.getFullYear()-1),e.setMonth(e.getMonth()+6),[mi(e),Gi(t)]),B9=(e,t)=>(e.setFullYear(e.getFullYear()-1),[mi(e),Gi(t)]),G9=(e,t)=>(e.setFullYear(e.getFullYear()-2),[mi(e),Gi(t)]),H9=(e,t)=>(e.setFullYear(e.getFullYear()-1),t.setFullYear(t.getFullYear()-1),Lv(e,t)),V9=(e,t)=>(e.setFullYear(e.getFullYear()+1),t.setFullYear(t.getFullYear()+1),Lv(e,t)),W9=(e,t)=>(e.setMonth(e.getMonth()+3),t.setMonth(t.getMonth()+3),kv(e,t)),z9=(e,t)=>(e.setMonth(e.getMonth()+1),t.setMonth(t.getMonth()+1),Mv(e,t)),U9=(e,t)=>(e.setDate(e.getDate()+7),t.setDate(t.getDate()+7),Iv(e,t)),$9=(e,t)=>(e.setDate(e.getDate()+1),t.setDate(t.getDate()+1),Av(e,t)),j9={today:Av,yesterday:T9,tomorrow:$9,thisWeek:Iv,lastWeek:A9,nextWeek:U9,thisMonth:Mv,lastMonth:I9,nextMonth:z9,thisQuarter:kv,lastQuarter:M9,nextQuarter:W9,thisYear:Lv,lastYear:H9,nextYear:V9,yearToDate:k9,last7Days:L9,last30Days:O9,last90Days:_9,last6Months:N9,last12Months:B9,last24Months:G9,setStartOfDay:mi,setStartOfWeek:Lh,setStartOfNextDay:Gi,setStartOfNextWeek:Zx,setStartOfMonth:_h,setStartOfNextMonth:Fv,setStartOfQuarter:xv,setStartOfNextQuarter:Xx,setStartOfYear:Pv,setStartOfNextYear:Jx,setPreviousDay:cl,setPreviousWeek:Ev,setPreviousMonth:Dv,setPreviousQuarter:Tv},K9={tag:"div",cls:"ag-floating-filter-input",role:"presentation",children:[{tag:"ag-input-text-field",ref:"eReadOnlyText"},{tag:"div",ref:"eDateWrapper",cls:"ag-date-floating-filter-wrapper"}]},q9=class extends zx{constructor(){super(K9,[Eh]),this.eReadOnlyText=he,this.eDateWrapper=he,this.FilterModelFormatterClass=Yx,this.filterType="date",this.defaultOptions=Rv}setParams(e){super.setParams(e),this.createDateComponent();const t=this.getLocaleTextFunc();this.eReadOnlyText.setDisabled(!0).setInputAriaLabel(t("ariaDateFilterInput","Date Filter Input"))}updateParams(e){super.updateParams(e),this.dateComp.updateParams(this.getDateComponentParams()),this.updateCompOnModelChange(e.currentParentModel())}updateCompOnModelChange(e){const t=!this.readOnly&&this.canWeEditAfterModelFromParentFilter(e);if(this.setEditable(t),t){const n=e?$n(e.dateFrom):null;this.dateComp.setDate(n),this.eReadOnlyText.setValue("")}else this.eReadOnlyText.setValue(this.filterModelFormatter.getModelAsString(e)),this.dateComp.setDate(null)}setEditable(e){bt(this.eDateWrapper,e),bt(this.eReadOnlyText.getGui(),!e)}onModelUpdated(e){super.setLastTypeFromModel(e),this.updateCompOnModelChange(e)}onDateChanged(){const e=this.dateComp.getDate();if(this.reactive){const t=this.params;t.onUiChange();const n=t.model,i=Un(e),o=i==null?null:{...n??{filterType:this.filterType,type:this.lastType??this.optionsFactory.defaultOption},dateFrom:i};t.onModelChange(o,{afterFloatingFilter:!0})}else this.params.parentFilterInstance(t=>{t?.onFloatingFilterChanged(this.lastType||null,e)})}getDateComponentParams(){const{filterParams:e}=this.params,t=qg(e,this.defaultDebounceMs);return We(this.gos,{onDateChanged:hn(this,this.onDateChanged.bind(this),t),filterParams:e,location:"floatingFilter"})}createDateComponent(){const{beans:{context:e,userCompFactory:t},eDateWrapper:n,params:{column:i}}=this;this.dateComp=new $x(e,t,i.getColDef(),this.getDateComponentParams(),n,o=>{o.setInputAriaLabel(this.getAriaLabel(i))}),this.addDestroyFunc(()=>this.dateComp.destroy())}},Q9={tag:"div",cls:"ag-filter-filter",children:[{tag:"ag-input-text-field",ref:"eDateInput",cls:"ag-date-filter"}]},Y9=class extends yt{constructor(){super(Q9,[Eh]),this.eDateInput=he,this.isApply=!1,this.applyOnFocusOut=!1}init(e){this.params=e,this.setParams(e);const t=this.eDateInput.getInputElement();this.addManagedListeners(t,{mouseDown:()=>{this.eDateInput.isDisabled()||this.usingSafariDatePicker||t.focus({preventScroll:!0})},input:this.handleInput.bind(this,!1),change:this.handleInput.bind(this,!0),focusout:this.handleFocusOut.bind(this),focusin:this.handleFocusIn.bind(this)})}handleInput(e){if(!this.eDateInput.isDisabled()){if(this.isApply){this.applyOnFocusOut=!e,e&&this.params.onDateChanged();return}e||this.params.onDateChanged()}}handleFocusOut(){this.applyOnFocusOut&&(this.applyOnFocusOut=!1,this.params.onDateChanged())}handleFocusIn(){this.params.onFocusIn?.()}setParams(e){const t=this.eDateInput.getInputElement(),n=this.shouldUseBrowserDatePicker(e);this.usingSafariDatePicker=n&&Ur();const{minValidYear:i,maxValidYear:o,minValidDate:r,maxValidDate:s,buttons:a,includeTime:l,colDef:u}=e.filterParams||{},h=this.beans.dataTypeSvc,f=l??h?.getDateIncludesTimeFlag?.(u.cellDataType)??!1;n?f?(t.type="datetime-local",t.step="1"):t.type="date":t.type="text";const p=e1(r,i,!0),m=e1(s,o,!1);p&&m&&p.getTime()>m.getTime()&&se(87),p&&(t.min=Un(p,f)),m&&(t.max=Un(m,f)),this.isApply=e.location==="floatingFilter"&&!!a?.includes("apply")}refresh(e){this.params=e,this.setParams(e)}getDate(){return $n(this.eDateInput.getValue())}setDate(e){const t=this.params.filterParams.colDef.cellDataType,n=this.beans.dataTypeSvc?.getDateIncludesTimeFlag(t)??!1;this.eDateInput.setValue(Un(e,n))}setInputPlaceholder(e){this.eDateInput.setInputPlaceholder(e)}setInputAriaLabel(e){this.eDateInput.setAriaLabel(e)}setDisabled(e){this.eDateInput.setDisabled(e)}afterGuiAttached(e){e?.suppressFocus||this.eDateInput.getInputElement().focus({preventScroll:!0})}shouldUseBrowserDatePicker(e){return e?.filterParams?.browserDatePicker??!0}};function e1(e,t,n){return e&&t&&se(n?85:86),e instanceof Date?e:e?$n(e):t?$n(`${t}-${n?"01-01":"12-31"}`):null}var Ov=["equals","notEqual","greaterThan","greaterThanOrEqual","lessThan","lessThanOrEqual","inRange","blank","notBlank"];function _v(e){return e?.allowedCharPattern??null}function Nh(e){return e==null||isNaN(e)?null:e}function t1(e,t){const{filter:n,filterTo:i,type:o}=e||{};return[Nh(n),Nh(i)].slice(0,ns(o,t))}var Z9=class extends Ih{constructor(){super("numberFilter",t1,Ov),this.eValuesFrom=[],this.eValuesTo=[],this.filterType="number",this.defaultDebounceMs=500}afterGuiAttached(e){super.afterGuiAttached(e),this.refreshInputValidation()}shouldKeepInvalidInputState(){return!Ya()&&this.hasInvalidInputs()&&this.getConditionTypes().includes("inRange")}refreshInputValidation(){for(let e=0;e<this.eValuesFrom.length;e++){const t=this.eValuesFrom[e],n=this.eValuesTo[e];this.refreshInputPairValidation(t,n)}}refreshInputPairValidation(e,t,n=!1){const i=this.params.numberParser,o=i1(i,e),r=i1(i,t),s=X9(o,r,n),a=s?this.translate(s,[String(n?r:o)]):"";(n?e:t).setCustomValidity(a),(n?t:e).setCustomValidity(""),a.length>0&&this.beans.ariaAnnounce.announceValue(a,"dateFilter")}getState(){return{isInvalid:this.hasInvalidInputs()}}areStatesEqual(e,t){return(e?.isInvalid??!1)===(t?.isInvalid??!1)}refresh(e){const t=super.refresh(e),{state:n,additionalEventAttributes:i}=e,o=this.state,r=i?.fromAction;return(r&&r!="apply"||n.model!==o.model||!this.areStatesEqual(n.state,o.state))&&this.refreshInputValidation(),t}setElementValue(e,t,n){const{numberFormatter:i}=this.params,o=!n&&i?i(t??null):t;super.setElementValue(e,o),o===null&&e.setCustomValidity("")}createEValue(){const{params:e,eValuesFrom:t,eValuesTo:n}=this,i=_v(e),o=on({tag:"div",cls:"ag-filter-body",role:"presentation"}),r=this.createFromToElement(o,t,"from",i),s=this.createFromToElement(o,n,"to",i),a=(h,f,p)=>()=>this.refreshInputPairValidation(h,f,p),l=a(r,s,!0);r.onValueChange(l),r.addGuiEventListener("focusin",l);const u=a(r,s,!1);return s.onValueChange(u),s.addGuiEventListener("focusin",u),o}createFromToElement(e,t,n,i){const o=this.createManagedBean(i?new ar({allowedCharPattern:i}):new lv);return o.addCss(`ag-filter-${n}`),o.addCss("ag-filter-filter"),t.push(o),e.appendChild(o.getGui()),o}removeEValues(e,t){const n=i=>this.removeComponents(i,e,t);n(this.eValuesFrom),n(this.eValuesTo)}getValues(e){const t=[];return this.forEachPositionInput(e,(n,i,o,r)=>{i<r&&t.push(Nh(n1(this.params.numberParser,n.getValue())))}),t}areSimpleModelsEqual(e,t){return e.filter===t.filter&&e.filterTo===t.filterTo&&e.type===t.type}createCondition(e){const t=this.getConditionType(e),n={filterType:this.filterType,type:t},i=this.getValues(e);return i.length>0&&(n.filter=i[0]),i.length>1&&(n.filterTo=i[1]),n}removeConditionsAndOperators(e,t){if(!this.hasInvalidInputs())return super.removeConditionsAndOperators(e,t)}getInputs(e){const{eValuesFrom:t,eValuesTo:n}=this;return e>=t.length?[null,null]:[t[e],n[e]]}hasInvalidInputs(){let e=!1;return this.forEachInput(t=>e||(e=!t.getInputElement().validity.valid)),e}positionHasInvalidInputs(e){let t=!1;return this.forEachPositionInput(e,n=>t||(t=!n.getInputElement().validity.valid)),t}canApply(e){return!this.hasInvalidInputs()}};function n1(e,t){if(typeof t=="number")return t;let n=Jo(t);return n!=null&&n.trim()===""&&(n=null),e?e(n):n==null||n.trim()==="-"?null:Number.parseFloat(n)}function i1(e,t){return Nh(n1(e,t.getValue(!0)))}function X9(e,t,n){return e!=null&&t!=null&&e>=t?`strict${n?"Max":"Min"}ValueValidation`:null}var o1=class extends Mh{constructor(e,t){super(e,t,t.numberFormatter),this.filterTypeKeys=wv}conditionToString(e,t,n,i,o){const{filter:r,filterTo:s,type:a}=e,l=this.formatValue.bind(this);if(t){const u=this.conditionForToolPanel(a,n,()=>l(r),()=>l(s),i,o);if(u!=null)return u}return n?`${l(r)}-${l(s)}`:r!=null?l(r):`${a}`}},J9=class extends Cv{constructor(){super(t1,Ov),this.filterType="number",this.FilterModelFormatterClass=o1}comparator(){return(e,t)=>e===t?0:e<t?1:-1}isValid(e){return!isNaN(e)}},e7=class extends X{constructor(){super(...arguments),this.onValueChanged=()=>{},this.numberInputActive=!0}setupGui(e){this.eNumberInput=this.createManagedBean(new lv),this.eTextInput=this.createManagedBean(new ar),this.eTextInput.setDisabled(!0);const t=this.eNumberInput.getGui(),n=this.eTextInput.getGui();e.appendChild(t),e.appendChild(n),this.setupListeners(t,i=>this.onValueChanged(i)),this.setupListeners(n,i=>this.onValueChanged(i))}setEditable(e){this.numberInputActive=e,this.eNumberInput.setDisplayed(this.numberInputActive),this.eTextInput.setDisplayed(!this.numberInputActive)}setAutoComplete(e){this.eNumberInput.setAutoComplete(e),this.eTextInput.setAutoComplete(e)}getValue(){return this.getActiveInputElement().getValue()}setValue(e,t){this.getActiveInputElement().setValue(e,t)}getActiveInputElement(){return this.numberInputActive?this.eNumberInput:this.eTextInput}setValueChangedListener(e){this.onValueChanged=e}setupListeners(e,t){this.addManagedListeners(e,{input:t,keydown:t})}setParams({ariaLabel:e,autoComplete:t,placeholder:n}){this.setAriaLabel(e),t!==void 0&&this.setAutoComplete(t),this.setPlaceholder(this.eNumberInput,n),this.setPlaceholder(this.eTextInput,n)}setPlaceholder(e,t){e.toggleCss("ag-floating-filter-search-icon",!!t),e.setInputPlaceholder(t)}setAriaLabel(e){this.eNumberInput.setInputAriaLabel(e),this.eTextInput.setInputAriaLabel(e)}},t7=class extends Sv{constructor(){super(...arguments),this.FilterModelFormatterClass=o1,this.filterType="number",this.defaultOptions=Ov}updateParams(e){_v(e.filterParams)!==this.allowedCharPattern&&this.recreateFloatingFilterInputService(e),super.updateParams(e)}createFloatingFilterInputService(e){return this.allowedCharPattern=_v(e.filterParams),this.allowedCharPattern?this.createManagedBean(new bv({config:{allowedCharPattern:this.allowedCharPattern}})):this.createManagedBean(new e7)}convertValue(e){return e?Number(e):null}},Nv=["contains","notContains","equals","notEqual","startsWith","endsWith","blank","notBlank"],n7=class extends Ih{constructor(){super("textFilter",Wx,Nv),this.filterType="text",this.eValuesFrom=[],this.eValuesTo=[],this.defaultDebounceMs=500}createCondition(e){const t=this.getConditionType(e),n={filterType:this.filterType,type:t},i=this.getValues(e);return i.length>0&&(n.filter=i[0]),i.length>1&&(n.filterTo=i[1]),n}areSimpleModelsEqual(e,t){return e.filter===t.filter&&e.filterTo===t.filterTo&&e.type===t.type}getInputs(e){const{eValuesFrom:t,eValuesTo:n}=this;return e>=t.length?[null,null]:[t[e],n[e]]}getValues(e){const t=[];return this.forEachPositionInput(e,(n,i,o,r)=>{i<r&&t.push(Jo(n.getValue()))}),t}createEValue(){const e=on({tag:"div",cls:"ag-filter-body",role:"presentation"}),{eValuesFrom:t,eValuesTo:n}=this;return this.createFromToElement(e,t,"from"),this.createFromToElement(e,n,"to"),e}createFromToElement(e,t,n){const i=this.createManagedBean(new ar);i.addCss(`ag-filter-${n}`),i.addCss("ag-filter-filter"),t.push(i),e.appendChild(i.getGui())}removeEValues(e,t){const n=r=>this.removeComponents(r,e,t),{eValuesFrom:i,eValuesTo:o}=this;n(i),n(o)}},r1=class extends Mh{constructor(){super(...arguments),this.filterTypeKeys=w9}conditionToString(e,t,n,i,o){const{filter:r,filterTo:s,type:a}=e;if(t){const l=h=>()=>to(this,"filterSummaryTextQuote",[h]),u=this.conditionForToolPanel(a,n,l(r),l(s),i,o);if(u!=null)return u}return n?`${r}-${s}`:r!=null?`${r}`:`${a}`}},i7=({filterOption:e,value:t,filterText:n})=>{if(n==null)return!1;switch(e){case"contains":return t.includes(n);case"notContains":return!t.includes(n);case"equals":return t===n;case"notEqual":return t!=n;case"startsWith":return t.indexOf(n)===0;case"endsWith":{const i=t.lastIndexOf(n);return i>=0&&i===t.length-n.length}default:return!1}},o7=e=>e,r7=e=>e==null?null:e.toString().toLowerCase(),s7=class extends Hx{constructor(){super(Wx,Nv),this.filterType="text",this.FilterModelFormatterClass=r1}updateParams(e){super.updateParams(e);const t=e.filterParams;this.matcher=t.textMatcher??i7,this.formatter=t.textFormatter??(t.caseSensitive?o7:r7)}evaluateNullValue(e){return e?["notEqual","notContains","blank"].indexOf(e)>=0:!1}evaluateNonNullValue(e,t,n,i){const o=e.map(p=>this.formatter(p))||[],r=this.formatter(t),{api:s,colDef:a,column:l,context:u,filterParams:{textFormatter:h}}=this.params;if(n.type==="blank")return Ah(t);if(n.type==="notBlank")return!Ah(t);const f={api:s,colDef:a,column:l,context:u,node:i.node,data:i.data,filterOption:n.type,value:r,textFormatter:h};return o.some(p=>this.matcher({...f,filterText:p}))}processModelToApply(e){if(e&&this.params.filterParams.trimInput){const t=n=>{const i={...n},{filter:o,filterTo:r}=n;return o&&(i.filter=yv(o)??null),r&&(i.filterTo=yv(r)??null),i};return M0(e)?{...e,conditions:e.conditions.map(t)}:t(e)}return e}},a7=class extends Sv{constructor(){super(...arguments),this.FilterModelFormatterClass=r1,this.filterType="text",this.defaultOptions=Nv}createFloatingFilterInputService(){return this.createManagedBean(new bv)}};function l7(e){return!!e.quickFilter?.isFilterPresent()}function c7(e){return e.quickFilter?.getText()}function u7(e){e.quickFilter?.resetCache()}var d7=class extends X{constructor(){super(...arguments),this.beanName="quickFilter",this.quickFilter=null,this.quickFilterParts=null}postConstruct(){const e=this.resetCache.bind(this),t=this.gos;this.addManagedEventListeners({columnPivotModeChanged:e,newColumnsLoaded:e,columnRowGroupChanged:e,columnVisible:()=>{t.get("includeHiddenColumnsInQuickFilter")||this.resetCache()}}),this.addManagedPropertyListener("quickFilterText",n=>this.setFilter(n.currentValue)),this.addManagedPropertyListeners(["includeHiddenColumnsInQuickFilter","applyQuickFilterBeforePivotOrAgg"],()=>this.onColumnConfigChanged()),this.quickFilter=this.parseFilter(t.get("quickFilterText")),this.parser=t.get("quickFilterParser"),this.matcher=t.get("quickFilterMatcher"),this.setFilterParts(),this.addManagedPropertyListeners(["quickFilterMatcher","quickFilterParser"],()=>this.setParserAndMatcher())}refreshCols(){const{autoColSvc:e,colModel:t,gos:n,pivotResultCols:i}=this.beans,o=t.isPivotMode(),r=e?.getColumns(),s=t.getColDefCols();let a=(o&&!n.get("applyQuickFilterBeforePivotOrAgg")?i?.getPivotResultCols()?.list:s)??[];r&&(a=a.concat(r)),this.colsToUse=n.get("includeHiddenColumnsInQuickFilter")?a:a.filter(l=>l.isVisible()||l.isRowGroupActive())}isFilterPresent(){return this.quickFilter!==null}doesRowPass(e){const t=this.gos.get("cacheQuickFilter");return this.matcher?this.doesRowPassMatcher(t,e):this.quickFilterParts.every(n=>t?this.doesRowPassCache(e,n):this.doesRowPassNoCache(e,n))}resetCache(){this.beans.rowModel.forEachNode(e=>e.quickFilterAggregateText=null)}getText(){return this.gos.get("quickFilterText")}setFilterParts(){const{quickFilter:e,parser:t}=this;e?this.quickFilterParts=t?t(e):e.split(" "):this.quickFilterParts=null}parseFilter(e){return we(e)?e.toUpperCase():null}setFilter(e){if(e!=null&&typeof e!="string"){se(70,{newFilter:e});return}const t=this.parseFilter(e);this.quickFilter!==t&&(this.quickFilter=t,this.setFilterParts(),this.dispatchLocalEvent({type:"quickFilterChanged"}))}setParserAndMatcher(){const e=this.gos.get("quickFilterParser"),t=this.gos.get("quickFilterMatcher"),n=e!==this.parser||t!==this.matcher;this.parser=e,this.matcher=t,n&&(this.setFilterParts(),this.dispatchLocalEvent({type:"quickFilterChanged"}))}onColumnConfigChanged(){this.refreshCols(),this.resetCache(),this.isFilterPresent()&&this.dispatchLocalEvent({type:"quickFilterChanged"})}doesRowPassNoCache(e,t){return this.colsToUse.some(n=>{const i=this.getTextForColumn(n,e);return we(i)&&i.includes(t)})}doesRowPassCache(e,t){return this.checkGenerateAggText(e),e.quickFilterAggregateText.includes(t)}doesRowPassMatcher(e,t){let n;e?(this.checkGenerateAggText(t),n=t.quickFilterAggregateText):n=this.getAggText(t);const{quickFilterParts:i,matcher:o}=this;return o(i,n)}checkGenerateAggText(e){e.quickFilterAggregateText||(e.quickFilterAggregateText=this.getAggText(e))}getTextForColumn(e,t){let n=this.beans.filterValueSvc.getValue(e,t);const i=e.getColDef();if(i.getQuickFilterText){const o=We(this.gos,{value:n,node:t,data:t.data,column:e,colDef:i});n=i.getQuickFilterText(o)}return we(n)?n.toString().toUpperCase():null}getAggText(e){const t=[];for(const n of this.colsToUse){const i=this.getTextForColumn(n,e);we(i)&&t.push(i)}return t.join(`
|
|
64
|
-
`)}},h7={moduleName:"ClientSideRowModelFilter",version:ve,rowModels:["clientSide"],beans:[r6]},Bv={moduleName:"FilterCore",version:ve,beans:[t9],apiFunctions:{isAnyFilterPresent:J4,onFilterChanged:e9},css:[M4],dependsOn:[h7]},s1={moduleName:"FilterValue",version:ve,beans:[c9]},Hc={moduleName:"ColumnFilter",version:ve,beans:[X4,l9],dynamicBeans:{headerFilterCellCtrl:E4},icons:{filter:"filter",filterActive:"filter"},apiFunctions:{isColumnFilterPresent:k4,getColumnFilterInstance:L4,destroyFilter:O4,setFilterModel:_4,getFilterModel:N4,getColumnFilterModel:B4,setColumnFilterModel:G4,showColumnFilter:H4,hideColumnFilter:V4,getColumnFilterHandler:W4,doFilterAction:z4},dependsOn:[Bv,Ph,s1,I4]},f7={moduleName:"CustomFilter",version:ve,userComponents:{agReadOnlyFloatingFilter:d9},dependsOn:[Hc]},p7={moduleName:"TextFilter",version:ve,dependsOn:[Hc],userComponents:{agTextColumnFilter:{classImp:n7,params:{useForm:!0}},agTextColumnFloatingFilter:a7},dynamicBeans:{agTextColumnFilterHandler:s7}},g7={moduleName:"NumberFilter",version:ve,dependsOn:[Hc],userComponents:{agNumberColumnFilter:{classImp:Z9,params:{useForm:!0}},agNumberColumnFloatingFilter:t7},dynamicBeans:{agNumberColumnFilterHandler:J9}},m7={moduleName:"BigIntFilter",version:ve,dependsOn:[Hc],userComponents:{agBigIntColumnFilter:{classImp:v9,params:{useForm:!0}},agBigIntColumnFloatingFilter:S9},dynamicBeans:{agBigIntColumnFilterHandler:b9}},v7={moduleName:"DateFilter",version:ve,dependsOn:[Hc],userComponents:{agDateColumnFilter:{classImp:R9,params:{useForm:!0}},agDateInput:Y9,agDateColumnFloatingFilter:q9},dynamicBeans:{agDateColumnFilterHandler:P9}},C7={moduleName:"QuickFilterCore",version:ve,rowModels:["clientSide"],beans:[d7],dependsOn:[Bv,s1]},w7={moduleName:"QuickFilter",version:ve,apiFunctions:{isQuickFilterPresent:l7,getQuickFilter:c7,resetQuickFilter:u7},dependsOn:[C7]},b7={moduleName:"ExternalFilter",version:ve,dependsOn:[Bv]},y7=class extends X{constructor(e,t,n){super(),this.id=e,this.parentCache=t,this.params=n,this.state="needsLoading",this.version=0,this.startRow=e*n.blockSize,this.endRow=this.startRow+n.blockSize}load(){this.state="loading",this.loadFromDatasource()}setStateWaitingToLoad(){this.version++,this.state="needsLoading"}pageLoadFailed(e){this.isRequestMostRecentAndLive(e)&&(this.state="failed"),this.dispatchLocalEvent({type:"loadComplete"})}pageLoaded(e,t,n){this.successCommon(e,{rowData:t,rowCount:n})}isRequestMostRecentAndLive(e){const t=e===this.version,n=this.isAlive();return t&&n}successCommon(e,t){this.dispatchLocalEvent({type:"loadComplete"}),this.isRequestMostRecentAndLive(e)&&(this.state="loaded",this.processServerResult(t))}postConstruct(){this.rowNodes=[];const{params:{blockSize:e,rowHeight:t},startRow:n,beans:i,rowNodes:o}=this;for(let r=0;r<e;r++){const s=n+r,a=new $r(i);a.setRowHeight(t),a.uiLevel=0,a.setRowIndex(s),a.setRowTop(t*s),o.push(a)}}getBlockStateJson(){const{id:e,startRow:t,endRow:n,state:i}=this;return{id:""+e,state:{blockNumber:e,startRow:t,endRow:n,pageStatus:i}}}setDataAndId(e,t,n){we(t)?e.setDataAndId(t,n.toString()):e.setDataAndId(void 0,void 0)}loadFromDatasource(){const e=this.createLoadParams();if(Nt(this.params.datasource.getRows)){se(90);return}window.setTimeout(()=>{this.params.datasource.getRows(e)},0)}createLoadParams(){const{startRow:e,endRow:t,version:n,params:{sortModel:i,filterModel:o},gos:r}=this;return We(r,{startRow:e,endRow:t,successCallback:this.pageLoaded.bind(this,n),failCallback:this.pageLoadFailed.bind(this,n),sortModel:i,filterModel:o})}forEachNode(e,t,n){this.rowNodes.forEach((i,o)=>{this.startRow+o<n&&e(i,t.value++)})}getRow(e,t=!1){t||(this.lastAccessed=this.params.lastAccessedSequence.value++);const n=e-this.startRow;return this.rowNodes[n]}processServerResult(e){const{rowNodes:t,beans:n}=this;t.forEach((o,r)=>{const s=e.rowData?e.rowData[r]:void 0;!o.id&&o.alreadyRendered&&s&&(t[r]=new $r(n),t[r].setRowIndex(o.rowIndex),t[r].setRowTop(o.rowTop),t[r].setRowHeight(o.rowHeight),o._destroy(!0)),this.setDataAndId(t[r],s,this.startRow+r)});const i=e.rowCount!=null&&e.rowCount>=0?e.rowCount:void 0;this.parentCache.pageLoaded(this,i)}destroy(){const e=this.rowNodes;for(let t=0,n=e.length;t<n;t++)e[t]._destroy(!1);e.length=0,super.destroy()}},S7=2,R7=class extends X{constructor(e){super(),this.params=e,this.lastRowIndexKnown=!1,this.blocks={},this.blockCount=0,this.rowCount=e.initialRowCount}getRow(e,t=!1){const n=Math.floor(e/this.params.blockSize);let i=this.blocks[n];if(!i){if(t)return;i=this.createBlock(n)}return i.getRow(e)}createBlock(e){const t=this.params,n=this.createBean(new y7(e,this,t));return this.blocks[n.id]=n,this.blockCount++,this.purgeBlocksIfNeeded(n),t.rowNodeBlockLoader.addBlock(n),n}refreshCache(){if(this.blockCount==0){this.purgeCache();return}for(const t of this.getBlocksInOrder())t.setStateWaitingToLoad();this.params.rowNodeBlockLoader.checkBlockToLoad()}destroy(){for(const e of this.getBlocksInOrder())this.destroyBlock(e);super.destroy()}getRowCount(){return this.rowCount}isLastRowIndexKnown(){return this.lastRowIndexKnown}pageLoaded(e,t){this.isAlive()&&(Br(this.gos,`InfiniteCache - onPageLoaded: page = ${e.id}, lastRow = ${t}`),this.checkRowCount(e,t),this.onCacheUpdated())}purgeBlocksIfNeeded(e){const t=this.getBlocksInOrder().filter(s=>s!=e),n=(s,a)=>a.lastAccessed-s.lastAccessed;t.sort(n);const i=this.params.maxBlocksInCache>0,o=i?this.params.maxBlocksInCache-1:null,r=S7-1;t.forEach((s,a)=>{const l=s.state==="needsLoading"&&a>=r,u=i?a>=o:!1;if(l||u){if(this.isBlockCurrentlyDisplayed(s)||this.isBlockFocused(s))return;this.removeBlockFromCache(s)}})}isBlockFocused(e){const t=this.beans.focusSvc.getFocusCellToUseAfterRefresh();if(!t||t.rowPinned!=null)return!1;const{startRow:n,endRow:i}=e;return t.rowIndex>=n&&t.rowIndex<i}isBlockCurrentlyDisplayed(e){const{startRow:t,endRow:n}=e;return this.beans.rowRenderer.isRangeInRenderedViewport(t,n-1)}removeBlockFromCache(e){e&&this.destroyBlock(e)}checkRowCount(e,t){if(typeof t=="number"&&t>=0)this.rowCount=t,this.lastRowIndexKnown=!0;else if(!this.lastRowIndexKnown){const{blockSize:n,overflowSize:i}=this.params,r=(e.id+1)*n+i;this.rowCount<r&&(this.rowCount=r)}}setRowCount(e,t){this.rowCount=e,we(t)&&(this.lastRowIndexKnown=t),this.lastRowIndexKnown||this.rowCount%this.params.blockSize===0&&this.rowCount++,this.onCacheUpdated()}forEachNodeDeep(e){const t={value:0};for(const n of this.getBlocksInOrder())n.forEachNode(e,t,this.rowCount)}getBlocksInOrder(){const e=(n,i)=>n.id-i.id;return Object.values(this.blocks).sort(e)}destroyBlock(e){delete this.blocks[e.id],this.destroyBean(e),this.blockCount--,this.params.rowNodeBlockLoader.removeBlock(e)}onCacheUpdated(){this.isAlive()&&(this.destroyAllBlocksPastVirtualRowCount(),this.eventSvc.dispatchEvent({type:"storeUpdated"}))}destroyAllBlocksPastVirtualRowCount(){const e=[];for(const t of this.getBlocksInOrder())t.id*this.params.blockSize>=this.rowCount&&e.push(t);if(e.length>0)for(const t of e)this.destroyBlock(t)}purgeCache(){for(const e of this.getBlocksInOrder())this.removeBlockFromCache(e);this.lastRowIndexKnown=!1,this.rowCount===0&&(this.rowCount=this.params.initialRowCount),this.onCacheUpdated()}getRowNodesInRange(e,t){const n=[];let i=-1,o=!1;const r={value:0};let s=!1;for(const l of this.getBlocksInOrder())if(!s){if(o&&i+1!==l.id){s=!0;continue}i=l.id,l.forEachNode(u=>{const h=u===e||u===t;(o||h)&&n.push(u),h&&(o=!o)},r,this.rowCount)}return s||o?[]:n}},F7=class extends X{constructor(){super(...arguments),this.beanName="rowModel",this.rootNode=null,this.hierarchical=!1}getRowBounds(e){return{rowHeight:this.rowHeight,rowTop:this.rowHeight*e}}ensureRowHeightsValid(){return!1}postConstruct(){if(this.gos.get("rowModelType")!=="infinite")return;const e=this.beans,t=new $r(e);this.rootNode=t,t.level=-1,this.rowHeight=Ls(e),this.addEventListeners(),this.addDestroyFunc(()=>this.destroyCache())}start(){this.setDatasource(this.gos.get("datasource"))}destroy(){this.destroyDatasource(),super.destroy(),this.rootNode=null}destroyDatasource(){this.datasource&&(this.destroyBean(this.datasource),this.beans.rowRenderer.datasourceChanged(),this.datasource=null)}addEventListeners(){this.addManagedEventListeners({filterChanged:this.reset.bind(this),sortChanged:this.reset.bind(this),newColumnsLoaded:this.onColumnEverything.bind(this),storeUpdated:this.dispatchModelUpdatedEvent.bind(this)}),this.addManagedPropertyListener("datasource",()=>this.setDatasource(this.gos.get("datasource"))),this.addManagedPropertyListener("cacheBlockSize",()=>this.resetCache()),this.addManagedPropertyListener("rowHeight",()=>{this.rowHeight=Ls(this.beans),this.cacheParams.rowHeight=this.rowHeight,this.updateRowHeights()})}onColumnEverything(){let e;this.cacheParams?e=!sc(this.cacheParams.sortModel,this.beans.sortSvc?.getSortModel()??[]):e=!0,e&&this.reset()}getType(){return"infinite"}setDatasource(e){this.destroyDatasource(),this.datasource=e,e&&this.reset()}isEmpty(){return!this.infiniteCache}isRowsToRender(){return!!this.infiniteCache}getOverlayType(){return this.infiniteCache?.getRowCount()===0?this.beans.filterManager?.isAnyFilterPresent()?"noMatchingRows":"noRows":null}getNodesInRangeForSelection(e,t){return this.infiniteCache?.getRowNodesInRange(e,t)??[]}reset(){if(!this.datasource)return;Ua(this.gos)!=null||this.beans.selectionSvc?.reset("rowDataChanged"),this.resetCache()}dispatchModelUpdatedEvent(){this.eventSvc.dispatchEvent({type:"modelUpdated",newPage:!1,newPageSize:!1,newData:!1,keepRenderedRows:!0,animate:!1})}resetCache(){this.destroyCache();const e=this.beans,{filterManager:t,sortSvc:n,rowNodeBlockLoader:i,eventSvc:o,gos:r}=e;this.cacheParams={datasource:this.datasource,filterModel:t?.getFilterModel()??{},sortModel:n?.getSortModel()??[],rowNodeBlockLoader:i,initialRowCount:r.get("infiniteInitialRowCount"),maxBlocksInCache:r.get("maxBlocksInCache"),rowHeight:Ls(e),overflowSize:r.get("cacheOverflowSize"),blockSize:r.get("cacheBlockSize"),lastAccessedSequence:{value:0}},this.infiniteCache=this.createBean(new R7(this.cacheParams)),o.dispatchEventOnce({type:"rowCountReady"}),this.dispatchModelUpdatedEvent()}updateRowHeights(){this.forEachNode(e=>{e.setRowHeight(this.rowHeight),e.setRowTop(this.rowHeight*e.rowIndex)}),this.dispatchModelUpdatedEvent()}destroyCache(){this.infiniteCache=this.destroyBean(this.infiniteCache)}getRow(e){const t=this.infiniteCache;if(t&&!(e>=t.getRowCount()))return t.getRow(e)}getRowNode(e){let t;return this.forEachNode(n=>{n.id===e&&(t=n)}),t}forEachNode(e){this.infiniteCache?.forEachNodeDeep(e)}getTopLevelRowCount(){return this.getRowCount()}getTopLevelRowDisplayedIndex(e){return e}getRowIndexAtPixel(e){if(this.rowHeight!==0){const t=Math.floor(e/this.rowHeight),n=this.getRowCount()-1;return t>n?n:t}return 0}getRowCount(){return this.infiniteCache?this.infiniteCache.getRowCount():0}isRowPresent(e){return!!this.getRowNode(e.id)}refreshCache(){this.infiniteCache?.refreshCache()}purgeCache(){this.infiniteCache?.purgeCache()}isLastRowIndexKnown(){return this.infiniteCache?.isLastRowIndexKnown()??!1}setRowCount(e,t){this.infiniteCache?.setRowCount(e,t)}resetRowHeights(){}onRowHeightChanged(){}};function x7(e){Zd(e)?.refreshCache()}function P7(e){Zd(e)?.purgeCache()}function E7(e){return Zd(e)?.getRowCount()}var D7=class extends X{constructor(){super(...arguments),this.beanName="rowNodeBlockLoader",this.activeBlockLoadsCount=0,this.blocks=[],this.active=!0}postConstruct(){this.maxConcurrentRequests=gO(this.gos);const e=this.gos.get("blockLoadDebounceMillis");e&&e>0&&(this.checkBlockToLoadDebounce=hn(this,this.performCheckBlocksToLoad.bind(this),e))}addBlock(e){this.blocks.push(e),e.addEventListener("loadComplete",this.loadComplete.bind(this)),this.checkBlockToLoad()}removeBlock(e){Ro(this.blocks,e)}destroy(){super.destroy(),this.active=!1}loadComplete(){this.activeBlockLoadsCount--,this.checkBlockToLoad()}checkBlockToLoad(){this.checkBlockToLoadDebounce?this.checkBlockToLoadDebounce():this.performCheckBlocksToLoad()}performCheckBlocksToLoad(){if(!this.active)return;if(this.printCacheStatus(),this.maxConcurrentRequests!=null&&this.activeBlockLoadsCount>=this.maxConcurrentRequests){Br(this.gos,"RowNodeBlockLoader - checkBlockToLoad: max loads exceeded");return}const e=this.maxConcurrentRequests!=null?this.maxConcurrentRequests-this.activeBlockLoadsCount:1,t=this.blocks.filter(n=>n.state==="needsLoading").slice(0,e);this.activeBlockLoadsCount+=t.length;for(const n of t)n.load();this.printCacheStatus()}getBlockState(){const e={};return this.blocks.forEach(t=>{const{id:n,state:i}=t.getBlockStateJson();e[n]=i}),e}printCacheStatus(){Br(this.gos,`RowNodeBlockLoader - printCacheStatus: activePageLoadsCount = ${this.activeBlockLoadsCount}, blocks = ${JSON.stringify(this.getBlockState())}`)}},T7={moduleName:"InfiniteRowModelCore",version:ve,rowModels:["infinite"],beans:[F7,D7]},A7={moduleName:"InfiniteRowModel",version:ve,apiFunctions:{refreshInfiniteCache:x7,purgeInfiniteCache:P7,getInfiniteRowCount:E7},dependsOn:[T7,X3]},I7=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(){this.wrapSvc=this.beans.frameworkOverrides.createGlobalEventListenerWrapper?.()}addListener(e,t){const n=this.wrapSvc?.wrap(e,t)??t,i=!kc.has(e),o=i?this.asyncListeners:this.syncListeners;o.has(e)||o.set(e,new Set),o.get(e).add(n),this.eventSvc.addListener(e,n,i)}removeListener(e,t){const n=this.wrapSvc?.unwrap(e,t)??t,o=!!this.asyncListeners.get(e)?.delete(n);o||this.syncListeners.get(e)?.delete(n),this.eventSvc.removeListener(e,n,o)}addGlobalListener(e){const t=this.wrapSvc?.wrapGlobal(e)??e,n=(r,s)=>{kc.has(r)&&t(r,s)},i=(r,s)=>{kc.has(r)||t(r,s)};this.globalListenerPairs.set(e,{syncListener:n,asyncListener:i});const o=this.eventSvc;o.addGlobalListener(n,!1),o.addGlobalListener(i,!0)}removeGlobalListener(e){const{eventSvc:t,wrapSvc:n,globalListenerPairs:i}=this,o=n?.unwrapGlobal(e)??e;if(i.has(o)){const{syncListener:s,asyncListener:a}=i.get(o);t.removeGlobalListener(s,!1),t.removeGlobalListener(a,!0),i.delete(e)}else this.syncGlobalListeners.delete(o),t.removeGlobalListener(o,!1)}destroyEventListeners(e,t){e.forEach((n,i)=>{n.forEach(o=>this.eventSvc.removeListener(i,o,t)),n.clear()}),e.clear()}destroyGlobalListeners(e,t){for(const n of e)this.eventSvc.removeGlobalListener(n,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:n,asyncListener:i})=>{t.removeGlobalListener(n,!1),t.removeGlobalListener(i,!0)}),e.clear()}};function M7(e,t,n){e.apiEventSvc?.addListener(t,n)}function k7(e,t,n){e.apiEventSvc?.removeListener(t,n)}function L7(e,t){e.apiEventSvc?.addGlobalListener(t)}function O7(e,t){e.apiEventSvc?.removeGlobalListener(t)}var _7={moduleName:"EventApi",version:ve,apiFunctions:{addEventListener:M7,addGlobalListener:L7,removeEventListener:k7,removeGlobalListener:O7},beans:[I7]},N7=class extends X{constructor(){super(...arguments),this.beanName="localeSvc"}getLocaleTextFunc(){const e=this.gos,t=e.getCallback("getLocaleText");return t?NL(t):BL(e.get("localeText"))}},B7={moduleName:"Locale",version:ve,beans:[N7]};function G7(e){return e.stateSvc?.getState()??{}}function H7(e,t,n){return e.stateSvc?.setState(t,n)}function a1(e){return e={...e},e.version||(e.version="32.1.0"),e.version==="32.1.0"&&(e=V7(e)),e.version=ve,e}function V7(e){return e.cellSelection=W7(e,"rangeSelection"),e}function W7(e,t){if(e&&typeof e=="object")return e[t]}var z7=class extends X{constructor(){super(...arguments),this.beanName="stateSvc",this.updateRowGroupExpansionStateTimer=0,this.suppressEvents=!0,this.queuedUpdateSources=new Set,this.dispatchStateUpdateEventDebounced=hn(this,()=>this.dispatchQueuedStateUpdateEvents(),0),this.onRowGroupOpenedDebounced=hn(this,()=>this.updateGroupExpansionState(),0),this.onRowSelectedDebounced=hn(this,()=>{this.staleStateKeys.delete("rowSelection"),this.updateCachedState("rowSelection",this.getRowSelectionState())},0),this.staleStateKeys=new Set}postConstruct(){const{gos:e,ctrlsSvc:t,colDelayRenderSvc:n}=this.beans;this.isClientSideRowModel=Yt(e);const i=a1(e.get("initialState")??{}),o=i.partialColumnState;delete i.partialColumnState,this.cachedState=i;const r=this.suppressEventsAndDispatchInitEvent.bind(this);t.whenReady(this,()=>r(()=>this.setupStateOnGridReady(i))),(i.columnOrder||i.columnVisibility||i.columnSizing||i.columnPinning||i.columnGroup)&&n?.hideColumns("columnState");const[s,a,l]=this.addManagedEventListeners({newColumnsLoaded:({source:u})=>{u==="gridInitializing"&&(s(),r(()=>{this.setupStateOnColumnsInitialised(i,!!o),n?.revealColumns("columnState")}))},rowCountReady:()=>{a?.(),r(()=>this.setupStateOnRowCountReady(i))},firstDataRendered:()=>{l?.(),r(()=>this.setupStateOnFirstDataRendered(i))}})}destroy(){super.destroy(),clearTimeout(this.updateRowGroupExpansionStateTimer),this.queuedUpdateSources.clear()}getState(){return this.staleStateKeys.size&&this.refreshStaleState(),this.cachedState}setState(e,t){const n=a1(e);delete n.partialColumnState,this.cachedState=n,this.startSuppressEvents();const i="api",o=t?new Set(t):void 0;this.setGridReadyState(n,i,o),this.setColumnsInitialisedState(n,i,!!o,o),this.setRowCountState(n,i,o),setTimeout(()=>{this.isAlive()&&this.setFirstDataRenderedState(n,i,o),this.stopSuppressEvents(i)})}setGridReadyState(e,t,n){t==="api"&&!n?.has("sideBar")&&this.beans.sideBar?.comp?.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,n,i){this.setColumnState(e,t,n,i),this.setColumnGroupState(e,t,i),this.updateColumnAndGroupState()}setupStateOnColumnsInitialised(e,t){this.setColumnsInitialisedState(e,"gridInitializing",t);const n=i=>()=>this.updateColumnState([i]);this.addManagedEventListeners({columnValueChanged:n("aggregation"),columnMoved:n("columnOrder"),columnPinned:n("columnPinning"),columnResized:n("columnSizing"),columnVisible:n("columnVisibility"),columnPivotChanged:n("pivot"),columnPivotModeChanged:n("pivot"),columnRowGroupChanged:n("rowGroup"),sortChanged:n("sort"),newColumnsLoaded:({source:i})=>{this.updateColumnAndGroupState(),i!=="gridInitializing"&&this.isClientSideRowModel&&this.onRowGroupOpenedDebounced()},columnGroupOpened:()=>this.updateCachedState("columnGroup",this.getColumnGroupState())})}setRowCountState(e,t,n){const{filter:i,rowGroupExpansion:o,ssrmRowGroupExpansion:r,rowSelection:s,pagination:a,rowPinning:l}=e,u=(f,p)=>!n?.has(f)&&(p||t==="api");u("filter",i)&&this.setFilterState(i),(u("rowGroupExpansion",o)||u("ssrmRowGroupExpansion",r))&&this.setRowGroupExpansionState(r,o,t),u("rowSelection",s)&&this.setRowSelectionState(s,t),u("pagination",a)&&this.setPaginationState(a,t),u("rowPinning",l)&&this.setRowPinningState(l);const h=this.updateCachedState.bind(this);h("filter",this.getFilterState()),this.updateGroupExpansionState(),h("rowSelection",this.getRowSelectionState()),h("pagination",this.getPaginationState())}setupStateOnRowCountReady(e){this.setRowCountState(e,"gridInitializing");const t=this.updateCachedState.bind(this),n=()=>{this.updateRowGroupExpansionStateTimer=0,this.updateGroupExpansionState()},i=()=>t("filter",this.getFilterState()),{gos:o,colFilter:r,selectableFilter:s}=this.beans;this.addManagedEventListeners({filterChanged:i,rowExpansionStateChanged:this.onRowGroupOpenedDebounced,expandOrCollapseAll:n,columnRowGroupChanged:n,rowDataUpdated:()=>{(o.get("groupDefaultExpanded")!==0||o.get("isGroupOpenByDefault"))&&(this.updateRowGroupExpansionStateTimer||(this.updateRowGroupExpansionStateTimer=setTimeout(n)))},selectionChanged:()=>{this.staleStateKeys.add("rowSelection"),this.onRowSelectedDebounced()},paginationChanged:a=>{(a.newPage||a.newPageSize)&&t("pagination",this.getPaginationState())},pinnedRowsChanged:()=>t("rowPinning",this.getRowPinningState())}),r&&this.addManagedListeners(r,{filterStateChanged:i}),s&&this.addManagedListeners(s,{selectedFilterChanged:i})}setFirstDataRenderedState(e,t,n){const{scroll:i,cellSelection:o,focusedCell:r,columnOrder:s}=e,a=(h,f)=>!n?.has(h)&&(f||t==="api");a("focusedCell",r)&&this.setFocusedCellState(r),a("cellSelection",o)&&this.setCellSelectionState(o),a("scroll",i)&&this.setScrollState(i),this.setColumnPivotState(!!s?.orderedColIds,t);const l=this.updateCachedState.bind(this);l("sideBar",this.getSideBarState()),l("focusedCell",this.getFocusedCellState());const u=this.getRangeSelectionState();l("rangeSelection",u),l("cellSelection",u),l("scroll",this.getScrollState())}setupStateOnFirstDataRendered(e){this.setFirstDataRenderedState(e,"gridInitializing");const t=this.updateCachedState.bind(this),n=()=>t("focusedCell",this.getFocusedCellState());this.addManagedEventListeners({cellFocused:n,cellFocusCleared:n,cellSelectionChanged:i=>{if(i.finished){const o=this.getRangeSelectionState();t("rangeSelection",o),t("cellSelection",o)}},bodyScrollEnd:()=>t("scroll",this.getScrollState())})}getColumnState(){const e=this.beans;return E3(hh(e),e.colModel.isPivotMode())}setColumnState(e,t,n,i){const{sort:o,rowGroup:r,aggregation:s,pivot:a,columnPinning:l,columnVisibility:u,columnSizing:h,columnOrder:f}=e;let p=!1;const m=(A,T)=>{const k=!i?.has(A)&&!!(T||t==="api");return p||(p=k),k},v={},w=A=>{let T=v[A];return T||(T={colId:A},v[A]=T,T)},b={},y=m("sort",o);y&&o?.sortModel.forEach(({colId:A,sort:T,type:k},K)=>{const re=w(A);re.sort=T,re.sortIndex=K,re.sortType=k}),(y||!n)&&(b.sort=null,b.sortIndex=null);const R=m("rowGroup",r);R&&r?.groupColIds.forEach((A,T)=>{const k=w(A);k.rowGroup=!0,k.rowGroupIndex=T}),(R||!n)&&(b.rowGroup=null,b.rowGroupIndex=null);const S=m("aggregation",s);S&&s?.aggregationModel.forEach(({colId:A,aggFunc:T})=>{w(A).aggFunc=T}),(S||!n)&&(b.aggFunc=null);const P=m("pivot",a);P&&(a?.pivotColIds.forEach((A,T)=>{const k=w(A);k.pivot=!0,k.pivotIndex=T}),this.gos.updateGridOptions({options:{pivotMode:!!a?.pivotMode},source:t})),(P||!n)&&(b.pivot=null,b.pivotIndex=null);const F=m("columnPinning",l);if(F){for(const A of l?.leftColIds??[])w(A).pinned="left";for(const A of l?.rightColIds??[])w(A).pinned="right"}(F||!n)&&(b.pinned=null);const I=m("columnVisibility",u);if(I)for(const A of u?.hiddenColIds??[])w(A).hide=!0;(I||!n)&&(b.hide=null);const L=m("columnSizing",h);if(L)for(const{colId:A,flex:T,width:k}of h?.columnSizingModel??[]){const K=w(A);K.flex=T??null,K.width=k}(L||!n)&&(b.flex=null);const V=f?.orderedColIds,G=!!V?.length&&!i?.has("columnOrder"),_=G?V.map(A=>w(A)):Object.values(v);(_.length||p)&&(this.columnStates=_,oo(this.beans,{state:_,applyOrder:G,defaultState:b},t))}setColumnPivotState(e,t){const n=this.columnStates;this.columnStates=void 0;const i=this.columnGroupStates;this.columnGroupStates=void 0;const o=this.beans,{pivotResultCols:r,colGroupSvc:s}=o;if(r?.isPivotResultColsPresent()){if(n){const a=[];for(const l of n)r.getPivotResultCol(l.colId)&&a.push(l);oo(o,{state:a,applyOrder:e},t)}i&&s?.setColumnGroupState(i,t)}}getColumnGroupState(){const e=this.beans.colGroupSvc;if(!e)return;const t=e.getColumnGroupState();return D3(t)}setColumnGroupState(e,t,n){const i=this.beans.colGroupSvc;if(!i||n?.has("columnGroup")||t!=="api"&&!Object.prototype.hasOwnProperty.call(e,"columnGroup"))return;const o=new Set(e.columnGroup?.openColumnGroupIds),s=i.getColumnGroupState().map(({groupId:a})=>{const l=o.has(a);return l&&o.delete(a),{groupId:a,open:l}});for(const a of o)s.push({groupId:a,open:!0});s.length&&(this.columnGroupStates=s),i.setColumnGroupState(s,t)}getFilterState(){const{filterManager:e,selectableFilter:t}=this.beans;let n=e?.getFilterModel();n&&Object.keys(n).length===0&&(n=void 0);const i=e?.getFilterState(),o=e?.getAdvFilterModel()??void 0,r=t?.getState();return n||o||i||r?{filterModel:n,columnFilterState:i,advancedFilterModel:o,selectableFilters:r}:void 0}setFilterState(e){const{filterManager:t,selectableFilter:n}=this.beans,{filterModel:i,columnFilterState:o,advancedFilterModel:r,selectableFilters:s}=e??{filterModel:null,columnFilterState:null,advancedFilterModel:null};s!==void 0&&n?.setState(s??{}),(i!==void 0||o!==void 0)&&t?.setFilterState(i??null,o??null,"columnFilter"),r!==void 0&&t?.setAdvFilterModel(r??null,"advancedFilter")}getRangeSelectionState(){const e=this.beans.rangeSvc?.getCellRanges().map(t=>{const{id:n,type:i,startRow:o,endRow:r,columns:s,startColumn:a}=t;return{id:n,type:i,startRow:o,endRow:r,colIds:s.map(l=>l.getColId()),startColId:a.getColId()}});return e?.length?{cellRanges:e}:void 0}setCellSelectionState(e){const{gos:t,rangeSvc:n,colModel:i,visibleCols:o}=this.beans;if(!nr(t)||!n)return;const r=[];for(const s of e?.cellRanges??[]){const a=[];for(const u of s.colIds){const h=i.getCol(u);h&&a.push(h)}if(!a.length)continue;let l=i.getCol(s.startColId);if(!l){const u=o.allCols,h=new Set(a);l=u.find(f=>h.has(f))}r.push({...s,columns:a,startColumn:l})}n.setCellRanges(r)}getScrollState(){if(!this.isClientSideRowModel)return;const e=this.beans.ctrlsSvc.getScrollFeature(),{left:t}=e?.getHScrollPosition()??{left:0},{top:n}=e?.getVScrollPosition()??{top:0};return n||t?{top:n,left:t}:void 0}setScrollState(e){if(!this.isClientSideRowModel)return;const{top:t,left:n}=e??{top:0,left:0},{frameworkOverrides:i,rowRenderer:o,animationFrameSvc:r,ctrlsSvc:s}=this.beans;i.wrapIncoming(()=>{s.get("center").setCenterViewportScrollLeft(n),s.getScrollFeature()?.setVerticalScrollPosition(t),o.redraw({afterScroll:!0}),r?.flushAllFrames()})}getSideBarState(){return this.beans.sideBar?.comp?.getState()}getFocusedCellState(){if(!this.isClientSideRowModel)return;const e=this.beans.focusSvc.getFocusedCell();if(e){const{column:t,rowIndex:n,rowPinned:i}=e;return{colId:t.getColId(),rowIndex:n,rowPinned:i}}}setFocusedCellState(e){if(!this.isClientSideRowModel)return;const{focusSvc:t,colModel:n}=this.beans;if(!e){t.clearFocusedCell();return}const{colId:i,rowIndex:o,rowPinned:r}=e;t.setFocusedCell({column:n.getCol(i),rowIndex:o,rowPinned:r,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0})}getPaginationState(){const{pagination:e,gos:t}=this.beans;if(!e)return;const n=e.getCurrentPage(),i=t.get("paginationAutoPageSize")?void 0:e.getPageSize();if(!(!n&&!i))return{page:n,pageSize:i}}setPaginationState(e,t){const{pagination:n,gos:i}=this.beans;if(!n)return;const{pageSize:o,page:r}=e??{page:0,pageSize:i.get("paginationPageSize")},s=t==="gridInitializing";o&&!i.get("paginationAutoPageSize")&&n.setPageSize(o,s?"initialState":"pageSizeSelector"),typeof r=="number"&&(s?n.setPage(r):n.goToPage(r))}getRowSelectionState(){const e=this.beans.selectionSvc;if(!e)return;const t=e.getSelectionState();return!t||!Array.isArray(t)&&(t.selectAll===!1||t.selectAllChildren===!1)&&!t?.toggledNodes?.length?void 0:t}setRowSelectionState(e,t){this.beans.selectionSvc?.setSelectionState(e,t,t==="api")}updateGroupExpansionState(){const{expansionSvc:e,gos:t}=this.beans,n=e?.getExpansionState(),i=t.get("ssrmExpandAllAffectsAllRows");this.updateCachedState("ssrmRowGroupExpansion",i?n:void 0),this.updateCachedState("rowGroupExpansion",i?void 0:n)}getRowPinningState(){return this.beans.pinnedRowModel?.getPinnedState()}setRowPinningState(e){const t=this.beans.pinnedRowModel;e?t?.setPinnedState(e):t?.reset()}setRowGroupExpansionState(e,t,n){const i=e??t??{expandedRowGroupIds:[],collapsedRowGroupIds:[]};this.beans.expansionSvc?.setExpansionState(i,n)}updateColumnState(e){const t=this.getColumnState();let n=!1;const i=this.cachedState;for(const o of Object.keys(t)){const r=t[o];sc(r,i[o])||(n=!0)}this.cachedState={...i,...t},n&&this.dispatchStateUpdateEvent(e)}updateCachedState(e,t){const n=this.cachedState[e];this.setCachedStateValue(e,t),sc(t,n)||this.dispatchStateUpdateEvent([e])}setCachedStateValue(e,t){this.cachedState={...this.cachedState,[e]:t}}refreshStaleState(){const e=this.staleStateKeys;for(const t of e)t==="rowSelection"&&this.setCachedStateValue(t,this.getRowSelectionState());e.clear()}dispatchStateUpdateEvent(e){if(!this.suppressEvents){for(const t of e)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(){this.suppressEvents=!0,this.beans.colAnimation?.setSuppressAnimation(!0)}stopSuppressEvents(e){setTimeout(()=>{this.suppressEvents=!1,this.queuedUpdateSources.clear(),this.isAlive()&&(this.beans.colAnimation?.setSuppressAnimation(!1),this.dispatchStateUpdateEvent([e]))})}suppressEventsAndDispatchInitEvent(e){this.startSuppressEvents(),e(),this.stopSuppressEvents("gridInitializing")}},U7={moduleName:"GridState",version:ve,beans:[z7],apiFunctions:{getState:G7,setState:H7}};function $7(e){return e.rowModel.isLastRowIndexKnown()}function j7(e){return e.pagination?.getPageSize()??100}function K7(e){return e.pagination?.getCurrentPage()??0}function q7(e){return e.pagination?.getTotalPages()??1}function Q7(e){return e.pagination?e.pagination.getMasterRowCount():e.rowModel.getRowCount()}function Y7(e){e.pagination?.goToNextPage()}function Z7(e){e.pagination?.goToPreviousPage()}function X7(e){e.pagination?.goToFirstPage()}function J7(e){e.pagination?.goToLastPage()}function e8(e,t){e.pagination?.goToPage(t)}var t8=class extends X{constructor(){super(...arguments),this.beanName="paginationAutoPageSizeSvc"}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.centerRowsCtrl=e.center;const t=this.checkPageSize.bind(this);this.addManagedEventListeners({bodyHeightChanged:t,scrollVisibilityChanged:t}),this.addManagedPropertyListener("paginationAutoPageSize",this.onPaginationAutoSizeChanged.bind(this)),this.checkPageSize()})}notActive(){return!this.gos.get("paginationAutoPageSize")||this.centerRowsCtrl==null}onPaginationAutoSizeChanged(){this.notActive()?this.beans.pagination.unsetAutoCalculatedPageSize():this.checkPageSize()}checkPageSize(){if(this.notActive())return;const e=this.centerRowsCtrl.viewportSizeFeature.getBodyHeight();if(e>0){const t=this.beans,n=()=>{const i=Math.max(Ls(t),1),o=Math.floor(e/i);t.pagination.setPageSize(o,"autoCalculated")};this.isBodyRendered?hn(this,n,50)():(n(),this.isBodyRendered=!0)}else this.isBodyRendered=!1}};function n8(e,t){if(typeof e!="number")return"";const n=t(),i=n("thousandSeparator",","),o=n("decimalSeparator",".");return e.toString().replace(".",o).replace(/(\d)(?=(\d{3})+(?!\d))/g,`$1${i}`)}var Vc="paginationPageSizeSelector",i8={tag:"span",cls:"ag-paging-page-size"},o8=class extends yt{constructor(){super(i8),this.hasEmptyOption=!1,this.handlePageSizeItemSelected=()=>{if(!this.selectPageSizeComp)return;const e=this.selectPageSizeComp.getValue();if(!e)return;const t=Number(e);isNaN(t)||t<1||t===this.pagination.getPageSize()||(this.pagination.setPageSize(t,"pageSizeSelector"),this.hasEmptyOption&&this.toggleSelectDisplay(!0),this.selectPageSizeComp.getFocusableElement().focus())}}wireBeans(e){this.pagination=e.pagination}postConstruct(){this.addManagedPropertyListener(Vc,()=>{this.onPageSizeSelectorValuesChange()}),this.addManagedEventListeners({paginationChanged:e=>this.handlePaginationChanged(e)})}handlePaginationChanged(e){if(!this.selectPageSizeComp||!e?.newPageSize)return;const t=this.pagination.getPageSize();this.getPageSizeSelectorValues().includes(t)?this.selectPageSizeComp.setValue(t.toString()):this.hasEmptyOption?this.selectPageSizeComp.setValue(""):this.toggleSelectDisplay(!0)}toggleSelectDisplay(e){this.selectPageSizeComp&&!e&&this.reset(),e&&(this.reloadPageSizesSelector(),this.selectPageSizeComp)}reset(){bn(this.getGui()),this.selectPageSizeComp&&(this.selectPageSizeComp=this.destroyBean(this.selectPageSizeComp))}onPageSizeSelectorValuesChange(){this.selectPageSizeComp&&this.shouldShowPageSizeSelector()&&this.reloadPageSizesSelector()}shouldShowPageSizeSelector(){return this.gos.get("pagination")&&!this.gos.get("suppressPaginationPanel")&&!this.gos.get("paginationAutoPageSize")&&this.gos.get(Vc)!==!1}reloadPageSizesSelector(){const e=this.getPageSizeSelectorValues(),t=this.pagination.getPageSize(),n=!t||!e.includes(t);if(n){const o=this.gos.exists("paginationPageSize"),r=this.gos.get(Vc)!==!0;se(94,{pageSizeSet:o,pageSizesSet:r,pageSizeOptions:e,paginationPageSizeOption:t}),r||se(95,{paginationPageSizeOption:t,paginationPageSizeSelector:Vc}),e.unshift("")}const i=String(n?"":t);this.selectPageSizeComp?(Lr(this.pageSizeOptions,e)||(this.selectPageSizeComp.clearOptions().addOptions(this.createPageSizeSelectOptions(e)),this.pageSizeOptions=e),this.selectPageSizeComp.setValue(i,!0)):this.createPageSizeSelectorComp(e,i),this.hasEmptyOption=n}createPageSizeSelectOptions(e){return e.map(t=>({value:String(t)}))}createPageSizeSelectorComp(e,t){const n=this.getLocaleTextFunc(),i=n("pageSizeSelectorLabel","Page Size:"),o=n("ariaPageSizeSelectorLabel","Page Size");this.selectPageSizeComp=this.createManagedBean(new cv).addOptions(this.createPageSizeSelectOptions(e)).setValue(t).setAriaLabel(o).setLabel(i).onValueChange(()=>this.handlePageSizeItemSelected()),this.appendChild(this.selectPageSizeComp)}getPageSizeSelectorValues(){const e=[20,50,100],t=this.gos.get(Vc);return!Array.isArray(t)||!t?.length?e:[...t].sort((n,i)=>n-i)}destroy(){this.toggleSelectDisplay(!1),super.destroy()}},r8={selector:"AG-PAGE-SIZE-SELECTOR",component:o8},s8=".ag-paging-panel{align-items:center;border-top:var(--ag-footer-row-border);display:flex;flex-wrap:wrap-reverse;gap:calc(var(--ag-spacing)*4);justify-content:flex-end;min-height:var(--ag-pagination-panel-height);padding:calc(var(--ag-spacing)*.5) var(--ag-cell-horizontal-padding);row-gap:calc(var(--ag-spacing)*.5);@container (width < 600px){justify-content:center}}:where(.ag-paging-page-size) .ag-wrapper{min-width:50px}.ag-paging-page-summary-panel,.ag-paging-row-summary-panel{margin:calc(var(--ag-spacing)*.5)}.ag-paging-page-summary-panel{align-items:center;display:flex;gap:var(--ag-cell-widget-spacing);.ag-disabled &{pointer-events:none}}.ag-paging-button{cursor:pointer;position:relative;&.ag-disabled{cursor:default;opacity:.5}}.ag-paging-number,.ag-paging-row-summary-panel-number{font-weight:500}.ag-paging-description{line-height:0}",a8=class extends PR{constructor(){super(),this.btFirst=he,this.btPrevious=he,this.btNext=he,this.btLast=he,this.lbRecordCount=he,this.lbFirstRowOnPage=he,this.lbLastRowOnPage=he,this.lbCurrent=he,this.lbTotal=he,this.pageSizeComp=he,this.previousAndFirstButtonsDisabled=!1,this.nextButtonDisabled=!1,this.lastButtonDisabled=!1,this.areListenersSetup=!1,this.allowFocusInnerElement=!1,this.registerCSS(s8)}wireBeans(e){this.rowModel=e.rowModel,this.pagination=e.pagination,this.ariaAnnounce=e.ariaAnnounce}postConstruct(){const e=this.gos.get("enableRtl");this.setTemplate(this.getTemplate(),[r8]);const{btFirst:t,btPrevious:n,btNext:i,btLast:o}=this;this.activateTabIndex([t,n,i,o]),t.insertAdjacentElement("afterbegin",ii(e?"last":"first",this.beans)),n.insertAdjacentElement("afterbegin",ii(e?"next":"previous",this.beans)),i.insertAdjacentElement("afterbegin",ii(e?"previous":"next",this.beans)),o.insertAdjacentElement("afterbegin",ii(e?"first":"last",this.beans)),this.addManagedPropertyListener("pagination",this.onPaginationChanged.bind(this)),this.addManagedPropertyListener("suppressPaginationPanel",this.onPaginationChanged.bind(this)),this.addManagedPropertyListeners(["paginationPageSizeSelector","paginationAutoPageSize","suppressPaginationPanel"],()=>this.onPageSizeRelatedOptionsChange()),this.pageSizeComp.toggleSelectDisplay(this.pageSizeComp.shouldShowPageSizeSelector()),this.initialiseTabGuard({onTabKeyDown:()=>{},focusInnerElement:r=>this.allowFocusInnerElement?this.tabGuardFeature.getTabGuardCtrl().focusInnerElement(r):v2(this.beans,r),forceFocusOutWhenTabGuardsAreEmpty:!0}),this.onPaginationChanged()}setAllowFocus(e){this.allowFocusInnerElement=e}getFocusableContainerName(){return"pagination"}onPaginationChanged(){const t=this.gos.get("pagination")&&!this.gos.get("suppressPaginationPanel");this.setDisplayed(t),t&&(this.setupListeners(),this.enableOrDisableButtons(),this.updateLabels(),this.onPageSizeRelatedOptionsChange())}onPageSizeRelatedOptionsChange(){this.pageSizeComp.toggleSelectDisplay(this.pageSizeComp.shouldShowPageSizeSelector())}setupListeners(){if(!this.areListenersSetup){this.addManagedEventListeners({paginationChanged:this.onPaginationChanged.bind(this)});for(const e of[{el:this.btFirst,fn:this.onBtFirst.bind(this)},{el:this.btPrevious,fn:this.onBtPrevious.bind(this)},{el:this.btNext,fn:this.onBtNext.bind(this)},{el:this.btLast,fn:this.onBtLast.bind(this)}]){const{el:t,fn:n}=e;this.addManagedListeners(t,{click:n,keydown:i=>{(i.key===q.ENTER||i.key===q.SPACE)&&(i.preventDefault(),n())}})}m2(this.beans,this,this.getGui()),this.areListenersSetup=!0}}onBtFirst(){this.previousAndFirstButtonsDisabled||this.pagination.goToFirstPage()}formatNumber(e){const t=this.gos.getCallback("paginationNumberFormatter");return t?t({value:e}):n8(e,this.getLocaleTextFunc.bind(this))}getTemplate(){const e=this.getLocaleTextFunc(),t=`ag-${this.getCompId()}`;return{tag:"div",cls:"ag-paging-panel ag-unselectable",attrs:{id:`${t}`},children:[{tag:"ag-page-size-selector",ref:"pageSizeComp"},{tag:"span",cls:"ag-paging-row-summary-panel",children:[{tag:"span",ref:"lbFirstRowOnPage",cls:"ag-paging-row-summary-panel-number",attrs:{id:`${t}-first-row`}},{tag:"span",attrs:{id:`${t}-to`},children:e("to","to")},{tag:"span",ref:"lbLastRowOnPage",cls:"ag-paging-row-summary-panel-number",attrs:{id:`${t}-last-row`}},{tag:"span",attrs:{id:`${t}-of`},children:e("of","of")},{tag:"span",ref:"lbRecordCount",cls:"ag-paging-row-summary-panel-number",attrs:{id:`${t}-row-count`}}]},{tag:"span",cls:"ag-paging-page-summary-panel",role:"presentation",children:[{tag:"div",ref:"btFirst",cls:"ag-button ag-paging-button",role:"button",attrs:{"aria-label":e("firstPage","First Page")}},{tag:"div",ref:"btPrevious",cls:"ag-button ag-paging-button",role:"button",attrs:{"aria-label":e("previousPage","Previous Page")}},{tag:"span",cls:"ag-paging-description",children:[{tag:"span",attrs:{id:`${t}-start-page`},children:e("page","Page")},{tag:"span",ref:"lbCurrent",cls:"ag-paging-number",attrs:{id:`${t}-start-page-number`}},{tag:"span",attrs:{id:`${t}-of-page`},children:e("of","of")},{tag:"span",ref:"lbTotal",cls:"ag-paging-number",attrs:{id:`${t}-of-page-number`}}]},{tag:"div",ref:"btNext",cls:"ag-button ag-paging-button",role:"button",attrs:{"aria-label":e("nextPage","Next Page")}},{tag:"div",ref:"btLast",cls:"ag-button ag-paging-button",role:"button",attrs:{"aria-label":e("lastPage","Last Page")}}]}]}}onBtNext(){this.nextButtonDisabled||this.pagination.goToNextPage()}onBtPrevious(){this.previousAndFirstButtonsDisabled||this.pagination.goToPreviousPage()}onBtLast(){this.lastButtonDisabled||this.pagination.goToLastPage()}enableOrDisableButtons(){const e=this.pagination.getCurrentPage(),t=this.rowModel.isLastRowIndexKnown(),n=this.pagination.getTotalPages();this.previousAndFirstButtonsDisabled=e===0,this.toggleButtonDisabled(this.btFirst,this.previousAndFirstButtonsDisabled),this.toggleButtonDisabled(this.btPrevious,this.previousAndFirstButtonsDisabled);const i=this.isZeroPagesToDisplay(),o=e===n-1;this.nextButtonDisabled=o||i,this.lastButtonDisabled=!t||i||e===n-1,this.toggleButtonDisabled(this.btNext,this.nextButtonDisabled),this.toggleButtonDisabled(this.btLast,this.lastButtonDisabled)}toggleButtonDisabled(e,t){uL(e,t),e.classList.toggle("ag-disabled",t)}isZeroPagesToDisplay(){const e=this.rowModel.isLastRowIndexKnown(),t=this.pagination.getTotalPages();return e&&t===0}updateLabels(){const e=this.rowModel.isLastRowIndexKnown(),t=this.pagination.getTotalPages(),n=this.pagination.getMasterRowCount(),i=e?n:null,o=this.pagination.getCurrentPage(),r=this.pagination.getPageSize();let s,a;this.isZeroPagesToDisplay()?s=a=0:(s=r*o+1,a=s+r-1,e&&a>i&&(a=i));const l=s+r-1,u=!e&&n<l,h=this.formatNumber(s);this.lbFirstRowOnPage.textContent=h;let f;const p=this.getLocaleTextFunc();u?f=p("pageLastRowUnknown","?"):f=this.formatNumber(a),this.lbLastRowOnPage.textContent=f;const v=t>0?o+1:0,w=this.formatNumber(v);this.lbCurrent.textContent=w;let b,y;if(e)b=this.formatNumber(t),y=this.formatNumber(i);else{const R=p("more","more");b=R,y=R}this.lbTotal.textContent=b,this.lbRecordCount.textContent=y,this.announceAriaStatus(h,f,y,w,b)}announceAriaStatus(e,t,n,i,o){const r=this.getLocaleTextFunc(),s=r("page","Page"),a=r("to","to"),l=r("of","of"),u=`${e} ${a} ${t} ${l} ${n}`,h=`${s} ${i} ${l} ${o}`;u!==this.ariaRowStatus&&(this.ariaRowStatus=u,this.ariaAnnounce?.announceValue(u,"paginationRow")),h!==this.ariaPageStatus&&(this.ariaPageStatus=h,this.ariaAnnounce?.announceValue(h,"paginationPage"))}},l8={selector:"AG-PAGINATION",component:a8},c8=100,u8=class extends X{constructor(){super(...arguments),this.beanName="pagination",this.currentPage=0,this.topDisplayedRowIndex=0,this.bottomDisplayedRowIndex=0,this.masterRowCount=0}postConstruct(){const e=this.gos;this.active=e.get("pagination"),this.pageSizeFromGridOptions=e.get("paginationPageSize"),this.paginateChildRows=this.isPaginateChildRows(),this.addManagedPropertyListener("pagination",this.onPaginationGridOptionChanged.bind(this)),this.addManagedPropertyListener("paginationPageSize",this.onPageSizeGridOptionChanged.bind(this))}getPaginationSelector(){return l8}isPaginateChildRows(){const e=this.gos;return e.get("groupHideParentOfSingleChild")||e.get("groupRemoveSingleChildren")||e.get("groupRemoveLowestSingleChildren")?!0:e.get("paginateChildRows")}onPaginationGridOptionChanged(){this.active=this.gos.get("pagination"),this.calculatePages(),this.dispatchPaginationChangedEvent({keepRenderedRows:!0})}onPageSizeGridOptionChanged(){this.setPageSize(this.gos.get("paginationPageSize"),"gridOptions")}goToPage(e){const t=this.currentPage;if(!this.active||t===e||typeof t!="number")return;const{editSvc:n}=this.beans;n?.isEditing()&&(n.isBatchEditing()?n.cleanupEditors():n.stopEditing(void 0,{source:"api"})),this.currentPage=e,this.calculatePages(),this.dispatchPaginationChangedEvent({newPage:!0})}goToPageWithIndex(e){if(!this.active)return;let t=e;this.paginateChildRows||(t=this.beans.rowModel.getTopLevelIndexFromDisplayedIndex?.(e)??e),this.goToPage(Math.floor(t/this.pageSize))}isRowInPage(e){return this.active?e>=this.topDisplayedRowIndex&&e<=this.bottomDisplayedRowIndex:!0}getCurrentPage(){return this.currentPage}goToNextPage(){this.goToPage(this.currentPage+1)}goToPreviousPage(){this.goToPage(this.currentPage-1)}goToFirstPage(){this.goToPage(0)}goToLastPage(){const e=this.beans.rowModel.getRowCount(),t=Math.floor(e/this.pageSize);this.goToPage(t)}getPageSize(){return this.pageSize}getTotalPages(){return this.totalPages}setPage(e){this.currentPage=e}get pageSize(){return we(this.pageSizeAutoCalculated)&&this.gos.get("paginationAutoPageSize")?this.pageSizeAutoCalculated:we(this.pageSizeFromPageSizeSelector)?this.pageSizeFromPageSizeSelector:we(this.pageSizeFromInitialState)?this.pageSizeFromInitialState:we(this.pageSizeFromGridOptions)?this.pageSizeFromGridOptions:c8}calculatePages(){this.active?this.paginateChildRows?this.calculatePagesAllRows():this.calculatePagesMasterRowsOnly():this.calculatedPagesNotActive(),this.beans.pageBounds.calculateBounds(this.topDisplayedRowIndex,this.bottomDisplayedRowIndex)}unsetAutoCalculatedPageSize(){if(this.pageSizeAutoCalculated===void 0)return;const e=this.pageSizeAutoCalculated;this.pageSizeAutoCalculated=void 0,this.pageSize!==e&&(this.calculatePages(),this.dispatchPaginationChangedEvent({newPageSize:!0}))}setPageSize(e,t){const n=this.pageSize;switch(t){case"autoCalculated":this.pageSizeAutoCalculated=e;break;case"pageSizeSelector":this.pageSizeFromPageSizeSelector=e,this.currentPage!==0&&this.goToFirstPage();break;case"initialState":this.pageSizeFromInitialState=e;break;case"gridOptions":this.pageSizeFromGridOptions=e,this.pageSizeFromInitialState=void 0,this.pageSizeFromPageSizeSelector=void 0,this.currentPage!==0&&this.goToFirstPage();break}n!==this.pageSize&&(this.calculatePages(),this.dispatchPaginationChangedEvent({newPageSize:!0,keepRenderedRows:!0}))}setZeroRows(){this.masterRowCount=0,this.topDisplayedRowIndex=0,this.bottomDisplayedRowIndex=-1,this.currentPage=0,this.totalPages=0}adjustCurrentPageIfInvalid(){const e=this.totalPages;this.currentPage>=e&&(this.currentPage=e-1);const t=this.currentPage;(!isFinite(t)||isNaN(t)||t<0)&&(this.currentPage=0)}calculatePagesMasterRowsOnly(){const e=this.beans.rowModel,t=e.getTopLevelRowCount();if(this.masterRowCount=t,t<=0){this.setZeroRows();return}const n=this.pageSize,i=t-1;this.totalPages=Math.floor(i/n)+1,this.adjustCurrentPageIfInvalid();const o=this.currentPage,r=n*o;let s=n*(o+1)-1;if(s>i&&(s=i),this.topDisplayedRowIndex=e.getTopLevelRowDisplayedIndex(r),s===i)this.bottomDisplayedRowIndex=e.getRowCount()-1;else{const a=e.getTopLevelRowDisplayedIndex(s+1);this.bottomDisplayedRowIndex=a-1}}getMasterRowCount(){return this.masterRowCount}calculatePagesAllRows(){const e=this.beans.rowModel.getRowCount();if(this.masterRowCount=e,e===0){this.setZeroRows();return}const{pageSize:t,currentPage:n}=this,i=e-1;this.totalPages=Math.floor(i/t)+1,this.adjustCurrentPageIfInvalid(),this.topDisplayedRowIndex=t*n,this.bottomDisplayedRowIndex=t*(n+1)-1,this.bottomDisplayedRowIndex>i&&(this.bottomDisplayedRowIndex=i)}calculatedPagesNotActive(){this.setPageSize(void 0,"autoCalculated"),this.totalPages=1,this.currentPage=0,this.topDisplayedRowIndex=0,this.bottomDisplayedRowIndex=this.beans.rowModel.getRowCount()-1}dispatchPaginationChangedEvent(e){const{keepRenderedRows:t=!1,newPage:n=!1,newPageSize:i=!1}=e;this.eventSvc.dispatchEvent({type:"paginationChanged",animate:!1,newData:!1,newPage:n,newPageSize:i,keepRenderedRows:t})}},d8={moduleName:"Pagination",version:ve,beans:[u8,t8],icons:{first:"first",previous:"previous",next:"next",last:"last"},apiFunctions:{paginationIsLastPageFound:$7,paginationGetPageSize:j7,paginationGetCurrentPage:K7,paginationGetTotalPages:q7,paginationGetRowCount:Q7,paginationGoToNextPage:Y7,paginationGoToPreviousPage:Z7,paginationGoToFirstPage:X7,paginationGoToLastPage:J7,paginationGoToPage:e8},dependsOn:[Ph]},h8=".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 f8(e){return e.pinnedRowModel?.getPinnedTopRowCount()??0}function p8(e){return e.pinnedRowModel?.getPinnedBottomRowCount()??0}function g8(e,t){return e.pinnedRowModel?.getPinnedTopRow(t)}function m8(e,t){return e.pinnedRowModel?.getPinnedBottomRow(t)}function v8(e,t,n){return e.pinnedRowModel?.forEachPinnedRow(t,n)}var C8={moduleName:"PinnedRow",version:ve,beans:[t2],css:[h8],apiFunctions:{getPinnedTopRowCount:f8,getPinnedBottomRowCount:p8,getPinnedTopRow:g8,getPinnedBottomRow:m8,forEachPinnedRow:v8},icons:{rowPin:"pin",rowPinTop:"pinned-top",rowPinBottom:"pinned-bottom",rowUnpin:"un-pin"}},w8="↑",b8="↓",y8={tag:"span",children:[{tag:"span",ref:"eDelta",cls:"ag-value-change-delta"},{tag:"span",ref:"eValue",cls:"ag-value-change-value"}]},S8=class extends yt{constructor(){super(y8),this.eValue=he,this.eDelta=he,this.refreshCount=0}init(e){this.refresh(e,!0)}showDelta(e,t){const n=Math.abs(t),i=e.formatValue(n),o=we(i)?i:n,r=t>=0,s=this.eDelta;r?s.textContent=w8+o:s.textContent=b8+o,s.classList.toggle("ag-value-change-delta-up",r),s.classList.toggle("ag-value-change-delta-down",!r)}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"),bn(this.eDelta)}refresh(e,t=!1){const{value:n,valueFormatted:i}=e,{eValue:o,lastValue:r,beans:s}=this;if(n===r||(we(i)?o.textContent=i:we(n)?o.textContent=n:bn(o),s.filterManager?.isSuppressFlashingCellsBecauseFiltering()))return!1;const a=n&&typeof n=="object"&&"toNumber"in n?n.toNumber():n,l=r&&typeof r=="object"&&"toNumber"in r?r.toNumber():r;if(a===l)return!1;if(typeof a=="number"&&typeof l=="number"){const u=a-l;this.showDelta(e,u)}return r&&o.classList.add("ag-value-change-value-highlight"),t||this.setTimerToRemoveDelta(),this.lastValue=n,!0}},R8=".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}",F8={tag:"span",children:[{tag:"span",ref:"eCurrent",cls:"ag-value-slide-current"}]},x8=class extends yt{constructor(){super(F8),this.eCurrent=he,this.refreshCount=0,this.registerCSS(R8)}init(e){this.refresh(e,!0)}addSlideAnimation(){this.refreshCount++;const e=this.refreshCount;this.ePrevious?.remove();const{beans:t,eCurrent:n}=this,i=on({tag:"span",cls:"ag-value-slide-previous ag-value-slide-out"});this.ePrevious=i,i.textContent=n.textContent,this.getGui().insertBefore(i,n),t.frameworkOverrides.wrapIncoming(()=>{window.setTimeout(()=>{e===this.refreshCount&&this.ePrevious.classList.add("ag-value-slide-out-end")},50),window.setTimeout(()=>{e===this.refreshCount&&(this.ePrevious?.remove(),this.ePrevious=null)},3e3)})}refresh(e,t=!1){let n=e.value;if(Nt(n)&&(n=""),n===this.lastValue||this.beans.filterManager?.isSuppressFlashingCellsBecauseFiltering())return!1;t||this.addSlideAnimation(),this.lastValue=n;const i=this.eCurrent;return we(e.valueFormatted)?i.textContent=e.valueFormatted:we(e.value)?i.textContent=n:bn(i),!0}},P8=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,n=this.beans.gos.get("cellFlashDuration"),i=this.beans.gos.get("cellFadeDuration")){const o=this.animations[t];o.delete(e);const r=Date.now(),s=r+n,a=r+n+i,l={phase:"flash",flashEndTime:s,fadeEndTime:a};o.set(e,l);const u=`ag-cell-${t}`,h=`${u}-animation`,{comp:f,eGui:{style:p}}=e;f.toggleCss(u,!0),f.toggleCss(h,!1),p.removeProperty("transition"),p.removeProperty("transition-delay"),this.nextAnimationTime&&s+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),n)}),this.nextAnimationTime=s)}advanceAnimations(){const e=Date.now();let t=null;for(const n of Object.keys(this.animations)){const i=this.animations[n],o=`ag-cell-${n}`,r=`${o}-animation`;for(const[s,a]of i){if(!s.isAlive()||!s.comp){i.delete(s);continue}const{phase:l,flashEndTime:u,fadeEndTime:h}=a,f=l==="flash"?u:h;if(!(e+15>=f)){t=Math.min(f,t??1/0);continue}const{comp:m,eGui:{style:v}}=s;switch(l){case"flash":m.toggleCss(o,!1),m.toggleCss(r,!0),v.transition=`background-color ${h-u}ms`,v.transitionDelay=`${u-e}ms`,t=Math.min(h,t??1/0),a.phase="fade";break;case"fade":m.toggleCss(o,!1),m.toggleCss(r,!1),v.removeProperty("transition"),v.removeProperty("transition-delay"),i.delete(s);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 n=d2(e.cellPosition);t.cells[n]&&this.animateCell(e,"highlight")}flashCell(e,t){this.animateCell(e,"data-changed",t?.flashDuration,t?.fadeDuration)}destroy(){for(const e of Object.keys(this.animations))this.animations[e].clear()}};function E8(e,t={}){const{cellFlashSvc:n}=e;n&&e.frameworkOverrides.wrapIncoming(()=>{for(const i of e.rowRenderer.getCellCtrls(t.rowNodes,t.columns))n.flashCell(i,t)})}var D8={moduleName:"HighlightChanges",version:ve,beans:[P8],userComponents:{agAnimateShowChangeCellRenderer:S8,agAnimateSlideCellRenderer:x8},apiFunctions:{flashCells:E8}};function T8(e,t,n){if(!t)return;const i=e.ctrlsSvc.getGridBodyCtrl().eGridBody,o=`aria-${t}`;n===null?i.removeAttribute(o):i.setAttribute(o,n)}function A8(e,t={}){e.frameworkOverrides.wrapIncoming(()=>e.rowRenderer.refreshCells(t))}function I8(e){e.frameworkOverrides.wrapIncoming(()=>{for(const t of e.ctrlsSvc.getHeaderRowContainerCtrls())t.refresh()})}function M8(e){return e.animationFrameSvc?.isQueueEmpty()??!0}function k8(e){e.animationFrameSvc?.flushAllFrames()}function L8(e){return{rowHeight:Ls(e),headerHeight:Dc(e)}}function O8(e,t={}){const n=[];for(const r of e.rowRenderer.getCellCtrls(t.rowNodes,t.columns)){const s=r.getCellRenderer();s!=null&&n.push(Ks(s))}if(t.columns?.length)return n;const i=[],o=Xm(t.rowNodes);for(const r of e.rowRenderer.getAllRowCtrls()){if(o&&!Jm(r.rowNode,o)||!r.isFullWidth())continue;const s=r.getFullWidthCellRenderers();for(let a=0;a<s.length;a++){const l=s[a];l!=null&&i.push(Ks(l))}}return[...i,...n]}var _8={moduleName:"RenderApi",version:ve,apiFunctions:{setGridAriaProperty:T8,refreshCells:A8,refreshHeader:I8,isAnimationFrameQueueEmpty:M8,flushAllAnimationFrames:k8,getSizesForCurrentTheme:L8,getCellRendererInstances:O8}},N8=class extends X{constructor(){super(...arguments),this.beanName="rowAutoHeight",this.wasEverActive=!1,this._debouncedCalculateRowHeights=hn(this,this.calculateRowHeights.bind(this),1)}requestCheckAutoHeight(){this.wasEverActive&&this._debouncedCalculateRowHeights()}calculateRowHeights(){const{visibleCols:e,rowModel:t,rowSpanSvc:n,pinnedRowModel:i}=this.beans,o=e.autoHeightCols;let r=!1;const s=a=>{const l=a.__autoHeights;let u=Gr(this.beans,a).height;for(const h of o){let f=l?.[h.getColId()];const p=n?.getCellSpan(h,a);if(p){if(p.getLastNode()!==a)continue;if(f=n?.getCellSpan(h,a)?.getLastNodeAutoHeight(),!f)return}if(f==null){if(this.colSpanSkipCell(h,a))continue;return}u=Math.max(f,u)}u!==a.rowHeight&&(a.setRowHeight(u),r=!0)};i?.forEachPinnedRow?.("top",s),i?.forEachPinnedRow?.("bottom",s),t.forEachDisplayedNode?.(s),r&&t.onRowHeightChanged?.()}setRowAutoHeight(e,t,n){if(e.__autoHeights??(e.__autoHeights={}),t==null){delete e.__autoHeights[n.getId()];return}const i=e.__autoHeights[n.getId()];e.__autoHeights[n.getId()]=t,i!==t&&this.requestCheckAutoHeight()}colSpanSkipCell(e,t){const{colModel:n,colViewport:i,visibleCols:o}=this.beans;if(!n.colSpanActive)return!1;let r=[];switch(e.getPinned()){case"left":r=o.getLeftColsForRow(t);break;case"right":r=o.getRightColsForRow(t);break;case null:r=i.getColsWithinViewport(t);break}return!r.includes(e)}setupCellAutoHeight(e,t,n){if(!e.column.isAutoHeight()||!t)return!1;this.wasEverActive=!0;const i=t.parentElement,{rowNode:o,column:r}=e,s=this.beans,a=h=>{if(this.beans.editSvc?.isEditing(e)||!e.isAlive()||!n.isAlive())return;const{paddingTop:f,paddingBottom:p,borderBottomWidth:m,borderTopWidth:v}=Is(i),w=f+p+m+v,y=t.offsetHeight+w;if(h<5){const S=!nn(s)?.contains(t),P=y==0;if(S||P){window.setTimeout(()=>a(h+1),0);return}}this.setRowAutoHeight(o,y,r)},l=()=>a(0);l();const u=_r(s,t,l);return n.addDestroyFunc(()=>{u(),this.setRowAutoHeight(o,void 0,r)}),!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:n}of e)if((!t||this.beans.colModel.colSpanActive)&&(t=this.beans.colViewport.getColsWithinViewport(n).filter(o=>o.isAutoHeight())),t.length!==0){if(!n.__autoHeights)return!1;for(const i of t){const o=n.__autoHeights[i.getColId()];if(!o||n.rowHeight<o)return!1}}return!0}},B8={moduleName:"RowAutoHeight",version:ve,beans:[N8]},G8=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(){const e=this.firstNode.__autoHeights?.[this.col.getColId()];if(e==null)return;let t=0;for(const n of this.spannedNodes)n!==this.lastNode&&(t+=n.rowHeight);return e-t}},H8=class extends X{constructor(e){super(),this.column=e}buildCache(e){const{column:t,beans:{gos:n,pinnedRowModel:i,rowModel:o,valueSvc:r,pagination:s}}=this,{colDef:a}=t,l=this.getNodeMap(e),u=new Map,h=n.getCallback("isFullWidthRow"),f=a.equals,p=a.spanRows,m=typeof p=="function";let v=null,w=null,b;const y=(S,P)=>{v=S,w=null,b=P},R=S=>{const P=!S.isExpandable()&&!S.group&&!S.detail&&(h?!h({rowNode:S}):!0);if(S.rowIndex==null||!P){y(null,null);return}if(v==null||S.level!==v.level||S.footer||w&&S.rowIndex-1!==w?.getLastNode().rowIndex){y(S,r.getValue(t,S,"data"));return}const F=r.getValue(t,S,"data");if(m){const I=We(n,{valueA:b,nodeA:v,valueB:F,nodeB:S,column:t,colDef:a});if(!p(I)){y(S,F);return}}else if(f?!f(b,F):b!==F){y(S,F);return}if(!w){const I=l?.get(v);I?.firstNode===v?(I.reset(),w=I):w=new G8(t,v),u.set(v,w)}w.addSpannedNode(S),u.set(S,w)};switch(e){case"center":o.forEachDisplayedNode?.(S=>{(!s||s.isRowInPage(S.rowIndex))&&R(S)}),this.centerValueNodeMap=u;break;case"top":i?.forEachPinnedRow("top",R),this.topValueNodeMap=u;break;case"bottom":i?.forEachPinnedRow("bottom",R),this.bottomValueNodeMap=u;break}}isCellSpanning(e){return!!this.getCellSpan(e)}getCellSpan(e){return this.getNodeMap(e.rowPinned).get(e)}getNodeMap(e){switch(e){case"top":return this.topValueNodeMap;case"bottom":return this.bottomValueNodeMap;default:return this.centerValueNodeMap}}},V8=class extends X{constructor(){super(...arguments),this.beanName="rowSpanSvc",this.spanningColumns=new Map,this.debouncePinnedEvent=hn(this,this.dispatchCellsUpdatedEvent.bind(this,!0),0),this.debounceModelEvent=hn(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 n=this.createManagedBean(new H8(e));this.spanningColumns.set(e,n),n.buildCache("top"),n.buildCache("bottom"),n.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?.createCtrls("top"),t?.createCtrls("bottom")},0);return}this.modelTimeout==null&&(this.modelTimeout=window.setTimeout(()=>{this.modelTimeout=null,this.buildModelCaches(),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 n=this.spanningColumns.get(e);return n?n.isCellSpanning(t):!1}getCellSpanByPosition(e){const{pinnedRowModel:t,rowModel:n}=this.beans,i=e.column,o=e.rowIndex,r=this.spanningColumns.get(i);if(!r)return;let s;switch(e.rowPinned){case"top":s=t?.getPinnedTopRow(o);break;case"bottom":s=t?.getPinnedBottomRow(o);break;default:s=n.getRow(o)}if(s)return r.getCellSpan(s)}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 n=this.spanningColumns.get(e);if(n)return n.getCellSpan(t)}forEachSpannedColumn(e,t){for(const[n,i]of this.spanningColumns)if(i.isCellSpanning(e)){const o=i.getCellSpan(e);t(n,o)}}destroy(){super.destroy(),this.spanningColumns.clear()}},W8=class extends sl{constructor(e,t,n){super(e.col,e.firstNode,n,t),this.cellSpan=e,this.SPANNED_CELL_CSS_CLASS="ag-spanned-cell"}setComp(e,t,n,i,o,r,s){this.eWrapper=n,super.setComp(e,t,n,i,o,r,s),this.setAriaRowSpan()}isCellSpanning(){return!0}getCellSpan(){return this.cellSpan}refreshAriaRowIndex(){const{eGui:e,rowNode:t}=this;!e||t.rowIndex==null||cc(e,t.rowIndex)}setAriaRowSpan(){gL(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(Ec(t)){this.focusedCellPosition=void 0;return}const n=this.isCellFocused();n||(this.focusedCellPosition=void 0),e&&n&&(this.focusedCellPosition={rowIndex:e.rowIndex,rowPinned:e.rowPinned,column:e.column}),super.onCellFocused(e)}getRootElement(){return this.eWrapper}},z8=class extends bh{getInitialRowClasses(e){return["ag-spanned-row"]}getNewCellCtrl(e){const t=this.beans.rowSpanSvc?.getCellSpan(e,this.rowNode);if(!(!t||t.firstNode!==this.rowNode))return new W8(t,this,this.beans)}isCorrectCtrlForSpan(e){const t=this.beans.rowSpanSvc?.getCellSpan(e.column,this.rowNode);return!t||t.firstNode!==this.rowNode?!1:e.getCellSpan()===t}onRowHeightChanged(){}refreshFirstAndLastRowStyles(){}addHoverFunctionality(){}resetHoveredStatus(){}},U8=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,n=this.getCtrlsMap(e),i=n.size,o=this.getAllRelevantRowControls(e),r=new Map;let s=!1;for(const l of o)l.isAlive()&&t?.forEachSpannedColumn(l.rowNode,(u,h)=>{if(r.has(h.firstNode))return;const f=n.get(h.firstNode);if(f){r.set(h.firstNode,f),n.delete(h.firstNode);return}s=!0;const p=new z8(h.firstNode,this.beans,!1,!1,!1);r.set(h.firstNode,p)});this.setCtrlsMap(e,r);const a=r.size===i;if(!(!s&&a)){for(const l of n.values())l.destroyFirstPass(!0),l.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,n=t?.getCellSpanByPosition(e);if(!n)return;const i=this.getCtrlsMap(e.rowPinned).get(n.firstNode);if(i)return i.getAllCellCtrls().find(o=>o.column===e.column)}getCtrls(e){return[...this.getCtrlsMap(e).values()]}destroyRowCtrls(e){for(const t of this.getCtrlsMap(e).values())t.destroyFirstPass(!0),t.destroySecondPass();this.setCtrlsMap(e,new Map)}getCtrlsMap(e){switch(e){case"top":return this.topCtrls;case"bottom":return this.bottomCtrls;default:return this.centerCtrls}}setCtrlsMap(e,t){switch(e){case"top":this.topCtrls=t;break;case"bottom":this.bottomCtrls=t;break;default:this.centerCtrls=t;break}}destroy(){super.destroy(),this.destroyRowCtrls("top"),this.destroyRowCtrls("bottom"),this.destroyRowCtrls("center")}},$8={moduleName:"CellSpan",version:ve,beans:[V8,U8]},j8=class extends X{constructor(){super(...arguments),this.beanName="selectionColSvc"}postConstruct(){this.addManagedPropertyListener("rowSelection",e=>{this.onSelectionOptionsChanged(e.currentValue,e.previousValue,qa(e.source))}),this.addManagedPropertyListener("selectionColumnDef",this.updateColumns.bind(this))}addColumns(e){const t=this.columns;t!=null&&(e.list=t.list.concat(e.list),e.tree=t.tree.concat(e.tree),$O(e))}createColumns(e,t){const n=()=>{$d(this.beans,this.columns?.tree),this.columns=null},i=e.treeDepth,r=(this.columns?.treeDepth??-1)==i,s=this.generateSelectionCols();if(UO(s,this.columns?.list??[])&&r)return;n();const{colGroupSvc:l}=this.beans,u=l?.findDepth(e.tree)??0,h=l?.balanceTreeForAutoCols(s,u)??[];this.columns={list:s,tree:h,treeDepth:u,map:{}},t(p=>{if(!p)return null;const m=p.filter(v=>!Wr(v));return[...s,...m]})}updateColumns(e){const t=qa(e.source),{beans:n}=this;for(const i of this.columns?.list??[]){const o=this.createSelectionColDef(e.currentValue);i.setColDef(o,null,t),oo(n,{state:[KO(o,i.colId)]},t)}}getColumn(e){return this.columns?.list.find(t=>Sc(t,e))??null}getColumns(){return this.columns?.list??null}isSelectionColumnEnabled(){const{gos:e,beans:t}=this,n=e.get("rowSelection");if(typeof n!="object"||!ks(e))return!1;const i=(t.autoColSvc?.getColumns()?.length??0)>0;if(n.checkboxLocation==="autoGroupColumn"&&i)return!1;const o=!!$a(n),r=Nd(n);return o||r}createSelectionColDef(e){const{gos:t}=this,n=e??t.get("selectionColumnDef"),i=t.get("enableRtl"),{rowSpan:o,spanRows:r,...s}=n??{};return{width:50,resizable:!1,suppressHeaderMenuButton:!0,sortable:!1,suppressMovable:!0,lockPosition:i?"right":"left",comparator(a,l,u,h){const f=u.isSelected(),p=h.isSelected();return f===p?0:f?1:-1},editable:!1,suppressFillHandle:!0,suppressAutoSize:!0,pinned:null,...s,colId:b0,chartDataType:"excluded"}}generateSelectionCols(){if(!this.isSelectionColumnEnabled())return[];const e=this.createSelectionColDef(),t=e.colId;this.gos.validateColDef(e,t,!0);const n=new _s(e,null,t,!1);return this.createBean(n),[n]}onSelectionOptionsChanged(e,t,n){const i=t&&typeof t!="string"?$a(t):void 0,o=e&&typeof e!="string"?$a(e):void 0,r=i!==o,s=t&&typeof t!="string"?Nd(t):void 0,a=e&&typeof e!="string"?Nd(e):void 0,l=s!==a,u=Bd(e),h=Bd(t);(r||l||u!==h)&&this.beans.colModel.refreshAll(n)}destroy(){$d(this.beans,this.columns?.tree),super.destroy()}refreshVisibility(e,t,n){if(!this.columns?.list.length)return;const i=e.length+t.length+n.length;if(i===0)return;const o=this.columns.list[0];if(!o.isVisible())return;const r=()=>{let l;switch(o.pinned){case"left":case!0:l=e;break;case"right":l=n;break;default:l=t}l&&Ro(l,o)};(this.beans.rowNumbersSvc?.getColumn(y0)?2:1)===i&&r()}},K8=':where(.ag-selection-checkbox) .ag-checkbox-input-wrapper:before{content:"";cursor:pointer;inset:-8px;position:absolute}';function q8(e,t){if(!t.nodes.every(s=>s.rowPinned&&!wh(s)?(se(59),!1):s.id===void 0?(se(60),!1):!0))return;const{nodes:i,source:o,newValue:r}=t;e.selectionSvc?.setNodesSelected({nodes:i,source:o??"api",newValue:r})}function Q8(e,t,n="apiSelectAll"){e.selectionSvc?.selectAllRowNodes({source:n,selectAll:t})}function Y8(e,t,n="apiSelectAll"){e.selectionSvc?.deselectAllRowNodes({source:n,selectAll:t})}function Z8(e,t="apiSelectAllFiltered"){e.selectionSvc?.selectAllRowNodes({source:t,selectAll:"filtered"})}function X8(e,t="apiSelectAllFiltered"){e.selectionSvc?.deselectAllRowNodes({source:t,selectAll:"filtered"})}function J8(e,t="apiSelectAllCurrentPage"){e.selectionSvc?.selectAllRowNodes({source:t,selectAll:"currentPage"})}function eU(e,t="apiSelectAllCurrentPage"){e.selectionSvc?.deselectAllRowNodes({source:t,selectAll:"currentPage"})}function tU(e){return e.selectionSvc?.getSelectedNodes()??[]}function nU(e){return e.selectionSvc?.getSelectedRows()??[]}var iU={tag:"div",cls:"ag-selection-checkbox",role:"presentation",children:[{tag:"ag-checkbox",ref:"eCheckbox",role:"presentation"}]},oU=class extends yt{constructor(){super(iU,[Am]),this.eCheckbox=he}postConstruct(){this.eCheckbox.setPassive(!0)}onDataChanged(){this.onSelectionChanged()}onSelectableChanged(){this.showOrHideSelect()}onSelectionChanged(){const e=this.getLocaleTextFunc(),{rowNode:t,eCheckbox:n}=this,i=t.isSelected(),o=xd(e,i),[r,s]=t.selectable?["ariaRowToggleSelection","Press Space to toggle row selection"]:["ariaRowSelectionDisabled","Row Selection is disabled for this row"],a=e(r,s);n.setValue(i,!0),n.setInputAriaLabel(`${a} (${o})`)}init(e){if(this.rowNode=e.rowNode,this.column=e.column,this.overrides=e.overrides,this.onSelectionChanged(),this.addManagedListeners(this.eCheckbox.getWrapperElement(),{dblclick:Vs,click:i=>{Vs(i),!this.eCheckbox.isDisabled()&&this.beans.selectionSvc?.handleSelectionEvent(i,this.rowNode,"checkboxSelected")}}),this.addManagedListeners(this.rowNode,{rowSelected:this.onSelectionChanged.bind(this),dataChanged:this.onDataChanged.bind(this),selectableChanged:this.onSelectableChanged.bind(this)}),this.addManagedPropertyListener("rowSelection",({currentValue:i,previousValue:o})=>{const r=typeof i=="object"?Ig(i):void 0,s=typeof o=="object"?Ig(o):void 0;r!==s&&this.onSelectableChanged()}),Mg(this.gos)||typeof this.getIsVisible()=="function"){const i=this.showOrHideSelect.bind(this);this.addManagedEventListeners({displayedColumnsChanged:i}),this.addManagedListeners(this.rowNode,{dataChanged:i,cellChanged:i}),this.showOrHideSelect()}this.eCheckbox.getInputElement().setAttribute("tabindex","-1")}showOrHideSelect(){const{column:e,rowNode:t,overrides:n,gos:i}=this,o=t.selectable,r=this.getIsVisible();let s;if(typeof r=="function"){const f=n?.callbackParams;if(!e)s=r({...f,node:t,data:t.data});else{const p=e.createColumnFunctionCallbackParams(t);s=r({...f,...p})}}else s=r??!1;const a=o&&!s||!o&&s,l=o||s,u=i.get("rowSelection"),h=u&&typeof u!="string"?!Ig(u):!!e?.getColDef().showDisabledCheckboxes;this.setVisible(l&&(a?h:!0)),this.setDisplayed(l&&(a?h:!0)),l&&this.eCheckbox.setDisabled(a),n?.removeHidden&&this.setDisplayed(l)}getIsVisible(){const e=this.overrides;if(e)return e.isVisible;const t=this.gos.get("rowSelection");return t&&typeof t!="string"?$a(t):this.column?.getColDef()?.checkboxSelection}},rU=class{constructor(e,t){this.rowModel=e,this.pinnedRowModel=t,this.selectAll=!1,this.rootId=null,this.endId=null,this.cachedRange=[]}reset(){this.rootId=null,this.endId=null,this.cachedRange.length=0}setRoot(e){this.rootId=e.id,this.endId=null,this.cachedRange.length=0}setEndRange(e){this.endId=e.id,this.cachedRange.length=0}getRange(){if(this.cachedRange.length===0){const e=this.getRoot(),t=this.getEnd();if(e==null||t==null)return this.cachedRange;this.cachedRange=this.getNodesInRange(e,t)??[]}return this.cachedRange}isInRange(e){return this.rootId===null?!1:this.getRange().some(t=>t.id===e.id)}getRoot(e){if(this.rootId)return this.getRowNode(this.rootId);if(e)return this.setRoot(e),e}getEnd(){if(this.endId)return this.getRowNode(this.endId)}getRowNode(e){let t;const{rowModel:n,pinnedRowModel:i}=this;return t??(t=n.getRowNode(e)),i?.isManual()&&(t??(t=i.getPinnedRowById(e,"top")),t??(t=i.getPinnedRowById(e,"bottom"))),t}truncate(e){const t=this.getRange();if(t.length===0)return{keep:[],discard:[]};const n=t[0].id===this.rootId,i=t.findIndex(o=>o.id===e.id);if(i>-1){const o=t.slice(0,i),r=t.slice(i+1);return this.setEndRange(e),n?{keep:o,discard:r}:{keep:r,discard:o}}else return{keep:t,discard:[]}}extend(e,t=!1){const n=this.getRoot();if(n==null){const o=this.getRange().slice();return t&&e.depthFirstSearch(r=>!r.group&&o.push(r)),o.push(e),this.setRoot(e),{keep:o,discard:[]}}const i=this.getNodesInRange(n,e);if(!i)return this.setRoot(e),{keep:[e],discard:[]};if(i.find(o=>o.id===this.endId))return this.setEndRange(e),{keep:this.getRange(),discard:[]};{const o=this.getRange().slice();return this.setEndRange(e),{keep:this.getRange(),discard:o}}}getNodesInRange(e,t){const{pinnedRowModel:n,rowModel:i}=this;if(!n?.isManual())return i.getNodesInRangeForSelection(e,t);if(e.rowPinned==="top"&&!t.rowPinned)return Bi(n,"top",e,void 0).concat(i.getNodesInRangeForSelection(i.getRow(0),t)??[]);if(e.rowPinned==="bottom"&&!t.rowPinned){const o=Bi(n,"bottom",void 0,e),r=i.getRowCount(),s=i.getRow(r-1);return(i.getNodesInRangeForSelection(t,s)??[]).concat(o)}if(!e.rowPinned&&!t.rowPinned)return i.getNodesInRangeForSelection(e,t);if(e.rowPinned==="top"&&t.rowPinned==="top")return Bi(n,"top",e,t);if(e.rowPinned==="bottom"&&t.rowPinned==="top"){const o=Bi(n,"top",t,void 0),r=Bi(n,"bottom",void 0,e),s=i.getRow(0),a=i.getRow(i.getRowCount()-1);return o.concat(i.getNodesInRangeForSelection(s,a)??[]).concat(r)}if(!e.rowPinned&&t.rowPinned==="top")return Bi(n,"top",t,void 0).concat(i.getNodesInRangeForSelection(i.getRow(0),e)??[]);if(e.rowPinned==="top"&&t.rowPinned==="bottom"){const o=Bi(n,"top",e,void 0),r=Bi(n,"bottom",void 0,t),s=i.getRow(0),a=i.getRow(i.getRowCount()-1);return o.concat(i.getNodesInRangeForSelection(s,a)??[]).concat(r)}if(e.rowPinned==="bottom"&&t.rowPinned==="bottom")return Bi(n,"bottom",e,t);if(!e.rowPinned&&t.rowPinned==="bottom"){const o=Bi(n,"bottom",void 0,t),r=i.getRow(i.getRowCount());return(i.getNodesInRangeForSelection(e,r)??[]).concat(o)}return null}},sU=class extends X{constructor(e){super(),this.column=e,this.cbSelectAllVisible=!1,this.processingEventFromCheckbox=!1}onSpaceKeyDown(e){const t=this.cbSelectAll;t.isDisplayed()&&!t.getGui().contains(It(this.beans))&&(e.preventDefault(),t.setValue(!t.getValue()))}getCheckboxGui(){return this.cbSelectAll.getGui()}setComp(e){this.headerCellCtrl=e;const t=this.createManagedBean(new Tm);this.cbSelectAll=t,t.addCss("ag-header-select-all"),Or(t.getGui(),"presentation"),this.showOrHideSelectAll();const n=this.updateStateOfCheckbox.bind(this);this.addManagedEventListeners({newColumnsLoaded:()=>this.showOrHideSelectAll(),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this),selectionChanged:n,paginationChanged:n,modelUpdated:n}),this.addManagedPropertyListener("rowSelection",({currentValue:i,previousValue:o})=>{const r=s=>typeof s=="string"||!s||s.mode==="singleRow"?void 0:s.selectAll;r(i)!==r(o)&&this.showOrHideSelectAll(),this.updateStateOfCheckbox()}),this.addManagedListeners(t,{fieldValueChanged:this.onCbSelectAll.bind(this)}),t.getInputElement().setAttribute("tabindex","-1"),this.refreshSelectAllLabel()}onDisplayedColumnsChanged(e){this.isAlive()&&this.showOrHideSelectAll(e.source==="uiColumnMoved")}showOrHideSelectAll(e=!1){const t=this.isCheckboxSelection();this.cbSelectAllVisible=t,this.cbSelectAll.setDisplayed(t),t&&(this.checkRightRowModelType("selectAllCheckbox"),this.checkSelectionType("selectAllCheckbox"),this.updateStateOfCheckbox()),this.refreshSelectAllLabel(e)}updateStateOfCheckbox(){if(!this.cbSelectAllVisible||this.processingEventFromCheckbox)return;this.processingEventFromCheckbox=!0;const e=this.getSelectAllMode(),t=this.beans.selectionSvc,n=this.cbSelectAll,i=t.getSelectAllState(e);n.setValue(i);const o=t.hasNodesToSelect(e);n.setDisabled(!o),this.refreshSelectAllLabel(),this.processingEventFromCheckbox=!1}refreshSelectAllLabel(e=!1){const t=this.getLocaleTextFunc(),{headerCellCtrl:n,cbSelectAll:i,cbSelectAllVisible:o}=this,r=i.getValue(),s=xd(t,r),a=t("ariaRowSelectAll","Press Space to toggle all rows selection");n.setAriaDescriptionProperty("selectAll",o?`${a} (${s})`:null),i.setInputAriaLabel(t("ariaHeaderSelection","Column with Header Selection")),e||n.announceAriaDescription()}checkSelectionType(e){return bc(this.gos)?!0:(se(128,{feature:e}),!1)}checkRightRowModelType(e){const{gos:t,rowModel:n}=this.beans;return Yt(t)||wc(t)?!0:(se(129,{feature:e,rowModel:n.getType()}),!1)}onCbSelectAll(){if(this.processingEventFromCheckbox||!this.cbSelectAllVisible)return;const e=this.cbSelectAll.getValue(),t=this.getSelectAllMode();let n="uiSelectAll";t==="currentPage"?n="uiSelectAllCurrentPage":t==="filtered"&&(n="uiSelectAllFiltered");const i={source:n,selectAll:t},o=this.beans.selectionSvc;e?o.selectAllRowNodes(i):o.deselectAllRowNodes(i)}isCheckboxSelection(){const{column:e,gos:t,beans:n}=this,r=typeof t.get("rowSelection")=="object"?"headerCheckbox":"headerCheckboxSelection";return l1(n,e)&&this.checkRightRowModelType(r)&&this.checkSelectionType(r)}getSelectAllMode(){const e=p0(this.gos,!1);if(e)return e;const{headerCheckboxSelectionCurrentPageOnly:t,headerCheckboxSelectionFilteredOnly:n}=this.column.getColDef();return t?"currentPage":n?"filtered":"all"}destroy(){super.destroy(),this.cbSelectAll=void 0,this.headerCellCtrl=void 0}};function l1({gos:e,selectionColSvc:t},n){const i=e.get("rowSelection"),o=n.getColDef(),{headerCheckboxSelection:r}=o;let s=!1;if(typeof i=="object"){const l=Wr(n),u=Og(n);(Bd(i)==="autoGroupColumn"&&u||l&&t?.isSelectionColumnEnabled())&&(s=Nd(i))}else typeof r=="function"?s=r(We(e,{column:n,colDef:o})):s=!!r;return s}var aU=class extends X{postConstruct(){const{gos:e,beans:t}=this;this.selectionCtx=new rU(t.rowModel,t.pinnedRowModel),this.addManagedPropertyListeners(["isRowSelectable","rowSelection"],()=>{const n=Mg(e);n!==this.isRowSelectable&&(this.isRowSelectable=n,this.updateSelectable())}),this.isRowSelectable=Mg(e),this.addManagedEventListeners({cellValueChanged:n=>this.updateRowSelectable(n.node),rowNodeDataChanged:n=>this.updateRowSelectable(n.node)})}destroy(){super.destroy(),this.selectionCtx.reset()}createCheckboxSelectionComponent(){return new oU}createSelectAllFeature(e){if(l1(this.beans,e))return new sU(e)}isMultiSelect(){return bc(this.gos)}onRowCtrlSelected(e,t,n){const i=!!e.rowNode.isSelected();e.forEachGui(n,o=>{o.rowComp.toggleCss("ag-row-selected",i);const r=o.element;MS(r,i),r.contains(It(this.beans))&&t(o)})}announceAriaRowSelection(e){if(this.isRowSelectionBlocked(e))return;const t=e.isSelected(),n=this.beans.editSvc?.isEditing({rowNode:e});if(!e.selectable||n)return;const o=this.getLocaleTextFunc()(t?"ariaRowDeselect":"ariaRowSelect",`Press SPACE to ${t?"deselect":"select"} this row`);this.beans.ariaAnnounce?.announceValue(o,"rowSelection")}isRowSelectionBlocked(e){return!e.selectable||e.rowPinned&&!wh(e)||!ks(this.gos)}updateRowSelectable(e,t){const n=e.rowPinned&&e.pinnedSibling?e.pinnedSibling.selectable:this.isRowSelectable?.(e)??!0;return this.setRowSelectable(e,n,t),n}setRowSelectable(e,t,n){if(e.selectable!==t){if(e.selectable=t,e.dispatchRowEvent("selectableChanged"),n)return;if(yc(this.gos)){const o=this.calculateSelectedFromChildren(e);this.setNodesSelected({nodes:[e],newValue:o??!1,source:"selectableChanged"});return}e.isSelected()&&!e.selectable&&this.setNodesSelected({nodes:[e],newValue:!1,source:"selectableChanged"})}}calculateSelectedFromChildren(e){let t=!1,n=!1;if(!e.childrenAfterGroup?.length)return e.selectable?e.__selected:null;for(let i=0;i<e.childrenAfterGroup.length;i++){const o=e.childrenAfterGroup[i];let r=o.isSelected();if(!o.selectable){const s=this.calculateSelectedFromChildren(o);if(s===null)continue;r=s}switch(r){case!0:t=!0;break;case!1:n=!0;break;default:return}}if(!(t&&n))return t?!0:n?!1:e.selectable?e.__selected:null}selectRowNode(e,t,n,i="api"){if(t&&e.destroyed)return!1;const o=!e.selectable&&t,r=e.__selected===t;if(o||r)return!1;e.__selected=t,e.dispatchRowEvent("rowSelected");const s=e.sibling;s&&s.footer&&s.__localEventService&&s.dispatchRowEvent("rowSelected");const a=e.pinnedSibling;return a?.rowPinned&&a.__localEventService&&a.dispatchRowEvent("rowSelected"),this.eventSvc.dispatchEvent({...j_(e,this.gos,"rowSelected"),event:n||null,source:i}),!0}isCellCheckboxSelection(e,t){const n=this.gos.get("rowSelection");if(n&&typeof n!="string"){const i=Wr(e)&&$a(n);return e.isColumnFunc(t,i)}else return e.isColumnFunc(t,e.colDef.checkboxSelection)}inferNodeSelections(e,t,n,i){const{gos:o,selectionCtx:r}=this,s=e.isSelected(),a=yc(o),l=vO(o),u=CO(o),h=this.isMultiSelect(),f=i==="rowClicked";if(f&&!(l||u))return null;if(t&&n&&h){const p=r.getRoot();if(p)if(p.isSelected()){const m=r.isInRange(e)?r.truncate(e):r.extend(e,a);return{deselect:m.discard,select:m.keep,reset:!1}}else{const m=r.extend(e,a);return{select:[],deselect:m.keep,reset:!1}}else return null}else if(t&&h){const p=r.selectAll?this.beans.rowModel.getRow(0):void 0,m=r.getRoot(p),v=r.isInRange(e)?r.truncate(e):r.extend(e,a);return{select:v.keep,deselect:v.discard,reset:r.selectAll||!!(m&&!m.isSelected())}}else if(n){if(f){const p=!s;return p&&!l||!p&&!u?null:(r.setRoot(e),{node:e,newValue:p,clearSelection:!1})}return r.setRoot(e),{node:e,newValue:!s,clearSelection:!h}}else{r.setRoot(e);const p=wO(o),m=Hd(o)==="filteredDescendants",v=f&&(!p||!l);if(m&&s===void 0&&Yt(o))return{node:e,newValue:!1,checkFilteredNodes:!0,clearSelection:!h||v};if(f){const w=s?!p:l;return w===s&&!v||w&&!l||!w&&!u?null:{node:e,newValue:w,clearSelection:!h||v,keepDescendants:e.group&&a}}return{node:e,newValue:!s,clearSelection:!h||v}}}},lU=class extends aU{constructor(){super(...arguments),this.beanName="selectionSvc",this.selectedNodes=new Map,this.detailSelection=new Map,this.masterSelectsDetail=!1}postConstruct(){super.postConstruct();const{gos:e}=this;this.mode=Gd(e),this.groupSelectsDescendants=yc(e),this.groupSelectsFiltered=Hd(e)==="filteredDescendants",this.masterSelectsDetail=g0(e)==="detail",this.addManagedPropertyListeners(["groupSelectsChildren","groupSelectsFiltered","rowSelection"],()=>{const t=yc(e),n=Gd(e),i=Hd(e)==="filteredDescendants";this.masterSelectsDetail=g0(e)==="detail",(t!==this.groupSelectsDescendants||i!==this.groupSelectsFiltered||n!==this.mode)&&(this.deselectAllRowNodes({source:"api"}),this.groupSelectsDescendants=t,this.groupSelectsFiltered=i,this.mode=n)}),this.addManagedEventListeners({rowSelected:this.onRowSelected.bind(this)})}destroy(){super.destroy(),this.resetNodes()}handleSelectionEvent(e,t,n){if(this.isRowSelectionBlocked(t))return 0;const i=this.inferNodeSelections(t,e.shiftKey,e.metaKey||e.ctrlKey,n);if(i==null)return 0;if(this.selectionCtx.selectAll=!1,"select"in i)return i.reset?this.resetNodes():this.selectRange(i.deselect,!1,n),this.selectRange(i.select,!0,n);{const o=i.checkFilteredNodes?u1(i.node):i.newValue;return this.setNodesSelected({nodes:[i.node],newValue:o,clearSelection:i.clearSelection,keepDescendants:i.keepDescendants,event:e,source:n})}}setNodesSelected({newValue:e,clearSelection:t,suppressFinishActions:n,nodes:i,event:o,source:r,keepDescendants:s=!1}){if(i.length===0)return 0;const{gos:a}=this;if(!ks(a)&&e)return se(132),0;if(i.length>1&&!this.isMultiSelect())return se(130),0;let l=0;for(let u=0;u<i.length;u++){const h=i[u],f=h.primaryRow;if(f.rowPinned&&!wh(f)){se(59);continue}if(f.id===void 0){se(60);continue}if(e&&h.destroyed)continue;this.groupSelectsFiltered&&f.group&&!a.get("treeData")||this.selectRowNode(f,e,o,r)&&(this.detailSelection.delete(f.id),l++),this.groupSelectsDescendants&&f.childrenAfterGroup?.length&&(l+=this.selectChildren(f,e,r))}return n||(i.length===1&&r==="api"&&this.selectionCtx.setRoot(i[0].primaryRow),e&&(t||!this.isMultiSelect())&&(l+=this.clearOtherNodes(i[0].primaryRow,s,r)),l>0&&(this.updateGroupsFromChildrenSelections(r),this.dispatchSelectionChanged(r))),l}selectRange(e,t,n){let i=0;return e.forEach(o=>{const r=o.primaryRow;if(r.group&&this.groupSelectsDescendants)return;this.selectRowNode(r,t,void 0,n)&&i++}),i>0&&(this.updateGroupsFromChildrenSelections(n),this.dispatchSelectionChanged(n)),i}selectChildren(e,t,n){const i=this.groupSelectsFiltered?e.childrenAfterAggFilter:e.childrenAfterGroup;return i?this.setNodesSelected({newValue:t,clearSelection:!1,suppressFinishActions:!0,source:n,nodes:i}):0}getSelectedNodes(){return Array.from(this.selectedNodes.values())}getSelectedRows(){const e=[];return this.selectedNodes.forEach(t=>t.data&&e.push(t.data)),e}getSelectionCount(){return this.selectedNodes.size}filterFromSelection(e){const t=new Map;this.selectedNodes.forEach((n,i)=>{e(n)&&t.set(i,n)}),this.selectedNodes=t}updateGroupsFromChildrenSelections(e,t){if(!this.groupSelectsDescendants)return!1;const{gos:n,rowModel:i}=this.beans;if(!Yt(n))return!1;const o=i.rootNode;if(!o)return!1;let r=!1;const s=a=>{if(a!==o){const l=this.calculateSelectedFromChildren(a);r=this.selectRowNode(a,l===null?!1:l,void 0,e)||r}};return Zs(o,this.beans.rowModel.hierarchical,t,s),r}clearOtherNodes(e,t,n){const i=new Map;let o=0;return this.selectedNodes.forEach(r=>{const s=r.id==e.id;if((t?!uU(e,r):!0)&&!s){const l=this.selectedNodes.get(r.id);o+=this.setNodesSelected({nodes:[l],newValue:!1,clearSelection:!1,suppressFinishActions:!0,source:n}),this.groupSelectsDescendants&&r.parent&&i.set(r.parent.id,r.parent)}}),i.forEach(r=>{const s=this.calculateSelectedFromChildren(r);this.selectRowNode(r,s===null?!1:s,void 0,n)}),o}onRowSelected(e){const t=e.node;this.groupSelectsDescendants&&t.group||(t.isSelected()?this.selectedNodes.set(t.id,t):this.selectedNodes.delete(t.id))}syncInRowNode(e,t){this.syncInOldRowNode(e,t),this.syncInNewRowNode(e)}createDaemonNode(e){if(!e.id)return;const t=new $r(this.beans);return t.id=e.id,t.data=e.data,t.__selected=e.__selected,t.level=e.level,t}syncInOldRowNode(e,t){t&&e.id!==t.id&&this.selectedNodes.get(t.id)==e&&this.selectedNodes.set(t.id,t)}syncInNewRowNode(e){this.selectedNodes.has(e.id)?(e.__selected=!0,this.selectedNodes.set(e.id,e)):e.__selected=!1}reset(e){const t=this.getSelectionCount();this.resetNodes(),t&&this.dispatchSelectionChanged(e)}resetNodes(){this.selectedNodes.forEach(e=>{this.selectRowNode(e,!1)}),this.selectedNodes.clear()}getBestCostNodeSelection(){const{gos:e,rowModel:t}=this.beans;if(!Yt(e))return;const n=t.getTopLevelNodes();if(n===null)return;const i=[];function o(r){for(let s=0,a=r.length;s<a;s++){const l=r[s];l.isSelected()?i.push(l):l.group&&l.childrenAfterGroup&&o(l.childrenAfterGroup)}}return o(n),i}isEmpty(){return this.getSelectionCount()===0}deselectAllRowNodes({source:e,selectAll:t}){const n=Yt(this.gos);let i=!1;const o=r=>{const s=this.selectRowNode(r.primaryRow,!1,void 0,e);i||(i=s)};if(t==="currentPage"||t==="filtered"){if(!n){gt(102);return}this.getNodesToSelect(t).forEach(o)}else this.selectedNodes.forEach(o),this.reset(e);if(this.selectionCtx.selectAll=!1,n&&this.groupSelectsDescendants){const r=this.updateGroupsFromChildrenSelections(e);i||(i=r)}i&&this.dispatchSelectionChanged(e)}getSelectedCounts(e){let t=0,n=0;return this.getNodesToSelect(e).forEach(i=>{this.groupSelectsDescendants&&i.group||(i.isSelected()?t++:i.selectable&&n++)}),{selectedCount:t,notSelectedCount:n}}getSelectAllState(e){const{selectedCount:t,notSelectedCount:n}=this.getSelectedCounts(e);return c1(t,n)??null}hasNodesToSelect(e){return this.getNodesToSelect(e).filter(t=>t.selectable).length>0}getNodesToSelect(e){if(!this.canSelectAll())return[];const t=[],n=o=>t.push(o);if(e==="currentPage")return this.forEachNodeOnPage(o=>{if(!o.group){n(o);return}if(!o.footer&&!o.expanded){const r=s=>{n(s);const a=s.childrenAfterFilter;if(a)for(let l=0,u=a.length;l<u;++l)r(a[l])};r(o);return}this.groupSelectsDescendants||n(o)}),t;const i=this.beans.rowModel;return e==="filtered"?(i.forEachNodeAfterFilter(n),t):(i.forEachNode(n),t)}forEachNodeOnPage(e){const{pageBounds:t,rowModel:n}=this.beans,i=t.getFirstRow(),o=t.getLastRow();for(let r=i;r<=o;r++){const s=n.getRow(r);s&&e(s)}}selectAllRowNodes(e){const{gos:t,selectionCtx:n}=this;if(!ks(t)){se(132);return}if(mO(t)&&!bc(t)){se(130);return}if(!this.canSelectAll())return;const{source:i,selectAll:o}=e;let r=!1;if(this.getNodesToSelect(o).forEach(s=>{const a=this.selectRowNode(s.primaryRow,!0,void 0,i);r||(r=a)}),n.selectAll=!0,Yt(t)&&this.groupSelectsDescendants){const s=this.updateGroupsFromChildrenSelections(i);r||(r=s)}r&&this.dispatchSelectionChanged(i)}getSelectionState(){return this.isEmpty()?null:Array.from(this.selectedNodes.keys())}setSelectionState(e,t,n){if(e||(e=[]),!Array.isArray(e)){gt(103);return}const i=new Set(e),o=[];this.beans.rowModel.forEachNode(r=>{i.has(r.id)&&o.push(r)}),n&&this.resetNodes(),this.setNodesSelected({newValue:!0,nodes:o,source:t})}canSelectAll(){return Yt(this.beans.gos)}updateSelectable(e){const{gos:t,rowModel:n}=this.beans;if(!ks(t))return;const i="selectableChanged",o=Yt(t)&&this.groupSelectsDescendants,r=[];if(o){const s=n.rootNode;s&&Zs(s,n.hierarchical,e,a=>{let l=!1;for(const u of a.childrenAfterGroup)l||(l=u.selectable),!u.group&&!this.updateRowSelectable(u,!0)&&u.isSelected()&&r.push(u);this.setRowSelectable(a,l,!0)})}else n.forEachNode(s=>{!this.updateRowSelectable(s,!0)&&s.isSelected()&&r.push(s)});r.length&&this.setNodesSelected({nodes:r,newValue:!1,source:i}),!e&&o&&this.updateGroupsFromChildrenSelections?.(i)}updateSelectableAfterGrouping(e){this.updateSelectable(e),this.groupSelectsDescendants&&this.updateGroupsFromChildrenSelections?.("rowGroupChanged",e)&&this.dispatchSelectionChanged("rowGroupChanged")}refreshMasterNodeState(e,t){if(!this.masterSelectsDetail)return;const n=e.detailNode?.detailGridInfo?.api;if(!n)return;const i=cU(n);e.isSelected()!==i&&this.selectRowNode(e,i,t,"masterDetail")&&this.dispatchSelectionChanged("masterDetail"),i||this.detailSelection.set(e.id,new Set(n.getSelectedNodes().map(r=>r.id)))}setDetailSelectionState(e,t,n){if(this.masterSelectsDetail){if(!bc(t)){se(269);return}switch(e.isSelected()){case!0:{n.selectAll();break}case!1:{n.deselectAll();break}case void 0:{const i=this.detailSelection.get(e.id);if(i){const o=[];for(const r of i){const s=n.getRowNode(r);s&&o.push(s)}n.setNodesSelected({nodes:o,newValue:!0,source:"masterDetail"})}break}}}}dispatchSelectionChanged(e){this.eventSvc.dispatchEvent({type:"selectionChanged",source:e,selectedNodes:this.getSelectedNodes(),serverSideState:null})}};function cU(e){let t=0,n=0;return e.forEachNode(i=>{i.isSelected()?t++:i.selectable&&n++}),c1(t,n)}function c1(e,t){if(e===0&&t===0)return!1;if(!(e>0&&t>0))return e>0}function uU(e,t){let n=t.parent;for(;n;){if(n===e)return!0;n=n.parent}return!1}function u1(e){const t=e.isSelected()===!1,n=e.childrenAfterFilter?.some(u1)??!1;return t||n}var dU={moduleName:"SharedRowSelection",version:ve,beans:[j8],css:[K8],apiFunctions:{setNodesSelected:q8,selectAll:Q8,deselectAll:Y8,selectAllFiltered:Z8,deselectAllFiltered:X8,selectAllOnCurrentPage:J8,deselectAllOnCurrentPage:eU,getSelectedNodes:tU,getSelectedRows:nU}},hU={moduleName:"RowSelection",version:ve,rowModels:["clientSide","infinite","viewport"],beans:[lU],dependsOn:[dU]},fU=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,n=e.colDef,i=n.cellClassRules,o=this.getCellClassParams(e,n);Qm(this.beans.expressionSvc,i===this.cellClassRules?void 0:this.cellClassRules,i,o,r=>t.toggleCss(r,!0),r=>t.toggleCss(r,!1)),this.cellClassRules=i}applyUserStyles(){const e=this.column,t=e.colDef,n=t.cellStyle;if(!n)return;let i;if(typeof n=="function"){const o=this.getCellClassParams(e,t);i=n(o)}else i=n;i&&this.cellComp.setUserStyles(i)}applyClassesFromColDef(){const{column:e,cellComp:t}=this,n=e.colDef,i=this.getCellClassParams(e,n);for(const r of this.staticClasses)t.toggleCss(r,!1);const o=this.beans.cellStyles.getStaticCellClasses(n,i);this.staticClasses=o;for(const r of o)t.toggleCss(r,!0)}getCellClassParams(e,t){const{value:n,rowNode:i}=this.cellCtrl;return We(this.beans.gos,{value:n,data:i.data,node:i,colDef:t,column:e,rowIndex:i.rowIndex})}},pU=class extends X{constructor(){super(...arguments),this.beanName="cellStyles"}processAllCellClasses(e,t,n,i){Qm(this.beans.expressionSvc,void 0,e.cellClassRules,t,n,i),this.processStaticCellClasses(e,t,n)}getStaticCellClasses(e,t){const{cellClass:n}=e;if(!n)return[];let i;return typeof n=="function"?i=n(t):i=n,typeof i=="string"&&(i=[i]),i||[]}createCellCustomStyleFeature(e){return new fU(e,this.beans)}processStaticCellClasses(e,t,n){this.getStaticCellClasses(e,t).forEach(o=>{n(o)})}},gU={moduleName:"CellStyle",version:ve,beans:[pU]},mU={moduleName:"RowStyle",version:ve,beans:[uW]},vU={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,overlayComponent:!0,suppressOverlays:!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},ri="clientSide",Ln="serverSide",ul="infinite",CU={onGroupExpandedOrCollapsed:[ri],refreshClientSideRowModel:[ri],isRowDataEmpty:[ri],forEachLeafNode:[ri],forEachNodeAfterFilter:[ri],forEachNodeAfterFilterAndSort:[ri],resetRowHeights:[ri,Ln],applyTransaction:[ri],applyTransactionAsync:[ri],flushAsyncTransactions:[ri],getBestCostNodeSelection:[ri],getServerSideSelectionState:[Ln],setServerSideSelectionState:[Ln],applyServerSideTransaction:[Ln],applyServerSideTransactionAsync:[Ln],applyServerSideRowData:[Ln],retryServerSideLoads:[Ln],flushServerSideAsyncTransactions:[Ln],refreshServerSide:[Ln],getServerSideGroupLevelState:[Ln],refreshInfiniteCache:[ul],purgeInfiniteCache:[ul],getInfiniteRowCount:[ul],isLastRowIndexKnown:[ul,Ln],expandAll:[ri,Ln],collapseAll:[ri,Ln],onRowHeightChanged:[ri,Ln],setRowCount:[ul,Ln],getCacheBlockState:[ul,Ln]},wU={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 bU(e,t,n){const i=wU[e];if(i){const{version:r,new:s,old:a,message:l}=i,u=a??e;return(...h)=>{const f=s?`Please use ${s} instead. `:"";return vc(`Since ${r} api.${u} is deprecated. ${f}${l??""}`),t.apply(t,h)}}const o=CU[e];return o?(...r)=>{const s=n.rowModel.getType();if(!o.includes(s)){Ga(`api.${e} can only be called when gridOptions.rowModelType is ${o.join(" or ")}`);return}return t.apply(t,r)}:t}var yU={detailCellRendererCtrl:"SharedMasterDetail",dndSourceComp:"DragAndDrop",fillHandle:"CellSelection",groupCellRendererCtrl:"GroupCellRenderer",headerFilterCellCtrl:"ColumnFilter",headerGroupCellCtrl:"ColumnGroup",rangeHandle:"CellSelection",tooltipFeature:"Tooltip",highlightTooltipFeature:"Tooltip",tooltipStateManager:"Tooltip",groupStrategy:"RowGrouping",treeGroupStrategy:"TreeData",rowNumberRowResizer:"RowNumbers",singleCell:"EditCore",fullRow:"EditCore",agSetColumnFilterHandler:"SetFilter",agMultiColumnFilterHandler:"MultiFilter",agGroupColumnFilterHandler:"GroupFilter",agNumberColumnFilterHandler:"NumberFilter",agBigIntColumnFilterHandler:"BigIntFilter",agDateColumnFilterHandler:"DateFilter",agTextColumnFilterHandler:"TextFilter"},SU={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,aasc:1,adesc: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},RU={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",overlayLoading:"Overlay",overlayExporting:"Overlay",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",richSelectLoading:"RichSelect",smallLeft:"CommunityCore",smallRight:"CommunityCore",subMenuOpen:"MenuItem",subMenuOpenRtl:"MenuItem",panelDelimiter:"RowGroupingPanel",panelDelimiterRtl:"RowGroupingPanel",smallUp:"CommunityCore",sortAscending:["MenuCore","Sort"],sortDescending:["MenuCore","Sort"],sortAbsoluteAscending:["MenuCore","Sort"],sortAbsoluteDescending:["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"},FU=new Set(["colorPicker","smallUp","checkboxChecked","checkboxIndeterminate","checkboxUnchecked","radioButtonOn","radioButtonOff","smallDown","smallLeft","smallRight"]),xU=class extends X{constructor(){super(...arguments),this.beanName="validation"}wireBeans(e){this.gridOptions=e.gridOptions,nO(S3)}warnOnInitialPropertyUpdate(e,t){e==="api"&&vU[t]&&se(22,{key:t})}processGridOptions(e){this.processOptions(e,d5())}validateApiFunction(e,t){return bU(e,t,this.beans)}missingUserComponent(e,t,n,i){const o=il[t];o?this.gos.assertModuleRegistered(o,`AG Grid '${e}' component: ${t}`):se(101,{propertyName:e,componentName:t,agGridDefaults:n,jsComps:i})}missingDynamicBean(e){const t=yU[e];return t?Po(200,{...this.gos.getModuleErrorParams(),moduleName:t,reasonOrId:e}):void 0}checkRowEvents(e){EU.has(e)&&se(10,{eventType:e})}validateIcon(e){if(FU.has(e)&&se(43,{iconName:e}),SU[e])return;const t=RU[e];if(t){gt(200,{reasonOrId:`icon '${e}'`,moduleName:t,gridScoped:Eg(),gridId:this.beans.context.getId(),rowModelType:this.gos.get("rowModelType"),additionalText:"Alternatively, use the CSS icon name directly."});return}se(134,{iconName:e})}isProvidedUserComp(e){return!!il[e]}validateColDef(e){this.processOptions(e,i5())}processOptions(e,t){const{validations:n,deprecations:i,allProperties:o,propertyExceptions:r,objectName:s,docsUrl:a}=t;o&&this.gridOptions.suppressPropertyNamesCheck!==!0&&this.checkProperties(e,[...r??[],...Object.keys(i)],o,s,a);const l=new Set;if(Object.keys(e).forEach(h=>{const f=i[h];if(f){const{message:R,version:S}=f;l.add(`As of v${S}, ${String(h)} is deprecated. ${R??""}`)}const p=e[h];if(p==null||p===!1)return;const m=n[h];if(!m)return;const{dependencies:v,validate:w,supportedRowModels:b,expectedType:y}=m;if(y){const R=typeof p;if(R!==y){l.add(`${String(h)} should be of type '${y}' but received '${R}' (${p}).`);return}}if(b){const R=this.gridOptions.rowModelType??"clientSide";if(!b.includes(R)){l.add(`${String(h)} is not supported with the '${R}' row model. It is only valid with: ${b.join(", ")}.`);return}}if(v){const R=this.checkForRequiredDependencies(h,v,e);if(R){l.add(R);return}}if(w){const R=w(e,this.gridOptions,this.beans);if(R){l.add(R);return}}}),l.size>0)for(const h of l)vc(h)}checkForRequiredDependencies(e,t,n){const o=Object.entries(t).filter(([r,s])=>{const a=n[r];return!s.required.includes(a)});return o.length===0?null:o.map(([r,s])=>`'${String(e)}' requires '${r}' to be one of [${s.required.map(a=>a===null?"null":a===void 0?"undefined":a).join(", ")}]. ${s.reason??""}`).join(`
|
|
61
|
+
To see what part of your code that caused the refresh check this stacktrace.`,253:({version:e})=>["Illegal version string: ",e],254:()=>"Cannot create chart: no chart themes available.",255:({point:e})=>`Lone surrogate U+${e?.toString(16).toUpperCase()} is not a scalar value`,256:()=>"Unable to initialise. See validation error, or load ValidationModule if missing.",257:()=>YF("IntegratedChartsModule"),258:()=>YF("SparklinesModule"),259:({part:e})=>`the argument to theme.withPart must be a Theming API part object, received: ${e}`,260:({propName:e,compName:t,gridScoped:n,gridId:i,rowModelType:o})=>QF({reasonOrId:`AG Grid '${e}' component: ${t}`,moduleName:il[t],gridId:i,gridScoped:n,rowModelType:o}),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 ${Wa}/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:()=>KF(),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:qF,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`,291:()=>"License Key being set multiple times with different values. This can result in an incorrect license key being used,",292:({colId:e})=>`The Multi Filter for column '${e}' has buttons configured against the child filters. When 'enableFilterHandlers=true', buttons must instead be provided against the parent Multi Filter params. The child filter buttons will be ignored.`,293:()=>"The grid was initialised detached from the DOM and was then inserted into a Shadow Root. Theme styles are probably broken. Pass the themeStyleContainer grid option to let the grid know where in the document to insert theme CSS.",294:()=>"When using the `agRichSelectCellEditor` setting `filterListAsync = true` requires `allowTyping = true` and the `values()` callback must return a Promise of filtered values.",295:({blockedService:e})=>`colDef.allowFormula is not supported with ${e}. Formulas has been turned off.`,296:()=>"Since v35, `api.hideOverlay()` does not hide the overlay when `activeOverlay` is set. Set `activeOverlay=null` instead.",297:()=>'`api.hideOverlay()` does not hide the no matching rows overlay as it is only controlled by grid state. Set `suppressOverlays=["noMatchingRows"] to not show it.',298:()=>"Columns Tool Panel 'buttons' requires 'apply' to enable Deferred Updates."};function SW(e,t){const n=yW[e];if(!n)return[`Missing error text for error id ${e}!`];const i=n(t),r=`
|
|
62
|
+
See ${r0(e,t)}`;return Array.isArray(i)?i.concat(r):[i,r]}var RW={1:"Charting Aggregation",2:"pivotResultFields",3:"setTooltip"},ZF=class{constructor(e="javascript"){this.frameworkName=e,this.renderingEngine="vanilla",this.batchFrameworkComps=!1,this.wrapIncoming=t=>t(),this.wrapOutgoing=t=>t(),this.baseDocLink=`${qS}/${this.frameworkName}-data-grid`,iO(this.baseDocLink)}frameworkComponent(e){return null}isFrameworkComponent(e){return!1}getDocLink(e){return this.baseDocLink+(e?"/"+e:"")}},XF=new WeakMap,JF=new WeakMap;function FW(e,t,n){if(!t)return gt(11),{};const i=n;let o;if(!i?.setThemeOnGridDiv){const s=on({tag:"div"});s.style.height="100%",e.appendChild(s),e=s,o=()=>e.remove()}return new PW().create(e,t,s=>{const a=new BN(e);s.createBean(a)},void 0,n,o)}var xW=1,PW=class{create(e,t,n,i,o,r){const s=xg.applyGlobalGridOptions(t),a=s.gridId??String(xW++),l=this.getRegisteredModules(o,a,s.rowModelType),u=this.createBeansList(s.rowModelType,l,a),h=this.createProvidedBeans(e,s,o);if(!u)return;const p={providedBeanInstances:h,beanClasses:u,id:a,beanInitComparator:c2,beanDestroyComparator:u2,derivedBeans:[a2],destroyCallback:()=>{JF.delete(v),XF.delete(e),ZL(a),r?.()}},m=new s2(p);this.registerModuleFeatures(m,l),n(m),m.getBean("syncSvc").start(),i?.(m);const v=m.getBean("gridApi");return XF.set(e,v),JF.set(v,e),v}getRegisteredModules(e,t,n){return Va(fW,void 0,!0),e?.modules?.forEach(i=>Va(i,t)),XL(t,ex(n))}registerModuleFeatures(e,t){const n=e.getBean("registry"),i=e.getBean("apiFunctionSvc");for(const o of t){n.registerModule(o);const r=o.apiFunctions;if(r){const s=Object.keys(r);for(const a of s)i?.addFunction(a,r[a])}}}createProvidedBeans(e,t,n){let i=n?n.frameworkOverrides:null;Nt(i)&&(i=new ZF);const o={gridOptions:t,eGridDiv:e,eRootDiv:e,globalListener:n?n.globalListener:null,globalSyncListener:n?n.globalSyncListener:null,frameworkOverrides:i,withinStudio:n?.withinStudio};return n?.providedBeanInstances&&Object.assign(o,n.providedBeanInstances),o}createBeansList(e,t,n){const i={clientSide:"ClientSideRowModel",infinite:"InfiniteRowModel",serverSide:"ServerSideRowModel",viewport:"ViewportRowModel"},o=ex(e),r=i[o];if(!r){Cc(201,{rowModelType:o},`Unknown rowModelType ${o}.`);return}if(!eO()){Cc(272,void 0,KF());return}if(!e){const a=Object.entries(i).filter(([l,u])=>Pg(u,n,l));if(a.length==1){const[l,u]=a[0];if(l!==o){const h={moduleName:u,rowModelType:l};Cc(275,h,qF(h));return}}}if(!Pg(r,n,o)){const a=JS(),l=`rowModelType = '${o}'`,u=`Missing module ${r}Module for rowModelType ${o}.`;Cc(200,{reasonOrId:l,moduleName:r,gridScoped:Eg(),gridId:n,rowModelType:o,isUmd:a},u);return}const s=new Set;for(const a of t)for(const l of a.beans??[])s.add(l);return Array.from(s)}};function ex(e){return e??"clientSide"}function EW(e,t=!1){const n=[],i=[],o=[],r=[],s=[],a=[],l=[],u=[],h=[];let f=0;for(let p=0;p<e.length;p++){const{colId:m,sort:v,sortType:w,sortIndex:b,rowGroup:y,rowGroupIndex:R,aggFunc:S,pivot:P,pivotIndex:F,pinned:I,hide:L,width:V,flex:G}=e[p];h.push(m),v&&(n[b??f++]={colId:m,sort:v,type:w}),y&&(i[R??0]=m),typeof S=="string"&&o.push({colId:m,aggFunc:S}),P&&(r[F??0]=m),I&&(I==="right"?a:s).push(m),L&&l.push(m),(G!=null||V)&&u.push({colId:m,flex:G??void 0,width:V===null?void 0:V})}return{sort:n.length?{sortModel:iv(n)}:void 0,rowGroup:i.length?{groupColIds:iv(i)}:void 0,aggregation:o.length?{aggregationModel:o}:void 0,pivot:r.length||t?{pivotMode:t,pivotColIds:iv(r)}:void 0,columnPinning:s.length||a.length?{leftColIds:s,rightColIds:a}:void 0,columnVisibility:l.length?{hiddenColIds:l}:void 0,columnSizing:u.length?{columnSizingModel:u}:void 0,columnOrder:h.length?{orderedColIds:h}:void 0}}function iv(e){return e.filter(t=>t!=null)}function DW(e){const t=[];for(const{groupId:n,open:i}of e)i&&t.push(n);return t.length?{openColumnGroupIds:t}:void 0}var TW=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=>{if(!i){gt(18),t||gt(20);return}if(this.isGridApi(i))return i;const o=i;return"current"in o?o.current?.api:(o.api||gt(19),o.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){if(!this.consuming)for(const t of this.getAlignedGridApis())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 n=[];return e.columns?e.columns.forEach(i=>{n.push(t(i))}):e.column&&n.push(t(e.column)),n}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":se(21);break}})}processGroupOpenedEvent(e){const{colGroupSvc:t}=this.beans;if(t)for(const n of e.columnGroups){let i=null;n&&(i=t.getProvidedColGroup(n.getGroupId())),!(n&&!i)&&t.setColumnGroupOpened(i,n.isExpanded(),"alignedGridChanged")}}processColumnEvent(e){const t=e.column;let n=null;const i=this.beans,{colResize:o,ctrlsSvc:r,colModel:s}=i;if(t&&(n=s.getColDefCol(t.getColId())),t&&!n)return;const a=this.getMasterColumns(e);switch(e.type){case"columnMoved":{const f=e.api.getColumnState().map(p=>({colId:p.colId}));oo(i,{state:f,applyOrder:!0},"alignedGridChanged")}break;case"columnVisible":{const f=e.api.getColumnState().map(p=>({colId:p.colId,hide:p.hide}));oo(i,{state:f},"alignedGridChanged")}break;case"columnPinned":{const f=e.api.getColumnState().map(p=>({colId:p.colId,pinned:p.pinned}));oo(i,{state:f},"alignedGridChanged")}break;case"columnResized":{const h=e,f={};for(const p of a)f[p.getId()]={key:p.getColId(),newWidth:p.getActualWidth()};for(const p of h.flexColumns??[])f[p.getId()]&&delete f[p.getId()];o?.setColumnWidths(Object.values(f),!1,h.finished,"alignedGridChanged");break}}const u=r.getGridBodyCtrl().isVerticalScrollShowing();for(const h of this.getAlignedGridApis())h.setGridOption("alwaysShowVerticalScroll",u)}},AW={moduleName:"AlignedGrids",version:ve,beans:[TW],dependsOn:[rF]};function IW(e,t={}){const n=t?t.rowNodes:void 0;e.frameworkOverrides.wrapIncoming(()=>e.rowRenderer.redrawRows(n))}function tx(e,t,n,i,o){t&&(i&&t.parent&&t.parent.level!==-1&&tx(e,t.parent,n,i,o),t.setExpanded(n,void 0,o))}function MW(e,t){return e.rowModel.getRowNode(t)}function kW(e,t,n,i){e.rowRenderer.addRenderedRowListener(t,n,i)}function LW(e){return e.rowRenderer.getRenderedNodes()}function OW(e,t,n){e.rowModel.forEachNode(t,n)}function _W(e){return e.rowRenderer.firstRenderedRow}function NW(e){return e.rowRenderer.lastRenderedRow}function BW(e,t){return e.rowModel.getRow(t)}function GW(e){return e.rowModel.getRowCount()}function HW(e){return e.ctrlsSvc.getScrollFeature().getVScrollPosition()}function VW(e){return e.ctrlsSvc.getScrollFeature().getHScrollPosition()}function nx(e,t,n="auto"){e.frameworkOverrides.wrapIncoming(()=>e.ctrlsSvc.getScrollFeature().ensureColumnVisible(t,n),"ensureVisible")}function ix(e,t,n){e.frameworkOverrides.wrapIncoming(()=>e.ctrlsSvc.getScrollFeature().ensureIndexVisible(t,n),"ensureVisible")}function WW(e,t,n=null){e.frameworkOverrides.wrapIncoming(()=>e.ctrlsSvc.getScrollFeature().ensureNodeVisible(t,n),"ensureVisible")}var ox={moduleName:"RowApi",version:ve,apiFunctions:{redrawRows:IW,setRowNodeExpanded:tx,getRowNode:MW,addRenderedRowListener:kW,getRenderedNodes:LW,forEachNode:OW,getFirstDisplayedRowIndex:_W,getLastDisplayedRowIndex:NW,getDisplayedRowAtIndex:BW,getDisplayedRowCount:GW}},zW={moduleName:"ScrollApi",version:ve,apiFunctions:{getVerticalPixelRange:HW,getHorizontalPixelRange:VW,ensureColumnVisible:nx,ensureIndexVisible:ix,ensureNodeVisible:WW}};function UW(e){e.expansionSvc?.expandAll(!0)}function $W(e){e.expansionSvc?.expandAll(!1)}function rx(e){e.rowModel?.onRowHeightChanged()}function sx(e){if(e.rowAutoHeight?.active){se(3);return}e.rowModel?.resetRowHeights()}function jW(e){e.expansionSvc?.resetExpansion()}function KW(e,t,n){const i=U_(e);if(i){if(e.rowGroupColsSvc?.columns.length===0){if(t<0){gt(238);return}i.setRowCount(t,n);return}gt(28);return}Zd(e)?.setRowCount(t,n)}function qW(e){return wc(e.gos)?e.rowModel.getBlockStates():e.rowNodeBlockLoader?.getBlockState()??{}}function QW(e){return e.rowModel.isLastRowIndexKnown()}var YW={moduleName:"CsrmSsrmSharedApi",version:ve,apiFunctions:{expandAll:UW,collapseAll:$W,resetRowGroupExpansion:jW}},ZW={moduleName:"RowModelSharedApi",version:ve,apiFunctions:{onRowHeightChanged:rx,resetRowHeights:sx}},XW={moduleName:"SsrmInfiniteSharedApi",version:ve,apiFunctions:{setRowCount:KW,getCacheBlockState:qW,isLastRowIndexKnown:QW}},ax=(e,t)=>{for(let n=0,i=e.length;n<i;++n){const o=e[n],r=o.childrenAfterGroup;r!==null&&(ax(r,t),t(o))}},Zs=(e,t,n,i)=>{if(n!=null){const r=n.getSortedRows();for(let s=0,a=r.length;s<a;++s){const l=r[s];l.childrenAfterGroup!==null&&!l.destroyed&&i(l)}return}if(e==null)return;const o=e.childrenAfterGroup;o!==null&&(t&&ax(o,i),i(e))},JW=class extends X{constructor(e){super(),this.rootNode=e,this.nextId=0,this.allNodesMap={},lx(e)}getRowNode(e){return this.allNodesMap[e]}setNewRowData(e){this.dispatchRowDataUpdateStarted(e),this.destroyAllNodes();const t=lx(this.rootNode),n=new Array(e.length);t._leafs=n;let i=0;const o=this.beans.groupStage?.getNestedDataGetter(),r=o?new Set:null,s=(a,l)=>{const u=a.level+1;for(let h=0,f=l.length;h<f;++h){const p=l[h];if(!p)continue;const m=this.createRowNode(p,u,i);if(n[i++]=m,r&&!r.has(p)){r.add(p),m.treeParent=a;const v=o(p);v&&s(m,v)}}};s(t,e),n.length=i}destroyAllNodes(){const{selectionSvc:e,pinnedRowModel:t,groupStage:n}=this.beans;e?.reset("rowDataChanged"),t?.isManual()&&t.reset(),n?.clearNonLeafs();const i=this.rootNode._leafs;if(i)for(let o=0,r=i.length;o<r;++o)i[o]._destroy(!1);this.allNodesMap=Object.create(null),this.nextId=0}setImmutableRowData(e,t){const{rootNode:n,gos:i}=this;this.dispatchRowDataUpdateStarted(t);const o=Ua(i),r=e.changedRowNodes,{adds:s,updates:a}=r,l=new Set,u=[],h=this.beans.groupStage?.getNestedDataGetter();let f=i.get("suppressMaintainUnsortedOrder")?void 0:!1,p=-1,m=!1;const v=(y,R)=>{if(!f&&f!==void 0){const S=y.sourceRowIndex;f=S<=p,p=S}y.data!==R&&(y.updateData(R),s.has(y)||a.add(y),!y.selectable&&y.isSelected()&&u.push(y))},w=(y,R,S)=>{for(let P=0,F=R.length;P<F;++P){const I=R[P];if(!I)continue;let L=this.getRowNode(o({data:I,level:S}));if(L?(v(L,I),m||(m=!!h&&L.treeParent!==y)):(L=this.createRowNode(I,S),s.add(L)),!h||l.has(L)){l.add(L);continue}l.add(L),L.treeParent=y;const V=h(I);V&&w(L,V,S+1)}};w(n,t,0);const b=this.deleteUnusedNodes(l,r,u,!!e.animate)||f||s.size>0;if(b){const y=n._leafs??(n._leafs=[]);f===void 0?oz(y,l,r):iz(y,l)&&(r.reordered=!0)}(b||m||a.size)&&(e.rowDataUpdated=!0,this.deselect(u))}deleteUnusedNodes(e,{removals:t},n,i){const o=this.rootNode._leafs;for(let r=0,s=o.length;r<s;r++){const a=o[r];e.has(a)||this.destroyNode(a,i)&&(t.push(a),a.isSelected()&&n.push(a))}return t.length>0}updateRowData(e,t,n){if(this.dispatchRowDataUpdateStarted(e.add),this.beans.groupStage?.getNestedDataGetter())return se(268),{remove:[],update:[],add:[]};const i=[],o=Ua(this.gos),r=this.executeRemove(o,e,t,i,n),s=this.executeUpdate(o,e,t,i),a=this.executeAdd(e,t);return this.deselect(i),{remove:r,update:s,add:a}}executeRemove(e,{remove:t},{adds:n,updates:i,removals:o},r,s){const a=this.rootNode._leafs,l=a?.length,u=t?.length;if(!u||!l)return[];let h=0,f=l,p=0;const m=new Array(u);for(let v=0;v<u;++v){const w=this.lookupNode(e,t[v]);if(!w)continue;const b=w.sourceRowIndex;b<f&&(f=b),b>p&&(p=b),m[h++]=w,this.destroyNode(w,s)&&(w.isSelected()&&r.push(w),n.delete(w)||(i.delete(w),o.push(w)))}return m.length=h,h&&nz(a,f,p),m}executeUpdate(e,{update:t},{adds:n,updates:i},o){const r=t?.length;if(!r)return[];const s=new Array(r);let a=0;for(let l=0;l<r;l++){const u=t[l],h=this.lookupNode(e,u);h&&(h.updateData(u),!h.selectable&&h.isSelected()&&o.push(h),s[a++]=h,n.has(h)||i.add(h))}return s.length=a,s}executeAdd(e,t){var n;const i=(n=this.rootNode)._leafs??(n._leafs=[]),o=i.length,r=e.add,s=r?.length;if(!s)return[];const a=o+s;let l=this.sanitizeAddIndex(i,e.addIndex);if(l<o){for(let f=o-1,p=a-1;f>=l;--f){const m=i[f];m.sourceRowIndex=p,i[p--]=m}t.reordered=!0}i.length=a;const u=new Array(s),h=t.adds;for(let f=0;f<s;f++){const p=this.createRowNode(r[f],0,l);h.add(p),i[l]=p,u[f]=p,l++}return u}dispatchRowDataUpdateStarted(e){this.eventSvc.dispatchEvent({type:"rowDataUpdateStarted",firstRowData:e?.length?e[0]:null})}deselect(e){const t="rowDataChanged",n=this.beans.selectionSvc;e.length&&n?.setNodesSelected({newValue:!1,nodes:e,suppressFinishActions:!0,source:t}),n?.updateGroupsFromChildrenSelections?.(t),e.length&&this.eventSvc.dispatchEvent({type:"selectionChanged",source:t,selectedNodes:n?.getSelectedNodes()??null,serverSideState:null})}createRowNode(e,t,n){const i=new $r(this.beans);i.parent=this.rootNode,i.level=t,i.group=!1,n!=null&&(i.sourceRowIndex=n),i.setDataAndId(e,String(this.nextId++));const o=i.id,r=this.allNodesMap;return r[o]&&se(2,{nodeId:o}),r[o]=i,i}destroyNode(e,t){if(!e._destroy(t))return!1;const n=e.id,i=this.allNodesMap;return i[n]===e&&delete i[n],!0}lookupNode(e,t){if(!e)return tz(this.rootNode._leafs,t);const n=e({data:t,level:0}),i=this.allNodesMap[n];return i||(gt(4,{id:n}),null)}sanitizeAddIndex(e,t){const n=e.length;if(typeof t!="number"||t<0||t>=n||Number.isNaN(t))return n;t=Math.ceil(t);const i=this.gos;return t>0&&i.get("treeData")&&i.get("getDataPath")&&(t=ez(e,t)),t}},ez=(e,t)=>{for(let n=0,i=e.length;n<i;n++)if(e[n]?.rowIndex==t-1)return n+1;return t},lx=e=>{e.group=!0,e.level=-1,e._expanded=!0,e.id="ROOT_NODE_ID",e._leafs?.length!==0&&(e._leafs=[]);const t=[],n=[],i=[],o=[];e.childrenAfterGroup=t,e.childrenAfterSort=n,e.childrenAfterAggFilter=i,e.childrenAfterFilter=o;const r=e.sibling;return r&&(r.childrenAfterGroup=t,r.childrenAfterSort=n,r.childrenAfterAggFilter=i,r.childrenAfterFilter=o,r.childrenMapped=e.childrenMapped),e.updateHasChildren(),e},tz=(e,t)=>{if(e)for(let n=0,i=e.length;n<i;n++){const o=e[n];if(o.data===t)return o}return gt(5,{data:t}),null},nz=(e,t,n)=>{t=Math.max(0,t);for(let i=t,o=e.length;i<o;++i){const r=e[i];i<=n&&r.destroyed||(r.sourceRowIndex=t,e[t++]=r)}e.length=t},iz=(e,t)=>{const n=t.size;e.length=n;let i=0,o=!1,r=!1;for(const s of t){const a=s.sourceRowIndex;a===i?r||(r=o):(a>=0?r=!0:o=!0,s.sourceRowIndex=i,e[i]=s),++i}return r},oz=(e,t,{adds:n})=>{const i=e.length,o=t.size;o>i&&(e.length=o);let r=0;for(let s=0;s<i;++s){const a=e[s];a.destroyed||(r!==s&&(a.sourceRowIndex=r,e[r]=a),++r)}for(const s of n)s.sourceRowIndex<0&&(s.sourceRowIndex=r,e[r++]=s);e.length=r};function ov(e){const t=e.sibling;t&&(t.childrenAfterFilter=e.childrenAfterFilter)}var rz=class extends X{constructor(){super(...arguments),this.beanName="filterStage",this.step="filter",this.refreshProps=["excludeChildrenWhenTreeDataFiltering"]}wireBeans(e){this.filterManager=e.filterManager}execute(e){const t=!!this.filterManager?.isChildFilterPresent();this.beans.formula?.active?this.softFilter(t,e):this.filterNodes(t,e)}filterNodes(e,t){const n=(i,o)=>{i.hasChildren()&&e&&!o?i.childrenAfterFilter=i.childrenAfterGroup.filter(r=>{const s=r.childrenAfterFilter&&r.childrenAfterFilter.length>0,a=r.data&&this.filterManager.doesRowPassFilter({rowNode:r});return s||a}):i.childrenAfterFilter=i.childrenAfterGroup,ov(i)};if(this.doingTreeDataFiltering()){const i=(o,r)=>{if(o.childrenAfterGroup)for(let s=0;s<o.childrenAfterGroup.length;s++){const a=o.childrenAfterGroup[s],l=r||this.filterManager.doesRowPassFilter({rowNode:a});a.childrenAfterGroup?i(o.childrenAfterGroup[s],l):n(a,l)}n(o,r)};i(this.beans.rowModel.rootNode,!1)}else{const i=o=>n(o,!1);Zs(this.beans.rowModel.rootNode,this.beans.rowModel.hierarchical,t,i)}}softFilter(e,t){const n=o=>{if(o.childrenAfterFilter=o.childrenAfterGroup,o.hasChildren())for(const r of o.childrenAfterGroup)r.softFiltered=e&&!(r.data&&this.filterManager.doesRowPassFilter({rowNode:r}));ov(o)},i=this.beans.rowModel;Zs(i.rootNode,i.hierarchical,t,n)}doingTreeDataFiltering(){const{gos:e}=this;return!!this.beans.groupStage?.treeData&&!e.get("excludeChildrenWhenTreeDataFiltering")}},sz=4,az=(e,t,n,i,o)=>{const r=t.childrenAfterSort,s=t.childrenAfterAggFilter;if(!s)return r&&r.length>0?r:[];const a=s.length;if(a<=1)return r?.length===a&&(a===0||r[0]===s[0])?r:s.slice();if(!r||a<=sz)return e.doFullSortInPlace(s.slice(),o);const l=new Map,{updates:u,adds:h}=n,f=[];for(let m=0;m<a;++m){const v=s[m];u.has(v)||h.has(v)||i?.hasRow(v)?(l.set(v,~m),f.push(v)):l.set(v,m)}const p=f.length;return p===0?a===r.length?r:cz(r,l,f):(f.sort((m,v)=>e.compareRowNodes(o,m,v)||~l.get(m)-~l.get(v)),p===a?f:lz(e,o,f,r,l,a))},lz=(e,t,n,i,o,r)=>{const s=new Array(r);let a=0,l=n[a],u,h=-1,f=0,p=0;const m=n.length,v=i.length;for(;;){if(h<0){if(f>=v)break;if(u=i[f++],h=o.get(u)??-1,h<0)continue}if((e.compareRowNodes(t,l,u)||~o.get(l)-h)<0){if(s[p++]=l,++a>=m)break;l=n[a]}else s[p++]=u,h=-1}for(;a<m;)s[p++]=n[a++];if(h<0)return s;for(s[p++]=u;f<v;){const w=i[f++];o.get(w)>=0&&(s[p++]=w)}return s},cz=(e,t,n)=>{let i=0;n.length=t.size;for(let o=0,r=e.length;o<r;++o){const s=e[o];t.has(s)&&(n[i++]=s)}return n.length=i,n},cx=e=>{const t=e.childrenAfterSort,n=e.sibling;if(n&&(n.childrenAfterSort=t),!!t)for(let i=0,o=t.length-1;i<=o;i++){const r=t[i],s=i===0,a=i===o;r.firstChild!==s&&(r.firstChild=s,r.dispatchRowEvent("firstChildChanged")),r.lastChild!==a&&(r.lastChild=a,r.dispatchRowEvent("lastChildChanged")),r.childIndex!==i&&(r.childIndex=i,r.dispatchRowEvent("childIndexChanged"))}},uz=class extends X{constructor(){super(...arguments),this.beanName="sortStage",this.step="sort",this.refreshProps=["postSortRows","groupDisplayType","accentedSort"]}execute(e,t){const n=this.beans.sortSvc.getSortOptions(),i=n.length>0&&!!t&&this.gos.get("deltaSort"),{gos:o,colModel:r,rowGroupColsSvc:s,rowNodeSorter:a,rowRenderer:l,showRowGroupCols:u}=this.beans,h=o.get("groupMaintainOrder"),f=r.getCols().some(R=>R.isRowGroupActive()),p=s?.columns,m=r.isPivotMode(),v=o.getCallback("postSortRows");let w=!1,b;const y=R=>{const S=m&&R.leafGroup;let P=h&&f&&!R.leafGroup;P&&(b??(b=this.shouldSortContainsGroupCols(n)),P&&(P=!b));let F=null;if(P){let I=!1;if(p){const L=R.level+1;L<p.length&&(I=p[L].wasSortExplicitlyRemoved)}I||(F=dz(R))}else!n.length||S||(i&&t?F=az(a,R,t,e,n):F=a.doFullSortInPlace(R.childrenAfterAggFilter.slice(),n));if(F||(F=R.childrenAfterAggFilter?.slice()??[]),w||(w=R.childrenAfterSort?.[0]!==F[0]),R.childrenAfterSort=F,cx(R),v){const I={nodes:R.childrenAfterSort};v(I)}};if(Zs(this.beans.rowModel.rootNode,this.beans.rowModel.hierarchical,e,y),w&&o.get("groupHideOpenParents")){const R=u?.columns;R?.length&&l.refreshCells({columns:R,force:!0})}}shouldSortContainsGroupCols(e){const t=e.length;if(!t)return!1;if(tr(this.gos)){for(let n=0;n<t;++n){const i=e[n].column;if(i.isPrimary()&&i.isRowGroupActive())return!0}return!1}for(let n=0;n<t;++n)if(e[n].column.getColDef().showRowGroup)return!0;return!1}},dz=e=>{const t=e.childrenAfterSort,n=e.childrenAfterAggFilter,i=t?.length,o=n?.length;if(!i||!o)return null;const r=new Array(o),s=new Set;for(let l=0;l<o;++l)s.add(n[l]);let a=0;for(let l=0;l<i;++l){const u=t[l];s.delete(u)&&(r[a++]=u)}if(s.size===0&&a===i)return t;for(const l of s)r[a++]=l;return r.length=a,r},hz=class extends X{constructor(){super(...arguments),this.beanName="rowModel",this.rootNode=null,this.rowCountReady=!1,this.hierarchical=!1,this.nodeManager=void 0,this.rowsToDisplay=[],this.formulaRows=[],this.stages=null,this.asyncTransactions=null,this.asyncTransactionsTimer=0,this.started=!1,this.refreshingData=!1,this.rowDataUpdatedPending=!1,this.refreshingModel=!1,this.pendingNewData=!1,this.noKeepRenderedRows=!1,this.noKeepUndoRedoStack=!1,this.noAnimate=!1,this.rowNodesCountReady=!1,this.stagesRefreshProps=new Map,this.onRowHeightChanged_debounced=hn(this,this.onRowHeightChanged.bind(this),100)}postConstruct(){const e=this.beans,t=new $r(e);this.rootNode=t,this.nodeManager=this.createBean(new JW(t));const n=()=>{this.beans.groupStage?.invalidateGroupCols(),this.refreshModel({step:"group",afterColumnsChanged:!0,keepRenderedRows:!0,animate:!this.gos.get("suppressAnimationFrame")})};this.addManagedEventListeners({newColumnsLoaded:n,columnRowGroupChanged:n,columnValueChanged:this.onValueChanged.bind(this),columnPivotChanged:()=>this.refreshModel({step:"pivot"}),columnPivotModeChanged:()=>this.refreshModel({step:"group"}),filterChanged:this.onFilterChanged.bind(this),sortChanged:this.onSortChanged.bind(this),stylesChanged:this.onGridStylesChanges.bind(this),gridReady:this.onGridReady.bind(this),rowExpansionStateChanged:this.onRowGroupOpened.bind(this)}),this.addPropertyListeners()}addPropertyListeners(){const{beans:e,stagesRefreshProps:t}=this,n=[e.groupStage,e.filterStage,e.pivotStage,e.aggStage,e.sortStage,e.filterAggStage,e.flattenStage].filter(i=>!!i);this.stages=n;for(let i=n.length-1;i>=0;--i){const o=n[i];for(const r of o.refreshProps)t.set(r,i)}this.addManagedPropertyListeners([...t.keys(),"rowData"],i=>{const o=i.changeSet?.properties;o&&this.onPropChange(o)}),this.addManagedPropertyListener("rowHeight",()=>this.resetRowHeights())}start(){this.started=!0,this.rowNodesCountReady?this.refreshModel({step:"group",rowDataUpdated:!0,newData:!0}):this.setInitialData()}setInitialData(){this.gos.get("rowData")&&this.onPropChange(["rowData"])}ensureRowHeightsValid(e,t,n,i){let o,r=!1;do{o=!1;const s=this.getRowIndexAtPixel(e),a=this.getRowIndexAtPixel(t),l=Math.max(s,n),u=Math.min(a,i);for(let h=l;h<=u;h++){const f=this.getRow(h);if(f.rowHeightEstimated){const p=Gr(this.beans,f);f.setRowHeight(p.height),o=!0,r=!0}}o&&this.setRowTopAndRowIndex()}while(o);return r}onPropChange(e){const{nodeManager:t,gos:n,beans:i}=this,o=i.groupStage;if(!t)return;const r=new Set(e),s=o?.onPropChange(r);let a;r.has("rowData")?a=n.get("rowData"):s&&(a=o?.extractData()),a&&!Array.isArray(a)&&(a=null,se(1));const l={step:"nothing",changedProps:r};if(a){const h=!s&&!this.isEmpty()&&a.length>0&&n.exists("getRowId")&&!n.get("resetRowDataOnUpdate");this.refreshingData=!0,h?(l.keepRenderedRows=!0,l.animate=!n.get("suppressAnimationFrame"),l.changedRowNodes=new ch,t.setImmutableRowData(l,a)):(l.rowDataUpdated=!0,l.newData=!0,t.setNewRowData(a),this.rowNodesCountReady=!0)}const u=l.rowDataUpdated?"group":this.getRefreshedStage(e);u&&(l.step=u,this.refreshModel(l))}getRefreshedStage(e){const{stages:t,stagesRefreshProps:n}=this;if(!t)return null;const i=t.length;let o=i;for(let r=0,s=e.length;r<s&&o;++r)o=Math.min(o,n.get(e[r])??o);return o<i?t[o].step:null}setRowTopAndRowIndex(e){const{beans:t,rowsToDisplay:n}=this,i=t.environment.getDefaultRowHeight();let o=0;const r=yn(this.gos,"normal");for(let s=0,a=n.length;s<a;++s){const l=n[s],u=l.id;if(u!=null&&e?.add(u),l.rowHeight==null){const h=Gr(t,l,r,i);l.setRowHeight(h.height,h.estimated)}l.setRowTop(o),l.setRowIndex(s),o+=l.rowHeight}if(this.beans.formula?.active){const s=this.formulaRows;for(let a=0,l=s.length;a<l;++a){const u=s[a];u.formulaRowIndex=a}}}clearRowTopAndRowIndex(e,t){const n=r=>{r?.id!=null&&!t.has(r.id)&&r.clearRowTopAndRowIndex()},i=r=>{n(r),n(r.detailNode),n(r.sibling);const s=r.childrenAfterGroup;if(!(!r.hasChildren()||!s)&&!(e&&r.level!==-1&&!r.expanded))for(let a=0,l=s.length;a<l;++a)i(s[a])},o=this.rootNode;o&&i(o)}isLastRowIndexKnown(){return!0}getRowCount(){return this.rowsToDisplay.length}getTopLevelRowCount(){const{rootNode:e,rowsToDisplay:t}=this;if(!e||!t.length)return 0;if(t[0]===e)return 1;const i=e.sibling?.displayed?1:0;return(e.childrenAfterSort?.length??0)+i}getTopLevelRowDisplayedIndex(e){const{beans:t,rootNode:n,rowsToDisplay:i}=this;if(!n||!i.length||i[0]===n)return e;const r=n.childrenAfterSort,s=l=>{let u=r[l];if(this.gos.get("groupHideOpenParents"))for(;u.expanded&&u.childrenAfterSort&&u.childrenAfterSort.length>0;)u=u.childrenAfterSort[0];return u.rowIndex},a=t.footerSvc;return a?a?.getTopDisplayIndex(i,e,r,s):s(e)}getTopLevelIndexFromDisplayedIndex(e){const{rootNode:t,rowsToDisplay:n}=this;if(!t||!n.length||n[0]===t)return e;let o=this.getRow(e);o.footer&&(o=o.sibling);let r=o.parent;for(;r&&r!==t;)o=r,r=o.parent;const s=t.childrenAfterSort?.indexOf(o)??-1;return s>=0?s:e}getRowBounds(e){const t=this.rowsToDisplay[e];return t?{rowTop:t.rowTop,rowHeight:t.rowHeight}:null}onRowGroupOpened(){this.refreshModel({step:"map",keepRenderedRows:!0,animate:za(this.gos)})}onFilterChanged({afterDataChange:e,columns:t}){if(!e){const i=t.length===0||t.some(o=>o.isPrimary())?"filter":"filter_aggregates";this.refreshModel({step:i,keepRenderedRows:!0,animate:za(this.gos)})}}onSortChanged(){this.refreshModel({step:"sort",keepRenderedRows:!0,animate:za(this.gos)})}getType(){return"clientSide"}onValueChanged(){this.refreshModel({step:this.beans.colModel.isPivotActive()?"pivot":"aggregate"})}isSuppressModelUpdateAfterUpdateTransaction(e){if(!this.gos.get("suppressModelUpdateAfterUpdateTransaction"))return!1;const{changedRowNodes:t,newData:n,rowDataUpdated:i}=e;return!(!t||n||!i||t.removals.length||t.adds.size)}reMapRows(){if(this.refreshingModel||this.refreshingData){this.noKeepRenderedRows=!0,this.noKeepUndoRedoStack=!0,this.noAnimate=!0;return}this.refreshModel({step:"map",keepRenderedRows:!1,keepUndoRedoStack:!1,animate:!1})}refreshModel(e){const{nodeManager:t,eventSvc:n,started:i}=this;if(!t)return;const o=!!e.rowDataUpdated;if(i&&o&&n.dispatchEvent({type:"rowDataUpdated"}),this.deferRefresh(e)){this.setPendingRefreshFlags(e),this.rowDataUpdatedPending||(this.rowDataUpdatedPending=o);return}this.rowDataUpdatedPending&&(this.rowDataUpdatedPending=!1,e.step="group"),this.updateRefreshParams(e);let r=!1;this.refreshingModel=!0;try{this.executeRefresh(e,o),r=!0}finally{this.refreshingData=!1,this.refreshingModel=!1,r||this.setPendingRefreshFlags(e)}this.clearPendingRefreshFlags(),n.dispatchEvent({type:"modelUpdated",animate:e.animate,keepRenderedRows:e.keepRenderedRows,newData:e.newData,newPage:!1,keepUndoRedoStack:e.keepUndoRedoStack})}executeRefresh(e,t){const{beans:n,rootNode:i}=this;n.masterDetailSvc?.refreshModel(e),t&&e.step!=="group"&&n.colFilter?.refreshModel();let o=e.changedPath;switch(o?.addRow(i),e.step==="group"&&(this.doGrouping(i,e),o??(o=e.changedPath)),o??(o=n.changedPathFactory?.ensureRowsPath(e,i)),e.step){case"group":case"filter":this.doFilter(o);case"pivot":this.doPivot(o)&&(o=void 0,e.changedPath=void 0);case"aggregate":this.doAggregate(o);case"filter_aggregates":this.doFilterAggregates(o);case"sort":this.doSort(o,e.changedRowNodes);case"map":this.doRowsToDisplay()}const r=new Set;this.setRowTopAndRowIndex(r),this.clearRowTopAndRowIndex(o,r),this.updateRefreshParams(e)}deferRefresh(e){return this.refreshingModel||this.beans.colModel.changeEventsDispatching?!0:this.isSuppressModelUpdateAfterUpdateTransaction(e)?(this.started&&(this.refreshingData=!1),!0):!this.started}setPendingRefreshFlags(e){this.pendingNewData||(this.pendingNewData=!!e.newData),this.noKeepRenderedRows||(this.noKeepRenderedRows=!e.keepRenderedRows),this.noKeepUndoRedoStack||(this.noKeepUndoRedoStack=!e.keepUndoRedoStack),this.noAnimate||(this.noAnimate=!e.animate)}clearPendingRefreshFlags(){this.pendingNewData=!1,this.noKeepRenderedRows=!1,this.noKeepUndoRedoStack=!1,this.noAnimate=!1}updateRefreshParams(e){e.newData=this.pendingNewData||!!e.newData,e.keepRenderedRows=!this.noKeepRenderedRows&&!!e.keepRenderedRows,e.keepUndoRedoStack=!this.noKeepUndoRedoStack&&!!e.keepUndoRedoStack,e.animate=!this.noAnimate&&!!e.animate}isEmpty(){return!this.rootNode?._leafs?.length||!this.beans.colModel?.ready}isRowsToRender(){return this.rowsToDisplay.length>0}getOverlayType(){const{beans:e,gos:t}=this;if(this.rootNode?._leafs?.length){if(e.filterManager?.isAnyFilterPresent()&&this.getRowCount()===0)return"noMatchingRows"}else if(this.rowCountReady||(t.get("rowData")?.length??0)==0)return"noRows";return null}getNodesInRangeForSelection(e,t){let n=!1,i=!1;const o=[],r=yc(this.gos);return this.forEachNodeAfterFilterAndSort(s=>{if(i)return;if(n&&(s===t||s===e)&&(i=!0,r&&s.group)){ux(o,s);return}if(!n){if(s!==t&&s!==e)return;n=!0,t===e&&(i=!0)}(!s.group||!r)&&o.push(s)}),o}getTopLevelNodes(){return this.rootNode?.childrenAfterGroup??null}getRow(e){return this.rowsToDisplay[e]}getFormulaRow(e){return this.formulaRows[e]}isRowPresent(e){return this.rowsToDisplay.indexOf(e)>=0}getRowIndexAtPixel(e){const t=this.rowsToDisplay,n=t.length;if(this.isEmpty()||n===0)return-1;let i=0,o=n-1;if(e<=0)return 0;if(t[o].rowTop<=e)return o;let s=-1,a=-1;for(;;){const l=Math.floor((i+o)/2),u=t[l];if(this.isRowInPixel(u,e)||(u.rowTop<e?i=l+1:u.rowTop>e&&(o=l-1),s===i&&a===o))return l;s=i,a=o}}isRowInPixel(e,t){const n=e.rowTop,i=n+e.rowHeight;return n<=t&&i>t}forEachLeafNode(e){const t=this.rootNode?._leafs;if(t)for(let n=0,i=t.length;n<i;++n)e(t[n],n)}forEachNode(e,t=!1){this.depthFirstSearchRowNodes(e,t)}forEachDisplayedNode(e){const t=this.rowsToDisplay;for(let n=0,i=t.length;n<i;++n)e(t[n],n)}forEachNodeAfterFilter(e,t=!1){this.depthFirstSearchRowNodes(e,t,n=>n.childrenAfterAggFilter)}forEachNodeAfterFilterAndSort(e,t=!1){this.depthFirstSearchRowNodes(e,t,n=>n.childrenAfterSort)}forEachPivotNode(e,t,n){const{colModel:i,rowGroupColsSvc:o}=this.beans;if(!i.isPivotMode())return;if(!o?.columns.length){e(this.rootNode,0);return}const r=n?"childrenAfterSort":"childrenAfterGroup";this.depthFirstSearchRowNodes(e,t,s=>s.leafGroup?null:s[r])}depthFirstSearchRowNodes(e,t=!1,n=r=>r.childrenAfterGroup,i=this.rootNode,o=0){let r=o;if(!i)return r;const s=i===this.rootNode;if(s||e(i,r++),i.hasChildren()&&!i.footer){const a=s||this.hierarchical?n(i):null;if(a){const l=this.beans.footerSvc;r=l?.addTotalRows(r,i,e,t,s,"top")??r;for(const u of a)r=this.depthFirstSearchRowNodes(e,t,n,u,r);return l?.addTotalRows(r,i,e,t,s,"bottom")??r}}return r}doAggregate(e){this.rootNode&&this.beans.aggStage?.execute(e)}doFilterAggregates(e){const t=this.rootNode,n=this.beans.filterAggStage;if(n&&this.hierarchical){n.execute(e);return}t.childrenAfterAggFilter=t.childrenAfterFilter;const i=t.sibling;i&&(i.childrenAfterAggFilter=t.childrenAfterFilter)}doSort(e,t){const n=this.beans.sortStage;if(n){n.execute(e,t);return}Zs(this.rootNode,this.hierarchical,e,i=>{i.childrenAfterSort=i.childrenAfterAggFilter.slice(0),cx(i)})}doGrouping(e,t){const i=this.beans.groupStage?.execute(t);if(i===void 0){const o=e._leafs;e.childrenAfterGroup=o,e.updateHasChildren();const r=e.sibling;r&&(r.childrenAfterGroup=o)}(i||t.rowDataUpdated)&&this.beans.colFilter?.refreshModel(),!this.rowCountReady&&this.rowNodesCountReady&&(this.rowCountReady=!0,this.eventSvc.dispatchEventOnce({type:"rowCountReady"}))}doFilter(e){const t=this.beans.filterStage;if(t){t.execute(e);return}Zs(this.rootNode,this.hierarchical,e,n=>{n.childrenAfterFilter=n.childrenAfterGroup,ov(n)})}doPivot(e){return this.beans.pivotStage?.execute(e)??!1}getRowNode(e){const t=this.nodeManager?.getRowNode(e);return typeof t=="object"?t:this.beans.groupStage?.getNonLeaf(e)}batchUpdateRowData(e,t){if(!this.asyncTransactionsTimer){this.asyncTransactions=[];const n=this.gos.get("asyncTransactionWaitMillis");this.asyncTransactionsTimer=setTimeout(()=>this.executeBatchUpdateRowData(),n)}this.asyncTransactions.push({rowDataTransaction:e,callback:t})}flushAsyncTransactions(){const e=this.asyncTransactionsTimer;e&&(clearTimeout(e),this.executeBatchUpdateRowData())}executeBatchUpdateRowData(){const{nodeManager:e,beans:t,eventSvc:n,asyncTransactions:i}=this;if(!e)return;t.valueCache?.onDataChanged();const o=[],r=[],s=new ch,a=!this.gos.get("suppressAnimationFrame");for(const{rowDataTransaction:l,callback:u}of i??[]){this.rowNodesCountReady=!0,this.refreshingData=!0;const h=e.updateRowData(l,s,a);o.push(h),u&&r.push(u.bind(null,h))}this.commitTransactions(s,a),r.length>0&&setTimeout(()=>{for(let l=0,u=r.length;l<u;l++)r[l]()},0),o.length>0&&n.dispatchEvent({type:"asyncTransactionsFlushed",results:o}),this.asyncTransactionsTimer=0,this.asyncTransactions=null}updateRowData(e){const t=this.nodeManager;if(!t)return null;this.beans.valueCache?.onDataChanged(),this.rowNodesCountReady=!0;const n=new ch,i=!this.gos.get("suppressAnimationFrame");this.refreshingData=!0;const o=t.updateRowData(e,n,i);return this.commitTransactions(n,i),o}commitTransactions(e,t){this.refreshModel({step:"group",rowDataUpdated:!0,keepRenderedRows:!0,animate:t,changedRowNodes:e})}doRowsToDisplay(){const{rootNode:e,beans:t}=this;if(t.formula?.active){const o=e?.childrenAfterSort??[];this.formulaRows=o,this.rowsToDisplay=o.filter(r=>!r.softFiltered);for(const r of this.rowsToDisplay)r.setUiLevel(0);return}const n=t.flattenStage;if(n){this.rowsToDisplay=n.execute();return}const i=this.rootNode.childrenAfterSort??[];for(const o of i)o.setUiLevel(0);this.rowsToDisplay=i}onRowHeightChanged(){this.refreshModel({step:"map",keepRenderedRows:!0,keepUndoRedoStack:!0})}resetRowHeights(){const e=this.rootNode;if(!e)return;const t=this.resetRowHeightsForAllRowNodes();e.setRowHeight(e.rowHeight,!0);const n=e.sibling;n?.setRowHeight(n.rowHeight,!0),t&&this.onRowHeightChanged()}resetRowHeightsForAllRowNodes(){let e=!1;return this.forEachNode(t=>{t.setRowHeight(t.rowHeight,!0);const n=t.detailNode;n?.setRowHeight(n.rowHeight,!0);const i=t.sibling;i?.setRowHeight(i.rowHeight,!0),e=!0}),e}onGridStylesChanges(e){e.rowHeightChanged&&!this.beans.rowAutoHeight?.active&&this.resetRowHeights()}onGridReady(){this.started||this.setInitialData()}destroy(){super.destroy(),this.nodeManager=this.destroyBean(this.nodeManager),this.started=!1,this.rootNode=null,this.rowsToDisplay=[],this.asyncTransactions=null,this.stages=null,this.stagesRefreshProps.clear(),clearTimeout(this.asyncTransactionsTimer)}onRowHeightChangedDebounced(){this.onRowHeightChanged_debounced()}},ux=(e,t)=>{const n=t.childrenAfterGroup;if(n)for(let i=0,o=n.length;i<o;++i){const r=n[i];r.data&&e.push(r),r.group&&ux(e,r)}};function fz(e){e.expansionSvc?.onGroupExpandedOrCollapsed()}function pz(e,t){const n=Eo(e);n&&((!t||t==="everything")&&(t="group"),n.refreshModel({step:t,keepRenderedRows:!0,animate:!e.gos.get("suppressAnimationFrame")}))}function gz(e){return Eo(e)?.isEmpty()??!0}function mz(e,t){Eo(e)?.forEachLeafNode(t)}function vz(e,t){Eo(e)?.forEachNodeAfterFilter(t)}function Cz(e,t){Eo(e)?.forEachNodeAfterFilterAndSort(t)}function wz(e,t){return e.frameworkOverrides.wrapIncoming(()=>Eo(e)?.updateRowData(t))}function bz(e,t,n){e.frameworkOverrides.wrapIncoming(()=>Eo(e)?.batchUpdateRowData(t,n))}function yz(e){e.frameworkOverrides.wrapIncoming(()=>Eo(e)?.flushAsyncTransactions())}function Sz(e){return e.selectionSvc?.getBestCostNodeSelection()}var Rz={moduleName:"ClientSideRowModel",version:ve,rowModels:["clientSide"],beans:[hz,uz],dependsOn:[UF]},Fz={moduleName:"ClientSideRowModelApi",version:ve,apiFunctions:{onGroupExpandedOrCollapsed:fz,refreshClientSideRowModel:pz,isRowDataEmpty:gz,forEachLeafNode:mz,forEachNodeAfterFilter:vz,forEachNodeAfterFilterAndSort:Cz,applyTransaction:wz,applyTransactionAsync:bz,flushAsyncTransactions:yz,getBestCostNodeSelection:Sz,resetRowHeights:sx,onRowHeightChanged:rx},dependsOn:[YW,ZW]},xz=":where(.ag-ltr) :where(.ag-animate-autosize){.ag-cell,.ag-header-cell,.ag-header-group-cell{transition:width .2s ease-in-out,left .2s ease-in-out}}:where(.ag-rtl) :where(.ag-animate-autosize){.ag-cell,.ag-header-cell,.ag-header-group-cell{transition:width .2s ease-in-out,right .2s ease-in-out}}";function Pz(e,t){typeof t=="number"?e.colAutosize?.sizeColumnsToFit(t,"api"):e.colAutosize?.sizeColumnsToFitGridBody(t)}function dx({colAutosize:e,visibleCols:t},n,i){Array.isArray(n)?e?.autoSizeCols({colKeys:n,skipHeader:i,source:"api"}):e?.autoSizeCols({...n,colKeys:n.colIds??t.allCols,source:"api"})}function Ez(e,t){t&&typeof t=="object"?dx(e,t):e.colAutosize?.autoSizeAllColumns({source:"api",skipHeader:t})}var Dz=class extends X{constructor(){super(...arguments),this.beanName="colAutosize",this.timesDelayed=0,this.shouldQueueResizeOperations=!1,this.resizeOperationQueue=[]}postConstruct(){const{gos:e}=this,t=e.get("autoSizeStrategy");if(t){let n=!1;const i=t.type;if(i==="fitGridWidth"||i==="fitProvidedWidth")n=!0;else if(i==="fitCellContents"){this.addManagedEventListeners({firstDataRendered:()=>this.onFirstDataRendered(t)});const o=e.get("rowData");n=o!=null&&o.length>0&&Yt(e)}n&&this.beans.colDelayRenderSvc?.hideColumns(i)}}autoSizeCols(e){const{eventSvc:t,visibleCols:n,colModel:i}=this.beans;Bc(this.beans,!0),this.innerAutoSizeCols(e).then(o=>{const r=h=>tl(t,Array.from(h),!0,"autosizeColumns");if(!e.scaleUpToFitGridWidth)return Bc(this.beans,!1),r(o);const s=hx(this.beans),a=h=>n.leftCols.some(f=>Sc(f,h)),l=h=>n.rightCols.some(f=>Sc(f,h)),u=e.colKeys.filter(h=>!i.getCol(h)?.getColDef().suppressAutoSize&&!zn(h)&&!a(h)&&!l(h));this.sizeColumnsToFit(s,e.source,!0,{defaultMaxWidth:e.defaultMaxWidth,defaultMinWidth:e.defaultMinWidth,columnLimits:e.columnLimits?.map(h=>({...h,key:h.colId})),colKeys:u,onlyScaleUp:!0,animate:!1}),Bc(this.beans,!1),r(o)})}innerAutoSizeCols(e){return new Promise((t,n)=>{if(this.shouldQueueResizeOperations)return this.pushResizeOperation(()=>this.innerAutoSizeCols(e).then(t,n));const{colKeys:i,skipHeader:o,skipHeaderGroups:r,stopAtGroup:s,defaultMaxWidth:a,defaultMinWidth:l,columnLimits:u=[],source:h="api"}=e,{animationFrameSvc:f,renderStatus:p,colModel:m,autoWidthCalc:v,visibleCols:w}=this.beans;if(f?.flushAllFrames(),this.timesDelayed<5&&p&&(!p.areHeaderCellsRendered()||!p.areCellsRendered())){this.timesDelayed++,setTimeout(()=>{this.isAlive()&&this.innerAutoSizeCols(e).then(t,n)});return}this.timesDelayed=0;const b=new Set;let y=-1;const R=Object.fromEntries(u.map(({colId:F,...I})=>[F,I])),S=o??this.gos.get("skipHeaderOnAutoSize"),P=r??S;for(;y!==0;){y=0;const F=[];for(const I of i){if(!I||zO(I))continue;const L=m.getCol(I);if(!L||b.has(L)||L.getColDef().suppressAutoSize)continue;const V=v.getPreferredWidthForColumn(L,S);if(V>0){const G=R[L.colId]??{};G.minWidth??(G.minWidth=l),G.maxWidth??(G.maxWidth=a);const _=Tz(L,V,G);L.setActualWidth(_,h),b.add(L),y++}F.push(L)}F.length&&w.refresh(h)}P||this.autoSizeColumnGroupsByColumns(i,h,s),t(b)})}autoSizeColumn(e,t,n){this.autoSizeCols({colKeys:[e],skipHeader:n,skipHeaderGroups:!0,source:t})}autoSizeColumnGroupsByColumns(e,t,n){const{colModel:i,ctrlsSvc:o}=this.beans,r=new Set,s=i.getColsForKeys(e);for(const l of s){let u=l.getParent();for(;u&&u!=n;)u.isPadding()||r.add(u),u=u.getParent()}let a;for(const l of r){for(const u of o.getHeaderRowContainerCtrls())if(a=u.getHeaderCtrlForColumn(l),a)break;a?.resizeLeafColumnsToFit(t)}}autoSizeAllColumns(e){if(this.shouldQueueResizeOperations){this.pushResizeOperation(()=>this.autoSizeAllColumns(e));return}this.autoSizeCols({colKeys:this.beans.visibleCols.allCols,...e})}addColumnAutosizeListeners(e,t){const n=this.gos.get("skipHeaderOnAutoSize"),i=()=>{this.autoSizeColumn(t,"uiColumnResized",n)};e.addEventListener("dblclick",i);const o=new Ws(e);return o.addEventListener("doubleTap",i),()=>{e.removeEventListener("dblclick",i),o.destroy()}}addColumnGroupResize(e,t,n){const i=this.gos.get("skipHeaderOnAutoSize"),o=()=>{const r=[],s=t.getDisplayedLeafColumns();for(const a of s)a.getColDef().suppressAutoSize||r.push(a.getColId());r.length>0&&this.autoSizeCols({colKeys:r,skipHeader:i,stopAtGroup:t,source:"uiColumnResized"}),n()};return e.addEventListener("dblclick",o),()=>e.removeEventListener("dblclick",o)}sizeColumnsToFitGridBody(e,t){if(!this.isAlive())return;const n=hx(this.beans);if(n>0){this.sizeColumnsToFit(n,"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):se(29)}sizeColumnsToFit(e,t="sizeColumnsToFit",n,i){if(this.shouldQueueResizeOperations){this.pushResizeOperation(()=>this.sizeColumnsToFit(e,t,n,i));return}const{beans:o}=this,r=i?.animate??!0;r&&Bc(o,!0);const s={};for(const{key:y,...R}of i?.columnLimits??[])s[typeof y=="string"?y:y.getColId()]=R;const a=o.visibleCols.allCols;if(e<=0||!a.length)return;const l=rr(a);if(i?.onlyScaleUp&&l>e||e===l&&a.every(R=>{if(R.colDef.suppressSizeToFit)return!0;const S=s?.[R.getId()],P=S?.minWidth??i?.defaultMinWidth,F=S?.maxWidth??i?.defaultMaxWidth,I=R.getActualWidth();return(P==null||I>=P)&&(F==null||I<=F)}))return;const h=[],f=[];for(const y of a){const R=i?.colKeys?.some(S=>Sc(y,S))??!0;y.getColDef().suppressSizeToFit||!R?f.push(y):h.push(y)}const p=h.slice(0);let m=!1;const v=y=>{Ro(h,y),f.push(y)},w={};for(const y of h){i?.onlyScaleUp&&(w[y.getColId()]=y.getActualWidth()),y.resetActualWidth(t);const R=s?.[y.getId()],S=R?.minWidth??i?.defaultMinWidth??-1/0,P=R?.maxWidth??i?.defaultMaxWidth??1/0,F=y.getActualWidth(),I=Math.max(Math.min(F,P),S);I!=F&&y.setActualWidth(I,t,!0)}for(;!m;){m=!0;const y=e-rr(f);if(y<=0)for(const R of h){const S=s?.[R.getId()]?.minWidth??i?.defaultMinWidth??R.minWidth;R.setActualWidth(S,t,!0)}else{const R=y/rr(h);let S=y;for(let P=h.length-1;P>=0;P--){const F=h[P],I=F.getColId(),L=w[I],V=s?.[I],G=V?.minWidth??i?.defaultMinWidth??L,_=V?.maxWidth??i?.defaultMaxWidth,A=Math.max(G??-1/0,F.getMinWidth()),T=Math.min(_??1/0,F.getMaxWidth());let k=Math.round(F.getActualWidth()*R);k<A?(k=A,v(F),m=!1):k>T?(k=T,v(F),m=!1):P===0&&(k=S),F.setActualWidth(k,t,!0),S-=k}}}for(const y of p)y.fireColumnWidthChangedEvent(t);const b=o.visibleCols;b.setLeftValues(t),b.updateBodyWidths(),!n&&(tl(this.eventSvc,p,!0,t),r&&Bc(o,!1))}applyAutosizeStrategy(){const{gos:e,colDelayRenderSvc:t}=this.beans,n=e.get("autoSizeStrategy");n?.type!=="fitGridWidth"&&n?.type!=="fitProvidedWidth"||setTimeout(()=>{if(!this.isAlive())return;const i=n.type;if(i==="fitGridWidth"){const{columnLimits:o,defaultMinWidth:r,defaultMaxWidth:s}=n,a=o?.map(({colId:l,minWidth:u,maxWidth:h})=>({key:l,minWidth:u,maxWidth:h}));this.sizeColumnsToFitGridBody({defaultMinWidth:r,defaultMaxWidth:s,columnLimits:a})}else i==="fitProvidedWidth"&&this.sizeColumnsToFit(n.width,"sizeColumnsToFit");t?.revealColumns(i)})}onFirstDataRendered({colIds:e,...t}){setTimeout(()=>{if(!this.isAlive())return;const n="autosizeColumns";e?this.autoSizeCols({...t,source:n,colKeys:e}):this.autoSizeAllColumns({...t,source:n}),this.beans.colDelayRenderSvc?.revealColumns(t.type)})}processResizeOperations(){this.shouldQueueResizeOperations=!1;for(const e of this.resizeOperationQueue)e();this.resizeOperationQueue=[]}pushResizeOperation(e){this.resizeOperationQueue.push(e)}destroy(){this.resizeOperationQueue.length=0,super.destroy()}};function Tz(e,t,n={}){const i=n.minWidth??e.getMinWidth();t<i&&(t=i);const o=n.maxWidth??e.getMaxWidth();return t>o&&(t=o),t}function hx({ctrlsSvc:e,scrollVisibleSvc:t}){const n=e.getGridBodyCtrl(),o=n.isVerticalScrollShowing()?t.getScrollbarWidth():0;return hc(n.eGridBody)-o}var fx="ag-animate-autosize";function Bc({ctrlsSvc:e,gos:t},n){if(!t.get("animateColumnResizing")||t.get("enableRtl")||!e.isAlive())return;const i=e.getGridBodyCtrl().eGridBody.classList;n?i.add(fx):i.remove(fx)}var Az={moduleName:"ColumnAutoSize",version:ve,beans:[Dz],apiFunctions:{sizeColumnsToFit:Pz,autoSizeColumns:dx,autoSizeAllColumns:Ez},dependsOn:[jR],css:[xz]};function Iz(e,t){return!!e.colHover?.isHovered(t)}var Mz=class extends X{constructor(e,t){super(),this.columns=e,this.element=t,this.destroyManagedListeners=[],this.enableFeature=n=>{const{beans:i,gos:o,element:r,columns:s}=this,a=i.colHover;if(n??!!o.get("columnHoverHighlight"))this.destroyManagedListeners=this.addManagedElementListeners(r,{mouseover:a.setMouseOver.bind(a,s),mouseout:a.clearMouseOver.bind(a)});else{for(const u of this.destroyManagedListeners)u();this.destroyManagedListeners=[]}}}postConstruct(){this.addManagedPropertyListener("columnHoverHighlight",({currentValue:e})=>{this.enableFeature(e)}),this.enableFeature()}destroy(){super.destroy(),this.destroyManagedListeners=null}},kz="ag-column-hover",Lz=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,n){const i=()=>{const o=this.isHovered(n);t.toggleCss("ag-column-hover",o)};e.addManagedEventListeners({columnHoverChanged:i}),i()}onCellColumnHover(e,t){if(!t)return;const n=this.isHovered(e);t.toggleCss(kz,n)}addHeaderFilterColumnHoverListener(e,t,n,i){this.createHoverFeature(e,[n],i);const o=()=>{const r=this.isHovered(n);t.toggleCss("ag-column-hover",r)};e.addManagedEventListeners({columnHoverChanged:o}),o()}createHoverFeature(e,t,n){e.createManagedBean(new Mz(t,n))}updateState(e){this.selectedColumns=e,this.eventSvc.dispatchEvent({type:"columnHoverChanged"})}},Oz={moduleName:"ColumnHover",version:ve,beans:[Lz],apiFunctions:{isColumnHovered:Iz}},_z=class extends X{constructor(){super(...arguments),this.beanName="gridSerializer"}wireBeans(e){this.visibleCols=e.visibleCols,this.colModel=e.colModel,this.rowModel=e.rowModel,this.pinnedRowModel=e.pinnedRowModel}serialize(e,t={}){const{allColumns:n,columnKeys:i,skipRowGroups:o,exportRowNumbers:r}=t,s=this.getColumnsToExport({allColumns:n,skipRowGroups:o,columnKeys:i,exportRowNumbers:r});return[this.prepareSession(s),this.prependContent(t),this.exportColumnGroups(t,s),this.exportHeaders(t,s),this.processPinnedTopRows(t,s),this.processRows(t,s),this.processPinnedBottomRows(t,s),this.appendContent(t)].reduce((a,l)=>l(a),e).parse()}processRow(e,t,n,i){const o=t.shouldRowBeSkipped||(()=>!1),s=t.rowPositions!=null||!!t.onlySelected,a=this.gos.get("groupHideOpenParents")&&!s,l=this.colModel.isPivotMode()?i.leafGroup:!i.group,u=!!i.footer,h=i.allChildrenCount===1&&i.childrenAfterGroup?.length===1&&pO(this.gos,i);if(!l&&!u&&(t.skipRowGroups||h||a)||t.onlySelected&&!i.isSelected()||t.skipPinnedTop&&i.rowPinned==="top"||t.skipPinnedBottom&&i.rowPinned==="bottom"||i.stub||i.level===-1&&!l&&!u||o(We(this.gos,{node:i})))return;const m=e.onNewBodyRow(i);if(n.forEach((v,w)=>{m.onColumn(v,w,i)}),t.getCustomContentBelowRow){const v=t.getCustomContentBelowRow(We(this.gos,{node:i}));v&&e.addCustomContent(v)}}appendContent(e){return t=>{const n=e.appendContent;return n&&t.addCustomContent(n),t}}prependContent(e){return t=>{const n=e.prependContent;return n&&t.addCustomContent(n),t}}prepareSession(e){return t=>(t.prepare(e),t)}exportColumnGroups(e,t){return n=>{if(!e.skipColumnGroupHeaders){const i=new QR,{colGroupSvc:o}=this.beans,r=o?o.createColumnGroups({columns:t,idCreator:i,pinned:null,isStandaloneStructure:!0}):t;this.recursivelyAddHeaderGroups(r,n,e.processGroupHeaderCallback)}return n}}exportHeaders(e,t){return n=>{if(!e.skipColumnHeaders){const i=n.onNewHeaderRow();t.forEach((o,r)=>{i.onColumn(o,r,void 0)})}return n}}processPinnedTopRows(e,t){return n=>{const i=this.processRow.bind(this,n,e,t);return e.rowPositions?e.rowPositions.filter(o=>o.rowPinned==="top").sort((o,r)=>o.rowIndex-r.rowIndex).map(o=>this.pinnedRowModel?.getPinnedTopRow(o.rowIndex)).forEach(i):this.pinnedRowModel?.isManual()||this.pinnedRowModel?.forEachPinnedRow("top",i),n}}processRows(e,t){return n=>{const i=this.rowModel,o=Yt(this.gos),r=wc(this.gos),s=!o&&e.onlySelected,a=this.processRow.bind(this,n,e,t),{exportedRows:l="filteredAndSorted"}=e;if(e.rowPositions)e.rowPositions.filter(u=>u.rowPinned==null).sort((u,h)=>u.rowIndex-h.rowIndex).map(u=>i.getRow(u.rowIndex)).forEach(a);else if(this.colModel.isPivotMode())o?i.forEachPivotNode(a,!0,l==="filteredAndSorted"):r?i.forEachNodeAfterFilterAndSort(a,!0):i.forEachNode(a);else if(e.onlySelectedAllPages||s){const u=this.beans.selectionSvc?.getSelectedNodes()??[];this.replicateSortedOrder(u),u.forEach(a)}else l==="all"?i.forEachNode(a):o||r?i.forEachNodeAfterFilterAndSort(a,!0):i.forEachNode(a);return n}}replicateSortedOrder(e){const{sortSvc:t,rowNodeSorter:n}=this.beans;if(!t||!n)return;const i=t.getSortOptions(),o=(r,s)=>r.rowIndex!=null&&s.rowIndex!=null?r.rowIndex-s.rowIndex:r.level===s.level?r.parent?.id===s.parent?.id?n.compareRowNodes(i,r,s)||(r.rowIndex??-1)-(s.rowIndex??-1):o(r.parent,s.parent):r.level>s.level?o(r.parent,s):o(r,s.parent);e.sort(o)}processPinnedBottomRows(e,t){return n=>{const i=this.processRow.bind(this,n,e,t);return e.rowPositions?e.rowPositions.filter(o=>o.rowPinned==="bottom").sort((o,r)=>o.rowIndex-r.rowIndex).map(o=>this.pinnedRowModel?.getPinnedBottomRow(o.rowIndex)).forEach(i):this.pinnedRowModel?.isManual()||this.pinnedRowModel?.forEachPinnedRow("bottom",i),n}}getColumnsToExport(e){const{allColumns:t=!1,skipRowGroups:n=!1,exportRowNumbers:i=!1,columnKeys:o}=e,{colModel:r,gos:s,visibleCols:a}=this,l=r.isPivotMode(),u=p=>Wr(p)?!1:!zn(p)||i;if(o?.length)return r.getColsForKeys(o).filter(u);const h=s.get("treeData");let f=[];return t&&!l?f=r.getCols():f=a.allCols,f=f.filter(p=>u(p)&&(n&&!h?!Og(p):!0)),f}recursivelyAddHeaderGroups(e,t,n){const i=[];for(const o of e){const r=o;if(r.getChildren)for(const s of r.getChildren()??[])i.push(s)}e.length>0&&Zt(e[0])&&this.doAddHeaderHeader(t,e,n),i&&i.length>0&&this.recursivelyAddHeaderGroups(i,t,n)}doAddHeaderHeader(e,t,n){const i=e.onNewHeaderGroupingRow();let o=0;for(const r of t){const s=r;let a;n?a=n(We(this.gos,{columnGroup:s})):a=this.beans.colNames.getDisplayNameForColumnGroup(s,"header");const u=(s.isExpandable()?s.getLeafColumns():[]).reduce((h,f,p,m)=>{let v=Pt(h);return f.getColumnGroupShow()==="open"?(!v||v[1]!=null)&&(v=[p],h.push(v)):v&&v[1]==null&&(v[1]=p-1),p===m.length-1&&v&&v[1]==null&&(v[1]=p),h},[]);i.onColumn(s,a||"",o++,s.getLeafColumns().length-1,u)}}},Nz={moduleName:"SharedExport",version:ve,beans:[_z]},Bz=class extends X{getFileName(e){const t=this.getDefaultFileExtension();return e?.length||(e=this.getDefaultFileName()),e.includes(".")?e:`${e}.${t}`}getData(e){return this.beans.gridSerializer.serialize(this.createSerializingSession(e),e)}getDefaultFileName(){return`export.${this.getDefaultFileExtension()}`}};function Gz(e,t){const n=document.defaultView||window;if(!n){se(52);return}const i=document.createElement("a"),o=n.URL.createObjectURL(t);i.setAttribute("href",o),i.setAttribute("download",e),i.style.display="none",document.body.appendChild(i),i.dispatchEvent(new MouseEvent("click",{bubbles:!1,cancelable:!0,view:n})),i.remove(),n.setTimeout(()=>{n.URL.revokeObjectURL(o)},0)}var Hz=class{constructor(e){this.valueFrom="data";const{colModel:t,rowGroupColsSvc:n,colNames:i,valueSvc:o,gos:r,processCellCallback:s,processHeaderCallback:a,processGroupHeaderCallback:l,processRowGroupCallback:u,valueFrom:h}=e;this.colModel=t,this.rowGroupColsSvc=n,this.colNames=i,this.valueSvc=o,this.gos=r,this.processCellCallback=s,this.processHeaderCallback=a,this.processGroupHeaderCallback=l,this.processRowGroupCallback=u,h&&(this.valueFrom=h)}prepare(e){}extractHeaderValue(e){return this.getHeaderName(this.processHeaderCallback,e)??""}extractRowCellValue(e){const{column:t,node:n,currentColumnIndex:i,accumulatedRowIndex:o,type:r,useRawFormula:s}=e,a=i===0&&h0(this.gos,n,this.colModel.isPivotMode());if(this.processRowGroupCallback&&(this.gos.get("treeData")||n.group)&&(t.isRowGroupDisplayed(n.rowGroupColumn?.getColId()??"")||a))return{value:this.processRowGroupCallback(We(this.gos,{column:t,node:n}))??""};if(this.processCellCallback)return{value:this.processCellCallback(We(this.gos,{accumulatedRowIndex:o,column:t,node:n,value:this.valueSvc.getValueForDisplay({column:t,node:n,from:this.valueFrom}).value,type:r,parseValue:v=>this.valueSvc.parseValue(t,n,v,this.valueSvc.getValue(t,n,this.valueFrom)),formatValue:v=>this.valueSvc.formatValue(t,n,v)??v}))??""};const l=this.gos.get("treeData"),u=this.valueSvc,h=n.level===-1&&n.footer,f=t.colDef.showRowGroup===!0&&(n.group||l);if(!h&&(a||f)){let v="",w=n;for(;w&&w.level!==-1;){const{value:b,valueFormatted:y}=u.getValueForDisplay({column:a?void 0:t,node:w,includeValueFormatted:!0,exporting:!0,from:this.valueFrom});v=` -> ${y??b??""}${v}`,w=w.parent}return{value:v,valueFormatted:v}}const{value:p,valueFormatted:m}=u.getValueForDisplay({column:t,node:n,includeValueFormatted:!0,exporting:!0,useRawFormula:s,from:this.valueFrom});return{value:p??"",valueFormatted:m}}getHeaderName(e,t){return e?e(We(this.gos,{column:t})):this.colNames.getDisplayNameForColumn(t,"csv",!0)}},px=`\r
|
|
63
|
+
`,Vz=class extends Hz{constructor(e){super(e),this.config=e,this.isFirstLine=!0,this.result="";const{suppressQuotes:t,columnSeparator:n}=e;this.suppressQuotes=t,this.columnSeparator=n}addCustomContent(e){e&&(typeof e=="string"?(/^\s*\n/.test(e)||this.beginNewLine(),e=e.replace(/\r?\n/g,px),this.result+=e):e.forEach(t=>{this.beginNewLine(),t.forEach((n,i)=>{i!==0&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(n.data.value||""),n.mergeAcross&&this.appendEmptyCells(n.mergeAcross)})}))}onNewHeaderGroupingRow(){return this.beginNewLine(),{onColumn:this.onNewHeaderGroupingRowColumn.bind(this)}}onNewHeaderGroupingRowColumn(e,t,n,i){n!=0&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(t),this.appendEmptyCells(i)}appendEmptyCells(e){for(let t=1;t<=e;t++)this.result+=this.columnSeparator+this.putInQuotes("")}onNewHeaderRow(){return this.beginNewLine(),{onColumn:this.onNewHeaderRowColumn.bind(this)}}onNewHeaderRowColumn(e,t){t!=0&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(this.extractHeaderValue(e))}onNewBodyRow(){return this.beginNewLine(),{onColumn:this.onNewBodyRowColumn.bind(this)}}onNewBodyRowColumn(e,t,n){t!=0&&(this.result+=this.columnSeparator);const i=this.extractRowCellValue({column:e,node:n,currentColumnIndex:t,accumulatedRowIndex:t,type:"csv",useRawFormula:!1});this.result+=this.putInQuotes(i.valueFormatted??i.value)}putInQuotes(e){if(this.suppressQuotes)return e;if(e==null)return'""';let t;return typeof e=="string"?t=e:typeof e.toString=="function"?t=e.toString():(se(53),t=""),'"'+t.replace(/"/g,'""')+'"'}parse(){return this.result}beginNewLine(){this.isFirstLine||(this.result+=px),this.isFirstLine=!1}},Wz=class extends Bz{constructor(){super(...arguments),this.beanName="csvCreator"}getMergedParams(e){const t=this.gos.get("defaultCsvExportParams");return Object.assign({},t,e)}export(e){if(this.isExportSuppressed()){se(51);return}const t=()=>{const i=this.getMergedParams(e),o=this.getData(i),r=new Blob(["\uFEFF",o],{type:"text/plain"}),s=i.fileName,a=typeof s=="function"?s(We(this.gos,{})):s;Gz(this.getFileName(a),r)},{overlays:n}=this.beans;n?n.showExportOverlay(t):t()}exportDataAsCsv(e){this.export(e)}getDataAsCsv(e,t=!1){const n=t?Object.assign({},e):this.getMergedParams(e);return this.getData(n)}getDefaultFileExtension(){return"csv"}createSerializingSession(e){const{colModel:t,colNames:n,rowGroupColsSvc:i,valueSvc:o,gos:r}=this.beans,{processCellCallback:s,processHeaderCallback:a,processGroupHeaderCallback:l,processRowGroupCallback:u,suppressQuotes:h,columnSeparator:f,valueFrom:p}=e;return new Vz({colModel:t,colNames:n,valueSvc:o,gos:r,processCellCallback:s||void 0,processHeaderCallback:a||void 0,processGroupHeaderCallback:l||void 0,processRowGroupCallback:u||void 0,suppressQuotes:h||!1,columnSeparator:f||",",rowGroupColsSvc:i,valueFrom:p})}isExportSuppressed(){return this.gos.get("suppressCsvExport")}};function zz(e,t){return e.csvCreator?.getDataAsCsv(t)}function Uz(e,t){e.csvCreator?.exportDataAsCsv(t)}var $z={moduleName:"CsvExport",version:ve,beans:[Wz],apiFunctions:{getDataAsCsv:zz,exportDataAsCsv:Uz},dependsOn:[Nz]},gx=class extends Vn{constructor(e,t){super(),this.ctrl=e,t&&(this.beans=t)}postConstruct(){this.refreshTooltip()}setBrowserTooltip(e,t){const n="title",i=this.ctrl.getGui();i&&(e!=null&&(e!=""||t)?i.setAttribute(n,e):i.removeAttribute(n))}updateTooltipText(){const{getTooltipValue:e}=this.ctrl;e&&(this.tooltip=e())}createTooltipFeatureIfNeeded(){if(this.tooltipManager==null){const e=this.beans.registry.createDynamicBean("tooltipStateManager",!0,this.ctrl,()=>this.tooltip);e&&(this.tooltipManager=this.createBean(e,this.beans.context))}}attemptToShowTooltip(){this.tooltipManager?.prepareToShowTooltip()}attemptToHideTooltip(){this.tooltipManager?.hideTooltip()}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()}},jz=1e3,Kz=1e3,mx=100,vx,Fh=!1,qz=class extends Vn{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}postConstruct(){this.gos.get("tooltipInteraction")&&(this.interactionEnabled=!0),this.tooltipTrigger=this.getTooltipTrigger(),this.tooltipMouseTrack=this.gos.get("tooltipMouseTrack");const e=this.tooltipCtrl.getGui();this.tooltipTrigger===0&&this.addManagedListeners(e,{mouseenter:this.onMouseEnter.bind(this),mouseleave:this.onMouseLeave.bind(this)}),this.tooltipTrigger===1&&this.addManagedListeners(e,{focusin:this.onFocusIn.bind(this),focusout:this.onFocusOut.bind(this)}),this.addManagedListeners(e,{mousemove:this.onMouseMove.bind(this)}),this.interactionEnabled||this.addManagedListeners(e,{mousedown:this.onMouseDown.bind(this),keydown:this.onKeyDown.bind(this)})}getGridOptionsTooltipDelay(e){const t=this.gos.get(e);return Math.max(200,t)}getTooltipDelay(e){return this.tooltipCtrl[`getTooltip${e}DelayOverride`]?.()??this.getGridOptionsTooltipDelay(`tooltip${e}Delay`)}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()),!Ns()&&(Fh?this.showTooltipTimeoutId=window.setTimeout(()=>{this.prepareToShowTooltip(e)},mx):this.prepareToShowTooltip(e))}onMouseMove(e){this.lastMouseEvent&&(this.lastMouseEvent=e),this.tooltipMouseTrack&&this.state===2&&this.tooltipComp&&this.positionTooltip()}onMouseDown(){this.setToDoNothing()}onMouseLeave(){this.interactionEnabled?this.lockService():this.setToDoNothing()}onFocusIn(){this.prepareToShowTooltip()}onFocusOut(e){const t=e.relatedTarget,n=this.tooltipCtrl.getGui(),i=this.tooltipComp?.getGui();this.isInteractingWithTooltip||n.contains(t)||this.interactionEnabled&&i?.contains(t)||this.setToDoNothing()}onKeyDown(){this.isInteractingWithTooltip&&(this.isInteractingWithTooltip=!1),this.setToDoNothing()}prepareToShowTooltip(e){if(this.state!=0||Fh)return;let t=0;e&&(t=this.isLastTooltipHiddenRecently()?this.getTooltipDelay("SwitchShow"):this.getTooltipDelay("Show")),this.lastMouseEvent=e||null,this.showTooltipTimeoutId=window.setTimeout(this.showTooltip.bind(this),t),this.state=1}isLastTooltipHiddenRecently(){return Date.now()-vx<jz}setToDoNothing(e){!e&&this.state===2&&this.hideTooltip(),this.onBodyScrollEventCallback&&(this.onBodyScrollEventCallback(),this.onBodyScrollEventCallback=void 0),this.clearEventHandlers(),this.onDocumentKeyDownCallback&&(this.onDocumentKeyDownCallback(),this.onDocumentKeyDownCallback=void 0),this.clearTimeouts(),this.state=0,this.lastMouseEvent=null}showTooltip(){const e=this.getTooltipValue(),t=this.tooltipCtrl;if(!we(e)||t.shouldDisplayTooltip&&!t.shouldDisplayTooltip()){this.setToDoNothing();return}const n=this.gos.addCommon({location:t.getLocation?.()??"UNKNOWN",value:e,hideTooltipCallback:()=>this.hideTooltip(!0),...t.getAdditionalParams?.()});this.state=2,this.tooltipInstanceCount++;const i=this.newTooltipComponentCallback.bind(this,this.tooltipInstanceCount);this.createTooltipComp(n,i)}hideTooltip(e){!e&&this.isInteractingWithTooltip||(this.tooltipComp&&(this.destroyTooltipComp(),vx=Date.now()),this.eventSvc.dispatchEvent({type:"tooltipHide",parentGui:this.tooltipCtrl.getGui()}),e&&(this.isInteractingWithTooltip=!1),this.setToDoNothing(!0))}newTooltipComponentCallback(e,t){if(this.state!==2||this.tooltipInstanceCount!==e){this.destroyBean(t);return}const i=t.getGui();this.tooltipComp=t,i.classList.contains("ag-tooltip")||i.classList.add("ag-tooltip-custom"),this.tooltipTrigger===0&&i.classList.add("ag-tooltip-animate"),this.interactionEnabled&&i.classList.add("ag-tooltip-interactive");const o=this.getLocaleTextFunc(),r=this.popupSvc?.addPopup({eChild:i,ariaLabel:o("ariaLabelTooltip","Tooltip")});if(r&&(this.tooltipPopupDestroyFunc=r.hideFunc),this.positionTooltip(),this.tooltipTrigger===1){const s=()=>this.setToDoNothing();[this.onBodyScrollEventCallback]=this.addManagedEventListeners({bodyScroll:s}),this.setEventHandlers(s)}this.interactionEnabled&&([this.tooltipMouseEnterListener,this.tooltipMouseLeaveListener]=this.addManagedElementListeners(i,{mouseenter:this.onTooltipMouseEnter.bind(this),mouseleave:this.onTooltipMouseLeave.bind(this)}),[this.onDocumentKeyDownCallback]=this.addManagedElementListeners(nn(this.beans),{keydown:s=>{i.contains(s?.target)||this.onKeyDown()}}),this.tooltipTrigger===1&&([this.tooltipFocusInListener,this.tooltipFocusOutListener]=this.addManagedElementListeners(i,{focusin:this.onTooltipFocusIn.bind(this),focusout:this.onTooltipFocusOut.bind(this)}))),this.eventSvc.dispatchEvent({type:"tooltipShow",tooltipGui:i,parentGui:this.tooltipCtrl.getGui()}),this.startHideTimeout()}onTooltipMouseEnter(){this.isInteractingWithTooltip=!0,this.unlockService()}onTooltipMouseLeave(){this.isTooltipFocused()||(this.isInteractingWithTooltip=!1,this.lockService())}onTooltipFocusIn(){this.isInteractingWithTooltip=!0}isTooltipFocused(){const e=this.tooltipComp?.getGui(),t=It(this.beans);return!!e&&e.contains(t)}onTooltipFocusOut(e){const t=this.tooltipCtrl.getGui();this.isTooltipFocused()||(this.isInteractingWithTooltip=!1,t.contains(e.relatedTarget)?this.startHideTimeout():this.hideTooltip())}positionTooltip(){const e={type:"tooltip",ePopup:this.tooltipComp.getGui(),nudgeY:18,skipObserver:this.tooltipMouseTrack};this.lastMouseEvent?this.popupSvc?.positionPopupUnderMouseEvent({...e,mouseEvent:this.lastMouseEvent}):this.popupSvc?.positionPopupByComponent({...e,eventSource:this.tooltipCtrl.getGui(),position:"under",keepWithinBounds:!0,nudgeY:5})}destroyTooltipComp(){this.tooltipComp.getGui().classList.add("ag-tooltip-hiding");const e=this.tooltipPopupDestroyFunc,t=this.tooltipComp,n=this.tooltipTrigger===0?Kz:0;window.setTimeout(()=>{e(),this.destroyBean(t)},n),this.clearTooltipListeners(),this.tooltipPopupDestroyFunc=void 0,this.tooltipComp=void 0}clearTooltipListeners(){for(const e of[this.tooltipMouseEnterListener,this.tooltipMouseLeaveListener,this.tooltipFocusInListener,this.tooltipFocusOutListener])e&&e();this.tooltipMouseEnterListener=this.tooltipMouseLeaveListener=this.tooltipFocusInListener=this.tooltipFocusOutListener=null}lockService(){Fh=!0,this.interactiveTooltipTimeoutId=window.setTimeout(()=>{this.unlockService(),this.setToDoNothing()},mx)}unlockService(){Fh=!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()}},Qz=class extends gx{constructor(e,t,n){super(e,n),this.highlightTracker=t,this.onHighlight=this.onHighlight.bind(this)}postConstruct(){super.postConstruct(),this.wireHighlightListeners()}wireHighlightListeners(){this.addManagedPropertyListener("tooltipTrigger",({currentValue:e})=>{this.setTooltipMode(e)}),this.setTooltipMode(this.gos.get("tooltipTrigger")),this.highlightTracker.addEventListener("itemHighlighted",this.onHighlight)}onHighlight(e){this.tooltipMode===1&&(e.highlighted?this.attemptToShowTooltip():this.attemptToHideTooltip())}setTooltipMode(e="focus"){this.tooltipMode=e==="focus"?1:0}destroy(){this.highlightTracker.removeEventListener("itemHighlighted",this.onHighlight),super.destroy()}},Yz=class extends Qg{constructor(){super({tag:"div",cls:"ag-tooltip"})}init(e){const{value:t}=e,n=this.getGui();n.textContent=_a(t);const i=e.location.replace(/([a-z])([A-Z0-9])/g,"$1-$2").toLowerCase();n.classList.add(`ag-${i}-tooltip`)}},Zz=".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),&:where(.ag-cell-formula-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}}",xh=0,Xz=200,Jz=class extends Vn{constructor(){super(...arguments),this.beanName="popupSvc",this.popupList=[]}postConstruct(){this.addManagedEventListeners({stylesChanged:this.handleThemeChange.bind(this)})}getPopupParent(){const e=this.gos.get("popupParent");return e||this.getDefaultPopupParent()}positionPopupUnderMouseEvent(e){const{ePopup:t,nudgeX:n,nudgeY:i,skipObserver:o}=e;this.positionPopup({ePopup:t,nudgeX:n,nudgeY:i,keepWithinBounds:!0,skipObserver:o,updatePosition:()=>this.calculatePointerAlign(e.mouseEvent),postProcessCallback:()=>this.callPostProcessPopup(e.additionalParams,e.type,e.ePopup,null,e.mouseEvent)})}calculatePointerAlign(e){const t=this.getParentRect();return{x:e.clientX-t.left,y:e.clientY-t.top}}positionPopupByComponent(e){const{ePopup:t,nudgeX:n,nudgeY:i,keepWithinBounds:o,eventSource:r,alignSide:s="left",position:a="over",type:l}=e,u=r.getBoundingClientRect(),h=this.getParentRect();this.setAlignedTo(r,t);const f=()=>{let p=u.left-h.left;s==="right"&&(p-=t.offsetWidth-u.width);let m;return a==="over"?(m=u.top-h.top,this.setAlignedStyles(t,"over")):(this.setAlignedStyles(t,"under"),this.shouldRenderUnderOrAbove(t,u,h,e.nudgeY||0)==="under"?m=u.top-h.top+u.height:m=u.top-t.offsetHeight-(i||0)*2-h.top),{x:p,y:m}};this.positionPopup({ePopup:t,nudgeX:n,nudgeY:i,keepWithinBounds:o,updatePosition:f,postProcessCallback:()=>this.callPostProcessPopup(e.additionalParams,l,t,r,null)})}positionPopupForMenu(e){const{eventSource:t,ePopup:n,event:i}=e,o=t.getBoundingClientRect(),r=this.getParentRect();this.setAlignedTo(t,n);let s=!1;const a=()=>{const l=this.keepXYWithinBounds(n,o.top-r.top,0),u=n.clientWidth>0?n.clientWidth:200;s||(n.style.minWidth=`${u}px`,s=!0);const f=r.right-r.left-u;let p;return this.gos.get("enableRtl")?(p=v(),p<0&&(p=m(),this.setAlignedStyles(n,"left")),p>f&&(p=0,this.setAlignedStyles(n,"right"))):(p=m(),p>f&&(p=v(),this.setAlignedStyles(n,"right")),p<0&&(p=0,this.setAlignedStyles(n,"left"))),{x:p,y:l};function m(){return o.right-r.left-2}function v(){return o.left-r.left-u}};this.positionPopup({ePopup:n,keepWithinBounds:!0,updatePosition:a,postProcessCallback:()=>this.callPostProcessPopup(e.additionalParams,"subMenu",n,t,i instanceof MouseEvent?i:void 0)})}shouldRenderUnderOrAbove(e,t,n,i){const o=n.bottom-t.bottom,r=t.top-n.top,s=e.offsetHeight+i;return o>s?"under":r>s||r>o?"above":"under"}setAlignedStyles(e,t){const n=this.getPopupIndex(e);if(n===-1)return;const i=this.popupList[n],{alignedToElement:o}=i;if(!o)return;const r=["right","left","over","above","under"];for(const s of r)o.classList.remove(`ag-has-popup-positioned-${s}`),e.classList.remove(`ag-popup-positioned-${s}`);t&&(o.classList.add(`ag-has-popup-positioned-${t}`),e.classList.add(`ag-popup-positioned-${t}`))}setAlignedTo(e,t){const n=this.getPopupIndex(t);if(n!==-1){const i=this.popupList[n];i.alignedToElement=e}}positionPopup(e){const{ePopup:t,keepWithinBounds:n,nudgeX:i,nudgeY:o,skipObserver:r,updatePosition:s}=e,a={width:0,height:0},l=(u=!1)=>{let{x:h,y:f}=s();u&&t.clientWidth===a.width&&t.clientHeight===a.height||(a.width=t.clientWidth,a.height=t.clientHeight,i&&(h+=i),o&&(f+=o),n&&(h=this.keepXYWithinBounds(t,h,1),f=this.keepXYWithinBounds(t,f,0)),t.style.left=`${h}px`,t.style.top=`${f}px`,e.postProcessCallback&&e.postProcessCallback())};if(l(),!r){const u=_r(this.beans,t,()=>l(!0));setTimeout(()=>u(),Xz)}}getParentRect(){const e=nn(this.beans);let t=this.getPopupParent();return t===e.body?t=e.documentElement:getComputedStyle(t).position==="static"&&(t=t.offsetParent),_S(t)}keepXYWithinBounds(e,t,n){const i=n===0,o=i?"clientHeight":"clientWidth",r=i?"top":"left",s=i?"height":"width",a=i?"scrollTop":"scrollLeft",l=nn(this.beans),u=l.documentElement,h=this.getPopupParent(),f=e.getBoundingClientRect(),p=h.getBoundingClientRect(),m=l.documentElement.getBoundingClientRect(),v=h===l.body,w=Math.ceil(f[s]);let y=v?(i?OS:Pd)(u)+u[a]:h[o];v&&(y-=Math.abs(m[r]-p[r]));const R=y-w;return Math.min(Math.max(t,0),Math.max(R,0))}addPopup(e){const{eChild:t,ariaLabel:n,ariaOwns:i,alwaysOnTop:o,positionCallback:r,anchorToElement:s}=e,a=this.getPopupIndex(t);if(a!==-1)return{hideFunc:this.popupList[a].hideFunc};this.initialisePopupPosition(t);const l=this.createPopupWrapper(t,!!o,n,i),u=this.addEventListenersToPopup({...e,wrapperEl:l});return r&&r(),this.addPopupToPopupList(t,l,u,s),{hideFunc:u}}initialisePopupPosition(e){const n=this.getPopupParent().getBoundingClientRect();we(e.style.top)||(e.style.top=`${n.top*-1}px`),we(e.style.left)||(e.style.left=`${n.left*-1}px`)}createPopupWrapper(e,t,n,i){const o=this.getPopupParent(),{environment:r,gos:s}=this.beans,a=Ms({tag:"div"});return r.applyThemeClasses(a),a.classList.add("ag-popup"),e.classList.add(s.get("enableRtl")?"ag-rtl":"ag-ltr","ag-popup-child"),e.hasAttribute("role")||Or(e,"dialog"),n?Na(e,n):i&&(e.id||(e.id=`popup-component-${xh}`),kS(i,e.id)),a.appendChild(e),o.appendChild(a),t?this.setAlwaysOnTop(e,!0):this.bringPopupToFront(e),a}addEventListenersToPopup(e){const t=this.beans,n=nn(t),{wrapperEl:i,eChild:o,closedCallback:r,afterGuiAttached:s,closeOnEsc:a,modal:l,ariaOwns:u}=e;let h=!1;const f=w=>{if(!i.contains(It(t)))return;w.key===q.ESCAPE&&!this.isStopPropagation(w)&&v({keyboardEvent:w})},p=w=>v({mouseEvent:w}),m=w=>v({touchEvent:w}),v=(w={})=>{const{mouseEvent:b,touchEvent:y,keyboardEvent:R,forceHide:S}=w;!S&&(this.isEventFromCurrentPopup({mouseEvent:b,touchEvent:y},o)||h)||(h=!0,i.remove(),n.removeEventListener("keydown",f),n.removeEventListener("mousedown",p),n.removeEventListener("touchstart",m),n.removeEventListener("contextmenu",p),this.eventSvc.removeListener("dragStarted",p),r&&r(b||y||R),this.removePopupFromPopupList(o,u))};return s&&s({hidePopup:v}),window.setTimeout(()=>{a&&n.addEventListener("keydown",f),l&&(n.addEventListener("mousedown",p),this.eventSvc.addListener("dragStarted",p),n.addEventListener("touchstart",m),n.addEventListener("contextmenu",p))},0),v}addPopupToPopupList(e,t,n,i){this.popupList.push({element:e,wrapper:t,hideFunc:n,instanceId:xh,isAnchored:!!i}),i&&this.setPopupPositionRelatedToElement(e,i),xh=xh+1}getPopupIndex(e){return this.popupList.findIndex(t=>t.element===e)}setPopupPositionRelatedToElement(e,t){const n=this.getPopupIndex(e);if(n===-1)return;const i=this.popupList[n];if(i.stopAnchoringPromise&&i.stopAnchoringPromise.then(r=>r&&r()),i.stopAnchoringPromise=void 0,i.isAnchored=!1,!t)return;const o=this.keepPopupPositionedRelativeTo({element:t,ePopup:e,hidePopup:i.hideFunc});return i.stopAnchoringPromise=o,i.isAnchored=!0,o}removePopupFromPopupList(e,t){this.setAlignedStyles(e,null),this.setPopupPositionRelatedToElement(e,null),t&&kS(t,null),this.popupList=this.popupList.filter(n=>n.element!==e)}keepPopupPositionedRelativeTo(e){const t=this.getPopupParent(),n=t.getBoundingClientRect(),{element:i,ePopup:o}=e,r=i.getBoundingClientRect(),s=f=>Number.parseInt(f.substring(0,f.length-1),10),a=(f,p)=>{const m=n[f]-r[f],v=s(o.style[f]);return{initialDiff:m,lastDiff:m,initial:v,last:v,direction:p}},l=a("top",0),u=a("left",1),h=this.beans.frameworkOverrides;return new Mt(f=>{h.wrapIncoming(()=>{e_(()=>{const p=t.getBoundingClientRect(),m=i.getBoundingClientRect();if(m.top==0&&m.left==0&&m.height==0&&m.width==0){e.hidePopup();return}const w=(b,y)=>{const R=s(o.style[y]);b.last!==R&&(b.initial=R,b.last=R);const S=p[y]-m[y];if(S!=b.lastDiff){const P=this.keepXYWithinBounds(o,b.initial+b.initialDiff-S,b.direction);o.style[y]=`${P}px`,b.last=P}b.lastDiff=S};w(l,"top"),w(u,"left")},200).then(p=>{f(()=>{p!=null&&window.clearInterval(p)})})},"popupPositioning")})}isEventFromCurrentPopup(e,t){const{mouseEvent:n,touchEvent:i}=e,o=n||i;if(!o)return!1;const r=this.getPopupIndex(t);if(r===-1)return!1;for(let s=r;s<this.popupList.length;s++){const a=this.popupList[s];if(TL(a.element,o))return!0}return this.isElementWithinCustomPopup(o.target)}isElementWithinCustomPopup(e){const t=nn(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 n=this.getWrapper(e);n&&(n.classList.toggle("ag-always-on-top",!!t),t&&this.bringPopupToFront(n))}bringPopupToFront(e){const t=this.getPopupParent(),n=Array.prototype.slice.call(t.querySelectorAll(".ag-popup")),i=n.length,o=this.getWrapper(e);if(!o||i<=1||!t.contains(e))return;const r=[],s=[];for(const p of n)p!==o&&(p.classList.contains("ag-always-on-top")?s.push(p):r.push(p));const a=[],l=s.length,f=o.classList.contains("ag-always-on-top")||!l?[...r,...s,o]:[...r,o,...s];for(let p=0;p<=i;p++){const m=f[p];if(n[p]===f[p]||m===o)continue;const v=m.querySelectorAll("div");for(const w of v)w.scrollTop!==0&&a.push([w,w.scrollTop]);p===0?t.prepend(m):f[p-1].after(m)}for(;a.length;){const p=a.pop();p[0].scrollTop=p[1]}}handleThemeChange(e){if(e.themeChanged){const t=this.beans.environment;for(const n of this.popupList)t.applyThemeClasses(n.wrapper)}}},e6=class extends Jz{getDefaultPopupParent(){return this.beans.ctrlsSvc.get("gridCtrl").getGui()}callPostProcessPopup(e,t,n,i,o){const r=this.gos.getCallback("postProcessPopup");if(r){const{column:s,rowNode:a}=e??{};r({column:s,rowNode:a,ePopup:n,type:t,eventSource:i,mouseEvent:o})}}getActivePopups(){return this.popupList.map(e=>e.element)}hasAnchoredPopup(){return this.popupList.some(e=>e.isAnchored)}isStopPropagation(e){return sr(e)}},Ph={moduleName:"Popup",version:ve,beans:[e6]};function rv(e){return e.get("tooltipShowMode")==="whenTruncated"}var t6=(e,t)=>{const n=e;return typeof n.getTranslatedMessage=="function"?n.getTranslatedMessage(t):e.message},sv=(e,t,n)=>{const{editModelSvc:i}=e,o=i?.getCellValidationModel()?.getCellValidation(t)?.errorMessages,r=i?.getRowValidationModel().getRowValidation(t)?.errorMessages,s=o||r;return s?.length?s.join(n("tooltipValidationErrorSeparator",". ")):void 0},n6=(e,t)=>{if(rv(e.gos)){if(t.isCellRenderer()){const i=t.column.getColDef();return!!i.showRowGroup||i.cellRenderer==="agGroupCellRenderer"?pc(()=>{const r=t.eGui;return r.querySelector(".ag-group-value")||r.querySelector(".ag-cell-value")||r}):void 0}return pc(()=>{const i=t.eGui;return i.children.length===0?i:i.querySelector(".ag-cell-value")})}},i6=(e,t,n)=>{const{editSvc:i}=e,{column:o}=t,r=n6(e,t),s=()=>i?.isEditing(t)?!1:r?o.isTooltipEnabled()?r():!1:!0;return{shouldDisplayDefault:s,shouldDisplayColumnTooltip:s,shouldDisplayCustomTooltip:n??s}},o6=({beans:e,ctrl:t,value:n,displayFunctions:i,translate:o})=>{const{editSvc:r,formula:s,gos:a}=e,{column:l,rowNode:u}=t;if(s?.active&&l.isAllowFormula()){const b=s.getFormulaError(l,u);if(b)return{value:t6(b,o),location:"cellFormula",shouldDisplay:()=>!!s?.getFormulaError(l,u)}}if(!!!r?.isEditing(t)){const b=sv(e,t,o);if(b)return{value:b,location:"cellEditor",shouldDisplay:()=>!r?.isEditing(t)&&!!sv(e,t,o)}}const{shouldDisplayCustomTooltip:f,shouldDisplayColumnTooltip:p}=i;if(n!=null)return{value:n,location:"cell",shouldDisplay:f};const m=l.getColDef(),v=u.data;if(m.tooltipField&&we(v))return{value:Mc(v,m.tooltipField,l.isTooltipFieldContainsDots()),location:"cell",shouldDisplay:p};const w=m.tooltipValueGetter;return w?{value:w(We(a,{location:"cell",colDef:l.getColDef(),column:l,rowIndex:t.cellPosition.rowIndex,node:u,data:u.data,value:t.value,valueFormatted:t.valueFormatted})),location:"cell",shouldDisplay:p}:null},r6=class extends X{constructor(){super(...arguments),this.beanName="tooltipSvc"}setupHeaderTooltip(e,t,n,i){e&&t.destroyBean(e);const o=this.gos,r=rv(o),{column:s,eGui:a}=t,l=s.getColDef();!i&&r&&!l.headerComponent&&(i=pc(()=>a.querySelector(".ag-header-cell-text")));const u="header",f=this.beans.colNames.getDisplayNameForColumn(s,"header",!0),p=n??f,m={getGui:()=>a,getLocation:()=>u,getTooltipValue:()=>n??l?.headerTooltipValueGetter?.(We(o,{location:u,colDef:l,column:s,value:p,valueFormatted:f}))??l?.headerTooltip,shouldDisplayTooltip:i,getAdditionalParams:()=>({column:s,colDef:s.getColDef()})};let v=this.createTooltipFeature(m);return v&&(v=t.createBean(v),t.setRefreshFunction("tooltip",()=>v.refreshTooltip())),v}setupHeaderGroupTooltip(e,t,n,i){e&&t.destroyBean(e);const o=this.gos,r=rv(o),{column:s,eGui:a}=t,l=s.getColGroupDef();!i&&r&&!l?.headerGroupComponent&&(i=pc(()=>a.querySelector(".ag-header-group-text")));const u="headerGroup",f=this.beans.colNames.getDisplayNameForColumnGroup(s,"header"),p=n??f,m={getGui:()=>a,getLocation:()=>u,getTooltipValue:()=>n??l?.headerTooltipValueGetter?.(We(o,{location:u,colDef:l,column:s,value:p,valueFormatted:f}))??l?.headerTooltip,shouldDisplayTooltip:i,getAdditionalParams:()=>{const w={column:s};return l&&(w.colDef=l),w}},v=this.createTooltipFeature(m);return v&&t.createBean(v)}enableCellTooltipFeature(e,t,n){const{beans:i}=this,{column:o,rowNode:r}=e,s=i6(i,e,n),a=this.getLocaleTextFunc();let l=null;const u=()=>(l=o6({beans:i,ctrl:e,value:t,displayFunctions:s,translate:a}),l),f={getGui:()=>e.eGui,getLocation:()=>l?.location??"cell",getTooltipValue:()=>u()?.value,shouldDisplayTooltip:()=>{const p=l??u();return p?p.shouldDisplay?p.shouldDisplay():!0:!1},getAdditionalParams:()=>({column:o,colDef:o.getColDef(),rowIndex:e.cellPosition.rowIndex,node:r,data:r.data,valueFormatted:e.valueFormatted})};return this.createTooltipFeature(f,i)}setupFullWidthRowTooltip(e,t,n,i){const o={getGui:()=>t.getFullWidthElement(),getTooltipValue:()=>n,getLocation:()=>"fullWidthRow",shouldDisplayTooltip:i},r=this.beans,s=r.context;e&&t.destroyBean(e,s);const a=this.createTooltipFeature(o,r);if(a)return t.createBean(a,s)}setupCellEditorTooltip(e,t){const{beans:n}=this,{context:i}=n,o=t.getValidationElement?.(!0)||!t.isPopup?.()&&e.eGui;if(!o)return;const r={getGui:()=>o,getTooltipValue:()=>sv(n,e,this.getLocaleTextFunc()),getLocation:()=>"cellEditor",shouldDisplayTooltip:()=>{const{editModelSvc:a}=n,l=a?.getRowValidationModel()?.getRowValidationMap(),u=a?.getCellValidationModel()?.getCellValidationMap(),h=!!l&&l.size>0,f=!!u&&u.size>0;return h||f}},s=this.createTooltipFeature(r,n);if(s)return e.createBean(s,i)}initCol(e){const{colDef:t}=e;e.tooltipEnabled=we(t.tooltipField)||we(t.tooltipValueGetter)||we(t.tooltipComponent)}createTooltipFeature(e,t){return this.beans.registry.createDynamicBean("tooltipFeature",!1,e,t)}},s6=class extends qz{createTooltipComp(e,t){A_(this.beans.userCompFactory,e)?.newAgStackInstance().then(t)}setEventHandlers(e){[this.onColumnMovedEventCallback]=this.addManagedEventListeners({columnMoved:e})}clearEventHandlers(){this.onColumnMovedEventCallback?.(),this.onColumnMovedEventCallback=void 0}},Cx={moduleName:"Tooltip",version:ve,beans:[r6],dynamicBeans:{tooltipFeature:gx,highlightTooltipFeature:Qz,tooltipStateManager:s6},userComponents:{agTooltipComponent:Yz},dependsOn:[Ph],css:[Zz]},ll=class{constructor(e){this.cellValueChanges=e}},av=class extends ll{constructor(e,t,n,i){super(e),this.initialRange=t,this.finalRange=n,this.ranges=i}},a6=10,wx=class{constructor(e){this.actionStack=[],this.maxStackSize=e||a6,this.actionStack=new Array(this.maxStackSize)}pop(){return this.actionStack.pop()}push(e){e.cellValueChanges&&e.cellValueChanges.length>0&&(this.actionStack.length===this.maxStackSize&&this.actionStack.shift(),this.actionStack.push(e))}clear(){this.actionStack=[]}getCurrentStackSize(){return this.actionStack.length}},l6=class extends X{constructor(){super(...arguments),this.beanName="undoRedo",this.cellValueChanges=[],this.activeCellEdit=null,this.activeRowEdit=null,this.isPasting=!1,this.isRangeInAction=!1,this.batchEditing=!1,this.bulkEditing=!1,this.onCellValueChanged=e=>{const t={column:e.column,rowIndex:e.rowIndex,rowPinned:e.rowPinned},n=this.activeCellEdit!==null&&im(this.activeCellEdit,t),i=this.activeRowEdit!==null&&f2(this.activeRowEdit,t);if(!(n||i||this.isPasting||this.isRangeInAction))return;const{rowPinned:r,rowIndex:s,column:a,oldValue:l,value:u}=e,h={rowPinned:r,rowIndex:s,columnId:a.getColId(),newValue:u,oldValue:l};this.cellValueChanges.push(h)},this.clearStacks=()=>{this.undoStack.clear(),this.redoStack.clear()}}postConstruct(){const{gos:e,ctrlsSvc:t}=this.beans;if(!e.get("undoRedoCellEditing"))return;const n=e.get("undoRedoCellEditingLimit");if(n<=0)return;this.undoStack=new wx(n),this.redoStack=new wx(n),this.addListeners();const i=this.clearStacks.bind(this);this.addManagedEventListeners({cellValueChanged:this.onCellValueChanged.bind(this),modelUpdated:o=>{o.keepUndoRedoStack||this.clearStacks()},columnPivotModeChanged:i,newColumnsLoaded:i,columnGroupOpened:i,columnRowGroupChanged:i,columnMoved:i,columnPinned:i,columnVisible:i,rowDragEnd:i}),t.whenReady(this,o=>{this.gridBodyCtrl=o.gridBodyCtrl})}getCurrentUndoStackSize(){return this.undoStack?.getCurrentStackSize()??0}getCurrentRedoStackSize(){return this.redoStack?.getCurrentStackSize()??0}undo(e){const{eventSvc:t,undoStack:n,redoStack:i}=this;t.dispatchEvent({type:"undoStarted",source:e});const o=this.undoRedo(n,i,"initialRange","oldValue","undo");t.dispatchEvent({type:"undoEnded",source:e,operationPerformed:o})}redo(e){const{eventSvc:t,undoStack:n,redoStack:i}=this;t.dispatchEvent({type:"redoStarted",source:e});const o=this.undoRedo(i,n,"finalRange","newValue","redo");t.dispatchEvent({type:"redoEnded",source:e,operationPerformed:o})}undoRedo(e,t,n,i,o){if(!e)return!1;const r=e.pop();return r?.cellValueChanges?(this.processAction(r,s=>s[i],o),r instanceof av?this.processRange(r.ranges||[r[n]]):this.processCell(r.cellValueChanges),t.push(r),!0):!1}processAction(e,t,n){const{changeDetectionSvc:i}=this.beans;i?.beginDeferred();try{for(const o of e.cellValueChanges){const{rowIndex:r,rowPinned:s,columnId:a}=o,l={rowIndex:r,rowPinned:s},u=Do(this.beans,l);u?.displayed&&u.setDataValue(a,t(o),n)}}finally{i?.endDeferred()}}processRange(e){let t;const n=this.beans.rangeSvc;n.removeAllCellRanges(!0),e.forEach((i,o)=>{if(!i)return;const r=i.startRow,s=i.endRow;o===e.length-1&&(t={rowPinned:r.rowPinned,rowIndex:r.rowIndex,columnId:i.startColumn.getColId()},this.setLastFocusedCell(t));const a={rowStartIndex:r.rowIndex,rowStartPinned:r.rowPinned,rowEndIndex:s.rowIndex,rowEndPinned:s.rowPinned,columnStart:i.startColumn,columns:i.columns};n.addCellRange(a)})}processCell(e){const t=e[0],{rowIndex:n,rowPinned:i}=t,o={rowIndex:n,rowPinned:i},r=Do(this.beans,o),s={rowPinned:t.rowPinned,rowIndex:r.rowIndex,columnId:t.columnId};this.setLastFocusedCell(s)}setLastFocusedCell(e){const{rowIndex:t,columnId:n,rowPinned:i}=e,{colModel:o,focusSvc:r,rangeSvc:s}=this.beans,a=o.getCol(n);if(!a)return;const{scrollFeature:l}=this.gridBodyCtrl;l.ensureIndexVisible(t),l.ensureColumnVisible(a);const u={rowIndex:t,column:a,rowPinned:i};r.setFocusedCell({...u,forceBrowserFocus:!0}),s?.setRangeToCell(u)}addListeners(){this.addManagedEventListeners({rowEditingStarted:e=>{this.activeRowEdit={rowIndex:e.rowIndex,rowPinned:e.rowPinned}},rowEditingStopped:()=>{const e=new ll(this.cellValueChanges);this.pushActionsToUndoStack(e),this.activeRowEdit=null},cellEditingStarted:e=>{this.activeCellEdit={column:e.column,rowIndex:e.rowIndex,rowPinned:e.rowPinned}},cellEditingStopped:e=>{if(this.activeCellEdit=null,e.valueChanged&&!this.activeRowEdit&&!this.isPasting&&!this.isRangeInAction){const n=new ll(this.cellValueChanges);this.pushActionsToUndoStack(n)}},pasteStart:()=>{this.isPasting=!0},pasteEnd:()=>{const e=new ll(this.cellValueChanges);this.pushActionsToUndoStack(e),this.isPasting=!1},fillStart:()=>{this.isRangeInAction=!0},fillEnd:e=>{const t=new av(this.cellValueChanges,e.initialRange,e.finalRange);this.pushActionsToUndoStack(t),this.isRangeInAction=!1},keyShortcutChangedCellStart:()=>{this.isRangeInAction=!0},keyShortcutChangedCellEnd:()=>{let e;const{rangeSvc:t,gos:n}=this.beans;t&&nr(n)?e=new av(this.cellValueChanges,void 0,void 0,[...t.getCellRanges()]):e=new ll(this.cellValueChanges),this.pushActionsToUndoStack(e),this.isRangeInAction=!1},batchEditingStarted:()=>this.startBigChange("batchEditing"),batchEditingStopped:({changes:e})=>this.stopBigChange("batchEditing",e),bulkEditingStarted:()=>this.startBigChange("bulkEditing"),bulkEditingStopped:({changes:e})=>this.stopBigChange("bulkEditing",e)})}startBigChange(e){this.updateBigChange(e,!0)}updateBigChange(e,t){e==="bulkEditing"?this.bulkEditing=t:this.batchEditing=t}stopBigChange(e,t){if(e==="bulkEditing"&&!this.bulkEditing||e==="batchEditing"&&!this.batchEditing||(this.updateBigChange(e,!1),t?.length===0))return;const n=new ll(t??[]);this.pushActionsToUndoStack(n),this.cellValueChanges=[]}pushActionsToUndoStack(e){this.undoStack.push(e),this.cellValueChanges=[],this.redoStack.clear()}},c6=".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{display:block;height:auto;padding:var(--ag-cell-horizontal-padding)}:where(.ag-rtl .ag-large-text-input) .ag-text-area-input{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}.ag-popup-editor{position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none}",u6={tag:"div",cls:"ag-cell-wrapper ag-cell-edit-wrapper ag-checkbox-edit",children:[{tag:"ag-checkbox",ref:"eEditor",role:"presentation"}]},d6=class extends Yd{constructor(){super(u6,[Am]),this.eEditor=he}initialiseEditor(e){this.agSetEditValue(e.value),this.eEditor.getInputElement().setAttribute("tabindex","-1"),this.addManagedListeners(this.eEditor,{fieldValueChanged:n=>this.setAriaLabel(n.selected)})}agSetEditValue(e){this.params.value=e;const t=e??void 0;this.eEditor.setValue(t,!0),this.setAriaLabel(t)}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(),n=xd(t,e),i=t("ariaToggleCellValue","Press SPACE to toggle cell value");this.eEditor.setInputAriaLabel(`${i} (${n})`)}getValidationElement(e){return e?this.params.eGridCell:this.eEditor.getInputElement()}getValidationErrors(){const{params:e}=this,{getValidationErrors:t}=e,n=this.getValue();return t?t({value:n,internalErrors:null,cellEditorParams:e}):null}},ar=class extends Us{constructor(e,t="ag-text-field",n="text"){super(e,t,n)}postConstruct(){super.postConstruct(),this.config.allowedCharPattern&&this.preventDisallowedCharacters()}setValue(e,t){const n=this.eInput;return n.value!==e&&(n.value=we(e)?e:""),super.setValue(e,t)}setStartValue(e){this.setValue(e,!0)}setCustomValidity(e){const t=this.eInput,n=e.length>0;t.setCustomValidity(e),n&&t.reportValidity(),fg(t,n)}preventDisallowedCharacters(){const e=new RegExp(`[${this.config.allowedCharPattern}]`),t=n=>{CR(n)&&n.key&&!e.test(n.key)&&n.preventDefault()};this.addManagedListeners(this.eInput,{keydown:t,paste:n=>{n.clipboardData?.getData("text")?.split("").some(o=>!e.test(o))&&n.preventDefault()}})}},Eh={selector:"AG-INPUT-TEXT-FIELD",component:ar},h6=class extends ar{constructor(e){super(e,"ag-date-field","date")}postConstruct(){super.postConstruct();const e=Ur();this.addManagedListeners(this.eInput,{wheel:this.onWheel.bind(this),mousedown:()=>{this.isDisabled()||e||this.eInput.focus()}}),this.eInput.step="any"}onWheel(e){It(this.beans)===this.eInput&&e.preventDefault()}setMin(e){const t=e instanceof Date?Un(e??null,!!this.includeTime)??void 0:e;return this.min===t?this:(this.min=t,ti(this.eInput,"min",t),this)}setMax(e){const t=e instanceof Date?Un(e??null,!!this.includeTime)??void 0:e;return this.max===t?this:(this.max=t,ti(this.eInput,"max",t),this)}setStep(e){return this.step===e?this:(this.step=e,ti(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 $n(this.getValue())??void 0}setDate(e,t){this.setValue(Un(e??null,this.includeTime),t)}},bx={selector:"AG-INPUT-DATE-FIELD",component:h6},Dh=class extends Yd{constructor(e){super(),this.cellEditorInput=e,this.eEditor=he}initialiseEditor(e){const{cellEditorInput:t}=this;this.setTemplate({tag:"div",cls:"ag-cell-edit-wrapper",children:[t.getTemplate()]},t.getAgComponents());const{eEditor:n}=this,{cellStartedEdit:i,eventKey:o,suppressPreventDefault:r}=e;n.getInputElement().setAttribute("title",""),t.init(n,e);let s,a=!0;i?(this.focusAfterAttached=!0,o===q.BACKSPACE||o===q.DELETE?s="":o&&o.length===1?r?a=!1:s=o:(s=t.getStartValue(),o!==q.F2&&(this.highlightAllOnFocus=!0))):(this.focusAfterAttached=!1,s=t.getStartValue()),a&&s!=null&&n.setStartValue(s),this.addGuiEventListener("keydown",l=>{const{key:u}=l;(u===q.PAGE_UP||u===q.PAGE_DOWN)&&l.preventDefault()})}afterGuiAttached(){const e=this.getLocaleTextFunc(),t=this.eEditor;if(t.setInputAriaLabel(e("ariaInputEditor","Input Editor")),!this.focusAfterAttached)return;Ur()||t.getFocusableElement().focus();const n=t.getInputElement();this.highlightAllOnFocus?n.select():this.cellEditorInput.setCaret?.()}focusIn(){const{eEditor:e}=this,t=e.getFocusableElement(),n=e.getInputElement();t.focus(),n.select()}getValue(){return this.cellEditorInput.getValue()}agSetEditValue(e){this.params.value=e;const t=this.cellEditorInput.getStartValue();this.eEditor.setStartValue(t??null)}isPopup(){return!1}getValidationElement(){return this.eEditor.getInputElement()}getValidationErrors(){return this.cellEditorInput.getValidationErrors()}},f6={tag:"ag-input-date-field",ref:"eEditor",cls:"ag-cell-editor"},p6=class{constructor(e,t){this.getDataTypeService=e,this.getLocaleTextFunc=t}getTemplate(){return f6}getAgComponents(){return[bx]}init(e,t){this.eEditor=e,this.params=t;const{min:n,max:i,step:o,colDef:r}=t;n!=null&&e.setMin(n),i!=null&&e.setMax(i),o!=null&&e.setStep(o),this.includeTime=t.includeTime??this.getDataTypeService()?.getDateIncludesTimeFlag?.(r.cellDataType),this.includeTime!=null&&e.setIncludeTime(this.includeTime)}getValidationErrors(){const t=this.eEditor.getInputElement().valueAsDate,{params:n}=this,{min:i,max:o,getValidationErrors:r}=n;let s=[];const a=this.getLocaleTextFunc();if(t instanceof Date&&!isNaN(t.getTime())){if(i){const l=i instanceof Date?i:new Date(i);if(t<l){const u=l.toLocaleDateString();s.push(a("minDateValidation",`Date must be after ${u}`,[u]))}}if(o){const l=o instanceof Date?o:new Date(o);if(t>l){const u=l.toLocaleDateString();s.push(a("maxDateValidation",`Date must be before ${u}`,[u]))}}}return s.length||(s=null),r?r({value:t,cellEditorParams:n,internalErrors:s}):s}getValue(){const{eEditor:e,params:t}=this,n=e.getDate();return!we(n)&&!we(t.value)?t.value:n??null}getStartValue(){const{value:e}=this.params;if(e instanceof Date)return Un(e,this.includeTime??!1)}},g6=class extends Dh{constructor(){super(new p6(()=>this.beans.dataTypeSvc,()=>this.getLocaleTextFunc()))}},m6={tag:"ag-input-date-field",ref:"eEditor",cls:"ag-cell-editor"},v6=class{constructor(e,t){this.getDataTypeService=e,this.getLocaleTextFunc=t}getTemplate(){return m6}getAgComponents(){return[bx]}init(e,t){this.eEditor=e,this.params=t;const{min:n,max:i,step:o,colDef:r}=t;n!=null&&e.setMin(n),i!=null&&e.setMax(i),o!=null&&e.setStep(o),this.includeTime=t.includeTime??this.getDataTypeService()?.getDateIncludesTimeFlag?.(r.cellDataType),this.includeTime!=null&&e.setIncludeTime(this.includeTime)}getValidationErrors(){const{eEditor:e,params:t}=this,n=e.getInputElement().value,i=this.formatDate(this.parseDate(n??void 0)),{min:o,max:r,getValidationErrors:s}=t;let a=[];if(i){const l=new Date(i),u=this.getLocaleTextFunc();if(o){const h=new Date(o);if(l<h){const f=h.toLocaleDateString();a.push(u("minDateValidation",`Date must be after ${f}`,[f]))}}if(r){const h=new Date(r);if(l>h){const f=h.toLocaleDateString();a.push(u("maxDateValidation",`Date must be before ${f}`,[f]))}}}return a.length||(a=null),s?s({value:this.getValue(),cellEditorParams:t,internalErrors:a}):a}getValue(){const{params:e,eEditor:t}=this,n=this.formatDate(t.getDate());return!we(n)&&!we(e.value)?e.value:e.parseValue(n??"")}getStartValue(){return Un(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):$n(e)??void 0}formatDate(e){const t=this.getDataTypeService();return t?t.getDateFormatterFunction(this.params.column)(e):Un(e??null,this.includeTime??!1)??void 0}},C6=class extends Dh{constructor(){super(new v6(()=>this.beans.dataTypeSvc,()=>this.getLocaleTextFunc()))}},w6=class extends Us{constructor(e){super(e,"ag-text-area",null,"textarea")}setValue(e,t){const n=super.setValue(e,t);return this.eInput.value=e,n}setCols(e){return this.eInput.cols=e,this}setRows(e){return this.eInput.rows=e,this}},b6={selector:"AG-INPUT-TEXT-AREA",component:w6},y6={tag:"div",cls:"ag-large-text",children:[{tag:"ag-input-text-area",ref:"eEditor",cls:"ag-large-text-input"}]},S6=class extends Yd{constructor(){super(y6,[b6]),this.eEditor=he}initialiseEditor(e){const{eEditor:t}=this,{cellStartedEdit:n,eventKey:i,maxLength:o,cols:r,rows:s}=e;this.focusAfterAttached=n,t.getInputElement().setAttribute("title",""),t.setMaxLength(o||200).setCols(r||60).setRows(s||10);let a;n?(this.focusAfterAttached=!0,i===q.BACKSPACE||i===q.DELETE?a="":i&&i.length===1?a=i:(a=this.getStartValue(e),i!==q.F2&&(this.highlightAllOnFocus=!0))):(this.focusAfterAttached=!1,a=this.getStartValue(e)),a!=null&&t.setValue(a,!0),this.addGuiEventListener("keydown",this.onKeyDown.bind(this)),this.activateTabIndex()}getStartValue(e){const{value:t}=e;return t?.toString()??t}agSetEditValue(e){this.params.value=e;const t=this.getStartValue(this.params);this.eEditor.setValue(t??"",!0)}onKeyDown(e){const t=e.key;(t===q.LEFT||t===q.UP||t===q.RIGHT||t===q.DOWN||e.shiftKey&&t===q.ENTER)&&e.stopPropagation()}afterGuiAttached(){const{eEditor:e,focusAfterAttached:t,highlightAllOnFocus:n}=this,i=this.getLocaleTextFunc();e.setInputAriaLabel(i("ariaInputEditor","Input Editor")),t&&(e.getFocusableElement().focus(),n&&e.getInputElement().select())}getValue(){const{eEditor:e,params:t}=this,{value:n}=t,i=e.getValue();return!we(i)&&!we(n)?n:t.parseValue(i)}getValidationElement(){return this.eEditor.getInputElement()}getValidationErrors(){const{params:e}=this,{maxLength:t,getValidationErrors:n}=e,i=this.getLocaleTextFunc(),o=this.getValue();let r=[];return typeof o=="string"&&t!=null&&o.length>t&&r.push(i("maxLengthValidation",`Must be ${t} characters or fewer.`,[String(t)])),r.length||(r=null),n?n({value:o,internalErrors:r,cellEditorParams:e}):r}},lv=class extends ar{constructor(e){super(e,"ag-number-field","number")}postConstruct(){super.postConstruct();const e=this.eInput;this.addManagedListeners(e,{blur:()=>{const r=Number.parseFloat(e.value),s=isNaN(r)?"":this.normalizeValue(r.toString());this.value!==s&&this.setValue(s)},wheel:this.onWheel.bind(this)}),e.step="any";const{precision:t,min:n,max:i,step:o}=this.config;typeof t=="number"&&this.setPrecision(t),typeof n=="number"&&this.setMin(n),typeof i=="number"&&this.setMax(i),typeof o=="number"&&this.setStep(o)}onWheel(e){It(this.beans)===this.eInput&&e.preventDefault()}normalizeValue(e){return e===""?"":(this.precision!=null&&(e=this.adjustPrecision(e)),e)}adjustPrecision(e,t){const n=this.precision;if(n==null)return e;if(t){const o=Number.parseFloat(e).toFixed(n);return Number.parseFloat(o).toString()}const i=String(e).split(".");if(i.length>1){if(i[1].length<=n)return e;if(n>0)return`${i[0]}.${i[1].slice(0,n)}`}return i[0]}setMin(e){return this.min===e?this:(this.min=e,ti(this.eInput,"min",e),this)}setMax(e){return this.max===e?this:(this.max=e,ti(this.eInput,"max",e),this)}setPrecision(e){return this.precision=e,this}setStep(e){return this.step===e?this:(this.step=e,ti(this.eInput,"step",e),this)}setValue(e,t){return this.setValueOrInputValue(n=>super.setValue(n,t),()=>this,e)}setStartValue(e){return this.setValueOrInputValue(t=>super.setValue(t,!0),t=>{this.eInput.value=t},e)}setValueOrInputValue(e,t,n){if(we(n)){let i=this.isScientificNotation(n);if(i&&this.eInput.validity.valid)return e(n);if(!i){n=this.adjustPrecision(n);const o=this.normalizeValue(n);i=n!=o}if(i)return t(n)}return e(n)}getValue(e=!1){const t=this.eInput;if(!t.validity.valid&&!e)return;const n=t.value;return this.isScientificNotation(n)?this.adjustPrecision(n,!0):super.getValue()}isScientificNotation(e){return typeof e=="string"&&e.includes("e")}},R6={selector:"AG-INPUT-NUMBER-FIELD",component:lv},F6={tag:"ag-input-number-field",ref:"eEditor",cls:"ag-cell-editor"},x6=class{constructor(e){this.getLocaleTextFunc=e}getTemplate(){return F6}getAgComponents(){return[R6]}init(e,t){this.eEditor=e,this.params=t;const{max:n,min:i,precision:o,step:r}=t;n!=null&&e.setMax(n),i!=null&&e.setMin(i),o!=null&&e.setPrecision(o),r!=null&&e.setStep(r);const s=e.getInputElement();t.preventStepping?e.addManagedElementListeners(s,{keydown:this.preventStepping}):t.showStepperButtons&&s.classList.add("ag-number-field-input-stepper")}getValidationErrors(){const{params:e}=this,{min:t,max:n,getValidationErrors:i}=e,r=this.eEditor.getInputElement().valueAsNumber,s=this.getLocaleTextFunc();let a=[];return typeof r=="number"&&(t!=null&&r<t&&a.push(s("minValueValidation",`Must be greater than or equal to ${t}.`,[String(t)])),n!=null&&r>n&&a.push(s("maxValueValidation",`Must be less than or equal to ${n}.`,[String(n)]))),a.length||(a=null),i?i({value:r,cellEditorParams:e,internalErrors:a}):a}preventStepping(e){(e.key===q.UP||e.key===q.DOWN)&&e.preventDefault()}getValue(){const{eEditor:e,params:t}=this,n=e.getValue();if(!we(n)&&!we(t.value))return t.value;let i=t.parseValue(n);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(){Ur()&&this.eEditor.getInputElement().focus({preventScroll:!0})}},P6=class extends Dh{constructor(){super(new x6(()=>this.getLocaleTextFunc()))}},E6=".ag-list-item{align-items:center;display:flex;height:var(--ag-list-item-height);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;&.ag-active-item{background-color:var(--ag-row-hover-color)}}",D6="ag-active-item",T6=(e,t)=>({tag:"div",cls:`ag-list-item ag-${e}-list-item`,attrs:{role:"option"},children:[{tag:"span",cls:`ag-list-item-text ag-${e}-list-item-text`,ref:"eText",children:t}]}),A6=class extends Qa{constructor(e,t,n){super(T6(e,t)),this.label=t,this.value=n,this.eText=he}postConstruct(){this.createTooltip(),this.addEventListeners()}setHighlighted(e){const t=this.getGui();t.classList.toggle(D6,e),MS(t,e),this.dispatchLocalEvent({type:"itemHighlighted",highlighted:e})}getHeight(){return this.getGui().clientHeight}setIndex(e,t){const n=this.getGui();hL(n,e),dL(n,t)}createTooltip(){const e={getTooltipValue:()=>this.label,getGui:()=>this.getGui(),getLocation:()=>"UNKNOWN",shouldDisplayTooltip:()=>HS(this.eText)},t=this.createOptionalManagedBean(this.beans.registry.createDynamicBean("highlightTooltipFeature",!1,e,this));t&&(this.tooltipFeature=t)}addEventListeners(){const e=this.getParentComponent();e&&(this.addGuiEventListener("mouseover",()=>{e.highlightItem(this)}),this.addGuiEventListener("mousedown",t=>{t.preventDefault(),t.stopPropagation(),e.setValue(this.value)}))}},I6=class extends Qa{constructor(e="default"){super({tag:"div",cls:`ag-list ag-${e}-list`}),this.cssIdentifier=e,this.options=[],this.listItems=[],this.highlightedItem=null,this.registerCSS(E6)}postConstruct(){const e=this.getGui();this.addManagedElementListeners(e,{mouseleave:()=>this.clearHighlighted()})}handleKeyDown(e){const t=e.key;switch(t){case q.ENTER:if(!this.highlightedItem)this.setValue(this.getValue());else{const n=this.listItems.indexOf(this.highlightedItem);this.setValueByIndex(n)}break;case q.DOWN:case q.UP:e.preventDefault(),this.navigate(t);break;case q.PAGE_DOWN:case q.PAGE_UP:case q.PAGE_HOME:case q.PAGE_END:e.preventDefault(),this.navigateToPage(t);break}}addOptions(e){for(const t of e)this.addOption(t);return this}addOption(e){const{value:t,text:n}=e,i=n??t;return this.options.push({value:t,text:i}),this.renderOption(t,i),this.updateIndices(),this}clearOptions(){this.options=[],this.reset(!0);for(const e of this.listItems)e.destroy();bn(this.getGui()),this.listItems=[],this.refreshAriaRole()}updateOptions(e){const t=this.options!==e;return t&&(this.clearOptions(),this.addOptions(e)),t}setValue(e,t){if(this.value===e)return this.fireItemSelected(),this;if(e==null)return this.reset(t),this;const n=this.options.findIndex(i=>i.value===e);if(n!==-1){const i=this.options[n];this.value=i.value,this.displayValue=i.text,this.highlightItem(this.listItems[n]),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.listItems[e])}highlightItem(e){const t=e.getGui();if(!ki(t))return;this.clearHighlighted(),e.setHighlighted(!0),this.highlightedItem=e;const n=this.getGui(),{scrollTop:i,clientHeight:o}=n,{offsetTop:r,offsetHeight:s}=t;(r+s>i+o||r<i)&&t.scrollIntoView({block:"nearest"})}hideItemTooltip(){this.highlightedItem?.tooltipFeature?.attemptToHideTooltip()}destroy(){this.hideItemTooltip(),super.destroy()}reset(e){this.value=null,this.displayValue=null,this.clearHighlighted(),e||this.fireChangeEvent()}clearHighlighted(){this.highlightedItem?.setHighlighted(!1),this.highlightedItem=null}renderOption(e,t){const n=new A6(this.cssIdentifier,t,e);n.setParentComponent(this);const i=this.createManagedBean(n);this.listItems.push(i),this.getGui().appendChild(i.getGui())}navigate(e){const t=e===q.DOWN;let n;const{listItems:i,highlightedItem:o}=this;if(!o)n=t?i[0]:Pt(i);else{let s=i.indexOf(o)+(t?1:-1);s=Math.min(Math.max(s,0),i.length-1),n=i[s]}this.highlightItem(n)}navigateToPage(e){const{listItems:t,highlightedItem:n}=this;if(!n||t.length===0)return;const i=t.indexOf(n),o=this.options.length-1,r=t[0].getHeight(),s=Math.floor(this.getGui().clientHeight/r);let a=-1;e===q.PAGE_HOME?a=0:e===q.PAGE_END?a=o:e===q.PAGE_DOWN?a=Math.min(i+s,o):e===q.PAGE_UP&&(a=Math.max(i-s,0)),a!==-1&&this.highlightItem(t[a])}refreshAriaRole(){Or(this.getGui(),this.options.length===0?"presentation":"listbox")}updateIndices(){this.refreshAriaRole();const e=this.listItems,t=e.length;e.forEach((n,i)=>{n.setIndex(i+1,t)})}fireChangeEvent(){this.dispatchLocalEvent({type:"fieldValueChanged"}),this.fireItemSelected()}fireItemSelected(){this.dispatchLocalEvent({type:"selectedItem"})}},M6=".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(.invalid){background-color:var(--ag-input-invalid-background-color);border:var(--ag-input-invalid-border);color:var(--ag-input-invalid-text-color)}}.ag-picker-field-wrapper:where(.ag-picker-has-focus),.ag-picker-field-wrapper: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)}}.ag-picker-field-wrapper:disabled{opacity:.5}",k6={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"}}]}]},L6=class extends JR{constructor(e){if(super(e,e?.template||k6,e?.agComponents||[],e?.className),this.isPickerDisplayed=!1,this.skipClick=!1,this.pickerGap=4,this.hideCurrentPicker=null,this.eLabel=he,this.eWrapper=he,this.eDisplayField=he,this.eIcon=he,this.registerCSS(M6),this.ariaRole=e?.ariaRole,this.onPickerFocusIn=this.onPickerFocusIn.bind(this),this.onPickerFocusOut=this.onPickerFocusOut.bind(this),!e)return;const{pickerGap:t,maxPickerHeight:n,variableWidth:i,minPickerWidth:o,maxPickerWidth:r}=e;t!=null&&(this.pickerGap=t),this.variableWidth=!!i,n!=null&&this.setPickerMaxHeight(n),o!=null&&this.setPickerMinWidth(o),r!=null&&this.setPickerMaxWidth(r)}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:n,inputWidth:i}=this.config;if(n){const o=this.beans.iconSvc.createIconNoSpan(n);o&&this.eIcon.appendChild(o)}i!=null&&this.setInputWidth(i)}setupAria(){const e=this.getAriaElement();e.setAttribute("tabindex",this.gos.get("tabIndex").toString()),pg(e,!1),this.ariaRole&&Or(e,this.ariaRole)}onLabelOrWrapperMouseDown(e){if(e){const t=this.getFocusableElement();if(t!==this.eWrapper&&e?.target===t)return;e.preventDefault(),this.getFocusableElement().focus()}if(this.skipClick){this.skipClick=!1;return}this.isDisabled()||(this.isPickerDisplayed?this.hidePicker():this.showPicker())}onKeyDown(e){switch(e.key){case q.UP:case q.DOWN:case q.ENTER:case q.SPACE:e.preventDefault(),this.onLabelOrWrapperMouseDown();break;case q.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:n,pickerAriaLabelValue:i,modalPicker:o=!0},maxPickerHeight:r,minPickerWidth:s,maxPickerWidth:a,variableWidth:l,beans:u,eWrapper:h}=this,f={modal:o,eChild:e,closeOnEsc:!0,closedCallback:()=>{const w=ug(u);this.beforeHidePicker(),w&&this.isAlive()&&this.getFocusableElement().focus()},ariaLabel:t(n,i),anchorToElement:h};e.style.position="absolute";const p=u.popupSvc,m=p.addPopup(f);l?(s&&(e.style.minWidth=s),e.style.width=vg(Pd(h)),a&&(e.style.maxWidth=a)):Td(e,a??Pd(h));const v=r??`${gg(p.getPopupParent())}px`;return e.style.setProperty("max-height",v),this.alignPickerToComponent(),m.hideFunc}alignPickerToComponent(){if(!this.pickerComponent)return;const{pickerGap:e,config:{pickerType:t},beans:{popupSvc:n,gos:i},eWrapper:o,pickerComponent:r}=this,s=i.get("enableRtl")?"right":"left";n.positionPopupByComponent({type:t,eventSource:o,ePopup:r.getGui(),position:"under",alignSide:s,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();pg(t,e);const n=this.eWrapper.classList;n.toggle("ag-picker-expanded",e),n.toggle("ag-picker-collapsed",!e)}onPickerFocusIn(){this.togglePickerHasFocus(!0)}onPickerFocusOut(e){this.pickerComponent?.getGui().contains(e.relatedTarget)||this.togglePickerHasFocus(!1)}togglePickerHasFocus(e){this.pickerComponent&&this.eWrapper.classList.toggle("ag-picker-has-focus",e)}hidePicker(){this.hideCurrentPicker&&(this.hideCurrentPicker(),this.dispatchLocalEvent({type:"pickerHidden"}))}setInputWidth(e){return Td(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()}},O6=".ag-select{align-items:center;display:flex;&.ag-disabled{opacity:.5}}.ag-select:where(:not(.ag-cell-editor,.ag-label-align-top)){min-height:var(--ag-list-item-height)}:where(.ag-select){.ag-picker-field-wrapper{cursor:default;padding-left:var(--ag-spacing);padding-right:var(--ag-spacing)}&.ag-disabled .ag-picker-field-wrapper:focus{box-shadow:none}.ag-picker-field-display{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ag-picker-field-icon{align-items:center;display:flex}}.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-select-list-item{cursor:default;-webkit-user-select:none;-moz-user-select:none;user-select:none}:where(.ag-ltr) .ag-select-list-item{padding-left:var(--ag-spacing)}:where(.ag-rtl) .ag-select-list-item{padding-right:var(--ag-spacing)}.ag-select-list-item-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}",cv=class extends L6{constructor(e){super({pickerAriaLabelKey:"ariaLabelSelectField",pickerAriaLabelValue:"Select Field",pickerType:"ag-list",className:"ag-select",pickerIcon:"selectOpen",ariaRole:"combobox",...e}),this.registerCSS(O6)}postConstruct(){this.tooltipFeature=this.createOptionalManagedBean(this.beans.registry.createDynamicBean("tooltipFeature",!1,{shouldDisplayTooltip:pc(()=>this.eDisplayField),getGui:()=>this.getGui()})),super.postConstruct(),this.createListComponent(),this.eWrapper.tabIndex=this.gos.get("tabIndex");const{options:e,value:t,placeholder:n}=this.config;e!=null&&this.addOptions(e),t!=null&&this.setValue(t,!0),n&&t==null&&(this.eDisplayField.textContent=n),this.addManagedElementListeners(this.eWrapper,{focusout:this.onWrapperFocusOut.bind(this)})}onWrapperFocusOut(e){this.eWrapper.contains(e.relatedTarget)||this.hidePicker()}createListComponent(){const e=this.createBean(new I6("select"));this.listComponent=e,e.setParentComponent(this);const t=e.getAriaElement(),n=`ag-select-list-${e.getCompId()}`;t.setAttribute("id",n),yL(this.getAriaElement(),t),e.addManagedElementListeners(e.getGui(),{mousedown:i=>{i?.preventDefault()}}),e.addManagedListeners(e,{selectedItem:()=>{this.hidePicker(),this.dispatchLocalEvent({type:"selectedItem"})},fieldValueChanged:()=>{this.listComponent&&(this.setValue(this.listComponent.getValue(),!1,!0),this.hidePicker())}})}createPickerComponent(){return this.listComponent}beforeHidePicker(){this.listComponent?.hideItemTooltip(),super.beforeHidePicker()}onKeyDown(e){const{key:t}=e;switch(t===q.TAB&&this.hidePicker(),t){case q.ENTER:case q.UP:case q.DOWN:case q.PAGE_UP:case q.PAGE_DOWN:case q.PAGE_HOME:case q.PAGE_END:e.preventDefault(),this.isPickerDisplayed?this.listComponent?.handleKeyDown(e):super.onKeyDown(e);break;case q.ESCAPE:super.onKeyDown(e);break;case q.SPACE:this.isPickerDisplayed?e.preventDefault():super.onKeyDown(e);break}}showPicker(){const e=this.listComponent;e&&(super.showPicker(),e.refreshHighlighted())}addOptions(e){for(const t of e)this.addOption(t);return this}addOption(e){return this.listComponent.addOption(e),this}clearOptions(){return this.listComponent?.clearOptions(),this.setValue(void 0,!0),this}updateOptions(e){return this.listComponent?.updateOptions(e)&&this.setValue(void 0,!0),this}setValue(e,t,n){const{listComponent:i,config:{placeholder:o},eDisplayField:r,tooltipFeature:s}=this;if(this.value===e||!i)return this;if(n||i.setValue(e,!0),i.getValue()===this.getValue())return this;let l=i.getDisplayValue();return l==null&&o&&(l=o),r.textContent=l,s?.setTooltipAndRefresh(l??null),super.setValue(e,t)}destroy(){this.listComponent=this.destroyBean(this.listComponent),super.destroy()}},_6={selector:"AG-SELECT",component:cv},N6={tag:"div",cls:"ag-cell-edit-wrapper",children:[{tag:"ag-select",ref:"eEditor",cls:"ag-cell-editor"}]},B6=class extends Yd{constructor(){super(N6,[_6]),this.eEditor=he,this.startedByEnter=!1}wireBeans(e){this.valueSvc=e.valueSvc}initialiseEditor(e){this.focusAfterAttached=e.cellStartedEdit;const{eEditor:t,valueSvc:n,gos:i}=this,{values:o,value:r,eventKey:s}=e;if(Nt(o)){se(58);return}this.startedByEnter=s!=null?s===q.ENTER:!1;let a=!1;o.forEach(f=>{const p={value:f},m=n.formatValue(e.column,null,f),v=m!=null;p.text=v?m:f,t.addOption(p),a=a||r===f}),a?t.setValue(e.value??void 0,!0):e.values.length&&t.setValue(e.values[0],!0);const{valueListGap:l,valueListMaxWidth:u,valueListMaxHeight:h}=e;l!=null&&t.setPickerGap(l),h!=null&&t.setPickerMaxHeight(h),u!=null&&t.setPickerMaxWidth(u),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()}agSetEditValue(e){this.params.value=e,this.eEditor.setValue(e??void 0,!0)}getValue(){return this.eEditor.getValue()}isPopup(){return!1}getValidationElement(){return this.eEditor.getAriaElement()}getValidationErrors(){const{params:e}=this,{values:t,getValidationErrors:n}=e,i=this.getValue();let o=[];if(t&&i!=null&&!t.includes(i)){const r=this.getLocaleTextFunc();o.push(r("invalidSelectionValidation","Invalid selection."))}else o=null;return n?n({value:i,internalErrors:o,cellEditorParams:e}):o}},G6={tag:"ag-input-text-field",ref:"eEditor",cls:"ag-cell-editor"},H6=class{constructor(e){this.getLocaleTextFunc=e}getTemplate(){return G6}getAgComponents(){return[Eh]}init(e,t){this.eEditor=e,this.params=t;const n=t.maxLength;n!=null&&e.setMaxLength(n)}getValidationErrors(){const{params:e}=this,{maxLength:t,getValidationErrors:n}=e,i=this.getValue(),o=this.getLocaleTextFunc();let r=[];return t!=null&&typeof i=="string"&&i.length>t&&r.push(o("maxLengthValidation",`Must be ${t} characters or fewer.`,[String(t)])),r.length||(r=null),n?n({value:i,cellEditorParams:e,internalErrors:r}):r}getValue(){const{eEditor:e,params:t}=this,n=e.getValue();return!we(n)&&!we(t.value)?t.value:t.parseValue(n)}getStartValue(){const e=this.params;return e.useFormatter||e.column.getColDef().refData?e.formatValue(e.value):e.value}setCaret(){Ur()&&this.eEditor.getInputElement().focus({preventScroll:!0});const e=this.eEditor,t=e.getValue(),n=we(t)&&t.length||0;n&&e.getInputElement().setSelectionRange(n,n)}},yx=class extends Dh{constructor(){super(new H6(()=>this.getLocaleTextFunc()))}};function V6(e){e.undoRedo?.undo("api")}function W6(e){e.undoRedo?.redo("api")}function z6(e,t){return e.editModelSvc?.getEditRowDataValue(t,{checkSiblings:!0})}function U6(e){const t=e.editModelSvc?.getEditMap(),n=[];return t?.forEach((i,o)=>{const{rowIndex:r,rowPinned:s}=o;i.forEach((a,l)=>{const{editorValue:u,pendingValue:h,sourceValue:f,state:p}=a,m=so(a);let v=u??h;v===fn&&(v=void 0);const w={newValue:v,oldValue:f,state:p,column:l,colId:l.getColId(),colKey:l.getColId(),rowIndex:r,rowPinned:s},b=p==="editing";(b||!b&&m)&&n.push(w)})}),n}function $6(e,t=!1){const{editSvc:n}=e;if(n?.isBatchEditing()){if(t)for(const i of e.editModelSvc?.getEditPositions()??[])i.state==="editing"&&n.revertSingleCellEdit(i);else Yr(e,{persist:!0});Zr(e,void 0,{cancel:t})}else n?.stopEditing(void 0,{cancel:t,source:"edit",forceStop:!t,forceCancel:t})}function j6(e,t){const n=ft(e,t);return!!e.editSvc?.isEditing(n)}function K6(e,t){const{key:n,colKey:i,rowIndex:o,rowPinned:r}=t,{editSvc:s,colModel:a}=e,l=a.getCol(i);if(!l){se(12,{colKey:i});return}const h=Do(e,{rowIndex:o,rowPinned:r||null});if(!h){se(290,{rowIndex:o,rowPinned:r});return}if(!s?.isCellEditable({rowNode:h,column:l},"api"))return;r==null&&ix(e,o),nx(e,i),s?.startEditing({rowNode:h,column:l},{event:n?new KeyboardEvent("keydown",{key:n}):void 0,source:"api",editable:!0})}function q6(e){return e.editSvc?.validateEdit()||null}function Q6(e){return e.undoRedo?.getCurrentUndoStackSize()??0}function Y6(e){return e.undoRedo?.getCurrentRedoStackSize()??0}var Z6={tag:"div",cls:"ag-popup-editor",attrs:{tabindex:"-1"}},X6=class extends Qg{constructor(e){super(Z6),this.params=e}postConstruct(){Os(this.gos,this.getGui(),"popupEditorWrapper",!0),this.addKeyDownListener()}addKeyDownListener(){const e=this.getGui(),t=this.params,n=i=>{mm(this.gos,i,t.node,t.column,!0)||t.onKeyDown(i)};this.addManagedElementListeners(e,{keydown:n})}};function J6(e,{column:t},n,i,o="ui"){if(n instanceof KeyboardEvent&&(n.key===q.TAB||n.key===q.ENTER||n.key===q.F2||n.key===q.BACKSPACE&&i))return!0;if(n?.shiftKey&&e.rangeSvc?.getCellRanges().length!=0)return!1;const s=t?.getColDef(),a=e4(e.gos,s),l=n?.type;return l==="click"&&n?.detail===1&&a===1||l==="dblclick"&&n?.detail===2&&a===2?!0:o==="api"?!!i:!1}function e4(e,t){return e.get("suppressClickEdit")===!0?0:e.get("singleClickEdit")===!0||t?.singleClickEdit?1:2}function uv(e,t){return e.editModelSvc?.hasEdits(t,{withOpenEditor:!0})??!1}function dv(e,t){const n=t.column,i=t.rowNode,o=n.getColDef();if(!i)return uv(e,t);const r=o.editable;return i.group&&o.groupRowEditable!=null?e.rowGroupingEditValueSvc?.isGroupCellEditable(i,n)?!0:uv(e,t):n.isColumnFunc(i,r)?!0:uv(e,t)}function t4(e,t,n="ui"){const i=dv(e,t);if(i||n==="ui")return i;const{rowNode:o,column:r}=t;for(const s of e.colModel.getCols())if(s!==r&&dv(e,{rowNode:o,column:s}))return!0;return!1}var Th=(e,t=!1)=>{if(e!==void 0)return so(e)||t&&e.state==="editing"};function Sx(e,t,n=!1){return Th(e.editModelSvc?.getEdit(t),n)}var Rx=(e,t,n)=>{if(e)for(let i=0,o=e.length;i<o;++i){const r=e[i];if(r.data&&(Th(t?.getEdit({rowNode:r,column:n}))||Th(t?.getEdit({rowNode:r.pinnedSibling,column:n})))||Rx(r.childrenAfterGroup,t,n))return!0}};function Fx(e,t){const{column:n,rowNode:i}=t;return e.gos.get("groupTotalRow")&&!i?.footer?!1:Rx(i?.childrenAfterGroup,e.editModelSvc,n)}function xx(e,{rowNode:t,column:n}){if(t=t.pinnedSibling,!!t)return Th(e.editModelSvc?.getEdit({rowNode:t,column:n}))}var n4=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(){const{cellCtrl:e,editSvc:t,beans:n}=this;if(t?.isBatchEditing()&&t.isEditing()){const o=Sx(n,e)||Fx(n,e)||xx(n,e);this.applyBatchingStyle(o)}else this.applyBatchingStyle(!1);const i=!!this.editModelSvc?.getCellValidationModel().hasCellValidation(this.cellCtrl);this.cellComp.toggleCss("ag-cell-editing-error",i)}applyBatchingStyle(e){this.cellComp.toggleCss("ag-cell-editing",e??!1),this.cellComp.toggleCss("ag-cell-batch-edit",(e&&this.editSvc?.isBatchEditing())??!1)}},i4=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(){const{rowCtrl:e,editModelSvc:t,beans:n}=this;let i=e.rowNode,o=t?.getEditRow(i);const r=this.editModelSvc?.getRowValidationModel().hasRowValidation({rowNode:i});if(!o&&i.pinnedSibling&&(i=i.pinnedSibling,o=t?.getEditRow(i)),o){const s=Array.from(o.keys()).some(a=>{const l={rowNode:i,column:a};return Sx(n,l,!0)||Fx(n,l)||xx(n,l)});this.applyStyle(r,s);return}this.applyStyle(r)}applyStyle(e=!1,t=!1){const n=!!this.editSvc?.isBatchEditing(),i=this.gos.get("editType")==="fullRow";this.rowCtrl?.forEachGui(void 0,({rowComp:o})=>{o.toggleCss("ag-row-editing",i&&t),o.toggleCss("ag-row-batch-edit",i&&t&&n),o.toggleCss("ag-row-inline-editing",t),o.toggleCss("ag-row-not-inline-editing",!t),o.toggleCss("ag-row-editing-invalid",i&&t&&e)})}},o4=({rowModel:e,pinnedRowModel:t,editModelSvc:n},i)=>{const o=new Set;e.forEachNode(r=>i.has(r)&&o.add(r)),t?.forEachPinnedRow("top",r=>i.has(r)&&o.add(r)),t?.forEachPinnedRow("bottom",r=>i.has(r)&&o.add(r));for(const r of i)o.has(r)||n.removeEdits({rowNode:r});return o},r4=({editModelSvc:e},t,n)=>{for(const i of t)e?.getEditRow(i)?.forEach((o,r)=>!n.has(r)&&e.removeEdits({rowNode:i,column:r}))},s4=e=>()=>{const t=new Set(e.colModel.getCols()),n=e.editModelSvc.getEditMap(!0),i=new Set(n.keys());r4(e,o4(e,i),t)},a4=new Set(["undo","redo","paste","bulk","rangeSvc"]),l4=new Set(["ui","api"]),Px={paste:"api",rangeSvc:"api",fillHandle:"api",cellClear:"api",bulk:"api"},c4=new Set(Object.keys(Px)),u4=new Set(["paste","rangeSvc","cellClear","redo","undo"]),hv={cancel:!0,source:"api"},d4={cancel:!1,source:"api"},Xs={checkSiblings:!0},Jr={force:!0,suppressFlash:!0},h4={force:!0},f4=class extends X{constructor(){super(...arguments),this.beanName="editSvc",this.committing=!1,this.batch=!1,this.batchStartDispatched=!1,this.stopping=!1,this.rangeSelectionWhileEditing=0}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,hv),this.createStrategy(i)});const t=s4(e),n=()=>{const i=this.model.getCellValidationModel().getCellValidationMap().size>0,o=this.model.getRowValidationModel().getRowValidationMap().size>0;return i||o?this.stopEditing(void 0,hv):this.isEditing()&&(this.batch?Zr(e,this.model.getEditPositions()):this.stopEditing(void 0,d4)),!1};this.addManagedEventListeners({columnPinned:t,columnVisible:t,columnRowGroupChanged:t,rowExpansionStateChanged:t,pinnedRowsChanged:t,displayedRowsChanged:t,sortChanged:n,filterChanged:n,cellFocused:this.onCellFocused.bind(this)})}isBatchEditing(){return this.batch}startBatchEditing(){this.batch||(this.batch=!0,this.batchStartDispatched=!1,this.stopEditing(void 0,hv))}stopBatchEditing(e){this.batch&&(e&&this.stopEditing(void 0,e),this.batchStartDispatched&&this.dispatchBatchStopped(new Map,!1),this.batch=!1,this.batchStartDispatched=!1)}ensureBatchStarted(){!this.batch||this.batchStartDispatched||(this.batchStartDispatched=!0,this.dispatchBatchEvent("batchEditingStarted",new Map))}createStrategy(e){const{beans:t,gos:n,strategy:i}=this,o=Ex(n,e);if(i){if(i.beanName===o)return i;this.destroyStrategy()}return this.strategy=this.createOptionalManagedBean(t.registry.createDynamicBean(o,!0))}destroyStrategy(){this.strategy&&(this.strategy.destroy(),this.strategy=this.destroyBean(this.strategy))}shouldStartEditing(e,t,n,i="ui"){const o=J6(this.beans,e,t,n,i);return o&&(this.strategy??(this.strategy=this.createStrategy())),o}shouldStopEditing(e,t,n="ui"){return this.strategy?.shouldStop(e,t,n)??null}shouldCancelEditing(e,t,n="ui"){return this.strategy?.shouldCancel(e,t,n)??null}validateEdit(){return Q5(this.beans)}isEditing(e,t){return this.model.hasEdits(e??void 0,t??Xs)}isRowEditing(e,t){return!!e&&this.model.hasRowEdits(e,t)}enableRangeSelectionWhileEditing(){this.beans.rangeSvc&&this.gos.get("cellSelection")&&this.rangeSelectionWhileEditing++}disableRangeSelectionWhileEditing(){this.rangeSelectionWhileEditing=Math.max(0,this.rangeSelectionWhileEditing-1)}isRangeSelectionEnabledWhileEditing(){return this.rangeSelectionWhileEditing>0}startEditing(e,t){const{startedEdit:n=!0,event:i=null,source:o="ui",ignoreEventKey:r=!1,silent:s}=t;if(this.strategy??(this.strategy=this.createStrategy()),!(t.editable??this.isCellEditable(e,"api")))return;const l=ft(this.beans,e);if(l&&!l.comp){t.editable=void 0,l.onCompAttachedFuncs.push(()=>this.startEditing(e,t));return}const u=this.shouldStartEditing(e,i,n,o);if(u===!1&&o!=="api"){this.isEditing(e)&&this.stopEditing();return}!this.batch&&this.shouldStopEditing(e,void 0,o)&&!t.continueEditing&&this.stopEditing(void 0,{source:o}),u&&this.ensureBatchStarted(),this.strategy.start({position:e,event:i,source:o,ignoreEventKey:r,startedEdit:n,silent:s})}stopEditing(e,t){const n=this.prepareStopContext(e,t);if(!n)return!1;this.stopping=!0;let i=!1,{edits:o}=n;try{const r=this.processStopRequest(n);return i||(i=r.res),o=r.edits,this.finishStopEditing({...n,edits:o,params:t,position:e,res:i}),i}finally{this.rangeSelectionWhileEditing=0,this.stopping=!1}}prepareStopContext(e,t){const{event:n=null,cancel:i=!1,source:o="ui",forceCancel:r=!1,forceStop:s=!1,commit:a=!1}=t||{};if(c4.has(o)&&this.batch)return e?.rowNode&&e?.column&&this.bulkRefreshCell(e),null;const l=this.committing?Px[o]:o;if(!(this.committing||this.isEditing(e)||this.batch&&this.model.hasEdits(e,Xs))||!this.strategy||this.stopping)return null;const h=ft(this.beans,e);h&&(h.onEditorAttachedFuncs=[]);const f=!i&&(!!this.shouldStopEditing(e,n,l)||(this.committing||o==="paste")&&!this.batch)||s,p=i&&!!this.shouldCancelEditing(e,n,l)||r;return{cancel:i,cellCtrl:h,edits:this.model.getEditMap(!0),event:n??null,forceCancel:r,forceStop:s,commit:a,position:e,source:o,treatAsSource:l,willCancel:p,willStop:f}}processStopRequest(e){const{event:t,position:n,willCancel:i,willStop:o}=e;return o||i?this.handleStopOrCancel(e):this.shouldHandleMidBatchKey(t,n)?{res:!1,edits:this.handleMidBatchKey(t,n,e)}:(Yr(this.beans,{persist:!0}),this.batch&&this.strategy?.cleanupEditors(n),{res:!1,edits:this.model.getEditMap()})}handleStopOrCancel(e){const{beans:t,model:n}=this,{cancel:i,commit:o,edits:r,event:s,source:a,willCancel:l,willStop:u}=e,h=!this.batch||!l;Yr(t,{persist:h,isCancelling:l||i,isStopping:u});const f=n.getEditMap(),m=!l&&(!this.batch||o)?this.processEdits(f,a):[];i?this.strategy?.stopCancelled(e.forceCancel):this.strategy?.stopCommitted(s,o),this.clearValidationIfNoOpenEditors();for(const v of m)n.clearEditValue(v);this.bulkRefreshMap(r);for(const v of n.getEditPositions(f)){const w=ft(t,v),b=so(v);w?.refreshCell({force:!0,suppressFlash:!b})}return{res:u,edits:f}}shouldHandleMidBatchKey(e,t){return e instanceof KeyboardEvent&&this.batch&&!!this.strategy?.midBatchInputsAllowed(t)&&this.isEditing(t,{withOpenEditor:!0})}handleMidBatchKey(e,t,n){const{beans:i,model:o}=this,{cellCtrl:r,edits:s}=n,{key:a}=e,l=a===q.ENTER,u=a===q.ESCAPE,h=a===q.TAB;if(l||h||u){if(l||h)Yr(i,{persist:!0});else if(u&&r){const{rowNode:f,column:p}=r;if(this.batch&&f&&p){const m={rowNode:f,column:p};Zr(i,[m],{silent:!0}),this.model.stop(m,!0,!0),ft(i,m)?.refreshCell(Jr)}else this.revertSingleCellEdit(r)}return this.batch?this.strategy?.cleanupEditors():Zr(i,o.getEditPositions(),{event:e,cancel:u}),e.preventDefault(),this.bulkRefreshMap(s,{suppressFlash:!0}),o.getEditMap()}return s}finishStopEditing({cellCtrl:e,edits:t,params:n,position:i,res:o,commit:r,forceCancel:s,willCancel:a,willStop:l}){const u=this.beans;o&&i&&(!this.batch||r)&&this.model.removeEdits(i),this.navigateAfterEdit(n,e?.cellPosition),Lc(u),this.clearValidationIfNoOpenEditors();const{rowRenderer:h,formula:f}=u;if(a&&h.refreshRows({rowNodes:Array.from(t.keys())}),this.batch){f?f.refreshFormulas(!0):h.refreshRows({suppressFlash:!0,force:!0});const p=l&&r;(p||a&&s)&&this.dispatchBatchStopped(t,p)}}dispatchBatchStopped(e,t){let n;t&&(n=V5(e),n.size>0&&this.ensureBatchStarted()),this.batchStartDispatched&&(this.batchStartDispatched=!1,this.dispatchBatchEvent("batchEditingStopped",n??new Map))}clearValidationIfNoOpenEditors(){this.model.hasEdits(void 0,{withOpenEditor:!0})||(this.model.getCellValidationModel().clearCellValidationMap(),this.model.getRowValidationModel().clearRowValidationMap())}navigateAfterEdit(e,t){if(!e||!t)return;const{event:n,suppressNavigateAfterEdit:i}=e;if(!(n instanceof KeyboardEvent)||i)return;const{key:r,shiftKey:s}=n,a=this.gos.get("enterNavigatesVerticallyAfterEdit");if(r!==q.ENTER||!a)return;const l=s?q.UP:q.DOWN;this.beans.navigation?.navigateToNextCell(null,l,t,!1)}processEdits(e,t){const n=Array.from(e.keys()),i=this.model.getCellValidationModel().getCellValidationMap().size>0||this.model.getRowValidationModel().getRowValidationMap().size>0,o=[],{changeDetectionSvc:r}=this.beans;r?.beginDeferred();try{for(const s of n){const a=e.get(s);for(const l of a.keys()){const u=a.get(l),h={rowNode:s,column:l};if(so(u)&&!i){const f=ft(this.beans,h);this.setNodeDataValue(s,l,u.pendingValue,f,t)||o.push(h)}}}}finally{r?.endDeferred()}return o}setNodeDataValue(e,t,n,i,o="edit"){const r=l4.has(o)?"edit":o;i&&(i.suppressRefreshCell=!0),this.committing=!0;try{return e.setDataValue(t,n,r)}finally{this.committing=!1,i&&(i.suppressRefreshCell=!1)}}syncEditAfterCommit(e,t){const n=this.model.getEdit(e);n&&n.state!=="editing"&&(t?this.beans.editModelSvc?.setEdit(e,{sourceValue:n.pendingValue}):this.model.clearEditValue(e))}setEditMap(e,t){this.strategy??(this.strategy=this.createStrategy()),this.strategy?.setEditMap(e,t),this.bulkRefreshMap(e);let n=Jr;t?.forceRefreshOfEditCellsOnly&&(n={...p4(e),...Jr}),this.beans.rowRenderer.refreshCells(n)}dispatchEditValuesChanged({rowNode:e,column:t},n={}){if(!e||!t||!n)return;const{pendingValue:i,sourceValue:o}=n,{rowIndex:r,rowPinned:s,data:a}=e;this.beans.eventSvc.dispatchEvent({type:"cellEditValuesChanged",node:e,rowIndex:r,rowPinned:s,column:t,source:"api",data:a,newValue:i,oldValue:o,value:i,colDef:t.getColDef()})}bulkRefreshCell(e,t){Yt(this.gos,this.beans.rowModel)&&this.refCell(e,this.model.getEdit(e),t)}bulkRefreshMap(e,t){Yt(this.gos,this.beans.rowModel)&&e.forEach((n,i)=>{for(const o of n.keys())this.refCell({rowNode:i,column:o},n.get(o),t)})}refCell({rowNode:e,column:t},n,i={}){const{beans:o,gos:r}=this,s=new Set([e]),a=new Set,l=e.pinnedSibling;l&&s.add(l);const u=e.sibling;u&&a.add(u);let h=e.parent;for(;h;)h.sibling?.footer&&r.get("groupTotalRow")||!h.parent&&h.sibling&&r.get("grandTotalRow")?a.add(h.sibling):a.add(h),h=h.parent;for(const f of s)this.dispatchEditValuesChanged({rowNode:f,column:t},n);for(const f of s)ft(o,{rowNode:f,column:t})?.refreshCell(i);for(const f of a){const p=ft(o,{rowNode:f,column:t});p&&(p.refreshCell(i),!i.force&&this.batch&&p.editStyleFeature?.applyCellStyles?.())}}stopAllEditing(e=!1,t="ui"){this.isEditing()&&this.stopEditing(void 0,{cancel:e,source:t})}isCellEditable(e,t="ui"){const{gos:n,beans:i}=this,o=e.rowNode;if(o.group&&e.column.getColDef().groupRowEditable==null){if(n.get("treeData")){if(!o.data&&!n.get("enableGroupEdit"))return!1}else if(!n.get("enableGroupEdit"))return!1}const r=Ex(n)==="fullRow"?t4(i,e,t):dv(i,e);return r&&(this.strategy??(this.strategy=this.createStrategy())),r}cellEditingInvalidCommitBlocks(){return this.gos.get("invalidEditValueMode")==="block"}checkNavWithValidation(e,t,n=!0){if(this.hasValidationErrors(e)){const i=ft(this.beans,e);return this.cellEditingInvalidCommitBlocks()?(t?.preventDefault?.(),n&&(i&&!i.hasBrowserFocus()&&i.focusCell(),i?.comp?.getCellEditor()?.focusIn?.()),"block-stop"):(i&&this.revertSingleCellEdit(i),"revert-continue")}return"continue"}revertSingleCellEdit(e,t=!1){const n=ft(this.beans,e);n?.comp?.getCellEditor()&&(Zr(this.beans,[e],{silent:!0}),this.model.clearEditValue(e),qs(this.beans,e,{silent:!0}),Xr(this.beans),n?.refreshCell(Jr),t&&(n?.focusCell(),n?.comp?.getCellEditor()?.focusIn?.()))}hasValidationErrors(e){Xr(this.beans);const t=ft(this.beans,e);t&&(t.refreshCell(Jr),t.rowCtrl.rowEditStyleFeature?.applyRowStyles());let n=!1;return e?.rowNode?(n||(n=this.model.getRowValidationModel().hasRowValidation({rowNode:e.rowNode})),e.column&&(n||(n=this.model.getCellValidationModel().hasCellValidation({rowNode:e.rowNode,column:e.column})))):(n||(n=this.model.getCellValidationModel().getCellValidationMap().size>0),n||(n=this.model.getRowValidationModel().getRowValidationMap().size>0)),n}moveToNextCell(e,t,n,i="ui"){let o;const r=this.isEditing(),s=r&&this.checkNavWithValidation(void 0,n)==="block-stop";return e instanceof sl&&r&&(o=this.strategy?.moveToNextEditingCell(e,t,n,i,s)),o===null||(o=o||!!this.beans.focusSvc.focusedHeader,o===!1&&!s&&this.stopEditing()),o}getPendingEditValue(e,t,n){if(n==="data"||n==="batch"&&!this.batch)return;const i=this.model.getEdit({rowNode:e,column:t},Xs);if(!i||this.stopping&&!this.batch&&!i.editorState?.cellStartedEditing)return;if(n==="edit"){const r=i.editorValue;if(r!=null&&r!==fn)return r}const o=i.pendingValue;if(o!==fn)return o}getCellDataValue(e){const t=this.model.getEdit(e,Xs);if(t){const n=t.pendingValue;if(n!==fn)return n;const i=t.sourceValue;if(i!=null)return i}return this.valueSvc.getValue(e.column,e.rowNode,"data")}addStopEditingWhenGridLosesFocus(e){B5(this,this.beans,e)}createPopupEditorWrapper(e){return new X6(e)}batchResetToSourceValue(e){if(!this.batch)return!1;const t=this.model.getEdit(e);if(!t)return!1;const{pendingValue:n,sourceValue:i,state:o}=t;return n===i||o==="editing"?!1:(this.dispatchEditValuesChanged(e,{...t,pendingValue:i}),this.beans.editModelSvc?.removeEdits(e),ft(this.beans,e)?.refreshCell(Jr),!0)}setDataValue(e,t,n){try{const i=this.batch,o=this.isEditing(i?void 0:e);if((!o||this.committing)&&!i&&!u4.has(n)||!o&&!i&&n==="paste"||n==="batch"&&!i)return;if(n==="edit"){if(o&&this.applyEditorValue(e,t))return!0;if(!i)return}if(this.strategy??(this.strategy=this.createStrategy()),n==="batch"||n==="edit")return this.applyDirectValue(e,t,n);const r=this.beans;let s;if(i?s="ui":this.committing?s=n??"api":s="api",!n||a4.has(n))return this.applyDirectValue(e,t,n);const a=this.applyExistingEdit(e,t,n,s);return a!==void 0?a:(ol(r,e,t,n,void 0,{persist:!0}),this.ensureBatchStarted(),this.stopEditing(e,{source:s,suppressNavigateAfterEdit:!0}),!0)}finally{this.committing=!1}}applyExistingEdit(e,t,n,i){const o=this.model.getEdit(e);if(o)return o.pendingValue===t?!1:o.sourceValue!==t?(ol(this.beans,e,t,n,void 0,{persist:!0}),this.ensureBatchStarted(),this.stopEditing(e,{source:i,suppressNavigateAfterEdit:!0}),!0):(this.beans.editModelSvc?.removeEdits(e),this.ensureBatchStarted(),this.dispatchEditValuesChanged(e,{...o,pendingValue:t}),!0)}applyEditorValue(e,t){const n=this.beans,i=ft(n,e),o=i?.comp?.getCellEditor();return!i||!o?!1:(ol(n,e,t,"edit",void 0,{persist:!0}),i.editStyleFeature?.applyCellStyles?.(),"agSetEditValue"in o?(o.agSetEditValue(t),!0):o.refresh&&i.editCompDetails?(o.refresh({...i.editCompDetails.params,value:t}),!0):(i.hasBrowserFocus()&&i.onEditorAttachedFuncs.push(()=>{const s=ft(this.beans,e);s?.focusCell(!0),s?.comp?.getCellEditor()?.focusIn?.()}),Zr(n,[e],{silent:!0,cancel:!0}),qs(n,e,{silent:!0}),Xr(n),ft(n,e)?.refreshCell(Jr),!0))}applyDirectValue(e,t,n){const i=this.beans;if(this.batch){if(n==="batch"&&ft(i,e)?.comp?.getCellEditor()){const{editModelSvc:s,valueSvc:a}=i,{rowNode:l,column:u}=e;s?.getEdit(e)?.sourceValue===void 0&&s?.setEdit(e,{sourceValue:a.getValue(u,l,"data")}),s?.setEdit(e,{pendingValue:t})}else ol(i,e,t,n,void 0,{persist:!0}),n!=="batch"&&this.cleanupEditors();return Lc(i),this.ensureBatchStarted(),this.bulkRefreshCell(e),!0}ol(i,e,t,n,void 0,{persist:!0});const o=ft(i,e),r=this.setNodeDataValue(e.rowNode,e.column,t,o,n);return this.syncEditAfterCommit(e,r),Lc(i),ft(i,e)?.refreshCell(r?h4:Jr),r}handleColDefChanged(e){z5(this.beans,e)}destroy(){this.model.clear(),this.destroyStrategy(),super.destroy()}prepDetailsDuringBatch(e,t){const{model:n}=this;if(!this.batch||!n.hasRowEdits(e.rowNode,Xs))return;const{rowNode:o}=e,{compDetails:r,valueToDisplay:s}=t;if(r){const{params:a}=r;return a.data=n.getEditRowDataValue(o,Xs),{compDetails:r}}return{valueToDisplay:s}}cleanupEditors(){this.strategy?.cleanupEditors()}dispatchCellEvent(e,t,n,i){this.strategy?.dispatchCellEvent(e,t,n,i)}dispatchBatchEvent(e,t){this.eventSvc.dispatchEvent(this.createBatchEditEvent(e,t))}createBatchEditEvent(e,t){return We(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},n){if(!n||n.length===0)return;const{beans:i,rangeSvc:o,valueSvc:r}=this,{formula:s}=i;Yr(i,{persist:!0});const a=this.model.getEditMap(!0);let l=a.get(e)?.get(t)?.pendingValue,u=!1;this.batch||(this.eventSvc.dispatchEvent({type:"bulkEditingStarted"}),u=!0);const h=s?.isFormula(l)??!1;n.forEach(p=>{const m=p.columns.some(v=>v?.isAllowFormula());if(o?.forEachRowInRange(p,v=>{const w=Do(i,v);if(w===void 0)return;const b=a.get(w)??new Map;let y=l;for(const R of p.columns){if(!R)continue;const S=!!h&&R.isAllowFormula();if(this.isCellEditable({rowNode:w,column:R},"api")){const P=r.getValue(R,w,"data",!0);let F=r.parseValue(R,w??null,y,P);Number.isNaN(F)&&(F=null),b.set(R,{editorValue:void 0,pendingValue:F,sourceValue:P,state:"changed",editorState:{isCancelAfterEnd:void 0,isCancelBeforeStart:void 0}})}S&&(y=s?.updateFormulaByOffset({value:y,columnDelta:1}))}b.size>0&&a.set(w,b),h&&m&&(l=s?.updateFormulaByOffset({value:l,rowDelta:1}))}),this.setEditMap(a),this.batch){this.cleanupEditors(),Lc(i),this.ensureBatchStarted();return}this.committing=!0;try{this.stopEditing(void 0,{source:"bulk"})}finally{this.committing=!1,u&&this.eventSvc.dispatchEvent({type:"bulkEditingStopped",changes:this.toEventChangeList(a)})}});const f=ft(i,{rowNode:e,column:t});f&&f.focusCell(!0)}createCellStyleFeature(e){return new n4(e,this.beans)}createRowStyleFeature(e){return new i4(e,this.beans)}setEditingCells(e,t){const{beans:n}=this,{colModel:i,valueSvc:o}=n,r=new Map;for(let{colId:s,column:a,colKey:l,rowIndex:u,rowPinned:h,newValue:f,state:p}of e){const m=s?i.getCol(s):l?i.getCol(l):a;if(!m)continue;const v=Do(n,{rowIndex:u,rowPinned:h});if(!v)continue;const w=o.getValue(m,v,"data",!0);if(!t?.forceRefreshOfEditCellsOnly&&!so({pendingValue:f,sourceValue:w})&&p!=="editing")continue;let b=r.get(v);b||(b=new Map,r.set(v,b)),f===void 0&&(f=fn),b.set(m,{editorValue:void 0,pendingValue:f,sourceValue:w,state:p??"changed",editorState:{isCancelAfterEnd:void 0,isCancelBeforeStart:void 0}})}this.setEditMap(r,t)}onCellFocused(e){const t=ft(this.beans,e);if(!t||!this.isEditing(t,Xs))return;const n=this.model.getEdit(t);if(!n||!so(n))return;const o=this.getLocaleTextFunc()("ariaPendingChange","Pending Change");this.beans.ariaAnnounce?.announceValue(o,"pendingChange")}allowedFocusTargetOnValidation(e){return ft(this.beans,e)}};function p4(e){return{rowNodes:e?Array.from(e.keys()):void 0,columns:e?[...new Set(Array.from(e.values()).flatMap(t=>Array.from(t.keys())))]:void 0}}function Ex(e,t){return t??e.get("editType")??"singleCell"}var Dx=class extends X{postConstruct(){this.model=this.beans.editModelSvc,this.editSvc=this.beans.editSvc,this.addManagedEventListeners({cellFocused:this.onCellFocusChanged?.bind(this),cellFocusCleared:this.onCellFocusChanged?.bind(this)})}clearEdits(e){this.model.clearEditValue(e)}onCellFocusChanged(e){let t;const n=e.previousParams,{editSvc:i,beans:o}=this,r=e.type==="cellFocused"?e.sourceEvent:null;n&&(t=ft(o,n));const{gos:s,editModelSvc:a}=o,l=e.type==="cellFocusCleared";if(i.isEditing(void 0,{withOpenEditor:!0})){const{column:u,rowIndex:h,rowPinned:f}=e,p={column:u,rowNode:Do(o,{rowIndex:h,rowPinned:f})},m=s.get("invalidEditValueMode")==="block";if(m)return;const v=!m,w=!!a?.getCellValidationModel().hasCellValidation(p),b=v&&w;!(n||l)||i.stopEditing(void 0,{cancel:b,source:l&&v?"api":void 0,event:r})||(i.isBatchEditing()?i.cleanupEditors():i.stopEditing(void 0,{source:"api"}))}t?.refreshCell({suppressFlash:!0,force:!0})}stopCancelled(e){const t=this.editSvc.isBatchEditing()&&!e;for(const n of this.model.getEditPositions())Oc(this.beans,n,{cancel:!0},ft(this.beans,n)),this.model.stop(n,t,!0);return!0}stopCommitted(e,t){const n=this.model.getEditPositions(),i={all:[],pass:[],fail:[]};for(const s of n)i.all.push(s),(this.model.getCellValidationModel().getCellValidation(s)?.errorMessages?.length??0)>0?i.fail.push(s):i.pass.push(s);const o=this.processValidationResults(i),r=this.editSvc.isBatchEditing()&&!t;for(const s of o.destroy)Oc(this.beans,s,{event:e},ft(this.beans,s)),this.model.stop(s,r,!1);for(const s of o.keep){const a=ft(this.beans,s);!this.editSvc.cellEditingInvalidCommitBlocks()&&a&&this.editSvc.revertSingleCellEdit(a)}return!0}cleanupEditors({rowNode:e}={},t){Yr(this.beans,{persist:!1});const n=this.model.getEditPositions(),i=[];if(e)for(const o of n)o.rowNode!==e&&i.push(o);else for(const o of n)i.push(o);Zr(this.beans,i),Lc(this.beans,t)}setFocusOutOnEditor(e){e.comp?.getCellEditor()?.focusOut?.()}setFocusInOnEditor(e){const t=e.comp,n=t?.getCellEditor();if(n?.focusIn)n.focusIn();else{const i=this.beans.gos.get("editType")==="fullRow";e.focusCell(i),e.onEditorAttachedFuncs.push(()=>t?.getCellEditor()?.focusIn?.())}}setupEditors(e){const{event:t,ignoreEventKey:n=!1,startedEdit:i,position:o,cells:r=this.model.getEditPositions()}=e,s=t instanceof KeyboardEvent&&!n&&t.key||void 0;H5(this.beans,r,o,s,t,i)}dispatchCellEvent(e,t,n,i){const o=ft(this.beans,e);o&&this.eventSvc.dispatchEvent({...o.createEvent(t??null,n),...i})}dispatchRowEvent(e,t,n){if(n)return;const i=Ch(this.beans,e);i&&this.eventSvc.dispatchEvent(i.createRowEvent(t))}shouldStop(e,t,n="ui"){const i=this.editSvc.isBatchEditing();return i&&n==="api"?!0:i&&(n==="ui"||n==="edit")?!1:n==="api"?!0:t instanceof KeyboardEvent&&!i?t.key===q.ENTER:null}shouldCancel(e,t,n="ui"){const i=this.editSvc.isBatchEditing();return!!(t instanceof KeyboardEvent&&!i&&t.key===q.ESCAPE||i&&n==="api"||n==="api")}setEditMap(e,t){t?.update||this.editSvc.stopEditing(void 0,{cancel:!0,source:"api"});const n=[];if(e.forEach((i,o)=>{i.forEach((r,s)=>{r.state==="editing"&&n.push({...r,rowNode:o,column:s})})}),t?.update&&(e=new Map([...this.model.getEditMap(),...e])),this.model?.setEditMap(e),n.length>0){const i=n.at(-1),o=i.pendingValue===fn?void 0:i.pendingValue;this.start({position:i,event:new KeyboardEvent("keydown",{key:o}),source:"api"});const r=ft(this.beans,i);r&&this.setFocusInOnEditor(r)}}destroy(){this.cleanupEditors(),super.destroy()}},g4=class extends Dx{constructor(){super(...arguments),this.beanName="fullRow",this.startedRows=new Set}shouldStop(e,t,n="ui"){const{rowNode:i,beans:o}=this,{rowNode:r}=e||{};if(!Ch(o,{rowNode:i}))return!0;const a=super.shouldStop({rowNode:i},t,n);return a!==null?a:i?r!==i:!1}midBatchInputsAllowed({rowNode:e}){return e?this.model.hasEdits({rowNode:e}):!1}clearEdits(e){this.model.clearEditValue(e)}start(e){const{position:t,silent:n,startedEdit:i,event:o,ignoreEventKey:r}=e,{rowNode:s}=t,{beans:a,model:l,startedRows:u}=this;this.rowNode!==s&&super.cleanupEditors(t);const h=a.visibleCols.allCols,f=[],p=[];for(const m of h)m.isCellEditable(s)&&p.push(m);if(p.length!=0){u.has(s)||(this.dispatchRowEvent({rowNode:s},"rowEditingStarted",n),u.add(s));for(const m of p){const v={rowNode:s,column:m};f.push(v),l.start(v)}this.rowNode=s,this.setupEditors({cells:f,position:t,startedEdit:i,event:o,ignoreEventKey:r})}}processValidationResults(e){return e.fail.length>0&&this.editSvc.cellEditingInvalidCommitBlocks()?{destroy:[],keep:e.all}:{destroy:e.all,keep:[]}}stopCancelled(e){const{rowNode:t,model:n}=this;return t&&!n.hasRowEdits(t)?!1:(super.stopCancelled(e),this.cleanupEditors({rowNode:t},!0),this.rowNode=void 0,!0)}stopCommitted(e,t){const{rowNode:n,beans:i,model:o,editSvc:r}=this;if(n&&!o.hasRowEdits(n))return!1;const s=[];if(o.getEditMap().forEach((a,l)=>{if(!(!a||a.size===0)){for(const u of a.values())if(so(u)){s.push(l);break}}}),Xr(i),r.checkNavWithValidation({rowNode:n})==="block-stop")return!1;if(super.stopCommitted(e,t),t||!r.isBatchEditing())for(const a of s)this.dispatchRowEvent({rowNode:a},"rowValueChanged");return this.cleanupEditors({rowNode:n},!0),this.rowNode=void 0,!0}onCellFocusChanged(e){const{rowIndex:t}=e,n=e.previousParams;if(n?.rowIndex===t||e.sourceEvent instanceof KeyboardEvent)return;const{beans:i,gos:o,model:r}=this;if(i.editSvc?.isRangeSelectionEnabledWhileEditing())return;const s=ft(i,n);o.get("invalidEditValueMode")==="block"&&s&&(r.getCellValidationModel().getCellValidation(s)||r.getRowValidationModel().getRowValidation(s))||super.onCellFocusChanged(e)}cleanupEditors(e={},t){super.cleanupEditors(e,t);const{startedRows:n}=this;for(const i of n)this.dispatchRowEvent({rowNode:i},"rowEditingStopped"),this.destroyEditorsForRow(i);n.clear()}destroyEditorsForRow(e){const t=Ch(this.beans,{rowNode:e});if(!t)return;const n={};for(const i of t.getAllCellCtrls())i.comp?.getCellEditor()&&Oc(this.beans,i,n,i)}moveToNextEditingCell(e,t,n,i="ui",o=!1){const{beans:r,model:s,gos:a,editSvc:l}=this,u=e.cellPosition;let h;s.suspend(!0);try{h=r.navigation?.findNextCellToFocusOn(u,{backwards:t,startEditing:!0,skipToNextEditableCell:!1})}finally{s.suspend(!1)}if(h===!1)return null;if(h==null)return!1;const f=h.cellPosition,p=e.isCellEditable(),m=h.isCellEditable(),v=f&&u.rowIndex===f.rowIndex&&u.rowPinned===f.rowPinned;p&&this.setFocusOutOnEditor(e),this.restoreEditors();const w=a.get("suppressStartEditOnTab");return m&&!o?w?h.focusCell(!0,n):(h.comp?.getCellEditor()||qs(r,h,{event:n,cellStartedEdit:!0}),this.setFocusInOnEditor(h),h.focusCell(!1,n)):(m&&o&&this.setFocusInOnEditor(h),h.focusCell(!0,n)),!v&&!o&&(l?.stopEditing({rowNode:e.rowNode},{event:n,forceStop:!0}),l?.isRowEditing(e.rowNode,{withOpenEditor:!0})&&this.cleanupEditors(h,!0),w?h.focusCell(!0,n):l.startEditing(h,{startedEdit:!0,event:n,source:i,ignoreEventKey:!0,editable:m||void 0})),e.rowCtrl?.refreshRow({suppressFlash:!0,force:!0}),!0}restoreEditors(){const{beans:e,model:t}=this;t.getEditMap().forEach((n,i)=>n.forEach(({state:o},r)=>{if(o!=="editing")return;const s=ft(e,{rowNode:i,column:r});s&&!s.comp?.getCellEditor()&&qs(e,s,{silent:!0})}))}destroy(){super.destroy(),this.rowNode=void 0,this.startedRows.clear()}},m4=class extends Dx{constructor(){super(...arguments),this.beanName="singleCell"}shouldStop(e,t,n="ui"){const i=super.shouldStop(e,t,n);if(i!==null)return i;const o=e?.rowNode,r=e?.column,s=this.rowNode,a=this.column;return(!s||!a)&&o&&r?null:s!==o||a!==r?!0:!s&&!a?this.model.hasEdits(void 0,{withOpenEditor:!0}):!1}midBatchInputsAllowed(e){return this.model.hasEdits(e)}start(e){const{position:t,startedEdit:n,event:i,ignoreEventKey:o}=e;(this.rowNode!==t.rowNode||this.column!==t.column)&&super.cleanupEditors(),this.rowNode=t.rowNode,this.column=t.column,this.model.start(t),this.setupEditors({cells:[t],position:t,startedEdit:n,event:i,ignoreEventKey:o})}dispatchRowEvent(e,t,n){}processValidationResults(e){return e.fail.length>0&&this.editSvc.cellEditingInvalidCommitBlocks()?{destroy:[],keep:e.all}:{destroy:e.all,keep:[]}}stopCancelled(e){return super.stopCancelled(e),this.clearPosition()}stopCommitted(e,t){return super.stopCommitted(e,t),this.clearPosition()}clearPosition(){return this.rowNode=void 0,this.column=void 0,!0}onCellFocusChanged(e){const{colModel:t,editSvc:n}=this.beans,{rowIndex:i,column:o,rowPinned:r}=e,s=Do(this.beans,{rowIndex:i,rowPinned:r}),a=Km(o),l=t.getCol(a),u=e.previousParams;if(u){const h=Km(u.column);if(u?.rowIndex===i&&h===a&&u?.rowPinned===r)return}e.type=="cellFocused"&&(n?.isRangeSelectionEnabledWhileEditing()||n?.isEditing({rowNode:s,column:l},{withOpenEditor:!0}))||super.onCellFocusChanged(e)}moveToNextEditingCell(e,t,n,i="ui",o=!1){const r=this.beans.focusSvc.getFocusedCell();r&&(e=Za(this.beans,r)??e);const s=e.cellPosition;let a;const l=this.beans.gos.get("editType")==="fullRow";l&&this.model.suspend(!0),o||(e.eGui.focus(),this.editSvc?.stopEditing(e,{source:this.editSvc?.isBatchEditing()?"ui":"api",event:n}));try{a=this.beans.navigation?.findNextCellToFocusOn(s,{backwards:t,startEditing:!0})}finally{l&&this.model.suspend(!1)}if(a===!1)return null;if(a==null)return!1;const u=a.cellPosition,h=e.isCellEditable(),f=a.isCellEditable(),p=u&&s.rowIndex===u.rowIndex&&s.rowPinned===u.rowPinned;h&&!o&&this.setFocusOutOnEditor(e);const m=this.gos.get("suppressStartEditOnTab");let v=!1;if(!p&&!o&&(super.cleanupEditors(a,!0),m?a.focusCell(!0,n):(v=!0,this.editSvc.startEditing(a,{startedEdit:!0,event:n,source:i,ignoreEventKey:!0,editable:f}))),f&&!o){if(a.focusCell(!1,n),m)a.focusCell(!0,n);else if(!a.comp?.getCellEditor()){if(!v){const w=this.editSvc?.isEditing(a,{withOpenEditor:!0});qs(this.beans,a,{event:n,cellStartedEdit:!0,silent:w})}this.setFocusInOnEditor(a),this.cleanupEditors(a)}}else f&&o&&this.setFocusInOnEditor(a),a.focusCell(!0,n);return e.rowCtrl?.refreshRow({suppressFlash:!0,force:!0}),!0}destroy(){super.destroy(),this.rowNode=void 0,this.column=void 0}},es={moduleName:"EditCore",version:ve,beans:[N5,f4],apiFunctions:{getEditingCells:U6,getEditRowValues:z6,getCellEditorInstances:G5,startEditingCell:K6,stopEditing:$6,isEditing:j6,validateEdit:q6},dynamicBeans:{singleCell:m4,fullRow:g4},dependsOn:[Ph,Cx],css:[c6]},v4={moduleName:"UndoRedoEdit",version:ve,beans:[l6],apiFunctions:{undoCellEditing:V6,redoCellEditing:W6,getCurrentUndoSize:Q6,getCurrentRedoSize:Y6},dependsOn:[es]},C4={moduleName:"TextEditor",version:ve,userComponents:{agCellEditor:yx,agTextCellEditor:yx},dependsOn:[es]},w4={moduleName:"NumberEditor",version:ve,userComponents:{agNumberCellEditor:{classImp:P6}},dependsOn:[es]},b4={moduleName:"DateEditor",version:ve,userComponents:{agDateCellEditor:g6,agDateStringCellEditor:C6},dependsOn:[es]},y4={moduleName:"CheckboxEditor",version:ve,userComponents:{agCheckboxCellEditor:d6},dependsOn:[es]},S4={moduleName:"SelectEditor",version:ve,userComponents:{agSelectCellEditor:B6},dependsOn:[es]},R4={moduleName:"LargeTextEditor",version:ve,userComponents:{agLargeTextCellEditor:S6},dependsOn:[es]},F4={moduleName:"CustomEditor",version:ve,dependsOn:[es]},Tx={agSetColumnFilter:"agSetColumnFilterHandler",agMultiColumnFilter:"agMultiColumnFilterHandler",agGroupColumnFilter:"agGroupColumnFilterHandler",agNumberColumnFilter:"agNumberColumnFilterHandler",agBigIntColumnFilter:"agBigIntColumnFilterHandler",agDateColumnFilter:"agDateColumnFilterHandler",agTextColumnFilter:"agTextColumnFilterHandler"},x4=new Set(Object.values(Tx));function ts(e,t){const n=e.filterUi;if(!n)return null;if(n.created)return n.promise;if(t)return null;const i=n.create(n.refreshed),o=n;return o.created=!0,o.promise=i,i}function P4(e,t,n,i,o,r,s){return t.refresh?.({...n,model:i,source:r,additionalEventAttributes:s}),e().then(a=>{if(a){const{filter:l,filterParams:u}=a;Ax(l,u,i,o,r,s)}})}function Ax(e,t,n,i,o,r){e?.refresh?.({...t,model:n,state:i,source:o,additionalEventAttributes:r})}function Ix(e,t,n,i){const o=e();o?.created&&o.promise.then(r=>{const s=t();Ax(r,o.filterParams,s,n()??{model:s},"ui",i)})}function Mx(e){let t,n=!1,i;const{action:o,filterParams:r,getFilterUi:s,getModel:a,getState:l,updateState:u,updateModel:h,processModelToApply:f}=e;switch(o){case"apply":{const p=l();i=p?.model??null,f&&(i=f(i)),t={state:p?.state,model:i},n=!0;break}case"clear":{t={model:null},r?.buttons?.includes("apply")||(n=!0,i=null);break}case"reset":{t={model:null},n=!0,i=null;break}case"cancel":{t={model:a()};break}}u(t),n?h(i):Ix(s,a,l,{fromAction:o})}function pn(e,t){return e[t]??null}var E4=class extends cm{constructor(){super(...arguments),this.iconCreated=!1}wireComp(e,t,n,i,o){this.comp=e;const r=Tc(this,this.beans.context,o);this.eButtonShowMainFilter=n,this.eFloatingFilterBody=i,this.setGui(t,r),this.setupActive(),this.refreshHeaderStyles(),this.setupWidth(r),this.setupLeft(r),this.setupHover(r),this.setupFocus(r),this.setupAria(),this.setupFilterButton(),this.setupUserComp(),this.setupSyncWithFilter(r),this.setupUi(),r.addManagedElementListeners(this.eButtonShowMainFilter,{click:this.showParentFilter.bind(this)}),this.setupFilterChangedListener(r);const s=()=>this.onColDefChanged(r);r.addManagedListeners(this.column,{colDefChanged:s}),r.addManagedEventListeners({filterSwitched:({column:a})=>{a===this.column&&s()}}),r.addDestroyFunc(()=>{this.eButtonShowMainFilter=null,this.eFloatingFilterBody=null,this.userCompDetails=null,this.clearComponent()})}resizeHeader(){}moveHeader(){}getHeaderClassParams(){const{column:e,beans:t}=this,n=e.colDef;return We(t.gos,{colDef:n,column:e,floatingFilter:!0})}setupActive(){const e=this.column.getColDef(),t=!!e.filter,n=!!e.floatingFilter;this.active=t&&n}setupUi(){if(this.comp.setButtonWrapperDisplayed(!this.suppressFilterButton&&this.active),this.comp.addOrRemoveBodyCssClass("ag-floating-filter-full-body",this.suppressFilterButton),this.comp.addOrRemoveBodyCssClass("ag-floating-filter-body",!this.suppressFilterButton),!this.active||this.iconCreated)return;const e=ii("filter",this.beans,this.column);e&&(this.iconCreated=!0,this.eButtonShowMainFilter.appendChild(e))}setupFocus(e){e.createManagedBean(new Fc(this.eGui,{shouldStopEventPropagation:this.shouldStopEventPropagation.bind(this),onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this)}))}setupAria(){const e=this.getLocaleTextFunc();Na(this.eButtonShowMainFilter,e("ariaFilterMenuOpen","Open Filter Menu"))}onTabKeyDown(e){const{beans:t}=this;if(It(t)===this.eGui)return;const o=Hs(t,this.eGui,null,e.shiftKey);if(o){t.headerNavigation?.scrollToColumn(this.column),e.preventDefault(),o.focus();return}const r=this.findNextColumnWithFloatingFilter(e.shiftKey);r&&t.focusSvc.focusHeaderPosition({headerPosition:{headerRowIndex:this.rowCtrl.rowIndex,column:r},event:e})&&e.preventDefault()}findNextColumnWithFloatingFilter(e){const t=this.beans.visibleCols;let n=this.column;do if(n=e?t.getColBefore(n):t.getColAfter(n),!n)break;while(!n.getColDef().filter||!n.getColDef().floatingFilter);return n}handleKeyDown(e){super.handleKeyDown(e);const t=this.getWrapperHasFocus();switch(e.key){case q.UP:case q.DOWN:case q.LEFT:case q.RIGHT:if(t)return;Vs(e);case q.ENTER:t&&Gs(this.eGui)&&e.preventDefault();break;case q.ESCAPE:t||this.eGui.focus()}}onFocusIn(e){if(this.eGui.contains(e.relatedTarget))return;const n=!!e.relatedTarget&&!e.relatedTarget.classList.contains("ag-floating-filter"),i=!!e.relatedTarget&&As(e.relatedTarget,"ag-floating-filter");if(n&&i&&e.target===this.eGui){const o=this.lastFocusEvent,r=!!(o&&o.key===q.TAB);if(o&&r){const s=o.shiftKey;Gs(this.eGui,s)}}this.focusThis()}setupHover(e){this.beans.colHover?.addHeaderFilterColumnHoverListener(e,this.comp,this.column,this.eGui)}setupLeft(e){const t=new lm(this.column,this.eGui,this.beans);e.createManagedBean(t)}setupFilterButton(){this.suppressFilterButton=!this.beans.menuSvc?.isFloatingFilterButtonEnabled(this.column),this.highlightFilterButtonWhenActive=!ni(this.gos)}setupUserComp(){if(!this.active)return;const e=this.beans.colFilter?.getFloatingFilterCompDetails(this.column,()=>this.showParentFilter());e&&this.setCompDetails(e)}setCompDetails(e){this.userCompDetails=e,this.comp.setCompDetails(e)}showParentFilter(){const e=this.suppressFilterButton?this.eFloatingFilterBody:this.eButtonShowMainFilter;this.beans.menuSvc?.showFilterMenu({column:this.column,buttonElement:e,containerType:"floatingFilter",positionBy:"button"})}setupSyncWithFilter(e){if(!this.active)return;const{beans:{colFilter:t},column:n,gos:i}=this,o=r=>{if(r?.source==="filterDestroyed"&&(!this.isAlive()||!t?.isAlive()))return;const s=this.comp.getFloatingFilterComp();s&&s.then(a=>{if(a){if(i.get("enableFilterHandlers")){const h=r;let f="filter";h?.afterFloatingFilter?f="ui":h?.afterDataChange?f="dataChanged":r?.source==="api"&&(f="api"),this.updateFloatingFilterParams(this.userCompDetails,f);return}const l=t?.getCurrentFloatingFilterParentModel(n),u=r?{...r,columns:r.columns??[],source:r.source==="api"?"api":"columnFilter"}:null;a.onParentModelChanged(l,u)}})};[this.destroySyncListener]=e.addManagedListeners(n,{filterChanged:o}),t?.isFilterActive(n)&&o(null)}setupWidth(e){const t=()=>{const n=`${this.column.getActualWidth()}px`;this.comp.setWidth(n)};e.addManagedListeners(this.column,{widthChanged:t}),t()}setupFilterChangedListener(e){this.active&&([this.destroyFilterChangedListener]=e.addManagedListeners(this.column,{filterChanged:this.updateFilterButton.bind(this)}),this.updateFilterButton())}updateFilterButton(){if(!this.suppressFilterButton&&this.comp){const e=!!this.beans.filterManager?.isFilterAllowed(this.column);this.comp.setButtonWrapperDisplayed(e),this.highlightFilterButtonWhenActive&&e&&this.eButtonShowMainFilter.classList.toggle("ag-filter-active",this.column.isFilterActive())}}onColDefChanged(e){const t=this.active;this.setupActive();const n=!t&&this.active;t&&!this.active&&(this.destroySyncListener(),this.destroyFilterChangedListener());const i=this.beans.colFilter,o=this.active?i?.getFloatingFilterCompDetails(this.column,()=>this.showParentFilter()):null,r=this.comp.getFloatingFilterComp();!r||!o?this.updateCompDetails(e,o,n):r.then(s=>{!s||i?.areFilterCompsDifferent(this.userCompDetails??null,o)?this.updateCompDetails(e,o,n):this.updateFloatingFilterParams(o,"colDef")})}updateCompDetails(e,t,n){this.isAlive()&&(this.setCompDetails(t),this.setupFilterButton(),this.setupUi(),n&&(this.setupSyncWithFilter(e),this.setupFilterChangedListener(e)))}updateFloatingFilterParams(e,t){if(!e)return;let n=e.params;this.comp.getFloatingFilterComp()?.then(i=>{typeof i?.refresh=="function"&&(this.gos.get("enableFilterHandlers")&&(n={...n,model:pn(this.beans.colFilter?.model??{},this.column.getColId()),source:t}),i.refresh(n))})}addResizeAndMoveKeyboardListeners(){}destroy(){super.destroy(),this.destroySyncListener=null,this.destroyFilterChangedListener=null}};function D4(e,t){const n=e.colModel.getCol(t);if(!n){gt(12,{colKey:t});return}e.menuSvc?.showColumnMenu({column:n,positionBy:"auto"})}function T4(e){e.menuSvc?.hidePopupMenu()}var A4=class extends X{constructor(){super(...arguments),this.beanName="menuSvc"}postConstruct(){const{enterpriseMenuFactory:e,filterMenuFactory:t}=this.beans;this.activeMenuFactory=e??t}showColumnMenu(e){this.showColumnMenuCommon(this.activeMenuFactory,e,"columnMenu")}showFilterMenu(e){this.showColumnMenuCommon(Lx(this.beans),e,e.containerType,!0)}showHeaderContextMenu(e,t,n){this.activeMenuFactory?.showMenuAfterContextMenuEvent(e,t,n)}hidePopupMenu(){this.beans.contextMenuSvc?.hideActiveMenu(),this.activeMenuFactory?.hideActiveMenu()}hideFilterMenu(){Lx(this.beans)?.hideActiveMenu()}isColumnMenuInHeaderEnabled(e){const{suppressHeaderMenuButton:t}=e.getColDef();return!t&&!!this.activeMenuFactory?.isMenuEnabled(e)&&(ni(this.gos)||!!this.beans.enterpriseMenuFactory)}isFilterMenuInHeaderEnabled(e){return!e.getColDef().suppressHeaderFilterButton&&!!this.beans.filterManager?.isFilterAllowed(e)}isHeaderContextMenuEnabled(e){return!(e&&Hr(e)?e.getColDef():e?.getColGroupDef())?.suppressHeaderContextMenu&&this.gos.get("columnMenu")==="new"}isHeaderMenuButtonAlwaysShowEnabled(){return this.isSuppressMenuHide()}isHeaderMenuButtonEnabled(){const e=!this.isSuppressMenuHide();return!(Ns()&&e)}isHeaderFilterButtonEnabled(e){return this.isFilterMenuInHeaderEnabled(e)&&!ni(this.gos)&&!this.isFloatingFilterButtonDisplayed(e)}isFilterMenuItemEnabled(e){return!!this.beans.filterManager?.isFilterAllowed(e)&&!ni(this.gos)&&!this.isFilterMenuInHeaderEnabled(e)&&!this.isFloatingFilterButtonDisplayed(e)}isFloatingFilterButtonEnabled(e){return!e.getColDef().suppressFloatingFilterButton}isFloatingFilterButtonDisplayed(e){return!!e.getColDef().floatingFilter&&this.isFloatingFilterButtonEnabled(e)}isSuppressMenuHide(){const e=this.gos,t=e.get("suppressMenuHide");return ni(e)?e.exists("suppressMenuHide")?t:!1:t}showColumnMenuCommon(e,t,n,i){const{positionBy:o,onClosedCallback:r}=t,s=t.column;if(o==="button"){const{buttonElement:a}=t;e?.showMenuAfterButtonClick(s,a,n,r,i)}else if(o==="mouse"){const{mouseEvent:a}=t;e?.showMenuAfterMouseEvent(s,a,n,r,i)}else if(s){const a=this.beans,l=a.ctrlsSvc;l.getScrollFeature().ensureColumnVisible(s,"auto"),er(a,()=>{const u=l.getHeaderRowContainerCtrl(s.getPinned())?.getHeaderCtrlForColumn(s);u&&e?.showMenuAfterButtonClick(s,u.getAnchorElementForMenu(i),n,r,i)})}}};function kx(e,t,n){e.menuVisible!==t&&(e.menuVisible=t,e.dispatchColEvent("menuVisibleChanged",n))}function Lx(e){const{enterpriseMenuFactory:t,filterMenuFactory:n,gos:i}=e;return t&&ni(i)?t:n}var I4={moduleName:"SharedMenu",version:ve,beans:[A4],apiFunctions:{showColumnMenu:D4,hidePopupMenu:T4}},M4=".ag-set-filter{--ag-indentation-level:0}.ag-set-filter-item{align-items:center;display:flex;height:100%}:where(.ag-ltr) .ag-set-filter-item{padding-left:calc(var(--ag-widget-container-horizontal-padding) + var(--ag-indentation-level)*var(--ag-set-filter-indent-size))}:where(.ag-rtl) .ag-set-filter-item{padding-right:calc(var(--ag-widget-container-horizontal-padding) + var(--ag-indentation-level)*var(--ag-set-filter-indent-size))}.ag-set-filter-item-checkbox{display:flex;height:100%;width:100%}.ag-set-filter-group-icons{display:block;:where(.ag-set-filter-group-closed-icon),:where(.ag-set-filter-group-indeterminate-icon),:where(.ag-set-filter-group-opened-icon){cursor:pointer}}:where(.ag-ltr) .ag-set-filter-group-icons{margin-right:var(--ag-widget-container-horizontal-padding)}:where(.ag-rtl) .ag-set-filter-group-icons{margin-left:var(--ag-widget-container-horizontal-padding)}.ag-filter-body-wrapper{display:flex;flex-direction:column}:where(.ag-menu:not(.ag-tabs) .ag-filter) .ag-filter-body-wrapper{min-width:180px}.ag-filter-filter{flex:1 1 0px}.ag-filter-condition{display:flex;justify-content:center}.ag-floating-filter-body{display:flex;flex:1 1 auto;height:100%;position:relative}.ag-floating-filter-full-body{align-items:center;display:flex;flex:1 1 auto;height:100%;overflow:hidden;width:100%}.ag-floating-filter-input{align-items:center;display:flex;width:100%;>:where(.ag-date-floating-filter-wrapper),>:where(.ag-floating-filter-input),>:where(.ag-input-field){flex:1 1 auto}:where(.ag-input-field-input[type=date]),:where(.ag-input-field-input[type=datetime-local]){width:1px}}.ag-floating-filter-button{display:flex;flex:none}.ag-date-floating-filter-wrapper{display:flex}.ag-set-floating-filter-input :where(.ag-input-field-input)[disabled]{pointer-events:none}.ag-floating-filter-button-button{-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;height:var(--ag-icon-size);width:var(--ag-icon-size)}.ag-filter-loading{align-items:unset;background-color:var(--ag-chrome-background-color);height:100%;padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding);position:absolute;width:100%;z-index:1;:where(.ag-menu) &{background-color:var(--ag-menu-background-color)}}.ag-filter-separator{border-top:solid var(--ag-border-width) var(--menu-separator-color)}:where(.ag-filter-select) .ag-picker-field-wrapper{width:0}.ag-filter-condition-operator{height:17px}:where(.ag-ltr) .ag-filter-condition-operator-or{margin-left:calc(var(--ag-spacing)*2)}:where(.ag-rtl) .ag-filter-condition-operator-or{margin-right:calc(var(--ag-spacing)*2)}.ag-set-filter-select-all{padding-top:var(--ag-widget-container-vertical-padding)}.ag-filter-no-matches,.ag-set-filter-list{height:calc(var(--ag-list-item-height)*6)}.ag-filter-no-matches{padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding)}.ag-set-filter-tree-list{height:calc(var(--ag-list-item-height)*10)}.ag-set-filter-filter{margin-left:var(--ag-widget-container-horizontal-padding);margin-right:var(--ag-widget-container-horizontal-padding);margin-top:var(--ag-widget-container-vertical-padding)}.ag-filter-to{margin-top:var(--ag-widget-vertical-spacing)}.ag-mini-filter{margin:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding)}:where(.ag-ltr) .ag-set-filter-add-group-indent{margin-left:calc(var(--ag-icon-size) + var(--ag-widget-container-horizontal-padding))}:where(.ag-rtl) .ag-set-filter-add-group-indent{margin-right:calc(var(--ag-icon-size) + var(--ag-widget-container-horizontal-padding))}:where(.ag-filter-menu) .ag-set-filter-list{min-width:200px}.ag-filter-virtual-list-item:focus-visible{box-shadow:inset var(--ag-focus-shadow)}.ag-filter-apply-panel{display:flex;justify-content:flex-end;overflow:hidden;padding:var(--ag-widget-vertical-spacing) var(--ag-widget-container-horizontal-padding) var(--ag-widget-container-vertical-padding)}.ag-filter-apply-panel-button{line-height:1.5}:where(.ag-ltr) .ag-filter-apply-panel-button{margin-left:calc(var(--ag-spacing)*2)}:where(.ag-rtl) .ag-filter-apply-panel-button{margin-right:calc(var(--ag-spacing)*2)}.ag-simple-filter-body-wrapper{display:flex;flex-direction:column;gap:var(--ag-widget-vertical-spacing);min-height:calc(var(--ag-list-item-height) + var(--ag-widget-container-vertical-padding) + var(--ag-widget-vertical-spacing));overflow-y:auto;padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding);padding-bottom:var(--ag-widget-container-vertical-padding);:where(.ag-resizer-wrapper){margin:0}}.ag-multi-filter-menu-item{margin:var(--ag-spacing) 0}.ag-multi-filter-group-title-bar{background-color:transparent;color:var(--ag-header-text-color);font-weight:500;padding:calc(var(--ag-spacing)*1.5) var(--ag-spacing)}.ag-group-filter-field-select-wrapper{display:flex;flex-direction:column;gap:var(--ag-widget-vertical-spacing);padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding)}";function k4(e){const t=e.filterManager;return!!t?.isColumnFilterPresent()||!!t?.isAggregateFilterPresent()}function L4(e,t){return e.filterManager?.getColumnFilterInstance(t)??Promise.resolve(void 0)}function O4(e,t){const n=e.colModel.getColDefCol(t);if(n)return e.colFilter?.destroyFilter(n,"api")}function _4(e,t){e.frameworkOverrides.wrapIncoming(()=>e.filterManager?.setFilterModel(t))}function N4(e){return e.filterManager?.getFilterModel()??{}}function B4(e,t,n){const{gos:i,colModel:o,colFilter:r}=e;n&&!i.get("enableFilterHandlers")&&(se(288),n=!1);const s=o.getColDefCol(t);return s?r?.getModelForColumn(s,n)??null:null}function G4(e,t,n){return e.filterManager?.setColumnFilterModel(t,n)??Promise.resolve()}function H4(e,t){const n=e.colModel.getCol(t);if(!n){gt(12,{colKey:t});return}e.menuSvc?.showFilterMenu({column:n,containerType:"columnFilter",positionBy:"auto"})}function V4(e){e.menuSvc?.hideFilterMenu()}function W4(e,t){const n=e.colModel.getCol(t);if(!n){gt(12,{colKey:t});return}return e.colFilter?.getHandler(n,!0)}function z4(e,t){const{colModel:n,colFilter:i,gos:o}=e;if(!o.get("enableFilterHandlers")){se(287);return}const{colId:r,action:s}=t;if(r){const a=n.getColById(r);a&&i?.updateModel(a,s)}else i?.updateAllModels(s)}var Ox={january:"January",february:"February",march:"March",april:"April",may:"May",june:"June",july:"July",august:"August",september:"September",october:"October",november:"November",december:"December"},_x=["january","february","march","april","may","june","july","august","september","october","november","december"];function U4(e,t){return e==null?-1:t==null?1:Number.parseFloat(e)-Number.parseFloat(t)}function $4(e,t){if(e==null)return-1;if(t==null)return 1;const n=oi(e),i=oi(t);return n!=null&&i!=null?n===i?0:n>i?1:-1:String(e).localeCompare(String(t))}function Nx(e){return e instanceof Date&&!isNaN(e.getTime())}var fv={number:()=>{},bigint:()=>{},boolean:()=>({maxNumConditions:1,debounceMs:0,filterOptions:["empty",{displayKey:"true",displayName:"True",predicate:(e,t)=>t,numberOfInputs:0},{displayKey:"false",displayName:"False",predicate:(e,t)=>t===!1,numberOfInputs:0}]}),date:()=>({isValidDate:Nx}),dateString:({dataTypeDefinition:e})=>({comparator:(t,n)=>{const i=e.dateParser(n);return n==null||i<t?-1:i>t?1:0},isValidDate:t=>typeof t=="string"&&Nx(e.dateParser(t))}),dateTime:e=>fv.date(e),dateTimeString:e=>fv.dateString(e),object:()=>{},text:()=>{}},pv={number:()=>({comparator:U4}),bigint:()=>({comparator:$4}),boolean:({t:e})=>({valueFormatter:t=>we(t.value)?e(String(t.value),t.value?"True":"False"):e("blanks","(Blanks)")}),date:({formatValue:e,t})=>({valueFormatter:n=>{const i=e(n);return we(i)?i:t("blanks","(Blanks)")},treeList:!0,treeListFormatter:(n,i)=>{if(n==="NaN")return t("invalidDate","Invalid Date");if(i===1&&n!=null){const o=_x[Number(n)-1];return t(o,Ox[o])}return n??t("blanks","(Blanks)")},treeListPathGetter:n=>fh(n,!1)}),dateString:({formatValue:e,dataTypeDefinition:t,t:n})=>({valueFormatter:i=>{const o=e(i);return we(o)?o:n("blanks","(Blanks)")},treeList:!0,treeListPathGetter:i=>fh(t.dateParser(i??void 0),!1),treeListFormatter:(i,o)=>{if(o===1&&i!=null){const r=_x[Number(i)-1];return n(r,Ox[r])}return i??n("blanks","(Blanks)")}}),dateTime:e=>{const t=pv.date(e);return t.treeListPathGetter=fh,t},dateTimeString(e){const t=e.dataTypeDefinition.dateParser,n=pv.dateString(e);return n.treeListPathGetter=i=>fh(t(i??void 0)),n},object:({formatValue:e,t})=>({valueFormatter:n=>{const i=e(n);return we(i)?i:t("blanks","(Blanks)")}}),text:()=>{}};function j4(e,t,n,i,o,r,s){let a=t,l=n;const u=e==="agSetColumnFilter";!l&&i.baseDataType==="object"&&!u&&(l=({column:m,node:v})=>o({column:m,node:v,value:r.valueSvc.getValue(m,v,"data")}));const f=(u?pv:fv)[i.baseDataType],p=f({dataTypeDefinition:i,formatValue:o,t:s});return a=typeof t=="object"?{...p,...t}:p,{filterParams:a,filterValueGetter:l}}var K4={boolean:"agTextColumnFilter",date:"agDateColumnFilter",dateString:"agDateColumnFilter",dateTime:"agDateColumnFilter",dateTimeString:"agDateColumnFilter",bigint:"agBigIntColumnFilter",number:"agNumberColumnFilter",object:"agTextColumnFilter",text:"agTextColumnFilter"},q4={boolean:"agTextColumnFloatingFilter",date:"agDateColumnFloatingFilter",dateString:"agDateColumnFloatingFilter",dateTime:"agDateColumnFloatingFilter",dateTimeString:"agDateColumnFloatingFilter",bigint:"agBigIntColumnFloatingFilter",number:"agNumberColumnFloatingFilter",object:"agTextColumnFloatingFilter",text:"agTextColumnFloatingFilter"};function Q4(e,t=!1){return(t?q4:K4)[e??"text"]}function Y4(e,t,n){if(t==null)return null;let i=null;const{compName:o,jsComp:r,fwComp:s}=I0(e,t);return o?i={agSetColumnFilter:"agSetColumnFloatingFilter",agMultiColumnFilter:"agMultiColumnFloatingFilter",agGroupColumnFilter:"agGroupColumnFloatingFilter",agNumberColumnFilter:"agNumberColumnFloatingFilter",agBigIntColumnFilter:"agBigIntColumnFloatingFilter",agDateColumnFilter:"agDateColumnFloatingFilter",agTextColumnFilter:"agTextColumnFloatingFilter"}[o]:r==null&&s==null&&t.filter===!0&&(i=n()),i}var Z4={filterHandler:()=>({doesFilterPass:()=>!0})};function Bx(e,t,n,i){if(!e.isPrimary())return!0;const r=!n;return!e.isValueActive()||!r?!1:t?!0:i}var X4=class extends X{constructor(){super(...arguments),this.beanName="colFilter",this.allColumnFilters=new Map,this.allColumnListeners=new Map,this.activeAggregateFilters=[],this.activeColumnFilters=[],this.processingFilterChange=!1,this.modelUpdates=[],this.columnModelUpdates=[],this.state=new Map,this.handlerMap={...Tx},this.isGlobalButtons=!1,this.activeFilterComps=new Set}postConstruct(){this.addManagedEventListeners({gridColumnsChanged:this.onColumnsChanged.bind(this),dataTypesInferred:this.processFilterModelUpdateQueue.bind(this)}),this.addManagedPropertyListener("pivotMode",this.onPivotModeChanged.bind(this));const e=this.gos,t={...e.get("initialState")?.filter?.filterModel??{}};this.initialModel=t,this.model={...t},e.get("enableFilterHandlers")||delete this.handlerMap.agMultiColumnFilter}refreshModel(){this.onNewRowsLoaded("rowDataUpdated")}setModel(e,t="api",n){const{colModel:i,dataTypeSvc:o,filterManager:r}=this.beans;if(o?.isPendingInference){this.modelUpdates.push({model:e,source:t});return}const s=[],a=this.getModel(!0);if(e){const l=new Set(Object.keys(e));this.allColumnFilters.forEach((u,h)=>{const f=e[h];s.push(this.setModelOnFilterWrapper(u,f)),l.delete(h)}),l.forEach(u=>{const h=i.getColDefCol(u)||i.getCol(u);if(!h){se(62,{colId:u});return}if(!h.isFilterAllowed()){se(63,{colId:u});return}const f=this.getOrCreateFilterWrapper(h,!0);if(!f){se(64,{colId:u});return}s.push(this.setModelOnFilterWrapper(f,e[u],!0))})}else this.model={},this.allColumnFilters.forEach(l=>{s.push(this.setModelOnFilterWrapper(l,null))});Mt.all(s).then(()=>{const l=this.getModel(!0),u=[];this.allColumnFilters.forEach((h,f)=>{const p=a?a[f]:null,m=l?l[f]:null;sc(p,m)||u.push(h.column)}),u.length>0?r?.onFilterChanged({columns:u,source:t}):n&&this.updateActive("filterChanged")})}getModel(e){const t={},{allColumnFilters:n,initialModel:i,beans:{colModel:o}}=this;if(n.forEach((r,s)=>{const a=this.getModelFromFilterWrapper(r);we(a)&&(t[s]=a)}),!e)for(const r of Object.keys(i)){const s=i[r];we(s)&&!n.has(r)&&o.getCol(r)?.isFilterAllowed()&&(t[r]=s)}return t}setState(e,t,n="api"){if(this.state.clear(),t)for(const i of Object.keys(t)){const o=t[i];this.state.set(i,{model:pn(this.model,i),state:o})}this.setModel(e,n,!0)}getState(){const e=this.state;if(!e.size)return;const t={};let n=!1;return e.forEach((i,o)=>{const r=i.state;r!=null&&(n=!0,t[o]=r)}),n?t:void 0}getModelFromFilterWrapper(e){const n=e.column.getColId();if(e.isHandler)return pn(this.model,n);const i=e.filter;return i?typeof i.getModel!="function"?(se(66),null):i.getModel():pn(this.initialModel,n)}isFilterPresent(){return this.activeColumnFilters.length>0}isAggFilterPresent(){return!!this.activeAggregateFilters.length}disableFilters(){this.initialModel={};const{allColumnFilters:e}=this;return e.size?(e.forEach(t=>this.disposeFilterWrapper(t,"advancedFilterEnabled")),!0):!1}updateActiveFilters(){const e=l=>l?l.isFilterActive?l.isFilterActive():(se(67),!1):!1,{colModel:t,gos:n}=this.beans,i=!!_d(n),o=[],r=[],s=(l,u,h)=>{u&&(Bx(l,t.isPivotMode(),t.isPivotActive(),i)?o.push(h):r.push(h))},a=[];return this.allColumnFilters.forEach(l=>{const u=l.column,h=u.getColId();if(l.isHandler)a.push(Mt.resolve().then(()=>{s(u,this.isHandlerActive(u),{colId:h,isHandler:!0,handler:l.handler,handlerParams:l.handlerParams})}));else{const f=ts(l);f&&a.push(f.then(p=>{s(u,e(p),{colId:h,isHandler:!1,comp:p})}))}}),Mt.all(a).then(()=>{this.activeAggregateFilters=o,this.activeColumnFilters=r})}updateFilterFlagInColumns(e,t){const n=[];return this.allColumnFilters.forEach(i=>{const o=i.column;if(i.isHandler)n.push(Mt.resolve().then(()=>{this.setColFilterActive(o,this.isHandlerActive(o),e,t)}));else{const r=ts(i);r&&n.push(r.then(s=>{this.setColFilterActive(o,s.isFilterActive(),e,t)}))}}),this.beans.groupFilter?.updateFilterFlags(e,t),Mt.all(n)}doFiltersPass(e,t,n){const{data:i,aggData:o}=e,r=n?this.activeAggregateFilters:this.activeColumnFilters,s=n?o:i,a=this.model;for(let l=0;l<r.length;l++){const u=r[l],{colId:h,isHandler:f}=u;if(h!==t)if(f){const{handler:p,handlerParams:m}=u;if(!p.doesFilterPass({node:e,data:s,model:pn(a,h),handlerParams:m}))return!1}else{const p=u.comp;if(typeof p.doesFilterPass!="function"){gt(91);continue}if(!p.doesFilterPass({node:e,data:s}))return!1}}return!0}getHandlerParams(e){const t=this.allColumnFilters.get(e.getColId());return t?.isHandler?t.handlerParams:void 0}callOnFilterChangedOutsideRenderCycle(e){const{rowRenderer:t,filterManager:n}=this.beans,i=()=>{this.isAlive()&&n?.onFilterChanged(e)};t.isRefreshInProgress()?setTimeout(i,0):i()}updateBeforeFilterChanged(e={}){const{column:t,additionalEventAttributes:n}=e,i=t?.getColId();return this.updateActiveFilters().then(()=>this.updateFilterFlagInColumns("filterChanged",n).then(()=>{this.allColumnFilters.forEach(o=>{const{column:r,isHandler:s}=o;i!==r.getColId()&&(s&&o.handler.onAnyFilterChanged?.(),ts(o,s)?.then(a=>{typeof a?.onAnyFilterChanged=="function"&&a.onAnyFilterChanged()}))}),this.processingFilterChange=!0}))}updateAfterFilterChanged(){this.processingFilterChange=!1}isSuppressFlashingCellsBecauseFiltering(){return!(this.gos.get("allowShowChangeAfterFilter")??!1)&&this.processingFilterChange}onNewRowsLoaded(e){const t=[];this.allColumnFilters.forEach(n=>{const i=n.isHandler;i&&n.handler.onNewRowsLoaded?.();const o=ts(n,i);o&&t.push(o.then(r=>{r.onNewRowsLoaded?.()}))}),Mt.all(t).then(()=>this.updateActive(e,{afterDataChange:!0}))}updateActive(e,t){this.updateFilterFlagInColumns(e,t).then(()=>this.updateActiveFilters())}createGetValue(e,t){const{filterValueSvc:n,colModel:i}=this.beans;return(o,r)=>{const s=r?i.getCol(r):e;return s?n.getValue(s,o,t):void 0}}isFilterActive(e){const t=this.cachedFilter(e);if(t?.isHandler)return this.isHandlerActive(e);const n=t?.filter;return n?n.isFilterActive():pn(this.initialModel,e.getColId())!=null}isHandlerActive(e){const t=we(pn(this.model,e.getColId()));if(t)return t;const n=this.beans.groupFilter;return n?.isGroupFilter(e)?n.isFilterActive(e):!1}getOrCreateFilterUi(e){const t=this.getOrCreateFilterWrapper(e,!0);return t?ts(t):null}getFilterUiForDisplay(e){const t=this.getOrCreateFilterWrapper(e,!0);if(!t)return null;const n=ts(t);return n?n.then(i=>({comp:i,params:t.filterUi.filterParams,isHandler:t.isHandler})):null}getHandler(e,t){const n=this.getOrCreateFilterWrapper(e,t);return n?.isHandler?n.handler:void 0}getOrCreateFilterWrapper(e,t){if(!e.isFilterAllowed())return;let n=this.cachedFilter(e);return!n&&t&&(n=this.createFilterWrapper(e),this.setColumnFilterWrapper(e,n)),n}cachedFilter(e){return this.allColumnFilters.get(e.getColId())}getDefaultFilter(e,t=!1){return this.getDefaultFilterFromDataType(()=>this.beans.dataTypeSvc?.getBaseDataType(e),t)}getDefaultFilterFromDataType(e,t=!1){return yO(this.gos)?t?"agSetColumnFloatingFilter":"agSetColumnFilter":Q4(e(),t)}getDefaultFloatingFilter(e){return this.getDefaultFilter(e,!0)}createFilterComp(e,t,n,i,o,r){const s=()=>{const u=this.createFilterCompParams(e,o,r),h=i(u,o);return D_(this.beans.userCompFactory,t,h,n)},a=s();return a?{compDetails:a,createFilterUi:u=>(u?s():a).newAgStackInstance()}:null}createFilterInstance(e,t,n,i){const o=this.beans.selectableFilter;o?.isSelectable(t)&&(t=o.getFilterDef(e,t));const{handler:r,handlerParams:s,handlerGenerator:a}=this.createHandler(e,t,n)??{},l=this.createFilterComp(e,t,n,i,!!r,"init");if(!l)return{compDetails:null,createFilterUi:null,handler:r,handlerGenerator:a,handlerParams:s};const{compDetails:u,createFilterUi:h}=l;return this.isGlobalButtons&&(u.params?.buttons?.length||se(281,{colId:e.getColId()})),{compDetails:u,handler:r,handlerGenerator:a,handlerParams:s,createFilterUi:h}}createBaseFilterParams(e,t){const{filterManager:n,rowModel:i}=this.beans;return We(this.gos,{column:e,colDef:e.getColDef(),getValue:this.createGetValue(e),doesRowPassOtherFilter:t?()=>!0:o=>n?.doesRowPassOtherFilters(e.getColId(),o)??!0,rowModel:i})}createFilterCompParams(e,t,n,i){const o=this.filterChangedCallbackFactory(e),r=this.createBaseFilterParams(e,i);if(r.filterChangedCallback=o,r.filterModifiedCallback=i?()=>{}:s=>this.filterModified(e,s),t){const s=r,a=e.getColId(),l=pn(this.model,a);s.model=l,s.state=this.state.get(a)??{model:l},s.onModelChange=(u,h)=>{this.updateStoredModel(a,u),this.refreshHandlerAndUi(e,u,"ui",!1,h).then(()=>{o({...h,source:"columnFilter"})})},s.onStateChange=u=>{this.updateState(e,u),this.updateOrRefreshFilterUi(e)},s.onAction=(u,h,f)=>{this.updateModel(e,u,h),this.dispatchLocalEvent({type:"filterAction",column:e,action:u,event:f})},s.getHandler=()=>this.getHandler(e,!0),s.onUiChange=u=>this.filterUiChanged(e,u),s.source=n}return r}createFilterUiForHandler(e,t){return t?{created:!1,create:t,filterParams:e.params,compDetails:e}:null}createFilterUiLegacy(e,t,n){const i=t(),o={created:!0,create:t,filterParams:e.params,compDetails:e,promise:i};return i.then(n),o}createFilterWrapper(e){const{compDetails:t,handler:n,handlerGenerator:i,handlerParams:o,createFilterUi:r}=this.createFilterInstance(e,e.getColDef(),this.getDefaultFilter(e),a=>a),s=e.getColId();if(n)return delete this.initialModel[s],n.init?.({...o,source:"init",model:pn(this.model,s)}),{column:e,isHandler:!0,handler:n,handlerGenerator:i,handlerParams:o,filterUi:this.createFilterUiForHandler(t,r)};if(r){const a={column:e,filterUi:null,isHandler:!1};return a.filterUi=this.createFilterUiLegacy(t,r,l=>{a.filter=l??void 0}),a}return{column:e,filterUi:null,isHandler:!1}}createHandlerFunc(e,t,n){const{gos:i,frameworkOverrides:o,registry:r}=this.beans;let s;const a=m=>{const v=m.filter;if(P0(v)){const w=v.handler;return w||(s=v.doesFilterPass,s?()=>({doesFilterPass:s}):void 0)}return typeof v=="string"?v:void 0},l=i.get("enableFilterHandlers"),u=l?a(t):void 0,h=m=>()=>this.createBean(r.createDynamicBean(m,!0));let f,p;if(typeof u=="string"){const m=i.get("filterHandlers")?.[u];m!=null?f=m:x4.has(u)&&(f=h(u),p=u)}else f=u;if(!f){let m;const{compName:v,jsComp:w,fwComp:b}=I0(o,t);v?m=v:w==null&&b==null&&t.filter===!0&&(m=n),p=this.handlerMap[m],p&&(f=h(p))}return f?{filterHandler:f,handlerNameOrCallback:s??p}:l?(Yt(i)&&se(277,{colId:e.getColId()}),Z4):void 0}createHandler(e,t,n){const i=this.createHandlerFunc(e,t,n);if(!i)return;const o=Ng(this.beans.userCompFactory,t,this.createFilterCompParams(e,!0,"init")),{handlerNameOrCallback:r,filterHandler:s}=i,{handler:a,handlerParams:l}=this.createHandlerFromFunc(e,s,o);return{handler:a,handlerParams:l,handlerGenerator:r??s}}createHandlerFromFunc(e,t,n){const i=e.getColDef(),o=t(We(this.gos,{column:e,colDef:i})),r=this.createHandlerParams(e,n);return{handler:o,handlerParams:r}}createHandlerParams(e,t){const n=e.getColDef(),i=e.getColId(),o=this.filterChangedCallbackFactory(e);return We(this.gos,{colDef:n,column:e,getValue:this.createGetValue(e),doesRowPassOtherFilter:r=>this.beans.filterManager?.doesRowPassOtherFilters(i,r)??!0,onModelChange:(r,s)=>{this.updateStoredModel(i,r),this.refreshHandlerAndUi(e,r,"handler",!1,s).then(()=>{o({...s,source:"columnFilter"})})},onModelAsStringChange:()=>{e.dispatchColEvent("filterChanged","filterChanged"),this.dispatchLocalEvent({type:"filterModelAsStringChanged",column:e})},filterParams:t})}onColumnsChanged(){const e=[],{colModel:t,filterManager:n,groupFilter:i}=this.beans;this.allColumnFilters.forEach((r,s)=>{let a;r.column.isPrimary()?a=t.getColDefCol(s):a=t.getCol(s),!(a&&a===r.column)&&(e.push(r.column),this.disposeFilterWrapper(r,"columnChanged"),this.disposeColumnListener(s))});const o=i&&e.every(r=>i.isGroupFilter(r));e.length>0&&!o&&n?.onFilterChanged({columns:e,source:"api"})}isFilterAllowed(e){if(!e.isFilterAllowed())return!1;const n=this.beans.groupFilter;return n?.isGroupFilter(e)?n.isFilterAllowed(e):!0}getFloatingFilterCompDetails(e,t){const{userCompFactory:n,frameworkOverrides:i,selectableFilter:o,gos:r}=this.beans,s=m=>{this.getOrCreateFilterUi(e)?.then(w=>{m(Ks(w))})},a=e.getColDef(),l=o?.isSelectable(a)?o.getFilterDef(e,a):a,u=Y4(i,l,()=>this.getDefaultFloatingFilter(e))??"agReadOnlyFloatingFilter",h=r.get("enableFilterHandlers"),f=Ng(n,l,this.createFilterCompParams(e,h,"init",!0)),p=We(r,{column:e,filterParams:f,currentParentModel:()=>this.getCurrentFloatingFilterParentModel(e),parentFilterInstance:s,showParentFilter:t});if(h){const m=p,v=e.getColId(),w=this.filterChangedCallbackFactory(e);m.onUiChange=b=>this.floatingFilterUiChanged(e,b),m.model=pn(this.model,v),m.onModelChange=(b,y)=>{this.updateStoredModel(v,b),this.refreshHandlerAndUi(e,b,"floating",!0,y).then(()=>{w({...y,source:"columnFilter"})})},m.getHandler=()=>this.getHandler(e,!0),m.source="init"}return I_(n,a,p,u)}getCurrentFloatingFilterParentModel(e){return this.getModelFromFilterWrapper(this.cachedFilter(e)??{column:e})}destroyFilterUi(e,t,n,i){const o="paramsUpdated";if(e.isHandler){const r=t.getColId();delete this.initialModel[r],this.state.delete(r);const s=e.filterUi,a=this.createFilterUiForHandler(n,i);e.filterUi=a;const l=this.eventSvc;s?.created?s.promise.then(u=>{this.destroyBean(u),l.dispatchEvent({type:"filterDestroyed",source:o,column:t})}):l.dispatchEvent({type:"filterHandlerDestroyed",source:o,column:t})}else this.destroyFilter(t,o)}destroyFilter(e,t="api"){const n=e.getColId(),i=this.allColumnFilters.get(n);this.disposeColumnListener(n),delete this.initialModel[n],i&&this.disposeFilterWrapper(i,t).then(o=>{o&&this.isAlive()&&this.beans.filterManager?.onFilterChanged({columns:[e],source:"api"})})}disposeColumnListener(e){const t=this.allColumnListeners.get(e);t&&(this.allColumnListeners.delete(e),t())}disposeFilterWrapper(e,t){let n=!1;const{column:i,isHandler:o,filterUi:r}=e,s=i.getColId();o&&(n=this.isHandlerActive(i),this.destroyBean(e.handler),delete this.model[s],this.state.delete(s));const a=()=>{this.setColFilterActive(i,!1,"filterDestroyed"),this.allColumnFilters.delete(s),this.eventSvc.dispatchEvent({type:"filterDestroyed",source:t,column:i})};if(r){if(r.created)return r.promise.then(l=>(n=o?n:!!l?.isFilterActive(),this.destroyBean(l),a(),n));a()}return Mt.resolve(n)}filterChangedCallbackFactory(e){return t=>{this.callOnFilterChangedOutsideRenderCycle({additionalEventAttributes:t,columns:[e],column:e,source:t?.source??"columnFilter"})}}filterParamsChanged(e,t="api"){const n=this.allColumnFilters.get(e);if(!n)return;const i=this.beans,o=n.column,r=o.getColDef(),s=o.isFilterAllowed(),a=this.getDefaultFilter(o),l=i.selectableFilter,u=l?.isSelectable(r)?l.getFilterDef(o,r):r,h=s?this.createHandlerFunc(o,u,this.getDefaultFilter(o)):void 0,f=!!h,p=n.isHandler;if(p!=f){this.destroyFilter(o,"paramsUpdated");return}const{compDetails:m,createFilterUi:v}=(s?this.createFilterComp(o,u,a,b=>b,f,"colDef"):null)??{compDetails:null,createFilterUi:null},w=m?.params??Ng(i.userCompFactory,u,this.createFilterCompParams(o,f,"colDef"));if(p){const b=h?.handlerNameOrCallback??h?.filterHandler,y=pn(this.model,e);if(n.handlerGenerator!=b){const R=n.handler,{handler:S,handlerParams:P}=this.createHandlerFromFunc(o,h.filterHandler,w);n.handler=S,n.handlerParams=P,n.handlerGenerator=b,delete this.model[e],S.init?.({...P,source:"init",model:null}),this.destroyBean(R),y!=null&&this.beans.filterManager?.onFilterChanged({columns:[o],source:t})}else{const R=this.createHandlerParams(o,m?.params);n.handlerParams=R,n.handler.refresh?.({...R,source:"colDef",model:y})}}if(this.areFilterCompsDifferent(n.filterUi?.compDetails??null,m)||!n.filterUi||!m){this.destroyFilterUi(n,o,m,v);return}n.filterUi.filterParams=w,ts(n,p)?.then(b=>{(b?.refresh?b.refresh(w):!0)===!1?this.destroyFilterUi(n,o,m,v):this.dispatchLocalEvent({type:"filterParamsChanged",column:o,params:w})})}refreshHandlerAndUi(e,t,n,i,o){const r=this.cachedFilter(e);if(!r)return i&&this.getOrCreateFilterWrapper(e,!0),Mt.resolve();if(!r.isHandler)return Mt.resolve();const{filterUi:s,handler:a,handlerParams:l}=r;return P4(()=>{if(s){const{created:u,filterParams:h}=s;if(u)return s.promise.then(f=>f?{filter:f,filterParams:h}:void 0);s.refreshed=!0}return Mt.resolve(void 0)},a,l,t,this.state.get(e.getColId())??{model:t},n,o)}setColumnFilterWrapper(e,t){const n=e.getColId();this.allColumnFilters.set(n,t),this.allColumnListeners.set(n,this.addManagedListeners(e,{colDefChanged:()=>this.filterParamsChanged(n)})[0])}areFilterCompsDifferent(e,t){if(!t||!e)return!0;const{componentClass:n}=e,{componentClass:i}=t;return!(n===i||n?.render&&i?.render&&n.render===i.render)}hasFloatingFilters(){return this.beans.colModel.getCols().some(t=>t.getColDef().floatingFilter)}getFilterInstance(e){const t=this.beans.colModel.getColDefCol(e);if(!t)return Promise.resolve(void 0);const n=this.getOrCreateFilterUi(t);return n?new Promise(i=>{n.then(o=>{i(Ks(o))})}):Promise.resolve(null)}processFilterModelUpdateQueue(){this.modelUpdates.forEach(({model:e,source:t})=>this.setModel(e,t)),this.modelUpdates=[],this.columnModelUpdates.forEach(({key:e,model:t,resolve:n})=>{this.setModelForColumn(e,t).then(()=>n())}),this.columnModelUpdates=[]}getModelForColumn(e,t){if(t){const{state:i,model:o}=this,r=e.getColId(),s=i.get(r);return s?s.model??null:pn(o,r)}const n=this.cachedFilter(e);return n?this.getModelFromFilterWrapper(n):null}setModelForColumn(e,t){if(this.beans.dataTypeSvc?.isPendingInference){let n=()=>{};const i=new Promise(o=>{n=o});return this.columnModelUpdates.push({key:e,model:t,resolve:n}),i}return new Promise(n=>{this.setModelForColumnLegacy(e,t).then(i=>n(i))})}getStateForColumn(e){return this.state.get(e)??{model:pn(this.model,e)}}setModelForColumnLegacy(e,t){const n=this.beans.colModel.getColDefCol(e),i=n?this.getOrCreateFilterWrapper(n,!0):null;return i?this.setModelOnFilterWrapper(i,t):Mt.resolve()}setColDefPropsForDataType(e,t,n){const i=e.filter,o=i===!0?this.getDefaultFilterFromDataType(()=>t.baseDataType):i;if(typeof o!="string")return;let r,s;const a=this.beans,{filterParams:l,filterValueGetter:u}=e;o==="agMultiColumnFilter"?{filterParams:r,filterValueGetter:s}=a.multiFilter?.getParamsForDataType(l,u,t,n)??{}:{filterParams:r,filterValueGetter:s}=j4(o,l,u,t,n,a,this.getLocaleTextFunc()),e.filterParams=r,s&&(e.filterValueGetter=s)}setColFilterActive(e,t,n,i){e.filterActive!==t&&(e.filterActive=t,e.dispatchColEvent("filterActiveChanged",n)),e.dispatchColEvent("filterChanged",n,i)}setModelOnFilterWrapper(e,t,n){return new Mt(i=>{if(e.isHandler){const r=e.column,s=r.getColId(),a=this.model[s];if(this.updateStoredModel(s,t),n&&t===a){i();return}this.refreshHandlerAndUi(r,t,"api").then(()=>i());return}const o=ts(e);if(o){o.then(r=>{if(typeof r?.setModel!="function"){se(65),i();return}(r.setModel(t)||Mt.resolve()).then(()=>i())});return}i()})}updateStoredModel(e,t){we(t)?this.model[e]=t:delete this.model[e];const n=this.state.get(e),i={model:t,state:n?.state};this.state.set(e,i)}filterModified(e,t){this.getOrCreateFilterUi(e)?.then(n=>{this.eventSvc.dispatchEvent({type:"filterModified",column:e,filterInstance:n,...t})})}filterUiChanged(e,t){this.gos.get("enableFilterHandlers")&&this.eventSvc.dispatchEvent({type:"filterUiChanged",column:e,...t})}floatingFilterUiChanged(e,t){this.gos.get("enableFilterHandlers")&&this.eventSvc.dispatchEvent({type:"floatingFilterUiChanged",column:e,...t})}updateModel(e,t,n){const i=e.getColId(),o=this.cachedFilter(e),r=()=>o?.filterUi;Mx({action:t,filterParams:o?.filterUi?.filterParams,getFilterUi:r,getModel:()=>pn(this.model,i),getState:()=>this.state.get(i),updateState:s=>this.updateState(e,s),updateModel:s=>r()?.filterParams?.onModelChange(s,{...n,fromAction:t}),processModelToApply:o?.isHandler?o.handler.processModelToApply?.bind(o.handler):void 0})}updateAllModels(e,t){const n=[];this.allColumnFilters.forEach((i,o)=>{const r=this.beans.colModel.getColDefCol(o);r&&Mx({action:e,filterParams:i.filterUi?.filterParams,getFilterUi:()=>i.filterUi,getModel:()=>pn(this.model,o),getState:()=>this.state.get(o),updateState:s=>this.updateState(r,s),updateModel:s=>{this.updateStoredModel(o,s),this.dispatchLocalEvent({type:"filterAction",column:r,action:e}),n.push(this.refreshHandlerAndUi(r,s,"ui"))},processModelToApply:i?.isHandler?i.handler.processModelToApply?.bind(i.handler):void 0})}),n.length&&Mt.all(n).then(()=>{this.callOnFilterChangedOutsideRenderCycle({source:"columnFilter",additionalEventAttributes:t,columns:[]})})}updateOrRefreshFilterUi(e){const t=e.getColId();Ix(()=>this.cachedFilter(e)?.filterUi,()=>pn(this.model,t),()=>this.state.get(t))}updateState(e,t){this.state.set(e.getColId(),t),this.dispatchLocalEvent({type:"filterStateChanged",column:e,state:t})}canApplyAll(){const{state:e,model:t,activeFilterComps:n}=this;for(const o of n)if(o.source==="COLUMN_MENU")return!1;let i=!1;for(const o of e.keys()){const r=e.get(o);if(r.valid===!1)return!1;(r.model??null)!==pn(t,o)&&(i=!0)}return i}hasUnappliedModel(e){const{model:t,state:n}=this;return(n.get(e)?.model??null)!==pn(t,e)}setGlobalButtons(e){this.isGlobalButtons=e,this.dispatchLocalEvent({type:"filterGlobalButtons",isGlobal:e})}shouldKeepStateOnDetach(e,t){if(t==="newFiltersToolPanel")return!0;const n=this.beans.filterPanelSvc;return n?.isActive?!!n.getState(e.getColId()):!1}onPivotModeChanged(e){const{colModel:t,pivotColsSvc:n}=this.beans,i=!!_d(this.gos),o=e.currentValue,r=o?this.activeColumnFilters:this.activeAggregateFilters,s=o?this.activeAggregateFilters:this.activeColumnFilters,a=[];for(const l of r){const u=t.getColById(l.colId),h=o&&!!n?.columns.length;u&&o===Bx(u,o,h,i)&&(s.push(l),a.push(l))}Jk(r,a)}destroy(){super.destroy(),this.allColumnFilters.forEach(e=>this.disposeFilterWrapper(e,"gridDestroyed")),this.allColumnListeners.clear(),this.state.clear(),this.activeFilterComps.clear()}};function J4(e){return!!e.filterManager?.isAnyFilterPresent()}function e7(e,t="api"){e.filterManager?.onFilterChanged({source:t})}var t7=class extends X{constructor(){super(...arguments),this.beanName="filterManager",this.advFilterModelUpdateQueue=[]}wireBeans(e){this.quickFilter=e.quickFilter,this.advancedFilter=e.advancedFilter,this.colFilter=e.colFilter}postConstruct(){const e=this.refreshFiltersForAggregations.bind(this),t=this.updateAdvFilterColumns.bind(this);this.addManagedEventListeners({columnValueChanged:e,columnPivotChanged:e,columnPivotModeChanged:e,newColumnsLoaded:t,columnVisible:t,advancedFilterEnabledChanged:({enabled:i})=>this.onAdvFilterEnabledChanged(i),dataTypesInferred:this.processFilterModelUpdateQueue.bind(this)}),this.externalFilterPresent=this.isExternalFilterPresentCallback(),this.addManagedPropertyListeners(["isExternalFilterPresent","doesExternalFilterPass"],()=>{this.onFilterChanged({source:"api"})}),this.updateAggFiltering(),this.addManagedPropertyListener("groupAggFiltering",()=>{this.updateAggFiltering(),this.onFilterChanged()}),this.quickFilter&&this.addManagedListeners(this.quickFilter,{quickFilterChanged:()=>this.onFilterChanged({source:"quickFilter"})});const{gos:n}=this;this.alwaysPassFilter=n.get("alwaysPassFilter"),this.addManagedPropertyListener("alwaysPassFilter",()=>{this.alwaysPassFilter=n.get("alwaysPassFilter"),this.onFilterChanged({source:"api"})})}isExternalFilterPresentCallback(){const e=this.gos.getCallback("isExternalFilterPresent");return typeof e=="function"&&e({})}doesExternalFilterPass(e){const t=this.gos.get("doesExternalFilterPass");return typeof t=="function"&&t(e)}setFilterState(e,t,n="api"){this.isAdvFilterEnabled()||this.colFilter?.setState(e,t,n)}setFilterModel(e,t="api",n){if(this.isAdvFilterEnabled()){n||this.warnAdvFilters();return}this.colFilter?.setModel(e,t)}getFilterModel(){return this.colFilter?.getModel()??{}}getFilterState(){return this.colFilter?.getState()}isColumnFilterPresent(){return!!this.colFilter?.isFilterPresent()}isAggregateFilterPresent(){return!!this.colFilter?.isAggFilterPresent()}isChildFilterPresent(){return this.isColumnFilterPresent()||this.isQuickFilterPresent()||this.externalFilterPresent||this.isAdvFilterPresent()}isAnyFilterPresent(){return this.isChildFilterPresent()||this.isAggregateFilterPresent()}isAdvFilterPresent(){return this.isAdvFilterEnabled()&&this.advancedFilter.isFilterPresent()}onAdvFilterEnabledChanged(e){e?this.colFilter?.disableFilters()&&this.onFilterChanged({source:"advancedFilter"}):this.advancedFilter?.isFilterPresent()&&(this.advancedFilter.setModel(null),this.onFilterChanged({source:"advancedFilter"}))}isAdvFilterEnabled(){return!!this.advancedFilter?.isEnabled()}isAdvFilterHeaderActive(){return this.isAdvFilterEnabled()&&this.advancedFilter.isHeaderActive()}refreshFiltersForAggregations(){_d(this.gos)&&this.isAnyFilterPresent()&&this.onFilterChanged()}onFilterChanged(e={}){const{source:t,additionalEventAttributes:n,columns:i=[]}=e;this.externalFilterPresent=this.isExternalFilterPresentCallback(),(this.colFilter?this.colFilter.updateBeforeFilterChanged(e):Mt.resolve()).then(()=>{const o={source:t,type:"filterChanged",columns:i};n&&Wn(o,n),this.eventSvc.dispatchEvent(o),this.colFilter?.updateAfterFilterChanged()})}isSuppressFlashingCellsBecauseFiltering(){return!!this.colFilter?.isSuppressFlashingCellsBecauseFiltering()}isQuickFilterPresent(){return!!this.quickFilter?.isFilterPresent()}updateAggFiltering(){this.aggFiltering=!!_d(this.gos)}isAggregateQuickFilterPresent(){return this.isQuickFilterPresent()&&this.shouldApplyQuickFilterAfterAgg()}isNonAggregateQuickFilterPresent(){return this.isQuickFilterPresent()&&!this.shouldApplyQuickFilterAfterAgg()}shouldApplyQuickFilterAfterAgg(){return(this.aggFiltering||this.beans.colModel.isPivotMode())&&!this.gos.get("applyQuickFilterBeforePivotOrAgg")}doesRowPassOtherFilters(e,t){return this.doesRowPassFilter({rowNode:t,colIdToSkip:e})}doesRowPassAggregateFilters(e){const{rowNode:t}=e;return this.alwaysPassFilter?.(t)?!0:!(this.isAggregateQuickFilterPresent()&&!this.quickFilter.doesRowPass(t)||this.isAggregateFilterPresent()&&!this.colFilter.doFiltersPass(t,e.colIdToSkip,!0))}doesRowPassFilter(e){const{rowNode:t}=e;return this.alwaysPassFilter?.(t)?!0:!(this.isNonAggregateQuickFilterPresent()&&!this.quickFilter.doesRowPass(t)||this.externalFilterPresent&&!this.doesExternalFilterPass(t)||this.isColumnFilterPresent()&&!this.colFilter.doFiltersPass(t,e.colIdToSkip)||this.isAdvFilterPresent()&&!this.advancedFilter.doesFilterPass(t))}isFilterAllowed(e){return this.isAdvFilterEnabled()?!1:!!this.colFilter?.isFilterAllowed(e)}getAdvFilterModel(){return this.isAdvFilterEnabled()?this.advancedFilter.getModel():null}setAdvFilterModel(e,t="api"){if(this.isAdvFilterEnabled()){if(this.beans.dataTypeSvc?.isPendingInference){this.advFilterModelUpdateQueue.push(e);return}this.advancedFilter.setModel(e??null),this.onFilterChanged({source:t})}}toggleAdvFilterBuilder(e,t){this.isAdvFilterEnabled()&&this.advancedFilter.getCtrl().toggleFilterBuilder({source:t,force:e})}updateAdvFilterColumns(){this.isAdvFilterEnabled()&&this.advancedFilter.updateValidity()&&this.onFilterChanged({source:"advancedFilter"})}hasFloatingFilters(){return this.isAdvFilterEnabled()?!1:!!this.colFilter?.hasFloatingFilters()}getColumnFilterInstance(e){return this.isAdvFilterEnabled()?(this.warnAdvFilters(),Promise.resolve(void 0)):this.colFilter?.getFilterInstance(e)??Promise.resolve(void 0)}warnAdvFilters(){se(68)}setupAdvFilterHeaderComp(e){this.advancedFilter?.getCtrl().setupHeaderComp(e)}getHeaderRowCount(){return this.isAdvFilterHeaderActive()?1:0}getHeaderHeight(){return this.isAdvFilterHeaderActive()?this.advancedFilter.getCtrl().getHeaderHeight():0}processFilterModelUpdateQueue(){for(const e of this.advFilterModelUpdateQueue)this.setAdvFilterModel(e);this.advFilterModelUpdateQueue=[]}setColumnFilterModel(e,t){return this.isAdvFilterEnabled()?(this.warnAdvFilters(),Promise.resolve()):this.colFilter?.setModelForColumn(e,t)??Promise.resolve()}};function n7(e){return{tag:"div",cls:e}}var i7=class extends yt{constructor(e){const{className:t="ag-filter-apply-panel"}=e??{};super(n7(t)),this.listeners=[],this.validationMessage=null,this.className=t}updateButtons(e,t){const n=this.buttons;if(this.buttons=e,n===e)return;const i=this.getGui();bn(i);let o;this.destroyListeners();const r=document.createDocumentFragment(),s=this.className,a=({type:u,label:h})=>{const f=y=>{this.dispatchLocalEvent({type:u,event:y})};["apply","clear","reset","cancel"].includes(u)||se(75);const p=u==="apply",v=on({tag:"button",attrs:{type:p&&t?"submit":"button"},ref:`${u}FilterButton`,cls:`ag-button ag-standard-button ${s}-button${p?" "+s+"-apply-button":""}`,children:h});this.activateTabIndex([v]),p&&(o=v);const w=y=>{y.key===q.ENTER&&(y.preventDefault(),f(y))},b=this.listeners;v.addEventListener("click",f),b.push(()=>v.removeEventListener("click",f)),v.addEventListener("keydown",w),b.push(()=>v.removeEventListener("keydown",w)),r.append(v)};for(const u of e)a(u);this.eApply=o;const l=this.validationTooltipFeature;o&&!l?this.validationTooltipFeature=this.createOptionalManagedBean(this.beans.registry.createDynamicBean("tooltipFeature",!1,{getGui:()=>this.eApply,getLocation:()=>"advancedFilter",getTooltipShowDelayOverride:()=>1e3})):!o&&l&&(this.validationTooltipFeature=this.destroyBean(l)),i.append(r)}getApplyButton(){return this.eApply}updateValidity(e,t=null){const n=this.eApply;n&&(dc(n,!e),this.validationMessage=t,this.validationTooltipFeature?.setTooltipAndRefresh(this.validationMessage))}destroyListeners(){for(const e of this.listeners)e();this.listeners=[]}destroy(){this.destroyListeners(),super.destroy()}},o7=class extends yt{constructor(e,t,n,i,o,r){super(),this.column=e,this.wrapper=t,this.eventParent=n,this.updateModel=i,this.isGlobalButtons=o,this.enableGlobalButtonCheck=r,this.hidePopup=null,this.applyActive=!1}postConstruct(){const{comp:e,params:t}=this.wrapper,n=t,i=n.useForm,o=i?"form":"div";this.setTemplate({tag:o,cls:"ag-filter-wrapper"}),i&&this.addManagedElementListeners(this.getGui(),{submit:r=>{r?.preventDefault()},keydown:this.handleKeyDown.bind(this)}),this.appendChild(e.getGui()),this.params=n,this.resetButtonsPanel(n),this.addManagedListeners(this.eventParent,{filterParamsChanged:({column:r,params:s})=>{r===this.column&&this.resetButtonsPanel(s,this.params)},filterStateChanged:({column:r,state:s})=>{r===this.column&&this.eButtons?.updateValidity(s.valid!==!1)},filterAction:({column:r,action:s,event:a})=>{r===this.column&&this.afterAction(s,a)},...this.enableGlobalButtonCheck?{filterGlobalButtons:({isGlobal:r})=>{if(r!==this.isGlobalButtons){this.isGlobalButtons=r;const s=this.params;this.resetButtonsPanel(s,s,!0)}}}:void 0})}afterGuiAttached(e){e&&(this.hidePopup=e.hidePopup)}resetButtonsPanel(e,t,n){const{buttons:i,readOnly:o}=t??{},{buttons:r,readOnly:s,useForm:a}=e;if(!n&&o===s&&sc(i,r))return;const l=r&&r.length>0&&!e.readOnly&&!this.isGlobalButtons;let u=this.eButtons;if(l){const h=r.map(f=>{const p=`${f}Filter`;return{type:f,label:to(this,p)}});if(this.applyActive=Qd(this.params),!u){u=this.createBean(new i7),this.appendChild(u.getGui());const f=this.column,p=m=>({event:v})=>{this.updateModel(f,m,{fromButtons:!0}),this.afterAction(m,v)};u?.addManagedListeners(u,{apply:p("apply"),clear:p("clear"),reset:p("reset"),cancel:p("cancel")}),this.eButtons=u}u.updateButtons(h,a)}else this.applyActive=!1,u&&(Mi(u.getGui()),this.eButtons=this.destroyBean(u))}close(e){const t=this.hidePopup;if(!t)return;const n=e,i=n?.key;let o;(i===q.ENTER||i===q.SPACE)&&(o={keyboardEvent:n}),t(o),this.hidePopup=null}afterAction(e,t){const{params:n,applyActive:i}=this,o=n?.closeOnApply;switch(e){case"apply":{t?.preventDefault(),o&&i&&this.close(t);break}case"reset":{o&&i&&this.close();break}case"cancel":{o&&this.close(t);break}}}handleKeyDown(e){!e.defaultPrevented&&e.key===q.ENTER&&this.applyActive&&(this.updateModel(this.column,"apply",{fromButtons:!0}),this.afterAction("apply",e))}destroy(){this.hidePopup=null,this.eButtons=this.destroyBean(this.eButtons)}},r7=":where(.ag-menu:not(.ag-tabs) .ag-filter)>:not(.ag-filter-wrapper){min-width:180px}",s7={tag:"div",cls:"ag-filter"},a7=class extends yt{constructor(e,t,n){super(s7),this.column=e,this.source=t,this.enableGlobalButtonCheck=n,this.wrapper=null}postConstruct(){this.beans.colFilter?.activeFilterComps.add(this),this.createFilter(!0),this.addManagedEventListeners({filterDestroyed:this.onFilterDestroyed.bind(this)})}hasFilter(){return this.wrapper!=null}getFilter(){return this.wrapper?.then(e=>e.comp)??null}afterInit(){return this.wrapper?.then(()=>{})??Mt.resolve()}afterGuiAttached(e){this.afterGuiAttachedParams=e,this.wrapper?.then(t=>{this.comp?.afterGuiAttached(e),t?.comp?.afterGuiAttached?.(e)})}afterGuiDetached(){this.wrapper?.then(e=>{e?.comp?.afterGuiDetached?.()})}createFilter(e){const{column:t,source:n,beans:{colFilter:i}}=this,o=i.getFilterUiForDisplay(t)??null;this.wrapper=o,o?.then(r=>{if(!r)return;const{isHandler:s,comp:a}=r;let l;if(s){const u=!!this.enableGlobalButtonCheck,h=this.createBean(new o7(t,r,i,i.updateModel.bind(i),u&&i.isGlobalButtons,u));this.comp=h,l=h.getGui()}else this.registerCSS(r7),l=a.getGui(),we(l)||se(69,{guiFromFilter:l});this.appendChild(l),e?this.eventSvc.dispatchEvent({type:"filterOpened",column:t,source:n,eGui:this.getGui()}):a.afterGuiAttached?.(this.afterGuiAttachedParams)})}onFilterDestroyed(e){const{source:t,column:n}=e;(t==="api"||t==="paramsUpdated")&&n.getId()===this.column.getId()&&this.beans.colModel.getColDefCol(this.column)&&(bn(this.getGui()),this.comp=this.destroyBean(this.comp),this.createFilter())}destroy(){this.beans.colFilter?.activeFilterComps.delete(this),this.eventSvc.dispatchEvent({type:"filterClosed",column:this.column}),this.wrapper=null,this.comp=this.destroyBean(this.comp),this.afterGuiAttachedParams=void 0,super.destroy()}},l7=class extends X{constructor(){super(...arguments),this.beanName="filterMenuFactory"}wireBeans(e){this.popupSvc=e.popupSvc}hideActiveMenu(){this.hidePopup?.()}showMenuAfterMouseEvent(e,t,n,i){e&&!e.isColumn||this.showPopup(e,o=>{this.popupSvc?.positionPopupUnderMouseEvent({additionalParams:{column:e},type:n,mouseEvent:t,ePopup:o})},n,t.target,ni(this.gos),i)}showMenuAfterButtonClick(e,t,n,i){if(e&&!e.isColumn)return;let o=-1,r="left";const s=ni(this.gos);!s&&this.gos.get("enableRtl")&&(o=1,r="right");const a=s?void 0:4*o,l=s?void 0:4;this.showPopup(e,u=>{this.popupSvc?.positionPopupByComponent({type:n,eventSource:t,ePopup:u,nudgeX:a,nudgeY:l,alignSide:r,keepWithinBounds:!0,position:"under",additionalParams:{column:e}})},n,t,s,i)}showPopup(e,t,n,i,o,r){const s=e?this.createBean(new a7(e,"COLUMN_MENU")):void 0;if(this.activeMenu=s,!s?.hasFilter()||!e){gt(57);return}const a=on({tag:"div",cls:`ag-menu${o?"":" ag-filter-menu"}`,role:"presentation"});[this.tabListener]=this.addManagedElementListeners(a,{keydown:w=>this.trapFocusWithin(w,a)}),a.appendChild(s?.getGui());let l;const u=()=>s?.afterGuiDetached(),h=SO(this.gos)?i??this.beans.ctrlsSvc.getGridBodyCtrl().eGridBody:void 0,f=w=>{kx(e,!1,"contextMenu");const b=w instanceof KeyboardEvent;this.tabListener&&(this.tabListener=this.tabListener()),b&&i&&ki(i)&&V0(i)?.focus({preventScroll:!0}),u(),this.destroyBean(this.activeMenu),this.dispatchVisibleChangedEvent(!1,n,e),r?.()},p=this.getLocaleTextFunc(),m=o&&n!=="columnFilter"?p("ariaLabelColumnMenu","Column Menu"):p("ariaLabelColumnFilter","Column Filter"),v=this.popupSvc?.addPopup({modal:!0,eChild:a,closeOnEsc:!0,closedCallback:f,positionCallback:()=>t(a),anchorToElement:h,ariaLabel:m});v&&(this.hidePopup=l=v.hideFunc),s.afterInit().then(()=>{t(a),s.afterGuiAttached({container:n,hidePopup:l})}),kx(e,!0,"contextMenu"),this.dispatchVisibleChangedEvent(!0,n,e)}trapFocusWithin(e,t){e.key!==q.TAB||e.defaultPrevented||Hs(this.beans,t,!1,e.shiftKey)||(e.preventDefault(),Gs(t,e.shiftKey))}dispatchVisibleChangedEvent(e,t,n){this.eventSvc.dispatchEvent({type:"columnMenuVisibleChanged",visible:e,switchingTab:!1,key:t,column:n??null,columnGroup:null})}isMenuEnabled(e){return e.isFilterAllowed()&&(e.getColDef().menuTabs??["filterMenuTab"]).includes("filterMenuTab")}showMenuAfterContextMenuEvent(){}destroy(){this.destroyBean(this.activeMenu),super.destroy()}},c7=class extends X{constructor(){super(...arguments),this.beanName="filterValueSvc"}getValue(e,t,n){if(!t)return;const i=e.getColDef(),{selectableFilter:o,valueSvc:r,formula:s}=this.beans,a=n??o?.getFilterValueGetter(e.getColId())??i.filterValueGetter;if(a)return this.executeFilterValueGetter(a,t.data,e,t,i);const l=r.getValue(e,t,"data");return e.isAllowFormula()&&s?.isFormula(l)?s.resolveValue(e,t):l}executeFilterValueGetter(e,t,n,i,o){const{expressionSvc:r,valueSvc:s}=this.beans,a=We(this.gos,{data:t,node:i,column:n,colDef:o,getValue:s.getValueCallback.bind(s,i)});return typeof e=="function"?e(a):r?.evaluate(e,a)}},u7={tag:"div",cls:"ag-floating-filter-input",role:"presentation",children:[{tag:"ag-input-text-field",ref:"eFloatingFilterText"}]},d7=class extends yt{constructor(){super(u7,[Eh]),this.eFloatingFilterText=he}init(e){this.params=e;const t=this.beans.colNames.getDisplayNameForColumn(e.column,"header",!0);if(this.eFloatingFilterText.setDisabled(!0).setInputAriaLabel(`${t} ${this.getLocaleTextFunc()("ariaFilterInput","Filter Input")}`),this.gos.get("enableFilterHandlers")){const n=e,i=n.getHandler();if(i.getModelAsString){const o=i.getModelAsString(n.model);this.eFloatingFilterText.setValue(o)}}}onParentModelChanged(e){if(e==null){this.eFloatingFilterText.setValue("");return}this.params.parentFilterInstance(t=>{if(t.getModelAsString){const n=t.getModelAsString(e);this.eFloatingFilterText.setValue(n)}})}refresh(e){this.init(e)}},h7=class extends Tm{constructor(e){super(e,"ag-radio-button","radio")}isSelected(){return this.eInput.checked}toggle(){this.eInput.disabled||this.isSelected()||this.setValue(!0)}addInputListeners(){super.addInputListeners(),this.addManagedEventListeners({checkboxChanged:this.onChange.bind(this)})}onChange(e){const t=this.eInput;e.selected&&e.name&&t.name&&t.name===e.name&&e.id&&t.id!==e.id&&this.setValue(!1,!0)}},gv=class{constructor(){this.customFilterOptions={}}init(e,t){this.filterOptions=e.filterOptions??t,this.mapCustomOptions(),this.defaultOption=this.getDefaultItem(e.defaultOption)}refresh(e,t){const n=e.filterOptions??t;this.filterOptions!==n&&(this.filterOptions=n,this.customFilterOptions={},this.mapCustomOptions()),this.defaultOption=this.getDefaultItem(e.defaultOption)}mapCustomOptions(){const{filterOptions:e}=this;if(e)for(const t of e){if(typeof t=="string")continue;const n=[["displayKey"],["displayName"],["predicate","test"]],i=o=>o.some(r=>t[r]!=null)?!0:(se(72,{keys:o}),!1);if(!n.every(i)){this.filterOptions=e.filter(o=>o===t)||[];continue}this.customFilterOptions[t.displayKey]=t}}getDefaultItem(e){const{filterOptions:t}=this;if(e)return e;if(t.length>=1){const n=t[0];if(typeof n=="string")return n;if(n.displayKey)return n.displayKey;se(73)}else se(74)}getCustomOption(e){return this.customFilterOptions[e]}};function Gc(e,t,n){return n==null?e.splice(t):e.splice(t,n)}function Ah(e){return e==null||typeof e=="string"&&e.trim().length===0}function f7(e){return e==="AND"||e==="OR"?e:"AND"}function p7(e,t,n){if(e==null)return;const{predicate:i}=e;if(i!=null&&!t.some(o=>o==null))return i(t,n)}function g7(e,t){let n=e.length;return n>t&&(e.splice(t),se(78),n=t),n}var m7=new Set(["empty","notBlank","blank","today","yesterday","tomorrow","thisWeek","lastWeek","nextWeek","thisMonth","lastMonth","nextMonth","thisQuarter","lastQuarter","nextQuarter","thisYear","lastYear","nextYear","yearToDate","last7Days","last30Days","last90Days","last6Months","last12Months","last24Months"]);function ns(e,t){const n=t.getCustomOption(e);if(n){const{numberOfInputs:i}=n;return i??1}return e&&m7.has(e)?0:e==="inRange"?2:1}var Ih=class extends z_{constructor(e,t,n){super(e,"simple-filter"),this.mapValuesFromModel=t,this.defaultOptions=n,this.eTypes=[],this.eJoinPanels=[],this.eJoinAnds=[],this.eJoinOrs=[],this.eConditionBodies=[],this.listener=()=>this.onUiChanged(),this.lastUiCompletePosition=null,this.joinOperatorId=0}setParams(e){super.setParams(e);const t=new gv;this.optionsFactory=t,t.init(e,this.defaultOptions),this.commonUpdateSimpleParams(e),this.createOption(),this.createMissingConditionsAndOperators()}updateParams(e,t){this.optionsFactory.refresh(e,this.defaultOptions),super.updateParams(e,t),this.commonUpdateSimpleParams(e)}commonUpdateSimpleParams(e){this.setNumConditions(e),this.defaultJoinOperator=f7(e.defaultJoinOperator),this.filterPlaceholder=e.filterPlaceholder,this.createFilterListOptions(),ti(this.getGui(),"tabindex",this.isReadOnly()?"-1":null)}onFloatingFilterChanged(e,t){this.setTypeFromFloatingFilter(e),this.setValueFromFloatingFilter(t),this.onUiChanged("immediately",!0)}setTypeFromFloatingFilter(e){this.eTypes.forEach((t,n)=>{const i=n===0?e:this.optionsFactory.defaultOption;t.setValue(i,!0)})}getModelFromUi(){const e=this.getUiCompleteConditions();return e.length===0?null:this.maxNumConditions>1&&e.length>1?{filterType:this.filterType,operator:this.getJoinOperator(),conditions:e}:e[0]}getConditionTypes(){return this.eTypes.map(e=>e.getValue())}getConditionType(e){return this.eTypes[e].getValue()}getJoinOperator(){const{eJoinOrs:e,defaultJoinOperator:t}=this;return e.length===0?t:e[0].getValue()===!0?"OR":"AND"}areNonNullModelsEqual(e,t){const n=!e.operator,i=!t.operator;if(!n&&i||n&&!i)return!1;let r;if(n){const s=e,a=t;r=this.areSimpleModelsEqual(s,a)}else{const s=e,a=t;r=s.operator===a.operator&&Lr(s.conditions,a.conditions,(l,u)=>this.areSimpleModelsEqual(l,u))}return r}setModelIntoUi(e,t){if(e==null)return this.resetUiToDefaults(t),Mt.resolve();if(e.operator){const i=e;let o=i.conditions;o==null&&(o=[],se(77));const r=g7(o,this.maxNumConditions),s=this.getNumConditions();if(r<s)this.removeConditionsAndOperators(r);else if(r>s)for(let l=s;l<r;l++)this.createJoinOperatorPanel(),this.createOption();const a=i.operator==="OR";this.eJoinAnds.forEach(l=>l.setValue(!a,!0)),this.eJoinOrs.forEach(l=>l.setValue(a,!0)),o.forEach((l,u)=>{this.eTypes[u].setValue(l.type,!0),this.setConditionIntoUi(l,u)})}else{const i=e;this.getNumConditions()>1&&this.removeConditionsAndOperators(1),this.eTypes[0].setValue(i.type,!0),this.setConditionIntoUi(i,0)}return this.lastUiCompletePosition=this.getNumConditions()-1,this.createMissingConditionsAndOperators(),this.updateUiVisibility(),t||this.params.onUiChange(this.getUiChangeEventParams()),Mt.resolve()}setNumConditions(e){let t=e.maxNumConditions??2;t<1&&(se(79),t=1),this.maxNumConditions=t;let n=e.numAlwaysVisibleConditions??1;n<1&&(se(80),n=1),n>t&&(se(81),n=t),this.numAlwaysVisibleConditions=n}createOption(){const e=this.getGui(),t=this.createManagedBean(new cv);this.eTypes.push(t),t.addCss("ag-filter-select"),e.appendChild(t.getGui());const n=this.createEValue();this.eConditionBodies.push(n),e.appendChild(n),this.putOptionsIntoDropdown(t),this.resetType(t);const i=this.getNumConditions()-1;this.forEachPositionInput(i,o=>this.resetInput(o)),this.addChangedListeners(t,i)}createJoinOperatorPanel(){const e=on({tag:"div",cls:"ag-filter-condition"});this.eJoinPanels.push(e);const t=this.createJoinOperator(this.eJoinAnds,e,"and"),n=this.createJoinOperator(this.eJoinOrs,e,"or");this.getGui().appendChild(e);const i=this.eJoinPanels.length-1,o=this.joinOperatorId++;this.resetJoinOperatorAnd(t,i,o),this.resetJoinOperatorOr(n,i,o),this.isReadOnly()||(t.onValueChange(this.listener),n.onValueChange(this.listener))}createJoinOperator(e,t,n){const i=this.createManagedBean(new h7);e.push(i);const o="ag-filter-condition-operator";return i.addCss(o),i.addCss(`${o}-${n}`),t.appendChild(i.getGui()),i}createFilterListOptions(){this.filterListOptions=this.optionsFactory.filterOptions.map(e=>typeof e=="string"?this.createBoilerplateListOption(e):this.createCustomListOption(e))}putOptionsIntoDropdown(e){const{filterListOptions:t}=this;for(const n of t)e.addOption(n);e.setDisabled(t.length<=1)}createBoilerplateListOption(e){return{value:e,text:this.translate(e)}}createCustomListOption(e){const{displayKey:t}=e,n=this.optionsFactory.getCustomOption(e.displayKey);return{value:t,text:n?this.getLocaleTextFunc()(n.displayKey,n.displayName):this.translate(t)}}createBodyTemplate(){return null}getAgComponents(){return[]}updateUiVisibility(){const e=this.getJoinOperator();this.updateNumConditions(),this.updateConditionStatusesAndValues(this.lastUiCompletePosition,e)}updateNumConditions(){let e=-1,t=!0;for(let n=0;n<this.getNumConditions();n++)this.isConditionUiComplete(n)?e=n:t=!1;if(this.shouldAddNewConditionAtEnd(t))this.createJoinOperatorPanel(),this.createOption();else{const n=this.lastUiCompletePosition??this.getNumConditions()-2;if(e<n){this.removeConditionsAndOperators(n+1);const i=e+1,o=n-i;o>0&&this.removeConditionsAndOperators(i,o),this.createMissingConditionsAndOperators()}}this.lastUiCompletePosition=e}updateConditionStatusesAndValues(e,t){this.eTypes.forEach((i,o)=>{const r=this.isConditionDisabled(o,e);i.setDisabled(r||this.filterListOptions.length<=1),o===1&&(dc(this.eJoinPanels[0],r),this.eJoinAnds[0].setDisabled(r),this.eJoinOrs[0].setDisabled(r))}),this.eConditionBodies.forEach((i,o)=>{bt(i,this.isConditionBodyVisible(o))});const n=(t??this.getJoinOperator())==="OR";for(const i of this.eJoinAnds)i.setValue(!n,!0);for(const i of this.eJoinOrs)i.setValue(n,!0);this.forEachInput((i,o,r,s)=>{this.setElementDisplayed(i,o<s),this.setElementDisabled(i,this.isConditionDisabled(r,e))}),this.resetPlaceholder()}shouldAddNewConditionAtEnd(e){return e&&this.getNumConditions()<this.maxNumConditions&&!this.isReadOnly()}removeConditionsAndOperators(e,t){if(e>=this.getNumConditions())return;const{eTypes:n,eConditionBodies:i,eJoinPanels:o,eJoinAnds:r,eJoinOrs:s}=this;this.removeComponents(n,e,t),this.removeElements(i,e,t),this.removeEValues(e,t);const a=Math.max(e-1,0);this.removeElements(o,a,t),this.removeComponents(r,a,t),this.removeComponents(s,a,t)}removeElements(e,t,n){const i=Gc(e,t,n);for(const o of i)Mi(o)}removeComponents(e,t,n){const i=Gc(e,t,n);for(const o of i)Mi(o.getGui()),this.destroyBean(o)}afterGuiAttached(e){if(super.afterGuiAttached(e),this.resetPlaceholder(),!e?.suppressFocus){let t;if(!this.isReadOnly()){const n=this.getInputs(0)[0];n instanceof Us&&this.isConditionBodyVisible(0)?t=n.getInputElement():t=this.eTypes[0]?.getFocusableElement()}(t??this.getGui()).focus({preventScroll:!0})}}shouldKeepInvalidInputState(){return!1}afterGuiDetached(){super.afterGuiDetached();const e=this.params;if(this.beans.colFilter?.shouldKeepStateOnDetach(e.column)||this.shouldKeepInvalidInputState())return;e.onStateChange({model:e.model});let t=-1,n=-1,i=!1;const o=this.getJoinOperator();for(let s=this.getNumConditions()-1;s>=0;s--)if(this.isConditionUiComplete(s))t===-1&&(t=s,n=s);else{const a=s>=this.numAlwaysVisibleConditions&&!this.isConditionUiComplete(s-1),l=s<t;(a||l)&&(this.removeConditionsAndOperators(s,1),i=!0,l&&n--)}let r=!1;this.getNumConditions()<this.numAlwaysVisibleConditions&&(this.createMissingConditionsAndOperators(),r=!0),this.shouldAddNewConditionAtEnd(n===this.getNumConditions()-1)&&(this.createJoinOperatorPanel(),this.createOption(),r=!0),r&&this.updateConditionStatusesAndValues(n,o),i&&this.updateJoinOperatorsDisabled(),this.lastUiCompletePosition=n}getModelAsString(e){return this.params.getHandler()?.getModelAsString?.(e)??""}resetPlaceholder(){const e=this.getLocaleTextFunc(),{filterPlaceholder:t,eTypes:n}=this;this.forEachInput((i,o,r,s)=>{if(!(i instanceof Us))return;const a=o===0&&s>1?"inRangeStart":o===0?"filterOoo":"inRangeEnd",l=o===0&&s>1?e("ariaFilterFromValue","Filter from value"):o===0?e("ariaFilterValue","Filter Value"):e("ariaFilterToValue","Filter to Value"),u=n[r].getValue(),h=$0(this,t,a,u);i.setInputPlaceholder(h),i.setInputAriaLabel(l)})}setElementValue(e,t,n){e instanceof Us&&e.setValue(t!=null?String(t):null,!0)}setElementDisplayed(e,t){L0(e)&&bt(e.getGui(),t)}setElementDisabled(e,t){L0(e)&&dc(e.getGui(),t)}attachElementOnChange(e,t){e instanceof Us&&e.onValueChange(t)}forEachInput(e){this.getConditionTypes().forEach((t,n)=>{this.forEachPositionTypeInput(n,t,e)})}forEachPositionInput(e,t){const n=this.getConditionType(e);this.forEachPositionTypeInput(e,n,t)}forEachPositionTypeInput(e,t,n){const i=ns(t,this.optionsFactory),o=this.getInputs(e);for(let r=0;r<o.length;r++){const s=o[r];s!=null&&n(s,r,e,i)}}isConditionDisabled(e,t){return this.isReadOnly()?!0:e===0?!1:e>t+1}isConditionBodyVisible(e){const t=this.getConditionType(e);return ns(t,this.optionsFactory)>0}isConditionUiComplete(e){return!(e>=this.getNumConditions()||this.getConditionType(e)==="empty"||this.getValues(e).some(n=>n==null)||this.positionHasInvalidInputs(e))}getNumConditions(){return this.eTypes.length}getUiCompleteConditions(){const e=[];for(let t=0;t<this.getNumConditions();t++)this.isConditionUiComplete(t)&&e.push(this.createCondition(t));return e}createMissingConditionsAndOperators(){if(!this.isReadOnly())for(let e=this.getNumConditions();e<this.numAlwaysVisibleConditions;e++)this.createJoinOperatorPanel(),this.createOption()}resetUiToDefaults(e){this.removeConditionsAndOperators(this.isReadOnly()?1:this.numAlwaysVisibleConditions),this.eTypes.forEach(t=>this.resetType(t)),this.eJoinAnds.forEach((t,n)=>this.resetJoinOperatorAnd(t,n,this.joinOperatorId+n)),this.eJoinOrs.forEach((t,n)=>this.resetJoinOperatorOr(t,n,this.joinOperatorId+n)),this.joinOperatorId++,this.forEachInput(t=>this.resetInput(t)),this.resetPlaceholder(),this.createMissingConditionsAndOperators(),this.lastUiCompletePosition=null,this.updateUiVisibility(),e||this.params.onUiChange(this.getUiChangeEventParams())}resetType(e){const n=this.getLocaleTextFunc()("ariaFilteringOperator","Filtering operator");e.setValue(this.optionsFactory.defaultOption,!0).setAriaLabel(n).setDisabled(this.isReadOnly()||this.filterListOptions.length<=1)}resetJoinOperatorAnd(e,t,n){this.resetJoinOperator(e,t,this.defaultJoinOperator==="AND",this.translate("andCondition"),n)}resetJoinOperatorOr(e,t,n){this.resetJoinOperator(e,t,this.defaultJoinOperator==="OR",this.translate("orCondition"),n)}resetJoinOperator(e,t,n,i,o){this.updateJoinOperatorDisabled(e.setValue(n,!0).setName(`ag-simple-filter-and-or-${this.getCompId()}-${o}`).setLabel(i),t)}updateJoinOperatorsDisabled(){const e=(t,n)=>this.updateJoinOperatorDisabled(t,n);this.eJoinAnds.forEach(e),this.eJoinOrs.forEach(e)}updateJoinOperatorDisabled(e,t){e.setDisabled(this.isReadOnly()||t>0)}resetInput(e){this.setElementValue(e,null),this.setElementDisabled(e,this.isReadOnly())}setConditionIntoUi(e,t){const n=this.mapValuesFromModel(e,this.optionsFactory);this.forEachInput((i,o,r)=>{r===t&&this.setElementValue(i,n[o]!=null?n[o]:null)})}setValueFromFloatingFilter(e){this.forEachInput((t,n,i)=>{this.setElementValue(t,n===0&&i===0?e:null,!0)})}addChangedListeners(e,t){this.isReadOnly()||(e.onValueChange(this.listener),this.forEachPositionInput(t,n=>{this.attachElementOnChange(n,this.listener)}))}hasInvalidInputs(){return!1}positionHasInvalidInputs(e){return!1}isReadOnly(){return!!this.params.readOnly}},mv=["equals","notEqual","greaterThan","greaterThanOrEqual","lessThan","lessThanOrEqual","inRange","blank","notBlank"];function vv(e){return e?.allowedCharPattern??null}function Gx(e,t){const{filter:n,filterTo:i,type:o}=e||{};return[oi(n),oi(i)].slice(0,ns(o,t))}var v7=class extends Ih{constructor(){super("bigintFilter",Gx,mv),this.eValuesFrom=[],this.eValuesTo=[],this.filterType="bigint",this.defaultDebounceMs=500}afterGuiAttached(e){super.afterGuiAttached(e),this.refreshInputValidation()}shouldKeepInvalidInputState(){return!Ya()&&this.hasInvalidInputs()&&this.getConditionTypes().includes("inRange")}refreshInputValidation(){for(let e=0;e<this.eValuesFrom.length;e++){const t=this.eValuesFrom[e],n=this.eValuesTo[e];this.refreshInputPairValidation(t,n)}}refreshInputPairValidation(e,t,n=!1){const{bigintParser:i}=this.params,o=this.getParsedValue(e,i),r=this.getParsedValue(t,i),s=this.isInvalidValue(e,o),a=this.isInvalidValue(t,r),l=n?e:t,u=n?t:e,h=n?s:a,f=n?a:s;let p="";if(h)p=this.getLocaleTextFunc()("invalidBigInt","Invalid BigInt");else if(!s&&!a){const m=C7(o,r,n);m&&(p=this.translate(m,[String(n?t.getValue():e.getValue())]))}l.setCustomValidity(p),f||u.setCustomValidity(""),p.length>0&&this.beans.ariaAnnounce.announceValue(p,"dateFilter")}getState(){return{isInvalid:this.hasInvalidInputs()}}areStatesEqual(e,t){return(e?.isInvalid??!1)===(t?.isInvalid??!1)}refresh(e){const t=super.refresh(e),{state:n,additionalEventAttributes:i}=e,o=this.state,r=i?.fromAction;return(r&&r!="apply"||n.model!==o.model||!this.areStatesEqual(n.state,o.state))&&this.refreshInputValidation(),t}setElementValue(e,t,n){super.setElementValue(e,t,n),t===null&&e.setCustomValidity("")}createEValue(){const{params:e,eValuesFrom:t,eValuesTo:n}=this,i=vv(e),o=on({tag:"div",cls:"ag-filter-body",role:"presentation"}),r=this.createFromToElement(o,t,"from",i),s=this.createFromToElement(o,n,"to",i),a=(h,f,p)=>()=>this.refreshInputPairValidation(h,f,p),l=a(r,s,!0);r.onValueChange(l),r.addGuiEventListener("focusin",l);const u=a(r,s,!1);return s.onValueChange(u),s.addGuiEventListener("focusin",u),o}createFromToElement(e,t,n,i){const o=this.createManagedBean(i?new ar({allowedCharPattern:i}):new ar);return o.addCss(`ag-filter-${n}`),o.addCss("ag-filter-filter"),t.push(o),e.appendChild(o.getGui()),o}removeEValues(e,t){const n=i=>this.removeComponents(i,e,t);n(this.eValuesFrom),n(this.eValuesTo)}getValues(e){const t=[];return this.forEachPositionInput(e,(n,i,o,r)=>{i<r&&t.push(oi(n.getValue()??null))}),t}areSimpleModelsEqual(e,t){return e.filter===t.filter&&e.filterTo===t.filterTo&&e.type===t.type}createCondition(e){const t=this.getConditionType(e),n={filterType:this.filterType,type:t},i=this.getValues(e);return i.length>0&&(n.filter=String(i[0])),i.length>1&&(n.filterTo=String(i[1])),n}removeConditionsAndOperators(e,t){if(!this.hasInvalidInputs())return super.removeConditionsAndOperators(e,t)}getInputs(e){const{eValuesFrom:t,eValuesTo:n}=this;return e>=t.length?[null,null]:[t[e],n[e]]}hasInvalidInputs(){let e=!1;return this.forEachInput(t=>e||(e=!t.getInputElement().validity.valid)),e}positionHasInvalidInputs(e){let t=!1;return this.forEachPositionInput(e,n=>t||(t=!n.getInputElement().validity.valid)),t}canApply(e){return!this.hasInvalidInputs()}getParsedValue(e,t){const n=e.getValue();return n==null||typeof n=="string"&&n.trim()===""?null:t?t(n):oi(n)}isInvalidValue(e,t){const n=e.getValue();return n!=null&&String(n).trim()!==""&&t===null}};function C7(e,t,n){return e!=null&&t!=null&&e>=t?`strict${n?"Max":"Min"}ValueValidation`:null}var Hx=class extends X{constructor(e,t){super(),this.mapValuesFromModel=e,this.defaultOptions=t}init(e){const t=e.filterParams,n=new gv;this.optionsFactory=n,n.init(t,this.defaultOptions),this.filterModelFormatter=this.createManagedBean(new this.FilterModelFormatterClass(n,t)),this.updateParams(e),this.validateModel(e)}refresh(e){if(e.source==="colDef"){const t=e.filterParams,n=this.optionsFactory;n.refresh(t,this.defaultOptions),this.filterModelFormatter.updateParams({optionsFactory:n,filterParams:t}),this.updateParams(e)}this.validateModel(e)}updateParams(e){this.params=e}doesFilterPass(e){const t=e.model;if(t==null)return!0;const{operator:n}=t,i=[];if(n){const s=t;i.push(...s.conditions??[])}else i.push(t);const o=n&&n==="OR"?"some":"every",r=this.params.getValue(e.node);return i[o](s=>this.individualConditionPasses(e,s,r))}getModelAsString(e,t){return this.filterModelFormatter.getModelAsString(e,t)??""}validateModel(e){const{model:t,filterParams:{filterOptions:n,maxNumConditions:i}}=e;if(t==null)return;let r=M0(t)?t.conditions:[t];const s=n?.map(h=>typeof h=="string"?h:h.displayKey)??this.defaultOptions;if(!(!r||r.every(h=>s.find(f=>f===h.type)!==void 0))){this.params={...e,model:null},e.onModelChange(null);return}let l=!1;const u=this.filterType;if((r&&!r.every(h=>h.filterType===u)||t.filterType!==u)&&(r=r.map(h=>({...h,filterType:u})),l=!0),typeof i=="number"&&r&&r.length>i&&(r=r.slice(0,i),l=!0),l){const h=r.length>1?{...t,filterType:u,conditions:r}:{...r[0],filterType:u};this.params={...e,model:h},e.onModelChange(h)}}individualConditionPasses(e,t,n){const i=this.optionsFactory,o=this.mapValuesFromModel(t,i),r=i.getCustomOption(t.type),s=p7(r,o,n);return s??(n==null?this.evaluateNullValue(t.type):this.evaluateNonNullValue(o,n,t,e))}},Cv=class extends Hx{evaluateNullValue(e){const{includeBlanksInEquals:t,includeBlanksInNotEqual:n,includeBlanksInGreaterThan:i,includeBlanksInLessThan:o,includeBlanksInRange:r}=this.params.filterParams;switch(e){case"equals":if(t)return!0;break;case"notEqual":if(n)return!0;break;case"greaterThan":case"greaterThanOrEqual":if(i)return!0;break;case"lessThan":case"lessThanOrEqual":if(o)return!0;break;case"inRange":if(r)return!0;break;case"blank":return!0;case"notBlank":return!1}return!1}evaluateNonNullValue(e,t,n){const i=n.type;if(!this.isValid(t))return i==="notEqual"||i==="notBlank";const o=this.comparator(),r=e[0]!=null?o(e[0],t):0;switch(i){case"equals":return r===0;case"notEqual":return r!==0;case"greaterThan":return r>0;case"greaterThanOrEqual":return r>=0;case"lessThan":return r<0;case"lessThanOrEqual":return r<=0;case"inRange":{const s=o(e[1],t);return this.params.filterParams.inRangeInclusive?r>=0&&s<=0:r>0&&s<0}case"blank":return Ah(t);case"notBlank":return!Ah(t);default:return se(76,{filterModelType:i}),!0}}},wv={equals:"Equals",notEqual:"NotEqual",greaterThan:"GreaterThan",greaterThanOrEqual:"GreaterThanOrEqual",lessThan:"LessThan",lessThanOrEqual:"LessThanOrEqual",inRange:"InRange"},w7={contains:"Contains",notContains:"NotContains",equals:"TextEquals",notEqual:"TextNotEqual",startsWith:"StartsWith",endsWith:"EndsWith",inRange:"InRange"},Mh=class extends X{constructor(e,t,n){super(),this.optionsFactory=e,this.filterParams=t,this.valueFormatter=n}getModelAsString(e,t){const n=this.getLocaleTextFunc(),i=t==="filterToolPanel";if(!e)return i?to(this,"filterSummaryInactive"):null;if(e.operator!=null){const r=e,a=(r.conditions??[]).map(u=>this.getModelAsString(u,t)),l=r.operator==="AND"?"andCondition":"orCondition";return a.join(` ${to(this,l)} `)}else{if(e.type==="blank"||e.type==="notBlank")return i?to(this,e.type==="blank"?"filterSummaryBlank":"filterSummaryNotBlank"):n(e.type,e.type);{const r=e,s=this.optionsFactory.getCustomOption(r.type),{displayKey:a,displayName:l,numberOfInputs:u}=s||{};return a&&l&&u===0?n(a,l):this.conditionToString(r,i,r.type==="inRange"||u===2,a,l)}}}updateParams(e){const{optionsFactory:t,filterParams:n}=e;this.optionsFactory=t,this.filterParams=n}conditionForToolPanel(e,t,n,i,o,r){let s;const a=this.getTypeKey(e);return a&&(s=to(this,a)),o&&r&&(s=this.getLocaleTextFunc()(o,r)),s!=null?t?`${s} ${to(this,"filterSummaryInRangeValues",[n(),i()])}`:`${s} ${n()}`:null}getTypeKey(e){const t=this.filterTypeKeys[e];return t?`filterSummary${t}`:null}formatValue(e){const t=this.valueFormatter;return t?t(e??null)??"":String(e)}},Vx=class extends Mh{constructor(e,t){super(e,t,t.bigintFormatter),this.filterTypeKeys=wv}conditionToString(e,t,n,i,o){const{filter:r,filterTo:s,type:a}=e,l=this.formatValue.bind(this),u=oi(r),h=oi(s);if(t){const f=this.conditionForToolPanel(a,n,()=>l(u),()=>l(h),i,o);if(f!=null)return f}return n?`${l(u)}-${l(h)}`:r!=null?l(u):`${a}`}},b7=class extends Cv{constructor(){super(Gx,mv),this.filterType="bigint",this.FilterModelFormatterClass=Vx}comparator(){return(e,t)=>e===t?0:e<t?1:-1}isValid(e){return oi(e)!==null}},bv=class extends X{constructor(e){super(),this.params=e,this.eInput=he,this.onValueChanged=()=>{}}setupGui(e){this.eInput=this.createManagedBean(new ar(this.params?.config));const t=this.eInput.getGui();e.appendChild(t);const n=i=>this.onValueChanged(i);this.addManagedListeners(t,{input:n,keydown:n})}setEditable(e){this.eInput.setDisabled(!e)}getValue(){return this.eInput.getValue()}setValue(e,t){this.eInput.setValue(e,t)}setValueChangedListener(e){this.onValueChanged=e}setParams({ariaLabel:e,autoComplete:t,placeholder:n}){const{eInput:i}=this;i.setInputAriaLabel(e),t!==void 0&&i.setAutoComplete(t),i.toggleCss("ag-floating-filter-search-icon",!!n),i.setInputPlaceholder(n)}};function yv(e){const t=e?.trim();return t===""?e:t}function Wx(e,t){const{filter:n,filterTo:i,type:o}=e||{};return[n||null,i||null].slice(0,ns(o,t))}var zx=class extends yt{constructor(){super(...arguments),this.defaultDebounceMs=0}setLastTypeFromModel(e){if(!e){this.lastType=this.optionsFactory.defaultOption;return}const t=e.operator;let n;t?n=e.conditions[0]:n=e,this.lastType=n.type}canWeEditAfterModelFromParentFilter(e){if(!e)return this.isTypeEditable(this.lastType);if(e.operator)return!1;const n=e;return this.isTypeEditable(n.type)}init(e){this.params=e;const t=this.gos.get("enableFilterHandlers");if(this.reactive=t,this.setParams(e),t){const n=e;this.onModelUpdated(n.model)}}setParams(e){const t=new gv;this.optionsFactory=t,t.init(e.filterParams,this.defaultOptions),this.filterModelFormatter=this.createManagedBean(new this.FilterModelFormatterClass(t,e.filterParams)),this.setSimpleParams(e,!1)}setSimpleParams(e,t=!0){const n=this.optionsFactory.defaultOption;t||(this.lastType=n),this.readOnly=!!e.filterParams.readOnly;const i=this.isTypeEditable(n);this.setEditable(i)}refresh(e){this.params=e;const t=e,n=this.reactive;if((!n||t.source==="colDef")&&this.updateParams(e),n){const{source:i,model:o}=t;if(i==="dataChanged"||i==="ui")return;this.onModelUpdated(o)}}updateParams(e){const t=this.optionsFactory;t.refresh(e.filterParams,this.defaultOptions),this.setSimpleParams(e),this.filterModelFormatter.updateParams({optionsFactory:t,filterParams:e.filterParams})}onParentModelChanged(e,t){t?.afterFloatingFilter||t?.afterDataChange||this.onModelUpdated(e)}isTypeEditable(e){return!!e&&!this.readOnly&&ns(e,this.optionsFactory)===1}getAriaLabel(e){return`${this.beans.colNames.getDisplayNameForColumn(e,"header",!0)} ${this.getLocaleTextFunc()("ariaFilterInput","Filter Input")}`}},y7={tag:"div",ref:"eFloatingFilterInputContainer",cls:"ag-floating-filter-input",role:"presentation"},Sv=class extends zx{constructor(){super(...arguments),this.eFloatingFilterInputContainer=he,this.defaultDebounceMs=500}postConstruct(){this.setTemplate(y7)}onModelUpdated(e){this.setLastTypeFromModel(e),this.setEditable(this.canWeEditAfterModelFromParentFilter(e)),this.inputSvc.setValue(this.filterModelFormatter.getModelAsString(e))}setParams(e){this.setupFloatingFilterInputService(e),super.setParams(e),this.setTextInputParams(e)}setupFloatingFilterInputService(e){this.inputSvc=this.createFloatingFilterInputService(e),this.inputSvc.setupGui(this.eFloatingFilterInputContainer)}setTextInputParams(e){const{inputSvc:t,defaultDebounceMs:n,readOnly:i}=this,{filterPlaceholder:o,column:r,browserAutoComplete:s,filterParams:a}=e,l=this.lastType??this.optionsFactory.defaultOption,u=e.filterParams.filterPlaceholder,h=o===!0?$0(this,u,"filterOoo",l):o||void 0;if(t.setParams({ariaLabel:this.getAriaLabel(r),autoComplete:s??!1,placeholder:h}),this.applyActive=Qd(a),!i){const f=qg(a,n);t.setValueChangedListener(hn(this,this.syncUpWithParentFilter.bind(this),f))}}updateParams(e){super.updateParams(e),this.setTextInputParams(e)}recreateFloatingFilterInputService(e){const{inputSvc:t}=this,n=t.getValue();bn(this.eFloatingFilterInputContainer),this.destroyBean(t),this.setupFloatingFilterInputService(e),t.setValue(n,!0)}syncUpWithParentFilter(e){const t=e.key===q.ENTER,n=this.reactive;if(n&&this.params.onUiChange(),this.applyActive&&!t)return;const{inputSvc:i,params:o,lastType:r}=this;let s=i.getValue();if(o.filterParams.trimInput&&(s=yv(s),i.setValue(s,!0)),n){const a=o,l=a.model,u=this.convertValue(s),h=u==null?null:{...l??{filterType:this.filterType,type:r??this.optionsFactory.defaultOption},filter:u};a.onModelChange(h,{afterFloatingFilter:!0})}else o.parentFilterInstance(a=>{a?.onFloatingFilterChanged(r||null,s||null)})}convertValue(e){return e||null}setEditable(e){this.inputSvc.setEditable(e)}},S7=class extends Sv{constructor(){super(...arguments),this.FilterModelFormatterClass=Vx,this.filterType="bigint",this.defaultOptions=mv}updateParams(e){const t=e.filterParams;vv(t)!==this.allowedCharPattern&&this.recreateFloatingFilterInputService(e),this.bigintParser=t?.bigintParser,super.updateParams(e)}createFloatingFilterInputService(e){const t=e.filterParams;this.allowedCharPattern=vv(t),this.bigintParser=t?.bigintParser;const n=this.allowedCharPattern?{allowedCharPattern:this.allowedCharPattern}:void 0;return this.createManagedBean(new bv({config:n}))}convertValue(e){return e==null||e===""?null:this.bigintParser?this.bigintParser(e):oi(e)}},Ux=".ag-input-field-input",$x=class{constructor(e,t,n,i,o,r){this.context=e,this.eParent=o,this.alive=!0,this.debouncedReport=hn({isAlive:()=>this.alive},jx,500),this.timeoutHandle=null,T_(t,n,i)?.newAgStackInstance().then(a=>{if(!this.alive){e.destroyBean(a);return}if(this.dateComp=a,!a)return;o.appendChild(a.getGui()),a?.afterGuiAttached?.();const{tempValue:l,disabled:u}=this;l&&a.setDate(l),u!=null&&a.setDisabled?.(u),r?.(this)})}destroy(){this.alive=!1,this.dateComp=this.context.destroyBean(this.dateComp)}getDate(){return this.dateComp?this.dateComp.getDate():this.tempValue}setDate(e){const t=this.dateComp;t?t.setDate(e):this.tempValue=e}setDisabled(e){const t=this.dateComp;t?t.setDisabled?.(e):this.disabled=e}setDisplayed(e){bt(this.eParent,e)}setInputPlaceholder(e){this.dateComp?.setInputPlaceholder?.(e)}setInputAriaLabel(e){this.dateComp?.setInputAriaLabel?.(e)}afterGuiAttached(e){this.dateComp?.afterGuiAttached?.(e)}updateParams(e){this.dateComp?.refresh?.(e)}setCustomValidity(e,t=!1){const n=this.dateComp?.getGui().querySelector(Ux);if(n&&"setCustomValidity"in n){const i=e.length>0;n.setCustomValidity(e),i?t?this.timeoutHandle=this.debouncedReport(n):jx(n):this.timeoutHandle&&window.clearTimeout(this.timeoutHandle),fg(n,i)}}getValidity(){return this.dateComp?.getGui().querySelector(Ux)?.validity}};function jx(e){e.reportValidity()}var Rv=["equals","notEqual","lessThan","greaterThan","inRange","blank","notBlank"];function Kx(e,t){const{dateFrom:n,dateTo:i,type:o}=e||{};return[n&&$n(n,void 0,!0)||null,i&&$n(i,void 0,!0)||null].slice(0,ns(o,t))}var qx=1e3,Qx=1/0,R7=class extends Ih{constructor(){super("dateFilter",Kx,Rv),this.eConditionPanelsFrom=[],this.eConditionPanelsTo=[],this.dateConditionFromComps=[],this.dateConditionToComps=[],this.minValidYear=qx,this.maxValidYear=Qx,this.minValidDate=null,this.maxValidDate=null,this.filterType="date"}afterGuiAttached(e){super.afterGuiAttached(e),this.dateConditionFromComps[0].afterGuiAttached(e),this.refreshInputValidation()}shouldKeepInvalidInputState(){return!Ya()&&this.hasInvalidInputs()&&this.getConditionTypes().includes("inRange")}commonUpdateSimpleParams(e){super.commonUpdateSimpleParams(e);const t=(l,u)=>{const h=e[l];if(h!=null)if(isNaN(h))se(82,{param:l});else return h==null?u:Number(h);return u},n=t("minValidYear",qx),i=t("maxValidYear",Qx);this.minValidYear=n,this.maxValidYear=i,n>i&&se(83);const{minValidDate:o,maxValidDate:r}=e,s=o instanceof Date?o:$n(o);this.minValidDate=s;const a=r instanceof Date?r:$n(r);this.maxValidDate=a,s&&a&&s>a&&se(84)}refreshInputValidation(){for(let e=0;e<this.dateConditionFromComps.length;e++)this.refreshInputPairValidation(e,!1,!0)}refreshInputPairValidation(e,t=!1,n=!1){const{dateConditionFromComps:i,dateConditionToComps:o,beans:r}=this,s=i[e],a=o[e],l=ns(this.getConditionType(e),this.optionsFactory),u=s.getDate(),h=a.getDate(),f=l>=2?F7(u,h,t):null,p=f?this.translate(f,[String(t?h:u)]):"",m=!Ya()&&!n;(t?s:a).setCustomValidity(p,m),(t?a:s).setCustomValidity("",m),p.length>0&&r.ariaAnnounce.announceValue(p,"dateFilter")}createDateCompWrapper(e,t,n){const{beans:{userCompFactory:i,context:o,gos:r},params:s}=this,a=n==="from",l=new $x(o,i,s.colDef,We(r,{onDateChanged:()=>{this.refreshInputPairValidation(t,a),this.onUiChanged()},onFocusIn:()=>this.refreshInputPairValidation(t,a),filterParams:s,location:"filter"}),e);return this.addDestroyFunc(()=>l.destroy()),l}getState(){return{isInvalid:this.hasInvalidInputs()}}areStatesEqual(e,t){return(e?.isInvalid??!1)===(t?.isInvalid??!1)}setElementValue(e,t){e.setDate(t),t||e.setCustomValidity("")}setElementDisplayed(e,t){e.setDisplayed(t)}setElementDisabled(e,t){e.setDisabled(t)}createEValue(){const e=on({tag:"div",cls:"ag-filter-body"});return this.createFromToElement(e,this.eConditionPanelsFrom,this.dateConditionFromComps,"from"),this.createFromToElement(e,this.eConditionPanelsTo,this.dateConditionToComps,"to"),e}createFromToElement(e,t,n,i){const o=on({tag:"div",cls:`ag-filter-${i} ag-filter-date-${i}`});t.push(o),e.appendChild(o),n.push(this.createDateCompWrapper(o,t.length-1,i))}removeEValues(e,t){this.removeDateComps(this.dateConditionFromComps,e,t),this.removeDateComps(this.dateConditionToComps,e,t),Gc(this.eConditionPanelsFrom,e,t),Gc(this.eConditionPanelsTo,e,t)}removeDateComps(e,t,n){const i=Gc(e,t,n);for(const o of i)o.destroy()}isValidDateValue(e){if(e===null)return!1;const{minValidDate:t,maxValidDate:n,minValidYear:i,maxValidYear:o}=this;if(t){if(e<t)return!1}else if(e.getUTCFullYear()<i)return!1;if(n){if(e>n)return!1}else if(e.getUTCFullYear()>o)return!1;return!0}hasInvalidInputs(){let e=!1;return this.forEachInput(t=>e||(e=t.getDate()!=null&&!(t.getValidity()?.valid??!0))),e}positionHasInvalidInputs(e){let t=!1;return this.forEachPositionInput(e,n=>t||(t=!(n.getValidity()?.valid??!0))),t}canApply(e){return!this.hasInvalidInputs()}isConditionUiComplete(e){if(!super.isConditionUiComplete(e))return!1;let t=!0;return this.forEachPositionInput(e,(n,i,o,r)=>{!t||i>=r||t&&(t=this.isValidDateValue(n.getDate()))}),t}areSimpleModelsEqual(e,t){return e.dateFrom===t.dateFrom&&e.dateTo===t.dateTo&&e.type===t.type}createCondition(e){const t=this.getConditionType(e),n={},{params:i,filterType:o}=this,r=this.getValues(e),s=i.useIsoSeparator?"T":" ";return r.length>0&&(n.dateFrom=Un(r[0],!0,s)),r.length>1&&(n.dateTo=Un(r[1],!0,s)),{dateFrom:null,dateTo:null,filterType:o,type:t,...n}}removeConditionsAndOperators(e,t){if(!this.hasInvalidInputs())return super.removeConditionsAndOperators(e,t)}resetPlaceholder(){const e=this.getLocaleTextFunc(),t=this.translate("dateFormatOoo"),n=e("ariaFilterValue","Filter Value");this.forEachInput(i=>{i.setInputPlaceholder(t),i.setInputAriaLabel(n)})}getInputs(e){const{dateConditionFromComps:t,dateConditionToComps:n}=this;return e>=t.length?[null,null]:[t[e],n[e]]}getValues(e){const t=[];return this.forEachPositionInput(e,(n,i,o,r)=>{i<r&&t.push(n.getDate())}),t}translate(e,t){let n=e;return e==="lessThan"?n="before":e==="greaterThan"&&(n="after"),super.translate(n,t)}};function F7(e,t,n){return e!=null&&t!=null&&e>=t?`${n?"max":"min"}DateValidation`:null}var Yx=class extends Mh{constructor(e,t){super(e,t,n=>{const{dataTypeSvc:i,valueSvc:o}=this.beans,r=t.column,s=i?.getDateFormatterFunction(r),a=s?s(n??void 0):n;return o.formatValue(r,null,a)}),this.filterTypeKeys=wv}conditionToString(e,t,n,i,o){const{type:r}=e,s=$n(e.dateFrom),a=$n(e.dateTo),l=this.filterParams.inRangeFloatingFilterDateFormat,u=t?this.formatValue.bind(this):p=>rH(p,l),h=()=>s!==null?u(s):"null",f=()=>a!==null?u(a):"null";if(s==null&&a==null)return to(this,r);if(t){const p=this.conditionForToolPanel(r,n,h,f,i,o);if(p!=null)return p}return n?`${h()}-${f()}`:s!=null?u(s):`${r}`}};function x7(e,t){const n=t;return n<e?-1:n>e?1:0}var P7=class extends Cv{constructor(){super(Kx,Rv),this.filterType="date",this.FilterModelFormatterClass=Yx,this.filterTypeToRangeCache=new Map}getOrRefreshRangeCacheItem(e,t){const{filterTypeToRangeCache:n}=this,i=Date.now();let o=n.get(e);if(o&&o.expires<i&&(o=void 0),!o){const[r,s]=t(new Date(i),new Date(i));o={from:r,to:s,expires:Gi(new Date(i)).getTime()-i},n.set(e,o)}return o}comparator(){return this.params.filterParams.comparator??x7}isValid(e){const t=this.params.filterParams.isValidDate;return!t||t(e)}evaluateNonNullValue(e,t,n){const i=n.type,o=this.comparator();if(!this.isValid(t))return i==="notEqual"||i==="notBlank";const r=i,s=j7[r];if(s){const{from:a,to:l}=this.getOrRefreshRangeCacheItem(r,s);return o(a,t)>=0&&o(l,t)<0}return super.evaluateNonNullValue(e,t,n)}},E7=1,kh=null,D7=()=>{if(kh!=null)return kh;let e;const t=typeof navigator>"u"?void 0:navigator.languages?.[0]??navigator.language;if(t&&typeof Intl<"u"&&typeof Intl.Locale=="function")try{e=new Intl.Locale(t).getWeekInfo?.()?.firstDay}catch{e=void 0}return kh=e==null?E7:e%7,kh},mi=e=>(e.setHours(0,0,0,0),e),Lh=e=>{const t=e.getDay(),n=D7(),i=(t-n+7)%7;return e.setDate(e.getDate()-i),mi(e)},Oh=(e,t=1)=>(e.setDate(e.getDate()-t),e),Gi=e=>(e.setDate(e.getDate()+1),mi(e)),Zx=e=>(Lh(e),e.setDate(e.getDate()+6),Gi(e)),_h=e=>(e.setDate(1),mi(e)),Fv=e=>(e.setDate(1),e.setMonth(e.getMonth()+1),mi(e)),xv=e=>{const t=Math.floor(e.getMonth()/3);return e.setMonth(t*3),_h(e)},Xx=e=>{const t=Math.floor(e.getMonth()/3);return e.setMonth(t*3+2),Fv(e)},Pv=e=>(e.setMonth(0,1),mi(e)),Jx=e=>(e.setMonth(12,0),Gi(e)),cl=e=>Oh(e),Ev=e=>cl(Lh(e)),Dv=e=>cl(_h(e)),Tv=e=>cl(xv(e)),Av=(e,t)=>[mi(e),Gi(t)],T7=(e,t)=>Av(cl(e),cl(t)),Iv=(e,t)=>[Lh(e),Zx(t)],A7=(e,t)=>Iv(Ev(e),Ev(t)),Mv=(e,t)=>[_h(e),Fv(t)],I7=(e,t)=>Mv(Dv(e),Dv(t)),kv=(e,t)=>[xv(e),Xx(t)],M7=(e,t)=>kv(Tv(e),Tv(t)),Lv=(e,t)=>[Pv(e),Jx(t)],k7=(e,t)=>[Pv(e),Gi(t)],L7=(e,t)=>[mi(Oh(e,7)),Gi(t)],O7=(e,t)=>[mi(Oh(e,30)),Gi(t)],_7=(e,t)=>[mi(Oh(e,90)),Gi(t)],N7=(e,t)=>(e.setFullYear(e.getFullYear()-1),e.setMonth(e.getMonth()+6),[mi(e),Gi(t)]),B7=(e,t)=>(e.setFullYear(e.getFullYear()-1),[mi(e),Gi(t)]),G7=(e,t)=>(e.setFullYear(e.getFullYear()-2),[mi(e),Gi(t)]),H7=(e,t)=>(e.setFullYear(e.getFullYear()-1),t.setFullYear(t.getFullYear()-1),Lv(e,t)),V7=(e,t)=>(e.setFullYear(e.getFullYear()+1),t.setFullYear(t.getFullYear()+1),Lv(e,t)),W7=(e,t)=>(e.setMonth(e.getMonth()+3),t.setMonth(t.getMonth()+3),kv(e,t)),z7=(e,t)=>(e.setMonth(e.getMonth()+1),t.setMonth(t.getMonth()+1),Mv(e,t)),U7=(e,t)=>(e.setDate(e.getDate()+7),t.setDate(t.getDate()+7),Iv(e,t)),$7=(e,t)=>(e.setDate(e.getDate()+1),t.setDate(t.getDate()+1),Av(e,t)),j7={today:Av,yesterday:T7,tomorrow:$7,thisWeek:Iv,lastWeek:A7,nextWeek:U7,thisMonth:Mv,lastMonth:I7,nextMonth:z7,thisQuarter:kv,lastQuarter:M7,nextQuarter:W7,thisYear:Lv,lastYear:H7,nextYear:V7,yearToDate:k7,last7Days:L7,last30Days:O7,last90Days:_7,last6Months:N7,last12Months:B7,last24Months:G7,setStartOfDay:mi,setStartOfWeek:Lh,setStartOfNextDay:Gi,setStartOfNextWeek:Zx,setStartOfMonth:_h,setStartOfNextMonth:Fv,setStartOfQuarter:xv,setStartOfNextQuarter:Xx,setStartOfYear:Pv,setStartOfNextYear:Jx,setPreviousDay:cl,setPreviousWeek:Ev,setPreviousMonth:Dv,setPreviousQuarter:Tv},K7={tag:"div",cls:"ag-floating-filter-input",role:"presentation",children:[{tag:"ag-input-text-field",ref:"eReadOnlyText"},{tag:"div",ref:"eDateWrapper",cls:"ag-date-floating-filter-wrapper"}]},q7=class extends zx{constructor(){super(K7,[Eh]),this.eReadOnlyText=he,this.eDateWrapper=he,this.FilterModelFormatterClass=Yx,this.filterType="date",this.defaultOptions=Rv}setParams(e){super.setParams(e),this.createDateComponent();const t=this.getLocaleTextFunc();this.eReadOnlyText.setDisabled(!0).setInputAriaLabel(t("ariaDateFilterInput","Date Filter Input"))}updateParams(e){super.updateParams(e),this.dateComp.updateParams(this.getDateComponentParams()),this.updateCompOnModelChange(e.currentParentModel())}updateCompOnModelChange(e){const t=!this.readOnly&&this.canWeEditAfterModelFromParentFilter(e);if(this.setEditable(t),t){const n=e?$n(e.dateFrom):null;this.dateComp.setDate(n),this.eReadOnlyText.setValue("")}else this.eReadOnlyText.setValue(this.filterModelFormatter.getModelAsString(e)),this.dateComp.setDate(null)}setEditable(e){bt(this.eDateWrapper,e),bt(this.eReadOnlyText.getGui(),!e)}onModelUpdated(e){super.setLastTypeFromModel(e),this.updateCompOnModelChange(e)}onDateChanged(){const e=this.dateComp.getDate();if(this.reactive){const t=this.params;t.onUiChange();const n=t.model,i=Un(e),o=i==null?null:{...n??{filterType:this.filterType,type:this.lastType??this.optionsFactory.defaultOption},dateFrom:i};t.onModelChange(o,{afterFloatingFilter:!0})}else this.params.parentFilterInstance(t=>{t?.onFloatingFilterChanged(this.lastType||null,e)})}getDateComponentParams(){const{filterParams:e}=this.params,t=qg(e,this.defaultDebounceMs);return We(this.gos,{onDateChanged:hn(this,this.onDateChanged.bind(this),t),filterParams:e,location:"floatingFilter"})}createDateComponent(){const{beans:{context:e,userCompFactory:t},eDateWrapper:n,params:{column:i}}=this;this.dateComp=new $x(e,t,i.getColDef(),this.getDateComponentParams(),n,o=>{o.setInputAriaLabel(this.getAriaLabel(i))}),this.addDestroyFunc(()=>this.dateComp.destroy())}},Q7={tag:"div",cls:"ag-filter-filter",children:[{tag:"ag-input-text-field",ref:"eDateInput",cls:"ag-date-filter"}]},Y7=class extends yt{constructor(){super(Q7,[Eh]),this.eDateInput=he,this.isApply=!1,this.applyOnFocusOut=!1}init(e){this.params=e,this.setParams(e);const t=this.eDateInput.getInputElement();this.addManagedListeners(t,{mouseDown:()=>{this.eDateInput.isDisabled()||this.usingSafariDatePicker||t.focus({preventScroll:!0})},input:this.handleInput.bind(this,!1),change:this.handleInput.bind(this,!0),focusout:this.handleFocusOut.bind(this),focusin:this.handleFocusIn.bind(this)})}handleInput(e){if(!this.eDateInput.isDisabled()){if(this.isApply){this.applyOnFocusOut=!e,e&&this.params.onDateChanged();return}e||this.params.onDateChanged()}}handleFocusOut(){this.applyOnFocusOut&&(this.applyOnFocusOut=!1,this.params.onDateChanged())}handleFocusIn(){this.params.onFocusIn?.()}setParams(e){const t=this.eDateInput.getInputElement(),n=this.shouldUseBrowserDatePicker(e);this.usingSafariDatePicker=n&&Ur();const{minValidYear:i,maxValidYear:o,minValidDate:r,maxValidDate:s,buttons:a,includeTime:l,colDef:u}=e.filterParams||{},h=this.beans.dataTypeSvc,f=l??h?.getDateIncludesTimeFlag?.(u.cellDataType)??!1;n?f?(t.type="datetime-local",t.step="1"):t.type="date":t.type="text";const p=e1(r,i,!0),m=e1(s,o,!1);p&&m&&p.getTime()>m.getTime()&&se(87),p&&(t.min=Un(p,f)),m&&(t.max=Un(m,f)),this.isApply=e.location==="floatingFilter"&&!!a?.includes("apply")}refresh(e){this.params=e,this.setParams(e)}getDate(){return $n(this.eDateInput.getValue())}setDate(e){const t=this.params.filterParams.colDef.cellDataType,n=this.beans.dataTypeSvc?.getDateIncludesTimeFlag(t)??!1;this.eDateInput.setValue(Un(e,n))}setInputPlaceholder(e){this.eDateInput.setInputPlaceholder(e)}setInputAriaLabel(e){this.eDateInput.setAriaLabel(e)}setDisabled(e){this.eDateInput.setDisabled(e)}afterGuiAttached(e){e?.suppressFocus||this.eDateInput.getInputElement().focus({preventScroll:!0})}shouldUseBrowserDatePicker(e){return e?.filterParams?.browserDatePicker??!0}};function e1(e,t,n){return e&&t&&se(n?85:86),e instanceof Date?e:e?$n(e):t?$n(`${t}-${n?"01-01":"12-31"}`):null}var Ov=["equals","notEqual","greaterThan","greaterThanOrEqual","lessThan","lessThanOrEqual","inRange","blank","notBlank"];function _v(e){return e?.allowedCharPattern??null}function Nh(e){return e==null||isNaN(e)?null:e}function t1(e,t){const{filter:n,filterTo:i,type:o}=e||{};return[Nh(n),Nh(i)].slice(0,ns(o,t))}var Z7=class extends Ih{constructor(){super("numberFilter",t1,Ov),this.eValuesFrom=[],this.eValuesTo=[],this.filterType="number",this.defaultDebounceMs=500}afterGuiAttached(e){super.afterGuiAttached(e),this.refreshInputValidation()}shouldKeepInvalidInputState(){return!Ya()&&this.hasInvalidInputs()&&this.getConditionTypes().includes("inRange")}refreshInputValidation(){for(let e=0;e<this.eValuesFrom.length;e++){const t=this.eValuesFrom[e],n=this.eValuesTo[e];this.refreshInputPairValidation(t,n)}}refreshInputPairValidation(e,t,n=!1){const i=this.params.numberParser,o=i1(i,e),r=i1(i,t),s=X7(o,r,n),a=s?this.translate(s,[String(n?r:o)]):"";(n?e:t).setCustomValidity(a),(n?t:e).setCustomValidity(""),a.length>0&&this.beans.ariaAnnounce.announceValue(a,"dateFilter")}getState(){return{isInvalid:this.hasInvalidInputs()}}areStatesEqual(e,t){return(e?.isInvalid??!1)===(t?.isInvalid??!1)}refresh(e){const t=super.refresh(e),{state:n,additionalEventAttributes:i}=e,o=this.state,r=i?.fromAction;return(r&&r!="apply"||n.model!==o.model||!this.areStatesEqual(n.state,o.state))&&this.refreshInputValidation(),t}setElementValue(e,t,n){const{numberFormatter:i}=this.params,o=!n&&i?i(t??null):t;super.setElementValue(e,o),o===null&&e.setCustomValidity("")}createEValue(){const{params:e,eValuesFrom:t,eValuesTo:n}=this,i=_v(e),o=on({tag:"div",cls:"ag-filter-body",role:"presentation"}),r=this.createFromToElement(o,t,"from",i),s=this.createFromToElement(o,n,"to",i),a=(h,f,p)=>()=>this.refreshInputPairValidation(h,f,p),l=a(r,s,!0);r.onValueChange(l),r.addGuiEventListener("focusin",l);const u=a(r,s,!1);return s.onValueChange(u),s.addGuiEventListener("focusin",u),o}createFromToElement(e,t,n,i){const o=this.createManagedBean(i?new ar({allowedCharPattern:i}):new lv);return o.addCss(`ag-filter-${n}`),o.addCss("ag-filter-filter"),t.push(o),e.appendChild(o.getGui()),o}removeEValues(e,t){const n=i=>this.removeComponents(i,e,t);n(this.eValuesFrom),n(this.eValuesTo)}getValues(e){const t=[];return this.forEachPositionInput(e,(n,i,o,r)=>{i<r&&t.push(Nh(n1(this.params.numberParser,n.getValue())))}),t}areSimpleModelsEqual(e,t){return e.filter===t.filter&&e.filterTo===t.filterTo&&e.type===t.type}createCondition(e){const t=this.getConditionType(e),n={filterType:this.filterType,type:t},i=this.getValues(e);return i.length>0&&(n.filter=i[0]),i.length>1&&(n.filterTo=i[1]),n}removeConditionsAndOperators(e,t){if(!this.hasInvalidInputs())return super.removeConditionsAndOperators(e,t)}getInputs(e){const{eValuesFrom:t,eValuesTo:n}=this;return e>=t.length?[null,null]:[t[e],n[e]]}hasInvalidInputs(){let e=!1;return this.forEachInput(t=>e||(e=!t.getInputElement().validity.valid)),e}positionHasInvalidInputs(e){let t=!1;return this.forEachPositionInput(e,n=>t||(t=!n.getInputElement().validity.valid)),t}canApply(e){return!this.hasInvalidInputs()}};function n1(e,t){if(typeof t=="number")return t;let n=Jo(t);return n!=null&&n.trim()===""&&(n=null),e?e(n):n==null||n.trim()==="-"?null:Number.parseFloat(n)}function i1(e,t){return Nh(n1(e,t.getValue(!0)))}function X7(e,t,n){return e!=null&&t!=null&&e>=t?`strict${n?"Max":"Min"}ValueValidation`:null}var o1=class extends Mh{constructor(e,t){super(e,t,t.numberFormatter),this.filterTypeKeys=wv}conditionToString(e,t,n,i,o){const{filter:r,filterTo:s,type:a}=e,l=this.formatValue.bind(this);if(t){const u=this.conditionForToolPanel(a,n,()=>l(r),()=>l(s),i,o);if(u!=null)return u}return n?`${l(r)}-${l(s)}`:r!=null?l(r):`${a}`}},J7=class extends Cv{constructor(){super(t1,Ov),this.filterType="number",this.FilterModelFormatterClass=o1}comparator(){return(e,t)=>e===t?0:e<t?1:-1}isValid(e){return!isNaN(e)}},e9=class extends X{constructor(){super(...arguments),this.onValueChanged=()=>{},this.numberInputActive=!0}setupGui(e){this.eNumberInput=this.createManagedBean(new lv),this.eTextInput=this.createManagedBean(new ar),this.eTextInput.setDisabled(!0);const t=this.eNumberInput.getGui(),n=this.eTextInput.getGui();e.appendChild(t),e.appendChild(n),this.setupListeners(t,i=>this.onValueChanged(i)),this.setupListeners(n,i=>this.onValueChanged(i))}setEditable(e){this.numberInputActive=e,this.eNumberInput.setDisplayed(this.numberInputActive),this.eTextInput.setDisplayed(!this.numberInputActive)}setAutoComplete(e){this.eNumberInput.setAutoComplete(e),this.eTextInput.setAutoComplete(e)}getValue(){return this.getActiveInputElement().getValue()}setValue(e,t){this.getActiveInputElement().setValue(e,t)}getActiveInputElement(){return this.numberInputActive?this.eNumberInput:this.eTextInput}setValueChangedListener(e){this.onValueChanged=e}setupListeners(e,t){this.addManagedListeners(e,{input:t,keydown:t})}setParams({ariaLabel:e,autoComplete:t,placeholder:n}){this.setAriaLabel(e),t!==void 0&&this.setAutoComplete(t),this.setPlaceholder(this.eNumberInput,n),this.setPlaceholder(this.eTextInput,n)}setPlaceholder(e,t){e.toggleCss("ag-floating-filter-search-icon",!!t),e.setInputPlaceholder(t)}setAriaLabel(e){this.eNumberInput.setInputAriaLabel(e),this.eTextInput.setInputAriaLabel(e)}},t9=class extends Sv{constructor(){super(...arguments),this.FilterModelFormatterClass=o1,this.filterType="number",this.defaultOptions=Ov}updateParams(e){_v(e.filterParams)!==this.allowedCharPattern&&this.recreateFloatingFilterInputService(e),super.updateParams(e)}createFloatingFilterInputService(e){return this.allowedCharPattern=_v(e.filterParams),this.allowedCharPattern?this.createManagedBean(new bv({config:{allowedCharPattern:this.allowedCharPattern}})):this.createManagedBean(new e9)}convertValue(e){return e?Number(e):null}},Nv=["contains","notContains","equals","notEqual","startsWith","endsWith","blank","notBlank"],n9=class extends Ih{constructor(){super("textFilter",Wx,Nv),this.filterType="text",this.eValuesFrom=[],this.eValuesTo=[],this.defaultDebounceMs=500}createCondition(e){const t=this.getConditionType(e),n={filterType:this.filterType,type:t},i=this.getValues(e);return i.length>0&&(n.filter=i[0]),i.length>1&&(n.filterTo=i[1]),n}areSimpleModelsEqual(e,t){return e.filter===t.filter&&e.filterTo===t.filterTo&&e.type===t.type}getInputs(e){const{eValuesFrom:t,eValuesTo:n}=this;return e>=t.length?[null,null]:[t[e],n[e]]}getValues(e){const t=[];return this.forEachPositionInput(e,(n,i,o,r)=>{i<r&&t.push(Jo(n.getValue()))}),t}createEValue(){const e=on({tag:"div",cls:"ag-filter-body",role:"presentation"}),{eValuesFrom:t,eValuesTo:n}=this;return this.createFromToElement(e,t,"from"),this.createFromToElement(e,n,"to"),e}createFromToElement(e,t,n){const i=this.createManagedBean(new ar);i.addCss(`ag-filter-${n}`),i.addCss("ag-filter-filter"),t.push(i),e.appendChild(i.getGui())}removeEValues(e,t){const n=r=>this.removeComponents(r,e,t),{eValuesFrom:i,eValuesTo:o}=this;n(i),n(o)}},r1=class extends Mh{constructor(){super(...arguments),this.filterTypeKeys=w7}conditionToString(e,t,n,i,o){const{filter:r,filterTo:s,type:a}=e;if(t){const l=h=>()=>to(this,"filterSummaryTextQuote",[h]),u=this.conditionForToolPanel(a,n,l(r),l(s),i,o);if(u!=null)return u}return n?`${r}-${s}`:r!=null?`${r}`:`${a}`}},i9=({filterOption:e,value:t,filterText:n})=>{if(n==null)return!1;switch(e){case"contains":return t.includes(n);case"notContains":return!t.includes(n);case"equals":return t===n;case"notEqual":return t!=n;case"startsWith":return t.indexOf(n)===0;case"endsWith":{const i=t.lastIndexOf(n);return i>=0&&i===t.length-n.length}default:return!1}},o9=e=>e,r9=e=>e==null?null:e.toString().toLowerCase(),s9=class extends Hx{constructor(){super(Wx,Nv),this.filterType="text",this.FilterModelFormatterClass=r1}updateParams(e){super.updateParams(e);const t=e.filterParams;this.matcher=t.textMatcher??i9,this.formatter=t.textFormatter??(t.caseSensitive?o9:r9)}evaluateNullValue(e){return e?["notEqual","notContains","blank"].indexOf(e)>=0:!1}evaluateNonNullValue(e,t,n,i){const o=e.map(p=>this.formatter(p))||[],r=this.formatter(t),{api:s,colDef:a,column:l,context:u,filterParams:{textFormatter:h}}=this.params;if(n.type==="blank")return Ah(t);if(n.type==="notBlank")return!Ah(t);const f={api:s,colDef:a,column:l,context:u,node:i.node,data:i.data,filterOption:n.type,value:r,textFormatter:h};return o.some(p=>this.matcher({...f,filterText:p}))}processModelToApply(e){if(e&&this.params.filterParams.trimInput){const t=n=>{const i={...n},{filter:o,filterTo:r}=n;return o&&(i.filter=yv(o)??null),r&&(i.filterTo=yv(r)??null),i};return M0(e)?{...e,conditions:e.conditions.map(t)}:t(e)}return e}},a9=class extends Sv{constructor(){super(...arguments),this.FilterModelFormatterClass=r1,this.filterType="text",this.defaultOptions=Nv}createFloatingFilterInputService(){return this.createManagedBean(new bv)}};function l9(e){return!!e.quickFilter?.isFilterPresent()}function c9(e){return e.quickFilter?.getText()}function u9(e){e.quickFilter?.resetCache()}var d9=class extends X{constructor(){super(...arguments),this.beanName="quickFilter",this.quickFilter=null,this.quickFilterParts=null}postConstruct(){const e=this.resetCache.bind(this),t=this.gos;this.addManagedEventListeners({columnPivotModeChanged:e,newColumnsLoaded:e,columnRowGroupChanged:e,columnVisible:()=>{t.get("includeHiddenColumnsInQuickFilter")||this.resetCache()}}),this.addManagedPropertyListener("quickFilterText",n=>this.setFilter(n.currentValue)),this.addManagedPropertyListeners(["includeHiddenColumnsInQuickFilter","applyQuickFilterBeforePivotOrAgg"],()=>this.onColumnConfigChanged()),this.quickFilter=this.parseFilter(t.get("quickFilterText")),this.parser=t.get("quickFilterParser"),this.matcher=t.get("quickFilterMatcher"),this.setFilterParts(),this.addManagedPropertyListeners(["quickFilterMatcher","quickFilterParser"],()=>this.setParserAndMatcher())}refreshCols(){const{autoColSvc:e,colModel:t,gos:n,pivotResultCols:i}=this.beans,o=t.isPivotMode(),r=e?.getColumns(),s=t.getColDefCols();let a=(o&&!n.get("applyQuickFilterBeforePivotOrAgg")?i?.getPivotResultCols()?.list:s)??[];r&&(a=a.concat(r)),this.colsToUse=n.get("includeHiddenColumnsInQuickFilter")?a:a.filter(l=>l.isVisible()||l.isRowGroupActive())}isFilterPresent(){return this.quickFilter!==null}doesRowPass(e){const t=this.gos.get("cacheQuickFilter");return this.matcher?this.doesRowPassMatcher(t,e):this.quickFilterParts.every(n=>t?this.doesRowPassCache(e,n):this.doesRowPassNoCache(e,n))}resetCache(){this.beans.rowModel.forEachNode(e=>e.quickFilterAggregateText=null)}getText(){return this.gos.get("quickFilterText")}setFilterParts(){const{quickFilter:e,parser:t}=this;e?this.quickFilterParts=t?t(e):e.split(" "):this.quickFilterParts=null}parseFilter(e){return we(e)?e.toUpperCase():null}setFilter(e){if(e!=null&&typeof e!="string"){se(70,{newFilter:e});return}const t=this.parseFilter(e);this.quickFilter!==t&&(this.quickFilter=t,this.setFilterParts(),this.dispatchLocalEvent({type:"quickFilterChanged"}))}setParserAndMatcher(){const e=this.gos.get("quickFilterParser"),t=this.gos.get("quickFilterMatcher"),n=e!==this.parser||t!==this.matcher;this.parser=e,this.matcher=t,n&&(this.setFilterParts(),this.dispatchLocalEvent({type:"quickFilterChanged"}))}onColumnConfigChanged(){this.refreshCols(),this.resetCache(),this.isFilterPresent()&&this.dispatchLocalEvent({type:"quickFilterChanged"})}doesRowPassNoCache(e,t){return this.colsToUse.some(n=>{const i=this.getTextForColumn(n,e);return we(i)&&i.includes(t)})}doesRowPassCache(e,t){return this.checkGenerateAggText(e),e.quickFilterAggregateText.includes(t)}doesRowPassMatcher(e,t){let n;e?(this.checkGenerateAggText(t),n=t.quickFilterAggregateText):n=this.getAggText(t);const{quickFilterParts:i,matcher:o}=this;return o(i,n)}checkGenerateAggText(e){e.quickFilterAggregateText||(e.quickFilterAggregateText=this.getAggText(e))}getTextForColumn(e,t){let n=this.beans.filterValueSvc.getValue(e,t);const i=e.getColDef();if(i.getQuickFilterText){const o=We(this.gos,{value:n,node:t,data:t.data,column:e,colDef:i});n=i.getQuickFilterText(o)}return we(n)?n.toString().toUpperCase():null}getAggText(e){const t=[];for(const n of this.colsToUse){const i=this.getTextForColumn(n,e);we(i)&&t.push(i)}return t.join(`
|
|
64
|
+
`)}},h9={moduleName:"ClientSideRowModelFilter",version:ve,rowModels:["clientSide"],beans:[rz]},Bv={moduleName:"FilterCore",version:ve,beans:[t7],apiFunctions:{isAnyFilterPresent:J4,onFilterChanged:e7},css:[M4],dependsOn:[h9]},s1={moduleName:"FilterValue",version:ve,beans:[c7]},Hc={moduleName:"ColumnFilter",version:ve,beans:[X4,l7],dynamicBeans:{headerFilterCellCtrl:E4},icons:{filter:"filter",filterActive:"filter"},apiFunctions:{isColumnFilterPresent:k4,getColumnFilterInstance:L4,destroyFilter:O4,setFilterModel:_4,getFilterModel:N4,getColumnFilterModel:B4,setColumnFilterModel:G4,showColumnFilter:H4,hideColumnFilter:V4,getColumnFilterHandler:W4,doFilterAction:z4},dependsOn:[Bv,Ph,s1,I4]},f9={moduleName:"CustomFilter",version:ve,userComponents:{agReadOnlyFloatingFilter:d7},dependsOn:[Hc]},p9={moduleName:"TextFilter",version:ve,dependsOn:[Hc],userComponents:{agTextColumnFilter:{classImp:n9,params:{useForm:!0}},agTextColumnFloatingFilter:a9},dynamicBeans:{agTextColumnFilterHandler:s9}},g9={moduleName:"NumberFilter",version:ve,dependsOn:[Hc],userComponents:{agNumberColumnFilter:{classImp:Z7,params:{useForm:!0}},agNumberColumnFloatingFilter:t9},dynamicBeans:{agNumberColumnFilterHandler:J7}},m9={moduleName:"BigIntFilter",version:ve,dependsOn:[Hc],userComponents:{agBigIntColumnFilter:{classImp:v7,params:{useForm:!0}},agBigIntColumnFloatingFilter:S7},dynamicBeans:{agBigIntColumnFilterHandler:b7}},v9={moduleName:"DateFilter",version:ve,dependsOn:[Hc],userComponents:{agDateColumnFilter:{classImp:R7,params:{useForm:!0}},agDateInput:Y7,agDateColumnFloatingFilter:q7},dynamicBeans:{agDateColumnFilterHandler:P7}},C9={moduleName:"QuickFilterCore",version:ve,rowModels:["clientSide"],beans:[d9],dependsOn:[Bv,s1]},w9={moduleName:"QuickFilter",version:ve,apiFunctions:{isQuickFilterPresent:l9,getQuickFilter:c9,resetQuickFilter:u9},dependsOn:[C9]},b9={moduleName:"ExternalFilter",version:ve,dependsOn:[Bv]},y9=class extends X{constructor(e,t,n){super(),this.id=e,this.parentCache=t,this.params=n,this.state="needsLoading",this.version=0,this.startRow=e*n.blockSize,this.endRow=this.startRow+n.blockSize}load(){this.state="loading",this.loadFromDatasource()}setStateWaitingToLoad(){this.version++,this.state="needsLoading"}pageLoadFailed(e){this.isRequestMostRecentAndLive(e)&&(this.state="failed"),this.dispatchLocalEvent({type:"loadComplete"})}pageLoaded(e,t,n){this.successCommon(e,{rowData:t,rowCount:n})}isRequestMostRecentAndLive(e){const t=e===this.version,n=this.isAlive();return t&&n}successCommon(e,t){this.dispatchLocalEvent({type:"loadComplete"}),this.isRequestMostRecentAndLive(e)&&(this.state="loaded",this.processServerResult(t))}postConstruct(){this.rowNodes=[];const{params:{blockSize:e,rowHeight:t},startRow:n,beans:i,rowNodes:o}=this;for(let r=0;r<e;r++){const s=n+r,a=new $r(i);a.setRowHeight(t),a.uiLevel=0,a.setRowIndex(s),a.setRowTop(t*s),o.push(a)}}getBlockStateJson(){const{id:e,startRow:t,endRow:n,state:i}=this;return{id:""+e,state:{blockNumber:e,startRow:t,endRow:n,pageStatus:i}}}setDataAndId(e,t,n){we(t)?e.setDataAndId(t,n.toString()):e.setDataAndId(void 0,void 0)}loadFromDatasource(){const e=this.createLoadParams();if(Nt(this.params.datasource.getRows)){se(90);return}window.setTimeout(()=>{this.params.datasource.getRows(e)},0)}createLoadParams(){const{startRow:e,endRow:t,version:n,params:{sortModel:i,filterModel:o},gos:r}=this;return We(r,{startRow:e,endRow:t,successCallback:this.pageLoaded.bind(this,n),failCallback:this.pageLoadFailed.bind(this,n),sortModel:i,filterModel:o})}forEachNode(e,t,n){this.rowNodes.forEach((i,o)=>{this.startRow+o<n&&e(i,t.value++)})}getRow(e,t=!1){t||(this.lastAccessed=this.params.lastAccessedSequence.value++);const n=e-this.startRow;return this.rowNodes[n]}processServerResult(e){const{rowNodes:t,beans:n}=this;t.forEach((o,r)=>{const s=e.rowData?e.rowData[r]:void 0;!o.id&&o.alreadyRendered&&s&&(t[r]=new $r(n),t[r].setRowIndex(o.rowIndex),t[r].setRowTop(o.rowTop),t[r].setRowHeight(o.rowHeight),o._destroy(!0)),this.setDataAndId(t[r],s,this.startRow+r)});const i=e.rowCount!=null&&e.rowCount>=0?e.rowCount:void 0;this.parentCache.pageLoaded(this,i)}destroy(){const e=this.rowNodes;for(let t=0,n=e.length;t<n;t++)e[t]._destroy(!1);e.length=0,super.destroy()}},S9=2,R9=class extends X{constructor(e){super(),this.params=e,this.lastRowIndexKnown=!1,this.blocks={},this.blockCount=0,this.rowCount=e.initialRowCount}getRow(e,t=!1){const n=Math.floor(e/this.params.blockSize);let i=this.blocks[n];if(!i){if(t)return;i=this.createBlock(n)}return i.getRow(e)}createBlock(e){const t=this.params,n=this.createBean(new y9(e,this,t));return this.blocks[n.id]=n,this.blockCount++,this.purgeBlocksIfNeeded(n),t.rowNodeBlockLoader.addBlock(n),n}refreshCache(){if(this.blockCount==0){this.purgeCache();return}for(const t of this.getBlocksInOrder())t.setStateWaitingToLoad();this.params.rowNodeBlockLoader.checkBlockToLoad()}destroy(){for(const e of this.getBlocksInOrder())this.destroyBlock(e);super.destroy()}getRowCount(){return this.rowCount}isLastRowIndexKnown(){return this.lastRowIndexKnown}pageLoaded(e,t){this.isAlive()&&(Br(this.gos,`InfiniteCache - onPageLoaded: page = ${e.id}, lastRow = ${t}`),this.checkRowCount(e,t),this.onCacheUpdated())}purgeBlocksIfNeeded(e){const t=this.getBlocksInOrder().filter(s=>s!=e),n=(s,a)=>a.lastAccessed-s.lastAccessed;t.sort(n);const i=this.params.maxBlocksInCache>0,o=i?this.params.maxBlocksInCache-1:null,r=S9-1;t.forEach((s,a)=>{const l=s.state==="needsLoading"&&a>=r,u=i?a>=o:!1;if(l||u){if(this.isBlockCurrentlyDisplayed(s)||this.isBlockFocused(s))return;this.removeBlockFromCache(s)}})}isBlockFocused(e){const t=this.beans.focusSvc.getFocusCellToUseAfterRefresh();if(!t||t.rowPinned!=null)return!1;const{startRow:n,endRow:i}=e;return t.rowIndex>=n&&t.rowIndex<i}isBlockCurrentlyDisplayed(e){const{startRow:t,endRow:n}=e;return this.beans.rowRenderer.isRangeInRenderedViewport(t,n-1)}removeBlockFromCache(e){e&&this.destroyBlock(e)}checkRowCount(e,t){if(typeof t=="number"&&t>=0)this.rowCount=t,this.lastRowIndexKnown=!0;else if(!this.lastRowIndexKnown){const{blockSize:n,overflowSize:i}=this.params,r=(e.id+1)*n+i;this.rowCount<r&&(this.rowCount=r)}}setRowCount(e,t){this.rowCount=e,we(t)&&(this.lastRowIndexKnown=t),this.lastRowIndexKnown||this.rowCount%this.params.blockSize===0&&this.rowCount++,this.onCacheUpdated()}forEachNodeDeep(e){const t={value:0};for(const n of this.getBlocksInOrder())n.forEachNode(e,t,this.rowCount)}getBlocksInOrder(){const e=(n,i)=>n.id-i.id;return Object.values(this.blocks).sort(e)}destroyBlock(e){delete this.blocks[e.id],this.destroyBean(e),this.blockCount--,this.params.rowNodeBlockLoader.removeBlock(e)}onCacheUpdated(){this.isAlive()&&(this.destroyAllBlocksPastVirtualRowCount(),this.eventSvc.dispatchEvent({type:"storeUpdated"}))}destroyAllBlocksPastVirtualRowCount(){const e=[];for(const t of this.getBlocksInOrder())t.id*this.params.blockSize>=this.rowCount&&e.push(t);if(e.length>0)for(const t of e)this.destroyBlock(t)}purgeCache(){for(const e of this.getBlocksInOrder())this.removeBlockFromCache(e);this.lastRowIndexKnown=!1,this.rowCount===0&&(this.rowCount=this.params.initialRowCount),this.onCacheUpdated()}getRowNodesInRange(e,t){const n=[];let i=-1,o=!1;const r={value:0};let s=!1;for(const l of this.getBlocksInOrder())if(!s){if(o&&i+1!==l.id){s=!0;continue}i=l.id,l.forEachNode(u=>{const h=u===e||u===t;(o||h)&&n.push(u),h&&(o=!o)},r,this.rowCount)}return s||o?[]:n}},F9=class extends X{constructor(){super(...arguments),this.beanName="rowModel",this.rootNode=null,this.hierarchical=!1}getRowBounds(e){return{rowHeight:this.rowHeight,rowTop:this.rowHeight*e}}ensureRowHeightsValid(){return!1}postConstruct(){if(this.gos.get("rowModelType")!=="infinite")return;const e=this.beans,t=new $r(e);this.rootNode=t,t.level=-1,this.rowHeight=Ls(e),this.addEventListeners(),this.addDestroyFunc(()=>this.destroyCache())}start(){this.setDatasource(this.gos.get("datasource"))}destroy(){this.destroyDatasource(),super.destroy(),this.rootNode=null}destroyDatasource(){this.datasource&&(this.destroyBean(this.datasource),this.beans.rowRenderer.datasourceChanged(),this.datasource=null)}addEventListeners(){this.addManagedEventListeners({filterChanged:this.reset.bind(this),sortChanged:this.reset.bind(this),newColumnsLoaded:this.onColumnEverything.bind(this),storeUpdated:this.dispatchModelUpdatedEvent.bind(this)}),this.addManagedPropertyListener("datasource",()=>this.setDatasource(this.gos.get("datasource"))),this.addManagedPropertyListener("cacheBlockSize",()=>this.resetCache()),this.addManagedPropertyListener("rowHeight",()=>{this.rowHeight=Ls(this.beans),this.cacheParams.rowHeight=this.rowHeight,this.updateRowHeights()})}onColumnEverything(){let e;this.cacheParams?e=!sc(this.cacheParams.sortModel,this.beans.sortSvc?.getSortModel()??[]):e=!0,e&&this.reset()}getType(){return"infinite"}setDatasource(e){this.destroyDatasource(),this.datasource=e,e&&this.reset()}isEmpty(){return!this.infiniteCache}isRowsToRender(){return!!this.infiniteCache}getOverlayType(){return this.infiniteCache?.getRowCount()===0?this.beans.filterManager?.isAnyFilterPresent()?"noMatchingRows":"noRows":null}getNodesInRangeForSelection(e,t){return this.infiniteCache?.getRowNodesInRange(e,t)??[]}reset(){if(!this.datasource)return;Ua(this.gos)!=null||this.beans.selectionSvc?.reset("rowDataChanged"),this.resetCache()}dispatchModelUpdatedEvent(){this.eventSvc.dispatchEvent({type:"modelUpdated",newPage:!1,newPageSize:!1,newData:!1,keepRenderedRows:!0,animate:!1})}resetCache(){this.destroyCache();const e=this.beans,{filterManager:t,sortSvc:n,rowNodeBlockLoader:i,eventSvc:o,gos:r}=e;this.cacheParams={datasource:this.datasource,filterModel:t?.getFilterModel()??{},sortModel:n?.getSortModel()??[],rowNodeBlockLoader:i,initialRowCount:r.get("infiniteInitialRowCount"),maxBlocksInCache:r.get("maxBlocksInCache"),rowHeight:Ls(e),overflowSize:r.get("cacheOverflowSize"),blockSize:r.get("cacheBlockSize"),lastAccessedSequence:{value:0}},this.infiniteCache=this.createBean(new R9(this.cacheParams)),o.dispatchEventOnce({type:"rowCountReady"}),this.dispatchModelUpdatedEvent()}updateRowHeights(){this.forEachNode(e=>{e.setRowHeight(this.rowHeight),e.setRowTop(this.rowHeight*e.rowIndex)}),this.dispatchModelUpdatedEvent()}destroyCache(){this.infiniteCache=this.destroyBean(this.infiniteCache)}getRow(e){const t=this.infiniteCache;if(t&&!(e>=t.getRowCount()))return t.getRow(e)}getRowNode(e){let t;return this.forEachNode(n=>{n.id===e&&(t=n)}),t}forEachNode(e){this.infiniteCache?.forEachNodeDeep(e)}getTopLevelRowCount(){return this.getRowCount()}getTopLevelRowDisplayedIndex(e){return e}getRowIndexAtPixel(e){if(this.rowHeight!==0){const t=Math.floor(e/this.rowHeight),n=this.getRowCount()-1;return t>n?n:t}return 0}getRowCount(){return this.infiniteCache?this.infiniteCache.getRowCount():0}isRowPresent(e){return!!this.getRowNode(e.id)}refreshCache(){this.infiniteCache?.refreshCache()}purgeCache(){this.infiniteCache?.purgeCache()}isLastRowIndexKnown(){return this.infiniteCache?.isLastRowIndexKnown()??!1}setRowCount(e,t){this.infiniteCache?.setRowCount(e,t)}resetRowHeights(){}onRowHeightChanged(){}};function x9(e){Zd(e)?.refreshCache()}function P9(e){Zd(e)?.purgeCache()}function E9(e){return Zd(e)?.getRowCount()}var D9=class extends X{constructor(){super(...arguments),this.beanName="rowNodeBlockLoader",this.activeBlockLoadsCount=0,this.blocks=[],this.active=!0}postConstruct(){this.maxConcurrentRequests=gO(this.gos);const e=this.gos.get("blockLoadDebounceMillis");e&&e>0&&(this.checkBlockToLoadDebounce=hn(this,this.performCheckBlocksToLoad.bind(this),e))}addBlock(e){this.blocks.push(e),e.addEventListener("loadComplete",this.loadComplete.bind(this)),this.checkBlockToLoad()}removeBlock(e){Ro(this.blocks,e)}destroy(){super.destroy(),this.active=!1}loadComplete(){this.activeBlockLoadsCount--,this.checkBlockToLoad()}checkBlockToLoad(){this.checkBlockToLoadDebounce?this.checkBlockToLoadDebounce():this.performCheckBlocksToLoad()}performCheckBlocksToLoad(){if(!this.active)return;if(this.printCacheStatus(),this.maxConcurrentRequests!=null&&this.activeBlockLoadsCount>=this.maxConcurrentRequests){Br(this.gos,"RowNodeBlockLoader - checkBlockToLoad: max loads exceeded");return}const e=this.maxConcurrentRequests!=null?this.maxConcurrentRequests-this.activeBlockLoadsCount:1,t=this.blocks.filter(n=>n.state==="needsLoading").slice(0,e);this.activeBlockLoadsCount+=t.length;for(const n of t)n.load();this.printCacheStatus()}getBlockState(){const e={};return this.blocks.forEach(t=>{const{id:n,state:i}=t.getBlockStateJson();e[n]=i}),e}printCacheStatus(){Br(this.gos,`RowNodeBlockLoader - printCacheStatus: activePageLoadsCount = ${this.activeBlockLoadsCount}, blocks = ${JSON.stringify(this.getBlockState())}`)}},T9={moduleName:"InfiniteRowModelCore",version:ve,rowModels:["infinite"],beans:[F9,D9]},A9={moduleName:"InfiniteRowModel",version:ve,apiFunctions:{refreshInfiniteCache:x9,purgeInfiniteCache:P9,getInfiniteRowCount:E9},dependsOn:[T9,XW]},I9=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(){this.wrapSvc=this.beans.frameworkOverrides.createGlobalEventListenerWrapper?.()}addListener(e,t){const n=this.wrapSvc?.wrap(e,t)??t,i=!kc.has(e),o=i?this.asyncListeners:this.syncListeners;o.has(e)||o.set(e,new Set),o.get(e).add(n),this.eventSvc.addListener(e,n,i)}removeListener(e,t){const n=this.wrapSvc?.unwrap(e,t)??t,o=!!this.asyncListeners.get(e)?.delete(n);o||this.syncListeners.get(e)?.delete(n),this.eventSvc.removeListener(e,n,o)}addGlobalListener(e){const t=this.wrapSvc?.wrapGlobal(e)??e,n=(r,s)=>{kc.has(r)&&t(r,s)},i=(r,s)=>{kc.has(r)||t(r,s)};this.globalListenerPairs.set(e,{syncListener:n,asyncListener:i});const o=this.eventSvc;o.addGlobalListener(n,!1),o.addGlobalListener(i,!0)}removeGlobalListener(e){const{eventSvc:t,wrapSvc:n,globalListenerPairs:i}=this,o=n?.unwrapGlobal(e)??e;if(i.has(o)){const{syncListener:s,asyncListener:a}=i.get(o);t.removeGlobalListener(s,!1),t.removeGlobalListener(a,!0),i.delete(e)}else this.syncGlobalListeners.delete(o),t.removeGlobalListener(o,!1)}destroyEventListeners(e,t){e.forEach((n,i)=>{n.forEach(o=>this.eventSvc.removeListener(i,o,t)),n.clear()}),e.clear()}destroyGlobalListeners(e,t){for(const n of e)this.eventSvc.removeGlobalListener(n,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:n,asyncListener:i})=>{t.removeGlobalListener(n,!1),t.removeGlobalListener(i,!0)}),e.clear()}};function M9(e,t,n){e.apiEventSvc?.addListener(t,n)}function k9(e,t,n){e.apiEventSvc?.removeListener(t,n)}function L9(e,t){e.apiEventSvc?.addGlobalListener(t)}function O9(e,t){e.apiEventSvc?.removeGlobalListener(t)}var _9={moduleName:"EventApi",version:ve,apiFunctions:{addEventListener:M9,addGlobalListener:L9,removeEventListener:k9,removeGlobalListener:O9},beans:[I9]},N9=class extends X{constructor(){super(...arguments),this.beanName="localeSvc"}getLocaleTextFunc(){const e=this.gos,t=e.getCallback("getLocaleText");return t?NL(t):BL(e.get("localeText"))}},B9={moduleName:"Locale",version:ve,beans:[N9]};function G9(e){return e.stateSvc?.getState()??{}}function H9(e,t,n){return e.stateSvc?.setState(t,n)}function a1(e){return e={...e},e.version||(e.version="32.1.0"),e.version==="32.1.0"&&(e=V9(e)),e.version=ve,e}function V9(e){return e.cellSelection=W9(e,"rangeSelection"),e}function W9(e,t){if(e&&typeof e=="object")return e[t]}var z9=class extends X{constructor(){super(...arguments),this.beanName="stateSvc",this.updateRowGroupExpansionStateTimer=0,this.suppressEvents=!0,this.queuedUpdateSources=new Set,this.dispatchStateUpdateEventDebounced=hn(this,()=>this.dispatchQueuedStateUpdateEvents(),0),this.onRowGroupOpenedDebounced=hn(this,()=>this.updateGroupExpansionState(),0),this.onRowSelectedDebounced=hn(this,()=>{this.staleStateKeys.delete("rowSelection"),this.updateCachedState("rowSelection",this.getRowSelectionState())},0),this.staleStateKeys=new Set}postConstruct(){const{gos:e,ctrlsSvc:t,colDelayRenderSvc:n}=this.beans;this.isClientSideRowModel=Yt(e);const i=a1(e.get("initialState")??{}),o=i.partialColumnState;delete i.partialColumnState,this.cachedState=i;const r=this.suppressEventsAndDispatchInitEvent.bind(this);t.whenReady(this,()=>r(()=>this.setupStateOnGridReady(i))),(i.columnOrder||i.columnVisibility||i.columnSizing||i.columnPinning||i.columnGroup)&&n?.hideColumns("columnState");const[s,a,l]=this.addManagedEventListeners({newColumnsLoaded:({source:u})=>{u==="gridInitializing"&&(s(),r(()=>{this.setupStateOnColumnsInitialised(i,!!o),n?.revealColumns("columnState")}))},rowCountReady:()=>{a?.(),r(()=>this.setupStateOnRowCountReady(i))},firstDataRendered:()=>{l?.(),r(()=>this.setupStateOnFirstDataRendered(i))}})}destroy(){super.destroy(),clearTimeout(this.updateRowGroupExpansionStateTimer),this.queuedUpdateSources.clear()}getState(){return this.staleStateKeys.size&&this.refreshStaleState(),this.cachedState}setState(e,t){const n=a1(e);delete n.partialColumnState,this.cachedState=n,this.startSuppressEvents();const i="api",o=t?new Set(t):void 0;this.setGridReadyState(n,i,o),this.setColumnsInitialisedState(n,i,!!o,o),this.setRowCountState(n,i,o),setTimeout(()=>{this.isAlive()&&this.setFirstDataRenderedState(n,i,o),this.stopSuppressEvents(i)})}setGridReadyState(e,t,n){t==="api"&&!n?.has("sideBar")&&this.beans.sideBar?.comp?.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,n,i){this.setColumnState(e,t,n,i),this.setColumnGroupState(e,t,i),this.updateColumnAndGroupState()}setupStateOnColumnsInitialised(e,t){this.setColumnsInitialisedState(e,"gridInitializing",t);const n=i=>()=>this.updateColumnState([i]);this.addManagedEventListeners({columnValueChanged:n("aggregation"),columnMoved:n("columnOrder"),columnPinned:n("columnPinning"),columnResized:n("columnSizing"),columnVisible:n("columnVisibility"),columnPivotChanged:n("pivot"),columnPivotModeChanged:n("pivot"),columnRowGroupChanged:n("rowGroup"),sortChanged:n("sort"),newColumnsLoaded:({source:i})=>{this.updateColumnAndGroupState(),i!=="gridInitializing"&&this.isClientSideRowModel&&this.onRowGroupOpenedDebounced()},columnGroupOpened:()=>this.updateCachedState("columnGroup",this.getColumnGroupState())})}setRowCountState(e,t,n){const{filter:i,rowGroupExpansion:o,ssrmRowGroupExpansion:r,rowSelection:s,pagination:a,rowPinning:l}=e,u=(f,p)=>!n?.has(f)&&(p||t==="api");u("filter",i)&&this.setFilterState(i),(u("rowGroupExpansion",o)||u("ssrmRowGroupExpansion",r))&&this.setRowGroupExpansionState(r,o,t),u("rowSelection",s)&&this.setRowSelectionState(s,t),u("pagination",a)&&this.setPaginationState(a,t),u("rowPinning",l)&&this.setRowPinningState(l);const h=this.updateCachedState.bind(this);h("filter",this.getFilterState()),this.updateGroupExpansionState(),h("rowSelection",this.getRowSelectionState()),h("pagination",this.getPaginationState())}setupStateOnRowCountReady(e){this.setRowCountState(e,"gridInitializing");const t=this.updateCachedState.bind(this),n=()=>{this.updateRowGroupExpansionStateTimer=0,this.updateGroupExpansionState()},i=()=>t("filter",this.getFilterState()),{gos:o,colFilter:r,selectableFilter:s}=this.beans;this.addManagedEventListeners({filterChanged:i,rowExpansionStateChanged:this.onRowGroupOpenedDebounced,expandOrCollapseAll:n,columnRowGroupChanged:n,rowDataUpdated:()=>{(o.get("groupDefaultExpanded")!==0||o.get("isGroupOpenByDefault"))&&(this.updateRowGroupExpansionStateTimer||(this.updateRowGroupExpansionStateTimer=setTimeout(n)))},selectionChanged:()=>{this.staleStateKeys.add("rowSelection"),this.onRowSelectedDebounced()},paginationChanged:a=>{(a.newPage||a.newPageSize)&&t("pagination",this.getPaginationState())},pinnedRowsChanged:()=>t("rowPinning",this.getRowPinningState())}),r&&this.addManagedListeners(r,{filterStateChanged:i}),s&&this.addManagedListeners(s,{selectedFilterChanged:i})}setFirstDataRenderedState(e,t,n){const{scroll:i,cellSelection:o,focusedCell:r,columnOrder:s}=e,a=(h,f)=>!n?.has(h)&&(f||t==="api");a("focusedCell",r)&&this.setFocusedCellState(r),a("cellSelection",o)&&this.setCellSelectionState(o),a("scroll",i)&&this.setScrollState(i),this.setColumnPivotState(!!s?.orderedColIds,t);const l=this.updateCachedState.bind(this);l("sideBar",this.getSideBarState()),l("focusedCell",this.getFocusedCellState());const u=this.getRangeSelectionState();l("rangeSelection",u),l("cellSelection",u),l("scroll",this.getScrollState())}setupStateOnFirstDataRendered(e){this.setFirstDataRenderedState(e,"gridInitializing");const t=this.updateCachedState.bind(this),n=()=>t("focusedCell",this.getFocusedCellState());this.addManagedEventListeners({cellFocused:n,cellFocusCleared:n,cellSelectionChanged:i=>{if(i.finished){const o=this.getRangeSelectionState();t("rangeSelection",o),t("cellSelection",o)}},bodyScrollEnd:()=>t("scroll",this.getScrollState())})}getColumnState(){const e=this.beans;return EW(hh(e),e.colModel.isPivotMode())}setColumnState(e,t,n,i){const{sort:o,rowGroup:r,aggregation:s,pivot:a,columnPinning:l,columnVisibility:u,columnSizing:h,columnOrder:f}=e;let p=!1;const m=(A,T)=>{const k=!i?.has(A)&&!!(T||t==="api");return p||(p=k),k},v={},w=A=>{let T=v[A];return T||(T={colId:A},v[A]=T,T)},b={},y=m("sort",o);y&&o?.sortModel.forEach(({colId:A,sort:T,type:k},K)=>{const re=w(A);re.sort=T,re.sortIndex=K,re.sortType=k}),(y||!n)&&(b.sort=null,b.sortIndex=null);const R=m("rowGroup",r);R&&r?.groupColIds.forEach((A,T)=>{const k=w(A);k.rowGroup=!0,k.rowGroupIndex=T}),(R||!n)&&(b.rowGroup=null,b.rowGroupIndex=null);const S=m("aggregation",s);S&&s?.aggregationModel.forEach(({colId:A,aggFunc:T})=>{w(A).aggFunc=T}),(S||!n)&&(b.aggFunc=null);const P=m("pivot",a);P&&(a?.pivotColIds.forEach((A,T)=>{const k=w(A);k.pivot=!0,k.pivotIndex=T}),this.gos.updateGridOptions({options:{pivotMode:!!a?.pivotMode},source:t})),(P||!n)&&(b.pivot=null,b.pivotIndex=null);const F=m("columnPinning",l);if(F){for(const A of l?.leftColIds??[])w(A).pinned="left";for(const A of l?.rightColIds??[])w(A).pinned="right"}(F||!n)&&(b.pinned=null);const I=m("columnVisibility",u);if(I)for(const A of u?.hiddenColIds??[])w(A).hide=!0;(I||!n)&&(b.hide=null);const L=m("columnSizing",h);if(L)for(const{colId:A,flex:T,width:k}of h?.columnSizingModel??[]){const K=w(A);K.flex=T??null,K.width=k}(L||!n)&&(b.flex=null);const V=f?.orderedColIds,G=!!V?.length&&!i?.has("columnOrder"),_=G?V.map(A=>w(A)):Object.values(v);(_.length||p)&&(this.columnStates=_,oo(this.beans,{state:_,applyOrder:G,defaultState:b},t))}setColumnPivotState(e,t){const n=this.columnStates;this.columnStates=void 0;const i=this.columnGroupStates;this.columnGroupStates=void 0;const o=this.beans,{pivotResultCols:r,colGroupSvc:s}=o;if(r?.isPivotResultColsPresent()){if(n){const a=[];for(const l of n)r.getPivotResultCol(l.colId)&&a.push(l);oo(o,{state:a,applyOrder:e},t)}i&&s?.setColumnGroupState(i,t)}}getColumnGroupState(){const e=this.beans.colGroupSvc;if(!e)return;const t=e.getColumnGroupState();return DW(t)}setColumnGroupState(e,t,n){const i=this.beans.colGroupSvc;if(!i||n?.has("columnGroup")||t!=="api"&&!Object.prototype.hasOwnProperty.call(e,"columnGroup"))return;const o=new Set(e.columnGroup?.openColumnGroupIds),s=i.getColumnGroupState().map(({groupId:a})=>{const l=o.has(a);return l&&o.delete(a),{groupId:a,open:l}});for(const a of o)s.push({groupId:a,open:!0});s.length&&(this.columnGroupStates=s),i.setColumnGroupState(s,t)}getFilterState(){const{filterManager:e,selectableFilter:t}=this.beans;let n=e?.getFilterModel();n&&Object.keys(n).length===0&&(n=void 0);const i=e?.getFilterState(),o=e?.getAdvFilterModel()??void 0,r=t?.getState();return n||o||i||r?{filterModel:n,columnFilterState:i,advancedFilterModel:o,selectableFilters:r}:void 0}setFilterState(e){const{filterManager:t,selectableFilter:n}=this.beans,{filterModel:i,columnFilterState:o,advancedFilterModel:r,selectableFilters:s}=e??{filterModel:null,columnFilterState:null,advancedFilterModel:null};s!==void 0&&n?.setState(s??{}),(i!==void 0||o!==void 0)&&t?.setFilterState(i??null,o??null,"columnFilter"),r!==void 0&&t?.setAdvFilterModel(r??null,"advancedFilter")}getRangeSelectionState(){const e=this.beans.rangeSvc?.getCellRanges().map(t=>{const{id:n,type:i,startRow:o,endRow:r,columns:s,startColumn:a}=t;return{id:n,type:i,startRow:o,endRow:r,colIds:s.map(l=>l.getColId()),startColId:a.getColId()}});return e?.length?{cellRanges:e}:void 0}setCellSelectionState(e){const{gos:t,rangeSvc:n,colModel:i,visibleCols:o}=this.beans;if(!nr(t)||!n)return;const r=[];for(const s of e?.cellRanges??[]){const a=[];for(const u of s.colIds){const h=i.getCol(u);h&&a.push(h)}if(!a.length)continue;let l=i.getCol(s.startColId);if(!l){const u=o.allCols,h=new Set(a);l=u.find(f=>h.has(f))}r.push({...s,columns:a,startColumn:l})}n.setCellRanges(r)}getScrollState(){if(!this.isClientSideRowModel)return;const e=this.beans.ctrlsSvc.getScrollFeature(),{left:t}=e?.getHScrollPosition()??{left:0},{top:n}=e?.getVScrollPosition()??{top:0};return n||t?{top:n,left:t}:void 0}setScrollState(e){if(!this.isClientSideRowModel)return;const{top:t,left:n}=e??{top:0,left:0},{frameworkOverrides:i,rowRenderer:o,animationFrameSvc:r,ctrlsSvc:s}=this.beans;i.wrapIncoming(()=>{s.get("center").setCenterViewportScrollLeft(n),s.getScrollFeature()?.setVerticalScrollPosition(t),o.redraw({afterScroll:!0}),r?.flushAllFrames()})}getSideBarState(){return this.beans.sideBar?.comp?.getState()}getFocusedCellState(){if(!this.isClientSideRowModel)return;const e=this.beans.focusSvc.getFocusedCell();if(e){const{column:t,rowIndex:n,rowPinned:i}=e;return{colId:t.getColId(),rowIndex:n,rowPinned:i}}}setFocusedCellState(e){if(!this.isClientSideRowModel)return;const{focusSvc:t,colModel:n}=this.beans;if(!e){t.clearFocusedCell();return}const{colId:i,rowIndex:o,rowPinned:r}=e;t.setFocusedCell({column:n.getCol(i),rowIndex:o,rowPinned:r,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0})}getPaginationState(){const{pagination:e,gos:t}=this.beans;if(!e)return;const n=e.getCurrentPage(),i=t.get("paginationAutoPageSize")?void 0:e.getPageSize();if(!(!n&&!i))return{page:n,pageSize:i}}setPaginationState(e,t){const{pagination:n,gos:i}=this.beans;if(!n)return;const{pageSize:o,page:r}=e??{page:0,pageSize:i.get("paginationPageSize")},s=t==="gridInitializing";o&&!i.get("paginationAutoPageSize")&&n.setPageSize(o,s?"initialState":"pageSizeSelector"),typeof r=="number"&&(s?n.setPage(r):n.goToPage(r))}getRowSelectionState(){const e=this.beans.selectionSvc;if(!e)return;const t=e.getSelectionState();return!t||!Array.isArray(t)&&(t.selectAll===!1||t.selectAllChildren===!1)&&!t?.toggledNodes?.length?void 0:t}setRowSelectionState(e,t){this.beans.selectionSvc?.setSelectionState(e,t,t==="api")}updateGroupExpansionState(){const{expansionSvc:e,gos:t}=this.beans,n=e?.getExpansionState(),i=t.get("ssrmExpandAllAffectsAllRows");this.updateCachedState("ssrmRowGroupExpansion",i?n:void 0),this.updateCachedState("rowGroupExpansion",i?void 0:n)}getRowPinningState(){return this.beans.pinnedRowModel?.getPinnedState()}setRowPinningState(e){const t=this.beans.pinnedRowModel;e?t?.setPinnedState(e):t?.reset()}setRowGroupExpansionState(e,t,n){const i=e??t??{expandedRowGroupIds:[],collapsedRowGroupIds:[]};this.beans.expansionSvc?.setExpansionState(i,n)}updateColumnState(e){const t=this.getColumnState();let n=!1;const i=this.cachedState;for(const o of Object.keys(t)){const r=t[o];sc(r,i[o])||(n=!0)}this.cachedState={...i,...t},n&&this.dispatchStateUpdateEvent(e)}updateCachedState(e,t){const n=this.cachedState[e];this.setCachedStateValue(e,t),sc(t,n)||this.dispatchStateUpdateEvent([e])}setCachedStateValue(e,t){this.cachedState={...this.cachedState,[e]:t}}refreshStaleState(){const e=this.staleStateKeys;for(const t of e)t==="rowSelection"&&this.setCachedStateValue(t,this.getRowSelectionState());e.clear()}dispatchStateUpdateEvent(e){if(!this.suppressEvents){for(const t of e)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(){this.suppressEvents=!0,this.beans.colAnimation?.setSuppressAnimation(!0)}stopSuppressEvents(e){setTimeout(()=>{this.suppressEvents=!1,this.queuedUpdateSources.clear(),this.isAlive()&&(this.beans.colAnimation?.setSuppressAnimation(!1),this.dispatchStateUpdateEvent([e]))})}suppressEventsAndDispatchInitEvent(e){this.startSuppressEvents(),e(),this.stopSuppressEvents("gridInitializing")}},U9={moduleName:"GridState",version:ve,beans:[z9],apiFunctions:{getState:G9,setState:H9}};function $9(e){return e.rowModel.isLastRowIndexKnown()}function j9(e){return e.pagination?.getPageSize()??100}function K9(e){return e.pagination?.getCurrentPage()??0}function q9(e){return e.pagination?.getTotalPages()??1}function Q9(e){return e.pagination?e.pagination.getMasterRowCount():e.rowModel.getRowCount()}function Y9(e){e.pagination?.goToNextPage()}function Z9(e){e.pagination?.goToPreviousPage()}function X9(e){e.pagination?.goToFirstPage()}function J9(e){e.pagination?.goToLastPage()}function e8(e,t){e.pagination?.goToPage(t)}var t8=class extends X{constructor(){super(...arguments),this.beanName="paginationAutoPageSizeSvc"}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.centerRowsCtrl=e.center;const t=this.checkPageSize.bind(this);this.addManagedEventListeners({bodyHeightChanged:t,scrollVisibilityChanged:t}),this.addManagedPropertyListener("paginationAutoPageSize",this.onPaginationAutoSizeChanged.bind(this)),this.checkPageSize()})}notActive(){return!this.gos.get("paginationAutoPageSize")||this.centerRowsCtrl==null}onPaginationAutoSizeChanged(){this.notActive()?this.beans.pagination.unsetAutoCalculatedPageSize():this.checkPageSize()}checkPageSize(){if(this.notActive())return;const e=this.centerRowsCtrl.viewportSizeFeature.getBodyHeight();if(e>0){const t=this.beans,n=()=>{const i=Math.max(Ls(t),1),o=Math.floor(e/i);t.pagination.setPageSize(o,"autoCalculated")};this.isBodyRendered?hn(this,n,50)():(n(),this.isBodyRendered=!0)}else this.isBodyRendered=!1}};function n8(e,t){if(typeof e!="number")return"";const n=t(),i=n("thousandSeparator",","),o=n("decimalSeparator",".");return e.toString().replace(".",o).replace(/(\d)(?=(\d{3})+(?!\d))/g,`$1${i}`)}var Vc="paginationPageSizeSelector",i8={tag:"span",cls:"ag-paging-page-size"},o8=class extends yt{constructor(){super(i8),this.hasEmptyOption=!1,this.handlePageSizeItemSelected=()=>{if(!this.selectPageSizeComp)return;const e=this.selectPageSizeComp.getValue();if(!e)return;const t=Number(e);isNaN(t)||t<1||t===this.pagination.getPageSize()||(this.pagination.setPageSize(t,"pageSizeSelector"),this.hasEmptyOption&&this.toggleSelectDisplay(!0),this.selectPageSizeComp.getFocusableElement().focus())}}wireBeans(e){this.pagination=e.pagination}postConstruct(){this.addManagedPropertyListener(Vc,()=>{this.onPageSizeSelectorValuesChange()}),this.addManagedEventListeners({paginationChanged:e=>this.handlePaginationChanged(e)})}handlePaginationChanged(e){if(!this.selectPageSizeComp||!e?.newPageSize)return;const t=this.pagination.getPageSize();this.getPageSizeSelectorValues().includes(t)?this.selectPageSizeComp.setValue(t.toString()):this.hasEmptyOption?this.selectPageSizeComp.setValue(""):this.toggleSelectDisplay(!0)}toggleSelectDisplay(e){this.selectPageSizeComp&&!e&&this.reset(),e&&(this.reloadPageSizesSelector(),this.selectPageSizeComp)}reset(){bn(this.getGui()),this.selectPageSizeComp&&(this.selectPageSizeComp=this.destroyBean(this.selectPageSizeComp))}onPageSizeSelectorValuesChange(){this.selectPageSizeComp&&this.shouldShowPageSizeSelector()&&this.reloadPageSizesSelector()}shouldShowPageSizeSelector(){return this.gos.get("pagination")&&!this.gos.get("suppressPaginationPanel")&&!this.gos.get("paginationAutoPageSize")&&this.gos.get(Vc)!==!1}reloadPageSizesSelector(){const e=this.getPageSizeSelectorValues(),t=this.pagination.getPageSize(),n=!t||!e.includes(t);if(n){const o=this.gos.exists("paginationPageSize"),r=this.gos.get(Vc)!==!0;se(94,{pageSizeSet:o,pageSizesSet:r,pageSizeOptions:e,paginationPageSizeOption:t}),r||se(95,{paginationPageSizeOption:t,paginationPageSizeSelector:Vc}),e.unshift("")}const i=String(n?"":t);this.selectPageSizeComp?(Lr(this.pageSizeOptions,e)||(this.selectPageSizeComp.clearOptions().addOptions(this.createPageSizeSelectOptions(e)),this.pageSizeOptions=e),this.selectPageSizeComp.setValue(i,!0)):this.createPageSizeSelectorComp(e,i),this.hasEmptyOption=n}createPageSizeSelectOptions(e){return e.map(t=>({value:String(t)}))}createPageSizeSelectorComp(e,t){const n=this.getLocaleTextFunc(),i=n("pageSizeSelectorLabel","Page Size:"),o=n("ariaPageSizeSelectorLabel","Page Size");this.selectPageSizeComp=this.createManagedBean(new cv).addOptions(this.createPageSizeSelectOptions(e)).setValue(t).setAriaLabel(o).setLabel(i).onValueChange(()=>this.handlePageSizeItemSelected()),this.appendChild(this.selectPageSizeComp)}getPageSizeSelectorValues(){const e=[20,50,100],t=this.gos.get(Vc);return!Array.isArray(t)||!t?.length?e:[...t].sort((n,i)=>n-i)}destroy(){this.toggleSelectDisplay(!1),super.destroy()}},r8={selector:"AG-PAGE-SIZE-SELECTOR",component:o8},s8=".ag-paging-panel{align-items:center;border-top:var(--ag-footer-row-border);display:flex;flex-wrap:wrap-reverse;gap:calc(var(--ag-spacing)*4);justify-content:flex-end;min-height:var(--ag-pagination-panel-height);padding:calc(var(--ag-spacing)*.5) var(--ag-cell-horizontal-padding);row-gap:calc(var(--ag-spacing)*.5);@container (width < 600px){justify-content:center}}:where(.ag-paging-page-size) .ag-wrapper{min-width:50px}.ag-paging-page-summary-panel,.ag-paging-row-summary-panel{margin:calc(var(--ag-spacing)*.5)}.ag-paging-page-summary-panel{align-items:center;display:flex;gap:var(--ag-cell-widget-spacing);.ag-disabled &{pointer-events:none}}.ag-paging-button{cursor:pointer;position:relative;&.ag-disabled{cursor:default;opacity:.5}}.ag-paging-number,.ag-paging-row-summary-panel-number{font-weight:500}.ag-paging-description{line-height:0}",a8=class extends PR{constructor(){super(),this.btFirst=he,this.btPrevious=he,this.btNext=he,this.btLast=he,this.lbRecordCount=he,this.lbFirstRowOnPage=he,this.lbLastRowOnPage=he,this.lbCurrent=he,this.lbTotal=he,this.pageSizeComp=he,this.previousAndFirstButtonsDisabled=!1,this.nextButtonDisabled=!1,this.lastButtonDisabled=!1,this.areListenersSetup=!1,this.allowFocusInnerElement=!1,this.registerCSS(s8)}wireBeans(e){this.rowModel=e.rowModel,this.pagination=e.pagination,this.ariaAnnounce=e.ariaAnnounce}postConstruct(){const e=this.gos.get("enableRtl");this.setTemplate(this.getTemplate(),[r8]);const{btFirst:t,btPrevious:n,btNext:i,btLast:o}=this;this.activateTabIndex([t,n,i,o]),t.insertAdjacentElement("afterbegin",ii(e?"last":"first",this.beans)),n.insertAdjacentElement("afterbegin",ii(e?"next":"previous",this.beans)),i.insertAdjacentElement("afterbegin",ii(e?"previous":"next",this.beans)),o.insertAdjacentElement("afterbegin",ii(e?"first":"last",this.beans)),this.addManagedPropertyListener("pagination",this.onPaginationChanged.bind(this)),this.addManagedPropertyListener("suppressPaginationPanel",this.onPaginationChanged.bind(this)),this.addManagedPropertyListeners(["paginationPageSizeSelector","paginationAutoPageSize","suppressPaginationPanel"],()=>this.onPageSizeRelatedOptionsChange()),this.pageSizeComp.toggleSelectDisplay(this.pageSizeComp.shouldShowPageSizeSelector()),this.initialiseTabGuard({onTabKeyDown:()=>{},focusInnerElement:r=>this.allowFocusInnerElement?this.tabGuardFeature.getTabGuardCtrl().focusInnerElement(r):v2(this.beans,r),forceFocusOutWhenTabGuardsAreEmpty:!0}),this.onPaginationChanged()}setAllowFocus(e){this.allowFocusInnerElement=e}getFocusableContainerName(){return"pagination"}onPaginationChanged(){const t=this.gos.get("pagination")&&!this.gos.get("suppressPaginationPanel");this.setDisplayed(t),t&&(this.setupListeners(),this.enableOrDisableButtons(),this.updateLabels(),this.onPageSizeRelatedOptionsChange())}onPageSizeRelatedOptionsChange(){this.pageSizeComp.toggleSelectDisplay(this.pageSizeComp.shouldShowPageSizeSelector())}setupListeners(){if(!this.areListenersSetup){this.addManagedEventListeners({paginationChanged:this.onPaginationChanged.bind(this)});for(const e of[{el:this.btFirst,fn:this.onBtFirst.bind(this)},{el:this.btPrevious,fn:this.onBtPrevious.bind(this)},{el:this.btNext,fn:this.onBtNext.bind(this)},{el:this.btLast,fn:this.onBtLast.bind(this)}]){const{el:t,fn:n}=e;this.addManagedListeners(t,{click:n,keydown:i=>{(i.key===q.ENTER||i.key===q.SPACE)&&(i.preventDefault(),n())}})}m2(this.beans,this,this.getGui()),this.areListenersSetup=!0}}onBtFirst(){this.previousAndFirstButtonsDisabled||this.pagination.goToFirstPage()}formatNumber(e){const t=this.gos.getCallback("paginationNumberFormatter");return t?t({value:e}):n8(e,this.getLocaleTextFunc.bind(this))}getTemplate(){const e=this.getLocaleTextFunc(),t=`ag-${this.getCompId()}`;return{tag:"div",cls:"ag-paging-panel ag-unselectable",attrs:{id:`${t}`},children:[{tag:"ag-page-size-selector",ref:"pageSizeComp"},{tag:"span",cls:"ag-paging-row-summary-panel",children:[{tag:"span",ref:"lbFirstRowOnPage",cls:"ag-paging-row-summary-panel-number",attrs:{id:`${t}-first-row`}},{tag:"span",attrs:{id:`${t}-to`},children:e("to","to")},{tag:"span",ref:"lbLastRowOnPage",cls:"ag-paging-row-summary-panel-number",attrs:{id:`${t}-last-row`}},{tag:"span",attrs:{id:`${t}-of`},children:e("of","of")},{tag:"span",ref:"lbRecordCount",cls:"ag-paging-row-summary-panel-number",attrs:{id:`${t}-row-count`}}]},{tag:"span",cls:"ag-paging-page-summary-panel",role:"presentation",children:[{tag:"div",ref:"btFirst",cls:"ag-button ag-paging-button",role:"button",attrs:{"aria-label":e("firstPage","First Page")}},{tag:"div",ref:"btPrevious",cls:"ag-button ag-paging-button",role:"button",attrs:{"aria-label":e("previousPage","Previous Page")}},{tag:"span",cls:"ag-paging-description",children:[{tag:"span",attrs:{id:`${t}-start-page`},children:e("page","Page")},{tag:"span",ref:"lbCurrent",cls:"ag-paging-number",attrs:{id:`${t}-start-page-number`}},{tag:"span",attrs:{id:`${t}-of-page`},children:e("of","of")},{tag:"span",ref:"lbTotal",cls:"ag-paging-number",attrs:{id:`${t}-of-page-number`}}]},{tag:"div",ref:"btNext",cls:"ag-button ag-paging-button",role:"button",attrs:{"aria-label":e("nextPage","Next Page")}},{tag:"div",ref:"btLast",cls:"ag-button ag-paging-button",role:"button",attrs:{"aria-label":e("lastPage","Last Page")}}]}]}}onBtNext(){this.nextButtonDisabled||this.pagination.goToNextPage()}onBtPrevious(){this.previousAndFirstButtonsDisabled||this.pagination.goToPreviousPage()}onBtLast(){this.lastButtonDisabled||this.pagination.goToLastPage()}enableOrDisableButtons(){const e=this.pagination.getCurrentPage(),t=this.rowModel.isLastRowIndexKnown(),n=this.pagination.getTotalPages();this.previousAndFirstButtonsDisabled=e===0,this.toggleButtonDisabled(this.btFirst,this.previousAndFirstButtonsDisabled),this.toggleButtonDisabled(this.btPrevious,this.previousAndFirstButtonsDisabled);const i=this.isZeroPagesToDisplay(),o=e===n-1;this.nextButtonDisabled=o||i,this.lastButtonDisabled=!t||i||e===n-1,this.toggleButtonDisabled(this.btNext,this.nextButtonDisabled),this.toggleButtonDisabled(this.btLast,this.lastButtonDisabled)}toggleButtonDisabled(e,t){uL(e,t),e.classList.toggle("ag-disabled",t)}isZeroPagesToDisplay(){const e=this.rowModel.isLastRowIndexKnown(),t=this.pagination.getTotalPages();return e&&t===0}updateLabels(){const e=this.rowModel.isLastRowIndexKnown(),t=this.pagination.getTotalPages(),n=this.pagination.getMasterRowCount(),i=e?n:null,o=this.pagination.getCurrentPage(),r=this.pagination.getPageSize();let s,a;this.isZeroPagesToDisplay()?s=a=0:(s=r*o+1,a=s+r-1,e&&a>i&&(a=i));const l=s+r-1,u=!e&&n<l,h=this.formatNumber(s);this.lbFirstRowOnPage.textContent=h;let f;const p=this.getLocaleTextFunc();u?f=p("pageLastRowUnknown","?"):f=this.formatNumber(a),this.lbLastRowOnPage.textContent=f;const v=t>0?o+1:0,w=this.formatNumber(v);this.lbCurrent.textContent=w;let b,y;if(e)b=this.formatNumber(t),y=this.formatNumber(i);else{const R=p("more","more");b=R,y=R}this.lbTotal.textContent=b,this.lbRecordCount.textContent=y,this.announceAriaStatus(h,f,y,w,b)}announceAriaStatus(e,t,n,i,o){const r=this.getLocaleTextFunc(),s=r("page","Page"),a=r("to","to"),l=r("of","of"),u=`${e} ${a} ${t} ${l} ${n}`,h=`${s} ${i} ${l} ${o}`;u!==this.ariaRowStatus&&(this.ariaRowStatus=u,this.ariaAnnounce?.announceValue(u,"paginationRow")),h!==this.ariaPageStatus&&(this.ariaPageStatus=h,this.ariaAnnounce?.announceValue(h,"paginationPage"))}},l8={selector:"AG-PAGINATION",component:a8},c8=100,u8=class extends X{constructor(){super(...arguments),this.beanName="pagination",this.currentPage=0,this.topDisplayedRowIndex=0,this.bottomDisplayedRowIndex=0,this.masterRowCount=0}postConstruct(){const e=this.gos;this.active=e.get("pagination"),this.pageSizeFromGridOptions=e.get("paginationPageSize"),this.paginateChildRows=this.isPaginateChildRows(),this.addManagedPropertyListener("pagination",this.onPaginationGridOptionChanged.bind(this)),this.addManagedPropertyListener("paginationPageSize",this.onPageSizeGridOptionChanged.bind(this))}getPaginationSelector(){return l8}isPaginateChildRows(){const e=this.gos;return e.get("groupHideParentOfSingleChild")||e.get("groupRemoveSingleChildren")||e.get("groupRemoveLowestSingleChildren")?!0:e.get("paginateChildRows")}onPaginationGridOptionChanged(){this.active=this.gos.get("pagination"),this.calculatePages(),this.dispatchPaginationChangedEvent({keepRenderedRows:!0})}onPageSizeGridOptionChanged(){this.setPageSize(this.gos.get("paginationPageSize"),"gridOptions")}goToPage(e){const t=this.currentPage;if(!this.active||t===e||typeof t!="number")return;const{editSvc:n}=this.beans;n?.isEditing()&&(n.isBatchEditing()?n.cleanupEditors():n.stopEditing(void 0,{source:"api"})),this.currentPage=e,this.calculatePages(),this.dispatchPaginationChangedEvent({newPage:!0})}goToPageWithIndex(e){if(!this.active)return;let t=e;this.paginateChildRows||(t=this.beans.rowModel.getTopLevelIndexFromDisplayedIndex?.(e)??e),this.goToPage(Math.floor(t/this.pageSize))}isRowInPage(e){return this.active?e>=this.topDisplayedRowIndex&&e<=this.bottomDisplayedRowIndex:!0}getCurrentPage(){return this.currentPage}goToNextPage(){this.goToPage(this.currentPage+1)}goToPreviousPage(){this.goToPage(this.currentPage-1)}goToFirstPage(){this.goToPage(0)}goToLastPage(){const e=this.beans.rowModel.getRowCount(),t=Math.floor(e/this.pageSize);this.goToPage(t)}getPageSize(){return this.pageSize}getTotalPages(){return this.totalPages}setPage(e){this.currentPage=e}get pageSize(){return we(this.pageSizeAutoCalculated)&&this.gos.get("paginationAutoPageSize")?this.pageSizeAutoCalculated:we(this.pageSizeFromPageSizeSelector)?this.pageSizeFromPageSizeSelector:we(this.pageSizeFromInitialState)?this.pageSizeFromInitialState:we(this.pageSizeFromGridOptions)?this.pageSizeFromGridOptions:c8}calculatePages(){this.active?this.paginateChildRows?this.calculatePagesAllRows():this.calculatePagesMasterRowsOnly():this.calculatedPagesNotActive(),this.beans.pageBounds.calculateBounds(this.topDisplayedRowIndex,this.bottomDisplayedRowIndex)}unsetAutoCalculatedPageSize(){if(this.pageSizeAutoCalculated===void 0)return;const e=this.pageSizeAutoCalculated;this.pageSizeAutoCalculated=void 0,this.pageSize!==e&&(this.calculatePages(),this.dispatchPaginationChangedEvent({newPageSize:!0}))}setPageSize(e,t){const n=this.pageSize;switch(t){case"autoCalculated":this.pageSizeAutoCalculated=e;break;case"pageSizeSelector":this.pageSizeFromPageSizeSelector=e,this.currentPage!==0&&this.goToFirstPage();break;case"initialState":this.pageSizeFromInitialState=e;break;case"gridOptions":this.pageSizeFromGridOptions=e,this.pageSizeFromInitialState=void 0,this.pageSizeFromPageSizeSelector=void 0,this.currentPage!==0&&this.goToFirstPage();break}n!==this.pageSize&&(this.calculatePages(),this.dispatchPaginationChangedEvent({newPageSize:!0,keepRenderedRows:!0}))}setZeroRows(){this.masterRowCount=0,this.topDisplayedRowIndex=0,this.bottomDisplayedRowIndex=-1,this.currentPage=0,this.totalPages=0}adjustCurrentPageIfInvalid(){const e=this.totalPages;this.currentPage>=e&&(this.currentPage=e-1);const t=this.currentPage;(!isFinite(t)||isNaN(t)||t<0)&&(this.currentPage=0)}calculatePagesMasterRowsOnly(){const e=this.beans.rowModel,t=e.getTopLevelRowCount();if(this.masterRowCount=t,t<=0){this.setZeroRows();return}const n=this.pageSize,i=t-1;this.totalPages=Math.floor(i/n)+1,this.adjustCurrentPageIfInvalid();const o=this.currentPage,r=n*o;let s=n*(o+1)-1;if(s>i&&(s=i),this.topDisplayedRowIndex=e.getTopLevelRowDisplayedIndex(r),s===i)this.bottomDisplayedRowIndex=e.getRowCount()-1;else{const a=e.getTopLevelRowDisplayedIndex(s+1);this.bottomDisplayedRowIndex=a-1}}getMasterRowCount(){return this.masterRowCount}calculatePagesAllRows(){const e=this.beans.rowModel.getRowCount();if(this.masterRowCount=e,e===0){this.setZeroRows();return}const{pageSize:t,currentPage:n}=this,i=e-1;this.totalPages=Math.floor(i/t)+1,this.adjustCurrentPageIfInvalid(),this.topDisplayedRowIndex=t*n,this.bottomDisplayedRowIndex=t*(n+1)-1,this.bottomDisplayedRowIndex>i&&(this.bottomDisplayedRowIndex=i)}calculatedPagesNotActive(){this.setPageSize(void 0,"autoCalculated"),this.totalPages=1,this.currentPage=0,this.topDisplayedRowIndex=0,this.bottomDisplayedRowIndex=this.beans.rowModel.getRowCount()-1}dispatchPaginationChangedEvent(e){const{keepRenderedRows:t=!1,newPage:n=!1,newPageSize:i=!1}=e;this.eventSvc.dispatchEvent({type:"paginationChanged",animate:!1,newData:!1,newPage:n,newPageSize:i,keepRenderedRows:t})}},d8={moduleName:"Pagination",version:ve,beans:[u8,t8],icons:{first:"first",previous:"previous",next:"next",last:"last"},apiFunctions:{paginationIsLastPageFound:$9,paginationGetPageSize:j9,paginationGetCurrentPage:K9,paginationGetTotalPages:q9,paginationGetRowCount:Q9,paginationGoToNextPage:Y9,paginationGoToPreviousPage:Z9,paginationGoToFirstPage:X9,paginationGoToLastPage:J9,paginationGoToPage:e8},dependsOn:[Ph]},h8=".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 f8(e){return e.pinnedRowModel?.getPinnedTopRowCount()??0}function p8(e){return e.pinnedRowModel?.getPinnedBottomRowCount()??0}function g8(e,t){return e.pinnedRowModel?.getPinnedTopRow(t)}function m8(e,t){return e.pinnedRowModel?.getPinnedBottomRow(t)}function v8(e,t,n){return e.pinnedRowModel?.forEachPinnedRow(t,n)}var C8={moduleName:"PinnedRow",version:ve,beans:[t2],css:[h8],apiFunctions:{getPinnedTopRowCount:f8,getPinnedBottomRowCount:p8,getPinnedTopRow:g8,getPinnedBottomRow:m8,forEachPinnedRow:v8},icons:{rowPin:"pin",rowPinTop:"pinned-top",rowPinBottom:"pinned-bottom",rowUnpin:"un-pin"}},w8="↑",b8="↓",y8={tag:"span",children:[{tag:"span",ref:"eDelta",cls:"ag-value-change-delta"},{tag:"span",ref:"eValue",cls:"ag-value-change-value"}]},S8=class extends yt{constructor(){super(y8),this.eValue=he,this.eDelta=he,this.refreshCount=0}init(e){this.refresh(e,!0)}showDelta(e,t){const n=Math.abs(t),i=e.formatValue(n),o=we(i)?i:n,r=t>=0,s=this.eDelta;r?s.textContent=w8+o:s.textContent=b8+o,s.classList.toggle("ag-value-change-delta-up",r),s.classList.toggle("ag-value-change-delta-down",!r)}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"),bn(this.eDelta)}refresh(e,t=!1){const{value:n,valueFormatted:i}=e,{eValue:o,lastValue:r,beans:s}=this;if(n===r||(we(i)?o.textContent=i:we(n)?o.textContent=n:bn(o),s.filterManager?.isSuppressFlashingCellsBecauseFiltering()))return!1;const a=n&&typeof n=="object"&&"toNumber"in n?n.toNumber():n,l=r&&typeof r=="object"&&"toNumber"in r?r.toNumber():r;if(a===l)return!1;if(typeof a=="number"&&typeof l=="number"){const u=a-l;this.showDelta(e,u)}return r&&o.classList.add("ag-value-change-value-highlight"),t||this.setTimerToRemoveDelta(),this.lastValue=n,!0}},R8=".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}",F8={tag:"span",children:[{tag:"span",ref:"eCurrent",cls:"ag-value-slide-current"}]},x8=class extends yt{constructor(){super(F8),this.eCurrent=he,this.refreshCount=0,this.registerCSS(R8)}init(e){this.refresh(e,!0)}addSlideAnimation(){this.refreshCount++;const e=this.refreshCount;this.ePrevious?.remove();const{beans:t,eCurrent:n}=this,i=on({tag:"span",cls:"ag-value-slide-previous ag-value-slide-out"});this.ePrevious=i,i.textContent=n.textContent,this.getGui().insertBefore(i,n),t.frameworkOverrides.wrapIncoming(()=>{window.setTimeout(()=>{e===this.refreshCount&&this.ePrevious.classList.add("ag-value-slide-out-end")},50),window.setTimeout(()=>{e===this.refreshCount&&(this.ePrevious?.remove(),this.ePrevious=null)},3e3)})}refresh(e,t=!1){let n=e.value;if(Nt(n)&&(n=""),n===this.lastValue||this.beans.filterManager?.isSuppressFlashingCellsBecauseFiltering())return!1;t||this.addSlideAnimation(),this.lastValue=n;const i=this.eCurrent;return we(e.valueFormatted)?i.textContent=e.valueFormatted:we(e.value)?i.textContent=n:bn(i),!0}},P8=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,n=this.beans.gos.get("cellFlashDuration"),i=this.beans.gos.get("cellFadeDuration")){const o=this.animations[t];o.delete(e);const r=Date.now(),s=r+n,a=r+n+i,l={phase:"flash",flashEndTime:s,fadeEndTime:a};o.set(e,l);const u=`ag-cell-${t}`,h=`${u}-animation`,{comp:f,eGui:{style:p}}=e;f.toggleCss(u,!0),f.toggleCss(h,!1),p.removeProperty("transition"),p.removeProperty("transition-delay"),this.nextAnimationTime&&s+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),n)}),this.nextAnimationTime=s)}advanceAnimations(){const e=Date.now();let t=null;for(const n of Object.keys(this.animations)){const i=this.animations[n],o=`ag-cell-${n}`,r=`${o}-animation`;for(const[s,a]of i){if(!s.isAlive()||!s.comp){i.delete(s);continue}const{phase:l,flashEndTime:u,fadeEndTime:h}=a,f=l==="flash"?u:h;if(!(e+15>=f)){t=Math.min(f,t??1/0);continue}const{comp:m,eGui:{style:v}}=s;switch(l){case"flash":m.toggleCss(o,!1),m.toggleCss(r,!0),v.transition=`background-color ${h-u}ms`,v.transitionDelay=`${u-e}ms`,t=Math.min(h,t??1/0),a.phase="fade";break;case"fade":m.toggleCss(o,!1),m.toggleCss(r,!1),v.removeProperty("transition"),v.removeProperty("transition-delay"),i.delete(s);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 n=d2(e.cellPosition);t.cells[n]&&this.animateCell(e,"highlight")}flashCell(e,t){this.animateCell(e,"data-changed",t?.flashDuration,t?.fadeDuration)}destroy(){for(const e of Object.keys(this.animations))this.animations[e].clear()}};function E8(e,t={}){const{cellFlashSvc:n}=e;n&&e.frameworkOverrides.wrapIncoming(()=>{for(const i of e.rowRenderer.getCellCtrls(t.rowNodes,t.columns))n.flashCell(i,t)})}var D8={moduleName:"HighlightChanges",version:ve,beans:[P8],userComponents:{agAnimateShowChangeCellRenderer:S8,agAnimateSlideCellRenderer:x8},apiFunctions:{flashCells:E8}};function T8(e,t,n){if(!t)return;const i=e.ctrlsSvc.getGridBodyCtrl().eGridBody,o=`aria-${t}`;n===null?i.removeAttribute(o):i.setAttribute(o,n)}function A8(e,t={}){e.frameworkOverrides.wrapIncoming(()=>e.rowRenderer.refreshCells(t))}function I8(e){e.frameworkOverrides.wrapIncoming(()=>{for(const t of e.ctrlsSvc.getHeaderRowContainerCtrls())t.refresh()})}function M8(e){return e.animationFrameSvc?.isQueueEmpty()??!0}function k8(e){e.animationFrameSvc?.flushAllFrames()}function L8(e){return{rowHeight:Ls(e),headerHeight:Dc(e)}}function O8(e,t={}){const n=[];for(const r of e.rowRenderer.getCellCtrls(t.rowNodes,t.columns)){const s=r.getCellRenderer();s!=null&&n.push(Ks(s))}if(t.columns?.length)return n;const i=[],o=Xm(t.rowNodes);for(const r of e.rowRenderer.getAllRowCtrls()){if(o&&!Jm(r.rowNode,o)||!r.isFullWidth())continue;const s=r.getFullWidthCellRenderers();for(let a=0;a<s.length;a++){const l=s[a];l!=null&&i.push(Ks(l))}}return[...i,...n]}var _8={moduleName:"RenderApi",version:ve,apiFunctions:{setGridAriaProperty:T8,refreshCells:A8,refreshHeader:I8,isAnimationFrameQueueEmpty:M8,flushAllAnimationFrames:k8,getSizesForCurrentTheme:L8,getCellRendererInstances:O8}},N8=class extends X{constructor(){super(...arguments),this.beanName="rowAutoHeight",this.wasEverActive=!1,this._debouncedCalculateRowHeights=hn(this,this.calculateRowHeights.bind(this),1)}requestCheckAutoHeight(){this.wasEverActive&&this._debouncedCalculateRowHeights()}calculateRowHeights(){const{visibleCols:e,rowModel:t,rowSpanSvc:n,pinnedRowModel:i}=this.beans,o=e.autoHeightCols;let r=!1;const s=a=>{const l=a.__autoHeights;let u=Gr(this.beans,a).height;for(const h of o){let f=l?.[h.getColId()];const p=n?.getCellSpan(h,a);if(p){if(p.getLastNode()!==a)continue;if(f=n?.getCellSpan(h,a)?.getLastNodeAutoHeight(),!f)return}if(f==null){if(this.colSpanSkipCell(h,a))continue;return}u=Math.max(f,u)}u!==a.rowHeight&&(a.setRowHeight(u),r=!0)};i?.forEachPinnedRow?.("top",s),i?.forEachPinnedRow?.("bottom",s),t.forEachDisplayedNode?.(s),r&&t.onRowHeightChanged?.()}setRowAutoHeight(e,t,n){if(e.__autoHeights??(e.__autoHeights={}),t==null){delete e.__autoHeights[n.getId()];return}const i=e.__autoHeights[n.getId()];e.__autoHeights[n.getId()]=t,i!==t&&this.requestCheckAutoHeight()}colSpanSkipCell(e,t){const{colModel:n,colViewport:i,visibleCols:o}=this.beans;if(!n.colSpanActive)return!1;let r=[];switch(e.getPinned()){case"left":r=o.getLeftColsForRow(t);break;case"right":r=o.getRightColsForRow(t);break;case null:r=i.getColsWithinViewport(t);break}return!r.includes(e)}setupCellAutoHeight(e,t,n){if(!e.column.isAutoHeight()||!t)return!1;this.wasEverActive=!0;const i=t.parentElement,{rowNode:o,column:r}=e,s=this.beans,a=h=>{if(this.beans.editSvc?.isEditing(e)||!e.isAlive()||!n.isAlive())return;const{paddingTop:f,paddingBottom:p,borderBottomWidth:m,borderTopWidth:v}=Is(i),w=f+p+m+v,y=t.offsetHeight+w;if(h<5){const S=!nn(s)?.contains(t),P=y==0;if(S||P){window.setTimeout(()=>a(h+1),0);return}}this.setRowAutoHeight(o,y,r)},l=()=>a(0);l();const u=_r(s,t,l);return n.addDestroyFunc(()=>{u(),this.setRowAutoHeight(o,void 0,r)}),!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:n}of e)if((!t||this.beans.colModel.colSpanActive)&&(t=this.beans.colViewport.getColsWithinViewport(n).filter(o=>o.isAutoHeight())),t.length!==0){if(!n.__autoHeights)return!1;for(const i of t){const o=n.__autoHeights[i.getColId()];if(!o||n.rowHeight<o)return!1}}return!0}},B8={moduleName:"RowAutoHeight",version:ve,beans:[N8]},G8=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(){const e=this.firstNode.__autoHeights?.[this.col.getColId()];if(e==null)return;let t=0;for(const n of this.spannedNodes)n!==this.lastNode&&(t+=n.rowHeight);return e-t}},H8=class extends X{constructor(e){super(),this.column=e}buildCache(e){const{column:t,beans:{gos:n,pinnedRowModel:i,rowModel:o,valueSvc:r,pagination:s}}=this,{colDef:a}=t,l=this.getNodeMap(e),u=new Map,h=n.getCallback("isFullWidthRow"),f=a.equals,p=a.spanRows,m=typeof p=="function";let v=null,w=null,b;const y=(S,P)=>{v=S,w=null,b=P},R=S=>{const P=!S.isExpandable()&&!S.group&&!S.detail&&(h?!h({rowNode:S}):!0);if(S.rowIndex==null||!P){y(null,null);return}if(v==null||S.level!==v.level||S.footer||w&&S.rowIndex-1!==w?.getLastNode().rowIndex){y(S,r.getValue(t,S,"data"));return}const F=r.getValue(t,S,"data");if(m){const I=We(n,{valueA:b,nodeA:v,valueB:F,nodeB:S,column:t,colDef:a});if(!p(I)){y(S,F);return}}else if(f?!f(b,F):b!==F){y(S,F);return}if(!w){const I=l?.get(v);I?.firstNode===v?(I.reset(),w=I):w=new G8(t,v),u.set(v,w)}w.addSpannedNode(S),u.set(S,w)};switch(e){case"center":o.forEachDisplayedNode?.(S=>{(!s||s.isRowInPage(S.rowIndex))&&R(S)}),this.centerValueNodeMap=u;break;case"top":i?.forEachPinnedRow("top",R),this.topValueNodeMap=u;break;case"bottom":i?.forEachPinnedRow("bottom",R),this.bottomValueNodeMap=u;break}}isCellSpanning(e){return!!this.getCellSpan(e)}getCellSpan(e){return this.getNodeMap(e.rowPinned).get(e)}getNodeMap(e){switch(e){case"top":return this.topValueNodeMap;case"bottom":return this.bottomValueNodeMap;default:return this.centerValueNodeMap}}},V8=class extends X{constructor(){super(...arguments),this.beanName="rowSpanSvc",this.spanningColumns=new Map,this.debouncePinnedEvent=hn(this,this.dispatchCellsUpdatedEvent.bind(this,!0),0),this.debounceModelEvent=hn(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 n=this.createManagedBean(new H8(e));this.spanningColumns.set(e,n),n.buildCache("top"),n.buildCache("bottom"),n.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?.createCtrls("top"),t?.createCtrls("bottom")},0);return}this.modelTimeout==null&&(this.modelTimeout=window.setTimeout(()=>{this.modelTimeout=null,this.buildModelCaches(),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 n=this.spanningColumns.get(e);return n?n.isCellSpanning(t):!1}getCellSpanByPosition(e){const{pinnedRowModel:t,rowModel:n}=this.beans,i=e.column,o=e.rowIndex,r=this.spanningColumns.get(i);if(!r)return;let s;switch(e.rowPinned){case"top":s=t?.getPinnedTopRow(o);break;case"bottom":s=t?.getPinnedBottomRow(o);break;default:s=n.getRow(o)}if(s)return r.getCellSpan(s)}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 n=this.spanningColumns.get(e);if(n)return n.getCellSpan(t)}forEachSpannedColumn(e,t){for(const[n,i]of this.spanningColumns)if(i.isCellSpanning(e)){const o=i.getCellSpan(e);t(n,o)}}destroy(){super.destroy(),this.spanningColumns.clear()}},W8=class extends sl{constructor(e,t,n){super(e.col,e.firstNode,n,t),this.cellSpan=e,this.SPANNED_CELL_CSS_CLASS="ag-spanned-cell"}setComp(e,t,n,i,o,r,s){this.eWrapper=n,super.setComp(e,t,n,i,o,r,s),this.setAriaRowSpan()}isCellSpanning(){return!0}getCellSpan(){return this.cellSpan}refreshAriaRowIndex(){const{eGui:e,rowNode:t}=this;!e||t.rowIndex==null||cc(e,t.rowIndex)}setAriaRowSpan(){gL(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(Ec(t)){this.focusedCellPosition=void 0;return}const n=this.isCellFocused();n||(this.focusedCellPosition=void 0),e&&n&&(this.focusedCellPosition={rowIndex:e.rowIndex,rowPinned:e.rowPinned,column:e.column}),super.onCellFocused(e)}getRootElement(){return this.eWrapper}},z8=class extends bh{getInitialRowClasses(e){return["ag-spanned-row"]}getNewCellCtrl(e){const t=this.beans.rowSpanSvc?.getCellSpan(e,this.rowNode);if(!(!t||t.firstNode!==this.rowNode))return new W8(t,this,this.beans)}isCorrectCtrlForSpan(e){const t=this.beans.rowSpanSvc?.getCellSpan(e.column,this.rowNode);return!t||t.firstNode!==this.rowNode?!1:e.getCellSpan()===t}onRowHeightChanged(){}refreshFirstAndLastRowStyles(){}addHoverFunctionality(){}resetHoveredStatus(){}},U8=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,n=this.getCtrlsMap(e),i=n.size,o=this.getAllRelevantRowControls(e),r=new Map;let s=!1;for(const l of o)l.isAlive()&&t?.forEachSpannedColumn(l.rowNode,(u,h)=>{if(r.has(h.firstNode))return;const f=n.get(h.firstNode);if(f){r.set(h.firstNode,f),n.delete(h.firstNode);return}s=!0;const p=new z8(h.firstNode,this.beans,!1,!1,!1);r.set(h.firstNode,p)});this.setCtrlsMap(e,r);const a=r.size===i;if(!(!s&&a)){for(const l of n.values())l.destroyFirstPass(!0),l.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,n=t?.getCellSpanByPosition(e);if(!n)return;const i=this.getCtrlsMap(e.rowPinned).get(n.firstNode);if(i)return i.getAllCellCtrls().find(o=>o.column===e.column)}getCtrls(e){return[...this.getCtrlsMap(e).values()]}destroyRowCtrls(e){for(const t of this.getCtrlsMap(e).values())t.destroyFirstPass(!0),t.destroySecondPass();this.setCtrlsMap(e,new Map)}getCtrlsMap(e){switch(e){case"top":return this.topCtrls;case"bottom":return this.bottomCtrls;default:return this.centerCtrls}}setCtrlsMap(e,t){switch(e){case"top":this.topCtrls=t;break;case"bottom":this.bottomCtrls=t;break;default:this.centerCtrls=t;break}}destroy(){super.destroy(),this.destroyRowCtrls("top"),this.destroyRowCtrls("bottom"),this.destroyRowCtrls("center")}},$8={moduleName:"CellSpan",version:ve,beans:[V8,U8]},j8=class extends X{constructor(){super(...arguments),this.beanName="selectionColSvc"}postConstruct(){this.addManagedPropertyListener("rowSelection",e=>{this.onSelectionOptionsChanged(e.currentValue,e.previousValue,qa(e.source))}),this.addManagedPropertyListener("selectionColumnDef",this.updateColumns.bind(this))}addColumns(e){const t=this.columns;t!=null&&(e.list=t.list.concat(e.list),e.tree=t.tree.concat(e.tree),$O(e))}createColumns(e,t){const n=()=>{$d(this.beans,this.columns?.tree),this.columns=null},i=e.treeDepth,r=(this.columns?.treeDepth??-1)==i,s=this.generateSelectionCols();if(UO(s,this.columns?.list??[])&&r)return;n();const{colGroupSvc:l}=this.beans,u=l?.findDepth(e.tree)??0,h=l?.balanceTreeForAutoCols(s,u)??[];this.columns={list:s,tree:h,treeDepth:u,map:{}},t(p=>{if(!p)return null;const m=p.filter(v=>!Wr(v));return[...s,...m]})}updateColumns(e){const t=qa(e.source),{beans:n}=this;for(const i of this.columns?.list??[]){const o=this.createSelectionColDef(e.currentValue);i.setColDef(o,null,t),oo(n,{state:[KO(o,i.colId)]},t)}}getColumn(e){return this.columns?.list.find(t=>Sc(t,e))??null}getColumns(){return this.columns?.list??null}isSelectionColumnEnabled(){const{gos:e,beans:t}=this,n=e.get("rowSelection");if(typeof n!="object"||!ks(e))return!1;const i=(t.autoColSvc?.getColumns()?.length??0)>0;if(n.checkboxLocation==="autoGroupColumn"&&i)return!1;const o=!!$a(n),r=Nd(n);return o||r}createSelectionColDef(e){const{gos:t}=this,n=e??t.get("selectionColumnDef"),i=t.get("enableRtl"),{rowSpan:o,spanRows:r,...s}=n??{};return{width:50,resizable:!1,suppressHeaderMenuButton:!0,sortable:!1,suppressMovable:!0,lockPosition:i?"right":"left",comparator(a,l,u,h){const f=u.isSelected(),p=h.isSelected();return f===p?0:f?1:-1},editable:!1,suppressFillHandle:!0,suppressAutoSize:!0,pinned:null,...s,colId:b0,chartDataType:"excluded"}}generateSelectionCols(){if(!this.isSelectionColumnEnabled())return[];const e=this.createSelectionColDef(),t=e.colId;this.gos.validateColDef(e,t,!0);const n=new _s(e,null,t,!1);return this.createBean(n),[n]}onSelectionOptionsChanged(e,t,n){const i=t&&typeof t!="string"?$a(t):void 0,o=e&&typeof e!="string"?$a(e):void 0,r=i!==o,s=t&&typeof t!="string"?Nd(t):void 0,a=e&&typeof e!="string"?Nd(e):void 0,l=s!==a,u=Bd(e),h=Bd(t);(r||l||u!==h)&&this.beans.colModel.refreshAll(n)}destroy(){$d(this.beans,this.columns?.tree),super.destroy()}refreshVisibility(e,t,n){if(!this.columns?.list.length)return;const i=e.length+t.length+n.length;if(i===0)return;const o=this.columns.list[0];if(!o.isVisible())return;const r=()=>{let l;switch(o.pinned){case"left":case!0:l=e;break;case"right":l=n;break;default:l=t}l&&Ro(l,o)};(this.beans.rowNumbersSvc?.getColumn(y0)?2:1)===i&&r()}},K8=':where(.ag-selection-checkbox) .ag-checkbox-input-wrapper:before{content:"";cursor:pointer;inset:-8px;position:absolute}';function q8(e,t){if(!t.nodes.every(s=>s.rowPinned&&!wh(s)?(se(59),!1):s.id===void 0?(se(60),!1):!0))return;const{nodes:i,source:o,newValue:r}=t;e.selectionSvc?.setNodesSelected({nodes:i,source:o??"api",newValue:r})}function Q8(e,t,n="apiSelectAll"){e.selectionSvc?.selectAllRowNodes({source:n,selectAll:t})}function Y8(e,t,n="apiSelectAll"){e.selectionSvc?.deselectAllRowNodes({source:n,selectAll:t})}function Z8(e,t="apiSelectAllFiltered"){e.selectionSvc?.selectAllRowNodes({source:t,selectAll:"filtered"})}function X8(e,t="apiSelectAllFiltered"){e.selectionSvc?.deselectAllRowNodes({source:t,selectAll:"filtered"})}function J8(e,t="apiSelectAllCurrentPage"){e.selectionSvc?.selectAllRowNodes({source:t,selectAll:"currentPage"})}function eU(e,t="apiSelectAllCurrentPage"){e.selectionSvc?.deselectAllRowNodes({source:t,selectAll:"currentPage"})}function tU(e){return e.selectionSvc?.getSelectedNodes()??[]}function nU(e){return e.selectionSvc?.getSelectedRows()??[]}var iU={tag:"div",cls:"ag-selection-checkbox",role:"presentation",children:[{tag:"ag-checkbox",ref:"eCheckbox",role:"presentation"}]},oU=class extends yt{constructor(){super(iU,[Am]),this.eCheckbox=he}postConstruct(){this.eCheckbox.setPassive(!0)}onDataChanged(){this.onSelectionChanged()}onSelectableChanged(){this.showOrHideSelect()}onSelectionChanged(){const e=this.getLocaleTextFunc(),{rowNode:t,eCheckbox:n}=this,i=t.isSelected(),o=xd(e,i),[r,s]=t.selectable?["ariaRowToggleSelection","Press Space to toggle row selection"]:["ariaRowSelectionDisabled","Row Selection is disabled for this row"],a=e(r,s);n.setValue(i,!0),n.setInputAriaLabel(`${a} (${o})`)}init(e){if(this.rowNode=e.rowNode,this.column=e.column,this.overrides=e.overrides,this.onSelectionChanged(),this.addManagedListeners(this.eCheckbox.getWrapperElement(),{dblclick:Vs,click:i=>{Vs(i),!this.eCheckbox.isDisabled()&&this.beans.selectionSvc?.handleSelectionEvent(i,this.rowNode,"checkboxSelected")}}),this.addManagedListeners(this.rowNode,{rowSelected:this.onSelectionChanged.bind(this),dataChanged:this.onDataChanged.bind(this),selectableChanged:this.onSelectableChanged.bind(this)}),this.addManagedPropertyListener("rowSelection",({currentValue:i,previousValue:o})=>{const r=typeof i=="object"?Ig(i):void 0,s=typeof o=="object"?Ig(o):void 0;r!==s&&this.onSelectableChanged()}),Mg(this.gos)||typeof this.getIsVisible()=="function"){const i=this.showOrHideSelect.bind(this);this.addManagedEventListeners({displayedColumnsChanged:i}),this.addManagedListeners(this.rowNode,{dataChanged:i,cellChanged:i}),this.showOrHideSelect()}this.eCheckbox.getInputElement().setAttribute("tabindex","-1")}showOrHideSelect(){const{column:e,rowNode:t,overrides:n,gos:i}=this,o=t.selectable,r=this.getIsVisible();let s;if(typeof r=="function"){const f=n?.callbackParams;if(!e)s=r({...f,node:t,data:t.data});else{const p=e.createColumnFunctionCallbackParams(t);s=r({...f,...p})}}else s=r??!1;const a=o&&!s||!o&&s,l=o||s,u=i.get("rowSelection"),h=u&&typeof u!="string"?!Ig(u):!!e?.getColDef().showDisabledCheckboxes;this.setVisible(l&&(a?h:!0)),this.setDisplayed(l&&(a?h:!0)),l&&this.eCheckbox.setDisabled(a),n?.removeHidden&&this.setDisplayed(l)}getIsVisible(){const e=this.overrides;if(e)return e.isVisible;const t=this.gos.get("rowSelection");return t&&typeof t!="string"?$a(t):this.column?.getColDef()?.checkboxSelection}},rU=class{constructor(e,t){this.rowModel=e,this.pinnedRowModel=t,this.selectAll=!1,this.rootId=null,this.endId=null,this.cachedRange=[]}reset(){this.rootId=null,this.endId=null,this.cachedRange.length=0}setRoot(e){this.rootId=e.id,this.endId=null,this.cachedRange.length=0}setEndRange(e){this.endId=e.id,this.cachedRange.length=0}getRange(){if(this.cachedRange.length===0){const e=this.getRoot(),t=this.getEnd();if(e==null||t==null)return this.cachedRange;this.cachedRange=this.getNodesInRange(e,t)??[]}return this.cachedRange}isInRange(e){return this.rootId===null?!1:this.getRange().some(t=>t.id===e.id)}getRoot(e){if(this.rootId)return this.getRowNode(this.rootId);if(e)return this.setRoot(e),e}getEnd(){if(this.endId)return this.getRowNode(this.endId)}getRowNode(e){let t;const{rowModel:n,pinnedRowModel:i}=this;return t??(t=n.getRowNode(e)),i?.isManual()&&(t??(t=i.getPinnedRowById(e,"top")),t??(t=i.getPinnedRowById(e,"bottom"))),t}truncate(e){const t=this.getRange();if(t.length===0)return{keep:[],discard:[]};const n=t[0].id===this.rootId,i=t.findIndex(o=>o.id===e.id);if(i>-1){const o=t.slice(0,i),r=t.slice(i+1);return this.setEndRange(e),n?{keep:o,discard:r}:{keep:r,discard:o}}else return{keep:t,discard:[]}}extend(e,t=!1){const n=this.getRoot();if(n==null){const o=this.getRange().slice();return t&&e.depthFirstSearch(r=>!r.group&&o.push(r)),o.push(e),this.setRoot(e),{keep:o,discard:[]}}const i=this.getNodesInRange(n,e);if(!i)return this.setRoot(e),{keep:[e],discard:[]};if(i.find(o=>o.id===this.endId))return this.setEndRange(e),{keep:this.getRange(),discard:[]};{const o=this.getRange().slice();return this.setEndRange(e),{keep:this.getRange(),discard:o}}}getNodesInRange(e,t){const{pinnedRowModel:n,rowModel:i}=this;if(!n?.isManual())return i.getNodesInRangeForSelection(e,t);if(e.rowPinned==="top"&&!t.rowPinned)return Bi(n,"top",e,void 0).concat(i.getNodesInRangeForSelection(i.getRow(0),t)??[]);if(e.rowPinned==="bottom"&&!t.rowPinned){const o=Bi(n,"bottom",void 0,e),r=i.getRowCount(),s=i.getRow(r-1);return(i.getNodesInRangeForSelection(t,s)??[]).concat(o)}if(!e.rowPinned&&!t.rowPinned)return i.getNodesInRangeForSelection(e,t);if(e.rowPinned==="top"&&t.rowPinned==="top")return Bi(n,"top",e,t);if(e.rowPinned==="bottom"&&t.rowPinned==="top"){const o=Bi(n,"top",t,void 0),r=Bi(n,"bottom",void 0,e),s=i.getRow(0),a=i.getRow(i.getRowCount()-1);return o.concat(i.getNodesInRangeForSelection(s,a)??[]).concat(r)}if(!e.rowPinned&&t.rowPinned==="top")return Bi(n,"top",t,void 0).concat(i.getNodesInRangeForSelection(i.getRow(0),e)??[]);if(e.rowPinned==="top"&&t.rowPinned==="bottom"){const o=Bi(n,"top",e,void 0),r=Bi(n,"bottom",void 0,t),s=i.getRow(0),a=i.getRow(i.getRowCount()-1);return o.concat(i.getNodesInRangeForSelection(s,a)??[]).concat(r)}if(e.rowPinned==="bottom"&&t.rowPinned==="bottom")return Bi(n,"bottom",e,t);if(!e.rowPinned&&t.rowPinned==="bottom"){const o=Bi(n,"bottom",void 0,t),r=i.getRow(i.getRowCount());return(i.getNodesInRangeForSelection(e,r)??[]).concat(o)}return null}},sU=class extends X{constructor(e){super(),this.column=e,this.cbSelectAllVisible=!1,this.processingEventFromCheckbox=!1}onSpaceKeyDown(e){const t=this.cbSelectAll;t.isDisplayed()&&!t.getGui().contains(It(this.beans))&&(e.preventDefault(),t.setValue(!t.getValue()))}getCheckboxGui(){return this.cbSelectAll.getGui()}setComp(e){this.headerCellCtrl=e;const t=this.createManagedBean(new Tm);this.cbSelectAll=t,t.addCss("ag-header-select-all"),Or(t.getGui(),"presentation"),this.showOrHideSelectAll();const n=this.updateStateOfCheckbox.bind(this);this.addManagedEventListeners({newColumnsLoaded:()=>this.showOrHideSelectAll(),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this),selectionChanged:n,paginationChanged:n,modelUpdated:n}),this.addManagedPropertyListener("rowSelection",({currentValue:i,previousValue:o})=>{const r=s=>typeof s=="string"||!s||s.mode==="singleRow"?void 0:s.selectAll;r(i)!==r(o)&&this.showOrHideSelectAll(),this.updateStateOfCheckbox()}),this.addManagedListeners(t,{fieldValueChanged:this.onCbSelectAll.bind(this)}),t.getInputElement().setAttribute("tabindex","-1"),this.refreshSelectAllLabel()}onDisplayedColumnsChanged(e){this.isAlive()&&this.showOrHideSelectAll(e.source==="uiColumnMoved")}showOrHideSelectAll(e=!1){const t=this.isCheckboxSelection();this.cbSelectAllVisible=t,this.cbSelectAll.setDisplayed(t),t&&(this.checkRightRowModelType("selectAllCheckbox"),this.checkSelectionType("selectAllCheckbox"),this.updateStateOfCheckbox()),this.refreshSelectAllLabel(e)}updateStateOfCheckbox(){if(!this.cbSelectAllVisible||this.processingEventFromCheckbox)return;this.processingEventFromCheckbox=!0;const e=this.getSelectAllMode(),t=this.beans.selectionSvc,n=this.cbSelectAll,i=t.getSelectAllState(e);n.setValue(i);const o=t.hasNodesToSelect(e);n.setDisabled(!o),this.refreshSelectAllLabel(),this.processingEventFromCheckbox=!1}refreshSelectAllLabel(e=!1){const t=this.getLocaleTextFunc(),{headerCellCtrl:n,cbSelectAll:i,cbSelectAllVisible:o}=this,r=i.getValue(),s=xd(t,r),a=t("ariaRowSelectAll","Press Space to toggle all rows selection");n.setAriaDescriptionProperty("selectAll",o?`${a} (${s})`:null),i.setInputAriaLabel(t("ariaHeaderSelection","Column with Header Selection")),e||n.announceAriaDescription()}checkSelectionType(e){return bc(this.gos)?!0:(se(128,{feature:e}),!1)}checkRightRowModelType(e){const{gos:t,rowModel:n}=this.beans;return Yt(t)||wc(t)?!0:(se(129,{feature:e,rowModel:n.getType()}),!1)}onCbSelectAll(){if(this.processingEventFromCheckbox||!this.cbSelectAllVisible)return;const e=this.cbSelectAll.getValue(),t=this.getSelectAllMode();let n="uiSelectAll";t==="currentPage"?n="uiSelectAllCurrentPage":t==="filtered"&&(n="uiSelectAllFiltered");const i={source:n,selectAll:t},o=this.beans.selectionSvc;e?o.selectAllRowNodes(i):o.deselectAllRowNodes(i)}isCheckboxSelection(){const{column:e,gos:t,beans:n}=this,r=typeof t.get("rowSelection")=="object"?"headerCheckbox":"headerCheckboxSelection";return l1(n,e)&&this.checkRightRowModelType(r)&&this.checkSelectionType(r)}getSelectAllMode(){const e=p0(this.gos,!1);if(e)return e;const{headerCheckboxSelectionCurrentPageOnly:t,headerCheckboxSelectionFilteredOnly:n}=this.column.getColDef();return t?"currentPage":n?"filtered":"all"}destroy(){super.destroy(),this.cbSelectAll=void 0,this.headerCellCtrl=void 0}};function l1({gos:e,selectionColSvc:t},n){const i=e.get("rowSelection"),o=n.getColDef(),{headerCheckboxSelection:r}=o;let s=!1;if(typeof i=="object"){const l=Wr(n),u=Og(n);(Bd(i)==="autoGroupColumn"&&u||l&&t?.isSelectionColumnEnabled())&&(s=Nd(i))}else typeof r=="function"?s=r(We(e,{column:n,colDef:o})):s=!!r;return s}var aU=class extends X{postConstruct(){const{gos:e,beans:t}=this;this.selectionCtx=new rU(t.rowModel,t.pinnedRowModel),this.addManagedPropertyListeners(["isRowSelectable","rowSelection"],()=>{const n=Mg(e);n!==this.isRowSelectable&&(this.isRowSelectable=n,this.updateSelectable())}),this.isRowSelectable=Mg(e),this.addManagedEventListeners({cellValueChanged:n=>this.updateRowSelectable(n.node),rowNodeDataChanged:n=>this.updateRowSelectable(n.node)})}destroy(){super.destroy(),this.selectionCtx.reset()}createCheckboxSelectionComponent(){return new oU}createSelectAllFeature(e){if(l1(this.beans,e))return new sU(e)}isMultiSelect(){return bc(this.gos)}onRowCtrlSelected(e,t,n){const i=!!e.rowNode.isSelected();e.forEachGui(n,o=>{o.rowComp.toggleCss("ag-row-selected",i);const r=o.element;MS(r,i),r.contains(It(this.beans))&&t(o)})}announceAriaRowSelection(e){if(this.isRowSelectionBlocked(e))return;const t=e.isSelected(),n=this.beans.editSvc?.isEditing({rowNode:e});if(!e.selectable||n)return;const o=this.getLocaleTextFunc()(t?"ariaRowDeselect":"ariaRowSelect",`Press SPACE to ${t?"deselect":"select"} this row`);this.beans.ariaAnnounce?.announceValue(o,"rowSelection")}isRowSelectionBlocked(e){return!e.selectable||e.rowPinned&&!wh(e)||!ks(this.gos)}updateRowSelectable(e,t){const n=e.rowPinned&&e.pinnedSibling?e.pinnedSibling.selectable:this.isRowSelectable?.(e)??!0;return this.setRowSelectable(e,n,t),n}setRowSelectable(e,t,n){if(e.selectable!==t){if(e.selectable=t,e.dispatchRowEvent("selectableChanged"),n)return;if(yc(this.gos)){const o=this.calculateSelectedFromChildren(e);this.setNodesSelected({nodes:[e],newValue:o??!1,source:"selectableChanged"});return}e.isSelected()&&!e.selectable&&this.setNodesSelected({nodes:[e],newValue:!1,source:"selectableChanged"})}}calculateSelectedFromChildren(e){let t=!1,n=!1;if(!e.childrenAfterGroup?.length)return e.selectable?e.__selected:null;for(let i=0;i<e.childrenAfterGroup.length;i++){const o=e.childrenAfterGroup[i];let r=o.isSelected();if(!o.selectable){const s=this.calculateSelectedFromChildren(o);if(s===null)continue;r=s}switch(r){case!0:t=!0;break;case!1:n=!0;break;default:return}}if(!(t&&n))return t?!0:n?!1:e.selectable?e.__selected:null}selectRowNode(e,t,n,i="api"){if(t&&e.destroyed)return!1;const o=!e.selectable&&t,r=e.__selected===t;if(o||r)return!1;e.__selected=t,e.dispatchRowEvent("rowSelected");const s=e.sibling;s&&s.footer&&s.__localEventService&&s.dispatchRowEvent("rowSelected");const a=e.pinnedSibling;return a?.rowPinned&&a.__localEventService&&a.dispatchRowEvent("rowSelected"),this.eventSvc.dispatchEvent({...j_(e,this.gos,"rowSelected"),event:n||null,source:i}),!0}isCellCheckboxSelection(e,t){const n=this.gos.get("rowSelection");if(n&&typeof n!="string"){const i=Wr(e)&&$a(n);return e.isColumnFunc(t,i)}else return e.isColumnFunc(t,e.colDef.checkboxSelection)}inferNodeSelections(e,t,n,i){const{gos:o,selectionCtx:r}=this,s=e.isSelected(),a=yc(o),l=vO(o),u=CO(o),h=this.isMultiSelect(),f=i==="rowClicked";if(f&&!(l||u))return null;if(t&&n&&h){const p=r.getRoot();if(p)if(p.isSelected()){const m=r.isInRange(e)?r.truncate(e):r.extend(e,a);return{deselect:m.discard,select:m.keep,reset:!1}}else{const m=r.extend(e,a);return{select:[],deselect:m.keep,reset:!1}}else return null}else if(t&&h){const p=r.selectAll?this.beans.rowModel.getRow(0):void 0,m=r.getRoot(p),v=r.isInRange(e)?r.truncate(e):r.extend(e,a);return{select:v.keep,deselect:v.discard,reset:r.selectAll||!!(m&&!m.isSelected())}}else if(n){if(f){const p=!s;return p&&!l||!p&&!u?null:(r.setRoot(e),{node:e,newValue:p,clearSelection:!1})}return r.setRoot(e),{node:e,newValue:!s,clearSelection:!h}}else{r.setRoot(e);const p=wO(o),m=Hd(o)==="filteredDescendants",v=f&&(!p||!l);if(m&&s===void 0&&Yt(o))return{node:e,newValue:!1,checkFilteredNodes:!0,clearSelection:!h||v};if(f){const w=s?!p:l;return w===s&&!v||w&&!l||!w&&!u?null:{node:e,newValue:w,clearSelection:!h||v,keepDescendants:e.group&&a}}return{node:e,newValue:!s,clearSelection:!h||v}}}},lU=class extends aU{constructor(){super(...arguments),this.beanName="selectionSvc",this.selectedNodes=new Map,this.detailSelection=new Map,this.masterSelectsDetail=!1}postConstruct(){super.postConstruct();const{gos:e}=this;this.mode=Gd(e),this.groupSelectsDescendants=yc(e),this.groupSelectsFiltered=Hd(e)==="filteredDescendants",this.masterSelectsDetail=g0(e)==="detail",this.addManagedPropertyListeners(["groupSelectsChildren","groupSelectsFiltered","rowSelection"],()=>{const t=yc(e),n=Gd(e),i=Hd(e)==="filteredDescendants";this.masterSelectsDetail=g0(e)==="detail",(t!==this.groupSelectsDescendants||i!==this.groupSelectsFiltered||n!==this.mode)&&(this.deselectAllRowNodes({source:"api"}),this.groupSelectsDescendants=t,this.groupSelectsFiltered=i,this.mode=n)}),this.addManagedEventListeners({rowSelected:this.onRowSelected.bind(this)})}destroy(){super.destroy(),this.resetNodes()}handleSelectionEvent(e,t,n){if(this.isRowSelectionBlocked(t))return 0;const i=this.inferNodeSelections(t,e.shiftKey,e.metaKey||e.ctrlKey,n);if(i==null)return 0;if(this.selectionCtx.selectAll=!1,"select"in i)return i.reset?this.resetNodes():this.selectRange(i.deselect,!1,n),this.selectRange(i.select,!0,n);{const o=i.checkFilteredNodes?u1(i.node):i.newValue;return this.setNodesSelected({nodes:[i.node],newValue:o,clearSelection:i.clearSelection,keepDescendants:i.keepDescendants,event:e,source:n})}}setNodesSelected({newValue:e,clearSelection:t,suppressFinishActions:n,nodes:i,event:o,source:r,keepDescendants:s=!1}){if(i.length===0)return 0;const{gos:a}=this;if(!ks(a)&&e)return se(132),0;if(i.length>1&&!this.isMultiSelect())return se(130),0;let l=0;for(let u=0;u<i.length;u++){const h=i[u],f=h.primaryRow;if(f.rowPinned&&!wh(f)){se(59);continue}if(f.id===void 0){se(60);continue}if(e&&h.destroyed)continue;this.groupSelectsFiltered&&f.group&&!a.get("treeData")||this.selectRowNode(f,e,o,r)&&(this.detailSelection.delete(f.id),l++),this.groupSelectsDescendants&&f.childrenAfterGroup?.length&&(l+=this.selectChildren(f,e,r))}return n||(i.length===1&&r==="api"&&this.selectionCtx.setRoot(i[0].primaryRow),e&&(t||!this.isMultiSelect())&&(l+=this.clearOtherNodes(i[0].primaryRow,s,r)),l>0&&(this.updateGroupsFromChildrenSelections(r),this.dispatchSelectionChanged(r))),l}selectRange(e,t,n){let i=0;return e.forEach(o=>{const r=o.primaryRow;if(r.group&&this.groupSelectsDescendants)return;this.selectRowNode(r,t,void 0,n)&&i++}),i>0&&(this.updateGroupsFromChildrenSelections(n),this.dispatchSelectionChanged(n)),i}selectChildren(e,t,n){const i=this.groupSelectsFiltered?e.childrenAfterAggFilter:e.childrenAfterGroup;return i?this.setNodesSelected({newValue:t,clearSelection:!1,suppressFinishActions:!0,source:n,nodes:i}):0}getSelectedNodes(){return Array.from(this.selectedNodes.values())}getSelectedRows(){const e=[];return this.selectedNodes.forEach(t=>t.data&&e.push(t.data)),e}getSelectionCount(){return this.selectedNodes.size}filterFromSelection(e){const t=new Map;this.selectedNodes.forEach((n,i)=>{e(n)&&t.set(i,n)}),this.selectedNodes=t}updateGroupsFromChildrenSelections(e,t){if(!this.groupSelectsDescendants)return!1;const{gos:n,rowModel:i}=this.beans;if(!Yt(n))return!1;const o=i.rootNode;if(!o)return!1;let r=!1;const s=a=>{if(a!==o){const l=this.calculateSelectedFromChildren(a);r=this.selectRowNode(a,l===null?!1:l,void 0,e)||r}};return Zs(o,this.beans.rowModel.hierarchical,t,s),r}clearOtherNodes(e,t,n){const i=new Map;let o=0;return this.selectedNodes.forEach(r=>{const s=r.id==e.id;if((t?!uU(e,r):!0)&&!s){const l=this.selectedNodes.get(r.id);o+=this.setNodesSelected({nodes:[l],newValue:!1,clearSelection:!1,suppressFinishActions:!0,source:n}),this.groupSelectsDescendants&&r.parent&&i.set(r.parent.id,r.parent)}}),i.forEach(r=>{const s=this.calculateSelectedFromChildren(r);this.selectRowNode(r,s===null?!1:s,void 0,n)}),o}onRowSelected(e){const t=e.node;this.groupSelectsDescendants&&t.group||(t.isSelected()?this.selectedNodes.set(t.id,t):this.selectedNodes.delete(t.id))}syncInRowNode(e,t){this.syncInOldRowNode(e,t),this.syncInNewRowNode(e)}createDaemonNode(e){if(!e.id)return;const t=new $r(this.beans);return t.id=e.id,t.data=e.data,t.__selected=e.__selected,t.level=e.level,t}syncInOldRowNode(e,t){t&&e.id!==t.id&&this.selectedNodes.get(t.id)==e&&this.selectedNodes.set(t.id,t)}syncInNewRowNode(e){this.selectedNodes.has(e.id)?(e.__selected=!0,this.selectedNodes.set(e.id,e)):e.__selected=!1}reset(e){const t=this.getSelectionCount();this.resetNodes(),t&&this.dispatchSelectionChanged(e)}resetNodes(){this.selectedNodes.forEach(e=>{this.selectRowNode(e,!1)}),this.selectedNodes.clear()}getBestCostNodeSelection(){const{gos:e,rowModel:t}=this.beans;if(!Yt(e))return;const n=t.getTopLevelNodes();if(n===null)return;const i=[];function o(r){for(let s=0,a=r.length;s<a;s++){const l=r[s];l.isSelected()?i.push(l):l.group&&l.childrenAfterGroup&&o(l.childrenAfterGroup)}}return o(n),i}isEmpty(){return this.getSelectionCount()===0}deselectAllRowNodes({source:e,selectAll:t}){const n=Yt(this.gos);let i=!1;const o=r=>{const s=this.selectRowNode(r.primaryRow,!1,void 0,e);i||(i=s)};if(t==="currentPage"||t==="filtered"){if(!n){gt(102);return}this.getNodesToSelect(t).forEach(o)}else this.selectedNodes.forEach(o),this.reset(e);if(this.selectionCtx.selectAll=!1,n&&this.groupSelectsDescendants){const r=this.updateGroupsFromChildrenSelections(e);i||(i=r)}i&&this.dispatchSelectionChanged(e)}getSelectedCounts(e){let t=0,n=0;return this.getNodesToSelect(e).forEach(i=>{this.groupSelectsDescendants&&i.group||(i.isSelected()?t++:i.selectable&&n++)}),{selectedCount:t,notSelectedCount:n}}getSelectAllState(e){const{selectedCount:t,notSelectedCount:n}=this.getSelectedCounts(e);return c1(t,n)??null}hasNodesToSelect(e){return this.getNodesToSelect(e).filter(t=>t.selectable).length>0}getNodesToSelect(e){if(!this.canSelectAll())return[];const t=[],n=o=>t.push(o);if(e==="currentPage")return this.forEachNodeOnPage(o=>{if(!o.group){n(o);return}if(!o.footer&&!o.expanded){const r=s=>{n(s);const a=s.childrenAfterFilter;if(a)for(let l=0,u=a.length;l<u;++l)r(a[l])};r(o);return}this.groupSelectsDescendants||n(o)}),t;const i=this.beans.rowModel;return e==="filtered"?(i.forEachNodeAfterFilter(n),t):(i.forEachNode(n),t)}forEachNodeOnPage(e){const{pageBounds:t,rowModel:n}=this.beans,i=t.getFirstRow(),o=t.getLastRow();for(let r=i;r<=o;r++){const s=n.getRow(r);s&&e(s)}}selectAllRowNodes(e){const{gos:t,selectionCtx:n}=this;if(!ks(t)){se(132);return}if(mO(t)&&!bc(t)){se(130);return}if(!this.canSelectAll())return;const{source:i,selectAll:o}=e;let r=!1;if(this.getNodesToSelect(o).forEach(s=>{const a=this.selectRowNode(s.primaryRow,!0,void 0,i);r||(r=a)}),n.selectAll=!0,Yt(t)&&this.groupSelectsDescendants){const s=this.updateGroupsFromChildrenSelections(i);r||(r=s)}r&&this.dispatchSelectionChanged(i)}getSelectionState(){return this.isEmpty()?null:Array.from(this.selectedNodes.keys())}setSelectionState(e,t,n){if(e||(e=[]),!Array.isArray(e)){gt(103);return}const i=new Set(e),o=[];this.beans.rowModel.forEachNode(r=>{i.has(r.id)&&o.push(r)}),n&&this.resetNodes(),this.setNodesSelected({newValue:!0,nodes:o,source:t})}canSelectAll(){return Yt(this.beans.gos)}updateSelectable(e){const{gos:t,rowModel:n}=this.beans;if(!ks(t))return;const i="selectableChanged",o=Yt(t)&&this.groupSelectsDescendants,r=[];if(o){const s=n.rootNode;s&&Zs(s,n.hierarchical,e,a=>{let l=!1;for(const u of a.childrenAfterGroup)l||(l=u.selectable),!u.group&&!this.updateRowSelectable(u,!0)&&u.isSelected()&&r.push(u);this.setRowSelectable(a,l,!0)})}else n.forEachNode(s=>{!this.updateRowSelectable(s,!0)&&s.isSelected()&&r.push(s)});r.length&&this.setNodesSelected({nodes:r,newValue:!1,source:i}),!e&&o&&this.updateGroupsFromChildrenSelections?.(i)}updateSelectableAfterGrouping(e){this.updateSelectable(e),this.groupSelectsDescendants&&this.updateGroupsFromChildrenSelections?.("rowGroupChanged",e)&&this.dispatchSelectionChanged("rowGroupChanged")}refreshMasterNodeState(e,t){if(!this.masterSelectsDetail)return;const n=e.detailNode?.detailGridInfo?.api;if(!n)return;const i=cU(n);e.isSelected()!==i&&this.selectRowNode(e,i,t,"masterDetail")&&this.dispatchSelectionChanged("masterDetail"),i||this.detailSelection.set(e.id,new Set(n.getSelectedNodes().map(r=>r.id)))}setDetailSelectionState(e,t,n){if(this.masterSelectsDetail){if(!bc(t)){se(269);return}switch(e.isSelected()){case!0:{n.selectAll();break}case!1:{n.deselectAll();break}case void 0:{const i=this.detailSelection.get(e.id);if(i){const o=[];for(const r of i){const s=n.getRowNode(r);s&&o.push(s)}n.setNodesSelected({nodes:o,newValue:!0,source:"masterDetail"})}break}}}}dispatchSelectionChanged(e){this.eventSvc.dispatchEvent({type:"selectionChanged",source:e,selectedNodes:this.getSelectedNodes(),serverSideState:null})}};function cU(e){let t=0,n=0;return e.forEachNode(i=>{i.isSelected()?t++:i.selectable&&n++}),c1(t,n)}function c1(e,t){if(e===0&&t===0)return!1;if(!(e>0&&t>0))return e>0}function uU(e,t){let n=t.parent;for(;n;){if(n===e)return!0;n=n.parent}return!1}function u1(e){const t=e.isSelected()===!1,n=e.childrenAfterFilter?.some(u1)??!1;return t||n}var dU={moduleName:"SharedRowSelection",version:ve,beans:[j8],css:[K8],apiFunctions:{setNodesSelected:q8,selectAll:Q8,deselectAll:Y8,selectAllFiltered:Z8,deselectAllFiltered:X8,selectAllOnCurrentPage:J8,deselectAllOnCurrentPage:eU,getSelectedNodes:tU,getSelectedRows:nU}},hU={moduleName:"RowSelection",version:ve,rowModels:["clientSide","infinite","viewport"],beans:[lU],dependsOn:[dU]},fU=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,n=e.colDef,i=n.cellClassRules,o=this.getCellClassParams(e,n);Qm(this.beans.expressionSvc,i===this.cellClassRules?void 0:this.cellClassRules,i,o,r=>t.toggleCss(r,!0),r=>t.toggleCss(r,!1)),this.cellClassRules=i}applyUserStyles(){const e=this.column,t=e.colDef,n=t.cellStyle;if(!n)return;let i;if(typeof n=="function"){const o=this.getCellClassParams(e,t);i=n(o)}else i=n;i&&this.cellComp.setUserStyles(i)}applyClassesFromColDef(){const{column:e,cellComp:t}=this,n=e.colDef,i=this.getCellClassParams(e,n);for(const r of this.staticClasses)t.toggleCss(r,!1);const o=this.beans.cellStyles.getStaticCellClasses(n,i);this.staticClasses=o;for(const r of o)t.toggleCss(r,!0)}getCellClassParams(e,t){const{value:n,rowNode:i}=this.cellCtrl;return We(this.beans.gos,{value:n,data:i.data,node:i,colDef:t,column:e,rowIndex:i.rowIndex})}},pU=class extends X{constructor(){super(...arguments),this.beanName="cellStyles"}processAllCellClasses(e,t,n,i){Qm(this.beans.expressionSvc,void 0,e.cellClassRules,t,n,i),this.processStaticCellClasses(e,t,n)}getStaticCellClasses(e,t){const{cellClass:n}=e;if(!n)return[];let i;return typeof n=="function"?i=n(t):i=n,typeof i=="string"&&(i=[i]),i||[]}createCellCustomStyleFeature(e){return new fU(e,this.beans)}processStaticCellClasses(e,t,n){this.getStaticCellClasses(e,t).forEach(o=>{n(o)})}},gU={moduleName:"CellStyle",version:ve,beans:[pU]},mU={moduleName:"RowStyle",version:ve,beans:[u3]},vU={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,overlayComponent:!0,suppressOverlays:!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},ri="clientSide",Ln="serverSide",ul="infinite",CU={onGroupExpandedOrCollapsed:[ri],refreshClientSideRowModel:[ri],isRowDataEmpty:[ri],forEachLeafNode:[ri],forEachNodeAfterFilter:[ri],forEachNodeAfterFilterAndSort:[ri],resetRowHeights:[ri,Ln],applyTransaction:[ri],applyTransactionAsync:[ri],flushAsyncTransactions:[ri],getBestCostNodeSelection:[ri],getServerSideSelectionState:[Ln],setServerSideSelectionState:[Ln],applyServerSideTransaction:[Ln],applyServerSideTransactionAsync:[Ln],applyServerSideRowData:[Ln],retryServerSideLoads:[Ln],flushServerSideAsyncTransactions:[Ln],refreshServerSide:[Ln],getServerSideGroupLevelState:[Ln],refreshInfiniteCache:[ul],purgeInfiniteCache:[ul],getInfiniteRowCount:[ul],isLastRowIndexKnown:[ul,Ln],expandAll:[ri,Ln],collapseAll:[ri,Ln],onRowHeightChanged:[ri,Ln],setRowCount:[ul,Ln],getCacheBlockState:[ul,Ln]},wU={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 bU(e,t,n){const i=wU[e];if(i){const{version:r,new:s,old:a,message:l}=i,u=a??e;return(...h)=>{const f=s?`Please use ${s} instead. `:"";return vc(`Since ${r} api.${u} is deprecated. ${f}${l??""}`),t.apply(t,h)}}const o=CU[e];return o?(...r)=>{const s=n.rowModel.getType();if(!o.includes(s)){Ga(`api.${e} can only be called when gridOptions.rowModelType is ${o.join(" or ")}`);return}return t.apply(t,r)}:t}var yU={detailCellRendererCtrl:"SharedMasterDetail",dndSourceComp:"DragAndDrop",fillHandle:"CellSelection",groupCellRendererCtrl:"GroupCellRenderer",headerFilterCellCtrl:"ColumnFilter",headerGroupCellCtrl:"ColumnGroup",rangeHandle:"CellSelection",tooltipFeature:"Tooltip",highlightTooltipFeature:"Tooltip",tooltipStateManager:"Tooltip",groupStrategy:"RowGrouping",treeGroupStrategy:"TreeData",rowNumberRowResizer:"RowNumbers",singleCell:"EditCore",fullRow:"EditCore",agSetColumnFilterHandler:"SetFilter",agMultiColumnFilterHandler:"MultiFilter",agGroupColumnFilterHandler:"GroupFilter",agNumberColumnFilterHandler:"NumberFilter",agBigIntColumnFilterHandler:"BigIntFilter",agDateColumnFilterHandler:"DateFilter",agTextColumnFilterHandler:"TextFilter"},SU={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,aasc:1,adesc: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},RU={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",overlayLoading:"Overlay",overlayExporting:"Overlay",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",richSelectLoading:"RichSelect",smallLeft:"CommunityCore",smallRight:"CommunityCore",subMenuOpen:"MenuItem",subMenuOpenRtl:"MenuItem",panelDelimiter:"RowGroupingPanel",panelDelimiterRtl:"RowGroupingPanel",smallUp:"CommunityCore",sortAscending:["MenuCore","Sort"],sortDescending:["MenuCore","Sort"],sortAbsoluteAscending:["MenuCore","Sort"],sortAbsoluteDescending:["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"},FU=new Set(["colorPicker","smallUp","checkboxChecked","checkboxIndeterminate","checkboxUnchecked","radioButtonOn","radioButtonOff","smallDown","smallLeft","smallRight"]),xU=class extends X{constructor(){super(...arguments),this.beanName="validation"}wireBeans(e){this.gridOptions=e.gridOptions,nO(SW)}warnOnInitialPropertyUpdate(e,t){e==="api"&&vU[t]&&se(22,{key:t})}processGridOptions(e){this.processOptions(e,d5())}validateApiFunction(e,t){return bU(e,t,this.beans)}missingUserComponent(e,t,n,i){const o=il[t];o?this.gos.assertModuleRegistered(o,`AG Grid '${e}' component: ${t}`):se(101,{propertyName:e,componentName:t,agGridDefaults:n,jsComps:i})}missingDynamicBean(e){const t=yU[e];return t?Po(200,{...this.gos.getModuleErrorParams(),moduleName:t,reasonOrId:e}):void 0}checkRowEvents(e){EU.has(e)&&se(10,{eventType:e})}validateIcon(e){if(FU.has(e)&&se(43,{iconName:e}),SU[e])return;const t=RU[e];if(t){gt(200,{reasonOrId:`icon '${e}'`,moduleName:t,gridScoped:Eg(),gridId:this.beans.context.getId(),rowModelType:this.gos.get("rowModelType"),additionalText:"Alternatively, use the CSS icon name directly."});return}se(134,{iconName:e})}isProvidedUserComp(e){return!!il[e]}validateColDef(e){this.processOptions(e,i5())}processOptions(e,t){const{validations:n,deprecations:i,allProperties:o,propertyExceptions:r,objectName:s,docsUrl:a}=t;o&&this.gridOptions.suppressPropertyNamesCheck!==!0&&this.checkProperties(e,[...r??[],...Object.keys(i)],o,s,a);const l=new Set;if(Object.keys(e).forEach(h=>{const f=i[h];if(f){const{message:R,version:S}=f;l.add(`As of v${S}, ${String(h)} is deprecated. ${R??""}`)}const p=e[h];if(p==null||p===!1)return;const m=n[h];if(!m)return;const{dependencies:v,validate:w,supportedRowModels:b,expectedType:y}=m;if(y){const R=typeof p;if(R!==y){l.add(`${String(h)} should be of type '${y}' but received '${R}' (${p}).`);return}}if(b){const R=this.gridOptions.rowModelType??"clientSide";if(!b.includes(R)){l.add(`${String(h)} is not supported with the '${R}' row model. It is only valid with: ${b.join(", ")}.`);return}}if(v){const R=this.checkForRequiredDependencies(h,v,e);if(R){l.add(R);return}}if(w){const R=w(e,this.gridOptions,this.beans);if(R){l.add(R);return}}}),l.size>0)for(const h of l)vc(h)}checkForRequiredDependencies(e,t,n){const o=Object.entries(t).filter(([r,s])=>{const a=n[r];return!s.required.includes(a)});return o.length===0?null:o.map(([r,s])=>`'${String(e)}' requires '${r}' to be one of [${s.required.map(a=>a===null?"null":a===void 0?"undefined":a).join(", ")}]. ${s.reason??""}`).join(`
|
|
65
65
|
`)}checkProperties(e,t,n,i,o){const r=["__ob__","__v_skip","__metadata__"],s=PU(Object.getOwnPropertyNames(e),[...r,...t,...n],n),a=Object.keys(s);for(const l of a){const u=s[l];let h=`invalid ${i} property '${l}' did you mean any of these: ${u.slice(0,8).join(", ")}.`;n.includes("context")&&(h+=`
|
|
66
|
-
If you are trying to annotate ${i} with application data, use the '${i}.context' property instead.`),vc(h)}if(a.length>0&&o){const l=this.beans.frameworkOverrides.getDocLink(o);vc(`to see all the valid ${i} properties please check: ${l}`)}}};function PU(e,t,n){const i={},o=e.filter(r=>!t.some(s=>s===r));if(o.length>0)for(const r of o)i[r]=tv({inputValue:r,allSuggestions:n}).values;return i}var EU=new Set(["firstChildChanged","lastChildChanged","childIndexChanged"]),DU={moduleName:"Validation",version:ve,beans:[xU]},TU={moduleName:"AllCommunity",version:ve,dependsOn:[
|
|
66
|
+
If you are trying to annotate ${i} with application data, use the '${i}.context' property instead.`),vc(h)}if(a.length>0&&o){const l=this.beans.frameworkOverrides.getDocLink(o);vc(`to see all the valid ${i} properties please check: ${l}`)}}};function PU(e,t,n){const i={},o=e.filter(r=>!t.some(s=>s===r));if(o.length>0)for(const r of o)i[r]=tv({inputValue:r,allSuggestions:n}).values;return i}var EU=new Set(["firstChildChanged","lastChildChanged","childIndexChanged"]),DU={moduleName:"Validation",version:ve,beans:[xU]},TU={moduleName:"AllCommunity",version:ve,dependsOn:[Rz,$z,A9,DU,C4,w4,b4,y4,S4,R4,F4,v4,p9,g9,m9,v9,f9,w9,b9,U9,AW,d8,rF,ox,zW,_8,Az,RB,C8,hU,lW,gU,Oz,mU,_9,dW,D8,Cx,B9,B8,SB,Fz,$8]},AU=class{wrap(e,t,n,i){const o=this.createWrapper(e,i);for(const r of t??[])this.createMethod(o,r,!0);for(const r of n??[])this.createMethod(o,r,!1);return o}createMethod(e,t,n){e.addMethod(t,this.createMethodProxy(e,t,n))}createMethodProxy(e,t,n){return function(){return e.hasMethod(t)?e.callMethod(t,arguments):(n&&se(49,{methodName:t}),null)}}};function Gv(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}function IU(e){if(Array.isArray(e))return e}function MU(e){if(Array.isArray(e))return Gv(e)}function kU(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function LU(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,h1(i.key),i)}}function OU(e,t,n){return t&&LU(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Bh(e,t){var n=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=Hv(e))||t){n&&(e=n);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(l){throw l},f:o}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
67
67
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var r,s=!0,a=!1;return{s:function(){n=n.call(e)},n:function(){var l=n.next();return s=l.done,l},e:function(l){a=!0,r=l},f:function(){try{s||n.return==null||n.return()}finally{if(a)throw r}}}}function tt(e,t,n){return(t=h1(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _U(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function NU(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var i,o,r,s,a=[],l=!0,u=!1;try{if(r=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;l=!1}else for(;!(l=(i=r.call(n)).done)&&(a.push(i.value),a.length!==t);l=!0);}catch(h){u=!0,o=h}finally{try{if(!l&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(u)throw o}}return a}}function BU(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
68
68
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function GU(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
69
69
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function d1(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,i)}return n}function ge(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?d1(Object(n),!0).forEach(function(i){tt(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d1(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function Gh(e,t){return IU(e)||NU(e,t)||Hv(e,t)||BU()}function ao(e){return MU(e)||_U(e)||Hv(e)||GU()}function HU(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,t);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function h1(e){var t=HU(e,"string");return typeof t=="symbol"?t:t+""}function Hh(e){"@babel/helpers - typeof";return Hh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Hh(e)}function Hv(e,t){if(e){if(typeof e=="string")return Gv(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Gv(e,t):void 0}}var f1=function(){},Vv={},p1={},g1=null,m1={mark:f1,measure:f1};try{typeof window<"u"&&(Vv=window),typeof document<"u"&&(p1=document),typeof MutationObserver<"u"&&(g1=MutationObserver),typeof performance<"u"&&(m1=performance)}catch{}var VU=Vv.navigator||{},v1=VU.userAgent,C1=v1===void 0?"":v1,is=Vv,kt=p1,w1=g1,Vh=m1;is.document;var lr=!!kt.documentElement&&!!kt.head&&typeof kt.addEventListener=="function"&&typeof kt.createElement=="function",b1=~C1.indexOf("MSIE")||~C1.indexOf("Trident/"),Wv,WU=/fa(k|kd|s|r|l|t|d|dr|dl|dt|b|slr|slpr|wsb|tl|ns|nds|es|gt|jr|jfr|jdr|usb|ufsb|udsb|cr|ss|sr|sl|st|sds|sdr|sdl|sdt)?[\-\ ]/,zU=/Font ?Awesome ?([567 ]*)(Solid|Regular|Light|Thin|Duotone|Brands|Free|Pro|Sharp Duotone|Sharp|Kit|Notdog Duo|Notdog|Chisel|Etch|Graphite|Thumbprint|Jelly Fill|Jelly Duo|Jelly|Utility|Utility Fill|Utility Duo|Slab Press|Slab|Whiteboard)?.*/i,y1={classic:{fa:"solid",fas:"solid","fa-solid":"solid",far:"regular","fa-regular":"regular",fal:"light","fa-light":"light",fat:"thin","fa-thin":"thin",fab:"brands","fa-brands":"brands"},duotone:{fa:"solid",fad:"solid","fa-solid":"solid","fa-duotone":"solid",fadr:"regular","fa-regular":"regular",fadl:"light","fa-light":"light",fadt:"thin","fa-thin":"thin"},sharp:{fa:"solid",fass:"solid","fa-solid":"solid",fasr:"regular","fa-regular":"regular",fasl:"light","fa-light":"light",fast:"thin","fa-thin":"thin"},"sharp-duotone":{fa:"solid",fasds:"solid","fa-solid":"solid",fasdr:"regular","fa-regular":"regular",fasdl:"light","fa-light":"light",fasdt:"thin","fa-thin":"thin"},slab:{"fa-regular":"regular",faslr:"regular"},"slab-press":{"fa-regular":"regular",faslpr:"regular"},thumbprint:{"fa-light":"light",fatl:"light"},whiteboard:{"fa-semibold":"semibold",fawsb:"semibold"},notdog:{"fa-solid":"solid",fans:"solid"},"notdog-duo":{"fa-solid":"solid",fands:"solid"},etch:{"fa-solid":"solid",faes:"solid"},graphite:{"fa-thin":"thin",fagt:"thin"},jelly:{"fa-regular":"regular",fajr:"regular"},"jelly-fill":{"fa-regular":"regular",fajfr:"regular"},"jelly-duo":{"fa-regular":"regular",fajdr:"regular"},chisel:{"fa-regular":"regular",facr:"regular"},utility:{"fa-semibold":"semibold",fausb:"semibold"},"utility-duo":{"fa-semibold":"semibold",faudsb:"semibold"},"utility-fill":{"fa-semibold":"semibold",faufsb:"semibold"}},UU={GROUP:"duotone-group",PRIMARY:"primary",SECONDARY:"secondary"},S1=["fa-classic","fa-duotone","fa-sharp","fa-sharp-duotone","fa-thumbprint","fa-whiteboard","fa-notdog","fa-notdog-duo","fa-chisel","fa-etch","fa-graphite","fa-jelly","fa-jelly-fill","fa-jelly-duo","fa-slab","fa-slab-press","fa-utility","fa-utility-duo","fa-utility-fill"],Sn="classic",Wc="duotone",R1="sharp",F1="sharp-duotone",x1="chisel",P1="etch",E1="graphite",D1="jelly",T1="jelly-duo",A1="jelly-fill",I1="notdog",M1="notdog-duo",k1="slab",L1="slab-press",O1="thumbprint",_1="utility",N1="utility-duo",B1="utility-fill",G1="whiteboard",$U="Classic",jU="Duotone",KU="Sharp",qU="Sharp Duotone",QU="Chisel",YU="Etch",ZU="Graphite",XU="Jelly",JU="Jelly Duo",e$="Jelly Fill",t$="Notdog",n$="Notdog Duo",i$="Slab",o$="Slab Press",r$="Thumbprint",s$="Utility",a$="Utility Duo",l$="Utility Fill",c$="Whiteboard",H1=[Sn,Wc,R1,F1,x1,P1,E1,D1,T1,A1,I1,M1,k1,L1,O1,_1,N1,B1,G1];Wv={},tt(tt(tt(tt(tt(tt(tt(tt(tt(tt(Wv,Sn,$U),Wc,jU),R1,KU),F1,qU),x1,QU),P1,YU),E1,ZU),D1,XU),T1,JU),A1,e$),tt(tt(tt(tt(tt(tt(tt(tt(tt(Wv,I1,t$),M1,n$),k1,i$),L1,o$),O1,r$),_1,s$),N1,a$),B1,l$),G1,c$);var u$={classic:{900:"fas",400:"far",normal:"far",300:"fal",100:"fat"},duotone:{900:"fad",400:"fadr",300:"fadl",100:"fadt"},sharp:{900:"fass",400:"fasr",300:"fasl",100:"fast"},"sharp-duotone":{900:"fasds",400:"fasdr",300:"fasdl",100:"fasdt"},slab:{400:"faslr"},"slab-press":{400:"faslpr"},whiteboard:{600:"fawsb"},thumbprint:{300:"fatl"},notdog:{900:"fans"},"notdog-duo":{900:"fands"},etch:{900:"faes"},graphite:{100:"fagt"},chisel:{400:"facr"},jelly:{400:"fajr"},"jelly-fill":{400:"fajfr"},"jelly-duo":{400:"fajdr"},utility:{600:"fausb"},"utility-duo":{600:"faudsb"},"utility-fill":{600:"faufsb"}},d$={"Font Awesome 7 Free":{900:"fas",400:"far"},"Font Awesome 7 Pro":{900:"fas",400:"far",normal:"far",300:"fal",100:"fat"},"Font Awesome 7 Brands":{400:"fab",normal:"fab"},"Font Awesome 7 Duotone":{900:"fad",400:"fadr",normal:"fadr",300:"fadl",100:"fadt"},"Font Awesome 7 Sharp":{900:"fass",400:"fasr",normal:"fasr",300:"fasl",100:"fast"},"Font Awesome 7 Sharp Duotone":{900:"fasds",400:"fasdr",normal:"fasdr",300:"fasdl",100:"fasdt"},"Font Awesome 7 Jelly":{400:"fajr",normal:"fajr"},"Font Awesome 7 Jelly Fill":{400:"fajfr",normal:"fajfr"},"Font Awesome 7 Jelly Duo":{400:"fajdr",normal:"fajdr"},"Font Awesome 7 Slab":{400:"faslr",normal:"faslr"},"Font Awesome 7 Slab Press":{400:"faslpr",normal:"faslpr"},"Font Awesome 7 Thumbprint":{300:"fatl",normal:"fatl"},"Font Awesome 7 Notdog":{900:"fans",normal:"fans"},"Font Awesome 7 Notdog Duo":{900:"fands",normal:"fands"},"Font Awesome 7 Etch":{900:"faes",normal:"faes"},"Font Awesome 7 Graphite":{100:"fagt",normal:"fagt"},"Font Awesome 7 Chisel":{400:"facr",normal:"facr"},"Font Awesome 7 Whiteboard":{600:"fawsb",normal:"fawsb"},"Font Awesome 7 Utility":{600:"fausb",normal:"fausb"},"Font Awesome 7 Utility Duo":{600:"faudsb",normal:"faudsb"},"Font Awesome 7 Utility Fill":{600:"faufsb",normal:"faufsb"}},h$=new Map([["classic",{defaultShortPrefixId:"fas",defaultStyleId:"solid",styleIds:["solid","regular","light","thin","brands"],futureStyleIds:[],defaultFontWeight:900}],["duotone",{defaultShortPrefixId:"fad",defaultStyleId:"solid",styleIds:["solid","regular","light","thin"],futureStyleIds:[],defaultFontWeight:900}],["sharp",{defaultShortPrefixId:"fass",defaultStyleId:"solid",styleIds:["solid","regular","light","thin"],futureStyleIds:[],defaultFontWeight:900}],["sharp-duotone",{defaultShortPrefixId:"fasds",defaultStyleId:"solid",styleIds:["solid","regular","light","thin"],futureStyleIds:[],defaultFontWeight:900}],["chisel",{defaultShortPrefixId:"facr",defaultStyleId:"regular",styleIds:["regular"],futureStyleIds:[],defaultFontWeight:400}],["etch",{defaultShortPrefixId:"faes",defaultStyleId:"solid",styleIds:["solid"],futureStyleIds:[],defaultFontWeight:900}],["graphite",{defaultShortPrefixId:"fagt",defaultStyleId:"thin",styleIds:["thin"],futureStyleIds:[],defaultFontWeight:100}],["jelly",{defaultShortPrefixId:"fajr",defaultStyleId:"regular",styleIds:["regular"],futureStyleIds:[],defaultFontWeight:400}],["jelly-duo",{defaultShortPrefixId:"fajdr",defaultStyleId:"regular",styleIds:["regular"],futureStyleIds:[],defaultFontWeight:400}],["jelly-fill",{defaultShortPrefixId:"fajfr",defaultStyleId:"regular",styleIds:["regular"],futureStyleIds:[],defaultFontWeight:400}],["notdog",{defaultShortPrefixId:"fans",defaultStyleId:"solid",styleIds:["solid"],futureStyleIds:[],defaultFontWeight:900}],["notdog-duo",{defaultShortPrefixId:"fands",defaultStyleId:"solid",styleIds:["solid"],futureStyleIds:[],defaultFontWeight:900}],["slab",{defaultShortPrefixId:"faslr",defaultStyleId:"regular",styleIds:["regular"],futureStyleIds:[],defaultFontWeight:400}],["slab-press",{defaultShortPrefixId:"faslpr",defaultStyleId:"regular",styleIds:["regular"],futureStyleIds:[],defaultFontWeight:400}],["thumbprint",{defaultShortPrefixId:"fatl",defaultStyleId:"light",styleIds:["light"],futureStyleIds:[],defaultFontWeight:300}],["utility",{defaultShortPrefixId:"fausb",defaultStyleId:"semibold",styleIds:["semibold"],futureStyleIds:[],defaultFontWeight:600}],["utility-duo",{defaultShortPrefixId:"faudsb",defaultStyleId:"semibold",styleIds:["semibold"],futureStyleIds:[],defaultFontWeight:600}],["utility-fill",{defaultShortPrefixId:"faufsb",defaultStyleId:"semibold",styleIds:["semibold"],futureStyleIds:[],defaultFontWeight:600}],["whiteboard",{defaultShortPrefixId:"fawsb",defaultStyleId:"semibold",styleIds:["semibold"],futureStyleIds:[],defaultFontWeight:600}]]),f$={chisel:{regular:"facr"},classic:{brands:"fab",light:"fal",regular:"far",solid:"fas",thin:"fat"},duotone:{light:"fadl",regular:"fadr",solid:"fad",thin:"fadt"},etch:{solid:"faes"},graphite:{thin:"fagt"},jelly:{regular:"fajr"},"jelly-duo":{regular:"fajdr"},"jelly-fill":{regular:"fajfr"},notdog:{solid:"fans"},"notdog-duo":{solid:"fands"},sharp:{light:"fasl",regular:"fasr",solid:"fass",thin:"fast"},"sharp-duotone":{light:"fasdl",regular:"fasdr",solid:"fasds",thin:"fasdt"},slab:{regular:"faslr"},"slab-press":{regular:"faslpr"},thumbprint:{light:"fatl"},utility:{semibold:"fausb"},"utility-duo":{semibold:"faudsb"},"utility-fill":{semibold:"faufsb"},whiteboard:{semibold:"fawsb"}},V1=["fak","fa-kit","fakd","fa-kit-duotone"],W1={kit:{fak:"kit","fa-kit":"kit"},"kit-duotone":{fakd:"kit-duotone","fa-kit-duotone":"kit-duotone"}},p$=["kit"],g$="kit",m$="kit-duotone",v$="Kit",C$="Kit Duotone";tt(tt({},g$,v$),m$,C$);var w$={kit:{"fa-kit":"fak"}},b$={"Font Awesome Kit":{400:"fak",normal:"fak"},"Font Awesome Kit Duotone":{400:"fakd",normal:"fakd"}},y$={kit:{fak:"fa-kit"}},z1={kit:{kit:"fak"},"kit-duotone":{"kit-duotone":"fakd"}},zv,Wh={GROUP:"duotone-group",SWAP_OPACITY:"swap-opacity",PRIMARY:"primary",SECONDARY:"secondary"},S$=["fa-classic","fa-duotone","fa-sharp","fa-sharp-duotone","fa-thumbprint","fa-whiteboard","fa-notdog","fa-notdog-duo","fa-chisel","fa-etch","fa-graphite","fa-jelly","fa-jelly-fill","fa-jelly-duo","fa-slab","fa-slab-press","fa-utility","fa-utility-duo","fa-utility-fill"],R$="classic",F$="duotone",x$="sharp",P$="sharp-duotone",E$="chisel",D$="etch",T$="graphite",A$="jelly",I$="jelly-duo",M$="jelly-fill",k$="notdog",L$="notdog-duo",O$="slab",_$="slab-press",N$="thumbprint",B$="utility",G$="utility-duo",H$="utility-fill",V$="whiteboard",W$="Classic",z$="Duotone",U$="Sharp",$$="Sharp Duotone",j$="Chisel",K$="Etch",q$="Graphite",Q$="Jelly",Y$="Jelly Duo",Z$="Jelly Fill",X$="Notdog",J$="Notdog Duo",ej="Slab",tj="Slab Press",nj="Thumbprint",ij="Utility",oj="Utility Duo",rj="Utility Fill",sj="Whiteboard";zv={},tt(tt(tt(tt(tt(tt(tt(tt(tt(tt(zv,R$,W$),F$,z$),x$,U$),P$,$$),E$,j$),D$,K$),T$,q$),A$,Q$),I$,Y$),M$,Z$),tt(tt(tt(tt(tt(tt(tt(tt(tt(zv,k$,X$),L$,J$),O$,ej),_$,tj),N$,nj),B$,ij),G$,oj),H$,rj),V$,sj);var aj="kit",lj="kit-duotone",cj="Kit",uj="Kit Duotone";tt(tt({},aj,cj),lj,uj);var dj={classic:{"fa-brands":"fab","fa-duotone":"fad","fa-light":"fal","fa-regular":"far","fa-solid":"fas","fa-thin":"fat"},duotone:{"fa-regular":"fadr","fa-light":"fadl","fa-thin":"fadt"},sharp:{"fa-solid":"fass","fa-regular":"fasr","fa-light":"fasl","fa-thin":"fast"},"sharp-duotone":{"fa-solid":"fasds","fa-regular":"fasdr","fa-light":"fasdl","fa-thin":"fasdt"},slab:{"fa-regular":"faslr"},"slab-press":{"fa-regular":"faslpr"},whiteboard:{"fa-semibold":"fawsb"},thumbprint:{"fa-light":"fatl"},notdog:{"fa-solid":"fans"},"notdog-duo":{"fa-solid":"fands"},etch:{"fa-solid":"faes"},graphite:{"fa-thin":"fagt"},jelly:{"fa-regular":"fajr"},"jelly-fill":{"fa-regular":"fajfr"},"jelly-duo":{"fa-regular":"fajdr"},chisel:{"fa-regular":"facr"},utility:{"fa-semibold":"fausb"},"utility-duo":{"fa-semibold":"faudsb"},"utility-fill":{"fa-semibold":"faufsb"}},hj={classic:["fas","far","fal","fat","fad"],duotone:["fadr","fadl","fadt"],sharp:["fass","fasr","fasl","fast"],"sharp-duotone":["fasds","fasdr","fasdl","fasdt"],slab:["faslr"],"slab-press":["faslpr"],whiteboard:["fawsb"],thumbprint:["fatl"],notdog:["fans"],"notdog-duo":["fands"],etch:["faes"],graphite:["fagt"],jelly:["fajr"],"jelly-fill":["fajfr"],"jelly-duo":["fajdr"],chisel:["facr"],utility:["fausb"],"utility-duo":["faudsb"],"utility-fill":["faufsb"]},Uv={classic:{fab:"fa-brands",fad:"fa-duotone",fal:"fa-light",far:"fa-regular",fas:"fa-solid",fat:"fa-thin"},duotone:{fadr:"fa-regular",fadl:"fa-light",fadt:"fa-thin"},sharp:{fass:"fa-solid",fasr:"fa-regular",fasl:"fa-light",fast:"fa-thin"},"sharp-duotone":{fasds:"fa-solid",fasdr:"fa-regular",fasdl:"fa-light",fasdt:"fa-thin"},slab:{faslr:"fa-regular"},"slab-press":{faslpr:"fa-regular"},whiteboard:{fawsb:"fa-semibold"},thumbprint:{fatl:"fa-light"},notdog:{fans:"fa-solid"},"notdog-duo":{fands:"fa-solid"},etch:{faes:"fa-solid"},graphite:{fagt:"fa-thin"},jelly:{fajr:"fa-regular"},"jelly-fill":{fajfr:"fa-regular"},"jelly-duo":{fajdr:"fa-regular"},chisel:{facr:"fa-regular"},utility:{fausb:"fa-semibold"},"utility-duo":{faudsb:"fa-semibold"},"utility-fill":{faufsb:"fa-semibold"}},fj=["fa-solid","fa-regular","fa-light","fa-thin","fa-duotone","fa-brands","fa-semibold"],U1=["fa","fas","far","fal","fat","fad","fadr","fadl","fadt","fab","fass","fasr","fasl","fast","fasds","fasdr","fasdl","fasdt","faslr","faslpr","fawsb","fatl","fans","fands","faes","fagt","fajr","fajfr","fajdr","facr","fausb","faudsb","faufsb"].concat(S$,fj),pj=["solid","regular","light","thin","duotone","brands","semibold"],$1=[1,2,3,4,5,6,7,8,9,10],gj=$1.concat([11,12,13,14,15,16,17,18,19,20]),mj=["aw","fw","pull-left","pull-right"],vj=[].concat(ao(Object.keys(hj)),pj,mj,["2xs","xs","sm","lg","xl","2xl","beat","border","fade","beat-fade","bounce","flip-both","flip-horizontal","flip-vertical","flip","inverse","layers","layers-bottom-left","layers-bottom-right","layers-counter","layers-text","layers-top-left","layers-top-right","li","pull-end","pull-start","pulse","rotate-180","rotate-270","rotate-90","rotate-by","shake","spin-pulse","spin-reverse","spin","stack-1x","stack-2x","stack","ul","width-auto","width-fixed",Wh.GROUP,Wh.SWAP_OPACITY,Wh.PRIMARY,Wh.SECONDARY]).concat($1.map(function(e){return"".concat(e,"x")})).concat(gj.map(function(e){return"w-".concat(e)})),Cj={"Font Awesome 5 Free":{900:"fas",400:"far"},"Font Awesome 5 Pro":{900:"fas",400:"far",normal:"far",300:"fal"},"Font Awesome 5 Brands":{400:"fab",normal:"fab"},"Font Awesome 5 Duotone":{900:"fad"}},cr="___FONT_AWESOME___",$v=16,j1="fa",K1="svg-inline--fa",Js="data-fa-i2svg",jv="data-fa-pseudo-element",wj="data-fa-pseudo-element-pending",Kv="data-prefix",qv="data-icon",q1="fontawesome-i2svg",bj="async",yj=["HTML","HEAD","STYLE","SCRIPT"],Q1=["::before","::after",":before",":after"],Y1=(function(){try{return!0}catch{return!1}})();function zc(e){return new Proxy(e,{get:function(n,i){return i in n?n[i]:n[Sn]}})}var Z1=ge({},y1);Z1[Sn]=ge(ge(ge(ge({},{"fa-duotone":"duotone"}),y1[Sn]),W1.kit),W1["kit-duotone"]);var Sj=zc(Z1),Qv=ge({},f$);Qv[Sn]=ge(ge(ge(ge({},{duotone:"fad"}),Qv[Sn]),z1.kit),z1["kit-duotone"]);var X1=zc(Qv),Yv=ge({},Uv);Yv[Sn]=ge(ge({},Yv[Sn]),y$.kit);var Zv=zc(Yv),Xv=ge({},dj);Xv[Sn]=ge(ge({},Xv[Sn]),w$.kit),zc(Xv);var Rj=WU,J1="fa-layers-text",Fj=zU,xj=ge({},u$);zc(xj);var Pj=["class","data-prefix","data-icon","data-fa-transform","data-fa-mask"],Jv=UU,Ej=[].concat(ao(p$),ao(vj)),Uc=is.FontAwesomeConfig||{};function Dj(e){var t=kt.querySelector("script["+e+"]");if(t)return t.getAttribute(e)}function Tj(e){return e===""?!0:e==="false"?!1:e==="true"?!0:e}if(kt&&typeof kt.querySelector=="function"){var Aj=[["data-family-prefix","familyPrefix"],["data-css-prefix","cssPrefix"],["data-family-default","familyDefault"],["data-style-default","styleDefault"],["data-replacement-class","replacementClass"],["data-auto-replace-svg","autoReplaceSvg"],["data-auto-add-css","autoAddCss"],["data-search-pseudo-elements","searchPseudoElements"],["data-search-pseudo-elements-warnings","searchPseudoElementsWarnings"],["data-search-pseudo-elements-full-scan","searchPseudoElementsFullScan"],["data-observe-mutations","observeMutations"],["data-mutate-approach","mutateApproach"],["data-keep-original-source","keepOriginalSource"],["data-measure-performance","measurePerformance"],["data-show-missing-icons","showMissingIcons"]];Aj.forEach(function(e){var t=Gh(e,2),n=t[0],i=t[1],o=Tj(Dj(n));o!=null&&(Uc[i]=o)})}var eP={styleDefault:"solid",familyDefault:Sn,cssPrefix:j1,replacementClass:K1,autoReplaceSvg:!0,autoAddCss:!0,searchPseudoElements:!1,searchPseudoElementsWarnings:!0,searchPseudoElementsFullScan:!1,observeMutations:!0,mutateApproach:"async",keepOriginalSource:!0,measurePerformance:!1,showMissingIcons:!0};Uc.familyPrefix&&(Uc.cssPrefix=Uc.familyPrefix);var dl=ge(ge({},eP),Uc);dl.autoReplaceSvg||(dl.observeMutations=!1);var He={};Object.keys(eP).forEach(function(e){Object.defineProperty(He,e,{enumerable:!0,set:function(n){dl[e]=n,$c.forEach(function(i){return i(He)})},get:function(){return dl[e]}})}),Object.defineProperty(He,"familyPrefix",{enumerable:!0,set:function(t){dl.cssPrefix=t,$c.forEach(function(n){return n(He)})},get:function(){return dl.cssPrefix}}),is.FontAwesomeConfig=He;var $c=[];function Ij(e){return $c.push(e),function(){$c.splice($c.indexOf(e),1)}}var hl=$v,_o={size:16,x:0,y:0,rotate:0,flipX:!1,flipY:!1};function Mj(e){if(!(!e||!lr)){var t=kt.createElement("style");t.setAttribute("type","text/css"),t.innerHTML=e;for(var n=kt.head.childNodes,i=null,o=n.length-1;o>-1;o--){var r=n[o],s=(r.tagName||"").toUpperCase();["STYLE","LINK"].indexOf(s)>-1&&(i=r)}return kt.head.insertBefore(t,i),e}}var kj="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";function tP(){for(var e=12,t="";e-- >0;)t+=kj[Math.random()*62|0];return t}function fl(e){for(var t=[],n=(e||[]).length>>>0;n--;)t[n]=e[n];return t}function eC(e){return e.classList?fl(e.classList):(e.getAttribute("class")||"").split(" ").filter(function(t){return t})}function nP(e){return"".concat(e).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">")}function Lj(e){return Object.keys(e||{}).reduce(function(t,n){return t+"".concat(n,'="').concat(nP(e[n]),'" ')},"").trim()}function zh(e){return Object.keys(e||{}).reduce(function(t,n){return t+"".concat(n,": ").concat(e[n].trim(),";")},"")}function tC(e){return e.size!==_o.size||e.x!==_o.x||e.y!==_o.y||e.rotate!==_o.rotate||e.flipX||e.flipY}function Oj(e){var t=e.transform,n=e.containerWidth,i=e.iconWidth,o={transform:"translate(".concat(n/2," 256)")},r="translate(".concat(t.x*32,", ").concat(t.y*32,") "),s="scale(".concat(t.size/16*(t.flipX?-1:1),", ").concat(t.size/16*(t.flipY?-1:1),") "),a="rotate(".concat(t.rotate," 0 0)"),l={transform:"".concat(r," ").concat(s," ").concat(a)},u={transform:"translate(".concat(i/2*-1," -256)")};return{outer:o,inner:l,path:u}}function _j(e){var t=e.transform,n=e.width,i=n===void 0?$v:n,o=e.height,r=o===void 0?$v:o,s="";return b1?s+="translate(".concat(t.x/hl-i/2,"em, ").concat(t.y/hl-r/2,"em) "):s+="translate(calc(-50% + ".concat(t.x/hl,"em), calc(-50% + ").concat(t.y/hl,"em)) "),s+="scale(".concat(t.size/hl*(t.flipX?-1:1),", ").concat(t.size/hl*(t.flipY?-1:1),") "),s+="rotate(".concat(t.rotate,"deg) "),s}var Nj=`:root, :host {
|
|
@@ -663,4 +663,4 @@ __p += '`),ht&&(le+=`' +
|
|
|
663
663
|
function print() { __p += __j.call(arguments, '') }
|
|
664
664
|
`:`;
|
|
665
665
|
`)+le+`return __p
|
|
666
|
-
}`;var at=sI(function(){return wt(D,Ne+"return "+le).apply(n,O)});if(at.source=le,ub(at))throw at;return at}function _ae(c){return Rt(c).toLowerCase()}function Nae(c){return Rt(c).toUpperCase()}function Bae(c,d,g){if(c=Rt(c),c&&(g||d===n))return gT(c);if(!c||!(d=Fi(d)))return c;var C=ho(c),x=ho(d),D=mT(C,x),O=vT(C,x)+1;return vs(C,D,O).join("")}function Gae(c,d,g){if(c=Rt(c),c&&(g||d===n))return c.slice(0,wT(c)+1);if(!c||!(d=Fi(d)))return c;var C=ho(c),x=vT(C,ho(d))+1;return vs(C,0,x).join("")}function Hae(c,d,g){if(c=Rt(c),c&&(g||d===n))return c.replace(uw,"");if(!c||!(d=Fi(d)))return c;var C=ho(c),x=mT(C,ho(d));return vs(C,x).join("")}function Vae(c,d){var g=_,C=A;if($t(d)){var x="separator"in d?d.separator:x;g="length"in d?ot(d.length):g,C="omission"in d?Fi(d.omission):C}c=Rt(c);var D=c.length;if(yl(c)){var O=ho(c);D=O.length}if(g>=D)return c;var H=g-Sl(C);if(H<1)return C;var $=O?vs(O,0,H).join(""):c.slice(0,H);if(x===n)return $+C;if(O&&(H+=$.length-H),db(x)){if(c.slice(H).search(x)){var ie,oe=$;for(x.global||(x=Ew(x.source,Rt(ND.exec(x))+"g")),x.lastIndex=0;ie=x.exec(oe);)var le=ie.index;$=$.slice(0,le===n?H:le)}}else if(c.indexOf(Fi(x),H)!=H){var Ie=$.lastIndexOf(x);Ie>-1&&($=$.slice(0,Ie))}return $+C}function Wae(c){return c=Rt(c),c&&ai.test(c)?c.replace(uo,vne):c}var zae=Tl(function(c,d,g){return c+(g?" ":"")+d.toUpperCase()}),pb=aA("toUpperCase");function rI(c,d,g){return c=Rt(c),d=g?n:d,d===n?hne(c)?bne(c):ine(c):c.match(d)||[]}var sI=lt(function(c,d){try{return Si(c,n,d)}catch(g){return ub(g)?g:new et(g)}}),Uae=br(function(c,d){return zi(d,function(g){g=Vo(g),Cr(c,g,lb(c[g],c))}),c});function $ae(c){var d=c==null?0:c.length,g=$e();return c=d?Wt(c,function(C){if(typeof C[1]!="function")throw new Ui(s);return[g(C[0]),C[1]]}):[],lt(function(C){for(var x=-1;++x<d;){var D=c[x];if(Si(D[0],this,C))return Si(D[1],this,C)}})}function jae(c){return vie(ji(c,f))}function gb(c){return function(){return c}}function Kae(c,d){return c==null||c!==c?d:c}var qae=cA(),Qae=cA(!0);function di(c){return c}function mb(c){return GT(typeof c=="function"?c:ji(c,f))}function Yae(c){return VT(ji(c,f))}function Zae(c,d){return WT(c,ji(d,f))}var Xae=lt(function(c,d){return function(g){return Mu(g,c,d)}}),Jae=lt(function(c,d){return function(g){return Mu(c,g,d)}});function vb(c,d,g){var C=Cn(d),x=tp(d,C);g==null&&!($t(d)&&(x.length||!C.length))&&(g=d,d=c,c=this,x=tp(d,Cn(d)));var D=!($t(g)&&"chain"in g)||!!g.chain,O=Sr(c);return zi(x,function(H){var $=d[H];c[H]=$,O&&(c.prototype[H]=function(){var ie=this.__chain__;if(D||ie){var oe=c(this.__wrapped__),le=oe.__actions__=li(this.__actions__);return le.push({func:$,args:arguments,thisArg:c}),oe.__chain__=ie,oe}return $.apply(c,ds([this.value()],arguments))})}),c}function ele(){return En._===this&&(En._=Pne),this}function Cb(){}function tle(c){return c=ot(c),lt(function(d){return zT(d,c)})}var nle=Qw(Wt),ile=Qw(uT),ole=Qw(bw);function aI(c){return nb(c)?yw(Vo(c)):Lie(c)}function rle(c){return function(d){return c==null?n:va(c,d)}}var sle=dA(),ale=dA(!0);function wb(){return[]}function bb(){return!1}function lle(){return{}}function cle(){return""}function ule(){return!0}function dle(c,d){if(c=ot(c),c<1||c>fe)return[];var g=N,C=_n(c,N);d=$e(d),c-=N;for(var x=Fw(C,d);++g<c;)d(g);return x}function hle(c){return nt(c)?Wt(c,Vo):xi(c)?[c]:li(EA(Rt(c)))}function fle(c){var d=++Fne;return Rt(c)+d}var ple=ap(function(c,d){return c+d},0),gle=Yw("ceil"),mle=ap(function(c,d){return c/d},1),vle=Yw("floor");function Cle(c){return c&&c.length?ep(c,di,Ow):n}function wle(c,d){return c&&c.length?ep(c,$e(d,2),Ow):n}function ble(c){return fT(c,di)}function yle(c,d){return fT(c,$e(d,2))}function Sle(c){return c&&c.length?ep(c,di,Gw):n}function Rle(c,d){return c&&c.length?ep(c,$e(d,2),Gw):n}var Fle=ap(function(c,d){return c*d},1),xle=Yw("round"),Ple=ap(function(c,d){return c-d},0);function Ele(c){return c&&c.length?Rw(c,di):0}function Dle(c,d){return c&&c.length?Rw(c,$e(d,2)):0}return E.after=Yre,E.ary=BA,E.assign=Nse,E.assignIn=XA,E.assignInWith=bp,E.assignWith=Bse,E.at=Gse,E.before=GA,E.bind=lb,E.bindAll=Uae,E.bindKey=HA,E.castArray=lse,E.chain=OA,E.chunk=voe,E.compact=Coe,E.concat=woe,E.cond=$ae,E.conforms=jae,E.constant=gb,E.countBy=Ere,E.create=Hse,E.curry=VA,E.curryRight=WA,E.debounce=zA,E.defaults=Vse,E.defaultsDeep=Wse,E.defer=Zre,E.delay=Xre,E.difference=boe,E.differenceBy=yoe,E.differenceWith=Soe,E.drop=Roe,E.dropRight=Foe,E.dropRightWhile=xoe,E.dropWhile=Poe,E.fill=Eoe,E.filter=Tre,E.flatMap=Mre,E.flatMapDeep=kre,E.flatMapDepth=Lre,E.flatten=IA,E.flattenDeep=Doe,E.flattenDepth=Toe,E.flip=Jre,E.flow=qae,E.flowRight=Qae,E.fromPairs=Aoe,E.functions=Qse,E.functionsIn=Yse,E.groupBy=Ore,E.initial=Moe,E.intersection=koe,E.intersectionBy=Loe,E.intersectionWith=Ooe,E.invert=Xse,E.invertBy=Jse,E.invokeMap=Nre,E.iteratee=mb,E.keyBy=Bre,E.keys=Cn,E.keysIn=ui,E.map=pp,E.mapKeys=tae,E.mapValues=nae,E.matches=Yae,E.matchesProperty=Zae,E.memoize=mp,E.merge=iae,E.mergeWith=JA,E.method=Xae,E.methodOf=Jae,E.mixin=vb,E.negate=vp,E.nthArg=tle,E.omit=oae,E.omitBy=rae,E.once=ese,E.orderBy=Gre,E.over=nle,E.overArgs=tse,E.overEvery=ile,E.overSome=ole,E.partial=cb,E.partialRight=UA,E.partition=Hre,E.pick=sae,E.pickBy=eI,E.property=aI,E.propertyOf=rle,E.pull=Goe,E.pullAll=kA,E.pullAllBy=Hoe,E.pullAllWith=Voe,E.pullAt=Woe,E.range=sle,E.rangeRight=ale,E.rearg=nse,E.reject=zre,E.remove=zoe,E.rest=ise,E.reverse=sb,E.sampleSize=$re,E.set=lae,E.setWith=cae,E.shuffle=jre,E.slice=Uoe,E.sortBy=Qre,E.sortedUniq=Zoe,E.sortedUniqBy=Xoe,E.split=Mae,E.spread=ose,E.tail=Joe,E.take=ere,E.takeRight=tre,E.takeRightWhile=nre,E.takeWhile=ire,E.tap=Cre,E.throttle=rse,E.thru=fp,E.toArray=QA,E.toPairs=tI,E.toPairsIn=nI,E.toPath=hle,E.toPlainObject=ZA,E.transform=uae,E.unary=sse,E.union=ore,E.unionBy=rre,E.unionWith=sre,E.uniq=are,E.uniqBy=lre,E.uniqWith=cre,E.unset=dae,E.unzip=ab,E.unzipWith=LA,E.update=hae,E.updateWith=fae,E.values=Ml,E.valuesIn=pae,E.without=ure,E.words=rI,E.wrap=ase,E.xor=dre,E.xorBy=hre,E.xorWith=fre,E.zip=pre,E.zipObject=gre,E.zipObjectDeep=mre,E.zipWith=vre,E.entries=tI,E.entriesIn=nI,E.extend=XA,E.extendWith=bp,vb(E,E),E.add=ple,E.attempt=sI,E.camelCase=Cae,E.capitalize=iI,E.ceil=gle,E.clamp=gae,E.clone=cse,E.cloneDeep=dse,E.cloneDeepWith=hse,E.cloneWith=use,E.conformsTo=fse,E.deburr=oI,E.defaultTo=Kae,E.divide=mle,E.endsWith=wae,E.eq=po,E.escape=bae,E.escapeRegExp=yae,E.every=Dre,E.find=Are,E.findIndex=TA,E.findKey=zse,E.findLast=Ire,E.findLastIndex=AA,E.findLastKey=Use,E.floor=vle,E.forEach=_A,E.forEachRight=NA,E.forIn=$se,E.forInRight=jse,E.forOwn=Kse,E.forOwnRight=qse,E.get=hb,E.gt=pse,E.gte=gse,E.has=Zse,E.hasIn=fb,E.head=MA,E.identity=di,E.includes=_re,E.indexOf=Ioe,E.inRange=mae,E.invoke=eae,E.isArguments=ba,E.isArray=nt,E.isArrayBuffer=mse,E.isArrayLike=ci,E.isArrayLikeObject=Xt,E.isBoolean=vse,E.isBuffer=Cs,E.isDate=Cse,E.isElement=wse,E.isEmpty=bse,E.isEqual=yse,E.isEqualWith=Sse,E.isError=ub,E.isFinite=Rse,E.isFunction=Sr,E.isInteger=$A,E.isLength=Cp,E.isMap=jA,E.isMatch=Fse,E.isMatchWith=xse,E.isNaN=Pse,E.isNative=Ese,E.isNil=Tse,E.isNull=Dse,E.isNumber=KA,E.isObject=$t,E.isObjectLike=Qt,E.isPlainObject=Bu,E.isRegExp=db,E.isSafeInteger=Ase,E.isSet=qA,E.isString=wp,E.isSymbol=xi,E.isTypedArray=Il,E.isUndefined=Ise,E.isWeakMap=Mse,E.isWeakSet=kse,E.join=_oe,E.kebabCase=Sae,E.last=qi,E.lastIndexOf=Noe,E.lowerCase=Rae,E.lowerFirst=Fae,E.lt=Lse,E.lte=Ose,E.max=Cle,E.maxBy=wle,E.mean=ble,E.meanBy=yle,E.min=Sle,E.minBy=Rle,E.stubArray=wb,E.stubFalse=bb,E.stubObject=lle,E.stubString=cle,E.stubTrue=ule,E.multiply=Fle,E.nth=Boe,E.noConflict=ele,E.noop=Cb,E.now=gp,E.pad=xae,E.padEnd=Pae,E.padStart=Eae,E.parseInt=Dae,E.random=vae,E.reduce=Vre,E.reduceRight=Wre,E.repeat=Tae,E.replace=Aae,E.result=aae,E.round=xle,E.runInContext=z,E.sample=Ure,E.size=Kre,E.snakeCase=Iae,E.some=qre,E.sortedIndex=$oe,E.sortedIndexBy=joe,E.sortedIndexOf=Koe,E.sortedLastIndex=qoe,E.sortedLastIndexBy=Qoe,E.sortedLastIndexOf=Yoe,E.startCase=kae,E.startsWith=Lae,E.subtract=Ple,E.sum=Ele,E.sumBy=Dle,E.template=Oae,E.times=dle,E.toFinite=Rr,E.toInteger=ot,E.toLength=YA,E.toLower=_ae,E.toNumber=Qi,E.toSafeInteger=_se,E.toString=Rt,E.toUpper=Nae,E.trim=Bae,E.trimEnd=Gae,E.trimStart=Hae,E.truncate=Vae,E.unescape=Wae,E.uniqueId=fle,E.upperCase=zae,E.upperFirst=pb,E.each=_A,E.eachRight=NA,E.first=MA,vb(E,(function(){var c={};return Go(E,function(d,g){St.call(E.prototype,g)||(c[g]=d)}),c})(),{chain:!1}),E.VERSION=i,zi(["bind","bindKey","curry","curryRight","partial","partialRight"],function(c){E[c].placeholder=E}),zi(["drop","take"],function(c,d){dt.prototype[c]=function(g){g=g===n?1:ln(ot(g),0);var C=this.__filtered__&&!d?new dt(this):this.clone();return C.__filtered__?C.__takeCount__=_n(g,C.__takeCount__):C.__views__.push({size:_n(g,N),type:c+(C.__dir__<0?"Right":"")}),C},dt.prototype[c+"Right"]=function(g){return this.reverse()[c](g).reverse()}}),zi(["filter","map","takeWhile"],function(c,d){var g=d+1,C=g==K||g==Re;dt.prototype[c]=function(x){var D=this.clone();return D.__iteratees__.push({iteratee:$e(x,3),type:g}),D.__filtered__=D.__filtered__||C,D}}),zi(["head","last"],function(c,d){var g="take"+(d?"Right":"");dt.prototype[c]=function(){return this[g](1).value()[0]}}),zi(["initial","tail"],function(c,d){var g="drop"+(d?"":"Right");dt.prototype[c]=function(){return this.__filtered__?new dt(this):this[g](1)}}),dt.prototype.compact=function(){return this.filter(di)},dt.prototype.find=function(c){return this.filter(c).head()},dt.prototype.findLast=function(c){return this.reverse().find(c)},dt.prototype.invokeMap=lt(function(c,d){return typeof c=="function"?new dt(this):this.map(function(g){return Mu(g,c,d)})}),dt.prototype.reject=function(c){return this.filter(vp($e(c)))},dt.prototype.slice=function(c,d){c=ot(c);var g=this;return g.__filtered__&&(c>0||d<0)?new dt(g):(c<0?g=g.takeRight(-c):c&&(g=g.drop(c)),d!==n&&(d=ot(d),g=d<0?g.dropRight(-d):g.take(d-c)),g)},dt.prototype.takeRightWhile=function(c){return this.reverse().takeWhile(c).reverse()},dt.prototype.toArray=function(){return this.take(N)},Go(dt.prototype,function(c,d){var g=/^(?:filter|find|map|reject)|While$/.test(d),C=/^(?:head|last)$/.test(d),x=E[C?"take"+(d=="last"?"Right":""):d],D=C||/^find/.test(d);x&&(E.prototype[d]=function(){var O=this.__wrapped__,H=C?[1]:arguments,$=O instanceof dt,ie=H[0],oe=$||nt(O),le=function(ct){var ht=x.apply(E,ds([ct],H));return C&&Ie?ht[0]:ht};oe&&g&&typeof ie=="function"&&ie.length!=1&&($=oe=!1);var Ie=this.__chain__,Ne=!!this.__actions__.length,qe=D&&!Ie,at=$&&!Ne;if(!D&&oe){O=at?O:new dt(this);var Qe=c.apply(O,H);return Qe.__actions__.push({func:fp,args:[le],thisArg:n}),new $i(Qe,Ie)}return qe&&at?c.apply(this,H):(Qe=this.thru(le),qe?C?Qe.value()[0]:Qe.value():Qe)})}),zi(["pop","push","shift","sort","splice","unshift"],function(c){var d=Gf[c],g=/^(?:push|sort|unshift)$/.test(c)?"tap":"thru",C=/^(?:pop|shift)$/.test(c);E.prototype[c]=function(){var x=arguments;if(C&&!this.__chain__){var D=this.value();return d.apply(nt(D)?D:[],x)}return this[g](function(O){return d.apply(nt(O)?O:[],x)})}}),Go(dt.prototype,function(c,d){var g=E[d];if(g){var C=g.name+"";St.call(Pl,C)||(Pl[C]=[]),Pl[C].push({name:d,func:g})}}),Pl[sp(n,y).name]=[{name:"wrapper",func:n}],dt.prototype.clone=Wne,dt.prototype.reverse=zne,dt.prototype.value=Une,E.prototype.at=wre,E.prototype.chain=bre,E.prototype.commit=yre,E.prototype.next=Sre,E.prototype.plant=Fre,E.prototype.reverse=xre,E.prototype.toJSON=E.prototype.valueOf=E.prototype.value=Pre,E.prototype.first=E.prototype.head,xu&&(E.prototype[xu]=Rre),E}),Rl=yne();ha?((ha.exports=Rl)._=Rl,mw._=Rl):En._=Rl}).call(pY)})(wu,wu.exports)),wu.exports}var mY=gY();const Pe=oD(mY),Gt={conjunction:0,query:[]},XC={sources:Gt,contributor:Gt,employer:Gt,employeeStatus:Gt,occupation:Gt,address:Gt,state:Gt,zipCode:Gt,date:Gt,dateDetected:Gt,amount:Gt,recipient:Gt,status:Gt,reconciliationStatus:Gt,preclearance:Gt,approvalDate:Gt,approvalAmount:Gt,amended:Gt,lastUpdated:Gt,lastUpdatedBy:Gt,notes:Gt,tags:Gt,groups:Gt},vY={"contribution-search":Pe.cloneDeep(XC),"detected-contributions":Pe.cloneDeep(XC)},aD=sa({name:"ContributionSearch",initialState:vY,reducers:{resetSearchBody:(e,t)=>({...e,[t.payload.page]:{...Pe.cloneDeep(XC)}}),resetSearchBodyFilterGroup:(e,t)=>({...e,[t.payload.page]:{...e[t.payload.page],[t.payload.filterName]:Pe.cloneDeep(Gt)}}),pruneSearchBodyFilterGroups:(e,t)=>({...e,[t.payload.page]:Pe.entries(e[t.payload.page]).reduce((n,[i,o])=>{const r=o.query.filter(a=>Pe.isString(a.value)?!Pe.isEmpty(a.value):!Pe.isNil(a.value)),s={conjunction:r.length<=1?0:o.conjunction,query:r};return{...n,[i]:s}},{})}),updateSearchBodyFilterGroupConjunction:(e,t)=>({...e,[t.payload.page]:{...e[t.payload.page],[t.payload.filterName]:{...e[t.payload.page][t.payload.filterName],conjunction:t.payload.conjunction}}}),addSearchBodyFilterGroupQuery:(e,t)=>{const n=[...e[t.payload.page][t.payload.filterName].query];return n.some(i=>i.id===t.payload.query.id)||n.push(t.payload.query),{...e,[t.payload.page]:{...e[t.payload.page],[t.payload.filterName]:{...e[t.payload.page][t.payload.filterName],query:n}}}},updateSearchBodyFilterGroupQueryComparator:(e,t)=>{const n=e[t.payload.page][t.payload.filterName].query.map(i=>i.id!==t.payload.id?i:{...i,comparator:t.payload.comparator});return{...e,[t.payload.page]:{...e[t.payload.page],[t.payload.filterName]:{...e[t.payload.page][t.payload.filterName],query:n}}}},updateSearchBodyFitlerGroupQueryValue:(e,t)=>{const n=e[t.payload.page][t.payload.filterName].query.map(i=>i.id!==t.payload.id?i:{...i,value:t.payload.value});return{...e,[t.payload.page]:{...e[t.payload.page],[t.payload.filterName]:{...e[t.payload.page][t.payload.filterName],query:n}}}},removeSearchBodyFilterGroupQuery:(e,t)=>({...e,[t.payload.page]:{...e[t.payload.page],[t.payload.filterName]:{...e[t.payload.page][t.payload.filterName],query:e[t.payload.page][t.payload.filterName].query.filter(n=>n.id!==t.payload.id)}}})}}),{addSearchBodyFilterGroupQuery:lD,pruneSearchBodyFilterGroups:Ole,removeSearchBodyFilterGroupQuery:_le,resetSearchBody:Nle,resetSearchBodyFilterGroup:cD,updateSearchBodyFilterGroupConjunction:uD,updateSearchBodyFilterGroupQueryComparator:Ble,updateSearchBodyFitlerGroupQueryValue:Gle}=aD.actions,CY={ContributionSearchReducer:aD.reducer},cs=(()=>{const e=[Hi.middleware];return pQ({reducer:{[Hi.reducerPath]:Hi.reducer,...CY},middleware:t=>t().concat(e)})})(),wY=()=>Fq(),dD=e=>Dq(e);function ca(e){const t=wo();let n,i;const o=()=>{i&&(t.value=e.select(i)(cs.getState()))},r=()=>{n?.reset(),n=void 0,i=void 0,t.value=void 0},s=()=>{n?.abort()},a=async l=>{const u=cs.dispatch(e.initiate(l));n=u,i=u.requestId,o();try{const h=await u.unwrap();return o(),h}catch(h){throw o(),h}};return{state:De(()=>t.value),data:De(()=>t.value?.data),error:De(()=>t.value?.error),isUninitialized:De(()=>t.value?.isUninitialized),isLoading:De(()=>t.value?.isLoading),isSuccess:De(()=>t.value?.isSuccess),isError:De(()=>t.value?.isError),status:De(()=>t.value?.status),originalArgs:De(()=>t.value?.originalArgs),trigger:a,abort:s,reset:r}}function bu(e,t){const n=()=>$I(t),i=wo();let o,r;const s=()=>{r?.unsubscribe(),r=void 0,o?.(),o=void 0},a=l=>{const u=e.select(l),h=()=>{i.value=u(cs.getState())};h(),o=cs.subscribe(h),r=cs.dispatch(e.initiate(l))};return un(n,l=>{s(),a(l)},{immediate:!0}),$l(()=>{s()}),{state:De(()=>i.value),data:De(()=>i.value?.data),error:De(()=>i.value?.error),currentData:De(()=>i.value?.currentData),isUninitialized:De(()=>i.value?.isUninitialized),isLoading:De(()=>i.value?.isLoading),isFetching:De(()=>i.value?.isFetching),isSuccess:De(()=>i.value?.isSuccess),isError:De(()=>i.value?.isError),status:De(()=>i.value?.status),refetch:()=>r?.refetch(),unwrap:async()=>{if(!r)throw new Error("Query has not been started yet.");return r.unwrap()}}}const hD=Hi.injectEndpoints({endpoints:e=>({getPreclearance:e.query({query:({user:t,company:n,stack:i,id:o=null})=>({url:o?`/preclearance/${o}`:"/preclearance",params:{user:t,company:n,stack:i}})}),preclearanceMatch:e.mutation({query:({id:t,body:n})=>({url:`/contributions/${t}/preclearance/match`,method:"POST",body:n})})})});function bY(e){return bu(hD.endpoints.getPreclearance,e)}function yY(){return ca(hD.endpoints.preclearanceMatch)}function JC(e){return new Intl.NumberFormat("en-US",{style:"currency",currency:"USD"}).format(e)}function SY(e){return new Date(e).toLocaleDateString("en-CA")}function RY(e){const t=new Date(e);return Number.isNaN(t.getTime())?"":`on ${ew(t)}`}function ew(e=new Date){return Number.isNaN(e.getTime())?"":e.toLocaleDateString("en-US",{month:"long",day:"numeric",year:"numeric"})}const FY={class:"preclearance-table-scroll","aria-description":"scroll container for preclearance request table"},xY={class:"preclearance-table"},PY={key:0,class:"preclearance-table-tr preclearance-table-tr-empty"},EY={class:"preclearance-table-td preclearance-table-td-select"},DY=["id","name","value","checked","onClick"],TY={class:"preclearance-table-td"},AY={class:"preclearance-table-td"},IY={class:"preclearance-table-td preclearance-table-td-amount"},MY={class:"preclearance-table-td"},kY={class:"preclearance-table-td"},LY={class:"preclearance-table-td"},OY={class:"preclearance-table-td preclearance-table-td-match"},_Y={class:"match-score-value","aria-description":"match score percentage"},NY=xt({__name:"PreclearanceRequestTable",props:ka({contributionId:{type:Number},user:{type:Number},company:{type:Number},stack:{type:String}},{modelValue:{default:null},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=e,n=Tr(e,"modelValue"),i={Approved:"preclearance-status-approved",Pending:"preclearance-status-pending",Denied:"preclearance-status-denied"},o=De(()=>({user:String(t.user),company:String(t.company),stack:t.stack,id:String(t.contributionId)})),{data:r}=bY(o),s=De(()=>`preclearance-match-${t.contributionId}`),a=De(()=>{const f=r.value;return f?(Array.isArray(f)?f:[f]).map(m=>l(m)):[]}),l=f=>({name:f.name,preclearanceId:f.id,requester:f.employee,amount:f.amount,recipient:f.recipient,requestDate:f.approvalDate,status:f.status,match:f.match}),u=f=>f>=90?"match-score-high":f>=75?"match-score-medium":"match-score-low",h=(f,p)=>{if(n.value?.preclearanceId===p.preclearanceId){f.preventDefault(),n.value=null;return}n.value={preclearanceId:p.preclearanceId,label:p.name}};return(f,p)=>(ce(),xe("div",FY,[W("table",xY,[p[2]||(p[2]=W("thead",null,[W("tr",null,[W("th",{class:"preclearance-table-th preclearance-table-th-select",scope:"col"},"Select"),W("th",{class:"preclearance-table-th",scope:"col"},"Request ID"),W("th",{class:"preclearance-table-th",scope:"col"},"Requester"),W("th",{class:"preclearance-table-th",scope:"col"},"Amount"),W("th",{class:"preclearance-table-th",scope:"col"},"Recipient"),W("th",{class:"preclearance-table-th",scope:"col"},"Request Date"),W("th",{class:"preclearance-table-th",scope:"col"},"Status"),W("th",{class:"preclearance-table-th preclearance-table-th-match",scope:"col"},"Match Score")])],-1)),W("tbody",null,[a.value.length===0?(ce(),xe("tr",PY,[...p[0]||(p[0]=[W("td",{class:"preclearance-table-td preclearance-table-empty",colspan:"8"},"No data found",-1)])])):(ce(!0),xe(pt,{key:1},ei(a.value,m=>(ce(),xe("tr",{key:m.name,class:"preclearance-table-tr"},[W("td",EY,[W("input",{id:`preclearance-radio-${m.name}`,class:Kt(["preclearance-table-radio",{"preclearance-table-radio-selected":n.value?.preclearanceId===m.preclearanceId}]),type:"radio",name:s.value,value:m.name,checked:n.value?.preclearanceId===m.preclearanceId,onClick:v=>h(v,m)},null,10,DY)]),W("td",TY,Ye(m.name),1),W("td",AY,Ye(m.requester),1),W("td",IY,Ye(fi(JC)(m.amount)),1),W("td",MY,Ye(m.recipient),1),W("td",kY,Ye(m.requestDate),1),W("td",LY,[W("span",{class:Kt(["preclearance-status",i[m.status]]),"aria-description":"preclearance request status"},Ye(m.status),3)]),W("td",OY,[W("span",{class:Kt(["match-score",u(m.match)]),"aria-description":"match score for preclearance request"},[p[1]||(p[1]=W("span",{class:"match-score-bar","aria-hidden":"true","aria-description":"match score visual indicator"},null,-1)),W("span",_Y,Ye(m.match)+"% ",1)],2)])]))),128))])])]))}}),BY=`.match-score[data-v-c4130b8b]{align-items:center;display:inline-flex;gap:.4rem}.match-score-bar[data-v-c4130b8b]{align-self:center;border-radius:.125rem;flex-shrink:0;height:1em;width:.125rem}.match-score-high[data-v-c4130b8b]{color:var(--color-primary-green)}.match-score-high .match-score-bar[data-v-c4130b8b]{background:var(--color-primary-green)}.match-score-low[data-v-c4130b8b]{color:var(--color-red-700)}.match-score-low .match-score-bar[data-v-c4130b8b]{background:var(--color-red-700)}.match-score-medium[data-v-c4130b8b]{color:var(--color-yellow-700)}.match-score-medium .match-score-bar[data-v-c4130b8b]{background:var(--color-yellow-700)}.preclearance-status[data-v-c4130b8b]{font-weight:600;white-space:nowrap}.preclearance-status-approved[data-v-c4130b8b]{color:var(--color-primary-green)}.preclearance-status-denied[data-v-c4130b8b]{color:var(--color-red-700)}.preclearance-status-pending[data-v-c4130b8b]{color:var(--color-yellow-700)}.preclearance-table[data-v-c4130b8b]{border-collapse:collapse;font-size:.875rem;min-width:58rem;width:100%}.preclearance-table tbody .preclearance-table-tr[data-v-c4130b8b]:nth-child(2n){background:var(--color-green-50)}.preclearance-table-empty[data-v-c4130b8b]{color:var(--color-grey-600);padding:1.5rem 1rem;text-align:center}.preclearance-table-radio[data-v-c4130b8b]{-webkit-appearance:none;appearance:none;background:var(--color-white);border:.125rem solid var(--color-grey-300);border-radius:.25rem;box-sizing:border-box;cursor:pointer;flex-shrink:0;height:1.125rem;margin:0;vertical-align:middle;width:1.125rem}.preclearance-table-radio[data-v-c4130b8b]:focus-visible{outline:.125rem solid var(--color-primary-green);outline-offset:.125rem}.preclearance-table-radio-selected[data-v-c4130b8b]{background-color:var(--color-primary-green);background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M3.5 8.5 6.5 11.5 12.5 4.5' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");background-position:center;background-repeat:no-repeat;background-size:.875rem;border-color:var(--color-primary-green)}.preclearance-table-scroll[data-v-c4130b8b]{-webkit-overflow-scrolling:touch;overflow-x:auto}.preclearance-table-td[data-v-c4130b8b]{border-bottom:.0625rem solid var(--color-primary-grey);color:var(--color-primary-black);padding:.75rem 1rem;vertical-align:middle}.preclearance-table-td-amount[data-v-c4130b8b]{font-weight:700;white-space:nowrap}.preclearance-table-td-match[data-v-c4130b8b]{font-size:.75rem;line-height:1;white-space:nowrap}.preclearance-table-td-select[data-v-c4130b8b]{text-align:center;width:3.25rem}.preclearance-table-th[data-v-c4130b8b]{background:var(--color-secondary-green);border-bottom:.0625rem solid var(--color-primary-black);font-weight:600;padding:.5rem 1rem;text-align:left;white-space:nowrap}.preclearance-table-th-match[data-v-c4130b8b]{min-width:6.5rem;text-align:left}.preclearance-table-th-select[data-v-c4130b8b]{text-align:center;width:3.25rem}.preclearance-table-tr[data-v-c4130b8b]{background:var(--color-white)}.preclearance-table-tr:last-child .preclearance-table-td[data-v-c4130b8b]{border-bottom:none}`,zt=(e,t)=>{const n=e.__vccOpts||e;for(const[i,o]of t)n[i]=o;return n},GY=zt(NY,[["styles",[BY]],["__scopeId","data-v-c4130b8b"]]),HY=["disabled"],Ef=zt(xt({__name:"Button",props:{disabled:{type:Boolean,default:!1},label:{type:String},variant:{default:"primary",type:String}},emits:["click"],setup(e,{emit:t}){const n=t,i=o=>{n("click",o)};return(o,r)=>(ce(),xe("button",{type:"button",class:Kt(["ui-button",{"ui-button-primary":e.variant==="primary","ui-button-secondary":e.variant==="secondary","ui-button-tertiary":e.variant==="tertiary"}]),disabled:e.disabled,onClick:i},Ye(e.label),11,HY))}}),[["styles",[".ui-button[data-v-7747e173]{align-items:center;border-radius:.375rem;box-sizing:border-box;cursor:pointer;display:inline-flex;font-family:inherit;font-size:.875rem;justify-content:center;line-height:1.25;min-height:2.25rem;padding:.5rem 1.25rem;transition:background-color .15s ease,filter .15s ease,border-color .15s ease,color .15s ease}.ui-button[data-v-7747e173]:disabled{cursor:not-allowed;filter:none}.ui-button-primary[data-v-7747e173]{background:var(--color-primary-green);border:1px solid transparent;color:var(--color-white);font-weight:600}.ui-button-primary[data-v-7747e173]:disabled{opacity:.5}.ui-button-primary[data-v-7747e173]:not(:disabled):active{filter:brightness(.88)}.ui-button-primary[data-v-7747e173]:not(:disabled):hover{filter:brightness(.95)}.ui-button-secondary[data-v-7747e173]{background:var(--color-white);border:1px solid var(--color-primary-green);color:var(--color-primary-green)}.ui-button-secondary[data-v-7747e173]:disabled{background:var(--color-grey-300);border-color:var(--color-grey-300);color:var(--color-white)}.ui-button-secondary[data-v-7747e173]:not(:disabled):active{filter:brightness(.97)}.ui-button-secondary[data-v-7747e173]:not(:disabled):hover{background:var(--color-green-50)}.ui-button-tertiary[data-v-7747e173]{background:var(--color-white);border:1px solid var(--color-grey-300);color:var(--color-primary-black)}.ui-button-tertiary[data-v-7747e173]:disabled{background:var(--color-white);border-color:var(--color-grey-300);color:var(--color-grey-600)}.ui-button-tertiary[data-v-7747e173]:not(:disabled):active{filter:brightness(.97)}.ui-button-tertiary[data-v-7747e173]:not(:disabled):hover{background:var(--color-grey-50)}"]],["__scopeId","data-v-7747e173"]]),VY={class:"card-base-body","aria-description":"card body"},WY=zt(xt({__name:"CardBase",props:{borderColor:{default:"var(--color-primary-black)",type:String},radius:{default:"0.625rem",type:String}},setup(e){return(t,n)=>(ce(),xe("section",{class:"card-base",style:Di({borderColor:e.borderColor,borderRadius:e.radius})},[t.$slots.header?(ce(),xe("header",{key:0,class:"card-base-header",style:Di({borderColor:e.borderColor})},[Ma(t.$slots,"header",{},void 0)],4)):_t("",!0),W("div",VY,[Ma(t.$slots,"default",{},void 0)])],4))}}),[["styles",[".card-base[data-v-1d4389f8]{background:var(--color-white);border:.0625rem solid;box-sizing:border-box;overflow:hidden}.card-base-body[data-v-1d4389f8]{padding:2rem}.card-base-header[data-v-1d4389f8]{border-bottom:.0625rem solid;padding:1.5rem 2rem}"]],["__scopeId","data-v-1d4389f8"]]),zY=Hi.injectEndpoints({endpoints:e=>({getStatuses:e.query({query:({user:t,company:n,stack:i,id:o=null})=>({url:o?`/statuses/${o}`:"/statuses",params:{user:t,company:n,stack:i}})})})});function tw(e){return bu(zY.endpoints.getStatuses,e)}const UY=["aria-expanded"],$Y=["aria-description"],jY={class:"status-select-panel",role:"listbox","aria-description":"Available match status options"},KY=["aria-selected","onClick"],qY=["aria-description"],QY=["aria-description"],YY=zt(xt({__name:"ContributionStatusSelect",props:{modelValue:{type:Object},user:{type:Number},company:{type:Number},stack:{type:String}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,i=t,{data:o}=tw(De(()=>({user:n.user,company:n.company,stack:n.stack}))),r=De(()=>{const h=o.value;return Array.isArray(h)?h:[]}),s=Ce(!1),a=()=>{s.value=!s.value},l=h=>{i("update:modelValue",h),s.value=!1},u=()=>{s.value=!1};return(h,f)=>(ce(),xe(pt,null,[s.value?(ce(),xe("div",{key:0,class:"status-select-backdrop","aria-hidden":"true","aria-description":"Closes the status menu when clicked",onClick:u})):_t("",!0),W("div",{class:Kt(["status-select",{"status-select-open":s.value}]),"aria-description":"Contribution match status selector"},[W("button",{type:"button",class:"status-select-trigger","aria-expanded":s.value,onClick:Et(a,["stop"])},[W("span",{class:"status-chip","aria-description":`Current match status: ${e.modelValue.name}`},Ye(e.modelValue.name),9,$Y),W("span",{class:Kt(["status-select-chevron",{"status-select-chevron-open":s.value}]),"aria-hidden":"true","aria-description":"Dropdown open or closed indicator"},null,2)],8,UY),cn(W("div",jY,[(ce(!0),xe(pt,null,ei(r.value,p=>(ce(),xe("button",{key:p.id,type:"button",class:Kt(["status-option",{"status-option-active":p.id===e.modelValue.id}]),role:"option","aria-selected":p.id===e.modelValue.id,onClick:Et(m=>l(p),["stop"])},[W("span",{class:Kt(["status-option-radio",{"status-option-radio-selected":p.id===e.modelValue.id}]),"aria-description":`Selected-state marker for ${p.name}`},null,10,qY),W("span",{class:"status-option-label","aria-description":`Match status option: ${p.name}`},Ye(p.name),9,QY)],10,KY))),128))],512),[[ng,s.value]])],2)],64))}}),[["styles",[".status-chip[data-v-6c213610]{align-items:center;background:var(--color-secondary-green);border-radius:62.4375rem;color:var(--color-primary-black);display:inline-flex;font-size:.75rem;font-weight:600;line-height:1.2;padding:.25rem .65rem}.status-option[data-v-6c213610]{align-items:center;background:transparent;border:none;cursor:pointer;display:flex;font:inherit;font-size:.875rem;gap:.6rem;padding:.5rem .75rem;text-align:left;width:100%}.status-option[data-v-6c213610]:hover{background:var(--color-secondary-grey)}.status-option-active .status-option-label[data-v-6c213610]{color:var(--color-primary-green);font-weight:600}.status-option-label[data-v-6c213610]{color:var(--color-primary-black)}.status-option-radio[data-v-6c213610]{border:.125rem solid var(--color-grey-300);border-radius:50%;flex-shrink:0;height:1rem;width:1rem}.status-option-radio-selected[data-v-6c213610]{background:radial-gradient(circle,var(--color-primary-green) 0 42%,transparent 43%);border-color:var(--color-primary-green);box-shadow:inset 0 0 0 3px var(--color-white)}.status-select[data-v-6c213610]{max-width:100%;position:relative;width:100%}.status-select-backdrop[data-v-6c213610]{background:transparent;inset:0;position:fixed;z-index:10000}.status-select-chevron[data-v-6c213610]{border-left:.3125rem solid transparent;border-right:.3125rem solid transparent;border-top:.375rem solid var(--color-grey-600);flex-shrink:0;height:0;transition:transform .15s ease;width:0}.status-select-chevron-open[data-v-6c213610]{transform:rotate(180deg)}.status-select-open[data-v-6c213610]{z-index:10001}.status-select-panel[data-v-6c213610]{background:var(--color-white);border:.0625rem solid var(--color-primary-grey);border-radius:.375rem;box-shadow:0 .25rem .75rem #00000014;left:0;margin-top:.25rem;padding:.35rem 0;position:absolute;right:0;z-index:100}.status-select-trigger[data-v-6c213610]{align-items:center;background:var(--color-white);border:.0625rem solid var(--color-grey-300);border-radius:.25rem;cursor:pointer;display:flex;font:inherit;gap:.5rem;justify-content:space-between;padding:.5rem .75rem;text-align:left;width:100%}"]],["__scopeId","data-v-6c213610"]]),ZY=["aria-description"],XY={class:"detail-item-label","aria-description":"Field label"},JY={class:"detail-item-value","aria-description":"Field value"},eZ=zt(xt({__name:"DetailItem",props:{fullWidth:{type:Boolean,default:!1},label:{type:String},value:{default:"",type:[String,null]}},setup(e){const t=e,n=o=>o==null||o===""?"—":o,i=De(()=>`Detail field: ${t.label}`);return(o,r)=>(ce(),xe("div",{class:Kt(["detail-item",{"detail-item-full":e.fullWidth}]),"aria-description":i.value},[W("div",XY,Ye(e.label),1),W("div",JY,[Ma(o.$slots,"value",{},()=>[Hn(Ye(n(e.value)),1)])])],10,ZY))}}),[["styles",[".detail-item[data-v-0f6897bd]{display:flex;flex-direction:column;gap:.5rem;min-width:0}.detail-item-full[data-v-0f6897bd]{grid-column:1 / -1}.detail-item-label[data-v-0f6897bd]{color:var(--color-grey-600);font-size:.75rem;font-weight:600;line-height:1.3}.detail-item-value[data-v-0f6897bd]{font-size:.875rem;line-height:1.4;word-break:break-word}"]],["__scopeId","data-v-0f6897bd"]]),tZ=["aria-labelledby"],nZ={class:"dialog-header"},iZ=["id"],oZ=["aria-label"],rZ=["aria-labelledby"],sZ={key:0,class:"dialog-footer"},aZ=zt(xt({__name:"Dialog",props:{bodyPadding:{type:Boolean,default:!0},cancelButtonLabel:{default:"Cancel",type:String},closeAriaLabel:{default:"Close dialog",type:String},contentWidth:{default:"min(36rem, 100%)",type:String},primaryButtonDisabled:{type:Boolean,default:!1},primaryButtonLabel:{default:"Submit",type:String},showCloseButton:{type:Boolean,default:!0},showFooter:{type:Boolean,default:!0},title:{type:String},titleId:{default:void 0,type:String}},emits:["cancel-click","close","primary-click"],setup(e,{expose:t,emit:n}){const i=e,o=n,r=Ce(null),s=CM(),a=De(()=>i.titleId??`dialog-title-${s}`),l=De(()=>i.showFooter&&!!(i.cancelButtonLabel||i.primaryButtonLabel)),u=()=>{const w=r.value;w&&(typeof w.showModal=="function"?w.showModal():w.setAttribute("open",""))},h=()=>{const w=r.value;w&&(typeof w.close=="function"?w.close():w.removeAttribute("open"),o("close"))},f=w=>{w.target===r.value&&h()},p=()=>{h()},m=()=>{h(),o("cancel-click")},v=()=>{o("primary-click")};return t({open:u,close:h,dialogRef:r}),(w,b)=>(ce(),xe("dialog",{ref_key:"dialogRef",ref:r,class:"dialog","aria-labelledby":a.value,style:Di({width:e.contentWidth}),onClick:f},[W("section",{class:"dialog-panel",onClick:b[0]||(b[0]=Et(()=>{},["stop"]))},[W("header",nZ,[W("h2",{id:a.value,class:"dialog-title"},Ye(e.title),9,iZ),e.showCloseButton?(ce(),xe("button",{key:0,type:"button",class:"dialog-close","aria-label":e.closeAriaLabel,onClick:p}," × ",8,oZ)):_t("",!0)]),W("section",{class:Kt(["dialog-body",{"dialog-body-flush":!e.bodyPadding}]),"aria-labelledby":a.value},[Ma(w.$slots,"default",{},void 0)],10,rZ),l.value?(ce(),xe("footer",sZ,[e.cancelButtonLabel?(ce(),en(Ef,{key:0,label:e.cancelButtonLabel,variant:"tertiary",onClick:m},null,8,["label"])):_t("",!0),e.primaryButtonLabel?(ce(),en(Ef,{key:1,disabled:e.primaryButtonDisabled,label:e.primaryButtonLabel,variant:"primary",onClick:v},null,8,["disabled","label"])):_t("",!0)])):_t("",!0)])],12,tZ))}}),[["styles",[".dialog[data-v-e576a647]{border:.0625rem solid var(--color-grey-300);border-radius:.5rem;box-shadow:0 8px 24px #0000001f;font-family:inherit;margin:auto;max-width:calc(100vw - 2rem);padding:0}.dialog[data-v-e576a647]::backdrop{background:#00000059}.dialog-body[data-v-e576a647]{-webkit-overflow-scrolling:touch;flex:1;max-height:75dvh;min-height:0;overflow-y:auto;padding:1rem 1.5rem 1.25rem}.dialog-body.dialog-body-flush[data-v-e576a647]{padding:0}.dialog-close[data-v-e576a647]{align-items:center;background:transparent;border:none;border-radius:.25rem;cursor:pointer;display:inline-flex;font-size:1.5rem;font-weight:600;height:2rem;justify-content:center;line-height:1;padding:0;width:2rem}.dialog-close[data-v-e576a647]:hover{background:var(--color-primary-grey);color:var(--color-primary-black)}.dialog-footer[data-v-e576a647]{align-items:center;border-top:.0625rem solid var(--color-grey-300);display:flex;flex-shrink:0;flex-wrap:wrap;gap:.75rem;justify-content:flex-end;padding:1rem 1.5rem 1.25rem}.dialog-header[data-v-e576a647]{align-items:center;display:flex;flex-shrink:0;gap:.75rem;justify-content:space-between;padding:1.125rem 1.5rem}.dialog-panel[data-v-e576a647]{display:flex;flex-direction:column;max-height:calc(100vh - 3rem);padding:0}.dialog-title[data-v-e576a647]{font-size:1.125rem;font-weight:600;line-height:1.3;margin:0}"]],["__scopeId","data-v-e576a647"]]),lZ={class:"reference-line"},cZ={class:"detail-grid","aria-description":"contribution detail fields grid"},uZ={key:0,class:"preclearance-row","aria-description":"matched preclearance request link and remove control"},dZ=["id","href"],hZ=zt(xt({__name:"ContributionDetailsCard",props:{contribution:{type:Object},user:{type:Number},company:{type:Number},stack:{type:String}},emits:["clear-preclearance","match-preclearance","update-status"],setup(e,{emit:t}){const n=e,i=t,{data:o}=tw(De(()=>({user:n.user,company:n.company,stack:n.stack}))),r=De(()=>{const m=o.value,w=(Array.isArray(m)?m:[]).find(b=>b.name===n.contribution.status);return w||{id:0,name:n.contribution.status,organization:0,created:"",modified:""}}),s=[{kind:"value",key:"contributor",label:"Contributor"},{kind:"value",key:"employer",label:"Employer"},{kind:"value",key:"occupation",label:"Occupation"},{kind:"value",key:"address",label:"Address",fullWidth:!0},{kind:"value",key:"state",label:"State"},{kind:"value",key:"zipCode",label:"Zip Code"},{kind:"value",key:"date",label:"Date"},{kind:"value",key:"dateDetected",label:"Date Detected"},{kind:"value",key:"amount",label:"Amount"},{kind:"value",key:"approvedAmount",label:"Approved Amount"},{kind:"value",key:"recipient",label:"Recipient"},{kind:"value",key:"source",label:"Source"},{kind:"status",label:"Status"},{kind:"value",key:"employeeStatus",label:"Employee Status"},{kind:"value",key:"reconciliationStatus",label:"Reconciliation Status"},{kind:"preclearance",label:"Preclearance Request"},{kind:"value",key:"amended",label:"Amended"},{kind:"value",key:"approvalDate",label:"Approval Date"},{kind:"value",key:"lastUpdated",label:"Last Updated"},{kind:"value",key:"lastUpdatedBy",label:"Last Updated By"}],a=m=>m.kind==="value"?m.key:m.kind,l=Ce(null),u=Ce(null),h=()=>{u.value=null,l.value?.open()},f=()=>{const m=u.value;m&&(i("match-preclearance",{preclearanceId:m.preclearanceId,preclearanceLabel:m.label}),l.value?.close())},p=()=>{i("clear-preclearance")};return(m,v)=>(ce(),en(WY,null,{header:Jn(()=>[W("p",lZ,"Reference: "+Ye(e.contribution.reference),1)]),default:Jn(()=>[W("div",cZ,[(ce(),xe(pt,null,ei(s,w=>rt(eZ,{key:a(w),"full-width":w.kind==="value"?w.fullWidth:!1,label:w.label,value:w.kind==="value"?e.contribution[w.key]:""},kM({_:2},[w.kind==="status"?{name:"value",fn:Jn(()=>[rt(YY,{"model-value":r.value,user:e.user,company:e.company,stack:e.stack,"onUpdate:modelValue":v[0]||(v[0]=b=>i("update-status",b))},null,8,["model-value","user","company","stack"])]),key:"0"}:w.kind==="preclearance"?{name:"value",fn:Jn(()=>[e.contribution.preclearanceId&&e.contribution.preclearanceLabel?(ce(),xe("div",uZ,[W("a",{id:`contribution-preclearance-link-${e.contribution.preclearanceLabel}`,class:"preclearance-link",href:`/preclearance/${e.contribution.preclearanceLabel}`},Ye(e.contribution.preclearanceLabel),9,dZ),W("button",{type:"button",class:"preclearance-clear","aria-label":"Remove preclearance link",onClick:p}," × ")])):(ce(),en(Ef,{key:1,label:"Match Preclearance",variant:"secondary",onClick:h}))]),key:"1"}:void 0]),1032,["full-width","label","value"])),64))]),rt(aZ,{"body-padding":!1,"content-width":"min(60rem, calc(100vw - 2rem))","primary-button-disabled":!u.value,"primary-button-label":"Match Selected",ref_key:"preclearanceMatchDialog",ref:l,"secondary-button-label":"Cancel",title:"Match to Preclearance Request",onPrimaryClick:f},{default:Jn(()=>[rt(GY,{"contribution-id":e.contribution.contributionId,user:e.user,company:e.company,stack:e.stack,modelValue:u.value,"onUpdate:modelValue":v[1]||(v[1]=w=>u.value=w)},null,8,["contribution-id","user","company","stack","modelValue"])]),_:1},8,["primary-button-disabled"])]),_:1}))}}),[["styles",[".detail-grid[data-v-ccc491ee]{display:grid;gap:1.25rem;grid-template-columns:1fr 1fr}.preclearance-clear[data-v-ccc491ee]{align-items:center;background:transparent;border:none;border-radius:.25rem;color:var(--color-grey-600);cursor:pointer;display:inline-flex;font-size:1rem;height:1.25rem;justify-content:center;line-height:1;padding:0;width:1.25rem}.preclearance-clear[data-v-ccc491ee]:hover{background:var(--color-primary-green);color:var(--color-white)}.preclearance-link[data-v-ccc491ee]{color:var(--color-primary-green);cursor:pointer;font-weight:500;text-decoration:underline}.preclearance-link[data-v-ccc491ee]:hover{text-decoration:none}.preclearance-row[data-v-ccc491ee]{align-items:center;display:inline-flex;flex-wrap:wrap;gap:.35rem}.reference-line[data-v-ccc491ee]{color:var(--color-grey-600);font-size:.875rem;line-height:1.4;margin:0}"]],["__scopeId","data-v-ccc491ee"]]),fZ={class:"collapsible-panel","aria-description":"Collapsible panel"},pZ=["aria-expanded"],gZ={class:"collapsible-panel-title","aria-description":"Panel title"},mZ=["aria-hidden"],vZ={class:"collapsible-panel-body-inner","aria-description":"Panel content inner wrapper"},CZ=zt(xt({__name:"CollapsiblePanel",props:{title:{type:String}},setup(e){const t=Ce(!1),n=()=>{t.value=!t.value};return(i,o)=>(ce(),xe("div",fZ,[W("button",{type:"button",class:"collapsible-panel-header","aria-expanded":t.value,onClick:n},[W("span",gZ,Ye(e.title),1),W("i",{class:Kt(["fa-solid fa-chevron-right collapsible-panel-chevron",{"collapsible-panel-chevron-open":t.value}]),"aria-hidden":"true"},null,2)],8,pZ),W("div",{class:Kt(["collapsible-panel-body",{"collapsible-panel-body-open":t.value}]),"aria-description":"Panel content","aria-hidden":!t.value},[W("div",vZ,[Ma(i.$slots,"default",{},void 0)])],10,mZ)]))}}),[["styles",[".collapsible-panel[data-v-c69206e2]{border:.0625rem solid var(--color-primary-black);border-radius:.625rem;box-sizing:border-box;overflow:hidden}.collapsible-panel-body[data-v-c69206e2]{display:grid;grid-template-rows:0fr;transition:grid-template-rows .2s ease}.collapsible-panel-body-inner[data-v-c69206e2]{min-height:0;opacity:0;overflow:hidden;padding:0;transition:opacity .2s ease}.collapsible-panel-body-open[data-v-c69206e2]{grid-template-rows:1fr}.collapsible-panel-body-open .collapsible-panel-body-inner[data-v-c69206e2]{opacity:1;padding:2rem}.collapsible-panel-chevron[data-v-c69206e2]{color:var(--color-primary-black);flex-shrink:0;font-size:.75rem;margin-left:.75rem;transition:transform .2s ease}.collapsible-panel-chevron-open[data-v-c69206e2]{transform:rotate(90deg)}.collapsible-panel-header[data-v-c69206e2]{align-items:center;background:var(--color-white);border:none;color:var(--color-primary-black);cursor:pointer;display:flex;font:inherit;justify-content:space-between;padding:1rem 1.25rem;text-align:left;width:100%}.collapsible-panel-header[data-v-c69206e2]:hover{background:var(--color-green-50)}.collapsible-panel-header[aria-expanded=true][data-v-c69206e2]{border-bottom:1px solid var(--color-primary-black)}.collapsible-panel-title[data-v-c69206e2]{font-size:.875rem;font-weight:600;line-height:1.3}"]],["__scopeId","data-v-c69206e2"]]),wZ={class:"notes-section"},bZ={class:"notes-section-actions","aria-description":"add note button container"},yZ={key:0,class:"notes-section-rule"},SZ={class:"notes-section-list",role:"list"},RZ={class:"notes-item-content","aria-description":"note text and metadata"},FZ={class:"notes-item-text"},xZ={key:0,class:"notes-item-badge"},PZ={key:1,class:"notes-item-meta"},EZ={key:1,class:"notes-item-text"},DZ=zt(xt({__name:"ContributionNotes",props:{notes:{type:Array}},emits:["add-note"],setup(e,{emit:t}){const n=t,i=Ce(""),o=()=>{const r=i.value.trim();r&&(n("add-note",r),i.value="")};return(r,s)=>(ce(),en(CZ,{title:"Contribution Notes"},{default:Jn(()=>[W("section",wZ,[s[2]||(s[2]=W("h3",{class:"notes-section-sub"},"Add New Note",-1)),cn(W("textarea",{"onUpdate:modelValue":s[0]||(s[0]=a=>i.value=a),class:"notes-section-textarea",placeholder:"Enter note details...",rows:"4"},null,512),[[Ds,i.value]]),W("div",bZ,[rt(Ef,{disabled:!i.value.trim(),label:"Add Note",onClick:o},null,8,["disabled"])]),e.notes.length?(ce(),xe("hr",yZ)):_t("",!0),W("ul",SZ,[(ce(!0),xe(pt,null,ei(e.notes,a=>(ce(),xe("li",{key:a.id,class:"notes-item"},[s[1]||(s[1]=W("span",{class:"notes-item-bullet","aria-hidden":"true","aria-description":"decorative note list marker"},null,-1)),W("div",RZ,[a.created?.trim()?(ce(),xe(pt,{key:0},[W("p",FZ,Ye(a.text),1),a.type!=="user"||a.createdBy?.trim()?(ce(),xe("p",xZ,Ye(a.type==="user"?a.createdBy?.trim()??"":"System note"),1)):_t("",!0),a.created?.trim()?(ce(),xe("p",PZ,Ye(fi(RY)(a.created)),1)):_t("",!0)],64)):(ce(),xe("p",EZ,Ye(a.text),1))])]))),128))])])]),_:1}))}}),[["styles",[".notes-item[data-v-e3a1aa12]{display:flex;gap:.75rem;margin-bottom:1rem}.notes-item[data-v-e3a1aa12]:last-child{margin-bottom:0}.notes-item-badge[data-v-e3a1aa12]{color:var(--color-primary-black);font-size:.675rem;font-weight:600;margin:.35rem 0 0}.notes-item-bullet[data-v-e3a1aa12]{background:var(--color-grey-600);border-radius:50%;flex-shrink:0;height:.625rem;margin-top:.3rem;width:.625rem}.notes-item-content[data-v-e3a1aa12]{flex:1;min-width:0}.notes-item-meta[data-v-e3a1aa12]{color:var(--color-grey-600);font-size:.625rem;margin:.35rem 0 0}.notes-item-text[data-v-e3a1aa12]{color:var(--color-grey-600);font-size:.75rem;line-height:1.45;margin:0}.notes-section-actions[data-v-e3a1aa12]{display:flex;justify-content:flex-end}.notes-section-list[data-v-e3a1aa12]{list-style:none;margin:0;padding:0}.notes-section-rule[data-v-e3a1aa12]{border:none;border-top:.0625rem solid var(--color-grey-300);margin:1.25rem 0}.notes-section-sub[data-v-e3a1aa12]{font-size:.875rem;font-weight:600;margin:0 0 1rem}.notes-section-textarea[data-v-e3a1aa12]{border:.0625rem solid var(--color-grey-300);border-radius:.25rem;box-sizing:border-box;display:block;font-family:inherit;font-size:.875rem;margin-bottom:1rem;max-width:100%;padding:.5rem .625rem;resize:vertical;width:100%}.notes-section-textarea[data-v-e3a1aa12]:focus{border-color:var(--color-grey-600);outline:none}"]],["__scopeId","data-v-e3a1aa12"]]);var Df={exports:{}},TZ=Df.exports,fD;function AZ(){return fD||(fD=1,(function(e,t){(function(n,i){i()})(TZ,function(){function n(u,h){return typeof h>"u"?h={autoBom:!1}:typeof h!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),h={autoBom:!h}),h.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(u.type)?new Blob(["\uFEFF",u],{type:u.type}):u}function i(u,h,f){var p=new XMLHttpRequest;p.open("GET",u),p.responseType="blob",p.onload=function(){l(p.response,h,f)},p.onerror=function(){console.error("could not download file")},p.send()}function o(u){var h=new XMLHttpRequest;h.open("HEAD",u,!1);try{h.send()}catch{}return 200<=h.status&&299>=h.status}function r(u){try{u.dispatchEvent(new MouseEvent("click"))}catch{var h=document.createEvent("MouseEvents");h.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),u.dispatchEvent(h)}}var s=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof Vi=="object"&&Vi.global===Vi?Vi:void 0,a=s.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),l=s.saveAs||(typeof window!="object"||window!==s?function(){}:"download"in HTMLAnchorElement.prototype&&!a?function(u,h,f){var p=s.URL||s.webkitURL,m=document.createElement("a");h=h||u.name||"download",m.download=h,m.rel="noopener",typeof u=="string"?(m.href=u,m.origin===location.origin?r(m):o(m.href)?i(u,h,f):r(m,m.target="_blank")):(m.href=p.createObjectURL(u),setTimeout(function(){p.revokeObjectURL(m.href)},4e4),setTimeout(function(){r(m)},0))}:"msSaveOrOpenBlob"in navigator?function(u,h,f){if(h=h||u.name||"download",typeof u!="string")navigator.msSaveOrOpenBlob(n(u,f),h);else if(o(u))i(u,h,f);else{var p=document.createElement("a");p.href=u,p.target="_blank",setTimeout(function(){r(p)})}}:function(u,h,f,p){if(p=p||open("","_blank"),p&&(p.document.title=p.document.body.innerText="downloading..."),typeof u=="string")return i(u,h,f);var m=u.type==="application/octet-stream",v=/constructor/i.test(s.HTMLElement)||s.safari,w=/CriOS\/[\d]+/.test(navigator.userAgent);if((w||m&&v||a)&&typeof FileReader<"u"){var b=new FileReader;b.onloadend=function(){var S=b.result;S=w?S:S.replace(/^data:[^;]*;/,"data:attachment/file;"),p?p.location.href=S:location=S,p=null},b.readAsDataURL(u)}else{var y=s.URL||s.webkitURL,R=y.createObjectURL(u);p?p.location=R:location.href=R,p=null,setTimeout(function(){y.revokeObjectURL(R)},4e4)}});s.saveAs=l.saveAs=l,e.exports=l})})(Df)),Df.exports}var IZ=AZ();const MZ=oD(IZ),kZ=Hi.injectEndpoints({endpoints:e=>({exportContributions:e.mutation({query:({user:t,company:n,stack:i,format:o,sortColumn:r=null,sortOrder:s=null,match:a=!1,body:l})=>({url:`/contributions/search/export?user=${t}&company=${n}&stack=${i}&format=${o}${r&&s?`&sortColumn=${r}&sortOrder=${s}`:""}&match=${a}`,method:"POST",body:l,responseHandler:u=>u.headers.get("Content-Type")?.includes("/json")?u.json():u.blob()}),transformResponse:(t,n)=>{const o=n?.response?.headers?.get("Content-Disposition")?.match(/filename="?([^"]+)"?/)?.[1]??`contributions_export_${new Date().toISOString().split("T")[0]}`;return t instanceof Blob&&MZ(t,o),o}})})});function LZ(){return ca(kZ.endpoints.exportContributions)}const OZ={class:"content-container","aria-description":"main content container"},_Z={class:"content-title","aria-description":"content title"},NZ={key:0,"aria-description":"export actions"},BZ=["disabled"],GZ={class:"content","aria-description":"page content"},nw=zt(xt({__name:"ContentContainer",props:{title:{type:String},user:{default:1,type:Number},company:{default:1,type:Number},stack:{default:"QA01",type:String},page:{default:"contribution-search",type:String},showExport:{type:Boolean,default:!0},disableExport:{type:Boolean,default:!1}},setup(e){const t=dD(m=>m.ContributionSearchReducer),{trigger:n,isLoading:i}=LZ(),o=e.page==="detected-contributions",r=De(()=>t.value?.[e.page]??void 0),s=Ce(null),a=Ce(null),l=Ce({}),u=Ce(!1),h=(m="xlsx")=>{!r.value||e.disableExport||(s.value?.close(),u.value=!1,n({user:e.user,company:e.company,stack:e.stack,format:m,match:o,body:r.value}))},f=async()=>{const m=s.value,v=a.value;if(!m||!v)return;const w=v?.getBoundingClientRect(),b=190,y=8,R=Math.max(y,Math.min(w.right-b,window.innerWidth-b-y)),S=Math.min(w.bottom+y,window.innerHeight-120);l.value={position:"absolute",top:`${S}px`,left:`${R}px`,margin:"0"},await Dr(),m?.showModal(),u.value=!0},p=m=>{e.disableExport||i.value||(u.value?m.target===s.value&&(s.value?.close(),u.value=!1):f())};return(m,v)=>{const w=hd("font-awesome-icon");return ce(),xe(pt,null,[W("div",OZ,[W("header",null,[W("h1",_Z,Ye(e.title),1),e.page&&e.showExport?(ce(),xe("span",NZ,[W("button",{class:"export-button",ref_key:"exportModalButton",ref:a,disabled:fi(i)||e.disableExport,onClick:Et(p,["prevent"]),"aria-description":"export button"},[...v[1]||(v[1]=[W("i",{class:"fa-solid fa-download"},null,-1)])],8,BZ)])):_t("",!0)]),W("div",GZ,[Ma(m.$slots,"content",{},void 0)])]),W("dialog",{class:"contributions-export-modal",ref_key:"exportModal",ref:s,style:Di(l.value),onClick:p},[W("button",{onClick:v[0]||(v[0]=Et(b=>h("xlsx"),["stop"]))},[rt(w,{class:"export-excel-icon",icon:["fas","file-excel"]}),v[2]||(v[2]=Hn("Export to Excel",-1))])],4)],64)}}}),[["styles",["a[data-v-93436697],button[data-v-93436697]{cursor:pointer}.content-container[data-v-93436697]{background:var(--color-white);display:flex;flex-direction:column;padding:1.25rem}.content-container header[data-v-93436697]{align-items:center;border-bottom:.0625rem solid var(--color-primary-grey);display:flex;justify-content:space-between;margin-bottom:1.25rem}.content-container header button[data-v-93436697]{background:transparent;border:none;border-radius:.25rem;color:var(--color-primary-green);font-size:xx-large;padding:.5rem;text-decoration:none}.content-container header button[data-v-93436697]:disabled{cursor:not-allowed;opacity:.5}.content-container header button[data-v-93436697]:hover{background:var(--color-green-50)}.contributions-export-modal[data-v-93436697]{border:.1rem solid var(--color-primary-grey);box-shadow:.1875rem .15625rem .15625rem var(--color-secondary-grey);opacity:0;padding:.25rem 0;transform:translateY(-.25rem);transition:opacity .2s ease,transform .2s ease,overlay .2s ease allow-discrete}.contributions-export-modal[open][data-v-93436697]{opacity:1;transform:translateY(0)}@starting-style{.contributions-export-modal[open][data-v-93436697]{opacity:0;transform:translateY(-.25rem)}}.contributions-export-modal button[data-v-93436697]{background:transparent;border:none;display:block;font-family:Poppins,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Arial,sans-serif;font-size:.875rem;padding:.5rem 1rem}.contributions-export-modal button[data-v-93436697]:hover{background:var(--color-green-50)}.contributions-export-modal button svg[data-v-93436697]{margin-right:.5rem}.contributions-export-modal button .export-excel-icon[data-v-93436697]{color:var(--color-green)}.contributions-export-modal button .export-pdf-icon[data-v-93436697]{color:var(--color-red)}[data-v-93436697]::backdrop{background:transparent}"]],["__scopeId","data-v-93436697"]]),HZ=(e,t)=>{const n=e.__vccOpts||e;for(const[i,o]of t)n[i]=o;return n},VZ=xt({name:"ClipLoader",props:{loading:{type:Boolean,default:!0},color:{type:String,default:"#5dc596"},size:{type:String,default:"35px"},radius:{type:String,default:"100%"}},setup(e){return{spinnerStyle:De(()=>({height:e.size,width:e.size,borderWidth:"2px",borderStyle:"solid",borderColor:e.color+" "+e.color+" transparent",borderRadius:e.radius,background:"transparent"}))}}}),WZ={class:"v-spinner"};function zZ(e,t,n,i,o,r){return cn((ce(),xe("div",WZ,[W("div",{class:"v-clip",style:Di(e.spinnerStyle)},null,4)],512)),[[ng,e.loading]])}const UZ=HZ(VZ,[["render",zZ],["__scopeId","data-v-8e9283de"]]),$Z={class:"loading-overlay"},jZ={key:0},KZ="#0a8f2a",iw=zt(xt({__name:"LoadingSpinner",props:{loadingText:{default:null,type:String},size:{default:null,type:Number}},setup(e){const t=Ce(`${e.size?e.size:120}px`);return(n,i)=>(ce(),xe("div",$Z,[rt(fi(UZ),{loading:!0,size:t.value,color:KZ},null,8,["size"]),e.loadingText?(ce(),xe("span",jZ,Ye(e.loadingText),1)):_t("",!0)]))}}),[["styles",[".loading-overlay[data-v-c04b44eb]{align-items:center;display:flex;flex-direction:column;gap:12px;height:100%;justify-content:center}"]],["__scopeId","data-v-c04b44eb"]]);function qZ(e){const{contribution:t,match:n}=e,i=n.preclearance,o=n.created,r=typeof o=="string"&&o.length>0?o.slice(0,10):"";return{contributionId:t.id,reference:i.name,contributor:t.contributor,employer:t.employer,occupation:t.occupation,address:t.address,state:t.state,zipCode:t.zipCode,date:t.date,dateDetected:r,amount:JC(t.amount),approvedAmount:JC(i.amount),recipient:t.recipient,source:t.source,status:n.status,employeeStatus:n.employee.status,reconciliationStatus:i.reconciliationStatus,preclearanceLabel:i.name,preclearanceId:i.id,amended:String(t.amended)==="true"?"Yes":"No",approvalDate:i.approvalDate,lastUpdated:SY(n.modified),lastUpdatedBy:n.modifiedBy}}const QZ=e=>{const t=Number(e.replace(/\/+$/,"").split("/").pop());return Number.isFinite(t)?t:void 0};function YZ(){const e=window.location.search;new URLSearchParams(e).get("id");const n=Ce(window.location.pathname),i=()=>{n.value=window.location.pathname};return Rs(()=>{i(),window.addEventListener("popstate",i)}),dd(()=>{window.removeEventListener("popstate",i)}),De(()=>QZ(n.value))}const ZZ=Hi.injectEndpoints({endpoints:e=>({getContributionDetails:e.query({query:t=>`/contributions/${t}`})})});function XZ(e){return bu(ZZ.endpoints.getContributionDetails,e)}const pD=Hi.injectEndpoints({endpoints:e=>({addContributionNote:e.mutation({query:({contribution:t,body:n})=>({url:`/contributions/${t}/notes`,method:"POST",body:n})}),addContributionNoteBulk:e.mutation({query:t=>({url:"/contributions/notes",method:"POST",body:t})})})});function JZ(){return ca(pD.endpoints.addContributionNote)}function eX(){return ca(pD.endpoints.addContributionNoteBulk)}const gD=Hi.injectEndpoints({endpoints:e=>({updateContributionStatus:e.mutation({query:({contribution:t,body:n})=>({url:`/contributions/${t}/status`,method:"POST",body:n})}),updateContributionsStatusBulk:e.mutation({query:t=>({url:"/contributions/status",method:"POST",body:t})})})});function tX(){return ca(gD.endpoints.updateContributionStatus)}function nX(){return ca(gD.endpoints.updateContributionsStatusBulk)}const iX=Hi.injectEndpoints({endpoints:e=>({getUsers:e.query({query:t=>`/users/${t}`})})});function oX(e){return bu(iX.endpoints.getUsers,e)}const rX={class:"contribution-details-stack","aria-description":"Contribution details layout stack"},sX={key:0,class:"contribution-details-loading","aria-description":"Contribution details loading state"},aX={key:1,"aria-description":"Contribution details load error"},lX=zt(xt({__name:"ContributionDetails",props:{user:{type:Number},company:{type:Number},stack:{type:String}},setup(e){const t=e,n=YZ(),{data:i}=oX(ZI(t,"user")),{data:o,isLoading:r,isError:s}=XZ(De(()=>n.value??0)),{trigger:a}=JZ(),{trigger:l}=tX(),{trigger:u}=yY(),h=De(()=>{const F=i.value;return F&&([F.firstName,F.lastName].filter(Boolean).join(" ").trim()||F.email||F.username)||"Guest"}),f=Ce({}),p=Ce([]),m=De(()=>{const F=o.value;return F?{...qZ(F),...f.value}:null}),v=De(()=>[...p.value,...o.value?.match.notes??[]]),w=De(()=>n.value!==void 0&&r.value),b=De(()=>n.value===void 0?"Invalid contribution id":s.value?"Failed to load contribution":null);un(n,()=>{f.value={},p.value=[]});const y=F=>{f.value={...f.value,...F}},R=async(F,I="user")=>{const L=n.value;if(L!==void 0)try{await a({contribution:L,body:{note:F,type:I}}),p.value=[{id:Date.now(),text:F,type:I,created:I==="user"?new Date().toISOString():"",createdBy:I==="user"?h.value:""},...p.value]}catch(V){console.error("Failed to add note",V)}},S=async F=>{const I=n.value;if(I!==void 0)try{await u({id:I,body:{preclearance:F.preclearanceId}}),y({preclearanceId:F.preclearanceId,preclearanceLabel:F.preclearanceLabel}),await R(`${h.value} matched preclearance to ${F.preclearanceLabel} on ${ew(new Date)}`,"system")}catch(L){console.error("Failed to match preclearance",L)}},P=async F=>{const I=n.value,L=m.value;if(!(I===void 0||!L||L.status===F.name))try{await l({contribution:I,body:{status:F.id}});const V=L.status;y({status:F.name}),await R(`${h.value} changed status from "${V}" to "${F.name}" on ${ew(new Date)}`,"system")}catch(V){console.error("Failed to update contribution status",V)}};return(F,I)=>(ce(),en(nw,{title:"Contribution Details","show-export":!1},{content:Jn(()=>[W("div",rX,[w.value?(ce(),xe("div",sX,[rt(iw,{size:64})])):b.value?(ce(),xe("div",aX,Ye(b.value),1)):(ce(),xe(pt,{key:2},[m.value?(ce(),en(hZ,{key:0,contribution:m.value,user:e.user,company:e.company,stack:e.stack,onClearPreclearance:I[0]||(I[0]=L=>y({preclearanceId:null,preclearanceLabel:""})),onMatchPreclearance:S,onUpdateStatus:P},null,8,["contribution","user","company","stack"])):_t("",!0),rt(DZ,{notes:v.value,onAddNote:R},null,8,["notes"])],64))])]),_:1}))}}),[["styles",[".contribution-details-loading[data-v-b5da9366]{min-height:12rem}.contribution-details-stack[data-v-b5da9366]{display:flex;flex-direction:column;gap:1rem}"]],["__scopeId","data-v-b5da9366"]]),cX={class:"body"},uX=xt({__name:"ContributionDetails.ce",props:{user:{type:Number}},setup(e){return(t,n)=>(ce(),xe("div",cX,[rt(lX,{user:e.user},null,8,["user"])]))}}),ow=':root,:host{--color-black: #000000;--color-white: #ffffff;--color-green: #008000;--color-red: #ff0000;--color-primary-green: #0a8f2a;--color-secondary-green: #eaf2ee;--color-green-50: #f8faf9;--color-primary-black: #1c2b2d;--color-primary-grey: #e6e6e6;--color-secondary-grey: #d7e3dc;--color-grey-50: #fbf9fa;--color-grey-300: #c9d0cc;--color-grey-600: #5f6361;--color-yellow-700: #c07a00;--color-red-700: #c10007}#app{background:var(--color-primary-grey);color:var(--color-primary-black);display:flex;height:100vh;width:100%}:host,:root{--font-family-base: Poppins, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;--topbar-border-bottom-height: .0625rem;--topbar-height: 4rem}body,.body{color:var(--color-primary-black);font-family:var(--font-family-base);margin:0}.docs-story,.sb-show-main,.sbdocs,.sbdocs-content,.sbdocs-preview,.sbdocs-wrapper,#storybook-docs,#storybook-root{font-family:var(--font-family-base)}.v-spinner .v-clip{animation:v-clipDelay .75s 0s infinite linear;border-radius:100%;color:var(--color-primary-green)}@keyframes v-clipDelay{0%{transform:rotate(0)}50%{transform:rotate(180deg)}to{transform:rotate(360deg)}}',dX=zt(uX,[["styles",[ow,".body>*{width:100%}"]]]),mD=6e4,vD=36e5,CD=Symbol.for("constructDateFrom");function wD(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&CD in e?e[CD](t):e instanceof Date?new e.constructor(t):new Date(t)}function Tf(e,t){return wD(e,e)}function hX(e,t){return+Tf(e)>+Tf(t)}function bD(e,t){const n=()=>wD(t?.in,NaN),o=mX(e);let r;if(o.date){const u=vX(o.date,2);r=CX(u.restDateString,u.year)}if(!r||isNaN(+r))return n();const s=+r;let a=0,l;if(o.time&&(a=wX(o.time),isNaN(a)))return n();if(o.timezone){if(l=bX(o.timezone),isNaN(l))return n()}else{const u=new Date(s+a),h=Tf(0);return h.setFullYear(u.getUTCFullYear(),u.getUTCMonth(),u.getUTCDate()),h.setHours(u.getUTCHours(),u.getUTCMinutes(),u.getUTCSeconds(),u.getUTCMilliseconds()),h}return Tf(s+a+l)}const Af={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},fX=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,pX=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,gX=/^([+-])(\d{2})(?::?(\d{2}))?$/;function mX(e){const t={},n=e.split(Af.dateTimeDelimiter);let i;if(n.length>2)return t;if(/:/.test(n[0])?i=n[0]:(t.date=n[0],i=n[1],Af.timeZoneDelimiter.test(t.date)&&(t.date=e.split(Af.timeZoneDelimiter)[0],i=e.substr(t.date.length,e.length))),i){const o=Af.timezone.exec(i);o?(t.time=i.replace(o[1],""),t.timezone=o[1]):t.time=i}return t}function vX(e,t){const n=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),i=e.match(n);if(!i)return{year:NaN,restDateString:""};const o=i[1]?parseInt(i[1]):null,r=i[2]?parseInt(i[2]):null;return{year:r===null?o:r*100,restDateString:e.slice((i[1]||i[2]).length)}}function CX(e,t){if(t===null)return new Date(NaN);const n=e.match(fX);if(!n)return new Date(NaN);const i=!!n[4],o=yu(n[1]),r=yu(n[2])-1,s=yu(n[3]),a=yu(n[4]),l=yu(n[5])-1;if(i)return xX(t,a,l)?yX(t,a,l):new Date(NaN);{const u=new Date(0);return!RX(t,r,s)||!FX(t,o)?new Date(NaN):(u.setUTCFullYear(t,r,Math.max(o,s)),u)}}function yu(e){return e?parseInt(e):1}function wX(e){const t=e.match(pX);if(!t)return NaN;const n=rw(t[1]),i=rw(t[2]),o=rw(t[3]);return PX(n,i,o)?n*vD+i*mD+o*1e3:NaN}function rw(e){return e&&parseFloat(e.replace(",","."))||0}function bX(e){if(e==="Z")return 0;const t=e.match(gX);if(!t)return 0;const n=t[1]==="+"?-1:1,i=parseInt(t[2]),o=t[3]&&parseInt(t[3])||0;return EX(i,o)?n*(i*vD+o*mD):NaN}function yX(e,t,n){const i=new Date(0);i.setUTCFullYear(e,0,4);const o=i.getUTCDay()||7,r=(t-1)*7+n+1-o;return i.setUTCDate(i.getUTCDate()+r),i}const SX=[31,null,31,30,31,30,31,31,30,31,30,31];function yD(e){return e%400===0||e%4===0&&e%100!==0}function RX(e,t,n){return t>=0&&t<=11&&n>=1&&n<=(SX[t]||(yD(e)?29:28))}function FX(e,t){return t>=1&&t<=(yD(e)?366:365)}function xX(e,t,n){return t>=1&&t<=53&&n>=0&&n<=6}function PX(e,t,n){return e===24?t===0&&n===0:n>=0&&n<60&&t>=0&&t<60&&e>=0&&e<25}function EX(e,t){return t>=0&&t<=59}const DX=["aria-description"],TX={class:"sources-checkbox-label"},AX=["value"],IX={class:"sources-checkbox-label-text","aria-description":"source display name"},sw=zt(xt({__name:"ContributionSearchSourceCheckboxRow",props:ka({isNested:{type:Boolean,default:!1},source:{type:Object}},{selectedSourceIndexes:{required:!0},selectedSourceIndexesModifiers:{}}),emits:["update:selectedSourceIndexes"],setup(e){const t=e,n=Tr(e,"selectedSourceIndexes"),i=`contribution-search-source-${t.source.name}`;return(o,r)=>(ce(),xe("div",{class:Kt(["sources-checkbox-row",{"sources-checkbox-row-nested":e.isNested}]),role:"group","aria-description":e.isNested?"nested source checkbox row":"source checkbox row"},[W("label",TX,[cn(W("input",{id:i,"onUpdate:modelValue":r[0]||(r[0]=s=>n.value=s),type:"checkbox",name:"sources",value:e.source.name},null,8,AX),[[Rd,n.value]]),W("span",IX,Ye(e.source.label),1)])],10,DX))}}),[["styles",[`.sources-checkbox-label[data-v-c92a2a02]{align-items:flex-start;color:var(--color-primary-black);cursor:pointer;display:flex;font-size:.8125rem;gap:.375rem;line-height:1.35}.sources-checkbox-label input[type=checkbox][data-v-c92a2a02]{appearance:none;background-color:var(--color-white);border:.0625rem solid var(--color-primary-grey);border-radius:.125rem;cursor:pointer;flex-shrink:0;height:1rem;margin-top:.125rem;width:1rem}.sources-checkbox-label input[type=checkbox][data-v-c92a2a02]:checked{background-color:var(--color-primary-green);background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 10'%3E%3Cpath fill='none' stroke='%23ffffff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M1 5l3 3 7-7'/%3E%3C/svg%3E");background-position:center;background-repeat:no-repeat;background-size:.625rem .5rem;border-color:var(--color-primary-green)}.sources-checkbox-row-nested .sources-checkbox-label[data-v-c92a2a02]{font-size:.75rem}`]],["__scopeId","data-v-c92a2a02"]]),If=e=>[e.source.name,...e.children.flatMap(t=>If(t))],MX=(e,t)=>{if(t.length===0||e.length===0)return t;const n=new Set(t),i=o=>{if(o.children.length>0&&n.has(o.source.name))for(const r of If(o))n.add(r);for(const r of o.children)i(r)};for(const o of e)i(o);return[...n]},kX=e=>{const t=new Set,n=i=>{i.children.length>0&&t.add(i.source.name);for(const o of i.children)n(o)};for(const i of e)n(i);return t},SD=(e,t)=>e.filter(n=>!t.has(n)),LX=(e,t)=>{if(t.length===0||e.length===0)return t;const n=new Set(t),i=o=>{if(o.children.length>0){const r=If(o).filter(a=>a!==o.source.name);r.length>0&&r.every(a=>n.has(a))?n.add(o.source.name):n.delete(o.source.name)}for(const r of o.children)i(r)};for(const o of e)i(o);return[...n]},OX={class:"source-group-header-row","aria-description":"parent source with expand control"},_X=["aria-expanded","aria-label"],NX={class:"source-group-child-list"},BX=["aria-selected"],GX=zt(xt({__name:"ContributionSearchSourceGroupDropdown",props:ka({depth:{default:0,type:Number},sourceDisplayNode:{type:Object}},{selectedSourceIndexes:{required:!0},selectedSourceIndexesModifiers:{}}),emits:["update:selectedSourceIndexes"],setup(e){const t=e,n=Tr(e,"selectedSourceIndexes"),i=Ce(!1),o=Ce(!1),r=De(()=>t.sourceDisplayNode.source.name),s=De(()=>If(t.sourceDisplayNode).filter(v=>v!==r.value)),a=De(()=>n.value.includes(r.value)),l=De(()=>s.value.length===0?!0:s.value.every(v=>n.value.includes(v))),u=De(()=>`Show or hide child sources for ${t.sourceDisplayNode.source.label}`),h=()=>{i.value=!i.value},f=(v,w)=>{if(!(o.value||v===w||s.value.length===0)){if(o.value=!0,v)n.value=Pe.uniq([...n.value,...s.value]);else if(l.value){const b=new Set(s.value);n.value=n.value.filter(y=>!b.has(y))}o.value=!1}},p=()=>{if(o.value||s.value.length===0)return;const v=l.value,w=a.value;v!==w&&(o.value=!0,v?n.value=Pe.uniq([...n.value,r.value]):n.value=n.value.filter(b=>b!==r.value),o.value=!1)},m=De(()=>s.value.filter(v=>n.value.includes(v)).sort().join(","));return un(a,f,{immediate:!0}),un(m,p,{immediate:!0}),(v,w)=>{const b=hd("ContributionSearchSourceGroupDropdown",!0);return ce(),xe("section",{class:Kt(["source-group",{"source-group-nested":e.depth>0}]),style:Di(e.depth>0?{marginLeft:`${e.depth*.75}rem`}:void 0),"aria-description":"collapsible parent source group"},[W("header",OX,[rt(sw,{source:e.sourceDisplayNode.source,"is-nested":e.depth>0,"selected-source-indexes":n.value,"onUpdate:selectedSourceIndexes":w[0]||(w[0]=y=>n.value=y)},null,8,["source","is-nested","selected-source-indexes"]),W("button",{type:"button",class:"source-group-caret-button","aria-expanded":i.value,"aria-label":u.value,onClick:h},[W("i",{class:Kt(["fa-chevron-down fa-solid source-group-chevron",{"source-group-chevron-expanded":i.value}]),"aria-hidden":"true"},null,2)],8,_X)]),rt(bd,{name:"source-group-panel"},{default:Jn(()=>[i.value?(ce(),xe("section",{key:0,class:"source-group-panel","aria-description":"expanded child source checkboxes",onClick:w[3]||(w[3]=Et(()=>{},["stop"]))},[W("ul",NX,[(ce(!0),xe(pt,null,ei(e.sourceDisplayNode.children,y=>(ce(),xe("li",{key:y.source.name,class:"source-group-child-item",role:"option","aria-selected":n.value.includes(y.source.name)},[y.children.length>0?(ce(),en(b,{key:0,"source-display-node":y,depth:e.depth+1,"selected-source-indexes":n.value,"onUpdate:selectedSourceIndexes":w[1]||(w[1]=R=>n.value=R)},null,8,["source-display-node","depth","selected-source-indexes"])):(ce(),en(sw,{key:1,source:y.source,"is-nested":"","selected-source-indexes":n.value,"onUpdate:selectedSourceIndexes":w[2]||(w[2]=R=>n.value=R)},null,8,["source","selected-source-indexes"]))],8,BX))),128))])])):_t("",!0)]),_:1})],6)}}}),[["styles",[".source-group[data-v-76a4741b]{display:flex;flex-direction:column;gap:.25rem}.source-group-caret-button[data-v-76a4741b]{background:transparent;border:none;color:var(--color-primary-black);cursor:pointer;flex-shrink:0;line-height:1;margin-top:.125rem;padding:.125rem}.source-group-caret-button[data-v-76a4741b]:hover{color:var(--color-primary-green)}.source-group-chevron[data-v-76a4741b]{font-size:.75rem;transform:rotate(-90deg);transition:transform .2s ease}.source-group-chevron-expanded[data-v-76a4741b]{transform:rotate(0)}.source-group-child-item[data-v-76a4741b]{list-style:none;margin:0;padding:0}.source-group-child-list[data-v-76a4741b]{display:flex;flex-direction:column;gap:.375rem;list-style:none;margin:0;padding:0}.source-group-header-row[data-v-76a4741b]{align-items:flex-start;display:flex;gap:.25rem;width:100%}.source-group-header-row[data-v-76a4741b] .sources-checkbox-label{flex:1;min-width:0}.source-group-panel[data-v-76a4741b]{margin-left:.5rem;padding:.375rem 0 0 .625rem}.source-group-panel-enter-active[data-v-76a4741b],.source-group-panel-leave-active[data-v-76a4741b]{transition:opacity .2s ease,transform .2s ease}.source-group-panel-enter-from[data-v-76a4741b],.source-group-panel-leave-to[data-v-76a4741b]{opacity:0;transform:translateY(-.25rem)}"]],["__scopeId","data-v-76a4741b"]]),RD=e=>String(e.id),FD=e=>{const t=Pe.keyBy(e,RD),n={};for(const r of e){const s=r.parent;s&&t[s]&&(n[s]||(n[s]=[]),n[s].push(r))}const i=r=>({source:r,children:(n[RD(r)]??[]).sort((s,a)=>s.label.localeCompare(a.label)).map(s=>i(s))});return e.filter(r=>!r.parent||!t[r.parent]).sort((r,s)=>r.label.localeCompare(s.label)).map(r=>i(r))},HX=Hi.injectEndpoints({endpoints:e=>({getSources:e.query({query:({id:t=null})=>({url:t?`/sources/${t}`:"/sources/getAllSources"})})})});function VX(e){return bu(HX.endpoints.getSources,e)}const WX={class:"sources-select","aria-description":"sources multi-select field"},zX=["aria-expanded","aria-label"],UX={class:"sources-dropdown-count"},$X=["aria-label"],jX={key:1,class:"sources-empty-message"},KX={key:2,class:"sources-options","aria-description":"source checkbox options"},qX={class:"sources-select-all-list"},QX={class:"sources-select-all-item"},YX={class:"sources-checkbox-label sources-select-all-label"},ZX={class:"sources-list"},XX=["aria-selected"],JX=zt(xt({__name:"ContributionSearchSourcesSelect",props:{selectedSourceIndexes:{default:()=>[]},selectedSourceIndexesModifiers:{}},emits:["update:selectedSourceIndexes"],setup(e){const t=Tr(e,"selectedSourceIndexes"),n=wo({}),{data:i,isLoading:o}=VX(n),r=Ce(!1),s=Ce(null),a=Ce(null),l=Ce(null),u=Ce(!1),h=Ce(!1),f=De(()=>{const A=i.value;return A?Array.isArray(A)?A:[A]:[]}),p=De(()=>FD(f.value)),m=De(()=>kX(p.value)),v=De(()=>f.value.map(A=>A.name)),w=De(()=>SD(v.value,m.value)),b=De(()=>SD(t.value,m.value)),y=De(()=>b.value.length),R=De(()=>{const A=w.value;return A.length===0?!1:A.every(T=>t.value.includes(T))}),S=De(()=>y.value>0&&!R.value),P=De({get:()=>R.value,set:A=>{t.value=A?[...v.value]:[]}}),F=De(()=>{const A=y.value;return A===1?"1 source selected":`${A} sources selected`}),I=()=>{r.value=!r.value},L=()=>{r.value=!1},V=(A,T)=>{if(Pe.isEmpty(T)||A.length===0)return T;const k=T.map(K=>A.some(Re=>Re.name===K)?K:A.find(Re=>Re.label===K)?.name??K);return Pe.uniq(k).filter(K=>A.some(re=>re.name===K))},G=(A,T)=>{if(A.length===0)return;h.value=!0;let k=[...t.value];if(k=V(A,k),!Pe.isEmpty(k)){const K=FD(A);k=MX(K,k),k=LX(K,k)}T&&!u.value&&(u.value=!0,Pe.isEmpty(k)&&(k=A.map(K=>K.name))),Pe.isEqual([...k].sort(),[...t.value].sort())||(t.value=k),h.value=!1};un(f,A=>{G(A,!0)},{flush:"post",immediate:!0}),un(t,()=>{h.value||G(f.value,!1)},{deep:!0,flush:"post"}),un([S,R],()=>{l.value&&(l.value.indeterminate=S.value)},{flush:"post"});const _=A=>{if(!r.value)return;const T=A.target;a.value?.contains(T)||s.value?.contains(T)||L()};return Rs(()=>{document.addEventListener("click",_)}),$l(()=>{document.removeEventListener("click",_)}),(A,T)=>(ce(),xe("section",WX,[W("section",{class:"sources-dropdown","aria-description":"sources checkbox dropdown",onKeydown:dn(L,["esc"])},[W("button",{ref_key:"dropdownButtonRef",ref:s,type:"button",class:"sources-dropdown-button","aria-expanded":r.value,"aria-haspopup":"listbox","aria-label":`Sources, ${F.value}`,onClick:I},[T[4]||(T[4]=W("strong",{class:"sources-dropdown-title"},"Sources",-1)),W("span",UX,Ye(y.value),1),W("i",{class:Kt(["fa-solid fa-chevron-down sources-dropdown-chevron",{"sources-dropdown-chevron-open":r.value}]),"aria-hidden":"true"},null,2)],8,zX),rt(bd,{name:"sources-dropdown"},{default:Jn(()=>[r.value?(ce(),xe("section",{key:0,ref_key:"dropdownPanelRef",ref:a,class:"sources-dropdown-panel","aria-description":"sources checkbox list panel",role:"listbox","aria-multiselectable":"true","aria-label":F.value,onClick:T[3]||(T[3]=Et(()=>{},["stop"]))},[fi(o)?(ce(),en(iw,{key:0,size:48,"loading-text":"Loading sources…"})):f.value.length===0?(ce(),xe("p",jX," No sources available. ")):(ce(),xe("section",KX,[W("ul",qX,[W("li",QX,[W("label",YX,[cn(W("input",{id:"contribution-search-source-select-all",ref_key:"selectAllCheckboxRef",ref:l,"onUpdate:modelValue":T[0]||(T[0]=k=>P.value=k),type:"checkbox",name:"sources-select-all"},null,512),[[Rd,P.value]]),T[5]||(T[5]=Hn(" ALL SOURCES ",-1))])])]),W("ul",ZX,[(ce(!0),xe(pt,null,ei(p.value,k=>(ce(),xe("li",{key:k.source.name,class:"sources-list-item",role:"option","aria-selected":t.value.includes(k.source.name)},[k.children.length>0?(ce(),en(GX,{key:0,"source-display-node":k,"selected-source-indexes":t.value,"onUpdate:selectedSourceIndexes":T[1]||(T[1]=K=>t.value=K)},null,8,["source-display-node","selected-source-indexes"])):(ce(),en(sw,{key:1,source:k.source,"selected-source-indexes":t.value,"onUpdate:selectedSourceIndexes":T[2]||(T[2]=K=>t.value=K)},null,8,["source","selected-source-indexes"]))],8,XX))),128))])]))],8,$X)):_t("",!0)]),_:1})],32)]))}}),[["styles",[`.sources-checkbox-label[data-v-931ad126]{align-items:flex-start;color:var(--color-primary-black);cursor:pointer;display:flex;font-size:.8125rem;gap:.375rem;line-height:1.35}.sources-checkbox-label input[type=checkbox][data-v-931ad126]{appearance:none;background-color:var(--color-white);border:.0625rem solid var(--color-primary-grey);border-radius:.125rem;cursor:pointer;flex-shrink:0;height:1rem;margin-top:.125rem;width:1rem}.sources-checkbox-label input[type=checkbox][data-v-931ad126]:checked{background-color:var(--color-primary-green);background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 10'%3E%3Cpath fill='none' stroke='%23ffffff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M1 5l3 3 7-7'/%3E%3C/svg%3E");background-position:center;background-repeat:no-repeat;background-size:.625rem .5rem;border-color:var(--color-primary-green)}.sources-checkbox-label input[type=checkbox][data-v-931ad126]:indeterminate{background-color:var(--color-primary-green);background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath fill='none' stroke='%23ffffff' stroke-linecap='round' stroke-width='2' d='M2 6h8'/%3E%3C/svg%3E");background-position:center;background-repeat:no-repeat;background-size:.625rem;border-color:var(--color-primary-green)}.sources-dropdown[data-v-931ad126]{position:relative}.sources-dropdown-button[data-v-931ad126]{align-items:center;background:var(--color-white);border:.0625rem solid var(--color-primary-grey);border-radius:.25rem;box-sizing:border-box;color:var(--color-primary-black);cursor:pointer;display:flex;font-family:Poppins,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Arial,sans-serif;font-size:.9375rem;gap:.375rem;height:2.25rem;padding:0 .5rem;width:100%}.sources-dropdown-button[data-v-931ad126]:focus-visible{border-color:var(--color-primary-green)}.sources-dropdown-button[data-v-931ad126]:hover{border-color:var(--color-primary-green)}.sources-dropdown-chevron[data-v-931ad126]{font-size:.75rem;margin-left:auto;opacity:.85;transform:rotate(0);transition:transform .2s ease}.sources-dropdown-chevron-open[data-v-931ad126]{transform:rotate(180deg)}.sources-dropdown-count[data-v-931ad126]{background-color:var(--color-primary-grey);border-radius:.25rem;color:var(--color-primary-black);font-size:.875rem;font-style:normal;font-weight:600;line-height:1.25;min-width:1.25rem;padding:.125rem .375rem;text-align:center}.sources-dropdown-enter-active[data-v-931ad126],.sources-dropdown-leave-active[data-v-931ad126]{transition:opacity .2s ease,transform .2s ease}.sources-dropdown-enter-from[data-v-931ad126],.sources-dropdown-leave-to[data-v-931ad126]{opacity:0;transform:translateY(-.25rem)}.sources-dropdown-panel[data-v-931ad126]{background:var(--color-white);border:.0625rem solid var(--color-primary-grey);border-radius:.375rem;box-shadow:0 .625rem 1.5rem #00000014;left:0;margin-top:.375rem;max-height:min(70vh,24rem);max-width:36rem;overflow-x:hidden;overflow-y:auto;padding:.75rem;position:absolute;top:100%;width:100%;z-index:3}.sources-dropdown-title[data-v-931ad126]{font-size:.875rem;font-weight:600}.sources-empty-message[data-v-931ad126]{color:var(--color-primary-black);font-size:.875rem;margin:0}.sources-list[data-v-931ad126]{display:grid;gap:.5rem 1rem;grid-template-columns:1fr 1fr;list-style:none;margin:0;padding:0}.sources-list-item[data-v-931ad126]{list-style:none;margin:0;min-width:0;padding:0}.sources-options[data-v-931ad126]{display:flex;flex-direction:column;gap:.5rem}.sources-select[data-v-931ad126]{display:flex;flex-direction:column;gap:.35rem;margin-top:.75rem;min-width:0;width:100%}.sources-select-all-item[data-v-931ad126]{list-style:none}.sources-select-all-label[data-v-931ad126]{color:var(--color-red);font-weight:600}.sources-select-all-list[data-v-931ad126]{border-bottom:.0625rem solid var(--color-primary-grey);list-style:none;margin:0;padding:0 0 .5rem}`]],["__scopeId","data-v-931ad126"]]),xD=[{value:"AL",label:"Alabama"},{value:"AK",label:"Alaska"},{value:"AZ",label:"Arizona"},{value:"AR",label:"Arkansas"},{value:"CA",label:"California"},{value:"CO",label:"Colorado"},{value:"CT",label:"Connecticut"},{value:"DE",label:"Delaware"},{value:"DC",label:"District of Columbia"},{value:"FL",label:"Florida"},{value:"GA",label:"Georgia"},{value:"HI",label:"Hawaii"},{value:"ID",label:"Idaho"},{value:"IL",label:"Illinois"},{value:"IN",label:"Indiana"},{value:"IA",label:"Iowa"},{value:"KS",label:"Kansas"},{value:"KY",label:"Kentucky"},{value:"LA",label:"Louisiana"},{value:"ME",label:"Maine"},{value:"MD",label:"Maryland"},{value:"MA",label:"Massachusetts"},{value:"MI",label:"Michigan"},{value:"MN",label:"Minnesota"},{value:"MS",label:"Mississippi"},{value:"MO",label:"Missouri"},{value:"MT",label:"Montana"},{value:"NE",label:"Nebraska"},{value:"NV",label:"Nevada"},{value:"NH",label:"New Hampshire"},{value:"NJ",label:"New Jersey"},{value:"NM",label:"New Mexico"},{value:"NY",label:"New York"},{value:"NC",label:"North Carolina"},{value:"ND",label:"North Dakota"},{value:"OH",label:"Ohio"},{value:"OK",label:"Oklahoma"},{value:"OR",label:"Oregon"},{value:"PA",label:"Pennsylvania"},{value:"RI",label:"Rhode Island"},{value:"SC",label:"South Carolina"},{value:"SD",label:"South Dakota"},{value:"TN",label:"Tennessee"},{value:"TX",label:"Texas"},{value:"UT",label:"Utah"},{value:"VT",label:"Vermont"},{value:"VA",label:"Virginia"},{value:"WA",label:"Washington"},{value:"WV",label:"West Virginia"},{value:"WI",label:"Wisconsin"},{value:"WY",label:"Wyoming"}],eJ={class:"states-select","aria-description":"U.S. states multi-select field"},tJ=["aria-expanded","aria-label","onKeydown"],nJ={class:"states-dropdown-value","aria-description":"Selected states or placeholder"},iJ={key:0,class:"states-dropdown-placeholder","aria-description":"Placeholder for no states selected"},oJ={key:1,class:"states-selected-list",role:"list","aria-label":"Selected states"},rJ={class:"states-selected-chip","aria-description":"Selected state chip"},sJ=["aria-label","onClick"],aJ=["aria-label"],lJ={class:"states-options","aria-description":"state checkbox options"},cJ={class:"states-list"},uJ=["aria-selected"],dJ={class:"states-checkbox-label"},hJ=["id","value"],fJ={"aria-description":"State name"},pJ=zt(xt({__name:"ContributionSearchStatesSelect",props:{selectedStateValues:{default:()=>[]},selectedStateValuesModifiers:{}},emits:["update:selectedStateValues"],setup(e){const t=Tr(e,"selectedStateValues"),n=Ce(!1),i=Ce(null),o=Ce(null),r=De(()=>t.value.length),s=De(()=>r.value>0),a=De(()=>{const m=[];for(const v of t.value){const w=xD.find(b=>b.value===v);w&&m.push(w)}return m}),l=De(()=>s.value?a.value.map(m=>m.label).join(", "):"Select States"),u=()=>{n.value=!n.value},h=()=>{n.value=!1},f=(m,v)=>{m.stopPropagation(),t.value=t.value.filter(w=>w!==v)},p=m=>{if(n.value){{const v=m.composedPath();if(o.value&&v.includes(o.value)||i.value&&v.includes(i.value))return}h()}};return Rs(()=>{document.addEventListener("click",p)}),$l(()=>{document.removeEventListener("click",p)}),(m,v)=>{const w=hd("font-awesome-icon");return ce(),xe("section",eJ,[v[2]||(v[2]=W("span",{class:"states-field-label","aria-description":"states field label"},"U.S. state",-1)),W("section",{class:"states-dropdown","aria-description":"states checkbox dropdown",onKeydown:dn(h,["esc"])},[W("div",{ref_key:"dropdownControlRef",ref:i,class:"states-dropdown-control",role:"combobox",tabindex:"0","aria-expanded":n.value,"aria-haspopup":"listbox","aria-label":`U.S. states, ${l.value}`,onClick:Et(u,["stop"]),onKeydown:[dn(Et(u,["prevent"]),["enter"]),dn(Et(u,["prevent"]),["space"])],"aria-description":"Dropdown control for selecting U.S. states"},[W("div",nJ,[s.value?(ce(),xe("ul",oJ,[(ce(!0),xe(pt,null,ei(a.value,b=>(ce(),xe("li",{key:b.value,class:"states-selected-item",role:"listitem"},[W("span",rJ,[Hn(Ye(b.label)+" ",1),W("button",{type:"button",class:"states-selected-remove","aria-label":`Remove ${b.label}`,onClick:y=>f(y,b.value)},[rt(w,{class:"states-selected-remove-icon",icon:["fas","xmark"],size:"xs"})],8,sJ)])]))),128))])):(ce(),xe("span",iJ,"Select States"))]),W("i",{class:Kt(["fa-solid fa-chevron-down states-dropdown-chevron",{"states-dropdown-chevron-open":n.value}]),"aria-hidden":"true"},null,2)],40,tJ),rt(bd,{name:"states-dropdown"},{default:Jn(()=>[n.value?(ce(),xe("section",{key:0,ref_key:"dropdownPanelRef",ref:o,class:"states-dropdown-panel","aria-description":"states checkbox list panel",role:"listbox","aria-multiselectable":"true","aria-label":l.value,onClick:v[1]||(v[1]=Et(()=>{},["stop"]))},[W("section",lJ,[W("ul",cJ,[(ce(!0),xe(pt,null,ei(fi(xD),b=>(ce(),xe("li",{key:b.value,class:"states-list-item",role:"option","aria-selected":t.value.includes(b.value)},[W("label",dJ,[cn(W("input",{id:`contribution-search-state-${b.value}`,"onUpdate:modelValue":v[0]||(v[0]=y=>t.value=y),type:"checkbox",name:"states",value:b.value},null,8,hJ),[[Rd,t.value]]),W("span",fJ,Ye(b.label),1)])],8,uJ))),128))])])],8,aJ)):_t("",!0)]),_:1})],32)])}}}),[["styles",[`.states-checkbox-label[data-v-7d562196]{align-items:flex-start;color:var(--color-primary-black);cursor:pointer;display:flex;font-size:.8125rem;gap:.375rem;line-height:1.35}.states-checkbox-label input[type=checkbox][data-v-7d562196]{appearance:none;background-color:var(--color-white);border:.0625rem solid var(--color-primary-grey);border-radius:.125rem;cursor:pointer;flex-shrink:0;height:1rem;margin-top:.125rem;width:1rem}.states-checkbox-label input[type=checkbox][data-v-7d562196]:checked{background-color:var(--color-primary-green);background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 10'%3E%3Cpath fill='none' stroke='%23ffffff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M1 5l3 3 7-7'/%3E%3C/svg%3E");background-position:center;background-repeat:no-repeat;background-size:.625rem .5rem;border-color:var(--color-primary-green)}.states-dropdown[data-v-7d562196]{position:relative}.states-dropdown-chevron[data-v-7d562196]{flex-shrink:0;font-size:.75rem;margin-top:.375rem;opacity:.85;transform:rotate(0);transition:transform .2s ease}.states-dropdown-chevron-open[data-v-7d562196]{transform:rotate(180deg)}.states-dropdown-control[data-v-7d562196]{align-items:flex-start;background:var(--color-white);border:.0625rem solid var(--color-primary-grey);border-radius:.25rem;box-sizing:border-box;color:var(--color-grey-600);cursor:pointer;display:flex;font-family:Poppins,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Arial,sans-serif;font-size:.9375rem;gap:.375rem;min-height:2.25rem;padding:.25rem .5rem;width:100%}.states-dropdown-control[data-v-7d562196]:focus-visible{border-color:var(--color-primary-green)}.states-dropdown-control[data-v-7d562196]:hover{border-color:var(--color-primary-green)}.states-dropdown-enter-active[data-v-7d562196],.states-dropdown-leave-active[data-v-7d562196]{transition:opacity .2s ease,transform .2s ease}.states-dropdown-enter-from[data-v-7d562196],.states-dropdown-leave-to[data-v-7d562196]{opacity:0;transform:translateY(-.25rem)}.states-dropdown-panel[data-v-7d562196]{background:var(--color-white);border:.0625rem solid var(--color-primary-grey);border-radius:.375rem;box-shadow:0 .625rem 1.5rem #00000014;left:0;margin-top:.375rem;max-height:min(70vh,24rem);max-width:36rem;overflow-x:hidden;overflow-y:auto;padding:.75rem;position:absolute;top:100%;width:100%;z-index:3}.states-dropdown-placeholder[data-v-7d562196]{color:var(--color-secondary-black);display:block;font-size:.9375rem;line-height:1.75rem;padding:0 .125rem}.states-dropdown-value[data-v-7d562196]{flex:1;min-width:0}.states-field-label[data-v-7d562196]{color:var(--color-primary-black);font-size:.875rem}.states-list[data-v-7d562196]{display:grid;gap:.5rem 1rem;grid-template-columns:1fr 1fr;list-style:none;margin:0;padding:0}.states-list-item[data-v-7d562196]{list-style:none;margin:0;min-width:0;padding:0}.states-options[data-v-7d562196]{display:flex;flex-direction:column;gap:.5rem}.states-select[data-v-7d562196]{display:flex;flex-direction:column;gap:.35rem;margin-top:.75rem;min-width:0;width:100%}.states-selected-chip[data-v-7d562196]{align-items:center;background-color:var(--color-secondary-green);border-radius:.25rem;color:var(--color-primary-black);display:inline-flex;font-size:.8125rem;gap:.125rem;line-height:1.25;max-width:100%;padding:.125rem .125rem .125rem .375rem}.states-selected-item[data-v-7d562196]{list-style:none;margin:0;max-width:100%;padding:0}.states-selected-list[data-v-7d562196]{display:flex;flex-wrap:wrap;gap:.25rem;list-style:none;margin:0;padding:0}.states-selected-remove[data-v-7d562196]{align-items:center;background:transparent;border:none;border-radius:.125rem;color:var(--color-primary-black);cursor:pointer;display:inline-flex;flex-shrink:0;font-size:.75rem;height:1.25rem;justify-content:center;padding:0;width:1.25rem}.states-selected-remove[data-v-7d562196]:hover{color:var(--color-primary-green)}.states-selected-remove-icon[data-v-7d562196]{height:.5625rem;width:.703125rem}`]],["__scopeId","data-v-7d562196"]]);function gJ(e){return{id:e.contribution.id,contributor:e.contribution.contributor,employeeStatus:e.match?.employee?.status??"",address:e.contribution.address,state:e.contribution.state,zipCode:e.contribution.zipCode,date:e.contribution.date,dateDetected:e.match?.created??"",amount:e.contribution.amount,employer:e.contribution.employer,occupation:e.contribution.occupation,recipient:e.contribution.recipient,amended:e.contribution.amended,sources:e.contribution.source,status:e.match?.status??"",reconciliationStatus:e.match?.preclearance?.reconciliationStatus??"",preclearance:e.match?.preclearance?.name??"",approvalDate:e.match?.preclearance?.approvalDate??"",approvedAmount:e.match?.preclearance?.amount??null,lastUpdated:e.match?.modified??"",lastUpdatedBy:e.match?.modifiedBy??"",notes:e.match?.notes.map(t=>t.text).join(";")??"",tags:e.match?.employee?.tags.map(t=>t.name).join(";")??"",groups:e.match?.employee?.groups.map(t=>t.name).join(";")??""}}var mn=(e=>(e[e.NULL=0]="NULL",e[e.OR=1]="OR",e[e.AND=2]="AND",e))(mn||{}),rn=(e=>(e[e.EQUALS=1]="EQUALS",e[e.NOT_EQUALS=2]="NOT_EQUALS",e[e.LESS_THAN=3]="LESS_THAN",e[e.GREATER_THAN=4]="GREATER_THAN",e[e.LESS_THAN_OR_EQUAL=5]="LESS_THAN_OR_EQUAL",e[e.GREATER_THAN_OR_EQUAL=6]="GREATER_THAN_OR_EQUAL",e[e.CONTAINS=7]="CONTAINS",e[e.DOES_NOT_CONTAIN=8]="DOES_NOT_CONTAIN",e[e.BEGINS_WITH=9]="BEGINS_WITH",e[e.ENDS_WITH=10]="ENDS_WITH",e))(rn||{});const mJ=Hi.injectEndpoints({endpoints:e=>({searchContributions:e.mutation({query:({user:t,company:n,stack:i,page:o,limit:r,sortColumn:s=null,sortOrder:a=null,match:l=!1,body:u})=>({url:`/contributions/search?user=${t}&company=${n}&stack=${i}&page=${o}&limit=${r}${s&&a?`&sortColumn=${s}&sortOrder=${a}`:""}&match=${l}`,method:"POST",body:u}),transformResponse:(t,n)=>({page:t.page,totalPages:t.totalPages,limit:t.limit,total:t.total,results:t.results.map(gJ)})})})});function vJ(){return ca(mJ.endpoints.searchContributions)}function CJ(){let e=1;return()=>e++}const wJ=CJ(),bJ={NULL:mn.NULL,OR:mn.OR,AND:mn.AND},PD={equals:rn.EQUALS,notEqual:rn.NOT_EQUALS,lessThan:rn.LESS_THAN,greaterThan:rn.GREATER_THAN,lessThanOrEqual:rn.LESS_THAN_OR_EQUAL,greaterThanOrEqual:rn.GREATER_THAN_OR_EQUAL,contains:rn.CONTAINS,notContains:rn.DOES_NOT_CONTAIN,startsWith:rn.BEGINS_WITH,endsWith:rn.ENDS_WITH};function yJ(e="",t=[]){const n=bJ?.[e];return!n||t.length<2?mn.NULL:n}function SJ(e=""){const t=PD?.[e];return t||rn.EQUALS}function si(e,t){if(Pe.isNil(PD[e]))throw Error("Invalid Comparator...");return{id:wJ(),comparator:SJ(e),value:t}}const RJ={class:"search-layout","aria-description":"contribution search form layout"},FJ={class:"search-fieldset"},xJ={class:"field field-full"},PJ=["value","aria-invalid","aria-describedby"],EJ={key:0,id:"contribution-search-first-name-error",class:"field-error",role:"alert"},DJ={class:"field field-full"},TJ=["value","aria-invalid","aria-describedby"],AJ={key:0,id:"contribution-search-last-name-error",class:"field-error",role:"alert"},IJ={class:"field postal-field","aria-description":"postal codes multi-value field"},MJ={class:"postal-input","aria-description":"postal codes input with selected chips"},kJ={key:0,class:"postal-selected-list",role:"list","aria-label":"Selected postal codes","aria-description":"selected postal codes list"},LJ={class:"postal-selected-chip","aria-description":"Selected postal code chip"},OJ=["aria-label","onClick"],_J=["placeholder","aria-label","onKeydown"],NJ={class:"date-fieldset dates-row"},BJ={class:"field field-label"},GJ=["aria-invalid","aria-describedby"],HJ={class:"field field-date"},VJ=["aria-invalid","aria-describedby"],WJ={class:"actions","aria-description":"form submit actions"},zJ=["disabled"],ED="This field is required.",DD="Record dates require both a start date and an end date.",TD="Record start date must be on or before the end date.",AD=zt(xt({__name:"ContributionSearchForm",props:{contributionSearchPresets:{default:null,type:[Object,null]},loading:{type:Boolean,default:!1}},emits:["search"],setup(e,{emit:t}){const n=e,i=t,o=Ce(""),r=Ce(""),s=Ce([]),a=Ce([]),l=Ce(""),u=Ce(""),h=Ce(""),f=Ce([]),p=Ce(0),m=Ce(""),v=Ce(null),w=Ce(""),b=Ce(""),y=()=>{const A=String(l.value??"").trim();if(Pe.isEmpty(A)||a.value.includes(A)){l.value="";return}a.value=[...a.value,A],l.value=""},R=(A,T)=>{A.preventDefault(),A.stopPropagation(),a.value=a.value.filter((k,K)=>K!==T)},S=(A,T)=>{const k=A.target,K=k.value.replace(/[^A-Za-z\s-]/g,"").replace(/-{2,}/g,"-").replace(/\s{2,}/g," ").replace(/^[\s-]+/,"");T==="firstName"?o.value=K:r.value=K,k.value=K},P=(A,T)=>{A.target.value=A.target.value.replace(/[\s-]+$/,""),S(A,T)},F=De(()=>m.value===DD||m.value===TD),I=De(()=>{const A=["record-dates-hint"];return F.value&&A.push("contribution-search-form-error"),A.join(" ")}),L=A=>{const T=A.contributor?.query?.find(ue=>ue.comparator===rn.BEGINS_WITH),k=A.contributor?.query?.find(ue=>ue.comparator===rn.ENDS_WITH);o.value=Pe.isNil(T?.value)?"":String(T?.value),r.value=Pe.isNil(k?.value)?"":String(k?.value);const K=(A.state?.query??[]).filter(ue=>ue.comparator===rn.EQUALS);s.value=K.map(ue=>Pe.isNil(ue.value)?"":String(ue.value)).filter(ue=>!Pe.isEmpty(ue));const re=(A.zipCode?.query??[]).filter(ue=>ue.comparator===rn.EQUALS);a.value=re.map(ue=>Pe.isNil(ue.value)?"":String(ue.value)).filter(ue=>!Pe.isEmpty(ue)),l.value="";const Re=A.date?.query?.find(ue=>ue.comparator===rn.GREATER_THAN_OR_EQUAL),be=A.date?.query?.find(ue=>ue.comparator===rn.LESS_THAN_OR_EQUAL);u.value=Pe.isNil(Re?.value)?"":String(Re?.value),h.value=Pe.isNil(be?.value)?"":String(be?.value);const Fe=(A.sources?.query??[]).filter(ue=>ue.comparator===rn.EQUALS).map(ue=>Pe.isNil(ue.value)?"":String(ue.value)).filter(ue=>!Pe.isEmpty(ue));f.value=Fe,Fe.length>0&&(p.value+=1),m.value="",w.value="",b.value=""};un(()=>n.contributionSearchPresets,async A=>{A===null||Pe.isEmpty(A)||(L(A),await Dr())},{deep:!0,immediate:!0});const V=()=>{m.value="",w.value="",b.value="";let A=!0;if(Pe.isEmpty(o.value.trim())&&(w.value=ED,A=!1),Pe.isEmpty(r.value.trim())&&(b.value=ED,A=!1),!A)return!1;const T=!Pe.isEmpty(u.value),k=!Pe.isEmpty(h.value);if(T!==k)return m.value=DD,!1;if(T&&k){const K=bD(u.value),re=bD(h.value);if(hX(K,re))return m.value=TD,!1}return!0},G=()=>{const A={},T=o.value.trim(),k=r.value.trim();A.contributor={conjunction:mn.AND,query:[si("startsWith",T),si("endsWith",k)]},Pe.isEmpty(s.value)||(A.state={conjunction:s.value.length>1?mn.OR:mn.NULL,query:s.value.map(re=>si("equals",re))}),y();const K=a.value.map(re=>re.trim()).filter(re=>!Pe.isEmpty(re));return Pe.isEmpty(K)||(A.zipCode={conjunction:K.length>1?mn.OR:mn.NULL,query:K.map(re=>si("equals",re))}),!Pe.isEmpty(u.value)&&!Pe.isEmpty(h.value)&&(A.date={conjunction:mn.AND,query:[si("greaterThanOrEqual",u.value),si("lessThanOrEqual",h.value)]}),Pe.isEmpty(f.value)||(A.sources={conjunction:f.value.length>1?mn.OR:mn.NULL,query:f.value.map(re=>si("equals",re))}),A},_=()=>{if(!n.loading){if(!V()){Dr(()=>{if(w.value){document.getElementById("contribution-search-first-name")?.focus();return}if(b.value){document.getElementById("contribution-search-last-name")?.focus();return}v.value?.focus()});return}i("search",G())}};return(A,T)=>(ce(),xe("section",RJ,[W("form",{class:"search-form",role:"search","aria-label":"Contribution search",novalidate:"",onSubmit:Et(_,["prevent"])},[W("fieldset",FJ,[T[16]||(T[16]=W("legend",{class:"visually-hidden"},"Contribution search filters",-1)),W("label",xJ,[T[11]||(T[11]=W("span",{class:"field-label","aria-description":"first name field label"},[Hn(" First name "),W("abbr",{class:"req",title:"required"},"*")],-1)),W("input",{id:"contribution-search-first-name",value:o.value,type:"text",name:"firstName",autocomplete:"given-name",placeholder:"Enter First Name with only letters, spaces, and hyphens (-).","aria-invalid":w.value?!0:void 0,"aria-describedby":w.value?"contribution-search-first-name-error":void 0,onInput:T[0]||(T[0]=k=>S(k,"firstName")),onBlur:T[1]||(T[1]=k=>P(k,"firstName"))},null,40,PJ),w.value?(ce(),xe("p",EJ,Ye(w.value),1)):_t("",!0)]),W("label",DJ,[T[12]||(T[12]=W("span",{class:"field-label","aria-description":"last name field label"},[Hn(" Last name "),W("abbr",{class:"req",title:"required"},"*")],-1)),W("input",{id:"contribution-search-last-name",value:r.value,type:"text",name:"lastName",autocomplete:"family-name",placeholder:"Enter Last Name with only letters, spaces, and hyphens (-).","aria-invalid":b.value?!0:void 0,"aria-describedby":b.value?"contribution-search-last-name-error":void 0,onInput:T[2]||(T[2]=k=>S(k,"lastName")),onBlur:T[3]||(T[3]=k=>P(k,"lastName"))},null,40,TJ),b.value?(ce(),xe("p",AJ,Ye(b.value),1)):_t("",!0)]),rt(pJ,{"selected-state-values":s.value,"onUpdate:selectedStateValues":T[4]||(T[4]=k=>s.value=k)},null,8,["selected-state-values"]),W("div",IJ,[T[13]||(T[13]=W("span",{class:"field-label","aria-description":"postal codes field label"},"Postal codes",-1)),W("div",MJ,[a.value.length?(ce(),xe("ul",kJ,[(ce(!0),xe(pt,null,ei(a.value,(k,K)=>(ce(),xe("li",{key:`${k}-${K}`,class:"postal-selected-item",role:"listitem"},[W("span",LJ,[Hn(Ye(k)+" ",1),W("button",{type:"button",class:"postal-selected-remove","aria-label":`Remove ${k}`,onMousedown:T[5]||(T[5]=Et(()=>{},["prevent"])),onClick:re=>R(re,K)}," × ",40,OJ)])]))),128))])):_t("",!0),cn(W("input",{id:"contribution-search-postal","onUpdate:modelValue":T[6]||(T[6]=k=>l.value=k),type:"number",name:"postalCode",autocomplete:"postal-code",placeholder:a.value.length?void 0:"Enter postal code...","aria-label":a.value.length?"Add postal code":void 0,onKeydown:[T[7]||(T[7]=k=>["e","E","+","-"].includes(k.key)&&k.preventDefault()),dn(Et(y,["prevent"]),["enter"])],onBlur:y},null,40,_J),[[Ds,l.value]])])]),W("fieldset",NJ,[W("label",BJ,[T[14]||(T[14]=Hn(" Record Dates ",-1)),cn(W("input",{id:"contribution-search-date-from","onUpdate:modelValue":T[8]||(T[8]=k=>u.value=k),type:"date",name:"recordDateFrom","aria-invalid":F.value,"aria-describedby":I.value},null,8,GJ),[[Ds,u.value]])]),T[15]||(T[15]=W("p",{class:"date-to","aria-hidden":"true"},"to",-1)),W("label",HJ,[cn(W("input",{id:"contribution-search-date-to","onUpdate:modelValue":T[9]||(T[9]=k=>h.value=k),type:"date",name:"recordDateTo","aria-invalid":F.value,"aria-describedby":I.value},null,8,VJ),[[Ds,h.value]])])]),(ce(),en(JX,{key:p.value,"selected-source-indexes":f.value,"onUpdate:selectedSourceIndexes":T[10]||(T[10]=k=>f.value=k)},null,8,["selected-source-indexes"])),m.value?(ce(),xe("p",{key:0,id:"contribution-search-form-error",ref_key:"formErrorMessageRef",ref:v,class:"form-error",role:"alert",tabindex:"-1"},Ye(m.value),513)):_t("",!0)]),W("footer",WJ,[W("button",{type:"submit","aria-label":"Search contributions",disabled:e.loading},"Search",8,zJ)])],32)]))}}),[["styles",[".actions[data-v-590c6429]{display:flex;flex-wrap:wrap;gap:.5rem;margin-top:1rem;padding-bottom:.25rem}.actions button[data-v-590c6429]{background:var(--color-primary-green);border:.0625rem solid var(--color-primary-green);border-radius:.375rem;color:var(--color-white);cursor:pointer;font-family:Poppins,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Arial,sans-serif;font-size:.875rem;height:2.25rem;min-width:5rem;padding:0 1rem}.actions button[data-v-590c6429]:disabled{cursor:not-allowed;opacity:.5}.actions button.secondary[data-v-590c6429]{background:var(--color-white);color:var(--color-primary-black)}.date-fieldset[data-v-590c6429]{min-width:0}.date-to[data-v-590c6429]{color:var(--color-primary-black);font-size:.875rem;margin:0;padding-bottom:.5rem}.dates-row[data-v-590c6429]{align-items:flex-end;display:flex;flex-wrap:wrap;gap:.75rem 1rem;margin-top:.75rem}.field[data-v-590c6429]{display:flex;flex-direction:column;gap:.35rem;margin-top:.75rem;min-width:0}.field input[data-v-590c6429],.field select[data-v-590c6429]{border:.0625rem solid var(--color-primary-grey);border-radius:.25rem;color:var(--color-primary-black);font-family:Poppins,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Arial,sans-serif;font-size:.9375rem;height:2.25rem;padding:0 .5rem}.field input[data-v-590c6429]:focus-visible,.field select[data-v-590c6429]:focus-visible{border-color:var(--color-primary-green);outline:none}.field input[aria-invalid=true][data-v-590c6429]{border-color:var(--color-red)}.field input[aria-invalid=true][data-v-590c6429]:focus-visible{border-color:var(--color-red)}.field select[data-v-590c6429]{background-color:var(--color-white)}.field-date[data-v-590c6429]{flex:0 1 auto;min-width:10rem}.field-error[data-v-590c6429]{color:var(--color-red);font-size:.8125rem;line-height:1.35;margin:0}.field-full[data-v-590c6429]{max-width:none;width:100%}.field-full input[data-v-590c6429],.field-full select[data-v-590c6429]{box-sizing:border-box;width:100%}.field-hint[data-v-590c6429]{color:var(--color-primary-black);font-size:.8125rem;line-height:1.35;margin:0;max-width:36rem}.field-label[data-v-590c6429]{color:var(--color-primary-black);font-size:.875rem;white-space:nowrap}.form-error[data-v-590c6429]{color:var(--color-red);font-size:.875rem;margin:.75rem 0 0}input[type=number][data-v-590c6429]{-moz-appearance:textfield;appearance:textfield}input[type=number][data-v-590c6429]::-webkit-inner-spin-button,input[type=number][data-v-590c6429]::-webkit-outer-spin-button{-webkit-appearance:none;appearance:none;margin:0}.postal-field .field-label[data-v-590c6429]{margin-top:.75rem}.postal-input[data-v-590c6429]{align-items:center;border:.0625rem solid var(--color-primary-grey);border-radius:.25rem;box-sizing:border-box;display:flex;flex-wrap:wrap;gap:.25rem;min-height:2.25rem;padding:.25rem .5rem;width:100%}.postal-input[data-v-590c6429]:focus-within{border-color:var(--color-primary-green)}.postal-input input[data-v-590c6429]{border:none;color:var(--color-primary-black);flex:1 1 6rem;font-family:Poppins,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Arial,sans-serif;font-weight:400;height:1.75rem;min-width:6rem;padding:0;width:auto}.postal-input input[data-v-590c6429]::placeholder{font-size:.9375rem}.postal-input input[data-v-590c6429]:focus-visible{border:none;outline:none}.postal-selected-chip[data-v-590c6429]{align-items:center;background-color:var(--color-primary-grey);border-radius:.25rem;display:inline-flex;font-size:.8125rem;gap:.125rem;padding:.125rem .125rem .125rem .375rem}.postal-selected-item[data-v-590c6429]{list-style:none;margin:0;padding:0}.postal-selected-list[data-v-590c6429]{display:contents;list-style:none;margin:0;padding:0}.postal-selected-remove[data-v-590c6429]{background:transparent;border:none;cursor:pointer;font-size:1rem;font-weight:400;line-height:1;padding:0 .25rem}.postal-selected-remove[data-v-590c6429]:hover{color:var(--color-red)}.req[data-v-590c6429]{color:var(--color-red);cursor:help;text-decoration:none}.search-fieldset>.field[data-v-590c6429]:first-of-type{margin-top:0}.search-form .dates-legend[data-v-590c6429]{color:var(--color-primary-black);font-size:.875rem;font-weight:600;margin:0;padding:0}.search-form fieldset[data-v-590c6429]{border:none;margin:0;padding:0}.search-form legend[data-v-590c6429]{font-weight:600;padding:0 .35rem}.search-form legend.visually-hidden[data-v-590c6429]{border:0;clip-path:inset(50%);height:.0625rem;margin:-.0625rem;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:.0625rem}.search-layout[data-v-590c6429]{display:flex;flex-direction:column;gap:1.25rem;min-height:0}"]],["__scopeId","data-v-590c6429"]]);var UJ=Object.defineProperty,$J=(e,t,n)=>t in e?UJ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ua=(e,t,n)=>$J(e,typeof t!="symbol"?t+"":t,n);const ID=class uI{static getComponentDefinition(t,n){let i;return typeof t=="string"?i=this.searchForComponentInstance(n,t):i={extends:xt({...t})},i||gt(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,n,i,o){const r=uI.getComponentDefinition(t,i);if(!r)return;const{vNode:s,destroy:a,el:l}=this.mount(r,{params:Object.freeze(n)},i,o||{});return{componentInstance:s.component.proxy,element:l,destroy:a}}static mount(t,n,i,o){let r=rt(t,n);r.appContext={...i.appContext,provides:o};let s=document.createDocumentFragment();return lg(r,s),{vNode:r,destroy:()=>{s&&lg(null,s),s=null,r=null},el:s}}static searchForComponentInstance(t,n,i=10,o=!1){let r=this.componentCache.get(t);if(r){const u=r.get(n);if(u!==void 0)return u}let s=null,a=0,l=t.parent;for(;!s&&l&&l.components&&++a<i;)l.components&&l.components[n]&&(s=l.components[n]),l=l.parent;for(a=0,l=t.parent;!s&&l&&l.$options&&++a<i;){const u=l;u.$options&&u.$options.components&&u.$options.components[n]?s=u.$options.components[n]:u[n]&&(s=u[n]),l=l.parent}for(a=0,l=t.parent;!s&&l&&++a<i;){if(l.exposed){const u=l;u.exposed&&u.exposed[n]?s=u.exposed[n]:u[n]&&(s=u[n])}l=l.parent}if(!s){const u=t.appContext.components;u&&u[n]&&(s=u[n])}return!s&&!o?(gt(114,{component:n}),null):(s&&(r||(r=new Map,this.componentCache.set(t,r)),r.set(n,s)),s)}};ua(ID,"componentCache",new WeakMap);let aw=ID;class jJ extends AU{constructor(t,n){super(),ua(this,"parent"),ua(this,"provides"),this.parent=t,this.provides=n}createWrapper(t){const n=this;class i extends KJ{init(s){super.init(s)}hasMethod(s){var a,l;const u=o.getFrameworkComponentInstance();return u[s]?!0:((a=u.$.exposed)==null?void 0:a[s])!=null||((l=u.exposed)==null?void 0:l[s])!=null||u.$.setupState[s]!=null}callMethod(s,a){var l,u;const h=this.getFrameworkComponentInstance(),f=o.getFrameworkComponentInstance();if(f[s])return f[s].apply(h,a);{const p=((l=h.$.exposed)==null?void 0:l[s])||((u=h.exposed)==null?void 0:u[s])||h.$.setupState[s];return p?.apply(h,a)}}addMethod(s,a){o[s]=a}processMethod(s,a){return s==="refresh"&&(this.getFrameworkComponentInstance().params=Object.freeze(a[0])),this.hasMethod(s)?this.callMethod(s,a):s==="refresh"}createComponent(s){return n.createComponent(t,s)}}const o=new i;return o}createComponent(t,n){return aw.createAndMountComponent(t,n,this.parent,this.provides)}createMethodProxy(t,n,i){return function(){return t.hasMethod(n)?t.callMethod(n,arguments):(i&&se(233,{methodName:n}),null)}}destroy(){this.parent=null}}class KJ{constructor(){ua(this,"componentInstance"),ua(this,"element"),ua(this,"unmount")}getGui(){return this.element}destroy(){var t;this.getFrameworkComponentInstance()&&typeof this.getFrameworkComponentInstance().destroy=="function"&&this.getFrameworkComponentInstance().destroy(),(t=this.unmount)==null||t.call(this)}getFrameworkComponentInstance(){return this.componentInstance}init(t){const{componentInstance:n,element:i,destroy:o}=this.createComponent(t);this.componentInstance=n,this.unmount=o,this.element=i.firstElementChild??i}}class qJ extends ZF{constructor(t){super("vue"),ua(this,"parent"),this.parent=t}frameworkComponent(t,n){let i=aw.searchForComponentInstance(this.parent,t,10,!0)?t:null;if(!i&&n&&n[t]){const o=n[t];i=aw.searchForComponentInstance(this.parent,o,10,!0)?o:null}return i}isFrameworkComponent(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)}}function QJ(){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,tooltipSwitchShowDelay: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,animateColumnResizing: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,enableCharts:void 0,chartThemes:void 0,customChartThemes:void 0,chartThemeOverrides:void 0,chartToolPanelsDef:void 0,chartMenuItems:void 0,loadingCellRenderer:void 0,loadingCellRendererParams:void 0,loadingCellRendererSelector:void 0,localeText:void 0,masterDetail:void 0,keepDetailRows:void 0,keepDetailRowsCount:void 0,detailCellRenderer:void 0,detailCellRendererParams:void 0,detailRowHeight:void 0,detailRowAutoHeight:void 0,context:void 0,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,suppressOverlays:void 0,overlayComponent:void 0,overlayComponentParams:void 0,overlayComponentSelector:void 0,activeOverlay:void 0,activeOverlayParams: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,formulaDataSource:void 0,formulaFuncs: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,refreshAfterGroupEdit: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,groupHideColumnsUntilExpanded: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,tabToNextGridContainer: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 YJ=(e,t)=>{let n;const i=()=>{window.clearTimeout(n),n=window.setTimeout(e,t)};return i.cancel=()=>{window.clearTimeout(n)},i};function ZJ(e){if(!e||typeof e!="object"||Array.isArray(e))return!1;const t=Object.getPrototypeOf(e);return t!==null&&t!==Object.prototype}function Su(e){if(e==null||typeof e!="object")return e;const t=new WeakSet,n=i=>{if(i==null||typeof i!="object")return i;if(qt(i))return n(i.value);if(Uo(i)||Pa(i))return n(ut(i));if(ZJ(i))return ut(i);if(Array.isArray(i)){let s=!1;for(let a=0;a<i.length;a++){const l=i[a];if(l!==null&&typeof l=="object"){if(qt(l)||Uo(l)||Pa(l)){s=!0;break}s=!0;break}}return s?i.map(a=>n(a)):i}if(t.has(i))return i;t.add(i);const o=Object.keys(i),r={};for(let s=0;s<o.length;s++)r[o[s]]=n(i[o[s]]);return r};return n(e)}const XJ={ref:"root"},JJ=xt({__name:"AgGridVue",props:ka(OM({gridOptions:{},modules:{},statusBar:{},sideBar:{type:[Object,String,Array,Boolean,null]},suppressContextMenu:{type:Boolean},preventDefaultOnContextMenu:{type:Boolean},allowContextMenuWithControlKey:{type:Boolean},columnMenu:{},suppressMenuHide:{type:Boolean},enableBrowserTooltips:{type:Boolean},tooltipTrigger:{},tooltipShowDelay:{},tooltipSwitchShowDelay:{},tooltipHideDelay:{},tooltipMouseTrack:{type:Boolean},tooltipShowMode:{},tooltipInteraction:{type:Boolean},popupParent:{},copyHeadersToClipboard:{type:Boolean},copyGroupHeadersToClipboard:{type:Boolean},clipboardDelimiter:{},suppressCopyRowsToClipboard:{type:Boolean},suppressCopySingleCellRanges:{type:Boolean},suppressLastEmptyLineOnPaste:{type:Boolean},suppressClipboardPaste:{type:Boolean},suppressClipboardApi:{type:Boolean},suppressCutToClipboard:{type:Boolean},columnDefs:{},defaultColDef:{},defaultColGroupDef:{},columnTypes:{},dataTypeDefinitions:{},maintainColumnOrder:{type:Boolean},enableStrictPivotColumnOrder:{type:Boolean},suppressFieldDotNotation:{type:Boolean},headerHeight:{},groupHeaderHeight:{},floatingFiltersHeight:{},pivotHeaderHeight:{},pivotGroupHeaderHeight:{},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:{},suppressAutoSize:{type:Boolean},autoSizePadding:{},skipHeaderOnAutoSize:{type:Boolean},autoSizeStrategy:{},animateColumnResizing:{type:Boolean},components:{},editType:{},suppressStartEditOnTab:{type:Boolean},getFullRowEditValidationErrors:{type:Function},invalidEditValueMode:{},singleClickEdit:{type:Boolean},suppressClickEdit:{type:Boolean},readOnlyEdit:{type:Boolean},stopEditingWhenCellsLoseFocus:{type:Boolean},enterNavigatesVertically:{type:Boolean},enterNavigatesVerticallyAfterEdit:{type:Boolean},enableCellEditingOnBackspace:{type:Boolean},undoRedoCellEditing:{type:Boolean},undoRedoCellEditingLimit:{},defaultCsvExportParams:{},suppressCsvExport:{type:Boolean},defaultExcelExportParams:{},suppressExcelExport:{type:Boolean},excelStyles:{},findSearchValue:{},findOptions:{},quickFilterText:{},cacheQuickFilter:{type:Boolean},includeHiddenColumnsInQuickFilter:{type:Boolean},quickFilterParser:{type:Function},quickFilterMatcher:{type:Function},applyQuickFilterBeforePivotOrAgg:{type:Boolean},excludeChildrenWhenTreeDataFiltering:{type:Boolean},enableAdvancedFilter:{type:Boolean},alwaysPassFilter:{type:Function},includeHiddenColumnsInAdvancedFilter:{type:Boolean},advancedFilterParent:{},advancedFilterBuilderParams:{},advancedFilterParams:{},suppressAdvancedFilterEval:{type:Boolean},suppressSetFilterByDefault:{type:Boolean},enableFilterHandlers:{type:Boolean},filterHandlers:{},enableCharts:{type:Boolean},chartThemes:{},customChartThemes:{},chartThemeOverrides:{},chartToolPanelsDef:{},chartMenuItems:{type:[Array,Function]},loadingCellRenderer:{},loadingCellRendererParams:{},loadingCellRendererSelector:{type:Function},localeText:{},masterDetail:{type:Boolean},keepDetailRows:{type:Boolean},keepDetailRowsCount:{},detailCellRenderer:{},detailCellRendererParams:{},detailRowHeight:{},detailRowAutoHeight:{type:Boolean},context:{},alignedGrids:{type:[Array,Function]},tabIndex:{},rowBuffer:{},valueCache:{type:Boolean},valueCacheNeverExpires:{type:Boolean},enableCellExpressions:{type:Boolean},suppressTouch:{type:Boolean},suppressFocusAfterRefresh:{type:Boolean},suppressBrowserResizeObserver:{type:Boolean},suppressPropertyNamesCheck:{type:Boolean},suppressChangeDetection:{type:Boolean},debug:{type:Boolean},loading:{type:Boolean},overlayLoadingTemplate:{},loadingOverlayComponent:{},loadingOverlayComponentParams:{},suppressLoadingOverlay:{type:Boolean},overlayNoRowsTemplate:{},noRowsOverlayComponent:{},noRowsOverlayComponentParams:{},suppressNoRowsOverlay:{type:Boolean},suppressOverlays:{},overlayComponent:{},overlayComponentParams:{},overlayComponentSelector:{type:Function},activeOverlay:{},activeOverlayParams:{},pagination:{type:Boolean},paginationPageSize:{},paginationPageSizeSelector:{type:[Array,Boolean]},paginationAutoPageSize:{type:Boolean},paginateChildRows:{type:Boolean},suppressPaginationPanel:{type:Boolean},pivotMode:{type:Boolean},pivotPanelShow:{},pivotMaxGeneratedColumns:{},pivotDefaultExpanded:{},pivotColumnGroupTotals:{},pivotRowTotals:{},pivotSuppressAutoColumn:{type:Boolean},suppressExpandablePivotGroups:{type:Boolean},functionsReadOnly:{type:Boolean},aggFuncs:{},formulaDataSource:{},formulaFuncs:{},suppressAggFuncInHeader:{type:Boolean},alwaysAggregateAtRootLevel:{type:Boolean},aggregateOnlyChangedColumns:{type:Boolean},suppressAggFilteredOnly:{type:Boolean},removePivotHeaderRowWhenSingleValueColumn:{type:Boolean},animateRows:{type:Boolean},cellFlashDuration:{},cellFadeDuration:{},allowShowChangeAfterFilter:{type:Boolean},domLayout:{},ensureDomOrder:{type:Boolean},enableCellSpan:{type:Boolean},enableRtl:{type:Boolean},suppressColumnVirtualisation:{type:Boolean},suppressMaxRenderedRowRestriction:{type:Boolean},suppressRowVirtualisation:{type:Boolean},rowDragManaged:{type:Boolean},refreshAfterGroupEdit:{type:Boolean},rowDragInsertDelay:{},suppressRowDrag:{type:Boolean},suppressMoveWhenRowDragging:{type:Boolean},rowDragEntireRow:{type:Boolean},rowDragMultiRow:{type:Boolean},rowDragText:{type:Function},dragAndDropImageComponent:{},dragAndDropImageComponentParams:{},fullWidthCellRenderer:{},fullWidthCellRendererParams:{},embedFullWidthRows:{type:Boolean},groupDisplayType:{},groupDefaultExpanded:{},autoGroupColumnDef:{},groupMaintainOrder:{type:Boolean},groupSelectsChildren:{type:Boolean},groupLockGroupColumns:{},groupAggFiltering:{type:[Boolean,Function]},groupTotalRow:{type:[String,Function]},grandTotalRow:{},suppressStickyTotalRow:{type:[Boolean,String]},groupSuppressBlankHeader:{type:Boolean},groupSelectsFiltered:{type:Boolean},showOpenedGroup:{type:Boolean},groupHideParentOfSingleChild:{type:[Boolean,String]},groupRemoveSingleChildren:{type:Boolean},groupRemoveLowestSingleChildren:{type:Boolean},groupHideOpenParents:{type:Boolean},groupHideColumnsUntilExpanded:{type:Boolean},groupAllowUnbalanced:{type:Boolean},rowGroupPanelShow:{},groupRowRenderer:{},groupRowRendererParams:{},treeData:{type:Boolean},treeDataChildrenField:{},treeDataParentIdField:{},rowGroupPanelSuppressSort:{type:Boolean},suppressGroupRowsSticky:{type:Boolean},groupHierarchyConfig:{},pinnedTopRowData:{},pinnedBottomRowData:{},enableRowPinning:{type:[Boolean,String]},isRowPinnable:{type:Function},isRowPinned:{type:Function},rowModelType:{},rowData:{},asyncTransactionWaitMillis:{},suppressModelUpdateAfterUpdateTransaction:{type:Boolean},datasource:{},cacheOverflowSize:{},infiniteInitialRowCount:{},serverSideInitialRowCount:{},suppressServerSideFullWidthLoadingRow:{type:Boolean},cacheBlockSize:{},maxBlocksInCache:{},maxConcurrentDatasourceRequests:{},blockLoadDebounceMillis:{},purgeClosedRowNodes:{type:Boolean},serverSideDatasource:{},serverSideSortAllLevels:{type:Boolean},serverSideEnableClientSideSort:{type:Boolean},serverSideOnlyRefreshFilteredGroups:{type:Boolean},serverSidePivotResultFieldSeparator:{},viewportDatasource:{},viewportRowModelPageSize:{},viewportRowModelBufferSize:{},alwaysShowHorizontalScroll:{type:Boolean},alwaysShowVerticalScroll:{type:Boolean},debounceVerticalScrollbar:{type:Boolean},suppressHorizontalScroll:{type:Boolean},suppressScrollOnNewData:{type:Boolean},suppressScrollWhenPopupsAreOpen:{type:Boolean},suppressAnimationFrame:{type:Boolean},suppressMiddleClickScrolls:{type:Boolean},suppressPreventDefaultOnMouseWheel:{type:Boolean},scrollbarWidth:{},rowSelection:{},cellSelection:{type:[Boolean,Object]},rowMultiSelectWithClick:{type:Boolean},suppressRowDeselection:{type:Boolean},suppressRowClickSelection:{type:Boolean},suppressCellFocus:{type:Boolean},suppressHeaderFocus:{type:Boolean},selectionColumnDef:{},rowNumbers:{type:[Boolean,Object]},suppressMultiRangeSelection:{type:Boolean},enableCellTextSelection:{type:Boolean},enableRangeSelection:{type:Boolean},enableRangeHandle:{type:Boolean},enableFillHandle:{type:Boolean},fillHandleDirection:{},suppressClearOnFillReduction:{type:Boolean},sortingOrder:{},accentedSort:{type:Boolean},unSortIcon:{type:Boolean},suppressMultiSort:{type:Boolean},alwaysMultiSort:{type:Boolean},multiSortKey:{},suppressMaintainUnsortedOrder:{type:Boolean},icons:{},rowHeight:{},rowStyle:{},rowClass:{},rowClassRules:{},suppressRowHoverHighlight:{type:Boolean},suppressRowTransform:{type:Boolean},columnHoverHighlight:{type:Boolean},gridId:{},deltaSort:{type:Boolean},treeDataDisplayType:{},enableGroupEdit:{type:Boolean},initialState:{},theme:{},loadThemeGoogleFonts:{type:Boolean},themeCssLayer:{},styleNonce:{},themeStyleContainer:{type:Function},getContextMenuItems:{type:Function},getMainMenuItems:{type:Function},postProcessPopup:{type:Function},processUnpinnedColumns:{type:Function},processCellForClipboard:{type:Function},processHeaderForClipboard:{type:Function},processGroupHeaderForClipboard:{type:Function},processCellFromClipboard:{type:Function},sendToClipboard:{type:Function},processDataFromClipboard:{type:Function},isExternalFilterPresent:{type:Function},doesExternalFilterPass:{type:Function},getChartToolbarItems:{type:Function},createChartContainer:{type:Function},focusGridInnerElement:{type:Function},navigateToNextHeader:{type:Function},tabToNextHeader:{type:Function},navigateToNextCell:{type:Function},tabToNextCell:{type:Function},tabToNextGridContainer:{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:{type:Function},getChildCount:{type:Function},getServerSideGroupLevelParams:{type:Function},isServerSideGroupOpenByDefault:{type:Function},isApplyServerSideTransaction:{type:Function},isServerSideGroup:{type:Function},getServerSideGroupKey:{type:Function},getBusinessKeyForNode:{type:Function},getRowId:{type:Function},resetRowDataOnUpdate:{type:Boolean},processRowPostCreate:{type:Function},isRowSelectable:{type:Function},isRowMaster:{type:Function},fillOperation:{type:Function},postSortRows:{type:Function},getRowStyle:{type:Function},getRowClass:{type:Function},getRowHeight:{type:Function},isFullWidthRow:{type:Function},isRowValidDropPosition:{type:Function},"onTool-panel-visible-changed":{},"onTool-panel-size-changed":{},"onColumn-menu-visible-changed":{},"onContext-menu-visible-changed":{},"onCut-start":{},"onCut-end":{},"onPaste-start":{},"onPaste-end":{},"onColumn-visible":{},"onColumn-pinned":{},"onColumn-resized":{},"onColumn-moved":{},"onColumn-value-changed":{},"onColumn-pivot-mode-changed":{},"onColumn-pivot-changed":{},"onColumn-group-opened":{},"onNew-columns-loaded":{},"onGrid-columns-changed":{},"onDisplayed-columns-changed":{},"onVirtual-columns-changed":{},"onColumn-everything-changed":{},"onColumns-reset":{},"onColumn-header-mouse-over":{},"onColumn-header-mouse-leave":{},"onColumn-header-clicked":{},"onColumn-header-context-menu":{},"onComponent-state-changed":{},"onCell-value-changed":{},"onCell-edit-request":{},"onRow-value-changed":{},"onCell-editing-started":{},"onCell-editing-stopped":{},"onRow-editing-started":{},"onRow-editing-stopped":{},"onBulk-editing-started":{},"onBulk-editing-stopped":{},"onBatch-editing-started":{},"onBatch-editing-stopped":{},"onUndo-started":{},"onUndo-ended":{},"onRedo-started":{},"onRedo-ended":{},"onCell-selection-delete-start":{},"onCell-selection-delete-end":{},"onRange-delete-start":{},"onRange-delete-end":{},"onFill-start":{},"onFill-end":{},"onFilter-opened":{},"onFilter-changed":{},"onFilter-modified":{},"onFilter-ui-changed":{},"onFloating-filter-ui-changed":{},"onAdvanced-filter-builder-visible-changed":{},"onFind-changed":{},"onChart-created":{},"onChart-range-selection-changed":{},"onChart-options-changed":{},"onChart-destroyed":{},"onCell-key-down":{},"onGrid-ready":{},"onGrid-pre-destroyed":{},"onFirst-data-rendered":{},"onGrid-size-changed":{},"onModel-updated":{},"onVirtual-row-removed":{},"onViewport-changed":{},"onBody-scroll":{},"onBody-scroll-end":{},"onDrag-started":{},"onDrag-stopped":{},"onDrag-cancelled":{},"onState-updated":{},"onPagination-changed":{},"onRow-drag-enter":{},"onRow-drag-move":{},"onRow-drag-leave":{},"onRow-drag-end":{},"onRow-drag-cancel":{},"onRow-resize-started":{},"onRow-resize-ended":{},"onColumn-row-group-changed":{},"onRow-group-opened":{},"onExpand-or-collapse-all":{},"onPivot-max-columns-exceeded":{},"onPinned-row-data-changed":{},"onPinned-rows-changed":{},"onRow-data-updated":{},"onAsync-transactions-flushed":{},"onStore-refreshed":{},"onHeader-focused":{},"onCell-clicked":{},"onCell-double-clicked":{},"onCell-focused":{},"onCell-mouse-over":{},"onCell-mouse-out":{},"onCell-mouse-down":{},"onRow-clicked":{},"onRow-double-clicked":{},"onRow-selected":{},"onSelection-changed":{},"onCell-context-menu":{},"onRange-selection-changed":{},"onCell-selection-changed":{},"onTooltip-show":{},"onTooltip-hide":{},"onSort-changed":{}},QJ()),{modelValue:{},modelModifiers:{}}),emits:ka(["update:modelValue"],["update:modelValue"]),setup(e,{expose:t,emit:n}){const i=e,o=wM("root"),r=wo(void 0),s=wo(!1),a=wo(!1),l=wo(!1);let u={},h=!1;const f=qI(i),p=new Set(a5());jm().filter(_=>_!="gridOptions").forEach(_=>{const A=f[_];A&&un(A,(T,k)=>{(_==="rowData"&&!b.value||_!=="rowData")&&V(_,T),_==="rowData"&&(b.value=!1)},p.has(_)?void 0:{deep:!0})});const m=new Set(["rowDataUpdated","cellValueChanged","rowValueChanged"]),v=Tr(e,"modelValue"),w=wo(!1),b=wo(!1),y=n;un(v,(_,A)=>{s.value&&(b.value||(w.value=!0,V("rowData",Su(_),Su(A))),b.value=!1)},{deep:!0});const R=YJ(()=>{b.value=!0,y("update:modelValue",I())},10),S=Qo(),P=_=>{var A,T;l.value&&m.has(_)&&(T=(A=S?.vnode)==null?void 0:A.props)!=null&&T["onUpdate:modelValue"]&&R()},F=()=>v.value||i.rowData||i.gridOptions.rowData,I=()=>{const _=[];return r?.value.forEachLeafNode(A=>{_.push(A.data)}),_},L=_=>A=>{if(a.value)return;A==="gridReady"&&(l.value=!0);const T=kc.has(A);T&&!_||!T&&_||m.has(A)&&(!w.value&&s.value&&P(A),w.value=!1)},V=(_,A,T)=>{if(s.value){let k=A;_==="rowData"&&k!=null&&(k=Su(k)),u[_]=k,h||(h=!0,queueMicrotask(()=>{h=!1,!a.value&&r.value&&xO(u,r.value),u={}}))}},G=()=>Object.create(Qo().provides);return Rs(()=>{Va(ox,void 0,!0);const _=new jJ(Qo(),G()),A={globalListener:L(),globalSyncListener:L(!0),frameworkOverrides:new qJ(Qo()),providedBeanInstances:{frameworkCompWrapper:_},modules:i.modules},T=qb(FO(Su(i.gridOptions),i,[...jm(),...Object.values(vh)])),k=F();k!==void 0&&(w.value=!0,T.rowData=Su(k)),r.value=F3(o.value,T,A),s.value=!0}),dd(()=>{var _;s.value&&(R.cancel(),(_=r?.value)==null||_.destroy(),a.value=!0)}),t({api:r}),(_,A)=>(ce(),xe("div",XJ,null,512))}}),eee={class:"ag-cf9a-filter","aria-description":"filter modal",role:"dialog"},tee={class:"ag-cf9a-title-row","aria-description":"container for title and close buttton"},nee={class:"ag-cf9a-title"},iee=["onKeydown"],oee=["value"],ree=["type","onKeydown"],see=["type","onKeydown"],aee={key:1,"aria-description":"container for condition 2 inputs"},lee=["onKeydown"],cee=["onKeydown"],uee=["value"],dee=["type","onKeydown"],Ut=zt(xt({__name:"BaseColumnFilter",props:{params:{type:Object}},setup(e){const t=Ce(null),n=Ce(""),i=Ce("equals"),o=Ce(""),r=Ce("equals"),s=Ce(""),a=Ce("AND"),l=De(()=>e.params.filterKind??"text"),u=De(()=>l.value==="number"?"number":l.value==="date"?"date":"text"),h=De(()=>i.value==="inRange"&&l.value!=="text"),f=De(()=>e.params.title??e.params.column?.getColDef().headerName??e.params.column?.getColDef().field??""),p=De(()=>l.value==="text"?[{label:"is equal to",value:"equals"},{label:"is not equal to",value:"notEqual"},{label:"contains",value:"contains"},{label:"does not contain",value:"notContains"},{label:"begins with",value:"startsWith"},{label:"ends with",value:"endsWith"}]:[{label:"is equal to",value:"equals"},{label:"is not equal to",value:"notEqual"},{label:"is less than",value:"lessThan"},{label:"is greater than",value:"greaterThan"},{label:"is less than or equal to",value:"lessThanOrEqual"},{label:"is greater than or equal to",value:"greaterThanOrEqual"},{label:"is between",value:"inRange"}]),m=()=>{e.params.hidePopup?.(),e.params.api?.hidePopupMenu?.()},v=async()=>{await Dr(),t.value?.focus()},w=P=>{if(!P){a.value="AND",n.value="",i.value="equals",o.value="",r.value="equals",s.value="";return}if("condition1"in P){a.value=P.operator??"AND",n.value=String(P.condition1?.filterTo??P.condition1?.dateTo??""),i.value=P.condition1?.type??"equals",o.value=String(P.condition1?.filter??P.condition1?.dateFrom??""),r.value=P.condition2?.type??"equals",s.value=String(P.condition2?.filter??P.condition2?.dateFrom??"");return}n.value=String(P.filterTo??P.dateTo??""),i.value=P.type??"equals",o.value=String(P.filter??P.dateFrom??""),r.value="equals",s.value=""},b=(P,F,I="")=>{const L=Pe.isString(F)?F.trim():F,V=Pe.isString(I)?I.trim():I;return Pe.isNil(L)||Pe.isString(L)&&Pe.isEmpty(L)?null:l.value==="number"?P==="inRange"?Pe.isNil(V)?null:{filter:Number(L),filterTo:Number(V),filterType:"number",type:P}:{filter:Number(L),filterType:"number",type:P}:l.value==="date"?P==="inRange"?Pe.isNil(V)?null:{dateFrom:L,dateTo:V,filterType:"date",type:P}:{dateFrom:L,filterType:"date",type:P}:{filter:L,filterType:"text",type:P}},y=P=>{e.params.onStateChange?.({model:P}),e.params.onModelChange?.(P)},R=()=>{const P=b(i.value,o.value,n.value),F=b(r.value,s.value);if(!P&&!F){y(null),e.params.onAction?.("apply"),m();return}if(P&&F){y({condition1:P,condition2:F,filterType:l.value,operator:a.value}),e.params.onAction?.("apply"),m();return}if(i.value==="inRange"){P&&y({condition1:P,filterType:l.value,operator:a.value}),e.params.onAction?.("apply"),m();return}y(P??F),e.params.onAction?.("apply"),m()},S=()=>{w(null),y(null),e.params.onAction?.("clear"),m()};return un(()=>e.params.model,P=>w(P),{immediate:!0}),Rs(()=>{v()}),(P,F)=>(ce(),xe("div",eee,[W("div",tee,[W("header",nee,[W("h3",null,Ye(f.value),1)]),W("button",{class:"ag-cf9a-close-button",onClick:m,"aria-label":"Close Filter"}," × ")]),F[7]||(F[7]=W("p",{class:"ag-cf9a-helper-text"}," Show items with value that ",-1)),cn(W("select",{"onUpdate:modelValue":F[0]||(F[0]=I=>i.value=I),class:"ag-cf9a-select",onKeydown:[dn(Et(m,["prevent","stop"]),["esc"]),dn(Et(R,["prevent","stop"]),["enter"])]},[(ce(!0),xe(pt,null,ei(p.value,I=>(ce(),xe("option",{key:I.value,value:I.value},Ye(I.label),9,oee))),128))],40,iee),[[oc,i.value]]),cn(W("input",{ref_key:"condition1Input",ref:t,"onUpdate:modelValue":F[1]||(F[1]=I=>o.value=I),class:"ag-cf9a-input",placeholder:"Enter value...",type:u.value,onKeydown:[dn(Et(m,["prevent","stop"]),["esc"]),dn(Et(R,["prevent","stop"]),["enter"])]},null,40,ree),[[ag,o.value]]),h.value?cn((ce(),xe("input",{key:0,"onUpdate:modelValue":F[2]||(F[2]=I=>n.value=I),class:"ag-cf9a-input",placeholder:"Enter end value...",type:u.value,onKeydown:[dn(Et(m,["prevent","stop"]),["esc"]),dn(Et(R,["prevent","stop"]),["enter"])]},null,40,see)),[[ag,n.value]]):_t("",!0),h.value?_t("",!0):(ce(),xe("div",aee,[cn(W("select",{"onUpdate:modelValue":F[3]||(F[3]=I=>a.value=I),class:"ag-cf9a-select",onKeydown:[dn(Et(m,["prevent","stop"]),["esc"]),dn(Et(R,["prevent","stop"]),["enter"])]},[...F[6]||(F[6]=[W("option",{value:"AND"},"And",-1),W("option",{value:"OR"},"Or",-1)])],40,lee),[[oc,a.value]]),cn(W("select",{"onUpdate:modelValue":F[4]||(F[4]=I=>r.value=I),class:"ag-cf9a-select",onKeydown:[dn(Et(m,["prevent","stop"]),["esc"]),dn(Et(R,["prevent","stop"]),["enter"])]},[(ce(!0),xe(pt,null,ei(p.value,I=>(ce(),xe("option",{key:I.value,value:I.value},Ye(I.label),9,uee))),128))],40,cee),[[oc,r.value]]),cn(W("input",{"onUpdate:modelValue":F[5]||(F[5]=I=>s.value=I),class:"ag-cf9a-input",placeholder:"Enter value...",type:u.value,onKeydown:[dn(Et(m,["prevent","stop"]),["esc"]),dn(Et(R,["prevent","stop"]),["enter"])]},null,40,dee),[[ag,s.value]])])),W("div",{class:"ag-cf9a-actions","aria-description":"container for buttons"},[W("button",{class:"ag-cf9a-button ag-cf9a-button-secondary",onClick:S}," Clear "),W("button",{class:"ag-cf9a-button ag-cf9a-button-primary",onClick:R}," Filter ")])]))}}),[["styles",[".ag-cf9a-actions{display:flex;gap:.625rem;padding-top:.25rem;width:100%}.ag-cf9a-button{border-radius:.25rem;cursor:pointer;flex:1;font-family:inherit;height:2.125rem}.ag-cf9a-button-primary{background:var(--color-primary-green);border:.0625rem solid var(--color-primary-green);color:var(--color-white);font-weight:600}.ag-cf9a-button-secondary{background:var(--color-white);border:.0625rem solid var(--color-secondary-grey);color:var(--color-primary-black);font-weight:600}.ag-cf9a-close-button{align-items:center;background:transparent;border:0;color:var(--color-primary-black);cursor:pointer;display:flex;font-family:inherit;font-size:1rem;font-weight:700;height:1.5rem;justify-content:center;padding:0;transition:color .2s ease;width:1.5rem}.ag-cf9a-close-button:hover{color:var(--color-primary-green)}.ag-cf9a-currency-cell{font-weight:600}.ag-cf9a-filter{background:var(--color-white);border:.0625rem solid var(--color-primary-green);border-radius:.25rem;box-shadow:0 .125rem .5rem #0000001f;box-sizing:border-box;display:flex;flex-direction:column;font-family:Poppins,sans-serif;padding:.75rem;width:21.25rem}.ag-cf9a-helper-text{color:var(--color-primary-black);font-size:.75rem;margin-bottom:.625rem}.ag-cf9a-input,.ag-cf9a-select{border:.0625rem solid var(--color-secondary-grey);border-radius:.25rem;box-sizing:border-box;display:block;font-family:inherit;height:2.125rem;margin-bottom:.625rem;padding:0 .625rem;width:100%}.ag-cf9a-input::placeholder{color:var(--color-primary-black);opacity:.5}.ag-cf9a-title{color:var(--color-primary-black);font-size:.875rem;font-weight:600}.ag-cf9a-title h3{margin:0}.ag-cf9a-title-row{align-items:center;border-bottom:.0625rem solid var(--color-primary-grey);display:flex;justify-content:space-between;margin-bottom:.75rem;padding-bottom:.5rem}"]]]),Mf={filterKind:"date"},MD={filterKind:"number"},xn={filterKind:"text"},kD=e=>{if(Pe.isNil(e))return"";const t=Number(e);return Number.isNaN(t)?"":t.toLocaleString("en-US",{currency:"USD",style:"currency"})},LD=e=>{if(Pe.isNil(e)||Pe.isEmpty(e))return"";const t=new Date(e);return Number.isNaN(t.getTime())?"":t.toLocaleDateString("en-CA")},lw=[{headerName:"Details",field:"id",sortable:!1,filter:!1,resizable:!0,width:120,suppressHeaderMenuButton:!0,cellRenderer:e=>{const t=e.data?.id;return t?`<a id="contribution-details-link-${t}" class="contribution-details-link" style="color:var(--color-primary-green)" href="/pcv/contribution/${t}">View</a>`:""}},{field:"contributor",headerName:"Contributor",filter:{component:Ut,doesFilterPass:()=>!0},filterParams:xn},{field:"employer",headerName:"Employer",filter:{component:Ut,doesFilterPass:()=>!0},filterParams:xn},{field:"employeeStatus",headerName:"Employee Status",filter:{component:Ut,doesFilterPass:()=>!0},filterParams:xn},{field:"occupation",headerName:"Occupation",filter:{component:Ut,doesFilterPass:()=>!0},filterParams:xn},{field:"address",headerName:"Address",filter:{component:Ut,doesFilterPass:()=>!0},filterParams:xn},{field:"state",headerName:"State",filter:{component:Ut,doesFilterPass:()=>!0},filterParams:xn},{field:"zipCode",headerName:"Zip Code",filter:{component:Ut,doesFilterPass:()=>!0},filterParams:xn},{field:"date",headerName:"Date",filter:{component:Ut,doesFilterPass:()=>!0},filterParams:Mf},{field:"dateDetected",headerName:"Date Detected",filter:{component:Ut,doesFilterPass:()=>!0},filterParams:Mf,valueFormatter:e=>LD(e.value)},{field:"amount",headerName:"Amount",filter:{component:Ut,doesFilterPass:()=>!0},filterParams:MD,valueFormatter:e=>kD(e.value),cellClass:"ag-cf9a-currency-cell"},{field:"recipient",headerName:"Recipient",filter:{component:Ut,doesFilterPass:()=>!0},filterParams:xn},{field:"status",headerName:"Status",filter:{component:Ut,doesFilterPass:()=>!0},filterParams:xn},{field:"reconciliationStatus",headerName:"Reconciliation Status",filter:{component:Ut,doesFilterPass:()=>!0},filterParams:xn},{field:"preclearance",headerName:"Preclearance",filter:{component:Ut,doesFilterPass:()=>!0},filterParams:xn,cellRenderer:e=>{const t=e.data?.preclearance;return t?`<a id="contribution-preclearance-link-${t}" class="contribution-preclearance-link" style="color:var(--color-primary-green)" href="/preclearance/${t}">${t}</a>`:""}},{field:"approvalDate",headerName:"Approval Date",filter:{component:Ut,doesFilterPass:()=>!0},filterParams:Mf},{field:"approvedAmount",headerName:"Approved Amount",filter:{component:Ut,doesFilterPass:()=>!0},filterParams:MD,valueFormatter:e=>kD(e.value),cellClass:"ag-cf9a-currency-cell"},{field:"amended",headerName:"Amended",filter:{component:Ut,doesFilterPass:()=>!0},filterParams:xn},{field:"lastUpdated",headerName:"Last Updated",filter:{component:Ut,doesFilterPass:()=>!0},filterParams:Mf,valueFormatter:e=>LD(e.value)},{field:"lastUpdatedBy",headerName:"Last Updated By",filter:{component:Ut,doesFilterPass:()=>!0},filterParams:xn},{field:"notes",headerName:"Notes",filter:{component:Ut,doesFilterPass:()=>!0},filterParams:xn},{field:"tags",headerName:"Tags",filter:{component:Ut,doesFilterPass:()=>!0},filterParams:xn},{field:"groups",headerName:"Groups",filter:{component:Ut,doesFilterPass:()=>!0},filterParams:xn},{field:"sources",headerName:"Source",filter:{component:Ut,doesFilterPass:()=>!0},filterParams:xn}],hee={comparator:()=>0,filter:!0,flex:1,floatingFilter:!1,minWidth:180,resizable:!0,sortable:!0},fee={maxWidth:56,minWidth:56,pinned:"left",resizable:!1,sortable:!1,suppressHeaderMenuButton:!0,width:56},pee={mode:"multiRow",checkboxes:!0,headerCheckbox:!0,enableClickSelection:!1,selectAll:"all"},gee={class:"contributions-table","aria-description":"container for table and related controls"},mee={class:"contributions-table-toolbar","aria-description":"container for bulk and column controls"},vee={class:"bulk-controls","aria-description":"container for bulk controls"},Cee={key:0,"aria-description":"container for number of selected rows"},wee={key:1,class:"controls","aria-description":"container for controls"},bee=["value"],yee={class:"column-controls","aria-description":"container for column controls"},See={class:"contributions-table-footer","aria-description":"container for pagination controls",role:"footer"},Ree={class:"footer-left","aria-description":"container for page size controls"},Fee=["value"],xee={class:"footer-center","aria-description":"container for record count data"},Pee={class:"footer-right","aria-description":"container for page navigation controls"},Eee=["disabled"],Dee=["disabled"],Tee={"aria-description":"container for pagination data"},Aee=["disabled"],Iee=["disabled"],Mee={"aria-description":"container for bulk status modal content"},kee={class:"button-group","aria-description":"container for modal buttons"},Lee=["disabled"],Oee={"aria-description":"container for bulk note modal content"},_ee={class:"button-group","aria-description":"container for modal buttons"},Nee=["disabled"],Bee={"aria-description":"container for column visibility modal content"},Gee=["id","name","checked","onClick"],Hee=["for"],OD=zt(xt({__name:"ContributionsTable",props:ka({disabledColumns:{default:()=>[],type:Array},disableSelection:{type:Boolean,default:!1},match:{type:Boolean,default:!0},page:{type:String},presets:{default:()=>({}),type:Object},user:{type:Number},company:{type:Number},stack:{type:String}},{loading:{type:Boolean,default:!1},loadingModifiers:{},resultsTotal:{default:0},resultsTotalModifiers:{}}),emits:["update:loading","update:resultsTotal"],setup(e){const t=Tr(e,"loading"),n=Tr(e,"resultsTotal"),i=wY(),o=dD(Se=>Se.ContributionSearchReducer?.[e.page]),{trigger:r}=eX(),{trigger:s}=nX(),{trigger:a,isLoading:l}=vJ(),{data:u}=tw({user:e.user,company:e.company,stack:e.stack}),h=Ce(null),f=De(()=>lw.reduce((Se,ke)=>{const it=ke.field;if(e.disabledColumns.includes(it)||!y.value[it])return Se;let Ge=!1;return e.presets&&!Pe.isEmpty(e.presets)&&(Ge=!!e.presets[it]?.query?.length),[...Se,{...ke,filter:Ge?!1:ke.filter}]},[])),p=Ce(hee),m=Ce([]),v=Ce(null),w=Ce(null),b=Ce({}),y=Ce(lw.reduce((Se,ke)=>e.disabledColumns.includes(ke.field)?Se:{...Se,[ke.field]:!0},{})),R=Ce(!1),S=De(()=>n.value===0?0:Math.min(F.value*P.value,n.value)),P=Ce(100),F=Ce(1),I=[10,25,50,100],L=De(()=>n.value===0?0:(F.value-1)*P.value+1),V=Ce(1);let G;const _=Ce(pee),A=De(()=>k.value.length),T=Ce(fee),k=Ce([]),K=Ce(""),re=Ce(null),Re=Ce(null),be=Ce(null),fe=Ce(null),Fe=Ce({}),ue=Ce(null),N=Ce(!1),Q=De(()=>[{label:"Select Status",value:null},...(u.value??[]).map(Se=>({label:Se.name,value:Se.id}))]),j=Ce(null),ae=Ce(null),Te=Ce(null),Ae=Ce(null),ye=Ce({}),Oe=Ce(null),Ue=Ce(null),ze=Ce(!1),vt=async(Se,ke,it,Ge,Ze=190,Pn=8)=>{if(!Se||!ke)return;const uo=ke?.getBoundingClientRect(),sn=Math.max(Pn,Math.min(uo.right-Ze,window.innerWidth-Ze-Pn)),ai=Math.min(uo.bottom+Pn,window.innerHeight-120);it.value={position:"fixed",top:`${ai}px`,left:`${sn}px`,margin:"0"},await Dr(),Se?.showModal(),Ge.value=!0},M=Se=>{Se.stopPropagation();const ke=new Set([Re.value,be.value,fe.value,ue.value]),it=Se.target;N.value?ke.has(it)&&(fe.value?.close(),N.value=!1):vt(fe.value,re.value,Fe,N)},B=Se=>{Se.stopPropagation();const ke=new Set([ae.value,Te.value,Ae.value,Ue.value]),it=Se.target;j.value=parseInt((Se?.target).value)??null,!ze.value&&!Pe.isNil(j.value)?vt(Ae.value,Oe.value,ye,ze):ke.has(it)&&(Ae.value?.close(),j.value=null,Oe.value.selectedIndex=0,ze.value=!1)},U=Se=>{Se.stopPropagation(),R.value?Se.target===w.value&&(w.value?.close(),R.value=!1):vt(w.value,v.value,b,R,275,8)},ne=async()=>{F.value=1,await Ke()},ee=async()=>{F.value<=1||(F.value=1,await Ke())},Z=async()=>{F.value<=1||(F.value-=1,await Ke())},me=async()=>{F.value>=V.value||(F.value+=1,await Ke())},pe=async()=>{F.value>=V.value||(F.value=V.value,await Ke())},de=Se=>Se?.conditions?.length?Se.conditions:Se?.condition1||Se?.condition2?[Se.condition1,Se.condition2].filter(ke=>!Pe.isNil(ke)):[Se],te=Se=>(ke,it)=>{const Ge=de(it).reduce(Se,[]),Ze={page:e.page,filterName:ke},Pn=yJ(it?.operator,Ge);i(uD({...Ze,conjunction:Pn})),Ge.forEach(uo=>i(lD({...Ze,query:uo})))},Me=(Se,ke)=>{te((Ge,Ze)=>Pe.isEmpty(Ze?.dateFrom)?Ge:Ze.type==="inRange"&&!Pe.isEmpty(Ze.dateFrom)&&!Pe.isEmpty(Ze.dateTo)?[...Ge,si("greaterThanOrEqual",Pe.isDate(Ze.dateFrom)?Ze.dateFrom.toISOString().slice(0,10):Ze.dateFrom),si("lessThanOrEqual",Pe.isDate(Ze.dateTo)?Ze.dateTo.toISOString().slice(0,10):Ze.dateTo)]:[...Ge,si(Ze.type,Pe.toString(Ze.dateFrom))])(Se,ke)},Ee=(Se,ke)=>{te((Ge,Ze)=>Pe.isNil(Ze?.filter)?Ge:Ze.type==="inRange"&&!Pe.isNil(Ze.filter)&&!Pe.isNil(Ze.filterTo)?[...Ge,si("greaterThanOrEqual",Pe.toNumber(Ze.filter)),si("lessThanOrEqual",Pe.toNumber(Ze.filterTo))]:[...Ge,si(Ze.type,Pe.toNumber(Ze.filter))])(Se,ke)},Be=(Se,ke)=>{te((Ge,Ze)=>Pe.isEmpty(Ze?.filter)?Ge:[...Ge,si(Ze.type,Pe.toString(Ze.filter))])(Se,ke)},Ve=()=>{Pe.entries(e.presets).forEach(([Se,ke])=>{const it=ke.query;if(!(Pe.isArray(it)&&it.every(Pn=>Pe.isObject(Pn)&&Pe.has(Pn,"comparator")&&Pe.has(Pn,"value"))))return;const Ge=!it?.length||it.length<2?mn.NULL:ke.conjunction;if(Ge!==mn.NULL&&Ge!==mn.AND&&Ge!==mn.OR)return;const Ze={page:e.page,filterName:Se};i(cD({...Ze})),i(uD({...Ze,conjunction:Ge})),it.forEach(Pn=>i(lD({...Ze,query:Pn})))})},Je=Se=>{const ke=new Set(["date","dateDetected","approvalDate","lastUpdated"]),it=new Set(["amount","approvalAmount"]),Ge=new Set(["contributor","employer","employeeStatus","occupation","address","state","zipCode","recipient","status","reconciliationStatus","preclearance","amended","lastUpdatedBy","notes","tags","groups","sources"]),Ze=[...Array.from(ke),...Array.from(it),...Array.from(Ge)],Pn=Pe.entries(e.presets).reduce((sn,[ai,Ru])=>Ru?.query?.length?[...sn,ai]:sn,[]),uo=Pe.difference(Ze,Pn);Ve(),uo.forEach(sn=>{const ai={page:e.page,filterName:sn};i(cD({...ai}))}),Pe.entries(Se).forEach(([sn,ai])=>{ke.has(sn)?Me(sn,ai):it.has(sn)?Ee(sn,ai):Ge.has(sn)&&Be(sn,ai)})};function st(){return h.value?h.value.getColumnState().filter(Se=>Se.sort).sort((Se,ke)=>(Se.sortIndex??0)-(ke.sortIndex??0)).map(Se=>({column:Se.colId,direction:Se.sort})):[]}const Ke=async()=>{if(!e.user||!e.company||!e.stack)return;const Se=h.value?.getFilterModel()??{};Je(Se);const it=st()[0],Ge=Pe.entries(o.value).reduce((Pn,[uo,sn])=>{const ai=sn.query.filter(da=>(Pe.isString(da.value)&&!Pe.isEmpty(da.value)||!Pe.isNil(da.value))&&da.value!=="undefined"&&da.value!=="null"),Ru=ai?.length?sn.conjunction:mn.NULL;return{...Pn,[uo]:{conjunction:Ru,query:ai}}},{}),Ze=await a({user:e.user,company:e.company,stack:e.stack,page:F.value,limit:P.value,sortColumn:it?.column,sortOrder:it?.direction,match:e.match,body:Ge});m.value=Ze?.results??[],F.value=Ze?.page??1,P.value=Ze?.limit??P.value,n.value=Ze?.total??0,V.value=Ze?.totalPages??1,k.value=[]},Ht=()=>{window.clearTimeout(G),G=window.setTimeout(async()=>{F.value=1,await Ke()},500)},Vt=async()=>{F.value=1,await Ke()},tn=async Se=>{h.value=Se.api,await Ke()},vn=Se=>{k.value=Se.api.getSelectedRows()},yi=Se=>{if(K.value.length){const ke={contributions:k.value.map(it=>it.id),note:K.value,type:"user"};r(ke),M(Se)}},Bo=Se=>{if(!Pe.isNil(j.value)){const ke={contributions:k.value.map(it=>it.id),status:j.value};s(ke),B(Se)}};return un(l,Se=>{t.value=!!Se}),un(()=>[e.match,e.presets,e.user,e.company,e.stack],async()=>{h.value&&(F.value=1,await Ke())}),(Se,ke)=>{const it=hd("font-awesome-icon");return ce(),xe(pt,null,[W("div",gee,[W("div",mee,[W("div",vee,[e.disableSelection?_t("",!0):(ce(),xe("span",Cee,Ye(A.value)+" selected",1)),k.value.length?(ce(),xe("span",wee,[ke[2]||(ke[2]=Hn(" Change Status: ",-1)),W("select",{id:"bulk-status-select",ref_key:"bulkStatusSelect",ref:Oe,onChange:B},[(ce(!0),xe(pt,null,ei(Q.value,Ge=>(ce(),xe("option",{key:`status-${Ge.value}`,value:Ge.value},Ye(Ge.label),9,bee))),128))],544),W("button",{ref_key:"bulkNoteButton",ref:re,onClick:M}," Add Note ",512)])):_t("",!0)]),W("div",yee,[W("button",{ref_key:"columnsVisibilityButton",ref:v,onClick:U,"aria-label":"Toggle Columns"},[rt(it,{class:"columns-ellipsis-icon",icon:["fas","ellipsis-h"],size:"medium"})],512)])]),rt(fi(JJ),{class:"ag-theme-alpine contributions-grid",style:{height:"38.75rem",width:"100%"},columnDefs:f.value,defaultColDef:p.value,enableFilterHandlers:!0,loading:fi(l),loadingOverlayComponent:iw,rowData:m.value,rowSelection:e.disableSelection?void 0:_.value,selectionColumnDef:e.disableSelection?void 0:T.value,onGridReady:tn,onFilterChanged:Ht,onSortChanged:Vt,onSelectionChanged:vn},null,8,["columnDefs","defaultColDef","loading","rowData","rowSelection","selectionColumnDef"]),W("div",See,[W("div",Ree,[ke[3]||(ke[3]=W("label",{for:"contributions-table-page-size"},"Items Per Page:",-1)),cn(W("select",{id:"contributions-table-page-size","onUpdate:modelValue":ke[0]||(ke[0]=Ge=>P.value=Ge),onChange:ne},[(ce(),xe(pt,null,ei(I,Ge=>W("option",{key:Ge,value:Ge},Ye(Ge),9,Fee)),64))],544),[[oc,P.value,void 0,{number:!0}]])]),W("div",xee,Ye(L.value)+" to "+Ye(S.value)+" of "+Ye(n.value)+" items ",1),W("div",Pee,[W("button",{type:"button",disabled:F.value<=1,onClick:ee,"aria-label":"Go to first page"},"|<",8,Eee),W("button",{type:"button",disabled:F.value<=1,onClick:Z,"aria-label":"Go to previous page"},"<",8,Dee),W("span",Tee,"Page "+Ye(F.value)+" of "+Ye(V.value),1),W("button",{type:"button",disabled:F.value>=V.value,onClick:me,"aria-label":"Go to next page"},">",8,Aee),W("button",{type:"button",disabled:F.value>=V.value,onClick:pe,"aria-label":"Go to last page"},">|",8,Iee)])])]),W("dialog",{ref_key:"bulkStatusModal",ref:Ae,class:"bulk-status-modal",style:Di(ye.value),onClick:B},[W("div",Mee,[W("header",null,[W("button",{ref_key:"bulkStatusCloseButton",ref:Te,onClick:B,"aria-label":"Close"},"X",512)]),W("p",null,[Hn("Are you sure that you want to change the status of "+Ye(k.value.length)+" Contribution"+Ye(k.value.length===1?"":"s")+" to ",1),W("strong",null,Ye(Q.value.reduce((Ge,Ze)=>Ze.value===j.value?`${Ge}${Ze.label}`:Ge,"")),1),ke[4]||(ke[4]=Hn("?",-1))]),W("div",kee,[W("button",{ref_key:"bulkStatusCancelButton",ref:ae,class:"cancel",onClick:B},"Cancel",512),W("button",{ref_key:"bulkStatusSubmitButton",ref:Ue,class:"submit",disabled:!k.value.length,onClick:Bo},"Update",8,Lee)])])],4),W("dialog",{ref_key:"bulkNoteModal",ref:fe,class:"bulk-note-modal",style:Di(Fe.value),onClick:M},[W("div",Oee,[W("header",null,[W("h4",null,"Add Note To "+Ye(k.value.length)+" Contribution"+Ye(k.value.length===1?"":"s"),1),W("button",{ref_key:"bulkNoteCloseButton",ref:be,onClick:M,"aria-label":"Close"},"X",512)]),ke[5]||(ke[5]=W("p",null,"Note",-1)),cn(W("textarea",{id:"bulk-note-textfield",placeholder:"Enter note text here...","onUpdate:modelValue":ke[1]||(ke[1]=Ge=>K.value=Ge)},null,512),[[Ds,K.value]]),W("div",_ee,[W("button",{ref_key:"bulkNoteCancelButton",ref:Re,class:"cancel",onClick:M},"Cancel",512),W("button",{ref_key:"bulkNoteSubmitButton",ref:ue,class:"submit",disabled:!(K.value.length&&k.value.length),onClick:yi},"Add",8,Nee)])])],4),W("dialog",{ref_key:"columnsVisibilityModal",ref:w,class:"columns-visibility-modal",style:Di(b.value),onClick:U},[W("div",Bee,[W("header",null,[W("h4",null,[rt(it,{class:"columns-columns-icon",icon:"fa-columns"}),ke[6]||(ke[6]=Hn("Columns ",-1))])]),W("ul",null,[(ce(!0),xe(pt,null,ei(fi(lw).filter(Ge=>!e.disabledColumns.includes(Ge.field)),Ge=>(ce(),xe("li",{key:Ge.field},[W("input",{id:`column-visibility-${Ge.field}`,class:"column-visibility-checkbox",name:Ge.field,type:"checkbox",checked:y.value?.[Ge.field],onClick:Ze=>y.value[Ge.field]=!y.value[Ge.field]},null,8,Gee),ke[7]||(ke[7]=Hn(" ",-1)),W("label",{for:`column-visibility-${Ge.field}`},Ye(Ge.headerName),9,Hee)]))),128))])])],4)],64)}}}),[["styles",['[data-v-29f59a3f]{font-family:Poppins,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Arial,sans-serif}.ag-theme-alpine[data-v-29f59a3f]{--ag-background-color: var(--color-white);--ag-cell-font-family: Poppins, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;--ag-header-background-color: var(--color-secondary-green);--ag-header-font-family: Poppins, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif}.bulk-note-modal[data-v-29f59a3f]{border:.1rem solid var(--color-primary-grey);box-shadow:.1875rem .15625rem .15625rem var(--color-secondary-grey);min-width:34.25rem}.bulk-note-modal .button-group[data-v-29f59a3f]{border-top:.1rem solid var(--color-primary-grey);display:flex;justify-content:flex-end;padding-top:.5rem;width:100%}.bulk-note-modal .button-group button[data-v-29f59a3f]{border:.1rem solid var(--color-primary-grey);border-radius:.2rem;cursor:pointer;height:2.5rem;margin:.2rem;width:5rem}.bulk-note-modal .button-group button.cancel[data-v-29f59a3f]{background:var(--color-white);color:var(--color-black)}.bulk-note-modal .button-group button.submit[data-v-29f59a3f]{background:var(--color-primary-green);color:var(--color-white)}.bulk-note-modal .button-group button.submit[data-v-29f59a3f]:disabled{opacity:.5}.bulk-note-modal header[data-v-29f59a3f]{border-bottom:.1rem solid var(--color-primary-grey);display:flex;justify-content:space-between;width:100%}.bulk-note-modal header button[data-v-29f59a3f]{background:transparent;border:none;cursor:pointer;font-size:1rem;font-weight:800}.bulk-note-modal textarea[data-v-29f59a3f]{border:.1rem solid var(--color-primary-grey);margin:1rem auto;min-height:12.5rem;padding:.5rem .25rem;width:97%}.bulk-note-modal textarea[data-v-29f59a3f]:focus-visible{border:.1rem solid var(--color-primary-green)}.bulk-status-modal[data-v-29f59a3f]{border:.1rem solid var(--color-primary-grey);box-shadow:.1875rem .15625rem .15625rem var(--color-secondary-grey);min-width:30.25rem}.bulk-status-modal .button-group[data-v-29f59a3f]{border-top:.1rem solid var(--color-primary-grey);display:flex;justify-content:flex-end;padding-top:.5rem;width:100%}.bulk-status-modal .button-group button[data-v-29f59a3f]{border:.1rem solid var(--color-primary-grey);border-radius:.2rem;cursor:pointer;height:2.5rem;margin:.2rem;width:5rem}.bulk-status-modal .button-group button.cancel[data-v-29f59a3f]{background:var(--color-white);color:var(--color-black)}.bulk-status-modal .button-group button.submit[data-v-29f59a3f]{background:var(--color-primary-green);color:var(--color-white)}.bulk-status-modal header[data-v-29f59a3f]{display:flex;justify-content:flex-end}.bulk-status-modal header button[data-v-29f59a3f]{background:transparent;border:none;cursor:pointer;font-size:1rem;font-weight:800}.column-visibility-checkbox[data-v-29f59a3f]:checked{accent-color:var(--color-primary-green)}.columns-columns-icon[data-v-29f59a3f]{width:1.25rem;height:1rem}.columns-ellipsis-icon[data-v-29f59a3f]{height:2rem;width:2.5rem}.contributions-grid[data-v-29f59a3f]{width:100%}.contributions-table[data-v-29f59a3f]{border:.0625rem solid var(--color-black);border-radius:.5rem;display:flex;flex-direction:column;gap:0rem;height:100%}.contributions-table select[data-v-29f59a3f]{height:2rem;padding:0 .5rem}.contributions-table-footer[data-v-29f59a3f]{align-items:center;background:var(--color-white);border-radius:0 0 .5rem .5rem;border-top:.0625rem solid var(--color-black);display:flex;font-size:.875rem;gap:1rem;justify-content:space-between;padding:.75rem 1rem}.contributions-table-footer .footer-center[data-v-29f59a3f],.contributions-table-footer .footer-left[data-v-29f59a3f],.contributions-table-footer .footer-right[data-v-29f59a3f]{align-items:center;display:flex;gap:.5rem}.contributions-table-footer .footer-right button[data-v-29f59a3f]{height:2rem;min-width:2rem}.contributions-table-toolbar[data-v-29f59a3f]{align-items:center;border-bottom:.0625rem solid var(--color-black);display:flex;gap:.75rem;justify-content:space-between;padding:8px 0}.contributions-table-toolbar .bulk-controls[data-v-29f59a3f] *{margin:auto 1rem}.contributions-table-toolbar button[data-v-29f59a3f]{height:2.25rem;min-width:5rem}.contributions-table-toolbar button[data-v-29f59a3f],.contributions-table-footer .footer-right button[data-v-29f59a3f]{background:var(--color-white);border:.0625rem solid var(--color-primary-green);border-radius:.375rem;cursor:pointer;padding:0 .625rem}.contributions-table-toolbar button[data-v-29f59a3f]:disabled,.contributions-table-footer .footer-right button[data-v-29f59a3f]:disabled{cursor:not-allowed;opacity:.5}.contributions-table-toolbar .column-controls button[data-v-29f59a3f]{background:transparent;border:none;color:var(--color-primary-green);font-size:xx-large}.columns-visibility-modal[data-v-29f59a3f]{border:.1rem solid var(--color-primary-grey);box-shadow:.1875rem .15625rem .15625rem var(--color-secondary-grey);min-width:8.25rem}.columns-visibility-modal header h4[data-v-29f59a3f]{border-bottom:.1rem solid var(--color-primary-grey);font-weight:400;padding:.4rem}.columns-visibility-modal header h4[data-v-29f59a3f]>*{margin:auto .4rem auto auto}.columns-visibility-modal ul[data-v-29f59a3f]{list-style-type:none;padding-left:0}[data-v-29f59a3f] .ag-checkbox-input-wrapper.ag-checked{background:var(--color-primary-green)}[data-v-29f59a3f] .ag-filter-apply-panel .ag-button:last-child{background:var(--color-primary-green);color:#fff}[data-v-29f59a3f] .ag-header-cell .ag-sort-indicator-container{margin:.2rem}[data-v-29f59a3f] .ag-icon-filter:hover{color:var(--color-primary-green)}[data-v-29f59a3f] .ag-row:nth-child(2n){background:var(--color-secondary-green)}[data-v-29f59a3f] .ag-theme-alpine,[data-v-29f59a3f] .ag-theme-alpine .ag-root-wrapper{border-radius:0}[data-v-29f59a3f]::backdrop{background:transparent}']],["__scopeId","data-v-29f59a3f"]]),Vee={class:"contribution-search-content","aria-description":"contribution search page content"},Wee={key:0,class:"contribution-search-initial","aria-description":"initial contribution search form"},zee={class:"criteria-toolbar","aria-label":"Search criteria actions"},Uee={class:"dropdown","aria-description":"modify search criteria dropdown"},$ee=["aria-expanded"],jee=["disabled"],Kee=zt(xt({__name:"ContributionSearch",props:{user:{type:Number},company:{type:Number},stack:{type:String}},setup(e){const t=Ce({}),n=Ce(["id","employeeStatus","dateDetected","status","reconciliationStatus","preclearance","approvalDate","approvedAmount","lastUpdated","lastUpdatedBy","notes","tags","groups"]),i=Ce(!1),o=Ce(!1),r=Ce(0),s=Ce(!1),a=Ce(0),l=()=>{o.value=!1},u=()=>{o.value=!o.value},h=m=>{s.value=!0,a.value=0,t.value=m,i.value=!0},f=m=>{s.value=!0,a.value=0,t.value=m,l()},p=()=>{s.value||(i.value=!1,t.value={},s.value=!1,a.value=0,l(),r.value+=1)};return(m,v)=>(ce(),en(nw,{title:"Contribution Search",user:e.user,company:e.company,stack:e.stack,"show-export":i.value,"disable-export":a.value===0},{content:Jn(()=>[W("section",Vee,[i.value?(ce(),xe("section",{key:1,class:Kt(["criteria-toolbar-wrap",{"criteria-toolbar-wrap--dropdown-open":o.value}]),"aria-description":"search criteria toolbar",onKeydown:dn(l,["esc"])},[W("div",zee,[W("section",Uee,[W("button",{type:"button",class:"criteria-dropdown-button","aria-expanded":o.value,onClick:u},[v[3]||(v[3]=Hn(" Modify Criteria ",-1)),W("i",{class:Kt(["fa-solid fa-chevron-down dropdown-chevron",{"dropdown-chevron-open":o.value}]),"aria-hidden":"true"},null,2)],8,$ee),rt(bd,{name:"criteria-dropdown"},{default:Jn(()=>[cn(W("section",{class:"criteria-dropdown-panel","aria-description":"modify criteria form panel",onClick:v[0]||(v[0]=Et(()=>{},["stop"]))},[rt(AD,{"contribution-search-presets":t.value,loading:s.value,onSearch:f},null,8,["contribution-search-presets","loading"])],512),[[ng,o.value]])]),_:1})]),W("button",{type:"button",class:"new-search-button",disabled:s.value,onClick:p}," New Search ",8,jee)])],34)):(ce(),xe("section",Wee,[(ce(),en(AD,{key:r.value,loading:s.value,onSearch:h},null,8,["loading"]))])),i.value?(ce(),en(OD,{key:2,user:e.user,company:e.company,stack:e.stack,page:"contribution-search",match:!1,"disabled-columns":n.value,presets:t.value,"disable-selection":"",loading:s.value,"onUpdate:loading":v[1]||(v[1]=w=>s.value=w),"results-total":a.value,"onUpdate:resultsTotal":v[2]||(v[2]=w=>a.value=w)},null,8,["user","company","stack","disabled-columns","presets","loading","results-total"])):_t("",!0)])]),_:1},8,["user","company","stack","show-export","disable-export"]))}}),[["styles",[".contribution-search-content[data-v-0c3d4395]{display:flex;flex-direction:column;gap:1.5rem;min-height:0}.criteria-dropdown-button[data-v-0c3d4395]{align-items:center;background:var(--color-white);border:.0625rem solid var(--color-primary-grey);border-radius:.375rem;color:var(--color-primary-black);cursor:pointer;display:flex;font-family:Poppins,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Arial,sans-serif;font-size:1rem;gap:.375rem;height:2.25rem;justify-content:space-between;padding:0 .75rem;width:100%}.criteria-dropdown-button[data-v-0c3d4395]:hover{border-color:var(--color-primary-green)}.criteria-dropdown-enter-active[data-v-0c3d4395],.criteria-dropdown-leave-active[data-v-0c3d4395]{transition:opacity .2s ease,transform .2s ease}.criteria-dropdown-enter-from[data-v-0c3d4395],.criteria-dropdown-leave-to[data-v-0c3d4395]{opacity:0;transform:translateY(-.25rem)}.criteria-dropdown-panel[data-v-0c3d4395]{background:var(--color-white);border:.0625rem solid var(--color-primary-grey);border-radius:.375rem;box-shadow:0 .625rem 1.5rem #00000014;left:0;margin-top:.5rem;max-height:min(70vh,32rem);overflow-x:hidden;overflow-y:auto;padding:1rem 1rem .5rem;position:absolute;top:100%;width:100%;z-index:2}.criteria-toolbar[data-v-0c3d4395]{align-items:flex-start;display:flex;gap:.75rem;width:100%}.criteria-toolbar-wrap[data-v-0c3d4395]{position:relative;width:100%}.criteria-toolbar-wrap--dropdown-open[data-v-0c3d4395]{z-index:10}.dropdown[data-v-0c3d4395]{flex:1 1 auto;min-width:0;position:relative}.dropdown-chevron[data-v-0c3d4395]{font-size:.75rem;opacity:.85;transform:rotate(0);transition:transform .2s ease}.dropdown-chevron-open[data-v-0c3d4395]{transform:rotate(180deg)}.new-search-button[data-v-0c3d4395]{background:var(--color-primary-green);border:.0625rem solid var(--color-primary-green);border-radius:.375rem;color:var(--color-white);cursor:pointer;flex-shrink:0;font-family:Poppins,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Arial,sans-serif;font-size:.875rem;height:2.25rem;min-width:5rem;padding:0 1rem}.new-search-button[data-v-0c3d4395]:disabled{cursor:not-allowed;opacity:.5}.new-search-button[data-v-0c3d4395]:hover:not(:disabled){filter:brightness(.95)}"]],["__scopeId","data-v-0c3d4395"]]),qee={class:"body"},Qee=zt(xt({__name:"ContributionSearch.ce",props:{user:{type:Number}},setup(e){return(t,n)=>(ce(),xe("div",qee,[rt(Kee,{user:e.user},null,8,["user"])]))}}),[["styles",[ow,".ag-cf9a-actions{display:flex;gap:.625rem;padding-top:.25rem;width:100%}.ag-cf9a-button{border-radius:.25rem;cursor:pointer;flex:1;font-family:inherit;height:2.125rem}.ag-cf9a-button-primary{background:var(--color-primary-green);border:.0625rem solid var(--color-primary-green);color:var(--color-white);font-weight:600}.ag-cf9a-button-secondary{background:var(--color-white);border:.0625rem solid var(--color-secondary-grey);color:var(--color-primary-black);font-weight:600}.ag-cf9a-close-button{align-items:center;background:transparent;border:0;color:var(--color-primary-black);cursor:pointer;display:flex;font-family:inherit;font-size:1rem;font-weight:700;height:1.5rem;justify-content:center;padding:0;transition:color .2s ease;width:1.5rem}.ag-cf9a-close-button:hover{color:var(--color-primary-green)}.ag-cf9a-currency-cell{font-weight:600}.ag-cf9a-filter{background:var(--color-white);border:.0625rem solid var(--color-primary-green);border-radius:.25rem;box-shadow:0 .125rem .5rem #0000001f;box-sizing:border-box;display:flex;flex-direction:column;font-family:Poppins,sans-serif;padding:.75rem;width:21.25rem}.ag-cf9a-helper-text{color:var(--color-primary-black);font-size:.75rem;margin-bottom:.625rem}.ag-cf9a-input,.ag-cf9a-select{border:.0625rem solid var(--color-secondary-grey);border-radius:.25rem;box-sizing:border-box;display:block;font-family:inherit;height:2.125rem;margin-bottom:.625rem;padding:0 .625rem;width:100%}.ag-cf9a-input::placeholder{color:var(--color-primary-black);opacity:.5}.ag-cf9a-title{color:var(--color-primary-black);font-size:.875rem;font-weight:600}.ag-cf9a-title h3{margin:0}.ag-cf9a-title-row{align-items:center;border-bottom:.0625rem solid var(--color-primary-grey);display:flex;justify-content:space-between;margin-bottom:.75rem;padding-bottom:.5rem}.body>*{width:100%}"]]]),Yee=xt({__name:"DetectedContributions",props:{user:{type:Number},company:{type:Number},stack:{type:String}},setup(e){const t=Ce(0);return(n,i)=>(ce(),en(nw,{title:"Detected Contributions",page:"detected-contributions",user:e.user,company:e.company,stack:e.stack,"disable-export":t.value===0},{content:Jn(()=>[rt(OD,{user:e.user,company:e.company,stack:e.stack,page:"detected-contributions",match:!0,"results-total":t.value,"onUpdate:resultsTotal":i[0]||(i[0]=o=>t.value=o)},null,8,["user","company","stack","results-total"])]),_:1},8,["user","company","stack","disable-export"]))}}),Zee={class:"body"},Xee=zt(xt({__name:"DetectedContributions.ce",props:{user:{type:Number}},setup(e){return(t,n)=>(ce(),xe("div",Zee,[rt(Yee,{user:e.user},null,8,["user"])]))}}),[["styles",[ow,".ag-cf9a-actions{display:flex;gap:.625rem;padding-top:.25rem;width:100%}.ag-cf9a-button{border-radius:.25rem;cursor:pointer;flex:1;font-family:inherit;height:2.125rem}.ag-cf9a-button-primary{background:var(--color-primary-green);border:.0625rem solid var(--color-primary-green);color:var(--color-white);font-weight:600}.ag-cf9a-button-secondary{background:var(--color-white);border:.0625rem solid var(--color-secondary-grey);color:var(--color-primary-black);font-weight:600}.ag-cf9a-close-button{align-items:center;background:transparent;border:0;color:var(--color-primary-black);cursor:pointer;display:flex;font-family:inherit;font-size:1rem;font-weight:700;height:1.5rem;justify-content:center;padding:0;transition:color .2s ease;width:1.5rem}.ag-cf9a-close-button:hover{color:var(--color-primary-green)}.ag-cf9a-currency-cell{font-weight:600}.ag-cf9a-filter{background:var(--color-white);border:.0625rem solid var(--color-primary-green);border-radius:.25rem;box-shadow:0 .125rem .5rem #0000001f;box-sizing:border-box;display:flex;flex-direction:column;font-family:Poppins,sans-serif;padding:.75rem;width:21.25rem}.ag-cf9a-helper-text{color:var(--color-primary-black);font-size:.75rem;margin-bottom:.625rem}.ag-cf9a-input,.ag-cf9a-select{border:.0625rem solid var(--color-secondary-grey);border-radius:.25rem;box-sizing:border-box;display:block;font-family:inherit;height:2.125rem;margin-bottom:.625rem;padding:0 .625rem;width:100%}.ag-cf9a-input::placeholder{color:var(--color-primary-black);opacity:.5}.ag-cf9a-title{color:var(--color-primary-black);font-size:.875rem;font-weight:600}.ag-cf9a-title h3{margin:0}.ag-cf9a-title-row{align-items:center;border-bottom:.0625rem solid var(--color-primary-grey);display:flex;justify-content:space-between;margin-bottom:.75rem;padding-bottom:.5rem}.body>*{width:100%}"]]]);tO.registerModules([TU]),Qc.add(JK),Qc.add(ZK),Qc.add(QK),Qc.add(tq),Qc.add(eq);const Jee=rg(dX,{configureApp(e){e.component("font-awesome-icon",RC),FC(e,{store:cs})}}),ete=rg(Qee,{configureApp(e){e.component("font-awesome-icon",RC),FC(e,{store:cs})}}),tte=rg(Xee,{configureApp(e){e.component("font-awesome-icon",RC),FC(e,{store:cs})}});customElements.define("contribution-details",Jee),customElements.define("contribution-search",ete),customElements.define("detected-contributions",tte)}));
|
|
666
|
+
}`;var at=sI(function(){return wt(D,Ne+"return "+le).apply(n,O)});if(at.source=le,ub(at))throw at;return at}function _ae(c){return Rt(c).toLowerCase()}function Nae(c){return Rt(c).toUpperCase()}function Bae(c,d,g){if(c=Rt(c),c&&(g||d===n))return gT(c);if(!c||!(d=Fi(d)))return c;var C=ho(c),x=ho(d),D=mT(C,x),O=vT(C,x)+1;return vs(C,D,O).join("")}function Gae(c,d,g){if(c=Rt(c),c&&(g||d===n))return c.slice(0,wT(c)+1);if(!c||!(d=Fi(d)))return c;var C=ho(c),x=vT(C,ho(d))+1;return vs(C,0,x).join("")}function Hae(c,d,g){if(c=Rt(c),c&&(g||d===n))return c.replace(uw,"");if(!c||!(d=Fi(d)))return c;var C=ho(c),x=mT(C,ho(d));return vs(C,x).join("")}function Vae(c,d){var g=_,C=A;if($t(d)){var x="separator"in d?d.separator:x;g="length"in d?ot(d.length):g,C="omission"in d?Fi(d.omission):C}c=Rt(c);var D=c.length;if(yl(c)){var O=ho(c);D=O.length}if(g>=D)return c;var H=g-Sl(C);if(H<1)return C;var $=O?vs(O,0,H).join(""):c.slice(0,H);if(x===n)return $+C;if(O&&(H+=$.length-H),db(x)){if(c.slice(H).search(x)){var ie,oe=$;for(x.global||(x=Ew(x.source,Rt(ND.exec(x))+"g")),x.lastIndex=0;ie=x.exec(oe);)var le=ie.index;$=$.slice(0,le===n?H:le)}}else if(c.indexOf(Fi(x),H)!=H){var Ie=$.lastIndexOf(x);Ie>-1&&($=$.slice(0,Ie))}return $+C}function Wae(c){return c=Rt(c),c&&ai.test(c)?c.replace(uo,vne):c}var zae=Tl(function(c,d,g){return c+(g?" ":"")+d.toUpperCase()}),pb=aA("toUpperCase");function rI(c,d,g){return c=Rt(c),d=g?n:d,d===n?hne(c)?bne(c):ine(c):c.match(d)||[]}var sI=lt(function(c,d){try{return Si(c,n,d)}catch(g){return ub(g)?g:new et(g)}}),Uae=br(function(c,d){return zi(d,function(g){g=Vo(g),Cr(c,g,lb(c[g],c))}),c});function $ae(c){var d=c==null?0:c.length,g=$e();return c=d?Wt(c,function(C){if(typeof C[1]!="function")throw new Ui(s);return[g(C[0]),C[1]]}):[],lt(function(C){for(var x=-1;++x<d;){var D=c[x];if(Si(D[0],this,C))return Si(D[1],this,C)}})}function jae(c){return vie(ji(c,f))}function gb(c){return function(){return c}}function Kae(c,d){return c==null||c!==c?d:c}var qae=cA(),Qae=cA(!0);function di(c){return c}function mb(c){return GT(typeof c=="function"?c:ji(c,f))}function Yae(c){return VT(ji(c,f))}function Zae(c,d){return WT(c,ji(d,f))}var Xae=lt(function(c,d){return function(g){return Mu(g,c,d)}}),Jae=lt(function(c,d){return function(g){return Mu(c,g,d)}});function vb(c,d,g){var C=Cn(d),x=tp(d,C);g==null&&!($t(d)&&(x.length||!C.length))&&(g=d,d=c,c=this,x=tp(d,Cn(d)));var D=!($t(g)&&"chain"in g)||!!g.chain,O=Sr(c);return zi(x,function(H){var $=d[H];c[H]=$,O&&(c.prototype[H]=function(){var ie=this.__chain__;if(D||ie){var oe=c(this.__wrapped__),le=oe.__actions__=li(this.__actions__);return le.push({func:$,args:arguments,thisArg:c}),oe.__chain__=ie,oe}return $.apply(c,ds([this.value()],arguments))})}),c}function ele(){return En._===this&&(En._=Pne),this}function Cb(){}function tle(c){return c=ot(c),lt(function(d){return zT(d,c)})}var nle=Qw(Wt),ile=Qw(uT),ole=Qw(bw);function aI(c){return nb(c)?yw(Vo(c)):Lie(c)}function rle(c){return function(d){return c==null?n:va(c,d)}}var sle=dA(),ale=dA(!0);function wb(){return[]}function bb(){return!1}function lle(){return{}}function cle(){return""}function ule(){return!0}function dle(c,d){if(c=ot(c),c<1||c>fe)return[];var g=N,C=_n(c,N);d=$e(d),c-=N;for(var x=Fw(C,d);++g<c;)d(g);return x}function hle(c){return nt(c)?Wt(c,Vo):xi(c)?[c]:li(EA(Rt(c)))}function fle(c){var d=++Fne;return Rt(c)+d}var ple=ap(function(c,d){return c+d},0),gle=Yw("ceil"),mle=ap(function(c,d){return c/d},1),vle=Yw("floor");function Cle(c){return c&&c.length?ep(c,di,Ow):n}function wle(c,d){return c&&c.length?ep(c,$e(d,2),Ow):n}function ble(c){return fT(c,di)}function yle(c,d){return fT(c,$e(d,2))}function Sle(c){return c&&c.length?ep(c,di,Gw):n}function Rle(c,d){return c&&c.length?ep(c,$e(d,2),Gw):n}var Fle=ap(function(c,d){return c*d},1),xle=Yw("round"),Ple=ap(function(c,d){return c-d},0);function Ele(c){return c&&c.length?Rw(c,di):0}function Dle(c,d){return c&&c.length?Rw(c,$e(d,2)):0}return E.after=Yre,E.ary=BA,E.assign=Nse,E.assignIn=XA,E.assignInWith=bp,E.assignWith=Bse,E.at=Gse,E.before=GA,E.bind=lb,E.bindAll=Uae,E.bindKey=HA,E.castArray=lse,E.chain=OA,E.chunk=voe,E.compact=Coe,E.concat=woe,E.cond=$ae,E.conforms=jae,E.constant=gb,E.countBy=Ere,E.create=Hse,E.curry=VA,E.curryRight=WA,E.debounce=zA,E.defaults=Vse,E.defaultsDeep=Wse,E.defer=Zre,E.delay=Xre,E.difference=boe,E.differenceBy=yoe,E.differenceWith=Soe,E.drop=Roe,E.dropRight=Foe,E.dropRightWhile=xoe,E.dropWhile=Poe,E.fill=Eoe,E.filter=Tre,E.flatMap=Mre,E.flatMapDeep=kre,E.flatMapDepth=Lre,E.flatten=IA,E.flattenDeep=Doe,E.flattenDepth=Toe,E.flip=Jre,E.flow=qae,E.flowRight=Qae,E.fromPairs=Aoe,E.functions=Qse,E.functionsIn=Yse,E.groupBy=Ore,E.initial=Moe,E.intersection=koe,E.intersectionBy=Loe,E.intersectionWith=Ooe,E.invert=Xse,E.invertBy=Jse,E.invokeMap=Nre,E.iteratee=mb,E.keyBy=Bre,E.keys=Cn,E.keysIn=ui,E.map=pp,E.mapKeys=tae,E.mapValues=nae,E.matches=Yae,E.matchesProperty=Zae,E.memoize=mp,E.merge=iae,E.mergeWith=JA,E.method=Xae,E.methodOf=Jae,E.mixin=vb,E.negate=vp,E.nthArg=tle,E.omit=oae,E.omitBy=rae,E.once=ese,E.orderBy=Gre,E.over=nle,E.overArgs=tse,E.overEvery=ile,E.overSome=ole,E.partial=cb,E.partialRight=UA,E.partition=Hre,E.pick=sae,E.pickBy=eI,E.property=aI,E.propertyOf=rle,E.pull=Goe,E.pullAll=kA,E.pullAllBy=Hoe,E.pullAllWith=Voe,E.pullAt=Woe,E.range=sle,E.rangeRight=ale,E.rearg=nse,E.reject=zre,E.remove=zoe,E.rest=ise,E.reverse=sb,E.sampleSize=$re,E.set=lae,E.setWith=cae,E.shuffle=jre,E.slice=Uoe,E.sortBy=Qre,E.sortedUniq=Zoe,E.sortedUniqBy=Xoe,E.split=Mae,E.spread=ose,E.tail=Joe,E.take=ere,E.takeRight=tre,E.takeRightWhile=nre,E.takeWhile=ire,E.tap=Cre,E.throttle=rse,E.thru=fp,E.toArray=QA,E.toPairs=tI,E.toPairsIn=nI,E.toPath=hle,E.toPlainObject=ZA,E.transform=uae,E.unary=sse,E.union=ore,E.unionBy=rre,E.unionWith=sre,E.uniq=are,E.uniqBy=lre,E.uniqWith=cre,E.unset=dae,E.unzip=ab,E.unzipWith=LA,E.update=hae,E.updateWith=fae,E.values=Ml,E.valuesIn=pae,E.without=ure,E.words=rI,E.wrap=ase,E.xor=dre,E.xorBy=hre,E.xorWith=fre,E.zip=pre,E.zipObject=gre,E.zipObjectDeep=mre,E.zipWith=vre,E.entries=tI,E.entriesIn=nI,E.extend=XA,E.extendWith=bp,vb(E,E),E.add=ple,E.attempt=sI,E.camelCase=Cae,E.capitalize=iI,E.ceil=gle,E.clamp=gae,E.clone=cse,E.cloneDeep=dse,E.cloneDeepWith=hse,E.cloneWith=use,E.conformsTo=fse,E.deburr=oI,E.defaultTo=Kae,E.divide=mle,E.endsWith=wae,E.eq=po,E.escape=bae,E.escapeRegExp=yae,E.every=Dre,E.find=Are,E.findIndex=TA,E.findKey=zse,E.findLast=Ire,E.findLastIndex=AA,E.findLastKey=Use,E.floor=vle,E.forEach=_A,E.forEachRight=NA,E.forIn=$se,E.forInRight=jse,E.forOwn=Kse,E.forOwnRight=qse,E.get=hb,E.gt=pse,E.gte=gse,E.has=Zse,E.hasIn=fb,E.head=MA,E.identity=di,E.includes=_re,E.indexOf=Ioe,E.inRange=mae,E.invoke=eae,E.isArguments=ba,E.isArray=nt,E.isArrayBuffer=mse,E.isArrayLike=ci,E.isArrayLikeObject=Xt,E.isBoolean=vse,E.isBuffer=Cs,E.isDate=Cse,E.isElement=wse,E.isEmpty=bse,E.isEqual=yse,E.isEqualWith=Sse,E.isError=ub,E.isFinite=Rse,E.isFunction=Sr,E.isInteger=$A,E.isLength=Cp,E.isMap=jA,E.isMatch=Fse,E.isMatchWith=xse,E.isNaN=Pse,E.isNative=Ese,E.isNil=Tse,E.isNull=Dse,E.isNumber=KA,E.isObject=$t,E.isObjectLike=Qt,E.isPlainObject=Bu,E.isRegExp=db,E.isSafeInteger=Ase,E.isSet=qA,E.isString=wp,E.isSymbol=xi,E.isTypedArray=Il,E.isUndefined=Ise,E.isWeakMap=Mse,E.isWeakSet=kse,E.join=_oe,E.kebabCase=Sae,E.last=qi,E.lastIndexOf=Noe,E.lowerCase=Rae,E.lowerFirst=Fae,E.lt=Lse,E.lte=Ose,E.max=Cle,E.maxBy=wle,E.mean=ble,E.meanBy=yle,E.min=Sle,E.minBy=Rle,E.stubArray=wb,E.stubFalse=bb,E.stubObject=lle,E.stubString=cle,E.stubTrue=ule,E.multiply=Fle,E.nth=Boe,E.noConflict=ele,E.noop=Cb,E.now=gp,E.pad=xae,E.padEnd=Pae,E.padStart=Eae,E.parseInt=Dae,E.random=vae,E.reduce=Vre,E.reduceRight=Wre,E.repeat=Tae,E.replace=Aae,E.result=aae,E.round=xle,E.runInContext=z,E.sample=Ure,E.size=Kre,E.snakeCase=Iae,E.some=qre,E.sortedIndex=$oe,E.sortedIndexBy=joe,E.sortedIndexOf=Koe,E.sortedLastIndex=qoe,E.sortedLastIndexBy=Qoe,E.sortedLastIndexOf=Yoe,E.startCase=kae,E.startsWith=Lae,E.subtract=Ple,E.sum=Ele,E.sumBy=Dle,E.template=Oae,E.times=dle,E.toFinite=Rr,E.toInteger=ot,E.toLength=YA,E.toLower=_ae,E.toNumber=Qi,E.toSafeInteger=_se,E.toString=Rt,E.toUpper=Nae,E.trim=Bae,E.trimEnd=Gae,E.trimStart=Hae,E.truncate=Vae,E.unescape=Wae,E.uniqueId=fle,E.upperCase=zae,E.upperFirst=pb,E.each=_A,E.eachRight=NA,E.first=MA,vb(E,(function(){var c={};return Go(E,function(d,g){St.call(E.prototype,g)||(c[g]=d)}),c})(),{chain:!1}),E.VERSION=i,zi(["bind","bindKey","curry","curryRight","partial","partialRight"],function(c){E[c].placeholder=E}),zi(["drop","take"],function(c,d){dt.prototype[c]=function(g){g=g===n?1:ln(ot(g),0);var C=this.__filtered__&&!d?new dt(this):this.clone();return C.__filtered__?C.__takeCount__=_n(g,C.__takeCount__):C.__views__.push({size:_n(g,N),type:c+(C.__dir__<0?"Right":"")}),C},dt.prototype[c+"Right"]=function(g){return this.reverse()[c](g).reverse()}}),zi(["filter","map","takeWhile"],function(c,d){var g=d+1,C=g==K||g==Re;dt.prototype[c]=function(x){var D=this.clone();return D.__iteratees__.push({iteratee:$e(x,3),type:g}),D.__filtered__=D.__filtered__||C,D}}),zi(["head","last"],function(c,d){var g="take"+(d?"Right":"");dt.prototype[c]=function(){return this[g](1).value()[0]}}),zi(["initial","tail"],function(c,d){var g="drop"+(d?"":"Right");dt.prototype[c]=function(){return this.__filtered__?new dt(this):this[g](1)}}),dt.prototype.compact=function(){return this.filter(di)},dt.prototype.find=function(c){return this.filter(c).head()},dt.prototype.findLast=function(c){return this.reverse().find(c)},dt.prototype.invokeMap=lt(function(c,d){return typeof c=="function"?new dt(this):this.map(function(g){return Mu(g,c,d)})}),dt.prototype.reject=function(c){return this.filter(vp($e(c)))},dt.prototype.slice=function(c,d){c=ot(c);var g=this;return g.__filtered__&&(c>0||d<0)?new dt(g):(c<0?g=g.takeRight(-c):c&&(g=g.drop(c)),d!==n&&(d=ot(d),g=d<0?g.dropRight(-d):g.take(d-c)),g)},dt.prototype.takeRightWhile=function(c){return this.reverse().takeWhile(c).reverse()},dt.prototype.toArray=function(){return this.take(N)},Go(dt.prototype,function(c,d){var g=/^(?:filter|find|map|reject)|While$/.test(d),C=/^(?:head|last)$/.test(d),x=E[C?"take"+(d=="last"?"Right":""):d],D=C||/^find/.test(d);x&&(E.prototype[d]=function(){var O=this.__wrapped__,H=C?[1]:arguments,$=O instanceof dt,ie=H[0],oe=$||nt(O),le=function(ct){var ht=x.apply(E,ds([ct],H));return C&&Ie?ht[0]:ht};oe&&g&&typeof ie=="function"&&ie.length!=1&&($=oe=!1);var Ie=this.__chain__,Ne=!!this.__actions__.length,qe=D&&!Ie,at=$&&!Ne;if(!D&&oe){O=at?O:new dt(this);var Qe=c.apply(O,H);return Qe.__actions__.push({func:fp,args:[le],thisArg:n}),new $i(Qe,Ie)}return qe&&at?c.apply(this,H):(Qe=this.thru(le),qe?C?Qe.value()[0]:Qe.value():Qe)})}),zi(["pop","push","shift","sort","splice","unshift"],function(c){var d=Gf[c],g=/^(?:push|sort|unshift)$/.test(c)?"tap":"thru",C=/^(?:pop|shift)$/.test(c);E.prototype[c]=function(){var x=arguments;if(C&&!this.__chain__){var D=this.value();return d.apply(nt(D)?D:[],x)}return this[g](function(O){return d.apply(nt(O)?O:[],x)})}}),Go(dt.prototype,function(c,d){var g=E[d];if(g){var C=g.name+"";St.call(Pl,C)||(Pl[C]=[]),Pl[C].push({name:d,func:g})}}),Pl[sp(n,y).name]=[{name:"wrapper",func:n}],dt.prototype.clone=Wne,dt.prototype.reverse=zne,dt.prototype.value=Une,E.prototype.at=wre,E.prototype.chain=bre,E.prototype.commit=yre,E.prototype.next=Sre,E.prototype.plant=Fre,E.prototype.reverse=xre,E.prototype.toJSON=E.prototype.valueOf=E.prototype.value=Pre,E.prototype.first=E.prototype.head,xu&&(E.prototype[xu]=Rre),E}),Rl=yne();ha?((ha.exports=Rl)._=Rl,mw._=Rl):En._=Rl}).call(pY)})(wu,wu.exports)),wu.exports}var mY=gY();const Pe=oD(mY),Gt={conjunction:0,query:[]},XC={sources:Gt,contributor:Gt,employer:Gt,employeeStatus:Gt,occupation:Gt,address:Gt,state:Gt,zipCode:Gt,date:Gt,dateDetected:Gt,amount:Gt,recipient:Gt,status:Gt,reconciliationStatus:Gt,preclearance:Gt,approvalDate:Gt,approvalAmount:Gt,amended:Gt,lastUpdated:Gt,lastUpdatedBy:Gt,notes:Gt,tags:Gt,groups:Gt},vY={"contribution-search":Pe.cloneDeep(XC),"detected-contributions":Pe.cloneDeep(XC)},aD=sa({name:"ContributionSearch",initialState:vY,reducers:{resetSearchBody:(e,t)=>({...e,[t.payload.page]:{...Pe.cloneDeep(XC)}}),resetSearchBodyFilterGroup:(e,t)=>({...e,[t.payload.page]:{...e[t.payload.page],[t.payload.filterName]:Pe.cloneDeep(Gt)}}),pruneSearchBodyFilterGroups:(e,t)=>({...e,[t.payload.page]:Pe.entries(e[t.payload.page]).reduce((n,[i,o])=>{const r=o.query.filter(a=>Pe.isString(a.value)?!Pe.isEmpty(a.value):!Pe.isNil(a.value)),s={conjunction:r.length<=1?0:o.conjunction,query:r};return{...n,[i]:s}},{})}),updateSearchBodyFilterGroupConjunction:(e,t)=>({...e,[t.payload.page]:{...e[t.payload.page],[t.payload.filterName]:{...e[t.payload.page][t.payload.filterName],conjunction:t.payload.conjunction}}}),addSearchBodyFilterGroupQuery:(e,t)=>{const n=[...e[t.payload.page][t.payload.filterName].query];return n.some(i=>i.id===t.payload.query.id)||n.push(t.payload.query),{...e,[t.payload.page]:{...e[t.payload.page],[t.payload.filterName]:{...e[t.payload.page][t.payload.filterName],query:n}}}},updateSearchBodyFilterGroupQueryComparator:(e,t)=>{const n=e[t.payload.page][t.payload.filterName].query.map(i=>i.id!==t.payload.id?i:{...i,comparator:t.payload.comparator});return{...e,[t.payload.page]:{...e[t.payload.page],[t.payload.filterName]:{...e[t.payload.page][t.payload.filterName],query:n}}}},updateSearchBodyFitlerGroupQueryValue:(e,t)=>{const n=e[t.payload.page][t.payload.filterName].query.map(i=>i.id!==t.payload.id?i:{...i,value:t.payload.value});return{...e,[t.payload.page]:{...e[t.payload.page],[t.payload.filterName]:{...e[t.payload.page][t.payload.filterName],query:n}}}},removeSearchBodyFilterGroupQuery:(e,t)=>({...e,[t.payload.page]:{...e[t.payload.page],[t.payload.filterName]:{...e[t.payload.page][t.payload.filterName],query:e[t.payload.page][t.payload.filterName].query.filter(n=>n.id!==t.payload.id)}}})}}),{addSearchBodyFilterGroupQuery:lD,pruneSearchBodyFilterGroups:Ole,removeSearchBodyFilterGroupQuery:_le,resetSearchBody:Nle,resetSearchBodyFilterGroup:cD,updateSearchBodyFilterGroupConjunction:uD,updateSearchBodyFilterGroupQueryComparator:Ble,updateSearchBodyFitlerGroupQueryValue:Gle}=aD.actions,CY={ContributionSearchReducer:aD.reducer},cs=(()=>{const e=[Hi.middleware];return pQ({reducer:{[Hi.reducerPath]:Hi.reducer,...CY},middleware:t=>t().concat(e)})})(),wY=()=>Fq(),dD=e=>Dq(e);function ca(e){const t=wo();let n,i;const o=()=>{i&&(t.value=e.select(i)(cs.getState()))},r=()=>{n?.reset(),n=void 0,i=void 0,t.value=void 0},s=()=>{n?.abort()},a=async l=>{const u=cs.dispatch(e.initiate(l));n=u,i=u.requestId,o();try{const h=await u.unwrap();return o(),h}catch(h){throw o(),h}};return{state:De(()=>t.value),data:De(()=>t.value?.data),error:De(()=>t.value?.error),isUninitialized:De(()=>t.value?.isUninitialized),isLoading:De(()=>t.value?.isLoading),isSuccess:De(()=>t.value?.isSuccess),isError:De(()=>t.value?.isError),status:De(()=>t.value?.status),originalArgs:De(()=>t.value?.originalArgs),trigger:a,abort:s,reset:r}}function bu(e,t){const n=()=>$I(t),i=wo();let o,r;const s=()=>{r?.unsubscribe(),r=void 0,o?.(),o=void 0},a=l=>{const u=e.select(l),h=()=>{i.value=u(cs.getState())};h(),o=cs.subscribe(h),r=cs.dispatch(e.initiate(l))};return un(n,l=>{s(),a(l)},{immediate:!0}),$l(()=>{s()}),{state:De(()=>i.value),data:De(()=>i.value?.data),error:De(()=>i.value?.error),currentData:De(()=>i.value?.currentData),isUninitialized:De(()=>i.value?.isUninitialized),isLoading:De(()=>i.value?.isLoading),isFetching:De(()=>i.value?.isFetching),isSuccess:De(()=>i.value?.isSuccess),isError:De(()=>i.value?.isError),status:De(()=>i.value?.status),refetch:()=>r?.refetch(),unwrap:async()=>{if(!r)throw new Error("Query has not been started yet.");return r.unwrap()}}}const hD=Hi.injectEndpoints({endpoints:e=>({getPreclearance:e.query({query:({user:t,company:n,stack:i,id:o=null})=>({url:o?`/preclearance/${o}`:"/preclearance",params:{user:t,company:n,stack:i}})}),preclearanceMatch:e.mutation({query:({id:t,body:n})=>({url:`/contributions/${t}/preclearance/match`,method:"POST",body:n})})})});function bY(e){return bu(hD.endpoints.getPreclearance,e)}function yY(){return ca(hD.endpoints.preclearanceMatch)}function JC(e){return new Intl.NumberFormat("en-US",{style:"currency",currency:"USD"}).format(e)}function SY(e){return new Date(e).toLocaleDateString("en-CA")}function RY(e){const t=new Date(e);return Number.isNaN(t.getTime())?"":`on ${ew(t)}`}function ew(e=new Date){return Number.isNaN(e.getTime())?"":e.toLocaleDateString("en-US",{month:"long",day:"numeric",year:"numeric"})}const FY={class:"preclearance-table-scroll","aria-description":"scroll container for preclearance request table"},xY={class:"preclearance-table"},PY={key:0,class:"preclearance-table-tr preclearance-table-tr-empty"},EY={class:"preclearance-table-td preclearance-table-td-select"},DY=["id","name","value","checked","onClick"],TY={class:"preclearance-table-td"},AY={class:"preclearance-table-td"},IY={class:"preclearance-table-td preclearance-table-td-amount"},MY={class:"preclearance-table-td"},kY={class:"preclearance-table-td"},LY={class:"preclearance-table-td"},OY={class:"preclearance-table-td preclearance-table-td-match"},_Y={class:"match-score-value","aria-description":"match score percentage"},NY=xt({__name:"PreclearanceRequestTable",props:ka({contributionId:{type:Number},user:{type:Number},company:{type:Number},stack:{type:String}},{modelValue:{default:null},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=e,n=Tr(e,"modelValue"),i={Approved:"preclearance-status-approved",Pending:"preclearance-status-pending",Denied:"preclearance-status-denied"},o=De(()=>({user:String(t.user),company:String(t.company),stack:t.stack,id:String(t.contributionId)})),{data:r}=bY(o),s=De(()=>`preclearance-match-${t.contributionId}`),a=De(()=>{const f=r.value;return f?(Array.isArray(f)?f:[f]).map(m=>l(m)):[]}),l=f=>({name:f.name,preclearanceId:f.id,requester:f.employee,amount:f.amount,recipient:f.recipient,requestDate:f.approvalDate,status:f.status,match:f.match}),u=f=>f>=90?"match-score-high":f>=75?"match-score-medium":"match-score-low",h=(f,p)=>{if(n.value?.preclearanceId===p.preclearanceId){f.preventDefault(),n.value=null;return}n.value={preclearanceId:p.preclearanceId,label:p.name}};return(f,p)=>(ce(),xe("div",FY,[W("table",xY,[p[2]||(p[2]=W("thead",null,[W("tr",null,[W("th",{class:"preclearance-table-th preclearance-table-th-select",scope:"col"},"Select"),W("th",{class:"preclearance-table-th",scope:"col"},"Request ID"),W("th",{class:"preclearance-table-th",scope:"col"},"Requester"),W("th",{class:"preclearance-table-th",scope:"col"},"Amount"),W("th",{class:"preclearance-table-th",scope:"col"},"Recipient"),W("th",{class:"preclearance-table-th",scope:"col"},"Request Date"),W("th",{class:"preclearance-table-th",scope:"col"},"Status"),W("th",{class:"preclearance-table-th preclearance-table-th-match",scope:"col"},"Match Score")])],-1)),W("tbody",null,[a.value.length===0?(ce(),xe("tr",PY,[...p[0]||(p[0]=[W("td",{class:"preclearance-table-td preclearance-table-empty",colspan:"8"},"No data found",-1)])])):(ce(!0),xe(pt,{key:1},ei(a.value,m=>(ce(),xe("tr",{key:m.name,class:"preclearance-table-tr"},[W("td",EY,[W("input",{id:`preclearance-radio-${m.name}`,class:Kt(["preclearance-table-radio",{"preclearance-table-radio-selected":n.value?.preclearanceId===m.preclearanceId}]),type:"radio",name:s.value,value:m.name,checked:n.value?.preclearanceId===m.preclearanceId,onClick:v=>h(v,m)},null,10,DY)]),W("td",TY,Ye(m.name),1),W("td",AY,Ye(m.requester),1),W("td",IY,Ye(fi(JC)(m.amount)),1),W("td",MY,Ye(m.recipient),1),W("td",kY,Ye(m.requestDate),1),W("td",LY,[W("span",{class:Kt(["preclearance-status",i[m.status]]),"aria-description":"preclearance request status"},Ye(m.status),3)]),W("td",OY,[W("span",{class:Kt(["match-score",u(m.match)]),"aria-description":"match score for preclearance request"},[p[1]||(p[1]=W("span",{class:"match-score-bar","aria-hidden":"true","aria-description":"match score visual indicator"},null,-1)),W("span",_Y,Ye(m.match)+"% ",1)],2)])]))),128))])])]))}}),BY=`.match-score[data-v-c4130b8b]{align-items:center;display:inline-flex;gap:.4rem}.match-score-bar[data-v-c4130b8b]{align-self:center;border-radius:.125rem;flex-shrink:0;height:1em;width:.125rem}.match-score-high[data-v-c4130b8b]{color:var(--color-primary-green)}.match-score-high .match-score-bar[data-v-c4130b8b]{background:var(--color-primary-green)}.match-score-low[data-v-c4130b8b]{color:var(--color-red-700)}.match-score-low .match-score-bar[data-v-c4130b8b]{background:var(--color-red-700)}.match-score-medium[data-v-c4130b8b]{color:var(--color-yellow-700)}.match-score-medium .match-score-bar[data-v-c4130b8b]{background:var(--color-yellow-700)}.preclearance-status[data-v-c4130b8b]{font-weight:600;white-space:nowrap}.preclearance-status-approved[data-v-c4130b8b]{color:var(--color-primary-green)}.preclearance-status-denied[data-v-c4130b8b]{color:var(--color-red-700)}.preclearance-status-pending[data-v-c4130b8b]{color:var(--color-yellow-700)}.preclearance-table[data-v-c4130b8b]{border-collapse:collapse;font-size:.875rem;min-width:58rem;width:100%}.preclearance-table tbody .preclearance-table-tr[data-v-c4130b8b]:nth-child(2n){background:var(--color-green-50)}.preclearance-table-empty[data-v-c4130b8b]{color:var(--color-grey-600);padding:1.5rem 1rem;text-align:center}.preclearance-table-radio[data-v-c4130b8b]{-webkit-appearance:none;appearance:none;background:var(--color-white);border:.125rem solid var(--color-grey-300);border-radius:.25rem;box-sizing:border-box;cursor:pointer;flex-shrink:0;height:1.125rem;margin:0;vertical-align:middle;width:1.125rem}.preclearance-table-radio[data-v-c4130b8b]:focus-visible{outline:.125rem solid var(--color-primary-green);outline-offset:.125rem}.preclearance-table-radio-selected[data-v-c4130b8b]{background-color:var(--color-primary-green);background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M3.5 8.5 6.5 11.5 12.5 4.5' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");background-position:center;background-repeat:no-repeat;background-size:.875rem;border-color:var(--color-primary-green)}.preclearance-table-scroll[data-v-c4130b8b]{-webkit-overflow-scrolling:touch;overflow-x:auto}.preclearance-table-td[data-v-c4130b8b]{border-bottom:.0625rem solid var(--color-primary-grey);color:var(--color-primary-black);padding:.75rem 1rem;vertical-align:middle}.preclearance-table-td-amount[data-v-c4130b8b]{font-weight:700;white-space:nowrap}.preclearance-table-td-match[data-v-c4130b8b]{font-size:.75rem;line-height:1;white-space:nowrap}.preclearance-table-td-select[data-v-c4130b8b]{text-align:center;width:3.25rem}.preclearance-table-th[data-v-c4130b8b]{background:var(--color-secondary-green);border-bottom:.0625rem solid var(--color-primary-black);font-weight:600;padding:.5rem 1rem;text-align:left;white-space:nowrap}.preclearance-table-th-match[data-v-c4130b8b]{min-width:6.5rem;text-align:left}.preclearance-table-th-select[data-v-c4130b8b]{text-align:center;width:3.25rem}.preclearance-table-tr[data-v-c4130b8b]{background:var(--color-white)}.preclearance-table-tr:last-child .preclearance-table-td[data-v-c4130b8b]{border-bottom:none}`,zt=(e,t)=>{const n=e.__vccOpts||e;for(const[i,o]of t)n[i]=o;return n},GY=zt(NY,[["styles",[BY]],["__scopeId","data-v-c4130b8b"]]),HY=["disabled"],Ef=zt(xt({__name:"Button",props:{disabled:{type:Boolean,default:!1},label:{type:String},variant:{default:"primary",type:String}},emits:["click"],setup(e,{emit:t}){const n=t,i=o=>{n("click",o)};return(o,r)=>(ce(),xe("button",{type:"button",class:Kt(["ui-button",{"ui-button-primary":e.variant==="primary","ui-button-secondary":e.variant==="secondary","ui-button-tertiary":e.variant==="tertiary"}]),disabled:e.disabled,onClick:i},Ye(e.label),11,HY))}}),[["styles",[".ui-button[data-v-7747e173]{align-items:center;border-radius:.375rem;box-sizing:border-box;cursor:pointer;display:inline-flex;font-family:inherit;font-size:.875rem;justify-content:center;line-height:1.25;min-height:2.25rem;padding:.5rem 1.25rem;transition:background-color .15s ease,filter .15s ease,border-color .15s ease,color .15s ease}.ui-button[data-v-7747e173]:disabled{cursor:not-allowed;filter:none}.ui-button-primary[data-v-7747e173]{background:var(--color-primary-green);border:1px solid transparent;color:var(--color-white);font-weight:600}.ui-button-primary[data-v-7747e173]:disabled{opacity:.5}.ui-button-primary[data-v-7747e173]:not(:disabled):active{filter:brightness(.88)}.ui-button-primary[data-v-7747e173]:not(:disabled):hover{filter:brightness(.95)}.ui-button-secondary[data-v-7747e173]{background:var(--color-white);border:1px solid var(--color-primary-green);color:var(--color-primary-green)}.ui-button-secondary[data-v-7747e173]:disabled{background:var(--color-grey-300);border-color:var(--color-grey-300);color:var(--color-white)}.ui-button-secondary[data-v-7747e173]:not(:disabled):active{filter:brightness(.97)}.ui-button-secondary[data-v-7747e173]:not(:disabled):hover{background:var(--color-green-50)}.ui-button-tertiary[data-v-7747e173]{background:var(--color-white);border:1px solid var(--color-grey-300);color:var(--color-primary-black)}.ui-button-tertiary[data-v-7747e173]:disabled{background:var(--color-white);border-color:var(--color-grey-300);color:var(--color-grey-600)}.ui-button-tertiary[data-v-7747e173]:not(:disabled):active{filter:brightness(.97)}.ui-button-tertiary[data-v-7747e173]:not(:disabled):hover{background:var(--color-grey-50)}"]],["__scopeId","data-v-7747e173"]]),VY={class:"card-base-body","aria-description":"card body"},WY=zt(xt({__name:"CardBase",props:{borderColor:{default:"var(--color-primary-black)",type:String},radius:{default:"0.625rem",type:String}},setup(e){return(t,n)=>(ce(),xe("section",{class:"card-base",style:Di({borderColor:e.borderColor,borderRadius:e.radius})},[t.$slots.header?(ce(),xe("header",{key:0,class:"card-base-header",style:Di({borderColor:e.borderColor})},[Ma(t.$slots,"header",{},void 0)],4)):_t("",!0),W("div",VY,[Ma(t.$slots,"default",{},void 0)])],4))}}),[["styles",[".card-base[data-v-1d4389f8]{background:var(--color-white);border:.0625rem solid;box-sizing:border-box;overflow:hidden}.card-base-body[data-v-1d4389f8]{padding:2rem}.card-base-header[data-v-1d4389f8]{border-bottom:.0625rem solid;padding:1.5rem 2rem}"]],["__scopeId","data-v-1d4389f8"]]),zY=Hi.injectEndpoints({endpoints:e=>({getStatuses:e.query({query:({user:t,company:n,stack:i,id:o=null})=>({url:o?`/statuses/${o}`:"/statuses",params:{user:t,company:n,stack:i}})})})});function tw(e){return bu(zY.endpoints.getStatuses,e)}const UY=["aria-expanded"],$Y=["aria-description"],jY={class:"status-select-panel",role:"listbox","aria-description":"Available match status options"},KY=["aria-selected","onClick"],qY=["aria-description"],QY=["aria-description"],YY=zt(xt({__name:"ContributionStatusSelect",props:{modelValue:{type:Object},user:{type:Number},company:{type:Number},stack:{type:String}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,i=t,{data:o}=tw(De(()=>({user:n.user,company:n.company,stack:n.stack}))),r=De(()=>{const h=o.value;return Array.isArray(h)?h:[]}),s=Ce(!1),a=()=>{s.value=!s.value},l=h=>{i("update:modelValue",h),s.value=!1},u=()=>{s.value=!1};return(h,f)=>(ce(),xe(pt,null,[s.value?(ce(),xe("div",{key:0,class:"status-select-backdrop","aria-hidden":"true","aria-description":"Closes the status menu when clicked",onClick:u})):_t("",!0),W("div",{class:Kt(["status-select",{"status-select-open":s.value}]),"aria-description":"Contribution match status selector"},[W("button",{type:"button",class:"status-select-trigger","aria-expanded":s.value,onClick:Et(a,["stop"])},[W("span",{class:"status-chip","aria-description":`Current match status: ${e.modelValue.name}`},Ye(e.modelValue.name),9,$Y),W("span",{class:Kt(["status-select-chevron",{"status-select-chevron-open":s.value}]),"aria-hidden":"true","aria-description":"Dropdown open or closed indicator"},null,2)],8,UY),cn(W("div",jY,[(ce(!0),xe(pt,null,ei(r.value,p=>(ce(),xe("button",{key:p.id,type:"button",class:Kt(["status-option",{"status-option-active":p.id===e.modelValue.id}]),role:"option","aria-selected":p.id===e.modelValue.id,onClick:Et(m=>l(p),["stop"])},[W("span",{class:Kt(["status-option-radio",{"status-option-radio-selected":p.id===e.modelValue.id}]),"aria-description":`Selected-state marker for ${p.name}`},null,10,qY),W("span",{class:"status-option-label","aria-description":`Match status option: ${p.name}`},Ye(p.name),9,QY)],10,KY))),128))],512),[[ng,s.value]])],2)],64))}}),[["styles",[".status-chip[data-v-6c213610]{align-items:center;background:var(--color-secondary-green);border-radius:62.4375rem;color:var(--color-primary-black);display:inline-flex;font-size:.75rem;font-weight:600;line-height:1.2;padding:.25rem .65rem}.status-option[data-v-6c213610]{align-items:center;background:transparent;border:none;cursor:pointer;display:flex;font:inherit;font-size:.875rem;gap:.6rem;padding:.5rem .75rem;text-align:left;width:100%}.status-option[data-v-6c213610]:hover{background:var(--color-secondary-grey)}.status-option-active .status-option-label[data-v-6c213610]{color:var(--color-primary-green);font-weight:600}.status-option-label[data-v-6c213610]{color:var(--color-primary-black)}.status-option-radio[data-v-6c213610]{border:.125rem solid var(--color-grey-300);border-radius:50%;flex-shrink:0;height:1rem;width:1rem}.status-option-radio-selected[data-v-6c213610]{background:radial-gradient(circle,var(--color-primary-green) 0 42%,transparent 43%);border-color:var(--color-primary-green);box-shadow:inset 0 0 0 3px var(--color-white)}.status-select[data-v-6c213610]{max-width:100%;position:relative;width:100%}.status-select-backdrop[data-v-6c213610]{background:transparent;inset:0;position:fixed;z-index:10000}.status-select-chevron[data-v-6c213610]{border-left:.3125rem solid transparent;border-right:.3125rem solid transparent;border-top:.375rem solid var(--color-grey-600);flex-shrink:0;height:0;transition:transform .15s ease;width:0}.status-select-chevron-open[data-v-6c213610]{transform:rotate(180deg)}.status-select-open[data-v-6c213610]{z-index:10001}.status-select-panel[data-v-6c213610]{background:var(--color-white);border:.0625rem solid var(--color-primary-grey);border-radius:.375rem;box-shadow:0 .25rem .75rem #00000014;left:0;margin-top:.25rem;padding:.35rem 0;position:absolute;right:0;z-index:100}.status-select-trigger[data-v-6c213610]{align-items:center;background:var(--color-white);border:.0625rem solid var(--color-grey-300);border-radius:.25rem;cursor:pointer;display:flex;font:inherit;gap:.5rem;justify-content:space-between;padding:.5rem .75rem;text-align:left;width:100%}"]],["__scopeId","data-v-6c213610"]]),ZY=["aria-description"],XY={class:"detail-item-label","aria-description":"Field label"},JY={class:"detail-item-value","aria-description":"Field value"},eZ=zt(xt({__name:"DetailItem",props:{fullWidth:{type:Boolean,default:!1},label:{type:String},value:{default:"",type:[String,null]}},setup(e){const t=e,n=o=>o==null||o===""?"—":o,i=De(()=>`Detail field: ${t.label}`);return(o,r)=>(ce(),xe("div",{class:Kt(["detail-item",{"detail-item-full":e.fullWidth}]),"aria-description":i.value},[W("div",XY,Ye(e.label),1),W("div",JY,[Ma(o.$slots,"value",{},()=>[Hn(Ye(n(e.value)),1)])])],10,ZY))}}),[["styles",[".detail-item[data-v-0f6897bd]{display:flex;flex-direction:column;gap:.5rem;min-width:0}.detail-item-full[data-v-0f6897bd]{grid-column:1 / -1}.detail-item-label[data-v-0f6897bd]{color:var(--color-grey-600);font-size:.75rem;font-weight:600;line-height:1.3}.detail-item-value[data-v-0f6897bd]{font-size:.875rem;line-height:1.4;word-break:break-word}"]],["__scopeId","data-v-0f6897bd"]]),tZ=["aria-labelledby"],nZ={class:"dialog-header"},iZ=["id"],oZ=["aria-label"],rZ=["aria-labelledby"],sZ={key:0,class:"dialog-footer"},aZ=zt(xt({__name:"Dialog",props:{bodyPadding:{type:Boolean,default:!0},cancelButtonLabel:{default:"Cancel",type:String},closeAriaLabel:{default:"Close dialog",type:String},contentWidth:{default:"min(36rem, 100%)",type:String},primaryButtonDisabled:{type:Boolean,default:!1},primaryButtonLabel:{default:"Submit",type:String},showCloseButton:{type:Boolean,default:!0},showFooter:{type:Boolean,default:!0},title:{type:String},titleId:{default:void 0,type:String}},emits:["cancel-click","close","primary-click"],setup(e,{expose:t,emit:n}){const i=e,o=n,r=Ce(null),s=CM(),a=De(()=>i.titleId??`dialog-title-${s}`),l=De(()=>i.showFooter&&!!(i.cancelButtonLabel||i.primaryButtonLabel)),u=()=>{const w=r.value;w&&(typeof w.showModal=="function"?w.showModal():w.setAttribute("open",""))},h=()=>{const w=r.value;w&&(typeof w.close=="function"?w.close():w.removeAttribute("open"),o("close"))},f=w=>{w.target===r.value&&h()},p=()=>{h()},m=()=>{h(),o("cancel-click")},v=()=>{o("primary-click")};return t({open:u,close:h,dialogRef:r}),(w,b)=>(ce(),xe("dialog",{ref_key:"dialogRef",ref:r,class:"dialog","aria-labelledby":a.value,style:Di({width:e.contentWidth}),onClick:f},[W("section",{class:"dialog-panel",onClick:b[0]||(b[0]=Et(()=>{},["stop"]))},[W("header",nZ,[W("h2",{id:a.value,class:"dialog-title"},Ye(e.title),9,iZ),e.showCloseButton?(ce(),xe("button",{key:0,type:"button",class:"dialog-close","aria-label":e.closeAriaLabel,onClick:p}," × ",8,oZ)):_t("",!0)]),W("section",{class:Kt(["dialog-body",{"dialog-body-flush":!e.bodyPadding}]),"aria-labelledby":a.value},[Ma(w.$slots,"default",{},void 0)],10,rZ),l.value?(ce(),xe("footer",sZ,[e.cancelButtonLabel?(ce(),en(Ef,{key:0,label:e.cancelButtonLabel,variant:"tertiary",onClick:m},null,8,["label"])):_t("",!0),e.primaryButtonLabel?(ce(),en(Ef,{key:1,disabled:e.primaryButtonDisabled,label:e.primaryButtonLabel,variant:"primary",onClick:v},null,8,["disabled","label"])):_t("",!0)])):_t("",!0)])],12,tZ))}}),[["styles",[".dialog[data-v-e576a647]{border:.0625rem solid var(--color-grey-300);border-radius:.5rem;box-shadow:0 8px 24px #0000001f;font-family:inherit;margin:auto;max-width:calc(100vw - 2rem);padding:0}.dialog[data-v-e576a647]::backdrop{background:#00000059}.dialog-body[data-v-e576a647]{-webkit-overflow-scrolling:touch;flex:1;max-height:75dvh;min-height:0;overflow-y:auto;padding:1rem 1.5rem 1.25rem}.dialog-body.dialog-body-flush[data-v-e576a647]{padding:0}.dialog-close[data-v-e576a647]{align-items:center;background:transparent;border:none;border-radius:.25rem;cursor:pointer;display:inline-flex;font-size:1.5rem;font-weight:600;height:2rem;justify-content:center;line-height:1;padding:0;width:2rem}.dialog-close[data-v-e576a647]:hover{background:var(--color-primary-grey);color:var(--color-primary-black)}.dialog-footer[data-v-e576a647]{align-items:center;border-top:.0625rem solid var(--color-grey-300);display:flex;flex-shrink:0;flex-wrap:wrap;gap:.75rem;justify-content:flex-end;padding:1rem 1.5rem 1.25rem}.dialog-header[data-v-e576a647]{align-items:center;display:flex;flex-shrink:0;gap:.75rem;justify-content:space-between;padding:1.125rem 1.5rem}.dialog-panel[data-v-e576a647]{display:flex;flex-direction:column;max-height:calc(100vh - 3rem);padding:0}.dialog-title[data-v-e576a647]{font-size:1.125rem;font-weight:600;line-height:1.3;margin:0}"]],["__scopeId","data-v-e576a647"]]),lZ={class:"reference-line"},cZ={class:"detail-grid","aria-description":"contribution detail fields grid"},uZ={key:0,class:"preclearance-row","aria-description":"matched preclearance request link and remove control"},dZ=["id","href"],hZ=zt(xt({__name:"ContributionDetailsCard",props:{contribution:{type:Object},user:{type:Number},company:{type:Number},stack:{type:String}},emits:["clear-preclearance","match-preclearance","update-status"],setup(e,{emit:t}){const n=e,i=t,{data:o}=tw(De(()=>({user:n.user,company:n.company,stack:n.stack}))),r=De(()=>{const m=o.value,w=(Array.isArray(m)?m:[]).find(b=>b.name===n.contribution.status);return w||{id:0,name:n.contribution.status,organization:0,created:"",modified:""}}),s=[{kind:"value",key:"contributor",label:"Contributor"},{kind:"value",key:"employer",label:"Employer"},{kind:"value",key:"occupation",label:"Occupation"},{kind:"value",key:"address",label:"Address",fullWidth:!0},{kind:"value",key:"state",label:"State"},{kind:"value",key:"zipCode",label:"Zip Code"},{kind:"value",key:"date",label:"Date"},{kind:"value",key:"dateDetected",label:"Date Detected"},{kind:"value",key:"amount",label:"Amount"},{kind:"value",key:"approvedAmount",label:"Approved Amount"},{kind:"value",key:"recipient",label:"Recipient"},{kind:"value",key:"source",label:"Source"},{kind:"status",label:"Status"},{kind:"value",key:"employeeStatus",label:"Employee Status"},{kind:"value",key:"reconciliationStatus",label:"Reconciliation Status"},{kind:"preclearance",label:"Preclearance Request"},{kind:"value",key:"amended",label:"Amended"},{kind:"value",key:"approvalDate",label:"Approval Date"},{kind:"value",key:"lastUpdated",label:"Last Updated"},{kind:"value",key:"lastUpdatedBy",label:"Last Updated By"}],a=m=>m.kind==="value"?m.key:m.kind,l=Ce(null),u=Ce(null),h=()=>{u.value=null,l.value?.open()},f=()=>{const m=u.value;m&&(i("match-preclearance",{preclearanceId:m.preclearanceId,preclearanceLabel:m.label}),l.value?.close())},p=()=>{i("clear-preclearance")};return(m,v)=>(ce(),en(WY,null,{header:Jn(()=>[W("p",lZ,"Reference: "+Ye(e.contribution.reference),1)]),default:Jn(()=>[W("div",cZ,[(ce(),xe(pt,null,ei(s,w=>rt(eZ,{key:a(w),"full-width":w.kind==="value"?w.fullWidth:!1,label:w.label,value:w.kind==="value"?e.contribution[w.key]:""},kM({_:2},[w.kind==="status"?{name:"value",fn:Jn(()=>[rt(YY,{"model-value":r.value,user:e.user,company:e.company,stack:e.stack,"onUpdate:modelValue":v[0]||(v[0]=b=>i("update-status",b))},null,8,["model-value","user","company","stack"])]),key:"0"}:w.kind==="preclearance"?{name:"value",fn:Jn(()=>[e.contribution.preclearanceId&&e.contribution.preclearanceLabel?(ce(),xe("div",uZ,[W("a",{id:`contribution-preclearance-link-${e.contribution.preclearanceLabel}`,class:"preclearance-link",href:`/preclearance/${e.contribution.preclearanceLabel}`},Ye(e.contribution.preclearanceLabel),9,dZ),W("button",{type:"button",class:"preclearance-clear","aria-label":"Remove preclearance link",onClick:p}," × ")])):(ce(),en(Ef,{key:1,label:"Match Preclearance",variant:"secondary",onClick:h}))]),key:"1"}:void 0]),1032,["full-width","label","value"])),64))]),rt(aZ,{"body-padding":!1,"content-width":"min(60rem, calc(100vw - 2rem))","primary-button-disabled":!u.value,"primary-button-label":"Match Selected",ref_key:"preclearanceMatchDialog",ref:l,"secondary-button-label":"Cancel",title:"Match to Preclearance Request",onPrimaryClick:f},{default:Jn(()=>[rt(GY,{"contribution-id":e.contribution.contributionId,user:e.user,company:e.company,stack:e.stack,modelValue:u.value,"onUpdate:modelValue":v[1]||(v[1]=w=>u.value=w)},null,8,["contribution-id","user","company","stack","modelValue"])]),_:1},8,["primary-button-disabled"])]),_:1}))}}),[["styles",[".detail-grid[data-v-ccc491ee]{display:grid;gap:1.25rem;grid-template-columns:1fr 1fr}.preclearance-clear[data-v-ccc491ee]{align-items:center;background:transparent;border:none;border-radius:.25rem;color:var(--color-grey-600);cursor:pointer;display:inline-flex;font-size:1rem;height:1.25rem;justify-content:center;line-height:1;padding:0;width:1.25rem}.preclearance-clear[data-v-ccc491ee]:hover{background:var(--color-primary-green);color:var(--color-white)}.preclearance-link[data-v-ccc491ee]{color:var(--color-primary-green);cursor:pointer;font-weight:500;text-decoration:underline}.preclearance-link[data-v-ccc491ee]:hover{text-decoration:none}.preclearance-row[data-v-ccc491ee]{align-items:center;display:inline-flex;flex-wrap:wrap;gap:.35rem}.reference-line[data-v-ccc491ee]{color:var(--color-grey-600);font-size:.875rem;line-height:1.4;margin:0}"]],["__scopeId","data-v-ccc491ee"]]),fZ={class:"collapsible-panel","aria-description":"Collapsible panel"},pZ=["aria-expanded"],gZ={class:"collapsible-panel-title","aria-description":"Panel title"},mZ=["aria-hidden"],vZ={class:"collapsible-panel-body-inner","aria-description":"Panel content inner wrapper"},CZ=zt(xt({__name:"CollapsiblePanel",props:{title:{type:String}},setup(e){const t=Ce(!1),n=()=>{t.value=!t.value};return(i,o)=>(ce(),xe("div",fZ,[W("button",{type:"button",class:"collapsible-panel-header","aria-expanded":t.value,onClick:n},[W("span",gZ,Ye(e.title),1),W("i",{class:Kt(["fa-solid fa-chevron-right collapsible-panel-chevron",{"collapsible-panel-chevron-open":t.value}]),"aria-hidden":"true"},null,2)],8,pZ),W("div",{class:Kt(["collapsible-panel-body",{"collapsible-panel-body-open":t.value}]),"aria-description":"Panel content","aria-hidden":!t.value},[W("div",vZ,[Ma(i.$slots,"default",{},void 0)])],10,mZ)]))}}),[["styles",[".collapsible-panel[data-v-c69206e2]{border:.0625rem solid var(--color-primary-black);border-radius:.625rem;box-sizing:border-box;overflow:hidden}.collapsible-panel-body[data-v-c69206e2]{display:grid;grid-template-rows:0fr;transition:grid-template-rows .2s ease}.collapsible-panel-body-inner[data-v-c69206e2]{min-height:0;opacity:0;overflow:hidden;padding:0;transition:opacity .2s ease}.collapsible-panel-body-open[data-v-c69206e2]{grid-template-rows:1fr}.collapsible-panel-body-open .collapsible-panel-body-inner[data-v-c69206e2]{opacity:1;padding:2rem}.collapsible-panel-chevron[data-v-c69206e2]{color:var(--color-primary-black);flex-shrink:0;font-size:.75rem;margin-left:.75rem;transition:transform .2s ease}.collapsible-panel-chevron-open[data-v-c69206e2]{transform:rotate(90deg)}.collapsible-panel-header[data-v-c69206e2]{align-items:center;background:var(--color-white);border:none;color:var(--color-primary-black);cursor:pointer;display:flex;font:inherit;justify-content:space-between;padding:1rem 1.25rem;text-align:left;width:100%}.collapsible-panel-header[data-v-c69206e2]:hover{background:var(--color-green-50)}.collapsible-panel-header[aria-expanded=true][data-v-c69206e2]{border-bottom:1px solid var(--color-primary-black)}.collapsible-panel-title[data-v-c69206e2]{font-size:.875rem;font-weight:600;line-height:1.3}"]],["__scopeId","data-v-c69206e2"]]),wZ={class:"notes-section"},bZ={class:"notes-section-actions","aria-description":"add note button container"},yZ={key:0,class:"notes-section-rule"},SZ={class:"notes-section-list",role:"list"},RZ={class:"notes-item-content","aria-description":"note text and metadata"},FZ={class:"notes-item-text"},xZ={key:0,class:"notes-item-badge"},PZ={key:1,class:"notes-item-meta"},EZ={key:1,class:"notes-item-text"},DZ=zt(xt({__name:"ContributionNotes",props:{notes:{type:Array}},emits:["add-note"],setup(e,{emit:t}){const n=t,i=Ce(""),o=()=>{const r=i.value.trim();r&&(n("add-note",r),i.value="")};return(r,s)=>(ce(),en(CZ,{title:"Contribution Notes"},{default:Jn(()=>[W("section",wZ,[s[2]||(s[2]=W("h3",{class:"notes-section-sub"},"Add New Note",-1)),cn(W("textarea",{"onUpdate:modelValue":s[0]||(s[0]=a=>i.value=a),class:"notes-section-textarea",placeholder:"Enter note details...",rows:"4"},null,512),[[Ds,i.value]]),W("div",bZ,[rt(Ef,{disabled:!i.value.trim(),label:"Add Note",onClick:o},null,8,["disabled"])]),e.notes.length?(ce(),xe("hr",yZ)):_t("",!0),W("ul",SZ,[(ce(!0),xe(pt,null,ei(e.notes,a=>(ce(),xe("li",{key:a.id,class:"notes-item"},[s[1]||(s[1]=W("span",{class:"notes-item-bullet","aria-hidden":"true","aria-description":"decorative note list marker"},null,-1)),W("div",RZ,[a.created?.trim()?(ce(),xe(pt,{key:0},[W("p",FZ,Ye(a.text),1),a.type!=="user"||a.createdBy?.trim()?(ce(),xe("p",xZ,Ye(a.type==="user"?a.createdBy?.trim()??"":"System note"),1)):_t("",!0),a.created?.trim()?(ce(),xe("p",PZ,Ye(fi(RY)(a.created)),1)):_t("",!0)],64)):(ce(),xe("p",EZ,Ye(a.text),1))])]))),128))])])]),_:1}))}}),[["styles",[".notes-item[data-v-e3a1aa12]{display:flex;gap:.75rem;margin-bottom:1rem}.notes-item[data-v-e3a1aa12]:last-child{margin-bottom:0}.notes-item-badge[data-v-e3a1aa12]{color:var(--color-primary-black);font-size:.675rem;font-weight:600;margin:.35rem 0 0}.notes-item-bullet[data-v-e3a1aa12]{background:var(--color-grey-600);border-radius:50%;flex-shrink:0;height:.625rem;margin-top:.3rem;width:.625rem}.notes-item-content[data-v-e3a1aa12]{flex:1;min-width:0}.notes-item-meta[data-v-e3a1aa12]{color:var(--color-grey-600);font-size:.625rem;margin:.35rem 0 0}.notes-item-text[data-v-e3a1aa12]{color:var(--color-grey-600);font-size:.75rem;line-height:1.45;margin:0}.notes-section-actions[data-v-e3a1aa12]{display:flex;justify-content:flex-end}.notes-section-list[data-v-e3a1aa12]{list-style:none;margin:0;padding:0}.notes-section-rule[data-v-e3a1aa12]{border:none;border-top:.0625rem solid var(--color-grey-300);margin:1.25rem 0}.notes-section-sub[data-v-e3a1aa12]{font-size:.875rem;font-weight:600;margin:0 0 1rem}.notes-section-textarea[data-v-e3a1aa12]{border:.0625rem solid var(--color-grey-300);border-radius:.25rem;box-sizing:border-box;display:block;font-family:inherit;font-size:.875rem;margin-bottom:1rem;max-width:100%;padding:.5rem .625rem;resize:vertical;width:100%}.notes-section-textarea[data-v-e3a1aa12]:focus{border-color:var(--color-grey-600);outline:none}"]],["__scopeId","data-v-e3a1aa12"]]);var Df={exports:{}},TZ=Df.exports,fD;function AZ(){return fD||(fD=1,(function(e,t){(function(n,i){i()})(TZ,function(){function n(u,h){return typeof h>"u"?h={autoBom:!1}:typeof h!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),h={autoBom:!h}),h.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(u.type)?new Blob(["\uFEFF",u],{type:u.type}):u}function i(u,h,f){var p=new XMLHttpRequest;p.open("GET",u),p.responseType="blob",p.onload=function(){l(p.response,h,f)},p.onerror=function(){console.error("could not download file")},p.send()}function o(u){var h=new XMLHttpRequest;h.open("HEAD",u,!1);try{h.send()}catch{}return 200<=h.status&&299>=h.status}function r(u){try{u.dispatchEvent(new MouseEvent("click"))}catch{var h=document.createEvent("MouseEvents");h.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),u.dispatchEvent(h)}}var s=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof Vi=="object"&&Vi.global===Vi?Vi:void 0,a=s.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),l=s.saveAs||(typeof window!="object"||window!==s?function(){}:"download"in HTMLAnchorElement.prototype&&!a?function(u,h,f){var p=s.URL||s.webkitURL,m=document.createElement("a");h=h||u.name||"download",m.download=h,m.rel="noopener",typeof u=="string"?(m.href=u,m.origin===location.origin?r(m):o(m.href)?i(u,h,f):r(m,m.target="_blank")):(m.href=p.createObjectURL(u),setTimeout(function(){p.revokeObjectURL(m.href)},4e4),setTimeout(function(){r(m)},0))}:"msSaveOrOpenBlob"in navigator?function(u,h,f){if(h=h||u.name||"download",typeof u!="string")navigator.msSaveOrOpenBlob(n(u,f),h);else if(o(u))i(u,h,f);else{var p=document.createElement("a");p.href=u,p.target="_blank",setTimeout(function(){r(p)})}}:function(u,h,f,p){if(p=p||open("","_blank"),p&&(p.document.title=p.document.body.innerText="downloading..."),typeof u=="string")return i(u,h,f);var m=u.type==="application/octet-stream",v=/constructor/i.test(s.HTMLElement)||s.safari,w=/CriOS\/[\d]+/.test(navigator.userAgent);if((w||m&&v||a)&&typeof FileReader<"u"){var b=new FileReader;b.onloadend=function(){var S=b.result;S=w?S:S.replace(/^data:[^;]*;/,"data:attachment/file;"),p?p.location.href=S:location=S,p=null},b.readAsDataURL(u)}else{var y=s.URL||s.webkitURL,R=y.createObjectURL(u);p?p.location=R:location.href=R,p=null,setTimeout(function(){y.revokeObjectURL(R)},4e4)}});s.saveAs=l.saveAs=l,e.exports=l})})(Df)),Df.exports}var IZ=AZ();const MZ=oD(IZ),kZ=Hi.injectEndpoints({endpoints:e=>({exportContributions:e.mutation({query:({user:t,company:n,stack:i,format:o,sortColumn:r=null,sortOrder:s=null,match:a=!1,body:l})=>({url:`/contributions/search/export?user=${t}&company=${n}&stack=${i}&format=${o}${r&&s?`&sortColumn=${r}&sortOrder=${s}`:""}&match=${a}`,method:"POST",body:l,responseHandler:u=>u.headers.get("Content-Type")?.includes("/json")?u.json():u.blob()}),transformResponse:(t,n)=>{const o=n?.response?.headers?.get("Content-Disposition")?.match(/filename="?([^"]+)"?/)?.[1]??`contributions_export_${new Date().toISOString().split("T")[0]}`;return t instanceof Blob&&MZ(t,o),o}})})});function LZ(){return ca(kZ.endpoints.exportContributions)}const OZ={class:"content-container","aria-description":"main content container"},_Z={class:"content-title","aria-description":"content title"},NZ={key:0,"aria-description":"export actions"},BZ=["disabled"],GZ={class:"content","aria-description":"page content"},nw=zt(xt({__name:"ContentContainer",props:{title:{type:String},user:{default:1,type:Number},company:{default:1,type:Number},stack:{default:"QA01",type:String},page:{default:"contribution-search",type:String},showExport:{type:Boolean,default:!0},disableExport:{type:Boolean,default:!1}},setup(e){const t=dD(m=>m.ContributionSearchReducer),{trigger:n,isLoading:i}=LZ(),o=e.page==="detected-contributions",r=De(()=>t.value?.[e.page]??void 0),s=Ce(null),a=Ce(null),l=Ce({}),u=Ce(!1),h=(m="xlsx")=>{!r.value||e.disableExport||(s.value?.close(),u.value=!1,n({user:e.user,company:e.company,stack:e.stack,format:m,match:o,body:r.value}))},f=async()=>{const m=s.value,v=a.value;if(!m||!v)return;const w=v?.getBoundingClientRect(),b=190,y=8,R=Math.max(y,Math.min(w.right-b,window.innerWidth-b-y)),S=Math.min(w.bottom+y,window.innerHeight-120);l.value={position:"absolute",top:`${S}px`,left:`${R}px`,margin:"0"},await Dr(),m?.showModal(),u.value=!0},p=m=>{e.disableExport||i.value||(u.value?m.target===s.value&&(s.value?.close(),u.value=!1):f())};return(m,v)=>{const w=hd("font-awesome-icon");return ce(),xe(pt,null,[W("div",OZ,[W("header",null,[W("h1",_Z,Ye(e.title),1),e.page&&e.showExport?(ce(),xe("span",NZ,[W("button",{class:"export-button",ref_key:"exportModalButton",ref:a,disabled:fi(i)||e.disableExport,onClick:Et(p,["prevent"]),"aria-description":"export button"},[...v[1]||(v[1]=[W("i",{class:"fa-solid fa-download"},null,-1)])],8,BZ)])):_t("",!0)]),W("div",GZ,[Ma(m.$slots,"content",{},void 0)])]),W("dialog",{class:"contributions-export-modal",ref_key:"exportModal",ref:s,style:Di(l.value),onClick:p},[W("button",{onClick:v[0]||(v[0]=Et(b=>h("xlsx"),["stop"]))},[rt(w,{class:"export-excel-icon",icon:["fas","file-excel"]}),v[2]||(v[2]=Hn("Export to Excel",-1))])],4)],64)}}}),[["styles",["a[data-v-93436697],button[data-v-93436697]{cursor:pointer}.content-container[data-v-93436697]{background:var(--color-white);display:flex;flex-direction:column;padding:1.25rem}.content-container header[data-v-93436697]{align-items:center;border-bottom:.0625rem solid var(--color-primary-grey);display:flex;justify-content:space-between;margin-bottom:1.25rem}.content-container header button[data-v-93436697]{background:transparent;border:none;border-radius:.25rem;color:var(--color-primary-green);font-size:xx-large;padding:.5rem;text-decoration:none}.content-container header button[data-v-93436697]:disabled{cursor:not-allowed;opacity:.5}.content-container header button[data-v-93436697]:hover{background:var(--color-green-50)}.contributions-export-modal[data-v-93436697]{border:.1rem solid var(--color-primary-grey);box-shadow:.1875rem .15625rem .15625rem var(--color-secondary-grey);opacity:0;padding:.25rem 0;transform:translateY(-.25rem);transition:opacity .2s ease,transform .2s ease,overlay .2s ease allow-discrete}.contributions-export-modal[open][data-v-93436697]{opacity:1;transform:translateY(0)}@starting-style{.contributions-export-modal[open][data-v-93436697]{opacity:0;transform:translateY(-.25rem)}}.contributions-export-modal button[data-v-93436697]{background:transparent;border:none;display:block;font-family:Poppins,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Arial,sans-serif;font-size:.875rem;padding:.5rem 1rem}.contributions-export-modal button[data-v-93436697]:hover{background:var(--color-green-50)}.contributions-export-modal button svg[data-v-93436697]{margin-right:.5rem}.contributions-export-modal button .export-excel-icon[data-v-93436697]{color:var(--color-green)}.contributions-export-modal button .export-pdf-icon[data-v-93436697]{color:var(--color-red)}[data-v-93436697]::backdrop{background:transparent}"]],["__scopeId","data-v-93436697"]]),HZ=(e,t)=>{const n=e.__vccOpts||e;for(const[i,o]of t)n[i]=o;return n},VZ=xt({name:"ClipLoader",props:{loading:{type:Boolean,default:!0},color:{type:String,default:"#5dc596"},size:{type:String,default:"35px"},radius:{type:String,default:"100%"}},setup(e){return{spinnerStyle:De(()=>({height:e.size,width:e.size,borderWidth:"2px",borderStyle:"solid",borderColor:e.color+" "+e.color+" transparent",borderRadius:e.radius,background:"transparent"}))}}}),WZ={class:"v-spinner"};function zZ(e,t,n,i,o,r){return cn((ce(),xe("div",WZ,[W("div",{class:"v-clip",style:Di(e.spinnerStyle)},null,4)],512)),[[ng,e.loading]])}const UZ=HZ(VZ,[["render",zZ],["__scopeId","data-v-8e9283de"]]),$Z={class:"loading-overlay"},jZ={key:0},KZ="#0a8f2a",iw=zt(xt({__name:"LoadingSpinner",props:{loadingText:{default:null,type:String},size:{default:null,type:Number}},setup(e){const t=Ce(`${e.size?e.size:120}px`);return(n,i)=>(ce(),xe("div",$Z,[rt(fi(UZ),{loading:!0,size:t.value,color:KZ},null,8,["size"]),e.loadingText?(ce(),xe("span",jZ,Ye(e.loadingText),1)):_t("",!0)]))}}),[["styles",[".loading-overlay[data-v-c04b44eb]{align-items:center;display:flex;flex-direction:column;gap:12px;height:100%;justify-content:center}"]],["__scopeId","data-v-c04b44eb"]]);function qZ(e){const{contribution:t,match:n}=e,i=n.preclearance,o=n.created,r=typeof o=="string"&&o.length>0?o.slice(0,10):"";return{contributionId:t.id,reference:i.name,contributor:t.contributor,employer:t.employer,occupation:t.occupation,address:t.address,state:t.state,zipCode:t.zipCode,date:t.date,dateDetected:r,amount:JC(t.amount),approvedAmount:JC(i.amount),recipient:t.recipient,source:t.source,status:n.status,employeeStatus:n.employee.status,reconciliationStatus:i.reconciliationStatus,preclearanceLabel:i.name,preclearanceId:i.id,amended:String(t.amended)==="true"?"Yes":"No",approvalDate:i.approvalDate,lastUpdated:SY(n.modified),lastUpdatedBy:n.modifiedBy}}const QZ=e=>{const t=Number(e.replace(/\/+$/,"").split("/").pop());return Number.isFinite(t)?t:void 0};function YZ(){const e=window.location.search;new URLSearchParams(e).get("id");const n=Ce(window.location.pathname),i=()=>{n.value=window.location.pathname};return Rs(()=>{i(),window.addEventListener("popstate",i)}),dd(()=>{window.removeEventListener("popstate",i)}),De(()=>QZ(n.value))}const ZZ=Hi.injectEndpoints({endpoints:e=>({getContributionDetails:e.query({query:t=>`/contributions/${t}`})})});function XZ(e){return bu(ZZ.endpoints.getContributionDetails,e)}const pD=Hi.injectEndpoints({endpoints:e=>({addContributionNote:e.mutation({query:({contribution:t,body:n})=>({url:`/contributions/${t}/notes`,method:"POST",body:n})}),addContributionNoteBulk:e.mutation({query:t=>({url:"/contributions/notes",method:"POST",body:t})})})});function JZ(){return ca(pD.endpoints.addContributionNote)}function eX(){return ca(pD.endpoints.addContributionNoteBulk)}const gD=Hi.injectEndpoints({endpoints:e=>({updateContributionStatus:e.mutation({query:({contribution:t,body:n})=>({url:`/contributions/${t}/status`,method:"POST",body:n})}),updateContributionsStatusBulk:e.mutation({query:t=>({url:"/contributions/status",method:"POST",body:t})})})});function tX(){return ca(gD.endpoints.updateContributionStatus)}function nX(){return ca(gD.endpoints.updateContributionsStatusBulk)}const iX=Hi.injectEndpoints({endpoints:e=>({getUsers:e.query({query:t=>`/users/${t}`})})});function oX(e){return bu(iX.endpoints.getUsers,e)}const rX={class:"contribution-details-stack","aria-description":"Contribution details layout stack"},sX={key:0,class:"contribution-details-loading","aria-description":"Contribution details loading state"},aX={key:1,"aria-description":"Contribution details load error"},lX=zt(xt({__name:"ContributionDetails",props:{user:{type:Number},company:{type:Number},stack:{type:String}},setup(e){const t=e,n=YZ(),{data:i}=oX(ZI(t,"user")),{data:o,isLoading:r,isError:s}=XZ(De(()=>n.value??0)),{trigger:a}=JZ(),{trigger:l}=tX(),{trigger:u}=yY(),h=De(()=>{const F=i.value;return F&&([F.firstName,F.lastName].filter(Boolean).join(" ").trim()||F.email||F.username)||"Guest"}),f=Ce({}),p=Ce([]),m=De(()=>{const F=o.value;return F?{...qZ(F),...f.value}:null}),v=De(()=>[...p.value,...o.value?.match.notes??[]]),w=De(()=>n.value!==void 0&&r.value),b=De(()=>n.value===void 0?"Invalid contribution id":s.value?"Failed to load contribution":null);un(n,()=>{f.value={},p.value=[]});const y=F=>{f.value={...f.value,...F}},R=async(F,I="user")=>{const L=n.value;if(L!==void 0)try{await a({contribution:L,body:{note:F,type:I}}),p.value=[{id:Date.now(),text:F,type:I,created:I==="user"?new Date().toISOString():"",createdBy:I==="user"?h.value:""},...p.value]}catch(V){console.error("Failed to add note",V)}},S=async F=>{const I=n.value;if(I!==void 0)try{await u({id:I,body:{preclearance:F.preclearanceId}}),y({preclearanceId:F.preclearanceId,preclearanceLabel:F.preclearanceLabel}),await R(`${h.value} matched preclearance to ${F.preclearanceLabel} on ${ew(new Date)}`,"system")}catch(L){console.error("Failed to match preclearance",L)}},P=async F=>{const I=n.value,L=m.value;if(!(I===void 0||!L||L.status===F.name))try{await l({contribution:I,body:{status:F.id}});const V=L.status;y({status:F.name}),await R(`${h.value} changed status from "${V}" to "${F.name}" on ${ew(new Date)}`,"system")}catch(V){console.error("Failed to update contribution status",V)}};return(F,I)=>(ce(),en(nw,{title:"Contribution Details","show-export":!1},{content:Jn(()=>[W("div",rX,[w.value?(ce(),xe("div",sX,[rt(iw,{size:64})])):b.value?(ce(),xe("div",aX,Ye(b.value),1)):(ce(),xe(pt,{key:2},[m.value?(ce(),en(hZ,{key:0,contribution:m.value,user:e.user,company:e.company,stack:e.stack,onClearPreclearance:I[0]||(I[0]=L=>y({preclearanceId:null,preclearanceLabel:""})),onMatchPreclearance:S,onUpdateStatus:P},null,8,["contribution","user","company","stack"])):_t("",!0),rt(DZ,{notes:v.value,onAddNote:R},null,8,["notes"])],64))])]),_:1}))}}),[["styles",[".contribution-details-loading[data-v-b5da9366]{min-height:12rem}.contribution-details-stack[data-v-b5da9366]{display:flex;flex-direction:column;gap:1rem}"]],["__scopeId","data-v-b5da9366"]]),cX={class:"body"},uX=xt({__name:"ContributionDetails.ce",props:{user:{type:Number}},setup(e){return(t,n)=>(ce(),xe("div",cX,[rt(lX,{user:e.user},null,8,["user"])]))}}),ow=':root,:host{--color-black: #000000;--color-white: #ffffff;--color-green: #008000;--color-red: #ff0000;--color-primary-green: #0a8f2a;--color-secondary-green: #eaf2ee;--color-green-50: #f8faf9;--color-primary-black: #1c2b2d;--color-primary-grey: #e6e6e6;--color-secondary-grey: #d7e3dc;--color-grey-50: #fbf9fa;--color-grey-300: #c9d0cc;--color-grey-600: #5f6361;--color-yellow-700: #c07a00;--color-red-700: #c10007}#app{background:var(--color-primary-grey);color:var(--color-primary-black);display:flex;height:100vh;width:100%}:host,:root{--font-family-base: Poppins, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;--topbar-border-bottom-height: .0625rem;--topbar-height: 4rem}body,.body{color:var(--color-primary-black);font-family:var(--font-family-base);margin:0}.docs-story,.sb-show-main,.sbdocs,.sbdocs-content,.sbdocs-preview,.sbdocs-wrapper,#storybook-docs,#storybook-root{font-family:var(--font-family-base)}.v-spinner .v-clip{animation:v-clipDelay .75s 0s infinite linear;border-radius:100%;color:var(--color-primary-green)}@keyframes v-clipDelay{0%{transform:rotate(0)}50%{transform:rotate(180deg)}to{transform:rotate(360deg)}}',dX=zt(uX,[["styles",[ow,".body>*{width:100%}"]]]),mD=6e4,vD=36e5,CD=Symbol.for("constructDateFrom");function wD(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&CD in e?e[CD](t):e instanceof Date?new e.constructor(t):new Date(t)}function Tf(e,t){return wD(e,e)}function hX(e,t){return+Tf(e)>+Tf(t)}function bD(e,t){const n=()=>wD(t?.in,NaN),o=mX(e);let r;if(o.date){const u=vX(o.date,2);r=CX(u.restDateString,u.year)}if(!r||isNaN(+r))return n();const s=+r;let a=0,l;if(o.time&&(a=wX(o.time),isNaN(a)))return n();if(o.timezone){if(l=bX(o.timezone),isNaN(l))return n()}else{const u=new Date(s+a),h=Tf(0);return h.setFullYear(u.getUTCFullYear(),u.getUTCMonth(),u.getUTCDate()),h.setHours(u.getUTCHours(),u.getUTCMinutes(),u.getUTCSeconds(),u.getUTCMilliseconds()),h}return Tf(s+a+l)}const Af={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},fX=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,pX=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,gX=/^([+-])(\d{2})(?::?(\d{2}))?$/;function mX(e){const t={},n=e.split(Af.dateTimeDelimiter);let i;if(n.length>2)return t;if(/:/.test(n[0])?i=n[0]:(t.date=n[0],i=n[1],Af.timeZoneDelimiter.test(t.date)&&(t.date=e.split(Af.timeZoneDelimiter)[0],i=e.substr(t.date.length,e.length))),i){const o=Af.timezone.exec(i);o?(t.time=i.replace(o[1],""),t.timezone=o[1]):t.time=i}return t}function vX(e,t){const n=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),i=e.match(n);if(!i)return{year:NaN,restDateString:""};const o=i[1]?parseInt(i[1]):null,r=i[2]?parseInt(i[2]):null;return{year:r===null?o:r*100,restDateString:e.slice((i[1]||i[2]).length)}}function CX(e,t){if(t===null)return new Date(NaN);const n=e.match(fX);if(!n)return new Date(NaN);const i=!!n[4],o=yu(n[1]),r=yu(n[2])-1,s=yu(n[3]),a=yu(n[4]),l=yu(n[5])-1;if(i)return xX(t,a,l)?yX(t,a,l):new Date(NaN);{const u=new Date(0);return!RX(t,r,s)||!FX(t,o)?new Date(NaN):(u.setUTCFullYear(t,r,Math.max(o,s)),u)}}function yu(e){return e?parseInt(e):1}function wX(e){const t=e.match(pX);if(!t)return NaN;const n=rw(t[1]),i=rw(t[2]),o=rw(t[3]);return PX(n,i,o)?n*vD+i*mD+o*1e3:NaN}function rw(e){return e&&parseFloat(e.replace(",","."))||0}function bX(e){if(e==="Z")return 0;const t=e.match(gX);if(!t)return 0;const n=t[1]==="+"?-1:1,i=parseInt(t[2]),o=t[3]&&parseInt(t[3])||0;return EX(i,o)?n*(i*vD+o*mD):NaN}function yX(e,t,n){const i=new Date(0);i.setUTCFullYear(e,0,4);const o=i.getUTCDay()||7,r=(t-1)*7+n+1-o;return i.setUTCDate(i.getUTCDate()+r),i}const SX=[31,null,31,30,31,30,31,31,30,31,30,31];function yD(e){return e%400===0||e%4===0&&e%100!==0}function RX(e,t,n){return t>=0&&t<=11&&n>=1&&n<=(SX[t]||(yD(e)?29:28))}function FX(e,t){return t>=1&&t<=(yD(e)?366:365)}function xX(e,t,n){return t>=1&&t<=53&&n>=0&&n<=6}function PX(e,t,n){return e===24?t===0&&n===0:n>=0&&n<60&&t>=0&&t<60&&e>=0&&e<25}function EX(e,t){return t>=0&&t<=59}const DX=["aria-description"],TX={class:"sources-checkbox-label"},AX=["value"],IX={class:"sources-checkbox-label-text","aria-description":"source display name"},sw=zt(xt({__name:"ContributionSearchSourceCheckboxRow",props:ka({isNested:{type:Boolean,default:!1},source:{type:Object}},{selectedSourceIndexes:{required:!0},selectedSourceIndexesModifiers:{}}),emits:["update:selectedSourceIndexes"],setup(e){const t=e,n=Tr(e,"selectedSourceIndexes"),i=`contribution-search-source-${t.source.name}`;return(o,r)=>(ce(),xe("div",{class:Kt(["sources-checkbox-row",{"sources-checkbox-row-nested":e.isNested}]),role:"group","aria-description":e.isNested?"nested source checkbox row":"source checkbox row"},[W("label",TX,[cn(W("input",{id:i,"onUpdate:modelValue":r[0]||(r[0]=s=>n.value=s),type:"checkbox",name:"sources",value:e.source.name},null,8,AX),[[Rd,n.value]]),W("span",IX,Ye(e.source.label),1)])],10,DX))}}),[["styles",[`.sources-checkbox-label[data-v-c92a2a02]{align-items:flex-start;color:var(--color-primary-black);cursor:pointer;display:flex;font-size:.8125rem;gap:.375rem;line-height:1.35}.sources-checkbox-label input[type=checkbox][data-v-c92a2a02]{appearance:none;background-color:var(--color-white);border:.0625rem solid var(--color-primary-grey);border-radius:.125rem;cursor:pointer;flex-shrink:0;height:1rem;margin-top:.125rem;width:1rem}.sources-checkbox-label input[type=checkbox][data-v-c92a2a02]:checked{background-color:var(--color-primary-green);background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 10'%3E%3Cpath fill='none' stroke='%23ffffff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M1 5l3 3 7-7'/%3E%3C/svg%3E");background-position:center;background-repeat:no-repeat;background-size:.625rem .5rem;border-color:var(--color-primary-green)}.sources-checkbox-row-nested .sources-checkbox-label[data-v-c92a2a02]{font-size:.75rem}`]],["__scopeId","data-v-c92a2a02"]]),If=e=>[e.source.name,...e.children.flatMap(t=>If(t))],MX=(e,t)=>{if(t.length===0||e.length===0)return t;const n=new Set(t),i=o=>{if(o.children.length>0&&n.has(o.source.name))for(const r of If(o))n.add(r);for(const r of o.children)i(r)};for(const o of e)i(o);return[...n]},kX=e=>{const t=new Set,n=i=>{i.children.length>0&&t.add(i.source.name);for(const o of i.children)n(o)};for(const i of e)n(i);return t},SD=(e,t)=>e.filter(n=>!t.has(n)),LX=(e,t)=>{if(t.length===0||e.length===0)return t;const n=new Set(t),i=o=>{if(o.children.length>0){const r=If(o).filter(a=>a!==o.source.name);r.length>0&&r.every(a=>n.has(a))?n.add(o.source.name):n.delete(o.source.name)}for(const r of o.children)i(r)};for(const o of e)i(o);return[...n]},OX={class:"source-group-header-row","aria-description":"parent source with expand control"},_X=["aria-expanded","aria-label"],NX={class:"source-group-child-list"},BX=["aria-selected"],GX=zt(xt({__name:"ContributionSearchSourceGroupDropdown",props:ka({depth:{default:0,type:Number},sourceDisplayNode:{type:Object}},{selectedSourceIndexes:{required:!0},selectedSourceIndexesModifiers:{}}),emits:["update:selectedSourceIndexes"],setup(e){const t=e,n=Tr(e,"selectedSourceIndexes"),i=Ce(!1),o=Ce(!1),r=De(()=>t.sourceDisplayNode.source.name),s=De(()=>If(t.sourceDisplayNode).filter(v=>v!==r.value)),a=De(()=>n.value.includes(r.value)),l=De(()=>s.value.length===0?!0:s.value.every(v=>n.value.includes(v))),u=De(()=>`Show or hide child sources for ${t.sourceDisplayNode.source.label}`),h=()=>{i.value=!i.value},f=(v,w)=>{if(!(o.value||v===w||s.value.length===0)){if(o.value=!0,v)n.value=Pe.uniq([...n.value,...s.value]);else if(l.value){const b=new Set(s.value);n.value=n.value.filter(y=>!b.has(y))}o.value=!1}},p=()=>{if(o.value||s.value.length===0)return;const v=l.value,w=a.value;v!==w&&(o.value=!0,v?n.value=Pe.uniq([...n.value,r.value]):n.value=n.value.filter(b=>b!==r.value),o.value=!1)},m=De(()=>s.value.filter(v=>n.value.includes(v)).sort().join(","));return un(a,f,{immediate:!0}),un(m,p,{immediate:!0}),(v,w)=>{const b=hd("ContributionSearchSourceGroupDropdown",!0);return ce(),xe("section",{class:Kt(["source-group",{"source-group-nested":e.depth>0}]),style:Di(e.depth>0?{marginLeft:`${e.depth*.75}rem`}:void 0),"aria-description":"collapsible parent source group"},[W("header",OX,[rt(sw,{source:e.sourceDisplayNode.source,"is-nested":e.depth>0,"selected-source-indexes":n.value,"onUpdate:selectedSourceIndexes":w[0]||(w[0]=y=>n.value=y)},null,8,["source","is-nested","selected-source-indexes"]),W("button",{type:"button",class:"source-group-caret-button","aria-expanded":i.value,"aria-label":u.value,onClick:h},[W("i",{class:Kt(["fa-chevron-down fa-solid source-group-chevron",{"source-group-chevron-expanded":i.value}]),"aria-hidden":"true"},null,2)],8,_X)]),rt(bd,{name:"source-group-panel"},{default:Jn(()=>[i.value?(ce(),xe("section",{key:0,class:"source-group-panel","aria-description":"expanded child source checkboxes",onClick:w[3]||(w[3]=Et(()=>{},["stop"]))},[W("ul",NX,[(ce(!0),xe(pt,null,ei(e.sourceDisplayNode.children,y=>(ce(),xe("li",{key:y.source.name,class:"source-group-child-item",role:"option","aria-selected":n.value.includes(y.source.name)},[y.children.length>0?(ce(),en(b,{key:0,"source-display-node":y,depth:e.depth+1,"selected-source-indexes":n.value,"onUpdate:selectedSourceIndexes":w[1]||(w[1]=R=>n.value=R)},null,8,["source-display-node","depth","selected-source-indexes"])):(ce(),en(sw,{key:1,source:y.source,"is-nested":"","selected-source-indexes":n.value,"onUpdate:selectedSourceIndexes":w[2]||(w[2]=R=>n.value=R)},null,8,["source","selected-source-indexes"]))],8,BX))),128))])])):_t("",!0)]),_:1})],6)}}}),[["styles",[".source-group[data-v-76a4741b]{display:flex;flex-direction:column;gap:.25rem}.source-group-caret-button[data-v-76a4741b]{background:transparent;border:none;color:var(--color-primary-black);cursor:pointer;flex-shrink:0;line-height:1;margin-top:.125rem;padding:.125rem}.source-group-caret-button[data-v-76a4741b]:hover{color:var(--color-primary-green)}.source-group-chevron[data-v-76a4741b]{font-size:.75rem;transform:rotate(-90deg);transition:transform .2s ease}.source-group-chevron-expanded[data-v-76a4741b]{transform:rotate(0)}.source-group-child-item[data-v-76a4741b]{list-style:none;margin:0;padding:0}.source-group-child-list[data-v-76a4741b]{display:flex;flex-direction:column;gap:.375rem;list-style:none;margin:0;padding:0}.source-group-header-row[data-v-76a4741b]{align-items:flex-start;display:flex;gap:.25rem;width:100%}.source-group-header-row[data-v-76a4741b] .sources-checkbox-label{flex:1;min-width:0}.source-group-panel[data-v-76a4741b]{margin-left:.5rem;padding:.375rem 0 0 .625rem}.source-group-panel-enter-active[data-v-76a4741b],.source-group-panel-leave-active[data-v-76a4741b]{transition:opacity .2s ease,transform .2s ease}.source-group-panel-enter-from[data-v-76a4741b],.source-group-panel-leave-to[data-v-76a4741b]{opacity:0;transform:translateY(-.25rem)}"]],["__scopeId","data-v-76a4741b"]]),RD=e=>String(e.id),FD=e=>{const t=Pe.keyBy(e,RD),n={};for(const r of e){const s=r.parent;s&&t[s]&&(n[s]||(n[s]=[]),n[s].push(r))}const i=r=>({source:r,children:(n[RD(r)]??[]).sort((s,a)=>s.label.localeCompare(a.label)).map(s=>i(s))});return e.filter(r=>!r.parent||!t[r.parent]).sort((r,s)=>r.label.localeCompare(s.label)).map(r=>i(r))},HX=Hi.injectEndpoints({endpoints:e=>({getSources:e.query({query:({id:t=null})=>({url:t?`/sources/${t}`:"/sources/getAllSources"})})})});function VX(e){return bu(HX.endpoints.getSources,e)}const WX={class:"sources-select","aria-description":"sources multi-select field"},zX=["aria-expanded","aria-label"],UX={class:"sources-dropdown-count"},$X=["aria-label"],jX={key:1,class:"sources-empty-message"},KX={key:2,class:"sources-options","aria-description":"source checkbox options"},qX={class:"sources-select-all-list"},QX={class:"sources-select-all-item"},YX={class:"sources-checkbox-label sources-select-all-label"},ZX={class:"sources-list"},XX=["aria-selected"],JX=zt(xt({__name:"ContributionSearchSourcesSelect",props:{selectedSourceIndexes:{default:()=>[]},selectedSourceIndexesModifiers:{}},emits:["update:selectedSourceIndexes"],setup(e){const t=Tr(e,"selectedSourceIndexes"),n=wo({}),{data:i,isLoading:o}=VX(n),r=Ce(!1),s=Ce(null),a=Ce(null),l=Ce(null),u=Ce(!1),h=Ce(!1),f=De(()=>{const A=i.value;return A?Array.isArray(A)?A:[A]:[]}),p=De(()=>FD(f.value)),m=De(()=>kX(p.value)),v=De(()=>f.value.map(A=>A.name)),w=De(()=>SD(v.value,m.value)),b=De(()=>SD(t.value,m.value)),y=De(()=>b.value.length),R=De(()=>{const A=w.value;return A.length===0?!1:A.every(T=>t.value.includes(T))}),S=De(()=>y.value>0&&!R.value),P=De({get:()=>R.value,set:A=>{t.value=A?[...v.value]:[]}}),F=De(()=>{const A=y.value;return A===1?"1 source selected":`${A} sources selected`}),I=()=>{r.value=!r.value},L=()=>{r.value=!1},V=(A,T)=>{if(Pe.isEmpty(T)||A.length===0)return T;const k=T.map(K=>A.some(Re=>Re.name===K)?K:A.find(Re=>Re.label===K)?.name??K);return Pe.uniq(k).filter(K=>A.some(re=>re.name===K))},G=(A,T)=>{if(A.length===0)return;h.value=!0;let k=[...t.value];if(k=V(A,k),!Pe.isEmpty(k)){const K=FD(A);k=MX(K,k),k=LX(K,k)}T&&!u.value&&(u.value=!0,Pe.isEmpty(k)&&(k=A.map(K=>K.name))),Pe.isEqual([...k].sort(),[...t.value].sort())||(t.value=k),h.value=!1};un(f,A=>{G(A,!0)},{flush:"post",immediate:!0}),un(t,()=>{h.value||G(f.value,!1)},{deep:!0,flush:"post"}),un([S,R],()=>{l.value&&(l.value.indeterminate=S.value)},{flush:"post"});const _=A=>{if(r.value){{const T=A.composedPath();if(a.value&&T.includes(a.value)||s.value&&T.includes(s.value))return}L()}};return Rs(()=>{document.addEventListener("click",_)}),$l(()=>{document.removeEventListener("click",_)}),(A,T)=>(ce(),xe("section",WX,[W("section",{class:"sources-dropdown","aria-description":"sources checkbox dropdown",onKeydown:dn(L,["esc"])},[W("button",{ref_key:"dropdownButtonRef",ref:s,type:"button",class:"sources-dropdown-button","aria-expanded":r.value,"aria-haspopup":"listbox","aria-label":`Sources, ${F.value}`,onClick:Et(I,["stop"])},[T[4]||(T[4]=W("strong",{class:"sources-dropdown-title"},"Sources",-1)),W("span",UX,Ye(y.value),1),W("i",{class:Kt(["fa-solid fa-chevron-down sources-dropdown-chevron",{"sources-dropdown-chevron-open":r.value}]),"aria-hidden":"true"},null,2)],8,zX),rt(bd,{name:"sources-dropdown"},{default:Jn(()=>[r.value?(ce(),xe("section",{key:0,ref_key:"dropdownPanelRef",ref:a,class:"sources-dropdown-panel","aria-description":"sources checkbox list panel",role:"listbox","aria-multiselectable":"true","aria-label":F.value,onClick:T[3]||(T[3]=Et(()=>{},["stop"]))},[fi(o)?(ce(),en(iw,{key:0,size:48,"loading-text":"Loading sources…"})):f.value.length===0?(ce(),xe("p",jX," No sources available. ")):(ce(),xe("section",KX,[W("ul",qX,[W("li",QX,[W("label",YX,[cn(W("input",{id:"contribution-search-source-select-all",ref_key:"selectAllCheckboxRef",ref:l,"onUpdate:modelValue":T[0]||(T[0]=k=>P.value=k),type:"checkbox",name:"sources-select-all"},null,512),[[Rd,P.value]]),T[5]||(T[5]=Hn(" ALL SOURCES ",-1))])])]),W("ul",ZX,[(ce(!0),xe(pt,null,ei(p.value,k=>(ce(),xe("li",{key:k.source.name,class:"sources-list-item",role:"option","aria-selected":t.value.includes(k.source.name)},[k.children.length>0?(ce(),en(GX,{key:0,"source-display-node":k,"selected-source-indexes":t.value,"onUpdate:selectedSourceIndexes":T[1]||(T[1]=K=>t.value=K)},null,8,["source-display-node","selected-source-indexes"])):(ce(),en(sw,{key:1,source:k.source,"selected-source-indexes":t.value,"onUpdate:selectedSourceIndexes":T[2]||(T[2]=K=>t.value=K)},null,8,["source","selected-source-indexes"]))],8,XX))),128))])]))],8,$X)):_t("",!0)]),_:1})],32)]))}}),[["styles",[`.sources-checkbox-label[data-v-43be128d]{align-items:flex-start;color:var(--color-primary-black);cursor:pointer;display:flex;font-size:.8125rem;gap:.375rem;line-height:1.35}.sources-checkbox-label input[type=checkbox][data-v-43be128d]{appearance:none;background-color:var(--color-white);border:.0625rem solid var(--color-primary-grey);border-radius:.125rem;cursor:pointer;flex-shrink:0;height:1rem;margin-top:.125rem;width:1rem}.sources-checkbox-label input[type=checkbox][data-v-43be128d]:checked{background-color:var(--color-primary-green);background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 10'%3E%3Cpath fill='none' stroke='%23ffffff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M1 5l3 3 7-7'/%3E%3C/svg%3E");background-position:center;background-repeat:no-repeat;background-size:.625rem .5rem;border-color:var(--color-primary-green)}.sources-checkbox-label input[type=checkbox][data-v-43be128d]:indeterminate{background-color:var(--color-primary-green);background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath fill='none' stroke='%23ffffff' stroke-linecap='round' stroke-width='2' d='M2 6h8'/%3E%3C/svg%3E");background-position:center;background-repeat:no-repeat;background-size:.625rem;border-color:var(--color-primary-green)}.sources-dropdown[data-v-43be128d]{position:relative}.sources-dropdown-button[data-v-43be128d]{align-items:center;background:var(--color-white);border:.0625rem solid var(--color-primary-grey);border-radius:.25rem;box-sizing:border-box;color:var(--color-primary-black);cursor:pointer;display:flex;font-family:Poppins,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Arial,sans-serif;font-size:.9375rem;gap:.375rem;height:2.25rem;padding:0 .5rem;width:100%}.sources-dropdown-button[data-v-43be128d]:focus-visible{border-color:var(--color-primary-green)}.sources-dropdown-button[data-v-43be128d]:hover{border-color:var(--color-primary-green)}.sources-dropdown-chevron[data-v-43be128d]{font-size:.75rem;margin-left:auto;opacity:.85;transform:rotate(0);transition:transform .2s ease}.sources-dropdown-chevron-open[data-v-43be128d]{transform:rotate(180deg)}.sources-dropdown-count[data-v-43be128d]{background-color:var(--color-primary-grey);border-radius:.25rem;color:var(--color-primary-black);font-size:.875rem;font-style:normal;font-weight:600;line-height:1.25;min-width:1.25rem;padding:.125rem .375rem;text-align:center}.sources-dropdown-enter-active[data-v-43be128d],.sources-dropdown-leave-active[data-v-43be128d]{transition:opacity .2s ease,transform .2s ease}.sources-dropdown-enter-from[data-v-43be128d],.sources-dropdown-leave-to[data-v-43be128d]{opacity:0;transform:translateY(-.25rem)}.sources-dropdown-panel[data-v-43be128d]{background:var(--color-white);border:.0625rem solid var(--color-primary-grey);border-radius:.375rem;box-shadow:0 .625rem 1.5rem #00000014;left:0;margin-top:.375rem;max-height:min(70vh,24rem);max-width:36rem;overflow-x:hidden;overflow-y:auto;padding:.75rem;position:absolute;top:100%;width:100%;z-index:3}.sources-dropdown-title[data-v-43be128d]{font-size:.875rem;font-weight:600}.sources-empty-message[data-v-43be128d]{color:var(--color-primary-black);font-size:.875rem;margin:0}.sources-list[data-v-43be128d]{display:grid;gap:.5rem 1rem;grid-template-columns:1fr 1fr;list-style:none;margin:0;padding:0}.sources-list-item[data-v-43be128d]{list-style:none;margin:0;min-width:0;padding:0}.sources-options[data-v-43be128d]{display:flex;flex-direction:column;gap:.5rem}.sources-select[data-v-43be128d]{display:flex;flex-direction:column;gap:.35rem;margin-top:.75rem;min-width:0;width:100%}.sources-select-all-item[data-v-43be128d]{list-style:none}.sources-select-all-label[data-v-43be128d]{color:var(--color-red);font-weight:600}.sources-select-all-list[data-v-43be128d]{border-bottom:.0625rem solid var(--color-primary-grey);list-style:none;margin:0;padding:0 0 .5rem}`]],["__scopeId","data-v-43be128d"]]),xD=[{value:"AL",label:"Alabama"},{value:"AK",label:"Alaska"},{value:"AZ",label:"Arizona"},{value:"AR",label:"Arkansas"},{value:"CA",label:"California"},{value:"CO",label:"Colorado"},{value:"CT",label:"Connecticut"},{value:"DE",label:"Delaware"},{value:"DC",label:"District of Columbia"},{value:"FL",label:"Florida"},{value:"GA",label:"Georgia"},{value:"HI",label:"Hawaii"},{value:"ID",label:"Idaho"},{value:"IL",label:"Illinois"},{value:"IN",label:"Indiana"},{value:"IA",label:"Iowa"},{value:"KS",label:"Kansas"},{value:"KY",label:"Kentucky"},{value:"LA",label:"Louisiana"},{value:"ME",label:"Maine"},{value:"MD",label:"Maryland"},{value:"MA",label:"Massachusetts"},{value:"MI",label:"Michigan"},{value:"MN",label:"Minnesota"},{value:"MS",label:"Mississippi"},{value:"MO",label:"Missouri"},{value:"MT",label:"Montana"},{value:"NE",label:"Nebraska"},{value:"NV",label:"Nevada"},{value:"NH",label:"New Hampshire"},{value:"NJ",label:"New Jersey"},{value:"NM",label:"New Mexico"},{value:"NY",label:"New York"},{value:"NC",label:"North Carolina"},{value:"ND",label:"North Dakota"},{value:"OH",label:"Ohio"},{value:"OK",label:"Oklahoma"},{value:"OR",label:"Oregon"},{value:"PA",label:"Pennsylvania"},{value:"RI",label:"Rhode Island"},{value:"SC",label:"South Carolina"},{value:"SD",label:"South Dakota"},{value:"TN",label:"Tennessee"},{value:"TX",label:"Texas"},{value:"UT",label:"Utah"},{value:"VT",label:"Vermont"},{value:"VA",label:"Virginia"},{value:"WA",label:"Washington"},{value:"WV",label:"West Virginia"},{value:"WI",label:"Wisconsin"},{value:"WY",label:"Wyoming"}],eJ={class:"states-select","aria-description":"U.S. states multi-select field"},tJ=["aria-expanded","aria-label","onKeydown"],nJ={class:"states-dropdown-value","aria-description":"Selected states or placeholder"},iJ={key:0,class:"states-dropdown-placeholder","aria-description":"Placeholder for no states selected"},oJ={key:1,class:"states-selected-list",role:"list","aria-label":"Selected states"},rJ={class:"states-selected-chip","aria-description":"Selected state chip"},sJ=["aria-label","onClick"],aJ=["aria-label"],lJ={class:"states-options","aria-description":"state checkbox options"},cJ={class:"states-list"},uJ=["aria-selected"],dJ={class:"states-checkbox-label"},hJ=["id","value"],fJ={"aria-description":"State name"},pJ=zt(xt({__name:"ContributionSearchStatesSelect",props:{selectedStateValues:{default:()=>[]},selectedStateValuesModifiers:{}},emits:["update:selectedStateValues"],setup(e){const t=Tr(e,"selectedStateValues"),n=Ce(!1),i=Ce(null),o=Ce(null),r=De(()=>t.value.length),s=De(()=>r.value>0),a=De(()=>{const m=[];for(const v of t.value){const w=xD.find(b=>b.value===v);w&&m.push(w)}return m}),l=De(()=>s.value?a.value.map(m=>m.label).join(", "):"Select States"),u=()=>{n.value=!n.value},h=()=>{n.value=!1},f=(m,v)=>{m.stopPropagation(),t.value=t.value.filter(w=>w!==v)},p=m=>{if(n.value){{const v=m.composedPath();if(o.value&&v.includes(o.value)||i.value&&v.includes(i.value))return}h()}};return Rs(()=>{document.addEventListener("click",p)}),$l(()=>{document.removeEventListener("click",p)}),(m,v)=>{const w=hd("font-awesome-icon");return ce(),xe("section",eJ,[v[2]||(v[2]=W("span",{class:"states-field-label","aria-description":"states field label"},"U.S. state",-1)),W("section",{class:"states-dropdown","aria-description":"states checkbox dropdown",onKeydown:dn(h,["esc"])},[W("div",{ref_key:"dropdownControlRef",ref:i,class:"states-dropdown-control",role:"combobox",tabindex:"0","aria-expanded":n.value,"aria-haspopup":"listbox","aria-label":`U.S. states, ${l.value}`,onClick:Et(u,["stop"]),onKeydown:[dn(Et(u,["prevent"]),["enter"]),dn(Et(u,["prevent"]),["space"])],"aria-description":"Dropdown control for selecting U.S. states"},[W("div",nJ,[s.value?(ce(),xe("ul",oJ,[(ce(!0),xe(pt,null,ei(a.value,b=>(ce(),xe("li",{key:b.value,class:"states-selected-item",role:"listitem"},[W("span",rJ,[Hn(Ye(b.label)+" ",1),W("button",{type:"button",class:"states-selected-remove","aria-label":`Remove ${b.label}`,onClick:y=>f(y,b.value)},[rt(w,{class:"states-selected-remove-icon",icon:["fas","xmark"],size:"xs"})],8,sJ)])]))),128))])):(ce(),xe("span",iJ,"Select States"))]),W("i",{class:Kt(["fa-solid fa-chevron-down states-dropdown-chevron",{"states-dropdown-chevron-open":n.value}]),"aria-hidden":"true"},null,2)],40,tJ),rt(bd,{name:"states-dropdown"},{default:Jn(()=>[n.value?(ce(),xe("section",{key:0,ref_key:"dropdownPanelRef",ref:o,class:"states-dropdown-panel","aria-description":"states checkbox list panel",role:"listbox","aria-multiselectable":"true","aria-label":l.value,onClick:v[1]||(v[1]=Et(()=>{},["stop"]))},[W("section",lJ,[W("ul",cJ,[(ce(!0),xe(pt,null,ei(fi(xD),b=>(ce(),xe("li",{key:b.value,class:"states-list-item",role:"option","aria-selected":t.value.includes(b.value)},[W("label",dJ,[cn(W("input",{id:`contribution-search-state-${b.value}`,"onUpdate:modelValue":v[0]||(v[0]=y=>t.value=y),type:"checkbox",name:"states",value:b.value},null,8,hJ),[[Rd,t.value]]),W("span",fJ,Ye(b.label),1)])],8,uJ))),128))])])],8,aJ)):_t("",!0)]),_:1})],32)])}}}),[["styles",[`.states-checkbox-label[data-v-1a86c65c]{align-items:flex-start;color:var(--color-primary-black);cursor:pointer;display:flex;font-size:.8125rem;gap:.375rem;line-height:1.35}.states-checkbox-label input[type=checkbox][data-v-1a86c65c]{appearance:none;background-color:var(--color-white);border:.0625rem solid var(--color-primary-grey);border-radius:.125rem;cursor:pointer;flex-shrink:0;height:1rem;margin-top:.125rem;width:1rem}.states-checkbox-label input[type=checkbox][data-v-1a86c65c]:checked{background-color:var(--color-primary-green);background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 10'%3E%3Cpath fill='none' stroke='%23ffffff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M1 5l3 3 7-7'/%3E%3C/svg%3E");background-position:center;background-repeat:no-repeat;background-size:.625rem .5rem;border-color:var(--color-primary-green)}.states-dropdown[data-v-1a86c65c]{position:relative}.states-dropdown-chevron[data-v-1a86c65c]{flex-shrink:0;font-size:.75rem;margin-top:.375rem;opacity:.85;transform:rotate(0);transition:transform .2s ease}.states-dropdown-chevron-open[data-v-1a86c65c]{transform:rotate(180deg)}.states-dropdown-control[data-v-1a86c65c]{align-items:flex-start;background:var(--color-white);border:.0625rem solid var(--color-primary-grey);border-radius:.25rem;box-sizing:border-box;color:var(--color-grey-600);cursor:pointer;display:flex;font-family:Poppins,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Arial,sans-serif;font-size:.9375rem;gap:.375rem;min-height:2.25rem;padding:.25rem .5rem;width:100%}.states-dropdown-control[data-v-1a86c65c]:focus-visible{border-color:var(--color-primary-green)}.states-dropdown-control[data-v-1a86c65c]:hover{border-color:var(--color-primary-green)}.states-dropdown-enter-active[data-v-1a86c65c],.states-dropdown-leave-active[data-v-1a86c65c]{transition:opacity .2s ease,transform .2s ease}.states-dropdown-enter-from[data-v-1a86c65c],.states-dropdown-leave-to[data-v-1a86c65c]{opacity:0;transform:translateY(-.25rem)}.states-dropdown-panel[data-v-1a86c65c]{background:var(--color-white);border:.0625rem solid var(--color-primary-grey);border-radius:.375rem;box-shadow:0 .625rem 1.5rem #00000014;left:0;margin-top:.375rem;max-height:min(70vh,24rem);max-width:36rem;overflow-x:hidden;overflow-y:auto;padding:.75rem;position:absolute;top:100%;width:100%;z-index:3}.states-dropdown-placeholder[data-v-1a86c65c]{color:var(--color-secondary-black);display:block;font-size:.9375rem;line-height:1.75rem;padding:0 .125rem}.states-dropdown-value[data-v-1a86c65c]{flex:1;min-width:0}.states-field-label[data-v-1a86c65c]{color:var(--color-primary-black);font-size:.875rem}.states-list[data-v-1a86c65c]{display:grid;gap:.5rem 1rem;grid-template-columns:1fr 1fr;list-style:none;margin:0;padding:0}.states-list-item[data-v-1a86c65c]{list-style:none;margin:0;min-width:0;padding:0}.states-options[data-v-1a86c65c]{display:flex;flex-direction:column;gap:.5rem}.states-select[data-v-1a86c65c]{display:flex;flex-direction:column;gap:.35rem;margin-top:.75rem;min-width:0;width:100%}.states-selected-chip[data-v-1a86c65c]{align-items:center;background-color:var(--color-secondary-green);border-radius:.25rem;color:var(--color-primary-black);display:inline-flex;font-size:.8125rem;gap:.125rem;line-height:1.25;max-width:100%;padding:.125rem .125rem .125rem .375rem}.states-selected-item[data-v-1a86c65c]{list-style:none;margin:0;max-width:100%;padding:0}.states-selected-list[data-v-1a86c65c]{display:flex;flex-wrap:wrap;gap:.25rem;list-style:none;margin:0;padding:0}.states-selected-remove[data-v-1a86c65c]{align-items:center;background:transparent;border:none;border-radius:.125rem;color:var(--color-primary-black);cursor:pointer;display:inline-flex;flex-shrink:0;font-size:.75rem;height:1.25rem;justify-content:center;padding:0;width:1.25rem}.states-selected-remove[data-v-1a86c65c]:hover{color:var(--color-red)}.states-selected-remove-icon[data-v-1a86c65c]{height:.5625rem;width:.703125rem}`]],["__scopeId","data-v-1a86c65c"]]);function gJ(e){return{id:e.contribution.id,contributor:e.contribution.contributor,employeeStatus:e.match?.employee?.status??"",address:e.contribution.address,state:e.contribution.state,zipCode:e.contribution.zipCode,date:e.contribution.date,dateDetected:e.match?.created??"",amount:e.contribution.amount,employer:e.contribution.employer,occupation:e.contribution.occupation,recipient:e.contribution.recipient,amended:e.contribution.amended,sources:e.contribution.source,status:e.match?.status??"",reconciliationStatus:e.match?.preclearance?.reconciliationStatus??"",preclearance:e.match?.preclearance?.name??"",approvalDate:e.match?.preclearance?.approvalDate??"",approvedAmount:e.match?.preclearance?.amount??null,lastUpdated:e.match?.modified??"",lastUpdatedBy:e.match?.modifiedBy??"",notes:e.match?.notes.map(t=>t.text).join(";")??"",tags:e.match?.employee?.tags.map(t=>t.name).join(";")??"",groups:e.match?.employee?.groups.map(t=>t.name).join(";")??""}}var mn=(e=>(e[e.NULL=0]="NULL",e[e.OR=1]="OR",e[e.AND=2]="AND",e))(mn||{}),rn=(e=>(e[e.EQUALS=1]="EQUALS",e[e.NOT_EQUALS=2]="NOT_EQUALS",e[e.LESS_THAN=3]="LESS_THAN",e[e.GREATER_THAN=4]="GREATER_THAN",e[e.LESS_THAN_OR_EQUAL=5]="LESS_THAN_OR_EQUAL",e[e.GREATER_THAN_OR_EQUAL=6]="GREATER_THAN_OR_EQUAL",e[e.CONTAINS=7]="CONTAINS",e[e.DOES_NOT_CONTAIN=8]="DOES_NOT_CONTAIN",e[e.BEGINS_WITH=9]="BEGINS_WITH",e[e.ENDS_WITH=10]="ENDS_WITH",e))(rn||{});const mJ=Hi.injectEndpoints({endpoints:e=>({searchContributions:e.mutation({query:({user:t,company:n,stack:i,page:o,limit:r,sortColumn:s=null,sortOrder:a=null,match:l=!1,body:u})=>({url:`/contributions/search?user=${t}&company=${n}&stack=${i}&page=${o}&limit=${r}${s&&a?`&sortColumn=${s}&sortOrder=${a}`:""}&match=${l}`,method:"POST",body:u}),transformResponse:(t,n)=>({page:t.page,totalPages:t.totalPages,limit:t.limit,total:t.total,results:t.results.map(gJ)})})})});function vJ(){return ca(mJ.endpoints.searchContributions)}function CJ(){let e=1;return()=>e++}const wJ=CJ(),bJ={NULL:mn.NULL,OR:mn.OR,AND:mn.AND},PD={equals:rn.EQUALS,notEqual:rn.NOT_EQUALS,lessThan:rn.LESS_THAN,greaterThan:rn.GREATER_THAN,lessThanOrEqual:rn.LESS_THAN_OR_EQUAL,greaterThanOrEqual:rn.GREATER_THAN_OR_EQUAL,contains:rn.CONTAINS,notContains:rn.DOES_NOT_CONTAIN,startsWith:rn.BEGINS_WITH,endsWith:rn.ENDS_WITH};function yJ(e="",t=[]){const n=bJ?.[e];return!n||t.length<2?mn.NULL:n}function SJ(e=""){const t=PD?.[e];return t||rn.EQUALS}function si(e,t){if(Pe.isNil(PD[e]))throw Error("Invalid Comparator...");return{id:wJ(),comparator:SJ(e),value:t}}const RJ={class:"search-layout","aria-description":"contribution search form layout"},FJ={class:"search-fieldset"},xJ={class:"field field-full"},PJ=["value","aria-invalid","aria-describedby"],EJ={key:0,id:"contribution-search-first-name-error",class:"field-error",role:"alert"},DJ={class:"field field-full"},TJ=["value","aria-invalid","aria-describedby"],AJ={key:0,id:"contribution-search-last-name-error",class:"field-error",role:"alert"},IJ={class:"field postal-field","aria-description":"postal codes multi-value field"},MJ={class:"postal-input","aria-description":"postal codes input with selected chips"},kJ={key:0,class:"postal-selected-list",role:"list","aria-label":"Selected postal codes","aria-description":"selected postal codes list"},LJ={class:"postal-selected-chip","aria-description":"Selected postal code chip"},OJ=["aria-label","onClick"],_J=["placeholder","aria-label","onKeydown"],NJ={class:"date-fieldset dates-row"},BJ={class:"field field-label"},GJ=["aria-invalid","aria-describedby"],HJ={class:"field field-date"},VJ=["aria-invalid","aria-describedby"],WJ={class:"actions","aria-description":"form submit actions"},zJ=["disabled"],ED="This field is required.",DD="Record dates require both a start date and an end date.",TD="Record start date must be on or before the end date.",AD=zt(xt({__name:"ContributionSearchForm",props:{contributionSearchPresets:{default:null,type:[Object,null]},loading:{type:Boolean,default:!1}},emits:["search"],setup(e,{emit:t}){const n=e,i=t,o=Ce(""),r=Ce(""),s=Ce([]),a=Ce([]),l=Ce(""),u=Ce(""),h=Ce(""),f=Ce([]),p=Ce(0),m=Ce(""),v=Ce(null),w=Ce(""),b=Ce(""),y=()=>{const A=String(l.value??"").trim();if(Pe.isEmpty(A)||a.value.includes(A)){l.value="";return}a.value=[...a.value,A],l.value=""},R=(A,T)=>{A.preventDefault(),A.stopPropagation(),a.value=a.value.filter((k,K)=>K!==T)},S=(A,T)=>{const k=A.target,K=k.value.replace(/[^A-Za-z\s-]/g,"").replace(/-{2,}/g,"-").replace(/\s{2,}/g," ").replace(/^[\s-]+/,"");T==="firstName"?o.value=K:r.value=K,k.value=K},P=(A,T)=>{A.target.value=A.target.value.replace(/[\s-]+$/,""),S(A,T)},F=De(()=>m.value===DD||m.value===TD),I=De(()=>{const A=["record-dates-hint"];return F.value&&A.push("contribution-search-form-error"),A.join(" ")}),L=A=>{const T=A.contributor?.query?.find(ue=>ue.comparator===rn.BEGINS_WITH),k=A.contributor?.query?.find(ue=>ue.comparator===rn.ENDS_WITH);o.value=Pe.isNil(T?.value)?"":String(T?.value),r.value=Pe.isNil(k?.value)?"":String(k?.value);const K=(A.state?.query??[]).filter(ue=>ue.comparator===rn.EQUALS);s.value=K.map(ue=>Pe.isNil(ue.value)?"":String(ue.value)).filter(ue=>!Pe.isEmpty(ue));const re=(A.zipCode?.query??[]).filter(ue=>ue.comparator===rn.EQUALS);a.value=re.map(ue=>Pe.isNil(ue.value)?"":String(ue.value)).filter(ue=>!Pe.isEmpty(ue)),l.value="";const Re=A.date?.query?.find(ue=>ue.comparator===rn.GREATER_THAN_OR_EQUAL),be=A.date?.query?.find(ue=>ue.comparator===rn.LESS_THAN_OR_EQUAL);u.value=Pe.isNil(Re?.value)?"":String(Re?.value),h.value=Pe.isNil(be?.value)?"":String(be?.value);const Fe=(A.sources?.query??[]).filter(ue=>ue.comparator===rn.EQUALS).map(ue=>Pe.isNil(ue.value)?"":String(ue.value)).filter(ue=>!Pe.isEmpty(ue));f.value=Fe,Fe.length>0&&(p.value+=1),m.value="",w.value="",b.value=""};un(()=>n.contributionSearchPresets,async A=>{A===null||Pe.isEmpty(A)||(L(A),await Dr())},{deep:!0,immediate:!0});const V=()=>{m.value="",w.value="",b.value="";let A=!0;if(Pe.isEmpty(o.value.trim())&&(w.value=ED,A=!1),Pe.isEmpty(r.value.trim())&&(b.value=ED,A=!1),!A)return!1;const T=!Pe.isEmpty(u.value),k=!Pe.isEmpty(h.value);if(T!==k)return m.value=DD,!1;if(T&&k){const K=bD(u.value),re=bD(h.value);if(hX(K,re))return m.value=TD,!1}return!0},G=()=>{const A={},T=o.value.trim(),k=r.value.trim();A.contributor={conjunction:mn.AND,query:[si("startsWith",T),si("endsWith",k)]},Pe.isEmpty(s.value)||(A.state={conjunction:s.value.length>1?mn.OR:mn.NULL,query:s.value.map(re=>si("equals",re))}),y();const K=a.value.map(re=>re.trim()).filter(re=>!Pe.isEmpty(re));return Pe.isEmpty(K)||(A.zipCode={conjunction:K.length>1?mn.OR:mn.NULL,query:K.map(re=>si("equals",re))}),!Pe.isEmpty(u.value)&&!Pe.isEmpty(h.value)&&(A.date={conjunction:mn.AND,query:[si("greaterThanOrEqual",u.value),si("lessThanOrEqual",h.value)]}),Pe.isEmpty(f.value)||(A.sources={conjunction:f.value.length>1?mn.OR:mn.NULL,query:f.value.map(re=>si("equals",re))}),A},_=()=>{if(!n.loading){if(!V()){Dr(()=>{if(w.value){document.getElementById("contribution-search-first-name")?.focus();return}if(b.value){document.getElementById("contribution-search-last-name")?.focus();return}v.value?.focus()});return}i("search",G())}};return(A,T)=>(ce(),xe("section",RJ,[W("form",{class:"search-form",role:"search","aria-label":"Contribution search",novalidate:"",onSubmit:Et(_,["prevent"])},[W("fieldset",FJ,[T[16]||(T[16]=W("legend",{class:"visually-hidden"},"Contribution search filters",-1)),W("label",xJ,[T[11]||(T[11]=W("span",{class:"field-label","aria-description":"first name field label"},[Hn(" First name "),W("abbr",{class:"req",title:"required"},"*")],-1)),W("input",{id:"contribution-search-first-name",value:o.value,type:"text",name:"firstName",autocomplete:"given-name",placeholder:"Enter First Name with only letters, spaces, and hyphens (-).","aria-invalid":w.value?!0:void 0,"aria-describedby":w.value?"contribution-search-first-name-error":void 0,onInput:T[0]||(T[0]=k=>S(k,"firstName")),onBlur:T[1]||(T[1]=k=>P(k,"firstName"))},null,40,PJ),w.value?(ce(),xe("p",EJ,Ye(w.value),1)):_t("",!0)]),W("label",DJ,[T[12]||(T[12]=W("span",{class:"field-label","aria-description":"last name field label"},[Hn(" Last name "),W("abbr",{class:"req",title:"required"},"*")],-1)),W("input",{id:"contribution-search-last-name",value:r.value,type:"text",name:"lastName",autocomplete:"family-name",placeholder:"Enter Last Name with only letters, spaces, and hyphens (-).","aria-invalid":b.value?!0:void 0,"aria-describedby":b.value?"contribution-search-last-name-error":void 0,onInput:T[2]||(T[2]=k=>S(k,"lastName")),onBlur:T[3]||(T[3]=k=>P(k,"lastName"))},null,40,TJ),b.value?(ce(),xe("p",AJ,Ye(b.value),1)):_t("",!0)]),rt(pJ,{"selected-state-values":s.value,"onUpdate:selectedStateValues":T[4]||(T[4]=k=>s.value=k)},null,8,["selected-state-values"]),W("div",IJ,[T[13]||(T[13]=W("span",{class:"field-label","aria-description":"postal codes field label"},"Postal codes",-1)),W("div",MJ,[a.value.length?(ce(),xe("ul",kJ,[(ce(!0),xe(pt,null,ei(a.value,(k,K)=>(ce(),xe("li",{key:`${k}-${K}`,class:"postal-selected-item",role:"listitem"},[W("span",LJ,[Hn(Ye(k)+" ",1),W("button",{type:"button",class:"postal-selected-remove","aria-label":`Remove ${k}`,onMousedown:T[5]||(T[5]=Et(()=>{},["prevent"])),onClick:re=>R(re,K)}," × ",40,OJ)])]))),128))])):_t("",!0),cn(W("input",{id:"contribution-search-postal","onUpdate:modelValue":T[6]||(T[6]=k=>l.value=k),type:"number",name:"postalCode",autocomplete:"postal-code",placeholder:a.value.length?void 0:"Enter postal code...","aria-label":a.value.length?"Add postal code":void 0,onKeydown:[T[7]||(T[7]=k=>["e","E","+","-"].includes(k.key)&&k.preventDefault()),dn(Et(y,["prevent"]),["enter"])],onBlur:y},null,40,_J),[[Ds,l.value]])])]),W("fieldset",NJ,[W("label",BJ,[T[14]||(T[14]=Hn(" Record Dates ",-1)),cn(W("input",{id:"contribution-search-date-from","onUpdate:modelValue":T[8]||(T[8]=k=>u.value=k),type:"date",name:"recordDateFrom","aria-invalid":F.value,"aria-describedby":I.value},null,8,GJ),[[Ds,u.value]])]),T[15]||(T[15]=W("p",{class:"date-to","aria-hidden":"true"},"to",-1)),W("label",HJ,[cn(W("input",{id:"contribution-search-date-to","onUpdate:modelValue":T[9]||(T[9]=k=>h.value=k),type:"date",name:"recordDateTo","aria-invalid":F.value,"aria-describedby":I.value},null,8,VJ),[[Ds,h.value]])])]),(ce(),en(JX,{key:p.value,"selected-source-indexes":f.value,"onUpdate:selectedSourceIndexes":T[10]||(T[10]=k=>f.value=k)},null,8,["selected-source-indexes"])),m.value?(ce(),xe("p",{key:0,id:"contribution-search-form-error",ref_key:"formErrorMessageRef",ref:v,class:"form-error",role:"alert",tabindex:"-1"},Ye(m.value),513)):_t("",!0)]),W("footer",WJ,[W("button",{type:"submit","aria-label":"Search contributions",disabled:e.loading},"Search",8,zJ)])],32)]))}}),[["styles",[".actions[data-v-6775b9d3]{display:flex;flex-wrap:wrap;gap:.5rem;margin-top:1rem;padding-bottom:.25rem}.actions button[data-v-6775b9d3]{background:var(--color-primary-green);border:.0625rem solid var(--color-primary-green);border-radius:.375rem;color:var(--color-white);cursor:pointer;font-family:Poppins,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Arial,sans-serif;font-size:.875rem;height:2.25rem;min-width:5rem;padding:0 1rem}.actions button[data-v-6775b9d3]:disabled{cursor:not-allowed;opacity:.5}.actions button.secondary[data-v-6775b9d3]{background:var(--color-white);color:var(--color-primary-black)}.date-fieldset[data-v-6775b9d3]{min-width:0}.date-to[data-v-6775b9d3]{color:var(--color-primary-black);font-size:.875rem;margin:0;padding-bottom:.5rem}.dates-row[data-v-6775b9d3]{align-items:flex-end;display:flex;flex-wrap:wrap;gap:.75rem 1rem;margin-top:.75rem}.field[data-v-6775b9d3]{display:flex;flex-direction:column;gap:.35rem;margin-top:.75rem;min-width:0}.field input[data-v-6775b9d3],.field select[data-v-6775b9d3]{border:.0625rem solid var(--color-primary-grey);border-radius:.25rem;color:var(--color-primary-black);font-family:Poppins,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Arial,sans-serif;font-size:.9375rem;height:2.25rem;padding:0 .5rem}.field input[data-v-6775b9d3]:focus-visible,.field select[data-v-6775b9d3]:focus-visible{border-color:var(--color-primary-green);outline:none}.field input[aria-invalid=true][data-v-6775b9d3]{border-color:var(--color-red)}.field input[aria-invalid=true][data-v-6775b9d3]:focus-visible{border-color:var(--color-red)}.field select[data-v-6775b9d3]{background-color:var(--color-white)}.field-date[data-v-6775b9d3]{flex:0 1 auto;min-width:10rem}.field-error[data-v-6775b9d3]{color:var(--color-red);font-size:.8125rem;line-height:1.35;margin:0}.field-full[data-v-6775b9d3]{max-width:none;width:100%}.field-full input[data-v-6775b9d3],.field-full select[data-v-6775b9d3]{box-sizing:border-box;width:100%}.field-hint[data-v-6775b9d3]{color:var(--color-primary-black);font-size:.8125rem;line-height:1.35;margin:0;max-width:36rem}.field-label[data-v-6775b9d3]{color:var(--color-primary-black);font-size:.875rem;white-space:nowrap}.form-error[data-v-6775b9d3]{color:var(--color-red);font-size:.875rem;margin:.75rem 0 0}input[type=number][data-v-6775b9d3]{-moz-appearance:textfield;appearance:textfield}input[type=number][data-v-6775b9d3]::-webkit-inner-spin-button,input[type=number][data-v-6775b9d3]::-webkit-outer-spin-button{-webkit-appearance:none;appearance:none;margin:0}.postal-field .field-label[data-v-6775b9d3]{margin-top:.75rem}.postal-input[data-v-6775b9d3]{align-items:center;border:.0625rem solid var(--color-primary-grey);border-radius:.25rem;box-sizing:border-box;display:flex;flex-wrap:wrap;gap:.25rem;min-height:2.25rem;padding:.25rem .5rem;width:100%}.postal-input[data-v-6775b9d3]:focus-within{border-color:var(--color-primary-green)}.postal-input input[data-v-6775b9d3]{border:none;color:var(--color-primary-black);flex:1 1 6rem;font-family:Poppins,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Arial,sans-serif;font-weight:400;height:1.75rem;min-width:6rem;padding:0;width:auto}.postal-input input[data-v-6775b9d3]::placeholder{font-size:.9375rem}.postal-input input[data-v-6775b9d3]:focus-visible{border:none;outline:none}.postal-selected-chip[data-v-6775b9d3]{align-items:center;background-color:var(--color-secondary-green);border-radius:.25rem;display:inline-flex;font-size:.8125rem;gap:.125rem;padding:.125rem .125rem .125rem .375rem}.postal-selected-item[data-v-6775b9d3]{list-style:none;margin:0;padding:0}.postal-selected-list[data-v-6775b9d3]{display:contents;list-style:none;margin:0;padding:0}.postal-selected-remove[data-v-6775b9d3]{background:transparent;border:none;cursor:pointer;font-size:1rem;font-weight:400;line-height:1;padding:0 .25rem}.postal-selected-remove[data-v-6775b9d3]:hover{color:var(--color-red)}.req[data-v-6775b9d3]{color:var(--color-red);cursor:help;text-decoration:none}.search-fieldset>.field[data-v-6775b9d3]:first-of-type{margin-top:0}.search-form .dates-legend[data-v-6775b9d3]{color:var(--color-primary-black);font-size:.875rem;font-weight:600;margin:0;padding:0}.search-form fieldset[data-v-6775b9d3]{border:none;margin:0;padding:0}.search-form legend[data-v-6775b9d3]{font-weight:600;padding:0 .35rem}.search-form legend.visually-hidden[data-v-6775b9d3]{border:0;clip-path:inset(50%);height:.0625rem;margin:-.0625rem;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:.0625rem}.search-layout[data-v-6775b9d3]{display:flex;flex-direction:column;gap:1.25rem;min-height:0}"]],["__scopeId","data-v-6775b9d3"]]);var UJ=Object.defineProperty,$J=(e,t,n)=>t in e?UJ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ua=(e,t,n)=>$J(e,typeof t!="symbol"?t+"":t,n);const ID=class uI{static getComponentDefinition(t,n){let i;return typeof t=="string"?i=this.searchForComponentInstance(n,t):i={extends:xt({...t})},i||gt(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,n,i,o){const r=uI.getComponentDefinition(t,i);if(!r)return;const{vNode:s,destroy:a,el:l}=this.mount(r,{params:Object.freeze(n)},i,o||{});return{componentInstance:s.component.proxy,element:l,destroy:a}}static mount(t,n,i,o){let r=rt(t,n);r.appContext={...i.appContext,provides:o};let s=document.createDocumentFragment();return lg(r,s),{vNode:r,destroy:()=>{s&&lg(null,s),s=null,r=null},el:s}}static searchForComponentInstance(t,n,i=10,o=!1){let r=this.componentCache.get(t);if(r){const u=r.get(n);if(u!==void 0)return u}let s=null,a=0,l=t.parent;for(;!s&&l&&l.components&&++a<i;)l.components&&l.components[n]&&(s=l.components[n]),l=l.parent;for(a=0,l=t.parent;!s&&l&&l.$options&&++a<i;){const u=l;u.$options&&u.$options.components&&u.$options.components[n]?s=u.$options.components[n]:u[n]&&(s=u[n]),l=l.parent}for(a=0,l=t.parent;!s&&l&&++a<i;){if(l.exposed){const u=l;u.exposed&&u.exposed[n]?s=u.exposed[n]:u[n]&&(s=u[n])}l=l.parent}if(!s){const u=t.appContext.components;u&&u[n]&&(s=u[n])}return!s&&!o?(gt(114,{component:n}),null):(s&&(r||(r=new Map,this.componentCache.set(t,r)),r.set(n,s)),s)}};ua(ID,"componentCache",new WeakMap);let aw=ID;class jJ extends AU{constructor(t,n){super(),ua(this,"parent"),ua(this,"provides"),this.parent=t,this.provides=n}createWrapper(t){const n=this;class i extends KJ{init(s){super.init(s)}hasMethod(s){var a,l;const u=o.getFrameworkComponentInstance();return u[s]?!0:((a=u.$.exposed)==null?void 0:a[s])!=null||((l=u.exposed)==null?void 0:l[s])!=null||u.$.setupState[s]!=null}callMethod(s,a){var l,u;const h=this.getFrameworkComponentInstance(),f=o.getFrameworkComponentInstance();if(f[s])return f[s].apply(h,a);{const p=((l=h.$.exposed)==null?void 0:l[s])||((u=h.exposed)==null?void 0:u[s])||h.$.setupState[s];return p?.apply(h,a)}}addMethod(s,a){o[s]=a}processMethod(s,a){return s==="refresh"&&(this.getFrameworkComponentInstance().params=Object.freeze(a[0])),this.hasMethod(s)?this.callMethod(s,a):s==="refresh"}createComponent(s){return n.createComponent(t,s)}}const o=new i;return o}createComponent(t,n){return aw.createAndMountComponent(t,n,this.parent,this.provides)}createMethodProxy(t,n,i){return function(){return t.hasMethod(n)?t.callMethod(n,arguments):(i&&se(233,{methodName:n}),null)}}destroy(){this.parent=null}}class KJ{constructor(){ua(this,"componentInstance"),ua(this,"element"),ua(this,"unmount")}getGui(){return this.element}destroy(){var t;this.getFrameworkComponentInstance()&&typeof this.getFrameworkComponentInstance().destroy=="function"&&this.getFrameworkComponentInstance().destroy(),(t=this.unmount)==null||t.call(this)}getFrameworkComponentInstance(){return this.componentInstance}init(t){const{componentInstance:n,element:i,destroy:o}=this.createComponent(t);this.componentInstance=n,this.unmount=o,this.element=i.firstElementChild??i}}class qJ extends ZF{constructor(t){super("vue"),ua(this,"parent"),this.parent=t}frameworkComponent(t,n){let i=aw.searchForComponentInstance(this.parent,t,10,!0)?t:null;if(!i&&n&&n[t]){const o=n[t];i=aw.searchForComponentInstance(this.parent,o,10,!0)?o:null}return i}isFrameworkComponent(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)}}function QJ(){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,tooltipSwitchShowDelay: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,animateColumnResizing: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,enableCharts:void 0,chartThemes:void 0,customChartThemes:void 0,chartThemeOverrides:void 0,chartToolPanelsDef:void 0,chartMenuItems:void 0,loadingCellRenderer:void 0,loadingCellRendererParams:void 0,loadingCellRendererSelector:void 0,localeText:void 0,masterDetail:void 0,keepDetailRows:void 0,keepDetailRowsCount:void 0,detailCellRenderer:void 0,detailCellRendererParams:void 0,detailRowHeight:void 0,detailRowAutoHeight:void 0,context:void 0,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,suppressOverlays:void 0,overlayComponent:void 0,overlayComponentParams:void 0,overlayComponentSelector:void 0,activeOverlay:void 0,activeOverlayParams: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,formulaDataSource:void 0,formulaFuncs: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,refreshAfterGroupEdit: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,groupHideColumnsUntilExpanded: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,tabToNextGridContainer: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 YJ=(e,t)=>{let n;const i=()=>{window.clearTimeout(n),n=window.setTimeout(e,t)};return i.cancel=()=>{window.clearTimeout(n)},i};function ZJ(e){if(!e||typeof e!="object"||Array.isArray(e))return!1;const t=Object.getPrototypeOf(e);return t!==null&&t!==Object.prototype}function Su(e){if(e==null||typeof e!="object")return e;const t=new WeakSet,n=i=>{if(i==null||typeof i!="object")return i;if(qt(i))return n(i.value);if(Uo(i)||Pa(i))return n(ut(i));if(ZJ(i))return ut(i);if(Array.isArray(i)){let s=!1;for(let a=0;a<i.length;a++){const l=i[a];if(l!==null&&typeof l=="object"){if(qt(l)||Uo(l)||Pa(l)){s=!0;break}s=!0;break}}return s?i.map(a=>n(a)):i}if(t.has(i))return i;t.add(i);const o=Object.keys(i),r={};for(let s=0;s<o.length;s++)r[o[s]]=n(i[o[s]]);return r};return n(e)}const XJ={ref:"root"},JJ=xt({__name:"AgGridVue",props:ka(OM({gridOptions:{},modules:{},statusBar:{},sideBar:{type:[Object,String,Array,Boolean,null]},suppressContextMenu:{type:Boolean},preventDefaultOnContextMenu:{type:Boolean},allowContextMenuWithControlKey:{type:Boolean},columnMenu:{},suppressMenuHide:{type:Boolean},enableBrowserTooltips:{type:Boolean},tooltipTrigger:{},tooltipShowDelay:{},tooltipSwitchShowDelay:{},tooltipHideDelay:{},tooltipMouseTrack:{type:Boolean},tooltipShowMode:{},tooltipInteraction:{type:Boolean},popupParent:{},copyHeadersToClipboard:{type:Boolean},copyGroupHeadersToClipboard:{type:Boolean},clipboardDelimiter:{},suppressCopyRowsToClipboard:{type:Boolean},suppressCopySingleCellRanges:{type:Boolean},suppressLastEmptyLineOnPaste:{type:Boolean},suppressClipboardPaste:{type:Boolean},suppressClipboardApi:{type:Boolean},suppressCutToClipboard:{type:Boolean},columnDefs:{},defaultColDef:{},defaultColGroupDef:{},columnTypes:{},dataTypeDefinitions:{},maintainColumnOrder:{type:Boolean},enableStrictPivotColumnOrder:{type:Boolean},suppressFieldDotNotation:{type:Boolean},headerHeight:{},groupHeaderHeight:{},floatingFiltersHeight:{},pivotHeaderHeight:{},pivotGroupHeaderHeight:{},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:{},suppressAutoSize:{type:Boolean},autoSizePadding:{},skipHeaderOnAutoSize:{type:Boolean},autoSizeStrategy:{},animateColumnResizing:{type:Boolean},components:{},editType:{},suppressStartEditOnTab:{type:Boolean},getFullRowEditValidationErrors:{type:Function},invalidEditValueMode:{},singleClickEdit:{type:Boolean},suppressClickEdit:{type:Boolean},readOnlyEdit:{type:Boolean},stopEditingWhenCellsLoseFocus:{type:Boolean},enterNavigatesVertically:{type:Boolean},enterNavigatesVerticallyAfterEdit:{type:Boolean},enableCellEditingOnBackspace:{type:Boolean},undoRedoCellEditing:{type:Boolean},undoRedoCellEditingLimit:{},defaultCsvExportParams:{},suppressCsvExport:{type:Boolean},defaultExcelExportParams:{},suppressExcelExport:{type:Boolean},excelStyles:{},findSearchValue:{},findOptions:{},quickFilterText:{},cacheQuickFilter:{type:Boolean},includeHiddenColumnsInQuickFilter:{type:Boolean},quickFilterParser:{type:Function},quickFilterMatcher:{type:Function},applyQuickFilterBeforePivotOrAgg:{type:Boolean},excludeChildrenWhenTreeDataFiltering:{type:Boolean},enableAdvancedFilter:{type:Boolean},alwaysPassFilter:{type:Function},includeHiddenColumnsInAdvancedFilter:{type:Boolean},advancedFilterParent:{},advancedFilterBuilderParams:{},advancedFilterParams:{},suppressAdvancedFilterEval:{type:Boolean},suppressSetFilterByDefault:{type:Boolean},enableFilterHandlers:{type:Boolean},filterHandlers:{},enableCharts:{type:Boolean},chartThemes:{},customChartThemes:{},chartThemeOverrides:{},chartToolPanelsDef:{},chartMenuItems:{type:[Array,Function]},loadingCellRenderer:{},loadingCellRendererParams:{},loadingCellRendererSelector:{type:Function},localeText:{},masterDetail:{type:Boolean},keepDetailRows:{type:Boolean},keepDetailRowsCount:{},detailCellRenderer:{},detailCellRendererParams:{},detailRowHeight:{},detailRowAutoHeight:{type:Boolean},context:{},alignedGrids:{type:[Array,Function]},tabIndex:{},rowBuffer:{},valueCache:{type:Boolean},valueCacheNeverExpires:{type:Boolean},enableCellExpressions:{type:Boolean},suppressTouch:{type:Boolean},suppressFocusAfterRefresh:{type:Boolean},suppressBrowserResizeObserver:{type:Boolean},suppressPropertyNamesCheck:{type:Boolean},suppressChangeDetection:{type:Boolean},debug:{type:Boolean},loading:{type:Boolean},overlayLoadingTemplate:{},loadingOverlayComponent:{},loadingOverlayComponentParams:{},suppressLoadingOverlay:{type:Boolean},overlayNoRowsTemplate:{},noRowsOverlayComponent:{},noRowsOverlayComponentParams:{},suppressNoRowsOverlay:{type:Boolean},suppressOverlays:{},overlayComponent:{},overlayComponentParams:{},overlayComponentSelector:{type:Function},activeOverlay:{},activeOverlayParams:{},pagination:{type:Boolean},paginationPageSize:{},paginationPageSizeSelector:{type:[Array,Boolean]},paginationAutoPageSize:{type:Boolean},paginateChildRows:{type:Boolean},suppressPaginationPanel:{type:Boolean},pivotMode:{type:Boolean},pivotPanelShow:{},pivotMaxGeneratedColumns:{},pivotDefaultExpanded:{},pivotColumnGroupTotals:{},pivotRowTotals:{},pivotSuppressAutoColumn:{type:Boolean},suppressExpandablePivotGroups:{type:Boolean},functionsReadOnly:{type:Boolean},aggFuncs:{},formulaDataSource:{},formulaFuncs:{},suppressAggFuncInHeader:{type:Boolean},alwaysAggregateAtRootLevel:{type:Boolean},aggregateOnlyChangedColumns:{type:Boolean},suppressAggFilteredOnly:{type:Boolean},removePivotHeaderRowWhenSingleValueColumn:{type:Boolean},animateRows:{type:Boolean},cellFlashDuration:{},cellFadeDuration:{},allowShowChangeAfterFilter:{type:Boolean},domLayout:{},ensureDomOrder:{type:Boolean},enableCellSpan:{type:Boolean},enableRtl:{type:Boolean},suppressColumnVirtualisation:{type:Boolean},suppressMaxRenderedRowRestriction:{type:Boolean},suppressRowVirtualisation:{type:Boolean},rowDragManaged:{type:Boolean},refreshAfterGroupEdit:{type:Boolean},rowDragInsertDelay:{},suppressRowDrag:{type:Boolean},suppressMoveWhenRowDragging:{type:Boolean},rowDragEntireRow:{type:Boolean},rowDragMultiRow:{type:Boolean},rowDragText:{type:Function},dragAndDropImageComponent:{},dragAndDropImageComponentParams:{},fullWidthCellRenderer:{},fullWidthCellRendererParams:{},embedFullWidthRows:{type:Boolean},groupDisplayType:{},groupDefaultExpanded:{},autoGroupColumnDef:{},groupMaintainOrder:{type:Boolean},groupSelectsChildren:{type:Boolean},groupLockGroupColumns:{},groupAggFiltering:{type:[Boolean,Function]},groupTotalRow:{type:[String,Function]},grandTotalRow:{},suppressStickyTotalRow:{type:[Boolean,String]},groupSuppressBlankHeader:{type:Boolean},groupSelectsFiltered:{type:Boolean},showOpenedGroup:{type:Boolean},groupHideParentOfSingleChild:{type:[Boolean,String]},groupRemoveSingleChildren:{type:Boolean},groupRemoveLowestSingleChildren:{type:Boolean},groupHideOpenParents:{type:Boolean},groupHideColumnsUntilExpanded:{type:Boolean},groupAllowUnbalanced:{type:Boolean},rowGroupPanelShow:{},groupRowRenderer:{},groupRowRendererParams:{},treeData:{type:Boolean},treeDataChildrenField:{},treeDataParentIdField:{},rowGroupPanelSuppressSort:{type:Boolean},suppressGroupRowsSticky:{type:Boolean},groupHierarchyConfig:{},pinnedTopRowData:{},pinnedBottomRowData:{},enableRowPinning:{type:[Boolean,String]},isRowPinnable:{type:Function},isRowPinned:{type:Function},rowModelType:{},rowData:{},asyncTransactionWaitMillis:{},suppressModelUpdateAfterUpdateTransaction:{type:Boolean},datasource:{},cacheOverflowSize:{},infiniteInitialRowCount:{},serverSideInitialRowCount:{},suppressServerSideFullWidthLoadingRow:{type:Boolean},cacheBlockSize:{},maxBlocksInCache:{},maxConcurrentDatasourceRequests:{},blockLoadDebounceMillis:{},purgeClosedRowNodes:{type:Boolean},serverSideDatasource:{},serverSideSortAllLevels:{type:Boolean},serverSideEnableClientSideSort:{type:Boolean},serverSideOnlyRefreshFilteredGroups:{type:Boolean},serverSidePivotResultFieldSeparator:{},viewportDatasource:{},viewportRowModelPageSize:{},viewportRowModelBufferSize:{},alwaysShowHorizontalScroll:{type:Boolean},alwaysShowVerticalScroll:{type:Boolean},debounceVerticalScrollbar:{type:Boolean},suppressHorizontalScroll:{type:Boolean},suppressScrollOnNewData:{type:Boolean},suppressScrollWhenPopupsAreOpen:{type:Boolean},suppressAnimationFrame:{type:Boolean},suppressMiddleClickScrolls:{type:Boolean},suppressPreventDefaultOnMouseWheel:{type:Boolean},scrollbarWidth:{},rowSelection:{},cellSelection:{type:[Boolean,Object]},rowMultiSelectWithClick:{type:Boolean},suppressRowDeselection:{type:Boolean},suppressRowClickSelection:{type:Boolean},suppressCellFocus:{type:Boolean},suppressHeaderFocus:{type:Boolean},selectionColumnDef:{},rowNumbers:{type:[Boolean,Object]},suppressMultiRangeSelection:{type:Boolean},enableCellTextSelection:{type:Boolean},enableRangeSelection:{type:Boolean},enableRangeHandle:{type:Boolean},enableFillHandle:{type:Boolean},fillHandleDirection:{},suppressClearOnFillReduction:{type:Boolean},sortingOrder:{},accentedSort:{type:Boolean},unSortIcon:{type:Boolean},suppressMultiSort:{type:Boolean},alwaysMultiSort:{type:Boolean},multiSortKey:{},suppressMaintainUnsortedOrder:{type:Boolean},icons:{},rowHeight:{},rowStyle:{},rowClass:{},rowClassRules:{},suppressRowHoverHighlight:{type:Boolean},suppressRowTransform:{type:Boolean},columnHoverHighlight:{type:Boolean},gridId:{},deltaSort:{type:Boolean},treeDataDisplayType:{},enableGroupEdit:{type:Boolean},initialState:{},theme:{},loadThemeGoogleFonts:{type:Boolean},themeCssLayer:{},styleNonce:{},themeStyleContainer:{type:Function},getContextMenuItems:{type:Function},getMainMenuItems:{type:Function},postProcessPopup:{type:Function},processUnpinnedColumns:{type:Function},processCellForClipboard:{type:Function},processHeaderForClipboard:{type:Function},processGroupHeaderForClipboard:{type:Function},processCellFromClipboard:{type:Function},sendToClipboard:{type:Function},processDataFromClipboard:{type:Function},isExternalFilterPresent:{type:Function},doesExternalFilterPass:{type:Function},getChartToolbarItems:{type:Function},createChartContainer:{type:Function},focusGridInnerElement:{type:Function},navigateToNextHeader:{type:Function},tabToNextHeader:{type:Function},navigateToNextCell:{type:Function},tabToNextCell:{type:Function},tabToNextGridContainer:{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:{type:Function},getChildCount:{type:Function},getServerSideGroupLevelParams:{type:Function},isServerSideGroupOpenByDefault:{type:Function},isApplyServerSideTransaction:{type:Function},isServerSideGroup:{type:Function},getServerSideGroupKey:{type:Function},getBusinessKeyForNode:{type:Function},getRowId:{type:Function},resetRowDataOnUpdate:{type:Boolean},processRowPostCreate:{type:Function},isRowSelectable:{type:Function},isRowMaster:{type:Function},fillOperation:{type:Function},postSortRows:{type:Function},getRowStyle:{type:Function},getRowClass:{type:Function},getRowHeight:{type:Function},isFullWidthRow:{type:Function},isRowValidDropPosition:{type:Function},"onTool-panel-visible-changed":{},"onTool-panel-size-changed":{},"onColumn-menu-visible-changed":{},"onContext-menu-visible-changed":{},"onCut-start":{},"onCut-end":{},"onPaste-start":{},"onPaste-end":{},"onColumn-visible":{},"onColumn-pinned":{},"onColumn-resized":{},"onColumn-moved":{},"onColumn-value-changed":{},"onColumn-pivot-mode-changed":{},"onColumn-pivot-changed":{},"onColumn-group-opened":{},"onNew-columns-loaded":{},"onGrid-columns-changed":{},"onDisplayed-columns-changed":{},"onVirtual-columns-changed":{},"onColumn-everything-changed":{},"onColumns-reset":{},"onColumn-header-mouse-over":{},"onColumn-header-mouse-leave":{},"onColumn-header-clicked":{},"onColumn-header-context-menu":{},"onComponent-state-changed":{},"onCell-value-changed":{},"onCell-edit-request":{},"onRow-value-changed":{},"onCell-editing-started":{},"onCell-editing-stopped":{},"onRow-editing-started":{},"onRow-editing-stopped":{},"onBulk-editing-started":{},"onBulk-editing-stopped":{},"onBatch-editing-started":{},"onBatch-editing-stopped":{},"onUndo-started":{},"onUndo-ended":{},"onRedo-started":{},"onRedo-ended":{},"onCell-selection-delete-start":{},"onCell-selection-delete-end":{},"onRange-delete-start":{},"onRange-delete-end":{},"onFill-start":{},"onFill-end":{},"onFilter-opened":{},"onFilter-changed":{},"onFilter-modified":{},"onFilter-ui-changed":{},"onFloating-filter-ui-changed":{},"onAdvanced-filter-builder-visible-changed":{},"onFind-changed":{},"onChart-created":{},"onChart-range-selection-changed":{},"onChart-options-changed":{},"onChart-destroyed":{},"onCell-key-down":{},"onGrid-ready":{},"onGrid-pre-destroyed":{},"onFirst-data-rendered":{},"onGrid-size-changed":{},"onModel-updated":{},"onVirtual-row-removed":{},"onViewport-changed":{},"onBody-scroll":{},"onBody-scroll-end":{},"onDrag-started":{},"onDrag-stopped":{},"onDrag-cancelled":{},"onState-updated":{},"onPagination-changed":{},"onRow-drag-enter":{},"onRow-drag-move":{},"onRow-drag-leave":{},"onRow-drag-end":{},"onRow-drag-cancel":{},"onRow-resize-started":{},"onRow-resize-ended":{},"onColumn-row-group-changed":{},"onRow-group-opened":{},"onExpand-or-collapse-all":{},"onPivot-max-columns-exceeded":{},"onPinned-row-data-changed":{},"onPinned-rows-changed":{},"onRow-data-updated":{},"onAsync-transactions-flushed":{},"onStore-refreshed":{},"onHeader-focused":{},"onCell-clicked":{},"onCell-double-clicked":{},"onCell-focused":{},"onCell-mouse-over":{},"onCell-mouse-out":{},"onCell-mouse-down":{},"onRow-clicked":{},"onRow-double-clicked":{},"onRow-selected":{},"onSelection-changed":{},"onCell-context-menu":{},"onRange-selection-changed":{},"onCell-selection-changed":{},"onTooltip-show":{},"onTooltip-hide":{},"onSort-changed":{}},QJ()),{modelValue:{},modelModifiers:{}}),emits:ka(["update:modelValue"],["update:modelValue"]),setup(e,{expose:t,emit:n}){const i=e,o=wM("root"),r=wo(void 0),s=wo(!1),a=wo(!1),l=wo(!1);let u={},h=!1;const f=qI(i),p=new Set(a5());jm().filter(_=>_!="gridOptions").forEach(_=>{const A=f[_];A&&un(A,(T,k)=>{(_==="rowData"&&!b.value||_!=="rowData")&&V(_,T),_==="rowData"&&(b.value=!1)},p.has(_)?void 0:{deep:!0})});const m=new Set(["rowDataUpdated","cellValueChanged","rowValueChanged"]),v=Tr(e,"modelValue"),w=wo(!1),b=wo(!1),y=n;un(v,(_,A)=>{s.value&&(b.value||(w.value=!0,V("rowData",Su(_),Su(A))),b.value=!1)},{deep:!0});const R=YJ(()=>{b.value=!0,y("update:modelValue",I())},10),S=Qo(),P=_=>{var A,T;l.value&&m.has(_)&&(T=(A=S?.vnode)==null?void 0:A.props)!=null&&T["onUpdate:modelValue"]&&R()},F=()=>v.value||i.rowData||i.gridOptions.rowData,I=()=>{const _=[];return r?.value.forEachLeafNode(A=>{_.push(A.data)}),_},L=_=>A=>{if(a.value)return;A==="gridReady"&&(l.value=!0);const T=kc.has(A);T&&!_||!T&&_||m.has(A)&&(!w.value&&s.value&&P(A),w.value=!1)},V=(_,A,T)=>{if(s.value){let k=A;_==="rowData"&&k!=null&&(k=Su(k)),u[_]=k,h||(h=!0,queueMicrotask(()=>{h=!1,!a.value&&r.value&&xO(u,r.value),u={}}))}},G=()=>Object.create(Qo().provides);return Rs(()=>{Va(ox,void 0,!0);const _=new jJ(Qo(),G()),A={globalListener:L(),globalSyncListener:L(!0),frameworkOverrides:new qJ(Qo()),providedBeanInstances:{frameworkCompWrapper:_},modules:i.modules},T=qb(FO(Su(i.gridOptions),i,[...jm(),...Object.values(vh)])),k=F();k!==void 0&&(w.value=!0,T.rowData=Su(k)),r.value=FW(o.value,T,A),s.value=!0}),dd(()=>{var _;s.value&&(R.cancel(),(_=r?.value)==null||_.destroy(),a.value=!0)}),t({api:r}),(_,A)=>(ce(),xe("div",XJ,null,512))}}),eee={class:"ag-cf9a-filter","aria-description":"filter modal",role:"dialog"},tee={class:"ag-cf9a-title-row","aria-description":"container for title and close buttton"},nee={class:"ag-cf9a-title"},iee=["onKeydown"],oee=["value"],ree=["type","onKeydown"],see=["type","onKeydown"],aee={key:1,"aria-description":"container for condition 2 inputs"},lee=["onKeydown"],cee=["onKeydown"],uee=["value"],dee=["type","onKeydown"],Ut=zt(xt({__name:"BaseColumnFilter",props:{params:{type:Object}},setup(e){const t=Ce(null),n=Ce(""),i=Ce("equals"),o=Ce(""),r=Ce("equals"),s=Ce(""),a=Ce("AND"),l=De(()=>e.params.filterKind??"text"),u=De(()=>l.value==="number"?"number":l.value==="date"?"date":"text"),h=De(()=>i.value==="inRange"&&l.value!=="text"),f=De(()=>e.params.title??e.params.column?.getColDef().headerName??e.params.column?.getColDef().field??""),p=De(()=>l.value==="text"?[{label:"is equal to",value:"equals"},{label:"is not equal to",value:"notEqual"},{label:"contains",value:"contains"},{label:"does not contain",value:"notContains"},{label:"begins with",value:"startsWith"},{label:"ends with",value:"endsWith"}]:[{label:"is equal to",value:"equals"},{label:"is not equal to",value:"notEqual"},{label:"is less than",value:"lessThan"},{label:"is greater than",value:"greaterThan"},{label:"is less than or equal to",value:"lessThanOrEqual"},{label:"is greater than or equal to",value:"greaterThanOrEqual"},{label:"is between",value:"inRange"}]),m=()=>{e.params.hidePopup?.(),e.params.api?.hidePopupMenu?.()},v=async()=>{await Dr(),t.value?.focus()},w=P=>{if(!P){a.value="AND",n.value="",i.value="equals",o.value="",r.value="equals",s.value="";return}if("condition1"in P){a.value=P.operator??"AND",n.value=String(P.condition1?.filterTo??P.condition1?.dateTo??""),i.value=P.condition1?.type??"equals",o.value=String(P.condition1?.filter??P.condition1?.dateFrom??""),r.value=P.condition2?.type??"equals",s.value=String(P.condition2?.filter??P.condition2?.dateFrom??"");return}n.value=String(P.filterTo??P.dateTo??""),i.value=P.type??"equals",o.value=String(P.filter??P.dateFrom??""),r.value="equals",s.value=""},b=(P,F,I="")=>{const L=Pe.isString(F)?F.trim():F,V=Pe.isString(I)?I.trim():I;return Pe.isNil(L)||Pe.isString(L)&&Pe.isEmpty(L)?null:l.value==="number"?P==="inRange"?Pe.isNil(V)?null:{filter:Number(L),filterTo:Number(V),filterType:"number",type:P}:{filter:Number(L),filterType:"number",type:P}:l.value==="date"?P==="inRange"?Pe.isNil(V)?null:{dateFrom:L,dateTo:V,filterType:"date",type:P}:{dateFrom:L,filterType:"date",type:P}:{filter:L,filterType:"text",type:P}},y=P=>{e.params.onStateChange?.({model:P}),e.params.onModelChange?.(P)},R=()=>{const P=b(i.value,o.value,n.value),F=b(r.value,s.value);if(!P&&!F){y(null),e.params.onAction?.("apply"),m();return}if(P&&F){y({condition1:P,condition2:F,filterType:l.value,operator:a.value}),e.params.onAction?.("apply"),m();return}if(i.value==="inRange"){P&&y({condition1:P,filterType:l.value,operator:a.value}),e.params.onAction?.("apply"),m();return}y(P??F),e.params.onAction?.("apply"),m()},S=()=>{w(null),y(null),e.params.onAction?.("clear"),m()};return un(()=>e.params.model,P=>w(P),{immediate:!0}),Rs(()=>{v()}),(P,F)=>(ce(),xe("div",eee,[W("div",tee,[W("header",nee,[W("h3",null,Ye(f.value),1)]),W("button",{class:"ag-cf9a-close-button",onClick:m,"aria-label":"Close Filter"}," × ")]),F[7]||(F[7]=W("p",{class:"ag-cf9a-helper-text"}," Show items with value that ",-1)),cn(W("select",{"onUpdate:modelValue":F[0]||(F[0]=I=>i.value=I),class:"ag-cf9a-select",onKeydown:[dn(Et(m,["prevent","stop"]),["esc"]),dn(Et(R,["prevent","stop"]),["enter"])]},[(ce(!0),xe(pt,null,ei(p.value,I=>(ce(),xe("option",{key:I.value,value:I.value},Ye(I.label),9,oee))),128))],40,iee),[[oc,i.value]]),cn(W("input",{ref_key:"condition1Input",ref:t,"onUpdate:modelValue":F[1]||(F[1]=I=>o.value=I),class:"ag-cf9a-input",placeholder:"Enter value...",type:u.value,onKeydown:[dn(Et(m,["prevent","stop"]),["esc"]),dn(Et(R,["prevent","stop"]),["enter"])]},null,40,ree),[[ag,o.value]]),h.value?cn((ce(),xe("input",{key:0,"onUpdate:modelValue":F[2]||(F[2]=I=>n.value=I),class:"ag-cf9a-input",placeholder:"Enter end value...",type:u.value,onKeydown:[dn(Et(m,["prevent","stop"]),["esc"]),dn(Et(R,["prevent","stop"]),["enter"])]},null,40,see)),[[ag,n.value]]):_t("",!0),h.value?_t("",!0):(ce(),xe("div",aee,[cn(W("select",{"onUpdate:modelValue":F[3]||(F[3]=I=>a.value=I),class:"ag-cf9a-select",onKeydown:[dn(Et(m,["prevent","stop"]),["esc"]),dn(Et(R,["prevent","stop"]),["enter"])]},[...F[6]||(F[6]=[W("option",{value:"AND"},"And",-1),W("option",{value:"OR"},"Or",-1)])],40,lee),[[oc,a.value]]),cn(W("select",{"onUpdate:modelValue":F[4]||(F[4]=I=>r.value=I),class:"ag-cf9a-select",onKeydown:[dn(Et(m,["prevent","stop"]),["esc"]),dn(Et(R,["prevent","stop"]),["enter"])]},[(ce(!0),xe(pt,null,ei(p.value,I=>(ce(),xe("option",{key:I.value,value:I.value},Ye(I.label),9,uee))),128))],40,cee),[[oc,r.value]]),cn(W("input",{"onUpdate:modelValue":F[5]||(F[5]=I=>s.value=I),class:"ag-cf9a-input",placeholder:"Enter value...",type:u.value,onKeydown:[dn(Et(m,["prevent","stop"]),["esc"]),dn(Et(R,["prevent","stop"]),["enter"])]},null,40,dee),[[ag,s.value]])])),W("div",{class:"ag-cf9a-actions","aria-description":"container for buttons"},[W("button",{class:"ag-cf9a-button ag-cf9a-button-secondary",onClick:S}," Clear "),W("button",{class:"ag-cf9a-button ag-cf9a-button-primary",onClick:R}," Filter ")])]))}}),[["styles",[".ag-cf9a-actions{display:flex;gap:.625rem;padding-top:.25rem;width:100%}.ag-cf9a-button{border-radius:.25rem;cursor:pointer;flex:1;font-family:inherit;height:2.125rem}.ag-cf9a-button-primary{background:var(--color-primary-green);border:.0625rem solid var(--color-primary-green);color:var(--color-white);font-weight:600}.ag-cf9a-button-secondary{background:var(--color-white);border:.0625rem solid var(--color-secondary-grey);color:var(--color-primary-black);font-weight:600}.ag-cf9a-close-button{align-items:center;background:transparent;border:0;color:var(--color-primary-black);cursor:pointer;display:flex;font-family:inherit;font-size:1rem;font-weight:700;height:1.5rem;justify-content:center;padding:0;transition:color .2s ease;width:1.5rem}.ag-cf9a-close-button:hover{color:var(--color-primary-green)}.ag-cf9a-currency-cell{font-weight:600}.ag-cf9a-filter{background:var(--color-white);border:.0625rem solid var(--color-primary-green);border-radius:.25rem;box-shadow:0 .125rem .5rem #0000001f;box-sizing:border-box;display:flex;flex-direction:column;font-family:Poppins,sans-serif;padding:.75rem;width:21.25rem}.ag-cf9a-helper-text{color:var(--color-primary-black);font-size:.75rem;margin-bottom:.625rem}.ag-cf9a-input,.ag-cf9a-select{border:.0625rem solid var(--color-secondary-grey);border-radius:.25rem;box-sizing:border-box;display:block;font-family:inherit;height:2.125rem;margin-bottom:.625rem;padding:0 .625rem;width:100%}.ag-cf9a-input::placeholder{color:var(--color-primary-black);opacity:.5}.ag-cf9a-title{color:var(--color-primary-black);font-size:.875rem;font-weight:600}.ag-cf9a-title h3{margin:0}.ag-cf9a-title-row{align-items:center;border-bottom:.0625rem solid var(--color-primary-grey);display:flex;justify-content:space-between;margin-bottom:.75rem;padding-bottom:.5rem}"]]]),Mf={filterKind:"date"},MD={filterKind:"number"},xn={filterKind:"text"},kD=e=>{if(Pe.isNil(e))return"";const t=Number(e);return Number.isNaN(t)?"":t.toLocaleString("en-US",{currency:"USD",style:"currency"})},LD=e=>{if(Pe.isNil(e)||Pe.isEmpty(e))return"";const t=new Date(e);return Number.isNaN(t.getTime())?"":t.toLocaleDateString("en-CA")},lw=[{headerName:"Details",field:"id",sortable:!1,filter:!1,resizable:!0,width:120,suppressHeaderMenuButton:!0,cellRenderer:e=>{const t=e.data?.id;return t?`<a id="contribution-details-link-${t}" class="contribution-details-link" style="color:var(--color-primary-green)" href="/pcv/contribution/${t}">View</a>`:""}},{field:"contributor",headerName:"Contributor",filter:{component:Ut,doesFilterPass:()=>!0},filterParams:xn},{field:"employer",headerName:"Employer",filter:{component:Ut,doesFilterPass:()=>!0},filterParams:xn},{field:"employeeStatus",headerName:"Employee Status",filter:{component:Ut,doesFilterPass:()=>!0},filterParams:xn},{field:"occupation",headerName:"Occupation",filter:{component:Ut,doesFilterPass:()=>!0},filterParams:xn},{field:"address",headerName:"Address",filter:{component:Ut,doesFilterPass:()=>!0},filterParams:xn},{field:"state",headerName:"State",filter:{component:Ut,doesFilterPass:()=>!0},filterParams:xn},{field:"zipCode",headerName:"Zip Code",filter:{component:Ut,doesFilterPass:()=>!0},filterParams:xn},{field:"date",headerName:"Date",filter:{component:Ut,doesFilterPass:()=>!0},filterParams:Mf},{field:"dateDetected",headerName:"Date Detected",filter:{component:Ut,doesFilterPass:()=>!0},filterParams:Mf,valueFormatter:e=>LD(e.value)},{field:"amount",headerName:"Amount",filter:{component:Ut,doesFilterPass:()=>!0},filterParams:MD,valueFormatter:e=>kD(e.value),cellClass:"ag-cf9a-currency-cell"},{field:"recipient",headerName:"Recipient",filter:{component:Ut,doesFilterPass:()=>!0},filterParams:xn},{field:"status",headerName:"Status",filter:{component:Ut,doesFilterPass:()=>!0},filterParams:xn},{field:"reconciliationStatus",headerName:"Reconciliation Status",filter:{component:Ut,doesFilterPass:()=>!0},filterParams:xn},{field:"preclearance",headerName:"Preclearance",filter:{component:Ut,doesFilterPass:()=>!0},filterParams:xn,cellRenderer:e=>{const t=e.data?.preclearance;return t?`<a id="contribution-preclearance-link-${t}" class="contribution-preclearance-link" style="color:var(--color-primary-green)" href="/preclearance/${t}">${t}</a>`:""}},{field:"approvalDate",headerName:"Approval Date",filter:{component:Ut,doesFilterPass:()=>!0},filterParams:Mf},{field:"approvedAmount",headerName:"Approved Amount",filter:{component:Ut,doesFilterPass:()=>!0},filterParams:MD,valueFormatter:e=>kD(e.value),cellClass:"ag-cf9a-currency-cell"},{field:"amended",headerName:"Amended",filter:{component:Ut,doesFilterPass:()=>!0},filterParams:xn},{field:"lastUpdated",headerName:"Last Updated",filter:{component:Ut,doesFilterPass:()=>!0},filterParams:Mf,valueFormatter:e=>LD(e.value)},{field:"lastUpdatedBy",headerName:"Last Updated By",filter:{component:Ut,doesFilterPass:()=>!0},filterParams:xn},{field:"notes",headerName:"Notes",filter:{component:Ut,doesFilterPass:()=>!0},filterParams:xn},{field:"tags",headerName:"Tags",filter:{component:Ut,doesFilterPass:()=>!0},filterParams:xn},{field:"groups",headerName:"Groups",filter:{component:Ut,doesFilterPass:()=>!0},filterParams:xn},{field:"sources",headerName:"Source",filter:{component:Ut,doesFilterPass:()=>!0},filterParams:xn}],hee={comparator:()=>0,filter:!0,flex:1,floatingFilter:!1,minWidth:180,resizable:!0,sortable:!0},fee={maxWidth:56,minWidth:56,pinned:"left",resizable:!1,sortable:!1,suppressHeaderMenuButton:!0,width:56},pee={mode:"multiRow",checkboxes:!0,headerCheckbox:!0,enableClickSelection:!1,selectAll:"all"},gee={class:"contributions-table","aria-description":"container for table and related controls"},mee={class:"contributions-table-toolbar","aria-description":"container for bulk and column controls"},vee={class:"bulk-controls","aria-description":"container for bulk controls"},Cee={key:0,"aria-description":"container for number of selected rows"},wee={key:1,class:"controls","aria-description":"container for controls"},bee=["value"],yee={class:"column-controls","aria-description":"container for column controls"},See={class:"contributions-table-footer","aria-description":"container for pagination controls",role:"footer"},Ree={class:"footer-left","aria-description":"container for page size controls"},Fee=["value"],xee={class:"footer-center","aria-description":"container for record count data"},Pee={class:"footer-right","aria-description":"container for page navigation controls"},Eee=["disabled"],Dee=["disabled"],Tee={"aria-description":"container for pagination data"},Aee=["disabled"],Iee=["disabled"],Mee={"aria-description":"container for bulk status modal content"},kee={class:"button-group","aria-description":"container for modal buttons"},Lee=["disabled"],Oee={"aria-description":"container for bulk note modal content"},_ee={class:"button-group","aria-description":"container for modal buttons"},Nee=["disabled"],Bee={"aria-description":"container for column visibility modal content"},Gee=["id","name","checked","onClick"],Hee=["for"],OD=zt(xt({__name:"ContributionsTable",props:ka({disabledColumns:{default:()=>[],type:Array},disableSelection:{type:Boolean,default:!1},match:{type:Boolean,default:!0},page:{type:String},presets:{default:()=>({}),type:Object},user:{type:Number},company:{type:Number},stack:{type:String}},{loading:{type:Boolean,default:!1},loadingModifiers:{},resultsTotal:{default:0},resultsTotalModifiers:{}}),emits:["update:loading","update:resultsTotal"],setup(e){const t=Tr(e,"loading"),n=Tr(e,"resultsTotal"),i=wY(),o=dD(Se=>Se.ContributionSearchReducer?.[e.page]),{trigger:r}=eX(),{trigger:s}=nX(),{trigger:a,isLoading:l}=vJ(),{data:u}=tw({user:e.user,company:e.company,stack:e.stack}),h=Ce(null),f=De(()=>lw.reduce((Se,ke)=>{const it=ke.field;if(e.disabledColumns.includes(it)||!y.value[it])return Se;let Ge=!1;return e.presets&&!Pe.isEmpty(e.presets)&&(Ge=!!e.presets[it]?.query?.length),[...Se,{...ke,filter:Ge?!1:ke.filter}]},[])),p=Ce(hee),m=Ce([]),v=Ce(null),w=Ce(null),b=Ce({}),y=Ce(lw.reduce((Se,ke)=>e.disabledColumns.includes(ke.field)?Se:{...Se,[ke.field]:!0},{})),R=Ce(!1),S=De(()=>n.value===0?0:Math.min(F.value*P.value,n.value)),P=Ce(100),F=Ce(1),I=[10,25,50,100],L=De(()=>n.value===0?0:(F.value-1)*P.value+1),V=Ce(1);let G;const _=Ce(pee),A=De(()=>k.value.length),T=Ce(fee),k=Ce([]),K=Ce(""),re=Ce(null),Re=Ce(null),be=Ce(null),fe=Ce(null),Fe=Ce({}),ue=Ce(null),N=Ce(!1),Q=De(()=>[{label:"Select Status",value:null},...(u.value??[]).map(Se=>({label:Se.name,value:Se.id}))]),j=Ce(null),ae=Ce(null),Te=Ce(null),Ae=Ce(null),ye=Ce({}),Oe=Ce(null),Ue=Ce(null),ze=Ce(!1),vt=async(Se,ke,it,Ge,Ze=190,Pn=8)=>{if(!Se||!ke)return;const uo=ke?.getBoundingClientRect(),sn=Math.max(Pn,Math.min(uo.right-Ze,window.innerWidth-Ze-Pn)),ai=Math.min(uo.bottom+Pn,window.innerHeight-120);it.value={position:"fixed",top:`${ai}px`,left:`${sn}px`,margin:"0"},await Dr(),Se?.showModal(),Ge.value=!0},M=Se=>{Se.stopPropagation();const ke=new Set([Re.value,be.value,fe.value,ue.value]),it=Se.target;N.value?ke.has(it)&&(fe.value?.close(),N.value=!1):vt(fe.value,re.value,Fe,N)},B=Se=>{Se.stopPropagation();const ke=new Set([ae.value,Te.value,Ae.value,Ue.value]),it=Se.target;j.value=parseInt((Se?.target).value)??null,!ze.value&&!Pe.isNil(j.value)?vt(Ae.value,Oe.value,ye,ze):ke.has(it)&&(Ae.value?.close(),j.value=null,Oe.value.selectedIndex=0,ze.value=!1)},U=Se=>{Se.stopPropagation(),R.value?Se.target===w.value&&(w.value?.close(),R.value=!1):vt(w.value,v.value,b,R,275,8)},ne=async()=>{F.value=1,await Ke()},ee=async()=>{F.value<=1||(F.value=1,await Ke())},Z=async()=>{F.value<=1||(F.value-=1,await Ke())},me=async()=>{F.value>=V.value||(F.value+=1,await Ke())},pe=async()=>{F.value>=V.value||(F.value=V.value,await Ke())},de=Se=>Se?.conditions?.length?Se.conditions:Se?.condition1||Se?.condition2?[Se.condition1,Se.condition2].filter(ke=>!Pe.isNil(ke)):[Se],te=Se=>(ke,it)=>{const Ge=de(it).reduce(Se,[]),Ze={page:e.page,filterName:ke},Pn=yJ(it?.operator,Ge);i(uD({...Ze,conjunction:Pn})),Ge.forEach(uo=>i(lD({...Ze,query:uo})))},Me=(Se,ke)=>{te((Ge,Ze)=>Pe.isEmpty(Ze?.dateFrom)?Ge:Ze.type==="inRange"&&!Pe.isEmpty(Ze.dateFrom)&&!Pe.isEmpty(Ze.dateTo)?[...Ge,si("greaterThanOrEqual",Pe.isDate(Ze.dateFrom)?Ze.dateFrom.toISOString().slice(0,10):Ze.dateFrom),si("lessThanOrEqual",Pe.isDate(Ze.dateTo)?Ze.dateTo.toISOString().slice(0,10):Ze.dateTo)]:[...Ge,si(Ze.type,Pe.toString(Ze.dateFrom))])(Se,ke)},Ee=(Se,ke)=>{te((Ge,Ze)=>Pe.isNil(Ze?.filter)?Ge:Ze.type==="inRange"&&!Pe.isNil(Ze.filter)&&!Pe.isNil(Ze.filterTo)?[...Ge,si("greaterThanOrEqual",Pe.toNumber(Ze.filter)),si("lessThanOrEqual",Pe.toNumber(Ze.filterTo))]:[...Ge,si(Ze.type,Pe.toNumber(Ze.filter))])(Se,ke)},Be=(Se,ke)=>{te((Ge,Ze)=>Pe.isEmpty(Ze?.filter)?Ge:[...Ge,si(Ze.type,Pe.toString(Ze.filter))])(Se,ke)},Ve=()=>{Pe.entries(e.presets).forEach(([Se,ke])=>{const it=ke.query;if(!(Pe.isArray(it)&&it.every(Pn=>Pe.isObject(Pn)&&Pe.has(Pn,"comparator")&&Pe.has(Pn,"value"))))return;const Ge=!it?.length||it.length<2?mn.NULL:ke.conjunction;if(Ge!==mn.NULL&&Ge!==mn.AND&&Ge!==mn.OR)return;const Ze={page:e.page,filterName:Se};i(cD({...Ze})),i(uD({...Ze,conjunction:Ge})),it.forEach(Pn=>i(lD({...Ze,query:Pn})))})},Je=Se=>{const ke=new Set(["date","dateDetected","approvalDate","lastUpdated"]),it=new Set(["amount","approvalAmount"]),Ge=new Set(["contributor","employer","employeeStatus","occupation","address","state","zipCode","recipient","status","reconciliationStatus","preclearance","amended","lastUpdatedBy","notes","tags","groups","sources"]),Ze=[...Array.from(ke),...Array.from(it),...Array.from(Ge)],Pn=Pe.entries(e.presets).reduce((sn,[ai,Ru])=>Ru?.query?.length?[...sn,ai]:sn,[]),uo=Pe.difference(Ze,Pn);Ve(),uo.forEach(sn=>{const ai={page:e.page,filterName:sn};i(cD({...ai}))}),Pe.entries(Se).forEach(([sn,ai])=>{ke.has(sn)?Me(sn,ai):it.has(sn)?Ee(sn,ai):Ge.has(sn)&&Be(sn,ai)})};function st(){return h.value?h.value.getColumnState().filter(Se=>Se.sort).sort((Se,ke)=>(Se.sortIndex??0)-(ke.sortIndex??0)).map(Se=>({column:Se.colId,direction:Se.sort})):[]}const Ke=async()=>{if(!e.user||!e.company||!e.stack)return;const Se=h.value?.getFilterModel()??{};Je(Se);const it=st()[0],Ge=Pe.entries(o.value).reduce((Pn,[uo,sn])=>{const ai=sn.query.filter(da=>(Pe.isString(da.value)&&!Pe.isEmpty(da.value)||!Pe.isNil(da.value))&&da.value!=="undefined"&&da.value!=="null"),Ru=ai?.length?sn.conjunction:mn.NULL;return{...Pn,[uo]:{conjunction:Ru,query:ai}}},{}),Ze=await a({user:e.user,company:e.company,stack:e.stack,page:F.value,limit:P.value,sortColumn:it?.column,sortOrder:it?.direction,match:e.match,body:Ge});m.value=Ze?.results??[],F.value=Ze?.page??1,P.value=Ze?.limit??P.value,n.value=Ze?.total??0,V.value=Ze?.totalPages??1,k.value=[]},Ht=()=>{window.clearTimeout(G),G=window.setTimeout(async()=>{F.value=1,await Ke()},500)},Vt=async()=>{F.value=1,await Ke()},tn=async Se=>{h.value=Se.api,await Ke()},vn=Se=>{k.value=Se.api.getSelectedRows()},yi=Se=>{if(K.value.length){const ke={contributions:k.value.map(it=>it.id),note:K.value,type:"user"};r(ke),M(Se)}},Bo=Se=>{if(!Pe.isNil(j.value)){const ke={contributions:k.value.map(it=>it.id),status:j.value};s(ke),B(Se)}};return un(l,Se=>{t.value=!!Se}),un(()=>[e.match,e.presets,e.user,e.company,e.stack],async()=>{h.value&&(F.value=1,await Ke())}),(Se,ke)=>{const it=hd("font-awesome-icon");return ce(),xe(pt,null,[W("div",gee,[W("div",mee,[W("div",vee,[e.disableSelection?_t("",!0):(ce(),xe("span",Cee,Ye(A.value)+" selected",1)),k.value.length?(ce(),xe("span",wee,[ke[2]||(ke[2]=Hn(" Change Status: ",-1)),W("select",{id:"bulk-status-select",ref_key:"bulkStatusSelect",ref:Oe,onChange:B},[(ce(!0),xe(pt,null,ei(Q.value,Ge=>(ce(),xe("option",{key:`status-${Ge.value}`,value:Ge.value},Ye(Ge.label),9,bee))),128))],544),W("button",{ref_key:"bulkNoteButton",ref:re,onClick:M}," Add Note ",512)])):_t("",!0)]),W("div",yee,[W("button",{ref_key:"columnsVisibilityButton",ref:v,onClick:U,"aria-label":"Toggle Columns"},[rt(it,{class:"columns-ellipsis-icon",icon:["fas","ellipsis-h"],size:"medium"})],512)])]),rt(fi(JJ),{class:"ag-theme-alpine contributions-grid",style:{height:"38.75rem",width:"100%"},columnDefs:f.value,defaultColDef:p.value,enableFilterHandlers:!0,loading:fi(l),loadingOverlayComponent:iw,rowData:m.value,rowSelection:e.disableSelection?void 0:_.value,selectionColumnDef:e.disableSelection?void 0:T.value,onGridReady:tn,onFilterChanged:Ht,onSortChanged:Vt,onSelectionChanged:vn},null,8,["columnDefs","defaultColDef","loading","rowData","rowSelection","selectionColumnDef"]),W("div",See,[W("div",Ree,[ke[3]||(ke[3]=W("label",{for:"contributions-table-page-size"},"Items Per Page:",-1)),cn(W("select",{id:"contributions-table-page-size","onUpdate:modelValue":ke[0]||(ke[0]=Ge=>P.value=Ge),onChange:ne},[(ce(),xe(pt,null,ei(I,Ge=>W("option",{key:Ge,value:Ge},Ye(Ge),9,Fee)),64))],544),[[oc,P.value,void 0,{number:!0}]])]),W("div",xee,Ye(L.value)+" to "+Ye(S.value)+" of "+Ye(n.value)+" items ",1),W("div",Pee,[W("button",{type:"button",disabled:F.value<=1,onClick:ee,"aria-label":"Go to first page"},"|<",8,Eee),W("button",{type:"button",disabled:F.value<=1,onClick:Z,"aria-label":"Go to previous page"},"<",8,Dee),W("span",Tee,"Page "+Ye(F.value)+" of "+Ye(V.value),1),W("button",{type:"button",disabled:F.value>=V.value,onClick:me,"aria-label":"Go to next page"},">",8,Aee),W("button",{type:"button",disabled:F.value>=V.value,onClick:pe,"aria-label":"Go to last page"},">|",8,Iee)])])]),W("dialog",{ref_key:"bulkStatusModal",ref:Ae,class:"bulk-status-modal",style:Di(ye.value),onClick:B},[W("div",Mee,[W("header",null,[W("button",{ref_key:"bulkStatusCloseButton",ref:Te,onClick:B,"aria-label":"Close"},"X",512)]),W("p",null,[Hn("Are you sure that you want to change the status of "+Ye(k.value.length)+" Contribution"+Ye(k.value.length===1?"":"s")+" to ",1),W("strong",null,Ye(Q.value.reduce((Ge,Ze)=>Ze.value===j.value?`${Ge}${Ze.label}`:Ge,"")),1),ke[4]||(ke[4]=Hn("?",-1))]),W("div",kee,[W("button",{ref_key:"bulkStatusCancelButton",ref:ae,class:"cancel",onClick:B},"Cancel",512),W("button",{ref_key:"bulkStatusSubmitButton",ref:Ue,class:"submit",disabled:!k.value.length,onClick:Bo},"Update",8,Lee)])])],4),W("dialog",{ref_key:"bulkNoteModal",ref:fe,class:"bulk-note-modal",style:Di(Fe.value),onClick:M},[W("div",Oee,[W("header",null,[W("h4",null,"Add Note To "+Ye(k.value.length)+" Contribution"+Ye(k.value.length===1?"":"s"),1),W("button",{ref_key:"bulkNoteCloseButton",ref:be,onClick:M,"aria-label":"Close"},"X",512)]),ke[5]||(ke[5]=W("p",null,"Note",-1)),cn(W("textarea",{id:"bulk-note-textfield",placeholder:"Enter note text here...","onUpdate:modelValue":ke[1]||(ke[1]=Ge=>K.value=Ge)},null,512),[[Ds,K.value]]),W("div",_ee,[W("button",{ref_key:"bulkNoteCancelButton",ref:Re,class:"cancel",onClick:M},"Cancel",512),W("button",{ref_key:"bulkNoteSubmitButton",ref:ue,class:"submit",disabled:!(K.value.length&&k.value.length),onClick:yi},"Add",8,Nee)])])],4),W("dialog",{ref_key:"columnsVisibilityModal",ref:w,class:"columns-visibility-modal",style:Di(b.value),onClick:U},[W("div",Bee,[W("header",null,[W("h4",null,[rt(it,{class:"columns-columns-icon",icon:"fa-columns"}),ke[6]||(ke[6]=Hn("Columns ",-1))])]),W("ul",null,[(ce(!0),xe(pt,null,ei(fi(lw).filter(Ge=>!e.disabledColumns.includes(Ge.field)),Ge=>(ce(),xe("li",{key:Ge.field},[W("input",{id:`column-visibility-${Ge.field}`,class:"column-visibility-checkbox",name:Ge.field,type:"checkbox",checked:y.value?.[Ge.field],onClick:Ze=>y.value[Ge.field]=!y.value[Ge.field]},null,8,Gee),ke[7]||(ke[7]=Hn(" ",-1)),W("label",{for:`column-visibility-${Ge.field}`},Ye(Ge.headerName),9,Hee)]))),128))])])],4)],64)}}}),[["styles",['[data-v-29f59a3f]{font-family:Poppins,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Arial,sans-serif}.ag-theme-alpine[data-v-29f59a3f]{--ag-background-color: var(--color-white);--ag-cell-font-family: Poppins, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;--ag-header-background-color: var(--color-secondary-green);--ag-header-font-family: Poppins, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif}.bulk-note-modal[data-v-29f59a3f]{border:.1rem solid var(--color-primary-grey);box-shadow:.1875rem .15625rem .15625rem var(--color-secondary-grey);min-width:34.25rem}.bulk-note-modal .button-group[data-v-29f59a3f]{border-top:.1rem solid var(--color-primary-grey);display:flex;justify-content:flex-end;padding-top:.5rem;width:100%}.bulk-note-modal .button-group button[data-v-29f59a3f]{border:.1rem solid var(--color-primary-grey);border-radius:.2rem;cursor:pointer;height:2.5rem;margin:.2rem;width:5rem}.bulk-note-modal .button-group button.cancel[data-v-29f59a3f]{background:var(--color-white);color:var(--color-black)}.bulk-note-modal .button-group button.submit[data-v-29f59a3f]{background:var(--color-primary-green);color:var(--color-white)}.bulk-note-modal .button-group button.submit[data-v-29f59a3f]:disabled{opacity:.5}.bulk-note-modal header[data-v-29f59a3f]{border-bottom:.1rem solid var(--color-primary-grey);display:flex;justify-content:space-between;width:100%}.bulk-note-modal header button[data-v-29f59a3f]{background:transparent;border:none;cursor:pointer;font-size:1rem;font-weight:800}.bulk-note-modal textarea[data-v-29f59a3f]{border:.1rem solid var(--color-primary-grey);margin:1rem auto;min-height:12.5rem;padding:.5rem .25rem;width:97%}.bulk-note-modal textarea[data-v-29f59a3f]:focus-visible{border:.1rem solid var(--color-primary-green)}.bulk-status-modal[data-v-29f59a3f]{border:.1rem solid var(--color-primary-grey);box-shadow:.1875rem .15625rem .15625rem var(--color-secondary-grey);min-width:30.25rem}.bulk-status-modal .button-group[data-v-29f59a3f]{border-top:.1rem solid var(--color-primary-grey);display:flex;justify-content:flex-end;padding-top:.5rem;width:100%}.bulk-status-modal .button-group button[data-v-29f59a3f]{border:.1rem solid var(--color-primary-grey);border-radius:.2rem;cursor:pointer;height:2.5rem;margin:.2rem;width:5rem}.bulk-status-modal .button-group button.cancel[data-v-29f59a3f]{background:var(--color-white);color:var(--color-black)}.bulk-status-modal .button-group button.submit[data-v-29f59a3f]{background:var(--color-primary-green);color:var(--color-white)}.bulk-status-modal header[data-v-29f59a3f]{display:flex;justify-content:flex-end}.bulk-status-modal header button[data-v-29f59a3f]{background:transparent;border:none;cursor:pointer;font-size:1rem;font-weight:800}.column-visibility-checkbox[data-v-29f59a3f]:checked{accent-color:var(--color-primary-green)}.columns-columns-icon[data-v-29f59a3f]{width:1.25rem;height:1rem}.columns-ellipsis-icon[data-v-29f59a3f]{height:2rem;width:2.5rem}.contributions-grid[data-v-29f59a3f]{width:100%}.contributions-table[data-v-29f59a3f]{border:.0625rem solid var(--color-black);border-radius:.5rem;display:flex;flex-direction:column;gap:0rem;height:100%}.contributions-table select[data-v-29f59a3f]{height:2rem;padding:0 .5rem}.contributions-table-footer[data-v-29f59a3f]{align-items:center;background:var(--color-white);border-radius:0 0 .5rem .5rem;border-top:.0625rem solid var(--color-black);display:flex;font-size:.875rem;gap:1rem;justify-content:space-between;padding:.75rem 1rem}.contributions-table-footer .footer-center[data-v-29f59a3f],.contributions-table-footer .footer-left[data-v-29f59a3f],.contributions-table-footer .footer-right[data-v-29f59a3f]{align-items:center;display:flex;gap:.5rem}.contributions-table-footer .footer-right button[data-v-29f59a3f]{height:2rem;min-width:2rem}.contributions-table-toolbar[data-v-29f59a3f]{align-items:center;border-bottom:.0625rem solid var(--color-black);display:flex;gap:.75rem;justify-content:space-between;padding:8px 0}.contributions-table-toolbar .bulk-controls[data-v-29f59a3f] *{margin:auto 1rem}.contributions-table-toolbar button[data-v-29f59a3f]{height:2.25rem;min-width:5rem}.contributions-table-toolbar button[data-v-29f59a3f],.contributions-table-footer .footer-right button[data-v-29f59a3f]{background:var(--color-white);border:.0625rem solid var(--color-primary-green);border-radius:.375rem;cursor:pointer;padding:0 .625rem}.contributions-table-toolbar button[data-v-29f59a3f]:disabled,.contributions-table-footer .footer-right button[data-v-29f59a3f]:disabled{cursor:not-allowed;opacity:.5}.contributions-table-toolbar .column-controls button[data-v-29f59a3f]{background:transparent;border:none;color:var(--color-primary-green);font-size:xx-large}.columns-visibility-modal[data-v-29f59a3f]{border:.1rem solid var(--color-primary-grey);box-shadow:.1875rem .15625rem .15625rem var(--color-secondary-grey);min-width:8.25rem}.columns-visibility-modal header h4[data-v-29f59a3f]{border-bottom:.1rem solid var(--color-primary-grey);font-weight:400;padding:.4rem}.columns-visibility-modal header h4[data-v-29f59a3f]>*{margin:auto .4rem auto auto}.columns-visibility-modal ul[data-v-29f59a3f]{list-style-type:none;padding-left:0}[data-v-29f59a3f] .ag-checkbox-input-wrapper.ag-checked{background:var(--color-primary-green)}[data-v-29f59a3f] .ag-filter-apply-panel .ag-button:last-child{background:var(--color-primary-green);color:#fff}[data-v-29f59a3f] .ag-header-cell .ag-sort-indicator-container{margin:.2rem}[data-v-29f59a3f] .ag-icon-filter:hover{color:var(--color-primary-green)}[data-v-29f59a3f] .ag-row:nth-child(2n){background:var(--color-secondary-green)}[data-v-29f59a3f] .ag-theme-alpine,[data-v-29f59a3f] .ag-theme-alpine .ag-root-wrapper{border-radius:0}[data-v-29f59a3f]::backdrop{background:transparent}']],["__scopeId","data-v-29f59a3f"]]),Vee={class:"contribution-search-content","aria-description":"contribution search page content"},Wee={key:0,class:"contribution-search-initial","aria-description":"initial contribution search form"},zee={class:"criteria-toolbar","aria-label":"Search criteria actions"},Uee={class:"dropdown","aria-description":"modify search criteria dropdown"},$ee=["aria-expanded"],jee=["disabled"],Kee=zt(xt({__name:"ContributionSearch",props:{user:{type:Number},company:{type:Number},stack:{type:String}},setup(e){const t=Ce({}),n=Ce(["id","employeeStatus","dateDetected","status","reconciliationStatus","preclearance","approvalDate","approvedAmount","lastUpdated","lastUpdatedBy","notes","tags","groups"]),i=Ce(!1),o=Ce(!1),r=Ce(0),s=Ce(!1),a=Ce(0),l=()=>{o.value=!1},u=()=>{o.value=!o.value},h=m=>{s.value=!0,a.value=0,t.value=m,i.value=!0},f=m=>{s.value=!0,a.value=0,t.value=m,l()},p=()=>{s.value||(i.value=!1,t.value={},s.value=!1,a.value=0,l(),r.value+=1)};return(m,v)=>(ce(),en(nw,{title:"Contribution Search",user:e.user,company:e.company,stack:e.stack,"show-export":i.value,"disable-export":a.value===0},{content:Jn(()=>[W("section",Vee,[i.value?(ce(),xe("section",{key:1,class:Kt(["criteria-toolbar-wrap",{"criteria-toolbar-wrap--dropdown-open":o.value}]),"aria-description":"search criteria toolbar",onKeydown:dn(l,["esc"])},[W("div",zee,[W("section",Uee,[W("button",{type:"button",class:"criteria-dropdown-button","aria-expanded":o.value,onClick:u},[v[3]||(v[3]=Hn(" Modify Criteria ",-1)),W("i",{class:Kt(["fa-solid fa-chevron-down dropdown-chevron",{"dropdown-chevron-open":o.value}]),"aria-hidden":"true"},null,2)],8,$ee),rt(bd,{name:"criteria-dropdown"},{default:Jn(()=>[cn(W("section",{class:"criteria-dropdown-panel","aria-description":"modify criteria form panel",onClick:v[0]||(v[0]=Et(()=>{},["stop"]))},[rt(AD,{"contribution-search-presets":t.value,loading:s.value,onSearch:f},null,8,["contribution-search-presets","loading"])],512),[[ng,o.value]])]),_:1})]),W("button",{type:"button",class:"new-search-button",disabled:s.value,onClick:p}," New Search ",8,jee)])],34)):(ce(),xe("section",Wee,[(ce(),en(AD,{key:r.value,loading:s.value,onSearch:h},null,8,["loading"]))])),i.value?(ce(),en(OD,{key:2,user:e.user,company:e.company,stack:e.stack,page:"contribution-search",match:!1,"disabled-columns":n.value,presets:t.value,"disable-selection":"",loading:s.value,"onUpdate:loading":v[1]||(v[1]=w=>s.value=w),"results-total":a.value,"onUpdate:resultsTotal":v[2]||(v[2]=w=>a.value=w)},null,8,["user","company","stack","disabled-columns","presets","loading","results-total"])):_t("",!0)])]),_:1},8,["user","company","stack","show-export","disable-export"]))}}),[["styles",[".contribution-search-content[data-v-0c3d4395]{display:flex;flex-direction:column;gap:1.5rem;min-height:0}.criteria-dropdown-button[data-v-0c3d4395]{align-items:center;background:var(--color-white);border:.0625rem solid var(--color-primary-grey);border-radius:.375rem;color:var(--color-primary-black);cursor:pointer;display:flex;font-family:Poppins,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Arial,sans-serif;font-size:1rem;gap:.375rem;height:2.25rem;justify-content:space-between;padding:0 .75rem;width:100%}.criteria-dropdown-button[data-v-0c3d4395]:hover{border-color:var(--color-primary-green)}.criteria-dropdown-enter-active[data-v-0c3d4395],.criteria-dropdown-leave-active[data-v-0c3d4395]{transition:opacity .2s ease,transform .2s ease}.criteria-dropdown-enter-from[data-v-0c3d4395],.criteria-dropdown-leave-to[data-v-0c3d4395]{opacity:0;transform:translateY(-.25rem)}.criteria-dropdown-panel[data-v-0c3d4395]{background:var(--color-white);border:.0625rem solid var(--color-primary-grey);border-radius:.375rem;box-shadow:0 .625rem 1.5rem #00000014;left:0;margin-top:.5rem;max-height:min(70vh,32rem);overflow-x:hidden;overflow-y:auto;padding:1rem 1rem .5rem;position:absolute;top:100%;width:100%;z-index:2}.criteria-toolbar[data-v-0c3d4395]{align-items:flex-start;display:flex;gap:.75rem;width:100%}.criteria-toolbar-wrap[data-v-0c3d4395]{position:relative;width:100%}.criteria-toolbar-wrap--dropdown-open[data-v-0c3d4395]{z-index:10}.dropdown[data-v-0c3d4395]{flex:1 1 auto;min-width:0;position:relative}.dropdown-chevron[data-v-0c3d4395]{font-size:.75rem;opacity:.85;transform:rotate(0);transition:transform .2s ease}.dropdown-chevron-open[data-v-0c3d4395]{transform:rotate(180deg)}.new-search-button[data-v-0c3d4395]{background:var(--color-primary-green);border:.0625rem solid var(--color-primary-green);border-radius:.375rem;color:var(--color-white);cursor:pointer;flex-shrink:0;font-family:Poppins,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Arial,sans-serif;font-size:.875rem;height:2.25rem;min-width:5rem;padding:0 1rem}.new-search-button[data-v-0c3d4395]:disabled{cursor:not-allowed;opacity:.5}.new-search-button[data-v-0c3d4395]:hover:not(:disabled){filter:brightness(.95)}"]],["__scopeId","data-v-0c3d4395"]]),qee={class:"body"},Qee=zt(xt({__name:"ContributionSearch.ce",props:{user:{type:Number}},setup(e){return(t,n)=>(ce(),xe("div",qee,[rt(Kee,{user:e.user},null,8,["user"])]))}}),[["styles",[ow,".ag-cf9a-actions{display:flex;gap:.625rem;padding-top:.25rem;width:100%}.ag-cf9a-button{border-radius:.25rem;cursor:pointer;flex:1;font-family:inherit;height:2.125rem}.ag-cf9a-button-primary{background:var(--color-primary-green);border:.0625rem solid var(--color-primary-green);color:var(--color-white);font-weight:600}.ag-cf9a-button-secondary{background:var(--color-white);border:.0625rem solid var(--color-secondary-grey);color:var(--color-primary-black);font-weight:600}.ag-cf9a-close-button{align-items:center;background:transparent;border:0;color:var(--color-primary-black);cursor:pointer;display:flex;font-family:inherit;font-size:1rem;font-weight:700;height:1.5rem;justify-content:center;padding:0;transition:color .2s ease;width:1.5rem}.ag-cf9a-close-button:hover{color:var(--color-primary-green)}.ag-cf9a-currency-cell{font-weight:600}.ag-cf9a-filter{background:var(--color-white);border:.0625rem solid var(--color-primary-green);border-radius:.25rem;box-shadow:0 .125rem .5rem #0000001f;box-sizing:border-box;display:flex;flex-direction:column;font-family:Poppins,sans-serif;padding:.75rem;width:21.25rem}.ag-cf9a-helper-text{color:var(--color-primary-black);font-size:.75rem;margin-bottom:.625rem}.ag-cf9a-input,.ag-cf9a-select{border:.0625rem solid var(--color-secondary-grey);border-radius:.25rem;box-sizing:border-box;display:block;font-family:inherit;height:2.125rem;margin-bottom:.625rem;padding:0 .625rem;width:100%}.ag-cf9a-input::placeholder{color:var(--color-primary-black);opacity:.5}.ag-cf9a-title{color:var(--color-primary-black);font-size:.875rem;font-weight:600}.ag-cf9a-title h3{margin:0}.ag-cf9a-title-row{align-items:center;border-bottom:.0625rem solid var(--color-primary-grey);display:flex;justify-content:space-between;margin-bottom:.75rem;padding-bottom:.5rem}.body>*{width:100%}"]]]),Yee=xt({__name:"DetectedContributions",props:{user:{type:Number},company:{type:Number},stack:{type:String}},setup(e){const t=Ce(0);return(n,i)=>(ce(),en(nw,{title:"Detected Contributions",page:"detected-contributions",user:e.user,company:e.company,stack:e.stack,"disable-export":t.value===0},{content:Jn(()=>[rt(OD,{user:e.user,company:e.company,stack:e.stack,page:"detected-contributions",match:!0,"results-total":t.value,"onUpdate:resultsTotal":i[0]||(i[0]=o=>t.value=o)},null,8,["user","company","stack","results-total"])]),_:1},8,["user","company","stack","disable-export"]))}}),Zee={class:"body"},Xee=zt(xt({__name:"DetectedContributions.ce",props:{user:{type:Number}},setup(e){return(t,n)=>(ce(),xe("div",Zee,[rt(Yee,{user:e.user},null,8,["user"])]))}}),[["styles",[ow,".ag-cf9a-actions{display:flex;gap:.625rem;padding-top:.25rem;width:100%}.ag-cf9a-button{border-radius:.25rem;cursor:pointer;flex:1;font-family:inherit;height:2.125rem}.ag-cf9a-button-primary{background:var(--color-primary-green);border:.0625rem solid var(--color-primary-green);color:var(--color-white);font-weight:600}.ag-cf9a-button-secondary{background:var(--color-white);border:.0625rem solid var(--color-secondary-grey);color:var(--color-primary-black);font-weight:600}.ag-cf9a-close-button{align-items:center;background:transparent;border:0;color:var(--color-primary-black);cursor:pointer;display:flex;font-family:inherit;font-size:1rem;font-weight:700;height:1.5rem;justify-content:center;padding:0;transition:color .2s ease;width:1.5rem}.ag-cf9a-close-button:hover{color:var(--color-primary-green)}.ag-cf9a-currency-cell{font-weight:600}.ag-cf9a-filter{background:var(--color-white);border:.0625rem solid var(--color-primary-green);border-radius:.25rem;box-shadow:0 .125rem .5rem #0000001f;box-sizing:border-box;display:flex;flex-direction:column;font-family:Poppins,sans-serif;padding:.75rem;width:21.25rem}.ag-cf9a-helper-text{color:var(--color-primary-black);font-size:.75rem;margin-bottom:.625rem}.ag-cf9a-input,.ag-cf9a-select{border:.0625rem solid var(--color-secondary-grey);border-radius:.25rem;box-sizing:border-box;display:block;font-family:inherit;height:2.125rem;margin-bottom:.625rem;padding:0 .625rem;width:100%}.ag-cf9a-input::placeholder{color:var(--color-primary-black);opacity:.5}.ag-cf9a-title{color:var(--color-primary-black);font-size:.875rem;font-weight:600}.ag-cf9a-title h3{margin:0}.ag-cf9a-title-row{align-items:center;border-bottom:.0625rem solid var(--color-primary-grey);display:flex;justify-content:space-between;margin-bottom:.75rem;padding-bottom:.5rem}.body>*{width:100%}"]]]);tO.registerModules([TU]),Qc.add(JK),Qc.add(ZK),Qc.add(QK),Qc.add(tq),Qc.add(eq);const Jee=rg(dX,{configureApp(e){e.component("font-awesome-icon",RC),FC(e,{store:cs})}}),ete=rg(Qee,{configureApp(e){e.component("font-awesome-icon",RC),FC(e,{store:cs})}}),tte=rg(Xee,{configureApp(e){e.component("font-awesome-icon",RC),FC(e,{store:cs})}});customElements.define("contribution-details",Jee),customElements.define("contribution-search",ete),customElements.define("detected-contributions",tte)}));
|