@datarecce/ui 1.35.0-nightly.20260203.1 → 1.35.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/{AuthModal-BocOoY2B.js → AuthModal-BQwv7JWv.js} +4 -4
- package/dist/AuthModal-BQwv7JWv.js.map +1 -0
- package/dist/{LineageCanvas-Ce-6qcGJ.d.ts → LineageCanvas-ChaGa1FL.d.ts} +4 -4
- package/dist/{LineageCanvas-Ce-6qcGJ.d.ts.map → LineageCanvas-ChaGa1FL.d.ts.map} +1 -1
- package/dist/{ResultErrorFallback-C7c-TN1p.js → ResultErrorFallback-BaNIiz22.js} +1 -1
- package/dist/{ResultErrorFallback-C7c-TN1p.js.map → ResultErrorFallback-BaNIiz22.js.map} +1 -1
- package/dist/{RouteConfigContext-ZH1GFS2V.d.ts → RouteConfigContext-nb4GQL4p.d.ts} +4 -4
- package/dist/{RouteConfigContext-ZH1GFS2V.d.ts.map → RouteConfigContext-nb4GQL4p.d.ts.map} +1 -1
- package/dist/{RunProgress-Bu-Atu3P.d.ts → RunProgress-DeALaWs4.d.ts} +10 -10
- package/dist/{RunProgress-Bu-Atu3P.d.ts.map → RunProgress-DeALaWs4.d.ts.map} +1 -1
- package/dist/{ScreenshotDataGrid-kP5uAvIa.d.ts → ScreenshotDataGrid-_0OXk0uO.d.ts} +3 -3
- package/dist/ScreenshotDataGrid-_0OXk0uO.d.ts.map +1 -0
- package/dist/{SplitPane-BgVo8OYg.d.ts → SplitPane-BW_0Lmst.d.ts} +31 -31
- package/dist/SplitPane-BW_0Lmst.d.ts.map +1 -0
- package/dist/advanced.d.ts +8 -8
- package/dist/advanced.js +1 -1
- package/dist/{api-ZZ4cc9b9.d.ts → api-BeQy3HaS.d.ts} +2 -2
- package/dist/{api-ZZ4cc9b9.d.ts.map → api-BeQy3HaS.d.ts.map} +1 -1
- package/dist/api.d.ts +2 -2
- package/dist/{colors-vY9Yzui0.d.ts → colors-Ci7Xp7LQ.d.ts} +2 -2
- package/dist/{colors-vY9Yzui0.d.ts.map → colors-Ci7Xp7LQ.d.ts.map} +1 -1
- package/dist/{colors--47Kkns4.js → colors-D6QQQjX4.js} +2 -2
- package/dist/colors-D6QQQjX4.js.map +1 -0
- package/dist/components-run.d.ts +6 -6
- package/dist/components-run.js +1 -1
- package/dist/components.d.ts +21 -21
- package/dist/components.js +1 -1
- package/dist/{const-DbXBkrxT.js → const-BEzXEkdk.js} +1 -1
- package/dist/{const-DbXBkrxT.js.map → const-BEzXEkdk.js.map} +1 -1
- package/dist/{constants-DD5vJv2q.js → constants-Cm-GaLU6.js} +1 -1
- package/dist/{constants-DD5vJv2q.js.map → constants-Cm-GaLU6.js.map} +1 -1
- package/dist/constants.d.ts +1 -1
- package/dist/constants.js +1 -1
- package/dist/contexts.d.ts +5 -5
- package/dist/{flag-CiR2E5oz.d.ts → flag-s0MNBVcQ.d.ts} +1 -1
- package/dist/{flag-CiR2E5oz.d.ts.map → flag-s0MNBVcQ.d.ts.map} +1 -1
- package/dist/hooks.d.ts +14 -14
- package/dist/hooks.js +1 -1
- package/dist/{index-5N28QK4h.d.ts → index-C1JqJ_i1.d.ts} +2 -2
- package/dist/{index-5N28QK4h.d.ts.map → index-C1JqJ_i1.d.ts.map} +1 -1
- package/dist/{index-BT9GsWbT.d.ts → index-CARlgCqb.d.ts} +12 -12
- package/dist/{index-BT9GsWbT.d.ts.map → index-CARlgCqb.d.ts.map} +1 -1
- package/dist/{index-CkXLPYZY.d.ts → index-CH2KmtSA.d.ts} +1 -1
- package/dist/index-CH2KmtSA.d.ts.map +1 -0
- package/dist/{index-N8N7XmRj.d.ts → index-D1V96oC2.d.ts} +1 -1
- package/dist/index-D1V96oC2.d.ts.map +1 -0
- package/dist/{index-Cz8w893B.d.ts → index-DCFLPx6S.d.ts} +4 -4
- package/dist/{index-Cz8w893B.d.ts.map → index-DCFLPx6S.d.ts.map} +1 -1
- package/dist/{index-SbwuBEqE.d.ts → index-DOAZG2TB.d.ts} +34 -34
- package/dist/{index-SbwuBEqE.d.ts.map → index-DOAZG2TB.d.ts.map} +1 -1
- package/dist/{index-BARO_hy7.d.ts → index-DSClFMFZ.d.ts} +8 -8
- package/dist/{index-BARO_hy7.d.ts.map → index-DSClFMFZ.d.ts.map} +1 -1
- package/dist/{index-DRR3uwDM.d.ts → index-DaKVp8yA.d.ts} +7 -7
- package/dist/{index-DRR3uwDM.d.ts.map → index-DaKVp8yA.d.ts.map} +1 -1
- package/dist/{index-CupO6oaK.d.ts → index-fHnFXjoz.d.ts} +17 -17
- package/dist/{index-CupO6oaK.d.ts.map → index-fHnFXjoz.d.ts.map} +1 -1
- package/dist/{index-h_fw6R9U.d.ts → index-k65wai5N.d.ts} +3 -3
- package/dist/{index-h_fw6R9U.d.ts.map → index-k65wai5N.d.ts.map} +1 -1
- package/dist/{index-YEk-IAxy.d.ts → index-mB8jN_Bj.d.ts} +7 -7
- package/dist/{index-YEk-IAxy.d.ts.map → index-mB8jN_Bj.d.ts.map} +1 -1
- package/dist/index.d.ts +23 -23
- package/dist/index.js +1 -1
- package/dist/lib/api/track.js +1 -1
- package/dist/lib/api/user.js +1 -1
- package/dist/lib/const.js +1 -1
- package/dist/lib/result/ResultErrorFallback.js +1 -1
- package/dist/{primitives-mqxKF1D_.d.ts → primitives-CUgk9o0R.d.ts} +27 -27
- package/dist/{primitives-mqxKF1D_.d.ts.map → primitives-CUgk9o0R.d.ts.map} +1 -1
- package/dist/primitives.d.ts +10 -10
- package/dist/primitives.js +1 -1
- package/dist/result.d.ts +2 -2
- package/dist/result.js +1 -1
- package/dist/{src-BxomyUvU.js → src-BxTmufnC.js} +6 -6
- package/dist/{src-BxomyUvU.js.map → src-BxTmufnC.js.map} +1 -1
- package/dist/{theme-8TSBpOXT.js → theme-7oDjt2Ob.js} +3 -3
- package/dist/{theme-8TSBpOXT.js.map → theme-7oDjt2Ob.js.map} +1 -1
- package/dist/theme.d.ts +2 -2
- package/dist/theme.js +1 -1
- package/dist/{track-9ZQpBlUK.js → track-Bh1oUc4K.js} +1 -1
- package/dist/{track-9ZQpBlUK.js.map → track-Bh1oUc4K.js.map} +1 -1
- package/dist/{types-CZre3j02.d.ts → types-BtXBu8r6.d.ts} +2 -2
- package/dist/{types-CZre3j02.d.ts.map → types-BtXBu8r6.d.ts.map} +1 -1
- package/dist/{types-CTTdpODe.d.ts → types-DtbGtILc.d.ts} +7 -7
- package/dist/{types-CTTdpODe.d.ts.map → types-DtbGtILc.d.ts.map} +1 -1
- package/dist/types.d.ts +13 -13
- package/dist/useIsDark-CH3bsKYg.js +3 -0
- package/dist/useIsDark-CH3bsKYg.js.map +1 -0
- package/dist/{useThemeColors-DHEroo8f.d.ts → useThemeColors-D5cl0qVS.d.ts} +1 -1
- package/dist/{useThemeColors-DHEroo8f.d.ts.map → useThemeColors-D5cl0qVS.d.ts.map} +1 -1
- package/dist/useThemeColors-D8X-rgl4.js +3 -0
- package/dist/useThemeColors-D8X-rgl4.js.map +1 -0
- package/dist/{user-DMT7E0fc.js → user-Bhq2W6Wv.js} +1 -1
- package/dist/{user-DMT7E0fc.js.map → user-Bhq2W6Wv.js.map} +1 -1
- package/dist/utils-DqeUibB3.js +5 -0
- package/dist/utils-DqeUibB3.js.map +1 -0
- package/dist/utils.d.ts +5 -5
- package/dist/utils.js +1 -1
- package/package.json +1 -1
- package/dist/AuthModal-BocOoY2B.js.map +0 -1
- package/dist/ScreenshotDataGrid-kP5uAvIa.d.ts.map +0 -1
- package/dist/SplitPane-BgVo8OYg.d.ts.map +0 -1
- package/dist/colors--47Kkns4.js.map +0 -1
- package/dist/index-CkXLPYZY.d.ts.map +0 -1
- package/dist/index-N8N7XmRj.d.ts.map +0 -1
- package/dist/useThemeColors--prVbMmM.js +0 -3
- package/dist/useThemeColors--prVbMmM.js.map +0 -1
- package/dist/utils-RnK-NtWU.js +0 -5
- package/dist/utils-RnK-NtWU.js.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import{n as e}from"./colors--47Kkns4.js";import{createTheme as t}from"@mui/material/styles";var n=class{constructor(){this.allSyncListeners=new Map,this.allAsyncListeners=new Map,this.globalSyncListeners=new Set,this.globalAsyncListeners=new Set,this.asyncFunctionsQueue=[],this.scheduled=!1,this.firedEvents={}}setFrameworkOverrides(e){this.frameworkOverrides=e}getListeners(e,t,n){let r=t?this.allAsyncListeners:this.allSyncListeners,i=r.get(e);return!i&&n&&(i=new Set,r.set(e,i)),i}noRegisteredListenersExist(){return this.allSyncListeners.size===0&&this.allAsyncListeners.size===0&&this.globalSyncListeners.size===0&&this.globalAsyncListeners.size===0}addEventListener(e,t,n=!1){this.getListeners(e,n,!0).add(t)}removeEventListener(e,t,n=!1){let r=this.getListeners(e,n,!1);r&&(r.delete(t),r.size===0&&(n?this.allAsyncListeners:this.allSyncListeners).delete(e))}addGlobalListener(e,t=!1){this.getGlobalListeners(t).add(e)}removeGlobalListener(e,t=!1){this.getGlobalListeners(t).delete(e)}dispatchEvent(e){this.dispatchToListeners(e,!0),this.dispatchToListeners(e,!1),this.firedEvents[e.type]=!0}dispatchEventOnce(e){this.firedEvents[e.type]||this.dispatchEvent(e)}dispatchToListeners(e,t){let n=e.type;if(t&&`event`in e){let t=e.event;t instanceof Event&&(e.eventPath=t.composedPath())}let{frameworkOverrides:r}=this,i=e=>{let n=r?()=>r.wrapIncoming(e):e;t?this.dispatchAsync(n):n()},a=this.getListeners(n,t,!1);if((a?.size??0)>0){let t=new Set(a);for(let n of t)a?.has(n)&&i(()=>n(e))}let o=this.getGlobalListeners(t);if(o.size>0){let t=new Set(o);for(let r of t)i(()=>r(n,e))}}getGlobalListeners(e){return e?this.globalAsyncListeners:this.globalSyncListeners}dispatchAsync(e){if(this.asyncFunctionsQueue.push(e),!this.scheduled){let e=()=>{window.setTimeout(this.flushAsyncQueue.bind(this),0)};this.frameworkOverrides?this.frameworkOverrides.wrapIncoming(e):e(),this.scheduled=!0}}flushAsyncQueue(){this.scheduled=!1;let e=this.asyncFunctionsQueue.slice();this.asyncFunctionsQueue=[];for(let t of e)t()}},r=e=>e==null||e===``?null:e;function i(e){return e!=null&&e!==``}function a(e){return!i(e)}var o=e=>e!=null&&typeof e.toString==`function`?e.toString():null,s=(e,t)=>(e?JSON.stringify(e):null)===(t?JSON.stringify(t):null),c=(e,t,n=!1)=>e==null?t==null?0:-1:t==null?1:(typeof e==`object`&&e.toNumber&&(e=e.toNumber()),typeof t==`object`&&t.toNumber&&(t=t.toNumber()),!n||typeof e!=`string`?e>t?1:e<t?-1:0:e.localeCompare(t)),l=/[&<>"']/g,u={"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`};function d(e){return e?.toString().toString()??null}function f(e){return d(e)?.replace(l,e=>u[e])??null}function p(e){return typeof e==`string`&&e.startsWith(`=`)&&e.length>1}function m(e){return e.eRootDiv.getRootNode()}function h(e){return m(e).activeElement}function g(e){let{gos:t,eRootDiv:n}=e,r=null,a=t.get(`getDocument`);return a&&i(a)?r=a():n&&(r=n.ownerDocument),r&&i(r)?r:document}function _(e){let t=h(e);return t===null||t===g(e).body}function v(e){return g(e).defaultView||window}function y(e){let t=null,n=null;try{t=g(e).fullscreenElement}catch{}finally{t||=m(e),n=t.querySelector(`body`)||(t instanceof ShadowRoot?t:t instanceof Document?t?.documentElement:t)}return n}function ee(e){return y(e)?.clientWidth??(window.innerWidth||-1)}function b(e){return y(e)?.clientHeight??(window.innerHeight||-1)}function x(e,t,n){n==null||typeof n==`string`&&n==``?te(e,t):S(e,t,n)}function S(e,t,n){e.setAttribute(ne(t),n.toString())}function te(e,t){e.removeAttribute(ne(t))}function ne(e){return`aria-${e}`}function C(e,t){t?e.setAttribute(`role`,t):e.removeAttribute(`role`)}function re(e){let t=e?.direction;return t===`asc`?`ascending`:t===`desc`?`descending`:t===`mixed`?`other`:`none`}function ie(e){return e.getAttribute(`aria-label`)}function ae(e,t){x(e,`label`,t)}function oe(e,t){x(e,`labelledby`,t)}function se(e,t){x(e,`live`,t)}function ce(e,t){x(e,`atomic`,t)}function le(e,t){x(e,`relevant`,t)}function ue(e,t){x(e,`invalid`,t)}function de(e,t){x(e,`disabled`,t)}function fe(e,t){x(e,`hidden`,t)}function pe(e,t){S(e,`expanded`,t)}function me(e,t){S(e,`setsize`,t)}function he(e,t){S(e,`posinset`,t)}function ge(e,t){S(e,`rowcount`,t)}function _e(e,t){S(e,`rowindex`,t)}function ve(e,t){S(e,`rowspan`,t)}function ye(e,t){S(e,`colcount`,t)}function be(e,t){S(e,`colindex`,t)}function xe(e,t){S(e,`colspan`,t)}function Se(e,t){S(e,`sort`,t)}function Ce(e){te(e,`sort`)}function we(e,t){x(e,`selected`,t)}function Te(e,t){x(e,`controls`,t)}function Ee(e,t){Te(e,t.id),oe(t,e.id)}function De(e,t){x(e,`owns`,t)}function Oe(e,t){return t===void 0?e(`ariaIndeterminate`,`indeterminate`):t===!0?e(`ariaChecked`,`checked`):e(`ariaUnchecked`,`unchecked`)}var ke=`[tabindex], input, select, button, textarea, [href]`,Ae=`[disabled], .ag-disabled:not(.ag-button), .ag-disabled *`;function je(e){return!e||!e.matches(`input, select, button, textarea`)||!e.matches(Ae)?!1:Ge(e)}function w(e,t,n={}){let{skipAriaHidden:r}=n;e.classList.toggle(`ag-hidden`,!t),r||fe(e,!t)}function Me(e,t,n={}){let{skipAriaHidden:r}=n;e.classList.toggle(`ag-invisible`,!t),r||fe(e,!t)}function Ne(e,t){let n=`disabled`,r=t?e=>e.setAttribute(n,``):e=>e.removeAttribute(n);r(e);let i=e.querySelectorAll(`input`)??[];for(let e of i)r(e)}function Pe(e,t,n){let r=0;for(;e;){if(e.classList.contains(t))return!0;if(e=e.parentElement,typeof n==`number`){if(++r>n)break}else if(e===n)break}return!1}function Fe(e){let{height:t,width:n,borderTopWidth:r,borderRightWidth:i,borderBottomWidth:a,borderLeftWidth:o,paddingTop:s,paddingRight:c,paddingBottom:l,paddingLeft:u,marginTop:d,marginRight:f,marginBottom:p,marginLeft:m,boxSizing:h}=window.getComputedStyle(e),g=Number.parseFloat;return{height:g(t||`0`),width:g(n||`0`),borderTopWidth:g(r||`0`),borderRightWidth:g(i||`0`),borderBottomWidth:g(a||`0`),borderLeftWidth:g(o||`0`),paddingTop:g(s||`0`),paddingRight:g(c||`0`),paddingBottom:g(l||`0`),paddingLeft:g(u||`0`),marginTop:g(d||`0`),marginRight:g(f||`0`),marginBottom:g(p||`0`),marginLeft:g(m||`0`),boxSizing:h}}function Ie(e){let t=Fe(e);return t.boxSizing===`border-box`?t.height-t.paddingTop-t.paddingBottom-t.borderTopWidth-t.borderBottomWidth:t.height}function Le(e){let t=Fe(e);return t.boxSizing===`border-box`?t.width-t.paddingLeft-t.paddingRight-t.borderLeftWidth-t.borderRightWidth:t.width}function Re(e){let{height:t,marginBottom:n,marginTop:r}=Fe(e);return Math.floor(t+n+r)}function ze(e){let{width:t,marginLeft:n,marginRight:r}=Fe(e);return Math.floor(t+n+r)}function Be(e){let t=e.getBoundingClientRect(),{borderTopWidth:n,borderLeftWidth:r,borderRightWidth:i,borderBottomWidth:a}=Fe(e);return{top:t.top+(n||0),left:t.left+(r||0),right:t.right+(i||0),bottom:t.bottom+(a||0)}}function Ve(e,t){let n=e.scrollLeft;return t&&(n=Math.abs(n)),n}function He(e,t,n){n&&(t*=-1),e.scrollLeft=t}function T(e){for(;e?.firstChild;)e.firstChild.remove()}function Ue(e){e?.parentNode&&e.remove()}function We(e){return!!e.offsetParent}function Ge(e){return e.checkVisibility?e.checkVisibility({checkVisibilityCSS:!0}):!(!We(e)||window.getComputedStyle(e).visibility!==`visible`)}function Ke(e){let t=document.createElement(`div`);return t.innerHTML=(e||``).trim(),t.firstChild}function qe(e){return()=>{let t=e();return t?Je(t)||Ye(t):!0}}function Je(e){return e.clientWidth<e.scrollWidth}function Ye(e){return e.clientHeight<e.scrollHeight}function Xe(e,t){t===`flex`?(e.style.removeProperty(`width`),e.style.removeProperty(`minWidth`),e.style.removeProperty(`maxWidth`),e.style.flex=`1 1 auto`):Ze(e,t)}function Ze(e,t){t=$e(t),e.style.width=t,e.style.maxWidth=t,e.style.minWidth=t}function Qe(e,t){t=$e(t),e.style.height=t,e.style.maxHeight=t,e.style.minHeight=t}function $e(e){return typeof e==`number`?`${e}px`:e}function et(e){return e instanceof Node||e instanceof HTMLElement}function E(e,t,n){n==null||n===``?e.removeAttribute(t):e.setAttribute(t,n.toString())}function tt(e,t,n){let r=v(e).ResizeObserver,i=r?new r(n):null;return i?.observe(t),()=>i?.disconnect()}function nt(e,t){let n=v(e);n.requestAnimationFrame?n.requestAnimationFrame(t):n.webkitRequestAnimationFrame?n.webkitRequestAnimationFrame(t):n.setTimeout(t,0)}var rt=`data-ref`,it;function at(){return it??=document.createTextNode(` `),it.cloneNode()}function ot(e){let{attrs:t,children:n,cls:r,ref:i,role:a,tag:o}=e,s=document.createElement(o);if(r&&(s.className=r),i&&s.setAttribute(rt,i),a&&s.setAttribute(`role`,a),t)for(let e of Object.keys(t))s.setAttribute(e,t[e]);if(n)if(typeof n==`string`)s.textContent=n;else{let e=!0;for(let t of n)t&&(typeof t==`string`?(s.appendChild(document.createTextNode(t)),e=!1):typeof t==`function`?s.appendChild(t()):(e&&=(s.appendChild(at()),!1),s.append(ot(t)),s.appendChild(at())))}return s}var st=[`touchstart`,`touchend`,`touchmove`,`touchcancel`,`scroll`],ct=[`wheel`],lt={},ut=(()=>{let e={select:`input`,change:`input`,submit:`form`,reset:`form`,error:`img`,load:`img`,abort:`img`};return t=>{if(typeof lt[t]==`boolean`)return lt[t];let n=document.createElement(e[t]||`div`);return t=`on`+t,lt[t]=t in n}})();function dt(e,t){return!t||!e?!1:pt(t).indexOf(e)>=0}function ft(e){let t=[],n=e.target;for(;n;)t.push(n),n=n.parentElement;return t}function pt(e){let t=e;return t.path?t.path:t.composedPath?t.composedPath():ft(t)}function mt(e,t,n){let r=ht(t),i;r!=null&&(i={passive:r}),e.addEventListener(t,n,i)}var ht=e=>{let t=st.includes(e),n=ct.includes(e);if(t)return!0;if(n)return!1};function gt(e,t,n){if(n===0)return!1;let r=Math.abs(e.clientX-t.clientX),i=Math.abs(e.clientY-t.clientY);return Math.max(r,i)<=n}var _t=(e,t)=>{let n=e.identifier;for(let e=0,r=t.length;e<r;++e){let r=t[e];if(r.identifier===n)return r}return null};function vt(e,t){return e.gos.isElementInThisInstance(t.target)}function yt(e,t,n){let r=e.getBoundingClientRect().height,i=ee(n)-2,a=b(n)-2;if(!e.offsetParent)return;let o=Be(e.offsetParent),{clientY:s,clientX:c}=t,l=s-o.top-r/2,u=c-o.left-10,d=g(n),f=d.defaultView||window,p=f.pageYOffset||d.documentElement.scrollTop,m=f.pageXOffset||d.documentElement.scrollLeft;i>0&&u+e.clientWidth>i+m&&(u=i+m-e.clientWidth),u<0&&(u=0),a>0&&l+e.clientHeight>a+p&&(l=a+p-e.clientHeight),l<0&&(l=0),e.style.left=`${u}px`,e.style.top=`${l}px`}var bt=(e,...t)=>{for(let n of t){let[t,r,i,a]=n;t.addEventListener(r,i,a),e.push(n)}},xt=e=>{if(e){for(let[t,n,r,i]of e)t.removeEventListener(n,r,i);e.length=0}},St=e=>{e.cancelable&&e.preventDefault()};function Ct(e,t){return t}function wt(e){return e?.getLocaleTextFunc()??Ct}function Tt(e,t,n,r){let i=t[n];return e.getLocaleTextFunc()(n,typeof i==`function`?i(r):i,r)}function Et(e){return(t,n,r)=>e({key:t,defaultValue:n,variableValues:r})}function Dt(e){return(t,n,r)=>{let i=e?.[t];if(i&&r?.length){let e=0;for(;!(e>=r.length||i.indexOf("${variable}")===-1);)i=i.replace("${variable}",r[e++])}return i??n}}var D=class{constructor(){this.destroyFunctions=[],this.destroyed=!1,this.__v_skip=!0,this.propertyListenerId=0,this.lastChangeSetIdLookup={},this.isAlive=()=>!this.destroyed}preWireBeans(e){this.beans=e,this.stubContext=e.context,this.eventSvc=e.eventSvc,this.gos=e.gos}destroy(){let{destroyFunctions:e}=this;for(let t=0;t<e.length;t++)e[t]();e.length=0,this.destroyed=!0,this.dispatchLocalEvent({type:`destroyed`})}addEventListener(e,t,r){this.localEventService||=new n,this.localEventService.addEventListener(e,t,r)}removeEventListener(e,t,n){this.localEventService?.removeEventListener(e,t,n)}dispatchLocalEvent(e){this.localEventService?.dispatchEvent(e)}addManagedElementListeners(e,t){return this._setupListeners(e,t)}addManagedEventListeners(e){return this._setupListeners(this.eventSvc,e)}addManagedListeners(e,t){return this._setupListeners(e,t)}_setupListeners(e,t){let n=[];for(let r of Object.keys(t)){let i=t[r];i&&n.push(this._setupListener(e,r,i))}return n}_setupListener(e,t,n){if(this.destroyed)return()=>null;let r;if(Ot(e))e.__addEventListener(t,n),r=()=>(e.__removeEventListener(t,n),null);else{let i=kt(e);e instanceof HTMLElement?mt(e,t,n):i?e.addListener(t,n):e.addEventListener(t,n),r=i?()=>(e.removeListener(t,n),null):()=>(e.removeEventListener(t,n),null)}return this.destroyFunctions.push(r),()=>(r(),this.destroyFunctions=this.destroyFunctions.filter(e=>e!==r),null)}setupPropertyListener(e,t){let{gos:n}=this;n.addPropertyEventListener(e,t);let r=()=>(n.removePropertyEventListener(e,t),null);return this.destroyFunctions.push(r),()=>(r(),this.destroyFunctions=this.destroyFunctions.filter(e=>e!==r),null)}addManagedPropertyListener(e,t){return this.destroyed?()=>null:this.setupPropertyListener(e,t)}addManagedPropertyListeners(e,t){if(this.destroyed)return;let n=e.join(`-`)+ this.propertyListenerId++,r=e=>{if(e.changeSet){if(e.changeSet&&e.changeSet.id===this.lastChangeSetIdLookup[n])return;this.lastChangeSetIdLookup[n]=e.changeSet.id}t({type:`propertyChanged`,changeSet:e.changeSet,source:e.source})};for(let t of e)this.setupPropertyListener(t,r)}getLocaleTextFunc(){return wt(this.beans.localeSvc)}addDestroyFunc(e){this.isAlive()?this.destroyFunctions.push(e):e()}createOptionalManagedBean(e,t){return e?this.createManagedBean(e,t):void 0}createManagedBean(e,t){let n=this.createBean(e,t);return this.addDestroyFunc(this.destroyBean.bind(this,e,t)),n}createBean(e,t,n){return(t||this.stubContext).createBean(e,n)}destroyBean(e,t){return(t||this.stubContext).destroyBean(e)}destroyBeans(e,t){return(t||this.stubContext).destroyBeans(e)}};function Ot(e){return e.__addEventListener!==void 0}function kt(e){return e.eventServiceType===`global`}var O=class extends D{},At=new Set,jt=(e,t)=>{At.has(t)||(At.add(t),e())};jt._set=At;var Mt={pending:!1,funcs:[]},Nt={pending:!1,funcs:[]};function Pt(e,t=`setTimeout`,n){let r=t===`raf`?Nt:Mt;if(r.funcs.push(e),r.pending)return;r.pending=!0;let i=()=>{let e=r.funcs.slice();r.funcs.length=0,r.pending=!1;for(let t of e)t()};t===`raf`?nt(n,i):window.setTimeout(i,0)}function k(e,t,n){let r;return function(...i){let a=this;return window.clearTimeout(r),r=window.setTimeout(function(){e.isAlive()&&t.apply(a,i)},n),r}}function Ft(e,t){let n=0;return function(...r){let i=this,a=Date.now();a-n<t||(n=a,e.apply(i,r))}}function It(e,t,n,r=100){let i=Date.now(),a=null,o=!1,s=()=>{a!=null&&(window.clearInterval(a),a=null)};e.addDestroyFunc(s);let c=()=>{let e=Date.now()-i>r;(t()||e)&&(n(),o=!0,s())};c(),o||(a=window.setInterval(c,10))}var Lt=new Set([`__proto__`,`constructor`,`prototype`]);function Rt(e,t){if(e!=null){if(Array.isArray(e)){for(let n=0;n<e.length;n++)t(n.toString(),e[n]);return}for(let n of Object.keys(e).filter(e=>!Lt.has(e)))t(n,e[n])}}function A(e,t,n=!0,r=!1){i(t)&&Rt(t,(t,i)=>{let a=e[t];a!==i&&(r&&a==null&&typeof i==`object`&&i&&i.constructor===Object&&(a={},e[t]=a),zt(i)&&zt(a)&&!Array.isArray(a)?A(a,i,n,r):(n||i!==void 0)&&(e[t]=i))})}function zt(e){return typeof e==`object`&&!!e}var Bt=class e{static applyGlobalGridOptions(t){if(!e.gridOptions)return{...t};let n={};return A(n,e.gridOptions,!0,!0),e.mergeStrategy===`deep`?A(n,t,!0,!0):n={...n,...t},e.gridOptions.context&&(n.context=e.gridOptions.context),t.context&&(e.mergeStrategy===`deep`&&n.context&&A(t.context,n.context,!0,!0),n.context=t.context),n}static applyGlobalGridOption(t,n){if(e.mergeStrategy===`deep`){let r=Ht(t);if(r&&typeof r==`object`&&typeof n==`object`)return e.applyGlobalGridOptions({[t]:n})[t]}return n}};Bt.gridOptions=void 0,Bt.mergeStrategy=`shallow`;var Vt=Bt;function Ht(e){return Vt.gridOptions?.[e]}var Ut={suppressContextMenu:!1,preventDefaultOnContextMenu:!1,allowContextMenuWithControlKey:!1,suppressMenuHide:!0,enableBrowserTooltips:!1,tooltipTrigger:`hover`,tooltipShowDelay:2e3,tooltipHideDelay:1e4,tooltipMouseTrack:!1,tooltipShowMode:`standard`,tooltipInteraction:!1,copyHeadersToClipboard:!1,copyGroupHeadersToClipboard:!1,clipboardDelimiter:` `,suppressCopyRowsToClipboard:!1,suppressCopySingleCellRanges:!1,suppressLastEmptyLineOnPaste:!1,suppressClipboardPaste:!1,suppressClipboardApi:!1,suppressCutToClipboard:!1,maintainColumnOrder:!1,enableStrictPivotColumnOrder:!1,suppressFieldDotNotation:!1,allowDragFromColumnsToolPanel:!1,suppressMovableColumns:!1,suppressColumnMoveAnimation:!1,suppressMoveWhenColumnDragging:!1,suppressDragLeaveHidesColumns:!1,suppressRowGroupHidesColumns:!1,suppressAutoSize:!1,autoSizePadding:20,skipHeaderOnAutoSize:!1,singleClickEdit:!1,suppressClickEdit:!1,readOnlyEdit:!1,stopEditingWhenCellsLoseFocus:!1,enterNavigatesVertically:!1,enterNavigatesVerticallyAfterEdit:!1,enableCellEditingOnBackspace:!1,undoRedoCellEditing:!1,undoRedoCellEditingLimit:10,suppressCsvExport:!1,suppressExcelExport:!1,cacheQuickFilter:!1,includeHiddenColumnsInQuickFilter:!1,excludeChildrenWhenTreeDataFiltering:!1,enableAdvancedFilter:!1,includeHiddenColumnsInAdvancedFilter:!1,enableCharts:!1,masterDetail:!1,keepDetailRows:!1,keepDetailRowsCount:10,detailRowAutoHeight:!1,tabIndex:0,rowBuffer:10,valueCache:!1,valueCacheNeverExpires:!1,enableCellExpressions:!1,suppressTouch:!1,suppressFocusAfterRefresh:!1,suppressBrowserResizeObserver:!1,suppressPropertyNamesCheck:!1,suppressChangeDetection:!1,debug:!1,suppressLoadingOverlay:!1,suppressNoRowsOverlay:!1,pagination:!1,paginationPageSize:100,paginationPageSizeSelector:!0,paginationAutoPageSize:!1,paginateChildRows:!1,suppressPaginationPanel:!1,pivotMode:!1,pivotPanelShow:`never`,pivotDefaultExpanded:0,pivotSuppressAutoColumn:!1,suppressExpandablePivotGroups:!1,functionsReadOnly:!1,suppressAggFuncInHeader:!1,alwaysAggregateAtRootLevel:!1,aggregateOnlyChangedColumns:!1,suppressAggFilteredOnly:!1,removePivotHeaderRowWhenSingleValueColumn:!1,animateRows:!0,cellFlashDuration:500,cellFadeDuration:1e3,allowShowChangeAfterFilter:!1,domLayout:`normal`,ensureDomOrder:!1,enableRtl:!1,suppressColumnVirtualisation:!1,suppressMaxRenderedRowRestriction:!1,suppressRowVirtualisation:!1,rowDragManaged:!1,refreshAfterGroupEdit:!1,rowDragInsertDelay:500,suppressRowDrag:!1,suppressMoveWhenRowDragging:!1,rowDragEntireRow:!1,rowDragMultiRow:!1,embedFullWidthRows:!1,groupDisplayType:`singleColumn`,groupDefaultExpanded:0,groupMaintainOrder:!1,groupSelectsChildren:!1,groupSuppressBlankHeader:!1,groupSelectsFiltered:!1,showOpenedGroup:!1,groupRemoveSingleChildren:!1,groupRemoveLowestSingleChildren:!1,groupHideOpenParents:!1,groupAllowUnbalanced:!1,rowGroupPanelShow:`never`,suppressMakeColumnVisibleAfterUnGroup:!1,treeData:!1,rowGroupPanelSuppressSort:!1,suppressGroupRowsSticky:!1,rowModelType:`clientSide`,asyncTransactionWaitMillis:50,suppressModelUpdateAfterUpdateTransaction:!1,cacheOverflowSize:1,infiniteInitialRowCount:1,serverSideInitialRowCount:1,cacheBlockSize:100,maxBlocksInCache:-1,maxConcurrentDatasourceRequests:2,blockLoadDebounceMillis:0,purgeClosedRowNodes:!1,serverSideSortAllLevels:!1,serverSideOnlyRefreshFilteredGroups:!1,serverSidePivotResultFieldSeparator:`_`,viewportRowModelPageSize:5,viewportRowModelBufferSize:5,alwaysShowHorizontalScroll:!1,alwaysShowVerticalScroll:!1,debounceVerticalScrollbar:!1,suppressHorizontalScroll:!1,suppressScrollOnNewData:!1,suppressScrollWhenPopupsAreOpen:!1,suppressAnimationFrame:!1,suppressMiddleClickScrolls:!1,suppressPreventDefaultOnMouseWheel:!1,rowMultiSelectWithClick:!1,suppressRowDeselection:!1,suppressRowClickSelection:!1,suppressCellFocus:!1,suppressHeaderFocus:!1,suppressMultiRangeSelection:!1,enableCellTextSelection:!1,enableRangeSelection:!1,enableRangeHandle:!1,enableFillHandle:!1,fillHandleDirection:`xy`,suppressClearOnFillReduction:!1,accentedSort:!1,unSortIcon:!1,suppressMultiSort:!1,alwaysMultiSort:!1,suppressMaintainUnsortedOrder:!1,suppressRowHoverHighlight:!1,suppressRowTransform:!1,columnHoverHighlight:!1,deltaSort:!1,enableGroupEdit:!1,groupLockGroupColumns:0,serverSideEnableClientSideSort:!1,suppressServerSideFullWidthLoadingRow:!1,pivotMaxGeneratedColumns:-1,columnMenu:`new`,reactiveCustomComponents:!0,suppressSetFilterByDefault:!1,enableFilterHandlers:!1},Wt=`https://www.ag-grid.com`;function Gt(e,t,...n){e.get(`debug`)&&console.log(`AG Grid: `+t,...n)}function Kt(e,...t){jt(()=>console.warn(`AG Grid: `+e,...t),e+t?.join(``))}function qt(e,...t){jt(()=>console.error(`AG Grid: `+e,...t),e+t?.join(``))}var Jt=new Set,Yt={},Xt={},Zt,Qt=!1,$t=!1,en=!1;function tn(e){let[t,n]=e.version.split(`.`)||[],[r,i]=Zt.split(`.`)||[];return t===r&&n===i}function nn(e){Zt||=e.version;let t=e=>`You are using incompatible versions of AG Grid modules. Major and minor versions should always match across modules. ${e} Please update all modules to the same version.`;e.version?tn(e)||qt(t(`'${e.moduleName}' is version ${e.version} but the other modules are version ${Zt}.`)):qt(t(`'${e.moduleName}' is incompatible.`));let n=e.validate?.();n&&!n.isValid&&qt(`${n.message}`)}function rn(e,t,n=!1){n||(Qt=!0),nn(e);let r=e.rowModels??[`all`];Jt.add(e);let i;t===void 0?i=Yt:($t=!0,Xt[t]===void 0&&(Xt[t]={}),i=Xt[t]);for(let t of r)i[t]===void 0&&(i[t]={}),i[t][e.moduleName]=e;if(e.dependsOn)for(let r of e.dependsOn)rn(r,t,n)}function an(e){delete Xt[e]}function on(e,t,n){let r=n=>!!Yt[n]?.[e]||!!Xt[t]?.[n]?.[e];return r(n)||r(`all`)}function sn(){return $t}function cn(e,t){let n=Xt[e]??{};return[...Object.values(Yt.all??{}),...Object.values(n.all??{}),...Object.values(Yt[t]??{}),...Object.values(n[t]??{})]}function ln(){return new Set(Jt)}function un(e,t){let n=Xt[e]??{};return[...Object.values(n.all??{}),...Object.values(n[t]??{})]}function dn(){return Qt}function fn(){return en}var pn=class{static register(e){rn(e,void 0)}static registerModules(e){for(let t of e)rn(t,void 0)}},j=`35.0.1`,mn=2e3,hn=100,gn=`_version_`,_n=null,vn=`${Wt}/javascript-data-grid`;function yn(e){_n=e}function bn(e){vn=e}function xn(e,t,n){return _n?.(e,t)??[kn(e,t,n)]}function Sn(e,t,n,r,i){e(`${r?`warning`:`error`} #${t}`,...xn(t,n,i))}function Cn(e){if(!e)return String(e);let t={};for(let n of Object.keys(e))typeof e[n]!=`object`&&typeof e[n]!=`function`&&(t[n]=e[n]);return JSON.stringify(t)}function wn(e){let t=e;return e instanceof Error?t=e.toString():typeof e==`object`&&(t=Cn(e)),t}function Tn(e){return e===void 0?`undefined`:e===null?`null`:e}function En(e,t){return`${e}?${t.toString()}`}function Dn(e,t,n){let r=Array.from(t.entries()).sort((e,t)=>t[1].length-e[1].length),i=En(e,t);for(let[a,o]of r){if(a===gn)continue;let r=i.length-n;if(r<=0)break;let s=r+3,c=o.length-s>hn?o.slice(0,o.length-s)+`...`:o.slice(0,hn)+`...`;t.set(a,c),i=En(e,t)}return i}function On(e,t){let n=new URLSearchParams;if(n.append(gn,j),t)for(let e of Object.keys(t))n.append(e,wn(t[e]));let r=`${vn}/errors/${e}`,i=En(r,n);return i.length<=mn?i:Dn(r,n,mn)}var kn=(e,t,n)=>{let r=On(e,t),i=`${n?n+`
|
|
2
|
+
import{n as e}from"./colors-D6QQQjX4.js";import{createTheme as t}from"@mui/material/styles";var n=class{constructor(){this.allSyncListeners=new Map,this.allAsyncListeners=new Map,this.globalSyncListeners=new Set,this.globalAsyncListeners=new Set,this.asyncFunctionsQueue=[],this.scheduled=!1,this.firedEvents={}}setFrameworkOverrides(e){this.frameworkOverrides=e}getListeners(e,t,n){let r=t?this.allAsyncListeners:this.allSyncListeners,i=r.get(e);return!i&&n&&(i=new Set,r.set(e,i)),i}noRegisteredListenersExist(){return this.allSyncListeners.size===0&&this.allAsyncListeners.size===0&&this.globalSyncListeners.size===0&&this.globalAsyncListeners.size===0}addEventListener(e,t,n=!1){this.getListeners(e,n,!0).add(t)}removeEventListener(e,t,n=!1){let r=this.getListeners(e,n,!1);r&&(r.delete(t),r.size===0&&(n?this.allAsyncListeners:this.allSyncListeners).delete(e))}addGlobalListener(e,t=!1){this.getGlobalListeners(t).add(e)}removeGlobalListener(e,t=!1){this.getGlobalListeners(t).delete(e)}dispatchEvent(e){this.dispatchToListeners(e,!0),this.dispatchToListeners(e,!1),this.firedEvents[e.type]=!0}dispatchEventOnce(e){this.firedEvents[e.type]||this.dispatchEvent(e)}dispatchToListeners(e,t){let n=e.type;if(t&&`event`in e){let t=e.event;t instanceof Event&&(e.eventPath=t.composedPath())}let{frameworkOverrides:r}=this,i=e=>{let n=r?()=>r.wrapIncoming(e):e;t?this.dispatchAsync(n):n()},a=this.getListeners(n,t,!1);if((a?.size??0)>0){let t=new Set(a);for(let n of t)a?.has(n)&&i(()=>n(e))}let o=this.getGlobalListeners(t);if(o.size>0){let t=new Set(o);for(let r of t)i(()=>r(n,e))}}getGlobalListeners(e){return e?this.globalAsyncListeners:this.globalSyncListeners}dispatchAsync(e){if(this.asyncFunctionsQueue.push(e),!this.scheduled){let e=()=>{window.setTimeout(this.flushAsyncQueue.bind(this),0)};this.frameworkOverrides?this.frameworkOverrides.wrapIncoming(e):e(),this.scheduled=!0}}flushAsyncQueue(){this.scheduled=!1;let e=this.asyncFunctionsQueue.slice();this.asyncFunctionsQueue=[];for(let t of e)t()}},r=e=>e==null||e===``?null:e;function i(e){return e!=null&&e!==``}function a(e){return!i(e)}var o=e=>e!=null&&typeof e.toString==`function`?e.toString():null,s=(e,t)=>(e?JSON.stringify(e):null)===(t?JSON.stringify(t):null),c=(e,t,n=!1)=>e==null?t==null?0:-1:t==null?1:(typeof e==`object`&&e.toNumber&&(e=e.toNumber()),typeof t==`object`&&t.toNumber&&(t=t.toNumber()),!n||typeof e!=`string`?e>t?1:e<t?-1:0:e.localeCompare(t)),l=/[&<>"']/g,u={"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`};function d(e){return e?.toString().toString()??null}function f(e){return d(e)?.replace(l,e=>u[e])??null}function p(e){return typeof e==`string`&&e.startsWith(`=`)&&e.length>1}function m(e){return e.eRootDiv.getRootNode()}function h(e){return m(e).activeElement}function g(e){let{gos:t,eRootDiv:n}=e,r=null,a=t.get(`getDocument`);return a&&i(a)?r=a():n&&(r=n.ownerDocument),r&&i(r)?r:document}function _(e){let t=h(e);return t===null||t===g(e).body}function v(e){return g(e).defaultView||window}function y(e){let t=null,n=null;try{t=g(e).fullscreenElement}catch{}finally{t||=m(e),n=t.querySelector(`body`)||(t instanceof ShadowRoot?t:t instanceof Document?t?.documentElement:t)}return n}function ee(e){return y(e)?.clientWidth??(window.innerWidth||-1)}function b(e){return y(e)?.clientHeight??(window.innerHeight||-1)}function x(e,t,n){n==null||typeof n==`string`&&n==``?te(e,t):S(e,t,n)}function S(e,t,n){e.setAttribute(ne(t),n.toString())}function te(e,t){e.removeAttribute(ne(t))}function ne(e){return`aria-${e}`}function C(e,t){t?e.setAttribute(`role`,t):e.removeAttribute(`role`)}function re(e){let t=e?.direction;return t===`asc`?`ascending`:t===`desc`?`descending`:t===`mixed`?`other`:`none`}function ie(e){return e.getAttribute(`aria-label`)}function ae(e,t){x(e,`label`,t)}function oe(e,t){x(e,`labelledby`,t)}function se(e,t){x(e,`live`,t)}function ce(e,t){x(e,`atomic`,t)}function le(e,t){x(e,`relevant`,t)}function ue(e,t){x(e,`invalid`,t)}function de(e,t){x(e,`disabled`,t)}function fe(e,t){x(e,`hidden`,t)}function pe(e,t){S(e,`expanded`,t)}function me(e,t){S(e,`setsize`,t)}function he(e,t){S(e,`posinset`,t)}function ge(e,t){S(e,`rowcount`,t)}function _e(e,t){S(e,`rowindex`,t)}function ve(e,t){S(e,`rowspan`,t)}function ye(e,t){S(e,`colcount`,t)}function be(e,t){S(e,`colindex`,t)}function xe(e,t){S(e,`colspan`,t)}function Se(e,t){S(e,`sort`,t)}function Ce(e){te(e,`sort`)}function we(e,t){x(e,`selected`,t)}function Te(e,t){x(e,`controls`,t)}function Ee(e,t){Te(e,t.id),oe(t,e.id)}function De(e,t){x(e,`owns`,t)}function Oe(e,t){return t===void 0?e(`ariaIndeterminate`,`indeterminate`):t===!0?e(`ariaChecked`,`checked`):e(`ariaUnchecked`,`unchecked`)}var ke=`[tabindex], input, select, button, textarea, [href]`,Ae=`[disabled], .ag-disabled:not(.ag-button), .ag-disabled *`;function je(e){return!e||!e.matches(`input, select, button, textarea`)||!e.matches(Ae)?!1:Ge(e)}function w(e,t,n={}){let{skipAriaHidden:r}=n;e.classList.toggle(`ag-hidden`,!t),r||fe(e,!t)}function Me(e,t,n={}){let{skipAriaHidden:r}=n;e.classList.toggle(`ag-invisible`,!t),r||fe(e,!t)}function Ne(e,t){let n=`disabled`,r=t?e=>e.setAttribute(n,``):e=>e.removeAttribute(n);r(e);let i=e.querySelectorAll(`input`)??[];for(let e of i)r(e)}function Pe(e,t,n){let r=0;for(;e;){if(e.classList.contains(t))return!0;if(e=e.parentElement,typeof n==`number`){if(++r>n)break}else if(e===n)break}return!1}function Fe(e){let{height:t,width:n,borderTopWidth:r,borderRightWidth:i,borderBottomWidth:a,borderLeftWidth:o,paddingTop:s,paddingRight:c,paddingBottom:l,paddingLeft:u,marginTop:d,marginRight:f,marginBottom:p,marginLeft:m,boxSizing:h}=window.getComputedStyle(e),g=Number.parseFloat;return{height:g(t||`0`),width:g(n||`0`),borderTopWidth:g(r||`0`),borderRightWidth:g(i||`0`),borderBottomWidth:g(a||`0`),borderLeftWidth:g(o||`0`),paddingTop:g(s||`0`),paddingRight:g(c||`0`),paddingBottom:g(l||`0`),paddingLeft:g(u||`0`),marginTop:g(d||`0`),marginRight:g(f||`0`),marginBottom:g(p||`0`),marginLeft:g(m||`0`),boxSizing:h}}function Ie(e){let t=Fe(e);return t.boxSizing===`border-box`?t.height-t.paddingTop-t.paddingBottom-t.borderTopWidth-t.borderBottomWidth:t.height}function Le(e){let t=Fe(e);return t.boxSizing===`border-box`?t.width-t.paddingLeft-t.paddingRight-t.borderLeftWidth-t.borderRightWidth:t.width}function Re(e){let{height:t,marginBottom:n,marginTop:r}=Fe(e);return Math.floor(t+n+r)}function ze(e){let{width:t,marginLeft:n,marginRight:r}=Fe(e);return Math.floor(t+n+r)}function Be(e){let t=e.getBoundingClientRect(),{borderTopWidth:n,borderLeftWidth:r,borderRightWidth:i,borderBottomWidth:a}=Fe(e);return{top:t.top+(n||0),left:t.left+(r||0),right:t.right+(i||0),bottom:t.bottom+(a||0)}}function Ve(e,t){let n=e.scrollLeft;return t&&(n=Math.abs(n)),n}function He(e,t,n){n&&(t*=-1),e.scrollLeft=t}function T(e){for(;e?.firstChild;)e.firstChild.remove()}function Ue(e){e?.parentNode&&e.remove()}function We(e){return!!e.offsetParent}function Ge(e){return e.checkVisibility?e.checkVisibility({checkVisibilityCSS:!0}):!(!We(e)||window.getComputedStyle(e).visibility!==`visible`)}function Ke(e){let t=document.createElement(`div`);return t.innerHTML=(e||``).trim(),t.firstChild}function qe(e){return()=>{let t=e();return t?Je(t)||Ye(t):!0}}function Je(e){return e.clientWidth<e.scrollWidth}function Ye(e){return e.clientHeight<e.scrollHeight}function Xe(e,t){t===`flex`?(e.style.removeProperty(`width`),e.style.removeProperty(`minWidth`),e.style.removeProperty(`maxWidth`),e.style.flex=`1 1 auto`):Ze(e,t)}function Ze(e,t){t=$e(t),e.style.width=t,e.style.maxWidth=t,e.style.minWidth=t}function Qe(e,t){t=$e(t),e.style.height=t,e.style.maxHeight=t,e.style.minHeight=t}function $e(e){return typeof e==`number`?`${e}px`:e}function et(e){return e instanceof Node||e instanceof HTMLElement}function E(e,t,n){n==null||n===``?e.removeAttribute(t):e.setAttribute(t,n.toString())}function tt(e,t,n){let r=v(e).ResizeObserver,i=r?new r(n):null;return i?.observe(t),()=>i?.disconnect()}function nt(e,t){let n=v(e);n.requestAnimationFrame?n.requestAnimationFrame(t):n.webkitRequestAnimationFrame?n.webkitRequestAnimationFrame(t):n.setTimeout(t,0)}var rt=`data-ref`,it;function at(){return it??=document.createTextNode(` `),it.cloneNode()}function ot(e){let{attrs:t,children:n,cls:r,ref:i,role:a,tag:o}=e,s=document.createElement(o);if(r&&(s.className=r),i&&s.setAttribute(rt,i),a&&s.setAttribute(`role`,a),t)for(let e of Object.keys(t))s.setAttribute(e,t[e]);if(n)if(typeof n==`string`)s.textContent=n;else{let e=!0;for(let t of n)t&&(typeof t==`string`?(s.appendChild(document.createTextNode(t)),e=!1):typeof t==`function`?s.appendChild(t()):(e&&=(s.appendChild(at()),!1),s.append(ot(t)),s.appendChild(at())))}return s}var st=[`touchstart`,`touchend`,`touchmove`,`touchcancel`,`scroll`],ct=[`wheel`],lt={},ut=(()=>{let e={select:`input`,change:`input`,submit:`form`,reset:`form`,error:`img`,load:`img`,abort:`img`};return t=>{if(typeof lt[t]==`boolean`)return lt[t];let n=document.createElement(e[t]||`div`);return t=`on`+t,lt[t]=t in n}})();function dt(e,t){return!t||!e?!1:pt(t).indexOf(e)>=0}function ft(e){let t=[],n=e.target;for(;n;)t.push(n),n=n.parentElement;return t}function pt(e){let t=e;return t.path?t.path:t.composedPath?t.composedPath():ft(t)}function mt(e,t,n){let r=ht(t),i;r!=null&&(i={passive:r}),e.addEventListener(t,n,i)}var ht=e=>{let t=st.includes(e),n=ct.includes(e);if(t)return!0;if(n)return!1};function gt(e,t,n){if(n===0)return!1;let r=Math.abs(e.clientX-t.clientX),i=Math.abs(e.clientY-t.clientY);return Math.max(r,i)<=n}var _t=(e,t)=>{let n=e.identifier;for(let e=0,r=t.length;e<r;++e){let r=t[e];if(r.identifier===n)return r}return null};function vt(e,t){return e.gos.isElementInThisInstance(t.target)}function yt(e,t,n){let r=e.getBoundingClientRect().height,i=ee(n)-2,a=b(n)-2;if(!e.offsetParent)return;let o=Be(e.offsetParent),{clientY:s,clientX:c}=t,l=s-o.top-r/2,u=c-o.left-10,d=g(n),f=d.defaultView||window,p=f.pageYOffset||d.documentElement.scrollTop,m=f.pageXOffset||d.documentElement.scrollLeft;i>0&&u+e.clientWidth>i+m&&(u=i+m-e.clientWidth),u<0&&(u=0),a>0&&l+e.clientHeight>a+p&&(l=a+p-e.clientHeight),l<0&&(l=0),e.style.left=`${u}px`,e.style.top=`${l}px`}var bt=(e,...t)=>{for(let n of t){let[t,r,i,a]=n;t.addEventListener(r,i,a),e.push(n)}},xt=e=>{if(e){for(let[t,n,r,i]of e)t.removeEventListener(n,r,i);e.length=0}},St=e=>{e.cancelable&&e.preventDefault()};function Ct(e,t){return t}function wt(e){return e?.getLocaleTextFunc()??Ct}function Tt(e,t,n,r){let i=t[n];return e.getLocaleTextFunc()(n,typeof i==`function`?i(r):i,r)}function Et(e){return(t,n,r)=>e({key:t,defaultValue:n,variableValues:r})}function Dt(e){return(t,n,r)=>{let i=e?.[t];if(i&&r?.length){let e=0;for(;!(e>=r.length||i.indexOf("${variable}")===-1);)i=i.replace("${variable}",r[e++])}return i??n}}var D=class{constructor(){this.destroyFunctions=[],this.destroyed=!1,this.__v_skip=!0,this.propertyListenerId=0,this.lastChangeSetIdLookup={},this.isAlive=()=>!this.destroyed}preWireBeans(e){this.beans=e,this.stubContext=e.context,this.eventSvc=e.eventSvc,this.gos=e.gos}destroy(){let{destroyFunctions:e}=this;for(let t=0;t<e.length;t++)e[t]();e.length=0,this.destroyed=!0,this.dispatchLocalEvent({type:`destroyed`})}addEventListener(e,t,r){this.localEventService||=new n,this.localEventService.addEventListener(e,t,r)}removeEventListener(e,t,n){this.localEventService?.removeEventListener(e,t,n)}dispatchLocalEvent(e){this.localEventService?.dispatchEvent(e)}addManagedElementListeners(e,t){return this._setupListeners(e,t)}addManagedEventListeners(e){return this._setupListeners(this.eventSvc,e)}addManagedListeners(e,t){return this._setupListeners(e,t)}_setupListeners(e,t){let n=[];for(let r of Object.keys(t)){let i=t[r];i&&n.push(this._setupListener(e,r,i))}return n}_setupListener(e,t,n){if(this.destroyed)return()=>null;let r;if(Ot(e))e.__addEventListener(t,n),r=()=>(e.__removeEventListener(t,n),null);else{let i=kt(e);e instanceof HTMLElement?mt(e,t,n):i?e.addListener(t,n):e.addEventListener(t,n),r=i?()=>(e.removeListener(t,n),null):()=>(e.removeEventListener(t,n),null)}return this.destroyFunctions.push(r),()=>(r(),this.destroyFunctions=this.destroyFunctions.filter(e=>e!==r),null)}setupPropertyListener(e,t){let{gos:n}=this;n.addPropertyEventListener(e,t);let r=()=>(n.removePropertyEventListener(e,t),null);return this.destroyFunctions.push(r),()=>(r(),this.destroyFunctions=this.destroyFunctions.filter(e=>e!==r),null)}addManagedPropertyListener(e,t){return this.destroyed?()=>null:this.setupPropertyListener(e,t)}addManagedPropertyListeners(e,t){if(this.destroyed)return;let n=e.join(`-`)+ this.propertyListenerId++,r=e=>{if(e.changeSet){if(e.changeSet&&e.changeSet.id===this.lastChangeSetIdLookup[n])return;this.lastChangeSetIdLookup[n]=e.changeSet.id}t({type:`propertyChanged`,changeSet:e.changeSet,source:e.source})};for(let t of e)this.setupPropertyListener(t,r)}getLocaleTextFunc(){return wt(this.beans.localeSvc)}addDestroyFunc(e){this.isAlive()?this.destroyFunctions.push(e):e()}createOptionalManagedBean(e,t){return e?this.createManagedBean(e,t):void 0}createManagedBean(e,t){let n=this.createBean(e,t);return this.addDestroyFunc(this.destroyBean.bind(this,e,t)),n}createBean(e,t,n){return(t||this.stubContext).createBean(e,n)}destroyBean(e,t){return(t||this.stubContext).destroyBean(e)}destroyBeans(e,t){return(t||this.stubContext).destroyBeans(e)}};function Ot(e){return e.__addEventListener!==void 0}function kt(e){return e.eventServiceType===`global`}var O=class extends D{},At=new Set,jt=(e,t)=>{At.has(t)||(At.add(t),e())};jt._set=At;var Mt={pending:!1,funcs:[]},Nt={pending:!1,funcs:[]};function Pt(e,t=`setTimeout`,n){let r=t===`raf`?Nt:Mt;if(r.funcs.push(e),r.pending)return;r.pending=!0;let i=()=>{let e=r.funcs.slice();r.funcs.length=0,r.pending=!1;for(let t of e)t()};t===`raf`?nt(n,i):window.setTimeout(i,0)}function k(e,t,n){let r;return function(...i){let a=this;return window.clearTimeout(r),r=window.setTimeout(function(){e.isAlive()&&t.apply(a,i)},n),r}}function Ft(e,t){let n=0;return function(...r){let i=this,a=Date.now();a-n<t||(n=a,e.apply(i,r))}}function It(e,t,n,r=100){let i=Date.now(),a=null,o=!1,s=()=>{a!=null&&(window.clearInterval(a),a=null)};e.addDestroyFunc(s);let c=()=>{let e=Date.now()-i>r;(t()||e)&&(n(),o=!0,s())};c(),o||(a=window.setInterval(c,10))}var Lt=new Set([`__proto__`,`constructor`,`prototype`]);function Rt(e,t){if(e!=null){if(Array.isArray(e)){for(let n=0;n<e.length;n++)t(n.toString(),e[n]);return}for(let n of Object.keys(e).filter(e=>!Lt.has(e)))t(n,e[n])}}function A(e,t,n=!0,r=!1){i(t)&&Rt(t,(t,i)=>{let a=e[t];a!==i&&(r&&a==null&&typeof i==`object`&&i&&i.constructor===Object&&(a={},e[t]=a),zt(i)&&zt(a)&&!Array.isArray(a)?A(a,i,n,r):(n||i!==void 0)&&(e[t]=i))})}function zt(e){return typeof e==`object`&&!!e}var Bt=class e{static applyGlobalGridOptions(t){if(!e.gridOptions)return{...t};let n={};return A(n,e.gridOptions,!0,!0),e.mergeStrategy===`deep`?A(n,t,!0,!0):n={...n,...t},e.gridOptions.context&&(n.context=e.gridOptions.context),t.context&&(e.mergeStrategy===`deep`&&n.context&&A(t.context,n.context,!0,!0),n.context=t.context),n}static applyGlobalGridOption(t,n){if(e.mergeStrategy===`deep`){let r=Ht(t);if(r&&typeof r==`object`&&typeof n==`object`)return e.applyGlobalGridOptions({[t]:n})[t]}return n}};Bt.gridOptions=void 0,Bt.mergeStrategy=`shallow`;var Vt=Bt;function Ht(e){return Vt.gridOptions?.[e]}var Ut={suppressContextMenu:!1,preventDefaultOnContextMenu:!1,allowContextMenuWithControlKey:!1,suppressMenuHide:!0,enableBrowserTooltips:!1,tooltipTrigger:`hover`,tooltipShowDelay:2e3,tooltipHideDelay:1e4,tooltipMouseTrack:!1,tooltipShowMode:`standard`,tooltipInteraction:!1,copyHeadersToClipboard:!1,copyGroupHeadersToClipboard:!1,clipboardDelimiter:` `,suppressCopyRowsToClipboard:!1,suppressCopySingleCellRanges:!1,suppressLastEmptyLineOnPaste:!1,suppressClipboardPaste:!1,suppressClipboardApi:!1,suppressCutToClipboard:!1,maintainColumnOrder:!1,enableStrictPivotColumnOrder:!1,suppressFieldDotNotation:!1,allowDragFromColumnsToolPanel:!1,suppressMovableColumns:!1,suppressColumnMoveAnimation:!1,suppressMoveWhenColumnDragging:!1,suppressDragLeaveHidesColumns:!1,suppressRowGroupHidesColumns:!1,suppressAutoSize:!1,autoSizePadding:20,skipHeaderOnAutoSize:!1,singleClickEdit:!1,suppressClickEdit:!1,readOnlyEdit:!1,stopEditingWhenCellsLoseFocus:!1,enterNavigatesVertically:!1,enterNavigatesVerticallyAfterEdit:!1,enableCellEditingOnBackspace:!1,undoRedoCellEditing:!1,undoRedoCellEditingLimit:10,suppressCsvExport:!1,suppressExcelExport:!1,cacheQuickFilter:!1,includeHiddenColumnsInQuickFilter:!1,excludeChildrenWhenTreeDataFiltering:!1,enableAdvancedFilter:!1,includeHiddenColumnsInAdvancedFilter:!1,enableCharts:!1,masterDetail:!1,keepDetailRows:!1,keepDetailRowsCount:10,detailRowAutoHeight:!1,tabIndex:0,rowBuffer:10,valueCache:!1,valueCacheNeverExpires:!1,enableCellExpressions:!1,suppressTouch:!1,suppressFocusAfterRefresh:!1,suppressBrowserResizeObserver:!1,suppressPropertyNamesCheck:!1,suppressChangeDetection:!1,debug:!1,suppressLoadingOverlay:!1,suppressNoRowsOverlay:!1,pagination:!1,paginationPageSize:100,paginationPageSizeSelector:!0,paginationAutoPageSize:!1,paginateChildRows:!1,suppressPaginationPanel:!1,pivotMode:!1,pivotPanelShow:`never`,pivotDefaultExpanded:0,pivotSuppressAutoColumn:!1,suppressExpandablePivotGroups:!1,functionsReadOnly:!1,suppressAggFuncInHeader:!1,alwaysAggregateAtRootLevel:!1,aggregateOnlyChangedColumns:!1,suppressAggFilteredOnly:!1,removePivotHeaderRowWhenSingleValueColumn:!1,animateRows:!0,cellFlashDuration:500,cellFadeDuration:1e3,allowShowChangeAfterFilter:!1,domLayout:`normal`,ensureDomOrder:!1,enableRtl:!1,suppressColumnVirtualisation:!1,suppressMaxRenderedRowRestriction:!1,suppressRowVirtualisation:!1,rowDragManaged:!1,refreshAfterGroupEdit:!1,rowDragInsertDelay:500,suppressRowDrag:!1,suppressMoveWhenRowDragging:!1,rowDragEntireRow:!1,rowDragMultiRow:!1,embedFullWidthRows:!1,groupDisplayType:`singleColumn`,groupDefaultExpanded:0,groupMaintainOrder:!1,groupSelectsChildren:!1,groupSuppressBlankHeader:!1,groupSelectsFiltered:!1,showOpenedGroup:!1,groupRemoveSingleChildren:!1,groupRemoveLowestSingleChildren:!1,groupHideOpenParents:!1,groupAllowUnbalanced:!1,rowGroupPanelShow:`never`,suppressMakeColumnVisibleAfterUnGroup:!1,treeData:!1,rowGroupPanelSuppressSort:!1,suppressGroupRowsSticky:!1,rowModelType:`clientSide`,asyncTransactionWaitMillis:50,suppressModelUpdateAfterUpdateTransaction:!1,cacheOverflowSize:1,infiniteInitialRowCount:1,serverSideInitialRowCount:1,cacheBlockSize:100,maxBlocksInCache:-1,maxConcurrentDatasourceRequests:2,blockLoadDebounceMillis:0,purgeClosedRowNodes:!1,serverSideSortAllLevels:!1,serverSideOnlyRefreshFilteredGroups:!1,serverSidePivotResultFieldSeparator:`_`,viewportRowModelPageSize:5,viewportRowModelBufferSize:5,alwaysShowHorizontalScroll:!1,alwaysShowVerticalScroll:!1,debounceVerticalScrollbar:!1,suppressHorizontalScroll:!1,suppressScrollOnNewData:!1,suppressScrollWhenPopupsAreOpen:!1,suppressAnimationFrame:!1,suppressMiddleClickScrolls:!1,suppressPreventDefaultOnMouseWheel:!1,rowMultiSelectWithClick:!1,suppressRowDeselection:!1,suppressRowClickSelection:!1,suppressCellFocus:!1,suppressHeaderFocus:!1,suppressMultiRangeSelection:!1,enableCellTextSelection:!1,enableRangeSelection:!1,enableRangeHandle:!1,enableFillHandle:!1,fillHandleDirection:`xy`,suppressClearOnFillReduction:!1,accentedSort:!1,unSortIcon:!1,suppressMultiSort:!1,alwaysMultiSort:!1,suppressMaintainUnsortedOrder:!1,suppressRowHoverHighlight:!1,suppressRowTransform:!1,columnHoverHighlight:!1,deltaSort:!1,enableGroupEdit:!1,groupLockGroupColumns:0,serverSideEnableClientSideSort:!1,suppressServerSideFullWidthLoadingRow:!1,pivotMaxGeneratedColumns:-1,columnMenu:`new`,reactiveCustomComponents:!0,suppressSetFilterByDefault:!1,enableFilterHandlers:!1},Wt=`https://www.ag-grid.com`;function Gt(e,t,...n){e.get(`debug`)&&console.log(`AG Grid: `+t,...n)}function Kt(e,...t){jt(()=>console.warn(`AG Grid: `+e,...t),e+t?.join(``))}function qt(e,...t){jt(()=>console.error(`AG Grid: `+e,...t),e+t?.join(``))}var Jt=new Set,Yt={},Xt={},Zt,Qt=!1,$t=!1,en=!1;function tn(e){let[t,n]=e.version.split(`.`)||[],[r,i]=Zt.split(`.`)||[];return t===r&&n===i}function nn(e){Zt||=e.version;let t=e=>`You are using incompatible versions of AG Grid modules. Major and minor versions should always match across modules. ${e} Please update all modules to the same version.`;e.version?tn(e)||qt(t(`'${e.moduleName}' is version ${e.version} but the other modules are version ${Zt}.`)):qt(t(`'${e.moduleName}' is incompatible.`));let n=e.validate?.();n&&!n.isValid&&qt(`${n.message}`)}function rn(e,t,n=!1){n||(Qt=!0),nn(e);let r=e.rowModels??[`all`];Jt.add(e);let i;t===void 0?i=Yt:($t=!0,Xt[t]===void 0&&(Xt[t]={}),i=Xt[t]);for(let t of r)i[t]===void 0&&(i[t]={}),i[t][e.moduleName]=e;if(e.dependsOn)for(let r of e.dependsOn)rn(r,t,n)}function an(e){delete Xt[e]}function on(e,t,n){let r=n=>!!Yt[n]?.[e]||!!Xt[t]?.[n]?.[e];return r(n)||r(`all`)}function sn(){return $t}function cn(e,t){let n=Xt[e]??{};return[...Object.values(Yt.all??{}),...Object.values(n.all??{}),...Object.values(Yt[t]??{}),...Object.values(n[t]??{})]}function ln(){return new Set(Jt)}function un(e,t){let n=Xt[e]??{};return[...Object.values(n.all??{}),...Object.values(n[t]??{})]}function dn(){return Qt}function fn(){return en}var pn=class{static register(e){rn(e,void 0)}static registerModules(e){for(let t of e)rn(t,void 0)}},j=`35.0.1`,mn=2e3,hn=100,gn=`_version_`,_n=null,vn=`${Wt}/javascript-data-grid`;function yn(e){_n=e}function bn(e){vn=e}function xn(e,t,n){return _n?.(e,t)??[kn(e,t,n)]}function Sn(e,t,n,r,i){e(`${r?`warning`:`error`} #${t}`,...xn(t,n,i))}function Cn(e){if(!e)return String(e);let t={};for(let n of Object.keys(e))typeof e[n]!=`object`&&typeof e[n]!=`function`&&(t[n]=e[n]);return JSON.stringify(t)}function wn(e){let t=e;return e instanceof Error?t=e.toString():typeof e==`object`&&(t=Cn(e)),t}function Tn(e){return e===void 0?`undefined`:e===null?`null`:e}function En(e,t){return`${e}?${t.toString()}`}function Dn(e,t,n){let r=Array.from(t.entries()).sort((e,t)=>t[1].length-e[1].length),i=En(e,t);for(let[a,o]of r){if(a===gn)continue;let r=i.length-n;if(r<=0)break;let s=r+3,c=o.length-s>hn?o.slice(0,o.length-s)+`...`:o.slice(0,hn)+`...`;t.set(a,c),i=En(e,t)}return i}function On(e,t){let n=new URLSearchParams;if(n.append(gn,j),t)for(let e of Object.keys(t))n.append(e,wn(t[e]));let r=`${vn}/errors/${e}`,i=En(r,n);return i.length<=mn?i:Dn(r,n,mn)}var kn=(e,t,n)=>{let r=On(e,t),i=`${n?n+`
|
|
3
3
|
`:``}Visit ${r}`;return fn()?i:`${i}${n?``:`
|
|
4
4
|
Alternatively register the ValidationModule to see the full message in the console.`}`};function M(...e){Sn(Kt,e[0],e[1],!0)}function N(...e){Sn(qt,e[0],e[1],!1)}function An(e,t,n){Sn(qt,e,t,!1,n)}function jn(e,t){let n=t[0];return`error #${n} `+xn(n,t[1],e).join(` `)}function Mn(...e){return jn(void 0,e)}function Nn(e,t){return e.get(`rowModelType`)===t}function P(e,t){return Nn(e,`clientSide`)}function Pn(e,t){return Nn(e,`serverSide`)}function F(e,t){return e.get(`domLayout`)===t}function Fn(e){return fr(e)!==void 0}function In(e){return typeof e.get(`getRowHeight`)==`function`}function Ln(e,t){return t?!e.get(`enableStrictPivotColumnOrder`):e.get(`maintainColumnOrder`)}function Rn({gos:e,formula:t}){let n=e.get(`rowNumbers`);return n||!!t?.active&&n!==!1}function zn(e,t,n=!1,r){let{gos:i,environment:a}=e;if(r??=a.getDefaultRowHeight(),In(i)){if(n)return{height:r,estimated:!0};let e={node:t,data:t.data},a=i.getCallback(`getRowHeight`)(e);if(Hn(a))return a===0&&M(23),{height:Math.max(1,a),estimated:!1}}if(t.detail&&i.get(`masterDetail`))return Bn(i);let o=i.get(`rowHeight`);return{height:o&&Hn(o)?o:r,estimated:!1}}function Bn(e){if(e.get(`detailRowAutoHeight`))return{height:1,estimated:!1};let t=e.get(`detailRowHeight`);return Hn(t)?{height:t,estimated:!1}:{height:300,estimated:!1}}function Vn(e){let{environment:t,gos:n}=e,r=n.get(`rowHeight`);if(!r||a(r))return t.getDefaultRowHeight();let i=t.refreshRowHeightVariable();return i===-1?(M(24),t.getDefaultRowHeight()):i}function Hn(e){return!isNaN(e)&&typeof e==`number`&&isFinite(e)}function Un(e,t,n){let r=t[e.getDomDataKey()];return r?r[n]:void 0}function Wn(e,t,n,r){let i=e.getDomDataKey(),o=t[i];a(o)&&(o={},t[i]=o),o[n]=r}function Gn(e){return e.get(`ensureDomOrder`)?!1:e.get(`animateRows`)}function Kn(e){return!(e.get(`paginateChildRows`)||e.get(`groupHideOpenParents`)||F(e,`print`))}function qn(e){return!e.get(`autoGroupColumnDef`)?.comparator&&!e.get(`treeData`)}function Jn(e){let t=e.get(`groupAggFiltering`);if(typeof t==`function`)return e.getCallback(`groupAggFiltering`);if(t===!0)return()=>!0}function Yn(e){return e.get(`grandTotalRow`)}function Xn(e,t){return t?!1:e.get(`groupDisplayType`)===`groupRows`}function Zn(e,t,n){return!!t.group&&!t.footer&&Xn(e,n)}function Qn(e){let t=e.getCallback(`getRowId`);return t===void 0?t:e=>{let n=t(e);return typeof n!=`string`&&(jt(()=>M(25,{id:n}),`getRowIdString`),n=String(n)),n}}function $n(e,t){let n=e.get(`groupHideParentOfSingleChild`);return!!(n===!0||n===`leafGroupsOnly`&&t.leafGroup||e.get(`groupRemoveSingleChildren`)||e.get(`groupRemoveLowestSingleChildren`)&&t.leafGroup)}function er(e){let t=e.get(`maxConcurrentDatasourceRequests`);return t>0?t:void 0}function tr(e){return e?.checkboxes??!0}function nr(e){return e?.mode===`multiRow`&&(e.headerCheckbox??!0)}function rr(e){if(typeof e==`object`)return e.checkboxLocation??`selectionColumn`}function ir(e){return e?.hideDisabledCheckboxes??!1}function ar(e){return typeof e.get(`rowSelection`)!=`string`}function or(e){let t=e.get(`cellSelection`);return t===void 0?e.get(`enableRangeSelection`):!!t}function sr(e){let t=e.get(`cellSelection`)??!1;return(typeof t==`object`&&t.enableColumnSelection)??!1}function cr(e){let t=e.get(`rowSelection`)??`single`;if(typeof t==`string`){let t=e.get(`suppressRowClickSelection`),n=e.get(`suppressRowDeselection`);return t&&n?!1:t?`enableDeselection`:n?`enableSelection`:!0}return t.mode===`singleRow`||t.mode===`multiRow`?t.enableClickSelection??!1:!1}function lr(e){let t=cr(e);return t===!0||t===`enableSelection`}function ur(e){let t=cr(e);return t===!0||t===`enableDeselection`}function dr(e){let t=e.get(`rowSelection`);return typeof t==`string`?e.get(`isRowSelectable`):t?.isRowSelectable}function fr(e){let t=`beanName`in e&&e.beanName===`gos`?e.get(`rowSelection`):e.rowSelection;if(typeof t==`string`)switch(t){case`multiple`:return`multiRow`;case`single`:return`singleRow`;default:return}switch(t?.mode){case`multiRow`:case`singleRow`:return t.mode;default:return}}function pr(e){return fr(e)===`multiRow`}function mr(e){let t=e.get(`rowSelection`);return typeof t==`string`?e.get(`rowMultiSelectWithClick`):t?.enableSelectionWithoutKeys??!1}function hr(e){let t=e.get(`rowSelection`);if(typeof t==`string`){let t=e.get(`groupSelectsChildren`),n=e.get(`groupSelectsFiltered`);return t&&n?`filteredDescendants`:t?`descendants`:`self`}return t?.mode===`multiRow`?t.groupSelects:void 0}function gr(e,t=!0){let n=e.get(`rowSelection`);return typeof n==`object`?n.mode===`multiRow`?n.selectAll:`all`:t?`all`:void 0}function _r(e){let t=e.get(`rowSelection`);return typeof t==`string`?!1:t?.mode===`multiRow`?t.ctrlASelectsRows??!1:!1}function vr(e){let t=hr(e);return t===`descendants`||t===`filteredDescendants`}function yr(e){let t=e.get(`rowSelection`);return typeof t==`object`&&t.masterSelects||`self`}function br(e){return e.isModuleRegistered(`SetFilter`)&&!e.get(`suppressSetFilterByDefault`)}function I(e){return e.get(`columnMenu`)===`legacy`}function xr(e){return!I(e)}function Sr(e){return!e||e.length<2?e:`on`+e[0].toUpperCase()+e.substring(1)}function Cr(e,t,n){typeof e!=`object`&&(e={});let r={...e};for(let e of n){let n=t[e];n!==void 0&&(r[e]=n)}return r}function wr(e,t){if(!e)return;let n={},r=!1;for(let t of Object.keys(e))n[t]=e[t],r=!0;if(!r)return;let i={type:`gridOptionsChanged`,options:n};t.dispatchEvent(i);let a={type:`componentStateChanged`,...n};t.dispatchEvent(a)}function L(e,t){return e.addCommon(t)}function Tr(e,t){return e[t]??e.gridOptions?.[t]??Ht(t)??Ut[t]}function Er({gos:e},t){return t.button===2||t.ctrlKey&&e.get(`allowContextMenuWithControlKey`)}var Dr={resizable:!0,sortable:!0},Or=0;function kr(){return Or++}function Ar(e){return e instanceof Nr}var jr=[`asc`,`desc`,null],Mr=[{type:`absolute`,direction:`asc`},{type:`absolute`,direction:`desc`},null],Nr=class extends O{constructor(e,t,r,i){super(),this.colDef=e,this.userProvidedColDef=t,this.colId=r,this.primary=i,this.isColumn=!0,this.instanceId=kr(),this.autoHeaderHeight=null,this.sortDef=Pr(),this._wasSortExplicitlyRemoved=!1,this.moving=!1,this.resizing=!1,this.menuVisible=!1,this.formulaRef=null,this.lastLeftPinned=!1,this.firstRightPinned=!1,this.filterActive=!1,this.colEventSvc=new n,this.tooltipEnabled=!1,this.rowGroupActive=!1,this.pivotActive=!1,this.aggregationActive=!1,this.flex=null,this.colIdSanitised=f(r)}destroy(){super.destroy(),this.beans.rowSpanSvc?.deregister(this)}getInstanceId(){return this.instanceId}initState(){let{colDef:e,beans:{sortSvc:t,pinnedCols:n,colFlex:r}}=this;t?.initCol(this);let i=e.hide;i===void 0?this.visible=!e.initialHide:this.visible=!i,n?.initCol(this),r?.initCol(this)}setColDef(e,t,n){let r=e.spanRows!==this.colDef.spanRows;this.colDef=e,this.userProvidedColDef=t,this.initMinAndMaxWidths(),this.initDotNotation(),this.initTooltip(),r&&(this.beans.rowSpanSvc?.deregister(this),this.initRowSpan()),this.dispatchColEvent(`colDefChanged`,n)}getUserProvidedColDef(){return this.userProvidedColDef}getParent(){return this.parent}getOriginalParent(){return this.originalParent}postConstruct(){this.initState(),this.initMinAndMaxWidths(),this.resetActualWidth(`gridInitializing`),this.initDotNotation(),this.initTooltip(),this.initRowSpan(),this.addPivotListener()}initDotNotation(){let{gos:e,colDef:{field:t,tooltipField:n}}=this,r=e.get(`suppressFieldDotNotation`);this.fieldContainsDots=i(t)&&t.includes(`.`)&&!r,this.tooltipFieldContainsDots=i(n)&&n.includes(`.`)&&!r}initMinAndMaxWidths(){let e=this.colDef;this.minWidth=e.minWidth??this.beans.environment.getDefaultColumnMinWidth(),this.maxWidth=e.maxWidth??2**53-1}initTooltip(){this.beans.tooltipSvc?.initCol(this)}initRowSpan(){this.colDef.spanRows&&this.beans.rowSpanSvc?.register(this)}addPivotListener(){let e=this.beans.pivotColDefSvc,t=this.colDef.pivotValueColumn;!e||!t||this.addManagedListeners(t,{colDefChanged:t=>{let n=e.recreateColDef(this.colDef);this.setColDef(n,n,t.source)}})}resetActualWidth(e){let t=this.calculateColInitialWidth(this.colDef);this.setActualWidth(t,e,!0)}calculateColInitialWidth(e){let t,n=e.width,r=e.initialWidth;return t=n??r??200,Math.max(Math.min(t,this.maxWidth),this.minWidth)}isEmptyGroup(){return!1}isRowGroupDisplayed(e){return this.beans.showRowGroupCols?.isRowGroupDisplayed(this,e)??!1}isPrimary(){return this.primary}isFilterAllowed(){return!!this.colDef.filter}isFieldContainsDots(){return this.fieldContainsDots}isTooltipEnabled(){return this.tooltipEnabled}isTooltipFieldContainsDots(){return this.tooltipFieldContainsDots}getHighlighted(){return this.highlighted}__addEventListener(e,t){this.colEventSvc.addEventListener(e,t)}__removeEventListener(e,t){this.colEventSvc.removeEventListener(e,t)}addEventListener(e,t){this.frameworkEventListenerService=this.beans.frameworkOverrides.createLocalEventListenerWrapper?.(this.frameworkEventListenerService,this.colEventSvc);let n=this.frameworkEventListenerService?.wrap(e,t)??t;this.colEventSvc.addEventListener(e,n)}removeEventListener(e,t){let n=this.frameworkEventListenerService?.unwrap(e,t)??t;this.colEventSvc.removeEventListener(e,n)}createColumnFunctionCallbackParams(e){return L(this.gos,{node:e,data:e.data,column:this,colDef:this.colDef})}isSuppressNavigable(e){return this.beans.cellNavigation?.isSuppressNavigable(this,e)??!1}isCellEditable(e){return this.beans.editSvc?.isCellEditable({rowNode:e,column:this})??!1}isSuppressFillHandle(){return!!this.colDef.suppressFillHandle}isAutoHeight(){return!!this.colDef.autoHeight}isAutoHeaderHeight(){return!!this.colDef.autoHeaderHeight}isRowDrag(e){return this.isColumnFunc(e,this.colDef.rowDrag)}isDndSource(e){return this.isColumnFunc(e,this.colDef.dndSource)}isCellCheckboxSelection(e){return this.beans.selectionSvc?.isCellCheckboxSelection(this,e)??!1}isSuppressPaste(e){return this.isColumnFunc(e,this.colDef?.suppressPaste??null)}isResizable(){return!!this.getColDefValue(`resizable`)}getColDefValue(e){return this.colDef[e]??Dr[e]}isColumnFunc(e,t){return typeof t==`boolean`?t:typeof t==`function`?t(this.createColumnFunctionCallbackParams(e)):!1}createColumnEvent(e,t){return L(this.gos,{type:e,column:this,columns:[this],source:t})}isMoving(){return this.moving}getSort(){return this.sortDef.direction}getSortDef(){return this.sortDef.direction?this.sortDef:null}getColDefAllowedSortTypes(){let e=[],{sort:t,initialSort:n}=this.colDef,r=t===null?t:Br(t?.type),i=n===null?n:Br(n?.type);return r&&e.push(r),i&&e.push(i),e}getSortingOrder(){let e=this.getColDefAllowedSortTypes().includes(`absolute`)?Mr:jr;return(this.colDef.sortingOrder??this.gos.get(`sortingOrder`)??e).map(e=>Pr(e))}getAvailableSortTypes(){let e=this.getSortingOrder().reduce((e,t)=>(t.direction&&e.push(t.type),e),this.getColDefAllowedSortTypes());return new Set(e)}get wasSortExplicitlyRemoved(){return this._wasSortExplicitlyRemoved}setSortDef(e,t=!1){t||(this._wasSortExplicitlyRemoved=!e.direction),this.sortDef=e}isSortable(){return!!this.getColDefValue(`sortable`)}isSortAscending(){return this.getSort()===`asc`}isSortDescending(){return this.getSort()===`desc`}isSortNone(){return a(this.getSort())}isSorting(){return i(this.getSort())}getSortIndex(){return this.sortIndex}isMenuVisible(){return this.menuVisible}getAggFunc(){return this.aggFunc}getLeft(){return this.left}getOldLeft(){return this.oldLeft}getRight(){return this.left+this.actualWidth}setLeft(e,t){this.oldLeft=this.left,this.left!==e&&(this.left=e,this.dispatchColEvent(`leftChanged`,t))}isFilterActive(){return this.filterActive}isHovered(){return M(261),!!this.beans.colHover?.isHovered(this)}setFirstRightPinned(e,t){this.firstRightPinned!==e&&(this.firstRightPinned=e,this.dispatchColEvent(`firstRightPinnedChanged`,t))}setLastLeftPinned(e,t){this.lastLeftPinned!==e&&(this.lastLeftPinned=e,this.dispatchColEvent(`lastLeftPinnedChanged`,t))}isFirstRightPinned(){return this.firstRightPinned}isLastLeftPinned(){return this.lastLeftPinned}isPinned(){return this.pinned===`left`||this.pinned===`right`}isPinnedLeft(){return this.pinned===`left`}isPinnedRight(){return this.pinned===`right`}getPinned(){return this.pinned}setVisible(e,t){let n=e===!0;this.visible!==n&&(this.visible=n,this.dispatchColEvent(`visibleChanged`,t)),this.dispatchStateUpdatedEvent(`hide`)}isVisible(){return this.visible}isSpanHeaderHeight(){return!this.getColDef().suppressSpanHeaderHeight}getFirstRealParent(){let e=this.getOriginalParent();for(;e?.isPadding();)e=e.getOriginalParent();return e}getColumnGroupPaddingInfo(){let e=this.getParent();if(!e?.isPadding())return{numberOfParents:0,isSpanningTotal:!1};let t=e.getPaddingLevel()+1,n=!0;for(;e;){if(!e.isPadding()){n=!1;break}e=e.getParent()}return{numberOfParents:t,isSpanningTotal:n}}getColDef(){return this.colDef}getDefinition(){return this.colDef}getColumnGroupShow(){return this.colDef.columnGroupShow}getColId(){return this.colId}getId(){return this.colId}getUniqueId(){return this.colId}getActualWidth(){return this.actualWidth}getAutoHeaderHeight(){return this.autoHeaderHeight}setAutoHeaderHeight(e){let t=e!==this.autoHeaderHeight;return this.autoHeaderHeight=e,t}createBaseColDefParams(e){return L(this.gos,{node:e,data:e.data,colDef:this.colDef,column:this})}getColSpan(e){if(a(this.colDef.colSpan))return 1;let t=this.createBaseColDefParams(e),n=this.colDef.colSpan(t);return Math.max(n,1)}getRowSpan(e){if(a(this.colDef.rowSpan))return 1;let t=this.createBaseColDefParams(e),n=this.colDef.rowSpan(t);return Math.max(n,1)}setActualWidth(e,t,n=!1){e=Math.max(e,this.minWidth),e=Math.min(e,this.maxWidth),this.actualWidth!==e&&(this.actualWidth=e,this.flex!=null&&t!==`flex`&&t!==`gridInitializing`&&(this.flex=null),n||this.fireColumnWidthChangedEvent(t)),this.dispatchStateUpdatedEvent(`width`)}fireColumnWidthChangedEvent(e){this.dispatchColEvent(`widthChanged`,e)}isGreaterThanMax(e){return e>this.maxWidth}getMinWidth(){return this.minWidth}getMaxWidth(){return this.maxWidth}getFlex(){return this.flex}isRowGroupActive(){return this.rowGroupActive}isPivotActive(){return this.pivotActive}isAnyFunctionActive(){return this.isPivotActive()||this.isRowGroupActive()||this.isValueActive()}isAnyFunctionAllowed(){return this.isAllowPivot()||this.isAllowRowGroup()||this.isAllowValue()}isValueActive(){return this.aggregationActive}isAllowPivot(){return this.colDef.enablePivot===!0}isAllowValue(){return this.colDef.enableValue===!0}isAllowRowGroup(){return this.colDef.enableRowGroup===!0}isAllowFormula(){return this.colDef.allowFormula===!0}dispatchColEvent(e,t,n){let r=this.createColumnEvent(e,t);n&&A(r,n),this.colEventSvc.dispatchEvent(r)}dispatchStateUpdatedEvent(e){this.colEventSvc.dispatchEvent({type:`columnStateUpdated`,key:e})}};function Pr(e){return Lr(e)?{direction:e.direction,type:e.type}:{direction:zr(e),type:Br(e)}}function Fr(e){return e===`asc`||e===`desc`||e===null}function Ir(e){return e===`default`||e===`absolute`}function Lr(e){if(!e||typeof e!=`object`)return!1;let t=e;return Ir(t.type)&&Fr(t.direction)}function Rr(e,t){return e?t?e.type===t.type&&e.direction===t.direction:e?e.direction===null:!0:t?t.direction===null:!0}function zr(e){return Fr(e)?e:null}function Br(e){return Ir(e)?e:`default`}function R(e){return e instanceof Vr}var Vr=class extends O{constructor(e,t,n,r){super(),this.colGroupDef=e,this.groupId=t,this.padding=n,this.level=r,this.isColumn=!1,this.expandable=!1,this.instanceId=kr(),this.expandableListenerRemoveCallback=null,this.expanded=!!e?.openByDefault}destroy(){this.expandableListenerRemoveCallback&&this.reset(null,void 0),super.destroy()}reset(e,t){this.colGroupDef=e,this.level=t,this.originalParent=null,this.expandableListenerRemoveCallback&&this.expandableListenerRemoveCallback(),this.children=void 0,this.expandable=void 0}getInstanceId(){return this.instanceId}getOriginalParent(){return this.originalParent}getLevel(){return this.level}isVisible(){return this.children?this.children.some(e=>e.isVisible()):!1}isPadding(){return this.padding}setExpanded(e){this.expanded=e===void 0?!1:e,this.dispatchLocalEvent({type:`expandedChanged`})}isExpandable(){return this.expandable}isExpanded(){return this.expanded}getGroupId(){return this.groupId}getId(){return this.getGroupId()}setChildren(e){this.children=e}getChildren(){return this.children}getColGroupDef(){return this.colGroupDef}getLeafColumns(){let e=[];return this.addLeafColumns(e),e}forEachLeafColumn(e){if(this.children)for(let t of this.children)Ar(t)?e(t):R(t)&&t.forEachLeafColumn(e)}addLeafColumns(e){if(this.children)for(let t of this.children)Ar(t)?e.push(t):R(t)&&t.addLeafColumns(e)}getColumnGroupShow(){let e=this.colGroupDef;if(e)return e.columnGroupShow}setupExpandable(){this.setExpandable(),this.expandableListenerRemoveCallback&&this.expandableListenerRemoveCallback();let e=this.onColumnVisibilityChanged.bind(this);for(let t of this.getLeafColumns())t.__addEventListener(`visibleChanged`,e);this.expandableListenerRemoveCallback=()=>{for(let t of this.getLeafColumns())t.__removeEventListener(`visibleChanged`,e);this.expandableListenerRemoveCallback=null}}setExpandable(){if(this.isPadding())return;let e=!1,t=!1,n=!1,r=this.findChildrenRemovingPadding();for(let i=0,a=r.length;i<a;i++){let a=r[i];if(!a.isVisible())continue;let o=a.getColumnGroupShow();o===`open`?(e=!0,n=!0):o===`closed`?(t=!0,n=!0):(e=!0,t=!0)}let i=e&&t&&n;this.expandable!==i&&(this.expandable=i,this.dispatchLocalEvent({type:`expandableChanged`}))}findChildrenRemovingPadding(){let e=[],t=n=>{for(let r of n)R(r)&&r.isPadding()?t(r.children):e.push(r)};return t(this.children),e}onColumnVisibilityChanged(){this.setExpandable()}},Hr={numericColumn:{headerClass:`ag-right-aligned-header`,cellClass:`ag-right-aligned-cell`},rightAligned:{headerClass:`ag-right-aligned-header`,cellClass:`ag-right-aligned-cell`}};function Ur(e,t,n){let r={},i=e.gos;return Object.assign(r,i.get(`defaultColGroupDef`)),Object.assign(r,t),i.validateColDef(r,n),r}var Wr=class{constructor(){this.existingKeys={}}addExistingKeys(e){for(let t=0;t<e.length;t++)this.existingKeys[e[t]]=!0}getUniqueKey(e,t){e=o(e);let n=0;for(;;){let r=e??t;if(r?n!==0&&(r+=`_`+n):r=n,!this.existingKeys[r]){let t=String(r);return e&&n>0&&M(273,{providedId:e,usedId:t}),this.existingKeys[t]=!0,t}n++}}};Object.freeze([]);function z(e){if(e?.length)return e[e.length-1]}function Gr(e,t,n){if(e===t)return!0;if(!e||!t)return e==null&&t==null;let r=e.length;if(r!==t.length)return!1;for(let i=0;i<r;i++)if(e[i]!==t[i]&&!n?.(e[i],t[i]))return!1;return!0}function Kr(e,t){if(e){for(let n of e)if(t(n))return!0}}function qr(e,t){let n=e.indexOf(t);n>=0&&e.splice(n,1)}function Jr(e,t,n){for(let n=0;n<t.length;n++)qr(e,t[n]);for(let r=t.length-1;r>=0;r--)e.splice(n,0,t[r])}var Yr=`ag-Grid-AutoColumn`,Xr=`ag-Grid-SelectionColumn`,Zr=`ag-Grid-RowNumbersColumn`;function Qr(e){let t=[],n=e=>{for(let r=0;r<e.length;r++){let i=e[r];Ar(i)?t.push(i):R(i)&&n(i.getChildren())}};return n(e),t}function $r(e){return e.reduce((e,t)=>e+t.getActualWidth(),0)}function ei(e,t,n){let r={};if(!t)return;Ti(null,t,e=>{r[e.getInstanceId()]=e}),n&&Ti(null,n,e=>{r[e.getInstanceId()]=null});let i=Object.values(r).filter(e=>e!=null);e.context.destroyBeans(i)}function ti(e){return e.getId().startsWith(Yr)}function ni(e){return(typeof e==`string`?e:`getColId`in e?e.getColId():e.colId)?.startsWith(Xr)??!1}function ri(e){return(typeof e==`string`?e:`getColId`in e?e.getColId():e.colId)?.startsWith(Zr)??!1}function ii(e){return ni(e)||ri(e)}function ai(e){let t=[];return e instanceof Array?t=e:typeof e==`string`&&(t=e.split(`,`)),t}function oi(e,t){return Gr(e,t,(e,t)=>e.getColId()===t.getColId())}function si(e){e.map={};for(let t of e.list)e.map[t.getId()]=t}function ci(e){return e===`optionsUpdated`?`gridOptionsChanged`:e}function li(e,t){let n=e===t,r=e.getColDef()===t,i=e.getColId()==t;return n||r||i}var ui=(e,t)=>(n,r)=>{let a={value1:void 0,value2:void 0},o=!1;return e&&(e[n]!==void 0&&(a.value1=e[n],o=!0),i(r)&&e[r]!==void 0&&(a.value2=e[r],o=!0)),!o&&t&&(t[n]!==void 0&&(a.value1=t[n]),i(r)&&t[r]!==void 0&&(a.value2=t[r])),a};function di(e,t){let n={...e,sort:void 0,colId:t},r=fi(e);return r&&(n.sort=r.direction,n.sortType=r.type),n}function fi(e){let{sort:t,initialSort:n}=e,r=Lr(t)||Fr(t),i=Lr(n)||Fr(n);return r?Pr(t):i?Pr(n):null}var pi=(e,t)=>{R(e)&&e.setupExpandable(),e.originalParent=t};function mi(e,t=null,n,r,i){let a=new Wr,{existingCols:o,existingGroups:s,existingColKeys:c}=hi(r);a.addExistingKeys(c);let l=gi(e,t,0,n,o,a,s,i),{colGroupSvc:u}=e,d=u?.findMaxDepth(l,0)??0,f=u?u.balanceColumnTree(l,0,d,a):l;return Ti(null,f,pi),{columnTree:f,treeDepth:d}}function hi(e){let t=[],n=[],r=[];return e&&Ti(null,e,e=>{if(R(e)){let t=e;n.push(t)}else{let n=e;r.push(n.getId()),t.push(n)}}),{existingCols:t,existingGroups:n,existingColKeys:r}}function gi(e,t,n,r,i,a,o,s){if(!t)return[];let{colGroupSvc:c}=e,l=Array(t.length);for(let u=0;u<l.length;u++){let d=t[u];c&&wi(d)?l[u]=c.createProvidedColumnGroup(r,d,n,i,a,o,s):l[u]=_i(e,r,d,i,a,s)}return l}function _i(e,t,n,r,i,a){let o=bi(n,r);o&&r?.splice(o.idx,1);let s=o?.column;if(s){let t=xi(e,n,s.getColId());s.setColDef(t,n,a),yi(e,s,t,a)}else{let r=i.getUniqueKey(n.colId,n.field);s=new Nr(xi(e,n,r),n,r,t),e.context.createBean(s)}return e.dataTypeSvc?.addColumnListeners(s),s}function vi(e,t,n,r,i,a,o,s){let{sortSvc:c,pinnedCols:l,colFlex:u}=e;n!==void 0&&t.setVisible(!n,s),c&&(c.updateColSort(t,r,s),i!==void 0&&c.setColSortIndex(t,i)),a!==void 0&&l?.setColPinned(t,a),o!==void 0&&u?.setColFlex(t,o)}function yi(e,t,n,r){vi(e,t,n.hide,n.sort,n.sortIndex,n.pinned,n.flex,r);let i=t.getFlex();if(!(i!=null&&i>0))if(n.width!=null)t.setActualWidth(n.width,r);else{let e=t.getActualWidth();t.setActualWidth(e,r)}}function bi(e,t){if(t)for(let n=0;n<t.length;n++){let r=t[n].getUserProvidedColDef();if(r){if(e.colId!=null){if(t[n].getId()===e.colId)return{idx:n,column:t[n]};continue}if(e.field!=null){if(r.field===e.field)return{idx:n,column:t[n]};continue}if(r===e)return{idx:n,column:t[n]}}}}function xi(e,t,n,r){let{gos:i,dataTypeSvc:a}=e,o={};A(o,i.get(`defaultColDef`),!1,!0);let s=Si(e,o,t,n);s&&Ci(e,s,o);let c=o.cellDataType;A(o,t,!1,!0),c!==void 0&&(o.cellDataType=c);let l=i.get(`autoGroupColumnDef`),u=qn(i);return t.rowGroup&&l&&u&&A(o,{sort:l.sort,initialSort:l.initialSort},!1,!0),a?.postProcess(o),a?.validateColDef(o),i.validateColDef(o,n,r),o}function Si(e,t,n,r){let i=e.dataTypeSvc?.updateColDefAndGetColumnType(t,n,r),a=n.type??i??t.type;return t.type=a,a?ai(a):void 0}function Ci(e,t,n){if(!t.length)return;let r=Object.assign({},Hr),i=e.gos.get(`columnTypes`)||{};for(let e of Object.keys(i)){let t=i[e];e in r?M(34,{key:e}):(t.type&&M(35),r[e]=t)}for(let e of t){let t=r[e.trim()];t?A(n,t,!1,!0):M(36,{t:e})}}function wi(e){return e.children!==void 0}function Ti(e,t,n){if(t)for(let r=0;r<t.length;r++){let i=t[r];R(i)&&Ti(i,i.getChildren(),n),n(i,e)}}function Ei(e,t){let n=[],r=[],i=[];return e.forEach(e=>{let t=e.getColDef().lockPosition;t===`right`?i.push(e):t===`left`||t===!0?n.push(e):r.push(e)}),t.get(`enableRtl`)?[...i,...r,...n]:[...n,...r,...i]}function Di(e,t){let n=!0;return Ti(null,t,t=>{if(!R(t))return;let r=t;if(!r.getColGroupDef()?.marryChildren)return;let i=[];for(let t of r.getLeafColumns()){let n=e.indexOf(t);i.push(n)}Math.max.apply(Math,i)-Math.min.apply(Math,i)>r.getLeafColumns().length-1&&(n=!1)}),n}function Oi(e,t){if(!e||e.length==0)return;let n=t(e[0]);for(let r=1;r<e.length;r++)if(n!==t(e[r]))return;return n}function ki(e,t,n){if(!t.length)return;let r=t.length===1?t[0]:null,i=Oi(t,e=>e.getPinned());e.dispatchEvent({type:`columnPinned`,pinned:i??null,columns:t,column:r,source:n})}function Ai(e,t,n){if(!t.length)return;let r=t.length===1?t[0]:null,i=Oi(t,e=>e.isVisible());e.dispatchEvent({type:`columnVisible`,visible:i,columns:t,column:r,source:n})}function ji(e,t,n,r){e.dispatchEvent({type:t,columns:n,column:n&&n.length==1?n[0]:null,source:r})}function Mi(e,t,n,r,i=null){t?.length&&e.dispatchEvent({type:`columnResized`,columns:t,column:t.length===1?t[0]:null,flexColumns:i,finished:n,source:r})}function Ni(e,t,n){let{colModel:r,rowGroupColsSvc:a,pivotColsSvc:o,autoColSvc:s,selectionColSvc:c,colAnimation:l,visibleCols:u,pivotResultCols:d,environment:f,valueColsSvc:p,eventSvc:m,gos:h}=e,g=r.getColDefCols()??[],_=c?.getColumns();if(!g.length&&!_?.length)return!1;if(t?.state&&!t.state.forEach)return M(32),!1;let v=(r,i,s,c,l)=>{if(!r)return;let u=ui(i,t.defaultState),d=u(`flex`).value1,m=u(`sort`).value1,h=u(`sortType`).value1,g=Fr(m)||Ir(h),_=Br(h),v=zr(m),y=g?{type:_,direction:v}:void 0;if(vi(e,r,u(`hide`).value1,y,u(`sortIndex`).value1,u(`pinned`).value1,d,n),d==null){let e=u(`width`).value1;if(e!=null){let t=r.getColDef().minWidth??f.getDefaultColumnMinWidth();t!=null&&e>=t&&r.setActualWidth(e,n)}}l||!r.isPrimary()||(p?.syncColumnWithState(r,n,u),a?.syncColumnWithState(r,n,u,s),o?.syncColumnWithState(r,n,u,c))},y=(i,l,d)=>{let f=Fi(e,n),p=l.slice(),g={},_={},y=[],ee=[],b=[],x=0,S=a?.columns.slice()??[],te=o?.columns.slice()??[];for(let e of i){let t=e.colId;if(t.startsWith(Yr)){y.push(e),b.push(e);continue}if(ni(t)){ee.push(e),b.push(e);continue}let n=d(t);n?(v(n,e,g,_,!1),qr(p,n)):(b.push(e),x+=1)}let ne=e=>v(e,null,g,_,!1);p.forEach(ne),a?.sortColumns(Vi.bind(a,g,S)),o?.sortColumns(Vi.bind(o,_,te)),r.refreshCols(!1,n);let C=(e,t,n=[])=>{for(let r of t){let t=e(r.colId);qr(n,t),v(t,r,null,null,!0)}n.forEach(ne)};return C(e=>s?.getColumn(e)??null,y,s?.getColumns()?.slice()),C(e=>c?.getColumn(e)??null,ee,c?.getColumns()?.slice()),Ri(t,r,h),u.refresh(n),m.dispatchEvent({type:`columnEverythingChanged`,source:n}),f(),{unmatchedAndAutoStates:b,unmatchedCount:x}};l?.start();let{unmatchedAndAutoStates:ee,unmatchedCount:b}=y(t.state||[],g,e=>r.getColDefCol(e));return(ee.length>0||i(t.defaultState))&&(b=y(ee,d?.getPivotResultCols()?.list??[],e=>d?.getPivotResultCol(e)??null).unmatchedCount),l?.finish(),b===0}function Pi(e,t){let{colModel:n,autoColSvc:r,selectionColSvc:i,eventSvc:o,gos:s}=e,c=n.getColDefCols();if(!c?.length)return;let l=Qr(n.getColDefColTree()),u=[],d=1e3,f=1e3,p=e=>{let t=Li(e);a(t.rowGroupIndex)&&t.rowGroup&&(t.rowGroupIndex=d++),a(t.pivotIndex)&&t.pivot&&(t.pivotIndex=f++),u.push(t)};r?.getColumns()?.forEach(p),i?.getColumns()?.forEach(p),l?.forEach(p),Ni(e,{state:u},t);let m=r?.getColumns()??[];Ni(e,{state:[...i?.getColumns()??[],...m,...c].map(e=>({colId:e.colId})),applyOrder:!0},t),o.dispatchEvent(L(s,{type:`columnsReset`,source:t}))}function Fi(e,t){let{rowGroupColsSvc:n,pivotColsSvc:r,valueColsSvc:i,colModel:a,sortSvc:o,eventSvc:s}=e,c={rowGroupColumns:n?.columns.slice()??[],pivotColumns:r?.columns.slice()??[],valueColumns:i?.columns.slice()??[]},l=Ii(e),u={};for(let e of l)u[e.colId]=e;return()=>{let i=(e,n,r,i)=>{if(Gr(n.map(i),r.map(i)))return;let a=new Set(n);for(let e of r)a.delete(e)||a.add(e);let o=[...a];s.dispatchEvent({type:e,columns:o,column:o.length===1?o[0]:null,source:t})},d=e=>{let t=[];return a.forAllCols(n=>{let r=u[n.getColId()];r&&e(r,n)&&t.push(n)}),t},f=e=>e.getColId();i(`columnRowGroupChanged`,c.rowGroupColumns,n?.columns??[],f),i(`columnPivotChanged`,c.pivotColumns,r?.columns??[],f);let p=d((e,t)=>{let n=e.aggFunc!=null,r=n!=t.isValueActive(),i=n&&e.aggFunc!=t.getAggFunc();return r||i});p.length>0&&ji(s,`columnValueChanged`,p,t),Mi(s,d((e,t)=>e.width!=t.getActualWidth()),!0,t),ki(s,d((e,t)=>e.pinned!=t.getPinned()),t),Ai(s,d((e,t)=>e.hide==t.isVisible()),t);let m=d((e,t)=>!Rr(t.getSortDef(),{type:Br(e.sortType),direction:zr(e.sort)})||e.sortIndex!=t.getSortIndex());m.length>0&&o?.dispatchSortChangedEvents(t,m),Bi(l,Ii(e),t,a,s)}}function Ii(e){let{colModel:t,rowGroupColsSvc:n,pivotColsSvc:r}=e;if(a(t.getColDefCols())||!t.isAlive())return[];let i=n?.columns,o=r?.columns,s=[],c=e=>{let t=e.isRowGroupActive()&&i?i.indexOf(e):null,n=e.isPivotActive()&&o?o.indexOf(e):null,r=e.isValueActive()?e.getAggFunc():null,a=e.getSortIndex()==null?null:e.getSortIndex();s.push({colId:e.getColId(),width:e.getActualWidth(),hide:!e.isVisible(),pinned:e.getPinned(),sort:e.getSort(),sortType:e.getSortDef()?.type,sortIndex:a,aggFunc:r,rowGroup:e.isRowGroupActive(),rowGroupIndex:t,pivot:e.isPivotActive(),pivotIndex:n,flex:e.getFlex()??null})};t.forAllCols(e=>c(e));let l=new Map(t.getCols().map((e,t)=>[e.getColId(),t]));return s.sort((e,t)=>(l.has(e.colId)?l.get(e.colId):-1)-(l.has(t.colId)?l.get(t.colId):-1)),s}function Li(e){let t=(e,t)=>e??t??null,n=e.getColDef(),r=Pr(t(n.sort,n.initialSort)),i=r.direction,a=r.type,o=t(n.sortIndex,n.initialSortIndex),s=t(n.hide,n.initialHide),c=t(n.pinned,n.initialPinned),l=t(n.width,n.initialWidth),u=t(n.flex,n.initialFlex),d=t(n.rowGroupIndex,n.initialRowGroupIndex),f=t(n.rowGroup,n.initialRowGroup);d==null&&!f&&(d=null,f=null);let p=t(n.pivotIndex,n.initialPivotIndex),m=t(n.pivot,n.initialPivot);p==null&&!m&&(p=null,m=null);let h=t(n.aggFunc,n.initialAggFunc);return{colId:e.getColId(),sort:i,sortType:a,sortIndex:o,hide:s,pinned:c,width:l,flex:u,rowGroup:f,rowGroupIndex:d,pivot:m,pivotIndex:p,aggFunc:h}}function Ri(e,t,n){if(!e.applyOrder||!e.state)return;let r=[];for(let t of e.state)t.colId!=null&&r.push(t.colId);zi(t.cols,r,t,n)}function zi(e,t,n,r){if(e==null)return;let i=[],a={};for(let n of t){if(a[n])continue;let t=e.map[n];t&&(i.push(t),a[n]=!0)}let o=0;for(let t of e.list){let e=t.getColId();a[e]??(e.startsWith(Yr)?i.splice(o++,0,t):i.push(t))}if(i=Ei(i,r),!Di(i,n.getColTree())){M(39);return}e.list=i}function Bi(e,t,n,r,i){let a={};for(let e of t)a[e.colId]=e;let o={};for(let t of e)a[t.colId]&&(o[t.colId]=!0);let s=e.filter(e=>o[e.colId]),c=t.filter(e=>o[e.colId]),l=[];c.forEach((e,t)=>{let n=s?.[t];if(n&&n.colId!==e.colId){let e=r.getCol(n.colId);e&&l.push(e)}}),l.length&&i.dispatchEvent({type:`columnMoved`,columns:l,column:l.length===1?l[0]:null,finished:!0,source:n})}var Vi=(e,t,n,r)=>{let i=e[n.getId()],a=e[r.getId()],o=i!=null,s=a!=null;if(o&&s)return i-a;if(o)return-1;if(s)return 1;let c=t.indexOf(n),l=t.indexOf(r),u=c>=0;return u&&l>=0?c-l:u?-1:1},Hi=class extends O{constructor(){super(...arguments),this.beanName=`colModel`,this.pivotMode=!1,this.ready=!1,this.changeEventsDispatching=!1}postConstruct(){this.pivotMode=this.gos.get(`pivotMode`),this.addManagedPropertyListeners([`groupDisplayType`,`treeData`,`treeDataDisplayType`,`groupHideOpenParents`,`rowNumbers`,`hidePaddedHeaderRows`],e=>this.refreshAll(ci(e.source))),this.addManagedPropertyListeners([`defaultColDef`,`defaultColGroupDef`,`columnTypes`,`suppressFieldDotNotation`],this.recreateColumnDefs.bind(this)),this.addManagedPropertyListener(`pivotMode`,e=>this.setPivotMode(this.gos.get(`pivotMode`),ci(e.source)))}createColsFromColDefs(e){let{beans:t}=this,{valueCache:n,colAutosize:r,rowGroupColsSvc:i,pivotColsSvc:a,valueColsSvc:o,visibleCols:s,eventSvc:c,groupHierarchyColSvc:l}=t,u=this.colDefs?Fi(t,e):void 0;n?.expire();let d=this.colDefCols?.list,f=this.colDefCols?.tree,p=mi(t,this.colDefs,!0,f,e);ei(t,this.colDefCols?.tree,p.columnTree);let m=p.columnTree,h=p.treeDepth,g=Qr(m),_={};for(let e of g)_[e.getId()]=e;this.colDefCols={tree:m,treeDepth:h,list:g,map:_},this.createColumnsForService([l],this.colDefCols,e),i?.extractCols(e,d),a?.extractCols(e,d),o?.extractCols(e,d),this.ready=!0,this.changeEventsDispatching=!0,this.refreshCols(!0,e),this.changeEventsDispatching=!1,s.refresh(e),c.dispatchEvent({type:`columnEverythingChanged`,source:e}),u&&(this.changeEventsDispatching=!0,u(),this.changeEventsDispatching=!1),c.dispatchEvent({type:`newColumnsLoaded`,source:e}),e===`gridInitializing`&&r?.applyAutosizeStrategy()}refreshCols(e,t){if(!this.colDefCols)return;let n=this.cols?.tree;this.saveColOrder();let{autoColSvc:r,selectionColSvc:i,rowNumbersSvc:a,quickFilter:o,pivotResultCols:s,showRowGroupCols:c,rowAutoHeight:l,visibleCols:u,colViewport:d,eventSvc:f,formula:p}=this.beans,m=this.selectCols(s,this.colDefCols);p?.setFormulasActive(m),this.createColumnsForService([r,i,a],m,t);let h=Ln(this.gos,this.showingPivotResult);(!e||h)&&this.restoreColOrder(m),this.positionLockedCols(m),c?.refresh(),o?.refreshCols(),this.setColSpanActive(),l?.setAutoHeightActive(m),u.clear(),d.clear(),Gr(n,this.cols.tree)||f.dispatchEvent({type:`gridColumnsChanged`})}createColumnsForService(e,t,n){for(let r of e)r&&(r.createColumns(t,e=>{this.lastOrder=e(this.lastOrder),this.lastPivotOrder=e(this.lastPivotOrder)},n),r.addColumns(t))}selectCols(e,t){let n=e?.getPivotResultCols()??null;this.showingPivotResult=n!=null;let{map:r,list:i,tree:a,treeDepth:o}=n??t;return this.cols={list:i.slice(),map:{...r},tree:a.slice(),treeDepth:o},n&&(n.list.some(e=>this.cols?.map[e.getColId()]!==void 0)||(this.lastPivotOrder=null)),this.cols}getColsToShow(){if(!this.cols)return[];let{beans:e,showingPivotResult:t,cols:n}=this,{valueColsSvc:r,selectionColSvc:i}=e,a=this.isPivotMode()&&!t,o=i?.isSelectionColumnEnabled(),s=Rn(e),c=r?.columns;return n.list.filter(e=>{let t=ti(e);if(a){let n=c?.includes(e);return t||n||o&&ni(e)||s&&ri(e)}else return t||e.isVisible()})}refreshAll(e){this.ready&&(this.refreshCols(!1,e),this.beans.visibleCols.refresh(e))}setColsVisible(e,t=!1,n){Ni(this.beans,{state:e.map(e=>({colId:typeof e==`string`?e:e.getColId(),hide:!t}))},n)}restoreColOrder(e){let t=this.showingPivotResult?this.lastPivotOrder:this.lastOrder;if(!t)return;let n=t.filter(t=>e.map[t.getId()]!=null);if(n.length===0)return;if(n.length===e.list.length){e.list=n;return}let r=e=>{let t=e.getOriginalParent();return t?t.getChildren().length>1?!0:r(t):!1};if(!n.some(e=>r(e))){let t=new Set(n);for(let r of e.list)t.has(r)||n.push(r);e.list=n;return}let i=new Map;for(let e=0;e<n.length;e++){let t=n[e];i.set(t,e)}let a=e.list.filter(e=>!i.has(e));if(a.length===0){e.list=n;return}let o=(e,t)=>{let n=t?t.getOriginalParent():e.getOriginalParent();if(!n)return null;let r=null,a=null;for(let o of n.getChildren())if(!(o===t||o===e)){if(o instanceof Nr){let e=i.get(o);if(e==null)continue;(r==null||r<e)&&(r=e,a=o);continue}o.forEachLeafColumn(e=>{let t=i.get(e);t!=null&&(r==null||r<t)&&(r=t,a=e)})}return a??o(e,n)},s=[],c=new Map;for(let e of a){let t=o(e,null);if(t==null){s.push(e);continue}let n=c.get(t);n===void 0?c.set(t,e):Array.isArray(n)?n.push(e):c.set(t,[n,e])}let l=Array(e.list.length),u=l.length-1;for(let e=s.length-1;e>=0;e--)l[u--]=s[e];for(let e=n.length-1;e>=0;e--){let t=n[e],r=c.get(t);if(r)if(Array.isArray(r))for(let e=r.length-1;e>=0;e--){let t=r[e];l[u--]=t}else l[u--]=r;l[u--]=t}e.list=l}positionLockedCols(e){e.list=Ei(e.list,this.gos)}saveColOrder(){this.showingPivotResult?this.lastPivotOrder=this.cols?.list??null:this.lastOrder=this.cols?.list??null}getColumnDefs(e){return this.colDefCols&&this.beans.colDefFactory?.getColumnDefs(this.colDefCols.list,this.showingPivotResult,this.lastOrder,this.cols?.list??[],e)}setColSpanActive(){this.colSpanActive=!!this.cols?.list.some(e=>e.getColDef().colSpan!=null)}isPivotMode(){return this.pivotMode}setPivotMode(e,t){if(e===this.pivotMode||(this.pivotMode=e,!this.ready))return;this.refreshCols(!1,t);let{visibleCols:n,eventSvc:r}=this.beans;n.refresh(t),r.dispatchEvent({type:`columnPivotModeChanged`})}isPivotActive(){let e=this.beans.pivotColsSvc?.columns;return this.pivotMode&&!!e?.length}recreateColumnDefs(e){if(!this.cols)return;this.beans.autoColSvc?.updateColumns(e);let t=ci(e.source);this.createColsFromColDefs(t)}setColumnDefs(e,t){this.colDefs=e,this.createColsFromColDefs(t)}destroy(){ei(this.beans,this.colDefCols?.tree),super.destroy()}getColTree(){return this.cols?.tree??[]}getColDefColTree(){return this.colDefCols?.tree??[]}getColDefCols(){return this.colDefCols?.list??null}getCols(){return this.cols?.list??[]}forAllCols(e){let{pivotResultCols:t,autoColSvc:n,selectionColSvc:r,groupHierarchyColSvc:i}=this.beans;Kr(this.colDefCols?.list,e)||Kr(n?.columns?.list,e)||Kr(r?.columns?.list,e)||Kr(i?.columns?.list,e)||Kr(t?.getPivotResultCols()?.list,e)}getColsForKeys(e){return e?e.map(e=>this.getCol(e)).filter(e=>e!=null):[]}getColDefCol(e){return this.colDefCols?.list?this.getColFromCollection(e,this.colDefCols):null}getCol(e){return e==null?null:this.getColFromCollection(e,this.cols)}getColById(e){return this.cols?.map[e]??null}getColFromCollection(e,t){if(t==null)return null;let{map:n,list:r}=t;if(typeof e==`string`&&n[e])return n[e];for(let t=0;t<r.length;t++)if(li(r[t],e))return r[t];let{autoColSvc:i,selectionColSvc:a,groupHierarchyColSvc:o}=this.beans;return i?.getColumn(e)??a?.getColumn(e)??o?.getColumn(e)??null}},Ui=class{constructor(){this.existingIds={}}getInstanceIdForKey(e){let t=this.existingIds[e],n;return n=typeof t==`number`?t+1:0,this.existingIds[e]=n,n}},Wi=class extends O{};function Gi(e,t,n){return n&&e.addDestroyFunc(()=>t.destroyBean(n)),n??e}var B=null;function Ki(e){return typeof e?.getGui==`function`}var qi=class{constructor(e){this.cssClassStates={},this.getGui=e}toggleCss(e,t){if(e){if(e.includes(` `)){let n=(e||``).split(` `);if(n.length>1){for(let e of n)this.toggleCss(e,t);return}}this.cssClassStates[e]!==t&&e.length&&(this.getGui()?.classList.toggle(e,t),this.cssClassStates[e]=t)}}},Ji=0,Yi=class extends D{constructor(e,t){super(),this.suppressDataRefValidation=!1,this.displayed=!0,this.visible=!0,this.compId=Ji++,this.cssManager=new qi(()=>this.eGui),this.componentSelectors=new Map((t??[]).map(e=>[e.selector,e])),e&&this.setTemplate(e)}preConstruct(){this.wireTemplate(this.getGui());let e=`component-`+Object.getPrototypeOf(this)?.constructor?.name;for(let t of this.css??[])this.beans.environment.addGlobalCSS(t,e)}wireTemplate(e,t){e&&this.gos&&(this.applyElementsToComponent(e),this.createChildComponentsFromTags(e,t))}getCompId(){return this.compId}getDataRefAttribute(e){return e.getAttribute?e.getAttribute(rt):null}applyElementsToComponent(e,t,n,r=null){if(t===void 0&&(t=this.getDataRefAttribute(e)),t){let i=this[t];if(i===B)this[t]=r??e;else{let e=n?.[t];if(!this.suppressDataRefValidation&&!e)throw Error(`data-ref: ${t} on ${this.constructor.name} with ${i}`)}}}createChildComponentsFromTags(e,t){let n=[];for(let t of e.childNodes??[])n.push(t);for(let r of n){if(!(r instanceof HTMLElement))continue;let n=this.createComponentFromElement(r,e=>{let t=e.getGui();if(t)for(let e of r.attributes??[])t.setAttribute(e.name,e.value)},t);if(n){if(n.addItems&&r.children.length){this.createChildComponentsFromTags(r,t);let e=Array.prototype.slice.call(r.children);n.addItems(e)}this.swapComponentForNode(n,e,r)}else r.childNodes&&this.createChildComponentsFromTags(r,t)}}createComponentFromElement(e,t,n){let r=e.nodeName,i=this.getDataRefAttribute(e),a=r.indexOf(`AG-`)===0,o=a?this.componentSelectors.get(r):null,s=null;if(o){let e=n&&i?n[i]:void 0;s=new o.component(e),s.setParentComponent(this),this.createBean(s,null,t)}else if(a)throw Error(`selector: ${r}`);return this.applyElementsToComponent(e,i,n,s),s}swapComponentForNode(e,t,n){let r=e.getGui();t.replaceChild(r,n),t.insertBefore(document.createComment(n.nodeName),r),this.addDestroyFunc(this.destroyBean.bind(this,e))}activateTabIndex(e,t){let n=t??this.gos.get(`tabIndex`);e||=[],e.length||e.push(this.getGui());for(let t of e)t.setAttribute(`tabindex`,n.toString())}setTemplate(e,t,n){let r;r=typeof e==`string`||e==null?Ke(e):ot(e),this.setTemplateFromElement(r,t,n)}setTemplateFromElement(e,t,n,r=!1){if(this.eGui=e,this.suppressDataRefValidation=r,t)for(let e=0;e<t.length;e++){let n=t[e];this.componentSelectors.set(n.selector,n)}this.wireTemplate(e,n)}getGui(){return this.eGui}getFocusableElement(){return this.eGui}getAriaElement(){return this.getFocusableElement()}setParentComponent(e){this.parentComponent=e}getParentComponent(){return this.parentComponent}setGui(e){this.eGui=e}queryForHtmlElement(e){return this.eGui.querySelector(e)}getContainerAndElement(e,t){let n=t;return e==null?null:(n||=this.eGui,et(e)?{element:e,parent:n}:{element:e.getGui(),parent:n})}prependChild(e,t){let{element:n,parent:r}=this.getContainerAndElement(e,t)||{};!n||!r||r.insertAdjacentElement(`afterbegin`,n)}appendChild(e,t){let{element:n,parent:r}=this.getContainerAndElement(e,t)||{};!n||!r||r.appendChild(n)}isDisplayed(){return this.displayed}setVisible(e,t={}){if(e!==this.visible){this.visible=e;let{skipAriaHidden:n}=t;Me(this.eGui,e,{skipAriaHidden:n})}}setDisplayed(e,t={}){if(e!==this.displayed){this.displayed=e;let{skipAriaHidden:n}=t;w(this.eGui,e,{skipAriaHidden:n});let r={type:`displayChanged`,visible:this.displayed};this.dispatchLocalEvent(r)}}destroy(){this.parentComponent&&=void 0,super.destroy()}addGuiEventListener(e,t,n){this.eGui.addEventListener(e,t,n),this.addDestroyFunc(()=>this.eGui.removeEventListener(e,t))}addCss(e){this.cssManager.toggleCss(e,!0)}removeCss(e){this.cssManager.toggleCss(e,!1)}toggleCss(e,t){this.cssManager.toggleCss(e,t)}registerCSS(e){this.css||=[],this.css.push(e)}},V=class extends Yi{};function Xi(e){return typeof e==`object`&&!!e.component}function Zi(e,t){return new H(n=>{n(window.setInterval(e,t))})}var H=class e{constructor(e){this.status=0,this.resolution=null,this.waiters=[],e(e=>this.onDone(e),e=>this.onReject(e))}static all(t){return t.length?new e(e=>{let n=t.length,r=Array(n);t.forEach((t,i)=>{t.then(t=>{r[i]=t,n--,n===0&&e(r)})})}):e.resolve()}static resolve(t=null){return new e(e=>e(t))}then(t){return new e(e=>{this.status===1?e(t(this.resolution)):this.waiters.push(n=>e(t(n)))})}onDone(e){this.status=1,this.resolution=e;for(let t of this.waiters)t(e)}onReject(e){}};function Qi(e){return e?e.prototype&&`getGui`in e.prototype:!1}function $i(e,t,n,r){let{name:i}=n,a,o,s,c,l,u;if(t){let n=t,d=n[i+`Selector`],f=d?d(r):null,p=t=>{typeof t==`string`?a=t:t!=null&&t!==!0&&(e.isFrameworkComponent(t)?s=t:o=t)};f?(p(f.component),c=f.params,l=f.popup,u=f.popupPosition):p(n[i])}return{compName:a,jsComp:o,fwComp:s,paramsFromSelector:c,popupFromSelector:l,popupPositionFromSelector:u}}var ea=class extends O{constructor(){super(...arguments),this.beanName=`userCompFactory`}wireBeans(e){this.agCompUtils=e.agCompUtils,this.registry=e.registry,this.frameworkCompWrapper=e.frameworkCompWrapper,this.gridOptions=e.gridOptions}getCompDetailsFromGridOptions(e,t,n,r=!1){return this.getCompDetails(this.gridOptions,e,t,n,r)}getCompDetails(e,t,n,r,i=!1){let{name:a,cellRenderer:o}=t,{compName:s,jsComp:c,fwComp:l,paramsFromSelector:u,popupFromSelector:d,popupPositionFromSelector:f}=$i(this.beans.frameworkOverrides,e,t,r),p,m,h=e=>{let t=this.registry.getUserComponent(a,e);t&&(c=t.componentFromFramework?void 0:t.component,l=t.componentFromFramework?t.component:void 0,p=t.params,m=t.processParams)};if(s!=null&&h(s),c==null&&l==null&&n!=null&&h(n),c&&o&&!Qi(c)&&(c=this.agCompUtils?.adaptFunction(t,c)),!c&&!l){let{validation:e}=this.beans;i&&(s!==n||!n)?s?e?.isProvidedUserComp(s)||N(50,{compName:s}):n?e||N(260,{...this.gos.getModuleErrorParams(),propName:a,compName:n}):N(216,{name:a}):n&&!e&&N(146,{comp:n});return}let g=this.mergeParams(e,t,r,u,p,m),_=c==null,v=c??l;return{componentFromFramework:_,componentClass:v,params:g,type:t,popupFromSelector:d,popupPositionFromSelector:f,newAgStackInstance:()=>this.newAgStackInstance(v,_,g,t)}}newAgStackInstance(e,t,n,r){let i=!t,a;a=i?new e:this.frameworkCompWrapper.wrap(e,r.mandatoryMethods,r.optionalMethods,r),this.createBean(a);let o=a.init?.(n);return o==null?H.resolve(a):o.then(()=>a)}mergeParams(e,t,n,r=null,i,a){let o={...n,...i},s=e?.[t.name+`Params`];return typeof s==`function`?A(o,s(n)):typeof s==`object`&&A(o,s),A(o,r),a?a(o):o}},ta={name:`dateComponent`,mandatoryMethods:[`getDate`,`setDate`],optionalMethods:[`afterGuiAttached`,`setInputPlaceholder`,`setInputAriaLabel`,`setDisabled`,`refresh`]},na={name:`dragAndDropImageComponent`,mandatoryMethods:[`setIcon`,`setLabel`]},ra={name:`headerComponent`,optionalMethods:[`refresh`]},ia={name:`innerHeaderComponent`},aa={name:`innerHeaderGroupComponent`},oa={name:`headerGroupComponent`},sa={name:`cellRenderer`,optionalMethods:[`refresh`,`afterGuiAttached`],cellRenderer:!0},ca={name:`loadingCellRenderer`,cellRenderer:!0},la={name:`cellEditor`,mandatoryMethods:[`getValue`],optionalMethods:[`isPopup`,`isCancelBeforeStart`,`isCancelAfterEnd`,`getPopupPosition`,`focusIn`,`focusOut`,`afterGuiAttached`,`refresh`]},ua={name:`tooltipComponent`},da={name:`filter`,mandatoryMethods:[`isFilterActive`,`doesFilterPass`,`getModel`,`setModel`],optionalMethods:[`afterGuiAttached`,`afterGuiDetached`,`onNewRowsLoaded`,`getModelAsString`,`onFloatingFilterChanged`,`onAnyFilterChanged`,`refresh`]},fa={name:`floatingFilterComponent`,mandatoryMethods:[`onParentModelChanged`],optionalMethods:[`afterGuiAttached`,`refresh`]},pa={name:`fullWidthCellRenderer`,optionalMethods:[`refresh`,`afterGuiAttached`],cellRenderer:!0},ma={name:`loadingCellRenderer`,cellRenderer:!0},ha={name:`groupRowRenderer`,optionalMethods:[`afterGuiAttached`],cellRenderer:!0},ga={name:`detailCellRenderer`,optionalMethods:[`refresh`],cellRenderer:!0};function _a(e,t){return e.getCompDetailsFromGridOptions(na,`agDragAndDropImage`,t,!0)}function va(e,t,n){return e.getCompDetails(t,ra,`agColumnHeader`,n)}function ya(e,t,n){return e.getCompDetails(t,ia,void 0,n)}function ba(e,t){let n=t.columnGroup.getColGroupDef();return e.getCompDetails(n,oa,`agColumnGroupHeader`,t)}function xa(e,t,n){return e.getCompDetails(t,aa,void 0,n)}function Sa(e,t){return e.getCompDetailsFromGridOptions(pa,void 0,t,!0)}function Ca(e,t){return e.getCompDetailsFromGridOptions(ma,`agLoadingCellRenderer`,t,!0)}function wa(e,t){return e.getCompDetailsFromGridOptions(ha,`agGroupRowRenderer`,t,!0)}function Ta(e,t){return e.getCompDetailsFromGridOptions(ga,`agDetailCellRenderer`,t,!0)}function Ea(e,t,n){return e.getCompDetails(t,sa,void 0,n)}function Da(e,t,n){return e.getCompDetails(t,ca,`agSkeletonCellRenderer`,n,!0)}function Oa(e,t,n){return e.getCompDetails(t,la,`agCellEditor`,n,!0)}function ka(e,t,n,r){let i=t.filter;return Xi(i)&&(t={filter:i.component,filterParams:t.filterParams}),e.getCompDetails(t,da,r,n,!0)}function Aa(e,t,n){return e.getCompDetails(t,ta,`agDateInput`,n,!0)}function ja(e,t){return e.getCompDetails(t.colDef,ua,`agTooltipComponent`,t,!0)}function Ma(e,t,n,r){return e.getCompDetails(t,fa,r,n)}function Na(e,t){return $i(e,t,da)}function Pa(e,t,n){return e.mergeParams(t,da,n)}function Fa(e){let t=e;return t?.getFrameworkComponentInstance==null?e:t.getFrameworkComponentInstance()}function Ia(e){return typeof e==`object`&&!!e.getComp}var U={BACKSPACE:`Backspace`,TAB:`Tab`,ENTER:`Enter`,ESCAPE:`Escape`,SPACE:` `,LEFT:`ArrowLeft`,UP:`ArrowUp`,RIGHT:`ArrowRight`,DOWN:`ArrowDown`,DELETE:`Delete`,F2:`F2`,PAGE_UP:`PageUp`,PAGE_DOWN:`PageDown`,PAGE_HOME:`Home`,PAGE_END:`End`,A:`KeyA`,C:`KeyC`,D:`KeyD`,V:`KeyV`,X:`KeyX`,Y:`KeyY`,Z:`KeyZ`},La=65,Ra=67,za=86,Ba=68,Va=90,Ha=89;function Ua(e){let{keyCode:t}=e,n;switch(t){case La:n=U.A;break;case Ra:n=U.C;break;case za:n=U.V;break;case Ba:n=U.D;break;case Va:n=U.Z;break;case Ha:n=U.Y;break;default:n=e.code}return n}var Wa=class extends Yi{isPopup(){return!0}setParentComponent(e){e.addCss(`ag-has-popup`),super.setParentComponent(e)}destroy(){let e=this.parentComponent;e?.isAlive()&&e.getGui().classList.remove(`ag-has-popup`),super.destroy()}},Ga,Ka,qa,Ja,Ya,Xa,Za;function Qa(){return Ga===void 0&&(Ga=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)),Ga}function $a(){return Ka===void 0&&(Ka=/(firefox)/i.test(navigator.userAgent)),Ka}function eo(){return qa===void 0&&(qa=/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)),qa}function to(){return Ja===void 0&&(Ja=/iPad|iPhone|iPod/.test(navigator.platform)||navigator.platform===`MacIntel`&&navigator.maxTouchPoints>1),Ja}function no(e){if(!e)return null;let t=e.tabIndex,n=e.getAttribute(`tabIndex`);return t===-1&&(n===null||n===``&&!$a())?null:t.toString()}function ro(){if(Za!==void 0)return Za;if(!document.body)return-1;let e=1e6,t=$a()?6e6:1e9,n=document.createElement(`div`);for(document.body.appendChild(n);;){let r=e*2;if(n.style.height=r+`px`,r>t||n.clientHeight!==r)break;e=r}return n.remove(),Za=e,e}function io(){return Xa??ao(),Xa}function ao(){let e=document.body,t=document.createElement(`div`);t.style.width=t.style.height=`100px`,t.style.opacity=`0`,t.style.overflow=`scroll`,t.style.msOverflowStyle=`scrollbar`,t.style.position=`absolute`,e.appendChild(t);let n=t.offsetWidth-t.clientWidth;n===0&&t.clientWidth===0&&(n=null),t.parentNode&&t.remove(),n!=null&&(Xa=n,Ya=n===0)}function oo(){return Ya??ao(),Ya}var so=!1,co=0;function lo(e){co>0||(e.addEventListener(`keydown`,fo),e.addEventListener(`mousedown`,fo))}function uo(e){co>0||(e.removeEventListener(`keydown`,fo),e.removeEventListener(`mousedown`,fo))}function fo(e){let t=so,n=e.type===`keydown`;n&&(e.ctrlKey||e.metaKey||e.altKey)||t!==n&&(so=n)}function po(e){let t=g(e);return lo(t),co++,()=>{co--,uo(t)}}function mo(){return so}function ho(e,t,n=!1){let r=ke,i=Ae;t&&(i+=`, `+t),n&&(i+=`, [tabindex="-1"]`);let a=Array.prototype.slice.apply(e.querySelectorAll(r)).filter(e=>Ge(e)),o=Array.prototype.slice.apply(e.querySelectorAll(i));return o.length?((e,t)=>e.filter(e=>t.indexOf(e)===-1))(a,o):a}function go(e,t=!1,n=!1,r=!1){let i=ho(e,r?`.ag-tab-guard`:null,n),a=t?z(i):i[0];return a?(a.focus({preventScroll:!0}),!0):!1}function _o(e,t,n,r){let i=ho(t,n?`:not([tabindex="-1"])`:null),a=h(e),o;o=n?i.findIndex(e=>e.contains(a)):i.indexOf(a);let s=o+(r?-1:1);return s<0||s>=i.length?null:i[s]}function vo(e,t=5){let n=0;for(;e&&no(e)===null&&++n<=t;)e=e.parentElement;return no(e)===null?null:e}var yo=`ag-focus-managed`,bo=class extends D{constructor(e,t={isStopPropagation:()=>!1,stopPropagation:()=>{}},n={}){super(),this.eFocusable=e,this.stopPropagationCallbacks=t,this.callbacks=n,this.callbacks={shouldStopEventPropagation:()=>!1,onTabKeyDown:e=>{if(e.defaultPrevented)return;let t=_o(this.beans,this.eFocusable,!1,e.shiftKey);t&&(t.focus(),e.preventDefault())},...n}}postConstruct(){let{eFocusable:e,callbacks:{onFocusIn:t,onFocusOut:n}}=this;e.classList.add(yo),this.addKeyDownListeners(e),t&&this.addManagedElementListeners(e,{focusin:t}),n&&this.addManagedElementListeners(e,{focusout:n})}addKeyDownListeners(e){this.addManagedElementListeners(e,{keydown:e=>{if(e.defaultPrevented||this.stopPropagationCallbacks.isStopPropagation(e))return;let{callbacks:t}=this;if(t.shouldStopEventPropagation(e)){this.stopPropagationCallbacks.stopPropagation(e);return}e.key===U.TAB?t.onTabKeyDown(e):t.handleKeyDown&&t.handleKeyDown(e)}})}},xo={TAB_GUARD:`ag-tab-guard`,TAB_GUARD_TOP:`ag-tab-guard-top`,TAB_GUARD_BOTTOM:`ag-tab-guard-bottom`},So=class extends D{constructor(e,t){super(),this.stopPropagationCallbacks=t,this.skipTabGuardFocus=!1,this.forcingFocusOut=!1,this.allowFocus=!1;let{comp:n,eTopGuard:r,eBottomGuard:i,focusTrapActive:a,forceFocusOutWhenTabGuardsAreEmpty:o,isFocusableContainer:s,focusInnerElement:c,onFocusIn:l,onFocusOut:u,shouldStopEventPropagation:d,onTabKeyDown:f,handleKeyDown:p,isEmpty:m,eFocusableElement:h}=e;this.comp=n,this.eTopGuard=r,this.eBottomGuard=i,this.providedFocusInnerElement=c,this.eFocusableElement=h,this.focusTrapActive=!!a,this.forceFocusOutWhenTabGuardsAreEmpty=!!o,this.isFocusableContainer=!!s,this.providedFocusIn=l,this.providedFocusOut=u,this.providedShouldStopEventPropagation=d,this.providedOnTabKeyDown=f,this.providedHandleKeyDown=p,this.providedIsEmpty=m}postConstruct(){this.createManagedBean(new bo(this.eFocusableElement,this.stopPropagationCallbacks,{shouldStopEventPropagation:()=>this.shouldStopEventPropagation(),onTabKeyDown:e=>this.onTabKeyDown(e),handleKeyDown:e=>this.handleKeyDown(e),onFocusIn:e=>this.onFocusIn(e),onFocusOut:e=>this.onFocusOut(e)})),this.activateTabGuards();for(let e of[this.eTopGuard,this.eBottomGuard])this.addManagedElementListeners(e,{focus:this.onFocus.bind(this)})}handleKeyDown(e){this.providedHandleKeyDown&&this.providedHandleKeyDown(e)}tabGuardsAreActive(){return!!this.eTopGuard&&this.eTopGuard.hasAttribute(`tabIndex`)}shouldStopEventPropagation(){return this.providedShouldStopEventPropagation?this.providedShouldStopEventPropagation():!1}activateTabGuards(){if(this.forcingFocusOut)return;let e=this.gos.get(`tabIndex`);this.comp.setTabIndex(e.toString())}deactivateTabGuards(){this.comp.setTabIndex()}onFocus(e){if(this.isFocusableContainer&&!this.eFocusableElement.contains(e.relatedTarget)&&!this.allowFocus){this.findNextElementOutsideAndFocus(e.target===this.eBottomGuard);return}if(this.skipTabGuardFocus){this.skipTabGuardFocus=!1;return}if(this.forceFocusOutWhenTabGuardsAreEmpty&&(this.providedIsEmpty?this.providedIsEmpty():ho(this.eFocusableElement,`.ag-tab-guard`).length===0)){this.findNextElementOutsideAndFocus(e.target===this.eBottomGuard);return}if(this.isFocusableContainer&&this.eFocusableElement.contains(e.relatedTarget))return;let t=e.target===this.eBottomGuard;!(this.providedFocusInnerElement?this.providedFocusInnerElement(t):this.focusInnerElement(t))&&this.forceFocusOutWhenTabGuardsAreEmpty&&this.findNextElementOutsideAndFocus(e.target===this.eBottomGuard)}findNextElementOutsideAndFocus(e){let t=ho(g(this.beans).body,null,!0),n=t.indexOf(e?this.eTopGuard:this.eBottomGuard);if(n===-1)return;let r,i;e?(r=0,i=n):(r=n+1,i=t.length);let a=t.slice(r,i),o=this.gos.get(`tabIndex`);a.sort((e,t)=>{let n=Number.parseInt(e.getAttribute(`tabindex`)||`0`),r=Number.parseInt(t.getAttribute(`tabindex`)||`0`);return r===o?1:n===o?-1:n===0?1:r===0?-1:n-r}),a[e?a.length-1:0]?.focus()}onFocusIn(e){this.focusTrapActive||this.forcingFocusOut||(this.providedFocusIn&&this.providedFocusIn(e),this.isFocusableContainer||this.deactivateTabGuards())}onFocusOut(e){this.focusTrapActive||(this.providedFocusOut&&this.providedFocusOut(e),this.eFocusableElement.contains(e.relatedTarget)||this.activateTabGuards())}onTabKeyDown(e){if(this.providedOnTabKeyDown){this.providedOnTabKeyDown(e);return}if(this.focusTrapActive||e.defaultPrevented)return;let t=this.tabGuardsAreActive();t&&this.deactivateTabGuards();let n=this.getNextFocusableElement(e.shiftKey);t&&setTimeout(()=>this.activateTabGuards(),0),n&&(n.focus(),e.preventDefault())}focusInnerElement(e=!1){let t=ho(this.eFocusableElement);return this.tabGuardsAreActive()&&(t.splice(0,1),t.splice(-1,1)),t.length?(t[e?t.length-1:0].focus({preventScroll:!0}),!0):!1}getNextFocusableElement(e){return _o(this.beans,this.eFocusableElement,!1,e)}forceFocusOutOfContainer(e=!1){if(this.forcingFocusOut)return;let t=e?this.eTopGuard:this.eBottomGuard;this.activateTabGuards(),this.skipTabGuardFocus=!0,this.forcingFocusOut=!0,t.focus(),window.setTimeout(()=>{this.forcingFocusOut=!1,this.activateTabGuards()})}isTabGuard(e,t){return e===this.eTopGuard&&!t||e===this.eBottomGuard&&(t??!0)}setAllowFocus(e){this.allowFocus=e}},Co=class{constructor(e){this.tickingInterval=null,this.onScrollCallback=null,this.scrollContainer=e.scrollContainer,this.scrollHorizontally=e.scrollAxis.includes(`x`),this.scrollVertically=e.scrollAxis.includes(`y`),this.scrollByTick=e.scrollByTick??20,e.onScrollCallback&&(this.onScrollCallback=e.onScrollCallback),this.scrollVertically&&(this.getVerticalPosition=e.getVerticalPosition,this.setVerticalPosition=e.setVerticalPosition),this.scrollHorizontally&&(this.getHorizontalPosition=e.getHorizontalPosition,this.setHorizontalPosition=e.setHorizontalPosition),this.shouldSkipVerticalScroll=e.shouldSkipVerticalScroll||(()=>!1),this.shouldSkipHorizontalScroll=e.shouldSkipHorizontalScroll||(()=>!1)}get scrolling(){return this.tickingInterval!==null}check(e,t=!1){let n=t||this.shouldSkipVerticalScroll();if(n&&this.shouldSkipHorizontalScroll())return;let r=this.scrollContainer.getBoundingClientRect(),i=this.scrollByTick;this.tickLeft=e.clientX<r.left+i,this.tickRight=e.clientX>r.right-i,this.tickUp=e.clientY<r.top+i&&!n,this.tickDown=e.clientY>r.bottom-i&&!n,this.tickLeft||this.tickRight||this.tickUp||this.tickDown?this.ensureTickingStarted():this.ensureCleared()}ensureTickingStarted(){this.tickingInterval===null&&(this.tickingInterval=window.setInterval(this.doTick.bind(this),100),this.tickCount=0)}doTick(){this.tickCount++;let e=this.tickCount>20?200:this.tickCount>10?80:40;if(this.scrollVertically){let t=this.getVerticalPosition();this.tickUp&&this.setVerticalPosition(t-e),this.tickDown&&this.setVerticalPosition(t+e)}if(this.scrollHorizontally){let t=this.getHorizontalPosition();this.tickLeft&&this.setHorizontalPosition(t-e),this.tickRight&&this.setHorizontalPosition(t+e)}this.onScrollCallback&&this.onScrollCallback()}ensureCleared(){this.tickingInterval&&=(window.clearInterval(this.tickingInterval),null)}},wo=`ag-resizer-wrapper`,To=(e,t)=>({tag:`div`,ref:`${e}Resizer`,cls:`ag-resizer ag-resizer-${t}`}),Eo={tag:`div`,cls:wo,children:[To(`eTopLeft`,`topLeft`),To(`eTop`,`top`),To(`eTopRight`,`topRight`),To(`eRight`,`right`),To(`eBottomRight`,`bottomRight`),To(`eBottom`,`bottom`),To(`eBottomLeft`,`bottomLeft`),To(`eLeft`,`left`)]},Do=class extends D{constructor(e,t){super(),this.element=e,this.dragStartPosition={x:0,y:0},this.position={x:0,y:0},this.lastSize={width:-1,height:-1},this.positioned=!1,this.resizersAdded=!1,this.resizeListeners=[],this.boundaryEl=null,this.isResizing=!1,this.isMoving=!1,this.resizable={},this.movable=!1,this.currentResizer=null,this.config={popup:!1,...t}}wireBeans(e){this.popupSvc=e.popupSvc,this.dragSvc=e.dragSvc}center(e){let{clientHeight:t,clientWidth:n}=this.offsetParent,r=n/2-this.getWidth()/2,i=t/2-this.getHeight()/2;this.offsetElement(r,i,e)}initialisePosition(e){if(this.positioned)return;let{centered:t,forcePopupParentAsOffsetParent:n,minWidth:r,width:i,minHeight:a,height:o,x:s,y:c}=this.config;this.offsetParent||this.setOffsetParent();let l=0,u=0,d=Ge(this.element);if(d){let e=this.findBoundaryElement(),t=window.getComputedStyle(e);if(t.minWidth!=null){let n=e.offsetWidth-this.element.offsetWidth;u=Number.parseInt(t.minWidth,10)-n}if(t.minHeight!=null){let n=e.offsetHeight-this.element.offsetHeight;l=Number.parseInt(t.minHeight,10)-n}}if(this.minHeight=a||l,this.minWidth=r||u,i&&this.setWidth(i),o&&this.setHeight(o),(!i||!o)&&this.refreshSize(),t)this.center(e);else if(s||c)this.offsetElement(s,c,e);else if(d&&n){let t=this.boundaryEl,n=!0;if(t||(t=this.findBoundaryElement(),n=!1),t){let r=Number.parseFloat(t.style.top),i=Number.parseFloat(t.style.left);n?this.offsetElement(Number.isNaN(i)?0:i,Number.isNaN(r)?0:r,e):this.setPosition(i,r)}}this.positioned=!!this.offsetParent}isPositioned(){return this.positioned}getPosition(){return this.position}setMovable(e,t){if(!this.config.popup||e===this.movable)return;this.movable=e;let n=this.moveElementDragListener||{eElement:t,onDragStart:this.onMoveStart.bind(this),onDragging:this.onMove.bind(this),onDragStop:this.onMoveEnd.bind(this)};e?(this.dragSvc?.addDragSource(n),this.moveElementDragListener=n):(this.dragSvc?.removeDragSource(n),this.moveElementDragListener=void 0)}setResizable(e){if(this.clearResizeListeners(),e?this.addResizers():this.removeResizers(),typeof e==`boolean`){if(e===!1)return;e={topLeft:e,top:e,topRight:e,right:e,bottomRight:e,bottom:e,bottomLeft:e,left:e}}for(let t of Object.keys(e)){let n=!!e[t],r=this.getResizerElement(t),i={dragStartPixels:0,eElement:r,onDragStart:e=>this.onResizeStart(e,t),onDragging:this.onResize.bind(this),onDragStop:e=>this.onResizeEnd(e,t)};(n||!this.isAlive()&&!n)&&(n?(this.dragSvc?.addDragSource(i),this.resizeListeners.push(i),r.style.pointerEvents=`all`):r.style.pointerEvents=`none`,this.resizable[t]=n)}}removeSizeFromEl(){this.element.style.removeProperty(`height`),this.element.style.removeProperty(`width`),this.element.style.removeProperty(`flex`)}restoreLastSize(){this.element.style.flex=`0 0 auto`;let{height:e,width:t}=this.lastSize;t!==-1&&(this.element.style.width=`${t}px`),e!==-1&&(this.element.style.height=`${e}px`)}getHeight(){return this.element.offsetHeight}setHeight(e){let{popup:t}=this.config,n=this.element,r=!1;if(typeof e==`string`&&e.includes(`%`))Qe(n,e),e=Re(n),r=!0;else if(e=Math.max(this.minHeight,e),this.positioned){let t=this.getAvailableHeight();t&&e>t&&(e=t)}this.getHeight()!==e&&(r?(n.style.maxHeight=`unset`,n.style.minHeight=`unset`):t?Qe(n,e):(n.style.height=`${e}px`,n.style.flex=`0 0 auto`,this.lastSize.height=typeof e==`number`?e:Number.parseFloat(e)))}getAvailableHeight(){let{popup:e,forcePopupParentAsOffsetParent:t}=this.config;this.positioned||this.initialisePosition();let{clientHeight:n}=this.offsetParent;if(!n)return null;let r=this.element.getBoundingClientRect(),i=this.offsetParent.getBoundingClientRect(),a=e?this.position.y:r.top,o=e?0:i.top,s=0;if(t){let e=this.element.parentElement;if(e){let{bottom:t}=e.getBoundingClientRect();s=t-r.bottom}}return n+o-a-s}getWidth(){return this.element.offsetWidth}setWidth(e){let t=this.element,{popup:n}=this.config,r=!1;if(typeof e==`string`&&e.includes(`%`))Ze(t,e),e=ze(t),r=!0;else if(this.positioned){e=Math.max(this.minWidth,e);let{clientWidth:t}=this.offsetParent,r=n?this.position.x:this.element.getBoundingClientRect().left;t&&e+r>t&&(e=t-r)}this.getWidth()!==e&&(r?(t.style.maxWidth=`unset`,t.style.minWidth=`unset`):this.config.popup?Ze(t,e):(t.style.width=`${e}px`,t.style.flex=` unset`,this.lastSize.width=typeof e==`number`?e:Number.parseFloat(e)))}offsetElement(e=0,t=0,n){let{forcePopupParentAsOffsetParent:r}=this.config,i=r?this.boundaryEl:this.element;i&&(this.popupSvc?.positionPopup({ePopup:i,keepWithinBounds:!0,skipObserver:this.movable||this.isResizable(),updatePosition:()=>({x:e,y:t}),postProcessCallback:n}),this.setPosition(Number.parseFloat(i.style.left),Number.parseFloat(i.style.top)))}constrainSizeToAvailableHeight(e){this.config.forcePopupParentAsOffsetParent&&(e&&this.popupSvc?(this.resizeObserverSubscriber?.(),this.resizeObserverSubscriber=tt(this.beans,this.popupSvc?.getPopupParent(),()=>{let e=this.getAvailableHeight();this.element.style.setProperty(`max-height`,`${e}px`)})):(this.element.style.removeProperty(`max-height`),this.resizeObserverSubscriber&&=(this.resizeObserverSubscriber(),void 0)))}setPosition(e,t){this.position.x=e,this.position.y=t}updateDragStartPosition(e,t){this.dragStartPosition={x:e,y:t}}calculateMouseMovement(e){let{e:t,isLeft:n,isTop:r,anywhereWithin:i,topBuffer:a}=e,o=t.clientX-this.dragStartPosition.x,s=t.clientY-this.dragStartPosition.y;return{movementX:this.shouldSkipX(t,!!n,!!i,o)?0:o,movementY:this.shouldSkipY(t,!!r,a,s)?0:s}}shouldSkipX(e,t,n,r){let i=this.element.getBoundingClientRect(),a=this.offsetParent.getBoundingClientRect(),o=this.boundaryEl.getBoundingClientRect(),s=this.config.popup?this.position.x:i.left,c=s<=0&&a.left>=e.clientX||a.right<=e.clientX&&a.right<=o.right;return c?!0:(c=t?r<0&&e.clientX>s+a.left||r>0&&e.clientX<s+a.left:n?r<0&&e.clientX>o.right||r>0&&e.clientX<s+a.left:r<0&&e.clientX>o.right||r>0&&e.clientX<o.right,c)}shouldSkipY(e,t,n=0,r){let i=this.element.getBoundingClientRect(),a=this.offsetParent.getBoundingClientRect(),o=this.boundaryEl.getBoundingClientRect(),s=this.config.popup?this.position.y:i.top,c=s<=0&&a.top>=e.clientY||a.bottom<=e.clientY&&a.bottom<=o.bottom;return c?!0:(c=t?r<0&&e.clientY>s+a.top+n||r>0&&e.clientY<s+a.top:r<0&&e.clientY>o.bottom||r>0&&e.clientY<o.bottom,c)}createResizeMap(){let e=e=>({element:this.element.querySelector(`[data-ref=${e}Resizer]`)});this.resizerMap={topLeft:e(`eTopLeft`),top:e(`eTop`),topRight:e(`eTopRight`),right:e(`eRight`),bottomRight:e(`eBottomRight`),bottom:e(`eBottom`),bottomLeft:e(`eBottomLeft`),left:e(`eLeft`)}}addResizers(){if(this.resizersAdded)return;let e=this.element;e&&(e.appendChild(ot(Eo)),this.createResizeMap(),this.resizersAdded=!0)}removeResizers(){this.resizerMap=void 0,this.element.querySelector(`.${wo}`)?.remove(),this.resizersAdded=!1}getResizerElement(e){return this.resizerMap[e].element}onResizeStart(e,t){this.boundaryEl=this.findBoundaryElement(),this.positioned||this.initialisePosition(),this.currentResizer={isTop:!!t.match(/top/i),isRight:!!t.match(/right/i),isBottom:!!t.match(/bottom/i),isLeft:!!t.match(/left/i)},this.element.classList.add(`ag-resizing`),this.resizerMap[t].element.classList.add(`ag-active`);let{popup:n,forcePopupParentAsOffsetParent:r}=this.config;!n&&!r&&this.applySizeToSiblings(this.currentResizer.isBottom||this.currentResizer.isTop),this.isResizing=!0,this.updateDragStartPosition(e.clientX,e.clientY)}getSiblings(){let e=this.element.parentElement;return e?Array.prototype.slice.call(e.children).filter(e=>!e.classList.contains(`ag-hidden`)):null}getMinSizeOfSiblings(){let e=this.getSiblings()||[],t=0,n=0;for(let r of e){let e=!!r.style.flex&&r.style.flex!==`0 0 auto`;if(r===this.element)continue;let i=this.minHeight||0,a=this.minWidth||0;if(e){let e=window.getComputedStyle(r);e.minHeight&&(i=Number.parseInt(e.minHeight,10)),e.minWidth&&(a=Number.parseInt(e.minWidth,10))}else i=r.offsetHeight,a=r.offsetWidth;t+=i,n+=a}return{height:t,width:n}}applySizeToSiblings(e){let t=null,n=this.getSiblings();if(n){for(let r=0;r<n.length;r++){let i=n[r];i!==t&&(e?i.style.height=`${i.offsetHeight}px`:i.style.width=`${i.offsetWidth}px`,i.style.flex=`0 0 auto`,i===this.element&&(t=n[r+1]))}t&&(t.style.removeProperty(`height`),t.style.removeProperty(`min-height`),t.style.removeProperty(`max-height`),t.style.flex=`1 1 auto`)}}isResizable(){return Object.values(this.resizable).some(e=>e)}onResize(e){if(!this.isResizing||!this.currentResizer)return;let{popup:t,forcePopupParentAsOffsetParent:n}=this.config,{isTop:r,isRight:i,isBottom:a,isLeft:o}=this.currentResizer,s=i||o,c=a||r,{movementX:l,movementY:u}=this.calculateMouseMovement({e,isLeft:o,isTop:r}),d=this.position.x,f=this.position.y,p=0,m=0;if(s&&l){let e=o?-1:1,t=this.getWidth(),n=t+l*e,r=!1;o&&(p=t-n,(d+p<=0||n<=this.minWidth)&&(r=!0,p=0)),r||this.setWidth(n)}if(c&&u){let e=r?-1:1,t=this.getHeight(),n=t+u*e,i=!1;r?(m=t-n,(f+m<=0||n<=this.minHeight)&&(i=!0,m=0)):!this.config.popup&&!this.config.forcePopupParentAsOffsetParent&&t<n&&this.getMinSizeOfSiblings().height+n>this.element.parentElement.offsetHeight&&(i=!0),i||this.setHeight(n)}this.updateDragStartPosition(e.clientX,e.clientY),((t||n)&&p||m)&&this.offsetElement(d+p,f+m)}onResizeEnd(e,t){this.isResizing=!1,this.currentResizer=null,this.boundaryEl=null,this.element.classList.remove(`ag-resizing`),this.resizerMap[t].element.classList.remove(`ag-active`),this.dispatchLocalEvent({type:`resize`})}refreshSize(){let e=this.element;this.config.popup&&(this.config.width||this.setWidth(e.offsetWidth),this.config.height||this.setHeight(e.offsetHeight))}onMoveStart(e){this.boundaryEl=this.findBoundaryElement(),this.positioned||this.initialisePosition(),this.isMoving=!0,this.element.classList.add(`ag-moving`),this.updateDragStartPosition(e.clientX,e.clientY)}onMove(e){if(!this.isMoving)return;let{x:t,y:n}=this.position,r;this.config.calculateTopBuffer&&(r=this.config.calculateTopBuffer());let{movementX:i,movementY:a}=this.calculateMouseMovement({e,isTop:!0,anywhereWithin:!0,topBuffer:r});this.offsetElement(t+i,n+a),this.updateDragStartPosition(e.clientX,e.clientY)}onMoveEnd(){this.isMoving=!1,this.boundaryEl=null,this.element.classList.remove(`ag-moving`)}setOffsetParent(){this.config.forcePopupParentAsOffsetParent&&this.popupSvc?this.offsetParent=this.popupSvc.getPopupParent():this.offsetParent=this.element.offsetParent}findBoundaryElement(){let e=this.element;for(;e;){if(window.getComputedStyle(e).position!==`static`)return e;e=e.parentElement}return this.element}clearResizeListeners(){for(;this.resizeListeners.length;){let e=this.resizeListeners.pop();this.dragSvc?.removeDragSource(e)}}destroy(){super.destroy(),this.moveElementDragListener&&this.dragSvc?.removeDragSource(this.moveElementDragListener),this.constrainSizeToAvailableHeight(!1),this.clearResizeListeners(),this.removeResizers()}},Oo=`T`,ko=RegExp(`[${Oo} ]`),Ao=RegExp(`^\\d{4}-\\d{2}-\\d{2}(${Oo}\\d{2}:\\d{2}:\\d{2}\\D?)?`);function jo(e,t){return e.toString().padStart(t,`0`)}function W(e,t=!0,n=Oo){if(!e)return null;let r=[e.getFullYear(),e.getMonth()+1,e.getDate()].map(e=>jo(e,2)).join(`-`);return t&&(r+=n+[e.getHours(),e.getMinutes(),e.getSeconds()].map(e=>jo(e,2)).join(`:`)),r}function Mo(e,t=!0){return e?t?[String(e.getFullYear()),String(e.getMonth()+1),jo(e.getDate(),2),jo(e.getHours(),2),`:${jo(e.getMinutes(),2)}`,`:${jo(e.getSeconds(),2)}`]:[e.getFullYear(),e.getMonth()+1,jo(e.getDate(),2)].map(String):null}var No=e=>{if(e>3&&e<21)return`th`;switch(e%10){case 1:return`st`;case 2:return`nd`;case 3:return`rd`}return`th`},Po=[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`],Fo=[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`];function Io(e,t){if(t==null)return W(e,!1);let n=jo(e.getFullYear(),4),r={YYYY:()=>n.slice(n.length-4,n.length),YY:()=>n.slice(n.length-2,n.length),Y:()=>`${e.getFullYear()}`,MMMM:()=>Po[e.getMonth()],MMM:()=>Po[e.getMonth()].slice(0,3),MM:()=>jo(e.getMonth()+1,2),Mo:()=>`${e.getMonth()+1}${No(e.getMonth()+1)}`,M:()=>`${e.getMonth()+1}`,Do:()=>`${e.getDate()}${No(e.getDate())}`,DD:()=>jo(e.getDate(),2),D:()=>`${e.getDate()}`,dddd:()=>Fo[e.getDay()],ddd:()=>Fo[e.getDay()].slice(0,3),dd:()=>Fo[e.getDay()].slice(0,2),do:()=>`${e.getDay()}${No(e.getDay())}`,d:()=>`${e.getDay()}`},i=new RegExp(Object.keys(r).join(`|`),`g`);return t.replace(i,e=>e in r?r[e]():e)}function Lo(e,t=!1){return!!G(e,t)}function Ro(e){return Lo(e,!0)}function G(e,t=!1,n){if(!e||!n&&!Ao.test(e))return null;let[r,i]=e.split(ko);if(!r)return null;let a=r.split(`-`).map(e=>Number.parseInt(e,10));if(a.filter(e=>!isNaN(e)).length!==3)return null;let[o,s,c]=a,l=new Date(o,s-1,c);if(l.getFullYear()!==o||l.getMonth()!==s-1||l.getDate()!==c||!i&&t)return null;if(!i||i===`00:00:00`)return l;let[u,d,f]=i.split(`:`).map(e=>Number.parseInt(e,10));if(u>=0&&u<24)l.setHours(u);else if(t)return null;if(d>=0&&d<60)l.setMinutes(d);else if(t)return null;if(f>=0&&f<60)l.setSeconds(f);else if(t)return null;return l}function zo(e){let{inputValue:t,allSuggestions:n,hideIrrelevant:r,filterByPercentageOfBestMatch:i}=e,a=(n??[]).map((e,n)=>({value:e,relevance:Bo(t,e),idx:n}));if(a.sort((e,t)=>e.relevance-t.relevance),r&&(a=a.filter(e=>e.relevance<Math.max(e.value.length,t.length))),a.length>0&&i&&i>0){let e=a[0].relevance*i;a=a.filter(t=>e-t.relevance<0)}let o=[],s=[];for(let e of a)o.push(e.value),s.push(e.idx);return{values:o,indices:s}}function Bo(e,t){let n=e.length,r=t.length;if(r===0)return n||0;let i=e.toLocaleLowerCase(),a=t.toLocaleLowerCase(),o;e.length<t.length&&(o=a,a=i,i=o,o=t,t=e,e=o);let s=new Uint16Array(r+1),c=new Uint16Array(r+1);for(let e=0;e<=r;e++)s[e]=e;let l=0,u=n/2-10;for(let d=1;d<=n;d++){let n=e[d-1],f=i[d-1];c[0]=d;for(let o=1;o<=r;o++){let r=t[o-1];if(f!==a[o-1]){let e=c[o-1],t=s[o],n=s[o-1],r=e<t?e:t;n<r&&(r=n),c[o]=r+1|0;continue}if(l++,n===r&&l++,d>1&&o>1){let n=e[d-2],r=i[d-2],s=t[o-2];r===a[o-2]&&(l++,n===s&&l++)}d<u&&l++,c[o]=s[o-1]}o=s,s=c,c=o}return s[r]/(l+1)}function Vo(e){return e.altKey||e.ctrlKey||e.metaKey?!1:e.key?.length===1}var Ho=`.ag-label{white-space:nowrap}:where(.ag-ltr) .ag-label{margin-right:var(--ag-spacing)}:where(.ag-rtl) .ag-label{margin-left:var(--ag-spacing)}:where(.ag-label-align-right) .ag-label{order:1}:where(.ag-ltr) :where(.ag-label-align-right) .ag-label{margin-left:var(--ag-spacing)}:where(.ag-rtl) :where(.ag-label-align-right) .ag-label{margin-right:var(--ag-spacing)}.ag-label-align-right>*{flex:none}.ag-label-align-top{align-items:flex-start;flex-direction:column;>*{align-self:stretch}}.ag-label-ellipsis{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:where(.ag-label-align-top) .ag-label{margin-bottom:calc(var(--ag-spacing)*.5)}`,Uo=class extends Yi{constructor(e,t,n){super(t,n),this.labelSeparator=``,this.labelAlignment=`left`,this.disabled=!1,this.label=``,this.config=e||{},this.registerCSS(Ho)}postConstruct(){this.addCss(`ag-labeled`),this.eLabel.classList.add(`ag-label`);let{labelSeparator:e,label:t,labelWidth:n,labelAlignment:r,disabled:i,labelEllipsis:a}=this.config;i!=null&&this.setDisabled(i),e!=null&&this.setLabelSeparator(e),t!=null&&this.setLabel(t),n!=null&&this.setLabelWidth(n),a!=null&&this.setLabelEllipsis(a),this.setLabelAlignment(r||this.labelAlignment),this.refreshLabel()}refreshLabel(){let{label:e,eLabel:t}=this;T(t),typeof e==`string`?t.innerText=e+this.labelSeparator:e&&t.appendChild(e),e===``?(w(t,!1),C(t,`presentation`)):(w(t,!0),C(t,null))}setLabelSeparator(e){return this.labelSeparator===e?this:(this.labelSeparator=e,this.label!=null&&this.refreshLabel(),this)}getLabelId(){let e=this.eLabel;return e.id=e.id||`ag-${this.getCompId()}-label`,e.id}getLabel(){return this.label}setLabel(e){return this.label===e?this:(this.label=e,this.refreshLabel(),this)}setLabelAlignment(e){let t=this.getGui().classList;return t.toggle(`ag-label-align-left`,e===`left`),t.toggle(`ag-label-align-right`,e===`right`),t.toggle(`ag-label-align-top`,e===`top`),this}setLabelEllipsis(e){return this.eLabel.classList.toggle(`ag-label-ellipsis`,e),this}setLabelWidth(e){return this.label==null||Xe(this.eLabel,e),this}setDisabled(e){e=!!e;let t=this.getGui();return Ne(t,e),t.classList.toggle(`ag-disabled`,e),this.disabled=e,this}isDisabled(){return!!this.disabled}},Wo=class extends Uo{constructor(e,t,n,r){super(e,t,n),this.className=r}postConstruct(){super.postConstruct();let{width:e,value:t,onValueChange:n,ariaLabel:r}=this.config;e!=null&&this.setWidth(e),t!=null&&this.setValue(t),n!=null&&this.onValueChange(n),r!=null&&this.setAriaLabel(r),this.className&&this.addCss(this.className),this.refreshAriaLabelledBy()}setLabel(e){return super.setLabel(e),this.refreshAriaLabelledBy(),this}refreshAriaLabelledBy(){let e=this.getAriaElement(),t=this.getLabelId(),n=this.getLabel();n==null||n==``||ie(e)!==null?oe(e,``):oe(e,t??``)}setAriaLabel(e){return ae(this.getAriaElement(),e),this.refreshAriaLabelledBy(),this}onValueChange(e){return this.addManagedListeners(this,{fieldValueChanged:()=>e(this.getValue())}),this}getWidth(){return this.getGui().clientWidth}setWidth(e){return Ze(this.getGui(),e),this}getPreviousValue(){return this.previousValue}getValue(){return this.value}setValue(e,t){return this.value===e?this:(this.previousValue=this.value,this.value=e,t||this.dispatchLocalEvent({type:`fieldValueChanged`}),this)}};function Go(e){return{tag:`div`,role:`presentation`,children:[{tag:`div`,ref:`eLabel`,cls:`ag-input-field-label`},{tag:`div`,ref:`eWrapper`,cls:`ag-wrapper ag-input-wrapper`,role:`presentation`,children:[{tag:e,ref:`eInput`,cls:`ag-input-field-input`}]}]}}var Ko=class extends Wo{constructor(e,t,n=`text`,r=`input`){super(e,e?.template??Go(r),[],t),this.inputType=n,this.displayFieldTag=r,this.eLabel=B,this.eWrapper=B,this.eInput=B}postConstruct(){super.postConstruct(),this.setInputType(this.inputType);let{eLabel:e,eWrapper:t,eInput:n,className:r}=this;e.classList.add(`${r}-label`),t.classList.add(`${r}-input-wrapper`),n.classList.add(`${r}-input`),this.addCss(`ag-input-field`),n.id=n.id||`ag-${this.getCompId()}-input`;let{inputName:i,inputWidth:a,inputPlaceholder:o,autoComplete:s,tabIndex:c}=this.config;i!=null&&this.setInputName(i),a!=null&&this.setInputWidth(a),o!=null&&this.setInputPlaceholder(o),s!=null&&this.setAutoComplete(s),this.addInputListeners(),this.activateTabIndex([n],c)}addInputListeners(){this.addManagedElementListeners(this.eInput,{input:e=>this.setValue(e.target.value)})}setInputType(e){this.displayFieldTag===`input`&&(this.inputType=e,E(this.eInput,`type`,e))}getInputElement(){return this.eInput}getWrapperElement(){return this.eWrapper}setInputWidth(e){return Xe(this.eWrapper,e),this}setInputName(e){return this.getInputElement().setAttribute(`name`,e),this}getFocusableElement(){return this.eInput}setMaxLength(e){let t=this.eInput;return t.maxLength=e,this}setInputPlaceholder(e){return E(this.eInput,`placeholder`,e),this}setInputAriaLabel(e){return ae(this.eInput,e),this.refreshAriaLabelledBy(),this}setDisabled(e){return Ne(this.eInput,e),super.setDisabled(e)}setAutoComplete(e){if(e===!0)E(this.eInput,`autocomplete`,null);else{let t=typeof e==`string`?e:`off`;E(this.eInput,`autocomplete`,t)}return this}},qo=class extends Ko{constructor(e,t=`ag-checkbox`,n=`checkbox`){super(e,t,n),this.labelAlignment=`right`,this.selected=!1,this.readOnly=!1,this.passive=!1}postConstruct(){super.postConstruct();let{readOnly:e,passive:t,name:n}=this.config;typeof e==`boolean`&&this.setReadOnly(e),typeof t==`boolean`&&this.setPassive(t),n!=null&&this.setName(n)}addInputListeners(){this.addManagedElementListeners(this.eInput,{click:this.onCheckboxClick.bind(this)}),this.addManagedElementListeners(this.eLabel,{click:this.toggle.bind(this)})}getNextValue(){return this.selected===void 0?!0:!this.selected}setPassive(e){this.passive=e}isReadOnly(){return this.readOnly}setReadOnly(e){this.eWrapper.classList.toggle(`ag-disabled`,e),this.eInput.disabled=e,this.readOnly=e}setDisabled(e){return this.eWrapper.classList.toggle(`ag-disabled`,e),super.setDisabled(e)}toggle(){if(this.eInput.disabled)return;let e=this.isSelected(),t=this.getNextValue();this.passive?this.dispatchChange(t,e):this.setValue(t)}getValue(){return this.isSelected()}setValue(e,t){return this.refreshSelectedClass(e),this.setSelected(e,t),this}setName(e){let t=this.getInputElement();return t.name=e,this}isSelected(){return this.selected}setSelected(e,t){if(this.isSelected()===e)return;this.previousValue=this.isSelected(),e=this.selected=typeof e==`boolean`?e:void 0;let n=this.eInput;n.checked=e,n.indeterminate=e===void 0,t||this.dispatchChange(this.selected,this.previousValue)}dispatchChange(e,t,n){this.dispatchLocalEvent({type:`fieldValueChanged`,selected:e,previousValue:t,event:n});let r=this.getInputElement();this.eventSvc.dispatchEvent({type:`checkboxChanged`,id:r.id,name:r.name,selected:e,previousValue:t})}onCheckboxClick(e){if(this.passive||this.eInput.disabled)return;let t=this.isSelected(),n=this.selected=e.target.checked;this.refreshSelectedClass(n),this.dispatchChange(n,t,e)}refreshSelectedClass(e){let t=this.eWrapper.classList;t.toggle(`ag-checked`,e===!0),t.toggle(`ag-indeterminate`,e==null)}},Jo={selector:`AG-CHECKBOX`,component:qo},Yo=class extends qo{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){let t=this.eInput;e.selected&&e.name&&t.name&&t.name===e.name&&e.id&&t.id!==e.id&&this.setValue(!1,!0)}},Xo=class extends Ko{constructor(e,t=`ag-text-field`,n=`text`){super(e,t,n)}postConstruct(){super.postConstruct(),this.config.allowedCharPattern&&this.preventDisallowedCharacters()}setValue(e,t){let n=this.eInput;return n.value!==e&&(n.value=i(e)?e:``),super.setValue(e,t)}setStartValue(e){this.setValue(e,!0)}setCustomValidity(e){let t=this.eInput,n=e.length>0;t.setCustomValidity(e),n&&t.reportValidity(),ue(t,n)}preventDisallowedCharacters(){let e=RegExp(`[${this.config.allowedCharPattern}]`);this.addManagedListeners(this.eInput,{keydown:t=>{Vo(t)&&t.key&&!e.test(t.key)&&t.preventDefault()},paste:t=>{(t.clipboardData?.getData(`text`))?.split(``).some(t=>!e.test(t))&&t.preventDefault()}})}},Zo={selector:`AG-INPUT-TEXT-FIELD`,component:Xo},Qo={selector:`AG-INPUT-TEXT-AREA`,component:class extends Ko{constructor(e){super(e,`ag-text-area`,null,`textarea`)}setValue(e,t){let 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}}},$o=class extends Xo{constructor(e){super(e,`ag-number-field`,`number`)}postConstruct(){super.postConstruct();let e=this.eInput;this.addManagedListeners(e,{blur:()=>{let t=Number.parseFloat(e.value),n=isNaN(t)?``:this.normalizeValue(t.toString());this.value!==n&&this.setValue(n)},wheel:this.onWheel.bind(this)}),e.step=`any`;let{precision:t,min:n,max:r,step:i}=this.config;typeof t==`number`&&this.setPrecision(t),typeof n==`number`&&this.setMin(n),typeof r==`number`&&this.setMax(r),typeof i==`number`&&this.setStep(i)}onWheel(e){h(this.beans)===this.eInput&&e.preventDefault()}normalizeValue(e){return e===``?``:(this.precision!=null&&(e=this.adjustPrecision(e)),e)}adjustPrecision(e,t){let n=this.precision;if(n==null)return e;if(t){let t=Number.parseFloat(e).toFixed(n);return Number.parseFloat(t).toString()}let r=String(e).split(`.`);if(r.length>1){if(r[1].length<=n)return e;if(n>0)return`${r[0]}.${r[1].slice(0,n)}`}return r[0]}setMin(e){return this.min===e?this:(this.min=e,E(this.eInput,`min`,e),this)}setMax(e){return this.max===e?this:(this.max=e,E(this.eInput,`max`,e),this)}setPrecision(e){return this.precision=e,this}setStep(e){return this.step===e?this:(this.step=e,E(this.eInput,`step`,e),this)}setValue(e,t){return this.setValueOrInputValue(e=>super.setValue(e,t),()=>this,e)}setStartValue(e){return this.setValueOrInputValue(e=>super.setValue(e,!0),e=>{this.eInput.value=e},e)}setValueOrInputValue(e,t,n){if(i(n)){let r=this.isScientificNotation(n);if(r&&this.eInput.validity.valid)return e(n);if(!r){n=this.adjustPrecision(n);let e=this.normalizeValue(n);r=n!=e}if(r)return t(n)}return e(n)}getValue(e=!1){let t=this.eInput;if(!t.validity.valid&&!e)return;let n=t.value;return this.isScientificNotation(n)?this.adjustPrecision(n,!0):super.getValue()}isScientificNotation(e){return typeof e==`string`&&e.includes(`e`)}},es={selector:`AG-INPUT-NUMBER-FIELD`,component:$o},ts={selector:`AG-INPUT-DATE-FIELD`,component:class extends Xo{constructor(e){super(e,`ag-date-field`,`date`)}postConstruct(){super.postConstruct();let e=Qa();this.addManagedListeners(this.eInput,{wheel:this.onWheel.bind(this),mousedown:()=>{this.isDisabled()||e||this.eInput.focus()}}),this.eInput.step=`any`}onWheel(e){h(this.beans)===this.eInput&&e.preventDefault()}setMin(e){let t=e instanceof Date?W(e??null,!!this.includeTime)??void 0:e;return this.min===t?this:(this.min=t,E(this.eInput,`min`,t),this)}setMax(e){let t=e instanceof Date?W(e??null,!!this.includeTime)??void 0:e;return this.max===t?this:(this.max=t,E(this.eInput,`max`,t),this)}setStep(e){return this.step===e?this:(this.step=e,E(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 G(this.getValue())??void 0}setDate(e,t){this.setValue(W(e??null,this.includeTime),t)}}},ns=`.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)}}`,rs=`ag-active-item`,is=(e,t)=>({tag:`div`,cls:`ag-list-item ag-${e}-list-item`,attrs:{role:`option`},children:[{tag:`span`,ref:`eText`,children:t}]}),as=class extends Yi{constructor(e,t,n){super(is(e,t)),this.label=t,this.value=n,this.eText=B}postConstruct(){this.createTooltip(),this.addEventListeners()}setHighlighted(e){let t=this.getGui();t.classList.toggle(rs,e),we(t,e),this.dispatchLocalEvent({type:`itemHighlighted`,highlighted:e})}getHeight(){return this.getGui().clientHeight}setIndex(e,t){let n=this.getGui();he(n,e),me(n,t)}createTooltip(){let e=this.createOptionalManagedBean(this.beans.registry.createDynamicBean(`highlightTooltipFeature`,!1,{getTooltipValue:()=>this.label,getGui:()=>this.getGui(),getLocation:()=>`UNKNOWN`,shouldDisplayTooltip:()=>Je(this.eText)},this));e&&(this.tooltipFeature=e)}addEventListeners(){let e=this.getParentComponent();e&&(this.addGuiEventListener(`mouseover`,()=>{e.highlightItem(this)}),this.addGuiEventListener(`mousedown`,t=>{t.preventDefault(),t.stopPropagation(),e.setValue(this.value)}))}},os=class extends Yi{constructor(e=`default`){super({tag:`div`,cls:`ag-list ag-${e}-list`}),this.cssIdentifier=e,this.options=[],this.listItems=[],this.highlightedItem=null,this.registerCSS(ns)}postConstruct(){let e=this.getGui();this.addManagedElementListeners(e,{mouseleave:()=>this.clearHighlighted()})}handleKeyDown(e){let t=e.key;switch(t){case U.ENTER:if(!this.highlightedItem)this.setValue(this.getValue());else{let e=this.listItems.indexOf(this.highlightedItem);this.setValueByIndex(e)}break;case U.DOWN:case U.UP:e.preventDefault(),this.navigate(t);break;case U.PAGE_DOWN:case U.PAGE_UP:case U.PAGE_HOME:case U.PAGE_END:e.preventDefault(),this.navigateToPage(t);break}}addOptions(e){for(let t of e)this.addOption(t);return this}addOption(e){let{value:t,text:n}=e,r=n??t;return this.options.push({value:t,text:r}),this.renderOption(t,r),this.updateIndices(),this}clearOptions(){this.options=[],this.reset(!0);for(let e of this.listItems)e.destroy();T(this.getGui()),this.listItems=[],this.refreshAriaRole()}updateOptions(e){let 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;let n=this.options.findIndex(t=>t.value===e);if(n!==-1){let e=this.options[n];this.value=e.value,this.displayValue=e.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();let e=this.options.findIndex(e=>e.value===this.value);e!==-1&&this.highlightItem(this.listItems[e])}highlightItem(e){let t=e.getGui();if(!Ge(t))return;this.clearHighlighted(),e.setHighlighted(!0),this.highlightedItem=e;let{scrollTop:n,clientHeight:r}=this.getGui(),{offsetTop:i,offsetHeight:a}=t;(i+a>n+r||i<n)&&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){let n=new as(this.cssIdentifier,t,e);n.setParentComponent(this);let r=this.createManagedBean(n);this.listItems.push(r),this.getGui().appendChild(r.getGui())}navigate(e){let t=e===U.DOWN,n,{listItems:r,highlightedItem:i}=this;if(!i)n=t?r[0]:z(r);else{let e=r.indexOf(i)+(t?1:-1);e=Math.min(Math.max(e,0),r.length-1),n=r[e]}this.highlightItem(n)}navigateToPage(e){let{listItems:t,highlightedItem:n}=this;if(!n||t.length===0)return;let r=t.indexOf(n),i=this.options.length-1,a=t[0].getHeight(),o=Math.floor(this.getGui().clientHeight/a),s=-1;e===U.PAGE_HOME?s=0:e===U.PAGE_END?s=i:e===U.PAGE_DOWN?s=Math.min(r+o,i):e===U.PAGE_UP&&(s=Math.max(r-o,0)),s!==-1&&this.highlightItem(t[s])}refreshAriaRole(){C(this.getGui(),this.options.length===0?`presentation`:`listbox`)}updateIndices(){this.refreshAriaRole();let e=this.listItems,t=e.length;e.forEach((e,n)=>{e.setIndex(n+1,t)})}fireChangeEvent(){this.dispatchLocalEvent({type:`fieldValueChanged`}),this.fireItemSelected()}fireItemSelected(){this.dispatchLocalEvent({type:`selectedItem`})}},ss=`.ag-picker-field-display{flex:1 1 auto}.ag-picker-field{align-items:center;display:flex}.ag-picker-field-icon{border:0;cursor:pointer;display:flex;margin:0;padding:0}.ag-picker-field-wrapper{background-color:var(--ag-picker-button-background-color);border:var(--ag-picker-button-border);border-radius:5px;min-height:max(var(--ag-list-item-height),calc(var(--ag-spacing)*4));overflow:hidden;&:where(.ag-picker-has-focus),&:where(:focus-within){background-color:var(--ag-picker-button-focus-background-color);border:var(--ag-picker-button-focus-border);box-shadow:var(--ag-focus-shadow);&:where(.invalid){box-shadow:var(--ag-focus-error-shadow)}}&:where(.invalid){background-color:var(--ag-input-invalid-background-color);border:var(--ag-input-invalid-border);color:var(--ag-input-invalid-text-color)}&:disabled{opacity:.5}}`,cs={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`}}]}]},ls=class extends Wo{constructor(e){if(super(e,e?.template||cs,e?.agComponents||[],e?.className),this.isPickerDisplayed=!1,this.skipClick=!1,this.pickerGap=4,this.hideCurrentPicker=null,this.eLabel=B,this.eWrapper=B,this.eDisplayField=B,this.eIcon=B,this.registerCSS(ss),this.ariaRole=e?.ariaRole,this.onPickerFocusIn=this.onPickerFocusIn.bind(this),this.onPickerFocusOut=this.onPickerFocusOut.bind(this),!e)return;let{pickerGap:t,maxPickerHeight:n,variableWidth:r,minPickerWidth:i,maxPickerWidth:a}=e;t!=null&&(this.pickerGap=t),this.variableWidth=!!r,n!=null&&this.setPickerMaxHeight(n),i!=null&&this.setPickerMinWidth(i),a!=null&&this.setPickerMaxWidth(a)}postConstruct(){super.postConstruct(),this.setupAria();let e=`ag-${this.getCompId()}-display`;this.eDisplayField.setAttribute(`id`,e);let 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)});let{pickerIcon:n,inputWidth:r}=this.config;if(n){let e=this.beans.iconSvc.createIconNoSpan(n);e&&this.eIcon.appendChild(e)}r!=null&&this.setInputWidth(r)}setupAria(){let e=this.getAriaElement();e.setAttribute(`tabindex`,this.gos.get(`tabIndex`).toString()),pe(e,!1),this.ariaRole&&C(e,this.ariaRole)}onLabelOrWrapperMouseDown(e){if(e){let 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 U.UP:case U.DOWN:case U.ENTER:case U.SPACE:e.preventDefault(),this.onLabelOrWrapperMouseDown();break;case U.ESCAPE:this.isPickerDisplayed&&(e.preventDefault(),e.stopPropagation(),this.hideCurrentPicker&&this.hideCurrentPicker());break}}showPicker(){this.isPickerDisplayed=!0,this.pickerComponent||=this.createPickerComponent();let e=this.pickerComponent.getGui();e.addEventListener(`focusin`,this.onPickerFocusIn),e.addEventListener(`focusout`,this.onPickerFocusOut),this.hideCurrentPicker=this.renderAndPositionPicker(),this.toggleExpandedStyles(!0)}renderAndPositionPicker(){let e=this.pickerComponent.getGui();this.gos.get(`suppressScrollWhenPopupsAreOpen`)||([this.destroyMouseWheelFunc]=this.addManagedEventListeners({bodyScroll:()=>{this.hidePicker()}}));let t=this.getLocaleTextFunc(),{config:{pickerAriaLabelKey:n,pickerAriaLabelValue:r,modalPicker:i=!0},maxPickerHeight:a,minPickerWidth:o,maxPickerWidth:s,variableWidth:c,beans:l,eWrapper:u}=this,d={modal:i,eChild:e,closeOnEsc:!0,closedCallback:()=>{let e=_(l);this.beforeHidePicker(),e&&this.isAlive()&&this.getFocusableElement().focus()},ariaLabel:t(n,r),anchorToElement:u};e.style.position=`absolute`;let f=l.popupSvc,p=f.addPopup(d);c?(o&&(e.style.minWidth=o),e.style.width=$e(ze(u)),s&&(e.style.maxWidth=s)):Xe(e,s??ze(u));let m=a??`${Ie(f.getPopupParent())}px`;return e.style.setProperty(`max-height`,m),this.alignPickerToComponent(),p.hideFunc}alignPickerToComponent(){if(!this.pickerComponent)return;let{pickerGap:e,config:{pickerType:t},beans:{popupSvc:n,gos:r},eWrapper:i,pickerComponent:a}=this,o=r.get(`enableRtl`)?`right`:`left`;n.positionPopupByComponent({type:t,eventSource:i,ePopup:a.getGui(),position:`under`,alignSide:o,keepWithinBounds:!0,nudgeY:e})}beforeHidePicker(){this.destroyMouseWheelFunc&&=(this.destroyMouseWheelFunc(),void 0),this.toggleExpandedStyles(!1);let 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;pe(this.getAriaElement(),e);let t=this.eWrapper.classList;t.toggle(`ag-picker-expanded`,e),t.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 Xe(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()}},us=`.ag-select{align-items:center;display:flex;&.ag-disabled{opacity:.5}}:where(.ag-select){.ag-picker-field-wrapper{cursor:default}&.ag-disabled .ag-picker-field-wrapper:focus{box-shadow:none}&:not(.ag-cell-editor,.ag-label-align-top){min-height:var(--ag-list-item-height)}.ag-picker-field-display{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ag-picker-field-icon{align-items:center;display:flex}}:where(.ag-ltr) :where(.ag-select){.ag-picker-field-wrapper{padding-left:calc(var(--ag-cell-horizontal-padding)/2);padding-right:var(--ag-spacing)}}:where(.ag-rtl) :where(.ag-select){.ag-picker-field-wrapper{padding-left:var(--ag-spacing);padding-right:calc(var(--ag-cell-horizontal-padding)/2)}}.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(span){overflow:hidden;text-overflow:ellipsis;white-space:nowrap}}:where(.ag-ltr) .ag-select-list-item{padding-left:calc(var(--ag-cell-horizontal-padding)/2)}:where(.ag-rtl) .ag-select-list-item{padding-right:calc(var(--ag-cell-horizontal-padding)/2)}`,ds=class extends ls{constructor(e){super({pickerAriaLabelKey:`ariaLabelSelectField`,pickerAriaLabelValue:`Select Field`,pickerType:`ag-list`,className:`ag-select`,pickerIcon:`selectOpen`,ariaRole:`combobox`,...e}),this.registerCSS(us)}postConstruct(){this.tooltipFeature=this.createOptionalManagedBean(this.beans.registry.createDynamicBean(`tooltipFeature`,!1,{shouldDisplayTooltip:qe(()=>this.eDisplayField),getGui:()=>this.getGui()})),super.postConstruct(),this.createListComponent(),this.eWrapper.tabIndex=this.gos.get(`tabIndex`);let{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(){let e=this.createBean(new os(`select`));this.listComponent=e,e.setParentComponent(this);let t=e.getAriaElement(),n=`ag-select-list-${e.getCompId()}`;t.setAttribute(`id`,n),Ee(this.getAriaElement(),t),e.addManagedElementListeners(e.getGui(),{mousedown:e=>{e?.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){let{key:t}=e;switch(t===U.TAB&&this.hidePicker(),t){case U.ENTER:case U.UP:case U.DOWN:case U.PAGE_UP:case U.PAGE_DOWN:case U.PAGE_HOME:case U.PAGE_END:e.preventDefault(),this.isPickerDisplayed?this.listComponent?.handleKeyDown(e):super.onKeyDown(e);break;case U.ESCAPE:super.onKeyDown(e);break;case U.SPACE:this.isPickerDisplayed?e.preventDefault():super.onKeyDown(e);break}}showPicker(){let e=this.listComponent;e&&(super.showPicker(),e.refreshHighlighted())}addOptions(e){for(let 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){let{listComponent:r,config:{placeholder:i},eDisplayField:a,tooltipFeature:o}=this;if(this.value===e||!r||(n||r.setValue(e,!0),r.getValue()===this.getValue()))return this;let s=r.getDisplayValue();return s==null&&i&&(s=i),a.textContent=s,o?.setTooltipAndRefresh(s??null),super.setValue(e,t)}destroy(){this.listComponent=this.destroyBean(this.listComponent),super.destroy()}},fs={selector:`AG-SELECT`,component:ds},ps=`:where(.ag-root-wrapper,.ag-external,.ag-popup,.ag-dnd-ghost,.ag-chart),:where(.ag-root-wrapper,.ag-external,.ag-popup,.ag-dnd-ghost,.ag-chart) :where([class^=ag-]){box-sizing:border-box;&:after,&:before{box-sizing:border-box}&:where(div,span,label):focus-visible{box-shadow:inset var(--ag-focus-shadow);outline:none;&:where(.invalid){box-shadow:inset var(--ag-focus-error-shadow)}}&:where(button){color:inherit}}:where(.ag-root-wrapper,ag-external,.ag-popup,.ag-dnd-ghost,.ag-chart) :where([class^=ag-]) ::-ms-clear{display:none}.ag-hidden{display:none!important}.ag-invisible{visibility:hidden!important}.ag-tab-guard{display:block;height:0;position:absolute;width:0}.ag-tab-guard-top{top:1px}.ag-tab-guard-bottom{bottom:1px}.ag-measurement-container{height:0;overflow:hidden;visibility:hidden;width:0}.ag-measurement-element-border{display:inline-block;&:before{border-left:var(--ag-internal-measurement-border);content:"";display:block}}.ag-popup-child{top:0;z-index:5;&:where(:not(.ag-tooltip-custom)){box-shadow:var(--ag-popup-shadow)}}.ag-input-wrapper,.ag-picker-field-wrapper{align-items:center;display:flex;flex:1 1 auto;line-height:normal;position:relative}.ag-input-field{align-items:center;display:flex;flex-direction:row}.ag-input-field-input:where(:not([type=checkbox],[type=radio])){flex:1 1 auto;min-width:0;width:100%}.ag-chart,.ag-dnd-ghost,.ag-external,.ag-popup,.ag-root-wrapper{cursor:default;line-height:normal;white-space:normal;-webkit-font-smoothing:antialiased;background-color:var(--ag-background-color);color:var(--ag-text-color);color-scheme:var(--ag-browser-color-scheme);font-family:var(--ag-font-family);font-size:var(--ag-font-size);--ag-indentation-level:0}:where(.ag-icon):before{align-items:center;background-color:currentcolor;color:inherit;content:"";display:flex;font-family:inherit;font-size:var(--ag-icon-size);font-style:normal;font-variant:normal;height:var(--ag-icon-size);justify-content:center;line-height:var(--ag-icon-size);-webkit-mask-size:contain;mask-size:contain;text-transform:none;width:var(--ag-icon-size)}.ag-icon{background-position:50%;background-repeat:no-repeat;background-size:contain;color:var(--ag-icon-color);display:block;height:var(--ag-icon-size);position:relative;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:var(--ag-icon-size)}.ag-disabled,[disabled]{.ag-icon{opacity:.5}&.ag-icon-grip{opacity:.35}}.ag-resizer{pointer-events:none;position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none;z-index:1}:where(.ag-resizer){&.ag-resizer-topLeft{cursor:nwse-resize;height:5px;left:0;top:0;width:5px}&.ag-resizer-top{cursor:ns-resize;height:5px;left:5px;right:5px;top:0}&.ag-resizer-topRight{cursor:nesw-resize;height:5px;right:0;top:0;width:5px}&.ag-resizer-right{bottom:5px;cursor:ew-resize;right:0;top:5px;width:5px}&.ag-resizer-bottomRight{bottom:0;cursor:nwse-resize;height:5px;right:0;width:5px}&.ag-resizer-bottom{bottom:0;cursor:ns-resize;height:5px;left:5px;right:5px}&.ag-resizer-bottomLeft{bottom:0;cursor:nesw-resize;height:5px;left:0;width:5px}&.ag-resizer-left{bottom:5px;cursor:ew-resize;left:0;top:5px;width:5px}}`,ms=typeof window!=`object`||!window?.document?.fonts?.forEach,hs=!1,gs=(e,t,n,r,i,a)=>{if(ms||hs)return;r&&(e=`@layer ${CSS.escape(r).replaceAll(`\\.`,`.`)} { ${e} }`);let o=xs.map.get(t);if(o||(o=[],xs.map.set(t,o)),o.some(t=>t.css===e))return;let s=document.createElement(`style`);a&&s.setAttribute(`nonce`,a),s.dataset.agGlobalCss=n,s.textContent=e;let c={css:e,el:s,priority:i},l;for(let e of o){if(e.priority>i)break;l=e}if(l){l.el.insertAdjacentElement(`afterend`,s);let e=o.indexOf(l);o.splice(e+1,0,c)}else t.insertBefore(s,t.querySelector(`:not(title, meta)`)),o.push(c)},_s=(e,t,n,r)=>{gs(ps,e,`shared`,t,0,n),r?.forEach((r,i)=>r.forEach(r=>gs(r,e,i,t,0,n)))},vs=e=>{xs.grids.add(e)},ys=e=>{if(xs.grids.delete(e),xs.grids.size===0){xs.map=new WeakMap;for(let e of document.head.querySelectorAll(`style[data-ag-global-css]`))e.remove()}},bs,xs=(bs=typeof window==`object`?window:{}).agStyleInjectionState??(bs.agStyleInjectionState={map:new WeakMap,grids:new Set}),Ss=e=>new Ts(e),Cs=`$default`,ws=0,Ts=class{constructor({feature:e,params:t,modeParams:n={},css:r,cssImports:i}){this.feature=e,this.css=r,this.cssImports=i,this.modeParams={[Cs]:{...n[Cs]??{},...t??{}},...n}}use(e,t,n){let r=this._inject;if(r==null){let{css:e}=this;if(e){let t=`ag-theme-${this.feature??`part`}-${++ws}`;typeof e==`function`&&(e=e()),e=`:where(.${t}) {
|
|
5
5
|
${e}
|
|
@@ -60,5 +60,5 @@ See ${On(e,t)}`;return Array.isArray(r)?r.concat(i):[r,i]}var Oy={1:`Charting Ag
|
|
|
60
60
|
`)}checkProperties(e,t,n,r,i){let a=rb(Object.getOwnPropertyNames(e),[...[`__ob__`,`__v_skip`,`__metadata__`],...t,...n],n),o=Object.keys(a);for(let e of o){let t=`invalid ${r} property '${e}' did you mean any of these: ${a[e].slice(0,8).join(`, `)}.`;n.includes(`context`)&&(t+=`
|
|
61
61
|
If you are trying to annotate ${r} with application data, use the '${r}.context' property instead.`),Kt(t)}o.length>0&&i&&Kt(`to see all the valid ${r} properties please check: ${this.beans.frameworkOverrides.getDocLink(i)}`)}};function rb(e,t,n){let r={},i=e.filter(e=>!t.some(t=>t===e));if(i.length>0)for(let e of i)r[e]=zo({inputValue:e,allSuggestions:n}).values;return r}var ib=new Set([`firstChildChanged`,`lastChildChanged`,`childIndexChanged`]),ab={moduleName:`Validation`,version:j,beans:[nb]};function ob(e){let t=e.sibling;t&&(t.childrenAfterFilter=e.childrenAfterFilter)}var sb=class extends O{constructor(){super(...arguments),this.beanName=`filterStage`,this.step=`filter`,this.refreshProps=[`excludeChildrenWhenTreeDataFiltering`]}wireBeans(e){this.filterManager=e.filterManager}execute(e){let t=!!this.filterManager?.isChildFilterPresent();this.beans.formula?.active?this.softFilter(t,e):this.filterNodes(t,e)}filterNodes(e,t){let n=(t,n)=>{t.hasChildren()&&e&&!n?t.childrenAfterFilter=t.childrenAfterGroup.filter(e=>{let t=e.childrenAfterFilter&&e.childrenAfterFilter.length>0,n=e.data&&this.filterManager.doesRowPassFilter({rowNode:e});return t||n}):t.childrenAfterFilter=t.childrenAfterGroup,ob(t)};if(this.doingTreeDataFiltering()){let e=(t,r)=>{if(t.childrenAfterGroup)for(let i=0;i<t.childrenAfterGroup.length;i++){let a=t.childrenAfterGroup[i],o=r||this.filterManager.doesRowPassFilter({rowNode:a});a.childrenAfterGroup?e(t.childrenAfterGroup[i],o):n(a,o)}n(t,r)};t.executeFromRootNode(t=>e(t,!1))}else t.forEachChangedNodeDepthFirst(e=>n(e,!1),!0)}softFilter(e,t){t.forEachChangedNodeDepthFirst(t=>{if(t.childrenAfterFilter=t.childrenAfterGroup,t.hasChildren())for(let n of t.childrenAfterGroup)n.softFiltered=e&&!(n.data&&this.filterManager.doesRowPassFilter({rowNode:n}));ob(t)},!0)}doingTreeDataFiltering(){let{gos:e}=this;return e.get(`treeData`)&&!e.get(`excludeChildrenWhenTreeDataFiltering`)}},cb=class extends jd{constructor(){super(...arguments),this.iconCreated=!1}wireComp(e,t,n,r,i){this.comp=e;let a=Gi(this,this.beans.context,i);this.eButtonShowMainFilter=n,this.eFloatingFilterBody=r,this.setGui(t,a),this.setupActive(),this.refreshHeaderStyles(),this.setupWidth(a),this.setupLeft(a),this.setupHover(a),this.setupFocus(a),this.setupAria(),this.setupFilterButton(),this.setupUserComp(),this.setupSyncWithFilter(a),this.setupUi(),a.addManagedElementListeners(this.eButtonShowMainFilter,{click:this.showParentFilter.bind(this)}),this.setupFilterChangedListener(a);let o=()=>this.onColDefChanged(a);a.addManagedListeners(this.column,{colDefChanged:o}),a.addManagedEventListeners({filterSwitched:({column:e})=>{e===this.column&&o()}}),a.addDestroyFunc(()=>{this.eButtonShowMainFilter=null,this.eFloatingFilterBody=null,this.userCompDetails=null,this.clearComponent()})}resizeHeader(){}moveHeader(){}getHeaderClassParams(){let{column:e,beans:t}=this,n=e.colDef;return L(t.gos,{colDef:n,column:e,floatingFilter:!0})}setupActive(){let 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;let e=Y(`filter`,this.beans,this.column);e&&(this.iconCreated=!0,this.eButtonShowMainFilter.appendChild(e))}setupFocus(e){e.createManagedBean(new Rl(this.eGui,{shouldStopEventPropagation:this.shouldStopEventPropagation.bind(this),onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this)}))}setupAria(){let e=this.getLocaleTextFunc();ae(this.eButtonShowMainFilter,e(`ariaFilterMenuOpen`,`Open Filter Menu`))}onTabKeyDown(e){let{beans:t}=this;if(h(t)===this.eGui)return;let n=_o(t,this.eGui,null,e.shiftKey);if(n){t.headerNavigation?.scrollToColumn(this.column),e.preventDefault(),n.focus();return}let r=this.findNextColumnWithFloatingFilter(e.shiftKey);r&&t.focusSvc.focusHeaderPosition({headerPosition:{headerRowIndex:this.rowCtrl.rowIndex,column:r},event:e})&&e.preventDefault()}findNextColumnWithFloatingFilter(e){let t=this.beans.visibleCols,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);let t=this.getWrapperHasFocus();switch(e.key){case U.UP:case U.DOWN:case U.LEFT:case U.RIGHT:if(t)return;Fl(e);case U.ENTER:t&&go(this.eGui)&&e.preventDefault();break;case U.ESCAPE:t||this.eGui.focus()}}onFocusIn(e){if(this.eGui.contains(e.relatedTarget))return;let t=!!e.relatedTarget&&!e.relatedTarget.classList.contains(`ag-floating-filter`),n=!!e.relatedTarget&&Pe(e.relatedTarget,`ag-floating-filter`);if(t&&n&&e.target===this.eGui){let e=this.lastFocusEvent,t=!!(e&&e.key===U.TAB);if(e&&t){let t=e.shiftKey;go(this.eGui,t)}}this.focusThis()}setupHover(e){this.beans.colHover?.addHeaderFilterColumnHoverListener(e,this.comp,this.column,this.eGui)}setupLeft(e){let t=new Od(this.column,this.eGui,this.beans);e.createManagedBean(t)}setupFilterButton(){this.suppressFilterButton=!this.beans.menuSvc?.isFloatingFilterButtonEnabled(this.column),this.highlightFilterButtonWhenActive=!I(this.gos)}setupUserComp(){if(!this.active)return;let e=this.beans.colFilter?.getFloatingFilterCompDetails(this.column,()=>this.showParentFilter());e&&this.setCompDetails(e)}setCompDetails(e){this.userCompDetails=e,this.comp.setCompDetails(e)}showParentFilter(){let 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;let{beans:{colFilter:t},column:n,gos:r}=this,i=e=>{if(e?.source===`filterDestroyed`&&(!this.isAlive()||!t?.isAlive()))return;let i=this.comp.getFloatingFilterComp();i&&i.then(i=>{if(i){if(r.get(`enableFilterHandlers`)){let t=e,n=`filter`;t?.afterFloatingFilter?n=`ui`:t?.afterDataChange?n=`dataChanged`:e?.source===`api`&&(n=`api`),this.updateFloatingFilterParams(this.userCompDetails,n);return}let a=t?.getCurrentFloatingFilterParentModel(n),o=e?{...e,columns:e.columns??[],source:e.source===`api`?`api`:`columnFilter`}:null;i.onParentModelChanged(a,o)}})};[this.destroySyncListener]=e.addManagedListeners(n,{filterChanged:i}),t?.isFilterActive(n)&&i(null)}setupWidth(e){let t=()=>{let e=`${this.column.getActualWidth()}px`;this.comp.setWidth(e)};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){let 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){let t=this.active;this.setupActive();let n=!t&&this.active;t&&!this.active&&(this.destroySyncListener(),this.destroyFilterChangedListener());let r=this.beans.colFilter,i=this.active?r?.getFloatingFilterCompDetails(this.column,()=>this.showParentFilter()):null,a=this.comp.getFloatingFilterComp();!a||!i?this.updateCompDetails(e,i,n):a.then(t=>{!t||r?.areFilterCompsDifferent(this.userCompDetails??null,i)?this.updateCompDetails(e,i,n):this.updateFloatingFilterParams(i,`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(e=>{typeof e?.refresh==`function`&&(this.gos.get(`enableFilterHandlers`)&&(n={...n,model:J(this.beans.colFilter?.model??{},this.column.getColId()),source:t}),e.refresh(n))})}addResizeAndMoveKeyboardListeners(){}destroy(){super.destroy(),this.destroySyncListener=null,this.destroyFilterChangedListener=null}};function lb(e,t){let n=e.colModel.getCol(t);if(!n){N(12,{colKey:t});return}e.menuSvc?.showColumnMenu({column:n,positionBy:`auto`})}function ub(e){e.menuSvc?.hidePopupMenu()}var db={moduleName:`SharedMenu`,version:j,beans:[Ld],apiFunctions:{showColumnMenu:lb,hidePopupMenu:ub}},fb={moduleName:`Popup`,version:j,beans:[class extends Oc{getDefaultPopupParent(){return this.beans.ctrlsSvc.get(`gridCtrl`).getGui()}callPostProcessPopup(e,t,n,r,i){let a=this.gos.getCallback(`postProcessPopup`);if(a){let{column:o,rowNode:s}=e??{};a({column:o,rowNode:s,ePopup:n,type:t,eventSource:r,mouseEvent:i})}}getActivePopups(){return this.popupList.map(e=>e.element)}hasAnchoredPopup(){return this.popupList.some(e=>e.isAnchored)}isStopPropagation(e){return Il(e)}}]},pb=`.ag-set-filter{--ag-indentation-level:0}.ag-set-filter-item{align-items:center;display:flex;height:100%}:where(.ag-ltr) .ag-set-filter-item{padding-left:calc(var(--ag-widget-container-horizontal-padding) + var(--ag-indentation-level)*var(--ag-set-filter-indent-size))}:where(.ag-rtl) .ag-set-filter-item{padding-right:calc(var(--ag-widget-container-horizontal-padding) + var(--ag-indentation-level)*var(--ag-set-filter-indent-size))}.ag-set-filter-item-checkbox{display:flex;height:100%;width:100%}.ag-set-filter-group-icons{display:block;>*{cursor:pointer}}:where(.ag-ltr) .ag-set-filter-group-icons{margin-right:var(--ag-widget-container-horizontal-padding)}:where(.ag-rtl) .ag-set-filter-group-icons{margin-left:var(--ag-widget-container-horizontal-padding)}.ag-filter-body-wrapper{display:flex;flex-direction:column}:where(.ag-menu:not(.ag-tabs) .ag-filter) .ag-filter-body-wrapper,:where(.ag-menu:not(.ag-tabs) .ag-filter)>:not(.ag-filter-wrapper){min-width:180px}.ag-filter-filter{flex:1 1 0px}.ag-filter-condition{display:flex;justify-content:center}.ag-floating-filter-body{display:flex;flex:1 1 auto;height:100%;position:relative}.ag-floating-filter-full-body{align-items:center;display:flex;flex:1 1 auto;height:100%;overflow:hidden;width:100%}:where(.ag-floating-filter-full-body)>div{flex:1 1 auto}.ag-floating-filter-input{align-items:center;display:flex;width:100%;>*{flex:1 1 auto}:where(.ag-input-field-input[type=date]),: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(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;min-height:calc(var(--ag-list-item-height) + var(--ag-widget-container-vertical-padding) + var(--ag-widget-vertical-spacing));overflow-y:auto;padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding);padding-bottom:calc(var(--ag-widget-container-vertical-padding) - var(--ag-widget-vertical-spacing));&>*{margin-bottom:var(--ag-widget-vertical-spacing)}:where(.ag-resizer-wrapper){margin:0}}.ag-multi-filter-menu-item{margin:var(--ag-spacing) 0}.ag-multi-filter-group-title-bar{background-color:transparent;color:var(--ag-header-text-color);font-weight:500;padding:calc(var(--ag-spacing)*1.5) var(--ag-spacing)}.ag-group-filter-field-select-wrapper{display:flex;flex-direction:column;gap:var(--ag-widget-vertical-spacing);padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding)}`;function mb(e){let t=e.filterManager;return!!t?.isColumnFilterPresent()||!!t?.isAggregateFilterPresent()}function hb(e,t){return e.filterManager?.getColumnFilterInstance(t)??Promise.resolve(void 0)}function gb(e,t){let n=e.colModel.getColDefCol(t);if(n)return e.colFilter?.destroyFilter(n,`api`)}function _b(e,t){e.frameworkOverrides.wrapIncoming(()=>e.filterManager?.setFilterModel(t))}function vb(e){return e.filterManager?.getFilterModel()??{}}function yb(e,t,n){let{gos:r,colModel:i,colFilter:a}=e;n&&!r.get(`enableFilterHandlers`)&&(M(288),n=!1);let o=i.getColDefCol(t);return o?a?.getModelForColumn(o,n)??null:null}function bb(e,t,n){return e.filterManager?.setColumnFilterModel(t,n)??Promise.resolve()}function xb(e,t){let n=e.colModel.getCol(t);if(!n){N(12,{colKey:t});return}e.menuSvc?.showFilterMenu({column:n,containerType:`columnFilter`,positionBy:`auto`})}function Sb(e){e.menuSvc?.hideFilterMenu()}function Cb(e,t){let n=e.colModel.getCol(t);if(!n){N(12,{colKey:t});return}return e.colFilter?.getHandler(n,!0)}function wb(e,t){let{colModel:n,colFilter:r,gos:i}=e;if(!i.get(`enableFilterHandlers`)){M(287);return}let{colId:a,action:o}=t;if(a){let e=n.getColById(a);e&&r?.updateModel(e,o)}else r?.updateAllModels(o)}var Tb={filterHandler:()=>({doesFilterPass:()=>!0})},Eb=class extends O{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={...al},this.isGlobalButtons=!1,this.activeFilterComps=new Set}postConstruct(){this.addManagedEventListeners({gridColumnsChanged:this.onColumnsChanged.bind(this),dataTypesInferred:this.processFilterModelUpdateQueue.bind(this)});let 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){let{colModel:r,dataTypeSvc:i,filterManager:a}=this.beans;if(i?.isPendingInference){this.modelUpdates.push({model:e,source:t});return}let o=[],c=this.getModel(!0);if(e){let t=new Set(Object.keys(e));this.allColumnFilters.forEach((n,r)=>{let i=e[r];o.push(this.setModelOnFilterWrapper(n,i)),t.delete(r)}),t.forEach(t=>{let n=r.getColDefCol(t)||r.getCol(t);if(!n){M(62,{colId:t});return}if(!n.isFilterAllowed()){M(63,{colId:t});return}let i=this.getOrCreateFilterWrapper(n,!0);if(!i){M(64,{colId:t});return}o.push(this.setModelOnFilterWrapper(i,e[t],!0))})}else this.model={},this.allColumnFilters.forEach(e=>{o.push(this.setModelOnFilterWrapper(e,null))});H.all(o).then(()=>{let e=this.getModel(!0),r=[];this.allColumnFilters.forEach((t,n)=>{s(c?c[n]:null,e?e[n]:null)||r.push(t.column)}),r.length>0?a?.onFilterChanged({columns:r,source:t}):n&&this.updateActive(`filterChanged`)})}getModel(e){let t={},{allColumnFilters:n,initialModel:r,beans:{colModel:a}}=this;if(n.forEach((e,n)=>{let r=this.getModelFromFilterWrapper(e);i(r)&&(t[n]=r)}),!e)for(let e of Object.keys(r)){let o=r[e];i(o)&&!n.has(e)&&a.getCol(e)?.isFilterAllowed()&&(t[e]=o)}return t}setState(e,t,n=`api`){if(this.state.clear(),t)for(let e of Object.keys(t)){let n=t[e];this.state.set(e,{model:J(this.model,e),state:n})}this.setModel(e,n,!0)}getState(){let e=this.state;if(!e.size)return;let t={},n=!1;return e.forEach((e,r)=>{let i=e.state;i!=null&&(n=!0,t[r]=i)}),n?t:void 0}getModelFromFilterWrapper(e){let t=e.column.getColId();if(e.isHandler)return J(this.model,t);let n=e.filter;return n?typeof n.getModel==`function`?n.getModel():(M(66),null):J(this.initialModel,t)}isFilterPresent(){return this.activeColumnFilters.length>0}isAggFilterPresent(){return!!this.activeAggregateFilters.length}disableFilters(){this.initialModel={};let{allColumnFilters:e}=this;return e.size?(e.forEach(e=>this.disposeFilterWrapper(e,`advancedFilterEnabled`)),!0):!1}updateActiveFilters(){let e=e=>e?e.isFilterActive?e.isFilterActive():(M(67),!1):!1,{colModel:t,gos:n}=this.beans,r=!!Jn(n),i=e=>{if(!e.isPrimary())return!0;let n=!t.isPivotActive();return!e.isValueActive()||!n?!1:t.isPivotMode()?!0:r},a=[],o=[],s=(e,t,n)=>{t&&(i(e)?a.push(n):o.push(n))},c=[];return this.allColumnFilters.forEach(t=>{let n=t.column,r=n.getColId();if(t.isHandler)c.push(H.resolve().then(()=>{s(n,this.isHandlerActive(n),{colId:r,isHandler:!0,handler:t.handler,handlerParams:t.handlerParams})}));else{let i=sl(t);i&&c.push(i.then(t=>{s(n,e(t),{colId:r,isHandler:!1,comp:t})}))}}),H.all(c).then(()=>{this.activeAggregateFilters=a,this.activeColumnFilters=o})}updateFilterFlagInColumns(e,t){let n=[];return this.allColumnFilters.forEach(r=>{let i=r.column;if(r.isHandler)n.push(H.resolve().then(()=>{this.setColFilterActive(i,this.isHandlerActive(i),e,t)}));else{let a=sl(r);a&&n.push(a.then(n=>{this.setColFilterActive(i,n.isFilterActive(),e,t)}))}}),this.beans.groupFilter?.updateFilterFlags(e,t),H.all(n)}doFiltersPass(e,t,n){let{data:r,aggData:i}=e,a=n?this.activeAggregateFilters:this.activeColumnFilters,o=n?i:r,s=this.model;for(let n=0;n<a.length;n++){let r=a[n],{colId:i,isHandler:c}=r;if(i!==t)if(c){let{handler:t,handlerParams:n}=r;if(!t.doesFilterPass({node:e,data:o,model:J(s,i),handlerParams:n}))return!1}else{let t=r.comp;if(typeof t.doesFilterPass!=`function`){N(91);continue}if(!t.doesFilterPass({node:e,data:o}))return!1}}return!0}getHandlerParams(e){let t=this.allColumnFilters.get(e.getColId());return t?.isHandler?t.handlerParams:void 0}callOnFilterChangedOutsideRenderCycle(e){let{rowRenderer:t,filterManager:n}=this.beans,r=()=>{this.isAlive()&&n?.onFilterChanged(e)};t.isRefreshInProgress()?setTimeout(r,0):r()}updateBeforeFilterChanged(e={}){let{column:t,additionalEventAttributes:n}=e,r=t?.getColId();return this.updateActiveFilters().then(()=>this.updateFilterFlagInColumns(`filterChanged`,n).then(()=>{this.allColumnFilters.forEach(e=>{let{column:t,isHandler:n}=e;r!==t.getColId()&&(n&&e.handler.onAnyFilterChanged?.(),sl(e,n)?.then(e=>{typeof e?.onAnyFilterChanged==`function`&&e.onAnyFilterChanged()}))}),this.processingFilterChange=!0}))}updateAfterFilterChanged(){this.processingFilterChange=!1}isSuppressFlashingCellsBecauseFiltering(){return!(this.gos.get(`allowShowChangeAfterFilter`)??!1)&&this.processingFilterChange}onNewRowsLoaded(e){let t=[];this.allColumnFilters.forEach(e=>{let n=e.isHandler;n&&e.handler.onNewRowsLoaded?.();let r=sl(e,n);r&&t.push(r.then(e=>{e.onNewRowsLoaded?.()}))}),H.all(t).then(()=>this.updateActive(e,{afterDataChange:!0}))}updateActive(e,t){this.updateFilterFlagInColumns(e,t).then(()=>this.updateActiveFilters())}createGetValue(e,t){let{filterValueSvc:n,colModel:r}=this.beans;return(i,a)=>{let o=a?r.getCol(a):e;return o?n.getValue(o,i,t):void 0}}isFilterActive(e){let t=this.cachedFilter(e);if(t?.isHandler)return this.isHandlerActive(e);let n=t?.filter;return n?n.isFilterActive():J(this.initialModel,e.getColId())!=null}isHandlerActive(e){let t=i(J(this.model,e.getColId()));if(t)return t;let n=this.beans.groupFilter;return n?.isGroupFilter(e)?n.isFilterActive(e):!1}getOrCreateFilterUi(e){let t=this.getOrCreateFilterWrapper(e,!0);return t?sl(t):null}getFilterUiForDisplay(e){let t=this.getOrCreateFilterWrapper(e,!0);if(!t)return null;let n=sl(t);return n?n.then(e=>({comp:e,params:t.filterUi.filterParams,isHandler:t.isHandler})):null}getHandler(e,t){let 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 br(this.gos)?t?`agSetColumnFloatingFilter`:`agSetColumnFilter`:Ml(e(),t)}getDefaultFloatingFilter(e){return this.getDefaultFilter(e,!0)}createFilterComp(e,t,n,r,i,a){let o=()=>{let o=r(this.createFilterCompParams(e,i,a),i);return ka(this.beans.userCompFactory,t,o,n)},s=o();return s?{compDetails:s,createFilterUi:e=>(e?o():s).newAgStackInstance()}:null}createFilterInstance(e,t,n,r){let i=this.beans.selectableFilter;i?.isSelectable(t)&&(t=i.getFilterDef(e,t));let{handler:a,handlerParams:o,handlerGenerator:s}=this.createHandler(e,t,n)??{},c=this.createFilterComp(e,t,n,r,!!a,`init`);if(!c)return{compDetails:null,createFilterUi:null,handler:a,handlerGenerator:s,handlerParams:o};let{compDetails:l,createFilterUi:u}=c;return this.isGlobalButtons&&(l.params?.buttons?.length||M(281,{colId:e.getColId()})),{compDetails:l,handler:a,handlerGenerator:s,handlerParams:o,createFilterUi:u}}createBaseFilterParams(e,t){let{filterManager:n,rowModel:r}=this.beans;return L(this.gos,{column:e,colDef:e.getColDef(),getValue:this.createGetValue(e),doesRowPassOtherFilter:t?()=>!0:t=>n?.doesRowPassOtherFilters(e.getColId(),t)??!0,rowModel:r})}createFilterCompParams(e,t,n,r){let i=this.filterChangedCallbackFactory(e),a=this.createBaseFilterParams(e,r);if(a.filterChangedCallback=i,a.filterModifiedCallback=r?()=>{}:t=>this.filterModified(e,t),t){let t=a,r=e.getColId(),o=J(this.model,r);t.model=o,t.state=this.state.get(r)??{model:o},t.onModelChange=(t,n)=>{this.updateStoredModel(r,t),this.refreshHandlerAndUi(e,t,`ui`,!1,n).then(()=>{i({...n,source:`columnFilter`})})},t.onStateChange=t=>{this.updateState(e,t),this.updateOrRefreshFilterUi(e)},t.onAction=(t,n,r)=>{this.updateModel(e,t,n),this.dispatchLocalEvent({type:`filterAction`,column:e,action:t,event:r})},t.getHandler=()=>this.getHandler(e,!0),t.onUiChange=t=>this.filterUiChanged(e,t),t.source=n}return a}createFilterUiForHandler(e,t){return t?{created:!1,create:t,filterParams:e.params,compDetails:e}:null}createFilterUiLegacy(e,t,n){let r=t(),i={created:!0,create:t,filterParams:e.params,compDetails:e,promise:r};return r.then(n),i}createFilterWrapper(e){let{compDetails:t,handler:n,handlerGenerator:r,handlerParams:i,createFilterUi:a}=this.createFilterInstance(e,e.getColDef(),this.getDefaultFilter(e),e=>e),o=e.getColId();if(n)return delete this.initialModel[o],n.init?.({...i,source:`init`,model:J(this.model,o)}),{column:e,isHandler:!0,handler:n,handlerGenerator:r,handlerParams:i,filterUi:this.createFilterUiForHandler(t,a)};if(a){let n={column:e,filterUi:null,isHandler:!1};return n.filterUi=this.createFilterUiLegacy(t,a,e=>{n.filter=e??void 0}),n}return{column:e,filterUi:null,isHandler:!1}}createHandlerFunc(e,t,n){let{gos:r,frameworkOverrides:i,registry:a}=this.beans,o,s=e=>{let t=e.filter;return Xi(t)?t.handler||(o=t.doesFilterPass,o?()=>({doesFilterPass:o}):void 0):typeof t==`string`?t:void 0},c=r.get(`enableFilterHandlers`),l=c?s(t):void 0,u=e=>()=>this.createBean(a.createDynamicBean(e,!0)),d,f;if(typeof l==`string`){let e=r.get(`filterHandlers`)?.[l];e==null?ol.has(l)&&(d=u(l),f=l):d=e}else d=l;if(!d){let e,{compName:r,jsComp:a,fwComp:o}=Na(i,t);r?e=r:a==null&&o==null&&t.filter===!0&&(e=n),f=this.handlerMap[e],f&&(d=u(f))}return d?{filterHandler:d,handlerNameOrCallback:o??f}:c?(P(r)&&M(277,{colId:e.getColId()}),Tb):void 0}createHandler(e,t,n){let r=this.createHandlerFunc(e,t,n);if(!r)return;let i=Pa(this.beans.userCompFactory,t,this.createFilterCompParams(e,!0,`init`)),{handlerNameOrCallback:a,filterHandler:o}=r,{handler:s,handlerParams:c}=this.createHandlerFromFunc(e,o,i);return{handler:s,handlerParams:c,handlerGenerator:a??o}}createHandlerFromFunc(e,t,n){let r=e.getColDef();return{handler:t(L(this.gos,{column:e,colDef:r})),handlerParams:this.createHandlerParams(e,n)}}createHandlerParams(e,t){let n=e.getColDef(),r=e.getColId(),i=this.filterChangedCallbackFactory(e);return L(this.gos,{colDef:n,column:e,getValue:this.createGetValue(e),doesRowPassOtherFilter:e=>this.beans.filterManager?.doesRowPassOtherFilters(r,e)??!0,onModelChange:(t,n)=>{this.updateStoredModel(r,t),this.refreshHandlerAndUi(e,t,`handler`,!1,n).then(()=>{i({...n,source:`columnFilter`})})},filterParams:t})}onColumnsChanged(){let e=[],{colModel:t,filterManager:n,groupFilter:r}=this.beans;this.allColumnFilters.forEach((n,r)=>{let i;i=n.column.isPrimary()?t.getColDefCol(r):t.getCol(r),!(i&&i===n.column)&&(e.push(n.column),this.disposeFilterWrapper(n,`columnChanged`),this.disposeColumnListener(r))});let i=r&&e.every(e=>r.isGroupFilter(e));e.length>0&&!i&&n?.onFilterChanged({columns:e,source:`api`})}isFilterAllowed(e){if(!e.isFilterAllowed())return!1;let t=this.beans.groupFilter;return t?.isGroupFilter(e)?t.isFilterAllowed(e):!0}getFloatingFilterCompDetails(e,t){let{userCompFactory:n,frameworkOverrides:r,selectableFilter:i,gos:a}=this.beans,o=t=>{this.getOrCreateFilterUi(e)?.then(e=>{t(Fa(e))})},s=e.getColDef(),c=i?.isSelectable(s)?i.getFilterDef(e,s):s,l=Vl(r,c,()=>this.getDefaultFloatingFilter(e))??`agReadOnlyFloatingFilter`,u=a.get(`enableFilterHandlers`),d=L(a,{column:e,filterParams:Pa(n,c,this.createFilterCompParams(e,u,`init`,!0)),currentParentModel:()=>this.getCurrentFloatingFilterParentModel(e),parentFilterInstance:o,showParentFilter:t});if(u){let t=d,n=e.getColId(),r=this.filterChangedCallbackFactory(e);t.onUiChange=t=>this.floatingFilterUiChanged(e,t),t.model=J(this.model,n),t.onModelChange=(t,i)=>{this.updateStoredModel(n,t),this.refreshHandlerAndUi(e,t,`floating`,!0,i).then(()=>{r({...i,source:`columnFilter`})})},t.getHandler=()=>this.getHandler(e,!0),t.source=`init`}return Ma(n,s,d,l)}getCurrentFloatingFilterParentModel(e){return this.getModelFromFilterWrapper(this.cachedFilter(e)??{column:e})}destroyFilterUi(e,t,n,r){let i=`paramsUpdated`;if(e.isHandler){let a=t.getColId();delete this.initialModel[a],this.state.delete(a);let o=e.filterUi;e.filterUi=this.createFilterUiForHandler(n,r);let s=this.eventSvc;o?.created?o.promise.then(e=>{this.destroyBean(e),s.dispatchEvent({type:`filterDestroyed`,source:i,column:t})}):s.dispatchEvent({type:`filterHandlerDestroyed`,source:i,column:t})}else this.destroyFilter(t,i)}destroyFilter(e,t=`api`){let n=e.getColId(),r=this.allColumnFilters.get(n);this.disposeColumnListener(n),delete this.initialModel[n],r&&this.disposeFilterWrapper(r,t).then(t=>{t&&this.isAlive()&&this.beans.filterManager?.onFilterChanged({columns:[e],source:`api`})})}disposeColumnListener(e){let t=this.allColumnListeners.get(e);t&&(this.allColumnListeners.delete(e),t())}disposeFilterWrapper(e,t){let n=!1,{column:r,isHandler:i,filterUi:a}=e,o=r.getColId();i&&(n=this.isHandlerActive(r),this.destroyBean(e.handler),delete this.model[o],this.state.delete(o));let s=()=>{this.setColFilterActive(r,!1,`filterDestroyed`),this.allColumnFilters.delete(o),this.eventSvc.dispatchEvent({type:`filterDestroyed`,source:t,column:r})};if(a){if(a.created)return a.promise.then(e=>(n=i?n:!!e?.isFilterActive(),this.destroyBean(e),s(),n));s()}return H.resolve(n)}filterChangedCallbackFactory(e){return t=>{this.callOnFilterChangedOutsideRenderCycle({additionalEventAttributes:t,columns:[e],column:e,source:t?.source??`columnFilter`})}}filterParamsChanged(e,t=`api`){let n=this.allColumnFilters.get(e);if(!n)return;let r=this.beans,i=n.column,a=i.getColDef(),o=i.isFilterAllowed(),s=this.getDefaultFilter(i),c=r.selectableFilter,l=c?.isSelectable(a)?c.getFilterDef(i,a):a,u=o?this.createHandlerFunc(i,l,this.getDefaultFilter(i)):void 0,d=!!u,f=n.isHandler;if(f!=d){this.destroyFilter(i,`paramsUpdated`);return}let{compDetails:p,createFilterUi:m}=(o?this.createFilterComp(i,l,s,e=>e,d,`colDef`):null)??{compDetails:null,createFilterUi:null},h=p?.params??Pa(r.userCompFactory,l,this.createFilterCompParams(i,d,`colDef`));if(f){let r=u?.handlerNameOrCallback??u?.filterHandler,a=J(this.model,e);if(n.handlerGenerator!=r){let o=n.handler,{handler:s,handlerParams:c}=this.createHandlerFromFunc(i,u.filterHandler,h);n.handler=s,n.handlerParams=c,n.handlerGenerator=r,delete this.model[e],s.init?.({...c,source:`init`,model:null}),this.destroyBean(o),a!=null&&this.beans.filterManager?.onFilterChanged({columns:[i],source:t})}else{let e=this.createHandlerParams(i,p?.params);n.handlerParams=e,n.handler.refresh?.({...e,source:`colDef`,model:a})}}if(this.areFilterCompsDifferent(n.filterUi?.compDetails??null,p)||!n.filterUi||!p){this.destroyFilterUi(n,i,p,m);return}n.filterUi.filterParams=h,sl(n,f)?.then(e=>{(e?.refresh?e.refresh(h):!0)===!1?this.destroyFilterUi(n,i,p,m):this.dispatchLocalEvent({type:`filterParamsChanged`,column:i,params:h})})}refreshHandlerAndUi(e,t,n,r,i){let a=this.cachedFilter(e);if(!a)return r&&this.getOrCreateFilterWrapper(e,!0),H.resolve();if(!a.isHandler)return H.resolve();let{filterUi:o,handler:s,handlerParams:c}=a;return cl(()=>{if(o){let{created:e,filterParams:t}=o;if(e)return o.promise.then(e=>e?{filter:e,filterParams:t}:void 0);o.refreshed=!0}return H.resolve(void 0)},s,c,t,this.state.get(e.getColId())??{model:t},n,i)}setColumnFilterWrapper(e,t){let 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;let{componentClass:n}=e,{componentClass:r}=t;return!(n===r||n?.render&&r?.render&&n.render===r.render)}hasFloatingFilters(){return this.beans.colModel.getCols().some(e=>e.getColDef().floatingFilter)}getFilterInstance(e){let t=this.beans.colModel.getColDefCol(e);if(!t)return Promise.resolve(void 0);let n=this.getOrCreateFilterUi(t);return n?new Promise(e=>{n.then(t=>{e(Fa(t))})}):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){let{state:t,model:n}=this,r=e.getColId(),i=t.get(r);return i?i.model??null:J(n,r)}let n=this.cachedFilter(e);return n?this.getModelFromFilterWrapper(n):null}setModelForColumn(e,t){if(this.beans.dataTypeSvc?.isPendingInference){let n=()=>{},r=new Promise(e=>{n=e});return this.columnModelUpdates.push({key:e,model:t,resolve:n}),r}return new Promise(n=>{this.setModelForColumnLegacy(e,t).then(e=>n(e))})}getStateForColumn(e){return this.state.get(e)??{model:J(this.model,e)}}setModelForColumnLegacy(e,t){let n=this.beans.colModel.getColDefCol(e),r=n?this.getOrCreateFilterWrapper(n,!0):null;return r?this.setModelOnFilterWrapper(r,t):H.resolve()}setColDefPropsForDataType(e,t,n){let r=e.filter,i=r===!0?this.getDefaultFilterFromDataType(()=>t.baseDataType):r;if(typeof i!=`string`)return;let a,o,s=this.beans,{filterParams:c,filterValueGetter:l}=e;i===`agMultiColumnFilter`?{filterParams:a,filterValueGetter:o}=s.multiFilter?.getParamsForDataType(c,l,t,n)??{}:{filterParams:a,filterValueGetter:o}=kl(i,c,l,t,n,s,this.getLocaleTextFunc()),e.filterParams=a,o&&(e.filterValueGetter=o)}setColFilterActive(e,t,n,r){e.filterActive!==t&&(e.filterActive=t,e.dispatchColEvent(`filterActiveChanged`,n)),e.dispatchColEvent(`filterChanged`,n,r)}setModelOnFilterWrapper(e,t,n){return new H(r=>{if(e.isHandler){let i=e.column,a=i.getColId(),o=this.model[a];if(this.updateStoredModel(a,t),n&&t===o){r();return}this.refreshHandlerAndUi(i,t,`api`).then(()=>r());return}let i=sl(e);if(i){i.then(e=>{if(typeof e?.setModel!=`function`){M(65),r();return}(e.setModel(t)||H.resolve()).then(()=>r())});return}r()})}updateStoredModel(e,t){i(t)?this.model[e]=t:delete this.model[e];let n={model:t,state:this.state.get(e)?.state};this.state.set(e,n)}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){let r=e.getColId(),i=this.cachedFilter(e),a=()=>i?.filterUi;dl({action:t,filterParams:i?.filterUi?.filterParams,getFilterUi:a,getModel:()=>J(this.model,r),getState:()=>this.state.get(r),updateState:t=>this.updateState(e,t),updateModel:e=>a()?.filterParams?.onModelChange(e,{...n,fromAction:t}),processModelToApply:i?.isHandler?i.handler.processModelToApply?.bind(i.handler):void 0})}updateAllModels(e,t){let n=[];this.allColumnFilters.forEach((t,r)=>{let i=this.beans.colModel.getColDefCol(r);i&&dl({action:e,filterParams:t.filterUi?.filterParams,getFilterUi:()=>t.filterUi,getModel:()=>J(this.model,r),getState:()=>this.state.get(r),updateState:e=>this.updateState(i,e),updateModel:t=>{this.updateStoredModel(r,t),this.dispatchLocalEvent({type:`filterAction`,column:i,action:e}),n.push(this.refreshHandlerAndUi(i,t,`ui`))},processModelToApply:t?.isHandler?t.handler.processModelToApply?.bind(t.handler):void 0})}),n.length&&H.all(n).then(()=>{this.callOnFilterChangedOutsideRenderCycle({source:`columnFilter`,additionalEventAttributes:t,columns:[]})})}updateOrRefreshFilterUi(e){let t=e.getColId();ul(()=>this.cachedFilter(e)?.filterUi,()=>J(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(){let{state:e,model:t,activeFilterComps:n}=this;for(let e of n)if(e.source===`COLUMN_MENU`)return!1;let r=!1;for(let n of e.keys()){let i=e.get(n);if(i.valid===!1)return!1;(i.model??null)!==J(t,n)&&(r=!0)}return r}hasUnappliedModel(e){let{model:t,state:n}=this;return(n.get(e)?.model??null)!==J(t,e)}setGlobalButtons(e){this.isGlobalButtons=e,this.dispatchLocalEvent({type:`filterGlobalButtons`,isGlobal:e})}shouldKeepStateOnDetach(e,t){if(t===`newFiltersToolPanel`)return!0;let n=this.beans.filterPanelSvc;return n?.isActive?!!n.getState(e.getColId()):!1}destroy(){super.destroy(),this.allColumnFilters.forEach(e=>this.disposeFilterWrapper(e,`gridDestroyed`)),this.allColumnListeners.clear(),this.state.clear(),this.activeFilterComps.clear()}};function Db(e){return!!e.filterManager?.isAnyFilterPresent()}function Ob(e,t=`api`){e.filterManager?.onFilterChanged({source:t})}var kb=class extends O{constructor(){super(...arguments),this.beanName=`filterManager`,this.advFilterModelUpdateQueue=[]}wireBeans(e){this.quickFilter=e.quickFilter,this.advancedFilter=e.advancedFilter,this.colFilter=e.colFilter}postConstruct(){let e=this.refreshFiltersForAggregations.bind(this),t=this.updateAdvFilterColumns.bind(this);this.addManagedEventListeners({columnValueChanged:e,columnPivotChanged:e,columnPivotModeChanged:e,newColumnsLoaded:t,columnVisible:t,advancedFilterEnabledChanged:({enabled:e})=>this.onAdvFilterEnabledChanged(e),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`})});let{gos:n}=this;this.alwaysPassFilter=n.get(`alwaysPassFilter`),this.addManagedPropertyListener(`alwaysPassFilter`,()=>{this.alwaysPassFilter=n.get(`alwaysPassFilter`),this.onFilterChanged({source:`api`})})}isExternalFilterPresentCallback(){let e=this.gos.getCallback(`isExternalFilterPresent`);return typeof e==`function`&&e({})}doesExternalFilterPass(e){let 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(){Jn(this.gos)&&this.isAnyFilterPresent()&&this.onFilterChanged()}onFilterChanged(e={}){let{source:t,additionalEventAttributes:n,columns:r=[]}=e;this.externalFilterPresent=this.isExternalFilterPresentCallback(),(this.colFilter?this.colFilter.updateBeforeFilterChanged(e):H.resolve()).then(()=>{let e={source:t,type:`filterChanged`,columns:r};n&&A(e,n),this.eventSvc.dispatchEvent(e),this.colFilter?.updateAfterFilterChanged()})}isSuppressFlashingCellsBecauseFiltering(){return!!this.colFilter?.isSuppressFlashingCellsBecauseFiltering()}isQuickFilterPresent(){return!!this.quickFilter?.isFilterPresent()}updateAggFiltering(){this.aggFiltering=!!Jn(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){let{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){let{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(){M(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(let 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()}},Ab=class extends O{constructor(){super(...arguments),this.beanName=`filterMenuFactory`}wireBeans(e){this.popupSvc=e.popupSvc}hideActiveMenu(){this.hidePopup?.()}showMenuAfterMouseEvent(e,t,n,r){e&&!e.isColumn||this.showPopup(e,r=>{this.popupSvc?.positionPopupUnderMouseEvent({additionalParams:{column:e},type:n,mouseEvent:t,ePopup:r})},n,t.target,I(this.gos),r)}showMenuAfterButtonClick(e,t,n,r){if(e&&!e.isColumn)return;let i=-1,a=`left`,o=I(this.gos);!o&&this.gos.get(`enableRtl`)&&(i=1,a=`right`);let s=o?void 0:4*i,c=o?void 0:4;this.showPopup(e,r=>{this.popupSvc?.positionPopupByComponent({type:n,eventSource:t,ePopup:r,nudgeX:s,nudgeY:c,alignSide:a,keepWithinBounds:!0,position:`under`,additionalParams:{column:e}})},n,t,o,r)}showPopup(e,t,n,r,i,a){let o=e?this.createBean(new Sl(e,`COLUMN_MENU`)):void 0;if(this.activeMenu=o,!o?.hasFilter()||!e){N(57);return}let s=fl({tag:`div`,cls:`ag-menu${i?``:` ag-filter-menu`}`,role:`presentation`});[this.tabListener]=this.addManagedElementListeners(s,{keydown:e=>this.trapFocusWithin(e,s)}),s.appendChild(o?.getGui());let c,l=()=>o?.afterGuiDetached(),u=xr(this.gos)?r??this.beans.ctrlsSvc.getGridBodyCtrl().eGridBody:void 0,d=t=>{Rd(e,!1,`contextMenu`);let i=t instanceof KeyboardEvent;this.tabListener&&=this.tabListener(),i&&r&&Ge(r)&&vo(r)?.focus({preventScroll:!0}),l(),this.destroyBean(this.activeMenu),this.dispatchVisibleChangedEvent(!1,n,e),a?.()},f=this.getLocaleTextFunc(),p=i&&n!==`columnFilter`?f(`ariaLabelColumnMenu`,`Column Menu`):f(`ariaLabelColumnFilter`,`Column Filter`),m=this.popupSvc?.addPopup({modal:!0,eChild:s,closeOnEsc:!0,closedCallback:d,positionCallback:()=>t(s),anchorToElement:u,ariaLabel:p});m&&(this.hidePopup=c=m.hideFunc),o.afterInit().then(()=>{t(s),o.afterGuiAttached({container:n,hidePopup:c})}),Rd(e,!0,`contextMenu`),this.dispatchVisibleChangedEvent(!0,n,e)}trapFocusWithin(e,t){e.key!==U.TAB||e.defaultPrevented||_o(this.beans,t,!1,e.shiftKey)||(e.preventDefault(),go(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()}},jb=class extends O{constructor(){super(...arguments),this.beanName=`filterValueSvc`}getValue(e,t,n){if(!t)return;let r=e.getColDef(),{selectableFilter:i,valueSvc:a,formula:o}=this.beans,s=n??i?.getFilterValueGetter(e.getColId())??r.filterValueGetter;if(s)return this.executeFilterValueGetter(s,t.data,e,t,r);let c=a.getValue(e,t);return e.isAllowFormula()&&o?.isFormula(c)?o.resolveValue(e,t):c}executeFilterValueGetter(e,t,n,r,i){let{expressionSvc:a,valueSvc:o}=this.beans,s=L(this.gos,{data:t,node:r,column:n,colDef:i,getValue:o.getValueCallback.bind(o,r)});return typeof e==`function`?e(s):a?.evaluate(e,s)}},Mb={tag:`div`,cls:`ag-floating-filter-input`,role:`presentation`,children:[{tag:`ag-input-text-field`,ref:`eFloatingFilterText`}]},Nb=class extends V{constructor(){super(Mb,[Zo]),this.eFloatingFilterText=B}init(e){this.params=e;let 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`)){let t=e,n=t.getHandler();if(n.getModelAsString){let e=n.getModelAsString(t.model);this.eFloatingFilterText.setValue(e)}}}onParentModelChanged(e){if(e==null){this.eFloatingFilterText.setValue(``);return}this.params.parentFilterInstance(t=>{if(t.getModelAsString){let n=t.getModelAsString(e);this.eFloatingFilterText.setValue(n)}})}refresh(e){this.init(e)}},Pb=class{constructor(){this.customFilterOptions={}}init(e,t){this.filterOptions=e.filterOptions??t,this.mapCustomOptions(),this.defaultOption=this.getDefaultItem(e.defaultOption)}refresh(e,t){let n=e.filterOptions??t;this.filterOptions!==n&&(this.filterOptions=n,this.customFilterOptions={},this.mapCustomOptions()),this.defaultOption=this.getDefaultItem(e.defaultOption)}mapCustomOptions(){let{filterOptions:e}=this;if(e){for(let t of e)if(typeof t!=`string`){if(![[`displayKey`],[`displayName`],[`predicate`,`test`]].every(e=>e.some(e=>t[e]!=null)?!0:(M(72,{keys:e}),!1))){this.filterOptions=e.filter(e=>e===t)||[];continue}this.customFilterOptions[t.displayKey]=t}}}getDefaultItem(e){let{filterOptions:t}=this;if(e)return e;if(t.length>=1){let e=t[0];if(typeof e==`string`)return e;if(e.displayKey)return e.displayKey;M(73)}else M(74)}getCustomOption(e){return this.customFilterOptions[e]}};function Fb(e,t,n){return n==null?e.splice(t):e.splice(t,n)}function Ib(e){return e==null||typeof e==`string`&&e.trim().length===0}function Lb(e){return e===`AND`||e===`OR`?e:`AND`}function Rb(e,t,n){if(e==null)return;let{predicate:r}=e;if(r!=null&&!t.some(e=>e==null))return r(t,n)}function zb(e,t){let n=e.length;return n>t&&(e.splice(t),M(78),n=t),n}function Bb(e,t){let n=t.getCustomOption(e);if(n){let{numberOfInputs:e}=n;return e??1}return e&&[`empty`,`notBlank`,`blank`].indexOf(e)>=0?0:e===`inRange`?2:1}var Vb=class extends zl{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);let t=new Pb;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=Lb(e.defaultJoinOperator),this.filterPlaceholder=e.filterPlaceholder,this.createFilterListOptions(),E(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)=>{let r=n===0?e:this.optionsFactory.defaultOption;t.setValue(r,!0)})}getModelFromUi(){let 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(){let{eJoinOrs:e,defaultJoinOperator:t}=this;return e.length===0?t:e[0].getValue()===!0?`OR`:`AND`}areNonNullModelsEqual(e,t){let n=!e.operator,r=!t.operator;if(!n&&r||n&&!r)return!1;let i;if(n){let n=e,r=t;i=this.areSimpleModelsEqual(n,r)}else{let n=e,r=t;i=n.operator===r.operator&&Gr(n.conditions,r.conditions,(e,t)=>this.areSimpleModelsEqual(e,t))}return i}setModelIntoUi(e,t){if(e==null)return this.resetUiToDefaults(t),H.resolve();if(e.operator){let t=e,n=t.conditions;n??(n=[],M(77));let r=zb(n,this.maxNumConditions),i=this.getNumConditions();if(r<i)this.removeConditionsAndOperators(r);else if(r>i)for(let e=i;e<r;e++)this.createJoinOperatorPanel(),this.createOption();let a=t.operator===`OR`;this.eJoinAnds.forEach(e=>e.setValue(!a,!0)),this.eJoinOrs.forEach(e=>e.setValue(a,!0)),n.forEach((e,t)=>{this.eTypes[t].setValue(e.type,!0),this.setConditionIntoUi(e,t)})}else{let t=e;this.getNumConditions()>1&&this.removeConditionsAndOperators(1),this.eTypes[0].setValue(t.type,!0),this.setConditionIntoUi(t,0)}return this.lastUiCompletePosition=this.getNumConditions()-1,this.createMissingConditionsAndOperators(),this.updateUiVisibility(),t||this.params.onUiChange(this.getUiChangeEventParams()),H.resolve()}setNumConditions(e){let t=e.maxNumConditions??2;t<1&&(M(79),t=1),this.maxNumConditions=t;let n=e.numAlwaysVisibleConditions??1;n<1&&(M(80),n=1),n>t&&(M(81),n=t),this.numAlwaysVisibleConditions=n}createOption(){let e=this.getGui(),t=this.createManagedBean(new ds);this.eTypes.push(t),t.addCss(`ag-filter-select`),e.appendChild(t.getGui());let n=this.createEValue();this.eConditionBodies.push(n),e.appendChild(n),this.putOptionsIntoDropdown(t),this.resetType(t);let r=this.getNumConditions()-1;this.forEachPositionInput(r,e=>this.resetInput(e)),this.addChangedListeners(t,r)}createJoinOperatorPanel(){let e=fl({tag:`div`,cls:`ag-filter-condition`});this.eJoinPanels.push(e);let t=this.createJoinOperator(this.eJoinAnds,e,`and`),n=this.createJoinOperator(this.eJoinOrs,e,`or`);this.getGui().appendChild(e);let r=this.eJoinPanels.length-1,i=this.joinOperatorId++;this.resetJoinOperatorAnd(t,r,i),this.resetJoinOperatorOr(n,r,i),this.isReadOnly()||(t.onValueChange(this.listener),n.onValueChange(this.listener))}createJoinOperator(e,t,n){let r=this.createManagedBean(new Yo);e.push(r);let i=`ag-filter-condition-operator`;return r.addCss(i),r.addCss(`${i}-${n}`),t.appendChild(r.getGui()),r}createFilterListOptions(){this.filterListOptions=this.optionsFactory.filterOptions.map(e=>typeof e==`string`?this.createBoilerplateListOption(e):this.createCustomListOption(e))}putOptionsIntoDropdown(e){let{filterListOptions:t}=this;for(let n of t)e.addOption(n);e.setDisabled(t.length<=1)}createBoilerplateListOption(e){return{value:e,text:this.translate(e)}}createCustomListOption(e){let{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(){let 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{let t=this.lastUiCompletePosition??this.getNumConditions()-2;if(e<t){this.removeConditionsAndOperators(t+1);let n=e+1,r=t-n;r>0&&this.removeConditionsAndOperators(n,r),this.createMissingConditionsAndOperators()}}this.lastUiCompletePosition=e}updateConditionStatusesAndValues(e,t){this.eTypes.forEach((t,n)=>{let r=this.isConditionDisabled(n,e);t.setDisabled(r||this.filterListOptions.length<=1),n===1&&(Ne(this.eJoinPanels[0],r),this.eJoinAnds[0].setDisabled(r),this.eJoinOrs[0].setDisabled(r))}),this.eConditionBodies.forEach((e,t)=>{w(e,this.isConditionBodyVisible(t))});let n=(t??this.getJoinOperator())===`OR`;for(let e of this.eJoinAnds)e.setValue(!n,!0);for(let e of this.eJoinOrs)e.setValue(n,!0);this.forEachInput((t,n,r,i)=>{this.setElementDisplayed(t,n<i),this.setElementDisabled(t,this.isConditionDisabled(r,e))}),this.resetPlaceholder()}shouldAddNewConditionAtEnd(e){return e&&this.getNumConditions()<this.maxNumConditions&&!this.isReadOnly()}removeConditionsAndOperators(e,t){if(e>=this.getNumConditions())return;let{eTypes:n,eConditionBodies:r,eJoinPanels:i,eJoinAnds:a,eJoinOrs:o}=this;this.removeComponents(n,e,t),this.removeElements(r,e,t),this.removeEValues(e,t);let s=Math.max(e-1,0);this.removeElements(i,s,t),this.removeComponents(a,s,t),this.removeComponents(o,s,t)}removeElements(e,t,n){let r=Fb(e,t,n);for(let e of r)Ue(e)}removeComponents(e,t,n){let r=Fb(e,t,n);for(let e of r)Ue(e.getGui()),this.destroyBean(e)}afterGuiAttached(e){if(super.afterGuiAttached(e),this.resetPlaceholder(),!e?.suppressFocus){let e;if(!this.isReadOnly()){let t=this.getInputs(0)[0];e=t instanceof Ko&&this.isConditionBodyVisible(0)?t.getInputElement():this.eTypes[0]?.getFocusableElement()}(e??this.getGui()).focus({preventScroll:!0})}}shouldKeepInvalidInputState(){return!1}afterGuiDetached(){super.afterGuiDetached();let e=this.params;if(this.beans.colFilter?.shouldKeepStateOnDetach(e.column)||this.shouldKeepInvalidInputState())return;e.onStateChange({model:e.model});let t=-1,n=-1,r=!1,i=this.getJoinOperator();for(let e=this.getNumConditions()-1;e>=0;e--)if(this.isConditionUiComplete(e))t===-1&&(t=e,n=e);else{let i=e>=this.numAlwaysVisibleConditions&&!this.isConditionUiComplete(e-1),a=e<t;(i||a)&&(this.removeConditionsAndOperators(e,1),r=!0,a&&n--)}let a=!1;this.getNumConditions()<this.numAlwaysVisibleConditions&&(this.createMissingConditionsAndOperators(),a=!0),this.shouldAddNewConditionAtEnd(n===this.getNumConditions()-1)&&(this.createJoinOperatorPanel(),this.createOption(),a=!0),a&&this.updateConditionStatusesAndValues(n,i),r&&this.updateJoinOperatorsDisabled(),this.lastUiCompletePosition=n}getModelAsString(e){return this.params.getHandler()?.getModelAsString?.(e)??``}resetPlaceholder(){let e=this.getLocaleTextFunc(),{filterPlaceholder:t,eTypes:n}=this;this.forEachInput((r,i,a,o)=>{if(!(r instanceof Ko))return;let s=i===0&&o>1?`inRangeStart`:i===0?`filterOoo`:`inRangeEnd`,c=i===0&&o>1?e(`ariaFilterFromValue`,`Filter from value`):i===0?e(`ariaFilterValue`,`Filter Value`):e(`ariaFilterToValue`,`Filter to Value`),l=n[a].getValue(),u=yl(this,t,s,l);r.setInputPlaceholder(u),r.setInputAriaLabel(c)})}setElementValue(e,t,n){e instanceof Ko&&e.setValue(t==null?null:String(t),!0)}setElementDisplayed(e,t){Ki(e)&&w(e.getGui(),t)}setElementDisabled(e,t){Ki(e)&&Ne(e.getGui(),t)}attachElementOnChange(e,t){e instanceof Ko&&e.onValueChange(t)}forEachInput(e){this.getConditionTypes().forEach((t,n)=>{this.forEachPositionTypeInput(n,t,e)})}forEachPositionInput(e,t){let n=this.getConditionType(e);this.forEachPositionTypeInput(e,n,t)}forEachPositionTypeInput(e,t,n){let r=Bb(t,this.optionsFactory),i=this.getInputs(e);for(let t=0;t<i.length;t++){let a=i[t];a!=null&&n(a,t,e,r)}}isConditionDisabled(e,t){return this.isReadOnly()?!0:e===0?!1:e>t+1}isConditionBodyVisible(e){return Bb(this.getConditionType(e),this.optionsFactory)>0}isConditionUiComplete(e){return!(e>=this.getNumConditions()||this.getConditionType(e)===`empty`||this.getValues(e).some(e=>e==null)||this.positionHasInvalidInputs(e))}getNumConditions(){return this.eTypes.length}getUiCompleteConditions(){let 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(e=>this.resetType(e)),this.eJoinAnds.forEach((e,t)=>this.resetJoinOperatorAnd(e,t,this.joinOperatorId+t)),this.eJoinOrs.forEach((e,t)=>this.resetJoinOperatorOr(e,t,this.joinOperatorId+t)),this.joinOperatorId++,this.forEachInput(e=>this.resetInput(e)),this.resetPlaceholder(),this.createMissingConditionsAndOperators(),this.lastUiCompletePosition=null,this.updateUiVisibility(),e||this.params.onUiChange(this.getUiChangeEventParams())}resetType(e){let t=this.getLocaleTextFunc()(`ariaFilteringOperator`,`Filtering operator`);e.setValue(this.optionsFactory.defaultOption,!0).setAriaLabel(t).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,r,i){this.updateJoinOperatorDisabled(e.setValue(n,!0).setName(`ag-simple-filter-and-or-${this.getCompId()}-${i}`).setLabel(r),t)}updateJoinOperatorsDisabled(){let e=(e,t)=>this.updateJoinOperatorDisabled(e,t);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){let n=this.mapValuesFromModel(e,this.optionsFactory);this.forEachInput((e,r,i)=>{i===t&&this.setElementValue(e,n[r]==null?null:n[r])})}setValueFromFloatingFilter(e){this.forEachInput((t,n,r)=>{this.setElementValue(t,n===0&&r===0?e:null,!0)})}addChangedListeners(e,t){this.isReadOnly()||(e.onValueChange(this.listener),this.forEachPositionInput(t,e=>{this.attachElementOnChange(e,this.listener)}))}hasInvalidInputs(){return!1}positionHasInvalidInputs(e){return!1}isReadOnly(){return!!this.params.readOnly}},Hb=`.ag-input-field-input`,Ub=class{constructor(e,t,n,r,i,a){this.context=e,this.eParent=i,this.alive=!0,this.debouncedReport=k({isAlive:()=>this.alive},Wb,500),this.timeoutHandle=null,Aa(t,n,r)?.newAgStackInstance().then(t=>{if(!this.alive){e.destroyBean(t);return}if(this.dateComp=t,!t)return;i.appendChild(t.getGui()),t?.afterGuiAttached?.();let{tempValue:n,disabled:r}=this;n&&t.setDate(n),r!=null&&t.setDisabled?.(r),a?.(this)})}destroy(){this.alive=!1,this.dateComp=this.context.destroyBean(this.dateComp)}getDate(){return this.dateComp?this.dateComp.getDate():this.tempValue}setDate(e){let t=this.dateComp;t?t.setDate(e):this.tempValue=e}setDisabled(e){let t=this.dateComp;t?t.setDisabled?.(e):this.disabled=e}setDisplayed(e){w(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){let n=this.dateComp?.getGui().querySelector(Hb);if(n&&`setCustomValidity`in n){let r=e.length>0;n.setCustomValidity(e),r?t?this.timeoutHandle=this.debouncedReport(n):Wb(n):this.timeoutHandle&&window.clearTimeout(this.timeoutHandle),ue(n,r)}}getValidity(){return this.dateComp?.getGui().querySelector(Hb)?.validity}};function Wb(e){e.reportValidity()}var Gb=[`equals`,`notEqual`,`lessThan`,`greaterThan`,`inRange`,`blank`,`notBlank`];function Kb(e,t){let{dateFrom:n,dateTo:r,type:i}=e||{};return[n&&G(n,void 0,!0)||null,r&&G(r,void 0,!0)||null].slice(0,Bb(i,t))}var qb=1e3,Jb=1/0,Yb=class extends Vb{constructor(){super(`dateFilter`,Kb,Gb),this.eConditionPanelsFrom=[],this.eConditionPanelsTo=[],this.dateConditionFromComps=[],this.dateConditionToComps=[],this.minValidYear=qb,this.maxValidYear=Jb,this.minValidDate=null,this.maxValidDate=null,this.filterType=`date`}afterGuiAttached(e){super.afterGuiAttached(e),this.dateConditionFromComps[0].afterGuiAttached(e),this.refreshInputValidation()}shouldKeepInvalidInputState(){return!$a()&&this.hasInvalidInputs()&&this.getConditionTypes().includes(`inRange`)}commonUpdateSimpleParams(e){super.commonUpdateSimpleParams(e);let t=(t,n)=>{let r=e[t];if(r!=null)if(isNaN(r))M(82,{param:t});else return r==null?n:Number(r);return n},n=t(`minValidYear`,qb),r=t(`maxValidYear`,Jb);this.minValidYear=n,this.maxValidYear=r,n>r&&M(83);let{minValidDate:i,maxValidDate:a}=e,o=i instanceof Date?i:G(i);this.minValidDate=o;let s=a instanceof Date?a:G(a);this.maxValidDate=s,o&&s&&o>s&&M(84)}refreshInputValidation(){for(let e=0;e<this.dateConditionFromComps.length;e++)this.refreshInputPairValidation(e,!1,!0)}refreshInputPairValidation(e,t=!1,n=!1){let{dateConditionFromComps:r,dateConditionToComps:i,beans:a}=this,o=r[e],s=i[e],c=o.getDate(),l=s.getDate(),u=Xb(c,l,t),d=u?this.translate(u,[String(t?l:c)]):``,f=!$a()&&!n;(t?o:s).setCustomValidity(d,f),(t?s:o).setCustomValidity(``,f),d.length>0&&a.ariaAnnounce.announceValue(d,`dateFilter`)}createDateCompWrapper(e,t,n){let{beans:{userCompFactory:r,context:i,gos:a},params:o}=this,s=n===`from`,c=new Ub(i,r,o.colDef,L(a,{onDateChanged:()=>{this.refreshInputPairValidation(t,s),this.onUiChanged()},onFocusIn:()=>this.refreshInputPairValidation(t,s),filterParams:o,location:`filter`}),e);return this.addDestroyFunc(()=>c.destroy()),c}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(){let e=fl({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,r){let i=fl({tag:`div`,cls:`ag-filter-${r} ag-filter-date-${r}`});t.push(i),e.appendChild(i),n.push(this.createDateCompWrapper(i,t.length-1,r))}removeEValues(e,t){this.removeDateComps(this.dateConditionFromComps,e,t),this.removeDateComps(this.dateConditionToComps,e,t),Fb(this.eConditionPanelsFrom,e,t),Fb(this.eConditionPanelsTo,e,t)}removeDateComps(e,t,n){let r=Fb(e,t,n);for(let e of r)e.destroy()}isValidDateValue(e){if(e===null)return!1;let{minValidDate:t,maxValidDate:n,minValidYear:r,maxValidYear:i}=this;if(t){if(e<t)return!1}else if(e.getUTCFullYear()<r)return!1;if(n){if(e>n)return!1}else if(e.getUTCFullYear()>i)return!1;return!0}hasInvalidInputs(){let e=!1;return this.forEachInput(t=>e||=t.getDate()!=null&&!(t.getValidity()?.valid??!0)),e}positionHasInvalidInputs(e){let t=!1;return this.forEachPositionInput(e,e=>t||=!(e.getValidity()?.valid??!0)),t}canApply(e){return!this.hasInvalidInputs()}isConditionUiComplete(e){if(!super.isConditionUiComplete(e))return!1;let t=!0;return this.forEachPositionInput(e,(e,n,r,i)=>{!t||n>=i||(t&&=this.isValidDateValue(e.getDate()))}),t}areSimpleModelsEqual(e,t){return e.dateFrom===t.dateFrom&&e.dateTo===t.dateTo&&e.type===t.type}createCondition(e){let t=this.getConditionType(e),n={},r=this.getValues(e),i=this.params.useIsoSeparator?`T`:` `;return r.length>0&&(n.dateFrom=W(r[0],!0,i)),r.length>1&&(n.dateTo=W(r[1],!0,i)),{dateFrom:null,dateTo:null,filterType:this.filterType,type:t,...n}}removeConditionsAndOperators(e,t){if(!this.hasInvalidInputs())return super.removeConditionsAndOperators(e,t)}resetPlaceholder(){let e=this.getLocaleTextFunc(),t=this.translate(`dateFormatOoo`),n=e(`ariaFilterValue`,`Filter Value`);this.forEachInput(e=>{e.setInputPlaceholder(t),e.setInputAriaLabel(n)})}getInputs(e){let{dateConditionFromComps:t,dateConditionToComps:n}=this;return e>=t.length?[null,null]:[t[e],n[e]]}getValues(e){let t=[];return this.forEachPositionInput(e,(e,n,r,i)=>{n<i&&t.push(e.getDate())}),t}translate(e,t){let n=e;return e===`lessThan`?n=`before`:e===`greaterThan`&&(n=`after`),super.translate(n,t)}};function Xb(e,t,n){return e!=null&&t!=null&&e>=t?`${n?`max`:`min`}DateValidation`:null}var Zb=class extends O{constructor(e,t){super(),this.mapValuesFromModel=e,this.defaultOptions=t}init(e){let t=e.filterParams,n=new Pb;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`){let 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){let t=e.model;if(t==null)return!0;let{operator:n}=t,r=[];if(n){let e=t;r.push(...e.conditions??[])}else r.push(t);let i=n&&n===`OR`?`some`:`every`,a=this.params.getValue(e.node);return r[i](t=>this.individualConditionPasses(e,t,a))}getModelAsString(e,t){return this.filterModelFormatter.getModelAsString(e,t)??``}validateModel(e){let{model:t,filterParams:{filterOptions:n,maxNumConditions:r}}=e;if(t==null)return;let i=Bl(t)?t.conditions:[t],a=n?.map(e=>typeof e==`string`?e:e.displayKey)??this.defaultOptions;if(!(!i||i.every(e=>a.find(t=>t===e.type)!==void 0))){this.params={...e,model:null},e.onModelChange(null);return}let o=!1,s=this.filterType;if((i&&!i.every(e=>e.filterType===s)||t.filterType!==s)&&(i=i.map(e=>({...e,filterType:s})),o=!0),typeof r==`number`&&i&&i.length>r&&(i=i.slice(0,r),o=!0),o){let n=i.length>1?{...t,filterType:s,conditions:i}:{...i[0],filterType:s};this.params={...e,model:n},e.onModelChange(n)}}individualConditionPasses(e,t,n){let r=this.optionsFactory,i=this.mapValuesFromModel(t,r);return Rb(r.getCustomOption(t.type),i,n)??(n==null?this.evaluateNullValue(t.type):this.evaluateNonNullValue(i,n,t,e))}},Qb=class extends Zb{evaluateNullValue(e){let{includeBlanksInEquals:t,includeBlanksInNotEqual:n,includeBlanksInGreaterThan:r,includeBlanksInLessThan:i,includeBlanksInRange:a}=this.params.filterParams;switch(e){case`equals`:if(t)return!0;break;case`notEqual`:if(n)return!0;break;case`greaterThan`:case`greaterThanOrEqual`:if(r)return!0;break;case`lessThan`:case`lessThanOrEqual`:if(i)return!0;break;case`inRange`:if(a)return!0;break;case`blank`:return!0;case`notBlank`:return!1}return!1}evaluateNonNullValue(e,t,n){let r=n.type;if(!this.isValid(t))return r===`notEqual`||r===`notBlank`;let i=this.comparator(),a=e[0]==null?0:i(e[0],t);switch(r){case`equals`:return a===0;case`notEqual`:return a!==0;case`greaterThan`:return a>0;case`greaterThanOrEqual`:return a>=0;case`lessThan`:return a<0;case`lessThanOrEqual`:return a<=0;case`inRange`:{let n=i(e[1],t);return this.params.filterParams.inRangeInclusive?a>=0&&n<=0:a>0&&n<0}case`blank`:return Ib(t);case`notBlank`:return!Ib(t);default:return M(76,{filterModelType:r}),!0}}},$b={equals:`Equals`,notEqual:`NotEqual`,greaterThan:`GreaterThan`,greaterThanOrEqual:`GreaterThanOrEqual`,lessThan:`LessThan`,lessThanOrEqual:`LessThanOrEqual`,inRange:`InRange`},ex={contains:`Contains`,notContains:`NotContains`,equals:`TextEquals`,notEqual:`TextNotEqual`,startsWith:`StartsWith`,endsWith:`EndsWith`,inRange:`InRange`},tx=class extends O{constructor(e,t,n){super(),this.optionsFactory=e,this.filterParams=t,this.valueFormatter=n}getModelAsString(e,t){let n=this.getLocaleTextFunc(),r=t===`filterToolPanel`;if(!e)return r?gl(this,`filterSummaryInactive`):null;if(e.operator!=null){let n=e,r=(n.conditions??[]).map(e=>this.getModelAsString(e,t)),i=n.operator===`AND`?`andCondition`:`orCondition`;return r.join(` ${gl(this,i)} `)}else if(e.type===`blank`||e.type===`notBlank`)return r?gl(this,e.type===`blank`?`filterSummaryBlank`:`filterSummaryNotBlank`):n(e.type,e.type);else{let t=e,{displayKey:i,displayName:a,numberOfInputs:o}=this.optionsFactory.getCustomOption(t.type)||{};return i&&a&&o===0?n(i,a):this.conditionToString(t,r,t.type===`inRange`||o===2,i,a)}}updateParams(e){let{optionsFactory:t,filterParams:n}=e;this.optionsFactory=t,this.filterParams=n}conditionForToolPanel(e,t,n,r,i,a){let o,s=this.getTypeKey(e);return s&&(o=gl(this,s)),i&&a&&(o=this.getLocaleTextFunc()(i,a)),o==null?null:t?`${o} ${gl(this,`filterSummaryInRangeValues`,[n(),r()])}`:`${o} ${n()}`}getTypeKey(e){let t=this.filterTypeKeys[e];return t?`filterSummary${t}`:null}formatValue(e){let t=this.valueFormatter;return t?t(e??null)??``:String(e)}},nx=class extends tx{constructor(e,t){super(e,t,e=>{let{dataTypeSvc:n,valueSvc:r}=this.beans,i=t.column,a=n?.getDateFormatterFunction(i),o=a?a(e??void 0):e;return r.formatValue(i,null,o)}),this.filterTypeKeys=$b}conditionToString(e,t,n,r,i){let{type:a}=e,o=G(e.dateFrom),s=G(e.dateTo),c=this.filterParams.inRangeFloatingFilterDateFormat,l=t?this.formatValue.bind(this):e=>Io(e,c),u=()=>o===null?`null`:l(o),d=()=>s===null?`null`:l(s);if(t){let e=this.conditionForToolPanel(a,n,u,d,r,i);if(e!=null)return e}return n?`${u()}-${d()}`:o==null?`${a}`:l(o)}};function rx(e,t){let n=t;return n<e?-1:n>e?1:0}var ix=class extends Qb{constructor(){super(Kb,Gb),this.filterType=`date`,this.FilterModelFormatterClass=nx}comparator(){return this.params.filterParams.comparator??rx}isValid(e){let t=this.params.filterParams.isValidDate;return!t||t(e)}},ax=class extends V{constructor(){super(...arguments),this.defaultDebounceMs=0}setLastTypeFromModel(e){if(!e){this.lastType=this.optionsFactory.defaultOption;return}let t=e.operator,n;n=t?e.conditions[0]:e,this.lastType=n.type}canWeEditAfterModelFromParentFilter(e){if(!e)return this.isTypeEditable(this.lastType);if(e.operator)return!1;let t=e;return this.isTypeEditable(t.type)}init(e){this.params=e;let t=this.gos.get(`enableFilterHandlers`);if(this.reactive=t,this.setParams(e),t){let t=e;this.onModelUpdated(t.model)}}setParams(e){let t=new Pb;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){let n=this.optionsFactory.defaultOption;t||(this.lastType=n),this.readOnly=!!e.filterParams.readOnly;let r=this.isTypeEditable(n);this.setEditable(r)}refresh(e){this.params=e;let t=e,n=this.reactive;if((!n||t.source===`colDef`)&&this.updateParams(e),n){let{source:e,model:n}=t;if(e===`dataChanged`||e===`ui`)return;this.onModelUpdated(n)}}updateParams(e){let 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)}hasSingleInput(e){let t=this.optionsFactory.getCustomOption(e)?.numberOfInputs;return t==null||t==1}isTypeEditable(e){return!!e&&!this.readOnly&&this.hasSingleInput(e)&&[`inRange`,`empty`,`blank`,`notBlank`].indexOf(e)<0}getAriaLabel(e){return`${this.beans.colNames.getDisplayNameForColumn(e,`header`,!0)} ${this.getLocaleTextFunc()(`ariaFilterInput`,`Filter Input`)}`}},ox={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`}]},sx=class extends ax{constructor(){super(ox,[Zo]),this.eReadOnlyText=B,this.eDateWrapper=B,this.FilterModelFormatterClass=nx,this.filterType=`date`,this.defaultOptions=Gb}setParams(e){super.setParams(e),this.createDateComponent();let 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){let t=!this.readOnly&&this.canWeEditAfterModelFromParentFilter(e);if(this.setEditable(t),t){let t=e?G(e.dateFrom):null;this.dateComp.setDate(t),this.eReadOnlyText.setValue(``)}else this.eReadOnlyText.setValue(this.filterModelFormatter.getModelAsString(e)),this.dateComp.setDate(null)}setEditable(e){w(this.eDateWrapper,e),w(this.eReadOnlyText.getGui(),!e)}onModelUpdated(e){super.setLastTypeFromModel(e),this.updateCompOnModelChange(e)}onDateChanged(){let e=this.dateComp.getDate();if(this.reactive){let t=this.params;t.onUiChange();let n=t.model,r=W(e),i=r==null?null:{...n??{filterType:this.filterType,type:this.lastType??this.optionsFactory.defaultOption},dateFrom:r};t.onModelChange(i,{afterFloatingFilter:!0})}else this.params.parentFilterInstance(t=>{t?.onFloatingFilterChanged(this.lastType||null,e)})}getDateComponentParams(){let{filterParams:e}=this.params,t=_l(e,this.defaultDebounceMs);return L(this.gos,{onDateChanged:k(this,this.onDateChanged.bind(this),t),filterParams:e,location:`floatingFilter`})}createDateComponent(){let{beans:{context:e,userCompFactory:t},eDateWrapper:n,params:{column:r}}=this;this.dateComp=new Ub(e,t,r.getColDef(),this.getDateComponentParams(),n,e=>{e.setInputAriaLabel(this.getAriaLabel(r))}),this.addDestroyFunc(()=>this.dateComp.destroy())}},cx={tag:`div`,cls:`ag-filter-filter`,children:[{tag:`ag-input-text-field`,ref:`eDateInput`,cls:`ag-date-filter`}]},lx=class extends V{constructor(){super(cx,[Zo]),this.eDateInput=B,this.isApply=!1,this.applyOnFocusOut=!1}init(e){this.params=e,this.setParams(e);let 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){let t=this.eDateInput.getInputElement(),n=this.shouldUseBrowserDatePicker(e);this.usingSafariDatePicker=n&&Qa();let{minValidYear:r,maxValidYear:i,minValidDate:a,maxValidDate:o,buttons:s,includeTime:c,colDef:l}=e.filterParams||{},u=this.beans.dataTypeSvc,d=c??u?.getDateIncludesTimeFlag?.(l.cellDataType)??!1;if(n?d?(t.type=`datetime-local`,t.step=`1`):t.type=`date`:t.type=`text`,a&&r&&M(85),o&&i&&M(86),a&&o){let[e,t]=[a,o].map(e=>e instanceof Date?e:G(e));e&&t&&e.getTime()>t.getTime()&&M(87)}a?a instanceof Date?t.min=Io(a):t.min=a:r&&(t.min=`${r}-01-01`),o?o instanceof Date?t.max=Io(o):t.max=o:i&&(t.max=`${i}-12-31`),this.isApply=e.location===`floatingFilter`&&!!s?.includes(`apply`)}refresh(e){this.params=e,this.setParams(e)}getDate(){return G(this.eDateInput.getValue())}setDate(e){let t=this.params.filterParams.colDef.cellDataType,n=this.beans.dataTypeSvc?.getDateIncludesTimeFlag(t)??!1;this.eDateInput.setValue(W(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}},ux=[`equals`,`notEqual`,`greaterThan`,`greaterThanOrEqual`,`lessThan`,`lessThanOrEqual`,`inRange`,`blank`,`notBlank`];function dx(e){return e?.allowedCharPattern??null}function fx(e){return e==null||isNaN(e)?null:e}function px(e,t){let{filter:n,filterTo:r,type:i}=e||{};return[fx(n),fx(r)].slice(0,Bb(i,t))}var mx=class extends Vb{constructor(){super(`numberFilter`,px,ux),this.eValuesFrom=[],this.eValuesTo=[],this.filterType=`number`,this.defaultDebounceMs=500}afterGuiAttached(e){super.afterGuiAttached(e),this.refreshInputValidation()}shouldKeepInvalidInputState(){return!$a()&&this.hasInvalidInputs()&&this.getConditionTypes().includes(`inRange`)}refreshInputValidation(){for(let e=0;e<this.eValuesFrom.length;e++){let t=this.eValuesFrom[e],n=this.eValuesTo[e];this.refreshInputPairValidation(t,n)}}refreshInputPairValidation(e,t,n=!1){let r=this.params.numberParser,i=gx(r,e),a=gx(r,t),o=_x(i,a,n),s=o?this.translate(o,[String(n?a:i)]):``;(n?e:t).setCustomValidity(s),(n?t:e).setCustomValidity(``),s.length>0&&this.beans.ariaAnnounce.announceValue(s,`dateFilter`)}getState(){return{isInvalid:this.hasInvalidInputs()}}areStatesEqual(e,t){return(e?.isInvalid??!1)===(t?.isInvalid??!1)}refresh(e){let t=super.refresh(e),{state:n,additionalEventAttributes:r}=e,i=this.state,a=r?.fromAction;return(a&&a!=`apply`||n.model!==i.model||!this.areStatesEqual(n.state,i.state))&&this.refreshInputValidation(),t}setElementValue(e,t,n){let{numberFormatter:r}=this.params,i=!n&&r?r(t??null):t;super.setElementValue(e,i),i===null&&e.setCustomValidity(``)}createEValue(){let{params:e,eValuesFrom:t,eValuesTo:n}=this,r=dx(e),i=fl({tag:`div`,cls:`ag-filter-body`,role:`presentation`}),a=this.createFromToElement(i,t,`from`,r),o=this.createFromToElement(i,n,`to`,r),s=(e,t,n)=>()=>this.refreshInputPairValidation(e,t,n),c=s(a,o,!0);a.onValueChange(c),a.addGuiEventListener(`focusin`,c);let l=s(a,o,!1);return o.onValueChange(l),o.addGuiEventListener(`focusin`,l),i}createFromToElement(e,t,n,r){let i=this.createManagedBean(r?new Xo({allowedCharPattern:r}):new $o);return i.addCss(`ag-filter-${n}`),i.addCss(`ag-filter-filter`),t.push(i),e.appendChild(i.getGui()),i}removeEValues(e,t){let n=n=>this.removeComponents(n,e,t);n(this.eValuesFrom),n(this.eValuesTo)}getValues(e){let t=[];return this.forEachPositionInput(e,(e,n,r,i)=>{n<i&&t.push(fx(hx(this.params.numberParser,e.getValue())))}),t}areSimpleModelsEqual(e,t){return e.filter===t.filter&&e.filterTo===t.filterTo&&e.type===t.type}createCondition(e){let t=this.getConditionType(e),n={filterType:this.filterType,type:t},r=this.getValues(e);return r.length>0&&(n.filter=r[0]),r.length>1&&(n.filterTo=r[1]),n}removeConditionsAndOperators(e,t){if(!this.hasInvalidInputs())return super.removeConditionsAndOperators(e,t)}getInputs(e){let{eValuesFrom:t,eValuesTo:n}=this;return e>=t.length?[null,null]:[t[e],n[e]]}hasInvalidInputs(){let e=!1;return this.forEachInput(t=>e||=!t.getInputElement().validity.valid),e}positionHasInvalidInputs(e){let t=!1;return this.forEachPositionInput(e,e=>t||=!e.getInputElement().validity.valid),t}canApply(e){return!this.hasInvalidInputs()}};function hx(e,t){if(typeof t==`number`)return t;let n=r(t);return n!=null&&n.trim()===``&&(n=null),e?e(n):n==null||n.trim()===`-`?null:Number.parseFloat(n)}function gx(e,t){return fx(hx(e,t.getValue(!0)))}function _x(e,t,n){return e!=null&&t!=null&&e>=t?`strict${n?`Max`:`Min`}ValueValidation`:null}var vx=class extends tx{constructor(e,t){super(e,t,t.numberFormatter),this.filterTypeKeys=$b}conditionToString(e,t,n,r,i){let{filter:a,filterTo:o,type:s}=e,c=this.formatValue.bind(this);if(t){let e=this.conditionForToolPanel(s,n,()=>c(a),()=>c(o),r,i);if(e!=null)return e}return n?`${c(a)}-${c(o)}`:a==null?`${s}`:c(a)}},yx=class extends Qb{constructor(){super(px,ux),this.filterType=`number`,this.FilterModelFormatterClass=vx}comparator(){return(e,t)=>e===t?0:e<t?1:-1}isValid(e){return!isNaN(e)}},bx=class extends O{constructor(e){super(),this.params=e,this.eInput=B,this.onValueChanged=()=>{}}setupGui(e){this.eInput=this.createManagedBean(new Xo(this.params?.config));let t=this.eInput.getGui();e.appendChild(t);let n=e=>this.onValueChanged(e);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}){let{eInput:r}=this;r.setInputAriaLabel(e),t!==void 0&&r.setAutoComplete(t),r.toggleCss(`ag-floating-filter-search-icon`,!!n),r.setInputPlaceholder(n)}};function xx(e){let t=e?.trim();return t===``?e:t}function Sx(e,t){let{filter:n,filterTo:r,type:i}=e||{};return[n||null,r||null].slice(0,Bb(i,t))}var Cx={tag:`div`,ref:`eFloatingFilterInputContainer`,cls:`ag-floating-filter-input`,role:`presentation`},wx=class extends ax{constructor(){super(...arguments),this.eFloatingFilterInputContainer=B,this.defaultDebounceMs=500}postConstruct(){this.setTemplate(Cx)}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){let{inputSvc:t,defaultDebounceMs:n,readOnly:r}=this,{filterPlaceholder:i,column:a,browserAutoComplete:o,filterParams:s}=e,c=this.lastType??this.optionsFactory.defaultOption,l=e.filterParams.filterPlaceholder,u=i===!0?yl(this,l,`filterOoo`,c):i||void 0;if(t.setParams({ariaLabel:this.getAriaLabel(a),autoComplete:o??!1,placeholder:u}),this.applyActive=vl(s),!r){let e=_l(s,n);t.setValueChangedListener(k(this,this.syncUpWithParentFilter.bind(this),e))}}updateParams(e){super.updateParams(e),this.setTextInputParams(e)}recreateFloatingFilterInputService(e){let{inputSvc:t}=this,n=t.getValue();T(this.eFloatingFilterInputContainer),this.destroyBean(t),this.setupFloatingFilterInputService(e),t.setValue(n,!0)}syncUpWithParentFilter(e){let t=e.key===U.ENTER,n=this.reactive;if(n&&this.params.onUiChange(),this.applyActive&&!t)return;let{inputSvc:r,params:i,lastType:a}=this,o=r.getValue();if(i.filterParams.trimInput&&(o=xx(o),r.setValue(o,!0)),n){let e=i,t=e.model,n=this.convertValue(o),r=n==null?null:{...t??{filterType:this.filterType,type:a??this.optionsFactory.defaultOption},filter:n};e.onModelChange(r,{afterFloatingFilter:!0})}else i.parentFilterInstance(e=>{e?.onFloatingFilterChanged(a||null,o||null)})}convertValue(e){return e||null}setEditable(e){this.inputSvc.setEditable(e)}},Tx=class extends O{constructor(){super(...arguments),this.onValueChanged=()=>{},this.numberInputActive=!0}setupGui(e){this.eNumberInput=this.createManagedBean(new $o),this.eTextInput=this.createManagedBean(new Xo),this.eTextInput.setDisabled(!0);let t=this.eNumberInput.getGui(),n=this.eTextInput.getGui();e.appendChild(t),e.appendChild(n),this.setupListeners(t,e=>this.onValueChanged(e)),this.setupListeners(n,e=>this.onValueChanged(e))}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)}},Ex=class extends wx{constructor(){super(...arguments),this.FilterModelFormatterClass=vx,this.filterType=`number`,this.defaultOptions=ux}updateParams(e){dx(e.filterParams)!==this.allowedCharPattern&&this.recreateFloatingFilterInputService(e),super.updateParams(e)}createFloatingFilterInputService(e){return this.allowedCharPattern=dx(e.filterParams),this.allowedCharPattern?this.createManagedBean(new bx({config:{allowedCharPattern:this.allowedCharPattern}})):this.createManagedBean(new Tx)}convertValue(e){return e?Number(e):null}},Dx=[`contains`,`notContains`,`equals`,`notEqual`,`startsWith`,`endsWith`,`blank`,`notBlank`],Ox=class extends Vb{constructor(){super(`textFilter`,Sx,Dx),this.filterType=`text`,this.eValuesFrom=[],this.eValuesTo=[],this.defaultDebounceMs=500}createCondition(e){let t=this.getConditionType(e),n={filterType:this.filterType,type:t},r=this.getValues(e);return r.length>0&&(n.filter=r[0]),r.length>1&&(n.filterTo=r[1]),n}areSimpleModelsEqual(e,t){return e.filter===t.filter&&e.filterTo===t.filterTo&&e.type===t.type}getInputs(e){let{eValuesFrom:t,eValuesTo:n}=this;return e>=t.length?[null,null]:[t[e],n[e]]}getValues(e){let t=[];return this.forEachPositionInput(e,(e,n,i,a)=>{n<a&&t.push(r(e.getValue()))}),t}createEValue(){let e=fl({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){let r=this.createManagedBean(new Xo);r.addCss(`ag-filter-${n}`),r.addCss(`ag-filter-filter`),t.push(r),e.appendChild(r.getGui())}removeEValues(e,t){let n=n=>this.removeComponents(n,e,t),{eValuesFrom:r,eValuesTo:i}=this;n(r),n(i)}},kx=class extends tx{constructor(){super(...arguments),this.filterTypeKeys=ex}conditionToString(e,t,n,r,i){let{filter:a,filterTo:o,type:s}=e;if(t){let e=e=>()=>gl(this,`filterSummaryTextQuote`,[e]),t=this.conditionForToolPanel(s,n,e(a),e(o),r,i);if(t!=null)return t}return n?`${a}-${o}`:a==null?`${s}`:`${a}`}},Ax=({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`:{let e=t.lastIndexOf(n);return e>=0&&e===t.length-n.length}default:return!1}},jx=e=>e,Mx=e=>e==null?null:e.toString().toLowerCase(),Nx=class extends Zb{constructor(){super(Sx,Dx),this.filterType=`text`,this.FilterModelFormatterClass=kx}updateParams(e){super.updateParams(e);let t=e.filterParams;this.matcher=t.textMatcher??Ax,this.formatter=t.textFormatter??(t.caseSensitive?jx:Mx)}evaluateNullValue(e){return e?[`notEqual`,`notContains`,`blank`].indexOf(e)>=0:!1}evaluateNonNullValue(e,t,n,r){let i=e.map(e=>this.formatter(e))||[],a=this.formatter(t),{api:o,colDef:s,column:c,context:l,filterParams:{textFormatter:u}}=this.params;if(n.type===`blank`)return Ib(t);if(n.type===`notBlank`)return!Ib(t);let d={api:o,colDef:s,column:c,context:l,node:r.node,data:r.data,filterOption:n.type,value:a,textFormatter:u};return i.some(e=>this.matcher({...d,filterText:e}))}processModelToApply(e){if(e&&this.params.filterParams.trimInput){let t=e=>{let t={...e},{filter:n,filterTo:r}=e;return n&&(t.filter=xx(n)??null),r&&(t.filterTo=xx(r)??null),t};return Bl(e)?{...e,conditions:e.conditions.map(t)}:t(e)}return e}},Px=class extends wx{constructor(){super(...arguments),this.FilterModelFormatterClass=kx,this.filterType=`text`,this.defaultOptions=Dx}createFloatingFilterInputService(){return this.createManagedBean(new bx)}};function Fx(e){return!!e.quickFilter?.isFilterPresent()}function Ix(e){return e.quickFilter?.getText()}function Lx(e){e.quickFilter?.resetCache()}var Rx=class extends O{constructor(){super(...arguments),this.beanName=`quickFilter`,this.quickFilter=null,this.quickFilterParts=null}postConstruct(){let 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`,e=>this.setFilter(e.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(){let{autoColSvc:e,colModel:t,gos:n,pivotResultCols:r}=this.beans,i=t.isPivotMode(),a=e?.getColumns(),o=t.getColDefCols(),s=(i&&!n.get(`applyQuickFilterBeforePivotOrAgg`)?r?.getPivotResultCols()?.list:o)??[];a&&(s=s.concat(a)),this.colsToUse=n.get(`includeHiddenColumnsInQuickFilter`)?s:s.filter(e=>e.isVisible()||e.isRowGroupActive())}isFilterPresent(){return this.quickFilter!==null}doesRowPass(e){let 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(){let{quickFilter:e,parser:t}=this;e?this.quickFilterParts=t?t(e):e.split(` `):this.quickFilterParts=null}parseFilter(e){return i(e)?e.toUpperCase():null}setFilter(e){if(e!=null&&typeof e!=`string`){M(70,{newFilter:e});return}let t=this.parseFilter(e);this.quickFilter!==t&&(this.quickFilter=t,this.setFilterParts(),this.dispatchLocalEvent({type:`quickFilterChanged`}))}setParserAndMatcher(){let 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=>{let r=this.getTextForColumn(n,e);return i(r)&&r.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);let{quickFilterParts:r,matcher:i}=this;return i(r,n)}checkGenerateAggText(e){e.quickFilterAggregateText||=this.getAggText(e)}getTextForColumn(e,t){let n=this.beans.filterValueSvc.getValue(e,t),r=e.getColDef();if(r.getQuickFilterText){let i=L(this.gos,{value:n,node:t,data:t.data,column:e,colDef:r});n=r.getQuickFilterText(i)}return i(n)?n.toString().toUpperCase():null}getAggText(e){let t=[];for(let n of this.colsToUse){let r=this.getTextForColumn(n,e);i(r)&&t.push(r)}return t.join(`
|
|
62
62
|
`)}},zx={moduleName:`FilterCore`,version:j,beans:[kb],apiFunctions:{isAnyFilterPresent:Db,onFilterChanged:Ob},css:[pb],dependsOn:[{moduleName:`ClientSideRowModelFilter`,version:j,rowModels:[`clientSide`],beans:[sb]}]},Bx={moduleName:`FilterValue`,version:j,beans:[jb]},Vx={moduleName:`ColumnFilter`,version:j,beans:[Eb,Ab],dynamicBeans:{headerFilterCellCtrl:cb},icons:{filter:`filter`,filterActive:`filter`},apiFunctions:{isColumnFilterPresent:mb,getColumnFilterInstance:hb,destroyFilter:gb,setFilterModel:_b,getFilterModel:vb,getColumnFilterModel:yb,setColumnFilterModel:bb,showColumnFilter:xb,hideColumnFilter:Sb,getColumnFilterHandler:Cb,doFilterAction:wb},dependsOn:[zx,fb,Bx,db]},Hx={moduleName:`CustomFilter`,version:j,userComponents:{agReadOnlyFloatingFilter:Nb},dependsOn:[Vx]},Ux={moduleName:`TextFilter`,version:j,dependsOn:[Vx],userComponents:{agTextColumnFilter:{classImp:Ox,params:{useForm:!0}},agTextColumnFloatingFilter:Px},dynamicBeans:{agTextColumnFilterHandler:Nx}},Wx={moduleName:`NumberFilter`,version:j,dependsOn:[Vx],userComponents:{agNumberColumnFilter:{classImp:mx,params:{useForm:!0}},agNumberColumnFloatingFilter:Ex},dynamicBeans:{agNumberColumnFilterHandler:yx}},Gx={moduleName:`DateFilter`,version:j,dependsOn:[Vx],userComponents:{agDateColumnFilter:{classImp:Yb,params:{useForm:!0}},agDateInput:lx,agDateColumnFloatingFilter:sx},dynamicBeans:{agDateColumnFilterHandler:ix}},Kx={moduleName:`QuickFilter`,version:j,apiFunctions:{isQuickFilterPresent:Fx,getQuickFilter:Ix,resetQuickFilter:Lx},dependsOn:[{moduleName:`QuickFilterCore`,version:j,rowModels:[`clientSide`],beans:[Rx],dependsOn:[zx,Bx]}]},qx={moduleName:`ExternalFilter`,version:j,dependsOn:[zx]},Jx=`.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}}`,Yx=(e,t,n)=>{let{editModelSvc:r}=e,i=r?.getCellValidationModel()?.getCellValidation(t)?.errorMessages,a=r?.getRowValidationModel().getRowValidation(t)?.errorMessages,o=i||a;return o?.length?o.join(n(`tooltipValidationErrorSeparator`,`. `)):void 0},Xx={moduleName:`Tooltip`,version:j,beans:[class extends O{constructor(){super(...arguments),this.beanName=`tooltipSvc`}setupHeaderTooltip(e,t,n,r){e&&t.destroyBean(e);let i=this.gos,a=Hy(i),{column:o,eGui:s}=t,c=o.getColDef();!r&&a&&!c.headerComponent&&(r=qe(()=>s.querySelector(`.ag-header-cell-text`)));let l=`header`,u=this.beans.colNames.getDisplayNameForColumn(o,`header`,!0),d=n??u,f={getGui:()=>s,getLocation:()=>l,getTooltipValue:()=>n??c?.headerTooltipValueGetter?.(L(i,{location:l,colDef:c,column:o,value:d,valueFormatted:u}))??c?.headerTooltip,shouldDisplayTooltip:r,getAdditionalParams:()=>({column:o,colDef:o.getColDef()})},p=this.createTooltipFeature(f);return p&&(p=t.createBean(p),t.setRefreshFunction(`tooltip`,()=>p.refreshTooltip())),p}setupHeaderGroupTooltip(e,t,n,r){e&&t.destroyBean(e);let i=this.gos,a=Hy(i),{column:o,eGui:s}=t,c=o.getColGroupDef();!r&&a&&!c?.headerGroupComponent&&(r=qe(()=>s.querySelector(`.ag-header-group-text`)));let l=`headerGroup`,u=this.beans.colNames.getDisplayNameForColumnGroup(o,`header`),d=n??u,f={getGui:()=>s,getLocation:()=>l,getTooltipValue:()=>n??c?.headerTooltipValueGetter?.(L(i,{location:l,colDef:c,column:o,value:d,valueFormatted:u}))??c?.headerTooltip,shouldDisplayTooltip:r,getAdditionalParams:()=>{let e={column:o};return c&&(e.colDef=c),e}},p=this.createTooltipFeature(f);return p&&t.createBean(p)}enableCellTooltipFeature(e,t,n){let{beans:r}=this,{gos:a,editSvc:o}=r,{column:s,rowNode:c}=e,l=`cell`,u=()=>{let t=!o?.isEditing(e)&&Yx(r,e,this.getLocaleTextFunc());if(t)return l=`cellEditor`,t;l=`cell`;let n=s.getColDef(),u=c.data;if(n.tooltipField&&i(u))return lh(u,n.tooltipField,s.isTooltipFieldContainsDots());let d=n.tooltipValueGetter;return d?d(L(a,{location:`cell`,colDef:s.getColDef(),column:s,rowIndex:e.cellPosition.rowIndex,node:c,data:c.data,value:e.value,valueFormatted:e.valueFormatted})):null},d=Hy(a);n||=d&&!e.isCellRenderer()?()=>{let t=!!o?.isEditing(e);if(!t&&Yx(r,e,this.getLocaleTextFunc()))return!0;if(!s.isTooltipEnabled())return!1;let n=qe(()=>{let t=e.eGui;return t.children.length===0?t:t.querySelector(`.ag-cell-value`)});return!t&&n()}:()=>!o?.isEditing(e);let f={getGui:()=>e.eGui,getLocation:()=>l,getTooltipValue:t==null?u:()=>t,shouldDisplayTooltip:n,getAdditionalParams:()=>({column:s,colDef:s.getColDef(),rowIndex:e.cellPosition.rowIndex,node:c,data:c.data,valueFormatted:e.valueFormatted})};return this.createTooltipFeature(f,r)}setupFullWidthRowTooltip(e,t,n,r){let i={getGui:()=>t.getFullWidthElement(),getTooltipValue:()=>n,getLocation:()=>`fullWidthRow`,shouldDisplayTooltip:r},a=this.beans,o=a.context;e&&t.destroyBean(e,o);let s=this.createTooltipFeature(i,a);if(s)return t.createBean(s,o)}setupFormulaTooltip(e){let{beans:t}=this,{context:n,formula:r}=t;if(!this.beans.formula?.active||!e.column.isAllowFormula())return;let i=this.createTooltipFeature({getGui:()=>e.eGui,getTooltipValue:()=>{let t=r?.getFormulaError(e.column,e.rowNode);return t?t.message:void 0},getLocation:()=>`cellFormula`,shouldDisplayTooltip:()=>!!r?.getFormulaError(e.column,e.rowNode)},t);if(i)return e.createBean(i,n)}setupCellEditorTooltip(e,t){let{beans:n}=this,{context:r}=n,i=t.getValidationElement?.(!0)||!t.isPopup?.()&&e.eGui;if(!i)return;let a=this.createTooltipFeature({getGui:()=>i,getTooltipValue:()=>Yx(n,e,this.getLocaleTextFunc()),getLocation:()=>`cellEditor`,shouldDisplayTooltip:()=>{let{editModelSvc:e}=n,t=e?.getRowValidationModel()?.getRowValidationMap(),r=e?.getCellValidationModel()?.getCellValidationMap(),i=!!t&&t.size>0,a=!!r&&r.size>0;return i||a}},n);if(a)return e.createBean(a,r)}initCol(e){let{colDef:t}=e;e.tooltipEnabled=i(t.tooltipField)||i(t.tooltipValueGetter)||i(t.tooltipComponent)}createTooltipFeature(e,t){return this.beans.registry.createDynamicBean(`tooltipFeature`,!1,e,t)}}],dynamicBeans:{tooltipFeature:vc,highlightTooltipFeature:Tc,tooltipStateManager:class extends wc{createTooltipComp(e,t){ja(this.beans.userCompFactory,e)?.newAgStackInstance().then(t)}setEventHandlers(e){[this.onColumnMovedEventCallback]=this.addManagedEventListeners({columnMoved:e})}clearEventHandlers(){this.onColumnMovedEventCallback?.(),this.onColumnMovedEventCallback=void 0}}},userComponents:{agTooltipComponent:kc},dependsOn:[fb],css:[Jx]},Zx=class{constructor(e){this.cellValueChanges=e}},Qx=class extends Zx{constructor(e,t,n,r){super(e),this.initialRange=t,this.finalRange=n,this.ranges=r}},$x=10,eS=class{constructor(e){this.actionStack=[],this.maxStackSize=e||$x,this.actionStack=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}},tS=class extends O{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=>{let t={column:e.column,rowIndex:e.rowIndex,rowPinned:e.rowPinned},n=this.activeCellEdit!==null&&$u(this.activeCellEdit,t),r=this.activeRowEdit!==null&&td(this.activeRowEdit,t);if(!(n||r||this.isPasting||this.isRangeInAction))return;let{rowPinned:i,rowIndex:a,column:o,oldValue:s,value:c}=e,l={rowPinned:i,rowIndex:a,columnId:o.getColId(),newValue:c,oldValue:s};this.cellValueChanges.push(l)},this.clearStacks=()=>{this.undoStack.clear(),this.redoStack.clear()}}postConstruct(){let{gos:e,ctrlsSvc:t}=this.beans;if(!e.get(`undoRedoCellEditing`))return;let n=e.get(`undoRedoCellEditingLimit`);if(n<=0)return;this.undoStack=new eS(n),this.redoStack=new eS(n),this.addListeners();let r=this.clearStacks.bind(this);this.addManagedEventListeners({cellValueChanged:this.onCellValueChanged.bind(this),modelUpdated:e=>{e.keepUndoRedoStack||this.clearStacks()},columnPivotModeChanged:r,newColumnsLoaded:r,columnGroupOpened:r,columnRowGroupChanged:r,columnMoved:r,columnPinned:r,columnVisible:r,rowDragEnd:r}),t.whenReady(this,e=>{this.gridBodyCtrl=e.gridBodyCtrl})}getCurrentUndoStackSize(){return this.undoStack?.getCurrentStackSize()??0}getCurrentRedoStackSize(){return this.redoStack?.getCurrentStackSize()??0}undo(e){let{eventSvc:t,undoStack:n,redoStack:r}=this;t.dispatchEvent({type:`undoStarted`,source:e});let i=this.undoRedo(n,r,`initialRange`,`oldValue`,`undo`);t.dispatchEvent({type:`undoEnded`,source:e,operationPerformed:i})}redo(e){let{eventSvc:t,undoStack:n,redoStack:r}=this;t.dispatchEvent({type:`redoStarted`,source:e});let i=this.undoRedo(r,n,`finalRange`,`newValue`,`redo`);t.dispatchEvent({type:`redoEnded`,source:e,operationPerformed:i})}undoRedo(e,t,n,r,i){if(!e)return!1;let a=e.pop();return a?.cellValueChanges?(this.processAction(a,e=>e[r],i),a instanceof Qx?this.processRange(a.ranges||[a[n]]):this.processCell(a.cellValueChanges),t.push(a),!0):!1}processAction(e,t,n){for(let r of e.cellValueChanges){let{rowIndex:e,rowPinned:i,columnId:a}=r,o={rowIndex:e,rowPinned:i},s=id(this.beans,o);s.displayed&&s.setDataValue(a,t(r),n)}}processRange(e){let t,n=this.beans.rangeSvc;n.removeAllCellRanges(!0),e.forEach((r,i)=>{if(!r)return;let a=r.startRow,o=r.endRow;i===e.length-1&&(t={rowPinned:a.rowPinned,rowIndex:a.rowIndex,columnId:r.startColumn.getColId()},this.setLastFocusedCell(t));let s={rowStartIndex:a.rowIndex,rowStartPinned:a.rowPinned,rowEndIndex:o.rowIndex,rowEndPinned:o.rowPinned,columnStart:r.startColumn,columns:r.columns};n.addCellRange(s)})}processCell(e){let t=e[0],{rowIndex:n,rowPinned:r}=t,i={rowIndex:n,rowPinned:r},a=id(this.beans,i),o={rowPinned:t.rowPinned,rowIndex:a.rowIndex,columnId:t.columnId};this.setLastFocusedCell(o)}setLastFocusedCell(e){let{rowIndex:t,columnId:n,rowPinned:r}=e,{colModel:i,focusSvc:a,rangeSvc:o}=this.beans,s=i.getCol(n);if(!s)return;let{scrollFeature:c}=this.gridBodyCtrl;c.ensureIndexVisible(t),c.ensureColumnVisible(s);let l={rowIndex:t,column:s,rowPinned:r};a.setFocusedCell({...l,forceBrowserFocus:!0}),o?.setRangeToCell(l)}addListeners(){this.addManagedEventListeners({rowEditingStarted:e=>{this.activeRowEdit={rowIndex:e.rowIndex,rowPinned:e.rowPinned}},rowEditingStopped:()=>{let e=new Zx(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){let e=new Zx(this.cellValueChanges);this.pushActionsToUndoStack(e)}},pasteStart:()=>{this.isPasting=!0},pasteEnd:()=>{let e=new Zx(this.cellValueChanges);this.pushActionsToUndoStack(e),this.isPasting=!1},fillStart:()=>{this.isRangeInAction=!0},fillEnd:e=>{let t=new Qx(this.cellValueChanges,e.initialRange,e.finalRange);this.pushActionsToUndoStack(t),this.isRangeInAction=!1},keyShortcutChangedCellStart:()=>{this.isRangeInAction=!0},keyShortcutChangedCellEnd:()=>{let e,{rangeSvc:t,gos:n}=this.beans;e=t&&or(n)?new Qx(this.cellValueChanges,void 0,void 0,[...t.getCellRanges()]):new Zx(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;let n=new Zx(t??[]);this.pushActionsToUndoStack(n),this.cellValueChanges=[]}pushActionsToUndoStack(e){this.undoStack.push(e),this.cellValueChanges=[],this.redoStack.clear()}},nS=`.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) textarea{resize:none}:where(.ag-ltr) .ag-checkbox-edit{padding-left:var(--ag-cell-horizontal-padding)}:where(.ag-rtl) .ag-checkbox-edit{padding-right:var(--ag-cell-horizontal-padding)}:where(.ag-row.ag-row-editing-invalid .ag-cell-inline-editing){opacity:.8}.ag-popup-editor{position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none}`,rS={tag:`div`,cls:`ag-cell-wrapper ag-cell-edit-wrapper ag-checkbox-edit`,children:[{tag:`ag-checkbox`,ref:`eEditor`,role:`presentation`}]},iS=class extends Bd{constructor(){super(rS,[Jo]),this.eEditor=B}initialiseEditor(e){let t=e.value??void 0,n=this.eEditor;n.setValue(t),n.getInputElement().setAttribute(`tabindex`,`-1`),this.setAriaLabel(t),this.addManagedListeners(n,{fieldValueChanged:e=>this.setAriaLabel(e.selected)})}getValue(){return this.eEditor.getValue()}focusIn(){this.eEditor.getFocusableElement().focus()}afterGuiAttached(){this.params.cellStartedEdit&&this.focusIn()}isPopup(){return!1}setAriaLabel(e){let t=this.getLocaleTextFunc(),n=Oe(t,e),r=t(`ariaToggleCellValue`,`Press SPACE to toggle cell value`);this.eEditor.setInputAriaLabel(`${r} (${n})`)}getValidationElement(e){return e?this.params.eGridCell:this.eEditor.getInputElement()}getValidationErrors(){let{params:e}=this,{getValidationErrors:t}=e,n=this.getValue();return t?t({value:n,internalErrors:null,cellEditorParams:e}):null}},aS=class extends Bd{constructor(e){super(),this.cellEditorInput=e,this.eEditor=B}initialiseEditor(e){let{cellEditorInput:t}=this;this.setTemplate({tag:`div`,cls:`ag-cell-edit-wrapper`,children:[t.getTemplate()]},t.getAgComponents());let{eEditor:n}=this,{cellStartedEdit:r,eventKey:i,suppressPreventDefault:a}=e;n.getInputElement().setAttribute(`title`,``),t.init(n,e);let o,s=!0;r?(this.focusAfterAttached=!0,i===U.BACKSPACE||i===U.DELETE?o=``:i&&i.length===1?a?s=!1:o=i:(o=t.getStartValue(),i!==U.F2&&(this.highlightAllOnFocus=!0))):(this.focusAfterAttached=!1,o=t.getStartValue()),s&&o!=null&&n.setStartValue(o),this.addGuiEventListener(`keydown`,e=>{let{key:t}=e;(t===U.PAGE_UP||t===U.PAGE_DOWN)&&e.preventDefault()})}afterGuiAttached(){let e=this.getLocaleTextFunc(),t=this.eEditor;if(t.setInputAriaLabel(e(`ariaInputEditor`,`Input Editor`)),!this.focusAfterAttached)return;Qa()||t.getFocusableElement().focus();let n=t.getInputElement();this.highlightAllOnFocus?n.select():this.cellEditorInput.setCaret?.()}focusIn(){let{eEditor:e}=this,t=e.getFocusableElement(),n=e.getInputElement();t.focus(),n.select()}getValue(){return this.cellEditorInput.getValue()}isPopup(){return!1}getValidationElement(){return this.eEditor.getInputElement()}getValidationErrors(){return this.cellEditorInput.getValidationErrors()}},oS={tag:`ag-input-date-field`,ref:`eEditor`,cls:`ag-cell-editor`},sS=class{constructor(e,t){this.getDataTypeService=e,this.getLocaleTextFunc=t}getTemplate(){return oS}getAgComponents(){return[ts]}init(e,t){this.eEditor=e,this.params=t;let{min:n,max:r,step:i,colDef:a}=t;n!=null&&e.setMin(n),r!=null&&e.setMax(r),i!=null&&e.setStep(i),this.includeTime=t.includeTime??this.getDataTypeService()?.getDateIncludesTimeFlag?.(a.cellDataType),this.includeTime!=null&&e.setIncludeTime(this.includeTime)}getValidationErrors(){let e=this.eEditor.getInputElement().valueAsDate,{params:t}=this,{min:n,max:r,getValidationErrors:i}=t,a=[],o=this.getLocaleTextFunc();if(e instanceof Date&&!isNaN(e.getTime())){if(n){let t=n instanceof Date?n:new Date(n);if(e<t){let e=t.toLocaleDateString();a.push(o(`minDateValidation`,`Date must be after ${e}`,[e]))}}if(r){let t=r instanceof Date?r:new Date(r);if(e>t){let e=t.toLocaleDateString();a.push(o(`maxDateValidation`,`Date must be before ${e}`,[e]))}}}return a.length||(a=null),i?i({value:e,cellEditorParams:t,internalErrors:a}):a}getValue(){let{eEditor:e,params:t}=this,n=e.getDate();return!i(n)&&!i(t.value)?t.value:n??null}getStartValue(){let{value:e}=this.params;if(e instanceof Date)return W(e,this.includeTime??!1)}},cS=class extends aS{constructor(){super(new sS(()=>this.beans.dataTypeSvc,()=>this.getLocaleTextFunc()))}},lS={tag:`ag-input-date-field`,ref:`eEditor`,cls:`ag-cell-editor`},uS=class{constructor(e,t){this.getDataTypeService=e,this.getLocaleTextFunc=t}getTemplate(){return lS}getAgComponents(){return[ts]}init(e,t){this.eEditor=e,this.params=t;let{min:n,max:r,step:i,colDef:a}=t;n!=null&&e.setMin(n),r!=null&&e.setMax(r),i!=null&&e.setStep(i),this.includeTime=t.includeTime??this.getDataTypeService()?.getDateIncludesTimeFlag?.(a.cellDataType),this.includeTime!=null&&e.setIncludeTime(this.includeTime)}getValidationErrors(){let{eEditor:e,params:t}=this,n=e.getInputElement().value,r=this.formatDate(this.parseDate(n??void 0)),{min:i,max:a,getValidationErrors:o}=t,s=[];if(r){let e=new Date(r),t=this.getLocaleTextFunc();if(i){let n=new Date(i);if(e<n){let e=n.toLocaleDateString();s.push(t(`minDateValidation`,`Date must be after ${e}`,[e]))}}if(a){let n=new Date(a);if(e>n){let e=n.toLocaleDateString();s.push(t(`maxDateValidation`,`Date must be before ${e}`,[e]))}}}return s.length||(s=null),o?o({value:this.getValue(),cellEditorParams:t,internalErrors:s}):s}getValue(){let{params:e,eEditor:t}=this,n=this.formatDate(t.getDate());return!i(n)&&!i(e.value)?e.value:e.parseValue(n??``)}getStartValue(){return W(this.parseDate(this.params.value??void 0)??null,this.includeTime??!1)}parseDate(e){let t=this.getDataTypeService();return t?t.getDateParserFunction(this.params.column)(e):G(e)??void 0}formatDate(e){let t=this.getDataTypeService();return t?t.getDateFormatterFunction(this.params.column)(e):W(e??null,this.includeTime??!1)??void 0}},dS=class extends aS{constructor(){super(new uS(()=>this.beans.dataTypeSvc,()=>this.getLocaleTextFunc()))}},fS={tag:`div`,cls:`ag-large-text`,children:[{tag:`ag-input-text-area`,ref:`eEditor`,cls:`ag-large-text-input`}]},pS=class extends Bd{constructor(){super(fS,[Qo]),this.eEditor=B}initialiseEditor(e){let{eEditor:t}=this,{cellStartedEdit:n,eventKey:r,maxLength:i,cols:a,rows:o}=e;this.focusAfterAttached=n,t.getInputElement().setAttribute(`title`,``),t.setMaxLength(i||200).setCols(a||60).setRows(o||10);let s;n?(this.focusAfterAttached=!0,r===U.BACKSPACE||r===U.DELETE?s=``:r&&r.length===1?s=r:(s=this.getStartValue(e),r!==U.F2&&(this.highlightAllOnFocus=!0))):(this.focusAfterAttached=!1,s=this.getStartValue(e)),s!=null&&t.setValue(s,!0),this.addGuiEventListener(`keydown`,this.onKeyDown.bind(this)),this.activateTabIndex()}getStartValue(e){let{value:t}=e;return t?.toString()??t}onKeyDown(e){let t=e.key;(t===U.LEFT||t===U.UP||t===U.RIGHT||t===U.DOWN||e.shiftKey&&t===U.ENTER)&&e.stopPropagation()}afterGuiAttached(){let{eEditor:e,focusAfterAttached:t,highlightAllOnFocus:n}=this,r=this.getLocaleTextFunc();e.setInputAriaLabel(r(`ariaInputEditor`,`Input Editor`)),t&&(e.getFocusableElement().focus(),n&&e.getInputElement().select())}getValue(){let{eEditor:e,params:t}=this,{value:n}=t,r=e.getValue();return!i(r)&&!i(n)?n:t.parseValue(r)}getValidationElement(){return this.eEditor.getInputElement()}getValidationErrors(){let{params:e}=this,{maxLength:t,getValidationErrors:n}=e,r=this.getLocaleTextFunc(),i=this.getValue(),a=[];return typeof i==`string`&&t!=null&&i.length>t&&a.push(r(`maxLengthValidation`,`Must be ${t} characters or fewer.`,[String(t)])),a.length||(a=null),n?n({value:i,internalErrors:a,cellEditorParams:e}):a}},mS={tag:`ag-input-number-field`,ref:`eEditor`,cls:`ag-cell-editor`},hS=class{constructor(e){this.getLocaleTextFunc=e}getTemplate(){return mS}getAgComponents(){return[es]}init(e,t){this.eEditor=e,this.params=t;let{max:n,min:r,precision:i,step:a}=t;n!=null&&e.setMax(n),r!=null&&e.setMin(r),i!=null&&e.setPrecision(i),a!=null&&e.setStep(a);let o=e.getInputElement();t.preventStepping?e.addManagedElementListeners(o,{keydown:this.preventStepping}):t.showStepperButtons&&o.classList.add(`ag-number-field-input-stepper`)}getValidationErrors(){let{params:e}=this,{min:t,max:n,getValidationErrors:r}=e,i=this.eEditor.getInputElement().valueAsNumber,a=this.getLocaleTextFunc(),o=[];return typeof i==`number`&&(t!=null&&i<t&&o.push(a(`minValueValidation`,`Must be greater than or equal to ${t}.`,[String(t)])),n!=null&&i>n&&o.push(a(`maxValueValidation`,`Must be less than or equal to ${n}.`,[String(n)]))),o.length||(o=null),r?r({value:i,cellEditorParams:e,internalErrors:o}):o}preventStepping(e){(e.key===U.UP||e.key===U.DOWN)&&e.preventDefault()}getValue(){let{eEditor:e,params:t}=this,n=e.getValue();if(!i(n)&&!i(t.value))return t.value;let r=t.parseValue(n);if(r==null)return r;if(typeof r==`string`){if(r===``)return null;r=Number(r)}return isNaN(r)?null:r}getStartValue(){return this.params.value}setCaret(){Qa()&&this.eEditor.getInputElement().focus({preventScroll:!0})}},gS=class extends aS{constructor(){super(new hS(()=>this.getLocaleTextFunc()))}},_S={tag:`div`,cls:`ag-cell-edit-wrapper`,children:[{tag:`ag-select`,ref:`eEditor`,cls:`ag-cell-editor`}]},vS=class extends Bd{constructor(){super(_S,[fs]),this.eEditor=B,this.startedByEnter=!1}wireBeans(e){this.valueSvc=e.valueSvc}initialiseEditor(e){this.focusAfterAttached=e.cellStartedEdit;let{eEditor:t,valueSvc:n,gos:r}=this,{values:i,value:o,eventKey:s}=e;if(a(i)){M(58);return}this.startedByEnter=s==null?!1:s===U.ENTER;let c=!1;i.forEach(r=>{let i={value:r};i.text=n.formatValue(e.column,null,r)??r,t.addOption(i),c||=o===r}),c?t.setValue(e.value,!0):e.values.length&&t.setValue(e.values[0],!0);let{valueListGap:l,valueListMaxWidth:u,valueListMaxHeight:d}=e;l!=null&&t.setPickerGap(l),d!=null&&t.setPickerMaxHeight(d),u!=null&&t.setPickerMaxWidth(u),r.get(`editType`)!==`fullRow`&&this.addManagedListeners(this.eEditor,{selectedItem:()=>e.stopEditing()})}afterGuiAttached(){this.focusAfterAttached&&this.eEditor.getFocusableElement().focus(),this.startedByEnter&&setTimeout(()=>{this.isAlive()&&this.eEditor.showPicker()})}focusIn(){this.eEditor.getFocusableElement().focus()}getValue(){return this.eEditor.getValue()}isPopup(){return!1}getValidationElement(){return this.eEditor.getAriaElement()}getValidationErrors(){let{params:e}=this,{values:t,getValidationErrors:n}=e,r=this.getValue(),i=[];if(t&&!t.includes(r)){let e=this.getLocaleTextFunc();i.push(e(`invalidSelectionValidation`,`Invalid selection.`))}else i=null;return n?n({value:r,internalErrors:i,cellEditorParams:e}):i}},yS={tag:`ag-input-text-field`,ref:`eEditor`,cls:`ag-cell-editor`},bS=class{constructor(e){this.getLocaleTextFunc=e}getTemplate(){return yS}getAgComponents(){return[Zo]}init(e,t){this.eEditor=e,this.params=t;let n=t.maxLength;n!=null&&e.setMaxLength(n)}getValidationErrors(){let{params:e}=this,{maxLength:t,getValidationErrors:n}=e,r=this.getValue(),i=this.getLocaleTextFunc(),a=[];return t!=null&&typeof r==`string`&&r.length>t&&a.push(i(`maxLengthValidation`,`Must be ${t} characters or fewer.`,[String(t)])),a.length||(a=null),n?n({value:r,cellEditorParams:e,internalErrors:a}):a}getValue(){let{eEditor:e,params:t}=this,n=e.getValue();return!i(n)&&!i(t.value)?t.value:t.parseValue(n)}getStartValue(){let e=this.params;return e.useFormatter||e.column.getColDef().refData?e.formatValue(e.value):e.value}setCaret(){Qa()&&this.eEditor.getInputElement().focus({preventScroll:!0});let e=this.eEditor,t=e.getValue(),n=i(t)&&t.length||0;n&&e.getInputElement().setSelectionRange(n,n)}},xS=class extends aS{constructor(){super(new bS(()=>this.getLocaleTextFunc()))}};function SS(e){return e.ctrlsSvc.getScrollFeature().getVScrollPosition()}function CS(e){return e.ctrlsSvc.getScrollFeature().getHScrollPosition()}function wS(e,t,n=`auto`){e.frameworkOverrides.wrapIncoming(()=>e.ctrlsSvc.getScrollFeature().ensureColumnVisible(t,n),`ensureVisible`)}function TS(e,t,n){e.frameworkOverrides.wrapIncoming(()=>e.ctrlsSvc.getScrollFeature().ensureIndexVisible(t,n),`ensureVisible`)}function ES(e,t,n=null){e.frameworkOverrides.wrapIncoming(()=>e.ctrlsSvc.getScrollFeature().ensureNodeVisible(t,n),`ensureVisible`)}function DS(e){e.undoRedo?.undo(`api`)}function OS(e){e.undoRedo?.redo(`api`)}function kS(e,t){return e.editModelSvc?.getEditRowDataValue(t,{checkSiblings:!0})}function AS(e){let t=e.editModelSvc?.getEditMap(),n=[];return t?.forEach((e,t)=>{let{rowIndex:r,rowPinned:i}=t;e.forEach((e,t)=>{let{editorValue:a,pendingValue:o,sourceValue:s,state:c}=e,l=E_(e),u=a??o;u===S_&&(u=void 0);let d={newValue:u,oldValue:s,state:c,column:t,colId:t.getColId(),colKey:t.getColId(),rowIndex:r,rowPinned:i};(c===`editing`||c===`changed`&&l)&&n.push(d)})}),n}function jS(e,t=!1){let{editSvc:n}=e;if(n?.isBatchEditing()){if(t)for(let t of e.editModelSvc?.getEditPositions()??[])t.state===`editing`&&n.revertSingleCellEdit(t);else N_(e,{persist:!0});L_(e,void 0,{cancel:t})}else n?.stopEditing(void 0,{cancel:t,source:`edit`,forceStop:!t,forceCancel:t})}function MS(e,t){let n=Z(e,t);return e.editSvc?.isEditing(n)??!1}function NS(e,t){let{key:n,colKey:r,rowIndex:i,rowPinned:a}=t,{editSvc:o,colModel:s}=e,c=s.getCol(r);if(!c){M(12,{colKey:r});return}let l=id(e,{rowIndex:i,rowPinned:a||null,column:c});if(!l){M(290,{rowIndex:i,rowPinned:a});return}o?.isCellEditable({rowNode:l,column:c},`api`)&&(a??TS(e,i),wS(e,r),o?.startEditing({rowNode:l,column:c},{event:n?new KeyboardEvent(`keydown`,{key:n}):void 0,source:`api`}))}function PS(e){return e.editSvc?.validateEdit()||null}function FS(e){return e.undoRedo?.getCurrentUndoStackSize()??0}function IS(e){return e.undoRedo?.getCurrentRedoStackSize()??0}var LS={tag:`div`,cls:`ag-popup-editor`,attrs:{tabindex:`-1`}},RS=class extends Wa{constructor(e){super(LS),this.params=e}postConstruct(){Wn(this.gos,this.getGui(),`popupEditorWrapper`,!0),this.addKeyDownListener()}addKeyDownListener(){let e=this.getGui(),t=this.params;this.addManagedElementListeners(e,{keydown:e=>{ou(this.gos,e,t.node,t.column,!0)||t.onKeyDown(e)}})}};function zS(e,{column:t},n,r,i=`ui`){if(n instanceof KeyboardEvent&&(n.key===U.TAB||n.key===U.ENTER||n.key===U.F2||n.key===U.BACKSPACE&&r))return!0;if(n?.shiftKey&&e.rangeSvc?.getCellRanges().length!=0)return!1;let a=t?.getColDef(),o=BS(e.gos,a),s=n?.type;return s===`click`&&n?.detail===1&&o===1||s===`dblclick`&&n?.detail===2&&o===2?!0:i===`api`?r??!1:!1}function BS(e,t){return e.get(`suppressClickEdit`)===!0?0:e.get(`singleClickEdit`)===!0||t?.singleClickEdit?1:2}function VS(e,{rowNode:t,column:n},r=`ui`){let i=n.getColDef().editable,a=e.editModelSvc;return n.isColumnFunc(t,i)||!!a&&a.hasEdits({rowNode:t,column:n},{withOpenEditor:!0})}function HS(e,t,n=`ui`){let r=VS(e,t,n);return r===!0||n===`ui`?r:e.colModel.getCols().some(r=>VS(e,{rowNode:t.rowNode,column:r},n))}var US=(e,t=!1)=>{if(e!==void 0)return E_(e)||t&&e.state===`editing`};function WS(e,t,n=!1){return US(e.editModelSvc?.getEdit(t),n)}var GS=(e,t,n)=>{if(e)for(let r=0,i=e.length;r<i;++r){let i=e[r];if(i.data&&(US(t?.getEdit({rowNode:i,column:n}))||US(t?.getEdit({rowNode:i.pinnedSibling,column:n})))||GS(i.childrenAfterGroup,t,n))return!0}};function KS(e,t){let{column:n,rowNode:r}=t;return e.gos.get(`groupTotalRow`)&&!r?.footer?!1:GS(r?.childrenAfterGroup,e.editModelSvc,n)}function qS(e,{rowNode:t,column:n}){if(t=t.pinnedSibling,t)return US(e.editModelSvc?.getEdit({rowNode:t,column:n}))}var JS=class extends O{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(){let{cellCtrl:e,editSvc:t,beans:n}=this;if(t?.isBatchEditing()&&t.isEditing()){let t=WS(n,e)||KS(n,e)||qS(n,e);this.applyBatchingStyle(t)}else this.applyBatchingStyle(!1);let r=!!this.editModelSvc?.getCellValidationModel().hasCellValidation(this.cellCtrl);this.cellComp.toggleCss(`ag-cell-editing-error`,r)}applyBatchingStyle(e){this.cellComp.toggleCss(`ag-cell-editing`,e??!1),this.cellComp.toggleCss(`ag-cell-batch-edit`,(e&&this.editSvc?.isBatchEditing())??!1)}},YS=class extends O{constructor(e,t){super(),this.rowCtrl=e,this.beans=t,this.gos=t.gos,this.editSvc=t.editSvc,this.editModelSvc=t.editModelSvc}applyRowStyles(){let{rowCtrl:e,editModelSvc:t,beans:n}=this,r=e.rowNode,i=t?.getEditRow(r),a=this.editModelSvc?.getRowValidationModel().hasRowValidation({rowNode:r});if(!i&&r.pinnedSibling&&(r=r.pinnedSibling,i=t?.getEditRow(r)),i){let e=Array.from(i.keys()).some(e=>{let t={rowNode:r,column:e};return WS(n,t,!0)||KS(n,t)||qS(n,t)});this.applyStyle(a,e);return}this.applyStyle(a)}applyStyle(e=!1,t=!1){let n=this.editSvc?.isBatchEditing()??!1,r=this.gos.get(`editType`)===`fullRow`;this.rowCtrl?.forEachGui(void 0,({rowComp:i})=>{i.toggleCss(`ag-row-editing`,r&&t),i.toggleCss(`ag-row-batch-edit`,r&&t&&n),i.toggleCss(`ag-row-inline-editing`,t),i.toggleCss(`ag-row-not-inline-editing`,!t),i.toggleCss(`ag-row-editing-invalid`,r&&t&&e)})}},XS=({rowModel:e,pinnedRowModel:t,editModelSvc:n},r)=>{let i=new Set;e.forEachNode(e=>r.has(e)&&i.add(e)),t?.forEachPinnedRow(`top`,e=>r.has(e)&&i.add(e)),t?.forEachPinnedRow(`bottom`,e=>r.has(e)&&i.add(e));for(let e of r)i.has(e)||n.removeEdits({rowNode:e});return i},ZS=({editModelSvc:e},t,n)=>{for(let r of t)e?.getEditRow(r)?.forEach((t,i)=>!n.has(i)&&e.removeEdits({rowNode:r,column:i}))},QS=e=>()=>{let t=new Set(e.colModel.getCols()),n=e.editModelSvc.getEditMap(!0);ZS(e,XS(e,new Set(n.keys())),t)},$S=new Set([`undo`,`redo`,`paste`,`bulk`,`rangeSvc`]),eC=new Set([`ui`,`api`]),tC={paste:`api`,rangeSvc:`api`,fillHandle:`api`,cellClear:`api`,bulk:`api`},nC=new Set(Object.keys(tC)),rC=new Set([`paste`,`rangeSvc`,`cellClear`,`redo`,`undo`]),iC={cancel:!0,source:`api`},aC={cancel:!1,source:`api`},oC={checkSiblings:!0},sC={force:!0,suppressFlash:!0},cC=class extends O{constructor(){super(...arguments),this.beanName=`editSvc`,this.batch=!1,this.stopping=!1,this.committing=!1}postConstruct(){let{beans:e}=this;this.model=e.editModelSvc,this.valueSvc=e.valueSvc,this.rangeSvc=e.rangeSvc,this.addManagedPropertyListener(`editType`,({currentValue:e})=>{this.stopEditing(void 0,iC),this.createStrategy(e)});let t=QS(e),n=()=>{let t=this.model.getCellValidationModel().getCellValidationMap().size>0,n=this.model.getRowValidationModel().getRowValidationMap().size>0;return t||n?this.stopEditing(void 0,iC):this.isEditing()&&(this.batch?L_(e,this.model.getEditPositions()):this.stopEditing(void 0,aC)),!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}setBatchEditing(e){e?(this.batch=!0,this.stopEditing(void 0,iC)):(this.stopEditing(void 0,iC),this.batch=!1)}createStrategy(e){let{beans:t,gos:n,strategy:r}=this,i=uC(n,e);if(r){if(r.beanName===i)return r;this.destroyStrategy()}return this.strategy=this.createOptionalManagedBean(t.registry.createDynamicBean(i,!0))}destroyStrategy(){this.strategy&&=(this.strategy.destroy(),this.destroyBean(this.strategy))}shouldStartEditing(e,t,n,r=`ui`){let i=zS(this.beans,e,t,n,r);return i&&(this.strategy??=this.createStrategy()),i}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 W_(this.beans)}isEditing(e,t){return this.model.hasEdits(e,t??oC)}isRowEditing(e,t){return(e&&this.model.hasRowEdits(e,t))??!1}startEditing(e,t){let{startedEdit:n=!0,event:r=null,source:i=`ui`,ignoreEventKey:a=!1,silent:o}=t;if(this.strategy??=this.createStrategy(),!this.isCellEditable(e,`api`))return;let s=Z(this.beans,e);if(s&&!s.comp){s.onCompAttachedFuncs.push(()=>this.startEditing(e,t));return}let c=this.shouldStartEditing(e,r,n,i);if(c===!1&&i!==`api`){this.isEditing(e)&&this.stopEditing();return}!this.batch&&this.shouldStopEditing(e,void 0,i)&&!t.continueEditing&&this.stopEditing(void 0,{source:i}),c&&this.batch&&this.dispatchBatchEvent(`batchEditingStarted`,new Map),this.strategy.start({position:e,event:r,source:i,ignoreEventKey:a,startedEdit:n,silent:o})}stopEditing(e,t){let n=this.prepareStopContext(e,t);if(!n)return!1;this.stopping=!0;let r=!1,{edits:i}=n;try{let a=this.processStopRequest(n);return r||=a.res,i=a.edits,this.finishStopEditing({...n,edits:i,params:t,position:e,res:r}),r}finally{this.stopping=!1}}prepareStopContext(e,t){let{event:n,cancel:r,source:i=`ui`,forceCancel:a,forceStop:o}=t||{};if(nC.has(i)&&this.batch)return this.bulkRefresh(e),null;let s=this.committing?tC[i]:i;if(!(this.committing||this.isEditing(e)||this.batch&&this.model.hasEdits(e,oC))||!this.strategy||this.stopping)return null;let c=Z(this.beans,e);c&&(c.onEditorAttachedFuncs=[]);let l=!r&&(!!this.shouldStopEditing(e,n,s)||(this.committing||i===`paste`)&&!this.batch)||(o??!1),u=r&&!!this.shouldCancelEditing(e,n,s)||(a??!1);return{cancel:r,cellCtrl:c??void 0,edits:this.model.getEditMap(!0),event:n,forceCancel:a,forceStop:o,position:e,source:i,treatAsSource:s,willCancel:u,willStop:l}}processStopRequest(e){let{event:t,position:n,willCancel:r,willStop:i}=e;return i||r?this.handleStopOrCancel(e):this.shouldHandleMidBatchKey(t,n)?{res:!1,edits:this.handleMidBatchKey(t,n,e)}:(N_(this.beans,{persist:!0}),this.batch&&this.strategy?.cleanupEditors(n),{res:!1,edits:this.model.getEditMap()})}handleStopOrCancel(e){let{beans:t,model:n}=this,{cancel:r,edits:i,event:a,source:o,willCancel:s,willStop:c}=e;N_(t,{persist:!0,isCancelling:s||r,isStopping:c});let l=n.getEditMap(),u=this.processEdits(l,r,o);this.strategy?.stop(r,a),this.clearValidationIfNoOpenEditors();for(let e of u)n.clearEditValue(e);this.bulkRefresh(void 0,i);for(let e of n.getEditPositions(l)){let n=Z(t,e),r=E_(e);n?.refreshCell({force:!0,suppressFlash:!r})}return{res:c,edits:l}}shouldHandleMidBatchKey(e,t){return e instanceof KeyboardEvent&&this.batch&&!!this.strategy?.midBatchInputsAllowed(t)&&this.isEditing(t,{withOpenEditor:!0})}handleMidBatchKey(e,t,n){let{beans:r,model:i}=this,{cellCtrl:a,edits:o}=n,{key:s}=e,c=s===U.ENTER,l=s===U.ESCAPE,u=s===U.TAB;return c||u||l?(c||u?N_(r,{persist:!0}):l&&this.revertSingleCellEdit(a),this.batch?this.strategy?.cleanupEditors():L_(r,i.getEditPositions(),{event:e,cancel:l}),e.preventDefault(),this.bulkRefresh(t,o,{suppressFlash:!0}),i.getEditMap()):o}finishStopEditing({cellCtrl:e,edits:t,params:n,position:r,res:i,willCancel:a,willStop:o}){let s=this.beans;i&&r&&this.model.removeEdits(r),this.navigateAfterEdit(n,e?.cellPosition),A_(s),this.clearValidationIfNoOpenEditors(),this.bulkRefresh();let{rowRenderer:c,formula:l}=s;a&&c.refreshRows({rowNodes:Array.from(t.keys())}),this.batch&&(l?l.refreshFormulas(!0):c.refreshRows({suppressFlash:!0,force:!0}),i&&o&&this.dispatchBatchEvent(`batchEditingStopped`,t))}clearValidationIfNoOpenEditors(){this.model.hasEdits(void 0,{withOpenEditor:!0})||(this.model.getCellValidationModel().clearCellValidationMap(),this.model.getRowValidationModel().clearRowValidationMap())}navigateAfterEdit(e,t){if(!e||!t)return;let{event:n,suppressNavigateAfterEdit:r}=e;if(!(n instanceof KeyboardEvent)||r)return;let{key:i,shiftKey:a}=n,o=this.gos.get(`enterNavigatesVerticallyAfterEdit`);if(i!==U.ENTER||!o)return;let s=a?U.UP:U.DOWN;this.beans.navigation?.navigateToNextCell(null,s,t,!1)}processEdits(e,t=!1,n){let r=Array.from(e.keys()),i=this.model.getCellValidationModel().getCellValidationMap().size>0||this.model.getRowValidationModel().getRowValidationMap().size>0,a=[];for(let o of r){let r=e.get(o);for(let e of r.keys()){let s=r.get(e),c={rowNode:o,column:e},l=E_(s);!t&&l&&!i&&(this.setNodeDataValue(o,e,s.pendingValue,void 0,n)||a.push(c))}}return a}setNodeDataValue(e,t,n,r,i=`edit`){let{beans:a}=this,o=Z(a,{rowNode:e,column:t}),s=eC.has(i)?`edit`:i;o&&(o.suppressRefreshCell=!0),this.committing=!0;let c=e.setDataValue(t,n,s);return this.committing=!1,o&&(o.suppressRefreshCell=!1),r&&o?.refreshCell(sC),c}setEditMap(e,t){this.strategy??=this.createStrategy(),this.strategy?.setEditMap(e,t),this.bulkRefresh();let n=sC;t?.forceRefreshOfEditCellsOnly&&(n={...lC(e),...sC}),this.beans.rowRenderer.refreshCells(n)}dispatchEditValuesChanged({rowNode:e,column:t},n={}){if(!e||!t||!n)return;let{pendingValue:r,sourceValue:i}=n,{rowIndex:a,rowPinned:o,data:s}=e;this.beans.eventSvc.dispatchEvent({type:`cellEditValuesChanged`,node:e,rowIndex:a,rowPinned:o,column:t,source:`api`,data:s,newValue:r,oldValue:i,value:r,colDef:t.getColDef()})}bulkRefresh(e={},t,n={}){let{beans:r,gos:i}=this,{editModelSvc:a,rowModel:o}=r;P(i,o)&&(e.rowNode&&e.column?this.refCell(e,this.model.getEdit(e),n):t&&a?.getEditMap(!1)?.forEach((e,t)=>{for(let r of e.keys())this.refCell({rowNode:t,column:r},e.get(r),n)}))}refCell({rowNode:e,column:t},n,r={}){let{beans:i,gos:a}=this,o=new Set([e]),s=new Set,c=e.pinnedSibling;c&&o.add(c);let l=e.sibling;l&&s.add(l);let u=e.parent;for(;u;)u.sibling?.footer&&a.get(`groupTotalRow`)||!u.parent&&u.sibling&&a.get(`grandTotalRow`)?s.add(u.sibling):s.add(u),u=u.parent;for(let e of o)this.dispatchEditValuesChanged({rowNode:e,column:t},n);for(let e of o)Z(i,{rowNode:e,column:t})?.refreshCell(r);for(let e of s)Z(i,{rowNode:e,column:t})?.refreshCell(r)}stopAllEditing(e=!1,t=`ui`){this.isEditing()&&this.stopEditing(void 0,{cancel:e,source:t})}isCellEditable(e,t=`ui`){let{rowNode:n}=e,{gos:r,beans:i}=this;if(n.group){if(r.get(`treeData`)){if(!n.data&&!r.get(`enableGroupEdit`))return!1}else if(!r.get(`enableGroupEdit`))return!1}let a=uC(r)===`fullRow`?HS(i,e,t):VS(i,e,t);return a&&(this.strategy??=this.createStrategy()),a}cellEditingInvalidCommitBlocks(){return this.gos.get(`invalidEditValueMode`)===`block`}checkNavWithValidation(e,t,n=!0){if(this.hasValidationErrors(e)){let r=Z(this.beans,e);return this.cellEditingInvalidCommitBlocks()?(t?.preventDefault?.(),n&&(!r?.hasBrowserFocus()&&r?.focusCell(),r?.comp?.getCellEditor()?.focusIn?.()),`block-stop`):(r&&this.revertSingleCellEdit(r),`revert-continue`)}return`continue`}revertSingleCellEdit(e,t=!1){let n=Z(this.beans,e);n?.comp?.getCellEditor()&&(L_(this.beans,[e],{silent:!0}),this.model.clearEditValue(e),D_(this.beans,e,{silent:!0}),H_(this.beans),n?.refreshCell(sC),t&&(n?.focusCell(),n?.comp?.getCellEditor()?.focusIn?.()))}hasValidationErrors(e){H_(this.beans);let t=Z(this.beans,e);t&&(t.refreshCell(sC),t.rowCtrl.rowEditStyleFeature?.applyRowStyles());let n=!1;return e?.rowNode?(n||=this.model.getRowValidationModel().hasRowValidation({rowNode:e.rowNode}),e.column&&(n||=this.model.getCellValidationModel().hasCellValidation({rowNode:e.rowNode,column:e.column}))):(n||=this.model.getCellValidationModel().getCellValidationMap().size>0,n||=this.model.getRowValidationModel().getRowValidationMap().size>0),n}moveToNextCell(e,t,n,r=`ui`){let i,a=this.isEditing(),o=a&&this.checkNavWithValidation(void 0,n)===`block-stop`;return e instanceof av&&a&&(i=this.strategy?.moveToNextEditingCell(e,t,n,r,o)),i===null?i:(i||=!!this.beans.focusSvc.focusedHeader,i===!1&&!o&&this.stopEditing(),i)}getCellDataValue({rowNode:e,column:t},n=!0){if(!e||!t)return;let r=this.model.getEdit({rowNode:e,column:t}),i=e.pinnedSibling;if(i){let e=this.model.getEdit({rowNode:i,column:t});e&&(r=e)}let a=n?r?.editorValue??r?.pendingValue:r?.pendingValue;return a===S_||!r?r?.sourceValue??this.valueSvc.getValue(t,e,!1,`api`):a}addStopEditingWhenGridLosesFocus(e){b_(this,this.beans,e)}createPopupEditorWrapper(e){return new RS(e)}setDataValue(e,t,n){try{if((!this.isEditing()||this.committing)&&!rC.has(n))return;let{beans:r}=this;this.strategy??=this.createStrategy();let i=this.batch?`ui`:this.committing?n??`api`:`api`;if(!n||$S.has(n))return P_(r,e,t,n,void 0,{persist:!0}),this.batch?(this.cleanupEditors(),A_(r),this.bulkRefresh(),!0):this.setNodeDataValue(e.rowNode,e.column,t,!0,n);let a=this.model.getEdit(e);if(a){if(a.pendingValue===t)return!1;if(a.sourceValue!==t)return P_(r,e,t,n,void 0,{persist:!0}),this.stopEditing(e,{source:i,suppressNavigateAfterEdit:!0}),!0;if(a.sourceValue===t)return r.editModelSvc?.removeEdits(e),this.dispatchEditValuesChanged(e,{...a,pendingValue:t}),!0}return P_(r,e,t,n,void 0,{persist:!0}),this.stopEditing(e,{source:i,suppressNavigateAfterEdit:!0}),!0}finally{this.committing=!1}}handleColDefChanged(e){j_(this.beans,e)}destroy(){this.model.clear(),this.destroyStrategy(),super.destroy()}prepDetailsDuringBatch(e,t){let{model:n}=this;if(!this.batch||!n.hasRowEdits(e.rowNode,oC))return;let{rowNode:r}=e,{compDetails:i,valueToDisplay:a}=t;if(i){let{params:e}=i;return e.data=n.getEditRowDataValue(r,oC),{compDetails:i}}return{valueToDisplay:a}}cleanupEditors(){this.strategy?.cleanupEditors()}dispatchCellEvent(e,t,n,r){this.strategy?.dispatchCellEvent(e,t,n,r)}dispatchBatchEvent(e,t){this.eventSvc.dispatchEvent(this.createBatchEditEvent(e,t))}createBatchEditEvent(e,t){return L(this.gos,{type:e,...e===`batchEditingStopped`?{changes:this.toEventChangeList(t)}:{}})}toEventChangeList(e){return this.model.getEditPositions(e).map(e=>({rowIndex:e.rowNode.rowIndex,rowPinned:e.rowNode.rowPinned,columnId:e.column.getColId(),newValue:e.pendingValue,oldValue:e.sourceValue}))}applyBulkEdit({rowNode:e,column:t},n){if(!n||n.length===0)return;let{beans:r,rangeSvc:i,valueSvc:a}=this,{formula:o}=r;N_(r,{persist:!0});let s=this.model.getEditMap(!0),c=s.get(e)?.get(t)?.pendingValue;this.batch||this.eventSvc.dispatchEvent({type:`bulkEditingStarted`});let l=o?.isFormula(c)??!1;n.forEach(e=>{let t=e.columns.some(e=>e?.isAllowFormula());if(i?.forEachRowInRange(e,n=>{let i=id(r,n);if(i===void 0)return;let u=s.get(i)??new Map,d=c;for(let t of e.columns){if(!t)continue;let e=!!l&&t.isAllowFormula();if(this.isCellEditable({rowNode:i,column:t},`api`)){let e=a.getValue(t,i,!0,`api`),n=a.parseValue(t,i??null,d,e);Number.isNaN(n)&&(n=null),u.set(t,{editorValue:void 0,pendingValue:n,sourceValue:e,state:`changed`,editorState:{isCancelAfterEnd:void 0,isCancelBeforeStart:void 0}})}e&&(d=o?.updateFormulaByOffset({value:d,columnDelta:1}))}u.size>0&&s.set(i,u),l&&t&&(c=o?.updateFormulaByOffset({value:c,rowDelta:1}))}),this.setEditMap(s),this.batch){this.cleanupEditors(),A_(r),this.bulkRefresh();return}this.committing=!0,this.stopEditing(void 0,{source:`bulk`}),this.committing=!1,this.eventSvc.dispatchEvent({type:`bulkEditingStopped`,changes:this.toEventChangeList(s)})}),this.bulkRefresh();let u=Z(r,{rowNode:e,column:t});u&&u.focusCell(!0)}createCellStyleFeature(e){return new JS(e,this.beans)}createRowStyleFeature(e){return new YS(e,this.beans)}setEditingCells(e,t){let{beans:n}=this,{colModel:r,valueSvc:i}=n,a=new Map;for(let{colId:o,column:s,colKey:c,rowIndex:l,rowPinned:u,newValue:d,state:f}of e){let e=o?r.getCol(o):c?r.getCol(c):s;if(!e)continue;let p=id(n,{rowIndex:l,rowPinned:u});if(!p)continue;let m=i.getValue(e,p,!0,`api`);if(!t?.forceRefreshOfEditCellsOnly&&!E_({pendingValue:d,sourceValue:m})&&f!==`editing`)continue;let h=a.get(p);h||(h=new Map,a.set(p,h)),d===void 0&&(d=S_),h.set(e,{editorValue:void 0,pendingValue:d,sourceValue:m,state:f??`changed`,editorState:{isCancelAfterEnd:void 0,isCancelBeforeStart:void 0}})}this.setEditMap(a,t)}onCellFocused(e){let t=Z(this.beans,e);if(!t||!this.isEditing(t,oC))return;let n=this.model.getEdit(t);if(!n||!E_(n))return;let r=this.getLocaleTextFunc()(`ariaPendingChange`,`Pending Change`);this.beans.ariaAnnounce?.announceValue(r,`pendingChange`)}allowedFocusTargetOnValidation(e){return Z(this.beans,e)}};function lC(e){return{rowNodes:e?Array.from(e.keys()):void 0,columns:e?[...new Set(Array.from(e.values()).flatMap(e=>Array.from(e.keys())))]:void 0}}function uC(e,t){return t??e.get(`editType`)??`singleCell`}var dC=class extends O{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,n=e.previousParams,{editSvc:r,beans:i}=this,a=e.type===`cellFocused`?e.sourceEvent:null;n&&(t=Z(i,n));let{gos:o,editModelSvc:s}=i,c=e.type===`cellFocusCleared`;if(r.isEditing(void 0,{withOpenEditor:!0})){let{column:t,rowIndex:l,rowPinned:u}=e,d={column:t,rowNode:id(i,{rowIndex:l,rowPinned:u})},f=o.get(`invalidEditValueMode`)===`block`;if(f)return;let p=!f,m=!!s?.getCellValidationModel().hasCellValidation(d),h=p&&m;!(n||c)||r.stopEditing(void 0,{cancel:h,source:c&&p?`api`:void 0,event:a})||(r.isBatchEditing()?r.cleanupEditors():r.stopEditing(void 0,{source:`api`}))}t?.refreshCell({suppressFlash:!0,force:!0})}stop(e,t){let n=this.model.getEditPositions(),r={all:[],pass:[],fail:[]};for(let e of n){if(r.all.push(e),(this.model.getCellValidationModel().getCellValidation(e)?.errorMessages?.length??0)>0){r.fail.push(e);continue}r.pass.push(e)}if(e)for(let t of n)R_(this.beans,t,{cancel:e}),this.model.stop(t);else{let n=this.processValidationResults(r);if(n.destroy.length>0)for(let r of n.destroy)R_(this.beans,r,{event:t,cancel:e}),this.model.stop(r);if(n.keep.length>0)for(let e of n.keep){let t=Z(this.beans,e);this.editSvc?.cellEditingInvalidCommitBlocks()||t&&this.editSvc.revertSingleCellEdit(t)}}return!0}cleanupEditors({rowNode:e}={},t){N_(this.beans,{persist:!1});let n=this.model.getEditPositions(),r=[];if(e)for(let t of n)t.rowNode!==e&&r.push(t);else for(let e of n)r.push(e);L_(this.beans,r),A_(this.beans,t)}setFocusOutOnEditor(e){e.comp?.getCellEditor()?.focusOut?.()}setFocusInOnEditor(e){let t=e.comp,n=t?.getCellEditor();if(n?.focusIn)n.focusIn();else{let n=this.beans.gos.get(`editType`)===`fullRow`;e.focusCell(n),e.onEditorAttachedFuncs.push(()=>t?.getCellEditor()?.focusIn?.())}}setupEditors(e){let{event:t,ignoreEventKey:n=!1,startedEdit:r,position:i,cells:a=this.model.getEditPositions()}=e,o=t instanceof KeyboardEvent&&!n&&t.key||void 0;T_(this.beans,a,i,o,t,r)}dispatchCellEvent(e,t,n,r){let i=Z(this.beans,e);i&&this.eventSvc.dispatchEvent({...i.createEvent(t??null,n),...r})}dispatchRowEvent(e,t,n){if(n)return;let r=v_(this.beans,e);r&&this.eventSvc.dispatchEvent(r.createRowEvent(t))}shouldStop(e,t,n=`ui`){let r=this.editSvc.isBatchEditing();return r&&n===`api`?!0:r&&(n===`ui`||n===`edit`)?!1:n===`api`?!0:t instanceof KeyboardEvent&&!r?t.key===U.ENTER:null}shouldCancel(e,t,n=`ui`){let r=this.editSvc.isBatchEditing();return!!(t instanceof KeyboardEvent&&!r&&t.key===U.ESCAPE||r&&n===`api`||n===`api`)}setEditMap(e,t){t?.update||this.editSvc.stopEditing(void 0,{cancel:!0,source:`api`});let n=[];if(e.forEach((e,t)=>{e.forEach((e,r)=>{e.state===`editing`&&n.push({...e,rowNode:t,column:r})})}),t?.update&&(e=new Map([...this.model.getEditMap(),...e])),this.model?.setEditMap(e),n.length>0){let e=n.at(-1),t=e.pendingValue===S_?void 0:e.pendingValue;this.start({position:e,event:new KeyboardEvent(`keydown`,{key:t}),source:`api`});let r=Z(this.beans,e);r&&this.setFocusInOnEditor(r)}}destroy(){this.cleanupEditors(),super.destroy()}},fC={moduleName:`EditCore`,version:j,beans:[h_,cC],apiFunctions:{getEditingCells:AS,getEditRowValues:kS,getCellEditorInstances:w_,startEditingCell:NS,stopEditing:jS,isEditing:MS,validateEdit:PS},dynamicBeans:{singleCell:class extends dC{constructor(){super(...arguments),this.beanName=`singleCell`}shouldStop(e,t,n=`ui`){let r=super.shouldStop(e,t,n);if(r!==null)return r;let{rowNode:i,column:a}=e||{};return(!this.rowNode||!this.column)&&i&&a?null:this.rowNode!==i||this.column!==a}midBatchInputsAllowed(e){return this.model.hasEdits(e)}start(e){let{position:t,startedEdit:n,event:r,ignoreEventKey:i}=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:r,ignoreEventKey:i})}dispatchRowEvent(e,t,n){}processValidationResults(e){return e.fail.length>0&&this.editSvc.cellEditingInvalidCommitBlocks()?{destroy:[],keep:e.all}:{destroy:e.all,keep:[]}}stop(e,t){return super.stop(e,t),this.rowNode=void 0,this.column=void 0,!0}onCellFocusChanged(e){let{colModel:t,editSvc:n}=this.beans,{rowIndex:r,column:i,rowPinned:a}=e,o=id(this.beans,{rowIndex:r,rowPinned:a}),s=x_(i),c=t.getCol(s),l=e.previousParams;if(l){let e=x_(l.column);if(l?.rowIndex===r&&e===s&&l?.rowPinned===a)return}n?.isEditing({rowNode:o,column:c},{withOpenEditor:!0})&&e.type===`cellFocused`||super.onCellFocusChanged(e)}moveToNextEditingCell(e,t,n,r=`ui`,i=!1){let a=this.beans.focusSvc.getFocusedCell();a&&(e=ad(this.beans,a)??e);let o=e.cellPosition,s,c=this.beans.gos.get(`editType`)===`fullRow`;c&&this.model.suspend(!0),i||(e.eGui.focus(),this.editSvc?.stopEditing(e,{source:this.editSvc?.isBatchEditing()?`ui`:`api`,event:n}));try{s=this.beans.navigation?.findNextCellToFocusOn(o,{backwards:t,startEditing:!0})}finally{c&&this.model.suspend(!1)}if(s===!1)return null;if(s==null)return!1;let l=s.cellPosition,u=e.isCellEditable(),d=s.isCellEditable(),f=l&&o.rowIndex===l.rowIndex&&o.rowPinned===l.rowPinned;u&&!i&&this.setFocusOutOnEditor(e);let p=this.gos.get(`suppressStartEditOnTab`);if(!f&&!i&&(super.cleanupEditors(s,!0),p?s.focusCell(!0,n):this.editSvc.startEditing(s,{startedEdit:!0,event:n,source:r,ignoreEventKey:!0})),d&&!i){if(s.focusCell(!1,n),p)s.focusCell(!0,n);else if(!s.comp?.getCellEditor()){let e=this.editSvc?.isEditing(s,{withOpenEditor:!0});D_(this.beans,s,{event:n,cellStartedEdit:!0,silent:e}),this.setFocusInOnEditor(s),this.cleanupEditors(s)}}else d&&i&&this.setFocusInOnEditor(s),s.focusCell(!0,n);return e.rowCtrl?.refreshRow({suppressFlash:!0,force:!0}),!0}destroy(){super.destroy(),this.rowNode=void 0,this.column=void 0}},fullRow:class extends dC{constructor(){super(...arguments),this.beanName=`fullRow`,this.startedRows=[]}shouldStop(e,t,n=`ui`){let{rowNode:r}=e||{};if(!v_(this.beans,{rowNode:this.rowNode}))return!0;let i=super.shouldStop({rowNode:this.rowNode},t,n);return i===null?this.rowNode?r!==this.rowNode:!1:i}midBatchInputsAllowed({rowNode:e}){return e?this.model.hasEdits({rowNode:e}):!1}clearEdits(e){this.model.clearEditValue(e)}start(e){let{position:t,silent:n,startedEdit:r,event:i,ignoreEventKey:a}=e,{rowNode:o}=t;this.rowNode!==o&&super.cleanupEditors(t);let s=this.beans.visibleCols.allCols,c=[],l=[];for(let e of s)e.isCellEditable(o)&&l.push(e);if(l.length!=0){this.dispatchRowEvent({rowNode:o},`rowEditingStarted`,n),this.startedRows.push(o);for(let e of l){let t={rowNode:o,column:e};c.push(t),this.model.hasEdits(t)||this.model.start(t)}this.rowNode=o,this.setupEditors({cells:c,position:t,startedEdit:r,event:i,ignoreEventKey:a})}}processValidationResults(e){return e.fail.length>0&&this.editSvc.cellEditingInvalidCommitBlocks()?{destroy:[],keep:e.all}:{destroy:e.all,keep:[]}}stop(e,t){let{rowNode:n}=this;if(n&&!this.model.hasRowEdits(n))return!1;let r=[];if(e||this.model.getEditMap().forEach((e,t)=>{if(!(!e||e.size===0)){for(let n of e.values())if(E_(n)){r.push(t);break}}}),H_(this.beans),!e&&this.editSvc?.checkNavWithValidation({rowNode:n})===`block-stop`)return!1;super.stop(e,t);for(let e of r)this.dispatchRowEvent({rowNode:e},`rowValueChanged`);return this.cleanupEditors({rowNode:n},!0),this.rowNode=void 0,!0}onCellFocusChanged(e){let{rowIndex:t}=e,n=e.previousParams;if(n?.rowIndex===t||e.sourceEvent instanceof KeyboardEvent)return;let r=Z(this.beans,n);this.gos.get(`invalidEditValueMode`)===`block`&&r&&(this.model.getCellValidationModel().getCellValidation(r)||this.model.getRowValidationModel().getRowValidation(r))||super.onCellFocusChanged(e)}cleanupEditors(e={},t){super.cleanupEditors(e,t);for(let e of this.startedRows)this.dispatchRowEvent({rowNode:e},`rowEditingStopped`),this.destroyEditorsForRow(e);this.startedRows.length=0}destroyEditorsForRow(e){let t=v_(this.beans,{rowNode:e});if(t)for(let e of t.getAllCellCtrls())e.comp?.getCellEditor()&&R_(this.beans,e,void 0,e)}moveToNextEditingCell(e,t,n,r=`ui`,i=!1){let a=e.cellPosition,o;this.model.suspend(!0);try{o=this.beans.navigation?.findNextCellToFocusOn(a,{backwards:t,startEditing:!0,skipToNextEditableCell:!1})}finally{this.model.suspend(!1)}if(o===!1)return null;if(o==null)return!1;let s=o.cellPosition,c=e.isCellEditable(),l=o.isCellEditable(),u=s&&a.rowIndex===s.rowIndex&&a.rowPinned===s.rowPinned;c&&this.setFocusOutOnEditor(e),this.restoreEditors();let d=this.gos.get(`suppressStartEditOnTab`);return l&&!i?d?o.focusCell(!0,n):(o.comp?.getCellEditor()||D_(this.beans,o,{event:n,cellStartedEdit:!0}),this.setFocusInOnEditor(o),o.focusCell(!1,n)):(l&&i&&this.setFocusInOnEditor(o),o.focusCell(!0,n)),!u&&!i&&(this.editSvc?.stopEditing({rowNode:e.rowNode},{event:n}),this.cleanupEditors(o,!0),d?o.focusCell(!0,n):this.editSvc.startEditing(o,{startedEdit:!0,event:n,source:r,ignoreEventKey:!0})),e.rowCtrl?.refreshRow({suppressFlash:!0,force:!0}),!0}restoreEditors(){this.model.getEditMap().forEach((e,t)=>e.forEach(({state:e},n)=>{if(e!==`editing`)return;let r=Z(this.beans,{rowNode:t,column:n});r&&!r.comp?.getCellEditor()&&D_(this.beans,r,{silent:!0})}))}destroy(){super.destroy(),this.rowNode=void 0,this.startedRows.length=0}}},dependsOn:[fb,Xx],css:[nS]},pC={moduleName:`UndoRedoEdit`,version:j,beans:[tS],apiFunctions:{undoCellEditing:DS,redoCellEditing:OS,getCurrentUndoSize:FS,getCurrentRedoSize:IS},dependsOn:[fC]},mC={moduleName:`TextEditor`,version:j,userComponents:{agCellEditor:xS,agTextCellEditor:xS},dependsOn:[fC]},hC={moduleName:`NumberEditor`,version:j,userComponents:{agNumberCellEditor:{classImp:gS}},dependsOn:[fC]},gC={moduleName:`DateEditor`,version:j,userComponents:{agDateCellEditor:cS,agDateStringCellEditor:dS},dependsOn:[fC]},_C={moduleName:`CheckboxEditor`,version:j,userComponents:{agCheckboxCellEditor:iS},dependsOn:[fC]},vC={moduleName:`SelectEditor`,version:j,userComponents:{agSelectCellEditor:vS},dependsOn:[fC]},yC={moduleName:`LargeTextEditor`,version:j,userComponents:{agLargeTextCellEditor:pS},dependsOn:[fC]},bC={moduleName:`CustomEditor`,version:j,dependsOn:[fC]},xC=class extends O{constructor(){super(...arguments),this.beanName=`selectionColSvc`}postConstruct(){this.addManagedPropertyListener(`rowSelection`,e=>{this.onSelectionOptionsChanged(e.currentValue,e.previousValue,ci(e.source))}),this.addManagedPropertyListener(`selectionColumnDef`,this.updateColumns.bind(this))}addColumns(e){let t=this.columns;t!=null&&(e.list=t.list.concat(e.list),e.tree=t.tree.concat(e.tree),si(e))}createColumns(e,t){let n=()=>{ei(this.beans,this.columns?.tree),this.columns=null},r=e.treeDepth,i=(this.columns?.treeDepth??-1)==r,a=this.generateSelectionCols();if(oi(a,this.columns?.list??[])&&i)return;n();let{colGroupSvc:o}=this.beans,s=o?.findDepth(e.tree)??0;this.columns={list:a,tree:o?.balanceTreeForAutoCols(a,s)??[],treeDepth:s,map:{}},t(e=>{if(!e)return null;let t=e.filter(e=>!ni(e));return[...a,...t]})}updateColumns(e){let t=ci(e.source),{beans:n}=this;for(let r of this.columns?.list??[]){let i=this.createSelectionColDef(e.currentValue);r.setColDef(i,null,t),Ni(n,{state:[di(i,r.colId)]},t)}}getColumn(e){return this.columns?.list.find(t=>li(t,e))??null}getColumns(){return this.columns?.list??null}isSelectionColumnEnabled(){let{gos:e,beans:t}=this,n=e.get(`rowSelection`);if(typeof n!=`object`||!Fn(e))return!1;let r=(t.autoColSvc?.getColumns()?.length??0)>0;if(n.checkboxLocation===`autoGroupColumn`&&r)return!1;let i=!!tr(n),a=nr(n);return i||a}createSelectionColDef(e){let{gos:t}=this,n=e??t.get(`selectionColumnDef`),r=t.get(`enableRtl`),{rowSpan:i,spanRows:a,...o}=n??{};return{width:50,resizable:!1,suppressHeaderMenuButton:!0,sortable:!1,suppressMovable:!0,lockPosition:r?`right`:`left`,comparator(e,t,n,r){let i=n.isSelected();return i===r.isSelected()?0:i?1:-1},editable:!1,suppressFillHandle:!0,suppressAutoSize:!0,pinned:null,...o,colId:Xr,chartDataType:`excluded`}}generateSelectionCols(){if(!this.isSelectionColumnEnabled())return[];let e=this.createSelectionColDef(),t=e.colId;this.gos.validateColDef(e,t,!0);let n=new Nr(e,null,t,!1);return this.createBean(n),[n]}onSelectionOptionsChanged(e,t,n){let r=(t&&typeof t!=`string`?tr(t):void 0)!==(e&&typeof e!=`string`?tr(e):void 0),i=(t&&typeof t!=`string`?nr(t):void 0)!==(e&&typeof e!=`string`?nr(e):void 0),a=rr(e)!==rr(t);(r||i||a)&&this.beans.colModel.refreshAll(n)}destroy(){ei(this.beans,this.columns?.tree),super.destroy()}refreshVisibility(e,t,n){if(!this.columns?.list.length)return;let r=e.length+t.length+n.length;if(r===0)return;let i=this.columns.list[0];i.isVisible()&&(this.beans.rowNumbersSvc?.getColumn(Zr)?2:1)===r&&(()=>{let r;switch(i.pinned){case`left`:case!0:r=e;break;case`right`:r=n;break;default:r=t}r&&qr(r,i)})()}},SC=`:where(.ag-selection-checkbox) .ag-checkbox-input-wrapper{&:before{content:"";cursor:pointer;inset:-8px;position:absolute}}`;function CC(e,t){if(!t.nodes.every(e=>e.rowPinned&&!Of(e)?(M(59),!1):e.id===void 0?(M(60),!1):!0))return;let{nodes:n,source:r,newValue:i}=t;e.selectionSvc?.setNodesSelected({nodes:n,source:r??`api`,newValue:i})}function wC(e,t,n=`apiSelectAll`){e.selectionSvc?.selectAllRowNodes({source:n,selectAll:t})}function TC(e,t,n=`apiSelectAll`){e.selectionSvc?.deselectAllRowNodes({source:n,selectAll:t})}function EC(e,t=`apiSelectAllFiltered`){e.selectionSvc?.selectAllRowNodes({source:t,selectAll:`filtered`})}function DC(e,t=`apiSelectAllFiltered`){e.selectionSvc?.deselectAllRowNodes({source:t,selectAll:`filtered`})}function OC(e,t=`apiSelectAllCurrentPage`){e.selectionSvc?.selectAllRowNodes({source:t,selectAll:`currentPage`})}function kC(e,t=`apiSelectAllCurrentPage`){e.selectionSvc?.deselectAllRowNodes({source:t,selectAll:`currentPage`})}function AC(e){return e.selectionSvc?.getSelectedNodes()??[]}function jC(e){return e.selectionSvc?.getSelectedRows()??[]}var MC=class extends Ff{constructor(){super(...arguments),this.beanName=`selectionSvc`,this.selectedNodes=new Map,this.detailSelection=new Map,this.masterSelectsDetail=!1}postConstruct(){super.postConstruct();let{gos:e}=this;this.mode=fr(e),this.groupSelectsDescendants=vr(e),this.groupSelectsFiltered=hr(e)===`filteredDescendants`,this.masterSelectsDetail=yr(e)===`detail`,this.addManagedPropertyListeners([`groupSelectsChildren`,`groupSelectsFiltered`,`rowSelection`],()=>{let t=vr(e),n=fr(e),r=hr(e)===`filteredDescendants`;this.masterSelectsDetail=yr(e)===`detail`,(t!==this.groupSelectsDescendants||r!==this.groupSelectsFiltered||n!==this.mode)&&(this.deselectAllRowNodes({source:`api`}),this.groupSelectsDescendants=t,this.groupSelectsFiltered=r,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;let r=this.inferNodeSelections(t,e.shiftKey,e.metaKey||e.ctrlKey,n);if(r==null)return 0;if(this.selectionCtx.selectAll=!1,`select`in r)return r.reset?this.resetNodes():this.selectRange(r.deselect,!1,n),this.selectRange(r.select,!0,n);{let t=r.checkFilteredNodes?LC(r.node):r.newValue;return this.setNodesSelected({nodes:[r.node],newValue:t,clearSelection:r.clearSelection,keepDescendants:r.keepDescendants,event:e,source:n})}}setNodesSelected({newValue:e,clearSelection:t,suppressFinishActions:n,nodes:r,event:i,source:a,keepDescendants:o=!1}){if(r.length===0)return 0;let{gos:s}=this;if(!Fn(s)&&e)return M(132),0;if(r.length>1&&!this.isMultiSelect())return M(130),0;let c=0;for(let t=0;t<r.length;t++){let n=r[t],o=NC(n);if(o.rowPinned&&!Of(o)){M(59);continue}if(o.id===void 0){M(60);continue}e&&n.destroyed||(this.groupSelectsFiltered&&o.group&&!s.get(`treeData`)||this.selectRowNode(o,e,i,a)&&(this.detailSelection.delete(o.id),c++),this.groupSelectsDescendants&&o.childrenAfterGroup?.length&&(c+=this.selectChildren(o,e,a)))}return n||(r.length===1&&a===`api`&&this.selectionCtx.setRoot(NC(r[0])),e&&(t||!this.isMultiSelect())&&(c+=this.clearOtherNodes(NC(r[0]),o,a)),c>0&&(this.updateGroupsFromChildrenSelections(a),this.dispatchSelectionChanged(a))),c}selectRange(e,t,n){let r=0;return e.forEach(e=>{let i=NC(e);i.group&&this.groupSelectsDescendants||this.selectRowNode(i,t,void 0,n)&&r++}),r>0&&(this.updateGroupsFromChildrenSelections(n),this.dispatchSelectionChanged(n)),r}selectChildren(e,t,n){let r=this.groupSelectsFiltered?e.childrenAfterAggFilter:e.childrenAfterGroup;return r?this.setNodesSelected({newValue:t,clearSelection:!1,suppressFinishActions:!0,source:n,nodes:r}):0}getSelectedNodes(){return Array.from(this.selectedNodes.values())}getSelectedRows(){let e=[];return this.selectedNodes.forEach(t=>t.data&&e.push(t.data)),e}getSelectionCount(){return this.selectedNodes.size}filterFromSelection(e){let t=new Map;this.selectedNodes.forEach((n,r)=>{e(n)&&t.set(r,n)}),this.selectedNodes=t}updateGroupsFromChildrenSelections(e,t){if(!this.groupSelectsDescendants)return!1;let{gos:n,rowModel:r}=this.beans;if(!P(n,r))return!1;let i=r.rootNode;if(!i)return!1;t||(t=new yp(!0,i),t.active=!1);let a=!1;return t.forEachChangedNodeDepthFirst(t=>{if(t!==i){let n=this.calculateSelectedFromChildren(t);a=this.selectRowNode(t,n===null?!1:n,void 0,e)||a}}),a}clearOtherNodes(e,t,n){let r=new Map,i=0;return this.selectedNodes.forEach(a=>{let o=a.id==e.id;if((!t||!IC(e,a))&&!o){let e=this.selectedNodes.get(a.id);i+=this.setNodesSelected({nodes:[e],newValue:!1,clearSelection:!1,suppressFinishActions:!0,source:n}),this.groupSelectsDescendants&&a.parent&&r.set(a.parent.id,a.parent)}}),r.forEach(e=>{let t=this.calculateSelectedFromChildren(e);this.selectRowNode(e,t===null?!1:t,void 0,n)}),i}onRowSelected(e){let 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;let t=new el(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){let t=this.getSelectionCount();this.resetNodes(),t&&this.dispatchSelectionChanged(e)}resetNodes(){this.selectedNodes.forEach(e=>{this.selectRowNode(e,!1)}),this.selectedNodes.clear()}getBestCostNodeSelection(){let{gos:e,rowModel:t}=this.beans;if(!P(e,t))return;let n=t.getTopLevelNodes();if(n===null)return;let r=[];function i(e){for(let t=0,n=e.length;t<n;t++){let n=e[t];n.isSelected()?r.push(n):n.group&&n.childrenAfterGroup&&i(n.childrenAfterGroup)}}return i(n),r}isEmpty(){return this.getSelectionCount()===0}deselectAllRowNodes({source:e,selectAll:t}){let n=P(this.gos),r=!1,i=t=>{let n=this.selectRowNode(NC(t),!1,void 0,e);r||=n};if(t===`currentPage`||t===`filtered`){if(!n){N(102);return}this.getNodesToSelect(t).forEach(i)}else this.selectedNodes.forEach(i),this.reset(e);if(this.selectionCtx.selectAll=!1,n&&this.groupSelectsDescendants){let t=this.updateGroupsFromChildrenSelections(e);r||=t}r&&this.dispatchSelectionChanged(e)}getSelectedCounts(e){let t=0,n=0;return this.getNodesToSelect(e).forEach(e=>{this.groupSelectsDescendants&&e.group||(e.isSelected()?t++:e.selectable&&n++)}),{selectedCount:t,notSelectedCount:n}}getSelectAllState(e){let{selectedCount:t,notSelectedCount:n}=this.getSelectedCounts(e);return FC(t,n)??null}hasNodesToSelect(e){return this.getNodesToSelect(e).filter(e=>e.selectable).length>0}getNodesToSelect(e){if(!this.canSelectAll())return[];let t=[],n=e=>t.push(e);if(e===`currentPage`)return this.forEachNodeOnPage(e=>{if(!e.group){n(e);return}if(!e.expanded&&!e.footer){let t=e=>{n(e),e.childrenAfterFilter?.forEach(t)};t(e);return}this.groupSelectsDescendants||n(e)}),t;let r=this.beans.rowModel;return e===`filtered`?(r.forEachNodeAfterFilter(n),t):(r.forEachNode(n),t)}forEachNodeOnPage(e){let{pageBounds:t,rowModel:n}=this.beans,r=t.getFirstRow(),i=t.getLastRow();for(let t=r;t<=i;t++){let r=n.getRow(t);r&&e(r)}}selectAllRowNodes(e){let{gos:t,selectionCtx:n}=this;if(!Fn(t)){M(132);return}if(ar(t)&&!pr(t)){M(130);return}if(!this.canSelectAll())return;let{source:r,selectAll:i}=e,a=!1;if(this.getNodesToSelect(i).forEach(e=>{let t=this.selectRowNode(NC(e),!0,void 0,r);a||=t}),n.selectAll=!0,P(t)&&this.groupSelectsDescendants){let e=this.updateGroupsFromChildrenSelections(r);a||=e}a&&this.dispatchSelectionChanged(r)}getSelectionState(){return this.isEmpty()?null:Array.from(this.selectedNodes.keys())}setSelectionState(e,t,n){if(e||=[],!Array.isArray(e)){N(103);return}let r=new Set(e),i=[];this.beans.rowModel.forEachNode(e=>{r.has(e.id)&&i.push(e)}),n&&this.resetNodes(),this.setNodesSelected({newValue:!0,nodes:i,source:t})}canSelectAll(){return P(this.beans.gos)}updateSelectable(e){let{gos:t,rowModel:n}=this.beans;if(!Fn(t))return;let r=`selectableChanged`,i=e!==void 0,a=P(t)&&this.groupSelectsDescendants,o=[],s=e=>{if(!(i&&!e.group)){if(a&&e.group){let t=e.childrenAfterGroup?.some(e=>e.selectable)??!1;this.setRowSelectable(e,t,!0);return}!this.updateRowSelectable(e,!0)&&e.isSelected()&&o.push(e)}};if(a){if(e===void 0){let t=n.rootNode;e=t?new yp(!1,t):void 0}e?.forEachChangedNodeDepthFirst(s,!i,!i)}else n.forEachNode(s);o.length&&this.setNodesSelected({nodes:o,newValue:!1,source:r}),!i&&a&&this.updateGroupsFromChildrenSelections?.(r)}updateSelectableAfterGrouping(e){this.updateSelectable(e),this.groupSelectsDescendants&&this.updateGroupsFromChildrenSelections?.(`rowGroupChanged`,e)&&this.dispatchSelectionChanged(`rowGroupChanged`)}refreshMasterNodeState(e,t){if(!this.masterSelectsDetail)return;let n=e.detailNode?.detailGridInfo?.api;if(!n)return;let r=PC(n);if(e.isSelected()!==r&&this.selectRowNode(e,r,t,`masterDetail`)&&this.dispatchSelectionChanged(`masterDetail`),!r){let t=this.detailSelection.get(e.id)??new Set;for(let e of n.getSelectedNodes())t.add(e.id);this.detailSelection.set(e.id,t)}}setDetailSelectionState(e,t,n){if(this.masterSelectsDetail){if(!pr(t)){M(269);return}switch(e.isSelected()){case!0:n.selectAll();break;case!1:n.deselectAll();break;case void 0:{let t=this.detailSelection.get(e.id);if(t){let e=[];for(let r of t){let t=n.getRowNode(r);t&&e.push(t)}n.setNodesSelected({nodes:e,newValue:!0,source:`masterDetail`})}break}default:break}}}dispatchSelectionChanged(e){this.eventSvc.dispatchEvent({type:`selectionChanged`,source:e,selectedNodes:this.getSelectedNodes(),serverSideState:null})}};function NC(e){return Of(e)?e.pinnedSibling:e.footer?e.sibling:e}function PC(e){let t=0,n=0;return e.forEachNode(e=>{e.isSelected()?t++:e.selectable&&n++}),FC(t,n)}function FC(e,t){if(e===0&&t===0)return!1;if(!(e>0&&t>0))return e>0}function IC(e,t){let n=t.parent;for(;n;){if(n===e)return!0;n=n.parent}return!1}function LC(e){let t=e.isSelected()===!1,n=e.childrenAfterFilter?.some(LC)??!1;return t||n}var RC={moduleName:`RowSelection`,version:j,rowModels:[`clientSide`,`infinite`,`viewport`],beans:[MC],dependsOn:[{moduleName:`SharedRowSelection`,version:j,beans:[xC],css:[SC],apiFunctions:{setNodesSelected:CC,selectAll:wC,deselectAll:TC,selectAllFiltered:EC,deselectAllFiltered:DC,selectAllOnCurrentPage:OC,deselectAllOnCurrentPage:kC,getSelectedNodes:AC,getSelectedRows:jC}}]};function zC(e){e.expansionSvc?.expandAll(!0)}function BC(e){e.expansionSvc?.expandAll(!1)}function VC(e){e.rowModel?.onRowHeightChanged()}function HC(e){if(e.rowAutoHeight?.active){M(3);return}e.rowModel?.resetRowHeights()}function UC(e,t,n){let r=Iy(e);if(r){if(e.rowGroupColsSvc?.columns.length===0){if(t<0){N(238);return}r.setRowCount(t,n);return}N(28);return}Fy(e)?.setRowCount(t,n)}function WC(e){return Pn(e.gos)?e.rowModel.getBlockStates():e.rowNodeBlockLoader?.getBlockState()??{}}function GC(e){return e.rowModel.isLastRowIndexKnown()}var KC={moduleName:`CsrmSsrmSharedApi`,version:j,apiFunctions:{expandAll:zC,collapseAll:BC}},qC={moduleName:`RowModelSharedApi`,version:j,apiFunctions:{onRowHeightChanged:VC,resetRowHeights:HC}},JC={moduleName:`SsrmInfiniteSharedApi`,version:j,apiFunctions:{setRowCount:UC,getCacheBlockState:WC,isLastRowIndexKnown:GC}},YC={moduleName:`AlignedGrids`,version:j,beans:[class extends O{constructor(){super(...arguments),this.beanName=`alignedGridsSvc`,this.consuming=!1}getAlignedGridApis(){let e=this.gos.get(`alignedGrids`)??[],t=typeof e==`function`;return typeof e==`function`&&(e=e()),e.map(e=>{if(!e){N(18),t||N(20);return}if(this.isGridApi(e))return e;let n=e;return`current`in n?n.current?.api:(n.api||N(19),n.api)}).filter(e=>!!e&&!e.isDestroyed())}isGridApi(e){return!!e&&!!e.dispatchEvent}postConstruct(){let e=this.fireColumnEvent.bind(this);this.addManagedEventListeners({columnMoved:e,columnVisible:e,columnPinned:e,columnGroupOpened:e,columnResized:e,bodyScroll:this.fireScrollEvent.bind(this),alignedGridColumn:({event:e})=>this.onColumnEvent(e),alignedGridScroll:({event:e})=>this.onScrollEvent(e)})}fireEvent(e){if(!this.consuming)for(let 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){let n=[];return e.columns?e.columns.forEach(e=>{n.push(t(e))}):e.column&&n.push(t(e.column)),n}getMasterColumns(e){return this.extractDataFromEvent(e,e=>e)}getColumnIds(e){return this.extractDataFromEvent(e,e=>e.getColId())}onColumnEvent(e){this.onEvent(()=>{switch(e.type){case`columnMoved`:case`columnVisible`:case`columnPinned`:case`columnResized`:this.processColumnEvent(e);break;case`columnGroupOpened`:this.processGroupOpenedEvent(e);break;case`columnPivotChanged`:M(21);break}})}processGroupOpenedEvent(e){let{colGroupSvc:t}=this.beans;if(t)for(let n of e.columnGroups){let e=null;n&&(e=t.getProvidedColGroup(n.getGroupId())),!(n&&!e)&&t.setColumnGroupOpened(e,n.isExpanded(),`alignedGridChanged`)}}processColumnEvent(e){let t=e.column,n=null,r=this.beans,{colResize:i,ctrlsSvc:a,colModel:o}=r;if(t&&(n=o.getColDefCol(t.getColId())),t&&!n)return;let s=this.getMasterColumns(e);switch(e.type){case`columnMoved`:Ni(r,{state:e.api.getColumnState().map(e=>({colId:e.colId})),applyOrder:!0},`alignedGridChanged`);break;case`columnVisible`:Ni(r,{state:e.api.getColumnState().map(e=>({colId:e.colId,hide:e.hide}))},`alignedGridChanged`);break;case`columnPinned`:Ni(r,{state:e.api.getColumnState().map(e=>({colId:e.colId,pinned:e.pinned}))},`alignedGridChanged`);break;case`columnResized`:{let t=e,n={};for(let e of s)n[e.getId()]={key:e.getColId(),newWidth:e.getActualWidth()};for(let e of t.flexColumns??[])n[e.getId()]&&delete n[e.getId()];i?.setColumnWidths(Object.values(n),!1,t.finished,`alignedGridChanged`);break}}let c=a.getGridBodyCtrl().isVerticalScrollShowing();for(let e of this.getAlignedGridApis())e.setGridOption(`alwaysShowVerticalScroll`,c)}}],dependsOn:[bh]},XC=class extends O{constructor(e){super(),this.rootNode=e,this.nextId=0,this.allNodesMap={},QC(e)}getRowNode(e){return this.allNodesMap[e]}setNewRowData(e){this.dispatchRowDataUpdateStarted(e),this.destroyAllNodes();let t=QC(this.rootNode),n=Array(e.length);t._leafs=n;let r=0,i=this.beans.groupStage?.getNestedDataGetter(),a=i?new Set:null,o=(e,t)=>{let s=e.level+1;for(let c=0,l=t.length;c<l;++c){let l=t[c];if(!l)continue;let u=this.createRowNode(l,s);if(u.sourceRowIndex=r,n[r++]=u,a&&!a.has(l)){a.add(l),u.treeParent=e;let t=i(l);t&&o(u,t)}}};o(t,e),n.length=r}destroyAllNodes(){let{selectionSvc:e,pinnedRowModel:t,groupStage:n}=this.beans;e?.reset(`rowDataChanged`),t?.isManual()&&t.reset(),n?.clearNonLeafs();let r=this.rootNode._leafs;if(r)for(let e=0,t=r.length;e<t;++e)r[e]._destroy(!1);this.allNodesMap=Object.create(null),this.nextId=0}setImmutableRowData(e,t){let{rootNode:n,gos:r}=this;this.dispatchRowDataUpdateStarted(t);let i=Qn(r),a=e.changedRowNodes,{adds:o,updates:s}=a,c=new Set,l=[],u=this.beans.groupStage?.getNestedDataGetter(),d=r.get(`suppressMaintainUnsortedOrder`)?void 0:!1,f=-1,p=!1,m=(e,t)=>{if(!d&&d!==void 0){let t=e.sourceRowIndex;d=t<=f,f=t}e.data!==t&&(e.updateData(t),o.has(e)||s.add(e),!e.selectable&&e.isSelected()&&l.push(e))},h=(e,t,n)=>{for(let r=0,a=t.length;r<a;++r){let a=t[r];if(!a)continue;let s=this.getRowNode(i({data:a,level:n}));if(s?(m(s,a),p||=!!u&&s.treeParent!==e):(s=this.createRowNode(a,n),o.add(s)),!u||c.has(s)){c.add(s);continue}c.add(s),s.treeParent=e;let l=u(a);l&&h(s,l,n+1)}};h(n,t,0);let g=this.deleteUnusedNodes(c,a,l,!!e.animate)||d||o.size>0;if(g){let e=n._leafs??=[];d===void 0?nw(e,c,a):tw(e,c)&&(a.reordered=!0)}(g||p||s.size)&&(e.rowDataUpdated=!0,this.deselect(l))}deleteUnusedNodes(e,{removals:t},n,r){let i=this.rootNode._leafs;for(let a=0,o=i.length;a<o;a++){let o=i[a];e.has(o)||this.destroyNode(o,r)&&(t.push(o),o.isSelected()&&n.push(o))}return t.length>0}updateRowData(e,t,n){if(this.dispatchRowDataUpdateStarted(e.add),this.beans.groupStage?.getNestedDataGetter())return M(268),{remove:[],update:[],add:[]};let r=[],i=Qn(this.gos),a=this.executeRemove(i,e,t,r,n),o=this.executeUpdate(i,e,t,r),s=this.executeAdd(e,t);return this.deselect(r),{remove:a,update:o,add:s}}executeRemove(e,{remove:t},{adds:n,updates:r,removals:i},a,o){let s=this.rootNode._leafs,c=s?.length,l=t?.length;if(!l||!c)return[];let u=0,d=c,f=0,p=Array(l);for(let s=0;s<l;++s){let c=this.lookupNode(e,t[s]);if(!c)continue;let l=c.sourceRowIndex;l<d&&(d=l),l>f&&(f=l),p[u++]=c,this.destroyNode(c,o)&&(c.isSelected()&&a.push(c),n.delete(c)||(r.delete(c),i.push(c)))}return p.length=u,u&&ew(s,d,f),p}executeUpdate(e,{update:t},{adds:n,updates:r},i){let a=t?.length;if(!a)return[];let o=Array(a),s=0;for(let c=0;c<a;c++){let a=t[c],l=this.lookupNode(e,a);l&&(l.updateData(a),!l.selectable&&l.isSelected()&&i.push(l),o[s++]=l,n.has(l)||r.add(l))}return o.length=s,o}executeAdd(e,t){var n;let r=(n=this.rootNode)._leafs??(n._leafs=[]),i=r.length,a=e.add,o=a?.length;if(!o)return[];let s=i+o,c=this.sanitizeAddIndex(r,e.addIndex);if(c<i){for(let e=i-1,t=s-1;e>=c;--e){let n=r[e];n.sourceRowIndex=t,r[t--]=n}t.reordered=!0}r.length=s;let l=Array(o),u=t.adds;for(let e=0;e<o;e++){let t=this.createRowNode(a[e],0);u.add(t),t.sourceRowIndex=c,r[c]=t,l[e]=t,c++}return l}dispatchRowDataUpdateStarted(e){this.eventSvc.dispatchEvent({type:`rowDataUpdateStarted`,firstRowData:e?.length?e[0]:null})}deselect(e){let 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){let n=new el(this.beans);n.parent=this.rootNode,n.level=t,n.group=!1,n.expanded=!1,n.setDataAndId(e,String(this.nextId++));let r=n.id,i=this.allNodesMap;return i[r]&&M(2,{nodeId:r}),i[r]=n,n}destroyNode(e,t){if(!e._destroy(t))return!1;let n=e.id,r=this.allNodesMap;r[n]===e&&delete r[n];let i=e.pinnedSibling;return i&&this.beans.pinnedRowModel?.pinRow(i,null),!0}lookupNode(e,t){if(!e)return $C(this.rootNode._leafs,t);let n=e({data:t,level:0});return this.allNodesMap[n]||(N(4,{id:n}),null)}sanitizeAddIndex(e,t){let n=e.length;if(typeof t!=`number`||t<0||t>=n||Number.isNaN(t))return n;t=Math.ceil(t);let r=this.gos;return t>0&&r.get(`treeData`)&&r.get(`getDataPath`)&&(t=ZC(e,t)),t}},ZC=(e,t)=>{for(let n=0,r=e.length;n<r;n++)if(e[n]?.rowIndex==t-1)return n+1;return t},QC=e=>{e.group=!0,e.level=-1,e.id=`ROOT_NODE_ID`,e._leafs?.length!==0&&(e._leafs=[]);let t=[],n=[],r=[],i=[];e.childrenAfterGroup=t,e.childrenAfterSort=n,e.childrenAfterAggFilter=r,e.childrenAfterFilter=i;let a=e.sibling;return a&&(a.childrenAfterGroup=t,a.childrenAfterSort=n,a.childrenAfterAggFilter=r,a.childrenAfterFilter=i,a.childrenMapped=e.childrenMapped),e.updateHasChildren(),e},$C=(e,t)=>{if(e)for(let n=0,r=e.length;n<r;n++){let r=e[n];if(r.data===t)return r}return N(5,{data:t}),null},ew=(e,t,n)=>{t=Math.max(0,t);for(let r=t,i=e.length;r<i;++r){let i=e[r];r<=n&&i.destroyed||(i.sourceRowIndex=t,e[t++]=i)}e.length=t},tw=(e,t)=>{e.length=t.size;let n=0,r=!1,i=!1;for(let a of t){let t=a.sourceRowIndex;t===n?i||=r:(t>=0?i=!0:r=!0,a.sourceRowIndex=n,e[n]=a),++n}return i},nw=(e,t,{adds:n})=>{let r=e.length,i=t.size;i>r&&(e.length=i);let a=0;for(let t=0;t<r;++t){let n=e[t];n.destroyed||(a!==t&&(n.sourceRowIndex=a,e[a]=n),++a)}for(let t of n)t.sourceRowIndex<0&&(t.sourceRowIndex=a,e[a++]=t);e.length=a},rw=4,iw=(e,t,n,r,i)=>{let a=t.childrenAfterSort,o=t.childrenAfterAggFilter;if(!o)return a&&a.length>0?a:[];let s=o.length;if(s<=1)return a?.length===s&&(s===0||a[0]===o[0])?a:o.slice();if(!a||s<=rw)return e.doFullSortInPlace(o.slice(),i);let c=new Map,{updates:l,adds:u}=n,d=[];for(let e=0;e<s;++e){let t=o[e];l.has(t)||u.has(t)||!r.canSkip(t)?(c.set(t,~e),d.push(t)):c.set(t,e)}let f=d.length;return f===0?s===a.length?a:ow(a,c,d):(d.sort((t,n)=>e.compareRowNodes(i,t,n)||~c.get(t)-~c.get(n)),f===s?d:aw(e,i,d,a,c,s))},aw=(e,t,n,r,i,a)=>{let o=Array(a),s=0,c=n[s],l,u=-1,d=0,f=0,p=n.length,m=r.length;for(;;){if(u<0){if(d>=m)break;if(l=r[d++],u=i.get(l)??-1,u<0)continue}if((e.compareRowNodes(t,c,l)||~i.get(c)-u)<0){if(o[f++]=c,++s>=p)break;c=n[s]}else o[f++]=l,u=-1}for(;s<p;)o[f++]=n[s++];if(u<0)return o;for(o[f++]=l;d<m;){let e=r[d++];i.get(e)>=0&&(o[f++]=e)}return o},ow=(e,t,n)=>{let r=0;n.length=t.size;for(let i=0,a=e.length;i<a;++i){let a=e[i];t.has(a)&&(n[r++]=a)}return n.length=r,n},sw=e=>{let t=e.childrenAfterSort,n=e.sibling;if(n&&(n.childrenAfterSort=t),t)for(let e=0,n=t.length-1;e<=n;e++){let r=t[e],i=e===0,a=e===n;r.firstChild!==i&&(r.firstChild=i,r.dispatchRowEvent(`firstChildChanged`)),r.lastChild!==a&&(r.lastChild=a,r.dispatchRowEvent(`lastChildChanged`)),r.childIndex!==e&&(r.childIndex=e,r.dispatchRowEvent(`childIndexChanged`))}},cw=class extends O{constructor(){super(...arguments),this.beanName=`sortStage`,this.step=`sort`,this.refreshProps=[`postSortRows`,`groupDisplayType`,`accentedSort`]}execute(e,t){let n=this.beans.sortSvc.getSortOptions(),r=n.length>0&&!!t&&this.gos.get(`deltaSort`),{gos:i,colModel:a,rowGroupColsSvc:o,rowNodeSorter:s,rowRenderer:c,showRowGroupCols:l}=this.beans,u=i.get(`groupMaintainOrder`),d=a.getCols().some(e=>e.isRowGroupActive()),f=o?.columns,p=a.isPivotMode(),m=i.getCallback(`postSortRows`),h=!1,g;if(e?.forEachChangedNodeDepthFirst(i=>{let a=p&&i.leafGroup,o=u&&d&&!i.leafGroup;o&&(g??=this.shouldSortContainsGroupCols(n),o&&=!g);let c=null;if(o){let e=!1;if(f){let t=i.level+1;t<f.length&&(e=f[t].wasSortExplicitlyRemoved)}e||(c=lw(i))}else !n.length||a||(c=r&&t?iw(s,i,t,e,n):s.doFullSortInPlace(i.childrenAfterAggFilter.slice(),n));c||=i.childrenAfterAggFilter?.slice()??[],h||=i.childrenAfterSort?.[0]!==c[0],i.childrenAfterSort=c,sw(i),m&&m({nodes:i.childrenAfterSort})}),h&&i.get(`groupHideOpenParents`)){let e=l?.columns;e?.length&&c.refreshCells({columns:e,force:!0})}}shouldSortContainsGroupCols(e){let t=e.length;if(!t)return!1;if(qn(this.gos)){for(let n=0;n<t;++n){let t=e[n].column;if(t.isPrimary()&&t.isRowGroupActive())return!0}return!1}for(let n=0;n<t;++n)if(e[n].column.getColDef().showRowGroup)return!0;return!1}},lw=e=>{let t=e.childrenAfterSort,n=e.childrenAfterAggFilter,r=t?.length,i=n?.length;if(!r||!i)return null;let a=Array(i),o=new Set;for(let e=0;e<i;++e)o.add(n[e]);let s=0;for(let e=0;e<r;++e){let n=t[e];o.delete(n)&&(a[s++]=n)}if(o.size===0&&s===r)return t;for(let e of o)a[s++]=e;return a.length=s,a},uw=class extends O{constructor(){super(...arguments),this.beanName=`rowModel`,this.rootNode=null,this.rowCountReady=!1,this.nodeManager=void 0,this.rowsToDisplay=[],this.formulaRows=[],this.rowDataUpdatedPending=!1,this.asyncTransactions=null,this.asyncTransactionsTimer=0,this.started=!1,this.refreshingModel=!1,this.rowNodesCountReady=!1,this.stages=null,this.stagesRefreshProps=new Map,this.onRowHeightChanged_debounced=k(this,this.onRowHeightChanged.bind(this),100)}postConstruct(){let e=this.beans,t=new el(e);this.rootNode=t,this.nodeManager=this.createBean(new XC(t));let 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(){let{beans:e,stagesRefreshProps:t}=this,n=[e.groupStage,e.filterStage,e.pivotStage,e.aggStage,e.sortStage,e.filterAggStage,e.flattenStage].filter(e=>!!e);this.stages=n;for(let e=n.length-1;e>=0;--e){let r=n[e];for(let n of r.refreshProps)t.set(n,e)}this.addManagedPropertyListeners([...t.keys(),`rowData`],e=>{let t=e.changeSet?.properties;t&&this.onPropChange(t)}),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,r){let i,a=!1;do{i=!1;let o=this.getRowIndexAtPixel(e),s=this.getRowIndexAtPixel(t),c=Math.max(o,n),l=Math.min(s,r);for(let e=c;e<=l;e++){let t=this.getRow(e);if(t.rowHeightEstimated){let e=zn(this.beans,t);t.setRowHeight(e.height),i=!0,a=!0}}i&&this.setRowTopAndRowIndex()}while(i);return a}onPropChange(e){let{nodeManager:t,gos:n,beans:r}=this,i=r.groupStage;if(!t)return;let a=new Set(e),o=i?.onPropChange(a),s;a.has(`rowData`)?s=n.get(`rowData`):o&&(s=i?.extractData()),s&&!Array.isArray(s)&&(s=null,M(1));let c={step:`nothing`,changedProps:a};s&&(!o&&!this.isEmpty()&&s.length>0&&n.exists(`getRowId`)&&!n.get(`resetRowDataOnUpdate`)?(c.keepRenderedRows=!0,c.animate=!n.get(`suppressAnimationFrame`),c.changedRowNodes=new Df,t.setImmutableRowData(c,s)):(c.rowDataUpdated=!0,c.newData=!0,t.setNewRowData(s),this.rowNodesCountReady=!0));let l=c.rowDataUpdated?`group`:this.getRefreshedStage(e);l&&(c.step=l,this.refreshModel(c))}getRefreshedStage(e){let{stages:t,stagesRefreshProps:n}=this;if(!t)return null;let r=t.length,i=r;for(let t=0,r=e.length;t<r&&i;++t)i=Math.min(i,n.get(e[t])??i);return i<r?t[i].step:null}setRowTopAndRowIndex(e){let{beans:t,rowsToDisplay:n}=this,r=t.environment.getDefaultRowHeight(),i=0,a=F(this.gos,`normal`);for(let o=0,s=n.length;o<s;++o){let s=n[o],c=s.id;if(c!=null&&e?.add(c),s.rowHeight==null){let e=zn(t,s,a,r);s.setRowHeight(e.height,e.estimated)}s.setRowTop(i),s.setRowIndex(o),i+=s.rowHeight}if(this.beans.formula?.active){let e=this.formulaRows;for(let t=0,n=e.length;t<n;++t){let n=e[t];n.formulaRowIndex=t}}}clearRowTopAndRowIndex(e,t){let n=e.active,r=e=>{e?.id!=null&&!t.has(e.id)&&e.clearRowTopAndRowIndex()},i=e=>{r(e),r(e.detailNode),r(e.sibling);let t=e.childrenAfterGroup;if(!e.hasChildren()||!t)return;let a=e.level==-1;if(!(n&&!a&&!e.expanded))for(let e=0,n=t.length;e<n;++e)i(t[e])},a=this.rootNode;a&&i(a)}isLastRowIndexKnown(){return!0}getRowCount(){return this.rowsToDisplay.length}getTopLevelRowCount(){let{rootNode:e,rowsToDisplay:t}=this;if(!e||!t.length)return 0;if(t[0]===e)return 1;let n=e.sibling?.displayed?1:0;return(e.childrenAfterSort?.length??0)+n}getTopLevelRowDisplayedIndex(e){let{beans:t,rootNode:n,rowsToDisplay:r}=this;if(!n||!r.length||r[0]===n)return e;let i=n.childrenAfterSort,a=e=>{let t=i[e];if(this.gos.get(`groupHideOpenParents`))for(;t.expanded&&t.childrenAfterSort&&t.childrenAfterSort.length>0;)t=t.childrenAfterSort[0];return t.rowIndex},o=t.footerSvc;return o?o?.getTopDisplayIndex(r,e,i,a):a(e)}getTopLevelIndexFromDisplayedIndex(e){let{rootNode:t,rowsToDisplay:n}=this;if(!t||!n.length||n[0]===t)return e;let r=this.getRow(e);r.footer&&(r=r.sibling);let i=r.parent;for(;i&&i!==t;)r=i,i=r.parent;let a=t.childrenAfterSort?.indexOf(r)??-1;return a>=0?a:e}getRowBounds(e){let t=this.rowsToDisplay[e];return t?{rowTop:t.rowTop,rowHeight:t.rowHeight}:null}onRowGroupOpened(){this.refreshModel({step:`map`,keepRenderedRows:!0,animate:Gn(this.gos)})}onFilterChanged({afterDataChange:e,columns:t}){if(!e){let e=t.length===0||t.some(e=>e.isPrimary())?`filter`:`filter_aggregates`;this.refreshModel({step:e,keepRenderedRows:!0,animate:Gn(this.gos)})}}onSortChanged(){this.refreshModel({step:`sort`,keepRenderedRows:!0,animate:Gn(this.gos)})}getType(){return`clientSide`}onValueChanged(){this.refreshModel({step:this.beans.colModel.isPivotActive()?`pivot`:`aggregate`})}createChangePath(e){let t=new yp(!1,this.rootNode);return t.active=e,t}isSuppressModelUpdateAfterUpdateTransaction(e){if(!this.gos.get(`suppressModelUpdateAfterUpdateTransaction`))return!1;let{changedRowNodes:t,newData:n,rowDataUpdated:r}=e;return!(!t||n||!r||t.removals.length||t.adds.size)}refreshModel(e){let{nodeManager:t,beans:n,eventSvc:r,started:i,refreshingModel:a}=this;if(!t)return;let o=!!e.rowDataUpdated,s=e.changedPath??=this.createChangePath(!e.newData&&o);if(i&&o&&r.dispatchEvent({type:`rowDataUpdated`}),!i||a||n.colModel.changeEventsDispatching||this.isSuppressModelUpdateAfterUpdateTransaction(e)){this.rowDataUpdatedPending||=o;return}switch(this.rowDataUpdatedPending&&(this.rowDataUpdatedPending=!1,e.step=`group`),this.refreshingModel=!0,n.masterDetailSvc?.refreshModel(e),o&&e.step!==`group`&&n.colFilter?.refreshModel(),e.step){case`group`:this.doGrouping(e);case`filter`:this.doFilter(s);case`pivot`:this.doPivot(s);case`aggregate`:this.doAggregate(s);case`filter_aggregates`:this.doFilterAggregates(s);case`sort`:this.doSort(s,e.changedRowNodes);case`map`:this.doRowsToDisplay()}let c=new Set;this.setRowTopAndRowIndex(c),this.clearRowTopAndRowIndex(s,c),this.refreshingModel=!1,r.dispatchEvent({type:`modelUpdated`,animate:e.animate,keepRenderedRows:e.keepRenderedRows,newData:e.newData,newPage:!1,keepUndoRedoStack:e.keepUndoRedoStack})}isEmpty(){return!this.rootNode?._leafs?.length||!this.beans.colModel?.ready}isRowsToRender(){return this.rowsToDisplay.length>0}getOverlayType(){return this.isEmpty()?`noRows`:this.beans.filterManager?.isAnyFilterPresent()&&this.getRowCount()===0?`noMatchingRows`:null}getNodesInRangeForSelection(e,t){let n=!1,r=!1,i=[],a=vr(this.gos);return this.forEachNodeAfterFilterAndSort(o=>{if(!r){if(n&&(o===t||o===e)&&(r=!0,a&&o.group)){dw(i,o);return}if(!n){if(o!==t&&o!==e)return;n=!0,t===e&&(r=!0)}(!o.group||!a)&&i.push(o)}}),i}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){let t=this.rowsToDisplay,n=t.length;if(this.isEmpty()||n===0)return-1;let r=0,i=n-1;if(e<=0)return 0;if(t[i].rowTop<=e)return i;let a=-1,o=-1;for(;;){let n=Math.floor((r+i)/2),s=t[n];if(this.isRowInPixel(s,e)||(s.rowTop<e?r=n+1:s.rowTop>e&&(i=n-1),a===r&&o===i))return n;a=r,o=i}}isRowInPixel(e,t){let n=e.rowTop,r=n+e.rowHeight;return n<=t&&r>t}forEachLeafNode(e){let t=this.rootNode?._leafs;if(t)for(let n=0,r=t.length;n<r;++n)e(t[n],n)}forEachNode(e,t=!1){this.depthFirstSearchRowNodes(e,t)}forEachDisplayedNode(e){let t=this.rowsToDisplay;for(let n=0,r=t.length;n<r;++n)e(t[n],n)}forEachNodeAfterFilter(e,t=!1){this.depthFirstSearchRowNodes(e,t,e=>e.childrenAfterAggFilter)}forEachNodeAfterFilterAndSort(e,t=!1){this.depthFirstSearchRowNodes(e,t,e=>e.childrenAfterSort)}forEachPivotNode(e,t,n){let{colModel:r,rowGroupColsSvc:i}=this.beans;if(!r.isPivotMode())return;if(!i?.columns.length){e(this.rootNode,0);return}let a=n?`childrenAfterSort`:`childrenAfterGroup`;this.depthFirstSearchRowNodes(e,t,e=>e.leafGroup?null:e[a])}depthFirstSearchRowNodes(e,t=!1,n=e=>e.childrenAfterGroup,r=this.rootNode,i=0){let a=i;if(!r)return a;let o=r===this.rootNode;if(o||e(r,a++),r.hasChildren()&&!r.footer){let i=n(r);if(i){let s=this.beans.footerSvc;a=s?.addTotalRows(a,r,e,t,o,`top`)??a;for(let r of i)a=this.depthFirstSearchRowNodes(e,t,n,r,a);return s?.addTotalRows(a,r,e,t,o,`bottom`)??a}}return a}doAggregate(e){this.rootNode&&this.beans.aggStage?.execute(e)}doFilterAggregates(e){let t=this.rootNode,n=this.beans.filterAggStage;if(n){n.execute(e);return}t.childrenAfterAggFilter=t.childrenAfterFilter}doSort(e,t){let n=this.beans.sortStage;if(n){n.execute(e,t);return}e.forEachChangedNodeDepthFirst(e=>{e.childrenAfterSort=e.childrenAfterAggFilter.slice(0),sw(e)})}doGrouping(e){let t=this.rootNode;if(!t)return;let n=this.beans.groupStage?.execute(e);if(n===void 0){let e=t._leafs;t.childrenAfterGroup=e,t.updateHasChildren();let n=t.sibling;n&&(n.childrenAfterGroup=e)}(n||e.rowDataUpdated)&&this.beans.colFilter?.refreshModel(),!this.rowCountReady&&this.rowNodesCountReady&&(this.rowCountReady=!0,this.eventSvc.dispatchEventOnce({type:`rowCountReady`}))}doFilter(e){let t=this.beans.filterStage;if(t){t.execute(e);return}e.forEachChangedNodeDepthFirst(e=>{e.childrenAfterFilter=e.childrenAfterGroup,ob(e)},!0)}doPivot(e){this.beans.pivotStage?.execute(e)}getRowNode(e){let t=this.nodeManager?.getRowNode(e);return typeof t==`object`?t:this.beans.groupStage?.getNonLeaf(e)}batchUpdateRowData(e,t){if(!this.asyncTransactionsTimer){this.asyncTransactions=[];let e=this.gos.get(`asyncTransactionWaitMillis`);this.asyncTransactionsTimer=setTimeout(()=>this.executeBatchUpdateRowData(),e)}this.asyncTransactions.push({rowDataTransaction:e,callback:t})}flushAsyncTransactions(){let e=this.asyncTransactionsTimer;e&&(clearTimeout(e),this.executeBatchUpdateRowData())}executeBatchUpdateRowData(){let{nodeManager:e,beans:t,eventSvc:n,asyncTransactions:r}=this;if(!e)return;t.valueCache?.onDataChanged();let i=[],a=[],o=new Df,s=!this.gos.get(`suppressAnimationFrame`);for(let{rowDataTransaction:t,callback:n}of r??[]){this.rowNodesCountReady=!0;let r=e.updateRowData(t,o,s);i.push(r),n&&a.push(n.bind(null,r))}this.commitTransactions(o,s),a.length>0&&setTimeout(()=>{for(let e=0,t=a.length;e<t;e++)a[e]()},0),i.length>0&&n.dispatchEvent({type:`asyncTransactionsFlushed`,results:i}),this.asyncTransactionsTimer=0,this.asyncTransactions=null}updateRowData(e){let t=this.nodeManager;if(!t)return null;this.beans.valueCache?.onDataChanged(),this.rowNodesCountReady=!0;let n=new Df,r=!this.gos.get(`suppressAnimationFrame`),i=t.updateRowData(e,n,r);return this.commitTransactions(n,r),i}commitTransactions(e,t){this.refreshModel({step:`group`,rowDataUpdated:!0,keepRenderedRows:!0,animate:t,changedRowNodes:e,changedPath:this.createChangePath(!0)})}doRowsToDisplay(){let{rootNode:e,beans:t}=this;if(t.formula?.active){let t=e?.childrenAfterSort??[];this.formulaRows=t,this.rowsToDisplay=t.filter(e=>!e.softFiltered);for(let e of this.rowsToDisplay)e.setUiLevel(0);return}let n=t.flattenStage;if(n){this.rowsToDisplay=n.execute();return}let r=this.rootNode.childrenAfterSort??[];for(let e of r)e.setUiLevel(0);this.rowsToDisplay=r}onRowHeightChanged(){this.refreshModel({step:`map`,keepRenderedRows:!0,keepUndoRedoStack:!0})}resetRowHeights(){let e=this.rootNode;if(!e)return;let t=this.resetRowHeightsForAllRowNodes();e.setRowHeight(e.rowHeight,!0);let n=e.sibling;n?.setRowHeight(n.rowHeight,!0),t&&this.onRowHeightChanged()}resetRowHeightsForAllRowNodes(){let e=!1;return this.forEachNode(t=>{t.setRowHeight(t.rowHeight,!0);let n=t.detailNode;n?.setRowHeight(n.rowHeight,!0);let r=t.sibling;r?.setRowHeight(r.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()}},dw=(e,t)=>{let n=t.childrenAfterGroup;if(n)for(let t=0,r=n.length;t<r;++t){let r=n[t];r.data&&e.push(r),r.group&&dw(e,r)}};function fw(e){e.expansionSvc?.onGroupExpandedOrCollapsed()}function pw(e,t){let n=Py(e);n&&((!t||t===`everything`)&&(t=`group`),n.refreshModel({step:t,keepRenderedRows:!0,animate:!e.gos.get(`suppressAnimationFrame`)}))}function mw(e){return Py(e)?.isEmpty()??!0}function hw(e,t){Py(e)?.forEachLeafNode(t)}function gw(e,t){Py(e)?.forEachNodeAfterFilter(t)}function _w(e,t){Py(e)?.forEachNodeAfterFilterAndSort(t)}function vw(e,t){return e.frameworkOverrides.wrapIncoming(()=>Py(e)?.updateRowData(t))}function yw(e,t,n){e.frameworkOverrides.wrapIncoming(()=>Py(e)?.batchUpdateRowData(t,n))}function bw(e){e.frameworkOverrides.wrapIncoming(()=>Py(e)?.flushAsyncTransactions())}function xw(e){return e.selectionSvc?.getBestCostNodeSelection()}var Sw={moduleName:`ClientSideRowModel`,version:j,rowModels:[`clientSide`],beans:[uw,cw],dependsOn:[ty]},Cw={moduleName:`ClientSideRowModelApi`,version:j,apiFunctions:{onGroupExpandedOrCollapsed:fw,refreshClientSideRowModel:pw,isRowDataEmpty:mw,forEachLeafNode:hw,forEachNodeAfterFilter:gw,forEachNodeAfterFilterAndSort:_w,applyTransaction:vw,applyTransactionAsync:yw,flushAsyncTransactions:bw,getBestCostNodeSelection:xw,resetRowHeights:HC,onRowHeightChanged:VC},dependsOn:[KC,qC]},ww={moduleName:`SharedExport`,version:j,beans:[class extends O{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={}){let{allColumns:n,columnKeys:r,skipRowGroups:i,exportRowNumbers:a}=t,o=this.getColumnsToExport({allColumns:n,skipRowGroups:i,columnKeys:r,exportRowNumbers:a});return[this.prepareSession(o),this.prependContent(t),this.exportColumnGroups(t,o),this.exportHeaders(t,o),this.processPinnedTopRows(t,o),this.processRows(t,o),this.processPinnedBottomRows(t,o),this.appendContent(t)].reduce((e,t)=>t(e),e).parse()}processRow(e,t,n,r){let i=t.shouldRowBeSkipped||(()=>!1),a=t.rowPositions!=null||!!t.onlySelected,o=this.gos.get(`groupHideOpenParents`)&&!a,s=this.colModel.isPivotMode()?r.leafGroup:!r.group,c=!!r.footer,l=r.allChildrenCount===1&&r.childrenAfterGroup?.length===1&&$n(this.gos,r);if(!s&&!c&&(t.skipRowGroups||l||o)||t.onlySelected&&!r.isSelected()||t.skipPinnedTop&&r.rowPinned===`top`||t.skipPinnedBottom&&r.rowPinned===`bottom`||r.stub||r.level===-1&&!s&&!c||i(L(this.gos,{node:r})))return;let u=e.onNewBodyRow(r);if(n.forEach((e,t)=>{u.onColumn(e,t,r)}),t.getCustomContentBelowRow){let n=t.getCustomContentBelowRow(L(this.gos,{node:r}));n&&e.addCustomContent(n)}}appendContent(e){return t=>{let n=e.appendContent;return n&&t.addCustomContent(n),t}}prependContent(e){return t=>{let 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){let r=new Ui,{colGroupSvc:i}=this.beans,a=i?i.createColumnGroups({columns:t,idCreator:r,pinned:null,isStandaloneStructure:!0}):t;this.recursivelyAddHeaderGroups(a,n,e.processGroupHeaderCallback)}return n}}exportHeaders(e,t){return n=>{if(!e.skipColumnHeaders){let e=n.onNewHeaderRow();t.forEach((t,n)=>{e.onColumn(t,n,void 0)})}return n}}processPinnedTopRows(e,t){return n=>{let r=this.processRow.bind(this,n,e,t);return e.rowPositions?e.rowPositions.filter(e=>e.rowPinned===`top`).sort((e,t)=>e.rowIndex-t.rowIndex).map(e=>this.pinnedRowModel?.getPinnedTopRow(e.rowIndex)).forEach(r):this.pinnedRowModel?.isManual()||this.pinnedRowModel?.forEachPinnedRow(`top`,r),n}}processRows(e,t){return n=>{let r=this.rowModel,i=P(this.gos,r),a=Pn(this.gos,r),o=!i&&e.onlySelected,s=this.processRow.bind(this,n,e,t),{exportedRows:c=`filteredAndSorted`}=e;if(e.rowPositions)e.rowPositions.filter(e=>e.rowPinned==null).sort((e,t)=>e.rowIndex-t.rowIndex).map(e=>r.getRow(e.rowIndex)).forEach(s);else if(this.colModel.isPivotMode())i?r.forEachPivotNode(s,!0,c===`filteredAndSorted`):a?r.forEachNodeAfterFilterAndSort(s,!0):r.forEachNode(s);else if(e.onlySelectedAllPages||o){let e=this.beans.selectionSvc?.getSelectedNodes()??[];this.replicateSortedOrder(e),e.forEach(s)}else c===`all`?r.forEachNode(s):i||a?r.forEachNodeAfterFilterAndSort(s,!0):r.forEachNode(s);return n}}replicateSortedOrder(e){let{sortSvc:t,rowNodeSorter:n}=this.beans;if(!t||!n)return;let r=t.getSortOptions(),i=(e,t)=>e.rowIndex!=null&&t.rowIndex!=null?e.rowIndex-t.rowIndex:e.level===t.level?e.parent?.id===t.parent?.id?n.compareRowNodes(r,e,t)||(e.rowIndex??-1)-(t.rowIndex??-1):i(e.parent,t.parent):e.level>t.level?i(e.parent,t):i(e,t.parent);e.sort(i)}processPinnedBottomRows(e,t){return n=>{let r=this.processRow.bind(this,n,e,t);return e.rowPositions?e.rowPositions.filter(e=>e.rowPinned===`bottom`).sort((e,t)=>e.rowIndex-t.rowIndex).map(e=>this.pinnedRowModel?.getPinnedBottomRow(e.rowIndex)).forEach(r):this.pinnedRowModel?.isManual()||this.pinnedRowModel?.forEachPinnedRow(`bottom`,r),n}}getColumnsToExport(e){let{allColumns:t=!1,skipRowGroups:n=!1,exportRowNumbers:r=!1,columnKeys:i}=e,{colModel:a,gos:o,visibleCols:s}=this,c=a.isPivotMode(),l=e=>ni(e)?!1:!ri(e)||r;if(i?.length)return a.getColsForKeys(i).filter(l);let u=o.get(`treeData`),d=[];return d=t&&!c?a.getCols():s.allCols,d=d.filter(e=>l(e)&&(n&&!u?!ti(e):!0)),d}recursivelyAddHeaderGroups(e,t,n){let r=[];for(let t of e){let e=t;if(e.getChildren)for(let t of e.getChildren()??[])r.push(t)}e.length>0&&q(e[0])&&this.doAddHeaderHeader(t,e,n),r&&r.length>0&&this.recursivelyAddHeaderGroups(r,t,n)}doAddHeaderHeader(e,t,n){let r=e.onNewHeaderGroupingRow(),i=0;for(let e of t){let t=e,a;a=n?n(L(this.gos,{columnGroup:t})):this.beans.colNames.getDisplayNameForColumnGroup(t,`header`);let o=(t.isExpandable()?t.getLeafColumns():[]).reduce((e,t,n,r)=>{let i=z(e);return t.getColumnGroupShow()===`open`?(!i||i[1]!=null)&&(i=[n],e.push(i)):i&&i[1]==null&&(i[1]=n-1),n===r.length-1&&i&&i[1]==null&&(i[1]=n),e},[]);r.onColumn(t,a||``,i++,t.getLeafColumns().length-1,o)}}}]},Tw=`\r
|
|
63
|
-
`,Ew=class extends Gy{constructor(e){super(e),this.config=e,this.isFirstLine=!0,this.result=``;let{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,Tw),this.result+=e):e.forEach(e=>{this.beginNewLine(),e.forEach((e,t)=>{t!==0&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(e.data.value||``),e.mergeAcross&&this.appendEmptyCells(e.mergeAcross)})}))}onNewHeaderGroupingRow(){return this.beginNewLine(),{onColumn:this.onNewHeaderGroupingRowColumn.bind(this)}}onNewHeaderGroupingRowColumn(e,t,n,r){n!=0&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(t),this.appendEmptyCells(r)}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);let r=this.extractRowCellValue({column:e,node:n,currentColumnIndex:t,accumulatedRowIndex:t,type:`csv`,useRawFormula:!1});this.result+=this.putInQuotes(r.valueFormatted??r.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():(M(53),t=``),`"`+t.replace(/"/g,`""`)+`"`}parse(){return this.result}beginNewLine(){this.isFirstLine||(this.result+=Tw),this.isFirstLine=!1}},Dw=class extends Wy{constructor(){super(...arguments),this.beanName=`csvCreator`}getMergedParams(e){let t=this.gos.get(`defaultCsvExportParams`);return Object.assign({},t,e)}export(e){if(this.isExportSuppressed()){M(51);return}let t=()=>{let t=this.getMergedParams(e),n=this.getData(t),r=new Blob([``,n],{type:`text/plain`}),i=t.fileName,a=typeof i==`function`?i(L(this.gos,{})):i;Ky(this.getFileName(a),r)},{overlays:n}=this.beans;n?n.showExportOverlay(t):t()}exportDataAsCsv(e){this.export(e)}getDataAsCsv(e,t=!1){let n=t?Object.assign({},e):this.getMergedParams(e);return this.getData(n)}getDefaultFileExtension(){return`csv`}createSerializingSession(e){let{colModel:t,colNames:n,rowGroupColsSvc:r,valueSvc:i,gos:a}=this.beans,{processCellCallback:o,processHeaderCallback:s,processGroupHeaderCallback:c,processRowGroupCallback:l,suppressQuotes:u,columnSeparator:d}=e;return new Ew({colModel:t,colNames:n,valueSvc:i,gos:a,processCellCallback:o||void 0,processHeaderCallback:s||void 0,processGroupHeaderCallback:c||void 0,processRowGroupCallback:l||void 0,suppressQuotes:u||!1,columnSeparator:d||`,`,rowGroupColsSvc:r})}isExportSuppressed(){return this.gos.get(`suppressCsvExport`)}};function Ow(e,t){return e.csvCreator?.getDataAsCsv(t)}function kw(e,t){e.csvCreator?.exportDataAsCsv(t)}var Aw={moduleName:`CsvExport`,version:j,beans:[Dw],apiFunctions:{getDataAsCsv:Ow,exportDataAsCsv:kw},dependsOn:[ww]},jw=class extends O{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){let 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=[];let{params:{blockSize:e,rowHeight:t},startRow:n,beans:r,rowNodes:i}=this;for(let a=0;a<e;a++){let e=n+a,o=new el(r);o.setRowHeight(t),o.uiLevel=0,o.setRowIndex(e),o.setRowTop(t*e),i.push(o)}}getBlockStateJson(){let{id:e,startRow:t,endRow:n,state:r}=this;return{id:``+e,state:{blockNumber:e,startRow:t,endRow:n,pageStatus:r}}}setDataAndId(e,t,n){i(t)?e.setDataAndId(t,n.toString()):e.setDataAndId(void 0,void 0)}loadFromDatasource(){let e=this.createLoadParams();if(a(this.params.datasource.getRows)){M(90);return}window.setTimeout(()=>{this.params.datasource.getRows(e)},0)}createLoadParams(){let{startRow:e,endRow:t,version:n,params:{sortModel:r,filterModel:i},gos:a}=this;return L(a,{startRow:e,endRow:t,successCallback:this.pageLoaded.bind(this,n),failCallback:this.pageLoadFailed.bind(this,n),sortModel:r,filterModel:i})}forEachNode(e,t,n){this.rowNodes.forEach((r,i)=>{this.startRow+i<n&&e(r,t.value++)})}getRow(e,t=!1){t||(this.lastAccessed=this.params.lastAccessedSequence.value++);let n=e-this.startRow;return this.rowNodes[n]}processServerResult(e){let{rowNodes:t,beans:n}=this;t.forEach((r,i)=>{let a=e.rowData?e.rowData[i]:void 0;!r.id&&r.alreadyRendered&&a&&(t[i]=new el(n),t[i].setRowIndex(r.rowIndex),t[i].setRowTop(r.rowTop),t[i].setRowHeight(r.rowHeight),r._destroy(!0)),this.setDataAndId(t[i],a,this.startRow+i)});let r=e.rowCount!=null&&e.rowCount>=0?e.rowCount:void 0;this.parentCache.pageLoaded(this,r)}destroy(){let e=this.rowNodes;for(let t=0,n=e.length;t<n;t++)e[t]._destroy(!1);e.length=0,super.destroy()}},Mw=2,Nw=class extends O{constructor(e){super(),this.params=e,this.lastRowIndexKnown=!1,this.blocks={},this.blockCount=0,this.rowCount=e.initialRowCount}getRow(e,t=!1){let n=Math.floor(e/this.params.blockSize),r=this.blocks[n];if(!r){if(t)return;r=this.createBlock(n)}return r.getRow(e)}createBlock(e){let t=this.params,n=this.createBean(new jw(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(let e of this.getBlocksInOrder())e.setStateWaitingToLoad();this.params.rowNodeBlockLoader.checkBlockToLoad()}destroy(){for(let e of this.getBlocksInOrder())this.destroyBlock(e);super.destroy()}getRowCount(){return this.rowCount}isLastRowIndexKnown(){return this.lastRowIndexKnown}pageLoaded(e,t){this.isAlive()&&(Gt(this.gos,`InfiniteCache - onPageLoaded: page = ${e.id}, lastRow = ${t}`),this.checkRowCount(e,t),this.onCacheUpdated())}purgeBlocksIfNeeded(e){let t=this.getBlocksInOrder().filter(t=>t!=e);t.sort((e,t)=>t.lastAccessed-e.lastAccessed);let n=this.params.maxBlocksInCache>0,r=n?this.params.maxBlocksInCache-1:null,i=Mw-1;t.forEach((e,t)=>{if(e.state===`needsLoading`&&t>=i||n&&t>=r){if(this.isBlockCurrentlyDisplayed(e)||this.isBlockFocused(e))return;this.removeBlockFromCache(e)}})}isBlockFocused(e){let t=this.beans.focusSvc.getFocusCellToUseAfterRefresh();if(!t||t.rowPinned!=null)return!1;let{startRow:n,endRow:r}=e;return t.rowIndex>=n&&t.rowIndex<r}isBlockCurrentlyDisplayed(e){let{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){let{blockSize:t,overflowSize:n}=this.params,r=(e.id+1)*t+n;this.rowCount<r&&(this.rowCount=r)}}setRowCount(e,t){this.rowCount=e,i(t)&&(this.lastRowIndexKnown=t),this.lastRowIndexKnown||this.rowCount%this.params.blockSize===0&&this.rowCount++,this.onCacheUpdated()}forEachNodeDeep(e){let t={value:0};for(let n of this.getBlocksInOrder())n.forEachNode(e,t,this.rowCount)}getBlocksInOrder(){return Object.values(this.blocks).sort((e,t)=>e.id-t.id)}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(){let e=[];for(let t of this.getBlocksInOrder())t.id*this.params.blockSize>=this.rowCount&&e.push(t);if(e.length>0)for(let t of e)this.destroyBlock(t)}purgeCache(){for(let e of this.getBlocksInOrder())this.removeBlockFromCache(e);this.lastRowIndexKnown=!1,this.rowCount===0&&(this.rowCount=this.params.initialRowCount),this.onCacheUpdated()}getRowNodesInRange(e,t){let n=[],r=-1,i=!1,a={value:0},o=!1;for(let s of this.getBlocksInOrder())if(!o){if(i&&r+1!==s.id){o=!0;continue}r=s.id,s.forEachNode(r=>{let a=r===e||r===t;(i||a)&&n.push(r),a&&(i=!i)},a,this.rowCount)}return o||i?[]:n}},Pw=class extends O{constructor(){super(...arguments),this.beanName=`rowModel`,this.rootNode=null}getRowBounds(e){return{rowHeight:this.rowHeight,rowTop:this.rowHeight*e}}ensureRowHeightsValid(){return!1}postConstruct(){if(this.gos.get(`rowModelType`)!==`infinite`)return;let e=this.beans,t=new el(e);this.rootNode=t,t.level=-1,this.rowHeight=Vn(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(),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=Vn(this.beans),this.cacheParams.rowHeight=this.rowHeight,this.updateRowHeights()})}onColumnEverything(){let e;e=this.cacheParams?!s(this.cacheParams.sortModel,this.beans.sortSvc?.getSortModel()??[]):!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(){this.datasource&&(Qn(this.gos)??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();let e=this.beans,{filterManager:t,sortSvc:n,rowNodeBlockLoader:r,eventSvc:i,gos:a}=e;this.cacheParams={datasource:this.datasource,filterModel:t?.getFilterModel()??{},sortModel:n?.getSortModel()??[],rowNodeBlockLoader:r,initialRowCount:a.get(`infiniteInitialRowCount`),maxBlocksInCache:a.get(`maxBlocksInCache`),rowHeight:Vn(e),overflowSize:a.get(`cacheOverflowSize`),blockSize:a.get(`cacheBlockSize`),lastAccessedSequence:{value:0}},this.infiniteCache=this.createBean(new Nw(this.cacheParams)),i.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){let 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){let 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 Fw(e){Fy(e)?.refreshCache()}function Iw(e){Fy(e)?.purgeCache()}function Lw(e){return Fy(e)?.getRowCount()}var Rw={moduleName:`InfiniteRowModel`,version:j,apiFunctions:{refreshInfiniteCache:Fw,purgeInfiniteCache:Iw,getInfiniteRowCount:Lw},dependsOn:[{moduleName:`InfiniteRowModelCore`,version:j,rowModels:[`infinite`],beans:[Pw,class extends O{constructor(){super(...arguments),this.beanName=`rowNodeBlockLoader`,this.activeBlockLoadsCount=0,this.blocks=[],this.active=!0}postConstruct(){this.maxConcurrentRequests=er(this.gos);let e=this.gos.get(`blockLoadDebounceMillis`);e&&e>0&&(this.checkBlockToLoadDebounce=k(this,this.performCheckBlocksToLoad.bind(this),e))}addBlock(e){this.blocks.push(e),e.addEventListener(`loadComplete`,this.loadComplete.bind(this)),this.checkBlockToLoad()}removeBlock(e){qr(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){Gt(this.gos,`RowNodeBlockLoader - checkBlockToLoad: max loads exceeded`);return}let e=this.maxConcurrentRequests==null?1:this.maxConcurrentRequests-this.activeBlockLoadsCount,t=this.blocks.filter(e=>e.state===`needsLoading`).slice(0,e);this.activeBlockLoadsCount+=t.length;for(let e of t)e.load();this.printCacheStatus()}getBlockState(){let e={};return this.blocks.forEach(t=>{let{id:n,state:r}=t.getBlockStateJson();e[n]=r}),e}printCacheStatus(){Gt(this.gos,`RowNodeBlockLoader - printCacheStatus: activePageLoadsCount = ${this.activeBlockLoadsCount}, blocks = ${JSON.stringify(this.getBlockState())}`)}}]},JC]},zw=`↑`,Bw=`↓`,Vw={tag:`span`,children:[{tag:`span`,ref:`eDelta`,cls:`ag-value-change-delta`},{tag:`span`,ref:`eValue`,cls:`ag-value-change-value`}]},Hw=class extends V{constructor(){super(Vw),this.eValue=B,this.eDelta=B,this.refreshCount=0}init(e){this.refresh(e,!0)}showDelta(e,t){let n=Math.abs(t),r=e.formatValue(n),a=i(r)?r:n,o=t>=0,s=this.eDelta;o?s.textContent=zw+a:s.textContent=Bw+a,s.classList.toggle(`ag-value-change-delta-up`,o),s.classList.toggle(`ag-value-change-delta-down`,!o)}setTimerToRemoveDelta(){this.refreshCount++;let 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`),T(this.eDelta)}refresh(e,t=!1){let{value:n,valueFormatted:r}=e,{eValue:a,lastValue:o,beans:s}=this;if(n===o||(i(r)?a.textContent=r:i(n)?a.textContent=n:T(a),s.filterManager?.isSuppressFlashingCellsBecauseFiltering()))return!1;let c=n&&typeof n==`object`&&`toNumber`in n?n.toNumber():n,l=o&&typeof o==`object`&&`toNumber`in o?o.toNumber():o;if(c===l)return!1;if(typeof c==`number`&&typeof l==`number`){let t=c-l;this.showDelta(e,t)}return o&&a.classList.add(`ag-value-change-value-highlight`),t||this.setTimerToRemoveDelta(),this.lastValue=n,!0}},Uw=`.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}`,Ww={tag:`span`,children:[{tag:`span`,ref:`eCurrent`,cls:`ag-value-slide-current`}]},Gw=class extends V{constructor(){super(Ww),this.eCurrent=B,this.refreshCount=0,this.registerCSS(Uw)}init(e){this.refresh(e,!0)}addSlideAnimation(){this.refreshCount++;let e=this.refreshCount;this.ePrevious?.remove();let{beans:t,eCurrent:n}=this,r=fl({tag:`span`,cls:`ag-value-slide-previous ag-value-slide-out`});this.ePrevious=r,r.textContent=n.textContent,this.getGui().insertBefore(r,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(a(n)&&(n=``),n===this.lastValue||this.beans.filterManager?.isSuppressFlashingCellsBecauseFiltering())return!1;t||this.addSlideAnimation(),this.lastValue=n;let r=this.eCurrent;return i(e.valueFormatted)?r.textContent=e.valueFormatted:i(e.value)?r.textContent=n:T(r),!0}},Kw=class extends O{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`),r=this.beans.gos.get(`cellFadeDuration`)){let i=this.animations[t];i.delete(e);let a=Date.now(),o=a+n,s={phase:`flash`,flashEndTime:o,fadeEndTime:a+n+r};i.set(e,s);let c=`ag-cell-${t}`,l=`${c}-animation`,{comp:u,eGui:{style:d}}=e;u.toggleCss(c,!0),u.toggleCss(l,!1),d.removeProperty(`transition`),d.removeProperty(`transition-delay`),this.nextAnimationTime&&o+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=o)}advanceAnimations(){let e=Date.now(),t=null;for(let n of Object.keys(this.animations)){let r=this.animations[n],i=`ag-cell-${n}`,a=`${i}-animation`;for(let[n,o]of r){if(!n.isAlive()||!n.comp){r.delete(n);continue}let{phase:s,flashEndTime:c,fadeEndTime:l}=o,u=s===`flash`?c:l;if(!(e+15>=u)){t=Math.min(u,t??1/0);continue}let{comp:d,eGui:{style:f}}=n;switch(s){case`flash`:d.toggleCss(i,!1),d.toggleCss(a,!0),f.transition=`background-color ${l-c}ms`,f.transitionDelay=`${c-e}ms`,t=Math.min(l,t??1/0),o.phase=`fade`;break;case`fade`:d.toggleCss(i,!1),d.toggleCss(a,!1),f.removeProperty(`transition`),f.removeProperty(`transition-delay`),r.delete(n);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;let n=Qu(e.cellPosition);t.cells[n]&&this.animateCell(e,`highlight`)}flashCell(e,t){this.animateCell(e,`data-changed`,t?.flashDuration,t?.fadeDuration)}destroy(){for(let e of Object.keys(this.animations))this.animations[e].clear()}};function qw(e,t={}){let{cellFlashSvc:n}=e;n&&e.frameworkOverrides.wrapIncoming(()=>{for(let r of e.rowRenderer.getCellCtrls(t.rowNodes,t.columns))n.flashCell(r,t)})}var Jw={moduleName:`HighlightChanges`,version:j,beans:[Kw],userComponents:{agAnimateShowChangeCellRenderer:Hw,agAnimateSlideCellRenderer:Gw},apiFunctions:{flashCells:qw}};function Yw(e){return e.stateSvc?.getState()??{}}function Xw(e,t,n){return e.stateSvc?.setState(t,n)}function Zw(e){return e={...e},e.version||=`32.1.0`,e.version===`32.1.0`&&(e=Qw(e)),e.version=j,e}function Qw(e){return e.cellSelection=$w(e,`rangeSelection`),e}function $w(e,t){if(e&&typeof e==`object`)return e[t]}var eT={moduleName:`GridState`,version:j,beans:[class extends O{constructor(){super(...arguments),this.beanName=`stateSvc`,this.updateRowGroupExpansionStateTimer=0,this.suppressEvents=!0,this.queuedUpdateSources=new Set,this.dispatchStateUpdateEventDebounced=k(this,()=>this.dispatchQueuedStateUpdateEvents(),0),this.onRowGroupOpenedDebounced=k(this,()=>{this.beans.gos.get(`ssrmExpandAllAffectsAllRows`)?(this.updateCachedState(`ssrmRowGroupExpansion`,this.getRowGroupExpansionState()),this.updateCachedState(`rowGroupExpansion`,void 0)):(this.updateCachedState(`rowGroupExpansion`,this.getRowGroupExpansionState()),this.updateCachedState(`ssrmRowGroupExpansion`,void 0))},0),this.onRowSelectedDebounced=k(this,()=>{this.staleStateKeys.delete(`rowSelection`),this.updateCachedState(`rowSelection`,this.getRowSelectionState())},0),this.staleStateKeys=new Set}postConstruct(){let{gos:e,ctrlsSvc:t,colDelayRenderSvc:n}=this.beans;this.isClientSideRowModel=P(e);let r=Zw(e.get(`initialState`)??{}),i=r.partialColumnState;delete r.partialColumnState,this.cachedState=r;let a=this.suppressEventsAndDispatchInitEvent.bind(this);t.whenReady(this,()=>a(()=>this.setupStateOnGridReady(r))),(r.columnOrder||r.columnVisibility||r.columnSizing||r.columnPinning||r.columnGroup)&&n?.hideColumns(`columnState`);let[o,s,c]=this.addManagedEventListeners({newColumnsLoaded:({source:e})=>{e===`gridInitializing`&&(o(),a(()=>{this.setupStateOnColumnsInitialised(r,!!i),n?.revealColumns(`columnState`)}))},rowCountReady:()=>{s?.(),a(()=>this.setupStateOnRowCountReady(r))},firstDataRendered:()=>{c?.(),a(()=>this.setupStateOnFirstDataRendered(r))}})}destroy(){super.destroy(),clearTimeout(this.updateRowGroupExpansionStateTimer),this.queuedUpdateSources.clear()}getState(){return this.staleStateKeys.size&&this.refreshStaleState(),this.cachedState}setState(e,t){let n=Zw(e);delete n.partialColumnState,this.cachedState=n,this.startSuppressEvents();let r=t?new Set(t):void 0;this.setGridReadyState(n,`api`,r),this.setColumnsInitialisedState(n,`api`,!!r,r),this.setRowCountState(n,`api`,r),setTimeout(()=>{this.isAlive()&&this.setFirstDataRenderedState(n,`api`,r),this.stopSuppressEvents(`api`)})}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`);let 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,r){this.setColumnState(e,t,n,r),this.setColumnGroupState(e,t,r),this.updateColumnAndGroupState()}setupStateOnColumnsInitialised(e,t){this.setColumnsInitialisedState(e,`gridInitializing`,t);let n=e=>()=>this.updateColumnState([e]);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:this.updateColumnAndGroupState.bind(this),columnGroupOpened:()=>this.updateCachedState(`columnGroup`,this.getColumnGroupState())})}setRowCountState(e,t,n){let{filter:r,rowGroupExpansion:i,ssrmRowGroupExpansion:a,rowSelection:o,pagination:s,rowPinning:c}=e,l=(e,r)=>!n?.has(e)&&(r||t===`api`);l(`filter`,r)&&this.setFilterState(r),l(`rowGroupExpansion`,i)&&this.setRowGroupExpansionState(a,i,t),l(`rowSelection`,o)&&this.setRowSelectionState(o,t),l(`pagination`,s)&&this.setPaginationState(s,t),l(`rowPinning`,c)&&this.setRowPinningState(c);let u=this.updateCachedState.bind(this);u(`filter`,this.getFilterState()),this.beans.gos.get(`ssrmExpandAllAffectsAllRows`)?(u(`ssrmRowGroupExpansion`,this.getRowGroupExpansionState()),u(`rowGroupExpansion`,void 0)):(u(`rowGroupExpansion`,this.getRowGroupExpansionState()),u(`ssrmRowGroupExpansion`,void 0)),u(`rowSelection`,this.getRowSelectionState()),u(`pagination`,this.getPaginationState())}setupStateOnRowCountReady(e){this.setRowCountState(e,`gridInitializing`);let t=this.updateCachedState.bind(this),n=()=>{this.updateRowGroupExpansionStateTimer=0,this.beans.gos.get(`ssrmExpandAllAffectsAllRows`)?(t(`ssrmRowGroupExpansion`,this.getRowGroupExpansionState()),t(`rowGroupExpansion`,void 0)):(t(`rowGroupExpansion`,this.getRowGroupExpansionState()),t(`ssrmRowGroupExpansion`,void 0))},r=()=>t(`filter`,this.getFilterState()),{gos:i,colFilter:a,selectableFilter:o}=this.beans;this.addManagedEventListeners({filterChanged:r,rowExpansionStateChanged:this.onRowGroupOpenedDebounced,expandOrCollapseAll:n,columnRowGroupChanged:n,rowDataUpdated:()=>{(i.get(`groupDefaultExpanded`)!==0||i.get(`isGroupOpenByDefault`))&&(this.updateRowGroupExpansionStateTimer||=setTimeout(n))},selectionChanged:()=>{this.staleStateKeys.add(`rowSelection`),this.onRowSelectedDebounced()},paginationChanged:e=>{(e.newPage||e.newPageSize)&&t(`pagination`,this.getPaginationState())},pinnedRowsChanged:()=>t(`rowPinning`,this.getRowPinningState())}),a&&this.addManagedListeners(a,{filterStateChanged:r}),o&&this.addManagedListeners(o,{selectedFilterChanged:r})}setFirstDataRenderedState(e,t,n){let{scroll:r,cellSelection:i,focusedCell:a,columnOrder:o}=e,s=(e,r)=>!n?.has(e)&&(r||t===`api`);s(`focusedCell`,a)&&this.setFocusedCellState(a),s(`cellSelection`,i)&&this.setCellSelectionState(i),s(`scroll`,r)&&this.setScrollState(r),this.setColumnPivotState(!!o?.orderedColIds,t);let c=this.updateCachedState.bind(this);c(`sideBar`,this.getSideBarState()),c(`focusedCell`,this.getFocusedCellState());let l=this.getRangeSelectionState();c(`rangeSelection`,l),c(`cellSelection`,l),c(`scroll`,this.getScrollState())}setupStateOnFirstDataRendered(e){this.setFirstDataRenderedState(e,`gridInitializing`);let t=this.updateCachedState.bind(this),n=()=>t(`focusedCell`,this.getFocusedCellState());this.addManagedEventListeners({cellFocused:n,cellFocusCleared:n,cellSelectionChanged:e=>{if(e.finished){let e=this.getRangeSelectionState();t(`rangeSelection`,e),t(`cellSelection`,e)}},bodyScrollEnd:()=>t(`scroll`,this.getScrollState())})}getColumnState(){let e=this.beans;return Ry(Ii(e),e.colModel.isPivotMode())}setColumnState(e,t,n,r){let{sort:i,rowGroup:a,aggregation:o,pivot:s,columnPinning:c,columnVisibility:l,columnSizing:u,columnOrder:d}=e,f=!1,p=(e,n)=>{let i=!r?.has(e)&&!!(n||t===`api`);return f||=i,i},m={},h=e=>{let t=m[e];return t||(t={colId:e},m[e]=t,t)},g={},_=p(`sort`,i);_&&i?.sortModel.forEach(({colId:e,sort:t},n)=>{let r=h(e);r.sort=t,r.sortIndex=n}),(_||!n)&&(g.sort=null,g.sortIndex=null);let v=p(`rowGroup`,a);v&&a?.groupColIds.forEach((e,t)=>{let n=h(e);n.rowGroup=!0,n.rowGroupIndex=t}),(v||!n)&&(g.rowGroup=null,g.rowGroupIndex=null);let y=p(`aggregation`,o);y&&o?.aggregationModel.forEach(({colId:e,aggFunc:t})=>{h(e).aggFunc=t}),(y||!n)&&(g.aggFunc=null);let ee=p(`pivot`,s);ee&&(s?.pivotColIds.forEach((e,t)=>{let n=h(e);n.pivot=!0,n.pivotIndex=t}),this.gos.updateGridOptions({options:{pivotMode:!!s?.pivotMode},source:t})),(ee||!n)&&(g.pivot=null,g.pivotIndex=null);let b=p(`columnPinning`,c);if(b){for(let e of c?.leftColIds??[])h(e).pinned=`left`;for(let e of c?.rightColIds??[])h(e).pinned=`right`}(b||!n)&&(g.pinned=null);let x=p(`columnVisibility`,l);if(x)for(let e of l?.hiddenColIds??[])h(e).hide=!0;(x||!n)&&(g.hide=null);let S=p(`columnSizing`,u);if(S)for(let{colId:e,flex:t,width:n}of u?.columnSizingModel??[]){let r=h(e);r.flex=t??null,r.width=n}(S||!n)&&(g.flex=null);let te=d?.orderedColIds,ne=!!te?.length&&!r?.has(`columnOrder`),C=ne?te.map(e=>h(e)):Object.values(m);(C.length||f)&&(this.columnStates=C,Ni(this.beans,{state:C,applyOrder:ne,defaultState:g},t))}setColumnPivotState(e,t){let n=this.columnStates;this.columnStates=void 0;let r=this.columnGroupStates;this.columnGroupStates=void 0;let i=this.beans,{pivotResultCols:a,colGroupSvc:o}=i;if(a?.isPivotResultColsPresent()){if(n){let r=[];for(let e of n)a.getPivotResultCol(e.colId)&&r.push(e);Ni(i,{state:r,applyOrder:e},t)}r&&o?.setColumnGroupState(r,t)}}getColumnGroupState(){let e=this.beans.colGroupSvc;if(e)return By(e.getColumnGroupState())}setColumnGroupState(e,t,n){let r=this.beans.colGroupSvc;if(!r||n?.has(`columnGroup`)||t!==`api`&&!Object.prototype.hasOwnProperty.call(e,`columnGroup`))return;let i=new Set(e.columnGroup?.openColumnGroupIds),a=r.getColumnGroupState().map(({groupId:e})=>{let t=i.has(e);return t&&i.delete(e),{groupId:e,open:t}});for(let e of i)a.push({groupId:e,open:!0});a.length&&(this.columnGroupStates=a),r.setColumnGroupState(a,t)}getFilterState(){let{filterManager:e,selectableFilter:t}=this.beans,n=e?.getFilterModel();n&&Object.keys(n).length===0&&(n=void 0);let r=e?.getFilterState(),i=e?.getAdvFilterModel()??void 0,a=t?.getState();return n||i||r||a?{filterModel:n,columnFilterState:r,advancedFilterModel:i,selectableFilters:a}:void 0}setFilterState(e){let{filterManager:t,selectableFilter:n}=this.beans,{filterModel:r,columnFilterState:i,advancedFilterModel:a,selectableFilters:o}=e??{filterModel:null,columnFilterState:null,advancedFilterModel:null};o!==void 0&&n?.setState(o??{}),(r!==void 0||i!==void 0)&&t?.setFilterState(r??null,i??null,`columnFilter`),a!==void 0&&t?.setAdvFilterModel(a??null,`advancedFilter`)}getRangeSelectionState(){let e=this.beans.rangeSvc?.getCellRanges().map(e=>{let{id:t,type:n,startRow:r,endRow:i,columns:a,startColumn:o}=e;return{id:t,type:n,startRow:r,endRow:i,colIds:a.map(e=>e.getColId()),startColId:o.getColId()}});return e?.length?{cellRanges:e}:void 0}setCellSelectionState(e){let{gos:t,rangeSvc:n,colModel:r,visibleCols:i}=this.beans;if(!or(t)||!n)return;let a=[];for(let t of e?.cellRanges??[]){let e=[];for(let n of t.colIds){let t=r.getCol(n);t&&e.push(t)}if(!e.length)continue;let n=r.getCol(t.startColId);if(!n){let t=i.allCols,r=new Set(e);n=t.find(e=>r.has(e))}a.push({...t,columns:e,startColumn:n})}n.setCellRanges(a)}getScrollState(){if(!this.isClientSideRowModel)return;let 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;let{top:t,left:n}=e??{top:0,left:0},{frameworkOverrides:r,rowRenderer:i,animationFrameSvc:a,ctrlsSvc:o}=this.beans;r.wrapIncoming(()=>{o.get(`center`).setCenterViewportScrollLeft(n),o.getScrollFeature()?.setVerticalScrollPosition(t),i.redraw({afterScroll:!0}),a?.flushAllFrames()})}getSideBarState(){return this.beans.sideBar?.comp?.getState()}getFocusedCellState(){if(!this.isClientSideRowModel)return;let e=this.beans.focusSvc.getFocusedCell();if(e){let{column:t,rowIndex:n,rowPinned:r}=e;return{colId:t.getColId(),rowIndex:n,rowPinned:r}}}setFocusedCellState(e){if(!this.isClientSideRowModel)return;let{focusSvc:t,colModel:n}=this.beans;if(!e){t.clearFocusedCell();return}let{colId:r,rowIndex:i,rowPinned:a}=e;t.setFocusedCell({column:n.getCol(r),rowIndex:i,rowPinned:a,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0})}getPaginationState(){let{pagination:e,gos:t}=this.beans;if(!e)return;let n=e.getCurrentPage(),r=t.get(`paginationAutoPageSize`)?void 0:e.getPageSize();if(!(!n&&!r))return{page:n,pageSize:r}}setPaginationState(e,t){let{pagination:n,gos:r}=this.beans;if(!n)return;let{pageSize:i,page:a}=e??{page:0,pageSize:r.get(`paginationPageSize`)},o=t===`gridInitializing`;i&&!r.get(`paginationAutoPageSize`)&&n.setPageSize(i,o?`initialState`:`pageSizeSelector`),typeof a==`number`&&(o?n.setPage(a):n.goToPage(a))}getRowSelectionState(){let e=this.beans.selectionSvc;if(!e)return;let 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`)}getRowGroupExpansionState(){let{expansionSvc:e}=this.beans;if(e)return e.getExpansionState()}getRowPinningState(){return this.beans.pinnedRowModel?.getPinnedState()}setRowPinningState(e){let t=this.beans.pinnedRowModel;e?t?.setPinnedState(e):t?.reset()}setRowGroupExpansionState(e,t,n){let r=this.beans.expansionSvc;if(!r)return;let i=t??{expandedRowGroupIds:[],collapsedRowGroupIds:[]};r.setExpansionState(i,n)}updateColumnState(e){let t=this.getColumnState(),n=!1,r=this.cachedState;for(let e of Object.keys(t)){let i=t[e];s(i,r[e])||(n=!0)}this.cachedState={...r,...t},n&&this.dispatchStateUpdateEvent(e)}updateCachedState(e,t){let n=this.cachedState[e];this.setCachedStateValue(e,t),s(t,n)||this.dispatchStateUpdateEvent([e])}setCachedStateValue(e,t){this.cachedState={...this.cachedState,[e]:t}}refreshStaleState(){let e=this.staleStateKeys;for(let t of e)t===`rowSelection`&&this.setCachedStateValue(t,this.getRowSelectionState());e.clear()}dispatchStateUpdateEvent(e){if(!this.suppressEvents){for(let t of e)this.queuedUpdateSources.add(t);this.dispatchStateUpdateEventDebounced()}}dispatchQueuedStateUpdateEvents(){let 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`)}}],apiFunctions:{getState:Yw,setState:Xw}};function tT(e){return e.rowModel.isLastRowIndexKnown()}function nT(e){return e.pagination?.getPageSize()??100}function rT(e){return e.pagination?.getCurrentPage()??0}function iT(e){return e.pagination?.getTotalPages()??1}function aT(e){return e.pagination?e.pagination.getMasterRowCount():e.rowModel.getRowCount()}function oT(e){e.pagination?.goToNextPage()}function sT(e){e.pagination?.goToPreviousPage()}function cT(e){e.pagination?.goToFirstPage()}function lT(e){e.pagination?.goToLastPage()}function uT(e,t){e.pagination?.goToPage(t)}var dT=class extends O{constructor(){super(...arguments),this.beanName=`paginationAutoPageSizeSvc`}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.centerRowsCtrl=e.center;let 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;let e=this.centerRowsCtrl.viewportSizeFeature.getBodyHeight();if(e>0){let t=this.beans,n=()=>{let n=Math.max(Vn(t),1),r=Math.floor(e/n);t.pagination.setPageSize(r,`autoCalculated`)};this.isBodyRendered?k(this,n,50)():(n(),this.isBodyRendered=!0)}else this.isBodyRendered=!1}},fT=`paginationPageSizeSelector`,pT={tag:`span`,cls:`ag-paging-page-size`},mT={selector:`AG-PAGE-SIZE-SELECTOR`,component:class extends V{constructor(){super(pT),this.hasEmptyOption=!1,this.handlePageSizeItemSelected=()=>{if(!this.selectPageSizeComp)return;let e=this.selectPageSizeComp.getValue();if(!e)return;let 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(fT,()=>{this.onPageSizeSelectorValuesChange()}),this.addManagedEventListeners({paginationChanged:e=>this.handlePaginationChanged(e)})}handlePaginationChanged(e){if(!this.selectPageSizeComp||!e?.newPageSize)return;let 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(){T(this.getGui()),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(fT)!==!1}reloadPageSizesSelector(){let e=this.getPageSizeSelectorValues(),t=this.pagination.getPageSize(),n=!t||!e.includes(t);if(n){let n=this.gos.exists(`paginationPageSize`),r=this.gos.get(fT)!==!0;M(94,{pageSizeSet:n,pageSizesSet:r,pageSizeOptions:e,paginationPageSizeOption:t}),r||M(95,{paginationPageSizeOption:t,paginationPageSizeSelector:fT}),e.unshift(``)}let r=String(n?``:t);this.selectPageSizeComp?(Gr(this.pageSizeOptions,e)||(this.selectPageSizeComp.clearOptions().addOptions(this.createPageSizeSelectOptions(e)),this.pageSizeOptions=e),this.selectPageSizeComp.setValue(r,!0)):this.createPageSizeSelectorComp(e,r),this.hasEmptyOption=n}createPageSizeSelectOptions(e){return e.map(e=>({value:String(e)}))}createPageSizeSelectorComp(e,t){let n=this.getLocaleTextFunc(),r=n(`pageSizeSelectorLabel`,`Page Size:`),i=n(`ariaPageSizeSelectorLabel`,`Page Size`);this.selectPageSizeComp=this.createManagedBean(new ds).addOptions(this.createPageSizeSelectOptions(e)).setValue(t).setAriaLabel(i).setLabel(r).onValueChange(()=>this.handlePageSizeItemSelected()),this.appendChild(this.selectPageSizeComp)}getPageSizeSelectorValues(){let e=[20,50,100],t=this.gos.get(fT);return!Array.isArray(t)||!t?.length?e:[...t].sort((e,t)=>e-t)}destroy(){this.toggleSelectDisplay(!1),super.destroy()}}},hT=`.ag-paging-panel{align-items:center;border-top:var(--ag-footer-row-border);display:flex;gap:calc(var(--ag-spacing)*4);height:var(--ag-pagination-panel-height);justify-content:flex-end;padding:0 var(--ag-cell-horizontal-padding)}:where(.ag-paging-page-size) .ag-wrapper{min-width:50px}.ag-paging-page-summary-panel{align-items:center;display:flex;gap:var(--ag-cell-widget-spacing);.ag-disabled &{pointer-events:none}}.ag-paging-button{cursor:pointer;position:relative;&.ag-disabled{cursor:default;opacity:.5}}.ag-paging-number,.ag-paging-row-summary-panel-number{font-weight:500}`,gT={selector:`AG-PAGINATION`,component:class extends If{constructor(){super(),this.btFirst=B,this.btPrevious=B,this.btNext=B,this.btLast=B,this.lbRecordCount=B,this.lbFirstRowOnPage=B,this.lbLastRowOnPage=B,this.lbCurrent=B,this.lbTotal=B,this.pageSizeComp=B,this.previousAndFirstButtonsDisabled=!1,this.nextButtonDisabled=!1,this.lastButtonDisabled=!1,this.areListenersSetup=!1,this.allowFocusInnerElement=!1,this.registerCSS(hT)}wireBeans(e){this.rowModel=e.rowModel,this.pagination=e.pagination,this.ariaAnnounce=e.ariaAnnounce}postConstruct(){let e=this.gos.get(`enableRtl`);this.setTemplate(this.getTemplate(),[mT]);let{btFirst:t,btPrevious:n,btNext:r,btLast:i}=this;this.activateTabIndex([t,n,r,i]),t.insertAdjacentElement(`afterbegin`,Y(e?`last`:`first`,this.beans)),n.insertAdjacentElement(`afterbegin`,Y(e?`next`:`previous`,this.beans)),r.insertAdjacentElement(`afterbegin`,Y(e?`previous`:`next`,this.beans)),i.insertAdjacentElement(`afterbegin`,Y(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:e=>this.allowFocusInnerElement?this.tabGuardFeature.getTabGuardCtrl().focusInnerElement(e):fd(this.beans,e),forceFocusOutWhenTabGuardsAreEmpty:!0}),this.onPaginationChanged()}setAllowFocus(e){this.allowFocusInnerElement=e}onPaginationChanged(){let e=this.gos.get(`pagination`)&&!this.gos.get(`suppressPaginationPanel`);this.setDisplayed(e),e&&(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(let 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)}]){let{el:t,fn:n}=e;this.addManagedListeners(t,{click:n,keydown:e=>{(e.key===U.ENTER||e.key===U.SPACE)&&(e.preventDefault(),n())}})}dd(this.beans,this,this.getGui()),this.areListenersSetup=!0}}onBtFirst(){this.previousAndFirstButtonsDisabled||this.pagination.goToFirstPage()}formatNumber(e){let t=this.gos.getCallback(`paginationNumberFormatter`);return t?t({value:e}):Uy(e,this.getLocaleTextFunc.bind(this))}getTemplate(){let 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(){let 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);let r=this.isZeroPagesToDisplay();this.nextButtonDisabled=e===n-1||r,this.lastButtonDisabled=!t||r||e===n-1,this.toggleButtonDisabled(this.btNext,this.nextButtonDisabled),this.toggleButtonDisabled(this.btLast,this.lastButtonDisabled)}toggleButtonDisabled(e,t){de(e,t),e.classList.toggle(`ag-disabled`,t)}isZeroPagesToDisplay(){let e=this.rowModel.isLastRowIndexKnown(),t=this.pagination.getTotalPages();return e&&t===0}updateLabels(){let e=this.rowModel.isLastRowIndexKnown(),t=this.pagination.getTotalPages(),n=this.pagination.getMasterRowCount(),r=e?n:null,i=this.pagination.getCurrentPage(),a=this.pagination.getPageSize(),o,s;this.isZeroPagesToDisplay()?o=s=0:(o=a*i+1,s=o+a-1,e&&s>r&&(s=r));let c=o+a-1,l=!e&&n<c,u=this.formatNumber(o);this.lbFirstRowOnPage.textContent=u;let d,f=this.getLocaleTextFunc();d=l?f(`pageLastRowUnknown`,`?`):this.formatNumber(s),this.lbLastRowOnPage.textContent=d;let p=t>0?i+1:0,m=this.formatNumber(p);this.lbCurrent.textContent=m;let h,g;if(e)h=this.formatNumber(t),g=this.formatNumber(r);else{let e=f(`more`,`more`);h=e,g=e}this.lbTotal.textContent=h,this.lbRecordCount.textContent=g,this.announceAriaStatus(u,d,g,m,h)}announceAriaStatus(e,t,n,r,i){let a=this.getLocaleTextFunc(),o=a(`page`,`Page`),s=a(`to`,`to`),c=a(`of`,`of`),l=`${e} ${s} ${t} ${c} ${n}`,u=`${o} ${r} ${c} ${i}`;l!==this.ariaRowStatus&&(this.ariaRowStatus=l,this.ariaAnnounce?.announceValue(l,`paginationRow`)),u!==this.ariaPageStatus&&(this.ariaPageStatus=u,this.ariaAnnounce?.announceValue(u,`paginationPage`))}}},_T={moduleName:`Pagination`,version:j,beans:[class extends O{constructor(){super(...arguments),this.beanName=`pagination`,this.currentPage=0,this.topDisplayedRowIndex=0,this.bottomDisplayedRowIndex=0,this.masterRowCount=0}postConstruct(){let 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 gT}isPaginateChildRows(){let 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){let t=this.currentPage;if(!this.active||t===e||typeof t!=`number`)return;let{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(){let 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 i(this.pageSizeAutoCalculated)&&this.gos.get(`paginationAutoPageSize`)?this.pageSizeAutoCalculated:i(this.pageSizeFromPageSizeSelector)?this.pageSizeFromPageSizeSelector:i(this.pageSizeFromInitialState)?this.pageSizeFromInitialState:i(this.pageSizeFromGridOptions)?this.pageSizeFromGridOptions:this.defaultPageSize}calculatePages(){this.active?this.paginateChildRows?this.calculatePagesAllRows():this.calculatePagesMasterRowsOnly():this.calculatedPagesNotActive(),this.beans.pageBounds.calculateBounds(this.topDisplayedRowIndex,this.bottomDisplayedRowIndex)}unsetAutoCalculatedPageSize(){if(this.pageSizeAutoCalculated===void 0)return;let e=this.pageSizeAutoCalculated;this.pageSizeAutoCalculated=void 0,this.pageSize!==e&&(this.calculatePages(),this.dispatchPaginationChangedEvent({newPageSize:!0}))}setPageSize(e,t){let 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(){let e=this.totalPages;this.currentPage>=e&&(this.currentPage=e-1);let t=this.currentPage;(!isFinite(t)||isNaN(t)||t<0)&&(this.currentPage=0)}calculatePagesMasterRowsOnly(){let e=this.beans.rowModel,t=e.getTopLevelRowCount();if(this.masterRowCount=t,t<=0){this.setZeroRows();return}let n=this.pageSize,r=t-1;this.totalPages=Math.floor(r/n)+1,this.adjustCurrentPageIfInvalid();let i=this.currentPage,a=n*i,o=n*(i+1)-1;o>r&&(o=r),this.topDisplayedRowIndex=e.getTopLevelRowDisplayedIndex(a),o===r?this.bottomDisplayedRowIndex=e.getRowCount()-1:this.bottomDisplayedRowIndex=e.getTopLevelRowDisplayedIndex(o+1)-1}getMasterRowCount(){return this.masterRowCount}calculatePagesAllRows(){let e=this.beans.rowModel.getRowCount();if(this.masterRowCount=e,e===0){this.setZeroRows();return}let{pageSize:t,currentPage:n}=this,r=e-1;this.totalPages=Math.floor(r/t)+1,this.adjustCurrentPageIfInvalid(),this.topDisplayedRowIndex=t*n,this.bottomDisplayedRowIndex=t*(n+1)-1,this.bottomDisplayedRowIndex>r&&(this.bottomDisplayedRowIndex=r)}calculatedPagesNotActive(){this.setPageSize(void 0,`autoCalculated`),this.totalPages=1,this.currentPage=0,this.topDisplayedRowIndex=0,this.bottomDisplayedRowIndex=this.beans.rowModel.getRowCount()-1}dispatchPaginationChangedEvent(e){let{keepRenderedRows:t=!1,newPage:n=!1,newPageSize:r=!1}=e;this.eventSvc.dispatchEvent({type:`paginationChanged`,animate:!1,newData:!1,newPage:n,newPageSize:r,keepRenderedRows:t})}},dT],icons:{first:`first`,previous:`previous`,next:`next`,last:`last`},apiFunctions:{paginationIsLastPageFound:tT,paginationGetPageSize:nT,paginationGetCurrentPage:rT,paginationGetTotalPages:iT,paginationGetRowCount:aT,paginationGoToNextPage:oT,paginationGoToPreviousPage:sT,paginationGoToFirstPage:cT,paginationGoToLastPage:lT,paginationGoToPage:uT},dependsOn:[fb]};function vT(e,t={}){let n=t?t.rowNodes:void 0;e.frameworkOverrides.wrapIncoming(()=>e.rowRenderer.redrawRows(n))}function yT(e,t,n,r,i){t&&(r&&t.parent&&t.parent.level!==-1&&yT(e,t.parent,n,r,i),t.setExpanded(n,void 0,i))}function bT(e,t){return e.rowModel.getRowNode(t)}function xT(e,t,n,r){e.rowRenderer.addRenderedRowListener(t,n,r)}function ST(e){return e.rowRenderer.getRenderedNodes()}function CT(e,t,n){e.rowModel.forEachNode(t,n)}function wT(e){return e.rowRenderer.firstRenderedRow}function TT(e){return e.rowRenderer.lastRenderedRow}function ET(e,t){return e.rowModel.getRow(t)}function DT(e){return e.rowModel.getRowCount()}var OT={moduleName:`RowApi`,version:j,apiFunctions:{redrawRows:vT,setRowNodeExpanded:yT,getRowNode:bT,addRenderedRowListener:xT,getRenderedNodes:ST,forEachNode:CT,getFirstDisplayedRowIndex:wT,getLastDisplayedRowIndex:TT,getDisplayedRowAtIndex:ET,getDisplayedRowCount:DT}},kT={moduleName:`ScrollApi`,version:j,apiFunctions:{getVerticalPixelRange:SS,getHorizontalPixelRange:CS,ensureColumnVisible:wS,ensureIndexVisible:TS,ensureNodeVisible:ES}};function AT(e,t,n){if(!t)return;let r=e.ctrlsSvc.getGridBodyCtrl().eGridBody,i=`aria-${t}`;n===null?r.removeAttribute(i):r.setAttribute(i,n)}function jT(e,t={}){e.frameworkOverrides.wrapIncoming(()=>e.rowRenderer.refreshCells(t))}function MT(e){e.frameworkOverrides.wrapIncoming(()=>{for(let t of e.ctrlsSvc.getHeaderRowContainerCtrls())t.refresh()})}function NT(e){return e.animationFrameSvc?.isQueueEmpty()??!0}function PT(e){e.animationFrameSvc?.flushAllFrames()}function FT(e){return{rowHeight:Vn(e),headerHeight:xd(e)}}function IT(e,t={}){let n=[];for(let r of e.rowRenderer.getCellCtrls(t.rowNodes,t.columns)){let e=r.getCellRenderer();e!=null&&n.push(Fa(e))}if(t.columns?.length)return n;let r=[],i=Gv(t.rowNodes);for(let t of e.rowRenderer.getAllRowCtrls()){if(i&&!Kv(t.rowNode,i)||!t.isFullWidth())continue;let e=t.getFullWidthCellRenderers();for(let t=0;t<e.length;t++){let n=e[t];n!=null&&r.push(Fa(n))}}return[...r,...n]}var LT={moduleName:`RenderApi`,version:j,apiFunctions:{setGridAriaProperty:AT,refreshCells:jT,refreshHeader:MT,isAnimationFrameQueueEmpty:NT,flushAllAnimationFrames:PT,getSizesForCurrentTheme:FT,getCellRendererInstances:IT}},RT=`: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 zT(e,t){typeof t==`number`?e.colAutosize?.sizeColumnsToFit(t,`api`):e.colAutosize?.sizeColumnsToFitGridBody(t)}function BT({colAutosize:e,visibleCols:t},n,r){Array.isArray(n)?e?.autoSizeCols({colKeys:n,skipHeader:r,source:`api`}):e?.autoSizeCols({...n,colKeys:n.colIds??t.allCols,source:`api`})}function VT(e,t){t&&typeof t==`object`?BT(e,t):e.colAutosize?.autoSizeAllColumns({source:`api`,skipHeader:t})}var HT=class extends O{constructor(){super(...arguments),this.beanName=`colAutosize`,this.timesDelayed=0,this.shouldQueueResizeOperations=!1,this.resizeOperationQueue=[]}postConstruct(){let{gos:e}=this,t=e.get(`autoSizeStrategy`);if(t){let n=!1,r=t.type;if(r===`fitGridWidth`||r===`fitProvidedWidth`)n=!0;else if(r===`fitCellContents`){this.addManagedEventListeners({firstDataRendered:()=>this.onFirstDataRendered(t)});let r=e.get(`rowData`);n=r!=null&&r.length>0&&P(e)}n&&this.beans.colDelayRenderSvc?.hideColumns(r)}}autoSizeCols(e){let{eventSvc:t,visibleCols:n,colModel:r}=this.beans;KT(this.beans,!0),this.innerAutoSizeCols(e).then(i=>{let a=e=>Mi(t,Array.from(e),!0,`autosizeColumns`);if(!e.scaleUpToFitGridWidth)return KT(this.beans,!1),a(i);let o=WT(this.beans),s=e=>n.leftCols.some(t=>li(t,e)),c=e=>n.rightCols.some(t=>li(t,e)),l=e.colKeys.filter(e=>!r.getCol(e)?.getColDef().suppressAutoSize&&!ri(e)&&!s(e)&&!c(e));this.sizeColumnsToFit(o,e.source,!0,{defaultMaxWidth:e.defaultMaxWidth,defaultMinWidth:e.defaultMinWidth,columnLimits:e.columnLimits?.map(e=>({...e,key:e.colId})),colKeys:l,onlyScaleUp:!0,animate:!1}),KT(this.beans,!1),a(i)})}innerAutoSizeCols(e){return new Promise((t,n)=>{if(this.shouldQueueResizeOperations)return this.pushResizeOperation(()=>this.innerAutoSizeCols(e).then(t,n));let{colKeys:r,skipHeader:i,skipHeaderGroups:a,stopAtGroup:o,defaultMaxWidth:s,defaultMinWidth:c,columnLimits:l=[],source:u=`api`}=e,{animationFrameSvc:d,renderStatus:f,colModel:p,autoWidthCalc:m,visibleCols:h}=this.beans;if(d?.flushAllFrames(),this.timesDelayed<5&&f&&(!f.areHeaderCellsRendered()||!f.areCellsRendered())){this.timesDelayed++,setTimeout(()=>{this.isAlive()&&this.innerAutoSizeCols(e).then(t,n)});return}this.timesDelayed=0;let g=new Set,_=-1,v=Object.fromEntries(l.map(({colId:e,...t})=>[e,t])),y=i??this.gos.get(`skipHeaderOnAutoSize`),ee=a??y;for(;_!==0;){_=0;let e=[];for(let t of r){if(!t||ii(t))continue;let n=p.getCol(t);if(!n||g.has(n)||n.getColDef().suppressAutoSize)continue;let r=m.getPreferredWidthForColumn(n,y);if(r>0){let e=v[n.colId]??{};e.minWidth??=c,e.maxWidth??=s;let t=UT(n,r,e);n.setActualWidth(t,u),g.add(n),_++}e.push(n)}e.length&&h.refresh(u)}ee||this.autoSizeColumnGroupsByColumns(r,u,o),t(g)})}autoSizeColumn(e,t,n){this.autoSizeCols({colKeys:[e],skipHeader:n,skipHeaderGroups:!0,source:t})}autoSizeColumnGroupsByColumns(e,t,n){let{colModel:r,ctrlsSvc:i}=this.beans,a=new Set,o=r.getColsForKeys(e);for(let e of o){let t=e.getParent();for(;t&&t!=n;)t.isPadding()||a.add(t),t=t.getParent()}let s;for(let e of a){for(let t of i.getHeaderRowContainerCtrls())if(s=t.getHeaderCtrlForColumn(e),s)break;s?.resizeLeafColumnsToFit(t)}}autoSizeAllColumns(e){if(this.shouldQueueResizeOperations){this.pushResizeOperation(()=>this.autoSizeAllColumns(e));return}this.autoSizeCols({colKeys:this.beans.visibleCols.allCols,...e})}addColumnAutosizeListeners(e,t){let n=this.gos.get(`skipHeaderOnAutoSize`),r=()=>{this.autoSizeColumn(t,`uiColumnResized`,n)};e.addEventListener(`dblclick`,r);let i=new Hf(e);return i.addEventListener(`doubleTap`,r),()=>{e.removeEventListener(`dblclick`,r),i.destroy()}}addColumnGroupResize(e,t,n){let r=this.gos.get(`skipHeaderOnAutoSize`),i=()=>{let e=[],i=t.getDisplayedLeafColumns();for(let t of i)t.getColDef().suppressAutoSize||e.push(t.getColId());e.length>0&&this.autoSizeCols({colKeys:e,skipHeader:r,stopAtGroup:t,source:`uiColumnResized`}),n()};return e.addEventListener(`dblclick`,i),()=>e.removeEventListener(`dblclick`,i)}sizeColumnsToFitGridBody(e,t){if(!this.isAlive())return;let n=WT(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):M(29)}sizeColumnsToFit(e,t=`sizeColumnsToFit`,n,r){if(this.shouldQueueResizeOperations){this.pushResizeOperation(()=>this.sizeColumnsToFit(e,t,n,r));return}let{beans:i}=this,a=r?.animate??!0;a&&KT(i,!0);let o={};for(let{key:e,...t}of r?.columnLimits??[])o[typeof e==`string`?e:e.getColId()]=t;let s=i.visibleCols.allCols;if(e<=0||!s.length)return;let c=$r(s);if(r?.onlyScaleUp&&c>e||e===c&&s.every(e=>{if(e.colDef.suppressSizeToFit)return!0;let t=o?.[e.getId()],n=t?.minWidth??r?.defaultMinWidth,i=t?.maxWidth??r?.defaultMaxWidth,a=e.getActualWidth();return(n==null||a>=n)&&(i==null||a<=i)}))return;let l=[],u=[];for(let e of s){let t=r?.colKeys?.some(t=>li(e,t))??!0;e.getColDef().suppressSizeToFit||!t?u.push(e):l.push(e)}let d=l.slice(0),f=!1,p=e=>{qr(l,e),u.push(e)};for(let e of l){e.resetActualWidth(t);let n=o?.[e.getId()],i=n?.minWidth??r?.defaultMinWidth,a=n?.maxWidth??r?.defaultMaxWidth,s=e.getActualWidth();typeof i==`number`&&s<i?e.setActualWidth(i,t,!0):typeof a==`number`&&s>a&&e.setActualWidth(a,t,!0)}for(;!f;){f=!0;let n=e-$r(u);if(n<=0)for(let e of l){let n=o?.[e.getId()]?.minWidth??r?.defaultMinWidth??e.minWidth;e.setActualWidth(n,t,!0)}else{let e=n/$r(l),i=n;for(let n=l.length-1;n>=0;n--){let a=l[n],s=o?.[a.getId()],c=s?.minWidth??r?.defaultMinWidth,u=s?.maxWidth??r?.defaultMaxWidth,d=a.getMinWidth(),m=a.getMaxWidth(),h=typeof c==`number`&&c>d?c:d,g=typeof u==`number`&&u<m?u:m,_=Math.round(a.getActualWidth()*e);_<h?(_=h,p(a),f=!1):_>g?(_=g,p(a),f=!1):n===0&&(_=i),a.setActualWidth(_,t,!0),i-=_}}}for(let e of d)e.fireColumnWidthChangedEvent(t);let m=i.visibleCols;m.setLeftValues(t),m.updateBodyWidths(),!n&&(Mi(this.eventSvc,d,!0,t),a&&KT(i,!1))}applyAutosizeStrategy(){let{gos:e,colDelayRenderSvc:t}=this.beans,n=e.get(`autoSizeStrategy`);n?.type!==`fitGridWidth`&&n?.type!==`fitProvidedWidth`||setTimeout(()=>{if(!this.isAlive())return;let e=n.type;if(e===`fitGridWidth`){let{columnLimits:e,defaultMinWidth:t,defaultMaxWidth:r}=n,i=e?.map(({colId:e,minWidth:t,maxWidth:n})=>({key:e,minWidth:t,maxWidth:n}));this.sizeColumnsToFitGridBody({defaultMinWidth:t,defaultMaxWidth:r,columnLimits:i})}else e===`fitProvidedWidth`&&this.sizeColumnsToFit(n.width,`sizeColumnsToFit`);t?.revealColumns(e)})}onFirstDataRendered({colIds:e,...t}){setTimeout(()=>{if(!this.isAlive())return;let 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(let e of this.resizeOperationQueue)e();this.resizeOperationQueue=[]}pushResizeOperation(e){this.resizeOperationQueue.push(e)}destroy(){this.resizeOperationQueue.length=0,super.destroy()}};function UT(e,t,n={}){let r=n.minWidth??e.getMinWidth();t<r&&(t=r);let i=n.maxWidth??e.getMaxWidth();return t>i&&(t=i),t}function WT({ctrlsSvc:e,scrollVisibleSvc:t}){let n=e.getGridBodyCtrl(),r=n.isVerticalScrollShowing()?t.getScrollbarWidth():0;return Le(n.eGridBody)-r}var GT=`ag-animate-autosize`;function KT({ctrlsSvc:e,gos:t},n){if(!t.get(`animateColumnResizing`)||t.get(`enableRtl`)||!e.isAlive())return;let r=e.getGridBodyCtrl().eGridBody.classList;n?r.add(GT):r.remove(GT)}var qT={moduleName:`ColumnAutoSize`,version:j,beans:[HT],apiFunctions:{sizeColumnsToFit:zT,autoSizeColumns:BT,autoSizeAllColumns:VT},dependsOn:[um],css:[RT]},JT=`.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 YT(e){return e.pinnedRowModel?.getPinnedTopRowCount()??0}function XT(e){return e.pinnedRowModel?.getPinnedBottomRowCount()??0}function ZT(e,t){return e.pinnedRowModel?.getPinnedTopRow(t)}function QT(e,t){return e.pinnedRowModel?.getPinnedBottomRow(t)}function $T(e,t,n){return e.pinnedRowModel?.forEachPinnedRow(t,n)}var eE={moduleName:`PinnedRow`,version:j,beans:[wf],css:[JT],apiFunctions:{getPinnedTopRowCount:YT,getPinnedBottomRowCount:XT,getPinnedTopRow:ZT,getPinnedBottomRow:QT,forEachPinnedRow:$T},icons:{rowPin:`pin`,rowPinTop:`pinned-top`,rowPinBottom:`pinned-bottom`,rowUnpin:`un-pin`}},tE=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(){let e=this.firstNode.__autoHeights?.[this.col.getColId()];if(e==null)return;let t=0;for(let e of this.spannedNodes)e!==this.lastNode&&(t+=e.rowHeight);return e-t}},nE=class extends O{constructor(e){super(),this.column=e}buildCache(e){let{column:t,beans:{gos:n,pinnedRowModel:r,rowModel:i,valueSvc:a,pagination:o}}=this,{colDef:s}=t,c=this.getNodeMap(e),l=new Map,u=n.getCallback(`isFullWidthRow`),d=s.equals,f=s.spanRows,p=typeof f==`function`,m=null,h=null,g,_=(e,t)=>{m=e,h=null,g=t},v=e=>{let r=!e.isExpandable()&&!e.group&&!e.detail&&(u?!u({rowNode:e}):!0);if(e.rowIndex==null||!r){_(null,null);return}if(m==null||e.level!==m.level||e.footer||h&&e.rowIndex-1!==h?.getLastNode().rowIndex){_(e,a.getValue(t,e));return}let i=a.getValue(t,e);if(p){if(!f(L(n,{valueA:g,nodeA:m,valueB:i,nodeB:e,column:t,colDef:s}))){_(e,i);return}}else if(d?!d(g,i):g!==i){_(e,i);return}if(!h){let e=c?.get(m);e?.firstNode===m?(e.reset(),h=e):h=new tE(t,m),l.set(m,h)}h.addSpannedNode(e),l.set(e,h)};switch(e){case`center`:i.forEachDisplayedNode?.(e=>{(!o||o.isRowInPage(e.rowIndex))&&v(e)}),this.centerValueNodeMap=l;break;case`top`:r?.forEachPinnedRow(`top`,v),this.topValueNodeMap=l;break;case`bottom`:r?.forEachPinnedRow(`bottom`,v),this.bottomValueNodeMap=l;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}}},rE=class extends O{constructor(){super(...arguments),this.beanName=`rowSpanSvc`,this.spanningColumns=new Map,this.debouncePinnedEvent=k(this,this.dispatchCellsUpdatedEvent.bind(this,!0),0),this.debounceModelEvent=k(this,this.dispatchCellsUpdatedEvent.bind(this,!1),0),this.pinnedTimeout=null,this.modelTimeout=null}postConstruct(){let 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){let{gos:t}=this.beans;if(!t.get(`enableCellSpan`)||this.spanningColumns.has(e))return;let n=this.createManagedBean(new nE(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}){let{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??=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){let n=this.spanningColumns.get(e);return n?n.isCellSpanning(t):!1}getCellSpanByPosition(e){let{pinnedRowModel:t,rowModel:n}=this.beans,r=e.column,i=e.rowIndex,a=this.spanningColumns.get(r);if(!a)return;let o;switch(e.rowPinned){case`top`:o=t?.getPinnedTopRow(i);break;case`bottom`:o=t?.getPinnedBottomRow(i);break;default:o=n.getRow(i)}if(o)return a.getCellSpan(o)}getCellStart(e){let t=this.getCellSpanByPosition(e);return t?{...e,rowIndex:t.firstNode.rowIndex}:e}getCellEnd(e){let t=this.getCellSpanByPosition(e);return t?{...e,rowIndex:t.getLastNode().rowIndex}:e}getCellSpan(e,t){let n=this.spanningColumns.get(e);if(n)return n.getCellSpan(t)}forEachSpannedColumn(e,t){for(let[n,r]of this.spanningColumns)r.isCellSpanning(e)&&t(n,r.getCellSpan(e))}destroy(){super.destroy(),this.spanningColumns.clear()}},iE=class extends av{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,r,i,a,o){this.eWrapper=n,super.setComp(e,t,n,r,i,a,o),this.setAriaRowSpan(),this.refreshAriaRowIndex()}isCellSpanning(){return!0}getCellSpan(){return this.cellSpan}refreshAriaRowIndex(){let{eGui:e,rowNode:t}=this;!e||t.rowIndex==null||_e(e,t.rowIndex)}setAriaRowSpan(){ve(this.eGui,this.cellSpan.spannedNodes.size)}setFocusedCellPosition(e){this.focusedCellPosition=e}getFocusedCellPosition(){return this.focusedCellPosition??this.cellPosition}checkCellFocused(){let 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){let{beans:t}=this;if(md(t)){this.focusedCellPosition=void 0;return}let 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}},aE=class extends uv{onRowIndexChanged(){super.onRowIndexChanged();for(let e of this.getAllCellCtrls())e.refreshAriaRowIndex()}getInitialRowClasses(e){return[`ag-spanned-row`]}getNewCellCtrl(e){let t=this.beans.rowSpanSvc?.getCellSpan(e,this.rowNode);if(t&&t.firstNode===this.rowNode)return new iE(t,this,this.beans)}isCorrectCtrlForSpan(e){let t=this.beans.rowSpanSvc?.getCellSpan(e.column,this.rowNode);return!t||t.firstNode!==this.rowNode?!1:e.getCellSpan()===t}onRowHeightChanged(){}refreshFirstAndLastRowStyles(){}addHoverFunctionality(){}resetHoveredStatus(){}},oE={moduleName:`CellSpan`,version:j,beans:[rE,class extends O{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){let{rowSpanSvc:t}=this.beans,n=this.getCtrlsMap(e),r=n.size,i=this.getAllRelevantRowControls(e),a=new Map,o=!1;for(let e of i)e.isAlive()&&t?.forEachSpannedColumn(e.rowNode,(e,t)=>{if(a.has(t.firstNode))return;let r=n.get(t.firstNode);if(r){a.set(t.firstNode,r),n.delete(t.firstNode);return}o=!0;let i=new aE(t.firstNode,this.beans,!1,!1,!1);a.set(t.firstNode,i)});this.setCtrlsMap(e,a);let s=a.size===r;if(!(!o&&s)){for(let e of n.values())e.destroyFirstPass(!0),e.destroySecondPass();this.dispatchLocalEvent({type:`spannedRowsUpdated`,ctrlsKey:e})}}getAllRelevantRowControls(e){let{rowRenderer:t}=this.beans;switch(e){case`top`:return t.topRowCtrls;case`bottom`:return t.bottomRowCtrls;case`center`:return t.allRowCtrls}}getCellByPosition(e){let{rowSpanSvc:t}=this.beans,n=t?.getCellSpanByPosition(e);if(!n)return;let r=this.getCtrlsMap(e.rowPinned).get(n.firstNode);if(r)return r.getAllCellCtrls().find(t=>t.column===e.column)}getCtrls(e){return[...this.getCtrlsMap(e).values()]}destroyRowCtrls(e){for(let 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`)}}]},sE=class extends O{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(){let{column:e,cellComp:t}=this,n=e.colDef,r=n.cellClassRules,i=this.getCellClassParams(e,n);ov(this.beans.expressionSvc,r===this.cellClassRules?void 0:this.cellClassRules,r,i,e=>t.toggleCss(e,!0),e=>t.toggleCss(e,!1)),this.cellClassRules=r}applyUserStyles(){let e=this.column,t=e.colDef,n=t.cellStyle;if(!n)return;let r;r=typeof n==`function`?n(this.getCellClassParams(e,t)):n,r&&this.cellComp.setUserStyles(r)}applyClassesFromColDef(){let{column:e,cellComp:t}=this,n=e.colDef,r=this.getCellClassParams(e,n);for(let e of this.staticClasses)t.toggleCss(e,!1);let i=this.beans.cellStyles.getStaticCellClasses(n,r);this.staticClasses=i;for(let e of i)t.toggleCss(e,!0)}getCellClassParams(e,t){let{value:n,rowNode:r}=this.cellCtrl;return L(this.beans.gos,{value:n,data:r.data,node:r,colDef:t,column:e,rowIndex:r.rowIndex})}},cE={moduleName:`CellStyle`,version:j,beans:[class extends O{constructor(){super(...arguments),this.beanName=`cellStyles`}processAllCellClasses(e,t,n,r){ov(this.beans.expressionSvc,void 0,e.cellClassRules,t,n,r),this.processStaticCellClasses(e,t,n)}getStaticCellClasses(e,t){let{cellClass:n}=e;if(!n)return[];let r;return r=typeof n==`function`?n(t):n,typeof r==`string`&&(r=[r]),r||[]}createCellCustomStyleFeature(e){return new sE(e,this.beans)}processStaticCellClasses(e,t,n){this.getStaticCellClasses(e,t).forEach(e=>{n(e)})}}]},lE={moduleName:`RowStyle`,version:j,beans:[cv]};function uE(e,t){return!!e.colHover?.isHovered(t)}var dE=class extends O{constructor(e,t){super(),this.columns=e,this.element=t,this.destroyManagedListeners=[],this.enableFeature=e=>{let{beans:t,gos:n,element:r,columns:i}=this,a=t.colHover;if(e??!!n.get(`columnHoverHighlight`))this.destroyManagedListeners=this.addManagedElementListeners(r,{mouseover:a.setMouseOver.bind(a,i),mouseout:a.clearMouseOver.bind(a)});else{for(let e of this.destroyManagedListeners)e();this.destroyManagedListeners=[]}}}postConstruct(){this.addManagedPropertyListener(`columnHoverHighlight`,({currentValue:e})=>{this.enableFeature(e)}),this.enableFeature()}destroy(){super.destroy(),this.destroyManagedListeners=null}},fE=`ag-column-hover`,pE={moduleName:`ColumnHover`,version:j,beans:[class extends O{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;let t=this.selectedColumns;return!!t&&t.indexOf(e)>=0}addHeaderColumnHoverListener(e,t,n){let r=()=>{let e=this.isHovered(n);t.toggleCss(`ag-column-hover`,e)};e.addManagedEventListeners({columnHoverChanged:r}),r()}onCellColumnHover(e,t){if(!t)return;let n=this.isHovered(e);t.toggleCss(fE,n)}addHeaderFilterColumnHoverListener(e,t,n,r){this.createHoverFeature(e,[n],r);let i=()=>{let e=this.isHovered(n);t.toggleCss(`ag-column-hover`,e)};e.addManagedEventListeners({columnHoverChanged:i}),i()}createHoverFeature(e,t,n){e.createManagedBean(new dE(t,n))}updateState(e){this.selectedColumns=e,this.eventSvc.dispatchEvent({type:`columnHoverChanged`})}}],apiFunctions:{isColumnHovered:uE}},mE=class extends O{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){let n=this.wrapSvc?.wrap(e,t)??t,r=!Cg.has(e),i=r?this.asyncListeners:this.syncListeners;i.has(e)||i.set(e,new Set),i.get(e).add(n),this.eventSvc.addListener(e,n,r)}removeListener(e,t){let n=this.wrapSvc?.unwrap(e,t)??t,r=!!this.asyncListeners.get(e)?.delete(n);r||this.syncListeners.get(e)?.delete(n),this.eventSvc.removeListener(e,n,r)}addGlobalListener(e){let t=this.wrapSvc?.wrapGlobal(e)??e,n=(e,n)=>{Cg.has(e)&&t(e,n)},r=(e,n)=>{Cg.has(e)||t(e,n)};this.globalListenerPairs.set(e,{syncListener:n,asyncListener:r});let i=this.eventSvc;i.addGlobalListener(n,!1),i.addGlobalListener(r,!0)}removeGlobalListener(e){let{eventSvc:t,wrapSvc:n,globalListenerPairs:r}=this,i=n?.unwrapGlobal(e)??e;if(r.has(i)){let{syncListener:n,asyncListener:a}=r.get(i);t.removeGlobalListener(n,!1),t.removeGlobalListener(a,!0),r.delete(e)}else this.syncGlobalListeners.delete(i),t.removeGlobalListener(i,!1)}destroyEventListeners(e,t){e.forEach((e,n)=>{e.forEach(e=>this.eventSvc.removeListener(n,e,t)),e.clear()}),e.clear()}destroyGlobalListeners(e,t){for(let 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);let{globalListenerPairs:e,eventSvc:t}=this;e.forEach(({syncListener:e,asyncListener:n})=>{t.removeGlobalListener(e,!1),t.removeGlobalListener(n,!0)}),e.clear()}};function hE(e,t,n){e.apiEventSvc?.addListener(t,n)}function gE(e,t,n){e.apiEventSvc?.removeListener(t,n)}function _E(e,t){e.apiEventSvc?.addGlobalListener(t)}function vE(e,t){e.apiEventSvc?.removeGlobalListener(t)}var yE={moduleName:`AllCommunity`,version:j,dependsOn:[Sw,Aw,Rw,ab,mC,hC,gC,_C,vC,yC,bC,pC,Ux,Wx,Gx,Hx,Kx,qx,eT,YC,_T,bh,OT,kT,LT,qT,Mp,eE,RC,cy,cE,pE,lE,{moduleName:`EventApi`,version:j,apiFunctions:{addEventListener:hE,addGlobalListener:_E,removeEventListener:gE,removeGlobalListener:vE},beans:[mE]},dy,Jw,Xx,{moduleName:`Locale`,version:j,beans:[Ly]},{moduleName:`RowAutoHeight`,version:j,beans:[class extends O{constructor(){super(...arguments),this.beanName=`rowAutoHeight`,this.wasEverActive=!1,this._debouncedCalculateRowHeights=k(this,this.calculateRowHeights.bind(this),1)}requestCheckAutoHeight(){this.wasEverActive&&this._debouncedCalculateRowHeights()}calculateRowHeights(){let{visibleCols:e,rowModel:t,rowSpanSvc:n,pinnedRowModel:r}=this.beans,i=e.autoHeightCols,a=!1,o=e=>{let t=e.__autoHeights,r=zn(this.beans,e).height;for(let a of i){let i=t?.[a.getColId()],o=n?.getCellSpan(a,e);if(o){if(o.getLastNode()!==e)continue;if(i=n?.getCellSpan(a,e)?.getLastNodeAutoHeight(),!i)return}if(i==null){if(this.colSpanSkipCell(a,e))continue;return}r=Math.max(i,r)}r!==e.rowHeight&&(e.setRowHeight(r),a=!0)};r?.forEachPinnedRow?.(`top`,o),r?.forEachPinnedRow?.(`bottom`,o),t.forEachDisplayedNode?.(o),a&&t.onRowHeightChanged?.()}setRowAutoHeight(e,t,n){if(e.__autoHeights??={},t==null){delete e.__autoHeights[n.getId()];return}let r=e.__autoHeights[n.getId()];e.__autoHeights[n.getId()]=t,r!==t&&this.requestCheckAutoHeight()}colSpanSkipCell(e,t){let{colModel:n,colViewport:r,visibleCols:i}=this.beans;if(!n.colSpanActive)return!1;let a=[];switch(e.getPinned()){case`left`:a=i.getLeftColsForRow(t);break;case`right`:a=i.getRightColsForRow(t);break;case null:a=r.getColsWithinViewport(t);break}return!a.includes(e)}setupCellAutoHeight(e,t,n){if(!e.column.isAutoHeight()||!t)return!1;this.wasEverActive=!0;let r=t.parentElement,{rowNode:i,column:a}=e,o=this.beans,s=c=>{if(this.beans.editSvc?.isEditing(e)||!e.isAlive()||!n.isAlive())return;let{paddingTop:l,paddingBottom:u,borderBottomWidth:d,borderTopWidth:f}=Fe(r),p=l+u+d+f,m=t.offsetHeight+p;if(c<5&&(!g(o)?.contains(t)||m==0)){window.setTimeout(()=>s(c+1),0);return}this.setRowAutoHeight(i,m,a)},c=()=>s(0);c();let l=tt(o,t,c);return n.addDestroyFunc(()=>{l(),this.setRowAutoHeight(i,void 0,a)}),!0}setAutoHeightActive(e){this.active=e.list.some(e=>e.isVisible()&&e.isAutoHeight())}areRowsMeasured(){if(!this.active)return!0;let e=this.beans.rowRenderer.getAllRowCtrls(),t=null;for(let{rowNode:n}of e)if((!t||this.beans.colModel.colSpanActive)&&(t=this.beans.colViewport.getColsWithinViewport(n).filter(e=>e.isAutoHeight())),t.length!==0){if(!n.__autoHeights)return!1;for(let e of t){let t=n.__autoHeights[e.getColId()];if(!t||n.rowHeight<t)return!1}}return!0}}]},Ap,Cw,oE]};const bE=`system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif`,xE=ag.withParams({backgroundColor:`#ffffff`,headerBackgroundColor:`#f5f5f5`,rowHoverColor:`#ffffff`,borderColor:`#e0e0e0`,foregroundColor:`#1e1e1e`,fontFamily:`monospace`,fontSize:13,headerFontFamily:bE,headerFontSize:13,headerFontWeight:700,cellHorizontalPadding:8}),SE=ag.withParams({backgroundColor:`#1e1e1e`,headerBackgroundColor:`#252526`,rowHoverColor:`#1e1e1e`,borderColor:`#3c3c3c`,foregroundColor:`#e0e0e0`,fontFamily:`monospace`,fontSize:13,headerFontFamily:bE,headerFontSize:13,headerFontWeight:700,cellHorizontalPadding:8});function CE(e){return{gridColor:e?`#4b5563`:`#d1d5db`,textColor:e?`#e5e7eb`:`#374151`,borderColor:e?`#6b7280`:`#9ca3af`,tooltipBackgroundColor:e?`#1f2937`:`#ffffff`,tooltipTextColor:e?`#e5e7eb`:`#111827`}}function wE(e,t=!0){let n=CE(e);return{grid:{color:t?n.gridColor:void 0,display:t},ticks:{color:n.textColor},border:{color:n.borderColor}}}function TE(e){let t=CE(e);return{legend:{labels:{color:t.textColor}},title:{color:t.textColor},tooltip:{backgroundColor:t.tooltipBackgroundColor,titleColor:t.tooltipTextColor,bodyColor:t.tooltipTextColor,borderColor:t.borderColor,borderWidth:1}}}const EE=`#63B3ED`,DE=`#F6AD55`,OE=`${EE}A5`,kE=`${DE}A5`,AE=`#90CDF4`,jE=`#FBD38D`,ME=`${AE}A5`,NE=`${jE}A5`,PE=`#63B3ED`,FE=`#90CDF4`;function IE(e){return{current:e?AE:EE,base:e?jE:DE,currentWithAlpha:e?ME:OE,baseWithAlpha:e?NE:kE,info:e?FE:PE}}function LE(e,t){return[{props:{color:e,variant:`contained`},style:{backgroundColor:`var(--mui-palette-${e}-main, ${t[500]})`,color:`var(--mui-palette-${e}-contrastText, #ffffff)`,"&:hover":{backgroundColor:`var(--mui-palette-${e}-dark, ${t[600]})`}}},{props:{color:e,variant:`outlined`},style:{"&&":{borderColor:`var(--mui-palette-${e}-main, ${t[500]})`,color:`var(--mui-palette-${e}-dark, ${t[600]})`},"&:hover":{borderColor:`var(--mui-palette-${e}-dark, ${t[600]})`,backgroundColor:`color-mix(in srgb, var(--mui-palette-${e}-light, ${t[50]}) 30%, transparent)`}}},{props:{color:e,variant:`text`},style:{"&&":{color:`var(--mui-palette-${e}-dark, ${t[600]})`},"&:hover":{backgroundColor:`color-mix(in srgb, var(--mui-palette-${e}-light, ${t[50]}) 30%, transparent)`}}}]}function RE(e,t){return[{props:{color:e,variant:`filled`},style:{backgroundColor:`var(--mui-palette-${e}-main, ${t[500]})`,color:`var(--mui-palette-${e}-contrastText, #ffffff)`,"&:hover":{backgroundColor:`var(--mui-palette-${e}-dark, ${t[600]})`},"&.MuiChip-clickable:hover":{backgroundColor:`var(--mui-palette-${e}-dark, ${t[600]})`}}},{props:{color:e,variant:`outlined`},style:{"&&":{borderColor:`var(--mui-palette-${e}-main, ${t[500]})`,color:`var(--mui-palette-${e}-dark, ${t[600]})`},"&:hover":{backgroundColor:`color-mix(in srgb, var(--mui-palette-${e}-light, ${t[50]}) 25%, transparent)`}}}]}function zE(e,t){return[{props:{color:e},style:{"& .MuiBadge-badge":{backgroundColor:`var(--mui-palette-${e}-main, ${t[500]})`,color:`var(--mui-palette-${e}-contrastText, #ffffff)`}}}]}function BE(e,t){return[{props:{color:e},style:{color:`var(--mui-palette-${e}-main, ${t[500]})`}}]}const VE=[...LE(`brand`,e.brand),...LE(`iochmara`,e.iochmara),...LE(`cyan`,e.cyan),...LE(`amber`,e.amber),...LE(`green`,e.green),...LE(`red`,e.red),...LE(`rose`,e.rose),...LE(`fuchsia`,e.fuchsia),...LE(`neutral`,e.neutral)],HE=[...RE(`brand`,e.brand),...RE(`iochmara`,e.iochmara),...RE(`cyan`,e.cyan),...RE(`amber`,e.amber),...RE(`green`,e.green),...RE(`red`,e.red),...RE(`rose`,e.rose),...RE(`fuchsia`,e.fuchsia),...RE(`neutral`,e.neutral)],UE=[...zE(`brand`,e.brand),...zE(`iochmara`,e.iochmara)],WE=[...BE(`brand`,e.brand),...BE(`iochmara`,e.iochmara)],GE={typography:{fontFamily:[`-apple-system`,`BlinkMacSystemFont`,`"Segoe UI"`,`Roboto`,`"Helvetica Neue"`,`Arial`,`sans-serif`,`"Apple Color Emoji"`,`"Segoe UI Emoji"`,`"Segoe UI Symbol"`].join(`,`),fontSize:14,h1:{fontWeight:600},h2:{fontWeight:600},h3:{fontWeight:600},h4:{fontWeight:600},h5:{fontWeight:600},h6:{fontWeight:600},button:{textTransform:`none`,fontWeight:500}},shape:{borderRadius:8},components:{MuiButton:{defaultProps:{disableElevation:!0},styleOverrides:{root:{borderRadius:6,boxShadow:`none`,textTransform:`none`,fontWeight:500,"&:hover":{boxShadow:`none`}},sizeSmall:{fontSize:`0.8125rem`,padding:`4px 10px`},sizeMedium:{padding:`0.5rem 1rem`,fontSize:`1rem`},sizeLarge:{padding:`0.75rem 1.5rem`,fontSize:`1.125rem`},contained:{"&:hover":{boxShadow:`none`}},outlined:{borderWidth:`1px`,"&:hover":{borderWidth:`1px`}}},variants:[{props:{size:`xsmall`},style:{fontSize:`0.75rem`,padding:`2px 8px`,minHeight:24}},...VE]},MuiChip:{styleOverrides:{root:{borderRadius:6,fontWeight:500},sizeSmall:{fontSize:`0.75rem`,height:24},sizeMedium:{height:32,fontSize:`0.875rem`}},variants:[{props:{size:`xsmall`},style:{fontSize:`0.6875rem`,height:20,"& .MuiChip-label":{padding:`0 6px`}}},...HE]},MuiBadge:{variants:[...UE],styleOverrides:{badge:{fontWeight:500,fontSize:`0.75rem`}}},MuiAlert:{styleOverrides:{root:{borderRadius:6},standardSuccess:{backgroundColor:`var(--mui-palette-success-light)`,color:`var(--mui-palette-success-dark)`},standardWarning:{backgroundColor:`var(--mui-palette-warning-light)`,color:`var(--mui-palette-warning-dark)`},standardError:{backgroundColor:`var(--mui-palette-error-light)`,color:`var(--mui-palette-error-dark)`},standardInfo:{backgroundColor:`var(--mui-palette-info-light)`,color:`var(--mui-palette-info-dark)`}}},MuiTabs:{styleOverrides:{indicator:{height:2}}},MuiTab:{styleOverrides:{root:{textTransform:`none`,fontWeight:500,minHeight:48}}},MuiAvatar:{styleOverrides:{root:{fontWeight:500}}},MuiCircularProgress:{defaultProps:{color:`primary`},variants:[...WE]},MuiLink:{defaultProps:{underline:`hover`},styleOverrides:{root:{fontWeight:500,color:`var(--mui-palette-secondary-main)`,textDecorationColor:`var(--mui-palette-secondary-light)`,"&:hover":{color:`var(--mui-palette-secondary-dark)`}}}},MuiPopover:{styleOverrides:{paper:{borderRadius:8,boxShadow:`0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1)`}}},MuiDivider:{styleOverrides:{root:{borderColor:`var(--mui-palette-divider)`}}},MuiBreadcrumbs:{styleOverrides:{separator:{color:`var(--mui-palette-text-secondary)`}}},MuiCard:{styleOverrides:{root:{borderRadius:8,boxShadow:`0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1)`}}},MuiPaper:{styleOverrides:{root:{backgroundImage:`none`}}},MuiTooltip:{styleOverrides:{tooltip:{fontSize:`0.75rem`}}},MuiIconButton:{styleOverrides:{root:{borderRadius:6},sizeSmall:{padding:4},sizeMedium:{padding:8},sizeLarge:{padding:12}}},MuiTextField:{defaultProps:{variant:`outlined`,size:`small`},styleOverrides:{root:{"& .MuiOutlinedInput-root":{borderRadius:6}}}},MuiOutlinedInput:{styleOverrides:{root:{borderRadius:6,"&:hover .MuiOutlinedInput-notchedOutline":{borderColor:`var(--mui-palette-secondary-light)`},"&.Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:`var(--mui-palette-secondary-main)`,borderWidth:2}},notchedOutline:{borderColor:`var(--mui-palette-divider)`}}},MuiCheckbox:{defaultProps:{color:`primary`},styleOverrides:{root:{borderRadius:4}}},MuiSwitch:{defaultProps:{color:`primary`}},MuiDialog:{styleOverrides:{paper:{borderRadius:8}}},MuiDialogTitle:{styleOverrides:{root:{fontWeight:600,fontSize:`1.125rem`}}},MuiMenu:{styleOverrides:{paper:{borderRadius:8,boxShadow:`0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1)`}}},MuiMenuItem:{styleOverrides:{root:{fontSize:`0.875rem`,padding:`0.5rem 0.75rem`,"&:hover":{backgroundColor:`var(--mui-palette-action-hover)`},"&.Mui-selected":{backgroundColor:`var(--mui-palette-action-selected)`,"&:hover":{backgroundColor:`var(--mui-palette-action-selected)`}}}}},MuiAutocomplete:{styleOverrides:{paper:{borderRadius:6,boxShadow:`0 4px 6px -1px rgba(0, 0, 0, 0.15), 0 2px 4px -2px rgba(0, 0, 0, 0.1)`,backgroundColor:e.neutral[200],".dark &":{backgroundColor:e.neutral[700]}},listbox:{padding:`4px 0`},option:{fontSize:`0.875rem`,padding:`0.5rem 0.75rem`,'&[aria-selected="true"]':{backgroundColor:`var(--mui-palette-action-selected)`},"&.Mui-focused":{backgroundColor:`var(--mui-palette-action-hover)`}}}}}},KE=t({cssVariables:{colorSchemeSelector:`class`},colorSchemes:{light:{palette:{mode:`light`,primary:{main:e.iochmara[500],light:e.iochmara[300],dark:e.iochmara[600],contrastText:`#ffffff`},secondary:{main:e.cyan[500],light:e.cyan[400],dark:e.cyan[600],contrastText:`#ffffff`},brand:{light:e.brand[400],main:e.brand[500],dark:e.brand[600],contrastText:`#ffffff`},iochmara:{light:e.iochmara[400],main:e.iochmara[500],dark:e.iochmara[600],contrastText:`#ffffff`},cyan:{main:e.cyan[500],light:e.cyan[300],dark:e.cyan[600],contrastText:`#ffffff`},amber:{main:e.amber[500],light:e.amber[300],dark:e.amber[600],contrastText:`#ffffff`},green:{main:e.green[500],light:e.green[300],dark:e.green[600],contrastText:`#ffffff`},red:{main:e.red[500],light:e.red[300],dark:e.red[600],contrastText:`#ffffff`},rose:{main:e.rose[500],light:e.rose[300],dark:e.rose[600],contrastText:`#ffffff`},fuchsia:{main:e.fuchsia[500],light:e.fuchsia[300],dark:e.fuchsia[600],contrastText:`#ffffff`},neutral:{main:e.neutral[500],light:e.neutral[300],dark:e.neutral[600],contrastText:`#ffffff`},grey:e.neutral,success:e.success,warning:e.warning,error:e.error,info:e.info,background:{default:`#ffffff`,paper:e.neutral[50]},text:{primary:e.neutral[900],secondary:e.neutral[600],disabled:e.neutral[400]},divider:e.neutral[200]}},dark:{palette:{mode:`dark`,primary:{main:e.iochmara[500],light:e.iochmara[300],dark:e.iochmara[600],contrastText:`#ffffff`},secondary:{main:e.cyan[500],light:e.cyan[400],dark:e.cyan[600],contrastText:`#ffffff`},brand:{light:e.brand[300],main:e.brand[400],dark:e.brand[600],contrastText:`#ffffff`},iochmara:{light:e.iochmara[300],main:e.iochmara[400],dark:e.iochmara[600],contrastText:`#ffffff`},cyan:{main:e.cyan[400],light:e.cyan[300],dark:e.cyan[600],contrastText:`#ffffff`},amber:{main:e.amber[400],light:e.amber[300],dark:e.amber[600],contrastText:`#000000`},green:{main:e.green[400],light:e.green[300],dark:e.green[600],contrastText:`#ffffff`},red:{main:e.red[400],light:e.red[300],dark:e.red[600],contrastText:`#ffffff`},rose:{main:e.rose[400],light:e.rose[300],dark:e.rose[600],contrastText:`#ffffff`},fuchsia:{main:e.fuchsia[400],light:e.fuchsia[300],dark:e.fuchsia[600],contrastText:`#ffffff`},neutral:{main:e.neutral[500],light:e.neutral[400],dark:e.neutral[100],contrastText:`#ffffff`},grey:e.neutral,success:{light:e.success.light,main:e.success.main,dark:e.success.dark,contrastText:`#000000`},warning:{light:e.warning.light,main:e.warning.main,dark:e.warning.dark,contrastText:`#000000`},error:{light:e.error.light,main:e.error.main,dark:e.error.dark,contrastText:`#ffffff`},info:{light:e.info.light,main:e.info.main,dark:e.info.dark,contrastText:`#ffffff`},background:{default:e.neutral[900],paper:e.neutral[800]},text:{primary:e.neutral[50],secondary:e.neutral[400],disabled:e.neutral[600]},divider:e.neutral[700]}}},...GE});export{d as $,Id as A,bu as B,Wi as C,My as D,Ru as E,Uf as F,Pn as G,xu as H,Cr as I,Ce as J,tt as K,h as L,Pu as M,xo as N,Jf as O,Lf as P,Se as Q,Tr as R,qi as S,Gu as T,yu as U,Su as V,P as W,ye as X,Ue as Y,ge as Z,xE as _,kE as a,Vy as b,ME as c,FE as d,M as et,IE as f,SE as g,wE as h,NE as i,pn as j,Dd as k,OE as l,TE as m,DE as n,EE as o,CE as p,wr as q,jE as r,AE as s,KE as t,PE as u,H as v,Uu as w,O as x,yE as y,un as z};
|
|
64
|
-
//# sourceMappingURL=theme-
|
|
63
|
+
`,Ew=class extends Gy{constructor(e){super(e),this.config=e,this.isFirstLine=!0,this.result=``;let{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,Tw),this.result+=e):e.forEach(e=>{this.beginNewLine(),e.forEach((e,t)=>{t!==0&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(e.data.value||``),e.mergeAcross&&this.appendEmptyCells(e.mergeAcross)})}))}onNewHeaderGroupingRow(){return this.beginNewLine(),{onColumn:this.onNewHeaderGroupingRowColumn.bind(this)}}onNewHeaderGroupingRowColumn(e,t,n,r){n!=0&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(t),this.appendEmptyCells(r)}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);let r=this.extractRowCellValue({column:e,node:n,currentColumnIndex:t,accumulatedRowIndex:t,type:`csv`,useRawFormula:!1});this.result+=this.putInQuotes(r.valueFormatted??r.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():(M(53),t=``),`"`+t.replace(/"/g,`""`)+`"`}parse(){return this.result}beginNewLine(){this.isFirstLine||(this.result+=Tw),this.isFirstLine=!1}},Dw=class extends Wy{constructor(){super(...arguments),this.beanName=`csvCreator`}getMergedParams(e){let t=this.gos.get(`defaultCsvExportParams`);return Object.assign({},t,e)}export(e){if(this.isExportSuppressed()){M(51);return}let t=()=>{let t=this.getMergedParams(e),n=this.getData(t),r=new Blob([``,n],{type:`text/plain`}),i=t.fileName,a=typeof i==`function`?i(L(this.gos,{})):i;Ky(this.getFileName(a),r)},{overlays:n}=this.beans;n?n.showExportOverlay(t):t()}exportDataAsCsv(e){this.export(e)}getDataAsCsv(e,t=!1){let n=t?Object.assign({},e):this.getMergedParams(e);return this.getData(n)}getDefaultFileExtension(){return`csv`}createSerializingSession(e){let{colModel:t,colNames:n,rowGroupColsSvc:r,valueSvc:i,gos:a}=this.beans,{processCellCallback:o,processHeaderCallback:s,processGroupHeaderCallback:c,processRowGroupCallback:l,suppressQuotes:u,columnSeparator:d}=e;return new Ew({colModel:t,colNames:n,valueSvc:i,gos:a,processCellCallback:o||void 0,processHeaderCallback:s||void 0,processGroupHeaderCallback:c||void 0,processRowGroupCallback:l||void 0,suppressQuotes:u||!1,columnSeparator:d||`,`,rowGroupColsSvc:r})}isExportSuppressed(){return this.gos.get(`suppressCsvExport`)}};function Ow(e,t){return e.csvCreator?.getDataAsCsv(t)}function kw(e,t){e.csvCreator?.exportDataAsCsv(t)}var Aw={moduleName:`CsvExport`,version:j,beans:[Dw],apiFunctions:{getDataAsCsv:Ow,exportDataAsCsv:kw},dependsOn:[ww]},jw=class extends O{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){let 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=[];let{params:{blockSize:e,rowHeight:t},startRow:n,beans:r,rowNodes:i}=this;for(let a=0;a<e;a++){let e=n+a,o=new el(r);o.setRowHeight(t),o.uiLevel=0,o.setRowIndex(e),o.setRowTop(t*e),i.push(o)}}getBlockStateJson(){let{id:e,startRow:t,endRow:n,state:r}=this;return{id:``+e,state:{blockNumber:e,startRow:t,endRow:n,pageStatus:r}}}setDataAndId(e,t,n){i(t)?e.setDataAndId(t,n.toString()):e.setDataAndId(void 0,void 0)}loadFromDatasource(){let e=this.createLoadParams();if(a(this.params.datasource.getRows)){M(90);return}window.setTimeout(()=>{this.params.datasource.getRows(e)},0)}createLoadParams(){let{startRow:e,endRow:t,version:n,params:{sortModel:r,filterModel:i},gos:a}=this;return L(a,{startRow:e,endRow:t,successCallback:this.pageLoaded.bind(this,n),failCallback:this.pageLoadFailed.bind(this,n),sortModel:r,filterModel:i})}forEachNode(e,t,n){this.rowNodes.forEach((r,i)=>{this.startRow+i<n&&e(r,t.value++)})}getRow(e,t=!1){t||(this.lastAccessed=this.params.lastAccessedSequence.value++);let n=e-this.startRow;return this.rowNodes[n]}processServerResult(e){let{rowNodes:t,beans:n}=this;t.forEach((r,i)=>{let a=e.rowData?e.rowData[i]:void 0;!r.id&&r.alreadyRendered&&a&&(t[i]=new el(n),t[i].setRowIndex(r.rowIndex),t[i].setRowTop(r.rowTop),t[i].setRowHeight(r.rowHeight),r._destroy(!0)),this.setDataAndId(t[i],a,this.startRow+i)});let r=e.rowCount!=null&&e.rowCount>=0?e.rowCount:void 0;this.parentCache.pageLoaded(this,r)}destroy(){let e=this.rowNodes;for(let t=0,n=e.length;t<n;t++)e[t]._destroy(!1);e.length=0,super.destroy()}},Mw=2,Nw=class extends O{constructor(e){super(),this.params=e,this.lastRowIndexKnown=!1,this.blocks={},this.blockCount=0,this.rowCount=e.initialRowCount}getRow(e,t=!1){let n=Math.floor(e/this.params.blockSize),r=this.blocks[n];if(!r){if(t)return;r=this.createBlock(n)}return r.getRow(e)}createBlock(e){let t=this.params,n=this.createBean(new jw(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(let e of this.getBlocksInOrder())e.setStateWaitingToLoad();this.params.rowNodeBlockLoader.checkBlockToLoad()}destroy(){for(let e of this.getBlocksInOrder())this.destroyBlock(e);super.destroy()}getRowCount(){return this.rowCount}isLastRowIndexKnown(){return this.lastRowIndexKnown}pageLoaded(e,t){this.isAlive()&&(Gt(this.gos,`InfiniteCache - onPageLoaded: page = ${e.id}, lastRow = ${t}`),this.checkRowCount(e,t),this.onCacheUpdated())}purgeBlocksIfNeeded(e){let t=this.getBlocksInOrder().filter(t=>t!=e);t.sort((e,t)=>t.lastAccessed-e.lastAccessed);let n=this.params.maxBlocksInCache>0,r=n?this.params.maxBlocksInCache-1:null,i=Mw-1;t.forEach((e,t)=>{if(e.state===`needsLoading`&&t>=i||n&&t>=r){if(this.isBlockCurrentlyDisplayed(e)||this.isBlockFocused(e))return;this.removeBlockFromCache(e)}})}isBlockFocused(e){let t=this.beans.focusSvc.getFocusCellToUseAfterRefresh();if(!t||t.rowPinned!=null)return!1;let{startRow:n,endRow:r}=e;return t.rowIndex>=n&&t.rowIndex<r}isBlockCurrentlyDisplayed(e){let{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){let{blockSize:t,overflowSize:n}=this.params,r=(e.id+1)*t+n;this.rowCount<r&&(this.rowCount=r)}}setRowCount(e,t){this.rowCount=e,i(t)&&(this.lastRowIndexKnown=t),this.lastRowIndexKnown||this.rowCount%this.params.blockSize===0&&this.rowCount++,this.onCacheUpdated()}forEachNodeDeep(e){let t={value:0};for(let n of this.getBlocksInOrder())n.forEachNode(e,t,this.rowCount)}getBlocksInOrder(){return Object.values(this.blocks).sort((e,t)=>e.id-t.id)}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(){let e=[];for(let t of this.getBlocksInOrder())t.id*this.params.blockSize>=this.rowCount&&e.push(t);if(e.length>0)for(let t of e)this.destroyBlock(t)}purgeCache(){for(let e of this.getBlocksInOrder())this.removeBlockFromCache(e);this.lastRowIndexKnown=!1,this.rowCount===0&&(this.rowCount=this.params.initialRowCount),this.onCacheUpdated()}getRowNodesInRange(e,t){let n=[],r=-1,i=!1,a={value:0},o=!1;for(let s of this.getBlocksInOrder())if(!o){if(i&&r+1!==s.id){o=!0;continue}r=s.id,s.forEachNode(r=>{let a=r===e||r===t;(i||a)&&n.push(r),a&&(i=!i)},a,this.rowCount)}return o||i?[]:n}},Pw=class extends O{constructor(){super(...arguments),this.beanName=`rowModel`,this.rootNode=null}getRowBounds(e){return{rowHeight:this.rowHeight,rowTop:this.rowHeight*e}}ensureRowHeightsValid(){return!1}postConstruct(){if(this.gos.get(`rowModelType`)!==`infinite`)return;let e=this.beans,t=new el(e);this.rootNode=t,t.level=-1,this.rowHeight=Vn(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(),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=Vn(this.beans),this.cacheParams.rowHeight=this.rowHeight,this.updateRowHeights()})}onColumnEverything(){let e;e=this.cacheParams?!s(this.cacheParams.sortModel,this.beans.sortSvc?.getSortModel()??[]):!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(){this.datasource&&(Qn(this.gos)??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();let e=this.beans,{filterManager:t,sortSvc:n,rowNodeBlockLoader:r,eventSvc:i,gos:a}=e;this.cacheParams={datasource:this.datasource,filterModel:t?.getFilterModel()??{},sortModel:n?.getSortModel()??[],rowNodeBlockLoader:r,initialRowCount:a.get(`infiniteInitialRowCount`),maxBlocksInCache:a.get(`maxBlocksInCache`),rowHeight:Vn(e),overflowSize:a.get(`cacheOverflowSize`),blockSize:a.get(`cacheBlockSize`),lastAccessedSequence:{value:0}},this.infiniteCache=this.createBean(new Nw(this.cacheParams)),i.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){let 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){let 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 Fw(e){Fy(e)?.refreshCache()}function Iw(e){Fy(e)?.purgeCache()}function Lw(e){return Fy(e)?.getRowCount()}var Rw={moduleName:`InfiniteRowModel`,version:j,apiFunctions:{refreshInfiniteCache:Fw,purgeInfiniteCache:Iw,getInfiniteRowCount:Lw},dependsOn:[{moduleName:`InfiniteRowModelCore`,version:j,rowModels:[`infinite`],beans:[Pw,class extends O{constructor(){super(...arguments),this.beanName=`rowNodeBlockLoader`,this.activeBlockLoadsCount=0,this.blocks=[],this.active=!0}postConstruct(){this.maxConcurrentRequests=er(this.gos);let e=this.gos.get(`blockLoadDebounceMillis`);e&&e>0&&(this.checkBlockToLoadDebounce=k(this,this.performCheckBlocksToLoad.bind(this),e))}addBlock(e){this.blocks.push(e),e.addEventListener(`loadComplete`,this.loadComplete.bind(this)),this.checkBlockToLoad()}removeBlock(e){qr(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){Gt(this.gos,`RowNodeBlockLoader - checkBlockToLoad: max loads exceeded`);return}let e=this.maxConcurrentRequests==null?1:this.maxConcurrentRequests-this.activeBlockLoadsCount,t=this.blocks.filter(e=>e.state===`needsLoading`).slice(0,e);this.activeBlockLoadsCount+=t.length;for(let e of t)e.load();this.printCacheStatus()}getBlockState(){let e={};return this.blocks.forEach(t=>{let{id:n,state:r}=t.getBlockStateJson();e[n]=r}),e}printCacheStatus(){Gt(this.gos,`RowNodeBlockLoader - printCacheStatus: activePageLoadsCount = ${this.activeBlockLoadsCount}, blocks = ${JSON.stringify(this.getBlockState())}`)}}]},JC]},zw=`↑`,Bw=`↓`,Vw={tag:`span`,children:[{tag:`span`,ref:`eDelta`,cls:`ag-value-change-delta`},{tag:`span`,ref:`eValue`,cls:`ag-value-change-value`}]},Hw=class extends V{constructor(){super(Vw),this.eValue=B,this.eDelta=B,this.refreshCount=0}init(e){this.refresh(e,!0)}showDelta(e,t){let n=Math.abs(t),r=e.formatValue(n),a=i(r)?r:n,o=t>=0,s=this.eDelta;o?s.textContent=zw+a:s.textContent=Bw+a,s.classList.toggle(`ag-value-change-delta-up`,o),s.classList.toggle(`ag-value-change-delta-down`,!o)}setTimerToRemoveDelta(){this.refreshCount++;let 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`),T(this.eDelta)}refresh(e,t=!1){let{value:n,valueFormatted:r}=e,{eValue:a,lastValue:o,beans:s}=this;if(n===o||(i(r)?a.textContent=r:i(n)?a.textContent=n:T(a),s.filterManager?.isSuppressFlashingCellsBecauseFiltering()))return!1;let c=n&&typeof n==`object`&&`toNumber`in n?n.toNumber():n,l=o&&typeof o==`object`&&`toNumber`in o?o.toNumber():o;if(c===l)return!1;if(typeof c==`number`&&typeof l==`number`){let t=c-l;this.showDelta(e,t)}return o&&a.classList.add(`ag-value-change-value-highlight`),t||this.setTimerToRemoveDelta(),this.lastValue=n,!0}},Uw=`.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}`,Ww={tag:`span`,children:[{tag:`span`,ref:`eCurrent`,cls:`ag-value-slide-current`}]},Gw=class extends V{constructor(){super(Ww),this.eCurrent=B,this.refreshCount=0,this.registerCSS(Uw)}init(e){this.refresh(e,!0)}addSlideAnimation(){this.refreshCount++;let e=this.refreshCount;this.ePrevious?.remove();let{beans:t,eCurrent:n}=this,r=fl({tag:`span`,cls:`ag-value-slide-previous ag-value-slide-out`});this.ePrevious=r,r.textContent=n.textContent,this.getGui().insertBefore(r,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(a(n)&&(n=``),n===this.lastValue||this.beans.filterManager?.isSuppressFlashingCellsBecauseFiltering())return!1;t||this.addSlideAnimation(),this.lastValue=n;let r=this.eCurrent;return i(e.valueFormatted)?r.textContent=e.valueFormatted:i(e.value)?r.textContent=n:T(r),!0}},Kw=class extends O{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`),r=this.beans.gos.get(`cellFadeDuration`)){let i=this.animations[t];i.delete(e);let a=Date.now(),o=a+n,s={phase:`flash`,flashEndTime:o,fadeEndTime:a+n+r};i.set(e,s);let c=`ag-cell-${t}`,l=`${c}-animation`,{comp:u,eGui:{style:d}}=e;u.toggleCss(c,!0),u.toggleCss(l,!1),d.removeProperty(`transition`),d.removeProperty(`transition-delay`),this.nextAnimationTime&&o+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=o)}advanceAnimations(){let e=Date.now(),t=null;for(let n of Object.keys(this.animations)){let r=this.animations[n],i=`ag-cell-${n}`,a=`${i}-animation`;for(let[n,o]of r){if(!n.isAlive()||!n.comp){r.delete(n);continue}let{phase:s,flashEndTime:c,fadeEndTime:l}=o,u=s===`flash`?c:l;if(!(e+15>=u)){t=Math.min(u,t??1/0);continue}let{comp:d,eGui:{style:f}}=n;switch(s){case`flash`:d.toggleCss(i,!1),d.toggleCss(a,!0),f.transition=`background-color ${l-c}ms`,f.transitionDelay=`${c-e}ms`,t=Math.min(l,t??1/0),o.phase=`fade`;break;case`fade`:d.toggleCss(i,!1),d.toggleCss(a,!1),f.removeProperty(`transition`),f.removeProperty(`transition-delay`),r.delete(n);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;let n=Qu(e.cellPosition);t.cells[n]&&this.animateCell(e,`highlight`)}flashCell(e,t){this.animateCell(e,`data-changed`,t?.flashDuration,t?.fadeDuration)}destroy(){for(let e of Object.keys(this.animations))this.animations[e].clear()}};function qw(e,t={}){let{cellFlashSvc:n}=e;n&&e.frameworkOverrides.wrapIncoming(()=>{for(let r of e.rowRenderer.getCellCtrls(t.rowNodes,t.columns))n.flashCell(r,t)})}var Jw={moduleName:`HighlightChanges`,version:j,beans:[Kw],userComponents:{agAnimateShowChangeCellRenderer:Hw,agAnimateSlideCellRenderer:Gw},apiFunctions:{flashCells:qw}};function Yw(e){return e.stateSvc?.getState()??{}}function Xw(e,t,n){return e.stateSvc?.setState(t,n)}function Zw(e){return e={...e},e.version||=`32.1.0`,e.version===`32.1.0`&&(e=Qw(e)),e.version=j,e}function Qw(e){return e.cellSelection=$w(e,`rangeSelection`),e}function $w(e,t){if(e&&typeof e==`object`)return e[t]}var eT={moduleName:`GridState`,version:j,beans:[class extends O{constructor(){super(...arguments),this.beanName=`stateSvc`,this.updateRowGroupExpansionStateTimer=0,this.suppressEvents=!0,this.queuedUpdateSources=new Set,this.dispatchStateUpdateEventDebounced=k(this,()=>this.dispatchQueuedStateUpdateEvents(),0),this.onRowGroupOpenedDebounced=k(this,()=>{this.beans.gos.get(`ssrmExpandAllAffectsAllRows`)?(this.updateCachedState(`ssrmRowGroupExpansion`,this.getRowGroupExpansionState()),this.updateCachedState(`rowGroupExpansion`,void 0)):(this.updateCachedState(`rowGroupExpansion`,this.getRowGroupExpansionState()),this.updateCachedState(`ssrmRowGroupExpansion`,void 0))},0),this.onRowSelectedDebounced=k(this,()=>{this.staleStateKeys.delete(`rowSelection`),this.updateCachedState(`rowSelection`,this.getRowSelectionState())},0),this.staleStateKeys=new Set}postConstruct(){let{gos:e,ctrlsSvc:t,colDelayRenderSvc:n}=this.beans;this.isClientSideRowModel=P(e);let r=Zw(e.get(`initialState`)??{}),i=r.partialColumnState;delete r.partialColumnState,this.cachedState=r;let a=this.suppressEventsAndDispatchInitEvent.bind(this);t.whenReady(this,()=>a(()=>this.setupStateOnGridReady(r))),(r.columnOrder||r.columnVisibility||r.columnSizing||r.columnPinning||r.columnGroup)&&n?.hideColumns(`columnState`);let[o,s,c]=this.addManagedEventListeners({newColumnsLoaded:({source:e})=>{e===`gridInitializing`&&(o(),a(()=>{this.setupStateOnColumnsInitialised(r,!!i),n?.revealColumns(`columnState`)}))},rowCountReady:()=>{s?.(),a(()=>this.setupStateOnRowCountReady(r))},firstDataRendered:()=>{c?.(),a(()=>this.setupStateOnFirstDataRendered(r))}})}destroy(){super.destroy(),clearTimeout(this.updateRowGroupExpansionStateTimer),this.queuedUpdateSources.clear()}getState(){return this.staleStateKeys.size&&this.refreshStaleState(),this.cachedState}setState(e,t){let n=Zw(e);delete n.partialColumnState,this.cachedState=n,this.startSuppressEvents();let r=t?new Set(t):void 0;this.setGridReadyState(n,`api`,r),this.setColumnsInitialisedState(n,`api`,!!r,r),this.setRowCountState(n,`api`,r),setTimeout(()=>{this.isAlive()&&this.setFirstDataRenderedState(n,`api`,r),this.stopSuppressEvents(`api`)})}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`);let 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,r){this.setColumnState(e,t,n,r),this.setColumnGroupState(e,t,r),this.updateColumnAndGroupState()}setupStateOnColumnsInitialised(e,t){this.setColumnsInitialisedState(e,`gridInitializing`,t);let n=e=>()=>this.updateColumnState([e]);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:this.updateColumnAndGroupState.bind(this),columnGroupOpened:()=>this.updateCachedState(`columnGroup`,this.getColumnGroupState())})}setRowCountState(e,t,n){let{filter:r,rowGroupExpansion:i,ssrmRowGroupExpansion:a,rowSelection:o,pagination:s,rowPinning:c}=e,l=(e,r)=>!n?.has(e)&&(r||t===`api`);l(`filter`,r)&&this.setFilterState(r),l(`rowGroupExpansion`,i)&&this.setRowGroupExpansionState(a,i,t),l(`rowSelection`,o)&&this.setRowSelectionState(o,t),l(`pagination`,s)&&this.setPaginationState(s,t),l(`rowPinning`,c)&&this.setRowPinningState(c);let u=this.updateCachedState.bind(this);u(`filter`,this.getFilterState()),this.beans.gos.get(`ssrmExpandAllAffectsAllRows`)?(u(`ssrmRowGroupExpansion`,this.getRowGroupExpansionState()),u(`rowGroupExpansion`,void 0)):(u(`rowGroupExpansion`,this.getRowGroupExpansionState()),u(`ssrmRowGroupExpansion`,void 0)),u(`rowSelection`,this.getRowSelectionState()),u(`pagination`,this.getPaginationState())}setupStateOnRowCountReady(e){this.setRowCountState(e,`gridInitializing`);let t=this.updateCachedState.bind(this),n=()=>{this.updateRowGroupExpansionStateTimer=0,this.beans.gos.get(`ssrmExpandAllAffectsAllRows`)?(t(`ssrmRowGroupExpansion`,this.getRowGroupExpansionState()),t(`rowGroupExpansion`,void 0)):(t(`rowGroupExpansion`,this.getRowGroupExpansionState()),t(`ssrmRowGroupExpansion`,void 0))},r=()=>t(`filter`,this.getFilterState()),{gos:i,colFilter:a,selectableFilter:o}=this.beans;this.addManagedEventListeners({filterChanged:r,rowExpansionStateChanged:this.onRowGroupOpenedDebounced,expandOrCollapseAll:n,columnRowGroupChanged:n,rowDataUpdated:()=>{(i.get(`groupDefaultExpanded`)!==0||i.get(`isGroupOpenByDefault`))&&(this.updateRowGroupExpansionStateTimer||=setTimeout(n))},selectionChanged:()=>{this.staleStateKeys.add(`rowSelection`),this.onRowSelectedDebounced()},paginationChanged:e=>{(e.newPage||e.newPageSize)&&t(`pagination`,this.getPaginationState())},pinnedRowsChanged:()=>t(`rowPinning`,this.getRowPinningState())}),a&&this.addManagedListeners(a,{filterStateChanged:r}),o&&this.addManagedListeners(o,{selectedFilterChanged:r})}setFirstDataRenderedState(e,t,n){let{scroll:r,cellSelection:i,focusedCell:a,columnOrder:o}=e,s=(e,r)=>!n?.has(e)&&(r||t===`api`);s(`focusedCell`,a)&&this.setFocusedCellState(a),s(`cellSelection`,i)&&this.setCellSelectionState(i),s(`scroll`,r)&&this.setScrollState(r),this.setColumnPivotState(!!o?.orderedColIds,t);let c=this.updateCachedState.bind(this);c(`sideBar`,this.getSideBarState()),c(`focusedCell`,this.getFocusedCellState());let l=this.getRangeSelectionState();c(`rangeSelection`,l),c(`cellSelection`,l),c(`scroll`,this.getScrollState())}setupStateOnFirstDataRendered(e){this.setFirstDataRenderedState(e,`gridInitializing`);let t=this.updateCachedState.bind(this),n=()=>t(`focusedCell`,this.getFocusedCellState());this.addManagedEventListeners({cellFocused:n,cellFocusCleared:n,cellSelectionChanged:e=>{if(e.finished){let e=this.getRangeSelectionState();t(`rangeSelection`,e),t(`cellSelection`,e)}},bodyScrollEnd:()=>t(`scroll`,this.getScrollState())})}getColumnState(){let e=this.beans;return Ry(Ii(e),e.colModel.isPivotMode())}setColumnState(e,t,n,r){let{sort:i,rowGroup:a,aggregation:o,pivot:s,columnPinning:c,columnVisibility:l,columnSizing:u,columnOrder:d}=e,f=!1,p=(e,n)=>{let i=!r?.has(e)&&!!(n||t===`api`);return f||=i,i},m={},h=e=>{let t=m[e];return t||(t={colId:e},m[e]=t,t)},g={},_=p(`sort`,i);_&&i?.sortModel.forEach(({colId:e,sort:t},n)=>{let r=h(e);r.sort=t,r.sortIndex=n}),(_||!n)&&(g.sort=null,g.sortIndex=null);let v=p(`rowGroup`,a);v&&a?.groupColIds.forEach((e,t)=>{let n=h(e);n.rowGroup=!0,n.rowGroupIndex=t}),(v||!n)&&(g.rowGroup=null,g.rowGroupIndex=null);let y=p(`aggregation`,o);y&&o?.aggregationModel.forEach(({colId:e,aggFunc:t})=>{h(e).aggFunc=t}),(y||!n)&&(g.aggFunc=null);let ee=p(`pivot`,s);ee&&(s?.pivotColIds.forEach((e,t)=>{let n=h(e);n.pivot=!0,n.pivotIndex=t}),this.gos.updateGridOptions({options:{pivotMode:!!s?.pivotMode},source:t})),(ee||!n)&&(g.pivot=null,g.pivotIndex=null);let b=p(`columnPinning`,c);if(b){for(let e of c?.leftColIds??[])h(e).pinned=`left`;for(let e of c?.rightColIds??[])h(e).pinned=`right`}(b||!n)&&(g.pinned=null);let x=p(`columnVisibility`,l);if(x)for(let e of l?.hiddenColIds??[])h(e).hide=!0;(x||!n)&&(g.hide=null);let S=p(`columnSizing`,u);if(S)for(let{colId:e,flex:t,width:n}of u?.columnSizingModel??[]){let r=h(e);r.flex=t??null,r.width=n}(S||!n)&&(g.flex=null);let te=d?.orderedColIds,ne=!!te?.length&&!r?.has(`columnOrder`),C=ne?te.map(e=>h(e)):Object.values(m);(C.length||f)&&(this.columnStates=C,Ni(this.beans,{state:C,applyOrder:ne,defaultState:g},t))}setColumnPivotState(e,t){let n=this.columnStates;this.columnStates=void 0;let r=this.columnGroupStates;this.columnGroupStates=void 0;let i=this.beans,{pivotResultCols:a,colGroupSvc:o}=i;if(a?.isPivotResultColsPresent()){if(n){let r=[];for(let e of n)a.getPivotResultCol(e.colId)&&r.push(e);Ni(i,{state:r,applyOrder:e},t)}r&&o?.setColumnGroupState(r,t)}}getColumnGroupState(){let e=this.beans.colGroupSvc;if(e)return By(e.getColumnGroupState())}setColumnGroupState(e,t,n){let r=this.beans.colGroupSvc;if(!r||n?.has(`columnGroup`)||t!==`api`&&!Object.prototype.hasOwnProperty.call(e,`columnGroup`))return;let i=new Set(e.columnGroup?.openColumnGroupIds),a=r.getColumnGroupState().map(({groupId:e})=>{let t=i.has(e);return t&&i.delete(e),{groupId:e,open:t}});for(let e of i)a.push({groupId:e,open:!0});a.length&&(this.columnGroupStates=a),r.setColumnGroupState(a,t)}getFilterState(){let{filterManager:e,selectableFilter:t}=this.beans,n=e?.getFilterModel();n&&Object.keys(n).length===0&&(n=void 0);let r=e?.getFilterState(),i=e?.getAdvFilterModel()??void 0,a=t?.getState();return n||i||r||a?{filterModel:n,columnFilterState:r,advancedFilterModel:i,selectableFilters:a}:void 0}setFilterState(e){let{filterManager:t,selectableFilter:n}=this.beans,{filterModel:r,columnFilterState:i,advancedFilterModel:a,selectableFilters:o}=e??{filterModel:null,columnFilterState:null,advancedFilterModel:null};o!==void 0&&n?.setState(o??{}),(r!==void 0||i!==void 0)&&t?.setFilterState(r??null,i??null,`columnFilter`),a!==void 0&&t?.setAdvFilterModel(a??null,`advancedFilter`)}getRangeSelectionState(){let e=this.beans.rangeSvc?.getCellRanges().map(e=>{let{id:t,type:n,startRow:r,endRow:i,columns:a,startColumn:o}=e;return{id:t,type:n,startRow:r,endRow:i,colIds:a.map(e=>e.getColId()),startColId:o.getColId()}});return e?.length?{cellRanges:e}:void 0}setCellSelectionState(e){let{gos:t,rangeSvc:n,colModel:r,visibleCols:i}=this.beans;if(!or(t)||!n)return;let a=[];for(let t of e?.cellRanges??[]){let e=[];for(let n of t.colIds){let t=r.getCol(n);t&&e.push(t)}if(!e.length)continue;let n=r.getCol(t.startColId);if(!n){let t=i.allCols,r=new Set(e);n=t.find(e=>r.has(e))}a.push({...t,columns:e,startColumn:n})}n.setCellRanges(a)}getScrollState(){if(!this.isClientSideRowModel)return;let 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;let{top:t,left:n}=e??{top:0,left:0},{frameworkOverrides:r,rowRenderer:i,animationFrameSvc:a,ctrlsSvc:o}=this.beans;r.wrapIncoming(()=>{o.get(`center`).setCenterViewportScrollLeft(n),o.getScrollFeature()?.setVerticalScrollPosition(t),i.redraw({afterScroll:!0}),a?.flushAllFrames()})}getSideBarState(){return this.beans.sideBar?.comp?.getState()}getFocusedCellState(){if(!this.isClientSideRowModel)return;let e=this.beans.focusSvc.getFocusedCell();if(e){let{column:t,rowIndex:n,rowPinned:r}=e;return{colId:t.getColId(),rowIndex:n,rowPinned:r}}}setFocusedCellState(e){if(!this.isClientSideRowModel)return;let{focusSvc:t,colModel:n}=this.beans;if(!e){t.clearFocusedCell();return}let{colId:r,rowIndex:i,rowPinned:a}=e;t.setFocusedCell({column:n.getCol(r),rowIndex:i,rowPinned:a,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0})}getPaginationState(){let{pagination:e,gos:t}=this.beans;if(!e)return;let n=e.getCurrentPage(),r=t.get(`paginationAutoPageSize`)?void 0:e.getPageSize();if(!(!n&&!r))return{page:n,pageSize:r}}setPaginationState(e,t){let{pagination:n,gos:r}=this.beans;if(!n)return;let{pageSize:i,page:a}=e??{page:0,pageSize:r.get(`paginationPageSize`)},o=t===`gridInitializing`;i&&!r.get(`paginationAutoPageSize`)&&n.setPageSize(i,o?`initialState`:`pageSizeSelector`),typeof a==`number`&&(o?n.setPage(a):n.goToPage(a))}getRowSelectionState(){let e=this.beans.selectionSvc;if(!e)return;let 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`)}getRowGroupExpansionState(){let{expansionSvc:e}=this.beans;if(e)return e.getExpansionState()}getRowPinningState(){return this.beans.pinnedRowModel?.getPinnedState()}setRowPinningState(e){let t=this.beans.pinnedRowModel;e?t?.setPinnedState(e):t?.reset()}setRowGroupExpansionState(e,t,n){let r=this.beans.expansionSvc;if(!r)return;let i=t??{expandedRowGroupIds:[],collapsedRowGroupIds:[]};r.setExpansionState(i,n)}updateColumnState(e){let t=this.getColumnState(),n=!1,r=this.cachedState;for(let e of Object.keys(t)){let i=t[e];s(i,r[e])||(n=!0)}this.cachedState={...r,...t},n&&this.dispatchStateUpdateEvent(e)}updateCachedState(e,t){let n=this.cachedState[e];this.setCachedStateValue(e,t),s(t,n)||this.dispatchStateUpdateEvent([e])}setCachedStateValue(e,t){this.cachedState={...this.cachedState,[e]:t}}refreshStaleState(){let e=this.staleStateKeys;for(let t of e)t===`rowSelection`&&this.setCachedStateValue(t,this.getRowSelectionState());e.clear()}dispatchStateUpdateEvent(e){if(!this.suppressEvents){for(let t of e)this.queuedUpdateSources.add(t);this.dispatchStateUpdateEventDebounced()}}dispatchQueuedStateUpdateEvents(){let 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`)}}],apiFunctions:{getState:Yw,setState:Xw}};function tT(e){return e.rowModel.isLastRowIndexKnown()}function nT(e){return e.pagination?.getPageSize()??100}function rT(e){return e.pagination?.getCurrentPage()??0}function iT(e){return e.pagination?.getTotalPages()??1}function aT(e){return e.pagination?e.pagination.getMasterRowCount():e.rowModel.getRowCount()}function oT(e){e.pagination?.goToNextPage()}function sT(e){e.pagination?.goToPreviousPage()}function cT(e){e.pagination?.goToFirstPage()}function lT(e){e.pagination?.goToLastPage()}function uT(e,t){e.pagination?.goToPage(t)}var dT=class extends O{constructor(){super(...arguments),this.beanName=`paginationAutoPageSizeSvc`}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.centerRowsCtrl=e.center;let 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;let e=this.centerRowsCtrl.viewportSizeFeature.getBodyHeight();if(e>0){let t=this.beans,n=()=>{let n=Math.max(Vn(t),1),r=Math.floor(e/n);t.pagination.setPageSize(r,`autoCalculated`)};this.isBodyRendered?k(this,n,50)():(n(),this.isBodyRendered=!0)}else this.isBodyRendered=!1}},fT=`paginationPageSizeSelector`,pT={tag:`span`,cls:`ag-paging-page-size`},mT={selector:`AG-PAGE-SIZE-SELECTOR`,component:class extends V{constructor(){super(pT),this.hasEmptyOption=!1,this.handlePageSizeItemSelected=()=>{if(!this.selectPageSizeComp)return;let e=this.selectPageSizeComp.getValue();if(!e)return;let 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(fT,()=>{this.onPageSizeSelectorValuesChange()}),this.addManagedEventListeners({paginationChanged:e=>this.handlePaginationChanged(e)})}handlePaginationChanged(e){if(!this.selectPageSizeComp||!e?.newPageSize)return;let 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(){T(this.getGui()),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(fT)!==!1}reloadPageSizesSelector(){let e=this.getPageSizeSelectorValues(),t=this.pagination.getPageSize(),n=!t||!e.includes(t);if(n){let n=this.gos.exists(`paginationPageSize`),r=this.gos.get(fT)!==!0;M(94,{pageSizeSet:n,pageSizesSet:r,pageSizeOptions:e,paginationPageSizeOption:t}),r||M(95,{paginationPageSizeOption:t,paginationPageSizeSelector:fT}),e.unshift(``)}let r=String(n?``:t);this.selectPageSizeComp?(Gr(this.pageSizeOptions,e)||(this.selectPageSizeComp.clearOptions().addOptions(this.createPageSizeSelectOptions(e)),this.pageSizeOptions=e),this.selectPageSizeComp.setValue(r,!0)):this.createPageSizeSelectorComp(e,r),this.hasEmptyOption=n}createPageSizeSelectOptions(e){return e.map(e=>({value:String(e)}))}createPageSizeSelectorComp(e,t){let n=this.getLocaleTextFunc(),r=n(`pageSizeSelectorLabel`,`Page Size:`),i=n(`ariaPageSizeSelectorLabel`,`Page Size`);this.selectPageSizeComp=this.createManagedBean(new ds).addOptions(this.createPageSizeSelectOptions(e)).setValue(t).setAriaLabel(i).setLabel(r).onValueChange(()=>this.handlePageSizeItemSelected()),this.appendChild(this.selectPageSizeComp)}getPageSizeSelectorValues(){let e=[20,50,100],t=this.gos.get(fT);return!Array.isArray(t)||!t?.length?e:[...t].sort((e,t)=>e-t)}destroy(){this.toggleSelectDisplay(!1),super.destroy()}}},hT=`.ag-paging-panel{align-items:center;border-top:var(--ag-footer-row-border);display:flex;gap:calc(var(--ag-spacing)*4);height:var(--ag-pagination-panel-height);justify-content:flex-end;padding:0 var(--ag-cell-horizontal-padding)}:where(.ag-paging-page-size) .ag-wrapper{min-width:50px}.ag-paging-page-summary-panel{align-items:center;display:flex;gap:var(--ag-cell-widget-spacing);.ag-disabled &{pointer-events:none}}.ag-paging-button{cursor:pointer;position:relative;&.ag-disabled{cursor:default;opacity:.5}}.ag-paging-number,.ag-paging-row-summary-panel-number{font-weight:500}`,gT={selector:`AG-PAGINATION`,component:class extends If{constructor(){super(),this.btFirst=B,this.btPrevious=B,this.btNext=B,this.btLast=B,this.lbRecordCount=B,this.lbFirstRowOnPage=B,this.lbLastRowOnPage=B,this.lbCurrent=B,this.lbTotal=B,this.pageSizeComp=B,this.previousAndFirstButtonsDisabled=!1,this.nextButtonDisabled=!1,this.lastButtonDisabled=!1,this.areListenersSetup=!1,this.allowFocusInnerElement=!1,this.registerCSS(hT)}wireBeans(e){this.rowModel=e.rowModel,this.pagination=e.pagination,this.ariaAnnounce=e.ariaAnnounce}postConstruct(){let e=this.gos.get(`enableRtl`);this.setTemplate(this.getTemplate(),[mT]);let{btFirst:t,btPrevious:n,btNext:r,btLast:i}=this;this.activateTabIndex([t,n,r,i]),t.insertAdjacentElement(`afterbegin`,Y(e?`last`:`first`,this.beans)),n.insertAdjacentElement(`afterbegin`,Y(e?`next`:`previous`,this.beans)),r.insertAdjacentElement(`afterbegin`,Y(e?`previous`:`next`,this.beans)),i.insertAdjacentElement(`afterbegin`,Y(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:e=>this.allowFocusInnerElement?this.tabGuardFeature.getTabGuardCtrl().focusInnerElement(e):fd(this.beans,e),forceFocusOutWhenTabGuardsAreEmpty:!0}),this.onPaginationChanged()}setAllowFocus(e){this.allowFocusInnerElement=e}onPaginationChanged(){let e=this.gos.get(`pagination`)&&!this.gos.get(`suppressPaginationPanel`);this.setDisplayed(e),e&&(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(let 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)}]){let{el:t,fn:n}=e;this.addManagedListeners(t,{click:n,keydown:e=>{(e.key===U.ENTER||e.key===U.SPACE)&&(e.preventDefault(),n())}})}dd(this.beans,this,this.getGui()),this.areListenersSetup=!0}}onBtFirst(){this.previousAndFirstButtonsDisabled||this.pagination.goToFirstPage()}formatNumber(e){let t=this.gos.getCallback(`paginationNumberFormatter`);return t?t({value:e}):Uy(e,this.getLocaleTextFunc.bind(this))}getTemplate(){let 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(){let 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);let r=this.isZeroPagesToDisplay();this.nextButtonDisabled=e===n-1||r,this.lastButtonDisabled=!t||r||e===n-1,this.toggleButtonDisabled(this.btNext,this.nextButtonDisabled),this.toggleButtonDisabled(this.btLast,this.lastButtonDisabled)}toggleButtonDisabled(e,t){de(e,t),e.classList.toggle(`ag-disabled`,t)}isZeroPagesToDisplay(){let e=this.rowModel.isLastRowIndexKnown(),t=this.pagination.getTotalPages();return e&&t===0}updateLabels(){let e=this.rowModel.isLastRowIndexKnown(),t=this.pagination.getTotalPages(),n=this.pagination.getMasterRowCount(),r=e?n:null,i=this.pagination.getCurrentPage(),a=this.pagination.getPageSize(),o,s;this.isZeroPagesToDisplay()?o=s=0:(o=a*i+1,s=o+a-1,e&&s>r&&(s=r));let c=o+a-1,l=!e&&n<c,u=this.formatNumber(o);this.lbFirstRowOnPage.textContent=u;let d,f=this.getLocaleTextFunc();d=l?f(`pageLastRowUnknown`,`?`):this.formatNumber(s),this.lbLastRowOnPage.textContent=d;let p=t>0?i+1:0,m=this.formatNumber(p);this.lbCurrent.textContent=m;let h,g;if(e)h=this.formatNumber(t),g=this.formatNumber(r);else{let e=f(`more`,`more`);h=e,g=e}this.lbTotal.textContent=h,this.lbRecordCount.textContent=g,this.announceAriaStatus(u,d,g,m,h)}announceAriaStatus(e,t,n,r,i){let a=this.getLocaleTextFunc(),o=a(`page`,`Page`),s=a(`to`,`to`),c=a(`of`,`of`),l=`${e} ${s} ${t} ${c} ${n}`,u=`${o} ${r} ${c} ${i}`;l!==this.ariaRowStatus&&(this.ariaRowStatus=l,this.ariaAnnounce?.announceValue(l,`paginationRow`)),u!==this.ariaPageStatus&&(this.ariaPageStatus=u,this.ariaAnnounce?.announceValue(u,`paginationPage`))}}},_T={moduleName:`Pagination`,version:j,beans:[class extends O{constructor(){super(...arguments),this.beanName=`pagination`,this.currentPage=0,this.topDisplayedRowIndex=0,this.bottomDisplayedRowIndex=0,this.masterRowCount=0}postConstruct(){let 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 gT}isPaginateChildRows(){let 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){let t=this.currentPage;if(!this.active||t===e||typeof t!=`number`)return;let{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(){let 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 i(this.pageSizeAutoCalculated)&&this.gos.get(`paginationAutoPageSize`)?this.pageSizeAutoCalculated:i(this.pageSizeFromPageSizeSelector)?this.pageSizeFromPageSizeSelector:i(this.pageSizeFromInitialState)?this.pageSizeFromInitialState:i(this.pageSizeFromGridOptions)?this.pageSizeFromGridOptions:this.defaultPageSize}calculatePages(){this.active?this.paginateChildRows?this.calculatePagesAllRows():this.calculatePagesMasterRowsOnly():this.calculatedPagesNotActive(),this.beans.pageBounds.calculateBounds(this.topDisplayedRowIndex,this.bottomDisplayedRowIndex)}unsetAutoCalculatedPageSize(){if(this.pageSizeAutoCalculated===void 0)return;let e=this.pageSizeAutoCalculated;this.pageSizeAutoCalculated=void 0,this.pageSize!==e&&(this.calculatePages(),this.dispatchPaginationChangedEvent({newPageSize:!0}))}setPageSize(e,t){let 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(){let e=this.totalPages;this.currentPage>=e&&(this.currentPage=e-1);let t=this.currentPage;(!isFinite(t)||isNaN(t)||t<0)&&(this.currentPage=0)}calculatePagesMasterRowsOnly(){let e=this.beans.rowModel,t=e.getTopLevelRowCount();if(this.masterRowCount=t,t<=0){this.setZeroRows();return}let n=this.pageSize,r=t-1;this.totalPages=Math.floor(r/n)+1,this.adjustCurrentPageIfInvalid();let i=this.currentPage,a=n*i,o=n*(i+1)-1;o>r&&(o=r),this.topDisplayedRowIndex=e.getTopLevelRowDisplayedIndex(a),o===r?this.bottomDisplayedRowIndex=e.getRowCount()-1:this.bottomDisplayedRowIndex=e.getTopLevelRowDisplayedIndex(o+1)-1}getMasterRowCount(){return this.masterRowCount}calculatePagesAllRows(){let e=this.beans.rowModel.getRowCount();if(this.masterRowCount=e,e===0){this.setZeroRows();return}let{pageSize:t,currentPage:n}=this,r=e-1;this.totalPages=Math.floor(r/t)+1,this.adjustCurrentPageIfInvalid(),this.topDisplayedRowIndex=t*n,this.bottomDisplayedRowIndex=t*(n+1)-1,this.bottomDisplayedRowIndex>r&&(this.bottomDisplayedRowIndex=r)}calculatedPagesNotActive(){this.setPageSize(void 0,`autoCalculated`),this.totalPages=1,this.currentPage=0,this.topDisplayedRowIndex=0,this.bottomDisplayedRowIndex=this.beans.rowModel.getRowCount()-1}dispatchPaginationChangedEvent(e){let{keepRenderedRows:t=!1,newPage:n=!1,newPageSize:r=!1}=e;this.eventSvc.dispatchEvent({type:`paginationChanged`,animate:!1,newData:!1,newPage:n,newPageSize:r,keepRenderedRows:t})}},dT],icons:{first:`first`,previous:`previous`,next:`next`,last:`last`},apiFunctions:{paginationIsLastPageFound:tT,paginationGetPageSize:nT,paginationGetCurrentPage:rT,paginationGetTotalPages:iT,paginationGetRowCount:aT,paginationGoToNextPage:oT,paginationGoToPreviousPage:sT,paginationGoToFirstPage:cT,paginationGoToLastPage:lT,paginationGoToPage:uT},dependsOn:[fb]};function vT(e,t={}){let n=t?t.rowNodes:void 0;e.frameworkOverrides.wrapIncoming(()=>e.rowRenderer.redrawRows(n))}function yT(e,t,n,r,i){t&&(r&&t.parent&&t.parent.level!==-1&&yT(e,t.parent,n,r,i),t.setExpanded(n,void 0,i))}function bT(e,t){return e.rowModel.getRowNode(t)}function xT(e,t,n,r){e.rowRenderer.addRenderedRowListener(t,n,r)}function ST(e){return e.rowRenderer.getRenderedNodes()}function CT(e,t,n){e.rowModel.forEachNode(t,n)}function wT(e){return e.rowRenderer.firstRenderedRow}function TT(e){return e.rowRenderer.lastRenderedRow}function ET(e,t){return e.rowModel.getRow(t)}function DT(e){return e.rowModel.getRowCount()}var OT={moduleName:`RowApi`,version:j,apiFunctions:{redrawRows:vT,setRowNodeExpanded:yT,getRowNode:bT,addRenderedRowListener:xT,getRenderedNodes:ST,forEachNode:CT,getFirstDisplayedRowIndex:wT,getLastDisplayedRowIndex:TT,getDisplayedRowAtIndex:ET,getDisplayedRowCount:DT}},kT={moduleName:`ScrollApi`,version:j,apiFunctions:{getVerticalPixelRange:SS,getHorizontalPixelRange:CS,ensureColumnVisible:wS,ensureIndexVisible:TS,ensureNodeVisible:ES}};function AT(e,t,n){if(!t)return;let r=e.ctrlsSvc.getGridBodyCtrl().eGridBody,i=`aria-${t}`;n===null?r.removeAttribute(i):r.setAttribute(i,n)}function jT(e,t={}){e.frameworkOverrides.wrapIncoming(()=>e.rowRenderer.refreshCells(t))}function MT(e){e.frameworkOverrides.wrapIncoming(()=>{for(let t of e.ctrlsSvc.getHeaderRowContainerCtrls())t.refresh()})}function NT(e){return e.animationFrameSvc?.isQueueEmpty()??!0}function PT(e){e.animationFrameSvc?.flushAllFrames()}function FT(e){return{rowHeight:Vn(e),headerHeight:xd(e)}}function IT(e,t={}){let n=[];for(let r of e.rowRenderer.getCellCtrls(t.rowNodes,t.columns)){let e=r.getCellRenderer();e!=null&&n.push(Fa(e))}if(t.columns?.length)return n;let r=[],i=Gv(t.rowNodes);for(let t of e.rowRenderer.getAllRowCtrls()){if(i&&!Kv(t.rowNode,i)||!t.isFullWidth())continue;let e=t.getFullWidthCellRenderers();for(let t=0;t<e.length;t++){let n=e[t];n!=null&&r.push(Fa(n))}}return[...r,...n]}var LT={moduleName:`RenderApi`,version:j,apiFunctions:{setGridAriaProperty:AT,refreshCells:jT,refreshHeader:MT,isAnimationFrameQueueEmpty:NT,flushAllAnimationFrames:PT,getSizesForCurrentTheme:FT,getCellRendererInstances:IT}},RT=`: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 zT(e,t){typeof t==`number`?e.colAutosize?.sizeColumnsToFit(t,`api`):e.colAutosize?.sizeColumnsToFitGridBody(t)}function BT({colAutosize:e,visibleCols:t},n,r){Array.isArray(n)?e?.autoSizeCols({colKeys:n,skipHeader:r,source:`api`}):e?.autoSizeCols({...n,colKeys:n.colIds??t.allCols,source:`api`})}function VT(e,t){t&&typeof t==`object`?BT(e,t):e.colAutosize?.autoSizeAllColumns({source:`api`,skipHeader:t})}var HT=class extends O{constructor(){super(...arguments),this.beanName=`colAutosize`,this.timesDelayed=0,this.shouldQueueResizeOperations=!1,this.resizeOperationQueue=[]}postConstruct(){let{gos:e}=this,t=e.get(`autoSizeStrategy`);if(t){let n=!1,r=t.type;if(r===`fitGridWidth`||r===`fitProvidedWidth`)n=!0;else if(r===`fitCellContents`){this.addManagedEventListeners({firstDataRendered:()=>this.onFirstDataRendered(t)});let r=e.get(`rowData`);n=r!=null&&r.length>0&&P(e)}n&&this.beans.colDelayRenderSvc?.hideColumns(r)}}autoSizeCols(e){let{eventSvc:t,visibleCols:n,colModel:r}=this.beans;KT(this.beans,!0),this.innerAutoSizeCols(e).then(i=>{let a=e=>Mi(t,Array.from(e),!0,`autosizeColumns`);if(!e.scaleUpToFitGridWidth)return KT(this.beans,!1),a(i);let o=WT(this.beans),s=e=>n.leftCols.some(t=>li(t,e)),c=e=>n.rightCols.some(t=>li(t,e)),l=e.colKeys.filter(e=>!r.getCol(e)?.getColDef().suppressAutoSize&&!ri(e)&&!s(e)&&!c(e));this.sizeColumnsToFit(o,e.source,!0,{defaultMaxWidth:e.defaultMaxWidth,defaultMinWidth:e.defaultMinWidth,columnLimits:e.columnLimits?.map(e=>({...e,key:e.colId})),colKeys:l,onlyScaleUp:!0,animate:!1}),KT(this.beans,!1),a(i)})}innerAutoSizeCols(e){return new Promise((t,n)=>{if(this.shouldQueueResizeOperations)return this.pushResizeOperation(()=>this.innerAutoSizeCols(e).then(t,n));let{colKeys:r,skipHeader:i,skipHeaderGroups:a,stopAtGroup:o,defaultMaxWidth:s,defaultMinWidth:c,columnLimits:l=[],source:u=`api`}=e,{animationFrameSvc:d,renderStatus:f,colModel:p,autoWidthCalc:m,visibleCols:h}=this.beans;if(d?.flushAllFrames(),this.timesDelayed<5&&f&&(!f.areHeaderCellsRendered()||!f.areCellsRendered())){this.timesDelayed++,setTimeout(()=>{this.isAlive()&&this.innerAutoSizeCols(e).then(t,n)});return}this.timesDelayed=0;let g=new Set,_=-1,v=Object.fromEntries(l.map(({colId:e,...t})=>[e,t])),y=i??this.gos.get(`skipHeaderOnAutoSize`),ee=a??y;for(;_!==0;){_=0;let e=[];for(let t of r){if(!t||ii(t))continue;let n=p.getCol(t);if(!n||g.has(n)||n.getColDef().suppressAutoSize)continue;let r=m.getPreferredWidthForColumn(n,y);if(r>0){let e=v[n.colId]??{};e.minWidth??=c,e.maxWidth??=s;let t=UT(n,r,e);n.setActualWidth(t,u),g.add(n),_++}e.push(n)}e.length&&h.refresh(u)}ee||this.autoSizeColumnGroupsByColumns(r,u,o),t(g)})}autoSizeColumn(e,t,n){this.autoSizeCols({colKeys:[e],skipHeader:n,skipHeaderGroups:!0,source:t})}autoSizeColumnGroupsByColumns(e,t,n){let{colModel:r,ctrlsSvc:i}=this.beans,a=new Set,o=r.getColsForKeys(e);for(let e of o){let t=e.getParent();for(;t&&t!=n;)t.isPadding()||a.add(t),t=t.getParent()}let s;for(let e of a){for(let t of i.getHeaderRowContainerCtrls())if(s=t.getHeaderCtrlForColumn(e),s)break;s?.resizeLeafColumnsToFit(t)}}autoSizeAllColumns(e){if(this.shouldQueueResizeOperations){this.pushResizeOperation(()=>this.autoSizeAllColumns(e));return}this.autoSizeCols({colKeys:this.beans.visibleCols.allCols,...e})}addColumnAutosizeListeners(e,t){let n=this.gos.get(`skipHeaderOnAutoSize`),r=()=>{this.autoSizeColumn(t,`uiColumnResized`,n)};e.addEventListener(`dblclick`,r);let i=new Hf(e);return i.addEventListener(`doubleTap`,r),()=>{e.removeEventListener(`dblclick`,r),i.destroy()}}addColumnGroupResize(e,t,n){let r=this.gos.get(`skipHeaderOnAutoSize`),i=()=>{let e=[],i=t.getDisplayedLeafColumns();for(let t of i)t.getColDef().suppressAutoSize||e.push(t.getColId());e.length>0&&this.autoSizeCols({colKeys:e,skipHeader:r,stopAtGroup:t,source:`uiColumnResized`}),n()};return e.addEventListener(`dblclick`,i),()=>e.removeEventListener(`dblclick`,i)}sizeColumnsToFitGridBody(e,t){if(!this.isAlive())return;let n=WT(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):M(29)}sizeColumnsToFit(e,t=`sizeColumnsToFit`,n,r){if(this.shouldQueueResizeOperations){this.pushResizeOperation(()=>this.sizeColumnsToFit(e,t,n,r));return}let{beans:i}=this,a=r?.animate??!0;a&&KT(i,!0);let o={};for(let{key:e,...t}of r?.columnLimits??[])o[typeof e==`string`?e:e.getColId()]=t;let s=i.visibleCols.allCols;if(e<=0||!s.length)return;let c=$r(s);if(r?.onlyScaleUp&&c>e||e===c&&s.every(e=>{if(e.colDef.suppressSizeToFit)return!0;let t=o?.[e.getId()],n=t?.minWidth??r?.defaultMinWidth,i=t?.maxWidth??r?.defaultMaxWidth,a=e.getActualWidth();return(n==null||a>=n)&&(i==null||a<=i)}))return;let l=[],u=[];for(let e of s){let t=r?.colKeys?.some(t=>li(e,t))??!0;e.getColDef().suppressSizeToFit||!t?u.push(e):l.push(e)}let d=l.slice(0),f=!1,p=e=>{qr(l,e),u.push(e)};for(let e of l){e.resetActualWidth(t);let n=o?.[e.getId()],i=n?.minWidth??r?.defaultMinWidth,a=n?.maxWidth??r?.defaultMaxWidth,s=e.getActualWidth();typeof i==`number`&&s<i?e.setActualWidth(i,t,!0):typeof a==`number`&&s>a&&e.setActualWidth(a,t,!0)}for(;!f;){f=!0;let n=e-$r(u);if(n<=0)for(let e of l){let n=o?.[e.getId()]?.minWidth??r?.defaultMinWidth??e.minWidth;e.setActualWidth(n,t,!0)}else{let e=n/$r(l),i=n;for(let n=l.length-1;n>=0;n--){let a=l[n],s=o?.[a.getId()],c=s?.minWidth??r?.defaultMinWidth,u=s?.maxWidth??r?.defaultMaxWidth,d=a.getMinWidth(),m=a.getMaxWidth(),h=typeof c==`number`&&c>d?c:d,g=typeof u==`number`&&u<m?u:m,_=Math.round(a.getActualWidth()*e);_<h?(_=h,p(a),f=!1):_>g?(_=g,p(a),f=!1):n===0&&(_=i),a.setActualWidth(_,t,!0),i-=_}}}for(let e of d)e.fireColumnWidthChangedEvent(t);let m=i.visibleCols;m.setLeftValues(t),m.updateBodyWidths(),!n&&(Mi(this.eventSvc,d,!0,t),a&&KT(i,!1))}applyAutosizeStrategy(){let{gos:e,colDelayRenderSvc:t}=this.beans,n=e.get(`autoSizeStrategy`);n?.type!==`fitGridWidth`&&n?.type!==`fitProvidedWidth`||setTimeout(()=>{if(!this.isAlive())return;let e=n.type;if(e===`fitGridWidth`){let{columnLimits:e,defaultMinWidth:t,defaultMaxWidth:r}=n,i=e?.map(({colId:e,minWidth:t,maxWidth:n})=>({key:e,minWidth:t,maxWidth:n}));this.sizeColumnsToFitGridBody({defaultMinWidth:t,defaultMaxWidth:r,columnLimits:i})}else e===`fitProvidedWidth`&&this.sizeColumnsToFit(n.width,`sizeColumnsToFit`);t?.revealColumns(e)})}onFirstDataRendered({colIds:e,...t}){setTimeout(()=>{if(!this.isAlive())return;let 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(let e of this.resizeOperationQueue)e();this.resizeOperationQueue=[]}pushResizeOperation(e){this.resizeOperationQueue.push(e)}destroy(){this.resizeOperationQueue.length=0,super.destroy()}};function UT(e,t,n={}){let r=n.minWidth??e.getMinWidth();t<r&&(t=r);let i=n.maxWidth??e.getMaxWidth();return t>i&&(t=i),t}function WT({ctrlsSvc:e,scrollVisibleSvc:t}){let n=e.getGridBodyCtrl(),r=n.isVerticalScrollShowing()?t.getScrollbarWidth():0;return Le(n.eGridBody)-r}var GT=`ag-animate-autosize`;function KT({ctrlsSvc:e,gos:t},n){if(!t.get(`animateColumnResizing`)||t.get(`enableRtl`)||!e.isAlive())return;let r=e.getGridBodyCtrl().eGridBody.classList;n?r.add(GT):r.remove(GT)}var qT={moduleName:`ColumnAutoSize`,version:j,beans:[HT],apiFunctions:{sizeColumnsToFit:zT,autoSizeColumns:BT,autoSizeAllColumns:VT},dependsOn:[um],css:[RT]},JT=`.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 YT(e){return e.pinnedRowModel?.getPinnedTopRowCount()??0}function XT(e){return e.pinnedRowModel?.getPinnedBottomRowCount()??0}function ZT(e,t){return e.pinnedRowModel?.getPinnedTopRow(t)}function QT(e,t){return e.pinnedRowModel?.getPinnedBottomRow(t)}function $T(e,t,n){return e.pinnedRowModel?.forEachPinnedRow(t,n)}var eE={moduleName:`PinnedRow`,version:j,beans:[wf],css:[JT],apiFunctions:{getPinnedTopRowCount:YT,getPinnedBottomRowCount:XT,getPinnedTopRow:ZT,getPinnedBottomRow:QT,forEachPinnedRow:$T},icons:{rowPin:`pin`,rowPinTop:`pinned-top`,rowPinBottom:`pinned-bottom`,rowUnpin:`un-pin`}},tE=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(){let e=this.firstNode.__autoHeights?.[this.col.getColId()];if(e==null)return;let t=0;for(let e of this.spannedNodes)e!==this.lastNode&&(t+=e.rowHeight);return e-t}},nE=class extends O{constructor(e){super(),this.column=e}buildCache(e){let{column:t,beans:{gos:n,pinnedRowModel:r,rowModel:i,valueSvc:a,pagination:o}}=this,{colDef:s}=t,c=this.getNodeMap(e),l=new Map,u=n.getCallback(`isFullWidthRow`),d=s.equals,f=s.spanRows,p=typeof f==`function`,m=null,h=null,g,_=(e,t)=>{m=e,h=null,g=t},v=e=>{let r=!e.isExpandable()&&!e.group&&!e.detail&&(u?!u({rowNode:e}):!0);if(e.rowIndex==null||!r){_(null,null);return}if(m==null||e.level!==m.level||e.footer||h&&e.rowIndex-1!==h?.getLastNode().rowIndex){_(e,a.getValue(t,e));return}let i=a.getValue(t,e);if(p){if(!f(L(n,{valueA:g,nodeA:m,valueB:i,nodeB:e,column:t,colDef:s}))){_(e,i);return}}else if(d?!d(g,i):g!==i){_(e,i);return}if(!h){let e=c?.get(m);e?.firstNode===m?(e.reset(),h=e):h=new tE(t,m),l.set(m,h)}h.addSpannedNode(e),l.set(e,h)};switch(e){case`center`:i.forEachDisplayedNode?.(e=>{(!o||o.isRowInPage(e.rowIndex))&&v(e)}),this.centerValueNodeMap=l;break;case`top`:r?.forEachPinnedRow(`top`,v),this.topValueNodeMap=l;break;case`bottom`:r?.forEachPinnedRow(`bottom`,v),this.bottomValueNodeMap=l;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}}},rE=class extends O{constructor(){super(...arguments),this.beanName=`rowSpanSvc`,this.spanningColumns=new Map,this.debouncePinnedEvent=k(this,this.dispatchCellsUpdatedEvent.bind(this,!0),0),this.debounceModelEvent=k(this,this.dispatchCellsUpdatedEvent.bind(this,!1),0),this.pinnedTimeout=null,this.modelTimeout=null}postConstruct(){let 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){let{gos:t}=this.beans;if(!t.get(`enableCellSpan`)||this.spanningColumns.has(e))return;let n=this.createManagedBean(new nE(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}){let{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??=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){let n=this.spanningColumns.get(e);return n?n.isCellSpanning(t):!1}getCellSpanByPosition(e){let{pinnedRowModel:t,rowModel:n}=this.beans,r=e.column,i=e.rowIndex,a=this.spanningColumns.get(r);if(!a)return;let o;switch(e.rowPinned){case`top`:o=t?.getPinnedTopRow(i);break;case`bottom`:o=t?.getPinnedBottomRow(i);break;default:o=n.getRow(i)}if(o)return a.getCellSpan(o)}getCellStart(e){let t=this.getCellSpanByPosition(e);return t?{...e,rowIndex:t.firstNode.rowIndex}:e}getCellEnd(e){let t=this.getCellSpanByPosition(e);return t?{...e,rowIndex:t.getLastNode().rowIndex}:e}getCellSpan(e,t){let n=this.spanningColumns.get(e);if(n)return n.getCellSpan(t)}forEachSpannedColumn(e,t){for(let[n,r]of this.spanningColumns)r.isCellSpanning(e)&&t(n,r.getCellSpan(e))}destroy(){super.destroy(),this.spanningColumns.clear()}},iE=class extends av{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,r,i,a,o){this.eWrapper=n,super.setComp(e,t,n,r,i,a,o),this.setAriaRowSpan(),this.refreshAriaRowIndex()}isCellSpanning(){return!0}getCellSpan(){return this.cellSpan}refreshAriaRowIndex(){let{eGui:e,rowNode:t}=this;!e||t.rowIndex==null||_e(e,t.rowIndex)}setAriaRowSpan(){ve(this.eGui,this.cellSpan.spannedNodes.size)}setFocusedCellPosition(e){this.focusedCellPosition=e}getFocusedCellPosition(){return this.focusedCellPosition??this.cellPosition}checkCellFocused(){let 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){let{beans:t}=this;if(md(t)){this.focusedCellPosition=void 0;return}let 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}},aE=class extends uv{onRowIndexChanged(){super.onRowIndexChanged();for(let e of this.getAllCellCtrls())e.refreshAriaRowIndex()}getInitialRowClasses(e){return[`ag-spanned-row`]}getNewCellCtrl(e){let t=this.beans.rowSpanSvc?.getCellSpan(e,this.rowNode);if(t&&t.firstNode===this.rowNode)return new iE(t,this,this.beans)}isCorrectCtrlForSpan(e){let t=this.beans.rowSpanSvc?.getCellSpan(e.column,this.rowNode);return!t||t.firstNode!==this.rowNode?!1:e.getCellSpan()===t}onRowHeightChanged(){}refreshFirstAndLastRowStyles(){}addHoverFunctionality(){}resetHoveredStatus(){}},oE={moduleName:`CellSpan`,version:j,beans:[rE,class extends O{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){let{rowSpanSvc:t}=this.beans,n=this.getCtrlsMap(e),r=n.size,i=this.getAllRelevantRowControls(e),a=new Map,o=!1;for(let e of i)e.isAlive()&&t?.forEachSpannedColumn(e.rowNode,(e,t)=>{if(a.has(t.firstNode))return;let r=n.get(t.firstNode);if(r){a.set(t.firstNode,r),n.delete(t.firstNode);return}o=!0;let i=new aE(t.firstNode,this.beans,!1,!1,!1);a.set(t.firstNode,i)});this.setCtrlsMap(e,a);let s=a.size===r;if(!(!o&&s)){for(let e of n.values())e.destroyFirstPass(!0),e.destroySecondPass();this.dispatchLocalEvent({type:`spannedRowsUpdated`,ctrlsKey:e})}}getAllRelevantRowControls(e){let{rowRenderer:t}=this.beans;switch(e){case`top`:return t.topRowCtrls;case`bottom`:return t.bottomRowCtrls;case`center`:return t.allRowCtrls}}getCellByPosition(e){let{rowSpanSvc:t}=this.beans,n=t?.getCellSpanByPosition(e);if(!n)return;let r=this.getCtrlsMap(e.rowPinned).get(n.firstNode);if(r)return r.getAllCellCtrls().find(t=>t.column===e.column)}getCtrls(e){return[...this.getCtrlsMap(e).values()]}destroyRowCtrls(e){for(let 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`)}}]},sE=class extends O{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(){let{column:e,cellComp:t}=this,n=e.colDef,r=n.cellClassRules,i=this.getCellClassParams(e,n);ov(this.beans.expressionSvc,r===this.cellClassRules?void 0:this.cellClassRules,r,i,e=>t.toggleCss(e,!0),e=>t.toggleCss(e,!1)),this.cellClassRules=r}applyUserStyles(){let e=this.column,t=e.colDef,n=t.cellStyle;if(!n)return;let r;r=typeof n==`function`?n(this.getCellClassParams(e,t)):n,r&&this.cellComp.setUserStyles(r)}applyClassesFromColDef(){let{column:e,cellComp:t}=this,n=e.colDef,r=this.getCellClassParams(e,n);for(let e of this.staticClasses)t.toggleCss(e,!1);let i=this.beans.cellStyles.getStaticCellClasses(n,r);this.staticClasses=i;for(let e of i)t.toggleCss(e,!0)}getCellClassParams(e,t){let{value:n,rowNode:r}=this.cellCtrl;return L(this.beans.gos,{value:n,data:r.data,node:r,colDef:t,column:e,rowIndex:r.rowIndex})}},cE={moduleName:`CellStyle`,version:j,beans:[class extends O{constructor(){super(...arguments),this.beanName=`cellStyles`}processAllCellClasses(e,t,n,r){ov(this.beans.expressionSvc,void 0,e.cellClassRules,t,n,r),this.processStaticCellClasses(e,t,n)}getStaticCellClasses(e,t){let{cellClass:n}=e;if(!n)return[];let r;return r=typeof n==`function`?n(t):n,typeof r==`string`&&(r=[r]),r||[]}createCellCustomStyleFeature(e){return new sE(e,this.beans)}processStaticCellClasses(e,t,n){this.getStaticCellClasses(e,t).forEach(e=>{n(e)})}}]},lE={moduleName:`RowStyle`,version:j,beans:[cv]};function uE(e,t){return!!e.colHover?.isHovered(t)}var dE=class extends O{constructor(e,t){super(),this.columns=e,this.element=t,this.destroyManagedListeners=[],this.enableFeature=e=>{let{beans:t,gos:n,element:r,columns:i}=this,a=t.colHover;if(e??!!n.get(`columnHoverHighlight`))this.destroyManagedListeners=this.addManagedElementListeners(r,{mouseover:a.setMouseOver.bind(a,i),mouseout:a.clearMouseOver.bind(a)});else{for(let e of this.destroyManagedListeners)e();this.destroyManagedListeners=[]}}}postConstruct(){this.addManagedPropertyListener(`columnHoverHighlight`,({currentValue:e})=>{this.enableFeature(e)}),this.enableFeature()}destroy(){super.destroy(),this.destroyManagedListeners=null}},fE=`ag-column-hover`,pE={moduleName:`ColumnHover`,version:j,beans:[class extends O{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;let t=this.selectedColumns;return!!t&&t.indexOf(e)>=0}addHeaderColumnHoverListener(e,t,n){let r=()=>{let e=this.isHovered(n);t.toggleCss(`ag-column-hover`,e)};e.addManagedEventListeners({columnHoverChanged:r}),r()}onCellColumnHover(e,t){if(!t)return;let n=this.isHovered(e);t.toggleCss(fE,n)}addHeaderFilterColumnHoverListener(e,t,n,r){this.createHoverFeature(e,[n],r);let i=()=>{let e=this.isHovered(n);t.toggleCss(`ag-column-hover`,e)};e.addManagedEventListeners({columnHoverChanged:i}),i()}createHoverFeature(e,t,n){e.createManagedBean(new dE(t,n))}updateState(e){this.selectedColumns=e,this.eventSvc.dispatchEvent({type:`columnHoverChanged`})}}],apiFunctions:{isColumnHovered:uE}},mE=class extends O{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){let n=this.wrapSvc?.wrap(e,t)??t,r=!Cg.has(e),i=r?this.asyncListeners:this.syncListeners;i.has(e)||i.set(e,new Set),i.get(e).add(n),this.eventSvc.addListener(e,n,r)}removeListener(e,t){let n=this.wrapSvc?.unwrap(e,t)??t,r=!!this.asyncListeners.get(e)?.delete(n);r||this.syncListeners.get(e)?.delete(n),this.eventSvc.removeListener(e,n,r)}addGlobalListener(e){let t=this.wrapSvc?.wrapGlobal(e)??e,n=(e,n)=>{Cg.has(e)&&t(e,n)},r=(e,n)=>{Cg.has(e)||t(e,n)};this.globalListenerPairs.set(e,{syncListener:n,asyncListener:r});let i=this.eventSvc;i.addGlobalListener(n,!1),i.addGlobalListener(r,!0)}removeGlobalListener(e){let{eventSvc:t,wrapSvc:n,globalListenerPairs:r}=this,i=n?.unwrapGlobal(e)??e;if(r.has(i)){let{syncListener:n,asyncListener:a}=r.get(i);t.removeGlobalListener(n,!1),t.removeGlobalListener(a,!0),r.delete(e)}else this.syncGlobalListeners.delete(i),t.removeGlobalListener(i,!1)}destroyEventListeners(e,t){e.forEach((e,n)=>{e.forEach(e=>this.eventSvc.removeListener(n,e,t)),e.clear()}),e.clear()}destroyGlobalListeners(e,t){for(let 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);let{globalListenerPairs:e,eventSvc:t}=this;e.forEach(({syncListener:e,asyncListener:n})=>{t.removeGlobalListener(e,!1),t.removeGlobalListener(n,!0)}),e.clear()}};function hE(e,t,n){e.apiEventSvc?.addListener(t,n)}function gE(e,t,n){e.apiEventSvc?.removeListener(t,n)}function _E(e,t){e.apiEventSvc?.addGlobalListener(t)}function vE(e,t){e.apiEventSvc?.removeGlobalListener(t)}var yE={moduleName:`AllCommunity`,version:j,dependsOn:[Sw,Aw,Rw,ab,mC,hC,gC,_C,vC,yC,bC,pC,Ux,Wx,Gx,Hx,Kx,qx,eT,YC,_T,bh,OT,kT,LT,qT,Mp,eE,RC,cy,cE,pE,lE,{moduleName:`EventApi`,version:j,apiFunctions:{addEventListener:hE,addGlobalListener:_E,removeEventListener:gE,removeGlobalListener:vE},beans:[mE]},dy,Jw,Xx,{moduleName:`Locale`,version:j,beans:[Ly]},{moduleName:`RowAutoHeight`,version:j,beans:[class extends O{constructor(){super(...arguments),this.beanName=`rowAutoHeight`,this.wasEverActive=!1,this._debouncedCalculateRowHeights=k(this,this.calculateRowHeights.bind(this),1)}requestCheckAutoHeight(){this.wasEverActive&&this._debouncedCalculateRowHeights()}calculateRowHeights(){let{visibleCols:e,rowModel:t,rowSpanSvc:n,pinnedRowModel:r}=this.beans,i=e.autoHeightCols,a=!1,o=e=>{let t=e.__autoHeights,r=zn(this.beans,e).height;for(let a of i){let i=t?.[a.getColId()],o=n?.getCellSpan(a,e);if(o){if(o.getLastNode()!==e)continue;if(i=n?.getCellSpan(a,e)?.getLastNodeAutoHeight(),!i)return}if(i==null){if(this.colSpanSkipCell(a,e))continue;return}r=Math.max(i,r)}r!==e.rowHeight&&(e.setRowHeight(r),a=!0)};r?.forEachPinnedRow?.(`top`,o),r?.forEachPinnedRow?.(`bottom`,o),t.forEachDisplayedNode?.(o),a&&t.onRowHeightChanged?.()}setRowAutoHeight(e,t,n){if(e.__autoHeights??={},t==null){delete e.__autoHeights[n.getId()];return}let r=e.__autoHeights[n.getId()];e.__autoHeights[n.getId()]=t,r!==t&&this.requestCheckAutoHeight()}colSpanSkipCell(e,t){let{colModel:n,colViewport:r,visibleCols:i}=this.beans;if(!n.colSpanActive)return!1;let a=[];switch(e.getPinned()){case`left`:a=i.getLeftColsForRow(t);break;case`right`:a=i.getRightColsForRow(t);break;case null:a=r.getColsWithinViewport(t);break}return!a.includes(e)}setupCellAutoHeight(e,t,n){if(!e.column.isAutoHeight()||!t)return!1;this.wasEverActive=!0;let r=t.parentElement,{rowNode:i,column:a}=e,o=this.beans,s=c=>{if(this.beans.editSvc?.isEditing(e)||!e.isAlive()||!n.isAlive())return;let{paddingTop:l,paddingBottom:u,borderBottomWidth:d,borderTopWidth:f}=Fe(r),p=l+u+d+f,m=t.offsetHeight+p;if(c<5&&(!g(o)?.contains(t)||m==0)){window.setTimeout(()=>s(c+1),0);return}this.setRowAutoHeight(i,m,a)},c=()=>s(0);c();let l=tt(o,t,c);return n.addDestroyFunc(()=>{l(),this.setRowAutoHeight(i,void 0,a)}),!0}setAutoHeightActive(e){this.active=e.list.some(e=>e.isVisible()&&e.isAutoHeight())}areRowsMeasured(){if(!this.active)return!0;let e=this.beans.rowRenderer.getAllRowCtrls(),t=null;for(let{rowNode:n}of e)if((!t||this.beans.colModel.colSpanActive)&&(t=this.beans.colViewport.getColsWithinViewport(n).filter(e=>e.isAutoHeight())),t.length!==0){if(!n.__autoHeights)return!1;for(let e of t){let t=n.__autoHeights[e.getColId()];if(!t||n.rowHeight<t)return!1}}return!0}}]},Ap,Cw,oE]};const bE=`system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif`,xE=ag.withParams({backgroundColor:`#ffffff`,headerBackgroundColor:`#f5f5f5`,rowHoverColor:`#ffffff`,borderColor:`#e0e0e0`,foregroundColor:`#1e1e1e`,fontFamily:`monospace`,fontSize:13,headerFontFamily:bE,headerFontSize:13,headerFontWeight:700,cellHorizontalPadding:8,wrapperBorderRadius:0}),SE=ag.withParams({backgroundColor:`#1e1e1e`,headerBackgroundColor:`#383838`,rowHoverColor:`#1e1e1e`,borderColor:`#4a4a4a`,foregroundColor:`#e0e0e0`,fontFamily:`monospace`,fontSize:13,headerFontFamily:bE,headerFontSize:13,headerFontWeight:700,cellHorizontalPadding:8,wrapperBorderRadius:0});function CE(e){return{gridColor:e?`#4b5563`:`#d1d5db`,textColor:e?`#e5e7eb`:`#374151`,borderColor:e?`#6b7280`:`#9ca3af`,tooltipBackgroundColor:e?`#1f2937`:`#ffffff`,tooltipTextColor:e?`#e5e7eb`:`#111827`}}function wE(e,t=!0){let n=CE(e);return{grid:{color:t?n.gridColor:void 0,display:t},ticks:{color:n.textColor},border:{color:n.borderColor}}}function TE(e){let t=CE(e);return{legend:{labels:{color:t.textColor}},title:{color:t.textColor},tooltip:{backgroundColor:t.tooltipBackgroundColor,titleColor:t.tooltipTextColor,bodyColor:t.tooltipTextColor,borderColor:t.borderColor,borderWidth:1}}}const EE=`#63B3ED`,DE=`#F6AD55`,OE=`${EE}A5`,kE=`${DE}A5`,AE=`#90CDF4`,jE=`#FBD38D`,ME=`${AE}A5`,NE=`${jE}A5`,PE=`#63B3ED`,FE=`#90CDF4`;function IE(e){return{current:e?AE:EE,base:e?jE:DE,currentWithAlpha:e?ME:OE,baseWithAlpha:e?NE:kE,info:e?FE:PE}}function LE(e,t){return[{props:{color:e,variant:`contained`},style:{backgroundColor:`var(--mui-palette-${e}-main, ${t[500]})`,color:`var(--mui-palette-${e}-contrastText, #ffffff)`,"&:hover":{backgroundColor:`var(--mui-palette-${e}-dark, ${t[600]})`}}},{props:{color:e,variant:`outlined`},style:{"&&":{borderColor:`var(--mui-palette-${e}-main, ${t[500]})`,color:`var(--mui-palette-${e}-dark, ${t[600]})`},"&:hover":{borderColor:`var(--mui-palette-${e}-dark, ${t[600]})`,backgroundColor:`color-mix(in srgb, var(--mui-palette-${e}-light, ${t[50]}) 30%, transparent)`}}},{props:{color:e,variant:`text`},style:{"&&":{color:`var(--mui-palette-${e}-dark, ${t[600]})`},"&:hover":{backgroundColor:`color-mix(in srgb, var(--mui-palette-${e}-light, ${t[50]}) 30%, transparent)`}}}]}function RE(e,t){return[{props:{color:e,variant:`filled`},style:{backgroundColor:`var(--mui-palette-${e}-main, ${t[500]})`,color:`var(--mui-palette-${e}-contrastText, #ffffff)`,"&:hover":{backgroundColor:`var(--mui-palette-${e}-dark, ${t[600]})`},"&.MuiChip-clickable:hover":{backgroundColor:`var(--mui-palette-${e}-dark, ${t[600]})`}}},{props:{color:e,variant:`outlined`},style:{"&&":{borderColor:`var(--mui-palette-${e}-main, ${t[500]})`,color:`var(--mui-palette-${e}-dark, ${t[600]})`},"&:hover":{backgroundColor:`color-mix(in srgb, var(--mui-palette-${e}-light, ${t[50]}) 25%, transparent)`}}}]}function zE(e,t){return[{props:{color:e},style:{"& .MuiBadge-badge":{backgroundColor:`var(--mui-palette-${e}-main, ${t[500]})`,color:`var(--mui-palette-${e}-contrastText, #ffffff)`}}}]}function BE(e,t){return[{props:{color:e},style:{color:`var(--mui-palette-${e}-main, ${t[500]})`}}]}const VE=[...LE(`brand`,e.brand),...LE(`iochmara`,e.iochmara),...LE(`cyan`,e.cyan),...LE(`amber`,e.amber),...LE(`green`,e.green),...LE(`red`,e.red),...LE(`rose`,e.rose),...LE(`fuchsia`,e.fuchsia),...LE(`neutral`,e.neutral)],HE=[...RE(`brand`,e.brand),...RE(`iochmara`,e.iochmara),...RE(`cyan`,e.cyan),...RE(`amber`,e.amber),...RE(`green`,e.green),...RE(`red`,e.red),...RE(`rose`,e.rose),...RE(`fuchsia`,e.fuchsia),...RE(`neutral`,e.neutral)],UE=[...zE(`brand`,e.brand),...zE(`iochmara`,e.iochmara)],WE=[...BE(`brand`,e.brand),...BE(`iochmara`,e.iochmara)],GE={typography:{fontFamily:[`-apple-system`,`BlinkMacSystemFont`,`"Segoe UI"`,`Roboto`,`"Helvetica Neue"`,`Arial`,`sans-serif`,`"Apple Color Emoji"`,`"Segoe UI Emoji"`,`"Segoe UI Symbol"`].join(`,`),fontSize:14,h1:{fontWeight:600},h2:{fontWeight:600},h3:{fontWeight:600},h4:{fontWeight:600},h5:{fontWeight:600},h6:{fontWeight:600},button:{textTransform:`none`,fontWeight:500}},shape:{borderRadius:8},components:{MuiButton:{defaultProps:{disableElevation:!0},styleOverrides:{root:{borderRadius:6,boxShadow:`none`,textTransform:`none`,fontWeight:500,"&:hover":{boxShadow:`none`}},sizeSmall:{fontSize:`0.8125rem`,padding:`4px 10px`},sizeMedium:{padding:`0.5rem 1rem`,fontSize:`1rem`},sizeLarge:{padding:`0.75rem 1.5rem`,fontSize:`1.125rem`},contained:{"&:hover":{boxShadow:`none`}},outlined:{borderWidth:`1px`,"&:hover":{borderWidth:`1px`}}},variants:[{props:{size:`xsmall`},style:{fontSize:`0.75rem`,padding:`2px 8px`,minHeight:24}},...VE]},MuiChip:{styleOverrides:{root:{borderRadius:6,fontWeight:500},sizeSmall:{fontSize:`0.75rem`,height:24},sizeMedium:{height:32,fontSize:`0.875rem`}},variants:[{props:{size:`xsmall`},style:{fontSize:`0.6875rem`,height:20,"& .MuiChip-label":{padding:`0 6px`}}},...HE]},MuiBadge:{variants:[...UE],styleOverrides:{badge:{fontWeight:500,fontSize:`0.75rem`}}},MuiAlert:{styleOverrides:{root:{borderRadius:6},standardSuccess:{backgroundColor:`var(--mui-palette-success-light)`,color:`var(--mui-palette-success-dark)`,"& .MuiAlert-icon":{color:`var(--mui-palette-success-dark)`}},standardWarning:{backgroundColor:`var(--mui-palette-warning-light)`,color:`var(--mui-palette-warning-dark)`,"& .MuiAlert-icon":{color:`var(--mui-palette-warning-dark)`}},standardError:{backgroundColor:`var(--mui-palette-error-light)`,color:`var(--mui-palette-error-dark)`,"& .MuiAlert-icon":{color:`var(--mui-palette-error-dark)`}},standardInfo:{backgroundColor:`var(--mui-palette-info-light)`,color:`var(--mui-palette-info-dark)`,"& .MuiAlert-icon":{color:`var(--mui-palette-info-dark)`}}}},MuiTabs:{styleOverrides:{indicator:{height:2}}},MuiTab:{styleOverrides:{root:{textTransform:`none`,fontWeight:500,minHeight:48}}},MuiAvatar:{styleOverrides:{root:{fontWeight:500}}},MuiCircularProgress:{defaultProps:{color:`primary`},variants:[...WE]},MuiLink:{defaultProps:{underline:`hover`},styleOverrides:{root:{fontWeight:500,color:`var(--mui-palette-secondary-main)`,textDecorationColor:`var(--mui-palette-secondary-light)`,"&:hover":{color:`var(--mui-palette-secondary-dark)`}}}},MuiPopover:{styleOverrides:{paper:{borderRadius:8,boxShadow:`0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1)`}}},MuiDivider:{styleOverrides:{root:{borderColor:`var(--mui-palette-divider)`}}},MuiBreadcrumbs:{styleOverrides:{separator:{color:`var(--mui-palette-text-secondary)`}}},MuiCard:{styleOverrides:{root:{borderRadius:8,boxShadow:`0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1)`}}},MuiPaper:{styleOverrides:{root:{backgroundImage:`none`}}},MuiTooltip:{styleOverrides:{tooltip:{fontSize:`0.75rem`}}},MuiIconButton:{styleOverrides:{root:{borderRadius:6},sizeSmall:{padding:4},sizeMedium:{padding:8},sizeLarge:{padding:12}}},MuiTextField:{defaultProps:{variant:`outlined`,size:`small`},styleOverrides:{root:{"& .MuiOutlinedInput-root":{borderRadius:6}}}},MuiOutlinedInput:{styleOverrides:{root:{borderRadius:6,"&:hover .MuiOutlinedInput-notchedOutline":{borderColor:`var(--mui-palette-secondary-light)`},"&.Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:`var(--mui-palette-secondary-main)`,borderWidth:2}},notchedOutline:{borderColor:`var(--mui-palette-divider)`}}},MuiCheckbox:{defaultProps:{color:`primary`},styleOverrides:{root:{borderRadius:4}}},MuiSwitch:{defaultProps:{color:`primary`}},MuiDialog:{styleOverrides:{paper:{borderRadius:8}}},MuiDialogTitle:{styleOverrides:{root:{fontWeight:600,fontSize:`1.125rem`}}},MuiMenu:{styleOverrides:{paper:{borderRadius:8,boxShadow:`0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1)`}}},MuiMenuItem:{styleOverrides:{root:{fontSize:`0.875rem`,padding:`0.5rem 0.75rem`,"&:hover":{backgroundColor:`var(--mui-palette-action-hover)`},"&.Mui-selected":{backgroundColor:`var(--mui-palette-action-selected)`,"&:hover":{backgroundColor:`var(--mui-palette-action-selected)`}}}}},MuiAutocomplete:{styleOverrides:{paper:{borderRadius:6,boxShadow:`0 4px 6px -1px rgba(0, 0, 0, 0.15), 0 2px 4px -2px rgba(0, 0, 0, 0.1)`,backgroundColor:e.neutral[200],".dark &":{backgroundColor:e.neutral[700]}},listbox:{padding:`4px 0`},option:{fontSize:`0.875rem`,padding:`0.5rem 0.75rem`,'&[aria-selected="true"]':{backgroundColor:`var(--mui-palette-action-selected)`},"&.Mui-focused":{backgroundColor:`var(--mui-palette-action-hover)`}}}}}},KE=t({cssVariables:{colorSchemeSelector:`class`},colorSchemes:{light:{palette:{mode:`light`,primary:{main:e.iochmara[500],light:e.iochmara[300],dark:e.iochmara[600],contrastText:`#ffffff`},secondary:{main:e.cyan[500],light:e.cyan[400],dark:e.cyan[600],contrastText:`#ffffff`},brand:{light:e.brand[400],main:e.brand[500],dark:e.brand[600],contrastText:`#ffffff`},iochmara:{light:e.iochmara[400],main:e.iochmara[500],dark:e.iochmara[600],contrastText:`#ffffff`},cyan:{main:e.cyan[500],light:e.cyan[300],dark:e.cyan[600],contrastText:`#ffffff`},amber:{main:e.amber[500],light:e.amber[300],dark:e.amber[600],contrastText:`#ffffff`},green:{main:e.green[500],light:e.green[300],dark:e.green[600],contrastText:`#ffffff`},red:{main:e.red[500],light:e.red[300],dark:e.red[600],contrastText:`#ffffff`},rose:{main:e.rose[500],light:e.rose[300],dark:e.rose[600],contrastText:`#ffffff`},fuchsia:{main:e.fuchsia[500],light:e.fuchsia[300],dark:e.fuchsia[600],contrastText:`#ffffff`},neutral:{main:e.neutral[600],light:e.neutral[300],dark:e.neutral[700],contrastText:`#ffffff`},grey:e.neutral,success:e.success,warning:e.warning,error:e.error,info:e.info,background:{default:`#ffffff`,paper:e.neutral[50]},text:{primary:e.neutral[900],secondary:e.neutral[600],disabled:e.neutral[400]},divider:e.neutral[200]}},dark:{palette:{mode:`dark`,primary:{main:e.iochmara[500],light:e.iochmara[300],dark:e.iochmara[600],contrastText:`#ffffff`},secondary:{main:e.cyan[500],light:e.cyan[400],dark:e.cyan[600],contrastText:`#ffffff`},brand:{light:e.brand[300],main:e.brand[400],dark:e.brand[600],contrastText:`#ffffff`},iochmara:{light:e.iochmara[300],main:e.iochmara[400],dark:e.iochmara[600],contrastText:`#ffffff`},cyan:{main:e.cyan[400],light:e.cyan[300],dark:e.cyan[600],contrastText:`#ffffff`},amber:{main:e.amber[400],light:e.amber[300],dark:e.amber[600],contrastText:`#000000`},green:{main:e.green[400],light:e.green[300],dark:e.green[600],contrastText:`#ffffff`},red:{main:e.red[400],light:e.red[300],dark:e.red[600],contrastText:`#ffffff`},rose:{main:e.rose[400],light:e.rose[300],dark:e.rose[600],contrastText:`#ffffff`},fuchsia:{main:e.fuchsia[400],light:e.fuchsia[300],dark:e.fuchsia[600],contrastText:`#ffffff`},neutral:{main:e.neutral[400],light:e.neutral[300],dark:e.neutral[200],contrastText:e.neutral[900]},grey:e.neutral,success:{light:e.success.light,main:e.success.main,dark:e.success.dark,contrastText:`#000000`},warning:{light:e.warning.light,main:e.warning.main,dark:e.warning.dark,contrastText:`#000000`},error:{light:e.error.light,main:e.error.main,dark:e.error.dark,contrastText:`#ffffff`},info:{light:e.info.light,main:e.info.main,dark:e.info.dark,contrastText:`#ffffff`},background:{default:e.neutral[900],paper:e.neutral[800]},text:{primary:e.neutral[50],secondary:e.neutral[400],disabled:e.neutral[600]},divider:e.neutral[700]}}},...GE});export{d as $,Id as A,bu as B,Wi as C,My as D,Ru as E,Uf as F,Pn as G,xu as H,Cr as I,Ce as J,tt as K,h as L,Pu as M,xo as N,Jf as O,Lf as P,Se as Q,Tr as R,qi as S,Gu as T,yu as U,Su as V,P as W,ye as X,Ue as Y,ge as Z,xE as _,kE as a,Vy as b,ME as c,FE as d,M as et,IE as f,SE as g,wE as h,NE as i,pn as j,Dd as k,OE as l,TE as m,DE as n,EE as o,CE as p,wr as q,jE as r,AE as s,KE as t,PE as u,H as v,Uu as w,O as x,yE as y,un as z};
|
|
64
|
+
//# sourceMappingURL=theme-7oDjt2Ob.js.map
|